[
  {
    "path": "BasicSamplers/CMakeLists.txt",
    "content": "cmake_minimum_required (VERSION 3.0)\n\nproject(BasicSamplers)\n\n\nset(SOURCES\n../DSPUtil/complex.cpp \n../DSPUtil/fft.cpp\napi.cpp\nFrequencyDetection.cpp\nPercussionSampler.cpp\nInstrumentSingleSampler.cpp\nInstrumentMultiSampler.cpp\n)\n\nset(HEADERS \n../DSPUtil/complex.h\n../DSPUtil/fft.h\nFrequencyDetection.h\nSample.h\nPercussionSampler.h\nInstrumentSingleSampler.h\nInstrumentMultiSampler.h\n)\n\n\nset (INCLUDE_DIR\n../ScoreDraftCore\n../DSPUtil\n)\n\n\nif (WIN32) \nset (DEFINES  ${DEFINES}\n-D\"_CRT_SECURE_NO_DEPRECATE\"  \n-D\"_SCL_SECURE_NO_DEPRECATE\" \n)\nelse()\nadd_definitions(-std=c++0x)\nadd_compile_options(-fPIC)\nendif()\n\ninclude_directories(${INCLUDE_DIR})\nadd_definitions(${DEFINES})\nadd_library (BasicSamplers SHARED  ${SOURCES} ${HEADERS})\ntarget_link_libraries(BasicSamplers ScoreDraftCore)\n\nif (WIN32) \ntarget_compile_definitions(BasicSamplers PUBLIC SCOREDRAFTCORE_DLL_IMPORT)\nendif()\n\nif (WIN32) \ninstall(TARGETS BasicSamplers RUNTIME DESTINATION ScoreDraft)\nelse()\ninstall(TARGETS BasicSamplers DESTINATION ScoreDraft)\nendif()\n\n"
  },
  {
    "path": "BasicSamplers/FrequencyDetection.cpp",
    "content": "#include \"FrequencyDetection.h\"\n#include \"fft.h\"\n\n#ifndef max\n#define max(a,b)            (((a) > (b)) ? (a) : (b))\n#endif\n\n#ifndef min\n#define min(a,b)            (((a) < (b)) ? (a) : (b))\n#endif\n\nclass Window\n{\npublic:\n\tvirtual ~Window(){}\n\tfloat m_halfWidth;\n\tstd::vector<float> m_data;\n\n\tvoid Allocate(float halfWidth)\n\t{\n\t\tunsigned u_halfWidth = (unsigned)ceilf(halfWidth);\n\t\tunsigned u_width = u_halfWidth << 1;\n\n\t\tm_halfWidth = halfWidth;\n\t\tm_data.resize(u_width);\n\n\t\tSetZero();\n\t}\n\n\tvoid SetZero()\n\t{\n\t\tmemset(m_data.data(), 0, sizeof(float)*m_data.size());\n\t}\n\n\tvoid CreateFromBuffer(const Buffer& src, float center, float halfWidth)\n\t{\n\t\tunsigned u_halfWidth = (unsigned)ceilf(halfWidth);\n\t\tunsigned u_width = u_halfWidth << 1;\n\n\t\tm_halfWidth = halfWidth;\n\t\tm_data.resize(u_width);\n\n\t\tSetZero();\n\n\t\tint i_Center = (int)center;\n\n\t\tfor (int i = -(int)u_halfWidth; i < (int)u_halfWidth; i++)\n\t\t{\n\t\t\tfloat window = (cosf((float)i * (float)PI / halfWidth) + 1.0f)*0.5f;\n\n\t\t\tint srcIndex = i_Center + i;\n\t\t\tfloat v_src = src.GetSample(srcIndex);\n\n\t\t\tSetSample(i, window* v_src);\n\t\t}\n\t}\n\n\tvoid MergeToBuffer(Buffer& buf, float pos)\n\t{\n\t\tint ipos = (int)floorf(pos);\n\t\tunsigned u_halfWidth = GetHalfWidthOfData();\n\n\t\tfor (int i = max(-(int)u_halfWidth, -ipos); i < (int)u_halfWidth; i++)\n\t\t{\n\t\t\tint dstIndex = ipos + i;\n\t\t\tif (dstIndex >= (int)buf.m_size) break;\n\t\t\tbuf.m_data[dstIndex] += GetSample(i);\n\t\t}\n\t}\n\n\tvirtual unsigned GetHalfWidthOfData() const\n\t{\n\t\tunsigned u_width = (unsigned)m_data.size();\n\t\tunsigned u_halfWidth = u_width >> 1;\n\n\t\treturn u_halfWidth;\n\t}\n\n\tvirtual float GetSample(int i) const\n\t{\n\t\tunsigned u_width = (unsigned)m_data.size();\n\t\tunsigned u_halfWidth = u_width >> 1;\n\n\t\tunsigned pos;\n\t\tif (i >= 0)\n\t\t{\n\t\t\tif ((unsigned)i > u_halfWidth - 1) return 0.0f;\n\t\t\tpos = (unsigned)i;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (((int)u_width + i) < (int)u_halfWidth + 1) return 0.0f;\n\t\t\tpos = u_width - (unsigned)(-i);\n\t\t}\n\n\t\treturn m_data[pos];\n\t}\n\n\tvirtual void SetSample(int i, float v)\n\t{\n\t\tunsigned u_width = (unsigned)m_data.size();\n\t\tunsigned u_halfWidth = u_width >> 1;\n\n\t\tunsigned pos;\n\t\tif (i >= 0)\n\t\t{\n\t\t\tif ((unsigned)i > u_halfWidth - 1) return;\n\t\t\tpos = (unsigned)i;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (((int)u_width + i) < (int)u_halfWidth + 1) return;\n\t\t\tpos = u_width - (unsigned)(-i);\n\t\t}\n\n\t\tm_data[pos] = v;\n\t}\n\n};\n\nfloat fetchFrequency(const Buffer& buf, unsigned sampleRate)\n{\n\tunsigned l = 12;\n\tunsigned halfWinLen = 1 << (l - 1);\n\n\tfloat* fft_acc = new float[halfWinLen];\n\tmemset(fft_acc, 0, sizeof(float)*halfWinLen);\n\n\tDComp* fftData = new DComp[halfWinLen * 2];\n\tfftData[0].Re = 0.0;\n\tfftData[0].Im = 0.0;\n\n\tfor (unsigned center = 0; center < buf.m_size; center += halfWinLen)\n\t{\n\t\tWindow win;\n\t\twin.CreateFromBuffer(buf, (float)center, (float)halfWinLen);\n\n\t\tfor (unsigned i = 1; i<halfWinLen * 2; i++)\n\t\t{\n\t\t\tfftData[i].Re = (double)win.GetSample(i - halfWinLen);\n\t\t\tfftData[i].Im = 0.0;\n\t\t}\n\t\tfft(fftData, l);\n\n\t\tfor (unsigned i = 0; i < halfWinLen; i++)\n\t\t{\n\t\t\tDComp c = fftData[i];\n\t\t\tfft_acc[i] += c.Re*c.Re + c.Im*c.Im;\n\t\t}\n\t}\n\n\tfor (unsigned i = 0; i < halfWinLen; i++)\n\t{\n\t\tfftData[i].Re = (double)fft_acc[i];\n\t\tfftData[i].Im = 0.0;\n\t}\n\tifft(fftData, l);\n\n\tunsigned maxi = (unsigned)(-1);\n\n\tdouble lastV = fftData[0].Re;\n\tdouble maxV = 0.0f;\n\tbool ascending = false;\n\n\tfor (unsigned i = sampleRate / 2000; i < min(sampleRate / 30, halfWinLen); i++)\n\t{\n\t\tdouble v = fftData[i].Re;\n\t\tif (!ascending)\n\t\t{\n\t\t\tif (v > lastV) ascending = true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (v < lastV)\n\t\t\t{\n\t\t\t\tif (fftData[i - 1].Re>maxV)\n\t\t\t\t{\n\t\t\t\t\tmaxV = fftData[i - 1].Re;\n\t\t\t\t\tmaxi = i - 1;\n\t\t\t\t}\n\t\t\t\tascending = false;\n\t\t\t}\n\t\t}\n\t\tlastV = v;\n\t}\n\n\tfloat freq = (float)sampleRate / (float)maxi;\n\n\tdelete[] fft_acc;\n\n\treturn freq;\n}\n"
  },
  {
    "path": "BasicSamplers/FrequencyDetection.h",
    "content": "#ifndef _FrequencyDetection_h\n#define _FrequencyDetection_h\n\n#include <memory.h>\n#include <math.h>\n#include <vector>\n\nclass Buffer\n{\n\tstd::vector<float> _data;\npublic:\n\tunsigned m_size;\n\tfloat* m_data;\n\n\tvoid Allocate(unsigned size)\n\t{\n\t\t_data.resize(size);\n\t\tm_size = size;\n\t\tm_data = &_data[0];\n\t\tSetZero();\n\t}\n\n\tfloat GetSample(int i) const\n\t{\n\t\tif (i<0 || i >= (int)m_size) return 0.0f;\n\t\treturn m_data[i];\n\t}\n\n\tvoid SetZero()\n\t{\n\t\tmemset(m_data, 0, sizeof(float)*m_size);\n\t}\n\n\tvoid SetSample(int i, float v)\n\t{\n\t\tif (i < 0 || i >= (int)m_size) return;\n\t\tm_data[i] = v;\n\t}\n\n\tvoid AddToSample(int i, float v)\n\t{\n\t\tif (i < 0 || i >= (int)m_size) return;\n\t\tm_data[i] += v;\n\t}\n\n\tfloat GetMax()\n\t{\n\t\tfloat maxv = 0.0f;\n\t\tfor (size_t i = 0; i < m_size; i++)\n\t\t{\n\t\t\tif (fabsf(m_data[i])>maxv) maxv = fabsf(m_data[i]);\n\t\t}\n\t\treturn maxv;\n\t}\n\n};\n\nfloat fetchFrequency(const Buffer& buf, unsigned sampleRate);\n\n#endif\n"
  },
  {
    "path": "BasicSamplers/InstrumentMultiSampler.cpp",
    "content": "#include <math.h>\n#include <memory.h>\n#include \"Sample.h\"\n#include \"InstrumentMultiSampler.h\"\n\n#ifndef max\n#define max(a,b)            (((a) > (b)) ? (a) : (b))\n#endif\n\n#ifndef min\n#define min(a,b)            (((a) < (b)) ? (a) : (b))\n#endif\n\nstatic void s_generateNoteWave(const InstrumentSample& sample, float* outBuf, unsigned outBufLen, float sampleFreq, float k)\n{\n\tunsigned chn = sample.m_chn;\n\tfloat origin_SampleFreq = sample.m_origin_freq / (float)sample.m_origin_sample_rate;\n\tunsigned maxSample = (unsigned)((float)sample.m_wav_length*origin_SampleFreq / sampleFreq);\n\n\tfloat mult = 1.0f / sample.m_max_v;\n\n\tbool interpolation = sampleFreq <= origin_SampleFreq;\n\n\tfor (unsigned j = 0; j < min(outBufLen, maxSample); j++)\n\t{\n\t\tfloat wave[2];\n\t\tif (interpolation)\n\t\t{\n\t\t\tfloat pos = (float)j *sampleFreq / origin_SampleFreq;\n\t\t\tint ipos1 = (int)pos;\n\t\t\tfloat frac = pos - (float)ipos1;\n\t\t\tint ipos2 = ipos1 + 1;\n\t\t\tif (ipos2 >= (int)sample.m_wav_length) ipos2 = (int)sample.m_wav_length - 1;\n\n\t\t\t// linear interpolation\n\t\t\t//wave = m_wav_samples[ipos1] * (1.0f - frac) + m_wav_samples[ipos2] * frac;\n\n\t\t\t// cubic interpolation\n\t\t\tint ipos0 = ipos1 - 1;\n\t\t\tif (ipos0 < 0) ipos0 = 0;\n\n\t\t\tint ipos3 = ipos1 + 2;\n\t\t\tif (ipos3 >= (int)sample.m_wav_length) ipos3 = (int)sample.m_wav_length - 1;\n\n\t\t\tfor (unsigned c = 0; c < chn; c++)\n\t\t\t{\n\t\t\t\tfloat p0 = sample.m_wav_samples[ipos0*chn + c];\n\t\t\t\tfloat p1 = sample.m_wav_samples[ipos1*chn + c];\n\t\t\t\tfloat p2 = sample.m_wav_samples[ipos2*chn + c];\n\t\t\t\tfloat p3 = sample.m_wav_samples[ipos3*chn + c];\n\n\t\t\t\twave[c] = (-0.5f*p0 + 1.5f*p1 - 1.5f*p2 + 0.5f*p3)*powf(frac, 3.0f) +\n\t\t\t\t\t(p0 - 2.5f*p1 + 2.0f*p2 - 0.5f*p3)*powf(frac, 2.0f) +\n\t\t\t\t\t(-0.5f*p0 + 0.5f*p2)*frac + p1;\n\t\t\t}\n\n\t\t}\n\t\telse\n\t\t{\n\t\t\tint ipos1 = (int)ceilf(((float)j - 0.5f)*sampleFreq / origin_SampleFreq);\n\t\t\tint ipos2 = (int)floorf(((float)j + 0.5f)*sampleFreq / origin_SampleFreq);\n\t\t\tif (ipos1 < 0) ipos1 = 0;\n\t\t\tif (ipos2 >= (int)sample.m_wav_length) ipos2 = (int)sample.m_wav_length - 1;\n\t\t\tint count = ipos2 - ipos1 + 1;\n\n\t\t\tfor (unsigned c = 0; c < chn; c++)\n\t\t\t{\n\t\t\t\tfloat sum = 0.0f;\n\t\t\t\tfor (int ipos = ipos1; ipos <= ipos2; ipos++)\n\t\t\t\t{\n\t\t\t\t\tsum += sample.m_wav_samples[ipos*chn + c];\n\t\t\t\t}\n\t\t\t\twave[c] = sum / (float)count;\n\t\t\t}\n\t\t}\n\n\t\tfor (unsigned c = 0; c < chn; c++)\n\t\t{\n\t\t\toutBuf[j*chn + c] += k* wave[c] * mult;\n\t\t}\n\t}\n\n}\n\nvoid InstrumentMultiSample(const std::vector<InstrumentSample>& samples, float* outBuf, unsigned outBufLen, float sampleFreq)\n{\n\tif (samples.size() < 1) return;\n\tunsigned chn = samples[0].m_chn;\n\n\tbool useSingle = false;\n\tunsigned I;\n\n\t{\n\t\tconst InstrumentSample& wav = samples[0];\n\t\tfloat origin_SampleFreq = wav.m_origin_freq / (float)wav.m_origin_sample_rate;\n\n\t\tif (sampleFreq <= origin_SampleFreq)\n\t\t{\n\t\t\tI = 0;\n\t\t\tuseSingle = true;\n\t\t}\n\t}\n\n\tif (!useSingle)\n\t{\n\t\tconst InstrumentSample& wav = samples[samples.size() - 1];\n\t\tfloat origin_SampleFreq = wav.m_origin_freq / (float)wav.m_origin_sample_rate;\n\n\t\tif (sampleFreq >= origin_SampleFreq)\n\t\t{\n\t\t\tI = (unsigned)(samples.size() - 1);\n\t\t\tuseSingle = true;\n\t\t}\n\t}\n\n\tif (!useSingle)\n\t{\n\t\tfor (size_t i = 0; i < samples.size() - 1; i++)\n\t\t{\n\t\t\tconst InstrumentSample& wav = samples[i + 1];\n\t\t\tfloat origin_SampleFreq = wav.m_origin_freq / (float)wav.m_origin_sample_rate;\n\n\t\t\tif (sampleFreq == origin_SampleFreq)\n\t\t\t{\n\t\t\t\tI = (unsigned)(i + 1);\n\t\t\t\tuseSingle = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\telse if (sampleFreq < origin_SampleFreq)\n\t\t\t{\n\t\t\t\tI = (unsigned)i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\tmemset(outBuf, 0, sizeof(float)*outBufLen*chn);\n\tif (useSingle)\n\t{\n\t\ts_generateNoteWave(samples[I], outBuf, outBufLen, sampleFreq, 1.0f);\n\t}\n\telse\n\t{\n\t\tconst InstrumentSample& wav1 = samples[I];\n\t\tconst InstrumentSample& wav2 = samples[I + 1];\n\t\tfloat origin_SampleFreq1 = wav1.m_origin_freq / (float)wav1.m_origin_sample_rate;\n\t\tfloat origin_SampleFreq2 = wav2.m_origin_freq / (float)wav2.m_origin_sample_rate;\n\n\t\tfloat k2 = logf(sampleFreq / origin_SampleFreq1) / logf(origin_SampleFreq2 / origin_SampleFreq1);\n\t\tfloat k1 = 1.0f - k2;\n\n\t\ts_generateNoteWave(wav1, outBuf, outBufLen, sampleFreq, k1);\n\t\ts_generateNoteWave(wav2, outBuf, outBufLen, sampleFreq, k2);\n\t}\n\n\tfor (unsigned j = 0; j < outBufLen; j++)\n\t{\n\t\tfloat x2 = (float)j / (float)outBufLen;\n\t\tfloat amplitude = 1.0f - expf((x2 - 1.0f)*10.0f);\n\n\t\tfor (unsigned c = 0; c < chn; c++)\n\t\t\toutBuf[j*chn + c] = amplitude*outBuf[j*chn + c];\n\t}\n}\n"
  },
  {
    "path": "BasicSamplers/InstrumentMultiSampler.h",
    "content": "#ifndef _InstrumentMultiSampler_h\n#define _InstrumentMultiSampler_h\n\n#include <vector>\n\nstruct InstrumentSample;\nvoid InstrumentMultiSample(const std::vector<InstrumentSample>& samples, float* outBuf, unsigned outBufLen, float sampleFreq);\n\n#endif\n"
  },
  {
    "path": "BasicSamplers/InstrumentSingleSampler.cpp",
    "content": "#include <math.h>\n#include <memory.h>\n#include \"Sample.h\"\n#include \"InstrumentSingleSampler.h\"\n\n#ifndef max\n#define max(a,b)            (((a) > (b)) ? (a) : (b))\n#endif\n\n#ifndef min\n#define min(a,b)            (((a) < (b)) ? (a) : (b))\n#endif\n\nvoid InstrumentSingleSample(const InstrumentSample& sample, float* outBuf, unsigned outBufLen, float sampleFreq)\n{\n\tunsigned chn = sample.m_chn;\n\tmemset(outBuf, 0, sizeof(float)*outBufLen*chn);\n\n\tfloat origin_SampleFreq = sample.m_origin_freq / (float)sample.m_origin_sample_rate;\n\tunsigned maxSample = (unsigned)((float)sample.m_wav_length*origin_SampleFreq / sampleFreq);\n\n\tfloat mult = 1.0f / sample.m_max_v;\n\n\tbool interpolation = sampleFreq <= origin_SampleFreq;\n\n\tfor (unsigned j = 0; j < min(outBufLen, maxSample); j++)\n\t{\n\t\tfloat x2 = (float)j / (float)outBufLen;\n\t\tfloat amplitude = 1.0f - expf((x2 - 1.0f)*10.0f);\n\n\t\tfloat wave[2];\n\t\tif (interpolation)\n\t\t{\n\t\t\tfloat pos = (float)j *sampleFreq / origin_SampleFreq;\n\t\t\tint ipos1 = (int)pos;\n\t\t\tfloat frac = pos - (float)ipos1;\n\t\t\tint ipos2 = ipos1 + 1;\n\t\t\tif (ipos2 >= (int)sample.m_wav_length) ipos2 = (int)sample.m_wav_length - 1;\n\n\t\t\t// linear interpolation\n\t\t\t//wave = m_wav_samples[ipos1] * (1.0f - frac) + m_wav_samples[ipos2] * frac;\n\n\t\t\t// cubic interpolation\n\t\t\tint ipos0 = ipos1 - 1;\n\t\t\tif (ipos0 < 0) ipos0 = 0;\n\n\t\t\tint ipos3 = ipos1 + 2;\n\t\t\tif (ipos3 >= (int)sample.m_wav_length) ipos3 = (int)sample.m_wav_length - 1;\n\n\t\t\tfor (unsigned c = 0; c < chn; c++)\n\t\t\t{\n\t\t\t\tfloat p0 = sample.m_wav_samples[ipos0*chn + c];\n\t\t\t\tfloat p1 = sample.m_wav_samples[ipos1*chn + c];\n\t\t\t\tfloat p2 = sample.m_wav_samples[ipos2*chn + c];\n\t\t\t\tfloat p3 = sample.m_wav_samples[ipos3*chn + c];\n\n\t\t\t\twave[c] = (-0.5f*p0 + 1.5f*p1 - 1.5f*p2 + 0.5f*p3)*powf(frac, 3.0f) +\n\t\t\t\t\t(p0 - 2.5f*p1 + 2.0f*p2 - 0.5f*p3)*powf(frac, 2.0f) +\n\t\t\t\t\t(-0.5f*p0 + 0.5f*p2)*frac + p1;\n\t\t\t}\n\n\t\t}\n\t\telse\n\t\t{\n\t\t\tint ipos1 = (int)ceilf(((float)j - 0.5f)*sampleFreq / origin_SampleFreq);\n\t\t\tint ipos2 = (int)floorf(((float)j + 0.5f)*sampleFreq / origin_SampleFreq);\n\t\t\tif (ipos1 < 0) ipos1 = 0;\n\t\t\tif (ipos2 >= (int)sample.m_wav_length) ipos2 = (int)sample.m_wav_length - 1;\n\t\t\tint count = ipos2 - ipos1 + 1;\n\n\t\t\tfor (unsigned c = 0; c < chn; c++)\n\t\t\t{\n\t\t\t\tfloat sum = 0.0f;\n\t\t\t\tfor (int ipos = ipos1; ipos <= ipos2; ipos++)\n\t\t\t\t{\n\t\t\t\t\tsum += sample.m_wav_samples[ipos*chn + c];\n\t\t\t\t}\n\t\t\t\twave[c] = sum / (float)count;\n\t\t\t}\n\t\t}\n\n\t\tfor (unsigned c = 0; c < chn; c++)\n\t\t{\n\t\t\toutBuf[j*chn + c] = amplitude*wave[c] * mult;\n\t\t}\n\t}\n\n}\n"
  },
  {
    "path": "BasicSamplers/InstrumentSingleSampler.h",
    "content": "#ifndef _InstrumentSingleSampler_h\n#define _InstrumentSingleSampler_h\n\nstruct InstrumentSample;\nvoid InstrumentSingleSample(const InstrumentSample& sample, float* outBuf, unsigned outBufLen, float sampleFreq);\n\n#endif\n"
  },
  {
    "path": "BasicSamplers/PercussionSampler.cpp",
    "content": "#include <math.h>\n#include <memory.h>\n#include \"Sample.h\"\n#include \"PercussionSampler.h\"\n\n#ifndef max\n#define max(a,b)            (((a) > (b)) ? (a) : (b))\n#endif\n\n#ifndef min\n#define min(a,b)            (((a) < (b)) ? (a) : (b))\n#endif\n\nvoid PercussionSample(const Sample& sample, float* outBuf, unsigned outBufLen, float sampleRatio)\n{\n\tunsigned chn = sample.m_chn;\n\tmemset(outBuf, 0, sizeof(float)*outBufLen*chn);\n\n\tunsigned maxSample = (unsigned)((float)sample.m_wav_length*sampleRatio);\n\tfloat mult = 1.0f / sample.m_max_v;\n\n\tif (sampleRatio==1.0f)\n\t{\n\t\tfor (unsigned j = 0; j < min(outBufLen, maxSample); j++)\n\t\t{\n\t\t\tfloat x2 = (float)j / (float)outBufLen;\n\t\t\tfloat amplitude = 1.0f - expf((x2 - 1.0f)*10.0f);\n\n\t\t\tfor (unsigned c = 0; c < chn; c++)\n\t\t\t{\n\t\t\t\toutBuf[j * chn + c] = amplitude*sample.m_wav_samples[j * chn + c] * mult;\n\t\t\t}\n\t\t}\n\t}\n\telse\n\t{\n\t\tbool interpolation = sampleRatio > 1.0f;\n\t\tfloat inv_sampleRatio = 1.0f / sampleRatio;\n\t\tfor (unsigned j = 0; j < min(outBufLen, maxSample); j++)\n\t\t{\n\t\t\tfloat x2 = (float)j / (float)outBufLen;\n\t\t\tfloat amplitude = 1.0f - expf((x2 - 1.0f)*10.0f);\n\n\t\t\tfloat wave[2];\n\t\t\tif (interpolation)\n\t\t\t{\n\t\t\t\tfloat pos = (float)j *inv_sampleRatio;\n\t\t\t\tint ipos1 = (int)pos;\n\t\t\t\tfloat frac = pos - (float)ipos1;\n\t\t\t\tint ipos2 = ipos1 + 1;\n\t\t\t\tif (ipos2 >= (int)sample.m_wav_length) ipos2 = (int)sample.m_wav_length - 1;\n\n\t\t\t\t// cubic interpolation\n\t\t\t\tint ipos0 = ipos1 - 1;\n\t\t\t\tif (ipos0 < 0) ipos0 = 0;\n\n\t\t\t\tint ipos3 = ipos1 + 2;\n\t\t\t\tif (ipos3 >= (int)sample.m_wav_length) ipos3 = (int)sample.m_wav_length - 1;\n\n\t\t\t\tfor (unsigned c = 0; c < chn; c++)\n\t\t\t\t{\n\t\t\t\t\tfloat p0 = sample.m_wav_samples[ipos0*chn + c];\n\t\t\t\t\tfloat p1 = sample.m_wav_samples[ipos1*chn + c];\n\t\t\t\t\tfloat p2 = sample.m_wav_samples[ipos2*chn + c];\n\t\t\t\t\tfloat p3 = sample.m_wav_samples[ipos3*chn + c];\n\n\t\t\t\t\twave[c] = (-0.5f*p0 + 1.5f*p1 - 1.5f*p2 + 0.5f*p3)*powf(frac, 3.0f) +\n\t\t\t\t\t\t(p0 - 2.5f*p1 + 2.0f*p2 - 0.5f*p3)*powf(frac, 2.0f) +\n\t\t\t\t\t\t(-0.5f*p0 + 0.5f*p2)*frac + p1;\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tint ipos1 = (int)ceilf(((float)j - 0.5f)*inv_sampleRatio);\n\t\t\t\tint ipos2 = (int)floorf(((float)j + 0.5f)*inv_sampleRatio);\n\t\t\t\tif (ipos1 < 0) ipos1 = 0;\n\t\t\t\tif (ipos2 >= (int)sample.m_wav_length) ipos2 = (int)sample.m_wav_length - 1;\n\t\t\t\tint count = ipos2 - ipos1 + 1;\n\n\t\t\t\tfor (unsigned c = 0; c < chn; c++)\n\t\t\t\t{\n\t\t\t\t\tfloat sum = 0.0f;\n\t\t\t\t\tfor (int ipos = ipos1; ipos <= ipos2; ipos++)\n\t\t\t\t\t{\n\t\t\t\t\t\tsum += sample.m_wav_samples[ipos*chn + c];\n\t\t\t\t\t}\n\t\t\t\t\twave[c] = sum / (float)count;\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (unsigned c = 0; c < chn; c++)\n\t\t\t{\n\t\t\t\toutBuf[j*chn + c] = amplitude*wave[c] * mult;\n\t\t\t}\n\t\t}\n\n\t}\n\n}\n\n"
  },
  {
    "path": "BasicSamplers/PercussionSampler.h",
    "content": "#ifndef _PercussionSampler_h\n#define _PercussionSampler_h\n\nstruct Sample;\nvoid PercussionSample(const Sample& sample, float* outBuf, unsigned outBufLen, float sampleRatio);\n\n#endif\n"
  },
  {
    "path": "BasicSamplers/Sample.h",
    "content": "#pragma once\n\nstruct Sample\n{\n\tSample() {}\n\tvirtual ~Sample() {}\n\n\tunsigned m_wav_length;\n\tunsigned m_chn;\n\tfloat *m_wav_samples;\n\tfloat m_max_v;\n\tunsigned m_origin_sample_rate;\n};\n\nstruct InstrumentSample : public Sample\n{\n\tfloat m_origin_freq;\n};\n\n\n"
  },
  {
    "path": "BasicSamplers/api.cpp",
    "content": "#if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__)\n#define SCOREDRAFT_API __declspec(dllexport)\n#else\n#define SCOREDRAFT_API \n#endif\n\nextern \"C\"\n{\n\tSCOREDRAFT_API void* SampleCreate(unsigned origin_sample_rate, unsigned chn, void* ptr_f32_buf, float max_v);\n\tSCOREDRAFT_API void* InstrumentSampleCreate(unsigned origin_sample_rate, unsigned chn, void* ptr_f32_buf, float max_v, float origin_freq);\n\tSCOREDRAFT_API void SampleDestroy(void *ptr);\n\tSCOREDRAFT_API void PercussionGenerate(void* ptr_wavbuf, void* ptr_sample, float fduration);\n\tSCOREDRAFT_API void InstrumentSingleGenerate(void* ptr_wavbuf, void* ptr_sample, float freq, float fduration);\n\tSCOREDRAFT_API void InstrumentMultiGenerate(void* ptr_wavbuf, void* ptr_sample_lst, float freq, float fduration);\n}\n\n#include <algorithm>\n#include <utils.h>\n#include \"Sample.h\"\n#include \"FrequencyDetection.h\"\n#include \"PercussionSampler.h\"\n#include \"InstrumentSingleSampler.h\"\n#include \"InstrumentMultiSampler.h\"\n\nvoid CreateSample(Sample* sample, unsigned origin_sample_rate, unsigned chn, void* ptr_f32_buf, float max_v)\n{\n\tF32Buf* buf = (F32Buf*)ptr_f32_buf;\t\n\tif (max_v <= 0.0f)\n\t{\n\t\tmax_v = 0.0f;\n\t\tfor (size_t i = 0; i < buf->size(); i++)\n\t\t{\n\t\t\tfloat v = fabsf((*buf)[i]);\n\t\t\tif (v > max_v) max_v = v;\n\t\t}\n\t}\n\n\tsample->m_wav_length = (unsigned)buf->size()/chn;\n\tsample->m_chn = chn;\n\tsample->m_wav_samples = buf->data();\n\tsample->m_max_v = max_v;\n\tsample->m_origin_sample_rate = origin_sample_rate;\t\t\n}\n\nvoid* SampleCreate(unsigned origin_sample_rate, unsigned chn, void* ptr_f32_buf, float max_v)\n{\n\tSample* sample = new Sample;\n\tCreateSample(sample, origin_sample_rate, chn, ptr_f32_buf, max_v);\n\treturn sample;\n}\n\n\nstatic float s_DetectBaseFreq(const Sample& sample)\n{\n\tfloat* localMono = nullptr;\n\tfloat* pSamples = nullptr;\n\n\tif (sample.m_chn == 1)\n\t{\n\t\tpSamples = sample.m_wav_samples;\n\t}\n\telse if (sample.m_chn == 2)\n\t{\n\t\tlocalMono = new float[sample.m_wav_length];\n\t\tpSamples = localMono;\n\t\tfor (unsigned i = 0; i < sample.m_wav_length; i++)\n\t\t{\n\t\t\tlocalMono[i] = 0.5f*(sample.m_wav_samples[i * 2] + sample.m_wav_samples[i * 2 + 1]);\n\t\t}\n\t}\n\tBuffer buf;\n\tbuf.m_size = sample.m_wav_length;\n\tbuf.m_data = pSamples;\n\tfloat baseFreq = fetchFrequency(buf, sample.m_origin_sample_rate);\n\tdelete[] localMono;\n\n\treturn baseFreq;\n}\n\n\nvoid* InstrumentSampleCreate(unsigned origin_sample_rate, unsigned chn, void* ptr_f32_buf, float max_v, float origin_freq)\n{\n\tInstrumentSample* sample = new InstrumentSample;\n\tCreateSample(sample, origin_sample_rate, chn, ptr_f32_buf, max_v);\n\tif (origin_freq <= 0.0f)\n\t{\n\t\tsample->m_origin_freq = s_DetectBaseFreq(*sample);\n\t}\n\telse\n\t{\n\t\tsample->m_origin_freq = origin_freq;\n\t}\n\treturn sample;\n}\n\nvoid SampleDestroy(void *ptr)\n{\n\tdelete (Sample*)ptr;\n}\n\nvoid PercussionGenerate(void* ptr_wavbuf, void* ptr_sample, float fduration)\n{\n\tWavBuffer* wavbuf = (WavBuffer*)ptr_wavbuf;\n\tSample* sample = (Sample*)ptr_sample;\n\n\tfloat sampleRate = wavbuf->m_sampleRate;\n\n\tfloat fNumOfSamples = fduration * sampleRate*0.001f;\n\tsize_t len = (size_t)ceilf(fNumOfSamples);\n\t\n\twavbuf->Allocate(sample->m_chn, len);\n\n\tPercussionSample(*sample, wavbuf->m_data, (unsigned)len, sampleRate / (float)sample->m_origin_sample_rate);\n}\n\nvoid InstrumentSingleGenerate(void* ptr_wavbuf, void* ptr_sample, float freq, float fduration)\n{\n\tWavBuffer* wavbuf = (WavBuffer*)ptr_wavbuf;\n\tInstrumentSample* sample = (InstrumentSample*)ptr_sample;\n\n\tfloat sampleRate = wavbuf->m_sampleRate;\n\n\tfloat fNumOfSamples = fduration * sampleRate*0.001f;\n\tsize_t len = (size_t)ceilf(fNumOfSamples);\n\tfloat sampleFreq = freq / sampleRate;\n\n\twavbuf->Allocate(sample->m_chn, len);\n\n\tInstrumentSingleSample(*sample, wavbuf->m_data, (unsigned)len, sampleFreq);\n}\n\nstatic int compareSampleWav(const void* a, const void* b)\n{\n\tInstrumentSample& wavA = *((InstrumentSample*)a);\n\tInstrumentSample& wavB = *((InstrumentSample*)b);\n\n\tfloat origin_SampleFreqA = wavA.m_origin_freq / (float)wavA.m_origin_sample_rate;\n\tfloat origin_SampleFreqB = wavB.m_origin_freq / (float)wavB.m_origin_sample_rate;\n\n\treturn origin_SampleFreqA > origin_SampleFreqB ? 1 : -1;\n}\n\nvoid InstrumentMultiGenerate(void* ptr_wavbuf, void* ptr_sample_lst, float freq, float fduration)\n{\n\tWavBuffer* wavbuf = (WavBuffer*)ptr_wavbuf;\n\tPtrArray* sampleList = (PtrArray*)ptr_sample_lst;\t\n\n\tunsigned chn = 0;\n\tstd::vector<InstrumentSample> samples;\n\tfor (size_t i = 0; i < sampleList->size(); i++)\n\t{\t\t\n\t\tInstrumentSample* sample = (InstrumentSample*)(*sampleList)[i];\t\n\n\t\tif (i == 0)\n\t\t\tchn = sample->m_chn;\n\t\telse\n\t\t\tif (chn != sample->m_chn)\n\t\t\t{\n\t\t\t\tprintf(\"All samples does not have the same number of channels\\n\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\tsamples.push_back(*sample);\n\t}\n\tstd::qsort(samples.data(), samples.size(), sizeof(InstrumentSample), compareSampleWav);\n\n\tfloat sampleRate = wavbuf->m_sampleRate;\n\n\tfloat fNumOfSamples = fduration * sampleRate*0.001f;\n\tsize_t len = (size_t)ceilf(fNumOfSamples);\n\tfloat sampleFreq = freq / sampleRate;\n\n\twavbuf->Allocate(chn, len);\n\n\tInstrumentMultiSample(samples, wavbuf->m_data, (unsigned)len, sampleFreq);\n}\n"
  },
  {
    "path": "CMakeLists.txt",
    "content": "cmake_minimum_required (VERSION 3.0)\nproject(ScoreDraft)\n\nIF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)\n  SET(CMAKE_INSTALL_PREFIX  ../Test CACHE PATH \"Install path\" FORCE)\nENDIF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)\n\nadd_subdirectory(ScoreDraftCore)\nadd_subdirectory(SimpleInstruments)\nadd_subdirectory(KarplusStrong)\nadd_subdirectory(BasicSamplers)\nadd_subdirectory(SoundFont2)\nadd_subdirectory(VoiceSampler)\n\nadd_subdirectory(MIDIWriter)\n\nset(CMAKE_POSITION_INDEPENDENT_CODE ON)\nadd_subdirectory(thirdparty/portaudio)\nadd_subdirectory(thirdparty/glfw)\n# add_subdirectory(thirdparty/glew)\n\nadd_subdirectory(PCMPlayer)\nadd_subdirectory(Meteor)\n\nadd_subdirectory(python)\n"
  },
  {
    "path": "DSPUtil/complex.cpp",
    "content": "#include <math.h>\n#include \"stdio.h\"\n#include \"complex.h\"\n\ndouble DCEnergy(const DComp* c)\n{\n\treturn c->Im*c->Im + c->Re*c->Re;\n}\n\ndouble DCAbs(const DComp* c)\n{\n\treturn sqrt(c->Im*c->Im+c->Re*c->Re);\n}\ndouble DCAng(const DComp* c)\n{\n\treturn atan2(c->Im,c->Re);\n}\nvoid DCSetAA(DComp* c,double Abs,double Ang)\n{\n\tc->Re=Abs*cos(Ang);\n\tc->Im=Abs*sin(Ang);\n}\nvoid DCConjugate(DComp* c,const DComp* c1)\n{\n\tc->Re=c1->Re;\n\tc->Im=-c1->Im;\n}\n\nvoid DCAdd(DComp* c,const DComp* c1,const DComp* c2)\n{\n\tc->Re=c1->Re+c2->Re;\n\tc->Im=c1->Im+c2->Im;\n}\nvoid DCSub(DComp* c,const DComp* c1,const DComp* c2)\n{\n\tc->Re=c1->Re-c2->Re;\n\tc->Im=c1->Im-c2->Im;\n}\nvoid DCMul(DComp* c,const DComp* c1,const DComp* c2)\n{\n\tDComp temp;\n\ttemp.Re=c1->Re*c2->Re-c1->Im*c2->Im;\n\ttemp.Im=c1->Re*c2->Im+c1->Im*c2->Re;\n\t*c=temp;\n}\nvoid DCCW90(DComp* c,const DComp* c1)\n{\n\tDComp temp;\n\ttemp.Im=c1->Re;\n\ttemp.Re=-c1->Im;\n\t*c=temp;\n}\nvoid DCCCW90(DComp* c,const DComp* c1)\n{\n\tDComp temp;\n\ttemp.Im=-c1->Re;\n\ttemp.Re=c1->Im;\n\t*c=temp;\n}\nvoid DCPowN(DComp* c,const DComp* c1,int n)\n{\n\tDCSetAA(c,pow(DCAbs(c1),n),DCAng(c1)*n);\n}\nvoid DCPrint(const DComp *c,FILE* f)\n{\n\tif (c->Im==0) fprintf(f,\"%g\",c->Re);\n\tif (c->Im>0) fprintf(f,\"%g+%gj\",c->Re,c->Im);\n\tif (c->Im<0) fprintf(f,\"%g%gj\",c->Re,c->Im);\n}"
  },
  {
    "path": "DSPUtil/complex.h",
    "content": "#ifndef YF_COMPLEX\n#define YF_COMPLEX\ntypedef struct\n{\n\tdouble Re;\n\tdouble Im;\n}DComp;\ndouble DCEnergy(const DComp* c);\ndouble DCAbs(const DComp*);\ndouble DCAng(const DComp*);\nvoid DCSetAA(DComp*,double,double);\nvoid DCConjugate(DComp*,const DComp*);\nvoid DCAdd(DComp*,const DComp*,const DComp*);\nvoid DCSub(DComp*,const DComp*,const DComp*);\nvoid DCMul(DComp*,const DComp*,const DComp*);\nvoid DCCW90(DComp*,const DComp*);\nvoid DCCCW90(DComp*,const DComp*);\nvoid DCPowN(DComp*,const DComp*,int n);\n#endif"
  },
  {
    "path": "DSPUtil/fft.cpp",
    "content": "#include \"fft.h\"\n#include \"math.h\"\nvoid fft(DComp *a,unsigned l)\n{\n\tDComp u,w,t;\t\n\tunsigned n=1,nv2,i,j,k;\n\tunsigned le,lei,ip,m;\n\tdouble tmp;\n\tn<<=l;\n\tnv2=n>>1;\n\tj=0;\n\tfor (i=0;i<n-1;i++)\n\t{\n\t\tif (i<j)\n\t\t{\n\t\t\tt=a[j];\n\t\t\ta[j]=a[i];\n\t\t\ta[i]=t;\n\t\t}\n\t\tk=nv2;\n\t\twhile (k<=j)\n\t\t{\n\t\t\tj-=k;\n\t\t\tk>>=1;\n\t\t}\n\t\tj+=k;\n\t}\n\tle=1;\n\tfor(m=1;m<=l;m++)\n\t{\n\t\tlei=le;\n\t\tle<<=1;\n\t\tu.Re=1;\tu.Im=0;\n\t\ttmp=PI/lei;\n\t\tw.Re=cos(tmp); w.Im=-sin(tmp);\n\t\tfor (j=0;j<lei;j++)\n\t\t{\n\t\t\tfor (i=j;i<n;i+=le)\n\t\t\t{\n\t\t\t\tip=i+lei;\n\t\t\t\tDCMul(&t,&u,a+ip);\n\t\t\t\tDCSub(a+ip,a+i,&t);\n\t\t\t\tDCAdd(a+i,a+i,&t);\n\t\t\t}\n\t\t\tDCMul(&u,&u,&w);\n\t\t}\n\t}\n}\nvoid ifft(DComp *a,unsigned l)\n{\n\tDComp u,w,t;\t\n\tunsigned n=1,nv2,i,j,k;\n\tunsigned le,lei,ip,m;\n\tdouble tmp;\n\tn<<=l;\n\tnv2=n>>1;\n\tj=0;\n\tfor (i=0;i<n-1;i++)\n\t{\n\t\tif (i<j)\n\t\t{\n\t\t\tt=a[j];\n\t\t\ta[j]=a[i];\n\t\t\ta[i]=t;\n\t\t}\n\t\tk=nv2;\n\t\twhile (k<=j)\n\t\t{\n\t\t\tj-=k;\n\t\t\tk>>=1;\n\t\t}\n\t\tj+=k;\n\t}\n\tle=1;\n\tfor(m=1;m<=l;m++)\n\t{\n\t\tlei=le;\n\t\tle<<=1;\n\t\tu.Re=0.5;\tu.Im=0;\n\t\ttmp=PI/lei;\n\t\tw.Re=cos(tmp); w.Im=sin(tmp);\n\t\tfor (j=0;j<lei;j++)\n\t\t{\n\t\t\tfor (i=j;i<n;i+=le)\n\t\t\t{\n\t\t\t\tip=i+lei;\n\t\t\t\tDCMul(&t,&u,a+ip);\n\t\t\t\t(a+i)->Im*=0.5;\n\t\t\t\t(a+i)->Re*=0.5;\n\t\t\t\tDCSub(a+ip,a+i,&t);\n\t\t\t\tDCAdd(a+i,a+i,&t);\n\t\t\t}\n\t\t\tDCMul(&u,&u,&w);\n\t\t}\n\t}\n}"
  },
  {
    "path": "DSPUtil/fft.h",
    "content": "#ifndef YF_FFT\n#define YF_FFT\n#include \"complex.h\"\n#define PI 3.1415926535897932384626433832795\nvoid fft(DComp *a,unsigned l);\nvoid ifft(DComp *a,unsigned l);\n#endif"
  },
  {
    "path": "KarplusStrong/CMakeLists.txt",
    "content": "cmake_minimum_required (VERSION 3.0)\n\nproject(KarplusStrong)\n\nset (INCLUDE_DIR\n../ScoreDraftCore\n../DSPUtil\n)\n\n\nif (WIN32) \nset (DEFINES  ${DEFINES}\n-D\"_CRT_SECURE_NO_DEPRECATE\"  \n-D\"_SCL_SECURE_NO_DEPRECATE\" \n)\nelse()\nadd_definitions(-std=c++0x)\nadd_compile_options(-fPIC)\nendif()\n\ninclude_directories(${INCLUDE_DIR})\nadd_definitions(${DEFINES})\nadd_library (KarplusStrong SHARED KarplusStrong.cpp ../DSPUtil/complex.cpp ../DSPUtil/fft.cpp)\ntarget_link_libraries(KarplusStrong ScoreDraftCore)\n\nif (WIN32) \ntarget_compile_definitions(KarplusStrong PUBLIC SCOREDRAFTCORE_DLL_IMPORT)\nendif()\n\nif (WIN32) \ninstall(TARGETS KarplusStrong RUNTIME DESTINATION ScoreDraft)\nelse()\ninstall(TARGETS KarplusStrong DESTINATION ScoreDraft)\nendif()\n\n"
  },
  {
    "path": "KarplusStrong/KarplusStrong.cpp",
    "content": "#if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__)\n#define SCOREDRAFT_API __declspec(dllexport)\n#else\n#define SCOREDRAFT_API \n#endif\n\nextern \"C\"\n{\n\tSCOREDRAFT_API void KarplusStrongGenerate(void* ptr_wavbuf, float freq, float fduration, float cut_freq, float loop_gain, float sustain_gain);\n}\n\n#include <cmath>\n#include <cstdlib>\n#include <memory.h>\n#include <WavBuffer.h>\n#include <vector>\n#include \"fft.h\"\n\ninline float rand01()\n{\n\tfloat f = (float)rand() / (float)RAND_MAX;\n\tif (f < 0.0000001f) f = 0.0000001f;\n\tif (f > 0.9999999f) f = 0.9999999f;\n\treturn f;\n}\n\ninline void GeneratePinkNoise(float period, std::vector<float>& buf)\n{\n\tunsigned uLen = (unsigned)ceilf(period);\n\tunsigned l = 0;\n\tunsigned fftLen = 1;\n\twhile (fftLen < uLen)\n\t{\n\t\tfftLen <<= 1;\n\t\tl++;\n\t}\n\n\tstd::vector<DComp> fftData(fftLen);\n\tmemset(&fftData[0], 0, sizeof(DComp)*fftLen);\n\n\tfor (unsigned i = 1; i < (unsigned)(period) / 2; i++)\n\t{\n\t\tfloat amplitude = (float)fftLen / sqrtf((float)i);\n\t\tfloat phase = rand01()*(float)(2.0*PI);\n\t\tfftData[i].Re = (double)(amplitude*cosf(phase));\n\t\tfftData[i].Im = (double)(amplitude*sinf(phase));\n\n\t\tfftData[fftLen - i].Re = fftData[i].Re;\n\t\tfftData[fftLen - i].Im = -fftData[i].Im;\n\t}\n\n\tifft(&fftData[0], l);\n\n\tunsigned pnLen = (unsigned)ceilf(period*2.0f);\t\n\tbuf.resize(pnLen);\n\n\tfloat rate = (float)fftLen / period;\n\tfor (unsigned i = 0; i < pnLen; i++)\n\t{\n\t\tint ipos1 = (int)ceilf(((float)i - 0.5f)*rate);\n\t\tif (ipos1 < 0) ipos1 = 0;\n\t\tint ipos2 = (int)floorf(((float)i + 0.5f)*rate);\n\t\tint count = ipos2 - ipos1 + 1;\n\n\t\tfloat sum = 0.0f;\n\t\tfor (int ipos = ipos1; ipos <= ipos2; ipos++)\n\t\t{\n\t\t\tint _ipos = ipos;\n\t\t\twhile (_ipos >= fftLen) _ipos -= fftLen;\n\t\t\tsum += (float)fftData[_ipos].Re;\n\t\t}\n\t\tbuf[i] = sum / (float)count;\n\t}\t\n}\n\nvoid KarplusStrongGenerate(void* ptr_wavbuf, float freq, float fduration, float cut_freq, float loop_gain, float sustain_gain)\n{\n\tWavBuffer* wavbuf = (WavBuffer*)ptr_wavbuf;\n\tfloat sampleRate = wavbuf->m_sampleRate;\n\n\tfloat sustain_periods = logf(0.01f) / logf(sustain_gain);\n\tfloat fNumOfSamples = fduration * sampleRate*0.001f;\n\n\tfloat period = sampleRate / freq;\n\tstd::vector<float> pinkNoise;\n\tGeneratePinkNoise(period, pinkNoise);\n\n\tfloat sustainLen = sustain_periods * period;\n\tsize_t totalLen = (size_t)ceilf(fNumOfSamples + sustainLen);\n\twavbuf->Allocate(1, totalLen);\t\n\n\tcut_freq = cut_freq / 261.626f* freq;\n\tfloat a = (float)(1.0 - exp(-2.0*PI* cut_freq / sampleRate));\n\n\tunsigned pos = 0;\n\twhile (pos < totalLen)\n\t{\n\t\tfloat value = 0.0f;\n\t\tif ((float)pos < period*2.0f)\n\t\t\tvalue += pinkNoise[pos] * 0.5f*(cosf(((float)pos - period) / period * PI) + 1.0f);\n\n\t\tif ((float)pos >= period)\n\t\t{\n\t\t\tfloat gain = (float)pos < fNumOfSamples ? loop_gain : sustain_gain;\n\n\t\t\tfloat refPos = (float)pos - period;\n\n\t\t\tint refPos1 = (int)refPos;\n\t\t\tint refPos2 = refPos1 + 1;\n\t\t\tfloat frac = refPos - (float)refPos1;\n\n\t\t\t// linear interpolation\n\t\t\tfloat ref = wavbuf->m_data[refPos1] * (1.0f - frac) + wavbuf->m_data[refPos2] * frac;\n\n\t\t\tvalue += gain * a*ref + (1.0f - a)*wavbuf->m_data[pos - 1];\n\t\t}\n\n\n\t\twavbuf->m_data[pos] = value;\n\t\tpos++;\n\t}\n}\n\n"
  },
  {
    "path": "LICENSE",
    "content": "Copyright (C) 2018 - 2021 Fei Yang\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\nof the Software, and to permit persons to whom the Software is furnished to do\nso, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\nAcknowledgements\n\nSource code under /SoundFont2 is based on \nTinySoundFont, Copyright (C) 2017 Bernhard Schelling (https://github.com/schellingb/TinySoundFont)\n\nNoto Sans Font: /thirdparty/fonts/NotoSansSC-Bold.otf\nLicensed under the Open Font License (https://fonts.google.com/noto/specimen/Noto+Sans+SC)\n\nFreeType: /thirdparty/freetype\nLicensed: https://gitlab.freedesktop.org/freetype/freetype/-/blob/master/docs/FTL.TXT\n\nGLFW: /thirdparty/glfw\nLicensed: https://www.glfw.org/license.html\n\nPortAudio: /thirdparty/portaudio\nLicensed: http://www.portaudio.com/license.html\n\nAudio Samples\nFrom https://freewavesamples.com\n\n"
  },
  {
    "path": "MIDIWriter/CMakeLists.txt",
    "content": "cmake_minimum_required (VERSION 3.0)\n\nproject(MIDIWriter)\n\nif (WIN32) \nset (DEFINES  ${DEFINES}\n-D\"_CRT_SECURE_NO_DEPRECATE\"  \n-D\"_SCL_SECURE_NO_DEPRECATE\" \n)\nelse()\nadd_definitions(-std=c++14)\nadd_compile_options(-fPIC)\nendif()\n\ninclude_directories(${INCLUDE_DIR})\nadd_definitions(${DEFINES})\nadd_library (MIDIWriter SHARED MIDIWriter.cpp)\n\nif (WIN32) \ninstall(TARGETS MIDIWriter RUNTIME DESTINATION ScoreDraft)\nelse()\ninstall(TARGETS MIDIWriter DESTINATION ScoreDraft)\nendif()\n\n"
  },
  {
    "path": "MIDIWriter/MIDIWriter.cpp",
    "content": "#if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__)\n#define SCOREDRAFT_API __declspec(dllexport)\n#else\n#define SCOREDRAFT_API \n#endif\n\nextern \"C\"\n{\n\tSCOREDRAFT_API void* NoteCreate(float freq_rel, int duration);\n\tSCOREDRAFT_API void NoteDestroy(void* ptr);\n\tSCOREDRAFT_API void* WriteToMidi(void* ptr_seq_list, unsigned tempo, float refFreq, const char* fileName);\n}\n\n#include <cstdio>\n#include <cmath>\n#include <vector>\n\ninline void ByteSwap(unsigned short& word)\n{\n\tunsigned short a = word & 0xFF;\n\ta <<= 8;\n\tword >>= 8;\n\tword |= a;\n}\n\ninline void ByteSwap(unsigned& word)\n{\n\tunsigned a = word & 0xFF;\n\ta <<= 24;\n\tword >>= 8;\n\tunsigned b = word & 0xFF;\n\tb <<= 16;\n\tword >>= 8;\n\tunsigned c = word & 0xFF;\n\tc <<= 8;\n\tword |= a | b | c;\n}\n\ninline void ToVariableLength(unsigned fixed, unsigned& variable, unsigned& bytes)\n{\n\tvariable = 0;\n\tbytes = 1;\n\tunsigned mask = 0;\n\twhile (fixed)\n\t{\n\t\tvariable += (fixed & 0x7F) | mask;\n\t\tfixed >>= 7;\n\t\tif (fixed)\n\t\t{\n\t\t\tvariable <<= 8;\n\t\t\tbytes++;\n\t\t\tmask = 0x80;\n\t\t}\n\t}\n}\n\n\ninline void WriteBigEdianWord(FILE *fp, unsigned short aword)\n{\n\tByteSwap(aword);\n\tfwrite(&aword, 2, 1, fp);\n}\n\ninline void WriteBigEdianDWord(FILE *fp, unsigned int adword)\n{\n\tByteSwap(adword);\n\tfwrite(&adword, 4, 1, fp);\n}\n\ninline void WriteVariableLengthDWord(FILE *fp, unsigned fixeddword)\n{\n\tunsigned variable;\n\tunsigned bytes;\n\tToVariableLength(fixeddword, variable, bytes);\n\tfwrite(&variable, 1, bytes, fp);\n}\n\n\nstruct Note\n{\n\tfloat m_freq_rel = -1.0f;\n\tint m_duration = 48;\n};\n\nvoid* NoteCreate(float freq_rel, int duration)\n{\n\treturn new Note({ freq_rel, duration });\n}\n\nvoid NoteDestroy(void* ptr)\n{\n\tdelete (Note*)ptr;\n}\n\nstruct NoteEvent\n{\n\tbool isOn;\n\tunsigned time;\n\tunsigned char note;\n};\n\ntypedef std::vector<NoteEvent> NoteEventList;\n\ninline void AddNoteEvent(NoteEventList& list, const NoteEvent& nevent)\n{\n\tif (list.empty() || (list.end() - 1)->time <= nevent.time)\n\t{\n\t\tlist.push_back(nevent);\n\t\treturn;\n\t}\n\n\tNoteEventList::iterator it = list.end() - 1;\n\twhile (it != list.begin() && (it - 1)->time > nevent.time) it--;\n\tlist.insert(it, nevent);\n}\n\n\n#ifndef max\n#define max(a,b)            (((a) > (b)) ? (a) : (b))\n#endif\n\n#ifndef min\n#define min(a,b)            (((a) < (b)) ? (a) : (b))\n#endif\n\n#define TIME_DIVISION 48\n\nvoid* WriteToMidi(void* ptr_seq_list, unsigned tempo, float refFreq, const char* fileName)\n{\n\tstd::vector<std::vector<Note*>*>* seqList = (std::vector<std::vector<Note*>*>*)ptr_seq_list;\n\tsize_t numOfTracks = seqList->size();\n\n\tFILE *fp = fopen(fileName, \"wb\");\n\tfwrite(\"MThd\", 1, 4, fp);\n\n\tWriteBigEdianDWord(fp, 6);\n\tWriteBigEdianWord(fp, 1);\n\tWriteBigEdianWord(fp, (unsigned short)numOfTracks);\n\tWriteBigEdianWord(fp, TIME_DIVISION);\n\n\tunsigned timeFactor = TIME_DIVISION / 48;\n\n\t//pitch shift\n\tfloat pitchShift = logf(refFreq / 261.626f)*12.0f / logf(2.0f) + 0.5f;\n\tunsigned maxTrackLength = 0;\n\tfor (unsigned i = 0; i < numOfTracks; i++)\n\t{\n\t\tconst std::vector<Note*>& seq = *(*seqList)[i];\n\n\t\tfwrite(\"MTrk\", 1, 4, fp);\n\t\tWriteBigEdianDWord(fp, 0); // trackLength;\n\n\t\tunsigned beginPoint = ftell(fp);\n\n\t\tunsigned char aByte;\n\n\t\t//Tempo Event\t\n\t\tWriteVariableLengthDWord(fp, 0);\n\t\taByte = 0xff;\n\t\tfwrite(&aByte, 1, 1, fp);\n\t\taByte = 0x51;\n\t\tfwrite(&aByte, 1, 1, fp);\n\t\taByte = 3;\n\t\tfwrite(&aByte, 1, 1, fp);\n\n\t\tunsigned theTempo = 60000000 / tempo;\n\t\taByte = (theTempo & 0xff0000) >> 16;\n\t\tfwrite(&aByte, 1, 1, fp);\n\t\taByte = (theTempo & 0xff00) >> 8;\n\t\tfwrite(&aByte, 1, 1, fp);\n\t\taByte = theTempo & 0xff;\n\t\tfwrite(&aByte, 1, 1, fp);\n\n\t\t//Note Events\n\t\tNoteEventList elist;\n\n\t\tunsigned timeTicks = 0;\n\t\tunsigned j;\n\t\tfor (j = 0; j < seq.size(); j++)\n\t\t{\n\t\t\tNoteEvent nevent;\n\t\t\tif (seq[j]->m_freq_rel < 0.0f)\n\t\t\t\ttimeTicks += seq[j]->m_duration*timeFactor;\n\t\t\telse if (seq[j]->m_freq_rel > 0.0f)\n\t\t\t{\n\t\t\t\tnevent.isOn = true;\n\t\t\t\tnevent.time = timeTicks;\n\t\t\t\tnevent.note = (unsigned char)(logf(seq[j]->m_freq_rel)*12.0f / logf(2.0f) + 60.0f + pitchShift);\n\t\t\t\tAddNoteEvent(elist, nevent);\n\n\t\t\t\ttimeTicks += seq[j]->m_duration*timeFactor;\n\t\t\t\tnevent.isOn = false;\n\t\t\t\tnevent.time = timeTicks;\n\t\t\t\tAddNoteEvent(elist, nevent);\n\t\t\t}\n\t\t}\n\t\tmaxTrackLength = max(maxTrackLength, timeTicks);\n\n\t\ttimeTicks = 0;\n\t\tfor (j = 0; j < elist.size(); j++)\n\t\t{\n\t\t\tunsigned start = elist[j].time - timeTicks;\n\t\t\ttimeTicks = elist[j].time;\n\t\t\tWriteVariableLengthDWord(fp, start);\n\n\t\t\tif (elist[j].isOn)\n\t\t\t\taByte = 0x90;\n\t\t\telse\n\t\t\t\taByte = 0x80;\n\t\t\tfwrite(&aByte, 1, 1, fp);\n\n\t\t\taByte = elist[j].note;\n\t\t\tfwrite(&aByte, 1, 1, fp);\n\n\t\t\taByte = 64;\n\t\t\tfwrite(&aByte, 1, 1, fp);\n\t\t}\n\n\t\t//// End of Track\n\t\taByte = 0;\n\t\tfwrite(&aByte, 1, 1, fp);\n\t\taByte = 0xff;\n\t\tfwrite(&aByte, 1, 1, fp);\n\t\taByte = 0x2f;\n\t\tfwrite(&aByte, 1, 1, fp);\n\t\taByte = 0;\n\t\tfwrite(&aByte, 1, 1, fp);\n\n\t\t//////////////////////////\n\n\t\tunsigned length = ftell(fp) - beginPoint;\n\t\tfseek(fp, beginPoint - 4, SEEK_SET);\n\t\tWriteBigEdianDWord(fp, length);\n\t\tfseek(fp, length, SEEK_CUR);\n\t}\n\n\tfclose(fp);\n}\n\n"
  },
  {
    "path": "Meteor/CMakeLists.txt",
    "content": "cmake_minimum_required (VERSION 3.0)\n\nproject(Meteor)\n\nset(SOURCES\napi.cpp\nMeteor.cpp\nMeteorPlayer.cpp\nDrawText.cpp\n)\n\nset(HEADERS \nSubListLookUp.h\nMeteor.h\nMeteorPlayer.h\nDrawText.h\nbase64.hpp\nblob.hpp\n)\n\n\nset (INCLUDE_DIR\n../ScoreDraftCore\n../thirdparty/portaudio/include\n../thirdparty/glfw/include\n../thirdparty/fonts\n)\n\n\nif (WIN32) \nset (DEFINES  ${DEFINES}\n-D\"_CRT_SECURE_NO_DEPRECATE\"  \n-D\"_SCL_SECURE_NO_DEPRECATE\" \n)\n\nset (INCLUDE_DIR\n${INCLUDE_DIR}\n../thirdparty/freetype/include/freetype2\n)\n\nset (LIB_DIR\n../thirdparty/freetype/lib/\n)\nelse()\nadd_definitions(-std=c++0x)\nadd_compile_options(-fPIC)\n\nset (INCLUDE_DIR\n${INCLUDE_DIR}\n/usr/include/freetype2\n)\nendif()\n\ninclude_directories(${INCLUDE_DIR})\nlink_directories(${LIB_DIR})\nadd_definitions(${DEFINES})\nadd_library (Meteor SHARED  ${SOURCES} ${HEADERS})\ntarget_link_libraries(Meteor ScoreDraftCore portaudio_static glfw freetype)\n\nif (WIN32) \ntarget_link_libraries(Meteor opengl32)\nelse()\ntarget_link_libraries(Meteor GL)\nendif()\n\nif (WIN32) \ntarget_compile_definitions(Meteor PUBLIC SCOREDRAFTCORE_DLL_IMPORT)\nendif()\n\nif (WIN32) \ninstall(TARGETS Meteor RUNTIME DESTINATION ScoreDraft)\nelse()\ninstall(TARGETS Meteor DESTINATION ScoreDraft)\nendif()\n\n"
  },
  {
    "path": "Meteor/DrawText.cpp",
    "content": "#include \"DrawText.h\"\n\n#include <ft2build.h>\n#include FT_FREETYPE_H\n\n#include <cmath>\n#include <cstdlib>\n#include <cstdio>\n#include <string>\n#include <unordered_map>\n#include <algorithm>\n\n#include \"NotoSansSC-Bold.hpp\"\n\ninline bool exists_test(const char* name)\n{\n\tif (FILE *file = fopen(name, \"r\"))\n\t{\n\t\tfclose(file);\n\t\treturn true;\n\t}\n\telse\n\t{\n\t\treturn false;\n\t}\n}\n\n\nclass LibHolder\n{\npublic:\n\tstatic LibHolder& singlton()\n\t{\n\t\tthread_local static LibHolder* lh = nullptr;\n\t\tif (lh == nullptr)\n\t\t{\n\t\t\tlh = new LibHolder;\n\t\t}\n\t\treturn *lh;\n\t}\n\n\tFT_Library get_library() const\n\t{\n\t\treturn m_library;\n\t}\n\n\tvoid add_face(const std::string& name, const std::string& path_ttf)\n\t{\n\t\tFT_New_Face(m_library, path_ttf.c_str(), 0, &m_faces[name]);\n\t}\n\n\tvoid set_current_face(const std::string& name)\n\t{\n\t\tm_name_current_face = name;\n\t}\n\n\tFT_Face get_face(const std::string& name = \"\") const\n\t{\n\t\tstd::string fnt_name = name;\n\t\tif (fnt_name == \"\") fnt_name = m_name_current_face;\n\t\tauto iter = m_faces.find(fnt_name);\n\t\tif (iter == m_faces.end())\n\t\t{\n\t\t\treturn m_faces.begin()->second;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn iter->second;\n\t\t}\n\t}\n\nprivate:\n\tFT_Library  m_library;\n\tstd::unordered_map<std::string, FT_Face>  m_faces;\n\tstd::string m_name_current_face;\n\n\tLibHolder()\n\t{\n\t\tFT_Init_FreeType(&m_library);\n\t\tFT_New_Memory_Face(m_library, (const FT_Byte*)noto_sans_bold, noto_sans_bold_size, 0, &m_faces[\"noto_sans_bold\"]);\n\t}\n\n\t~LibHolder()\n\t{\n\t\tfor (auto iter = m_faces.begin(); iter != m_faces.end(); iter++)\n\t\t{\n\t\t\tFT_Done_Face(iter->second);\n\t\t}\n\t\tFT_Done_FreeType(m_library);\n\t}\n};\n\n#define FT_LIB LibHolder::singlton().get_library()\n#define FT_FACE LibHolder::singlton().get_face()\n\nvoid FTAddFont(const std::string& name, const std::string& path_ttf)\n{\n\tLibHolder::singlton().add_face(name, path_ttf);\n}\n\nvoid FTSetCurrentFont(const std::string& name)\n{\n\tLibHolder::singlton().set_current_face(name);\n}\n\nstd::wstring UTF8_to_wchar(const char * in)\n{\n\tstd::wstring out;\n\tunsigned int codepoint;\n\twhile (*in != 0)\n\t{\n\t\tunsigned char ch = static_cast<unsigned char>(*in);\n\t\tif (ch <= 0x7f)\n\t\t\tcodepoint = ch;\n\t\telse if (ch <= 0xbf)\n\t\t\tcodepoint = (codepoint << 6) | (ch & 0x3f);\n\t\telse if (ch <= 0xdf)\n\t\t\tcodepoint = ch & 0x1f;\n\t\telse if (ch <= 0xef)\n\t\t\tcodepoint = ch & 0x0f;\n\t\telse\n\t\t\tcodepoint = ch & 0x07;\n\t\t++in;\n\t\tif (((*in & 0xc0) != 0x80) && (codepoint <= 0x10ffff))\n\t\t{\n\t\t\tif (sizeof(wchar_t) > 2)\n\t\t\t\tout.append(1, static_cast<wchar_t>(codepoint));\n\t\t\telse if (codepoint > 0xffff)\n\t\t\t{\n\t\t\t\tout.append(1, static_cast<wchar_t>(0xd800 + (codepoint >> 10)));\n\t\t\t\tout.append(1, static_cast<wchar_t>(0xdc00 + (codepoint & 0x03ff)));\n\t\t\t}\n\t\t\telse if (codepoint < 0xd800 || codepoint >= 0xe000)\n\t\t\t\tout.append(1, static_cast<wchar_t>(codepoint));\n\t\t}\n\t}\n\treturn out;\n}\n\n\nstruct Character\n{\n\tint width = 0;\n\tint height = 0;\n\tint offset_x = 0;\n\tint offset_y = 0;\n\tstd::vector<unsigned char> data;\n};\n\n\nText::Text(const char* text, int size)\n{\n\tstd::wstring wtext = UTF8_to_wchar(text);\n\tsize_t total_chars = wtext.size();\n\n\tFT_Set_Char_Size(FT_FACE, 0, size * 64, 72, 72);\n\tFT_GlyphSlot slot = FT_FACE->glyph;\n\tstd::vector<Character> characters(total_chars);\n\n\tint min_x = 0x7FFFFFFF;\n\tint max_x = 0x80000000;\n\tint min_y = 0x7FFFFFFF;\n\tint max_y = 0x80000000;\n\n\tint off_x = 0;\n\tint off_y = size;\n\n\tfor (size_t j = 0; j < total_chars; j++)\n\t{\n\t\twchar_t c = wtext[j];\n\t\tFT_Load_Char(FT_FACE, c, FT_LOAD_DEFAULT);\n\t\tFT_Render_Glyph(slot, FT_RENDER_MODE_NORMAL);\n\t\tCharacter& character = characters[j];\n\t\tcharacter.offset_x = off_x + slot->bitmap_left;\n\t\tcharacter.offset_y = off_y - slot->bitmap_top;\n\t\tcharacter.width = (int)slot->bitmap.width;\n\t\tcharacter.height = (int)slot->bitmap.rows;\n\t\tcharacter.data.resize(character.width*character.height);\n\t\tif (character.width > 0 && character.height > 0)\n\t\t\tmemcpy(character.data.data(), slot->bitmap.buffer, character.width*character.height);\n\t\tif (character.offset_x < min_x) min_x = character.offset_x;\n\t\tif (character.offset_y < min_y) min_y = character.offset_y;\n\t\tif (character.offset_x + character.width > max_x) max_x = character.offset_x + character.width;\n\t\tif (character.offset_y + character.height > max_y) max_y = character.offset_y + character.height;\n\t\toff_x += (slot->advance.x >> 6);\n\t\toff_y += slot->advance.y >> 6;\n\t}\n\n\tm_width = max_x - min_x;\n\tm_height = max_y - min_y;\n\tm_offset_x = min_x;\n\tm_offset_y = min_y;\n\tm_data.resize(m_width*m_height, 0);\n\n\tfor (size_t i = 0; i < total_chars; i++)\n\t{\n\t\tconst Character& character = characters[i];\n\t\tint off_x = character.offset_x - m_offset_x;\n\t\tint off_y = character.offset_y - m_offset_y;\n\n\t\tfor (int y = 0; y < character.height; y++)\n\t\t{\n\t\t\tfor (int x = 0; x < character.width; x++)\n\t\t\t{\n\t\t\t\tint pos_x = x + off_x;\n\t\t\t\tint pos_y = y + off_y;\n\t\t\t\tm_data[pos_x + pos_y * m_width] = character.data[x + y * character.width];\n\t\t\t}\n\t\t}\n\t}\t\n}\n\nText::~Text()\n{\n\n}\n\n"
  },
  {
    "path": "Meteor/DrawText.h",
    "content": "#pragma once\n\n#include <vector>\n\nclass Text\n{\npublic:\n\tText(const char* text, int size = 32);\n\t~Text();\n\n\tint m_width = 0;\n\tint m_height = 0;\n\tint m_offset_x = 0;\n\tint m_offset_y = 0;\n\tstd::vector<unsigned char> m_data;\n};\n"
  },
  {
    "path": "Meteor/Meteor.cpp",
    "content": "#include \"Meteor.h\"\n#include \"blob.hpp\"\n#include \"base64.hpp\"\n\nvoid Meteor::_updateSublists()\n{\n\tm_notes_sublists.SetData(m_notes, 3.0f);\n\tm_beats_sublists.SetData(m_beats, 3.0f);\n\tm_singing_sublists.SetData(m_singings, 3.0f);\n\tm_needUpdateSublists = false;\n}\n\nvoid Meteor::InstEvent(EventInst& e)\n{\n\tVisNote note;\n\tnote.instrumentId = e.instrument_id;\n\tdouble freq = e.freq;\t\t\n\tnote.pitch = (int)floor(log(freq / 261.626)*12.0 / log(2.0) + 0.5);\n\tnote.start = e.offset / 1000.0f;\n\tnote.end = note.start + e.fduration / 1000.0f;\n\tm_notes.push_back(note);\n\tm_needUpdateSublists = true;\n}\n\nvoid Meteor::PercEvent(EventPerc& e)\n{\n\tVisBeat beat;\n\tbeat.percId = e.instrument_id;\n\tbeat.start = e.offset / 1000.0f;\n\tbeat.end = beat.start + e.fduration / 1000.0;\n\tm_beats.push_back(beat);\n\tm_needUpdateSublists = true;\n}\n\nvoid Meteor::SingEvent(EventSing& e)\n{\n\tunsigned id = e.instrument_id;\t\n\tunsigned count = (unsigned)e.syllableList.size();\n\tdouble pos = e.offset / 1000.0f;\n\tfor (unsigned i = 0; i < count; i++)\n\t{\n\t\tSyllable& syllable = e.syllableList[i];\n\n\t\tVisSinging sing;\n\t\tsing.singerId = id;\n\t\tsing.lyric = syllable.lyric;\n\t\tsing.start = (float)pos;\n\t\t\n\t\tstd::vector<CtrlPnt>& ctrlPnts = syllable.ctrlPnts;\n\t\tunsigned num_ctrlPnts = (unsigned)ctrlPnts.size();\n\n\t\tdouble totalLen = 0.0;\n\t\tstd::vector<double> freqs;\n\t\tstd::vector<double> durations;\n\t\tfreqs.resize(num_ctrlPnts);\n\t\tdurations.resize(num_ctrlPnts);\n\t\tfor (unsigned j = 0; j < num_ctrlPnts; j++)\n\t\t{\n\t\t\tCtrlPnt& ctrlPnt = ctrlPnts[j];\n\t\t\tdouble freq = ctrlPnt.freq;\t\t\t\t\n\t\t\tdouble duration = ctrlPnt.fduration / 1000.0;\n\t\t\tfreqs[j] = freq;\n\t\t\tdurations[j] = duration;\n\t\t\ttotalLen += duration;\n\t\t}\n\n\t\tsing.end = sing.start + totalLen;\n\t\tdouble pitchPerSec = 50.0;\n\t\tdouble secPerPitchSample = 1.0 / pitchPerSec;\n\n\t\tunsigned pitchLen = (unsigned)ceil(totalLen*pitchPerSec);\n\t\tsing.pitch.resize(pitchLen);\n\t\tunsigned pitchPos = 0;\n\t\tdouble fPitchPos = 0.0;\n\t\tdouble nextPitchPos = 0.0;\n\n\t\tfor (unsigned j = 0; j < num_ctrlPnts; j++)\n\t\t{\n\t\t\tdouble duration = durations[j];\n\t\t\tdouble freq1 = freqs[j];\n\t\t\tdouble freq2 = j < num_ctrlPnts - 1 ? freqs[j + 1] : freq1;\n\t\t\tdouble thisPitchPos = nextPitchPos;\n\t\t\tnextPitchPos += duration;\n\n\t\t\tfor (; fPitchPos < nextPitchPos && pitchPos < pitchLen; fPitchPos += secPerPitchSample, pitchPos++)\n\t\t\t{\n\t\t\t\tdouble k = (fPitchPos - thisPitchPos) / duration;\n\t\t\t\tsing.pitch[pitchPos] = (float)(freq1*(1.0f - k) + freq2 * k);\n\t\t\t}\n\t\t}\n\n\t\tstd::vector<float> temp;\n\t\ttemp.resize(pitchLen);\n\t\ttemp[0] = sing.pitch[0];\n\t\ttemp[pitchLen - 1] = sing.pitch[pitchLen - 1];\n\n\t\tfor (unsigned i = 1; i < pitchLen - 1; i++)\n\t\t{\n\t\t\ttemp[i] = 0.25f*(sing.pitch[i - 1] + sing.pitch[i + 1]) + 0.5f*sing.pitch[i];\n\t\t}\n\n\t\tfor (unsigned i = 0; i < pitchLen; i++)\n\t\t{\n\t\t\tsing.pitch[i] = logf(temp[i] / 261.626f)*12.0f / logf(2.0f);\n\t\t}\n\n\t\tm_singings.push_back(sing);\n\t\tpos += totalLen;\n\t}\n\tm_needUpdateSublists = true;\n}\n\nvoid Meteor::SaveToFile(const char* filename)\n{\n\tif (m_needUpdateSublists) _updateSublists();\n\n\tFILE *fp = fopen(filename, \"wb\");\n\tunsigned countNotes = (unsigned)m_notes.size();\n\tfwrite(&countNotes, sizeof(unsigned), 1, fp);\n\tfwrite(&m_notes[0], sizeof(VisNote), countNotes, fp);\n\tm_notes_sublists.SaveToFile(fp);\n\tunsigned countBeats = (unsigned)m_beats.size();\n\tfwrite(&countBeats, sizeof(unsigned), 1, fp);\n\tfwrite(&m_beats[0], sizeof(VisBeat), countBeats, fp);\n\tm_beats_sublists.SaveToFile(fp);\n\tunsigned countSinging = (unsigned)m_singings.size();\n\tfwrite(&countSinging, sizeof(unsigned), 1, fp);\n\tfor (unsigned i = 0; i < countSinging; i++)\n\t{\n\t\tconst VisSinging& singing = m_singings[i];\n\t\tfwrite(&singing.singerId, sizeof(unsigned), 1, fp);\n\t\tunsigned char len = (unsigned char)singing.lyric.length();\n\t\tfwrite(&len, 1, 1, fp);\n\t\tif (len > 0)\n\t\t\tfwrite(singing.lyric.data(), 1, len, fp);\n\t\tunsigned count = (unsigned)singing.pitch.size();\n\t\tfwrite(&count, sizeof(unsigned), 1, fp);\n\t\tfwrite(singing.pitch.data(), sizeof(float), count, fp);\n\t\tfwrite(&singing.start, sizeof(float), 2, fp);\n\t}\n\tm_singing_sublists.SaveToFile(fp);\n\tfclose(fp);\n}\n\nvoid Meteor::LoadFromFile(const char* filename)\n{\n\tFILE *fp = fopen(filename, \"rb\");\n\tunsigned countNotes;\n\tfread(&countNotes, sizeof(unsigned), 1, fp);\n\tm_notes.clear();\n\tm_notes.resize(countNotes);\n\tfread(&m_notes[0], sizeof(VisNote), countNotes, fp);\n\tm_notes_sublists.LoadFromFile(fp);\n\tunsigned countBeats;\n\tfread(&countBeats, sizeof(unsigned), 1, fp);\n\tm_beats.clear();\n\tm_beats.resize(countBeats);\n\tfread(&m_beats[0], sizeof(VisBeat), countBeats, fp);\n\tm_beats_sublists.LoadFromFile(fp);\n\tunsigned countSinging;\n\tfread(&countSinging, sizeof(unsigned), 1, fp);\n\tm_singings.clear();\n\tm_singings.resize(countSinging);\n\tfor (unsigned i = 0; i < countSinging; i++)\n\t{\n\t\tVisSinging& singing = m_singings[i];\n\t\tfread(&singing.singerId, sizeof(unsigned), 1, fp);\n\t\tunsigned char len;\n\t\tfread(&len, 1, 1, fp);\n\t\tif (len > 0)\n\t\t{\n\t\t\tchar _str[256];\n\t\t\tfread(_str, 1, len, fp);\n\t\t\t_str[len] = 0;\n\t\t\tsinging.lyric = _str;\n\t\t}\n\t\telse\n\t\t\tsinging.lyric = \"\";\n\t\tunsigned count;\n\t\tfread(&count, sizeof(unsigned), 1, fp);\n\t\tsinging.pitch.resize(count);\n\t\tfread(singing.pitch.data(), sizeof(float), count, fp);\n\t\tfread(&singing.start, sizeof(float), 2, fp);\n\t}\n\tm_singing_sublists.LoadFromFile(fp);\n\tfclose(fp);\n\tm_needUpdateSublists = true;\n}\n\n\nvoid Meteor::ToBlob(std::vector<uint8_t>& blob)\n{\n\tif (m_needUpdateSublists) _updateSublists();\n\n\tblob.clear();\n\tunsigned countNotes = (unsigned)m_notes.size();\n\tblob_write(blob, &countNotes, sizeof(unsigned));\n\tblob_write(blob, &m_notes[0], sizeof(VisNote) * countNotes);\n\tm_notes_sublists.ToBlob(blob);\n\tunsigned countBeats = (unsigned)m_beats.size();\n\tblob_write(blob, &countBeats, sizeof(unsigned));\n\tblob_write(blob, &m_beats[0], sizeof(VisBeat)*countBeats);\n\tm_beats_sublists.ToBlob(blob);\n\tunsigned countSinging = (unsigned)m_singings.size();\n\tblob_write(blob, &countSinging, sizeof(unsigned));\n\tfor (unsigned i = 0; i < countSinging; i++)\n\t{\n\t\tconst VisSinging& singing = m_singings[i];\n\t\tblob_write(blob, &singing.singerId, sizeof(unsigned));\n\t\tunsigned char len = (unsigned char)singing.lyric.length();\n\t\tblob_write(blob, &len, 1);\n\t\tif (len > 0)\n\t\t\tblob_write(blob, singing.lyric.data(), len);\n\t\tunsigned count = (unsigned)singing.pitch.size();\n\t\tblob_write(blob, &count, sizeof(unsigned));\n\t\tblob_write(blob, singing.pitch.data(), sizeof(float) * count);\n\t\tblob_write(blob, &singing.start, sizeof(float)*2);\n\t}\n\tm_singing_sublists.ToBlob(blob);\n}\n\nvoid Meteor::ToBase64(std::string& base64)\n{\n\tstd::vector<uint8_t> blob;\n\tToBlob(blob);\n\tbase64_encode(blob, base64);\n}\n\nMeteor::Meteor(size_t num_events, const Event** events)\n{\n\tfor (unsigned i = 0; i < num_events; i++)\n\t{\n\t\tconst Event* e = events[i];\n\t\tswitch (e->type)\n\t\t{\n\t\tcase 0:\n\t\t\tInstEvent(*(EventInst*)e);\n\t\t\tbreak;\n\t\tcase 1:\n\t\t\tPercEvent(*(EventPerc*)e);\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tSingEvent(*(EventSing*)e);\n\t\t\tbreak;\n\t\t}\n\t}\n\n}\n\n#include \"MeteorPlayer.h\"\n\nvoid Meteor::Play(TrackBuffer* buffer)\n{\n\tif (m_needUpdateSublists)\n\t\t_updateSublists();\n\n\tMeteorPlayer player(this, buffer);\n\tplayer.main_loop();\n}"
  },
  {
    "path": "Meteor/Meteor.h",
    "content": "#pragma once\n\n#include <string>\n#include <vector>\n#include <cstdint>\n\nclass Event\n{\npublic:\n\tunsigned type;\n\tunsigned instrument_id;\n\tfloat offset;\n\tEvent(unsigned type, unsigned instrument_id) : type(type), instrument_id(instrument_id)\n\t{\n\n\t}\n\n\tvirtual ~Event()\n\t{\n\n\t}\n};\n\nclass EventInst : public Event\n{\npublic:\n\tdouble freq;\n\tfloat fduration;\n\tEventInst(unsigned instrument_id, double freq, float fduration)\n\t\t: Event(0, instrument_id)\n\t\t, freq(freq)\n\t\t, fduration(fduration)\n\t{\n\n\t}\n};\n\nclass EventPerc : public Event\n{\npublic:\n\tfloat fduration;\n\tEventPerc(unsigned instrument_id, float fduration)\n\t\t: Event(1, instrument_id)\n\t\t, fduration(fduration)\n\t{\n\n\t}\n};\n\nstruct CtrlPnt\n{\n\tdouble freq;\n\tdouble fduration;\n};\n\nstruct Syllable\n{\n\tstd::string lyric;\n\tstd::vector<CtrlPnt> ctrlPnts;\n};\n\nclass EventSing : public Event\n{\npublic:\n\tstd::vector<Syllable> syllableList;\n\tEventSing(unsigned instrument_id, size_t num_syllables, const Syllable** syllables)\n\t\t: Event(2, instrument_id), syllableList(num_syllables)\n\t{\n\t\tfor (size_t i = 0; i < num_syllables; i++)\n\t\t{\n\t\t\tsyllableList[i] = *syllables[i];\n\t\t}\n\t}\n};\n\n\nstruct VisNote\n{\n\tunsigned instrumentId;\n\tint pitch;\n\tfloat start;\n\tfloat end;\n};\n\nstruct VisBeat\n{\n\tunsigned percId;\n\tfloat start;\n\tfloat end;\n};\n\ntypedef std::vector<std::pair<int, float>> TempoMap;\n\nstruct VisSinging\n{\n\tunsigned singerId;\n\tstd::string lyric;\n\tstd::vector<float> pitch;\n\tfloat start;\n\tfloat end;\n};\n\nclass TrackBuffer;\n\n#include \"SubListLookUp.h\"\n\nclass Meteor\n{\n\tstd::vector<VisNote> m_notes;\n\tstd::vector<VisBeat> m_beats;\n\tstd::vector<VisSinging> m_singings;\n\n\tSubLists m_notes_sublists;\n\tSubLists m_beats_sublists;\n\tSubLists m_singing_sublists;\n\n\tbool m_needUpdateSublists = true;\n\tvoid _updateSublists();\n\npublic:\n\tMeteor(){}\n\t~Meteor(){}\n\n\tMeteor(size_t num_events, const Event** events);\n\n\tvoid InstEvent(EventInst& e);\n\tvoid PercEvent(EventPerc& e);\n\tvoid SingEvent(EventSing& e);\n\tvoid SaveToFile(const char* filename);\n\tvoid LoadFromFile(const char* filename);\n\tvoid ToBlob(std::vector<uint8_t>& blob);\n\tvoid ToBase64(std::string& base64);\n\n\tconst std::vector<VisNote>& GetNotes() const { return m_notes; }\n\tconst std::vector<VisBeat>& GetBeats() const { return m_beats; }\n\tconst std::vector<VisSinging>& GetSingings() const { return m_singings; }\n\tconst SubLists& GetNotesSublists() const { return m_notes_sublists; }\n\tconst SubLists& GetBeatsSublists() const { return m_beats_sublists; }\n\tconst SubLists& GetSingingSublists() const { return m_singing_sublists; }\n\n\tvoid Play(TrackBuffer* buffer);\n};\n\n"
  },
  {
    "path": "Meteor/MeteorPlayer.cpp",
    "content": "#include <thread>\n#include <mutex>\n#include <vector>\n#include <list>\n#include <queue>\n#include <unordered_set>\n#include <memory.h>\n#include <cmath>\n#include <portaudio.h>\n#include <GLFW/glfw3.h>\n\n#include <TrackBuffer.h>\n#include <utils.h>\n#include \"MeteorPlayer.h\"\n#include \"Meteor.h\"\n#include \"DrawText.h\"\n\n#ifndef max\n#define max(a,b)            (((a) > (b)) ? (a) : (b))\n#endif\n\n#ifndef min\n#define min(a,b)            (((a) < (b)) ? (a) : (b))\n#endif\n\n\nclass AudioBufferQueue\n{\npublic:\n\tAudioBufferQueue(int cache_size) : m_semaphore_in(cache_size)\n\t{\n\t}\n\n\t~AudioBufferQueue()\n\t{\n\t}\n\n\tsize_t Size()\n\t{\n\t\treturn m_queue.size();\n\t}\n\n\tAudioBuffer* Front()\n\t{\n\t\treturn m_queue.front();\n\t}\n\n\tvoid Push(AudioBuffer* packet)\n\t{\n\t\tm_semaphore_in.wait();\n\t\tm_mutex.lock();\n\t\tm_queue.push(packet);\n\t\tm_mutex.unlock();\n\t\tm_semaphore_out.notify();\n\t}\n\n\tAudioBuffer* Pop()\n\t{\n\t\tm_semaphore_out.wait();\n\t\tm_mutex.lock();\n\t\tAudioBuffer* ret = m_queue.front();\n\t\tm_queue.pop();\n\t\tm_mutex.unlock();\n\t\tm_semaphore_in.notify();\n\t\treturn ret;\n\t}\n\nprivate:\n\tstd::queue<AudioBuffer*> m_queue;\n\tstd::mutex m_mutex;\n\tSemaphore m_semaphore_in;\n\tSemaphore m_semaphore_out;\n};\n\n\nvoid MeteorPlayer::_set_sync_point(size_t playback_pos, double time_playback_pos)\n{\n\tm_mutex_sync.lock();\n\tm_playback_pos = playback_pos;\n\tm_time_playback_pos = time_playback_pos;\n\tm_mutex_sync.unlock();\n}\n\nvoid MeteorPlayer::_get_sync_point(size_t& playback_pos, double& time_playback_pos)\n{\n\tm_mutex_sync.lock();\n\tplayback_pos = m_playback_pos;\n\ttime_playback_pos = m_time_playback_pos;\n\tm_mutex_sync.unlock();\n}\n\n\nint MeteorPlayer::stream_callback(const void *inputBuffer, void *outputBuffer,\n\tunsigned long framesPerBuffer,\n\tconst PaStreamCallbackTimeInfo* timeInfo,\n\tunsigned long statusFlags,\n\tvoid *userData)\n{\n\tMeteorPlayer* self = (MeteorPlayer*)userData;\n\tAudioBufferQueue* queue = self->m_audio_queue.get();\n\n\tself->_set_sync_point(self->m_playback_pos_next, time_sec());\n\n\tunsigned long pos_out = 0;\n\tshort *out = (short*)outputBuffer;\n\twhile (pos_out < framesPerBuffer)\n\t{\n\t\tif (queue->Size() < 1) break;\n\t\tAudioBuffer* buf_in = queue->Front();\n\t\tsize_t copy_size = min(AUDIO_BUF_LEN - self->m_audio_read_pos, framesPerBuffer - pos_out);\n\t\tmemcpy(out + pos_out * 2, buf_in->data + self->m_audio_read_pos * 2, sizeof(short)*copy_size * 2);\n\t\tself->m_audio_read_pos += copy_size;\n\t\tpos_out += (unsigned long)copy_size;\n\t\tif (self->m_audio_read_pos == AUDIO_BUF_LEN)\n\t\t{\n\t\t\tself->m_audio_read_pos = 0;\n\t\t\tqueue->Pop();\n\t\t\tdelete buf_in;\n\t\t}\n\t}\n\tif (pos_out < framesPerBuffer)\n\t\tmemset(out + pos_out * 2, 0, sizeof(short) * (framesPerBuffer - pos_out) * 2);\n\n\tself->m_playback_pos_next = self->m_playback_pos + framesPerBuffer;\n\n\treturn paContinue;\n}\n\nvoid MeteorPlayer::thread_demux(MeteorPlayer* self)\n{\n\tTrackBuffer* buf_in = self->m_trackbuffer;\n\tunsigned size = buf_in->NumberOfSamples();\n\tunsigned chn = buf_in->NumberOfChannels();\n\tfloat volume = buf_in->AbsoluteVolume();\n\tfloat pan = buf_in->Pan();\n\n\tAudioBufferQueue* queue_out = self->m_audio_queue.get();\n\twhile (self->m_demuxing)\n\t{\n\t\tAudioBuffer* buf_out = new AudioBuffer;\n\t\tsize_t pos_out = 0;\n\t\twhile (pos_out < AUDIO_BUF_LEN)\n\t\t{\n\t\t\tsize_t copy_size = min(size - self->m_input_read_pos, AUDIO_BUF_LEN - pos_out);\n\t\t\tfor (size_t i = 0; i < copy_size; i++)\n\t\t\t{\n\t\t\t\tsize_t read_pos = self->m_input_read_pos + i;\n\t\t\t\tfloat sample_in[2];\n\t\t\t\tbuf_in->Sample(read_pos, sample_in);\n\t\t\t\tshort sample_out[2];\n\t\t\t\tif (chn == 1)\n\t\t\t\t{\n\t\t\t\t\tsample_out[0] = sample_out[1] = (short)(max(min(sample_in[0] * volume, 1.0f), -1.0f)*32767.0f);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tCalcPan(pan, sample_in[0], sample_in[1]);\n\t\t\t\t\tsample_out[0] = (short)(max(min(sample_in[0] * volume, 1.0f), -1.0f)*32767.0f);\n\t\t\t\t\tsample_out[1] = (short)(max(min(sample_in[1] * volume, 1.0f), -1.0f)*32767.0f);\n\t\t\t\t}\n\n\t\t\t\tsize_t write_pos = pos_out + i;\n\t\t\t\tbuf_out->data[write_pos * 2] = sample_out[0];\n\t\t\t\tbuf_out->data[write_pos * 2 + 1] = sample_out[1];\n\n\t\t\t}\t\t\t\n\t\t\tself->m_input_read_pos += copy_size;\t\t\t\n\t\t\tpos_out += copy_size;\n\t\t\tif (self->m_input_read_pos == size)\n\t\t\t{\n\t\t\t\tself->m_demuxing = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (pos_out < AUDIO_BUF_LEN)\n\t\t\tmemset(buf_out->data + pos_out * 2, 0, sizeof(short) * (AUDIO_BUF_LEN - pos_out) * 2);\n\n\t\tqueue_out->Push(buf_out);\n\t}\t\n}\n\n\n#define PI 3.1415926535897932384626433832795\n\ninline float rand01()\n{\n\tfloat f = (float)rand() / (float)RAND_MAX;\n\tif (f < 0.0000001f) f = 0.0000001f;\n\tif (f > 0.9999999f) f = 0.9999999f;\n\treturn f;\n}\n\n\nunsigned char MeteorPlayer::s_ColorBank[15][3] =\n{\n\t{ 0x41, 0x8C, 0xF0 },\n\t{ 0xFC, 0xB4, 0x41 },\n\t{ 0xDF, 0x3A, 0x02 },\n\t{ 0x05, 0x64, 0x92 },\n\t{ 0xBF, 0xBF, 0xBF },\n\t{ 0x1A, 0x3B, 0x69 },\n\t{ 0xFF, 0xE3, 0x82 },\n\t{ 0x12, 0x9C, 0xDD },\n\t{ 0xCA, 0x6B, 0x4B },\n\t{ 0x00, 0x5C, 0xDB },\n\t{ 0xF3, 0xD2, 0x88 },\n\t{ 0x50, 0x63, 0x81 },\n\t{ 0xF1, 0xB9, 0xA8 },\n\t{ 0xE0, 0x83, 0x0A },\n\t{ 0x78, 0x93, 0xBE }\n};\n\n\n\nthread_local int MeteorPlayer::s_instance_count = 0;\nMeteorPlayer::MeteorPlayer(Meteor* meteor, TrackBuffer* trackbuffer)\n\t: m_meteor(meteor), m_trackbuffer(trackbuffer)\n{\n\tm_time_playback_pos = time_sec();\n\n\tif (s_instance_count == 0) Pa_Initialize();\n\ts_instance_count++;\n\n\tm_audio_queue = std::unique_ptr<AudioBufferQueue>(new AudioBufferQueue(8));\n\n\tm_demuxing = true;\n\tm_thread_demux = (std::unique_ptr<std::thread>)(new std::thread(thread_demux, this));\n\n\tPaStreamParameters outputParameters = {};\n\toutputParameters.device = Pa_GetDefaultOutputDevice();\n\toutputParameters.channelCount = 2;\n\toutputParameters.sampleFormat = paInt16;\n\toutputParameters.suggestedLatency = Pa_GetDeviceInfo(outputParameters.device)->defaultLowOutputLatency;\n\n\tdouble sample_rate = (double)trackbuffer->Rate();\n\tPa_OpenStream(&m_stream, nullptr, &outputParameters, sample_rate, (unsigned long)(sample_rate*0.01), paClipOff, stream_callback, this);\n\tPa_StartStream(m_stream);\n\n\tglfwInit();\n\tglfwWindowHint(GLFW_SAMPLES, 4);\n\tm_window = glfwCreateWindow(640, 480, \"ScoreDraft Meteor Player\", NULL, NULL);\n\tglfwMakeContextCurrent(m_window);\n\tglfwSwapInterval(1);\n\n\t_buildColorMap();\n\t_buildTexs();\n}\n\nMeteorPlayer::~MeteorPlayer()\n{\n\tauto iter = m_texs.begin();\n\twhile (iter != m_texs.end())\n\t{\n\t\tglDeleteTextures(1, &iter->second.texId);\n\t\titer++;\n\t}\n\n\tglfwDestroyWindow(m_window);\n\tglfwTerminate();\n\n\tm_demuxing = false;\n\n\tPa_StopStream(m_stream);\n\tPa_CloseStream(m_stream);\n\n\twhile (m_audio_queue->Size() > 0)\n\t{\n\t\tAudioBuffer* p = m_audio_queue->Pop();\n\t\tdelete p;\n\t}\n\n\tm_thread_demux->join();\n\tm_thread_demux = nullptr;\n\n\ts_instance_count--;\n\tif (s_instance_count == 0) Pa_Terminate();\n}\n\n\nvoid MeteorPlayer::_buildColorMap()\n{\n\tunsigned bankRef = 0;\n\tconst std::vector<VisBeat>&  beats = m_meteor->GetBeats();\n\tm_beats_centers.clear();\n\tfor (unsigned i = 0; i < (unsigned)beats.size(); i++)\n\t{\n\t\tunsigned perc = beats[i].percId;\n\t\tif (m_PercColorMap.find(perc) == m_PercColorMap.end())\n\t\t{\n\t\t\tm_PercColorMap[perc] = s_ColorBank[bankRef];\n\t\t\tbankRef++;\n\t\t\tif (bankRef >= 15) bankRef = 0;\n\t\t}\n\n\t\tfloat x = rand01();\n\t\tfloat y = rand01();\n\n\t\tm_beats_centers.push_back({ x, y });\n\t}\n\n\tconst std::vector<VisSinging>&  singings = m_meteor->GetSingings();\n\tfor (unsigned i = 0; i < (unsigned)singings.size(); i++)\n\t{\n\t\tunsigned singer = singings[i].singerId;\n\t\tif (m_SingerColorMap.find(singer) == m_SingerColorMap.end())\n\t\t{\n\t\t\tm_SingerColorMap[singer] = s_ColorBank[bankRef];\n\t\t\tbankRef++;\n\t\t\tif (bankRef >= 15) bankRef = 0;\n\t\t}\n\t}\n\n\tconst std::vector<VisNote>&  notes = m_meteor->GetNotes();\n\tfor (unsigned i = 0; i < (unsigned)notes.size(); i++)\n\t{\n\t\tunsigned inst = notes[i].instrumentId;\n\t\tif (m_InstColorMap.find(inst) == m_InstColorMap.end())\n\t\t{\n\t\t\tm_InstColorMap[inst] = s_ColorBank[bankRef];\n\t\t\tbankRef++;\n\t\t\tif (bankRef >= 15) bankRef = 0;\n\t\t}\n\t}\n}\n\nvoid MeteorPlayer::_buildTexs()\n{\n\tconst std::vector<VisSinging>& lst_singings = m_meteor->GetSingings();\n\tfor (size_t i = 0; i < lst_singings.size(); i++)\n\t{\n\t\tconst VisSinging* pnote = &lst_singings[i];\n\t\tstd::string lyric = pnote->lyric;\n\t\tText text(lyric.c_str());\n\t\tTexText tex;\n\t\ttex.width = text.m_width;\n\t\ttex.height = text.m_height;\n\t\tglGenTextures(1, &tex.texId);\n\t\tglBindTexture(GL_TEXTURE_2D, tex.texId);\n\t\tglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);\n\t\tglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);\n\t\tglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);\n\t\tglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);\n\t\tglPixelStorei(GL_UNPACK_ALIGNMENT, 1);\n\t\tglTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, tex.width, tex.height, 0, GL_LUMINANCE, GL_UNSIGNED_BYTE, text.m_data.data());\n\t\tglBindTexture(GL_TEXTURE_2D, 0);\n\t\tm_texs[lyric] = tex;\n\t}\n\n}\n\nvoid MeteorPlayer::_draw_tex(const TexText& tex, float x, float y)\n{\n\tglEnable(GL_TEXTURE_2D);\n\tglBindTexture(GL_TEXTURE_2D, tex.texId);\n\n\tglBegin(GL_QUADS);\n\tglTexCoord2f(0.0f, 1.0f);\n\tglVertex2f(x, y);\n\n\tglTexCoord2f(1.0f, 1.0f);\n\tglVertex2f(x + tex.width, y);\n\n\tglTexCoord2f(1.0f, 0.0f);\n\tglVertex2f(x + tex.width, y + tex.height);\n\n\tglTexCoord2f(0.0f, 0.0f);\n\tglVertex2f(x, y + tex.height);\n\tglEnd();\n\n\tglDisable(GL_TEXTURE_2D);\n}\n\n\nvoid MeteorPlayer::_draw_key(float left, float right, float bottom, float top, float lineWidth, bool black)\n{\n\tif (black)\n\t\tglColor3f(0.0f, 0.0f, 0.0f);\n\telse\n\t\tglColor3f(1.0f, 1.0f, 1.0f);\n\tglBegin(GL_QUADS);\n\t// top\n\tglVertex2f(left + m_cornerSize, top);\n\tglVertex2f(right - m_cornerSize, top);\n\tglVertex2f(right, top - m_cornerSize);\n\tglVertex2f(left, top - m_cornerSize);\n\t// mid\n\tglVertex2f(left, top - m_cornerSize);\n\tglVertex2f(right, top - m_cornerSize);\n\tglVertex2f(right, bottom + m_cornerSize);\n\tglVertex2f(left, bottom + m_cornerSize);\n\t// bottom\n\tglVertex2f(left, bottom + m_cornerSize);\n\tglVertex2f(right, bottom + m_cornerSize);\n\tglVertex2f(right - m_cornerSize, bottom);\n\tglVertex2f(left + m_cornerSize, bottom);\n\tglEnd();\n\n\t// outline\n\tif (black)\n\t\tglColor3f(1.0f, 1.0f, 1.0f);\n\telse\n\t\tglColor3f(0.0f, 0.0f, 0.0f);\n\tglLineWidth(lineWidth);\n\tglBegin(GL_LINE_STRIP);\n\tglVertex2f(left + m_cornerSize, top);\n\tglVertex2f(right - m_cornerSize, top);\n\tglVertex2f(right, top - m_cornerSize);\n\tglVertex2f(right, bottom + m_cornerSize);\n\tglVertex2f(right - m_cornerSize, bottom);\n\tglVertex2f(left + m_cornerSize, bottom);\n\tglVertex2f(left, bottom + m_cornerSize);\n\tglVertex2f(left, top - m_cornerSize);\n\tglVertex2f(left + m_cornerSize, top);\n\tglEnd();\n\n}\n\n\nvoid MeteorPlayer::_draw_flash(float centerx, float centery, float radius, unsigned char color[3], float alpha)\n{\n\tunsigned div = 36;\n\tunsigned char uAlpha = (unsigned char)(alpha*255.0f);\n\n\tglBegin(GL_TRIANGLES);\n\tfor (unsigned i = 0; i < div; i++)\n\t{\n\t\tfloat theta1 = (float)i / (float)div * 2.0f*(float)PI;\n\t\tfloat theta2 = (float)(i + 1) / (float)div * 2.0f*(float)PI;\n\n\t\tfloat x1 = centerx + cosf(theta1)*radius;\n\t\tfloat y1 = centery + sinf(theta1)*radius;\n\n\t\tfloat x2 = centerx + cosf(theta2)*radius;\n\t\tfloat y2 = centery + sinf(theta2)*radius;\n\n\t\tglColor4ub(color[0], color[1], color[2], uAlpha);\n\t\tglVertex2f(centerx, centery);\n\t\tglColor4ub(color[0], color[1], color[2], 0);\n\t\tglVertex2f(x1, y1);\n\t\tglVertex2f(x2, y2);\n\t}\n\n\tglEnd();\n}\n\n\nvoid MeteorPlayer::draw()\n{\n\tint width, height;\n\tglfwGetFramebufferSize(m_window, &width, &height);\n\tglViewport(0, 0, width, height);\n\n\tglMatrixMode(GL_PROJECTION);\n\tglLoadIdentity();\n\tglOrtho(0.0, (double)width, 0.0, (double)height, -1.0, 1.0);\n\n\tglMatrixMode(GL_MODELVIEW);\n\tglLoadIdentity();\n\n\tglClearColor(0.0f, 0.0f, 0.0f, 1.0f);\n\tglClear(GL_COLOR_BUFFER_BIT);\n\n\tglDisable(GL_DEPTH_TEST);\n\n\tconst SubLists& notes_sublists = m_meteor->GetNotesSublists();\n\tconst SubLists& beats_sublists = m_meteor->GetBeatsSublists();\n\tconst SubLists& singing_sublists = m_meteor->GetSingingSublists();\n\n\tsize_t playback_pos;\n\tdouble time_playback_pos;\n\t_get_sync_point(playback_pos, time_playback_pos);\n\tdouble ref_time = (double)playback_pos / (double)m_trackbuffer->Rate();\n\tdouble time_now = time_sec();\n\n\tfloat note_inTime = (float)(ref_time + (time_now - time_playback_pos));\n\tunsigned note_intervalId = notes_sublists.GetIntervalId(note_inTime);\n\tfloat note_outTime = note_inTime - m_showTime;\n\tunsigned note_intervalId_min = notes_sublists.GetIntervalId(note_outTime);\t\t\n\t\n\t/// draw meteors\n\tglEnable(GL_BLEND);\n\tglBlendFunc(GL_SRC_ALPHA, GL_ONE);\n\n\t//notes\n\tif (notes_sublists.m_subLists.size() > 0)\n\t{\n\t\tstd::unordered_set<const VisNote*> visiableNotes;\n\n\t\tfor (unsigned i = note_intervalId_min; i <= note_intervalId; i++)\n\t\t{\n\t\t\tconst SubList& subList = notes_sublists.m_subLists[i];\n\t\t\tfor (unsigned j = 0; j < (unsigned)subList.size(); j++)\n\t\t\t{\n\t\t\t\tconst VisNote& note = m_meteor->GetNotes()[subList[j]];\n\t\t\t\tif (note.start<note_inTime && note.end> note_outTime)\n\t\t\t\t\tvisiableNotes.insert(&note);\n\t\t\t}\n\t\t}\n\n\t\tglBegin(GL_QUADS);\n\n\t\tfloat keyPos[12] = { 0.5f, 1.0f, 1.5f, 2.0f, 2.5f, 3.5f, 4.0f, 4.5f, 5.0f, 5.5f, 6.0f, 6.5f };\n\n\t\tfor (auto iter = visiableNotes.begin(); iter != visiableNotes.end(); iter++)\n\t\t{\n\t\t\tfloat startY = ((*iter)->start - note_inTime) / -m_showTime * ((float)height - m_whiteKeyHeight) + m_whiteKeyHeight;\n\t\t\tfloat endY = ((*iter)->end - note_inTime) / -m_showTime * ((float)height - m_whiteKeyHeight) + m_whiteKeyHeight;\n\n\t\t\tunsigned instId = (*iter)->instrumentId;\n\t\t\tunsigned char* color = m_InstColorMap[instId];\n\n\t\t\tint pitch = (*iter)->pitch;\n\t\t\tint octave = 0;\n\t\t\twhile (pitch < 0)\n\t\t\t{\n\t\t\t\tpitch += 12;\n\t\t\t\toctave--;\n\t\t\t}\n\t\t\twhile (pitch >= 12)\n\t\t\t{\n\t\t\t\tpitch -= 12;\n\t\t\t\toctave++;\n\t\t\t}\n\n\t\t\tfloat x = (float)width*0.5f + ((float)octave*7.0f + keyPos[pitch])*m_whiteKeyWidth;\n\n\t\t\tglColor4ub(color[0], color[1], color[2], 255);\n\t\t\tglVertex2f(x, startY);\n\t\t\tglVertex2f(x + m_meteorHalfWidth, startY - m_meteorHalfWidth);\n\t\t\tglColor4ub(color[0], color[1], color[2], 0);\n\t\t\tglVertex2f(x, endY);\n\t\t\tglColor4ub(color[0], color[1], color[2], 255);\n\t\t\tglVertex2f(x - m_meteorHalfWidth, startY - m_meteorHalfWidth);\n\n\t\t}\n\n\n\t\tglEnd();\n\t}\n\n\t// beats\n\tif (beats_sublists.m_subLists.size() > 0)\n\t{\n\t\tunsigned beat_intervalId = beats_sublists.GetIntervalId(note_inTime);\n\n\t\tconst SubList& subList = beats_sublists.m_subLists[beat_intervalId];\n\t\tfor (unsigned i = 0; i < (unsigned)subList.size(); i++)\n\t\t{\n\t\t\tunsigned beatIndex = subList[i];\n\t\t\tconst VisBeat& beat = m_meteor->GetBeats()[beatIndex];\n\n\t\t\tfloat start = beat.start;\n\t\t\tfloat end = beat.end;\n\n\t\t\t// limting percussion flash time\n\t\t\tif (end - start > m_percussion_flash_limit)\n\t\t\t\tend = start + m_percussion_flash_limit;\n\n\t\t\tif (note_inTime >= start && note_inTime <= end)\n\t\t\t{\n\t\t\t\tfloat centerx = m_beats_centers[beatIndex].x*width;\n\t\t\t\tfloat centery = m_beats_centers[beatIndex].y*(height - m_whiteKeyHeight) + m_whiteKeyHeight;\n\t\t\t\tfloat radius = width * m_percussion_flash_size_factor;\n\n\t\t\t\tunsigned char* color = m_PercColorMap[beat.percId];\n\t\t\t\tfloat alpha = (end - note_inTime) / (end - start);\n\t\t\t\t_draw_flash(centerx, centery, radius, color, alpha);\n\t\t\t}\n\t\t}\n\t}\n\n\n\t// singing\n\tif (singing_sublists.m_subLists.size() > 0)\n\t{\n\t\tunsigned singing_intervalId = singing_sublists.GetIntervalId(note_inTime);\n\t\tunsigned singing_intervalId_min = singing_sublists.GetIntervalId(note_outTime);\n\n\t\tstd::unordered_set<const VisSinging*> visiableNotes;\n\n\t\tfor (unsigned i = singing_intervalId_min; i <= singing_intervalId; i++)\n\t\t{\n\t\t\tconst SubList& subList = singing_sublists.m_subLists[i];\n\t\t\tfor (unsigned j = 0; j < (unsigned)subList.size(); j++)\n\t\t\t{\n\t\t\t\tconst VisSinging& note = m_meteor->GetSingings()[subList[j]];\n\t\t\t\tif (note.start<note_inTime && note.end> note_outTime)\n\t\t\t\t\tvisiableNotes.insert(&note);\n\t\t\t}\n\t\t}\n\n\t\tfloat pixelPerPitch = m_whiteKeyWidth * 7.0f / 12.0f;\n\n\t\tglBegin(GL_QUADS);\n\t\t\n\t\tfor (auto iter = visiableNotes.begin(); iter != visiableNotes.end(); iter++)\n\t\t{\n\t\t\tfloat startY = ((*iter)->start - note_inTime) / -m_showTime * ((float)height - m_whiteKeyHeight) + m_whiteKeyHeight;\n\t\t\tfloat endY = ((*iter)->end - note_inTime) / -m_showTime * ((float)height - m_whiteKeyHeight) + m_whiteKeyHeight;\n\n\t\t\tunsigned singerId = (*iter)->singerId;\n\t\t\tunsigned char* color = m_SingerColorMap[singerId];\n\n\t\t\tconst float* pitches = &(*iter)->pitch[0];\n\t\t\tunsigned num_pitches = (unsigned)(*iter)->pitch.size();\n\n\t\t\tfor (unsigned i = 0; i < num_pitches - 1; i++)\n\t\t\t{\n\t\t\t\tfloat x1 = pitches[i] * pixelPerPitch + (float)width*0.5f + m_whiteKeyWidth * 0.5f;\n\t\t\t\tfloat x2 = pitches[i + 1] * pixelPerPitch + (float)width*0.5f + m_whiteKeyWidth * 0.5f;\n\n\t\t\t\tfloat k1 = (float)i / (float)(num_pitches - 1);\n\t\t\t\tfloat y1 = startY * (1.0f - k1) + endY * k1;\n\n\t\t\t\tfloat k2 = (float)(i + 1) / (float)(num_pitches - 1);\n\t\t\t\tfloat y2 = startY * (1.0f - k2) + endY * k2;\n\n\t\t\t\tglColor4ub(color[0], color[1], color[2], (unsigned char)((1.0f - k1)*255.0f));\n\t\t\t\tglVertex2f(x1 - m_singing_half_width, y1);\n\t\t\t\tglVertex2f(x1 + m_singing_half_width, y1);\n\t\t\t\tglVertex2f(x2 + m_singing_half_width, y2);\n\t\t\t\tglVertex2f(x2 - m_singing_half_width, y2);\n\n\t\t\t}\n\n\t\t}\n\n\t\tglEnd();\n\t}\n\n\t// lyrics\n\tif (singing_sublists.m_subLists.size() > 0)\n\t{\n\t\tunsigned singing_intervalId = singing_sublists.GetIntervalId(note_inTime);\n\t\tunsigned singing_intervalId_min = singing_sublists.GetIntervalId(note_outTime);\n\n\t\tstd::unordered_set<const VisSinging*> visiableNotes;\n\n\t\tfor (unsigned i = singing_intervalId_min; i <= singing_intervalId; i++)\n\t\t{\n\t\t\tconst SubList& subList = singing_sublists.m_subLists[i];\n\t\t\tfor (unsigned j = 0; j < (unsigned)subList.size(); j++)\n\t\t\t{\n\t\t\t\tconst VisSinging& note = m_meteor->GetSingings()[subList[j]];\n\t\t\t\tif (note.start<note_inTime && note.start> note_outTime)\n\t\t\t\t\tvisiableNotes.insert(&note);\n\t\t\t}\n\t\t}\n\n\t\tfloat pixelPerPitch = m_whiteKeyWidth * 7.0f / 12.0f;\t\n\n\t\tfor (auto iter = visiableNotes.begin(); iter != visiableNotes.end(); iter++)\n\t\t{\n\t\t\tfloat startY = ((*iter)->start - note_inTime) / -m_showTime * ((float)height - m_whiteKeyHeight) + m_whiteKeyHeight;\n\n\t\t\tunsigned singerId = (*iter)->singerId;\n\t\t\tunsigned char* color = m_SingerColorMap[singerId];\n\n\t\t\tfloat x = (*iter)->pitch[0] * pixelPerPitch + (float)width*0.5f + m_whiteKeyWidth * 0.5f + m_singing_half_width;\n\t\t\tstd::string lyric = (*iter)->lyric;\n\n\t\t\tTexText& tex = m_texs[lyric];\n\t\t\tglColor3ub(color[0], color[1], color[2]);\n\t\t\t_draw_tex(tex, x, startY);\n\t\t}\n\t}\n\n\n\t/// draw keyboard\n\tglDisable(GL_BLEND);\n\n\tstatic int whitePitchs[7] = { 0, 2, 4, 5, 7, 9, 11 };\n\tstatic int blackPitchs[5] = { 1, 3, 6, 8, 10 };\n\tstatic int blackPos[5] = { 1, 2, 4, 5, 6 };\n\n\tfloat center = (float)width *0.5f;\n\tfloat octaveWidth = m_whiteKeyWidth * 7.0f;\n\n\tint minOctave = -(int)ceilf(center / octaveWidth);\n\tint maxOctave = (int)floorf(center / octaveWidth);\n\tint numKeys = (maxOctave - minOctave + 1) * 12;\n\tint indexShift = -minOctave * 12;\n\n\tbool* pressed = new bool[numKeys];\n\tmemset(pressed, 0, sizeof(bool)* numKeys);\n\n\t// notes\n\tif (notes_sublists.m_subLists.size() > 0)\n\t{\n\t\tconst SubList& subList = notes_sublists.m_subLists[note_intervalId];\n\t\tfor (unsigned i = 0; i < (unsigned)subList.size(); i++)\n\t\t{\n\t\t\tconst VisNote& note = m_meteor->GetNotes()[subList[i]];\n\t\t\tfloat start = note.start;\n\t\t\tfloat end = note.end;\n\n\t\t\t// early key-up movement\n\t\t\tend -= (end - start)*0.1f;\n\n\t\t\tif (note_inTime >= start && note_inTime <= end)\n\t\t\t{\n\t\t\t\tint index = note.pitch + indexShift;\n\t\t\t\tif (index >= 0 && index < numKeys)\n\t\t\t\t{\t\t\t\t\n\t\t\t\t\tpressed[index] = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\n\tfor (int i = minOctave; center + (float)i*octaveWidth < width; i++)\n\t{\n\t\tfloat octaveLeft = center + (float)i*octaveWidth;\n\t\tfor (int j = 0; j < 7; j++)\n\t\t{\n\t\t\tint index = whitePitchs[j] + i * 12 + indexShift;\n\t\t\tbool keyPressed = pressed[index];\n\n\t\t\tfloat left = octaveLeft + (float)j*m_whiteKeyWidth;\n\t\t\tfloat right = left + m_whiteKeyWidth;\n\t\t\tfloat bottom = keyPressed ? m_whiteKeyPressedDelta : 0.0f;\n\t\t\tfloat top = m_whiteKeyHeight;\n\t\t\t_draw_key(left, right, bottom, top, keyPressed ? m_pressedLineWidth : 1.0f);\n\t\t}\n\t\tfor (int j = 0; j < 5; j++)\n\t\t{\n\t\t\tint index = blackPitchs[j] + i * 12 + indexShift;\n\t\t\tbool keyPressed = pressed[index];\n\n\t\t\tfloat keyCenter = octaveLeft + (float)blackPos[j] * m_whiteKeyWidth;\n\t\t\tfloat left = keyCenter - m_blackKeyWidth / 2.0f;\n\t\t\tfloat right = keyCenter + m_blackKeyWidth / 2.0f;\n\n\t\t\tfloat bottom = keyPressed ? m_whiteKeyHeight - m_blackKeyHeight + m_blackKeyPressedDelta : m_whiteKeyHeight - m_blackKeyHeight;\n\t\t\tfloat top = m_whiteKeyHeight;\n\t\t\t_draw_key(left, right, bottom, top, keyPressed ? m_pressedLineWidth : 1.0f, true);\n\t\t}\n\t}\n\n\tdelete[] pressed;\n}\n\nvoid MeteorPlayer::main_loop()\n{\t\n\twhile (m_demuxing && glfwWindowShouldClose(m_window) == 0)\n\t{\n\t\tglfwMakeContextCurrent(m_window);\n\t\tdraw();\n\t\tglfwSwapBuffers(m_window);\n\t\tglfwPollEvents();\n\t}\n}\n"
  },
  {
    "path": "Meteor/MeteorPlayer.h",
    "content": "#pragma once\n\n#include <memory>\n#include <mutex>\n#include <string>\n#include <unordered_map>\n\ntypedef std::unordered_map<unsigned, unsigned char*> ColorMap;\n\nstruct Pos2D\n{\n\tfloat x;\n\tfloat y;\n};\n\nnamespace std\n{\n\tclass thread;\n}\n\n#define AUDIO_BUF_LEN 512\nstruct AudioBuffer\n{\n\tshort data[AUDIO_BUF_LEN * 2];\n};\n\nclass TrackBuffer;\nclass AudioBufferQueue;\n\nstruct PaStreamCallbackTimeInfo;\n\nstruct GLFWwindow;\n\nclass Meteor;\nstruct VisSinging;\nclass MeteorPlayer\n{\npublic:\n\tMeteorPlayer(Meteor* meteor, TrackBuffer* trackbuffer);\n\t~MeteorPlayer();\n\t\n\tvoid main_loop();\t\n\nprivate:\n\tstatic thread_local int s_instance_count;\n\tvoid *m_stream;\n\tstatic int stream_callback(const void *inputBuffer, void *outputBuffer,\n\t\tunsigned long framesPerBuffer,\n\t\tconst PaStreamCallbackTimeInfo* timeInfo,\n\t\tunsigned long statusFlags,\n\t\tvoid *userData);\n\n\tdouble m_sample_rate = 44100.0;\n\tMeteor* m_meteor = nullptr;\n\tTrackBuffer* m_trackbuffer = nullptr;\n\tstd::unique_ptr<AudioBufferQueue> m_audio_queue;\n\tsize_t m_input_read_pos = 0;\n\tsize_t m_audio_read_pos = 0;\n\t\n\tsize_t m_playback_pos = 0;\n\tsize_t m_playback_pos_next = 0;\n\tdouble m_time_playback_pos = 0.0;\t\n\tstd::mutex m_mutex_sync;\n\tvoid _set_sync_point(size_t playback_pos, double time_playback_pos);\n\tvoid _get_sync_point(size_t& playback_pos, double& time_playback_pos);\n\n\tbool m_demuxing = false;\n\tstatic void thread_demux(MeteorPlayer* self);\n\tstd::unique_ptr<std::thread> m_thread_demux;\n\n\t// UI\n\tGLFWwindow* m_window = nullptr;\n\tvoid draw();\n\n\tstruct TexText\n\t{\n\t\tint width;\n\t\tint height;\n\t\tunsigned texId;\n\t};\n\n\tstd::unordered_map<std::string, TexText> m_texs;\n\tvoid _buildTexs();\n\tvoid _draw_tex(const TexText& tex, float x, float y);\n\n\tvoid _buildColorMap();\n\tvoid _draw_key(float left, float right, float bottom, float top, float lineWidth, bool black = false);\n\tvoid _draw_flash(float centerx, float centery, float radius, unsigned char color[3], float alpha);\n\tstatic unsigned char s_ColorBank[15][3];\n\n\tColorMap m_InstColorMap;\n\tColorMap m_PercColorMap;\n\tstd::vector<Pos2D> m_beats_centers;\n\tColorMap m_SingerColorMap;\n\n\t// UI settings\n\tfloat m_whiteKeyWidth = 18.0f;\n\tfloat m_blackKeyWidth = 14.0f;\n\tfloat m_whiteKeyHeight = 80.0f;\n\tfloat m_blackKeyHeight = 50.0f;\n\tfloat m_cornerSize = 3.0f;\n\tfloat m_whiteKeyPressedDelta = 3.0f;\n\tfloat m_blackKeyPressedDelta = 2.0f;\n\tfloat m_pressedLineWidth = 3.0f;\n\n\tfloat m_showTime = 1.0f;\n\tfloat m_meteorHalfWidth = 5.0f;\n\n\tfloat m_percussion_flash_size_factor = 0.15f;\n\tfloat m_percussion_flash_limit = 0.3f;\n\n\tfloat m_singing_half_width = 8.0f;\n};"
  },
  {
    "path": "Meteor/SubListLookUp.h",
    "content": "#ifndef _SubListLookUp_h\n#define _SubListLookUp_h\n\n#include <vector>\n#include <float.h>\n#include <stdio.h>\n#include <cmath>\n#include \"blob.hpp\"\n\ntypedef std::vector<unsigned> SubList;\n\nclass SubLists\n{\npublic:\n\tfloat m_minStart;\n\tfloat m_maxEnd;\n\tfloat m_interval;\n\tstd::vector<SubList> m_subLists;\n\n\tSubLists()\t{}\n\n\tunsigned GetIntervalId(float v) const\n\t{\n\t\tif (v < m_minStart) return 0;\n\t\tunsigned id = (unsigned)((v - m_minStart) / m_interval);\n\t\tif (id >= (unsigned)m_subLists.size()) id = (unsigned)m_subLists.size() - 1;\n\t\treturn id;\n\t}\n\n\tvoid SaveToFile(FILE* fp) const\n\t{\n\t\tfwrite(&m_minStart, sizeof(float), 3, fp);\n\t\tunsigned count = (unsigned)m_subLists.size();\n\t\tfwrite(&count, sizeof(unsigned), 1, fp);\n\t\tfor (unsigned i = 0; i < count; i++)\n\t\t{\n\t\t\tunsigned sub_count = (unsigned)m_subLists[i].size();\n\t\t\tfwrite(&sub_count, sizeof(unsigned), 1, fp);\n\t\t\tfwrite(&m_subLists[i][0], sizeof(unsigned), sub_count, fp);\n\t\t}\n\t}\n\n\tvoid LoadFromFile(FILE* fp)\n\t{\n\t\tfread(&m_minStart, sizeof(float), 3, fp);\n\t\tunsigned count;\n\t\tfread(&count, sizeof(unsigned), 1, fp);\n\t\tm_subLists.clear();\n\t\tm_subLists.resize(count);\n\t\tfor (unsigned i = 0; i < count; i++)\n\t\t{\n\t\t\tunsigned sub_count;\n\t\t\tfread(&sub_count, sizeof(unsigned), 1, fp);\n\t\t\tm_subLists[i].resize(sub_count);\n\t\t\tfread(&m_subLists[i][0], sizeof(unsigned), sub_count, fp);\n\t\t}\n\t}\n\n\tvoid ToBlob(std::vector<uint8_t>& blob)\n\t{\n\t\tblob_write(blob, &m_minStart, sizeof(float) * 3);\n\t\tunsigned count = (unsigned)m_subLists.size();\n\t\tblob_write(blob, &count, sizeof(unsigned));\n\t\tfor (unsigned i = 0; i < count; i++)\n\t\t{\n\t\t\tunsigned sub_count = (unsigned)m_subLists[i].size();\n\t\t\tblob_write(blob, &sub_count, sizeof(unsigned));\n\t\t\tblob_write(blob, &m_subLists[i][0], sizeof(unsigned)*sub_count);\n\t\t}\n\t}\n\n\ttemplate<class T>\n\tvoid SetData(const std::vector<T>& fullList, float interval)\n\t{\n\t\tm_interval = interval;\n\t\tm_minStart = FLT_MAX;\n\t\tm_maxEnd = -FLT_MAX;\n\t\tif (fullList.size()==0) return;\n\t\tfor (unsigned i = 0; i < (unsigned) fullList.size(); i++)\n\t\t{\n\t\t\tif (fullList[i].start < m_minStart) m_minStart = fullList[i].start;\n\t\t\tif (fullList[i].end> m_maxEnd) m_maxEnd = fullList[i].end;\n\t\t}\n\n\t\tunsigned numIntervals = (unsigned)ceilf((m_maxEnd - m_minStart) / interval);\n\t\tm_subLists.clear();\n\t\tm_subLists.resize(numIntervals);\n\n\t\tfor (unsigned i = 0; i < (unsigned)fullList.size(); i++)\n\t\t{\n\t\t\tunsigned startInterval = (unsigned)((fullList[i].start - m_minStart) / interval);\n\t\t\tunsigned endInterval = (unsigned)((fullList[i].end - m_minStart) / interval);\n\t\t\tif (endInterval >= numIntervals) endInterval = numIntervals - 1;\n\n\t\t\tfor (unsigned j = startInterval; j <= endInterval; j++)\n\t\t\t{\n\t\t\t\tm_subLists[j].push_back(i);\n\t\t\t}\n\n\t\t}\n\n\t}\n\n};\n\n#endif\n"
  },
  {
    "path": "Meteor/api.cpp",
    "content": "#if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__)\n#define SCOREDRAFT_API __declspec(dllexport)\n#else\n#define SCOREDRAFT_API \n#endif\n\nextern \"C\"\n{\n\tSCOREDRAFT_API void* CtrlPntCreate(double freq, double fduration);\n\tSCOREDRAFT_API void CtrlPntDestroy(void* ptr);\n\tSCOREDRAFT_API void* SyllableCreate(const char* lyric, void* ptr_lst_ctrl_pnts);\n\tSCOREDRAFT_API void SyllableDestroy(void* ptr);\n\tSCOREDRAFT_API void EventDestroy(void* ptr);\n\tSCOREDRAFT_API void EventSetOffset(void* ptr, float offset);\n\tSCOREDRAFT_API void* EventInstCreate(unsigned instrument_id, double freq, float fduration);\n\tSCOREDRAFT_API void* EventPercCreate(unsigned instrument_id, float fduration);\n\tSCOREDRAFT_API void* EventSingCreate(unsigned instrument_id, void* ptr_syllable_list);\n\tSCOREDRAFT_API void* MeteorCreate0();\n\tSCOREDRAFT_API void* MeteorCreate(void* ptr_event_list);\n\tSCOREDRAFT_API void MeteorDestroy(void* ptr);\n\tSCOREDRAFT_API void MeteorSaveToFile(void* ptr, const char* filename);\n\tSCOREDRAFT_API void MeteorLoadFromFile(void* ptr, const char* filename);\n\tSCOREDRAFT_API void MeteorPlay(void* ptr_meteor, void* ptr_track);\n\tSCOREDRAFT_API void* Base64Create(void* ptr_meteor);\n\tSCOREDRAFT_API void Base64Destroy(void* ptr);\n\tSCOREDRAFT_API const char* Base64Get(void* ptr);\n}\n\n#include \"Meteor.h\"\n\nvoid* CtrlPntCreate(double freq, double fduration)\n{\n\treturn new CtrlPnt({ freq, fduration });\n}\n\nvoid CtrlPntDestroy(void* ptr)\n{\n\tdelete (CtrlPnt*)ptr;\n}\n\nvoid* SyllableCreate(const char* lyric, void* ptr_lst_ctrl_pnts)\n{\n\tstd::vector<CtrlPnt*>* lst_ctrl_pnts = (std::vector<CtrlPnt*>*)ptr_lst_ctrl_pnts;\n\tSyllable* syllable = new Syllable;\n\tsyllable->lyric = lyric;\n\tsyllable->ctrlPnts.resize(lst_ctrl_pnts->size());\n\tfor (size_t i = 0; i < lst_ctrl_pnts->size(); i++)\n\t{\n\t\tsyllable->ctrlPnts[i] = *(*lst_ctrl_pnts)[i];\n\t}\n\treturn syllable;\n}\n\nvoid SyllableDestroy(void* ptr)\n{\n\tdelete (Syllable*)ptr;\n}\n\nvoid EventDestroy(void* ptr)\n{\n\tdelete (Event*)ptr;\n}\n\nvoid EventSetOffset(void* ptr, float offset)\n{\n\tEvent* e = (Event*)ptr;\n\te->offset = offset;\n}\n\n\nvoid* EventInstCreate(unsigned instrument_id, double freq, float fduration)\n{\n\treturn new EventInst(instrument_id, freq, fduration);\n}\n\nvoid* EventPercCreate(unsigned instrument_id, float fduration)\n{\n\treturn new EventPerc(instrument_id, fduration);\n}\n\nvoid* EventSingCreate(unsigned instrument_id, void* ptr_syllable_list)\n{\n\tstd::vector<const Syllable*>* syllable_list = (std::vector<const Syllable*>*)ptr_syllable_list;\n\treturn new EventSing(instrument_id, syllable_list->size(), syllable_list->data());\n}\n\n#include \"DrawText.h\"\n\nvoid* MeteorCreate0()\n{\n\tText text(\"测试\");\n\treturn new Meteor;\n}\n\nvoid* MeteorCreate(void* ptr_event_list)\n{\n\tstd::vector<const Event*>* event_list = (std::vector<const Event*>*)ptr_event_list;\n\treturn new Meteor(event_list->size(), event_list->data());\n}\n\nvoid MeteorDestroy(void* ptr)\n{\n\tdelete (Meteor*)ptr;\n}\n\nvoid MeteorSaveToFile(void* ptr, const char* filename)\n{\n\tMeteor* meteor = (Meteor*)ptr;\n\tmeteor->SaveToFile(filename);\n}\n\nvoid MeteorLoadFromFile(void* ptr, const char* filename)\n{\n\tMeteor* meteor = (Meteor*)ptr;\n\tmeteor->LoadFromFile(filename);\n}\n\nvoid MeteorPlay(void* ptr_meteor, void* ptr_track)\n{\n\tMeteor* meteor = (Meteor*)ptr_meteor;\n\tTrackBuffer* track = (TrackBuffer*)ptr_track;\n\n\tmeteor->Play(track);\n}\n\nvoid* Base64Create(void* ptr_meteor)\n{\n\tMeteor* meteor = (Meteor*)ptr_meteor;\n\tstd::string* base64 = new std::string;\n\tmeteor->ToBase64(*base64);\n\treturn base64;\n}\n\nvoid Base64Destroy(void* ptr)\n{\n\tdelete (std::string*)ptr;\n}\n\nconst char* Base64Get(void* ptr)\n{\n\treturn ((std::string*)ptr)->c_str();\n}"
  },
  {
    "path": "Meteor/base64.hpp",
    "content": "#pragma once\n\n#include <string>\n#include <vector>\n#include <stdexcept>\n#include <cstdint>\n\ninline void base64_encode(const std::vector<uint8_t>& input, std::string& output)\n{\n\tstatic const char kEncodeLookup[] = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\";\n\tstatic const char kPadCharacter = '=';\n\n\toutput = \"\";\n\toutput.reserve(((input.size() / 3) + (input.size() % 3 > 0)) * 4);\n\n\tstd::uint32_t temp{};\n\tauto it = input.begin();\n\n\tfor(std::size_t i = 0; i < input.size() / 3; ++i)\n\t{\n\t\ttemp  = (*it++) << 16;\n\t\ttemp += (*it++) << 8;\n\t\ttemp += (*it++);\n\t\toutput.append(1, kEncodeLookup[(temp & 0x00FC0000) >> 18]);\n\t\toutput.append(1, kEncodeLookup[(temp & 0x0003F000) >> 12]);\n\t\toutput.append(1, kEncodeLookup[(temp & 0x00000FC0) >> 6 ]);\n\t\toutput.append(1, kEncodeLookup[(temp & 0x0000003F)      ]);\n\t}\n\n\tswitch(input.size() % 3)\n\t{\n\tcase 1:\n\t\ttemp = (*it++) << 16;\n\t\toutput.append(1, kEncodeLookup[(temp & 0x00FC0000) >> 18]);\n\t\toutput.append(1, kEncodeLookup[(temp & 0x0003F000) >> 12]);\n\t\toutput.append(2, kPadCharacter);\n\t\tbreak;\n\tcase 2:\n\t\ttemp  = (*it++) << 16;\n\t\ttemp += (*it++) << 8;\n\t\toutput.append(1, kEncodeLookup[(temp & 0x00FC0000) >> 18]);\n\t\toutput.append(1, kEncodeLookup[(temp & 0x0003F000) >> 12]);\n\t\toutput.append(1, kEncodeLookup[(temp & 0x00000FC0) >> 6 ]);\n\t\toutput.append(1, kPadCharacter);\n\t\tbreak;\n\t}\n}\n\n"
  },
  {
    "path": "Meteor/blob.hpp",
    "content": "#pragma once\n\n#include <vector>\n#include <cstdint>\n#include <cstddef>\n#include <memory.h>\n\ninline void blob_write(std::vector<uint8_t>& blob, const void* data, size_t size)\n{\n\tblob.resize(blob.size() + size);\n\tmemcpy(blob.data() + blob.size() - size, data, size);\n}\n\n"
  },
  {
    "path": "PCMPlayer/CMakeLists.txt",
    "content": "cmake_minimum_required (VERSION 3.0)\n\nproject(PCMPlayer)\n\nset(SOURCES\n../DSPUtil/complex.cpp\n../DSPUtil/fft.cpp\napi.cpp\nPCMPlayer.cpp\n)\n\nset(HEADERS \n../DSPUtil/complex.h\n../DSPUtil/fft.h\nPCMPlayer.h\n)\n\n\nset (INCLUDE_DIR\n../ScoreDraftCore\n../DSPUtil\n../thirdparty/portaudio/include\n../thirdparty/glfw/include\n)\n\n\nif (WIN32) \nset (DEFINES  ${DEFINES}\n-D\"_CRT_SECURE_NO_DEPRECATE\"  \n-D\"_SCL_SECURE_NO_DEPRECATE\" \n)\nelse()\nadd_definitions(-std=c++0x)\nadd_compile_options(-fPIC)\nendif()\n\ninclude_directories(${INCLUDE_DIR})\nadd_definitions(${DEFINES})\nadd_library (PCMPlayer SHARED  ${SOURCES} ${HEADERS})\ntarget_link_libraries(PCMPlayer ScoreDraftCore portaudio_static glfw)\n\nif (WIN32) \ntarget_link_libraries(PCMPlayer opengl32)\nelse()\ntarget_link_libraries(PCMPlayer GL)\nendif()\n\nif (WIN32) \ntarget_compile_definitions(PCMPlayer PUBLIC SCOREDRAFTCORE_DLL_IMPORT)\nendif()\n\nif (WIN32) \ninstall(TARGETS PCMPlayer RUNTIME DESTINATION ScoreDraft)\nelse()\ninstall(TARGETS PCMPlayer DESTINATION ScoreDraft)\nendif()\n\n"
  },
  {
    "path": "PCMPlayer/PCMPlayer.cpp",
    "content": "#include <thread>\n#include <mutex>\n#include <vector>\n#include <list>\n#include <queue>\n#include <memory.h>\n#include <cmath>\n#include <portaudio.h>\n#include <GLFW/glfw3.h>\n\n#include <TrackBuffer.h>\n#include <utils.h>\n#include \"PCMPlayer.h\"\n\n\n#ifndef max\n#define max(a,b)            (((a) > (b)) ? (a) : (b))\n#endif\n\n#ifndef min\n#define min(a,b)            (((a) < (b)) ? (a) : (b))\n#endif\n\n\nclass TrackBufferCopy\n{\npublic:\n\tTrackBufferCopy(TrackBuffer& input)\n\t{\n\t\tm_AlignPos = input.AlignPos();\n\t\tm_chn = input.NumberOfChannels();\n\t\tunsigned size = input.NumberOfSamples();\n\t\tm_data.resize(size*m_chn);\n\n\t\tfloat volume = input.AbsoluteVolume();\n\t\tfloat pan = input.Pan();\n\n\t\tfor (unsigned i = 0; i < size; i++)\n\t\t{\n\t\t\tfloat sample[2];\n\t\t\tinput.Sample(i, sample);\n\t\t\tif (m_chn == 1)\n\t\t\t{\n\t\t\t\tm_data[i] = (short)(max(min(sample[0] * volume, 1.0f), -1.0f)*32767.0f);\n\t\t\t}\n\t\t\telse if (m_chn == 2)\n\t\t\t{\n\t\t\t\tCalcPan(pan, sample[0], sample[1]);\n\t\t\t\tm_data[2 * i] = (short)(max(min(sample[0] * volume, 1.0f), -1.0f)*32767.0f);\n\t\t\t\tm_data[2 * i + 1] = (short)(max(min(sample[1] * volume, 1.0f), -1.0f)*32767.0f);\n\t\t\t}\n\t\t}\n\t}\n\n\t~TrackBufferCopy()\n\t{\n\n\t}\n\n\tstd::vector<short> m_data;\n\tunsigned m_AlignPos;\n\tunsigned m_chn;\n};\n\nclass TrackBufferQueue\n{\npublic:\n\tTrackBufferQueue()\n\t{\n\n\t}\n\n\t~TrackBufferQueue()\n\t{\n\n\t}\n\n\tsize_t Size()\n\t{\n\t\treturn m_queue.size();\n\t}\n\n\tvoid Front2(TrackBufferCopy*& track0, TrackBufferCopy*& track1)\n\t{\n\t\ttrack0 = nullptr;\n\t\ttrack1 = nullptr;\n\t\tm_mutex.lock();\n\t\tauto iter = m_queue.begin();\n\t\tif (iter != m_queue.end())\n\t\t{\n\t\t\ttrack0 = *iter;\n\t\t\titer++;\n\t\t\tif (iter != m_queue.end())\n\t\t\t{\n\t\t\t\ttrack1 = *iter;\n\t\t\t}\n\t\t}\t\t\n\t\tm_mutex.unlock();\n\t}\n\n\tvoid Push(TrackBufferCopy* buf)\n\t{\n\t\tm_mutex.lock();\n\t\tm_queue.push_back(buf);\n\t\tm_mutex.unlock();\n\t}\n\n\tTrackBufferCopy* Pop()\n\t{\n\t\tm_mutex.lock();\n\t\tTrackBufferCopy* ret = m_queue.front();\n\t\tm_queue.pop_front();\n\t\tm_mutex.unlock();\n\t\treturn ret;\n\t}\n\nprivate:\n\tstd::list<TrackBufferCopy*> m_queue;\n\tstd::mutex m_mutex;\n};\n\nclass AudioBufferQueue\n{\npublic:\n\tAudioBufferQueue(int cache_size) : m_semaphore_in(cache_size)\n\t{\n\t}\n\n\t~AudioBufferQueue()\n\t{\n\t}\n\n\tsize_t Size()\n\t{\n\t\treturn m_queue.size();\n\t}\n\n\tAudioBuffer* Front()\n\t{\n\t\treturn m_queue.front();\n\t}\n\n\tvoid Push(AudioBuffer* packet)\n\t{\n\t\tm_semaphore_in.wait();\n\t\tm_mutex.lock();\n\t\tm_queue.push(packet);\n\t\tm_mutex.unlock();\n\t\tm_semaphore_out.notify();\n\t}\n\n\tAudioBuffer* Pop()\n\t{\n\t\tm_semaphore_out.wait();\n\t\tm_mutex.lock();\n\t\tAudioBuffer* ret = m_queue.front();\n\t\tm_queue.pop();\n\t\tm_mutex.unlock();\n\t\tm_semaphore_in.notify();\n\t\treturn ret;\n\t}\n\nprivate:\n\tstd::queue<AudioBuffer*> m_queue;\n\tstd::mutex m_mutex;\n\tSemaphore m_semaphore_in;\n\tSemaphore m_semaphore_out;\n};\n\n\nint PCMPlayer::stream_callback(const void *inputBuffer, void *outputBuffer,\n\tunsigned long framesPerBuffer,\n\tconst PaStreamCallbackTimeInfo* timeInfo,\n\tunsigned long statusFlags,\n\tvoid *userData)\n{\n\tPCMPlayer* self = (PCMPlayer*)userData;\n\tAudioBufferQueue* queue = self->m_audio_queue.get();\n\tunsigned long pos_out = 0;\n\tshort *out = (short*)outputBuffer;\n\twhile (pos_out < framesPerBuffer)\n\t{\n\t\tif (queue->Size() < 1) break;\n\t\tAudioBuffer* buf_in = queue->Front();\t\t\n\t\tsize_t copy_size = min(AUDIO_BUF_LEN - self->m_audio_read_pos, framesPerBuffer - pos_out);\n\t\tmemcpy(out + pos_out * 2, buf_in->data + self->m_audio_read_pos * 2, sizeof(short)*copy_size * 2);\n\t\tself->m_audio_read_pos += copy_size;\n\t\tpos_out += (unsigned long)copy_size;\n\t\tif (self->m_audio_read_pos == AUDIO_BUF_LEN)\n\t\t{\n\t\t\tself->m_audio_read_pos = 0;\n\t\t\tqueue->Pop();\n\t\t\tdelete buf_in;\t\t\t\n\t\t}\n\t}\n\tif (pos_out < framesPerBuffer)\n\t\tmemset(out + pos_out * 2, 0, sizeof(short) * (framesPerBuffer - pos_out) * 2);\n\n\treturn paContinue;\n}\n\nvoid PCMPlayer::thread_demux(PCMPlayer* self)\n{\n\tTrackBufferQueue* queue_in = self->m_input_queue.get();\n\tAudioBufferQueue* queue_out = self->m_audio_queue.get();\n\twhile (self->m_demuxing)\n\t{\n\t\tAudioBuffer* buf_out = new AudioBuffer;\n\t\tsize_t pos_out = 0;\n\t\twhile (pos_out < AUDIO_BUF_LEN)\n\t\t{\n\t\t\tTrackBufferCopy *buf_in, *buf_in2;\n\t\t\tqueue_in->Front2(buf_in, buf_in2);\n\t\t\tif (buf_in == nullptr) break;\n\n\t\t\tsize_t size_in = buf_in->m_data.size() / buf_in->m_chn;\n\t\t\tsize_t copy_size = min(size_in - self->m_input_read_pos, AUDIO_BUF_LEN - pos_out);\n\t\t\t\n\t\t\tfor (size_t i = 0; i < copy_size; i++)\n\t\t\t{\n\t\t\t\tsize_t read_pos = self->m_input_read_pos + i;\n\t\t\t\tshort value[2] = { 0,0 };\n\t\t\t\tif (buf_in->m_chn == 1)\n\t\t\t\t{\n\t\t\t\t\tvalue[0] = value[1] = buf_in->m_data[read_pos];\n\t\t\t\t}\n\t\t\t\telse if (buf_in->m_chn == 2)\n\t\t\t\t{\n\t\t\t\t\tvalue[0] = buf_in->m_data[read_pos * 2];\n\t\t\t\t\tvalue[1] = buf_in->m_data[read_pos * 2 + 1];\n\t\t\t\t}\n\n\t\t\t\tif (buf_in2 != nullptr && read_pos > size_in - buf_in2->m_AlignPos)\n\t\t\t\t{\n\t\t\t\t\tunsigned read_pos2 = (unsigned)read_pos - (unsigned)(size_in - buf_in2->m_AlignPos);\t\t\t\t\t\n\t\t\t\t\tshort value2[2] = { 0,0 };\n\t\t\t\t\tif (buf_in2->m_chn == 1)\n\t\t\t\t\t{\n\t\t\t\t\t\tvalue2[0] = value2[1] = buf_in2->m_data[read_pos2];\n\t\t\t\t\t}\n\t\t\t\t\telse if (buf_in2->m_chn == 2)\n\t\t\t\t\t{\n\t\t\t\t\t\tvalue2[0] = buf_in2->m_data[read_pos2 * 2];\n\t\t\t\t\t\tvalue2[1] = buf_in2->m_data[read_pos2 * 2 + 1];\n\t\t\t\t\t}\n\n\t\t\t\t\tfor (unsigned j = 0; j < 2; j++)\n\t\t\t\t\t{\n\t\t\t\t\t\tint v = (int)value[j] + (int)value2[j];\n\t\t\t\t\t\tif (v > 32767) v = 32767;\n\t\t\t\t\t\telse if (v < -32767) v = -32767;\n\t\t\t\t\t\tvalue[j] = (short)v;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tsize_t write_pos = pos_out + i;\n\t\t\t\tbuf_out->data[write_pos * 2] = value[0];\n\t\t\t\tbuf_out->data[write_pos * 2 + 1] = value[1];\n\t\t\t}\t\n\n\t\t\tpos_out += copy_size;\n\n\t\t\tself->m_mutex_progress.lock();\n\t\t\tself->m_input_read_pos += copy_size;\n\t\t\tif (self->m_input_read_pos == size_in)\n\t\t\t{\t\t\t\t\n\t\t\t\tself->m_total_length -= buf_in->m_data.size() / buf_in->m_chn;\n\t\t\t\tif (buf_in2 != nullptr)\n\t\t\t\t{\n\t\t\t\t\tself->m_input_read_pos = buf_in2->m_AlignPos;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tself->m_input_read_pos = 0;\n\t\t\t\t}\t\t\t\t\n\t\t\t\tself->m_mutex_progress.unlock();\n\n\t\t\t\tqueue_in->Pop();\n\t\t\t\tdelete buf_in;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tself->m_mutex_progress.unlock();\n\t\t\t}\t\t\n\t\t\t\n\t\t}\n\t\tif (pos_out < AUDIO_BUF_LEN)\n\t\t\tmemset(buf_out->data + pos_out * 2, 0, sizeof(short) * (AUDIO_BUF_LEN - pos_out) * 2);\n\n\t\tself->m_ring_buf[self->m_next_buf] = *buf_out;\n\t\tself->m_next_buf = (self->m_next_buf + 1) % 12;\n\t\tqueue_out->Push(buf_out);\t\t\n\t}\n}\n\nthread_local int PCMPlayer::s_instance_count = 0;\n\nPCMPlayer::PCMPlayer(double sample_rate, bool ui) : m_sample_rate(sample_rate)\n{\n\tif (s_instance_count == 0) Pa_Initialize();\n\ts_instance_count++;\n\n\tm_input_queue = std::unique_ptr<TrackBufferQueue>(new TrackBufferQueue);\n\tm_audio_queue = std::unique_ptr<AudioBufferQueue>(new AudioBufferQueue(8));\n\n\tm_demuxing = true;\n\tm_thread_demux = (std::unique_ptr<std::thread>)(new std::thread(thread_demux, this));\n\n\tPaStreamParameters outputParameters = {};\n\toutputParameters.device = Pa_GetDefaultOutputDevice();\n\toutputParameters.channelCount = 2;\n\toutputParameters.sampleFormat = paInt16;\n\toutputParameters.suggestedLatency = Pa_GetDeviceInfo(outputParameters.device)->defaultLowOutputLatency;\n\n\tPa_OpenStream(&m_stream, nullptr, &outputParameters, sample_rate, (unsigned long)(sample_rate*0.01), paClipOff, stream_callback, this);\n\tPa_StartStream(m_stream);\n\t\n\tif (ui)\n\t{\n\t\tglfwInit();\t\t\n\t\tm_window = glfwCreateWindow(640, 320, \"ScoreDraft PCM Player\", NULL, NULL);\n\t\tglfwMakeContextCurrent(m_window);\n\t\tglfwSwapInterval(1);\n\t\tglfwSetWindowUserPointer(m_window, this);\n\t\tglfwSetKeyCallback(m_window, key_callback);\n\t\tprintf(\"Press 'W' to show waveform.\\n\");\n\t\tprintf(\"Press 'S' to show spectrum.\\n\");\n\t}\n}\n\nPCMPlayer::~PCMPlayer()\n{\n\tif (m_window != nullptr)\n\t{\n\t\tglfwDestroyWindow(m_window);\n\t\tglfwTerminate();\n\t}\n\n\tm_demuxing = false;\n\n\tPa_StopStream(m_stream);\n\tPa_CloseStream(m_stream);\n\n\twhile (m_audio_queue->Size() > 0)\n\t{\n\t\tAudioBuffer* p = m_audio_queue->Pop();\n\t\tdelete p;\n\t}\n\n\twhile (m_input_queue->Size() > 0)\n\t{\n\t\tTrackBufferCopy* p = m_input_queue->Pop();\n\t\tdelete p;\n\t}\n\n\tm_thread_demux->join();\n\tm_thread_demux = nullptr;\n\n\ts_instance_count--;\n\tif (s_instance_count == 0) Pa_Terminate();\n}\n\nvoid PCMPlayer::PlayTrack(TrackBuffer &track)\n{\n\tm_input_queue->Push(new TrackBufferCopy(track));\n\tm_mutex_progress.lock();\n\tm_total_length += track.NumberOfSamples();\n\tm_mutex_progress.unlock();\n}\n\nfloat PCMPlayer::GetRemainingTime()\n{\n\tm_mutex_progress.lock();\n\tfloat remaining = (float)(m_total_length - m_input_read_pos) / (float)m_sample_rate;\n\tm_mutex_progress.unlock();\n\treturn remaining;\n}\n\nvoid PCMPlayer::draw()\n{\n\tint width, height;\n\tglfwGetFramebufferSize(m_window, &width, &height);\n\tglViewport(0, 0, width, height);\n\n\tglMatrixMode(GL_PROJECTION);\n\tglLoadIdentity();\n\n\tglMatrixMode(GL_MODELVIEW);\n\tglLoadIdentity();\n\n\tglClearColor(0.0f, 0.0f, 0.0f, 1.0f);\n\tglClear(GL_COLOR_BUFFER_BIT);\n\n\tglDisable(GL_DEPTH_TEST);\n\n\tswitch (m_mode)\n\t{\n\tcase Mode::WaveForm:\n\t{\n\t\tint start_buf = (m_next_buf + 10) % 12;\n\t\tfor (int i = 0; i < 2; i++)\n\t\t{\n\t\t\tint buf_i = (start_buf + i) % 12;\n\t\t\tfor (int j = 0; j < AUDIO_BUF_LEN; j++)\n\t\t\t{\n\t\t\t\tint k = i * AUDIO_BUF_LEN + j;\n\t\t\t\tm_wavaform_cache[k] = ((float)m_ring_buf[buf_i].data[j * 2] + (float)m_ring_buf[buf_i].data[j * 2 + 1]) / 65536.0f;\n\t\t\t}\n\t\t}\n\n\t\tglColor3f(1.0f, 1.0f, 0.0f);\n\t\tglBegin(GL_LINE_STRIP);\n\t\tfor (int i = 0; i < AUDIO_BUF_LEN * 2; i++)\n\t\t{\n\t\t\tfloat x = (float)i / (float)(AUDIO_BUF_LEN * 2 - 1)*2.0f - 1.0f;\n\t\t\tfloat y = m_wavaform_cache[i]*0.75f;\n\t\t\tglVertex2f(x, y);\n\t\t}\t\t\n\t\tglEnd();\n\t}\n\tbreak;\n\tcase Mode::Spectrum:\n\t{\n\t\tint start_buf = (m_next_buf + 8) % 12;\n\t\tfor (int i = 0; i < 4; i++)\n\t\t{\n\t\t\tint buf_i = (start_buf + i) % 12;\n\t\t\tfor (int j = 0; j < AUDIO_BUF_LEN; j++)\n\t\t\t{\n\t\t\t\tint k = i * AUDIO_BUF_LEN + j;\n\t\t\t\tm_spectrum_cache[k] = ((float)m_ring_buf[buf_i].data[j * 2] + (float)m_ring_buf[buf_i].data[j * 2 + 1]) / 65536.0f;\n\t\t\t}\n\t\t}\n\n\t\tfor (unsigned i = 0; i < 2048; i++)\n\t\t{\n\t\t\tfloat x = (float)((int)i - 1024) / 1024.0f;\n\t\t\tfloat win = 0.5f*(cosf(x*(float)PI) + 1.0f);\n\t\t\tm_fftData[i].Re = win * m_spectrum_cache[i];\n\t\t\tm_fftData[i].Im = 0.0f;\n\t\t}\n\n\t\tfft(m_fftData, 11);\n\n\t\tfor (unsigned i = 0; i < 100; i++)\n\t\t{\n\t\t\tfloat fstart = powf(2.0f, (float)i*0.1f);\n\t\t\tfloat fstop = powf(2.0f, (float)(i + 1)*0.1f);\n\n\t\t\tunsigned ustart = (unsigned)ceilf(fstart);\n\t\t\tunsigned ustop = (unsigned)ceilf(fstop);\n\n\t\t\tfloat ave = 0.0f;\n\t\t\tif (ustart == ustop)\n\t\t\t\tave = DCAbs(&m_fftData[ustart]);\n\t\t\telse\n\t\t\t{\n\t\t\t\tfor (unsigned j = ustart; j < ustop; j++)\n\t\t\t\t{\n\t\t\t\t\tave += DCAbs(&m_fftData[j]);\n\t\t\t\t}\n\t\t\t\tave /= (float)(ustop - ustart);\n\t\t\t}\n\n\t\t\tm_barv[i] = logf(ave*10.0f) / 10.0f;\n\n\t\t}\n\n\t\tglBegin(GL_QUADS);\n\n\t\tfor (unsigned i = 0; i < 100.0f; i++)\n\t\t{\n\t\t\tfloat center = ((float)i + 0.5f) / 100.0f;\n\t\t\tfloat halfWidth = 0.4f / 100.0f;\n\t\t\tfloat left = center - halfWidth;\n\t\t\tfloat right = center + halfWidth;\n\n\t\t\tleft = left * 2.0f - 1.0f;\n\t\t\tright = right * 2.0f - 1.0f;\n\n\t\t\tfloat bottom = -1.0f;\n\n\t\t\tfloat v = m_barv[i];\n\t\t\tif (v > 1.0f) v = 1.0f;\n\t\t\tfloat top = v * 2.0f - 1.0f;\n\n\t\t\tglColor3f(0.5f, 1.0f, 0.0f);\n\t\t\tglVertex2f(right, bottom);\n\t\t\tglVertex2f(left, bottom);\n\n\t\t\tglColor3f(0.5f + 0.5f*v, 1.0f - v, 0.0f);\n\t\t\tglVertex2f(left, top);\n\t\t\tglVertex2f(right, top);\n\t\t}\n\t\tglEnd();\n\n\t}\n\tbreak;\n\t}\n\n}\n\nvoid PCMPlayer::key_callback(GLFWwindow* window, int key, int scancode, int action, int mods)\n{\n\tPCMPlayer* self = (PCMPlayer*)glfwGetWindowUserPointer(window);\n\tif (key == GLFW_KEY_W && action == GLFW_PRESS)\n\t{\n\t\tself->m_mode = Mode::WaveForm;\n\t}\n\n\tif (key == GLFW_KEY_S && action == GLFW_PRESS)\n\t{\n\t\tself->m_mode = Mode::Spectrum;\n\t}\n\n}\n\nvoid PCMPlayer::main_loop()\n{\n\tif (m_window == nullptr) return;\n\twhile (glfwWindowShouldClose(m_window) == 0)\n\t{\n\t\tglfwMakeContextCurrent(m_window);\n\t\tdraw();\n\t\tglfwSwapBuffers(m_window);\n\t\tglfwPollEvents();\n\t}\n}\n"
  },
  {
    "path": "PCMPlayer/PCMPlayer.h",
    "content": "#pragma once\n\n#include <memory>\n#include <mutex>\n#include \"fft.h\"\n\nnamespace std\n{\n\tclass thread;\n}\n\n#define AUDIO_BUF_LEN 512\nstruct AudioBuffer\n{\n\tshort data[AUDIO_BUF_LEN * 2];\n};\n\nclass TrackBuffer;\nclass TrackBufferQueue;\nclass AudioBufferQueue;\n\nstruct PaStreamCallbackTimeInfo;\n\nstruct GLFWwindow;\n\n\nclass PCMPlayer\n{\npublic:\n\tPCMPlayer(double sample_rate = 44100.0, bool ui = false);\n\t~PCMPlayer();\n\n\tvoid PlayTrack(TrackBuffer &track);\n\tfloat GetRemainingTime();\n\n\t// UI\n\tvoid main_loop();\n\nprivate:\n\tstatic thread_local int s_instance_count;\t\n\tvoid *m_stream;\n\tstatic int stream_callback(const void *inputBuffer, void *outputBuffer,\n\t\tunsigned long framesPerBuffer,\n\t\tconst PaStreamCallbackTimeInfo* timeInfo,\n\t\tunsigned long statusFlags,\n\t\tvoid *userData);\n\n\tdouble m_sample_rate;\n\tstd::unique_ptr<TrackBufferQueue> m_input_queue;\n\tstd::unique_ptr<AudioBufferQueue> m_audio_queue;\n\tsize_t m_input_read_pos = 0;\n\tsize_t m_audio_read_pos = 0;\n\tsize_t m_total_length = 0;\n\n\tstd::mutex m_mutex_progress;\n\n\tbool m_demuxing = false;\n\tstatic void thread_demux(PCMPlayer* self);\n\tstd::unique_ptr<std::thread> m_thread_demux;\n\n\t// UI\n\tGLFWwindow* m_window = nullptr;\n\tvoid draw();\n\tstatic void key_callback(GLFWwindow* window, int key, int scancode, int action, int mods);\n\n\tenum class Mode\n\t{\n\t\tSpectrum,\n\t\tWaveForm\n\t};\n\n\tMode m_mode = Mode::WaveForm;\n\n\tint m_next_buf = 0;\n\tAudioBuffer m_ring_buf[12];\n\tfloat m_wavaform_cache[AUDIO_BUF_LEN * 2];\n\tfloat m_spectrum_cache[AUDIO_BUF_LEN * 4];\n\tDComp m_fftData[2048];\n\tfloat m_barv[100];\n\n};"
  },
  {
    "path": "PCMPlayer/api.cpp",
    "content": "#if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__)\n#define SCOREDRAFT_API __declspec(dllexport)\n#else\n#define SCOREDRAFT_API \n#endif\n\n\nextern \"C\"\n{\n\tSCOREDRAFT_API void* PCMPlayerCreate(double sample_rate, unsigned ui);\n\tSCOREDRAFT_API void PCMPlayerDestroy(void* ptr);\n\tSCOREDRAFT_API void PlayTrack(void* ptr, void* ptr_track);\n\tSCOREDRAFT_API float GetRemainingTime(void* ptr);\n\tSCOREDRAFT_API void MainLoop(void* ptr);\n}\n\n#include \"PCMPlayer.h\"\n\nvoid* PCMPlayerCreate(double sample_rate, unsigned ui)\n{\n\treturn new PCMPlayer(sample_rate, ui!=0);\n}\n\nvoid PCMPlayerDestroy(void* ptr)\n{\n\tPCMPlayer* player = (PCMPlayer*)ptr;\n\tdelete player;\n}\n\nvoid PlayTrack(void* ptr, void* ptr_track)\n{\n\tPCMPlayer* player = (PCMPlayer*)ptr;\n\tTrackBuffer* track = (TrackBuffer*)ptr_track;\n\tplayer->PlayTrack(*track);\n}\n\nfloat GetRemainingTime(void* ptr)\n{\n\tPCMPlayer* player = (PCMPlayer*)ptr;\n\treturn player->GetRemainingTime();\n}\n\nvoid MainLoop(void* ptr)\n{\n\tPCMPlayer* player = (PCMPlayer*)ptr;\n\tplayer->main_loop();\n}\n"
  },
  {
    "path": "README.md",
    "content": "[-> 中文Readme](README_cn.md)\n\n# ScoreDraft\n\nScoreDraft is a music/singing synthesizer that provides a Python based \nscore authoring interface. \n\nCurrently, it includes the following synthesizer engines:\n\n* Instrumental\n  - SimpleInstruments: simple mathematic functions like sine-waves\n  - KarplusStrong: guitar simulator using pure algorithm\n  - BasicSamplers: tones generated by sampling one or multiple waveform samples\n  - SoundFont2\n* Percussion\n  - BasicSamplers\n  - SoundFont2 (GM Drums)\n* Voice\n  - VoiceSampler: a PSOLA-like algorithm is used to sample voice samples. A front-end \"UtauDraft\" is provided making it compatible to existing UTAU voice banks.\n\nThe framework is open and can be easily extended.\n\nA PCM Player is provided to playback and visualize generated waveforms.\n\nA more sophisticated visualizer \"Meteor\" is provided to visualize the notes/beats/syllables where the music is generated from.\n\nThe following example shows how easily a piece of musical sound can be generated using ScoreDraft.\n\n```Python\n    import ScoreDraft\n    from ScoreDraft.Notes import *\n\n    doc=ScoreDraft.Document()\n\n    seq=[do(),do(),so(),so(),la(),la(),so(5,96)]\n\n    doc.playNoteSeq(seq, ScoreDraft.Piano())\n    doc.mixDown('twinkle.wav')\n```\n\nStarting from version 1.0.3, ScoreDraft now supports a YAML based input format, which looks like:\n\n```yaml\n# test.yaml\nscore:\n    staffs:\n        -\n            relative: c''\n            instrument: Piano()\n            content: |\n                c4 c g g a a g2\n```\n\nwhere in the 'content' part, LilyPond syntax can be used to input notes. The following shell command can be used to generate a wav:\n\n```\n# scoredraft -wav twinkle.wav test.yaml\n```\nFor GUI editor, see [ScoreDraftEditor](https://github.com/fynv/ScoreDraftEditor)\n\nFor more detailed introduction and demos see: [https://fynv.github.io/ScoreDraft/](https://fynv.github.io/ScoreDraft/)\n\n## Installation\n\nScoreDraft is now available from PyPi. Windows x64/Linux x64 supported.\n\n```\n# pip install scoredraft\n```\n\nKnown issue: For Linux, it is only tested on Ubuntu 20.04. It is known to be not working on Ubuntu 18.04.\n\n## Building\n\nBuild-time dependencies:\n\n* CMake 3.0+\n\n* Python3\n\n* CUDA(optional): To build without CUDA, disable the CMake option \"USE_CUDA\"\n\n* FreeType: \n  \n  - Library included for Windows\n  - Ubuntu: sudo apt install libfreetype-dev\n\n* GLFW: \n  \n  - Source code included\n  - Ubuntu: sudo apt install libglfw3-dev libxinerama-dev libxcursor-dev libxi-dev\n\n* PortAudio:\n  \n  - Source code included\n  - Ubuntu: sudo apt-get install libasound-dev libjack-dev\n\nBuild process:\n\n```\n# mkdir build\n# cd build\n# cmake .. -DCMAKE_INSTALL_PREFIX=../Test\n# make\n# make install\n```\n\nRun-time dependencies:\n\n* Python3 \n* cffi\n* X-org, ALSA drivers are optionally needed for players\n* xsdata, python_ly are optionally needed for MusicXML and LilyPond support\n* pyyaml is optionally needed for YAML support\n\n## Samples & Voice Banks\n\nTo avoid causing troubles, ScoreDraft now only includes a minimal set of instrumental/percussion samples to support the tests. The PyPi package doesn't include any of these.\n\nScoreDraft indexes the samples and banks by searching specific directory where the python script is started.\n\n* Directory InstrumentSamples: wav instrument samples\n  \n  - There can be sub-directories containing multiple wav samples defining a single instrument for different pitch ranges.\n  - Optionally, a freq file can be provided to define the frequency of the sample tone.\n\n* Directory PercussionSamples: wav percussion samples\n\n* Directory SF2: SoundFont2 bank files\n\n* Directory UTAUVoice: UTAU voice banks (as sub-directories)\n\nUsers need to help themselves to download and organize extra samples and voicebanks. Here are just some recommandations, which is what I do at my place.\n\n* Instrument/Percussion wav samples:\n  \n  - https://freewavesamples.com\n\n* SoundFont2 Instruments\n  \n  - Arachno: http://www.arachnosoft.com/main/download.php?id=soundfont-sf2\n  - SynthFontViena: http://www.synthfont.com/\n\n* UTAU\n  \n  - uta(Japanese): default voice-bank that comes with UTAU\n  - TetoEng(English): https://kasaneteto.jp/en/voicebank.html\n  - Ayaka(Chinese): https://bowlroll.net/file/53297\n  - Ayaka2 (Japanese): https://bowlroll.net/file/69898\n  - WanEr(Chinese): http://lindayana.lofter.com/waner\n\n## License\n\nScoreDraft is now formally available under [MIT license](https://choosealicense.com/licenses/mit/).\n\n## Version History\n\nScoreDraft was my first Python project. There were some severe limitations for pythonic packaging and releasing.\nAs a result, there was no formal release before the Nov 2021 refactoring (version 1.0.0).\n\n[SingingGadgets](https://pypi.org/project/singinggadgets/) was a refactoring attempt in 2018, \nwhich only partially solves the issues. \n\nAfter the Nov 2021 refactoring, ScoreDraft have all the benefits of both SingingGadgets and the old ScoreDraft.\nTherefore, the SingingGadgets project is now closed.\n\n* Dec 17, 2021. ScoreDraft 1.0.11, fix slur handling\n* Dec 12, 2021. ScoreDraft 1.0.10, support track volume for YAML input\n* Dec 12, 2021. ScoreDraft 1.0.8 & 1.0.9, bug fix\n* Dec 04, 2021. ScoreDraft 1.0.7, percussion visualization bug fix\n* Dec 01, 2021. ScoreDraft 1.0.6, expose more low-level functions\n* Nov 29, 2021. ScoreDraft 1.0.4, 1.0.5, YAML function updates\n* Nov 27, 2021. ScoreDraft 1.0.3, adding a YAML based input routine support\n* Nov 24, 2021. ScoreDraft 1.0.2, adding MusicXML & LilyPond support\n* Nov 19, 2021. ScoreDraft 1.0.0 & 1.0.1\n* Jun 16, 2018. SingingGadgets 0.0.3\n"
  },
  {
    "path": "README_cn.md",
    "content": "# ScoreDraft\n\nScoreDraft 是一个音乐和歌唱合成系统，它提供了基于Python的乐谱创作（或录入）界面。\n\n目前，它集成了下列几种合成引擎：\n\n* 乐器合成\n  - SimpleInstruments: 基于简单数学函数，如正弦波\n  - KarplusStrong: 基于纯算法的吉他模拟器\n  - BasicSamplers: 由单个或多个波形文件采样生成音符\n  - SoundFont2\n* 打击乐合成\n  - BasicSamples\n  - SoundFont2 (GM 鼓轨)\n* 语音合成\n  - VoiceSampler: 采用类PSOLA的算法采样语音样本，提供了名为UtauDraft的前端来兼容UTAU音源\n\n系统框架是开放的，极易扩展。\n\nPCMPlayer 提供了一个简单的音频播放和可视化工具。\n\nMeteor 提供了更高级的可视化功能，可以可视化用来生成音乐的音符和音节输入。\n\n下面这个例子展示了通过ScoreDraft来合成一小段音乐可以多么简单。\n\n```Python\n    import ScoreDraft\n    from ScoreDraft.Notes import *\n\n    doc=ScoreDraft.Document()\n\n    seq=[do(),do(),so(),so(),la(),la(),so(5,96)]\n\n    doc.playNoteSeq(seq, ScoreDraft.Piano())\n    doc.mixDown('twinkle.wav')\n```\n\n从版本 1.0.3 开始，ScoreDraft 支持一种基于 YAML 的输入格式，例如：\n\n```yaml\n# test.yaml\nscore:\n    staffs:\n        -\n            relative: c''\n            instrument: Piano()\n            content: |\n                c4 c g g a a g2\n```\n\n其中 content 部分使用 LilyPond 的语法。可以使用以下命令把 YAML 文件合成为wav:\n\n```\n# scoredraft -wav twinkle.wav test.yaml\n```\n\n另有图形界面的编辑器， 详见：[ScoreDraftEditor](https://github.com/fynv/ScoreDraftEditor)\n\n更详细的使用说明和演示见: [https://fynv.github.io/ScoreDraft/](https://fynv.github.io/ScoreDraft/)\n\n## 安装\n\nScoreDraft 现在可以由 PyPi 安装，支持64位的 Windows 和 Linux 系统。\n\n```\n# pip install scoredraft\n```\n\n已知问题：Linux方面只在Ubuntu20.04测试通过，已知在Ubuntu18.04上有问题。\n\n## 编译\n\n编译期依赖：\n\n* CMake 3.0+\n\n* Python3\n\n* CUDA(可选): 如果没有CUDA可以去掉 CMake 的 \"USE_CUDA\" 选项\n\n* FreeType: \n  \n  - 已包含Windows开发库\n  - Ubuntu: sudo apt install libfreetype-dev\n\n* GLFW: \n  \n  - 已包含源代码\n  - Ubuntu: sudo apt install libglfw3-dev libxinerama-dev libxcursor-dev libxi-dev\n\n* PortAudio:\n  \n  - 已包含源代码\n  - Ubuntu: sudo apt-get install libasound-dev libjack-dev\n\n编译过程：\n\n```\n# mkdir build\n# cd build\n# cmake .. -DCMAKE_INSTALL_PREFIX=../Test\n# make\n# make install\n```\n\n运行期依赖：\n\n* Python3 \n* cffi\n* 播放器依赖于X.org和ALSA驱动\n* MusicXML 和 LilyPond 支持依赖于 xsdata, python_ly\n* YAML 支持依赖于 pyyaml\n\n## 采样和语音音源\n\n为了避免麻烦，ScoreDraft 目前只包含最低限度的乐器和打击乐采样用来测试。PyPi安装的版本则不提供任何这些文件。\n\nScoreDraft 基于 Python 脚本的启动位置来搜索特定目录，以此建立乐器样本和语音音源的索引。\n\n* InstrumentSamples 目录：wav 乐器样本\n  \n  - 可以包含子目录，每个子目录包含多个wav文件，共同来定义一个乐器的不同音高范围。\n  - 对每个wav文件，可以有一个对应的freq文件来定义采样的音高\n\n* PercussionSamples 目录：wav 打击乐样本\n\n* SF2 目录：SoundFont2 乐器库文件\n\n* UTAUVoice：UTAU 语音音源库，每个库一个子目录\n\n用户需要自行下载和布署这些音源。以下推荐几个作者自己在用的音源。\n\n* wav 乐器采样：\n  \n  - https://freewavesamples.com\n\n* SoundFont2 乐器库\n  \n  - Arachno: http://www.arachnosoft.com/main/download.php?id=soundfont-sf2\n  - SynthFontViena: http://www.synthfont.com/\n  - \n\n* UTAU\n  \n  - uta(Japanese): default voice-bank that comes with UTAU\n  - TetoEng(English): https://kasaneteto.jp/en/voicebank.html\n  - Ayaka(Chinese): https://bowlroll.net/file/53297\n  - Ayaka2 (Japanese): https://bowlroll.net/file/69898\n  - WanEr(Chinese): http://lindayana.lofter.com/waner\n\n## 版权协议\n\nScoreDraft 目前已正式基于MIT协议授权。\n\n## 版本历史\n\nScoreDraft 实际上是我的第一个Python项目，由于一些设计问题，长期以来ScoreDraft无法用常规的Python流程来打包和发布。\n直到2021年11月的这次重构，ScoreDraft才有了第一个正式版本。\n\n在2018年曾经做过一次重构尝试，叫做[SingingGadgets](https://pypi.org/project/singinggadgets/)，只部分解决了问题。\n\n在2021年11月的重构之后，ScoreDraft已经具有SingingGadgets和早期ScoreDraft的全部优点，因此SingingGadgets项目现已被关闭。\n\n* 2021年12月17日. ScoreDraft 1.0.11 修正连音线处理\n* 2021年12月12日. ScoreDraft 1.0.10 YAML输入支持音轨volume\n* 2021年12月12日. ScoreDraft 1.0.8 & 1.0.9 修正bug\n* 2021年12月04日. ScoreDraft 1.0.7 修正打击乐可视化bug\n* 2021年12月01日. ScoreDraft 1.0.6 暴露更多底层函数\n* 2021年11月29日. ScoreDraft 1.0.4, 1.0.5 更新YAML功能\n* 2021年11月27日. ScoreDraft 1.0.3 增加了一个基于YAML的乐谱输入方案\n* 2021年11月24日, ScoreDraft 1.0.2 加入对MusicXML和LilyPond的支持\n* 2021年11月19日. ScoreDraft 1.0.0 & 1.0.1\n* 2018年06月16日. SingingGadgets 0.0.3\n"
  },
  {
    "path": "ScoreDraftCore/CMakeLists.txt",
    "content": "cmake_minimum_required (VERSION 3.0)\n\nproject(ScoreDraftCore)\n\nset(SOURCES\napi.cpp\nTrackBuffer.cpp\nReadWav.cpp\nWriteWav.cpp\n)\n\nset(HEADERS \napi.h\nutils.h\nWavBuffer.h\nTrackBuffer.h\nReadWav.h\nWriteWav.h\n)\n\nif (WIN32) \nset (DEFINES  ${DEFINES}\n-D\"_CRT_SECURE_NO_DEPRECATE\"  \n-D\"_SCL_SECURE_NO_DEPRECATE\" \n)\nelse()\nadd_definitions(-std=c++0x)\nadd_compile_options(-fPIC)\nendif()\n\nadd_definitions(${DEFINES})\nadd_library (ScoreDraftCore SHARED ${SOURCES} ${HEADERS})\n\nif (WIN32) \ntarget_compile_definitions(ScoreDraftCore PRIVATE SCOREDRAFTCORE_DLL_EXPORT)\nendif()\n\nif (WIN32) \ninstall(TARGETS ScoreDraftCore RUNTIME DESTINATION ScoreDraft)\nelse()\ninstall(TARGETS ScoreDraftCore DESTINATION ScoreDraft)\nendif()\n\n"
  },
  {
    "path": "ScoreDraftCore/ReadWav.cpp",
    "content": "#include \"ReadWav.h\"\n#include <cmath>\n\n#ifndef max\n#define max(a,b)            (((a) > (b)) ? (a) : (b))\n#endif\n\n#ifndef min\n#define min(a,b)            (((a) < (b)) ? (a) : (b))\n#endif\n\nstruct WavHeader\n{\n\tunsigned short wFormatTag;\n\tunsigned short wChannels;\n\tunsigned int dwSamplesPerSec;\n\tunsigned int dwAvgBytesPerSec;\n\tunsigned short wBlockAlign;\n\tunsigned short wBitsPerSample;\n};\n\n\nReadWav::ReadWav()\n{\n\tm_fp = nullptr;\n}\n\nReadWav::~ReadWav()\n{\n\tif (m_fp) fclose(m_fp);\n}\n\nbool ReadWav::OpenFile(const char* filename)\n{\n\tif (m_fp) fclose(m_fp);\n\tm_fp = fopen(filename, \"rb\");\n\treturn (m_fp != nullptr);\n}\n\nvoid ReadWav::CloseFile()\n{\n\tif (m_fp) fclose(m_fp);\n\tm_fp = nullptr;\n}\n\n\nbool ReadWav::ReadHeader(unsigned& sampleRate, unsigned& numSamples, unsigned& chn)\n{\n\tif (!m_fp) return false;\n\n\tchar c_riff[4] = { 'R', 'I', 'F', 'F' };\n\tunsigned& u_riff = *(unsigned*)c_riff;\n\n\tchar c_wave[4] = { 'W', 'A', 'V', 'E' };\n\tunsigned& u_wave = *(unsigned*)c_wave;\n\n\tchar c_fmt[4] = { 'f', 'm', 't', ' ' };\n\tunsigned& u_fmt = *(unsigned*)c_fmt;\n\n\tchar c_data[4] = { 'd', 'a', 't', 'a' };\n\tunsigned& u_data = *(unsigned*)c_data;\n\n\tunsigned buf32;\n\n\tfread(&buf32, 4, 1, m_fp);\n\tif (buf32 != u_riff)\n\t{\n\t\tfclose(m_fp);\n\t\treturn false;\n\t}\n\n\tunsigned chunkSize;\n\tfread(&chunkSize, 4, 1, m_fp);\n\n\tfread(&buf32, 4, 1, m_fp);\n\tif (buf32 != u_wave)\n\t{\n\t\tfclose(m_fp);\n\t\treturn false;\n\t}\n\n\tfread(&buf32, 4, 1, m_fp);\n\tif (buf32 != u_fmt)\n\t{\n\t\tfclose(m_fp);\n\t\treturn false;\n\t}\n\n\tunsigned headerSize;\n\tunsigned skipSize = 0;\n\tunsigned skipBuffer;\n\n\tfread(&headerSize, 4, 1, m_fp);\n\tif (headerSize < sizeof(WavHeader))\n\t{\n\t\tfclose(m_fp);\n\t\treturn false;\n\t}\n\telse if (headerSize > sizeof(WavHeader))\n\t{\n\t\tif (headerSize - sizeof(WavHeader) > 4)\n\t\t{\n\t\t\tfclose(m_fp);\n\t\t\treturn false;\n\t\t}\n\t\tskipSize = headerSize - sizeof(WavHeader);\n\t}\n\n\tWavHeader header;\n\tfread(&header, sizeof(WavHeader), 1, m_fp);\n\n\tif (skipSize > 0)\n\t{\n\t\tfread(&skipBuffer, 1, skipSize, m_fp);\n\t}\n\n\tif (header.wFormatTag != 1)\n\t{\n\t\tfclose(m_fp);\n\t\treturn false;\n\t}\n\n\tchn = header.wChannels;\n\tif (chn<1 || chn>2)\n\t{\n\t\tfclose(m_fp);\n\t\treturn false;\n\t}\n\n\tsampleRate = header.dwSamplesPerSec;\n\n\tif (header.wBitsPerSample != 16)\n\t{\n\t\tfclose(m_fp);\n\t\treturn false;\n\t}\n\n\tfread(&buf32, 4, 1, m_fp);\n\tif (buf32 != u_data)\n\t{\n\t\tfclose(m_fp);\n\t\treturn false;\n\t}\n\n\tunsigned dataSize;\n\tfread(&dataSize, 4, 1, m_fp);\n\n\tnumSamples = dataSize / chn / 2;\n\n\tm_totalSamples = numSamples;\n\tm_num_channels = chn;\n\tm_readSamples = 0;\n\n\treturn true;\n}\n\n\nbool ReadWav::ReadSamples(float* samples, unsigned count, float& max_v)\n{\n\tif (!m_fp) return false;\n\tcount = min(count, m_totalSamples - m_readSamples);\n\n\tif (count > 0)\n\t{\n\t\tshort* data = new short[count*m_num_channels];\n\t\tfread(data, sizeof(short), count*m_num_channels, m_fp);\n\n\t\tmax_v = 0.0f;\n\t\tfor (unsigned i = 0; i < count*m_num_channels; i++)\n\t\t{\t\n\t\t\tfloat v = (float)data[i] / 32767.0f;\n\t\t\tsamples[i] = v;\n\t\t\tmax_v = max(max_v, fabsf(v));\n\t\t}\n\t\tdelete[] data;\n\n\t\tm_readSamples += count;\n\t}\n\n\tif (m_totalSamples - m_readSamples <= 0) CloseFile();\n\n\treturn true;\n}\n"
  },
  {
    "path": "ScoreDraftCore/ReadWav.h",
    "content": "#ifndef _ReadWav_h\n#define _ReadWav_h\n\n#include <stdio.h>\nclass ReadWav\n{\npublic:\n\tReadWav();\n\t~ReadWav();\n\n\tbool OpenFile(const char* filename);\n\tvoid CloseFile();\n\n\tbool ReadHeader(unsigned &sampleRate, unsigned &numSamples, unsigned& chn);\n\tbool ReadSamples(float* samples, unsigned count, float& maxv);\n\nprivate:\n\tFILE* m_fp;\n\tunsigned m_totalSamples;\n\tunsigned m_num_channels;\n\tunsigned m_readSamples;\n};\n\n#endif\n"
  },
  {
    "path": "ScoreDraftCore/TrackBuffer.cpp",
    "content": "#include <memory.h>\n#include <cmath>\n#include <cassert>\n#include \"TrackBuffer.h\"\n#include \"utils.h\"\n\nstatic const unsigned s_localBufferSize = 65536;\nunsigned TrackBuffer::GetLocalBufferSize()\n{\n\treturn s_localBufferSize;\n}\n\n\nTrackBuffer::TrackBuffer(unsigned rate, unsigned chn) : m_rate(rate)\n{\n\tif (chn < 1)\n\t{\n\t\tchn = 1;\n\t}\n\telse if (chn > 2)\n\t{\n\t\tchn = 2;\n\t}\n\tm_chn = chn;\n\n\tm_fp = tmpfile();\n\n\tm_localBuffer = new float[s_localBufferSize*m_chn];\n\tm_localBufferPos = (unsigned)(-1);\n\n\tm_volume = 1.0f;\n\tm_pan = 0.0f;\n\tm_cursor = 0.0f;\n\tm_length = 0;\n\tm_alignPos = (unsigned)(-1);\n}\n\nTrackBuffer::~TrackBuffer()\n{\n\tdelete m_localBuffer;\n\tfclose(m_fp);\n}\n\n\nvoid TrackBuffer::_seek(unsigned upos)\n{\n\tif (upos <= m_length)\n\t{\n\t\tfseek(m_fp, (long)(sizeof(float)*upos*m_chn), SEEK_SET);\n\t}\n\telse\n\t{\n\t\tfseek(m_fp, 0, SEEK_END);\n\t\tfloat *tmp = new float[(upos - m_length)*m_chn];\n\t\tmemset(tmp, 0, (upos - m_length)*m_chn * sizeof(float));\n\t\tfwrite(tmp, sizeof(float), (upos - m_length)*m_chn, m_fp);\n\t\tdelete[] tmp;\n\t\tm_length = upos;\n\t}\n}\n\n\nfloat TrackBuffer::GetCursor()\n{\n\treturn m_cursor;\n}\n\nvoid TrackBuffer::SetCursor(float fpos)\n{\n\tif (m_alignPos == (unsigned)(-1)) m_alignPos = 0;\n\tm_cursor = fpos;\n\tif (m_cursor < 0.0f) m_cursor = 0.0f;\n}\n\nvoid TrackBuffer::MoveCursor(float delta)\n{\n\tSetCursor(m_cursor + delta);\n}\n\n\nvoid TrackBuffer::SeekToCursor()\n{\n\tunsigned upos = (unsigned)_ms2sample(m_cursor);\n\t_seek(upos);\n}\n\n\nvoid TrackBuffer::_writeSamples(unsigned count, const float* samples, unsigned alignPos)\n{\n\tunsigned upos = (unsigned)_ms2sample(m_cursor) + m_alignPos - alignPos;\n\t_seek(upos);\n\tfwrite(samples, sizeof(float), count*m_chn, m_fp);\n\tm_length = max(m_length, upos + count);\n\tm_localBufferPos = -1;\n}\n\nvoid TrackBuffer::WriteBlend(const WavBuffer& wavBuf)\n{\n\tassert(wavBuf.m_sampleRate == m_rate);\n\tunsigned count = (unsigned)wavBuf.m_sampleNum;\n\tunsigned src_chn = wavBuf.m_channelNum;\n\n\tfloat* samples = wavBuf.m_data;\n\tunsigned note_alignPos = wavBuf.m_alignPos;\n\tfloat volume = wavBuf.m_volume;\n\n\tif (m_alignPos == (unsigned)(-1))\n\t{\n\t\tm_alignPos = note_alignPos;\n\t}\n\tif ((unsigned)_ms2sample(m_cursor) + m_alignPos < note_alignPos)\n\t{\n\t\tunsigned truncate = note_alignPos - (unsigned)_ms2sample(m_cursor) + m_alignPos;\n\t\tcount -= truncate;\n\t\tsamples += truncate * src_chn;\n\t\tnote_alignPos -= truncate;\n\t}\n\tunsigned upos = (unsigned)_ms2sample(m_cursor) + m_alignPos - note_alignPos;\n\n\tfloat *tmpSamples = new float[count*m_chn];\n\tfor (unsigned i = 0; i < count; i++)\n\t{\n\t\tfloat sample_l;\n\t\tfloat sample_r;\n\n\t\tif (src_chn == 1)\n\t\t{\n\t\t\tsample_l = sample_r = samples[i];\n\t\t}\n\t\telse if (src_chn == 2)\n\t\t{\n\t\t\tsample_l = samples[i * 2];\n\t\t\tsample_r = samples[i * 2 + 1];\n\t\t}\n\n\t\tif (m_chn == 1)\n\t\t{\n\t\t\ttmpSamples[i] = (sample_l + sample_r)*0.5f * volume;\n\t\t}\n\t\telse if (m_chn == 2)\n\t\t{\n\t\t\tCalcPan(wavBuf.m_pan, sample_l, sample_r);\n\t\t\ttmpSamples[i * 2] = sample_l * volume;\n\t\t\ttmpSamples[i * 2 + 1] = sample_r * volume;\n\t\t}\n\n\t}\n\n\tif (upos < m_length)\n\t{\n\t\tunsigned sec = min(count, m_length - upos);\n\t\tfloat* secbuf = new float[sec * m_chn];\n\t\t_seek(upos);\n\t\tfread(secbuf, sizeof(float), sec*m_chn, m_fp);\n\n\t\tfor (unsigned i = 0; i < sec*m_chn; i++)\n\t\t\ttmpSamples[i] += secbuf[i];\n\n\t\tdelete[] secbuf;\n\t}\n\n\t_writeSamples(count, tmpSamples, note_alignPos);\n\n\tdelete[] tmpSamples;\n}\n\nvoid TrackBuffer::Sample(unsigned index, float* sample)\n{\n\tif (index >= m_length)\n\t{\n\t\tfor (unsigned c = 0; c < m_chn; c++)\n\t\t\tsample[c] = 0.0f;\n\t}\n\tif (m_localBufferPos == (unsigned)(-1) || m_localBufferPos > index || m_localBufferPos + s_localBufferSize <= index)\n\t{\n\t\tm_localBufferPos = (index / s_localBufferSize)*s_localBufferSize;\n\t\tmemset(m_localBuffer, 0, sizeof(float)*s_localBufferSize*m_chn);\n\n\t\tif (m_localBufferPos < m_length)\n\t\t{\n\t\t\tfseek(m_fp, m_localBufferPos * sizeof(float)*m_chn, SEEK_SET);\n\t\t\tfread(m_localBuffer, sizeof(float), min(s_localBufferSize, m_length - m_localBufferPos)*m_chn, m_fp);\n\t\t}\n\t}\n\n\tunsigned readPos = index - m_localBufferPos;\n\tfor (unsigned c = 0; c < m_chn; c++)\n\t\tsample[c] = m_localBuffer[readPos * m_chn + c];\n}\n\n\nfloat TrackBuffer::MaxValue()\n{\n\tunsigned i;\n\tfloat buf[2];\n\tSample(0, buf);\n\n\tfloat maxValue;\n\tif (m_chn == 1)\n\t\tmaxValue = fabsf(buf[0]);\n\telse if (m_chn == 2)\n\t\tmaxValue = max(fabsf(buf[0]), fabsf(buf[1]));\n\n\tfor (i = 1; i < m_length; i++)\n\t{\n\t\tSample(i, buf);\n\t\tfloat _max;\n\t\tif (m_chn == 1)\n\t\t\t_max = fabsf(buf[0]);\n\t\telse if (m_chn == 2)\n\t\t\t_max = max(fabsf(buf[0]), fabsf(buf[1]));\n\n\t\tmaxValue = max(maxValue, _max);\n\t}\n\n\treturn maxValue;\n}\n\n\nvoid TrackBuffer::GetSamples(unsigned startIndex, unsigned length, float* buffer)\n{\n\twhile (length > 0)\n\t{\n\t\tif (startIndex >= m_length) break;\n\t\tif (m_localBufferPos == (unsigned)(-1) || m_localBufferPos > startIndex || m_localBufferPos + s_localBufferSize <= startIndex)\n\t\t{\n\t\t\tm_localBufferPos = (startIndex / s_localBufferSize)*s_localBufferSize;\n\t\t\tmemset(m_localBuffer, 0, sizeof(float)*s_localBufferSize*m_chn);\n\n\t\t\tif (m_localBufferPos < m_length)\n\t\t\t{\n\t\t\t\tfseek(m_fp, m_localBufferPos * sizeof(float)*m_chn, SEEK_SET);\n\t\t\t\tfread(m_localBuffer, sizeof(float), min(s_localBufferSize, m_length - m_localBufferPos)*m_chn, m_fp);\n\t\t\t}\n\t\t}\n\n\t\tunsigned readLength = min(length, m_localBufferPos + s_localBufferSize - startIndex);\n\t\tmemcpy(buffer, m_localBuffer + (startIndex - m_localBufferPos)*m_chn, sizeof(float)* readLength*m_chn);\n\t\tstartIndex += readLength;\n\t\tlength -= readLength;\n\t\tbuffer += readLength;\n\t}\n}\n\n\nbool TrackBuffer::CombineTracks(unsigned num, TrackBuffer** tracks)\n{\n\tWavBuffer targetBuffer;\n\ttargetBuffer.Allocate(m_chn, s_localBufferSize);\n\n\tunsigned *lengths = new unsigned[num];\n\tint* sourcePos = new int[num];\n\tfloat* trackVolumes = new float[num];\n\tfloat* trackPans = new float[num];\n\n\t// scan\n\tunsigned i;\n\tfloat maxCursor = 0.0f;\n\tunsigned maxAlign = 0;\n\n\tfor (i = 0; i < num; i++)\n\t{\n\t\tif (tracks[i]->Rate() != m_rate)\n\t\t{\n\t\t\tdelete[] trackPans;\n\t\t\tdelete[] trackVolumes;\n\t\t\tdelete[] sourcePos;\n\t\t\tdelete[] lengths;\n\t\t\treturn false;\n\t\t}\n\t\tlengths[i] = tracks[i]->NumberOfSamples();\n\n\t\tfloat cursor = tracks[i]->GetCursor();\n\t\tif (cursor > maxCursor) maxCursor = cursor;\n\n\t\tunsigned align = tracks[i]->AlignPos();\n\t\tif (align != (unsigned)(-1) && align > maxAlign) maxAlign = align;\n\n\t\tsourcePos[i] = (int)(align);\n\t\ttrackVolumes[i] = tracks[i]->AbsoluteVolume();\n\t\ttrackPans[i] = tracks[i]->Pan();\n\t}\n\n\tfor (i = 0; i < num; i++)\n\t{\n\t\tsourcePos[i] -= (int)maxAlign;\n\t}\n\n\tmaxCursor += m_cursor;\n\n\tbool finish = false;\n\n\twhile (!finish)\n\t{\n\t\tfinish = true;\n\t\tmemset(targetBuffer.m_data, 0, sizeof(float)*s_localBufferSize*m_chn);\n\t\tunsigned maxCount = 0;\n\n\t\tfor (i = 0; i < num; i++)\n\t\t{\n\t\t\tif ((int)lengths[i] > sourcePos[i])\n\t\t\t{\n\t\t\t\tint count = min(s_localBufferSize, (int)lengths[i] - sourcePos[i]);\n\t\t\t\tmaxCount = (unsigned)max(count, (int)maxCount);\n\t\t\t\tint j;\n\t\t\t\tfor (j = 0; j < count; j++)\n\t\t\t\t{\n\t\t\t\t\tif ((int)j + sourcePos[i] > 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tfloat samples[2];\n\t\t\t\t\t\ttracks[i]->Sample((unsigned)((int)j + sourcePos[i]), samples);\n\t\t\t\t\t\tfloat sample_l;\n\t\t\t\t\t\tfloat sample_r;\n\t\t\t\t\t\tif (tracks[i]->m_chn == 1)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tsample_l = sample_r = samples[0];\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (tracks[i]->m_chn == 2)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tsample_l = samples[0];\n\t\t\t\t\t\t\tsample_r = samples[1];\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (m_chn == 1)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttargetBuffer.m_data[j] += (sample_l + sample_r)*0.5f* trackVolumes[i];\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (m_chn == 2)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tCalcPan(trackPans[i], sample_l, sample_r);\n\t\t\t\t\t\t\ttargetBuffer.m_data[j * 2] += sample_l * trackVolumes[i];\n\t\t\t\t\t\t\ttargetBuffer.m_data[j * 2 + 1] += sample_r * trackVolumes[i];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tsourcePos[i] += count;\n\t\t\t\tif ((int)lengths[i] > sourcePos[i]) finish = false;\n\t\t\t}\n\t\t}\n\t\ttargetBuffer.m_sampleNum = maxCount;\n\t\ttargetBuffer.m_alignPos = maxAlign;\n\t\tWriteBlend(targetBuffer);\n\t\tMoveCursor((float)(maxCount - maxAlign) / m_rate * 1000.0f);\n\t\tmaxAlign = 0;\n\t}\n\tSetCursor(maxCursor);\n\n\tdelete[] trackPans;\n\tdelete[] trackVolumes;\n\tdelete[] sourcePos;\n\tdelete[] lengths;\n\n\treturn true;\n}\n\n"
  },
  {
    "path": "ScoreDraftCore/TrackBuffer.h",
    "content": "#pragma once \n\n#include <cstdio>\n#include <vector>\n#include \"WavBuffer.h\"\n\n\nclass SCOREDRAFTCORE_API TrackBuffer\n{\npublic:\n\tTrackBuffer(unsigned rate = 44100, unsigned chn = 1);\n\t~TrackBuffer();\n\n\tunsigned Rate() const { return m_rate; }\n\tvoid SetRate(unsigned rate) { m_rate = rate; }\n\n\tunsigned NumberOfChannels() const { return m_chn; }\n\n\tunsigned NumberOfSamples()\n\t{\n\t\treturn m_length;\n\t}\n\tunsigned AlignPos()\n\t{\n\t\treturn m_alignPos;\n\t}\n\n\tfloat Volume() const { return m_volume; }\n\tfloat AbsoluteVolume()\n\t{\n\t\tfloat maxValue = MaxValue();\n\t\treturn maxValue > 0.0f ? m_volume / maxValue : 1.0f;\n\t}\n\tvoid SetVolume(float vol) { m_volume = vol; }\n\n\tfloat Pan() const { return m_pan; }\n\tvoid SetPan(float pan) { m_pan = pan; }\n\n\tfloat GetCursor();\n\tvoid SetCursor(float fpos);\n\tvoid MoveCursor(float delta);\n\n\tvoid SeekToCursor();\n\tvoid WriteBlend(const WavBuffer& wavBuf);\n\n\tvoid Sample(unsigned index, float* sample);\n\tfloat MaxValue();\n\n\tvoid GetSamples(unsigned startIndex, unsigned length, float* buffer);\n\n\tbool CombineTracks(unsigned num, TrackBuffer** tracks);\n\n\tunsigned GetLocalBufferSize();\n\nprivate:\n\tFILE *m_fp;\n\n\tunsigned m_rate;\n\tunsigned m_chn;\n\n\tfloat m_volume;\n\tfloat m_pan;\n\n\tfloat *m_localBuffer;\n\tunsigned m_localBufferPos;\n\n\tunsigned m_length;\n\tunsigned m_alignPos;\n\n\tfloat m_cursor;\n\n\tinline float _ms2sample(float ms)\n\t{\n\t\treturn ms * 0.001f*m_rate;\n\t}\n\n\tvoid _writeSamples(unsigned count, const float* samples, unsigned alignPos);\n\tvoid _seek(unsigned upos);\n};\n\n\n"
  },
  {
    "path": "ScoreDraftCore/WavBuffer.h",
    "content": "#pragma once\n\n#include \"api.h\"\n#include <vector>\n\nclass SCOREDRAFTCORE_API WavBuffer\n{\n\tstd::vector<float> _data;\npublic:\n\tWavBuffer() : p_data(&_data)\n\t{\n\t\t\n\t}\n\tvoid Allocate(unsigned channelNum, size_t sampleNum)\n\t{\n\t\tm_channelNum = channelNum;\t\n\t\tm_sampleNum = sampleNum;\n\t\tp_data->resize(sampleNum * channelNum);\n\t\tm_data = &(*p_data)[0];\n\t}\n\n\tfloat m_sampleRate = 44100.0f;\n\tunsigned m_channelNum = 1;\n\tsize_t m_sampleNum = 0;\n\tstd::vector<float>* p_data;\n\tfloat* m_data = nullptr;\n\tunsigned m_alignPos = 0;\n\tfloat m_volume = 1.0f;\n\tfloat m_pan = 0.0f;\n\n};\n\n\n"
  },
  {
    "path": "ScoreDraftCore/WriteWav.cpp",
    "content": "#include \"WriteWav.h\"\n\n#ifndef max\n#define max(a,b)            (((a) > (b)) ? (a) : (b))\n#endif\n\n#ifndef min\n#define min(a,b)            (((a) < (b)) ? (a) : (b))\n#endif\n\nstruct WavHeader\n{\n\tunsigned short wFormatTag;\n\tunsigned short wChannels;\n\tunsigned int dwSamplesPerSec;\n\tunsigned int dwAvgBytesPerSec;\n\tunsigned short wBlockAlign;\n\tunsigned short wBitsPerSample;\n};\n\nWriteWav::WriteWav()\n{\n\tm_fp = nullptr;\n}\n\nWriteWav::~WriteWav()\n{\n\tif (m_fp) fclose(m_fp);\n}\n\nbool WriteWav::OpenFile(const char* filename)\n{\n\tif (m_fp) fclose(m_fp);\n\tm_fp = fopen(filename, \"wb\");\n\treturn m_fp != nullptr;\n}\n\nvoid WriteWav::CloseFile()\n{\n\tif (m_fp) fclose(m_fp);\n\tm_fp = nullptr;\n}\n\nvoid WriteWav::WriteHeader(unsigned sampleRate, unsigned numSamples, unsigned chn)\n{\n\tif (!m_fp) return;\n\tunsigned dataSize = numSamples * chn * sizeof(short);\n\tunsigned int adWord;\n\tWavHeader header;\n\n\tfwrite(\"RIFF\", 1, 4, m_fp);\n\tadWord = dataSize + 20 + sizeof(WavHeader);\n\tfwrite(&adWord, 4, 1, m_fp);\n\tfwrite(\"WAVEfmt \", 1, 8, m_fp);\n\tadWord = 0x00000010;\n\tfwrite(&adWord, 4, 1, m_fp);\n\n\theader.wFormatTag = 1;\n\theader.wChannels = chn;\n\theader.dwSamplesPerSec = sampleRate;\n\theader.dwAvgBytesPerSec = sampleRate *chn* sizeof(short);\n\theader.wBlockAlign = chn* sizeof(short);\n\theader.wBitsPerSample = 16;\n\n\tfwrite(&header, sizeof(WavHeader), 1, m_fp);\n\tfwrite(\"data\", 1, 4, m_fp);\n\tadWord = dataSize;\n\tfwrite(&adWord, 4, 1, m_fp);\n\n\tm_totalSamples = numSamples;\n\tm_num_channels = chn;\n\tm_writenSamples = 0;\n}\n\n\ninline void CalcPan(float pan, float& l, float& r)\n{\n\tif (pan == 0.0f) return;\n\telse if (pan < 0.0f)\n\t{\n\t\tpan = -pan;\n\t\tfloat ll = l;\n\t\tfloat rl = r*pan;\n\t\tfloat rr = r*(1.0f - pan);\n\t\tl = ll + rl;\n\t\tr = rr;\n\t}\n\telse\n\t{\n\t\tfloat ll = l*(1.0f - pan);\n\t\tfloat lr = l*pan;\n\t\tfloat rr = r;\n\t\tl = ll;\n\t\tr = lr + rr;\n\t}\n}\n\nvoid WriteWav::WriteSamples(const float* samples, unsigned count, float volume, float pan)\n{\n\tif (!m_fp) return;\n\tcount = min(count, m_totalSamples - m_writenSamples);\n\tif (count > 0)\n\t{\n\t\tshort* data = new short[count*m_num_channels];\n\n\t\tunsigned i;\n\t\tfor (i = 0; i < count; i++)\n\t\t{\n\t\t\tfloat sample[2];\n\t\t\tfor (unsigned c = 0; c < m_num_channels; c++)\n\t\t\t\tsample[c] = samples[i*m_num_channels+c];\n\t\t\tif (m_num_channels == 2)\n\t\t\t\tCalcPan(pan, sample[0], sample[1]);\n\t\t\tfor (unsigned c = 0; c < m_num_channels; c++)\n\t\t\t\tdata[i*m_num_channels + c] = (short)(max(min(sample[c] * volume, 1.0f), -1.0f)*32767.0f);\n\t\t}\n\n\t\tfwrite(data, sizeof(short), count*m_num_channels, m_fp);\n\n\t\tdelete[] data;\n\n\t\tm_writenSamples += count;\n\t}\n\tif (m_totalSamples - m_writenSamples<=0) CloseFile();\n}\n\n"
  },
  {
    "path": "ScoreDraftCore/WriteWav.h",
    "content": "#ifndef _WriteWav_h\n#define _WriteWav_h\n\n#include <stdio.h>\nclass WriteWav\n{\npublic:\n\tWriteWav();\n\t~WriteWav();\n\n\tbool OpenFile(const char* filename);\n\tvoid CloseFile();\n\n\tvoid WriteHeader(unsigned sampleRate, unsigned numSamples, unsigned chn=1);\n\tvoid WriteSamples(const float* samples, unsigned count, float volume=1.0f, float pan=0.0f);\n\nprivate:\n\tFILE* m_fp;\n\tunsigned m_totalSamples;\n\tunsigned m_num_channels;\n\tunsigned m_writenSamples;\n};\n\n#endif\n"
  },
  {
    "path": "ScoreDraftCore/api.cpp",
    "content": "#if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__)\n#define SCOREDRAFT_API __declspec(dllexport)\n#else\n#define SCOREDRAFT_API \n#endif\n\nextern \"C\"\n{\n\t// general\n\tSCOREDRAFT_API void* PtrArrayCreate(unsigned long long size, const void** ptrs);\n\tSCOREDRAFT_API void PtrArrayDestroy(void* ptr_arr);\n\n\t// F32Buf\n\tSCOREDRAFT_API void* F32BufCreate(unsigned long long size, float value);\n\tSCOREDRAFT_API void F32BufDestroy(void* ptr);\n\tSCOREDRAFT_API float* F32BufData(void* ptr);\n\tSCOREDRAFT_API int F32BufSize(void* ptr);\t\n\tSCOREDRAFT_API void F32BufToS16(void* ptr, short* dst, float amplitude);\n\tSCOREDRAFT_API void F32BufFromS16(void* ptr, const short* data, unsigned long long size);\n\tSCOREDRAFT_API float F32BufMaxValue(void* ptr);\n\tSCOREDRAFT_API void F32BufMix(void* ptr, void* ptr_lst);\n\n\t// WavBuffer\n\tSCOREDRAFT_API void* WavBufferCreate(float sampleRate, unsigned channelNum, void* ptr_data, unsigned alignPos, float volume, float pan);\n\tSCOREDRAFT_API void WavBufferDestroy(void *ptr);\n\tSCOREDRAFT_API float WavBufferGetSampleRate(void* ptr);\n\tSCOREDRAFT_API unsigned WavBufferGetChannelNum(void *ptr);\n\tSCOREDRAFT_API unsigned long long WavBufferGetSampleNum(void *ptr);\n\tSCOREDRAFT_API unsigned WavBufferGetAlignPos(void* ptr);\n\tSCOREDRAFT_API void WavBufferSetAlignPos(void* ptr, unsigned alignPos);\n\tSCOREDRAFT_API float WavBufferGetVolume(void* ptr);\n\tSCOREDRAFT_API void WavBufferSetVolume(void* ptr, float volume);\n\tSCOREDRAFT_API float WavBufferGetPan(void* ptr);\n\tSCOREDRAFT_API void WavBufferSetPan(void* ptr, float pan);\n\n\t// TrackBuffer\n\tSCOREDRAFT_API void* TrackBufferCreate(unsigned chn);\n\tSCOREDRAFT_API void TrackBufferDestroy(void* ptr);\n\tSCOREDRAFT_API void TrackBufferSetVolume(void* ptr, float volume);\n\tSCOREDRAFT_API float TrackBufferGetVolume(void* ptr);\n\tSCOREDRAFT_API void TrackBufferSetPan(void* ptr, float pan);\n\tSCOREDRAFT_API float TrackBufferGetPan(void* ptr);\n\tSCOREDRAFT_API unsigned TrackBufferGetNumberOfSamples(void* ptr);\n\tSCOREDRAFT_API unsigned TrackBufferGetAlignPos(void* ptr);\n\tSCOREDRAFT_API float TrackBufferGetCursor(void* ptr);\n\tSCOREDRAFT_API void TrackBufferSetCursor(void* ptr, float cursor);\n\tSCOREDRAFT_API void TrackBufferMoveCursor(void* ptr, float cursor_delta);\n\tSCOREDRAFT_API void MixTrackBufferList(void* ptr, void* ptr_list);\n\tSCOREDRAFT_API void WriteTrackBufferToWav(void* ptr, const char* fn);\n\tSCOREDRAFT_API void ReadTrackBufferFromWav(void* ptr, const char* fn);\n\tSCOREDRAFT_API void TrackBufferWriteBlend(void* ptr, void* ptr_wav_buf);\n\n}\n\n#include <memory.h>\n#include <math.h>\n#include \"utils.h\"\n#include \"TrackBuffer.h\"\n\n// general\nvoid* PtrArrayCreate(unsigned long long size, const void** ptrs)\n{\n\tPtrArray* ret = new PtrArray(size);\n\tmemcpy(ret->data(), ptrs, sizeof(void*)*size);\n\treturn ret;\n}\n\nvoid PtrArrayDestroy(void* ptr_arr)\n{\n\tPtrArray* arr = (PtrArray*)ptr_arr;\n\tdelete arr;\n}\n\n// F32Buf\nvoid* F32BufCreate(unsigned long long size, float value)\n{\n\treturn new F32Buf(size, value);\n}\n\nvoid F32BufDestroy(void* ptr)\n{\n\tF32Buf* buf = (F32Buf*)ptr;\n\tdelete buf;\n}\n\nfloat* F32BufData(void* ptr)\n{\n\tF32Buf* buf = (F32Buf*)ptr;\n\treturn buf->data();\n}\n\nint F32BufSize(void* ptr)\n{\n\tF32Buf* buf = (F32Buf*)ptr;\n\treturn (int)(buf->size());\n}\n\nvoid F32BufToS16(void* ptr, short* dst, float amplitude)\n{\n\tF32Buf* buf = (F32Buf*)ptr;\n\tfor (size_t i = 0; i < buf->size(); i++)\n\t\tdst[i] = (short)((*buf)[i] * 32767.0f*amplitude + 0.5f);\n}\n\nvoid F32BufFromS16(void* ptr, const short* data, unsigned long long size)\n{\n\tF32Buf* buf = (F32Buf*)ptr;\n\tbuf->resize(size);\n\tfor (size_t i = 0; i < size; i++)\n\t{\n\t\t(*buf)[i] = (float)data[i] / 32767.0f;\n\t}\t\n}\n\nfloat F32BufMaxValue(void* ptr)\n{\n\tF32Buf* buf = (F32Buf*)ptr;\n\n\tfloat maxV = 0.0f;\n\tfor (size_t i = 0; i < buf->size(); i++)\n\t{\n\t\tfloat v = fabsf((*buf)[i]);\n\t\tif (v > maxV) maxV = v;\n\t}\n\n\treturn maxV;\n}\n\nvoid F32BufMix(void* ptr, void* ptr_lst)\n{\n\tF32Buf* target_buf = (F32Buf*)ptr;\n\tPtrArray* list = (PtrArray*)ptr_lst;\n\n\tunsigned numBufs = (unsigned)list->size();\n\tsize_t maxLen = 0;\n\tfor (unsigned i = 0; i < numBufs; i++)\n\t{\n\t\tF32Buf* buf = (F32Buf*)(*list)[i];\n\t\tsize_t len = buf->size();\n\n\t\tif (maxLen < len)\n\t\t\tmaxLen = (unsigned)len;\n\t}\n\n\ttarget_buf->resize(maxLen);\t\n\tfloat* f32Out = target_buf->data();\n\tmemset(f32Out, 0, maxLen * sizeof(float));\n\n\tfor (unsigned i = 0; i < numBufs; i++)\n\t{\n\t\tF32Buf* buf = (F32Buf*)(*list)[i];\n\t\tsize_t len = buf->size();\n\t\tconst float* f32In = buf->data();\n\n\t\tfor (unsigned j = 0; j < len; j++)\n\t\t\tf32Out[j] += f32In[j];\n\t}\n}\n\n// WavBuffer\nvoid* WavBufferCreate(float sampleRate, unsigned channelNum, void* ptr_data, unsigned alignPos, float volume, float pan)\n{\n\tWavBuffer* buf = new WavBuffer;\n\tbuf->m_sampleRate = sampleRate;\n\tbuf->m_channelNum = channelNum;\n\tbuf->m_sampleNum = ((F32Buf*)ptr_data)->size() / channelNum;\n\tbuf->p_data = (F32Buf*)ptr_data;\n\tbuf->m_data = &(*buf->p_data)[0];\n\tbuf->m_alignPos = alignPos;\n\tbuf->m_volume = volume;\n\tbuf->m_pan = pan;\n\treturn buf;\n}\n\nvoid WavBufferDestroy(void *ptr)\n{\n\tdelete (WavBuffer*)ptr;\n}\n\nfloat WavBufferGetSampleRate(void* ptr)\n{\n\tWavBuffer* buf = (WavBuffer*)ptr;\n\treturn buf->m_sampleRate;\n}\n\nunsigned WavBufferGetChannelNum(void *ptr)\n{\n\tWavBuffer* buf = (WavBuffer*)ptr;\n\treturn buf->m_channelNum;\n}\n\nunsigned long long WavBufferGetSampleNum(void *ptr)\n{\n\tWavBuffer* buf = (WavBuffer*)ptr;\n\treturn buf->m_sampleNum;\n}\n\nunsigned WavBufferGetAlignPos(void* ptr)\n{\n\tWavBuffer* buf = (WavBuffer*)ptr;\n\treturn buf->m_alignPos;\n}\n\nvoid WavBufferSetAlignPos(void* ptr, unsigned alignPos)\n{\n\tWavBuffer* buf = (WavBuffer*)ptr;\n\tbuf->m_alignPos = alignPos;\n}\n\nfloat WavBufferGetVolume(void* ptr)\n{\n\tWavBuffer* buf = (WavBuffer*)ptr;\n\treturn buf->m_volume;\n}\n\nvoid WavBufferSetVolume(void* ptr, float volume)\n{\n\tWavBuffer* buf = (WavBuffer*)ptr;\n\tbuf->m_volume = volume;\n}\n\nfloat WavBufferGetPan(void* ptr)\n{\n\tWavBuffer* buf = (WavBuffer*)ptr;\n\treturn buf->m_pan;\n}\n\nvoid WavBufferSetPan(void* ptr, float pan)\n{\n\tWavBuffer* buf = (WavBuffer*)ptr;\n\tbuf->m_pan = pan;\n}\n\n// TrackBuffer\nvoid* TrackBufferCreate(unsigned chn)\n{\n\treturn new TrackBuffer(44100, chn);\n}\n\nvoid TrackBufferDestroy(void* ptr)\n{\n\tTrackBuffer* buffer = (TrackBuffer*)ptr;\n\tdelete buffer;\n}\n\nvoid TrackBufferSetVolume(void* ptr, float volume)\n{\n\tTrackBuffer* buffer = (TrackBuffer*)ptr;\n\tbuffer->SetVolume(volume);\n}\n\nfloat TrackBufferGetVolume(void* ptr)\n{\n\tTrackBuffer* buffer = (TrackBuffer*)ptr;\n\treturn buffer->Volume();\n}\n\nvoid TrackBufferSetPan(void* ptr, float pan)\n{\n\tTrackBuffer* buffer = (TrackBuffer*)ptr;\n\tbuffer->SetPan(pan);\n}\n\nfloat TrackBufferGetPan(void* ptr)\n{\n\tTrackBuffer* buffer = (TrackBuffer*)ptr;\n\treturn buffer->Pan();\n}\n\nunsigned TrackBufferGetNumberOfSamples(void* ptr)\n{\n\tTrackBuffer* buffer = (TrackBuffer*)ptr;\n\treturn buffer->NumberOfChannels();\n}\n\nunsigned TrackBufferGetAlignPos(void* ptr)\n{\n\tTrackBuffer* buffer = (TrackBuffer*)ptr;\n\treturn buffer->AlignPos();\n}\n\nfloat TrackBufferGetCursor(void* ptr)\n{\n\tTrackBuffer* buffer = (TrackBuffer*)ptr;\n\treturn buffer->GetCursor();\n}\n\nvoid TrackBufferSetCursor(void* ptr, float cursor)\n{\n\tTrackBuffer* buffer = (TrackBuffer*)ptr;\n\tbuffer->SetCursor(cursor);\n}\n\nvoid TrackBufferMoveCursor(void* ptr, float cursor_delta)\n{\n\tTrackBuffer* buffer = (TrackBuffer*)ptr;\n\tbuffer->MoveCursor(cursor_delta);\n}\n\nvoid MixTrackBufferList(void* ptr, void* ptr_list)\n{\n\tTrackBuffer* targetBuffer = (TrackBuffer*)ptr;\n\tPtrArray* list = (PtrArray*)ptr_list;\n\ttargetBuffer->CombineTracks((unsigned)list->size(), (TrackBuffer**)list->data());\n}\n\nvoid WriteTrackBufferToWav(void* ptr, const char* fn)\n{\n\tTrackBuffer* buffer = (TrackBuffer*)ptr;\n\tWriteToWav(*buffer, fn);\n}\n\nvoid ReadTrackBufferFromWav(void* ptr, const char* fn)\n{\n\tTrackBuffer* buffer = (TrackBuffer*)ptr;\n\tReadFromWav(*buffer, fn);\n}\n\nvoid TrackBufferWriteBlend(void* ptr, void* ptr_wav_buf)\n{\n\tTrackBuffer* buffer = (TrackBuffer*)ptr;\n\tWavBuffer* wavBuf = (WavBuffer*)ptr_wav_buf;\n\tbuffer->WriteBlend(*wavBuf);\n}\n\n\n\n"
  },
  {
    "path": "ScoreDraftCore/api.h",
    "content": "#pragma once\n\n#if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__)\n#pragma warning( disable: 4251 )\n#if defined SCOREDRAFTCORE_DLL_EXPORT\n#define SCOREDRAFTCORE_API __declspec(dllexport)\n#elif defined SCOREDRAFTCORE_DLL_IMPORT\n#define SCOREDRAFTCORE_API __declspec(dllimport)\n#endif\n#endif\n\n#ifndef SCOREDRAFTCORE_API\n#define SCOREDRAFTCORE_API\n#endif\n"
  },
  {
    "path": "ScoreDraftCore/utils.h",
    "content": "#pragma once\n#include <cstdint>\n#include <chrono>\n#include <mutex>\n#include <condition_variable>\n#include <vector>\n\n\ninline uint64_t time_micro_sec()\n{\n\tstd::chrono::time_point<std::chrono::system_clock> tpSys = std::chrono::system_clock::now();\n\tstd::chrono::time_point<std::chrono::system_clock, std::chrono::microseconds> tpMicro\n\t\t= std::chrono::time_point_cast<std::chrono::microseconds>(tpSys);\n\treturn tpMicro.time_since_epoch().count();\n}\n\ninline uint64_t time_milli_sec()\n{\n\treturn (time_micro_sec() + 500) / 1000;\n}\n\ninline double time_sec()\n{\n\treturn (double)time_micro_sec() / 1000000.0;\n}\n\n\n\n#ifndef max\n#define max(a,b)            (((a) > (b)) ? (a) : (b))\n#endif\n\n#ifndef min\n#define min(a,b)            (((a) < (b)) ? (a) : (b))\n#endif\n\n\ntypedef std::vector<void*> PtrArray;\ntypedef std::vector<float> F32Buf;\n\ninline void CalcPan(float pan, float& l, float& r)\n{\n\tif (pan == 0.0f) return;\n\telse if (pan < 0.0f)\n\t{\n\t\tpan = -pan;\n\t\tfloat ll = l;\n\t\tfloat rl = r * pan;\n\t\tfloat rr = r * (1.0f - pan);\n\t\tl = ll + rl;\n\t\tr = rr;\n\t}\n\telse\n\t{\n\t\tfloat ll = l * (1.0f - pan);\n\t\tfloat lr = l * pan;\n\t\tfloat rr = r;\n\t\tl = ll;\n\t\tr = lr + rr;\n\t}\n}\n\n#include \"TrackBuffer.h\"\n#include \"ReadWav.h\"\n#include \"WriteWav.h\"\n\ninline void WriteToWav(TrackBuffer& track, const char* fileName)\n{\n\tunsigned numSamples = track.NumberOfSamples();\n\tunsigned chn = track.NumberOfChannels();\n\tunsigned sampleRate = track.Rate();\n\tfloat volume = track.AbsoluteVolume();\n\tfloat pan = track.Pan();\n\n\tWriteWav writer;\n\twriter.OpenFile(fileName);\n\twriter.WriteHeader(sampleRate, numSamples, chn);\n\n\tunsigned localBufferSize = track.GetLocalBufferSize();\n\tfloat *buffer = new float[localBufferSize*chn];\n\tunsigned pos = 0;\n\twhile (numSamples > 0)\n\t{\n\t\tunsigned writeCount = min(numSamples, localBufferSize);\n\t\ttrack.GetSamples(pos, writeCount, buffer);\n\t\twriter.WriteSamples(buffer, writeCount, volume, pan);\n\t\tnumSamples -= writeCount;\n\t\tpos += writeCount;\n\t}\n\n\tdelete[] buffer;\n}\n\ninline void ReadFromWav(TrackBuffer& track, const char* fileName)\n{\n\tunsigned numSamples;\n\tunsigned chn;\n\tunsigned sampleRate;\n\n\tReadWav reader;\n\treader.OpenFile(fileName);\n\treader.ReadHeader(sampleRate, numSamples, chn);\n\n\tunsigned localBufferSize = track.GetLocalBufferSize();\n\n\tWavBuffer buf;\n\tbuf.m_sampleRate = (float)sampleRate;\n\tbuf.Allocate(chn, localBufferSize);\n\n\twhile (numSamples > 0)\n\t{\n\t\tunsigned readCount = min(numSamples, localBufferSize);\n\t\tfloat maxv;\n\t\treader.ReadSamples(buf.m_data, readCount, maxv);\n\t\tbuf.m_sampleNum = readCount;\n\t\ttrack.WriteBlend(buf);\n\t\ttrack.MoveCursor((float)readCount / (float)track.Rate()*1000.0f);\n\t\tnumSamples -= readCount;\n\t}\n}\n\nclass Semaphore {\npublic:\n\tSemaphore(int count_ = 0)\n\t\t: count(count_) {}\n\n\tinline void notify()\n\t{\n\t\tstd::unique_lock<std::mutex> lock(mtx);\n\t\tcount++;\n\t\tcv.notify_one();\n\t}\n\n\tinline void wait()\n\t{\n\t\tstd::unique_lock<std::mutex> lock(mtx);\n\n\t\twhile (count == 0) {\n\t\t\tcv.wait(lock);\n\t\t}\n\t\tcount--;\n\t}\n\nprivate:\n\tstd::mutex mtx;\n\tstd::condition_variable cv;\n\tint count;\n};\n"
  },
  {
    "path": "SimpleInstruments/CMakeLists.txt",
    "content": "cmake_minimum_required (VERSION 3.0)\n\nproject(SimpleInstruments)\n\nset (INCLUDE_DIR\n../ScoreDraftCore\n)\n\n\nif (WIN32) \nset (DEFINES  ${DEFINES}\n-D\"_CRT_SECURE_NO_DEPRECATE\"  \n-D\"_SCL_SECURE_NO_DEPRECATE\" \n)\nelse()\nadd_definitions(-std=c++0x)\nadd_compile_options(-fPIC)\nendif()\n\ninclude_directories(${INCLUDE_DIR})\nadd_definitions(${DEFINES})\nadd_library (SimpleInstruments SHARED SimpleInstruments.cpp)\ntarget_link_libraries(SimpleInstruments ScoreDraftCore)\n\nif (WIN32) \ntarget_compile_definitions(SimpleInstruments PUBLIC SCOREDRAFTCORE_DLL_IMPORT)\nendif()\n\nif (WIN32) \ninstall(TARGETS SimpleInstruments RUNTIME DESTINATION ScoreDraft)\nelse()\ninstall(TARGETS SimpleInstruments DESTINATION ScoreDraft)\nendif()\n\n"
  },
  {
    "path": "SimpleInstruments/SimpleInstruments.cpp",
    "content": "#if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__)\n#define SCOREDRAFT_API __declspec(dllexport)\n#else\n#define SCOREDRAFT_API \n#endif\n\nextern \"C\"\n{\n\tSCOREDRAFT_API void GeneratePureSin(void* ptr_wavbuf, float freq, float fduration);\n\tSCOREDRAFT_API void GenerateSquare(void* ptr_wavbuf, float freq, float fduration);\n\tSCOREDRAFT_API void GenerateTriangle(void* ptr_wavbuf, float freq, float fduration);\n\tSCOREDRAFT_API void GenerateSawtooth(void* ptr_wavbuf, float freq, float fduration);\n\tSCOREDRAFT_API void GenerateNaivePiano(void* ptr_wavbuf, float freq, float fduration);\n\tSCOREDRAFT_API void GenerateBottleBlow(void* ptr_wavbuf, float freq, float fduration);\n}\n\n#include <WavBuffer.h>\n#include <cmath>\n\n#define PI 3.14159265359f\n\nvoid GeneratePureSin(void* ptr_wavbuf, float freq, float fduration)\n{\n\tWavBuffer* wavbuf = (WavBuffer*)ptr_wavbuf;\n\tfloat sampleRate = wavbuf->m_sampleRate;\n\n\tfloat fNumOfSamples = fduration * sampleRate*0.001f;\n\tsize_t len = (size_t)ceilf(fNumOfSamples);\n\tfloat sampleFreq = freq / sampleRate;\n\n\twavbuf->Allocate(1, len);\n\n\tfloat wave = 1.0f;\n\tfloat Dwave = 0.0f;\n\tfloat a = powf(2.0f * PI*sampleFreq, 2.0f);\n\n\tfor (size_t j = 0; j < len; j++)\n\t{\n\t\tfloat amplitude = sinf(PI*(float)j / (float)len);\n\t\twavbuf->m_data[j] = amplitude * wave;\n\t\tfloat DDwave = -a * wave;\n\t\tDwave += DDwave;\n\t\twave += Dwave;\n\t}\n}\n\nvoid GenerateSquare(void* ptr_wavbuf, float freq, float fduration)\n{\n\tWavBuffer* wavbuf = (WavBuffer*)ptr_wavbuf;\n\tfloat sampleRate = wavbuf->m_sampleRate;\n\n\tfloat fNumOfSamples = fduration * sampleRate*0.001f;\n\tsize_t len = (size_t)ceilf(fNumOfSamples);\n\tfloat sampleFreq = freq / sampleRate;\n\n\twavbuf->Allocate(1, len);\n\n\tfor (size_t j = 0; j < len; j++)\n\t{\n\t\tfloat x = sampleFreq * j;\n\t\tx = x - floor(x);\n\t\tfloat wave = x > 0.5f ? -1.0f : 1.0f;\n\t\twavbuf->m_data[j] = wave;\n\t}\n}\n\nvoid GenerateTriangle(void* ptr_wavbuf, float freq, float fduration)\n{\n\tWavBuffer* wavbuf = (WavBuffer*)ptr_wavbuf;\n\tfloat sampleRate = wavbuf->m_sampleRate;\n\n\tfloat fNumOfSamples = fduration * sampleRate*0.001f;\n\tsize_t len = (size_t)ceilf(fNumOfSamples);\n\tfloat sampleFreq = freq / sampleRate;\n\n\twavbuf->Allocate(1, len);\n\n\tfor (size_t j = 0; j < len; j++)\n\t{\n\t\tfloat amplitude = 1.0f - 2.0f*fabsf((float)j / (float)(len - 1) - 0.5f);\n\t\tfloat x = sampleFreq * j;\n\t\tx = x - floor(x);\n\t\tfloat wave = x > 0.5f ? (x - 0.75f)*4.0f : (0.25f - x)*4.0f;\n\t\twavbuf->m_data[j] = wave * amplitude;\n\t}\n}\n\nvoid GenerateSawtooth(void* ptr_wavbuf, float freq, float fduration)\n{\n\tWavBuffer* wavbuf = (WavBuffer*)ptr_wavbuf;\n\tfloat sampleRate = wavbuf->m_sampleRate;\n\n\tfloat fNumOfSamples = fduration * sampleRate*0.001f;\n\tsize_t len = (size_t)ceilf(fNumOfSamples);\n\tfloat sampleFreq = freq / sampleRate;\n\n\twavbuf->Allocate(1, len);\n\n\tfor (size_t j = 0; j < len; j++)\n\t{\n\t\tfloat amplitude = 1.0f - ((float)j / (float)(len - 1));\n\t\tfloat phase = sampleFreq * j;\n\t\tfloat wave = 1.0f - 2.0f*(phase - floor(phase));\n\t\twavbuf->m_data[j] = amplitude * wave;\n\t}\n}\n\nvoid GenerateNaivePiano(void* ptr_wavbuf, float freq, float fduration)\n{\n\tWavBuffer* wavbuf = (WavBuffer*)ptr_wavbuf;\n\tfloat sampleRate = wavbuf->m_sampleRate;\n\n\tfloat fNumOfSamples = fduration * sampleRate*0.001f;\n\tsize_t len = (size_t)ceilf(fNumOfSamples);\n\tfloat sampleFreq = freq / sampleRate;\n\n\twavbuf->Allocate(1, len);\n\t\n\tfor (size_t j = 0; j < len; j++)\n\t{\n\t\tfloat x = sampleFreq * j;\n\t\tx = x - floor(x);\n\n\t\tfloat x2 = (float)j / fNumOfSamples;\n\n\t\tfloat amplitude = 1.0f - powf(x2 - 0.5f, 3.0f)*8.0f;\n\t\tfloat wave = (1.0f + 0.5f*cos(2 * PI*x * 5))*sin(PI*x)* powf(1.0f - 2.0f * x, 3.0f);\n\n\t\twavbuf->m_data[j] = amplitude * wave;\n\t}\n}\n\ninline float rand01()\n{\n\tfloat f = (float)rand() / (float)RAND_MAX;\n\tif (f < 0.0000001f) f = 0.0000001f;\n\tif (f > 0.9999999f) f = 0.9999999f;\n\treturn f;\n}\n\n\nvoid GenerateBottleBlow(void* ptr_wavbuf, float freq, float fduration)\n{\n\tWavBuffer* wavbuf = (WavBuffer*)ptr_wavbuf;\n\tfloat sampleRate = wavbuf->m_sampleRate;\n\n\tfloat fNumOfSamples = fduration * sampleRate*0.001f;\n\tsize_t len = (size_t)ceilf(fNumOfSamples);\n\tfloat sampleFreq = freq / sampleRate;\n\n\twavbuf->Allocate(1, len);\t\n\n\tfloat out = 0.0f;\n\tfloat Dout = 0.0f;\n\n\t//float FreqCut = 1.0f / 5000.0f;\n\tfloat k = 0.02f;\n\tfloat FreqCut = k * sampleFreq;\n\tfloat a = powf(2 * PI, 2.0f)*sqrtf(powf(FreqCut, 4.0f) + powf(sampleFreq, 4.0f));\n\t//float b = 2 * PI * powf(2.0f*(sqrtf(powf(FreqCut, 4.0f) + powf(sampleFreq, 4.0f)) - powf(sampleFreq, 2.0f)),0.5f);\n\tfloat b = 2 * PI * FreqCut*FreqCut / sampleFreq;\n\n\tfloat ampfac = powf(FreqCut, 1.5f);\n\n\tfor (size_t j = 0; j < len; j++)\n\t{\n\t\tfloat x2 = (float)j / fNumOfSamples;\n\t\tfloat amplitude = 1.0f - powf(x2 - 0.5f, 3.0f)*8.0f;\n\n\t\twavbuf->m_data[j] = amplitude * out*ampfac;\n\n\t\t//float e = randGauss();\n\t\tfloat e = rand01() - 0.5f;\n\t\tfloat DDout = e - b * Dout - a * out;\n\t\tDout += DDout;\n\t\tout += Dout;\n\t}\n}\n"
  },
  {
    "path": "SoundFont2/CMakeLists.txt",
    "content": "cmake_minimum_required (VERSION 3.0)\n\nproject(SoundFont2)\n\n\nset(SOURCES\napi.cpp\nSF2.cpp\nPresets.cpp\nSynth.cpp\nSF2Synth.cpp\n)\n\nset(HEADERS \nSF2.h\nPresets.h\nSynth.h\nSF2Synth.h\n)\n\n\nset (INCLUDE_DIR\n../ScoreDraftCore\n)\n\n\nif (WIN32) \nset (DEFINES  ${DEFINES}\n-D\"_CRT_SECURE_NO_DEPRECATE\"  \n-D\"_SCL_SECURE_NO_DEPRECATE\" \n)\nelse()\nadd_definitions(-std=c++0x)\nadd_compile_options(-fPIC)\nendif()\n\ninclude_directories(${INCLUDE_DIR})\nadd_definitions(${DEFINES})\nadd_library (SoundFont2 SHARED  ${SOURCES} ${HEADERS})\ntarget_link_libraries(SoundFont2 ScoreDraftCore)\n\nif (WIN32) \ntarget_compile_definitions(SoundFont2 PUBLIC SCOREDRAFTCORE_DLL_IMPORT)\nendif()\n\nif (WIN32) \ninstall(TARGETS SoundFont2 RUNTIME DESTINATION ScoreDraft)\nelse()\ninstall(TARGETS SoundFont2 DESTINATION ScoreDraft)\nendif()\n\n"
  },
  {
    "path": "SoundFont2/Presets.cpp",
    "content": "#include \"Presets.h\"\n\n\n#if !defined(TSF_POW) || !defined(TSF_POWF) || !defined(TSF_EXPF) || !defined(TSF_LOG) || !defined(TSF_TAN) || !defined(TSF_LOG10) || !defined(TSF_SQRT)\n#  include <math.h>\n#  if !defined(__cplusplus) && !defined(NAN) && !defined(powf) && !defined(expf) && !defined(sqrtf)\n#    define powf (float)pow // deal with old math.h\n#    define expf (float)exp // files that come without\n#    define sqrtf (float)sqrt // powf, expf and sqrtf\n#  endif\n#  define TSF_POW     pow\n#  define TSF_POWF    powf\n#  define TSF_EXPF    expf\n#  define TSF_LOG     log\n#  define TSF_TAN     tan\n#  define TSF_LOG10   log10\n#  define TSF_SQRTF   sqrtf\n#endif\n\n\nstatic void tsf_region_clear(struct tsf_region* i, TSF_BOOL for_relative)\n{\n\tTSF_MEMSET(i, 0, sizeof(struct tsf_region));\n\ti->hikey = i->hivel = 127;\n\ti->pitch_keycenter = 60; // C4\n\tif (for_relative) return;\n\n\ti->pitch_keytrack = 100;\n\n\ti->pitch_keycenter = -1;\n\n\t// SF2 defaults in timecents.\n\ti->ampenv.delay = i->ampenv.attack = i->ampenv.hold = i->ampenv.decay = i->ampenv.release = -12000.0f;\n\ti->modenv.delay = i->modenv.attack = i->modenv.hold = i->modenv.decay = i->modenv.release = -12000.0f;\n\n\ti->initialFilterFc = 13500;\n\n\ti->delayModLFO = -12000.0f;\n\ti->delayVibLFO = -12000.0f;\n}\n\nstatic float tsf_timecents2Secsf(float timecents) { return TSF_POWF(2.0f, timecents / 1200.0f); }\nstatic float tsf_decibelsToGain(float db) { return (db > -100.f ? TSF_POWF(10.0f, db * 0.05f) : 0); }\n\nstatic void tsf_region_envtosecs(struct tsf_envelope* p, TSF_BOOL sustainIsGain)\n{\n\t// EG times need to be converted from timecents to seconds.\n\t// Pin very short EG segments.  Timecents don't get to zero, and our EG is\n\t// happier with zero values.\n\tp->delay = (p->delay   < -11950.0f ? 0.0f : tsf_timecents2Secsf(p->delay));\n\tp->attack = (p->attack  < -11950.0f ? 0.0f : tsf_timecents2Secsf(p->attack));\n\tp->release = (p->release < -11950.0f ? 0.0f : tsf_timecents2Secsf(p->release));\n\n\t// If we have dynamic hold or decay times depending on key number we need\n\t// to keep the values in timecents so we can calculate it during startNote\n\tif (!p->keynumToHold)  p->hold = (p->hold  < -11950.0f ? 0.0f : tsf_timecents2Secsf(p->hold));\n\tif (!p->keynumToDecay) p->decay = (p->decay < -11950.0f ? 0.0f : tsf_timecents2Secsf(p->decay));\n\n\tif (p->sustain < 0.0f) p->sustain = 0.0f;\n\telse if (sustainIsGain) p->sustain = tsf_decibelsToGain(-p->sustain / 10.0f);\n\telse p->sustain = 1.0f - (p->sustain / 1000.0f);\n}\n\nstatic void tsf_region_operator(struct tsf_region* region, tsf_u16 genOper, union tsf_hydra_genamount* amount)\n{\n\tenum\n\t{\n\t\tStartAddrsOffset, EndAddrsOffset, StartloopAddrsOffset, EndloopAddrsOffset, StartAddrsCoarseOffset, ModLfoToPitch, VibLfoToPitch, ModEnvToPitch,\n\t\tInitialFilterFc, InitialFilterQ, ModLfoToFilterFc, ModEnvToFilterFc, EndAddrsCoarseOffset, ModLfoToVolume, Unused1, ChorusEffectsSend,\n\t\tReverbEffectsSend, Pan, Unused2, Unused3, Unused4, DelayModLFO, FreqModLFO, DelayVibLFO, FreqVibLFO, DelayModEnv, AttackModEnv, HoldModEnv,\n\t\tDecayModEnv, SustainModEnv, ReleaseModEnv, KeynumToModEnvHold, KeynumToModEnvDecay, DelayVolEnv, AttackVolEnv, HoldVolEnv, DecayVolEnv,\n\t\tSustainVolEnv, ReleaseVolEnv, KeynumToVolEnvHold, KeynumToVolEnvDecay, Instrument, Reserved1, KeyRange, VelRange, StartloopAddrsCoarseOffset,\n\t\tKeynum, Velocity, InitialAttenuation, Reserved2, EndloopAddrsCoarseOffset, CoarseTune, FineTune, SampleID, SampleModes, Reserved3, ScaleTuning,\n\t\tExclusiveClass, OverridingRootKey, Unused5, EndOper\n\t};\n\tswitch (genOper)\n\t{\n\tcase StartAddrsOffset:           region->offset += amount->shortAmount; break;\n\tcase EndAddrsOffset:             region->end += amount->shortAmount; break;\n\tcase StartloopAddrsOffset:       region->loop_start += amount->shortAmount; break;\n\tcase EndloopAddrsOffset:         region->loop_end += amount->shortAmount; break;\n\tcase StartAddrsCoarseOffset:     region->offset += amount->shortAmount * 32768; break;\n\tcase ModLfoToPitch:              region->modLfoToPitch = amount->shortAmount; break;\n\tcase VibLfoToPitch:              region->vibLfoToPitch = amount->shortAmount; break;\n\tcase ModEnvToPitch:              region->modEnvToPitch = amount->shortAmount; break;\n\tcase InitialFilterFc:            region->initialFilterFc = amount->shortAmount; break;\n\tcase InitialFilterQ:             region->initialFilterQ = amount->shortAmount; break;\n\tcase ModLfoToFilterFc:           region->modLfoToFilterFc = amount->shortAmount; break;\n\tcase ModEnvToFilterFc:           region->modEnvToFilterFc = amount->shortAmount; break;\n\tcase EndAddrsCoarseOffset:       region->end += amount->shortAmount * 32768; break;\n\tcase ModLfoToVolume:             region->modLfoToVolume = amount->shortAmount; break;\n\tcase Pan:                        region->pan = amount->shortAmount / 1000.0f; break;\n\tcase DelayModLFO:                region->delayModLFO = amount->shortAmount; break;\n\tcase FreqModLFO:                 region->freqModLFO = amount->shortAmount; break;\n\tcase DelayVibLFO:                region->delayVibLFO = amount->shortAmount; break;\n\tcase FreqVibLFO:                 region->freqVibLFO = amount->shortAmount; break;\n\tcase DelayModEnv:                region->modenv.delay = amount->shortAmount; break;\n\tcase AttackModEnv:               region->modenv.attack = amount->shortAmount; break;\n\tcase HoldModEnv:                 region->modenv.hold = amount->shortAmount; break;\n\tcase DecayModEnv:                region->modenv.decay = amount->shortAmount; break;\n\tcase SustainModEnv:              region->modenv.sustain = amount->shortAmount; break;\n\tcase ReleaseModEnv:              region->modenv.release = amount->shortAmount; break;\n\tcase KeynumToModEnvHold:         region->modenv.keynumToHold = amount->shortAmount; break;\n\tcase KeynumToModEnvDecay:        region->modenv.keynumToDecay = amount->shortAmount; break;\n\tcase DelayVolEnv:                region->ampenv.delay = amount->shortAmount; break;\n\tcase AttackVolEnv:               region->ampenv.attack = amount->shortAmount; break;\n\tcase HoldVolEnv:                 region->ampenv.hold = amount->shortAmount; break;\n\tcase DecayVolEnv:                region->ampenv.decay = amount->shortAmount; break;\n\tcase SustainVolEnv:              region->ampenv.sustain = amount->shortAmount; break;\n\tcase ReleaseVolEnv:              region->ampenv.release = amount->shortAmount; break;\n\tcase KeynumToVolEnvHold:         region->ampenv.keynumToHold = amount->shortAmount; break;\n\tcase KeynumToVolEnvDecay:        region->ampenv.keynumToDecay = amount->shortAmount; break;\n\tcase KeyRange:                   region->lokey = amount->range.lo; region->hikey = amount->range.hi; break;\n\tcase VelRange:                   region->lovel = amount->range.lo; region->hivel = amount->range.hi; break;\n\tcase StartloopAddrsCoarseOffset: region->loop_start += amount->shortAmount * 32768; break;\n\tcase InitialAttenuation:         region->attenuation += amount->shortAmount * 0.1f; break;\n\tcase EndloopAddrsCoarseOffset:   region->loop_end += amount->shortAmount * 32768; break;\n\tcase CoarseTune:                 region->transpose += amount->shortAmount; break;\n\tcase FineTune:                   region->tune += amount->shortAmount; break;\n\tcase SampleModes:                region->loop_mode = ((amount->wordAmount & 3) == 3 ? TSF_LOOPMODE_SUSTAIN : ((amount->wordAmount & 3) == 1 ? TSF_LOOPMODE_CONTINUOUS : TSF_LOOPMODE_NONE)); break;\n\tcase ScaleTuning:                region->pitch_keytrack = amount->shortAmount; break;\n\tcase ExclusiveClass:             region->group = amount->wordAmount; break;\n\tcase OverridingRootKey:          region->pitch_keycenter = amount->shortAmount; break;\n\t\t//case gen_endOper: break; // Ignore.\n\t\t//default: addUnsupportedOpcode(generator_name);\n\t}\n}\n\n\nvoid LoadPresets(SF2& sf2, Presets& presets)\n{\n\tHydra* hydra = &sf2.hydra;\n\tunsigned fontSampleCount = (unsigned) sf2.fontSamples->size();\n\tunsigned presetNum = (unsigned)sf2.hydra.phdrs.size() - 1;\n\tpresets.resize(presetNum);\n\n\tenum { GenInstrument = 41, GenKeyRange = 43, GenVelRange = 44, GenSampleID = 53 };\n\n\t// Read each preset.\n\tstd::vector<tsf_hydra_phdr>::iterator pphdr, pphdrMax;\n\tfor (pphdr = hydra->phdrs.begin(), pphdrMax = pphdr + presetNum; pphdr != pphdrMax; pphdr++)\n\t{\n\t\tint sortedIndex = 0, region_index = 0;\n\t\tstd::vector<tsf_hydra_phdr>::iterator otherphdr;\n\t\ttsf_preset* preset;\n\t\tstd::vector<tsf_hydra_pbag>::iterator ppbag, ppbagEnd;\n\t\ttsf_region globalRegion;\n\t\tfor (otherphdr = hydra->phdrs.begin(); otherphdr != pphdrMax; otherphdr++)\n\t\t{\n\t\t\tif (otherphdr == pphdr || otherphdr->bank > pphdr->bank) continue;\n\t\t\telse if (otherphdr->bank < pphdr->bank) sortedIndex++;\n\t\t\telse if (otherphdr->preset > pphdr->preset) continue;\n\t\t\telse if (otherphdr->preset < pphdr->preset) sortedIndex++;\n\t\t\telse if (otherphdr < pphdr) sortedIndex++;\n\t\t}\n\n\t\tpreset = &presets[sortedIndex];\n\t\tTSF_MEMCPY(preset->presetName, pphdr->presetName, sizeof(preset->presetName));\n\t\tpreset->presetName[sizeof(preset->presetName) - 1] = '\\0'; //should be zero terminated in source file but make sure\n\t\tpreset->bank = pphdr->bank;\n\t\tpreset->preset = pphdr->preset;\n\n\t\tunsigned regionNum = 0;\n\n\t\t//count regions covered by this preset\n\t\tfor (ppbag = hydra->pbags.begin() + pphdr->presetBagNdx, ppbagEnd = hydra->pbags.begin() + pphdr[1].presetBagNdx; ppbag != ppbagEnd; ppbag++)\n\t\t{\n\t\t\tunsigned char plokey = 0, phikey = 127, plovel = 0, phivel = 127;\n\t\t\tstd::vector<tsf_hydra_pgen>::iterator ppgen, ppgenEnd; \n\t\t\tstd::vector<tsf_hydra_inst>::iterator pinst; \n\t\t\tstd::vector<tsf_hydra_ibag>::iterator pibag, pibagEnd; \n\t\t\tstd::vector<tsf_hydra_igen>::iterator pigen, pigenEnd;\n\t\t\tfor (ppgen = hydra->pgens.begin() + ppbag->genNdx, ppgenEnd = hydra->pgens.begin() + ppbag[1].genNdx; ppgen != ppgenEnd; ppgen++)\n\t\t\t{\n\t\t\t\tif (ppgen->genOper == GenKeyRange) { plokey = ppgen->genAmount.range.lo; phikey = ppgen->genAmount.range.hi; continue; }\n\t\t\t\tif (ppgen->genOper == GenVelRange) { plovel = ppgen->genAmount.range.lo; phivel = ppgen->genAmount.range.hi; continue; }\n\t\t\t\tif (ppgen->genOper != GenInstrument) continue;\n\t\t\t\tif (ppgen->genAmount.wordAmount >= hydra->insts.size()) continue;\n\t\t\t\tpinst = hydra->insts.begin() + ppgen->genAmount.wordAmount;\n\t\t\t\tfor (pibag = hydra->ibags.begin() + pinst->instBagNdx, pibagEnd = hydra->ibags.begin() + pinst[1].instBagNdx; pibag != pibagEnd; pibag++)\n\t\t\t\t{\n\t\t\t\t\tunsigned char ilokey = 0, ihikey = 127, ilovel = 0, ihivel = 127;\n\t\t\t\t\tfor (pigen = hydra->igens.begin() + pibag->instGenNdx, pigenEnd = hydra->igens.begin() + pibag[1].instGenNdx; pigen != pigenEnd; pigen++)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (pigen->genOper == GenKeyRange) { ilokey = pigen->genAmount.range.lo; ihikey = pigen->genAmount.range.hi; continue; }\n\t\t\t\t\t\tif (pigen->genOper == GenVelRange) { ilovel = pigen->genAmount.range.lo; ihivel = pigen->genAmount.range.hi; continue; }\n\t\t\t\t\t\tif (pigen->genOper == GenSampleID && ihikey >= plokey && ilokey <= phikey && ihivel >= plovel && ilovel <= phivel) regionNum++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tpreset->regions.resize(regionNum);\n\t\ttsf_region_clear(&globalRegion, TSF_TRUE);\n\n\t\t// Zones.\n\t\tfor (ppbag = hydra->pbags.begin() + pphdr->presetBagNdx, ppbagEnd = hydra->pbags.begin() + pphdr[1].presetBagNdx; ppbag != ppbagEnd; ppbag++)\n\t\t{\n\t\t\tstd::vector<tsf_hydra_pgen>::iterator ppgen, ppgenEnd;\n\t\t\tstd::vector<tsf_hydra_inst>::iterator pinst;\n\t\t\tstd::vector<tsf_hydra_ibag>::iterator pibag, pibagEnd;\n\t\t\tstd::vector<tsf_hydra_igen>::iterator pigen, pigenEnd;\n\t\t\tstruct tsf_region presetRegion = globalRegion;\n\t\t\tint hadGenInstrument = 0;\n\n\t\t\t// Generators.\n\t\t\tfor (ppgen = hydra->pgens.begin() + ppbag->genNdx, ppgenEnd = hydra->pgens.begin() + ppbag[1].genNdx; ppgen != ppgenEnd; ppgen++)\n\t\t\t{\n\t\t\t\t// Instrument.\n\t\t\t\tif (ppgen->genOper == GenInstrument)\n\t\t\t\t{\n\t\t\t\t\tstruct tsf_region instRegion;\n\t\t\t\t\ttsf_u16 whichInst = ppgen->genAmount.wordAmount;\n\t\t\t\t\tif (whichInst >= hydra->insts.size()) continue;\n\n\t\t\t\t\ttsf_region_clear(&instRegion, TSF_FALSE);\n\t\t\t\t\tpinst = hydra->insts.begin()+whichInst;\n\t\t\t\t\tfor (pibag = hydra->ibags.begin() + pinst->instBagNdx, pibagEnd = hydra->ibags.begin() + pinst[1].instBagNdx; pibag != pibagEnd; pibag++)\n\t\t\t\t\t{\n\t\t\t\t\t\t// Generators.\n\t\t\t\t\t\tstruct tsf_region zoneRegion = instRegion;\n\t\t\t\t\t\tint hadSampleID = 0;\n\t\t\t\t\t\tfor (pigen = hydra->igens.begin() + pibag->instGenNdx, pigenEnd = hydra->igens.begin() + pibag[1].instGenNdx; pigen != pigenEnd; pigen++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (pigen->genOper == GenSampleID)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tstruct tsf_hydra_shdr* pshdr;\n\n\t\t\t\t\t\t\t\t//preset region key and vel ranges are a filter for the zone regions\n\t\t\t\t\t\t\t\tif (zoneRegion.hikey < presetRegion.lokey || zoneRegion.lokey > presetRegion.hikey) continue;\n\t\t\t\t\t\t\t\tif (zoneRegion.hivel < presetRegion.lovel || zoneRegion.lovel > presetRegion.hivel) continue;\n\t\t\t\t\t\t\t\tif (presetRegion.lokey > zoneRegion.lokey) zoneRegion.lokey = presetRegion.lokey;\n\t\t\t\t\t\t\t\tif (presetRegion.hikey < zoneRegion.hikey) zoneRegion.hikey = presetRegion.hikey;\n\t\t\t\t\t\t\t\tif (presetRegion.lovel > zoneRegion.lovel) zoneRegion.lovel = presetRegion.lovel;\n\t\t\t\t\t\t\t\tif (presetRegion.hivel < zoneRegion.hivel) zoneRegion.hivel = presetRegion.hivel;\n\n\t\t\t\t\t\t\t\t//sum regions\n\t\t\t\t\t\t\t\tzoneRegion.offset += presetRegion.offset;\n\t\t\t\t\t\t\t\tzoneRegion.end += presetRegion.end;\n\t\t\t\t\t\t\t\tzoneRegion.loop_start += presetRegion.loop_start;\n\t\t\t\t\t\t\t\tzoneRegion.loop_end += presetRegion.loop_end;\n\t\t\t\t\t\t\t\tzoneRegion.transpose += presetRegion.transpose;\n\t\t\t\t\t\t\t\tzoneRegion.tune += presetRegion.tune;\n\t\t\t\t\t\t\t\tzoneRegion.pitch_keytrack += presetRegion.pitch_keytrack;\n\t\t\t\t\t\t\t\tzoneRegion.attenuation += presetRegion.attenuation;\n\t\t\t\t\t\t\t\tzoneRegion.pan += presetRegion.pan;\n\t\t\t\t\t\t\t\tzoneRegion.ampenv.delay += presetRegion.ampenv.delay;\n\t\t\t\t\t\t\t\tzoneRegion.ampenv.attack += presetRegion.ampenv.attack;\n\t\t\t\t\t\t\t\tzoneRegion.ampenv.hold += presetRegion.ampenv.hold;\n\t\t\t\t\t\t\t\tzoneRegion.ampenv.decay += presetRegion.ampenv.decay;\n\t\t\t\t\t\t\t\tzoneRegion.ampenv.sustain += presetRegion.ampenv.sustain;\n\t\t\t\t\t\t\t\tzoneRegion.ampenv.release += presetRegion.ampenv.release;\n\t\t\t\t\t\t\t\tzoneRegion.modenv.delay += presetRegion.modenv.delay;\n\t\t\t\t\t\t\t\tzoneRegion.modenv.attack += presetRegion.modenv.attack;\n\t\t\t\t\t\t\t\tzoneRegion.modenv.hold += presetRegion.modenv.hold;\n\t\t\t\t\t\t\t\tzoneRegion.modenv.decay += presetRegion.modenv.decay;\n\t\t\t\t\t\t\t\tzoneRegion.modenv.sustain += presetRegion.modenv.sustain;\n\t\t\t\t\t\t\t\tzoneRegion.modenv.release += presetRegion.modenv.release;\n\t\t\t\t\t\t\t\tzoneRegion.initialFilterQ += presetRegion.initialFilterQ;\n\t\t\t\t\t\t\t\tzoneRegion.initialFilterFc += presetRegion.initialFilterFc;\n\t\t\t\t\t\t\t\tzoneRegion.modEnvToPitch += presetRegion.modEnvToPitch;\n\t\t\t\t\t\t\t\tzoneRegion.modEnvToFilterFc += presetRegion.modEnvToFilterFc;\n\t\t\t\t\t\t\t\tzoneRegion.delayModLFO += presetRegion.delayModLFO;\n\t\t\t\t\t\t\t\tzoneRegion.freqModLFO += presetRegion.freqModLFO;\n\t\t\t\t\t\t\t\tzoneRegion.modLfoToPitch += presetRegion.modLfoToPitch;\n\t\t\t\t\t\t\t\tzoneRegion.modLfoToFilterFc += presetRegion.modLfoToFilterFc;\n\t\t\t\t\t\t\t\tzoneRegion.modLfoToVolume += presetRegion.modLfoToVolume;\n\t\t\t\t\t\t\t\tzoneRegion.delayVibLFO += presetRegion.delayVibLFO;\n\t\t\t\t\t\t\t\tzoneRegion.freqVibLFO += presetRegion.freqVibLFO;\n\t\t\t\t\t\t\t\tzoneRegion.vibLfoToPitch += presetRegion.vibLfoToPitch;\n\n\t\t\t\t\t\t\t\t// EG times need to be converted from timecents to seconds.\n\t\t\t\t\t\t\t\ttsf_region_envtosecs(&zoneRegion.ampenv, TSF_TRUE);\n\t\t\t\t\t\t\t\ttsf_region_envtosecs(&zoneRegion.modenv, TSF_FALSE);\n\n\t\t\t\t\t\t\t\t// LFO times need to be converted from timecents to seconds.\n\t\t\t\t\t\t\t\tzoneRegion.delayModLFO = (zoneRegion.delayModLFO < -11950.0f ? 0.0f : tsf_timecents2Secsf(zoneRegion.delayModLFO));\n\t\t\t\t\t\t\t\tzoneRegion.delayVibLFO = (zoneRegion.delayVibLFO < -11950.0f ? 0.0f : tsf_timecents2Secsf(zoneRegion.delayVibLFO));\n\n\t\t\t\t\t\t\t\t// Pin values to their ranges.\n\t\t\t\t\t\t\t\tif (zoneRegion.pan < -0.5f) zoneRegion.pan = -0.5f;\n\t\t\t\t\t\t\t\telse if (zoneRegion.pan > 0.5f) zoneRegion.pan = 0.5f;\n\t\t\t\t\t\t\t\tif (zoneRegion.initialFilterQ < 1500 || zoneRegion.initialFilterQ > 13500) zoneRegion.initialFilterQ = 0;\n\n\t\t\t\t\t\t\t\tpshdr = &hydra->shdrs[pigen->genAmount.wordAmount];\n\t\t\t\t\t\t\t\tzoneRegion.offset += pshdr->start;\n\t\t\t\t\t\t\t\tzoneRegion.end += pshdr->end;\n\t\t\t\t\t\t\t\tzoneRegion.loop_start += pshdr->startLoop;\n\t\t\t\t\t\t\t\tzoneRegion.loop_end += pshdr->endLoop;\n\t\t\t\t\t\t\t\tif (pshdr->endLoop > 0) zoneRegion.loop_end -= 1;\n\t\t\t\t\t\t\t\tif (zoneRegion.pitch_keycenter == -1) zoneRegion.pitch_keycenter = pshdr->originalPitch;\n\t\t\t\t\t\t\t\tzoneRegion.tune += pshdr->pitchCorrection;\n\t\t\t\t\t\t\t\tzoneRegion.sample_rate = pshdr->sampleRate;\n\t\t\t\t\t\t\t\tif (zoneRegion.end && zoneRegion.end < fontSampleCount) zoneRegion.end++;\n\t\t\t\t\t\t\t\telse zoneRegion.end = fontSampleCount;\n\n\t\t\t\t\t\t\t\tpreset->regions[region_index] = zoneRegion;\n\t\t\t\t\t\t\t\tregion_index++;\n\t\t\t\t\t\t\t\thadSampleID = 1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse tsf_region_operator(&zoneRegion, pigen->genOper, &pigen->genAmount);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Handle instrument's global zone.\n\t\t\t\t\t\tif (pibag == hydra->ibags.begin() + pinst->instBagNdx && !hadSampleID)\n\t\t\t\t\t\t\tinstRegion = zoneRegion;\n\n\t\t\t\t\t\t// Modulators (TODO)\n\t\t\t\t\t\t//if (ibag->instModNdx < ibag[1].instModNdx) addUnsupportedOpcode(\"any modulator\");\n\t\t\t\t\t}\n\t\t\t\t\thadGenInstrument = 1;\n\t\t\t\t}\n\t\t\t\telse tsf_region_operator(&presetRegion, ppgen->genOper, &ppgen->genAmount);\n\t\t\t}\n\n\t\t\t// Modulators (TODO)\n\t\t\t//if (pbag->modNdx < pbag[1].modNdx) addUnsupportedOpcode(\"any modulator\");\n\n\t\t\t// Handle preset's global zone.\n\t\t\tif (ppbag == hydra->pbags.begin() + pphdr->presetBagNdx && !hadGenInstrument)\n\t\t\t\tglobalRegion = presetRegion;\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "SoundFont2/Presets.h",
    "content": "#ifndef _Presets_h\n#define _Presets_h\n\n#include \"SF2.h\"\n\n#include <stdio.h>\n\nenum { TSF_LOOPMODE_NONE, TSF_LOOPMODE_CONTINUOUS, TSF_LOOPMODE_SUSTAIN };\n\nstruct tsf_envelope \n{ \n\tfloat delay, attack, hold, decay, sustain, release, keynumToHold, keynumToDecay; \n\n\tvoid print(FILE* fp, const char* prefix) const\n\t{\n\t\tfprintf(fp, \"%s - delay: %f\\n\", prefix, delay);\n\t\tfprintf(fp, \"%s - attack: %f\\n\", prefix, attack);\n\t\tfprintf(fp, \"%s - hold: %f\\n\", prefix, hold);\n\t\tfprintf(fp, \"%s - decay: %f\\n\", prefix, decay);\n\t\tfprintf(fp, \"%s - sustain: %f\\n\", prefix, sustain);\n\t\tfprintf(fp, \"%s - release: %f\\n\", prefix, release);\n\t\tfprintf(fp, \"%s - keynumToHold: %f\\n\", prefix, keynumToHold);\n\t\tfprintf(fp, \"%s - keynumToDecay: %f\\n\", prefix, keynumToDecay);\n\t}\n};\n\nstruct tsf_region\n{\n\tint loop_mode;\n\tunsigned int sample_rate;\n\tunsigned char lokey, hikey, lovel, hivel;\n\tunsigned int group, offset, end, loop_start, loop_end;\n\tint transpose, tune, pitch_keycenter, pitch_keytrack;\n\tfloat attenuation, pan;\n\ttsf_envelope ampenv, modenv;\n\tint initialFilterQ, initialFilterFc;\n\tint modEnvToPitch, modEnvToFilterFc, modLfoToFilterFc, modLfoToVolume;\n\tfloat delayModLFO;\n\tint freqModLFO, modLfoToPitch;\n\tfloat delayVibLFO;\n\tint freqVibLFO, vibLfoToPitch;\n\n\tvoid print(FILE* fp) const\n\t{\n\t\tfprintf(fp, \"loop_mode: %d\\n\", loop_mode);\n\t\tfprintf(fp, \"sample_rate: %u\\n\", sample_rate);\n\t\tfprintf(fp, \"offset: %u\\n\", offset);\n\t\tfprintf(fp, \"end: %u\\n\", end);\n\t\tfprintf(fp, \"loop_start: %u\\n\", loop_start);\n\t\tfprintf(fp, \"loop_end: %u\\n\", loop_end);\n\t\tfprintf(fp, \"transpose: %d\\n\", transpose);\n\t\tfprintf(fp, \"tune: %d\\n\", tune);\n\t\tfprintf(fp, \"pitch_keycenter: %d\\n\", pitch_keycenter);\n\t\tfprintf(fp, \"pitch_keytrack: %d\\n\", pitch_keytrack);\n\t\tfprintf(fp, \"attenuation: %f\\n\", attenuation);\n\t\tfprintf(fp, \"pan: %f\\n\", pan);\n\t\tampenv.print(fp, \"ampenv\");\n\t\tmodenv.print(fp, \"modenv\");\n\t\tfprintf(fp, \"initialFilterQ: %d\\n\", initialFilterQ);\n\t\tfprintf(fp, \"initialFilterFc: %d\\n\", initialFilterFc);\n\t\tfprintf(fp, \"modEnvToPitch: %d\\n\", modEnvToPitch);\n\t\tfprintf(fp, \"modEnvToFilterFc: %d\\n\", modEnvToFilterFc);\n\t\tfprintf(fp, \"modLfoToFilterFc: %d\\n\", modLfoToFilterFc);\n\t\tfprintf(fp, \"modLfoToVolume: %d\\n\", modLfoToVolume);\n\t\tfprintf(fp, \"delayModLFO: %f\\n\", delayModLFO);\n\t\tfprintf(fp, \"freqModLFO: %d\\n\", freqModLFO);\n\t\tfprintf(fp, \"modLfoToPitch: %d\\n\", modLfoToPitch);\n\t\tfprintf(fp, \"delayVibLFO: %f\\n\", delayVibLFO);\n\t\tfprintf(fp, \"freqVibLFO: %d\\n\", freqVibLFO);\n\t\tfprintf(fp, \"vibLfoToPitch: %d\\n\", vibLfoToPitch);\t\n\t}\n};\n\nstruct tsf_preset\n{\n\ttsf_char20 presetName;\n\ttsf_u16 preset, bank;\n\tstd::vector<tsf_region> regions;\n};\n\ntypedef std::vector<tsf_preset> Presets;\n\nvoid LoadPresets(SF2& sf2, Presets& presets);\n\n\n#endif\n\n"
  },
  {
    "path": "SoundFont2/SF2.cpp",
    "content": "#include \"SF2.h\"\n\nstruct tsf_riffchunk { tsf_fourcc id; tsf_u32 size; };\n#define TSF_FourCCEquals(value1, value2) (value1[0] == value2[0] && value1[1] == value2[1] && value1[2] == value2[2] && value1[3] == value2[3])\n\nstatic TSF_BOOL tsf_riffchunk_read(struct tsf_riffchunk* parent, struct tsf_riffchunk* chunk, struct tsf_stream* stream)\n{\n\tTSF_BOOL IsRiff, IsList;\n\tif (parent && sizeof(tsf_fourcc) + sizeof(tsf_u32) > parent->size) return TSF_FALSE;\n\tif (!stream->read(stream->data, &chunk->id, sizeof(tsf_fourcc)) || *chunk->id <= ' ' || *chunk->id >= 'z') return TSF_FALSE;\n\tif (!stream->read(stream->data, &chunk->size, sizeof(tsf_u32))) return TSF_FALSE;\n\tif (parent && sizeof(tsf_fourcc) + sizeof(tsf_u32) + chunk->size > parent->size) return TSF_FALSE;\n\tif (parent) parent->size -= sizeof(tsf_fourcc) + sizeof(tsf_u32) + chunk->size;\n\tIsRiff = TSF_FourCCEquals(chunk->id, \"RIFF\"), IsList = TSF_FourCCEquals(chunk->id, \"LIST\");\n\tif (IsRiff && parent) return TSF_FALSE; //not allowed\n\tif (!IsRiff && !IsList) return TSF_TRUE; //custom type without sub type\n\tif (!stream->read(stream->data, &chunk->id, sizeof(tsf_fourcc)) || *chunk->id <= ' ' || *chunk->id >= 'z') return TSF_FALSE;\n\tchunk->size -= sizeof(tsf_fourcc);\n\treturn TSF_TRUE;\n}\n\n#define TSFR(FIELD) stream->read(stream->data, &i->FIELD, sizeof(i->FIELD));\ninline void tsf_hydra_read_phdr(struct tsf_hydra_phdr* i, struct tsf_stream* stream) { TSFR(presetName) TSFR(preset) TSFR(bank) TSFR(presetBagNdx) TSFR(library) TSFR(genre) TSFR(morphology) }\ninline void tsf_hydra_read_pbag(struct tsf_hydra_pbag* i, struct tsf_stream* stream) { TSFR(genNdx) TSFR(modNdx) }\ninline void tsf_hydra_read_pmod(struct tsf_hydra_pmod* i, struct tsf_stream* stream) { TSFR(modSrcOper) TSFR(modDestOper) TSFR(modAmount) TSFR(modAmtSrcOper) TSFR(modTransOper) }\ninline void tsf_hydra_read_pgen(struct tsf_hydra_pgen* i, struct tsf_stream* stream) { TSFR(genOper) TSFR(genAmount) }\ninline void tsf_hydra_read_inst(struct tsf_hydra_inst* i, struct tsf_stream* stream) { TSFR(instName) TSFR(instBagNdx) }\ninline void tsf_hydra_read_ibag(struct tsf_hydra_ibag* i, struct tsf_stream* stream) { TSFR(instGenNdx) TSFR(instModNdx) }\ninline void tsf_hydra_read_imod(struct tsf_hydra_imod* i, struct tsf_stream* stream) { TSFR(modSrcOper) TSFR(modDestOper) TSFR(modAmount) TSFR(modAmtSrcOper) TSFR(modTransOper) }\ninline void tsf_hydra_read_igen(struct tsf_hydra_igen* i, struct tsf_stream* stream) { TSFR(genOper) TSFR(genAmount) }\ninline void tsf_hydra_read_shdr(struct tsf_hydra_shdr* i, struct tsf_stream* stream) { TSFR(sampleName) TSFR(start) TSFR(end) TSFR(startLoop) TSFR(endLoop) TSFR(sampleRate) TSFR(originalPitch) TSFR(pitchCorrection) TSFR(sampleLink) TSFR(sampleType) }\n#undef TSFR\n\n\nstatic void tsf_load_samples(F32Samples* samples, struct tsf_riffchunk *chunkSmpl, struct tsf_stream* stream)\n{\n\t// Read sample data into float format buffer.\n\tfloat* out; unsigned int samplesTotal, samplesLeft, samplesToRead, samplesToConvert;\n\tsamplesTotal = chunkSmpl->size / sizeof(short);\n\tsamplesLeft = samplesTotal;\n\tsamples->resize(samplesTotal);\n\tout = samples->data();\n\tfor (; samplesLeft; samplesLeft -= samplesToRead)\n\t{\n\t\tshort sampleBuffer[1024], *in = sampleBuffer;;\n\t\tsamplesToRead = (samplesLeft > 1024 ? 1024 : samplesLeft);\n\t\tstream->read(stream->data, sampleBuffer, samplesToRead * sizeof(short));\n\n\t\t// Convert from signed 16-bit to float.\n\t\tfor (samplesToConvert = samplesToRead; samplesToConvert > 0; --samplesToConvert)\n\t\t\t// If we ever need to compile for big-endian platforms, we'll need to byte-swap here.\n\t\t\t*out++ = (float)(*in++ / 32767.0);\n\t}\n}\n\nvoid LoadSF2(struct tsf_stream* stream, SF2& sf2)\n{\n\tstruct tsf_riffchunk chunkHead;\n\tstruct tsf_riffchunk chunkList;\n\tHydra& hydra = sf2.hydra;\n\n\tif (!tsf_riffchunk_read(TSF_NULL, &chunkHead, stream) || !TSF_FourCCEquals(chunkHead.id, \"sfbk\"))\n\t{\n\t\t//if (e) *e = TSF_INVALID_NOSF2HEADER;\n\t\treturn;\n\t}\n\n\t// Read hydra and locate sample data.\n\twhile (tsf_riffchunk_read(&chunkHead, &chunkList, stream))\n\t{\n\t\tstruct tsf_riffchunk chunk;\n\t\tif (TSF_FourCCEquals(chunkList.id, \"pdta\"))\n\t\t{\n\t\t\twhile (tsf_riffchunk_read(&chunkList, &chunk, stream))\n\t\t\t{\n#define HandleChunk(chunkName) (TSF_FourCCEquals(chunk.id, #chunkName) && !(chunk.size % chunkName##SizeInFile)) \\\n\t\t\t\t\t\t\t\t\t\t\t{ \\\n\t\t\t\t\t\tint num = chunk.size / chunkName##SizeInFile, i; \\\n\t\t\t\t\t\thydra.chunkName##s.resize(num);\\\n\t\t\t\t\t\tfor (i = 0; i < num; ++i) tsf_hydra_read_##chunkName(&hydra.chunkName##s[i], stream); \\\n\t\t\t\t\t\t\t\t}\n\t\t\t\tenum\n\t\t\t\t{\n\t\t\t\t\tphdrSizeInFile = 38, pbagSizeInFile = 4, pmodSizeInFile = 10,\n\t\t\t\t\tpgenSizeInFile = 4, instSizeInFile = 22, ibagSizeInFile = 4,\n\t\t\t\t\timodSizeInFile = 10, igenSizeInFile = 4, shdrSizeInFile = 46\n\t\t\t\t};\n\t\t\t\tif      HandleChunk(phdr) else if HandleChunk(pbag) else if HandleChunk(pmod)\n\t\t\t\telse if HandleChunk(pgen) else if HandleChunk(inst) else if HandleChunk(ibag)\n\t\t\t\telse if HandleChunk(imod) else if HandleChunk(igen) else if HandleChunk(shdr)\n\t\t\t\telse stream->skip(stream->data, chunk.size);\n#undef HandleChunk\n\n\t\t\t}\n\t\t}\n\t\telse if (TSF_FourCCEquals(chunkList.id, \"sdta\"))\n\t\t{\n\t\t\twhile (tsf_riffchunk_read(&chunkList, &chunk, stream))\n\t\t\t{\n\t\t\t\tif (TSF_FourCCEquals(chunk.id, \"smpl\"))\n\t\t\t\t{\n\t\t\t\t\tsf2.fontSamples = std::shared_ptr<F32Samples>(new F32Samples);\n\t\t\t\t\ttsf_load_samples(sf2.fontSamples.get(), &chunk, stream);\n\t\t\t\t}\n\t\t\t\telse stream->skip(stream->data, chunk.size);\n\t\t\t}\n\t\t}\n\t\telse stream->skip(stream->data, chunkList.size);\n\t}\n}\n"
  },
  {
    "path": "SoundFont2/SF2.h",
    "content": "#ifndef __SF2_h\n#define __SF2_h\n\n#include <vector>\n#include <memory>\n\n#if !defined(TSF_MALLOC) || !defined(TSF_FREE) || !defined(TSF_REALLOC)\n#  include <stdlib.h>\n#  define TSF_MALLOC  malloc\n#  define TSF_FREE    free\n#  define TSF_REALLOC realloc\n#endif\n\n#if !defined(TSF_MEMCPY) || !defined(TSF_MEMSET)\n#  include <string.h>\n#  define TSF_MEMCPY  memcpy\n#  define TSF_MEMSET  memset\n#endif\n\n#ifndef TSF_NO_STDIO\n#  include <stdio.h>\n#endif\n\n#define TSF_TRUE 1\n#define TSF_FALSE 0\n#define TSF_BOOL char\n#define TSF_PI 3.14159265358979323846264338327950288\n#define TSF_NULL 0\n\ntypedef char tsf_fourcc[4];\ntypedef signed char tsf_s8;\ntypedef unsigned char tsf_u8;\ntypedef unsigned short tsf_u16;\ntypedef signed short tsf_s16;\ntypedef unsigned int tsf_u32;\ntypedef char tsf_char20[20];\n\nunion tsf_hydra_genamount { struct { tsf_u8 lo, hi; } range; tsf_s16 shortAmount; tsf_u16 wordAmount; };\nstruct tsf_hydra_phdr { tsf_char20 presetName; tsf_u16 preset, bank, presetBagNdx; tsf_u32 library, genre, morphology; };\nstruct tsf_hydra_pbag { tsf_u16 genNdx, modNdx; };\nstruct tsf_hydra_pmod { tsf_u16 modSrcOper, modDestOper; tsf_s16 modAmount; tsf_u16 modAmtSrcOper, modTransOper; };\nstruct tsf_hydra_pgen { tsf_u16 genOper; union tsf_hydra_genamount genAmount; };\nstruct tsf_hydra_inst { tsf_char20 instName; tsf_u16 instBagNdx; };\nstruct tsf_hydra_ibag { tsf_u16 instGenNdx, instModNdx; };\nstruct tsf_hydra_imod { tsf_u16 modSrcOper, modDestOper; tsf_s16 modAmount; tsf_u16 modAmtSrcOper, modTransOper; };\nstruct tsf_hydra_igen { tsf_u16 genOper; union tsf_hydra_genamount genAmount; };\nstruct tsf_hydra_shdr { tsf_char20 sampleName; tsf_u32 start, end, startLoop, endLoop, sampleRate; tsf_u8 originalPitch; tsf_s8 pitchCorrection; tsf_u16 sampleLink, sampleType; };\n\n\n// Stream structure for the generic loading\nstruct tsf_stream\n{\n\t// Custom data given to the functions as the first parameter\n\tvoid* data;\n\n\t// Function pointer will be called to read 'size' bytes into ptr (returns number of read bytes)\n\tint(*read)(void* data, void* ptr, unsigned int size);\n\n\t// Function pointer will be called to skip ahead over 'count' bytes (returns 1 on success, 0 on error)\n\tint(*skip)(void* data, unsigned int count);\n};\n\nstruct Hydra\n{\n\tstd::vector<tsf_hydra_phdr> phdrs; std::vector<tsf_hydra_pbag> pbags; std::vector<tsf_hydra_pmod> pmods;\n\tstd::vector<tsf_hydra_pgen> pgens; std::vector<tsf_hydra_inst> insts; std::vector<tsf_hydra_ibag> ibags;\n\tstd::vector<tsf_hydra_imod> imods; std::vector<tsf_hydra_igen> igens; std::vector<tsf_hydra_shdr> shdrs;\n};\n\ntypedef std::vector<float> F32Samples;\n\nstruct SF2\n{\n\tHydra hydra;\n\tstd::shared_ptr<F32Samples> fontSamples;\n};\n\nvoid LoadSF2(struct tsf_stream* stream, SF2& sf2);\n\n#ifndef TSF_NO_STDIO\ninline int tsf_stream_stdio_read(FILE* f, void* ptr, unsigned int size) { return (int)fread(ptr, 1, size, f); }\ninline int tsf_stream_stdio_skip(FILE* f, unsigned int count) { return !fseek(f, count, SEEK_CUR); }\ninline void LoadSF2Filename(const char* filename, SF2& sf2)\n{\n\tstruct tsf_stream stream = { TSF_NULL, (int(*)(void*, void*, unsigned int))&tsf_stream_stdio_read, (int(*)(void*, unsigned int))&tsf_stream_stdio_skip };\n#if __STDC_WANT_SECURE_LIB__\n\tFILE* f = TSF_NULL; fopen_s(&f, filename, \"rb\");\n#else\n\tFILE* f = fopen(filename, \"rb\");\n#endif\n\tif (!f)\n\t{\n\t\t//if (e) *e = TSF_FILENOTFOUND;\n\t\treturn;\n\t}\n\tstream.data = f;\n\tLoadSF2(&stream, sf2);\n\tfclose(f);\n}\n#endif\n\nstruct tsf_stream_memory { const char* buffer; unsigned int total, pos; };\ninline int tsf_stream_memory_read(struct tsf_stream_memory* m, void* ptr, unsigned int size) { if (size > m->total - m->pos) size = m->total - m->pos; TSF_MEMCPY(ptr, m->buffer + m->pos, size); m->pos += size; return size; }\ninline int tsf_stream_memory_skip(struct tsf_stream_memory* m, unsigned int count) { if (m->pos + count > m->total) return 0; m->pos += count; return 1; }\n\ninline void LoadSF2Memory(const void* buffer, int size, SF2& sf2)\n{\n\tstruct tsf_stream stream = { TSF_NULL, (int(*)(void*, void*, unsigned int))&tsf_stream_memory_read, (int(*)(void*, unsigned int))&tsf_stream_memory_skip };\n\tstruct tsf_stream_memory f = { 0, 0, 0 };\n\tf.buffer = (const char*)buffer;\n\tf.total = size;\n\tstream.data = &f;\n\treturn LoadSF2(&stream, sf2);\n}\n\n\n#endif\n"
  },
  {
    "path": "SoundFont2/SF2Synth.cpp",
    "content": "#include \"SF2Synth.h\"\n#include <memory>\n\nstruct LowPass\n{\n\tchar active;\n\tdouble QInv;\n\tdouble a0, a1, b1, b2;\n};\n\nstruct tsf_voice_envelope { float level, slope; int samplesUntilNextSegment; short segment, midiVelocity; struct tsf_envelope parameters; TSF_BOOL segmentIsExponential, isAmpEnv; };\nstruct tsf_voice_lfo { int samplesUntil; float level, delta; };\n\n#if !defined(TSF_POW) || !defined(TSF_POWF) || !defined(TSF_EXPF) || !defined(TSF_LOG) || !defined(TSF_TAN) || !defined(TSF_LOG10) || !defined(TSF_SQRT)\n#  include <math.h>\n#  if !defined(__cplusplus) && !defined(NAN) && !defined(powf) && !defined(expf) && !defined(sqrtf)\n#    define powf (float)pow // deal with old math.h\n#    define expf (float)exp // files that come without\n#    define sqrtf (float)sqrt // powf, expf and sqrtf\n#  endif\n#  define TSF_POW     pow\n#  define TSF_POWF    powf\n#  define TSF_EXPF    expf\n#  define TSF_LOG     log\n#  define TSF_TAN     tan\n#  define TSF_LOG10   log10\n#  define TSF_SQRTF   sqrtf\n#endif\n\nstatic float tsf_gainToDecibels(float gain) { return (gain <= .00001f ? -100.f : (float)(20.0 * TSF_LOG10(gain))); }\nstatic double tsf_timecents2Secsd(double timecents) { return TSF_POW(2.0, timecents / 1200.0); }\nstatic float tsf_timecents2Secsf(float timecents) { return TSF_POWF(2.0f, timecents / 1200.0f); }\nstatic float tsf_cents2Hertz(float cents) { return 8.176f * TSF_POWF(2.0f, cents / 1200.0f); }\nstatic float tsf_decibelsToGain(float db) { return (db > -100.f ? TSF_POWF(10.0f, db * 0.05f) : 0); }\n\nenum { TSF_SEGMENT_NONE, TSF_SEGMENT_DELAY, TSF_SEGMENT_ATTACK, TSF_SEGMENT_HOLD, TSF_SEGMENT_DECAY, TSF_SEGMENT_SUSTAIN, TSF_SEGMENT_RELEASE, TSF_SEGMENT_DONE };\n#define TSF_FASTRELEASETIME 0.01f\n\nstatic void tsf_voice_envelope_nextsegment(struct tsf_voice_envelope* e, short active_segment, float outSampleRate)\n{\n\tswitch (active_segment)\n\t{\n\tcase TSF_SEGMENT_NONE:\n\t\te->samplesUntilNextSegment = (int)(e->parameters.delay * outSampleRate);\n\t\tif (e->samplesUntilNextSegment > 0)\n\t\t{\n\t\t\te->segment = TSF_SEGMENT_DELAY;\n\t\t\te->segmentIsExponential = TSF_FALSE;\n\t\t\te->level = 0.0;\n\t\t\te->slope = 0.0;\n\t\t\treturn;\n\t\t}\n\tcase TSF_SEGMENT_DELAY:\n\t\te->samplesUntilNextSegment = (int)(e->parameters.attack * outSampleRate);\n\t\tif (e->samplesUntilNextSegment > 0)\n\t\t{\n\t\t\tif (!e->isAmpEnv)\n\t\t\t{\n\t\t\t\t//mod env attack duration scales with velocity (velocity of 1 is full duration, max velocity is 0.125 times duration)\n\t\t\t\te->samplesUntilNextSegment = (int)(e->parameters.attack * ((145 - e->midiVelocity) / 144.0f) * outSampleRate);\n\t\t\t}\n\t\t\te->segment = TSF_SEGMENT_ATTACK;\n\t\t\te->segmentIsExponential = TSF_FALSE;\n\t\t\te->level = 0.0f;\n\t\t\te->slope = 1.0f / e->samplesUntilNextSegment;\n\t\t\treturn;\n\t\t}\n\tcase TSF_SEGMENT_ATTACK:\n\t\te->samplesUntilNextSegment = (int)(e->parameters.hold * outSampleRate);\n\t\tif (e->samplesUntilNextSegment > 0)\n\t\t{\n\t\t\te->segment = TSF_SEGMENT_HOLD;\n\t\t\te->segmentIsExponential = TSF_FALSE;\n\t\t\te->level = 1.0f;\n\t\t\te->slope = 0.0f;\n\t\t\treturn;\n\t\t}\n\tcase TSF_SEGMENT_HOLD:\n\t\te->samplesUntilNextSegment = (int)(e->parameters.decay * outSampleRate);\n\t\tif (e->samplesUntilNextSegment > 0)\n\t\t{\n\t\t\te->segment = TSF_SEGMENT_DECAY;\n\t\t\te->level = 1.0f;\n\t\t\tif (e->isAmpEnv)\n\t\t\t{\n\t\t\t\t// I don't truly understand this; just following what LinuxSampler does.\n\t\t\t\tfloat mysterySlope = -9.226f / e->samplesUntilNextSegment;\n\t\t\t\te->slope = TSF_EXPF(mysterySlope);\n\t\t\t\te->segmentIsExponential = TSF_TRUE;\n\t\t\t\tif (e->parameters.sustain > 0.0f)\n\t\t\t\t{\n\t\t\t\t\t// Again, this is following LinuxSampler's example, which is similar to\n\t\t\t\t\t// SF2-style decay, where \"decay\" specifies the time it would take to\n\t\t\t\t\t// get to zero, not to the sustain level.  The SFZ spec is not that\n\t\t\t\t\t// specific about what \"decay\" means, so perhaps it's really supposed\n\t\t\t\t\t// to specify the time to reach the sustain level.\n\t\t\t\t\te->samplesUntilNextSegment = (int)(TSF_LOG(e->parameters.sustain) / mysterySlope);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\te->slope = -1.0f / e->samplesUntilNextSegment;\n\t\t\t\te->samplesUntilNextSegment = (int)(e->parameters.decay * (1.0f - e->parameters.sustain) * outSampleRate);\n\t\t\t\te->segmentIsExponential = TSF_FALSE;\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\tcase TSF_SEGMENT_DECAY:\n\t\te->segment = TSF_SEGMENT_SUSTAIN;\n\t\te->level = e->parameters.sustain;\n\t\te->slope = 0.0f;\n\t\te->samplesUntilNextSegment = 0x7FFFFFFF;\n\t\te->segmentIsExponential = TSF_FALSE;\n\t\treturn;\n\tcase TSF_SEGMENT_SUSTAIN:\n\t\te->segment = TSF_SEGMENT_RELEASE;\n\t\te->samplesUntilNextSegment = (int)((e->parameters.release <= 0 ? TSF_FASTRELEASETIME : e->parameters.release) * outSampleRate);\n\t\tif (e->isAmpEnv)\n\t\t{\n\t\t\t// I don't truly understand this; just following what LinuxSampler does.\n\t\t\tfloat mysterySlope = -9.226f / e->samplesUntilNextSegment;\n\t\t\te->slope = TSF_EXPF(mysterySlope);\n\t\t\te->segmentIsExponential = TSF_TRUE;\n\t\t}\n\t\telse\n\t\t{\n\t\t\te->slope = -e->level / e->samplesUntilNextSegment;\n\t\t\te->segmentIsExponential = TSF_FALSE;\n\t\t}\n\t\treturn;\n\tcase TSF_SEGMENT_RELEASE:\n\tdefault:\n\t\te->segment = TSF_SEGMENT_DONE;\n\t\te->segmentIsExponential = TSF_FALSE;\n\t\te->level = e->slope = 0.0f;\n\t\te->samplesUntilNextSegment = 0x7FFFFFF;\n\t}\n}\n\nstatic void tsf_voice_envelope_setup(struct tsf_voice_envelope* e, const struct tsf_envelope* new_parameters, float midiNoteNumber, short midiVelocity, TSF_BOOL isAmpEnv, float outSampleRate)\n{\n\te->parameters = *new_parameters;\n\tif (e->parameters.keynumToHold!=0.0f)\n\t{\n\t\te->parameters.hold += e->parameters.keynumToHold * (60.0f - midiNoteNumber);\n\t\te->parameters.hold = (e->parameters.hold < -10000.0f ? 0.0f : tsf_timecents2Secsf(e->parameters.hold));\n\t}\n\tif (e->parameters.keynumToDecay != 0.0f)\n\t{\n\t\te->parameters.decay += e->parameters.keynumToDecay * (60.0f - midiNoteNumber);\n\t\te->parameters.decay = (e->parameters.decay < -10000.0f ? 0.0f : tsf_timecents2Secsf(e->parameters.decay));\n\t}\n\te->midiVelocity = midiVelocity;\n\te->isAmpEnv = isAmpEnv;\n\ttsf_voice_envelope_nextsegment(e, TSF_SEGMENT_NONE, outSampleRate);\n}\n\nstatic void tsf_voice_lowpass_setup(LowPass* e, float Fc)\n{\n\t// Lowpass filter from http://www.earlevel.com/main/2012/11/26/biquad-c-source-code/\n\tdouble  K = TSF_TAN(TSF_PI * Fc), KK = K * K;\n\tdouble  norm = 1 / (1 + K * e->QInv + KK);\n\te->a0 = KK * norm;\n\te->a1 = 2 * e->a0;\n\te->b1 = 2 * (KK - 1) * norm;\n\te->b2 = (1 - K * e->QInv + KK) * norm;\n}\n\n\nstatic void tsf_voice_lfo_setup(struct tsf_voice_lfo* e, float delay, int freqCents, float outSampleRate)\n{\n\te->samplesUntil = (int)(delay * outSampleRate);\n\te->delta = (4.0f * tsf_cents2Hertz((float)freqCents) / outSampleRate);\n\te->level = 0;\n}\n\nstatic void tsf_voice_envelope_process(struct tsf_voice_envelope* e, int numSamples, float outSampleRate)\n{\n\tif (e->slope)\n\t{\n\t\tif (e->segmentIsExponential) e->level *= TSF_POWF(e->slope, (float)numSamples);\n\t\telse e->level += (e->slope * numSamples);\n\t}\n\tif ((e->samplesUntilNextSegment -= numSamples) <= 0)\n\t\ttsf_voice_envelope_nextsegment(e, e->segment, outSampleRate);\n}\n\n\nstatic void tsf_voice_lfo_process(struct tsf_voice_lfo* e, int blockSamples)\n{\n\tif (e->samplesUntil > blockSamples) { e->samplesUntil -= blockSamples; return; }\n\te->level += e->delta * blockSamples;\n\tif (e->level >  1.0f) { e->delta = -e->delta; e->level = 2.0f - e->level; }\n\telse if (e->level < -1.0f) { e->delta = -e->delta; e->level = -2.0f - e->level; }\n}\n\n// The lower this block size is the more accurate the effects are.\n// Increasing the value significantly lowers the CPU usage of the voice rendering.\n// If LFO affects the low-pass filter it can be hearable even as low as 8.\n#ifndef TSF_RENDER_EFFECTSAMPLEBLOCK\n#define TSF_RENDER_EFFECTSAMPLEBLOCK 64\n#endif\n\nvoid SynthRegion(F32Samples& output, F32Samples& input, const tsf_region& region, float key, float vel,\n\tunsigned& numSamples, OutputMode outputmode, float samplerate, float global_gain_db)\n{\n\t/*FILE *fp = fopen(\"dump.txt\", \"a\");\n\tregion.print(fp);\n\tfclose(fp);*/\n\tint midiVelocity = (int)(vel * 127);\n\n\tfloat noteGainDB =global_gain_db - region.attenuation - tsf_gainToDecibels(1.0f / vel);\n\tdouble note = (double)key + (double)region.transpose + (double)region.tune / 100.0;\n\tdouble adjustedPitch = (double)region.pitch_keycenter + (note - (double)region.pitch_keycenter)* ((double)region.pitch_keytrack / 100.0);\n\tdouble pitchInputTimecents = adjustedPitch * 100.0;\n\tdouble pitchOutputFactor = (double)region.sample_rate / (tsf_timecents2Secsd((double)region.pitch_keycenter * 100.0) * (double)samplerate);\n\t// The SFZ spec is silent about the pan curve, but a 3dB pan law seems common. This sqrt() curve matches what Dimension LE does; Alchemy Free seems closer to sin(adjustedPan * pi/2).\n\tfloat panFactorLeft = TSF_SQRTF(0.5f - region.pan);\n\tfloat panFactorRight = TSF_SQRTF(0.5f + region.pan);\n\t// Offset/end.\n\tNoteState ns;\n\tns.sourceSamplePosition = region.offset;\n\tbool doLoop = (region.loop_mode != TSF_LOOPMODE_NONE && region.loop_start < region.loop_end);\n\t// Loop.\n\tunsigned loopStart = (doLoop ? region.loop_start : 0);\n\tunsigned loopEnd = (doLoop ? region.loop_end : 0);\n\t// Setup envelopes.\n\ttsf_voice_envelope ampenv, modenv;\n\ttsf_voice_envelope_setup(&ampenv, &region.ampenv, key, midiVelocity, TSF_TRUE, samplerate);\n\ttsf_voice_envelope_setup(&modenv, &region.modenv, key, midiVelocity, TSF_FALSE, samplerate);\n\t// Setup lowpass filter.\n\tfloat filterQDB = region.initialFilterQ / 10.0f;\n\tLowPass lowpass;\n\tlowpass.QInv = 1.0f / TSF_POW(10.0f, (filterQDB / 20.0f));\n\tns.lowPass.z1 = 0.0;\n\tns.lowPass.z2 = 0.0;\n\tlowpass.active = (region.initialFilterFc <= 13500);\n\tif (lowpass.active)\n\t\ttsf_voice_lowpass_setup(&lowpass, tsf_cents2Hertz((float)region.initialFilterFc) / samplerate);\n\t// Setup LFO filters.\n\ttsf_voice_lfo modlfo, viblfo;\n\ttsf_voice_lfo_setup(&modlfo, region.delayModLFO, region.freqModLFO, samplerate);\n\ttsf_voice_lfo_setup(&viblfo, region.delayVibLFO, region.freqVibLFO, samplerate);\n\n\tTSF_BOOL updateModEnv = (region.modEnvToPitch != 0 || region.modEnvToFilterFc != 0);\n\tTSF_BOOL updateModLFO = (modlfo.delta != 0.0f && (region.modLfoToPitch != 0 || region.modLfoToFilterFc != 0 || region.modLfoToVolume != 0));\n\tTSF_BOOL updateVibLFO = (viblfo.delta != 0.0f && (region.vibLfoToPitch != 0));\n\tTSF_BOOL isLooping = (loopStart < loopEnd);\n\n\tdouble tmpSampleEndDbl = (double)region.end;\n\tdouble tmpLoopEndDbl = (double)loopEnd + 1.0f;\n\tdouble tmpSourceSamplePosition = ns.sourceSamplePosition;\n\n\tTSF_BOOL dynamicLowpass = (region.modLfoToFilterFc != 0 || region.modEnvToFilterFc != 0);\n\tfloat tmpSampleRate, tmpInitialFilterFc, tmpModLfoToFilterFc, tmpModEnvToFilterFc;\n\n\tTSF_BOOL dynamicPitchRatio = (region.modLfoToPitch != 0 || region.modEnvToPitch != 0 || region.vibLfoToPitch != 0);\n\tdouble pitchRatio;\n\tfloat tmpModLfoToPitch, tmpVibLfoToPitch, tmpModEnvToPitch;\n\n\tTSF_BOOL dynamicGain = (region.modLfoToVolume != 0);\n\tfloat noteGain = 0, tmpModLfoToVolume;\n\n\tif (dynamicLowpass) tmpSampleRate = samplerate, tmpInitialFilterFc = (float)region.initialFilterFc, tmpModLfoToFilterFc = (float)region.modLfoToFilterFc, tmpModEnvToFilterFc = (float)region.modEnvToFilterFc;\n\telse tmpSampleRate = 0, tmpInitialFilterFc = 0, tmpModLfoToFilterFc = 0, tmpModEnvToFilterFc = 0;\n\tif (dynamicPitchRatio) pitchRatio = 0, tmpModLfoToPitch = (float)region.modLfoToPitch, tmpVibLfoToPitch = (float)region.vibLfoToPitch, tmpModEnvToPitch = (float)region.modEnvToPitch;\n\telse pitchRatio = tsf_timecents2Secsd(pitchInputTimecents) * pitchOutputFactor, tmpModLfoToPitch = 0, tmpVibLfoToPitch = 0, tmpModEnvToPitch = 0;\n\n\tif (dynamicGain) tmpModLfoToVolume = (float)region.modLfoToVolume * 0.1f;\n\telse noteGain = tsf_decibelsToGain(noteGainDB), tmpModLfoToVolume = 0;\n\n\tSynthCtrl control;\n\tcontrol.outputmode = outputmode;\n\tcontrol.loopStart = loopStart;\n\tcontrol.loopEnd = loopEnd;\n\tcontrol.end = region.end;\n\tcontrol.panFactorLeft = panFactorLeft;\n\tcontrol.panFactorRight = panFactorRight;\n\tcontrol.effect_sample_block = TSF_RENDER_EFFECTSAMPLEBLOCK;\n\n\tunsigned countSamples = 0;\n\n\twhile (true)\n\t{\n\t\tfloat gainMono;\n\t\tint blockSamples = TSF_RENDER_EFFECTSAMPLEBLOCK;\n\t\tcountSamples += blockSamples;\n\n\t\tif (countSamples >= numSamples && ampenv.segment<TSF_SEGMENT_RELEASE)\n\t\t{\n\t\t\ttsf_voice_envelope_nextsegment(&ampenv, TSF_SEGMENT_SUSTAIN, samplerate);\n\t\t\ttsf_voice_envelope_nextsegment(&modenv, TSF_SEGMENT_SUSTAIN, samplerate);\n\t\t\tif (region.loop_mode == TSF_LOOPMODE_SUSTAIN)\n\t\t\t\t// Continue playing, but stop looping.\n\t\t\t\tisLooping = false;\n\t\t}\n\n\t\tif (dynamicLowpass)\n\t\t{\n\t\t\tfloat fres = tmpInitialFilterFc + modlfo.level * tmpModLfoToFilterFc + modenv.level * tmpModEnvToFilterFc;\n\t\t\tlowpass.active = (fres <= 13500.0f);\n\t\t\tif (lowpass.active) tsf_voice_lowpass_setup(&lowpass, tsf_cents2Hertz(fres) / tmpSampleRate);\n\t\t}\n\n\t\tif (dynamicPitchRatio)\n\t\t\tpitchRatio = tsf_timecents2Secsd(pitchInputTimecents + (modlfo.level * tmpModLfoToPitch + viblfo.level * tmpVibLfoToPitch + modenv.level * tmpModEnvToPitch)) *  pitchOutputFactor;\n\n\t\tif (dynamicGain)\n\t\t\tnoteGain = tsf_decibelsToGain(noteGainDB + (modlfo.level * tmpModLfoToVolume));\n\n\t\tgainMono = noteGain * ampenv.level;\n\n\t\t// Update EG.\n\t\ttsf_voice_envelope_process(&ampenv, blockSamples, samplerate);\n\t\tif (updateModEnv) tsf_voice_envelope_process(&modenv, blockSamples, samplerate);\n\n\t\t// Update LFOs.\n\t\tif (updateModLFO) tsf_voice_lfo_process(&modlfo, blockSamples);\n\t\tif (updateVibLFO) tsf_voice_lfo_process(&viblfo, blockSamples);\n\n\t\tSynthCtrlPnt ctrlPnt;\n\t\tctrlPnt.looping = isLooping;\n\t\tctrlPnt.gainMono = gainMono;\n\t\tctrlPnt.pitchRatio = pitchRatio;\n\t\tctrlPnt.lowPass.active = lowpass.active;\n\t\tctrlPnt.lowPass.a0 = lowpass.a0;\n\t\tctrlPnt.lowPass.a1 = lowpass.a1;\n\t\tctrlPnt.lowPass.b1 = lowpass.b1;\n\t\tctrlPnt.lowPass.b2 = lowpass.b2;\n\t\tcontrol.controlPnts.push_back(ctrlPnt);\n\n\t\ttmpSourceSamplePosition += pitchRatio*(float)blockSamples;\n\t\twhile (tmpSourceSamplePosition >= tmpLoopEndDbl && isLooping)\n\t\t\ttmpSourceSamplePosition -= (loopEnd - loopStart + 1.0f);\n\n\t\tif (tmpSourceSamplePosition >= tmpSampleEndDbl || ampenv.segment == TSF_SEGMENT_DONE)\n\t\t\tbreak;\n\t}\n\n\tnumSamples = countSamples;\n\tunsigned chn = outputmode == MONO ? 1 : 2;\n\n\toutput.resize(countSamples*chn);\n\n\tmemset(output.data(), 0, sizeof(float)* countSamples*chn);\n\tSynth(input.data(), output.data(), countSamples, ns, control);\t\n\n}\n\n\nvoid SF2Synth(F32Samples& output, F32Samples& input, tsf_preset& preset, float key, float vel,\n\tunsigned& numSamples, OutputMode outputmode, float samplerate, float global_gain_db)\n{\n\tint midiVelocity = (int)(vel * 127);\n\tint iKey = (int)(key + 0.5f);\n\tstd::vector<tsf_region>::iterator region, regionEnd;\n\tstd::vector<std::shared_ptr<F32Samples>> results;\n\n\tunsigned max_numSamples = 0;\n\tfor (region = preset.regions.begin(), regionEnd = region + preset.regions.size();\n\t\tregion != regionEnd; region++)\n\t{\n\t\tif (iKey < region->lokey || iKey > region->hikey || midiVelocity < region->lovel || midiVelocity > region->hivel) continue;\n\n\t\tunsigned region_numSamples = numSamples;\n\t\tstd::shared_ptr<F32Samples> result = std::shared_ptr<F32Samples>(new F32Samples);\n\t\tSynthRegion(*result, input, *region, key, vel, region_numSamples, outputmode, samplerate, global_gain_db);\n\t\tresults.push_back(result);\n\t\tif (region_numSamples > max_numSamples)\n\t\t\tmax_numSamples = region_numSamples;\n\t}\n\tnumSamples = max_numSamples;\n\n\tif (results.size() < 1)\treturn;\t\n\t\n\tunsigned chn = outputmode == MONO ? 1 : 2;\n\toutput.resize(max_numSamples*chn);\n\tmemset(output.data(), 0, sizeof(float)*output.size());\n\tfor (unsigned i = 0; i < results.size(); i++)\n\t{\n\t\tstd::shared_ptr<F32Samples> result = results[i];\n\t\tfor (unsigned j = 0; j < result->size(); j++)\n\t\t\toutput[j] += (*result)[j];\n\t}\n}\n\n\n"
  },
  {
    "path": "SoundFont2/SF2Synth.h",
    "content": "#ifndef _SF2Synth_h\n#define _SF2Synth_h\n\n#include \"SF2.h\"\n#include \"Presets.h\"\n#include \"Synth.h\"\n\n#include <memory>\n\nvoid SF2Synth(F32Samples& output, F32Samples& input, tsf_preset& preset, float key, float vel, unsigned& numSamples,\n\tOutputMode outputmode = STEREO_INTERLEAVED, float samplerate = 44100.0f, float global_gain_db = 0.0f);\n\n\n#endif \n\n"
  },
  {
    "path": "SoundFont2/Synth.cpp",
    "content": "#include \"Synth.h\"\n#include <cmath>\n\nvoid Synth(const float* input, float* outputBuffer, unsigned numSamples, NoteState& noteState, const SynthCtrl& control)\n{\n\tfloat* outL = outputBuffer;\n\tfloat* outR = (control.outputmode == STEREO_UNWEAVED ? outL + numSamples : nullptr);\n\n\tunsigned tmpLoopStart = control.loopStart;\n\tunsigned tmpLoopEnd = control.loopEnd;\n\tunsigned tmpEnd = control.end;\n\tdouble tmpSourceSamplePosition = noteState.sourceSamplePosition;\n\n\tdouble tmpSampleEndDbl = (double)tmpEnd;\n\tdouble tmpLoopEndDbl = (double)tmpLoopEnd + 1.0;\n\n\tunsigned i_ctrl = 0;\n\tSynthCtrlPnt ctrlPnt;\n\n\tLowPassState lowPassState = noteState.lowPass;\n\n\twhile (numSamples)\n\t{\n\t\tfloat gainLeft, gainRight;\n\t\tint blockSamples = (numSamples > control.effect_sample_block ? control.effect_sample_block : numSamples);\n\t\tnumSamples -= blockSamples;\n\n\t\tif (i_ctrl<control.controlPnts.size())\n\t\t\tctrlPnt = control.controlPnts[i_ctrl];\n\t\telse\n\t\t\tbreak;\n\n\t\tfloat gainMono = ctrlPnt.gainMono;\n\t\tdouble pitchRatio = ctrlPnt.pitchRatio;\n\t\tbool interpolation = pitchRatio <= 1.0f;\n\n\t\tgainLeft = gainMono *control.panFactorLeft;\n\t\tgainRight = gainMono  * control.panFactorRight;\n\n\t\tLowPassCtrlPnt lowPassCtrlPnt = ctrlPnt.lowPass;\n\n\t\twhile (blockSamples-- && tmpSourceSamplePosition < tmpSampleEndDbl)\n\t\t{\n\t\t\tfloat val = 0.0f;\n\t\t\tif (interpolation)\n\t\t\t{\n\t\t\t\tint ipos1 = (int)tmpSourceSamplePosition;\n\t\t\t\tfloat frac = (float)(tmpSourceSamplePosition - (double)ipos1);\n\t\t\t\tint ipos2 = ipos1 + 1;\n\t\t\t\tint ipos3 = ipos1 + 2;\n\t\t\t\tint ipos0 = ipos1 - 1;\n\n\t\t\t\tif (ipos1 > (int)tmpLoopEnd && ctrlPnt.looping)\n\t\t\t\t{\n\t\t\t\t\tipos2 = tmpLoopStart;\n\t\t\t\t\tipos3 = tmpLoopStart + 1;\n\t\t\t\t}\n\t\t\t\tif (ipos2 >= (int)tmpEnd) ipos2 = tmpEnd - 1;\n\t\t\t\tif (ipos3 >= (int)tmpEnd) ipos3 = tmpEnd - 1;\n\t\t\t\tif (ipos0 < 0) ipos0 = 0;\n\n\t\t\t\tfloat p0 = input[ipos0];\n\t\t\t\tfloat p1 = input[ipos1];\n\t\t\t\tfloat p2 = input[ipos2];\n\t\t\t\tfloat p3 = input[ipos3];\n\n\t\t\t\tval = (-0.5f*p0 + 1.5f*p1 - 1.5f*p2 + 0.5f*p3)*powf(frac, 3.0f) +\n\t\t\t\t\t(p0 - 2.5f*p1 + 2.0f*p2 - 0.5f*p3)*powf(frac, 2.0f) +\n\t\t\t\t\t(-0.5f*p0 + 0.5f*p2)*frac + p1;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tint ipos1 = (int)ceil(tmpSourceSamplePosition - 0.5* pitchRatio);\n\t\t\t\tint ipos2 = (int)floor(tmpSourceSamplePosition + 0.5* pitchRatio);\n\t\t\t\tint count = ipos2 - ipos1 + 1;\n\t\t\t\tfor (int ipos = ipos1; ipos <= ipos2; ipos++)\n\t\t\t\t{\n\t\t\t\t\tint _ipos = ipos;\n\t\t\t\t\tif (_ipos < 0) _ipos = 0;\n\t\t\t\t\tif (_ipos > (int)tmpLoopEnd && ctrlPnt.looping)\n\t\t\t\t\t{\n\t\t\t\t\t\t_ipos += (int)tmpLoopStart - (int)tmpLoopEnd -1;\n\t\t\t\t\t}\n\t\t\t\t\tif (_ipos >= (int)tmpEnd)\n\t\t\t\t\t{\n\t\t\t\t\t\t_ipos = tmpEnd - 1;\n\t\t\t\t\t}\n\t\t\t\t\tval += input[_ipos];\n\t\t\t\t}\n\t\t\t\tval /= (float)count;\n\t\t\t}\n\n\t\t\tif (lowPassCtrlPnt.active)\n\t\t\t{\n\t\t\t\tdouble In = val;\n\t\t\t\tval = (float)(In * lowPassCtrlPnt.a0 + lowPassState.z1);\n\t\t\t\tlowPassState.z1 = In * lowPassCtrlPnt.a1 + lowPassState.z2 - lowPassCtrlPnt.b1 * val; \n\t\t\t\tlowPassState.z2 = In * lowPassCtrlPnt.a0 - lowPassCtrlPnt.b2 * val; \n\t\t\t}\n\n\t\t\tswitch (control.outputmode)\n\t\t\t{\n\t\t\tcase STEREO_INTERLEAVED:\n\t\t\t\t*outL++ += val * gainLeft;\n\t\t\t\t*outL++ += val * gainRight;\n\t\t\t\tbreak;\n\t\t\tcase STEREO_UNWEAVED:\n\t\t\t\t*outL++ += val * gainLeft;\n\t\t\t\t*outR++ += val * gainRight;\n\t\t\t\tbreak;\n\t\t\tcase MONO:\n\t\t\t\t*outL++ += val * gainMono;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t// Next sample.\n\t\t\ttmpSourceSamplePosition += pitchRatio;\n\t\t\tif (tmpSourceSamplePosition >= tmpLoopEndDbl && ctrlPnt.looping) \n\t\t\t\ttmpSourceSamplePosition -= (tmpLoopEnd - tmpLoopStart + 1.0f);\n\n\t\t}\n\n\t\tif (tmpSourceSamplePosition >= tmpSampleEndDbl)\n\t\t\tbreak;\n\n\t\ti_ctrl++;\n\t}\n\n\tnoteState.sourceSamplePosition= tmpSourceSamplePosition;\n\tnoteState.lowPass = lowPassState;\n}\n"
  },
  {
    "path": "SoundFont2/Synth.h",
    "content": "#ifndef _Synth_h\n#define _Synth_h\n\n#include <vector>\n\nstruct LowPassState\n{\n\tdouble z1, z2;\n};\n\nstruct NoteState\n{\n\tdouble sourceSamplePosition;\n\tLowPassState lowPass;\n};\n\nstruct LowPassCtrlPnt\n{\n\tchar active;\n\tdouble a0, a1, b1, b2;\n};\n\nstruct SynthCtrlPnt\n{\n\tchar looping;\n\tfloat gainMono;\n\tdouble pitchRatio;\n\n\tLowPassCtrlPnt lowPass;\t\n};\n\nenum OutputMode\n{\n\t// Two channels with single left/right samples one after another\n\tSTEREO_INTERLEAVED,\n\t// Two channels with all samples for the left channel first then right\n\tSTEREO_UNWEAVED,\n\t// A single channel (stereo instruments are mixed into center)\n\tMONO,\n};\n\nstruct SynthCtrl\n{\n\tOutputMode outputmode;\n\tunsigned loopStart, loopEnd;\n\tunsigned end;\n\tfloat panFactorLeft, panFactorRight;\n\tunsigned effect_sample_block;\n\tstd::vector<SynthCtrlPnt> controlPnts;\n};\n\nvoid Synth(const float* input, float* outputBuffer, unsigned numSamples, NoteState& noteState, const SynthCtrl& control);\n\n#endif\n"
  },
  {
    "path": "SoundFont2/api.cpp",
    "content": "#if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__)\n#define SCOREDRAFT_API __declspec(dllexport)\n#else\n#define SCOREDRAFT_API \n#endif\n\nextern \"C\"\n{\n\t// SF2Bank\n\tSCOREDRAFT_API void* SF2BankCreate(const char* filename);\n\tSCOREDRAFT_API void SF2BankDestroy(void* ptr);\n\tSCOREDRAFT_API unsigned long long SF2BankGetNumberPresets(void* ptr);\t\n\tSCOREDRAFT_API const char* SF2BankGetPresetName(void* ptr, int i);\n\tSCOREDRAFT_API int SF2BankGetPresetBankNum(void* ptr, int i);\n\tSCOREDRAFT_API int SF2BankGetPresetNumber(void* ptr, int i);\n\n\t// SF2Tone\n\tSCOREDRAFT_API void* SF2ToneCreate(void* ptr_bank, unsigned preset_index);\n\tSCOREDRAFT_API void SF2ToneDestroy(void* ptr);\n\n\t// SF2Synth\n\tSCOREDRAFT_API void SF2SynthNote(void* ptr_wavbuf, void* ptr_tone, float key, float vel, unsigned numSamples, unsigned outputmode, float global_gain_db);\n}\n\n#include \"SF2Synth.h\"\n#include <WavBuffer.h>\n\n// SF2Bank\nstruct SF2Bank\n{\n\tstd::shared_ptr<F32Samples> font_samples;\n\tPresets presets;\n};\n\nvoid* SF2BankCreate(const char* filename)\n{\n\tSF2Bank* bank = new SF2Bank;\n\tSF2 sf2;\n\tLoadSF2Filename(filename, sf2);\n\tbank->font_samples = sf2.fontSamples;\n\tLoadPresets(sf2, bank->presets);\n\treturn bank;\n}\n\nvoid SF2BankDestroy(void* ptr)\n{\n\tSF2Bank* bank = (SF2Bank*)ptr;\n\tdelete bank;\n}\n\nunsigned long long SF2BankGetNumberPresets(void* ptr)\n{\n\tSF2Bank* bank = (SF2Bank*)ptr;\n\treturn bank->presets.size();\n}\n\nconst char* SF2BankGetPresetName(void* ptr, int i)\n{\n\tSF2Bank* bank = (SF2Bank*)ptr;\n\treturn bank->presets[i].presetName;\n}\n\nint SF2BankGetPresetBankNum(void* ptr, int i)\n{\n\tSF2Bank* bank = (SF2Bank*)ptr;\n\treturn bank->presets[i].bank;\n}\n\nint SF2BankGetPresetNumber(void* ptr, int i)\n{\n\tSF2Bank* bank = (SF2Bank*)ptr;\n\treturn bank->presets[i].preset;\n}\n\n// SF2Tone\nstruct SF2Tone\n{\n\tF32Samples* input;\n\ttsf_preset* preset;\n};\n\nvoid* SF2ToneCreate(void* ptr_bank, unsigned preset_index)\n{\n\tSF2Bank* bank = (SF2Bank*)ptr_bank;\n\tSF2Tone* tone = new SF2Tone;\n\ttone->input = bank->font_samples.get();\n\ttone->preset = &bank->presets[preset_index];\t\n\treturn tone;\n}\n\nvoid SF2ToneDestroy(void* ptr)\n{\n\tSF2Tone* tone = (SF2Tone*)ptr;\n\tdelete tone;\n}\n\n// SF2Synth\nvoid SF2SynthNote(void* ptr_wavbuf, void* ptr_tone, float key, float vel, unsigned numSamples, unsigned outputmode, float global_gain_db)\n{\n\tWavBuffer* wavbuf = (WavBuffer*)ptr_wavbuf;\n\twavbuf->m_channelNum = outputmode < 2 ? 2 : 1;\t\n\tSF2Tone* tone = (SF2Tone*)ptr_tone;\n\tfloat samplerate = wavbuf->m_sampleRate;\n\tSF2Synth(*wavbuf->p_data, *tone->input, *tone->preset, key, vel, numSamples, (OutputMode)outputmode, samplerate, global_gain_db);\n\twavbuf->m_sampleNum = wavbuf->p_data->size()/ wavbuf->m_channelNum;\n\twavbuf->m_data = wavbuf->p_data->data();\t\t\n}"
  },
  {
    "path": "Test/FlyMeToTheMoon.py",
    "content": "#!/usr/bin/python3\n\nimport os \nimport ScoreDraft\nfrom ScoreDraft.Notes import *\n\ndef soS(octave=5, duration=48):\n\treturn note(octave,Freqs[8],duration)\n\ndef set_soS(freq):\n\tFreqs[8]=freq\n\ndoc=ScoreDraft.Document()\ndoc.setReferenceFrequency(264.0 *1.25)\ndoc.setTempo(120)\n\nset_re(10.0/9.0)\nset_mi(5.0/4.0)\nset_fa(4.0/3.0)\nset_so(3.0/2.0)\nset_la(5.0/3.0)\nset_ti(15.0/8.0)\nset_soS(25.0/16.0)\n\nseq1 = [do(6,72), ti(5,24), la(5,24), so(5,72)]\nseq2 = [la(3,192), BK(144), mi(4,48), so(4,48), do(5,48)]\n\nseq1 = seq1 + [fa(5,96), BL(24), so(5,24), la(5,24), do(6,24)]\nseq2 = seq2 + [re(3,192), BK(144), la(3,48), do(4,48),fa(4,48)]\n\nset_re(9.0/8.0)\nset_fa(21.0/16.0)\n\nseq1 = seq1 + [ti(5,72), la(5,24), so(5,24), fa(5,72)]\nseq2 = seq2 + [so(3,192), BK(144), re(4,48), fa(4,48), ti(4,48)]\n\nset_fa(4.0/3.0)\n\nseq1 = seq1 + [mi(5,144), BL(48)]\nseq2 = seq2 + [do(3,192), BK(144), so(3,48), do(4,48), mi(4,48)]\n\nset_re(10.0/9.0)\n\nseq1 = seq1 + [la(5,72), so(5,24), fa(5,24), mi(5,72)]\nseq2 = seq2 + [fa(3,192), BK(144), do(4,48), mi(4,48), la(4,48)]\n\nseq1 = seq1 + [re(5,72), mi(5,24), fa(5,24), la(5,72)]\nseq2 = seq2 + [re(3,192), BK(144), la(3,48), do(4,48), fa(4,48)]\n\nset_re(35.0/32.0)\nseq1 = seq1 + [soS(5,72), fa(5,24), mi(5,24), re(5,72)]\nseq2 = seq2 + [mi(3,192), BK(144), ti(3,48), re(4,48), soS(4,48)]\n\nset_re(10.0/9.0)\nseq1 = seq1 + [do(5,144), BL(48)]\nseq2 = seq2 + [la(3,192), BK(144), mi(4,48), so(4,48), do(5,48)]\n\nseq1 = seq1 + [re(5,24), la(5,72), la(5,96)]\nseq2 = seq2 + [re(3,192), BK(144), la(3,48), do(4,48), fa(4,48)]\t\n\nset_re(9.0/8.0)\nset_fa(21.0/16.0)\n\nseq1 = seq1 + [BL(96), do(6,24), ti(5,72)]\nseq2 = seq2 + [so(3,192), BK(144), re(4,48), fa(4,48), ti(4,48)]\t\n\nset_fa(4.0/3.0)\nseq1 = seq1 + [so(5,144), BL(48)]\nseq2 = seq2 + [mi(3,192), BK(144), ti(3,48), re(4,48), so(4,48)]\n\nset_re(10.0/9.0)\nseq1 = seq1 + [la(4,24), fa(5,72), fa(5,96)]\nseq2 = seq2 + [re(3,192), BK(144), la(3,48), do(4,48), fa(4,48)]\n\nset_re(9.0/8.0)\nset_fa(21.0/16.0)\nset_la(27.0/16.0)\n\nseq1 = seq1 + [BL(96), la(5,72), so(5,24)]\nseq2 = seq2 + [so(3,192), BK(144), re(4,48), fa(4,48), ti(4,48)]\t\n\nseq1 = seq1 + [fa(5,24), mi(5,120), BL(48)]\nseq2 = seq2 + [do(3,192), BK(144), so(3,48), do(4,48), mi(4,48)]\n\nset_re(10.0/9.0)\nset_fa(4.0/3.0)\nset_la(5.0/3.0)\n\nseq1 = seq1 +  [do(6,72), ti(5,24), la(5,24), so(5,72)]\nseq2 = seq2 +  [la(3,192), BK(144), mi(4,48), so(4,48), do(5,48)]\n\nseq1 = seq1 + [fa(5,96), BL(24), so(5,24), la(5,24), do(6,24)]\nseq2 = seq2 + [re(3,192), BK(144), la(3,48), do(4,48),fa(4,48)]\n\nset_re(9.0/8.0)\nset_fa(21.0/16.0)\n\nseq1 = seq1 + [ti(5,72), la(5,24), so(5,24), fa(5,72)]\nseq2 = seq2 + [so(3,192), BK(144), re(4,48), fa(4,48), ti(4,48)]\n\nset_fa(4.0/3.0)\n\nseq1 = seq1 + [mi(5,144), BL(48)]\nseq2 = seq2 + [do(3,192), BK(144), so(3,48), do(4,48), mi(4,48)]\n\nset_re(10.0/9.0)\n\nseq1 = seq1 + [la(5,72), so(5,24), fa(5,24), mi(5,72)]\nseq2 = seq2 + [fa(3,192), BK(144), do(4,48), mi(4,48), la(4,48)]\n\nseq1 = seq1 + [re(5,72), mi(5,24), fa(5,24), la(5,72)]\nseq2 = seq2 + [re(3,192), BK(144), la(3,48), do(4,48), fa(4,48)]\n\nset_re(35.0/32.0)\nseq1 = seq1 + [soS(5,72), la(5,24), ti(5,24), ti(5,72)]\nseq2 = seq2 + [mi(3,192), BK(144), ti(3,48), re(4,48), soS(4,48)]\n\nset_re(10.0/9.0)\nseq1 = seq1 + [do(6,24), ti(5,24), la(5,96), BL(48)]\nseq2 = seq2 + [la(3,192), BK(144), mi(4,48), so(4,48), do(5,48)]\n\nseq1 = seq1 + [la(5,24), so(5,72), la(5,24), so(5,24), fa(5,48)]\nseq2 = seq2 + [re(3,192), BK(144), la(3,48), do(4,48), fa(4,48)]\n\nset_re(9.0/8.0)\nset_fa(21.0/16.0)\n\nseq1 = seq1 + [BL(96), do(6,24), ti(5,72)]\nseq2 = seq2 + [so(3,192), BK(144), re(4,48), fa(4,48), ti(4,48)]\t\n\nset_re(10.0/9.0)\nset_fa(4.0/3.0)\nseq1 = seq1 + [mi(6,144), BL(48)]\nseq2 = seq2 + [fa(3,192), BK(144), do(4,48), mi(4,48), la(4,48)]\n\nseq1 = seq1 + [mi(6,24), do(6,72), do(6,96)]\nseq2 = seq2 + [re(3,192), BK(144), la(3,48), do(4,48), fa(4,48)]\n\nset_re(9.0/8.0)\nset_fa(21.0/16.0)\n\nseq1 = seq1 + [BL(96), ti(5,24), re(6,72)]\nseq2 = seq2 + [so(3,192), BK(144), re(4,48), fa(4,48), ti(4,48)]\t\n\nseq1 = seq1 + [do(6,192)]\nseq2 = seq2 + [do(3,192), BK(180), so(3,180), BK(168), do(4,168), BK(156), mi(4,156), BK(144), so(4,144), BK(132), do(5,132) ]\t\n\n\n# instrument=ScoreDraft.Piano()\ninstrument = ScoreDraft.SF2Instrument('florestan-subset.sf2', 0)\n\n\ndoc.playNoteSeq(seq1, instrument)\ndoc.playNoteSeq(seq2, instrument)\ndoc.mixDown('FlyMeToTheMoon_just.wav')\n\n#targetBuf=ScoreDraft.TrackBuffer()\n#doc.mix(targetBuf)\n#ScoreDraft.PlayTrackBuffer(targetBuf)\n\n#import time\n#while (ScoreDraft.PlayGetRemainingTime()>0.0):\n\t#time.sleep(1.0)\n\n\n"
  },
  {
    "path": "Test/FlyMeToTheMoon_eq.py",
    "content": "#!/usr/bin/python3\r\rimport ScoreDraft\rfrom ScoreDraft.Notes import *\r\rdef soS(octave=5, duration=48):\r\treturn note(octave,Freqs[8],duration)\r\rdoc=ScoreDraft.Document()\rdoc.setReferenceFrequency(264.0 *1.25)\rdoc.setTempo(120)\r\rseq1 = [do(6,72), ti(5,24), la(5,24), so(5,72)]\rseq2 = [la(3,192), BK(144), mi(4,48), so(4,48), do(5,48)]\r\rseq1 = seq1 + [fa(5,96), BL(24), so(5,24), la(5,24), do(6,24)]\rseq2 = seq2 + [re(3,192), BK(144), la(3,48), do(4,48),fa(4,48)]\r\rseq1 = seq1 + [ti(5,72), la(5,24), so(5,24), fa(5,72)]\rseq2 = seq2 + [so(3,192), BK(144), re(4,48), fa(4,48), ti(4,48)]\r\rseq1 = seq1 + [mi(5,144), BL(48)]\rseq2 = seq2 + [do(3,192), BK(144), so(3,48), do(4,48), mi(4,48)]\r\rseq1 = seq1 + [la(5,72), so(5,24), fa(5,24), mi(5,72)]\rseq2 = seq2 + [fa(3,192), BK(144), do(4,48), mi(4,48), la(4,48)]\r\rseq1 = seq1 + [re(5,72), mi(5,24), fa(5,24), la(5,72)]\rseq2 = seq2 + [re(3,192), BK(144), la(3,48), do(4,48), fa(4,48)]\r\rseq1 = seq1 + [soS(5,72), fa(5,24), mi(5,24), re(5,72)]\rseq2 = seq2 + [mi(3,192), BK(144), ti(3,48), re(4,48), soS(4,48)]\r\rseq1 = seq1 + [do(5,144), BL(48)]\rseq2 = seq2 + [la(3,192), BK(144), mi(4,48), so(4,48), do(5,48)]\r\rseq1 = seq1 + [re(5,24), la(5,72), la(5,96)]\rseq2 = seq2 + [re(3,192), BK(144), la(3,48), do(4,48), fa(4,48)]\t\r\rseq1 = seq1 + [BL(96), do(6,24), ti(5,72)]\rseq2 = seq2 + [so(3,192), BK(144), re(4,48), fa(4,48), ti(4,48)]\t\r\rseq1 = seq1 + [so(5,144), BL(48)]\rseq2 = seq2 + [mi(3,192), BK(144), ti(3,48), re(4,48), so(4,48)]\r\rseq1 = seq1 + [la(4,24), fa(5,72), fa(5,96)]\rseq2 = seq2 + [re(3,192), BK(144), la(3,48), do(4,48), fa(4,48)]\r\rseq1 = seq1 + [BL(96), la(5,72), so(5,24)]\rseq2 = seq2 + [so(3,192), BK(144), re(4,48), fa(4,48), ti(4,48)]\t\r\rseq1 = seq1 + [fa(5,24), mi(5,120), BL(48)]\rseq2 = seq2 + [do(3,192), BK(144), so(3,48), do(4,48), mi(4,48)]\r\rseq1 = seq1 +  [do(6,72), ti(5,24), la(5,24), so(5,72)]\rseq2 = seq2 +  [la(3,192), BK(144), mi(4,48), so(4,48), do(5,48)]\r\rseq1 = seq1 + [fa(5,96), BL(24), so(5,24), la(5,24), do(6,24)]\rseq2 = seq2 + [re(3,192), BK(144), la(3,48), do(4,48),fa(4,48)]\r\rseq1 = seq1 + [ti(5,72), la(5,24), so(5,24), fa(5,72)]\rseq2 = seq2 + [so(3,192), BK(144), re(4,48), fa(4,48), ti(4,48)]\r\rseq1 = seq1 + [mi(5,144), BL(48)]\rseq2 = seq2 + [do(3,192), BK(144), so(3,48), do(4,48), mi(4,48)]\r\rseq1 = seq1 + [la(5,72), so(5,24), fa(5,24), mi(5,72)]\rseq2 = seq2 + [fa(3,192), BK(144), do(4,48), mi(4,48), la(4,48)]\r\rseq1 = seq1 + [re(5,72), mi(5,24), fa(5,24), la(5,72)]\rseq2 = seq2 + [re(3,192), BK(144), la(3,48), do(4,48), fa(4,48)]\r\rseq1 = seq1 + [soS(5,72), la(5,24), ti(5,24), ti(5,72)]\rseq2 = seq2 + [mi(3,192), BK(144), ti(3,48), re(4,48), soS(4,48)]\r\rseq1 = seq1 + [do(6,24), ti(5,24), la(5,96), BL(48)]\rseq2 = seq2 + [la(3,192), BK(144), mi(4,48), so(4,48), do(5,48)]\r\rseq1 = seq1 + [la(5,24), so(5,72), la(5,24), so(5,24), fa(5,48)]\rseq2 = seq2 + [re(3,192), BK(144), la(3,48), do(4,48), fa(4,48)]\r\rseq1 = seq1 + [BL(96), do(6,24), ti(5,72)]\rseq2 = seq2 + [so(3,192), BK(144), re(4,48), fa(4,48), ti(4,48)]\t\r\rseq1 = seq1 + [mi(6,144), BL(48)]\rseq2 = seq2 + [fa(3,192), BK(144), do(4,48), mi(4,48), la(4,48)]\r\rseq1 = seq1 + [mi(6,24), do(6,72), do(6,96)]\rseq2 = seq2 + [re(3,192), BK(144), la(3,48), do(4,48), fa(4,48)]\r\rseq1 = seq1 + [BL(96), ti(5,24), re(6,72)]\rseq2 = seq2 + [so(3,192), BK(144), re(4,48), fa(4,48), ti(4,48)]\t\r\rseq1 = seq1 + [do(6,192)]\rseq2 = seq2 + [do(3,192), BK(180), so(3,180), BK(168), do(4,168), BK(156), mi(4,156), BK(144), so(4,144), BK(132), do(5,132) ]\t\r\r# instrument=ScoreDraft.Piano()\rinstrument = ScoreDraft.SF2Instrument('florestan-subset.sf2', 0)\r\rdoc.playNoteSeq(seq1, instrument)\rdoc.playNoteSeq(seq2, instrument)\rdoc.mixDown('FlyMeToTheMoon_eq.wav')\r\rScoreDraft.WriteNoteSequencesToMidi([seq1, seq2], 120, 264.0 *1.25, \"FlyMeToTheMoon.mid\")\r"
  },
  {
    "path": "Test/Hello.py",
    "content": "#!/usr/bin/python3\n\nimport ScoreDraft\nfrom ScoreDraft.Notes import *\n\ndoc=ScoreDraft.Document()\n\nseq=[do(),do(),so(),so(),la(),la(),so(5,96)]\n\ndoc.playNoteSeq(seq, ScoreDraft.KarplusStrongInstrument())\n#doc.mixDown('Hello.wav')\n\ntargetBuf=ScoreDraft.TrackBuffer(-1)\ndoc.mix(targetBuf)\n\nScoreDraft.PlayTrackBuffer(targetBuf)"
  },
  {
    "path": "Test/HelloMeteor.py",
    "content": "#!/usr/bin/python3\n\nimport ScoreDraft\nfrom ScoreDraft.Notes import *\n\ndoc=ScoreDraft.MeteorDocument()\n\nseq=[do(),do(),so(),so(),la(),la(),so(5,96)]\n\ndoc.playNoteSeq(seq, ScoreDraft.NaivePiano())\ndoc.meteor()\ndoc.mixDown('HelloMeteor.wav')\n"
  },
  {
    "path": "Test/InstrumentSamples/Ah.freq",
    "content": "261.055817\n"
  },
  {
    "path": "Test/InstrumentSamples/Cello.freq",
    "content": "65.430267\n"
  },
  {
    "path": "Test/InstrumentSamples/CleanGuitar.freq",
    "content": "263.026093\n"
  },
  {
    "path": "Test/InstrumentSamples/Lah.freq",
    "content": "260.946747\n"
  },
  {
    "path": "Test/InstrumentSamples/Piano/Alesis-Fusion-Bright-Acoustic-Piano-C2.freq",
    "content": "66.116943\n"
  },
  {
    "path": "Test/InstrumentSamples/Piano/Alesis-Fusion-Bright-Acoustic-Piano-C4.freq",
    "content": "264.071869\n"
  },
  {
    "path": "Test/InstrumentSamples/Piano/Alesis-Fusion-Bright-Acoustic-Piano-C6.freq",
    "content": "1050.000000\n"
  },
  {
    "path": "Test/InstrumentSamples/String.freq",
    "content": "262.500000\n"
  },
  {
    "path": "Test/InstrumentSamples/Violin.freq",
    "content": "525.000000\n"
  },
  {
    "path": "Test/PrintCatalog.py",
    "content": "#!/usr/bin/python3\n\nimport ScoreDraft\nScoreDraft.PrintCatalog()\n"
  },
  {
    "path": "Test/ZhenDeAiNi.ly",
    "content": "\\version \"2.18.2\"\n\\header\n{\n\ttitle = \"真的爱你\"\n\tcomposer = \"黄家驹\"\n}\n\\score\n{\n\t<<\n\t\t\\new Staff \\relative c''\n\t\t{\n\t\t\t\\time 2/4\n\t\t\tr8 g8 c d\n\t\t\te e16 e e d c8 \n\t\t\td4 r8 d16 e\n\t\t\td c c c b8 c \n\t\t\ta4 r8 c16 d\n\t\t\te e e e d8 c \n\t\t\td16 d d d c8 b\n\t\t\tc2 r8 g c d\n\t\t\te e16 e e d c8 \n\t\t\td4 r8 d16 e\n\t\t\td c c c b8 c \n\t\t\ta4 r8 c16 d\n\t\t\te e e e d8 c \n\t\t\td16 d d d c8 b\n\t\t\tc2 r4 e8 d\n\t\t\tc16 c c c c8 d \n\t\t\td4 e8 d\n\t\t\tc16 c c c e8 f \n\t\t\td2\n\t\t\tr4 e16 f8.\n\t\t\tg16 g g g g f e g\n\t\t\tg4 r8 g16 g\n\t\t\ta8 e8 e16 d16 c16 d16\n\t\t\te4 r8 e16 d16\n\t\t\tc4. c8 d4 e16 d c8\n\t\t\tc2 \n\t\t\tr4 e16 f8.\n\t\t\tg16 g g g g f e g\n\t\t\tg4 r8 g16 g\n\t\t\ta8 e8 e16 d16 c16 d16\n\t\t\te4 r8 e16 d16\n\t\t\tc4. c8 d4 e16 d c8\n\t\t\tc2 \n\t\t}\n\t\t\\new Staff \\relative c\n\t\t{\n\t\t\t\\clef \"bass\"\n\t\t\tc8 g' <c e> g\n\t\t\tc, g' <c e> g \n\t\t\tg, d' <g b> d\n\t\t\ta e' <a c> e\n\t\t\tf, c' <f a> c\n\t\t\tc g' <c e> g \n\t\t\tg, d' <g b> d\n\t\t\tc g' <c e> g \n\t\t\t<c e> g <c e> g\n\t\t\tc, g' <c e> g \n\t\t\tg, d' <g b> d\n\t\t\ta e' <a c> e\n\t\t\tf, c' <f a> c\n\t\t\tc g' <c e> g\n\t\t\tg, d' <g b> d\n\t\t\tc g' <c e> g \n\t\t\t<c e> g <c e> g\n\t\t\tf, c' <f a> c\n\t\t\tg d' <g b> d\n\t\t\tf, c' <f a> c\n\t\t\tg d' <g b> d\n\t\t\t<g b> d <g b> d\n\t\t\tc g' <c e> g \n\t\t\tg, d' <g b> d\n\t\t\ta e' <a c> e\n\t\t\te, b' <e g> b\n\t\t\tf c' <f a> c\n\t\t\tg d' <g b> d\n\t\t\tc g' <c e> g \n\t\t\t<c e> g <c e> g \n\t\t\tc, g' <c e> g \n\t\t\tg, d' <g b> d\n\t\t\ta e' <a c> e\n\t\t\te, b' <e g> b\n\t\t\tf c' <f a> c\n\t\t\tg d' <g b> d\n\t\t\tc g' <c e> g\n\t\t\t<c e>2\n\t\t}\n\t\t\\drums\n\t\t{\n\t\t\tbd8 hh16 hh hh hh hh hh\t    \n\t\t\tbd8 hh16 hh hh hh hh hh\n\t\t\tbd8 hh16 hh hh hh hh hh\n\t\t\tbd8 hh16 hh hh hh hh hh\n\t\t\tbd8 hh16 hh hh hh hh hh\n\t\t\tbd8 hh16 hh hh hh hh hh\n\t\t\tbd8 hh16 hh hh hh hh hh\n\t\t\tbd8 hh16 hh hh hh hh hh\n\t\t\tbd8 hh16 hh hh hh hh hh\n\t\t\tbd8 hh16 hh hh hh hh hh\n\t\t\tbd8 hh16 hh hh hh hh hh\n\t\t\tbd8 hh16 hh hh hh hh hh\n\t\t\tbd8 hh16 hh hh hh hh hh\n\t\t\tbd8 hh16 hh hh hh hh hh\n\t\t\tbd8 hh16 hh hh hh hh hh\n\t\t\tbd8 hh16 hh hh hh hh hh\n\t\t\tbd8 hh16 hh hh hh hh hh\n\t\t\tbd8 hh16 hh hh hh hh hh\n\t\t\tbd8 hh16 hh hh hh hh hh\n\t\t\tbd8 hh16 hh hh hh hh hh\n\t\t\tbd8 hh16 hh hh hh hh hh\n\t\t\tbd8 hh16 hh hh hh hh hh\n\t\t\tbd8 hh16 hh hh hh hh hh\n\t\t\tbd8 hh16 hh hh hh hh hh\n\t\t\tbd8 hh16 hh hh hh hh hh\n\t\t\tbd8 hh16 hh hh hh hh hh\n\t\t\tbd8 hh16 hh hh hh hh hh\n\t\t\tbd8 hh16 hh hh hh hh hh\n\t\t\tbd8 hh16 hh hh hh hh hh\n\t\t\tbd8 hh16 hh hh hh hh hh\n\t\t\tbd8 hh16 hh hh hh hh hh\n\t\t\tbd8 hh16 hh hh hh hh hh\n\t\t\tbd8 hh16 hh hh hh hh hh\n\t\t\tbd8 hh16 hh hh hh hh hh\n\t\t\tbd8 hh16 hh hh hh hh hh\n\t\t\tbd8 hh16 hh hh hh hh hh\n\t\t\tbd8 hh16 hh hh hh hh hh\n\t\t}\n\t>>\n\t\\layout {}\n\t\\midi\n\t{\n\t\t\\tempo 4 = 72\n\t}\n}\n"
  },
  {
    "path": "Test/ZhenDeAiNi.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE score-partwise PUBLIC \"-//Recordare//DTD MusicXML 2.0 Partwise//EN\"\n                                \"http://www.musicxml.org/dtds/partwise.dtd\">\n<score-partwise version=\"3.0\">\n  <identification>\n    <encoding>\n      <software>python-ly 0.9.7</software>\n      <encoding-date>2021-11-24</encoding-date>\n    </encoding>\n  </identification>\n  <part-list>\n    <score-part id=\"P1\">\n      <part-name />\n    </score-part>\n    <score-part id=\"P2\">\n      <part-name />\n    </score-part>\n  </part-list>\n  <part id=\"P1\">\n    <measure number=\"1\">\n      <attributes>\n        <divisions>8</divisions>\n        <time>\n          <beats>2</beats>\n          <beat-type>4</beat-type>\n        </time>\n        <clef>\n          <sign>G</sign>\n          <line>2</line>\n        </clef>\n      </attributes>\n      <note>\n        <rest />\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>G</step>\n          <octave>4</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>C</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>D</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <backup>\n        <duration>16</duration>\n      </backup>\n    </measure>\n    <measure number=\"2\">\n      <note>\n        <pitch>\n          <step>E</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>E</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>2</duration>\n        <voice>1</voice>\n        <type>16th</type>\n      </note>\n      <note>\n        <pitch>\n          <step>E</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>2</duration>\n        <voice>1</voice>\n        <type>16th</type>\n      </note>\n      <note>\n        <pitch>\n          <step>E</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>2</duration>\n        <voice>1</voice>\n        <type>16th</type>\n      </note>\n      <note>\n        <pitch>\n          <step>D</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>2</duration>\n        <voice>1</voice>\n        <type>16th</type>\n      </note>\n      <note>\n        <pitch>\n          <step>C</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n    </measure>\n    <measure number=\"3\">\n      <note>\n        <pitch>\n          <step>D</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>8</duration>\n        <voice>1</voice>\n        <type>quarter</type>\n      </note>\n      <note>\n        <rest />\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>D</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>2</duration>\n        <voice>1</voice>\n        <type>16th</type>\n      </note>\n      <note>\n        <pitch>\n          <step>E</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>2</duration>\n        <voice>1</voice>\n        <type>16th</type>\n      </note>\n    </measure>\n    <measure number=\"4\">\n      <note>\n        <pitch>\n          <step>D</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>2</duration>\n        <voice>1</voice>\n        <type>16th</type>\n      </note>\n      <note>\n        <pitch>\n          <step>C</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>2</duration>\n        <voice>1</voice>\n        <type>16th</type>\n      </note>\n      <note>\n        <pitch>\n          <step>C</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>2</duration>\n        <voice>1</voice>\n        <type>16th</type>\n      </note>\n      <note>\n        <pitch>\n          <step>C</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>2</duration>\n        <voice>1</voice>\n        <type>16th</type>\n      </note>\n      <note>\n        <pitch>\n          <step>B</step>\n          <octave>4</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>C</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n    </measure>\n    <measure number=\"5\">\n      <note>\n        <pitch>\n          <step>A</step>\n          <octave>4</octave>\n        </pitch>\n        <duration>8</duration>\n        <voice>1</voice>\n        <type>quarter</type>\n      </note>\n      <note>\n        <rest />\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>C</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>2</duration>\n        <voice>1</voice>\n        <type>16th</type>\n      </note>\n      <note>\n        <pitch>\n          <step>D</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>2</duration>\n        <voice>1</voice>\n        <type>16th</type>\n      </note>\n    </measure>\n    <measure number=\"6\">\n      <note>\n        <pitch>\n          <step>E</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>2</duration>\n        <voice>1</voice>\n        <type>16th</type>\n      </note>\n      <note>\n        <pitch>\n          <step>E</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>2</duration>\n        <voice>1</voice>\n        <type>16th</type>\n      </note>\n      <note>\n        <pitch>\n          <step>E</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>2</duration>\n        <voice>1</voice>\n        <type>16th</type>\n      </note>\n      <note>\n        <pitch>\n          <step>E</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>2</duration>\n        <voice>1</voice>\n        <type>16th</type>\n      </note>\n      <note>\n        <pitch>\n          <step>D</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>C</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n    </measure>\n    <measure number=\"7\">\n      <note>\n        <pitch>\n          <step>D</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>2</duration>\n        <voice>1</voice>\n        <type>16th</type>\n      </note>\n      <note>\n        <pitch>\n          <step>D</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>2</duration>\n        <voice>1</voice>\n        <type>16th</type>\n      </note>\n      <note>\n        <pitch>\n          <step>D</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>2</duration>\n        <voice>1</voice>\n        <type>16th</type>\n      </note>\n      <note>\n        <pitch>\n          <step>D</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>2</duration>\n        <voice>1</voice>\n        <type>16th</type>\n      </note>\n      <note>\n        <pitch>\n          <step>C</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>B</step>\n          <octave>4</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n    </measure>\n    <measure number=\"8\">\n      <note>\n        <pitch>\n          <step>C</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>16</duration>\n        <voice>1</voice>\n        <type>half</type>\n      </note>\n    </measure>\n    <measure number=\"9\">\n      <note>\n        <rest />\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>G</step>\n          <octave>4</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>C</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>D</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n    </measure>\n    <measure number=\"10\">\n      <note>\n        <pitch>\n          <step>E</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>E</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>2</duration>\n        <voice>1</voice>\n        <type>16th</type>\n      </note>\n      <note>\n        <pitch>\n          <step>E</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>2</duration>\n        <voice>1</voice>\n        <type>16th</type>\n      </note>\n      <note>\n        <pitch>\n          <step>E</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>2</duration>\n        <voice>1</voice>\n        <type>16th</type>\n      </note>\n      <note>\n        <pitch>\n          <step>D</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>2</duration>\n        <voice>1</voice>\n        <type>16th</type>\n      </note>\n      <note>\n        <pitch>\n          <step>C</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n    </measure>\n    <measure number=\"11\">\n      <note>\n        <pitch>\n          <step>D</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>8</duration>\n        <voice>1</voice>\n        <type>quarter</type>\n      </note>\n      <note>\n        <rest />\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>D</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>2</duration>\n        <voice>1</voice>\n        <type>16th</type>\n      </note>\n      <note>\n        <pitch>\n          <step>E</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>2</duration>\n        <voice>1</voice>\n        <type>16th</type>\n      </note>\n    </measure>\n    <measure number=\"12\">\n      <note>\n        <pitch>\n          <step>D</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>2</duration>\n        <voice>1</voice>\n        <type>16th</type>\n      </note>\n      <note>\n        <pitch>\n          <step>C</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>2</duration>\n        <voice>1</voice>\n        <type>16th</type>\n      </note>\n      <note>\n        <pitch>\n          <step>C</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>2</duration>\n        <voice>1</voice>\n        <type>16th</type>\n      </note>\n      <note>\n        <pitch>\n          <step>C</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>2</duration>\n        <voice>1</voice>\n        <type>16th</type>\n      </note>\n      <note>\n        <pitch>\n          <step>B</step>\n          <octave>4</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>C</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n    </measure>\n    <measure number=\"13\">\n      <note>\n        <pitch>\n          <step>A</step>\n          <octave>4</octave>\n        </pitch>\n        <duration>8</duration>\n        <voice>1</voice>\n        <type>quarter</type>\n      </note>\n      <note>\n        <rest />\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>C</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>2</duration>\n        <voice>1</voice>\n        <type>16th</type>\n      </note>\n      <note>\n        <pitch>\n          <step>D</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>2</duration>\n        <voice>1</voice>\n        <type>16th</type>\n      </note>\n    </measure>\n    <measure number=\"14\">\n      <note>\n        <pitch>\n          <step>E</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>2</duration>\n        <voice>1</voice>\n        <type>16th</type>\n      </note>\n      <note>\n        <pitch>\n          <step>E</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>2</duration>\n        <voice>1</voice>\n        <type>16th</type>\n      </note>\n      <note>\n        <pitch>\n          <step>E</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>2</duration>\n        <voice>1</voice>\n        <type>16th</type>\n      </note>\n      <note>\n        <pitch>\n          <step>E</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>2</duration>\n        <voice>1</voice>\n        <type>16th</type>\n      </note>\n      <note>\n        <pitch>\n          <step>D</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>C</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n    </measure>\n    <measure number=\"15\">\n      <note>\n        <pitch>\n          <step>D</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>2</duration>\n        <voice>1</voice>\n        <type>16th</type>\n      </note>\n      <note>\n        <pitch>\n          <step>D</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>2</duration>\n        <voice>1</voice>\n        <type>16th</type>\n      </note>\n      <note>\n        <pitch>\n          <step>D</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>2</duration>\n        <voice>1</voice>\n        <type>16th</type>\n      </note>\n      <note>\n        <pitch>\n          <step>D</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>2</duration>\n        <voice>1</voice>\n        <type>16th</type>\n      </note>\n      <note>\n        <pitch>\n          <step>C</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>B</step>\n          <octave>4</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n    </measure>\n    <measure number=\"16\">\n      <note>\n        <pitch>\n          <step>C</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>16</duration>\n        <voice>1</voice>\n        <type>half</type>\n      </note>\n    </measure>\n    <measure number=\"17\">\n      <note>\n        <rest />\n        <duration>8</duration>\n        <voice>1</voice>\n        <type>quarter</type>\n      </note>\n      <note>\n        <pitch>\n          <step>E</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>D</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n    </measure>\n    <measure number=\"18\">\n      <note>\n        <pitch>\n          <step>C</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>2</duration>\n        <voice>1</voice>\n        <type>16th</type>\n      </note>\n      <note>\n        <pitch>\n          <step>C</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>2</duration>\n        <voice>1</voice>\n        <type>16th</type>\n      </note>\n      <note>\n        <pitch>\n          <step>C</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>2</duration>\n        <voice>1</voice>\n        <type>16th</type>\n      </note>\n      <note>\n        <pitch>\n          <step>C</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>2</duration>\n        <voice>1</voice>\n        <type>16th</type>\n      </note>\n      <note>\n        <pitch>\n          <step>C</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>D</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n    </measure>\n    <measure number=\"19\">\n      <note>\n        <pitch>\n          <step>D</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>8</duration>\n        <voice>1</voice>\n        <type>quarter</type>\n      </note>\n      <note>\n        <pitch>\n          <step>E</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>D</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n    </measure>\n    <measure number=\"20\">\n      <note>\n        <pitch>\n          <step>C</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>2</duration>\n        <voice>1</voice>\n        <type>16th</type>\n      </note>\n      <note>\n        <pitch>\n          <step>C</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>2</duration>\n        <voice>1</voice>\n        <type>16th</type>\n      </note>\n      <note>\n        <pitch>\n          <step>C</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>2</duration>\n        <voice>1</voice>\n        <type>16th</type>\n      </note>\n      <note>\n        <pitch>\n          <step>C</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>2</duration>\n        <voice>1</voice>\n        <type>16th</type>\n      </note>\n      <note>\n        <pitch>\n          <step>E</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>F</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n    </measure>\n    <measure number=\"21\">\n      <note>\n        <pitch>\n          <step>D</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>16</duration>\n        <voice>1</voice>\n        <type>half</type>\n      </note>\n    </measure>\n    <measure number=\"22\">\n      <note>\n        <rest />\n        <duration>8</duration>\n        <voice>1</voice>\n        <type>quarter</type>\n      </note>\n      <note>\n        <pitch>\n          <step>E</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>2</duration>\n        <voice>1</voice>\n        <type>16th</type>\n      </note>\n      <note>\n        <pitch>\n          <step>F</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>6</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n        <dot />\n      </note>\n    </measure>\n    <measure number=\"23\">\n      <note>\n        <pitch>\n          <step>G</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>2</duration>\n        <voice>1</voice>\n        <type>16th</type>\n      </note>\n      <note>\n        <pitch>\n          <step>G</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>2</duration>\n        <voice>1</voice>\n        <type>16th</type>\n      </note>\n      <note>\n        <pitch>\n          <step>G</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>2</duration>\n        <voice>1</voice>\n        <type>16th</type>\n      </note>\n      <note>\n        <pitch>\n          <step>G</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>2</duration>\n        <voice>1</voice>\n        <type>16th</type>\n      </note>\n      <note>\n        <pitch>\n          <step>G</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>2</duration>\n        <voice>1</voice>\n        <type>16th</type>\n      </note>\n      <note>\n        <pitch>\n          <step>F</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>2</duration>\n        <voice>1</voice>\n        <type>16th</type>\n      </note>\n      <note>\n        <pitch>\n          <step>E</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>2</duration>\n        <voice>1</voice>\n        <type>16th</type>\n      </note>\n      <note>\n        <pitch>\n          <step>G</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>2</duration>\n        <voice>1</voice>\n        <type>16th</type>\n      </note>\n    </measure>\n    <measure number=\"24\">\n      <note>\n        <pitch>\n          <step>G</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>8</duration>\n        <voice>1</voice>\n        <type>quarter</type>\n      </note>\n      <note>\n        <rest />\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>G</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>2</duration>\n        <voice>1</voice>\n        <type>16th</type>\n      </note>\n      <note>\n        <pitch>\n          <step>G</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>2</duration>\n        <voice>1</voice>\n        <type>16th</type>\n      </note>\n    </measure>\n    <measure number=\"25\">\n      <note>\n        <pitch>\n          <step>A</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>E</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>E</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>2</duration>\n        <voice>1</voice>\n        <type>16th</type>\n      </note>\n      <note>\n        <pitch>\n          <step>D</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>2</duration>\n        <voice>1</voice>\n        <type>16th</type>\n      </note>\n      <note>\n        <pitch>\n          <step>C</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>2</duration>\n        <voice>1</voice>\n        <type>16th</type>\n      </note>\n      <note>\n        <pitch>\n          <step>D</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>2</duration>\n        <voice>1</voice>\n        <type>16th</type>\n      </note>\n    </measure>\n    <measure number=\"26\">\n      <note>\n        <pitch>\n          <step>E</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>8</duration>\n        <voice>1</voice>\n        <type>quarter</type>\n      </note>\n      <note>\n        <rest />\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>E</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>2</duration>\n        <voice>1</voice>\n        <type>16th</type>\n      </note>\n      <note>\n        <pitch>\n          <step>D</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>2</duration>\n        <voice>1</voice>\n        <type>16th</type>\n      </note>\n    </measure>\n    <measure number=\"27\">\n      <note>\n        <pitch>\n          <step>C</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>12</duration>\n        <voice>1</voice>\n        <type>quarter</type>\n        <dot />\n      </note>\n      <note>\n        <pitch>\n          <step>C</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n    </measure>\n    <measure number=\"28\">\n      <note>\n        <pitch>\n          <step>D</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>8</duration>\n        <voice>1</voice>\n        <type>quarter</type>\n      </note>\n      <note>\n        <pitch>\n          <step>E</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>2</duration>\n        <voice>1</voice>\n        <type>16th</type>\n      </note>\n      <note>\n        <pitch>\n          <step>D</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>2</duration>\n        <voice>1</voice>\n        <type>16th</type>\n      </note>\n      <note>\n        <pitch>\n          <step>C</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n    </measure>\n    <measure number=\"29\">\n      <note>\n        <pitch>\n          <step>C</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>16</duration>\n        <voice>1</voice>\n        <type>half</type>\n      </note>\n    </measure>\n    <measure number=\"30\">\n      <note>\n        <rest />\n        <duration>8</duration>\n        <voice>1</voice>\n        <type>quarter</type>\n      </note>\n      <note>\n        <pitch>\n          <step>E</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>2</duration>\n        <voice>1</voice>\n        <type>16th</type>\n      </note>\n      <note>\n        <pitch>\n          <step>F</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>6</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n        <dot />\n      </note>\n    </measure>\n    <measure number=\"31\">\n      <note>\n        <pitch>\n          <step>G</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>2</duration>\n        <voice>1</voice>\n        <type>16th</type>\n      </note>\n      <note>\n        <pitch>\n          <step>G</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>2</duration>\n        <voice>1</voice>\n        <type>16th</type>\n      </note>\n      <note>\n        <pitch>\n          <step>G</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>2</duration>\n        <voice>1</voice>\n        <type>16th</type>\n      </note>\n      <note>\n        <pitch>\n          <step>G</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>2</duration>\n        <voice>1</voice>\n        <type>16th</type>\n      </note>\n      <note>\n        <pitch>\n          <step>G</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>2</duration>\n        <voice>1</voice>\n        <type>16th</type>\n      </note>\n      <note>\n        <pitch>\n          <step>F</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>2</duration>\n        <voice>1</voice>\n        <type>16th</type>\n      </note>\n      <note>\n        <pitch>\n          <step>E</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>2</duration>\n        <voice>1</voice>\n        <type>16th</type>\n      </note>\n      <note>\n        <pitch>\n          <step>G</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>2</duration>\n        <voice>1</voice>\n        <type>16th</type>\n      </note>\n    </measure>\n    <measure number=\"32\">\n      <note>\n        <pitch>\n          <step>G</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>8</duration>\n        <voice>1</voice>\n        <type>quarter</type>\n      </note>\n      <note>\n        <rest />\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>G</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>2</duration>\n        <voice>1</voice>\n        <type>16th</type>\n      </note>\n      <note>\n        <pitch>\n          <step>G</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>2</duration>\n        <voice>1</voice>\n        <type>16th</type>\n      </note>\n    </measure>\n    <measure number=\"33\">\n      <note>\n        <pitch>\n          <step>A</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>E</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>E</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>2</duration>\n        <voice>1</voice>\n        <type>16th</type>\n      </note>\n      <note>\n        <pitch>\n          <step>D</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>2</duration>\n        <voice>1</voice>\n        <type>16th</type>\n      </note>\n      <note>\n        <pitch>\n          <step>C</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>2</duration>\n        <voice>1</voice>\n        <type>16th</type>\n      </note>\n      <note>\n        <pitch>\n          <step>D</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>2</duration>\n        <voice>1</voice>\n        <type>16th</type>\n      </note>\n    </measure>\n    <measure number=\"34\">\n      <note>\n        <pitch>\n          <step>E</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>8</duration>\n        <voice>1</voice>\n        <type>quarter</type>\n      </note>\n      <note>\n        <rest />\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>E</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>2</duration>\n        <voice>1</voice>\n        <type>16th</type>\n      </note>\n      <note>\n        <pitch>\n          <step>D</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>2</duration>\n        <voice>1</voice>\n        <type>16th</type>\n      </note>\n    </measure>\n    <measure number=\"35\">\n      <note>\n        <pitch>\n          <step>C</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>12</duration>\n        <voice>1</voice>\n        <type>quarter</type>\n        <dot />\n      </note>\n      <note>\n        <pitch>\n          <step>C</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n    </measure>\n    <measure number=\"36\">\n      <note>\n        <pitch>\n          <step>D</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>8</duration>\n        <voice>1</voice>\n        <type>quarter</type>\n      </note>\n      <note>\n        <pitch>\n          <step>E</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>2</duration>\n        <voice>1</voice>\n        <type>16th</type>\n      </note>\n      <note>\n        <pitch>\n          <step>D</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>2</duration>\n        <voice>1</voice>\n        <type>16th</type>\n      </note>\n      <note>\n        <pitch>\n          <step>C</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n    </measure>\n    <measure number=\"37\">\n      <note>\n        <pitch>\n          <step>C</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>16</duration>\n        <voice>1</voice>\n        <type>half</type>\n      </note>\n    </measure>\n    <measure number=\"38\">\n      <note>\n        <rest />\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>G</step>\n          <octave>4</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>C</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>D</step>\n          <octave>5</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n    </measure>\n  </part>\n  <part id=\"P2\">\n    <measure number=\"1\">\n      <attributes>\n        <divisions>8</divisions>\n        <time>\n          <beats>2</beats>\n          <beat-type>4</beat-type>\n        </time>\n        <clef>\n          <sign>F</sign>\n          <line>4</line>\n        </clef>\n      </attributes>\n      <note>\n        <pitch>\n          <step>C</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>G</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>C</step>\n          <octave>4</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <chord />\n        <pitch>\n          <step>E</step>\n          <octave>4</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>G</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>C</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <backup>\n        <duration>20</duration>\n      </backup>\n      <backup>\n        <duration>20</duration>\n      </backup>\n    </measure>\n    <measure number=\"2\">\n      <note>\n        <pitch>\n          <step>G</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>C</step>\n          <octave>4</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <chord />\n        <pitch>\n          <step>E</step>\n          <octave>4</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>G</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>G</step>\n          <octave>2</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>D</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n    </measure>\n    <measure number=\"3\">\n      <note>\n        <pitch>\n          <step>G</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <chord />\n        <pitch>\n          <step>B</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>D</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>A</step>\n          <octave>2</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>E</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>A</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <chord />\n        <pitch>\n          <step>C</step>\n          <octave>4</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>E</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n    </measure>\n    <measure number=\"4\">\n      <note>\n        <pitch>\n          <step>F</step>\n          <octave>2</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>C</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>F</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <chord />\n        <pitch>\n          <step>A</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>C</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>C</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n    </measure>\n    <measure number=\"5\">\n      <note>\n        <pitch>\n          <step>G</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>C</step>\n          <octave>4</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <chord />\n        <pitch>\n          <step>E</step>\n          <octave>4</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>G</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>G</step>\n          <octave>2</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>D</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n    </measure>\n    <measure number=\"6\">\n      <note>\n        <pitch>\n          <step>G</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <chord />\n        <pitch>\n          <step>B</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>D</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>C</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>G</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>C</step>\n          <octave>4</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <chord />\n        <pitch>\n          <step>E</step>\n          <octave>4</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>G</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n    </measure>\n    <measure number=\"7\">\n      <note>\n        <pitch>\n          <step>C</step>\n          <octave>4</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <chord />\n        <pitch>\n          <step>E</step>\n          <octave>4</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>G</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>C</step>\n          <octave>4</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <chord />\n        <pitch>\n          <step>E</step>\n          <octave>4</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>G</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>C</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>G</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n    </measure>\n    <measure number=\"8\">\n      <note>\n        <pitch>\n          <step>C</step>\n          <octave>4</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <chord />\n        <pitch>\n          <step>E</step>\n          <octave>4</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>G</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>G</step>\n          <octave>2</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>D</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>G</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <chord />\n        <pitch>\n          <step>B</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>D</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n    </measure>\n    <measure number=\"9\">\n      <note>\n        <pitch>\n          <step>A</step>\n          <octave>2</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>E</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>A</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <chord />\n        <pitch>\n          <step>C</step>\n          <octave>4</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>E</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>F</step>\n          <octave>2</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n    </measure>\n    <measure number=\"10\">\n      <note>\n        <pitch>\n          <step>C</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>F</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <chord />\n        <pitch>\n          <step>A</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>C</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>C</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>G</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n    </measure>\n    <measure number=\"11\">\n      <note>\n        <pitch>\n          <step>C</step>\n          <octave>4</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <chord />\n        <pitch>\n          <step>E</step>\n          <octave>4</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>G</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>G</step>\n          <octave>2</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>D</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>G</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <chord />\n        <pitch>\n          <step>B</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>D</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n    </measure>\n    <measure number=\"12\">\n      <note>\n        <pitch>\n          <step>C</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>G</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>C</step>\n          <octave>4</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <chord />\n        <pitch>\n          <step>E</step>\n          <octave>4</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>G</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>C</step>\n          <octave>4</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <chord />\n        <pitch>\n          <step>E</step>\n          <octave>4</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>G</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n    </measure>\n    <measure number=\"13\">\n      <note>\n        <pitch>\n          <step>C</step>\n          <octave>4</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <chord />\n        <pitch>\n          <step>E</step>\n          <octave>4</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>G</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>F</step>\n          <octave>2</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>C</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>F</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <chord />\n        <pitch>\n          <step>A</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>C</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n    </measure>\n    <measure number=\"14\">\n      <note>\n        <pitch>\n          <step>G</step>\n          <octave>2</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>D</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>G</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <chord />\n        <pitch>\n          <step>B</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>D</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>F</step>\n          <octave>2</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n    </measure>\n    <measure number=\"15\">\n      <note>\n        <pitch>\n          <step>C</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>F</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <chord />\n        <pitch>\n          <step>A</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>C</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>G</step>\n          <octave>2</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>D</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n    </measure>\n    <measure number=\"16\">\n      <note>\n        <pitch>\n          <step>G</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <chord />\n        <pitch>\n          <step>B</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>D</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>G</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <chord />\n        <pitch>\n          <step>B</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>D</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>G</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <chord />\n        <pitch>\n          <step>B</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>D</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>C</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n    </measure>\n    <measure number=\"17\">\n      <note>\n        <pitch>\n          <step>G</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>C</step>\n          <octave>4</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <chord />\n        <pitch>\n          <step>E</step>\n          <octave>4</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>G</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>G</step>\n          <octave>2</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>D</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n    </measure>\n    <measure number=\"18\">\n      <note>\n        <pitch>\n          <step>G</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <chord />\n        <pitch>\n          <step>B</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>D</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>A</step>\n          <octave>2</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>E</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>A</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <chord />\n        <pitch>\n          <step>C</step>\n          <octave>4</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>E</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n    </measure>\n    <measure number=\"19\">\n      <note>\n        <pitch>\n          <step>E</step>\n          <octave>2</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>B</step>\n          <octave>2</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>E</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <chord />\n        <pitch>\n          <step>G</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>B</step>\n          <octave>2</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>F</step>\n          <octave>2</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n    </measure>\n    <measure number=\"20\">\n      <note>\n        <pitch>\n          <step>C</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>F</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <chord />\n        <pitch>\n          <step>A</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>C</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>G</step>\n          <octave>2</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>D</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n    </measure>\n    <measure number=\"21\">\n      <note>\n        <pitch>\n          <step>G</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <chord />\n        <pitch>\n          <step>B</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>D</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>C</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>G</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>C</step>\n          <octave>4</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <chord />\n        <pitch>\n          <step>E</step>\n          <octave>4</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>G</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n    </measure>\n    <measure number=\"22\">\n      <note>\n        <pitch>\n          <step>C</step>\n          <octave>4</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <chord />\n        <pitch>\n          <step>E</step>\n          <octave>4</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>G</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>C</step>\n          <octave>4</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <chord />\n        <pitch>\n          <step>E</step>\n          <octave>4</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>G</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>C</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>G</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n    </measure>\n    <measure number=\"23\">\n      <note>\n        <pitch>\n          <step>C</step>\n          <octave>4</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <chord />\n        <pitch>\n          <step>E</step>\n          <octave>4</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>G</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>G</step>\n          <octave>2</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>D</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>G</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <chord />\n        <pitch>\n          <step>B</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>D</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n    </measure>\n    <measure number=\"24\">\n      <note>\n        <pitch>\n          <step>A</step>\n          <octave>2</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>E</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>A</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <chord />\n        <pitch>\n          <step>C</step>\n          <octave>4</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>E</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>E</step>\n          <octave>2</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n    </measure>\n    <measure number=\"25\">\n      <note>\n        <pitch>\n          <step>B</step>\n          <octave>2</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>E</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <chord />\n        <pitch>\n          <step>G</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>B</step>\n          <octave>2</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>F</step>\n          <octave>2</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>C</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n    </measure>\n    <measure number=\"26\">\n      <note>\n        <pitch>\n          <step>F</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <chord />\n        <pitch>\n          <step>A</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>C</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>G</step>\n          <octave>2</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>D</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>G</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <chord />\n        <pitch>\n          <step>B</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>D</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n    </measure>\n    <measure number=\"27\">\n      <note>\n        <pitch>\n          <step>C</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>G</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>C</step>\n          <octave>4</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <chord />\n        <pitch>\n          <step>E</step>\n          <octave>4</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>G</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>C</step>\n          <octave>4</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <chord />\n        <pitch>\n          <step>E</step>\n          <octave>4</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>G</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n    </measure>\n    <measure number=\"28\">\n      <note>\n        <pitch>\n          <step>C</step>\n          <octave>4</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <chord />\n        <pitch>\n          <step>E</step>\n          <octave>4</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <note>\n        <pitch>\n          <step>G</step>\n          <octave>3</octave>\n        </pitch>\n        <duration>4</duration>\n        <voice>1</voice>\n        <type>eighth</type>\n      </note>\n      <direction placement=\"above\">\n        <direction-type>\n          <metronome>\n            <beat-unit>quarter</beat-unit>\n            <per-minute>72</per-minute>\n          </metronome>\n        </direction-type>\n        <sound tempo=\"72\" />\n      </direction>\n    </measure>\n    <measure number=\"29\" />\n    <measure number=\"30\" />\n    <measure number=\"31\" />\n    <measure number=\"32\" />\n    <measure number=\"33\" />\n    <measure number=\"34\" />\n    <measure number=\"35\" />\n    <measure number=\"36\" />\n    <measure number=\"37\" />\n    <measure number=\"38\" />\n  </part>\n</score-partwise>\n"
  },
  {
    "path": "Test/ZhenDeAiNi.yaml",
    "content": "score:\n    title: 真的爱你\n    composer: 黄家驹\n    tempo: 72    \n    staffs:\n        -\n            is_drum: false\n            relative: c''\n            instrument: Arachno(40)\n            content: |\n                \\time 2/4\n                r8 g8 c d\n                e e16 e e d c8 \n                d4 r8 d16 e\n                d c c c b8 c \n                a4 r8 c16 d\n                e e e e d8 c \n                d16 d d d c8 b\n                c2 r8 g c d\n                e e16 e e d c8 \n                d4 r8 d16 e\n                d c c c b8 c \n                a4 r8 c16 d\n                e e e e d8 c \n                d16 d d d c8 b\n                c2 r4 e8 d\n                c16 c c c c8 d \n                d4 e8 d\n                c16 c c c e8 f \n                d2\n                r4 e16 f8.\n                g16 g g g g f e g\n                g4 r8 g16 g\n                a8 e8 e16 d16 c16 d16\n                e4 r8 e16 d16\n                c4. c8 d4 e16 d c8\n                c2 \n                r4 e16 f8.\n                g16 g g g g f e g\n                g4 r8 g16 g\n                a8 e8 e16 d16 c16 d16\n                e4 r8 e16 d16\n                c4. c8 d4 e16 d c8\n                c2 \n            \n        - \n            is_drum: false\n            relative: c\n            instrument: Arachno(0)\n            content: |\n                \\clef \"bass\"\n                c8 g' <c e> g\n                c, g' <c e> g \n                g, d' <g b> d\n                a e' <a c> e\n                f, c' <f a> c\n                c g' <c e> g \n                g, d' <g b> d\n                c g' <c e> g \n                <c e> g <c e> g\n                c, g' <c e> g \n                g, d' <g b> d\n                a e' <a c> e\n                f, c' <f a> c\n                c g' <c e> g\n                g, d' <g b> d\n                c g' <c e> g \n                <c e> g <c e> g\n                f, c' <f a> c\n                g d' <g b> d\n                f, c' <f a> c\n                g d' <g b> d\n                <g b> d <g b> d\n                c g' <c e> g \n                g, d' <g b> d\n                a e' <a c> e\n                e, b' <e g> b\n                f c' <f a> c\n                g d' <g b> d\n                c g' <c e> g \n                <c e> g <c e> g \n                c, g' <c e> g \n                g, d' <g b> d\n                a e' <a c> e\n                e, b' <e g> b\n                f c' <f a> c\n                g d' <g b> d\n                c g' <c e> g\n                <c e>2\n        -\n            is_drum: true\n            instrument: Arachno(128)\n            content: |\n                bd8 hh16 hh hh hh hh hh\t    \n                bd8 hh16 hh hh hh hh hh\n                bd8 hh16 hh hh hh hh hh\n                bd8 hh16 hh hh hh hh hh\n                bd8 hh16 hh hh hh hh hh\n                bd8 hh16 hh hh hh hh hh\n                bd8 hh16 hh hh hh hh hh\n                bd8 hh16 hh hh hh hh hh\n                bd8 hh16 hh hh hh hh hh\n                bd8 hh16 hh hh hh hh hh\n                bd8 hh16 hh hh hh hh hh\n                bd8 hh16 hh hh hh hh hh\n                bd8 hh16 hh hh hh hh hh\n                bd8 hh16 hh hh hh hh hh\n                bd8 hh16 hh hh hh hh hh\n                bd8 hh16 hh hh hh hh hh\n                bd8 hh16 hh hh hh hh hh\n                bd8 hh16 hh hh hh hh hh\n                bd8 hh16 hh hh hh hh hh\n                bd8 hh16 hh hh hh hh hh\n                bd8 hh16 hh hh hh hh hh\n                bd8 hh16 hh hh hh hh hh\n                bd8 hh16 hh hh hh hh hh\n                bd8 hh16 hh hh hh hh hh\n                bd8 hh16 hh hh hh hh hh\n                bd8 hh16 hh hh hh hh hh\n                bd8 hh16 hh hh hh hh hh\n                bd8 hh16 hh hh hh hh hh\n                bd8 hh16 hh hh hh hh hh\n                bd8 hh16 hh hh hh hh hh\n                bd8 hh16 hh hh hh hh hh\n                bd8 hh16 hh hh hh hh hh\n                bd8 hh16 hh hh hh hh hh\n                bd8 hh16 hh hh hh hh hh\n                bd8 hh16 hh hh hh hh hh\n                bd8 hh16 hh hh hh hh hh\n                bd8 hh16 hh hh hh hh hh\n            \n"
  },
  {
    "path": "Test/percussion_test.py",
    "content": "#!/usr/bin/python3\n\nimport ScoreDraft\n\nBassDrum=ScoreDraft.BassDrum()\nSnare=ScoreDraft.Snare()\n\nperc_list= [BassDrum, Snare]\n\ndef dong(duration=48):\n\treturn (0,duration)\n\ndef ca(duration=48):\n\treturn (1,duration)\n\ndef Bl(duration=48):\n\treturn (-1, duration)\n\ndef Bk(duration=48):\n\treturn (-1, -duration)\n\ndoc=ScoreDraft.Document()\ndoc.setTempo(120)\n\nseq = [dong(), ca(24), dong(24), dong(), ca(), dong(), ca(24), dong(24), dong(), ca()]\n\n\ndoc.playBeatSeq(seq, perc_list)\ndoc.mixDown('test_perc.wav')\n"
  },
  {
    "path": "Test/piano_test.py",
    "content": "#!/usr/bin/python3\nimport ScoreDraft\nfrom ScoreDraft.Notes import *\n\nPiano = ScoreDraft.Piano()\n\ndoc=ScoreDraft.Document()\ndoc.setReferenceFrequency(318.0)\ndoc.setTempo(80)\n\nseq1 = [la(4,48), do(5,48), re(5,36), do(5,36), re(5,24)]\nseq2 = [la(3,96), BK(96), do(4,96), BK(96), mi(4,96), re(4,96), BK(96), fa(4,96), BK(96), la(4,96)]\n\nseq1 = seq1+[re(5,48), so(5,24), fa(5,24), mi(5,12), re(5,24), mi(5,56)]\nseq2 = seq2+[so(3,96), BK(96), ti(3,96), BK(96), re(4,96), do(4,96), BK(96), mi(4,96), BK(96), so(4,96)]\n\nseq1 = seq1+[mi(5,48), so(5,48), la(5,36), re(5,36), do(5,24)]\nseq2 = seq2+[la(3,96), BK(96), do(4,96), BK(96), mi(4,96), re(4,96), BK(96), fa(4,96), BK(96), la(4,96)]\n\nseq1 = seq1+[so(5,48), mi(5,24), so(5,24), so(5,36), BK(36), mi(5,36), la(5,56), BK(56), fa(5,56)]\nseq2 = seq2+[mi(4,96), BK(96), so(4,96), BK(96), ti(4,96), fa(4,96), BK(96), la(4,96), BK(96), do(5,96)];\n\ndoc.playNoteSeq(seq1, Piano)\ndoc.playNoteSeq(seq2, Piano)\ndoc.mixDown('piano_test.wav')\n"
  },
  {
    "path": "Test/sunshine.yaml",
    "content": "score:\n    tempo: 150\n    title: You Are My Sunshine\n    composer: Jimmie Davis\n    staffs:\n        -\n            relative: c'\n            is_vocal: true\n            singer: TetoEng_UTAU()\n            converter: TTEnglishConverter            \n            content: |\n                r4 g c d \n                e2 e2\n                r4 e dis e\n                d4 (c) c2\n                r4 c d e\n                f2 g4 (a)\n                r4 a g f\n                e2. r4\n            utau: |\n                ju Ar maI\n                s@n SaIn.\n                maI oU nli\n                s@n SaIn.\n                ju meIk mi\n                h{p i.\n                wEn skaIz Ar\n                greI.\n\n        -\n            relative: c\n            instrument: Arachno(0)\n            content: |\n                \\clef \"bass\"\n                c g' <c e> g\n                c, g' <bes e> g\n                c, g' <bes e> g\n                f c' <e a> c\n                f, c' <e a> c\n                g d' <f b> d\n                g, d' <f b> d\n                c, g' <b e>2\n                \n            pedal: |\n                bd1\n                bd1\n                bd1\n                bd1\n                bd1\n                bd1\n                bd1\n                bd1\n                \n#        -\n#            relative: c\n#            instrument: Arachno(24)\n#            sweep: 0.1\n#            content: |\n#                \\clef \"bass\"\n#                c4 e <g c e>2\n#                c,4 e <g bes e>2\n#                c,4 e <g bes e>2\n#                f,4 a <e' a c>2\n#                f,4 a <e' a c>2\n#                g,4 b <d g b>2\n#                g,4 b <d g b>2\n#                c4 e <g b e>2\n\n        -\n            is_drum: true\n            instrument: Arachno(128)\n            content: |\n                bd4 hh sn hh\n                bd hh sn hh\n                bd hh sn hh\n                bd hh sn hh\n                bd hh sn hh\n                bd hh sn hh\n                bd hh sn hh\n                bd hh sn hh\n"
  },
  {
    "path": "Test/test.yaml",
    "content": "score:\n    title: My song\n    composer: Me\n    tempo: 120\n    staffs:\n        - relative: c'\n          instrument: KarplusStrongInstrument()\n          content: |\n            r8 e e e c2\n            \n\n            \n            "
  },
  {
    "path": "Test/test_xml.py",
    "content": "import ScoreDraft as sd\n\n# doc = sd.from_music_xml(\"ZhenDeAiNi.xml\")\ndoc = sd.from_lilypond(\"ZhenDeAiNi.ly\")\n\ninstrument = sd.SF2Instrument('florestan-subset.sf2', 0)\n# instrument = sd.Sawtooth()\n\ndoc.playXML([instrument])\n# doc.mixDown('ZhenDeAiNi.wav')\ndoc.meteor()\n\n"
  },
  {
    "path": "Test/test_yaml.py",
    "content": "import ScoreDraft as sd\nsd.run_yaml()"
  },
  {
    "path": "VoiceSampler/CMakeLists.txt",
    "content": "cmake_minimum_required (VERSION 3.0)\nproject(VoiceSampler)\n\nset(USE_CUDA true CACHE BOOL \"Voice Sampler Use CUDA\")\n\nif (USE_CUDA) \nfind_package(CUDA REQUIRED)\nendif ()\n\n\nset(SOURCES\n../DSPUtil/complex.cpp \n../DSPUtil/fft.cpp\napi.cpp\nFrequencyDetection.cpp\nSentenceGeneratorGeneral.cpp\nSentenceGeneratorCPU.cpp\n)\n\nset(HEADERS \n../DSPUtil/complex.h\n../DSPUtil/fft.h\nFrequencyDetection.h\nVoiceUtil.h\nSentenceDescriptor.h\nSentenceGeneratorGeneral.h\nSentenceGeneratorCPU.h\n)\n\n\nset (INCLUDE_DIR\n.\n../ScoreDraftCore\n../DSPUtil\n)\n\n\nif (WIN32) \nset (DEFINES  ${DEFINES}\n-D\"_CRT_SECURE_NO_DEPRECATE\"  \n-D\"_SCL_SECURE_NO_DEPRECATE\" \n)\nelse()\nadd_definitions(-std=c++0x)\nadd_compile_options(-fPIC)\nendif()\n\n\nif (USE_CUDA) \n\nset(SOURCES ${SOURCES}\nHNM.cu\nSentenceGeneratorCUDA.cpp\n)\n\nset(HEADERS ${HEADERS}\nhelper_math.h\nVoiceUtil.cuh\nfft.cuh\nDVVector.hpp\nSentenceGeneratorCUDA.h\n)\n\nset (DEFINES ${DEFINES} -D\"HAVE_CUDA\")\n\nendif ()\n\n\ninclude_directories(${INCLUDE_DIR})\nadd_definitions(${DEFINES})\nif (USE_CUDA) \ncuda_add_library (VoiceSampler SHARED ${SOURCES} ${HEADERS})\nelse()\nadd_library (VoiceSampler SHARED  ${SOURCES} ${HEADERS})\nendif()\ntarget_link_libraries(VoiceSampler ScoreDraftCore)\n\nif (WIN32) \ntarget_compile_definitions(VoiceSampler PUBLIC SCOREDRAFTCORE_DLL_IMPORT)\nendif()\n\nif (WIN32) \ninstall(TARGETS VoiceSampler RUNTIME DESTINATION ScoreDraft)\nelse()\ninstall(TARGETS VoiceSampler DESTINATION ScoreDraft)\nendif()\n\n"
  },
  {
    "path": "VoiceSampler/DVVector.hpp",
    "content": "#include <vector>\n\ntemplate <class T>\nstruct VectorView\n{\n\tunsigned count;\n\tT* d_data;\n};\n\ntemplate <class T>\nclass DVVector\n{\npublic:\n\ttypedef VectorView<T> ViewType;\n\tDVVector()\n\t{\n\t\tm_count = 0;\n\t\tm_data = nullptr;\n\t}\n\n\tvirtual ~DVVector()\n\t{\n\t\tFree();\n\t}\n\n\tViewType view()\n\t{\n\t\treturn{ m_count, m_data };\n\t}\n\n\tunsigned Count() const\n\t{\n\t\treturn m_count;\n\t}\n\n\tT* Pointer()\n\t{\n\t\treturn m_data;\n\t}\n\n\tconst T* ConstPointer() const\n\t{\n\t\treturn m_data;\n\t}\n\n\toperator T*()\n\t{\n\t\treturn m_data;\n\t}\n\n\toperator const T*()\n\t{\n\t\treturn m_data;\n\t}\n\n\tvoid Free()\n\t{\n\t\tif (m_data != nullptr)\n\t\t{\n\t\t\tcudaFree(m_data);\n\t\t\tm_data = nullptr;\n\t\t}\n\t\tm_count = 0;\n\t}\n\n\tvoid Allocate(unsigned count)\n\t{\n\t\tFree();\n\t\tm_count = count;\n\t\tif (m_count>0)\n\t\t\tcudaMalloc(&m_data, sizeof(T)*count);\n\t}\n\n\tconst DVVector& operator = (const std::vector<T>& cpuVec)\n\t{\n\t\tFree();\n\t\tAllocate((unsigned)cpuVec.size());\n\t\tif (m_count > 0)\n\t\t{\n\t\t\tcudaMemcpy(m_data, cpuVec.data(), sizeof(T)*m_count, cudaMemcpyHostToDevice);\n\t\t}\n\t\treturn *this;\n\t}\n\n\tvoid ToCPU(std::vector<T>& cpuVec) const\n\t{\n\t\tcpuVec.resize(m_count);\n\t\tcudaMemcpy(cpuVec.data(), m_data, sizeof(T)*m_count, cudaMemcpyDeviceToHost);\n\t}\n\n\tvoid Update(const std::vector<T>& cpuVec)\n\t{\n\t\tif (cpuVec.size() != m_count)\n\t\t\t*this = cpuVec;\n\t\telse if (m_count > 0)\n\t\t\tcudaMemcpy(m_data, cpuVec.data(), sizeof(T)*m_count, cudaMemcpyHostToDevice);\n\t}\n\nprotected:\n\tunsigned m_count;\n\tT* m_data;\n};\n\ntemplate <class T_GPU, class T_CPU>\nclass DVImagedVector : public DVVector<typename T_GPU::ViewType>\n{\npublic:\n\tvoid Allocate(const std::vector<unsigned>& counts)\n\t{\n\t\tunsigned count = (unsigned)counts.size();\n\t\tm_vecs.resize(count);\n\t\tstd::vector<typename T_GPU::ViewType> tmp(count);\n\t\tfor (size_t i = 0; i < count; i++)\n\t\t{\n\t\t\tm_vecs[i].Allocate(counts[i]);\n\t\t\ttmp[i] = m_vecs[i].view();\n\t\t}\n\t\tDVVector<typename T_GPU::ViewType>::operator = (tmp);\n\t}\n\n\tconst DVImagedVector& operator = (const std::vector<T_CPU>& cpuVecs)\n\t{\n\t\tunsigned count = (unsigned)cpuVecs.size();\n\t\tm_vecs.resize(count);\n\t\tstd::vector<typename T_GPU::ViewType> tmp(count);\n\t\tfor (unsigned i = 0; i < count; i++)\n\t\t{\n\t\t\tm_vecs[i] = cpuVecs[i];\n\t\t\ttmp[i] = m_vecs[i].view();\n\t\t}\n\t\tDVVector<typename T_GPU::ViewType>::operator = (tmp);\n\t\treturn *this;\n\t}\n\n\tvoid ToCPU(std::vector<T_CPU>& cpuVecs) const\n\t{\n\t\tunsigned count = (unsigned)m_vecs.size();\n\t\tcpuVecs.resize(count);\n\t\tfor (unsigned i = 0; i < count; i++)\n\t\t\tm_vecs[i].ToCPU(cpuVecs[i]);\n\t}\n\n\tvoid Update(const std::vector<T_CPU>& cpuVecs)\n\t{\n\t\tif (cpuVecs.size() != m_vecs.size())\n\t\t\t*this = cpuVecs;\n\t\telse\n\t\t{\n\t\t\tsize_t count = m_vecs.size();\n\t\t\tstd::vector<typename T_GPU::ViewType> tmp(count);\n\t\t\tfor (size_t i = 0; i < count; i++)\n\t\t\t{\n\t\t\t\tm_vecs[i].Update(cpuVecs[i]);\n\t\t\t\ttmp[i] = m_vecs[i].view();\n\t\t\t}\n\t\t\tDVVector<typename T_GPU::ViewType>::Update(tmp);\n\t\t}\n\t}\n\nprivate:\n\tstd::vector<T_GPU> m_vecs;\n};\n\ntemplate <class T>\nusing DVLevel2Vector = DVImagedVector <DVVector<T>, std::vector<T>>;\n"
  },
  {
    "path": "VoiceSampler/FrequencyDetection.cpp",
    "content": "#include \"FrequencyDetection.h\"\n#include \"fft.h\"\n#include <memory.h>\n#include <stdio.h>\n#include <math.h>\n\n#ifndef max\n#define max(a,b)            (((a) > (b)) ? (a) : (b))\n#endif\n\n#ifndef min\n#define min(a,b)            (((a) < (b)) ? (a) : (b))\n#endif\n\nvoid fetchFrequency(unsigned length, float *samples, unsigned sampleRate, float& freq, float& dyn)\n{\n\tunsigned len = 1;\n\tunsigned l = 0;\n\twhile (len < length*2)\n\t{\n\t\tl++;\n\t\tlen <<= 1;\n\t}\n\n\tDComp* fftData = new DComp[len];\n\tmemset(fftData, 0, sizeof(DComp)*len);\n\n\tfor (unsigned i = 0; i<length; i++)\n\t{\n\t\tfftData[i].Re = (double)samples[i];\n\t\tfftData[i].Im = 0.0;\n\t}\n\tfft(fftData, l);\n\n\t// self-correlation\n\tfor (unsigned i = 0; i<len; i++)\n\t{\n\t\tDComp c = fftData[i];\n\t\tfftData[i].Re = c.Re*c.Re + c.Im*c.Im;\n\t\tfftData[i].Im = 0.0;\n\t}\n\n\tifft(fftData, l);\n\t\n\tdyn = (float)fftData[0].Re*700.0f;\n\tfreq = 55.0f;\n\n\tif (fftData[0].Re > 0.01)\n\t{\n\t\tunsigned maxi = (unsigned)(-1);\n\n\t\tdouble lastV = fftData[0].Re;\n\t\tdouble maxV = 0.0f;\n\t\tbool ascending = false;\n\n\t\tfor (unsigned i = sampleRate / 600; i < min(sampleRate / 55, len / 2); i++)\n\t\t{\n\t\t\tdouble v = fftData[i].Re;\n\t\t\tif (!ascending)\n\t\t\t{\n\t\t\t\tif (v > lastV) ascending = true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (v < lastV)\n\t\t\t\t{\n\t\t\t\t\tif (fftData[i - 1].Re>maxV)\n\t\t\t\t\t{\n\t\t\t\t\t\tmaxV = fftData[i - 1].Re;\n\t\t\t\t\t\tmaxi = i - 1;\n\t\t\t\t\t}\n\t\t\t\t\tascending = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\tlastV = v;\n\t\t}\n\n\t\tif (maxi != (unsigned)(-1) && maxV > 0.3f* fftData[0].Re)\n\t\t{\n\t\t\tfreq = (float)sampleRate / (float)maxi;\n\t\t}\n\t}\n\n\tdelete[] fftData;\n\n}\n"
  },
  {
    "path": "VoiceSampler/FrequencyDetection.h",
    "content": "#ifndef _FrequencyDetection_h\n#define _FrequencyDetection_h\n\nvoid fetchFrequency(unsigned length, float *samples, unsigned sampleRate, float& freq, float& dyn);\n\n#endif\n"
  },
  {
    "path": "VoiceSampler/HNM.cu",
    "content": "#include <cuda_runtime.h>\n#include <cmath>\n#include <VoiceUtil.cuh>\n\n#include <stdio.h>\n\nunsigned calcGroupSize(unsigned workPerGroup)\n{\n\tunsigned s = 1;\n\twhile (s < workPerGroup && s<256)\n\t\ts <<= 1;\n\treturn s;\n}\n\n#ifndef max\n#define max(a,b)            (((a) > (b)) ? (a) : (b))\n#endif\n\n#ifndef min\n#define min(a,b)            (((a) < (b)) ? (a) : (b))\n#endif\n\ntemplate <class T>\nstruct VectorView\n{\n\tunsigned count;\n\tT* d_data;\n};\n\nstruct SrcSampleInfo\n{\n\tunsigned srcPos;\n\tfloat srcSampleFreq;\n\tfloat dstPos;\n\tint isVowel;\n};\n\nstruct Job\n{\n\tunsigned pieceId;\n\tunsigned jobOfPiece;\n};\n\nstruct DstPieceInfo\n{\n\tfloat minSampleFreq;\n\tunsigned uSumLen;\n\tfloat tempLen;\n\tunsigned uTempLen;\n\tfloat fTmpWinCenter0;\n};\n\nstruct SynthJobInfo\n{\n\tunsigned pieceId;\n\tunsigned jobOfPiece;\n\tunsigned srcPieceId0;\n\tunsigned srcPieceId1;\n\tfloat k_srcPiece;\n\tunsigned paramId00;\n\tunsigned paramId10;\n\tfloat k0;\n\tfloat k1;\n\tfloat destHalfWinLen;\n};\n\nstruct CUDATempBuffer\n{\n\tunsigned count;\n\tfloat *d_data;\n};\n\nextern __shared__ unsigned char sbuf[];\n\n__global__\nvoid g_GetMaxVoiced(VectorView<VectorView<float>> cuSrcBufs, VectorView<VectorView<SrcSampleInfo>> pieceInfoList,\nVectorView<VectorView<unsigned>> cuMaxVoicedLists, VectorView<Job> jobMap, unsigned BufSize)\n{\n\tunsigned numWorker = blockDim.x;\n\tunsigned workerId = threadIdx.x;\n\n\tconst Job& job = jobMap.d_data[blockIdx.x];\n\tunsigned pieceId = job.pieceId;\n\tconst VectorView<SrcSampleInfo>& pieceInfo = pieceInfoList.d_data[pieceId];\n\tunsigned paramId = job.jobOfPiece;\n\n\tSrcSampleInfo& posInfo = pieceInfo.d_data[paramId];\n\n\tfloat fhalfWinlen = 3.0f / posInfo.srcSampleFreq;\n\tunsigned u_halfWidth = (unsigned)ceilf(fhalfWinlen);\n\tunsigned uSpecLen = (unsigned)ceilf(fhalfWinlen*0.5f);\n\n\tunsigned fftLen = 1;\n\twhile (fftLen < u_halfWidth)\n\t{\n\t\tfftLen <<= 1;\n\t}\n\n\tbool skip = u_halfWidth * 2 + fftLen * 2> BufSize;\n\tfloat *s_buf1 = (float*)sbuf;\n\tfloat *s_buf2 = (float*)sbuf + u_halfWidth * 2;\n\n\tif (!skip)\n\t{\n\t\tconst VectorView<float>& srcBuf = cuSrcBufs.d_data[pieceId];\n\n\t\td_captureFromBuf(srcBuf.count, srcBuf.d_data, posInfo.srcPos, fhalfWinlen, u_halfWidth, s_buf1);\n\t\td_CreateAmpSpectrumFromWindow(fhalfWinlen, u_halfWidth, s_buf1, s_buf2, uSpecLen);\n\t}\n\n\tunsigned& maxVoiced = *((unsigned*)sbuf + BufSize - 1);\n\tif (workerId == 0)\n\t\tmaxVoiced = 0;\n\n\t__syncthreads();\n\n\tif (!skip)\n\t{\n\n\t\tfor (unsigned i = 6 + 3 * workerId; i + 4 < uSpecLen; i += 3 * numWorker)\n\t\t{\n\t\t\tunsigned count = 0;\n\t\t\tfor (int j = -3; j <= 3; j += 3)\n\t\t\t{\n\t\t\t\tfloat absv0 = s_buf2[(int)i + j];\n\t\t\t\tfloat absv1 = s_buf2[(int)i + j - 1];\n\t\t\t\tfloat absv2 = s_buf2[(int)i + j + 1];\n\n\t\t\t\tfloat rate = absv0 / (absv0 + absv1 + absv2);\n\n\t\t\t\tif (rate > 0.7f)\n\t\t\t\t{\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (count > 1)\n\t\t\t{\n\t\t\t\tatomicMax(&maxVoiced, i / 3 + 1);\n\t\t\t}\n\t\t}\n\n\t\t__syncthreads();\n\t}\n\n\tVectorView<unsigned>& d_maxVoicedList = cuMaxVoicedLists.d_data[pieceId];\n\n\tif (workerId==0)\n\t\td_maxVoicedList.d_data[job.jobOfPiece] = maxVoiced;\n}\n\nvoid h_GetMaxVoiced(VectorView<VectorView<float>> cuSrcBufs, VectorView<VectorView<SrcSampleInfo>> pieceInfoList,\n\tVectorView<VectorView<unsigned>> cuMaxVoicedLists, VectorView<Job> jobMap, unsigned BufSize)\n{\n\tif (BufSize > 12000) BufSize = 12000;\n\tunsigned groupSize = calcGroupSize(BufSize/4);\n\tunsigned sharedBufSize = (unsigned)sizeof(float)* BufSize;\n\tg_GetMaxVoiced << < jobMap.count, groupSize, sharedBufSize >> > (cuSrcBufs, pieceInfoList, cuMaxVoicedLists, jobMap, BufSize);\n\n}\n\n__global__\nvoid g_AnalyzeInput(VectorView<VectorView<float>> cuSrcBufs, VectorView<VectorView<SrcSampleInfo>> pieceInfoList, unsigned halfWinLen,\nunsigned specLen, VectorView<VectorView<float>> cuHarmWindows, VectorView<VectorView<float>> cuNoiseSpecs,\nVectorView<VectorView<unsigned>> cuMaxVoicedLists, VectorView<Job> jobMap, unsigned BufSize)\n{\n\tunsigned numWorker = blockDim.x;\n\tunsigned workerId = threadIdx.x;\n\n\tconst Job& job = jobMap.d_data[blockIdx.x];\n\tunsigned pieceId = job.pieceId;\n\tconst VectorView<SrcSampleInfo>& pieceInfo = pieceInfoList.d_data[pieceId];\n\tunsigned paramId = job.jobOfPiece;\n\n\tSrcSampleInfo& posInfo = pieceInfo.d_data[paramId];\n\n\tunsigned *d_maxVoiced = cuMaxVoicedLists.d_data[pieceId].d_data;\n\tfloat* d_HarmWindows = cuHarmWindows.d_data[pieceId].d_data;\n\tfloat* d_NoiseSpecs = cuNoiseSpecs.d_data[pieceId].d_data;\n\n\tunsigned maxVoiced = (unsigned)(-1);\n\tif (posInfo.isVowel<2)\n\t\tmaxVoiced = d_maxVoiced[paramId];\n\t\n\tfloat srcHalfWinWidth = 1.0f / posInfo.srcSampleFreq;\n\tunsigned u_srchalfWidth = (unsigned)ceilf(srcHalfWinWidth);\n\tunsigned uSpecLen = (unsigned)ceilf(srcHalfWinWidth*0.5f);\n\n\tfloat *s_buf1 = (float*)sbuf; // capture\n\tfloat *s_buf2 = (float*)sbuf + u_srchalfWidth * 2; // Amplitude spectrum\n\n\tconst VectorView<float>& srcBuf = cuSrcBufs.d_data[pieceId];\n\n\td_captureFromBuf(srcBuf.count, srcBuf.d_data, posInfo.srcPos, srcHalfWinWidth, u_srchalfWidth, s_buf1);\n\td_CreateAmpSpectrumFromWindow(srcHalfWinWidth, u_srchalfWidth, s_buf1, s_buf2, uSpecLen);\n\n\tfor (unsigned i = workerId; i < specLen; i += numWorker)\n\t{\n\t\tfloat amplitude = 0.0f;\n\t\tif (posInfo.isVowel<2 && i>maxVoiced && i < uSpecLen)\n\t\t{\n\t\t\tamplitude = s_buf2[i];\n\t\t\ts_buf2[i] = 0.0f;\n\t\t}\n\t\td_NoiseSpecs[i + paramId*specLen] = amplitude;\n\t}\n\n\t__syncthreads();\n\n\td_CreateSymmetricWindowFromAmpSpec(s_buf2, uSpecLen, srcHalfWinWidth, u_srchalfWidth, s_buf2);\n\n\tfor (unsigned i = workerId; i < halfWinLen; i += numWorker)\n\t{\n\t\tfloat v = 0.0f;\n\t\tif (i < u_srchalfWidth)\n\t\t{\n\t\t\tv = s_buf2[i];\n\t\t}\n\t\td_HarmWindows[i + paramId*halfWinLen] = v;\n\t}\n}\n\nvoid h_AnalyzeInput(VectorView<VectorView<float>> cuSrcBufs, VectorView<VectorView<SrcSampleInfo>> pieceInfoList, unsigned halfWinLen,\n\tunsigned specLen, VectorView<VectorView<float>> cuHarmWindows, VectorView<VectorView<float>> cuNoiseSpecs,\n\tVectorView<VectorView<unsigned>> cuMaxVoicedLists, VectorView<Job> jobMap, unsigned BufSize)\n{\n\tunsigned groupSize = calcGroupSize(BufSize / 4);\n\tunsigned sharedBufSize = (unsigned)sizeof(float)* BufSize;\n\tg_AnalyzeInput << < jobMap.count, groupSize, sharedBufSize >> > (cuSrcBufs, pieceInfoList,\n\t\thalfWinLen, specLen, cuHarmWindows, cuNoiseSpecs, cuMaxVoicedLists, jobMap, BufSize);\n}\n\n__global__\nvoid g_Synthesis(VectorView<VectorView<SrcSampleInfo>> cuSrcPieceInfos, unsigned halfWinLen, unsigned specLen,\nVectorView<VectorView<float>> cuHarmWindows, VectorView<VectorView<float>> cuNoiseSpecs,\nVectorView<DstPieceInfo> cuDstPieceInfos, VectorView<CUDATempBuffer> cuTmpBufs1, VectorView<CUDATempBuffer> cuTmpBufs2,\nVectorView<float> cuRandPhase, VectorView<SynthJobInfo> cuSynthJobs)\n{\n\tunsigned numWorker = blockDim.x;\n\tunsigned workerId = threadIdx.x;\n\n\tconst SynthJobInfo& job = cuSynthJobs.d_data[blockIdx.x];\n\tunsigned dstPieceId = job.pieceId;\n\tunsigned srcPieceId0 = job.srcPieceId0;\n\tunsigned srcPieceId1 = job.srcPieceId1;\n\tunsigned dstParamId = job.jobOfPiece;\n\tconst VectorView<SrcSampleInfo>& srcPieceInfo0 = cuSrcPieceInfos.d_data[srcPieceId0];\n\tconst VectorView<SrcSampleInfo>& srcPieceInfo1 = cuSrcPieceInfos.d_data[srcPieceId1];\n\tconst DstPieceInfo& dstPieceInfo = cuDstPieceInfos.d_data[dstPieceId];\n\n\tCUDATempBuffer& cuTmpBuf = dstParamId % 2 == 0 ? cuTmpBufs1.d_data[dstPieceId] : cuTmpBufs2.d_data[dstPieceId];\n\n\tfloat tempHalfWinLen = 1.0f / dstPieceInfo.minSampleFreq;\n\tunsigned u_tempHalfWinLen = (unsigned)ceilf(tempHalfWinLen);\n\tfloat fTmpWinCenter = dstPieceInfo.fTmpWinCenter0 + dstParamId* tempHalfWinLen;\n\n\tfloat destHalfWinLen = job.destHalfWinLen;\n\tunsigned u_destHalfWinLen = (unsigned)ceilf(destHalfWinLen);\n\tunsigned uSpecLen = (unsigned)ceilf(destHalfWinLen*0.5f);\n\tunsigned uRandPhaseInterval = (unsigned)ceilf(tempHalfWinLen*0.5f);\n\n\tunsigned paramId00, paramId01, paramId10, paramId11;\n\tfloat srcHalfWinWidth00, srcHalfWinWidth01, srcHalfWinWidth10, srcHalfWinWidth11;\n\n\tfloat* noiseBuf = (float*)sbuf; // max(2 * fftLen, 2 * u_tempHalfWinLen) +2*fftlen\n\tfor (unsigned i = workerId; i < u_tempHalfWinLen; i += numWorker)\n\t\tnoiseBuf[i] = 0.0f;\n\t__syncthreads();\n\n\tbool haveNoise = false;\n\tif (job.k_srcPiece < 1.0f)\n\t{\n\t\tparamId00 = job.paramId00;\n\t\tparamId01 = paramId00 + 1;\n\t\tif (paramId01 >= srcPieceInfo0.count) paramId01 = paramId00;\n\n\t\tSrcSampleInfo& posInfo0 = srcPieceInfo0.d_data[paramId00];\n\t\tSrcSampleInfo& posInfo1 = srcPieceInfo0.d_data[paramId01];\n\t\tsrcHalfWinWidth00 = 1.0f / posInfo0.srcSampleFreq;\n\t\tsrcHalfWinWidth01 = 1.0f / posInfo1.srcSampleFreq;\n\n\t\tfloat* d_NoiseSpecs = cuNoiseSpecs.d_data[srcPieceId0].d_data;\n\n\t\tfloat k = job.k0;\n\t\tif (k < 1.0f && posInfo0.isVowel<2)\n\t\t{\n\t\t\thaveNoise = true;\n\t\t\tAmpSpec_Scale(srcHalfWinWidth00, d_NoiseSpecs + specLen*paramId00, destHalfWinLen, noiseBuf, (1.0f - k)*(1.0f - job.k_srcPiece));\n\t\t}\n\n\t\tif (k > 0.0f && posInfo1.isVowel<2)\n\t\t{\n\t\t\thaveNoise = true;\n\t\t\tAmpSpec_Scale(srcHalfWinWidth01, d_NoiseSpecs + specLen*paramId01, destHalfWinLen, noiseBuf, k*(1.0f - job.k_srcPiece));\n\t\t}\n\t}\n\n\tif (job.k_srcPiece > 0.0f)\n\t{\n\t\tparamId10= job.paramId10;\n\t\tparamId11 = paramId10 + 1;\n\t\tif (paramId11 >= srcPieceInfo1.count) paramId11 = paramId10;\n\n\t\tSrcSampleInfo& posInfo0 = srcPieceInfo1.d_data[paramId10];\n\t\tSrcSampleInfo& posInfo1 = srcPieceInfo1.d_data[paramId11];\n\t\tsrcHalfWinWidth10 = 1.0f / posInfo0.srcSampleFreq;\n\t\tsrcHalfWinWidth11 = 1.0f / posInfo1.srcSampleFreq;\n\n\t\tfloat* d_NoiseSpecs = cuNoiseSpecs.d_data[srcPieceId1].d_data;\n\n\t\tfloat k = job.k1;\n\t\tif (k < 1.0f && posInfo0.isVowel<2)\n\t\t{\n\t\t\thaveNoise = true;\n\t\t\tAmpSpec_Scale(srcHalfWinWidth10, d_NoiseSpecs + specLen*paramId10, destHalfWinLen, noiseBuf, (1.0f - k)*job.k_srcPiece);\n\t\t}\n\n\t\tif (k > 0.0f && posInfo1.isVowel<2)\n\t\t{\n\t\t\thaveNoise = true;\n\t\t\tAmpSpec_Scale(srcHalfWinWidth11, d_NoiseSpecs + specLen*paramId11, destHalfWinLen, noiseBuf, k*job.k_srcPiece);\n\t\t}\n\t}\n\n\tif (haveNoise)\n\t{\n\t\t// apply random phases\n\t\tfloat* d_p_rand = cuRandPhase.d_data + dstParamId*uRandPhaseInterval;\n\t\td_CreateNoiseWindowFromAmpSpec(noiseBuf, d_p_rand, uSpecLen, destHalfWinLen, u_destHalfWinLen, noiseBuf, tempHalfWinLen);\n\t\tWin_WriteToBuf(cuTmpBuf.count, cuTmpBuf.d_data, fTmpWinCenter, tempHalfWinLen, noiseBuf);\n\t}\n\n\tfloat* harmBuf = (float*)sbuf;\n\tfor (unsigned i = workerId; i < tempHalfWinLen; i += numWorker)\n\t\tharmBuf[i] = 0.0f;\n\t__syncthreads();\n\n\tif (job.k_srcPiece < 1.0f)\n\t{\n\t\tfloat *d_HarmWindows = cuHarmWindows.d_data[srcPieceId0].d_data;\n\n\t\tfloat k = job.k0;\n\t\tif (k < 1.0f)\n\t\t\tSymWin_Repitch_FormantPreserved(srcHalfWinWidth00, d_HarmWindows + halfWinLen*paramId00, destHalfWinLen, harmBuf, (1.0f - k)*(1.0f - job.k_srcPiece));\n\t\tif (k > 0.0f)\n\t\t\tSymWin_Repitch_FormantPreserved(srcHalfWinWidth01, d_HarmWindows + halfWinLen*paramId01, destHalfWinLen, harmBuf, k*(1.0f - job.k_srcPiece));\n\t}\n\n\tif (job.k_srcPiece > 0.0f)\n\t{\n\t\tfloat *d_HarmWindows = cuHarmWindows.d_data[srcPieceId1].d_data;\n\n\t\tfloat k = job.k1;\n\t\tif (k < 1.0f)\n\t\t\tSymWin_Repitch_FormantPreserved(srcHalfWinWidth10, d_HarmWindows + halfWinLen*paramId10, destHalfWinLen, harmBuf, (1.0f - k)*job.k_srcPiece);\n\t\tif (k > 0.0f)\n\t\t\tSymWin_Repitch_FormantPreserved(srcHalfWinWidth11, d_HarmWindows + halfWinLen*paramId11, destHalfWinLen, harmBuf, k*job.k_srcPiece);\n\t}\n\n\tfloat* scaled_harmBuf = (float*)sbuf + u_destHalfWinLen;\n\td_ScaleSymWindow(destHalfWinLen, u_destHalfWinLen, harmBuf, scaled_harmBuf, tempHalfWinLen);\n\n\tSymWin_WriteToBuf(cuTmpBuf.count, cuTmpBuf.d_data, fTmpWinCenter, tempHalfWinLen, scaled_harmBuf);\n}\n\n\nvoid h_Synthesis(VectorView<VectorView<SrcSampleInfo>> cuSrcPieceInfos, unsigned halfWinLen, unsigned specLen,\n\tVectorView<VectorView<float>> cuHarmWindows, VectorView<VectorView<float>> cuNoiseSpecs,\n\tVectorView<DstPieceInfo> cuDstPieceInfos, VectorView<CUDATempBuffer> cuTmpBufs1, VectorView<CUDATempBuffer> cuTmpBufs2,\n\tVectorView<float> cuRandPhase, VectorView<SynthJobInfo> cuSynthJobs, unsigned BufSize)\n{\n\tunsigned groupSize = calcGroupSize(BufSize / 4);\n\tunsigned sharedBufSize = (unsigned)sizeof(float)* BufSize;\n\n\tg_Synthesis << < cuSynthJobs.count, groupSize, sharedBufSize >> > (cuSrcPieceInfos, halfWinLen, specLen,\n\t\tcuHarmWindows, cuNoiseSpecs, cuDstPieceInfos, cuTmpBufs1, cuTmpBufs2, cuRandPhase, cuSynthJobs);\n}\n\n__global__\nvoid g_Merge2Bufs(unsigned uSumLen, float *d_destBuf1, float *d_destBuf2)\n{\n\tunsigned pos = threadIdx.x + blockIdx.x*blockDim.x;\n\tif (pos < uSumLen)\n\t\td_destBuf1[pos] += d_destBuf2[pos];\n}\n\nvoid h_Merge2Bufs(unsigned uSumLen, float *d_destBuf1, float *d_destBuf2)\n{\n\tstatic const unsigned groupSize = 256;\n\tg_Merge2Bufs << < (uSumLen - 1) / groupSize + 1, groupSize >> >(uSumLen, d_destBuf1, d_destBuf2);\n}\n\n\n\n"
  },
  {
    "path": "VoiceSampler/SentenceDescriptor.h",
    "content": "#ifndef __SentenceDescriptor_h\n#define __SentenceDescriptor_h\n\n#include <vector>\n\nstruct Wav\n{\n\tfloat *buf;\n\tunsigned len;\n};\n\nstruct FrqDataPoint\n{\n\tdouble freq;\n\tdouble dyn;\n};\n\nstruct FrqData\n{\n\tint interval;\n\tdouble key;\n\tstd::vector<FrqDataPoint> data;\n};\nstruct Source\n{\n\tWav wav;\n\tFrqData frq;\n};\n\nstruct SourceMapCtrlPnt\n{\n\tfloat srcPos;\n\tfloat dstPos;\n\tint isVowel; // 0: notVowel, 1: preVowel, 2: isVowel\n};\n\nstruct Piece\n{\n\tSource src;\n\tstd::vector<SourceMapCtrlPnt> srcMap;\n};\n\nstruct GeneralCtrlPnt\n{\n\tfloat value;\n\tfloat dstPos;\n};\n\nstruct SentenceDescriptor\n{\n\tstd::vector<Piece> pieces;\n\tstd::vector<GeneralCtrlPnt> piece_map;\n\tstd::vector<GeneralCtrlPnt> freq_map;\n\tstd::vector<GeneralCtrlPnt> volume_map;\n};\n\n#endif\n\n"
  },
  {
    "path": "VoiceSampler/SentenceGeneratorCPU.cpp",
    "content": "#include \"SentenceDescriptor.h\"\n#include \"SentenceGeneratorGeneral.h\"\n#include \"SentenceGeneratorCPU.h\"\n\n#include \"fft.h\"\n#include \"VoiceUtil.h\"\nusing namespace VoiceUtil;\n\nstatic float rate = 44100.0f;\n\ninline void Clamp01(float& v)\n{\n\tif (v < 0.0f) v = 0.0f;\n\telse if (v > 1.0f) v = 1.0f;\n}\n\nvoid GenerateSentenceCPU(const SentenceDescriptor* desc, float* outBuf, unsigned outBufLen)\n{\n\tclass ParameterSet\n\t{\n\tpublic:\n\t\tSymmetricWindow HarmWindow;\n\t\tAmpSpectrum NoiseSpectrum;\n\n\t\tvirtual ~ParameterSet(){}\n\n\t\tvoid Scale(const ParameterSet& src, float targetHalfWidth)\n\t\t{\n\t\t\tHarmWindow.Repitch_FormantPreserved(src.HarmWindow, targetHalfWidth);\n\t\t\tNoiseSpectrum.Scale(src.NoiseSpectrum, targetHalfWidth);\n\t\t}\n\n\t\tvoid Interpolate(const ParameterSet& param0, const ParameterSet& param1, float k)\n\t\t{\n\t\t\tHarmWindow.Interpolate(param0.HarmWindow, param1.HarmWindow, k, param0.HarmWindow.m_halfWidth);\n\t\t\tNoiseSpectrum.Interpolate(param0.NoiseSpectrum, param1.NoiseSpectrum, k, param0.NoiseSpectrum.m_halfWidth);\n\t\t}\n\t};\n\n\tclass ParameterSetWithPos : public ParameterSet\n\t{\n\tpublic:\n\t\tfloat m_pos;\n\t};\n\n\ttypedef std::vector<ParameterSetWithPos> ParameterVec;\n\tstd::vector<ParameterVec> ParameterVecs;\n\n\tconst std::vector<Piece>& pieces = desc->pieces;\n\n\tParameterVecs.resize(pieces.size());\n\n\tfor (size_t i = 0; i < pieces.size(); i++)\n\t{\n\t\tconst Piece& piece = pieces[i];\n\t\tParameterVec& parameters = ParameterVecs[i];\n\n\t\tint srcStart = (int)(piece.srcMap[0].srcPos*0.001f*rate);\n\t\tint srcEnd = (int)ceilf(piece.srcMap[piece.srcMap.size() - 1].srcPos*0.001f*rate);\n\n\t\tint bound = piece.src.frq.data.size() * piece.src.frq.interval;\n\n\t\tif (srcStart < 0)\n\t\t{\n\t\t\tsrcStart = 0;\n\t\t}\n\n\t\tif (srcEnd > bound)\n\t\t{\n\t\t\tsrcEnd = bound;\n\t\t}\n\n\t\tfloat fPeriodCount = 0.0f;\n\t\tunsigned i_srcMap = 0;\n\t\tunsigned lastmaxVoiced = 0;\n\n\t\tBuffer SrcBuffer;\n\t\tSrcBuffer.m_sampleRate = (unsigned)rate;\n\t\tRegulateSource(piece.src.wav.buf, piece.src.wav.len, SrcBuffer,srcStart,srcEnd);\n\n\t\tfor (int srcPos = srcStart; srcPos < srcEnd; srcPos++)\n\t\t{\n\t\t\tfloat fsrcPos = (float)srcPos / rate*1000.0f;\n\t\t\twhile (i_srcMap + 1 < piece.srcMap.size() && fsrcPos >= piece.srcMap[i_srcMap + 1].srcPos)\n\t\t\t\ti_srcMap++;\n\n\t\t\tint isVowel = piece.srcMap[i_srcMap].isVowel;\n\n\t\t\tfloat k_srcMap = (fsrcPos - piece.srcMap[i_srcMap].srcPos) / (piece.srcMap[i_srcMap + 1].srcPos - piece.srcMap[i_srcMap].srcPos);\n\t\t\tClamp01(k_srcMap);\n\t\t\tfloat fdstPos = piece.srcMap[i_srcMap].dstPos*(1.0f - k_srcMap) + piece.srcMap[i_srcMap + 1].dstPos*k_srcMap;\n\t\t\tfloat dstPos = fdstPos*0.001f*rate;\n\n\t\t\tfloat srcSampleFreq;\n\t\t\tfloat srcFreqPos = (float)srcPos / (float)piece.src.frq.interval;\n\t\t\tunsigned uSrcFreqPos = (unsigned)srcFreqPos;\n\t\t\tfloat fracSrcFreqPos = srcFreqPos - (float)uSrcFreqPos;\n\n\t\t\tfloat freq1 = (float)piece.src.frq.data[uSrcFreqPos].freq;\n\t\t\tif (freq1 <= 55.0f) freq1 = (float)piece.src.frq.key;\n\n\t\t\tfloat freq2 = (float)piece.src.frq.data[uSrcFreqPos + 1].freq;\n\t\t\tif (freq2 <= 55.0f) freq2 = (float)piece.src.frq.key;\n\n\t\t\tfloat sampleFreq1 = freq1 / rate;\n\t\t\tfloat sampleFreq2 = freq2 / rate;\n\n\t\t\tsrcSampleFreq = sampleFreq1*(1.0f - fracSrcFreqPos) + sampleFreq2*fracSrcFreqPos;\n\n\t\t\tunsigned paramId = (unsigned)fPeriodCount;\n\t\t\tif (paramId >= parameters.size())\n\t\t\t{\n\t\t\t\tunsigned maxVoiced = 0;\n\t\t\t\tif (isVowel < 2)\n\t\t\t\t{\n\t\t\t\t\tfloat halfWinlen = 3.0f / srcSampleFreq;\n\t\t\t\t\tWindow capture;\n\t\t\t\t\tcapture.CreateFromBuffer(SrcBuffer, (float)(srcPos - srcStart), halfWinlen);\n\n\t\t\t\t\tAmpSpectrum capSpec;\n\t\t\t\t\tcapSpec.CreateFromWindow(capture);\n\n\t\t\t\t\tunsigned char voiced_cache[3] = { 0, 0, 0 };\n\t\t\t\t\tunsigned char cache_pos = 0;\n\n\t\t\t\t\tfor (unsigned i = 3; i + 1 < capSpec.m_data.size(); i += 3)\n\t\t\t\t\t{\n\t\t\t\t\t\tdouble absv0 = capSpec.m_data[i];\n\t\t\t\t\t\tdouble absv1 = capSpec.m_data[i - 1];\n\t\t\t\t\t\tdouble absv2 = capSpec.m_data[i + 1];\n\n\t\t\t\t\t\tdouble rate = absv0 / (absv0 + absv1 + absv2);\n\n\t\t\t\t\t\tif (rate > 0.7)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tvoiced_cache[cache_pos] = 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tvoiced_cache[cache_pos] = 0;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tcache_pos = (cache_pos + 1) % 3;\n\n\t\t\t\t\t\tif (voiced_cache[0] + voiced_cache[1] + voiced_cache[2] > 1)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tmaxVoiced = i / 3;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (isVowel > 0 && maxVoiced < lastmaxVoiced)\n\t\t\t\t\tmaxVoiced = lastmaxVoiced;\n\n\t\t\t\tlastmaxVoiced = maxVoiced;\n\n\t\t\t\tParameterSetWithPos paramSet;\n\n\t\t\t\tfloat srcHalfWinWidth = 1.0f / srcSampleFreq;\n\t\t\t\tWindow srcWin;\n\t\t\t\tsrcWin.CreateFromBuffer(SrcBuffer, (float)(srcPos - srcStart), srcHalfWinWidth);\n\n\t\t\t\tAmpSpectrum harmSpec;\n\t\t\t\tharmSpec.CreateFromWindow(srcWin);\n\t\t\t\tparamSet.NoiseSpectrum.Allocate(srcWin.m_halfWidth);\n\n\t\t\t\tif (isVowel < 2)\n\t\t\t\t{\n\t\t\t\t\tfor (unsigned i = maxVoiced + 1; i < (unsigned)harmSpec.m_data.size(); i++)\n\t\t\t\t\t{\n\t\t\t\t\t\tfloat amplitude = harmSpec.m_data[i];\n\t\t\t\t\t\tharmSpec.m_data[i] = 0.0f;\n\t\t\t\t\t\tif (i < (unsigned)paramSet.NoiseSpectrum.m_data.size())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tparamSet.NoiseSpectrum.m_data[i] = amplitude;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tparamSet.HarmWindow.CreateFromAmpSpec(harmSpec);\n\t\t\t\tparamSet.m_pos = dstPos;\n\t\t\t\tparameters.push_back(paramSet);\n\t\t\t}\n\n\t\t\tfPeriodCount += srcSampleFreq;\n\t\t}\n\t}\n\n\tfloat* freqMap = new float[outBufLen];\n\tstd::vector<unsigned> bounds;\n\n\tPreprocessFreqMap(desc, outBufLen, freqMap, bounds);\n\n\tfloat phase = 0.0f;\n\tunsigned i_pieceMap = 0;\n\tunsigned i_volumeMap = 0;\n\n\tconst std::vector<GeneralCtrlPnt>& piece_map = desc->piece_map;\n\tconst std::vector<GeneralCtrlPnt>& volume_map = desc->volume_map;\n\n\tfor (unsigned i = 0; i < (unsigned)bounds.size()-1; i++)\n\t{\n\t\tfloat* pFreqMap = freqMap + bounds[i];\n\t\tunsigned uSumLen = bounds[i + 1] - bounds[i];\n\n\t\tfloat minSampleFreq = FLT_MAX;\n\t\tfor (unsigned pos = 0; pos < uSumLen; pos++)\n\t\t{\n\t\t\tfloat sampleFreq = pFreqMap[pos];\n\t\t\tif (sampleFreq < minSampleFreq) minSampleFreq = sampleFreq;\n\t\t}\n\n\t\tfloat* stretchingMap;\n\t\tstretchingMap = new float[uSumLen];\n\n\t\tfloat pos_tmpBuf = 0.0f;\n\t\tfor (unsigned pos = 0; pos < uSumLen; pos++)\n\t\t{\n\t\t\tfloat sampleFreq;\n\t\t\tsampleFreq = pFreqMap[pos];\n\n\t\t\tfloat speed = sampleFreq / minSampleFreq;\n\t\t\tpos_tmpBuf += speed;\n\t\t\tstretchingMap[pos] = pos_tmpBuf;\n\t\t}\n\n\t\tfloat tempLen = stretchingMap[uSumLen - 1];\n\t\tunsigned uTempLen = (unsigned)ceilf(tempLen);\n\n\t\tBuffer tempBuf;\n\t\ttempBuf.m_sampleRate = (unsigned)rate;\n\t\ttempBuf.Allocate(uTempLen);\n\n\t\tfloat tempHalfWinLen = 1.0f / minSampleFreq;\n\t\tunsigned pos_local = 0;\n\n\t\twhile (phase > -1.0f) phase -= 1.0f;\n\n\t\tfloat fTmpWinCenter;\n\t\tfor (fTmpWinCenter = phase*tempHalfWinLen; fTmpWinCenter - tempHalfWinLen <= tempLen; fTmpWinCenter += tempHalfWinLen)\n\t\t{\n\t\t\twhile (fTmpWinCenter > stretchingMap[pos_local] && pos_local < uSumLen - 1) pos_local++;\n\t\t\tunsigned pos_global = pos_local + bounds[i];\n\t\t\tfloat f_pos_global = (float)pos_global / rate*1000.0f;\n\n\t\t\twhile (i_pieceMap + 1 < piece_map.size() && f_pos_global >= piece_map[i_pieceMap + 1].dstPos)\n\t\t\t\ti_pieceMap++;\n\n\t\t\tfloat k_piece = (f_pos_global - piece_map[i_pieceMap].dstPos) / (piece_map[i_pieceMap + 1].dstPos - piece_map[i_pieceMap].dstPos);\n\t\t\tClamp01(k_piece);\n\t\t\tfloat fPieceId = piece_map[i_pieceMap].value* (1.0f - k_piece) + piece_map[i_pieceMap + 1].value*k_piece;\n\t\t\t\n\t\t\tunsigned pieceId0 = (unsigned)fPieceId;\n\t\t\tfloat pieceId_frac = fPieceId - (float)pieceId0;\n\t\t\tunsigned pieceId1 = (unsigned)fPieceId +1;\n\t\t\tif (pieceId0 >= (unsigned)pieces.size()) pieceId0 = (unsigned)pieces.size() - 1;\n\t\t\tif (pieceId_frac == 0.0f || pieceId1 >= (unsigned)pieces.size())\n\t\t\t{\n\t\t\t\tpieceId1 = pieceId0;\n\t\t\t\tpieceId_frac = 0.0f;\n\t\t\t}\n\n\t\t\tParameterVec& parameters0 = ParameterVecs[pieceId0];\n\t\t\tParameterVec& parameters1 = ParameterVecs[pieceId1];\n\n\t\t\tunsigned paramId00 = 0;\n\t\t\tunsigned paramId01 = 1;\n\t\t\tunsigned paramId10 = 0;\n\t\t\tunsigned paramId11 = 1;\n\n\t\t\twhile (paramId01<parameters0.size() && parameters0[paramId01].m_pos <(float)pos_global)\n\t\t\t{\n\t\t\t\tparamId00++;\n\t\t\t\tparamId01 = paramId00 + 1;\n\t\t\t}\n\t\t\tif (paramId01 == parameters0.size()) paramId01 = paramId00;\n\n\t\t\tif (pieceId1 > pieceId0)\n\t\t\t{\n\t\t\t\twhile (paramId11<parameters1.size() && parameters1[paramId11].m_pos <(float)pos_global)\n\t\t\t\t{\n\t\t\t\t\tparamId10++;\n\t\t\t\t\tparamId11 = paramId10 + 1;\n\t\t\t\t}\n\t\t\t\tif (paramId11 == parameters1.size()) paramId11 = paramId10;\n\t\t\t}\n\n\t\t\tParameterSetWithPos& param00 = parameters0[paramId00];\n\t\t\tParameterSetWithPos& param01 = parameters0[paramId01];\n\n\t\t\tfloat k0;\n\t\t\tif ((float)pos_global >= param01.m_pos) k0 = 1.0f;\n\t\t\telse if ((float)pos_global <= param00.m_pos) k0 = 0.0f;\n\t\t\telse\n\t\t\t{\n\t\t\t\tk0 = ((float)pos_global - param00.m_pos) / (param01.m_pos - param00.m_pos);\n\t\t\t}\n\n\t\t\tfloat destSampleFreq = pFreqMap[pos_local];\n\t\t\tfloat destHalfWinLen = 1.0f / destSampleFreq;\n\n\t\t\tParameterSet scaledParam00;\n\t\t\tParameterSet scaledParam01;\n\n\t\t\tParameterSet l_param0;\n\t\t\tParameterSet* destParam0 = &l_param0;\n\n\t\t\tscaledParam00.Scale(param00, destHalfWinLen);\n\t\t\tif (paramId00 == paramId01)\n\t\t\t{\n\t\t\t\tdestParam0 = &scaledParam00;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tscaledParam01.Scale(param01, destHalfWinLen);\n\t\t\t\tl_param0.Interpolate(scaledParam00, scaledParam01, k0);\n\t\t\t}\n\n\t\t\tParameterSet* finalDestParam = destParam0;\n\t\t\tParameterSet l_paramTransit;\n\n\t\t\tif (pieceId1 > pieceId0)\n\t\t\t{\n\t\t\t\tParameterSetWithPos& param10 = parameters1[paramId10];\n\t\t\t\tParameterSetWithPos& param11 = parameters1[paramId11];\n\n\t\t\t\tfloat k1;\n\t\t\t\tif ((float)pos_global >= param11.m_pos) k1 = 1.0f;\n\t\t\t\telse if ((float)pos_global <= param10.m_pos) k1 = 0.0f;\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tk1 = ((float)pos_global - param10.m_pos) / (param11.m_pos - param10.m_pos);\n\t\t\t\t}\n\n\t\t\t\tParameterSet scaledParam10;\n\t\t\t\tParameterSet scaledParam11;\n\n\t\t\t\tParameterSet l_param1;\n\t\t\t\tParameterSet* destParam1 = &l_param1;\n\n\t\t\t\tscaledParam10.Scale(param10, destHalfWinLen);\n\t\t\t\tif (paramId10 == paramId11)\n\t\t\t\t{\n\t\t\t\t\tdestParam1 = &scaledParam10;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tscaledParam11.Scale(param11, destHalfWinLen);\n\t\t\t\t\tl_param1.Interpolate(scaledParam10, scaledParam11, k1);\n\t\t\t\t}\n\t\t\t\tfinalDestParam = &l_paramTransit;\n\t\t\t\tl_paramTransit.Interpolate(*destParam0, *destParam1, pieceId_frac);\n\t\t\t}\t\n\n\t\t\tif (finalDestParam->HarmWindow.NonZero())\n\t\t\t{\n\t\t\t\tSymmetricWindow l_destWin;\n\t\t\t\tSymmetricWindow *destWin = &l_destWin;\n\t\t\t\tif (finalDestParam->HarmWindow.m_halfWidth == tempHalfWinLen)\n\t\t\t\t\tdestWin = &finalDestParam->HarmWindow;\n\t\t\t\telse\n\t\t\t\t\tl_destWin.Scale(finalDestParam->HarmWindow, tempHalfWinLen);\n\t\t\t\tdestWin->MergeToBuffer(tempBuf, fTmpWinCenter);\n\t\t\t}\n\n\t\t\tif (finalDestParam->NoiseSpectrum.NonZero())\n\t\t\t{\n\t\t\t\tWindow destWin;\n\t\t\t\tdestWin.CreateFromAmpSpec_noise(finalDestParam->NoiseSpectrum, tempHalfWinLen);\n\t\t\t\tdestWin.MergeToBuffer(tempBuf, fTmpWinCenter);\n\t\t\t}\t\n\n\t\t}\n\t\tphase = (fTmpWinCenter - tempLen) / tempHalfWinLen;\n\n\t\tfor (unsigned pos = 0; pos < uSumLen; pos++)\n\t\t{\n\t\t\tunsigned pos_global = pos + bounds[i];\n\t\t\tfloat f_pos_global = (float)pos_global / rate*1000.0f;\n\t\t\twhile (i_volumeMap + 1 < volume_map.size() && f_pos_global >= volume_map[i_volumeMap + 1].dstPos)\n\t\t\t\ti_volumeMap++;\n\t\t\tfloat k_volume = (f_pos_global - volume_map[i_volumeMap].dstPos) / (volume_map[i_volumeMap + 1].dstPos - volume_map[i_volumeMap].dstPos);\n\t\t\tClamp01(k_volume);\n\t\t\tfloat volume = volume_map[i_volumeMap].value* (1.0f - k_volume) + volume_map[i_volumeMap + 1].value*k_volume;\n\n\t\t\tfloat pos_tmpBuf = stretchingMap[pos];\n\t\t\tfloat sampleFreq;\n\t\t\tsampleFreq = pFreqMap[pos];\n\n\t\t\tfloat speed = sampleFreq / minSampleFreq;\n\n\t\t\tint ipos1 = (int)ceilf(pos_tmpBuf - speed*0.5f);\n\t\t\tint ipos2 = (int)floorf(pos_tmpBuf + speed*0.5f);\n\n\t\t\tif (ipos1 >= (int)uTempLen) ipos1 = (int)uTempLen - 1;\n\t\t\tif (ipos2 >= (int)uTempLen) ipos2 = (int)uTempLen - 1;\n\n\t\t\tfloat sum = 0.0f;\n\t\t\tfor (int ipos = ipos1; ipos <= ipos2; ipos++)\n\t\t\t{\n\t\t\t\tsum += tempBuf.GetSample(ipos);\n\t\t\t}\n\t\t\tfloat value = sum / (float)(ipos2 - ipos1 + 1);\n\t\t\toutBuf[pos + bounds[i]] = value*volume;\n\t\t}\n\n\t\tdelete[] stretchingMap;\n\t}\t\n\n\tdelete[] freqMap;\n\n}\n"
  },
  {
    "path": "VoiceSampler/SentenceGeneratorCPU.h",
    "content": "#ifndef __SentenceGeneratorCPU_h\n#define __SentenceGeneratorCPU_h\n\nstruct SentenceDescriptor;\nvoid GenerateSentenceCPU(const SentenceDescriptor* desc, float* outBuf, unsigned outBufLen);\n\n\n#endif\n\n"
  },
  {
    "path": "VoiceSampler/SentenceGeneratorCUDA.cpp",
    "content": "#include <cuda_runtime.h>\n#include <cstdio>\n#include \"SentenceDescriptor.h\"\n#include \"SentenceGeneratorGeneral.h\"\n#include \"SentenceGeneratorCUDA.h\"\n#include <assert.h>\n#include \"fft.h\"\n#include \"VoiceUtil.h\"\nusing namespace VoiceUtil;\n\n#include \"DVVector.hpp\"\n\nstatic float rate = 44100.0f;\n\ninline void Clamp01(float& v)\n{\n\tif (v < 0.0f) v = 0.0f;\n\telse if (v > 1.0f) v = 1.0f;\n}\n\n\nclass DVSrcBuf : public DVVector<float>\n{\npublic:\n\tconst DVSrcBuf&  operator = (const Buffer& cpuVec)\n\t{\n\t\tDVVector<float>::operator=(cpuVec.m_data);\n\t\treturn *this;\n\t}\n\n\tvoid ToCPU(Buffer& cpuVec) const\n\t{\n\t\tDVVector<float>::ToCPU(cpuVec.m_data);\n\t}\n\n\tvoid Update(const Buffer& cpuVec)\n\t{\n\t\tDVVector<float>::Update(cpuVec.m_data);\n\t}\n};\n\ntypedef DVImagedVector<DVSrcBuf, Buffer> DVSrcBufList;\n\nstruct SrcSampleInfo\n{\n\tunsigned srcPos;\n\tfloat srcSampleFreq;\n\tfloat dstPos;\n\tint isVowel;\n};\n\ntypedef std::vector<SrcSampleInfo> SrcPieceInfo;\ntypedef DVVector<SrcSampleInfo> DVSrcPieceInfo;\ntypedef DVLevel2Vector<SrcSampleInfo> DVSrcPieceInfoList;\n\nstruct Job\n{\n\tunsigned pieceId;\n\tunsigned jobOfPiece;\n};\n\nstruct DstPieceInfo\n{\n\tfloat minSampleFreq;\n\tunsigned uSumLen;\n\tfloat tempLen;\n\tunsigned uTempLen;\n\tfloat fTmpWinCenter0;\n};\n\n\nstruct SynthJobInfo\n{\n\tunsigned pieceId;\n\tunsigned jobOfPiece;\n\tunsigned srcPieceId0;\n\tunsigned srcPieceId1;\n\tfloat k_srcPiece;\n\tunsigned paramId00;\n\tunsigned paramId10;\n\tfloat k0;\n\tfloat k1;\n\tfloat destHalfWinLen;\n};\n\n\nstruct CUDATempBuffer\n{\n\tunsigned count;\n\tfloat *d_data;\n};\n\nvoid h_GetMaxVoiced(VectorView<VectorView<float>> cuSrcBufs, VectorView<VectorView<SrcSampleInfo>> pieceInfoList,\n\tVectorView<VectorView<unsigned>> cuMaxVoicedLists, VectorView<Job> jobMap, unsigned BufSize);\n\nvoid h_AnalyzeInput(VectorView<VectorView<float>> cuSrcBufs, VectorView<VectorView<SrcSampleInfo>> pieceInfoList, unsigned halfWinLen,\n\tunsigned specLen, VectorView<VectorView<float>> cuHarmWindows, VectorView<VectorView<float>> cuNoiseSpecs,\n\tVectorView<VectorView<unsigned>> cuMaxVoicedLists, VectorView<Job> jobMap, unsigned BufSize);\n\nvoid h_Synthesis(VectorView<VectorView<SrcSampleInfo>>  cuSrcPieceInfos, unsigned halfWinLen, unsigned specLen,\n\tVectorView<VectorView<float>> cuHarmWindows, VectorView<VectorView<float>> cuNoiseSpecs,\n\tVectorView<DstPieceInfo> cuDstPieceInfos, VectorView<CUDATempBuffer> cuTmpBufs1, VectorView<CUDATempBuffer> cuTmpBufs2,\n\tVectorView<float> cuRandPhase, VectorView<SynthJobInfo> cuSynthJobs, unsigned BufSize);\n\nvoid h_Merge2Bufs(unsigned uSumLen, float *d_destBuf1, float *d_destBuf2);\n\nvoid GenerateSentenceCUDA(const SentenceDescriptor* desc, float* outBuf, unsigned outBufLen)\n{\n\tstd::vector<Buffer> SrcBuffers;\n\tconst std::vector<Piece>& pieces = desc->pieces;\n\n\tunsigned numSrcPieces = (unsigned)pieces.size();\n\n\tSrcBuffers.resize(numSrcPieces);\n\tfor (size_t i = 0; i < numSrcPieces; i++)\n\t{\n\t\tconst Piece& piece = pieces[i];\n\n\t\tint srcStart = (int)(piece.srcMap[0].srcPos*0.001f*rate);\n\t\tint srcEnd = (int)ceilf(piece.srcMap[piece.srcMap.size() - 1].srcPos*0.001f*rate);\n\n\t\tint bound = piece.src.frq.data.size() * piece.src.frq.interval;\n\n\t\tif (srcStart < 0)\n\t\t{\n\t\t\tsrcStart = 0;\n\t\t}\n\n\t\tif (srcEnd > bound)\n\t\t{\n\t\t\tsrcEnd = bound;\n\t\t}\n\n\t\tSrcBuffers[i].m_sampleRate = (unsigned)rate;\n\t\tRegulateSource(piece.src.wav.buf, piece.src.wav.len, SrcBuffers[i], srcStart, srcEnd);\n\t}\n\n\tDVSrcBufList cuSourceBufs;\n\tcuSourceBufs = SrcBuffers;\n\n\tstd::vector<SrcPieceInfo> SrcPieceInfos;\n\tSrcPieceInfos.resize(numSrcPieces);\n\n\tfloat max_srcHalfWinWidth = 0.0f;\n\tfloat max_freqDetectHalfWinWidth = 0.0f;\n\n\tstd::vector<Job> jobMap;\n\tstd::vector<unsigned> countMaxVoiceds;\n\tcountMaxVoiceds.resize(numSrcPieces);\n\n\tfor (size_t i = 0; i < numSrcPieces; i++)\n\t{\n\t\tconst Piece& piece = pieces[i];\n\t\tSrcPieceInfo& srcPieceInfo = SrcPieceInfos[i];\n\n\t\tint srcStart = (int)(piece.srcMap[0].srcPos*0.001f*rate);\n\t\tint srcEnd = (int)ceilf(piece.srcMap[piece.srcMap.size() - 1].srcPos*0.001f*rate);\n\n\t\tint bound = piece.src.frq.data.size() * piece.src.frq.interval;\n\n\t\tif (srcStart < 0)\n\t\t{\n\t\t\tsrcStart = 0;\n\t\t}\n\n\t\tif (srcEnd > bound)\n\t\t{\n\t\t\tsrcEnd = bound;\n\t\t}\n\n\t\tfloat fPeriodCount = 0.0f;\n\t\tunsigned i_srcMap = 0;\n\t\tunsigned lastmaxVoiced = 0;\n\n\t\tfor (int srcPos = srcStart; srcPos < srcEnd; srcPos++)\n\t\t{\n\t\t\tfloat fsrcPos = (float)srcPos / rate*1000.0f;\n\t\t\twhile (i_srcMap + 1 < piece.srcMap.size() && fsrcPos >= piece.srcMap[i_srcMap + 1].srcPos)\n\t\t\t\ti_srcMap++;\n\n\t\t\tint isVowel = piece.srcMap[i_srcMap].isVowel;\n\n\t\t\tfloat k_srcMap = (fsrcPos - piece.srcMap[i_srcMap].srcPos) / (piece.srcMap[i_srcMap + 1].srcPos - piece.srcMap[i_srcMap].srcPos);\n\t\t\tClamp01(k_srcMap);\n\t\t\tfloat fdstPos = piece.srcMap[i_srcMap].dstPos*(1.0f - k_srcMap) + piece.srcMap[i_srcMap + 1].dstPos*k_srcMap;\n\t\t\tfloat dstPos = fdstPos*0.001f*rate;\n\n\t\t\tfloat srcSampleFreq;\n\t\t\tfloat srcFreqPos = (float)srcPos / (float)piece.src.frq.interval;\n\t\t\tunsigned uSrcFreqPos = (unsigned)srcFreqPos;\t\t\t\n\t\t\tfloat fracSrcFreqPos = srcFreqPos - (float)uSrcFreqPos;\n\n\t\t\tfloat freq1 = (float)piece.src.frq.data[uSrcFreqPos].freq;\n\t\t\tif (freq1 <= 55.0f) freq1 = (float)piece.src.frq.key;\n\n\t\t\tfloat freq2 = (float)piece.src.frq.data[uSrcFreqPos + 1].freq;\n\t\t\tif (freq2 <= 55.0f) freq2 = (float)piece.src.frq.key;\n\n\t\t\tfloat sampleFreq1 = freq1 / rate;\n\t\t\tfloat sampleFreq2 = freq2 / rate;\n\n\t\t\tsrcSampleFreq = sampleFreq1*(1.0f - fracSrcFreqPos) + sampleFreq2*fracSrcFreqPos;\n\n\t\t\tunsigned paramId = (unsigned)fPeriodCount;\n\t\t\tif (paramId >= srcPieceInfo.size())\n\t\t\t{\n\t\t\t\tSrcSampleInfo sl;\n\t\t\t\tsl.srcSampleFreq = srcSampleFreq;\n\t\t\t\tsl.srcPos = srcPos - srcStart;\n\t\t\t\tsl.isVowel = isVowel;\n\t\t\t\tsl.dstPos = dstPos;\n\n\t\t\t\tsrcPieceInfo.push_back(sl);\n\n\t\t\t\tfloat srcHalfWinWidth = 1.0f / srcSampleFreq;\n\t\t\t\tif (max_srcHalfWinWidth < srcHalfWinWidth)\n\t\t\t\t\tmax_srcHalfWinWidth = srcHalfWinWidth;\n\n\t\t\t\tif (isVowel<2)\n\t\t\t\t{\n\t\t\t\t\tfloat halfWinlen = 3.0f / srcSampleFreq;\n\t\t\t\t\tif (halfWinlen > max_freqDetectHalfWinWidth)\n\t\t\t\t\t\tmax_freqDetectHalfWinWidth = halfWinlen;\n\n\t\t\t\t\tJob job;\n\t\t\t\t\tjob.pieceId = (unsigned)i;\n\t\t\t\t\tjob.jobOfPiece = (unsigned)srcPieceInfo.size() - 1;\n\t\t\t\t\tjobMap.push_back(job);\n\t\t\t\t}\n\t\t\t}\n\t\t\tfPeriodCount += srcSampleFreq;\n\t\t}\n\n\t\tcountMaxVoiceds[i] = (unsigned)srcPieceInfo.size();\n\t}\n\n\tDVSrcPieceInfoList cuSrcPieceInfos;\n\tcuSrcPieceInfos = SrcPieceInfos;\n\n\tDVVector<Job> cuJobMap;\n\tcuJobMap = jobMap;\n\n\tDVLevel2Vector<unsigned> cuMaxVoicedLists;\n\tcuMaxVoicedLists.Allocate(countMaxVoiceds);\n\n\tunsigned cuHalfWinLen = (unsigned)ceilf(max_srcHalfWinWidth);\n\tunsigned cuSpecLen = (unsigned)ceilf(max_srcHalfWinWidth*0.5f);\n\n\tunsigned fftLen = 1;\n\twhile ((float)fftLen < max_freqDetectHalfWinWidth)\n\t\tfftLen <<= 1;\n\tunsigned BufSize = (unsigned)ceilf(max_freqDetectHalfWinWidth) * 2 + fftLen * 2;\n\n\th_GetMaxVoiced(cuSourceBufs.view(), cuSrcPieceInfos.view(), cuMaxVoicedLists.view(), cuJobMap.view(), BufSize);\n\n\tstd::vector<std::vector<unsigned>> h_maxVoicedLists;\n\tcuMaxVoicedLists.ToCPU(h_maxVoicedLists);\n\n\tfor (unsigned i = 0; i < h_maxVoicedLists.size(); i++)\n\t{\n\t\tstd::vector<unsigned>& sublist = h_maxVoicedLists[i];\n\t\tSrcPieceInfo& srcPieceInfo = SrcPieceInfos[i];\n\n\t\tunsigned lastmaxVoiced = 0;\n\t\tfor (unsigned j = 0; j < srcPieceInfo.size(); j++)\n\t\t{\n\t\t\tif (srcPieceInfo[j].isVowel < 2)\n\t\t\t{\n\t\t\t\tif (srcPieceInfo[j].isVowel > 0 && sublist[j] < lastmaxVoiced)\n\t\t\t\t{\n\t\t\t\t\tsublist[j] = lastmaxVoiced;\n\t\t\t\t}\n\t\t\t\tlastmaxVoiced = sublist[j];\n\t\t\t}\n\t\t}\n\t}\n\tcuMaxVoicedLists.Update(h_maxVoicedLists);\n\n\tstd::vector<unsigned> cuTotalHalfWinLen;\n\tcuTotalHalfWinLen.resize(numSrcPieces);\n\tstd::vector<unsigned> cuTotalSpecLen;\n\tcuTotalSpecLen.resize(numSrcPieces);\n\n\tfor (unsigned i = 0; i < numSrcPieces; i++)\n\t{\n\t\tcuTotalHalfWinLen[i] = cuHalfWinLen*(unsigned)SrcPieceInfos[i].size();\n\t\tcuTotalSpecLen[i] = cuSpecLen*(unsigned)SrcPieceInfos[i].size();\n\t}\n\n\tDVLevel2Vector<float> cuHarmWindows;\n\tcuHarmWindows.Allocate(cuTotalHalfWinLen);\n\tDVLevel2Vector<float> cuNoiseSpecs;\n\tcuNoiseSpecs.Allocate(cuTotalSpecLen);\n\n\tfftLen = 1;\n\twhile (fftLen < cuHalfWinLen)\n\t\tfftLen <<= 1;\n\n\tBufSize = cuHalfWinLen * 2 + fftLen * 2;\n\n\tjobMap.clear();\n\tfor (unsigned i = 0; i < numSrcPieces; i++)\n\t{\n\t\tfor (unsigned j = 0; j < (unsigned)SrcPieceInfos[i].size(); j++)\n\t\t{\n\t\t\tJob job;\n\t\t\tjob.pieceId = i;\n\t\t\tjob.jobOfPiece = j;\n\t\t\tjobMap.push_back(job);\n\t\t}\n\t}\n\tcuJobMap = jobMap;\n\n\th_AnalyzeInput(cuSourceBufs.view(), cuSrcPieceInfos.view(), cuHalfWinLen, cuSpecLen, cuHarmWindows.view(), cuNoiseSpecs.view(), cuMaxVoicedLists.view(), cuJobMap.view(), BufSize);\n\n\tfloat* freqMap = new float[outBufLen];\n\tstd::vector<unsigned> bounds;\n\n\tPreprocessFreqMap(desc, outBufLen, freqMap, bounds);\n\n\tunsigned numDstPieces = (unsigned)bounds.size() -1;\n\tstd::vector<const float*> freqMaps;\n\tfreqMaps.resize(numDstPieces);\n\tstd::vector<std::vector<float>> stretchingMaps;\n\tstretchingMaps.resize(numDstPieces);\n\tstd::vector<DstPieceInfo> DstPieceInfos;\n\tDstPieceInfos.resize(numDstPieces);\n\n\tunsigned sumTmpBufLen = 0;\n\tfor (unsigned i = 0; i < numDstPieces; i++)\n\t{\n\t\tDstPieceInfo& dstPieceInfo = DstPieceInfos[i];\n\t\tdstPieceInfo.uSumLen = bounds[i + 1] - bounds[i];\n\t\tfreqMaps[i] = freqMap + bounds[i];\n\t\tdstPieceInfo.minSampleFreq = FLT_MAX;\n\t\tfor (unsigned pos = 0; pos < dstPieceInfo.uSumLen; pos++)\n\t\t{\n\t\t\tfloat sampleFreq = freqMaps[i][pos];\n\t\t\tif (sampleFreq < dstPieceInfo.minSampleFreq) dstPieceInfo.minSampleFreq = sampleFreq;\n\t\t}\n\t\tstretchingMaps[i].resize(dstPieceInfo.uSumLen);\n\n\t\tfloat pos_tmpBuf = 0.0f;\n\t\tfor (unsigned pos = 0; pos < dstPieceInfo.uSumLen; pos++)\n\t\t{\n\t\t\tfloat sampleFreq;\n\t\t\tsampleFreq = freqMaps[i][pos];\n\n\t\t\tfloat speed = sampleFreq / dstPieceInfo.minSampleFreq;\n\t\t\tpos_tmpBuf += speed;\n\t\t\tstretchingMaps[i][pos] = pos_tmpBuf;\n\t\t}\n\t\tdstPieceInfo.tempLen = stretchingMaps[i][dstPieceInfo.uSumLen - 1];\n\t\tdstPieceInfo.uTempLen = (unsigned)ceilf(dstPieceInfo.tempLen);\n\n\t\tsumTmpBufLen += dstPieceInfo.uTempLen;\n\t}\n\n\tstd::vector<SynthJobInfo> SynthJobs;\n\n\tfloat phase = 0.0f;\n\tunsigned i_pieceMap = 0;\n\n\tconst std::vector<GeneralCtrlPnt>& piece_map = desc->piece_map;\n\tconst std::vector<GeneralCtrlPnt>& volume_map = desc->volume_map;\n\n\tunsigned maxRandPhaseLen = 0;\n\tfloat maxtempHalfWinLen = 0.0f;\n\n\tfor (unsigned i = 0; i < numDstPieces; i++)\n\t{\n\t\tDstPieceInfo& dstPieceInfo = DstPieceInfos[i];\n\t\tfloat tempHalfWinLen = 1.0f / dstPieceInfo.minSampleFreq;\n\t\tif (tempHalfWinLen > maxtempHalfWinLen)\n\t\t\tmaxtempHalfWinLen = tempHalfWinLen;\n\n\t\tunsigned pos_local = 0;\n\t\twhile (phase > -1.0f) phase -= 1.0f;\n\n\t\tfloat tempLen = dstPieceInfo.tempLen;\n\t\tunsigned uSumLen = dstPieceInfo.uSumLen;\n\n\t\tconst float* pFreqMap = freqMaps[i];\n\t\tstd::vector<float>& stretchingMap = stretchingMaps[i];\n\n\t\tfloat fTmpWinCenter = phase*tempHalfWinLen;\n\t\tdstPieceInfo.fTmpWinCenter0 = fTmpWinCenter;\n\t\tunsigned jobOfPiece = 0;\n\n\t\twhile (fTmpWinCenter - tempHalfWinLen <= tempLen)\n\t\t{\n\t\t\tSynthJobInfo synthJob;\n\t\t\tsynthJob.pieceId = i;\n\t\t\tsynthJob.jobOfPiece = jobOfPiece;\n\n\t\t\twhile (fTmpWinCenter > stretchingMap[pos_local] && pos_local < uSumLen - 1) pos_local++;\n\t\t\tunsigned pos_global = pos_local + bounds[i];\n\t\t\tfloat f_pos_global = (float)pos_global / rate*1000.0f;\n\n\t\t\tfloat destSampleFreq;\n\t\t\tdestSampleFreq = pFreqMap[pos_local];\n\t\t\tfloat destHalfWinLen = 1.0f / destSampleFreq;\n\t\t\tsynthJob.destHalfWinLen = destHalfWinLen;\n\n\t\t\twhile (i_pieceMap + 1 < piece_map.size() && f_pos_global >= piece_map[i_pieceMap + 1].dstPos)\n\t\t\t\ti_pieceMap++;\n\n\t\t\tfloat k_piece = (f_pos_global - piece_map[i_pieceMap].dstPos) / (piece_map[i_pieceMap + 1].dstPos - piece_map[i_pieceMap].dstPos);\n\t\t\tClamp01(k_piece);\n\t\t\tfloat fPieceId = piece_map[i_pieceMap].value* (1.0f - k_piece) + piece_map[i_pieceMap + 1].value*k_piece;\n\n\t\t\tunsigned pieceId0 = (unsigned)fPieceId;\n\t\t\tfloat pieceId_frac = fPieceId - (float)pieceId0;\n\t\t\tunsigned pieceId1 = (unsigned)fPieceId + 1;\n\t\t\tif (pieceId0 >= (unsigned)pieces.size()) pieceId0 = (unsigned)pieces.size() - 1;\n\t\t\tif (pieceId_frac == 0.0f || pieceId1 >= (unsigned)pieces.size())\n\t\t\t{\n\t\t\t\tpieceId1 = pieceId0;\n\t\t\t\tpieceId_frac = 0.0f;\n\t\t\t}\n\n\t\t\tsynthJob.srcPieceId0 = pieceId0;\n\t\t\tsynthJob.srcPieceId1 = pieceId1;\n\t\t\tsynthJob.k_srcPiece = pieceId_frac;\n\n\t\t\tstd::vector<SrcSampleInfo>& SampleLocations0 = SrcPieceInfos[pieceId0];\n\t\t\tstd::vector<SrcSampleInfo>& SampleLocations1 = SrcPieceInfos[pieceId1];\n\n\t\t\tunsigned paramId00 = 0;\n\t\t\tunsigned paramId01 = 1;\n\t\t\tunsigned paramId10 = 0;\n\t\t\tunsigned paramId11 = 1;\n\n\t\t\twhile (paramId01<SampleLocations0.size() && SampleLocations0[paramId01].dstPos <(float)pos_global)\n\t\t\t{\n\t\t\t\tparamId00++;\n\t\t\t\tparamId01 = paramId00 + 1;\n\t\t\t}\n\t\t\tif (paramId01 == SampleLocations0.size()) paramId01 = paramId00;\n\t\t\tsynthJob.paramId00 = paramId00;\n\t\t\tsynthJob.paramId10 = 0;\n\n\t\t\tif (pieceId1 > pieceId0)\n\t\t\t{\n\t\t\t\twhile (paramId11<SampleLocations1.size() && SampleLocations1[paramId11].dstPos <(float)pos_global)\n\t\t\t\t{\n\t\t\t\t\tparamId10++;\n\t\t\t\t\tparamId11 = paramId10 + 1;\n\t\t\t\t}\n\t\t\t\tif (paramId11 == SampleLocations1.size()) paramId11 = paramId10;\n\t\t\t\tsynthJob.paramId10 = paramId10;\n\t\t\t}\n\n\t\t\tSrcSampleInfo& sl00 = SampleLocations0[paramId00];\n\t\t\tSrcSampleInfo& sl01 = SampleLocations0[paramId01];\n\n\t\t\tfloat k0;\n\t\t\tif ((float)pos_global >= sl01.dstPos) k0 = 1.0f;\n\t\t\telse if ((float)pos_global <= sl00.dstPos) k0 = 0.0f;\n\t\t\telse\n\t\t\t{\n\t\t\t\tk0 = ((float)pos_global - sl00.dstPos) / (sl01.dstPos - sl00.dstPos);\n\t\t\t}\n\t\t\tsynthJob.k0 = k0;\n\t\t\tsynthJob.k1 = 0.0f;\n\n\t\t\tif (pieceId1 > pieceId0)\n\t\t\t{\n\t\t\t\tSrcSampleInfo& sl10 = SampleLocations1[paramId10];\n\t\t\t\tSrcSampleInfo& sl11 = SampleLocations1[paramId11];\n\n\t\t\t\tfloat k1;\n\t\t\t\tif ((float)pos_global >= sl11.dstPos) k1 = 1.0f;\n\t\t\t\telse if ((float)pos_global <= sl10.dstPos) k1 = 0.0f;\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tk1 = ((float)pos_global - sl10.dstPos) / (sl11.dstPos - sl10.dstPos);\n\t\t\t\t}\n\t\t\t\tsynthJob.k1 = k1;\n\t\t\t}\n\t\t\tSynthJobs.push_back(synthJob);\n\n\t\t\tjobOfPiece++;\n\t\t\tfTmpWinCenter += tempHalfWinLen;\n\t\t}\n\n\t\tunsigned uSpecLen = (unsigned)ceilf(tempHalfWinLen*0.5f);\n\t\tunsigned randPhaseLen = uSpecLen*jobOfPiece;\n\t\tif (randPhaseLen > maxRandPhaseLen)\n\t\t\tmaxRandPhaseLen = randPhaseLen;\n\n\t\tphase = (fTmpWinCenter - tempLen) / tempHalfWinLen;\n\n\t}\n\n\tDVVector<DstPieceInfo> cuDstPieceInfos;\n\tcuDstPieceInfos = DstPieceInfos;\n\n\tDVVector<SynthJobInfo> cuSynthJobs;\n\tcuSynthJobs = SynthJobs;\n\n\tDVVector<float> cuSumTmpBuf1;\n\tDVVector<float> cuSumTmpBuf2;\n\tcuSumTmpBuf1.Allocate(sumTmpBufLen);\n\tcuSumTmpBuf2.Allocate(sumTmpBufLen);\n\n\tcudaMemset(cuSumTmpBuf1, 0, sizeof(float)*sumTmpBufLen);\n\tcudaMemset(cuSumTmpBuf2, 0, sizeof(float)*sumTmpBufLen);\n\n\tstd::vector<CUDATempBuffer> tmpBufs1;\n\ttmpBufs1.resize(numDstPieces);\n\tstd::vector<CUDATempBuffer> tmpBufs2;\n\ttmpBufs2.resize(numDstPieces);\n\n\tfloat *pTmpBuf1 = cuSumTmpBuf1.Pointer();\n\tfloat *pTmpBuf2 = cuSumTmpBuf2.Pointer();\n\tfor (unsigned i = 0; i < numDstPieces; i++)\n\t{\n\t\tunsigned count = DstPieceInfos[i].uTempLen;\n\t\ttmpBufs1[i].count = count;\n\t\ttmpBufs1[i].d_data = pTmpBuf1;\n\t\ttmpBufs2[i].count = count;\n\t\ttmpBufs2[i].d_data = pTmpBuf2;\n\t\tpTmpBuf1 += count;\n\t\tpTmpBuf2 += count;\n\t}\n\n\tDVVector<CUDATempBuffer> cuTmpBufs1;\n\tcuTmpBufs1 = tmpBufs1;\n\tDVVector<CUDATempBuffer> cuTmpBufs2;\n\tcuTmpBufs2 = tmpBufs2;\n\n\tstd::vector<float> randPhase;\n\trandPhase.resize(maxRandPhaseLen);\n\n\tfor (unsigned i = 0; i < maxRandPhaseLen; i++)\n\t\trandPhase[i] = rand01();\n\n\tDVVector<float> cuRandPhase;\n\tcuRandPhase = randPhase;\n\n\tfftLen = 1;\n\twhile ((float)fftLen < maxtempHalfWinLen)\n\t\tfftLen <<= 1;\n\n\tBufSize = fftLen * 4;\n\n\th_Synthesis(cuSrcPieceInfos.view(), cuHalfWinLen, cuSpecLen, cuHarmWindows.view(), cuNoiseSpecs.view(), \t\n\t\tcuDstPieceInfos.view(), cuTmpBufs1.view(), cuTmpBufs2.view(), cuRandPhase.view(), cuSynthJobs.view(), BufSize);\n\n\th_Merge2Bufs(sumTmpBufLen, cuSumTmpBuf1, cuSumTmpBuf2);\n\n\tstd::vector<float> sumTmpBuf;\n\tcuSumTmpBuf1.ToCPU(sumTmpBuf);\n\n\tfloat* pTmpBuf = &sumTmpBuf[0];\n\tfloat* pDstBuf = outBuf;\n\tunsigned i_volumeMap = 0;\n\tfor (unsigned i = 0; i < numDstPieces; i++)\n\t{\n\t\tunsigned uSumLen = DstPieceInfos[i].uSumLen;\n\t\tfloat *stretchingMap = &stretchingMaps[i][0];\n\t\tconst float *pFreqMap = freqMaps[i];\n\t\tfloat minSampleFreq = DstPieceInfos[i].minSampleFreq;\n\t\tunsigned uTempLen = DstPieceInfos[i].uTempLen;\n\n\t\tfor (unsigned pos = 0; pos < uSumLen; pos++)\n\t\t{\n\t\t\tunsigned pos_global = pos + bounds[i];\n\t\t\tfloat f_pos_global = (float)pos_global / rate*1000.0f;\n\t\t\twhile (i_volumeMap + 1 < volume_map.size() && f_pos_global >= volume_map[i_volumeMap + 1].dstPos)\n\t\t\t\ti_volumeMap++;\n\t\t\tfloat k_volume = (f_pos_global - volume_map[i_volumeMap].dstPos) / (volume_map[i_volumeMap + 1].dstPos - volume_map[i_volumeMap].dstPos);\n\t\t\tClamp01(k_volume);\n\t\t\tfloat volume = volume_map[i_volumeMap].value* (1.0f - k_volume) + volume_map[i_volumeMap + 1].value*k_volume;\n\n\t\t\tfloat pos_tmpBuf = stretchingMap[pos];\n\t\t\tfloat sampleFreq;\n\t\t\tsampleFreq = pFreqMap[pos];\n\n\t\t\tfloat speed = sampleFreq / minSampleFreq;\n\n\t\t\tint ipos1 = (int)ceilf(pos_tmpBuf - speed*0.5f);\n\t\t\tint ipos2 = (int)floorf(pos_tmpBuf + speed*0.5f);\n\n\t\t\tif (ipos1 >= (int)uTempLen) ipos1 = (int)uTempLen - 1;\n\t\t\tif (ipos2 >= (int)uTempLen) ipos2 = (int)uTempLen - 1;\n\n\t\t\tfloat sum = 0.0f;\n\t\t\tfor (int ipos = ipos1; ipos <= ipos2; ipos++)\n\t\t\t{\n\t\t\t\tif (ipos >= 0)\n\t\t\t\t\tsum += pTmpBuf[ipos];\n\t\t\t}\n\t\t\tfloat value = sum / (float)(ipos2 - ipos1 + 1);\n\t\t\tpDstBuf[pos] = value*volume;\n\t\t}\n\t\tpTmpBuf += uTempLen;\n\t\tpDstBuf += uSumLen;\n\t}\n\n\n\tdelete[] freqMap;\n}\n"
  },
  {
    "path": "VoiceSampler/SentenceGeneratorCUDA.h",
    "content": "#ifndef __SentenceGeneratorCUDA_h\n#define __SentenceGeneratorCUDA_h\n\nstruct SentenceDescriptor;\nvoid GenerateSentenceCUDA(const SentenceDescriptor* desc, float* outBuf, unsigned outBufLen);\n\n\n#endif\n\n"
  },
  {
    "path": "VoiceSampler/SentenceGeneratorGeneral.cpp",
    "content": "#include \"SentenceDescriptor.h\"\n#include \"SentenceGeneratorGeneral.h\"\n\nstatic float rate = 44100.0f;\n\ninline void Clamp01(float& v)\n{\n\tif (v < 0.0f) v = 0.0f;\n\telse if (v > 1.0f) v = 1.0f;\n}\n\nvoid RegulateSource(const float* srcData, unsigned len, Buffer& dstBuf, int srcStart, int srcEnd)\n{\n\tunsigned uLen = (unsigned)(srcEnd - srcStart);\n\tdstBuf.Allocate(uLen);\n\n\tfloat acc = 0.0f;\n\tfloat count = 0.0f;\n\tfor (unsigned i = 0; i < len; i++)\n\t{\n\t\tacc += srcData[i] * srcData[i];\n\t\tif (srcData[i] != 0.0f)\n\t\t{\n\t\t\tcount += 1.0f;\n\t\t}\n\t}\n\tacc = sqrtf(count / acc)*0.3f;\n\tfor (unsigned i = 0; i < uLen; i++)\n\t{\n\t\tint j = (int)i + srcStart;\n\t\tfloat v = 0.0f;\n\t\tif (j>=0 && j<len)\n\t\t\tv = srcData[j] * acc;\n\t\tdstBuf.m_data[i] = v;\n\t}\n}\n\nstatic void _floatBufSmooth(float* buf, unsigned size)\n{\n\tstatic unsigned halfWinSize = 1024;\n\tstatic unsigned winSize = halfWinSize * 2;\n\tfloat *buf2 = new float[size];\n\tmemset(buf2, 0, sizeof(float)*size);\n\n\tfor (unsigned i = 0; i < size + halfWinSize; i += halfWinSize)\n\t{\n\t\tfloat sum = 0.0f;\n\t\tfor (int j = -(int)halfWinSize; j < (int)halfWinSize; j++)\n\t\t{\n\t\t\tfloat v;\n\t\t\tint bufPos = (int)i + j;\n\t\t\tif (bufPos < 0) v = buf[0];\n\t\t\telse if (bufPos >= (int)size) v = buf[size - 1];\n\t\t\telse v = buf[bufPos];\n\n\t\t\tfloat x = (float)j / (float)halfWinSize*(float)PI;\n\t\t\tfloat w = (cosf(x) + 1.0f)*0.5f;\n\n\t\t\tsum += v*w;\n\t\t}\n\t\tfloat ave = sum / (float)halfWinSize;\n\t\tfor (int j = -(int)halfWinSize; j < (int)halfWinSize; j++)\n\t\t{\n\t\t\tint bufPos = (int)i + j;\n\t\t\tif (bufPos < 0 || bufPos >= (int)size) continue;\n\n\t\t\tfloat x = (float)j / (float)halfWinSize*(float)PI;\n\t\t\tfloat w = (cosf(x) + 1.0f)*0.5f;\n\n\t\t\tbuf2[bufPos] += w*ave;\n\t\t}\n\t}\n\n\tmemcpy(buf, buf2, sizeof(float)*size);\n\tdelete[] buf2;\n}\n\nvoid PreprocessFreqMap(const SentenceDescriptor* desc, unsigned outBufLen, float* freqMap, std::vector<unsigned>& bounds)\n{\n\tunsigned i_piece = 0;\n\tunsigned i_freq = 0;\n\n\tbounds.clear();\n\tbounds.push_back(0);\n\n\tconst std::vector<GeneralCtrlPnt>& piece_map = desc->piece_map;\n\tconst std::vector<GeneralCtrlPnt>& freq_map = desc->freq_map;\n\n\tfloat lastPiece = piece_map[0].value;\n\n\tfor (unsigned i = 0; i < outBufLen; i++)\n\t{\n\t\tfloat fpos = (float)i / rate*1000.0f;\n\t\twhile (i_piece + 1<piece_map.size() && fpos >= piece_map[i_piece + 1].dstPos)\n\t\t\ti_piece++;\n\t\tfloat k_piece = (fpos - piece_map[i_piece].dstPos) / (piece_map[i_piece + 1].dstPos - piece_map[i_piece].dstPos);\n\t\tClamp01(k_piece);\n\t\tfloat piece = piece_map[i_piece].value*(1.0f - k_piece) + piece_map[i_piece + 1].value*k_piece;\n\n\t\tif (i_freq + 1<freq_map.size() && fpos >= freq_map[i_freq + 1].dstPos)\n\t\t{\n\t\t\tif (piece - lastPiece >= 1.0f)\n\t\t\t{\n\t\t\t\tbounds.push_back(i);\n\t\t\t\tlastPiece = piece;\n\t\t\t}\n\t\t\ti_freq++;\n\t\t}\n\n\t\twhile (i_freq + 1 < freq_map.size() && fpos >= freq_map[i_freq + 1].dstPos)\n\t\t\ti_freq++;\n\t\tfloat k_freq = (fpos - freq_map[i_freq].dstPos) / (freq_map[i_freq + 1].dstPos - freq_map[i_freq].dstPos);\n\t\tClamp01(k_freq);\n\t\tfloat freq = freq_map[i_freq].value*(1.0f - k_freq) + freq_map[i_freq + 1].value*k_freq;\n\n\t\tfreqMap[i] = freq / rate;\n\t}\n\n\tbounds.push_back(outBufLen);\n\n\t_floatBufSmooth(freqMap, outBufLen);\n\n}\n"
  },
  {
    "path": "VoiceSampler/SentenceGeneratorGeneral.h",
    "content": "#ifndef __SentenceGeneratorGeneral_h\n#define __SentenceGeneratorGeneral_h\n\n#include \"VoiceUtil.h\"\nusing namespace VoiceUtil;\n\nvoid RegulateSource(const float* srcData, unsigned len, Buffer& dstBuf, int srcStart, int srcEnd);\nvoid PreprocessFreqMap(const SentenceDescriptor* desc, unsigned outBufLen, float* freqMap, std::vector<unsigned>& bounds);\n\n#endif\n\n"
  },
  {
    "path": "VoiceSampler/VoiceUtil.cuh",
    "content": "#include \"fft.cuh\"\n#ifndef max\n#define max(a,b)            (((a) > (b)) ? (a) : (b))\n#endif\n\n#ifndef min\n#define min(a,b)            (((a) < (b)) ? (a) : (b))\n#endif\n\n\ninline __device__ float d_WndGetSample(const float* s_Wnd, unsigned u_halfWidth, int i)\n{\n\tif (i< -(int)(u_halfWidth - 1) || i>(int)(u_halfWidth - 1)) return 0.0f;\n\tint idst = i >= 0 ? i : ((int)u_halfWidth * 2 + i);\n\treturn s_Wnd[idst];\n}\n\ninline __device__ void d_WndSetSample(float* s_Wnd, unsigned u_halfWidth, int i, float v)\n{\n\tif (i< -(int)(u_halfWidth - 1) || i>(int)(u_halfWidth - 1)) return;\n\tint idst = i >= 0 ? i : ((int)u_halfWidth * 2 + i);\n\ts_Wnd[idst] = v;\n}\n\n__device__ void d_captureFromBuf(unsigned srcLen, float* d_srcBuf, unsigned srcPos, float halfWinlen, unsigned u_halfWidth, float* s_captureWnd)\n{\n\tunsigned numWorker = blockDim.x;\n\tunsigned workerId = threadIdx.x;\n\tfor (int i = (int)workerId - (int)(u_halfWidth - 1); i <= (int)(u_halfWidth -1); i += (int)numWorker)\n\t{\n\t\tint isrc = (int)srcPos + i;\n\t\tfloat v = 0.0f;\n\t\tif (isrc >= 0 && isrc < srcLen)\n\t\t\tv = d_srcBuf[isrc];\n\n\t\tv *= (cosf((float)i * PI / halfWinlen) + 1.0f)*0.5f;\n\n\t\td_WndSetSample(s_captureWnd, u_halfWidth, i, v);\n\t}\n\tif (workerId==0)\n\t\ts_captureWnd[u_halfWidth] = 0.0f;\n\n\t__syncthreads();\n\n}\n\n__device__ void d_ScaleWindow(float srcHalfWinlen, unsigned u_SrcHalfWidth, const float* s_Wnd, float* s_dstWnd, float targetHalfWidth)\n{\n\tunsigned u_TargetHalfWidth = (unsigned)ceilf(targetHalfWidth);\n\tfloat rate = srcHalfWinlen / targetHalfWidth;\n\tbool interpolation = rate < 1.0f;\n\n\tunsigned numWorker = blockDim.x;\n\tunsigned workerId = threadIdx.x;\n\n\tfor (int i = (int)workerId - (int)(u_TargetHalfWidth - 1); i <= (int)(u_TargetHalfWidth - 1); i += (int)numWorker)\n\t{\n\t\tfloat destValue;\n\t\tfloat srcPos = (float)i*rate;\n\t\tif (interpolation)\n\t\t{\n\t\t\tint ipos1 = (int)floorf(srcPos);\n\t\t\tfloat frac = srcPos - (float)ipos1;\n\t\t\tint ipos2 = ipos1 + 1;\n\t\t\tint ipos0 = ipos1 - 1;\n\t\t\tint ipos3 = ipos1 + 2;\n\n\t\t\tfloat p0 = d_WndGetSample(s_Wnd, u_SrcHalfWidth, ipos0);\n\t\t\tfloat p1 = d_WndGetSample(s_Wnd, u_SrcHalfWidth, ipos1);\n\t\t\tfloat p2 = d_WndGetSample(s_Wnd, u_SrcHalfWidth, ipos2);\n\t\t\tfloat p3 = d_WndGetSample(s_Wnd, u_SrcHalfWidth, ipos3);\n\n\t\t\tdestValue = (-0.5f*p0 + 1.5f*p1 - 1.5f*p2 + 0.5f*p3)*powf(frac, 3.0f) +\n\t\t\t\t(p0 - 2.5f*p1 + 2.0f*p2 - 0.5f*p3)*powf(frac, 2.0f) +\n\t\t\t\t(-0.5f*p0 + 0.5f*p2)*frac + p1;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tint ipos1 = (int)ceilf(srcPos - rate*0.5f);\n\t\t\tint ipos2 = (int)floorf(srcPos + rate*0.5f);\n\n\t\t\tfloat sum = 0.0f;\n\t\t\tfor (int ipos = ipos1; ipos <= ipos2; ipos++)\n\t\t\t{\n\t\t\t\tsum += d_WndGetSample(s_Wnd, u_SrcHalfWidth, ipos);\n\t\t\t}\n\t\t\tdestValue = sum / (float)(ipos2 - ipos1 + 1);\n\t\t}\n\t\td_WndSetSample(s_dstWnd, u_TargetHalfWidth, i, destValue);\n\t}\n\tif (workerId == 0)\n\t\ts_dstWnd[u_TargetHalfWidth] = 0.0f;\n\t__syncthreads();\n}\n\n__device__ void d_CreateAmpSpectrumFromWindow(float halfWinlen, unsigned u_halfWidth, float* s_Wnd, float* s_res_wnd, unsigned uSpecLen)\n{\n\tunsigned numWorker = blockDim.x;\n\tunsigned workerId = threadIdx.x;\n\n\tunsigned l = 0;\n\tunsigned fftLen = 1;\n\twhile (fftLen < u_halfWidth)\n\t{\n\t\tl++;\n\t\tfftLen <<= 1;\n\t}\n\tfloat fLen = (float)fftLen;\n\n\td_ScaleWindow(halfWinlen, u_halfWidth, s_Wnd, s_res_wnd, fLen);\n\n\tfor (unsigned i = 1 + workerId; i < fftLen; i += numWorker)\n\t{\n\t\ts_res_wnd[i] += s_res_wnd[i+fftLen];\n\t\ts_res_wnd[i + fftLen] = 0.0f;\n\t}\n\t__syncthreads();\n\t\n\td_fft(s_res_wnd, l);\n\n\tfloat rate = halfWinlen / fLen;\n\tfor (unsigned i = workerId; i < fftLen; i += numWorker)\n\t{\n\t\tfloat v = 0.0f;\n\t\tif (i < uSpecLen)\n\t\t{\n\t\t\tfloat amplitude = sqrtf(s_res_wnd[i] * s_res_wnd[i] + s_res_wnd[i + fftLen] * s_res_wnd[i + fftLen]);\n\t\t\tv = amplitude*rate;\n\t\t}\n\t\ts_res_wnd[i] = v;\n\t}\n\n\t__syncthreads();\t\n\n\tfor (unsigned i = fftLen+workerId; i < 2*fftLen; i += numWorker)\n\t{\n\t\ts_res_wnd[i] = 0.0f;\n\t}\n\t__syncthreads();\n}\n\n\ninline __device__ float d_SymWndGetSample(const float* s_SymWnd, unsigned u_halfWidth, int i)\n{\n\tif (i< -(int)(u_halfWidth - 1) || i>u_halfWidth - 1) return 0.0f;\n\tint idst = i >= 0 ? i : -i;\n\tfloat v = s_SymWnd[idst];\n\treturn i >= 0 ? v : -v;\n}\n\n__device__ void d_ScaleSymWindow(float srcHalfWinlen, unsigned u_SrcHalfWidth, const float* s_SymWnd, float* s_dstSymWnd, float targetHalfWidth)\n{\n\tunsigned u_TargetHalfWidth = (unsigned)ceilf(targetHalfWidth);\n\tfloat rate = srcHalfWinlen / targetHalfWidth;\n\tbool interpolation = rate < 1.0f;\n\n\tunsigned numWorker = blockDim.x;\n\tunsigned workerId = threadIdx.x;\n\n\tfor (int i = workerId; i <= (int)(u_TargetHalfWidth - 1); i += numWorker)\n\t{\n\t\tfloat destValue;\n\t\tfloat srcPos = (float)i*rate;\n\t\tif (interpolation)\n\t\t{\n\t\t\tint ipos1 = (int)floorf(srcPos);\n\t\t\tfloat frac = srcPos - (float)ipos1;\n\t\t\tint ipos2 = ipos1 + 1;\n\t\t\tint ipos0 = ipos1 - 1;\n\t\t\tint ipos3 = ipos1 + 2;\n\n\t\t\tfloat p0 = d_SymWndGetSample(s_SymWnd, u_SrcHalfWidth, ipos0);\n\t\t\tfloat p1 = d_SymWndGetSample(s_SymWnd, u_SrcHalfWidth, ipos1);\n\t\t\tfloat p2 = d_SymWndGetSample(s_SymWnd, u_SrcHalfWidth, ipos2);\n\t\t\tfloat p3 = d_SymWndGetSample(s_SymWnd, u_SrcHalfWidth, ipos3);\n\n\t\t\tdestValue = (-0.5f*p0 + 1.5f*p1 - 1.5f*p2 + 0.5f*p3)*powf(frac, 3.0f) +\n\t\t\t\t(p0 - 2.5f*p1 + 2.0f*p2 - 0.5f*p3)*powf(frac, 2.0f) +\n\t\t\t\t(-0.5f*p0 + 0.5f*p2)*frac + p1;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tint ipos1 = (int)ceilf(srcPos - rate*0.5f);\n\t\t\tint ipos2 = (int)floorf(srcPos + rate*0.5f);\n\n\t\t\tfloat sum = 0.0f;\n\t\t\tfor (int ipos = ipos1; ipos <= ipos2; ipos++)\n\t\t\t{\n\t\t\t\tsum += d_SymWndGetSample(s_SymWnd, u_SrcHalfWidth, ipos);\n\t\t\t}\n\t\t\tdestValue = sum / (float)(ipos2 - ipos1 + 1);\n\t\t}\n\t\ts_dstSymWnd[i] = destValue;\n\t}\n\t__syncthreads();\n}\n\n__device__ void d_CreateSymmetricWindowFromAmpSpec(float* s_spectrum, unsigned uSpecLen, float halfWinlen, unsigned u_halfWidth, float* s_SymWnd)\n{\n\tunsigned l = 0;\n\tunsigned fftLen = 1;\n\twhile ((float)fftLen < u_halfWidth)\n\t{\n\t\tl++;\n\t\tfftLen <<= 1;\n\t}\n\n\tfloat rate = (float)fftLen / halfWinlen;\n\n\tunsigned numWorker = blockDim.x;\n\tunsigned workerId = threadIdx.x;\n\n\tif (workerId == 0)\n\t{\n\t\ts_SymWnd[0] = 0.0f;\n\t\ts_SymWnd[fftLen] = 0.0f;\n\n\t\ts_SymWnd[fftLen/2] = 0.0f;\n\t\ts_SymWnd[fftLen + fftLen/2] = 0.0f;\n\t}\n\tfor (unsigned i = 1 + workerId; i < fftLen / 2; i += numWorker)\n\t{\n\t\tfloat x = 0.0f;\n\t\tif (i < uSpecLen)\n\t\t{\n\t\t\tfloat amplitude = s_spectrum[i];\n\t\t\tx = amplitude * rate;\n\t\t}\n\t\ts_SymWnd[i] = 0.0f;\n\t\ts_SymWnd[fftLen + i] = x;\n\t\ts_SymWnd[fftLen - i] = 0.0f;\n\t\ts_SymWnd[2 * fftLen - i] = -x;\n\t}\n\t__syncthreads();\n\n\td_ifft(s_SymWnd, l);\n\n\tfor (unsigned i = workerId; i < fftLen; i += numWorker)\n\t{\n\t\tfloat window = (cosf((float)i * (float)PI / (float)fftLen) + 1.0f)*0.5f;\n\t\ts_SymWnd[i + fftLen] = s_SymWnd[i]*window;\n\t}\n\t__syncthreads();\n\n\td_ScaleSymWindow((float)fftLen, fftLen, s_SymWnd + fftLen, s_SymWnd, halfWinlen);\n\n}\n\n__device__ void SymWin_Repitch_FormantPreserved(float srcHalfWinLen, float* srcBuf, float dstHalfWinLen, float* dstBuf, float k)\n{\n\tunsigned numWorker = blockDim.x;\n\tunsigned workerId = threadIdx.x;\n\n\tunsigned u_TargetHalfWidth = (unsigned)ceilf(dstHalfWinLen);\n\tunsigned uSrcHalfWidth = (unsigned)ceilf(srcHalfWinLen);\n\n\tfloat rate = dstHalfWinLen / srcHalfWinLen;\n\tfloat amplitude = k*sqrtf(rate);\n\tfor (unsigned i = workerId; (float)i < dstHalfWinLen; i += numWorker)\n\t{\n\t\tfloat dstV = 0.0f;\n\t\tfloat srcPos = (float)i;\n\t\tunsigned uSrcPos = (unsigned)(srcPos + 0.5f);\n\t\twhile (uSrcPos < uSrcHalfWidth)\n\t\t{\n\t\t\tdstV += srcBuf[uSrcPos];\n\t\t\tsrcPos += dstHalfWinLen;\n\t\t\tuSrcPos = (unsigned)(srcPos + 0.5f);\n\t\t}\n\t\tsrcPos = dstHalfWinLen - (float)i;\n\t\tuSrcPos = (unsigned)(srcPos + 0.5f);\n\t\twhile (uSrcPos < uSrcHalfWidth)\n\t\t{\n\t\t\tdstV -= srcBuf[uSrcPos];\n\t\t\tsrcPos += dstHalfWinLen;\n\t\t\tuSrcPos = (unsigned)(srcPos + 0.5f);\n\t\t}\n\t\tfloat window = (cosf((float)i * (float)PI / dstHalfWinLen) + 1.0f)*0.5f;\n\t\tdstBuf[i] += dstV*amplitude*window;\n\t}\n\t__syncthreads();\n}\n\n__device__ void SymWin_WriteToBuf(unsigned dstLen, float* d_dstBuf, float pos, float halfWinLen, float* s_symWnd)\n{\n\tint ipos = (int)floorf(pos);\n\tunsigned uHalfWinLen = (unsigned)ceilf(halfWinLen);\n\tunsigned numWorker = blockDim.x;\n\tunsigned workerId = threadIdx.x;\n\n\tfor (int i = (int)(workerId)-(int)(uHalfWinLen - 1); i <= (int)(uHalfWinLen - 1); i += (int)numWorker)\n\t{\n\t\tint uI = i < 0 ? -i : i;\n\t\tfloat v = s_symWnd[uI];\n\t\tint dstI = ipos + i;\n\t\tif (dstI >= 0 && dstI < dstLen)\n\t\t\td_dstBuf[dstI] += i<0? -v:v;\n\t}\n\t__syncthreads();\n}\n\n__device__ void Win_WriteToBuf(unsigned dstLen, float* d_dstBuf, float pos, float halfWinLen, float* s_Wnd)\n{\n\tint ipos = (int)floorf(pos);\n\tunsigned uHalfWinLen = (unsigned)ceilf(halfWinLen);\n\tunsigned numWorker = blockDim.x;\n\tunsigned workerId = threadIdx.x;\n\n\tfor (int i = (int)(workerId)-(int)(uHalfWinLen - 1); i <= (int)(uHalfWinLen - 1); i += (int)numWorker)\n\t{\n\t\tint uI = i < 0 ? halfWinLen*2 + i : i;\n\t\tfloat v = s_Wnd[uI];\n\t\tint dstI = ipos + i;\n\t\tif (dstI >= 0 && dstI < dstLen)\n\t\t\td_dstBuf[dstI] += v;\n\t}\n\t__syncthreads();\n}\n\n__device__ void AmpSpec_Scale(float srcHalfWinLen, float* srcBuf, float dstHalfWinLen, float* dstBuf, float k)\n{\n\tunsigned numWorker = blockDim.x;\n\tunsigned workerId = threadIdx.x;\n\n\tunsigned srcSpecLen = (unsigned)ceilf(srcHalfWinLen*0.5f);\n\tunsigned specLen = (unsigned)ceilf(dstHalfWinLen*0.5f);\n\tfloat rate = srcHalfWinLen / dstHalfWinLen;\n\tfloat mulRate = sqrtf(dstHalfWinLen / srcHalfWinLen) *k;\n\tbool interpolation = rate < 1.0f;\n\n\tfor (unsigned i = workerId; i < specLen; i += numWorker)\n\t{\n\t\tfloat destValue;\n\t\tfloat srcPos = (float)i*rate;\n\t\tif (interpolation)\n\t\t{\n\t\t\tint ipos1 = (int)floorf(srcPos);\n\t\t\tfloat frac = srcPos - (float)ipos1;\n\t\t\tint ipos2 = ipos1 + 1;\n\t\t\tint ipos0 = ipos1 - 1;\n\t\t\tint ipos3 = ipos1 + 2;\n\n\t\t\tfloat p0 = ipos0 < 0 ? 0.0f : srcBuf[ipos0];\n\t\t\tfloat p1 = ipos1 >= srcSpecLen ? 0.0f : srcBuf[ipos1];\n\t\t\tfloat p2 = ipos2 >= srcSpecLen ? 0.0f : srcBuf[ipos2];\n\t\t\tfloat p3 = ipos3 >= srcSpecLen ? 0.0f : srcBuf[ipos3];\n\n\t\t\tdestValue = (-0.5f*p0 + 1.5f*p1 - 1.5f*p2 + 0.5f*p3)*powf(frac, 3.0f) +\n\t\t\t\t(p0 - 2.5f*p1 + 2.0f*p2 - 0.5f*p3)*powf(frac, 2.0f) +\n\t\t\t\t(-0.5f*p0 + 0.5f*p2)*frac + p1;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tint ipos1 = (int)ceilf(srcPos - rate*0.5f);\n\t\t\tint ipos2 = (int)floorf(srcPos + rate*0.5f);\n\n\t\t\tfloat sum = 0.0f;\n\t\t\tfor (int ipos = ipos1; ipos <= ipos2; ipos++)\n\t\t\t{\n\t\t\t\tsum += (ipos<0 || ipos >= srcSpecLen) ? 0.0f : srcBuf[ipos];\n\t\t\t}\n\t\t\tdestValue = sum / (float)(ipos2 - ipos1 + 1);\n\n\t\t}\n\n\t\tdstBuf[i] += destValue*mulRate;\n\n\t}\n\t__syncthreads();\n\n}\n\n\n__device__ void d_CreateNoiseWindowFromAmpSpec(float* s_spectrum, float* randphase, unsigned uSpecLen, float halfWinlen, unsigned u_halfWidth, float* s_NoiseWnd, float targetHalfWidth)\n{\n\tunsigned l = 0;\n\tunsigned fftLen = 1;\n\twhile ((float)fftLen < u_halfWidth)\n\t{\n\t\tl++;\n\t\tfftLen <<= 1;\n\t}\n\tfloat rate = (float)fftLen / halfWinlen;\n\n\tunsigned numWorker = blockDim.x;\n\tunsigned workerId = threadIdx.x;\n\n\tif (workerId == 0)\n\t{\n\t\ts_NoiseWnd[0] = 0.0f;\n\t\ts_NoiseWnd[fftLen] = 0.0f;\n\n\t\ts_NoiseWnd[fftLen / 2] = 0.0f;\n\t\ts_NoiseWnd[fftLen + fftLen / 2] = 0.0f;\n\t}\n\tfor (unsigned i = 1 + workerId; i < fftLen / 2; i += numWorker)\n\t{\n\t\tfloat x = 0.0f;\n\t\tfloat y = 0.0f;\n\t\tif (i < uSpecLen)\n\t\t{\n\t\t\tfloat amplitude = s_spectrum[i] * rate;\n\t\t\tfloat phase = randphase[i] * 2.0f*PI;\n\t\t\tx = amplitude * cosf(phase);\n\t\t\ty = amplitude * sinf(phase);\n\t\t}\n\t\ts_NoiseWnd[i] = x;\n\t\ts_NoiseWnd[fftLen + i] = y;\n\t\ts_NoiseWnd[fftLen - i] = x;\n\t\ts_NoiseWnd[2 * fftLen - i] = -y;\n\t}\n\t__syncthreads();\n\n\td_ifft(s_NoiseWnd, l);\n\n\tunsigned u_targetHalfWidth = (unsigned)ceilf(targetHalfWidth);\n\tunsigned skip_len = max(2 * fftLen, 2 * u_targetHalfWidth);\n\n\tfor (unsigned i = workerId; i < fftLen; i += numWorker)\n\t{\n\t\tfloat window = (cosf((float)i * (float)PI / (float)fftLen) + 1.0f)*0.5f;\n\n\t\ts_NoiseWnd[i + skip_len] = s_NoiseWnd[i] * window;\n\t\tif (i>0)\n\t\t\ts_NoiseWnd[skip_len+ 2 * fftLen - i] = s_NoiseWnd[fftLen - i] * window;\n\t}\n\tif (workerId == 0)\n\t\ts_NoiseWnd[skip_len + fftLen] = 0;\n\t__syncthreads();\n\n\td_ScaleWindow((float)fftLen, fftLen, s_NoiseWnd + skip_len, s_NoiseWnd, targetHalfWidth);\n}\n\n"
  },
  {
    "path": "VoiceSampler/VoiceUtil.h",
    "content": "#ifndef _VoiceUtil_h\n#define _VoiceUtil_h\n\n#define Symmetric_Type_Axis 0\n#define Symmetric_Type_Center 1\n#define Symmetric_Type Symmetric_Type_Center\n\n\n#include <vector>\n#include \"fft.h\"\n#include <stdlib.h>\n#include <memory.h>\n#include <cmath>\n#include <float.h>\n\n#ifndef max\n#define max(a,b)            (((a) > (b)) ? (a) : (b))\n#endif\n\n#ifndef min\n#define min(a,b)            (((a) < (b)) ? (a) : (b))\n#endif\n\n\ninline float rand01()\n{\n\tfloat f = (float)rand() / (float)RAND_MAX;\n\tif (f < 0.0000001f) f = 0.0000001f;\n\tif (f > 0.9999999f) f = 0.9999999f;\n\treturn f;\n}\n\ninline float randGauss(float sd)\n{\n\treturn sd*sqrtf(-2.0f*logf(rand01()))*cosf(rand01()*(float)PI);\n}\n\n\n\nnamespace VoiceUtil\n{\n\tinline void calcPOT(unsigned lenIn, unsigned& lenOut, unsigned& l)\n\t{\n\t\tlenOut = 1;\n\t\tl = 0;\n\t\twhile (lenOut < lenIn)\n\t\t{\n\t\t\tl++;\n\t\t\tlenOut <<= 1;\n\t\t}\n\t}\n\n\tstruct Buffer\n\t{\n\t\tunsigned m_sampleRate;\n\t\tstd::vector<float> m_data;\n\n\t\tvoid Allocate(unsigned size)\n\t\t{\n\t\t\tm_data.resize(size);\n\t\t\tSetZero();\n\t\t}\n\n\t\tfloat GetSample(int i) const\n\t\t{\n\t\t\tsize_t usize = m_data.size();\n\t\t\tif (i<0 || i >= (int)usize) return 0.0f;\n\t\t\treturn m_data[i];\n\t\t}\n\n\t\tvoid SetZero()\n\t\t{\n\t\t\tmemset(m_data.data(), 0, sizeof(float)*m_data.size());\n\t\t}\n\n\t\tvoid SetSample(int i, float v)\n\t\t{\n\t\t\tsize_t usize = m_data.size();\n\t\t\tif (i < 0 || i >= (int)usize) return;\n\t\t\tm_data[i] = v;\n\t\t}\n\t\t\n\t\tvoid AddToSample(int i, float v)\n\t\t{\n\t\t\tsize_t usize = m_data.size();\n\t\t\tif (i < 0 || i >= (int)usize) return;\n\t\t\tm_data[i] += v;\n\t\t}\t\n\n\t\tfloat GetMax()\n\t\t{\n\t\t\tfloat maxv = 0.0f;\n\t\t\tfor (size_t i = 0; i < m_data.size(); i++)\n\t\t\t{\n\t\t\t\tif (fabsf(m_data[i])>maxv) maxv = fabsf(m_data[i]);\n\t\t\t}\n\t\t\treturn maxv;\n\t\t}\n\n\t};\n\n\tclass AmpSpectrum;\n\tclass Window\n\t{\n\tpublic:\n\t\tvirtual ~Window(){}\n\t\tfloat m_halfWidth;\n\t\tstd::vector<float> m_data;\n\n\t\tvoid Allocate(float halfWidth)\n\t\t{\n\t\t\tunsigned u_halfWidth = (unsigned)ceilf(halfWidth);\n\t\t\tunsigned u_width = u_halfWidth << 1;\n\n\t\t\tm_halfWidth = halfWidth;\n\t\t\tm_data.resize(u_width);\n\n\t\t\tSetZero();\n\t\t}\n\n\t\tvoid SetZero()\n\t\t{\n\t\t\tmemset(m_data.data(), 0, sizeof(float)*m_data.size());\n\t\t}\n\n\t\tvoid CreateFromBuffer(const Buffer& src, float center, float halfWidth)\n\t\t{\n\t\t\tunsigned u_halfWidth = (unsigned)ceilf(halfWidth);\n\t\t\tunsigned u_width = u_halfWidth << 1;\n\n\t\t\tm_halfWidth = halfWidth;\n\t\t\tm_data.resize(u_width);\n\n\t\t\tSetZero();\n\n\t\t\tint i_Center = (int)center;\n\n\t\t\tfor (int i = -(int)u_halfWidth; i < (int)u_halfWidth; i++)\n\t\t\t{\n\t\t\t\tfloat window = (cosf((float)i * (float)PI / halfWidth) + 1.0f)*0.5f;\n\n\t\t\t\tint srcIndex = i_Center + i;\n\t\t\t\tfloat v_src = src.GetSample(srcIndex);\n\n\t\t\t\tSetSample(i, window* v_src);\n\t\t\t}\n\t\t}\n\n\t\tvoid MergeToBuffer(Buffer& buf, float pos)\n\t\t{\n\t\t\tint ipos = (int)floorf(pos);\n\t\t\tunsigned u_halfWidth = GetHalfWidthOfData();\n\n\t\t\tfor (int i = max(-(int)u_halfWidth, -ipos); i < (int)u_halfWidth; i++)\n\t\t\t{\n\t\t\t\tint dstIndex = ipos + i;\n\t\t\t\tif (dstIndex >= (int)buf.m_data.size()) break;\n\t\t\t\tbuf.m_data[dstIndex] += GetSample(i);\n\t\t\t}\n\t\t}\n\n\t\tvirtual void Interpolate(const Window& win0, const Window& win1, float k, float targetHalfWidth)\n\t\t{\n\t\t\tm_halfWidth = targetHalfWidth;\n\t\t\tunsigned u_halfWidth = (unsigned)ceilf(targetHalfWidth);\n\t\t\tunsigned u_Width = u_halfWidth << 1;\n\t\t\tm_data.resize(u_Width);\n\n\t\t\tfor (int i = -((int)u_halfWidth - 1); i <= (int)u_halfWidth - 1; i++)\n\t\t\t{\n\t\t\t\tfloat v0 = win0.GetSample(i);\n\t\t\t\tfloat v1 = win1.GetSample(i);\n\t\t\t\tthis->SetSample(i, (1.0f - k) *v0 + k* v1);\n\t\t\t}\n\t\t}\n\n\t\tvirtual unsigned GetHalfWidthOfData() const\n\t\t{\n\t\t\tunsigned u_width = (unsigned)m_data.size();\n\t\t\tunsigned u_halfWidth = u_width >> 1;\n\n\t\t\treturn u_halfWidth;\n\t\t}\n\n\t\tvirtual float GetSample(int i) const\n\t\t{\n\t\t\tunsigned u_width = (unsigned)m_data.size();\n\t\t\tunsigned u_halfWidth = u_width >> 1;\n\t\t\t\n\t\t\tunsigned pos;\n\t\t\tif (i >= 0)\n\t\t\t{\n\t\t\t\tif ((unsigned)i > u_halfWidth - 1) return 0.0f;\n\t\t\t\tpos = (unsigned)i;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (((int)u_width + i) < (int)u_halfWidth + 1) return 0.0f;\n\t\t\t\tpos = u_width - (unsigned)(-i);\n\t\t\t}\n\n\t\t\treturn m_data[pos];\n\t\t}\n\n\t\tvirtual void SetSample(int i, float v)\n\t\t{\n\t\t\tunsigned u_width = (unsigned)m_data.size();\n\t\t\tunsigned u_halfWidth = u_width >> 1;\n\n\t\t\tunsigned pos;\n\t\t\tif (i >= 0)\n\t\t\t{\n\t\t\t\tif ((unsigned)i > u_halfWidth - 1) return;\n\t\t\t\tpos = (unsigned)i;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (((int)u_width + i) < (int)u_halfWidth + 1) return;\n\t\t\t\tpos = u_width - (unsigned)(-i);\n\t\t\t}\n\n\t\t\tm_data[pos] = v;\n\t\t}\t\n\n\t\tvirtual void Scale(const Window& src, float targetHalfWidth)\n\t\t{\n\t\t\tm_halfWidth = targetHalfWidth;\n\t\t\tunsigned u_TargetHalfWidth = (unsigned)ceilf(targetHalfWidth);\n\t\t\tunsigned u_TargetWidth = u_TargetHalfWidth << 1;\n\t\t\tm_data.resize(u_TargetWidth);\n\n\t\t\tfloat rate = src.m_halfWidth / targetHalfWidth;\n\t\t\tbool interpolation = rate < 1.0f;\n\t\t\tfor (int i = -(int)(u_TargetHalfWidth - 1); i <= (int)(u_TargetHalfWidth - 1); i++)\n\t\t\t{\n\t\t\t\tfloat destValue;\n\t\t\t\tfloat srcPos = (float)i*rate;\n\t\t\t\tif (interpolation)\n\t\t\t\t{\n\t\t\t\t\tint ipos1 = (int)floorf(srcPos);\n\t\t\t\t\tfloat frac = srcPos - (float)ipos1;\n\t\t\t\t\tint ipos2 = ipos1 + 1;\n\t\t\t\t\tint ipos0 = ipos1 - 1;\n\t\t\t\t\tint ipos3 = ipos1 + 2;\n\n\t\t\t\t\tfloat p0 = src.GetSample(ipos0);\n\t\t\t\t\tfloat p1 = src.GetSample(ipos1);\n\t\t\t\t\tfloat p2 = src.GetSample(ipos2);\n\t\t\t\t\tfloat p3 = src.GetSample(ipos3);\n\n\t\t\t\t\tdestValue = (-0.5f*p0 + 1.5f*p1 - 1.5f*p2 + 0.5f*p3)*powf(frac, 3.0f) +\n\t\t\t\t\t\t(p0 - 2.5f*p1 + 2.0f*p2 - 0.5f*p3)*powf(frac, 2.0f) +\n\t\t\t\t\t\t(-0.5f*p0 + 0.5f*p2)*frac + p1;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tint ipos1 = (int)ceilf(srcPos - rate*0.5f);\n\t\t\t\t\tint ipos2 = (int)floorf(srcPos + rate*0.5f);\n\n\t\t\t\t\tfloat sum = 0.0f;\n\t\t\t\t\tfor (int ipos = ipos1; ipos <= ipos2; ipos++)\n\t\t\t\t\t{\n\t\t\t\t\t\tsum += src.GetSample(ipos);\n\t\t\t\t\t}\n\t\t\t\t\tdestValue = sum / (float)(ipos2 - ipos1 + 1);\n\n\t\t\t\t}\n\n\t\t\t\tthis->SetSample(i, destValue);\n\n\t\t\t}\n\t\t}\n\n\t\tinline void CreateFromAmpSpec_noise(const AmpSpectrum& src, float targetHalfWidth=-1.0f);\n\n\t};\n\n\tclass AmpSpectrum\n\t{\n\tpublic:\n\t\tfloat m_halfWidth;\n\t\tstd::vector<float> m_data;\n\n\t\tvoid Allocate(float halfWidth)\n\t\t{\n\t\t\tm_halfWidth = halfWidth;\n\t\t\tunsigned specLen = (unsigned)ceilf(m_halfWidth*0.5f);\n\t\t\tm_data.resize(specLen);\n\n\t\t\tSetZero();\n\t\t}\n\n\t\tvoid SetZero()\n\t\t{\n\t\t\tmemset(m_data.data(), 0, sizeof(float)*m_data.size());\n\t\t}\n\n\t\tbool NonZero()\n\t\t{\n\t\t\tfor (unsigned i = 1; i < (unsigned)m_data.size(); i++)\n\t\t\t\tif (m_data[i] != 0.0f) return true;\n\t\t\treturn false;\n\t\t}\n\n\t\tvoid CreateFromWindow(const Window& src)\n\t\t{\n\t\t\tm_halfWidth = src.m_halfWidth;\n\t\t\tunsigned u_srcHalfWidth = src.GetHalfWidthOfData();\n\t\t\tunsigned l = 0;\n\t\t\tunsigned fftLen = 1;\n\t\t\twhile (fftLen < u_srcHalfWidth)\n\t\t\t{\n\t\t\t\tl++;\n\t\t\t\tfftLen <<= 1;\n\t\t\t}\n\t\t\tfloat fLen = (float)fftLen;\n\n\t\t\tWindow l_scaled;\n\t\t\tconst Window* scaled = &l_scaled;\n\t\t\tif (src.m_halfWidth == fLen)\n\t\t\t{\n\t\t\t\tscaled = &src;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tl_scaled.Scale(src, fLen);\n\t\t\t}\n\n\t\t\tDComp* fftBuf = new DComp[fftLen];\n\t\t\tmemset(fftBuf, 0, sizeof(DComp)*fftLen);\n\n\t\t\tfor (unsigned i = 0; i < fftLen; i++)\n\t\t\t{\n\t\t\t\tfftBuf[i].Re = (double)scaled->GetSample((int)i) + (double)scaled->GetSample((int)i - (int)fftLen);\n\t\t\t}\n\n\t\t\tfft(fftBuf, l);\n\n\t\t\tfloat rate = m_halfWidth / fLen;\n\t\t\tm_data.resize((unsigned)ceilf(m_halfWidth*0.5f));\n\t\t\tfor (unsigned i = 0; i < (unsigned)m_data.size(); i++)\n\t\t\t{\n\t\t\t\tif (i >= fftLen)\n\t\t\t\t\tm_data[i] = 0.0f;\n\t\t\t\telse\n\t\t\t\t\tm_data[i] = (float)DCAbs(&fftBuf[i])*rate;\n\t\t\t}\n\t\t\tdelete[] fftBuf;\n\t\t}\n\n\t\tvoid Interpolate(const AmpSpectrum& spec0, const AmpSpectrum& spec1, float k, float targetHalfWidth)\n\t\t{\n\t\t\tm_halfWidth = targetHalfWidth;\n\t\t\tunsigned specLen = (unsigned)ceilf(m_halfWidth*0.5f);\n\t\t\tm_data.resize(specLen);\n\n\t\t\tfor (unsigned i = 0; i <specLen; i++)\n\t\t\t{\n\t\t\t\tfloat v0 = spec0.GetSample(i);\n\t\t\t\tfloat v1 = spec1.GetSample(i);\n\t\t\t\tm_data[i]= (1.0f - k) *v0 + k* v1;\n\t\t\t}\n\t\t}\n\n\n\t\tfloat GetSample(int i) const\n\t\t{\n\t\t\tif (i < 0) i = 0;\n\t\t\tif (i >= (int)m_data.size()) i = (int)m_data.size() - 1;\n\t\t\treturn m_data[i];\n\t\t}\n\n\t\tvoid Scale(const AmpSpectrum& src, float targetHalfWidth)\n\t\t{\n\t\t\tm_halfWidth = targetHalfWidth;\n\t\t\tunsigned specLen = (unsigned)ceilf(m_halfWidth*0.5f);\n\t\t\tm_data.resize(specLen);\n\n\t\t\tfloat rate = src.m_halfWidth / targetHalfWidth;\n\t\t\tfloat mulRate = sqrtf(targetHalfWidth / src.m_halfWidth);\n\t\t\tbool interpolation = rate < 1.0f;\n\t\t\tfor (unsigned i = 0; i < specLen; i++)\n\t\t\t{\n\t\t\t\tfloat destValue;\n\t\t\t\tfloat srcPos = (float)i*rate;\n\t\t\t\tif (interpolation)\n\t\t\t\t{\n\t\t\t\t\tint ipos1 = (int)floorf(srcPos);\n\t\t\t\t\tfloat frac = srcPos - (float)ipos1;\n\t\t\t\t\tint ipos2 = ipos1 + 1;\n\t\t\t\t\tint ipos0 = ipos1 - 1;\n\t\t\t\t\tint ipos3 = ipos1 + 2;\n\n\t\t\t\t\tfloat p0 = src.GetSample(ipos0);\n\t\t\t\t\tfloat p1 = src.GetSample(ipos1);\n\t\t\t\t\tfloat p2 = src.GetSample(ipos2);\n\t\t\t\t\tfloat p3 = src.GetSample(ipos3);\n\n\t\t\t\t\tdestValue = (-0.5f*p0 + 1.5f*p1 - 1.5f*p2 + 0.5f*p3)*powf(frac, 3.0f) +\n\t\t\t\t\t\t(p0 - 2.5f*p1 + 2.0f*p2 - 0.5f*p3)*powf(frac, 2.0f) +\n\t\t\t\t\t\t(-0.5f*p0 + 0.5f*p2)*frac + p1;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tint ipos1 = (int)ceilf(srcPos - rate*0.5f);\n\t\t\t\t\tint ipos2 = (int)floorf(srcPos + rate*0.5f);\n\n\t\t\t\t\tfloat sum = 0.0f;\n\t\t\t\t\tfor (int ipos = ipos1; ipos <= ipos2; ipos++)\n\t\t\t\t\t{\n\t\t\t\t\t\tsum += src.GetSample(ipos);\n\t\t\t\t\t}\n\t\t\t\t\tdestValue = sum / (float)(ipos2 - ipos1 + 1);\n\n\t\t\t\t}\n\n\t\t\t\tm_data[i] = destValue*mulRate;\n\n\t\t\t}\n\t\t}\n\n\t};\n\n\tvoid Window::CreateFromAmpSpec_noise(const AmpSpectrum& src, float targetHalfWidth)\n\t{\n\t\tunsigned l = 0;\n\t\tunsigned fftLen = 1;\n\t\twhile ((float)fftLen < src.m_halfWidth)\n\t\t{\n\t\t\tl++;\n\t\t\tfftLen <<= 1;\n\t\t}\n\n\t\tDComp* fftBuf = new DComp[fftLen];\n\t\tmemset(fftBuf, 0, sizeof(DComp)*fftLen);\n\n\t\tfloat rate = (float)fftLen / src.m_halfWidth;\n\n\t\tfor (unsigned i = 1; i < (unsigned)src.m_data.size(); i++)\n\t\t{\n\t\t\tif (i < fftLen / 2)\n\t\t\t{\n\t\t\t\tfloat angle = (float)rand01()*(float)PI*2.0f;\n\t\t\t\tfloat re = src.m_data[i] * cosf(angle) * rate;\n\t\t\t\tfloat im = src.m_data[i] * sinf(angle) * rate;\n\n\t\t\t\tfftBuf[i].Re = (double)re;\n\t\t\t\tfftBuf[i].Im = (double)im;\n\n\t\t\t\tfftBuf[fftLen - i].Re = (double)re;\n\t\t\t\tfftBuf[fftLen - i].Im = -(double)im;\n\t\t\t\t\n\t\t\t}\n\t\t}\n\n\t\tifft(fftBuf, l);\n\n\t\tWindow tempWin;\n\t\ttempWin.m_halfWidth = (float)fftLen;\n\t\ttempWin.m_data.resize(fftLen * 2);\n\n\t\tfor (unsigned i = 0; i < fftLen; i++)\n\t\t{\n\t\t\tfloat window = (cosf((float)i * (float)PI / tempWin.m_halfWidth) + 1.0f)*0.5f;\n\t\t\ttempWin.m_data[i] = window*(float)fftBuf[i].Re;\n\t\t\tif (i>0)\n\t\t\t\ttempWin.m_data[fftLen * 2 - i] = window*(float)fftBuf[fftLen - i].Re;\n\t\t}\n\t\tdelete[] fftBuf;\n\n\t\tthis->Scale(tempWin, targetHalfWidth>0.0f ? targetHalfWidth: src.m_halfWidth);\n\n\t}\n\n\tclass SymmetricWindow_Base : public Window\n\t{\n\tpublic:\n\t\tvirtual ~SymmetricWindow_Base(){}\n\t\tbool NonZero()\n\t\t{\n\t\t\tfor (unsigned i = 0; i < (unsigned)m_data.size(); i++)\n\t\t\t\tif (m_data[i] != 0.0f) return true;\n\t\t\treturn false;\n\t\t}\n\n\t\tvirtual unsigned GetHalfWidthOfData() const\n\t\t{\n\t\t\tunsigned u_halfWidth = (unsigned)m_data.size();\n\t\t\treturn u_halfWidth;\n\t\t}\n\n\t\tvirtual void Scale(const SymmetricWindow_Base& src, float targetHalfWidth)\n\t\t{\n\t\t\tm_halfWidth = targetHalfWidth;\n\t\t\tunsigned u_TargetHalfWidth = (unsigned)ceilf(targetHalfWidth);\n\t\t\tm_data.resize(u_TargetHalfWidth);\n\n\t\t\tfloat rate = src.m_halfWidth / targetHalfWidth;\n\t\t\tbool interpolation = rate < 1.0f;\n\t\t\tfor (unsigned i = 0; i < u_TargetHalfWidth; i++)\n\t\t\t{\n\t\t\t\tfloat destValue;\n\t\t\t\tfloat srcPos = (float)i*rate;\n\t\t\t\tif (interpolation)\n\t\t\t\t{\n\t\t\t\t\tint ipos1 = (int)floorf(srcPos);\n\t\t\t\t\tfloat frac = srcPos - (float)ipos1;\n\t\t\t\t\tint ipos2 = ipos1 + 1;\n\t\t\t\t\tint ipos0 = ipos1 - 1;\n\t\t\t\t\tint ipos3 = ipos1 + 2;\n\n\t\t\t\t\tfloat p0 = src.GetSample(ipos0);\n\t\t\t\t\tfloat p1 = src.GetSample(ipos1);\n\t\t\t\t\tfloat p2 = src.GetSample(ipos2);\n\t\t\t\t\tfloat p3 = src.GetSample(ipos3);\n\n\t\t\t\t\tdestValue = (-0.5f*p0 + 1.5f*p1 - 1.5f*p2 + 0.5f*p3)*powf(frac, 3.0f) +\n\t\t\t\t\t\t(p0 - 2.5f*p1 + 2.0f*p2 - 0.5f*p3)*powf(frac, 2.0f) +\n\t\t\t\t\t\t(-0.5f*p0 + 0.5f*p2)*frac + p1;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tint ipos1 = (int)ceilf(srcPos - rate*0.5f);\n\t\t\t\t\tint ipos2 = (int)floorf(srcPos + rate*0.5f);\n\n\t\t\t\t\tfloat sum = 0.0f;\n\t\t\t\t\tfor (int ipos = ipos1; ipos <= ipos2; ipos++)\n\t\t\t\t\t{\n\t\t\t\t\t\tsum += src.GetSample(ipos);\n\t\t\t\t\t}\n\t\t\t\t\tdestValue = sum / (float)(ipos2 - ipos1 + 1);\n\n\t\t\t\t}\n\n\t\t\t\tm_data[i] = destValue;\n\n\t\t\t}\n\t\t}\n\n\t\tvirtual void Interpolate(const SymmetricWindow_Base& win0, const SymmetricWindow_Base& win1, float k, float targetHalfWidth)\n\t\t{\n\t\t\tm_halfWidth = targetHalfWidth;\n\t\t\tunsigned u_halfWidth = (unsigned)ceilf(targetHalfWidth);\n\t\t\tm_data.resize(u_halfWidth);\n\n\t\t\tfor (unsigned i = 0; i <= u_halfWidth - 1; i++)\n\t\t\t{\n\t\t\t\tfloat v0 = win0.GetSample(i);\n\t\t\t\tfloat v1 = win1.GetSample(i);\n\t\t\t\tthis->SetSample(i, (1.0f - k) *v0 + k* v1);\n\t\t\t}\n\t\t}\n\n\t};\n\n\n\tclass SymmetricWindow_Axis : public SymmetricWindow_Base\n\t{\n\tpublic:\n\t\tvirtual ~SymmetricWindow_Axis(){}\n\t\tvirtual float GetSample(int i) const\n\t\t{\n\t\t\tif (i < 0)\n\t\t\t{\n\t\t\t\tif (-i >= m_data.size()) return 0.0f;\n\t\t\t\treturn m_data[-i];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (i >= m_data.size()) return 0.0f;\n\t\t\t\treturn m_data[i];\n\t\t\t}\t\t\t\n\t\t}\n\t\tvirtual void SetSample(int i, float v)\n\t\t{\n\t\t\tif (i < 0)\n\t\t\t{\n\t\t\t\tif (-i >= m_data.size()) return;\n\t\t\t\tm_data[-i] = v;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (i >= m_data.size()) return;\n\t\t\t\tm_data[i] = v;\n\t\t\t}\n\t\t}\n\n\t\tvoid CreateFromAsymmetricWindow(const Window& src)\n\t\t{\n\t\t\tunsigned u_srcHalfWidth = src.GetHalfWidthOfData();\n\t\n\t\t\tunsigned l = 0;\n\t\t\tunsigned fftLen = 1;\n\t\t\twhile (fftLen < u_srcHalfWidth)\n\t\t\t{\n\t\t\t\tl++;\n\t\t\t\tfftLen <<= 1;\n\t\t\t}\n\n\t\t\tDComp* fftBuf = new DComp[fftLen];\n\t\t\tmemset(fftBuf, 0, sizeof(DComp)*fftLen);\n\n\t\t\tfor (unsigned i = 0; i < fftLen; i++)\n\t\t\t{\n\t\t\t\tfftBuf[i].Re = (double)src.GetSample((int)i) + (double)src.GetSample((int)i - (int)fftLen);\n\t\t\t}\n\n\t\t\tfft(fftBuf, l);\n\n\t\t\tfftBuf[0].Re = 0.0f;\n\t\t\tfftBuf[0].Im = 0.0f;\n\t\t\tfftBuf[fftLen / 2].Re = 0.0f;\n\t\t\tfftBuf[fftLen / 2].Im = 0.0f;\n\n\t\t\tfor (unsigned i = 1; i < fftLen /2; i++)\n\t\t\t{\n\t\t\t\tdouble absv = DCAbs(&fftBuf[i]);\n\n\t\t\t\tfftBuf[i].Re = absv;\n\t\t\t\tfftBuf[i].Im = 0.0f;\n\t\t\t\tfftBuf[fftLen-i].Re = absv;\n\t\t\t\tfftBuf[fftLen-i].Im = 0.0f;\n\t\t\t}\n\n\t\t\tifft(fftBuf, l);\n\n\t\t\tm_data.resize(fftLen);\n\t\t\tm_halfWidth = (float)(fftLen);\n\t\t\tfloat rate = m_halfWidth /  src.m_halfWidth;\n\n\t\t\tfor (unsigned i = 0; i < fftLen; i++)\n\t\t\t\tm_data[i] = (float)fftBuf[i].Re;\n\n\t\t\n\t\t\t// rewindow\n\t\t\tfloat amplitude = sqrtf(rate);\n\t\t\tfor (unsigned i = 0; i < fftLen; i++)\n\t\t\t{\n\t\t\t\tfloat window = (cosf((float)i * (float)PI / m_halfWidth) + 1.0f)*0.5f;\n\t\t\t\tm_data[i] *= window*amplitude;\n\t\t\t}\n\n\t\t\tdelete[] fftBuf;\n\n\t\t}\n\n\t\tvoid Repitch_FormantPreserved(const SymmetricWindow_Axis& src, float targetHalfWidth)\n\t\t{\n\t\t\tm_halfWidth = targetHalfWidth;\n\t\t\tunsigned u_TargetHalfWidth = (unsigned)ceilf(targetHalfWidth);\n\t\t\tm_data.resize(u_TargetHalfWidth);\n\n\t\t\tfloat srcHalfWidth = src.m_halfWidth;\n\t\t\tunsigned uSrcHalfWidth = src.GetHalfWidthOfData();\n\t\t\tfloat rate = targetHalfWidth / srcHalfWidth;\n\n\t\t\tfloat targetWidth = targetHalfWidth*2.0f;\n\n\t\t\tfor (unsigned i = 0; (float)i < targetHalfWidth; i++)\n\t\t\t{\n\t\t\t\tm_data[i] = 0.0f;\n\n\t\t\t\tfloat srcPos = (float)i;\n\t\t\t\tunsigned uSrcPos = (unsigned)(srcPos + 0.5f);\n\n\t\t\t\twhile (uSrcPos < uSrcHalfWidth)\n\t\t\t\t{\n\t\t\t\t\tm_data[i] += src.m_data[uSrcPos];\n\t\t\t\t\tsrcPos += targetHalfWidth;\n\t\t\t\t\tuSrcPos = (unsigned)(srcPos + 0.5f);\n\t\t\t\t}\n\n\t\t\t\tsrcPos = targetHalfWidth - (float)i;\n\t\t\t\tuSrcPos = (unsigned)(srcPos + 0.5f);\n\n\t\t\t\twhile (uSrcPos < uSrcHalfWidth)\n\t\t\t\t{\n\t\t\t\t\tm_data[i] += src.m_data[uSrcPos];\t\n\t\t\t\t\tsrcPos += targetHalfWidth;\n\t\t\t\t\tuSrcPos = (unsigned)(srcPos + 0.5f);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// rewindow\n\t\t\tfloat amplitude = sqrtf(rate);\n\t\t\tfor (unsigned i = 0; (float)i < targetHalfWidth; i++)\n\t\t\t{\n\t\t\t\tfloat window = (cosf((float)i * (float)PI / targetHalfWidth) + 1.0f)*0.5f;\n\t\t\t\tm_data[i] *= amplitude*window;\n\t\t\t}\n\t\t}\n\n\t\tvoid CreateFromAmpSpec(const AmpSpectrum& src, float targetHalfWidth=-1.0f)\n\t\t{\n\t\t\tunsigned l = 0;\n\t\t\tunsigned fftLen = 1;\n\t\t\twhile ((float)fftLen < src.m_halfWidth)\n\t\t\t{\n\t\t\t\tl++;\n\t\t\t\tfftLen <<= 1;\n\t\t\t}\n\n\t\t\tDComp* fftBuf = new DComp[fftLen];\n\t\t\tmemset(fftBuf, 0, sizeof(DComp)*fftLen);\n\n\t\t\tfloat rate = (float)fftLen / src.m_halfWidth;\n\n\t\t\tfor (unsigned i = 0; i < (unsigned)src.m_data.size(); i++)\n\t\t\t{\n\t\t\t\tif (i < fftLen / 2)\n\t\t\t\t{\n\t\t\t\t\tfftBuf[i].Re = src.m_data[i] * rate;\n\t\t\t\t\tif (i>0)\n\t\t\t\t\t\tfftBuf[fftLen - i].Re = src.m_data[i] * rate;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tifft(fftBuf, l);\n\n\t\t\tSymmetricWindow_Axis tempWin;\n\t\t\ttempWin.m_halfWidth = (float)fftLen;\n\t\t\ttempWin.m_data.resize(fftLen);\n\n\t\t\tfor (unsigned i = 0; i < fftLen; i++)\n\t\t\t{\n\t\t\t\tfloat window = (cosf((float)i * (float)PI / tempWin.m_halfWidth) + 1.0f)*0.5f;\n\t\t\t\ttempWin.m_data[i] = window*(float)fftBuf[i].Re;\n\t\t\t}\n\t\t\tdelete[] fftBuf;\n\n\t\t\tthis->Scale(tempWin, targetHalfWidth>0.0f ? targetHalfWidth: src.m_halfWidth);\n\n\t\t}\n\n\t};\n\n\n\tclass SymmetricWindow_Center : public SymmetricWindow_Base\n\t{\n\tpublic:\n\t\tvirtual ~SymmetricWindow_Center(){}\n\t\tvirtual float GetSample(int i) const\n\t\t{\n\t\t\tif (i < 0)\n\t\t\t{\n\t\t\t\tif (-i >= m_data.size()) return 0.0f;\n\t\t\t\treturn -m_data[-i];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (i >= m_data.size()) return 0.0f;\n\t\t\t\treturn m_data[i];\n\t\t\t}\n\t\t}\n\t\tvirtual void SetSample(int i, float v)\n\t\t{\n\t\t\tif (i < 0)\n\t\t\t{\n\t\t\t\tif (-i >= m_data.size()) return;\n\t\t\t\tm_data[-i] = -v;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (i >= m_data.size()) return;\n\t\t\t\tm_data[i] = v;\n\t\t\t}\n\t\t}\n\n\t\tvoid CreateFromAsymmetricWindow(const Window& src)\n\t\t{\n\t\t\tunsigned u_srcHalfWidth = src.GetHalfWidthOfData();\n\n\t\t\tunsigned l = 0;\n\t\t\tunsigned fftLen = 1;\n\t\t\twhile (fftLen < u_srcHalfWidth)\n\t\t\t{\n\t\t\t\tl++;\n\t\t\t\tfftLen <<= 1;\n\t\t\t}\n\n\t\t\tDComp* fftBuf = new DComp[fftLen];\n\t\t\tmemset(fftBuf, 0, sizeof(DComp)*fftLen);\n\n\t\t\tfor (unsigned i = 0; i < fftLen; i++)\n\t\t\t{\n\t\t\t\tfftBuf[i].Re = (double)src.GetSample((int)i) + (double)src.GetSample((int)i - (int)fftLen);\n\t\t\t}\n\n\t\t\tfft(fftBuf, l);\n\n\t\t\tfftBuf[0].Re = 0.0f;\n\t\t\tfftBuf[0].Im = 0.0f;\n\t\t\tfftBuf[fftLen / 2].Re = 0.0f;\n\t\t\tfftBuf[fftLen / 2].Im = 0.0f;\n\n\t\t\tfor (unsigned i = 1; i < fftLen / 2; i++)\n\t\t\t{\n\t\t\t\tdouble absv = DCAbs(&fftBuf[i]);\n\t\t\t\tfftBuf[i].Re = 0.0f;\n\t\t\t\tfftBuf[i].Im = absv;\n\t\t\t\tfftBuf[fftLen - i].Re = 0.0f;\n\t\t\t\tfftBuf[fftLen - i].Im = -absv;\n\t\t\t}\n\n\t\t\tifft(fftBuf, l);\n\n\t\t\tm_data.resize(fftLen);\n\t\t\tm_halfWidth = (float)(fftLen);\n\t\t\tfloat rate = m_halfWidth / src.m_halfWidth;\n\n\t\t\tfor (unsigned i = 0; i < fftLen; i++)\n\t\t\t\tm_data[i] = (float)fftBuf[i].Re;\n\n\n\t\t\t// rewindow\n\t\t\tfloat amplitude = sqrtf(rate);\n\t\t\tfor (unsigned i = 0; i < fftLen; i++)\n\t\t\t{\n\t\t\t\tfloat window = (cosf((float)i * (float)PI / m_halfWidth) + 1.0f)*0.5f;\n\t\t\t\tm_data[i] *= window*amplitude;\n\t\t\t}\n\n\t\t\tdelete[] fftBuf;\n\n\t\t}\n\n\t\tvoid Repitch_FormantPreserved(const SymmetricWindow_Center& src, float targetHalfWidth)\n\t\t{\n\t\t\tm_halfWidth = targetHalfWidth;\n\t\t\tunsigned u_TargetHalfWidth = (unsigned)ceilf(targetHalfWidth);\n\t\t\tm_data.resize(u_TargetHalfWidth);\n\n\t\t\tfloat srcHalfWidth = src.m_halfWidth;\n\t\t\tunsigned uSrcHalfWidth = src.GetHalfWidthOfData();\n\t\t\tfloat rate = targetHalfWidth / srcHalfWidth;\n\n\t\t\tfloat targetWidth = targetHalfWidth*2.0f;\n\n\t\t\tfor (unsigned i = 0; (float)i < targetHalfWidth; i++)\n\t\t\t{\n\t\t\t\tm_data[i] = 0.0f;\n\n\t\t\t\tfloat srcPos = (float)i;\n\t\t\t\tunsigned uSrcPos = (unsigned)(srcPos + 0.5f);\n\n\t\t\t\twhile (uSrcPos < uSrcHalfWidth)\n\t\t\t\t{\n\t\t\t\t\tm_data[i] += src.m_data[uSrcPos];\n\t\t\t\t\tsrcPos += targetHalfWidth;\n\t\t\t\t\tuSrcPos = (unsigned)(srcPos + 0.5f);\n\t\t\t\t}\n\n\t\t\t\tsrcPos = targetHalfWidth - (float)i;\n\t\t\t\tuSrcPos = (unsigned)(srcPos + 0.5f);\n\n\t\t\t\twhile (uSrcPos < uSrcHalfWidth)\n\t\t\t\t{\n\t\t\t\t\tm_data[i] -= src.m_data[uSrcPos];\n\t\t\t\t\tsrcPos += targetHalfWidth;\n\t\t\t\t\tuSrcPos = (unsigned)(srcPos + 0.5f);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// rewindow\n\t\t\tfloat amplitude = sqrtf(rate);\n\t\t\tfor (unsigned i = 0; (float)i < targetHalfWidth; i++)\n\t\t\t{\n\t\t\t\tfloat window = (cosf((float)i * (float)PI / targetHalfWidth) + 1.0f)*0.5f;\n\t\t\t\tm_data[i] *= amplitude*window;\n\t\t\t}\n\t\t}\n\n\t\tvoid CreateFromAmpSpec(const AmpSpectrum& src, float targetHalfWidth = -1.0f)\n\t\t{\n\t\t\tunsigned l = 0;\n\t\t\tunsigned fftLen = 1;\n\t\t\twhile ((float)fftLen < src.m_halfWidth)\n\t\t\t{\n\t\t\t\tl++;\n\t\t\t\tfftLen <<= 1;\n\t\t\t}\n\n\t\t\tDComp* fftBuf = new DComp[fftLen];\n\t\t\tmemset(fftBuf, 0, sizeof(DComp)*fftLen);\n\n\t\t\tfloat rate = (float)fftLen / src.m_halfWidth;\n\n\t\t\tfor (unsigned i = 1; i < (unsigned)src.m_data.size(); i++)\n\t\t\t{\n\t\t\t\tif (i < fftLen / 2)\n\t\t\t\t{\n\t\t\t\t\tfftBuf[i].Im = src.m_data[i] * rate;\n\t\t\t\t\tfftBuf[fftLen - i].Im = -src.m_data[i] * rate;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tifft(fftBuf, l);\n\n\t\t\tSymmetricWindow_Center tempWin;\n\t\t\ttempWin.m_halfWidth = (float)fftLen;\n\t\t\ttempWin.m_data.resize(fftLen);\n\n\t\t\tfor (unsigned i = 0; i < fftLen; i++)\n\t\t\t{\n\t\t\t\tfloat window = (cosf((float)i * (float)PI / tempWin.m_halfWidth) + 1.0f)*0.5f;\n\t\t\t\ttempWin.m_data[i] = window*(float)fftBuf[i].Re;\n\t\t\t}\n\t\t\tdelete[] fftBuf;\n\n\t\t\tthis->Scale(tempWin, targetHalfWidth>0.0f ? targetHalfWidth:src.m_halfWidth);\n\n\t\t}\n\n\t};\n\n#if Symmetric_Type==Symmetric_Type_Axis\n\ttypedef SymmetricWindow_Axis SymmetricWindow;\n#else\n\ttypedef SymmetricWindow_Center SymmetricWindow;\n#endif\n\n\n#define AutoRegression_numCoefs 10\n#define AutoRegression_numSD 10\n\n\tclass AutoRegression\n\t{\n\t\tstatic void LevinsonSolve(const float* samples, float* solution, unsigned n)\n\t\t{\n\t\t\tfloat *solution_last = new float[n];\n\n\t\t\tfor (unsigned pass = 0; pass < n; pass++)\n\t\t\t{\n\t\t\t\tfloat numerator = samples[pass + 1];\n\t\t\t\tfloat denominator = samples[0];\n\n\t\t\t\tfor (unsigned i = 0; i < pass; i++)\n\t\t\t\t{\n\t\t\t\t\tnumerator -= solution_last[i] * samples[pass - i];\n\t\t\t\t\tdenominator -= solution_last[i] * samples[i + 1];\n\t\t\t\t}\n\n\t\t\t\tfloat solution_pass = numerator / denominator;\n\t\t\t\tsolution[pass] = solution_pass;\n\t\t\t\tfor (unsigned i = 0; i < pass; i++)\n\t\t\t\t\tsolution[i] = solution_last[i]-solution_pass*solution_last[pass - 1 - i];\n\n\t\t\t\tmemcpy(solution_last, solution, sizeof(float)*n);\n\t\t\t}\n\n\t\t\tdelete[] solution_last;\n\n\t\t\t/*for (unsigned i = 0; i < n; i++)\n\t\t\t{\n\t\t\t\tfloat y = samples[i + 1];\n\t\t\t\tfloat y1 = 0.0f;\n\t\t\t\tfor (unsigned j = 0; j < n; j++)\n\t\t\t\t{\n\t\t\t\t\tint delta = (int)i - (int)j;\n\t\t\t\t\tif (delta < 0) delta = -delta;\n\t\t\t\t\ty1 += samples[delta] * solution[j];\n\t\t\t\t}\n\t\t\t\tprintf(\"%f %f\\n\", y, y1);\n\t\t\t}*/\n\t\t}\n\n\tpublic:\n\t\tfloat m_coefs[AutoRegression_numCoefs];\n\t\tfloat m_sd[AutoRegression_numSD];\n\n\t\tvoid Estimate(const float* samples, unsigned count)\n\t\t{\n\t\t\tif (count <= AutoRegression_numCoefs)\n\t\t\t\treturn;\n\n\t\t\tfloat ave = 0.0f;\n\t\t\tfor (unsigned i = 0; i < count; i++)\n\t\t\t{\n\t\t\t\tave += samples[i];\n\t\t\t}\n\t\t\tave /= (float)(count);\n\n\t\t\tfloat* _samples = new float[count];\n\t\t\tfor (unsigned i = 0; i < count; i++)\n\t\t\t{\n\t\t\t\t_samples[i] = samples[i] - ave;\n\t\t\t}\n\n\t\t\tfloat ac[AutoRegression_numCoefs + 1];\n\t\t\tfor (unsigned i = 0; i <= AutoRegression_numCoefs; i++)\n\t\t\t{\n\t\t\t\tfloat sum = 0.0f;\n\t\t\t\tfor (unsigned j = 0; j < count - i; j++)\n\t\t\t\t{\n\t\t\t\t\tsum += _samples[j] * _samples[j + i];\n\t\t\t\t}\n\t\t\t\tac[i] = sum;\n\t\t\t}\n\n\t\t\tif (ac[0] == 0.0f)\n\t\t\t{\n\t\t\t\tmemset(m_coefs, 0, sizeof(float)* AutoRegression_numCoefs);\n\t\t\t\tmemset(m_sd, 0, sizeof(float)* AutoRegression_numSD);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tLevinsonSolve(ac, m_coefs, AutoRegression_numCoefs);\n\n\t\t\tunsigned num_samples = count - AutoRegression_numCoefs;\n\n\t\t\tfloat pos = 0.0f;\n\t\t\tfloat step = (float)num_samples / AutoRegression_numSD;\n\t\t\tfor (unsigned j = 0; j < AutoRegression_numSD; j++, pos += step)\n\t\t\t{\n\t\t\t\tfloat dev = 0.0f;\n\t\t\t\tfloat sqrErr = 0.0f;\n\t\t\t\tfor (unsigned i = (unsigned)ceilf(pos); i <= (unsigned)floorf(pos + step); i++)\n\t\t\t\t{\n\t\t\t\t\tif (i + AutoRegression_numCoefs < count)\n\t\t\t\t\t{\n\t\t\t\t\t\tfloat est = 0.0f;\n\t\t\t\t\t\tfor (unsigned j = 0; j < AutoRegression_numCoefs; j++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\test += m_coefs[AutoRegression_numCoefs-1-j] * _samples[i + j];\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfloat err_i = _samples[i + AutoRegression_numCoefs] - est;\n\t\t\t\t\t\tsqrErr += err_i*err_i;\n\t\t\t\t\t\tdev += 1.0f;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tm_sd[j] = sqrtf(sqrErr / dev);\n\n\t\t\t\t//printf(\"%f \", m_sd[j]);\n\t\t\t}\n\t\t\t//printf(\"\\n\");\n\n\t\t\tdelete[] _samples;\n\t\t}\n\n\t};\n\n\n}\n\n#endif \n"
  },
  {
    "path": "VoiceSampler/api.cpp",
    "content": "#if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__)\n#define SCOREDRAFT_API __declspec(dllexport)\n#else\n#define SCOREDRAFT_API \n#endif\n\nextern \"C\"\n{\n\tSCOREDRAFT_API unsigned HaveCUDA();\n\tSCOREDRAFT_API void* FrqDataPointCreate(double freq, double dyn);\n\tSCOREDRAFT_API void FrqDataPointDestroy(void* ptr);\n\tSCOREDRAFT_API void* FrqDataCreate();\n\tSCOREDRAFT_API void FrqDataDestroy(void* ptr);\n\tSCOREDRAFT_API void FrqDataSet(void* ptr, int interval, double key, void* ptr_data_points);\n\tSCOREDRAFT_API void FrqDataDetect(void* ptr, void* ptr_f32_buf, int interval);\n\tSCOREDRAFT_API void* SourceMapCtrlPntCreate(float srcPos, float dstPos, int isVowel);\n\tSCOREDRAFT_API void SourceMapCtrlPntDestroy(void* ptr);\n\tSCOREDRAFT_API void* PieceCreate(void* ptr_f32buf, void* ptr_frq_data, void* ptr_src_map);\n\tSCOREDRAFT_API void PieceDestroy(void* ptr);\n\tSCOREDRAFT_API void* GeneralCtrlPntCreate(float value, float dstPos);\n\tSCOREDRAFT_API void GeneralCtrlPntDestroy(void* ptr);\n\tSCOREDRAFT_API void* SentenceDescriptorCreate(void* ptr_pieces, void* ptr_piece_map, void* ptr_freq_map, void* ptr_volume_map);\n\tSCOREDRAFT_API void SentenceDescriptorDestroy(void* ptr);\n\tSCOREDRAFT_API void GenerateSentence(void* ptr_wavbuf, void* ptr_sentence);\n\tSCOREDRAFT_API void GenerateSentenceCUDA(void* ptr_wavbuf, void* ptr_sentence);\n}\n\n#include \"utils.h\"\n#include <WavBuffer.h>\n#include \"SentenceDescriptor.h\"\n#include \"SentenceGeneratorCPU.h\"\n#ifdef HAVE_CUDA\n#include \"SentenceGeneratorCUDA.h\"\n#include <cuda_runtime.h>\n#endif\n#include <cmath>\n\n#include \"VoiceUtil.h\"\n#include \"FrequencyDetection.h\"\nusing namespace VoiceUtil;\n\nstatic bool s_have_cuda = false;\nunsigned HaveCUDA()\n{\n#if HAVE_CUDA\n\tint count;\n\tcudaGetDeviceCount(&count);\n\tif (count > 0 && cudaGetLastError() == 0)\n\t{\n\t\tcudaFree(nullptr);\n\t\tif (cudaGetLastError() == 0) s_have_cuda = true;\n\t}\n#endif\n\treturn s_have_cuda?1:0;\n}\n\nvoid* FrqDataPointCreate(double freq, double dyn)\n{\n\tFrqDataPoint *pnt = new FrqDataPoint;\n\tpnt->freq = freq;\n\tpnt->dyn = dyn;\n\treturn pnt;\n}\n\nvoid FrqDataPointDestroy(void* ptr)\n{\n\tdelete (FrqDataPoint*)ptr;\n}\n\nvoid* FrqDataCreate()\n{\n\treturn new FrqData;\n}\n\nvoid FrqDataDestroy(void* ptr)\n{\n\tdelete (FrqData*)ptr;\n}\n\nvoid FrqDataSet(void* ptr, int interval, double key, void* ptr_data_points)\n{\n\tFrqData* frq_data = (FrqData*)ptr;\n\tPtrArray* data_points = (PtrArray*)ptr_data_points;\t\n\tfrq_data->interval = interval;\n\tfrq_data->key = key;\n\tfrq_data->data.resize(data_points->size());\n\tfor (size_t i = 0; i < data_points->size(); i++)\n\t{\n\t\tFrqDataPoint *pnt = (FrqDataPoint *)(*data_points)[i];\n\t\tfrq_data->data[i] = *pnt;\n\t}\t\n}\n\n\nvoid DetectFreqs(const Buffer& buf, std::vector<float>& frequencies, std::vector<float>& dynamics, unsigned step)\n{\n\tunsigned halfWinLen = 1024;\n\tfloat* temp = new float[halfWinLen * 2];\n\n\tfor (unsigned center = 0; center < buf.m_data.size(); center += step)\n\t{\n\t\tWindow win;\n\t\twin.CreateFromBuffer(buf, (float)center, (float)halfWinLen);\n\n\t\tfor (int i = -(int)halfWinLen; i < (int)halfWinLen; i++)\n\t\t\ttemp[i + halfWinLen] = win.GetSample(i);\n\n\t\tfloat freq;\n\t\tfloat dyn;\n\t\tfetchFrequency(halfWinLen * 2, temp, buf.m_sampleRate, freq, dyn);\n\n\t\tfrequencies.push_back(freq);\n\t\tdynamics.push_back(dyn);\n\t}\n\n\tdelete[] temp;\n}\n\nvoid FrqDataDetect(void* ptr, void* ptr_f32_buf, int interval)\n{\n\tFrqData* frq_data = (FrqData*)ptr;\n\tF32Buf* f32buf = (F32Buf*)ptr_f32_buf;\n\n\tsize_t len = f32buf->size();\n\tfloat* f32data = f32buf->data();\n\n\tBuffer buf;\n\tbuf.m_sampleRate = 44100;\n\tbuf.Allocate((unsigned)len);\n\tmemcpy(buf.m_data.data(), f32data, sizeof(float)*len);\n\n\tstd::vector<float> frequencies;\n\tstd::vector<float> dynamics;\n\tDetectFreqs(buf, frequencies, dynamics, interval);\n\n\tfloat ave = 0.0f;\n\tfloat count = 0.0f;\n\tfor (unsigned i = 0; i < (unsigned)frequencies.size(); i++)\n\t{\n\t\tif (frequencies[i] > 55.0f)\n\t\t{\n\t\t\tcount += 1.0f;\n\t\t\tave += frequencies[i];\n\t\t}\n\t}\n\tave = ave / count;\n\n\tfrq_data->interval = interval;\n\tfrq_data->key = (double)ave;\n\tfrq_data->data.resize(frequencies.size());\n\tfor (size_t i = 0; i < frequencies.size(); i++)\n\t{\n\t\tfrq_data->data[i].freq = (double)frequencies[i];\n\t\tfrq_data->data[i].dyn = (double)dynamics[i];\n\t}\n}\n\nvoid* SourceMapCtrlPntCreate(float srcPos, float dstPos, int isVowel)\n{\n\tSourceMapCtrlPnt* pnt = new SourceMapCtrlPnt;\n\tpnt->srcPos = srcPos;\n\tpnt->dstPos = dstPos;\n\tpnt->isVowel = isVowel;\n\treturn pnt;\n}\n\nvoid SourceMapCtrlPntDestroy(void* ptr)\n{\n\tdelete (SourceMapCtrlPnt*)ptr;\n}\n\nvoid* PieceCreate(void* ptr_f32buf, void* ptr_frq_data, void* ptr_src_map)\n{\n\tF32Buf* wav = (F32Buf*)ptr_f32buf;\n\tFrqData* frq_data = (FrqData*)ptr_frq_data;\n\tPtrArray* src_map = (PtrArray*)ptr_src_map;\n\tPiece* piece = new Piece;\n\tpiece->src.wav.buf = wav->data();\n\tpiece->src.wav.len = (unsigned)wav->size();\n\tpiece->src.frq = *frq_data;\n\tpiece->srcMap.resize(src_map->size());\n\tfor (size_t i = 0; i < src_map->size(); i++)\n\t{\n\t\tSourceMapCtrlPnt* pnt = (SourceMapCtrlPnt*)(*src_map)[i];\n\t\tpiece->srcMap[i] = *pnt;\n\t}\n\treturn piece;\n}\n\nvoid PieceDestroy(void* ptr)\n{\n\tdelete (Piece*)ptr;\n}\n\nvoid* GeneralCtrlPntCreate(float value, float dstPos)\n{\n\tGeneralCtrlPnt* pnt = new GeneralCtrlPnt;\n\tpnt->value = value;\n\tpnt->dstPos = dstPos;\n\treturn pnt;\n}\n\nvoid GeneralCtrlPntDestroy(void* ptr)\n{\n\tdelete (GeneralCtrlPnt*)ptr;\n}\n\nvoid* SentenceDescriptorCreate(void* ptr_pieces, void* ptr_piece_map, void* ptr_freq_map, void* ptr_volume_map)\n{\n\tPtrArray* pieces = (PtrArray*)ptr_pieces;\n\tPtrArray* piece_map = (PtrArray*)ptr_piece_map;\n\tPtrArray* freq_map = (PtrArray*)ptr_freq_map;\n\tPtrArray* volume_map = (PtrArray*)ptr_volume_map;\n\n\tSentenceDescriptor* descriptor = new SentenceDescriptor;\n\n\tdescriptor->pieces.resize(pieces->size());\n\tfor (size_t i = 0; i < pieces->size(); i++)\n\t{\n\t\tPiece* piece = (Piece*)(*pieces)[i];\n\t\tdescriptor->pieces[i] = *piece;\n\t}\n\n\tdescriptor->piece_map.resize(piece_map->size());\n\tfor (size_t i = 0; i < piece_map->size(); i++)\n\t{\n\t\tGeneralCtrlPnt* pnt = (GeneralCtrlPnt*)(*piece_map)[i];\n\t\tdescriptor->piece_map[i] = *pnt;\n\t}\n\n\tdescriptor->freq_map.resize(freq_map->size());\n\tfor (size_t i = 0; i < freq_map->size(); i++)\n\t{\n\t\tGeneralCtrlPnt* pnt = (GeneralCtrlPnt*)(*freq_map)[i];\n\t\tdescriptor->freq_map[i] = *pnt;\n\t}\n\n\tdescriptor->volume_map.resize(volume_map->size());\n\tfor (size_t i = 0; i < volume_map->size(); i++)\n\t{\n\t\tGeneralCtrlPnt* pnt = (GeneralCtrlPnt*)(*volume_map)[i];\n\t\tdescriptor->volume_map[i] = *pnt;\n\t}\n\n\treturn descriptor;\n}\n\nvoid SentenceDescriptorDestroy(void* ptr)\n{\n\tdelete (SentenceDescriptor*)ptr;\n}\n\ninline void GenerateSentenceX(void* ptr_wavbuf, void* ptr_sentence, bool cuda)\n{\n\tWavBuffer* wavbuf = (WavBuffer*)ptr_wavbuf;\n\tSentenceDescriptor* sentence = (SentenceDescriptor*)ptr_sentence;\n\n\tstd::vector<Piece>& pieces = sentence->pieces;\n\tfloat falignPos = -pieces[0].srcMap[0].dstPos;\n\n\tfor (size_t i = 0; i < pieces.size(); i++)\n\t{\n\t\tPiece& piece = pieces[i];\n\t\tstd::vector<SourceMapCtrlPnt>& srcMap = piece.srcMap;\n\t\tfor (size_t j = 0; j < srcMap.size(); j++)\n\t\t{\n\t\t\tsrcMap[j].dstPos += falignPos;\n\t\t}\n\t}\n\n\tstd::vector<GeneralCtrlPnt>& piece_map = sentence->piece_map;\n\tstd::vector<GeneralCtrlPnt>& freq_map = sentence->freq_map;\n\tstd::vector<GeneralCtrlPnt>& volume_map = sentence->volume_map;\n\n\tfor (size_t i = 0; i < piece_map.size(); i++)\n\t\tpiece_map[i].dstPos += falignPos;\n\n\tfor (size_t i = 0; i < freq_map.size(); i++)\n\t\tfreq_map[i].dstPos += falignPos;\n\n\tfor (size_t i = 0; i < volume_map.size(); i++)\n\t\tvolume_map[i].dstPos += falignPos;\n\n\tfloat flen = freq_map[freq_map.size() - 1].dstPos;\n\n\tfloat rate = wavbuf->m_sampleRate;\n\twavbuf->m_alignPos = (unsigned)(falignPos*0.001f*rate + 0.5f);\n\n\tsize_t len = (size_t)ceilf(flen*0.001f*rate);\n\twavbuf->Allocate(1, len);\n\n#ifdef HAVE_CUDA\n\tif (cuda && HaveCUDA()!=0)\n\t\tGenerateSentenceCUDA(sentence, wavbuf->m_data, (unsigned)len);\n\telse\n#endif\n\t\tGenerateSentenceCPU(sentence, wavbuf->m_data, (unsigned)len);\n}\n\nvoid GenerateSentence(void* ptr_wavbuf, void* ptr_sentence)\n{\n\tGenerateSentenceX(ptr_wavbuf, ptr_sentence, false);\n}\n\nvoid GenerateSentenceCUDA(void* ptr_wavbuf, void* ptr_sentence)\n{\n\tGenerateSentenceX(ptr_wavbuf, ptr_sentence, true);\n}\n"
  },
  {
    "path": "VoiceSampler/fft.cuh",
    "content": "#include \"helper_math.h\"\n#define PI ((float)3.1415926535897932384626433832795)\n\n__device__\nunsigned short reverseBits(unsigned short x, unsigned l)\n{\n\tx = (((x & 0xaaaa) >> 1) | ((x & 0x5555) << 1));\n\tx = (((x & 0xcccc) >> 2) | ((x & 0x3333) << 2));\n\tx = (((x & 0xf0f0) >> 4) | ((x & 0x0f0f) << 4));\n\tx = ((x >> 8) | (x << 8));\n\treturn x >> (16 - l);\n}\n\n__device__ float2 CompMul(const float2& c1, const float2& c2)\n{\n\tfloat2 ret;\n\tret.x = c1.x*c2.x - c1.y*c2.y;\n\tret.y = c1.x*c2.y + c1.y*c2.x;\n\treturn ret;\n}\n\n__device__ float2 CompPowN(float2 c, unsigned n)\n{\n\tfloat2 mul = c;\n\tfloat2 ret = make_float2(1.0f, 0.0f);\n\n\twhile (n > 0)\n\t{\n\t\tif (n & 1)\n\t\t{\n\t\t\tret = CompMul(ret, mul);\n\t\t}\n\t\tmul = CompMul(mul, mul);\t\t\n\t\tn >>= 1;\n\t}\n\treturn ret;\t\n}\n\n__device__\nvoid d_fft(float* a, unsigned l)\n{\n\tunsigned n = 1 << l;\n\n\tunsigned numWorker = blockDim.x;\n\tunsigned workerId = threadIdx.x;\n\n\tfor (unsigned short i = (unsigned short)workerId+1; i< (unsigned short)n - 1; i += (unsigned short)numWorker)\n\t{\n\t\tunsigned short j = reverseBits(i,l);\n\t\tunsigned u, v;\n\t\tif (i < j)\n\t\t{\n\t\t\tu = i;\n\t\t\tv = j;\n\t\t}\n\t\telse if (j<i)\n\t\t{\n\t\t\tu = i + n;\n\t\t\tv = j + n;\n\t\t}\n\t\telse continue;\n\t\tfloat t = a[u];\n\t\ta[u] = a[v];\n\t\ta[v] = t;\n\t}\n\n\t__syncthreads();\n\n\tunsigned le = 1;\n\tfor (unsigned m = 1; m <= l; m++)\n\t{\n\t\tunsigned lei = le;\n\t\tle <<= 1;\n\n\t\tfloat tmp = PI / (float)lei;\n\t\tfloat2 w;\n\t\tw.x = cosf(tmp); w.y = -sinf(tmp);\n\n\t\tunsigned gsize = n / le;\n\t\tunsigned workPerWorker = (n / 2 - 1) / numWorker + 1;\n\t\tunsigned lastj = workerId*workPerWorker/gsize;\n\t\tfloat2 u = CompPowN(w, lastj);\n\n\t\tfor (unsigned work = workerId*workPerWorker; work < (workerId + 1)*workPerWorker && work<n/2; work++)\n\t\t{\n\t\t\tunsigned j = work / gsize;\n\t\t\tunsigned i = (work % gsize)*le + j;\n\t\t\tunsigned ip = i + lei;\n\n\t\t\tif (j > lastj)\n\t\t\t{\n\t\t\t\tu = CompMul(u, w);\n\t\t\t\tlastj = j;\n\t\t\t}\n\n\t\t\tfloat2 comp_a_i = make_float2(a[i], a[i + n]);\n\t\t\tfloat2 comp_a_ip = make_float2(a[ip], a[ip + n]);\n\t\t\tfloat2 t = CompMul(u, comp_a_ip);\n\t\t\tcomp_a_ip = comp_a_i - t;\n\t\t\tcomp_a_i = comp_a_i + t;\n\t\t\ta[i] = comp_a_i.x; a[i + n] = comp_a_i.y;\n\t\t\ta[ip] = comp_a_ip.x; a[ip + n] = comp_a_ip.y;\n\t\t}\n\t\t__syncthreads();\n\t}\n}\n\n__global__\nvoid g_fft_test(float* d_buf, unsigned l)\n{\n\td_fft(d_buf, l);\n}\n\nvoid h_fft_test(float* d_buf, unsigned l)\n{\n\tg_fft_test << <1, 256 >> >(d_buf, l);\n}\n\n\n__device__\nvoid d_ifft(float* a, unsigned l)\n{\n\tunsigned n = 1 << l;\n\n\tunsigned numWorker = blockDim.x;\n\tunsigned workerId = threadIdx.x;\n\n\tfor (unsigned short i = (unsigned short)workerId + 1; i< (unsigned short)n - 1; i += (unsigned short)numWorker)\n\t{\n\t\tunsigned short j = reverseBits(i, l);\n\t\tunsigned u, v;\n\t\tif (i < j)\n\t\t{\n\t\t\tu = i;\n\t\t\tv = j;\n\t\t}\n\t\telse if (j<i)\n\t\t{\n\t\t\tu = i + n;\n\t\t\tv = j + n;\n\t\t}\n\t\telse continue;\n\t\tfloat t = a[u];\n\t\ta[u] = a[v];\n\t\ta[v] = t;\n\t}\n\n\t__syncthreads();\n\n\tunsigned le = 1;\n\tfor (unsigned m = 1; m <= l; m++)\n\t{\n\t\tunsigned lei = le;\n\t\tle <<= 1;\n\n\t\tfloat tmp = PI / (float)lei;\n\t\tfloat2 w;\n\t\tw.x = cosf(tmp); w.y = sinf(tmp);\n\n\t\tunsigned gsize = n / le;\n\t\tunsigned workPerWorker = (n / 2 - 1) / numWorker + 1;\n\t\tunsigned lastj = workerId*workPerWorker / gsize;\n\t\tfloat2 u = CompPowN(w, lastj);\n\t\tu.x *= 0.5f; u.y *= 0.5f;\n\n\t\tfor (unsigned work = workerId*workPerWorker; work < (workerId + 1)*workPerWorker && work<n / 2; work++)\n\t\t{\n\t\t\tunsigned j = work / gsize;\n\t\t\tunsigned i = (work % gsize)*le + j;\n\t\t\tunsigned ip = i + lei;\n\n\t\t\tif (j > lastj)\n\t\t\t{\n\t\t\t\tu = CompMul(u, w);\n\t\t\t\tlastj = j;\n\t\t\t}\n\n\t\t\tfloat2 comp_a_i = make_float2(0.5f*a[i], 0.5f*a[i + n]);\n\t\t\tfloat2 comp_a_ip = make_float2(a[ip], a[ip + n]);\n\t\t\tfloat2 t = CompMul(u, comp_a_ip);\n\t\t\tcomp_a_ip = comp_a_i - t;\n\t\t\tcomp_a_i = comp_a_i + t;\n\t\t\ta[i] = comp_a_i.x; a[i + n] = comp_a_i.y;\n\t\t\ta[ip] = comp_a_ip.x; a[ip + n] = comp_a_ip.y;\n\t\t}\n\t\t__syncthreads();\n\n\n\t}\n\n}\n\n\n__global__\nvoid g_ifft_test(float* d_buf, unsigned l)\n{\n\td_ifft(d_buf, l);\n}\n\nvoid h_ifft_test(float* d_buf, unsigned l)\n{\n\tg_ifft_test << <1, 256 >> >(d_buf, l);\n}\n"
  },
  {
    "path": "VoiceSampler/helper_math.h",
    "content": "/**\n * Copyright 1993-2013 NVIDIA Corporation.  All rights reserved.\n *\n * Please refer to the NVIDIA end user license agreement (EULA) associated\n * with this source code for terms and conditions that govern your use of\n * this software. Any use, reproduction, disclosure, or distribution of\n * this software and related documentation outside the terms of the EULA\n * is strictly prohibited.\n *\n */\n\n/*\n *  This file implements common mathematical operations on vector types\n *  (float3, float4 etc.) since these are not provided as standard by CUDA.\n *\n *  The syntax is modeled on the Cg standard library.\n *\n *  This is part of the Helper library includes\n *\n *    Thanks to Linh Hah for additions and fixes.\n */\n\n#ifndef HELPER_MATH_H\n#define HELPER_MATH_H\n\n#include \"cuda_runtime.h\"\n\ntypedef unsigned int uint;\ntypedef unsigned short ushort;\n\n#ifndef EXIT_WAIVED\n#define EXIT_WAIVED 2\n#endif\n\n#ifndef __CUDACC__\n#include <math.h>\n\n////////////////////////////////////////////////////////////////////////////////\n// host implementations of CUDA functions\n////////////////////////////////////////////////////////////////////////////////\n\ninline float fminf(float a, float b)\n{\n    return a < b ? a : b;\n}\n\ninline float fmaxf(float a, float b)\n{\n    return a > b ? a : b;\n}\n\ninline int max(int a, int b)\n{\n    return a > b ? a : b;\n}\n\ninline int min(int a, int b)\n{\n    return a < b ? a : b;\n}\n\ninline float rsqrtf(float x)\n{\n    return 1.0f / sqrtf(x);\n}\n#endif\n\n////////////////////////////////////////////////////////////////////////////////\n// constructors\n////////////////////////////////////////////////////////////////////////////////\n\ninline __host__ __device__ float2 make_float2(float s)\n{\n    return make_float2(s, s);\n}\ninline __host__ __device__ float2 make_float2(float3 a)\n{\n    return make_float2(a.x, a.y);\n}\ninline __host__ __device__ float2 make_float2(int2 a)\n{\n    return make_float2(float(a.x), float(a.y));\n}\ninline __host__ __device__ float2 make_float2(uint2 a)\n{\n    return make_float2(float(a.x), float(a.y));\n}\n\ninline __host__ __device__ int2 make_int2(int s)\n{\n    return make_int2(s, s);\n}\ninline __host__ __device__ int2 make_int2(int3 a)\n{\n    return make_int2(a.x, a.y);\n}\ninline __host__ __device__ int2 make_int2(uint2 a)\n{\n    return make_int2(int(a.x), int(a.y));\n}\ninline __host__ __device__ int2 make_int2(float2 a)\n{\n    return make_int2(int(a.x), int(a.y));\n}\n\ninline __host__ __device__ uint2 make_uint2(uint s)\n{\n    return make_uint2(s, s);\n}\ninline __host__ __device__ uint2 make_uint2(uint3 a)\n{\n    return make_uint2(a.x, a.y);\n}\ninline __host__ __device__ uint2 make_uint2(int2 a)\n{\n    return make_uint2(uint(a.x), uint(a.y));\n}\n\ninline __host__ __device__ float3 make_float3(float s)\n{\n    return make_float3(s, s, s);\n}\ninline __host__ __device__ float3 make_float3(float2 a)\n{\n    return make_float3(a.x, a.y, 0.0f);\n}\ninline __host__ __device__ float3 make_float3(float2 a, float s)\n{\n    return make_float3(a.x, a.y, s);\n}\ninline __host__ __device__ float3 make_float3(float4 a)\n{\n    return make_float3(a.x, a.y, a.z);\n}\ninline __host__ __device__ float3 make_float3(int3 a)\n{\n    return make_float3(float(a.x), float(a.y), float(a.z));\n}\ninline __host__ __device__ float3 make_float3(uint3 a)\n{\n    return make_float3(float(a.x), float(a.y), float(a.z));\n}\n\ninline __host__ __device__ int3 make_int3(int s)\n{\n    return make_int3(s, s, s);\n}\ninline __host__ __device__ int3 make_int3(int2 a)\n{\n    return make_int3(a.x, a.y, 0);\n}\ninline __host__ __device__ int3 make_int3(int2 a, int s)\n{\n    return make_int3(a.x, a.y, s);\n}\ninline __host__ __device__ int3 make_int3(uint3 a)\n{\n    return make_int3(int(a.x), int(a.y), int(a.z));\n}\ninline __host__ __device__ int3 make_int3(float3 a)\n{\n    return make_int3(int(a.x), int(a.y), int(a.z));\n}\n\ninline __host__ __device__ uint3 make_uint3(uint s)\n{\n    return make_uint3(s, s, s);\n}\ninline __host__ __device__ uint3 make_uint3(uint2 a)\n{\n    return make_uint3(a.x, a.y, 0);\n}\ninline __host__ __device__ uint3 make_uint3(uint2 a, uint s)\n{\n    return make_uint3(a.x, a.y, s);\n}\ninline __host__ __device__ uint3 make_uint3(uint4 a)\n{\n    return make_uint3(a.x, a.y, a.z);\n}\ninline __host__ __device__ uint3 make_uint3(int3 a)\n{\n    return make_uint3(uint(a.x), uint(a.y), uint(a.z));\n}\n\ninline __host__ __device__ float4 make_float4(float s)\n{\n    return make_float4(s, s, s, s);\n}\ninline __host__ __device__ float4 make_float4(float3 a)\n{\n    return make_float4(a.x, a.y, a.z, 0.0f);\n}\ninline __host__ __device__ float4 make_float4(float3 a, float w)\n{\n    return make_float4(a.x, a.y, a.z, w);\n}\ninline __host__ __device__ float4 make_float4(int4 a)\n{\n    return make_float4(float(a.x), float(a.y), float(a.z), float(a.w));\n}\ninline __host__ __device__ float4 make_float4(uint4 a)\n{\n    return make_float4(float(a.x), float(a.y), float(a.z), float(a.w));\n}\n\ninline __host__ __device__ int4 make_int4(int s)\n{\n    return make_int4(s, s, s, s);\n}\ninline __host__ __device__ int4 make_int4(int3 a)\n{\n    return make_int4(a.x, a.y, a.z, 0);\n}\ninline __host__ __device__ int4 make_int4(int3 a, int w)\n{\n    return make_int4(a.x, a.y, a.z, w);\n}\ninline __host__ __device__ int4 make_int4(uint4 a)\n{\n    return make_int4(int(a.x), int(a.y), int(a.z), int(a.w));\n}\ninline __host__ __device__ int4 make_int4(float4 a)\n{\n    return make_int4(int(a.x), int(a.y), int(a.z), int(a.w));\n}\n\n\ninline __host__ __device__ uint4 make_uint4(uint s)\n{\n    return make_uint4(s, s, s, s);\n}\ninline __host__ __device__ uint4 make_uint4(uint3 a)\n{\n    return make_uint4(a.x, a.y, a.z, 0);\n}\ninline __host__ __device__ uint4 make_uint4(uint3 a, uint w)\n{\n    return make_uint4(a.x, a.y, a.z, w);\n}\ninline __host__ __device__ uint4 make_uint4(int4 a)\n{\n    return make_uint4(uint(a.x), uint(a.y), uint(a.z), uint(a.w));\n}\n\n////////////////////////////////////////////////////////////////////////////////\n// negate\n////////////////////////////////////////////////////////////////////////////////\n\ninline __host__ __device__ float2 operator-(float2 &a)\n{\n    return make_float2(-a.x, -a.y);\n}\ninline __host__ __device__ int2 operator-(int2 &a)\n{\n    return make_int2(-a.x, -a.y);\n}\ninline __host__ __device__ float3 operator-(float3 &a)\n{\n    return make_float3(-a.x, -a.y, -a.z);\n}\ninline __host__ __device__ int3 operator-(int3 &a)\n{\n    return make_int3(-a.x, -a.y, -a.z);\n}\ninline __host__ __device__ float4 operator-(float4 &a)\n{\n    return make_float4(-a.x, -a.y, -a.z, -a.w);\n}\ninline __host__ __device__ int4 operator-(int4 &a)\n{\n    return make_int4(-a.x, -a.y, -a.z, -a.w);\n}\n\n////////////////////////////////////////////////////////////////////////////////\n// addition\n////////////////////////////////////////////////////////////////////////////////\n\ninline __host__ __device__ float2 operator+(float2 a, float2 b)\n{\n    return make_float2(a.x + b.x, a.y + b.y);\n}\ninline __host__ __device__ void operator+=(float2 &a, float2 b)\n{\n    a.x += b.x;\n    a.y += b.y;\n}\ninline __host__ __device__ float2 operator+(float2 a, float b)\n{\n    return make_float2(a.x + b, a.y + b);\n}\ninline __host__ __device__ float2 operator+(float b, float2 a)\n{\n    return make_float2(a.x + b, a.y + b);\n}\ninline __host__ __device__ void operator+=(float2 &a, float b)\n{\n    a.x += b;\n    a.y += b;\n}\n\ninline __host__ __device__ int2 operator+(int2 a, int2 b)\n{\n    return make_int2(a.x + b.x, a.y + b.y);\n}\ninline __host__ __device__ void operator+=(int2 &a, int2 b)\n{\n    a.x += b.x;\n    a.y += b.y;\n}\ninline __host__ __device__ int2 operator+(int2 a, int b)\n{\n    return make_int2(a.x + b, a.y + b);\n}\ninline __host__ __device__ int2 operator+(int b, int2 a)\n{\n    return make_int2(a.x + b, a.y + b);\n}\ninline __host__ __device__ void operator+=(int2 &a, int b)\n{\n    a.x += b;\n    a.y += b;\n}\n\ninline __host__ __device__ uint2 operator+(uint2 a, uint2 b)\n{\n    return make_uint2(a.x + b.x, a.y + b.y);\n}\ninline __host__ __device__ void operator+=(uint2 &a, uint2 b)\n{\n    a.x += b.x;\n    a.y += b.y;\n}\ninline __host__ __device__ uint2 operator+(uint2 a, uint b)\n{\n    return make_uint2(a.x + b, a.y + b);\n}\ninline __host__ __device__ uint2 operator+(uint b, uint2 a)\n{\n    return make_uint2(a.x + b, a.y + b);\n}\ninline __host__ __device__ void operator+=(uint2 &a, uint b)\n{\n    a.x += b;\n    a.y += b;\n}\n\n\ninline __host__ __device__ float3 operator+(float3 a, float3 b)\n{\n    return make_float3(a.x + b.x, a.y + b.y, a.z + b.z);\n}\ninline __host__ __device__ void operator+=(float3 &a, float3 b)\n{\n    a.x += b.x;\n    a.y += b.y;\n    a.z += b.z;\n}\ninline __host__ __device__ float3 operator+(float3 a, float b)\n{\n    return make_float3(a.x + b, a.y + b, a.z + b);\n}\ninline __host__ __device__ void operator+=(float3 &a, float b)\n{\n    a.x += b;\n    a.y += b;\n    a.z += b;\n}\n\ninline __host__ __device__ int3 operator+(int3 a, int3 b)\n{\n    return make_int3(a.x + b.x, a.y + b.y, a.z + b.z);\n}\ninline __host__ __device__ void operator+=(int3 &a, int3 b)\n{\n    a.x += b.x;\n    a.y += b.y;\n    a.z += b.z;\n}\ninline __host__ __device__ int3 operator+(int3 a, int b)\n{\n    return make_int3(a.x + b, a.y + b, a.z + b);\n}\ninline __host__ __device__ void operator+=(int3 &a, int b)\n{\n    a.x += b;\n    a.y += b;\n    a.z += b;\n}\n\ninline __host__ __device__ uint3 operator+(uint3 a, uint3 b)\n{\n    return make_uint3(a.x + b.x, a.y + b.y, a.z + b.z);\n}\ninline __host__ __device__ void operator+=(uint3 &a, uint3 b)\n{\n    a.x += b.x;\n    a.y += b.y;\n    a.z += b.z;\n}\ninline __host__ __device__ uint3 operator+(uint3 a, uint b)\n{\n    return make_uint3(a.x + b, a.y + b, a.z + b);\n}\ninline __host__ __device__ void operator+=(uint3 &a, uint b)\n{\n    a.x += b;\n    a.y += b;\n    a.z += b;\n}\n\ninline __host__ __device__ int3 operator+(int b, int3 a)\n{\n    return make_int3(a.x + b, a.y + b, a.z + b);\n}\ninline __host__ __device__ uint3 operator+(uint b, uint3 a)\n{\n    return make_uint3(a.x + b, a.y + b, a.z + b);\n}\ninline __host__ __device__ float3 operator+(float b, float3 a)\n{\n    return make_float3(a.x + b, a.y + b, a.z + b);\n}\n\ninline __host__ __device__ float4 operator+(float4 a, float4 b)\n{\n    return make_float4(a.x + b.x, a.y + b.y, a.z + b.z,  a.w + b.w);\n}\ninline __host__ __device__ void operator+=(float4 &a, float4 b)\n{\n    a.x += b.x;\n    a.y += b.y;\n    a.z += b.z;\n    a.w += b.w;\n}\ninline __host__ __device__ float4 operator+(float4 a, float b)\n{\n    return make_float4(a.x + b, a.y + b, a.z + b, a.w + b);\n}\ninline __host__ __device__ float4 operator+(float b, float4 a)\n{\n    return make_float4(a.x + b, a.y + b, a.z + b, a.w + b);\n}\ninline __host__ __device__ void operator+=(float4 &a, float b)\n{\n    a.x += b;\n    a.y += b;\n    a.z += b;\n    a.w += b;\n}\n\ninline __host__ __device__ int4 operator+(int4 a, int4 b)\n{\n    return make_int4(a.x + b.x, a.y + b.y, a.z + b.z,  a.w + b.w);\n}\ninline __host__ __device__ void operator+=(int4 &a, int4 b)\n{\n    a.x += b.x;\n    a.y += b.y;\n    a.z += b.z;\n    a.w += b.w;\n}\ninline __host__ __device__ int4 operator+(int4 a, int b)\n{\n    return make_int4(a.x + b, a.y + b, a.z + b,  a.w + b);\n}\ninline __host__ __device__ int4 operator+(int b, int4 a)\n{\n    return make_int4(a.x + b, a.y + b, a.z + b,  a.w + b);\n}\ninline __host__ __device__ void operator+=(int4 &a, int b)\n{\n    a.x += b;\n    a.y += b;\n    a.z += b;\n    a.w += b;\n}\n\ninline __host__ __device__ uint4 operator+(uint4 a, uint4 b)\n{\n    return make_uint4(a.x + b.x, a.y + b.y, a.z + b.z,  a.w + b.w);\n}\ninline __host__ __device__ void operator+=(uint4 &a, uint4 b)\n{\n    a.x += b.x;\n    a.y += b.y;\n    a.z += b.z;\n    a.w += b.w;\n}\ninline __host__ __device__ uint4 operator+(uint4 a, uint b)\n{\n    return make_uint4(a.x + b, a.y + b, a.z + b,  a.w + b);\n}\ninline __host__ __device__ uint4 operator+(uint b, uint4 a)\n{\n    return make_uint4(a.x + b, a.y + b, a.z + b,  a.w + b);\n}\ninline __host__ __device__ void operator+=(uint4 &a, uint b)\n{\n    a.x += b;\n    a.y += b;\n    a.z += b;\n    a.w += b;\n}\n\n////////////////////////////////////////////////////////////////////////////////\n// subtract\n////////////////////////////////////////////////////////////////////////////////\n\ninline __host__ __device__ float2 operator-(float2 a, float2 b)\n{\n    return make_float2(a.x - b.x, a.y - b.y);\n}\ninline __host__ __device__ void operator-=(float2 &a, float2 b)\n{\n    a.x -= b.x;\n    a.y -= b.y;\n}\ninline __host__ __device__ float2 operator-(float2 a, float b)\n{\n    return make_float2(a.x - b, a.y - b);\n}\ninline __host__ __device__ float2 operator-(float b, float2 a)\n{\n    return make_float2(b - a.x, b - a.y);\n}\ninline __host__ __device__ void operator-=(float2 &a, float b)\n{\n    a.x -= b;\n    a.y -= b;\n}\n\ninline __host__ __device__ int2 operator-(int2 a, int2 b)\n{\n    return make_int2(a.x - b.x, a.y - b.y);\n}\ninline __host__ __device__ void operator-=(int2 &a, int2 b)\n{\n    a.x -= b.x;\n    a.y -= b.y;\n}\ninline __host__ __device__ int2 operator-(int2 a, int b)\n{\n    return make_int2(a.x - b, a.y - b);\n}\ninline __host__ __device__ int2 operator-(int b, int2 a)\n{\n    return make_int2(b - a.x, b - a.y);\n}\ninline __host__ __device__ void operator-=(int2 &a, int b)\n{\n    a.x -= b;\n    a.y -= b;\n}\n\ninline __host__ __device__ uint2 operator-(uint2 a, uint2 b)\n{\n    return make_uint2(a.x - b.x, a.y - b.y);\n}\ninline __host__ __device__ void operator-=(uint2 &a, uint2 b)\n{\n    a.x -= b.x;\n    a.y -= b.y;\n}\ninline __host__ __device__ uint2 operator-(uint2 a, uint b)\n{\n    return make_uint2(a.x - b, a.y - b);\n}\ninline __host__ __device__ uint2 operator-(uint b, uint2 a)\n{\n    return make_uint2(b - a.x, b - a.y);\n}\ninline __host__ __device__ void operator-=(uint2 &a, uint b)\n{\n    a.x -= b;\n    a.y -= b;\n}\n\ninline __host__ __device__ float3 operator-(float3 a, float3 b)\n{\n    return make_float3(a.x - b.x, a.y - b.y, a.z - b.z);\n}\ninline __host__ __device__ void operator-=(float3 &a, float3 b)\n{\n    a.x -= b.x;\n    a.y -= b.y;\n    a.z -= b.z;\n}\ninline __host__ __device__ float3 operator-(float3 a, float b)\n{\n    return make_float3(a.x - b, a.y - b, a.z - b);\n}\ninline __host__ __device__ float3 operator-(float b, float3 a)\n{\n    return make_float3(b - a.x, b - a.y, b - a.z);\n}\ninline __host__ __device__ void operator-=(float3 &a, float b)\n{\n    a.x -= b;\n    a.y -= b;\n    a.z -= b;\n}\n\ninline __host__ __device__ int3 operator-(int3 a, int3 b)\n{\n    return make_int3(a.x - b.x, a.y - b.y, a.z - b.z);\n}\ninline __host__ __device__ void operator-=(int3 &a, int3 b)\n{\n    a.x -= b.x;\n    a.y -= b.y;\n    a.z -= b.z;\n}\ninline __host__ __device__ int3 operator-(int3 a, int b)\n{\n    return make_int3(a.x - b, a.y - b, a.z - b);\n}\ninline __host__ __device__ int3 operator-(int b, int3 a)\n{\n    return make_int3(b - a.x, b - a.y, b - a.z);\n}\ninline __host__ __device__ void operator-=(int3 &a, int b)\n{\n    a.x -= b;\n    a.y -= b;\n    a.z -= b;\n}\n\ninline __host__ __device__ uint3 operator-(uint3 a, uint3 b)\n{\n    return make_uint3(a.x - b.x, a.y - b.y, a.z - b.z);\n}\ninline __host__ __device__ void operator-=(uint3 &a, uint3 b)\n{\n    a.x -= b.x;\n    a.y -= b.y;\n    a.z -= b.z;\n}\ninline __host__ __device__ uint3 operator-(uint3 a, uint b)\n{\n    return make_uint3(a.x - b, a.y - b, a.z - b);\n}\ninline __host__ __device__ uint3 operator-(uint b, uint3 a)\n{\n    return make_uint3(b - a.x, b - a.y, b - a.z);\n}\ninline __host__ __device__ void operator-=(uint3 &a, uint b)\n{\n    a.x -= b;\n    a.y -= b;\n    a.z -= b;\n}\n\ninline __host__ __device__ float4 operator-(float4 a, float4 b)\n{\n    return make_float4(a.x - b.x, a.y - b.y, a.z - b.z,  a.w - b.w);\n}\ninline __host__ __device__ void operator-=(float4 &a, float4 b)\n{\n    a.x -= b.x;\n    a.y -= b.y;\n    a.z -= b.z;\n    a.w -= b.w;\n}\ninline __host__ __device__ float4 operator-(float4 a, float b)\n{\n    return make_float4(a.x - b, a.y - b, a.z - b,  a.w - b);\n}\ninline __host__ __device__ void operator-=(float4 &a, float b)\n{\n    a.x -= b;\n    a.y -= b;\n    a.z -= b;\n    a.w -= b;\n}\n\ninline __host__ __device__ int4 operator-(int4 a, int4 b)\n{\n    return make_int4(a.x - b.x, a.y - b.y, a.z - b.z,  a.w - b.w);\n}\ninline __host__ __device__ void operator-=(int4 &a, int4 b)\n{\n    a.x -= b.x;\n    a.y -= b.y;\n    a.z -= b.z;\n    a.w -= b.w;\n}\ninline __host__ __device__ int4 operator-(int4 a, int b)\n{\n    return make_int4(a.x - b, a.y - b, a.z - b,  a.w - b);\n}\ninline __host__ __device__ int4 operator-(int b, int4 a)\n{\n    return make_int4(b - a.x, b - a.y, b - a.z, b - a.w);\n}\ninline __host__ __device__ void operator-=(int4 &a, int b)\n{\n    a.x -= b;\n    a.y -= b;\n    a.z -= b;\n    a.w -= b;\n}\n\ninline __host__ __device__ uint4 operator-(uint4 a, uint4 b)\n{\n    return make_uint4(a.x - b.x, a.y - b.y, a.z - b.z,  a.w - b.w);\n}\ninline __host__ __device__ void operator-=(uint4 &a, uint4 b)\n{\n    a.x -= b.x;\n    a.y -= b.y;\n    a.z -= b.z;\n    a.w -= b.w;\n}\ninline __host__ __device__ uint4 operator-(uint4 a, uint b)\n{\n    return make_uint4(a.x - b, a.y - b, a.z - b,  a.w - b);\n}\ninline __host__ __device__ uint4 operator-(uint b, uint4 a)\n{\n    return make_uint4(b - a.x, b - a.y, b - a.z, b - a.w);\n}\ninline __host__ __device__ void operator-=(uint4 &a, uint b)\n{\n    a.x -= b;\n    a.y -= b;\n    a.z -= b;\n    a.w -= b;\n}\n\n////////////////////////////////////////////////////////////////////////////////\n// multiply\n////////////////////////////////////////////////////////////////////////////////\n\ninline __host__ __device__ float2 operator*(float2 a, float2 b)\n{\n    return make_float2(a.x * b.x, a.y * b.y);\n}\ninline __host__ __device__ void operator*=(float2 &a, float2 b)\n{\n    a.x *= b.x;\n    a.y *= b.y;\n}\ninline __host__ __device__ float2 operator*(float2 a, float b)\n{\n    return make_float2(a.x * b, a.y * b);\n}\ninline __host__ __device__ float2 operator*(float b, float2 a)\n{\n    return make_float2(b * a.x, b * a.y);\n}\ninline __host__ __device__ void operator*=(float2 &a, float b)\n{\n    a.x *= b;\n    a.y *= b;\n}\n\ninline __host__ __device__ int2 operator*(int2 a, int2 b)\n{\n    return make_int2(a.x * b.x, a.y * b.y);\n}\ninline __host__ __device__ void operator*=(int2 &a, int2 b)\n{\n    a.x *= b.x;\n    a.y *= b.y;\n}\ninline __host__ __device__ int2 operator*(int2 a, int b)\n{\n    return make_int2(a.x * b, a.y * b);\n}\ninline __host__ __device__ int2 operator*(int b, int2 a)\n{\n    return make_int2(b * a.x, b * a.y);\n}\ninline __host__ __device__ void operator*=(int2 &a, int b)\n{\n    a.x *= b;\n    a.y *= b;\n}\n\ninline __host__ __device__ uint2 operator*(uint2 a, uint2 b)\n{\n    return make_uint2(a.x * b.x, a.y * b.y);\n}\ninline __host__ __device__ void operator*=(uint2 &a, uint2 b)\n{\n    a.x *= b.x;\n    a.y *= b.y;\n}\ninline __host__ __device__ uint2 operator*(uint2 a, uint b)\n{\n    return make_uint2(a.x * b, a.y * b);\n}\ninline __host__ __device__ uint2 operator*(uint b, uint2 a)\n{\n    return make_uint2(b * a.x, b * a.y);\n}\ninline __host__ __device__ void operator*=(uint2 &a, uint b)\n{\n    a.x *= b;\n    a.y *= b;\n}\n\ninline __host__ __device__ float3 operator*(float3 a, float3 b)\n{\n    return make_float3(a.x * b.x, a.y * b.y, a.z * b.z);\n}\ninline __host__ __device__ void operator*=(float3 &a, float3 b)\n{\n    a.x *= b.x;\n    a.y *= b.y;\n    a.z *= b.z;\n}\ninline __host__ __device__ float3 operator*(float3 a, float b)\n{\n    return make_float3(a.x * b, a.y * b, a.z * b);\n}\ninline __host__ __device__ float3 operator*(float b, float3 a)\n{\n    return make_float3(b * a.x, b * a.y, b * a.z);\n}\ninline __host__ __device__ void operator*=(float3 &a, float b)\n{\n    a.x *= b;\n    a.y *= b;\n    a.z *= b;\n}\n\ninline __host__ __device__ int3 operator*(int3 a, int3 b)\n{\n    return make_int3(a.x * b.x, a.y * b.y, a.z * b.z);\n}\ninline __host__ __device__ void operator*=(int3 &a, int3 b)\n{\n    a.x *= b.x;\n    a.y *= b.y;\n    a.z *= b.z;\n}\ninline __host__ __device__ int3 operator*(int3 a, int b)\n{\n    return make_int3(a.x * b, a.y * b, a.z * b);\n}\ninline __host__ __device__ int3 operator*(int b, int3 a)\n{\n    return make_int3(b * a.x, b * a.y, b * a.z);\n}\ninline __host__ __device__ void operator*=(int3 &a, int b)\n{\n    a.x *= b;\n    a.y *= b;\n    a.z *= b;\n}\n\ninline __host__ __device__ uint3 operator*(uint3 a, uint3 b)\n{\n    return make_uint3(a.x * b.x, a.y * b.y, a.z * b.z);\n}\ninline __host__ __device__ void operator*=(uint3 &a, uint3 b)\n{\n    a.x *= b.x;\n    a.y *= b.y;\n    a.z *= b.z;\n}\ninline __host__ __device__ uint3 operator*(uint3 a, uint b)\n{\n    return make_uint3(a.x * b, a.y * b, a.z * b);\n}\ninline __host__ __device__ uint3 operator*(uint b, uint3 a)\n{\n    return make_uint3(b * a.x, b * a.y, b * a.z);\n}\ninline __host__ __device__ void operator*=(uint3 &a, uint b)\n{\n    a.x *= b;\n    a.y *= b;\n    a.z *= b;\n}\n\ninline __host__ __device__ float4 operator*(float4 a, float4 b)\n{\n    return make_float4(a.x * b.x, a.y * b.y, a.z * b.z,  a.w * b.w);\n}\ninline __host__ __device__ void operator*=(float4 &a, float4 b)\n{\n    a.x *= b.x;\n    a.y *= b.y;\n    a.z *= b.z;\n    a.w *= b.w;\n}\ninline __host__ __device__ float4 operator*(float4 a, float b)\n{\n    return make_float4(a.x * b, a.y * b, a.z * b,  a.w * b);\n}\ninline __host__ __device__ float4 operator*(float b, float4 a)\n{\n    return make_float4(b * a.x, b * a.y, b * a.z, b * a.w);\n}\ninline __host__ __device__ void operator*=(float4 &a, float b)\n{\n    a.x *= b;\n    a.y *= b;\n    a.z *= b;\n    a.w *= b;\n}\n\ninline __host__ __device__ int4 operator*(int4 a, int4 b)\n{\n    return make_int4(a.x * b.x, a.y * b.y, a.z * b.z,  a.w * b.w);\n}\ninline __host__ __device__ void operator*=(int4 &a, int4 b)\n{\n    a.x *= b.x;\n    a.y *= b.y;\n    a.z *= b.z;\n    a.w *= b.w;\n}\ninline __host__ __device__ int4 operator*(int4 a, int b)\n{\n    return make_int4(a.x * b, a.y * b, a.z * b,  a.w * b);\n}\ninline __host__ __device__ int4 operator*(int b, int4 a)\n{\n    return make_int4(b * a.x, b * a.y, b * a.z, b * a.w);\n}\ninline __host__ __device__ void operator*=(int4 &a, int b)\n{\n    a.x *= b;\n    a.y *= b;\n    a.z *= b;\n    a.w *= b;\n}\n\ninline __host__ __device__ uint4 operator*(uint4 a, uint4 b)\n{\n    return make_uint4(a.x * b.x, a.y * b.y, a.z * b.z,  a.w * b.w);\n}\ninline __host__ __device__ void operator*=(uint4 &a, uint4 b)\n{\n    a.x *= b.x;\n    a.y *= b.y;\n    a.z *= b.z;\n    a.w *= b.w;\n}\ninline __host__ __device__ uint4 operator*(uint4 a, uint b)\n{\n    return make_uint4(a.x * b, a.y * b, a.z * b,  a.w * b);\n}\ninline __host__ __device__ uint4 operator*(uint b, uint4 a)\n{\n    return make_uint4(b * a.x, b * a.y, b * a.z, b * a.w);\n}\ninline __host__ __device__ void operator*=(uint4 &a, uint b)\n{\n    a.x *= b;\n    a.y *= b;\n    a.z *= b;\n    a.w *= b;\n}\n\n////////////////////////////////////////////////////////////////////////////////\n// divide\n////////////////////////////////////////////////////////////////////////////////\n\ninline __host__ __device__ float2 operator/(float2 a, float2 b)\n{\n    return make_float2(a.x / b.x, a.y / b.y);\n}\ninline __host__ __device__ void operator/=(float2 &a, float2 b)\n{\n    a.x /= b.x;\n    a.y /= b.y;\n}\ninline __host__ __device__ float2 operator/(float2 a, float b)\n{\n    return make_float2(a.x / b, a.y / b);\n}\ninline __host__ __device__ void operator/=(float2 &a, float b)\n{\n    a.x /= b;\n    a.y /= b;\n}\ninline __host__ __device__ float2 operator/(float b, float2 a)\n{\n    return make_float2(b / a.x, b / a.y);\n}\n\ninline __host__ __device__ float3 operator/(float3 a, float3 b)\n{\n    return make_float3(a.x / b.x, a.y / b.y, a.z / b.z);\n}\ninline __host__ __device__ void operator/=(float3 &a, float3 b)\n{\n    a.x /= b.x;\n    a.y /= b.y;\n    a.z /= b.z;\n}\ninline __host__ __device__ float3 operator/(float3 a, float b)\n{\n    return make_float3(a.x / b, a.y / b, a.z / b);\n}\ninline __host__ __device__ void operator/=(float3 &a, float b)\n{\n    a.x /= b;\n    a.y /= b;\n    a.z /= b;\n}\ninline __host__ __device__ float3 operator/(float b, float3 a)\n{\n    return make_float3(b / a.x, b / a.y, b / a.z);\n}\n\ninline __host__ __device__ float4 operator/(float4 a, float4 b)\n{\n    return make_float4(a.x / b.x, a.y / b.y, a.z / b.z,  a.w / b.w);\n}\ninline __host__ __device__ void operator/=(float4 &a, float4 b)\n{\n    a.x /= b.x;\n    a.y /= b.y;\n    a.z /= b.z;\n    a.w /= b.w;\n}\ninline __host__ __device__ float4 operator/(float4 a, float b)\n{\n    return make_float4(a.x / b, a.y / b, a.z / b,  a.w / b);\n}\ninline __host__ __device__ void operator/=(float4 &a, float b)\n{\n    a.x /= b;\n    a.y /= b;\n    a.z /= b;\n    a.w /= b;\n}\ninline __host__ __device__ float4 operator/(float b, float4 a)\n{\n    return make_float4(b / a.x, b / a.y, b / a.z, b / a.w);\n}\n\n////////////////////////////////////////////////////////////////////////////////\n// min\n////////////////////////////////////////////////////////////////////////////////\n\ninline  __host__ __device__ float2 fminf(float2 a, float2 b)\n{\n    return make_float2(fminf(a.x,b.x), fminf(a.y,b.y));\n}\ninline __host__ __device__ float3 fminf(float3 a, float3 b)\n{\n    return make_float3(fminf(a.x,b.x), fminf(a.y,b.y), fminf(a.z,b.z));\n}\ninline  __host__ __device__ float4 fminf(float4 a, float4 b)\n{\n    return make_float4(fminf(a.x,b.x), fminf(a.y,b.y), fminf(a.z,b.z), fminf(a.w,b.w));\n}\n\ninline __host__ __device__ int2 min(int2 a, int2 b)\n{\n    return make_int2(min(a.x,b.x), min(a.y,b.y));\n}\ninline __host__ __device__ int3 min(int3 a, int3 b)\n{\n    return make_int3(min(a.x,b.x), min(a.y,b.y), min(a.z,b.z));\n}\ninline __host__ __device__ int4 min(int4 a, int4 b)\n{\n    return make_int4(min(a.x,b.x), min(a.y,b.y), min(a.z,b.z), min(a.w,b.w));\n}\n\ninline __host__ __device__ uint2 min(uint2 a, uint2 b)\n{\n    return make_uint2(min(a.x,b.x), min(a.y,b.y));\n}\ninline __host__ __device__ uint3 min(uint3 a, uint3 b)\n{\n    return make_uint3(min(a.x,b.x), min(a.y,b.y), min(a.z,b.z));\n}\ninline __host__ __device__ uint4 min(uint4 a, uint4 b)\n{\n    return make_uint4(min(a.x,b.x), min(a.y,b.y), min(a.z,b.z), min(a.w,b.w));\n}\n\n////////////////////////////////////////////////////////////////////////////////\n// max\n////////////////////////////////////////////////////////////////////////////////\n\ninline __host__ __device__ float2 fmaxf(float2 a, float2 b)\n{\n    return make_float2(fmaxf(a.x,b.x), fmaxf(a.y,b.y));\n}\ninline __host__ __device__ float3 fmaxf(float3 a, float3 b)\n{\n    return make_float3(fmaxf(a.x,b.x), fmaxf(a.y,b.y), fmaxf(a.z,b.z));\n}\ninline __host__ __device__ float4 fmaxf(float4 a, float4 b)\n{\n    return make_float4(fmaxf(a.x,b.x), fmaxf(a.y,b.y), fmaxf(a.z,b.z), fmaxf(a.w,b.w));\n}\n\ninline __host__ __device__ int2 max(int2 a, int2 b)\n{\n    return make_int2(max(a.x,b.x), max(a.y,b.y));\n}\ninline __host__ __device__ int3 max(int3 a, int3 b)\n{\n    return make_int3(max(a.x,b.x), max(a.y,b.y), max(a.z,b.z));\n}\ninline __host__ __device__ int4 max(int4 a, int4 b)\n{\n    return make_int4(max(a.x,b.x), max(a.y,b.y), max(a.z,b.z), max(a.w,b.w));\n}\n\ninline __host__ __device__ uint2 max(uint2 a, uint2 b)\n{\n    return make_uint2(max(a.x,b.x), max(a.y,b.y));\n}\ninline __host__ __device__ uint3 max(uint3 a, uint3 b)\n{\n    return make_uint3(max(a.x,b.x), max(a.y,b.y), max(a.z,b.z));\n}\ninline __host__ __device__ uint4 max(uint4 a, uint4 b)\n{\n    return make_uint4(max(a.x,b.x), max(a.y,b.y), max(a.z,b.z), max(a.w,b.w));\n}\n\n////////////////////////////////////////////////////////////////////////////////\n// lerp\n// - linear interpolation between a and b, based on value t in [0, 1] range\n////////////////////////////////////////////////////////////////////////////////\n\ninline __device__ __host__ float lerp(float a, float b, float t)\n{\n    return a + t*(b-a);\n}\ninline __device__ __host__ float2 lerp(float2 a, float2 b, float t)\n{\n    return a + t*(b-a);\n}\ninline __device__ __host__ float3 lerp(float3 a, float3 b, float t)\n{\n    return a + t*(b-a);\n}\ninline __device__ __host__ float4 lerp(float4 a, float4 b, float t)\n{\n    return a + t*(b-a);\n}\n\n////////////////////////////////////////////////////////////////////////////////\n// clamp\n// - clamp the value v to be in the range [a, b]\n////////////////////////////////////////////////////////////////////////////////\n\ninline __device__ __host__ float clamp(float f, float a, float b)\n{\n    return fmaxf(a, fminf(f, b));\n}\ninline __device__ __host__ int clamp(int f, int a, int b)\n{\n    return max(a, min(f, b));\n}\ninline __device__ __host__ uint clamp(uint f, uint a, uint b)\n{\n    return max(a, min(f, b));\n}\n\ninline __device__ __host__ float2 clamp(float2 v, float a, float b)\n{\n    return make_float2(clamp(v.x, a, b), clamp(v.y, a, b));\n}\ninline __device__ __host__ float2 clamp(float2 v, float2 a, float2 b)\n{\n    return make_float2(clamp(v.x, a.x, b.x), clamp(v.y, a.y, b.y));\n}\ninline __device__ __host__ float3 clamp(float3 v, float a, float b)\n{\n    return make_float3(clamp(v.x, a, b), clamp(v.y, a, b), clamp(v.z, a, b));\n}\ninline __device__ __host__ float3 clamp(float3 v, float3 a, float3 b)\n{\n    return make_float3(clamp(v.x, a.x, b.x), clamp(v.y, a.y, b.y), clamp(v.z, a.z, b.z));\n}\ninline __device__ __host__ float4 clamp(float4 v, float a, float b)\n{\n    return make_float4(clamp(v.x, a, b), clamp(v.y, a, b), clamp(v.z, a, b), clamp(v.w, a, b));\n}\ninline __device__ __host__ float4 clamp(float4 v, float4 a, float4 b)\n{\n    return make_float4(clamp(v.x, a.x, b.x), clamp(v.y, a.y, b.y), clamp(v.z, a.z, b.z), clamp(v.w, a.w, b.w));\n}\n\ninline __device__ __host__ int2 clamp(int2 v, int a, int b)\n{\n    return make_int2(clamp(v.x, a, b), clamp(v.y, a, b));\n}\ninline __device__ __host__ int2 clamp(int2 v, int2 a, int2 b)\n{\n    return make_int2(clamp(v.x, a.x, b.x), clamp(v.y, a.y, b.y));\n}\ninline __device__ __host__ int3 clamp(int3 v, int a, int b)\n{\n    return make_int3(clamp(v.x, a, b), clamp(v.y, a, b), clamp(v.z, a, b));\n}\ninline __device__ __host__ int3 clamp(int3 v, int3 a, int3 b)\n{\n    return make_int3(clamp(v.x, a.x, b.x), clamp(v.y, a.y, b.y), clamp(v.z, a.z, b.z));\n}\ninline __device__ __host__ int4 clamp(int4 v, int a, int b)\n{\n    return make_int4(clamp(v.x, a, b), clamp(v.y, a, b), clamp(v.z, a, b), clamp(v.w, a, b));\n}\ninline __device__ __host__ int4 clamp(int4 v, int4 a, int4 b)\n{\n    return make_int4(clamp(v.x, a.x, b.x), clamp(v.y, a.y, b.y), clamp(v.z, a.z, b.z), clamp(v.w, a.w, b.w));\n}\n\ninline __device__ __host__ uint2 clamp(uint2 v, uint a, uint b)\n{\n    return make_uint2(clamp(v.x, a, b), clamp(v.y, a, b));\n}\ninline __device__ __host__ uint2 clamp(uint2 v, uint2 a, uint2 b)\n{\n    return make_uint2(clamp(v.x, a.x, b.x), clamp(v.y, a.y, b.y));\n}\ninline __device__ __host__ uint3 clamp(uint3 v, uint a, uint b)\n{\n    return make_uint3(clamp(v.x, a, b), clamp(v.y, a, b), clamp(v.z, a, b));\n}\ninline __device__ __host__ uint3 clamp(uint3 v, uint3 a, uint3 b)\n{\n    return make_uint3(clamp(v.x, a.x, b.x), clamp(v.y, a.y, b.y), clamp(v.z, a.z, b.z));\n}\ninline __device__ __host__ uint4 clamp(uint4 v, uint a, uint b)\n{\n    return make_uint4(clamp(v.x, a, b), clamp(v.y, a, b), clamp(v.z, a, b), clamp(v.w, a, b));\n}\ninline __device__ __host__ uint4 clamp(uint4 v, uint4 a, uint4 b)\n{\n    return make_uint4(clamp(v.x, a.x, b.x), clamp(v.y, a.y, b.y), clamp(v.z, a.z, b.z), clamp(v.w, a.w, b.w));\n}\n\n////////////////////////////////////////////////////////////////////////////////\n// dot product\n////////////////////////////////////////////////////////////////////////////////\n\ninline __host__ __device__ float dot(float2 a, float2 b)\n{\n    return a.x * b.x + a.y * b.y;\n}\ninline __host__ __device__ float dot(float3 a, float3 b)\n{\n    return a.x * b.x + a.y * b.y + a.z * b.z;\n}\ninline __host__ __device__ float dot(float4 a, float4 b)\n{\n    return a.x * b.x + a.y * b.y + a.z * b.z + a.w * b.w;\n}\n\ninline __host__ __device__ int dot(int2 a, int2 b)\n{\n    return a.x * b.x + a.y * b.y;\n}\ninline __host__ __device__ int dot(int3 a, int3 b)\n{\n    return a.x * b.x + a.y * b.y + a.z * b.z;\n}\ninline __host__ __device__ int dot(int4 a, int4 b)\n{\n    return a.x * b.x + a.y * b.y + a.z * b.z + a.w * b.w;\n}\n\ninline __host__ __device__ uint dot(uint2 a, uint2 b)\n{\n    return a.x * b.x + a.y * b.y;\n}\ninline __host__ __device__ uint dot(uint3 a, uint3 b)\n{\n    return a.x * b.x + a.y * b.y + a.z * b.z;\n}\ninline __host__ __device__ uint dot(uint4 a, uint4 b)\n{\n    return a.x * b.x + a.y * b.y + a.z * b.z + a.w * b.w;\n}\n\n////////////////////////////////////////////////////////////////////////////////\n// length\n////////////////////////////////////////////////////////////////////////////////\n\ninline __host__ __device__ float length(float2 v)\n{\n    return sqrtf(dot(v, v));\n}\ninline __host__ __device__ float length(float3 v)\n{\n    return sqrtf(dot(v, v));\n}\ninline __host__ __device__ float length(float4 v)\n{\n    return sqrtf(dot(v, v));\n}\n\n////////////////////////////////////////////////////////////////////////////////\n// normalize\n////////////////////////////////////////////////////////////////////////////////\n\ninline __host__ __device__ float2 normalize(float2 v)\n{\n    float invLen = rsqrtf(dot(v, v));\n    return v * invLen;\n}\ninline __host__ __device__ float3 normalize(float3 v)\n{\n    float invLen = rsqrtf(dot(v, v));\n    return v * invLen;\n}\ninline __host__ __device__ float4 normalize(float4 v)\n{\n    float invLen = rsqrtf(dot(v, v));\n    return v * invLen;\n}\n\n////////////////////////////////////////////////////////////////////////////////\n// floor\n////////////////////////////////////////////////////////////////////////////////\n\ninline __host__ __device__ float2 floorf(float2 v)\n{\n    return make_float2(floorf(v.x), floorf(v.y));\n}\ninline __host__ __device__ float3 floorf(float3 v)\n{\n    return make_float3(floorf(v.x), floorf(v.y), floorf(v.z));\n}\ninline __host__ __device__ float4 floorf(float4 v)\n{\n    return make_float4(floorf(v.x), floorf(v.y), floorf(v.z), floorf(v.w));\n}\n\n////////////////////////////////////////////////////////////////////////////////\n// frac - returns the fractional portion of a scalar or each vector component\n////////////////////////////////////////////////////////////////////////////////\n\ninline __host__ __device__ float fracf(float v)\n{\n    return v - floorf(v);\n}\ninline __host__ __device__ float2 fracf(float2 v)\n{\n    return make_float2(fracf(v.x), fracf(v.y));\n}\ninline __host__ __device__ float3 fracf(float3 v)\n{\n    return make_float3(fracf(v.x), fracf(v.y), fracf(v.z));\n}\ninline __host__ __device__ float4 fracf(float4 v)\n{\n    return make_float4(fracf(v.x), fracf(v.y), fracf(v.z), fracf(v.w));\n}\n\n////////////////////////////////////////////////////////////////////////////////\n// fmod\n////////////////////////////////////////////////////////////////////////////////\n\ninline __host__ __device__ float2 fmodf(float2 a, float2 b)\n{\n    return make_float2(fmodf(a.x, b.x), fmodf(a.y, b.y));\n}\ninline __host__ __device__ float3 fmodf(float3 a, float3 b)\n{\n    return make_float3(fmodf(a.x, b.x), fmodf(a.y, b.y), fmodf(a.z, b.z));\n}\ninline __host__ __device__ float4 fmodf(float4 a, float4 b)\n{\n    return make_float4(fmodf(a.x, b.x), fmodf(a.y, b.y), fmodf(a.z, b.z), fmodf(a.w, b.w));\n}\n\n////////////////////////////////////////////////////////////////////////////////\n// absolute value\n////////////////////////////////////////////////////////////////////////////////\n\ninline __host__ __device__ float2 fabs(float2 v)\n{\n    return make_float2(fabs(v.x), fabs(v.y));\n}\ninline __host__ __device__ float3 fabs(float3 v)\n{\n    return make_float3(fabs(v.x), fabs(v.y), fabs(v.z));\n}\ninline __host__ __device__ float4 fabs(float4 v)\n{\n    return make_float4(fabs(v.x), fabs(v.y), fabs(v.z), fabs(v.w));\n}\n\ninline __host__ __device__ int2 abs(int2 v)\n{\n    return make_int2(abs(v.x), abs(v.y));\n}\ninline __host__ __device__ int3 abs(int3 v)\n{\n    return make_int3(abs(v.x), abs(v.y), abs(v.z));\n}\ninline __host__ __device__ int4 abs(int4 v)\n{\n    return make_int4(abs(v.x), abs(v.y), abs(v.z), abs(v.w));\n}\n\n////////////////////////////////////////////////////////////////////////////////\n// reflect\n// - returns reflection of incident ray I around surface normal N\n// - N should be normalized, reflected vector's length is equal to length of I\n////////////////////////////////////////////////////////////////////////////////\n\ninline __host__ __device__ float3 reflect(float3 i, float3 n)\n{\n    return i - 2.0f * n * dot(n,i);\n}\n\n////////////////////////////////////////////////////////////////////////////////\n// cross product\n////////////////////////////////////////////////////////////////////////////////\n\ninline __host__ __device__ float3 cross(float3 a, float3 b)\n{\n    return make_float3(a.y*b.z - a.z*b.y, a.z*b.x - a.x*b.z, a.x*b.y - a.y*b.x);\n}\n\n////////////////////////////////////////////////////////////////////////////////\n// smoothstep\n// - returns 0 if x < a\n// - returns 1 if x > b\n// - otherwise returns smooth interpolation between 0 and 1 based on x\n////////////////////////////////////////////////////////////////////////////////\n\ninline __device__ __host__ float smoothstep(float a, float b, float x)\n{\n    float y = clamp((x - a) / (b - a), 0.0f, 1.0f);\n    return (y*y*(3.0f - (2.0f*y)));\n}\ninline __device__ __host__ float2 smoothstep(float2 a, float2 b, float2 x)\n{\n    float2 y = clamp((x - a) / (b - a), 0.0f, 1.0f);\n    return (y*y*(make_float2(3.0f) - (make_float2(2.0f)*y)));\n}\ninline __device__ __host__ float3 smoothstep(float3 a, float3 b, float3 x)\n{\n    float3 y = clamp((x - a) / (b - a), 0.0f, 1.0f);\n    return (y*y*(make_float3(3.0f) - (make_float3(2.0f)*y)));\n}\ninline __device__ __host__ float4 smoothstep(float4 a, float4 b, float4 x)\n{\n    float4 y = clamp((x - a) / (b - a), 0.0f, 1.0f);\n    return (y*y*(make_float4(3.0f) - (make_float4(2.0f)*y)));\n}\n\n#endif\n"
  },
  {
    "path": "docs/README.md",
    "content": "# ScoreDraft\n\n## Introduction\n\n[Introduction in English](intro_eng.md)\n\n[中文使用说明](intro_cn.md)\n\n\n## Meteor Demos\n\n### English\n\n* [TikTok](meteor/tiktok)\n* [MyLove](meteor/MyLove)\n* [SoreFeetSong](meteor/SoreFeetSong)\n\n### Japanese\n\n* [おうちに帰りたい](meteor/ouchi)\n\n### Chinese\n\n* [无涯](meteor/WuYa)\n* [踏浪](meteor/TaLang)\n"
  },
  {
    "path": "docs/_config.yml",
    "content": "theme: jekyll-theme-hacker"
  },
  {
    "path": "docs/intro_cn.html_files/github-markdown.css",
    "content": "@font-face {\n  font-family: octicons-link;\n  src: url(data:font/woff;charset=utf-8;base64,d09GRgABAAAAAAZwABAAAAAACFQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABEU0lHAAAGaAAAAAgAAAAIAAAAAUdTVUIAAAZcAAAACgAAAAoAAQAAT1MvMgAAAyQAAABJAAAAYFYEU3RjbWFwAAADcAAAAEUAAACAAJThvmN2dCAAAATkAAAABAAAAAQAAAAAZnBnbQAAA7gAAACyAAABCUM+8IhnYXNwAAAGTAAAABAAAAAQABoAI2dseWYAAAFsAAABPAAAAZwcEq9taGVhZAAAAsgAAAA0AAAANgh4a91oaGVhAAADCAAAABoAAAAkCA8DRGhtdHgAAAL8AAAADAAAAAwGAACfbG9jYQAAAsAAAAAIAAAACABiATBtYXhwAAACqAAAABgAAAAgAA8ASm5hbWUAAAToAAABQgAAAlXu73sOcG9zdAAABiwAAAAeAAAAME3QpOBwcmVwAAAEbAAAAHYAAAB/aFGpk3jaTY6xa8JAGMW/O62BDi0tJLYQincXEypYIiGJjSgHniQ6umTsUEyLm5BV6NDBP8Tpts6F0v+k/0an2i+itHDw3v2+9+DBKTzsJNnWJNTgHEy4BgG3EMI9DCEDOGEXzDADU5hBKMIgNPZqoD3SilVaXZCER3/I7AtxEJLtzzuZfI+VVkprxTlXShWKb3TBecG11rwoNlmmn1P2WYcJczl32etSpKnziC7lQyWe1smVPy/Lt7Kc+0vWY/gAgIIEqAN9we0pwKXreiMasxvabDQMM4riO+qxM2ogwDGOZTXxwxDiycQIcoYFBLj5K3EIaSctAq2kTYiw+ymhce7vwM9jSqO8JyVd5RH9gyTt2+J/yUmYlIR0s04n6+7Vm1ozezUeLEaUjhaDSuXHwVRgvLJn1tQ7xiuVv/ocTRF42mNgZGBgYGbwZOBiAAFGJBIMAAizAFoAAABiAGIAznjaY2BkYGAA4in8zwXi+W2+MjCzMIDApSwvXzC97Z4Ig8N/BxYGZgcgl52BCSQKAA3jCV8CAABfAAAAAAQAAEB42mNgZGBg4f3vACQZQABIMjKgAmYAKEgBXgAAeNpjYGY6wTiBgZWBg2kmUxoDA4MPhGZMYzBi1AHygVLYQUCaawqDA4PChxhmh/8ODDEsvAwHgMKMIDnGL0x7gJQCAwMAJd4MFwAAAHjaY2BgYGaA4DAGRgYQkAHyGMF8NgYrIM3JIAGVYYDT+AEjAwuDFpBmA9KMDEwMCh9i/v8H8sH0/4dQc1iAmAkALaUKLgAAAHjaTY9LDsIgEIbtgqHUPpDi3gPoBVyRTmTddOmqTXThEXqrob2gQ1FjwpDvfwCBdmdXC5AVKFu3e5MfNFJ29KTQT48Ob9/lqYwOGZxeUelN2U2R6+cArgtCJpauW7UQBqnFkUsjAY/kOU1cP+DAgvxwn1chZDwUbd6CFimGXwzwF6tPbFIcjEl+vvmM/byA48e6tWrKArm4ZJlCbdsrxksL1AwWn/yBSJKpYbq8AXaaTb8AAHja28jAwOC00ZrBeQNDQOWO//sdBBgYGRiYWYAEELEwMTE4uzo5Zzo5b2BxdnFOcALxNjA6b2ByTswC8jYwg0VlNuoCTWAMqNzMzsoK1rEhNqByEyerg5PMJlYuVueETKcd/89uBpnpvIEVomeHLoMsAAe1Id4AAAAAAAB42oWQT07CQBTGv0JBhagk7HQzKxca2sJCE1hDt4QF+9JOS0nbaaYDCQfwCJ7Au3AHj+LO13FMmm6cl7785vven0kBjHCBhfpYuNa5Ph1c0e2Xu3jEvWG7UdPDLZ4N92nOm+EBXuAbHmIMSRMs+4aUEd4Nd3CHD8NdvOLTsA2GL8M9PODbcL+hD7C1xoaHeLJSEao0FEW14ckxC+TU8TxvsY6X0eLPmRhry2WVioLpkrbp84LLQPGI7c6sOiUzpWIWS5GzlSgUzzLBSikOPFTOXqly7rqx0Z1Q5BAIoZBSFihQYQOOBEdkCOgXTOHA07HAGjGWiIjaPZNW13/+lm6S9FT7rLHFJ6fQbkATOG1j2OFMucKJJsxIVfQORl+9Jyda6Sl1dUYhSCm1dyClfoeDve4qMYdLEbfqHf3O/AdDumsjAAB42mNgYoAAZQYjBmyAGYQZmdhL8zLdDEydARfoAqIAAAABAAMABwAKABMAB///AA8AAQAAAAAAAAAAAAAAAAABAAAAAA==) format('woff');\n}\n\n.markdown-body {\n  -webkit-text-size-adjust: 100%;\n  text-size-adjust: 100%;\n  color: #333;\n  font-family: \"Helvetica Neue\", Helvetica, \"Segoe UI\", Arial, freesans, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";\n  font-size: 16px;\n  line-height: 1.6;\n  word-wrap: break-word;\n}\n\n.markdown-body a {\n  background-color: transparent;\n}\n\n.markdown-body a:active,\n.markdown-body a:hover {\n  outline: 0;\n}\n\n.markdown-body strong {\n  font-weight: bold;\n}\n\n.markdown-body h1 {\n  font-size: 2em;\n  margin: 0.67em 0;\n}\n\n.markdown-body img {\n  border: 0;\n}\n\n.markdown-body hr {\n  box-sizing: content-box;\n  height: 0;\n}\n\n.markdown-body pre {\n  overflow: auto;\n}\n\n.markdown-body code,\n.markdown-body kbd,\n.markdown-body pre {\n  font-family: monospace, monospace;\n  font-size: 1em;\n}\n\n.markdown-body input {\n  color: inherit;\n  font: inherit;\n  margin: 0;\n}\n\n.markdown-body html input[disabled] {\n  cursor: default;\n}\n\n.markdown-body input {\n  line-height: normal;\n}\n\n.markdown-body input[type=\"checkbox\"] {\n  box-sizing: border-box;\n  padding: 0;\n}\n\n.markdown-body table {\n  border-collapse: collapse;\n  border-spacing: 0;\n}\n\n.markdown-body td,\n.markdown-body th {\n  padding: 0;\n}\n\n.markdown-body * {\n  box-sizing: border-box;\n}\n\n.markdown-body input {\n  font: 13px / 1.4 Helvetica, arial, nimbussansl, liberationsans, freesans, clean, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";\n}\n\n.markdown-body a {\n  color: #4078c0;\n  text-decoration: none;\n}\n\n.markdown-body a:hover,\n.markdown-body a:active {\n  text-decoration: underline;\n}\n\n.markdown-body hr {\n  height: 0;\n  margin: 15px 0;\n  overflow: hidden;\n  background: transparent;\n  border: 0;\n  border-bottom: 1px solid #ddd;\n}\n\n.markdown-body hr:before {\n  display: table;\n  content: \"\";\n}\n\n.markdown-body hr:after {\n  display: table;\n  clear: both;\n  content: \"\";\n}\n\n.markdown-body h1,\n.markdown-body h2,\n.markdown-body h3,\n.markdown-body h4,\n.markdown-body h5,\n.markdown-body h6 {\n  margin-top: 15px;\n  margin-bottom: 15px;\n  line-height: 1.1;\n}\n\n.markdown-body h1 {\n  font-size: 30px;\n}\n\n.markdown-body h2 {\n  font-size: 21px;\n}\n\n.markdown-body h3 {\n  font-size: 16px;\n}\n\n.markdown-body h4 {\n  font-size: 14px;\n}\n\n.markdown-body h5 {\n  font-size: 12px;\n}\n\n.markdown-body h6 {\n  font-size: 11px;\n}\n\n.markdown-body blockquote {\n  margin: 0;\n}\n\n.markdown-body ul,\n.markdown-body ol {\n  padding: 0;\n  margin-top: 0;\n  margin-bottom: 0;\n}\n\n.markdown-body ol ol,\n.markdown-body ul ol {\n  list-style-type: lower-roman;\n}\n\n.markdown-body ul ul ol,\n.markdown-body ul ol ol,\n.markdown-body ol ul ol,\n.markdown-body ol ol ol {\n  list-style-type: lower-alpha;\n}\n\n.markdown-body dd {\n  margin-left: 0;\n}\n\n.markdown-body code {\n  font-family: Consolas, \"Liberation Mono\", Menlo, Courier, monospace;\n  font-size: 12px;\n}\n\n.markdown-body pre {\n  margin-top: 0;\n  margin-bottom: 0;\n  font: 12px Consolas, \"Liberation Mono\", Menlo, Courier, monospace;\n}\n\n.markdown-body .select::-ms-expand {\n  opacity: 0;\n}\n\n.markdown-body .octicon {\n  font: normal normal normal 16px/1 octicons-link;\n  display: inline-block;\n  text-decoration: none;\n  text-rendering: auto;\n  -webkit-font-smoothing: antialiased;\n  -moz-osx-font-smoothing: grayscale;\n  -webkit-user-select: none;\n  -moz-user-select: none;\n  -ms-user-select: none;\n  user-select: none;\n}\n\n.markdown-body .octicon-link:before {\n  content: '\\f05c';\n}\n\n.markdown-body:before {\n  display: table;\n  content: \"\";\n}\n\n.markdown-body:after {\n  display: table;\n  clear: both;\n  content: \"\";\n}\n\n.markdown-body>*:first-child {\n  margin-top: 0 !important;\n}\n\n.markdown-body>*:last-child {\n  margin-bottom: 0 !important;\n}\n\n.markdown-body a:not([href]) {\n  color: inherit;\n  text-decoration: none;\n}\n\n.markdown-body .anchor {\n  display: inline-block;\n  padding-right: 2px;\n  margin-left: -18px;\n}\n\n.markdown-body .anchor:focus {\n  outline: none;\n}\n\n.markdown-body h1,\n.markdown-body h2,\n.markdown-body h3,\n.markdown-body h4,\n.markdown-body h5,\n.markdown-body h6 {\n  margin-top: 1em;\n  margin-bottom: 16px;\n  font-weight: bold;\n  line-height: 1.4;\n}\n\n.markdown-body h1 .octicon-link,\n.markdown-body h2 .octicon-link,\n.markdown-body h3 .octicon-link,\n.markdown-body h4 .octicon-link,\n.markdown-body h5 .octicon-link,\n.markdown-body h6 .octicon-link {\n  color: #000;\n  vertical-align: middle;\n  visibility: hidden;\n}\n\n.markdown-body h1:hover .anchor,\n.markdown-body h2:hover .anchor,\n.markdown-body h3:hover .anchor,\n.markdown-body h4:hover .anchor,\n.markdown-body h5:hover .anchor,\n.markdown-body h6:hover .anchor {\n  text-decoration: none;\n}\n\n.markdown-body h1:hover .anchor .octicon-link,\n.markdown-body h2:hover .anchor .octicon-link,\n.markdown-body h3:hover .anchor .octicon-link,\n.markdown-body h4:hover .anchor .octicon-link,\n.markdown-body h5:hover .anchor .octicon-link,\n.markdown-body h6:hover .anchor .octicon-link {\n  visibility: visible;\n}\n\n.markdown-body h1 {\n  padding-bottom: 0.3em;\n  font-size: 2.25em;\n  line-height: 1.2;\n  border-bottom: 1px solid #eee;\n}\n\n.markdown-body h1 .anchor {\n  line-height: 1;\n}\n\n.markdown-body h2 {\n  padding-bottom: 0.3em;\n  font-size: 1.75em;\n  line-height: 1.225;\n  border-bottom: 1px solid #eee;\n}\n\n.markdown-body h2 .anchor {\n  line-height: 1;\n}\n\n.markdown-body h3 {\n  font-size: 1.5em;\n  line-height: 1.43;\n}\n\n.markdown-body h3 .anchor {\n  line-height: 1.2;\n}\n\n.markdown-body h4 {\n  font-size: 1.25em;\n}\n\n.markdown-body h4 .anchor {\n  line-height: 1.2;\n}\n\n.markdown-body h5 {\n  font-size: 1em;\n}\n\n.markdown-body h5 .anchor {\n  line-height: 1.1;\n}\n\n.markdown-body h6 {\n  font-size: 1em;\n  color: #777;\n}\n\n.markdown-body h6 .anchor {\n  line-height: 1.1;\n}\n\n.markdown-body p,\n.markdown-body blockquote,\n.markdown-body ul,\n.markdown-body ol,\n.markdown-body dl,\n.markdown-body table,\n.markdown-body pre {\n  margin-top: 0;\n  margin-bottom: 16px;\n}\n\n.markdown-body hr {\n  height: 4px;\n  padding: 0;\n  margin: 16px 0;\n  background-color: #e7e7e7;\n  border: 0 none;\n}\n\n.markdown-body ul,\n.markdown-body ol {\n  padding-left: 2em;\n}\n\n.markdown-body ul ul,\n.markdown-body ul ol,\n.markdown-body ol ol,\n.markdown-body ol ul {\n  margin-top: 0;\n  margin-bottom: 0;\n}\n\n.markdown-body li>p {\n  margin-top: 16px;\n}\n\n.markdown-body dl {\n  padding: 0;\n}\n\n.markdown-body dl dt {\n  padding: 0;\n  margin-top: 16px;\n  font-size: 1em;\n  font-style: italic;\n  font-weight: bold;\n}\n\n.markdown-body dl dd {\n  padding: 0 16px;\n  margin-bottom: 16px;\n}\n\n.markdown-body blockquote {\n  padding: 0 15px;\n  color: #777;\n  border-left: 4px solid #ddd;\n}\n\n.markdown-body blockquote>:first-child {\n  margin-top: 0;\n}\n\n.markdown-body blockquote>:last-child {\n  margin-bottom: 0;\n}\n\n.markdown-body table {\n  display: block;\n  width: 100%;\n  overflow: auto;\n  word-break: normal;\n  word-break: keep-all;\n}\n\n.markdown-body table th {\n  font-weight: bold;\n}\n\n.markdown-body table th,\n.markdown-body table td {\n  padding: 6px 13px;\n  border: 1px solid #ddd;\n}\n\n.markdown-body table tr {\n  background-color: #fff;\n  border-top: 1px solid #ccc;\n}\n\n.markdown-body table tr:nth-child(2n) {\n  background-color: #f8f8f8;\n}\n\n.markdown-body img {\n  max-width: 100%;\n  box-sizing: content-box;\n  background-color: #fff;\n}\n\n.markdown-body code {\n  padding: 0;\n  padding-top: 0.2em;\n  padding-bottom: 0.2em;\n  margin: 0;\n  font-size: 85%;\n  background-color: rgba(0,0,0,0.04);\n  border-radius: 3px;\n}\n\n.markdown-body code:before,\n.markdown-body code:after {\n  letter-spacing: -0.2em;\n  content: \"\\00a0\";\n}\n\n.markdown-body pre>code {\n  padding: 0;\n  margin: 0;\n  font-size: 100%;\n  word-break: normal;\n  white-space: pre;\n  background: transparent;\n  border: 0;\n}\n\n.markdown-body .highlight {\n  margin-bottom: 16px;\n}\n\n.markdown-body .highlight pre,\n.markdown-body pre {\n  padding: 16px;\n  overflow: auto;\n  font-size: 85%;\n  line-height: 1.45;\n  background-color: #f7f7f7;\n  border-radius: 3px;\n}\n\n.markdown-body .highlight pre {\n  margin-bottom: 0;\n  word-break: normal;\n}\n\n.markdown-body pre {\n  word-wrap: normal;\n}\n\n.markdown-body pre code {\n  display: inline;\n  max-width: initial;\n  padding: 0;\n  margin: 0;\n  overflow: initial;\n  line-height: inherit;\n  word-wrap: normal;\n  background-color: transparent;\n  border: 0;\n}\n\n.markdown-body pre code:before,\n.markdown-body pre code:after {\n  content: normal;\n}\n\n.markdown-body kbd {\n  display: inline-block;\n  padding: 3px 5px;\n  font-size: 11px;\n  line-height: 10px;\n  color: #555;\n  vertical-align: middle;\n  background-color: #fcfcfc;\n  border: solid 1px #ccc;\n  border-bottom-color: #bbb;\n  border-radius: 3px;\n  box-shadow: inset 0 -1px 0 #bbb;\n}\n\n.markdown-body .pl-c {\n  color: #969896;\n}\n\n.markdown-body .pl-c1,\n.markdown-body .pl-s .pl-v {\n  color: #0086b3;\n}\n\n.markdown-body .pl-e,\n.markdown-body .pl-en {\n  color: #795da3;\n}\n\n.markdown-body .pl-s .pl-s1,\n.markdown-body .pl-smi {\n  color: #333;\n}\n\n.markdown-body .pl-ent {\n  color: #63a35c;\n}\n\n.markdown-body .pl-k {\n  color: #a71d5d;\n}\n\n.markdown-body .pl-pds,\n.markdown-body .pl-s,\n.markdown-body .pl-s .pl-pse .pl-s1,\n.markdown-body .pl-sr,\n.markdown-body .pl-sr .pl-cce,\n.markdown-body .pl-sr .pl-sra,\n.markdown-body .pl-sr .pl-sre {\n  color: #183691;\n}\n\n.markdown-body .pl-v {\n  color: #ed6a43;\n}\n\n.markdown-body .pl-id {\n  color: #b52a1d;\n}\n\n.markdown-body .pl-ii {\n  background-color: #b52a1d;\n  color: #f8f8f8;\n}\n\n.markdown-body .pl-sr .pl-cce {\n  color: #63a35c;\n  font-weight: bold;\n}\n\n.markdown-body .pl-ml {\n  color: #693a17;\n}\n\n.markdown-body .pl-mh,\n.markdown-body .pl-mh .pl-en,\n.markdown-body .pl-ms {\n  color: #1d3e81;\n  font-weight: bold;\n}\n\n.markdown-body .pl-mq {\n  color: #008080;\n}\n\n.markdown-body .pl-mi {\n  color: #333;\n  font-style: italic;\n}\n\n.markdown-body .pl-mb {\n  color: #333;\n  font-weight: bold;\n}\n\n.markdown-body .pl-md {\n  background-color: #ffecec;\n  color: #bd2c00;\n}\n\n.markdown-body .pl-mi1 {\n  background-color: #eaffea;\n  color: #55a532;\n}\n\n.markdown-body .pl-mdr {\n  color: #795da3;\n  font-weight: bold;\n}\n\n.markdown-body .pl-mo {\n  color: #1d3e81;\n}\n\n.markdown-body kbd {\n  display: inline-block;\n  padding: 3px 5px;\n  font: 11px Consolas, \"Liberation Mono\", Menlo, Courier, monospace;\n  line-height: 10px;\n  color: #555;\n  vertical-align: middle;\n  background-color: #fcfcfc;\n  border: solid 1px #ccc;\n  border-bottom-color: #bbb;\n  border-radius: 3px;\n  box-shadow: inset 0 -1px 0 #bbb;\n}\n\n.markdown-body .task-list-item {\n  list-style-type: none;\n}\n\n.markdown-body .task-list-item+.task-list-item {\n  margin-top: 3px;\n}\n\n.markdown-body .task-list-item input {\n  margin: 0 0.35em 0.25em -1.6em;\n  vertical-align: middle;\n}\n\n.markdown-body :checked+.radio-label {\n  z-index: 1;\n  position: relative;\n  border-color: #4078c0;\n}\n"
  },
  {
    "path": "docs/intro_cn.md",
    "content": "# ScoreDraft 使用说明\n\nScoreDraft 源代码位于 [GitHub](https://github.com/fynv/ScoreDraft)，那里你总是可以找到我最新提交的修改。\n\n可通过以下命令下载 PyPi 包，支持64位 Windows 和 Linux.\n\n```\npip install scoredraft\n```\n\n此处文档将介绍ScoreDraft各个基本元素的使用。\n\n## HelloWorld (使用TrackBuffer)\n\n我们就由一个最简单的例子入手来介绍ScoreDraft 的基本使用和设计思想。\n\n```python\nimport ScoreDraft\nfrom ScoreDraft.Notes import *\n\nseq=[do(),do(),so(),so(),la(),la(),so(5,96)]\n\nbuf=ScoreDraft.TrackBuffer()\nScoreDraft.KarplusStrongInstrument().play(buf, seq)\nScoreDraft.WriteTrackBufferToWav(buf,'twinkle.wav')\n```\n\n<audio controls>\n    <source type=\"audio/mpeg\" src=\"twinkle.mp3\"/>\n</audio>\n\n<h3>Play命令</h3>\n\n```python\nScoreDraft.KarplusStrongInstrument().play(buf, seq)\n```\n\nScoreDraft最重要的接口设计，是一类我们后面称为Play命令的语句，它的基本形式是 \n\n```python\ninstrument.play(buf,seq)\n```\n\n其中，instrument是乐器，buf是音轨缓存，seq是序列。整句话代表用乐器instrument演奏序列seq，结果写入buf。\n\n与此类似的，还可以用打击乐组来演奏，或用（虚拟）歌手来演唱，这些语句都具有与这里类似的形式，统称为Play命令。\n\nPlay命令还可以传入速率（tempo）、参考频率（refFreq）等信息，它们有默认值，因此可以省略。\n\n### 导入\n\n```python\nimport ScoreDraft\nfrom ScoreDraft.Notes import *\n```\n\n使用ScoreDraft必须首先导入ScoreDraft包，该包定义了ScoreDraft的核心Python 接口。\n\n多数应用也会包含ScoreDraft.Notes 模块中的音符定义。这里要注意一个事实，那就是，音符定义并不是ScoreDraft核心接口的一部分。对于音符的音高，核心接口直接接受的是物理频率。具体来说，在每一个Play命令中，我们可以传入一个以Hz为单位的参考频率，此处记为f_ref，然后对每一个音符，我们指定一个无量纲的相对频率f_rel[i]，此时音符的物理频率可由以下公式计算得到：\n\n```\nf_note[i] = f_ref *f_rel[i].\n```\n\nScoreDraft.Notes给出了一系列“音符”函数（do(), re(), mi()...）的定义，帮助我们把音乐语言转换为物理量。这些函数都十分简单，这使得用户可根据自己的需要在必要的时候对其进行修改和扩展，比如，当你需要一个不同于十二平均律的律制的时候。\n\n### 乐谱的表示\n\n```python\nseq=[do(),do(),so(),so(),la(),la(),so(5,96)]\n```\n\n乐谱本体在ScoreDraft中表示为一组Python列表，称为“序列”。后面的章节会详细介绍这些序列的组成规则。尽管序列的各个元素是按顺序依次处理的，由这些元素产生的声音却有可能彼此重合，这是通过在序列中包含退格操作来实现的。\n\n因为序列的本质是Python列表，原则上我们可以使用Python提供的任何功能来辅助我们编写音乐的过程。这方面的技巧可能需要另外的文档来专门介绍。\n\n### 音轨缓存(TrackBuffer)\n\n```python\nbuf=ScoreDraft.TrackBuffer()\n```\n\nScoreDraft 用音轨缓存来储存波形数据，不论是音乐合成的中间结果还是最终的混音结果都储存在音轨缓存当中。\n\n在ScoreDraft包中定义有TrackBuffer类，它是对C++接口的直接封装，相对于后面要介绍的Document类，TrackBuffer类是较为底层的操作接口。\n\n## HelloWorld (使用Document)\n\n```python\nimport ScoreDraft\nfrom ScoreDraft.Notes import *\n\ndoc=ScoreDraft.Document()\n\nseq=[do(),do(),so(),so(),la(),la(),so(5,96)]\n\ndoc.playNoteSeq(seq, ScoreDraft.KarplusStrongInstrument())\ndoc.mixDown('twinkle.wav')\n```\n\n多数音乐作品需要复数个音轨缓存(TrackBuffer)。ScoreDraft包中提供了一个Document类，用来统一管理多个音轨缓存，在实际使用中，我们建议使用ScoreDraft.Document类，而不是直接使用音轨缓存对应的ScoreDraft.TrackBuffer类。\n\n如上面的例子所示， 使用Document类代替TrackBuffer类同时伴随着Play命令写法的变化。使用Document的Play命令时隐含了TrackBuffer对象，同时乐器变为参数。可以形式化地写为doc.play(seq,instrument)，代替了instrument.play(buf,seq)。\n\n这样做有几个好处。首先，它简化了音轨缓存的创建，Document类会在执行Play命令时帮你隐式地完成这件事。第二，它大大地简化了混音操作，由于音轨全部在Document类内管理，在混音的时候不必手动列举需要混合的各个音轨。第三，可视化插件可以在Document类上做文章来实现多态性。比如在使用Meteor可视化器的时候，最简单的做法就是把ScoreDraft.Document类用Meteor.Document类来替换。\n\n使用Document类时，速率、参考频率等信息也由Document的实例对象统一管理，不再需要通过Play命令的参数来传入。\n\n## 初始化 Intruments/Percussions/Singers\n\n用户随时可以通过 PrintCatalog.py 来得到一个可以全部乐器/打击\n乐/歌手初始化器的列表：\n\n```python\n# PrintCatalog.py\nimport ScoreDraft\nScoreDraft.PrintCatalog()\n```\n\n该脚本的输出类似于如下的效果：\n\n```\n{\n  \"Engines\": [\n    \"KarplusStrongInstrument - Instrument\",\n    \"InstrumentSampler_Single - Instrument\",\n    \"InstrumentSampler_Multi - Instrument\",\n    \"PercussionSampler - Percussion\",\n    \"SF2Instrument - Instrument\",\n    \"UtauDraft - Singing\"\n  ],\n  \"Instruments\": [\n    \"Ah - InstrumentSampler_Single\",\n    \"Cello - InstrumentSampler_Single\",\n    \"CleanGuitar - InstrumentSampler_Single\",\n    \"Lah - InstrumentSampler_Single\",\n    \"String - InstrumentSampler_Single\",\n    \"Violin - InstrumentSampler_Single\",\n    \"Arachno - SF2Instrument\",\n    \"SynthFontViena - SF2Instrument\"\n  ],\n  \"Percussions\": [\n    \"BassDrum - PercussionSampler\",\n    \"ClosedHitHat - PercussionSampler\",\n    \"Snare - PercussionSampler\",\n  ],\n  \"Singers\": [\n    \"Ayaka_UTAU - UtauDraft\",\n    \"GePing_UTAU - UtauDraft\",\n    \"jklex_UTAU - UtauDraft\",\n    \"uta_UTAU - UtauDraft\",\n  ]\n}\n```\n\n第一个列表\"Engines\"列出的是各个可用的引擎以及它们的类型（乐器/打击乐/歌手）。\n\n后续的三个列表分别给出可以立即使用的乐器/打击乐/歌手初始化器和它们所基于的引擎。ScoreDraft在启动时，根据脚本运行的位置搜索特定的几个目录来建立乐器采样、音源库的索引，并自动创建上面这些初始化器。这些初始化器的声明是动态代码块，在代码中是找不到的，但是使用却很方便，例如，您可以通过下面的代码来初始化一个大提琴乐器：\n\n```python\nCello1 = ScoreDraft.Cello()\n```\n\n### 乐器采样器\n\n乐器采样器引擎使用1个或多个wav文件作为样本来构造乐器。wav文件必须是1个或2个通道的16bit PCM格式。乐器采样器的算法是通过对样本的简单拉伸来改变音高的。因此使用的音频样本应具有足够的长度。\n\n#### 单采样\n\n用户可以使用ScoreDraft.InstrumentSampler_Single类来直接创建一个乐器，在创建时需要给出wav文件的路径，该路径或是绝对路径，或是相对于启动目录：\n\n```python\nflute = ScoreDraft.InstrumentSampler_Single('c:/samples/flute.wav')\n```\n\n你也可以把wav文件布署到启动位置下的 InstrumentSamples 目录中，这样ScoreDraft 就可以自动为你创建一个初始化器。去掉扩展名的文件名将作为初始化器的名字出现在 PrintCatalog 列表当中。\n\n#### 多采样\n\n用户可以使用 ScoreDraft.InstrumentSampler_Multi 类来直接创建一个乐器，在创建的时候需要给出一个包含全部用到的wav文件的目录路径。这些音频样本应覆盖一定的音高范围。 采样器将通过在这些音高之间基于目标音高来插值得到最终的合成结果。\n\n你也可以在 InstrumentSamples 目录下建立一个子目录来布署这些wav文件。，这样ScoreDraft 就可以自动为你创建一个初始化器。新建的子目录名将作为初始化器的名字出现在PrintCatalog列表当中。\n\n### SoundFont2 乐器\n\nScoreDraft 包含一个 SoundFont2 引擎。你可以通过 ScoreDraft.SF2Instrument 类来加载SoundFont音源。在使用 ScoreDraft.SF2Instrument 类创建一个乐器时，用户需要给出.sf2文件的路径，以及想要使用的preset的编号。\n\n```python\npiano = ScoreDraft.SF2Instrument('florestan-subset.sf2', 0)\n```\n\n函数ScoreDraft.ListPresetsSF2()可以用来得到一个.sf2文件中全部preset的列表：\n\n```python\nScoreDraft.ListPresetsSF2('florestan-subset.sf2')\n```\n\n你也可以把.sf2文件布署到启动位置下的 SF2 目录中，这样ScoreDraft 就可以自动为你创建一个初始化器。去掉扩展名的文件名将作为初始化器的名字出现在 PrintCatalog 列表当中。因为我们还需要知道使用哪个preset, 在使用这个初始化器的时候依然需要一个preset_index参数。\n\nSoundFont2 的支持来自于对 [TinySoundFont](https://github.com/schellingb/TinySoundFont)项目的移植，在此对作者Bernhard Schelling 表示感谢！\n\n### 打击乐采样器\n\n打击乐采样器引擎使用1个wav文件来构造打击乐器，wav文件必须是1个或2个通道的16bit PCM格式。打击乐采样器在使用样本时不做任何修改，直接添加包络。因此使用的音频样本应具有足够的长度。\n\n用户可以使用 ScoreDraft.PercussionSampler 类来直接创建一个打击乐器，在创建时需要给出wav文件的路径：\n\n```python\ndrum = ScoreDraft.PercussionSampler('./Drum.wav')\n```\n\n你也可以把wav文件布署到启动位置下的 PercussionSamples 目录中，这样ScoreDraft 就可以自动为你创建一个初始化器。去掉扩展名的文件名将作为初始化器的名字出现在PrintCatalog列表当中。\n\n### UtauDraft 引擎\n\nUtauDraft 引擎使用一个UTAU的音源目录来生成歌手。\n\n用户可以通过ScoreDraft.UtauDraft类来直接创建歌手，创建的时候需要给出UTAU音源的路径，同时可以给出一个bool值指定是否使用CUDA加速，该值默认为真，系统会在CUDA可以使用的情况下自动使用CUDA加速。如果需要禁用CUDA加速，则需传入一个\"False\":\n\n```python\ncz = ScoreDraft.UtauDraft('d:/CZloid', False)\n```\n\n你也可以把音源目录布署到启动位置下的 UTAUVoice 目录中，这样ScoreDraft 就可以自动为你创建一个初始化器。音源目录名将作为初始化器的名字出现在PrintCatalog列表当中。如果音源目录原来的名字不适合用作Python的变量名，那么用户应对目录名进行必要的修改以避免发生Python解析错误。\n\nUtauDraft 引擎试图尽可能支持UTAU的各种音源，包括单独音，连续音，VCV, CVVC等。引擎会读取音源的oto.ini和.frq来提取音源的特征。如果有prefix.map，引擎也会读取这个文件来进行样本音高的选择。\n\n当使用 UtauDraft 引擎时，歌唱片段中使用的歌词应以oto.ini中的定义为准，正如在UTAU中那样。使用单独音音源时，我们只需要直接使用这些歌词。\n\n当使用VCV或CVVC等类型的音源时，为了正确处理音节之间的过渡，同时简化歌词输入，用户需要选择一个拆音函数来使用。ScoreDraft目前提供了以下的拆音函数：\n\n* ScoreDraft.CVVCChineseConverter: for CVVChinese\n* ScoreDraft.XiaYYConverter: for XiaYuYao style Chinese\n* ScoreDraft.JPVCVConverter: for Japanese 連続音\n* ScoreDraft.TsuroVCVConverter: for Tsuro style Chinese VCV\n* ScoreDraft.TTEnglishConverter: for Delta style (Teto) English CVVC\n* ScoreDraft.VCCVEnglishConverter: for CZ style VCCV English\n\n拆音函数的使用方法如下所示, 只需调用singer.setLyricConverter(converter)即可：\n\n```python\nimport ScoreDraft\nAyaka = ScoreDraft.Ayaka_UTAU()\nAyaka.setLyricConverter(ScoreDraft.CVVCChineseConverter)\n```\n\n当使用CZ VCCV音源时，还需要调用一下singer.setCZMode()，让引擎使用特殊的方式来进行映射。\n\n拆音函数应具有以下的形式，如果上面列出的拆音函数无法满足需求，用户可以尝试编写自己的拆音函数：\n\n```python\ndef LyricConverterFunc(LyricForEachSyllable):\n    ...\n    return [(lyric1ForSyllable1, weight11, isVowel11, lyric2ForSyllable1, weight21, isVowel21...  ),(lyric1ForSyllable2, weight12, isVowel12, lyric2ForSyllable2, weight22, isVowel22...), ...]\n```\n\n输入参数'LyricForEachSyllable' 是歌唱片段中输入的歌词列表 [lyric1, lyric2, ...], 每个歌词 对应一个音节。拆音函数将每个输入歌词转换为1个或多个歌词，来瓜分原歌词的时值。输出的时候，要给每个 分解后的歌词设置一个权重，以指示分解后的歌词在原歌词的时值中所占的比例。另外还需要提供一个bool值isVowel表示分离出来的这个部分是否包含原音节的元音部分。\n\n\n## 乐器演奏\n\n用于乐器演奏的序列称为Note序列，Note序列中的元素是具有(rel_freq, duration) 形式的Python元组, rel_freq是浮点数，duration是整数.\n\n例子：\n\n```python\nseq=[(1.0, 48), (1.25, 48), (1.5,48)]\n```\n\n使用一个已有的Document对象 \"doc\"和某个乐器实例, 你可以像下面这样来演奏一个Note序列:\n\n```python\ndoc.playNoteSeq(seq, ScoreDraft.Piano())\n```\n\n<audio controls>\n    <source type=\"audio/mpeg\" src=\"DoMiSo.mp3\"/>\n</audio>\n\n浮点数rel_freq表示一个相对于当前Document参考频率的相对频率, Document的参考频率可以通过doc.setReferenceFreqeuncy()来设置，默认为261.626，单位是Hz.\n音长duration使用48代表一拍，在Document中可以通过doc.setTempo()设置速率，默认为80，单位为拍/秒。对于doc.setTempo()，也可以传入一组控制点，见“动态速率映射”部分。\n\n使用ScoreDraftNotes时，音符可以用较为直观的方式表示为：\n\n```python\nseq=[do(5,48), mi(5,48), so(5,48)]\n```\n\n七个音符函数 (do(),re(),mi(),fa(),so(),la(),ti()) 各自有两个整数参数，八度号octave和时长duration。时长值会直接pass给输出的元组，而相对频率rel_freq则由octave和音符函数本身决定。\noctave=5代表中心八度，因此do(5,48)的相对频率为1.0，而do(4,48)的相对频率为0.5。\n\n当rel_feq小于0时，该音符会被解释为一个特殊操作。取决于duration大于0或小于0，大于0时代表一个空拍，小于0时代表一个退格。 ScoreDraftNotes提供了两个函数BL(duration)和BK(duration)来生成这两个音符。退格功能非常有用，它使我们可以把多个音符叠加起来构成和弦，例如，下面是一个大三和弦：\n\n```python\nseq=[do(5,48), BK(48), mi(5,48), BK(48), so(5,48)]\n```\n\n<audio controls>\n    <source type=\"audio/mpeg\" src=\"DoMiSo2.mp3\"/>\n</audio>\n\n## 打击乐演奏\n\n对于打击乐演奏，首先您应该考虑选择哪些打击乐器来组成一个打击乐组。 例如，我选择低音鼓和小军鼓：\n\n```python\nBassDrum=ScoreDraft.BassDrum()\nSnare=ScoreDraft.Snare()    \nperc_list= [BassDrum, Snare]\n```\n\n用于打击乐演奏的序列称为Beat序列，Note序列中的元素是具有(percussion_index, duration) 形式的Python元组, 两个参数都是整数。percussion_index用来指示前面打击乐组中的某件打击乐器，duration与乐器演奏中的duration是相同概念。\n\n通常，我们会定义几个辅助函数来使Beat序列的编写变得直观：\n\n```python\ndef dong(duration=48):\n    return (0,duration)\n\ndef ca(duration=48):\n    return (1,duration)\n```\n\n使用上面两个函数，我们就可以用下面的方式来编写Beat序列了：\n\n```python\nseq = [dong(), ca(24), dong(24), dong(), ca(), dong(), ca(24), dong(24), dong(), ca()]\n```\n\n使用一个已有的Document对象 \"doc\"和打击乐组, 你可以像下面这样来演奏一个Beat序列:\n\n```python\ndoc.playBeatSeq(seq, perc_list)\n```\n\n<audio controls>\n    <source type=\"audio/mpeg\" src=\"test_perc.mp3\"/>\n</audio>\n\n## 唱歌\n\nScoreDraft 提供的唱歌界面与乐器/打击乐演奏界面比较类似。用于唱歌的序列称为Singing序列，它比Note序列要稍微复杂一些。例如：\n\n```python\nseq=[('yi',do(),'shan',do(),'yi',so(),'shan',so(),'liang',la(),'jing',la(),'jing',so(5,72)), BL(24) ]\nseq+=[('man',fa(),'tian',fa(),'dou',mi(),'shi',mi(),'xiao',re(),'xing',re(),'xing',do(5,72)), BL(24) ]\n```\n\n每个“歌唱片段”（由逗号分隔的第一级元组）包含一个或多个作为歌词的字符串。每个歌词后可以跟一个或多个元组，用来定义该歌词对应的音高。这些元组在最简单的情况下可以是和乐器音符相同的 (freq_rel, duration) 的形式。一个元组也可以包含更多的freq_rel/duration对，如(freq_rel1, duration1, freq_rel2, duration2, ...)，此时则定义了多个控制点, 控制点和控制点之间音高线性过渡，最后一个控制点之后的区间音高保持水平。元组之间不做音高插值。使用 ScoreDraft.Notes ，你可以把多个乐器音符用“+”连接，来构造一个音高折线，如do(5,24)+so(5,24)+do(5,0)，该音高折线有三个控制点，总时值为48。\n\n每个“歌唱片段”内的所有音节（歌词＋音符）都应连续演唱，除非遇到空拍 BL() 或倒退 BK()，那时系统将不得不把把一个歌唱片段分解成多个歌唱片段来处理。使用一个已有的Document对象 \"doc\"和某个歌手，歌唱命令类似下面这样：\n\n```python\ndoc.sing(seq, ScoreDraft.GePing_UTAU())\n```\n\n<audio controls>\n    <source type=\"audio/mpeg\" src=\"GePing.mp3\"/>\n</audio>\n\n分段线性的音高表示可以用来模拟rap。在ScoreDraft.RapChinese模块中提供了一个工具函数CRap()，可以用来帮助生成中文四声的Rap。使用实例如：\n\n```python\nseq= [ CRap(\"chu\", 2, 36)+CRap(\"he\", 2, 60)+CRap(\"ri\", 4, 48)+CRap(\"dang\", 1, 48)+CRap(\"wu\", 3, 48), BL(24)]\n```\n\n<audio controls>\n    <source type=\"audio/mpeg\" src=\"rap2.mp3\"/>\n</audio>\n\n## 动态速率映射\n\n```\ntempo_map=[(beat_position_1, dest_position_1), (beat_position_2, dest_position_2), ...]\n```\n\n用它来取代play()命令中的整数tempo, 可以将生成的音频精确地对齐到时间轴上。\n\n以上，beat_position_i 为整数，代表被演奏序列中的一个位置，它的单位和duration相同，48代表一拍。\n\ndest_position_i 为浮点数，代表生成音频的时间点，单位是毫秒。注意这里采用的是时间轴上的绝对位置。\n\n当tempo_map中存在beat_position_1=0时，生成的音频的起始点会自动对齐到dest_position_1。\n\n当tempo_map中不存在beat_position_1=0时，生成的音频的起始点以音轨缓存当前的光标位置为准。\n\n对于 beat_position_i， 通常我们建议使用ScoreDraft.TellDuration(seq)，通过测量序列的长度，方便地得到 beat_position_i 的值。\n\n对于 dest_position_i ，通常需要手动测量待对齐的音频（或视频）内容来得到。\n\n例子：\n\n```python\nseq=[do(),do(),so(),so(),la(),la(),so(5,96)]\nbuf = ScoreDraft.TrackBuffer()\npiano = ScoreDraft.Piano()\ntempo_map = [ (0, 1000.0), (ScoreDraft.TellDuration(seq), 5000.0) ]\npiano.play(buf, seq, tempo_map)\n```\n\n以上代码在生成音频时，会把音频的起点和终点精确对齐到1s和5s处。\n\n## 回放和可视化\n\nScoreDraft 目前提供两个播放器/可视化模块。\n\n### PCMPlayer\n\nScoreDraft.PCMPlayer 可以用来播放一个之前生成的TrackBuffer对象buf，可以显示窗口也可以不显示窗口。\n\n无窗口模式：\n\n```python\nplayer = ScoreDraft.PCMPlayer()\nplayer.play_track(buf)\n```\n\n这里play_track()是异步调用，这意味着这个函数在启动音频播放之后会立刻返回Python代码执行。 此时你可以继续提交新的播放。所有提交的音轨会组成队列依次播放。\n\n有窗口模式：\n\n```python\nplayer = ScoreDraft.PCMPlayer(ui = True)\nplayer.play_track(buf)\nplayer.main_loop()\n```\n\nui=True时必须要调用main_loop()来实现窗口交互响应，但是这样一来成了同步调用了。如果需要异步调用的话，则应使用ScoreDraft.AsyncUIPCMPlayer：\n\n```python\nplayer = ScoreDraft.AsyncUIPCMPlayer()\nplayer.play_track(buf)\n```\n\n或者更简单地：\n\n```python\nScoreDraft.PlayTrackBuffer(buf)\n```\n\n<image src =\"PCMPlayer1.png\"/>\n<image src =\"PCMPlayer2.png\"/>\n\nPCMPlayer 支持两种可视化模式，按“W”显示波形，按“S”显示频谱。\n\n### Meteor\n\nMeteor 可以用来可视化前面介绍过的各种序列，同时播放混合好的音轨。使用Meteor最简单的方法是用ScoreDraft.MeteorDocument代替ScoreDraft.Document来使用，该类包含ScoreDraft.Document中的所有接口，外加一个额外的方法 MeteorDocument.meteor(chn=-1). 如果你在旧的项目中使用ScoreDraft.Document，你只需要用ScoreDraft.MeteorDocument来替换它，然后在代码最后调用doc.meteor() 可视化器将会被激活。与 PlayTrackBuffer()不同，doc.meteor()是同步调用，代码会暂停执行，直到播放结束。\n\n<image src =\"Meteor.png\"/>\n\n## MusicXML 和 LilyPond 支持\n\nScoreDraft 通过 class MusicXMLDocument 支持MusicXML和LilyPond格式的输入。可以由一个MusicXML文件或LilyPond文件创建该对象。MusicXML:\n\n```python\ndoc = ScoreDraft.from_music_xml('xyz.xml')\n```\n\nLilyPond:\n\n```python\ndoc = ScoreDraft.from_lilypond('xyz.ly')\n```\n\n方法 playXML() 用于将音符播放到音轨当中：\n\n```python\ninstruments = [ScoreDraft.Piano()]\ndoc.playXML(instruments)\n```\n\n每个乐器对应于一个音轨（一行音符），当乐器数比音轨数少时，最后一个乐器会被使用多次。\n\nMusicXMLDocument 对象可以像其他文档对象一样使用，默认支持meteor.\n\n## 基于 YAML 格式的输入\n\n我们可以看出，使用 LilyPond 进行输入，相比于用 Python 录入序列要更为简洁、容易。但是，LilyPond 的语法非常复杂，解析起来并不容易。前面的例子中，ScoreDraft 在内部使用了 python_ly 库，把 ly 转换成 MusicXML，再读取 MusicXML 进行合成。这个转换过程并不是很可靠，遇到复杂的 ly 文件会出问题。此外，还有一些对于合成过程有用的信息，是无法包含在 LilyPond 和 MusicXML 文件当中的，导致我们还需要在Python代码中对引擎进行一些额外的设置。\n\n显然，我们可以在“人类可读性”和“机器可读性”中间寻求某种折中。这里提出一种方案，使用 YAML 作为外层结构描述，并内嵌 LilyPond 代码片段来输入音符。这样折中之后，我们就可以把音乐合成所需的全部信息放入到一个YAML文件中。\n\n```yaml\n# exmaple 1\nscore:\n    tempo: 150\n    staffs:\n        - \n            relative: c''\n            instrument: Arachno(40)\n            content: |\n                r4 g c d \n                e2 e2\n                r4 e dis e\n                d2 c2\n                r4 c d e\n                f2 a2\n                r4 a g f\n                e2. r4\n        -\n            relative: c\n            instrument: Arachno(0)\n            content: |\n                \\clef \"bass\"\n                c g' <c e> g\n                c, g' <bes e> g\n                c, g' <bes e> g\n                f c' <e a> c\n                f, c' <e a> c\n                g d' <f b> d\n                g, d' <f b> d\n                c, g' <b e>2\n```\n\n<audio controls>\n    <source type=\"audio/mpeg\" src=\"example1.mp3\"/>\n</audio>\n\nscore 是最顶层对象，包含全部内容。第二层包括全局设置和 staffs 列表。\n\n每个 staff 定义一行音符，以及如何合成这行音符。instrument 属性告诉 Python 如何初始化用来合成这行音符的乐器。它的值本身是有效的Python代码，ScoreDraft在内部会使用exec() 来执行这个代码。这里 Arachano 是一个 SoundFont2 音色库，我们事先把它部署在 SF2 目录下面。括号内的编号代表音色序号，如40号是小提琴，0号是钢琴。\n\ncontent 是一个多行字符串，主要包含LilyPond音符。\n\n从版本 1.0.3 开始，加入了一个命令行指令 scoredraft，用来处理 YAML 输入。用法如下：\n\n```\nusage: scoredraft [-h] [-ly LY] [-wav WAV] [-meteor METEOR] [-run] yaml\n\npositional arguments:\n  yaml            input yaml filename\n\noptional arguments:\n  -h, --help      show this help message and exit\n  -ly LY          output lilyond filename\n  -wav WAV        output wav filename\n  -meteor METEOR  output meteor filename\n  -run            run meteor\n```\n\n使用 -ly 参数，可以把YAML文件转成一个正常的 LilyPond 文件，可以进一步完善后发布。除了音符以外的更多信息则将会传递给合成引擎用于合成过程，而这些信息大多不会记录在LilyPond文件中。\n\n![](workflow.png)\n\n上图显示了 scoredraft 内部的工作流程。从原理上，只要是对合成过程有用的信息我们都可以把它包含到 YAML 文件里。例如，可以用如下方法加入踏板控制信息：\n\n```yaml\n# exmaple 2\nscore:\n    tempo: 150\n    staffs:\n        - \n            relative: c''\n            instrument: Arachno(40)\n            content: |\n                r4 g c d \n                e2 e2\n                r4 e dis e\n                d2 c2\n                r4 c d e\n                f2 a2\n                r4 a g f\n                e2. r4\n        -\n            relative: c\n            instrument: Arachno(0)\n            content: |\n                \\clef \"bass\"\n                c g' <c e> g\n                c, g' <bes e> g\n                c, g' <bes e> g\n                f c' <e a> c\n                f, c' <e a> c\n                g d' <f b> d\n                g, d' <f b> d\n                c, g' <b e>2\n\n            pedal: |\n                bd1\n                bd1\n                bd1\n                bd1\n                bd1\n                bd1\n                bd1\n                bd1\n```\n\n<audio controls>\n    <source type=\"audio/mpeg\" src=\"example2.mp3\"/>\n</audio>\n\nLilyPond 其实是有专门的踏板指令的，但是没有工具可以可靠地把这个信息转换成 MusicXML。因此，在YAML中我们用一个打击乐序列来表示踏板的运动，这里bd本来是用来表示底鼓的，使用其他打击乐也没有问题，毕竟踏板只需要一个开关信息。\n\n在吉他轨中，我们经常希望在和弦音中加入一个微小的延迟，用来模拟扫弦效果。在YAML中我们只要加入一个sweep属性就可以在合成过程中自动模拟这个效果。\n\n```yaml\n# exmaple 3\nscore:\n    tempo: 150\n    staffs:\n        - \n            relative: c''\n            instrument: Arachno(40)\n            content: |\n                r4 g c d \n                e2 e2\n                r4 e dis e\n                d2 c2\n                r4 c d e\n                f2 a2\n                r4 a g f\n                e2. r4\n        -\n            relative: c\n            instrument: Arachno(24)\n            sweep: 0.1\n            content: |\n                \\clef \"bass\"\n                c4 e <g c e>2\n                c,4 e <g bes e>2\n                c,4 e <g bes e>2\n                f,4 a <e' a c>2\n                f,4 a <e' a c>2\n                g,4 b <d g b>2\n                g,4 b <d g b>2\n                c4 e <g b e>2\n```\n\n<audio controls>\n    <source type=\"audio/mpeg\" src=\"example3.mp3\"/>\n</audio>\n\nsweep: 0.1 告诉 ScoreDraft 在和弦音中加入10% 的延迟。\n\n要加入打击乐的话，只需要设置 is_drum: true，然后就可以在 content 里使用打击乐音符了。\n\n```yaml\n# exmaple 4\nscore:\n    tempo: 150\n    staffs:\n        - \n            relative: c''\n            instrument: Arachno(40)\n            content: |\n                r4 g c d \n                e2 e2\n                r4 e dis e\n                d2 c2\n                r4 c d e\n                f2 a2\n                r4 a g f\n                e2. r4\n        -\n            relative: c\n            instrument: Arachno(24)\n            sweep: 0.1\n            content: |\n                \\clef \"bass\"\n                c4 e <g c e>2\n                c,4 e <g bes e>2\n                c,4 e <g bes e>2\n                f,4 a <e' a c>2\n                f,4 a <e' a c>2\n                g,4 b <d g b>2\n                g,4 b <d g b>2\n                c4 e <g b e>2\n\n        -\n            is_drum: true\n            instrument: Arachno(128)\n            content: |\n                bd4 hh sn hh\n                bd hh sn hh\n                bd hh sn hh\n                bd hh sn hh\n                bd hh sn hh\n                bd hh sn hh\n                bd hh sn hh\n                bd hh sn hh\n```\n\n<audio controls>\n    <source type=\"audio/mpeg\" src=\"example4.mp3\"/>\n</audio>\n\n对于鼓轨来说，instrument 必须是一个GM鼓乐器，如我们这里设置的 Arachno(128)。\n\n歌唱合成也可以在YAML中进行编写。\n\n```yaml\n# example 5\nscore:\n    tempo: 150\n    staffs:\n        -\n            relative: c'\n            is_vocal: true\n            singer: TetoEng_UTAU()\n            converter: TTEnglishConverter            \n            content: |\n                r4 g c d \n                e2 e2\n                r4 e dis e\n                d4 (c) c2\n                r4 c d e\n                f2 g4 (a)\n                r4 a g f\n                e2. r4\n            utau: |\n                ju Ar maI\n                s@n SaIn.\n                maI oU nli\n                s@n SaIn.\n                ju meIk mi\n                h{p i.\n                wEn skaIz Ar\n                greI.\n\n        -\n            relative: c\n            instrument: Arachno(0)\n            content: |\n                \\clef \"bass\"\n                c g' <c e> g\n                c, g' <bes e> g\n                c, g' <bes e> g\n                f c' <e a> c\n                f, c' <e a> c\n                g d' <f b> d\n                g, d' <f b> d\n                c, g' <b e>2\n\n            pedal: |\n                bd1\n                bd1\n                bd1\n                bd1\n                bd1\n                bd1\n                bd1\n                bd1\n\n        -\n            is_drum: true\n            instrument: Arachno(128)\n            content: |\n                bd4 hh sn hh\n                bd hh sn hh\n                bd hh sn hh\n                bd hh sn hh\n                bd hh sn hh\n                bd hh sn hh\n                bd hh sn hh\n                bd hh sn hh\n```\n\n<audio controls>\n    <source type=\"audio/mpeg\" src=\"example5.mp3\"/>\n</audio>\n\n首先，设置 is_vocal: true。第二，设置一个 singer 属性代替 instrument 属性。在多数情况下，还要设置一个converter属性来设置歌词转换器。如果使用的是CZ式VCCV的话，还需要设置 CZMode: true。第三，添加一个 utau 属性来加入音标。音节之间用空格分隔，每句话结尾加一个点。除了这个句尾点之外，content 代码中的休止符 r 也标志着一句话的结束。每个音节默认对应一个音符，如果需要对应多个音符则需要加入连音线。\n\n### 属性参考\n\n目前，ScoreDraft 在 YAML 格式中识别的属性并不多，上面基本上都提到了。这里给出一个完整的列表。\n\n#### score\n\n顶层对象\n\n#### tempo\n\n全局属性，定义速率，单位BPM\n\n#### title\n\n曲谱标题\n\n#### composer\n\n曲谱作者\n\n#### staffs\n\n音轨表\n\n#### content\n\n音轨属性，包含嵌入的LilyPond代码。原则上可以包含任何 LilyPond 代码。在使用 -ly 命令行参数时，这些代码会被直接输出到 ly 文件中。但是，对于合成器来说，只有一小部分 LilyPond 语法是有意义的。除了基本的音符之外，<> 和弦标记和 ()连音标记会被识别。连音标记对于歌唱合成有用。\n\n#### is_drum\n\n音轨属性，表示当前音轨是否是鼓轨。\n\n#### is_vocal\n\n音轨属性，表示当前音轨是否是歌声。\n\n当 is_drum 和 is_vocal 都没有被设置时，当前轨默认为乐器轨。\n\n#### relative\n\n音轨属性，用于乐器和歌唱轨，表示 content 里的音符是相对模式。\n\n#### instrument\n\n音轨属性，用于乐器和鼓轨，表示乐器信息。\n\n属性值应为用来调用乐器初始化器所需的 Python 代码。\n\n对于鼓轨，该乐器应为GM鼓乐器。\n\n#### pedal\n\n音轨属性，用于乐器轨中控制延音踏板。属性值用打击乐的语法来编写，可以使用任何一种打击乐音符。支持休止符。\n\n#### sweep\n\n音轨属性，用于乐器轨中，为和弦音添加一个延迟来模拟吉他扫弦效果。\n\n#### singer\n\n音轨属性，用于歌唱轨中，表示歌手信息。\n\n属性值应为用来调用歌手初始化器所需的Python代码。\n\n#### converter\n\n音轨属性，用于歌唱轨中，提供歌词转换器信息。\n\n属性值应为该歌词转换器的 Python 变量名。\n\n#### CZMode\n\n音轨属性，用于歌唱轨中，表示当前歌手是否是CZ VCCV模式的。\n\n#### utau\n\n音轨属性，用于歌唱轨中，包含每个音节的 UTAU 音标。音节用空格分隔，句尾加一个点。\n\n#### volume\n\n音轨属性，试用于任何音轨。用于混音器的音量值。\n\n#### pan\n\n音轨属性，试用于任何音轨。用于混音器的偏移值。\n"
  },
  {
    "path": "docs/intro_eng.md",
    "content": "# Introduction to ScoreDraft\n\nThe source-code of ScoreDraft is hosted on [GitHub](https://github.com/fynv/ScoreDraft), where you can always find the latest changes that I have made.\n\nPyPi packages for Windows x64 & Linux x64 are available for download by\n\n```\npip install scoredraft\n```\n\nThis document will introduce the uses of each basic elements of ScoreDraft.\n\n## HelloWorld Example (using TrackBuffer)\n\nLet's start from a minimal example to explain the basic usage and design ideas of ScoreDraft.\n\n```python\nimport ScoreDraft\nfrom ScoreDraft.Notes import *\n\nseq=[do(),do(),so(),so(),la(),la(),so(5,96)]\n\nbuf=ScoreDraft.TrackBuffer()\nScoreDraft.KarplusStrongInstrument().play(buf, seq)\nScoreDraft.WriteTrackBufferToWav(buf,'twinkle.wav')\n```\n\n<audio controls>\n    <source type=\"audio/mpeg\" src=\"twinkle.mp3\"/>\n</audio>\n\n### Play Calls\n\n```python\nScoreDraft.KarplusStrongInstrument().play(buf, seq)\n```\n\nAs the most important interface design of ScoreDraft, \"Play Calls\" is a class of commands of the form:\n\n```python\ninstrument.play(buf,seq)\n```\n\nwhich simply means, play sequence **seq** with the instrument and write the resulted waveform to \"buf\".\n\nSimilarly, you can also use a percussion group to play or use a \"singer\" to sing. We will use the term **Play Call** to refer to any command of these sorts.\n\nWe will sometimes pass in tempo and reference frequency parameters into a **Play Call**. There are built-in default values for these parameters so they are not compulsory.\n\n### Imports\n\n```python\nimport ScoreDraft\nfrom ScoreDraft.Notes import *\n```\n\nThe first thing to do is to import \"ScoreDraft\"  package, which provides the core Python interfaces of ScoreDraft.\n\nMost application code will also import the note definitions from the \"ScoreDraft.Notes\" module. In fact, the core interface of ScoreDraft does not include any specific definition of musical notes. It simply accepts a physical frequency **f_ref** in Hz as a reference frequency for each **Play Call**, and a  relative frequency **f_rel[i]**, which is just a multiplier, for each note. The physical frequency of each **f_note[i]** can be then calculated by:\n\n```\nf_note[i] = f_ref *f_rel[i].\n```\n\nIn the note definition module **ScoreDraft.Notes**, a bunch of note functions do(), re(), mi(), fa() are defined to convert musical language to physical numbers. These functions are really simple in nature, thus allowing user to easily modify or extend for special purposes, such as when an alternative tuning (other than 12-equal-temperament) is desirable.\n\n### Score Representation\n\n```python\nseq=[do(),do(),so(),so(),la(),la(),so(5,96)]\n```\n\nThe score itself is represented as a set of Python lists, called sequences. How theses sequences are formed will be explained in the succeeding sections.\n\nThe elements of the sequences are processed consecutively, but generated sound can overlap with each other by containing backspace operations in the sequences.\n\nBecause the sequences are just Python lists in nature, the full function set of Python can be utilized to automate the score authoring work. Explaining those tricks may require a separate document.\n\n### TrackBuffer\n\n```python\nbuf=ScoreDraft.TrackBuffer()\n```\n\nScoreDraft uses track-buffers to store wave-forms. A track-buffer can be used as either an intermediate storage for synthesis result or the final buffer for the mix-down result of several intermediate buffers.\n\nThe package ScoreDraft provides a class TrackBuffer, which is a direct encapsulation of the C++ interface. Comparing to the class Document (to be introduced later), class TrackBuffer is a low-level interface.\n\n## HelloWorld Example (using Document)\n\n```python\nimport ScoreDraft\nfrom ScoreDraft.Notes import *\n\ndoc=ScoreDraft.Document()\n\nseq=[do(),do(),so(),so(),la(),la(),so(5,96)]\n\ndoc.playNoteSeq(seq, ScoreDraft.KarplusStrongInstrument())\ndoc.mixDown('twinkle.wav')\n```\n\nMost musical pieces need multiple track-buffers. The class ScoreDraft.Document is provided as an unified track-buffer manager, and it is more recommended than using **ScoreDraft.TrackBuffer** directly.\n\nAs shown in the above example, using class Document is accompanied by some changes in the writing style of the Play Calls. When issuing a **Play Call** through the class Document, the target track-buffer is always implicated, so a parameter is not necessary anymore. At the same time, the instrument used for playing becomes a parameter. The format now looks like doc.play(seq,instrument) instead of instrument.play(buf,seq).\n\nThere are a few benefits. First, it simplifies the creation of track-buffers, the document object can do that for you implicitly during Play Calls. Second, it largely simplifies the mixdown call. You don't need to enumerate all the track-buffer to be mixed when they are managed insides the document object. Third, visualization component can exploit polymorphism by replacing the Document class with an extended version. For example, the Meteor visualizer can be enabled with minimal effort by replacing **ScoreDraft.Document** with **ScoreDraft.MeteorDocument**.\n\nThe class Document also manages tempo and reference frequency parameters internally, so we don't pass them through the Play Calls anymore in this case.\n\n## Initialization of Intruments/Percussions/Singers\n\nUser can always run the PrintCatalog.py to get a list of all available instrument/percussion/singer initializers. \n\n```python\n# PrintCatalog.py\nimport ScoreDraft\nScoreDraft.PrintCatalog()\n```\n\nThe output will look like:\n\n```\n{\n  \"Engines\": [\n    \"KarplusStrongInstrument - Instrument\",\n    \"InstrumentSampler_Single - Instrument\",\n    \"InstrumentSampler_Multi - Instrument\",\n    \"PercussionSampler - Percussion\",\n    \"SF2Instrument - Instrument\",\n    \"UtauDraft - Singing\"\n  ],\n  \"Instruments\": [\n    \"Ah - InstrumentSampler_Single\",\n    \"Cello - InstrumentSampler_Single\",\n    \"CleanGuitar - InstrumentSampler_Single\",\n    \"Lah - InstrumentSampler_Single\",\n    \"String - InstrumentSampler_Single\",\n    \"Violin - InstrumentSampler_Single\",\n    \"Arachno - SF2Instrument\",\n    \"SynthFontViena - SF2Instrument\"\n  ],\n  \"Percussions\": [\n    \"BassDrum - PercussionSampler\",\n    \"ClosedHitHat - PercussionSampler\",\n    \"Snare - PercussionSampler\",\n  ],\n  \"Singers\": [\n    \"Ayaka_UTAU - UtauDraft\",\n    \"GePing_UTAU - UtauDraft\",\n    \"jklex_UTAU - UtauDraft\",\n    \"uta_UTAU - UtauDraft\",\n  ]\n}\n```\n\nThe first list **Engines** gives a list of names of available engines and the type of engine (is it an instrument or percussion or singing engine?).\n\nThe 3 succeeding lists gives names of ready-to-use instrument/percussion/singer initializers and the engines they are based on. ScoreDraft creates these initializers automatically at starting time by searching some specific directories for samples/banks based on the starting place of the Python script.\n\nThe definitions of the initializers are dynamic code blocks, you cannot find them in the source-code. However, using them is simple. For example you can initialize a Cello instrument by:\n\n```python\nCello1 = ScoreDraft.Cello()\n```\n\n### Instrument Sampler\n\nThe instrument sampler engine uses one or multiple wav files as the input to create an instrument. The .wav files must have one or two channels in 16bit PCM format. The algorithm of the instrument sampler is by simply stretching the sample audio and adding a envelope. So be sure that the samples have sufficient lengths.\n\n#### Single-sampling\n\nYou can use the class **ScoreDraft.InstrumentSampler_Single** to create an instrument directly. At creation time, you need to provide a path to the wav file. The path can be either absolute path or relative to the starting folder.\n\n```python\nflute = ScoreDraft.InstrumentSampler_Single('c:/samples/flute.wav')\n```\n\nYou can also put the wav files into the **InstrumentSamples** directory under the starting directory so that ScoreDraft can create an initializer for you automatically. The file name without extension will appear as the initializer name in the PrintCatalog lists.\n\n#### Multi-sampling\n\nYou can use the class ScoreDraft.InstrumentSampler_Multi to create an instrument directly.  At creation time, you need to provide a path to a folder containing all the wav files of an instrument. The audio samples should span a range of different pitches. The sampler will generate notes by intepolating between the samplers according to the target pitch.\n\n```python\nguitar = ScoreDraft.InstrumentSampler_Multi('c:/samples/guitar')\n```\n\nYou can also create a subdirectory under the **InstrumentSamples** directory and put in all the wav files for the instrument. Then ScoreDraft will automatically create an initializer for you using the subdirectory name as the initializer name, which will appear in the PrintCatalog lists.\n\n### SoundFont2 Instruments\n\nScoreDraft contains a SoundFont2 engine. You can use the class **ScoreDraft.SF2Instrument** to load a SoundFont. Just provide the path to the .sf2 file and the index of the preset you want to use:\n\n```python\npiano = ScoreDraft.SF2Instrument('florestan-subset.sf2', 0)\n```\n\nThe function ScoreDraft.ListPresetsSF2() can be used to obtain a list of all available presets in a .sf2 file:\n\n```python\nScoreDraft.ListPresetsSF2('florestan-subset.sf2')\n```\n\nYou can also put the .sf2 file into the **SF2** directory under the starting directory so that ScoreDraft will create an initializer for you automatically. The file name without extension will appear as the initializer name in the PrintCatalog lists. Because we need to know which preset to use, a preset_index parameter is still needed when calling the initializer.\n\nSoundFont2 support is based on a porting of [TinySoundFont](https://github.com/schellingb/TinySoundFont) Here I acknowledge Bernhard Schelling for the work!\n\n### Percussion Sampler\n\nThe percussion sampler engine uses one wav file as the input to create a percussion. The .wav files must have one or two channels in 16bit PCM format. The algorithm of the percussion sampler is by simply adding a envelope. So be sure that the samples have sufficient lengths.\n\nYou can use the class ScoreDraft.PercussionSampler to create a percussion directly. At creation time, you need to provide a path to the wav file.\n\n```python\ndrum = ScoreDraft.PercussionSampler('./Drum.wav')\n```\n\nYou can also put the wav files into the **PercussionSamples** directory under the starting directory so that ScoreDraft can create an initializer for you automatically. The file name without extension will appear as the initializer name in the PrintCatalog lists.\n\n### UtauDraft Engine\n\nThe UtauDraft engine uses a UTAU voicebank to create a singer.\n\nYou can use the class ScoreDraft.UtauDraft directly. At creation time, you need to provide a path to the UTAU voicebank, and optionally a bool value indicating whether to use CUDA acceleration or not. The default is use CUDA acceleration when available. Pass in a **False** to disable it without attempting.\n\n```python\ncz = ScoreDraft.UtauDraft('d:/CZloid', False)\n```\n\nYou can also put the voicebank folder into the **UTAUVoice** directory under the starting directory so that ScoreDraft can create an initializer for you automatically. The subdirectory name + \"_UTAU\" will apprear as the initializer name in the PrintCatalog lists. (The \"_UTAU\" posfix exists for some historical reason). If the original sub-folder name is unsuitable to be used as an Python variable name, then you should rename it to prevent a Python error. \n\nThe UtauDraft Enigine tries to be compatible with all kinds of UTAU voice-banks, including 単独音,連続音, VCV, CVVC as much as possible. oto.ini and .frq files will be used to understand the audio samples. prefix.map will also be used when one is present.\n\nWhen using UtauDraft Engine, for 単独音, you can use the names defined in oto.ini as lyrics, just like in UTAU.\n\nFor other types of voicebanks, in order to tackle transitions correctly as well as simplifying the lyric input, user should choose one of the lyric-converters to use. Currently there are:\n\n* ScoreDraft.CVVCChineseConverter: for CVVChinese\n* ScoreDraft.XiaYYConverter: for XiaYuYao style Chinese\n* ScoreDraft.JPVCVConverter: for Japanese 連続音\n* ScoreDraft.TsuroVCVConverter: for Tsuro style Chinese VCV\n* ScoreDraft.TTEnglishConverter: for Delta style (Teto) English CVVC\n* ScoreDraft.VCCVEnglishConverter: for CZ style VCCV English\n\nFor setting lyric converter just call **singer.setLyricConverter(converter)**, for example:\n\n```python\nimport ScoreDraft\nTeto = ScoreDraft.TetoEng_UTAU()\nTeto.setLyricConverter(ScoreDraft.TTEnglishConverter)\n```\n\nFor CZ style VCCV, you need one more call: singer.setCZMode() to let the engine use a special mapping method.\n\nThe converter functions are defined in the following form, write your own if the above converters does not meet you requirements:\n\n```python\ndef LyricConverterFunc(LyricForEachSyllable):\n    ...\n    return [(lyric1ForSyllable1, weight11, isVowel11, lyric2ForSyllable1, weight21, isVowel21...  ),(lyric1ForSyllable2, weight12, isVowel12, lyric2ForSyllable2, weight22, isVowel22...), ...]\n```\n\nThe argument 'LyricForEachSyllable' has the form [lyric1, lyric2, ...], where each lyric is a string, which is the input lyric of a syllable.\n\nThe converter function should convert 1 input lyric into 1 or more lyrics to split the duration of the original syllable. A weight value should be provided to indicate the ratio or duration of the converted note. A bool value \"isVowel\" need to be provided to indicate whether it contains the vowel part of the syllable.\n\n\n## Instrument Play\n\nThe kind of sequence used for instrument play is called note sequence. Note sequences are Python lists consisting of tuples in (rel_freq, duration) form, where \"rel_freq\" is a float and \"duration\" an integer.\n\nFor example:\n\n```python\nseq=[(1.0, 48), (1.25, 48), (1.5,48)]\n```\n\nWith an existing document object \"doc\", you can \"play\" the sequence using some instrument like following:\n\n```python\ndoc.playNoteSeq(seq, ScoreDraft.Piano())\n```\n\n<audio controls>\n    <source type=\"audio/mpeg\" src=\"DoMiSo.mp3\"/>\n</audio>\n\nThe float \"rel_freq\" is a relative frequency relative to the reference frequency stored in the document object, which can be set with doc.setReferenceFreqeuncy(), and defaulted to 261.626(in Hz).\n\nThe duration of a note is \"1 beat\" when the integer value \"duration\" equals 48. The document objects manages a tempo value in beats/minute, which can be set using doc.setTempo(), and defaulted to 80. It is also allowed to feed doc.setTempo() with a series of control points, which builds a **Dynamic Tempo Mapping**, which is to be discussed later.\n\nWhen **ScoreDraft.Notes** is imported, we can write the note sequences in a more musically intuitive way:\n\n```python\nseq=[do(5,48), mi(5,48), so(5,48)]\n```\n\nThe note functions have intuitive names (do(),re(),mi(),fa(),so(),la(),ti()), and they take in 2 integer parameters, octave and duration. The return values are tuples. While the duration parameter is directly passed to the duration component of the returned tuple, the rel_freq component of the tuple is decided by the octave value plus the note function itself. The default octave is 5, which means the center octave. For example, the returned rel_freq of \"do(5,48)\" will be \"1.0\", and rel_freq of \"do(4,48)\" will be \"0.5\".\n\nWhen rel_freq < 0.0, ScoreDraft will treat the note as some special marker, depending on whether duration>0 or duration<0. When duration>0, it means a rest. When duration<0, it means a backspace. **ScoreDraft.Notes** provides 2 functions **BL(duration)** and **BK(duration)** to formalize these uses. Backspaces are very useful, because when cursor moves backwards, the next notes will be possible to overlap with the previous notes, making representation of chords possible. For example, a major triad can be written like:\n\n```python\nseq=[do(5,48), BK(48), mi(5,48), BK(48), so(5,48)]\n```\n\n<audio controls>\n    <source type=\"audio/mpeg\" src=\"DoMiSo2.mp3\"/>\n</audio>\n\n## Percussion Play\n\nFor percussion play, first you should consider what percussions to choose to build a percussion group. For example, I choose BassDrum and Snare:\n\n```python\nBassDrum=ScoreDraft.BassDrum()\nSnare=ScoreDraft.Snare()    \nperc_list= [BassDrum, Snare]\n```\n\nThe kind of sequence used for percussion play is called beat sequence. Beat sequences are consisted of tuples in (percussion_index, duration) form. Both \"percussion_index\" and \"duration\" are integers, where \"percussion_index\" refers to the index in the \"perc_list\" defined above, and \"duration\" is the same as instrument play.\n\nOften, we want to define some utility functions to make the writing of beat sequences more intuitive:\n\n```python\ndef dong(duration=48):\n    return (0,duration)\n\ndef ca(duration=48):\n    return (1,duration)\n```\n\nNow you can use the above 2 functions to build a beat sequence like:\n\n```python\nseq = [dong(), ca(24), dong(24), dong(), ca(), dong(), ca(24), dong(24), dong(), ca()]\n```\n\nWith an existing document object \"doc\", you can \"play\" the sequence using \"perc_list\" like:\n\n```python\ndoc.playBeatSeq(seq, perc_list)\n```\n\n<audio controls>\n    <source type=\"audio/mpeg\" src=\"test_perc.mp3\"/>\n</audio>\n\n## Singing\n\nScoreDraft provides a singing interface similar to instrument and percussion play. The kind of sequence used for singing is called singing sequence. A singing sequence is a little more complicated than a note sequence. For example:\n\n```python\nseq = [ (\"mA\", mi(5,24), \"mA\", re(5,24), mi(5,48)), BL(24)]\nseq +=[ (\"du\",mi(5,24),\"ju\", so(5,24), \"rIm\", la(5,24), \"Em\", mi(5,12),re(5,12), \"b3\", re(5,72)), BL(24)]\n```\n\nEach singing segment contains one or more lyric as a string, each followed by one or more tuples to define the pitch corresponding to the leading lyric. In the simplest case, one of the tuples can be the same form as an instrument note: (freq_rel, duration). The tuple can also contain multiple freq_rel/duration pairs to define multiple control-points, like (freq_rel1, duration1, freq_rel2, duration2, ...). In that case, pitches will be linearly interpolated between control points, and the last control point defines a period of flat pitch. Pitches are not interpolated between tuples. Using **ScoreDraft.Notes** definitions, you can define a piece-wise pitch curve by concatenating multiple instrument notes, like do(5,24)+so(5,24)+do(5,0), which defines a pitch curve of 3 control points and a total duration of 48.\n\nAll lyrics and notes in the same singing segment are intended to be sung continuously. However, when there are rests/backspaces, the singing-segment will be broken into multiple segments to sing. The singing command looks like following, with an existing \"doc\" and some singer:\n\n```python\n# Teto = ScoreDraft.TetoEng_UTAU()\n# Teto.setLyricConverter(ScoreDraft.TTEnglishConverter)\ndoc.sing(seq, Teto)\n```\n\n<audio controls>\n    <source type=\"audio/mpeg\" src=\"cvvc.mp3\"/>\n</audio>\n\nThe piece-wise formed pitch curve can be used to simulate rapping. There is an utility CRap() defined in ScoreDraftRapChinese.py to help to generate the tones of Mandarin Chinese (the 4 tones). An example using CRap():\n\n```python\nseq= [ CRap(\"chu\", 2, 36)+CRap(\"he\", 2, 60)+CRap(\"ri\", 4, 48)+CRap(\"dang\", 1, 48)+CRap(\"wu\", 3, 48), BL(24)]\n```\n\n<audio controls>\n    <source type=\"audio/mpeg\" src=\"rap2.mp3\"/>\n</audio>\n\n## Dynamic Tempo Mapping\n\nDynamic tempo mapping is used to accurately define the timeline position and tempo of the generated sound.\n\nIt works by replacing the tempo term of a Play Call with a Python list of the following form:\n\n```\ntempo_map=[(beat_position_1, dest_position_1), (beat_position_2, dest_position_2), ...]\n```\n\nbeat_position_i is a integer that represent a position in the input sequence. It has the same unit as the duration term, where 1 beat is represented by 48.\n\ndest_position_i is a floating point that represent a absolute position on the destination timeline, in the unit of milliseconds.\n\nWhen there is beat_position_1=0, the starting point of the generated waveform will be aligned with dest_position_1.\n\nWhen there is not beat_position_1=0, the starting point of the generated waveform is decided by the current cursor position of the destination track buffer.\n\nFor beat_position_i, it is suggested to calculate it by calling ScoreDraft.TellDuration(seq), which measures the length of the sequence seq.\n\nFor dest_position_i, we often need to measure the target material (audio/video) that we are aligning to, manually.\n\nFor example:\n\n```python\nseq=[do(),do(),so(),so(),la(),la(),so(5,96)]\nbuf = ScoreDraft.TrackBuffer()\npiano = ScoreDraft.Piano()\ntempo_map = [ (0, 1000.0), (ScoreDraft.TellDuration(seq), 5000.0) ]\npiano.play(buf, seq, tempo_map)\n```\n\nThe about code will generate the sound accurately aligned to the 1s ~ 5s.\n\n## Playback & Visualization\n\nScoreDraft now contains 2 players/visualizers.\n\n### PCMPlayer\n\n**ScoreDraft.PCMPlayer** can be used to play a previously generate TrackBuffer object **buf**, with or without a display window.\n\nFor windowless use:\n\n```python\nplayer = ScoreDraft.PCMPlayer()\nplayer.play_track(buf)\n```\n\nHere **play_track()** is an asynchronized call, which means that it will return immediately to execute the succeeding Python code after the playback is started. You can continue to submit more track-buffers to be played-back. The track-buffers will be queued and played-back consecutively.\n\nFor visualzied use:\n\n```python\nplayer = ScoreDraft.PCMPlayer(ui = True)\nplayer.play_track(buf)\nplayer.main_loop()\n```\n\n**main_loop()** has to be called in order to make the UI interactive. However, that will make it a synchronized call. If an asynchronized behavior is required, you should instead use **ScoreDraft.AsyncUIPCMPlayer**:\n\n```python\nplayer = ScoreDraft.AsyncUIPCMPlayer()\nplayer.play_track(buf)\n```\n\nOr more simply:\n\n```python\nScoreDraft.PlayTrackBuffer(buf)\n```\n\n<image src =\"PCMPlayer1.png\"/>\n<image src =\"PCMPlayer2.png\"/>\n\nPCMPlayer supports 2 visualization modes:\n\n* Press 'W' to show waveform\n* Press 'S' to show spectrum\n\n### Meteor\n\nMeteor can be used to visualize all kinds of sequences while playing-back the mixed track. The easiest way to use Meteor is to use ScoreDraft.MeteorDocument instead of ScoreDraft.Document.The definition of ScoreDraft.MeteorDocument contains all interface as the one defined in ScoreDraft.Document, plus an extra method MeteorDocument.meteor(chn=-1). If you are using ScoreDraft.Document in your old project, you just need to use Meteor.Document to replace it, and call doc.meteor() at the end of the code, the visualizer will thus be activated. Unlike PlayTrackBuffer(), doc.meteor() is a synchronized call. The execution will be blocked until the end of play-back.\n\n<image src =\"Meteor.png\"/>\n\n## MusicXML & LilyPond Support\n\nScoreDraft supports MusicXML & LilyPond through **class MusicXMLDocument**. It can be created from a MusicXML file:\n\n```python\ndoc = ScoreDraft.from_music_xml('xyz.xml')\n```\n\nor from a LilyPond file:\n\n```python\ndoc = ScoreDraft.from_lilypond('xyz.ly')\n```\n\nTo play the notes into the track-buffers, use the **playXML()** method:\n\n```python\ninstruments = [ScoreDraft.Piano()]\ndoc.playXML(instruments)\n```\n\nEach instrument is aligned to a track (staff). If there are fewer instruments than tracks, the last instrument will be used multiple times.\n\nA **MusicXMLDocument** can be used just like other documents, **Meteor** is supported by default.\n\n## YAML Based Input\n\nWe can see that the **LilyPond** syntax is more compact and easier to write comparing to writing the sequences directly into Python. However, parsing **LilyPond** is non-trivial. The previous method uses  **python_ly** to first convert **ly** to **MusicXML** then reads from the **MusicXML** format. That process doesn't always work well. Moreover, there are cases where information useful to the synthesizer engine cannot be included into **LilyPond** and **MusicXML**, so we still need extra configurations in our Python code. \n\nObviously, a trade-off can be made between human-readability and machine-readability. The solution is to use **YAML** for the outline structure, and **LilyPond** syntax for notes only, so that we are able to include everything we need for the synthesizer into a single **YAML** file.\n\n```yaml\n# exmaple 1\nscore:\n    tempo: 150\n    staffs:\n        - \n            relative: c''\n            instrument: Arachno(40)\n            content: |\n                r4 g c d \n                e2 e2\n                r4 e dis e\n                d2 c2\n                r4 c d e\n                f2 a2\n                r4 a g f\n                e2. r4\n        -\n            relative: c\n            instrument: Arachno(0)\n            content: |\n                \\clef \"bass\"\n                c g' <c e> g\n                c, g' <bes e> g\n                c, g' <bes e> g\n                f c' <e a> c\n                f, c' <e a> c\n                g d' <f b> d\n                g, d' <f b> d\n                c, g' <b e>2\n```\n\n<audio controls>\n    <source type=\"audio/mpeg\" src=\"example1.mp3\"/>\n</audio>\n\n**score** is the top-level object including everything. The second level includes global settings, besides the **staffs**.  \n\nEach **staff** defines a line of notes and descriptions of how to synthesize it. The **instrument** field tells Python how to initialize the instrument to play the notes. It is literally Python code which is evaluated using **exec()** internally. Here **Arachno** is a soundfont which is deployed inside the SF2 directory. The index tells which preset to use (40 = violin, 0 = piano).\n\nInside the **content** filed, **LilyPond** notes are embedded as a multiline string.\n\nSince version 1.0.3, a command-line tool **scoredraft** is provided to process the YAML input. \n\n```\nusage: scoredraft [-h] [-ly LY] [-wav WAV] [-meteor METEOR] [-run] yaml\n\npositional arguments:\n  yaml            input yaml filename\n\noptional arguments:\n  -h, --help      show this help message and exit\n  -ly LY          output lilyond filename\n  -wav WAV        output wav filename\n  -meteor METEOR  output meteor filename\n  -run            run meteor\n```\n\nWith **scoredraft -ly**, the YAML file can be converted to a regular **LilyPond** file, which can be further improved for publishment. More information besides the notes can be passed to the synthesizer engine, which doesn't necessarily go into the **LilyPond** file.\n\n![](workflow.png) \n\nThe picture above shows the internal workflow how a YAML file gets processed. The workflow allows arbitrary information (useful to the synthesizer) to be included into the YAML file. For example, we can add pedal movements like:\n\n```yaml\n# exmaple 2\nscore:\n    tempo: 150\n    staffs:\n        - \n            relative: c''\n            instrument: Arachno(40)\n            content: |\n                r4 g c d \n                e2 e2\n                r4 e dis e\n                d2 c2\n                r4 c d e\n                f2 a2\n                r4 a g f\n                e2. r4\n        -\n            relative: c\n            instrument: Arachno(0)\n            content: |\n                \\clef \"bass\"\n                c g' <c e> g\n                c, g' <bes e> g\n                c, g' <bes e> g\n                f c' <e a> c\n                f, c' <e a> c\n                g d' <f b> d\n                g, d' <f b> d\n                c, g' <b e>2\n\n            pedal: |\n                bd1\n                bd1\n                bd1\n                bd1\n                bd1\n                bd1\n                bd1\n                bd1\n```\n\n<audio controls>\n    <source type=\"audio/mpeg\" src=\"example2.mp3\"/>\n</audio>\n\nThere is a dedicated syntax in **LilyPond** for pedals. However, there's no tool that can reliably convert that syntax into **MusicXML**. Therefore, instead, we simply define it as a percussion sequence, where **bd** means base-drum. You can use other percussion notes too, there's no difference since a pedal is just a simple trigger.\n\nFor guitar tracks, we often want to add a little delay to the chord notes to simulate sweeping. This can be configured by adding a \"sweep\" field:\n\n```yaml\n# exmaple 3\nscore:\n    tempo: 150\n    staffs:\n        - \n            relative: c''\n            instrument: Arachno(40)\n            content: |\n                r4 g c d \n                e2 e2\n                r4 e dis e\n                d2 c2\n                r4 c d e\n                f2 a2\n                r4 a g f\n                e2. r4\n        -\n            relative: c\n            instrument: Arachno(24)\n            sweep: 0.1\n            content: |\n                \\clef \"bass\"\n                c4 e <g c e>2\n                c,4 e <g bes e>2\n                c,4 e <g bes e>2\n                f,4 a <e' a c>2\n                f,4 a <e' a c>2\n                g,4 b <d g b>2\n                g,4 b <d g b>2\n                c4 e <g b e>2\n```\n\n<audio controls>\n    <source type=\"audio/mpeg\" src=\"example3.mp3\"/>\n</audio>\n\n**sweep: 0.1** tells ScoreDraft to add a 10% delay to chord notes.\n\nTo include a percussion track, simply add **is_drum: true** then you can use the percussion notes:\n\n```yaml\n# exmaple 4\nscore:\n    tempo: 150\n    staffs:\n        - \n            relative: c''\n            instrument: Arachno(40)\n            content: |\n                r4 g c d \n                e2 e2\n                r4 e dis e\n                d2 c2\n                r4 c d e\n                f2 a2\n                r4 a g f\n                e2. r4\n        -\n            relative: c\n            instrument: Arachno(24)\n            sweep: 0.1\n            content: |\n                \\clef \"bass\"\n                c4 e <g c e>2\n                c,4 e <g bes e>2\n                c,4 e <g bes e>2\n                f,4 a <e' a c>2\n                f,4 a <e' a c>2\n                g,4 b <d g b>2\n                g,4 b <d g b>2\n                c4 e <g b e>2\n\n        -\n            is_drum: true\n            instrument: Arachno(128)\n            content: |\n                bd4 hh sn hh\n                bd hh sn hh\n                bd hh sn hh\n                bd hh sn hh\n                bd hh sn hh\n                bd hh sn hh\n                bd hh sn hh\n                bd hh sn hh\n```\n\n<audio controls>\n    <source type=\"audio/mpeg\" src=\"example4.mp3\"/>\n</audio>\n\nFor percussion tracks, the **instrument** field must be a GM Drum instrument like the one used here.\n\nFor singing synthesizing, some different configuration fields are needed:\n\n```yaml\n# example 5\nscore:\n    tempo: 150\n    staffs:\n        -\n            relative: c'\n            is_vocal: true\n            singer: TetoEng_UTAU()\n            converter: TTEnglishConverter            \n            content: |\n                r4 g c d \n                e2 e2\n                r4 e dis e\n                d4 (c) c2\n                r4 c d e\n                f2 g4 (a)\n                r4 a g f\n                e2. r4\n            utau: |\n                ju Ar maI\n                s@n SaIn.\n                maI oU nli\n                s@n SaIn.\n                ju meIk mi\n                h{p i.\n                wEn skaIz Ar\n                greI.\n\n        -\n            relative: c\n            instrument: Arachno(0)\n            content: |\n                \\clef \"bass\"\n                c g' <c e> g\n                c, g' <bes e> g\n                c, g' <bes e> g\n                f c' <e a> c\n                f, c' <e a> c\n                g d' <f b> d\n                g, d' <f b> d\n                c, g' <b e>2\n\n            pedal: |\n                bd1\n                bd1\n                bd1\n                bd1\n                bd1\n                bd1\n                bd1\n                bd1\n\n        -\n            is_drum: true\n            instrument: Arachno(128)\n            content: |\n                bd4 hh sn hh\n                bd hh sn hh\n                bd hh sn hh\n                bd hh sn hh\n                bd hh sn hh\n                bd hh sn hh\n                bd hh sn hh\n                bd hh sn hh\n```\n\n<audio controls>\n    <source type=\"audio/mpeg\" src=\"example5.mp3\"/>\n</audio>\n\nFirst, set **is_vocal** to **true**. Second, instead of defining a **instrument**, here we need a **singer**. Most of the cases, a **converter** needs to be given to handle syllable connections. If the voicebank is defined in CZMode, simply add **CZMode: true**. Third, add an **utau** field to include the phonetic symbols. Syllables are separated by spaces, with a dot at the end of each sentence. A rest 'r' in the **content** code also marks the end of a sentence. Each syllable is mapped to 1 note by default. Slurs can be used so that multiple notes can be mapped to a syllable.\n\n### Reference\n\nCurrently, there is only a small set of YAML keys recognized by ScoreDraft, and basically everything has been mentioned above. Here is a exhaustive list of all keys.\n\n#### score\n\nThe top-level object\n\n#### tempo\n\nGlobal property defining tempo in BPM.\n\n#### title\n\nTitle of the score. (for LilyPond)\n\n#### composer\n\nAuthor of the score. (for LilyPond)\n\n#### staffs\n\nEntry to the array of staffs.\n\n#### content\n\nStaff property containing embedded **LilyPond** code. Basically any **LilyPond** code can be put here. For **-ly** output, these code will be put straightly to the **ly** file. However, for the synthesizer, only a small part of **LilyPond** syntax is acknowledged. Besides the notes, **<>** is recognized as a chord, and **()** is recognized as slur. Slurs are useful for singing synthesize.\n\n#### is_drum\n\nStaff property indicating whether the current staff is a percussion track.\n\n#### is_vocal\n\nStaff property indicating whether the current staff is a singing track\n\nWhen neither **is_drum** nor **is_vocal** is set, the current staff is a instrumental track.\n\n#### relative\n\nStaff property for a instrumental/singing track, indicating the **content** is in relative mode.\n\n#### instrument\n\nStaff property for an instrumental/percussion track, giving instrument information.\n\nThe value should be literal Python code calling the instrument initializer.\n\nFor percussion tracks, the instrument should be a GM Drum instrument.\n\n#### pedal\n\nStaff property for an instrumental track, telling the movement of the sustaining pedal. The value should be written using arbitrary percussion notes. Rests are supported.\n\n#### sweep\n\nStaff property for an instrumental track, adding a delay to chord notes to simulate a guitar sweeping effect.\n\n#### singer\n\nStaff property for a singing track, giving singer information. \n\nThe value should be literal Python code calling the singer initializer.\n\n#### converter\n\nStaff property for a singing track, giving the Python variable name of the lyric converter required by the singer.\n\n#### CZMode\n\nStaff property for a  singing track, indicating whether the singer is in CZMode.\n\n#### utau\n\nStaff property for a singing track containing **UTAU** phonetic symbols for each syllable. Syllables are separated by spaces, with a dot at the end of each sentence.\n\n#### volume\n\nStaff property for any track. Volume value used by the mixer.\n\n#### pan\n\nStaff property for any track. Pan value used by the mixer.\n\n"
  },
  {
    "path": "docs/meteor/MyLove.html_files/github-markdown.css",
    "content": "@font-face {\n  font-family: octicons-link;\n  src: url(data:font/woff;charset=utf-8;base64,d09GRgABAAAAAAZwABAAAAAACFQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABEU0lHAAAGaAAAAAgAAAAIAAAAAUdTVUIAAAZcAAAACgAAAAoAAQAAT1MvMgAAAyQAAABJAAAAYFYEU3RjbWFwAAADcAAAAEUAAACAAJThvmN2dCAAAATkAAAABAAAAAQAAAAAZnBnbQAAA7gAAACyAAABCUM+8IhnYXNwAAAGTAAAABAAAAAQABoAI2dseWYAAAFsAAABPAAAAZwcEq9taGVhZAAAAsgAAAA0AAAANgh4a91oaGVhAAADCAAAABoAAAAkCA8DRGhtdHgAAAL8AAAADAAAAAwGAACfbG9jYQAAAsAAAAAIAAAACABiATBtYXhwAAACqAAAABgAAAAgAA8ASm5hbWUAAAToAAABQgAAAlXu73sOcG9zdAAABiwAAAAeAAAAME3QpOBwcmVwAAAEbAAAAHYAAAB/aFGpk3jaTY6xa8JAGMW/O62BDi0tJLYQincXEypYIiGJjSgHniQ6umTsUEyLm5BV6NDBP8Tpts6F0v+k/0an2i+itHDw3v2+9+DBKTzsJNnWJNTgHEy4BgG3EMI9DCEDOGEXzDADU5hBKMIgNPZqoD3SilVaXZCER3/I7AtxEJLtzzuZfI+VVkprxTlXShWKb3TBecG11rwoNlmmn1P2WYcJczl32etSpKnziC7lQyWe1smVPy/Lt7Kc+0vWY/gAgIIEqAN9we0pwKXreiMasxvabDQMM4riO+qxM2ogwDGOZTXxwxDiycQIcoYFBLj5K3EIaSctAq2kTYiw+ymhce7vwM9jSqO8JyVd5RH9gyTt2+J/yUmYlIR0s04n6+7Vm1ozezUeLEaUjhaDSuXHwVRgvLJn1tQ7xiuVv/ocTRF42mNgZGBgYGbwZOBiAAFGJBIMAAizAFoAAABiAGIAznjaY2BkYGAA4in8zwXi+W2+MjCzMIDApSwvXzC97Z4Ig8N/BxYGZgcgl52BCSQKAA3jCV8CAABfAAAAAAQAAEB42mNgZGBg4f3vACQZQABIMjKgAmYAKEgBXgAAeNpjYGY6wTiBgZWBg2kmUxoDA4MPhGZMYzBi1AHygVLYQUCaawqDA4PChxhmh/8ODDEsvAwHgMKMIDnGL0x7gJQCAwMAJd4MFwAAAHjaY2BgYGaA4DAGRgYQkAHyGMF8NgYrIM3JIAGVYYDT+AEjAwuDFpBmA9KMDEwMCh9i/v8H8sH0/4dQc1iAmAkALaUKLgAAAHjaTY9LDsIgEIbtgqHUPpDi3gPoBVyRTmTddOmqTXThEXqrob2gQ1FjwpDvfwCBdmdXC5AVKFu3e5MfNFJ29KTQT48Ob9/lqYwOGZxeUelN2U2R6+cArgtCJpauW7UQBqnFkUsjAY/kOU1cP+DAgvxwn1chZDwUbd6CFimGXwzwF6tPbFIcjEl+vvmM/byA48e6tWrKArm4ZJlCbdsrxksL1AwWn/yBSJKpYbq8AXaaTb8AAHja28jAwOC00ZrBeQNDQOWO//sdBBgYGRiYWYAEELEwMTE4uzo5Zzo5b2BxdnFOcALxNjA6b2ByTswC8jYwg0VlNuoCTWAMqNzMzsoK1rEhNqByEyerg5PMJlYuVueETKcd/89uBpnpvIEVomeHLoMsAAe1Id4AAAAAAAB42oWQT07CQBTGv0JBhagk7HQzKxca2sJCE1hDt4QF+9JOS0nbaaYDCQfwCJ7Au3AHj+LO13FMmm6cl7785vven0kBjHCBhfpYuNa5Ph1c0e2Xu3jEvWG7UdPDLZ4N92nOm+EBXuAbHmIMSRMs+4aUEd4Nd3CHD8NdvOLTsA2GL8M9PODbcL+hD7C1xoaHeLJSEao0FEW14ckxC+TU8TxvsY6X0eLPmRhry2WVioLpkrbp84LLQPGI7c6sOiUzpWIWS5GzlSgUzzLBSikOPFTOXqly7rqx0Z1Q5BAIoZBSFihQYQOOBEdkCOgXTOHA07HAGjGWiIjaPZNW13/+lm6S9FT7rLHFJ6fQbkATOG1j2OFMucKJJsxIVfQORl+9Jyda6Sl1dUYhSCm1dyClfoeDve4qMYdLEbfqHf3O/AdDumsjAAB42mNgYoAAZQYjBmyAGYQZmdhL8zLdDEydARfoAqIAAAABAAMABwAKABMAB///AA8AAQAAAAAAAAAAAAAAAAABAAAAAA==) format('woff');\n}\n\n.markdown-body {\n  -webkit-text-size-adjust: 100%;\n  text-size-adjust: 100%;\n  color: #333;\n  font-family: \"Helvetica Neue\", Helvetica, \"Segoe UI\", Arial, freesans, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";\n  font-size: 16px;\n  line-height: 1.6;\n  word-wrap: break-word;\n}\n\n.markdown-body a {\n  background-color: transparent;\n}\n\n.markdown-body a:active,\n.markdown-body a:hover {\n  outline: 0;\n}\n\n.markdown-body strong {\n  font-weight: bold;\n}\n\n.markdown-body h1 {\n  font-size: 2em;\n  margin: 0.67em 0;\n}\n\n.markdown-body img {\n  border: 0;\n}\n\n.markdown-body hr {\n  box-sizing: content-box;\n  height: 0;\n}\n\n.markdown-body pre {\n  overflow: auto;\n}\n\n.markdown-body code,\n.markdown-body kbd,\n.markdown-body pre {\n  font-family: monospace, monospace;\n  font-size: 1em;\n}\n\n.markdown-body input {\n  color: inherit;\n  font: inherit;\n  margin: 0;\n}\n\n.markdown-body html input[disabled] {\n  cursor: default;\n}\n\n.markdown-body input {\n  line-height: normal;\n}\n\n.markdown-body input[type=\"checkbox\"] {\n  box-sizing: border-box;\n  padding: 0;\n}\n\n.markdown-body table {\n  border-collapse: collapse;\n  border-spacing: 0;\n}\n\n.markdown-body td,\n.markdown-body th {\n  padding: 0;\n}\n\n.markdown-body * {\n  box-sizing: border-box;\n}\n\n.markdown-body input {\n  font: 13px / 1.4 Helvetica, arial, nimbussansl, liberationsans, freesans, clean, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";\n}\n\n.markdown-body a {\n  color: #4078c0;\n  text-decoration: none;\n}\n\n.markdown-body a:hover,\n.markdown-body a:active {\n  text-decoration: underline;\n}\n\n.markdown-body hr {\n  height: 0;\n  margin: 15px 0;\n  overflow: hidden;\n  background: transparent;\n  border: 0;\n  border-bottom: 1px solid #ddd;\n}\n\n.markdown-body hr:before {\n  display: table;\n  content: \"\";\n}\n\n.markdown-body hr:after {\n  display: table;\n  clear: both;\n  content: \"\";\n}\n\n.markdown-body h1,\n.markdown-body h2,\n.markdown-body h3,\n.markdown-body h4,\n.markdown-body h5,\n.markdown-body h6 {\n  margin-top: 15px;\n  margin-bottom: 15px;\n  line-height: 1.1;\n}\n\n.markdown-body h1 {\n  font-size: 30px;\n}\n\n.markdown-body h2 {\n  font-size: 21px;\n}\n\n.markdown-body h3 {\n  font-size: 16px;\n}\n\n.markdown-body h4 {\n  font-size: 14px;\n}\n\n.markdown-body h5 {\n  font-size: 12px;\n}\n\n.markdown-body h6 {\n  font-size: 11px;\n}\n\n.markdown-body blockquote {\n  margin: 0;\n}\n\n.markdown-body ul,\n.markdown-body ol {\n  padding: 0;\n  margin-top: 0;\n  margin-bottom: 0;\n}\n\n.markdown-body ol ol,\n.markdown-body ul ol {\n  list-style-type: lower-roman;\n}\n\n.markdown-body ul ul ol,\n.markdown-body ul ol ol,\n.markdown-body ol ul ol,\n.markdown-body ol ol ol {\n  list-style-type: lower-alpha;\n}\n\n.markdown-body dd {\n  margin-left: 0;\n}\n\n.markdown-body code {\n  font-family: Consolas, \"Liberation Mono\", Menlo, Courier, monospace;\n  font-size: 12px;\n}\n\n.markdown-body pre {\n  margin-top: 0;\n  margin-bottom: 0;\n  font: 12px Consolas, \"Liberation Mono\", Menlo, Courier, monospace;\n}\n\n.markdown-body .select::-ms-expand {\n  opacity: 0;\n}\n\n.markdown-body .octicon {\n  font: normal normal normal 16px/1 octicons-link;\n  display: inline-block;\n  text-decoration: none;\n  text-rendering: auto;\n  -webkit-font-smoothing: antialiased;\n  -moz-osx-font-smoothing: grayscale;\n  -webkit-user-select: none;\n  -moz-user-select: none;\n  -ms-user-select: none;\n  user-select: none;\n}\n\n.markdown-body .octicon-link:before {\n  content: '\\f05c';\n}\n\n.markdown-body:before {\n  display: table;\n  content: \"\";\n}\n\n.markdown-body:after {\n  display: table;\n  clear: both;\n  content: \"\";\n}\n\n.markdown-body>*:first-child {\n  margin-top: 0 !important;\n}\n\n.markdown-body>*:last-child {\n  margin-bottom: 0 !important;\n}\n\n.markdown-body a:not([href]) {\n  color: inherit;\n  text-decoration: none;\n}\n\n.markdown-body .anchor {\n  display: inline-block;\n  padding-right: 2px;\n  margin-left: -18px;\n}\n\n.markdown-body .anchor:focus {\n  outline: none;\n}\n\n.markdown-body h1,\n.markdown-body h2,\n.markdown-body h3,\n.markdown-body h4,\n.markdown-body h5,\n.markdown-body h6 {\n  margin-top: 1em;\n  margin-bottom: 16px;\n  font-weight: bold;\n  line-height: 1.4;\n}\n\n.markdown-body h1 .octicon-link,\n.markdown-body h2 .octicon-link,\n.markdown-body h3 .octicon-link,\n.markdown-body h4 .octicon-link,\n.markdown-body h5 .octicon-link,\n.markdown-body h6 .octicon-link {\n  color: #000;\n  vertical-align: middle;\n  visibility: hidden;\n}\n\n.markdown-body h1:hover .anchor,\n.markdown-body h2:hover .anchor,\n.markdown-body h3:hover .anchor,\n.markdown-body h4:hover .anchor,\n.markdown-body h5:hover .anchor,\n.markdown-body h6:hover .anchor {\n  text-decoration: none;\n}\n\n.markdown-body h1:hover .anchor .octicon-link,\n.markdown-body h2:hover .anchor .octicon-link,\n.markdown-body h3:hover .anchor .octicon-link,\n.markdown-body h4:hover .anchor .octicon-link,\n.markdown-body h5:hover .anchor .octicon-link,\n.markdown-body h6:hover .anchor .octicon-link {\n  visibility: visible;\n}\n\n.markdown-body h1 {\n  padding-bottom: 0.3em;\n  font-size: 2.25em;\n  line-height: 1.2;\n  border-bottom: 1px solid #eee;\n}\n\n.markdown-body h1 .anchor {\n  line-height: 1;\n}\n\n.markdown-body h2 {\n  padding-bottom: 0.3em;\n  font-size: 1.75em;\n  line-height: 1.225;\n  border-bottom: 1px solid #eee;\n}\n\n.markdown-body h2 .anchor {\n  line-height: 1;\n}\n\n.markdown-body h3 {\n  font-size: 1.5em;\n  line-height: 1.43;\n}\n\n.markdown-body h3 .anchor {\n  line-height: 1.2;\n}\n\n.markdown-body h4 {\n  font-size: 1.25em;\n}\n\n.markdown-body h4 .anchor {\n  line-height: 1.2;\n}\n\n.markdown-body h5 {\n  font-size: 1em;\n}\n\n.markdown-body h5 .anchor {\n  line-height: 1.1;\n}\n\n.markdown-body h6 {\n  font-size: 1em;\n  color: #777;\n}\n\n.markdown-body h6 .anchor {\n  line-height: 1.1;\n}\n\n.markdown-body p,\n.markdown-body blockquote,\n.markdown-body ul,\n.markdown-body ol,\n.markdown-body dl,\n.markdown-body table,\n.markdown-body pre {\n  margin-top: 0;\n  margin-bottom: 16px;\n}\n\n.markdown-body hr {\n  height: 4px;\n  padding: 0;\n  margin: 16px 0;\n  background-color: #e7e7e7;\n  border: 0 none;\n}\n\n.markdown-body ul,\n.markdown-body ol {\n  padding-left: 2em;\n}\n\n.markdown-body ul ul,\n.markdown-body ul ol,\n.markdown-body ol ol,\n.markdown-body ol ul {\n  margin-top: 0;\n  margin-bottom: 0;\n}\n\n.markdown-body li>p {\n  margin-top: 16px;\n}\n\n.markdown-body dl {\n  padding: 0;\n}\n\n.markdown-body dl dt {\n  padding: 0;\n  margin-top: 16px;\n  font-size: 1em;\n  font-style: italic;\n  font-weight: bold;\n}\n\n.markdown-body dl dd {\n  padding: 0 16px;\n  margin-bottom: 16px;\n}\n\n.markdown-body blockquote {\n  padding: 0 15px;\n  color: #777;\n  border-left: 4px solid #ddd;\n}\n\n.markdown-body blockquote>:first-child {\n  margin-top: 0;\n}\n\n.markdown-body blockquote>:last-child {\n  margin-bottom: 0;\n}\n\n.markdown-body table {\n  display: block;\n  width: 100%;\n  overflow: auto;\n  word-break: normal;\n  word-break: keep-all;\n}\n\n.markdown-body table th {\n  font-weight: bold;\n}\n\n.markdown-body table th,\n.markdown-body table td {\n  padding: 6px 13px;\n  border: 1px solid #ddd;\n}\n\n.markdown-body table tr {\n  background-color: #fff;\n  border-top: 1px solid #ccc;\n}\n\n.markdown-body table tr:nth-child(2n) {\n  background-color: #f8f8f8;\n}\n\n.markdown-body img {\n  max-width: 100%;\n  box-sizing: content-box;\n  background-color: #fff;\n}\n\n.markdown-body code {\n  padding: 0;\n  padding-top: 0.2em;\n  padding-bottom: 0.2em;\n  margin: 0;\n  font-size: 85%;\n  background-color: rgba(0,0,0,0.04);\n  border-radius: 3px;\n}\n\n.markdown-body code:before,\n.markdown-body code:after {\n  letter-spacing: -0.2em;\n  content: \"\\00a0\";\n}\n\n.markdown-body pre>code {\n  padding: 0;\n  margin: 0;\n  font-size: 100%;\n  word-break: normal;\n  white-space: pre;\n  background: transparent;\n  border: 0;\n}\n\n.markdown-body .highlight {\n  margin-bottom: 16px;\n}\n\n.markdown-body .highlight pre,\n.markdown-body pre {\n  padding: 16px;\n  overflow: auto;\n  font-size: 85%;\n  line-height: 1.45;\n  background-color: #f7f7f7;\n  border-radius: 3px;\n}\n\n.markdown-body .highlight pre {\n  margin-bottom: 0;\n  word-break: normal;\n}\n\n.markdown-body pre {\n  word-wrap: normal;\n}\n\n.markdown-body pre code {\n  display: inline;\n  max-width: initial;\n  padding: 0;\n  margin: 0;\n  overflow: initial;\n  line-height: inherit;\n  word-wrap: normal;\n  background-color: transparent;\n  border: 0;\n}\n\n.markdown-body pre code:before,\n.markdown-body pre code:after {\n  content: normal;\n}\n\n.markdown-body kbd {\n  display: inline-block;\n  padding: 3px 5px;\n  font-size: 11px;\n  line-height: 10px;\n  color: #555;\n  vertical-align: middle;\n  background-color: #fcfcfc;\n  border: solid 1px #ccc;\n  border-bottom-color: #bbb;\n  border-radius: 3px;\n  box-shadow: inset 0 -1px 0 #bbb;\n}\n\n.markdown-body .pl-c {\n  color: #969896;\n}\n\n.markdown-body .pl-c1,\n.markdown-body .pl-s .pl-v {\n  color: #0086b3;\n}\n\n.markdown-body .pl-e,\n.markdown-body .pl-en {\n  color: #795da3;\n}\n\n.markdown-body .pl-s .pl-s1,\n.markdown-body .pl-smi {\n  color: #333;\n}\n\n.markdown-body .pl-ent {\n  color: #63a35c;\n}\n\n.markdown-body .pl-k {\n  color: #a71d5d;\n}\n\n.markdown-body .pl-pds,\n.markdown-body .pl-s,\n.markdown-body .pl-s .pl-pse .pl-s1,\n.markdown-body .pl-sr,\n.markdown-body .pl-sr .pl-cce,\n.markdown-body .pl-sr .pl-sra,\n.markdown-body .pl-sr .pl-sre {\n  color: #183691;\n}\n\n.markdown-body .pl-v {\n  color: #ed6a43;\n}\n\n.markdown-body .pl-id {\n  color: #b52a1d;\n}\n\n.markdown-body .pl-ii {\n  background-color: #b52a1d;\n  color: #f8f8f8;\n}\n\n.markdown-body .pl-sr .pl-cce {\n  color: #63a35c;\n  font-weight: bold;\n}\n\n.markdown-body .pl-ml {\n  color: #693a17;\n}\n\n.markdown-body .pl-mh,\n.markdown-body .pl-mh .pl-en,\n.markdown-body .pl-ms {\n  color: #1d3e81;\n  font-weight: bold;\n}\n\n.markdown-body .pl-mq {\n  color: #008080;\n}\n\n.markdown-body .pl-mi {\n  color: #333;\n  font-style: italic;\n}\n\n.markdown-body .pl-mb {\n  color: #333;\n  font-weight: bold;\n}\n\n.markdown-body .pl-md {\n  background-color: #ffecec;\n  color: #bd2c00;\n}\n\n.markdown-body .pl-mi1 {\n  background-color: #eaffea;\n  color: #55a532;\n}\n\n.markdown-body .pl-mdr {\n  color: #795da3;\n  font-weight: bold;\n}\n\n.markdown-body .pl-mo {\n  color: #1d3e81;\n}\n\n.markdown-body kbd {\n  display: inline-block;\n  padding: 3px 5px;\n  font: 11px Consolas, \"Liberation Mono\", Menlo, Courier, monospace;\n  line-height: 10px;\n  color: #555;\n  vertical-align: middle;\n  background-color: #fcfcfc;\n  border: solid 1px #ccc;\n  border-bottom-color: #bbb;\n  border-radius: 3px;\n  box-shadow: inset 0 -1px 0 #bbb;\n}\n\n.markdown-body .task-list-item {\n  list-style-type: none;\n}\n\n.markdown-body .task-list-item+.task-list-item {\n  margin-top: 3px;\n}\n\n.markdown-body .task-list-item input {\n  margin: 0 0.35em 0.25em -1.6em;\n  vertical-align: middle;\n}\n\n.markdown-body :checked+.radio-label {\n  z-index: 1;\n  position: relative;\n  border-color: #4078c0;\n}\n"
  },
  {
    "path": "docs/meteor/MyLove.md",
    "content": "<script type=\"text/javascript\" src=\"meteor.js\"></script>\n\n<script type=\"text/javascript\">\n    window.onload = function() {\n        var restiktok = {\n            canvasID : \"canvastiktok\",\n            audioID : \"audiotiktok\",\n            dataPath : \"MyLove.meteor\"\n        };\n        meteortiktok = new Meteor(restiktok);\n    };\n</script>\n\n<style type=\"text/css\">\n    canvas {\n        display: block;\n        width: 100%;\n        height: width*0.5625;\n    }\t\t\n</style>\n\n<div>\n    <canvas id=\"canvastiktok\" width=\"800\" height=\"450\"></canvas>\n</div>\n<div>\n    <audio id='audiotiktok' controls=\"controls\">\n        <source type=\"audio/mpeg\" src=\"MyLove.mp3\"/>\n    </audio>\n</div>\n\n# My Love\n\n## Info\n* Originally sung by: Westlife\n* Melody/Lyric by: Jörgen Elofsson, Per Magnusson, David Kreuger and Pelle Nylén\n* CZloid voicebank: [http://utau.wiki/utau:czloid](http://utau.wiki/utau:czloid)\n* Video published earlier on Bilibili: [https://www.bilibili.com/video/av19520577](https://www.bilibili.com/video/av19520577)\n* Teto English Voicebank (CVVC) Voicebank: [http://kasaneteto.jp/en/voicebank.html](http://kasaneteto.jp/en/voicebank.html) \n\n```python\nimport ScoreDraft\nfrom ScoreDraft.Notes import *\n\ndoc=ScoreDraft.MeteorDocument()\ndoc.setTempo(72)\n\nTeto = ScoreDraft.TetoEng_UTAU()\nTeto.setLyricConverter(ScoreDraft.TTEnglishConverter)\n\nGuitar=ScoreDraft.SteelGuitar()\nBass=ScoreDraft.Bass()\n\ntrack=doc.newBuf()\ntrack_g=doc.newBuf()\ntrack_b=doc.newBuf()\ntrack_mix=doc.newBuf()\n\n\nFreqsC=Freqs[:]\nFreqsD=[f*Freqs[2] for f in Freqs]\n\ndef doS(octave=5, duration=48):\n\treturn note(octave,Freqs[1],duration)\n\ndef faS(octave=5, duration=48):\n\treturn note(octave,Freqs[6],duration)\n\ndef soS(octave=5, duration=48):\n\treturn note(octave,Freqs[8],duration)\n\ndef Chord3(A,octA,B,octB,C,octC, duration, delay):\n\treturn [A(octA,duration), BK(duration-delay), B(octB,duration-delay), BK(duration-delay*2), C(octC,duration-delay*2)]\n\ndef MiSoDo(duration, delay=0):\n\treturn Chord3(mi,4,so,4,do,5,duration,delay)\n\ndef DoMiSo(duration, delay=0):\n\treturn Chord3(do,5,mi,5,so,5,duration,delay)\n\ndef TiReSo(duration, delay=0):\n\treturn Chord3(ti,4,re,5,so,5,duration,delay)\n\ndef TiMiSo(duration, delay=0):\n\treturn Chord3(ti,4,mi,5,so,5,duration,delay)\n\ndef LaDoMi(duration, delay=0):\n\treturn Chord3(la,4,do,5,mi,5,duration,delay)\n\ndef LaDoFa(duration, delay=0):\n\treturn Chord3(la,4,do,5,fa,5,duration,delay)\n\ndef DoReSo(duration, delay=0):\n\treturn Chord3(do,5,re,5,so,5,duration,delay)\n\ndef LaReFa(duration, delay=0):\n\treturn Chord3(la,4,re,5,fa,5,duration,delay)\n\ndef FaLaDoH(duration, delay=0):\n\treturn Chord3(fa,5,la,5,do,6,duration,delay)\n\ndef MiSoDoH(duration, delay=0):\n\treturn Chord3(mi,5,so,5,do,6,duration,delay)\n\ndef LaDoFaH(duration, delay=0):\n\treturn Chord3(la,5,do,6,fa,6,duration,delay)\n\ndef SoDoMiH(duration, delay=0):\n\treturn Chord3(so,5,do,6,mi,6,duration,delay)\n\ndef LaDoMiH(duration, delay=0):\n\treturn Chord3(la,5,do,6,mi,6,duration,delay)\n\ndef FaSLaReH(duration, delay=0):\n\treturn Chord3(faS,5,la,5,re,6,duration,delay)\n\ndef TiReSoH(duration, delay=0):\n\treturn Chord3(ti,5,re,6,so,6,duration,delay)\n\ndef SoTiReH(duration, delay=0):\n\treturn Chord3(so,5,ti,5,re,6,duration,delay)\n\ndef SoSTiMiH(duration, delay=0):\n\treturn Chord3(soS,5,ti,5,mi,6,duration,delay)\n\ndef MiLaDoH(duration, delay=0):\n\treturn Chord3(mi,5,la,5,do,6,duration,delay)\n\ndef ReSoTi(duration, delay=0):\n\treturn Chord3(re,5,so,5,ti,5,duration,delay)\n\ndef ReSoDoH(duration, delay=0):\n\treturn Chord3(re,5,so,5,do,6,duration,delay)\n\ndef DoFaLa(duration, delay=0):\n\treturn Chord3(do,5,fa,5,la,5,duration,delay)\n\nseq=[BL(192)]\nseq_g=[BL(96), fa(5,12), la(4,12), re(5,12), fa(5,60), BK(48), do(5,24), la(4,24)]\nseq_b=[BL(96), re(4,48), do(4,48)]\n\nseq+=[BL(192)]\nseq_g+=[re(5,48), BK(48), so(4,48), re(5,24), BK(24), so(4,24), do(5,12), ti(4,12), la(4,48), la(4,24), ti(4,24)]\nseq_b+=[ti(3,72), la(3,12), so(3,12), fa(3,96), BK(72), do(4,12), fa(4,60)]\n\nseq+=[BL(96), BL(72), BL(12)]\nseq_g+=MiSoDo(48)+MiSoDo(36)+MiSoDo(24)+MiSoDo(12)+MiSoDo(24)+MiSoDo(24)+[BL(24)]\nseq_b+=[do(3,144), BL(48)]\n\nseq+=[('{n', so(5,12), 'Em', do(6,24),'pti', do(6,12), 'strit', do(6, 36)), BL(12)]\nseq+=[('{n',so(5,12), 'Em', re(6,24),'pti', re(6,12), 'haUs',re(6, 36)), BL(12)]\nseq_g+=DoMiSo(48, 2)+DoMiSo(48, 2)+TiReSo(48,2)+TiReSo(48,2)\nseq_b+=[do(4,72), do(4,24),so(3,72),so(3,24)]\n\nseq+=[('@', so(5,12), 'hoUl', ti(5,24), 'In', ti(5,12), 'saId', ti(5,24), 'maI',do(6,24),'hArt',do(6,48)), BL(48)]\nseq_g+=TiMiSo(48,2)+TiMiSo(48,2)+LaDoMi(48,2)+LaDoMi(24)+LaDoMi(12)+LaDoMi(12)\nseq_b+=[mi(3,72),mi(3,24), la(3,96)]\n\nseq+=[('aIm', so(5,12), 'Ol', la(5,24), '@l', la(5,12),'oUn', la(5,36)),BL(12)]\nseq+=[('D@',la(5,12),'rum',la(5,24),'zAr',la(5,24), 'gEt', la(5,12),'IN', la(5,24), 'smOl', la(5,24), '3', so(5,36))]\nseq_g+=LaDoFa(48,2)+LaDoFa(24)+LaDoFa(12)+LaDoFa(12)+LaDoFa(48,2)+LaDoFa(48,2)\nseq_b+=[fa(3,96),fa(3,72), fa(3,24)]\n\nseq+=[BL(48),BL(48), BL(36)]\nseq_g+=DoReSo(48,2)+DoReSo(24)+DoReSo(12)+DoReSo(12)+TiReSo(48,2)+TiReSo(24)+TiReSo(12)+TiReSo(12)\nseq_b+=[so(3,96),so(3,96)]\n\nseq+=[('aI',so(5,12),'w@n',do(6,24),'d3',do(6,12),'haU',do(6,36)), BL(12)]\nseq+=[('aI',so(5,12),'w@n',re(6,24),'d3',re(6,12),'waI',re(6,36)), BL(12)]\nseq_g+=DoMiSo(48, 2)+DoMiSo(48, 2)+TiReSo(48,2)+TiReSo(48,2)\nseq_b+=[do(4,72), do(4,24),so(3,72),so(3,24)]\n\nseq+=[('aI',mi(6,12), 'w@n', so(6,24), 'd3', so(6,12), 'wEr', so(6,12), mi(6,12), 'DeI', mi(6,12), do(6,12), 'Ar', do(6,48)), BL(48)]\nseq_g+=TiMiSo(48,2)+TiMiSo(48,2)+LaDoMi(48,2)+LaDoMi(24)+LaDoMi(12)+LaDoMi(12)\nseq_b+=[mi(3,72),mi(3,24), la(3,48), so(3,48)]\n\nseq+=[('D@',so(5,12),'deIz',la(5,24), 'wi',la(5,12), 'h{d', la(5,36)), BL(12)]\nseq+=[('D@',fa(5,12),'sONz',la(5,24), 'wi',la(5,12), 's{N', do(6,36), 't@g', la(5,12), 'ED', la(5,12), so(5,12), '3', so(5,36)), BL(12)]\nseq_g+=LaDoFa(48,2)+LaDoFa(48,2)+LaDoFa(24)+[fa(4,24), la(4,48), BK(48), re(5,48), BK(48), faS(5,48)]\nseq_b+=[fa(3,72),fa(3,24), fa(3,48), faS(3,48)]\n\nseq+=[('oU', ti(5,12),la(5,12), 'j{', ti(5,6), la(5,6), so(5,48)), BL(24)]\nseq_g+=DoReSo(48,2)+DoReSo(48,2)+TiReSo(48,2)+TiReSo(48,2)\nseq_b+=[so(3,72),so(3,24),so(3,96)]\n\nseq+=[('@n',so(5,24),'dol',fa(6,48),'maI',la(5,48),'l@v',ti(5,48)), BL(36)]\nseq_g+=[fa(5,12),la(4,12),re(5,12),fa(5,60),BK(48),do(5,24),la(4,24)]+Chord3(so,4,re,5,so,5,96,4)\nseq_b+=[re(4,48),do(4,48),ti(3,48),ti(3,48)]\n\nseq+=[('aIm',so(5,12),'hoU',do(6,24),'ldIN',do(6,12),'An',do(6,36),'f3',mi(6,12),'Ev',re(6,12),do(6,12),'3',do(6,36)),BL(48)]\nseq_g+=[so(4,48),BK(46),mi(5,46),do(5,48),BK(46),so(5,46)]+LaDoFa(48,2)+LaDoFa(48,2)\nseq_b+=[do(4,48),mi(3,48),fa(3,48),fa(3,24),mi(3,24)]\n\nseq+=[('ri',fa(6,24),'tSIN',fa(6,12),'fOr',fa(6,36),'D@',fa(6,12),'l@v',fa(6,36),'D{t',mi(6,12),'simz',do(6,24),'soU',re(6,36),'fAr',re(6,96)), BL(48)]\nseq_g+=LaReFa(48,2)+LaReFa(48,2)+LaDoFa(48,2)+LaReFa(48,2)\nseq_b+=[re(3,72),mi(3,24),fa(3,96)]\nseq_g+=DoReSo(48,2)+DoReSo(48,2)+TiReSo(96,4)\nseq_b+=[so(3,72),so(3,24),so(3,96)]\n\nseq+=[('soU',do(6,24),'aI',ti(5,24),'seI',la(5,24),'@',so(5,12),'lIt',so(5,24),'@l',so(5,24),'prEr',so(5,36)), BL(12)]\nseq_g+=FaLaDoH(48,2)+FaLaDoH(48,2)+MiSoDoH(48,2)+MiSoDoH(48,2)\nseq_b+=[fa(3,72),fa(3,24),do(4,96)]\n\nseq+=[('@nd',so(5,12),'hoUp',do(6,24),'maI',ti(5,24),'drimz',la(5,24),'wIl',so(5,12),'teIk',so(5,24),'mi',fa(5,24),'DEr',mi(5,36)), BL(24)]\nseq_g+=FaLaDoH(48,2)+FaLaDoH(48,2)+MiSoDoH(48,2)+MiSoDoH(48,2)\nseq_b+=[fa(3,72),fa(3,24),do(4,72),do(4,24)]\n\nseq+=[('wEr',mi(6,24),'D@',so(6,24),'skaIz',fa(6,24),'Ar',mi(6,12),'blu',re(6,36)),BL(12)]\nseq+=[('tu',do(6,12),'si',mi(6,24),'ju',re(6,12),'w@n',do(6,36),'s@g',mi(6,12),'En',re(6,60),'maI',la(5,24),'l@v',ti(5,48)),BL(24)]\nseq_g+=LaDoFaH(48,2)+LaDoFaH(48,2)+SoDoMiH(48,2)+LaDoMiH(48,2)\nseq_b+=[fa(3,72),fa(3,24),do(4,72),la(3,24)]\nseq_g+=FaSLaReH(48,2)+FaSLaReH(48,2)+TiReSoH(48,2)+TiReSoH(48,2)\nseq_b+=[faS(3,72),faS(3,24),so(3,72),so(3,24)]\n\nseq+=[('oU',do(6,24),'v3',ti(5,24),'siz',la(5,24),'fr@m',so(5,12),'koUst',so(5,36),'u',fa(5,12),'koUst',so(5,36)),BL(12)]\nseq_g+=LaDoFaH(48,2)+LaDoFaH(48,2)+SoDoMiH(48,2)+LaDoMiH(48,2)\nseq_b+=[fa(3,72),fa(3,24),do(4,96)]\n\nseq+=[('tu',so(5,12),'faInd',do(6,24),'D@',ti(5,12),'pleIs',la(5,36),'aI',so(5,12),'l@v',so(6,24),fa(6,12),'D@',fa(6,12),'moUst',mi(6,36)),BL(24)]\nseq_g+=LaDoFaH(48,2)+LaDoFaH(48,2)+SoDoMiH(48,2)+LaDoMiH(48,2)\nseq_b+=[fa(3,72),fa(3,24),do(4,72),do(4,24)]\n\nseq+=[('wEr',mi(6,24),'D@',so(6,12),'fild',fa(6,36),'zAr',mi(6,12),'grin',re(6,36)),BL(12)]\nseq+=[('tu',do(6,12),'si',mi(6,24),'ju',re(6,12),'w@n',do(6,36),'s@g',mi(6,12),'En',re(6,108)),BL(48)]\nseq_g+=LaDoFaH(48,2)+LaDoFaH(48,2)+SoDoMiH(48,2)+LaDoMiH(48,2)\nseq_b+=[fa(3,72),fa(3,24),do(4,72),la(3,24)]\nseq_g+=FaSLaReH(48,2)+FaSLaReH(24)+SoTiReH(120,4)\nseq_b+=[re(4,72),so(3,72),so(3,48)]\n\nseq+=[('maI',ti(5,24),'l@v',do(6,168)), BL(36)]\nseq_g+=MiSoDoH(192,4)\nseq_b+=[do(3,192)]\n\nseq+=[('aI', so(5,12), 'traI', do(6,24),'tu', do(6,12), 'rEd', do(6, 36)), BL(12)]\nseq+=[('aI',so(5,12), 'goU', re(6,24),'tu', re(6,12), 'w3k',re(6, 36)), BL(12)]\nseq_g+=DoMiSo(48, 2)+DoMiSo(48, 2)+TiReSo(48,2)+TiReSo(48,2)\nseq_b+=[do(4,72), do(4,24),so(3,72),so(3,24)]\n\nseq+=[('aIm', so(5,12), 'l{f', ti(5,24), 'IN', ti(5,12), 'wID', ti(5,24), 'maI',do(6,24),'frEndz',do(6,48)), BL(48)]\nseq_g+=TiMiSo(48,2)+TiMiSo(48,2)+LaDoMi(48,2)+LaDoMi(24)+LaDoMi(12)+LaDoMi(12)\nseq_b+=[mi(3,72),mi(3,24), la(3,96)]\n\nseq+=[('b@t', so(5,12), 'aI', la(5,24), 'k{nt', la(5,12),'stAp', la(5,36)),BL(12)]\nseq+=[('tu',la(5,12),'kip',la(5,24),'maI',la(5,24), 'sElf', la(5,12),'r@m', la(5,24), 'TIN', la(5,24), 'kIN', so(5,36))]\nseq_g+=LaDoFa(48,2)+LaDoFa(24)+LaDoFa(12)+LaDoFa(12)+LaDoFa(48,2)+LaDoFa(48,2)\nseq_b+=[fa(3,96),fa(3,72), fa(3,24)]\n\nseq+=[BL(12),('oU', ti(5,12),la(5,12), 'noU', ti(5,6), la(5,6), so(5,48)), BL(36)]\nseq_g+=DoReSo(48,2)+DoReSo(24)+DoReSo(12)+DoReSo(12)+TiReSo(48,2)+TiReSo(24)+TiReSo(12)+TiReSo(12)\nseq_b+=[so(3,96),so(3,96)]\n\nseq+=[('aI',so(5,12),'w@n',do(6,24),'d3',do(6,12),'haU',do(6,36)), BL(12)]\nseq+=[('aI',so(5,12),'w@n',re(6,24),'d3',re(6,12),'waI',re(6,36)), BL(12)]\nseq_g+=DoMiSo(48, 2)+DoMiSo(48, 2)+TiReSo(48,2)+TiReSo(48,2)\nseq_b+=[do(4,72), do(4,24),so(3,72),so(3,24)]\n\nseq+=[('aI',mi(6,12), 'w@n', so(6,24), 'd3', so(6,12), 'wEr', so(6,12), mi(6,12), 'DeI', mi(6,12), do(6,12), 'Ar', do(6,48)), BL(48)]\nseq_g+=TiMiSo(48,2)+TiMiSo(48,2)+LaDoMi(48,2)+LaDoMi(24)+LaDoMi(12)+LaDoMi(12)\nseq_b+=[mi(3,72),mi(3,24), la(3,48), so(3,48)]\n\nseq+=[('D@',so(5,12),'deIz',la(5,24), 'wi',la(5,12), 'h{d', la(5,36)), BL(12)]\nseq+=[('D@',fa(5,12),'sONz',la(5,24), 'wi',la(5,12), 's{N', do(6,36), 't@g', la(5,12), 'ED', la(5,12), so(5,12), '3', so(5,36)), BL(12)]\nseq_g+=LaDoFa(48,2)+LaDoFa(48,2)+LaDoFa(24)+[fa(4,24), la(4,48), BK(48), re(5,48), BK(48), faS(5,48)]\nseq_b+=[fa(3,72),fa(3,24), fa(3,48), faS(3,48)]\n\nseq+=[('oU', ti(5,12),la(5,12), 'j{', ti(5,6), la(5,6), so(5,48)), BL(24)]\nseq_g+=DoReSo(48,2)+DoReSo(48,2)+TiReSo(48,2)+TiReSo(48,2)\nseq_b+=[so(3,72),so(3,24),so(3,96)]\n\nseq+=[('@n',so(5,24),'dol',fa(6,48),'maI',la(5,48),'l@v',ti(5,48)), BL(36)]\nseq_g+=[fa(5,12),la(4,12),re(5,12),fa(5,60),BK(48),do(5,24),la(4,24)]+Chord3(so,4,re,5,so,5,96,4)\nseq_b+=[re(4,48),do(4,48),ti(3,48),ti(3,48)]\n\nseq+=[('aIm',so(5,12),'hoU',do(6,24),'ldIN',do(6,12),'An',do(6,36),'f3',mi(6,12),'Ev',re(6,12),do(6,12),'3',do(6,36)),BL(48)]\nseq_g+=[so(4,48),BK(46),mi(5,46),do(5,48),BK(46),so(5,46)]+LaDoFa(48,2)+LaDoFa(48,2)\nseq_b+=[do(4,48),mi(3,48),fa(3,48),fa(3,24),mi(3,24)]\n\nseq+=[('ri',fa(6,24),'tSIN',fa(6,12),'fOr',fa(6,36),'D@',fa(6,12),'l@v',fa(6,36),'D{t',mi(6,12),'simz',do(6,24),'soU',re(6,36),'fAr',re(6,96)), BL(48)]\nseq_g+=LaReFa(48,2)+LaReFa(48,2)+LaDoFa(48,2)+LaReFa(48,2)\nseq_b+=[re(3,72),mi(3,24),fa(3,96)]\nseq_g+=DoReSo(48,2)+DoReSo(48,2)+TiReSo(96,4)\nseq_b+=[so(3,72),so(3,24),so(3,96)]\n\nseq+=[('soU',do(6,24),'aI',ti(5,24),'seI',la(5,24),'@',so(5,12),'lIt',so(5,24),'@l',so(5,24),'prEr',so(5,36)), BL(12)]\nseq_g+=FaLaDoH(48,2)+FaLaDoH(48,2)+MiSoDoH(48,2)+MiSoDoH(48,2)\nseq_b+=[fa(3,72),fa(3,24),do(4,96)]\n\nseq+=[('@nd',so(5,12),'hoUp',do(6,24),'maI',ti(5,24),'drimz',la(5,24),'wIl',so(5,12),'teIk',so(5,24),'mi',fa(5,24),'DEr',mi(5,36)), BL(24)]\nseq_g+=FaLaDoH(48,2)+FaLaDoH(48,2)+MiSoDoH(48,2)+MiSoDoH(48,2)\nseq_b+=[fa(3,72),fa(3,24),do(4,72),do(4,24)]\n\nseq+=[('wEr',mi(6,24),'D@',so(6,24),'skaIz',fa(6,24),'Ar',mi(6,12),'blu',re(6,36)),BL(12)]\nseq+=[('tu',do(6,12),'si',mi(6,24),'ju',re(6,12),'w@n',do(6,36),'s@g',mi(6,12),'En',re(6,60),'maI',la(5,24),'l@v',ti(5,48)),BL(24)]\nseq_g+=LaDoFaH(48,2)+LaDoFaH(48,2)+SoDoMiH(48,2)+LaDoMiH(48,2)\nseq_b+=[fa(3,72),fa(3,24),do(4,72),la(3,24)]\nseq_g+=FaSLaReH(48,2)+FaSLaReH(48,2)+TiReSoH(48,2)+TiReSoH(48,2)\nseq_b+=[faS(3,72),faS(3,24),so(3,72),so(3,24)]\n\nseq+=[('oU',do(6,24),'v3',ti(5,24),'siz',la(5,24),'fr@m',so(5,12),'koUst',so(5,36),'u',fa(5,12),'koUst',so(5,36)),BL(12)]\nseq_g+=LaDoFaH(48,2)+LaDoFaH(48,2)+SoDoMiH(48,2)+LaDoMiH(48,2)\nseq_b+=[fa(3,72),fa(3,24),do(4,96)]\n\nseq+=[('tu',so(5,12),'faInd',do(6,24),'D@',ti(5,12),'pleIs',la(5,36),'aI',so(5,12),'l@v',so(6,24),fa(6,12),'D@',fa(6,12),'moUst',mi(6,36)),BL(24)]\nseq_g+=LaDoFaH(48,2)+LaDoFaH(48,2)+SoDoMiH(48,2)+LaDoMiH(48,2)\nseq_b+=[fa(3,72),fa(3,24),do(4,72),do(4,24)]\n\nseq+=[('wEr',mi(6,24),'D@',so(6,12),'fild',fa(6,36),'zAr',mi(6,12),'grin',re(6,36)),BL(12)]\nseq+=[('tu',do(6,12),'si',mi(6,24),'ju',re(6,12),'w@n',do(6,36),'s@g',mi(6,12),'En',re(6,72)),BL(24)]\nseq_g+=LaDoFaH(48,2)+LaDoFaH(48,2)+SoDoMiH(48,2)+LaDoMiH(48,2)\nseq_b+=[fa(3,72),fa(3,24),do(4,72),la(3,24)]\n\nseq+=[('tu',la(5,12),'hoUl',mi(6,24),'dju',re(6,12),'In',do(6,36),'maI',ti(5,12),'Armz',do(6,60)), BL(36)]\nseq_g+=FaSLaReH(96,4)+SoSTiMiH(48,2)+[ti(5,48), BK(46), mi(6,46)]\nseq_b+=[re(4,72),re(4,24),mi(4,48), soS(3,48)]\n\nseq+=[('tu',la(5,12),'prAm',re(6,24),'@s',do(6,12),'ju',ti(5,24),'maI',la(5,24),'l@v',ti(5,24),la(5,12),so(5,24)), BL(36)]\nseq_g+=MiLaDoH(48,2)+MiLaDoH(48,2)+[re(5,48),BK(46),la(5,46),re(5,48),BK(46),la(5,46)]\nseq_b+=[la(3,72),la(3,24),faS(3,72),faS(3,24)]\n\nseq+=[('tu',la(5,12),'tEl',mi(6,24),'ju',re(6,12),'fr@m',do(6,36),'D@',ti(5,12),'hArt',do(6,60)), BL(36)]\nseq_g+=ReSoTi(48,2)+ReSoTi(48,2)+[soS(5,48),mi(5,48),BK(96),mi(6,24),re(6,12),do(6,36),ti(5,24)]\nseq_b+=[so(3,72),so(3,24),mi(3,48),soS(3,48)]\n\nseq+=[('jUr',mi(5,12),'Ol',la(5,24),'aIm',la(5,12),'TIN',la(5,36),'kIN',so(5,12),'Ov',so(5,156)),BL(48)]\nseq_g+=MiLaDoH(48,2)+MiLaDoH(48,2)+[re(5,48),BK(46),la(5,46),re(5,48),BK(46),la(5,46)]\nseq_b+=[la(3,72), la(3,24),faS(3,72),faS(3,24)]\nseq_g+=ReSoDoH(48,2)+ReSoDoH(48,2)\nseq_g+=[re(5,96), BK(92), so(5,92), BK(90), ti(5,42), la(5,24), ti(5,24)]\nseq_b+=[so(3,72), re(4,24), so(3,96)]\n\nseq+=[BL(192)]\nseq_g+=[mi(5,96), BK(92), so(5,92), BK(92), do(6,20), do(6,12), do(6,48), do(6,12), so(5,36), ti(5,60), BK(96), do(6,12), re(6,12), re(6,12), re(6,60)]\nseq_b+=[do(4,96), so(3,96)]\n\nseq+=[BL(192-12)]\nseq_g+=[so(5,84), mi(5,108), BK(192), ti(5,24), ti(5,12), ti(5,24), do(6,24), do(6,60), ti(5,48)]\nseq_b+=[mi(3,96), la(3,48), so(3,48)]\n\nseq+=[('aIm',fa(5,12), 'ri',fa(6,24),'tSIN',fa(6,12),'fOr',fa(6,36),'D@',fa(6,12), 'l@v',fa(6,24),mi(6,12),'D{t',mi(6,12), 'simz',do(6,24),'soU',re(6,36), 'fAr', re(6,72)), BL(24)]\nseq_g+=DoFaLa(48,2)+DoFaLa(24)+DoFaLa(24)+DoFaLa(48,2)+DoFaLa(24)+DoFaLa(24)\nseq_b+=[fa(3,96),fa(3,96)]\n\nseq+=[('soU',re(6,48),'aI',re(6,24),doS(6,24))]\nseq_g+=ReSoDoH(48,2)+ReSoDoH(48,2)+ReSoTi(24)+[re(5,12),mi(5,12),faS(5,10),so(5,10),la(5,10),ti(5,9),doS(6,9)]\nseq_b+=[so(3,96),so(3,24), BL(24), BL(48)]\n\n# To D\nFreqs[:]=FreqsD\n\nseq+=[('seI',la(5,24),'@',so(5,12),'lIt',so(5,24),'@l',so(5,24),'prEr',so(5,36)), BL(12)]\nseq_g+=FaLaDoH(48,2)+FaLaDoH(48,2)+MiSoDoH(48,2)+MiSoDoH(48,2)\nseq_b+=[fa(3,72),fa(3,24),do(4,96)]\n\nseq+=[('@nd',so(5,12),'hoUp',do(6,24),'maI',ti(5,24),'drimz',la(5,24),'wIl',so(5,12),'teIk',so(5,24),'mi',fa(5,24),'DEr',mi(5,36)), BL(24)]\nseq_g+=FaLaDoH(48,2)+FaLaDoH(48,2)+MiSoDoH(48,2)+MiSoDoH(48,2)\nseq_b+=[fa(3,72),fa(3,24),do(4,72),do(4,24)]\n\nseq+=[('wEr',mi(6,24),'D@',so(6,24),'skaIz',fa(6,24),'Ar',mi(6,12),'blu',re(6,36)),BL(12)]\nseq+=[('tu',do(6,12),'si',mi(6,24),'ju',re(6,12),'w@n',do(6,36),'s@g',mi(6,12),'En',re(6,60),'maI',la(5,24),'l@v',ti(5,48)),BL(24)]\nseq_g+=LaDoFaH(48,2)+LaDoFaH(48,2)+SoDoMiH(48,2)+LaDoMiH(48,2)\nseq_b+=[fa(3,72),fa(3,24),do(4,72),la(3,24)]\nseq_g+=FaSLaReH(48,2)+FaSLaReH(48,2)+TiReSoH(48,2)+TiReSoH(48,2)\nseq_b+=[faS(3,72),faS(3,24),so(3,72),so(3,24)]\n\nseq+=[('oU',do(6,24),'v3',ti(5,24),'siz',la(5,24),'fr@m',so(5,12),'koUst',so(5,36),'u',fa(5,12),'koUst',so(5,36)),BL(12)]\nseq_g+=LaDoFaH(48,2)+LaDoFaH(48,2)+SoDoMiH(48,2)+LaDoMiH(48,2)\nseq_b+=[fa(3,72),fa(3,24),do(4,96)]\n\nseq+=[('tu',so(5,12),'faInd',do(6,24),'D@',ti(5,12),'pleIs',la(5,36),'aI',so(5,12),'l@v',so(6,24),fa(6,12),'D@',fa(6,12),'moUst',mi(6,36)),BL(24)]\nseq_g+=LaDoFaH(48,2)+LaDoFaH(48,2)+SoDoMiH(48,2)+LaDoMiH(48,2)\nseq_b+=[fa(3,72),fa(3,24),do(4,72),do(4,24)]\n\nseq+=[('wEr',mi(6,24),'D@',so(6,12),'fild',fa(6,36),'zAr',mi(6,12),'grin',re(6,36)),BL(12)]\nseq+=[('tu',do(6,12),'si',mi(6,24),'ju',re(6,12),'w@n',do(6,36),'s@g',mi(6,12),'En',re(6,108)),BL(48)]\nseq+=[('soU',do(6,24),'aI',ti(5,24))]\nseq_g+=LaDoFaH(48,2)+LaDoFaH(48,2)+SoDoMiH(48,2)+LaDoMiH(48,2)\nseq_b+=[fa(3,72),fa(3,24),do(4,72),la(3,24)]\nseq_g+=FaSLaReH(48,2)+FaSLaReH(24)+[so(5,120), BK(116),ti(5,68),BK(64),re(6,64), do(6,24), ti(5,24)]\nseq_b+=[re(4,72),so(3,72),so(3,48)]\n\nseq+=[('seI',la(5,24),'@',so(5,12),'lIt',so(5,24),'@l',so(5,24),'prEr',so(5,36)), BL(12)]\nseq_g+=FaLaDoH(48,2)+FaLaDoH(48,2)+MiSoDoH(48,2)+MiSoDoH(48,2)\nseq_b+=[fa(3,72),fa(3,24),do(4,96)]\n\nseq+=[('@nd',so(5,12),'hoUp',do(6,24),'maI',ti(5,24),'drimz',la(5,24),'wIl',so(5,12),'teIk',so(5,24),'mi',fa(5,24),'DEr',mi(5,36)), BL(24)]\nseq_g+=FaLaDoH(48,2)+FaLaDoH(48,2)+MiSoDoH(48,2)+MiSoDoH(48,2)\nseq_b+=[fa(3,72),fa(3,24),do(4,72),do(4,24)]\n\nseq+=[('wEr',mi(6,24),'D@',so(6,24),'skaIz',fa(6,24),'Ar',mi(6,12),'blu',re(6,36)),BL(12)]\nseq+=[('tu',do(6,12),'si',mi(6,24),'ju',re(6,12),'w@n',do(6,36),'s@g',mi(6,12),'En',re(6,60),'maI',la(5,24),'l@v',ti(5,48)),BL(24)]\nseq_g+=LaDoFaH(48,2)+LaDoFaH(48,2)+SoDoMiH(48,2)+LaDoMiH(48,2)\nseq_b+=[fa(3,72),fa(3,24),do(4,72),la(3,24)]\nseq_g+=FaSLaReH(48,2)+FaSLaReH(48,2)+TiReSoH(48,2)+TiReSoH(48,2)\nseq_b+=[faS(3,72),faS(3,24),so(3,72),so(3,24)]\n\nseq+=[('oU',do(6,24),'v3',ti(5,24),'siz',la(5,24),'fr@m',so(5,12),'koUst',so(5,36),'u',fa(5,12),'koUst',so(5,36)),BL(12)]\nseq_g+=LaDoFaH(48,2)+LaDoFaH(48,2)+SoDoMiH(48,2)+LaDoMiH(48,2)\nseq_b+=[fa(3,72),fa(3,24),do(4,96)]\n\nseq+=[('tu',so(5,12),'faInd',do(6,24),'D@',ti(5,12),'pleIs',la(5,36),'aI',so(5,12),'l@v',so(6,24),fa(6,12),'D@',fa(6,12),'moUst',mi(6,36)),BL(24)]\nseq_g+=LaDoFaH(48,2)+LaDoFaH(48,2)+SoDoMiH(48,2)+LaDoMiH(48,2)\nseq_b+=[fa(3,72),fa(3,24),do(4,72),do(4,24)]\n\nseq+=[('wEr',mi(6,24),'D@',so(6,12),'fild',fa(6,36),'zAr',mi(6,12),'grin',re(6,36)),BL(12)]\nseq+=[('tu',do(6,12),'si',mi(6,24),'ju',re(6,12),'w@n',do(6,36),'s@g',mi(6,12),'En',re(6,108)),BL(48)]\nseq_g+=LaDoFaH(48,2)+LaDoFaH(48,2)+SoDoMiH(48,2)+LaDoMiH(48,2)\nseq_b+=[fa(3,72),fa(3,24),do(4,72),la(3,24)]\nseq_g+=FaSLaReH(72,2)+SoTiReH(120,4)\nseq_b+=[faS(3,48),faS(3,24),so(3,120)]\n\nseq+=[('maI',ti(5,24),'l@v',do(6,168)), BL(48)]\nseq_g+=[so(4,192), BK(188), do(5,188), BK(184), mi(5,184)]\nseq_b+=[do(3,192)]\n\ndoc.sing(seq, Teto, track)\ndoc.playNoteSeq(seq_g, Guitar, track_g)\ndoc.playNoteSeq(seq_b, Bass, track_b)\n\ndoc.setTrackVolume(track_g, 0.5)\ndoc.setTrackVolume(track_b, 0.5)\n\ndoc.meteor()\ndoc.mixDown('MyLove.wav')\n```\n\n\n\n\n\n"
  },
  {
    "path": "docs/meteor/SoreFeetSong.md",
    "content": "<script type=\"text/javascript\" src=\"meteor.js\"></script>\n\n<script type=\"text/javascript\">\n    window.onload = function() {\n        var restiktok = {\n            canvasID : \"canvastiktok\",\n            audioID : \"audiotiktok\",\n            dataPath : \"SoreFeetSong.meteor\"\n        };\n        meteortiktok = new Meteor(restiktok);\n    };\n</script>\n\n<style type=\"text/css\">\n    canvas {\n        display: block;\n        width: 100%;\n        height: width*0.5625;\n    }\t\t\n</style>\n\n<div>\n    <canvas id=\"canvastiktok\" width=\"800\" height=\"450\"></canvas>\n</div>\n<div>\n    <audio id='audiotiktok' controls=\"controls\">\n        <source type=\"audio/mpeg\" src=\"SoreFeetSong.mp3\"/>\n    </audio>\n</div>\n\n# The Sore Feet Song\n\n## Info\n* The song is from Anime 蟲師 produced by ARTLAND.\n* Originally sung by: Ally Kerr\n* Melody/Lyric by: Ally Kerr\n* WALTTenglish Z VCCV: http://utau.wikia.com/wiki/WALTT\n\n```python\nimport ScoreDraft\nfrom ScoreDraft.Notes import *\n\ndef miF(octave=5, duration=48):\n\treturn note(octave,Freqs[3],duration)\n\ndoc=ScoreDraft.MeteorDocument()\n\nsinger = ScoreDraft.WALTT_Z_UTAU()\nsinger.setLyricConverter(ScoreDraft.VCCVEnglishConverter)\nsinger.setCZMode()\n\nGuitar = ScoreDraft.NylonGuitar()\n\nFreqsB=[f*Freqs[11]*0.5 for f in Freqs]\nFreqs[:]=FreqsB\n\ntrack=doc.newBuf()\ntrack_g=doc.newBuf()\n\ndef Repeat(x,t):\n\tret=[]\n\tfor i in range(t):\n\t\tret+=x\n\treturn ret\n\n\nseq=[BL(192)]\nseq_g = [so(4,32),re(5,16),so(5,96),BK(96),re(6,32),ti(5,16),do(6,32),ti(5,16),re(5,48),BK(48),so(5,48)]\n\nseq+=[BL(192)]\nseq_g += [fa(4,32),do(5,16),fa(5,96), BK(144), la(5,32), so(5,48), la(5,48), so(5,64), BK(48), do(5,48)]\n\nseq+=[BL(192)]\nseq_g +=  [do(4,32),so(4,16),do(5,96),BK(96),re(6,32),ti(5,16),do(6,32),ti(5,16),so(4,48),BK(48),so(5,48)]\n\nseq+=[BL(192)]\nseq_g += [so(4,32),re(5,16),so(5,96), BK(144), la(5,32), so(5,48), ti(5,48), so(5,64), BK(48), re(4,48)]\n\nseq+=[BL(48)]\nline= ('I',so(4,48),'w9lk',so(4,48),'ten',so(4,48))\nseq_g += [so(3,32),re(4,16),so(4,96), re(4,48)]\n\nline +=('th8',fa(4,24),'zxnd',so(4,48),'mIls',so(4,72),'ten',so(4,48))\nseq_g += [fa(3,32),do(4,16),fa(4,96), do(4,48)]\n\nline +=('th8',mi(4,24),'zxnd',so(4,48),'mIls',so(4,72),'t6',so(4,24))\nseq_g += [do(4,32),so(4,16),do(5,96), do(4,48)]\n\nline +=('sE',ti(4,48),'yx',so(4,48))\nseq+=[line, BL(120)]\nseq_g += [so(3,32),re(4,16),so(4,96), re(4,48), BK(144), re(6,32), ti(5,16), do(6,32), ti(5,16), so(5,48)]\n\nseq+=[BL(48)]\nline= ('&amp;nd',so(4,48),'ev',so(4,48),'ri',so(4,48))\nseq_g += [so(3,32),re(4,16),so(4,96), re(4,48)]\n\nline +=('g@sp',fa(4,24),'xv',so(4,48),'breth',so(4,72),'I',so(4,48))\nseq_g += [fa(3,32),do(4,16),fa(4,96), do(4,48)]\n\nline +=('gr@bd',mi(4,24),'it',so(4,48),'zhust',so(4,72),'t6',so(4,24))\nseq_g += [do(4,32),so(4,16),do(5,96), do(4,48)]\n\nline +=('fInd',ti(4,48),'yx',so(4,48))\nseq+=[line, BL(120)]\nseq_g += [so(3,32),re(4,16),so(4,96), re(4,48), BK(144), re(6,32), ti(5,16), do(6,32), ti(5,16), so(5,48)]\n\nseq+=[BL(48)]\nline= ('I',so(4,48),'klImbd',so(4,48),'up',so(4,48))\nseq_g += [so(3,32),re(4,16),so(4,96), re(4,48), BK(144),re(5,48),re(5,48),re(5,48)]\n\nline+=('ev',do(5,48),'ri',ti(4,48),'hill',la(4,48),'t6',ti(4,32))\nseq_g+=[fa(3,48),do(4,48),fa(4,48),do(4,48), BK(192), so(5,48), so(5,48),so(5,48),so(5,32)]\n\nline+=('get',so(4,112))\nseq+=[line, BL(32)]\nline = ('t6', so(4,24), la(4,40))\nseq_g+=[mi(5,112), BL(32), mi(5,64), BK(192), do(3,32),so(3,16),do(4,96),so(3,48)]\n\nline +=('yx', so(4,96))\nseq+=[line, BL(96)]\nseq_g+=[mi(5,96), BK(96), so(3,32),re(4,16),so(4,96), re(4,48), BK(144), re(6,32), ti(5,16), do(6,32), ti(5,16), so(5,48)]\n\nseq+=[BL(48)]\nline= ('I',so(4,48),'wan',so(4,48),'d3d',so(4,48))\nseq_g += [so(3,32),re(4,16),so(4,96), re(4,48), BK(144),re(5,48),re(5,48),re(5,48)]\n\nline+=('An',do(5,48),'shent',ti(4,48),'l&amp;nd',la(4,48),'st6',ti(4,32))\nseq_g+=[fa(3,48),do(4,48),fa(4,48),do(4,48), BK(192), so(5,48), so(5,48),so(5,48),so(5,32)]\n\nline+=('hOd',so(4,112))\nseq+=[line, BL(32)]\nline = ('zhust', so(4,24), la(4,40))\nseq_g+=[mi(5,112), BL(32), mi(5,64), BK(192), do(3,32),so(3,16),do(4,96),so(3,48)]\n\nline +=('yx', so(4,96))\nseq+=[line, BL(96)]\nseq_g+=[so(3,32),re(4,16),so(4,32),so(4,48),so(4,16), so(4,12),re(4,12),so(3,24), BK(192), mi(5,192)]\n\nseq+=[BL(48)]\nline= ('&amp;nd',fa(4,48),'ev',fa(4,48),'ri',fa(4,48))\nseq_g+=[re(3,32),la(3,16),re(4,96),la(3,48)]\n\nline+=('s1ng', fa(4,48), 'gx', fa(4,32), 'step',mi(4,48), 'xv', do(4,16), re(4,12),'dhx', do(4,36))\nseq_g+=[fa(3,32),do(4,16),fa(4,96),fa(3,48)]\n\nline+=('wA',do(4,96), BL(72), 'I',do(4,24))\nseq_g+=[do(4,32),so(4,16),do(5,96),BK(96), do(5,32), do(5,48), do(5,48), do(5,16)]\n\nline+=('pA',do(4,48),'A', mi(4,48),'A',fa(4,48),'A',mi(4,48))\nseq_g+=Repeat([do(4,48),BK(42),so(4,42),BK(36),do(5,36)],4)\n\nline+=('Ad',re(4,72))\nseq+=[line,BL(24)]\nline=('ev',fa(4,48),'ri',fa(4,48))\nseq_g+=[re(3,24),la(3,24),re(4,48),BL(48),re(4,48)]\n\nline+=('s1ng', fa(4,48), 'gxl', so(4,48), 'nIt', la(4,48), '&amp;n', ti(4,24),do(5,168))\nseq+=[line, BL(48)]\nseq_g+=[so(3,48),fa(4,48),la(4,48),do(5,48), BL(192)]\n\nline=('dA',ti(4,144), 'A',la(4,48),so(4,144), 'I',so(4,24),la(4,24))\nseq_g+=[so(3,192), BK(192), so(4,24),re(4,24),so(3,24),so(4,48),so(3,24),so(4,48)]\nseq_g+=[so(3,192), BK(192), fa(4,24),re(4,24),so(3,24),fa(4,48),so(3,24),fa(4,48)]\n\nline+=('s3ch',so(4,144),'f0r',fa(4,48))\nseq_g+=[do(4,192), BK(168), mi(4,24), so(4,24),do(5,24),so(4,24),mi(4,24), BL(48)]\n\nline+=('yx', so(4,120))\nseq+=[line, BL(24)]\nline= ('thro',re(4,48))\nseq_g+=[do(4,192), BK(168), miF(4,24), so(4,24),do(5,24),so(4,24),miF(4,24), BL(48)]\n\nline+=('s&amp;nd', ti(4,72),'st0rms', ti(4,72), '&amp;nd', do(5,48))\nseq_g+=[so(3,96), BK(96), so(4,24), re(4,24), so(3,24), so(4,24), re(4,24), so(3,24), so(4,24),re(4,24), BK(192), so(5,72), so(5,72), so(5,48)] \n\nline+=('hA', ti(4,48), 'zi', la(4,24), 'dans', so(4,60))\nseq+=[line, BL(12)]\nline=('I', so(4,24),la(4,24))\nseq_g+=[so(5,48), BK(48), so(3,96), BK(96), fa(4,24), re(4,24), so(3,24), fa(4,24), re(4,24), so(3,24), fa(4,24),re(4,24)] \n\nline+=('rEch',so(4,144),'f0r',fa(4,48))\nseq_g+=[do(4,192), BK(168), mi(4,24), so(4,24),do(5,24),so(4,24),mi(4,24), so(4,24), BL(24)]\n\nline+=('yx', so(4,144), la(4,48), so(4,144))\nseq+=[line, BL(48)]\nseq_g+=[do(4,192), BK(168), miF(4,24), so(4,24),do(5,24),so(4,24),miF(4,24), so(4,24), BL(24)]\nseq_g+=[do(4,192), BK(168), re(4,24), so(4,24),do(5,24),so(4,24),re(4,24), so(3,48), BK(42), do(4,42), BK(36), re(4,36), BK(30), so(4,30) ]\n\nseq+=[BL(48)]\nline= ('I',so(4,48),'st0l',so(4,48),'ten',so(4,48))\nseq_g += [so(3,32),re(4,16),so(4,96), re(4,48)]\n\nline +=('th8',fa(4,24),'zxnd',so(4,48),'p9nd',so(4,72),'ten',so(4,48))\nseq_g += [fa(3,32),do(4,16),fa(4,96), do(4,48)]\n\nline +=('th8',mi(4,24),'zxnd',so(4,48),'p9nd',so(4,72),'t6',so(4,24))\nseq_g += [do(4,32),so(4,16),do(5,96), do(4,48)]\n\nline +=('sE',ti(4,48),'yx',so(4,48))\nseq+=[line, BL(120)]\nseq_g += [so(3,32),re(4,16),so(4,96), re(4,48), BK(144), re(6,32), ti(5,16), do(6,32), ti(5,16), so(5,48)]\n\nseq+=[BL(48)]\nline= ('I',so(4,48),'rubd',so(4,48),'kxn',so(4,48))\nseq_g += [so(3,32),re(4,16),so(4,96), re(4,48)]\n\nline +=('vE',fa(4,24),'nixn',so(4,48),'st0r',so(4,72),'kas',so(4,24),'I',so(4,24))\nseq_g += [fa(3,32),do(4,16),fa(4,96), do(4,48)]\n\nline +=('th8t',mi(4,24),'dhAd',so(4,48),'mAk',so(4,72),'it',so(4,24))\nseq_g += [do(4,32),so(4,16),do(5,96), do(4,48)]\n\nline +=('E',ti(4,48),'zEr',so(4,48))\nseq+=[line, BL(120)]\nseq_g += [so(3,32),re(4,16),so(4,96), re(4,48), BK(144), re(6,32), ti(5,16), do(6,32), ti(5,16), so(5,48)]\n\nseq+=[BL(48)]\nline= ('I',so(4,48),'livd',so(4,48),'9f',so(4,48))\nseq_g += [so(3,32),re(4,16),so(4,96), re(4,48), BK(144),re(5,48),re(5,48),re(5,48)]\n\nline+=('r@ts',do(5,48),'&amp;nd',ti(4,48),'tOds',la(4,32),'&amp;nd', la(4,24), 'I', ti(4,24))\nseq_g+=[fa(3,48),do(4,48),fa(4,48),do(4,48), BK(192), so(5,48), so(5,48),so(5,48),so(5,32)]\n\nline+=('starv',so(4,112))\nseq+=[line, BL(32)]\nline = ('f0r', so(4,24), la(4,40))\nseq_g+=[mi(5,112), BL(32), mi(5,64), BK(192), do(3,32),so(3,16),do(4,96),so(3,48)]\n\nline +=('yx', so(4,96))\nseq+=[line, BL(96)]\nseq_g+=[mi(5,96), BK(96), so(3,32),re(4,16),so(4,96), re(4,48), BK(144), re(6,32), ti(5,16), do(6,32), ti(5,16), so(5,48)]\n\nseq+=[BL(48)]\nline= ('I',so(4,48),'f8t',so(4,48),'9f',so(4,48))\nseq_g += [so(3,32),re(4,16),so(4,96), re(4,48), BK(144),re(5,48),re(5,48),re(5,48)]\n\nline+=('zhI',do(5,48),'xnt',ti(4,48),'bAr',la(4,32),'&amp;nd',la(4,24),'I',ti(4,24))\nseq_g+=[fa(3,48),do(4,48),fa(4,48),do(4,48), BK(192), so(5,48), so(5,48),so(5,48),so(5,32)]\n\nline+=('kild',so(4,112))\nseq+=[line, BL(32)]\nline = ('dhem', so(4,24), la(4,40))\nseq_g+=[mi(5,112), BL(32), mi(5,64), BK(192), do(3,32),so(3,16),do(4,96),so(3,48)]\n\nline +=('to', so(4,96))\nseq+=[line, BL(96)]\nseq_g+=[so(3,32),re(4,16),so(4,32),so(4,48),so(4,16), so(4,12),re(4,12),so(3,24), BK(192), mi(5,192)]\n\nseq+=[BL(48)]\nline= ('&amp;nd',fa(4,48),'ev',fa(4,48),'ri',fa(4,48))\nseq_g+=[re(3,32),la(3,16),re(4,96),la(3,48)]\n\nline+=('s1ng', fa(4,48), 'gx', fa(4,32), 'step',mi(4,48), 'xv', do(4,16), re(4,12),'dhx', do(4,36))\nseq_g+=[fa(3,32),do(4,16),fa(4,96),fa(3,48)]\n\nline+=('wA',do(4,96), BL(72), 'I',do(4,24))\nseq_g+=[do(4,32),so(4,16),do(5,96),BK(96), do(5,32), do(5,48), do(5,48), do(5,16)]\n\nline+=('pA',do(4,48),'A', mi(4,48),'A',fa(4,48),'A',mi(4,48))\nseq_g+=Repeat([do(4,48),BK(42),so(4,42),BK(36),do(5,36)],4)\n\nline+=('Ad',re(4,72))\nseq+=[line,BL(24)]\nline=('ev',fa(4,48),'ri',fa(4,48))\nseq_g+=[re(3,24),la(3,24),re(4,48),BL(48),re(4,48)]\n\nline+=('s1ng', fa(4,48), 'gxl', so(4,48), 'nIt', la(4,48), '&amp;n', ti(4,24),do(5,168))\nseq+=[line, BL(48)]\nseq_g+=[so(3,48),fa(4,48),la(4,48),do(5,48), BL(192)]\n\nline=('dA',ti(4,144), 'A',la(4,48),so(4,144), 'I',so(4,24),la(4,24))\nseq_g+=[so(3,192), BK(192), so(4,24),re(4,24),so(3,24),so(4,48),so(3,24),so(4,48)]\nseq_g+=[so(3,192), BK(192), fa(4,24),re(4,24),so(3,24),fa(4,48),so(3,24),fa(4,48)]\n\nline+=('s3ch',so(4,144),'f0r',fa(4,48))\nseq_g+=[do(4,192), BK(168), mi(4,24), so(4,24),do(5,24),so(4,24),mi(4,24), BL(48)]\n\nline+=('yx', so(4,120))\nseq+=[line, BL(24)]\nline= ('thro',re(4,48))\nseq_g+=[do(4,192), BK(168), miF(4,24), so(4,24),do(5,24),so(4,24),miF(4,24), BL(48)]\n\nline+=('s&amp;nd', ti(4,72),'st0rms', ti(4,72), '&amp;nd', do(5,48))\nseq_g+=[so(3,96), BK(96), so(4,24), re(4,24), so(3,24), so(4,24), re(4,24), so(3,24), so(4,24),re(4,24), BK(192), so(5,72), so(5,72), so(5,48)] \n\nline+=('hA', ti(4,48), 'zi', la(4,24), 'dans', so(4,60))\nseq+=[line, BL(12)]\nline=('I', so(4,24),la(4,24))\nseq_g+=[so(5,48), BK(48), so(3,96), BK(96), fa(4,24), re(4,24), so(3,24), fa(4,24), re(4,24), so(3,24), fa(4,24),re(4,24)] \n\nline+=('rEch',so(4,144),'f0r',fa(4,48))\nseq_g+=[do(4,192), BK(168), mi(4,24), so(4,24),do(5,24),so(4,24),mi(4,24), so(4,24), BL(24)]\n\nline+=('yx', so(4,120))\nseq+=[line, BL(24)]\nline=('Im', ti(4,24),do(5,24))\nseq_g+=[do(4,192), BK(168), miF(4,24), so(4,24),do(5,24),so(4,24),miF(4,24), so(4,24), BL(24)]\n\nline+=('tIrd', ti(4,72),'&amp;nd', ti(4,72), 'Im', do(5,48))\nseq_g+=[so(3,96), BK(96), so(4,24), re(4,24), so(3,24), so(4,24), re(4,24), so(3,24), so(4,24),re(4,24), BK(192), so(5,72), so(5,72), so(5,48)] \n\nline+=('wEk', re(5,72), 'but', do(5,60))\nseq+=[line, BL(12)]\nline=('Im', ti(4,48))\nseq_g+=[so(5,48), BK(48), so(3,96), BK(96), fa(4,24), re(4,24), so(3,24), fa(4,24), re(4,24), so(3,24), fa(4,24),re(4,24)] \n\nline+=('strang',so(4,144),'f0r',so(4,24),la(4,24))\nseq_g+=[do(4,192), BK(168), mi(4,24), so(4,24),do(5,24),so(4,24),mi(4,24), so(4,24), BL(24)]\n\nline+=('yx', so(4,120))\nseq+=[line, BL(24)]\nline=('I', ti(4,24),do(5,24))\nseq_g+=[do(4,192), BK(168), miF(4,24), so(4,24),do(5,24),so(4,24),miF(4,24), so(4,24), BL(24)]\n\nline+=('wan', ti(4,72),'t6', ti(4,72), 'gO', do(5,48))\nseq_g+=[so(3,96), BK(96), so(4,24), re(4,24), so(3,24), so(4,24), re(4,24), so(3,24), so(4,24),re(4,24), BK(192), so(5,72), so(5,72), so(5,48)] \n\nline+=('hOm', re(5,72), 'but', do(5,60))\nseq+=[line, BL(12)]\nline=('mI', ti(4,48))\nseq_g+=[so(5,48), BK(48), so(3,96), BK(96), fa(4,24), re(4,24), so(3,24), fa(4,24), re(4,24), so(3,24), fa(4,24),re(4,24)] \n\nline+=('luv',so(4,96),'gets',so(4,48),'mi',la(4,48))\nseq_g+=[do(4,192), BK(168), mi(4,24), so(4,24),do(5,24),so(4,24),mi(4,24), so(4,24), BL(24)]\n\nline+=('thro', so(4,120))\nseq+=[line, BL(24)]\nline=('la', ti(4,24),do(5,24))\nseq_g+=[do(4,192), BK(168), miF(4,24), so(4,24),do(5,24),so(4,24),miF(4,24), so(4,24), BL(24)]\n\nline+=('la', ti(4,72),'la', ti(4,72), 'la', do(5,48))\nseq_g+=[so(3,96), BK(96), so(4,24), re(4,24), so(3,24), so(4,24), re(4,24), so(3,24), so(4,24),re(4,24), BK(192), so(5,72), so(5,72), so(5,48)] \n\nline+=('la', re(5,72), 'la', do(5,60))\nseq+=[line, BL(12)]\nline=('la', ti(4,48))\nseq_g+=[so(5,48), BK(48), so(3,96), BK(96), fa(4,24), re(4,24), so(3,24), fa(4,24), re(4,24), so(3,24), fa(4,24),re(4,24)] \n\nline+=('la',so(4,96),'la',so(4,48),'la',la(4,48))\nseq_g+=[do(4,192), BK(168), mi(4,24), so(4,24),do(5,24),so(4,24),mi(4,24), so(4,24), BL(24)]\n\nline+=('la', so(4,120))\nseq+=[line, BL(24)]\nline=('la', ti(4,24),do(5,24))\nseq_g+=[do(4,192), BK(168), miF(4,24), so(4,24),do(5,24),so(4,24),miF(4,24), so(4,24), BL(24)]\n\nline+=('la', ti(4,72),'la', ti(4,72), 'la', do(5,48))\nseq_g+=[so(3,96), BK(96), so(4,24), re(4,24), so(3,24), so(4,24), re(4,24), so(3,24), so(4,24),re(4,24), BK(192), so(5,72), so(5,72), so(5,48)] \n\nline+=('la', re(5,72), 'la', do(5,60))\nseq+=[line, BL(12)]\nline=('la', ti(4,48))\nseq_g+=[so(5,48), BK(48), so(3,96), BK(96), fa(4,24), re(4,24), so(3,24), fa(4,24), re(4,24), so(3,24), fa(4,24),re(4,24)] \n\nline+=('la',so(4,96),'la',so(4,48),'la',la(4,48))\nseq_g+=[do(4,192), BK(168), mi(4,24), so(4,24),do(5,24),so(4,24),mi(4,24), so(4,24), BL(24)]\n\nline+=('la', so(4,144))\nseq+=[line, BL(24)]\nseq_g+=[do(4,192), BK(168), miF(4,24), so(4,24),do(5,24),so(4,24),miF(4,24), so(3,96), BK(90), do(4,90), BK(84), re(4,84), BK(78), so(4,78)]\n\n\n#seq+=[line, BL(48)]\n\n#print(ScoreDraft.TellDuration(seq))\n#print(ScoreDraft.TellDuration(seq_g))\n\ndoc.setTempo(140)\ndoc.sing(seq, singer, track)\ndoc.playNoteSeq(seq_g,Guitar, track_g)\n\n#doc.setTrackVolume(track_g, 0.5)\n\ndoc.meteor()\ndoc.mixDown('SoreFeetSong.wav')\n```\n"
  },
  {
    "path": "docs/meteor/TaLang.md",
    "content": "<script type=\"text/javascript\" src=\"meteor.js\"></script>\n\n<script type=\"text/javascript\">\n    window.onload = function() {\n        var restiktok = {\n            canvasID : \"canvastiktok\",\n            audioID : \"audiotiktok\",\n            dataPath : \"TaLang.meteor\"\n        };\n        meteortiktok = new Meteor(restiktok);\n    };\n</script>\n\n<style type=\"text/css\">\n    canvas {\n        display: block;\n        width: 100%;\n        height: width*0.5625;\n    }\t\t\n</style>\n\n<div>\n    <canvas id=\"canvastiktok\" width=\"800\" height=\"450\"></canvas>\n</div>\n<div>\n    <audio id='audiotiktok' controls=\"controls\">\n        <source type=\"audio/mpeg\" src=\"TaLang.mp3\"/>\n    </audio>\n</div>\n\n# 踏浪\n\n## Info\n* Originally sung by: 沈雁\n* Melody by: 庄奴\n* Lyric by: 古月\n* Video published earlier on Bilibili: [https://www.bilibili.com/video/av19520577](https://www.bilibili.com/video/av19520577)\n* 趙英子 VoiceBank [http://tsuro.lofter.com/choueiko](http://tsuro.lofter.com/choueiko)\n\n```python\nimport ScoreDraft\nfrom ScoreDraft.Notes import *\n\ndoc=ScoreDraft.MeteorDocument()\ndoc.setTempo(72)\n\nZhaoYingzi = ScoreDraft.ZhaoYingzi_UTAU()\nZhaoYingzi.setLyricConverter(ScoreDraft.CVVCChineseConverter)\n\nGuitar=ScoreDraft.NylonGuitar()\nBass=ScoreDraft.Bass()\nOcarina=ScoreDraft.Ocarina()\n\nBassDrum=ScoreDraft.BassDrum()\nSnare=ScoreDraft.Snare()\nClosedHitHat=ScoreDraft.ClosedHitHat()\nTom1=ScoreDraft.Tom1()\nTom2=ScoreDraft.Tom2()\nTom3=ScoreDraft.Tom3()\nTom4=ScoreDraft.Tom4()\n\nperc_list=[BassDrum,Snare,ClosedHitHat,Tom1,Tom2,Tom3,Tom4]\n\ndef dong(duration=48):\n\treturn (0,duration)\n\ndef cha(duration=48):\n\treturn (1,duration)\n\ndef chi(duration=48):\n\treturn (2,duration)\n\ndef tong1(duration=48):\n\treturn (3,duration)\n\ndef tong2(duration=48):\n\treturn (4,duration)\n\ndef tong3(duration=48):\n\treturn (5,duration)\n\ndef tong4(duration=48):\n\treturn (6,duration)\n\nSeashore=ScoreDraft.Seashore()\n\neffect_list=[Seashore]\n\ntrack=doc.newBuf()\ntrack_g=doc.newBuf()\ntrack_b=doc.newBuf()\ntrack_o=doc.newBuf()\ntrack_p=doc.newBuf()\ntrack_effect=doc.newBuf()\n\ndef faS(octave=5, duration=48):\n\treturn note(octave,Freqs[6],duration)\n\ndef soS(octave=5, duration=48):\n\treturn note(octave,Freqs[8],duration)\n\nseq=[BL(192)]\nseq_g=[la(4,96), BK(72), do(5,12), mi(5,12), la(5,24), mi(5,24), la(4,96), BK(72), do(5,12), mi(5,12), do(5,48), BK(46), mi(5,46), BK(44), la(5,44)]\nseq_o=[la(5,24), la(5,12), ti(5,12), do(6,24), ti(5,24), la(5, 48), mi(5,48)]\nseq_e=[(-1, 144), (0,192*2)]\n\nseq+=[BL(192)]\nseq_g+=[la(4,96), BK(72), do(5,12), mi(5,12), la(5,24), mi(5,24), la(4,96), BK(72), do(5,12), mi(5,12), do(5,48), BK(46), mi(5,46), BK(44), la(5,44)]\nseq_o+=[la(5,24), la(5,12), ti(5,12), do(6,24), ti(5,24), la(5, 96)]\n\nseq+=[BL(192)]\nseq_g+=[la(4,96), BK(72), do(5,12), mi(5,12), la(5,24), mi(5,24), la(4,96), BK(72), do(5,12), mi(5,12), do(5,48), BK(46), mi(5,46), BK(44), la(5,44)]\nseq_o+=[la(5,24), la(5,12), ti(5,12), do(6,24), ti(5,24), la(5, 48), mi(5,48)]\nseq_e+=[(0,192*2)]\n\nseq+=[BL(192)]\nseq_g+=[la(4,96), BK(72), do(5,12), mi(5,12), la(5,24), mi(5,24), do(5,48), BK(46), mi(5,46), BK(44), la(5,44), do(5,48), BK(46), mi(5,46), BK(44), la(5,44)]\nseq_o+=[la(5,24), la(5,12), ti(5,12), do(6,24), ti(5,24), la(5, 96)]\n\nseq+=[('la', la(5,24), 'la', la(5,12), 'la', ti(5,12), 'la', do(6,24), 'la', ti(5,24), 'la', la(5, 48), 'la', mi(5,36)), BL(12)]\nseq_g+=[la(4,96), BK(72), do(5,12), mi(5,12), la(5,24), mi(5,24), la(4,96), BK(72), do(5,12), mi(5,12), la(5,24), mi(5,24)]\n\nseq+=[('la', la(5,24), 'la', la(5,12), 'la', ti(5,12), 'la', do(6,24), 'la', ti(5,24), 'la', la(5, 72)), BL(24)]\nseq_g+=[la(4,96), BK(72), do(5,12), mi(5,12), la(5,24), mi(5,24), la(4,96), BK(72), do(5,12), mi(5,12), do(5,48), BK(46), mi(5,46), BK(44), la(5,44)]\n\nseq+=[('la', la(5,24), 'la', la(5,12), 'la', ti(5,12), 'la', do(6,24), 'la', ti(5,24), 'la', la(5, 48), 'la', mi(5,36)), BL(12)]\nseq_g+=[la(4,96), BK(72), do(5,12), mi(5,12), la(5,24), mi(5,24), la(4,96), BK(72), do(5,12), mi(5,12), la(5,24), mi(5,24)]\n\nseq+=[('la', la(5,24), 'la', la(5,12), 'la', ti(5,12), 'la', do(6,24), 'la', ti(5,24), 'la', la(5, 72)), BL(24)]\nseq_g+=[la(4,96), BK(72), do(5,12), mi(5,12), la(5,24), mi(5,24), la(4,96), BK(72), do(5,12), mi(5,12), do(5,48), BK(46), mi(5,46), BK(44), la(5,44)]\n\nseq+=[('xiao', la(4,24), 'xiao', la(4,12), 'di', do(5,12), 'yi', re(5,24), 'pian', mi(5,24), 'yun', re(5,12), mi(5,24),re(5,12), 'ya',re(5,36)), BL(12)]\nseq_g+=[la(4,96), BK(72), do(5,12), mi(5,12), la(5,24), mi(5,24), la(4,96), BK(72), re(5,12), fa(5,12), la(5,24), fa(5,24) ]\n\nseq+=[('man', la(4,24), 'man', la(4,12), 'di', do(5,12), 'zou', re(5,24), 'guo', mi(5,24), 'lai', re(5,12), mi(5,72)), BL(12)]\nseq_g+=[la(4,96), BK(72), do(5,12), mi(5,12), la(5,24), mi(5,24), soS(4,96), BK(72), ti(4,12), mi(5,12), soS(5,24), mi(5,24)]\n\nseq+=[('qing', la(4,24), 'ni', la(4,12), do(5,12), 'xie', re(5,24), 'xie', mi(5,24), 'jiao', re(5,12), mi(5,24),re(5,12), 'ya',re(5,36)), BL(12)]\nseq_g+=[la(4,96), BK(72), do(5,12), mi(5,12), la(5,24), mi(5,24), la(4,96), BK(72), re(5,12), faS(5,12), la(5,24), fa(5,24) ]\n\nseq+=[('zan', mi(5,12), re(5,12), 'shi', do(5,12), re(5,12), 'ting', do(5,24), 'xia', ti(4,24), 'lai', la(4,72)), BL(24)]\nseq_g+=[soS(4,96), BK(72), ti(4,12), mi(5,12), soS(5,24), mi(5,24), la(4,96), BK(72), do(5,12), mi(5,12), la(5,24), mi(5,24)]\n\nprogress_g=ScoreDraft.TellDuration(seq_g)\nprogress_o=ScoreDraft.TellDuration(seq_o)\n\nline=('shan',la(5,12), so(5,12), 'shang', mi(5,12),'di',mi(5,12), 'shan',la(5,12), so(5,12), 'hua', mi(5,24))\nline+=('kai',so(5,12), la(5,24), so(5,12), 'ya', mi(5,24), so(5,12),la(5,12))\nseq_g+=[la(4,96), BK(72), do(5,12), mi(5,12), la(5,24), mi(5,24),la(4,96), BK(72), do(5,12), mi(5,12), la(5,24), mi(5,24)]\nseq_o+=[BL(progress_g-progress_o), la(6,48),mi(6,48)]\nseq_o+=[so(6,24),mi(6,12),re(6,12),mi(6,48)]\n\nline+=('wo', so(5,12), mi(5,12), 'cai', mi(5,12), 'dao', re(5,12), 'shan', do(5,24), 'shang', so(5,12), mi(5,12), 'lai', mi(5,72))\nseq+=[line, BL(24)]\nseq_g+=[so(4,96), BK(72), do(5,12), mi(5,12), so(5,24), mi(5,24), soS(4,96), BK(72), ti(4,12), mi(5,12), soS(5,24), mi(5,24)]\nseq_o+=[so(6,24),mi(6,12),re(6,12),do(6,24),re(6,12),so(6,12)]\nmiFa=[mi(6,6),fa(6,6)]\nmiFaX2=miFa+miFa\nmiFaX4=miFaX2+miFaX2\nseq_o+=miFaX4+[mi(6,48)]\n\nseq+=[('yuan',la(4,24),'lai',la(4,12),do(5,12),'ni',re(5,24),'ye',mi(5,12),'shi',fa(5,12),'shang', re(5,12),mi(5,24),re(5,12),'shan',re(5,36)),BL(12)]\nseq_g+=[la(4,96), BK(72), do(5,12), mi(5,12), la(5,24), mi(5,24), la(4,96), BK(72), re(5,12), faS(5,12), la(5,24), fa(5,24) ]\nseq_o+=[la(5,48), mi(6,48), la(5,12), mi(6,12), la(5,12), mi(6,12), re(6,48)]\n\nseq+=[('kan',mi(5,12),re(5,12),'na',do(5,12),re(5,12),'shan',do(5,24),'hua',ti(4,24),'kai',la(4,72)),BL(24)]\nseq_g+=[soS(4,96), BK(72), ti(4,12), mi(5,12), soS(5,24), mi(5,24), la(4,96), BK(72), do(5,12), mi(5,12), la(5,24), mi(5,24)]\nseq_o+=[do(6,24),re(6,12),mi(6,12),re(6,12),do(6,12),ti(5,24)]\nlaTi=[la(5,6),ti(5,6)]\nlaTiX2=laTi+laTi\nlaTiX4=laTiX2+laTiX2\nseq_o+=laTiX4+[la(5,48)]\n\nseq+=[('la', la(5,24), 'la', la(5,12), 'la', ti(5,12), 'la', do(6,24), 'la', ti(5,24), 'la', la(5, 48), 'la', mi(5,36)), BL(12)]\nseq_g+=[la(4,96), BK(72), do(5,12), mi(5,12), la(5,24), mi(5,24), la(4,96), BK(72), do(5,12), mi(5,12), la(5,24), mi(5,24)]\n\nseq+=[('la', la(5,24), 'la', la(5,12), 'la', ti(5,12), 'la', do(6,24), 'la', ti(5,24), 'la', la(5, 72)), BL(24)]\nseq_g+=[la(4,96), BK(72), do(5,12), mi(5,12), la(5,24), mi(5,24), la(4,96), BK(72), do(5,12), mi(5,12), do(5,48), BK(46), mi(5,46), BK(44), la(5,44)]\n\nseq+=[('la', la(5,24), 'la', la(5,12), 'la', ti(5,12), 'la', do(6,24), 'la', ti(5,24), 'la', la(5, 48), 'la', mi(5,36)), BL(12)]\nseq_g+=[la(4,96), BK(72), do(5,12), mi(5,12), la(5,24), mi(5,24), la(4,96), BK(72), do(5,12), mi(5,12), la(5,24), mi(5,24)]\n\nseq+=[('la', la(5,24), 'la', la(5,12), 'la', ti(5,12), 'la', do(6,24), 'la', ti(5,24), 'la', la(5, 72)), BL(24)]\nseq_g+=[la(4,96), BK(72), do(5,12), mi(5,12), la(5,24), mi(5,24), la(4,96), BK(72), do(5,12), mi(5,12), do(5,48), BK(46), mi(5,46), BK(44), la(5,44)]\n\nprogress=ScoreDraft.TellDuration(seq_g)\nseq_b=[BL(progress-96), mi(3,48), la(3,48)]\nseq_p=[BL(progress-48), tong4(12), tong3(12), tong2(12), tong1(12)]\n\nperc_repeat=[dong(24), chi(24), cha(24), chi(24),dong(24), chi(24), cha(24), chi(24)]\n\nseq+=[('xiao', la(4,24), 'xiao', la(4,12), 'di', do(5,12), 'yi', re(5,24), 'zhen', mi(5,24), 'feng', re(5,12), mi(5,24),re(5,12), 'ya',re(5,36)), BL(12)]\nseq_g+=[la(4,96), BK(72), do(5,12), mi(5,12), la(5,24), mi(5,24), la(4,96), BK(72), re(5,12), fa(5,12), la(5,24), fa(5,24) ]\nseq_b+=[la(3,96), fa(3,24), re(3,48), fa(3,24)]\nseq_p+=perc_repeat\n\nseq+=[('man', la(4,24), 'man', la(4,12), 'di', do(5,12), 'zou', re(5,24), 'guo', mi(5,24), 'lai', re(5,12), mi(5,72)), BL(12)]\nseq_g+=[la(4,96), BK(72), do(5,12), mi(5,12), la(5,24), mi(5,24), soS(4,96), BK(72), ti(4,12), mi(5,12), soS(5,24), mi(5,24)]\nseq_b+=[la(3,96), soS(3,24), mi(3,48), soS(3,24)]\nseq_p+=perc_repeat\n\nseq+=[('qing', la(4,24), 'ni', la(4,12), do(5,12), 'xie', re(5,24), 'xie', mi(5,24), 'jiao', re(5,12), mi(5,24),re(5,12), 'ya',re(5,36)), BL(12)]\nseq_g+=[la(4,96), BK(72), do(5,12), mi(5,12), la(5,24), mi(5,24), la(4,96), BK(72), re(5,12), faS(5,12), la(5,24), fa(5,24) ]\nseq_b+=[la(3,96), faS(3,24), re(3,48), faS(3,24)]\nseq_p+=perc_repeat\n\nseq+=[('zan', mi(5,12), re(5,12), 'shi', do(5,12), re(5,12), 'ting', do(5,24), 'xia', ti(4,24), 'lai', la(4,72)), BL(24)]\nseq_g+=[soS(4,96), BK(72), ti(4,12), mi(5,12), soS(5,24), mi(5,24), la(4,96), BK(72), do(5,12), mi(5,12), la(5,24), mi(5,24)]\nseq_b+=[mi(4,48), ti(3,48), la(3,96)]\nseq_p+=[dong(24), chi(24), cha(24), chi(24),dong(24), chi(24), tong4(12), tong3(12), tong2(12), tong1(12)]\n\nprogress_g=ScoreDraft.TellDuration(seq_g)\nprogress_o=ScoreDraft.TellDuration(seq_o)\n\nline=('hai',la(5,12), so(5,12), 'shang', mi(5,12),'di',mi(5,12), 'lang',la(5,12), so(5,12), 'hua', mi(5,24))\nline+=('kai',so(5,12), la(5,24), so(5,12), 'ya', mi(5,24), so(5,12),la(5,12))\nseq_g+=[la(4,96), BK(72), do(5,12), mi(5,12), la(5,24), mi(5,24),la(4,96), BK(72), do(5,12), mi(5,12), la(5,24), mi(5,24)]\nseq_b+=[la(3,48), mi(3,48), la(3,48), mi(3,48)]\nseq_p+=perc_repeat\nseq_o+=[BL(progress_g-progress_o), la(6,48),mi(6,48)]\nseq_o+=[so(6,24),mi(6,12),re(6,12),mi(6,48)]\n\nline+=('wo', so(5,12), mi(5,12), 'cai', mi(5,12), 'dao', re(5,12), 'hai', do(5,24), 'bian', so(5,12), mi(5,12), 'lai', mi(5,72))\nseq+=[line, BL(24)]\nseq_g+=[so(4,96), BK(72), do(5,12), mi(5,12), so(5,24), mi(5,24), soS(4,96), BK(72), ti(4,12), mi(5,12), soS(5,24), mi(5,24)]\nseq_b+=[do(4,48), so(3,48), mi(3,24), soS(3,48), mi(3,24)]\nseq_p+=perc_repeat\nseq_o+=[so(6,24),mi(6,12),re(6,12),do(6,24),re(6,12),so(6,12)]\nseq_o+=miFaX4+[mi(6,48)]\n\nseq+=[('yuan',la(4,24),'lai',la(4,12),do(5,12),'ni',re(5,24),'ye',mi(5,12),'ai',fa(5,12),'lang', re(5,12),mi(5,24),re(5,12),'hua',re(5,36)),BL(12)]\nseq_g+=[la(4,96), BK(72), do(5,12), mi(5,12), la(5,24), mi(5,24), la(4,96), BK(72), re(5,12), faS(5,12), la(5,24), fa(5,24) ]\nseq_b+=[la(3,48), mi(3,48), la(3,48), re(3,48)]\nseq_p+=perc_repeat\nseq_o+=[la(5,48), mi(6,48), la(5,12), mi(6,12), la(5,12), mi(6,12), re(6,48)]\n\nseq+=[('cai',mi(5,12),re(5,12),'dao',do(5,12),re(5,12),'hai',do(5,24),'bian',ti(4,24),'lai',la(4,72)),BL(24)]\nseq_g+=[soS(4,96), BK(72), ti(4,12), mi(5,12), soS(5,24), mi(5,24), la(4,96), BK(72), do(5,12), mi(5,12), la(5,24), mi(5,24)]\nseq_b+=[soS(3,48), mi(3,48), la(3,24), mi(3,48), la(3,24)]\nseq_p+=[dong(24), chi(24), cha(24), chi(24),dong(24), chi(24), tong4(12), tong3(12), tong2(12), tong1(12)]\nseq_o+=[do(6,24),re(6,12),mi(6,12),re(6,12),do(6,12),ti(5,24)]\nseq_o+=laTiX4+[la(5,48)]\n\nseq+=[('la', la(5,24), 'la', la(5,12), 'la', ti(5,12), 'la', do(6,24), 'la', ti(5,24), 'la', la(5, 48), 'la', mi(5,36)), BL(12)]\nseq_g+=[la(4,96), BK(72), do(5,12), mi(5,12), la(5,24), mi(5,24), la(4,96), BK(72), do(5,12), mi(5,12), la(5,24), mi(5,24)]\nseq_b+=[la(3,48), mi(3,48), la(3,48), mi(3,48)]\nseq_p+=perc_repeat\n\nseq+=[('la', la(5,24), 'la', la(5,12), 'la', ti(5,12), 'la', do(6,24), 'la', ti(5,24), 'la', la(5, 72)), BL(24)]\nseq_g+=[la(4,96), BK(72), do(5,12), mi(5,12), la(5,24), mi(5,24), la(4,96), BK(72), do(5,12), mi(5,12), do(5,48), BK(46), mi(5,46), BK(44), la(5,44)]\nseq_b+=[la(3,48), mi(3,48), la(3,96)]\nseq_p+=perc_repeat\n\nseq+=[('la', la(5,24), 'la', la(5,12), 'la', ti(5,12), 'la', do(6,24), 'la', ti(5,24), 'la', la(5, 48), 'la', mi(5,36)), BL(12)]\nseq_g+=[la(4,96), BK(72), do(5,12), mi(5,12), la(5,24), mi(5,24), la(4,96), BK(72), do(5,12), mi(5,12), la(5,24), mi(5,24)]\nseq_b+=[la(3,48), mi(3,48), la(3,48), mi(3,48)]\nseq_p+=perc_repeat\n\nseq+=[('la', la(5,24), 'la', la(5,12), 'la', ti(5,12), 'la', do(6,24), 'la', ti(5,24), 'la', la(5, 72)), BL(24)]\nseq_g+=[la(4,96), BK(72), do(5,12), mi(5,12), la(5,24), mi(5,24), la(4,96), BK(72), do(5,12), mi(5,12), do(5,48), BK(46), mi(5,46), BK(44), la(5,44)]\nseq_b+=[la(3,48), mi(3,48), la(3,96)]\nseq_p+=[dong(24), chi(24), cha(24), chi(24),dong(24), chi(24), tong4(12), tong3(12), tong2(12), tong1(12)]\n\nseq+=[('xiao', la(4,24), 'xiao', la(4,12), 'di', do(5,12), 'yi', re(5,24), 'pian', mi(5,24), 'yun', re(5,12), mi(5,24),re(5,12), 'ya',re(5,36)), BL(12)]\nseq_g+=[la(4,96), BK(72), do(5,12), mi(5,12), la(5,24), mi(5,24), la(4,96), BK(72), re(5,12), fa(5,12), la(5,24), fa(5,24) ]\nseq_b+=[la(3,96), fa(3,24), re(3,48), fa(3,24)]\nseq_p+=perc_repeat\n\nseq+=[('man', la(4,24), 'man', la(4,12), 'di', do(5,12), 'zou', re(5,24), 'guo', mi(5,24), 'lai', re(5,12), mi(5,72)), BL(12)]\nseq_g+=[la(4,96), BK(72), do(5,12), mi(5,12), la(5,24), mi(5,24), soS(4,96), BK(72), ti(4,12), mi(5,12), soS(5,24), mi(5,24)]\nseq_b+=[la(3,96), soS(3,24), mi(3,48), soS(3,24)]\nseq_p+=perc_repeat\n\nseq+=[('qing', la(4,24), 'ni', la(4,12), do(5,12), 'xie', re(5,24), 'xie', mi(5,24), 'jiao', re(5,12), mi(5,24),re(5,12), 'ya',re(5,36)), BL(12)]\nseq_g+=[la(4,96), BK(72), do(5,12), mi(5,12), la(5,24), mi(5,24), la(4,96), BK(72), re(5,12), faS(5,12), la(5,24), fa(5,24) ]\nseq_b+=[la(3,96), faS(3,24), re(3,48), faS(3,24)]\nseq_p+=perc_repeat\n\nseq+=[('zan', mi(5,12), re(5,12), 'shi', do(5,12), re(5,12), 'ting', do(5,24), 'xia', ti(4,24), 'lai', la(4,72)), BL(24)]\nseq_g+=[soS(4,96), BK(72), ti(4,12), mi(5,12), soS(5,24), mi(5,24), la(4,96), BK(72), do(5,12), mi(5,12), la(5,24), mi(5,24)]\nseq_b+=[mi(4,48), ti(3,48), la(3,96)]\nseq_p+=[dong(24), chi(24), cha(24), chi(24),dong(24), chi(24), tong4(12), tong3(12), tong2(12), tong1(12)]\n\nprogress_g=ScoreDraft.TellDuration(seq_g)\nprogress_o=ScoreDraft.TellDuration(seq_o)\n\nline=('shan',la(5,12), so(5,12), 'shang', mi(5,12),'di',mi(5,12), 'shan',la(5,12), so(5,12), 'hua', mi(5,24))\nline+=('kai',so(5,12), la(5,24), so(5,12), 'ya', mi(5,24), so(5,12),la(5,12))\nseq_g+=[la(4,96), BK(72), do(5,12), mi(5,12), la(5,24), mi(5,24),la(4,96), BK(72), do(5,12), mi(5,12), la(5,24), mi(5,24)]\nseq_b+=[la(3,48), mi(3,48), la(3,48), mi(3,48)]\nseq_p+=perc_repeat\nseq_o+=[BL(progress_g-progress_o), la(6,48),mi(6,48)]\nseq_o+=[so(6,24),mi(6,12),re(6,12),mi(6,48)]\n\nline+=('wo', so(5,12), mi(5,12), 'cai', mi(5,12), 'dao', re(5,12), 'shan', do(5,24), 'shang', so(5,12), mi(5,12), 'lai', mi(5,72))\nseq+=[line, BL(24)]\nseq_g+=[so(4,96), BK(72), do(5,12), mi(5,12), so(5,24), mi(5,24), soS(4,96), BK(72), ti(4,12), mi(5,12), soS(5,24), mi(5,24)]\nseq_b+=[do(4,48), so(3,48), mi(3,24), soS(3,48), mi(3,24)]\nseq_p+=perc_repeat\nseq_o+=[so(6,24),mi(6,12),re(6,12),do(6,24),re(6,12),so(6,12)]\nseq_o+=miFaX4+[mi(6,48)]\n\nseq+=[('yuan',la(4,24),'lai',la(4,12),do(5,12),'ni',re(5,24),'ye',mi(5,12),'shi',fa(5,12),'shang', re(5,12),mi(5,24),re(5,12),'shan',re(5,36)),BL(12)]\nseq_g+=[la(4,96), BK(72), do(5,12), mi(5,12), la(5,24), mi(5,24), la(4,96), BK(72), re(5,12), faS(5,12), la(5,24), fa(5,24) ]\nseq_b+=[la(3,48), mi(3,48), la(3,48), re(3,48)]\nseq_p+=perc_repeat\nseq_o+=[la(5,48), mi(6,48), la(5,12), mi(6,12), la(5,12), mi(6,12), re(6,48)]\n\nseq+=[('kan',mi(5,12),re(5,12),'na',do(5,12),re(5,12),'shan',do(5,24),'hua',ti(4,24),'kai',la(4,72)),BL(24)]\nseq_g+=[soS(4,96), BK(72), ti(4,12), mi(5,12), soS(5,24), mi(5,24), la(4,96), BK(72), do(5,12), mi(5,12), la(5,24), mi(5,24)]\nseq_b+=[soS(3,48), mi(3,48), la(3,24), mi(3,48), la(3,24)]\nseq_p+=[dong(24), chi(24), cha(24), chi(24),dong(24), chi(24), tong4(12), tong3(12), tong2(12), tong1(12)]\nseq_o+=[do(6,24),re(6,12),mi(6,12),re(6,12),do(6,12),ti(5,24)]\nseq_o+=laTiX4+[la(5,48)]\n\nseq+=[('la', la(5,24), 'la', la(5,12), 'la', ti(5,12), 'la', do(6,24), 'la', ti(5,24), 'la', la(5, 48), 'la', mi(5,36)), BL(12)]\nseq_g+=[la(4,96), BK(72), do(5,12), mi(5,12), la(5,24), mi(5,24), la(4,96), BK(72), do(5,12), mi(5,12), la(5,24), mi(5,24)]\nseq_b+=[la(3,48), mi(3,48), la(3,48), mi(3,48)]\nseq_p+=perc_repeat\n\nseq+=[('la', la(5,24), 'la', la(5,12), 'la', ti(5,12), 'la', do(6,24), 'la', ti(5,24), 'la', la(5, 72)), BL(24)]\nseq_g+=[la(4,96), BK(72), do(5,12), mi(5,12), la(5,24), mi(5,24), la(4,96), BK(72), do(5,12), mi(5,12), do(5,48), BK(46), mi(5,46), BK(44), la(5,44)]\nseq_b+=[la(3,48), mi(3,48), la(3,96)]\nseq_p+=perc_repeat\n\nseq+=[('la', la(5,24), 'la', la(5,12), 'la', ti(5,12), 'la', do(6,24), 'la', ti(5,24), 'la', la(5, 48), 'la', mi(5,36)), BL(12)]\nseq_g+=[la(4,96), BK(72), do(5,12), mi(5,12), la(5,24), mi(5,24), la(4,96), BK(72), do(5,12), mi(5,12), la(5,24), mi(5,24)]\nseq_b+=[la(3,48), mi(3,48), la(3,48), mi(3,48)]\nseq_p+=perc_repeat\n\nseq+=[('la', la(5,24), 'la', la(5,12), 'la', ti(5,12), 'la', do(6,24), 'la', ti(5,24), 'la', la(5, 72)), BL(24)]\nseq_g+=[la(4,96), BK(72), do(5,12), mi(5,12), la(5,24), mi(5,24), la(4,96), BK(72), do(5,12), mi(5,12), do(5,48), BK(46), mi(5,46), BK(44), la(5,44)]\nseq_b+=[la(3,48), mi(3,48), la(3,96)]\nseq_p+=perc_repeat\n\ndoc.sing(seq, ZhaoYingzi, track)\ndoc.playNoteSeq(seq_g, Guitar, track_g)\ndoc.playNoteSeq(seq_b, Bass, track_b)\ndoc.playNoteSeq(seq_o, Ocarina, track_o)\ndoc.playBeatSeq(seq_p, perc_list, track_p)\ndoc.playBeatSeq(seq_e, effect_list, track_effect)\n\ndoc.setTrackVolume(track_g, 0.5)\ndoc.setTrackVolume(track_b, 0.5)\ndoc.setTrackVolume(track_o, 0.5)\ndoc.setTrackVolume(track_p, 0.5)\ndoc.setTrackVolume(track_effect, 0.5)\n\ndoc.meteor()\ndoc.mixDown('TaLang.wav')\n```\n\n\n\n\n\n"
  },
  {
    "path": "docs/meteor/WuYa.md",
    "content": "<script type=\"text/javascript\" src=\"meteor.js\"></script>\n\n<script type=\"text/javascript\">\n    window.onload = function() {\n        var restiktok = {\n            canvasID : \"canvastiktok\",\n            audioID : \"audiotiktok\",\n            dataPath : \"WuYa.meteor\"\n        };\n        meteortiktok = new Meteor(restiktok);\n    };\n</script>\n\n<style type=\"text/css\">\n    canvas {\n        display: block;\n        width: 100%;\n        height: width*0.5625;\n    }\t\t\n</style>\n\n<div>\n    <canvas id=\"canvastiktok\" width=\"800\" height=\"450\"></canvas>\n</div>\n<div>\n    <audio id='audiotiktok' controls=\"controls\">\n        <source type=\"audio/mpeg\" src=\"WuYa.mp3\"/>\n    </audio>\n</div>\n\n# 无涯\n\n## Info\n* The song is from the Anime \"Hitori no Shita:The Outcast Season 2\" produced by Tencent Animation.\n* Original sung by: 醉雪\n* Melody by: 钱襄\n* Lyric by: 张汇泉\n* Video published earlier on Bilibili: [https://www.bilibili.com/video/av20843105](https://www.bilibili.com/video/av20843105)\n* GePing voice-bank: http://utau.vocalover.com/\n* 三色あやか, CVVCChinese：http://seesaawiki.jp/sanshoku/\n\n```python\nimport ScoreDraft\n\nFreqs=[1.0, 9.0/8.0, 81.0/64.0, 4.0/3.0, 3.0/2.0, 27.0/16.0, 243.0/128.0]\n\ndef note(octave, freq, duration):\n\treturn (freq*(2.0**(octave-5.0)), duration)\n\ndef do(octave=5, duration=48):\n\treturn note(octave,Freqs[0],duration)\n\ndef re(octave=5, duration=48):\n\treturn note(octave,Freqs[1],duration)\n\ndef mi(octave=5, duration=48):\n\treturn note(octave,Freqs[2],duration)\n\ndef fa(octave=5, duration=48):\n\treturn note(octave,Freqs[3],duration)\n\ndef so(octave=5, duration=48):\n\treturn note(octave,Freqs[4],duration)\n\ndef la(octave=5, duration=48):\n\treturn note(octave,Freqs[5],duration)\n\ndef ti(octave=5, duration=48):\n\treturn note(octave,Freqs[6],duration)\n\ndef BL(duration=48):\n\treturn (-1.0, duration)\n\ndef BK(duration=48):\n\treturn (-1.0, -duration)\n\nFreqsC=Freqs[:]\n# FreqsF=[f*Freqs[5] for f in Freqs]\nFreqsF=[f*Freqs[3] for f in Freqs]\n\nFreqs[:]=FreqsF\n\ndoc=ScoreDraft.MeteorDocument()\ndoc.setTempo(120)\n\nGePing = ScoreDraft.GePing_UTAU()\n\nAyaka = ScoreDraft.Ayaka_UTAU()\nAyaka.setLyricConverter(ScoreDraft.CVVCChineseConverter)\n\nGuitarMute=ScoreDraft.RockMute()\nGuitar=ScoreDraft.AlansGuitar()\nBass=ScoreDraft.Bass()\n\nPiano=ScoreDraft.Piano()\n\nBassDrum=ScoreDraft.BassDrum()\nSnare=ScoreDraft.Snare()\n\nperc_list=[BassDrum,Snare]\n\ndef dong(duration=48):\n\treturn (0,duration)\n\ndef cha(duration=48):\n\treturn (1,duration)\n\ndef Bl(duration=48):\n\treturn (-1,duration)\n\n\ntrack=doc.newBuf()\ntrack_gm=doc.newBuf()\ntrack_g=doc.newBuf()\ntrack_b=doc.newBuf()\ntrack_p=doc.newBuf()\ntrack_pi=doc.newBuf()\n\ndef Chord(elems, duration, delay=0):\n\tret=[]\n\tfor elem in elems:\n\t\tret+=[elem[0](elem[1], duration)]\n\t\tduration-=delay\n\t\tret+=[BK(duration)]\n\tret+=[BL(duration)]\n\treturn ret\n\n\ndef Repeat(x,t):\n\tret=[]\n\tfor i in range(t):\n\t\tret+=x\n\treturn ret\n\nseq_gm=Repeat(\n\tRepeat(Chord([(la,3), (mi,4), (la,4) ], 24),4)+Repeat(Chord([(do,4), (so,4), (do, 5)], 24),4) +\n\tRepeat(Chord([(re,4), (la,4), (re,5) ], 24),4)+Repeat(Chord([(mi,4), (ti,4), (mi, 5)], 24),4) \n\t,2)\nseq_b=Repeat([la(2,96), do(3,96), re(3,96), mi(3,96)],2)\nseq_p=Repeat([dong(),cha()],8)\n\nseq_gm+=Repeat(Chord([(fa,4), (do,5), (fa,5)],12),4)+[BL(24)]+ Repeat(Chord([(mi,4), (ti,4), (mi,5)],12),4)+[BL(24)]\nseq_b+=[BL(144)]\nseq_p+=Repeat(Repeat([cha(12)],4)+[Bl(24)],2)\n\nseq=[BL(ScoreDraft.TellDuration(seq_gm))]\nseq+=[('meng',la(4,24),'li',la(4,24),'bu',la(4,24), 'zhi',la(4,24), 'liu',la(4,48), 'zhuan',so(4,24), 'liao', mi(4,24))]\nseq_gm+=Repeat(Chord([(la,3), (re,4), (mi,4), (la,4) ], 24),8)\nseq_b+=Repeat([la(2,24),la(2,48),la(2,24)],2)\nseq_p+=Repeat([dong(),cha()],2)\n\nseq+=[('duo',la(4,24),'shao',la(4,48),'nian',re(5,96)), BL(24)]\nseq_gm+=Repeat(Chord([(re,4), (so,4), (la,4), (re,5) ], 24),8)\nseq_b+=Repeat([re(3,24),re(3,48),re(3,24)],2)\nseq_p+=Repeat([dong(),cha()],2)\n\nseq+=[('wang',mi(5,48), 'que', mi(5,24), re(5,24), 'qing', la(4,24), 'si', la(4,24), mi(5,48) )]\nseq_gm+=Repeat(Chord([(mi,4), (la,4), (ti,4), (mi,5) ], 24),8)\nseq_b+=Repeat([mi(3,24),mi(3,48),mi(3,24)],2)\nseq_p+=Repeat([dong(),cha()],2)\n\nseq+=[('chen',re(5,36),mi(5,12),re(5,24),'nian',so(4,72)), BL(48)]\nseq_gm+=Repeat(Chord([(re,4), (so,4), (la,4), (re,5) ], 24),8)\nseq_b+=Repeat([re(3,24),re(3,48),re(3,24)],2)\nseq_p+=Repeat([dong(),cha()],2)\n\nseq+=[('hui', la(4,48), 'mou', la(4,24), 'yi', la(4,48), 'pian', la(4,48)), BL(24)]\nseq_gm+=Repeat(Chord([(la,3), (re,4), (mi,4), (la,4) ], 24),8)\nseq_b+=Repeat([la(2,24),la(2,48),la(2,24)],2)\nseq_p+=Repeat([dong(),cha()],2)\n\nFreqs[:]=FreqsC\n\nseq+=[('wang', do(6,48), 'shi', ti(5,24), la(5,24), 'you', la(5,48), 'fu', so(5,24),la(5,24) )]\nseq_gm+=Repeat(Chord([(do,5), (fa,5), (so,5), (do,6) ], 24),8)\nseq_b+=Repeat([do(4,24),do(4,48),do(4,24)],2)\nseq_p+=Repeat([dong(),cha()],2)\n\nseq+=[('xian', la(5,144)), BL(48)]\nseq_g=[BL(ScoreDraft.TellDuration(seq_gm))]\nseq_g+=Chord([(la,4), (mi,5), (la,5),(re,6)], 96)+Chord([(do,5), (so,5), (do,6), (fa,6)], 96)\nseq_gm+=Repeat(Chord([(la,4), (re,5), (mi,5), (la,5) ], 24),4)+Repeat(Chord([(do,5), (fa,5), (so,5), (do,6) ], 24),4)\nseq_b+=[la(3,24),la(3,48),la(3,24),do(4,24),do(4,48),do(4,24)]\nseq_p+=Repeat([dong(),cha()],2)\n\nseq+=[BL(192)]\nseq_g+=Repeat(Chord([(re,5), (la,5), (re,6), (so,6)], 24),3)+ Chord([(mi,5), (ti,5), (mi,6), (la,6)], 120)\nseq_gm+=Repeat(Chord([(re,5), (so,5), (la,5), (re,6) ], 24),4)+Repeat(Chord([(mi,5), (la,5), (ti,5), (mi,6) ], 24),4)\nseq_b+=[re(4,24),re(4,48),re(4,24),mi(4,24),mi(4,48),mi(4,24)]\nseq_p+=Repeat([dong(),cha()],2)\n\nFreqs[:]=FreqsF\nseq+=[('zui',la(5,24), 'yan',la(5,48)), BL(24), ('xiao',la(5,24),'kan',la(5,48), 'chen', so(5,12), la(5,12))]\nseq_g+=Repeat(Repeat(Chord([(re,5), (mi,5), (la,5)],24),2)+[so(5,24), BK(12), la(5,12), la(4,24)],2)\nseq_gm+=Repeat(Chord([(la,3), (re,4), (mi,4), (la,4) ], 24),8)\nseq_b+=Repeat([la(2,24),la(2,48),la(2,24)],2)\nseq_p+=Repeat([dong(),cha()],2)\n\nseq+=[('shi',so(5,12),la(5,36),so(5,24), 'jian', so(5,96)), BL(24)]\nseq_g+=Repeat(Chord([(do,5), (re,5), (so,5)],24),2)+[mi(5,24), so(5,24), do(5,48), re(5,48)]\nseq_gm+=Repeat(Chord([(so,3), (do,4), (re,4), (so,4) ], 24),8)\nseq_b+=Repeat([so(2,24),so(2,48),so(2,24)],2)\nseq_p+=Repeat([dong(),cha()],2)\n\nseq+=[('he',so(5,24),la(5,24),'chu',so(5,24), mi(5,24), 'shi', mi(5,48), 'tao', re(5,24),mi(5,24))]\nseq_g+=Repeat(Chord([(re,5), (mi,5), (la,5)],24),2)+[so(5,24),la(5,24),mi(5,48),re(5,48)]\nseq_gm+=Repeat(Chord([(la,3), (re,4), (mi,4), (la,4) ], 24),8)\nseq_b+=[la(2,24),la(2,48),la(2,24), mi(3,48), re(3,48)]\nseq_p+=Repeat([dong(),cha()],2)\n\nseq+=[('yuan',re(5,24),mi(5,120)),BL(48)]\nseq_g+=[mi(5,96), so(5,48),la(5,48)]\nseq_gm+=Repeat(Chord([(mi,4), (la,4), (ti,4), (mi,5) ], 24),8)\nseq_b+=Repeat([mi(3,24),mi(3,48),mi(3,24)],2)\nseq_p+=Repeat([dong(),cha()],2)\n\nseq+=[('qing', re(5,48), 'feng', mi(5,24), 'ji', re(5,48), 'du',mi(5,48)),BL(24)]\nseq_g+=[re(5,48),mi(5,48),so(5,48),la(5,48)]\nseq_gm+=Repeat(Chord([(re,4), (so,4), (la,4), (re,5) ], 24),8)\nseq_b+=Repeat([re(3,24),re(3,48),re(3,24)],2)\nseq_p+=Repeat([dong(),cha()],2)\n\nseq+=[('shui', mi(5,12), so(5,36), 'yu', mi(5,48), 'wo', re(5,24), ti(4,24), 'liu', ti(4,24),la(4,24))]\nseq_g+=[so(5,48),mi(5,48),re(5,48),so(5,48)]\nseq_gm+=Repeat(Chord([(mi,4), (la,4), (ti,4), (mi,5) ], 24),8)\nseq_b+=Repeat([mi(3,24),mi(3,48),mi(3,24)],2)\nseq_p+=Repeat([dong(),cha()],2)\n\nFreqs[:]=FreqsC\n\nseq+=[('lian', re(5,144)), BL(48)]\nseq_g+=Chord([(re,4), (la,4), (re,5),(so,5)], 96)+Chord([(mi,4), (ti,4), (mi,5), (la,5)], 96)\nseq_gm+=Repeat(Chord([(re,4), (so,4), (la,4), (re,5) ], 24),4)+Repeat(Chord([(mi,4), (la,4), (ti,4), (mi,5) ], 24),4)\nseq_b+=[re(3,24),re(3,48),re(3,24),mi(3,24),mi(3,48),mi(3,24)]\nseq_p+=Repeat([dong(),cha()],2)\n\nseq+=[BL(192)]\nseq_g+=Repeat(Chord([(so,4), (re,5), (so,5), (do,6)], 24),3)+ Chord([(la,4), (mi,5), (la,5), (re,6)], 120)\nseq_gm+=Repeat(Chord([(so,4), (do,5), (re,4), (so,5) ], 24),4)+Repeat(Chord([(la,4), (re,5), (mi,5), (la,5) ], 24),4)\nseq_b+=[so(3,24),so(3,48),so(3,24),la(3,24),la(3,48),la(3,24)]\nseq_p+=Repeat([dong(),cha()],2)\n\nFreqs[:]=FreqsF\n\nseq+=[('yuan', re(5,12), mi(5,36),re(5,24), 'qi',re(5,72)), BL(48) ]\nseq_pi=[BL(ScoreDraft.TellDuration(seq_gm))]\nseq_pi+=Chord([(mi,4), (la,4), (ti,4), (mi,5) ], 72)+Chord([(re,4), (so,4), (la,4), (re,5) ], 72)+[BL(48) ]\nseq_gm+=Repeat(Chord([(mi,3), (la,3), (ti,3), (mi,4) ], 24),3)+Repeat(Chord([(re,3), (so,3), (la,3), (re,4) ], 24),5)\t\nseq_b+=[mi(2,24),mi(2,48),re(2,48),re(2,24),re(2,24),re(2,24)]\nseq_p+=Repeat([dong(),cha()],2)\n\nseq+=[('yuan', re(5,12), mi(5,36),la(4,24), 'mie',la(4,72)), BL(48) ]\nseq_pi+=Chord([(la,3), (re,4), (mi,4), (la,4) ], 72)+Chord([(re,4), (so,4), (la,4), (re,5) ], 72)+[BL(48) ]\nseq_gm+=Repeat(Chord([(la,2), (re,3), (mi,3), (la,3) ], 24),3)+Repeat(Chord([(re,3), (so,3), (la,3), (re,4) ], 24),5)\t\nseq_b+=[la(1,24),la(1,48),re(2,48),re(2,24),re(2,24),re(2,24)]\nseq_p+=Repeat([dong(),cha()],2)\n\nFreqs[:]=FreqsC\n\nseq+=[('yi', so(5,48), 'mu', la(5,48), 'mu', la(5,24), 'chong', la(5,12), ti(5,24), la(5,12))]\nseq_pi+=Chord([(re,4), (so,4), (la,4), (re,5)], 48)+[BL(48)]+Chord([(mi,4), (la,4), (ti,4), (mi,5)], 48)+Chord([(so,4), (do,5), (re,5), (so,5)], 48)\nseq_gm+=Repeat(Chord([(re,3), (so,3), (la,3), (re,4)], 24),4)+Repeat(Chord([(mi,3), (la,3), (ti,3), (mi,4)], 24),2)+Repeat(Chord([(so,3), (do,4), (re,4), (so,4)], 24),2)\t\t\nseq_b+=[re(2,24),re(2,48),re(2,24),mi(2,48),so(2,48)]\nseq_p+=Repeat([dong(),cha()],2)\n\nseq+=[('yan', la(5,144)), BL(72)]\nseq_pi+=Chord([(la,4), (re,5), (mi,5), (la,5) ], 96)+[BL(96)]\nseq_gm+=Repeat(Chord([(la,3), (re,4), (mi,4), (la,4) ], 24),8)\nseq_b+=Repeat([la(2,24),la(2,48),la(2,24)],2)\nseq_p+=Repeat([dong(),cha()],2)\n\nseq+=[('hua', la(5,48),so(5,24), 'xie',so(5,72)), BL(48) ]\nseq_pi+=Chord([(mi,4), (la,4), (ti,4), (mi,5)],72)+Chord([(so,4), (do,5), (re,5), (so,5) ], 72)+[BL(48)]\nseq_gm+=Repeat(Chord([(mi,3), (la,3), (ti,3), (mi,4) ], 24),3)+Repeat(Chord([(so,3), (do,4), (re,4), (so,4) ], 24),5)\nseq_b+=[mi(2,24),mi(2,48),so(2,48),so(2,24),so(2,24),so(2,24)]\nseq_p+=Repeat([dong(),cha()],2)\n\nseq+=[('hua', la(5,48),do(6,24), 'kai',do(6,72)), BL(48) ]\nseq_pi+=Chord([(la,4), (re,5), (mi,5), (la,5) ], 72)+Chord([(do,5), (fa,5), (so,5), (do,6) ], 72)+[BL(48)]\nseq_gm+=Repeat(Chord([(la,3), (re,4), (mi,4), (la,4) ], 24),3)+Repeat(Chord([(do,4), (fa,4), (so,4), (do,5) ], 24),5)\t\nseq_b+=[la(2,24),la(2,48),do(3,48),do(3,24),do(3,24),do(3,24)]\nseq_p+=Repeat([dong(),cha()],2)\n\nseq+=[('yi', re(6,48), 'nian', re(6,48), 'nian', do(6,24), 'geng', re(6,24), do(6,24))]\nseq_pi+=Chord([(re,4), (so,4), (la,4), (re,5)], 48)+[BL(48)]+Chord([(so,4), (do,5), (re,5), (so,5)], 48)+Chord([(la,4), (re,5), (mi,5), (la,5)], 48)\nseq_gm+=Repeat(Chord([(re,3), (so,3), (la,3), (re,4)], 24),4)+Repeat(Chord([(so,3), (do,4), (re,4), (so,4)], 24),2)+Repeat(Chord([(la,3), (re,4), (mi,4), (la,4)], 24),2)\nseq_b+=[re(2,24),re(2,48),re(2,24),so(2,48),la(2,48)]\nseq_p+=Repeat([dong(),cha()],2)\n\nseq+=[('die', re(6,24), mi(6,24), re(6,24), mi(6,24),re(6,24), mi(6,24),re(6,24), mi(6,24)), BL(24)]\nthe_chord=[(ti,4), (mi,5), (la,5), (ti,5)]\nseq_pi+=Chord(the_chord, 36)+Chord(the_chord, 12)+Repeat(Chord(the_chord, 24),2)+Repeat(Chord(the_chord, 12),4)+Repeat(Chord(the_chord, 24),2)\nseq_gm+=Repeat(Chord([(ti,3), (mi,4), (la,4), (ti,4)], 24),8)\nseq_b+=[ti(2,36),ti(2,12),ti(2,24),ti(2,24),ti(2,12),ti(2,12),ti(2,12),ti(2,12),ti(2,24),ti(2,24)]\nseq_p+=[dong(36), dong(12),dong(24),dong(24), cha(12),cha(12),cha(12),cha(12),cha(24),cha(24)]\n\ndoc.sing(seq, GePing, track)\n\nline= (&quot;zheng&quot;, re(6,24), &quot;yue&quot;, do(6,48), &quot;li&quot;, re(6,24), &quot;cai&quot;, mi(6,36), so(6,12), &quot;hua&quot;, mi(6,24), la(5,24))\nseq_pi+=[la(4,96),BK(96), re(5,72), do(5,12),re(5,12), la(4,96), BK(96), mi(5,36), so(5,12), mi(5,24),la(4,24)]\nseq_gm+=Repeat(Chord([(la,3), (re,4), (mi,4), (la,4) ], 24),8)\nseq_b+=Repeat([la(2,24),la(2,48),la(2,24)],2)\nseq_p+=Repeat([dong(),cha()],2)\n\nline+=(&quot;wu&quot;, re(6,24), &quot;you&quot;, do(6,48), &quot;hua&quot;, re(6,24), &quot;cai&quot;, mi(6,24), do(6,12), re(6,12), mi(6,24), BL(24))\nseq = [line]\nseq_pi+=[la(4,96),BK(96), re(5,72), do(5,12),re(5,12), la(4,96), BK(96), mi(5,24), do(5,12), re(5,12),mi(5,48)]\nseq_gm+=Repeat(Chord([(la,3), (re,4), (mi,4), (la,4) ], 24),8)\nseq_b+=Repeat([la(2,24),la(2,48),la(2,24)],2)\nseq_p+=Repeat([dong(),cha()],2)\n\nline= (&quot;er&quot;, mi(6,12), so(6,12), &quot;yue&quot;, la(6,48), &quot;jian&quot;, do(7,24), &quot;cai&quot;, la(6, 48), &quot;hua&quot;, so(6,24), mi(6,24))\nseq_pi+=[re(5,96), BK(96), la(5,72), so(5,12), so(5,12), re(5,96), BK(96), so(5,24),mi(5,24),re(5,24),mi(5,24)]\nseq_gm+=Repeat(Chord([(re,4), (so,4), (la,4), (re,5) ], 24),8)\nseq_b+=Repeat([re(3,24),re(3,48),re(3,24)],2)\nseq_p+=Repeat([dong(),cha()],2)\n\nline+= (&quot;hua&quot;, la(6,24), &quot;you&quot;, mi(6,48), &quot;zheng&quot;, re(6,12), mi(6,12), &quot;kai&quot;, do(6,24), BL(24))\nseq += [line]\nline=(&quot;er&quot;, do(6,12), re(6,12), &quot;yue&quot;, mi(6,12), so(6,12))\nseq_pi+=[la(4,96),BK(96), re(5,36), mi(5,12),re(5,24), do(5,24), la(4,12),do(5,12),la(4,12),so(4,12),la(4,48)]\nseq_gm+=Repeat(Chord([(la,3), (re,4), (mi,4), (la,4) ], 24),8)\nseq_b+=Repeat([la(2,24),la(2,48),la(2,24)],2)\nseq_p+=Repeat([dong(),cha()],2)\n\nline+=(&quot;jian&quot;, mi(6,48), &quot;cai&quot;, re(6,24), &quot;hua&quot;, do(6,24),&quot;hua&quot;, la(5,24), &quot;you&quot;, do(6,48), &quot;zheng&quot;, la(5,12), do(6,12))\nseq_pi+=[la(4,96),BK(96), mi(5,72), re(5,12),do(5,12), la(4,24),do(5,48),do(4,24)]\nseq_gm+=Repeat(Chord([(la,3), (re,4), (mi,4), (la,4) ], 24),8)\nseq_b+=Repeat([la(2,24),la(2,48),la(2,24)],2)\nseq_p+=Repeat([dong(),cha()],2)\n\nline+=(&quot;kai&quot;, la(5,96), BL(96))\nseq += [line]\nseq_pi+=Repeat(Chord([(la,4), (re,5), (mi,5)],24)+Chord([(la,4), (re,5), (mi,5)],12)+Chord([(la,4), (re,5), (mi,5)],12)+Chord([(la,4), (re,5), (mi,5)],24)+Chord([(la,4), (re,5), (mi,5)],24),2)\nseq_gm+=Repeat(Chord([(la,3), (re,4), (mi,4), (la,4) ], 24),8)\nseq_b+=[la(2,36),la(2,12),la(2,24),la(2,24),la(2,12),la(2,12),la(2,12),la(2,12),la(2,24),la(2,24)]\nseq_p+=[dong(36), dong(12),dong(24),dong(24), cha(12),cha(12),cha(12),cha(12),cha(24),cha(24)]\n\n\nline= (&quot;san&quot;, re(6,24), &quot;yue&quot;, do(6,48), &quot;li&quot;, re(6,24), &quot;tao&quot;, mi(6,36), so(6,12), &quot;hua&quot;, mi(6,24), la(5,24))\nseq_pi+=[la(4,96),BK(96), re(5,72), do(5,12),re(5,12), la(4,96), BK(96), mi(5,36), so(5,12), mi(5,24),la(4,24)]\nseq_gm+=Repeat(Chord([(la,3), (re,4), (mi,4), (la,4) ], 24),8)\nseq_b+=Repeat([la(2,24),la(2,48),la(2,24)],2)\nseq_p+=Repeat([dong(),cha()],2)\n\nline+=(&quot;hong&quot;, re(6,24), &quot;you&quot;, do(6,48), &quot;si&quot;, re(6,24), &quot;hai&quot;, mi(6,24), do(6,12), re(6,12), mi(6,24), BL(24))\nseq += [line]\nseq_pi+=[la(4,96),BK(96), re(5,72), do(5,12),re(5,12), la(4,96), BK(96), mi(5,24), do(5,12), re(5,12),mi(5,48)]\nseq_gm+=Repeat(Chord([(la,3), (re,4), (mi,4), (la,4) ], 24),8)\nseq_b+=Repeat([la(2,24),la(2,48),la(2,24)],2)\nseq_p+=Repeat([dong(),cha()],2)\n\nline= (&quot;si&quot;, mi(6,12), so(6,12), &quot;yue&quot;, la(6,48), &quot;jian&quot;, do(7,24), &quot;pu&quot;, la(6, 48), &quot;tao&quot;, so(6,24), mi(6,24))\nseq_pi+=[re(5,96), BK(96), la(5,72), so(5,12), so(5,12), re(5,96), BK(96), so(5,24),mi(5,24),re(5,24),mi(5,24)]\nseq_gm+=Repeat(Chord([(re,4), (so,4), (la,4), (re,5) ], 24),8)\nseq_b+=Repeat([re(3,24),re(3,48),re(3,24)],2)\nseq_p+=Repeat([dong(),cha()],2)\n\nline+= (&quot;jia&quot;, la(6,24), &quot;you&quot;, mi(6,48), &quot;shang&quot;, re(6,12), mi(6,12), &quot;cai&quot;, do(6,24), BL(24))\nseq += [line]\nline=(&quot;si&quot;, do(6,12), re(6,12), &quot;yue&quot;, mi(6,12), so(6,12))\nseq_pi+=[la(4,96),BK(96), re(5,36), mi(5,12),re(5,24), do(5,24), la(4,12),do(5,12),la(4,12),so(4,12),la(4,48)]\nseq_gm+=Repeat(Chord([(la,3), (re,4), (mi,4), (la,4) ], 24),8)\nseq_b+=Repeat([la(2,24),la(2,48),la(2,24)],2)\nseq_p+=Repeat([dong(),cha()],2)\n\nline+=(&quot;jian&quot;, mi(6,48), &quot;pu&quot;, re(6,24), &quot;tao&quot;, do(6,24),&quot;jia&quot;, la(5,24), &quot;you&quot;, do(6,48), &quot;shang&quot;, la(5,12), do(6,12))\nseq_pi+=[la(4,96),BK(96), mi(5,72), re(5,12),do(5,12), la(4,24),do(5,48),do(4,24)]\nseq_gm+=Repeat(Chord([(la,3), (re,4), (mi,4), (la,4) ], 24),8)\nseq_b+=Repeat([la(2,24),la(2,48),la(2,24)],2)\nseq_p+=Repeat([dong(),cha()],2)\n\nline+=(&quot;cai&quot;, la(5,96), BL(96))\nseq += [line]\nseq_g+=[BL(ScoreDraft.TellDuration(seq_gm)-ScoreDraft.TellDuration(seq_g))]\nseq_g+=[BL(144), do(6,12), re(6,12), mi(6,12), so(6,12)]\nseq_pi+=Repeat(Chord([(la,4), (re,5), (mi,5)],24)+Chord([(la,4), (re,5), (mi,5)],12)+Chord([(la,4), (re,5), (mi,5)],12)+Chord([(la,4), (re,5), (mi,5)],24)+Chord([(la,4), (re,5), (mi,5)],24),2)\nseq_gm+=Repeat(Chord([(la,3), (re,4), (mi,4), (la,4) ], 24),8)\nseq_b+=[la(2,36),la(2,12),la(2,24),la(2,24),la(2,12),la(2,12),la(2,12),la(2,12),la(2,24),la(2,24)]\nseq_p+=[dong(36), dong(12),dong(24),dong(24), cha(12),cha(12),cha(12),cha(12),cha(24),cha(24)]\n\nseq_g+=[mi(6,48), re(6,24), do(6,24), la(5,24), do(6,48), la(5,12), do(6,12)]\nseq_pi+=[la(4,96),BK(96), mi(5,72), re(5,12),do(5,12), la(4,24),do(5,48),do(4,24)]\nseq_gm+=Repeat(Chord([(la,3), (re,4), (mi,4), (la,4) ], 24),8)\nseq_b+=Repeat([la(2,24),la(2,48),la(2,24)],2)\n\nseq_g+=[la(5,96)]\nseq_pi+=Chord([(la,4), (re,5), (mi,5)],96)\nseq_gm+=Chord([(la,3), (re,4), (mi,4), (la,4) ], 96)\nseq_b+=[la(2,96)]\n\ndoc.sing(seq, Ayaka, track)\ndoc.playNoteSeq(seq_gm, GuitarMute, track_gm)\ndoc.playNoteSeq(seq_g,Guitar, track_g)\ndoc.playNoteSeq(seq_pi,Piano, track_pi)\ndoc.playNoteSeq(seq_b,Bass, track_b)\ndoc.playBeatSeq(seq_p, perc_list, track_p)\n\n\ndoc.setTrackVolume(track_gm, 0.5)\ndoc.setTrackVolume(track_g, 0.5)\ndoc.setTrackVolume(track_pi, 0.5)\ndoc.setTrackVolume(track_b, 0.5)\ndoc.setTrackVolume(track_p, 0.5)\n\ndoc.meteor()\ndoc.mixDown('WuYa.wav')\n```\n\n\n\n\n\n"
  },
  {
    "path": "docs/meteor/meteor.js",
    "content": "\nvar blackPos=[1, 2, 4, 5, 6];\nvar whitePitchs=[0, 2, 4, 5, 7, 9, 11];\nvar blackPitchs=[1, 3, 6, 8, 10];\nvar keyPos = [0.5, 1.0, 1.5, 2.0, 2.5, 3.5, 4.0, 4.5, 5.0, 5.5, 6.0, 6.5];\nvar s_ColorBank = [\"#418CF0\",\"#FCB441\",\"#DF3A02\",\"#056492\",\"#BFBFBF\",\"#1A3B69\",\"#FFE382\",\"#129CDD\",\"#CA6B4B\",\"#005CDB\",\"#F3D288\",\"#506381\",\"#F1B9A8\",\"#E0830A\",\"#7893BE\"];\n\nInStream = function(buffer)\n{\n\t this.offset = 0;\n\t this.view = new DataView(buffer);\n};\n\nInStream.prototype.GetInt32=function()\n{\n\tvar data = this.view.getInt32(this.offset,true);\n\tthis.offset+=4;\n\treturn data;\n}\n\nInStream.prototype.GetUint32=function()\n{\n\tvar data = this.view.getUint32(this.offset,true);\n\tthis.offset+=4;\n\treturn data;\n}\n\nInStream.prototype.GetFloat32=function()\n{\n\tvar data = this.view.getFloat32(this.offset,true);\n\tthis.offset+=4;\n\treturn data;\n}\n\nInStream.prototype.GetUint8=function()\n{\n\tvar data = this.view.getUint8(this.offset,true);\n\tthis.offset+=1;\n\treturn data;\n}\n\nfunction Utf8ArrayToStr(array) {\n    var out, i, len, c;\n    var char2, char3;\n\n    out = \"\";\n    len = array.length;\n    i = 0;\n    while(i < len) {\n    c = array[i++];\n    switch(c >> 4)\n    { \n      case 0: case 1: case 2: case 3: case 4: case 5: case 6: case 7:\n        // 0xxxxxxx\n        out += String.fromCharCode(c);\n        break;\n      case 12: case 13:\n        // 110x xxxx   10xx xxxx\n        char2 = array[i++];\n        out += String.fromCharCode(((c & 0x1F) << 6) | (char2 & 0x3F));\n        break;\n      case 14:\n        // 1110 xxxx  10xx xxxx  10xx xxxx\n        char2 = array[i++];\n        char3 = array[i++];\n        out += String.fromCharCode(((c & 0x0F) << 12) |\n                       ((char2 & 0x3F) << 6) |\n                       ((char3 & 0x3F) << 0));\n        break;\n    }\n    }\n\n    return out;\n}\n\nInStream.prototype.GetString=function(len)\n{\n\tvar utf8Arr=new Array();\n\tfor (var pos=0; pos<len; pos++)\n\t{\n\t\tvar v=this.view.getUint8(this.offset+pos);\n\t\tutf8Arr.push(v);\n\t}\n\tthis.offset+=len;\n\treturn Utf8ArrayToStr(utf8Arr);\n}\n\nMeteor = function(resources)\n{\n\tvar scale= 1.0;\n\tif (resources.scale!=undefined)\n\t\tscale = resources.scale;\n\n\tthis.cornerSize= 3.0*scale;\n\tthis.whiteKeyWidth = 18.0*scale;\n\tthis.blackKeyWidth = 14.0*scale;\n\tthis.whiteKeyHeight = 80.0*scale;\n\tthis.blackKeyHeight = 50.0*scale;\n\tthis.whiteKeyPressedDelta = 3.0*scale;\n\tthis.blackKeyPressedDelta = 2.0*scale;\n\tthis.pressedLineWidth = 3.0;\n\tthis.showTime = 1.0;\n\tthis.meteorHalfWidth = 5.0*scale;\n\tthis.percussion_flash_size_factor = 0.15;\n\tthis.percussion_flash_limit = 0.3;\n\tthis.singing_half_width = 8.0*scale;\n\tthis.fontSize=30.0*scale;\n\n\tthis.canvas=document.getElementById(resources.canvasID).getContext(\"2d\");\n\tif (resources.audioID!=undefined)\n\t\tthis.audio= document.getElementById(resources.audioID);\n\n\tthis.notes=new Array();\n\tthis.notes_sublists =\t{\n\t\tminStart : 0.0,\n\t\tmaxEnd : 0.0,\n\t\tinterval : 0.0,\n\t\tsubLists : new Array()\n\t};\n\n\tthis.beats=new Array();\n\tthis.beats_sublists = {\n\t\tminStart : 0.0,\n\t\tmaxEnd : 0.0,\n\t\tinterval : 0.0,\n\t\tsubLists : new Array()\n\t};\n\n\tthis.singings=new Array();\n\tthis.singing_sublists = {\n\t\tminStart : 0.0,\n\t\tmaxEnd : 0.0,\n\t\tinterval : 0.0,\n\t\tsubLists : new Array()\n\t};\n\n\tthis.InstColorMap=new Array();\n\tthis.PercColorMap=new Array();\n\tthis.SingerColorMap=new Array();\n\n\tvar that=this;\n\n\tvar xhr = new XMLHttpRequest(); \n\txhr.open(\"GET\", resources.dataPath); \n\txhr.responseType = \"blob\";\n\txhr.onload = function() \n\t{\n\t\tvar myReader = new FileReader();\n\t\tmyReader.readAsArrayBuffer(xhr.response);\n\t\tmyReader.addEventListener(\"loadend\", function(e)\n\t    {\n\t        var buffer = e.srcElement.result;\n\t        var inStream=new InStream(buffer);\n\t     \n\t        var count_notes= inStream.GetUint32();\n\t      \n\t        for (var i=0;i<count_notes; i++)\n\t    \t{\n\t    \t\tvar note={\n\t    \t\t\tinstrumentId : inStream.GetUint32(),\n\t    \t\t\tpitch : inStream.GetInt32(),\n\t    \t\t\tstart : inStream.GetFloat32(),\n\t    \t\t\tend : inStream.GetFloat32()\n\t    \t\t};\n\t    \t\tthat.notes.push(note);\n\t    \t}\n\n\t\t    that.notes_sublists.minStart=inStream.GetFloat32();\n        \tthat.notes_sublists.maxEnd=inStream.GetFloat32();\n        \tthat.notes_sublists.interval=inStream.GetFloat32();\n        \tcount_notes_sublists=inStream.GetUint32();\n\n\t    \tfor (var i=0;i<count_notes_sublists; i++)\n\t\t    {\n\t\t    \tvar count_indices=inStream.GetUint32();\n\n\t\t    \t// console.log(count_indices);\n\t\t    \tvar sublist=new Array();\n\t\t    \tfor (var j=0; j<count_indices;j++)\n\t    \t\t\tsublist.push(inStream.GetUint32());\n\t\t    \tthat.notes_sublists.subLists.push(sublist);\n\t\t    }\t\n\n\t\t    var count_beats = inStream.GetUint32();\n\n\t\t    for (var i=0;i<count_beats; i++)\n\t    \t{\n\t    \t\tvar beat={\n\t    \t\t\tpercId : inStream.GetUint32(),\n\t    \t\t\tstart : inStream.GetFloat32(),\n\t    \t\t\tend : inStream.GetFloat32(),\n\t    \t\t\tcenterX : Math.random(),\n\t    \t\t\tcenterY : Math.random()\n\t    \t\t};\n\t    \t\tthat.beats.push(beat);\n\t    \t}\n\n\t\t\tthat.beats_sublists.minStart=inStream.GetFloat32();\n        \tthat.beats_sublists.maxEnd=inStream.GetFloat32();\n        \tthat.beats_sublists.interval=inStream.GetFloat32();\n        \tvar count_beats_sublists=inStream.GetUint32();\n\n        \tfor (var i=0;i<count_beats_sublists; i++)\n\t\t    {\n\t\t    \tvar count_indices=inStream.GetUint32();\n\n\t\t    \t// console.log(count_indices);\n\t\t    \tvar sublist=new Array();\n\t\t    \tfor (var j=0; j<count_indices;j++)\n\t    \t\t\tsublist.push(inStream.GetUint32());\n\t\t    \tthat.beats_sublists.subLists.push(sublist);\n\t\t    }\n\n\t\t    var count_singings = inStream.GetUint32();\n\n\t    \tfor (var i=0;i<count_singings;i++)\n\t    \t{\n\t    \t\tvar singerId = inStream.GetUint32();\n\t    \t\tvar len= inStream.GetUint8();\n\t    \t\tvar lyric=inStream.GetString(len);\n\t    \t\tvar pitchCount=inStream.GetUint32();\n\t    \t\tvar pitchData=new Array();\n\t    \t\tfor (var j=0;j<pitchCount;j++)\n\t    \t\t\tpitchData.push(inStream.GetFloat32());\n\t    \t\tvar start=inStream.GetFloat32();\n\t    \t\tvar end=inStream.GetFloat32();\n\t    \t\tvar singing={\n\t    \t\t\tsingerId: singerId,\n\t    \t\t\tlyric: lyric,\n\t    \t\t\tpitch: pitchData,\n\t    \t\t\tstart : start,\n\t    \t\t\tend :end\n\t    \t\t};\n\t    \t\tthat.singings.push(singing);\t    \t\t\n\t    \t}\n\n\t    \tthat.singing_sublists.minStart=inStream.GetFloat32();\n        \tthat.singing_sublists.maxEnd=inStream.GetFloat32();\n        \tthat.singing_sublists.interval=inStream.GetFloat32();\n        \tvar count_singing_sublists=inStream.GetUint32();\n\n        \tfor (var i=0;i<count_singing_sublists; i++)\n\t\t    {\n\t\t    \tvar count_indices=inStream.GetUint32();\n\n\t\t    \t// console.log(count_indices);\n\t\t    \tvar sublist=new Array();\n\t\t    \tfor (var j=0; j<count_indices;j++)\n\t    \t\t\tsublist.push(inStream.GetUint32());\n\t\t    \tthat.singing_sublists.subLists.push(sublist);\n\t\t    }\n\n\t\t    that.buildColorMap();\n\t    });\n\t}\n\n\txhr.send();\n\n\tif (resources.capturer!=undefined)\n\t{\n\t\tthis.capturer=resources.capturer;\n\t\tthis.capturer.start();\n\t}\n\n\tthis.startTime=performance.now();\n\n\tthis.animationLoop();\n};\n\nMeteor.prototype.buildColorMap = function()\n{\n\tvar bankRef = 0;\n\tfor (var beat of this.beats)\n\t{\n\t\tif (this.PercColorMap[beat.percId]==undefined)\n\t\t{\n\t\t\tthis.PercColorMap[beat.percId]=s_ColorBank[bankRef];\n\t\t\tbankRef++;\n\t\t\tif (bankRef >= s_ColorBank.length) bankRef = 0;\n\t\t}\n\t}\n\n\tfor (var singing of this.singings)\n\t{\n\t\tif (this.SingerColorMap[singing.singerId]==undefined)\n\t\t{\n\t\t\tthis.SingerColorMap[singing.singerId]=s_ColorBank[bankRef];\n\t\t\tbankRef++;\n\t\t\tif (bankRef >= s_ColorBank.length) bankRef = 0;\n\t\t}\n\t}\n\n\tfor (var note of this.notes)\n\t{\n\t\tif (this.InstColorMap[note.instrumentId]==undefined)\n\t\t{\n\t\t\tthis.InstColorMap[note.instrumentId]=s_ColorBank[bankRef];\n\t\t\tbankRef++;\n\t\t\tif (bankRef >= s_ColorBank.length) bankRef = 0;\n\t\t}\n\n\t}\n};\n\nMeteor.prototype.draw_key = function(left, right, top, bottom, lineWidth, isBlack=false)\n{\n\tif (isBlack)\n\t{\n\t\tthis.canvas.fillStyle = '#000000';\n\t\tthis.canvas.strokeStyle ='#FFFFFF';\n\t}\n\telse\n\t{\n\t\tthis.canvas.fillStyle = '#FFFFFF';\n\t\tthis.canvas.strokeStyle ='#000000';\n\t}\n\tthis.canvas.lineWidth=lineWidth;\n\tthis.canvas.beginPath();\n\tthis.canvas.moveTo(left + this.cornerSize, top);\n\tthis.canvas.lineTo(right - this.cornerSize, top);\n\tthis.canvas.lineTo(right, top + this.cornerSize);\n\tthis.canvas.lineTo(right, bottom - this.cornerSize);\n\tthis.canvas.lineTo(right -this.cornerSize, bottom);\n\tthis.canvas.lineTo(left + this.cornerSize, bottom);\n\tthis.canvas.lineTo(left, bottom - this.cornerSize);\n\tthis.canvas.lineTo(left, top + this.cornerSize);\n\tthis.canvas.lineTo(left + this.cornerSize, top);\n\tthis.canvas.closePath();\n\tthis.canvas.fill();\n\tthis.canvas.stroke();\n};\n\nMeteor.prototype.draw_flash = function(centerx, centery, radius, color, alpha)\n{\n\tvar gradient = this.canvas.createRadialGradient(centerx, centery, 0.0, centerx, centery, radius);\n\tgradient.addColorStop(0,color);\n\tgradient.addColorStop(1,\"#000000\");\n\tthis.canvas.arc(centerx, centery, radius, 0, 2 * Math.PI);\n\tthis.canvas.fillStyle = gradient;\n\tthis.canvas.globalAlpha = alpha;\n\tthis.canvas.fill();\n\tthis.canvas.globalAlpha = 1.0;\n};\n\nfunction GetIntervalId(sublists, v)\n{\n\tif (v<sublists.minStart) return 0;\n\tvar id = Math.floor((v-sublists.minStart)/sublists.interval);\n\tif (id>=sublists.subLists.length)\n\t\tid = sublists.subLists.length -1;\n\treturn id;\n};\n\nMeteor.prototype.draw = function(currentTime)\n{\n\tthis.canvas.fillStyle = \"#000000\";\n\tthis.canvas.fillRect(0, 0, this.canvas.canvas.width, this.canvas.canvas.height);\n\n\tvar note_inTime = currentTime;\n\tvar note_intervalId = GetIntervalId(this.notes_sublists, note_inTime);\n\tvar note_outTime = note_inTime - this.showTime;\n\tvar note_intervalId_min = GetIntervalId(this.notes_sublists, note_outTime);\n\n\t/// draw meteors\n\tthis.canvas.globalCompositeOperation=\"lighter\";\n\n\t// notes\n\tif (this.notes_sublists.subLists.length>0)\n\t{\n\t\tvar visiableNotes=new Set();\n\t\tfor (var i = note_intervalId_min; i <= note_intervalId; i++)\n\t\t{\n\t\t\tvar sublist= this.notes_sublists.subLists[i];\n\t\t\tfor (var j = 0; j < sublist.length; j++)\n\t\t\t{\n\t\t\t\tvar note = this.notes[sublist[j]]; \n\t\t\t\tif (note.start<note_inTime && note.end> note_outTime)\n\t\t\t\t\tvisiableNotes.add(note);\n\t\t\t}\n\t\t}\n\n\t\tfor (var note of visiableNotes)\n\t\t{\n\t\t\tvar startY = this.canvas.canvas.height- this.whiteKeyHeight-\n\t\t\t (note.start - note_inTime) / -this.showTime* (this.canvas.canvas.height - this.whiteKeyHeight);\n\t\t\tvar endY = this.canvas.canvas.height- this.whiteKeyHeight-\n\t\t\t (note.end - note_inTime) / -this.showTime* (this.canvas.canvas.height - this.whiteKeyHeight);\n\n\t\t\tvar pitch = note.pitch;\n\t\t\tvar octave = 0;\n\t\t\twhile (pitch < 0)\n\t\t\t{\n\t\t\t\tpitch += 12;\n\t\t\t\toctave--;\n\t\t\t}\n\t\t\twhile (pitch >= 12)\n\t\t\t{\n\t\t\t\tpitch -= 12;\n\t\t\t\toctave++;\n\t\t\t}\n\n\t\t\tvar x = this.canvas.canvas.width*0.5 + (octave*7.0 + keyPos[pitch])*this.whiteKeyWidth;\n\n\t\t\tvar color=this.InstColorMap[note.instrumentId];\n\t\t\t\n\t\t\tthis.canvas.beginPath();\n\t\t\tthis.canvas.moveTo(x, startY);\n\t\t\tthis.canvas.lineTo(x + this.meteorHalfWidth, startY+this.meteorHalfWidth);\n\t\t\tthis.canvas.lineTo(x, endY);\n\t\t\tthis.canvas.lineTo(x - this.meteorHalfWidth, startY+this.meteorHalfWidth);\t\t\n\t\t\tthis.canvas.closePath();\n\n\t\t\tvar gradient = this.canvas.createLinearGradient(x, startY, x, endY);\n\t\t\tgradient.addColorStop(0,color);\n\t\t\tgradient.addColorStop(1,\"#000000\");\n\t\t\tthis.canvas.fillStyle = gradient;\n\t\t\tthis.canvas.fill();\n\n\t\t}\n\n\t}\n\n\t// beats\n\tif (this.beats_sublists.subLists.length>0)\n\t{\n\t\tvar beat_intervalId = GetIntervalId(this.beats_sublists, note_inTime);\n\t\tvar sublist= this.beats_sublists.subLists[beat_intervalId];\n\t\tfor (var i = 0; i < sublist.length; i++)\n\t\t{\n\t\t\tvar beat = this.beats[sublist[i]];\n\t\t\tvar start = beat.start;\n\t\t\tvar end = beat.end;\n\n\t\t\t// limting percussion flash time\n\t\t\tif (end - start > this.percussion_flash_limit)\n\t\t\t\tend = start + this.percussion_flash_limit;\n\n\t\t\tif (note_inTime >= start && note_inTime <= end)\n\t\t\t{\n\t\t\t\tvar centerx = beat.centerX*this.canvas.canvas.width;\n\t\t\t\tvar centery = beat.centerY*(this.canvas.canvas.height - this.whiteKeyHeight);\n\t\t\t\tvar radius = this.canvas.canvas.width*this.percussion_flash_size_factor;\n\n\t\t\t\tvar color=this.PercColorMap[beat.percId];\n\t\t\t\tvar alpha = (end - note_inTime) / (end - start);\n\n\t\t\t\tthis.draw_flash(centerx, centery, radius, color, alpha);\n\t\t\t}\n\n\n\t\t}\n\t}\n\n\t// singing\n\tif (this.singing_sublists.subLists.length>0)\n\t{\n\t\tvar singing_intervalId = GetIntervalId(this.singing_sublists, note_inTime);\n\t\tvar singing_intervalId_min = GetIntervalId(this.singing_sublists, note_outTime);\n\n\t\tvar visiableNotes=new Set();\n\t\tfor (var i = singing_intervalId_min; i <= singing_intervalId; i++)\n\t\t{\n\t\t\tvar sublist= this.singing_sublists.subLists[i];\n\t\t\tfor (var j = 0; j < sublist.length; j++)\n\t\t\t{\n\t\t\t\tvar note = this.singings[sublist[j]]; \n\t\t\t\tif (note.start<note_inTime && note.end> note_outTime)\n\t\t\t\t\tvisiableNotes.add(note);\n\t\t\t}\n\t\t}\n\n\t\tvar pixelPerPitch = this.whiteKeyWidth*7.0 / 12.0;\n\n\t\tfor (var note of visiableNotes)\n\t\t{\n\t\t\tvar startY = this.canvas.canvas.height- this.whiteKeyHeight-\n\t\t\t (note.start - note_inTime) / -this.showTime* (this.canvas.canvas.height - this.whiteKeyHeight);\n\t\t\tvar endY = this.canvas.canvas.height- this.whiteKeyHeight-\n\t\t\t (note.end - note_inTime) / -this.showTime* (this.canvas.canvas.height - this.whiteKeyHeight);\n\n\t\t\tvar color=this.SingerColorMap[note.singerId];\n\t\t\tvar num_pitches = note.pitch.length;\n\n\n\t\t\tthis.canvas.beginPath();\n\t\t\tif (0<num_pitches)\n\t\t\t{\n\t\t\t\tvar x=note.pitch[0]*pixelPerPitch+this.canvas.canvas.width*0.5+this.whiteKeyWidth*0.5;\n\t\t\t\tvar y=startY;\n\t\t\t\tthis.canvas.moveTo(x-this.singing_half_width, y);\n\t\t\t}\n\t\t\tfor (var i=1;i<num_pitches;i++)\n\t\t\t{\n\t\t\t\tvar x=note.pitch[i]*pixelPerPitch+this.canvas.canvas.width*0.5+this.whiteKeyWidth*0.5;\n\t\t\t\tvar k=i/(num_pitches - 1);\n\t\t\t\tvar y=startY*(1.0 - k) + endY*k;\n\t\t\t\tthis.canvas.lineTo(x-this.singing_half_width, y);\n\t\t\t}\n\n\t\t\tfor (var i=num_pitches-1; i>=0; i--)\n\t\t\t{\n\t\t\t\tvar x=note.pitch[i]*pixelPerPitch+this.canvas.canvas.width*0.5+this.whiteKeyWidth*0.5;\n\t\t\t\tvar k=i/(num_pitches - 1);\n\t\t\t\tvar y=startY*(1.0 - k) + endY*k;\n\t\t\t\tthis.canvas.lineTo(x+this.singing_half_width, y);\n\t\t\t}\n\n\t\t\tthis.canvas.closePath();\n\t\t\tvar gradient = this.canvas.createLinearGradient(x, startY, x, endY);\n\t\t\tgradient.addColorStop(0,color);\n\t\t\tgradient.addColorStop(1,\"#000000\");\n\t\t\tthis.canvas.fillStyle = gradient;\n\t\t\tthis.canvas.fill();\n\n\t\t\tvar x=note.pitch[0]*pixelPerPitch+this.canvas.canvas.width*0.5;\n\t\t\tthis.canvas.fillStyle=color;\n\t\t\tthis.canvas.font=this.fontSize.toFixed(0)+\"px sans-serif\";\n\t\t\tthis.canvas.fillText(note.lyric,x+this.singing_half_width,startY);\n\t\t}\n\n\n\t}\n\n\n\t/// draw keyboard\n\tthis.canvas.globalCompositeOperation=\"source-atop\";\n\n\tvar center=this.canvas.canvas.width*0.5;\n\tvar octaveWidth = this.whiteKeyWidth*7.0;\n\tvar minOctave = -Math.ceil(center/octaveWidth);\n\tvar maxOctave = Math.floor(center/octaveWidth);\t\n\tvar numKeys = (maxOctave - minOctave + 1) * 12;\n\tvar indexShift = -minOctave * 12;\n\n\tvar pressed = new Array(numKeys);\n\tfor (var i=0;i<numKeys;i++)\n\t\tpressed[i]=false;\n\n\t//notes\n\tif (this.notes_sublists.subLists.length>0)\n\t{\n\t\tvar sublist= this.notes_sublists.subLists[note_intervalId];\n\t\tfor (var i = 0; i < sublist.length; i++)\n\t\t{\n\t\t\tvar note = this.notes[sublist[i]];\n\t\t\tvar start = note.start;\n\t\t\tvar end = note.end;\n\n\t\t\tend -= (end-start)*0.1;\n\t\t\tif (note_inTime >= start && note_inTime <= end)\n\t\t\t{\n\t\t\t\tvar index = note.pitch + indexShift;\n\t\t\t\tif (index >= 0 && index < numKeys)\n\t\t\t\t{\n\t\t\t\t\tpressed[index] = true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\t}\n\n\tfor (var i = minOctave; center + i*octaveWidth < this.canvas.canvas.width; i++)\n\t{\n\t\tvar octaveLeft = center + i*octaveWidth;\n\t\tfor (var j = 0; j < 7; j++)\n\t\t{\n\t\t\tvar index = whitePitchs[j] + i * 12 + indexShift;\n\t\t\tvar keyPressed = pressed[index];\n\n\t\t\tvar left = octaveLeft + j*this.whiteKeyWidth;\n\t\t\tvar right = left + this.whiteKeyWidth;\n\t\t\tvar bottom = keyPressed ? this.canvas.canvas.height- this.whiteKeyPressedDelta : this.canvas.canvas.height;\n\t\t\tvar top = this.canvas.canvas.height- this.whiteKeyHeight;\n\t\t\tthis.draw_key(left, right, top, bottom, keyPressed ? this.pressedLineWidth : 1.0);\n\t\t}\n\t\tfor (var j = 0; j < 5; j++)\n\t\t{\n\t\t\tvar index = blackPitchs[j] + i * 12 + indexShift;\n\t\t\tvar keyPressed = pressed[index];\n\n\t\t\tvar keyCenter = octaveLeft + blackPos[j] * this.whiteKeyWidth;\n\t\t\tvar left = keyCenter - this.blackKeyWidth / 2.0;\n\t\t\tvar right = keyCenter + this.blackKeyWidth / 2.0;\n\n\t\t\tvar bottom = keyPressed ? this.canvas.canvas.height - this.whiteKeyHeight + this.blackKeyHeight - this.blackKeyPressedDelta : this.canvas.canvas.height - this.whiteKeyHeight + this.blackKeyHeight;\n\t\t\tvar top = this.canvas.canvas.height - this.whiteKeyHeight;\n\t\t\tthis.draw_key(\tleft, right, top, bottom, keyPressed ? this.pressedLineWidth : 1.0, true);\n\t\t}\n\t} \n\n}\n\nMeteor.prototype.animationLoop = function() \n{\n\tvar that = this;\n    requestAnimationFrame(\n    \tfunction() \n    \t{\n    \t\tthat.animationLoop()\n    \t});\n\n    if (this.audio!=undefined)\n    \tthis.draw(this.audio.currentTime);\n    else\n    {\n    \tthis.draw((performance.now()-this.startTime)*0.001);\n    \tif (this.capturer!=undefined)\n    \t{\n    \t\tthis.capturer.capture(this.canvas.canvas);\n    \t}\n    }\n};\n"
  },
  {
    "path": "docs/meteor/ouchi.md",
    "content": "<script type=\"text/javascript\" src=\"meteor.js\"></script>\n\n<script type=\"text/javascript\">\n    window.onload = function() {\n        var restiktok = {\n            canvasID : \"canvastiktok\",\n            audioID : \"audiotiktok\",\n            dataPath : \"ouchi.meteor\"\n        };\n        meteortiktok = new Meteor(restiktok);\n    };\n</script>\n\n<style type=\"text/css\">\n    canvas {\n        display: block;\n        width: 100%;\n        height: width*0.5625;\n    }\t\t\n</style>\n\n<div>\n    <canvas id=\"canvastiktok\" width=\"800\" height=\"450\"></canvas>\n</div>\n<div>\n    <audio id='audiotiktok' controls=\"controls\">\n        <source type=\"audio/mpeg\" src=\"ouchi.mp3\"/>\n    </audio>\n</div>\n\n# この素晴らしい世界に祝福を！2 ED/おうちに帰りたい\n\n## Info\n* The song is from Anime この素晴らしい世界に祝福を！2 produced by Studio DEEN.\n* Originally sung by: 雨宮天, 高橋李依, 茅野愛衣\n* Melody/Lyric by:  佐藤良成\n* Video published earlier on Bilibili: [https://www.bilibili.com/video/av19520577](https://www.bilibili.com/video/av19520577)\n* 呗音デフォ子 comes with the software UTAU\n* 三色あやか 連続音V2.0: [https://bowlroll.net/file/69898](https://bowlroll.net/file/69898)\n\n```python\nimport ScoreDraft\nfrom ScoreDraft.Notes import *\n\ndoc=ScoreDraft.MeteorDocument()\n\nuta= ScoreDraft.uta_UTAU()\nAyaka= ScoreDraft.Ayaka2_UTAU()\nAyaka.setLyricConverter(ScoreDraft.JPVCVConverter)\n\nuta.tune('pan -0.5')\nAyaka.tune('pan 0.5')\n\n# All instrument samples from https://freewavesamples.com/\nguitar = ScoreDraft.JazzGuitar()\nbass = ScoreDraft.Bass()\nharmonica = ScoreDraft.Harmonica()\n\nBassDrum=ScoreDraft.BassDrum()\nClosedHitHat = ScoreDraft.ClosedHitHat()\n\nperc_list= [BassDrum, ClosedHitHat]\n\ndef dong(duration=48):\n\treturn (0,duration)\n\ndef chi(duration=48):\n\treturn (1,duration)\n\ndef faS(octave=5, duration=48):\n\treturn note(octave,Freqs[6],duration)\n\ndef soS(octave=5, duration=48):\n\treturn note(octave,Freqs[8],duration)\n\ntrack=doc.newBuf()\ntrack_g=doc.newBuf()\ntrack_b=doc.newBuf()\ntrack_h=doc.newBuf()\ntrack_p=doc.newBuf()\n\ndrum_repeat = [dong(24), chi(24), dong(24), chi(24), dong(24), chi(24), dong(24), chi(24)]\n\nseq_guitar = [ do(7, 96), ti(6,48), la(6,24), so(6,24), BK(192)]\nseq_guitar += [ do(5, 96), BK(72), mi(6,24), so(6,24), so(5,24), mi(4, 96), BK(72), ti(5,24), mi(6,24), mi(5,24) ]\nseq_bass = [do(4, 96), mi(3,96)]\nseq_drum = []\nseq_drum += drum_repeat\n\nseq_guitar += [la(6,24), do(7,48), la(6,24), so(6,96), BK(192)]\nseq_guitar += [fa(5,96), BK(48), do(6,48), do(5,96), BK(72), so(5,12), do(6,12), mi(6,24), so(5,24)]\nseq_bass += [fa(3, 96), do(4,96)]\nseq_drum += drum_repeat\n\nseq_harmonica = [BL(192*2), do(7,24), la(6,24), so(6,24), mi(6,24), re(6,24), do(6,24), mi(6,48)]\nseq_guitar += [fa(5,48), do(6,48), mi(5,48), mi(4,48)]\nseq_bass += [fa(3, 96), do(4,96)]\nseq_drum += drum_repeat\n\nseq_harmonica += [do(6,48), do(6,24), la(5,24), do(6,96)]\nseq_guitar += [re(5,48), so(4,48), do(5,96), BK(72), mi(5,12), so(5,12), do(6,48)]\nseq_bass += [re(4, 48), so(3,48), do(4,96)]\nseq_drum += drum_repeat\n\ndoc.sing([BL(192*4)], uta, track)\n\nseq= [('な', so(4,24), 'に', do(5,24), 'も', do(5,24), 'い', re(5,24), 'わ', mi(5,24), 'ず', so(5,24)), BL(24)]\nseq+= [('に', so(5,24), 'い', la(5,24), 'え', do(6,24), 'うぉ', do(6,24), 'で', la(5,24), 'て', so(5,48)), BL(48)]\nseq+= [('こ', la(5,24), 'ん', do(6,24), 'な', do(6,24), 'と', la(5,24), 'こ', so(5,24), 'ま', so(5,24), 'で', mi(5,36)), BL(12)]\nseq+= [('き', re(5,24), 'た', do(5,24), 'け', re(5,24), 'れ', mi(5,24), 'ど', re(5,48)), BL(48)]\n\nseq_harmonica += [BL(192)]\nseq_guitar += [ do(5, 96), BK(60), mi(5,12), so(5,48), mi(4,96), BK(60), mi(5,12), so(5,48), BK(48), ti(5,48)]\nseq_bass += [do(4, 96), mi(3,96)]\nseq_drum += drum_repeat\n\nseq_harmonica += [BL(192)]\nseq_guitar += [ fa(5,96), BK(60), do(6,60), do(5,96), BK(72), so(5,12), do(6,12), mi(6,24), so(5,24)]\nseq_bass += [fa(3, 96), do(4,96)]\nseq_drum += drum_repeat\n\nseq_harmonica += [BL(192)]\nseq_guitar += [ do(5, 96), BK(96), fa(5,36), do(6,60), mi(4,96), BK(60), mi(5,12), so(5,48), BK(48), ti(5,48)]\nseq_bass += [do(4, 96), mi(3,96)]\nseq_drum += drum_repeat\n\nseq_harmonica += [BL(192)]\nseq_guitar += [ re(5,48), la(5,48), so(4,96), BK(72), ti(4,12), re(5,12), so(5,24), re(5,24)]\nseq_bass += [ re(4, 96), so(3,96)]\nseq_drum += drum_repeat\n\nseq+= [('ひ', so(4,24), 'ぐ', do(5,24), 'れ', do(5,24), 'と', re(5,24), 'と', mi(5,24), 'も', so(5,24)), BL(24)]\nseq+= [('に', so(5,24), 'な', la(5,24), 'き', do(6,24), 'む', do(6,24), 'し', la(5,24), 'が', so(5,48)), BL(48)]\nseq+= [('こ', la(5,24), 'こ', do(6,24), 'ろ', do(6,24), 'ぼ', la(5,24), 'そ', so(5,24), 'い', so(5,24), 'と', mi(5,36)), BL(12)]\nseq+= [('べ', re(5,24), 'そ', mi(5,24), 'うぉ', mi(5,24), 'か', re(5,24), 'く', do(5,48)), BL(48)]\n\nseq_harmonica += [BL(192)]\nseq_guitar += [ do(5, 96), BK(60), mi(5,12), so(5,48), mi(4,96), BK(60), mi(5,12), so(5,48), BK(48), ti(5,48)]\nseq_bass += [do(4, 96), mi(3,96)]\nseq_drum += drum_repeat\n\nseq_harmonica += [BL(192)]\nseq_guitar += [ fa(5,96), BK(60), do(6,60), do(5,96), BK(72), so(5,12), do(6,12), mi(6,24), so(5,24)]\nseq_bass += [fa(3, 96), do(4,96)]\nseq_drum += drum_repeat\n\nseq_harmonica += [BL(192)]\nseq_guitar += [ fa(5,36), do(6,60), mi(5,48), BK(48), so(5,48), do(5,48), BK(48), so(5,48), BK(48), do(6,48)  ]\nseq_bass += [fa(3, 96), do(4,96)]\nseq_drum += drum_repeat\n\nseq_harmonica += [BL(192)]\nseq_guitar += [ re(5,36), BK(36), la(5,36), ti(4, 60), BK(48), so(5,48), do(5,96), BK(72), mi(5,12), so(5,12), do(6,48)]\nseq_bass += [re(4, 48), so(3,48), do(4,96)]\nseq_drum += drum_repeat\n\ndoc.sing(seq, uta, track)\n\nseq= [('あ', so(4,24), 'か', do(5,24), 'く', do(5,24), 'そ', re(5,24), 'ま', mi(5,24), 'る', so(5,24)), BL(24)]\nseq+= [('ま', so(5,24), 'ち', la(5,24), 'の', do(6,24), 'そ', do(6,24), 'ら', la(5,24), 'うぉ', so(5,48)), BL(48)]\nseq+= [('か', la(5,24), 'ら', do(6,24), 'す', do(6,24), 'が', la(5,24), 'な', so(5,24), 'い', so(5,24), 'て', mi(5,36)), BL(12)]\nseq+= [('い', re(5,24), 'き', do(5,24), 'す', re(5,24), 'ぎ', mi(5,24), 'る', re(5,48)), BL(48)]\n\nseq_harmonica += [BL(192)]\nseq_guitar += [ do(5, 96), BK(60), mi(5,12), so(5,48), mi(4,96), BK(60), mi(5,12), so(5,48), BK(48), ti(5,48)]\nseq_bass += [do(4, 96), mi(3,96)]\nseq_drum += drum_repeat\n\nseq_harmonica += [BL(192)]\nseq_guitar += [ fa(5,96), BK(60), do(6,60), do(5,96), BK(72), so(5,12), do(6,12), mi(6,24), so(5,24)]\nseq_bass += [fa(3, 96), do(4,96)]\nseq_drum += drum_repeat\n\nseq_harmonica += [BL(192)]\nseq_guitar += [ do(5, 96), BK(96), fa(5,36), do(6,60), mi(4,96), BK(60), mi(5,12), so(5,48), BK(48), ti(5,48)]\nseq_bass += [do(4, 96), mi(3,96)]\nseq_drum += drum_repeat\n\nseq_harmonica += [BL(192)]\nseq_guitar += [ re(5,48), la(5,48), so(4,96), BK(72), ti(4,12), re(5,12), so(5,24), re(5,24)]\nseq_bass += [ re(4, 96), so(3,96)]\nseq_drum += drum_repeat\n\nseq+= [('み', so(4,24), 'ち', do(5,24), 'に', do(5,24), 'の', re(5,24), 'び', mi(5,24), 'る', so(5,24)), BL(24)]\nseq+= [('な', so(5,24), 'が', la(5,24), 'い', do(6,24), 'か', do(6,24), 'げ', la(5,24), 'が', so(5,48)), BL(48)]\nseq+= [('は', la(5,24), 'や', do(6,24), 'く', do(6,24), 'か', la(5,24), 'え', so(5,24), 'ろ', so(5,24), 'と', mi(5,36)), BL(12)]\nseq+= [('そ', re(5,24), 'で', mi(5,24), 'うぉ', mi(5,24), 'ひ', re(5,24), 'く', do(5,48)), BL(48)]\n\nseq_harmonica += [BL(192)]\nseq_guitar += [ do(5, 96), BK(60), mi(5,12), so(5,48), mi(4,96), BK(60), mi(5,12), so(5,48), BK(48), ti(5,48)]\nseq_bass += [do(4, 96), mi(3,96)]\nseq_drum += drum_repeat\n\nseq_harmonica += [BL(192)]\nseq_guitar += [ fa(5,96), BK(60), do(6,60), do(5,96), BK(72), so(5,12), do(6,12), mi(6,24), so(5,24)]\nseq_bass += [fa(3, 96), do(4,96)]\nseq_drum += drum_repeat\n\nseq_harmonica += [BL(192)]\nseq_guitar += [ fa(5,36), do(6,60), mi(5,48), BK(48), so(5,48), do(5,48), BK(48), so(5,48), BK(48), do(6,48)  ]\nseq_bass += [fa(3, 96), do(4,96)]\nseq_drum += drum_repeat\n\nseq_harmonica += [BL(192)]\nseq_guitar += [ re(5,36), BK(36), la(5,36), ti(4, 60), BK(48), so(5,48), do(5,96), BK(72), mi(5,12), so(5,12), do(6,48)]\nseq_bass += [re(4, 48), so(3,48), do(4,96)]\nseq_drum += drum_repeat\n\ndoc.sing(seq, Ayaka, track)\n\nseq = [('お', la(5,24), 'さ', do(6,48), 'か', la(5,24), 'な', do(6,48), 'うぉ', la(5,36)), BL(12)]\nseq +=[('や', so(5,24), 'く', mi(5,24), 'に', so(5,24), 'お', la(5,24), 'い', so(5,48), BL(48)) ]\n\nseq_harmonica += [BL(192)]\nseq_guitar += [ fa(5,96), BK(60), la(5,12), do(6,48), BK(48), mi(6,48), la(5,96), BK(72), do(6,24), mi(6,48)]\nseq_bass += [fa(3,96), la(3,96)]\nseq_drum += drum_repeat\n\nseq_harmonica += [BL(192)]\nseq_guitar += [mi(4,48), BK(48), so(5,48), ti(5,48), do(5,96), BK(72), re(5,12), mi(5,12), so(5,24), mi(5,24)]\nseq_bass += [mi(3,96), do(4,96)]\nseq_drum += drum_repeat\n\ndoc.sing(seq, uta, track)\n\nseq =[('ば', la(5,24), 'ん', do(6,48), 'ご', la(5,24), 'は', do(6,24), 'ん', do(6,24), 'の', la(5,36)), BL(12)]\nseq +=[('い', so(5,24), 'い', mi(5,24), 'に', re(5,24), 'お', re(5,24), 'い', re(5,48), BL(48)) ]\n\nseq_harmonica += [BL(192)]\nseq_guitar += [fa(5,96), BK(60), la(5,12), do(6,48), BK(48), mi(6,48), faS(5,96), BK(72), do(6,24), mi(6,48)]\nseq_bass += [fa(3,96), faS(3,96)]\nseq_drum += drum_repeat\n\nseq_harmonica += [BL(192)]\nseq_guitar += [so(5,48), BK(48), ti(5,48), re(5,48), BK(48), so(5,48), so(4,24), so(5,12), re(5,12), so(4,48)]\nseq_bass += [re(4,96), so(3,96)] \nseq_drum += drum_repeat\n\ndoc.sing(seq, Ayaka, track)\n\nseq= [('お', so(4,24), 'な', do(5,24), 'か', do(5,24), 'の', re(5,24), 'む', mi(5,24), 'し', so(5,24)), BL(24)]\nseq+= [('も', so(5,24), 'な', la(5,24), 'き', do(6,24), 'だ', do(6,24), 'し', la(5,24), 'た', so(5,48)), BL(48)]\n\nseq_harmonica += [BL(192)]\nseq_guitar += [ do(5, 96), BK(60), mi(5,12), so(5,48), mi(4,96), BK(60), mi(5,12), so(5,48), BK(48), ti(5,48)]\nseq_bass += [do(4, 96), mi(3,96)]\nseq_drum += drum_repeat\n\nseq_harmonica += [BL(192)]\nseq_guitar += [ fa(5,96), BK(60), do(6,60), do(5,96), BK(72), so(5,12), do(6,12), mi(6,24), so(5,24)]\nseq_bass += [fa(3, 96), do(4,96)]\nseq_drum += drum_repeat\n\ndoc.sing(seq, uta, track)\n\nseq= [('い', la(5,24), 'じ', do(6,24), 'うぉ', do(6,24), 'は', la(5,24), 'る', so(5,24), 'の', so(5,24), 'も', mi(5,36)), BL(12)]\nseq+= [('あ', re(5,24), 'き', do(5,24), 'て', re(5,24), 'ひ', mi(5,24), 'た', re(5,48)), BL(48)]\n\nseq_harmonica += [BL(192)]\nseq_guitar += [ do(5, 96), BK(96), fa(5,36), do(6,60), mi(4,96), BK(60), mi(5,12), so(5,48), BK(48), ti(5,48)]\nseq_bass += [do(4, 96), mi(3,96)]\nseq_drum += drum_repeat\n\nseq_harmonica += [BL(192)]\nseq_guitar += [ re(5,48), la(5,48), so(4,96), BK(72), ti(4,12), re(5,12), so(5,24), re(5,24)]\nseq_bass += [ re(4, 96), so(3,96)]\nseq_drum += drum_repeat\n\ndoc.sing(seq, Ayaka, track)\n\nseq= [('い', so(4,24), 'ま', do(5,24), 'す', do(5,24), 'ぐ', re(5,24), 'ご', mi(5,24), 'め', so(5,12), 'ん', so(5,12)), BL(24)]\nseq+= [('と', so(5,24), 'あ', la(5,24), 'や', do(6,24), 'ま', do(6,24), 'あ', re(6,24), 'て', mi(6,36)), BL(12), ('あ', mi(6,24), re(6,24))]\n\nseq_harmonica += [BL(192)]\nseq_guitar += [ do(5, 96), BK(60), mi(5,12), so(5,48), mi(4,96), BK(60), mi(5,12), so(5,48), BK(48), ti(5,48)]\nseq_bass += [do(4, 96), mi(3,96)]\nseq_drum += drum_repeat\n\nseq_harmonica += [BL(192)]\nseq_guitar += [ fa(5,96), BK(60), do(6,12), la(6,48), mi(4,48), BK(48), mi(6,48), BK(48), soS(6,48), ti(4,48), BK(48), re(6,48), BK(48), so(6,48)]\nseq_bass += [fa(3, 96), mi(3,48), re(3,48)]\nseq_drum += drum_repeat\n\ndoc.sing(seq, uta, track)\n\nseq= [('は', do(6,24), 'や', la(5,24), 'く', do(6,24), 'お', la(5,24), 'う', so(5,24), 'ち', mi(5,24), 'に', do(6,36)), BL(12)]\nseq+= [('か', re(5,24), 'え', mi(5,24), 'り', mi(5,24), 'た', re(5,24), 'い', do(5,48)), BL(48)]\n\nseq_harmonica += [BL(192)]\nseq_guitar += [ fa(5, 96), BK(60), do(6,12), mi(6,48), mi(5,48), BK(48), ti(5,48), BK(48), re(6,48), la(4,48), BK(48), so(5,48), BK(48), do(6,48), BK(48), mi(6,48)]\nseq_bass += [fa(3, 96), mi(3,48), la(3,48)]\nseq_drum += drum_repeat\n\nseq_harmonica += [BL(192)]\nseq_guitar += [ re(5,48), BK(48), la(5,48), so(4,48), do(5,96), BK(72), mi(5,24), do(5,48), BK(48), do(6,48)]\nseq_bass += [re(3,48), so(3,48), do(4,96)]\nseq_drum += drum_repeat\n\nseq_harmonica += [do(7,24), la(6,24), so(6,24), mi(6,24), re(6,24), do(6,24), mi(6,48)]\nseq_guitar += [ fa(5,48), do(6,48), mi(5,48), mi(4,48)]\nseq_bass += [fa(3, 96), mi(3,96)]\nseq_drum += drum_repeat\n\nseq_harmonica += [do(6,48), do(6,24), la(5,24), do(6,96)]\nseq_guitar += [re(5,48), so(4,48), do(5,96), BK(96), mi(5,96), BK(96), so(5,96)]\nseq_bass += [so(3, 96), do(4,96)]\nseq_drum += drum_repeat\n\ndoc.sing(seq+[BK(192*2)], Ayaka, track)\ndoc.sing(seq+[BL(192*2)], uta, track)\n\nseq= [('い', so(4,24), 'く', do(5,24), 'あ', do(5,24), 'て', re(5,24), 'の', mi(5,24), 'な', so(5,12), 'い', so(5,12)), BL(24)]\nseq+= [('ぼ', so(5,24), 'く', la(5,24), 'の', do(6,24), 'ま', do(6,24), 'え', la(5,24), 'うぉ', so(5,48)), BL(48)]\nseq+= [('こ', la(5,24), 'ど', do(6,24), 'も', do(6,24), 'が', la(5,24), 'ひ', so(5,24), 'と', so(5,24), 'り', mi(5,36)), BL(12)]\nseq+= [('い', re(5,24), 'き', do(5,24), 'す', re(5,24), 'ぎ', mi(5,24), 'る', re(5,48)), BL(48)]\n\nseq_harmonica += [BL(192)]\nseq_guitar += [ do(5, 96), BK(60), mi(5,12), so(5,48), mi(4,96), BK(60), mi(5,12), so(5,48), BK(48), ti(5,48)]\nseq_bass += [do(4, 96), mi(3,96)]\nseq_drum += drum_repeat\n\nseq_harmonica += [BL(192)]\nseq_guitar += [ fa(5,96), BK(60), do(6,60), do(5,96), BK(72), so(5,12), do(6,12), mi(6,24), so(5,24)]\nseq_bass += [fa(3, 96), do(4,96)]\nseq_drum += drum_repeat\n\nseq_harmonica += [BL(192)]\nseq_guitar += [ do(5, 96), BK(96), fa(5,36), do(6,60), mi(4,96), BK(60), mi(5,12), so(5,48), BK(48), ti(5,48)]\nseq_bass += [do(4, 96), mi(3,96)]\nseq_drum += drum_repeat\n\nseq_harmonica += [BL(192)]\nseq_guitar += [ re(5,48), la(5,48), so(4,96), BK(72), ti(4,12), re(5,12), so(5,24), re(5,24)]\nseq_bass += [ re(4, 96), so(3,96)]\nseq_drum += drum_repeat\n\ndoc.sing(seq, uta, track)\n\nseq= [('は', so(4,24), 'な', do(5,24), 'うぉ', do(5,24), 'す', re(5,24), 'す', mi(5,24), 'り', so(5,24)), BL(24)]\nseq+= [('しゃ', so(5,24), 'く', la(5,24), 'り', do(6,24), 'あ', do(6,24), 'げ', la(5,24), 'て', so(5,48)), BL(48)]\nseq+= [('わ', la(5,24), 'き', do(6,24), 'め', do(6,24), 'も', la(5,24), 'ふ', so(5,24), 'ら', so(5,24), 'ず', mi(5,36)), BL(12)]\nseq+= [('は', re(5,24), 'し', mi(5,24), 'い', mi(5,24), 'て', re(5,24), 'く', do(5,48)), BL(48)]\n\nseq_harmonica += [BL(192)]\nseq_guitar += [ do(5, 96), BK(60), mi(5,12), so(5,48), mi(4,96), BK(60), mi(5,12), so(5,48), BK(48), ti(5,48)]\nseq_bass += [do(4, 96), mi(3,96)]\nseq_drum += drum_repeat\n\nseq_harmonica += [BL(192)]\nseq_guitar += [ fa(5,96), BK(60), do(6,60), do(5,96), BK(72), so(5,12), do(6,12), mi(6,24), so(5,24)]\nseq_bass += [fa(3, 96), do(4,96)]\nseq_drum += drum_repeat\n\nseq_harmonica += [BL(192)]\nseq_guitar += [ fa(5,36), do(6,60), mi(5,48), BK(48), so(5,48), do(5,48), BK(48), so(5,48), BK(48), do(6,48)  ]\nseq_bass += [fa(3, 96), do(4,96)]\nseq_drum += drum_repeat\n\nseq_harmonica += [BL(192)]\nseq_guitar += [ re(5,36), BK(36), la(5,36), ti(4, 60), BK(48), so(5,48), do(5,96), BK(72), mi(5,12), so(5,12), do(6,48)]\nseq_bass += [re(4, 48), so(3,48), do(4,96)]\nseq_drum += drum_repeat\n\ndoc.sing(seq, Ayaka, track)\n\nseq = [('や', la(5,24), 'み', do(6,48), 'に', la(5,24), 'き', do(6,48), 'え', la(5,36)), BL(12)]\nseq +=[('て', so(5,24), 'く', mi(5,24), 'せ', so(5,24), 'な', la(5,24), 'か', so(5,48), BL(48)) ]\n\nseq_harmonica += [BL(192)]\nseq_guitar += [ fa(5,96), BK(60), la(5,12), do(6,48), BK(48), mi(6,48), la(5,96), BK(72), do(6,24), mi(6,48)]\nseq_bass += [fa(3,96), la(3,96)]\nseq_drum += drum_repeat\n\nseq_harmonica += [BL(192)]\nseq_guitar += [mi(4,48), BK(48), so(5,48), ti(5,48), do(5,96), BK(72), re(5,12), mi(5,12), so(5,24), mi(5,24)]\nseq_bass += [mi(3,96), do(4,96)]\nseq_drum += drum_repeat\n\ndoc.sing(seq, uta, track)\n\nline=('あ', la(5,24), 'の', do(6,48), 'ひ', la(5,24), 'の', do(6,48), 'ぼ', la(5,24), 'く', do(6,24))\nline+=('に', re(6,24), 'に', do(6,24), 'て', re(6,24), 'い', mi(6,24), 'る', re(6,48), BL(48))\nseq =[line]\n\nseq_harmonica += [BL(192)]\nseq_guitar += [fa(5,96), BK(60), la(5,12), do(6,48), BK(48), mi(6,48), faS(5,96), BK(72), do(6,24), mi(6,48)]\nseq_bass += [fa(3,96), faS(3,96)]\nseq_drum += drum_repeat\n\nseq_harmonica += [BL(192)]\nseq_guitar += [so(5,48), BK(48), ti(5,48), re(5,48), BK(48), so(5,48), so(4,24), so(5,12), re(5,12), so(4,48)]\nseq_bass += [re(4,96), so(3,96)] \nseq_drum += drum_repeat\n\ndoc.sing(seq, Ayaka, track)\n\nseq= [('は', so(4,24), 'し', do(5,24), 'れ', do(5,24), 'は', re(5,24), 'し', mi(5,24), 'れ', so(5,24)), BL(24)]\nseq+= [('な', so(5,24), 'み', la(5,24), 'だ', do(6,24), 'ふ', do(6,24), 'い', la(5,24), 'て', so(5,48)), BL(48)]\n\nseq_harmonica += [BL(192)]\nseq_guitar += [ do(5, 96), BK(60), mi(5,12), so(5,48), mi(4,96), BK(60), mi(5,12), so(5,48), BK(48), ti(5,48)]\nseq_bass += [do(4, 96), mi(3,96)]\nseq_drum += drum_repeat\n\nseq_harmonica += [BL(192)]\nseq_guitar += [ fa(5,96), BK(60), do(6,60), do(5,96), BK(72), so(5,12), do(6,12), mi(6,24), so(5,24)]\nseq_bass += [fa(3, 96), do(4,96)]\nseq_drum += drum_repeat\n\ndoc.sing(seq, uta, track)\n\nseq= [('か', la(5,24), 'て', do(6,24), 'た', do(6,24), 'お', la(5,24), 'つ', so(5,24), 'き', so(5,24), 'さ', mi(5,18), 'ん', mi(5,18)), BL(12)]\nseq+= [('お', re(5,24), 'い', do(5,24), 'か', re(5,24), 'け', mi(5,24), 'て', re(5,48)), BL(48)]\n\nseq_harmonica += [BL(192)]\nseq_guitar += [ do(5, 96), BK(96), fa(5,36), do(6,60), mi(4,96), BK(60), mi(5,12), so(5,48), BK(48), ti(5,48)]\nseq_bass += [do(4, 96), mi(3,96)]\nseq_drum += drum_repeat\n\nseq_harmonica += [BL(192)]\nseq_guitar += [ re(5,48), la(5,48), so(4,96), BK(72), ti(4,12), re(5,12), so(5,24), re(5,24)]\nseq_bass += [ re(4, 96), so(3,96)]\nseq_drum += drum_repeat\n\ndoc.sing(seq, Ayaka, track)\n\nseq= [('い', so(4,24), 'ま', do(5,24), 'す', do(5,24), 'ぐ', re(5,24), 'ご', mi(5,24), 'め', so(5,12), 'ん', so(5,12)), BL(24)]\nseq+= [('と', so(5,24), 'あ', la(5,24), 'や', do(6,24), 'ま', do(6,24), 'れ', re(6,24), 'ば', mi(6,36)), BL(12), ('あ', mi(6,24), re(6,24))]\n\nseq_harmonica += [BL(192)]\nseq_guitar += [ do(5, 96), BK(60), mi(5,12), so(5,48), mi(4,96), BK(60), mi(5,12), so(5,48), BK(48), ti(5,48)]\nseq_bass += [do(4, 96), mi(3,96)]\nseq_drum += drum_repeat\n\nseq_harmonica += [BL(192)]\nseq_guitar += [ fa(5,96), BK(60), do(6,12), la(6,48), mi(4,48), BK(48), mi(6,48), BK(48), soS(6,48), ti(4,48), BK(48), re(6,48), BK(48), so(6,48)]\nseq_bass += [fa(3, 96), mi(3,48), re(3,48)]\nseq_drum += drum_repeat\n\ndoc.sing(seq, uta, track)\n\nseq= [('ば', do(6,24), 'ん', la(5,24), 'ご', do(6,24), 'は', la(5,24), 'ん', so(5,24), 'に', mi(5,24), 'わ', do(6,36)), BL(12)]\nseq+= [('ま', re(5,24), 'に', mi(5,24), 'あ', mi(5,24), 'う', re(5,24), 'さ', do(5,48)), BL(48)]\n\nseq_harmonica += [BL(192)]\nseq_guitar += [ fa(5, 96), BK(60), do(6,12), mi(6,48), mi(5,48), BK(48), ti(5,48), BK(48), re(6,48), la(4,48), BK(48), so(5,48), BK(48), do(6,48), BK(48), mi(6,48)]\nseq_bass += [fa(3, 96), mi(3,48), la(3,48)]\nseq_drum += drum_repeat\n\nseq_harmonica += [BL(192)]\nseq_guitar += [ re(5,48), BK(48), la(5,48), so(4,48), do(5,96), BK(72), mi(5,24), do(5,48), BK(48), do(6,48)]\nseq_bass += [re(3,48), so(3,48), do(4,96)]\nseq_drum += drum_repeat\n\nseq_harmonica += [BL(192)]\nseq_guitar += [do(7,24), la(6,24), so(6,24), mi(6,24), re(6,24), do(6,24), mi(6,48),BK(192)]\nseq_guitar += [ fa(5,48), do(6,48), mi(5,48), mi(4,48)]\nseq_bass += [fa(3, 96), mi(3,96)]\nseq_drum += drum_repeat\n\nseq_harmonica += [BL(192)]\nseq_guitar += [do(6,48), do(6,24), la(5,24), do(6,96),BK(192)]\nseq_guitar += [re(5,48), so(4,48), do(5,96), BK(96), mi(5,96), BK(96), so(5,96)]\nseq_bass += [so(3, 96), do(4,96)]\nseq_drum += drum_repeat\n\ndoc.sing(seq+[BK(192*2)], Ayaka, track)\ndoc.sing(seq+[BL(192*2)], uta, track)\n\nseq = [('お', la(5,24), 'さ', do(6,48), 'か', la(5,24), 'な', do(6,48), 'うぉ', la(5,36)), BL(12)]\nseq +=[('や', so(5,24), 'く', mi(5,24), 'に', so(5,24), 'お', la(5,24), 'い', so(5,48), BL(48)) ]\n\nseq_harmonica += [BL(192)]\nseq_guitar += [ fa(5,96), BK(60), la(5,12), do(6,48), BK(48), mi(6,48), la(5,96), BK(72), do(6,24), mi(6,48)]\nseq_bass += [fa(3,96), la(3,96)]\nseq_drum += drum_repeat\n\nseq_harmonica += [BL(192)]\nseq_guitar += [mi(4,48), BK(48), so(5,48), ti(5,48), do(5,96), BK(72), re(5,12), mi(5,12), so(5,24), mi(5,24)]\nseq_bass += [mi(3,96), do(4,96)]\nseq_drum += drum_repeat\n\ndoc.sing(seq, uta, track)\n\nseq =[('ば', la(5,24), 'ん', do(6,48), 'ご', la(5,24), 'は', do(6,24), 'ん', do(6,24), 'の', la(5,36)), BL(12)]\nseq +=[('い', so(5,24), 'い', mi(5,24), 'に', re(5,24), 'お', re(5,24), 'い', re(5,48), BL(48)) ]\n\nseq_harmonica += [BL(192)]\nseq_guitar += [fa(5,96), BK(60), la(5,12), do(6,48), BK(48), mi(6,48), faS(5,96), BK(72), do(6,24), mi(6,48)]\nseq_bass += [fa(3,96), faS(3,96)]\nseq_drum += drum_repeat\n\nseq_harmonica += [BL(192)]\nseq_guitar += [so(5,48), BK(48), ti(5,48), re(5,48), BK(48), so(5,48), so(4,24), so(5,12), re(5,12), so(4,48)]\nseq_bass += [re(4,96), so(3,96)] \nseq_drum += drum_repeat\n\ndoc.sing(seq, Ayaka, track)\n\nseq= [('お', so(4,24), 'な', do(5,24), 'か', do(5,24), 'の', re(5,24), 'む', mi(5,24), 'し', so(5,24)), BL(24)]\nseq+= [('も', so(5,24), 'な', la(5,24), 'き', do(6,24), 'だ', do(6,24), 'し', la(5,24), 'た', so(5,48)), BL(48)]\n\nseq_harmonica += [BL(192)]\nseq_guitar += [ do(5, 96), BK(60), mi(5,12), so(5,48), mi(4,96), BK(60), mi(5,12), so(5,48), BK(48), ti(5,48)]\nseq_bass += [do(4, 96), mi(3,96)]\nseq_drum += drum_repeat\n\nseq_harmonica += [BL(192)]\nseq_guitar += [ fa(5,96), BK(60), do(6,60), do(5,96), BK(72), so(5,12), do(6,12), mi(6,24), so(5,24)]\nseq_bass += [fa(3, 96), do(4,96)]\nseq_drum += drum_repeat\n\ndoc.sing(seq, uta, track)\n\nseq= [('い', la(5,24), 'じ', do(6,24), 'うぉ', do(6,24), 'は', la(5,24), 'る', so(5,24), 'の', so(5,24), 'も', mi(5,36)), BL(12)]\nseq+= [('あ', re(5,24), 'き', do(5,24), 'て', re(5,24), 'ひ', mi(5,24), 'た', re(5,48)), BL(48)]\n\nseq_harmonica += [BL(192)]\nseq_guitar += [ do(5, 96), BK(96), fa(5,36), do(6,60), mi(4,96), BK(60), mi(5,12), so(5,48), BK(48), ti(5,48)]\nseq_bass += [do(4, 96), mi(3,96)]\nseq_drum += drum_repeat\n\nseq_harmonica += [BL(192)]\nseq_guitar += [ re(5,48), la(5,48), so(4,96), BK(72), ti(4,12), re(5,12), so(5,24), re(5,24)]\nseq_bass += [ re(4, 96), so(3,96)]\nseq_drum += drum_repeat\n\ndoc.sing(seq, Ayaka, track)\n\nseq= [('い', so(4,24), 'ま', do(5,24), 'す', do(5,24), 'ぐ', re(5,24), 'ご', mi(5,24), 'め', so(5,12), 'ん', so(5,12)), BL(24)]\nseq+= [('と', so(5,24), 'あ', la(5,24), 'や', do(6,24), 'ま', do(6,24), 'あ', re(6,24), 'て', mi(6,36)), BL(12), ('あ', mi(6,24), re(6,24))]\n\nseq_harmonica += [BL(192)]\nseq_guitar += [ do(5, 96), BK(60), mi(5,12), so(5,48), mi(4,96), BK(60), mi(5,12), so(5,48), BK(48), ti(5,48)]\nseq_bass += [do(4, 96), mi(3,96)]\nseq_drum += drum_repeat\n\nseq_harmonica += [BL(192)]\nseq_guitar += [ fa(5,96), BK(60), do(6,12), la(6,48), mi(4,48), BK(48), mi(6,48), BK(48), soS(6,48), ti(4,48), BK(48), re(6,48), BK(48), so(6,48)]\nseq_bass += [fa(3, 96), mi(3,48), re(3,48)]\nseq_drum += drum_repeat\n\ndoc.sing(seq, uta, track)\n\nseq= [('は', do(6,24), 'や', la(5,24), 'く', do(6,24), 'お', la(5,24), 'う', so(5,24), 'ち', mi(5,24), 'に', do(6,36)), BL(12)]\nseq+= [('か', re(5,24), 'え', mi(5,24), 'り', mi(5,24), 'た', re(5,24), 'い', do(5,48)), BL(48)]\n\nseq_harmonica += [BL(192)]\nseq_guitar += [ fa(5, 96), BK(60), do(6,12), mi(6,48), mi(5,48), BK(48), ti(5,48), BK(48), re(6,48), la(4,48), BK(48), so(5,48), BK(48), do(6,48), BK(48), mi(6,48)]\nseq_bass += [fa(3, 96), mi(3,48), la(3,48)]\nseq_drum += drum_repeat\n\nseq_harmonica += [BL(192)]\nseq_guitar += [ re(5,48), BK(48), la(5,48), so(4,48), do(5,96), BK(72), mi(5,24), do(5,48), BK(48), do(6,48)]\nseq_bass += [re(3,48), so(3,48), do(4,96)]\nseq_drum += drum_repeat\n\nseq_harmonica += [do(7,24), la(6,24), so(6,24), mi(6,24), re(6,24), do(6,24), mi(6,48)]\nseq_guitar += [ fa(5,48), do(6,48), mi(5,48), mi(4,48)]\nseq_bass += [fa(3, 96), mi(3,96)]\nseq_drum += drum_repeat\n\nseq_harmonica += [do(6,48), do(6,24), la(5,24), do(6,96)]\nseq_guitar += [re(5,48), so(4,48), do(5,96), BK(96), mi(5,96), BK(96), so(5,96)]\nseq_bass += [so(3, 96), do(4,96)]\nseq_drum += drum_repeat\n\ndoc.sing(seq+[BK(192*2)], Ayaka, track)\ndoc.sing(seq+[BL(192*2)], uta, track)\n\ndoc.playNoteSeq(seq_harmonica, harmonica, track_h)\ndoc.playNoteSeq(seq_guitar, guitar, track_g)\ndoc.playNoteSeq(seq_bass, bass, track_b)\ndoc.playBeatSeq(seq_drum, perc_list, track_p)\n\ndoc.setTrackVolume(track_h, 0.5)\ndoc.setTrackVolume(track_g, 0.5)\ndoc.setTrackVolume(track_b, 0.5)\ndoc.setTrackVolume(track_p, 0.5)\n\ndoc.setTrackPan(track_h, 0.2)\ndoc.setTrackPan(track_g, -0.2)\ndoc.setTrackPan(track_b, 0.2)\ndoc.setTrackPan(track_p, -0.2)\n\ndoc.meteor()\ndoc.mixDown('ouchi ni kaeritai.wav')\n```\n"
  },
  {
    "path": "docs/meteor/tiktok.md",
    "content": "<script type=\"text/javascript\" src=\"meteor.js\"></script>\n\n<script type=\"text/javascript\">\n    window.onload = function() {\n        var restiktok = {\n            canvasID : \"canvastiktok\",\n            audioID : \"audiotiktok\",\n            dataPath : \"tiktok.meteor\"\n        };\n        meteortiktok = new Meteor(restiktok);\n    };\n</script>\n\n<style type=\"text/css\">\n    canvas {\n        display: block;\n        width: 100%;\n        height: width*0.5625;\n    }\t\t\n</style>\n\n<div>\n    <canvas id=\"canvastiktok\" width=\"800\" height=\"450\"></canvas>\n</div>\n<div>\n    <audio id='audiotiktok' controls=\"controls\">\n        <source type=\"audio/mpeg\" src=\"tiktok.mp3\"/>\n    </audio>\n</div>\n\n# Tik Tok\n\n## Info\n* Originally sung by: Ke$ha\n* Melody/Lyric by: Ke$ha, Lukasz Gottwald, Benny Blanco\n* CZloid voicebank: [http://utau.wiki/utau:czloid](http://utau.wiki/utau:czloid)\n\n```python\nimport ScoreDraft\nfrom ScoreDraft.Notes import *\n\ndoc=ScoreDraft.MeteorDocument()\ndoc.setTempo(110)\n\nsinger = ScoreDraft.CZloid_UTAU()\nsinger.setLyricConverter(ScoreDraft.VCCVEnglishConverter)\nsinger.setCZMode()\n\nGuitar=ScoreDraft.CleanGuitar()\n\nBassDrum=ScoreDraft.BassDrum()\nSnare=ScoreDraft.Snare()\nClap=ScoreDraft.Clap()\n\nperc_list=[BassDrum,Snare, Clap]\n\ndef dong(duration=48):\n\treturn (0,duration)\n\ndef cha(duration=48):\n\treturn (1,duration)\n\ndef pia(duration=48):\n\treturn (2,duration)\n\ntrack=doc.newBuf()\ntrack_g=doc.newBuf()\ntrack_p=doc.newBuf()\n\ndef Chord(elems, duration, delay=0):\n\tret=[]\n\tfor elem in elems:\n\t\tret+=[elem[0](elem[1], duration)]\n\t\tduration-=delay\n\t\tret+=[BK(duration)]\n\tret+=[BL(duration)]\n\treturn ret\n\ndef FaLaDo(duration):\n\treturn Chord([(fa,4), (la,4), (do,5), (fa,5) ], duration)\n\ndef SoTiRe(duration):\n\treturn Chord([(so,4), (ti,4), (re,5), (so,5) ], duration)\n\ndef LaDoMi(duration):\n\treturn Chord([(la,4), (do,5), (mi,5), (la,5) ], duration)\n\ndef ReFaLaDo(duration):\n\treturn Chord([(re,4), (fa,4), (la,4), (do,5)], duration)\n\nFreqsC=Freqs[:]\nFreqsF=[f*Freqs[5] for f in Freqs]\nFreqs[:]=FreqsF\n\nseq_g = FaLaDo(36)+FaLaDo(36)+FaLaDo(24)+[BL(72)]+FaLaDo(24)\nseq =[BL(192)]\n\nseq_g += SoTiRe(36)+SoTiRe(36)+LaDoMi(48)+LaDoMi(36)+LaDoMi(36)\nseq +=[BL(192)]\n\nseq_g += FaLaDo(36)+FaLaDo(36)+FaLaDo(24)+[BL(72)]+FaLaDo(24)\nseq +=[BL(192)]\n\nseq_g += SoTiRe(36)+SoTiRe(36)+LaDoMi(48)+LaDoMi(36)+LaDoMi(36)\nseq +=[BL(192)]\n\nline = ('wA', la(4,24)+do(5,0),'kup', do(5,24), 'in', la(4,24), 'dhx', la(4,24))\nline +=('m0r', mi(4,24)+fa(4,0), 'n1ng', fa(4,24)+la(4,0), 'fE', fa(4,24)+mi(4,0), 'l1ng', mi(4,24)+re(4,0))\nseq_g += FaLaDo(36)+FaLaDo(36)+FaLaDo(24)+[BL(72)]+FaLaDo(24)\n\nline +=('lIk', fa(4,36)+so(4,0), 'pE', so(4,36), 'did', la(4,36)+so(4,0))\nseq += [ line, BL(4) ]\nline =('p6t', so(4,16)+mi(4,0), 'mI', mi(4,16),re(4,0), 'gla', so(4,24), 'ses', mi(4,24))\nseq_g += SoTiRe(36)+SoTiRe(36)+LaDoMi(48)+LaDoMi(36)+LaDoMi(36)\n\nline +=('an', fa(4,24)+do(5,0), 'Im', la(4,24)+mi(4,0), '8', fa(4,24)+mi(4,0), 'dhx', fa(4,24)+mi(4,0), 'd0r', fa(4,24)+mi(4,0))\nline +=('Im', fa(4,24)+do(5,0), 'g0r', la(4,24)+fa(4,0), 'na', mi(4,24)+do(4,0))\nseq_g += FaLaDo(36)+FaLaDo(36)+FaLaDo(24)+[BL(72)]+FaLaDo(24)\n\nline +=('hit', ti(4,36)+so(4,0), 'dhi', fa(4,36)+re(4,0), 'si', so(4,24), 'ti', mi(4,24)+do(4,0))\nseq += [line]\nline = ('bE',la(4,24)+do(5,0),'f0r',do(5,24), 'I', do(4,24)+mi(4,0))\nseq_g += SoTiRe(36)+SoTiRe(36)+LaDoMi(48)+LaDoMi(36)+LaDoMi(36)\n\nline += ('lEv', fa(4,36)+do(5,0))\nseq += [line, BL(12)]\nline = ('brush', la(4,24)+do(5,0), 'mI', do(5,24), 'tEth', la(4,36)+fa(4,0))\nseq += [line, BL(12)]\nline = ('with', fa(4,24)+mi(4,0), 'x', mi(4,24),do(4,0))\nseq_g += FaLaDo(36)+FaLaDo(36)+FaLaDo(24)+[BL(72)]+FaLaDo(24)\n\nline += ('ba', re(4,24)+so(4,0), 't9l', so(4,24), 'xv', so(4,24), 'j@k',la(4,36)+mi(4,0))\nseq += [line, BL(12)]\nline = ('k0rz', so(4,24)+mi(4,0), 'wen', mi(4,24), 'I', mi(4,24))\nseq_g += SoTiRe(36)+SoTiRe(36)+LaDoMi(48)+LaDoMi(36)+LaDoMi(36)\n\nline += ('lEv', fa(4,36)+do(5,0))\nseq += [line, BL(12)]\nline = ('f0r', la(4,24), 'thx', la(4,24), 'nIt', la(4,24)+do(4,0), 'I', do(4,24)+la(4,0), 'ent', la(4,36)+do(4,0))\nseq += [line, BL(12)]\nseq_g += FaLaDo(36)+FaLaDo(36)+FaLaDo(24)+[BL(72)]+FaLaDo(24)\n\nline = ('ku', la(4,24)+do(4,0), 'm1ng', mi(4,48)+do(4,0), 'b@k', la(4,36)+do(4,0))\nseq_g+=[BL(192)]\nseq += [line, BL(12)]\nline = ('Im', do(4,24)+la(4,0), 't9l', mi(4,24)+do(4,0), 'k1ng', mi(4,24)+do(4,0))\n\np_skip=ScoreDraft.TellDuration(seq_g)\nperc_loop=[dong(48), pia(24), dong(48), BL(24), pia(48)]\n\nline +=('pe',fa(4,12), 'di', fa(4,12), 'ky3r', fa(4,24)+do(5,0))\nline +=('an',la(4,24)+fa(4,0), '8r', fa(4,24)+do(4,0), 'tOs', fa(4,48)+do(4,0), 'tOs', fa(4,36)+do(4,0))\nseq += [line,BL(12)]\nseq_g += FaLaDo(36)+FaLaDo(36)+FaLaDo(24)+[BL(72)]+FaLaDo(24)\nseq_p =[BL(p_skip)]+perc_loop\n\nline =('trI',fa(4,12), 'y1ng', fa(4,12), 'an', fa(4,24)+do(5,0))\nline +=('9l',la(4,24)+fa(4,0), '8r', fa(4,24)+do(4,0), 'klOth', fa(4,48)+do(4,0), 'klOth', fa(4,36)+do(4,0))\nseq += [line]\nseq_g += SoTiRe(36)+SoTiRe(36)+LaDoMi(48)+LaDoMi(36)+LaDoMi(36)\nseq_p +=perc_loop\n\nline =('bQs',fa(4,12), 'blO', fa(4,24), '1ng', fa(4,24)+do(5,0))\nline +=('up',la(4,24)+fa(4,0), '8r', fa(4,24)+do(4,0), 'f9ns', fa(4,48)+do(4,0), 'f9ns', fa(4,48)+do(4,0))\nseq += [line, BL(120)]\nseq_g += FaLaDo(36)+FaLaDo(36)+FaLaDo(24)+[BL(72)]+FaLaDo(24)\nseq_p +=perc_loop\n\nline = \t('drap',la(4,24)+do(4,0), 'ta',la(4,24)+do(4,0), 'p1ng', mi(4,24)+do(4,0))\nseq_g += SoTiRe(36)+SoTiRe(36)+LaDoMi(48)+LaDoMi(36)+LaDoMi(36)\nseq_p +=perc_loop\n\nline += ('plA',fa(4,12), 'y1ng', fa(4,12), '8r', fa(4,24)+do(5,0))\nline += ('fA', la(4,12)+so(4,0), 'vx', so(4,12)+fa(4,0), 'rit', fa(4,24)+do(4,0), 'sE', fa(4,48)+do(4,0), 'dEs', fa(4,36)+do(4,0))\nseq += [line, BL(12)]\nseq_g += FaLaDo(36)+FaLaDo(36)+FaLaDo(24)+[BL(72)]+FaLaDo(24)\nseq_p +=perc_loop\n\nline =('p6',fa(4,12), 'l1ng', fa(4,12), 'up', fa(4,24)+do(5,0))\nline +=('t6',la(4,24)+fa(4,0), 'dhx', fa(4,24)+do(4,0), 'par', fa(4,48)+do(4,0), 'tis', fa(4,36)+do(4,0))\nseq += [line, BL(12)]\nseq_g += SoTiRe(36)+SoTiRe(36)+LaDoMi(48)+LaDoMi(36)+LaDoMi(36)\nseq_p +=perc_loop\n\nline =('trIng',fa(4,12),'t6', fa(4,12), 'get', fa(4,24)+do(5,0))\nline +=('li',la(4,12)+so(4,0), 't9l', so(4,12)+fa(4,0), 'bit', fa(4,24)+do(4,0), 'tip', fa(4,48)+do(4,0))\nseq += [line, BL(48)]\nseq_g += ReFaLaDo(36)+ReFaLaDo(36)+ReFaLaDo(24)+[BL(72)]+ReFaLaDo(24)\nseq_p +=perc_loop\n\nseq += [('sE', fa(4,48)+do(4,0)), BL(96)]\nline = ('dant', do(5,24), re(5,24))\nseq_g +=[BL(48)]+ SoTiRe(48)+ SoTiRe(48)+ SoTiRe(48)\nseq_p +=[BL(144), cha(24), cha(24)]\n\nperc_loop=[dong(),cha(), dong(), cha()]\n\nline += ('stap', do(5,48), 'mAk', do(5,24), 'it', do(5,24), 'pap', do(5,36))\nseq += [line, BL(12)]\nline = ('dE', do(5,24), 'jA', do(5,24))\nseq_g += FaLaDo(36)+FaLaDo(36)+FaLaDo(24)+[BL(72)]+FaLaDo(12)+FaLaDo(12)\nseq_p +=perc_loop\n\nline +=('blO', do(5,12), re(5,12), 'mI', do(5,24), 'spE', do(5,24), 'k3s', do(5,24), 'up', do(5,36))\nseq += [line, BL(12)]\nline = ('t6', do(5,24), re(5,24))\nseq_g += SoTiRe(36)+SoTiRe(36)+LaDoMi(48)+LaDoMi(24)+LaDoMi(48)\nseq_p +=perc_loop\n\nline += ('nIt', do(5,48), 'Im', do(5,24), 'a', do(5,24), 'fIt', do(5,36))\nseq += [line, BL(12)]\nline = ('til', do(5,24), 'wE', do(5,24))\nseq_g += FaLaDo(36)+FaLaDo(36)+FaLaDo(24)+[BL(72)]+FaLaDo(12)+FaLaDo(12)\nseq_p +=perc_loop\n\nline +=('sE', do(5,12), re(5,12), 'dhx', do(5,24), 'sun', ti(4,24), la(4,24), 'lIt', la(4,36))\nseq += [line, BL(12)]\nline = ('tik', do(5,24), re(5,24))\nseq_g += SoTiRe(36)+SoTiRe(36)+LaDoMi(48)+LaDoMi(24)+LaDoMi(48)\nseq_p +=perc_loop\n\nline += ('tak', do(5,48), 'an', do(5,24), 'dhx', do(5,24), 'klak', do(5,36))\nseq += [line, BL(12)]\nline = ('bu', do(5,24), 'dhx', do(5,24))\nseq_g += FaLaDo(36)+FaLaDo(36)+FaLaDo(24)+[BL(72)]+FaLaDo(12)+FaLaDo(12)\nseq_p +=perc_loop\n\nline += ('par', do(5,24), 'ti', do(5,24), 'dant', do(5,48), 'stap', do(5,24), la(4,24), 'nO', la(4,48))\nseq_g += SoTiRe(36)+SoTiRe(36)+LaDoMi(48)+LaDoMi(24)+LaDoMi(48)\nseq_p +=perc_loop\n\nline += ('O', la(4,36), 'O', la(4,36), 'O', la(4,24), 'O', mi(5,48))\nseq += [line, BL(48)]\nseq_g += ReFaLaDo(36)+ReFaLaDo(36)+ReFaLaDo(24)+[BL(72)]+ReFaLaDo(24)\nseq_p +=perc_loop\n\nline = ('O', la(4,36), 'O', la(4,36), 'O', la(4,24), 'O', mi(5,36))\nseq += [line, BL(12)]\nline = ('dant', do(5,24), re(5,24))\nseq_g +=LaDoMi(36)+LaDoMi(36)+SoTiRe(48)+SoTiRe(36)+SoTiRe(36)\nseq_p +=perc_loop\n\nline += ('stap', do(5,48), 'mAk', do(5,24), 'it', do(5,24), 'pap', do(5,36))\nseq += [line, BL(12)]\nline = ('dE', do(5,24), 'jA', do(5,24))\nseq_g += FaLaDo(36)+FaLaDo(36)+FaLaDo(24)+[BL(72)]+FaLaDo(12)+FaLaDo(12)\nseq_p +=perc_loop\n\nline +=('blO', do(5,12), re(5,12), 'mI', do(5,24), 'spE', do(5,24), 'k3s', do(5,24), 'up', do(5,36))\nseq += [line, BL(12)]\nline = ('t6', do(5,24), re(5,24))\nseq_g += SoTiRe(36)+SoTiRe(36)+LaDoMi(48)+LaDoMi(24)+LaDoMi(48)\nseq_p +=perc_loop\n\nline += ('nIt', do(5,48), 'Im', do(5,24), 'a', do(5,24), 'fIt', do(5,36))\nseq += [line, BL(12)]\nline = ('til', do(5,24), 'wE', do(5,24))\nseq_g += FaLaDo(36)+FaLaDo(36)+FaLaDo(24)+[BL(72)]+FaLaDo(12)+FaLaDo(12)\nseq_p +=perc_loop\n\nline +=('sE', do(5,12), re(5,12), 'dhx', do(5,24), 'sun', ti(4,24), la(4,24), 'lIt', la(4,36))\nseq += [line, BL(12)]\nline = ('tik', do(5,24), re(5,24))\nseq_g += SoTiRe(36)+SoTiRe(36)+LaDoMi(48)+LaDoMi(24)+LaDoMi(48)\nseq_p +=perc_loop\n\nline += ('tak', do(5,48), 'an', do(5,24), 'dhx', do(5,24), 'klak', do(5,36))\nseq += [line, BL(12)]\nline = ('bu', do(5,24), 'dhx', do(5,24))\nseq_g += FaLaDo(36)+FaLaDo(36)+FaLaDo(24)+[BL(72)]+FaLaDo(12)+FaLaDo(12)\nseq_p +=perc_loop\n\nline += ('par', do(5,24), 'ti', do(5,24), 'dant', do(5,48), 'stap', do(5,24), la(4,24), 'nO', la(4,48))\nseq_g += SoTiRe(36)+SoTiRe(36)+LaDoMi(48)+LaDoMi(24)+LaDoMi(48)\nseq_p +=perc_loop\n\nline += ('O', la(4,36), 'O', la(4,36), 'O', la(4,24), 'O', mi(5,48))\nseq += [line, BL(48)]\nseq_g += ReFaLaDo(36)+ReFaLaDo(36)+ReFaLaDo(24)+[BL(72)]+ReFaLaDo(24)\nseq_p +=perc_loop\n\nline = ('O', la(4,36), 'O', la(4,36), 'O', la(4,24), 'O', mi(5,24))\nline += ('ent', so(4,24)+ti(4,0), 'gat', re(4,24)+so(4,0), 'a', so(4,24)+re(4,0))\nseq_g +=LaDoMi(36)+LaDoMi(36)+SoTiRe(48)+SoTiRe(36)+SoTiRe(36)\nseq_p +=perc_loop\n\nperc_loop=[dong(), dong(),dong(), dong()]\n\nline +=('ke3r',fa(4,36)+la(4,0)) \nseq += [line, BL(12)]\nline = ('in', la(4,24), 'dhx', la(4,24), 'w0rld',la(4,36)+fa(4,0))\nseq += [line, BL(12)]\nline =('but', fa(4,24)+do(4,0), 'gat', fa(4,24)+do(4,0))\nseq_g += FaLaDo(36)+FaLaDo(36)+FaLaDo(24)+[BL(72)]+FaLaDo(24)\nseq_p +=perc_loop\n\nline +=('plen',re(4,24)+so(4,0), 'ti', so(4,24), 'xv', so(4,24), 'bEr', ti(4,36)+re(4,0))\nseq += [line,BL(12)]\nline = ('ent', la(4,24)+do(5,0), 'gat', mi(4,24)+la(4,0), 'nO', mi(4,24))\nseq_g += SoTiRe(36)+SoTiRe(36)+LaDoMi(48)+LaDoMi(36)+LaDoMi(36)\nseq_p +=perc_loop\n\nline += ('ma', la(4,24), 'ni', la(4,24), 'in', fa(4,24)+do(4,0), 'mI', fa(4,24)+do(4,0), 'pa', la(4,24), 'ket', la(4,24), 'but', la(4,24)+fa(4,0), 'Im', fa(4,24)+do(4,0))\nseq_g += FaLaDo(36)+FaLaDo(36)+FaLaDo(24)+[BL(72)]+FaLaDo(24)\nseq_p +=perc_loop\n\nline +=('9l',ti(3,24)+re(4,0), 're', re(4,24)+so(4,0), 'di', so(4,24)+re(4,0), 'hEr', ti(4,36)+re(4,0))\nseq += [line,BL(12)]\nline = ('@nd', la(4,24)+do(5,0), 'n8', mi(4,24)+la(4,0), 'dhx', do(4,24)+mi(4,0))\nseq_g += SoTiRe(36)+SoTiRe(36)+LaDoMi(48)+LaDoMi(36)+LaDoMi(36)\nseq_p +=perc_loop\n\nline +=('dyO',la(4,24)+do(5,0), 'sa', do(5,24), 'lIn',fa(4,24)+la(4,0), '1ng', la(4,24), 'up', fa(4,36)+la(4,0))\nseq += [line,BL(12)]\nline =('k0rz',la(4,24)+fa(4,0), 'dhA', fa(4,24)+mi(4,0))\nseq_g += FaLaDo(36)+FaLaDo(36)+FaLaDo(24)+[BL(72)]+FaLaDo(24)\nseq_p +=perc_loop\n\nline+=('hEr', so(4,24)+ti(4,0), 'wE', re(4,24)+so(4,0), 'gats', so(4,48)+ti(4,0), 'w@', la(4,24), 'g3r', la(4,24)+mi(4,0))\nline+=('but',la(4,24)+fa(4,0), 'wE', fa(4,24)+mi(4,0))\nseq_g += SoTiRe(36)+SoTiRe(36)+LaDoMi(48)+LaDoMi(36)+LaDoMi(36)\nseq_p +=perc_loop\n\nline+=('ki',fa(4,24)+re(4,0), 'kAm', fa(4,24)+la(4,0), 't6', la(4,24), 'dhx', la(4,24), 'k3rb', la(4,24)+fa(4,0))\nline+=('un',fa(4,24)+re(4,0), 'les', la(4,24)+fa(4,0), 'dhA', fa(4,24)+re(4,0))\nseq_g += ReFaLaDo(36)+ReFaLaDo(36)+ReFaLaDo(24)+[BL(72)]+ReFaLaDo(24)\nseq_p +=perc_loop\n\nline+=('l6k', fa(4,24)+la(4,0), 'lIk', fa(4,24)+la(4,0), 'mIk', fa(4,24)+la(4,0), 'j@', la(4,24)+fa(4,0), 'g3r', fa(4,24)+re(4,0))\nseq += [line]\nline=('Im', do(4,24)+mi(4,0), 't9l', la(4,12), 'k1ng', la(4,12), 'b8t', mi(4,24)+la(4,0))\nseq_g += [BL(192)]\nseq_p += [BL(192)]\n\nperc_loop=[dong(48), pia(24), dong(48), BL(24), pia(48)]\n\nline +=('ev',fa(4,12), 'ri', fa(4,12), 'ba', fa(4,12)+la(4,0), 'di', la(4,12)+do(5,0))\nline +=('ge',la(4,24)+fa(4,0), 't1ng', fa(4,24)+do(4,0), 'krunk', fa(4,48)+do(4,0), 'krunk', fa(4,36)+do(4,0))\nseq += [line,BL(12)]\nseq_g += FaLaDo(36)+FaLaDo(36)+FaLaDo(24)+[BL(72)]+FaLaDo(24)\nseq_p += perc_loop\n\nline =('bQs',fa(4,24), 'trI', fa(4,12)+do(5,0), 't6', do(5,12))\nline +=('tuch',la(4,24)+fa(4,0), 'mI', fa(4,24)+do(4,0), 'junk', fa(4,48)+do(4,0), 'junk', fa(4,24)+do(4,0))\nseq += [line]\nline =('ga', fa(4,12)+la(4,0), 'na', la(4,12)+do(4,0))\nseq_g += SoTiRe(36)+SoTiRe(36)+LaDoMi(48)+LaDoMi(36)+LaDoMi(36)\nseq_p +=perc_loop\n\nline +=('sm@k',la(4,12), 'him', la(4,12)+fa(4,0), 'if', fa(4,12), 'hi', la(4,12)+fa(4,0), 'ge', fa(4,12)+la(4,0), 't1ng', la(4,12) )\nline +=('to', la(4,24)+fa(4,0), 'drunk', fa(4,48)+do(4,0), 'drunk', fa(4,48)+do(4,0))\nseq += [line, BL(120)]\nseq_g += FaLaDo(36)+FaLaDo(36)+FaLaDo(24)+[BL(72)]+FaLaDo(24)\nseq_p +=perc_loop\n\nline = \t('n8',la(4,24)+do(4,0), 'n8',la(4,24)+do(4,0), 'wE', la(4,24)+do(4,0))\nseq_g += SoTiRe(36)+SoTiRe(36)+LaDoMi(48)+LaDoMi(36)+LaDoMi(36)\nseq_p +=perc_loop\n\nline +=('gO',fa(4,12), 'in', fa(4,12), 'til', fa(4,12)+la(4,0), 'dhA', la(4,12)+do(5,0))\nline +=('kik',la(4,24)+fa(4,0), 'us', fa(4,24)+do(4,0), '8t', fa(4,48)+do(4,0), '8t', fa(4,24)+do(4,0))\nseq += [line]\nline =('0r', fa(4,12)+la(4,0), 'dhx', la(4,12)+do(4,0))\nseq_g += FaLaDo(36)+FaLaDo(36)+FaLaDo(24)+[BL(72)]+FaLaDo(24)\nseq_p += perc_loop\n\nline +=('px',fa(4,24), 'lEs', fa(4,24)+do(5,0))\nline +=('shut',la(4,24)+fa(4,0), 'us', fa(4,24)+do(4,0), 'd8n', fa(4,48)+do(4,0), 'd8n', fa(4,36)+do(4,0))\nseq += [line, BL(12)]\nseq_g += SoTiRe(36)+SoTiRe(36)+LaDoMi(48)+LaDoMi(36)+LaDoMi(36)\nseq_p +=perc_loop\n\nline =('px',fa(4,24), 'lEs', fa(4,24)+do(5,0))\nline +=('shut',la(4,24)+fa(4,0), 'us', fa(4,24)+do(4,0), 'd8n', fa(4,48)+do(4,0), 'd8n', fa(4,36)+do(4,0))\nseq += [line, BL(12)]\nseq_g += [BL(192)]\nseq_p +=[dong(12), dong(12),dong(24), BL(96), pia(48)]\n\nline =('px',fa(4,24), 'px', fa(4,24))\nline +=('shut',la(4,24)+fa(4,0), 'us', fa(4,24)+do(4,0))\nseq += [line, BL(48)]\nline =('dant', do(5,24), re(5,24))\nseq_g += [BL(192)]\nseq_p +=[dong(12), dong(12),dong(24), BL(96), pia(48)]\n\nperc_loop=[dong(),cha(), dong(), cha()]\n\nline += ('stap', do(5,48), 'mAk', do(5,24), 'it', do(5,24), 'pap', do(5,36))\nseq += [line, BL(12)]\nline = ('dE', do(5,24), 'jA', do(5,24))\nseq_g += FaLaDo(36)+FaLaDo(36)+FaLaDo(24)+[BL(72)]+FaLaDo(12)+FaLaDo(12)\nseq_p +=perc_loop\n\nline +=('blO', do(5,12), re(5,12), 'mI', do(5,24), 'spE', do(5,24), 'k3s', do(5,24), 'up', do(5,36))\nseq += [line, BL(12)]\nline = ('t6', do(5,24), re(5,24))\nseq_g += SoTiRe(36)+SoTiRe(36)+LaDoMi(48)+LaDoMi(24)+LaDoMi(48)\nseq_p +=perc_loop\n\nline += ('nIt', do(5,48), 'Im', do(5,24), 'a', do(5,24), 'fIt', do(5,36))\nseq += [line, BL(12)]\nline = ('til', do(5,24), 'wE', do(5,24))\nseq_g += FaLaDo(36)+FaLaDo(36)+FaLaDo(24)+[BL(72)]+FaLaDo(12)+FaLaDo(12)\nseq_p +=perc_loop\n\nline +=('sE', do(5,12), re(5,12), 'dhx', do(5,24), 'sun', ti(4,24), la(4,24), 'lIt', la(4,36))\nseq += [line, BL(12)]\nline = ('tik', do(5,24), re(5,24))\nseq_g += SoTiRe(36)+SoTiRe(36)+LaDoMi(48)+LaDoMi(24)+LaDoMi(48)\nseq_p +=perc_loop\n\nline += ('tak', do(5,48), 'an', do(5,24), 'dhx', do(5,24), 'klak', do(5,36))\nseq += [line, BL(12)]\nline = ('bu', do(5,24), 'dhx', do(5,24))\nseq_g += FaLaDo(36)+FaLaDo(36)+FaLaDo(24)+[BL(72)]+FaLaDo(12)+FaLaDo(12)\nseq_p +=perc_loop\n\nline += ('par', do(5,24), 'ti', do(5,24), 'dant', do(5,48), 'stap', do(5,24), la(4,24), 'nO', la(4,48))\nseq_g += SoTiRe(36)+SoTiRe(36)+LaDoMi(48)+LaDoMi(24)+LaDoMi(48)\nseq_p +=perc_loop\n\nline += ('O', la(4,36), 'O', la(4,36), 'O', la(4,24), 'O', mi(5,48))\nseq += [line, BL(48)]\nseq_g += ReFaLaDo(36)+ReFaLaDo(36)+ReFaLaDo(24)+[BL(72)]+ReFaLaDo(24)\nseq_p +=perc_loop\n\nline = ('O', la(4,36), 'O', la(4,36), 'O', la(4,24), 'O', mi(5,36))\nseq += [line, BL(12)]\nline = ('dant', do(5,24), re(5,24))\nseq_g +=LaDoMi(36)+LaDoMi(36)+SoTiRe(48)+SoTiRe(36)+SoTiRe(36)\nseq_p +=perc_loop\n\nline += ('stap', do(5,48), 'mAk', do(5,24), 'it', do(5,24), 'pap', do(5,36))\nseq += [line, BL(12)]\nline = ('dE', do(5,24), 'jA', do(5,24))\nseq_g += FaLaDo(36)+FaLaDo(36)+FaLaDo(24)+[BL(72)]+FaLaDo(12)+FaLaDo(12)\nseq_p +=perc_loop\n\nline +=('blO', do(5,12), re(5,12), 'mI', do(5,24), 'spE', do(5,24), 'k3s', do(5,24), 'up', do(5,36))\nseq += [line, BL(12)]\nline = ('t6', do(5,24), re(5,24))\nseq_g += SoTiRe(36)+SoTiRe(36)+LaDoMi(48)+LaDoMi(24)+LaDoMi(48)\nseq_p +=perc_loop\n\nline += ('nIt', do(5,48), 'Im', do(5,24), 'a', do(5,24), 'fIt', do(5,36))\nseq += [line, BL(12)]\nline = ('til', do(5,24), 'wE', do(5,24))\nseq_g += FaLaDo(36)+FaLaDo(36)+FaLaDo(24)+[BL(72)]+FaLaDo(12)+FaLaDo(12)\nseq_p +=perc_loop\n\nline +=('sE', do(5,12), re(5,12), 'dhx', do(5,24), 'sun', ti(4,24), la(4,24), 'lIt', la(4,36))\nseq += [line, BL(12)]\nline = ('tik', do(5,24), re(5,24))\nseq_g += SoTiRe(36)+SoTiRe(36)+LaDoMi(48)+LaDoMi(24)+LaDoMi(48)\nseq_p +=perc_loop\n\nline += ('tak', do(5,48), 'an', do(5,24), 'dhx', do(5,24), 'klak', do(5,36))\nseq += [line, BL(12)]\nline = ('bu', do(5,24), 'dhx', do(5,24))\nseq_g += FaLaDo(36)+FaLaDo(36)+FaLaDo(24)+[BL(72)]+FaLaDo(12)+FaLaDo(12)\nseq_p +=perc_loop\n\nline += ('par', do(5,24), 'ti', do(5,24), 'dant', do(5,48), 'stap', do(5,24), la(4,24), 'nO', la(4,48))\nseq_g += SoTiRe(36)+SoTiRe(36)+LaDoMi(48)+LaDoMi(24)+LaDoMi(48)\nseq_p +=perc_loop\n\nline += ('O', la(4,36), 'O', la(4,36), 'O', la(4,24), 'O', mi(5,48))\nseq += [line, BL(48)]\nseq_g += ReFaLaDo(36)+ReFaLaDo(36)+ReFaLaDo(24)+[BL(72)]+ReFaLaDo(24)\nseq_p +=perc_loop\n\nline = ('O', la(4,36), 'O', la(4,36), 'O', la(4,24), 'O', mi(5,48))\nseq += [line, BL(48)]\nseq_g +=LaDoMi(36)+LaDoMi(36)+SoTiRe(48)+SoTiRe(36)+SoTiRe(36)\nseq_p +=[dong(),cha(), cha(12), cha(12),cha(12),cha(12), cha()]\n\ndoc.sing(seq, singer,track)\ndoc.playNoteSeq(seq_g, Guitar, track_g)\ndoc.playBeatSeq(seq_p, perc_list, track_p)\n\ndoc.setTrackVolume(track_g, 0.5)\n\ndoc.meteor()\ndoc.mixDown('tiktok.wav')\n```\n\n\n\n\n\n"
  },
  {
    "path": "python/CMakeLists.txt",
    "content": "cmake_minimum_required (VERSION 3.0)\n\nset(PYTHON\nScoreDraft/__init__.py\nScoreDraft/ScoreDraftCore.py\nScoreDraft/Catalog.py\nScoreDraft/Initializers.py\n\nScoreDraft/Instrument.py\nScoreDraft/Percussion.py\nScoreDraft/Singer.py\nScoreDraft/SimpleInstruments.py\nScoreDraft/KarplusStrong.py\nScoreDraft/BasicSamplers.py\nScoreDraft/SoundFont2.py\nScoreDraft/VoiceSampler.py\nScoreDraft/UTAUUtils.py\nScoreDraft/UtauDraft.py\n\nScoreDraft/RapChinese.py\nScoreDraft/CVVCChineseConverter.py\nScoreDraft/XiaYYConverter.py\nScoreDraft/JPVCVConverter.py\nScoreDraft/TsuroVCVConverter.py\nScoreDraft/TTEnglishConverter.py\nScoreDraft/VCCVEnglishConverter.py\nScoreDraft/TTLyricSet.data\nScoreDraft/VCCVLyricSet.data\n\nScoreDraft/Document.py\nScoreDraft/Notes.py\nScoreDraft/MIDIWriter.py\nScoreDraft/PCMPlayer.py\nScoreDraft/Meteor.py\n\nScoreDraft/MusicXMLDocument.py\nScoreDraft/YAMLDocument.py\n)\n\nset(PYTHON_MX\nScoreDraft/musicxml/__init__.py\nScoreDraft/musicxml/musicxml.py\nScoreDraft/musicxml/xlink.py\nScoreDraft/musicxml/xml.py\n)\n\ninstall(FILES ${PYTHON} DESTINATION ScoreDraft)\ninstall(FILES ${PYTHON_MX} DESTINATION ScoreDraft/musicxml)\ninstall(FILES setup.py README.md DESTINATION .)\n\n"
  },
  {
    "path": "python/README.md",
    "content": "ScoreDraft\n================\n\n[ScoreDraft](https://github.com/fynv/ScoreDraft) is a music/singing \nsynthesizer that provides a Python based score authoring interface. \n\n\n\n"
  },
  {
    "path": "python/ScoreDraft/BasicSamplers.py",
    "content": "import os\nfrom cffi import FFI\n\nffi = FFI()\nffi.cdef(\"\"\"\nvoid* SampleCreate(unsigned origin_sample_rate, unsigned chn, void* ptr_f32_buf, float max_v);\nvoid* InstrumentSampleCreate(unsigned origin_sample_rate, unsigned chn, void* ptr_f32_buf, float max_v, float origin_freq);\nvoid SampleDestroy(void *ptr);\nvoid PercussionGenerate(void* ptr_wavbuf, void* ptr_sample, float fduration);\nvoid InstrumentSingleGenerate(void* ptr_wavbuf, void* ptr_sample, float freq, float fduration);\nvoid InstrumentMultiGenerate(void* ptr_wavbuf, void* ptr_sample_lst, float freq, float fduration);\n\"\"\")\n\nif os.name == 'nt':\n    fn_shared_lib = 'BasicSamplers.dll'\nelif os.name == \"posix\":\n    fn_shared_lib = 'libBasicSamplers.so'\n\npath_shared_lib = os.path.dirname(__file__)+\"/\"+fn_shared_lib\nNative = ffi.dlopen(path_shared_lib)\n\nfrom .ScoreDraftCore import F32Buf\n\nclass Sample:\n    def __init__(self, origin_sample_rate, channel_num, f32buf, max_value = -1.0):\n        self.m_buf = f32buf\n        self.m_cptr = Native.SampleCreate(origin_sample_rate, channel_num, f32buf.m_cptr, max_value)\n        \n    def __del__(self):\n        Native.SampleDestroy(self.m_cptr)\n        \nclass InstrumentSample(Sample):\n    def __init__(self, origin_sample_rate, channel_num, f32buf, max_value = -1.0, origin_freq = -1.0):\n        self.m_buf = f32buf\n        self.m_cptr = Native.InstrumentSampleCreate(origin_sample_rate, channel_num, f32buf.m_cptr, max_value, origin_freq)\n        \nimport wave\n\ndef loadSample(filename, is_instrument):\n    wavS16=bytes()\n    nChn = 1\n    nFrames = 0\n    framerate = 44100\n    origin_freq = -1.0\n    with wave.open(filename, mode='rb') as wavFile:\n        nFrames =wavFile.getnframes() \n        nChn = wavFile.getnchannels()\n        wavS16=wavFile.readframes(nFrames)\n        framerate = wavFile.getframerate()\n        \n    f32buf = F32Buf.from_s16(wavS16)\n        \n    if is_instrument:\n        freq_fn = filename[0:len(filename)-4]+\".freq\"\n        if os.path.isfile(freq_fn):\n            with open(freq_fn, \"r\") as f:\n                origin_freq= float(f.readline())\n        return InstrumentSample(framerate, nChn, f32buf, origin_freq = origin_freq)\n    \n    else:\n        return Sample(framerate, nChn, f32buf)\n        \n\nSamples_Percussion = {}\n\ndef GetSample_Percussion(fn):\n    if not (fn in Samples_Percussion):\n        Samples_Percussion[fn] = loadSample(fn, False)\n    return Samples_Percussion[fn]\n    \n\nSamples_Single = {}\n\ndef GetSample_Single(fn):\n    if not (fn in Samples_Single):\n        Samples_Single[fn] = loadSample(fn, True)\n    return Samples_Single[fn]\n\nSamples_Multi = {}\n\ndef GetSamples_Multi(path):\n    if not (path in Samples_Multi):\n        samples = []\n        if os.path.isdir(path):\n            for item in os.listdir(path):\n                fn = path+'/'+item\n                if os.path.isfile(fn) and item.endswith(\".wav\"):\n                    samples+=[loadSample(fn, True)]\n        Samples_Multi[path] = samples\n    return Samples_Multi[path]\n    \nfrom .ScoreDraftCore import ObjArray, WavBuffer\nfrom .Instrument import Instrument\nfrom .Percussion import Percussion\nfrom .Catalog import Catalog\nCatalog['Engines'] += ['InstrumentSampler_Single - Instrument']\nCatalog['Engines'] += ['InstrumentSampler_Multi - Instrument']\nCatalog['Engines'] += ['PercussionSampler - Percussion']\n\n\nclass EnginePercussionSampler:\n    def __init__(self, sample):\n        self.sample=sample      \n    def tune(self, cmd):\n        pass\n    def generateWave(self, fduration, sampleRate):\n        wav = F32Buf(0)\n        wav_buf = WavBuffer(sampleRate, 1, wav)       \n        Native.PercussionGenerate(wav_buf.m_cptr, self.sample.m_cptr, fduration)\n        return wav_buf\n\nclass EngineInstrumentSampler_Single:\n    def __init__(self, sample):\n        self.sample=sample      \n    def tune(self, cmd):\n        pass\n    def generateWave(self, freq, fduration, sampleRate):\n        wav = F32Buf(0)\n        wav_buf = WavBuffer(sampleRate, 1, wav)       \n        Native.InstrumentSingleGenerate(wav_buf.m_cptr, self.sample.m_cptr, freq, fduration)\n        return wav_buf\n\nclass EngineInstrumentSampler_Multi:\n    def __init__(self, samples):\n        self.samples = samples  \n        self.sample_lst = ObjArray(self.samples)\n    def tune(self, cmd):\n        pass\n    def generateWave(self, freq, fduration, sampleRate):\n        wav = F32Buf(0)\n        wav_buf = WavBuffer(sampleRate, 1, wav)\n        Native.InstrumentMultiGenerate(wav_buf.m_cptr, self.sample_lst.m_cptr, freq, fduration)        \n        return wav_buf\n\nclass PercussionSampler(Percussion):\n    def __init__(self, wavPath):\n        Percussion.__init__(self)\n        sample = GetSample_Percussion(wavPath)\n        self.engine = EnginePercussionSampler(sample)\n\nclass InstrumentSampler_Single(Instrument):\n    def __init__(self, wavPath):\n        Instrument.__init__(self)\n        sample = GetSample_Single(wavPath)\n        self.engine = EngineInstrumentSampler_Single(sample)\n\nclass InstrumentSampler_Multi(Instrument):\n    def __init__(self, folderPath):\n        Instrument.__init__(self)\n        samples = GetSamples_Multi(folderPath)\n        self.engine = EngineInstrumentSampler_Multi(samples)\n\n\n\n"
  },
  {
    "path": "python/ScoreDraft/CVVCChineseConverter.py",
    "content": "def getCV(CVLyric):\n    vowels= [\"a\",\"e\",\"i\",\"o\",\"u\",\"v\"]\n    min_i=len(CVLyric)\n    for c in vowels:\n        i=CVLyric.find(c)\n        if i>-1 and i<min_i:\n            min_i=i\n\n    consonant= CVLyric[0:min_i]\n    vowel=CVLyric[min_i:len(CVLyric)]\n\n    if CVLyric==\"zhi\" or CVLyric==\"chi\" or CVLyric==\"shi\" or CVLyric==\"ri\":\n        vowel=\"ir\"\n    if CVLyric==\"zi\" or CVLyric==\"ci\" or CVLyric==\"si\":\n        vowel=\"i0\"\n    if CVLyric==\"ju\" or CVLyric==\"qu\" or CVLyric==\"xu\" or CVLyric==\"yu\":\n        vowel=\"v\"\n    if CVLyric==\"ye\":\n        vowel=\"e0\"\n\n    if vowel==\"ia\":\n        vowel=\"a\"\n    if vowel==\"iao\":\n        vowel=\"ao\"\n    if vowel==\"ian\":\n        vowel=\"an\"\n    if vowel==\"iang\":\n        vowel=\"ang\"\n    if vowel==\"ie\":\n        vowel=\"e0\"\n    if vowel==\"iong\":\n        vowel=\"ong\"\n    if vowel==\"iu\":\n        vowel=\"ou\"\n    if vowel==\"ua\":\n        vowel=\"a\"\n    if vowel==\"uai\":\n        vowel=\"ai\"\n    if vowel==\"uan\":\n        vowel=\"an\"\n    if vowel==\"uai\":\n        vowel=\"ai\"\n    if vowel==\"ui\":\n        vowel=\"ei\"\n    if vowel==\"uang\":\n        vowel=\"ang\"\n    if vowel==\"un\":\n        vowel=\"en\"\n    if vowel==\"uo\":\n        vowel=\"o\"\n    if (vowel==\"ue\"):\n        vowel=\"e0\"\n\n    if consonant==\"j\" or consonant==\"q\" or consonant==\"x\":\n        if vowel[0]==\"u\":\n            consonant+=\"w\"\n        else:\n            consonant+=\"y\"\n\n    if consonant==\"y\":\n        if vowel[0]==\"u\":\n            consonant=\"v\"\n        else:\n            consonant=\"y\"\n    return (consonant,vowel)\n\n# v1\ndef CVVCChineseConverter(LyricForEachSyllable): \n    CV = [getCV(lyric) for lyric in  LyricForEachSyllable]\n    ret=[]\n    for i in range(len(LyricForEachSyllable)):\n        lyric=LyricForEachSyllable[i]\n        if i==0:\n            lyric='- '+lyric\n        elif CV[i][0]=='':\n            lyric=CV[i-1][1]+\" \"+lyric\n        if i<len(LyricForEachSyllable)-1:\n            if CV[i+1][0]!='':\n                ret+=[(lyric,0.875, True, CV[i][1]+\" \"+CV[i+1][0], 0.125, False)]\n            else:\n                ret+=[(lyric,1.0, True)]\n        else:\n            ret+=[(lyric,0.875, True, CV[i][1]+\" R\", 0.125, False)]\n    return ret\n"
  },
  {
    "path": "python/ScoreDraft/Catalog.py",
    "content": "import json\n\nCatalog= {\n'Engines' : [],\n'Instruments': [],\n'Percussions': [],\n'Singers': [] \t\n}\n\ndef PrintCatalog():\n\tprint (json.dumps(Catalog, indent=2))\n"
  },
  {
    "path": "python/ScoreDraft/Document.py",
    "content": "from .ScoreDraftCore import TrackBuffer\nfrom .ScoreDraftCore import MixTrackBufferList\nfrom .ScoreDraftCore import WriteTrackBufferToWav\n\nfrom .Instrument import Instrument\nfrom .Percussion import Percussion\nfrom .Singer import Singer\n\nclass Document:\n\t'''\n\tAn utility class to simplify user-side coding.\n\tThe class maintains a list of track-buffers and some shared states (tempo and reference-frequency)\n\t'''\n\tdef __init__ (self):\n\t\tself.bufferList=[]\n\t\tself.tempo=80\n\t\tself.refFreq=261.626\n\n\tdef getBuffer(self, bufferIndex):\n\t\treturn self.bufferList[bufferIndex]\n\n\tdef getTempo(self):\n\t\treturn self.tempo\n\n\tdef setTempo(self,tempo):\n\t\tself.tempo=tempo\n\n\tdef getReferenceFrequency(self):\n\t\treturn self.refFreq\n\n\tdef setReferenceFrequency(self,refFreq):\n\t\tself.refFreq=refFreq\n\n\tdef newBuf(self, chn=-1):\n\t\t'''\n\t\tThe created track-buffer will be added to the track-buffer list of the document\n\t\tThe index of the new track-buffer is returned\n\t\t'''\n\t\tbuf=TrackBuffer(chn)\n\t\tself.bufferList.append(buf)\n\t\treturn len(self.bufferList)-1\n\n\tdef setTrackVolume(self, bufferIndex, volume):\n\t\tself.bufferList[bufferIndex].setVolume(volume)\n\n\tdef setTrackPan(self, bufferIndex, pan):\n\t\tself.bufferList[bufferIndex].setPan(pan)\n\n\tdef playNoteSeq(self, seq, instrument, bufferIndex=-1):\n\t\t'''\n\t\tPlay a note sequence in the context of a document.\n\t\tinstrument -- An instance of Instrument\n\t\tWhen bufferIndex==-1, a new track-buffer will be returned. Otherwise, an existing track-buffer will \n\t\tbe used and result is appended.\n\t\tThe index of the target track-buffer is returned.\n\t\t'''\n\t\tif bufferIndex==-1:\n\t\t\tbufferIndex= self.newBuf()\t\t\n\t\tbuf=self.bufferList[bufferIndex]\n\t\tinstrument.play(buf, seq, self.tempo, self.refFreq)\n\t\treturn bufferIndex\t\n\n\tdef playBeatSeq(self, seq, percList, bufferIndex=-1):\n\t\t'''\n\t\tPlay a beat sequence in the context of a document.\n\t\tWhen bufferIndex==-1, a new track-buffer will be returned. Otherwise, an existing track-buffer will \n\t\tbe used and result is appended.\n\t\tThe index of the target track-buffer is returned.\n\t\t'''\n\t\tif bufferIndex==-1:\n\t\t\tbufferIndex= self.newBuf()\t\t\n\t\tbuf=self.bufferList[bufferIndex]\t\t\t\n\t\tPercussion.play(percList, buf, seq, self.tempo)\n\t\treturn bufferIndex\n\n\tdef sing(self, seq, singer, bufferIndex=-1):\n\t\t'''\n\t\tSing a sequence in the context of a document.\n\t\tWhen bufferIndex==-1, a new track-buffer will be returned. Otherwise, an existing track-buffer will \n\t\tbe used and result is appended.\n\t\tThe index of the target track-buffer is returned.\n\t\t'''\n\t\tif bufferIndex==-1:\n\t\t\tbufferIndex= self.newBuf()\t\t\n\t\tbuf=self.bufferList[bufferIndex]\n\t\tsinger.sing( buf, seq, self.tempo, self.refFreq)\n\t\treturn bufferIndex\n\n\tdef trackToWav(self, bufferIndex, filename):\n\t\tWriteTrackBufferToWav(self.bufferList[bufferIndex], filename)\n\n\tdef mix(self, targetBuf):\n\t\t'''\n\t\tMix the track-buffers in the document to a target buffer.\n\t\ttargetBuf -- An instance of TrackBuffer\n\t\t'''\n\t\tMixTrackBufferList(targetBuf,self.bufferList)\n\n\tdef mixDown(self,filename,chn=-1):\n\t\t'''\n\t\tMix the track-buffers in the document to a temporary buffer and write to a .wav file.\n\t\tfilename -- a string\n\t\t'''\n\t\ttargetBuf=TrackBuffer(chn)\n\t\tself.mix(targetBuf)\n\t\tWriteTrackBufferToWav(targetBuf, filename)\n\n"
  },
  {
    "path": "python/ScoreDraft/Initializers.py",
    "content": "import os\nfrom .Catalog import Catalog\n\nfrom .Instrument import Instrument\nfrom .Percussion import Percussion\nfrom .Singer import Singer\n\nfrom .SimpleInstruments import EnginePureSin\nfrom .SimpleInstruments import EngineSquare\nfrom .SimpleInstruments import EngineTriangle\nfrom .SimpleInstruments import EngineSawtooth\nfrom .SimpleInstruments import EngineNaivePiano\nfrom .SimpleInstruments import EngineBottleBlow\nfrom .SimpleInstruments import PureSin\nfrom .SimpleInstruments import Square\nfrom .SimpleInstruments import Triangle\nfrom .SimpleInstruments import Sawtooth\nfrom .SimpleInstruments import NaivePiano\nfrom .SimpleInstruments import BottleBlow\n\nfrom .KarplusStrong import EngineKarplusStrong\nfrom .KarplusStrong import KarplusStrongInstrument\n\nfrom .BasicSamplers import GetSample_Percussion\nfrom .BasicSamplers import GetSample_Single\nfrom .BasicSamplers import GetSamples_Multi\nfrom .BasicSamplers import EnginePercussionSampler\nfrom .BasicSamplers import EngineInstrumentSampler_Single\nfrom .BasicSamplers import EngineInstrumentSampler_Multi\nfrom .BasicSamplers import PercussionSampler\nfrom .BasicSamplers import InstrumentSampler_Single\nfrom .BasicSamplers import InstrumentSampler_Multi\n\nfrom .SoundFont2 import GetSF2Bank\nfrom .SoundFont2 import ListPresets as ListPresetsSF2\nfrom .SoundFont2 import EngineSoundFont2\nfrom .SoundFont2 import SF2Instrument\n\nfrom .UtauDraft import GetVoiceBank as GetVoiceBankUTAU\nfrom .UtauDraft import Engine as EngineUtauDraft\nfrom .UtauDraft import UtauDraft\n\nfrom .CVVCChineseConverter import CVVCChineseConverter\nfrom .XiaYYConverter import XiaYYConverter\nfrom .JPVCVConverter import JPVCVConverter\nfrom .TsuroVCVConverter import TsuroVCVConverter\nfrom .TTEnglishConverter import TTEnglishConverter\nfrom .VCCVEnglishConverter import VCCVEnglishConverter\n\nRESOURCE_ROOT='.'\n\nPERC_SAMPLE_ROOT=RESOURCE_ROOT+'/PercussionSamples'\nif os.path.isdir(PERC_SAMPLE_ROOT):\n    for item in os.listdir(PERC_SAMPLE_ROOT):\n        file_path = PERC_SAMPLE_ROOT+'/'+item\n        if os.path.isfile(file_path) and item.endswith(\".wav\"):\n            name = item[0:len(item)-4]\n            definition=\"\"\"\ndef \"\"\"+name+\"\"\"():\n    return PercussionSampler('\"\"\"+file_path+\"\"\"')\n\"\"\"\n            exec(definition)\n            Catalog['Percussions'] += [name+' - PercussionSampler']\n\nINSTR_SAMPLE_ROOT=RESOURCE_ROOT+'/InstrumentSamples'\nif os.path.isdir(INSTR_SAMPLE_ROOT):\n    for item in os.listdir(INSTR_SAMPLE_ROOT):\n        inst_path = INSTR_SAMPLE_ROOT+'/'+item\n        if os.path.isfile(inst_path) and item.endswith(\".wav\"):\n            name = item[0:len(item)-4]\n            definition=\"\"\"\ndef \"\"\"+name+\"\"\"():\n    return InstrumentSampler_Single('\"\"\"+inst_path+\"\"\"')\n\"\"\"\n            exec(definition)\n            Catalog['Instruments'] += [name+' - InstrumentSampler_Single']\n        elif os.path.isdir(inst_path):\n            definition=\"\"\"\ndef \"\"\"+item+\"\"\"():\n    return InstrumentSampler_Multi('\"\"\"+inst_path+\"\"\"')\n\"\"\"\n            exec(definition)\n            Catalog['Instruments'] += [item+' - InstrumentSampler_Multi']\n            \nSF2_ROOT=RESOURCE_ROOT+'/SF2'\nif os.path.isdir(SF2_ROOT):\n    for item in os.listdir(SF2_ROOT):\n        sf2_path = SF2_ROOT+'/'+item\n        if os.path.isfile(sf2_path) and item.endswith(\".sf2\"):\n            name = item[0:len(item)-4]\n            definition=\"\"\"\ndef \"\"\"+name+\"\"\"(preset_index):\n    return SF2Instrument('\"\"\"+sf2_path+\"\"\"', preset_index)\n\ndef \"\"\"+name+\"\"\"_List():\n    ListPresetsSF2('\"\"\"+sf2_path+\"\"\"')\n\"\"\"\n            exec(definition)\n            Catalog['Instruments'] += [name+' - SF2Instrument']\n\nUTAU_VB_ROOT=RESOURCE_ROOT+'/UTAUVoice'\nUTAU_VB_SUFFIX='_UTAU'\nif os.path.isdir(UTAU_VB_ROOT):\n    for item in os.listdir(UTAU_VB_ROOT):\n        if os.path.isdir(UTAU_VB_ROOT+'/'+item):\n            definition=\"\"\"\ndef \"\"\"+item+UTAU_VB_SUFFIX+\"\"\"(useCuda=True):\n    return UtauDraft('\"\"\"+UTAU_VB_ROOT+\"\"\"/\"\"\"+item+\"\"\"',useCuda)\n\"\"\"\n            exec(definition)\n            Catalog['Singers'] += [item+UTAU_VB_SUFFIX+' - UtauDraft']\n\n"
  },
  {
    "path": "python/ScoreDraft/Instrument.py",
    "content": "import numbers\n\ndef isNumber(x):\n    return isinstance(x, numbers.Number)\n\ndef GetTempoMap(tMap, beat48):\n    for i in range(1,len(tMap)):\n        if beat48 < tMap[i][0] or i == len(tMap)-1:\n            return (beat48-tMap[i-1][0])/(tMap[i][0]-tMap[i-1][0])*(tMap[i][1]-tMap[i-1][1])+tMap[i-1][1]\n    return 0\n\nclass InstrumentShell:\n    def __init__(self):\n        self.volume=1.0\n        self.pan=0.0\n    def tune(self,cmd):\n        cmd_split= cmd.split(' ')\n        cmd_len=len(cmd_split)\n        if cmd_len>=1:\n            if cmd_len>1 and cmd_split[0]=='volume':\n                self.volume=float(cmd_split[1])\n                return True\n            if cmd_len>1 and cmd_split[0]=='pan':\n                self.pan=float(cmd_split[1])\n                return True\n        return False\n\n    def EnginePlayNote(self, engine, buf, freq, fduration):\n        wavBuf=engine.generateWave(freq,fduration, buf.getSampleRate())\n        if wavBuf!=None:\n            wavBuf.set_volume(self.volume)\n            wavBuf.set_pan(self.pan)\n            buf.writeBlend(wavBuf)\n        buf.moveCursor(fduration)\n\n    def PlayNoteA(self,engine, buf, note, tempoMap, tempoMapOffset, refFreq):\n        pos1 = tempoMapOffset\n        pos2 = pos1 + note[1]\n        fduration =  abs(GetTempoMap(tempoMap, pos2)- GetTempoMap(tempoMap, pos1))\n        if note[0]<0.0:\n            if note[1]>0.0:\n                buf.moveCursor(fduration)\n            elif note[1]<0.0:\n                buf.moveCursor(-fduration)\n            return\n        freq = refFreq*note[0]\n        self.EnginePlayNote (engine, buf, freq, fduration)\n\n    def PlayNoteB(self, engine, buf, note, tempo, refFreq):\n        fduration=abs(note[1]*60000)/(tempo*48)\n        if note[0]<0.0:\n            if note[1]>0.0:\n                buf.moveCursor(fduration)\n            elif note[1]<0.0:\n                buf.moveCursor(-fduration)\n            return\n        freq = refFreq*note[0]\n        self.EnginePlayNote (engine, buf, freq, fduration)\n\n    def PlaySequence(self, engine, buf, seq, tempo, refFreq):\n        using_tempo_map= (type(tempo)== list)\n        tempo_map=[]\n        if using_tempo_map:\n            \n            cursor = buf.getCursor()\n            if tempo[0][0] == 0:\n                cursor= tempo[0][1]\n                buf.setCursor(cursor)\n            else:\n                ctrlPnt=(0, cursor)\n                tempo_map+=[ctrlPnt]\n\n            for ctrlPnt in tempo:\n                tempo_map+=[ctrlPnt]\n\n        beatPos=0\n        for item in seq:\n            if isinstance(item, (list, tuple)):\n                _item = item[0] \n                if type(_item) == str: # singing\n                    tupleSize=len(item)\n\n                    j=0\n                    while j<tupleSize:\n                        j+=1 # by-pass lyric\n                        _item=item[j]\n                        if isinstance(_item, (list, tuple)): # singing note\n                            while j<tupleSize:\n                                _item = item[j]\n                                if not isinstance(_item, (list, tuple)):\n                                    break\n                                note=(_item[0],_item[1])\n\n                                if using_tempo_map:\n                                    self.PlayNoteA(engine,buf, note, tempo_map, beatPos, refFreq)\n                                else:\n                                    self.PlayNoteB(engine,buf, note, tempo, refFreq)\n                                beatPos+=note[1]\n                                j+=1\n\n                        elif isNumber(_item): # singing rap\n                            duration = item[j]\n                            note=(item[j+1], duration)\n                            if using_tempo_map:\n                                self.PlayNoteA(engine,buf, note, tempo_map, beatPos, refFreq)\n                            else:\n                                self.PlayNoteB(engine,buf, note, tempo, refFreq)\n                            beatPos+=note[1]\n                            j+=3\n\n                elif isNumber(_item): # note\n                    note = (item[0],item[1])\n                    if using_tempo_map:\n                        self.PlayNoteA(engine,buf, note, tempo_map, beatPos, refFreq)\n                    else:\n                        self.PlayNoteB(engine,buf, note, tempo, refFreq)\n                    beatPos+=note[1]\n            elif type(item)== str:\n                if not self.tune(engine,item):\n                    engine.tune(item)\n\n\nclass Instrument:\n    def __init__(self):\n        self.shell=InstrumentShell()\n    def play(self, buf, seq, tempo=80.0, refFreq=261.626):\n        self.shell.PlaySequence(self.engine, buf, seq, tempo, refFreq)\n    def tune(self,cmd):\n        if not self.shell.tune(cmd):\n            self.engine.tune(cmd)\n    def setNoteVolume(self,volume):\n        self.shell.volume=volume\n    def setNotePan(self,pan):\n        self.shell.pan=pan\n    def isGMDrum(self):\n        return False\n"
  },
  {
    "path": "python/ScoreDraft/JPVCVConverter.py",
    "content": "dict = {\n'あ':'a', 'い':'i', 'う':'u', 'え':'e', 'お':'o',\n'か':'a', 'き':'i', 'く':'u', 'け':'e', 'こ':'o',\n'が':'a', 'ぎ':'i', 'ぐ':'u', 'げ':'e', 'ご':'o',\n'さ':'a', 'し':'i', 'す':'u', 'せ':'e', 'そ':'o',\n'ざ':'a', 'じ':'i', 'ず':'u', 'ぜ':'e', 'ぞ':'o',\n'た':'a', 'ち':'i', 'つ':'u', 'て':'e', 'と':'o',\n'だ':'a', 'ぢ':'i', 'づ':'u', 'で':'e', 'ど':'o',\n'な':'a', 'に':'i', 'ぬ':'u', 'ね':'e', 'の':'o',\n'は':'a', 'ひ':'i', 'ふ':'u', 'へ':'e', 'ほ':'o',\n'ば':'a', 'び':'i', 'ぶ':'u', 'べ':'e', 'ぼ':'o',\n'ぱ':'a', 'ぴ':'i', 'ぷ':'u', 'ぺ':'e', 'ぽ':'o',\n'ま':'a', 'み':'i', 'む':'u', 'め':'e', 'も':'o',\n'や':'a', 'ゆ':'u', 'よ':'o',\n'ら':'a', 'り':'i', 'る':'u', 'れ':'e', 'ろ':'o',\n'わ':'a',\n'きゃ':'a', 'ぎゃ':'a', 'しゃ':'a', 'じゃ':'a',\n'ちゃ':'a', 'にゃ':'a', 'ひゃ':'a', 'びゃ':'a',\n'ぴゃ':'a', 'みゃ':'a', 'りゃ':'a', \n'うぃ':'i', 'すぃ':'i', 'ずぃ':'i', 'つぃ':'i',\n'てぃ':'i', 'でぃ':'i', 'ふぃ':'i',\n'とぅ' :'u', 'どぅ':'u',\n'きゅ':'u', 'ぎゅ':'u', 'しゅ':'u', 'じゅ':'u',\n'ちゅ':'u', 'てゅ':'u', 'でゅ':'u', 'にゅ':'u',\n'ひゅ':'u', 'びゅ':'u', 'ぴゅ':'u', 'みゅ':'u',\n'りゅ':'u', \n'いぇ':'e', 'うぇ':'e', 'きぇ':'e', 'ぎぇ':'e', \n'しぇ':'e', 'じぇ':'e', 'ちぇ':'e', 'つぇ':'e',\n'にぇ':'e', 'ひぇ':'e', 'びぇ':'e', 'ぴぇ':'e',\n'ふぇ':'e', 'みぇ':'e', 'りぇ':'e', \n'うぉ':'o', 'つぉ':'o', 'ふぉ':'o', 'きょ':'o',\n'ぎょ':'o', 'しょ':'o', 'じょ':'o', 'ちょ':'o',\n'にょ':'o', 'ひょ':'o', 'びょ':'o', 'ぴょ':'o',\n'みょ':'o', 'りょ':'o', \n'を':'o', 'ん':'n'\n}\n\ndef JPVCVConverter(LyricForEachSyllable):\n    vowels= [dict[lyric] for lyric in  LyricForEachSyllable]\n    ret=[]\n    for i in range(len(LyricForEachSyllable)):\n        v='-'\n        if i>0:\n            v= vowels[i-1]\n        ret+=[(v+' '+LyricForEachSyllable[i], 1.0, True)]\n    return ret\n\n\n"
  },
  {
    "path": "python/ScoreDraft/KarplusStrong.py",
    "content": "import os\nfrom cffi import FFI\n\nffi = FFI()\nffi.cdef(\"\"\"\nvoid KarplusStrongGenerate(void* ptr_wavbuf, float freq, float fduration, float cut_freq, float loop_gain, float sustain_gain);\n\"\"\")\n\nif os.name == 'nt':\n    fn_shared_lib = 'KarplusStrong.dll'\nelif os.name == \"posix\":\n    fn_shared_lib = 'libKarplusStrong.so'\n\npath_shared_lib = os.path.dirname(__file__)+\"/\"+fn_shared_lib\nNative = ffi.dlopen(path_shared_lib)\n\nfrom .Instrument import Instrument\nfrom .ScoreDraftCore import F32Buf\nfrom .ScoreDraftCore import WavBuffer\n\nfrom .Catalog import Catalog\nCatalog['Engines'] += ['KarplusStrongInstrument - Instrument']\n\n\nclass EngineKarplusStrong:\n    def __init__(self):\n        self.cut_freq=10000.0\n        self.loop_gain=0.99\n        self.sustain_gain=0.8\n    def tune(self, cmd):\n        pass\n    def generateWave(self, freq, fduration, sampleRate):\n        wav = F32Buf(0)\n        wav_buf = WavBuffer(sampleRate, 1, wav)\n        Native.KarplusStrongGenerate(wav_buf.m_cptr, freq,fduration, self.cut_freq, self.loop_gain, self.sustain_gain)\n        return wav_buf\n\nclass KarplusStrongInstrument(Instrument):\n    def __init__(self):\n        Instrument.__init__(self)\n        self.engine = EngineKarplusStrong()\n    def setCutFrequency(self, cut_freq):\n        # This is the cut-frequency of the feedback filter for pitch 261.626Hz\n        self.engine.cut_freq = cut_freq\n    def setLoopGain(self, loop_gain):\n        self.engine.loop_gain = loop_gain\n    def setSustainGain(self, sustain_gain):\n        self.engine.sustain_gain = sustain_gain\n\n\n"
  },
  {
    "path": "python/ScoreDraft/MIDIWriter.py",
    "content": "import os\nfrom cffi import FFI\nfrom .ScoreDraftCore import ObjArray\n\nffi = FFI()\nffi.cdef(\"\"\"\nvoid* NoteCreate(float freq_rel, int duration);\nvoid NoteDestroy(void* ptr);\nvoid* WriteToMidi(void* ptr_seq_list, unsigned tempo, float refFreq, const char* fileName);\n\"\"\")\n\nif os.name == 'nt':\n    fn_shared_lib = 'MIDIWriter.dll'\n    fs_encoding = \"mbcs\"\nelif os.name == \"posix\":\n    fn_shared_lib = 'libMIDIWriter.so'\n    fs_encoding = \"utf-8\"\n\npath_shared_lib = os.path.dirname(__file__)+\"/\"+fn_shared_lib\nNative = ffi.dlopen(path_shared_lib)\n\nclass Note:\n    def __init__(self, freq_rel, duration):\n        self.m_cptr = Native.NoteCreate(freq_rel, duration)\n        \n    def __del__(self):\n        Native.NoteDestroy(self.m_cptr)        \n        \ndef WriteNoteSequencesToMidi(seqList, tempo, refFreq, fileName):\n    '''\n    Write a list of note sequences to a MIDI file.\n    seqList -- a list of note sequences.\n    tempo -- an integer indicating tempo in beats/minute.\n    refFreq -- a float indicating reference frequency in Hz.\n    fileName -- a string.\n    '''    \n    obj_seq_list = ObjArray([ObjArray([Note(note[0], note[1]) for note in seq]) for seq in seqList])\n    Native.WriteToMidi(obj_seq_list.m_cptr, tempo, refFreq, fileName.encode(fs_encoding))\n"
  },
  {
    "path": "python/ScoreDraft/Meteor.py",
    "content": "import os\nfrom cffi import FFI\nfrom .ScoreDraftCore import ObjArray\n\nffi = FFI()\nffi.cdef(\"\"\"\nvoid* CtrlPntCreate(double freq, double fduration);\nvoid CtrlPntDestroy(void* ptr);\nvoid* SyllableCreate(const char* lyric, void* ptr_lst_ctrl_pnts);\nvoid SyllableDestroy(void* ptr);\nvoid EventDestroy(void* ptr);\nvoid EventSetOffset(void* ptr, float offset);\nvoid* EventInstCreate(unsigned instrument_id, double freq, float fduration);\nvoid* EventPercCreate(unsigned instrument_id, float fduration);\nvoid* EventSingCreate(unsigned instrument_id, void* ptr_syllable_list);\nvoid* MeteorCreate0();\nvoid* MeteorCreate(void* ptr_event_list);\nvoid MeteorDestroy(void* ptr);\nvoid MeteorSaveToFile(void* ptr, const char* filename);\nvoid MeteorLoadFromFile(void* ptr, const char* filename);\nvoid MeteorPlay(void* ptr_meteor, void* ptr_track);\nvoid* Base64Create(void* ptr_meteor);\nvoid Base64Destroy(void* ptr);\nconst char* Base64Get(void* ptr);\n\"\"\")\n\nif os.name == 'nt':\n    fn_shared_lib = 'Meteor.dll'\n    fs_encoding = \"mbcs\"    \nelif os.name == \"posix\":\n    fn_shared_lib = 'libMeteor.so'\n    fs_encoding = \"utf-8\"\n\npath_shared_lib = os.path.dirname(__file__)+\"/\"+fn_shared_lib\nNative = ffi.dlopen(path_shared_lib)\n\nclass CtrlPnt:\n    def __init__(self, freq, fduration):\n        self.m_cptr = Native.CtrlPntCreate(freq, fduration)\n        \n    def __del__(self):\n        Native.CtrlPntDestroy(self.m_cptr)\n        \nclass Syllable:\n    def __init__(self, lyric, ctrl_pnts):\n        obj_ctrl_pnts = ObjArray(ctrl_pnts)\n        self.m_cptr = Native.SyllableCreate(lyric.encode('utf-8'), obj_ctrl_pnts.m_cptr)\n    \n    def __del__(self):\n        Native.SyllableDestroy(self.m_cptr)\n        \nclass Event:       \n    def __del__(self):\n        Native.EventDestroy(self.m_cptr)\n        \n    def set_offset(self, offset):\n        Native.EventSetOffset(self.m_cptr, offset)\n        \nclass EventInst(Event):\n    def __init__(self, instrument_id, freq, fduration):\n        self.m_cptr = Native.EventInstCreate(instrument_id, freq, fduration)\n        \nclass EventPerc(Event):\n    def __init__(self, instrument_id, fduration):\n        self.m_cptr = Native.EventPercCreate(instrument_id, fduration)\n        \nclass EventSing(Event):\n    def __init__(self, instrument_id, syllable_list):\n        obj_syllable_list = ObjArray(syllable_list)\n        self.m_cptr = Native.EventSingCreate(instrument_id, obj_syllable_list.m_cptr)\n        \nclass Meteor:\n    def __init__(self, event_list = None):\n        if event_list is None:\n            self.m_cptr = Native.MeteorCreate0()\n        else:\n            obj_event_list = ObjArray(event_list)\n            self.m_cptr = Native.MeteorCreate(obj_event_list.m_cptr)\n        \n    def __del__(self):\n        Native.MeteorDestroy(self.m_cptr)\n        \n    def save_to_file(self, filename):\n        Native.MeteorSaveToFile(self.m_cptr, filename.encode(fs_encoding))\n        \n    def load_from_file(self, filename):\n        Native.MeteorLoadFromFile(self.m_cptr, filename.encode(fs_encoding))\n        \n    def to_base64(self):\n        p_b64 = Native.Base64Create(self.m_cptr)\n        b64 = ffi.string(Native.Base64Get(p_b64)).decode('utf-8')\n        Native.Base64Destroy(p_b64)\n        return b64\n        \ndef MeteorPlay(meteor, track):\n    Native.MeteorPlay(meteor.m_cptr, track.m_cptr)\n\nfrom .ScoreDraftCore import TrackBuffer\nfrom .ScoreDraftCore import MixTrackBufferList\nfrom .ScoreDraftCore import WriteTrackBufferToWav\n\nfrom .Instrument import Instrument\nfrom .Percussion import Percussion\nfrom .Singer import Singer\n\nimport math\n\nEventType_Inst=0\nEventType_Perc=1\nEventType_Sing=2\n\nclass DummyTrackBuffer(TrackBuffer):\n    def __init__ (self, eventList, chn=-1):\n        TrackBuffer.__init__(self, chn)\n        self.eventList=eventList\n\n    def writeBlend(self, wavBuf):\n        TrackBuffer.writeBlend(self,wavBuf)\n        if hasattr(wavBuf, 'event'):\n            event = wavBuf.event\n            event.set_offset(self.getCursor())\n            self.eventList += [event]\n            \nclass DummyInstrumentEngine:\n    def __init__(self, inst_id, engine, isGMDrum):\n        self.inst_id=inst_id\n        self.engine = engine\n        self.isGMDrum = isGMDrum\n\n    def tune(self, cmd):\n        return self.engine.tune(cmd)\n\n    def generateWave(self, freq, fduration, sampleRate):\n        wavBuf=self.engine.generateWave(freq, fduration, sampleRate)\n        if not self.isGMDrum:\n            event = EventInst(self.inst_id, freq, fduration)\n        else:\n            midiPitch = int(math.log(freq/261.626)*12.0 / math.log(2.0) + 0.5)  + 60;\n            if midiPitch<0:\n                midiPitch = 0\n            elif midiPitch>127:\n                midiPitch = 127\n            event = EventPerc(midiPitch, fduration)\n        wavBuf.event = event\n        return wavBuf\n\nclass DummyInstrument(Instrument):\n    def __init__(self, inst_id, inst):\n        self.shell = inst.shell\n        self.engine= DummyInstrumentEngine(inst_id, inst.engine, inst.isGMDrum())\n        \nclass DummyInstrumentCreator:\n    def __init__(self):\n        self.count=0\n        self.map={}\n\n    def Create(self, inst):\n        if not inst in self.map:\n            self.map[inst] = DummyInstrument(self.count, inst)\n            self.count+=1\n        return self.map[inst]\n\nclass DummyPercussionEngine:\n    def __init__(self, inst_id, engine):\n        self.inst_id=inst_id\n        self.engine=engine\n\n    def tune(self, cmd):\n        return self.engine.tune(cmd)\n\n    def generateWave(self, fduration, sampleRate):\n        wavBuf=self.engine.generateWave(fduration, sampleRate)\n        event = EventPerc(self.inst_id, fduration)\n        wavBuf.event = event\n        return wavBuf\n\nclass DummyPercussion(Percussion):\n    def __init__(self, inst_id, perc):\n        self.shell = perc.shell\n        self.engine= DummyPercussionEngine(inst_id, perc.engine)    \n\n\nclass DummyPercussionCreator:\n    def __init__(self):\n        self.count=0\n        self.map={}\n\n    def Create(self, perc):\n        if not perc in self.map:\n            self.map[perc] = DummyPercussion(self.count, perc)\n            self.count+=1\n        return self.map[perc]\n        \nclass DummySingerEngine:\n    def __init__(self, inst_id, engine):\n        self.inst_id=inst_id\n        self.engine=engine\n\n    def tune(self, cmd):\n        return self.engine.tune(cmd)\n\n    def generateWave(self, syllableList, sampleRate):\n        wavBuf=self.engine.generateWave(syllableList, sampleRate)\n        syllable_obj_list = [Syllable(syllable['lyric'], [CtrlPnt(ctrl_pnt[0], ctrl_pnt[1]) for ctrl_pnt in syllable['ctrlPnts']]) for syllable in syllableList]        \n        event = EventSing(self.inst_id, syllable_obj_list)\n        wavBuf.event = event\n        return wavBuf\n\nclass DummySinger(Singer):\n    def __init__(self, inst_id, singer):\n        self.shell = singer.shell\n        self.engine= DummySingerEngine(inst_id, singer.engine)   \n\n\nclass DummySingerCreator:\n    def __init__(self):\n        self.count=0\n        self.map={}\n\n    def Create(self, singer):\n        if not singer in self.map:\n            self.map[singer] = DummySinger(self.count, singer)\n            self.count+=1\n        return self.map[singer]\n        \nclass Document:\n    def __init__ (self):\n        self.bufferList=[]\n        self.tempo=80\n        self.refFreq=261.626\n        self.eventList=[]\n        self.instCreator=DummyInstrumentCreator()\n        self.percCreator=DummyPercussionCreator()\n        self.singerCreator=DummySingerCreator()\n\n    def getBuffer(self, bufferIndex):\n        return self.bufferList[bufferIndex]\n\n    def getTempo(self):\n        return self.tempo\n\n    def setTempo(self,tempo):\n        self.tempo=tempo\n\n    def getReferenceFrequency(self):\n        return self.refFreq\n\n    def setReferenceFrequency(self,refFreq):\n        self.refFreq=refFreq\n\n    def newBuf(self, chn=-1):\n        buf=DummyTrackBuffer(self.eventList,chn)\n        self.bufferList.append(buf)\n        return len(self.bufferList)-1\n\n    def setTrackVolume(self, bufferIndex, volume):\n        self.bufferList[bufferIndex].setVolume(volume)\n\n    def setTrackPan(self, bufferIndex, pan):\n        self.bufferList[bufferIndex].setPan(pan)\n\n    def playNoteSeq(self, seq, instrument, bufferIndex=-1):\n        dummyInst = self.instCreator.Create(instrument)\n        if bufferIndex==-1:\n            bufferIndex= self.newBuf()      \n        buf=self.bufferList[bufferIndex]\n        dummyInst.play(buf, seq, self.tempo, self.refFreq)\n        return bufferIndex  \n\n    def playBeatSeq(self, seq, percList, bufferIndex=-1):\n        dummyPercList =[self.percCreator.Create(perc) for perc in percList]\n        if bufferIndex==-1:\n            bufferIndex= self.newBuf()      \n        buf=self.bufferList[bufferIndex]            \n        Percussion.play(dummyPercList, buf, seq, self.tempo)\n        return bufferIndex\n\n    def sing(self, seq, singer, bufferIndex=-1):\n        dummySinger = self.singerCreator.Create(singer)\n        if bufferIndex==-1:\n            bufferIndex= self.newBuf()      \n        buf=self.bufferList[bufferIndex]\n        dummySinger.sing( buf, seq, self.tempo, self.refFreq)\n        return bufferIndex\n\n    def trackToWav(self, bufferIndex, filename):\n        WriteTrackBufferToWav(self.bufferList[bufferIndex], filename)\n\n    def mix(self, targetBuf):\n        MixTrackBufferList(targetBuf,self.bufferList)\n\n    def mixDown(self,filename,chn=-1):\n        targetBuf=TrackBuffer(chn)\n        self.mix(targetBuf)\n        WriteTrackBufferToWav(targetBuf, filename)\n        \n    def meteor(self,chn=-1):\n        targetBuf=TrackBuffer(chn)\n        self.mix(targetBuf)\n        meteor = Meteor(self.eventList)\n        MeteorPlay(meteor, targetBuf)\n\n    def saveToFile(self,filename):\n        meteor = Meteor(self.eventList)\n        meteor.save_to_file(filename)\n\n\n\n\n\n"
  },
  {
    "path": "python/ScoreDraft/MusicXMLDocument.py",
    "content": "from .musicxml import ScorePartwise\nfrom xsdata.formats.dataclass.parsers import XmlParser\ntry:\n    from .Meteor import Document\nexcept:\n    from .Document import Document\nimport ly.musicxml\n\ndef _find_tempo(score):\n    for part in score.part:\n        for measure in part.measure:\n            direction = measure.direction\n            if len(direction)>0:\n                sound = direction[0].sound\n                if not sound is None and not sound.tempo is None:\n                    return int(sound.tempo)\n    return 120\n    \n\n_stepIdxs = {\n    'C': 0.0,\n    'D': 2.0,\n    'E': 4.0,\n    'F': 5.0,\n    'G': 7.0, \n    'A': 9.0, \n    'B': 11.0,     \n}\n    \ndef _part_to_seq(part):\n    attrtib = part.measure[0].attributes[0]\n    divisions = int(attrtib.divisions)\n    if 48 % divisions != 0:\n        print('ScoreDraft cannot handle divisions: %d' % divisions)\n        return []\n    seq = []\n    duration = 0\n    for measure in part.measure:\n        for note in measure.note:\n            if duration>0 and len(note.chord)>0:\n                seq += [(-1.0, -duration)]\n            freq = -1.0\n            if len(note.rest)<1 and len(note.pitch)>0:\n                pitch = note.pitch[0]\n                octave = float(pitch.octave)\n                step_idx = _stepIdxs[pitch.step.name]\n                if not pitch.alter is None:\n                    step_idx += float(pitch.alter)\n                step_idx += (octave - 4.0)*12.0\n                freq = 2.0**(step_idx/12.0)            \n            duration = int(note.duration[0] * 48 / divisions)            \n            seq += [(freq, duration)]\n    return seq    \n\nclass MusicXMLDocument(Document):\n    def __init__(self, str_xml):\n        Document.__init__(self)\n        parser = XmlParser()\n        self.score = parser.from_string(str_xml, ScorePartwise)\n        self.tempo = _find_tempo(self.score)\n        \n    def playXML(self, instruments):\n        for i in range(len(self.score.part)):\n            j = i\n            if j >= len(instruments):\n                j = len(instruments) - 1\n            part = self.score.part[i]\n            seq = _part_to_seq(part)\n            self.playNoteSeq(seq, instruments[j])\n        \n        \ndef from_music_xml(filename):\n    with open(filename, 'r') as file:\n        return MusicXMLDocument(file.read())\n        \ndef from_lilypond(filename):\n    with open(filename, 'r') as file:\n        e = ly.musicxml.writer()\n        e.parse_text(file.read())\n        xml = e.musicxml()\n        return MusicXMLDocument(xml.tostring().decode('utf-8'))\n"
  },
  {
    "path": "python/ScoreDraft/Notes.py",
    "content": "Freqs=[2.0**(v/12.0) for v in range(12)]\n\nfC=1.0\nfCS=Freqs[1]\nfDb=Freqs[1]\nfD=Freqs[2]\nfDS=Freqs[3]\nfEb=Freqs[3]\nfE=Freqs[4]\nfF=Freqs[5]\nfFS=Freqs[6]\nfGb=Freqs[6]\nfG=Freqs[7]\nfGS=Freqs[8]\nfAb=Freqs[8]\nfA=Freqs[9]\nfAS=Freqs[10]\nfBb=Freqs[10]\nfB=Freqs[11]\n\ndef note(octave, freq, duration):\n\treturn (freq*(2.0**(octave-5.0)), duration)\n\ndef do(octave=5, duration=48):\n\treturn note(octave,Freqs[0],duration)\n\ndef set_do(freq):\n\tFreqs[0]=freq\n\ndef re(octave=5, duration=48):\n\treturn note(octave,Freqs[2],duration)\n\ndef set_re(freq):\n\tFreqs[2]=freq\n\ndef mi(octave=5, duration=48):\n\treturn note(octave,Freqs[4],duration)\n\ndef set_mi(freq):\n\tFreqs[4]=freq\n\ndef fa(octave=5, duration=48):\n\treturn note(octave,Freqs[5],duration)\n\ndef set_fa(freq):\n\tFreqs[5]=freq\n\ndef so(octave=5, duration=48):\n\treturn note(octave,Freqs[7],duration)\n\ndef set_so(freq):\n\tFreqs[7]=freq\n\ndef la(octave=5, duration=48):\n\treturn note(octave,Freqs[9],duration)\n\ndef set_la(freq):\n\tFreqs[9]=freq\n\ndef ti(octave=5, duration=48):\n\treturn note(octave,Freqs[11],duration)\n\ndef set_ti(freq):\n\tFreqs[11]=freq\n\n\ndef BL(duration=48):\n\treturn (-1.0, duration)\n\ndef BK(duration=48):\n\treturn (-1.0, -duration)\n"
  },
  {
    "path": "python/ScoreDraft/PCMPlayer.py",
    "content": "import os\nimport threading\nfrom cffi import FFI\n\nffi = FFI()\nffi.cdef(\"\"\"\nvoid* PCMPlayerCreate(double sample_rate, unsigned ui);\nvoid PCMPlayerDestroy(void* ptr);\nvoid PlayTrack(void* ptr, void* ptr_track);\nfloat GetRemainingTime(void* ptr);\nvoid MainLoop(void* ptr);\n\"\"\")\n\nif os.name == 'nt':\n    fn_shared_lib = 'PCMPlayer.dll'\nelif os.name == \"posix\":\n    fn_shared_lib = 'libPCMPlayer.so'\n\npath_shared_lib = os.path.dirname(__file__)+\"/\"+fn_shared_lib\nNative = ffi.dlopen(path_shared_lib)\n\nclass PCMPlayer:\n    def __init__(self, sample_rate = 44100.0, ui = False):\n        self.m_cptr = Native.PCMPlayerCreate(sample_rate, ui)\n        \n    def __del__(self):\n        Native.PCMPlayerDestroy(self.m_cptr)\n        \n    def play_track(self, track):\n        Native.PlayTrack(self.m_cptr, track.m_cptr)\n        \n    def remaining_time(self):\n        return Native.GetRemainingTime(self.m_cptr)\n        \n    def main_loop(self):\n        Native.MainLoop(self.m_cptr)\n\nclass AsyncUIPCMPlayer:\n    def __init__(self, sample_rate = 44100.0):\n        self.player = None\n        self.player_ready = threading.Event()\n        \n    def _ui_thread(self):\n        self.player = PCMPlayer(ui = True)   \n        self.player_ready.set() \n        self.player.main_loop()\n        self.player = None\n        \n    def play_track(self, track):\n        if self.player is None:\n            threading.Thread(target = self._ui_thread).start()\n            self.player_ready.wait()\n            self.player_ready.clear()\n        self.player.play_track(track)\n    \n    def remaining_time(self):\n        if self.player is None:\n            return 0.0\n        return self.player.remaining_time()\n"
  },
  {
    "path": "python/ScoreDraft/Percussion.py",
    "content": "import numbers\n\ndef isNumber(x):\n    return isinstance(x, numbers.Number)\n\ndef GetTempoMap(tMap, beat48):\n    for i in range(1,len(tMap)):\n        if beat48 < tMap[i][0] or i == len(tMap)-1:\n            return (beat48-tMap[i-1][0])/(tMap[i][0]-tMap[i-1][0])*(tMap[i][1]-tMap[i-1][1])+tMap[i-1][1]\n    return 0\n\nclass PercussionShell:\n    def __init__(self):\n        self.volume=1.0\n        self.pan=0.0\n    def tune(self,cmd):\n        cmd_split= cmd.split(' ')\n        cmd_len=len(cmd_split)\n        if cmd_len>=1:\n            if cmd_len>1 and cmd_split[0]=='volume':\n                self.volume=float(cmd_split[1])\n                return True\n            if cmd_len>1 and cmd_split[0]=='pan':\n                self.pan=float(cmd_split[1])\n                return True\n        return False\n\n    def EnginePlayBeat(self, engine, buf, fduration):\n        wavBuf=engine.generateWave(fduration, buf.getSampleRate())\n        if wavBuf!=None:\n            wavBuf.set_volume(self.volume)\n            wavBuf.set_pan(self.pan)\n            buf.writeBlend(wavBuf)\n        buf.moveCursor(fduration)\n\n    def PlayBeatA(self, engine, buf, duration, tempoMap, tempoMapOffset):\n        pos1 = tempoMapOffset\n        pos2 = pos1 + duration\n        fduration =  GetTempoMap(tempoMap, pos2)- GetTempoMap(tempoMap, pos1)\n        self.EnginePlayBeat (engine, buf, fduration)\n\n\n    def PlayBeatB(self, engine, buf, duration, tempo):\n        fduration=abs(duration*60000)/(tempo*48)\n        self.EnginePlayBeat (engine, buf, fduration)\n\n    @staticmethod\n    def PlaySilenceA(buf, duration, tempoMap, tempoMapOffset):\n        buf.setCursor(GetTempoMap(tempoMap, tempoMapOffset+duration))\n\n    @staticmethod\n    def PlayBackspaceA(buf, duration, tempoMap, tempoMapOffset):\n        buf.setCursor(GetTempoMap(tempoMap, tempoMapOffset-duration))\n\n    @staticmethod\n    def PlaySilenceB(buf, duration, tempo):\n        fduration=duration*60000/(tempo*48)\n        buf.moveCursor(fduration)\n\n    @staticmethod\n    def PlayBackspaceB(buf, duration, tempo):\n        fduration=duration*60000/(tempo*48)\n        buf.moveCursor(-fduration)\n\n\ndef PlaySequence(perc_list, buf, seq, tempo):\n    using_tempo_map= (type(tempo)== list)\n    tempo_map=[]\n    if using_tempo_map:\n        \n        cursor = buf.getCursor()\n        if tempo[0][0] == 0:\n            cursor= tempo[0][1]\n            buf.setCursor(cursor)\n        else:\n            ctrlPnt=(0, cursor)\n            tempo_map+=[ctrlPnt]\n\n        for ctrlPnt in tempo:\n            tempo_map+=[ctrlPnt]\n\n    beatPos=0\n    for item in seq:\n        percId = item[0]\n        operation = item[1]\n        if isNumber(operation):\n            duration = operation\n\n            if using_tempo_map:\n                if percId >= 0:\n                    perc_list[percId].shell.PlayBeatA(perc_list[percId].engine, buf, duration, tempo_map, beatPos)\n                elif duration >=0:\n                    PercussionShell.PlaySilenceA(buf, duration, tempo_map, beatPos)\n                else:\n                    PercussionShell.PlayBackspaceA(buf, -duration, tempo_map, beatPos)\n            else:\n                if percId >= 0:\n                    perc_list[percId].shell.PlayBeatB(perc_list[percId].engine, buf, duration, tempo)\n                elif duration >=0:\n                    PercussionShell.PlaySilenceB(buf, duration, tempo)\n                else:\n                    PercussionShell.PlayBackspaceB(buf, -duration, tempo)\n            beatPos+=duration\n        elif type(operation)== str:\n            perc_list[percId].tune(operation)\n\nclass Percussion:\n    def __init__(self):\n        self.shell=PercussionShell()\n        \n    @staticmethod\n    def play(percList, buf, seq, tempo=80.0):\n        PlaySequence(percList, buf, seq, tempo)\n\n    def tune(self,cmd):\n        if not self.shell.tune(cmd):\n            self.engine.tune(cmd)\n    def setBeatVolume(self,volume):\n        self.shell.volume=volume\n    def setBeatPan(self,pan):\n        self.shell.pan=pan\n\n\n\n\n\n"
  },
  {
    "path": "python/ScoreDraft/RapChinese.py",
    "content": "baseFreq=1.0\n\ndef SetRapBaseFreq(freq):\n    global baseFreq   \n    baseFreq=freq\n\ndef CRap(lyric, tone, duration=48):\n    if tone <= 1:\n        return (lyric, duration, baseFreq, baseFreq)\n    elif tone == 2:\n        return (lyric, duration, baseFreq*0.7, baseFreq)\n    elif tone == 3:\n        return (lyric, duration, baseFreq*0.5, baseFreq*0.75)\n    elif tone == 4:\n        return (lyric, duration, baseFreq, baseFreq*0.5)\n    else:\n        return (lyric, duration, baseFreq*0.75, baseFreq*0.55)\n"
  },
  {
    "path": "python/ScoreDraft/ScoreDraftCore.py",
    "content": "import os\nfrom cffi import FFI\n\nffi = FFI()\nffi.cdef(\"\"\"\n// general\nvoid* PtrArrayCreate(unsigned long long size, const void** ptrs);\nvoid PtrArrayDestroy(void* ptr_arr);\n\n// F32Buf\nvoid* F32BufCreate(unsigned long long size, float value);\nvoid F32BufDestroy(void* ptr);\nfloat* F32BufData(void* ptr);\nint F32BufSize(void* ptr);\t\nvoid F32BufToS16(void* ptr, short* dst, float amplitude);\nvoid F32BufFromS16(void* ptr, const short* data, unsigned long long size);\nfloat F32BufMaxValue(void* ptr);\nvoid F32BufMix(void* ptr, void* ptr_lst);\n\nvoid* WavBufferCreate(float sampleRate, unsigned channelNum, void* ptr_data, unsigned alignPos, float volume, float pan);\nvoid WavBufferDestroy(void *ptr);\nfloat WavBufferGetSampleRate(void* ptr);\nunsigned WavBufferGetChannelNum(void *ptr);\nunsigned long long WavBufferGetSampleNum(void *ptr);\nunsigned WavBufferGetAlignPos(void* ptr);\nvoid WavBufferSetAlignPos(void* ptr, unsigned alignPos);\nfloat WavBufferGetVolume(void* ptr);\nvoid WavBufferSetVolume(void* ptr, float volume);\nfloat WavBufferGetPan(void* ptr);\nvoid WavBufferSetPan(void* ptr, float pan);\n\nvoid* TrackBufferCreate(unsigned chn);\nvoid TrackBufferDestroy(void* ptr);\nvoid TrackBufferSetVolume(void* ptr, float volume);\nfloat TrackBufferGetVolume(void* ptr);\nvoid TrackBufferSetPan(void* ptr, float pan);\nfloat TrackBufferGetPan(void* ptr);\nunsigned TrackBufferGetNumberOfSamples(void* ptr);\nunsigned TrackBufferGetAlignPos(void* ptr);\nfloat TrackBufferGetCursor(void* ptr);\nvoid TrackBufferSetCursor(void* ptr, float cursor);\nvoid TrackBufferMoveCursor(void* ptr, float cursor_delta);\nvoid MixTrackBufferList(void* ptr, void* ptr_list);\nvoid WriteTrackBufferToWav(void* ptr, const char* fn);\nvoid ReadTrackBufferFromWav(void* ptr, const char* fn);\nvoid TrackBufferWriteBlend(void* ptr, void* ptr_wav_buf);\n\"\"\")\n\n\nif os.name == 'nt':\n    fn_shared_lib = 'ScoreDraftCore.dll'\n    fs_encoding = \"mbcs\"\nelif os.name == \"posix\":\n    fn_shared_lib = 'libScoreDraftCore.so'\n    fs_encoding = \"utf-8\"\n\npath_shared_lib = os.path.dirname(__file__)+\"/\"+fn_shared_lib\nNative = ffi.dlopen(path_shared_lib)\n\nclass ObjArray:\n    def __init__(self, arr):\n        self.m_arr = arr\n        c_ptrs = [obj.m_cptr for obj in arr]\n        self.m_cptr = Native.PtrArrayCreate(len(c_ptrs), c_ptrs)\n            \n    def __del__(self):\n        Native.PtrArrayDestroy(self.m_cptr)\n\n\nclass F32Buf:\n    def __init__(self, size, value = 0.0):\n        self.m_cptr = Native.F32BufCreate(size, value)\n        \n    def __del__(self):\n        Native.F32BufDestroy(self.m_cptr)\n        \n    def data(self):\n        return Native.F32BufData(self.m_cptr)\n        \n    def size(self):\n        return Native.F32BufSize(self.m_cptr)\n        \n    def to_s16(self, amplitude):\n        _size = self.size()\n        s16 = bytearray(_size*2)\n        ptr_s16 = ffi.from_buffer('short[]', s16)\n        Native.F32BufToS16(self.m_cptr, ptr_s16, amplitude)\n        return bytes(s16)\n        \n    @classmethod\n    def from_s16(cls, s16):\n        f32 = cls(0)\n        ptr_s16 = ffi.from_buffer('const short[]', s16)\n        Native.F32BufFromS16(f32.m_cptr, ptr_s16, len(s16)//2)\n        return f32\n        \n    def max_value(self):\n        return Native.F32BufMaxValue(self.m_cptr)\n            \n    @classmethod\n    def mix(cls, lst_bufs):\n        f32 = cls()\n        obj_lst = ObjArray(lst_bufs);\n        Native.F32BufMix(f32.m_cptr, obj_lst.m_cptr)        \n        return f32\n        \nclass WavBuffer:\n    def __init__(self, sampleRate, channelNum, data, alignPos = 0, volume = 1.0, pan = 0.0):\n        self.m_data = data\n        self.m_cptr = Native.WavBufferCreate(sampleRate, channelNum, data.m_cptr, alignPos, volume, pan)\n        \n    def __del__(self):\n        Native.WavBufferDestroy(self.m_cptr)        \n        \n    def get_sample_rate(self):\n        return Native.WavBufferGetSampleRate(self.m_cptr)\n        \n    def get_channel_num(self):\n        return Native.WavBufferGetChannelNum(self.m_cptr)\n        \n    def get_sample_num(self):\n        return Native.WavBufferGetSampleNum(self.m_cptr)\n        \n    def get_align_pos(self):\n        return Native.WavBufferGetAlignPos(self.m_cptr)\n        \n    def set_align_pos(self, alignPos):\n        Native.WavBufferSetAlignPos(self.m_cptr, alignPos)\n        \n    def get_volume(self):\n        return Native.WavBufferGetVolume(self.m_cptr)\n        \n    def set_volume(self, volume):\n        Native.WavBufferSetVolume(self.m_cptr, volume)\n        \n    def get_pan(self):\n        return Native.WavBufferGetPan(self.m_cptr)\n        \n    def set_pan(self, pan):\n        Native.WavBufferSetPan(self.m_cptr, pan)\n        \ndefaultNumOfChannels=2\ndef setDefaultNumberOfChannels(defChn):\n    if defChn<1:\n        defChn=1\n    elif defChn>2:\n        defChn=2\n    global defaultNumOfChannels\n    defaultNumOfChannels=defChn\n\nclass TrackBuffer:\n    '''\n    Basic data structure storing waveform.\n    The content can either be generated by \"play\" and \"sing\" calls or by mixing track-buffer into a new one\n    '''\n    def __init__ (self, chn=-1):\n        '''\n        chn is the number of channels, which can be 1 or 2\n        '''\n        if chn==-1:\n            chn=defaultNumOfChannels\n        if chn<1:\n            chn=1\n        elif chn>2:\n            chn=2\n        self.m_cptr = Native.TrackBufferCreate(chn)    \n\n    def __del__(self):\n        Native.TrackBufferDestroy(self.m_cptr)\n\n    def getSampleRate(self):\n        return 44100 # currently we always use a sample rate 44100.0\n\n    def setVolume(self,volume):\n        '''\n        Set the volume of the track. This value is used as a weight when mixing tracks.\n        volume -- a float value, in range [0.0,1.0]\n        '''\n        Native.TrackBufferSetVolume(self.m_cptr, volume)\n\n    def getVolume(self):\n        '''\n        Get the volume of the track. This value is used as a weight when mixing tracks.\n        Returned value is a float\n        '''\n        return Native.TrackBufferGetVolume(self.m_cptr)\n\n    def setPan(self, pan):\n        '''\n        Set the panning of the track. This value is used when mixing tracks.\n        pan -- a float value, in range [-1.0,1.0]\n        '''\n        Native.TrackBufferSetPan(self.m_cptr, pan)    \n\n\n    def getPan(self):\n        '''\n        Get the panning of the track. This value is used when mixing tracks.\n        Returned value is a float\n        '''\n        return Native.TrackBufferGetPan(self.m_cptr)\n\n    def getNumberOfSamples(self):\n        '''\n        Get the number of PCM samples of the buffer.\n        Returned value is an integer\n        '''\n        return Native.TrackBufferGetNumberOfSamples(self.m_cptr)\n\n    def getNumberOfChannles(self):\n        '''\n        Get the number of Channels of the buffer.\n        Returned value is an integer\n        '''\n        return Native.TrackBufferGetNumberOfChannels(self.m_cptr)\n\n    def getAlignPosition(self):\n        '''\n        Get the align position of the buffer\n        The postion will be used as the logical original point when mixed with other track buffers\n        The unit is in number of samples\n        Returned value is an integer \n        '''\n        return Native.TrackBufferGetAlignPos(self.m_cptr)\n\n    def getCursor(self):\n        '''\n        Get the cursor position of the buffer.\n        The unit is in milliseconds.\n        Returned value is a float\n        '''\n        return Native.TrackBufferGetCursor(self.m_cptr)\n\n    def setCursor(self, cursor):\n        '''\n        Set the curosr position of the buffer.\n        The unit is in milliseconds.\n        cursor -- a float value, cursor >= 0.0\n        '''\n        Native.TrackBufferSetCursor(self.m_cptr, cursor)\n\n\n    def moveCursor(self, cursor_delta):\n        '''\n        Set the curosr position of the buffer to current position + cursor_delta.\n        The unit is in milliseconds.\n        cursor_delta -- a float value\n        '''\n        Native.TrackBufferMoveCursor(self.m_cptr, cursor_delta)\n\n    def writeBlend(self, wavBuf):\n        '''\n        Write and blend a WavBuffer into current trackbuffer. \n        Cursor will not be moved. Need another call to move the cursor.\n        '''\n        Native.TrackBufferWriteBlend(self.m_cptr, wavBuf.m_cptr)\n\n\ndef MixTrackBufferList (targetbuf, bufferList):\n    '''\n    Function used to mix a list of track-buffers into another one\n    targetbuf -- an instance of TrackBuffer to contain the result\n    bufferList -- a list a track-buffers\n    '''\n    arr = ObjArray(bufferList)\n    Native.MixTrackBufferList(targetbuf.m_cptr, arr.m_cptr)\n\ndef WriteTrackBufferToWav(buf, filename):\n    '''\n    Function used to write a track-buffer to a .wav file.\n    buf -- an instance of TrackBuffer\n    filename -- a string\n    '''\n    Native.WriteTrackBufferToWav(buf.m_cptr, filename.encode(fs_encoding))\n\ndef ReadTrackBufferFromWav(buf, filename):\n    '''\n    Function used to read a track-buffer from a .wav file.\n    buf -- an instance of TrackBuffer\n    filename -- a string\n    '''\n    Native.ReadTrackBufferFromWav(buf.m_cptr, filename.encode(fs_encoding))\n    \n\n\n\n"
  },
  {
    "path": "python/ScoreDraft/SimpleInstruments.py",
    "content": "import os\nfrom cffi import FFI\n\nffi = FFI()\nffi.cdef(\"\"\"\nvoid GeneratePureSin(void* ptr_wavbuf, float freq, float fduration);\nvoid GenerateSquare(void* ptr_wavbuf, float freq, float fduration);\nvoid GenerateTriangle(void* ptr_wavbuf, float freq, float fduration);\nvoid GenerateSawtooth(void* ptr_wavbuf, float freq, float fduration);\nvoid GenerateNaivePiano(void* ptr_wavbuf, float freq, float fduration);\nvoid GenerateBottleBlow(void* ptr_wavbuf, float freq, float fduration);\n\"\"\")\n\nif os.name == 'nt':\n    fn_shared_lib = 'SimpleInstruments.dll'\nelif os.name == \"posix\":\n    fn_shared_lib = 'libSimpleInstruments.so'\n\npath_shared_lib = os.path.dirname(__file__)+\"/\"+fn_shared_lib\nNative = ffi.dlopen(path_shared_lib)\n\nfrom .Instrument import Instrument\nfrom .ScoreDraftCore import F32Buf\nfrom .ScoreDraftCore import WavBuffer\n\nclass Engine:\n    def __init__(self, generator):\n        self.generator= generator\n    def tune(self, cmd):\n        pass\n    def generateWave(self, freq, fduration, sampleRate):\n        wav = F32Buf(0)\n        wav_buf = WavBuffer(sampleRate, 1, wav)\n        self.generator(wav_buf.m_cptr, freq, fduration)\n        return wav_buf\n\ndef EnginePureSin():\n    return Engine(Native.GeneratePureSin)\n    \ndef EngineSquare():\n    return Engine(Native.GenerateSquare)\n    \ndef EngineTriangle():\n    return Engine(Native.GenerateTriangle)\n    \ndef EngineSawtooth():\n    return Engine(Native.GenerateSawtooth)\n    \ndef EngineNaivePiano():\n    return Engine(Native.GenerateNaivePiano)\n    \ndef EngineBottleBlow():\n    return Engine(Native.GenerateBottleBlow)\n\nclass PureSin(Instrument):\n    def __init__(self):\n        Instrument.__init__(self)\n        self.engine = EnginePureSin()\n\nclass Square(Instrument):\n    def __init__(self):\n        Instrument.__init__(self)\n        self.engine = EngineSquare()\n\nclass Triangle(Instrument):\n    def __init__(self):\n        Instrument.__init__(self)\n        self.engine = EngineTriangle()\n\nclass Sawtooth(Instrument):\n    def __init__(self):\n        Instrument.__init__(self)\n        self.engine = EngineSawtooth()\n\nclass NaivePiano(Instrument):\n    def __init__(self):\n        Instrument.__init__(self)\n        self.engine = EngineNaivePiano()\n\nclass BottleBlow(Instrument):\n    def __init__(self):\n        Instrument.__init__(self)\n        self.engine = EngineBottleBlow()\n\n"
  },
  {
    "path": "python/ScoreDraft/Singer.py",
    "content": "import numbers\n\ndef isNumber(x):\n    return isinstance(x, numbers.Number)\n\ndef GetTempoMap(tMap, beat48):\n    for i in range(1,len(tMap)):\n        if beat48 < tMap[i][0] or i == len(tMap)-1:\n            return (beat48-tMap[i-1][0])/(tMap[i][0]-tMap[i-1][0])*(tMap[i][1]-tMap[i-1][1])+tMap[i-1][1]\n    return 0\n\nclass SingerShell:\n    def __init__(self):\n        self.default_lyric='a'\n        self.volume=1.0\n        self.pan=0.0\n    def tune(self,cmd):\n        cmd_split= cmd.split(' ')\n        cmd_len=len(cmd_split)\n        if cmd_len>=1:\n            if cmd_len>1 and cmd_split[0]=='default_lyric':\n                self.default_lyric=cmd_split[1]\n                return True\n            if cmd_len>1 and cmd_split[0]=='volume':\n                self.volume=float(cmd_split[1])\n                return True\n            if cmd_len>1 and cmd_split[0]=='pan':\n                self.pan=float(cmd_split[1])\n                return True\n        return False\n\n    def EngineSingSyllables(self,engine, buf, syllableList,totalDuration):\n        wavBuf=engine.generateWave(syllableList, buf.getSampleRate())\n        if wavBuf!=None:\n            wavBuf.set_volume(self.volume)\n            wavBuf.set_pan(self.pan)\n            buf.writeBlend(wavBuf)\n        buf.moveCursor(totalDuration)\n\n    def SingSyllablesA(self,engine, buf, syllables, tempoMap, tempoMapOffset, refFreq):\n        syllableList=[]\n        totalDuration = 0\n        beatPos = tempoMapOffset\n        for syllable in syllables:\n            ctrlPnts=[]\n            for aCtrlPnt in syllable['ctrlPnts']:\n                pos1=beatPos\n                pos2 = pos1 + aCtrlPnt[1]\n                fduration = abs(GetTempoMap(tempoMap, pos2)- GetTempoMap(tempoMap, pos1))\n                if aCtrlPnt[0]<0:\n                    if len(syllableList)>0 or len(ctrlPnts)>0:\n                        if len(ctrlPnts)>0:\n                            _syllable = {\n                                'lyric': syllable['lyric'],\n                                'ctrlPnts' : ctrlPnts\n                            }\n                            syllableList+=[_syllable]\n                        self.EngineSingSyllables(engine, buf, syllableList, totalDuration)\n                        ctrlPnts=[]\n                        syllableList=[]\n                        totalDuration = 0\n                    if aCtrlPnt[1]>0:\n                        buf.moveCursor(fduration)\n                    elif aCtrlPnt[1]<0:\n                        buf.moveCursor(-fduration)\n                    continue\n                freq= refFreq*aCtrlPnt[0]\n                ctrlPnts+=[(freq, fduration)]\n                totalDuration+=fduration\n                beatPos = pos2;\n            if len(ctrlPnts)>0:\n                _syllable = {\n                    'lyric': syllable['lyric'],\n                    'ctrlPnts' : ctrlPnts\n                }\n                syllableList+=[_syllable]\n        if len(syllableList)>0:\n            self.EngineSingSyllables(engine, buf, syllableList, totalDuration)  \n\n\n    def SingSyllablesB(self, engine, buf, syllables, tempo, refFreq):\n        syllableList=[]\n        totalDuration = 0\n\n        for syllable in syllables:\n            ctrlPnts=[]\n            for aCtrlPnt in syllable['ctrlPnts']:\n                fduration=abs(aCtrlPnt[1]*60000)/(tempo*48)\n                if aCtrlPnt[0]<0:\n                    if len(syllableList) or len(ctrlPnts)>0:\n                        if len(ctrlPnts)>0:\n                            _syllable = {\n                                'lyric': syllable['lyric'],\n                                'ctrlPnts' : ctrlPnts\n                            }\n                            syllableList+=[_syllable]\n                        self.EngineSingSyllables(engine, buf, syllableList, totalDuration)\n                        ctrlPnts=[]\n                        syllableList=[]\n                        totalDuration = 0\n                    if aCtrlPnt[1]>0:\n                        buf.moveCursor(fduration)\n                    elif aCtrlPnt[1]<0:\n                        buf.moveCursor(-fduration)\n                    continue\n                freq= refFreq*aCtrlPnt[0]\n                ctrlPnts+=[(freq, fduration)]\n                totalDuration+=fduration\n            if len(ctrlPnts)>0:\n                _syllable = {\n                    'lyric': syllable['lyric'],\n                    'ctrlPnts' : ctrlPnts\n                }\n                syllableList+=[_syllable]\n        if len(syllableList)>0:\n            self.EngineSingSyllables(engine, buf, syllableList, totalDuration)\n\n\n    def SingSequence(self,engine, buf, seq, tempo, refFreq):\n        using_tempo_map= (type(tempo)== list)\n        tempo_map=[]\n        if using_tempo_map:\n            \n            cursor = buf.getCursor()\n            if tempo[0][0] == 0:\n                cursor= tempo[0][1]\n                buf.setCursor(cursor)\n            else:\n                ctrlPnt=(0, cursor)\n                tempo_map+=[ctrlPnt]\n\n            for ctrlPnt in tempo:\n                tempo_map+=[ctrlPnt]\n                \n        beatPos=0\n        for item in seq:\n            if isinstance(item, (list, tuple)):\n                _item = item[0] \n                if type(_item) == str: # singing\n                    totalDuration = 0\n                    syllables=[]\n                    tupleSize=len(item)\n\n                    j=0\n                    while j<tupleSize:\n                        lyric=item[j]\n                        if len(lyric)==0:\n                            lyric=self.default_lyric\n                        j+=1\n                        _item=item[j]\n                        if isinstance(_item, (list, tuple)): # singing note\n                            syllable={'lyric': lyric, 'ctrlPnts':[]}\n                            while j<tupleSize:\n                                _item = item[j]\n                                if not isinstance(_item, (list, tuple)):\n                                    break\n                                numCtrlPnt= (len(_item)+1)//2\n                                for k in range(numCtrlPnt):\n                                    freq_rel=_item[k*2]\n                                    duration= 0\n                                    if k*2+1<len(_item):\n                                        duration=_item[k*2+1]\n                                        totalDuration += duration\n                                    ctrlPnt=(freq_rel,duration)\n                                    syllable['ctrlPnts']+=[ctrlPnt]\n\n                                lastCtrlPnt = syllable['ctrlPnts'][len(syllable['ctrlPnts'])-1]\n                                if lastCtrlPnt[0] > 0 and lastCtrlPnt[1]>0:\n                                    ctrlPnt=(lastCtrlPnt[0], 0)\n                                    syllable['ctrlPnts']+=[ctrlPnt]\n                                j+=1\n                            syllables+=[syllable]\n                        elif isNumber(_item): # singing rap\n                            syllable={'lyric': lyric, 'ctrlPnts':[]}\n                            duration = item[j]\n                            j+=1\n                            freq1 = item[j]\n                            j+=1\n                            freq2 = item[j]\n                            j+=1\n\n                            if freq1 > 0 and freq2>0:\n                                syllable['ctrlPnts']+=[(freq1, duration), (freq2, 0)]\n                            else:\n                                syllable['ctrlPnts']+=[(-1, duration)]\n                            totalDuration += duration\n                            syllables+=[syllable]\n\n                    if len(syllables)>0:\n                        if using_tempo_map:\n                            self.SingSyllablesA(engine,buf, syllables, tempo_map, beatPos, refFreq)\n                        else:\n                            self.SingSyllablesB(engine,buf, syllables, tempo, refFreq)\n                    \n                    beatPos+=totalDuration\n\n                elif isNumber(_item): # note\n                    syllable={'lyric': self.default_lyric, 'ctrlPnts':[(item[0],item[1])]}\n                    if item[0]>0:\n                        syllable['ctrlPnts']+=[(item[0],0)]\n                    if using_tempo_map:\n                        self.SingSyllablesA(engine,buf, [syllable], tempo_map, beatPos, refFreq)\n                    else:\n                        self.SingSyllablesB(engine,buf, [syllable], tempo, refFreq)\n                    beatPos+=item[1]\n            elif type(item)== str:\n                if not self.tune(engine,item):\n                    engine.tune(item)\n\n\nclass Singer:\n    def __init__(self):\n        self.shell=SingerShell()\n    def sing(self, buf, seq, tempo=80, refFreq=261.626):\n        self.shell.SingSequence(self.engine, buf, seq, tempo,refFreq)\n    def tune(self,cmd):\n        if not self.shell.tune(cmd):\n            self.engine.tune(cmd)\n    def setDefaultLyric(self,defaultLyric):\n        self.shell.default_lyric=defaultLyric\n    def setNoteVolume(self,volume):\n        self.shell.volume=volume\n    def setNotePan(self,pan):\n        self.shell.pan=pan\n\n"
  },
  {
    "path": "python/ScoreDraft/SoundFont2.py",
    "content": "import os\nfrom cffi import FFI\n\nffi = FFI()\nffi.cdef(\"\"\"\n// SF2Bank\nvoid* SF2BankCreate(const char* filename);\nvoid SF2BankDestroy(void* ptr);\nunsigned long long SF2BankGetNumberPresets(void* ptr);\nconst char* SF2BankGetPresetName(void* ptr, int i);\nint SF2BankGetPresetBankNum(void* ptr, int i);\nint SF2BankGetPresetNumber(void* ptr, int i);\n\n// SF2Tone\nvoid* SF2ToneCreate(void* ptr_bank, unsigned preset_index);\nvoid SF2ToneDestroy(void* ptr);\n\n// SF2Synth\nvoid SF2SynthNote(void* ptr_wavbuf, void* ptr_tone, float key, float vel, unsigned numSamples, unsigned outputmode, float global_gain_db);\n\"\"\")\n\nif os.name == 'nt':\n    fn_shared_lib = 'SoundFont2.dll'\n    fs_encoding = \"mbcs\"\nelif os.name == \"posix\":\n    fn_shared_lib = 'libSoundFont2.so'\n    fs_encoding = \"utf-8\"\n\npath_shared_lib = os.path.dirname(__file__)+\"/\"+fn_shared_lib\nNative = ffi.dlopen(path_shared_lib)\n\nclass SF2Bank:\n    def __init__(self, filename):\n        self.m_cptr = Native.SF2BankCreate(filename.encode(fs_encoding))\n    \n    def __del__(self):\n        Native.SF2BankDestroy(self.m_cptr)\n        \n    def num_presets(self):\n        return Native.SF2BankGetNumberPresets(self.m_cptr)\n        \n    def get_preset_info(self, i):\n        info = {}\n        info['presetName'] = ffi.string(Native.SF2BankGetPresetName(self.m_cptr, i)).decode('utf-8')\n        info['bank'] = Native.SF2BankGetPresetBankNum(self.m_cptr, i)\n        info['preset'] = Native.SF2BankGetPresetNumber(self.m_cptr, i)\n        return info\n        \nSF2Banks={}\n\ndef GetSF2Bank(filename):\n    if not (filename in SF2Banks):\n        SF2Banks[filename] = SF2Bank(filename)\n    return SF2Banks[filename]\n    \ndef ListPresets(filename):\n    sf2 = GetSF2Bank(filename)\n    num_presets = sf2.num_presets()\n    for i in range(num_presets):\n        preset = sf2.get_preset_info(i)\n        print ('%d : %s bank=%d number=%d' % (i, preset['presetName'], preset['bank'], preset['preset']))\n        \nimport math\nfrom .ScoreDraftCore import F32Buf, WavBuffer\nfrom .Instrument import Instrument\nfrom .Catalog import Catalog\nCatalog['Engines'] += ['SF2Instrument - Instrument']\n        \nclass EngineSoundFont2:\n    def __init__(self, bank, preset_index):\n        self.m_bank = bank\n        self.m_preset_index = preset_index\n        self.m_cptr = Native.SF2ToneCreate(bank.m_cptr, preset_index)\n        self.global_gain_db = 0.0\n        self.vel = 1.0\n    \n    def __del__(self):\n        Native.SF2ToneDestroy(self.m_cptr)\n\n    def isGMDrum(self):\n        preset_info = self.m_bank.get_preset_info(self.m_preset_index)\n        return preset_info['bank'] == 128\n\n    def tune(self, cmd):\n        cmd_split= cmd.split(' ')\n        cmd_len=len(cmd_split)\n        if cmd_len>=1:\n            if cmd_len>1 and cmd_split[0]=='velocity':\n                self.vel = float(cmd_split[1])\n                return True\n        return False\n\n    def generateWave(self, freq, fduration, sampleRate):\n        key = math.log(freq / 261.626)/math.log(2)*12.0+60.0\n        num_samples = int(fduration * sampleRate * 0.001+0.5)\n        wav = F32Buf(0)\n        wav_buf = WavBuffer(sampleRate, 1, wav)  \n        Native.SF2SynthNote(wav_buf.m_cptr, self.m_cptr, key, self.vel, num_samples, 0, self.global_gain_db)        \n        return wav_buf \n\nclass SF2Instrument(Instrument):\n    def __init__(self, fn, preset_index):\n        Instrument.__init__(self)\n        sf2 = GetSF2Bank(fn)\n        self.engine= EngineSoundFont2(sf2, preset_index)\n        \n    def isGMDrum(self):\n        return self.engine.isGMDrum()\n\n\n"
  },
  {
    "path": "python/ScoreDraft/TTEnglishConverter.py",
    "content": "import os\nimport pickle\nScoreDraftPath= os.path.dirname(__file__)\n\nlyricSet=set()\nlyricPrefixSet=set()\nvowelSet={'eI','aI','aU','OI','oU','3','i','I','U','u','E','{','A','V','O','@'}\nvowelPrefixSet=set()\n\natomicSet={'tS','dZ','dr','tr'}\n\ndef BuildLyricSet():\n    with open(ScoreDraftPath+'/UTAUVoice/TetoEng/Teto/oto.ini', 'r') as f:\n        while True:\n            line = f.readline()\n            if not line:\n                break\n            p1 = line.find('=')\n            if p1==-1:\n                continue\n            fn=line[0:p1-4]\n            p2 = line.find(',',p1)\n            if p2==-1:\n                continue\n            lyric=line[p1+1:p2]\n            if lyric=='':\n                lyric=fn\n            lyricSet.add(lyric)\n    with open(ScoreDraftPath+'/TTLyricSet.data','wb') as f:\n        pickle.dump(lyricSet,f)\n\ndef LoadLyricSet():\n    with open(ScoreDraftPath+'/TTLyricSet.data','rb') as f:\n        global lyricSet\n        lyricSet=pickle.load(f)\n\n#BuildLyricSet()\nLoadLyricSet()\n\nfor lyric in lyricSet:\n    for i in range(len(lyric)):\n        if lyric[i]==' ':\n            continue\n        lyricPrefixSet.add(lyric[0:i+1])\n\nfor vowel in vowelSet:\n    for i in range(len(vowel)):\n        vowelPrefixSet.add(vowel[0:i+1])\n\ndef TTEnglishConverter(inList):\n    inList_a=[]\n    for inLyric in inList:\n        lyric_a=[]\n        i=0\n        while i<len(inLyric):\n            atom=''\n            while i<len(inLyric) and (atom=='' or (atom+inLyric[i] in atomicSet)):\n                atom=atom+inLyric[i]\n                i+=1\n            lyric_a+=[atom]\n        inList_a+=[lyric_a]\n\n    inList_a[len(inList_a)-1]+=['-']\n\n    vowelMap=[]\n\n    for inLyric in inList_a:\n        start=-1\n        end=-1\n        for i in range(len(inLyric)):\n            if start==-1:\n                if inLyric[i] in vowelPrefixSet:\n                    start=i\n            if start!=-1 and (''.join(inLyric[start:i+1]) in vowelPrefixSet):\n                end=i+1\n        vowelMap+=[(start,end)]\n\n    cur=[0,0]\n    outList=[]\n\n    prefix='-'\n    iIn=0\n\n    while cur[0]<len(inList_a) and cur[1]<len(inList_a[cur[0]]):    \n        # pass 1 \n        while len(prefix)>0:\n            if prefix=='-' or cur[1]>0 or vowelMap[cur[0]][0]==0:\n                test_seg = prefix + inList_a[cur[0]][cur[1]]\n                if test_seg in lyricPrefixSet:\n                    break\n\n            test_seg = prefix +' '+inList_a[cur[0]][cur[1]]\n            if test_seg in lyricPrefixSet:\n                break\n\n            prefix=prefix[1:len(prefix)]\n\n        #pass2\n        nextStart=cur[:]\n        seg=''\n        isVowel=False\n\n        while True:\n            seg=''\n            lastSeg=prefix[:]\n            cur2=cur[:] \n\n            isVowel=False\n\n            while True:\n                spaceMust=False\n                newChar=''\n                if not (cur2[0]<len(inList_a) and cur2[1]<len(inList_a[cur2[0]])):\n                    newChar='-'\n                else:\n                    newChar= inList_a[cur2[0]][cur2[1]]\n                    if lastSeg!='' and lastSeg!='-' and cur2[1]==0 and vowelMap[cur2[0]][0]>0:\n                        spaceMust=True\n\n                if lastSeg=='' and cur[0]<len(inList_a) and cur[1]>=vowelMap[cur[0]][0] and cur[1]<vowelMap[cur[0]][1]:\n                    lastSeg='-'\n\n                test_seg=lastSeg+newChar\n                if spaceMust or not (test_seg in lyricPrefixSet):\n                    test_seg=lastSeg+' '+newChar\n                    if not (test_seg in lyricPrefixSet):\n                        break\n\n                lastSeg=test_seg\n\n                if test_seg in lyricSet:\n                    cur=cur2[:]\n                    seg=test_seg\n                    if cur[0]<len(inList_a):\n                        if cur[1]>=vowelMap[cur[0]][0] and cur[1]<vowelMap[cur[0]][1]:\n                            isVowel=True\n                            iIn=cur[0]\n\n                if not (cur2[0]<len(inList_a) and cur2[1]<len(inList_a[cur2[0]])):\n                    break\n\n                cur2[1]+=1\n                if cur2[1]>=len(inList_a[cur2[0]]):\n                    cur2[0]+=1\n                    cur2[1]=0   \n                    if seg!='':\n                        break           \n\n\n            if len(seg)>0 or len(prefix)==0:\n                break\n            \n            prefix=prefix[1:len(prefix)]    \n\n        if len(seg)>0:\n            outList+=[(seg, iIn, isVowel)]\n\n        if not (cur[0]<len(inList_a) and cur[1]<len(inList_a[cur[0]])):\n            break\n\n        cur[1]+=1\n        if cur[1]>=len(inList_a[cur[0]]):\n            cur[0]+=1\n            cur[1]=0\n\n        pos=nextStart[:]\n        prefix=''\n        while pos[0]<cur[0] or (pos[0]==cur[0] and pos[1]<cur[1]):\n            prefix+=inList_a[pos[0]][pos[1]]\n            pos[1]+=1\n            if pos[1]>=len(inList_a[pos[0]]):\n                pos[0]+=1\n                pos[1]=0\n\n    ret=[]\n    syllable=()\n    iSyllable=0\n\n    for i in range(len(outList)):\n        outItem=outList[i]\n        if outItem[1]!=iSyllable:\n            ret+=[syllable]\n            syllable=()\n            iSyllable=outItem[1]\n        weight=0.1\n        if outItem[2]:\n            weight=0.4\n        syllable+=(outItem[0], weight, outItem[2])\n\n    ret+=[syllable]\n\n    #print(ret)\n\n    return ret\n"
  },
  {
    "path": "python/ScoreDraft/TsuroVCVConverter.py",
    "content": "def getVowel(CVLyric):\n    vowels= [\"a\",\"e\",\"i\",\"o\",\"u\",\"v\"]\n    min_i=len(CVLyric)\n    for c in vowels:\n        i=CVLyric.find(c)\n        if i>-1 and i<min_i:\n            min_i=i\n    vowel=CVLyric[min_i:len(CVLyric)]\n\n    if CVLyric==\"zhi\" or CVLyric==\"chi\" or CVLyric==\"shi\" or CVLyric==\"ri\":\n        vowel=\"ir\"\n    if CVLyric==\"zi\" or CVLyric==\"ci\" or CVLyric==\"si\":\n        vowel=\"iz\"\n    if CVLyric==\"ju\" or CVLyric==\"qu\" or CVLyric==\"xu\" or CVLyric==\"yu\":\n        vowel=\"v\"\n    if CVLyric==\"ye\":\n        vowel=\"ie\"\n\n    if vowel==\"ia\":\n        vowel=\"a\"\n    if vowel==\"iao\":\n        vowel=\"ao\"\n    if vowel==\"ian\":\n        vowel=\"an\"\n    if vowel==\"iang\":\n        vowel=\"ang\"\n    if vowel==\"iong\":\n        vowel=\"ong\"\n    if vowel==\"iu\":\n        vowel=\"ou\"\n    if vowel==\"ua\":\n        vowel=\"a\"\n    if vowel==\"uai\":\n        vowel=\"ai\"\n    if vowel==\"uan\":\n        vowel=\"an\"\n    if vowel==\"uai\":\n        vowel=\"ai\"\n    if vowel==\"ui\":\n        vowel=\"ei\"\n    if vowel==\"uang\":\n        vowel=\"ang\"\n    if vowel==\"un\":\n        vowel=\"en\"\n    if vowel==\"uo\":\n        vowel=\"o\"\n    return vowel\n\ndef TsuroVCVConverter(LyricForEachSyllable):\n    vowels= [getVowel(lyric) for lyric in  LyricForEachSyllable]\n    ret=[]\n    for i in range(len(LyricForEachSyllable)):\n        v='-'\n        if i>0:\n            v= vowels[i-1]\n        ret+=[(v+' '+LyricForEachSyllable[i], 1.0, True)]\n    return ret\n\n\n"
  },
  {
    "path": "python/ScoreDraft/UTAUUtils.py",
    "content": "from .VoiceSampler import FrqDataPoint,FrqData\nimport struct\nimport os\nimport math\nimport re\n\ndef LoadFrq(filename):\n    with open(filename, 'rb') as f:\n        f.seek(8,0)\n        interval= struct.unpack('i',f.read(4))[0]\n        f.seek(12,0)\n        key = struct.unpack('d', f.read(8))[0]\n        f.seek(36,0)\n        count = struct.unpack('i', f.read(4))[0]\n        f.seek(40,0)\n        data=[]\n        for i in range(count):\n            (freq, dyn) = struct.unpack('dd', f.read(16))\n            data+=[FrqDataPoint(freq,dyn)]\n            \n        frq = FrqData()\n        frq.set(interval, key, data)\n        return frq\n\ndef LoadOtoINIPath(otoMap, path, encoding):\n    otoIniPath=path+'/oto.ini'\n    with open(otoIniPath,'r', encoding=encoding) as f:\n        while True:\n            line = f.readline()\n            if not line:\n                break\n            line=line.strip('\\n')\n\n            p = line.find('=')\n            if p==-1:\n                continue\n            fn=line[0:p]\n\n            p+=1\n\n            # lyric\n            lyric=''\n            p2 = line.find(',',p)\n            if p2==-1:\n                continue\n            if p2>p:\n                lyric=line[p:p2]\n            p=p2+1\n\n            if len(lyric)==0:\n                lyric = fn[0:len(fn)-4]\n\n            # offset\n            offset=0\n            p2 = line.find(',',p)\n            if p2==-1:\n                continue\n            if p2>p:\n                offset=float(line[p:p2])\n            p=p2+1\n\n            # consonant\n            consonant = 0\n            p2 = line.find(',',p)\n            if p2==-1:\n                continue\n            if p2>p:\n                consonant=float(line[p:p2])\n            p=p2+1\n\n            # cutoff\n            cutoff = 0\n            p2 = line.find(',',p)\n            if p2==-1:\n                continue\n            if p2>p:\n                cutoff=float(line[p:p2])\n            p=p2+1\n\n            # preutter\n            preutterance = 0\n            p2 = line.find(',',p)\n            if p2==-1:\n                continue\n            if p2>p:\n                preutterance=float(line[p:p2])\n            p=p2+1\n\n            # overlap\n            overlap = 0\n            if len(line[p:])>0:\n                overlap=float(line[p:])\n\n            properties={\n                'filename': path+'/'+fn,\n                'offset': offset,\n                'consonant': consonant,\n                'cutoff': cutoff,\n                'preutterance': preutterance,\n                'overlap': overlap\n            }\n\n            otoMap[lyric]=properties\n\ndef LoadPrefixMap(filename):\n    prefixMap={}\n    with open(filename,'r') as f:\n        while True:\n            line = f.readline()\n            if not line:\n                break\n            words=re.findall(r\"[^\\s]+\", line)\n            prefix=''\n            if len(words)>1:\n                prefix=words[1]\n            if len(words)>0:\n                prefixMap[words[0]]=prefix\n    return prefixMap\n\ncenterC=440.0 * (2.0** (- 9.0 / 12.0)) # C4\nlowest = centerC * (2.0** (- 3.0)) # C1\nhighest = centerC * (2.0**( 3.0 + 11.0 / 12.0)) #B7\nnameMap= [ 'C', 'C#', 'D', 'D#', 'E', 'F', 'F#', 'G', 'G#', 'A', 'A#', 'B']\n\ndef LookUpPrefixMap(prefixMap, freq):\n    name=''\n    if freq<=lowest:\n        name='C1'\n    elif freq>=highest:\n        name='B7'\n    else:\n        fPitch = math.log(freq / centerC) / math.log(2.0) + 4.0\n        octave = int(fPitch)\n        pitchInOctave = int((fPitch-octave)*12.0)\n        if pitchInOctave==12:\n            pitchInOctave = 0\n            octave+=1\n        name = nameMap[pitchInOctave]+str(octave)\n    if name in prefixMap:\n        return prefixMap[name]\n    else:\n        return ''\n\nclass VoiceBank:\n    def __init__ (self, path):\n        self.path=path\n        self.otoMap={}\n        self.prefixMap={}\n        self.encoding='shift-jis'\n        if os.name == 'nt':\n            self.fsEncoding = 'mbcs'\n        else:\n            self.fsEncoding = 'gbk'\n        self.wavFileNameTranscode=True\n        self.frqFileNameTranscode=True\n        self.initialized=False\n\n    def buildOtoMap(self,path):\n        for item in os.walk(path):\n            if os.path.isfile(item[0]+'/oto.ini'):\n                LoadOtoINIPath(self.otoMap, item[0], self.encoding)\n\n    def initialize(self):\n        self.buildOtoMap(self.path)\n        if os.path.isfile(self.path+'/prefix.map'):\n            self.prefixMap=LoadPrefixMap(self.path+'/prefix.map')\n        self.initialized=True\n\n    def getWavFrq(self,lyric):\n        if not (lyric in self.otoMap):\n            print(\"missed lyic: \"+ lyric)\n            return None\n        wav=self.otoMap[lyric].copy()\n        wavFileName=wav['filename']\n        if self.wavFileNameTranscode:\n            wav['filename']=wavFileName.encode(self.encoding).decode(self.fsEncoding)\n        frqFileName=wavFileName[0:len(wavFileName)-4]+'_wav.frq'\n        if self.frqFileNameTranscode:\n            frqFileName=frqFileName.encode(self.encoding).decode(self.fsEncoding)\n        frq=LoadFrq(frqFileName)\n        return (wav,frq)\n\n    def getWavFrq_PrefixMap(self,lyric, freq):\n        if len(self.prefixMap)>0:\n            lyric+=LookUpPrefixMap(self.prefixMap, freq)\n        return self.getWavFrq(lyric)\n\n"
  },
  {
    "path": "python/ScoreDraft/UtauDraft.py",
    "content": "import wave\nfrom .ScoreDraftCore import F32Buf\nfrom .UTAUUtils import VoiceBank\nfrom .Singer import Singer\nfrom .Catalog import Catalog\nCatalog['Engines'] += ['UtauDraft - Singing']\n\n# VoiceSampler\nnotVowel = 0\npreVowel = 1\nisVowel = 2\nfrom .VoiceSampler import GenerateSentence\nfrom .VoiceSampler import GenerateSentenceCUDA\n\nVoiceBanks={}\n\ndef loadWav(file):\n    wavS16=bytes()\n    with wave.open(file, mode='rb') as wavFile:\n        wavS16=wavFile.readframes(wavFile.getnframes())\n    return F32Buf.from_s16(wavS16)\n    \ndef GetVoiceBank(path):\n    if not (path in VoiceBanks):\n        VoiceBanks[path ]= VoiceBank(path)\n    return VoiceBanks[path]\n    \ndef _PieceMapper(syllableLyricList, lyricList, otoList, CZMode=False):\n    transition = 0.1\n\n    result= {\n        'maps': [], \n        'piece_map': []\n    }\n    maps= result['maps']\n    map1=[(otoList[0][1], otoList[0][1]- otoList[0][2], notVowel)]\n    maps+=[map1]\n    map0 = map1\n    map1 = []\n\n    piece_map = result['piece_map']\n    piece_map += [(0,0)]\n\n    cursor=0\n    for i in range(len(lyricList)):\n        piece = lyricList[i]\n        piece_oto = otoList[i]\n        piece_oto_next = None\n        if i<len(lyricList)-1:\n            piece_oto_next =  otoList[i+1]\n\n        piece_isVowel = piece['isVowel']\n        piece_duration = piece['weight']*syllableLyricList[piece['syllableId']]['duration']\n\n        if (not CZMode) or piece_isVowel:\n            srcTotalLen= piece_oto[4] -  piece_oto[2];\n            if piece_oto_next != None:\n                srcTotalLen += piece_oto_next[2] - piece_oto_next[1]\n\n            srcVowelLen=0\n            srcFixedLen = srcTotalLen\n\n            if piece_isVowel:\n                srcVowelLen = piece_oto[4] -  piece_oto[3]\n                srcFixedLen -= srcVowelLen\n\n            vowelScale=1.0\n            fixedScale=1.0\n\n            if srcVowelLen>0 and srcTotalLen<piece_duration:\n                vowelScale = (piece_duration-srcFixedLen)/srcVowelLen\n            else:\n                fixedScale = piece_duration/srcTotalLen\n                vowelScale = fixedScale\n\n            curLen = fixedScale * (piece_oto[3] -  piece_oto[2]) + vowelScale * (piece_oto[4] -  piece_oto[3])\n            if piece_oto_next != None:\n                piece_map += [(i, cursor+curLen*(1.0-transition)), (i+1, cursor+curLen)]\n            else:\n                piece_map += [(i, cursor+curLen)]\n\n\n            seg_isVowel = preVowel\n            if not piece_isVowel:\n                seg_isVowel = notVowel\n            map0+=[(piece_oto[2], cursor, seg_isVowel)]\n\n            cursor += fixedScale * (piece_oto[3] -  piece_oto[2])\n            seg_isVowel = isVowel\n            if not piece_isVowel:\n                seg_isVowel  = notVowel\n            map0+=[(piece_oto[3], cursor, seg_isVowel)]\n\n            cursor += vowelScale * (piece_oto[4] -  piece_oto[3])\n            map0+=[(piece_oto[4], cursor)]\n\n            if piece_oto_next != None:\n                map1+=[(piece_oto_next[0], cursor +  vowelScale *(piece_oto_next[0]-piece_oto_next[1]), seg_isVowel)]\n                map1+=[(piece_oto_next[1], cursor, notVowel)]\n                cursor += fixedScale * (piece_oto_next[2] - piece_oto_next[1])\n                maps+=[map1]\n\n        else:  # CZ Mode\n            srcTotalLen = 80.0\n            srcCurLen = 80.0\n            if piece_oto_next != None:\n                srcTotalLen = piece_oto_next[2] - piece_oto_next[0]\n                srcCurLen = piece_oto_next[1] - piece_oto_next[0]\n            scale =  piece_duration/srcTotalLen\n            curLen = piece_duration\n            if piece_oto_next != None:\n                curLen = scale*srcCurLen\n                piece_map += [(i, cursor+curLen*(1.0-transition)), (i+1, cursor+curLen)]\n            else:\n                piece_map += [(i, cursor+curLen)]\n\n            map0+=[(piece_oto[2], cursor, notVowel)]\n            cursor += curLen\n            map0+=[(piece_oto[2] + srcCurLen, cursor)]\n\n            if piece_oto_next != None:\n                map1+=[(piece_oto_next[0], cursor +  scale *(piece_oto_next[0]-piece_oto_next[1]), notVowel)]\n                map1+=[(piece_oto_next[1], cursor, notVowel)]\n                cursor += scale * (piece_oto_next[2] - piece_oto_next[1])\n                maps+=[map1]\n\n        map0 = map1\n        map1 = []\n\n    return result\n\ndef DefaultPieceMapper(syllableLyricList, lyricList, otoList):\n    return _PieceMapper(syllableLyricList, lyricList, otoList, False)\n\ndef CZPieceMapper(syllableLyricList, lyricList, otoList):\n    return _PieceMapper(syllableLyricList, lyricList, otoList, True)\n    \nclass Engine:\n    def __init__(self, voiceBank):\n        if type(voiceBank)==str:\n            voiceBank=GetVoiceBank(voiceBank)\n        if not voiceBank.initialized:\n            voiceBank.initialize()\n        self.voiceBank=voiceBank\n        self.lyricConverter=None\n        self.usePrefixMap = True\n        self.pieceMapper = DefaultPieceMapper\n        self.useCUDA = True\n\n    def tune(self, cmd):\n        cmd_split= cmd.split(' ')\n        cmd_len=len(cmd_split)\n        if cmd_len>=1:\n            if cmd_len>1 and cmd_split[0]=='prefix_map':\n                if cmd_split[1]=='on':\n                    self.usePrefixMap = True\n                    return True\n                elif cmd_split[1]=='off':\n                    self.usePrefixMap = False\n                    return True\n        return False\n\n    def _convertLyric(self, syllableList):\n        convertedList = self.lyricConverter([syllable['lyric'] for syllable in syllableList])\n        lyricList=[]\n        for i in range(len(convertedList)):\n            convertedSyllable= convertedList[i]\n            sumWeight=0\n            for j in range(len(convertedSyllable)//3):\n                sumWeight += convertedSyllable[j*3+1]\n\n            for j in range(len(convertedSyllable)//3):\n                piece={\n                    'lyric': convertedSyllable[j*3],\n                    'weight': convertedSyllable[j*3+1]/sumWeight,\n                    'isVowel': convertedSyllable[j*3+2],\n                    'syllableId': i\n                }\n                lyricList+=[piece]\n        return lyricList\n\n    def generateWave(self, syllableList, sampleRate):\n        # print(syllableList)\n        syllableLyricList=[]\n        totalDuration=0\n        for syllable in syllableList:\n            aveFreq=0\n            duration=0\n            for j in range(len(syllable['ctrlPnts'])):\n                ctrlPnt=syllable['ctrlPnts'][j]\n                if ctrlPnt[1] <=0:\n                    continue\n                freq1 = ctrlPnt[0]\n                freq2 = freq1\n                if j < len(syllable['ctrlPnts']) -1:\n                    freq2 = syllable['ctrlPnts'][j+1][0]\n                aveFreq +=(freq1 + freq2) * ctrlPnt[1]\n                duration+=ctrlPnt[1]\n            aveFreq *= 1.0/duration*0.5;\n            syllablePiece={\n                'lyric': syllable['lyric'],\n                'duration' : duration,\n                'aveFreq': aveFreq\n            }\n            syllableLyricList+=[syllablePiece]\n            totalDuration+=duration\n\n        lyricList=[]\n        if self.lyricConverter == None:\n            for i in range(len(syllableLyricList)):\n                syllablePiece=syllableLyricList[i]\n                piece={\n                    'lyric': syllablePiece['lyric'],\n                    'weight': 1.0,\n                    'isVowel': True,\n                    'syllableId': i\n                }\n                lyricList+=[piece]\n        else:\n            lyricList=self._convertLyric(syllableLyricList)\n\n        srcList = []\n        otoList = []\n        for piece in lyricList:\n            wavFrq= self.voiceBank.getWavFrq_PrefixMap(piece['lyric'], syllableLyricList[piece['syllableId']]['aveFreq'])\n            wavFileName=wavFrq[0]['filename']\n            wav = loadWav(wavFileName)\n            srcList += [\n                {\n                    'wav': wav,\n                    'frq': wavFrq[1]\n                }\n            ]\n            start = wavFrq[0]['offset']\n            overlap  = start + wavFrq[0]['overlap']\n            preutterance = start + wavFrq[0]['preutterance']\n            consonant = start + wavFrq[0]['consonant']\n            oto_cutoff= wavFrq[0]['cutoff']\n            end = 0\n            if oto_cutoff >=0:\n                end = wav.size()/44.1 - oto_cutoff\n            else:\n                end = start - oto_cutoff\n            otoList += [(start, overlap, preutterance, consonant, end)]\n\n        piece_map = self.pieceMapper(syllableLyricList, lyricList, otoList)\n\n        sentence= {\n            'pieces': [],\n            'piece_map': [],\n            'freq_map': [],\n            'volume_map': []\n        }\n\n        for i in range(len(lyricList)):\n            sentence['pieces']+=[\n                {\n                    'src': srcList[i],\n                    'map': piece_map['maps'][i]\n                }\n            ]\n        sentence['piece_map'] = piece_map['piece_map']\n        freq_map= sentence['freq_map']\n        cursor=0\n        for syllable in syllableList:\n            for ctrlPnt in syllable['ctrlPnts']:\n                freq_map+=[(ctrlPnt[0], cursor)]\n                cursor+=ctrlPnt[1]\n        volume_map = sentence['volume_map']\n        volume_map += [(1.0, 0)]\n        last_duration = syllableLyricList[len(syllableLyricList)-1]['duration']\n        volume_map += [(1.0, totalDuration-last_duration*0.1)]\n        volume_map += [(0.0, totalDuration)]\n\n        if self.useCUDA:\n            return GenerateSentenceCUDA(sentence)\n        else:\n            return GenerateSentence(sentence)\n\nclass UtauDraft(Singer):\n    def __init__(self, voiceBank, useCUDA=True):\n        Singer.__init__(self)\n        self.engine=Engine(voiceBank)\n        self.engine.useCUDA=useCUDA\n    def setLyricConverter(self, lyricConverter):\n        self.engine.lyricConverter=lyricConverter\n    def setPieceMapper(self, pieceMapper):\n        self.engine.pieceMapper=pieceMapper\n    def setUsePrefixMap(self,usePrefixMap):\n        self.engine.usePrefixMap=usePrefixMap\n    def setCZMode(self):\n        self.engine.pieceMapper= CZPieceMapper\n\n\n"
  },
  {
    "path": "python/ScoreDraft/VCCVEnglishConverter.py",
    "content": "import os\nimport pickle\nScoreDraftPath= os.path.dirname(__file__)\n\nlyricSet=set()\nlyricPrefixSet=set()\nvowelSet={'a','e','i','o','u','E','9','3','@','A','I','O','8','Q','6','x','&','1','0'}\nvowelPrefixSet=set()\n\natomicSet={'ch','dh','sh','th','zh','ng','Ang','dr','tr'}\n\ndef BuildLyricSet():\n    with open(ScoreDraftPath+'/UTAUVoice/Yami/D4/oto.ini', 'r') as f:\n        while True:\n            line = f.readline()\n            if not line:\n                break\n            p1 = line.find('=')\n            if p1==-1:\n                continue\n            fn=line[0:p1-4]\n            p2 = line.find(',',p1)\n            if p2==-1:\n                continue\n            lyric=line[p1+1:p2]\n            if lyric=='':\n                lyric=fn\n            lyricSet.add(lyric)\n    with open(ScoreDraftPath+'/VCCVLyricSet.data','wb') as f:\n        pickle.dump(lyricSet,f)\n\ndef LoadLyricSet():\n    with open(ScoreDraftPath+'/VCCVLyricSet.data','rb') as f:\n        global lyricSet\n        lyricSet=pickle.load(f)\n\n#BuildLyricSet()\nLoadLyricSet()\n\nfor lyric in lyricSet:\n    for i in range(len(lyric)):\n        if lyric[i]==' ':\n            continue\n        lyricPrefixSet.add(lyric[0:i+1])\n\nfor vowel in vowelSet:\n    for i in range(len(vowel)):\n        vowelPrefixSet.add(vowel[0:i+1])\n\ndef VCCVEnglishConverter(inList):\n    inList_a=[]\n    for inLyric in inList:\n        lyric_a=[]\n        i=0\n        while i<len(inLyric):\n            atom=''\n            while i<len(inLyric) and (atom=='' or (atom+inLyric[i] in atomicSet)):\n                atom=atom+inLyric[i]\n                i+=1\n            lyric_a+=[atom]\n        inList_a+=[lyric_a]\n\n    inList_a[len(inList_a)-1]+=['-']\n\n    vowelMap=[]\n\n    for inLyric in inList_a:\n        start=-1\n        end=-1\n        for i in range(len(inLyric)):\n            if start==-1:\n                if inLyric[i] in vowelPrefixSet:\n                    start=i\n            if start!=-1 and (''.join(inLyric[start:i+1]) in vowelPrefixSet):\n                end=i+1\n        vowelMap+=[(start,end)]\n\n    cur=[0,0]\n    outList=[]\n\n    prefix='-'\n    iIn=0\n\n    while cur[0]<len(inList_a) and cur[1]<len(inList_a[cur[0]]):    \n        # pass 1 \n        while len(prefix)>0:\n            if prefix=='-' or cur[1]>0 or vowelMap[cur[0]][0]==0:\n                test_seg = prefix + inList_a[cur[0]][cur[1]]\n                if test_seg in lyricPrefixSet:\n                    break\n\n            test_seg = prefix +' '+inList_a[cur[0]][cur[1]]\n            if test_seg in lyricPrefixSet:\n                break\n\n            prefix=prefix[1:len(prefix)]\n\n        #pass2\n        nextStart=cur[:]\n        seg=''\n        isVowel=False\n\n        while True:\n            seg=''\n            lastSeg=prefix[:]\n            cur2=cur[:] \n\n            isVowel=False\n\n            while True:\n                spaceMust=False\n                newChar=''\n                if not (cur2[0]<len(inList_a) and cur2[1]<len(inList_a[cur2[0]])):\n                    newChar='-'\n                else:\n                    newChar= inList_a[cur2[0]][cur2[1]]\n                    if lastSeg!='' and lastSeg!='-' and cur2[1]==0 and vowelMap[cur2[0]][0]>0:\n                        spaceMust=True\n\n                if lastSeg=='' and cur[0]<len(inList_a) and cur[1]>=vowelMap[cur[0]][0] and cur[1]<vowelMap[cur[0]][1]:\n                    lastSeg='-'\n\n                test_seg=lastSeg+newChar\n                if spaceMust or not (test_seg in lyricPrefixSet):\n                    test_seg=lastSeg+' '+newChar\n                    if not (test_seg in lyricPrefixSet):\n                        break\n\n                lastSeg=test_seg\n\n                if test_seg in lyricSet:\n                    cur=cur2[:]\n                    seg=test_seg\n                    if cur[0]<len(inList_a):\n                        if cur[1]>=vowelMap[cur[0]][0] and cur[1]<vowelMap[cur[0]][1]:\n                            isVowel=True\n                            iIn=cur[0]\n\n                if not (cur2[0]<len(inList_a) and cur2[1]<len(inList_a[cur2[0]])):\n                    break\n\n                cur2[1]+=1\n                if cur2[1]>=len(inList_a[cur2[0]]):\n                    cur2[0]+=1\n                    cur2[1]=0   \n                    if seg!='':\n                        break           \n\n\n            if len(seg)>0 or len(prefix)==0:\n                break\n            \n            prefix=prefix[1:len(prefix)]    \n\n        if len(seg)>0:\n            outList+=[(seg, iIn, isVowel)]\n\n        if not (cur[0]<len(inList_a) and cur[1]<len(inList_a[cur[0]])):\n            break\n\n        cur[1]+=1\n        if cur[1]>=len(inList_a[cur[0]]):\n            cur[0]+=1\n            cur[1]=0\n\n        pos=nextStart[:]\n        prefix=''\n        while pos[0]<cur[0] or (pos[0]==cur[0] and pos[1]<cur[1]):\n            prefix+=inList_a[pos[0]][pos[1]]\n            pos[1]+=1\n            if pos[1]>=len(inList_a[pos[0]]):\n                pos[0]+=1\n                pos[1]=0\n\n    ret=[]\n    syllable=()\n    iSyllable=0\n\n    for i in range(len(outList)):\n        outItem=outList[i]\n        if outItem[1]!=iSyllable:\n            ret+=[syllable]\n            syllable=()\n            iSyllable=outItem[1]\n        weight=0.1\n        if outItem[2]:\n            weight=0.4\n        syllable+=(outItem[0], weight, outItem[2])\n\n    ret+=[syllable]\n\n    #print(ret)\n\n    return ret\n"
  },
  {
    "path": "python/ScoreDraft/VoiceSampler.py",
    "content": "import os\nfrom cffi import FFI\n\nffi = FFI()\nffi.cdef(\"\"\"\nunsigned HaveCUDA();\nvoid* FrqDataPointCreate(double freq, double dyn);\nvoid FrqDataPointDestroy(void* ptr);\nvoid* FrqDataCreate();\nvoid FrqDataDestroy(void* ptr);\nvoid FrqDataSet(void* ptr, int interval, double key, void* ptr_data_points);\nvoid FrqDataDetect(void* ptr, void* ptr_f32_buf, int interval);\nvoid* SourceMapCtrlPntCreate(float srcPos, float dstPos, int isVowel);\nvoid SourceMapCtrlPntDestroy(void* ptr);\nvoid* PieceCreate(void* ptr_f32buf, void* ptr_frq_data, void* ptr_src_map);\nvoid PieceDestroy(void* ptr);\nvoid* GeneralCtrlPntCreate(float value, float dstPos);\nvoid GeneralCtrlPntDestroy(void* ptr);\nvoid* SentenceDescriptorCreate(void* ptr_pieces, void* ptr_piece_map, void* ptr_freq_map, void* ptr_volume_map);\nvoid SentenceDescriptorDestroy(void* ptr);\nvoid GenerateSentence(void* ptr_wavbuf, void* ptr_sentence);\nvoid GenerateSentenceCUDA(void* ptr_wavbuf, void* ptr_sentence);\n\"\"\")\n\nif os.name == 'nt':\n    fn_shared_lib = 'VoiceSampler.dll'\nelif os.name == \"posix\":\n    fn_shared_lib = 'libVoiceSampler.so'\n\npath_shared_lib = os.path.dirname(__file__)+\"/\"+fn_shared_lib\nNative = ffi.dlopen(path_shared_lib)\n\nfrom .ScoreDraftCore import ObjArray, F32Buf, WavBuffer\n\ndef HaveCUDA():\n    return Native.HaveCUDA() != 0\n    \nclass FrqDataPoint:\n    def __init__(self, freq, dyn):\n        self.m_cptr = Native.FrqDataPointCreate(freq, dyn)\n        \n    def __del__(self):\n        Native.FrqDataPointDestroy(self.m_cptr)\n        \nclass FrqData:\n    def __init__(self):\n        self.m_cptr = Native.FrqDataCreate()\n        \n    def __del__(self):\n        Native.FrqDataDestroy(self.m_cptr)\n        \n    def set(self, interval, key, lst_data_points):\n        obj_arr = ObjArray(lst_data_points)\n        Native.FrqDataSet(self.m_cptr, interval, key, obj_arr.m_cptr)\n        \n    def detect(self, f32_buf, interval):\n        Native.FrqDataDetect(self.m_cptr, f32_buf.m_cptr, interval)\n\nclass SourceMapCtrlPnt:\n    def __init__(self, srcPos, dstPos, isVowel):\n        self.m_cptr = Native.SourceMapCtrlPntCreate(srcPos, dstPos, isVowel)\n        \n    def __del__(self):\n        Native.SourceMapCtrlPntDestroy(self.m_cptr)\n        \nclass Piece:\n    def __init__(self, f32buf, frq_data, src_map):\n        self.m_buf = f32buf\n        obj_arr = ObjArray(src_map)\n        self.m_cptr = Native.PieceCreate(f32buf.m_cptr, frq_data.m_cptr, obj_arr.m_cptr)\n    \n    def __del__(self):\n        Native.PieceDestroy(self.m_cptr)\n        \nclass GeneralCtrlPnt:\n    def __init__(self, value, dstPos):\n        self.m_cptr = Native.GeneralCtrlPntCreate(value, dstPos)\n        \n    def __del__(self):\n        Native.GeneralCtrlPntDestroy(self.m_cptr)\n        \nclass SentenceDescriptor:\n    def __init__(self, pieces, piece_map, freq_map, volume_map):\n        self.m_pieces = pieces\n        obj_pieces = ObjArray(pieces)\n        obj_piece_map = ObjArray(piece_map)\n        obj_freq_map = ObjArray(freq_map)\n        obj_volume_map = ObjArray(volume_map)\n        self.m_cptr = Native.SentenceDescriptorCreate(obj_pieces.m_cptr, obj_piece_map.m_cptr, obj_freq_map.m_cptr, obj_volume_map.m_cptr)\n    \n    def __del__(self):\n        Native.SentenceDescriptorDestroy(self.m_cptr)\n        \ndef CreateSentenceDescriptor(desc_dictionary):\n    lst_pieces = desc_dictionary[\"pieces\"]\n    pieces = []\n    for obj_piece in lst_pieces:\n        obj_src = obj_piece[\"src\"]\n        wav = obj_src[\"wav\"]\n        frq_data = obj_src[\"frq\"]\n        \n        lst_map = obj_piece[\"map\"]\n        src_map = []\n        num_ctrlpnts = len(lst_map)\n        for j in range(num_ctrlpnts):\n            tuple_ctrlpnt = lst_map[j]\n            src_pos = tuple_ctrlpnt[0]\n            dst_pos = tuple_ctrlpnt[1]\n            if j < num_ctrlpnts - 1:\n                isVowel = tuple_ctrlpnt[2]\n            else:\n                isVowel = 0\n            src_map += [SourceMapCtrlPnt(src_pos, dst_pos, isVowel)]\n            \n        pieces += [Piece(wav, frq_data, src_map)]\n        \n    lst_piece_map = desc_dictionary[\"piece_map\"]\n    piece_map = [GeneralCtrlPnt(tuple_ctrlpnt[0], tuple_ctrlpnt[1]) for tuple_ctrlpnt in lst_piece_map]\n    \n    lst_freq_map = desc_dictionary[\"freq_map\"]\n    freq_map = [GeneralCtrlPnt(tuple_ctrlpnt[0], tuple_ctrlpnt[1]) for tuple_ctrlpnt in lst_freq_map]\n    \n    lst_volume_map = desc_dictionary[\"volume_map\"]\n    volume_map = [GeneralCtrlPnt(tuple_ctrlpnt[0], tuple_ctrlpnt[1]) for tuple_ctrlpnt in lst_volume_map]\n    \n    return SentenceDescriptor(pieces, piece_map, freq_map, volume_map)    \n    \ndef GenerateSentence(desc_dictionary):\n    sentence_desc = CreateSentenceDescriptor(desc_dictionary)\n    wav = F32Buf(0)\n    wav_buf = WavBuffer(44100.0, 1, wav)       \n    Native.GenerateSentence(wav_buf.m_cptr, sentence_desc.m_cptr)\n    return wav_buf\n    \ndef GenerateSentenceCUDA(desc_dictionary):\n    sentence_desc = CreateSentenceDescriptor(desc_dictionary)\n    wav = F32Buf(0)\n    wav_buf = WavBuffer(44100.0, 1, wav)       \n    Native.GenerateSentenceCUDA(wav_buf.m_cptr, sentence_desc.m_cptr)\n    return wav_buf\n\n"
  },
  {
    "path": "python/ScoreDraft/XiaYYConverter.py",
    "content": "def getCV(CVLyric):\n    vowels= [\"a\",\"e\",\"i\",\"o\",\"u\",\"v\"]\n    min_i=len(CVLyric)\n    for c in vowels:\n        i=CVLyric.find(c)\n        if i>-1 and i<min_i:\n            min_i=i\n\n    consonant= CVLyric[0:min_i]\n    vowel=CVLyric[min_i:len(CVLyric)]\n\n    if CVLyric==\"zhi\" or CVLyric==\"chi\" or CVLyric==\"shi\" or CVLyric==\"ri\":\n        vowel=\"h-i\"\n    if CVLyric==\"zi\" or CVLyric==\"ci\" or CVLyric==\"si\":\n        vowel=\"-i\"\n    if CVLyric==\"ju\" or CVLyric==\"qu\" or CVLyric==\"xu\" or CVLyric==\"yu\":\n        vowel=\"v\"\n    if CVLyric==\"ye\":\n        vowel=\"eh\"\n    if CVLyric==\"lv\":\n        CVLyric=\"lyu\"\n    if CVLyric==\"nv\":\n        CVLyric=\"nyu\"\n\n    if vowel==\"ia\":\n        vowel=\"ya\"\n    if vowel==\"iao\":\n        vowel=\"yao\"\n    if vowel==\"ian\":\n        vowel=\"yan\"\n    if vowel==\"iang\":\n        vowel=\"yang\"\n    if vowel==\"ie\":\n        vowel=\"eh\"\n    if vowel==\"in\":\n        vowel=\"en\"\n    if vowel==\"ing\":\n        vowel=\"eng\"\n    if vowel==\"ong\":\n        vowel=\"weng\"\n    if vowel==\"iong\":\n        vowel=\"weng\"\n    if vowel==\"iu\":\n        vowel=\"you\"\n    if vowel==\"ua\":\n        vowel=\"wa\"\n    if vowel==\"uai\":\n        vowel=\"wai\"\n    if vowel==\"uan\":\n        vowel=\"wan\"\n    if vowel==\"uai\":\n        vowel=\"wai\"\n    if vowel==\"ui\":\n        vowel=\"wei\"\n    if vowel==\"uang\":\n        vowel=\"wang\"\n    if vowel==\"un\":\n        vowel=\"wen\"\n    if vowel==\"uo\":\n        vowel=\"wo\"\n    if (vowel==\"ue\"):\n        vowel=\"ueh\"\n\n    if vowel==\"i\":\n        vowel=\"y\"\n    if vowel==\"u\":\n        vowel=\"w\"\n    if vowel==\"v\":\n        vowel=\"yu\"\n\n    if consonant==\"\":\n        if vowel==\"a\" or vowel==\"ai\" or vowel==\"an\":\n            consonant=\"a\"\n        if vowel==\"er\" or vowel==\"ao\" or vowel==\"ang\":\n            consonant=\"ah\"\n        if vowel==\"en\" or vowel==\"eng\":\n            consonant=\"en\"\n        if vowel==\"u\":\n            consonant=\"w\"\n        if vowel==\"y\":\n            consonant=\"y\"\n        if vowel=='yu':\n            consonant=\"yu\"\n\n    return (consonant,vowel, CVLyric)\n\n# v1\ndef XiaYYConverter(LyricForEachSyllable):   \n    CV = [getCV(lyric) for lyric in  LyricForEachSyllable]\n    ret=[]\n    for i in range(len(LyricForEachSyllable)):\n        lyric=CV[i][2]\n        if i==0:\n            lyric='- '+lyric\n        elif CV[i][0]=='':\n            lyric=CV[i-1][1]+\" \"+lyric\n        else:\n            lyric+='*'\n\n        if i<len(LyricForEachSyllable)-1 and CV[i+1][0]!='':\n            if (CV[i][1]==CV[i+1][0]):\n                ret+=[(lyric,1.0,True)]\n            else:\n                ret+=[(lyric,0.75,True, CV[i][1]+\" \"+CV[i+1][0], 0.25,False)]\n\n        else:\n            if CV[i][1]=='ai' or CV[i][1]=='ei' or CV[i][1]=='wai' or CV[i][1]=='wei':\n                ret+=[(lyric,0.875, True, CV[i][1]+\" y\", 0.125, False)]\n            elif CV[i][1]=='ou' or CV[i][1]=='you':\n                ret+=[(lyric,0.875, True, CV[i][1]+\" w\", 0.125, False)]\n            else:\n                ret+=[(lyric,1.0,True)]\n    return ret\n\n"
  },
  {
    "path": "python/ScoreDraft/YAMLDocument.py",
    "content": "from xsdata.formats.dataclass.parsers import XmlParser\nimport ly.musicxml\nimport yaml\n\nfrom .MusicXMLDocument import MusicXMLDocument\nfrom .Initializers import *\n\nclass YAMLScore:\n    def __init__(self, str_yaml):\n        self.score = yaml.safe_load(str_yaml)['score']\n        \n    def to_ly(self):       \n        tempo = 120\n        if 'tempo' in self.score:\n            tempo = int(self.score['tempo'])\n            \n        title = \"\"\n        if 'title' in self.score:\n            title = self.score['title']\n            \n        composer = \"\"\n        if 'composer' in self.score:\n            composer = self.score['composer']\n            \n        ly_text='\\\\version \"2.18.2\"\\n'\n        \n        if title!=\"\" or composer!=\"\":\n            ly_text+='\\\\header\\n'\n            ly_text+='{\\n'\n            if title!=\"\":\n                ly_text += '\\ttitle = \"' + title + '\"\\n'\n            if composer!=\"\":\n                ly_text += '\\tcomposer = \"' + composer + '\"\\n'\n            ly_text+='}\\n'\n            \n        ly_text+='\\\\score\\n'\n        ly_text+='{\\n'\n           \n        ly_text+='\\t<<\\n'\n    \n        if 'staffs' in self.score:\n            staffs = self.score['staffs']\n            for staff in staffs:\n                is_drum = False\n                if 'is_drum' in staff:\n                    is_drum = staff['is_drum']\n                content = staff['content']\n                lines = content.splitlines()\n                if is_drum:\n                    ly_text+='\\t\\t\\\\drums\\n'\n                else:\n                    relative = \"\"\n                    if 'relative' in staff:\n                        relative = ' \\\\relative '+staff['relative']\n                    ly_text+='\\t\\t\\\\new Staff' + relative +'\\n'\n                ly_text+='\\t\\t{\\n'\n                for line in lines:\n                    ly_text+='\\t\\t\\t'+line+'\\n'\n                ly_text+='\\t\\t}\\n'\n                \n        ly_text+='\\t>>\\n'\n        ly_text+='\\t\\\\layout {}\\n'\n        ly_text+='\\t\\\\midi\\n'\n        ly_text+='\\t{\\n'\n        ly_text+='\\t\\t\\\\tempo 4 = '+ str(tempo) +'\\n'\n        ly_text+='\\t}\\n'\n        ly_text+='}\\n'\n        return ly_text\n        \nGM_Drum_Map = [\n    (\"acousticbassdrum\", \"b,,\"),\n    (\"acousticsnare\", \"d,\"),\n    (\"electricsnare\", \"e,\"),\n    (\"halfopenhihat\", \"bes,\"),\n    (\"chinesecymbal\", \"e\"),\n    (\"highfloortom\", \"g,\"),  \n    (\"crashcymbala\", \"cis\"),\n    (\"crashcymbalb\", \"a\"),\n    (\"splashcymbal\", \"g\"),\n    (\"shortwhistle\", \"b'\"),\n    (\"opentriangle\", \"a''\"),\n    (\"mutetriangle\", \"aes''\"),\n    (\"lowfloortom\", \"f,\"),\n    (\"closedhihat\", \"fis,\"),\n    (\"openhighhat\", \"bes,\"),\n    (\"crashcymbal\", \"cis\"),\n    (\"ridecymbala\", \"ees\"),\n    (\"ridecymbalb\", \"b\"), \n    (\"openhibongo\", \"c'\"),\n    (\"mutehibongo\", \"c'\"),\n    (\"openlobongo\", \"cis'\"),\n    (\"mutelobongo\", \"cis'\"),\n    (\"openhiconga\", \"ees'\"),\n    (\"mutehiconga\", \"d'\"),\n    (\"openloconga\", \"e'\"), \n    (\"muteloconga\", \"e'\"),\n    (\"hisidestick\", \"cis,\"),\n    (\"losidestick\", \"cis,\"),\n    (\"longwhistle\", \"c''\"),\n    (\"hiwoodblock\", \"e''\"),\n    (\"lowoodblock\", \"f''\"),\n    (\"pedalhihat\", \"aes,\"),\n    (\"ridecymbal\", \"ees\"),  \n    (\"shortguiro\", \"cis''\"),\n    (\"tambourine\", \"fis\"),\n    (\"lowmidtom\", \"b,\"),      \n    (\"hitimbale\", \"f'\"),\n    (\"lotimbale\", \"fis'\"),\n    (\"sidestick\", \"cis,\"),    \n    (\"longguiro\", \"d''\"),\n    (\"vibraslap\", \"bes\"),\n    (\"opencuica\", \"g''\"),\n    (\"mutecuica\", \"fis''\"),\n    (\"himidtom\", \"c\"),\n    (\"bassdrum\", \"c,\"),\n    (\"ridebell\", \"f\"),\n    (\"handclap\", \"ees,\"),\n    (\"triangle\", \"a''\"),\n    (\"highhat\", \"aes,\"),\n    (\"hightom\", \"d\"),\n    (\"lowtom\", \"a,\"),\n    (\"cowbell\", \"aes\"),\n    (\"hibongo\", \"c'\"),\n    (\"lobongo\", \"cis'\"),\n    (\"hiconga\", \"ees'\"),\n    (\"loconga\", \"e'\"),\n    (\"hiagogo\", \"g'\"),\n    (\"loagogo\", \"aes'\"),    \n    (\"maracas\", \"bes'\"),\n    (\"cabasa\", \"a'\"),\n    (\"tamtam\", \"fis\"),\n    (\"claves\", \"ees''\"),\n    (\"snare\", \"d,\"),\n    (\"tomfh\", \"g,\"),\n    (\"tomfl\", \"f,\"),   \n    (\"tomml\", \"b,\"),\n    (\"tommh\", \"c\"),\n    (\"cymca\", \"cis\"),\n    (\"cymcb\", \"a\"),\n    (\"cymra\", \"ees\"),\n    (\"cymrb\", \"b\"),\n    (\"cymch\", \"e\"),\n    (\"guiro\", \"cis''\"),\n    (\"tomh\", \"d\"),\n    (\"toml\", \"a,\"),\n    (\"hhho\", \"bes,\"),\n    (\"cymc\", \"cis\"),\n    (\"cymr\", \"ees\"), \n    (\"cyms\", \"g\"),   \n    (\"boho\", \"c'\"),\n    (\"bohm\", \"c'\"),\n    (\"bolo\", \"cis'\"),\n    (\"bolm\", \"cis'\"),\n    (\"cgho\", \"ees'\"),\n    (\"cghm\", \"d'\"),\n    (\"cglo\", \"e'\"),\n    (\"cglm\", \"e'\"),\n    (\"timh\", \"f'\"),\n    (\"timl\", \"fis'\"),\n    (\"guis\", \"cis''\"),\n    (\"guil\", \"d''\"),\n    (\"tamb\", \"fis\"),\n    (\"vibs\", \"bes\"),\n    (\"cuio\", \"g''\"),\n    (\"cuim\", \"fis''\"),\n    (\"trio\", \"a''\"),\n    (\"trim\", \"aes''\"),\n    (\"bda\", \"b,,\"),\n    (\"sna\", \"d,\"),\n    (\"sne\", \"e,\"),\n    (\"hhc\", \"fis,\"),\n    (\"hho\", \"bes,\"),\n    (\"hhp\", \"aes,\"),\n    (\"boh\", \"c'\"),\n    (\"bol\", \"cis'\"),\n    (\"cgh\", \"ees'\"),\n    (\"cgl\", \"e'\"),\n    (\"agh\", \"g'\"),\n    (\"agl\", \"aes'\"),\n    (\"ssh\", \"cis,\"),\n    (\"ssl\", \"cis,\"),\n    (\"gui\", \"cis''\"),\n    (\"cab\", \"a'\"),\n    (\"mar\", \"bes'\"),\n    (\"whs\", \"b'\"),\n    (\"whl\", \"c''\"),\n    (\"wbh\", \"e''\"),\n    (\"wbl\", \"f''\"),\n    (\"tri\", \"a''\"),\n    (\"bd\", \"c,\"),    \n    (\"sn\", \"d,\"),\n    (\"hh\", \"aes,\"),\n    (\"rb\", \"f\"),\n    (\"cb\", \"aes\"),\n    (\"ss\", \"cis,\"),\n    (\"hc\", \"ees,\"),\n    (\"tt\", \"fis\"),\n    (\"cl\", \"ees''\")\n]\n\n\n_stepIdxs = {\n    'C': 0.0,\n    'D': 2.0,\n    'E': 4.0,\n    'F': 5.0,\n    'G': 7.0, \n    'A': 9.0, \n    'B': 11.0,     \n}\n\nclass YAMLDocument(MusicXMLDocument):\n    def __init__(self, yaml_score):\n        score = yaml_score.score\n        tempo = 120\n        if 'tempo' in score:\n            tempo = int(score['tempo'])\n            \n        ly_text='\\\\version \"2.18.2\"\\n'\n        ly_text+='\\\\score\\n'\n        ly_text+='{\\n'\n        \n        ly_text+='\\t<<\\n'\n        \n        inst = KarplusStrongInstrument()\n        self.tracks = []\n        if 'staffs' in score:\n            staffs = score['staffs']            \n            for staff in staffs:                \n                is_drum = False\n                if 'is_drum' in staff:\n                    is_drum = staff['is_drum']\n                    \n                is_vocal = False\n                if 'is_vocal' in staff:\n                    is_vocal = staff['is_vocal']\n                    \n                if not is_vocal:\n                    if 'instrument' in staff:\n                        ldic=locals()\n                        exec('inst = ' + staff['instrument'], globals(),ldic)\n                        inst=ldic[\"inst\"]\n                \n                else:\n                    ldic=locals()\n                    exec('singer = ' + staff['singer'], globals(),ldic)\n                    singer=ldic[\"singer\"]\n                        \n                    if 'converter' in staff:\n                        exec('singer.setLyricConverter('+staff['converter']+')', globals(),locals())\n                    \n                    if 'CZMode' in staff and staff['CZMode']:\n                        singer.setCZMode()                        \n                    \n                sweep = 0.0\n                if 'sweep' in staff:\n                    sweep = staff['sweep']\n                    \n                volume = 1.0\n                pan = 0.0\n                if 'volume' in staff:\n                    volume = staff['volume']\n                if 'pan' in staff:\n                    pan = staff['pan']                \n                \n                content = staff['content']\n                if is_drum:\n                    for pair in GM_Drum_Map:\n                        content = content.replace(pair[0], pair[1])                \n                lines = content.splitlines()\n                \n                if is_drum:\n                    ly_text+='\\t\\t\\\\new Staff'\n                else:\n                    relative = \"\"\n                    if 'relative' in staff:\n                        relative = ' \\\\relative '+ staff['relative']\n                    ly_text+='\\t\\t\\\\new Staff' + relative +'\\n'\n                    \n                ly_text+='\\t\\t{\\n'\n                for line in lines:\n                    ly_text+='\\t\\t\\t'+line+'\\n'\n                ly_text+='\\t\\t}\\n'\n                \n                if is_vocal:\n                    track_info = {\n                        \"type\": \"vocal\",\n                        \"singer\": singer,\n                        \"utau\" : staff['utau']\n                    }\n                else:\n                    track_info = {\n                        \"type\": \"regular\",\n                        \"instrument\": inst,\n                        \"sweep\": sweep\n                    }\n                    \n                track_info['volume'] = volume\n                track_info['pan'] = pan\n                \n                self.tracks += [track_info] \n                \n                if not is_drum and 'pedal' in staff:\n                    pedal = staff['pedal']\n                    lines = pedal.splitlines()\n                    ly_text+='\\t\\t\\\\drums\\n'                   \n                    ly_text+='\\t\\t{\\n'\n                    for line in lines:\n                        ly_text+='\\t\\t\\t'+line+'\\n'\n                    ly_text+='\\t\\t}\\n'\n                    \n                    track_info = {\n                        \"type\": \"pedal\"                    \n                    }                    \n                    self.tracks += [track_info] \n                \n                \n        ly_text+='\\t>>\\n'\n        ly_text+='\\t\\\\layout {}\\n'\n        ly_text+='\\t\\\\midi\\n'\n        ly_text+='\\t{\\n'\n        ly_text+='\\t\\t\\\\tempo 4 = '+ str(tempo) +'\\n'\n        ly_text+='\\t}\\n'\n        ly_text+='}\\n'\n        \n        e = ly.musicxml.writer()\n        e.parse_text(ly_text)\n        xml = e.musicxml()        \n        MusicXMLDocument.__init__(self, xml.tostring().decode('utf-8'))\n    \n    def play(self):\n        num_parts = len(self.score.part)\n        for i in range(num_parts):\n            part = self.score.part[i]\n            track_info = self.tracks[i]\n            if track_info['type'] == \"pedal\":\n                continue\n                \n            if track_info['type'] == \"vocal\":\n                attrtib = part.measure[0].attributes[0]\n                divisions = int(attrtib.divisions)\n                if 48 % divisions != 0:\n                    print('ScoreDraft cannot handle divisions: %d' % divisions)\n                    continue\n                    \n                utau = track_info['utau']              \n                syllables = []\n                utau = utau.replace('\\n', ' ')               \n                for syll in utau.split(' '):\n                    text = syll\n                    end_sentence = False\n                    if len(text)>0 and text[-1] == '.':\n                        end_sentence = True\n                        text = text[0: -1]\n                    if text!=\"\":\n                        syllables += [(text, end_sentence)]\n                num_syll = len(syllables)\n                \n                seq = []\n                sentence = []\n                i_syll = 0\n                new_syll = True\n                slur = False\n                for measure in part.measure:\n                    for note in measure.note:\n                        freq = -1.0\n                        if len(note.rest)<1 and len(note.pitch)>0:\n                            pitch = note.pitch[0]\n                            octave = float(pitch.octave)\n                            step_idx = _stepIdxs[pitch.step.name]\n                            if not pitch.alter is None:\n                                step_idx += float(pitch.alter)\n                            step_idx += (octave - 4.0)*12.0\n                            freq = 2.0**(step_idx/12.0)                            \n                        duration = int(note.duration[0] * 48 / divisions)\n                        \n                        if freq < 0.0:\n                            if len(sentence)>0:\n                                seq += [sentence]\n                                sentence = []\n                                new_syll = True\n                            seq += [(freq, duration)]\n                            slur = False\n                        else:                            \n                            if len(note.notations)>0:\n                                if len(note.notations[0].slur)>0:\n                                    if note.notations[0].slur[0].type.value==\"start\":\n                                        slur = True\n                                    elif note.notations[0].slur[0].type.value==\"stop\":\n                                        slur = False\n                                    \n                            if new_syll:\n                                sentence += [syllables[i_syll][0]]\n                            sentence += [(freq, duration)]\n                            \n                            if slur:\n                                new_syll = False\n                            else:\n                                new_syll = True\n                                if i_syll < num_syll -1:\n                                    i_syll += 1\n                                if syllables[i_syll][1]:\n                                    seq += [sentence]\n                                    sentence = []\n                if len(sentence)>0:\n                    seq += [sentence]\n                    sentence = []\n                    \n                idx = self.sing(seq, track_info['singer'])\n                self.setTrackVolume(idx, track_info['volume'])\n                self.setTrackPan(idx, track_info['pan'])\n                continue\n                \n            sustain_ranges = []\n            if i < num_parts - 1 and self.tracks[i+1]['type'] == \"pedal\":\n                part_s = self.score.part[i + 1]\n                attrtib_s = part_s.measure[0].attributes[0]\n                divisions_s = int(attrtib_s.divisions)\n                if 48 % divisions_s != 0:\n                    print('ScoreDraft cannot handle divisions: %d' % divisions_s)\n                    continue\n                    \n                pos = 0\n                for measure in part_s.measure:\n                    for note in measure.note:\n                        duration = int(note.duration[0] * 48 / divisions_s)\n                        if len(note.rest)<1:\n                            sustain_ranges += [(pos, pos + duration)]\n                        pos += duration\n\n            # part -> seq\n            attrtib = part.measure[0].attributes[0]\n            divisions = int(attrtib.divisions)\n            if 48 % divisions != 0:\n                print('ScoreDraft cannot handle divisions: %d' % divisions)\n                continue\n                \n            seq = []\n            duration = 0\n            pos = 0\n            i_range = 0\n            slur = False\n            for measure in part.measure:\n                for note in measure.note:\n                    sustain = False\n                    while i_range < len(sustain_ranges):\n                        if pos >= sustain_ranges[i_range][0]:\n                            if pos < sustain_ranges[i_range][1]:\n                                sustain = True\n                                break\n                            else:\n                                i_range += 1\n                        else:\n                            break\n                    \n                    freq = -1.0\n                    if len(note.rest)<1 and len(note.pitch)>0:\n                        pitch = note.pitch[0]\n                        octave = float(pitch.octave)\n                        step_idx = _stepIdxs[pitch.step.name]\n                        if not pitch.alter is None:\n                            step_idx += float(pitch.alter)\n                        step_idx += (octave - 4.0)*12.0\n                        freq = 2.0**(step_idx/12.0)            \n                    \n                    if duration>0 and len(note.chord)>0:\n                        if track_info['sweep']>0:\n                            duration = int(duration*(1.0 - track_info['sweep']))\n                        seq += [(-1.0, -duration)]\n                        pos -= duration\n                    else:\n                        duration = int(note.duration[0] * 48 / divisions)\n                        \n                    if sustain:\n                        seq += [[freq, sustain_ranges[i_range][1] - pos]]\n                        seq += [[-1.0, pos + duration -sustain_ranges[i_range][1]]]\n                    else:\n                        if len(seq)>0 and slur and  freq == seq[len(seq)-1][0]:\n                            seq[len(seq)-1][1] += duration\n                        else:\n                            seq += [[freq, duration]]\n                    pos += duration\n                    \n                    if len(note.notations)>0:\n                        if len(note.notations[0].slur)>0:\n                            if note.notations[0].slur[0].type.value==\"start\":\n                                slur = True\n                            elif note.notations[0].slur[0].type.value==\"stop\":\n                                slur = False\n            \n            idx = self.playNoteSeq(seq, track_info['instrument'])\n            self.setTrackVolume(idx, track_info['volume'])\n            self.setTrackPan(idx, track_info['pan'])\n    \n"
  },
  {
    "path": "python/ScoreDraft/__init__.py",
    "content": "import numbers\n\ndef isNumber(x):\n    return isinstance(x, numbers.Number)\n\ndef TellDuration(seq):\n    duration = 0\n    for item in seq:\n        if isinstance(item, (list, tuple)):\n            _item = item[0] \n            if type(_item) == str: # singing\n                tupleSize=len(item)\n                j=0\n                while j<tupleSize:\n                    j+=1  # by-pass lyric\n                    _item=item[j]\n                    if isinstance(_item, (list, tuple)): # singing note\n                        while j<tupleSize:\n                            _item = item[j]\n                            if not isinstance(_item, (list, tuple)):\n                                break\n                            numCtrlPnt= len(_item)//2\n                            for k in range(numCtrlPnt):\n                                duration+=_item[k*2+1]\n                            j+=1\n                    elif isNumber(_item): # singing rap\n                        duration += item[j]\n                        j+=3\n            elif isNumber(_item): # note\n                duration += item[1]\n    return duration\n\n\n\nfrom .ScoreDraftCore import F32Buf\nfrom .ScoreDraftCore import WavBuffer\nfrom .ScoreDraftCore import setDefaultNumberOfChannels\nfrom .ScoreDraftCore import TrackBuffer\nfrom .ScoreDraftCore import MixTrackBufferList\nfrom .ScoreDraftCore import WriteTrackBufferToWav\nfrom .ScoreDraftCore import ReadTrackBufferFromWav\n\nfrom .UTAUUtils import LoadFrq as LoadFrqUTAU\nfrom .UTAUUtils import LoadOtoINIPath as LoadOtoINIPathUTAU\nfrom .UTAUUtils import LoadPrefixMap as LoadPrefixMapUTAU\nfrom .UTAUUtils import LookUpPrefixMap as LookUpPrefixMapUTAU\nfrom .UTAUUtils import VoiceBank as VoiceBankUTAU\n\nnotVowel = 0\npreVowel = 1\nisVowel = 2\n\nfrom .VoiceSampler import GenerateSentence\nfrom .VoiceSampler import GenerateSentenceCUDA\nfrom . import VoiceSampler\n\ndef DetectFrqVoice(wavF32, interval=256):\n    frq_data = VoiceSampler.FrqData()\n    frq_data.detect(wavF32, interval)\n    return frq_data\n    \nfrom .Catalog import PrintCatalog\nfrom .Initializers import *\n\nfrom .Document import Document\ntry:\n    from .Meteor import Meteor, MeteorPlay\n    from .Meteor import Document as MeteorDocument\nexcept:\n    print('Meteor import failed')\n\nfrom .MIDIWriter import WriteNoteSequencesToMidi\ntry:\n    from .PCMPlayer import PCMPlayer, AsyncUIPCMPlayer\nexcept:\n    print('PCMPlayer import failed')    \n\ndef PlayTrackBuffer(track):\n    player = AsyncUIPCMPlayer()\n    player.play_track(track)\n\ntry:\n    from .MusicXMLDocument import MusicXMLDocument, from_music_xml, from_lilypond\nexcept:\n    print('MusicXMLDocument import failed')\n\ntry:\n    from .YAMLDocument import YAMLScore, YAMLDocument\n    has_yaml = True\nexcept:\n    print('YAMLDocument import failed')\n    has_yaml = False\n    \nimport argparse\n    \ndef run_yaml():\n    if has_yaml:\n        parser = argparse.ArgumentParser(prog = \"scoredraft\")\n        parser.add_argument(\"yaml\", help = \"input yaml filename\")\n        parser.add_argument(\"-ly\", help = \"output lilyond filename\")\n        parser.add_argument(\"-wav\", help = \"output wav filename\")\n        parser.add_argument(\"-meteor\", help = \"output meteor filename\")\n        parser.add_argument(\"-run\", help = \"run meteor\", action='store_true')\n        args=vars(parser.parse_args())\n        with open(args['yaml'], 'r', encoding = 'utf-8') as f_in:\n            score = YAMLScore(f_in)\n            if not args['ly'] is None:\n                with open(args['ly'], 'w', encoding = 'utf-8') as f_out:\n                    f_out.write(score.to_ly())\n            if not args['wav'] is None or not args['meteor'] is None or args['run']:\n                doc = YAMLDocument(score)\n                doc.play()\n                if not args['wav'] is None:\n                    doc.mixDown(args['wav'])\n                if not args['meteor'] is None:\n                    doc.saveToFile(args['meteor'])\n                if args['run']:\n                    doc.meteor()\n\n"
  },
  {
    "path": "python/ScoreDraft/musicxml/__init__.py",
    "content": "from .musicxml import (\n    AboveBelow,\n    Accidental,\n    AccidentalMark,\n    AccidentalText,\n    AccidentalValue,\n    Accord,\n    AccordionRegistration,\n    Appearance,\n    Arpeggiate,\n    Arrow,\n    ArrowDirection,\n    ArrowStyle,\n    Articulations,\n    Assess,\n    Attributes,\n    Backup,\n    BackwardForward,\n    BarStyle,\n    BarStyleColor,\n    Barline,\n    Barre,\n    Bass,\n    BassStep,\n    Beam,\n    BeamValue,\n    BeatRepeat,\n    BeatUnitTied,\n    Beater,\n    BeaterValue,\n    Bend,\n    BendShape,\n    Bookmark,\n    Bracket,\n    BreathMark,\n    BreathMarkValue,\n    Caesura,\n    CaesuraValue,\n    Cancel,\n    CancelLocation,\n    CircularArrow,\n    Clef,\n    ClefSign,\n    Coda,\n    Credit,\n    CssFontSize,\n    Dashes,\n    Defaults,\n    Degree,\n    DegreeAlter,\n    DegreeSymbolValue,\n    DegreeType,\n    DegreeTypeValue,\n    DegreeValue,\n    Direction,\n    DirectionType,\n    Distance,\n    Double,\n    Dynamics,\n    Effect,\n    EffectValue,\n    Elision,\n    Empty,\n    EmptyFont,\n    EmptyLine,\n    EmptyPlacement,\n    EmptyPlacementSmufl,\n    EmptyPrintObjectStyleAlign,\n    EmptyPrintStyle,\n    EmptyPrintStyleAlign,\n    EmptyPrintStyleAlignId,\n    EmptyTrillSound,\n    EnclosureShape,\n    Encoding,\n    Ending,\n    Extend,\n    Fan,\n    Feature,\n    Fermata,\n    FermataShape,\n    Figure,\n    FiguredBass,\n    Fingering,\n    FirstFret,\n    FontStyle,\n    FontWeight,\n    ForPart,\n    FormattedSymbol,\n    FormattedSymbolId,\n    FormattedText,\n    FormattedTextId,\n    Forward,\n    Frame,\n    FrameNote,\n    Fret,\n    Glass,\n    GlassValue,\n    Glissando,\n    Glyph,\n    Grace,\n    GroupBarline,\n    GroupBarlineValue,\n    GroupName,\n    GroupSymbol,\n    GroupSymbolValue,\n    Grouping,\n    HammerOnPullOff,\n    Handbell,\n    HandbellValue,\n    HarmonClosed,\n    HarmonClosedLocation,\n    HarmonClosedValue,\n    HarmonMute,\n    Harmonic,\n    Harmony,\n    HarmonyAlter,\n    HarmonyArrangement,\n    HarmonyType,\n    HarpPedals,\n    HeelToe,\n    Hole,\n    HoleClosed,\n    HoleClosedLocation,\n    HoleClosedValue,\n    HorizontalTurn,\n    Identification,\n    Image,\n    Instrument,\n    InstrumentChange,\n    InstrumentLink,\n    Interchangeable,\n    Inversion,\n    Key,\n    KeyAccidental,\n    KeyOctave,\n    Kind,\n    KindValue,\n    LeftCenterRight,\n    LeftRight,\n    Level,\n    LineDetail,\n    LineEnd,\n    LineLength,\n    LineShape,\n    LineType,\n    LineWidth,\n    Link,\n    Listen,\n    Listening,\n    Lyric,\n    LyricFont,\n    LyricLanguage,\n    MarginType,\n    MeasureLayout,\n    MeasureNumbering,\n    MeasureNumberingValue,\n    MeasureRepeat,\n    MeasureStyle,\n    Membrane,\n    MembraneValue,\n    Metal,\n    MetalValue,\n    Metronome,\n    MetronomeBeam,\n    MetronomeNote,\n    MetronomeTied,\n    MetronomeTuplet,\n    MidiDevice,\n    MidiInstrument,\n    Miscellaneous,\n    MiscellaneousField,\n    Mordent,\n    MultipleRest,\n    Mute,\n    NameDisplay,\n    NonArpeggiate,\n    Notations,\n    Note,\n    NoteSize,\n    NoteSizeType,\n    NoteType,\n    NoteTypeValue,\n    Notehead,\n    NoteheadText,\n    NoteheadValue,\n    NumberOrNormalValue,\n    Numeral,\n    NumeralKey,\n    NumeralMode,\n    NumeralRoot,\n    OctaveShift,\n    Offset,\n    OnOff,\n    Opus,\n    Ornaments,\n    OtherAppearance,\n    OtherDirection,\n    OtherListening,\n    OtherNotation,\n    OtherPlacementText,\n    OtherPlay,\n    OtherText,\n    OverUnder,\n    PageLayout,\n    PageMargins,\n    PartClef,\n    PartGroup,\n    PartLink,\n    PartList,\n    PartName,\n    PartSymbol,\n    PartTranspose,\n    Pedal,\n    PedalTuning,\n    PedalType,\n    PerMinute,\n    Percussion,\n    Pitch,\n    Pitched,\n    PitchedValue,\n    PlacementText,\n    Play,\n    Player,\n    PositiveIntegerOrEmptyValue,\n    PrincipalVoice,\n    PrincipalVoiceSymbol,\n    Print,\n    Release,\n    Repeat,\n    Rest,\n    RightLeftMiddle,\n    Root,\n    RootStep,\n    Scaling,\n    Scordatura,\n    ScoreInstrument,\n    ScorePart,\n    ScorePartwise,\n    ScoreTimewise,\n    Segno,\n    SemiPitched,\n    ShowFrets,\n    ShowTuplet,\n    Slash,\n    Slide,\n    Slur,\n    Sound,\n    StaffDetails,\n    StaffDivide,\n    StaffDivideSymbol,\n    StaffLayout,\n    StaffSize,\n    StaffTuning,\n    StaffType,\n    StartNote,\n    StartStop,\n    StartStopChangeContinue,\n    StartStopContinue,\n    StartStopDiscontinue,\n    StartStopSingle,\n    Stem,\n    StemValue,\n    Step,\n    Stick,\n    StickLocation,\n    StickMaterial,\n    StickType,\n    String,\n    StringMute,\n    StrongAccent,\n    StyleText,\n    Supports,\n    Swing,\n    SwingTypeValue,\n    Syllabic,\n    SymbolSize,\n    Sync,\n    SyncType,\n    SystemDividers,\n    SystemLayout,\n    SystemMargins,\n    SystemRelation,\n    SystemRelationNumber,\n    Tap,\n    TapHand,\n    Technical,\n    TextDirection,\n    TextElementData,\n    Tie,\n    Tied,\n    TiedType,\n    Time,\n    TimeModification,\n    TimeRelation,\n    TimeSeparator,\n    TimeSymbol,\n    Timpani,\n    TipDirection,\n    TopBottom,\n    Transpose,\n    Tremolo,\n    TremoloType,\n    TrillStep,\n    Tuplet,\n    TupletDot,\n    TupletNumber,\n    TupletPortion,\n    TupletType,\n    TwoNoteTurn,\n    TypedText,\n    Unpitched,\n    UpDown,\n    UpDownStopContinue,\n    UprightInverted,\n    Valign,\n    ValignImage,\n    VirtualInstrument,\n    Wait,\n    WavyLine,\n    Wedge,\n    WedgeType,\n    Winged,\n    Wood,\n    WoodValue,\n    Work,\n    YesNo,\n)\nfrom .xlink import (\n    ActuateValue,\n    ShowValue,\n    TypeValue,\n)\nfrom .xml import (\n    LangValue,\n    SpaceValue,\n)\n\n__all__ = [\n    \"AboveBelow\",\n    \"Accidental\",\n    \"AccidentalMark\",\n    \"AccidentalText\",\n    \"AccidentalValue\",\n    \"Accord\",\n    \"AccordionRegistration\",\n    \"Appearance\",\n    \"Arpeggiate\",\n    \"Arrow\",\n    \"ArrowDirection\",\n    \"ArrowStyle\",\n    \"Articulations\",\n    \"Assess\",\n    \"Attributes\",\n    \"Backup\",\n    \"BackwardForward\",\n    \"BarStyle\",\n    \"BarStyleColor\",\n    \"Barline\",\n    \"Barre\",\n    \"Bass\",\n    \"BassStep\",\n    \"Beam\",\n    \"BeamValue\",\n    \"BeatRepeat\",\n    \"BeatUnitTied\",\n    \"Beater\",\n    \"BeaterValue\",\n    \"Bend\",\n    \"BendShape\",\n    \"Bookmark\",\n    \"Bracket\",\n    \"BreathMark\",\n    \"BreathMarkValue\",\n    \"Caesura\",\n    \"CaesuraValue\",\n    \"Cancel\",\n    \"CancelLocation\",\n    \"CircularArrow\",\n    \"Clef\",\n    \"ClefSign\",\n    \"Coda\",\n    \"Credit\",\n    \"CssFontSize\",\n    \"Dashes\",\n    \"Defaults\",\n    \"Degree\",\n    \"DegreeAlter\",\n    \"DegreeSymbolValue\",\n    \"DegreeType\",\n    \"DegreeTypeValue\",\n    \"DegreeValue\",\n    \"Direction\",\n    \"DirectionType\",\n    \"Distance\",\n    \"Double\",\n    \"Dynamics\",\n    \"Effect\",\n    \"EffectValue\",\n    \"Elision\",\n    \"Empty\",\n    \"EmptyFont\",\n    \"EmptyLine\",\n    \"EmptyPlacement\",\n    \"EmptyPlacementSmufl\",\n    \"EmptyPrintObjectStyleAlign\",\n    \"EmptyPrintStyle\",\n    \"EmptyPrintStyleAlign\",\n    \"EmptyPrintStyleAlignId\",\n    \"EmptyTrillSound\",\n    \"EnclosureShape\",\n    \"Encoding\",\n    \"Ending\",\n    \"Extend\",\n    \"Fan\",\n    \"Feature\",\n    \"Fermata\",\n    \"FermataShape\",\n    \"Figure\",\n    \"FiguredBass\",\n    \"Fingering\",\n    \"FirstFret\",\n    \"FontStyle\",\n    \"FontWeight\",\n    \"ForPart\",\n    \"FormattedSymbol\",\n    \"FormattedSymbolId\",\n    \"FormattedText\",\n    \"FormattedTextId\",\n    \"Forward\",\n    \"Frame\",\n    \"FrameNote\",\n    \"Fret\",\n    \"Glass\",\n    \"GlassValue\",\n    \"Glissando\",\n    \"Glyph\",\n    \"Grace\",\n    \"GroupBarline\",\n    \"GroupBarlineValue\",\n    \"GroupName\",\n    \"GroupSymbol\",\n    \"GroupSymbolValue\",\n    \"Grouping\",\n    \"HammerOnPullOff\",\n    \"Handbell\",\n    \"HandbellValue\",\n    \"HarmonClosed\",\n    \"HarmonClosedLocation\",\n    \"HarmonClosedValue\",\n    \"HarmonMute\",\n    \"Harmonic\",\n    \"Harmony\",\n    \"HarmonyAlter\",\n    \"HarmonyArrangement\",\n    \"HarmonyType\",\n    \"HarpPedals\",\n    \"HeelToe\",\n    \"Hole\",\n    \"HoleClosed\",\n    \"HoleClosedLocation\",\n    \"HoleClosedValue\",\n    \"HorizontalTurn\",\n    \"Identification\",\n    \"Image\",\n    \"Instrument\",\n    \"InstrumentChange\",\n    \"InstrumentLink\",\n    \"Interchangeable\",\n    \"Inversion\",\n    \"Key\",\n    \"KeyAccidental\",\n    \"KeyOctave\",\n    \"Kind\",\n    \"KindValue\",\n    \"LeftCenterRight\",\n    \"LeftRight\",\n    \"Level\",\n    \"LineDetail\",\n    \"LineEnd\",\n    \"LineLength\",\n    \"LineShape\",\n    \"LineType\",\n    \"LineWidth\",\n    \"Link\",\n    \"Listen\",\n    \"Listening\",\n    \"Lyric\",\n    \"LyricFont\",\n    \"LyricLanguage\",\n    \"MarginType\",\n    \"MeasureLayout\",\n    \"MeasureNumbering\",\n    \"MeasureNumberingValue\",\n    \"MeasureRepeat\",\n    \"MeasureStyle\",\n    \"Membrane\",\n    \"MembraneValue\",\n    \"Metal\",\n    \"MetalValue\",\n    \"Metronome\",\n    \"MetronomeBeam\",\n    \"MetronomeNote\",\n    \"MetronomeTied\",\n    \"MetronomeTuplet\",\n    \"MidiDevice\",\n    \"MidiInstrument\",\n    \"Miscellaneous\",\n    \"MiscellaneousField\",\n    \"Mordent\",\n    \"MultipleRest\",\n    \"Mute\",\n    \"NameDisplay\",\n    \"NonArpeggiate\",\n    \"Notations\",\n    \"Note\",\n    \"NoteSize\",\n    \"NoteSizeType\",\n    \"NoteType\",\n    \"NoteTypeValue\",\n    \"Notehead\",\n    \"NoteheadText\",\n    \"NoteheadValue\",\n    \"NumberOrNormalValue\",\n    \"Numeral\",\n    \"NumeralKey\",\n    \"NumeralMode\",\n    \"NumeralRoot\",\n    \"OctaveShift\",\n    \"Offset\",\n    \"OnOff\",\n    \"Opus\",\n    \"Ornaments\",\n    \"OtherAppearance\",\n    \"OtherDirection\",\n    \"OtherListening\",\n    \"OtherNotation\",\n    \"OtherPlacementText\",\n    \"OtherPlay\",\n    \"OtherText\",\n    \"OverUnder\",\n    \"PageLayout\",\n    \"PageMargins\",\n    \"PartClef\",\n    \"PartGroup\",\n    \"PartLink\",\n    \"PartList\",\n    \"PartName\",\n    \"PartSymbol\",\n    \"PartTranspose\",\n    \"Pedal\",\n    \"PedalTuning\",\n    \"PedalType\",\n    \"PerMinute\",\n    \"Percussion\",\n    \"Pitch\",\n    \"Pitched\",\n    \"PitchedValue\",\n    \"PlacementText\",\n    \"Play\",\n    \"Player\",\n    \"PositiveIntegerOrEmptyValue\",\n    \"PrincipalVoice\",\n    \"PrincipalVoiceSymbol\",\n    \"Print\",\n    \"Release\",\n    \"Repeat\",\n    \"Rest\",\n    \"RightLeftMiddle\",\n    \"Root\",\n    \"RootStep\",\n    \"Scaling\",\n    \"Scordatura\",\n    \"ScoreInstrument\",\n    \"ScorePart\",\n    \"ScorePartwise\",\n    \"ScoreTimewise\",\n    \"Segno\",\n    \"SemiPitched\",\n    \"ShowFrets\",\n    \"ShowTuplet\",\n    \"Slash\",\n    \"Slide\",\n    \"Slur\",\n    \"Sound\",\n    \"StaffDetails\",\n    \"StaffDivide\",\n    \"StaffDivideSymbol\",\n    \"StaffLayout\",\n    \"StaffSize\",\n    \"StaffTuning\",\n    \"StaffType\",\n    \"StartNote\",\n    \"StartStop\",\n    \"StartStopChangeContinue\",\n    \"StartStopContinue\",\n    \"StartStopDiscontinue\",\n    \"StartStopSingle\",\n    \"Stem\",\n    \"StemValue\",\n    \"Step\",\n    \"Stick\",\n    \"StickLocation\",\n    \"StickMaterial\",\n    \"StickType\",\n    \"String\",\n    \"StringMute\",\n    \"StrongAccent\",\n    \"StyleText\",\n    \"Supports\",\n    \"Swing\",\n    \"SwingTypeValue\",\n    \"Syllabic\",\n    \"SymbolSize\",\n    \"Sync\",\n    \"SyncType\",\n    \"SystemDividers\",\n    \"SystemLayout\",\n    \"SystemMargins\",\n    \"SystemRelation\",\n    \"SystemRelationNumber\",\n    \"Tap\",\n    \"TapHand\",\n    \"Technical\",\n    \"TextDirection\",\n    \"TextElementData\",\n    \"Tie\",\n    \"Tied\",\n    \"TiedType\",\n    \"Time\",\n    \"TimeModification\",\n    \"TimeRelation\",\n    \"TimeSeparator\",\n    \"TimeSymbol\",\n    \"Timpani\",\n    \"TipDirection\",\n    \"TopBottom\",\n    \"Transpose\",\n    \"Tremolo\",\n    \"TremoloType\",\n    \"TrillStep\",\n    \"Tuplet\",\n    \"TupletDot\",\n    \"TupletNumber\",\n    \"TupletPortion\",\n    \"TupletType\",\n    \"TwoNoteTurn\",\n    \"TypedText\",\n    \"Unpitched\",\n    \"UpDown\",\n    \"UpDownStopContinue\",\n    \"UprightInverted\",\n    \"Valign\",\n    \"ValignImage\",\n    \"VirtualInstrument\",\n    \"Wait\",\n    \"WavyLine\",\n    \"Wedge\",\n    \"WedgeType\",\n    \"Winged\",\n    \"Wood\",\n    \"WoodValue\",\n    \"Work\",\n    \"YesNo\",\n    \"ActuateValue\",\n    \"ShowValue\",\n    \"TypeValue\",\n    \"LangValue\",\n    \"SpaceValue\",\n]\n"
  },
  {
    "path": "python/ScoreDraft/musicxml/musicxml.py",
    "content": "from dataclasses import dataclass, field\nfrom decimal import Decimal\nfrom enum import Enum\nfrom typing import List, Optional, Union\nfrom .xlink import (\n    ActuateValue,\n    ShowValue,\n    TypeValue,\n)\nfrom .xml import (\n    LangValue,\n    SpaceValue,\n)\n\n\nclass AboveBelow(Enum):\n    \"\"\"\n    The above-below type is used to indicate whether one element appears above\n    or below another element.\n    \"\"\"\n    ABOVE = \"above\"\n    BELOW = \"below\"\n\n\nclass AccidentalValue(Enum):\n    \"\"\"The accidental-value type represents notated accidentals supported by\n    MusicXML.\n\n    In the MusicXML 2.0 DTD this was a string with values that could be\n    included. The XSD strengthens the data typing to an enumerated list.\n    The quarter- and three-quarters- accidentals are Tartini-style\n    quarter-tone accidentals. The -down and -up accidentals are quarter-\n    tone accidentals that include arrows pointing down or up. The slash-\n    accidentals are used in Turkish classical music. The numbered sharp\n    and flat accidentals are superscripted versions of the accidental\n    signs, used in Turkish folk music. The sori and koron accidentals\n    are microtonal sharp and flat accidentals used in Iranian and\n    Persian music. The other accidental covers accidentals other than\n    those listed here. It is usually used in combination with the smufl\n    attribute to specify a particular SMuFL accidental. The smufl\n    attribute may be used with any accidental value to help specify the\n    appearance of symbols that share the same MusicXML semantics.\n    \"\"\"\n    SHARP = \"sharp\"\n    NATURAL = \"natural\"\n    FLAT = \"flat\"\n    DOUBLE_SHARP = \"double-sharp\"\n    SHARP_SHARP = \"sharp-sharp\"\n    FLAT_FLAT = \"flat-flat\"\n    NATURAL_SHARP = \"natural-sharp\"\n    NATURAL_FLAT = \"natural-flat\"\n    QUARTER_FLAT = \"quarter-flat\"\n    QUARTER_SHARP = \"quarter-sharp\"\n    THREE_QUARTERS_FLAT = \"three-quarters-flat\"\n    THREE_QUARTERS_SHARP = \"three-quarters-sharp\"\n    SHARP_DOWN = \"sharp-down\"\n    SHARP_UP = \"sharp-up\"\n    NATURAL_DOWN = \"natural-down\"\n    NATURAL_UP = \"natural-up\"\n    FLAT_DOWN = \"flat-down\"\n    FLAT_UP = \"flat-up\"\n    DOUBLE_SHARP_DOWN = \"double-sharp-down\"\n    DOUBLE_SHARP_UP = \"double-sharp-up\"\n    FLAT_FLAT_DOWN = \"flat-flat-down\"\n    FLAT_FLAT_UP = \"flat-flat-up\"\n    ARROW_DOWN = \"arrow-down\"\n    ARROW_UP = \"arrow-up\"\n    TRIPLE_SHARP = \"triple-sharp\"\n    TRIPLE_FLAT = \"triple-flat\"\n    SLASH_QUARTER_SHARP = \"slash-quarter-sharp\"\n    SLASH_SHARP = \"slash-sharp\"\n    SLASH_FLAT = \"slash-flat\"\n    DOUBLE_SLASH_FLAT = \"double-slash-flat\"\n    SHARP_1 = \"sharp-1\"\n    SHARP_2 = \"sharp-2\"\n    SHARP_3 = \"sharp-3\"\n    SHARP_5 = \"sharp-5\"\n    FLAT_1 = \"flat-1\"\n    FLAT_2 = \"flat-2\"\n    FLAT_3 = \"flat-3\"\n    FLAT_4 = \"flat-4\"\n    SORI = \"sori\"\n    KORON = \"koron\"\n    OTHER = \"other\"\n\n\nclass ArrowDirection(Enum):\n    \"\"\"\n    The arrow-direction type represents the direction in which an arrow points,\n    using Unicode arrow terminology.\n    \"\"\"\n    LEFT = \"left\"\n    UP = \"up\"\n    RIGHT = \"right\"\n    DOWN = \"down\"\n    NORTHWEST = \"northwest\"\n    NORTHEAST = \"northeast\"\n    SOUTHEAST = \"southeast\"\n    SOUTHWEST = \"southwest\"\n    LEFT_RIGHT = \"left right\"\n    UP_DOWN = \"up down\"\n    NORTHWEST_SOUTHEAST = \"northwest southeast\"\n    NORTHEAST_SOUTHWEST = \"northeast southwest\"\n    OTHER = \"other\"\n\n\nclass ArrowStyle(Enum):\n    \"\"\"The arrow-style type represents the style of an arrow, using Unicode\n    arrow terminology.\n\n    Filled and hollow arrows indicate polygonal single arrows. Paired\n    arrows are duplicate single arrows in the same direction. Combined\n    arrows apply to double direction arrows like left right, indicating\n    that an arrow in one direction should be combined with an arrow in\n    the other direction.\n    \"\"\"\n    SINGLE = \"single\"\n    DOUBLE = \"double\"\n    FILLED = \"filled\"\n    HOLLOW = \"hollow\"\n    PAIRED = \"paired\"\n    COMBINED = \"combined\"\n    OTHER = \"other\"\n\n\nclass BackwardForward(Enum):\n    \"\"\"The backward-forward type is used to specify repeat directions.\n\n    The start of the repeat has a forward direction while the end of the\n    repeat has a backward direction.\n    \"\"\"\n    BACKWARD = \"backward\"\n    FORWARD = \"forward\"\n\n\nclass BarStyle(Enum):\n    \"\"\"The bar-style type represents barline style information.\n\n    Choices are regular, dotted, dashed, heavy, light-light, light-\n    heavy, heavy-light, heavy-heavy, tick (a short stroke through the\n    top line), short (a partial barline between the 2nd and 4th lines),\n    and none.\n    \"\"\"\n    REGULAR = \"regular\"\n    DOTTED = \"dotted\"\n    DASHED = \"dashed\"\n    HEAVY = \"heavy\"\n    LIGHT_LIGHT = \"light-light\"\n    LIGHT_HEAVY = \"light-heavy\"\n    HEAVY_LIGHT = \"heavy-light\"\n    HEAVY_HEAVY = \"heavy-heavy\"\n    TICK = \"tick\"\n    SHORT = \"short\"\n    NONE = \"none\"\n\n\nclass BeamValue(Enum):\n    \"\"\"\n    The beam-value type represents the type of beam associated with each of 8\n    beam levels (up to 1024th notes) available for each note.\n    \"\"\"\n    BEGIN = \"begin\"\n    CONTINUE = \"continue\"\n    END = \"end\"\n    FORWARD_HOOK = \"forward hook\"\n    BACKWARD_HOOK = \"backward hook\"\n\n\nclass BeaterValue(Enum):\n    \"\"\"The beater-value type represents pictograms for beaters, mallets, and\n    sticks that do not have different materials represented in the pictogram.\n\n    The finger and hammer values are in addition to Stone's list.\n    \"\"\"\n    BOW = \"bow\"\n    CHIME_HAMMER = \"chime hammer\"\n    COIN = \"coin\"\n    DRUM_STICK = \"drum stick\"\n    FINGER = \"finger\"\n    FINGERNAIL = \"fingernail\"\n    FIST = \"fist\"\n    GUIRO_SCRAPER = \"guiro scraper\"\n    HAMMER = \"hammer\"\n    HAND = \"hand\"\n    JAZZ_STICK = \"jazz stick\"\n    KNITTING_NEEDLE = \"knitting needle\"\n    METAL_HAMMER = \"metal hammer\"\n    SLIDE_BRUSH_ON_GONG = \"slide brush on gong\"\n    SNARE_STICK = \"snare stick\"\n    SPOON_MALLET = \"spoon mallet\"\n    SUPERBALL = \"superball\"\n    TRIANGLE_BEATER = \"triangle beater\"\n    TRIANGLE_BEATER_PLAIN = \"triangle beater plain\"\n    WIRE_BRUSH = \"wire brush\"\n\n\nclass BendShape(Enum):\n    \"\"\"\n    The bend-shape type distinguishes between the angled bend symbols commonly\n    used in standard notation and the curved bend symbols commonly used in both\n    tablature and standard notation.\n    \"\"\"\n    ANGLED = \"angled\"\n    CURVED = \"curved\"\n\n\n@dataclass\nclass Bookmark:\n    \"\"\"\n    The bookmark type serves as a well-defined target for an incoming simple\n    XLink.\n    \"\"\"\n    class Meta:\n        name = \"bookmark\"\n\n    id: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"required\": True,\n        }\n    )\n    name: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    element: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    position: Optional[int] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n\nclass BreathMarkValue(Enum):\n    \"\"\"\n    The breath-mark-value type represents the symbol used for a breath mark.\n    \"\"\"\n    VALUE = \"\"\n    COMMA = \"comma\"\n    TICK = \"tick\"\n    UPBOW = \"upbow\"\n    SALZEDO = \"salzedo\"\n\n\nclass CaesuraValue(Enum):\n    \"\"\"\n    The caesura-value type represents the shape of the caesura sign.\n    \"\"\"\n    NORMAL = \"normal\"\n    THICK = \"thick\"\n    SHORT = \"short\"\n    CURVED = \"curved\"\n    SINGLE = \"single\"\n    VALUE = \"\"\n\n\nclass CancelLocation(Enum):\n    \"\"\"The cancel-location type is used to indicate where a key signature\n    cancellation appears relative to a new key signature: to the left, to the\n    right, or before the barline and to the left.\n\n    It is left by default. For mid-measure key elements, a cancel-\n    location of before-barline should be treated like a cancel-location\n    of left.\n    \"\"\"\n    LEFT = \"left\"\n    RIGHT = \"right\"\n    BEFORE_BARLINE = \"before-barline\"\n\n\nclass CircularArrow(Enum):\n    \"\"\"\n    The circular-arrow type represents the direction in which a circular arrow\n    points, using Unicode arrow terminology.\n    \"\"\"\n    CLOCKWISE = \"clockwise\"\n    ANTICLOCKWISE = \"anticlockwise\"\n\n\nclass ClefSign(Enum):\n    \"\"\"The clef-sign type represents the different clef symbols.\n\n    The jianpu sign indicates that the music that follows should be in\n    jianpu numbered notation, just as the TAB sign indicates that the\n    music that follows should be in tablature notation. Unlike TAB, a\n    jianpu sign does not correspond to a visual clef notation. The none\n    sign is deprecated as of MusicXML 4.0. Use the clef element's print-\n    object attribute instead. When the none sign is used, notes should\n    be displayed as if in treble clef.\n    \"\"\"\n    G = \"G\"\n    F = \"F\"\n    C = \"C\"\n    PERCUSSION = \"percussion\"\n    TAB = \"TAB\"\n    JIANPU = \"jianpu\"\n    NONE = \"none\"\n\n\nclass CssFontSize(Enum):\n    \"\"\"\n    The css-font-size type includes the CSS font sizes used as an alternative\n    to a numeric point size.\n    \"\"\"\n    XX_SMALL = \"xx-small\"\n    X_SMALL = \"x-small\"\n    SMALL = \"small\"\n    MEDIUM = \"medium\"\n    LARGE = \"large\"\n    X_LARGE = \"x-large\"\n    XX_LARGE = \"xx-large\"\n\n\nclass DegreeSymbolValue(Enum):\n    \"\"\"\n    The degree-symbol-value type indicates which symbol should be used in\n    specifying a degree.\n    \"\"\"\n    MAJOR = \"major\"\n    MINOR = \"minor\"\n    AUGMENTED = \"augmented\"\n    DIMINISHED = \"diminished\"\n    HALF_DIMINISHED = \"half-diminished\"\n\n\nclass DegreeTypeValue(Enum):\n    \"\"\"\n    The degree-type-value type indicates whether the current degree element is\n    an addition, alteration, or subtraction to the kind of the current chord in\n    the harmony element.\n    \"\"\"\n    ADD = \"add\"\n    ALTER = \"alter\"\n    SUBTRACT = \"subtract\"\n\n\n@dataclass\nclass Distance:\n    \"\"\"The distance element represents standard distances between notation\n    elements in tenths.\n\n    The type attribute defines what type of distance is being defined.\n    Valid values include hyphen (for hyphens in lyrics) and beam.\n    \"\"\"\n    class Meta:\n        name = \"distance\"\n\n    value: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"required\": True,\n        }\n    )\n    type: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"required\": True,\n        }\n    )\n\n\nclass EffectValue(Enum):\n    \"\"\"The effect-value type represents pictograms for sound effect percussion\n    instruments.\n\n    The cannon, lotus flute, and megaphone values are in addition to\n    Stone's list.\n    \"\"\"\n    ANVIL = \"anvil\"\n    AUTO_HORN = \"auto horn\"\n    BIRD_WHISTLE = \"bird whistle\"\n    CANNON = \"cannon\"\n    DUCK_CALL = \"duck call\"\n    GUN_SHOT = \"gun shot\"\n    KLAXON_HORN = \"klaxon horn\"\n    LIONS_ROAR = \"lions roar\"\n    LOTUS_FLUTE = \"lotus flute\"\n    MEGAPHONE = \"megaphone\"\n    POLICE_WHISTLE = \"police whistle\"\n    SIREN = \"siren\"\n    SLIDE_WHISTLE = \"slide whistle\"\n    THUNDER_SHEET = \"thunder sheet\"\n    WIND_MACHINE = \"wind machine\"\n    WIND_WHISTLE = \"wind whistle\"\n\n\n@dataclass\nclass Empty:\n    \"\"\"\n    The empty type represents an empty element with no attributes.\n    \"\"\"\n    class Meta:\n        name = \"empty\"\n\n\nclass EnclosureShape(Enum):\n    \"\"\"The enclosure-shape type describes the shape and presence / absence of\n    an enclosure around text or symbols.\n\n    A bracket enclosure is similar to a rectangle with the bottom line\n    missing, as is common in jazz notation. An inverted-bracket\n    enclosure is similar to a rectangle with the top line missing.\n    \"\"\"\n    RECTANGLE = \"rectangle\"\n    SQUARE = \"square\"\n    OVAL = \"oval\"\n    CIRCLE = \"circle\"\n    BRACKET = \"bracket\"\n    INVERTED_BRACKET = \"inverted-bracket\"\n    TRIANGLE = \"triangle\"\n    DIAMOND = \"diamond\"\n    PENTAGON = \"pentagon\"\n    HEXAGON = \"hexagon\"\n    HEPTAGON = \"heptagon\"\n    OCTAGON = \"octagon\"\n    NONAGON = \"nonagon\"\n    DECAGON = \"decagon\"\n    NONE = \"none\"\n\n\nclass Fan(Enum):\n    \"\"\"\n    The fan type represents the type of beam fanning present on a note, used to\n    represent accelerandos and ritardandos.\n    \"\"\"\n    ACCEL = \"accel\"\n    RIT = \"rit\"\n    NONE = \"none\"\n\n\n@dataclass\nclass Feature:\n    \"\"\"The feature type is a part of the grouping element used for musical\n    analysis.\n\n    The type attribute represents the type of the feature and the\n    element content represents its value. This type is flexible to allow\n    for different analyses.\n    \"\"\"\n    class Meta:\n        name = \"feature\"\n\n    value: str = field(\n        default=\"\",\n        metadata={\n            \"required\": True,\n        }\n    )\n    type: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n\nclass FermataShape(Enum):\n    \"\"\"The fermata-shape type represents the shape of the fermata sign.\n\n    The empty value is equivalent to the normal value.\n    \"\"\"\n    NORMAL = \"normal\"\n    ANGLED = \"angled\"\n    SQUARE = \"square\"\n    DOUBLE_ANGLED = \"double-angled\"\n    DOUBLE_SQUARE = \"double-square\"\n    DOUBLE_DOT = \"double-dot\"\n    HALF_CURVE = \"half-curve\"\n    CURLEW = \"curlew\"\n    VALUE = \"\"\n\n\nclass FontStyle(Enum):\n    \"\"\"\n    The font-style type represents a simplified version of the CSS font-style\n    property.\n    \"\"\"\n    NORMAL = \"normal\"\n    ITALIC = \"italic\"\n\n\nclass FontWeight(Enum):\n    \"\"\"\n    The font-weight type represents a simplified version of the CSS font-weight\n    property.\n    \"\"\"\n    NORMAL = \"normal\"\n    BOLD = \"bold\"\n\n\nclass GlassValue(Enum):\n    \"\"\"\n    The glass-value type represents pictograms for glass percussion\n    instruments.\n    \"\"\"\n    GLASS_HARMONICA = \"glass harmonica\"\n    GLASS_HARP = \"glass harp\"\n    WIND_CHIMES = \"wind chimes\"\n\n\n@dataclass\nclass Glyph:\n    \"\"\"The glyph element represents what SMuFL glyph should be used for\n    different variations of symbols that are semantically identical.\n\n    The type attribute specifies what type of glyph is being defined.\n    The element value specifies what SMuFL glyph to use, including\n    recommended stylistic alternates. The SMuFL glyph name should match\n    the type. For instance, a type of quarter-rest would use values\n    restQuarter, restQuarterOld, or restQuarterZ. A type of g-clef-\n    ottava-bassa would use values gClef8vb, gClef8vbOld, or\n    gClef8vbCClef. A type of octave-shift-up-8 would use values ottava,\n    ottavaBassa, ottavaBassaBa, ottavaBassaVb, or octaveBassa.\n    \"\"\"\n    class Meta:\n        name = \"glyph\"\n\n    value: str = field(\n        default=\"\",\n        metadata={\n            \"required\": True,\n        }\n    )\n    type: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"required\": True,\n        }\n    )\n\n\nclass GroupBarlineValue(Enum):\n    \"\"\"\n    The group-barline-value type indicates if the group should have common\n    barlines.\n    \"\"\"\n    YES = \"yes\"\n    NO = \"no\"\n    MENSURSTRICH = \"Mensurstrich\"\n\n\nclass GroupSymbolValue(Enum):\n    \"\"\"\n    The group-symbol-value type indicates how the symbol for a group or multi-\n    staff part is indicated in the score.\n    \"\"\"\n    NONE = \"none\"\n    BRACE = \"brace\"\n    LINE = \"line\"\n    BRACKET = \"bracket\"\n    SQUARE = \"square\"\n\n\nclass HandbellValue(Enum):\n    \"\"\"\n    The handbell-value type represents the type of handbell technique being\n    notated.\n    \"\"\"\n    BELLTREE = \"belltree\"\n    DAMP = \"damp\"\n    ECHO = \"echo\"\n    GYRO = \"gyro\"\n    HAND_MARTELLATO = \"hand martellato\"\n    MALLET_LIFT = \"mallet lift\"\n    MALLET_TABLE = \"mallet table\"\n    MARTELLATO = \"martellato\"\n    MARTELLATO_LIFT = \"martellato lift\"\n    MUTED_MARTELLATO = \"muted martellato\"\n    PLUCK_LIFT = \"pluck lift\"\n    SWING = \"swing\"\n\n\nclass HarmonClosedLocation(Enum):\n    \"\"\"\n    The harmon-closed-location type indicates which portion of the symbol is\n    filled in when the corresponding harmon-closed-value is half.\n    \"\"\"\n    RIGHT = \"right\"\n    BOTTOM = \"bottom\"\n    LEFT = \"left\"\n    TOP = \"top\"\n\n\nclass HarmonClosedValue(Enum):\n    \"\"\"\n    The harmon-closed-value type represents whether the harmon mute is closed,\n    open, or half-open.\n    \"\"\"\n    YES = \"yes\"\n    NO = \"no\"\n    HALF = \"half\"\n\n\nclass HarmonyArrangement(Enum):\n    \"\"\"The harmony-arrangement type indicates how stacked chords and bass notes\n    are displayed within a harmony element.\n\n    The vertical value specifies that the second element appears below\n    the first. The horizontal value specifies that the second element\n    appears to the right of the first. The diagonal value specifies that\n    the second element appears both below and to the right of the first.\n    \"\"\"\n    VERTICAL = \"vertical\"\n    HORIZONTAL = \"horizontal\"\n    DIAGONAL = \"diagonal\"\n\n\nclass HarmonyType(Enum):\n    \"\"\"The harmony-type type differentiates different types of harmonies when\n    alternate harmonies are possible.\n\n    Explicit harmonies have all note present in the music; implied have\n    some notes missing but implied; alternate represents alternate\n    analyses.\n    \"\"\"\n    EXPLICIT = \"explicit\"\n    IMPLIED = \"implied\"\n    ALTERNATE = \"alternate\"\n\n\nclass HoleClosedLocation(Enum):\n    \"\"\"\n    The hole-closed-location type indicates which portion of the hole is filled\n    in when the corresponding hole-closed-value is half.\n    \"\"\"\n    RIGHT = \"right\"\n    BOTTOM = \"bottom\"\n    LEFT = \"left\"\n    TOP = \"top\"\n\n\nclass HoleClosedValue(Enum):\n    \"\"\"\n    The hole-closed-value type represents whether the hole is closed, open, or\n    half-open.\n    \"\"\"\n    YES = \"yes\"\n    NO = \"no\"\n    HALF = \"half\"\n\n\n@dataclass\nclass Instrument:\n    \"\"\"The instrument type distinguishes between score-instrument elements in a\n    score-part.\n\n    The id attribute is an IDREF back to the score-instrument ID. If\n    multiple score-instruments are specified in a score-part, there\n    should be an instrument element for each note in the part. Notes\n    that are shared between multiple score-instruments can have more\n    than one instrument element.\n    \"\"\"\n    class Meta:\n        name = \"instrument\"\n\n    id: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"required\": True,\n        }\n    )\n\n\n@dataclass\nclass InstrumentLink:\n    \"\"\"Multiple part-link elements can link a condensed part within a score\n    file to multiple MusicXML parts files.\n\n    For example, a \"Clarinet 1 and 2\" part in a score file could link to\n    separate \"Clarinet 1\" and \"Clarinet 2\" part files. The instrument-\n    link type distinguish which of the score-instruments within a score-\n    part are in which part file. The instrument-link id attribute refers\n    to a score-instrument id attribute.\n    \"\"\"\n    class Meta:\n        name = \"instrument-link\"\n\n    id: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"required\": True,\n        }\n    )\n\n\nclass KindValue(Enum):\n    \"\"\"A kind-value indicates the type of chord.\n\n    Degree elements can then add, subtract, or alter from these starting points. Values include:\n    Triads:\n    major (major third, perfect fifth)\n    minor (minor third, perfect fifth)\n    augmented (major third, augmented fifth)\n    diminished (minor third, diminished fifth)\n    Sevenths:\n    dominant (major triad, minor seventh)\n    major-seventh (major triad, major seventh)\n    minor-seventh (minor triad, minor seventh)\n    diminished-seventh (diminished triad, diminished seventh)\n    augmented-seventh (augmented triad, minor seventh)\n    half-diminished (diminished triad, minor seventh)\n    major-minor (minor triad, major seventh)\n    Sixths:\n    major-sixth (major triad, added sixth)\n    minor-sixth (minor triad, added sixth)\n    Ninths:\n    dominant-ninth (dominant-seventh, major ninth)\n    major-ninth (major-seventh, major ninth)\n    minor-ninth (minor-seventh, major ninth)\n    11ths (usually as the basis for alteration):\n    dominant-11th (dominant-ninth, perfect 11th)\n    major-11th (major-ninth, perfect 11th)\n    minor-11th (minor-ninth, perfect 11th)\n    13ths (usually as the basis for alteration):\n    dominant-13th (dominant-11th, major 13th)\n    major-13th (major-11th, major 13th)\n    minor-13th (minor-11th, major 13th)\n    Suspended:\n    suspended-second (major second, perfect fifth)\n    suspended-fourth (perfect fourth, perfect fifth)\n    Functional sixths:\n    Neapolitan\n    Italian\n    French\n    German\n    Other:\n    pedal (pedal-point bass)\n    power (perfect fifth)\n    Tristan\n    The \"other\" kind is used when the harmony is entirely composed of add elements.\n    The \"none\" kind is used to explicitly encode absence of chords or functional harmony. In this case, the root, numeral, or function element has no meaning. When using the root or numeral element, the root-step or numeral-step text attribute should be set to the empty string to keep the root or numeral from being displayed.\n    \"\"\"\n    MAJOR = \"major\"\n    MINOR = \"minor\"\n    AUGMENTED = \"augmented\"\n    DIMINISHED = \"diminished\"\n    DOMINANT = \"dominant\"\n    MAJOR_SEVENTH = \"major-seventh\"\n    MINOR_SEVENTH = \"minor-seventh\"\n    DIMINISHED_SEVENTH = \"diminished-seventh\"\n    AUGMENTED_SEVENTH = \"augmented-seventh\"\n    HALF_DIMINISHED = \"half-diminished\"\n    MAJOR_MINOR = \"major-minor\"\n    MAJOR_SIXTH = \"major-sixth\"\n    MINOR_SIXTH = \"minor-sixth\"\n    DOMINANT_NINTH = \"dominant-ninth\"\n    MAJOR_NINTH = \"major-ninth\"\n    MINOR_NINTH = \"minor-ninth\"\n    DOMINANT_11TH = \"dominant-11th\"\n    MAJOR_11TH = \"major-11th\"\n    MINOR_11TH = \"minor-11th\"\n    DOMINANT_13TH = \"dominant-13th\"\n    MAJOR_13TH = \"major-13th\"\n    MINOR_13TH = \"minor-13th\"\n    SUSPENDED_SECOND = \"suspended-second\"\n    SUSPENDED_FOURTH = \"suspended-fourth\"\n    NEAPOLITAN = \"Neapolitan\"\n    ITALIAN = \"Italian\"\n    FRENCH = \"French\"\n    GERMAN = \"German\"\n    PEDAL = \"pedal\"\n    POWER = \"power\"\n    TRISTAN = \"Tristan\"\n    OTHER = \"other\"\n    NONE = \"none\"\n\n\nclass LeftCenterRight(Enum):\n    \"\"\"\n    The left-center-right type is used to define horizontal alignment and text\n    justification.\n    \"\"\"\n    LEFT = \"left\"\n    CENTER = \"center\"\n    RIGHT = \"right\"\n\n\nclass LeftRight(Enum):\n    \"\"\"\n    The left-right type is used to indicate whether one element appears to the\n    left or the right of another element.\n    \"\"\"\n    LEFT = \"left\"\n    RIGHT = \"right\"\n\n\nclass LineEnd(Enum):\n    \"\"\"\n    The line-end type specifies if there is a jog up or down (or both), an\n    arrow, or nothing at the start or end of a bracket.\n    \"\"\"\n    UP = \"up\"\n    DOWN = \"down\"\n    BOTH = \"both\"\n    ARROW = \"arrow\"\n    NONE = \"none\"\n\n\nclass LineLength(Enum):\n    \"\"\"\n    The line-length type distinguishes between different line lengths for doit,\n    falloff, plop, and scoop articulations.\n    \"\"\"\n    SHORT = \"short\"\n    MEDIUM = \"medium\"\n    LONG = \"long\"\n\n\nclass LineShape(Enum):\n    \"\"\"\n    The line-shape type distinguishes between straight and curved lines.\n    \"\"\"\n    STRAIGHT = \"straight\"\n    CURVED = \"curved\"\n\n\nclass LineType(Enum):\n    \"\"\"\n    The line-type type distinguishes between solid, dashed, dotted, and wavy\n    lines.\n    \"\"\"\n    SOLID = \"solid\"\n    DASHED = \"dashed\"\n    DOTTED = \"dotted\"\n    WAVY = \"wavy\"\n\n\n@dataclass\nclass LineWidth:\n    \"\"\"The line-width type indicates the width of a line type in tenths.\n\n    The type attribute defines what type of line is being defined.\n    Values include beam, bracket, dashes, enclosure, ending, extend,\n    heavy barline, leger, light barline, octave shift, pedal, slur\n    middle, slur tip, staff, stem, tie middle, tie tip, tuplet bracket,\n    and wedge. The text content is expressed in tenths.\n    \"\"\"\n    class Meta:\n        name = \"line-width\"\n\n    value: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"required\": True,\n        }\n    )\n    type: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"required\": True,\n        }\n    )\n\n\nclass MarginType(Enum):\n    \"\"\"\n    The margin-type type specifies whether margins apply to even page, odd\n    pages, or both.\n    \"\"\"\n    ODD = \"odd\"\n    EVEN = \"even\"\n    BOTH = \"both\"\n\n\n@dataclass\nclass MeasureLayout:\n    \"\"\"The measure-layout type includes the horizontal distance from the\n    previous measure.\n\n    It applies to the current measure only.\n\n    :ivar measure_distance: The measure-distance element specifies the\n        horizontal distance from the previous measure. This value is\n        only used for systems where there is horizontal whitespace in\n        the middle of a system, as in systems with codas. To specify the\n        measure width, use the width attribute of the measure element.\n    \"\"\"\n    class Meta:\n        name = \"measure-layout\"\n\n    measure_distance: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"measure-distance\",\n            \"type\": \"Element\",\n        }\n    )\n\n\nclass MeasureNumberingValue(Enum):\n    \"\"\"\n    The measure-numbering-value type describes how measure numbers are\n    displayed on this part: no numbers, numbers every measure, or numbers every\n    system.\n    \"\"\"\n    NONE = \"none\"\n    MEASURE = \"measure\"\n    SYSTEM = \"system\"\n\n\nclass MembraneValue(Enum):\n    \"\"\"\n    The membrane-value type represents pictograms for membrane percussion\n    instruments.\n    \"\"\"\n    BASS_DRUM = \"bass drum\"\n    BASS_DRUM_ON_SIDE = \"bass drum on side\"\n    BONGOS = \"bongos\"\n    CHINESE_TOMTOM = \"Chinese tomtom\"\n    CONGA_DRUM = \"conga drum\"\n    CUICA = \"cuica\"\n    GOBLET_DRUM = \"goblet drum\"\n    INDO_AMERICAN_TOMTOM = \"Indo-American tomtom\"\n    JAPANESE_TOMTOM = \"Japanese tomtom\"\n    MILITARY_DRUM = \"military drum\"\n    SNARE_DRUM = \"snare drum\"\n    SNARE_DRUM_SNARES_OFF = \"snare drum snares off\"\n    TABLA = \"tabla\"\n    TAMBOURINE = \"tambourine\"\n    TENOR_DRUM = \"tenor drum\"\n    TIMBALES = \"timbales\"\n    TOMTOM = \"tomtom\"\n\n\nclass MetalValue(Enum):\n    \"\"\"The metal-value type represents pictograms for metal percussion\n    instruments.\n\n    The hi-hat value refers to a pictogram like Stone's high-hat cymbals\n    but without the long vertical line at the bottom.\n    \"\"\"\n    AGOGO = \"agogo\"\n    ALMGLOCKEN = \"almglocken\"\n    BELL = \"bell\"\n    BELL_PLATE = \"bell plate\"\n    BELL_TREE = \"bell tree\"\n    BRAKE_DRUM = \"brake drum\"\n    CENCERRO = \"cencerro\"\n    CHAIN_RATTLE = \"chain rattle\"\n    CHINESE_CYMBAL = \"Chinese cymbal\"\n    COWBELL = \"cowbell\"\n    CRASH_CYMBALS = \"crash cymbals\"\n    CROTALE = \"crotale\"\n    CYMBAL_TONGS = \"cymbal tongs\"\n    DOMED_GONG = \"domed gong\"\n    FINGER_CYMBALS = \"finger cymbals\"\n    FLEXATONE = \"flexatone\"\n    GONG = \"gong\"\n    HI_HAT = \"hi-hat\"\n    HIGH_HAT_CYMBALS = \"high-hat cymbals\"\n    HANDBELL = \"handbell\"\n    JAW_HARP = \"jaw harp\"\n    JINGLE_BELLS = \"jingle bells\"\n    MUSICAL_SAW = \"musical saw\"\n    SHELL_BELLS = \"shell bells\"\n    SISTRUM = \"sistrum\"\n    SIZZLE_CYMBAL = \"sizzle cymbal\"\n    SLEIGH_BELLS = \"sleigh bells\"\n    SUSPENDED_CYMBAL = \"suspended cymbal\"\n    TAM_TAM = \"tam tam\"\n    TAM_TAM_WITH_BEATER = \"tam tam with beater\"\n    TRIANGLE = \"triangle\"\n    VIETNAMESE_HAT = \"Vietnamese hat\"\n\n\n@dataclass\nclass MidiDevice:\n    \"\"\"The midi-device type corresponds to the DeviceName meta event in\n    Standard MIDI Files.\n\n    The optional port attribute is a number from 1 to 16 that can be\n    used with the unofficial MIDI 1.0 port (or cable) meta event. Unlike\n    the DeviceName meta event, there can be multiple midi-device\n    elements per MusicXML part. The optional id attribute refers to the\n    score-instrument assigned to this device. If missing, the device\n    assignment affects all score-instrument elements in the score-part.\n    \"\"\"\n    class Meta:\n        name = \"midi-device\"\n\n    value: str = field(\n        default=\"\",\n        metadata={\n            \"required\": True,\n        }\n    )\n    port: Optional[int] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"min_inclusive\": 1,\n            \"max_inclusive\": 16,\n        }\n    )\n    id: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass MidiInstrument:\n    \"\"\"The midi-instrument type defines MIDI 1.0 instrument playback.\n\n    The midi-instrument element can be a part of either the score-\n    instrument element at the start of a part, or the sound element\n    within a part. The id attribute refers to the score-instrument\n    affected by the change.\n\n    :ivar midi_channel: The midi-channel element specifies a MIDI 1.0\n        channel numbers ranging from 1 to 16.\n    :ivar midi_name: The midi-name element corresponds to a ProgramName\n        meta-event within a Standard MIDI File.\n    :ivar midi_bank: The midi-bank element specifies a MIDI 1.0 bank\n        number ranging from 1 to 16,384.\n    :ivar midi_program: The midi-program element specifies a MIDI 1.0\n        program number ranging from 1 to 128.\n    :ivar midi_unpitched: For unpitched instruments, the midi-unpitched\n        element specifies a MIDI 1.0 note number ranging from 1 to 128.\n        It is usually used with MIDI banks for percussion. Note that\n        MIDI 1.0 note numbers are generally specified from 0 to 127\n        rather than the 1 to 128 numbering used in this element.\n    :ivar volume: The volume element value is a percentage of the\n        maximum ranging from 0 to 100, with decimal values allowed. This\n        corresponds to a scaling value for the MIDI 1.0 channel volume\n        controller.\n    :ivar pan: The pan and elevation elements allow placing of sound in\n        a 3-D space relative to the listener. Both are expressed in\n        degrees ranging from -180 to 180. For pan, 0 is straight ahead,\n        -90 is hard left, 90 is hard right, and -180 and 180 are\n        directly behind the listener.\n    :ivar elevation: The elevation and pan elements allow placing of\n        sound in a 3-D space relative to the listener. Both are\n        expressed in degrees ranging from -180 to 180. For elevation, 0\n        is level with the listener, 90 is directly above, and -90 is\n        directly below.\n    :ivar id:\n    \"\"\"\n    class Meta:\n        name = \"midi-instrument\"\n\n    midi_channel: Optional[int] = field(\n        default=None,\n        metadata={\n            \"name\": \"midi-channel\",\n            \"type\": \"Element\",\n            \"min_inclusive\": 1,\n            \"max_inclusive\": 16,\n        }\n    )\n    midi_name: Optional[str] = field(\n        default=None,\n        metadata={\n            \"name\": \"midi-name\",\n            \"type\": \"Element\",\n        }\n    )\n    midi_bank: Optional[int] = field(\n        default=None,\n        metadata={\n            \"name\": \"midi-bank\",\n            \"type\": \"Element\",\n            \"min_inclusive\": 1,\n            \"max_inclusive\": 16384,\n        }\n    )\n    midi_program: Optional[int] = field(\n        default=None,\n        metadata={\n            \"name\": \"midi-program\",\n            \"type\": \"Element\",\n            \"min_inclusive\": 1,\n            \"max_inclusive\": 128,\n        }\n    )\n    midi_unpitched: Optional[int] = field(\n        default=None,\n        metadata={\n            \"name\": \"midi-unpitched\",\n            \"type\": \"Element\",\n            \"min_inclusive\": 1,\n            \"max_inclusive\": 128,\n        }\n    )\n    volume: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n            \"min_inclusive\": Decimal(\"0\"),\n            \"max_inclusive\": Decimal(\"100\"),\n        }\n    )\n    pan: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n            \"min_inclusive\": Decimal(\"-180\"),\n            \"max_inclusive\": Decimal(\"180\"),\n        }\n    )\n    elevation: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n            \"min_inclusive\": Decimal(\"-180\"),\n            \"max_inclusive\": Decimal(\"180\"),\n        }\n    )\n    id: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"required\": True,\n        }\n    )\n\n\n@dataclass\nclass MiscellaneousField:\n    \"\"\"If a program has other metadata not yet supported in the MusicXML\n    format, each type of metadata can go in a miscellaneous-field element.\n\n    The required name attribute indicates the type of metadata the\n    element content represents.\n    \"\"\"\n    class Meta:\n        name = \"miscellaneous-field\"\n\n    value: str = field(\n        default=\"\",\n        metadata={\n            \"required\": True,\n        }\n    )\n    name: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"required\": True,\n        }\n    )\n\n\nclass Mute(Enum):\n    \"\"\"The mute type represents muting for different instruments, including\n    brass, winds, and strings.\n\n    The on and off values are used for undifferentiated mutes. The\n    remaining values represent specific mutes.\n    \"\"\"\n    ON = \"on\"\n    OFF = \"off\"\n    STRAIGHT = \"straight\"\n    CUP = \"cup\"\n    HARMON_NO_STEM = \"harmon-no-stem\"\n    HARMON_STEM = \"harmon-stem\"\n    BUCKET = \"bucket\"\n    PLUNGER = \"plunger\"\n    HAT = \"hat\"\n    SOLOTONE = \"solotone\"\n    PRACTICE = \"practice\"\n    STOP_MUTE = \"stop-mute\"\n    STOP_HAND = \"stop-hand\"\n    ECHO = \"echo\"\n    PALM = \"palm\"\n\n\nclass NoteSizeType(Enum):\n    \"\"\"The note-size-type type indicates the type of note being defined by a\n    note-size element.\n\n    The grace-cue type is used for notes of grace-cue size. The grace\n    type is used for notes of cue size that include a grace element. The\n    cue type is used for all other notes with cue size, whether defined\n    explicitly or implicitly via a cue element. The large type is used\n    for notes of large size.\n    \"\"\"\n    CUE = \"cue\"\n    GRACE = \"grace\"\n    GRACE_CUE = \"grace-cue\"\n    LARGE = \"large\"\n\n\nclass NoteTypeValue(Enum):\n    \"\"\"\n    The note-type-value type is used for the MusicXML type element and\n    represents the graphic note type, from 1024th (shortest) to maxima\n    (longest).\n    \"\"\"\n    VALUE_1024TH = \"1024th\"\n    VALUE_512TH = \"512th\"\n    VALUE_256TH = \"256th\"\n    VALUE_128TH = \"128th\"\n    VALUE_64TH = \"64th\"\n    VALUE_32ND = \"32nd\"\n    VALUE_16TH = \"16th\"\n    EIGHTH = \"eighth\"\n    QUARTER = \"quarter\"\n    HALF = \"half\"\n    WHOLE = \"whole\"\n    BREVE = \"breve\"\n    LONG = \"long\"\n    MAXIMA = \"maxima\"\n\n\nclass NoteheadValue(Enum):\n    \"\"\"The notehead-value type indicates shapes other than the open and closed\n    ovals associated with note durations.\n\n    The values do, re, mi, fa, fa up, so, la, and ti correspond to\n    Aikin's 7-shape system.  The fa up shape is typically used with\n    upstems; the fa shape is typically used with downstems or no stems.\n    The arrow shapes differ from triangle and inverted triangle by being\n    centered on the stem. Slashed and back slashed notes include both\n    the normal notehead and a slash. The triangle shape has the tip of\n    the triangle pointing up; the inverted triangle shape has the tip of\n    the triangle pointing down. The left triangle shape is a right\n    triangle with the hypotenuse facing up and to the left. The other\n    notehead covers noteheads other than those listed here. It is\n    usually used in combination with the smufl attribute to specify a\n    particular SMuFL notehead. The smufl attribute may be used with any\n    notehead value to help specify the appearance of symbols that share\n    the same MusicXML semantics. Noteheads in the SMuFL Note name\n    noteheads and Note name noteheads supplement ranges (U+E150–U+E1AF\n    and U+EEE0–U+EEFF) should not use the smufl attribute or the \"other\"\n    value, but instead use the notehead-text element.\n    \"\"\"\n    SLASH = \"slash\"\n    TRIANGLE = \"triangle\"\n    DIAMOND = \"diamond\"\n    SQUARE = \"square\"\n    CROSS = \"cross\"\n    X = \"x\"\n    CIRCLE_X = \"circle-x\"\n    INVERTED_TRIANGLE = \"inverted triangle\"\n    ARROW_DOWN = \"arrow down\"\n    ARROW_UP = \"arrow up\"\n    CIRCLED = \"circled\"\n    SLASHED = \"slashed\"\n    BACK_SLASHED = \"back slashed\"\n    NORMAL = \"normal\"\n    CLUSTER = \"cluster\"\n    CIRCLE_DOT = \"circle dot\"\n    LEFT_TRIANGLE = \"left triangle\"\n    RECTANGLE = \"rectangle\"\n    NONE = \"none\"\n    DO = \"do\"\n    RE = \"re\"\n    MI = \"mi\"\n    FA = \"fa\"\n    FA_UP = \"fa up\"\n    SO = \"so\"\n    LA = \"la\"\n    TI = \"ti\"\n    OTHER = \"other\"\n\n\nclass NumberOrNormalValue(Enum):\n    NORMAL = \"normal\"\n\n\nclass NumeralMode(Enum):\n    \"\"\"The numeral-mode type specifies the mode similar to the mode type, but\n    with a restricted set of values.\n\n    The different minor values are used to interpret numeral-root values\n    of 6 and 7 when present in a minor key. The harmonic minor value\n    sharpens the 7 and the melodic minor value sharpens both 6 and 7. If\n    a minor mode is used without qualification, either in the mode or\n    numeral-mode elements, natural minor is used.\n    \"\"\"\n    MAJOR = \"major\"\n    MINOR = \"minor\"\n    NATURAL_MINOR = \"natural minor\"\n    MELODIC_MINOR = \"melodic minor\"\n    HARMONIC_MINOR = \"harmonic minor\"\n\n\nclass OnOff(Enum):\n    \"\"\"\n    The on-off type is used for notation elements such as string mutes.\n    \"\"\"\n    ON = \"on\"\n    OFF = \"off\"\n\n\n@dataclass\nclass OtherAppearance:\n    \"\"\"The other-appearance type is used to define any graphical settings not\n    yet in the current version of the MusicXML format.\n\n    This allows extended representation, though without application\n    interoperability.\n    \"\"\"\n    class Meta:\n        name = \"other-appearance\"\n\n    value: str = field(\n        default=\"\",\n        metadata={\n            \"required\": True,\n        }\n    )\n    type: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"required\": True,\n        }\n    )\n\n\n@dataclass\nclass OtherListening:\n    \"\"\"The other-listening type represents other types of listening control and\n    interaction.\n\n    The required type attribute indicates the type of listening to which\n    the element content applies. The optional player and time-only\n    attributes restrict the element to apply to a single player or set\n    of times through a repeated section, respectively.\n    \"\"\"\n    class Meta:\n        name = \"other-listening\"\n\n    value: str = field(\n        default=\"\",\n        metadata={\n            \"required\": True,\n        }\n    )\n    type: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"required\": True,\n        }\n    )\n    player: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    time_only: Optional[str] = field(\n        default=None,\n        metadata={\n            \"name\": \"time-only\",\n            \"type\": \"Attribute\",\n            \"pattern\": r\"[1-9][0-9]*(, ?[1-9][0-9]*)*\",\n        }\n    )\n\n\n@dataclass\nclass OtherPlay:\n    \"\"\"The other-play element represents other types of playback.\n\n    The required type attribute indicates the type of playback to which\n    the element content applies.\n    \"\"\"\n    class Meta:\n        name = \"other-play\"\n\n    value: str = field(\n        default=\"\",\n        metadata={\n            \"required\": True,\n        }\n    )\n    type: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"required\": True,\n        }\n    )\n\n\n@dataclass\nclass OtherText:\n    \"\"\"The other-text type represents a text element with a smufl attribute\n    group.\n\n    This type is used by MusicXML direction extension elements to allow\n    specification of specific SMuFL glyphs without needed to add every\n    glyph as a MusicXML element.\n    \"\"\"\n    class Meta:\n        name = \"other-text\"\n\n    value: str = field(\n        default=\"\",\n        metadata={\n            \"required\": True,\n        }\n    )\n    smufl: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n\nclass OverUnder(Enum):\n    \"\"\"\n    The over-under type is used to indicate whether the tips of curved lines\n    such as slurs and ties are overhand (tips down) or underhand (tips up).\n    \"\"\"\n    OVER = \"over\"\n    UNDER = \"under\"\n\n\nclass PedalType(Enum):\n    \"\"\"The pedal-type simple type is used to distinguish types of pedal\n    directions.\n\n    The start value indicates the start of a damper pedal, while the\n    sostenuto value indicates the start of a sostenuto pedal. The other\n    values can be used with either the damper or sostenuto pedal. The\n    soft pedal is not included here because there is no special symbol\n    or graphic used for it beyond what can be specified with words and\n    bracket elements. The change, continue, discontinue, and resume\n    types are used when the line attribute is yes. The change type\n    indicates a pedal lift and retake indicated with an inverted V\n    marking. The continue type allows more precise formatting across\n    system breaks and for more complex pedaling lines. The discontinue\n    type indicates the end of a pedal line that does not include the\n    explicit lift represented by the stop type. The resume type\n    indicates the start of a pedal line that does not include the\n    downstroke represented by the start type. It can be used when a line\n    resumes after being discontinued, or to start a pedal line that is\n    preceded by a text or symbol representation of the pedal.\n    \"\"\"\n    START = \"start\"\n    STOP = \"stop\"\n    SOSTENUTO = \"sostenuto\"\n    CHANGE = \"change\"\n    CONTINUE = \"continue\"\n    DISCONTINUE = \"discontinue\"\n    RESUME = \"resume\"\n\n\nclass PitchedValue(Enum):\n    \"\"\"The pitched-value type represents pictograms for pitched percussion\n    instruments.\n\n    The chimes and tubular chimes values distinguish the single-line and\n    double-line versions of the pictogram.\n    \"\"\"\n    CELESTA = \"celesta\"\n    CHIMES = \"chimes\"\n    GLOCKENSPIEL = \"glockenspiel\"\n    LITHOPHONE = \"lithophone\"\n    MALLET = \"mallet\"\n    MARIMBA = \"marimba\"\n    STEEL_DRUMS = \"steel drums\"\n    TUBAPHONE = \"tubaphone\"\n    TUBULAR_CHIMES = \"tubular chimes\"\n    VIBRAPHONE = \"vibraphone\"\n    XYLOPHONE = \"xylophone\"\n\n\n@dataclass\nclass Player:\n    \"\"\"The player type allows for multiple players per score-part for use in\n    listening applications.\n\n    One player may play multiple instruments, while a single instrument\n    may include multiple players in divisi sections.\n\n    :ivar player_name: The player-name element is typically used within\n        a software application, rather than appearing on the printed\n        page of a score.\n    :ivar id:\n    \"\"\"\n    class Meta:\n        name = \"player\"\n\n    player_name: Optional[str] = field(\n        default=None,\n        metadata={\n            \"name\": \"player-name\",\n            \"type\": \"Element\",\n            \"required\": True,\n        }\n    )\n    id: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"required\": True,\n        }\n    )\n\n\nclass PositiveIntegerOrEmptyValue(Enum):\n    VALUE = \"\"\n\n\nclass PrincipalVoiceSymbol(Enum):\n    \"\"\"The principal-voice-symbol type represents the type of symbol used to\n    indicate a principal or secondary voice.\n\n    The \"plain\" value represents a plain square bracket. The value of\n    \"none\" is used for analysis markup when the principal-voice element\n    does not have a corresponding appearance in the score.\n    \"\"\"\n    HAUPTSTIMME = \"Hauptstimme\"\n    NEBENSTIMME = \"Nebenstimme\"\n    PLAIN = \"plain\"\n    NONE = \"none\"\n\n\nclass RightLeftMiddle(Enum):\n    \"\"\"\n    The right-left-middle type is used to specify barline location.\n    \"\"\"\n    RIGHT = \"right\"\n    LEFT = \"left\"\n    MIDDLE = \"middle\"\n\n\n@dataclass\nclass Scaling:\n    \"\"\"Margins, page sizes, and distances are all measured in tenths to keep\n    MusicXML data in a consistent coordinate system as much as possible.\n\n    The translation to absolute units is done with the scaling type,\n    which specifies how many millimeters are equal to how many tenths.\n    For a staff height of 7 mm, millimeters would be set to 7 while\n    tenths is set to 40. The ability to set a formula rather than a\n    single scaling factor helps avoid roundoff errors.\n    \"\"\"\n    class Meta:\n        name = \"scaling\"\n\n    millimeters: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n            \"required\": True,\n        }\n    )\n    tenths: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n            \"required\": True,\n        }\n    )\n\n\nclass SemiPitched(Enum):\n    \"\"\"\n    The semi-pitched type represents categories of indefinite pitch for\n    percussion instruments.\n    \"\"\"\n    HIGH = \"high\"\n    MEDIUM_HIGH = \"medium-high\"\n    MEDIUM = \"medium\"\n    MEDIUM_LOW = \"medium-low\"\n    LOW = \"low\"\n    VERY_LOW = \"very-low\"\n\n\nclass ShowFrets(Enum):\n    \"\"\"The show-frets type indicates whether to show tablature frets as numbers\n    (0, 1, 2) or letters (a, b, c).\n\n    The default choice is numbers.\n    \"\"\"\n    NUMBERS = \"numbers\"\n    LETTERS = \"letters\"\n\n\nclass ShowTuplet(Enum):\n    \"\"\"\n    The show-tuplet type indicates whether to show a part of a tuplet relating\n    to the tuplet-actual element, both the tuplet-actual and tuplet-normal\n    elements, or neither.\n    \"\"\"\n    ACTUAL = \"actual\"\n    BOTH = \"both\"\n    NONE = \"none\"\n\n\nclass StaffDivideSymbol(Enum):\n    \"\"\"The staff-divide-symbol type is used for staff division symbols.\n\n    The down, up, and up-down values correspond to SMuFL code points\n    U+E00B, U+E00C, and U+E00D respectively.\n    \"\"\"\n    DOWN = \"down\"\n    UP = \"up\"\n    UP_DOWN = \"up-down\"\n\n\n@dataclass\nclass StaffLayout:\n    \"\"\"Staff layout includes the vertical distance from the bottom line of the\n    previous staff in this system to the top line of the staff specified by the\n    number attribute.\n\n    The optional number attribute refers to staff numbers within the\n    part, from top to bottom on the system. A value of 1 is used if not\n    present. When used in the defaults element, the values apply to all\n    systems in all parts. When used in the print element, the values\n    apply to the current system only. This value is ignored for the\n    first staff in a system.\n    \"\"\"\n    class Meta:\n        name = \"staff-layout\"\n\n    staff_distance: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"staff-distance\",\n            \"type\": \"Element\",\n        }\n    )\n    number: Optional[int] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass StaffSize:\n    \"\"\"The staff-size element indicates how large a staff space is on this\n    staff, expressed as a percentage of the work's default scaling.\n\n    Values less than 100 make the staff space smaller while values over\n    100 make the staff space larger. A staff-type of cue, ossia, or\n    editorial implies a staff-size of less than 100, but the exact value\n    is implementation-dependent unless specified here. Staff size\n    affects staff height only, not the relationship of the staff to the\n    left and right margins. In some cases, a staff-size different than\n    100 also scales the notation on the staff, such as with a cue staff.\n    In other cases, such as percussion staves, the lines may be more\n    widely spaced without scaling the notation on the staff. The scaling\n    attribute allows these two cases to be distinguished. It specifies\n    the percentage scaling that applies to the notation. Values less\n    that 100 make the notation smaller while values over 100 make the\n    notation larger. The staff-size content and scaling attribute are\n    both non-negative decimal values.\n    \"\"\"\n    class Meta:\n        name = \"staff-size\"\n\n    value: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"required\": True,\n            \"min_inclusive\": Decimal(\"0\"),\n        }\n    )\n    scaling: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"min_inclusive\": Decimal(\"0\"),\n        }\n    )\n\n\nclass StaffType(Enum):\n    \"\"\"The staff-type value can be ossia, editorial, cue, alternate, or\n    regular.\n\n    An ossia staff represents music that can be played instead of what\n    appears on the regular staff. An editorial staff also represents\n    musical alternatives, but is created by an editor rather than the\n    composer. It can be used for suggested interpretations or\n    alternatives from other sources. A cue staff represents music from\n    another part. An alternate staff shares the same music as the prior\n    staff, but displayed differently (e.g., treble and bass clef,\n    standard notation and tablature). It is not included in playback. An\n    alternate staff provides more information to an application reading\n    a file than encoding the same music in separate parts, so its use is\n    preferred in this situation if feasible. A regular staff is the\n    standard default staff-type.\n    \"\"\"\n    OSSIA = \"ossia\"\n    EDITORIAL = \"editorial\"\n    CUE = \"cue\"\n    ALTERNATE = \"alternate\"\n    REGULAR = \"regular\"\n\n\nclass StartNote(Enum):\n    \"\"\"\n    The start-note type describes the starting note of trills and mordents for\n    playback, relative to the current note.\n    \"\"\"\n    UPPER = \"upper\"\n    MAIN = \"main\"\n    BELOW = \"below\"\n\n\nclass StartStop(Enum):\n    \"\"\"The start-stop type is used for an attribute of musical elements that\n    can either start or stop, such as tuplets.\n\n    The values of start and stop refer to how an element appears in\n    musical score order, not in MusicXML document order. An element with\n    a stop attribute may precede the corresponding element with a start\n    attribute within a MusicXML document. This is particularly common in\n    multi-staff music. For example, the stopping point for a tuplet may\n    appear in staff 1 before the starting point for the tuplet appears\n    in staff 2 later in the document. When multiple elements with the\n    same tag are used within the same note, their order within the\n    MusicXML document should match the musical score order.\n    \"\"\"\n    START = \"start\"\n    STOP = \"stop\"\n\n\nclass StartStopChangeContinue(Enum):\n    \"\"\"\n    The start-stop-change-continue type is used to distinguish types of pedal\n    directions.\n    \"\"\"\n    START = \"start\"\n    STOP = \"stop\"\n    CHANGE = \"change\"\n    CONTINUE = \"continue\"\n\n\nclass StartStopContinue(Enum):\n    \"\"\"The start-stop-continue type is used for an attribute of musical\n    elements that can either start or stop, but also need to refer to an\n    intermediate point in the symbol, as for complex slurs or for formatting of\n    symbols across system breaks.\n\n    The values of start, stop, and continue refer to how an element\n    appears in musical score order, not in MusicXML document order. An\n    element with a stop attribute may precede the corresponding element\n    with a start attribute within a MusicXML document. This is\n    particularly common in multi-staff music. For example, the stopping\n    point for a slur may appear in staff 1 before the starting point for\n    the slur appears in staff 2 later in the document. When multiple\n    elements with the same tag are used within the same note, their\n    order within the MusicXML document should match the musical score\n    order. For example, a note that marks both the end of one slur and\n    the start of a new slur should have the incoming slur element with a\n    type of stop precede the outgoing slur element with a type of start.\n    \"\"\"\n    START = \"start\"\n    STOP = \"stop\"\n    CONTINUE = \"continue\"\n\n\nclass StartStopDiscontinue(Enum):\n    \"\"\"The start-stop-discontinue type is used to specify ending types.\n\n    Typically, the start type is associated with the left barline of the\n    first measure in an ending. The stop and discontinue types are\n    associated with the right barline of the last measure in an ending.\n    Stop is used when the ending mark concludes with a downward jog, as\n    is typical for first endings. Discontinue is used when there is no\n    downward jog, as is typical for second endings that do not conclude\n    a piece.\n    \"\"\"\n    START = \"start\"\n    STOP = \"stop\"\n    DISCONTINUE = \"discontinue\"\n\n\nclass StartStopSingle(Enum):\n    \"\"\"The start-stop-single type is used for an attribute of musical elements\n    that can be used for either multi-note or single-note musical elements, as\n    for groupings.\n\n    When multiple elements with the same tag are used within the same\n    note, their order within the MusicXML document should match the\n    musical score order.\n    \"\"\"\n    START = \"start\"\n    STOP = \"stop\"\n    SINGLE = \"single\"\n\n\nclass StemValue(Enum):\n    \"\"\"\n    The stem-value type represents the notated stem direction.\n    \"\"\"\n    DOWN = \"down\"\n    UP = \"up\"\n    DOUBLE = \"double\"\n    NONE = \"none\"\n\n\nclass Step(Enum):\n    \"\"\"\n    The step type represents a step of the diatonic scale, represented using\n    the English letters A through G.\n    \"\"\"\n    A = \"A\"\n    B = \"B\"\n    C = \"C\"\n    D = \"D\"\n    E = \"E\"\n    F = \"F\"\n    G = \"G\"\n\n\nclass StickLocation(Enum):\n    \"\"\"\n    The stick-location type represents pictograms for the location of sticks,\n    beaters, or mallets on cymbals, gongs, drums, and other instruments.\n    \"\"\"\n    CENTER = \"center\"\n    RIM = \"rim\"\n    CYMBAL_BELL = \"cymbal bell\"\n    CYMBAL_EDGE = \"cymbal edge\"\n\n\nclass StickMaterial(Enum):\n    \"\"\"\n    The stick-material type represents the material being displayed in a stick\n    pictogram.\n    \"\"\"\n    SOFT = \"soft\"\n    MEDIUM = \"medium\"\n    HARD = \"hard\"\n    SHADED = \"shaded\"\n    X = \"x\"\n\n\nclass StickType(Enum):\n    \"\"\"\n    The stick-type type represents the shape of pictograms where the material\n    in the stick, mallet, or beater is represented in the pictogram.\n    \"\"\"\n    BASS_DRUM = \"bass drum\"\n    DOUBLE_BASS_DRUM = \"double bass drum\"\n    GLOCKENSPIEL = \"glockenspiel\"\n    GUM = \"gum\"\n    HAMMER = \"hammer\"\n    SUPERBALL = \"superball\"\n    TIMPANI = \"timpani\"\n    WOUND = \"wound\"\n    XYLOPHONE = \"xylophone\"\n    YARN = \"yarn\"\n\n\nclass SwingTypeValue(Enum):\n    \"\"\"\n    The swing-type-value type specifies the note type, either eighth or 16th,\n    to which the ratio defined in the swing element is applied.\n    \"\"\"\n    VALUE_16TH = \"16th\"\n    EIGHTH = \"eighth\"\n\n\nclass Syllabic(Enum):\n    \"\"\"Lyric hyphenation is indicated by the syllabic type.\n\n    The single, begin, end, and middle values represent single-syllable\n    words, word-beginning syllables, word-ending syllables, and mid-word\n    syllables, respectively.\n    \"\"\"\n    SINGLE = \"single\"\n    BEGIN = \"begin\"\n    END = \"end\"\n    MIDDLE = \"middle\"\n\n\nclass SymbolSize(Enum):\n    \"\"\"\n    The symbol-size type is used to distinguish between full, cue sized, grace\n    cue sized, and oversized symbols.\n    \"\"\"\n    FULL = \"full\"\n    CUE = \"cue\"\n    GRACE_CUE = \"grace-cue\"\n    LARGE = \"large\"\n\n\nclass SyncType(Enum):\n    \"\"\"The sync-type type specifies the style that a score following\n    application should use to synchronize an accompaniment with a performer.\n\n    The none type indicates no synchronization to the performer. The\n    tempo type indicates synchronization based on the performer tempo\n    rather than individual events in the score. The event type indicates\n    synchronization by following the performance of individual events in\n    the score rather than the performer tempo. The mostly-tempo and\n    mostly-event types combine these two approaches, with mostly-tempo\n    giving more weight to tempo and mostly-event giving more weight to\n    performed events. The always-event type provides the strictest\n    synchronization by not being forgiving of missing performed events.\n    \"\"\"\n    NONE = \"none\"\n    TEMPO = \"tempo\"\n    MOSTLY_TEMPO = \"mostly-tempo\"\n    MOSTLY_EVENT = \"mostly-event\"\n    EVENT = \"event\"\n    ALWAYS_EVENT = \"always-event\"\n\n\n@dataclass\nclass SystemMargins:\n    \"\"\"System margins are relative to the page margins.\n\n    Positive values indent and negative values reduce the margin size.\n    \"\"\"\n    class Meta:\n        name = \"system-margins\"\n\n    left_margin: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"left-margin\",\n            \"type\": \"Element\",\n            \"required\": True,\n        }\n    )\n    right_margin: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"right-margin\",\n            \"type\": \"Element\",\n            \"required\": True,\n        }\n    )\n\n\nclass SystemRelation(Enum):\n    \"\"\"The system-relation type distinguishes elements that are associated with\n    a system rather than the particular part where the element appears.\n\n    A value of only-top indicates that the element should appear only on\n    the top part of the current system. A value of also-top indicates\n    that the element should appear on both the current part and the top\n    part of the current system. If this value appears in a score, when\n    parts are created the element should only appear once in this part,\n    not twice. A value of none indicates that the element is associated\n    only with the current part, not with the system.\n    \"\"\"\n    ONLY_TOP = \"only-top\"\n    ALSO_TOP = \"also-top\"\n    NONE = \"none\"\n\n\nclass SystemRelationNumber(Enum):\n    \"\"\"The system-relation-number type distinguishes measure numbers that are\n    associated with a system rather than the particular part where the element\n    appears.\n\n    A value of only-top or only-bottom indicates that the number should\n    appear only on the top or bottom part of the current system,\n    respectively. A value of also-top or also-bottom indicates that the\n    number should appear on both the current part and the top or bottom\n    part of the current system, respectively. If these values appear in\n    a score, when parts are created the number should only appear once\n    in this part, not twice. A value of none indicates that the number\n    is associated only with the current part, not with the system.\n    \"\"\"\n    ONLY_TOP = \"only-top\"\n    ONLY_BOTTOM = \"only-bottom\"\n    ALSO_TOP = \"also-top\"\n    ALSO_BOTTOM = \"also-bottom\"\n    NONE = \"none\"\n\n\nclass TapHand(Enum):\n    \"\"\"The tap-hand type represents the symbol to use for a tap element.\n\n    The left and right values refer to the SMuFL guitarLeftHandTapping\n    and guitarRightHandTapping glyphs respectively.\n    \"\"\"\n    LEFT = \"left\"\n    RIGHT = \"right\"\n\n\nclass TextDirection(Enum):\n    \"\"\"The text-direction type is used to adjust and override the Unicode\n    bidirectional text algorithm, similar to the Directionality data category\n    in the W3C Internationalization Tag Set recommendation.\n\n    Values are ltr (left-to-right embed), rtl (right-to-left embed), lro\n    (left-to-right bidi-override), and rlo (right-to-left bidi-\n    override). The default value is ltr. This type is typically used by\n    applications that store text in left-to-right visual order rather\n    than logical order. Such applications can use the lro value to\n    better communicate with other applications that more fully support\n    bidirectional text.\n    \"\"\"\n    LTR = \"ltr\"\n    RTL = \"rtl\"\n    LRO = \"lro\"\n    RLO = \"rlo\"\n\n\nclass TiedType(Enum):\n    \"\"\"The tied-type type is used as an attribute of the tied element to\n    specify where the visual representation of a tie begins and ends.\n\n    A tied element which joins two notes of the same pitch can be\n    specified with tied-type start on the first note and tied-type stop\n    on the second note. To indicate a note should be undamped, use a\n    single tied element with tied-type let-ring. For other ties that are\n    visually attached to a single note, such as a tie leading into or\n    out of a repeated section or coda, use two tied elements on the same\n    note, one start and one stop. In start-stop cases, ties can add more\n    elements using a continue type. This is typically used to specify\n    the formatting of cross-system ties. When multiple elements with the\n    same tag are used within the same note, their order within the\n    MusicXML document should match the musical score order. For example,\n    a note with a tie at the end of a first ending should have the tied\n    element with a type of start precede the tied element with a type of\n    stop.\n    \"\"\"\n    START = \"start\"\n    STOP = \"stop\"\n    CONTINUE = \"continue\"\n    LET_RING = \"let-ring\"\n\n\nclass TimeRelation(Enum):\n    \"\"\"\n    The time-relation type indicates the symbol used to represent the\n    interchangeable aspect of dual time signatures.\n    \"\"\"\n    PARENTHESES = \"parentheses\"\n    BRACKET = \"bracket\"\n    EQUALS = \"equals\"\n    SLASH = \"slash\"\n    SPACE = \"space\"\n    HYPHEN = \"hyphen\"\n\n\nclass TimeSeparator(Enum):\n    \"\"\"The time-separator type indicates how to display the arrangement between\n    the beats and beat-type values in a time signature.\n\n    The default value is none. The horizontal, diagonal, and vertical\n    values represent horizontal, diagonal lower-left to upper-right, and\n    vertical lines respectively. For these values, the beats and beat-\n    type values are arranged on either side of the separator line. The\n    none value represents no separator with the beats and beat-type\n    arranged vertically. The adjacent value represents no separator with\n    the beats and beat-type arranged horizontally.\n    \"\"\"\n    NONE = \"none\"\n    HORIZONTAL = \"horizontal\"\n    DIAGONAL = \"diagonal\"\n    VERTICAL = \"vertical\"\n    ADJACENT = \"adjacent\"\n\n\nclass TimeSymbol(Enum):\n    \"\"\"The time-symbol type indicates how to display a time signature.\n\n    The normal value is the usual fractional display, and is the implied\n    symbol type if none is specified. Other options are the common and\n    cut time symbols, as well as a single number with an implied\n    denominator. The note symbol indicates that the beat-type should be\n    represented with the corresponding downstem note rather than a\n    number. The dotted-note symbol indicates that the beat-type should\n    be represented with a dotted downstem note that corresponds to three\n    times the beat-type value, and a numerator that is one third the\n    beats value.\n    \"\"\"\n    COMMON = \"common\"\n    CUT = \"cut\"\n    SINGLE_NUMBER = \"single-number\"\n    NOTE = \"note\"\n    DOTTED_NOTE = \"dotted-note\"\n    NORMAL = \"normal\"\n\n\n@dataclass\nclass Timpani:\n    \"\"\"The timpani type represents the timpani pictogram.\n\n    The smufl attribute is used to distinguish different SMuFL stylistic\n    alternates.\n    \"\"\"\n    class Meta:\n        name = \"timpani\"\n\n    smufl: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"pattern\": r\"pict\\c+\",\n        }\n    )\n\n\nclass TipDirection(Enum):\n    \"\"\"\n    The tip-direction type represents the direction in which the tip of a stick\n    or beater points, using Unicode arrow terminology.\n    \"\"\"\n    UP = \"up\"\n    DOWN = \"down\"\n    LEFT = \"left\"\n    RIGHT = \"right\"\n    NORTHWEST = \"northwest\"\n    NORTHEAST = \"northeast\"\n    SOUTHEAST = \"southeast\"\n    SOUTHWEST = \"southwest\"\n\n\nclass TopBottom(Enum):\n    \"\"\"\n    The top-bottom type is used to indicate the top or bottom part of a\n    vertical shape like non-arpeggiate.\n    \"\"\"\n    TOP = \"top\"\n    BOTTOM = \"bottom\"\n\n\nclass TremoloType(Enum):\n    \"\"\"\n    The tremolo-type is used to distinguish double-note, single-note, and\n    unmeasured tremolos.\n    \"\"\"\n    START = \"start\"\n    STOP = \"stop\"\n    SINGLE = \"single\"\n    UNMEASURED = \"unmeasured\"\n\n\nclass TrillStep(Enum):\n    \"\"\"\n    The trill-step type describes the alternating note of trills and mordents\n    for playback, relative to the current note.\n    \"\"\"\n    WHOLE = \"whole\"\n    HALF = \"half\"\n    UNISON = \"unison\"\n\n\nclass TwoNoteTurn(Enum):\n    \"\"\"\n    The two-note-turn type describes the ending notes of trills and mordents\n    for playback, relative to the current note.\n    \"\"\"\n    WHOLE = \"whole\"\n    HALF = \"half\"\n    NONE = \"none\"\n\n\n@dataclass\nclass TypedText:\n    \"\"\"\n    The typed-text type represents a text element with a type attribute.\n    \"\"\"\n    class Meta:\n        name = \"typed-text\"\n\n    value: str = field(\n        default=\"\",\n        metadata={\n            \"required\": True,\n        }\n    )\n    type: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n\nclass UpDown(Enum):\n    \"\"\"\n    The up-down type is used for the direction of arrows and other pointed\n    symbols like vertical accents, indicating which way the tip is pointing.\n    \"\"\"\n    UP = \"up\"\n    DOWN = \"down\"\n\n\nclass UpDownStopContinue(Enum):\n    \"\"\"\n    The up-down-stop-continue type is used for octave-shift elements,\n    indicating the direction of the shift from their true pitched values\n    because of printing difficulty.\n    \"\"\"\n    UP = \"up\"\n    DOWN = \"down\"\n    STOP = \"stop\"\n    CONTINUE = \"continue\"\n\n\nclass UprightInverted(Enum):\n    \"\"\"The upright-inverted type describes the appearance of a fermata element.\n\n    The value is upright if not specified.\n    \"\"\"\n    UPRIGHT = \"upright\"\n    INVERTED = \"inverted\"\n\n\nclass Valign(Enum):\n    \"\"\"The valign type is used to indicate vertical alignment to the top,\n    middle, bottom, or baseline of the text.\n\n    If the text is on multiple lines, baseline alignment refers to the\n    baseline of the lowest line of text. Defaults are implementation-\n    dependent.\n    \"\"\"\n    TOP = \"top\"\n    MIDDLE = \"middle\"\n    BOTTOM = \"bottom\"\n    BASELINE = \"baseline\"\n\n\nclass ValignImage(Enum):\n    \"\"\"The valign-image type is used to indicate vertical alignment for images\n    and graphics, so it does not include a baseline value.\n\n    Defaults are implementation-dependent.\n    \"\"\"\n    TOP = \"top\"\n    MIDDLE = \"middle\"\n    BOTTOM = \"bottom\"\n\n\n@dataclass\nclass VirtualInstrument:\n    \"\"\"\n    The virtual-instrument element defines a specific virtual instrument used\n    for an instrument sound.\n\n    :ivar virtual_library: The virtual-library element indicates the\n        virtual instrument library name.\n    :ivar virtual_name: The virtual-name element indicates the library-\n        specific name for the virtual instrument.\n    \"\"\"\n    class Meta:\n        name = \"virtual-instrument\"\n\n    virtual_library: Optional[str] = field(\n        default=None,\n        metadata={\n            \"name\": \"virtual-library\",\n            \"type\": \"Element\",\n        }\n    )\n    virtual_name: Optional[str] = field(\n        default=None,\n        metadata={\n            \"name\": \"virtual-name\",\n            \"type\": \"Element\",\n        }\n    )\n\n\n@dataclass\nclass Wait:\n    \"\"\"The wait type specifies a point where the accompaniment should wait for\n    a performer event before continuing.\n\n    This typically happens at the start of new sections or after a held\n    note or indeterminate music. These waiting points cannot always be\n    inferred reliably from the contents of the displayed score. The\n    optional player and time-only attributes restrict the type to apply\n    to a single player or set of times through a repeated section,\n    respectively.\n    \"\"\"\n    class Meta:\n        name = \"wait\"\n\n    player: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    time_only: Optional[str] = field(\n        default=None,\n        metadata={\n            \"name\": \"time-only\",\n            \"type\": \"Attribute\",\n            \"pattern\": r\"[1-9][0-9]*(, ?[1-9][0-9]*)*\",\n        }\n    )\n\n\nclass WedgeType(Enum):\n    \"\"\"The wedge type is crescendo for the start of a wedge that is closed at\n    the left side, diminuendo for the start of a wedge that is closed on the\n    right side, and stop for the end of a wedge.\n\n    The continue type is used for formatting wedges over a system break,\n    or for other situations where a single wedge is divided into\n    multiple segments.\n    \"\"\"\n    CRESCENDO = \"crescendo\"\n    DIMINUENDO = \"diminuendo\"\n    STOP = \"stop\"\n    CONTINUE = \"continue\"\n\n\nclass Winged(Enum):\n    \"\"\"The winged attribute indicates whether the repeat has winged extensions\n    that appear above and below the barline.\n\n    The straight and curved values represent single wings, while the\n    double-straight and double-curved values represent double wings. The\n    none value indicates no wings and is the default.\n    \"\"\"\n    NONE = \"none\"\n    STRAIGHT = \"straight\"\n    CURVED = \"curved\"\n    DOUBLE_STRAIGHT = \"double-straight\"\n    DOUBLE_CURVED = \"double-curved\"\n\n\nclass WoodValue(Enum):\n    \"\"\"The wood-value type represents pictograms for wood percussion\n    instruments.\n\n    The maraca and maracas values distinguish the one- and two-maraca\n    versions of the pictogram.\n    \"\"\"\n    BAMBOO_SCRAPER = \"bamboo scraper\"\n    BOARD_CLAPPER = \"board clapper\"\n    CABASA = \"cabasa\"\n    CASTANETS = \"castanets\"\n    CASTANETS_WITH_HANDLE = \"castanets with handle\"\n    CLAVES = \"claves\"\n    FOOTBALL_RATTLE = \"football rattle\"\n    GUIRO = \"guiro\"\n    LOG_DRUM = \"log drum\"\n    MARACA = \"maraca\"\n    MARACAS = \"maracas\"\n    QUIJADA = \"quijada\"\n    RAINSTICK = \"rainstick\"\n    RATCHET = \"ratchet\"\n    RECO_RECO = \"reco-reco\"\n    SANDPAPER_BLOCKS = \"sandpaper blocks\"\n    SLIT_DRUM = \"slit drum\"\n    TEMPLE_BLOCK = \"temple block\"\n    VIBRASLAP = \"vibraslap\"\n    WHIP = \"whip\"\n    WOOD_BLOCK = \"wood block\"\n\n\nclass YesNo(Enum):\n    \"\"\"The yes-no type is used for boolean-like attributes.\n\n    We cannot use W3C XML Schema booleans due to their restrictions on\n    expression of boolean values.\n    \"\"\"\n    YES = \"yes\"\n    NO = \"no\"\n\n\n@dataclass\nclass Accidental:\n    \"\"\"The accidental type represents actual notated accidentals.\n\n    Editorial and cautionary indications are indicated by attributes.\n    Values for these attributes are \"no\" if not present. Specific\n    graphic display such as parentheses, brackets, and size are\n    controlled by the level-display attribute group.\n    \"\"\"\n    class Meta:\n        name = \"accidental\"\n\n    value: Optional[AccidentalValue] = field(\n        default=None,\n        metadata={\n            \"required\": True,\n        }\n    )\n    cautionary: Optional[YesNo] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    editorial: Optional[YesNo] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    parentheses: Optional[YesNo] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    bracket: Optional[YesNo] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    size: Optional[SymbolSize] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    default_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    default_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_family: Optional[str] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-family\",\n            \"type\": \"Attribute\",\n            \"pattern\": r\"[^,]+(, ?[^,]+)*\",\n        }\n    )\n    font_style: Optional[FontStyle] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-style\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_size: Optional[Union[Decimal, CssFontSize]] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-size\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_weight: Optional[FontWeight] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-weight\",\n            \"type\": \"Attribute\",\n        }\n    )\n    color: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"pattern\": r\"#[\\dA-F]{6}([\\dA-F][\\dA-F])?\",\n        }\n    )\n    smufl: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"pattern\": r\"(acc|medRenFla|medRenNatura|medRenShar|kievanAccidental)(\\c+)\",\n        }\n    )\n\n\n@dataclass\nclass AccidentalMark:\n    \"\"\"An accidental-mark can be used as a separate notation or as part of an\n    ornament.\n\n    When used in an ornament, position and placement are relative to the\n    ornament, not relative to the note.\n    \"\"\"\n    class Meta:\n        name = \"accidental-mark\"\n\n    value: Optional[AccidentalValue] = field(\n        default=None,\n        metadata={\n            \"required\": True,\n        }\n    )\n    parentheses: Optional[YesNo] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    bracket: Optional[YesNo] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    size: Optional[SymbolSize] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    default_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    default_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_family: Optional[str] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-family\",\n            \"type\": \"Attribute\",\n            \"pattern\": r\"[^,]+(, ?[^,]+)*\",\n        }\n    )\n    font_style: Optional[FontStyle] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-style\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_size: Optional[Union[Decimal, CssFontSize]] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-size\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_weight: Optional[FontWeight] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-weight\",\n            \"type\": \"Attribute\",\n        }\n    )\n    color: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"pattern\": r\"#[\\dA-F]{6}([\\dA-F][\\dA-F])?\",\n        }\n    )\n    placement: Optional[AboveBelow] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    smufl: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"pattern\": r\"(acc|medRenFla|medRenNatura|medRenShar|kievanAccidental)(\\c+)\",\n        }\n    )\n    id: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass AccidentalText:\n    \"\"\"\n    The accidental-text type represents an element with an accidental value and\n    text-formatting attributes.\n    \"\"\"\n    class Meta:\n        name = \"accidental-text\"\n\n    value: Optional[AccidentalValue] = field(\n        default=None,\n        metadata={\n            \"required\": True,\n        }\n    )\n    justify: Optional[LeftCenterRight] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    default_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    default_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_family: Optional[str] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-family\",\n            \"type\": \"Attribute\",\n            \"pattern\": r\"[^,]+(, ?[^,]+)*\",\n        }\n    )\n    font_style: Optional[FontStyle] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-style\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_size: Optional[Union[Decimal, CssFontSize]] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-size\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_weight: Optional[FontWeight] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-weight\",\n            \"type\": \"Attribute\",\n        }\n    )\n    color: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"pattern\": r\"#[\\dA-F]{6}([\\dA-F][\\dA-F])?\",\n        }\n    )\n    halign: Optional[LeftCenterRight] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    valign: Optional[Valign] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    underline: Optional[int] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"min_inclusive\": 0,\n            \"max_inclusive\": 3,\n        }\n    )\n    overline: Optional[int] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"min_inclusive\": 0,\n            \"max_inclusive\": 3,\n        }\n    )\n    line_through: Optional[int] = field(\n        default=None,\n        metadata={\n            \"name\": \"line-through\",\n            \"type\": \"Attribute\",\n            \"min_inclusive\": 0,\n            \"max_inclusive\": 3,\n        }\n    )\n    rotation: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"min_inclusive\": Decimal(\"-180\"),\n            \"max_inclusive\": Decimal(\"180\"),\n        }\n    )\n    letter_spacing: Optional[Union[Decimal, NumberOrNormalValue]] = field(\n        default=None,\n        metadata={\n            \"name\": \"letter-spacing\",\n            \"type\": \"Attribute\",\n        }\n    )\n    line_height: Optional[Union[Decimal, NumberOrNormalValue]] = field(\n        default=None,\n        metadata={\n            \"name\": \"line-height\",\n            \"type\": \"Attribute\",\n        }\n    )\n    lang: Optional[Union[str, LangValue]] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"namespace\": \"http://www.w3.org/XML/1998/namespace\",\n        }\n    )\n    space: Optional[SpaceValue] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"namespace\": \"http://www.w3.org/XML/1998/namespace\",\n        }\n    )\n    dir: Optional[TextDirection] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    enclosure: Optional[EnclosureShape] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    smufl: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"pattern\": r\"(acc|medRenFla|medRenNatura|medRenShar|kievanAccidental)(\\c+)\",\n        }\n    )\n\n\n@dataclass\nclass Accord:\n    \"\"\"The accord type represents the tuning of a single string in the\n    scordatura element.\n\n    It uses the same group of elements as the staff-tuning element.\n    Strings are numbered from high to low.\n\n    :ivar tuning_step: The tuning-step element is represented like the\n        step element, with a different name to reflect its different\n        function in string tuning.\n    :ivar tuning_alter: The tuning-alter element is represented like the\n        alter element, with a different name to reflect its different\n        function in string tuning.\n    :ivar tuning_octave: The tuning-octave element is represented like\n        the octave element, with a different name to reflect its\n        different function in string tuning.\n    :ivar string:\n    \"\"\"\n    class Meta:\n        name = \"accord\"\n\n    tuning_step: Optional[Step] = field(\n        default=None,\n        metadata={\n            \"name\": \"tuning-step\",\n            \"type\": \"Element\",\n            \"required\": True,\n        }\n    )\n    tuning_alter: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"tuning-alter\",\n            \"type\": \"Element\",\n        }\n    )\n    tuning_octave: Optional[int] = field(\n        default=None,\n        metadata={\n            \"name\": \"tuning-octave\",\n            \"type\": \"Element\",\n            \"required\": True,\n            \"min_inclusive\": 0,\n            \"max_inclusive\": 9,\n        }\n    )\n    string: Optional[int] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass AccordionRegistration:\n    \"\"\"The accordion-registration type is used for accordion registration\n    symbols.\n\n    These are circular symbols divided horizontally into high, middle,\n    and low sections that correspond to 4', 8', and 16' pipes. Each\n    accordion-high, accordion-middle, and accordion-low element\n    represents the presence of one or more dots in the registration\n    diagram. An accordion-registration element needs to have at least\n    one of the child elements present.\n\n    :ivar accordion_high: The accordion-high element indicates the\n        presence of a dot in the high (4') section of the registration\n        symbol. This element is omitted if no dot is present.\n    :ivar accordion_middle: The accordion-middle element indicates the\n        presence of 1 to 3 dots in the middle (8') section of the\n        registration symbol. This element is omitted if no dots are\n        present.\n    :ivar accordion_low: The accordion-low element indicates the\n        presence of a dot in the low (16') section of the registration\n        symbol. This element is omitted if no dot is present.\n    :ivar default_x:\n    :ivar default_y:\n    :ivar relative_x:\n    :ivar relative_y:\n    :ivar font_family:\n    :ivar font_style:\n    :ivar font_size:\n    :ivar font_weight:\n    :ivar color:\n    :ivar halign:\n    :ivar valign:\n    :ivar id:\n    \"\"\"\n    class Meta:\n        name = \"accordion-registration\"\n\n    accordion_high: Optional[Empty] = field(\n        default=None,\n        metadata={\n            \"name\": \"accordion-high\",\n            \"type\": \"Element\",\n        }\n    )\n    accordion_middle: Optional[int] = field(\n        default=None,\n        metadata={\n            \"name\": \"accordion-middle\",\n            \"type\": \"Element\",\n            \"min_inclusive\": 1,\n            \"max_inclusive\": 3,\n        }\n    )\n    accordion_low: Optional[Empty] = field(\n        default=None,\n        metadata={\n            \"name\": \"accordion-low\",\n            \"type\": \"Element\",\n        }\n    )\n    default_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    default_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_family: Optional[str] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-family\",\n            \"type\": \"Attribute\",\n            \"pattern\": r\"[^,]+(, ?[^,]+)*\",\n        }\n    )\n    font_style: Optional[FontStyle] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-style\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_size: Optional[Union[Decimal, CssFontSize]] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-size\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_weight: Optional[FontWeight] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-weight\",\n            \"type\": \"Attribute\",\n        }\n    )\n    color: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"pattern\": r\"#[\\dA-F]{6}([\\dA-F][\\dA-F])?\",\n        }\n    )\n    halign: Optional[LeftCenterRight] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    valign: Optional[Valign] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    id: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass Arpeggiate:\n    \"\"\"The arpeggiate type indicates that this note is part of an arpeggiated\n    chord.\n\n    The number attribute can be used to distinguish between two\n    simultaneous chords arpeggiated separately (different numbers) or\n    together (same number). The direction attribute is used if there is\n    an arrow on the arpeggio sign. By default, arpeggios go from the\n    lowest to highest note.  The length of the sign can be determined\n    from the position attributes for the arpeggiate elements used with\n    the top and bottom notes of the arpeggiated chord. If the unbroken\n    attribute is set to yes, it indicates that the arpeggio continues\n    onto another staff within the part. This serves as a hint to\n    applications and is not required for cross-staff arpeggios.\n    \"\"\"\n    class Meta:\n        name = \"arpeggiate\"\n\n    number: Optional[int] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"min_inclusive\": 1,\n            \"max_inclusive\": 16,\n        }\n    )\n    direction: Optional[UpDown] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    unbroken: Optional[YesNo] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    default_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    default_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    placement: Optional[AboveBelow] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    color: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"pattern\": r\"#[\\dA-F]{6}([\\dA-F][\\dA-F])?\",\n        }\n    )\n    id: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass Arrow:\n    \"\"\"The arrow element represents an arrow used for a musical technical\n    indication.\n\n    It can represent both Unicode and SMuFL arrows. The presence of an\n    arrowhead element indicates that only the arrowhead is displayed,\n    not the arrow stem. The smufl attribute distinguishes different\n    SMuFL glyphs that have an arrow appearance such as arrowBlackUp,\n    guitarStrumUp, or handbellsSwingUp. The specified glyph should match\n    the descriptive representation.\n    \"\"\"\n    class Meta:\n        name = \"arrow\"\n\n    arrow_direction: Optional[ArrowDirection] = field(\n        default=None,\n        metadata={\n            \"name\": \"arrow-direction\",\n            \"type\": \"Element\",\n        }\n    )\n    arrow_style: Optional[ArrowStyle] = field(\n        default=None,\n        metadata={\n            \"name\": \"arrow-style\",\n            \"type\": \"Element\",\n        }\n    )\n    arrowhead: Optional[Empty] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    circular_arrow: Optional[CircularArrow] = field(\n        default=None,\n        metadata={\n            \"name\": \"circular-arrow\",\n            \"type\": \"Element\",\n        }\n    )\n    default_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    default_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_family: Optional[str] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-family\",\n            \"type\": \"Attribute\",\n            \"pattern\": r\"[^,]+(, ?[^,]+)*\",\n        }\n    )\n    font_style: Optional[FontStyle] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-style\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_size: Optional[Union[Decimal, CssFontSize]] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-size\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_weight: Optional[FontWeight] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-weight\",\n            \"type\": \"Attribute\",\n        }\n    )\n    color: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"pattern\": r\"#[\\dA-F]{6}([\\dA-F][\\dA-F])?\",\n        }\n    )\n    placement: Optional[AboveBelow] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    smufl: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass Assess:\n    \"\"\"By default, an assessment application should assess all notes without a\n    cue child element, and not assess any note with a cue child element.\n\n    The assess type allows this default assessment to be overridden for\n    individual notes. The optional player and time-only attributes\n    restrict the type to apply to a single player or set of times\n    through a repeated section, respectively. If missing, the type\n    applies to all players or all times through the repeated section,\n    respectively. The player attribute references the id attribute of a\n    player element defined within the matching score-part.\n    \"\"\"\n    class Meta:\n        name = \"assess\"\n\n    type: Optional[YesNo] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"required\": True,\n        }\n    )\n    player: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    time_only: Optional[str] = field(\n        default=None,\n        metadata={\n            \"name\": \"time-only\",\n            \"type\": \"Attribute\",\n            \"pattern\": r\"[1-9][0-9]*(, ?[1-9][0-9]*)*\",\n        }\n    )\n\n\n@dataclass\nclass BarStyleColor:\n    \"\"\"\n    The bar-style-color type contains barline style and color information.\n    \"\"\"\n    class Meta:\n        name = \"bar-style-color\"\n\n    value: Optional[BarStyle] = field(\n        default=None,\n        metadata={\n            \"required\": True,\n        }\n    )\n    color: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"pattern\": r\"#[\\dA-F]{6}([\\dA-F][\\dA-F])?\",\n        }\n    )\n\n\n@dataclass\nclass Barre:\n    \"\"\"The barre element indicates placing a finger over multiple strings on a\n    single fret.\n\n    The type is \"start\" for the lowest pitched string (e.g., the string\n    with the highest MusicXML number) and is \"stop\" for the highest\n    pitched string.\n    \"\"\"\n    class Meta:\n        name = \"barre\"\n\n    type: Optional[StartStop] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"required\": True,\n        }\n    )\n    color: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"pattern\": r\"#[\\dA-F]{6}([\\dA-F][\\dA-F])?\",\n        }\n    )\n\n\n@dataclass\nclass BassStep:\n    \"\"\"The bass-step type represents the pitch step of the bass of the current\n    chord within the harmony element.\n\n    The text attribute indicates how the bass should appear in a score\n    if not using the element contents.\n    \"\"\"\n    class Meta:\n        name = \"bass-step\"\n\n    value: Optional[Step] = field(\n        default=None,\n        metadata={\n            \"required\": True,\n        }\n    )\n    text: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    default_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    default_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_family: Optional[str] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-family\",\n            \"type\": \"Attribute\",\n            \"pattern\": r\"[^,]+(, ?[^,]+)*\",\n        }\n    )\n    font_style: Optional[FontStyle] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-style\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_size: Optional[Union[Decimal, CssFontSize]] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-size\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_weight: Optional[FontWeight] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-weight\",\n            \"type\": \"Attribute\",\n        }\n    )\n    color: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"pattern\": r\"#[\\dA-F]{6}([\\dA-F][\\dA-F])?\",\n        }\n    )\n\n\n@dataclass\nclass Beam:\n    \"\"\"Beam values include begin, continue, end, forward hook, and backward\n    hook.\n\n    Up to eight concurrent beams are available to cover up to 1024th\n    notes. Each beam in a note is represented with a separate beam\n    element, starting with the eighth note beam using a number attribute\n    of 1. Note that the beam number does not distinguish sets of beams\n    that overlap, as it does for slur and other elements. Beaming groups\n    are distinguished by being in different voices and/or the presence\n    or absence of grace and cue elements. Beams that have a begin value\n    can also have a fan attribute to indicate accelerandos and\n    ritardandos using fanned beams. The fan attribute may also be used\n    with a continue value if the fanning direction changes on that note.\n    The value is \"none\" if not specified. The repeater attribute has\n    been deprecated in MusicXML 3.0. Formerly used for tremolos, it\n    needs to be specified with a \"yes\" value for each beam using it.\n    \"\"\"\n    class Meta:\n        name = \"beam\"\n\n    value: Optional[BeamValue] = field(\n        default=None,\n        metadata={\n            \"required\": True,\n        }\n    )\n    number: int = field(\n        default=1,\n        metadata={\n            \"type\": \"Attribute\",\n            \"min_inclusive\": 1,\n            \"max_inclusive\": 8,\n        }\n    )\n    repeater: Optional[YesNo] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    fan: Optional[Fan] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    color: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"pattern\": r\"#[\\dA-F]{6}([\\dA-F][\\dA-F])?\",\n        }\n    )\n    id: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass BeatRepeat:\n    \"\"\"The beat-repeat type is used to indicate that a single beat (but\n    possibly many notes) is repeated.\n\n    The slashes attribute specifies the number of slashes to use in the\n    symbol. The use-dots attribute indicates whether or not to use dots\n    as well (for instance, with mixed rhythm patterns). The value for\n    slashes is 1 and the value for use-dots is no if not specified. The\n    stop type indicates the first beat where the repeats are no longer\n    displayed. Both the start and stop of the beat being repeated should\n    be specified unless the repeats are displayed through the end of the\n    part. The beat-repeat element specifies a notation style for\n    repetitions. The actual music being repeated needs to be repeated\n    within the MusicXML file. This element specifies the notation that\n    indicates the repeat.\n\n    :ivar slash_type: The slash-type element indicates the graphical\n        note type to use for the display of repetition marks.\n    :ivar slash_dot: The slash-dot element is used to specify any\n        augmentation dots in the note type used to display repetition\n        marks.\n    :ivar except_voice: The except-voice element is used to specify a\n        combination of slash notation and regular notation. Any note\n        elements that are in voices specified by the except-voice\n        elements are displayed in normal notation, in addition to the\n        slash notation that is always displayed.\n    :ivar type:\n    :ivar slashes:\n    :ivar use_dots:\n    \"\"\"\n    class Meta:\n        name = \"beat-repeat\"\n\n    slash_type: Optional[NoteTypeValue] = field(\n        default=None,\n        metadata={\n            \"name\": \"slash-type\",\n            \"type\": \"Element\",\n        }\n    )\n    slash_dot: List[Empty] = field(\n        default_factory=list,\n        metadata={\n            \"name\": \"slash-dot\",\n            \"type\": \"Element\",\n        }\n    )\n    except_voice: List[str] = field(\n        default_factory=list,\n        metadata={\n            \"name\": \"except-voice\",\n            \"type\": \"Element\",\n        }\n    )\n    type: Optional[StartStop] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"required\": True,\n        }\n    )\n    slashes: Optional[int] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    use_dots: Optional[YesNo] = field(\n        default=None,\n        metadata={\n            \"name\": \"use-dots\",\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass BeatUnitTied:\n    \"\"\"The beat-unit-tied type indicates a beat-unit within a metronome mark\n    that is tied to the preceding beat-unit.\n\n    This allows two or more tied notes to be associated with a per-\n    minute value in a metronome mark, whereas the metronome-tied element\n    is restricted to metric relationship marks.\n\n    :ivar beat_unit: The beat-unit element indicates the graphical note\n        type to use in a metronome mark.\n    :ivar beat_unit_dot: The beat-unit-dot element is used to specify\n        any augmentation dots for a metronome mark note.\n    \"\"\"\n    class Meta:\n        name = \"beat-unit-tied\"\n\n    beat_unit: Optional[NoteTypeValue] = field(\n        default=None,\n        metadata={\n            \"name\": \"beat-unit\",\n            \"type\": \"Element\",\n            \"required\": True,\n        }\n    )\n    beat_unit_dot: List[Empty] = field(\n        default_factory=list,\n        metadata={\n            \"name\": \"beat-unit-dot\",\n            \"type\": \"Element\",\n        }\n    )\n\n\n@dataclass\nclass Beater:\n    \"\"\"\n    The beater type represents pictograms for beaters, mallets, and sticks that\n    do not have different materials represented in the pictogram.\n    \"\"\"\n    class Meta:\n        name = \"beater\"\n\n    value: Optional[BeaterValue] = field(\n        default=None,\n        metadata={\n            \"required\": True,\n        }\n    )\n    tip: Optional[TipDirection] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass Bracket:\n    \"\"\"Brackets are combined with words in a variety of modern directions.\n\n    The line-end attribute specifies if there is a jog up or down (or\n    both), an arrow, or nothing at the start or end of the bracket. If\n    the line-end is up or down, the length of the jog can be specified\n    using the end-length attribute. The line-type is solid if not\n    specified.\n    \"\"\"\n    class Meta:\n        name = \"bracket\"\n\n    type: Optional[StartStopContinue] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"required\": True,\n        }\n    )\n    number: Optional[int] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"min_inclusive\": 1,\n            \"max_inclusive\": 16,\n        }\n    )\n    line_end: Optional[LineEnd] = field(\n        default=None,\n        metadata={\n            \"name\": \"line-end\",\n            \"type\": \"Attribute\",\n            \"required\": True,\n        }\n    )\n    end_length: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"end-length\",\n            \"type\": \"Attribute\",\n        }\n    )\n    line_type: Optional[LineType] = field(\n        default=None,\n        metadata={\n            \"name\": \"line-type\",\n            \"type\": \"Attribute\",\n        }\n    )\n    dash_length: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"dash-length\",\n            \"type\": \"Attribute\",\n        }\n    )\n    space_length: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"space-length\",\n            \"type\": \"Attribute\",\n        }\n    )\n    default_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    default_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    color: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"pattern\": r\"#[\\dA-F]{6}([\\dA-F][\\dA-F])?\",\n        }\n    )\n    id: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass BreathMark:\n    \"\"\"\n    The breath-mark element indicates a place to take a breath.\n    \"\"\"\n    class Meta:\n        name = \"breath-mark\"\n\n    value: Optional[BreathMarkValue] = field(\n        default=None,\n        metadata={\n            \"required\": True,\n        }\n    )\n    default_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    default_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_family: Optional[str] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-family\",\n            \"type\": \"Attribute\",\n            \"pattern\": r\"[^,]+(, ?[^,]+)*\",\n        }\n    )\n    font_style: Optional[FontStyle] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-style\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_size: Optional[Union[Decimal, CssFontSize]] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-size\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_weight: Optional[FontWeight] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-weight\",\n            \"type\": \"Attribute\",\n        }\n    )\n    color: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"pattern\": r\"#[\\dA-F]{6}([\\dA-F][\\dA-F])?\",\n        }\n    )\n    placement: Optional[AboveBelow] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass Caesura:\n    \"\"\"The caesura element indicates a slight pause.\n\n    It is notated using a \"railroad tracks\" symbol or other variations\n    specified in the element content.\n    \"\"\"\n    class Meta:\n        name = \"caesura\"\n\n    value: Optional[CaesuraValue] = field(\n        default=None,\n        metadata={\n            \"required\": True,\n        }\n    )\n    default_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    default_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_family: Optional[str] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-family\",\n            \"type\": \"Attribute\",\n            \"pattern\": r\"[^,]+(, ?[^,]+)*\",\n        }\n    )\n    font_style: Optional[FontStyle] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-style\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_size: Optional[Union[Decimal, CssFontSize]] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-size\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_weight: Optional[FontWeight] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-weight\",\n            \"type\": \"Attribute\",\n        }\n    )\n    color: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"pattern\": r\"#[\\dA-F]{6}([\\dA-F][\\dA-F])?\",\n        }\n    )\n    placement: Optional[AboveBelow] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass Cancel:\n    \"\"\"A cancel element indicates that the old key signature should be\n    cancelled before the new one appears.\n\n    This will always happen when changing to C major or A minor and need\n    not be specified then. The cancel value matches the fifths value of\n    the cancelled key signature (e.g., a cancel of -2 will provide an\n    explicit cancellation for changing from B flat major to F major).\n    The optional location attribute indicates where the cancellation\n    appears relative to the new key signature.\n    \"\"\"\n    class Meta:\n        name = \"cancel\"\n\n    value: Optional[int] = field(\n        default=None,\n        metadata={\n            \"required\": True,\n        }\n    )\n    location: Optional[CancelLocation] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass Clef:\n    \"\"\"Clefs are represented by a combination of sign, line, and clef-octave-\n    change elements.\n\n    The optional number attribute refers to staff numbers within the\n    part. A value of 1 is assumed if not present. Sometimes clefs are\n    added to the staff in non-standard line positions, either to\n    indicate cue passages, or when there are multiple clefs present\n    simultaneously on one staff. In this situation, the additional\n    attribute is set to \"yes\" and the line value is ignored. The size\n    attribute is used for clefs where the additional attribute is \"yes\".\n    It is typically used to indicate cue clefs. Sometimes clefs at the\n    start of a measure need to appear after the barline rather than\n    before, as for cues or for use after a repeated section. The after-\n    barline attribute is set to \"yes\" in this situation. The attribute\n    is ignored for mid-measure clefs. Clefs appear at the start of each\n    system unless the print-object attribute has been set to \"no\" or the\n    additional attribute has been set to \"yes\".\n\n    :ivar sign: The sign element represents the clef symbol.\n    :ivar line: Line numbers are counted from the bottom of the staff.\n        They are only needed with the G, F, and C signs in order to\n        position a pitch correctly on the staff. Standard values are 2\n        for the G sign (treble clef), 4 for the F sign (bass clef), and\n        3 for the C sign (alto clef). Line values can be used to specify\n        positions outside the staff, such as a C clef positioned in the\n        middle of a grand staff.\n    :ivar clef_octave_change: The clef-octave-change element is used for\n        transposing clefs. A treble clef for tenors would have a value\n        of -1.\n    :ivar number:\n    :ivar additional:\n    :ivar size:\n    :ivar after_barline:\n    :ivar default_x:\n    :ivar default_y:\n    :ivar relative_x:\n    :ivar relative_y:\n    :ivar font_family:\n    :ivar font_style:\n    :ivar font_size:\n    :ivar font_weight:\n    :ivar color:\n    :ivar print_object:\n    :ivar id:\n    \"\"\"\n    class Meta:\n        name = \"clef\"\n\n    sign: Optional[ClefSign] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n            \"required\": True,\n        }\n    )\n    line: Optional[int] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    clef_octave_change: Optional[int] = field(\n        default=None,\n        metadata={\n            \"name\": \"clef-octave-change\",\n            \"type\": \"Element\",\n        }\n    )\n    number: Optional[int] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    additional: Optional[YesNo] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    size: Optional[SymbolSize] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    after_barline: Optional[YesNo] = field(\n        default=None,\n        metadata={\n            \"name\": \"after-barline\",\n            \"type\": \"Attribute\",\n        }\n    )\n    default_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    default_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_family: Optional[str] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-family\",\n            \"type\": \"Attribute\",\n            \"pattern\": r\"[^,]+(, ?[^,]+)*\",\n        }\n    )\n    font_style: Optional[FontStyle] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-style\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_size: Optional[Union[Decimal, CssFontSize]] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-size\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_weight: Optional[FontWeight] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-weight\",\n            \"type\": \"Attribute\",\n        }\n    )\n    color: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"pattern\": r\"#[\\dA-F]{6}([\\dA-F][\\dA-F])?\",\n        }\n    )\n    print_object: Optional[YesNo] = field(\n        default=None,\n        metadata={\n            \"name\": \"print-object\",\n            \"type\": \"Attribute\",\n        }\n    )\n    id: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass Coda:\n    \"\"\"The coda type is the visual indicator of a coda sign.\n\n    The exact glyph can be specified with the smufl attribute. A sound\n    element is also needed to guide playback applications reliably.\n    \"\"\"\n    class Meta:\n        name = \"coda\"\n\n    default_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    default_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_family: Optional[str] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-family\",\n            \"type\": \"Attribute\",\n            \"pattern\": r\"[^,]+(, ?[^,]+)*\",\n        }\n    )\n    font_style: Optional[FontStyle] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-style\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_size: Optional[Union[Decimal, CssFontSize]] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-size\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_weight: Optional[FontWeight] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-weight\",\n            \"type\": \"Attribute\",\n        }\n    )\n    color: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"pattern\": r\"#[\\dA-F]{6}([\\dA-F][\\dA-F])?\",\n        }\n    )\n    halign: Optional[LeftCenterRight] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    valign: Optional[Valign] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    id: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    smufl: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"pattern\": r\"coda\\c*\",\n        }\n    )\n\n\n@dataclass\nclass Dashes:\n    \"\"\"The dashes type represents dashes, used for instance with cresc.\n\n    and dim. marks.\n    \"\"\"\n    class Meta:\n        name = \"dashes\"\n\n    type: Optional[StartStopContinue] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"required\": True,\n        }\n    )\n    number: Optional[int] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"min_inclusive\": 1,\n            \"max_inclusive\": 16,\n        }\n    )\n    dash_length: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"dash-length\",\n            \"type\": \"Attribute\",\n        }\n    )\n    space_length: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"space-length\",\n            \"type\": \"Attribute\",\n        }\n    )\n    default_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    default_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    color: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"pattern\": r\"#[\\dA-F]{6}([\\dA-F][\\dA-F])?\",\n        }\n    )\n    id: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass DegreeAlter:\n    \"\"\"The degree-alter type represents the chromatic alteration for the\n    current degree.\n\n    If the degree-type value is alter or subtract, the degree-alter\n    value is relative to the degree already in the chord based on its\n    kind element. If the degree-type value is add, the degree-alter is\n    relative to a dominant chord (major and perfect intervals except for\n    a minor seventh). The plus-minus attribute is used to indicate if\n    plus and minus symbols should be used instead of sharp and flat\n    symbols to display the degree alteration. It is no if not specified.\n    \"\"\"\n    class Meta:\n        name = \"degree-alter\"\n\n    value: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"required\": True,\n        }\n    )\n    default_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    default_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_family: Optional[str] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-family\",\n            \"type\": \"Attribute\",\n            \"pattern\": r\"[^,]+(, ?[^,]+)*\",\n        }\n    )\n    font_style: Optional[FontStyle] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-style\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_size: Optional[Union[Decimal, CssFontSize]] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-size\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_weight: Optional[FontWeight] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-weight\",\n            \"type\": \"Attribute\",\n        }\n    )\n    color: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"pattern\": r\"#[\\dA-F]{6}([\\dA-F][\\dA-F])?\",\n        }\n    )\n    plus_minus: Optional[YesNo] = field(\n        default=None,\n        metadata={\n            \"name\": \"plus-minus\",\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass DegreeType:\n    \"\"\"The degree-type type indicates if this degree is an addition,\n    alteration, or subtraction relative to the kind of the current chord.\n\n    The value of the degree-type element affects the interpretation of\n    the value of the degree-alter element. The text attribute specifies\n    how the type of the degree should be displayed.\n    \"\"\"\n    class Meta:\n        name = \"degree-type\"\n\n    value: Optional[DegreeTypeValue] = field(\n        default=None,\n        metadata={\n            \"required\": True,\n        }\n    )\n    text: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    default_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    default_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_family: Optional[str] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-family\",\n            \"type\": \"Attribute\",\n            \"pattern\": r\"[^,]+(, ?[^,]+)*\",\n        }\n    )\n    font_style: Optional[FontStyle] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-style\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_size: Optional[Union[Decimal, CssFontSize]] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-size\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_weight: Optional[FontWeight] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-weight\",\n            \"type\": \"Attribute\",\n        }\n    )\n    color: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"pattern\": r\"#[\\dA-F]{6}([\\dA-F][\\dA-F])?\",\n        }\n    )\n\n\n@dataclass\nclass DegreeValue:\n    \"\"\"The content of the degree-value type is a number indicating the degree\n    of the chord (1 for the root, 3 for third, etc).\n\n    The text attribute specifies how the value of the degree should be\n    displayed. The symbol attribute indicates that a symbol should be\n    used in specifying the degree. If the symbol attribute is present,\n    the value of the text attribute follows the symbol.\n    \"\"\"\n    class Meta:\n        name = \"degree-value\"\n\n    value: Optional[int] = field(\n        default=None,\n        metadata={\n            \"required\": True,\n        }\n    )\n    symbol: Optional[DegreeSymbolValue] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    text: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    default_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    default_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_family: Optional[str] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-family\",\n            \"type\": \"Attribute\",\n            \"pattern\": r\"[^,]+(, ?[^,]+)*\",\n        }\n    )\n    font_style: Optional[FontStyle] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-style\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_size: Optional[Union[Decimal, CssFontSize]] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-size\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_weight: Optional[FontWeight] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-weight\",\n            \"type\": \"Attribute\",\n        }\n    )\n    color: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"pattern\": r\"#[\\dA-F]{6}([\\dA-F][\\dA-F])?\",\n        }\n    )\n\n\n@dataclass\nclass Double:\n    \"\"\"The double type indicates that the music is doubled one octave from what\n    is currently written.\n\n    If the above attribute is set to yes, the doubling is one octave\n    above what is written, as for mixed flute / piccolo parts in band\n    literature. Otherwise the doubling is one octave below what is\n    written, as for mixed cello / bass parts in orchestral literature.\n    \"\"\"\n    class Meta:\n        name = \"double\"\n\n    above: Optional[YesNo] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass Dynamics:\n    \"\"\"Dynamics can be associated either with a note or a general musical\n    direction.\n\n    To avoid inconsistencies between and amongst the letter\n    abbreviations for dynamics (what is sf vs. sfz, standing alone or\n    with a trailing dynamic that is not always piano), we use the actual\n    letters as the names of these dynamic elements. The other-dynamics\n    element allows other dynamic marks that are not covered here.\n    Dynamics elements may also be combined to create marks not covered\n    by a single element, such as sfmp. These letter dynamic symbols are\n    separated from crescendo, decrescendo, and wedge indications.\n    Dynamic representation is inconsistent in scores. Many things are\n    assumed by the composer and left out, such as returns to original\n    dynamics. The MusicXML format captures what is in the score, but\n    does not try to be optimal for analysis or synthesis of dynamics.\n    The placement attribute is used when the dynamics are associated\n    with a note. It is ignored when the dynamics are associated with a\n    direction. In that case the direction element's placement attribute\n    is used instead.\n    \"\"\"\n    class Meta:\n        name = \"dynamics\"\n\n    p: List[Empty] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    pp: List[Empty] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    ppp: List[Empty] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    pppp: List[Empty] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    ppppp: List[Empty] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    pppppp: List[Empty] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    f: List[Empty] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    ff: List[Empty] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    fff: List[Empty] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    ffff: List[Empty] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    fffff: List[Empty] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    ffffff: List[Empty] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    mp: List[Empty] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    mf: List[Empty] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    sf: List[Empty] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    sfp: List[Empty] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    sfpp: List[Empty] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    fp: List[Empty] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    rf: List[Empty] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    rfz: List[Empty] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    sfz: List[Empty] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    sffz: List[Empty] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    fz: List[Empty] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    n: List[Empty] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    pf: List[Empty] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    sfzp: List[Empty] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    other_dynamics: List[OtherText] = field(\n        default_factory=list,\n        metadata={\n            \"name\": \"other-dynamics\",\n            \"type\": \"Element\",\n        }\n    )\n    default_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    default_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_family: Optional[str] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-family\",\n            \"type\": \"Attribute\",\n            \"pattern\": r\"[^,]+(, ?[^,]+)*\",\n        }\n    )\n    font_style: Optional[FontStyle] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-style\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_size: Optional[Union[Decimal, CssFontSize]] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-size\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_weight: Optional[FontWeight] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-weight\",\n            \"type\": \"Attribute\",\n        }\n    )\n    color: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"pattern\": r\"#[\\dA-F]{6}([\\dA-F][\\dA-F])?\",\n        }\n    )\n    halign: Optional[LeftCenterRight] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    valign: Optional[Valign] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    placement: Optional[AboveBelow] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    underline: Optional[int] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"min_inclusive\": 0,\n            \"max_inclusive\": 3,\n        }\n    )\n    overline: Optional[int] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"min_inclusive\": 0,\n            \"max_inclusive\": 3,\n        }\n    )\n    line_through: Optional[int] = field(\n        default=None,\n        metadata={\n            \"name\": \"line-through\",\n            \"type\": \"Attribute\",\n            \"min_inclusive\": 0,\n            \"max_inclusive\": 3,\n        }\n    )\n    enclosure: Optional[EnclosureShape] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    id: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass Effect:\n    \"\"\"The effect type represents pictograms for sound effect percussion\n    instruments.\n\n    The smufl attribute is used to distinguish different SMuFL stylistic\n    alternates.\n    \"\"\"\n    class Meta:\n        name = \"effect\"\n\n    value: Optional[EffectValue] = field(\n        default=None,\n        metadata={\n            \"required\": True,\n        }\n    )\n    smufl: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"pattern\": r\"pict\\c+\",\n        }\n    )\n\n\n@dataclass\nclass Elision:\n    \"\"\"The elision type represents an elision between lyric syllables.\n\n    The text content specifies the symbol used to display the elision.\n    Common values are a no-break space (Unicode 00A0), an underscore\n    (Unicode 005F), or an undertie (Unicode 203F). If the text content\n    is empty, the smufl attribute is used to specify the symbol to use.\n    Its value is a SMuFL canonical glyph name that starts with lyrics.\n    The SMuFL attribute is ignored if the elision glyph is already\n    specified by the text content. If neither text content nor a smufl\n    attribute are present, the elision glyph is application-specific.\n    \"\"\"\n    class Meta:\n        name = \"elision\"\n\n    value: str = field(\n        default=\"\",\n        metadata={\n            \"required\": True,\n        }\n    )\n    font_family: Optional[str] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-family\",\n            \"type\": \"Attribute\",\n            \"pattern\": r\"[^,]+(, ?[^,]+)*\",\n        }\n    )\n    font_style: Optional[FontStyle] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-style\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_size: Optional[Union[Decimal, CssFontSize]] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-size\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_weight: Optional[FontWeight] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-weight\",\n            \"type\": \"Attribute\",\n        }\n    )\n    color: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"pattern\": r\"#[\\dA-F]{6}([\\dA-F][\\dA-F])?\",\n        }\n    )\n    smufl: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"pattern\": r\"lyrics\\c+\",\n        }\n    )\n\n\n@dataclass\nclass EmptyFont:\n    \"\"\"\n    The empty-font type represents an empty element with font attributes.\n    \"\"\"\n    class Meta:\n        name = \"empty-font\"\n\n    font_family: Optional[str] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-family\",\n            \"type\": \"Attribute\",\n            \"pattern\": r\"[^,]+(, ?[^,]+)*\",\n        }\n    )\n    font_style: Optional[FontStyle] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-style\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_size: Optional[Union[Decimal, CssFontSize]] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-size\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_weight: Optional[FontWeight] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-weight\",\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass EmptyLine:\n    \"\"\"\n    The empty-line type represents an empty element with line-shape, line-type,\n    line-length, dashed-formatting, print-style and placement attributes.\n    \"\"\"\n    class Meta:\n        name = \"empty-line\"\n\n    line_shape: Optional[LineShape] = field(\n        default=None,\n        metadata={\n            \"name\": \"line-shape\",\n            \"type\": \"Attribute\",\n        }\n    )\n    line_type: Optional[LineType] = field(\n        default=None,\n        metadata={\n            \"name\": \"line-type\",\n            \"type\": \"Attribute\",\n        }\n    )\n    line_length: Optional[LineLength] = field(\n        default=None,\n        metadata={\n            \"name\": \"line-length\",\n            \"type\": \"Attribute\",\n        }\n    )\n    dash_length: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"dash-length\",\n            \"type\": \"Attribute\",\n        }\n    )\n    space_length: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"space-length\",\n            \"type\": \"Attribute\",\n        }\n    )\n    default_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    default_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_family: Optional[str] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-family\",\n            \"type\": \"Attribute\",\n            \"pattern\": r\"[^,]+(, ?[^,]+)*\",\n        }\n    )\n    font_style: Optional[FontStyle] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-style\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_size: Optional[Union[Decimal, CssFontSize]] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-size\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_weight: Optional[FontWeight] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-weight\",\n            \"type\": \"Attribute\",\n        }\n    )\n    color: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"pattern\": r\"#[\\dA-F]{6}([\\dA-F][\\dA-F])?\",\n        }\n    )\n    placement: Optional[AboveBelow] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass EmptyPlacement:\n    \"\"\"\n    The empty-placement type represents an empty element with print-style and\n    placement attributes.\n    \"\"\"\n    class Meta:\n        name = \"empty-placement\"\n\n    default_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    default_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_family: Optional[str] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-family\",\n            \"type\": \"Attribute\",\n            \"pattern\": r\"[^,]+(, ?[^,]+)*\",\n        }\n    )\n    font_style: Optional[FontStyle] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-style\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_size: Optional[Union[Decimal, CssFontSize]] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-size\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_weight: Optional[FontWeight] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-weight\",\n            \"type\": \"Attribute\",\n        }\n    )\n    color: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"pattern\": r\"#[\\dA-F]{6}([\\dA-F][\\dA-F])?\",\n        }\n    )\n    placement: Optional[AboveBelow] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass EmptyPlacementSmufl:\n    \"\"\"\n    The empty-placement-smufl type represents an empty element with print-\n    style, placement, and smufl attributes.\n    \"\"\"\n    class Meta:\n        name = \"empty-placement-smufl\"\n\n    default_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    default_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_family: Optional[str] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-family\",\n            \"type\": \"Attribute\",\n            \"pattern\": r\"[^,]+(, ?[^,]+)*\",\n        }\n    )\n    font_style: Optional[FontStyle] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-style\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_size: Optional[Union[Decimal, CssFontSize]] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-size\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_weight: Optional[FontWeight] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-weight\",\n            \"type\": \"Attribute\",\n        }\n    )\n    color: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"pattern\": r\"#[\\dA-F]{6}([\\dA-F][\\dA-F])?\",\n        }\n    )\n    placement: Optional[AboveBelow] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    smufl: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass EmptyPrintObjectStyleAlign:\n    \"\"\"\n    The empty-print-style-align-object type represents an empty element with\n    print-object and print-style-align attribute groups.\n    \"\"\"\n    class Meta:\n        name = \"empty-print-object-style-align\"\n\n    print_object: Optional[YesNo] = field(\n        default=None,\n        metadata={\n            \"name\": \"print-object\",\n            \"type\": \"Attribute\",\n        }\n    )\n    default_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    default_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_family: Optional[str] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-family\",\n            \"type\": \"Attribute\",\n            \"pattern\": r\"[^,]+(, ?[^,]+)*\",\n        }\n    )\n    font_style: Optional[FontStyle] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-style\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_size: Optional[Union[Decimal, CssFontSize]] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-size\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_weight: Optional[FontWeight] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-weight\",\n            \"type\": \"Attribute\",\n        }\n    )\n    color: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"pattern\": r\"#[\\dA-F]{6}([\\dA-F][\\dA-F])?\",\n        }\n    )\n    halign: Optional[LeftCenterRight] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    valign: Optional[Valign] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass EmptyPrintStyle:\n    \"\"\"\n    The empty-print-style type represents an empty element with print-style\n    attribute group.\n    \"\"\"\n    class Meta:\n        name = \"empty-print-style\"\n\n    default_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    default_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_family: Optional[str] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-family\",\n            \"type\": \"Attribute\",\n            \"pattern\": r\"[^,]+(, ?[^,]+)*\",\n        }\n    )\n    font_style: Optional[FontStyle] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-style\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_size: Optional[Union[Decimal, CssFontSize]] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-size\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_weight: Optional[FontWeight] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-weight\",\n            \"type\": \"Attribute\",\n        }\n    )\n    color: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"pattern\": r\"#[\\dA-F]{6}([\\dA-F][\\dA-F])?\",\n        }\n    )\n\n\n@dataclass\nclass EmptyPrintStyleAlign:\n    \"\"\"\n    The empty-print-style-align type represents an empty element with print-\n    style-align attribute group.\n    \"\"\"\n    class Meta:\n        name = \"empty-print-style-align\"\n\n    default_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    default_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_family: Optional[str] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-family\",\n            \"type\": \"Attribute\",\n            \"pattern\": r\"[^,]+(, ?[^,]+)*\",\n        }\n    )\n    font_style: Optional[FontStyle] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-style\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_size: Optional[Union[Decimal, CssFontSize]] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-size\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_weight: Optional[FontWeight] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-weight\",\n            \"type\": \"Attribute\",\n        }\n    )\n    color: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"pattern\": r\"#[\\dA-F]{6}([\\dA-F][\\dA-F])?\",\n        }\n    )\n    halign: Optional[LeftCenterRight] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    valign: Optional[Valign] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass EmptyPrintStyleAlignId:\n    \"\"\"\n    The empty-print-style-align-id type represents an empty element with print-\n    style-align and optional-unique-id attribute groups.\n    \"\"\"\n    class Meta:\n        name = \"empty-print-style-align-id\"\n\n    default_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    default_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_family: Optional[str] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-family\",\n            \"type\": \"Attribute\",\n            \"pattern\": r\"[^,]+(, ?[^,]+)*\",\n        }\n    )\n    font_style: Optional[FontStyle] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-style\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_size: Optional[Union[Decimal, CssFontSize]] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-size\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_weight: Optional[FontWeight] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-weight\",\n            \"type\": \"Attribute\",\n        }\n    )\n    color: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"pattern\": r\"#[\\dA-F]{6}([\\dA-F][\\dA-F])?\",\n        }\n    )\n    halign: Optional[LeftCenterRight] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    valign: Optional[Valign] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    id: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass EmptyTrillSound:\n    \"\"\"\n    The empty-trill-sound type represents an empty element with print-style,\n    placement, and trill-sound attributes.\n    \"\"\"\n    class Meta:\n        name = \"empty-trill-sound\"\n\n    default_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    default_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_family: Optional[str] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-family\",\n            \"type\": \"Attribute\",\n            \"pattern\": r\"[^,]+(, ?[^,]+)*\",\n        }\n    )\n    font_style: Optional[FontStyle] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-style\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_size: Optional[Union[Decimal, CssFontSize]] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-size\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_weight: Optional[FontWeight] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-weight\",\n            \"type\": \"Attribute\",\n        }\n    )\n    color: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"pattern\": r\"#[\\dA-F]{6}([\\dA-F][\\dA-F])?\",\n        }\n    )\n    placement: Optional[AboveBelow] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    start_note: Optional[StartNote] = field(\n        default=None,\n        metadata={\n            \"name\": \"start-note\",\n            \"type\": \"Attribute\",\n        }\n    )\n    trill_step: Optional[TrillStep] = field(\n        default=None,\n        metadata={\n            \"name\": \"trill-step\",\n            \"type\": \"Attribute\",\n        }\n    )\n    two_note_turn: Optional[TwoNoteTurn] = field(\n        default=None,\n        metadata={\n            \"name\": \"two-note-turn\",\n            \"type\": \"Attribute\",\n        }\n    )\n    accelerate: Optional[YesNo] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    beats: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"min_inclusive\": Decimal(\"2\"),\n        }\n    )\n    second_beat: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"second-beat\",\n            \"type\": \"Attribute\",\n            \"min_inclusive\": Decimal(\"0\"),\n            \"max_inclusive\": Decimal(\"100\"),\n        }\n    )\n    last_beat: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"last-beat\",\n            \"type\": \"Attribute\",\n            \"min_inclusive\": Decimal(\"0\"),\n            \"max_inclusive\": Decimal(\"100\"),\n        }\n    )\n\n\n@dataclass\nclass Ending:\n    \"\"\"The ending type represents multiple (e.g. first and second) endings.\n\n    Typically, the start type is associated with the left barline of the\n    first measure in an ending. The stop and discontinue types are\n    associated with the right barline of the last measure in an ending.\n    Stop is used when the ending mark concludes with a downward jog, as\n    is typical for first endings. Discontinue is used when there is no\n    downward jog, as is typical for second endings that do not conclude\n    a piece. The length of the jog can be specified using the end-length\n    attribute. The text-x and text-y attributes are offsets that specify\n    where the baseline of the start of the ending text appears, relative\n    to the start of the ending line. The number attribute indicates\n    which times the ending is played, similar to the time-only attribute\n    used by other elements. While this often represents the numeric\n    values for what is under the ending line, it can also indicate\n    whether an ending is played during a larger dal segno or da capo\n    repeat. Single endings such as \"1\" or comma-separated multiple\n    endings such as \"1,2\" may be used. The ending element text is used\n    when the text displayed in the ending is different than what appears\n    in the number attribute. The print-object attribute is used to\n    indicate when an ending is present but not printed, as is often the\n    case for many parts in a full score.\n    \"\"\"\n    class Meta:\n        name = \"ending\"\n\n    value: str = field(\n        default=\"\",\n        metadata={\n            \"required\": True,\n        }\n    )\n    number: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"required\": True,\n            \"pattern\": r\"([ ]*)|([1-9][0-9]*(, ?[1-9][0-9]*)*)\",\n        }\n    )\n    type: Optional[StartStopDiscontinue] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"required\": True,\n        }\n    )\n    print_object: Optional[YesNo] = field(\n        default=None,\n        metadata={\n            \"name\": \"print-object\",\n            \"type\": \"Attribute\",\n        }\n    )\n    default_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    default_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_family: Optional[str] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-family\",\n            \"type\": \"Attribute\",\n            \"pattern\": r\"[^,]+(, ?[^,]+)*\",\n        }\n    )\n    font_style: Optional[FontStyle] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-style\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_size: Optional[Union[Decimal, CssFontSize]] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-size\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_weight: Optional[FontWeight] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-weight\",\n            \"type\": \"Attribute\",\n        }\n    )\n    color: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"pattern\": r\"#[\\dA-F]{6}([\\dA-F][\\dA-F])?\",\n        }\n    )\n    system: Optional[SystemRelation] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    end_length: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"end-length\",\n            \"type\": \"Attribute\",\n        }\n    )\n    text_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"text-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    text_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"text-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass Extend:\n    \"\"\"The extend type represents lyric word extension / melisma lines as well\n    as figured bass extensions.\n\n    The optional type and position attributes are added in Version 3.0\n    to provide better formatting control.\n    \"\"\"\n    class Meta:\n        name = \"extend\"\n\n    type: Optional[StartStopContinue] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    default_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    default_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    color: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"pattern\": r\"#[\\dA-F]{6}([\\dA-F][\\dA-F])?\",\n        }\n    )\n\n\n@dataclass\nclass Fermata:\n    \"\"\"The fermata text content represents the shape of the fermata sign.\n\n    An empty fermata element represents a normal fermata. The fermata\n    type is upright if not specified.\n    \"\"\"\n    class Meta:\n        name = \"fermata\"\n\n    value: Optional[FermataShape] = field(\n        default=None,\n        metadata={\n            \"required\": True,\n        }\n    )\n    type: Optional[UprightInverted] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    default_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    default_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_family: Optional[str] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-family\",\n            \"type\": \"Attribute\",\n            \"pattern\": r\"[^,]+(, ?[^,]+)*\",\n        }\n    )\n    font_style: Optional[FontStyle] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-style\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_size: Optional[Union[Decimal, CssFontSize]] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-size\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_weight: Optional[FontWeight] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-weight\",\n            \"type\": \"Attribute\",\n        }\n    )\n    color: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"pattern\": r\"#[\\dA-F]{6}([\\dA-F][\\dA-F])?\",\n        }\n    )\n    id: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass Fingering:\n    \"\"\"Fingering is typically indicated 1,2,3,4,5.\n\n    Multiple fingerings may be given, typically to substitute fingerings\n    in the middle of a note. The substitution and alternate values are\n    \"no\" if the attribute is not present. For guitar and other fretted\n    instruments, the fingering element represents the fretting finger;\n    the pluck element represents the plucking finger.\n    \"\"\"\n    class Meta:\n        name = \"fingering\"\n\n    value: str = field(\n        default=\"\",\n        metadata={\n            \"required\": True,\n        }\n    )\n    substitution: Optional[YesNo] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    alternate: Optional[YesNo] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    default_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    default_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_family: Optional[str] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-family\",\n            \"type\": \"Attribute\",\n            \"pattern\": r\"[^,]+(, ?[^,]+)*\",\n        }\n    )\n    font_style: Optional[FontStyle] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-style\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_size: Optional[Union[Decimal, CssFontSize]] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-size\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_weight: Optional[FontWeight] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-weight\",\n            \"type\": \"Attribute\",\n        }\n    )\n    color: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"pattern\": r\"#[\\dA-F]{6}([\\dA-F][\\dA-F])?\",\n        }\n    )\n    placement: Optional[AboveBelow] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass FirstFret:\n    \"\"\"The first-fret type indicates which fret is shown in the top space of\n    the frame; it is fret 1 if the element is not present.\n\n    The optional text attribute indicates how this is represented in the\n    fret diagram, while the location attribute indicates whether the\n    text appears to the left or right of the frame.\n    \"\"\"\n    class Meta:\n        name = \"first-fret\"\n\n    value: Optional[int] = field(\n        default=None,\n        metadata={\n            \"required\": True,\n        }\n    )\n    text: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    location: Optional[LeftRight] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass FormattedSymbol:\n    \"\"\"\n    The formatted-symbol type represents a SMuFL musical symbol element with\n    formatting attributes.\n    \"\"\"\n    class Meta:\n        name = \"formatted-symbol\"\n\n    value: str = field(\n        default=\"\",\n        metadata={\n            \"required\": True,\n        }\n    )\n    justify: Optional[LeftCenterRight] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    default_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    default_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_family: Optional[str] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-family\",\n            \"type\": \"Attribute\",\n            \"pattern\": r\"[^,]+(, ?[^,]+)*\",\n        }\n    )\n    font_style: Optional[FontStyle] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-style\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_size: Optional[Union[Decimal, CssFontSize]] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-size\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_weight: Optional[FontWeight] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-weight\",\n            \"type\": \"Attribute\",\n        }\n    )\n    color: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"pattern\": r\"#[\\dA-F]{6}([\\dA-F][\\dA-F])?\",\n        }\n    )\n    halign: Optional[LeftCenterRight] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    valign: Optional[Valign] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    underline: Optional[int] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"min_inclusive\": 0,\n            \"max_inclusive\": 3,\n        }\n    )\n    overline: Optional[int] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"min_inclusive\": 0,\n            \"max_inclusive\": 3,\n        }\n    )\n    line_through: Optional[int] = field(\n        default=None,\n        metadata={\n            \"name\": \"line-through\",\n            \"type\": \"Attribute\",\n            \"min_inclusive\": 0,\n            \"max_inclusive\": 3,\n        }\n    )\n    rotation: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"min_inclusive\": Decimal(\"-180\"),\n            \"max_inclusive\": Decimal(\"180\"),\n        }\n    )\n    letter_spacing: Optional[Union[Decimal, NumberOrNormalValue]] = field(\n        default=None,\n        metadata={\n            \"name\": \"letter-spacing\",\n            \"type\": \"Attribute\",\n        }\n    )\n    line_height: Optional[Union[Decimal, NumberOrNormalValue]] = field(\n        default=None,\n        metadata={\n            \"name\": \"line-height\",\n            \"type\": \"Attribute\",\n        }\n    )\n    dir: Optional[TextDirection] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    enclosure: Optional[EnclosureShape] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass FormattedSymbolId:\n    \"\"\"\n    The formatted-symbol-id type represents a SMuFL musical symbol element with\n    formatting and id attributes.\n    \"\"\"\n    class Meta:\n        name = \"formatted-symbol-id\"\n\n    value: str = field(\n        default=\"\",\n        metadata={\n            \"required\": True,\n        }\n    )\n    justify: Optional[LeftCenterRight] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    default_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    default_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_family: Optional[str] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-family\",\n            \"type\": \"Attribute\",\n            \"pattern\": r\"[^,]+(, ?[^,]+)*\",\n        }\n    )\n    font_style: Optional[FontStyle] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-style\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_size: Optional[Union[Decimal, CssFontSize]] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-size\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_weight: Optional[FontWeight] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-weight\",\n            \"type\": \"Attribute\",\n        }\n    )\n    color: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"pattern\": r\"#[\\dA-F]{6}([\\dA-F][\\dA-F])?\",\n        }\n    )\n    halign: Optional[LeftCenterRight] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    valign: Optional[Valign] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    underline: Optional[int] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"min_inclusive\": 0,\n            \"max_inclusive\": 3,\n        }\n    )\n    overline: Optional[int] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"min_inclusive\": 0,\n            \"max_inclusive\": 3,\n        }\n    )\n    line_through: Optional[int] = field(\n        default=None,\n        metadata={\n            \"name\": \"line-through\",\n            \"type\": \"Attribute\",\n            \"min_inclusive\": 0,\n            \"max_inclusive\": 3,\n        }\n    )\n    rotation: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"min_inclusive\": Decimal(\"-180\"),\n            \"max_inclusive\": Decimal(\"180\"),\n        }\n    )\n    letter_spacing: Optional[Union[Decimal, NumberOrNormalValue]] = field(\n        default=None,\n        metadata={\n            \"name\": \"letter-spacing\",\n            \"type\": \"Attribute\",\n        }\n    )\n    line_height: Optional[Union[Decimal, NumberOrNormalValue]] = field(\n        default=None,\n        metadata={\n            \"name\": \"line-height\",\n            \"type\": \"Attribute\",\n        }\n    )\n    dir: Optional[TextDirection] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    enclosure: Optional[EnclosureShape] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    id: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass FormattedText:\n    \"\"\"\n    The formatted-text type represents a text element with text-formatting\n    attributes.\n    \"\"\"\n    class Meta:\n        name = \"formatted-text\"\n\n    value: str = field(\n        default=\"\",\n        metadata={\n            \"required\": True,\n        }\n    )\n    justify: Optional[LeftCenterRight] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    default_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    default_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_family: Optional[str] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-family\",\n            \"type\": \"Attribute\",\n            \"pattern\": r\"[^,]+(, ?[^,]+)*\",\n        }\n    )\n    font_style: Optional[FontStyle] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-style\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_size: Optional[Union[Decimal, CssFontSize]] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-size\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_weight: Optional[FontWeight] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-weight\",\n            \"type\": \"Attribute\",\n        }\n    )\n    color: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"pattern\": r\"#[\\dA-F]{6}([\\dA-F][\\dA-F])?\",\n        }\n    )\n    halign: Optional[LeftCenterRight] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    valign: Optional[Valign] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    underline: Optional[int] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"min_inclusive\": 0,\n            \"max_inclusive\": 3,\n        }\n    )\n    overline: Optional[int] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"min_inclusive\": 0,\n            \"max_inclusive\": 3,\n        }\n    )\n    line_through: Optional[int] = field(\n        default=None,\n        metadata={\n            \"name\": \"line-through\",\n            \"type\": \"Attribute\",\n            \"min_inclusive\": 0,\n            \"max_inclusive\": 3,\n        }\n    )\n    rotation: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"min_inclusive\": Decimal(\"-180\"),\n            \"max_inclusive\": Decimal(\"180\"),\n        }\n    )\n    letter_spacing: Optional[Union[Decimal, NumberOrNormalValue]] = field(\n        default=None,\n        metadata={\n            \"name\": \"letter-spacing\",\n            \"type\": \"Attribute\",\n        }\n    )\n    line_height: Optional[Union[Decimal, NumberOrNormalValue]] = field(\n        default=None,\n        metadata={\n            \"name\": \"line-height\",\n            \"type\": \"Attribute\",\n        }\n    )\n    lang: Optional[Union[str, LangValue]] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"namespace\": \"http://www.w3.org/XML/1998/namespace\",\n        }\n    )\n    space: Optional[SpaceValue] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"namespace\": \"http://www.w3.org/XML/1998/namespace\",\n        }\n    )\n    dir: Optional[TextDirection] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    enclosure: Optional[EnclosureShape] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass FormattedTextId:\n    \"\"\"\n    The formatted-text-id type represents a text element with text-formatting\n    and id attributes.\n    \"\"\"\n    class Meta:\n        name = \"formatted-text-id\"\n\n    value: str = field(\n        default=\"\",\n        metadata={\n            \"required\": True,\n        }\n    )\n    justify: Optional[LeftCenterRight] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    default_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    default_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_family: Optional[str] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-family\",\n            \"type\": \"Attribute\",\n            \"pattern\": r\"[^,]+(, ?[^,]+)*\",\n        }\n    )\n    font_style: Optional[FontStyle] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-style\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_size: Optional[Union[Decimal, CssFontSize]] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-size\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_weight: Optional[FontWeight] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-weight\",\n            \"type\": \"Attribute\",\n        }\n    )\n    color: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"pattern\": r\"#[\\dA-F]{6}([\\dA-F][\\dA-F])?\",\n        }\n    )\n    halign: Optional[LeftCenterRight] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    valign: Optional[Valign] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    underline: Optional[int] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"min_inclusive\": 0,\n            \"max_inclusive\": 3,\n        }\n    )\n    overline: Optional[int] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"min_inclusive\": 0,\n            \"max_inclusive\": 3,\n        }\n    )\n    line_through: Optional[int] = field(\n        default=None,\n        metadata={\n            \"name\": \"line-through\",\n            \"type\": \"Attribute\",\n            \"min_inclusive\": 0,\n            \"max_inclusive\": 3,\n        }\n    )\n    rotation: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"min_inclusive\": Decimal(\"-180\"),\n            \"max_inclusive\": Decimal(\"180\"),\n        }\n    )\n    letter_spacing: Optional[Union[Decimal, NumberOrNormalValue]] = field(\n        default=None,\n        metadata={\n            \"name\": \"letter-spacing\",\n            \"type\": \"Attribute\",\n        }\n    )\n    line_height: Optional[Union[Decimal, NumberOrNormalValue]] = field(\n        default=None,\n        metadata={\n            \"name\": \"line-height\",\n            \"type\": \"Attribute\",\n        }\n    )\n    lang: Optional[Union[str, LangValue]] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"namespace\": \"http://www.w3.org/XML/1998/namespace\",\n        }\n    )\n    space: Optional[SpaceValue] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"namespace\": \"http://www.w3.org/XML/1998/namespace\",\n        }\n    )\n    dir: Optional[TextDirection] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    enclosure: Optional[EnclosureShape] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    id: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass Fret:\n    \"\"\"The fret element is used with tablature notation and chord diagrams.\n\n    Fret numbers start with 0 for an open string and 1 for the first\n    fret.\n    \"\"\"\n    class Meta:\n        name = \"fret\"\n\n    value: Optional[int] = field(\n        default=None,\n        metadata={\n            \"required\": True,\n        }\n    )\n    font_family: Optional[str] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-family\",\n            \"type\": \"Attribute\",\n            \"pattern\": r\"[^,]+(, ?[^,]+)*\",\n        }\n    )\n    font_style: Optional[FontStyle] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-style\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_size: Optional[Union[Decimal, CssFontSize]] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-size\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_weight: Optional[FontWeight] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-weight\",\n            \"type\": \"Attribute\",\n        }\n    )\n    color: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"pattern\": r\"#[\\dA-F]{6}([\\dA-F][\\dA-F])?\",\n        }\n    )\n\n\n@dataclass\nclass Glass:\n    \"\"\"The glass type represents pictograms for glass percussion instruments.\n\n    The smufl attribute is used to distinguish different SMuFL glyphs\n    for wind chimes in the Chimes pictograms range, including those made\n    of materials other than glass.\n    \"\"\"\n    class Meta:\n        name = \"glass\"\n\n    value: Optional[GlassValue] = field(\n        default=None,\n        metadata={\n            \"required\": True,\n        }\n    )\n    smufl: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"pattern\": r\"pict\\c+\",\n        }\n    )\n\n\n@dataclass\nclass Glissando:\n    \"\"\"Glissando and slide types both indicate rapidly moving from one pitch to\n    the other so that individual notes are not discerned.\n\n    A glissando sounds the distinct notes in between the two pitches and\n    defaults to a wavy line. The optional text is printed alongside the\n    line.\n    \"\"\"\n    class Meta:\n        name = \"glissando\"\n\n    value: str = field(\n        default=\"\",\n        metadata={\n            \"required\": True,\n        }\n    )\n    type: Optional[StartStop] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"required\": True,\n        }\n    )\n    number: int = field(\n        default=1,\n        metadata={\n            \"type\": \"Attribute\",\n            \"min_inclusive\": 1,\n            \"max_inclusive\": 16,\n        }\n    )\n    line_type: Optional[LineType] = field(\n        default=None,\n        metadata={\n            \"name\": \"line-type\",\n            \"type\": \"Attribute\",\n        }\n    )\n    dash_length: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"dash-length\",\n            \"type\": \"Attribute\",\n        }\n    )\n    space_length: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"space-length\",\n            \"type\": \"Attribute\",\n        }\n    )\n    default_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    default_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_family: Optional[str] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-family\",\n            \"type\": \"Attribute\",\n            \"pattern\": r\"[^,]+(, ?[^,]+)*\",\n        }\n    )\n    font_style: Optional[FontStyle] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-style\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_size: Optional[Union[Decimal, CssFontSize]] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-size\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_weight: Optional[FontWeight] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-weight\",\n            \"type\": \"Attribute\",\n        }\n    )\n    color: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"pattern\": r\"#[\\dA-F]{6}([\\dA-F][\\dA-F])?\",\n        }\n    )\n    id: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass Grace:\n    \"\"\"The grace type indicates the presence of a grace note.\n\n    The slash attribute for a grace note is yes for slashed grace notes.\n    The steal-time-previous attribute indicates the percentage of time\n    to steal from the previous note for the grace note. The steal-time-\n    following attribute indicates the percentage of time to steal from\n    the following note for the grace note, as for appoggiaturas. The\n    make-time attribute indicates to make time, not steal time; the\n    units are in real-time divisions for the grace note.\n    \"\"\"\n    class Meta:\n        name = \"grace\"\n\n    steal_time_previous: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"steal-time-previous\",\n            \"type\": \"Attribute\",\n            \"min_inclusive\": Decimal(\"0\"),\n            \"max_inclusive\": Decimal(\"100\"),\n        }\n    )\n    steal_time_following: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"steal-time-following\",\n            \"type\": \"Attribute\",\n            \"min_inclusive\": Decimal(\"0\"),\n            \"max_inclusive\": Decimal(\"100\"),\n        }\n    )\n    make_time: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"make-time\",\n            \"type\": \"Attribute\",\n        }\n    )\n    slash: Optional[YesNo] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass GroupBarline:\n    \"\"\"\n    The group-barline type indicates if the group should have common barlines.\n    \"\"\"\n    class Meta:\n        name = \"group-barline\"\n\n    value: Optional[GroupBarlineValue] = field(\n        default=None,\n        metadata={\n            \"required\": True,\n        }\n    )\n    color: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"pattern\": r\"#[\\dA-F]{6}([\\dA-F][\\dA-F])?\",\n        }\n    )\n\n\n@dataclass\nclass GroupName:\n    \"\"\"The group-name type describes the name or abbreviation of a part-group\n    element.\n\n    Formatting attributes in the group-name type are deprecated in\n    Version 2.0 in favor of the new group-name-display and group-\n    abbreviation-display elements.\n    \"\"\"\n    class Meta:\n        name = \"group-name\"\n\n    value: str = field(\n        default=\"\",\n        metadata={\n            \"required\": True,\n        }\n    )\n    default_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    default_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_family: Optional[str] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-family\",\n            \"type\": \"Attribute\",\n            \"pattern\": r\"[^,]+(, ?[^,]+)*\",\n        }\n    )\n    font_style: Optional[FontStyle] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-style\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_size: Optional[Union[Decimal, CssFontSize]] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-size\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_weight: Optional[FontWeight] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-weight\",\n            \"type\": \"Attribute\",\n        }\n    )\n    color: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"pattern\": r\"#[\\dA-F]{6}([\\dA-F][\\dA-F])?\",\n        }\n    )\n    justify: Optional[LeftCenterRight] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass GroupSymbol:\n    \"\"\"The group-symbol type indicates how the symbol for a group is indicated\n    in the score.\n\n    It is none if not specified.\n    \"\"\"\n    class Meta:\n        name = \"group-symbol\"\n\n    value: Optional[GroupSymbolValue] = field(\n        default=None,\n        metadata={\n            \"required\": True,\n        }\n    )\n    default_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    default_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    color: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"pattern\": r\"#[\\dA-F]{6}([\\dA-F][\\dA-F])?\",\n        }\n    )\n\n\n@dataclass\nclass Grouping:\n    \"\"\"The grouping type is used for musical analysis.\n\n    When the type attribute is \"start\" or \"single\", it usually contains\n    one or more feature elements. The number attribute is used for\n    distinguishing between overlapping and hierarchical groupings. The\n    member-of attribute allows for easy distinguishing of what grouping\n    elements are in what hierarchy. Feature elements contained within a\n    \"stop\" type of grouping may be ignored. This element is flexible to\n    allow for different types of analyses. Future versions of the\n    MusicXML format may add elements that can represent more\n    standardized categories of analysis data, allowing for easier data\n    sharing.\n    \"\"\"\n    class Meta:\n        name = \"grouping\"\n\n    feature: List[Feature] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    type: Optional[StartStopSingle] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"required\": True,\n        }\n    )\n    number: str = field(\n        default=\"1\",\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    member_of: Optional[str] = field(\n        default=None,\n        metadata={\n            \"name\": \"member-of\",\n            \"type\": \"Attribute\",\n        }\n    )\n    id: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass HammerOnPullOff:\n    \"\"\"The hammer-on and pull-off elements are used in guitar and fretted\n    instrument notation.\n\n    Since a single slur can be marked over many notes, the hammer-on and\n    pull-off elements are separate so the individual pair of notes can\n    be specified. The element content can be used to specify how the\n    hammer-on or pull-off should be notated. An empty element leaves\n    this choice up to the application.\n    \"\"\"\n    class Meta:\n        name = \"hammer-on-pull-off\"\n\n    value: str = field(\n        default=\"\",\n        metadata={\n            \"required\": True,\n        }\n    )\n    type: Optional[StartStop] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"required\": True,\n        }\n    )\n    number: int = field(\n        default=1,\n        metadata={\n            \"type\": \"Attribute\",\n            \"min_inclusive\": 1,\n            \"max_inclusive\": 16,\n        }\n    )\n    default_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    default_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_family: Optional[str] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-family\",\n            \"type\": \"Attribute\",\n            \"pattern\": r\"[^,]+(, ?[^,]+)*\",\n        }\n    )\n    font_style: Optional[FontStyle] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-style\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_size: Optional[Union[Decimal, CssFontSize]] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-size\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_weight: Optional[FontWeight] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-weight\",\n            \"type\": \"Attribute\",\n        }\n    )\n    color: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"pattern\": r\"#[\\dA-F]{6}([\\dA-F][\\dA-F])?\",\n        }\n    )\n    placement: Optional[AboveBelow] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass Handbell:\n    \"\"\"\n    The handbell element represents notation for various techniques used in\n    handbell and handchime music.\n    \"\"\"\n    class Meta:\n        name = \"handbell\"\n\n    value: Optional[HandbellValue] = field(\n        default=None,\n        metadata={\n            \"required\": True,\n        }\n    )\n    default_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    default_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_family: Optional[str] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-family\",\n            \"type\": \"Attribute\",\n            \"pattern\": r\"[^,]+(, ?[^,]+)*\",\n        }\n    )\n    font_style: Optional[FontStyle] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-style\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_size: Optional[Union[Decimal, CssFontSize]] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-size\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_weight: Optional[FontWeight] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-weight\",\n            \"type\": \"Attribute\",\n        }\n    )\n    color: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"pattern\": r\"#[\\dA-F]{6}([\\dA-F][\\dA-F])?\",\n        }\n    )\n    placement: Optional[AboveBelow] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass HarmonClosed:\n    \"\"\"The harmon-closed type represents whether the harmon mute is closed,\n    open, or half-open.\n\n    The optional location attribute indicates which portion of the\n    symbol is filled in when the element value is half.\n    \"\"\"\n    class Meta:\n        name = \"harmon-closed\"\n\n    value: Optional[HarmonClosedValue] = field(\n        default=None,\n        metadata={\n            \"required\": True,\n        }\n    )\n    location: Optional[HarmonClosedLocation] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass Harmonic:\n    \"\"\"The harmonic type indicates natural and artificial harmonics.\n\n    Allowing the type of pitch to be specified, combined with controls\n    for appearance/playback differences, allows both the notation and\n    the sound to be represented. Artificial harmonics can add a notated\n    touching pitch; artificial pinch harmonics will usually not notate a\n    touching pitch. The attributes for the harmonic element refer to the\n    use of the circular harmonic symbol, typically but not always used\n    with natural harmonics.\n\n    :ivar natural: The natural element indicates that this is a natural\n        harmonic. These are usually notated at base pitch rather than\n        sounding pitch.\n    :ivar artificial: The artificial element indicates that this is an\n        artificial harmonic.\n    :ivar base_pitch: The base pitch is the pitch at which the string is\n        played before touching to create the harmonic.\n    :ivar touching_pitch: The touching-pitch is the pitch at which the\n        string is touched lightly to produce the harmonic.\n    :ivar sounding_pitch: The sounding-pitch is the pitch which is heard\n        when playing the harmonic.\n    :ivar print_object:\n    :ivar default_x:\n    :ivar default_y:\n    :ivar relative_x:\n    :ivar relative_y:\n    :ivar font_family:\n    :ivar font_style:\n    :ivar font_size:\n    :ivar font_weight:\n    :ivar color:\n    :ivar placement:\n    \"\"\"\n    class Meta:\n        name = \"harmonic\"\n\n    natural: Optional[Empty] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    artificial: Optional[Empty] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    base_pitch: Optional[Empty] = field(\n        default=None,\n        metadata={\n            \"name\": \"base-pitch\",\n            \"type\": \"Element\",\n        }\n    )\n    touching_pitch: Optional[Empty] = field(\n        default=None,\n        metadata={\n            \"name\": \"touching-pitch\",\n            \"type\": \"Element\",\n        }\n    )\n    sounding_pitch: Optional[Empty] = field(\n        default=None,\n        metadata={\n            \"name\": \"sounding-pitch\",\n            \"type\": \"Element\",\n        }\n    )\n    print_object: Optional[YesNo] = field(\n        default=None,\n        metadata={\n            \"name\": \"print-object\",\n            \"type\": \"Attribute\",\n        }\n    )\n    default_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    default_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_family: Optional[str] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-family\",\n            \"type\": \"Attribute\",\n            \"pattern\": r\"[^,]+(, ?[^,]+)*\",\n        }\n    )\n    font_style: Optional[FontStyle] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-style\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_size: Optional[Union[Decimal, CssFontSize]] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-size\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_weight: Optional[FontWeight] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-weight\",\n            \"type\": \"Attribute\",\n        }\n    )\n    color: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"pattern\": r\"#[\\dA-F]{6}([\\dA-F][\\dA-F])?\",\n        }\n    )\n    placement: Optional[AboveBelow] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass HarmonyAlter:\n    \"\"\"The harmony-alter type represents the chromatic alteration of the root,\n    numeral, or bass of the current harmony-chord group within the harmony\n    element.\n\n    In some chord styles, the text of the preceding element may include\n    alteration information. In that case, the print-object attribute of\n    this type can be set to no. The location attribute indicates whether\n    the alteration should appear to the left or the right of the\n    preceding element. Its default value varies by element.\n    \"\"\"\n    class Meta:\n        name = \"harmony-alter\"\n\n    value: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"required\": True,\n        }\n    )\n    print_object: Optional[YesNo] = field(\n        default=None,\n        metadata={\n            \"name\": \"print-object\",\n            \"type\": \"Attribute\",\n        }\n    )\n    default_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    default_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_family: Optional[str] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-family\",\n            \"type\": \"Attribute\",\n            \"pattern\": r\"[^,]+(, ?[^,]+)*\",\n        }\n    )\n    font_style: Optional[FontStyle] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-style\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_size: Optional[Union[Decimal, CssFontSize]] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-size\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_weight: Optional[FontWeight] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-weight\",\n            \"type\": \"Attribute\",\n        }\n    )\n    color: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"pattern\": r\"#[\\dA-F]{6}([\\dA-F][\\dA-F])?\",\n        }\n    )\n    location: Optional[LeftRight] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass HoleClosed:\n    \"\"\"The hole-closed type represents whether the hole is closed, open, or\n    half-open.\n\n    The optional location attribute indicates which portion of the hole\n    is filled in when the element value is half.\n    \"\"\"\n    class Meta:\n        name = \"hole-closed\"\n\n    value: Optional[HoleClosedValue] = field(\n        default=None,\n        metadata={\n            \"required\": True,\n        }\n    )\n    location: Optional[HoleClosedLocation] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass HorizontalTurn:\n    \"\"\"The horizontal-turn type represents turn elements that are horizontal\n    rather than vertical.\n\n    These are empty elements with print-style, placement, trill-sound,\n    and slash attributes. If the slash attribute is yes, then a vertical\n    line is used to slash the turn. It is no if not specified.\n    \"\"\"\n    class Meta:\n        name = \"horizontal-turn\"\n\n    default_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    default_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_family: Optional[str] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-family\",\n            \"type\": \"Attribute\",\n            \"pattern\": r\"[^,]+(, ?[^,]+)*\",\n        }\n    )\n    font_style: Optional[FontStyle] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-style\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_size: Optional[Union[Decimal, CssFontSize]] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-size\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_weight: Optional[FontWeight] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-weight\",\n            \"type\": \"Attribute\",\n        }\n    )\n    color: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"pattern\": r\"#[\\dA-F]{6}([\\dA-F][\\dA-F])?\",\n        }\n    )\n    placement: Optional[AboveBelow] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    start_note: Optional[StartNote] = field(\n        default=None,\n        metadata={\n            \"name\": \"start-note\",\n            \"type\": \"Attribute\",\n        }\n    )\n    trill_step: Optional[TrillStep] = field(\n        default=None,\n        metadata={\n            \"name\": \"trill-step\",\n            \"type\": \"Attribute\",\n        }\n    )\n    two_note_turn: Optional[TwoNoteTurn] = field(\n        default=None,\n        metadata={\n            \"name\": \"two-note-turn\",\n            \"type\": \"Attribute\",\n        }\n    )\n    accelerate: Optional[YesNo] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    beats: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"min_inclusive\": Decimal(\"2\"),\n        }\n    )\n    second_beat: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"second-beat\",\n            \"type\": \"Attribute\",\n            \"min_inclusive\": Decimal(\"0\"),\n            \"max_inclusive\": Decimal(\"100\"),\n        }\n    )\n    last_beat: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"last-beat\",\n            \"type\": \"Attribute\",\n            \"min_inclusive\": Decimal(\"0\"),\n            \"max_inclusive\": Decimal(\"100\"),\n        }\n    )\n    slash: Optional[YesNo] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass Image:\n    \"\"\"\n    The image type is used to include graphical images in a score.\n    \"\"\"\n    class Meta:\n        name = \"image\"\n\n    source: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"required\": True,\n        }\n    )\n    type: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"required\": True,\n        }\n    )\n    height: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    width: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    default_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    default_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    halign: Optional[LeftCenterRight] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    valign: Optional[ValignImage] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    id: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass InstrumentChange:\n    \"\"\"The instrument-change element type represents a change to the virtual\n    instrument sound for a given score-instrument.\n\n    The id attribute refers to the score-instrument affected by the\n    change. All instrument-change child elements can also be initially\n    specified within the score-instrument element.\n\n    :ivar instrument_sound: The instrument-sound element describes the\n        default timbre of the score-instrument. This description is\n        independent of a particular virtual or MIDI instrument\n        specification and allows playback to be shared more easily\n        between applications and libraries.\n    :ivar solo: The solo element is present if performance is intended\n        by a solo instrument.\n    :ivar ensemble: The ensemble element is present if performance is\n        intended by an ensemble such as an orchestral section. The text\n        of the ensemble element contains the size of the section, or is\n        empty if the ensemble size is not specified.\n    :ivar virtual_instrument:\n    :ivar id:\n    \"\"\"\n    class Meta:\n        name = \"instrument-change\"\n\n    instrument_sound: Optional[str] = field(\n        default=None,\n        metadata={\n            \"name\": \"instrument-sound\",\n            \"type\": \"Element\",\n        }\n    )\n    solo: Optional[Empty] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    ensemble: Optional[Union[int, PositiveIntegerOrEmptyValue]] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    virtual_instrument: Optional[VirtualInstrument] = field(\n        default=None,\n        metadata={\n            \"name\": \"virtual-instrument\",\n            \"type\": \"Element\",\n        }\n    )\n    id: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"required\": True,\n        }\n    )\n\n\n@dataclass\nclass Interchangeable:\n    \"\"\"The interchangeable type is used to represent the second in a pair of\n    interchangeable dual time signatures, such as the 6/8 in 3/4 (6/8).\n\n    A separate symbol attribute value is available compared to the time\n    element's symbol attribute, which applies to the first of the dual\n    time signatures.\n\n    :ivar time_relation:\n    :ivar beats: The beats element indicates the number of beats, as\n        found in the numerator of a time signature.\n    :ivar beat_type: The beat-type element indicates the beat unit, as\n        found in the denominator of a time signature.\n    :ivar symbol:\n    :ivar separator:\n    \"\"\"\n    class Meta:\n        name = \"interchangeable\"\n\n    time_relation: Optional[TimeRelation] = field(\n        default=None,\n        metadata={\n            \"name\": \"time-relation\",\n            \"type\": \"Element\",\n        }\n    )\n    beats: List[str] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n            \"min_occurs\": 1,\n            \"sequential\": True,\n        }\n    )\n    beat_type: List[str] = field(\n        default_factory=list,\n        metadata={\n            \"name\": \"beat-type\",\n            \"type\": \"Element\",\n            \"min_occurs\": 1,\n            \"sequential\": True,\n        }\n    )\n    symbol: Optional[TimeSymbol] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    separator: Optional[TimeSeparator] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass Inversion:\n    \"\"\"The inversion type represents harmony inversions.\n\n    The value is a number indicating which inversion is used: 0 for root\n    position, 1 for first inversion, etc.  The text attribute indicates\n    how the inversion should be displayed in a score.\n    \"\"\"\n    class Meta:\n        name = \"inversion\"\n\n    value: Optional[int] = field(\n        default=None,\n        metadata={\n            \"required\": True,\n        }\n    )\n    text: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    default_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    default_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_family: Optional[str] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-family\",\n            \"type\": \"Attribute\",\n            \"pattern\": r\"[^,]+(, ?[^,]+)*\",\n        }\n    )\n    font_style: Optional[FontStyle] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-style\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_size: Optional[Union[Decimal, CssFontSize]] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-size\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_weight: Optional[FontWeight] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-weight\",\n            \"type\": \"Attribute\",\n        }\n    )\n    color: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"pattern\": r\"#[\\dA-F]{6}([\\dA-F][\\dA-F])?\",\n        }\n    )\n\n\n@dataclass\nclass KeyAccidental:\n    \"\"\"\n    The key-accidental type indicates the accidental to be displayed in a non-\n    traditional key signature, represented in the same manner as the accidental\n    type without the formatting attributes.\n    \"\"\"\n    class Meta:\n        name = \"key-accidental\"\n\n    value: Optional[AccidentalValue] = field(\n        default=None,\n        metadata={\n            \"required\": True,\n        }\n    )\n    smufl: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"pattern\": r\"(acc|medRenFla|medRenNatura|medRenShar|kievanAccidental)(\\c+)\",\n        }\n    )\n\n\n@dataclass\nclass KeyOctave:\n    \"\"\"The key-octave type specifies in which octave an element of a key\n    signature appears.\n\n    The content specifies the octave value using the same values as the\n    display-octave element. The number attribute is a positive integer\n    that refers to the key signature element in left-to-right order. If\n    the cancel attribute is set to yes, then this number refers to the\n    canceling key signature specified by the cancel element in the\n    parent key element. The cancel attribute cannot be set to yes if\n    there is no corresponding cancel element within the parent key\n    element. It is no by default.\n    \"\"\"\n    class Meta:\n        name = \"key-octave\"\n\n    value: Optional[int] = field(\n        default=None,\n        metadata={\n            \"required\": True,\n            \"min_inclusive\": 0,\n            \"max_inclusive\": 9,\n        }\n    )\n    number: Optional[int] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"required\": True,\n        }\n    )\n    cancel: Optional[YesNo] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass Kind:\n    \"\"\"Kind indicates the type of chord.\n\n    Degree elements can then add, subtract, or alter from these starting points\n    The attributes are used to indicate the formatting of the symbol. Since the kind element is the constant in all the harmony-chord groups that can make up a polychord, many formatting attributes are here.\n    The use-symbols attribute is yes if the kind should be represented when possible with harmony symbols rather than letters and numbers. These symbols include:\n    major: a triangle, like Unicode 25B3\n    minor: -, like Unicode 002D\n    augmented: +, like Unicode 002B\n    diminished: °, like Unicode 00B0\n    half-diminished: ø, like Unicode 00F8\n    For the major-minor kind, only the minor symbol is used when use-symbols is yes. The major symbol is set using the symbol attribute in the degree-value element. The corresponding degree-alter value will usually be 0 in this case.\n    The text attribute describes how the kind should be spelled in a score. If use-symbols is yes, the value of the text attribute follows the symbol. The stack-degrees attribute is yes if the degree elements should be stacked above each other. The parentheses-degrees attribute is yes if all the degrees should be in parentheses. The bracket-degrees attribute is yes if all the degrees should be in a bracket. If not specified, these values are implementation-specific. The alignment attributes are for the entire harmony-chord group of which this kind element is a part.\n    The text attribute may use strings such as \"13sus\" that refer to both the kind and one or more degree elements. In this case, the corresponding degree elements should have the print-object attribute set to \"no\" to keep redundant alterations from being displayed.\n    \"\"\"\n    class Meta:\n        name = \"kind\"\n\n    value: Optional[KindValue] = field(\n        default=None,\n        metadata={\n            \"required\": True,\n        }\n    )\n    use_symbols: Optional[YesNo] = field(\n        default=None,\n        metadata={\n            \"name\": \"use-symbols\",\n            \"type\": \"Attribute\",\n        }\n    )\n    text: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    stack_degrees: Optional[YesNo] = field(\n        default=None,\n        metadata={\n            \"name\": \"stack-degrees\",\n            \"type\": \"Attribute\",\n        }\n    )\n    parentheses_degrees: Optional[YesNo] = field(\n        default=None,\n        metadata={\n            \"name\": \"parentheses-degrees\",\n            \"type\": \"Attribute\",\n        }\n    )\n    bracket_degrees: Optional[YesNo] = field(\n        default=None,\n        metadata={\n            \"name\": \"bracket-degrees\",\n            \"type\": \"Attribute\",\n        }\n    )\n    default_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    default_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_family: Optional[str] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-family\",\n            \"type\": \"Attribute\",\n            \"pattern\": r\"[^,]+(, ?[^,]+)*\",\n        }\n    )\n    font_style: Optional[FontStyle] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-style\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_size: Optional[Union[Decimal, CssFontSize]] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-size\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_weight: Optional[FontWeight] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-weight\",\n            \"type\": \"Attribute\",\n        }\n    )\n    color: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"pattern\": r\"#[\\dA-F]{6}([\\dA-F][\\dA-F])?\",\n        }\n    )\n    halign: Optional[LeftCenterRight] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    valign: Optional[Valign] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass Level:\n    \"\"\"The level type is used to specify editorial information for different\n    MusicXML elements.\n\n    The content contains identifying and/or descriptive text about the\n    editorial status of the parent element. If the reference attribute\n    is yes, this indicates editorial information that is for display\n    only and should not affect playback. For instance, a modern edition\n    of older music may set reference=\"yes\" on the attributes containing\n    the music's original clef, key, and time signature. It is no if not\n    specified. The type attribute indicates whether the editorial\n    information applies to the start of a series of symbols, the end of\n    a series of symbols, or a single symbol. It is single if not\n    specified for compatibility with earlier MusicXML versions.\n    \"\"\"\n    class Meta:\n        name = \"level\"\n\n    value: str = field(\n        default=\"\",\n        metadata={\n            \"required\": True,\n        }\n    )\n    reference: Optional[YesNo] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    type: Optional[StartStopSingle] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    parentheses: Optional[YesNo] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    bracket: Optional[YesNo] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    size: Optional[SymbolSize] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass LineDetail:\n    \"\"\"If the staff-lines element is present, the appearance of each line may\n    be individually specified with a line-detail type.\n\n    Staff lines are numbered from bottom to top. The print-object\n    attribute allows lines to be hidden within a staff. This is used in\n    special situations such as a widely-spaced percussion staff where a\n    note placed below the higher line is distinct from a note placed\n    above the lower line. Hidden staff lines are included when\n    specifying clef lines and determining display-step / display-octave\n    values, but are not counted as lines for the purposes of the system-\n    layout and staff-layout elements.\n    \"\"\"\n    class Meta:\n        name = \"line-detail\"\n\n    line: Optional[int] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"required\": True,\n        }\n    )\n    width: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    color: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"pattern\": r\"#[\\dA-F]{6}([\\dA-F][\\dA-F])?\",\n        }\n    )\n    line_type: Optional[LineType] = field(\n        default=None,\n        metadata={\n            \"name\": \"line-type\",\n            \"type\": \"Attribute\",\n        }\n    )\n    print_object: Optional[YesNo] = field(\n        default=None,\n        metadata={\n            \"name\": \"print-object\",\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass Link:\n    \"\"\"The link type serves as an outgoing simple XLink.\n\n    If a relative link is used within a document that is part of a\n    compressed MusicXML file, the link is relative to the root folder of\n    the zip file.\n    \"\"\"\n    class Meta:\n        name = \"link\"\n\n    href: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"namespace\": \"http://www.w3.org/1999/xlink\",\n            \"required\": True,\n        }\n    )\n    type: TypeValue = field(\n        init=False,\n        default=TypeValue.SIMPLE,\n        metadata={\n            \"type\": \"Attribute\",\n            \"namespace\": \"http://www.w3.org/1999/xlink\",\n        }\n    )\n    role: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"namespace\": \"http://www.w3.org/1999/xlink\",\n        }\n    )\n    title: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"namespace\": \"http://www.w3.org/1999/xlink\",\n        }\n    )\n    show: ShowValue = field(\n        default=ShowValue.REPLACE,\n        metadata={\n            \"type\": \"Attribute\",\n            \"namespace\": \"http://www.w3.org/1999/xlink\",\n        }\n    )\n    actuate: ActuateValue = field(\n        default=ActuateValue.ON_REQUEST,\n        metadata={\n            \"type\": \"Attribute\",\n            \"namespace\": \"http://www.w3.org/1999/xlink\",\n        }\n    )\n    name: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    element: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    position: Optional[int] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    default_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    default_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass LyricFont:\n    \"\"\"\n    The lyric-font type specifies the default font for a particular name and\n    number of lyric.\n    \"\"\"\n    class Meta:\n        name = \"lyric-font\"\n\n    number: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    name: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    font_family: Optional[str] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-family\",\n            \"type\": \"Attribute\",\n            \"pattern\": r\"[^,]+(, ?[^,]+)*\",\n        }\n    )\n    font_style: Optional[FontStyle] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-style\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_size: Optional[Union[Decimal, CssFontSize]] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-size\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_weight: Optional[FontWeight] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-weight\",\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass LyricLanguage:\n    \"\"\"\n    The lyric-language type specifies the default language for a particular\n    name and number of lyric.\n    \"\"\"\n    class Meta:\n        name = \"lyric-language\"\n\n    number: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    name: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    lang: Optional[Union[str, LangValue]] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"namespace\": \"http://www.w3.org/XML/1998/namespace\",\n            \"required\": True,\n        }\n    )\n\n\n@dataclass\nclass MeasureNumbering:\n    \"\"\"The measure-numbering type describes how frequently measure numbers are\n    displayed on this part.\n\n    The text attribute from the measure element is used for display, or\n    the number attribute if the text attribute is not present. Measures\n    with an implicit attribute set to \"yes\" never display a measure\n    number, regardless of the measure-numbering setting. The optional\n    staff attribute refers to staff numbers within the part, from top to\n    bottom on the system. It indicates which staff is used as the\n    reference point for vertical positioning. A value of 1 is assumed if\n    not present. The optional multiple-rest-always and multiple-rest-\n    range attributes describe how measure numbers are shown on multiple\n    rests when the measure-numbering value is not set to none. The\n    multiple-rest-always attribute is set to yes when the measure number\n    should always be shown, even if the multiple rest starts midway\n    through a system when measure numbering is set to system level. The\n    multiple-rest-range attribute is set to yes when measure numbers on\n    multiple rests display the range of numbers for the first and last\n    measure, rather than just the number of the first measure.\n    \"\"\"\n    class Meta:\n        name = \"measure-numbering\"\n\n    value: Optional[MeasureNumberingValue] = field(\n        default=None,\n        metadata={\n            \"required\": True,\n        }\n    )\n    system: Optional[SystemRelationNumber] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    staff: Optional[int] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    multiple_rest_always: Optional[YesNo] = field(\n        default=None,\n        metadata={\n            \"name\": \"multiple-rest-always\",\n            \"type\": \"Attribute\",\n        }\n    )\n    multiple_rest_range: Optional[YesNo] = field(\n        default=None,\n        metadata={\n            \"name\": \"multiple-rest-range\",\n            \"type\": \"Attribute\",\n        }\n    )\n    default_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    default_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_family: Optional[str] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-family\",\n            \"type\": \"Attribute\",\n            \"pattern\": r\"[^,]+(, ?[^,]+)*\",\n        }\n    )\n    font_style: Optional[FontStyle] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-style\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_size: Optional[Union[Decimal, CssFontSize]] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-size\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_weight: Optional[FontWeight] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-weight\",\n            \"type\": \"Attribute\",\n        }\n    )\n    color: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"pattern\": r\"#[\\dA-F]{6}([\\dA-F][\\dA-F])?\",\n        }\n    )\n    halign: Optional[LeftCenterRight] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    valign: Optional[Valign] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass MeasureRepeat:\n    \"\"\"The measure-repeat type is used for both single and multiple measure\n    repeats.\n\n    The text of the element indicates the number of measures to be\n    repeated in a single pattern. The slashes attribute specifies the\n    number of slashes to use in the repeat sign. It is 1 if not\n    specified. The text of the element is ignored when the type is stop.\n    The stop type indicates the first measure where the repeats are no\n    longer displayed. Both the start and the stop of the measure-repeat\n    should be specified unless the repeats are displayed through the end\n    of the part. The measure-repeat element specifies a notation style\n    for repetitions. The actual music being repeated needs to be\n    repeated within each measure of the MusicXML file. This element\n    specifies the notation that indicates the repeat.\n    \"\"\"\n    class Meta:\n        name = \"measure-repeat\"\n\n    value: Optional[Union[int, PositiveIntegerOrEmptyValue]] = field(\n        default=None\n    )\n    type: Optional[StartStop] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"required\": True,\n        }\n    )\n    slashes: Optional[int] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass Membrane:\n    \"\"\"The membrane type represents pictograms for membrane percussion\n    instruments.\n\n    The smufl attribute is used to distinguish different SMuFL stylistic\n    alternates.\n    \"\"\"\n    class Meta:\n        name = \"membrane\"\n\n    value: Optional[MembraneValue] = field(\n        default=None,\n        metadata={\n            \"required\": True,\n        }\n    )\n    smufl: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"pattern\": r\"pict\\c+\",\n        }\n    )\n\n\n@dataclass\nclass Metal:\n    \"\"\"The metal type represents pictograms for metal percussion instruments.\n\n    The smufl attribute is used to distinguish different SMuFL stylistic\n    alternates.\n    \"\"\"\n    class Meta:\n        name = \"metal\"\n\n    value: Optional[MetalValue] = field(\n        default=None,\n        metadata={\n            \"required\": True,\n        }\n    )\n    smufl: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"pattern\": r\"pict\\c+\",\n        }\n    )\n\n\n@dataclass\nclass MetronomeBeam:\n    \"\"\"\n    The metronome-beam type works like the beam type in defining metric\n    relationships, but does not include all the attributes available in the\n    beam type.\n    \"\"\"\n    class Meta:\n        name = \"metronome-beam\"\n\n    value: Optional[BeamValue] = field(\n        default=None,\n        metadata={\n            \"required\": True,\n        }\n    )\n    number: int = field(\n        default=1,\n        metadata={\n            \"type\": \"Attribute\",\n            \"min_inclusive\": 1,\n            \"max_inclusive\": 8,\n        }\n    )\n\n\n@dataclass\nclass MetronomeTied:\n    \"\"\"The metronome-tied indicates the presence of a tie within a metric\n    relationship mark.\n\n    As with the tied element, both the start and stop of the tie should\n    be specified, in this case within separate metronome-note elements.\n    \"\"\"\n    class Meta:\n        name = \"metronome-tied\"\n\n    type: Optional[StartStop] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"required\": True,\n        }\n    )\n\n\n@dataclass\nclass Miscellaneous:\n    \"\"\"If a program has other metadata not yet supported in the MusicXML\n    format, it can go in the miscellaneous element.\n\n    The miscellaneous type puts each separate part of metadata into its\n    own miscellaneous-field type.\n    \"\"\"\n    class Meta:\n        name = \"miscellaneous\"\n\n    miscellaneous_field: List[MiscellaneousField] = field(\n        default_factory=list,\n        metadata={\n            \"name\": \"miscellaneous-field\",\n            \"type\": \"Element\",\n        }\n    )\n\n\n@dataclass\nclass MultipleRest:\n    \"\"\"The text of the multiple-rest type indicates the number of measures in\n    the multiple rest.\n\n    Multiple rests may use the 1-bar / 2-bar / 4-bar rest symbols, or a\n    single shape. The use-symbols attribute indicates which to use; it\n    is no if not specified.\n    \"\"\"\n    class Meta:\n        name = \"multiple-rest\"\n\n    value: Optional[int] = field(\n        default=None,\n        metadata={\n            \"required\": True,\n        }\n    )\n    use_symbols: Optional[YesNo] = field(\n        default=None,\n        metadata={\n            \"name\": \"use-symbols\",\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass NonArpeggiate:\n    \"\"\"The non-arpeggiate type indicates that this note is at the top or bottom\n    of a bracket indicating to not arpeggiate these notes.\n\n    Since this does not involve playback, it is only used on the top or\n    bottom notes, not on each note as for the arpeggiate type.\n    \"\"\"\n    class Meta:\n        name = \"non-arpeggiate\"\n\n    type: Optional[TopBottom] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"required\": True,\n        }\n    )\n    number: Optional[int] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"min_inclusive\": 1,\n            \"max_inclusive\": 16,\n        }\n    )\n    default_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    default_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    placement: Optional[AboveBelow] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    color: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"pattern\": r\"#[\\dA-F]{6}([\\dA-F][\\dA-F])?\",\n        }\n    )\n    id: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass NoteSize:\n    \"\"\"The note-size type indicates the percentage of the regular note size to\n    use for notes with a cue and large size as defined in the type element.\n\n    The grace type is used for notes of cue size that that include a\n    grace element. The cue type is used for all other notes with cue\n    size, whether defined explicitly or implicitly via a cue element.\n    The large type is used for notes of large size. The text content\n    represent the numeric percentage. A value of 100 would be identical\n    to the size of a regular note as defined by the music font.\n    \"\"\"\n    class Meta:\n        name = \"note-size\"\n\n    value: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"required\": True,\n            \"min_inclusive\": Decimal(\"0\"),\n        }\n    )\n    type: Optional[NoteSizeType] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"required\": True,\n        }\n    )\n\n\n@dataclass\nclass NoteType:\n    \"\"\"The note-type type indicates the graphic note type.\n\n    Values range from 1024th to maxima. The size attribute indicates\n    full, cue, grace-cue, or large size. The default is full for regular\n    notes, grace-cue for notes that contain both grace and cue elements,\n    and cue for notes that contain either a cue or a grace element, but\n    not both.\n    \"\"\"\n    class Meta:\n        name = \"note-type\"\n\n    value: Optional[NoteTypeValue] = field(\n        default=None,\n        metadata={\n            \"required\": True,\n        }\n    )\n    size: Optional[SymbolSize] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass Notehead:\n    \"\"\"The notehead type indicates shapes other than the open and closed ovals\n    associated with note durations.\n\n    The smufl attribute can be used to specify a particular notehead,\n    allowing application interoperability without requiring every SMuFL\n    glyph to have a MusicXML element equivalent. This attribute can be\n    used either with the \"other\" value, or to refine a specific notehead\n    value such as \"cluster\". Noteheads in the SMuFL Note name noteheads\n    and Note name noteheads supplement ranges (U+E150–U+E1AF and\n    U+EEE0–U+EEFF) should not use the smufl attribute or the \"other\"\n    value, but instead use the notehead-text element. For the enclosed\n    shapes, the default is to be hollow for half notes and longer, and\n    filled otherwise. The filled attribute can be set to change this if\n    needed. If the parentheses attribute is set to yes, the notehead is\n    parenthesized. It is no by default.\n    \"\"\"\n    class Meta:\n        name = \"notehead\"\n\n    value: Optional[NoteheadValue] = field(\n        default=None,\n        metadata={\n            \"required\": True,\n        }\n    )\n    filled: Optional[YesNo] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    parentheses: Optional[YesNo] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    font_family: Optional[str] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-family\",\n            \"type\": \"Attribute\",\n            \"pattern\": r\"[^,]+(, ?[^,]+)*\",\n        }\n    )\n    font_style: Optional[FontStyle] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-style\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_size: Optional[Union[Decimal, CssFontSize]] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-size\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_weight: Optional[FontWeight] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-weight\",\n            \"type\": \"Attribute\",\n        }\n    )\n    color: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"pattern\": r\"#[\\dA-F]{6}([\\dA-F][\\dA-F])?\",\n        }\n    )\n    smufl: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass NumeralKey:\n    \"\"\"The numeral-key type is used when the key for the numeral is different\n    than the key specified by the key signature.\n\n    The numeral-fifths element specifies the key in the same way as the\n    fifths element. The numeral-mode element specifies the mode similar\n    to the mode element, but with a restricted set of values\n    \"\"\"\n    class Meta:\n        name = \"numeral-key\"\n\n    numeral_fifths: Optional[int] = field(\n        default=None,\n        metadata={\n            \"name\": \"numeral-fifths\",\n            \"type\": \"Element\",\n            \"required\": True,\n        }\n    )\n    numeral_mode: Optional[NumeralMode] = field(\n        default=None,\n        metadata={\n            \"name\": \"numeral-mode\",\n            \"type\": \"Element\",\n            \"required\": True,\n        }\n    )\n    print_object: Optional[YesNo] = field(\n        default=None,\n        metadata={\n            \"name\": \"print-object\",\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass NumeralRoot:\n    \"\"\"The numeral-root type represents the Roman numeral or Nashville number\n    as a positive integer from 1 to 7.\n\n    The text attribute indicates how the numeral should appear in the\n    score. A numeral-root value of 5 with a kind of major would have a\n    text attribute of \"V\" if displayed as a Roman numeral, and \"5\" if\n    displayed as a Nashville number. If the text attribute is not\n    specified, the display is application-dependent.\n    \"\"\"\n    class Meta:\n        name = \"numeral-root\"\n\n    value: Optional[int] = field(\n        default=None,\n        metadata={\n            \"required\": True,\n            \"min_inclusive\": 1,\n            \"max_inclusive\": 7,\n        }\n    )\n    text: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    default_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    default_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_family: Optional[str] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-family\",\n            \"type\": \"Attribute\",\n            \"pattern\": r\"[^,]+(, ?[^,]+)*\",\n        }\n    )\n    font_style: Optional[FontStyle] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-style\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_size: Optional[Union[Decimal, CssFontSize]] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-size\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_weight: Optional[FontWeight] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-weight\",\n            \"type\": \"Attribute\",\n        }\n    )\n    color: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"pattern\": r\"#[\\dA-F]{6}([\\dA-F][\\dA-F])?\",\n        }\n    )\n\n\n@dataclass\nclass OctaveShift:\n    \"\"\"The octave shift type indicates where notes are shifted up or down from\n    their true pitched values because of printing difficulty.\n\n    Thus a treble clef line noted with 8va will be indicated with an\n    octave-shift down from the pitch data indicated in the notes. A size\n    of 8 indicates one octave; a size of 15 indicates two octaves.\n    \"\"\"\n    class Meta:\n        name = \"octave-shift\"\n\n    type: Optional[UpDownStopContinue] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"required\": True,\n        }\n    )\n    number: Optional[int] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"min_inclusive\": 1,\n            \"max_inclusive\": 16,\n        }\n    )\n    size: int = field(\n        default=8,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    dash_length: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"dash-length\",\n            \"type\": \"Attribute\",\n        }\n    )\n    space_length: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"space-length\",\n            \"type\": \"Attribute\",\n        }\n    )\n    default_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    default_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_family: Optional[str] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-family\",\n            \"type\": \"Attribute\",\n            \"pattern\": r\"[^,]+(, ?[^,]+)*\",\n        }\n    )\n    font_style: Optional[FontStyle] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-style\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_size: Optional[Union[Decimal, CssFontSize]] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-size\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_weight: Optional[FontWeight] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-weight\",\n            \"type\": \"Attribute\",\n        }\n    )\n    color: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"pattern\": r\"#[\\dA-F]{6}([\\dA-F][\\dA-F])?\",\n        }\n    )\n    id: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass Offset:\n    \"\"\"An offset is represented in terms of divisions, and indicates where the\n    direction will appear relative to the current musical location.\n\n    The current musical location is always within the current measure,\n    even at the end of a measure. The offset affects the visual\n    appearance of the direction. If the sound attribute is \"yes\", then\n    the offset affects playback and listening too. If the sound\n    attribute is \"no\", then any sound or listening associated with the\n    direction takes effect at the current location. The sound attribute\n    is \"no\" by default for compatibility with earlier versions of the\n    MusicXML format. If an element within a direction includes a\n    default-x attribute, the offset value will be ignored when\n    determining the appearance of that element.\n    \"\"\"\n    class Meta:\n        name = \"offset\"\n\n    value: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"required\": True,\n        }\n    )\n    sound: Optional[YesNo] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass Opus:\n    \"\"\"\n    The opus type represents a link to a MusicXML opus document that composes\n    multiple MusicXML scores into a collection.\n    \"\"\"\n    class Meta:\n        name = \"opus\"\n\n    href: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"namespace\": \"http://www.w3.org/1999/xlink\",\n            \"required\": True,\n        }\n    )\n    type: TypeValue = field(\n        init=False,\n        default=TypeValue.SIMPLE,\n        metadata={\n            \"type\": \"Attribute\",\n            \"namespace\": \"http://www.w3.org/1999/xlink\",\n        }\n    )\n    role: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"namespace\": \"http://www.w3.org/1999/xlink\",\n        }\n    )\n    title: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"namespace\": \"http://www.w3.org/1999/xlink\",\n        }\n    )\n    show: ShowValue = field(\n        default=ShowValue.REPLACE,\n        metadata={\n            \"type\": \"Attribute\",\n            \"namespace\": \"http://www.w3.org/1999/xlink\",\n        }\n    )\n    actuate: ActuateValue = field(\n        default=ActuateValue.ON_REQUEST,\n        metadata={\n            \"type\": \"Attribute\",\n            \"namespace\": \"http://www.w3.org/1999/xlink\",\n        }\n    )\n\n\n@dataclass\nclass OtherDirection:\n    \"\"\"The other-direction type is used to define any direction symbols not yet\n    in the MusicXML format.\n\n    The smufl attribute can be used to specify a particular direction\n    symbol, allowing application interoperability without requiring\n    every SMuFL glyph to have a MusicXML element equivalent. Using the\n    other-direction type without the smufl attribute allows for extended\n    representation, though without application interoperability.\n    \"\"\"\n    class Meta:\n        name = \"other-direction\"\n\n    value: str = field(\n        default=\"\",\n        metadata={\n            \"required\": True,\n        }\n    )\n    print_object: Optional[YesNo] = field(\n        default=None,\n        metadata={\n            \"name\": \"print-object\",\n            \"type\": \"Attribute\",\n        }\n    )\n    default_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    default_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_family: Optional[str] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-family\",\n            \"type\": \"Attribute\",\n            \"pattern\": r\"[^,]+(, ?[^,]+)*\",\n        }\n    )\n    font_style: Optional[FontStyle] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-style\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_size: Optional[Union[Decimal, CssFontSize]] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-size\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_weight: Optional[FontWeight] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-weight\",\n            \"type\": \"Attribute\",\n        }\n    )\n    color: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"pattern\": r\"#[\\dA-F]{6}([\\dA-F][\\dA-F])?\",\n        }\n    )\n    halign: Optional[LeftCenterRight] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    valign: Optional[Valign] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    smufl: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    id: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass OtherNotation:\n    \"\"\"The other-notation type is used to define any notations not yet in the\n    MusicXML format.\n\n    It handles notations where more specific extension elements such as\n    other-dynamics and other-technical are not appropriate. The smufl\n    attribute can be used to specify a particular notation, allowing\n    application interoperability without requiring every SMuFL glyph to\n    have a MusicXML element equivalent. Using the other-notation type\n    without the smufl attribute allows for extended representation,\n    though without application interoperability.\n    \"\"\"\n    class Meta:\n        name = \"other-notation\"\n\n    value: str = field(\n        default=\"\",\n        metadata={\n            \"required\": True,\n        }\n    )\n    type: Optional[StartStopSingle] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"required\": True,\n        }\n    )\n    number: int = field(\n        default=1,\n        metadata={\n            \"type\": \"Attribute\",\n            \"min_inclusive\": 1,\n            \"max_inclusive\": 16,\n        }\n    )\n    print_object: Optional[YesNo] = field(\n        default=None,\n        metadata={\n            \"name\": \"print-object\",\n            \"type\": \"Attribute\",\n        }\n    )\n    default_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    default_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_family: Optional[str] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-family\",\n            \"type\": \"Attribute\",\n            \"pattern\": r\"[^,]+(, ?[^,]+)*\",\n        }\n    )\n    font_style: Optional[FontStyle] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-style\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_size: Optional[Union[Decimal, CssFontSize]] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-size\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_weight: Optional[FontWeight] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-weight\",\n            \"type\": \"Attribute\",\n        }\n    )\n    color: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"pattern\": r\"#[\\dA-F]{6}([\\dA-F][\\dA-F])?\",\n        }\n    )\n    placement: Optional[AboveBelow] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    smufl: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    id: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass OtherPlacementText:\n    \"\"\"The other-placement-text type represents a text element with print-\n    style, placement, and smufl attribute groups.\n\n    This type is used by MusicXML notation extension elements to allow\n    specification of specific SMuFL glyphs without needed to add every\n    glyph as a MusicXML element.\n    \"\"\"\n    class Meta:\n        name = \"other-placement-text\"\n\n    value: str = field(\n        default=\"\",\n        metadata={\n            \"required\": True,\n        }\n    )\n    default_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    default_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_family: Optional[str] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-family\",\n            \"type\": \"Attribute\",\n            \"pattern\": r\"[^,]+(, ?[^,]+)*\",\n        }\n    )\n    font_style: Optional[FontStyle] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-style\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_size: Optional[Union[Decimal, CssFontSize]] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-size\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_weight: Optional[FontWeight] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-weight\",\n            \"type\": \"Attribute\",\n        }\n    )\n    color: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"pattern\": r\"#[\\dA-F]{6}([\\dA-F][\\dA-F])?\",\n        }\n    )\n    placement: Optional[AboveBelow] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    smufl: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass PageMargins:\n    \"\"\"Page margins are specified either for both even and odd pages, or via\n    separate odd and even page number values.\n\n    The type attribute is not needed when used as part of a print\n    element. If omitted when the page-margins type is used in the\n    defaults element, \"both\" is the default value.\n    \"\"\"\n    class Meta:\n        name = \"page-margins\"\n\n    left_margin: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"left-margin\",\n            \"type\": \"Element\",\n            \"required\": True,\n        }\n    )\n    right_margin: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"right-margin\",\n            \"type\": \"Element\",\n            \"required\": True,\n        }\n    )\n    top_margin: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"top-margin\",\n            \"type\": \"Element\",\n            \"required\": True,\n        }\n    )\n    bottom_margin: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"bottom-margin\",\n            \"type\": \"Element\",\n            \"required\": True,\n        }\n    )\n    type: Optional[MarginType] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass PartClef:\n    \"\"\"The child elements of the part-clef type have the same meaning as for\n    the clef type.\n\n    However that meaning applies to a transposed part created from the\n    existing score file.\n\n    :ivar sign: The sign element represents the clef symbol.\n    :ivar line: Line numbers are counted from the bottom of the staff.\n        They are only needed with the G, F, and C signs in order to\n        position a pitch correctly on the staff. Standard values are 2\n        for the G sign (treble clef), 4 for the F sign (bass clef), and\n        3 for the C sign (alto clef). Line values can be used to specify\n        positions outside the staff, such as a C clef positioned in the\n        middle of a grand staff.\n    :ivar clef_octave_change: The clef-octave-change element is used for\n        transposing clefs. A treble clef for tenors would have a value\n        of -1.\n    \"\"\"\n    class Meta:\n        name = \"part-clef\"\n\n    sign: Optional[ClefSign] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n            \"required\": True,\n        }\n    )\n    line: Optional[int] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    clef_octave_change: Optional[int] = field(\n        default=None,\n        metadata={\n            \"name\": \"clef-octave-change\",\n            \"type\": \"Element\",\n        }\n    )\n\n\n@dataclass\nclass PartLink:\n    \"\"\"The part-link type allows MusicXML data for both score and parts to be\n    contained within a single compressed MusicXML file.\n\n    It links a score-part from a score document to MusicXML documents\n    that contain parts data. In the case of a single compressed MusicXML\n    file, the link href values are paths that are relative to the root\n    folder of the zip file.\n\n    :ivar instrument_link:\n    :ivar group_link: Multiple part-link elements can reference\n        different types of linked documents, such as parts and condensed\n        score. The optional group-link elements identify the groups used\n        in the linked document. The content of a group-link element\n        should match the content of a group element in the linked\n        document.\n    :ivar href:\n    :ivar type:\n    :ivar role:\n    :ivar title:\n    :ivar show:\n    :ivar actuate:\n    \"\"\"\n    class Meta:\n        name = \"part-link\"\n\n    instrument_link: List[InstrumentLink] = field(\n        default_factory=list,\n        metadata={\n            \"name\": \"instrument-link\",\n            \"type\": \"Element\",\n        }\n    )\n    group_link: List[str] = field(\n        default_factory=list,\n        metadata={\n            \"name\": \"group-link\",\n            \"type\": \"Element\",\n        }\n    )\n    href: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"namespace\": \"http://www.w3.org/1999/xlink\",\n            \"required\": True,\n        }\n    )\n    type: TypeValue = field(\n        init=False,\n        default=TypeValue.SIMPLE,\n        metadata={\n            \"type\": \"Attribute\",\n            \"namespace\": \"http://www.w3.org/1999/xlink\",\n        }\n    )\n    role: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"namespace\": \"http://www.w3.org/1999/xlink\",\n        }\n    )\n    title: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"namespace\": \"http://www.w3.org/1999/xlink\",\n        }\n    )\n    show: ShowValue = field(\n        default=ShowValue.REPLACE,\n        metadata={\n            \"type\": \"Attribute\",\n            \"namespace\": \"http://www.w3.org/1999/xlink\",\n        }\n    )\n    actuate: ActuateValue = field(\n        default=ActuateValue.ON_REQUEST,\n        metadata={\n            \"type\": \"Attribute\",\n            \"namespace\": \"http://www.w3.org/1999/xlink\",\n        }\n    )\n\n\n@dataclass\nclass PartName:\n    \"\"\"The part-name type describes the name or abbreviation of a score-part\n    element.\n\n    Formatting attributes for the part-name element are deprecated in\n    Version 2.0 in favor of the new part-name-display and part-\n    abbreviation-display elements.\n    \"\"\"\n    class Meta:\n        name = \"part-name\"\n\n    value: str = field(\n        default=\"\",\n        metadata={\n            \"required\": True,\n        }\n    )\n    default_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    default_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_family: Optional[str] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-family\",\n            \"type\": \"Attribute\",\n            \"pattern\": r\"[^,]+(, ?[^,]+)*\",\n        }\n    )\n    font_style: Optional[FontStyle] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-style\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_size: Optional[Union[Decimal, CssFontSize]] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-size\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_weight: Optional[FontWeight] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-weight\",\n            \"type\": \"Attribute\",\n        }\n    )\n    color: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"pattern\": r\"#[\\dA-F]{6}([\\dA-F][\\dA-F])?\",\n        }\n    )\n    print_object: Optional[YesNo] = field(\n        default=None,\n        metadata={\n            \"name\": \"print-object\",\n            \"type\": \"Attribute\",\n        }\n    )\n    justify: Optional[LeftCenterRight] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass PartSymbol:\n    \"\"\"The part-symbol type indicates how a symbol for a multi-staff part is\n    indicated in the score; brace is the default value.\n\n    The top-staff and bottom-staff attributes are used when the brace\n    does not extend across the entire part. For example, in a 3-staff\n    organ part, the top-staff will typically be 1 for the right hand,\n    while the bottom-staff will typically be 2 for the left hand. Staff\n    3 for the pedals is usually outside the brace. By default, the\n    presence of a part-symbol element that does not extend across the\n    entire part also indicates a corresponding change in the common\n    barlines within a part.\n    \"\"\"\n    class Meta:\n        name = \"part-symbol\"\n\n    value: Optional[GroupSymbolValue] = field(\n        default=None,\n        metadata={\n            \"required\": True,\n        }\n    )\n    top_staff: Optional[int] = field(\n        default=None,\n        metadata={\n            \"name\": \"top-staff\",\n            \"type\": \"Attribute\",\n        }\n    )\n    bottom_staff: Optional[int] = field(\n        default=None,\n        metadata={\n            \"name\": \"bottom-staff\",\n            \"type\": \"Attribute\",\n        }\n    )\n    default_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    default_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    color: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"pattern\": r\"#[\\dA-F]{6}([\\dA-F][\\dA-F])?\",\n        }\n    )\n\n\n@dataclass\nclass Pedal:\n    \"\"\"The pedal type represents piano pedal marks, including damper and\n    sostenuto pedal marks.\n\n    The line attribute is yes if pedal lines are used. The sign attribute is yes if Ped, Sost, and * signs are used. For compatibility with older versions, the sign attribute is yes by default if the line attribute is no, and is no by default if the line attribute is yes. If the sign attribute is set to yes and the type is start or sostenuto, the abbreviated attribute is yes if the short P and S signs are used, and no if the full Ped and Sost signs are used. It is no by default. Otherwise the abbreviated attribute is ignored. The alignment attributes are ignored if the sign attribute is no.\n    \"\"\"\n    class Meta:\n        name = \"pedal\"\n\n    type: Optional[PedalType] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"required\": True,\n        }\n    )\n    number: Optional[int] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"min_inclusive\": 1,\n            \"max_inclusive\": 16,\n        }\n    )\n    line: Optional[YesNo] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    sign: Optional[YesNo] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    abbreviated: Optional[YesNo] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    default_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    default_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_family: Optional[str] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-family\",\n            \"type\": \"Attribute\",\n            \"pattern\": r\"[^,]+(, ?[^,]+)*\",\n        }\n    )\n    font_style: Optional[FontStyle] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-style\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_size: Optional[Union[Decimal, CssFontSize]] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-size\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_weight: Optional[FontWeight] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-weight\",\n            \"type\": \"Attribute\",\n        }\n    )\n    color: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"pattern\": r\"#[\\dA-F]{6}([\\dA-F][\\dA-F])?\",\n        }\n    )\n    halign: Optional[LeftCenterRight] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    valign: Optional[Valign] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    id: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass PedalTuning:\n    \"\"\"\n    The pedal-tuning type specifies the tuning of a single harp pedal.\n\n    :ivar pedal_step: The pedal-step element defines the pitch step for\n        a single harp pedal.\n    :ivar pedal_alter: The pedal-alter element defines the chromatic\n        alteration for a single harp pedal.\n    \"\"\"\n    class Meta:\n        name = \"pedal-tuning\"\n\n    pedal_step: Optional[Step] = field(\n        default=None,\n        metadata={\n            \"name\": \"pedal-step\",\n            \"type\": \"Element\",\n            \"required\": True,\n        }\n    )\n    pedal_alter: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"pedal-alter\",\n            \"type\": \"Element\",\n            \"required\": True,\n        }\n    )\n\n\n@dataclass\nclass PerMinute:\n    \"\"\"The per-minute type can be a number, or a text description including\n    numbers.\n\n    If a font is specified, it overrides the font specified for the\n    overall metronome element. This allows separate specification of a\n    music font for the beat-unit and a text font for the numeric value,\n    in cases where a single metronome font is not used.\n    \"\"\"\n    class Meta:\n        name = \"per-minute\"\n\n    value: str = field(\n        default=\"\",\n        metadata={\n            \"required\": True,\n        }\n    )\n    font_family: Optional[str] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-family\",\n            \"type\": \"Attribute\",\n            \"pattern\": r\"[^,]+(, ?[^,]+)*\",\n        }\n    )\n    font_style: Optional[FontStyle] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-style\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_size: Optional[Union[Decimal, CssFontSize]] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-size\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_weight: Optional[FontWeight] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-weight\",\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass Pitch:\n    \"\"\"\n    Pitch is represented as a combination of the step of the diatonic scale,\n    the chromatic alteration, and the octave.\n    \"\"\"\n    class Meta:\n        name = \"pitch\"\n\n    step: Optional[Step] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n            \"required\": True,\n        }\n    )\n    alter: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    octave: Optional[int] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n            \"required\": True,\n            \"min_inclusive\": 0,\n            \"max_inclusive\": 9,\n        }\n    )\n\n\n@dataclass\nclass Pitched:\n    \"\"\"The pitched-value type represents pictograms for pitched percussion\n    instruments.\n\n    The smufl attribute is used to distinguish different SMuFL glyphs\n    for a particular pictogram within the Tuned mallet percussion\n    pictograms range.\n    \"\"\"\n    class Meta:\n        name = \"pitched\"\n\n    value: Optional[PitchedValue] = field(\n        default=None,\n        metadata={\n            \"required\": True,\n        }\n    )\n    smufl: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"pattern\": r\"pict\\c+\",\n        }\n    )\n\n\n@dataclass\nclass PlacementText:\n    \"\"\"\n    The placement-text type represents a text element with print-style and\n    placement attribute groups.\n    \"\"\"\n    class Meta:\n        name = \"placement-text\"\n\n    value: str = field(\n        default=\"\",\n        metadata={\n            \"required\": True,\n        }\n    )\n    default_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    default_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_family: Optional[str] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-family\",\n            \"type\": \"Attribute\",\n            \"pattern\": r\"[^,]+(, ?[^,]+)*\",\n        }\n    )\n    font_style: Optional[FontStyle] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-style\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_size: Optional[Union[Decimal, CssFontSize]] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-size\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_weight: Optional[FontWeight] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-weight\",\n            \"type\": \"Attribute\",\n        }\n    )\n    color: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"pattern\": r\"#[\\dA-F]{6}([\\dA-F][\\dA-F])?\",\n        }\n    )\n    placement: Optional[AboveBelow] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass Play:\n    \"\"\"The play type specifies playback techniques to be used in conjunction\n    with the instrument-sound element.\n\n    When used as part of a sound element, it applies to all notes going\n    forward in score order. In multi-instrument parts, the affected\n    instrument should be specified using the id attribute. When used as\n    part of a note element, it applies to the current note only.\n\n    :ivar ipa: The ipa element represents International Phonetic\n        Alphabet (IPA) sounds for vocal music. String content is limited\n        to IPA 2015 symbols represented in Unicode 13.0.\n    :ivar mute:\n    :ivar semi_pitched:\n    :ivar other_play:\n    :ivar id:\n    \"\"\"\n    class Meta:\n        name = \"play\"\n\n    ipa: List[str] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n            \"sequential\": True,\n        }\n    )\n    mute: List[Mute] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n            \"sequential\": True,\n        }\n    )\n    semi_pitched: List[SemiPitched] = field(\n        default_factory=list,\n        metadata={\n            \"name\": \"semi-pitched\",\n            \"type\": \"Element\",\n            \"sequential\": True,\n        }\n    )\n    other_play: List[OtherPlay] = field(\n        default_factory=list,\n        metadata={\n            \"name\": \"other-play\",\n            \"type\": \"Element\",\n            \"sequential\": True,\n        }\n    )\n    id: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass PrincipalVoice:\n    \"\"\"The principal-voice type represents principal and secondary voices in a\n    score, either for analysis or for square bracket symbols that appear in a\n    score.\n\n    The element content is used for analysis and may be any text value.\n    The symbol attribute indicates the type of symbol used. When used\n    for analysis separate from any printed score markings, it should be\n    set to none. Otherwise if the type is stop it should be set to\n    plain.\n    \"\"\"\n    class Meta:\n        name = \"principal-voice\"\n\n    value: str = field(\n        default=\"\",\n        metadata={\n            \"required\": True,\n        }\n    )\n    type: Optional[StartStop] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"required\": True,\n        }\n    )\n    symbol: Optional[PrincipalVoiceSymbol] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"required\": True,\n        }\n    )\n    default_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    default_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_family: Optional[str] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-family\",\n            \"type\": \"Attribute\",\n            \"pattern\": r\"[^,]+(, ?[^,]+)*\",\n        }\n    )\n    font_style: Optional[FontStyle] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-style\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_size: Optional[Union[Decimal, CssFontSize]] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-size\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_weight: Optional[FontWeight] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-weight\",\n            \"type\": \"Attribute\",\n        }\n    )\n    color: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"pattern\": r\"#[\\dA-F]{6}([\\dA-F][\\dA-F])?\",\n        }\n    )\n    halign: Optional[LeftCenterRight] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    valign: Optional[Valign] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    id: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass Release(Empty):\n    \"\"\"The release type indicates that a bend is a release rather than a normal\n    bend or pre-bend.\n\n    The offset attribute specifies where the release starts in terms of\n    divisions relative to the current note. The first-beat and last-beat\n    attributes of the parent bend element are relative to the original\n    note position, not this offset value.\n    \"\"\"\n    class Meta:\n        name = \"release\"\n\n    offset: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass Repeat:\n    \"\"\"The repeat type represents repeat marks.\n\n    The start of the repeat has a forward direction while the end of the\n    repeat has a backward direction. The times and after-jump attributes\n    are only used with backward repeats that are not part of an ending.\n    The times attribute indicates the number of times the repeated\n    section is played. The after-jump attribute indicates if the repeats\n    are played after a jump due to a da capo or dal segno.\n    \"\"\"\n    class Meta:\n        name = \"repeat\"\n\n    direction: Optional[BackwardForward] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"required\": True,\n        }\n    )\n    times: Optional[int] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    after_jump: Optional[YesNo] = field(\n        default=None,\n        metadata={\n            \"name\": \"after-jump\",\n            \"type\": \"Attribute\",\n        }\n    )\n    winged: Optional[Winged] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass Rest:\n    \"\"\"The rest element indicates notated rests or silences.\n\n    Rest elements are usually empty, but placement on the staff can be\n    specified using display-step and display-octave elements. If the\n    measure attribute is set to yes, this indicates this is a complete\n    measure rest.\n    \"\"\"\n    class Meta:\n        name = \"rest\"\n\n    display_step: Optional[Step] = field(\n        default=None,\n        metadata={\n            \"name\": \"display-step\",\n            \"type\": \"Element\",\n        }\n    )\n    display_octave: Optional[int] = field(\n        default=None,\n        metadata={\n            \"name\": \"display-octave\",\n            \"type\": \"Element\",\n            \"min_inclusive\": 0,\n            \"max_inclusive\": 9,\n        }\n    )\n    measure: Optional[YesNo] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass RootStep:\n    \"\"\"The root-step type represents the pitch step of the root of the current\n    chord within the harmony element.\n\n    The text attribute indicates how the root should appear in a score\n    if not using the element contents.\n    \"\"\"\n    class Meta:\n        name = \"root-step\"\n\n    value: Optional[Step] = field(\n        default=None,\n        metadata={\n            \"required\": True,\n        }\n    )\n    text: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    default_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    default_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_family: Optional[str] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-family\",\n            \"type\": \"Attribute\",\n            \"pattern\": r\"[^,]+(, ?[^,]+)*\",\n        }\n    )\n    font_style: Optional[FontStyle] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-style\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_size: Optional[Union[Decimal, CssFontSize]] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-size\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_weight: Optional[FontWeight] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-weight\",\n            \"type\": \"Attribute\",\n        }\n    )\n    color: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"pattern\": r\"#[\\dA-F]{6}([\\dA-F][\\dA-F])?\",\n        }\n    )\n\n\n@dataclass\nclass ScoreInstrument:\n    \"\"\"The score-instrument type represents a single instrument within a score-\n    part.\n\n    As with the score-part type, each score-instrument has a required ID\n    attribute, a name, and an optional abbreviation. A score-instrument\n    type is also required if the score specifies MIDI 1.0 channels,\n    banks, or programs. An initial midi-instrument assignment can also\n    be made here. MusicXML software should be able to automatically\n    assign reasonable channels and instruments without these elements in\n    simple cases, such as where part names match General MIDI instrument\n    names. The score-instrument element can also distinguish multiple\n    instruments of the same type that are on the same part, such as\n    Clarinet 1 and Clarinet 2 instruments within a Clarinets 1 and 2\n    part.\n\n    :ivar instrument_name: The instrument-name element is typically used\n        within a software application, rather than appearing on the\n        printed page of a score.\n    :ivar instrument_abbreviation: The optional instrument-abbreviation\n        element is typically used within a software application, rather\n        than appearing on the printed page of a score.\n    :ivar instrument_sound: The instrument-sound element describes the\n        default timbre of the score-instrument. This description is\n        independent of a particular virtual or MIDI instrument\n        specification and allows playback to be shared more easily\n        between applications and libraries.\n    :ivar solo: The solo element is present if performance is intended\n        by a solo instrument.\n    :ivar ensemble: The ensemble element is present if performance is\n        intended by an ensemble such as an orchestral section. The text\n        of the ensemble element contains the size of the section, or is\n        empty if the ensemble size is not specified.\n    :ivar virtual_instrument:\n    :ivar id:\n    \"\"\"\n    class Meta:\n        name = \"score-instrument\"\n\n    instrument_name: Optional[str] = field(\n        default=None,\n        metadata={\n            \"name\": \"instrument-name\",\n            \"type\": \"Element\",\n            \"required\": True,\n        }\n    )\n    instrument_abbreviation: Optional[str] = field(\n        default=None,\n        metadata={\n            \"name\": \"instrument-abbreviation\",\n            \"type\": \"Element\",\n        }\n    )\n    instrument_sound: Optional[str] = field(\n        default=None,\n        metadata={\n            \"name\": \"instrument-sound\",\n            \"type\": \"Element\",\n        }\n    )\n    solo: Optional[Empty] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    ensemble: Optional[Union[int, PositiveIntegerOrEmptyValue]] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    virtual_instrument: Optional[VirtualInstrument] = field(\n        default=None,\n        metadata={\n            \"name\": \"virtual-instrument\",\n            \"type\": \"Element\",\n        }\n    )\n    id: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"required\": True,\n        }\n    )\n\n\n@dataclass\nclass Segno:\n    \"\"\"The segno type is the visual indicator of a segno sign.\n\n    The exact glyph can be specified with the smufl attribute. A sound\n    element is also needed to guide playback applications reliably.\n    \"\"\"\n    class Meta:\n        name = \"segno\"\n\n    default_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    default_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_family: Optional[str] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-family\",\n            \"type\": \"Attribute\",\n            \"pattern\": r\"[^,]+(, ?[^,]+)*\",\n        }\n    )\n    font_style: Optional[FontStyle] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-style\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_size: Optional[Union[Decimal, CssFontSize]] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-size\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_weight: Optional[FontWeight] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-weight\",\n            \"type\": \"Attribute\",\n        }\n    )\n    color: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"pattern\": r\"#[\\dA-F]{6}([\\dA-F][\\dA-F])?\",\n        }\n    )\n    halign: Optional[LeftCenterRight] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    valign: Optional[Valign] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    id: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    smufl: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"pattern\": r\"segno\\c*\",\n        }\n    )\n\n\n@dataclass\nclass Slash:\n    \"\"\"The slash type is used to indicate that slash notation is to be used.\n\n    If the slash is on every beat, use-stems is no (the default). To\n    indicate rhythms but not pitches, use-stems is set to yes. The type\n    attribute indicates whether this is the start or stop of a slash\n    notation style. The use-dots attribute works as for the beat-repeat\n    element, and only has effect if use-stems is no.\n\n    :ivar slash_type: The slash-type element indicates the graphical\n        note type to use for the display of repetition marks.\n    :ivar slash_dot: The slash-dot element is used to specify any\n        augmentation dots in the note type used to display repetition\n        marks.\n    :ivar except_voice: The except-voice element is used to specify a\n        combination of slash notation and regular notation. Any note\n        elements that are in voices specified by the except-voice\n        elements are displayed in normal notation, in addition to the\n        slash notation that is always displayed.\n    :ivar type:\n    :ivar use_dots:\n    :ivar use_stems:\n    \"\"\"\n    class Meta:\n        name = \"slash\"\n\n    slash_type: Optional[NoteTypeValue] = field(\n        default=None,\n        metadata={\n            \"name\": \"slash-type\",\n            \"type\": \"Element\",\n        }\n    )\n    slash_dot: List[Empty] = field(\n        default_factory=list,\n        metadata={\n            \"name\": \"slash-dot\",\n            \"type\": \"Element\",\n        }\n    )\n    except_voice: List[str] = field(\n        default_factory=list,\n        metadata={\n            \"name\": \"except-voice\",\n            \"type\": \"Element\",\n        }\n    )\n    type: Optional[StartStop] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"required\": True,\n        }\n    )\n    use_dots: Optional[YesNo] = field(\n        default=None,\n        metadata={\n            \"name\": \"use-dots\",\n            \"type\": \"Attribute\",\n        }\n    )\n    use_stems: Optional[YesNo] = field(\n        default=None,\n        metadata={\n            \"name\": \"use-stems\",\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass Slide:\n    \"\"\"Glissando and slide types both indicate rapidly moving from one pitch to\n    the other so that individual notes are not discerned.\n\n    A slide is continuous between the two pitches and defaults to a\n    solid line. The optional text for a is printed alongside the line.\n    \"\"\"\n    class Meta:\n        name = \"slide\"\n\n    value: str = field(\n        default=\"\",\n        metadata={\n            \"required\": True,\n        }\n    )\n    type: Optional[StartStop] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"required\": True,\n        }\n    )\n    number: int = field(\n        default=1,\n        metadata={\n            \"type\": \"Attribute\",\n            \"min_inclusive\": 1,\n            \"max_inclusive\": 16,\n        }\n    )\n    line_type: Optional[LineType] = field(\n        default=None,\n        metadata={\n            \"name\": \"line-type\",\n            \"type\": \"Attribute\",\n        }\n    )\n    dash_length: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"dash-length\",\n            \"type\": \"Attribute\",\n        }\n    )\n    space_length: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"space-length\",\n            \"type\": \"Attribute\",\n        }\n    )\n    default_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    default_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_family: Optional[str] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-family\",\n            \"type\": \"Attribute\",\n            \"pattern\": r\"[^,]+(, ?[^,]+)*\",\n        }\n    )\n    font_style: Optional[FontStyle] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-style\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_size: Optional[Union[Decimal, CssFontSize]] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-size\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_weight: Optional[FontWeight] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-weight\",\n            \"type\": \"Attribute\",\n        }\n    )\n    color: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"pattern\": r\"#[\\dA-F]{6}([\\dA-F][\\dA-F])?\",\n        }\n    )\n    accelerate: Optional[YesNo] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    beats: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"min_inclusive\": Decimal(\"2\"),\n        }\n    )\n    first_beat: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"first-beat\",\n            \"type\": \"Attribute\",\n            \"min_inclusive\": Decimal(\"0\"),\n            \"max_inclusive\": Decimal(\"100\"),\n        }\n    )\n    last_beat: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"last-beat\",\n            \"type\": \"Attribute\",\n            \"min_inclusive\": Decimal(\"0\"),\n            \"max_inclusive\": Decimal(\"100\"),\n        }\n    )\n    id: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass Slur:\n    \"\"\"Slur types are empty.\n\n    Most slurs are represented with two elements: one with a start type,\n    and one with a stop type. Slurs can add more elements using a\n    continue type. This is typically used to specify the formatting of\n    cross-system slurs, or to specify the shape of very complex slurs.\n    \"\"\"\n    class Meta:\n        name = \"slur\"\n\n    type: Optional[StartStopContinue] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"required\": True,\n        }\n    )\n    number: int = field(\n        default=1,\n        metadata={\n            \"type\": \"Attribute\",\n            \"min_inclusive\": 1,\n            \"max_inclusive\": 16,\n        }\n    )\n    line_type: Optional[LineType] = field(\n        default=None,\n        metadata={\n            \"name\": \"line-type\",\n            \"type\": \"Attribute\",\n        }\n    )\n    dash_length: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"dash-length\",\n            \"type\": \"Attribute\",\n        }\n    )\n    space_length: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"space-length\",\n            \"type\": \"Attribute\",\n        }\n    )\n    default_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    default_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    placement: Optional[AboveBelow] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    orientation: Optional[OverUnder] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    bezier_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"bezier-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    bezier_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"bezier-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    bezier_x2: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"bezier-x2\",\n            \"type\": \"Attribute\",\n        }\n    )\n    bezier_y2: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"bezier-y2\",\n            \"type\": \"Attribute\",\n        }\n    )\n    bezier_offset: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"bezier-offset\",\n            \"type\": \"Attribute\",\n        }\n    )\n    bezier_offset2: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"bezier-offset2\",\n            \"type\": \"Attribute\",\n        }\n    )\n    color: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"pattern\": r\"#[\\dA-F]{6}([\\dA-F][\\dA-F])?\",\n        }\n    )\n    id: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass StaffDivide:\n    \"\"\"\n    The staff-divide element represents the staff division arrow symbols found\n    at SMuFL code points U+E00B, U+E00C, and U+E00D.\n    \"\"\"\n    class Meta:\n        name = \"staff-divide\"\n\n    type: Optional[StaffDivideSymbol] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"required\": True,\n        }\n    )\n    default_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    default_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_family: Optional[str] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-family\",\n            \"type\": \"Attribute\",\n            \"pattern\": r\"[^,]+(, ?[^,]+)*\",\n        }\n    )\n    font_style: Optional[FontStyle] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-style\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_size: Optional[Union[Decimal, CssFontSize]] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-size\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_weight: Optional[FontWeight] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-weight\",\n            \"type\": \"Attribute\",\n        }\n    )\n    color: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"pattern\": r\"#[\\dA-F]{6}([\\dA-F][\\dA-F])?\",\n        }\n    )\n    halign: Optional[LeftCenterRight] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    valign: Optional[Valign] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    id: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass StaffTuning:\n    \"\"\"\n    The staff-tuning type specifies the open, non-capo tuning of the lines on a\n    tablature staff.\n\n    :ivar tuning_step: The tuning-step element is represented like the\n        step element, with a different name to reflect its different\n        function in string tuning.\n    :ivar tuning_alter: The tuning-alter element is represented like the\n        alter element, with a different name to reflect its different\n        function in string tuning.\n    :ivar tuning_octave: The tuning-octave element is represented like\n        the octave element, with a different name to reflect its\n        different function in string tuning.\n    :ivar line:\n    \"\"\"\n    class Meta:\n        name = \"staff-tuning\"\n\n    tuning_step: Optional[Step] = field(\n        default=None,\n        metadata={\n            \"name\": \"tuning-step\",\n            \"type\": \"Element\",\n            \"required\": True,\n        }\n    )\n    tuning_alter: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"tuning-alter\",\n            \"type\": \"Element\",\n        }\n    )\n    tuning_octave: Optional[int] = field(\n        default=None,\n        metadata={\n            \"name\": \"tuning-octave\",\n            \"type\": \"Element\",\n            \"required\": True,\n            \"min_inclusive\": 0,\n            \"max_inclusive\": 9,\n        }\n    )\n    line: Optional[int] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"required\": True,\n        }\n    )\n\n\n@dataclass\nclass Stem:\n    \"\"\"Stems can be down, up, none, or double.\n\n    For down and up stems, the position attributes can be used to\n    specify stem length. The relative values specify the end of the stem\n    relative to the program default. Default values specify an absolute\n    end stem position. Negative values of relative-y that would flip a\n    stem instead of shortening it are ignored. A stem element associated\n    with a rest refers to a stemlet.\n    \"\"\"\n    class Meta:\n        name = \"stem\"\n\n    value: Optional[StemValue] = field(\n        default=None,\n        metadata={\n            \"required\": True,\n        }\n    )\n    default_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    default_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    color: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"pattern\": r\"#[\\dA-F]{6}([\\dA-F][\\dA-F])?\",\n        }\n    )\n\n\n@dataclass\nclass Stick:\n    \"\"\"The stick type represents pictograms where the material of the stick,\n    mallet, or beater is included.The parentheses and dashed-circle attributes\n    indicate the presence of these marks around the round beater part of a\n    pictogram.\n\n    Values for these attributes are \"no\" if not present.\n    \"\"\"\n    class Meta:\n        name = \"stick\"\n\n    stick_type: Optional[StickType] = field(\n        default=None,\n        metadata={\n            \"name\": \"stick-type\",\n            \"type\": \"Element\",\n            \"required\": True,\n        }\n    )\n    stick_material: Optional[StickMaterial] = field(\n        default=None,\n        metadata={\n            \"name\": \"stick-material\",\n            \"type\": \"Element\",\n            \"required\": True,\n        }\n    )\n    tip: Optional[TipDirection] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    parentheses: Optional[YesNo] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    dashed_circle: Optional[YesNo] = field(\n        default=None,\n        metadata={\n            \"name\": \"dashed-circle\",\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass String:\n    \"\"\"The string type is used with tablature notation, regular notation (where\n    it is often circled), and chord diagrams.\n\n    String numbers start with 1 for the highest pitched full-length\n    string.\n    \"\"\"\n    class Meta:\n        name = \"string\"\n\n    value: Optional[int] = field(\n        default=None,\n        metadata={\n            \"required\": True,\n        }\n    )\n    default_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    default_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_family: Optional[str] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-family\",\n            \"type\": \"Attribute\",\n            \"pattern\": r\"[^,]+(, ?[^,]+)*\",\n        }\n    )\n    font_style: Optional[FontStyle] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-style\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_size: Optional[Union[Decimal, CssFontSize]] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-size\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_weight: Optional[FontWeight] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-weight\",\n            \"type\": \"Attribute\",\n        }\n    )\n    color: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"pattern\": r\"#[\\dA-F]{6}([\\dA-F][\\dA-F])?\",\n        }\n    )\n    placement: Optional[AboveBelow] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass StringMute:\n    \"\"\"\n    The string-mute type represents string mute on and mute off symbols.\n    \"\"\"\n    class Meta:\n        name = \"string-mute\"\n\n    type: Optional[OnOff] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"required\": True,\n        }\n    )\n    default_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    default_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_family: Optional[str] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-family\",\n            \"type\": \"Attribute\",\n            \"pattern\": r\"[^,]+(, ?[^,]+)*\",\n        }\n    )\n    font_style: Optional[FontStyle] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-style\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_size: Optional[Union[Decimal, CssFontSize]] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-size\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_weight: Optional[FontWeight] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-weight\",\n            \"type\": \"Attribute\",\n        }\n    )\n    color: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"pattern\": r\"#[\\dA-F]{6}([\\dA-F][\\dA-F])?\",\n        }\n    )\n    halign: Optional[LeftCenterRight] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    valign: Optional[Valign] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    id: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass StyleText:\n    \"\"\"\n    The style-text type represents a text element with a print-style attribute\n    group.\n    \"\"\"\n    class Meta:\n        name = \"style-text\"\n\n    value: str = field(\n        default=\"\",\n        metadata={\n            \"required\": True,\n        }\n    )\n    default_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    default_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_family: Optional[str] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-family\",\n            \"type\": \"Attribute\",\n            \"pattern\": r\"[^,]+(, ?[^,]+)*\",\n        }\n    )\n    font_style: Optional[FontStyle] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-style\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_size: Optional[Union[Decimal, CssFontSize]] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-size\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_weight: Optional[FontWeight] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-weight\",\n            \"type\": \"Attribute\",\n        }\n    )\n    color: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"pattern\": r\"#[\\dA-F]{6}([\\dA-F][\\dA-F])?\",\n        }\n    )\n\n\n@dataclass\nclass Supports:\n    \"\"\"The supports type indicates if a MusicXML encoding supports a particular\n    MusicXML element.\n\n    This is recommended for elements like beam, stem, and accidental,\n    where the absence of an element is ambiguous if you do not know if\n    the encoding supports that element. For Version 2.0, the supports\n    element is expanded to allow programs to indicate support for\n    particular attributes or particular values. This lets applications\n    communicate, for example, that all system and/or page breaks are\n    contained in the MusicXML file.\n    \"\"\"\n    class Meta:\n        name = \"supports\"\n\n    type: Optional[YesNo] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"required\": True,\n        }\n    )\n    element: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"required\": True,\n        }\n    )\n    attribute: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    value: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass Swing:\n    \"\"\"The swing element specifies whether or not to use swing playback, where\n    consecutive on-beat / off-beat eighth or 16th notes are played with unequal\n    nominal durations.\n\n    The straight element specifies that no swing is present, so\n    consecutive notes have equal durations. The first and second\n    elements are positive integers that specify the ratio between\n    durations of consecutive notes. For example, a first element with a\n    value of 2 and a second element with a value of 1 applied to eighth\n    notes specifies a quarter note / eighth note tuplet playback, where\n    the first note is twice as long as the second note. Ratios should be\n    specified with the smallest integers possible. For example, a ratio\n    of 6 to 4 should be specified as 3 to 2 instead. The optional swing-\n    type element specifies the note type, either eighth or 16th, to\n    which the ratio is applied. The value is eighth if this element is\n    not present. The optional swing-style element is a string describing\n    the style of swing used. The swing element has no effect for\n    playback of grace notes, notes where a type element is not present,\n    and notes where the specified duration is different than the nominal\n    value associated with the specified type. If a swung note has attack\n    and release attributes, those values modify the swung playback.\n    \"\"\"\n    class Meta:\n        name = \"swing\"\n\n    straight: Optional[Empty] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    first: Optional[int] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    second: Optional[int] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    swing_type: Optional[SwingTypeValue] = field(\n        default=None,\n        metadata={\n            \"name\": \"swing-type\",\n            \"type\": \"Element\",\n        }\n    )\n    swing_style: Optional[str] = field(\n        default=None,\n        metadata={\n            \"name\": \"swing-style\",\n            \"type\": \"Element\",\n        }\n    )\n\n\n@dataclass\nclass Sync:\n    \"\"\"The sync type specifies the style that a score following application\n    should use the synchronize an accompaniment with a performer.\n\n    If this type is not included in a score, default synchronization\n    depends on the application. The optional latency attribute specifies\n    a time in milliseconds that the listening application should expect\n    from the performer. The optional player and time-only attributes\n    restrict the element to apply to a single player or set of times\n    through a repeated section, respectively.\n    \"\"\"\n    class Meta:\n        name = \"sync\"\n\n    type: Optional[SyncType] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"required\": True,\n        }\n    )\n    latency: Optional[int] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    player: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    time_only: Optional[str] = field(\n        default=None,\n        metadata={\n            \"name\": \"time-only\",\n            \"type\": \"Attribute\",\n            \"pattern\": r\"[1-9][0-9]*(, ?[1-9][0-9]*)*\",\n        }\n    )\n\n\n@dataclass\nclass Tap:\n    \"\"\"The tap type indicates a tap on the fretboard.\n\n    The text content allows specification of the notation; + and T are\n    common choices. If the element is empty, the hand attribute is used\n    to specify the symbol to use. The hand attribute is ignored if the\n    tap glyph is already specified by the text content. If neither text\n    content nor the hand attribute are present, the display is\n    application-specific.\n    \"\"\"\n    class Meta:\n        name = \"tap\"\n\n    value: str = field(\n        default=\"\",\n        metadata={\n            \"required\": True,\n        }\n    )\n    hand: Optional[TapHand] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    default_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    default_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_family: Optional[str] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-family\",\n            \"type\": \"Attribute\",\n            \"pattern\": r\"[^,]+(, ?[^,]+)*\",\n        }\n    )\n    font_style: Optional[FontStyle] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-style\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_size: Optional[Union[Decimal, CssFontSize]] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-size\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_weight: Optional[FontWeight] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-weight\",\n            \"type\": \"Attribute\",\n        }\n    )\n    color: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"pattern\": r\"#[\\dA-F]{6}([\\dA-F][\\dA-F])?\",\n        }\n    )\n    placement: Optional[AboveBelow] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass TextElementData:\n    \"\"\"The text-element-data type represents a syllable or portion of a\n    syllable for lyric text underlay.\n\n    A hyphen in the string content should only be used for an actual\n    hyphenated word. Language names for text elements come from ISO 639,\n    with optional country subcodes from ISO 3166.\n    \"\"\"\n    class Meta:\n        name = \"text-element-data\"\n\n    value: str = field(\n        default=\"\",\n        metadata={\n            \"required\": True,\n        }\n    )\n    font_family: Optional[str] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-family\",\n            \"type\": \"Attribute\",\n            \"pattern\": r\"[^,]+(, ?[^,]+)*\",\n        }\n    )\n    font_style: Optional[FontStyle] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-style\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_size: Optional[Union[Decimal, CssFontSize]] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-size\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_weight: Optional[FontWeight] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-weight\",\n            \"type\": \"Attribute\",\n        }\n    )\n    color: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"pattern\": r\"#[\\dA-F]{6}([\\dA-F][\\dA-F])?\",\n        }\n    )\n    underline: Optional[int] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"min_inclusive\": 0,\n            \"max_inclusive\": 3,\n        }\n    )\n    overline: Optional[int] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"min_inclusive\": 0,\n            \"max_inclusive\": 3,\n        }\n    )\n    line_through: Optional[int] = field(\n        default=None,\n        metadata={\n            \"name\": \"line-through\",\n            \"type\": \"Attribute\",\n            \"min_inclusive\": 0,\n            \"max_inclusive\": 3,\n        }\n    )\n    rotation: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"min_inclusive\": Decimal(\"-180\"),\n            \"max_inclusive\": Decimal(\"180\"),\n        }\n    )\n    letter_spacing: Optional[Union[Decimal, NumberOrNormalValue]] = field(\n        default=None,\n        metadata={\n            \"name\": \"letter-spacing\",\n            \"type\": \"Attribute\",\n        }\n    )\n    lang: Optional[Union[str, LangValue]] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"namespace\": \"http://www.w3.org/XML/1998/namespace\",\n        }\n    )\n    dir: Optional[TextDirection] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass Tie:\n    \"\"\"The tie element indicates that a tie begins or ends with this note.\n\n    If the tie element applies only particular times through a repeat,\n    the time-only attribute indicates which times to apply it. The tie\n    element indicates sound; the tied element indicates notation.\n    \"\"\"\n    class Meta:\n        name = \"tie\"\n\n    type: Optional[StartStop] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"required\": True,\n        }\n    )\n    time_only: Optional[str] = field(\n        default=None,\n        metadata={\n            \"name\": \"time-only\",\n            \"type\": \"Attribute\",\n            \"pattern\": r\"[1-9][0-9]*(, ?[1-9][0-9]*)*\",\n        }\n    )\n\n\n@dataclass\nclass Tied:\n    \"\"\"The tied element represents the notated tie.\n\n    The tie element represents the tie sound. The number attribute is\n    rarely needed to disambiguate ties, since note pitches will usually\n    suffice. The attribute is implied rather than defaulting to 1 as\n    with most elements. It is available for use in more complex tied\n    notation situations. Ties that join two notes of the same pitch\n    together should be represented with a tied element on the first note\n    with type=\"start\" and a tied element on the second note with\n    type=\"stop\".  This can also be done if the two notes being tied are\n    enharmonically equivalent, but have different step values. It is not\n    recommended to use tied elements to join two notes with\n    enharmonically inequivalent pitches. Ties that indicate that an\n    instrument should be undamped are specified with a single tied\n    element with type=\"let-ring\". Ties that are visually attached to\n    only one note, other than undamped ties, should be specified with\n    two tied elements on the same note, first type=\"start\" then\n    type=\"stop\". This can be used to represent ties into or out of\n    repeated sections or codas.\n    \"\"\"\n    class Meta:\n        name = \"tied\"\n\n    type: Optional[TiedType] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"required\": True,\n        }\n    )\n    number: Optional[int] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"min_inclusive\": 1,\n            \"max_inclusive\": 16,\n        }\n    )\n    line_type: Optional[LineType] = field(\n        default=None,\n        metadata={\n            \"name\": \"line-type\",\n            \"type\": \"Attribute\",\n        }\n    )\n    dash_length: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"dash-length\",\n            \"type\": \"Attribute\",\n        }\n    )\n    space_length: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"space-length\",\n            \"type\": \"Attribute\",\n        }\n    )\n    default_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    default_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    placement: Optional[AboveBelow] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    orientation: Optional[OverUnder] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    bezier_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"bezier-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    bezier_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"bezier-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    bezier_x2: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"bezier-x2\",\n            \"type\": \"Attribute\",\n        }\n    )\n    bezier_y2: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"bezier-y2\",\n            \"type\": \"Attribute\",\n        }\n    )\n    bezier_offset: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"bezier-offset\",\n            \"type\": \"Attribute\",\n        }\n    )\n    bezier_offset2: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"bezier-offset2\",\n            \"type\": \"Attribute\",\n        }\n    )\n    color: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"pattern\": r\"#[\\dA-F]{6}([\\dA-F][\\dA-F])?\",\n        }\n    )\n    id: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass TimeModification:\n    \"\"\"Time modification indicates tuplets, double-note tremolos, and other\n    durational changes.\n\n    A time-modification element shows how the cumulative, sounding\n    effect of tuplets and double-note tremolos compare to the written\n    note type represented by the type and dot elements. Nested tuplets\n    and other notations that use more detailed information need both the\n    time-modification and tuplet elements to be represented accurately.\n\n    :ivar actual_notes: The actual-notes element describes how many\n        notes are played in the time usually occupied by the number in\n        the normal-notes element.\n    :ivar normal_notes: The normal-notes element describes how many\n        notes are usually played in the time occupied by the number in\n        the actual-notes element.\n    :ivar normal_type: If the type associated with the number in the\n        normal-notes element is different than the current note type\n        (e.g., a quarter note within an eighth note triplet), then the\n        normal-notes type (e.g. eighth) is specified in the normal-type\n        and normal-dot elements.\n    :ivar normal_dot: The normal-dot element is used to specify dotted\n        normal tuplet types.\n    \"\"\"\n    class Meta:\n        name = \"time-modification\"\n\n    actual_notes: Optional[int] = field(\n        default=None,\n        metadata={\n            \"name\": \"actual-notes\",\n            \"type\": \"Element\",\n            \"required\": True,\n        }\n    )\n    normal_notes: Optional[int] = field(\n        default=None,\n        metadata={\n            \"name\": \"normal-notes\",\n            \"type\": \"Element\",\n            \"required\": True,\n        }\n    )\n    normal_type: Optional[NoteTypeValue] = field(\n        default=None,\n        metadata={\n            \"name\": \"normal-type\",\n            \"type\": \"Element\",\n        }\n    )\n    normal_dot: List[Empty] = field(\n        default_factory=list,\n        metadata={\n            \"name\": \"normal-dot\",\n            \"type\": \"Element\",\n        }\n    )\n\n\n@dataclass\nclass Tremolo:\n    \"\"\"The tremolo ornament can be used to indicate single-note, double-note,\n    or unmeasured tremolos.\n\n    Single-note tremolos use the single type, double-note tremolos use\n    the start and stop types, and unmeasured tremolos use the unmeasured\n    type. The default is \"single\" for compatibility with Version 1.1.\n    The text of the element indicates the number of tremolo marks and is\n    an integer from 0 to 8. Note that the number of attached beams is\n    not included in this value, but is represented separately using the\n    beam element. The value should be 0 for unmeasured tremolos. When\n    using double-note tremolos, the duration of each note in the tremolo\n    should correspond to half of the notated type value. A time-\n    modification element should also be added with an actual-notes value\n    of 2 and a normal-notes value of 1. If used within a tuplet, this\n    2/1 ratio should be multiplied by the existing tuplet ratio. The\n    smufl attribute specifies the glyph to use from the SMuFL Tremolos\n    range for an unmeasured tremolo. It is ignored for other tremolo\n    types. The SMuFL buzzRoll glyph is used by default if the attribute\n    is missing. Using repeater beams for indicating tremolos is\n    deprecated as of MusicXML 3.0.\n    \"\"\"\n    class Meta:\n        name = \"tremolo\"\n\n    value: Optional[int] = field(\n        default=None,\n        metadata={\n            \"required\": True,\n            \"min_inclusive\": 0,\n            \"max_inclusive\": 8,\n        }\n    )\n    type: TremoloType = field(\n        default=TremoloType.SINGLE,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    default_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    default_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_family: Optional[str] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-family\",\n            \"type\": \"Attribute\",\n            \"pattern\": r\"[^,]+(, ?[^,]+)*\",\n        }\n    )\n    font_style: Optional[FontStyle] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-style\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_size: Optional[Union[Decimal, CssFontSize]] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-size\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_weight: Optional[FontWeight] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-weight\",\n            \"type\": \"Attribute\",\n        }\n    )\n    color: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"pattern\": r\"#[\\dA-F]{6}([\\dA-F][\\dA-F])?\",\n        }\n    )\n    placement: Optional[AboveBelow] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    smufl: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass TupletDot:\n    \"\"\"\n    The tuplet-dot type is used to specify dotted tuplet types.\n    \"\"\"\n    class Meta:\n        name = \"tuplet-dot\"\n\n    font_family: Optional[str] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-family\",\n            \"type\": \"Attribute\",\n            \"pattern\": r\"[^,]+(, ?[^,]+)*\",\n        }\n    )\n    font_style: Optional[FontStyle] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-style\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_size: Optional[Union[Decimal, CssFontSize]] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-size\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_weight: Optional[FontWeight] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-weight\",\n            \"type\": \"Attribute\",\n        }\n    )\n    color: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"pattern\": r\"#[\\dA-F]{6}([\\dA-F][\\dA-F])?\",\n        }\n    )\n\n\n@dataclass\nclass TupletNumber:\n    \"\"\"\n    The tuplet-number type indicates the number of notes for this portion of\n    the tuplet.\n    \"\"\"\n    class Meta:\n        name = \"tuplet-number\"\n\n    value: Optional[int] = field(\n        default=None,\n        metadata={\n            \"required\": True,\n        }\n    )\n    font_family: Optional[str] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-family\",\n            \"type\": \"Attribute\",\n            \"pattern\": r\"[^,]+(, ?[^,]+)*\",\n        }\n    )\n    font_style: Optional[FontStyle] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-style\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_size: Optional[Union[Decimal, CssFontSize]] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-size\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_weight: Optional[FontWeight] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-weight\",\n            \"type\": \"Attribute\",\n        }\n    )\n    color: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"pattern\": r\"#[\\dA-F]{6}([\\dA-F][\\dA-F])?\",\n        }\n    )\n\n\n@dataclass\nclass TupletType:\n    \"\"\"\n    The tuplet-type type indicates the graphical note type of the notes for\n    this portion of the tuplet.\n    \"\"\"\n    class Meta:\n        name = \"tuplet-type\"\n\n    value: Optional[NoteTypeValue] = field(\n        default=None,\n        metadata={\n            \"required\": True,\n        }\n    )\n    font_family: Optional[str] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-family\",\n            \"type\": \"Attribute\",\n            \"pattern\": r\"[^,]+(, ?[^,]+)*\",\n        }\n    )\n    font_style: Optional[FontStyle] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-style\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_size: Optional[Union[Decimal, CssFontSize]] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-size\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_weight: Optional[FontWeight] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-weight\",\n            \"type\": \"Attribute\",\n        }\n    )\n    color: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"pattern\": r\"#[\\dA-F]{6}([\\dA-F][\\dA-F])?\",\n        }\n    )\n\n\n@dataclass\nclass Unpitched:\n    \"\"\"The unpitched type represents musical elements that are notated on the\n    staff but lack definite pitch, such as unpitched percussion and speaking\n    voice.\n\n    If the child elements are not present, the note is placed on the\n    middle line of the staff. This is generally used with a one-line\n    staff. Notes in percussion clef should always use an unpitched\n    element rather than a pitch element.\n    \"\"\"\n    class Meta:\n        name = \"unpitched\"\n\n    display_step: Optional[Step] = field(\n        default=None,\n        metadata={\n            \"name\": \"display-step\",\n            \"type\": \"Element\",\n        }\n    )\n    display_octave: Optional[int] = field(\n        default=None,\n        metadata={\n            \"name\": \"display-octave\",\n            \"type\": \"Element\",\n            \"min_inclusive\": 0,\n            \"max_inclusive\": 9,\n        }\n    )\n\n\n@dataclass\nclass WavyLine:\n    \"\"\"Wavy lines are one way to indicate trills and vibrato.\n\n    When used with a barline element, they should always have\n    type=\"continue\" set. The smufl attribute specifies a particular wavy\n    line glyph from the SMuFL Multi-segment lines range.\n    \"\"\"\n    class Meta:\n        name = \"wavy-line\"\n\n    type: Optional[StartStopContinue] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"required\": True,\n        }\n    )\n    number: Optional[int] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"min_inclusive\": 1,\n            \"max_inclusive\": 16,\n        }\n    )\n    smufl: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"pattern\": r\"(wiggle\\c+)|(guitar\\c*VibratoStroke)\",\n        }\n    )\n    default_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    default_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    placement: Optional[AboveBelow] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    color: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"pattern\": r\"#[\\dA-F]{6}([\\dA-F][\\dA-F])?\",\n        }\n    )\n    start_note: Optional[StartNote] = field(\n        default=None,\n        metadata={\n            \"name\": \"start-note\",\n            \"type\": \"Attribute\",\n        }\n    )\n    trill_step: Optional[TrillStep] = field(\n        default=None,\n        metadata={\n            \"name\": \"trill-step\",\n            \"type\": \"Attribute\",\n        }\n    )\n    two_note_turn: Optional[TwoNoteTurn] = field(\n        default=None,\n        metadata={\n            \"name\": \"two-note-turn\",\n            \"type\": \"Attribute\",\n        }\n    )\n    accelerate: Optional[YesNo] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    beats: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"min_inclusive\": Decimal(\"2\"),\n        }\n    )\n    second_beat: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"second-beat\",\n            \"type\": \"Attribute\",\n            \"min_inclusive\": Decimal(\"0\"),\n            \"max_inclusive\": Decimal(\"100\"),\n        }\n    )\n    last_beat: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"last-beat\",\n            \"type\": \"Attribute\",\n            \"min_inclusive\": Decimal(\"0\"),\n            \"max_inclusive\": Decimal(\"100\"),\n        }\n    )\n\n\n@dataclass\nclass Wedge:\n    \"\"\"The wedge type represents crescendo and diminuendo wedge symbols.\n\n    The type attribute is crescendo for the start of a wedge that is\n    closed at the left side, and diminuendo for the start of a wedge\n    that is closed on the right side. Spread values are measured in\n    tenths; those at the start of a crescendo wedge or end of a\n    diminuendo wedge are ignored. The niente attribute is yes if a\n    circle appears at the point of the wedge, indicating a crescendo\n    from nothing or diminuendo to nothing. It is no by default, and used\n    only when the type is crescendo, or the type is stop for a wedge\n    that began with a diminuendo type. The line-type is solid if not\n    specified.\n    \"\"\"\n    class Meta:\n        name = \"wedge\"\n\n    type: Optional[WedgeType] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"required\": True,\n        }\n    )\n    number: Optional[int] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"min_inclusive\": 1,\n            \"max_inclusive\": 16,\n        }\n    )\n    spread: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    niente: Optional[YesNo] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    line_type: Optional[LineType] = field(\n        default=None,\n        metadata={\n            \"name\": \"line-type\",\n            \"type\": \"Attribute\",\n        }\n    )\n    dash_length: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"dash-length\",\n            \"type\": \"Attribute\",\n        }\n    )\n    space_length: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"space-length\",\n            \"type\": \"Attribute\",\n        }\n    )\n    default_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    default_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    color: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"pattern\": r\"#[\\dA-F]{6}([\\dA-F][\\dA-F])?\",\n        }\n    )\n    id: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass Wood:\n    \"\"\"The wood type represents pictograms for wood percussion instruments.\n\n    The smufl attribute is used to distinguish different SMuFL stylistic\n    alternates.\n    \"\"\"\n    class Meta:\n        name = \"wood\"\n\n    value: Optional[WoodValue] = field(\n        default=None,\n        metadata={\n            \"required\": True,\n        }\n    )\n    smufl: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"pattern\": r\"pict\\c+\",\n        }\n    )\n\n\n@dataclass\nclass Appearance:\n    \"\"\"The appearance type controls general graphical settings for the music's\n    final form appearance on a printed page of display.\n\n    This includes support for line widths, definitions for note sizes,\n    and standard distances between notation elements, plus an extension\n    element for other aspects of appearance.\n    \"\"\"\n    class Meta:\n        name = \"appearance\"\n\n    line_width: List[LineWidth] = field(\n        default_factory=list,\n        metadata={\n            \"name\": \"line-width\",\n            \"type\": \"Element\",\n        }\n    )\n    note_size: List[NoteSize] = field(\n        default_factory=list,\n        metadata={\n            \"name\": \"note-size\",\n            \"type\": \"Element\",\n        }\n    )\n    distance: List[Distance] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    glyph: List[Glyph] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    other_appearance: List[OtherAppearance] = field(\n        default_factory=list,\n        metadata={\n            \"name\": \"other-appearance\",\n            \"type\": \"Element\",\n        }\n    )\n\n\n@dataclass\nclass Backup:\n    \"\"\"The backup and forward elements are required to coordinate multiple\n    voices in one part, including music on multiple staves.\n\n    The backup type is generally used to move between voices and staves.\n    Thus the backup element does not include voice or staff elements.\n    Duration values should always be positive, and should not cross\n    measure boundaries or mid-measure changes in the divisions value.\n\n    :ivar duration: Duration is a positive number specified in division\n        units. This is the intended duration vs. notated duration (for\n        instance, differences in dotted notes in Baroque-era music).\n        Differences in duration specific to an interpretation or\n        performance should be represented using the note element's\n        attack and release attributes. The duration element moves the\n        musical position when used in backup elements, forward elements,\n        and note elements that do not contain a chord child element.\n    :ivar footnote:\n    :ivar level:\n    \"\"\"\n    class Meta:\n        name = \"backup\"\n\n    duration: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n            \"required\": True,\n            \"min_exclusive\": Decimal(\"0\"),\n        }\n    )\n    footnote: Optional[FormattedText] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    level: Optional[Level] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n\n\n@dataclass\nclass Barline:\n    \"\"\"If a barline is other than a normal single barline, it should be\n    represented by a barline type that describes it.\n\n    This includes information about repeats and multiple endings, as well as line style. Barline data is on the same level as the other musical data in a score - a child of a measure in a partwise score, or a part in a timewise score. This allows for barlines within measures, as in dotted barlines that subdivide measures in complex meters. The two fermata elements allow for fermatas on both sides of the barline (the lower one inverted).\n    Barlines have a location attribute to make it easier to process barlines independently of the other musical data in a score. It is often easier to set up measures separately from entering notes. The location attribute must match where the barline element occurs within the rest of the musical data in the score. If location is left, it should be the first element in the measure, aside from the print, bookmark, and link elements. If location is right, it should be the last element, again with the possible exception of the print, bookmark, and link elements. If no location is specified, the right barline is the default. The segno, coda, and divisions attributes work the same way as in the sound element. They are used for playback when barline elements contain segno or coda child elements.\n    \"\"\"\n    class Meta:\n        name = \"barline\"\n\n    bar_style: Optional[BarStyleColor] = field(\n        default=None,\n        metadata={\n            \"name\": \"bar-style\",\n            \"type\": \"Element\",\n        }\n    )\n    footnote: Optional[FormattedText] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    level: Optional[Level] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    wavy_line: Optional[WavyLine] = field(\n        default=None,\n        metadata={\n            \"name\": \"wavy-line\",\n            \"type\": \"Element\",\n        }\n    )\n    segno: Optional[Segno] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    coda: Optional[Coda] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    fermata: List[Fermata] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n            \"max_occurs\": 2,\n        }\n    )\n    ending: Optional[Ending] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    repeat: Optional[Repeat] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    location: RightLeftMiddle = field(\n        default=RightLeftMiddle.RIGHT,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    segno_attribute: Optional[str] = field(\n        default=None,\n        metadata={\n            \"name\": \"segno\",\n            \"type\": \"Attribute\",\n        }\n    )\n    coda_attribute: Optional[str] = field(\n        default=None,\n        metadata={\n            \"name\": \"coda\",\n            \"type\": \"Attribute\",\n        }\n    )\n    divisions: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    id: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass Bass:\n    \"\"\"The bass type is used to indicate a bass note in popular music chord\n    symbols, e.g. G/C.\n\n    It is generally not used in functional harmony, as inversion is\n    generally not used in pop chord symbols. As with root, it is divided\n    into step and alter elements, similar to pitches. The arrangement\n    attribute specifies where the bass is displayed relative to what\n    precedes it.\n\n    :ivar bass_separator: The optional bass-separator element indicates\n        that text, rather than a line or slash, separates the bass from\n        what precedes it.\n    :ivar bass_step:\n    :ivar bass_alter: The bass-alter element represents the chromatic\n        alteration of the bass of the current chord within the harmony\n        element. In some chord styles, the text for the bass-step\n        element may include bass-alter information. In that case, the\n        print-object attribute of the bass-alter element can be set to\n        no. The location attribute indicates whether the alteration\n        should appear to the left or the right of the bass-step; it is\n        right if not specified.\n    :ivar arrangement:\n    \"\"\"\n    class Meta:\n        name = \"bass\"\n\n    bass_separator: Optional[StyleText] = field(\n        default=None,\n        metadata={\n            \"name\": \"bass-separator\",\n            \"type\": \"Element\",\n        }\n    )\n    bass_step: Optional[BassStep] = field(\n        default=None,\n        metadata={\n            \"name\": \"bass-step\",\n            \"type\": \"Element\",\n            \"required\": True,\n        }\n    )\n    bass_alter: Optional[HarmonyAlter] = field(\n        default=None,\n        metadata={\n            \"name\": \"bass-alter\",\n            \"type\": \"Element\",\n        }\n    )\n    arrangement: Optional[HarmonyArrangement] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass Bend:\n    \"\"\"The bend type is used in guitar notation and tablature.\n\n    A single note with a bend and release will contain two bend\n    elements: the first to represent the bend and the second to\n    represent the release. The shape attribute distinguishes between the\n    angled bend symbols commonly used in standard notation and the\n    curved bend symbols commonly used in both tablature and standard\n    notation.\n\n    :ivar bend_alter: The bend-alter element indicates the number of\n        semitones in the bend, similar to the alter element. As with the\n        alter element, numbers like 0.5 can be used to indicate\n        microtones. Negative values indicate pre-bends or releases. The\n        pre-bend and release elements are used to distinguish what is\n        intended. Because the bend-alter element represents the number\n        of steps in the bend, a release after a bend has a negative\n        bend-alter value, not a zero value.\n    :ivar pre_bend: The pre-bend element indicates that a bend is a pre-\n        bend rather than a normal bend or a release.\n    :ivar release:\n    :ivar with_bar: The with-bar element indicates that the bend is to\n        be done at the bridge with a whammy or vibrato bar. The content\n        of the element indicates how this should be notated. Content\n        values of \"scoop\" and \"dip\" refer to the SMuFL\n        guitarVibratoBarScoop and guitarVibratoBarDip glyphs.\n    :ivar shape:\n    :ivar default_x:\n    :ivar default_y:\n    :ivar relative_x:\n    :ivar relative_y:\n    :ivar font_family:\n    :ivar font_style:\n    :ivar font_size:\n    :ivar font_weight:\n    :ivar color:\n    :ivar accelerate:\n    :ivar beats:\n    :ivar first_beat:\n    :ivar last_beat:\n    \"\"\"\n    class Meta:\n        name = \"bend\"\n\n    bend_alter: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"bend-alter\",\n            \"type\": \"Element\",\n            \"required\": True,\n        }\n    )\n    pre_bend: Optional[Empty] = field(\n        default=None,\n        metadata={\n            \"name\": \"pre-bend\",\n            \"type\": \"Element\",\n        }\n    )\n    release: Optional[Release] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    with_bar: Optional[PlacementText] = field(\n        default=None,\n        metadata={\n            \"name\": \"with-bar\",\n            \"type\": \"Element\",\n        }\n    )\n    shape: Optional[BendShape] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    default_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    default_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_family: Optional[str] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-family\",\n            \"type\": \"Attribute\",\n            \"pattern\": r\"[^,]+(, ?[^,]+)*\",\n        }\n    )\n    font_style: Optional[FontStyle] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-style\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_size: Optional[Union[Decimal, CssFontSize]] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-size\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_weight: Optional[FontWeight] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-weight\",\n            \"type\": \"Attribute\",\n        }\n    )\n    color: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"pattern\": r\"#[\\dA-F]{6}([\\dA-F][\\dA-F])?\",\n        }\n    )\n    accelerate: Optional[YesNo] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    beats: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"min_inclusive\": Decimal(\"2\"),\n        }\n    )\n    first_beat: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"first-beat\",\n            \"type\": \"Attribute\",\n            \"min_inclusive\": Decimal(\"0\"),\n            \"max_inclusive\": Decimal(\"100\"),\n        }\n    )\n    last_beat: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"last-beat\",\n            \"type\": \"Attribute\",\n            \"min_inclusive\": Decimal(\"0\"),\n            \"max_inclusive\": Decimal(\"100\"),\n        }\n    )\n\n\n@dataclass\nclass Credit:\n    \"\"\"The credit type represents the appearance of the title, composer,\n    arranger, lyricist, copyright, dedication, and other text, symbols, and\n    graphics that commonly appear on the first page of a score.\n\n    The credit-words, credit-symbol, and credit-image elements are\n    similar to the words, symbol, and image elements for directions.\n    However, since the credit is not part of a measure, the default-x\n    and default-y attributes adjust the origin relative to the bottom\n    left-hand corner of the page. The enclosure for credit-words and\n    credit-symbol is none by default. By default, a series of credit-\n    words and credit-symbol elements within a single credit element\n    follow one another in sequence visually. Non-positional formatting\n    attributes are carried over from the previous element by default.\n    The page attribute for the credit element specifies the page number\n    where the credit should appear. This is an integer value that starts\n    with 1 for the first page. Its value is 1 by default. Since credits\n    occur before the music, these page numbers do not refer to the page\n    numbering specified by the print element's page-number attribute.\n    The credit-type element indicates the purpose behind a credit.\n    Multiple types of data may be combined in a single credit, so\n    multiple elements may be used. Standard values include page number,\n    title, subtitle, composer, arranger, lyricist, rights, and part\n    name.\n    \"\"\"\n    class Meta:\n        name = \"credit\"\n\n    credit_type: List[str] = field(\n        default_factory=list,\n        metadata={\n            \"name\": \"credit-type\",\n            \"type\": \"Element\",\n        }\n    )\n    link: List[Link] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n            \"sequential\": True,\n        }\n    )\n    bookmark: List[Bookmark] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n            \"sequential\": True,\n        }\n    )\n    credit_image: Optional[Image] = field(\n        default=None,\n        metadata={\n            \"name\": \"credit-image\",\n            \"type\": \"Element\",\n        }\n    )\n    credit_words: List[FormattedTextId] = field(\n        default_factory=list,\n        metadata={\n            \"name\": \"credit-words\",\n            \"type\": \"Element\",\n            \"sequential\": True,\n        }\n    )\n    credit_symbol: List[FormattedSymbolId] = field(\n        default_factory=list,\n        metadata={\n            \"name\": \"credit-symbol\",\n            \"type\": \"Element\",\n            \"sequential\": True,\n        }\n    )\n    page: Optional[int] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    id: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass Degree:\n    \"\"\"The degree type is used to add, alter, or subtract individual notes in\n    the chord.\n\n    The print-object attribute can be used to keep the degree from\n    printing separately when it has already taken into account in the\n    text attribute of the kind element. The degree-value and degree-type\n    text attributes specify how the value and type of the degree should\n    be displayed. A harmony of kind \"other\" can be spelled explicitly by\n    using a series of degree elements together with a root.\n    \"\"\"\n    class Meta:\n        name = \"degree\"\n\n    degree_value: Optional[DegreeValue] = field(\n        default=None,\n        metadata={\n            \"name\": \"degree-value\",\n            \"type\": \"Element\",\n            \"required\": True,\n        }\n    )\n    degree_alter: Optional[DegreeAlter] = field(\n        default=None,\n        metadata={\n            \"name\": \"degree-alter\",\n            \"type\": \"Element\",\n            \"required\": True,\n        }\n    )\n    degree_type: Optional[DegreeType] = field(\n        default=None,\n        metadata={\n            \"name\": \"degree-type\",\n            \"type\": \"Element\",\n            \"required\": True,\n        }\n    )\n    print_object: Optional[YesNo] = field(\n        default=None,\n        metadata={\n            \"name\": \"print-object\",\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass Encoding:\n    \"\"\"The encoding element contains information about who did the digital\n    encoding, when, with what software, and in what aspects.\n\n    Standard type values for the encoder element are music, words, and\n    arrangement, but other types may be used. The type attribute is only\n    needed when there are multiple encoder elements.\n    \"\"\"\n    class Meta:\n        name = \"encoding\"\n\n    encoding_date: List[str] = field(\n        default_factory=list,\n        metadata={\n            \"name\": \"encoding-date\",\n            \"type\": \"Element\",\n            \"pattern\": r\"[^:Z]*\",\n        }\n    )\n    encoder: List[TypedText] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    software: List[str] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    encoding_description: List[str] = field(\n        default_factory=list,\n        metadata={\n            \"name\": \"encoding-description\",\n            \"type\": \"Element\",\n        }\n    )\n    supports: List[Supports] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n\n\n@dataclass\nclass Figure:\n    \"\"\"\n    The figure type represents a single figure within a figured-bass element.\n\n    :ivar prefix: Values for the prefix element include plus and the\n        accidental values sharp, flat, natural, double-sharp, flat-flat,\n        and sharp-sharp. The prefix element may contain additional\n        values for symbols specific to particular figured bass styles.\n    :ivar figure_number: A figure-number is a number. Overstrikes of the\n        figure number are represented in the suffix element.\n    :ivar suffix: Values for the suffix element include plus and the\n        accidental values sharp, flat, natural, double-sharp, flat-flat,\n        and sharp-sharp. Suffixes include both symbols that come after\n        the figure number and those that overstrike the figure number.\n        The suffix values slash, back-slash, and vertical are used for\n        slashed numbers indicating chromatic alteration. The orientation\n        and display of the slash usually depends on the figure number.\n        The suffix element may contain additional values for symbols\n        specific to particular figured bass styles.\n    :ivar extend:\n    :ivar footnote:\n    :ivar level:\n    \"\"\"\n    class Meta:\n        name = \"figure\"\n\n    prefix: Optional[StyleText] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    figure_number: Optional[StyleText] = field(\n        default=None,\n        metadata={\n            \"name\": \"figure-number\",\n            \"type\": \"Element\",\n        }\n    )\n    suffix: Optional[StyleText] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    extend: Optional[Extend] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    footnote: Optional[FormattedText] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    level: Optional[Level] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n\n\n@dataclass\nclass Forward:\n    \"\"\"The backup and forward elements are required to coordinate multiple\n    voices in one part, including music on multiple staves.\n\n    The forward element is generally used within voices and staves.\n    Duration values should always be positive, and should not cross\n    measure boundaries or mid-measure changes in the divisions value.\n\n    :ivar duration: Duration is a positive number specified in division\n        units. This is the intended duration vs. notated duration (for\n        instance, differences in dotted notes in Baroque-era music).\n        Differences in duration specific to an interpretation or\n        performance should be represented using the note element's\n        attack and release attributes. The duration element moves the\n        musical position when used in backup elements, forward elements,\n        and note elements that do not contain a chord child element.\n    :ivar footnote:\n    :ivar level:\n    :ivar voice:\n    :ivar staff: Staff assignment is only needed for music notated on\n        multiple staves. Used by both notes and directions. Staff values\n        are numbers, with 1 referring to the top-most staff in a part.\n    \"\"\"\n    class Meta:\n        name = \"forward\"\n\n    duration: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n            \"required\": True,\n            \"min_exclusive\": Decimal(\"0\"),\n        }\n    )\n    footnote: Optional[FormattedText] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    level: Optional[Level] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    voice: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    staff: Optional[int] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n\n\n@dataclass\nclass FrameNote:\n    \"\"\"The frame-note type represents each note included in the frame.\n\n    An open string will have a fret value of 0, while a muted string\n    will not be associated with a frame-note element.\n    \"\"\"\n    class Meta:\n        name = \"frame-note\"\n\n    string: Optional[String] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n            \"required\": True,\n        }\n    )\n    fret: Optional[Fret] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n            \"required\": True,\n        }\n    )\n    fingering: Optional[Fingering] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    barre: Optional[Barre] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n\n\n@dataclass\nclass HarmonMute:\n    \"\"\"\n    The harmon-mute type represents the symbols used for harmon mutes in brass\n    notation.\n    \"\"\"\n    class Meta:\n        name = \"harmon-mute\"\n\n    harmon_closed: Optional[HarmonClosed] = field(\n        default=None,\n        metadata={\n            \"name\": \"harmon-closed\",\n            \"type\": \"Element\",\n            \"required\": True,\n        }\n    )\n    default_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    default_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_family: Optional[str] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-family\",\n            \"type\": \"Attribute\",\n            \"pattern\": r\"[^,]+(, ?[^,]+)*\",\n        }\n    )\n    font_style: Optional[FontStyle] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-style\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_size: Optional[Union[Decimal, CssFontSize]] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-size\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_weight: Optional[FontWeight] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-weight\",\n            \"type\": \"Attribute\",\n        }\n    )\n    color: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"pattern\": r\"#[\\dA-F]{6}([\\dA-F][\\dA-F])?\",\n        }\n    )\n    placement: Optional[AboveBelow] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass HarpPedals:\n    \"\"\"The harp-pedals type is used to create harp pedal diagrams.\n\n    The pedal-step and pedal-alter elements use the same values as the\n    step and alter elements. For easiest reading, the pedal-tuning\n    elements should follow standard harp pedal order, with pedal-step\n    values of D, C, B, E, F, G, and A.\n    \"\"\"\n    class Meta:\n        name = \"harp-pedals\"\n\n    pedal_tuning: List[PedalTuning] = field(\n        default_factory=list,\n        metadata={\n            \"name\": \"pedal-tuning\",\n            \"type\": \"Element\",\n            \"min_occurs\": 1,\n        }\n    )\n    default_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    default_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_family: Optional[str] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-family\",\n            \"type\": \"Attribute\",\n            \"pattern\": r\"[^,]+(, ?[^,]+)*\",\n        }\n    )\n    font_style: Optional[FontStyle] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-style\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_size: Optional[Union[Decimal, CssFontSize]] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-size\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_weight: Optional[FontWeight] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-weight\",\n            \"type\": \"Attribute\",\n        }\n    )\n    color: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"pattern\": r\"#[\\dA-F]{6}([\\dA-F][\\dA-F])?\",\n        }\n    )\n    halign: Optional[LeftCenterRight] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    valign: Optional[Valign] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    id: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass HeelToe(EmptyPlacement):\n    \"\"\"The heel and toe elements are used with organ pedals.\n\n    The substitution value is \"no\" if the attribute is not present.\n    \"\"\"\n    class Meta:\n        name = \"heel-toe\"\n\n    substitution: Optional[YesNo] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass Hole:\n    \"\"\"\n    The hole type represents the symbols used for woodwind and brass fingerings\n    as well as other notations.\n\n    :ivar hole_type: The content of the optional hole-type element\n        indicates what the hole symbol represents in terms of instrument\n        fingering or other techniques.\n    :ivar hole_closed:\n    :ivar hole_shape: The optional hole-shape element indicates the\n        shape of the hole symbol; the default is a circle.\n    :ivar default_x:\n    :ivar default_y:\n    :ivar relative_x:\n    :ivar relative_y:\n    :ivar font_family:\n    :ivar font_style:\n    :ivar font_size:\n    :ivar font_weight:\n    :ivar color:\n    :ivar placement:\n    \"\"\"\n    class Meta:\n        name = \"hole\"\n\n    hole_type: Optional[str] = field(\n        default=None,\n        metadata={\n            \"name\": \"hole-type\",\n            \"type\": \"Element\",\n        }\n    )\n    hole_closed: Optional[HoleClosed] = field(\n        default=None,\n        metadata={\n            \"name\": \"hole-closed\",\n            \"type\": \"Element\",\n            \"required\": True,\n        }\n    )\n    hole_shape: Optional[str] = field(\n        default=None,\n        metadata={\n            \"name\": \"hole-shape\",\n            \"type\": \"Element\",\n        }\n    )\n    default_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    default_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_family: Optional[str] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-family\",\n            \"type\": \"Attribute\",\n            \"pattern\": r\"[^,]+(, ?[^,]+)*\",\n        }\n    )\n    font_style: Optional[FontStyle] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-style\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_size: Optional[Union[Decimal, CssFontSize]] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-size\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_weight: Optional[FontWeight] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-weight\",\n            \"type\": \"Attribute\",\n        }\n    )\n    color: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"pattern\": r\"#[\\dA-F]{6}([\\dA-F][\\dA-F])?\",\n        }\n    )\n    placement: Optional[AboveBelow] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass Key:\n    \"\"\"The key type represents a key signature.\n\n    Both traditional and non-traditional key signatures are supported.\n    The optional number attribute refers to staff numbers. If absent,\n    the key signature applies to all staves in the part. Key signatures\n    appear at the start of each system unless the print-object attribute\n    has been set to \"no\".\n\n    :ivar cancel:\n    :ivar fifths:\n    :ivar mode:\n    :ivar key_step: Non-traditional key signatures are represented using\n        a list of altered tones. The key-step element indicates the\n        pitch step to be altered, represented using the same names as in\n        the step element.\n    :ivar key_alter: Non-traditional key signatures are represented\n        using a list of altered tones. The key-alter element represents\n        the alteration for a given pitch step, represented with\n        semitones in the same manner as the alter element.\n    :ivar key_accidental: Non-traditional key signatures are represented\n        using a list of altered tones. The key-accidental element\n        indicates the accidental to be displayed in the key signature,\n        represented in the same manner as the accidental element. It is\n        used for disambiguating microtonal accidentals.\n    :ivar key_octave: The optional list of key-octave elements is used\n        to specify in which octave each element of the key signature\n        appears.\n    :ivar number:\n    :ivar default_x:\n    :ivar default_y:\n    :ivar relative_x:\n    :ivar relative_y:\n    :ivar font_family:\n    :ivar font_style:\n    :ivar font_size:\n    :ivar font_weight:\n    :ivar color:\n    :ivar print_object:\n    :ivar id:\n    \"\"\"\n    class Meta:\n        name = \"key\"\n\n    cancel: Optional[Cancel] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    fifths: Optional[int] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    mode: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    key_step: List[Step] = field(\n        default_factory=list,\n        metadata={\n            \"name\": \"key-step\",\n            \"type\": \"Element\",\n            \"sequential\": True,\n        }\n    )\n    key_alter: List[Decimal] = field(\n        default_factory=list,\n        metadata={\n            \"name\": \"key-alter\",\n            \"type\": \"Element\",\n            \"sequential\": True,\n        }\n    )\n    key_accidental: List[KeyAccidental] = field(\n        default_factory=list,\n        metadata={\n            \"name\": \"key-accidental\",\n            \"type\": \"Element\",\n            \"sequential\": True,\n        }\n    )\n    key_octave: List[KeyOctave] = field(\n        default_factory=list,\n        metadata={\n            \"name\": \"key-octave\",\n            \"type\": \"Element\",\n        }\n    )\n    number: Optional[int] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    default_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    default_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_family: Optional[str] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-family\",\n            \"type\": \"Attribute\",\n            \"pattern\": r\"[^,]+(, ?[^,]+)*\",\n        }\n    )\n    font_style: Optional[FontStyle] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-style\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_size: Optional[Union[Decimal, CssFontSize]] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-size\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_weight: Optional[FontWeight] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-weight\",\n            \"type\": \"Attribute\",\n        }\n    )\n    color: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"pattern\": r\"#[\\dA-F]{6}([\\dA-F][\\dA-F])?\",\n        }\n    )\n    print_object: Optional[YesNo] = field(\n        default=None,\n        metadata={\n            \"name\": \"print-object\",\n            \"type\": \"Attribute\",\n        }\n    )\n    id: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass Listen:\n    \"\"\"The listen and listening types, new in Version 4.0, specify different\n    ways that a score following or machine listening application can interact\n    with a performer.\n\n    The listen type handles interactions that are specific to a note. If\n    multiple child elements of the same type are present, they should\n    have distinct player and/or time-only attributes.\n    \"\"\"\n    class Meta:\n        name = \"listen\"\n\n    assess: List[Assess] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    wait: List[Wait] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    other_listen: List[OtherListening] = field(\n        default_factory=list,\n        metadata={\n            \"name\": \"other-listen\",\n            \"type\": \"Element\",\n        }\n    )\n\n\n@dataclass\nclass Listening:\n    \"\"\"The listen and listening types, new in Version 4.0, specify different\n    ways that a score following or machine listening application can interact\n    with a performer.\n\n    The listening type handles interactions that change the state of the\n    listening application from the specified point in the performance\n    onward. If multiple child elements of the same type are present,\n    they should have distinct player and/or time-only attributes. The\n    offset element is used to indicate that the listening change takes\n    place offset from the current score position. If the listening\n    element is a child of a direction element, the listening offset\n    element overrides the direction offset element if both elements are\n    present. Note that the offset reflects the intended musical position\n    for the change in state. It should not be used to compensate for\n    latency issues in particular hardware configurations.\n    \"\"\"\n    class Meta:\n        name = \"listening\"\n\n    sync: List[Sync] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n            \"sequential\": True,\n        }\n    )\n    other_listening: List[OtherListening] = field(\n        default_factory=list,\n        metadata={\n            \"name\": \"other-listening\",\n            \"type\": \"Element\",\n            \"sequential\": True,\n        }\n    )\n    offset: Optional[Offset] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n\n\n@dataclass\nclass Lyric:\n    \"\"\"The lyric type represents text underlays for lyrics.\n\n    Two text elements that are not separated by an elision element are\n    part of the same syllable, but may have different text formatting.\n    The MusicXML XSD is more strict than the DTD in enforcing this by\n    disallowing a second syllabic element unless preceded by an elision\n    element. The lyric number indicates multiple lines, though a name\n    can be used as well. Common name examples are verse and chorus.\n    Justification is center by default; placement is below by default.\n    Vertical alignment is to the baseline of the text and horizontal\n    alignment matches justification. The print-object attribute can\n    override a note's print-lyric attribute in cases where only some\n    lyrics on a note are printed, as when lyrics for later verses are\n    printed in a block of text rather than with each note. The time-only\n    attribute precisely specifies which lyrics are to be sung which time\n    through a repeated section.\n\n    :ivar syllabic:\n    :ivar text:\n    :ivar elision:\n    :ivar extend:\n    :ivar laughing: The laughing element represents a laughing voice.\n    :ivar humming: The humming element represents a humming voice.\n    :ivar end_line: The end-line element comes from RP-017 for Standard\n        MIDI File Lyric meta-events. It facilitates lyric display for\n        Karaoke and similar applications.\n    :ivar end_paragraph: The end-paragraph element comes from RP-017 for\n        Standard MIDI File Lyric meta-events. It facilitates lyric\n        display for Karaoke and similar applications.\n    :ivar footnote:\n    :ivar level:\n    :ivar number:\n    :ivar name:\n    :ivar justify:\n    :ivar default_x:\n    :ivar default_y:\n    :ivar relative_x:\n    :ivar relative_y:\n    :ivar placement:\n    :ivar color:\n    :ivar print_object:\n    :ivar time_only:\n    :ivar id:\n    \"\"\"\n    class Meta:\n        name = \"lyric\"\n\n    syllabic: List[Syllabic] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n            \"sequential\": True,\n        }\n    )\n    text: List[TextElementData] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n            \"sequential\": True,\n        }\n    )\n    elision: List[Elision] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n            \"sequential\": True,\n        }\n    )\n    extend: List[Extend] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n            \"max_occurs\": 2,\n            \"sequential\": True,\n        }\n    )\n    laughing: Optional[Empty] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    humming: Optional[Empty] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    end_line: Optional[Empty] = field(\n        default=None,\n        metadata={\n            \"name\": \"end-line\",\n            \"type\": \"Element\",\n        }\n    )\n    end_paragraph: Optional[Empty] = field(\n        default=None,\n        metadata={\n            \"name\": \"end-paragraph\",\n            \"type\": \"Element\",\n        }\n    )\n    footnote: Optional[FormattedText] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    level: Optional[Level] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    number: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    name: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    justify: Optional[LeftCenterRight] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    default_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    default_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    placement: Optional[AboveBelow] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    color: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"pattern\": r\"#[\\dA-F]{6}([\\dA-F][\\dA-F])?\",\n        }\n    )\n    print_object: Optional[YesNo] = field(\n        default=None,\n        metadata={\n            \"name\": \"print-object\",\n            \"type\": \"Attribute\",\n        }\n    )\n    time_only: Optional[str] = field(\n        default=None,\n        metadata={\n            \"name\": \"time-only\",\n            \"type\": \"Attribute\",\n            \"pattern\": r\"[1-9][0-9]*(, ?[1-9][0-9]*)*\",\n        }\n    )\n    id: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass MeasureStyle:\n    \"\"\"A measure-style indicates a special way to print partial to multiple\n    measures within a part.\n\n    This includes multiple rests over several measures, repeats of\n    beats, single, or multiple measures, and use of slash notation. The\n    multiple-rest and measure-repeat elements indicate the number of\n    measures covered in the element content. The beat-repeat and slash\n    elements can cover partial measures. All but the multiple-rest\n    element use a type attribute to indicate starting and stopping the\n    use of the style. The optional number attribute specifies the staff\n    number from top to bottom on the system, as with clef.\n    \"\"\"\n    class Meta:\n        name = \"measure-style\"\n\n    multiple_rest: Optional[MultipleRest] = field(\n        default=None,\n        metadata={\n            \"name\": \"multiple-rest\",\n            \"type\": \"Element\",\n        }\n    )\n    measure_repeat: Optional[MeasureRepeat] = field(\n        default=None,\n        metadata={\n            \"name\": \"measure-repeat\",\n            \"type\": \"Element\",\n        }\n    )\n    beat_repeat: Optional[BeatRepeat] = field(\n        default=None,\n        metadata={\n            \"name\": \"beat-repeat\",\n            \"type\": \"Element\",\n        }\n    )\n    slash: Optional[Slash] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    number: Optional[int] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    font_family: Optional[str] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-family\",\n            \"type\": \"Attribute\",\n            \"pattern\": r\"[^,]+(, ?[^,]+)*\",\n        }\n    )\n    font_style: Optional[FontStyle] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-style\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_size: Optional[Union[Decimal, CssFontSize]] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-size\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_weight: Optional[FontWeight] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-weight\",\n            \"type\": \"Attribute\",\n        }\n    )\n    color: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"pattern\": r\"#[\\dA-F]{6}([\\dA-F][\\dA-F])?\",\n        }\n    )\n    id: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass MetronomeTuplet(TimeModification):\n    \"\"\"\n    The metronome-tuplet type uses the same element structure as the time-\n    modification element along with some attributes from the tuplet element.\n    \"\"\"\n    class Meta:\n        name = \"metronome-tuplet\"\n\n    type: Optional[StartStop] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"required\": True,\n        }\n    )\n    bracket: Optional[YesNo] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    show_number: Optional[ShowTuplet] = field(\n        default=None,\n        metadata={\n            \"name\": \"show-number\",\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass Mordent(EmptyTrillSound):\n    \"\"\"The mordent type is used for both represents the mordent sign with the\n    vertical line and the inverted-mordent sign without the line.\n\n    The long attribute is \"no\" by default. The approach and departure\n    attributes are used for compound ornaments, indicating how the\n    beginning and ending of the ornament look relative to the main part\n    of the mordent.\n    \"\"\"\n    class Meta:\n        name = \"mordent\"\n\n    long: Optional[YesNo] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    approach: Optional[AboveBelow] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    departure: Optional[AboveBelow] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass NameDisplay:\n    \"\"\"The name-display type is used for exact formatting of multi-font text in\n    part and group names to the left of the system.\n\n    The print-object attribute can be used to determine what, if\n    anything, is printed at the start of each system. Enclosure for the\n    display-text element is none by default. Language for the display-\n    text element is Italian (\"it\") by default.\n    \"\"\"\n    class Meta:\n        name = \"name-display\"\n\n    display_text: List[FormattedText] = field(\n        default_factory=list,\n        metadata={\n            \"name\": \"display-text\",\n            \"type\": \"Element\",\n            \"sequential\": True,\n        }\n    )\n    accidental_text: List[AccidentalText] = field(\n        default_factory=list,\n        metadata={\n            \"name\": \"accidental-text\",\n            \"type\": \"Element\",\n            \"sequential\": True,\n        }\n    )\n    print_object: Optional[YesNo] = field(\n        default=None,\n        metadata={\n            \"name\": \"print-object\",\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass NoteheadText:\n    \"\"\"The notehead-text type represents text that is displayed inside a\n    notehead, as is done in some educational music.\n\n    It is not needed for the numbers used in tablature or jianpu\n    notation. The presence of a TAB or jianpu clefs is sufficient to\n    indicate that numbers are used. The display-text and accidental-text\n    elements allow display of fully formatted text and accidentals.\n    \"\"\"\n    class Meta:\n        name = \"notehead-text\"\n\n    display_text: List[FormattedText] = field(\n        default_factory=list,\n        metadata={\n            \"name\": \"display-text\",\n            \"type\": \"Element\",\n            \"sequential\": True,\n        }\n    )\n    accidental_text: List[AccidentalText] = field(\n        default_factory=list,\n        metadata={\n            \"name\": \"accidental-text\",\n            \"type\": \"Element\",\n            \"sequential\": True,\n        }\n    )\n\n\n@dataclass\nclass Numeral:\n    \"\"\"The numeral type represents the Roman numeral or Nashville number part\n    of a harmony.\n\n    It requires that the key be specified in the encoding, either with a\n    key or numeral-key element.\n\n    :ivar numeral_root:\n    :ivar numeral_alter: The numeral-alter element represents an\n        alteration to the numeral-root, similar to the alter element for\n        a pitch. The print-object attribute can be used to hide an\n        alteration in cases such as when the MusicXML encoding of a 6 or\n        7 numeral-root in a minor key requires an alteration that is not\n        displayed. The location attribute indicates whether the\n        alteration should appear to the left or the right of the\n        numeral-root. It is left by default.\n    :ivar numeral_key:\n    \"\"\"\n    class Meta:\n        name = \"numeral\"\n\n    numeral_root: Optional[NumeralRoot] = field(\n        default=None,\n        metadata={\n            \"name\": \"numeral-root\",\n            \"type\": \"Element\",\n            \"required\": True,\n        }\n    )\n    numeral_alter: Optional[HarmonyAlter] = field(\n        default=None,\n        metadata={\n            \"name\": \"numeral-alter\",\n            \"type\": \"Element\",\n        }\n    )\n    numeral_key: Optional[NumeralKey] = field(\n        default=None,\n        metadata={\n            \"name\": \"numeral-key\",\n            \"type\": \"Element\",\n        }\n    )\n\n\n@dataclass\nclass PageLayout:\n    \"\"\"Page layout can be defined both in score-wide defaults and in the print\n    element.\n\n    Page margins are specified either for both even and odd pages, or\n    via separate odd and even page number values. The type is not needed\n    when used as part of a print element. If omitted when used in the\n    defaults element, \"both\" is the default. If no page-layout element\n    is present in the defaults element, default page layout values are\n    chosen by the application. When used in the print element, the page-\n    layout element affects the appearance of the current page only. All\n    other pages use the default values as determined by the defaults\n    element. If any child elements are missing from the page-layout\n    element in a print element, the values determined by the defaults\n    element are used there as well.\n    \"\"\"\n    class Meta:\n        name = \"page-layout\"\n\n    page_height: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"page-height\",\n            \"type\": \"Element\",\n        }\n    )\n    page_width: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"page-width\",\n            \"type\": \"Element\",\n        }\n    )\n    page_margins: List[PageMargins] = field(\n        default_factory=list,\n        metadata={\n            \"name\": \"page-margins\",\n            \"type\": \"Element\",\n            \"max_occurs\": 2,\n        }\n    )\n\n\n@dataclass\nclass PartTranspose:\n    \"\"\"The child elements of the part-transpose type have the same meaning as\n    for the transpose type.\n\n    However that meaning applies to a transposed part created from the\n    existing score file.\n\n    :ivar diatonic: The diatonic element specifies the number of pitch\n        steps needed to go from written to sounding pitch. This allows\n        for correct spelling of enharmonic transpositions. This value\n        does not include octave-change values; the values for both\n        elements need to be added to the written pitch to get the\n        correct sounding pitch.\n    :ivar chromatic: The chromatic element represents the number of\n        semitones needed to get from written to sounding pitch. This\n        value does not include octave-change values; the values for both\n        elements need to be added to the written pitch to get the\n        correct sounding pitch.\n    :ivar octave_change: The octave-change element indicates how many\n        octaves to add to get from written pitch to sounding pitch. The\n        octave-change element should be included when using\n        transposition intervals of an octave or more, and should not be\n        present for intervals of less than an octave.\n    :ivar double: If the double element is present, it indicates that\n        the music is doubled one octave from what is currently written.\n    \"\"\"\n    class Meta:\n        name = \"part-transpose\"\n\n    diatonic: Optional[int] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    chromatic: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n            \"required\": True,\n        }\n    )\n    octave_change: Optional[int] = field(\n        default=None,\n        metadata={\n            \"name\": \"octave-change\",\n            \"type\": \"Element\",\n        }\n    )\n    double: Optional[Double] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n\n\n@dataclass\nclass Percussion:\n    \"\"\"The percussion element is used to define percussion pictogram symbols.\n\n    Definitions for these symbols can be found in Kurt Stone's \"Music\n    Notation in the Twentieth Century\" on pages 206-212 and 223. Some\n    values are added to these based on how usage has evolved in the 30\n    years since Stone's book was published.\n\n    :ivar glass:\n    :ivar metal:\n    :ivar wood:\n    :ivar pitched:\n    :ivar membrane:\n    :ivar effect:\n    :ivar timpani:\n    :ivar beater:\n    :ivar stick:\n    :ivar stick_location:\n    :ivar other_percussion: The other-percussion element represents\n        percussion pictograms not defined elsewhere.\n    :ivar default_x:\n    :ivar default_y:\n    :ivar relative_x:\n    :ivar relative_y:\n    :ivar font_family:\n    :ivar font_style:\n    :ivar font_size:\n    :ivar font_weight:\n    :ivar color:\n    :ivar halign:\n    :ivar valign:\n    :ivar enclosure:\n    :ivar id:\n    \"\"\"\n    class Meta:\n        name = \"percussion\"\n\n    glass: Optional[Glass] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    metal: Optional[Metal] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    wood: Optional[Wood] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    pitched: Optional[Pitched] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    membrane: Optional[Membrane] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    effect: Optional[Effect] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    timpani: Optional[Timpani] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    beater: Optional[Beater] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    stick: Optional[Stick] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    stick_location: Optional[StickLocation] = field(\n        default=None,\n        metadata={\n            \"name\": \"stick-location\",\n            \"type\": \"Element\",\n        }\n    )\n    other_percussion: Optional[OtherText] = field(\n        default=None,\n        metadata={\n            \"name\": \"other-percussion\",\n            \"type\": \"Element\",\n        }\n    )\n    default_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    default_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_family: Optional[str] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-family\",\n            \"type\": \"Attribute\",\n            \"pattern\": r\"[^,]+(, ?[^,]+)*\",\n        }\n    )\n    font_style: Optional[FontStyle] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-style\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_size: Optional[Union[Decimal, CssFontSize]] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-size\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_weight: Optional[FontWeight] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-weight\",\n            \"type\": \"Attribute\",\n        }\n    )\n    color: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"pattern\": r\"#[\\dA-F]{6}([\\dA-F][\\dA-F])?\",\n        }\n    )\n    halign: Optional[LeftCenterRight] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    valign: Optional[Valign] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    enclosure: Optional[EnclosureShape] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    id: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass Root:\n    \"\"\"The root type indicates a pitch like C, D, E vs.\n\n    a scale degree like 1, 2, 3. It is used with chord symbols in\n    popular music. The root element has a root-step and optional root-\n    alter element similar to the step and alter elements, but renamed to\n    distinguish the different musical meanings.\n\n    :ivar root_step:\n    :ivar root_alter: The root-alter element represents the chromatic\n        alteration of the root of the current chord within the harmony\n        element. In some chord styles, the text for the root-step\n        element may include root-alter information. In that case, the\n        print-object attribute of the root-alter element can be set to\n        no. The location attribute indicates whether the alteration\n        should appear to the left or the right of the root-step; it is\n        right by default.\n    \"\"\"\n    class Meta:\n        name = \"root\"\n\n    root_step: Optional[RootStep] = field(\n        default=None,\n        metadata={\n            \"name\": \"root-step\",\n            \"type\": \"Element\",\n            \"required\": True,\n        }\n    )\n    root_alter: Optional[HarmonyAlter] = field(\n        default=None,\n        metadata={\n            \"name\": \"root-alter\",\n            \"type\": \"Element\",\n        }\n    )\n\n\n@dataclass\nclass Scordatura:\n    \"\"\"Scordatura string tunings are represented by a series of accord\n    elements, similar to the staff-tuning elements.\n\n    Strings are numbered from high to low.\n    \"\"\"\n    class Meta:\n        name = \"scordatura\"\n\n    accord: List[Accord] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n            \"min_occurs\": 1,\n        }\n    )\n    id: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass Sound:\n    \"\"\"The sound element contains general playback parameters.\n\n    They can stand alone within a part/measure, or be a component\n    element within a direction. Tempo is expressed in quarter notes per\n    minute. If 0, the sound-generating program should prompt the user at\n    the time of compiling a sound (MIDI) file. Dynamics (or MIDI\n    velocity) are expressed as a percentage of the default forte value\n    (90 for MIDI 1.0). Dacapo indicates to go back to the beginning of\n    the movement. When used it always has the value \"yes\". Segno and\n    dalsegno are used for backwards jumps to a segno sign; coda and\n    tocoda are used for forward jumps to a coda sign. If there are\n    multiple jumps, the value of these parameters can be used to name\n    and distinguish them. If segno or coda is used, the divisions\n    attribute can also be used to indicate the number of divisions per\n    quarter note. Otherwise sound and MIDI generating programs may have\n    to recompute this. By default, a dalsegno or dacapo attribute\n    indicates that the jump should occur the first time through, while a\n    tocoda attribute indicates the jump should occur the second time\n    through. The time that jumps occur can be changed by using the time-\n    only attribute. The forward-repeat attribute indicates that a\n    forward repeat sign is implied but not displayed. It is used for\n    example in two-part forms with repeats, such as a minuet and trio\n    where no repeat is displayed at the start of the trio. This usually\n    occurs after a barline. When used it always has the value of \"yes\".\n    The fine attribute follows the final note or rest in a movement with\n    a da capo or dal segno direction. If numeric, the value represents\n    the actual duration of the final note or rest, which can be\n    ambiguous in written notation and different among parts and voices.\n    The value may also be \"yes\" to indicate no change to the final\n    duration. If the sound element applies only particular times through\n    a repeat, the time-only attribute indicates which times to apply the\n    sound element. Pizzicato in a sound element effects all following\n    notes. Yes indicates pizzicato, no indicates arco. The pan and\n    elevation attributes are deprecated in Version 2.0. The pan and\n    elevation elements in the midi-instrument element should be used\n    instead. The meaning of the pan and elevation attributes is the same\n    as for the pan and elevation elements. If both are present, the mid-\n    instrument elements take priority. The damper-pedal, soft-pedal, and\n    sostenuto-pedal attributes effect playback of the three common piano\n    pedals and their MIDI controller equivalents. The yes value\n    indicates the pedal is depressed; no indicates the pedal is\n    released. A numeric value from 0 to 100 may also be used for half\n    pedaling. This value is the percentage that the pedal is depressed.\n    A value of 0 is equivalent to no, and a value of 100 is equivalent\n    to yes. Instrument changes, MIDI devices, MIDI instruments, and\n    playback techniques are changed using the instrument-change, midi-\n    device, midi-instrument, and play elements. When there are multiple\n    instances of these elements, they should be grouped together by\n    instrument using the id attribute values. The offset element is used\n    to indicate that the sound takes place offset from the current score\n    position. If the sound element is a child of a direction element,\n    the sound offset element overrides the direction offset element if\n    both elements are present. Note that the offset reflects the\n    intended musical position for the change in sound. It should not be\n    used to compensate for latency issues in particular hardware\n    configurations.\n    \"\"\"\n    class Meta:\n        name = \"sound\"\n\n    instrument_change: List[InstrumentChange] = field(\n        default_factory=list,\n        metadata={\n            \"name\": \"instrument-change\",\n            \"type\": \"Element\",\n            \"sequential\": True,\n        }\n    )\n    midi_device: List[MidiDevice] = field(\n        default_factory=list,\n        metadata={\n            \"name\": \"midi-device\",\n            \"type\": \"Element\",\n            \"sequential\": True,\n        }\n    )\n    midi_instrument: List[MidiInstrument] = field(\n        default_factory=list,\n        metadata={\n            \"name\": \"midi-instrument\",\n            \"type\": \"Element\",\n            \"sequential\": True,\n        }\n    )\n    play: List[Play] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n            \"sequential\": True,\n        }\n    )\n    swing: Optional[Swing] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    offset: Optional[Offset] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    tempo: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"min_inclusive\": Decimal(\"0\"),\n        }\n    )\n    dynamics: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"min_inclusive\": Decimal(\"0\"),\n        }\n    )\n    dacapo: Optional[YesNo] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    segno: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    dalsegno: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    coda: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    tocoda: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    divisions: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    forward_repeat: Optional[YesNo] = field(\n        default=None,\n        metadata={\n            \"name\": \"forward-repeat\",\n            \"type\": \"Attribute\",\n        }\n    )\n    fine: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    time_only: Optional[str] = field(\n        default=None,\n        metadata={\n            \"name\": \"time-only\",\n            \"type\": \"Attribute\",\n            \"pattern\": r\"[1-9][0-9]*(, ?[1-9][0-9]*)*\",\n        }\n    )\n    pizzicato: Optional[YesNo] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    pan: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"min_inclusive\": Decimal(\"-180\"),\n            \"max_inclusive\": Decimal(\"180\"),\n        }\n    )\n    elevation: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"min_inclusive\": Decimal(\"-180\"),\n            \"max_inclusive\": Decimal(\"180\"),\n        }\n    )\n    damper_pedal: Optional[Union[YesNo, Decimal]] = field(\n        default=None,\n        metadata={\n            \"name\": \"damper-pedal\",\n            \"type\": \"Attribute\",\n        }\n    )\n    soft_pedal: Optional[Union[YesNo, Decimal]] = field(\n        default=None,\n        metadata={\n            \"name\": \"soft-pedal\",\n            \"type\": \"Attribute\",\n        }\n    )\n    sostenuto_pedal: Optional[Union[YesNo, Decimal]] = field(\n        default=None,\n        metadata={\n            \"name\": \"sostenuto-pedal\",\n            \"type\": \"Attribute\",\n        }\n    )\n    id: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass StaffDetails:\n    \"\"\"The staff-details element is used to indicate different types of staves.\n\n    The optional number attribute specifies the staff number from top to\n    bottom on the system, as with clef. The print-object attribute is\n    used to indicate when a staff is not printed in a part, usually in\n    large scores where empty parts are omitted. It is yes by default. If\n    print-spacing is yes while print-object is no, the score is printed\n    in cutaway format where vertical space is left for the empty part.\n\n    :ivar staff_type:\n    :ivar staff_lines: The staff-lines element specifies the number of\n        lines and is usually used for a non 5-line staff. If the staff-\n        lines element is present, the appearance of each line may be\n        individually specified with a line-detail element.\n    :ivar line_detail:\n    :ivar staff_tuning:\n    :ivar capo: The capo element indicates at which fret a capo should\n        be placed on a fretted instrument. This changes the open tuning\n        of the strings specified by staff-tuning by the specified number\n        of half-steps.\n    :ivar staff_size:\n    :ivar number:\n    :ivar show_frets:\n    :ivar print_object:\n    :ivar print_spacing:\n    \"\"\"\n    class Meta:\n        name = \"staff-details\"\n\n    staff_type: Optional[StaffType] = field(\n        default=None,\n        metadata={\n            \"name\": \"staff-type\",\n            \"type\": \"Element\",\n        }\n    )\n    staff_lines: Optional[int] = field(\n        default=None,\n        metadata={\n            \"name\": \"staff-lines\",\n            \"type\": \"Element\",\n        }\n    )\n    line_detail: List[LineDetail] = field(\n        default_factory=list,\n        metadata={\n            \"name\": \"line-detail\",\n            \"type\": \"Element\",\n        }\n    )\n    staff_tuning: List[StaffTuning] = field(\n        default_factory=list,\n        metadata={\n            \"name\": \"staff-tuning\",\n            \"type\": \"Element\",\n        }\n    )\n    capo: Optional[int] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    staff_size: Optional[StaffSize] = field(\n        default=None,\n        metadata={\n            \"name\": \"staff-size\",\n            \"type\": \"Element\",\n        }\n    )\n    number: Optional[int] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    show_frets: Optional[ShowFrets] = field(\n        default=None,\n        metadata={\n            \"name\": \"show-frets\",\n            \"type\": \"Attribute\",\n        }\n    )\n    print_object: Optional[YesNo] = field(\n        default=None,\n        metadata={\n            \"name\": \"print-object\",\n            \"type\": \"Attribute\",\n        }\n    )\n    print_spacing: Optional[YesNo] = field(\n        default=None,\n        metadata={\n            \"name\": \"print-spacing\",\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass StrongAccent(EmptyPlacement):\n    \"\"\"The strong-accent type indicates a vertical accent mark.\n\n    The type attribute indicates if the point of the accent is down or\n    up.\n    \"\"\"\n    class Meta:\n        name = \"strong-accent\"\n\n    type: UpDown = field(\n        default=UpDown.UP,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass SystemDividers:\n    \"\"\"The system-dividers element indicates the presence or absence of system\n    dividers (also known as system separation marks) between systems displayed\n    on the same page.\n\n    Dividers on the left and right side of the page are controlled by\n    the left-divider and right-divider elements respectively. The\n    default vertical position is half the system-distance value from the\n    top of the system that is below the divider. The default horizontal\n    position is the left and right system margin, respectively. When\n    used in the print element, the system-dividers element affects the\n    dividers that would appear between the current system and the\n    previous system.\n    \"\"\"\n    class Meta:\n        name = \"system-dividers\"\n\n    left_divider: Optional[EmptyPrintObjectStyleAlign] = field(\n        default=None,\n        metadata={\n            \"name\": \"left-divider\",\n            \"type\": \"Element\",\n            \"required\": True,\n        }\n    )\n    right_divider: Optional[EmptyPrintObjectStyleAlign] = field(\n        default=None,\n        metadata={\n            \"name\": \"right-divider\",\n            \"type\": \"Element\",\n            \"required\": True,\n        }\n    )\n\n\n@dataclass\nclass Time:\n    \"\"\"Time signatures are represented by the beats element for the numerator\n    and the beat-type element for the denominator.\n\n    The symbol attribute is used to indicate common and cut time symbols\n    as well as a single number display. Multiple pairs of beat and beat-\n    type elements are used for composite time signatures with multiple\n    denominators, such as 2/4 + 3/8. A composite such as 3+2/8 requires\n    only one beat/beat-type pair. The print-object attribute allows a\n    time signature to be specified but not printed, as is the case for\n    excerpts from the middle of a score. The value is \"yes\" if not\n    present. The optional number attribute refers to staff numbers\n    within the part. If absent, the time signature applies to all staves\n    in the part.\n\n    :ivar beats: The beats element indicates the number of beats, as\n        found in the numerator of a time signature.\n    :ivar beat_type: The beat-type element indicates the beat unit, as\n        found in the denominator of a time signature.\n    :ivar interchangeable:\n    :ivar senza_misura: A senza-misura element explicitly indicates that\n        no time signature is present. The optional element content\n        indicates the symbol to be used, if any, such as an X. The time\n        element's symbol attribute is not used when a senza-misura\n        element is present.\n    :ivar number:\n    :ivar symbol:\n    :ivar separator:\n    :ivar default_x:\n    :ivar default_y:\n    :ivar relative_x:\n    :ivar relative_y:\n    :ivar font_family:\n    :ivar font_style:\n    :ivar font_size:\n    :ivar font_weight:\n    :ivar color:\n    :ivar halign:\n    :ivar valign:\n    :ivar print_object:\n    :ivar id:\n    \"\"\"\n    class Meta:\n        name = \"time\"\n\n    beats: List[str] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n            \"sequential\": True,\n        }\n    )\n    beat_type: List[str] = field(\n        default_factory=list,\n        metadata={\n            \"name\": \"beat-type\",\n            \"type\": \"Element\",\n            \"sequential\": True,\n        }\n    )\n    interchangeable: Optional[Interchangeable] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    senza_misura: Optional[str] = field(\n        default=None,\n        metadata={\n            \"name\": \"senza-misura\",\n            \"type\": \"Element\",\n        }\n    )\n    number: Optional[int] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    symbol: Optional[TimeSymbol] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    separator: Optional[TimeSeparator] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    default_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    default_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_family: Optional[str] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-family\",\n            \"type\": \"Attribute\",\n            \"pattern\": r\"[^,]+(, ?[^,]+)*\",\n        }\n    )\n    font_style: Optional[FontStyle] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-style\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_size: Optional[Union[Decimal, CssFontSize]] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-size\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_weight: Optional[FontWeight] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-weight\",\n            \"type\": \"Attribute\",\n        }\n    )\n    color: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"pattern\": r\"#[\\dA-F]{6}([\\dA-F][\\dA-F])?\",\n        }\n    )\n    halign: Optional[LeftCenterRight] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    valign: Optional[Valign] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    print_object: Optional[YesNo] = field(\n        default=None,\n        metadata={\n            \"name\": \"print-object\",\n            \"type\": \"Attribute\",\n        }\n    )\n    id: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass Transpose:\n    \"\"\"The transpose type represents what must be added to a written pitch to\n    get a correct sounding pitch.\n\n    The optional number attribute refers to staff numbers, from top to\n    bottom on the system. If absent, the transposition applies to all\n    staves in the part. Per-staff transposition is most often used in\n    parts that represent multiple instruments.\n\n    :ivar diatonic: The diatonic element specifies the number of pitch\n        steps needed to go from written to sounding pitch. This allows\n        for correct spelling of enharmonic transpositions. This value\n        does not include octave-change values; the values for both\n        elements need to be added to the written pitch to get the\n        correct sounding pitch.\n    :ivar chromatic: The chromatic element represents the number of\n        semitones needed to get from written to sounding pitch. This\n        value does not include octave-change values; the values for both\n        elements need to be added to the written pitch to get the\n        correct sounding pitch.\n    :ivar octave_change: The octave-change element indicates how many\n        octaves to add to get from written pitch to sounding pitch. The\n        octave-change element should be included when using\n        transposition intervals of an octave or more, and should not be\n        present for intervals of less than an octave.\n    :ivar double: If the double element is present, it indicates that\n        the music is doubled one octave from what is currently written.\n    :ivar number:\n    :ivar id:\n    \"\"\"\n    class Meta:\n        name = \"transpose\"\n\n    diatonic: Optional[int] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    chromatic: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n            \"required\": True,\n        }\n    )\n    octave_change: Optional[int] = field(\n        default=None,\n        metadata={\n            \"name\": \"octave-change\",\n            \"type\": \"Element\",\n        }\n    )\n    double: Optional[Double] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    number: Optional[int] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    id: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass TupletPortion:\n    \"\"\"The tuplet-portion type provides optional full control over tuplet\n    specifications.\n\n    It allows the number and note type (including dots) to be set for\n    the actual and normal portions of a single tuplet. If any of these\n    elements are absent, their values are based on the time-modification\n    element.\n    \"\"\"\n    class Meta:\n        name = \"tuplet-portion\"\n\n    tuplet_number: Optional[TupletNumber] = field(\n        default=None,\n        metadata={\n            \"name\": \"tuplet-number\",\n            \"type\": \"Element\",\n        }\n    )\n    tuplet_type: Optional[TupletType] = field(\n        default=None,\n        metadata={\n            \"name\": \"tuplet-type\",\n            \"type\": \"Element\",\n        }\n    )\n    tuplet_dot: List[TupletDot] = field(\n        default_factory=list,\n        metadata={\n            \"name\": \"tuplet-dot\",\n            \"type\": \"Element\",\n        }\n    )\n\n\n@dataclass\nclass Work:\n    \"\"\"Works are optionally identified by number and title.\n\n    The work type also may indicate a link to the opus document that\n    composes multiple scores into a collection.\n\n    :ivar work_number: The work-number element specifies the number of a\n        work, such as its opus number.\n    :ivar work_title: The work-title element specifies the title of a\n        work, not including its opus or other work number.\n    :ivar opus:\n    \"\"\"\n    class Meta:\n        name = \"work\"\n\n    work_number: Optional[str] = field(\n        default=None,\n        metadata={\n            \"name\": \"work-number\",\n            \"type\": \"Element\",\n        }\n    )\n    work_title: Optional[str] = field(\n        default=None,\n        metadata={\n            \"name\": \"work-title\",\n            \"type\": \"Element\",\n        }\n    )\n    opus: Optional[Opus] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n\n\n@dataclass\nclass Articulations:\n    \"\"\"\n    Articulations and accents are grouped together here.\n\n    :ivar accent: The accent element indicates a regular horizontal\n        accent mark.\n    :ivar strong_accent: The strong-accent element indicates a vertical\n        accent mark.\n    :ivar staccato: The staccato element is used for a dot articulation,\n        as opposed to a stroke or a wedge.\n    :ivar tenuto: The tenuto element indicates a tenuto line symbol.\n    :ivar detached_legato: The detached-legato element indicates the\n        combination of a tenuto line and staccato dot symbol.\n    :ivar staccatissimo: The staccatissimo element is used for a wedge\n        articulation, as opposed to a dot or a stroke.\n    :ivar spiccato: The spiccato element is used for a stroke\n        articulation, as opposed to a dot or a wedge.\n    :ivar scoop: The scoop element is an indeterminate slide attached to\n        a single note. The scoop appears before the main note and comes\n        from below the main pitch.\n    :ivar plop: The plop element is an indeterminate slide attached to a\n        single note. The plop appears before the main note and comes\n        from above the main pitch.\n    :ivar doit: The doit element is an indeterminate slide attached to a\n        single note. The doit appears after the main note and goes above\n        the main pitch.\n    :ivar falloff: The falloff element is an indeterminate slide\n        attached to a single note. The falloff appears after the main\n        note and goes below the main pitch.\n    :ivar breath_mark:\n    :ivar caesura:\n    :ivar stress: The stress element indicates a stressed note.\n    :ivar unstress: The unstress element indicates an unstressed note.\n        It is often notated using a u-shaped symbol.\n    :ivar soft_accent: The soft-accent element indicates a soft accent\n        that is not as heavy as a normal accent. It is often notated as\n        &lt;&gt;. It can be combined with other articulations to\n        implement the first eight symbols in the SMuFL Articulation\n        supplement range.\n    :ivar other_articulation: The other-articulation element is used to\n        define any articulations not yet in the MusicXML format. The\n        smufl attribute can be used to specify a particular\n        articulation, allowing application interoperability without\n        requiring every SMuFL articulation to have a MusicXML element\n        equivalent. Using the other-articulation element without the\n        smufl attribute allows for extended representation, though\n        without application interoperability.\n    :ivar id:\n    \"\"\"\n    class Meta:\n        name = \"articulations\"\n\n    accent: List[EmptyPlacement] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    strong_accent: List[StrongAccent] = field(\n        default_factory=list,\n        metadata={\n            \"name\": \"strong-accent\",\n            \"type\": \"Element\",\n        }\n    )\n    staccato: List[EmptyPlacement] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    tenuto: List[EmptyPlacement] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    detached_legato: List[EmptyPlacement] = field(\n        default_factory=list,\n        metadata={\n            \"name\": \"detached-legato\",\n            \"type\": \"Element\",\n        }\n    )\n    staccatissimo: List[EmptyPlacement] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    spiccato: List[EmptyPlacement] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    scoop: List[EmptyLine] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    plop: List[EmptyLine] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    doit: List[EmptyLine] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    falloff: List[EmptyLine] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    breath_mark: List[BreathMark] = field(\n        default_factory=list,\n        metadata={\n            \"name\": \"breath-mark\",\n            \"type\": \"Element\",\n        }\n    )\n    caesura: List[Caesura] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    stress: List[EmptyPlacement] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    unstress: List[EmptyPlacement] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    soft_accent: List[EmptyPlacement] = field(\n        default_factory=list,\n        metadata={\n            \"name\": \"soft-accent\",\n            \"type\": \"Element\",\n        }\n    )\n    other_articulation: List[OtherPlacementText] = field(\n        default_factory=list,\n        metadata={\n            \"name\": \"other-articulation\",\n            \"type\": \"Element\",\n        }\n    )\n    id: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass FiguredBass:\n    \"\"\"The figured-bass element represents figured bass notation.\n\n    Figured bass elements take their position from the first regular\n    note (not a grace note or chord note) that follows in score order.\n    The optional duration element is used to indicate changes of figures\n    under a note. Figures are ordered from top to bottom. The value of\n    parentheses is \"no\" if not present.\n\n    :ivar figure:\n    :ivar duration: Duration is a positive number specified in division\n        units. This is the intended duration vs. notated duration (for\n        instance, differences in dotted notes in Baroque-era music).\n        Differences in duration specific to an interpretation or\n        performance should be represented using the note element's\n        attack and release attributes. The duration element moves the\n        musical position when used in backup elements, forward elements,\n        and note elements that do not contain a chord child element.\n    :ivar footnote:\n    :ivar level:\n    :ivar default_x:\n    :ivar default_y:\n    :ivar relative_x:\n    :ivar relative_y:\n    :ivar font_family:\n    :ivar font_style:\n    :ivar font_size:\n    :ivar font_weight:\n    :ivar color:\n    :ivar halign:\n    :ivar valign:\n    :ivar placement:\n    :ivar print_object:\n    :ivar print_dot:\n    :ivar print_spacing:\n    :ivar print_lyric:\n    :ivar parentheses:\n    :ivar id:\n    \"\"\"\n    class Meta:\n        name = \"figured-bass\"\n\n    figure: List[Figure] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n            \"min_occurs\": 1,\n        }\n    )\n    duration: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n            \"min_exclusive\": Decimal(\"0\"),\n        }\n    )\n    footnote: Optional[FormattedText] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    level: Optional[Level] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    default_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    default_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_family: Optional[str] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-family\",\n            \"type\": \"Attribute\",\n            \"pattern\": r\"[^,]+(, ?[^,]+)*\",\n        }\n    )\n    font_style: Optional[FontStyle] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-style\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_size: Optional[Union[Decimal, CssFontSize]] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-size\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_weight: Optional[FontWeight] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-weight\",\n            \"type\": \"Attribute\",\n        }\n    )\n    color: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"pattern\": r\"#[\\dA-F]{6}([\\dA-F][\\dA-F])?\",\n        }\n    )\n    halign: Optional[LeftCenterRight] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    valign: Optional[Valign] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    placement: Optional[AboveBelow] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    print_object: Optional[YesNo] = field(\n        default=None,\n        metadata={\n            \"name\": \"print-object\",\n            \"type\": \"Attribute\",\n        }\n    )\n    print_dot: Optional[YesNo] = field(\n        default=None,\n        metadata={\n            \"name\": \"print-dot\",\n            \"type\": \"Attribute\",\n        }\n    )\n    print_spacing: Optional[YesNo] = field(\n        default=None,\n        metadata={\n            \"name\": \"print-spacing\",\n            \"type\": \"Attribute\",\n        }\n    )\n    print_lyric: Optional[YesNo] = field(\n        default=None,\n        metadata={\n            \"name\": \"print-lyric\",\n            \"type\": \"Attribute\",\n        }\n    )\n    parentheses: Optional[YesNo] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    id: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass ForPart:\n    \"\"\"The for-part type is used in a concert score to indicate the\n    transposition for a transposed part created from that score.\n\n    It is only used in score files that contain a concert-score element\n    in the defaults. This allows concert scores with transposed parts to\n    be represented in a single uncompressed MusicXML file. The optional\n    number attribute refers to staff numbers, from top to bottom on the\n    system. If absent, the child elements apply to all staves in the\n    created part.\n\n    :ivar part_clef: The part-clef element is used for transpositions\n        that also include a change of clef, as for instruments such as\n        bass clarinet.\n    :ivar part_transpose: The chromatic element in a part-transpose\n        element will usually have a non-zero value, since octave\n        transpositions can be represented in concert scores using the\n        transpose element.\n    :ivar number:\n    :ivar id:\n    \"\"\"\n    class Meta:\n        name = \"for-part\"\n\n    part_clef: Optional[PartClef] = field(\n        default=None,\n        metadata={\n            \"name\": \"part-clef\",\n            \"type\": \"Element\",\n        }\n    )\n    part_transpose: Optional[PartTranspose] = field(\n        default=None,\n        metadata={\n            \"name\": \"part-transpose\",\n            \"type\": \"Element\",\n            \"required\": True,\n        }\n    )\n    number: Optional[int] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    id: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass Frame:\n    \"\"\"The frame type represents a frame or fretboard diagram used together\n    with a chord symbol.\n\n    The representation is based on the NIFF guitar grid with additional\n    information. The frame type's unplayed attribute indicates what to\n    display above a string that has no associated frame-note element.\n    Typical values are x and the empty string. If the attribute is not\n    present, the display of the unplayed string is application-defined.\n\n    :ivar frame_strings: The frame-strings element gives the overall\n        size of the frame in vertical lines (strings).\n    :ivar frame_frets: The frame-frets element gives the overall size of\n        the frame in horizontal spaces (frets).\n    :ivar first_fret:\n    :ivar frame_note:\n    :ivar default_x:\n    :ivar default_y:\n    :ivar relative_x:\n    :ivar relative_y:\n    :ivar color:\n    :ivar halign:\n    :ivar valign:\n    :ivar height:\n    :ivar width:\n    :ivar unplayed:\n    :ivar id:\n    \"\"\"\n    class Meta:\n        name = \"frame\"\n\n    frame_strings: Optional[int] = field(\n        default=None,\n        metadata={\n            \"name\": \"frame-strings\",\n            \"type\": \"Element\",\n            \"required\": True,\n        }\n    )\n    frame_frets: Optional[int] = field(\n        default=None,\n        metadata={\n            \"name\": \"frame-frets\",\n            \"type\": \"Element\",\n            \"required\": True,\n        }\n    )\n    first_fret: Optional[FirstFret] = field(\n        default=None,\n        metadata={\n            \"name\": \"first-fret\",\n            \"type\": \"Element\",\n        }\n    )\n    frame_note: List[FrameNote] = field(\n        default_factory=list,\n        metadata={\n            \"name\": \"frame-note\",\n            \"type\": \"Element\",\n            \"min_occurs\": 1,\n        }\n    )\n    default_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    default_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    color: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"pattern\": r\"#[\\dA-F]{6}([\\dA-F][\\dA-F])?\",\n        }\n    )\n    halign: Optional[LeftCenterRight] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    valign: Optional[ValignImage] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    height: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    width: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    unplayed: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    id: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass Identification:\n    \"\"\"Identification contains basic metadata about the score.\n\n    It includes information that may apply at a score-wide, movement-\n    wide, or part-wide level. The creator, rights, source, and relation\n    elements are based on Dublin Core.\n\n    :ivar creator: The creator element is borrowed from Dublin Core. It\n        is used for the creators of the score. The type attribute is\n        used to distinguish different creative contributions. Thus,\n        there can be multiple creators within an identification.\n        Standard type values are composer, lyricist, and arranger. Other\n        type values may be used for different types of creative roles.\n        The type attribute should usually be used even if there is just\n        a single creator element. The MusicXML format does not use the\n        creator / contributor distinction from Dublin Core.\n    :ivar rights: The rights element is borrowed from Dublin Core. It\n        contains copyright and other intellectual property notices.\n        Words, music, and derivatives can have different types, so\n        multiple rights elements with different type attributes are\n        supported. Standard type values are music, words, and\n        arrangement, but other types may be used. The type attribute is\n        only needed when there are multiple rights elements.\n    :ivar encoding:\n    :ivar source: The source for the music that is encoded. This is\n        similar to the Dublin Core source element.\n    :ivar relation: A related resource for the music that is encoded.\n        This is similar to the Dublin Core relation element. Standard\n        type values are music, words, and arrangement, but other types\n        may be used.\n    :ivar miscellaneous:\n    \"\"\"\n    class Meta:\n        name = \"identification\"\n\n    creator: List[TypedText] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    rights: List[TypedText] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    encoding: Optional[Encoding] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    source: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    relation: List[TypedText] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    miscellaneous: Optional[Miscellaneous] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n\n\n@dataclass\nclass MetronomeNote:\n    \"\"\"\n    The metronome-note type defines the appearance of a note within a metric\n    relationship mark.\n\n    :ivar metronome_type: The metronome-type element works like the type\n        element in defining metric relationships.\n    :ivar metronome_dot: The metronome-dot element works like the dot\n        element in defining metric relationships.\n    :ivar metronome_beam:\n    :ivar metronome_tied:\n    :ivar metronome_tuplet:\n    \"\"\"\n    class Meta:\n        name = \"metronome-note\"\n\n    metronome_type: Optional[NoteTypeValue] = field(\n        default=None,\n        metadata={\n            \"name\": \"metronome-type\",\n            \"type\": \"Element\",\n            \"required\": True,\n        }\n    )\n    metronome_dot: List[Empty] = field(\n        default_factory=list,\n        metadata={\n            \"name\": \"metronome-dot\",\n            \"type\": \"Element\",\n        }\n    )\n    metronome_beam: List[MetronomeBeam] = field(\n        default_factory=list,\n        metadata={\n            \"name\": \"metronome-beam\",\n            \"type\": \"Element\",\n        }\n    )\n    metronome_tied: Optional[MetronomeTied] = field(\n        default=None,\n        metadata={\n            \"name\": \"metronome-tied\",\n            \"type\": \"Element\",\n        }\n    )\n    metronome_tuplet: Optional[MetronomeTuplet] = field(\n        default=None,\n        metadata={\n            \"name\": \"metronome-tuplet\",\n            \"type\": \"Element\",\n        }\n    )\n\n\n@dataclass\nclass Ornaments:\n    \"\"\"Ornaments can be any of several types, followed optionally by\n    accidentals.\n\n    The accidental-mark element's content is represented the same as an\n    accidental element, but with a different name to reflect the\n    different musical meaning.\n\n    :ivar trill_mark: The trill-mark element represents the trill-mark\n        symbol.\n    :ivar turn: The turn element is the normal turn shape which goes up\n        then down.\n    :ivar delayed_turn: The delayed-turn element indicates a normal turn\n        that is delayed until the end of the current note.\n    :ivar inverted_turn: The inverted-turn element has the shape which\n        goes down and then up.\n    :ivar delayed_inverted_turn: The delayed-inverted-turn element\n        indicates an inverted turn that is delayed until the end of the\n        current note.\n    :ivar vertical_turn: The vertical-turn element has the turn symbol\n        shape arranged vertically going from upper left to lower right.\n    :ivar inverted_vertical_turn: The inverted-vertical-turn element has\n        the turn symbol shape arranged vertically going from upper right\n        to lower left.\n    :ivar shake: The shake element has a similar appearance to an\n        inverted-mordent element.\n    :ivar wavy_line:\n    :ivar mordent: The mordent element represents the sign with the\n        vertical line. The choice of which mordent sign is inverted\n        differs between MusicXML and SMuFL. The long attribute is \"no\"\n        by default.\n    :ivar inverted_mordent: The inverted-mordent element represents the\n        sign without the vertical line. The choice of which mordent is\n        inverted differs between MusicXML and SMuFL. The long attribute\n        is \"no\" by default.\n    :ivar schleifer: The name for this ornament is based on the German,\n        to avoid confusion with the more common slide element defined\n        earlier.\n    :ivar tremolo:\n    :ivar haydn: The haydn element represents the Haydn ornament. This\n        is defined in SMuFL as ornamentHaydn.\n    :ivar other_ornament: The other-ornament element is used to define\n        any ornaments not yet in the MusicXML format. The smufl\n        attribute can be used to specify a particular ornament, allowing\n        application interoperability without requiring every SMuFL\n        ornament to have a MusicXML element equivalent. Using the other-\n        ornament element without the smufl attribute allows for extended\n        representation, though without application interoperability.\n    :ivar accidental_mark:\n    :ivar id:\n    \"\"\"\n    class Meta:\n        name = \"ornaments\"\n\n    trill_mark: List[EmptyTrillSound] = field(\n        default_factory=list,\n        metadata={\n            \"name\": \"trill-mark\",\n            \"type\": \"Element\",\n            \"sequential\": True,\n        }\n    )\n    turn: List[HorizontalTurn] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n            \"sequential\": True,\n        }\n    )\n    delayed_turn: List[HorizontalTurn] = field(\n        default_factory=list,\n        metadata={\n            \"name\": \"delayed-turn\",\n            \"type\": \"Element\",\n            \"sequential\": True,\n        }\n    )\n    inverted_turn: List[HorizontalTurn] = field(\n        default_factory=list,\n        metadata={\n            \"name\": \"inverted-turn\",\n            \"type\": \"Element\",\n            \"sequential\": True,\n        }\n    )\n    delayed_inverted_turn: List[HorizontalTurn] = field(\n        default_factory=list,\n        metadata={\n            \"name\": \"delayed-inverted-turn\",\n            \"type\": \"Element\",\n            \"sequential\": True,\n        }\n    )\n    vertical_turn: List[EmptyTrillSound] = field(\n        default_factory=list,\n        metadata={\n            \"name\": \"vertical-turn\",\n            \"type\": \"Element\",\n            \"sequential\": True,\n        }\n    )\n    inverted_vertical_turn: List[EmptyTrillSound] = field(\n        default_factory=list,\n        metadata={\n            \"name\": \"inverted-vertical-turn\",\n            \"type\": \"Element\",\n            \"sequential\": True,\n        }\n    )\n    shake: List[EmptyTrillSound] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n            \"sequential\": True,\n        }\n    )\n    wavy_line: List[WavyLine] = field(\n        default_factory=list,\n        metadata={\n            \"name\": \"wavy-line\",\n            \"type\": \"Element\",\n            \"sequential\": True,\n        }\n    )\n    mordent: List[Mordent] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n            \"sequential\": True,\n        }\n    )\n    inverted_mordent: List[Mordent] = field(\n        default_factory=list,\n        metadata={\n            \"name\": \"inverted-mordent\",\n            \"type\": \"Element\",\n            \"sequential\": True,\n        }\n    )\n    schleifer: List[EmptyPlacement] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n            \"sequential\": True,\n        }\n    )\n    tremolo: List[Tremolo] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n            \"sequential\": True,\n        }\n    )\n    haydn: List[EmptyTrillSound] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n            \"sequential\": True,\n        }\n    )\n    other_ornament: List[OtherPlacementText] = field(\n        default_factory=list,\n        metadata={\n            \"name\": \"other-ornament\",\n            \"type\": \"Element\",\n            \"sequential\": True,\n        }\n    )\n    accidental_mark: List[AccidentalMark] = field(\n        default_factory=list,\n        metadata={\n            \"name\": \"accidental-mark\",\n            \"type\": \"Element\",\n            \"sequential\": True,\n        }\n    )\n    id: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass PartGroup:\n    \"\"\"The part-group element indicates groupings of parts in the score,\n    usually indicated by braces and brackets.\n\n    Braces that are used for multi-staff parts should be defined in the\n    attributes element for that part. The part-group start element\n    appears before the first score-part in the group. The part-group\n    stop element appears after the last score-part in the group. The\n    number attribute is used to distinguish overlapping and nested part-\n    groups, not the sequence of groups. As with parts, groups can have a\n    name and abbreviation. Values for the child elements are ignored at\n    the stop of a group. A part-group element is not needed for a single\n    multi-staff part. By default, multi-staff parts include a brace\n    symbol and (if appropriate given the bar-style) common barlines. The\n    symbol formatting for a multi-staff part can be more fully specified\n    using the part-symbol element.\n\n    :ivar group_name:\n    :ivar group_name_display: Formatting specified in the group-name-\n        display element overrides formatting specified in the group-name\n        element.\n    :ivar group_abbreviation:\n    :ivar group_abbreviation_display: Formatting specified in the group-\n        abbreviation-display element overrides formatting specified in\n        the group-abbreviation element.\n    :ivar group_symbol:\n    :ivar group_barline:\n    :ivar group_time: The group-time element indicates that the\n        displayed time signatures should stretch across all parts and\n        staves in the group.\n    :ivar footnote:\n    :ivar level:\n    :ivar type:\n    :ivar number:\n    \"\"\"\n    class Meta:\n        name = \"part-group\"\n\n    group_name: Optional[GroupName] = field(\n        default=None,\n        metadata={\n            \"name\": \"group-name\",\n            \"type\": \"Element\",\n        }\n    )\n    group_name_display: Optional[NameDisplay] = field(\n        default=None,\n        metadata={\n            \"name\": \"group-name-display\",\n            \"type\": \"Element\",\n        }\n    )\n    group_abbreviation: Optional[GroupName] = field(\n        default=None,\n        metadata={\n            \"name\": \"group-abbreviation\",\n            \"type\": \"Element\",\n        }\n    )\n    group_abbreviation_display: Optional[NameDisplay] = field(\n        default=None,\n        metadata={\n            \"name\": \"group-abbreviation-display\",\n            \"type\": \"Element\",\n        }\n    )\n    group_symbol: Optional[GroupSymbol] = field(\n        default=None,\n        metadata={\n            \"name\": \"group-symbol\",\n            \"type\": \"Element\",\n        }\n    )\n    group_barline: Optional[GroupBarline] = field(\n        default=None,\n        metadata={\n            \"name\": \"group-barline\",\n            \"type\": \"Element\",\n        }\n    )\n    group_time: Optional[Empty] = field(\n        default=None,\n        metadata={\n            \"name\": \"group-time\",\n            \"type\": \"Element\",\n        }\n    )\n    footnote: Optional[FormattedText] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    level: Optional[Level] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    type: Optional[StartStop] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"required\": True,\n        }\n    )\n    number: str = field(\n        default=\"1\",\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass SystemLayout:\n    \"\"\"A system is a group of staves that are read and played simultaneously.\n\n    System layout includes left and right margins and the vertical\n    distance from the previous system. The system distance is measured\n    from the bottom line of the previous system to the top line of the\n    current system. It is ignored for the first system on a page. The\n    top system distance is measured from the page's top margin to the\n    top line of the first system. It is ignored for all but the first\n    system on a page. Sometimes the sum of measure widths in a system\n    may not equal the system width specified by the layout elements due\n    to roundoff or other errors. The behavior when reading MusicXML\n    files in these cases is application-dependent. For instance,\n    applications may find that the system layout data is more reliable\n    than the sum of the measure widths, and adjust the measure widths\n    accordingly. When used in the defaults element, the system-layout\n    element defines a default appearance for all systems in the score.\n    If no system-layout element is present in the defaults element,\n    default system layout values are chosen by the application. When\n    used in the print element, the system-layout element affects the\n    appearance of the current system only. All other systems use the\n    default values as determined by the defaults element. If any child\n    elements are missing from the system-layout element in a print\n    element, the values determined by the defaults element are used\n    there as well. This type of system-layout element need only be read\n    from or written to the first visible part in the score.\n    \"\"\"\n    class Meta:\n        name = \"system-layout\"\n\n    system_margins: Optional[SystemMargins] = field(\n        default=None,\n        metadata={\n            \"name\": \"system-margins\",\n            \"type\": \"Element\",\n        }\n    )\n    system_distance: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"system-distance\",\n            \"type\": \"Element\",\n        }\n    )\n    top_system_distance: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"top-system-distance\",\n            \"type\": \"Element\",\n        }\n    )\n    system_dividers: Optional[SystemDividers] = field(\n        default=None,\n        metadata={\n            \"name\": \"system-dividers\",\n            \"type\": \"Element\",\n        }\n    )\n\n\n@dataclass\nclass Technical:\n    \"\"\"\n    Technical indications give performance information for individual\n    instruments.\n\n    :ivar up_bow: The up-bow element represents the symbol that is used\n        both for up-bowing on bowed instruments, and up-stroke on\n        plucked instruments.\n    :ivar down_bow: The down-bow element represents the symbol that is\n        used both for down-bowing on bowed instruments, and down-stroke\n        on plucked instruments.\n    :ivar harmonic:\n    :ivar open_string: The open-string element represents the zero-\n        shaped open string symbol.\n    :ivar thumb_position: The thumb-position element represents the\n        thumb position symbol. This is a circle with a line, where the\n        line does not come within the circle. It is distinct from the\n        snap pizzicato symbol, where the line comes inside the circle.\n    :ivar fingering:\n    :ivar pluck: The pluck element is used to specify the plucking\n        fingering on a fretted instrument, where the fingering element\n        refers to the fretting fingering. Typical values are p, i, m, a\n        for pulgar/thumb, indicio/index, medio/middle, and anular/ring\n        fingers.\n    :ivar double_tongue: The double-tongue element represents the double\n        tongue symbol (two dots arranged horizontally).\n    :ivar triple_tongue: The triple-tongue element represents the triple\n        tongue symbol (three dots arranged horizontally).\n    :ivar stopped: The stopped element represents the stopped symbol,\n        which looks like a plus sign. The smufl attribute distinguishes\n        different SMuFL glyphs that have a similar appearance such as\n        handbellsMalletBellSuspended and guitarClosePedal. If not\n        present, the default glyph is brassMuteClosed.\n    :ivar snap_pizzicato: The snap-pizzicato element represents the snap\n        pizzicato symbol. This is a circle with a line, where the line\n        comes inside the circle. It is distinct from the thumb-position\n        symbol, where the line does not come inside the circle.\n    :ivar fret:\n    :ivar string:\n    :ivar hammer_on:\n    :ivar pull_off:\n    :ivar bend:\n    :ivar tap:\n    :ivar heel:\n    :ivar toe:\n    :ivar fingernails: The fingernails element is used in notation for\n        harp and other plucked string instruments.\n    :ivar hole:\n    :ivar arrow:\n    :ivar handbell:\n    :ivar brass_bend: The brass-bend element represents the u-shaped\n        bend symbol used in brass notation, distinct from the bend\n        element used in guitar music.\n    :ivar flip: The flip element represents the flip symbol used in\n        brass notation.\n    :ivar smear: The smear element represents the tilde-shaped smear\n        symbol used in brass notation.\n    :ivar open: The open element represents the open symbol, which looks\n        like a circle. The smufl attribute can be used to distinguish\n        different SMuFL glyphs that have a similar appearance such as\n        brassMuteOpen and guitarOpenPedal. If not present, the default\n        glyph is brassMuteOpen.\n    :ivar half_muted: The half-muted element represents the half-muted\n        symbol, which looks like a circle with a plus sign inside. The\n        smufl attribute can be used to distinguish different SMuFL\n        glyphs that have a similar appearance such as\n        brassMuteHalfClosed and guitarHalfOpenPedal. If not present, the\n        default glyph is brassMuteHalfClosed.\n    :ivar harmon_mute:\n    :ivar golpe: The golpe element represents the golpe symbol that is\n        used for tapping the pick guard in guitar music.\n    :ivar other_technical: The other-technical element is used to define\n        any technical indications not yet in the MusicXML format. The\n        smufl attribute can be used to specify a particular glyph,\n        allowing application interoperability without requiring every\n        SMuFL technical indication to have a MusicXML element\n        equivalent. Using the other-technical element without the smufl\n        attribute allows for extended representation, though without\n        application interoperability.\n    :ivar id:\n    \"\"\"\n    class Meta:\n        name = \"technical\"\n\n    up_bow: List[EmptyPlacement] = field(\n        default_factory=list,\n        metadata={\n            \"name\": \"up-bow\",\n            \"type\": \"Element\",\n        }\n    )\n    down_bow: List[EmptyPlacement] = field(\n        default_factory=list,\n        metadata={\n            \"name\": \"down-bow\",\n            \"type\": \"Element\",\n        }\n    )\n    harmonic: List[Harmonic] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    open_string: List[EmptyPlacement] = field(\n        default_factory=list,\n        metadata={\n            \"name\": \"open-string\",\n            \"type\": \"Element\",\n        }\n    )\n    thumb_position: List[EmptyPlacement] = field(\n        default_factory=list,\n        metadata={\n            \"name\": \"thumb-position\",\n            \"type\": \"Element\",\n        }\n    )\n    fingering: List[Fingering] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    pluck: List[PlacementText] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    double_tongue: List[EmptyPlacement] = field(\n        default_factory=list,\n        metadata={\n            \"name\": \"double-tongue\",\n            \"type\": \"Element\",\n        }\n    )\n    triple_tongue: List[EmptyPlacement] = field(\n        default_factory=list,\n        metadata={\n            \"name\": \"triple-tongue\",\n            \"type\": \"Element\",\n        }\n    )\n    stopped: List[EmptyPlacementSmufl] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    snap_pizzicato: List[EmptyPlacement] = field(\n        default_factory=list,\n        metadata={\n            \"name\": \"snap-pizzicato\",\n            \"type\": \"Element\",\n        }\n    )\n    fret: List[Fret] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    string: List[String] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    hammer_on: List[HammerOnPullOff] = field(\n        default_factory=list,\n        metadata={\n            \"name\": \"hammer-on\",\n            \"type\": \"Element\",\n        }\n    )\n    pull_off: List[HammerOnPullOff] = field(\n        default_factory=list,\n        metadata={\n            \"name\": \"pull-off\",\n            \"type\": \"Element\",\n        }\n    )\n    bend: List[Bend] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    tap: List[Tap] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    heel: List[HeelToe] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    toe: List[HeelToe] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    fingernails: List[EmptyPlacement] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    hole: List[Hole] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    arrow: List[Arrow] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    handbell: List[Handbell] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    brass_bend: List[EmptyPlacement] = field(\n        default_factory=list,\n        metadata={\n            \"name\": \"brass-bend\",\n            \"type\": \"Element\",\n        }\n    )\n    flip: List[EmptyPlacement] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    smear: List[EmptyPlacement] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    open: List[EmptyPlacementSmufl] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    half_muted: List[EmptyPlacementSmufl] = field(\n        default_factory=list,\n        metadata={\n            \"name\": \"half-muted\",\n            \"type\": \"Element\",\n        }\n    )\n    harmon_mute: List[HarmonMute] = field(\n        default_factory=list,\n        metadata={\n            \"name\": \"harmon-mute\",\n            \"type\": \"Element\",\n        }\n    )\n    golpe: List[EmptyPlacement] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    other_technical: List[OtherPlacementText] = field(\n        default_factory=list,\n        metadata={\n            \"name\": \"other-technical\",\n            \"type\": \"Element\",\n        }\n    )\n    id: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass Tuplet:\n    \"\"\"A tuplet element is present when a tuplet is to be displayed\n    graphically, in addition to the sound data provided by the time-\n    modification elements.\n\n    The number attribute is used to distinguish nested tuplets. The\n    bracket attribute is used to indicate the presence of a bracket. If\n    unspecified, the results are implementation-dependent. The line-\n    shape attribute is used to specify whether the bracket is straight\n    or in the older curved or slurred style. It is straight by default.\n    Whereas a time-modification element shows how the cumulative,\n    sounding effect of tuplets and double-note tremolos compare to the\n    written note type, the tuplet element describes how this is\n    displayed. The tuplet element also provides more detailed\n    representation information than the time-modification element, and\n    is needed to represent nested tuplets and other complex tuplets\n    accurately. The show-number attribute is used to display either the\n    number of actual notes, the number of both actual and normal notes,\n    or neither. It is actual by default. The show-type attribute is used\n    to display either the actual type, both the actual and normal types,\n    or neither. It is none by default.\n\n    :ivar tuplet_actual: The tuplet-actual element provide optional full\n        control over how the actual part of the tuplet is displayed,\n        including number and note type (with dots). If any of these\n        elements are absent, their values are based on the time-\n        modification element.\n    :ivar tuplet_normal: The tuplet-normal element provide optional full\n        control over how the normal part of the tuplet is displayed,\n        including number and note type (with dots). If any of these\n        elements are absent, their values are based on the time-\n        modification element.\n    :ivar type:\n    :ivar number:\n    :ivar bracket:\n    :ivar show_number:\n    :ivar show_type:\n    :ivar line_shape:\n    :ivar default_x:\n    :ivar default_y:\n    :ivar relative_x:\n    :ivar relative_y:\n    :ivar placement:\n    :ivar id:\n    \"\"\"\n    class Meta:\n        name = \"tuplet\"\n\n    tuplet_actual: Optional[TupletPortion] = field(\n        default=None,\n        metadata={\n            \"name\": \"tuplet-actual\",\n            \"type\": \"Element\",\n        }\n    )\n    tuplet_normal: Optional[TupletPortion] = field(\n        default=None,\n        metadata={\n            \"name\": \"tuplet-normal\",\n            \"type\": \"Element\",\n        }\n    )\n    type: Optional[StartStop] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"required\": True,\n        }\n    )\n    number: Optional[int] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"min_inclusive\": 1,\n            \"max_inclusive\": 16,\n        }\n    )\n    bracket: Optional[YesNo] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    show_number: Optional[ShowTuplet] = field(\n        default=None,\n        metadata={\n            \"name\": \"show-number\",\n            \"type\": \"Attribute\",\n        }\n    )\n    show_type: Optional[ShowTuplet] = field(\n        default=None,\n        metadata={\n            \"name\": \"show-type\",\n            \"type\": \"Attribute\",\n        }\n    )\n    line_shape: Optional[LineShape] = field(\n        default=None,\n        metadata={\n            \"name\": \"line-shape\",\n            \"type\": \"Attribute\",\n        }\n    )\n    default_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    default_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    placement: Optional[AboveBelow] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    id: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass Attributes:\n    \"\"\"The attributes element contains musical information that typically\n    changes on measure boundaries.\n\n    This includes key and time signatures, clefs, transpositions, and\n    staving. When attributes are changed mid-measure, it affects the\n    music in score order, not in MusicXML document order.\n\n    :ivar footnote:\n    :ivar level:\n    :ivar divisions: Musical notation duration is commonly represented\n        as fractions. The divisions element indicates how many divisions\n        per quarter note are used to indicate a note's duration. For\n        example, if duration = 1 and divisions = 2, this is an eighth\n        note duration. Duration and divisions are used directly for\n        generating sound output, so they must be chosen to take tuplets\n        into account. Using a divisions element lets us use just one\n        number to represent a duration for each note in the score, while\n        retaining the full power of a fractional representation. If\n        maximum compatibility with Standard MIDI 1.0 files is important,\n        do not have the divisions value exceed 16383.\n    :ivar key: The key element represents a key signature. Both\n        traditional and non-traditional key signatures are supported.\n        The optional number attribute refers to staff numbers. If\n        absent, the key signature applies to all staves in the part.\n    :ivar time: Time signatures are represented by the beats element for\n        the numerator and the beat-type element for the denominator.\n    :ivar staves: The staves element is used if there is more than one\n        staff represented in the given part (e.g., 2 staves for typical\n        piano parts). If absent, a value of 1 is assumed. Staves are\n        ordered from top to bottom in a part in numerical order, with\n        staff 1 above staff 2.\n    :ivar part_symbol: The part-symbol element indicates how a symbol\n        for a multi-staff part is indicated in the score.\n    :ivar instruments: The instruments element is only used if more than\n        one instrument is represented in the part (e.g., oboe I and II\n        where they play together most of the time). If absent, a value\n        of 1 is assumed.\n    :ivar clef: Clefs are represented by a combination of sign, line,\n        and clef-octave-change elements.\n    :ivar staff_details: The staff-details element is used to indicate\n        different types of staves.\n    :ivar transpose: If the part is being encoded for a transposing\n        instrument in written vs. concert pitch, the transposition must\n        be encoded in the transpose element using the transpose type.\n    :ivar for_part: The for-part element is used in a concert score to\n        indicate the transposition for a transposed part created from\n        that score. It is only used in score files that contain a\n        concert-score element in the defaults. This allows concert\n        scores with transposed parts to be represented in a single\n        uncompressed MusicXML file.\n    :ivar directive: Directives are like directions, but can be grouped\n        together with attributes for convenience. This is typically used\n        for tempo markings at the beginning of a piece of music. This\n        element was deprecated in Version 2.0 in favor of the direction\n        element's directive attribute. Language names come from ISO 639,\n        with optional country subcodes from ISO 3166.\n    :ivar measure_style: A measure-style indicates a special way to\n        print partial to multiple measures within a part. This includes\n        multiple rests over several measures, repeats of beats, single,\n        or multiple measures, and use of slash notation.\n    \"\"\"\n    class Meta:\n        name = \"attributes\"\n\n    footnote: Optional[FormattedText] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    level: Optional[Level] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    divisions: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n            \"min_exclusive\": Decimal(\"0\"),\n        }\n    )\n    key: List[Key] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    time: List[Time] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    staves: Optional[int] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    part_symbol: Optional[PartSymbol] = field(\n        default=None,\n        metadata={\n            \"name\": \"part-symbol\",\n            \"type\": \"Element\",\n        }\n    )\n    instruments: Optional[int] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    clef: List[Clef] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    staff_details: List[StaffDetails] = field(\n        default_factory=list,\n        metadata={\n            \"name\": \"staff-details\",\n            \"type\": \"Element\",\n        }\n    )\n    transpose: List[Transpose] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    for_part: List[ForPart] = field(\n        default_factory=list,\n        metadata={\n            \"name\": \"for-part\",\n            \"type\": \"Element\",\n        }\n    )\n    directive: List[\"Attributes.Directive\"] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    measure_style: List[MeasureStyle] = field(\n        default_factory=list,\n        metadata={\n            \"name\": \"measure-style\",\n            \"type\": \"Element\",\n        }\n    )\n\n    @dataclass\n    class Directive:\n        value: str = field(\n            default=\"\",\n            metadata={\n                \"required\": True,\n            }\n        )\n        default_x: Optional[Decimal] = field(\n            default=None,\n            metadata={\n                \"name\": \"default-x\",\n                \"type\": \"Attribute\",\n            }\n        )\n        default_y: Optional[Decimal] = field(\n            default=None,\n            metadata={\n                \"name\": \"default-y\",\n                \"type\": \"Attribute\",\n            }\n        )\n        relative_x: Optional[Decimal] = field(\n            default=None,\n            metadata={\n                \"name\": \"relative-x\",\n                \"type\": \"Attribute\",\n            }\n        )\n        relative_y: Optional[Decimal] = field(\n            default=None,\n            metadata={\n                \"name\": \"relative-y\",\n                \"type\": \"Attribute\",\n            }\n        )\n        font_family: Optional[str] = field(\n            default=None,\n            metadata={\n                \"name\": \"font-family\",\n                \"type\": \"Attribute\",\n                \"pattern\": r\"[^,]+(, ?[^,]+)*\",\n            }\n        )\n        font_style: Optional[FontStyle] = field(\n            default=None,\n            metadata={\n                \"name\": \"font-style\",\n                \"type\": \"Attribute\",\n            }\n        )\n        font_size: Optional[Union[Decimal, CssFontSize]] = field(\n            default=None,\n            metadata={\n                \"name\": \"font-size\",\n                \"type\": \"Attribute\",\n            }\n        )\n        font_weight: Optional[FontWeight] = field(\n            default=None,\n            metadata={\n                \"name\": \"font-weight\",\n                \"type\": \"Attribute\",\n            }\n        )\n        color: Optional[str] = field(\n            default=None,\n            metadata={\n                \"type\": \"Attribute\",\n                \"pattern\": r\"#[\\dA-F]{6}([\\dA-F][\\dA-F])?\",\n            }\n        )\n        lang: Optional[Union[str, LangValue]] = field(\n            default=None,\n            metadata={\n                \"type\": \"Attribute\",\n                \"namespace\": \"http://www.w3.org/XML/1998/namespace\",\n            }\n        )\n\n\n@dataclass\nclass Defaults:\n    \"\"\"The defaults type specifies score-wide defaults for scaling; whether or\n    not the file is a concert score; layout; and default values for the music\n    font, word font, lyric font, and lyric language.\n\n    Except for the concert-score element, if any defaults are missing,\n    the choice of what to use is determined by the application.\n\n    :ivar scaling:\n    :ivar concert_score: The presence of a concert-score element\n        indicates that a score is displayed in concert pitch. It is used\n        for scores that contain parts for transposing instruments. A\n        document with a concert-score element may not contain any\n        transpose elements that have non-zero values for either the\n        diatonic or chromatic elements. Concert scores may include\n        octave transpositions, so transpose elements with a double\n        element or a non-zero octave-change element value are permitted.\n    :ivar page_layout:\n    :ivar system_layout:\n    :ivar staff_layout:\n    :ivar appearance:\n    :ivar music_font:\n    :ivar word_font:\n    :ivar lyric_font:\n    :ivar lyric_language:\n    \"\"\"\n    class Meta:\n        name = \"defaults\"\n\n    scaling: Optional[Scaling] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    concert_score: Optional[Empty] = field(\n        default=None,\n        metadata={\n            \"name\": \"concert-score\",\n            \"type\": \"Element\",\n        }\n    )\n    page_layout: Optional[PageLayout] = field(\n        default=None,\n        metadata={\n            \"name\": \"page-layout\",\n            \"type\": \"Element\",\n        }\n    )\n    system_layout: Optional[SystemLayout] = field(\n        default=None,\n        metadata={\n            \"name\": \"system-layout\",\n            \"type\": \"Element\",\n        }\n    )\n    staff_layout: List[StaffLayout] = field(\n        default_factory=list,\n        metadata={\n            \"name\": \"staff-layout\",\n            \"type\": \"Element\",\n        }\n    )\n    appearance: Optional[Appearance] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    music_font: Optional[EmptyFont] = field(\n        default=None,\n        metadata={\n            \"name\": \"music-font\",\n            \"type\": \"Element\",\n        }\n    )\n    word_font: Optional[EmptyFont] = field(\n        default=None,\n        metadata={\n            \"name\": \"word-font\",\n            \"type\": \"Element\",\n        }\n    )\n    lyric_font: List[LyricFont] = field(\n        default_factory=list,\n        metadata={\n            \"name\": \"lyric-font\",\n            \"type\": \"Element\",\n        }\n    )\n    lyric_language: List[LyricLanguage] = field(\n        default_factory=list,\n        metadata={\n            \"name\": \"lyric-language\",\n            \"type\": \"Element\",\n        }\n    )\n\n\n@dataclass\nclass Harmony:\n    \"\"\"The harmony type represents harmony analysis, including chord symbols in\n    popular music as well as functional harmony analysis in classical music.\n\n    If there are alternate harmonies possible, this can be specified\n    using multiple harmony elements differentiated by type. Explicit\n    harmonies have all note present in the music; implied have some\n    notes missing but implied; alternate represents alternate analyses.\n    The print-object attribute controls whether or not anything is\n    printed due to the harmony element. The print-frame attribute\n    controls printing of a frame or fretboard diagram. The print-style\n    attribute group sets the default for the harmony, but individual\n    elements can override this with their own print-style values. The\n    arrangement attribute specifies how multiple harmony-chord groups\n    are arranged relative to each other. Harmony-chords with vertical\n    arrangement are separated by horizontal lines. Harmony-chords with\n    diagonal or horizontal arrangement are separated by diagonal lines\n    or slashes.\n\n    :ivar root:\n    :ivar numeral:\n    :ivar function: The function element represents classical functional\n        harmony with an indication like I, II, III rather than C, D, E.\n        It represents the Roman numeral part of a functional harmony\n        rather than the complete function itself. It has been deprecated\n        as of MusicXML 4.0 in favor of the numeral element.\n    :ivar kind:\n    :ivar inversion:\n    :ivar bass:\n    :ivar degree:\n    :ivar frame:\n    :ivar offset:\n    :ivar footnote:\n    :ivar level:\n    :ivar staff: Staff assignment is only needed for music notated on\n        multiple staves. Used by both notes and directions. Staff values\n        are numbers, with 1 referring to the top-most staff in a part.\n    :ivar type:\n    :ivar print_object:\n    :ivar print_frame:\n    :ivar arrangement:\n    :ivar default_x:\n    :ivar default_y:\n    :ivar relative_x:\n    :ivar relative_y:\n    :ivar font_family:\n    :ivar font_style:\n    :ivar font_size:\n    :ivar font_weight:\n    :ivar color:\n    :ivar placement:\n    :ivar system:\n    :ivar id:\n    \"\"\"\n    class Meta:\n        name = \"harmony\"\n\n    root: List[Root] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n            \"sequential\": True,\n        }\n    )\n    numeral: List[Numeral] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n            \"sequential\": True,\n        }\n    )\n    function: List[StyleText] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n            \"sequential\": True,\n        }\n    )\n    kind: List[Kind] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n            \"min_occurs\": 1,\n            \"sequential\": True,\n        }\n    )\n    inversion: List[Inversion] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n            \"sequential\": True,\n        }\n    )\n    bass: List[Bass] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n            \"sequential\": True,\n        }\n    )\n    degree: List[Degree] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    frame: Optional[Frame] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    offset: Optional[Offset] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    footnote: Optional[FormattedText] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    level: Optional[Level] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    staff: Optional[int] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    type: Optional[HarmonyType] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    print_object: Optional[YesNo] = field(\n        default=None,\n        metadata={\n            \"name\": \"print-object\",\n            \"type\": \"Attribute\",\n        }\n    )\n    print_frame: Optional[YesNo] = field(\n        default=None,\n        metadata={\n            \"name\": \"print-frame\",\n            \"type\": \"Attribute\",\n        }\n    )\n    arrangement: Optional[HarmonyArrangement] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    default_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    default_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_family: Optional[str] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-family\",\n            \"type\": \"Attribute\",\n            \"pattern\": r\"[^,]+(, ?[^,]+)*\",\n        }\n    )\n    font_style: Optional[FontStyle] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-style\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_size: Optional[Union[Decimal, CssFontSize]] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-size\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_weight: Optional[FontWeight] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-weight\",\n            \"type\": \"Attribute\",\n        }\n    )\n    color: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"pattern\": r\"#[\\dA-F]{6}([\\dA-F][\\dA-F])?\",\n        }\n    )\n    placement: Optional[AboveBelow] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    system: Optional[SystemRelation] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    id: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass Metronome:\n    \"\"\"The metronome type represents metronome marks and other metric\n    relationships.\n\n    The beat-unit group and per-minute element specify regular metronome\n    marks. The metronome-note and metronome-relation elements allow for\n    the specification of metric modulations and other metric\n    relationships, such as swing tempo marks where two eighths are\n    equated to a quarter note / eighth note triplet. Tied notes can be\n    represented in both types of metronome marks by using the beat-unit-\n    tied and metronome-tied elements. The parentheses attribute\n    indicates whether or not to put the metronome mark in parentheses;\n    its value is no if not specified. The print-object attribute is set\n    to no in cases where the metronome element represents a relationship\n    or range that is not displayed in the music notation.\n\n    :ivar beat_unit: The beat-unit element indicates the graphical note\n        type to use in a metronome mark.\n    :ivar beat_unit_dot: The beat-unit-dot element is used to specify\n        any augmentation dots for a metronome mark note.\n    :ivar beat_unit_tied:\n    :ivar per_minute:\n    :ivar metronome_arrows: If the metronome-arrows element is present,\n        it indicates that metric modulation arrows are displayed on both\n        sides of the metronome mark.\n    :ivar metronome_note:\n    :ivar metronome_relation: The metronome-relation element describes\n        the relationship symbol that goes between the two sets of\n        metronome-note elements. The currently allowed value is equals,\n        but this may expand in future versions. If the element is empty,\n        the equals value is used.\n    :ivar default_x:\n    :ivar default_y:\n    :ivar relative_x:\n    :ivar relative_y:\n    :ivar font_family:\n    :ivar font_style:\n    :ivar font_size:\n    :ivar font_weight:\n    :ivar color:\n    :ivar halign:\n    :ivar valign:\n    :ivar print_object:\n    :ivar justify:\n    :ivar parentheses:\n    :ivar id:\n    \"\"\"\n    class Meta:\n        name = \"metronome\"\n\n    beat_unit: List[NoteTypeValue] = field(\n        default_factory=list,\n        metadata={\n            \"name\": \"beat-unit\",\n            \"type\": \"Element\",\n            \"max_occurs\": 2,\n        }\n    )\n    beat_unit_dot: List[Empty] = field(\n        default_factory=list,\n        metadata={\n            \"name\": \"beat-unit-dot\",\n            \"type\": \"Element\",\n        }\n    )\n    beat_unit_tied: List[BeatUnitTied] = field(\n        default_factory=list,\n        metadata={\n            \"name\": \"beat-unit-tied\",\n            \"type\": \"Element\",\n        }\n    )\n    per_minute: Optional[PerMinute] = field(\n        default=None,\n        metadata={\n            \"name\": \"per-minute\",\n            \"type\": \"Element\",\n        }\n    )\n    metronome_arrows: Optional[Empty] = field(\n        default=None,\n        metadata={\n            \"name\": \"metronome-arrows\",\n            \"type\": \"Element\",\n        }\n    )\n    metronome_note: List[MetronomeNote] = field(\n        default_factory=list,\n        metadata={\n            \"name\": \"metronome-note\",\n            \"type\": \"Element\",\n        }\n    )\n    metronome_relation: Optional[str] = field(\n        default=None,\n        metadata={\n            \"name\": \"metronome-relation\",\n            \"type\": \"Element\",\n        }\n    )\n    default_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    default_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_family: Optional[str] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-family\",\n            \"type\": \"Attribute\",\n            \"pattern\": r\"[^,]+(, ?[^,]+)*\",\n        }\n    )\n    font_style: Optional[FontStyle] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-style\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_size: Optional[Union[Decimal, CssFontSize]] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-size\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_weight: Optional[FontWeight] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-weight\",\n            \"type\": \"Attribute\",\n        }\n    )\n    color: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"pattern\": r\"#[\\dA-F]{6}([\\dA-F][\\dA-F])?\",\n        }\n    )\n    halign: Optional[LeftCenterRight] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    valign: Optional[Valign] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    print_object: Optional[YesNo] = field(\n        default=None,\n        metadata={\n            \"name\": \"print-object\",\n            \"type\": \"Attribute\",\n        }\n    )\n    justify: Optional[LeftCenterRight] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    parentheses: Optional[YesNo] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    id: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass Notations:\n    \"\"\"Notations refer to musical notations, not XML notations.\n\n    Multiple notations are allowed in order to represent multiple\n    editorial levels. The print-object attribute, added in Version 3.0,\n    allows notations to represent details of performance technique, such\n    as fingerings, without having them appear in the score.\n    \"\"\"\n    class Meta:\n        name = \"notations\"\n\n    footnote: Optional[FormattedText] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    level: Optional[Level] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    tied: List[Tied] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n            \"sequential\": True,\n        }\n    )\n    slur: List[Slur] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n            \"sequential\": True,\n        }\n    )\n    tuplet: List[Tuplet] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n            \"sequential\": True,\n        }\n    )\n    glissando: List[Glissando] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n            \"sequential\": True,\n        }\n    )\n    slide: List[Slide] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n            \"sequential\": True,\n        }\n    )\n    ornaments: List[Ornaments] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n            \"sequential\": True,\n        }\n    )\n    technical: List[Technical] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n            \"sequential\": True,\n        }\n    )\n    articulations: List[Articulations] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n            \"sequential\": True,\n        }\n    )\n    dynamics: List[Dynamics] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n            \"sequential\": True,\n        }\n    )\n    fermata: List[Fermata] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n            \"sequential\": True,\n        }\n    )\n    arpeggiate: List[Arpeggiate] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n            \"sequential\": True,\n        }\n    )\n    non_arpeggiate: List[NonArpeggiate] = field(\n        default_factory=list,\n        metadata={\n            \"name\": \"non-arpeggiate\",\n            \"type\": \"Element\",\n            \"sequential\": True,\n        }\n    )\n    accidental_mark: List[AccidentalMark] = field(\n        default_factory=list,\n        metadata={\n            \"name\": \"accidental-mark\",\n            \"type\": \"Element\",\n            \"sequential\": True,\n        }\n    )\n    other_notation: List[OtherNotation] = field(\n        default_factory=list,\n        metadata={\n            \"name\": \"other-notation\",\n            \"type\": \"Element\",\n            \"sequential\": True,\n        }\n    )\n    print_object: Optional[YesNo] = field(\n        default=None,\n        metadata={\n            \"name\": \"print-object\",\n            \"type\": \"Attribute\",\n        }\n    )\n    id: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass Print:\n    \"\"\"The print type contains general printing parameters, including layout\n    elements.\n\n    The part-name-display and part-abbreviation-display elements may\n    also be used here to change how a part name or abbreviation is\n    displayed over the course of a piece. They take effect when the\n    current measure or a succeeding measure starts a new system. Layout\n    group elements in a print element only apply to the current page,\n    system, or staff. Music that follows continues to take the default\n    values from the layout determined by the defaults element.\n    \"\"\"\n    class Meta:\n        name = \"print\"\n\n    page_layout: Optional[PageLayout] = field(\n        default=None,\n        metadata={\n            \"name\": \"page-layout\",\n            \"type\": \"Element\",\n        }\n    )\n    system_layout: Optional[SystemLayout] = field(\n        default=None,\n        metadata={\n            \"name\": \"system-layout\",\n            \"type\": \"Element\",\n        }\n    )\n    staff_layout: List[StaffLayout] = field(\n        default_factory=list,\n        metadata={\n            \"name\": \"staff-layout\",\n            \"type\": \"Element\",\n        }\n    )\n    measure_layout: Optional[MeasureLayout] = field(\n        default=None,\n        metadata={\n            \"name\": \"measure-layout\",\n            \"type\": \"Element\",\n        }\n    )\n    measure_numbering: Optional[MeasureNumbering] = field(\n        default=None,\n        metadata={\n            \"name\": \"measure-numbering\",\n            \"type\": \"Element\",\n        }\n    )\n    part_name_display: Optional[NameDisplay] = field(\n        default=None,\n        metadata={\n            \"name\": \"part-name-display\",\n            \"type\": \"Element\",\n        }\n    )\n    part_abbreviation_display: Optional[NameDisplay] = field(\n        default=None,\n        metadata={\n            \"name\": \"part-abbreviation-display\",\n            \"type\": \"Element\",\n        }\n    )\n    staff_spacing: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"staff-spacing\",\n            \"type\": \"Attribute\",\n        }\n    )\n    new_system: Optional[YesNo] = field(\n        default=None,\n        metadata={\n            \"name\": \"new-system\",\n            \"type\": \"Attribute\",\n        }\n    )\n    new_page: Optional[YesNo] = field(\n        default=None,\n        metadata={\n            \"name\": \"new-page\",\n            \"type\": \"Attribute\",\n        }\n    )\n    blank_page: Optional[int] = field(\n        default=None,\n        metadata={\n            \"name\": \"blank-page\",\n            \"type\": \"Attribute\",\n        }\n    )\n    page_number: Optional[str] = field(\n        default=None,\n        metadata={\n            \"name\": \"page-number\",\n            \"type\": \"Attribute\",\n        }\n    )\n    id: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass ScorePart:\n    \"\"\"The score-part type collects part-wide information for each part in a\n    score.\n\n    Often, each MusicXML part corresponds to a track in a Standard MIDI\n    Format 1 file. In this case, the midi-device element is used to make\n    a MIDI device or port assignment for the given track or specific\n    MIDI instruments. Initial midi-instrument assignments may be made\n    here as well. The score-instrument elements are used when there are\n    multiple instruments per track.\n\n    :ivar identification:\n    :ivar part_link:\n    :ivar part_name:\n    :ivar part_name_display:\n    :ivar part_abbreviation:\n    :ivar part_abbreviation_display:\n    :ivar group: The group element allows the use of different versions\n        of the part for different purposes. Typical values include\n        score, parts, sound, and data. Ordering information can be\n        derived from the ordering within a MusicXML score or opus.\n    :ivar score_instrument:\n    :ivar player:\n    :ivar midi_device:\n    :ivar midi_instrument:\n    :ivar id:\n    \"\"\"\n    class Meta:\n        name = \"score-part\"\n\n    identification: Optional[Identification] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    part_link: List[PartLink] = field(\n        default_factory=list,\n        metadata={\n            \"name\": \"part-link\",\n            \"type\": \"Element\",\n        }\n    )\n    part_name: Optional[PartName] = field(\n        default=None,\n        metadata={\n            \"name\": \"part-name\",\n            \"type\": \"Element\",\n            \"required\": True,\n        }\n    )\n    part_name_display: Optional[NameDisplay] = field(\n        default=None,\n        metadata={\n            \"name\": \"part-name-display\",\n            \"type\": \"Element\",\n        }\n    )\n    part_abbreviation: Optional[PartName] = field(\n        default=None,\n        metadata={\n            \"name\": \"part-abbreviation\",\n            \"type\": \"Element\",\n        }\n    )\n    part_abbreviation_display: Optional[NameDisplay] = field(\n        default=None,\n        metadata={\n            \"name\": \"part-abbreviation-display\",\n            \"type\": \"Element\",\n        }\n    )\n    group: List[str] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    score_instrument: List[ScoreInstrument] = field(\n        default_factory=list,\n        metadata={\n            \"name\": \"score-instrument\",\n            \"type\": \"Element\",\n        }\n    )\n    player: List[Player] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    midi_device: List[MidiDevice] = field(\n        default_factory=list,\n        metadata={\n            \"name\": \"midi-device\",\n            \"type\": \"Element\",\n            \"sequential\": True,\n        }\n    )\n    midi_instrument: List[MidiInstrument] = field(\n        default_factory=list,\n        metadata={\n            \"name\": \"midi-instrument\",\n            \"type\": \"Element\",\n            \"sequential\": True,\n        }\n    )\n    id: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"required\": True,\n        }\n    )\n\n\n@dataclass\nclass DirectionType:\n    \"\"\"Textual direction types may have more than 1 component due to multiple\n    fonts.\n\n    The dynamics element may also be used in the notations element.\n    Attribute groups related to print suggestions apply to the\n    individual direction-type, not to the overall direction.\n\n    :ivar rehearsal: The rehearsal element specifies letters, numbers,\n        and section names that are notated in the score for reference\n        during rehearsal. The enclosure is square if not specified. The\n        language is Italian (\"it\") if not specified. Left justification\n        is used if not specified.\n    :ivar segno:\n    :ivar coda:\n    :ivar words: The words element specifies a standard text direction.\n        The enclosure is none if not specified. The language is Italian\n        (\"it\") if not specified. Left justification is used if not\n        specified.\n    :ivar symbol: The symbol element specifies a musical symbol using a\n        canonical SMuFL glyph name. It is used when an occasional\n        musical symbol is interspersed into text. It should not be used\n        in place of semantic markup, such as metronome marks that mix\n        text and symbols. Left justification is used if not specified.\n        Enclosure is none if not specified.\n    :ivar wedge:\n    :ivar dynamics:\n    :ivar dashes:\n    :ivar bracket:\n    :ivar pedal:\n    :ivar metronome:\n    :ivar octave_shift:\n    :ivar harp_pedals:\n    :ivar damp: The damp element specifies a harp damping mark.\n    :ivar damp_all: The damp-all element specifies a harp damping mark\n        for all strings.\n    :ivar eyeglasses: The eyeglasses element represents the eyeglasses\n        symbol, common in commercial music.\n    :ivar string_mute:\n    :ivar scordatura:\n    :ivar image:\n    :ivar principal_voice:\n    :ivar percussion:\n    :ivar accordion_registration:\n    :ivar staff_divide:\n    :ivar other_direction:\n    :ivar id:\n    \"\"\"\n    class Meta:\n        name = \"direction-type\"\n\n    rehearsal: List[FormattedTextId] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    segno: List[Segno] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    coda: List[Coda] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    words: List[FormattedTextId] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    symbol: List[FormattedSymbolId] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    wedge: Optional[Wedge] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    dynamics: List[Dynamics] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    dashes: Optional[Dashes] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    bracket: Optional[Bracket] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    pedal: Optional[Pedal] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    metronome: Optional[Metronome] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    octave_shift: Optional[OctaveShift] = field(\n        default=None,\n        metadata={\n            \"name\": \"octave-shift\",\n            \"type\": \"Element\",\n        }\n    )\n    harp_pedals: Optional[HarpPedals] = field(\n        default=None,\n        metadata={\n            \"name\": \"harp-pedals\",\n            \"type\": \"Element\",\n        }\n    )\n    damp: Optional[EmptyPrintStyleAlignId] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    damp_all: Optional[EmptyPrintStyleAlignId] = field(\n        default=None,\n        metadata={\n            \"name\": \"damp-all\",\n            \"type\": \"Element\",\n        }\n    )\n    eyeglasses: Optional[EmptyPrintStyleAlignId] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    string_mute: Optional[StringMute] = field(\n        default=None,\n        metadata={\n            \"name\": \"string-mute\",\n            \"type\": \"Element\",\n        }\n    )\n    scordatura: Optional[Scordatura] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    image: Optional[Image] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    principal_voice: Optional[PrincipalVoice] = field(\n        default=None,\n        metadata={\n            \"name\": \"principal-voice\",\n            \"type\": \"Element\",\n        }\n    )\n    percussion: List[Percussion] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    accordion_registration: Optional[AccordionRegistration] = field(\n        default=None,\n        metadata={\n            \"name\": \"accordion-registration\",\n            \"type\": \"Element\",\n        }\n    )\n    staff_divide: Optional[StaffDivide] = field(\n        default=None,\n        metadata={\n            \"name\": \"staff-divide\",\n            \"type\": \"Element\",\n        }\n    )\n    other_direction: Optional[OtherDirection] = field(\n        default=None,\n        metadata={\n            \"name\": \"other-direction\",\n            \"type\": \"Element\",\n        }\n    )\n    id: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass Note:\n    \"\"\"Notes are the most common type of MusicXML data. The MusicXML format\n    distinguishes between elements used for sound information and elements used\n    for notation information (e.g., tie is used for sound, tied for notation).\n    Thus grace notes do not have a duration element. Cue notes have a duration\n    element, as do forward elements, but no tie elements. Having these two\n    types of information available can make interchange easier, as some\n    programs handle one type of information more readily than the other. The\n    print-leger attribute is used to indicate whether leger lines are printed.\n    Notes without leger lines are used to indicate indeterminate high and low\n    notes. By default, it is set to yes. If print-object is set to no, print-\n    leger is interpreted to also be set to no if not present. This attribute is\n    ignored for rests. The dynamics and end-dynamics attributes correspond to\n    MIDI 1.0's Note On and Note Off velocities, respectively. They are\n    expressed in terms of percentages of the default forte value (90 for MIDI\n    1.0).\n\n    The attack and release attributes are used to alter the starting and stopping time of the note from when it would otherwise occur based on the flow of durations - information that is specific to a performance. They are expressed in terms of divisions, either positive or negative. A note that starts a tie should not have a release attribute, and a note that stops a tie should not have an attack attribute. The attack and release attributes are independent of each other. The attack attribute only changes the starting time of a note, and the release attribute only changes the stopping time of a note.\n    If a note is played only particular times through a repeat, the time-only attribute shows which times to play the note.\n    The pizzicato attribute is used when just this note is sounded pizzicato, vs. the pizzicato element which changes overall playback between pizzicato and arco.\n\n    :ivar grace:\n    :ivar chord: The chord element indicates that this note is an\n        additional chord tone with the preceding note. The duration of a\n        chord note does not move the musical position within a measure.\n        That is done by the duration of the first preceding note without\n        a chord element. Thus the duration of a chord note cannot be\n        longer than the preceding note. In most cases the duration will\n        be the same as the preceding note. However it can be shorter in\n        situations such as multiple stops for string instruments.\n    :ivar pitch:\n    :ivar unpitched:\n    :ivar rest:\n    :ivar tie:\n    :ivar cue: The cue element indicates the presence of a cue note. In\n        MusicXML, a cue note is a silent note with no playback. Normal\n        notes that play can be specified as cue size using the type\n        element. A cue note that is specified as full size using the\n        type element will still remain silent.\n    :ivar duration: Duration is a positive number specified in division\n        units. This is the intended duration vs. notated duration (for\n        instance, differences in dotted notes in Baroque-era music).\n        Differences in duration specific to an interpretation or\n        performance should be represented using the note element's\n        attack and release attributes. The duration element moves the\n        musical position when used in backup elements, forward elements,\n        and note elements that do not contain a chord child element.\n    :ivar instrument:\n    :ivar footnote:\n    :ivar level:\n    :ivar voice:\n    :ivar type:\n    :ivar dot: One dot element is used for each dot of prolongation. The\n        placement attribute is used to specify whether the dot should\n        appear above or below the staff line. It is ignored for notes\n        that appear on a staff space.\n    :ivar accidental:\n    :ivar time_modification:\n    :ivar stem:\n    :ivar notehead:\n    :ivar notehead_text:\n    :ivar staff: Staff assignment is only needed for music notated on\n        multiple staves. Used by both notes and directions. Staff values\n        are numbers, with 1 referring to the top-most staff in a part.\n    :ivar beam:\n    :ivar notations:\n    :ivar lyric:\n    :ivar play:\n    :ivar listen:\n    :ivar default_x:\n    :ivar default_y:\n    :ivar relative_x:\n    :ivar relative_y:\n    :ivar font_family:\n    :ivar font_style:\n    :ivar font_size:\n    :ivar font_weight:\n    :ivar color:\n    :ivar print_object:\n    :ivar print_dot:\n    :ivar print_spacing:\n    :ivar print_lyric:\n    :ivar print_leger:\n    :ivar dynamics:\n    :ivar end_dynamics:\n    :ivar attack:\n    :ivar release:\n    :ivar time_only:\n    :ivar pizzicato:\n    :ivar id:\n    \"\"\"\n    class Meta:\n        name = \"note\"\n\n    grace: Optional[Grace] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    chord: List[Empty] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n            \"max_occurs\": 4,\n            \"sequential\": True,\n        }\n    )\n    pitch: List[Pitch] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n            \"max_occurs\": 4,\n            \"sequential\": True,\n        }\n    )\n    unpitched: List[Unpitched] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n            \"max_occurs\": 4,\n            \"sequential\": True,\n        }\n    )\n    rest: List[Rest] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n            \"max_occurs\": 4,\n            \"sequential\": True,\n        }\n    )\n    tie: List[Tie] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n            \"max_occurs\": 4,\n        }\n    )\n    cue: List[Empty] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n            \"max_occurs\": 2,\n            \"sequential\": True,\n        }\n    )\n    duration: List[Decimal] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n            \"max_occurs\": 2,\n            \"min_exclusive\": Decimal(\"0\"),\n            \"sequential\": True,\n        }\n    )\n    instrument: List[Instrument] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    footnote: Optional[FormattedText] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    level: Optional[Level] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    voice: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    type: Optional[NoteType] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    dot: List[EmptyPlacement] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    accidental: Optional[Accidental] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    time_modification: Optional[TimeModification] = field(\n        default=None,\n        metadata={\n            \"name\": \"time-modification\",\n            \"type\": \"Element\",\n        }\n    )\n    stem: Optional[Stem] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    notehead: Optional[Notehead] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    notehead_text: Optional[NoteheadText] = field(\n        default=None,\n        metadata={\n            \"name\": \"notehead-text\",\n            \"type\": \"Element\",\n        }\n    )\n    staff: Optional[int] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    beam: List[Beam] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n            \"max_occurs\": 8,\n        }\n    )\n    notations: List[Notations] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    lyric: List[Lyric] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    play: Optional[Play] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    listen: Optional[Listen] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    default_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    default_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"default-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_x: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-x\",\n            \"type\": \"Attribute\",\n        }\n    )\n    relative_y: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"relative-y\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_family: Optional[str] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-family\",\n            \"type\": \"Attribute\",\n            \"pattern\": r\"[^,]+(, ?[^,]+)*\",\n        }\n    )\n    font_style: Optional[FontStyle] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-style\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_size: Optional[Union[Decimal, CssFontSize]] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-size\",\n            \"type\": \"Attribute\",\n        }\n    )\n    font_weight: Optional[FontWeight] = field(\n        default=None,\n        metadata={\n            \"name\": \"font-weight\",\n            \"type\": \"Attribute\",\n        }\n    )\n    color: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"pattern\": r\"#[\\dA-F]{6}([\\dA-F][\\dA-F])?\",\n        }\n    )\n    print_object: Optional[YesNo] = field(\n        default=None,\n        metadata={\n            \"name\": \"print-object\",\n            \"type\": \"Attribute\",\n        }\n    )\n    print_dot: Optional[YesNo] = field(\n        default=None,\n        metadata={\n            \"name\": \"print-dot\",\n            \"type\": \"Attribute\",\n        }\n    )\n    print_spacing: Optional[YesNo] = field(\n        default=None,\n        metadata={\n            \"name\": \"print-spacing\",\n            \"type\": \"Attribute\",\n        }\n    )\n    print_lyric: Optional[YesNo] = field(\n        default=None,\n        metadata={\n            \"name\": \"print-lyric\",\n            \"type\": \"Attribute\",\n        }\n    )\n    print_leger: Optional[YesNo] = field(\n        default=None,\n        metadata={\n            \"name\": \"print-leger\",\n            \"type\": \"Attribute\",\n        }\n    )\n    dynamics: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n            \"min_inclusive\": Decimal(\"0\"),\n        }\n    )\n    end_dynamics: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"name\": \"end-dynamics\",\n            \"type\": \"Attribute\",\n            \"min_inclusive\": Decimal(\"0\"),\n        }\n    )\n    attack: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    release: Optional[Decimal] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    time_only: Optional[str] = field(\n        default=None,\n        metadata={\n            \"name\": \"time-only\",\n            \"type\": \"Attribute\",\n            \"pattern\": r\"[1-9][0-9]*(, ?[1-9][0-9]*)*\",\n        }\n    )\n    pizzicato: Optional[YesNo] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    id: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass PartList:\n    \"\"\"The part-list identifies the different musical parts in this document.\n\n    Each part has an ID that is used later within the musical data.\n    Since parts may be encoded separately and combined later,\n    identification elements are present at both the score and score-part\n    levels. There must be at least one score-part, combined as desired\n    with part-group elements that indicate braces and brackets. Parts\n    are ordered from top to bottom in a score based on the order in\n    which they appear in the part-list.\n\n    :ivar part_group:\n    :ivar score_part: Each MusicXML part corresponds to a track in a\n        Standard MIDI Format 1 file. The score-instrument elements are\n        used when there are multiple instruments per track. The midi-\n        device element is used to make a MIDI device or port assignment\n        for the given track. Initial midi-instrument assignments may be\n        made here as well.\n    \"\"\"\n    class Meta:\n        name = \"part-list\"\n\n    part_group: List[PartGroup] = field(\n        default_factory=list,\n        metadata={\n            \"name\": \"part-group\",\n            \"type\": \"Element\",\n            \"sequential\": True,\n        }\n    )\n    score_part: List[ScorePart] = field(\n        default_factory=list,\n        metadata={\n            \"name\": \"score-part\",\n            \"type\": \"Element\",\n            \"sequential\": True,\n        }\n    )\n\n\n@dataclass\nclass Direction:\n    \"\"\"A direction is a musical indication that is not necessarily attached to\n    a specific note.\n\n    Two or more may be combined to indicate words followed by the start\n    of a dashed line, the end of a wedge followed by dynamics, etc. For\n    applications where a specific direction is indeed attached to a\n    specific note, the direction element can be associated with the\n    first note element that follows it in score order that is not in a\n    different voice. By default, a series of direction-type elements and\n    a series of child elements of a direction-type within a single\n    direction element follow one another in sequence visually. For a\n    series of direction-type children, non-positional formatting\n    attributes are carried over from the previous element by default.\n\n    :ivar direction_type:\n    :ivar offset:\n    :ivar footnote:\n    :ivar level:\n    :ivar voice:\n    :ivar staff: Staff assignment is only needed for music notated on\n        multiple staves. Used by both notes and directions. Staff values\n        are numbers, with 1 referring to the top-most staff in a part.\n    :ivar sound:\n    :ivar listening:\n    :ivar placement:\n    :ivar directive:\n    :ivar system:\n    :ivar id:\n    \"\"\"\n    class Meta:\n        name = \"direction\"\n\n    direction_type: List[DirectionType] = field(\n        default_factory=list,\n        metadata={\n            \"name\": \"direction-type\",\n            \"type\": \"Element\",\n            \"min_occurs\": 1,\n        }\n    )\n    offset: Optional[Offset] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    footnote: Optional[FormattedText] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    level: Optional[Level] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    voice: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    staff: Optional[int] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    sound: Optional[Sound] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    listening: Optional[Listening] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    placement: Optional[AboveBelow] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    directive: Optional[YesNo] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    system: Optional[SystemRelation] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n    id: Optional[str] = field(\n        default=None,\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n\n@dataclass\nclass ScorePartwise:\n    \"\"\"The score-partwise element is the root element for a partwise MusicXML\n    score.\n\n    It includes a score-header group followed by a series of parts with\n    measures inside. The document-attributes attribute group includes\n    the version attribute.\n\n    :ivar work:\n    :ivar movement_number: The movement-number element specifies the\n        number of a movement.\n    :ivar movement_title: The movement-title element specifies the title\n        of a movement, not including its number.\n    :ivar identification:\n    :ivar defaults:\n    :ivar credit:\n    :ivar part_list:\n    :ivar part:\n    :ivar version:\n    \"\"\"\n    class Meta:\n        name = \"score-partwise\"\n\n    work: Optional[Work] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    movement_number: Optional[str] = field(\n        default=None,\n        metadata={\n            \"name\": \"movement-number\",\n            \"type\": \"Element\",\n        }\n    )\n    movement_title: Optional[str] = field(\n        default=None,\n        metadata={\n            \"name\": \"movement-title\",\n            \"type\": \"Element\",\n        }\n    )\n    identification: Optional[Identification] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    defaults: Optional[Defaults] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    credit: List[Credit] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    part_list: Optional[PartList] = field(\n        default=None,\n        metadata={\n            \"name\": \"part-list\",\n            \"type\": \"Element\",\n            \"required\": True,\n        }\n    )\n    part: List[\"ScorePartwise.Part\"] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n            \"min_occurs\": 1,\n        }\n    )\n    version: str = field(\n        default=\"1.0\",\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n    @dataclass\n    class Part:\n        measure: List[\"ScorePartwise.Part.Measure\"] = field(\n            default_factory=list,\n            metadata={\n                \"type\": \"Element\",\n                \"min_occurs\": 1,\n            }\n        )\n        id: Optional[str] = field(\n            default=None,\n            metadata={\n                \"type\": \"Attribute\",\n                \"required\": True,\n            }\n        )\n\n        @dataclass\n        class Measure:\n            note: List[Note] = field(\n                default_factory=list,\n                metadata={\n                    \"type\": \"Element\",\n                    \"sequential\": True,\n                }\n            )\n            backup: List[Backup] = field(\n                default_factory=list,\n                metadata={\n                    \"type\": \"Element\",\n                    \"sequential\": True,\n                }\n            )\n            forward: List[Forward] = field(\n                default_factory=list,\n                metadata={\n                    \"type\": \"Element\",\n                    \"sequential\": True,\n                }\n            )\n            direction: List[Direction] = field(\n                default_factory=list,\n                metadata={\n                    \"type\": \"Element\",\n                    \"sequential\": True,\n                }\n            )\n            attributes: List[Attributes] = field(\n                default_factory=list,\n                metadata={\n                    \"type\": \"Element\",\n                    \"sequential\": True,\n                }\n            )\n            harmony: List[Harmony] = field(\n                default_factory=list,\n                metadata={\n                    \"type\": \"Element\",\n                    \"sequential\": True,\n                }\n            )\n            figured_bass: List[FiguredBass] = field(\n                default_factory=list,\n                metadata={\n                    \"name\": \"figured-bass\",\n                    \"type\": \"Element\",\n                    \"sequential\": True,\n                }\n            )\n            print: List[Print] = field(\n                default_factory=list,\n                metadata={\n                    \"type\": \"Element\",\n                    \"sequential\": True,\n                }\n            )\n            sound: List[Sound] = field(\n                default_factory=list,\n                metadata={\n                    \"type\": \"Element\",\n                    \"sequential\": True,\n                }\n            )\n            listening: List[Listening] = field(\n                default_factory=list,\n                metadata={\n                    \"type\": \"Element\",\n                    \"sequential\": True,\n                }\n            )\n            barline: List[Barline] = field(\n                default_factory=list,\n                metadata={\n                    \"type\": \"Element\",\n                    \"sequential\": True,\n                }\n            )\n            grouping: List[Grouping] = field(\n                default_factory=list,\n                metadata={\n                    \"type\": \"Element\",\n                    \"sequential\": True,\n                }\n            )\n            link: List[Link] = field(\n                default_factory=list,\n                metadata={\n                    \"type\": \"Element\",\n                    \"sequential\": True,\n                }\n            )\n            bookmark: List[Bookmark] = field(\n                default_factory=list,\n                metadata={\n                    \"type\": \"Element\",\n                    \"sequential\": True,\n                }\n            )\n            number: Optional[str] = field(\n                default=None,\n                metadata={\n                    \"type\": \"Attribute\",\n                    \"required\": True,\n                }\n            )\n            text: Optional[str] = field(\n                default=None,\n                metadata={\n                    \"type\": \"Attribute\",\n                    \"min_length\": 1,\n                }\n            )\n            implicit: Optional[YesNo] = field(\n                default=None,\n                metadata={\n                    \"type\": \"Attribute\",\n                }\n            )\n            non_controlling: Optional[YesNo] = field(\n                default=None,\n                metadata={\n                    \"name\": \"non-controlling\",\n                    \"type\": \"Attribute\",\n                }\n            )\n            width: Optional[Decimal] = field(\n                default=None,\n                metadata={\n                    \"type\": \"Attribute\",\n                }\n            )\n            id: Optional[str] = field(\n                default=None,\n                metadata={\n                    \"type\": \"Attribute\",\n                }\n            )\n\n\n@dataclass\nclass ScoreTimewise:\n    \"\"\"The score-timewise element is the root element for a timewise MusicXML\n    score.\n\n    It includes a score-header group followed by a series of measures\n    with parts inside. The document-attributes attribute group includes\n    the version attribute.\n\n    :ivar work:\n    :ivar movement_number: The movement-number element specifies the\n        number of a movement.\n    :ivar movement_title: The movement-title element specifies the title\n        of a movement, not including its number.\n    :ivar identification:\n    :ivar defaults:\n    :ivar credit:\n    :ivar part_list:\n    :ivar measure:\n    :ivar version:\n    \"\"\"\n    class Meta:\n        name = \"score-timewise\"\n\n    work: Optional[Work] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    movement_number: Optional[str] = field(\n        default=None,\n        metadata={\n            \"name\": \"movement-number\",\n            \"type\": \"Element\",\n        }\n    )\n    movement_title: Optional[str] = field(\n        default=None,\n        metadata={\n            \"name\": \"movement-title\",\n            \"type\": \"Element\",\n        }\n    )\n    identification: Optional[Identification] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    defaults: Optional[Defaults] = field(\n        default=None,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    credit: List[Credit] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n        }\n    )\n    part_list: Optional[PartList] = field(\n        default=None,\n        metadata={\n            \"name\": \"part-list\",\n            \"type\": \"Element\",\n            \"required\": True,\n        }\n    )\n    measure: List[\"ScoreTimewise.Measure\"] = field(\n        default_factory=list,\n        metadata={\n            \"type\": \"Element\",\n            \"min_occurs\": 1,\n        }\n    )\n    version: str = field(\n        default=\"1.0\",\n        metadata={\n            \"type\": \"Attribute\",\n        }\n    )\n\n    @dataclass\n    class Measure:\n        part: List[\"ScoreTimewise.Measure.Part\"] = field(\n            default_factory=list,\n            metadata={\n                \"type\": \"Element\",\n                \"min_occurs\": 1,\n            }\n        )\n        number: Optional[str] = field(\n            default=None,\n            metadata={\n                \"type\": \"Attribute\",\n                \"required\": True,\n            }\n        )\n        text: Optional[str] = field(\n            default=None,\n            metadata={\n                \"type\": \"Attribute\",\n                \"min_length\": 1,\n            }\n        )\n        implicit: Optional[YesNo] = field(\n            default=None,\n            metadata={\n                \"type\": \"Attribute\",\n            }\n        )\n        non_controlling: Optional[YesNo] = field(\n            default=None,\n            metadata={\n                \"name\": \"non-controlling\",\n                \"type\": \"Attribute\",\n            }\n        )\n        width: Optional[Decimal] = field(\n            default=None,\n            metadata={\n                \"type\": \"Attribute\",\n            }\n        )\n        id: Optional[str] = field(\n            default=None,\n            metadata={\n                \"type\": \"Attribute\",\n            }\n        )\n\n        @dataclass\n        class Part:\n            note: List[Note] = field(\n                default_factory=list,\n                metadata={\n                    \"type\": \"Element\",\n                    \"sequential\": True,\n                }\n            )\n            backup: List[Backup] = field(\n                default_factory=list,\n                metadata={\n                    \"type\": \"Element\",\n                    \"sequential\": True,\n                }\n            )\n            forward: List[Forward] = field(\n                default_factory=list,\n                metadata={\n                    \"type\": \"Element\",\n                    \"sequential\": True,\n                }\n            )\n            direction: List[Direction] = field(\n                default_factory=list,\n                metadata={\n                    \"type\": \"Element\",\n                    \"sequential\": True,\n                }\n            )\n            attributes: List[Attributes] = field(\n                default_factory=list,\n                metadata={\n                    \"type\": \"Element\",\n                    \"sequential\": True,\n                }\n            )\n            harmony: List[Harmony] = field(\n                default_factory=list,\n                metadata={\n                    \"type\": \"Element\",\n                    \"sequential\": True,\n                }\n            )\n            figured_bass: List[FiguredBass] = field(\n                default_factory=list,\n                metadata={\n                    \"name\": \"figured-bass\",\n                    \"type\": \"Element\",\n                    \"sequential\": True,\n                }\n            )\n            print: List[Print] = field(\n                default_factory=list,\n                metadata={\n                    \"type\": \"Element\",\n                    \"sequential\": True,\n                }\n            )\n            sound: List[Sound] = field(\n                default_factory=list,\n                metadata={\n                    \"type\": \"Element\",\n                    \"sequential\": True,\n                }\n            )\n            listening: List[Listening] = field(\n                default_factory=list,\n                metadata={\n                    \"type\": \"Element\",\n                    \"sequential\": True,\n                }\n            )\n            barline: List[Barline] = field(\n                default_factory=list,\n                metadata={\n                    \"type\": \"Element\",\n                    \"sequential\": True,\n                }\n            )\n            grouping: List[Grouping] = field(\n                default_factory=list,\n                metadata={\n                    \"type\": \"Element\",\n                    \"sequential\": True,\n                }\n            )\n            link: List[Link] = field(\n                default_factory=list,\n                metadata={\n                    \"type\": \"Element\",\n                    \"sequential\": True,\n                }\n            )\n            bookmark: List[Bookmark] = field(\n                default_factory=list,\n                metadata={\n                    \"type\": \"Element\",\n                    \"sequential\": True,\n                }\n            )\n            id: Optional[str] = field(\n                default=None,\n                metadata={\n                    \"type\": \"Attribute\",\n                    \"required\": True,\n                }\n            )\n"
  },
  {
    "path": "python/ScoreDraft/musicxml/xlink.py",
    "content": "from enum import Enum\n\n__NAMESPACE__ = \"http://www.w3.org/1999/xlink\"\n\n\nclass ActuateValue(Enum):\n    ON_REQUEST = \"onRequest\"\n    ON_LOAD = \"onLoad\"\n    OTHER = \"other\"\n    NONE = \"none\"\n\n\nclass ShowValue(Enum):\n    NEW = \"new\"\n    REPLACE = \"replace\"\n    EMBED = \"embed\"\n    OTHER = \"other\"\n    NONE = \"none\"\n\n\nclass TypeValue(Enum):\n    SIMPLE = \"simple\"\n"
  },
  {
    "path": "python/ScoreDraft/musicxml/xml.py",
    "content": "from enum import Enum\n\n__NAMESPACE__ = \"http://www.w3.org/XML/1998/namespace\"\n\n\nclass LangValue(Enum):\n    VALUE = \"\"\n\n\nclass SpaceValue(Enum):\n    DEFAULT = \"default\"\n    PRESERVE = \"preserve\"\n"
  },
  {
    "path": "python/setup.py",
    "content": "from setuptools import setup\nfrom codecs import open\nimport os\n\nhere = os.path.abspath(os.path.dirname(__file__))\n\nwith open(os.path.join(here, 'README.md'), encoding='utf-8') as f:\n    long_description = f.read()\n\nsetup(\n\tname = 'ScoreDraft',\n\tversion = '1.0.11',\n\tdescription = 'A music/singing synthesizer that provides a Python based score authoring interface. ',\n\tlong_description=long_description,\n\tlong_description_content_type='text/markdown',  \n\turl='https://github.com/fynv/ScoreDraft',\n\tlicense='MIT',\n\tauthor='Fei Yang, Vulcan Eon, Beijing',\n\tauthor_email='hyangfeih@gmail.com',\n\tkeywords='synthesizer audio music utau psola',\n\tpackages=['ScoreDraft', \"ScoreDraft.musicxml\"],\n\tpackage_data = { 'ScoreDraft': ['*.dll', '*.so', '*.data']},\n\tinstall_requires = ['cffi', 'xsdata', 'python_ly', 'pyyaml'],\n\tentry_points={\n        'console_scripts': [\n            'scoredraft=ScoreDraft:run_yaml'\n        ]\n    }\n)\n\n\n"
  },
  {
    "path": "thirdparty/freetype/include/freetype2/freetype/config/ftconfig.h",
    "content": "/****************************************************************************\n *\n * ftconfig.h\n *\n *   ANSI-specific configuration file (specification only).\n *\n * Copyright (C) 1996-2021 by\n * David Turner, Robert Wilhelm, and Werner Lemberg.\n *\n * This file is part of the FreeType project, and may only be used,\n * modified, and distributed under the terms of the FreeType project\n * license, LICENSE.TXT.  By continuing to use, modify, or distribute\n * this file you indicate that you have read the license and\n * understand and accept it fully.\n *\n */\n\n\n  /**************************************************************************\n   *\n   * This header file contains a number of macro definitions that are used by\n   * the rest of the engine.  Most of the macros here are automatically\n   * determined at compile time, and you should not need to change it to port\n   * FreeType, except to compile the library with a non-ANSI compiler.\n   *\n   * Note however that if some specific modifications are needed, we advise\n   * you to place a modified copy in your build directory.\n   *\n   * The build directory is usually `builds/<system>`, and contains\n   * system-specific files that are always included first when building the\n   * library.\n   *\n   * This ANSI version should stay in `include/config/`.\n   *\n   */\n\n#ifndef FTCONFIG_H_\n#define FTCONFIG_H_\n\n#include <ft2build.h>\n#include FT_CONFIG_OPTIONS_H\n#include FT_CONFIG_STANDARD_LIBRARY_H\n\n#include <freetype/config/integer-types.h>\n#include <freetype/config/public-macros.h>\n#include <freetype/config/mac-support.h>\n\n#endif /* FTCONFIG_H_ */\n\n\n/* END */\n"
  },
  {
    "path": "thirdparty/freetype/include/freetype2/freetype/config/ftheader.h",
    "content": "/****************************************************************************\n *\n * ftheader.h\n *\n *   Build macros of the FreeType 2 library.\n *\n * Copyright (C) 1996-2021 by\n * David Turner, Robert Wilhelm, and Werner Lemberg.\n *\n * This file is part of the FreeType project, and may only be used,\n * modified, and distributed under the terms of the FreeType project\n * license, LICENSE.TXT.  By continuing to use, modify, or distribute\n * this file you indicate that you have read the license and\n * understand and accept it fully.\n *\n */\n\n#ifndef FTHEADER_H_\n#define FTHEADER_H_\n\n\n  /*@***********************************************************************/\n  /*                                                                       */\n  /* <Macro>                                                               */\n  /*    FT_BEGIN_HEADER                                                    */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    This macro is used in association with @FT_END_HEADER in header    */\n  /*    files to ensure that the declarations within are properly          */\n  /*    encapsulated in an `extern \"C\" { .. }` block when included from a  */\n  /*    C++ compiler.                                                      */\n  /*                                                                       */\n#ifndef FT_BEGIN_HEADER\n#  ifdef __cplusplus\n#    define FT_BEGIN_HEADER  extern \"C\" {\n#  else\n#  define FT_BEGIN_HEADER  /* nothing */\n#  endif\n#endif\n\n\n  /*@***********************************************************************/\n  /*                                                                       */\n  /* <Macro>                                                               */\n  /*    FT_END_HEADER                                                      */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    This macro is used in association with @FT_BEGIN_HEADER in header  */\n  /*    files to ensure that the declarations within are properly          */\n  /*    encapsulated in an `extern \"C\" { .. }` block when included from a  */\n  /*    C++ compiler.                                                      */\n  /*                                                                       */\n#ifndef FT_END_HEADER\n#  ifdef __cplusplus\n#    define FT_END_HEADER  }\n#  else\n#   define FT_END_HEADER  /* nothing */\n#  endif\n#endif\n\n\n  /**************************************************************************\n   *\n   * Aliases for the FreeType 2 public and configuration files.\n   *\n   */\n\n  /**************************************************************************\n   *\n   * @section:\n   *   header_file_macros\n   *\n   * @title:\n   *   Header File Macros\n   *\n   * @abstract:\n   *   Macro definitions used to `#include` specific header files.\n   *\n   * @description:\n   *   In addition to the normal scheme of including header files like\n   *\n   *   ```\n   *     #include <freetype/freetype.h>\n   *     #include <freetype/ftmm.h>\n   *     #include <freetype/ftglyph.h>\n   *   ```\n   *\n   *   it is possible to used named macros instead.  They can be used\n   *   directly in `#include` statements as in\n   *\n   *   ```\n   *     #include FT_FREETYPE_H\n   *     #include FT_MULTIPLE_MASTERS_H\n   *     #include FT_GLYPH_H\n   *   ```\n   *\n   *   These macros were introduced to overcome the infamous 8.3~naming rule\n   *   required by DOS (and `FT_MULTIPLE_MASTERS_H` is a lot more meaningful\n   *   than `ftmm.h`).\n   *\n   */\n\n\n  /* configuration files */\n\n  /**************************************************************************\n   *\n   * @macro:\n   *   FT_CONFIG_CONFIG_H\n   *\n   * @description:\n   *   A macro used in `#include` statements to name the file containing\n   *   FreeType~2 configuration data.\n   *\n   */\n#ifndef FT_CONFIG_CONFIG_H\n#define FT_CONFIG_CONFIG_H  <freetype/config/ftconfig.h>\n#endif\n\n\n  /**************************************************************************\n   *\n   * @macro:\n   *   FT_CONFIG_STANDARD_LIBRARY_H\n   *\n   * @description:\n   *   A macro used in `#include` statements to name the file containing\n   *   FreeType~2 interface to the standard C library functions.\n   *\n   */\n#ifndef FT_CONFIG_STANDARD_LIBRARY_H\n#define FT_CONFIG_STANDARD_LIBRARY_H  <freetype/config/ftstdlib.h>\n#endif\n\n\n  /**************************************************************************\n   *\n   * @macro:\n   *   FT_CONFIG_OPTIONS_H\n   *\n   * @description:\n   *   A macro used in `#include` statements to name the file containing\n   *   FreeType~2 project-specific configuration options.\n   *\n   */\n#ifndef FT_CONFIG_OPTIONS_H\n#define FT_CONFIG_OPTIONS_H  <freetype/config/ftoption.h>\n#endif\n\n\n  /**************************************************************************\n   *\n   * @macro:\n   *   FT_CONFIG_MODULES_H\n   *\n   * @description:\n   *   A macro used in `#include` statements to name the file containing the\n   *   list of FreeType~2 modules that are statically linked to new library\n   *   instances in @FT_Init_FreeType.\n   *\n   */\n#ifndef FT_CONFIG_MODULES_H\n#define FT_CONFIG_MODULES_H  <freetype/config/ftmodule.h>\n#endif\n\n  /* */\n\n  /* public headers */\n\n  /**************************************************************************\n   *\n   * @macro:\n   *   FT_FREETYPE_H\n   *\n   * @description:\n   *   A macro used in `#include` statements to name the file containing the\n   *   base FreeType~2 API.\n   *\n   */\n#define FT_FREETYPE_H  <freetype/freetype.h>\n\n\n  /**************************************************************************\n   *\n   * @macro:\n   *   FT_ERRORS_H\n   *\n   * @description:\n   *   A macro used in `#include` statements to name the file containing the\n   *   list of FreeType~2 error codes (and messages).\n   *\n   *   It is included by @FT_FREETYPE_H.\n   *\n   */\n#define FT_ERRORS_H  <freetype/fterrors.h>\n\n\n  /**************************************************************************\n   *\n   * @macro:\n   *   FT_MODULE_ERRORS_H\n   *\n   * @description:\n   *   A macro used in `#include` statements to name the file containing the\n   *   list of FreeType~2 module error offsets (and messages).\n   *\n   */\n#define FT_MODULE_ERRORS_H  <freetype/ftmoderr.h>\n\n\n  /**************************************************************************\n   *\n   * @macro:\n   *   FT_SYSTEM_H\n   *\n   * @description:\n   *   A macro used in `#include` statements to name the file containing the\n   *   FreeType~2 interface to low-level operations (i.e., memory management\n   *   and stream i/o).\n   *\n   *   It is included by @FT_FREETYPE_H.\n   *\n   */\n#define FT_SYSTEM_H  <freetype/ftsystem.h>\n\n\n  /**************************************************************************\n   *\n   * @macro:\n   *   FT_IMAGE_H\n   *\n   * @description:\n   *   A macro used in `#include` statements to name the file containing type\n   *   definitions related to glyph images (i.e., bitmaps, outlines,\n   *   scan-converter parameters).\n   *\n   *   It is included by @FT_FREETYPE_H.\n   *\n   */\n#define FT_IMAGE_H  <freetype/ftimage.h>\n\n\n  /**************************************************************************\n   *\n   * @macro:\n   *   FT_TYPES_H\n   *\n   * @description:\n   *   A macro used in `#include` statements to name the file containing the\n   *   basic data types defined by FreeType~2.\n   *\n   *   It is included by @FT_FREETYPE_H.\n   *\n   */\n#define FT_TYPES_H  <freetype/fttypes.h>\n\n\n  /**************************************************************************\n   *\n   * @macro:\n   *   FT_LIST_H\n   *\n   * @description:\n   *   A macro used in `#include` statements to name the file containing the\n   *   list management API of FreeType~2.\n   *\n   *   (Most applications will never need to include this file.)\n   *\n   */\n#define FT_LIST_H  <freetype/ftlist.h>\n\n\n  /**************************************************************************\n   *\n   * @macro:\n   *   FT_OUTLINE_H\n   *\n   * @description:\n   *   A macro used in `#include` statements to name the file containing the\n   *   scalable outline management API of FreeType~2.\n   *\n   */\n#define FT_OUTLINE_H  <freetype/ftoutln.h>\n\n\n  /**************************************************************************\n   *\n   * @macro:\n   *   FT_SIZES_H\n   *\n   * @description:\n   *   A macro used in `#include` statements to name the file containing the\n   *   API which manages multiple @FT_Size objects per face.\n   *\n   */\n#define FT_SIZES_H  <freetype/ftsizes.h>\n\n\n  /**************************************************************************\n   *\n   * @macro:\n   *   FT_MODULE_H\n   *\n   * @description:\n   *   A macro used in `#include` statements to name the file containing the\n   *   module management API of FreeType~2.\n   *\n   */\n#define FT_MODULE_H  <freetype/ftmodapi.h>\n\n\n  /**************************************************************************\n   *\n   * @macro:\n   *   FT_RENDER_H\n   *\n   * @description:\n   *   A macro used in `#include` statements to name the file containing the\n   *   renderer module management API of FreeType~2.\n   *\n   */\n#define FT_RENDER_H  <freetype/ftrender.h>\n\n\n  /**************************************************************************\n   *\n   * @macro:\n   *   FT_DRIVER_H\n   *\n   * @description:\n   *   A macro used in `#include` statements to name the file containing\n   *   structures and macros related to the driver modules.\n   *\n   */\n#define FT_DRIVER_H  <freetype/ftdriver.h>\n\n\n  /**************************************************************************\n   *\n   * @macro:\n   *   FT_AUTOHINTER_H\n   *\n   * @description:\n   *   A macro used in `#include` statements to name the file containing\n   *   structures and macros related to the auto-hinting module.\n   *\n   *   Deprecated since version~2.9; use @FT_DRIVER_H instead.\n   *\n   */\n#define FT_AUTOHINTER_H  FT_DRIVER_H\n\n\n  /**************************************************************************\n   *\n   * @macro:\n   *   FT_CFF_DRIVER_H\n   *\n   * @description:\n   *   A macro used in `#include` statements to name the file containing\n   *   structures and macros related to the CFF driver module.\n   *\n   *   Deprecated since version~2.9; use @FT_DRIVER_H instead.\n   *\n   */\n#define FT_CFF_DRIVER_H  FT_DRIVER_H\n\n\n  /**************************************************************************\n   *\n   * @macro:\n   *   FT_TRUETYPE_DRIVER_H\n   *\n   * @description:\n   *   A macro used in `#include` statements to name the file containing\n   *   structures and macros related to the TrueType driver module.\n   *\n   *   Deprecated since version~2.9; use @FT_DRIVER_H instead.\n   *\n   */\n#define FT_TRUETYPE_DRIVER_H  FT_DRIVER_H\n\n\n  /**************************************************************************\n   *\n   * @macro:\n   *   FT_PCF_DRIVER_H\n   *\n   * @description:\n   *   A macro used in `#include` statements to name the file containing\n   *   structures and macros related to the PCF driver module.\n   *\n   *   Deprecated since version~2.9; use @FT_DRIVER_H instead.\n   *\n   */\n#define FT_PCF_DRIVER_H  FT_DRIVER_H\n\n\n  /**************************************************************************\n   *\n   * @macro:\n   *   FT_TYPE1_TABLES_H\n   *\n   * @description:\n   *   A macro used in `#include` statements to name the file containing the\n   *   types and API specific to the Type~1 format.\n   *\n   */\n#define FT_TYPE1_TABLES_H  <freetype/t1tables.h>\n\n\n  /**************************************************************************\n   *\n   * @macro:\n   *   FT_TRUETYPE_IDS_H\n   *\n   * @description:\n   *   A macro used in `#include` statements to name the file containing the\n   *   enumeration values which identify name strings, languages, encodings,\n   *   etc.  This file really contains a _large_ set of constant macro\n   *   definitions, taken from the TrueType and OpenType specifications.\n   *\n   */\n#define FT_TRUETYPE_IDS_H  <freetype/ttnameid.h>\n\n\n  /**************************************************************************\n   *\n   * @macro:\n   *   FT_TRUETYPE_TABLES_H\n   *\n   * @description:\n   *   A macro used in `#include` statements to name the file containing the\n   *   types and API specific to the TrueType (as well as OpenType) format.\n   *\n   */\n#define FT_TRUETYPE_TABLES_H  <freetype/tttables.h>\n\n\n  /**************************************************************************\n   *\n   * @macro:\n   *   FT_TRUETYPE_TAGS_H\n   *\n   * @description:\n   *   A macro used in `#include` statements to name the file containing the\n   *   definitions of TrueType four-byte 'tags' which identify blocks in\n   *   SFNT-based font formats (i.e., TrueType and OpenType).\n   *\n   */\n#define FT_TRUETYPE_TAGS_H  <freetype/tttags.h>\n\n\n  /**************************************************************************\n   *\n   * @macro:\n   *   FT_BDF_H\n   *\n   * @description:\n   *   A macro used in `#include` statements to name the file containing the\n   *   definitions of an API which accesses BDF-specific strings from a face.\n   *\n   */\n#define FT_BDF_H  <freetype/ftbdf.h>\n\n\n  /**************************************************************************\n   *\n   * @macro:\n   *   FT_CID_H\n   *\n   * @description:\n   *   A macro used in `#include` statements to name the file containing the\n   *   definitions of an API which access CID font information from a face.\n   *\n   */\n#define FT_CID_H  <freetype/ftcid.h>\n\n\n  /**************************************************************************\n   *\n   * @macro:\n   *   FT_GZIP_H\n   *\n   * @description:\n   *   A macro used in `#include` statements to name the file containing the\n   *   definitions of an API which supports gzip-compressed files.\n   *\n   */\n#define FT_GZIP_H  <freetype/ftgzip.h>\n\n\n  /**************************************************************************\n   *\n   * @macro:\n   *   FT_LZW_H\n   *\n   * @description:\n   *   A macro used in `#include` statements to name the file containing the\n   *   definitions of an API which supports LZW-compressed files.\n   *\n   */\n#define FT_LZW_H  <freetype/ftlzw.h>\n\n\n  /**************************************************************************\n   *\n   * @macro:\n   *   FT_BZIP2_H\n   *\n   * @description:\n   *   A macro used in `#include` statements to name the file containing the\n   *   definitions of an API which supports bzip2-compressed files.\n   *\n   */\n#define FT_BZIP2_H  <freetype/ftbzip2.h>\n\n\n  /**************************************************************************\n   *\n   * @macro:\n   *   FT_WINFONTS_H\n   *\n   * @description:\n   *   A macro used in `#include` statements to name the file containing the\n   *   definitions of an API which supports Windows FNT files.\n   *\n   */\n#define FT_WINFONTS_H   <freetype/ftwinfnt.h>\n\n\n  /**************************************************************************\n   *\n   * @macro:\n   *   FT_GLYPH_H\n   *\n   * @description:\n   *   A macro used in `#include` statements to name the file containing the\n   *   API of the optional glyph management component.\n   *\n   */\n#define FT_GLYPH_H  <freetype/ftglyph.h>\n\n\n  /**************************************************************************\n   *\n   * @macro:\n   *   FT_BITMAP_H\n   *\n   * @description:\n   *   A macro used in `#include` statements to name the file containing the\n   *   API of the optional bitmap conversion component.\n   *\n   */\n#define FT_BITMAP_H  <freetype/ftbitmap.h>\n\n\n  /**************************************************************************\n   *\n   * @macro:\n   *   FT_BBOX_H\n   *\n   * @description:\n   *   A macro used in `#include` statements to name the file containing the\n   *   API of the optional exact bounding box computation routines.\n   *\n   */\n#define FT_BBOX_H  <freetype/ftbbox.h>\n\n\n  /**************************************************************************\n   *\n   * @macro:\n   *   FT_CACHE_H\n   *\n   * @description:\n   *   A macro used in `#include` statements to name the file containing the\n   *   API of the optional FreeType~2 cache sub-system.\n   *\n   */\n#define FT_CACHE_H  <freetype/ftcache.h>\n\n\n  /**************************************************************************\n   *\n   * @macro:\n   *   FT_MAC_H\n   *\n   * @description:\n   *   A macro used in `#include` statements to name the file containing the\n   *   Macintosh-specific FreeType~2 API.  The latter is used to access fonts\n   *   embedded in resource forks.\n   *\n   *   This header file must be explicitly included by client applications\n   *   compiled on the Mac (note that the base API still works though).\n   *\n   */\n#define FT_MAC_H  <freetype/ftmac.h>\n\n\n  /**************************************************************************\n   *\n   * @macro:\n   *   FT_MULTIPLE_MASTERS_H\n   *\n   * @description:\n   *   A macro used in `#include` statements to name the file containing the\n   *   optional multiple-masters management API of FreeType~2.\n   *\n   */\n#define FT_MULTIPLE_MASTERS_H  <freetype/ftmm.h>\n\n\n  /**************************************************************************\n   *\n   * @macro:\n   *   FT_SFNT_NAMES_H\n   *\n   * @description:\n   *   A macro used in `#include` statements to name the file containing the\n   *   optional FreeType~2 API which accesses embedded 'name' strings in\n   *   SFNT-based font formats (i.e., TrueType and OpenType).\n   *\n   */\n#define FT_SFNT_NAMES_H  <freetype/ftsnames.h>\n\n\n  /**************************************************************************\n   *\n   * @macro:\n   *   FT_OPENTYPE_VALIDATE_H\n   *\n   * @description:\n   *   A macro used in `#include` statements to name the file containing the\n   *   optional FreeType~2 API which validates OpenType tables ('BASE',\n   *   'GDEF', 'GPOS', 'GSUB', 'JSTF').\n   *\n   */\n#define FT_OPENTYPE_VALIDATE_H  <freetype/ftotval.h>\n\n\n  /**************************************************************************\n   *\n   * @macro:\n   *   FT_GX_VALIDATE_H\n   *\n   * @description:\n   *   A macro used in `#include` statements to name the file containing the\n   *   optional FreeType~2 API which validates TrueTypeGX/AAT tables ('feat',\n   *   'mort', 'morx', 'bsln', 'just', 'kern', 'opbd', 'trak', 'prop').\n   *\n   */\n#define FT_GX_VALIDATE_H  <freetype/ftgxval.h>\n\n\n  /**************************************************************************\n   *\n   * @macro:\n   *   FT_PFR_H\n   *\n   * @description:\n   *   A macro used in `#include` statements to name the file containing the\n   *   FreeType~2 API which accesses PFR-specific data.\n   *\n   */\n#define FT_PFR_H  <freetype/ftpfr.h>\n\n\n  /**************************************************************************\n   *\n   * @macro:\n   *   FT_STROKER_H\n   *\n   * @description:\n   *   A macro used in `#include` statements to name the file containing the\n   *   FreeType~2 API which provides functions to stroke outline paths.\n   */\n#define FT_STROKER_H  <freetype/ftstroke.h>\n\n\n  /**************************************************************************\n   *\n   * @macro:\n   *   FT_SYNTHESIS_H\n   *\n   * @description:\n   *   A macro used in `#include` statements to name the file containing the\n   *   FreeType~2 API which performs artificial obliquing and emboldening.\n   */\n#define FT_SYNTHESIS_H  <freetype/ftsynth.h>\n\n\n  /**************************************************************************\n   *\n   * @macro:\n   *   FT_FONT_FORMATS_H\n   *\n   * @description:\n   *   A macro used in `#include` statements to name the file containing the\n   *   FreeType~2 API which provides functions specific to font formats.\n   */\n#define FT_FONT_FORMATS_H  <freetype/ftfntfmt.h>\n\n  /* deprecated */\n#define FT_XFREE86_H  FT_FONT_FORMATS_H\n\n\n  /**************************************************************************\n   *\n   * @macro:\n   *   FT_TRIGONOMETRY_H\n   *\n   * @description:\n   *   A macro used in `#include` statements to name the file containing the\n   *   FreeType~2 API which performs trigonometric computations (e.g.,\n   *   cosines and arc tangents).\n   */\n#define FT_TRIGONOMETRY_H  <freetype/fttrigon.h>\n\n\n  /**************************************************************************\n   *\n   * @macro:\n   *   FT_LCD_FILTER_H\n   *\n   * @description:\n   *   A macro used in `#include` statements to name the file containing the\n   *   FreeType~2 API which performs color filtering for subpixel rendering.\n   */\n#define FT_LCD_FILTER_H  <freetype/ftlcdfil.h>\n\n\n  /**************************************************************************\n   *\n   * @macro:\n   *   FT_INCREMENTAL_H\n   *\n   * @description:\n   *   A macro used in `#include` statements to name the file containing the\n   *   FreeType~2 API which performs incremental glyph loading.\n   */\n#define FT_INCREMENTAL_H  <freetype/ftincrem.h>\n\n\n  /**************************************************************************\n   *\n   * @macro:\n   *   FT_GASP_H\n   *\n   * @description:\n   *   A macro used in `#include` statements to name the file containing the\n   *   FreeType~2 API which returns entries from the TrueType GASP table.\n   */\n#define FT_GASP_H  <freetype/ftgasp.h>\n\n\n  /**************************************************************************\n   *\n   * @macro:\n   *   FT_ADVANCES_H\n   *\n   * @description:\n   *   A macro used in `#include` statements to name the file containing the\n   *   FreeType~2 API which returns individual and ranged glyph advances.\n   */\n#define FT_ADVANCES_H  <freetype/ftadvanc.h>\n\n\n  /**************************************************************************\n   *\n   * @macro:\n   *   FT_COLOR_H\n   *\n   * @description:\n   *   A macro used in `#include` statements to name the file containing the\n   *   FreeType~2 API which handles the OpenType 'CPAL' table.\n   */\n#define FT_COLOR_H  <freetype/ftcolor.h>\n\n\n  /* */\n\n  /* These header files don't need to be included by the user. */\n#define FT_ERROR_DEFINITIONS_H  <freetype/fterrdef.h>\n#define FT_PARAMETER_TAGS_H     <freetype/ftparams.h>\n\n  /* Deprecated macros. */\n#define FT_UNPATENTED_HINTING_H   <freetype/ftparams.h>\n#define FT_TRUETYPE_UNPATENTED_H  <freetype/ftparams.h>\n\n  /* `FT_CACHE_H` is the only header file needed for the cache subsystem. */\n#define FT_CACHE_IMAGE_H          FT_CACHE_H\n#define FT_CACHE_SMALL_BITMAPS_H  FT_CACHE_H\n#define FT_CACHE_CHARMAP_H        FT_CACHE_H\n\n  /* The internals of the cache sub-system are no longer exposed.  We */\n  /* default to `FT_CACHE_H` at the moment just in case, but we know  */\n  /* of no rogue client that uses them.                               */\n  /*                                                                  */\n#define FT_CACHE_MANAGER_H           FT_CACHE_H\n#define FT_CACHE_INTERNAL_MRU_H      FT_CACHE_H\n#define FT_CACHE_INTERNAL_MANAGER_H  FT_CACHE_H\n#define FT_CACHE_INTERNAL_CACHE_H    FT_CACHE_H\n#define FT_CACHE_INTERNAL_GLYPH_H    FT_CACHE_H\n#define FT_CACHE_INTERNAL_IMAGE_H    FT_CACHE_H\n#define FT_CACHE_INTERNAL_SBITS_H    FT_CACHE_H\n\n/* TODO(david): Move this section below to a different header */\n#ifdef FT2_BUILD_LIBRARY\n#if defined( _MSC_VER )      /* Visual C++ (and Intel C++) */\n\n  /* We disable the warning `conditional expression is constant' here */\n  /* in order to compile cleanly with the maximum level of warnings.  */\n  /* In particular, the warning complains about stuff like `while(0)' */\n  /* which is very useful in macro definitions.  There is no benefit  */\n  /* in having it enabled.                                            */\n#pragma warning( disable : 4127 )\n\n#endif /* _MSC_VER */\n#endif /* FT2_BUILD_LIBRARY */\n\n#endif /* FTHEADER_H_ */\n\n\n/* END */\n"
  },
  {
    "path": "thirdparty/freetype/include/freetype2/freetype/config/ftmodule.h",
    "content": "/*\n * This file registers the FreeType modules compiled into the library.\n *\n * If you use GNU make, this file IS NOT USED!  Instead, it is created in\n * the objects directory (normally `<topdir>/objs/`) based on information\n * from `<topdir>/modules.cfg`.\n *\n * Please read `docs/INSTALL.ANY` and `docs/CUSTOMIZE` how to compile\n * FreeType without GNU make.\n *\n */\n\nFT_USE_MODULE( FT_Module_Class, autofit_module_class )\nFT_USE_MODULE( FT_Driver_ClassRec, tt_driver_class )\nFT_USE_MODULE( FT_Driver_ClassRec, t1_driver_class )\nFT_USE_MODULE( FT_Driver_ClassRec, cff_driver_class )\nFT_USE_MODULE( FT_Driver_ClassRec, t1cid_driver_class )\nFT_USE_MODULE( FT_Driver_ClassRec, pfr_driver_class )\nFT_USE_MODULE( FT_Driver_ClassRec, t42_driver_class )\nFT_USE_MODULE( FT_Driver_ClassRec, winfnt_driver_class )\nFT_USE_MODULE( FT_Driver_ClassRec, pcf_driver_class )\nFT_USE_MODULE( FT_Driver_ClassRec, bdf_driver_class )\nFT_USE_MODULE( FT_Module_Class, psaux_module_class )\nFT_USE_MODULE( FT_Module_Class, psnames_module_class )\nFT_USE_MODULE( FT_Module_Class, pshinter_module_class )\nFT_USE_MODULE( FT_Module_Class, sfnt_module_class )\nFT_USE_MODULE( FT_Renderer_Class, ft_smooth_renderer_class )\nFT_USE_MODULE( FT_Renderer_Class, ft_raster1_renderer_class )\nFT_USE_MODULE( FT_Renderer_Class, ft_sdf_renderer_class )\nFT_USE_MODULE( FT_Renderer_Class, ft_bitmap_sdf_renderer_class )\n\n/* EOF */\n"
  },
  {
    "path": "thirdparty/freetype/include/freetype2/freetype/config/ftoption.h",
    "content": "/****************************************************************************\n *\n * ftoption.h\n *\n *   User-selectable configuration macros (specification only).\n *\n * Copyright (C) 1996-2021 by\n * David Turner, Robert Wilhelm, and Werner Lemberg.\n *\n * This file is part of the FreeType project, and may only be used,\n * modified, and distributed under the terms of the FreeType project\n * license, LICENSE.TXT.  By continuing to use, modify, or distribute\n * this file you indicate that you have read the license and\n * understand and accept it fully.\n *\n */\n\n\n#ifndef FTOPTION_H_\n#define FTOPTION_H_\n\n\n#include <ft2build.h>\n\n\nFT_BEGIN_HEADER\n\n  /**************************************************************************\n   *\n   *                USER-SELECTABLE CONFIGURATION MACROS\n   *\n   * This file contains the default configuration macro definitions for a\n   * standard build of the FreeType library.  There are three ways to use\n   * this file to build project-specific versions of the library:\n   *\n   * - You can modify this file by hand, but this is not recommended in\n   *   cases where you would like to build several versions of the library\n   *   from a single source directory.\n   *\n   * - You can put a copy of this file in your build directory, more\n   *   precisely in `$BUILD/freetype/config/ftoption.h`, where `$BUILD` is\n   *   the name of a directory that is included _before_ the FreeType include\n   *   path during compilation.\n   *\n   *   The default FreeType Makefiles use the build directory\n   *   `builds/<system>` by default, but you can easily change that for your\n   *   own projects.\n   *\n   * - Copy the file <ft2build.h> to `$BUILD/ft2build.h` and modify it\n   *   slightly to pre-define the macro `FT_CONFIG_OPTIONS_H` used to locate\n   *   this file during the build.  For example,\n   *\n   *   ```\n   *     #define FT_CONFIG_OPTIONS_H  <myftoptions.h>\n   *     #include <freetype/config/ftheader.h>\n   *   ```\n   *\n   *   will use `$BUILD/myftoptions.h` instead of this file for macro\n   *   definitions.\n   *\n   *   Note also that you can similarly pre-define the macro\n   *   `FT_CONFIG_MODULES_H` used to locate the file listing of the modules\n   *   that are statically linked to the library at compile time.  By\n   *   default, this file is `<freetype/config/ftmodule.h>`.\n   *\n   * We highly recommend using the third method whenever possible.\n   *\n   */\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /****                                                                 ****/\n  /**** G E N E R A L   F R E E T Y P E   2   C O N F I G U R A T I O N ****/\n  /****                                                                 ****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n  /*#************************************************************************\n   *\n   * If you enable this configuration option, FreeType recognizes an\n   * environment variable called `FREETYPE_PROPERTIES`, which can be used to\n   * control the various font drivers and modules.  The controllable\n   * properties are listed in the section @properties.\n   *\n   * You have to undefine this configuration option on platforms that lack\n   * the concept of environment variables (and thus don't have the `getenv`\n   * function), for example Windows CE.\n   *\n   * `FREETYPE_PROPERTIES` has the following syntax form (broken here into\n   * multiple lines for better readability).\n   *\n   * ```\n   *   <optional whitespace>\n   *   <module-name1> ':'\n   *   <property-name1> '=' <property-value1>\n   *   <whitespace>\n   *   <module-name2> ':'\n   *   <property-name2> '=' <property-value2>\n   *   ...\n   * ```\n   *\n   * Example:\n   *\n   * ```\n   *   FREETYPE_PROPERTIES=truetype:interpreter-version=35 \\\n   *                       cff:no-stem-darkening=1\n   * ```\n   *\n   */\n#define FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES\n\n\n  /**************************************************************************\n   *\n   * Uncomment the line below if you want to activate LCD rendering\n   * technology similar to ClearType in this build of the library.  This\n   * technology triples the resolution in the direction color subpixels.  To\n   * mitigate color fringes inherent to this technology, you also need to\n   * explicitly set up LCD filtering.\n   *\n   * When this macro is not defined, FreeType offers alternative LCD\n   * rendering technology that produces excellent output.\n   */\n/* #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING */\n\n\n  /**************************************************************************\n   *\n   * Many compilers provide a non-ANSI 64-bit data type that can be used by\n   * FreeType to speed up some computations.  However, this will create some\n   * problems when compiling the library in strict ANSI mode.\n   *\n   * For this reason, the use of 64-bit integers is normally disabled when\n   * the `__STDC__` macro is defined.  You can however disable this by\n   * defining the macro `FT_CONFIG_OPTION_FORCE_INT64` here.\n   *\n   * For most compilers, this will only create compilation warnings when\n   * building the library.\n   *\n   * ObNote: The compiler-specific 64-bit integers are detected in the\n   *         file `ftconfig.h` either statically or through the `configure`\n   *         script on supported platforms.\n   */\n#undef FT_CONFIG_OPTION_FORCE_INT64\n\n\n  /**************************************************************************\n   *\n   * If this macro is defined, do not try to use an assembler version of\n   * performance-critical functions (e.g., @FT_MulFix).  You should only do\n   * that to verify that the assembler function works properly, or to execute\n   * benchmark tests of the various implementations.\n   */\n/* #define FT_CONFIG_OPTION_NO_ASSEMBLER */\n\n\n  /**************************************************************************\n   *\n   * If this macro is defined, try to use an inlined assembler version of the\n   * @FT_MulFix function, which is a 'hotspot' when loading and hinting\n   * glyphs, and which should be executed as fast as possible.\n   *\n   * Note that if your compiler or CPU is not supported, this will default to\n   * the standard and portable implementation found in `ftcalc.c`.\n   */\n#define FT_CONFIG_OPTION_INLINE_MULFIX\n\n\n  /**************************************************************************\n   *\n   * LZW-compressed file support.\n   *\n   *   FreeType now handles font files that have been compressed with the\n   *   `compress` program.  This is mostly used to parse many of the PCF\n   *   files that come with various X11 distributions.  The implementation\n   *   uses NetBSD's `zopen` to partially uncompress the file on the fly (see\n   *   `src/lzw/ftgzip.c`).\n   *\n   *   Define this macro if you want to enable this 'feature'.\n   */\n#define FT_CONFIG_OPTION_USE_LZW\n\n\n  /**************************************************************************\n   *\n   * Gzip-compressed file support.\n   *\n   *   FreeType now handles font files that have been compressed with the\n   *   `gzip` program.  This is mostly used to parse many of the PCF files\n   *   that come with XFree86.  The implementation uses 'zlib' to partially\n   *   uncompress the file on the fly (see `src/gzip/ftgzip.c`).\n   *\n   *   Define this macro if you want to enable this 'feature'.  See also the\n   *   macro `FT_CONFIG_OPTION_SYSTEM_ZLIB` below.\n   */\n#define FT_CONFIG_OPTION_USE_ZLIB\n\n\n  /**************************************************************************\n   *\n   * ZLib library selection\n   *\n   *   This macro is only used when `FT_CONFIG_OPTION_USE_ZLIB` is defined.\n   *   It allows FreeType's 'ftgzip' component to link to the system's\n   *   installation of the ZLib library.  This is useful on systems like\n   *   Unix or VMS where it generally is already available.\n   *\n   *   If you let it undefined, the component will use its own copy of the\n   *   zlib sources instead.  These have been modified to be included\n   *   directly within the component and **not** export external function\n   *   names.  This allows you to link any program with FreeType _and_ ZLib\n   *   without linking conflicts.\n   *\n   *   Do not `#undef` this macro here since the build system might define\n   *   it for certain configurations only.\n   *\n   *   If you use a build system like cmake or the `configure` script,\n   *   options set by those programs have precedence, overwriting the value\n   *   here with the configured one.\n   */\n/* #define FT_CONFIG_OPTION_SYSTEM_ZLIB */\n\n\n  /**************************************************************************\n   *\n   * Bzip2-compressed file support.\n   *\n   *   FreeType now handles font files that have been compressed with the\n   *   `bzip2` program.  This is mostly used to parse many of the PCF files\n   *   that come with XFree86.  The implementation uses `libbz2` to partially\n   *   uncompress the file on the fly (see `src/bzip2/ftbzip2.c`).  Contrary\n   *   to gzip, bzip2 currently is not included and need to use the system\n   *   available bzip2 implementation.\n   *\n   *   Define this macro if you want to enable this 'feature'.\n   *\n   *   If you use a build system like cmake or the `configure` script,\n   *   options set by those programs have precedence, overwriting the value\n   *   here with the configured one.\n   */\n/* #define FT_CONFIG_OPTION_USE_BZIP2 */\n\n\n  /**************************************************************************\n   *\n   * Define to disable the use of file stream functions and types, `FILE`,\n   * `fopen`, etc.  Enables the use of smaller system libraries on embedded\n   * systems that have multiple system libraries, some with or without file\n   * stream support, in the cases where file stream support is not necessary\n   * such as memory loading of font files.\n   */\n/* #define FT_CONFIG_OPTION_DISABLE_STREAM_SUPPORT */\n\n\n  /**************************************************************************\n   *\n   * PNG bitmap support.\n   *\n   *   FreeType now handles loading color bitmap glyphs in the PNG format.\n   *   This requires help from the external libpng library.  Uncompressed\n   *   color bitmaps do not need any external libraries and will be supported\n   *   regardless of this configuration.\n   *\n   *   Define this macro if you want to enable this 'feature'.\n   *\n   *   If you use a build system like cmake or the `configure` script,\n   *   options set by those programs have precedence, overwriting the value\n   *   here with the configured one.\n   */\n/* #define FT_CONFIG_OPTION_USE_PNG */\n\n\n  /**************************************************************************\n   *\n   * HarfBuzz support.\n   *\n   *   FreeType uses the HarfBuzz library to improve auto-hinting of OpenType\n   *   fonts.  If available, many glyphs not directly addressable by a font's\n   *   character map will be hinted also.\n   *\n   *   Define this macro if you want to enable this 'feature'.\n   *\n   *   If you use a build system like cmake or the `configure` script,\n   *   options set by those programs have precedence, overwriting the value\n   *   here with the configured one.\n   */\n/* #define FT_CONFIG_OPTION_USE_HARFBUZZ */\n\n\n  /**************************************************************************\n   *\n   * Brotli support.\n   *\n   *   FreeType uses the Brotli library to provide support for decompressing\n   *   WOFF2 streams.\n   *\n   *   Define this macro if you want to enable this 'feature'.\n   *\n   *   If you use a build system like cmake or the `configure` script,\n   *   options set by those programs have precedence, overwriting the value\n   *   here with the configured one.\n   */\n/* #define FT_CONFIG_OPTION_USE_BROTLI */\n\n\n  /**************************************************************************\n   *\n   * Glyph Postscript Names handling\n   *\n   *   By default, FreeType 2 is compiled with the 'psnames' module.  This\n   *   module is in charge of converting a glyph name string into a Unicode\n   *   value, or return a Macintosh standard glyph name for the use with the\n   *   TrueType 'post' table.\n   *\n   *   Undefine this macro if you do not want 'psnames' compiled in your\n   *   build of FreeType.  This has the following effects:\n   *\n   *   - The TrueType driver will provide its own set of glyph names, if you\n   *     build it to support postscript names in the TrueType 'post' table,\n   *     but will not synthesize a missing Unicode charmap.\n   *\n   *   - The Type~1 driver will not be able to synthesize a Unicode charmap\n   *     out of the glyphs found in the fonts.\n   *\n   *   You would normally undefine this configuration macro when building a\n   *   version of FreeType that doesn't contain a Type~1 or CFF driver.\n   */\n#define FT_CONFIG_OPTION_POSTSCRIPT_NAMES\n\n\n  /**************************************************************************\n   *\n   * Postscript Names to Unicode Values support\n   *\n   *   By default, FreeType~2 is built with the 'psnames' module compiled in.\n   *   Among other things, the module is used to convert a glyph name into a\n   *   Unicode value.  This is especially useful in order to synthesize on\n   *   the fly a Unicode charmap from the CFF/Type~1 driver through a big\n   *   table named the 'Adobe Glyph List' (AGL).\n   *\n   *   Undefine this macro if you do not want the Adobe Glyph List compiled\n   *   in your 'psnames' module.  The Type~1 driver will not be able to\n   *   synthesize a Unicode charmap out of the glyphs found in the fonts.\n   */\n#define FT_CONFIG_OPTION_ADOBE_GLYPH_LIST\n\n\n  /**************************************************************************\n   *\n   * Support for Mac fonts\n   *\n   *   Define this macro if you want support for outline fonts in Mac format\n   *   (mac dfont, mac resource, macbinary containing a mac resource) on\n   *   non-Mac platforms.\n   *\n   *   Note that the 'FOND' resource isn't checked.\n   */\n#define FT_CONFIG_OPTION_MAC_FONTS\n\n\n  /**************************************************************************\n   *\n   * Guessing methods to access embedded resource forks\n   *\n   *   Enable extra Mac fonts support on non-Mac platforms (e.g., GNU/Linux).\n   *\n   *   Resource forks which include fonts data are stored sometimes in\n   *   locations which users or developers don't expected.  In some cases,\n   *   resource forks start with some offset from the head of a file.  In\n   *   other cases, the actual resource fork is stored in file different from\n   *   what the user specifies.  If this option is activated, FreeType tries\n   *   to guess whether such offsets or different file names must be used.\n   *\n   *   Note that normal, direct access of resource forks is controlled via\n   *   the `FT_CONFIG_OPTION_MAC_FONTS` option.\n   */\n#ifdef FT_CONFIG_OPTION_MAC_FONTS\n#define FT_CONFIG_OPTION_GUESSING_EMBEDDED_RFORK\n#endif\n\n\n  /**************************************************************************\n   *\n   * Allow the use of `FT_Incremental_Interface` to load typefaces that\n   * contain no glyph data, but supply it via a callback function.  This is\n   * required by clients supporting document formats which supply font data\n   * incrementally as the document is parsed, such as the Ghostscript\n   * interpreter for the PostScript language.\n   */\n#define FT_CONFIG_OPTION_INCREMENTAL\n\n\n  /**************************************************************************\n   *\n   * The size in bytes of the render pool used by the scan-line converter to\n   * do all of its work.\n   */\n#define FT_RENDER_POOL_SIZE  16384L\n\n\n  /**************************************************************************\n   *\n   * FT_MAX_MODULES\n   *\n   *   The maximum number of modules that can be registered in a single\n   *   FreeType library object.  32~is the default.\n   */\n#define FT_MAX_MODULES  32\n\n\n  /**************************************************************************\n   *\n   * Debug level\n   *\n   *   FreeType can be compiled in debug or trace mode.  In debug mode,\n   *   errors are reported through the 'ftdebug' component.  In trace mode,\n   *   additional messages are sent to the standard output during execution.\n   *\n   *   Define `FT_DEBUG_LEVEL_ERROR` to build the library in debug mode.\n   *   Define `FT_DEBUG_LEVEL_TRACE` to build it in trace mode.\n   *\n   *   Don't define any of these macros to compile in 'release' mode!\n   *\n   *   Do not `#undef` these macros here since the build system might define\n   *   them for certain configurations only.\n   */\n/* #define FT_DEBUG_LEVEL_ERROR */\n/* #define FT_DEBUG_LEVEL_TRACE */\n\n\n  /**************************************************************************\n   *\n   * Logging\n   *\n   *   Compiling FreeType in debug or trace mode makes FreeType write error\n   *   and trace log messages to `stderr`.  Enabling this macro\n   *   automatically forces the `FT_DEBUG_LEVEL_ERROR` and\n   *   `FT_DEBUG_LEVEL_TRACE` macros and allows FreeType to write error and\n   *   trace log messages to a file instead of `stderr`.  For writing logs\n   *   to a file, FreeType uses an the external `dlg` library (the source\n   *   code is in `src/dlg`).\n   *\n   *   This option needs a C99 compiler.\n   */\n/* #define FT_DEBUG_LOGGING */\n\n\n  /**************************************************************************\n   *\n   * Autofitter debugging\n   *\n   *   If `FT_DEBUG_AUTOFIT` is defined, FreeType provides some means to\n   *   control the autofitter behaviour for debugging purposes with global\n   *   boolean variables (consequently, you should **never** enable this\n   *   while compiling in 'release' mode):\n   *\n   *   ```\n   *     _af_debug_disable_horz_hints\n   *     _af_debug_disable_vert_hints\n   *     _af_debug_disable_blue_hints\n   *   ```\n   *\n   *   Additionally, the following functions provide dumps of various\n   *   internal autofit structures to stdout (using `printf`):\n   *\n   *   ```\n   *     af_glyph_hints_dump_points\n   *     af_glyph_hints_dump_segments\n   *     af_glyph_hints_dump_edges\n   *     af_glyph_hints_get_num_segments\n   *     af_glyph_hints_get_segment_offset\n   *   ```\n   *\n   *   As an argument, they use another global variable:\n   *\n   *   ```\n   *     _af_debug_hints\n   *   ```\n   *\n   *   Please have a look at the `ftgrid` demo program to see how those\n   *   variables and macros should be used.\n   *\n   *   Do not `#undef` these macros here since the build system might define\n   *   them for certain configurations only.\n   */\n/* #define FT_DEBUG_AUTOFIT */\n\n\n  /**************************************************************************\n   *\n   * Memory Debugging\n   *\n   *   FreeType now comes with an integrated memory debugger that is capable\n   *   of detecting simple errors like memory leaks or double deletes.  To\n   *   compile it within your build of the library, you should define\n   *   `FT_DEBUG_MEMORY` here.\n   *\n   *   Note that the memory debugger is only activated at runtime when when\n   *   the _environment_ variable `FT2_DEBUG_MEMORY` is defined also!\n   *\n   *   Do not `#undef` this macro here since the build system might define it\n   *   for certain configurations only.\n   */\n/* #define FT_DEBUG_MEMORY */\n\n\n  /**************************************************************************\n   *\n   * Module errors\n   *\n   *   If this macro is set (which is _not_ the default), the higher byte of\n   *   an error code gives the module in which the error has occurred, while\n   *   the lower byte is the real error code.\n   *\n   *   Setting this macro makes sense for debugging purposes only, since it\n   *   would break source compatibility of certain programs that use\n   *   FreeType~2.\n   *\n   *   More details can be found in the files `ftmoderr.h` and `fterrors.h`.\n   */\n#undef FT_CONFIG_OPTION_USE_MODULE_ERRORS\n\n\n  /**************************************************************************\n   *\n   * Error Strings\n   *\n   *   If this macro is set, `FT_Error_String` will return meaningful\n   *   descriptions.  This is not enabled by default to reduce the overall\n   *   size of FreeType.\n   *\n   *   More details can be found in the file `fterrors.h`.\n   */\n/* #define FT_CONFIG_OPTION_ERROR_STRINGS */\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /****                                                                 ****/\n  /****        S F N T   D R I V E R    C O N F I G U R A T I O N       ****/\n  /****                                                                 ****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n  /**************************************************************************\n   *\n   * Define `TT_CONFIG_OPTION_EMBEDDED_BITMAPS` if you want to support\n   * embedded bitmaps in all formats using the 'sfnt' module (namely\n   * TrueType~& OpenType).\n   */\n#define TT_CONFIG_OPTION_EMBEDDED_BITMAPS\n\n\n  /**************************************************************************\n   *\n   * Define `TT_CONFIG_OPTION_COLOR_LAYERS` if you want to support colored\n   * outlines (from the 'COLR'/'CPAL' tables) in all formats using the 'sfnt'\n   * module (namely TrueType~& OpenType).\n   */\n#define TT_CONFIG_OPTION_COLOR_LAYERS\n\n\n  /**************************************************************************\n   *\n   * Define `TT_CONFIG_OPTION_POSTSCRIPT_NAMES` if you want to be able to\n   * load and enumerate the glyph Postscript names in a TrueType or OpenType\n   * file.\n   *\n   * Note that when you do not compile the 'psnames' module by undefining the\n   * above `FT_CONFIG_OPTION_POSTSCRIPT_NAMES`, the 'sfnt' module will\n   * contain additional code used to read the PS Names table from a font.\n   *\n   * (By default, the module uses 'psnames' to extract glyph names.)\n   */\n#define TT_CONFIG_OPTION_POSTSCRIPT_NAMES\n\n\n  /**************************************************************************\n   *\n   * Define `TT_CONFIG_OPTION_SFNT_NAMES` if your applications need to access\n   * the internal name table in a SFNT-based format like TrueType or\n   * OpenType.  The name table contains various strings used to describe the\n   * font, like family name, copyright, version, etc.  It does not contain\n   * any glyph name though.\n   *\n   * Accessing SFNT names is done through the functions declared in\n   * `ftsnames.h`.\n   */\n#define TT_CONFIG_OPTION_SFNT_NAMES\n\n\n  /**************************************************************************\n   *\n   * TrueType CMap support\n   *\n   *   Here you can fine-tune which TrueType CMap table format shall be\n   *   supported.\n   */\n#define TT_CONFIG_CMAP_FORMAT_0\n#define TT_CONFIG_CMAP_FORMAT_2\n#define TT_CONFIG_CMAP_FORMAT_4\n#define TT_CONFIG_CMAP_FORMAT_6\n#define TT_CONFIG_CMAP_FORMAT_8\n#define TT_CONFIG_CMAP_FORMAT_10\n#define TT_CONFIG_CMAP_FORMAT_12\n#define TT_CONFIG_CMAP_FORMAT_13\n#define TT_CONFIG_CMAP_FORMAT_14\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /****                                                                 ****/\n  /****    T R U E T Y P E   D R I V E R    C O N F I G U R A T I O N   ****/\n  /****                                                                 ****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  /**************************************************************************\n   *\n   * Define `TT_CONFIG_OPTION_BYTECODE_INTERPRETER` if you want to compile a\n   * bytecode interpreter in the TrueType driver.\n   *\n   * By undefining this, you will only compile the code necessary to load\n   * TrueType glyphs without hinting.\n   *\n   * Do not `#undef` this macro here, since the build system might define it\n   * for certain configurations only.\n   */\n#define TT_CONFIG_OPTION_BYTECODE_INTERPRETER\n\n\n  /**************************************************************************\n   *\n   * Define `TT_CONFIG_OPTION_SUBPIXEL_HINTING` if you want to compile\n   * subpixel hinting support into the TrueType driver.  This modifies the\n   * TrueType hinting mechanism when anything but `FT_RENDER_MODE_MONO` is\n   * requested.\n   *\n   * In particular, it modifies the bytecode interpreter to interpret (or\n   * not) instructions in a certain way so that all TrueType fonts look like\n   * they do in a Windows ClearType (DirectWrite) environment.  See [1] for a\n   * technical overview on what this means.  See `ttinterp.h` for more\n   * details on the LEAN option.\n   *\n   * There are three possible values.\n   *\n   * Value 1:\n   *   This value is associated with the 'Infinality' moniker, contributed by\n   *   an individual nicknamed Infinality with the goal of making TrueType\n   *   fonts render better than on Windows.  A high amount of configurability\n   *   and flexibility, down to rules for single glyphs in fonts, but also\n   *   very slow.  Its experimental and slow nature and the original\n   *   developer losing interest meant that this option was never enabled in\n   *   default builds.\n   *\n   *   The corresponding interpreter version is v38.\n   *\n   * Value 2:\n   *   The new default mode for the TrueType driver.  The Infinality code\n   *   base was stripped to the bare minimum and all configurability removed\n   *   in the name of speed and simplicity.  The configurability was mainly\n   *   aimed at legacy fonts like 'Arial', 'Times New Roman', or 'Courier'.\n   *   Legacy fonts are fonts that modify vertical stems to achieve clean\n   *   black-and-white bitmaps.  The new mode focuses on applying a minimal\n   *   set of rules to all fonts indiscriminately so that modern and web\n   *   fonts render well while legacy fonts render okay.\n   *\n   *   The corresponding interpreter version is v40.\n   *\n   * Value 3:\n   *   Compile both, making both v38 and v40 available (the latter is the\n   *   default).\n   *\n   * By undefining these, you get rendering behavior like on Windows without\n   * ClearType, i.e., Windows XP without ClearType enabled and Win9x\n   * (interpreter version v35).  Or not, depending on how much hinting blood\n   * and testing tears the font designer put into a given font.  If you\n   * define one or both subpixel hinting options, you can switch between\n   * between v35 and the ones you define (using `FT_Property_Set`).\n   *\n   * This option requires `TT_CONFIG_OPTION_BYTECODE_INTERPRETER` to be\n   * defined.\n   *\n   * [1]\n   * https://www.microsoft.com/typography/cleartype/truetypecleartype.aspx\n   */\n/* #define TT_CONFIG_OPTION_SUBPIXEL_HINTING  1         */\n#define TT_CONFIG_OPTION_SUBPIXEL_HINTING  2\n/* #define TT_CONFIG_OPTION_SUBPIXEL_HINTING  ( 1 | 2 ) */\n\n\n  /**************************************************************************\n   *\n   * Define `TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED` to compile the\n   * TrueType glyph loader to use Apple's definition of how to handle\n   * component offsets in composite glyphs.\n   *\n   * Apple and MS disagree on the default behavior of component offsets in\n   * composites.  Apple says that they should be scaled by the scaling\n   * factors in the transformation matrix (roughly, it's more complex) while\n   * MS says they should not.  OpenType defines two bits in the composite\n   * flags array which can be used to disambiguate, but old fonts will not\n   * have them.\n   *\n   *   https://www.microsoft.com/typography/otspec/glyf.htm\n   *   https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6glyf.html\n   */\n#undef TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED\n\n\n  /**************************************************************************\n   *\n   * Define `TT_CONFIG_OPTION_GX_VAR_SUPPORT` if you want to include support\n   * for Apple's distortable font technology ('fvar', 'gvar', 'cvar', and\n   * 'avar' tables).  Tagged 'Font Variations', this is now part of OpenType\n   * also.  This has many similarities to Type~1 Multiple Masters support.\n   */\n#define TT_CONFIG_OPTION_GX_VAR_SUPPORT\n\n\n  /**************************************************************************\n   *\n   * Define `TT_CONFIG_OPTION_BDF` if you want to include support for an\n   * embedded 'BDF~' table within SFNT-based bitmap formats.\n   */\n#define TT_CONFIG_OPTION_BDF\n\n\n  /**************************************************************************\n   *\n   * Option `TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES` controls the maximum\n   * number of bytecode instructions executed for a single run of the\n   * bytecode interpreter, needed to prevent infinite loops.  You don't want\n   * to change this except for very special situations (e.g., making a\n   * library fuzzer spend less time to handle broken fonts).\n   *\n   * It is not expected that this value is ever modified by a configuring\n   * script; instead, it gets surrounded with `#ifndef ... #endif` so that\n   * the value can be set as a preprocessor option on the compiler's command\n   * line.\n   */\n#ifndef TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES\n#define TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES  1000000L\n#endif\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /****                                                                 ****/\n  /****      T Y P E 1   D R I V E R    C O N F I G U R A T I O N       ****/\n  /****                                                                 ****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n  /**************************************************************************\n   *\n   * `T1_MAX_DICT_DEPTH` is the maximum depth of nest dictionaries and arrays\n   * in the Type~1 stream (see `t1load.c`).  A minimum of~4 is required.\n   */\n#define T1_MAX_DICT_DEPTH  5\n\n\n  /**************************************************************************\n   *\n   * `T1_MAX_SUBRS_CALLS` details the maximum number of nested sub-routine\n   * calls during glyph loading.\n   */\n#define T1_MAX_SUBRS_CALLS  16\n\n\n  /**************************************************************************\n   *\n   * `T1_MAX_CHARSTRING_OPERANDS` is the charstring stack's capacity.  A\n   * minimum of~16 is required.\n   *\n   * The Chinese font 'MingTiEG-Medium' (covering the CNS 11643 character\n   * set) needs 256.\n   */\n#define T1_MAX_CHARSTRINGS_OPERANDS  256\n\n\n  /**************************************************************************\n   *\n   * Define this configuration macro if you want to prevent the compilation\n   * of the 't1afm' module, which is in charge of reading Type~1 AFM files\n   * into an existing face.  Note that if set, the Type~1 driver will be\n   * unable to produce kerning distances.\n   */\n#undef T1_CONFIG_OPTION_NO_AFM\n\n\n  /**************************************************************************\n   *\n   * Define this configuration macro if you want to prevent the compilation\n   * of the Multiple Masters font support in the Type~1 driver.\n   */\n#undef T1_CONFIG_OPTION_NO_MM_SUPPORT\n\n\n  /**************************************************************************\n   *\n   * `T1_CONFIG_OPTION_OLD_ENGINE` controls whether the pre-Adobe Type~1\n   * engine gets compiled into FreeType.  If defined, it is possible to\n   * switch between the two engines using the `hinting-engine` property of\n   * the 'type1' driver module.\n   */\n/* #define T1_CONFIG_OPTION_OLD_ENGINE */\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /****                                                                 ****/\n  /****         C F F   D R I V E R    C O N F I G U R A T I O N        ****/\n  /****                                                                 ****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n  /**************************************************************************\n   *\n   * Using `CFF_CONFIG_OPTION_DARKENING_PARAMETER_{X,Y}{1,2,3,4}` it is\n   * possible to set up the default values of the four control points that\n   * define the stem darkening behaviour of the (new) CFF engine.  For more\n   * details please read the documentation of the `darkening-parameters`\n   * property (file `ftdriver.h`), which allows the control at run-time.\n   *\n   * Do **not** undefine these macros!\n   */\n#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_X1   500\n#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y1   400\n\n#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_X2  1000\n#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y2   275\n\n#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_X3  1667\n#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y3   275\n\n#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_X4  2333\n#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y4     0\n\n\n  /**************************************************************************\n   *\n   * `CFF_CONFIG_OPTION_OLD_ENGINE` controls whether the pre-Adobe CFF engine\n   * gets compiled into FreeType.  If defined, it is possible to switch\n   * between the two engines using the `hinting-engine` property of the 'cff'\n   * driver module.\n   */\n/* #define CFF_CONFIG_OPTION_OLD_ENGINE */\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /****                                                                 ****/\n  /****         P C F   D R I V E R    C O N F I G U R A T I O N        ****/\n  /****                                                                 ****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n  /**************************************************************************\n   *\n   * There are many PCF fonts just called 'Fixed' which look completely\n   * different, and which have nothing to do with each other.  When selecting\n   * 'Fixed' in KDE or Gnome one gets results that appear rather random, the\n   * style changes often if one changes the size and one cannot select some\n   * fonts at all.  This option makes the 'pcf' module prepend the foundry\n   * name (plus a space) to the family name.\n   *\n   * We also check whether we have 'wide' characters; all put together, we\n   * get family names like 'Sony Fixed' or 'Misc Fixed Wide'.\n   *\n   * If this option is activated, it can be controlled with the\n   * `no-long-family-names` property of the 'pcf' driver module.\n   */\n/* #define PCF_CONFIG_OPTION_LONG_FAMILY_NAMES */\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /****                                                                 ****/\n  /****    A U T O F I T   M O D U L E    C O N F I G U R A T I O N     ****/\n  /****                                                                 ****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n  /**************************************************************************\n   *\n   * Compile 'autofit' module with CJK (Chinese, Japanese, Korean) script\n   * support.\n   */\n#define AF_CONFIG_OPTION_CJK\n\n\n  /**************************************************************************\n   *\n   * Compile 'autofit' module with fallback Indic script support, covering\n   * some scripts that the 'latin' submodule of the 'autofit' module doesn't\n   * (yet) handle.  Currently, this needs option `AF_CONFIG_OPTION_CJK`.\n   */\n#ifdef AF_CONFIG_OPTION_CJK\n#define AF_CONFIG_OPTION_INDIC\n#endif\n\n\n  /**************************************************************************\n   *\n   * Use TrueType-like size metrics for 'light' auto-hinting.\n   *\n   * It is strongly recommended to avoid this option, which exists only to\n   * help some legacy applications retain its appearance and behaviour with\n   * respect to auto-hinted TrueType fonts.\n   *\n   * The very reason this option exists at all are GNU/Linux distributions\n   * like Fedora that did not un-patch the following change (which was\n   * present in FreeType between versions 2.4.6 and 2.7.1, inclusive).\n   *\n   * ```\n   *   2011-07-16  Steven Chu  <steven.f.chu@gmail.com>\n   *\n   *     [truetype] Fix metrics on size request for scalable fonts.\n   * ```\n   *\n   * This problematic commit is now reverted (more or less).\n   */\n/* #define AF_CONFIG_OPTION_TT_SIZE_METRICS */\n\n  /* */\n\n\n  /*\n   * This macro is obsolete.  Support has been removed in FreeType version\n   * 2.5.\n   */\n/* #define FT_CONFIG_OPTION_OLD_INTERNALS */\n\n\n  /*\n   * The next three macros are defined if native TrueType hinting is\n   * requested by the definitions above.  Don't change this.\n   */\n#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER\n#define  TT_USE_BYTECODE_INTERPRETER\n\n#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING\n#if TT_CONFIG_OPTION_SUBPIXEL_HINTING & 1\n#define  TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY\n#endif\n\n#if TT_CONFIG_OPTION_SUBPIXEL_HINTING & 2\n#define  TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL\n#endif\n#endif\n#endif\n\n\n  /*\n   * The TT_SUPPORT_COLRV1 macro is defined to indicate to clients that this\n   * version of FreeType has support for 'COLR' v1 API.  This definition is\n   * useful to FreeType clients that want to build in support for 'COLR' v1\n   * depending on a tip-of-tree checkout before it is officially released in\n   * FreeType, and while the feature cannot yet be tested against using\n   * version macros.  Don't change this macro.  This may be removed once the\n   * feature is in a FreeType release version and version macros can be used\n   * to test for availability.\n   */\n#ifdef TT_CONFIG_OPTION_COLOR_LAYERS\n#define  TT_SUPPORT_COLRV1\n#endif\n\n\n  /*\n   * Check CFF darkening parameters.  The checks are the same as in function\n   * `cff_property_set` in file `cffdrivr.c`.\n   */\n#if CFF_CONFIG_OPTION_DARKENING_PARAMETER_X1 < 0   || \\\n    CFF_CONFIG_OPTION_DARKENING_PARAMETER_X2 < 0   || \\\n    CFF_CONFIG_OPTION_DARKENING_PARAMETER_X3 < 0   || \\\n    CFF_CONFIG_OPTION_DARKENING_PARAMETER_X4 < 0   || \\\n                                                      \\\n    CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y1 < 0   || \\\n    CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y2 < 0   || \\\n    CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y3 < 0   || \\\n    CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y4 < 0   || \\\n                                                      \\\n    CFF_CONFIG_OPTION_DARKENING_PARAMETER_X1 >        \\\n      CFF_CONFIG_OPTION_DARKENING_PARAMETER_X2     || \\\n    CFF_CONFIG_OPTION_DARKENING_PARAMETER_X2 >        \\\n      CFF_CONFIG_OPTION_DARKENING_PARAMETER_X3     || \\\n    CFF_CONFIG_OPTION_DARKENING_PARAMETER_X3 >        \\\n      CFF_CONFIG_OPTION_DARKENING_PARAMETER_X4     || \\\n                                                      \\\n    CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y1 > 500 || \\\n    CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y2 > 500 || \\\n    CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y3 > 500 || \\\n    CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y4 > 500\n#error \"Invalid CFF darkening parameters!\"\n#endif\n\nFT_END_HEADER\n\n\n#endif /* FTOPTION_H_ */\n\n\n/* END */\n"
  },
  {
    "path": "thirdparty/freetype/include/freetype2/freetype/config/ftstdlib.h",
    "content": "/****************************************************************************\n *\n * ftstdlib.h\n *\n *   ANSI-specific library and header configuration file (specification\n *   only).\n *\n * Copyright (C) 2002-2021 by\n * David Turner, Robert Wilhelm, and Werner Lemberg.\n *\n * This file is part of the FreeType project, and may only be used,\n * modified, and distributed under the terms of the FreeType project\n * license, LICENSE.TXT.  By continuing to use, modify, or distribute\n * this file you indicate that you have read the license and\n * understand and accept it fully.\n *\n */\n\n\n  /**************************************************************************\n   *\n   * This file is used to group all `#includes` to the ANSI~C library that\n   * FreeType normally requires.  It also defines macros to rename the\n   * standard functions within the FreeType source code.\n   *\n   * Load a file which defines `FTSTDLIB_H_` before this one to override it.\n   *\n   */\n\n\n#ifndef FTSTDLIB_H_\n#define FTSTDLIB_H_\n\n\n#include <stddef.h>\n\n#define ft_ptrdiff_t  ptrdiff_t\n\n\n  /**************************************************************************\n   *\n   *                          integer limits\n   *\n   * `UINT_MAX` and `ULONG_MAX` are used to automatically compute the size of\n   * `int` and `long` in bytes at compile-time.  So far, this works for all\n   * platforms the library has been tested on.\n   *\n   * Note that on the extremely rare platforms that do not provide integer\n   * types that are _exactly_ 16 and 32~bits wide (e.g., some old Crays where\n   * `int` is 36~bits), we do not make any guarantee about the correct\n   * behaviour of FreeType~2 with all fonts.\n   *\n   * In these cases, `ftconfig.h` will refuse to compile anyway with a\n   * message like 'couldn't find 32-bit type' or something similar.\n   *\n   */\n\n\n#include <limits.h>\n\n#define FT_CHAR_BIT    CHAR_BIT\n#define FT_USHORT_MAX  USHRT_MAX\n#define FT_INT_MAX     INT_MAX\n#define FT_INT_MIN     INT_MIN\n#define FT_UINT_MAX    UINT_MAX\n#define FT_LONG_MIN    LONG_MIN\n#define FT_LONG_MAX    LONG_MAX\n#define FT_ULONG_MAX   ULONG_MAX\n\n\n  /**************************************************************************\n   *\n   *                character and string processing\n   *\n   */\n\n\n#include <string.h>\n\n#define ft_memchr   memchr\n#define ft_memcmp   memcmp\n#define ft_memcpy   memcpy\n#define ft_memmove  memmove\n#define ft_memset   memset\n#define ft_strcat   strcat\n#define ft_strcmp   strcmp\n#define ft_strcpy   strcpy\n#define ft_strlen   strlen\n#define ft_strncmp  strncmp\n#define ft_strncpy  strncpy\n#define ft_strrchr  strrchr\n#define ft_strstr   strstr\n\n\n  /**************************************************************************\n   *\n   *                          file handling\n   *\n   */\n\n\n#include <stdio.h>\n\n#define FT_FILE     FILE\n#define ft_fclose   fclose\n#define ft_fopen    fopen\n#define ft_fread    fread\n#define ft_fseek    fseek\n#define ft_ftell    ftell\n#define ft_sprintf  sprintf\n\n\n  /**************************************************************************\n   *\n   *                            sorting\n   *\n   */\n\n\n#include <stdlib.h>\n\n#define ft_qsort  qsort\n\n\n  /**************************************************************************\n   *\n   *                       memory allocation\n   *\n   */\n\n\n#define ft_scalloc   calloc\n#define ft_sfree     free\n#define ft_smalloc   malloc\n#define ft_srealloc  realloc\n\n\n  /**************************************************************************\n   *\n   *                         miscellaneous\n   *\n   */\n\n\n#define ft_strtol  strtol\n#define ft_getenv  getenv\n\n\n  /**************************************************************************\n   *\n   *                        execution control\n   *\n   */\n\n\n#include <setjmp.h>\n\n#define ft_jmp_buf     jmp_buf  /* note: this cannot be a typedef since  */\n                                /*       `jmp_buf` is defined as a macro */\n                                /*       on certain platforms            */\n\n#define ft_longjmp     longjmp\n#define ft_setjmp( b ) setjmp( *(ft_jmp_buf*) &(b) ) /* same thing here */\n\n\n  /* The following is only used for debugging purposes, i.e., if   */\n  /* `FT_DEBUG_LEVEL_ERROR` or `FT_DEBUG_LEVEL_TRACE` are defined. */\n\n#include <stdarg.h>\n\n\n#endif /* FTSTDLIB_H_ */\n\n\n/* END */\n"
  },
  {
    "path": "thirdparty/freetype/include/freetype2/freetype/config/integer-types.h",
    "content": "/****************************************************************************\n *\n * config/integer-types.h\n *\n *   FreeType integer types definitions.\n *\n * Copyright (C) 1996-2021 by\n * David Turner, Robert Wilhelm, and Werner Lemberg.\n *\n * This file is part of the FreeType project, and may only be used,\n * modified, and distributed under the terms of the FreeType project\n * license, LICENSE.TXT.  By continuing to use, modify, or distribute\n * this file you indicate that you have read the license and\n * understand and accept it fully.\n *\n */\n#ifndef FREETYPE_CONFIG_INTEGER_TYPES_H_\n#define FREETYPE_CONFIG_INTEGER_TYPES_H_\n\n  /* There are systems (like the Texas Instruments 'C54x) where a `char`  */\n  /* has 16~bits.  ANSI~C says that `sizeof(char)` is always~1.  Since an */\n  /* `int` has 16~bits also for this system, `sizeof(int)` gives~1 which  */\n  /* is probably unexpected.                                              */\n  /*                                                                      */\n  /* `CHAR_BIT` (defined in `limits.h`) gives the number of bits in a     */\n  /* `char` type.                                                         */\n\n#ifndef FT_CHAR_BIT\n#define FT_CHAR_BIT  CHAR_BIT\n#endif\n\n#ifndef FT_SIZEOF_INT\n\n  /* The size of an `int` type. */\n#if                                 FT_UINT_MAX == 0xFFFFUL\n#define FT_SIZEOF_INT  ( 16 / FT_CHAR_BIT )\n#elif                               FT_UINT_MAX == 0xFFFFFFFFUL\n#define FT_SIZEOF_INT  ( 32 / FT_CHAR_BIT )\n#elif FT_UINT_MAX > 0xFFFFFFFFUL && FT_UINT_MAX == 0xFFFFFFFFFFFFFFFFUL\n#define FT_SIZEOF_INT  ( 64 / FT_CHAR_BIT )\n#else\n#error \"Unsupported size of `int' type!\"\n#endif\n\n#endif  /* !defined(FT_SIZEOF_INT) */\n\n#ifndef FT_SIZEOF_LONG\n\n  /* The size of a `long` type.  A five-byte `long` (as used e.g. on the */\n  /* DM642) is recognized but avoided.                                   */\n#if                                  FT_ULONG_MAX == 0xFFFFFFFFUL\n#define FT_SIZEOF_LONG  ( 32 / FT_CHAR_BIT )\n#elif FT_ULONG_MAX > 0xFFFFFFFFUL && FT_ULONG_MAX == 0xFFFFFFFFFFUL\n#define FT_SIZEOF_LONG  ( 32 / FT_CHAR_BIT )\n#elif FT_ULONG_MAX > 0xFFFFFFFFUL && FT_ULONG_MAX == 0xFFFFFFFFFFFFFFFFUL\n#define FT_SIZEOF_LONG  ( 64 / FT_CHAR_BIT )\n#else\n#error \"Unsupported size of `long' type!\"\n#endif\n\n#endif /* !defined(FT_SIZEOF_LONG) */\n\n  /**************************************************************************\n   *\n   * @section:\n   *   basic_types\n   *\n   */\n\n\n  /**************************************************************************\n   *\n   * @type:\n   *   FT_Int16\n   *\n   * @description:\n   *   A typedef for a 16bit signed integer type.\n   */\n  typedef signed short  FT_Int16;\n\n\n  /**************************************************************************\n   *\n   * @type:\n   *   FT_UInt16\n   *\n   * @description:\n   *   A typedef for a 16bit unsigned integer type.\n   */\n  typedef unsigned short  FT_UInt16;\n\n  /* */\n\n\n  /* this #if 0 ... #endif clause is for documentation purposes */\n#if 0\n\n  /**************************************************************************\n   *\n   * @type:\n   *   FT_Int32\n   *\n   * @description:\n   *   A typedef for a 32bit signed integer type.  The size depends on the\n   *   configuration.\n   */\n  typedef signed XXX  FT_Int32;\n\n\n  /**************************************************************************\n   *\n   * @type:\n   *   FT_UInt32\n   *\n   *   A typedef for a 32bit unsigned integer type.  The size depends on the\n   *   configuration.\n   */\n  typedef unsigned XXX  FT_UInt32;\n\n\n  /**************************************************************************\n   *\n   * @type:\n   *   FT_Int64\n   *\n   *   A typedef for a 64bit signed integer type.  The size depends on the\n   *   configuration.  Only defined if there is real 64bit support;\n   *   otherwise, it gets emulated with a structure (if necessary).\n   */\n  typedef signed XXX  FT_Int64;\n\n\n  /**************************************************************************\n   *\n   * @type:\n   *   FT_UInt64\n   *\n   *   A typedef for a 64bit unsigned integer type.  The size depends on the\n   *   configuration.  Only defined if there is real 64bit support;\n   *   otherwise, it gets emulated with a structure (if necessary).\n   */\n  typedef unsigned XXX  FT_UInt64;\n\n  /* */\n\n#endif\n\n#if FT_SIZEOF_INT == ( 32 / FT_CHAR_BIT )\n\n  typedef signed int      FT_Int32;\n  typedef unsigned int    FT_UInt32;\n\n#elif FT_SIZEOF_LONG == ( 32 / FT_CHAR_BIT )\n\n  typedef signed long     FT_Int32;\n  typedef unsigned long   FT_UInt32;\n\n#else\n#error \"no 32bit type found -- please check your configuration files\"\n#endif\n\n\n  /* look up an integer type that is at least 32~bits */\n#if FT_SIZEOF_INT >= ( 32 / FT_CHAR_BIT )\n\n  typedef int            FT_Fast;\n  typedef unsigned int   FT_UFast;\n\n#elif FT_SIZEOF_LONG >= ( 32 / FT_CHAR_BIT )\n\n  typedef long           FT_Fast;\n  typedef unsigned long  FT_UFast;\n\n#endif\n\n\n  /* determine whether we have a 64-bit `int` type for platforms without */\n  /* Autoconf                                                            */\n#if FT_SIZEOF_LONG == ( 64 / FT_CHAR_BIT )\n\n  /* `FT_LONG64` must be defined if a 64-bit type is available */\n#define FT_LONG64\n#define FT_INT64   long\n#define FT_UINT64  unsigned long\n\n  /**************************************************************************\n   *\n   * A 64-bit data type may create compilation problems if you compile in\n   * strict ANSI mode.  To avoid them, we disable other 64-bit data types if\n   * `__STDC__` is defined.  You can however ignore this rule by defining the\n   * `FT_CONFIG_OPTION_FORCE_INT64` configuration macro.\n   */\n#elif !defined( __STDC__ ) || defined( FT_CONFIG_OPTION_FORCE_INT64 )\n\n#if defined( __STDC_VERSION__ ) && __STDC_VERSION__ >= 199901L\n\n#define FT_LONG64\n#define FT_INT64   long long int\n#define FT_UINT64  unsigned long long int\n\n#elif defined( _MSC_VER ) && _MSC_VER >= 900 /* Visual C++ (and Intel C++) */\n\n  /* this compiler provides the `__int64` type */\n#define FT_LONG64\n#define FT_INT64   __int64\n#define FT_UINT64  unsigned __int64\n\n#elif defined( __BORLANDC__ )  /* Borland C++ */\n\n  /* XXXX: We should probably check the value of `__BORLANDC__` in order */\n  /*       to test the compiler version.                                 */\n\n  /* this compiler provides the `__int64` type */\n#define FT_LONG64\n#define FT_INT64   __int64\n#define FT_UINT64  unsigned __int64\n\n#elif defined( __WATCOMC__ )   /* Watcom C++ */\n\n  /* Watcom doesn't provide 64-bit data types */\n\n#elif defined( __MWERKS__ )    /* Metrowerks CodeWarrior */\n\n#define FT_LONG64\n#define FT_INT64   long long int\n#define FT_UINT64  unsigned long long int\n\n#elif defined( __GNUC__ )\n\n  /* GCC provides the `long long` type */\n#define FT_LONG64\n#define FT_INT64   long long int\n#define FT_UINT64  unsigned long long int\n\n#endif /* __STDC_VERSION__ >= 199901L */\n\n#endif /* FT_SIZEOF_LONG == (64 / FT_CHAR_BIT) */\n\n#ifdef FT_LONG64\n  typedef FT_INT64   FT_Int64;\n  typedef FT_UINT64  FT_UInt64;\n#endif\n\n\n#endif  /* FREETYPE_CONFIG_INTEGER_TYPES_H_ */\n"
  },
  {
    "path": "thirdparty/freetype/include/freetype2/freetype/config/mac-support.h",
    "content": "/****************************************************************************\n *\n * config/mac-support.h\n *\n *   Mac/OS X support configuration header.\n *\n * Copyright (C) 1996-2021 by\n * David Turner, Robert Wilhelm, and Werner Lemberg.\n *\n * This file is part of the FreeType project, and may only be used,\n * modified, and distributed under the terms of the FreeType project\n * license, LICENSE.TXT.  By continuing to use, modify, or distribute\n * this file you indicate that you have read the license and\n * understand and accept it fully.\n *\n */\n#ifndef FREETYPE_CONFIG_MAC_SUPPORT_H_\n#define FREETYPE_CONFIG_MAC_SUPPORT_H_\n\n  /**************************************************************************\n   *\n   * Mac support\n   *\n   *   This is the only necessary change, so it is defined here instead\n   *   providing a new configuration file.\n   */\n#if defined( __APPLE__ ) || ( defined( __MWERKS__ ) && defined( macintosh ) )\n  /* No Carbon frameworks for 64bit 10.4.x.                         */\n  /* `AvailabilityMacros.h` is available since Mac OS X 10.2,       */\n  /* so guess the system version by maximum errno before inclusion. */\n#include <errno.h>\n#ifdef ECANCELED /* defined since 10.2 */\n#include \"AvailabilityMacros.h\"\n#endif\n#if defined( __LP64__ ) && \\\n    ( MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 )\n#undef FT_MACINTOSH\n#endif\n\n#elif defined( __SC__ ) || defined( __MRC__ )\n  /* Classic MacOS compilers */\n#include \"ConditionalMacros.h\"\n#if TARGET_OS_MAC\n#define FT_MACINTOSH 1\n#endif\n\n#endif  /* Mac support */\n\n#endif  /* FREETYPE_CONFIG_MAC_SUPPORT_H_ */\n"
  },
  {
    "path": "thirdparty/freetype/include/freetype2/freetype/config/public-macros.h",
    "content": "/****************************************************************************\n *\n * config/public-macros.h\n *\n *   Define a set of compiler macros used in public FreeType headers.\n *\n * Copyright (C) 2020-2021 by\n * David Turner, Robert Wilhelm, and Werner Lemberg.\n *\n * This file is part of the FreeType project, and may only be used,\n * modified, and distributed under the terms of the FreeType project\n * license, LICENSE.TXT.  By continuing to use, modify, or distribute\n * this file you indicate that you have read the license and\n * understand and accept it fully.\n *\n */\n\n  /*\n   * The definitions in this file are used by the public FreeType headers\n   * and thus should be considered part of the public API.\n   *\n   * Other compiler-specific macro definitions that are not exposed by the\n   * FreeType API should go into\n   * `include/freetype/internal/compiler-macros.h` instead.\n   */\n#ifndef FREETYPE_CONFIG_PUBLIC_MACROS_H_\n#define FREETYPE_CONFIG_PUBLIC_MACROS_H_\n\n  /*\n   * `FT_BEGIN_HEADER` and `FT_END_HEADER` might have already been defined\n   * by `freetype/config/ftheader.h`, but we don't want to include this\n   * header here, so redefine the macros here only when needed.  Their\n   * definition is very stable, so keeping them in sync with the ones in the\n   * header should not be a maintenance issue.\n   */\n#ifndef FT_BEGIN_HEADER\n#ifdef __cplusplus\n#define FT_BEGIN_HEADER  extern \"C\" {\n#else\n#define FT_BEGIN_HEADER  /* empty */\n#endif\n#endif  /* FT_BEGIN_HEADER */\n\n#ifndef FT_END_HEADER\n#ifdef __cplusplus\n#define FT_END_HEADER  }\n#else\n#define FT_END_HEADER  /* empty */\n#endif\n#endif  /* FT_END_HEADER */\n\n\nFT_BEGIN_HEADER\n\n  /*\n   * Mark a function declaration as public.  This ensures it will be\n   * properly exported to client code.  Place this before a function\n   * declaration.\n   *\n   * NOTE: This macro should be considered an internal implementation\n   * detail, and not part of the FreeType API.  It is only defined here\n   * because it is needed by `FT_EXPORT`.\n   */\n\n  /* Visual C, mingw */\n#if defined( WIN32 )\n\n#if defined( FT2_BUILD_LIBRARY ) && defined( DLL_EXPORT )\n#define FT_PUBLIC_FUNCTION_ATTRIBUTE  __declspec( dllexport )\n#elif defined( DLL_IMPORT )\n#define FT_PUBLIC_FUNCTION_ATTRIBUTE  __declspec( dllimport )\n#endif\n\n  /* gcc, clang */\n#elif ( defined( __GNUC__ ) && __GNUC__ >= 4 ) || defined( __clang__ )\n#define FT_PUBLIC_FUNCTION_ATTRIBUTE \\\n          __attribute__(( visibility( \"default\" ) ))\n\n  /* Sun */\n#elif defined( __SUNPRO_C ) && __SUNPRO_C >= 0x550\n#define FT_PUBLIC_FUNCTION_ATTRIBUTE  __global\n#endif\n\n\n#ifndef FT_PUBLIC_FUNCTION_ATTRIBUTE\n#define FT_PUBLIC_FUNCTION_ATTRIBUTE  /* empty */\n#endif\n\n\n  /*\n   * Define a public FreeType API function.  This ensures it is properly\n   * exported or imported at build time.  The macro parameter is the\n   * function's return type as in:\n   *\n   *   FT_EXPORT( FT_Bool )\n   *   FT_Object_Method( FT_Object  obj,\n   *                     ... );\n   *\n   * NOTE: This requires that all `FT_EXPORT` uses are inside\n   * `FT_BEGIN_HEADER ... FT_END_HEADER` blocks.  This guarantees that the\n   * functions are exported with C linkage, even when the header is included\n   * by a C++ source file.\n   */\n#define FT_EXPORT( x )  FT_PUBLIC_FUNCTION_ATTRIBUTE extern x\n\n  /*\n   * `FT_UNUSED` indicates that a given parameter is not used -- this is\n   * only used to get rid of unpleasant compiler warnings.\n   *\n   * Technically, this was not meant to be part of the public API, but some\n   * third-party code depends on it.\n   */\n#ifndef FT_UNUSED\n#define FT_UNUSED( arg )  ( (arg) = (arg) )\n#endif\n\n\nFT_END_HEADER\n\n#endif  /* FREETYPE_CONFIG_PUBLIC_MACROS_H_ */\n"
  },
  {
    "path": "thirdparty/freetype/include/freetype2/freetype/freetype.h",
    "content": "/****************************************************************************\n *\n * freetype.h\n *\n *   FreeType high-level API and common types (specification only).\n *\n * Copyright (C) 1996-2021 by\n * David Turner, Robert Wilhelm, and Werner Lemberg.\n *\n * This file is part of the FreeType project, and may only be used,\n * modified, and distributed under the terms of the FreeType project\n * license, LICENSE.TXT.  By continuing to use, modify, or distribute\n * this file you indicate that you have read the license and\n * understand and accept it fully.\n *\n */\n\n\n#ifndef FREETYPE_H_\n#define FREETYPE_H_\n\n\n#include <ft2build.h>\n#include FT_CONFIG_CONFIG_H\n#include <freetype/fttypes.h>\n#include <freetype/fterrors.h>\n\n\nFT_BEGIN_HEADER\n\n\n\n  /**************************************************************************\n   *\n   * @section:\n   *   preamble\n   *\n   * @title:\n   *   Preamble\n   *\n   * @abstract:\n   *   What FreeType is and isn't\n   *\n   * @description:\n   *   FreeType is a library that provides access to glyphs in font files.  It\n   *   scales the glyph images and their metrics to a requested size, and it\n   *   rasterizes the glyph images to produce pixel or subpixel alpha coverage\n   *   bitmaps.\n   *\n   *   Note that FreeType is _not_ a text layout engine.  You have to use\n   *   higher-level libraries like HarfBuzz, Pango, or ICU for that.\n   *\n   *   Note also that FreeType does _not_ perform alpha blending or\n   *   compositing the resulting bitmaps or pixmaps by itself.  Use your\n   *   favourite graphics library (for example, Cairo or Skia) to further\n   *   process FreeType's output.\n   *\n   */\n\n\n  /**************************************************************************\n   *\n   * @section:\n   *   header_inclusion\n   *\n   * @title:\n   *   FreeType's header inclusion scheme\n   *\n   * @abstract:\n   *   How client applications should include FreeType header files.\n   *\n   * @description:\n   *   To be as flexible as possible (and for historical reasons), you must\n   *   load file `ft2build.h` first before other header files, for example\n   *\n   *   ```\n   *     #include <ft2build.h>\n   *\n   *     #include <freetype/freetype.h>\n   *     #include <freetype/ftoutln.h>\n   *   ```\n   */\n\n\n  /**************************************************************************\n   *\n   * @section:\n   *   user_allocation\n   *\n   * @title:\n   *   User allocation\n   *\n   * @abstract:\n   *   How client applications should allocate FreeType data structures.\n   *\n   * @description:\n   *   FreeType assumes that structures allocated by the user and passed as\n   *   arguments are zeroed out except for the actual data.  In other words,\n   *   it is recommended to use `calloc` (or variants of it) instead of\n   *   `malloc` for allocation.\n   *\n   */\n\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*                                                                       */\n  /*                        B A S I C   T Y P E S                          */\n  /*                                                                       */\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n  /**************************************************************************\n   *\n   * @section:\n   *   base_interface\n   *\n   * @title:\n   *   Base Interface\n   *\n   * @abstract:\n   *   The FreeType~2 base font interface.\n   *\n   * @description:\n   *   This section describes the most important public high-level API\n   *   functions of FreeType~2.\n   *\n   * @order:\n   *   FT_Library\n   *   FT_Face\n   *   FT_Size\n   *   FT_GlyphSlot\n   *   FT_CharMap\n   *   FT_Encoding\n   *   FT_ENC_TAG\n   *\n   *   FT_FaceRec\n   *\n   *   FT_FACE_FLAG_SCALABLE\n   *   FT_FACE_FLAG_FIXED_SIZES\n   *   FT_FACE_FLAG_FIXED_WIDTH\n   *   FT_FACE_FLAG_HORIZONTAL\n   *   FT_FACE_FLAG_VERTICAL\n   *   FT_FACE_FLAG_COLOR\n   *   FT_FACE_FLAG_SFNT\n   *   FT_FACE_FLAG_CID_KEYED\n   *   FT_FACE_FLAG_TRICKY\n   *   FT_FACE_FLAG_KERNING\n   *   FT_FACE_FLAG_MULTIPLE_MASTERS\n   *   FT_FACE_FLAG_VARIATION\n   *   FT_FACE_FLAG_GLYPH_NAMES\n   *   FT_FACE_FLAG_EXTERNAL_STREAM\n   *   FT_FACE_FLAG_HINTER\n   *\n   *   FT_HAS_HORIZONTAL\n   *   FT_HAS_VERTICAL\n   *   FT_HAS_KERNING\n   *   FT_HAS_FIXED_SIZES\n   *   FT_HAS_GLYPH_NAMES\n   *   FT_HAS_COLOR\n   *   FT_HAS_MULTIPLE_MASTERS\n   *\n   *   FT_IS_SFNT\n   *   FT_IS_SCALABLE\n   *   FT_IS_FIXED_WIDTH\n   *   FT_IS_CID_KEYED\n   *   FT_IS_TRICKY\n   *   FT_IS_NAMED_INSTANCE\n   *   FT_IS_VARIATION\n   *\n   *   FT_STYLE_FLAG_BOLD\n   *   FT_STYLE_FLAG_ITALIC\n   *\n   *   FT_SizeRec\n   *   FT_Size_Metrics\n   *\n   *   FT_GlyphSlotRec\n   *   FT_Glyph_Metrics\n   *   FT_SubGlyph\n   *\n   *   FT_Bitmap_Size\n   *\n   *   FT_Init_FreeType\n   *   FT_Done_FreeType\n   *\n   *   FT_New_Face\n   *   FT_Done_Face\n   *   FT_Reference_Face\n   *   FT_New_Memory_Face\n   *   FT_Face_Properties\n   *   FT_Open_Face\n   *   FT_Open_Args\n   *   FT_Parameter\n   *   FT_Attach_File\n   *   FT_Attach_Stream\n   *\n   *   FT_Set_Char_Size\n   *   FT_Set_Pixel_Sizes\n   *   FT_Request_Size\n   *   FT_Select_Size\n   *   FT_Size_Request_Type\n   *   FT_Size_RequestRec\n   *   FT_Size_Request\n   *   FT_Set_Transform\n   *   FT_Get_Transform\n   *   FT_Load_Glyph\n   *   FT_Get_Char_Index\n   *   FT_Get_First_Char\n   *   FT_Get_Next_Char\n   *   FT_Get_Name_Index\n   *   FT_Load_Char\n   *\n   *   FT_OPEN_MEMORY\n   *   FT_OPEN_STREAM\n   *   FT_OPEN_PATHNAME\n   *   FT_OPEN_DRIVER\n   *   FT_OPEN_PARAMS\n   *\n   *   FT_LOAD_DEFAULT\n   *   FT_LOAD_RENDER\n   *   FT_LOAD_MONOCHROME\n   *   FT_LOAD_LINEAR_DESIGN\n   *   FT_LOAD_NO_SCALE\n   *   FT_LOAD_NO_HINTING\n   *   FT_LOAD_NO_BITMAP\n   *   FT_LOAD_NO_AUTOHINT\n   *   FT_LOAD_COLOR\n   *\n   *   FT_LOAD_VERTICAL_LAYOUT\n   *   FT_LOAD_IGNORE_TRANSFORM\n   *   FT_LOAD_FORCE_AUTOHINT\n   *   FT_LOAD_NO_RECURSE\n   *   FT_LOAD_PEDANTIC\n   *\n   *   FT_LOAD_TARGET_NORMAL\n   *   FT_LOAD_TARGET_LIGHT\n   *   FT_LOAD_TARGET_MONO\n   *   FT_LOAD_TARGET_LCD\n   *   FT_LOAD_TARGET_LCD_V\n   *\n   *   FT_LOAD_TARGET_MODE\n   *\n   *   FT_Render_Glyph\n   *   FT_Render_Mode\n   *   FT_Get_Kerning\n   *   FT_Kerning_Mode\n   *   FT_Get_Track_Kerning\n   *   FT_Get_Glyph_Name\n   *   FT_Get_Postscript_Name\n   *\n   *   FT_CharMapRec\n   *   FT_Select_Charmap\n   *   FT_Set_Charmap\n   *   FT_Get_Charmap_Index\n   *\n   *   FT_Get_FSType_Flags\n   *   FT_Get_SubGlyph_Info\n   *\n   *   FT_Face_Internal\n   *   FT_Size_Internal\n   *   FT_Slot_Internal\n   *\n   *   FT_FACE_FLAG_XXX\n   *   FT_STYLE_FLAG_XXX\n   *   FT_OPEN_XXX\n   *   FT_LOAD_XXX\n   *   FT_LOAD_TARGET_XXX\n   *   FT_SUBGLYPH_FLAG_XXX\n   *   FT_FSTYPE_XXX\n   *\n   *   FT_HAS_FAST_GLYPHS\n   *\n   */\n\n\n  /**************************************************************************\n   *\n   * @struct:\n   *   FT_Glyph_Metrics\n   *\n   * @description:\n   *   A structure to model the metrics of a single glyph.  The values are\n   *   expressed in 26.6 fractional pixel format; if the flag\n   *   @FT_LOAD_NO_SCALE has been used while loading the glyph, values are\n   *   expressed in font units instead.\n   *\n   * @fields:\n   *   width ::\n   *     The glyph's width.\n   *\n   *   height ::\n   *     The glyph's height.\n   *\n   *   horiBearingX ::\n   *     Left side bearing for horizontal layout.\n   *\n   *   horiBearingY ::\n   *     Top side bearing for horizontal layout.\n   *\n   *   horiAdvance ::\n   *     Advance width for horizontal layout.\n   *\n   *   vertBearingX ::\n   *     Left side bearing for vertical layout.\n   *\n   *   vertBearingY ::\n   *     Top side bearing for vertical layout.  Larger positive values mean\n   *     further below the vertical glyph origin.\n   *\n   *   vertAdvance ::\n   *     Advance height for vertical layout.  Positive values mean the glyph\n   *     has a positive advance downward.\n   *\n   * @note:\n   *   If not disabled with @FT_LOAD_NO_HINTING, the values represent\n   *   dimensions of the hinted glyph (in case hinting is applicable).\n   *\n   *   Stroking a glyph with an outside border does not increase\n   *   `horiAdvance` or `vertAdvance`; you have to manually adjust these\n   *   values to account for the added width and height.\n   *\n   *   FreeType doesn't use the 'VORG' table data for CFF fonts because it\n   *   doesn't have an interface to quickly retrieve the glyph height.  The\n   *   y~coordinate of the vertical origin can be simply computed as\n   *   `vertBearingY + height` after loading a glyph.\n   */\n  typedef struct  FT_Glyph_Metrics_\n  {\n    FT_Pos  width;\n    FT_Pos  height;\n\n    FT_Pos  horiBearingX;\n    FT_Pos  horiBearingY;\n    FT_Pos  horiAdvance;\n\n    FT_Pos  vertBearingX;\n    FT_Pos  vertBearingY;\n    FT_Pos  vertAdvance;\n\n  } FT_Glyph_Metrics;\n\n\n  /**************************************************************************\n   *\n   * @struct:\n   *   FT_Bitmap_Size\n   *\n   * @description:\n   *   This structure models the metrics of a bitmap strike (i.e., a set of\n   *   glyphs for a given point size and resolution) in a bitmap font.  It is\n   *   used for the `available_sizes` field of @FT_Face.\n   *\n   * @fields:\n   *   height ::\n   *     The vertical distance, in pixels, between two consecutive baselines.\n   *     It is always positive.\n   *\n   *   width ::\n   *     The average width, in pixels, of all glyphs in the strike.\n   *\n   *   size ::\n   *     The nominal size of the strike in 26.6 fractional points.  This\n   *     field is not very useful.\n   *\n   *   x_ppem ::\n   *     The horizontal ppem (nominal width) in 26.6 fractional pixels.\n   *\n   *   y_ppem ::\n   *     The vertical ppem (nominal height) in 26.6 fractional pixels.\n   *\n   * @note:\n   *   Windows FNT:\n   *     The nominal size given in a FNT font is not reliable.  If the driver\n   *     finds it incorrect, it sets `size` to some calculated values, and\n   *     `x_ppem` and `y_ppem` to the pixel width and height given in the\n   *     font, respectively.\n   *\n   *   TrueType embedded bitmaps:\n   *     `size`, `width`, and `height` values are not contained in the bitmap\n   *     strike itself.  They are computed from the global font parameters.\n   */\n  typedef struct  FT_Bitmap_Size_\n  {\n    FT_Short  height;\n    FT_Short  width;\n\n    FT_Pos    size;\n\n    FT_Pos    x_ppem;\n    FT_Pos    y_ppem;\n\n  } FT_Bitmap_Size;\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*                                                                       */\n  /*                     O B J E C T   C L A S S E S                       */\n  /*                                                                       */\n  /*************************************************************************/\n  /*************************************************************************/\n\n  /**************************************************************************\n   *\n   * @type:\n   *   FT_Library\n   *\n   * @description:\n   *   A handle to a FreeType library instance.  Each 'library' is completely\n   *   independent from the others; it is the 'root' of a set of objects like\n   *   fonts, faces, sizes, etc.\n   *\n   *   It also embeds a memory manager (see @FT_Memory), as well as a\n   *   scan-line converter object (see @FT_Raster).\n   *\n   *   [Since 2.5.6] In multi-threaded applications it is easiest to use one\n   *   `FT_Library` object per thread.  In case this is too cumbersome, a\n   *   single `FT_Library` object across threads is possible also, as long as\n   *   a mutex lock is used around @FT_New_Face and @FT_Done_Face.\n   *\n   * @note:\n   *   Library objects are normally created by @FT_Init_FreeType, and\n   *   destroyed with @FT_Done_FreeType.  If you need reference-counting\n   *   (cf. @FT_Reference_Library), use @FT_New_Library and @FT_Done_Library.\n   */\n  typedef struct FT_LibraryRec_  *FT_Library;\n\n\n  /**************************************************************************\n   *\n   * @section:\n   *   module_management\n   *\n   */\n\n  /**************************************************************************\n   *\n   * @type:\n   *   FT_Module\n   *\n   * @description:\n   *   A handle to a given FreeType module object.  A module can be a font\n   *   driver, a renderer, or anything else that provides services to the\n   *   former.\n   */\n  typedef struct FT_ModuleRec_*  FT_Module;\n\n\n  /**************************************************************************\n   *\n   * @type:\n   *   FT_Driver\n   *\n   * @description:\n   *   A handle to a given FreeType font driver object.  A font driver is a\n   *   module capable of creating faces from font files.\n   */\n  typedef struct FT_DriverRec_*  FT_Driver;\n\n\n  /**************************************************************************\n   *\n   * @type:\n   *   FT_Renderer\n   *\n   * @description:\n   *   A handle to a given FreeType renderer.  A renderer is a module in\n   *   charge of converting a glyph's outline image to a bitmap.  It supports\n   *   a single glyph image format, and one or more target surface depths.\n   */\n  typedef struct FT_RendererRec_*  FT_Renderer;\n\n\n  /**************************************************************************\n   *\n   * @section:\n   *   base_interface\n   *\n   */\n\n  /**************************************************************************\n   *\n   * @type:\n   *   FT_Face\n   *\n   * @description:\n   *   A handle to a typographic face object.  A face object models a given\n   *   typeface, in a given style.\n   *\n   * @note:\n   *   A face object also owns a single @FT_GlyphSlot object, as well as one\n   *   or more @FT_Size objects.\n   *\n   *   Use @FT_New_Face or @FT_Open_Face to create a new face object from a\n   *   given filepath or a custom input stream.\n   *\n   *   Use @FT_Done_Face to destroy it (along with its slot and sizes).\n   *\n   *   An `FT_Face` object can only be safely used from one thread at a time.\n   *   Similarly, creation and destruction of `FT_Face` with the same\n   *   @FT_Library object can only be done from one thread at a time.  On the\n   *   other hand, functions like @FT_Load_Glyph and its siblings are\n   *   thread-safe and do not need the lock to be held as long as the same\n   *   `FT_Face` object is not used from multiple threads at the same time.\n   *\n   * @also:\n   *   See @FT_FaceRec for the publicly accessible fields of a given face\n   *   object.\n   */\n  typedef struct FT_FaceRec_*  FT_Face;\n\n\n  /**************************************************************************\n   *\n   * @type:\n   *   FT_Size\n   *\n   * @description:\n   *   A handle to an object that models a face scaled to a given character\n   *   size.\n   *\n   * @note:\n   *   An @FT_Face has one _active_ @FT_Size object that is used by functions\n   *   like @FT_Load_Glyph to determine the scaling transformation that in\n   *   turn is used to load and hint glyphs and metrics.\n   *\n   *   You can use @FT_Set_Char_Size, @FT_Set_Pixel_Sizes, @FT_Request_Size\n   *   or even @FT_Select_Size to change the content (i.e., the scaling\n   *   values) of the active @FT_Size.\n   *\n   *   You can use @FT_New_Size to create additional size objects for a given\n   *   @FT_Face, but they won't be used by other functions until you activate\n   *   it through @FT_Activate_Size.  Only one size can be activated at any\n   *   given time per face.\n   *\n   * @also:\n   *   See @FT_SizeRec for the publicly accessible fields of a given size\n   *   object.\n   */\n  typedef struct FT_SizeRec_*  FT_Size;\n\n\n  /**************************************************************************\n   *\n   * @type:\n   *   FT_GlyphSlot\n   *\n   * @description:\n   *   A handle to a given 'glyph slot'.  A slot is a container that can hold\n   *   any of the glyphs contained in its parent face.\n   *\n   *   In other words, each time you call @FT_Load_Glyph or @FT_Load_Char,\n   *   the slot's content is erased by the new glyph data, i.e., the glyph's\n   *   metrics, its image (bitmap or outline), and other control information.\n   *\n   * @also:\n   *   See @FT_GlyphSlotRec for the publicly accessible glyph fields.\n   */\n  typedef struct FT_GlyphSlotRec_*  FT_GlyphSlot;\n\n\n  /**************************************************************************\n   *\n   * @type:\n   *   FT_CharMap\n   *\n   * @description:\n   *   A handle to a character map (usually abbreviated to 'charmap').  A\n   *   charmap is used to translate character codes in a given encoding into\n   *   glyph indexes for its parent's face.  Some font formats may provide\n   *   several charmaps per font.\n   *\n   *   Each face object owns zero or more charmaps, but only one of them can\n   *   be 'active', providing the data used by @FT_Get_Char_Index or\n   *   @FT_Load_Char.\n   *\n   *   The list of available charmaps in a face is available through the\n   *   `face->num_charmaps` and `face->charmaps` fields of @FT_FaceRec.\n   *\n   *   The currently active charmap is available as `face->charmap`.  You\n   *   should call @FT_Set_Charmap to change it.\n   *\n   * @note:\n   *   When a new face is created (either through @FT_New_Face or\n   *   @FT_Open_Face), the library looks for a Unicode charmap within the\n   *   list and automatically activates it.  If there is no Unicode charmap,\n   *   FreeType doesn't set an 'active' charmap.\n   *\n   * @also:\n   *   See @FT_CharMapRec for the publicly accessible fields of a given\n   *   character map.\n   */\n  typedef struct FT_CharMapRec_*  FT_CharMap;\n\n\n  /**************************************************************************\n   *\n   * @macro:\n   *   FT_ENC_TAG\n   *\n   * @description:\n   *   This macro converts four-letter tags into an unsigned long.  It is\n   *   used to define 'encoding' identifiers (see @FT_Encoding).\n   *\n   * @note:\n   *   Since many 16-bit compilers don't like 32-bit enumerations, you should\n   *   redefine this macro in case of problems to something like this:\n   *\n   *   ```\n   *     #define FT_ENC_TAG( value, a, b, c, d )  value\n   *   ```\n   *\n   *   to get a simple enumeration without assigning special numbers.\n   */\n\n#ifndef FT_ENC_TAG\n#define FT_ENC_TAG( value, a, b, c, d )         \\\n          value = ( ( (FT_UInt32)(a) << 24 ) |  \\\n                    ( (FT_UInt32)(b) << 16 ) |  \\\n                    ( (FT_UInt32)(c) <<  8 ) |  \\\n                      (FT_UInt32)(d)         )\n\n#endif /* FT_ENC_TAG */\n\n\n  /**************************************************************************\n   *\n   * @enum:\n   *   FT_Encoding\n   *\n   * @description:\n   *   An enumeration to specify character sets supported by charmaps.  Used\n   *   in the @FT_Select_Charmap API function.\n   *\n   * @note:\n   *   Despite the name, this enumeration lists specific character\n   *   repertories (i.e., charsets), and not text encoding methods (e.g.,\n   *   UTF-8, UTF-16, etc.).\n   *\n   *   Other encodings might be defined in the future.\n   *\n   * @values:\n   *   FT_ENCODING_NONE ::\n   *     The encoding value~0 is reserved for all formats except BDF, PCF,\n   *     and Windows FNT; see below for more information.\n   *\n   *   FT_ENCODING_UNICODE ::\n   *     The Unicode character set.  This value covers all versions of the\n   *     Unicode repertoire, including ASCII and Latin-1.  Most fonts include\n   *     a Unicode charmap, but not all of them.\n   *\n   *     For example, if you want to access Unicode value U+1F028 (and the\n   *     font contains it), use value 0x1F028 as the input value for\n   *     @FT_Get_Char_Index.\n   *\n   *   FT_ENCODING_MS_SYMBOL ::\n   *     Microsoft Symbol encoding, used to encode mathematical symbols and\n   *     wingdings.  For more information, see\n   *     'https://www.microsoft.com/typography/otspec/recom.htm#non-standard-symbol-fonts',\n   *     'http://www.kostis.net/charsets/symbol.htm', and\n   *     'http://www.kostis.net/charsets/wingding.htm'.\n   *\n   *     This encoding uses character codes from the PUA (Private Unicode\n   *     Area) in the range U+F020-U+F0FF.\n   *\n   *   FT_ENCODING_SJIS ::\n   *     Shift JIS encoding for Japanese.  More info at\n   *     'https://en.wikipedia.org/wiki/Shift_JIS'.  See note on multi-byte\n   *     encodings below.\n   *\n   *   FT_ENCODING_PRC ::\n   *     Corresponds to encoding systems mainly for Simplified Chinese as\n   *     used in People's Republic of China (PRC).  The encoding layout is\n   *     based on GB~2312 and its supersets GBK and GB~18030.\n   *\n   *   FT_ENCODING_BIG5 ::\n   *     Corresponds to an encoding system for Traditional Chinese as used in\n   *     Taiwan and Hong Kong.\n   *\n   *   FT_ENCODING_WANSUNG ::\n   *     Corresponds to the Korean encoding system known as Extended Wansung\n   *     (MS Windows code page 949).  For more information see\n   *     'https://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WindowsBestFit/bestfit949.txt'.\n   *\n   *   FT_ENCODING_JOHAB ::\n   *     The Korean standard character set (KS~C 5601-1992), which\n   *     corresponds to MS Windows code page 1361.  This character set\n   *     includes all possible Hangul character combinations.\n   *\n   *   FT_ENCODING_ADOBE_LATIN_1 ::\n   *     Corresponds to a Latin-1 encoding as defined in a Type~1 PostScript\n   *     font.  It is limited to 256 character codes.\n   *\n   *   FT_ENCODING_ADOBE_STANDARD ::\n   *     Adobe Standard encoding, as found in Type~1, CFF, and OpenType/CFF\n   *     fonts.  It is limited to 256 character codes.\n   *\n   *   FT_ENCODING_ADOBE_EXPERT ::\n   *     Adobe Expert encoding, as found in Type~1, CFF, and OpenType/CFF\n   *     fonts.  It is limited to 256 character codes.\n   *\n   *   FT_ENCODING_ADOBE_CUSTOM ::\n   *     Corresponds to a custom encoding, as found in Type~1, CFF, and\n   *     OpenType/CFF fonts.  It is limited to 256 character codes.\n   *\n   *   FT_ENCODING_APPLE_ROMAN ::\n   *     Apple roman encoding.  Many TrueType and OpenType fonts contain a\n   *     charmap for this 8-bit encoding, since older versions of Mac OS are\n   *     able to use it.\n   *\n   *   FT_ENCODING_OLD_LATIN_2 ::\n   *     This value is deprecated and was neither used nor reported by\n   *     FreeType.  Don't use or test for it.\n   *\n   *   FT_ENCODING_MS_SJIS ::\n   *     Same as FT_ENCODING_SJIS.  Deprecated.\n   *\n   *   FT_ENCODING_MS_GB2312 ::\n   *     Same as FT_ENCODING_PRC.  Deprecated.\n   *\n   *   FT_ENCODING_MS_BIG5 ::\n   *     Same as FT_ENCODING_BIG5.  Deprecated.\n   *\n   *   FT_ENCODING_MS_WANSUNG ::\n   *     Same as FT_ENCODING_WANSUNG.  Deprecated.\n   *\n   *   FT_ENCODING_MS_JOHAB ::\n   *     Same as FT_ENCODING_JOHAB.  Deprecated.\n   *\n   * @note:\n   *   By default, FreeType enables a Unicode charmap and tags it with\n   *   `FT_ENCODING_UNICODE` when it is either provided or can be generated\n   *   from PostScript glyph name dictionaries in the font file.  All other\n   *   encodings are considered legacy and tagged only if explicitly defined\n   *   in the font file.  Otherwise, `FT_ENCODING_NONE` is used.\n   *\n   *   `FT_ENCODING_NONE` is set by the BDF and PCF drivers if the charmap is\n   *   neither Unicode nor ISO-8859-1 (otherwise it is set to\n   *   `FT_ENCODING_UNICODE`).  Use @FT_Get_BDF_Charset_ID to find out which\n   *   encoding is really present.  If, for example, the `cs_registry` field\n   *   is 'KOI8' and the `cs_encoding` field is 'R', the font is encoded in\n   *   KOI8-R.\n   *\n   *   `FT_ENCODING_NONE` is always set (with a single exception) by the\n   *   winfonts driver.  Use @FT_Get_WinFNT_Header and examine the `charset`\n   *   field of the @FT_WinFNT_HeaderRec structure to find out which encoding\n   *   is really present.  For example, @FT_WinFNT_ID_CP1251 (204) means\n   *   Windows code page 1251 (for Russian).\n   *\n   *   `FT_ENCODING_NONE` is set if `platform_id` is @TT_PLATFORM_MACINTOSH\n   *   and `encoding_id` is not `TT_MAC_ID_ROMAN` (otherwise it is set to\n   *   `FT_ENCODING_APPLE_ROMAN`).\n   *\n   *   If `platform_id` is @TT_PLATFORM_MACINTOSH, use the function\n   *   @FT_Get_CMap_Language_ID to query the Mac language ID that may be\n   *   needed to be able to distinguish Apple encoding variants.  See\n   *\n   *     https://www.unicode.org/Public/MAPPINGS/VENDORS/APPLE/Readme.txt\n   *\n   *   to get an idea how to do that.  Basically, if the language ID is~0,\n   *   don't use it, otherwise subtract 1 from the language ID.  Then examine\n   *   `encoding_id`.  If, for example, `encoding_id` is `TT_MAC_ID_ROMAN`\n   *   and the language ID (minus~1) is `TT_MAC_LANGID_GREEK`, it is the\n   *   Greek encoding, not Roman.  `TT_MAC_ID_ARABIC` with\n   *   `TT_MAC_LANGID_FARSI` means the Farsi variant the Arabic encoding.\n   */\n  typedef enum  FT_Encoding_\n  {\n    FT_ENC_TAG( FT_ENCODING_NONE, 0, 0, 0, 0 ),\n\n    FT_ENC_TAG( FT_ENCODING_MS_SYMBOL, 's', 'y', 'm', 'b' ),\n    FT_ENC_TAG( FT_ENCODING_UNICODE,   'u', 'n', 'i', 'c' ),\n\n    FT_ENC_TAG( FT_ENCODING_SJIS,    's', 'j', 'i', 's' ),\n    FT_ENC_TAG( FT_ENCODING_PRC,     'g', 'b', ' ', ' ' ),\n    FT_ENC_TAG( FT_ENCODING_BIG5,    'b', 'i', 'g', '5' ),\n    FT_ENC_TAG( FT_ENCODING_WANSUNG, 'w', 'a', 'n', 's' ),\n    FT_ENC_TAG( FT_ENCODING_JOHAB,   'j', 'o', 'h', 'a' ),\n\n    /* for backward compatibility */\n    FT_ENCODING_GB2312     = FT_ENCODING_PRC,\n    FT_ENCODING_MS_SJIS    = FT_ENCODING_SJIS,\n    FT_ENCODING_MS_GB2312  = FT_ENCODING_PRC,\n    FT_ENCODING_MS_BIG5    = FT_ENCODING_BIG5,\n    FT_ENCODING_MS_WANSUNG = FT_ENCODING_WANSUNG,\n    FT_ENCODING_MS_JOHAB   = FT_ENCODING_JOHAB,\n\n    FT_ENC_TAG( FT_ENCODING_ADOBE_STANDARD, 'A', 'D', 'O', 'B' ),\n    FT_ENC_TAG( FT_ENCODING_ADOBE_EXPERT,   'A', 'D', 'B', 'E' ),\n    FT_ENC_TAG( FT_ENCODING_ADOBE_CUSTOM,   'A', 'D', 'B', 'C' ),\n    FT_ENC_TAG( FT_ENCODING_ADOBE_LATIN_1,  'l', 'a', 't', '1' ),\n\n    FT_ENC_TAG( FT_ENCODING_OLD_LATIN_2, 'l', 'a', 't', '2' ),\n\n    FT_ENC_TAG( FT_ENCODING_APPLE_ROMAN, 'a', 'r', 'm', 'n' )\n\n  } FT_Encoding;\n\n\n  /* these constants are deprecated; use the corresponding `FT_Encoding` */\n  /* values instead                                                      */\n#define ft_encoding_none            FT_ENCODING_NONE\n#define ft_encoding_unicode         FT_ENCODING_UNICODE\n#define ft_encoding_symbol          FT_ENCODING_MS_SYMBOL\n#define ft_encoding_latin_1         FT_ENCODING_ADOBE_LATIN_1\n#define ft_encoding_latin_2         FT_ENCODING_OLD_LATIN_2\n#define ft_encoding_sjis            FT_ENCODING_SJIS\n#define ft_encoding_gb2312          FT_ENCODING_PRC\n#define ft_encoding_big5            FT_ENCODING_BIG5\n#define ft_encoding_wansung         FT_ENCODING_WANSUNG\n#define ft_encoding_johab           FT_ENCODING_JOHAB\n\n#define ft_encoding_adobe_standard  FT_ENCODING_ADOBE_STANDARD\n#define ft_encoding_adobe_expert    FT_ENCODING_ADOBE_EXPERT\n#define ft_encoding_adobe_custom    FT_ENCODING_ADOBE_CUSTOM\n#define ft_encoding_apple_roman     FT_ENCODING_APPLE_ROMAN\n\n\n  /**************************************************************************\n   *\n   * @struct:\n   *   FT_CharMapRec\n   *\n   * @description:\n   *   The base charmap structure.\n   *\n   * @fields:\n   *   face ::\n   *     A handle to the parent face object.\n   *\n   *   encoding ::\n   *     An @FT_Encoding tag identifying the charmap.  Use this with\n   *     @FT_Select_Charmap.\n   *\n   *   platform_id ::\n   *     An ID number describing the platform for the following encoding ID.\n   *     This comes directly from the TrueType specification and gets\n   *     emulated for other formats.\n   *\n   *   encoding_id ::\n   *     A platform-specific encoding number.  This also comes from the\n   *     TrueType specification and gets emulated similarly.\n   */\n  typedef struct  FT_CharMapRec_\n  {\n    FT_Face      face;\n    FT_Encoding  encoding;\n    FT_UShort    platform_id;\n    FT_UShort    encoding_id;\n\n  } FT_CharMapRec;\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*                                                                       */\n  /*                 B A S E   O B J E C T   C L A S S E S                 */\n  /*                                                                       */\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n  /**************************************************************************\n   *\n   * @type:\n   *   FT_Face_Internal\n   *\n   * @description:\n   *   An opaque handle to an `FT_Face_InternalRec` structure that models the\n   *   private data of a given @FT_Face object.\n   *\n   *   This structure might change between releases of FreeType~2 and is not\n   *   generally available to client applications.\n   */\n  typedef struct FT_Face_InternalRec_*  FT_Face_Internal;\n\n\n  /**************************************************************************\n   *\n   * @struct:\n   *   FT_FaceRec\n   *\n   * @description:\n   *   FreeType root face class structure.  A face object models a typeface\n   *   in a font file.\n   *\n   * @fields:\n   *   num_faces ::\n   *     The number of faces in the font file.  Some font formats can have\n   *     multiple faces in a single font file.\n   *\n   *   face_index ::\n   *     This field holds two different values.  Bits 0-15 are the index of\n   *     the face in the font file (starting with value~0).  They are set\n   *     to~0 if there is only one face in the font file.\n   *\n   *     [Since 2.6.1] Bits 16-30 are relevant to GX and OpenType variation\n   *     fonts only, holding the named instance index for the current face\n   *     index (starting with value~1; value~0 indicates font access without\n   *     a named instance).  For non-variation fonts, bits 16-30 are ignored.\n   *     If we have the third named instance of face~4, say, `face_index` is\n   *     set to 0x00030004.\n   *\n   *     Bit 31 is always zero (this is, `face_index` is always a positive\n   *     value).\n   *\n   *     [Since 2.9] Changing the design coordinates with\n   *     @FT_Set_Var_Design_Coordinates or @FT_Set_Var_Blend_Coordinates does\n   *     not influence the named instance index value (only\n   *     @FT_Set_Named_Instance does that).\n   *\n   *   face_flags ::\n   *     A set of bit flags that give important information about the face;\n   *     see @FT_FACE_FLAG_XXX for the details.\n   *\n   *   style_flags ::\n   *     The lower 16~bits contain a set of bit flags indicating the style of\n   *     the face; see @FT_STYLE_FLAG_XXX for the details.\n   *\n   *     [Since 2.6.1] Bits 16-30 hold the number of named instances\n   *     available for the current face if we have a GX or OpenType variation\n   *     (sub)font.  Bit 31 is always zero (this is, `style_flags` is always\n   *     a positive value).  Note that a variation font has always at least\n   *     one named instance, namely the default instance.\n   *\n   *   num_glyphs ::\n   *     The number of glyphs in the face.  If the face is scalable and has\n   *     sbits (see `num_fixed_sizes`), it is set to the number of outline\n   *     glyphs.\n   *\n   *     For CID-keyed fonts (not in an SFNT wrapper) this value gives the\n   *     highest CID used in the font.\n   *\n   *   family_name ::\n   *     The face's family name.  This is an ASCII string, usually in\n   *     English, that describes the typeface's family (like 'Times New\n   *     Roman', 'Bodoni', 'Garamond', etc).  This is a least common\n   *     denominator used to list fonts.  Some formats (TrueType & OpenType)\n   *     provide localized and Unicode versions of this string.  Applications\n   *     should use the format-specific interface to access them.  Can be\n   *     `NULL` (e.g., in fonts embedded in a PDF file).\n   *\n   *     In case the font doesn't provide a specific family name entry,\n   *     FreeType tries to synthesize one, deriving it from other name\n   *     entries.\n   *\n   *   style_name ::\n   *     The face's style name.  This is an ASCII string, usually in English,\n   *     that describes the typeface's style (like 'Italic', 'Bold',\n   *     'Condensed', etc).  Not all font formats provide a style name, so\n   *     this field is optional, and can be set to `NULL`.  As for\n   *     `family_name`, some formats provide localized and Unicode versions\n   *     of this string.  Applications should use the format-specific\n   *     interface to access them.\n   *\n   *   num_fixed_sizes ::\n   *     The number of bitmap strikes in the face.  Even if the face is\n   *     scalable, there might still be bitmap strikes, which are called\n   *     'sbits' in that case.\n   *\n   *   available_sizes ::\n   *     An array of @FT_Bitmap_Size for all bitmap strikes in the face.  It\n   *     is set to `NULL` if there is no bitmap strike.\n   *\n   *     Note that FreeType tries to sanitize the strike data since they are\n   *     sometimes sloppy or incorrect, but this can easily fail.\n   *\n   *   num_charmaps ::\n   *     The number of charmaps in the face.\n   *\n   *   charmaps ::\n   *     An array of the charmaps of the face.\n   *\n   *   generic ::\n   *     A field reserved for client uses.  See the @FT_Generic type\n   *     description.\n   *\n   *   bbox ::\n   *     The font bounding box.  Coordinates are expressed in font units (see\n   *     `units_per_EM`).  The box is large enough to contain any glyph from\n   *     the font.  Thus, `bbox.yMax` can be seen as the 'maximum ascender',\n   *     and `bbox.yMin` as the 'minimum descender'.  Only relevant for\n   *     scalable formats.\n   *\n   *     Note that the bounding box might be off by (at least) one pixel for\n   *     hinted fonts.  See @FT_Size_Metrics for further discussion.\n   *\n   *     Note that the bounding box does not vary in OpenType variable fonts\n   *     and should only be used in relation to the default instance.\n   *\n   *   units_per_EM ::\n   *     The number of font units per EM square for this face.  This is\n   *     typically 2048 for TrueType fonts, and 1000 for Type~1 fonts.  Only\n   *     relevant for scalable formats.\n   *\n   *   ascender ::\n   *     The typographic ascender of the face, expressed in font units.  For\n   *     font formats not having this information, it is set to `bbox.yMax`.\n   *     Only relevant for scalable formats.\n   *\n   *   descender ::\n   *     The typographic descender of the face, expressed in font units.  For\n   *     font formats not having this information, it is set to `bbox.yMin`.\n   *     Note that this field is negative for values below the baseline.\n   *     Only relevant for scalable formats.\n   *\n   *   height ::\n   *     This value is the vertical distance between two consecutive\n   *     baselines, expressed in font units.  It is always positive.  Only\n   *     relevant for scalable formats.\n   *\n   *     If you want the global glyph height, use `ascender - descender`.\n   *\n   *   max_advance_width ::\n   *     The maximum advance width, in font units, for all glyphs in this\n   *     face.  This can be used to make word wrapping computations faster.\n   *     Only relevant for scalable formats.\n   *\n   *   max_advance_height ::\n   *     The maximum advance height, in font units, for all glyphs in this\n   *     face.  This is only relevant for vertical layouts, and is set to\n   *     `height` for fonts that do not provide vertical metrics.  Only\n   *     relevant for scalable formats.\n   *\n   *   underline_position ::\n   *     The position, in font units, of the underline line for this face.\n   *     It is the center of the underlining stem.  Only relevant for\n   *     scalable formats.\n   *\n   *   underline_thickness ::\n   *     The thickness, in font units, of the underline for this face.  Only\n   *     relevant for scalable formats.\n   *\n   *   glyph ::\n   *     The face's associated glyph slot(s).\n   *\n   *   size ::\n   *     The current active size for this face.\n   *\n   *   charmap ::\n   *     The current active charmap for this face.\n   *\n   * @note:\n   *   Fields may be changed after a call to @FT_Attach_File or\n   *   @FT_Attach_Stream.\n   *\n   *   For an OpenType variation font, the values of the following fields can\n   *   change after a call to @FT_Set_Var_Design_Coordinates (and friends) if\n   *   the font contains an 'MVAR' table: `ascender`, `descender`, `height`,\n   *   `underline_position`, and `underline_thickness`.\n   *\n   *   Especially for TrueType fonts see also the documentation for\n   *   @FT_Size_Metrics.\n   */\n  typedef struct  FT_FaceRec_\n  {\n    FT_Long           num_faces;\n    FT_Long           face_index;\n\n    FT_Long           face_flags;\n    FT_Long           style_flags;\n\n    FT_Long           num_glyphs;\n\n    FT_String*        family_name;\n    FT_String*        style_name;\n\n    FT_Int            num_fixed_sizes;\n    FT_Bitmap_Size*   available_sizes;\n\n    FT_Int            num_charmaps;\n    FT_CharMap*       charmaps;\n\n    FT_Generic        generic;\n\n    /*# The following member variables (down to `underline_thickness`) */\n    /*# are only relevant to scalable outlines; cf. @FT_Bitmap_Size    */\n    /*# for bitmap fonts.                                              */\n    FT_BBox           bbox;\n\n    FT_UShort         units_per_EM;\n    FT_Short          ascender;\n    FT_Short          descender;\n    FT_Short          height;\n\n    FT_Short          max_advance_width;\n    FT_Short          max_advance_height;\n\n    FT_Short          underline_position;\n    FT_Short          underline_thickness;\n\n    FT_GlyphSlot      glyph;\n    FT_Size           size;\n    FT_CharMap        charmap;\n\n    /*@private begin */\n\n    FT_Driver         driver;\n    FT_Memory         memory;\n    FT_Stream         stream;\n\n    FT_ListRec        sizes_list;\n\n    FT_Generic        autohint;   /* face-specific auto-hinter data */\n    void*             extensions; /* unused                         */\n\n    FT_Face_Internal  internal;\n\n    /*@private end */\n\n  } FT_FaceRec;\n\n\n  /**************************************************************************\n   *\n   * @enum:\n   *   FT_FACE_FLAG_XXX\n   *\n   * @description:\n   *   A list of bit flags used in the `face_flags` field of the @FT_FaceRec\n   *   structure.  They inform client applications of properties of the\n   *   corresponding face.\n   *\n   * @values:\n   *   FT_FACE_FLAG_SCALABLE ::\n   *     The face contains outline glyphs.  Note that a face can contain\n   *     bitmap strikes also, i.e., a face can have both this flag and\n   *     @FT_FACE_FLAG_FIXED_SIZES set.\n   *\n   *   FT_FACE_FLAG_FIXED_SIZES ::\n   *     The face contains bitmap strikes.  See also the `num_fixed_sizes`\n   *     and `available_sizes` fields of @FT_FaceRec.\n   *\n   *   FT_FACE_FLAG_FIXED_WIDTH ::\n   *     The face contains fixed-width characters (like Courier, Lucida,\n   *     MonoType, etc.).\n   *\n   *   FT_FACE_FLAG_SFNT ::\n   *     The face uses the SFNT storage scheme.  For now, this means TrueType\n   *     and OpenType.\n   *\n   *   FT_FACE_FLAG_HORIZONTAL ::\n   *     The face contains horizontal glyph metrics.  This should be set for\n   *     all common formats.\n   *\n   *   FT_FACE_FLAG_VERTICAL ::\n   *     The face contains vertical glyph metrics.  This is only available in\n   *     some formats, not all of them.\n   *\n   *   FT_FACE_FLAG_KERNING ::\n   *     The face contains kerning information.  If set, the kerning distance\n   *     can be retrieved using the function @FT_Get_Kerning.  Otherwise the\n   *     function always return the vector (0,0).  Note that FreeType doesn't\n   *     handle kerning data from the SFNT 'GPOS' table (as present in many\n   *     OpenType fonts).\n   *\n   *   FT_FACE_FLAG_FAST_GLYPHS ::\n   *     THIS FLAG IS DEPRECATED.  DO NOT USE OR TEST IT.\n   *\n   *   FT_FACE_FLAG_MULTIPLE_MASTERS ::\n   *     The face contains multiple masters and is capable of interpolating\n   *     between them.  Supported formats are Adobe MM, TrueType GX, and\n   *     OpenType variation fonts.\n   *\n   *     See section @multiple_masters for API details.\n   *\n   *   FT_FACE_FLAG_GLYPH_NAMES ::\n   *     The face contains glyph names, which can be retrieved using\n   *     @FT_Get_Glyph_Name.  Note that some TrueType fonts contain broken\n   *     glyph name tables.  Use the function @FT_Has_PS_Glyph_Names when\n   *     needed.\n   *\n   *   FT_FACE_FLAG_EXTERNAL_STREAM ::\n   *     Used internally by FreeType to indicate that a face's stream was\n   *     provided by the client application and should not be destroyed when\n   *     @FT_Done_Face is called.  Don't read or test this flag.\n   *\n   *   FT_FACE_FLAG_HINTER ::\n   *     The font driver has a hinting machine of its own.  For example, with\n   *     TrueType fonts, it makes sense to use data from the SFNT 'gasp'\n   *     table only if the native TrueType hinting engine (with the bytecode\n   *     interpreter) is available and active.\n   *\n   *   FT_FACE_FLAG_CID_KEYED ::\n   *     The face is CID-keyed.  In that case, the face is not accessed by\n   *     glyph indices but by CID values.  For subsetted CID-keyed fonts this\n   *     has the consequence that not all index values are a valid argument\n   *     to @FT_Load_Glyph.  Only the CID values for which corresponding\n   *     glyphs in the subsetted font exist make `FT_Load_Glyph` return\n   *     successfully; in all other cases you get an\n   *     `FT_Err_Invalid_Argument` error.\n   *\n   *     Note that CID-keyed fonts that are in an SFNT wrapper (this is, all\n   *     OpenType/CFF fonts) don't have this flag set since the glyphs are\n   *     accessed in the normal way (using contiguous indices); the\n   *     'CID-ness' isn't visible to the application.\n   *\n   *   FT_FACE_FLAG_TRICKY ::\n   *     The face is 'tricky', this is, it always needs the font format's\n   *     native hinting engine to get a reasonable result.  A typical example\n   *     is the old Chinese font `mingli.ttf` (but not `mingliu.ttc`) that\n   *     uses TrueType bytecode instructions to move and scale all of its\n   *     subglyphs.\n   *\n   *     It is not possible to auto-hint such fonts using\n   *     @FT_LOAD_FORCE_AUTOHINT; it will also ignore @FT_LOAD_NO_HINTING.\n   *     You have to set both @FT_LOAD_NO_HINTING and @FT_LOAD_NO_AUTOHINT to\n   *     really disable hinting; however, you probably never want this except\n   *     for demonstration purposes.\n   *\n   *     Currently, there are about a dozen TrueType fonts in the list of\n   *     tricky fonts; they are hard-coded in file `ttobjs.c`.\n   *\n   *   FT_FACE_FLAG_COLOR ::\n   *     [Since 2.5.1] The face has color glyph tables.  See @FT_LOAD_COLOR\n   *     for more information.\n   *\n   *   FT_FACE_FLAG_VARIATION ::\n   *     [Since 2.9] Set if the current face (or named instance) has been\n   *     altered with @FT_Set_MM_Design_Coordinates,\n   *     @FT_Set_Var_Design_Coordinates, or @FT_Set_Var_Blend_Coordinates.\n   *     This flag is unset by a call to @FT_Set_Named_Instance.\n   */\n#define FT_FACE_FLAG_SCALABLE          ( 1L <<  0 )\n#define FT_FACE_FLAG_FIXED_SIZES       ( 1L <<  1 )\n#define FT_FACE_FLAG_FIXED_WIDTH       ( 1L <<  2 )\n#define FT_FACE_FLAG_SFNT              ( 1L <<  3 )\n#define FT_FACE_FLAG_HORIZONTAL        ( 1L <<  4 )\n#define FT_FACE_FLAG_VERTICAL          ( 1L <<  5 )\n#define FT_FACE_FLAG_KERNING           ( 1L <<  6 )\n#define FT_FACE_FLAG_FAST_GLYPHS       ( 1L <<  7 )\n#define FT_FACE_FLAG_MULTIPLE_MASTERS  ( 1L <<  8 )\n#define FT_FACE_FLAG_GLYPH_NAMES       ( 1L <<  9 )\n#define FT_FACE_FLAG_EXTERNAL_STREAM   ( 1L << 10 )\n#define FT_FACE_FLAG_HINTER            ( 1L << 11 )\n#define FT_FACE_FLAG_CID_KEYED         ( 1L << 12 )\n#define FT_FACE_FLAG_TRICKY            ( 1L << 13 )\n#define FT_FACE_FLAG_COLOR             ( 1L << 14 )\n#define FT_FACE_FLAG_VARIATION         ( 1L << 15 )\n\n\n  /**************************************************************************\n   *\n   * @macro:\n   *   FT_HAS_HORIZONTAL\n   *\n   * @description:\n   *   A macro that returns true whenever a face object contains horizontal\n   *   metrics (this is true for all font formats though).\n   *\n   * @also:\n   *   @FT_HAS_VERTICAL can be used to check for vertical metrics.\n   *\n   */\n#define FT_HAS_HORIZONTAL( face ) \\\n          ( !!( (face)->face_flags & FT_FACE_FLAG_HORIZONTAL ) )\n\n\n  /**************************************************************************\n   *\n   * @macro:\n   *   FT_HAS_VERTICAL\n   *\n   * @description:\n   *   A macro that returns true whenever a face object contains real\n   *   vertical metrics (and not only synthesized ones).\n   *\n   */\n#define FT_HAS_VERTICAL( face ) \\\n          ( !!( (face)->face_flags & FT_FACE_FLAG_VERTICAL ) )\n\n\n  /**************************************************************************\n   *\n   * @macro:\n   *   FT_HAS_KERNING\n   *\n   * @description:\n   *   A macro that returns true whenever a face object contains kerning data\n   *   that can be accessed with @FT_Get_Kerning.\n   *\n   */\n#define FT_HAS_KERNING( face ) \\\n          ( !!( (face)->face_flags & FT_FACE_FLAG_KERNING ) )\n\n\n  /**************************************************************************\n   *\n   * @macro:\n   *   FT_IS_SCALABLE\n   *\n   * @description:\n   *   A macro that returns true whenever a face object contains a scalable\n   *   font face (true for TrueType, Type~1, Type~42, CID, OpenType/CFF, and\n   *   PFR font formats).\n   *\n   */\n#define FT_IS_SCALABLE( face ) \\\n          ( !!( (face)->face_flags & FT_FACE_FLAG_SCALABLE ) )\n\n\n  /**************************************************************************\n   *\n   * @macro:\n   *   FT_IS_SFNT\n   *\n   * @description:\n   *   A macro that returns true whenever a face object contains a font whose\n   *   format is based on the SFNT storage scheme.  This usually means:\n   *   TrueType fonts, OpenType fonts, as well as SFNT-based embedded bitmap\n   *   fonts.\n   *\n   *   If this macro is true, all functions defined in @FT_SFNT_NAMES_H and\n   *   @FT_TRUETYPE_TABLES_H are available.\n   *\n   */\n#define FT_IS_SFNT( face ) \\\n          ( !!( (face)->face_flags & FT_FACE_FLAG_SFNT ) )\n\n\n  /**************************************************************************\n   *\n   * @macro:\n   *   FT_IS_FIXED_WIDTH\n   *\n   * @description:\n   *   A macro that returns true whenever a face object contains a font face\n   *   that contains fixed-width (or 'monospace', 'fixed-pitch', etc.)\n   *   glyphs.\n   *\n   */\n#define FT_IS_FIXED_WIDTH( face ) \\\n          ( !!( (face)->face_flags & FT_FACE_FLAG_FIXED_WIDTH ) )\n\n\n  /**************************************************************************\n   *\n   * @macro:\n   *   FT_HAS_FIXED_SIZES\n   *\n   * @description:\n   *   A macro that returns true whenever a face object contains some\n   *   embedded bitmaps.  See the `available_sizes` field of the @FT_FaceRec\n   *   structure.\n   *\n   */\n#define FT_HAS_FIXED_SIZES( face ) \\\n          ( !!( (face)->face_flags & FT_FACE_FLAG_FIXED_SIZES ) )\n\n\n  /**************************************************************************\n   *\n   * @macro:\n   *   FT_HAS_FAST_GLYPHS\n   *\n   * @description:\n   *   Deprecated.\n   *\n   */\n#define FT_HAS_FAST_GLYPHS( face )  0\n\n\n  /**************************************************************************\n   *\n   * @macro:\n   *   FT_HAS_GLYPH_NAMES\n   *\n   * @description:\n   *   A macro that returns true whenever a face object contains some glyph\n   *   names that can be accessed through @FT_Get_Glyph_Name.\n   *\n   */\n#define FT_HAS_GLYPH_NAMES( face ) \\\n          ( !!( (face)->face_flags & FT_FACE_FLAG_GLYPH_NAMES ) )\n\n\n  /**************************************************************************\n   *\n   * @macro:\n   *   FT_HAS_MULTIPLE_MASTERS\n   *\n   * @description:\n   *   A macro that returns true whenever a face object contains some\n   *   multiple masters.  The functions provided by @FT_MULTIPLE_MASTERS_H\n   *   are then available to choose the exact design you want.\n   *\n   */\n#define FT_HAS_MULTIPLE_MASTERS( face ) \\\n          ( !!( (face)->face_flags & FT_FACE_FLAG_MULTIPLE_MASTERS ) )\n\n\n  /**************************************************************************\n   *\n   * @macro:\n   *   FT_IS_NAMED_INSTANCE\n   *\n   * @description:\n   *   A macro that returns true whenever a face object is a named instance\n   *   of a GX or OpenType variation font.\n   *\n   *   [Since 2.9] Changing the design coordinates with\n   *   @FT_Set_Var_Design_Coordinates or @FT_Set_Var_Blend_Coordinates does\n   *   not influence the return value of this macro (only\n   *   @FT_Set_Named_Instance does that).\n   *\n   * @since:\n   *   2.7\n   *\n   */\n#define FT_IS_NAMED_INSTANCE( face ) \\\n          ( !!( (face)->face_index & 0x7FFF0000L ) )\n\n\n  /**************************************************************************\n   *\n   * @macro:\n   *   FT_IS_VARIATION\n   *\n   * @description:\n   *   A macro that returns true whenever a face object has been altered by\n   *   @FT_Set_MM_Design_Coordinates, @FT_Set_Var_Design_Coordinates, or\n   *   @FT_Set_Var_Blend_Coordinates.\n   *\n   * @since:\n   *   2.9\n   *\n   */\n#define FT_IS_VARIATION( face ) \\\n          ( !!( (face)->face_flags & FT_FACE_FLAG_VARIATION ) )\n\n\n  /**************************************************************************\n   *\n   * @macro:\n   *   FT_IS_CID_KEYED\n   *\n   * @description:\n   *   A macro that returns true whenever a face object contains a CID-keyed\n   *   font.  See the discussion of @FT_FACE_FLAG_CID_KEYED for more details.\n   *\n   *   If this macro is true, all functions defined in @FT_CID_H are\n   *   available.\n   *\n   */\n#define FT_IS_CID_KEYED( face ) \\\n          ( !!( (face)->face_flags & FT_FACE_FLAG_CID_KEYED ) )\n\n\n  /**************************************************************************\n   *\n   * @macro:\n   *   FT_IS_TRICKY\n   *\n   * @description:\n   *   A macro that returns true whenever a face represents a 'tricky' font.\n   *   See the discussion of @FT_FACE_FLAG_TRICKY for more details.\n   *\n   */\n#define FT_IS_TRICKY( face ) \\\n          ( !!( (face)->face_flags & FT_FACE_FLAG_TRICKY ) )\n\n\n  /**************************************************************************\n   *\n   * @macro:\n   *   FT_HAS_COLOR\n   *\n   * @description:\n   *   A macro that returns true whenever a face object contains tables for\n   *   color glyphs.\n   *\n   * @since:\n   *   2.5.1\n   *\n   */\n#define FT_HAS_COLOR( face ) \\\n          ( !!( (face)->face_flags & FT_FACE_FLAG_COLOR ) )\n\n\n  /**************************************************************************\n   *\n   * @enum:\n   *   FT_STYLE_FLAG_XXX\n   *\n   * @description:\n   *   A list of bit flags to indicate the style of a given face.  These are\n   *   used in the `style_flags` field of @FT_FaceRec.\n   *\n   * @values:\n   *   FT_STYLE_FLAG_ITALIC ::\n   *     The face style is italic or oblique.\n   *\n   *   FT_STYLE_FLAG_BOLD ::\n   *     The face is bold.\n   *\n   * @note:\n   *   The style information as provided by FreeType is very basic.  More\n   *   details are beyond the scope and should be done on a higher level (for\n   *   example, by analyzing various fields of the 'OS/2' table in SFNT based\n   *   fonts).\n   */\n#define FT_STYLE_FLAG_ITALIC  ( 1 << 0 )\n#define FT_STYLE_FLAG_BOLD    ( 1 << 1 )\n\n\n  /**************************************************************************\n   *\n   * @type:\n   *   FT_Size_Internal\n   *\n   * @description:\n   *   An opaque handle to an `FT_Size_InternalRec` structure, used to model\n   *   private data of a given @FT_Size object.\n   */\n  typedef struct FT_Size_InternalRec_*  FT_Size_Internal;\n\n\n  /**************************************************************************\n   *\n   * @struct:\n   *   FT_Size_Metrics\n   *\n   * @description:\n   *   The size metrics structure gives the metrics of a size object.\n   *\n   * @fields:\n   *   x_ppem ::\n   *     The width of the scaled EM square in pixels, hence the term 'ppem'\n   *     (pixels per EM).  It is also referred to as 'nominal width'.\n   *\n   *   y_ppem ::\n   *     The height of the scaled EM square in pixels, hence the term 'ppem'\n   *     (pixels per EM).  It is also referred to as 'nominal height'.\n   *\n   *   x_scale ::\n   *     A 16.16 fractional scaling value to convert horizontal metrics from\n   *     font units to 26.6 fractional pixels.  Only relevant for scalable\n   *     font formats.\n   *\n   *   y_scale ::\n   *     A 16.16 fractional scaling value to convert vertical metrics from\n   *     font units to 26.6 fractional pixels.  Only relevant for scalable\n   *     font formats.\n   *\n   *   ascender ::\n   *     The ascender in 26.6 fractional pixels, rounded up to an integer\n   *     value.  See @FT_FaceRec for the details.\n   *\n   *   descender ::\n   *     The descender in 26.6 fractional pixels, rounded down to an integer\n   *     value.  See @FT_FaceRec for the details.\n   *\n   *   height ::\n   *     The height in 26.6 fractional pixels, rounded to an integer value.\n   *     See @FT_FaceRec for the details.\n   *\n   *   max_advance ::\n   *     The maximum advance width in 26.6 fractional pixels, rounded to an\n   *     integer value.  See @FT_FaceRec for the details.\n   *\n   * @note:\n   *   The scaling values, if relevant, are determined first during a size\n   *   changing operation.  The remaining fields are then set by the driver.\n   *   For scalable formats, they are usually set to scaled values of the\n   *   corresponding fields in @FT_FaceRec.  Some values like ascender or\n   *   descender are rounded for historical reasons; more precise values (for\n   *   outline fonts) can be derived by scaling the corresponding @FT_FaceRec\n   *   values manually, with code similar to the following.\n   *\n   *   ```\n   *     scaled_ascender = FT_MulFix( face->ascender,\n   *                                  size_metrics->y_scale );\n   *   ```\n   *\n   *   Note that due to glyph hinting and the selected rendering mode these\n   *   values are usually not exact; consequently, they must be treated as\n   *   unreliable with an error margin of at least one pixel!\n   *\n   *   Indeed, the only way to get the exact metrics is to render _all_\n   *   glyphs.  As this would be a definite performance hit, it is up to\n   *   client applications to perform such computations.\n   *\n   *   The `FT_Size_Metrics` structure is valid for bitmap fonts also.\n   *\n   *\n   *   **TrueType fonts with native bytecode hinting**\n   *\n   *   All applications that handle TrueType fonts with native hinting must\n   *   be aware that TTFs expect different rounding of vertical font\n   *   dimensions.  The application has to cater for this, especially if it\n   *   wants to rely on a TTF's vertical data (for example, to properly align\n   *   box characters vertically).\n   *\n   *   Only the application knows _in advance_ that it is going to use native\n   *   hinting for TTFs!  FreeType, on the other hand, selects the hinting\n   *   mode not at the time of creating an @FT_Size object but much later,\n   *   namely while calling @FT_Load_Glyph.\n   *\n   *   Here is some pseudo code that illustrates a possible solution.\n   *\n   *   ```\n   *     font_format = FT_Get_Font_Format( face );\n   *\n   *     if ( !strcmp( font_format, \"TrueType\" ) &&\n   *          do_native_bytecode_hinting         )\n   *     {\n   *       ascender  = ROUND( FT_MulFix( face->ascender,\n   *                                     size_metrics->y_scale ) );\n   *       descender = ROUND( FT_MulFix( face->descender,\n   *                                     size_metrics->y_scale ) );\n   *     }\n   *     else\n   *     {\n   *       ascender  = size_metrics->ascender;\n   *       descender = size_metrics->descender;\n   *     }\n   *\n   *     height      = size_metrics->height;\n   *     max_advance = size_metrics->max_advance;\n   *   ```\n   */\n  typedef struct  FT_Size_Metrics_\n  {\n    FT_UShort  x_ppem;      /* horizontal pixels per EM               */\n    FT_UShort  y_ppem;      /* vertical pixels per EM                 */\n\n    FT_Fixed   x_scale;     /* scaling values used to convert font    */\n    FT_Fixed   y_scale;     /* units to 26.6 fractional pixels        */\n\n    FT_Pos     ascender;    /* ascender in 26.6 frac. pixels          */\n    FT_Pos     descender;   /* descender in 26.6 frac. pixels         */\n    FT_Pos     height;      /* text height in 26.6 frac. pixels       */\n    FT_Pos     max_advance; /* max horizontal advance, in 26.6 pixels */\n\n  } FT_Size_Metrics;\n\n\n  /**************************************************************************\n   *\n   * @struct:\n   *   FT_SizeRec\n   *\n   * @description:\n   *   FreeType root size class structure.  A size object models a face\n   *   object at a given size.\n   *\n   * @fields:\n   *   face ::\n   *     Handle to the parent face object.\n   *\n   *   generic ::\n   *     A typeless pointer, unused by the FreeType library or any of its\n   *     drivers.  It can be used by client applications to link their own\n   *     data to each size object.\n   *\n   *   metrics ::\n   *     Metrics for this size object.  This field is read-only.\n   */\n  typedef struct  FT_SizeRec_\n  {\n    FT_Face           face;      /* parent face object              */\n    FT_Generic        generic;   /* generic pointer for client uses */\n    FT_Size_Metrics   metrics;   /* size metrics                    */\n    FT_Size_Internal  internal;\n\n  } FT_SizeRec;\n\n\n  /**************************************************************************\n   *\n   * @struct:\n   *   FT_SubGlyph\n   *\n   * @description:\n   *   The subglyph structure is an internal object used to describe\n   *   subglyphs (for example, in the case of composites).\n   *\n   * @note:\n   *   The subglyph implementation is not part of the high-level API, hence\n   *   the forward structure declaration.\n   *\n   *   You can however retrieve subglyph information with\n   *   @FT_Get_SubGlyph_Info.\n   */\n  typedef struct FT_SubGlyphRec_*  FT_SubGlyph;\n\n\n  /**************************************************************************\n   *\n   * @type:\n   *   FT_Slot_Internal\n   *\n   * @description:\n   *   An opaque handle to an `FT_Slot_InternalRec` structure, used to model\n   *   private data of a given @FT_GlyphSlot object.\n   */\n  typedef struct FT_Slot_InternalRec_*  FT_Slot_Internal;\n\n\n  /**************************************************************************\n   *\n   * @struct:\n   *   FT_GlyphSlotRec\n   *\n   * @description:\n   *   FreeType root glyph slot class structure.  A glyph slot is a container\n   *   where individual glyphs can be loaded, be they in outline or bitmap\n   *   format.\n   *\n   * @fields:\n   *   library ::\n   *     A handle to the FreeType library instance this slot belongs to.\n   *\n   *   face ::\n   *     A handle to the parent face object.\n   *\n   *   next ::\n   *     In some cases (like some font tools), several glyph slots per face\n   *     object can be a good thing.  As this is rare, the glyph slots are\n   *     listed through a direct, single-linked list using its `next` field.\n   *\n   *   glyph_index ::\n   *     [Since 2.10] The glyph index passed as an argument to @FT_Load_Glyph\n   *     while initializing the glyph slot.\n   *\n   *   generic ::\n   *     A typeless pointer unused by the FreeType library or any of its\n   *     drivers.  It can be used by client applications to link their own\n   *     data to each glyph slot object.\n   *\n   *   metrics ::\n   *     The metrics of the last loaded glyph in the slot.  The returned\n   *     values depend on the last load flags (see the @FT_Load_Glyph API\n   *     function) and can be expressed either in 26.6 fractional pixels or\n   *     font units.\n   *\n   *     Note that even when the glyph image is transformed, the metrics are\n   *     not.\n   *\n   *   linearHoriAdvance ::\n   *     The advance width of the unhinted glyph.  Its value is expressed in\n   *     16.16 fractional pixels, unless @FT_LOAD_LINEAR_DESIGN is set when\n   *     loading the glyph.  This field can be important to perform correct\n   *     WYSIWYG layout.  Only relevant for outline glyphs.\n   *\n   *   linearVertAdvance ::\n   *     The advance height of the unhinted glyph.  Its value is expressed in\n   *     16.16 fractional pixels, unless @FT_LOAD_LINEAR_DESIGN is set when\n   *     loading the glyph.  This field can be important to perform correct\n   *     WYSIWYG layout.  Only relevant for outline glyphs.\n   *\n   *   advance ::\n   *     This shorthand is, depending on @FT_LOAD_IGNORE_TRANSFORM, the\n   *     transformed (hinted) advance width for the glyph, in 26.6 fractional\n   *     pixel format.  As specified with @FT_LOAD_VERTICAL_LAYOUT, it uses\n   *     either the `horiAdvance` or the `vertAdvance` value of `metrics`\n   *     field.\n   *\n   *   format ::\n   *     This field indicates the format of the image contained in the glyph\n   *     slot.  Typically @FT_GLYPH_FORMAT_BITMAP, @FT_GLYPH_FORMAT_OUTLINE,\n   *     or @FT_GLYPH_FORMAT_COMPOSITE, but other values are possible.\n   *\n   *   bitmap ::\n   *     This field is used as a bitmap descriptor.  Note that the address\n   *     and content of the bitmap buffer can change between calls of\n   *     @FT_Load_Glyph and a few other functions.\n   *\n   *   bitmap_left ::\n   *     The bitmap's left bearing expressed in integer pixels.\n   *\n   *   bitmap_top ::\n   *     The bitmap's top bearing expressed in integer pixels.  This is the\n   *     distance from the baseline to the top-most glyph scanline, upwards\n   *     y~coordinates being **positive**.\n   *\n   *   outline ::\n   *     The outline descriptor for the current glyph image if its format is\n   *     @FT_GLYPH_FORMAT_OUTLINE.  Once a glyph is loaded, `outline` can be\n   *     transformed, distorted, emboldened, etc.  However, it must not be\n   *     freed.\n   *\n   *     [Since 2.10.1] If @FT_LOAD_NO_SCALE is set, outline coordinates of\n   *     OpenType variation fonts for a selected instance are internally\n   *     handled as 26.6 fractional font units but returned as (rounded)\n   *     integers, as expected.  To get unrounded font units, don't use\n   *     @FT_LOAD_NO_SCALE but load the glyph with @FT_LOAD_NO_HINTING and\n   *     scale it, using the font's `units_per_EM` value as the ppem.\n   *\n   *   num_subglyphs ::\n   *     The number of subglyphs in a composite glyph.  This field is only\n   *     valid for the composite glyph format that should normally only be\n   *     loaded with the @FT_LOAD_NO_RECURSE flag.\n   *\n   *   subglyphs ::\n   *     An array of subglyph descriptors for composite glyphs.  There are\n   *     `num_subglyphs` elements in there.  Currently internal to FreeType.\n   *\n   *   control_data ::\n   *     Certain font drivers can also return the control data for a given\n   *     glyph image (e.g.  TrueType bytecode, Type~1 charstrings, etc.).\n   *     This field is a pointer to such data; it is currently internal to\n   *     FreeType.\n   *\n   *   control_len ::\n   *     This is the length in bytes of the control data.  Currently internal\n   *     to FreeType.\n   *\n   *   other ::\n   *     Reserved.\n   *\n   *   lsb_delta ::\n   *     The difference between hinted and unhinted left side bearing while\n   *     auto-hinting is active.  Zero otherwise.\n   *\n   *   rsb_delta ::\n   *     The difference between hinted and unhinted right side bearing while\n   *     auto-hinting is active.  Zero otherwise.\n   *\n   * @note:\n   *   If @FT_Load_Glyph is called with default flags (see @FT_LOAD_DEFAULT)\n   *   the glyph image is loaded in the glyph slot in its native format\n   *   (e.g., an outline glyph for TrueType and Type~1 formats).  [Since 2.9]\n   *   The prospective bitmap metrics are calculated according to\n   *   @FT_LOAD_TARGET_XXX and other flags even for the outline glyph, even\n   *   if @FT_LOAD_RENDER is not set.\n   *\n   *   This image can later be converted into a bitmap by calling\n   *   @FT_Render_Glyph.  This function searches the current renderer for the\n   *   native image's format, then invokes it.\n   *\n   *   The renderer is in charge of transforming the native image through the\n   *   slot's face transformation fields, then converting it into a bitmap\n   *   that is returned in `slot->bitmap`.\n   *\n   *   Note that `slot->bitmap_left` and `slot->bitmap_top` are also used to\n   *   specify the position of the bitmap relative to the current pen\n   *   position (e.g., coordinates (0,0) on the baseline).  Of course,\n   *   `slot->format` is also changed to @FT_GLYPH_FORMAT_BITMAP.\n   *\n   *   Here is a small pseudo code fragment that shows how to use `lsb_delta`\n   *   and `rsb_delta` to do fractional positioning of glyphs:\n   *\n   *   ```\n   *     FT_GlyphSlot  slot     = face->glyph;\n   *     FT_Pos        origin_x = 0;\n   *\n   *\n   *     for all glyphs do\n   *       <load glyph with `FT_Load_Glyph'>\n   *\n   *       FT_Outline_Translate( slot->outline, origin_x & 63, 0 );\n   *\n   *       <save glyph image, or render glyph, or ...>\n   *\n   *       <compute kern between current and next glyph\n   *        and add it to `origin_x'>\n   *\n   *       origin_x += slot->advance.x;\n   *       origin_x += slot->lsb_delta - slot->rsb_delta;\n   *     endfor\n   *   ```\n   *\n   *   Here is another small pseudo code fragment that shows how to use\n   *   `lsb_delta` and `rsb_delta` to improve integer positioning of glyphs:\n   *\n   *   ```\n   *     FT_GlyphSlot  slot           = face->glyph;\n   *     FT_Pos        origin_x       = 0;\n   *     FT_Pos        prev_rsb_delta = 0;\n   *\n   *\n   *     for all glyphs do\n   *       <compute kern between current and previous glyph\n   *        and add it to `origin_x'>\n   *\n   *       <load glyph with `FT_Load_Glyph'>\n   *\n   *       if ( prev_rsb_delta - slot->lsb_delta >  32 )\n   *         origin_x -= 64;\n   *       else if ( prev_rsb_delta - slot->lsb_delta < -31 )\n   *         origin_x += 64;\n   *\n   *       prev_rsb_delta = slot->rsb_delta;\n   *\n   *       <save glyph image, or render glyph, or ...>\n   *\n   *       origin_x += slot->advance.x;\n   *     endfor\n   *   ```\n   *\n   *   If you use strong auto-hinting, you **must** apply these delta values!\n   *   Otherwise you will experience far too large inter-glyph spacing at\n   *   small rendering sizes in most cases.  Note that it doesn't harm to use\n   *   the above code for other hinting modes also, since the delta values\n   *   are zero then.\n   */\n  typedef struct  FT_GlyphSlotRec_\n  {\n    FT_Library        library;\n    FT_Face           face;\n    FT_GlyphSlot      next;\n    FT_UInt           glyph_index; /* new in 2.10; was reserved previously */\n    FT_Generic        generic;\n\n    FT_Glyph_Metrics  metrics;\n    FT_Fixed          linearHoriAdvance;\n    FT_Fixed          linearVertAdvance;\n    FT_Vector         advance;\n\n    FT_Glyph_Format   format;\n\n    FT_Bitmap         bitmap;\n    FT_Int            bitmap_left;\n    FT_Int            bitmap_top;\n\n    FT_Outline        outline;\n\n    FT_UInt           num_subglyphs;\n    FT_SubGlyph       subglyphs;\n\n    void*             control_data;\n    long              control_len;\n\n    FT_Pos            lsb_delta;\n    FT_Pos            rsb_delta;\n\n    void*             other;\n\n    FT_Slot_Internal  internal;\n\n  } FT_GlyphSlotRec;\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*                                                                       */\n  /*                         F U N C T I O N S                             */\n  /*                                                                       */\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Init_FreeType\n   *\n   * @description:\n   *   Initialize a new FreeType library object.  The set of modules that are\n   *   registered by this function is determined at build time.\n   *\n   * @output:\n   *   alibrary ::\n   *     A handle to a new library object.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *   In case you want to provide your own memory allocating routines, use\n   *   @FT_New_Library instead, followed by a call to @FT_Add_Default_Modules\n   *   (or a series of calls to @FT_Add_Module) and\n   *   @FT_Set_Default_Properties.\n   *\n   *   See the documentation of @FT_Library and @FT_Face for multi-threading\n   *   issues.\n   *\n   *   If you need reference-counting (cf. @FT_Reference_Library), use\n   *   @FT_New_Library and @FT_Done_Library.\n   *\n   *   If compilation option `FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES` is\n   *   set, this function reads the `FREETYPE_PROPERTIES` environment\n   *   variable to control driver properties.  See section @properties for\n   *   more.\n   */\n  FT_EXPORT( FT_Error )\n  FT_Init_FreeType( FT_Library  *alibrary );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Done_FreeType\n   *\n   * @description:\n   *   Destroy a given FreeType library object and all of its children,\n   *   including resources, drivers, faces, sizes, etc.\n   *\n   * @input:\n   *   library ::\n   *     A handle to the target library object.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   */\n  FT_EXPORT( FT_Error )\n  FT_Done_FreeType( FT_Library  library );\n\n\n  /**************************************************************************\n   *\n   * @enum:\n   *   FT_OPEN_XXX\n   *\n   * @description:\n   *   A list of bit field constants used within the `flags` field of the\n   *   @FT_Open_Args structure.\n   *\n   * @values:\n   *   FT_OPEN_MEMORY ::\n   *     This is a memory-based stream.\n   *\n   *   FT_OPEN_STREAM ::\n   *     Copy the stream from the `stream` field.\n   *\n   *   FT_OPEN_PATHNAME ::\n   *     Create a new input stream from a C~path name.\n   *\n   *   FT_OPEN_DRIVER ::\n   *     Use the `driver` field.\n   *\n   *   FT_OPEN_PARAMS ::\n   *     Use the `num_params` and `params` fields.\n   *\n   * @note:\n   *   The `FT_OPEN_MEMORY`, `FT_OPEN_STREAM`, and `FT_OPEN_PATHNAME` flags\n   *   are mutually exclusive.\n   */\n#define FT_OPEN_MEMORY    0x1\n#define FT_OPEN_STREAM    0x2\n#define FT_OPEN_PATHNAME  0x4\n#define FT_OPEN_DRIVER    0x8\n#define FT_OPEN_PARAMS    0x10\n\n\n  /* these constants are deprecated; use the corresponding `FT_OPEN_XXX` */\n  /* values instead                                                      */\n#define ft_open_memory    FT_OPEN_MEMORY\n#define ft_open_stream    FT_OPEN_STREAM\n#define ft_open_pathname  FT_OPEN_PATHNAME\n#define ft_open_driver    FT_OPEN_DRIVER\n#define ft_open_params    FT_OPEN_PARAMS\n\n\n  /**************************************************************************\n   *\n   * @struct:\n   *   FT_Parameter\n   *\n   * @description:\n   *   A simple structure to pass more or less generic parameters to\n   *   @FT_Open_Face and @FT_Face_Properties.\n   *\n   * @fields:\n   *   tag ::\n   *     A four-byte identification tag.\n   *\n   *   data ::\n   *     A pointer to the parameter data.\n   *\n   * @note:\n   *   The ID and function of parameters are driver-specific.  See section\n   *   @parameter_tags for more information.\n   */\n  typedef struct  FT_Parameter_\n  {\n    FT_ULong    tag;\n    FT_Pointer  data;\n\n  } FT_Parameter;\n\n\n  /**************************************************************************\n   *\n   * @struct:\n   *   FT_Open_Args\n   *\n   * @description:\n   *   A structure to indicate how to open a new font file or stream.  A\n   *   pointer to such a structure can be used as a parameter for the\n   *   functions @FT_Open_Face and @FT_Attach_Stream.\n   *\n   * @fields:\n   *   flags ::\n   *     A set of bit flags indicating how to use the structure.\n   *\n   *   memory_base ::\n   *     The first byte of the file in memory.\n   *\n   *   memory_size ::\n   *     The size in bytes of the file in memory.\n   *\n   *   pathname ::\n   *     A pointer to an 8-bit file pathname.  The pointer is not owned by\n   *     FreeType.\n   *\n   *   stream ::\n   *     A handle to a source stream object.\n   *\n   *   driver ::\n   *     This field is exclusively used by @FT_Open_Face; it simply specifies\n   *     the font driver to use for opening the face.  If set to `NULL`,\n   *     FreeType tries to load the face with each one of the drivers in its\n   *     list.\n   *\n   *   num_params ::\n   *     The number of extra parameters.\n   *\n   *   params ::\n   *     Extra parameters passed to the font driver when opening a new face.\n   *\n   * @note:\n   *   The stream type is determined by the contents of `flags`:\n   *\n   *   If the @FT_OPEN_MEMORY bit is set, assume that this is a memory file\n   *   of `memory_size` bytes, located at `memory_address`.  The data are not\n   *   copied, and the client is responsible for releasing and destroying\n   *   them _after_ the corresponding call to @FT_Done_Face.\n   *\n   *   Otherwise, if the @FT_OPEN_STREAM bit is set, assume that a custom\n   *   input stream `stream` is used.\n   *\n   *   Otherwise, if the @FT_OPEN_PATHNAME bit is set, assume that this is a\n   *   normal file and use `pathname` to open it.\n   *\n   *   If none of the above bits are set or if multiple are set at the same\n   *   time, the flags are invalid and @FT_Open_Face fails.\n   *\n   *   If the @FT_OPEN_DRIVER bit is set, @FT_Open_Face only tries to open\n   *   the file with the driver whose handler is in `driver`.\n   *\n   *   If the @FT_OPEN_PARAMS bit is set, the parameters given by\n   *   `num_params` and `params` is used.  They are ignored otherwise.\n   *\n   *   Ideally, both the `pathname` and `params` fields should be tagged as\n   *   'const'; this is missing for API backward compatibility.  In other\n   *   words, applications should treat them as read-only.\n   */\n  typedef struct  FT_Open_Args_\n  {\n    FT_UInt         flags;\n    const FT_Byte*  memory_base;\n    FT_Long         memory_size;\n    FT_String*      pathname;\n    FT_Stream       stream;\n    FT_Module       driver;\n    FT_Int          num_params;\n    FT_Parameter*   params;\n\n  } FT_Open_Args;\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_New_Face\n   *\n   * @description:\n   *   Call @FT_Open_Face to open a font by its pathname.\n   *\n   * @inout:\n   *   library ::\n   *     A handle to the library resource.\n   *\n   * @input:\n   *   pathname ::\n   *     A path to the font file.\n   *\n   *   face_index ::\n   *     See @FT_Open_Face for a detailed description of this parameter.\n   *\n   * @output:\n   *   aface ::\n   *     A handle to a new face object.  If `face_index` is greater than or\n   *     equal to zero, it must be non-`NULL`.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *   Use @FT_Done_Face to destroy the created @FT_Face object (along with\n   *   its slot and sizes).\n   */\n  FT_EXPORT( FT_Error )\n  FT_New_Face( FT_Library   library,\n               const char*  filepathname,\n               FT_Long      face_index,\n               FT_Face     *aface );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_New_Memory_Face\n   *\n   * @description:\n   *   Call @FT_Open_Face to open a font that has been loaded into memory.\n   *\n   * @inout:\n   *   library ::\n   *     A handle to the library resource.\n   *\n   * @input:\n   *   file_base ::\n   *     A pointer to the beginning of the font data.\n   *\n   *   file_size ::\n   *     The size of the memory chunk used by the font data.\n   *\n   *   face_index ::\n   *     See @FT_Open_Face for a detailed description of this parameter.\n   *\n   * @output:\n   *   aface ::\n   *     A handle to a new face object.  If `face_index` is greater than or\n   *     equal to zero, it must be non-`NULL`.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *   You must not deallocate the memory before calling @FT_Done_Face.\n   */\n  FT_EXPORT( FT_Error )\n  FT_New_Memory_Face( FT_Library      library,\n                      const FT_Byte*  file_base,\n                      FT_Long         file_size,\n                      FT_Long         face_index,\n                      FT_Face        *aface );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Open_Face\n   *\n   * @description:\n   *   Create a face object from a given resource described by @FT_Open_Args.\n   *\n   * @inout:\n   *   library ::\n   *     A handle to the library resource.\n   *\n   * @input:\n   *   args ::\n   *     A pointer to an `FT_Open_Args` structure that must be filled by the\n   *     caller.\n   *\n   *   face_index ::\n   *     This field holds two different values.  Bits 0-15 are the index of\n   *     the face in the font file (starting with value~0).  Set it to~0 if\n   *     there is only one face in the font file.\n   *\n   *     [Since 2.6.1] Bits 16-30 are relevant to GX and OpenType variation\n   *     fonts only, specifying the named instance index for the current face\n   *     index (starting with value~1; value~0 makes FreeType ignore named\n   *     instances).  For non-variation fonts, bits 16-30 are ignored.\n   *     Assuming that you want to access the third named instance in face~4,\n   *     `face_index` should be set to 0x00030004.  If you want to access\n   *     face~4 without variation handling, simply set `face_index` to\n   *     value~4.\n   *\n   *     `FT_Open_Face` and its siblings can be used to quickly check whether\n   *     the font format of a given font resource is supported by FreeType.\n   *     In general, if the `face_index` argument is negative, the function's\n   *     return value is~0 if the font format is recognized, or non-zero\n   *     otherwise.  The function allocates a more or less empty face handle\n   *     in `*aface` (if `aface` isn't `NULL`); the only two useful fields in\n   *     this special case are `face->num_faces` and `face->style_flags`.\n   *     For any negative value of `face_index`, `face->num_faces` gives the\n   *     number of faces within the font file.  For the negative value\n   *     '-(N+1)' (with 'N' a non-negative 16-bit value), bits 16-30 in\n   *     `face->style_flags` give the number of named instances in face 'N'\n   *     if we have a variation font (or zero otherwise).  After examination,\n   *     the returned @FT_Face structure should be deallocated with a call to\n   *     @FT_Done_Face.\n   *\n   * @output:\n   *   aface ::\n   *     A handle to a new face object.  If `face_index` is greater than or\n   *     equal to zero, it must be non-`NULL`.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *   Unlike FreeType 1.x, this function automatically creates a glyph slot\n   *   for the face object that can be accessed directly through\n   *   `face->glyph`.\n   *\n   *   Each new face object created with this function also owns a default\n   *   @FT_Size object, accessible as `face->size`.\n   *\n   *   One @FT_Library instance can have multiple face objects, this is,\n   *   @FT_Open_Face and its siblings can be called multiple times using the\n   *   same `library` argument.\n   *\n   *   See the discussion of reference counters in the description of\n   *   @FT_Reference_Face.\n   *\n   *   If `FT_OPEN_STREAM` is set in `args->flags`, the stream in\n   *   `args->stream` is automatically closed before this function returns\n   *   any error (including `FT_Err_Invalid_Argument`).\n   *\n   * @example:\n   *   To loop over all faces, use code similar to the following snippet\n   *   (omitting the error handling).\n   *\n   *   ```\n   *     ...\n   *     FT_Face  face;\n   *     FT_Long  i, num_faces;\n   *\n   *\n   *     error = FT_Open_Face( library, args, -1, &face );\n   *     if ( error ) { ... }\n   *\n   *     num_faces = face->num_faces;\n   *     FT_Done_Face( face );\n   *\n   *     for ( i = 0; i < num_faces; i++ )\n   *     {\n   *       ...\n   *       error = FT_Open_Face( library, args, i, &face );\n   *       ...\n   *       FT_Done_Face( face );\n   *       ...\n   *     }\n   *   ```\n   *\n   *   To loop over all valid values for `face_index`, use something similar\n   *   to the following snippet, again without error handling.  The code\n   *   accesses all faces immediately (thus only a single call of\n   *   `FT_Open_Face` within the do-loop), with and without named instances.\n   *\n   *   ```\n   *     ...\n   *     FT_Face  face;\n   *\n   *     FT_Long  num_faces     = 0;\n   *     FT_Long  num_instances = 0;\n   *\n   *     FT_Long  face_idx     = 0;\n   *     FT_Long  instance_idx = 0;\n   *\n   *\n   *     do\n   *     {\n   *       FT_Long  id = ( instance_idx << 16 ) + face_idx;\n   *\n   *\n   *       error = FT_Open_Face( library, args, id, &face );\n   *       if ( error ) { ... }\n   *\n   *       num_faces     = face->num_faces;\n   *       num_instances = face->style_flags >> 16;\n   *\n   *       ...\n   *\n   *       FT_Done_Face( face );\n   *\n   *       if ( instance_idx < num_instances )\n   *         instance_idx++;\n   *       else\n   *       {\n   *         face_idx++;\n   *         instance_idx = 0;\n   *       }\n   *\n   *     } while ( face_idx < num_faces )\n   *   ```\n   */\n  FT_EXPORT( FT_Error )\n  FT_Open_Face( FT_Library           library,\n                const FT_Open_Args*  args,\n                FT_Long              face_index,\n                FT_Face             *aface );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Attach_File\n   *\n   * @description:\n   *   Call @FT_Attach_Stream to attach a file.\n   *\n   * @inout:\n   *   face ::\n   *     The target face object.\n   *\n   * @input:\n   *   filepathname ::\n   *     The pathname.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   */\n  FT_EXPORT( FT_Error )\n  FT_Attach_File( FT_Face      face,\n                  const char*  filepathname );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Attach_Stream\n   *\n   * @description:\n   *   'Attach' data to a face object.  Normally, this is used to read\n   *   additional information for the face object.  For example, you can\n   *   attach an AFM file that comes with a Type~1 font to get the kerning\n   *   values and other metrics.\n   *\n   * @inout:\n   *   face ::\n   *     The target face object.\n   *\n   * @input:\n   *   parameters ::\n   *     A pointer to @FT_Open_Args that must be filled by the caller.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *   The meaning of the 'attach' (i.e., what really happens when the new\n   *   file is read) is not fixed by FreeType itself.  It really depends on\n   *   the font format (and thus the font driver).\n   *\n   *   Client applications are expected to know what they are doing when\n   *   invoking this function.  Most drivers simply do not implement file or\n   *   stream attachments.\n   */\n  FT_EXPORT( FT_Error )\n  FT_Attach_Stream( FT_Face        face,\n                    FT_Open_Args*  parameters );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Reference_Face\n   *\n   * @description:\n   *   A counter gets initialized to~1 at the time an @FT_Face structure is\n   *   created.  This function increments the counter.  @FT_Done_Face then\n   *   only destroys a face if the counter is~1, otherwise it simply\n   *   decrements the counter.\n   *\n   *   This function helps in managing life-cycles of structures that\n   *   reference @FT_Face objects.\n   *\n   * @input:\n   *   face ::\n   *     A handle to a target face object.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @since:\n   *   2.4.2\n   *\n   */\n  FT_EXPORT( FT_Error )\n  FT_Reference_Face( FT_Face  face );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Done_Face\n   *\n   * @description:\n   *   Discard a given face object, as well as all of its child slots and\n   *   sizes.\n   *\n   * @input:\n   *   face ::\n   *     A handle to a target face object.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *   See the discussion of reference counters in the description of\n   *   @FT_Reference_Face.\n   */\n  FT_EXPORT( FT_Error )\n  FT_Done_Face( FT_Face  face );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Select_Size\n   *\n   * @description:\n   *   Select a bitmap strike.  To be more precise, this function sets the\n   *   scaling factors of the active @FT_Size object in a face so that\n   *   bitmaps from this particular strike are taken by @FT_Load_Glyph and\n   *   friends.\n   *\n   * @inout:\n   *   face ::\n   *     A handle to a target face object.\n   *\n   * @input:\n   *   strike_index ::\n   *     The index of the bitmap strike in the `available_sizes` field of\n   *     @FT_FaceRec structure.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *   For bitmaps embedded in outline fonts it is common that only a subset\n   *   of the available glyphs at a given ppem value is available.  FreeType\n   *   silently uses outlines if there is no bitmap for a given glyph index.\n   *\n   *   For GX and OpenType variation fonts, a bitmap strike makes sense only\n   *   if the default instance is active (this is, no glyph variation takes\n   *   place); otherwise, FreeType simply ignores bitmap strikes.  The same\n   *   is true for all named instances that are different from the default\n   *   instance.\n   *\n   *   Don't use this function if you are using the FreeType cache API.\n   */\n  FT_EXPORT( FT_Error )\n  FT_Select_Size( FT_Face  face,\n                  FT_Int   strike_index );\n\n\n  /**************************************************************************\n   *\n   * @enum:\n   *   FT_Size_Request_Type\n   *\n   * @description:\n   *   An enumeration type that lists the supported size request types, i.e.,\n   *   what input size (in font units) maps to the requested output size (in\n   *   pixels, as computed from the arguments of @FT_Size_Request).\n   *\n   * @values:\n   *   FT_SIZE_REQUEST_TYPE_NOMINAL ::\n   *     The nominal size.  The `units_per_EM` field of @FT_FaceRec is used\n   *     to determine both scaling values.\n   *\n   *     This is the standard scaling found in most applications.  In\n   *     particular, use this size request type for TrueType fonts if they\n   *     provide optical scaling or something similar.  Note, however, that\n   *     `units_per_EM` is a rather abstract value which bears no relation to\n   *     the actual size of the glyphs in a font.\n   *\n   *   FT_SIZE_REQUEST_TYPE_REAL_DIM ::\n   *     The real dimension.  The sum of the `ascender` and (minus of) the\n   *     `descender` fields of @FT_FaceRec is used to determine both scaling\n   *     values.\n   *\n   *   FT_SIZE_REQUEST_TYPE_BBOX ::\n   *     The font bounding box.  The width and height of the `bbox` field of\n   *     @FT_FaceRec are used to determine the horizontal and vertical\n   *     scaling value, respectively.\n   *\n   *   FT_SIZE_REQUEST_TYPE_CELL ::\n   *     The `max_advance_width` field of @FT_FaceRec is used to determine\n   *     the horizontal scaling value; the vertical scaling value is\n   *     determined the same way as @FT_SIZE_REQUEST_TYPE_REAL_DIM does.\n   *     Finally, both scaling values are set to the smaller one.  This type\n   *     is useful if you want to specify the font size for, say, a window of\n   *     a given dimension and 80x24 cells.\n   *\n   *   FT_SIZE_REQUEST_TYPE_SCALES ::\n   *     Specify the scaling values directly.\n   *\n   * @note:\n   *   The above descriptions only apply to scalable formats.  For bitmap\n   *   formats, the behaviour is up to the driver.\n   *\n   *   See the note section of @FT_Size_Metrics if you wonder how size\n   *   requesting relates to scaling values.\n   */\n  typedef enum  FT_Size_Request_Type_\n  {\n    FT_SIZE_REQUEST_TYPE_NOMINAL,\n    FT_SIZE_REQUEST_TYPE_REAL_DIM,\n    FT_SIZE_REQUEST_TYPE_BBOX,\n    FT_SIZE_REQUEST_TYPE_CELL,\n    FT_SIZE_REQUEST_TYPE_SCALES,\n\n    FT_SIZE_REQUEST_TYPE_MAX\n\n  } FT_Size_Request_Type;\n\n\n  /**************************************************************************\n   *\n   * @struct:\n   *   FT_Size_RequestRec\n   *\n   * @description:\n   *   A structure to model a size request.\n   *\n   * @fields:\n   *   type ::\n   *     See @FT_Size_Request_Type.\n   *\n   *   width ::\n   *     The desired width, given as a 26.6 fractional point value (with 72pt\n   *     = 1in).\n   *\n   *   height ::\n   *     The desired height, given as a 26.6 fractional point value (with\n   *     72pt = 1in).\n   *\n   *   horiResolution ::\n   *     The horizontal resolution (dpi, i.e., pixels per inch).  If set to\n   *     zero, `width` is treated as a 26.6 fractional **pixel** value, which\n   *     gets internally rounded to an integer.\n   *\n   *   vertResolution ::\n   *     The vertical resolution (dpi, i.e., pixels per inch).  If set to\n   *     zero, `height` is treated as a 26.6 fractional **pixel** value,\n   *     which gets internally rounded to an integer.\n   *\n   * @note:\n   *   If `width` is zero, the horizontal scaling value is set equal to the\n   *   vertical scaling value, and vice versa.\n   *\n   *   If `type` is `FT_SIZE_REQUEST_TYPE_SCALES`, `width` and `height` are\n   *   interpreted directly as 16.16 fractional scaling values, without any\n   *   further modification, and both `horiResolution` and `vertResolution`\n   *   are ignored.\n   */\n  typedef struct  FT_Size_RequestRec_\n  {\n    FT_Size_Request_Type  type;\n    FT_Long               width;\n    FT_Long               height;\n    FT_UInt               horiResolution;\n    FT_UInt               vertResolution;\n\n  } FT_Size_RequestRec;\n\n\n  /**************************************************************************\n   *\n   * @struct:\n   *   FT_Size_Request\n   *\n   * @description:\n   *   A handle to a size request structure.\n   */\n  typedef struct FT_Size_RequestRec_  *FT_Size_Request;\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Request_Size\n   *\n   * @description:\n   *   Resize the scale of the active @FT_Size object in a face.\n   *\n   * @inout:\n   *   face ::\n   *     A handle to a target face object.\n   *\n   * @input:\n   *   req ::\n   *     A pointer to a @FT_Size_RequestRec.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *   Although drivers may select the bitmap strike matching the request,\n   *   you should not rely on this if you intend to select a particular\n   *   bitmap strike.  Use @FT_Select_Size instead in that case.\n   *\n   *   The relation between the requested size and the resulting glyph size\n   *   is dependent entirely on how the size is defined in the source face.\n   *   The font designer chooses the final size of each glyph relative to\n   *   this size.  For more information refer to\n   *   'https://www.freetype.org/freetype2/docs/glyphs/glyphs-2.html'.\n   *\n   *   Contrary to @FT_Set_Char_Size, this function doesn't have special code\n   *   to normalize zero-valued widths, heights, or resolutions (which lead\n   *   to errors in most cases).\n   *\n   *   Don't use this function if you are using the FreeType cache API.\n   */\n  FT_EXPORT( FT_Error )\n  FT_Request_Size( FT_Face          face,\n                   FT_Size_Request  req );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Set_Char_Size\n   *\n   * @description:\n   *   Call @FT_Request_Size to request the nominal size (in points).\n   *\n   * @inout:\n   *   face ::\n   *     A handle to a target face object.\n   *\n   * @input:\n   *   char_width ::\n   *     The nominal width, in 26.6 fractional points.\n   *\n   *   char_height ::\n   *     The nominal height, in 26.6 fractional points.\n   *\n   *   horz_resolution ::\n   *     The horizontal resolution in dpi.\n   *\n   *   vert_resolution ::\n   *     The vertical resolution in dpi.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *   While this function allows fractional points as input values, the\n   *   resulting ppem value for the given resolution is always rounded to the\n   *   nearest integer.\n   *\n   *   If either the character width or height is zero, it is set equal to\n   *   the other value.\n   *\n   *   If either the horizontal or vertical resolution is zero, it is set\n   *   equal to the other value.\n   *\n   *   A character width or height smaller than 1pt is set to 1pt; if both\n   *   resolution values are zero, they are set to 72dpi.\n   *\n   *   Don't use this function if you are using the FreeType cache API.\n   */\n  FT_EXPORT( FT_Error )\n  FT_Set_Char_Size( FT_Face     face,\n                    FT_F26Dot6  char_width,\n                    FT_F26Dot6  char_height,\n                    FT_UInt     horz_resolution,\n                    FT_UInt     vert_resolution );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Set_Pixel_Sizes\n   *\n   * @description:\n   *   Call @FT_Request_Size to request the nominal size (in pixels).\n   *\n   * @inout:\n   *   face ::\n   *     A handle to the target face object.\n   *\n   * @input:\n   *   pixel_width ::\n   *     The nominal width, in pixels.\n   *\n   *   pixel_height ::\n   *     The nominal height, in pixels.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *   You should not rely on the resulting glyphs matching or being\n   *   constrained to this pixel size.  Refer to @FT_Request_Size to\n   *   understand how requested sizes relate to actual sizes.\n   *\n   *   Don't use this function if you are using the FreeType cache API.\n   */\n  FT_EXPORT( FT_Error )\n  FT_Set_Pixel_Sizes( FT_Face  face,\n                      FT_UInt  pixel_width,\n                      FT_UInt  pixel_height );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Load_Glyph\n   *\n   * @description:\n   *   Load a glyph into the glyph slot of a face object.\n   *\n   * @inout:\n   *   face ::\n   *     A handle to the target face object where the glyph is loaded.\n   *\n   * @input:\n   *   glyph_index ::\n   *     The index of the glyph in the font file.  For CID-keyed fonts\n   *     (either in PS or in CFF format) this argument specifies the CID\n   *     value.\n   *\n   *   load_flags ::\n   *     A flag indicating what to load for this glyph.  The @FT_LOAD_XXX\n   *     constants can be used to control the glyph loading process (e.g.,\n   *     whether the outline should be scaled, whether to load bitmaps or\n   *     not, whether to hint the outline, etc).\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *   The loaded glyph may be transformed.  See @FT_Set_Transform for the\n   *   details.\n   *\n   *   For subsetted CID-keyed fonts, `FT_Err_Invalid_Argument` is returned\n   *   for invalid CID values (this is, for CID values that don't have a\n   *   corresponding glyph in the font).  See the discussion of the\n   *   @FT_FACE_FLAG_CID_KEYED flag for more details.\n   *\n   *   If you receive `FT_Err_Glyph_Too_Big`, try getting the glyph outline\n   *   at EM size, then scale it manually and fill it as a graphics\n   *   operation.\n   */\n  FT_EXPORT( FT_Error )\n  FT_Load_Glyph( FT_Face   face,\n                 FT_UInt   glyph_index,\n                 FT_Int32  load_flags );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Load_Char\n   *\n   * @description:\n   *   Load a glyph into the glyph slot of a face object, accessed by its\n   *   character code.\n   *\n   * @inout:\n   *   face ::\n   *     A handle to a target face object where the glyph is loaded.\n   *\n   * @input:\n   *   char_code ::\n   *     The glyph's character code, according to the current charmap used in\n   *     the face.\n   *\n   *   load_flags ::\n   *     A flag indicating what to load for this glyph.  The @FT_LOAD_XXX\n   *     constants can be used to control the glyph loading process (e.g.,\n   *     whether the outline should be scaled, whether to load bitmaps or\n   *     not, whether to hint the outline, etc).\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *   This function simply calls @FT_Get_Char_Index and @FT_Load_Glyph.\n   *\n   *   Many fonts contain glyphs that can't be loaded by this function since\n   *   its glyph indices are not listed in any of the font's charmaps.\n   *\n   *   If no active cmap is set up (i.e., `face->charmap` is zero), the call\n   *   to @FT_Get_Char_Index is omitted, and the function behaves identically\n   *   to @FT_Load_Glyph.\n   */\n  FT_EXPORT( FT_Error )\n  FT_Load_Char( FT_Face   face,\n                FT_ULong  char_code,\n                FT_Int32  load_flags );\n\n\n  /**************************************************************************\n   *\n   * @enum:\n   *   FT_LOAD_XXX\n   *\n   * @description:\n   *   A list of bit field constants for @FT_Load_Glyph to indicate what kind\n   *   of operations to perform during glyph loading.\n   *\n   * @values:\n   *   FT_LOAD_DEFAULT ::\n   *     Corresponding to~0, this value is used as the default glyph load\n   *     operation.  In this case, the following happens:\n   *\n   *     1. FreeType looks for a bitmap for the glyph corresponding to the\n   *     face's current size.  If one is found, the function returns.  The\n   *     bitmap data can be accessed from the glyph slot (see note below).\n   *\n   *     2. If no embedded bitmap is searched for or found, FreeType looks\n   *     for a scalable outline.  If one is found, it is loaded from the font\n   *     file, scaled to device pixels, then 'hinted' to the pixel grid in\n   *     order to optimize it.  The outline data can be accessed from the\n   *     glyph slot (see note below).\n   *\n   *     Note that by default the glyph loader doesn't render outlines into\n   *     bitmaps.  The following flags are used to modify this default\n   *     behaviour to more specific and useful cases.\n   *\n   *   FT_LOAD_NO_SCALE ::\n   *     Don't scale the loaded outline glyph but keep it in font units.\n   *\n   *     This flag implies @FT_LOAD_NO_HINTING and @FT_LOAD_NO_BITMAP, and\n   *     unsets @FT_LOAD_RENDER.\n   *\n   *     If the font is 'tricky' (see @FT_FACE_FLAG_TRICKY for more), using\n   *     `FT_LOAD_NO_SCALE` usually yields meaningless outlines because the\n   *     subglyphs must be scaled and positioned with hinting instructions.\n   *     This can be solved by loading the font without `FT_LOAD_NO_SCALE`\n   *     and setting the character size to `font->units_per_EM`.\n   *\n   *   FT_LOAD_NO_HINTING ::\n   *     Disable hinting.  This generally generates 'blurrier' bitmap glyphs\n   *     when the glyph are rendered in any of the anti-aliased modes.  See\n   *     also the note below.\n   *\n   *     This flag is implied by @FT_LOAD_NO_SCALE.\n   *\n   *   FT_LOAD_RENDER ::\n   *     Call @FT_Render_Glyph after the glyph is loaded.  By default, the\n   *     glyph is rendered in @FT_RENDER_MODE_NORMAL mode.  This can be\n   *     overridden by @FT_LOAD_TARGET_XXX or @FT_LOAD_MONOCHROME.\n   *\n   *     This flag is unset by @FT_LOAD_NO_SCALE.\n   *\n   *   FT_LOAD_NO_BITMAP ::\n   *     Ignore bitmap strikes when loading.  Bitmap-only fonts ignore this\n   *     flag.\n   *\n   *     @FT_LOAD_NO_SCALE always sets this flag.\n   *\n   *   FT_LOAD_VERTICAL_LAYOUT ::\n   *     Load the glyph for vertical text layout.  In particular, the\n   *     `advance` value in the @FT_GlyphSlotRec structure is set to the\n   *     `vertAdvance` value of the `metrics` field.\n   *\n   *     In case @FT_HAS_VERTICAL doesn't return true, you shouldn't use this\n   *     flag currently.  Reason is that in this case vertical metrics get\n   *     synthesized, and those values are not always consistent across\n   *     various font formats.\n   *\n   *   FT_LOAD_FORCE_AUTOHINT ::\n   *     Prefer the auto-hinter over the font's native hinter.  See also the\n   *     note below.\n   *\n   *   FT_LOAD_PEDANTIC ::\n   *     Make the font driver perform pedantic verifications during glyph\n   *     loading and hinting.  This is mostly used to detect broken glyphs in\n   *     fonts.  By default, FreeType tries to handle broken fonts also.\n   *\n   *     In particular, errors from the TrueType bytecode engine are not\n   *     passed to the application if this flag is not set; this might result\n   *     in partially hinted or distorted glyphs in case a glyph's bytecode\n   *     is buggy.\n   *\n   *   FT_LOAD_NO_RECURSE ::\n   *     Don't load composite glyphs recursively.  Instead, the font driver\n   *     fills the `num_subglyph` and `subglyphs` values of the glyph slot;\n   *     it also sets `glyph->format` to @FT_GLYPH_FORMAT_COMPOSITE.  The\n   *     description of subglyphs can then be accessed with\n   *     @FT_Get_SubGlyph_Info.\n   *\n   *     Don't use this flag for retrieving metrics information since some\n   *     font drivers only return rudimentary data.\n   *\n   *     This flag implies @FT_LOAD_NO_SCALE and @FT_LOAD_IGNORE_TRANSFORM.\n   *\n   *   FT_LOAD_IGNORE_TRANSFORM ::\n   *     Ignore the transform matrix set by @FT_Set_Transform.\n   *\n   *   FT_LOAD_MONOCHROME ::\n   *     This flag is used with @FT_LOAD_RENDER to indicate that you want to\n   *     render an outline glyph to a 1-bit monochrome bitmap glyph, with\n   *     8~pixels packed into each byte of the bitmap data.\n   *\n   *     Note that this has no effect on the hinting algorithm used.  You\n   *     should rather use @FT_LOAD_TARGET_MONO so that the\n   *     monochrome-optimized hinting algorithm is used.\n   *\n   *   FT_LOAD_LINEAR_DESIGN ::\n   *     Keep `linearHoriAdvance` and `linearVertAdvance` fields of\n   *     @FT_GlyphSlotRec in font units.  See @FT_GlyphSlotRec for details.\n   *\n   *   FT_LOAD_NO_AUTOHINT ::\n   *     Disable the auto-hinter.  See also the note below.\n   *\n   *   FT_LOAD_COLOR ::\n   *     Load colored glyphs.  There are slight differences depending on the\n   *     font format.\n   *\n   *     [Since 2.5] Load embedded color bitmap images.  The resulting color\n   *     bitmaps, if available, will have the @FT_PIXEL_MODE_BGRA format,\n   *     with pre-multiplied color channels.  If the flag is not set and\n   *     color bitmaps are found, they are converted to 256-level gray\n   *     bitmaps, using the @FT_PIXEL_MODE_GRAY format.\n   *\n   *     [Since 2.10, experimental] If the glyph index contains an entry in\n   *     the face's 'COLR' table with a 'CPAL' palette table (as defined in\n   *     the OpenType specification), make @FT_Render_Glyph provide a default\n   *     blending of the color glyph layers associated with the glyph index,\n   *     using the same bitmap format as embedded color bitmap images.  This\n   *     is mainly for convenience; for full control of color layers use\n   *     @FT_Get_Color_Glyph_Layer and FreeType's color functions like\n   *     @FT_Palette_Select instead of setting @FT_LOAD_COLOR for rendering\n   *     so that the client application can handle blending by itself.\n   *\n   *   FT_LOAD_COMPUTE_METRICS ::\n   *     [Since 2.6.1] Compute glyph metrics from the glyph data, without the\n   *     use of bundled metrics tables (for example, the 'hdmx' table in\n   *     TrueType fonts).  This flag is mainly used by font validating or\n   *     font editing applications, which need to ignore, verify, or edit\n   *     those tables.\n   *\n   *     Currently, this flag is only implemented for TrueType fonts.\n   *\n   *   FT_LOAD_BITMAP_METRICS_ONLY ::\n   *     [Since 2.7.1] Request loading of the metrics and bitmap image\n   *     information of a (possibly embedded) bitmap glyph without allocating\n   *     or copying the bitmap image data itself.  No effect if the target\n   *     glyph is not a bitmap image.\n   *\n   *     This flag unsets @FT_LOAD_RENDER.\n   *\n   *   FT_LOAD_CROP_BITMAP ::\n   *     Ignored.  Deprecated.\n   *\n   *   FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH ::\n   *     Ignored.  Deprecated.\n   *\n   * @note:\n   *   By default, hinting is enabled and the font's native hinter (see\n   *   @FT_FACE_FLAG_HINTER) is preferred over the auto-hinter.  You can\n   *   disable hinting by setting @FT_LOAD_NO_HINTING or change the\n   *   precedence by setting @FT_LOAD_FORCE_AUTOHINT.  You can also set\n   *   @FT_LOAD_NO_AUTOHINT in case you don't want the auto-hinter to be used\n   *   at all.\n   *\n   *   See the description of @FT_FACE_FLAG_TRICKY for a special exception\n   *   (affecting only a handful of Asian fonts).\n   *\n   *   Besides deciding which hinter to use, you can also decide which\n   *   hinting algorithm to use.  See @FT_LOAD_TARGET_XXX for details.\n   *\n   *   Note that the auto-hinter needs a valid Unicode cmap (either a native\n   *   one or synthesized by FreeType) for producing correct results.  If a\n   *   font provides an incorrect mapping (for example, assigning the\n   *   character code U+005A, LATIN CAPITAL LETTER~Z, to a glyph depicting a\n   *   mathematical integral sign), the auto-hinter might produce useless\n   *   results.\n   *\n   */\n#define FT_LOAD_DEFAULT                      0x0\n#define FT_LOAD_NO_SCALE                     ( 1L << 0 )\n#define FT_LOAD_NO_HINTING                   ( 1L << 1 )\n#define FT_LOAD_RENDER                       ( 1L << 2 )\n#define FT_LOAD_NO_BITMAP                    ( 1L << 3 )\n#define FT_LOAD_VERTICAL_LAYOUT              ( 1L << 4 )\n#define FT_LOAD_FORCE_AUTOHINT               ( 1L << 5 )\n#define FT_LOAD_CROP_BITMAP                  ( 1L << 6 )\n#define FT_LOAD_PEDANTIC                     ( 1L << 7 )\n#define FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH  ( 1L << 9 )\n#define FT_LOAD_NO_RECURSE                   ( 1L << 10 )\n#define FT_LOAD_IGNORE_TRANSFORM             ( 1L << 11 )\n#define FT_LOAD_MONOCHROME                   ( 1L << 12 )\n#define FT_LOAD_LINEAR_DESIGN                ( 1L << 13 )\n#define FT_LOAD_NO_AUTOHINT                  ( 1L << 15 )\n  /* Bits 16-19 are used by `FT_LOAD_TARGET_` */\n#define FT_LOAD_COLOR                        ( 1L << 20 )\n#define FT_LOAD_COMPUTE_METRICS              ( 1L << 21 )\n#define FT_LOAD_BITMAP_METRICS_ONLY          ( 1L << 22 )\n\n  /* */\n\n  /* used internally only by certain font drivers */\n#define FT_LOAD_ADVANCE_ONLY                 ( 1L << 8 )\n#define FT_LOAD_SBITS_ONLY                   ( 1L << 14 )\n\n\n  /**************************************************************************\n   *\n   * @enum:\n   *   FT_LOAD_TARGET_XXX\n   *\n   * @description:\n   *   A list of values to select a specific hinting algorithm for the\n   *   hinter.  You should OR one of these values to your `load_flags` when\n   *   calling @FT_Load_Glyph.\n   *\n   *   Note that a font's native hinters may ignore the hinting algorithm you\n   *   have specified (e.g., the TrueType bytecode interpreter).  You can set\n   *   @FT_LOAD_FORCE_AUTOHINT to ensure that the auto-hinter is used.\n   *\n   * @values:\n   *   FT_LOAD_TARGET_NORMAL ::\n   *     The default hinting algorithm, optimized for standard gray-level\n   *     rendering.  For monochrome output, use @FT_LOAD_TARGET_MONO instead.\n   *\n   *   FT_LOAD_TARGET_LIGHT ::\n   *     A lighter hinting algorithm for gray-level modes.  Many generated\n   *     glyphs are fuzzier but better resemble their original shape.  This\n   *     is achieved by snapping glyphs to the pixel grid only vertically\n   *     (Y-axis), as is done by FreeType's new CFF engine or Microsoft's\n   *     ClearType font renderer.  This preserves inter-glyph spacing in\n   *     horizontal text.  The snapping is done either by the native font\n   *     driver, if the driver itself and the font support it, or by the\n   *     auto-hinter.\n   *\n   *     Advance widths are rounded to integer values; however, using the\n   *     `lsb_delta` and `rsb_delta` fields of @FT_GlyphSlotRec, it is\n   *     possible to get fractional advance widths for subpixel positioning\n   *     (which is recommended to use).\n   *\n   *     If configuration option `AF_CONFIG_OPTION_TT_SIZE_METRICS` is\n   *     active, TrueType-like metrics are used to make this mode behave\n   *     similarly as in unpatched FreeType versions between 2.4.6 and 2.7.1\n   *     (inclusive).\n   *\n   *   FT_LOAD_TARGET_MONO ::\n   *     Strong hinting algorithm that should only be used for monochrome\n   *     output.  The result is probably unpleasant if the glyph is rendered\n   *     in non-monochrome modes.\n   *\n   *     Note that for outline fonts only the TrueType font driver has proper\n   *     monochrome hinting support, provided the TTFs contain hints for B/W\n   *     rendering (which most fonts no longer provide).  If these conditions\n   *     are not met it is very likely that you get ugly results at smaller\n   *     sizes.\n   *\n   *   FT_LOAD_TARGET_LCD ::\n   *     A variant of @FT_LOAD_TARGET_LIGHT optimized for horizontally\n   *     decimated LCD displays.\n   *\n   *   FT_LOAD_TARGET_LCD_V ::\n   *     A variant of @FT_LOAD_TARGET_NORMAL optimized for vertically\n   *     decimated LCD displays.\n   *\n   * @note:\n   *   You should use only _one_ of the `FT_LOAD_TARGET_XXX` values in your\n   *   `load_flags`.  They can't be ORed.\n   *\n   *   If @FT_LOAD_RENDER is also set, the glyph is rendered in the\n   *   corresponding mode (i.e., the mode that matches the used algorithm\n   *   best).  An exception is `FT_LOAD_TARGET_MONO` since it implies\n   *   @FT_LOAD_MONOCHROME.\n   *\n   *   You can use a hinting algorithm that doesn't correspond to the same\n   *   rendering mode.  As an example, it is possible to use the 'light'\n   *   hinting algorithm and have the results rendered in horizontal LCD\n   *   pixel mode, with code like\n   *\n   *   ```\n   *     FT_Load_Glyph( face, glyph_index,\n   *                    load_flags | FT_LOAD_TARGET_LIGHT );\n   *\n   *     FT_Render_Glyph( face->glyph, FT_RENDER_MODE_LCD );\n   *   ```\n   *\n   *   In general, you should stick with one rendering mode.  For example,\n   *   switching between @FT_LOAD_TARGET_NORMAL and @FT_LOAD_TARGET_MONO\n   *   enforces a lot of recomputation for TrueType fonts, which is slow.\n   *   Another reason is caching: Selecting a different mode usually causes\n   *   changes in both the outlines and the rasterized bitmaps; it is thus\n   *   necessary to empty the cache after a mode switch to avoid false hits.\n   *\n   */\n#define FT_LOAD_TARGET_( x )   ( (FT_Int32)( (x) & 15 ) << 16 )\n\n#define FT_LOAD_TARGET_NORMAL  FT_LOAD_TARGET_( FT_RENDER_MODE_NORMAL )\n#define FT_LOAD_TARGET_LIGHT   FT_LOAD_TARGET_( FT_RENDER_MODE_LIGHT  )\n#define FT_LOAD_TARGET_MONO    FT_LOAD_TARGET_( FT_RENDER_MODE_MONO   )\n#define FT_LOAD_TARGET_LCD     FT_LOAD_TARGET_( FT_RENDER_MODE_LCD    )\n#define FT_LOAD_TARGET_LCD_V   FT_LOAD_TARGET_( FT_RENDER_MODE_LCD_V  )\n\n\n  /**************************************************************************\n   *\n   * @macro:\n   *   FT_LOAD_TARGET_MODE\n   *\n   * @description:\n   *   Return the @FT_Render_Mode corresponding to a given\n   *   @FT_LOAD_TARGET_XXX value.\n   *\n   */\n#define FT_LOAD_TARGET_MODE( x )  ( (FT_Render_Mode)( ( (x) >> 16 ) & 15 ) )\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Set_Transform\n   *\n   * @description:\n   *   Set the transformation that is applied to glyph images when they are\n   *   loaded into a glyph slot through @FT_Load_Glyph.\n   *\n   * @inout:\n   *   face ::\n   *     A handle to the source face object.\n   *\n   * @input:\n   *   matrix ::\n   *     A pointer to the transformation's 2x2 matrix.  Use `NULL` for the\n   *     identity matrix.\n   *   delta ::\n   *     A pointer to the translation vector.  Use `NULL` for the null\n   *     vector.\n   *\n   * @note:\n   *   This function is provided as a convenience, but keep in mind that\n   *   @FT_Matrix coefficients are only 16.16 fixed-point values, which can\n   *   limit the accuracy of the results.  Using floating-point computations\n   *   to perform the transform directly in client code instead will always\n   *   yield better numbers.\n   *\n   *   The transformation is only applied to scalable image formats after the\n   *   glyph has been loaded.  It means that hinting is unaltered by the\n   *   transformation and is performed on the character size given in the\n   *   last call to @FT_Set_Char_Size or @FT_Set_Pixel_Sizes.\n   *\n   *   Note that this also transforms the `face.glyph.advance` field, but\n   *   **not** the values in `face.glyph.metrics`.\n   */\n  FT_EXPORT( void )\n  FT_Set_Transform( FT_Face     face,\n                    FT_Matrix*  matrix,\n                    FT_Vector*  delta );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Get_Transform\n   *\n   * @description:\n   *   Return the transformation that is applied to glyph images when they\n   *   are loaded into a glyph slot through @FT_Load_Glyph.  See\n   *   @FT_Set_Transform for more details.\n   *\n   * @input:\n   *   face ::\n   *     A handle to the source face object.\n   *\n   * @output:\n   *   matrix ::\n   *     A pointer to a transformation's 2x2 matrix.  Set this to NULL if you\n   *     are not interested in the value.\n   *\n   *   delta ::\n   *     A pointer a translation vector.  Set this to NULL if you are not\n   *     interested in the value.\n   *\n   * @since:\n   *   2.11\n   *\n   */\n  FT_EXPORT( void )\n  FT_Get_Transform( FT_Face     face,\n                    FT_Matrix*  matrix,\n                    FT_Vector*  delta );\n\n\n  /**************************************************************************\n   *\n   * @enum:\n   *   FT_Render_Mode\n   *\n   * @description:\n   *   Render modes supported by FreeType~2.  Each mode corresponds to a\n   *   specific type of scanline conversion performed on the outline.\n   *\n   *   For bitmap fonts and embedded bitmaps the `bitmap->pixel_mode` field\n   *   in the @FT_GlyphSlotRec structure gives the format of the returned\n   *   bitmap.\n   *\n   *   All modes except @FT_RENDER_MODE_MONO use 256 levels of opacity,\n   *   indicating pixel coverage.  Use linear alpha blending and gamma\n   *   correction to correctly render non-monochrome glyph bitmaps onto a\n   *   surface; see @FT_Render_Glyph.\n   *\n   *   The @FT_RENDER_MODE_SDF is a special render mode that uses up to 256\n   *   distance values, indicating the signed distance from the grid position\n   *   to the nearest outline.\n   *\n   * @values:\n   *   FT_RENDER_MODE_NORMAL ::\n   *     Default render mode; it corresponds to 8-bit anti-aliased bitmaps.\n   *\n   *   FT_RENDER_MODE_LIGHT ::\n   *     This is equivalent to @FT_RENDER_MODE_NORMAL.  It is only defined as\n   *     a separate value because render modes are also used indirectly to\n   *     define hinting algorithm selectors.  See @FT_LOAD_TARGET_XXX for\n   *     details.\n   *\n   *   FT_RENDER_MODE_MONO ::\n   *     This mode corresponds to 1-bit bitmaps (with 2~levels of opacity).\n   *\n   *   FT_RENDER_MODE_LCD ::\n   *     This mode corresponds to horizontal RGB and BGR subpixel displays\n   *     like LCD screens.  It produces 8-bit bitmaps that are 3~times the\n   *     width of the original glyph outline in pixels, and which use the\n   *     @FT_PIXEL_MODE_LCD mode.\n   *\n   *   FT_RENDER_MODE_LCD_V ::\n   *     This mode corresponds to vertical RGB and BGR subpixel displays\n   *     (like PDA screens, rotated LCD displays, etc.).  It produces 8-bit\n   *     bitmaps that are 3~times the height of the original glyph outline in\n   *     pixels and use the @FT_PIXEL_MODE_LCD_V mode.\n   *\n   *   FT_RENDER_MODE_SDF ::\n   *     This mode corresponds to 8-bit, single-channel signed distance field\n   *     (SDF) bitmaps.  Each pixel in the SDF grid is the value from the\n   *     pixel's position to the nearest glyph's outline.  The distances are\n   *     calculated from the center of the pixel and are positive if they are\n   *     filled by the outline (i.e., inside the outline) and negative\n   *     otherwise.  Check the note below on how to convert the output values\n   *     to usable data.\n   *\n   * @note:\n   *   The selected render mode only affects vector glyphs of a font.\n   *   Embedded bitmaps often have a different pixel mode like\n   *   @FT_PIXEL_MODE_MONO.  You can use @FT_Bitmap_Convert to transform them\n   *   into 8-bit pixmaps.\n   *\n   *   For @FT_RENDER_MODE_SDF the output bitmap buffer contains normalized\n   *   distances that are packed into unsigned 8-bit values.  To get pixel\n   *   values in floating point representation use the following pseudo-C\n   *   code for the conversion.\n   *\n   *   ```\n   *   // Load glyph and render using FT_RENDER_MODE_SDF,\n   *   // then use the output buffer as follows.\n   *\n   *   ...\n   *   FT_Byte  buffer = glyph->bitmap->buffer;\n   *\n   *\n   *   for pixel in buffer\n   *   {\n   *     // `sd` is the signed distance and `spread` is the current spread;\n   *     // the default spread is 2 and can be changed.\n   *\n   *     float  sd = (float)pixel - 128.0f;\n   *\n   *\n   *     // Convert to pixel values.\n   *     sd = ( sd / 128.0f ) * spread;\n   *\n   *     // Store `sd` in a buffer or use as required.\n   *   }\n   *\n   *   ```\n   */\n  typedef enum  FT_Render_Mode_\n  {\n    FT_RENDER_MODE_NORMAL = 0,\n    FT_RENDER_MODE_LIGHT,\n    FT_RENDER_MODE_MONO,\n    FT_RENDER_MODE_LCD,\n    FT_RENDER_MODE_LCD_V,\n    FT_RENDER_MODE_SDF,\n\n    FT_RENDER_MODE_MAX\n\n  } FT_Render_Mode;\n\n\n  /* these constants are deprecated; use the corresponding */\n  /* `FT_Render_Mode` values instead                       */\n#define ft_render_mode_normal  FT_RENDER_MODE_NORMAL\n#define ft_render_mode_mono    FT_RENDER_MODE_MONO\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Render_Glyph\n   *\n   * @description:\n   *   Convert a given glyph image to a bitmap.  It does so by inspecting the\n   *   glyph image format, finding the relevant renderer, and invoking it.\n   *\n   * @inout:\n   *   slot ::\n   *     A handle to the glyph slot containing the image to convert.\n   *\n   * @input:\n   *   render_mode ::\n   *     The render mode used to render the glyph image into a bitmap.  See\n   *     @FT_Render_Mode for a list of possible values.\n   *\n   *     If @FT_RENDER_MODE_NORMAL is used, a previous call of @FT_Load_Glyph\n   *     with flag @FT_LOAD_COLOR makes FT_Render_Glyph provide a default\n   *     blending of colored glyph layers associated with the current glyph\n   *     slot (provided the font contains such layers) instead of rendering\n   *     the glyph slot's outline.  This is an experimental feature; see\n   *     @FT_LOAD_COLOR for more information.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *   To get meaningful results, font scaling values must be set with\n   *   functions like @FT_Set_Char_Size before calling `FT_Render_Glyph`.\n   *\n   *   When FreeType outputs a bitmap of a glyph, it really outputs an alpha\n   *   coverage map.  If a pixel is completely covered by a filled-in\n   *   outline, the bitmap contains 0xFF at that pixel, meaning that\n   *   0xFF/0xFF fraction of that pixel is covered, meaning the pixel is 100%\n   *   black (or 0% bright).  If a pixel is only 50% covered (value 0x80),\n   *   the pixel is made 50% black (50% bright or a middle shade of grey).\n   *   0% covered means 0% black (100% bright or white).\n   *\n   *   On high-DPI screens like on smartphones and tablets, the pixels are so\n   *   small that their chance of being completely covered and therefore\n   *   completely black are fairly good.  On the low-DPI screens, however,\n   *   the situation is different.  The pixels are too large for most of the\n   *   details of a glyph and shades of gray are the norm rather than the\n   *   exception.\n   *\n   *   This is relevant because all our screens have a second problem: they\n   *   are not linear.  1~+~1 is not~2.  Twice the value does not result in\n   *   twice the brightness.  When a pixel is only 50% covered, the coverage\n   *   map says 50% black, and this translates to a pixel value of 128 when\n   *   you use 8~bits per channel (0-255).  However, this does not translate\n   *   to 50% brightness for that pixel on our sRGB and gamma~2.2 screens.\n   *   Due to their non-linearity, they dwell longer in the darks and only a\n   *   pixel value of about 186 results in 50% brightness -- 128 ends up too\n   *   dark on both bright and dark backgrounds.  The net result is that dark\n   *   text looks burnt-out, pixely and blotchy on bright background, bright\n   *   text too frail on dark backgrounds, and colored text on colored\n   *   background (for example, red on green) seems to have dark halos or\n   *   'dirt' around it.  The situation is especially ugly for diagonal stems\n   *   like in 'w' glyph shapes where the quality of FreeType's anti-aliasing\n   *   depends on the correct display of grays.  On high-DPI screens where\n   *   smaller, fully black pixels reign supreme, this doesn't matter, but on\n   *   our low-DPI screens with all the gray shades, it does.  0% and 100%\n   *   brightness are the same things in linear and non-linear space, just\n   *   all the shades in-between aren't.\n   *\n   *   The blending function for placing text over a background is\n   *\n   *   ```\n   *     dst = alpha * src + (1 - alpha) * dst    ,\n   *   ```\n   *\n   *   which is known as the OVER operator.\n   *\n   *   To correctly composite an anti-aliased pixel of a glyph onto a\n   *   surface,\n   *\n   *   1. take the foreground and background colors (e.g., in sRGB space)\n   *      and apply gamma to get them in a linear space,\n   *\n   *   2. use OVER to blend the two linear colors using the glyph pixel\n   *      as the alpha value (remember, the glyph bitmap is an alpha coverage\n   *      bitmap), and\n   *\n   *   3. apply inverse gamma to the blended pixel and write it back to\n   *      the image.\n   *\n   *   Internal testing at Adobe found that a target inverse gamma of~1.8 for\n   *   step~3 gives good results across a wide range of displays with an sRGB\n   *   gamma curve or a similar one.\n   *\n   *   This process can cost performance.  There is an approximation that\n   *   does not need to know about the background color; see\n   *   https://bel.fi/alankila/lcd/ and\n   *   https://bel.fi/alankila/lcd/alpcor.html for details.\n   *\n   *   **ATTENTION**: Linear blending is even more important when dealing\n   *   with subpixel-rendered glyphs to prevent color-fringing!  A\n   *   subpixel-rendered glyph must first be filtered with a filter that\n   *   gives equal weight to the three color primaries and does not exceed a\n   *   sum of 0x100, see section @lcd_rendering.  Then the only difference to\n   *   gray linear blending is that subpixel-rendered linear blending is done\n   *   3~times per pixel: red foreground subpixel to red background subpixel\n   *   and so on for green and blue.\n   */\n  FT_EXPORT( FT_Error )\n  FT_Render_Glyph( FT_GlyphSlot    slot,\n                   FT_Render_Mode  render_mode );\n\n\n  /**************************************************************************\n   *\n   * @enum:\n   *   FT_Kerning_Mode\n   *\n   * @description:\n   *   An enumeration to specify the format of kerning values returned by\n   *   @FT_Get_Kerning.\n   *\n   * @values:\n   *   FT_KERNING_DEFAULT ::\n   *     Return grid-fitted kerning distances in 26.6 fractional pixels.\n   *\n   *   FT_KERNING_UNFITTED ::\n   *     Return un-grid-fitted kerning distances in 26.6 fractional pixels.\n   *\n   *   FT_KERNING_UNSCALED ::\n   *     Return the kerning vector in original font units.\n   *\n   * @note:\n   *   `FT_KERNING_DEFAULT` returns full pixel values; it also makes FreeType\n   *   heuristically scale down kerning distances at small ppem values so\n   *   that they don't become too big.\n   *\n   *   Both `FT_KERNING_DEFAULT` and `FT_KERNING_UNFITTED` use the current\n   *   horizontal scaling factor (as set e.g. with @FT_Set_Char_Size) to\n   *   convert font units to pixels.\n   */\n  typedef enum  FT_Kerning_Mode_\n  {\n    FT_KERNING_DEFAULT = 0,\n    FT_KERNING_UNFITTED,\n    FT_KERNING_UNSCALED\n\n  } FT_Kerning_Mode;\n\n\n  /* these constants are deprecated; use the corresponding */\n  /* `FT_Kerning_Mode` values instead                      */\n#define ft_kerning_default   FT_KERNING_DEFAULT\n#define ft_kerning_unfitted  FT_KERNING_UNFITTED\n#define ft_kerning_unscaled  FT_KERNING_UNSCALED\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Get_Kerning\n   *\n   * @description:\n   *   Return the kerning vector between two glyphs of the same face.\n   *\n   * @input:\n   *   face ::\n   *     A handle to a source face object.\n   *\n   *   left_glyph ::\n   *     The index of the left glyph in the kern pair.\n   *\n   *   right_glyph ::\n   *     The index of the right glyph in the kern pair.\n   *\n   *   kern_mode ::\n   *     See @FT_Kerning_Mode for more information.  Determines the scale and\n   *     dimension of the returned kerning vector.\n   *\n   * @output:\n   *   akerning ::\n   *     The kerning vector.  This is either in font units, fractional pixels\n   *     (26.6 format), or pixels for scalable formats, and in pixels for\n   *     fixed-sizes formats.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *   Only horizontal layouts (left-to-right & right-to-left) are supported\n   *   by this method.  Other layouts, or more sophisticated kernings, are\n   *   out of the scope of this API function -- they can be implemented\n   *   through format-specific interfaces.\n   *\n   *   Kerning for OpenType fonts implemented in a 'GPOS' table is not\n   *   supported; use @FT_HAS_KERNING to find out whether a font has data\n   *   that can be extracted with `FT_Get_Kerning`.\n   */\n  FT_EXPORT( FT_Error )\n  FT_Get_Kerning( FT_Face     face,\n                  FT_UInt     left_glyph,\n                  FT_UInt     right_glyph,\n                  FT_UInt     kern_mode,\n                  FT_Vector  *akerning );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Get_Track_Kerning\n   *\n   * @description:\n   *   Return the track kerning for a given face object at a given size.\n   *\n   * @input:\n   *   face ::\n   *     A handle to a source face object.\n   *\n   *   point_size ::\n   *     The point size in 16.16 fractional points.\n   *\n   *   degree ::\n   *     The degree of tightness.  Increasingly negative values represent\n   *     tighter track kerning, while increasingly positive values represent\n   *     looser track kerning.  Value zero means no track kerning.\n   *\n   * @output:\n   *   akerning ::\n   *     The kerning in 16.16 fractional points, to be uniformly applied\n   *     between all glyphs.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *   Currently, only the Type~1 font driver supports track kerning, using\n   *   data from AFM files (if attached with @FT_Attach_File or\n   *   @FT_Attach_Stream).\n   *\n   *   Only very few AFM files come with track kerning data; please refer to\n   *   Adobe's AFM specification for more details.\n   */\n  FT_EXPORT( FT_Error )\n  FT_Get_Track_Kerning( FT_Face    face,\n                        FT_Fixed   point_size,\n                        FT_Int     degree,\n                        FT_Fixed*  akerning );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Get_Glyph_Name\n   *\n   * @description:\n   *   Retrieve the ASCII name of a given glyph in a face.  This only works\n   *   for those faces where @FT_HAS_GLYPH_NAMES(face) returns~1.\n   *\n   * @input:\n   *   face ::\n   *     A handle to a source face object.\n   *\n   *   glyph_index ::\n   *     The glyph index.\n   *\n   *   buffer_max ::\n   *     The maximum number of bytes available in the buffer.\n   *\n   * @output:\n   *   buffer ::\n   *     A pointer to a target buffer where the name is copied to.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *   An error is returned if the face doesn't provide glyph names or if the\n   *   glyph index is invalid.  In all cases of failure, the first byte of\n   *   `buffer` is set to~0 to indicate an empty name.\n   *\n   *   The glyph name is truncated to fit within the buffer if it is too\n   *   long.  The returned string is always zero-terminated.\n   *\n   *   Be aware that FreeType reorders glyph indices internally so that glyph\n   *   index~0 always corresponds to the 'missing glyph' (called '.notdef').\n   *\n   *   This function always returns an error if the config macro\n   *   `FT_CONFIG_OPTION_NO_GLYPH_NAMES` is not defined in `ftoption.h`.\n   */\n  FT_EXPORT( FT_Error )\n  FT_Get_Glyph_Name( FT_Face     face,\n                     FT_UInt     glyph_index,\n                     FT_Pointer  buffer,\n                     FT_UInt     buffer_max );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Get_Postscript_Name\n   *\n   * @description:\n   *   Retrieve the ASCII PostScript name of a given face, if available.\n   *   This only works with PostScript, TrueType, and OpenType fonts.\n   *\n   * @input:\n   *   face ::\n   *     A handle to the source face object.\n   *\n   * @return:\n   *   A pointer to the face's PostScript name.  `NULL` if unavailable.\n   *\n   * @note:\n   *   The returned pointer is owned by the face and is destroyed with it.\n   *\n   *   For variation fonts, this string changes if you select a different\n   *   instance, and you have to call `FT_Get_PostScript_Name` again to\n   *   retrieve it.  FreeType follows Adobe TechNote #5902, 'Generating\n   *   PostScript Names for Fonts Using OpenType Font Variations'.\n   *\n   *     https://download.macromedia.com/pub/developer/opentype/tech-notes/5902.AdobePSNameGeneration.html\n   *\n   *   [Since 2.9] Special PostScript names for named instances are only\n   *   returned if the named instance is set with @FT_Set_Named_Instance (and\n   *   the font has corresponding entries in its 'fvar' table).  If\n   *   @FT_IS_VARIATION returns true, the algorithmically derived PostScript\n   *   name is provided, not looking up special entries for named instances.\n   */\n  FT_EXPORT( const char* )\n  FT_Get_Postscript_Name( FT_Face  face );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Select_Charmap\n   *\n   * @description:\n   *   Select a given charmap by its encoding tag (as listed in\n   *   `freetype.h`).\n   *\n   * @inout:\n   *   face ::\n   *     A handle to the source face object.\n   *\n   * @input:\n   *   encoding ::\n   *     A handle to the selected encoding.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *   This function returns an error if no charmap in the face corresponds\n   *   to the encoding queried here.\n   *\n   *   Because many fonts contain more than a single cmap for Unicode\n   *   encoding, this function has some special code to select the one that\n   *   covers Unicode best ('best' in the sense that a UCS-4 cmap is\n   *   preferred to a UCS-2 cmap).  It is thus preferable to @FT_Set_Charmap\n   *   in this case.\n   */\n  FT_EXPORT( FT_Error )\n  FT_Select_Charmap( FT_Face      face,\n                     FT_Encoding  encoding );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Set_Charmap\n   *\n   * @description:\n   *   Select a given charmap for character code to glyph index mapping.\n   *\n   * @inout:\n   *   face ::\n   *     A handle to the source face object.\n   *\n   * @input:\n   *   charmap ::\n   *     A handle to the selected charmap.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *   This function returns an error if the charmap is not part of the face\n   *   (i.e., if it is not listed in the `face->charmaps` table).\n   *\n   *   It also fails if an OpenType type~14 charmap is selected (which\n   *   doesn't map character codes to glyph indices at all).\n   */\n  FT_EXPORT( FT_Error )\n  FT_Set_Charmap( FT_Face     face,\n                  FT_CharMap  charmap );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Get_Charmap_Index\n   *\n   * @description:\n   *   Retrieve index of a given charmap.\n   *\n   * @input:\n   *   charmap ::\n   *     A handle to a charmap.\n   *\n   * @return:\n   *   The index into the array of character maps within the face to which\n   *   `charmap` belongs.  If an error occurs, -1 is returned.\n   *\n   */\n  FT_EXPORT( FT_Int )\n  FT_Get_Charmap_Index( FT_CharMap  charmap );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Get_Char_Index\n   *\n   * @description:\n   *   Return the glyph index of a given character code.  This function uses\n   *   the currently selected charmap to do the mapping.\n   *\n   * @input:\n   *   face ::\n   *     A handle to the source face object.\n   *\n   *   charcode ::\n   *     The character code.\n   *\n   * @return:\n   *   The glyph index.  0~means 'undefined character code'.\n   *\n   * @note:\n   *   If you use FreeType to manipulate the contents of font files directly,\n   *   be aware that the glyph index returned by this function doesn't always\n   *   correspond to the internal indices used within the file.  This is done\n   *   to ensure that value~0 always corresponds to the 'missing glyph'.  If\n   *   the first glyph is not named '.notdef', then for Type~1 and Type~42\n   *   fonts, '.notdef' will be moved into the glyph ID~0 position, and\n   *   whatever was there will be moved to the position '.notdef' had.  For\n   *   Type~1 fonts, if there is no '.notdef' glyph at all, then one will be\n   *   created at index~0 and whatever was there will be moved to the last\n   *   index -- Type~42 fonts are considered invalid under this condition.\n   */\n  FT_EXPORT( FT_UInt )\n  FT_Get_Char_Index( FT_Face   face,\n                     FT_ULong  charcode );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Get_First_Char\n   *\n   * @description:\n   *   Return the first character code in the current charmap of a given\n   *   face, together with its corresponding glyph index.\n   *\n   * @input:\n   *   face ::\n   *     A handle to the source face object.\n   *\n   * @output:\n   *   agindex ::\n   *     Glyph index of first character code.  0~if charmap is empty.\n   *\n   * @return:\n   *   The charmap's first character code.\n   *\n   * @note:\n   *   You should use this function together with @FT_Get_Next_Char to parse\n   *   all character codes available in a given charmap.  The code should\n   *   look like this:\n   *\n   *   ```\n   *     FT_ULong  charcode;\n   *     FT_UInt   gindex;\n   *\n   *\n   *     charcode = FT_Get_First_Char( face, &gindex );\n   *     while ( gindex != 0 )\n   *     {\n   *       ... do something with (charcode,gindex) pair ...\n   *\n   *       charcode = FT_Get_Next_Char( face, charcode, &gindex );\n   *     }\n   *   ```\n   *\n   *   Be aware that character codes can have values up to 0xFFFFFFFF; this\n   *   might happen for non-Unicode or malformed cmaps.  However, even with\n   *   regular Unicode encoding, so-called 'last resort fonts' (using SFNT\n   *   cmap format 13, see function @FT_Get_CMap_Format) normally have\n   *   entries for all Unicode characters up to 0x1FFFFF, which can cause *a\n   *   lot* of iterations.\n   *\n   *   Note that `*agindex` is set to~0 if the charmap is empty.  The result\n   *   itself can be~0 in two cases: if the charmap is empty or if the\n   *   value~0 is the first valid character code.\n   */\n  FT_EXPORT( FT_ULong )\n  FT_Get_First_Char( FT_Face   face,\n                     FT_UInt  *agindex );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Get_Next_Char\n   *\n   * @description:\n   *   Return the next character code in the current charmap of a given face\n   *   following the value `char_code`, as well as the corresponding glyph\n   *   index.\n   *\n   * @input:\n   *   face ::\n   *     A handle to the source face object.\n   *\n   *   char_code ::\n   *     The starting character code.\n   *\n   * @output:\n   *   agindex ::\n   *     Glyph index of next character code.  0~if charmap is empty.\n   *\n   * @return:\n   *   The charmap's next character code.\n   *\n   * @note:\n   *   You should use this function with @FT_Get_First_Char to walk over all\n   *   character codes available in a given charmap.  See the note for that\n   *   function for a simple code example.\n   *\n   *   Note that `*agindex` is set to~0 when there are no more codes in the\n   *   charmap.\n   */\n  FT_EXPORT( FT_ULong )\n  FT_Get_Next_Char( FT_Face    face,\n                    FT_ULong   char_code,\n                    FT_UInt   *agindex );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Face_Properties\n   *\n   * @description:\n   *   Set or override certain (library or module-wide) properties on a\n   *   face-by-face basis.  Useful for finer-grained control and avoiding\n   *   locks on shared structures (threads can modify their own faces as they\n   *   see fit).\n   *\n   *   Contrary to @FT_Property_Set, this function uses @FT_Parameter so that\n   *   you can pass multiple properties to the target face in one call.  Note\n   *   that only a subset of the available properties can be controlled.\n   *\n   *   * @FT_PARAM_TAG_STEM_DARKENING (stem darkening, corresponding to the\n   *     property `no-stem-darkening` provided by the 'autofit', 'cff',\n   *     'type1', and 't1cid' modules; see @no-stem-darkening).\n   *\n   *   * @FT_PARAM_TAG_LCD_FILTER_WEIGHTS (LCD filter weights, corresponding\n   *     to function @FT_Library_SetLcdFilterWeights).\n   *\n   *   * @FT_PARAM_TAG_RANDOM_SEED (seed value for the CFF, Type~1, and CID\n   *     'random' operator, corresponding to the `random-seed` property\n   *     provided by the 'cff', 'type1', and 't1cid' modules; see\n   *     @random-seed).\n   *\n   *   Pass `NULL` as `data` in @FT_Parameter for a given tag to reset the\n   *   option and use the library or module default again.\n   *\n   * @input:\n   *   face ::\n   *     A handle to the source face object.\n   *\n   *   num_properties ::\n   *     The number of properties that follow.\n   *\n   *   properties ::\n   *     A handle to an @FT_Parameter array with `num_properties` elements.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @example:\n   *   Here is an example that sets three properties.  You must define\n   *   `FT_CONFIG_OPTION_SUBPIXEL_RENDERING` to make the LCD filter examples\n   *   work.\n   *\n   *   ```\n   *     FT_Parameter         property1;\n   *     FT_Bool              darken_stems = 1;\n   *\n   *     FT_Parameter         property2;\n   *     FT_LcdFiveTapFilter  custom_weight =\n   *                            { 0x11, 0x44, 0x56, 0x44, 0x11 };\n   *\n   *     FT_Parameter         property3;\n   *     FT_Int32             random_seed = 314159265;\n   *\n   *     FT_Parameter         properties[3] = { property1,\n   *                                            property2,\n   *                                            property3 };\n   *\n   *\n   *     property1.tag  = FT_PARAM_TAG_STEM_DARKENING;\n   *     property1.data = &darken_stems;\n   *\n   *     property2.tag  = FT_PARAM_TAG_LCD_FILTER_WEIGHTS;\n   *     property2.data = custom_weight;\n   *\n   *     property3.tag  = FT_PARAM_TAG_RANDOM_SEED;\n   *     property3.data = &random_seed;\n   *\n   *     FT_Face_Properties( face, 3, properties );\n   *   ```\n   *\n   *   The next example resets a single property to its default value.\n   *\n   *   ```\n   *     FT_Parameter  property;\n   *\n   *\n   *     property.tag  = FT_PARAM_TAG_LCD_FILTER_WEIGHTS;\n   *     property.data = NULL;\n   *\n   *     FT_Face_Properties( face, 1, &property );\n   *   ```\n   *\n   * @since:\n   *   2.8\n   *\n   */\n  FT_EXPORT( FT_Error )\n  FT_Face_Properties( FT_Face        face,\n                      FT_UInt        num_properties,\n                      FT_Parameter*  properties );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Get_Name_Index\n   *\n   * @description:\n   *   Return the glyph index of a given glyph name.\n   *\n   * @input:\n   *   face ::\n   *     A handle to the source face object.\n   *\n   *   glyph_name ::\n   *     The glyph name.\n   *\n   * @return:\n   *   The glyph index.  0~means 'undefined character code'.\n   */\n  FT_EXPORT( FT_UInt )\n  FT_Get_Name_Index( FT_Face           face,\n                     const FT_String*  glyph_name );\n\n\n  /**************************************************************************\n   *\n   * @enum:\n   *   FT_SUBGLYPH_FLAG_XXX\n   *\n   * @description:\n   *   A list of constants describing subglyphs.  Please refer to the 'glyf'\n   *   table description in the OpenType specification for the meaning of the\n   *   various flags (which get synthesized for non-OpenType subglyphs).\n   *\n   *     https://docs.microsoft.com/en-us/typography/opentype/spec/glyf#composite-glyph-description\n   *\n   * @values:\n   *   FT_SUBGLYPH_FLAG_ARGS_ARE_WORDS ::\n   *   FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES ::\n   *   FT_SUBGLYPH_FLAG_ROUND_XY_TO_GRID ::\n   *   FT_SUBGLYPH_FLAG_SCALE ::\n   *   FT_SUBGLYPH_FLAG_XY_SCALE ::\n   *   FT_SUBGLYPH_FLAG_2X2 ::\n   *   FT_SUBGLYPH_FLAG_USE_MY_METRICS ::\n   *\n   */\n#define FT_SUBGLYPH_FLAG_ARGS_ARE_WORDS          1\n#define FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES      2\n#define FT_SUBGLYPH_FLAG_ROUND_XY_TO_GRID        4\n#define FT_SUBGLYPH_FLAG_SCALE                   8\n#define FT_SUBGLYPH_FLAG_XY_SCALE             0x40\n#define FT_SUBGLYPH_FLAG_2X2                  0x80\n#define FT_SUBGLYPH_FLAG_USE_MY_METRICS      0x200\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Get_SubGlyph_Info\n   *\n   * @description:\n   *   Retrieve a description of a given subglyph.  Only use it if\n   *   `glyph->format` is @FT_GLYPH_FORMAT_COMPOSITE; an error is returned\n   *   otherwise.\n   *\n   * @input:\n   *   glyph ::\n   *     The source glyph slot.\n   *\n   *   sub_index ::\n   *     The index of the subglyph.  Must be less than\n   *     `glyph->num_subglyphs`.\n   *\n   * @output:\n   *   p_index ::\n   *     The glyph index of the subglyph.\n   *\n   *   p_flags ::\n   *     The subglyph flags, see @FT_SUBGLYPH_FLAG_XXX.\n   *\n   *   p_arg1 ::\n   *     The subglyph's first argument (if any).\n   *\n   *   p_arg2 ::\n   *     The subglyph's second argument (if any).\n   *\n   *   p_transform ::\n   *     The subglyph transformation (if any).\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *   The values of `*p_arg1`, `*p_arg2`, and `*p_transform` must be\n   *   interpreted depending on the flags returned in `*p_flags`.  See the\n   *   OpenType specification for details.\n   *\n   *     https://docs.microsoft.com/en-us/typography/opentype/spec/glyf#composite-glyph-description\n   *\n   */\n  FT_EXPORT( FT_Error )\n  FT_Get_SubGlyph_Info( FT_GlyphSlot  glyph,\n                        FT_UInt       sub_index,\n                        FT_Int       *p_index,\n                        FT_UInt      *p_flags,\n                        FT_Int       *p_arg1,\n                        FT_Int       *p_arg2,\n                        FT_Matrix    *p_transform );\n\n\n  /**************************************************************************\n   *\n   * @section:\n   *   base_interface\n   *\n   */\n\n  /**************************************************************************\n   *\n   * @enum:\n   *   FT_FSTYPE_XXX\n   *\n   * @description:\n   *   A list of bit flags used in the `fsType` field of the OS/2 table in a\n   *   TrueType or OpenType font and the `FSType` entry in a PostScript font.\n   *   These bit flags are returned by @FT_Get_FSType_Flags; they inform\n   *   client applications of embedding and subsetting restrictions\n   *   associated with a font.\n   *\n   *   See\n   *   https://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/FontPolicies.pdf\n   *   for more details.\n   *\n   * @values:\n   *   FT_FSTYPE_INSTALLABLE_EMBEDDING ::\n   *     Fonts with no fsType bit set may be embedded and permanently\n   *     installed on the remote system by an application.\n   *\n   *   FT_FSTYPE_RESTRICTED_LICENSE_EMBEDDING ::\n   *     Fonts that have only this bit set must not be modified, embedded or\n   *     exchanged in any manner without first obtaining permission of the\n   *     font software copyright owner.\n   *\n   *   FT_FSTYPE_PREVIEW_AND_PRINT_EMBEDDING ::\n   *     The font may be embedded and temporarily loaded on the remote\n   *     system.  Documents containing Preview & Print fonts must be opened\n   *     'read-only'; no edits can be applied to the document.\n   *\n   *   FT_FSTYPE_EDITABLE_EMBEDDING ::\n   *     The font may be embedded but must only be installed temporarily on\n   *     other systems.  In contrast to Preview & Print fonts, documents\n   *     containing editable fonts may be opened for reading, editing is\n   *     permitted, and changes may be saved.\n   *\n   *   FT_FSTYPE_NO_SUBSETTING ::\n   *     The font may not be subsetted prior to embedding.\n   *\n   *   FT_FSTYPE_BITMAP_EMBEDDING_ONLY ::\n   *     Only bitmaps contained in the font may be embedded; no outline data\n   *     may be embedded.  If there are no bitmaps available in the font,\n   *     then the font is unembeddable.\n   *\n   * @note:\n   *   The flags are ORed together, thus more than a single value can be\n   *   returned.\n   *\n   *   While the `fsType` flags can indicate that a font may be embedded, a\n   *   license with the font vendor may be separately required to use the\n   *   font in this way.\n   */\n#define FT_FSTYPE_INSTALLABLE_EMBEDDING         0x0000\n#define FT_FSTYPE_RESTRICTED_LICENSE_EMBEDDING  0x0002\n#define FT_FSTYPE_PREVIEW_AND_PRINT_EMBEDDING   0x0004\n#define FT_FSTYPE_EDITABLE_EMBEDDING            0x0008\n#define FT_FSTYPE_NO_SUBSETTING                 0x0100\n#define FT_FSTYPE_BITMAP_EMBEDDING_ONLY         0x0200\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Get_FSType_Flags\n   *\n   * @description:\n   *   Return the `fsType` flags for a font.\n   *\n   * @input:\n   *   face ::\n   *     A handle to the source face object.\n   *\n   * @return:\n   *   The `fsType` flags, see @FT_FSTYPE_XXX.\n   *\n   * @note:\n   *   Use this function rather than directly reading the `fs_type` field in\n   *   the @PS_FontInfoRec structure, which is only guaranteed to return the\n   *   correct results for Type~1 fonts.\n   *\n   * @since:\n   *   2.3.8\n   *\n   */\n  FT_EXPORT( FT_UShort )\n  FT_Get_FSType_Flags( FT_Face  face );\n\n\n  /**************************************************************************\n   *\n   * @section:\n   *   glyph_variants\n   *\n   * @title:\n   *   Unicode Variation Sequences\n   *\n   * @abstract:\n   *   The FreeType~2 interface to Unicode Variation Sequences (UVS), using\n   *   the SFNT cmap format~14.\n   *\n   * @description:\n   *   Many characters, especially for CJK scripts, have variant forms.  They\n   *   are a sort of grey area somewhere between being totally irrelevant and\n   *   semantically distinct; for this reason, the Unicode consortium decided\n   *   to introduce Variation Sequences (VS), consisting of a Unicode base\n   *   character and a variation selector instead of further extending the\n   *   already huge number of characters.\n   *\n   *   Unicode maintains two different sets, namely 'Standardized Variation\n   *   Sequences' and registered 'Ideographic Variation Sequences' (IVS),\n   *   collected in the 'Ideographic Variation Database' (IVD).\n   *\n   *     https://unicode.org/Public/UCD/latest/ucd/StandardizedVariants.txt\n   *     https://unicode.org/reports/tr37/ https://unicode.org/ivd/\n   *\n   *   To date (January 2017), the character with the most ideographic\n   *   variations is U+9089, having 32 such IVS.\n   *\n   *   Three Mongolian Variation Selectors have the values U+180B-U+180D; 256\n   *   generic Variation Selectors are encoded in the ranges U+FE00-U+FE0F\n   *   and U+E0100-U+E01EF.  IVS currently use Variation Selectors from the\n   *   range U+E0100-U+E01EF only.\n   *\n   *   A VS consists of the base character value followed by a single\n   *   Variation Selector.  For example, to get the first variation of\n   *   U+9089, you have to write the character sequence `U+9089 U+E0100`.\n   *\n   *   Adobe and MS decided to support both standardized and ideographic VS\n   *   with a new cmap subtable (format~14).  It is an odd subtable because\n   *   it is not a mapping of input code points to glyphs, but contains lists\n   *   of all variations supported by the font.\n   *\n   *   A variation may be either 'default' or 'non-default' for a given font.\n   *   A default variation is the one you will get for that code point if you\n   *   look it up in the standard Unicode cmap.  A non-default variation is a\n   *   different glyph.\n   *\n   */\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Face_GetCharVariantIndex\n   *\n   * @description:\n   *   Return the glyph index of a given character code as modified by the\n   *   variation selector.\n   *\n   * @input:\n   *   face ::\n   *     A handle to the source face object.\n   *\n   *   charcode ::\n   *     The character code point in Unicode.\n   *\n   *   variantSelector ::\n   *     The Unicode code point of the variation selector.\n   *\n   * @return:\n   *   The glyph index.  0~means either 'undefined character code', or\n   *   'undefined selector code', or 'no variation selector cmap subtable',\n   *   or 'current CharMap is not Unicode'.\n   *\n   * @note:\n   *   If you use FreeType to manipulate the contents of font files directly,\n   *   be aware that the glyph index returned by this function doesn't always\n   *   correspond to the internal indices used within the file.  This is done\n   *   to ensure that value~0 always corresponds to the 'missing glyph'.\n   *\n   *   This function is only meaningful if\n   *     a) the font has a variation selector cmap sub table, and\n   *     b) the current charmap has a Unicode encoding.\n   *\n   * @since:\n   *   2.3.6\n   *\n   */\n  FT_EXPORT( FT_UInt )\n  FT_Face_GetCharVariantIndex( FT_Face   face,\n                               FT_ULong  charcode,\n                               FT_ULong  variantSelector );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Face_GetCharVariantIsDefault\n   *\n   * @description:\n   *   Check whether this variation of this Unicode character is the one to\n   *   be found in the charmap.\n   *\n   * @input:\n   *   face ::\n   *     A handle to the source face object.\n   *\n   *   charcode ::\n   *     The character codepoint in Unicode.\n   *\n   *   variantSelector ::\n   *     The Unicode codepoint of the variation selector.\n   *\n   * @return:\n   *   1~if found in the standard (Unicode) cmap, 0~if found in the variation\n   *   selector cmap, or -1 if it is not a variation.\n   *\n   * @note:\n   *   This function is only meaningful if the font has a variation selector\n   *   cmap subtable.\n   *\n   * @since:\n   *   2.3.6\n   *\n   */\n  FT_EXPORT( FT_Int )\n  FT_Face_GetCharVariantIsDefault( FT_Face   face,\n                                   FT_ULong  charcode,\n                                   FT_ULong  variantSelector );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Face_GetVariantSelectors\n   *\n   * @description:\n   *   Return a zero-terminated list of Unicode variation selectors found in\n   *   the font.\n   *\n   * @input:\n   *   face ::\n   *     A handle to the source face object.\n   *\n   * @return:\n   *   A pointer to an array of selector code points, or `NULL` if there is\n   *   no valid variation selector cmap subtable.\n   *\n   * @note:\n   *   The last item in the array is~0; the array is owned by the @FT_Face\n   *   object but can be overwritten or released on the next call to a\n   *   FreeType function.\n   *\n   * @since:\n   *   2.3.6\n   *\n   */\n  FT_EXPORT( FT_UInt32* )\n  FT_Face_GetVariantSelectors( FT_Face  face );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Face_GetVariantsOfChar\n   *\n   * @description:\n   *   Return a zero-terminated list of Unicode variation selectors found for\n   *   the specified character code.\n   *\n   * @input:\n   *   face ::\n   *     A handle to the source face object.\n   *\n   *   charcode ::\n   *     The character codepoint in Unicode.\n   *\n   * @return:\n   *   A pointer to an array of variation selector code points that are\n   *   active for the given character, or `NULL` if the corresponding list is\n   *   empty.\n   *\n   * @note:\n   *   The last item in the array is~0; the array is owned by the @FT_Face\n   *   object but can be overwritten or released on the next call to a\n   *   FreeType function.\n   *\n   * @since:\n   *   2.3.6\n   *\n   */\n  FT_EXPORT( FT_UInt32* )\n  FT_Face_GetVariantsOfChar( FT_Face   face,\n                             FT_ULong  charcode );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Face_GetCharsOfVariant\n   *\n   * @description:\n   *   Return a zero-terminated list of Unicode character codes found for the\n   *   specified variation selector.\n   *\n   * @input:\n   *   face ::\n   *     A handle to the source face object.\n   *\n   *   variantSelector ::\n   *     The variation selector code point in Unicode.\n   *\n   * @return:\n   *   A list of all the code points that are specified by this selector\n   *   (both default and non-default codes are returned) or `NULL` if there\n   *   is no valid cmap or the variation selector is invalid.\n   *\n   * @note:\n   *   The last item in the array is~0; the array is owned by the @FT_Face\n   *   object but can be overwritten or released on the next call to a\n   *   FreeType function.\n   *\n   * @since:\n   *   2.3.6\n   *\n   */\n  FT_EXPORT( FT_UInt32* )\n  FT_Face_GetCharsOfVariant( FT_Face   face,\n                             FT_ULong  variantSelector );\n\n\n  /**************************************************************************\n   *\n   * @section:\n   *   computations\n   *\n   * @title:\n   *   Computations\n   *\n   * @abstract:\n   *   Crunching fixed numbers and vectors.\n   *\n   * @description:\n   *   This section contains various functions used to perform computations\n   *   on 16.16 fixed-float numbers or 2d vectors.\n   *\n   *   **Attention**: Most arithmetic functions take `FT_Long` as arguments.\n   *   For historical reasons, FreeType was designed under the assumption\n   *   that `FT_Long` is a 32-bit integer; results can thus be undefined if\n   *   the arguments don't fit into 32 bits.\n   *\n   * @order:\n   *   FT_MulDiv\n   *   FT_MulFix\n   *   FT_DivFix\n   *   FT_RoundFix\n   *   FT_CeilFix\n   *   FT_FloorFix\n   *   FT_Vector_Transform\n   *   FT_Matrix_Multiply\n   *   FT_Matrix_Invert\n   *\n   */\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_MulDiv\n   *\n   * @description:\n   *   Compute `(a*b)/c` with maximum accuracy, using a 64-bit intermediate\n   *   integer whenever necessary.\n   *\n   *   This function isn't necessarily as fast as some processor-specific\n   *   operations, but is at least completely portable.\n   *\n   * @input:\n   *   a ::\n   *     The first multiplier.\n   *\n   *   b ::\n   *     The second multiplier.\n   *\n   *   c ::\n   *     The divisor.\n   *\n   * @return:\n   *   The result of `(a*b)/c`.  This function never traps when trying to\n   *   divide by zero; it simply returns 'MaxInt' or 'MinInt' depending on\n   *   the signs of `a` and `b`.\n   */\n  FT_EXPORT( FT_Long )\n  FT_MulDiv( FT_Long  a,\n             FT_Long  b,\n             FT_Long  c );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_MulFix\n   *\n   * @description:\n   *   Compute `(a*b)/0x10000` with maximum accuracy.  Its main use is to\n   *   multiply a given value by a 16.16 fixed-point factor.\n   *\n   * @input:\n   *   a ::\n   *     The first multiplier.\n   *\n   *   b ::\n   *     The second multiplier.  Use a 16.16 factor here whenever possible\n   *     (see note below).\n   *\n   * @return:\n   *   The result of `(a*b)/0x10000`.\n   *\n   * @note:\n   *   This function has been optimized for the case where the absolute value\n   *   of `a` is less than 2048, and `b` is a 16.16 scaling factor.  As this\n   *   happens mainly when scaling from notional units to fractional pixels\n   *   in FreeType, it resulted in noticeable speed improvements between\n   *   versions 2.x and 1.x.\n   *\n   *   As a conclusion, always try to place a 16.16 factor as the _second_\n   *   argument of this function; this can make a great difference.\n   */\n  FT_EXPORT( FT_Long )\n  FT_MulFix( FT_Long  a,\n             FT_Long  b );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_DivFix\n   *\n   * @description:\n   *   Compute `(a*0x10000)/b` with maximum accuracy.  Its main use is to\n   *   divide a given value by a 16.16 fixed-point factor.\n   *\n   * @input:\n   *   a ::\n   *     The numerator.\n   *\n   *   b ::\n   *     The denominator.  Use a 16.16 factor here.\n   *\n   * @return:\n   *   The result of `(a*0x10000)/b`.\n   */\n  FT_EXPORT( FT_Long )\n  FT_DivFix( FT_Long  a,\n             FT_Long  b );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_RoundFix\n   *\n   * @description:\n   *   Round a 16.16 fixed number.\n   *\n   * @input:\n   *   a ::\n   *     The number to be rounded.\n   *\n   * @return:\n   *   `a` rounded to the nearest 16.16 fixed integer, halfway cases away\n   *   from zero.\n   *\n   * @note:\n   *   The function uses wrap-around arithmetic.\n   */\n  FT_EXPORT( FT_Fixed )\n  FT_RoundFix( FT_Fixed  a );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_CeilFix\n   *\n   * @description:\n   *   Compute the smallest following integer of a 16.16 fixed number.\n   *\n   * @input:\n   *   a ::\n   *     The number for which the ceiling function is to be computed.\n   *\n   * @return:\n   *   `a` rounded towards plus infinity.\n   *\n   * @note:\n   *   The function uses wrap-around arithmetic.\n   */\n  FT_EXPORT( FT_Fixed )\n  FT_CeilFix( FT_Fixed  a );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_FloorFix\n   *\n   * @description:\n   *   Compute the largest previous integer of a 16.16 fixed number.\n   *\n   * @input:\n   *   a ::\n   *     The number for which the floor function is to be computed.\n   *\n   * @return:\n   *   `a` rounded towards minus infinity.\n   */\n  FT_EXPORT( FT_Fixed )\n  FT_FloorFix( FT_Fixed  a );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Vector_Transform\n   *\n   * @description:\n   *   Transform a single vector through a 2x2 matrix.\n   *\n   * @inout:\n   *   vector ::\n   *     The target vector to transform.\n   *\n   * @input:\n   *   matrix ::\n   *     A pointer to the source 2x2 matrix.\n   *\n   * @note:\n   *   The result is undefined if either `vector` or `matrix` is invalid.\n   */\n  FT_EXPORT( void )\n  FT_Vector_Transform( FT_Vector*        vector,\n                       const FT_Matrix*  matrix );\n\n\n  /**************************************************************************\n   *\n   * @section:\n   *   version\n   *\n   * @title:\n   *   FreeType Version\n   *\n   * @abstract:\n   *   Functions and macros related to FreeType versions.\n   *\n   * @description:\n   *   Note that those functions and macros are of limited use because even a\n   *   new release of FreeType with only documentation changes increases the\n   *   version number.\n   *\n   * @order:\n   *   FT_Library_Version\n   *\n   *   FREETYPE_MAJOR\n   *   FREETYPE_MINOR\n   *   FREETYPE_PATCH\n   *\n   *   FT_Face_CheckTrueTypePatents\n   *   FT_Face_SetUnpatentedHinting\n   *\n   */\n\n\n  /**************************************************************************\n   *\n   * @enum:\n   *   FREETYPE_XXX\n   *\n   * @description:\n   *   These three macros identify the FreeType source code version.  Use\n   *   @FT_Library_Version to access them at runtime.\n   *\n   * @values:\n   *   FREETYPE_MAJOR ::\n   *     The major version number.\n   *   FREETYPE_MINOR ::\n   *     The minor version number.\n   *   FREETYPE_PATCH ::\n   *     The patch level.\n   *\n   * @note:\n   *   The version number of FreeType if built as a dynamic link library with\n   *   the 'libtool' package is _not_ controlled by these three macros.\n   *\n   */\n#define FREETYPE_MAJOR  2\n#define FREETYPE_MINOR  11\n#define FREETYPE_PATCH  0\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Library_Version\n   *\n   * @description:\n   *   Return the version of the FreeType library being used.  This is useful\n   *   when dynamically linking to the library, since one cannot use the\n   *   macros @FREETYPE_MAJOR, @FREETYPE_MINOR, and @FREETYPE_PATCH.\n   *\n   * @input:\n   *   library ::\n   *     A source library handle.\n   *\n   * @output:\n   *   amajor ::\n   *     The major version number.\n   *\n   *   aminor ::\n   *     The minor version number.\n   *\n   *   apatch ::\n   *     The patch version number.\n   *\n   * @note:\n   *   The reason why this function takes a `library` argument is because\n   *   certain programs implement library initialization in a custom way that\n   *   doesn't use @FT_Init_FreeType.\n   *\n   *   In such cases, the library version might not be available before the\n   *   library object has been created.\n   */\n  FT_EXPORT( void )\n  FT_Library_Version( FT_Library   library,\n                      FT_Int      *amajor,\n                      FT_Int      *aminor,\n                      FT_Int      *apatch );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Face_CheckTrueTypePatents\n   *\n   * @description:\n   *   Deprecated, does nothing.\n   *\n   * @input:\n   *   face ::\n   *     A face handle.\n   *\n   * @return:\n   *   Always returns false.\n   *\n   * @note:\n   *   Since May 2010, TrueType hinting is no longer patented.\n   *\n   * @since:\n   *   2.3.5\n   *\n   */\n  FT_EXPORT( FT_Bool )\n  FT_Face_CheckTrueTypePatents( FT_Face  face );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Face_SetUnpatentedHinting\n   *\n   * @description:\n   *   Deprecated, does nothing.\n   *\n   * @input:\n   *   face ::\n   *     A face handle.\n   *\n   *   value ::\n   *     New boolean setting.\n   *\n   * @return:\n   *   Always returns false.\n   *\n   * @note:\n   *   Since May 2010, TrueType hinting is no longer patented.\n   *\n   * @since:\n   *   2.3.5\n   *\n   */\n  FT_EXPORT( FT_Bool )\n  FT_Face_SetUnpatentedHinting( FT_Face  face,\n                                FT_Bool  value );\n\n  /* */\n\n\nFT_END_HEADER\n\n#endif /* FREETYPE_H_ */\n\n\n/* END */\n"
  },
  {
    "path": "thirdparty/freetype/include/freetype2/freetype/ftadvanc.h",
    "content": "/****************************************************************************\n *\n * ftadvanc.h\n *\n *   Quick computation of advance widths (specification only).\n *\n * Copyright (C) 2008-2021 by\n * David Turner, Robert Wilhelm, and Werner Lemberg.\n *\n * This file is part of the FreeType project, and may only be used,\n * modified, and distributed under the terms of the FreeType project\n * license, LICENSE.TXT.  By continuing to use, modify, or distribute\n * this file you indicate that you have read the license and\n * understand and accept it fully.\n *\n */\n\n\n#ifndef FTADVANC_H_\n#define FTADVANC_H_\n\n\n#include <freetype/freetype.h>\n\n#ifdef FREETYPE_H\n#error \"freetype.h of FreeType 1 has been loaded!\"\n#error \"Please fix the directory search order for header files\"\n#error \"so that freetype.h of FreeType 2 is found first.\"\n#endif\n\n\nFT_BEGIN_HEADER\n\n\n  /**************************************************************************\n   *\n   * @section:\n   *   quick_advance\n   *\n   * @title:\n   *   Quick retrieval of advance values\n   *\n   * @abstract:\n   *   Retrieve horizontal and vertical advance values without processing\n   *   glyph outlines, if possible.\n   *\n   * @description:\n   *   This section contains functions to quickly extract advance values\n   *   without handling glyph outlines, if possible.\n   *\n   * @order:\n   *   FT_Get_Advance\n   *   FT_Get_Advances\n   *\n   */\n\n\n  /**************************************************************************\n   *\n   * @enum:\n   *   FT_ADVANCE_FLAG_FAST_ONLY\n   *\n   * @description:\n   *   A bit-flag to be OR-ed with the `flags` parameter of the\n   *   @FT_Get_Advance and @FT_Get_Advances functions.\n   *\n   *   If set, it indicates that you want these functions to fail if the\n   *   corresponding hinting mode or font driver doesn't allow for very quick\n   *   advance computation.\n   *\n   *   Typically, glyphs that are either unscaled, unhinted, bitmapped, or\n   *   light-hinted can have their advance width computed very quickly.\n   *\n   *   Normal and bytecode hinted modes that require loading, scaling, and\n   *   hinting of the glyph outline, are extremely slow by comparison.\n   */\n#define FT_ADVANCE_FLAG_FAST_ONLY  0x20000000L\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Get_Advance\n   *\n   * @description:\n   *   Retrieve the advance value of a given glyph outline in an @FT_Face.\n   *\n   * @input:\n   *   face ::\n   *     The source @FT_Face handle.\n   *\n   *   gindex ::\n   *     The glyph index.\n   *\n   *   load_flags ::\n   *     A set of bit flags similar to those used when calling\n   *     @FT_Load_Glyph, used to determine what kind of advances you need.\n   *\n   * @output:\n   *   padvance ::\n   *     The advance value.  If scaling is performed (based on the value of\n   *     `load_flags`), the advance value is in 16.16 format.  Otherwise, it\n   *     is in font units.\n   *\n   *     If @FT_LOAD_VERTICAL_LAYOUT is set, this is the vertical advance\n   *     corresponding to a vertical layout.  Otherwise, it is the horizontal\n   *     advance in a horizontal layout.\n   *\n   * @return:\n   *   FreeType error code.  0 means success.\n   *\n   * @note:\n   *   This function may fail if you use @FT_ADVANCE_FLAG_FAST_ONLY and if\n   *   the corresponding font backend doesn't have a quick way to retrieve\n   *   the advances.\n   *\n   *   A scaled advance is returned in 16.16 format but isn't transformed by\n   *   the affine transformation specified by @FT_Set_Transform.\n   */\n  FT_EXPORT( FT_Error )\n  FT_Get_Advance( FT_Face    face,\n                  FT_UInt    gindex,\n                  FT_Int32   load_flags,\n                  FT_Fixed  *padvance );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Get_Advances\n   *\n   * @description:\n   *   Retrieve the advance values of several glyph outlines in an @FT_Face.\n   *\n   * @input:\n   *   face ::\n   *     The source @FT_Face handle.\n   *\n   *   start ::\n   *     The first glyph index.\n   *\n   *   count ::\n   *     The number of advance values you want to retrieve.\n   *\n   *   load_flags ::\n   *     A set of bit flags similar to those used when calling\n   *     @FT_Load_Glyph.\n   *\n   * @output:\n   *   padvance ::\n   *     The advance values.  This array, to be provided by the caller, must\n   *     contain at least `count` elements.\n   *\n   *     If scaling is performed (based on the value of `load_flags`), the\n   *     advance values are in 16.16 format.  Otherwise, they are in font\n   *     units.\n   *\n   *     If @FT_LOAD_VERTICAL_LAYOUT is set, these are the vertical advances\n   *     corresponding to a vertical layout.  Otherwise, they are the\n   *     horizontal advances in a horizontal layout.\n   *\n   * @return:\n   *   FreeType error code.  0 means success.\n   *\n   * @note:\n   *   This function may fail if you use @FT_ADVANCE_FLAG_FAST_ONLY and if\n   *   the corresponding font backend doesn't have a quick way to retrieve\n   *   the advances.\n   *\n   *   Scaled advances are returned in 16.16 format but aren't transformed by\n   *   the affine transformation specified by @FT_Set_Transform.\n   */\n  FT_EXPORT( FT_Error )\n  FT_Get_Advances( FT_Face    face,\n                   FT_UInt    start,\n                   FT_UInt    count,\n                   FT_Int32   load_flags,\n                   FT_Fixed  *padvances );\n\n  /* */\n\n\nFT_END_HEADER\n\n#endif /* FTADVANC_H_ */\n\n\n/* END */\n"
  },
  {
    "path": "thirdparty/freetype/include/freetype2/freetype/ftbbox.h",
    "content": "/****************************************************************************\n *\n * ftbbox.h\n *\n *   FreeType exact bbox computation (specification).\n *\n * Copyright (C) 1996-2021 by\n * David Turner, Robert Wilhelm, and Werner Lemberg.\n *\n * This file is part of the FreeType project, and may only be used,\n * modified, and distributed under the terms of the FreeType project\n * license, LICENSE.TXT.  By continuing to use, modify, or distribute\n * this file you indicate that you have read the license and\n * understand and accept it fully.\n *\n */\n\n\n  /**************************************************************************\n   *\n   * This component has a _single_ role: to compute exact outline bounding\n   * boxes.\n   *\n   * It is separated from the rest of the engine for various technical\n   * reasons.  It may well be integrated in 'ftoutln' later.\n   *\n   */\n\n\n#ifndef FTBBOX_H_\n#define FTBBOX_H_\n\n\n#include <freetype/freetype.h>\n\n#ifdef FREETYPE_H\n#error \"freetype.h of FreeType 1 has been loaded!\"\n#error \"Please fix the directory search order for header files\"\n#error \"so that freetype.h of FreeType 2 is found first.\"\n#endif\n\n\nFT_BEGIN_HEADER\n\n\n  /**************************************************************************\n   *\n   * @section:\n   *   outline_processing\n   *\n   */\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Outline_Get_BBox\n   *\n   * @description:\n   *   Compute the exact bounding box of an outline.  This is slower than\n   *   computing the control box.  However, it uses an advanced algorithm\n   *   that returns _very_ quickly when the two boxes coincide.  Otherwise,\n   *   the outline Bezier arcs are traversed to extract their extrema.\n   *\n   * @input:\n   *   outline ::\n   *     A pointer to the source outline.\n   *\n   * @output:\n   *   abbox ::\n   *     The outline's exact bounding box.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *   If the font is tricky and the glyph has been loaded with\n   *   @FT_LOAD_NO_SCALE, the resulting BBox is meaningless.  To get\n   *   reasonable values for the BBox it is necessary to load the glyph at a\n   *   large ppem value (so that the hinting instructions can properly shift\n   *   and scale the subglyphs), then extracting the BBox, which can be\n   *   eventually converted back to font units.\n   */\n  FT_EXPORT( FT_Error )\n  FT_Outline_Get_BBox( FT_Outline*  outline,\n                       FT_BBox     *abbox );\n\n  /* */\n\n\nFT_END_HEADER\n\n#endif /* FTBBOX_H_ */\n\n\n/* END */\n\n\n/* Local Variables: */\n/* coding: utf-8    */\n/* End:             */\n"
  },
  {
    "path": "thirdparty/freetype/include/freetype2/freetype/ftbdf.h",
    "content": "/****************************************************************************\n *\n * ftbdf.h\n *\n *   FreeType API for accessing BDF-specific strings (specification).\n *\n * Copyright (C) 2002-2021 by\n * David Turner, Robert Wilhelm, and Werner Lemberg.\n *\n * This file is part of the FreeType project, and may only be used,\n * modified, and distributed under the terms of the FreeType project\n * license, LICENSE.TXT.  By continuing to use, modify, or distribute\n * this file you indicate that you have read the license and\n * understand and accept it fully.\n *\n */\n\n\n#ifndef FTBDF_H_\n#define FTBDF_H_\n\n#include <freetype/freetype.h>\n\n#ifdef FREETYPE_H\n#error \"freetype.h of FreeType 1 has been loaded!\"\n#error \"Please fix the directory search order for header files\"\n#error \"so that freetype.h of FreeType 2 is found first.\"\n#endif\n\n\nFT_BEGIN_HEADER\n\n\n  /**************************************************************************\n   *\n   * @section:\n   *   bdf_fonts\n   *\n   * @title:\n   *   BDF and PCF Files\n   *\n   * @abstract:\n   *   BDF and PCF specific API.\n   *\n   * @description:\n   *   This section contains the declaration of functions specific to BDF and\n   *   PCF fonts.\n   *\n   */\n\n\n  /**************************************************************************\n   *\n   * @enum:\n   *    BDF_PropertyType\n   *\n   * @description:\n   *    A list of BDF property types.\n   *\n   * @values:\n   *    BDF_PROPERTY_TYPE_NONE ::\n   *      Value~0 is used to indicate a missing property.\n   *\n   *    BDF_PROPERTY_TYPE_ATOM ::\n   *      Property is a string atom.\n   *\n   *    BDF_PROPERTY_TYPE_INTEGER ::\n   *      Property is a 32-bit signed integer.\n   *\n   *    BDF_PROPERTY_TYPE_CARDINAL ::\n   *      Property is a 32-bit unsigned integer.\n   */\n  typedef enum  BDF_PropertyType_\n  {\n    BDF_PROPERTY_TYPE_NONE     = 0,\n    BDF_PROPERTY_TYPE_ATOM     = 1,\n    BDF_PROPERTY_TYPE_INTEGER  = 2,\n    BDF_PROPERTY_TYPE_CARDINAL = 3\n\n  } BDF_PropertyType;\n\n\n  /**************************************************************************\n   *\n   * @type:\n   *    BDF_Property\n   *\n   * @description:\n   *    A handle to a @BDF_PropertyRec structure to model a given BDF/PCF\n   *    property.\n   */\n  typedef struct BDF_PropertyRec_*  BDF_Property;\n\n\n  /**************************************************************************\n   *\n   * @struct:\n   *    BDF_PropertyRec\n   *\n   * @description:\n   *    This structure models a given BDF/PCF property.\n   *\n   * @fields:\n   *    type ::\n   *      The property type.\n   *\n   *    u.atom ::\n   *      The atom string, if type is @BDF_PROPERTY_TYPE_ATOM.  May be\n   *      `NULL`, indicating an empty string.\n   *\n   *    u.integer ::\n   *      A signed integer, if type is @BDF_PROPERTY_TYPE_INTEGER.\n   *\n   *    u.cardinal ::\n   *      An unsigned integer, if type is @BDF_PROPERTY_TYPE_CARDINAL.\n   */\n  typedef struct  BDF_PropertyRec_\n  {\n    BDF_PropertyType  type;\n    union {\n      const char*     atom;\n      FT_Int32        integer;\n      FT_UInt32       cardinal;\n\n    } u;\n\n  } BDF_PropertyRec;\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *    FT_Get_BDF_Charset_ID\n   *\n   * @description:\n   *    Retrieve a BDF font character set identity, according to the BDF\n   *    specification.\n   *\n   * @input:\n   *    face ::\n   *      A handle to the input face.\n   *\n   * @output:\n   *    acharset_encoding ::\n   *      Charset encoding, as a C~string, owned by the face.\n   *\n   *    acharset_registry ::\n   *      Charset registry, as a C~string, owned by the face.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *   This function only works with BDF faces, returning an error otherwise.\n   */\n  FT_EXPORT( FT_Error )\n  FT_Get_BDF_Charset_ID( FT_Face       face,\n                         const char*  *acharset_encoding,\n                         const char*  *acharset_registry );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *    FT_Get_BDF_Property\n   *\n   * @description:\n   *    Retrieve a BDF property from a BDF or PCF font file.\n   *\n   * @input:\n   *    face ::\n   *      A handle to the input face.\n   *\n   *    name ::\n   *      The property name.\n   *\n   * @output:\n   *    aproperty ::\n   *      The property.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *   This function works with BDF _and_ PCF fonts.  It returns an error\n   *   otherwise.  It also returns an error if the property is not in the\n   *   font.\n   *\n   *   A 'property' is a either key-value pair within the STARTPROPERTIES\n   *   ... ENDPROPERTIES block of a BDF font or a key-value pair from the\n   *   `info->props` array within a `FontRec` structure of a PCF font.\n   *\n   *   Integer properties are always stored as 'signed' within PCF fonts;\n   *   consequently, @BDF_PROPERTY_TYPE_CARDINAL is a possible return value\n   *   for BDF fonts only.\n   *\n   *   In case of error, `aproperty->type` is always set to\n   *   @BDF_PROPERTY_TYPE_NONE.\n   */\n  FT_EXPORT( FT_Error )\n  FT_Get_BDF_Property( FT_Face           face,\n                       const char*       prop_name,\n                       BDF_PropertyRec  *aproperty );\n\n  /* */\n\nFT_END_HEADER\n\n#endif /* FTBDF_H_ */\n\n\n/* END */\n"
  },
  {
    "path": "thirdparty/freetype/include/freetype2/freetype/ftbitmap.h",
    "content": "/****************************************************************************\n *\n * ftbitmap.h\n *\n *   FreeType utility functions for bitmaps (specification).\n *\n * Copyright (C) 2004-2021 by\n * David Turner, Robert Wilhelm, and Werner Lemberg.\n *\n * This file is part of the FreeType project, and may only be used,\n * modified, and distributed under the terms of the FreeType project\n * license, LICENSE.TXT.  By continuing to use, modify, or distribute\n * this file you indicate that you have read the license and\n * understand and accept it fully.\n *\n */\n\n\n#ifndef FTBITMAP_H_\n#define FTBITMAP_H_\n\n\n#include <freetype/freetype.h>\n#include <freetype/ftcolor.h>\n\n#ifdef FREETYPE_H\n#error \"freetype.h of FreeType 1 has been loaded!\"\n#error \"Please fix the directory search order for header files\"\n#error \"so that freetype.h of FreeType 2 is found first.\"\n#endif\n\n\nFT_BEGIN_HEADER\n\n\n  /**************************************************************************\n   *\n   * @section:\n   *   bitmap_handling\n   *\n   * @title:\n   *   Bitmap Handling\n   *\n   * @abstract:\n   *   Handling FT_Bitmap objects.\n   *\n   * @description:\n   *   This section contains functions for handling @FT_Bitmap objects,\n   *   automatically adjusting the target's bitmap buffer size as needed.\n   *\n   *   Note that none of the functions changes the bitmap's 'flow' (as\n   *   indicated by the sign of the `pitch` field in @FT_Bitmap).\n   *\n   *   To set the flow, assign an appropriate positive or negative value to\n   *   the `pitch` field of the target @FT_Bitmap object after calling\n   *   @FT_Bitmap_Init but before calling any of the other functions\n   *   described here.\n   */\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Bitmap_Init\n   *\n   * @description:\n   *   Initialize a pointer to an @FT_Bitmap structure.\n   *\n   * @inout:\n   *   abitmap ::\n   *     A pointer to the bitmap structure.\n   *\n   * @note:\n   *   A deprecated name for the same function is `FT_Bitmap_New`.\n   */\n  FT_EXPORT( void )\n  FT_Bitmap_Init( FT_Bitmap  *abitmap );\n\n\n  /* deprecated */\n  FT_EXPORT( void )\n  FT_Bitmap_New( FT_Bitmap  *abitmap );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Bitmap_Copy\n   *\n   * @description:\n   *   Copy a bitmap into another one.\n   *\n   * @input:\n   *   library ::\n   *     A handle to a library object.\n   *\n   *   source ::\n   *     A handle to the source bitmap.\n   *\n   * @output:\n   *   target ::\n   *     A handle to the target bitmap.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *   `source->buffer` and `target->buffer` must neither be equal nor\n   *   overlap.\n   */\n  FT_EXPORT( FT_Error )\n  FT_Bitmap_Copy( FT_Library        library,\n                  const FT_Bitmap  *source,\n                  FT_Bitmap        *target );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Bitmap_Embolden\n   *\n   * @description:\n   *   Embolden a bitmap.  The new bitmap will be about `xStrength` pixels\n   *   wider and `yStrength` pixels higher.  The left and bottom borders are\n   *   kept unchanged.\n   *\n   * @input:\n   *   library ::\n   *     A handle to a library object.\n   *\n   *   xStrength ::\n   *     How strong the glyph is emboldened horizontally.  Expressed in 26.6\n   *     pixel format.\n   *\n   *   yStrength ::\n   *     How strong the glyph is emboldened vertically.  Expressed in 26.6\n   *     pixel format.\n   *\n   * @inout:\n   *   bitmap ::\n   *     A handle to the target bitmap.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *   The current implementation restricts `xStrength` to be less than or\n   *   equal to~8 if bitmap is of pixel_mode @FT_PIXEL_MODE_MONO.\n   *\n   *   If you want to embolden the bitmap owned by a @FT_GlyphSlotRec, you\n   *   should call @FT_GlyphSlot_Own_Bitmap on the slot first.\n   *\n   *   Bitmaps in @FT_PIXEL_MODE_GRAY2 and @FT_PIXEL_MODE_GRAY@ format are\n   *   converted to @FT_PIXEL_MODE_GRAY format (i.e., 8bpp).\n   */\n  FT_EXPORT( FT_Error )\n  FT_Bitmap_Embolden( FT_Library  library,\n                      FT_Bitmap*  bitmap,\n                      FT_Pos      xStrength,\n                      FT_Pos      yStrength );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Bitmap_Convert\n   *\n   * @description:\n   *   Convert a bitmap object with depth 1bpp, 2bpp, 4bpp, 8bpp or 32bpp to\n   *   a bitmap object with depth 8bpp, making the number of used bytes per\n   *   line (a.k.a. the 'pitch') a multiple of `alignment`.\n   *\n   * @input:\n   *   library ::\n   *     A handle to a library object.\n   *\n   *   source ::\n   *     The source bitmap.\n   *\n   *   alignment ::\n   *     The pitch of the bitmap is a multiple of this argument.  Common\n   *     values are 1, 2, or 4.\n   *\n   * @output:\n   *   target ::\n   *     The target bitmap.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *   It is possible to call @FT_Bitmap_Convert multiple times without\n   *   calling @FT_Bitmap_Done (the memory is simply reallocated).\n   *\n   *   Use @FT_Bitmap_Done to finally remove the bitmap object.\n   *\n   *   The `library` argument is taken to have access to FreeType's memory\n   *   handling functions.\n   *\n   *   `source->buffer` and `target->buffer` must neither be equal nor\n   *   overlap.\n   */\n  FT_EXPORT( FT_Error )\n  FT_Bitmap_Convert( FT_Library        library,\n                     const FT_Bitmap  *source,\n                     FT_Bitmap        *target,\n                     FT_Int            alignment );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Bitmap_Blend\n   *\n   * @description:\n   *   Blend a bitmap onto another bitmap, using a given color.\n   *\n   * @input:\n   *   library ::\n   *     A handle to a library object.\n   *\n   *   source ::\n   *     The source bitmap, which can have any @FT_Pixel_Mode format.\n   *\n   *   source_offset ::\n   *     The offset vector to the upper left corner of the source bitmap in\n   *     26.6 pixel format.  It should represent an integer offset; the\n   *     function will set the lowest six bits to zero to enforce that.\n   *\n   *   color ::\n   *     The color used to draw `source` onto `target`.\n   *\n   * @inout:\n   *   target ::\n   *     A handle to an `FT_Bitmap` object.  It should be either initialized\n   *     as empty with a call to @FT_Bitmap_Init, or it should be of type\n   *     @FT_PIXEL_MODE_BGRA.\n   *\n   *   atarget_offset ::\n   *     The offset vector to the upper left corner of the target bitmap in\n   *     26.6 pixel format.  It should represent an integer offset; the\n   *     function will set the lowest six bits to zero to enforce that.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *   This function doesn't perform clipping.\n   *\n   *   The bitmap in `target` gets allocated or reallocated as needed; the\n   *   vector `atarget_offset` is updated accordingly.\n   *\n   *   In case of allocation or reallocation, the bitmap's pitch is set to\n   *   `4 * width`.  Both `source` and `target` must have the same bitmap\n   *   flow (as indicated by the sign of the `pitch` field).\n   *\n   *   `source->buffer` and `target->buffer` must neither be equal nor\n   *   overlap.\n   *\n   * @since:\n   *   2.10\n   */\n  FT_EXPORT( FT_Error )\n  FT_Bitmap_Blend( FT_Library         library,\n                   const FT_Bitmap*   source,\n                   const FT_Vector    source_offset,\n                   FT_Bitmap*         target,\n                   FT_Vector         *atarget_offset,\n                   FT_Color           color );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_GlyphSlot_Own_Bitmap\n   *\n   * @description:\n   *   Make sure that a glyph slot owns `slot->bitmap`.\n   *\n   * @input:\n   *   slot ::\n   *     The glyph slot.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *   This function is to be used in combination with @FT_Bitmap_Embolden.\n   */\n  FT_EXPORT( FT_Error )\n  FT_GlyphSlot_Own_Bitmap( FT_GlyphSlot  slot );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Bitmap_Done\n   *\n   * @description:\n   *   Destroy a bitmap object initialized with @FT_Bitmap_Init.\n   *\n   * @input:\n   *   library ::\n   *     A handle to a library object.\n   *\n   *   bitmap ::\n   *     The bitmap object to be freed.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *   The `library` argument is taken to have access to FreeType's memory\n   *   handling functions.\n   */\n  FT_EXPORT( FT_Error )\n  FT_Bitmap_Done( FT_Library  library,\n                  FT_Bitmap  *bitmap );\n\n\n  /* */\n\n\nFT_END_HEADER\n\n#endif /* FTBITMAP_H_ */\n\n\n/* END */\n"
  },
  {
    "path": "thirdparty/freetype/include/freetype2/freetype/ftbzip2.h",
    "content": "/****************************************************************************\n *\n * ftbzip2.h\n *\n *   Bzip2-compressed stream support.\n *\n * Copyright (C) 2010-2021 by\n * Joel Klinghed.\n *\n * This file is part of the FreeType project, and may only be used,\n * modified, and distributed under the terms of the FreeType project\n * license, LICENSE.TXT.  By continuing to use, modify, or distribute\n * this file you indicate that you have read the license and\n * understand and accept it fully.\n *\n */\n\n\n#ifndef FTBZIP2_H_\n#define FTBZIP2_H_\n\n#include <freetype/freetype.h>\n\n#ifdef FREETYPE_H\n#error \"freetype.h of FreeType 1 has been loaded!\"\n#error \"Please fix the directory search order for header files\"\n#error \"so that freetype.h of FreeType 2 is found first.\"\n#endif\n\n\nFT_BEGIN_HEADER\n\n  /**************************************************************************\n   *\n   * @section:\n   *   bzip2\n   *\n   * @title:\n   *   BZIP2 Streams\n   *\n   * @abstract:\n   *   Using bzip2-compressed font files.\n   *\n   * @description:\n   *   In certain builds of the library, bzip2 compression recognition is\n   *   automatically handled when calling @FT_New_Face or @FT_Open_Face.\n   *   This means that if no font driver is capable of handling the raw\n   *   compressed file, the library will try to open a bzip2 compressed\n   *   stream from it and re-open the face with it.\n   *\n   *   The stream implementation is very basic and resets the decompression\n   *   process each time seeking backwards is needed within the stream,\n   *   which significantly undermines the performance.\n   *\n   *   This section contains the declaration of Bzip2-specific functions.\n   *\n   */\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Stream_OpenBzip2\n   *\n   * @description:\n   *   Open a new stream to parse bzip2-compressed font files.  This is\n   *   mainly used to support the compressed `*.pcf.bz2` fonts that come with\n   *   XFree86.\n   *\n   * @input:\n   *   stream ::\n   *     The target embedding stream.\n   *\n   *   source ::\n   *     The source stream.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *   The source stream must be opened _before_ calling this function.\n   *\n   *   Calling the internal function `FT_Stream_Close` on the new stream will\n   *   **not** call `FT_Stream_Close` on the source stream.  None of the\n   *   stream objects will be released to the heap.\n   *\n   *   This function may return `FT_Err_Unimplemented_Feature` if your build\n   *   of FreeType was not compiled with bzip2 support.\n   */\n  FT_EXPORT( FT_Error )\n  FT_Stream_OpenBzip2( FT_Stream  stream,\n                       FT_Stream  source );\n\n  /* */\n\n\nFT_END_HEADER\n\n#endif /* FTBZIP2_H_ */\n\n\n/* END */\n"
  },
  {
    "path": "thirdparty/freetype/include/freetype2/freetype/ftcache.h",
    "content": "/****************************************************************************\n *\n * ftcache.h\n *\n *   FreeType Cache subsystem (specification).\n *\n * Copyright (C) 1996-2021 by\n * David Turner, Robert Wilhelm, and Werner Lemberg.\n *\n * This file is part of the FreeType project, and may only be used,\n * modified, and distributed under the terms of the FreeType project\n * license, LICENSE.TXT.  By continuing to use, modify, or distribute\n * this file you indicate that you have read the license and\n * understand and accept it fully.\n *\n */\n\n\n#ifndef FTCACHE_H_\n#define FTCACHE_H_\n\n\n#include <freetype/ftglyph.h>\n\n\nFT_BEGIN_HEADER\n\n\n  /**************************************************************************\n   *\n   * @section:\n   *   cache_subsystem\n   *\n   * @title:\n   *   Cache Sub-System\n   *\n   * @abstract:\n   *   How to cache face, size, and glyph data with FreeType~2.\n   *\n   * @description:\n   *   This section describes the FreeType~2 cache sub-system, which is used\n   *   to limit the number of concurrently opened @FT_Face and @FT_Size\n   *   objects, as well as caching information like character maps and glyph\n   *   images while limiting their maximum memory usage.\n   *\n   *   Note that all types and functions begin with the `FTC_` prefix.\n   *\n   *   The cache is highly portable and thus doesn't know anything about the\n   *   fonts installed on your system, or how to access them.  This implies\n   *   the following scheme:\n   *\n   *   First, available or installed font faces are uniquely identified by\n   *   @FTC_FaceID values, provided to the cache by the client.  Note that\n   *   the cache only stores and compares these values, and doesn't try to\n   *   interpret them in any way.\n   *\n   *   Second, the cache calls, only when needed, a client-provided function\n   *   to convert an @FTC_FaceID into a new @FT_Face object.  The latter is\n   *   then completely managed by the cache, including its termination\n   *   through @FT_Done_Face.  To monitor termination of face objects, the\n   *   finalizer callback in the `generic` field of the @FT_Face object can\n   *   be used, which might also be used to store the @FTC_FaceID of the\n   *   face.\n   *\n   *   Clients are free to map face IDs to anything else.  The most simple\n   *   usage is to associate them to a (pathname,face_index) pair that is\n   *   used to call @FT_New_Face.  However, more complex schemes are also\n   *   possible.\n   *\n   *   Note that for the cache to work correctly, the face ID values must be\n   *   **persistent**, which means that the contents they point to should not\n   *   change at runtime, or that their value should not become invalid.\n   *\n   *   If this is unavoidable (e.g., when a font is uninstalled at runtime),\n   *   you should call @FTC_Manager_RemoveFaceID as soon as possible, to let\n   *   the cache get rid of any references to the old @FTC_FaceID it may keep\n   *   internally.  Failure to do so will lead to incorrect behaviour or even\n   *   crashes.\n   *\n   *   To use the cache, start with calling @FTC_Manager_New to create a new\n   *   @FTC_Manager object, which models a single cache instance.  You can\n   *   then look up @FT_Face and @FT_Size objects with\n   *   @FTC_Manager_LookupFace and @FTC_Manager_LookupSize, respectively.\n   *\n   *   If you want to use the charmap caching, call @FTC_CMapCache_New, then\n   *   later use @FTC_CMapCache_Lookup to perform the equivalent of\n   *   @FT_Get_Char_Index, only much faster.\n   *\n   *   If you want to use the @FT_Glyph caching, call @FTC_ImageCache_New,\n   *   then later use @FTC_ImageCache_Lookup to retrieve the corresponding\n   *   @FT_Glyph objects from the cache.\n   *\n   *   If you need lots of small bitmaps, it is much more memory efficient to\n   *   call @FTC_SBitCache_New followed by @FTC_SBitCache_Lookup.  This\n   *   returns @FTC_SBitRec structures, which are used to store small bitmaps\n   *   directly.  (A small bitmap is one whose metrics and dimensions all fit\n   *   into 8-bit integers).\n   *\n   *   We hope to also provide a kerning cache in the near future.\n   *\n   *\n   * @order:\n   *   FTC_Manager\n   *   FTC_FaceID\n   *   FTC_Face_Requester\n   *\n   *   FTC_Manager_New\n   *   FTC_Manager_Reset\n   *   FTC_Manager_Done\n   *   FTC_Manager_LookupFace\n   *   FTC_Manager_LookupSize\n   *   FTC_Manager_RemoveFaceID\n   *\n   *   FTC_Node\n   *   FTC_Node_Unref\n   *\n   *   FTC_ImageCache\n   *   FTC_ImageCache_New\n   *   FTC_ImageCache_Lookup\n   *\n   *   FTC_SBit\n   *   FTC_SBitCache\n   *   FTC_SBitCache_New\n   *   FTC_SBitCache_Lookup\n   *\n   *   FTC_CMapCache\n   *   FTC_CMapCache_New\n   *   FTC_CMapCache_Lookup\n   *\n   *************************************************************************/\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                    BASIC TYPE DEFINITIONS                     *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n  /**************************************************************************\n   *\n   * @type:\n   *   FTC_FaceID\n   *\n   * @description:\n   *   An opaque pointer type that is used to identity face objects.  The\n   *   contents of such objects is application-dependent.\n   *\n   *   These pointers are typically used to point to a user-defined structure\n   *   containing a font file path, and face index.\n   *\n   * @note:\n   *   Never use `NULL` as a valid @FTC_FaceID.\n   *\n   *   Face IDs are passed by the client to the cache manager that calls,\n   *   when needed, the @FTC_Face_Requester to translate them into new\n   *   @FT_Face objects.\n   *\n   *   If the content of a given face ID changes at runtime, or if the value\n   *   becomes invalid (e.g., when uninstalling a font), you should\n   *   immediately call @FTC_Manager_RemoveFaceID before any other cache\n   *   function.\n   *\n   *   Failure to do so will result in incorrect behaviour or even memory\n   *   leaks and crashes.\n   */\n  typedef FT_Pointer  FTC_FaceID;\n\n\n  /**************************************************************************\n   *\n   * @functype:\n   *   FTC_Face_Requester\n   *\n   * @description:\n   *   A callback function provided by client applications.  It is used by\n   *   the cache manager to translate a given @FTC_FaceID into a new valid\n   *   @FT_Face object, on demand.\n   *\n   * @input:\n   *   face_id ::\n   *     The face ID to resolve.\n   *\n   *   library ::\n   *     A handle to a FreeType library object.\n   *\n   *   req_data ::\n   *     Application-provided request data (see note below).\n   *\n   * @output:\n   *   aface ::\n   *     A new @FT_Face handle.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *   The third parameter `req_data` is the same as the one passed by the\n   *   client when @FTC_Manager_New is called.\n   *\n   *   The face requester should not perform funny things on the returned\n   *   face object, like creating a new @FT_Size for it, or setting a\n   *   transformation through @FT_Set_Transform!\n   */\n  typedef FT_Error\n  (*FTC_Face_Requester)( FTC_FaceID  face_id,\n                         FT_Library  library,\n                         FT_Pointer  req_data,\n                         FT_Face*    aface );\n\n  /* */\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                      CACHE MANAGER OBJECT                     *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n  /**************************************************************************\n   *\n   * @type:\n   *   FTC_Manager\n   *\n   * @description:\n   *   This object corresponds to one instance of the cache-subsystem.  It is\n   *   used to cache one or more @FT_Face objects, along with corresponding\n   *   @FT_Size objects.\n   *\n   *   The manager intentionally limits the total number of opened @FT_Face\n   *   and @FT_Size objects to control memory usage.  See the `max_faces` and\n   *   `max_sizes` parameters of @FTC_Manager_New.\n   *\n   *   The manager is also used to cache 'nodes' of various types while\n   *   limiting their total memory usage.\n   *\n   *   All limitations are enforced by keeping lists of managed objects in\n   *   most-recently-used order, and flushing old nodes to make room for new\n   *   ones.\n   */\n  typedef struct FTC_ManagerRec_*  FTC_Manager;\n\n\n  /**************************************************************************\n   *\n   * @type:\n   *   FTC_Node\n   *\n   * @description:\n   *   An opaque handle to a cache node object.  Each cache node is\n   *   reference-counted.  A node with a count of~0 might be flushed out of a\n   *   full cache whenever a lookup request is performed.\n   *\n   *   If you look up nodes, you have the ability to 'acquire' them, i.e., to\n   *   increment their reference count.  This will prevent the node from\n   *   being flushed out of the cache until you explicitly 'release' it (see\n   *   @FTC_Node_Unref).\n   *\n   *   See also @FTC_SBitCache_Lookup and @FTC_ImageCache_Lookup.\n   */\n  typedef struct FTC_NodeRec_*  FTC_Node;\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FTC_Manager_New\n   *\n   * @description:\n   *   Create a new cache manager.\n   *\n   * @input:\n   *   library ::\n   *     The parent FreeType library handle to use.\n   *\n   *   max_faces ::\n   *     Maximum number of opened @FT_Face objects managed by this cache\n   *     instance.  Use~0 for defaults.\n   *\n   *   max_sizes ::\n   *     Maximum number of opened @FT_Size objects managed by this cache\n   *     instance.  Use~0 for defaults.\n   *\n   *   max_bytes ::\n   *     Maximum number of bytes to use for cached data nodes.  Use~0 for\n   *     defaults.  Note that this value does not account for managed\n   *     @FT_Face and @FT_Size objects.\n   *\n   *   requester ::\n   *     An application-provided callback used to translate face IDs into\n   *     real @FT_Face objects.\n   *\n   *   req_data ::\n   *     A generic pointer that is passed to the requester each time it is\n   *     called (see @FTC_Face_Requester).\n   *\n   * @output:\n   *   amanager ::\n   *     A handle to a new manager object.  0~in case of failure.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   */\n  FT_EXPORT( FT_Error )\n  FTC_Manager_New( FT_Library          library,\n                   FT_UInt             max_faces,\n                   FT_UInt             max_sizes,\n                   FT_ULong            max_bytes,\n                   FTC_Face_Requester  requester,\n                   FT_Pointer          req_data,\n                   FTC_Manager        *amanager );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FTC_Manager_Reset\n   *\n   * @description:\n   *   Empty a given cache manager.  This simply gets rid of all the\n   *   currently cached @FT_Face and @FT_Size objects within the manager.\n   *\n   * @inout:\n   *   manager ::\n   *     A handle to the manager.\n   */\n  FT_EXPORT( void )\n  FTC_Manager_Reset( FTC_Manager  manager );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FTC_Manager_Done\n   *\n   * @description:\n   *   Destroy a given manager after emptying it.\n   *\n   * @input:\n   *   manager ::\n   *     A handle to the target cache manager object.\n   */\n  FT_EXPORT( void )\n  FTC_Manager_Done( FTC_Manager  manager );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FTC_Manager_LookupFace\n   *\n   * @description:\n   *   Retrieve the @FT_Face object that corresponds to a given face ID\n   *   through a cache manager.\n   *\n   * @input:\n   *   manager ::\n   *     A handle to the cache manager.\n   *\n   *   face_id ::\n   *     The ID of the face object.\n   *\n   * @output:\n   *   aface ::\n   *     A handle to the face object.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *   The returned @FT_Face object is always owned by the manager.  You\n   *   should never try to discard it yourself.\n   *\n   *   The @FT_Face object doesn't necessarily have a current size object\n   *   (i.e., face->size can be~0).  If you need a specific 'font size', use\n   *   @FTC_Manager_LookupSize instead.\n   *\n   *   Never change the face's transformation matrix (i.e., never call the\n   *   @FT_Set_Transform function) on a returned face!  If you need to\n   *   transform glyphs, do it yourself after glyph loading.\n   *\n   *   When you perform a lookup, out-of-memory errors are detected _within_\n   *   the lookup and force incremental flushes of the cache until enough\n   *   memory is released for the lookup to succeed.\n   *\n   *   If a lookup fails with `FT_Err_Out_Of_Memory` the cache has already\n   *   been completely flushed, and still no memory was available for the\n   *   operation.\n   */\n  FT_EXPORT( FT_Error )\n  FTC_Manager_LookupFace( FTC_Manager  manager,\n                          FTC_FaceID   face_id,\n                          FT_Face     *aface );\n\n\n  /**************************************************************************\n   *\n   * @struct:\n   *   FTC_ScalerRec\n   *\n   * @description:\n   *   A structure used to describe a given character size in either pixels\n   *   or points to the cache manager.  See @FTC_Manager_LookupSize.\n   *\n   * @fields:\n   *   face_id ::\n   *     The source face ID.\n   *\n   *   width ::\n   *     The character width.\n   *\n   *   height ::\n   *     The character height.\n   *\n   *   pixel ::\n   *     A Boolean.  If 1, the `width` and `height` fields are interpreted as\n   *     integer pixel character sizes.  Otherwise, they are expressed as\n   *     1/64th of points.\n   *\n   *   x_res ::\n   *     Only used when `pixel` is value~0 to indicate the horizontal\n   *     resolution in dpi.\n   *\n   *   y_res ::\n   *     Only used when `pixel` is value~0 to indicate the vertical\n   *     resolution in dpi.\n   *\n   * @note:\n   *   This type is mainly used to retrieve @FT_Size objects through the\n   *   cache manager.\n   */\n  typedef struct  FTC_ScalerRec_\n  {\n    FTC_FaceID  face_id;\n    FT_UInt     width;\n    FT_UInt     height;\n    FT_Int      pixel;\n    FT_UInt     x_res;\n    FT_UInt     y_res;\n\n  } FTC_ScalerRec;\n\n\n  /**************************************************************************\n   *\n   * @struct:\n   *   FTC_Scaler\n   *\n   * @description:\n   *   A handle to an @FTC_ScalerRec structure.\n   */\n  typedef struct FTC_ScalerRec_*  FTC_Scaler;\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FTC_Manager_LookupSize\n   *\n   * @description:\n   *   Retrieve the @FT_Size object that corresponds to a given\n   *   @FTC_ScalerRec pointer through a cache manager.\n   *\n   * @input:\n   *   manager ::\n   *     A handle to the cache manager.\n   *\n   *   scaler ::\n   *     A scaler handle.\n   *\n   * @output:\n   *   asize ::\n   *     A handle to the size object.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *   The returned @FT_Size object is always owned by the manager.  You\n   *   should never try to discard it by yourself.\n   *\n   *   You can access the parent @FT_Face object simply as `size->face` if\n   *   you need it.  Note that this object is also owned by the manager.\n   *\n   * @note:\n   *   When you perform a lookup, out-of-memory errors are detected _within_\n   *   the lookup and force incremental flushes of the cache until enough\n   *   memory is released for the lookup to succeed.\n   *\n   *   If a lookup fails with `FT_Err_Out_Of_Memory` the cache has already\n   *   been completely flushed, and still no memory is available for the\n   *   operation.\n   */\n  FT_EXPORT( FT_Error )\n  FTC_Manager_LookupSize( FTC_Manager  manager,\n                          FTC_Scaler   scaler,\n                          FT_Size     *asize );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FTC_Node_Unref\n   *\n   * @description:\n   *   Decrement a cache node's internal reference count.  When the count\n   *   reaches 0, it is not destroyed but becomes eligible for subsequent\n   *   cache flushes.\n   *\n   * @input:\n   *   node ::\n   *     The cache node handle.\n   *\n   *   manager ::\n   *     The cache manager handle.\n   */\n  FT_EXPORT( void )\n  FTC_Node_Unref( FTC_Node     node,\n                  FTC_Manager  manager );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FTC_Manager_RemoveFaceID\n   *\n   * @description:\n   *   A special function used to indicate to the cache manager that a given\n   *   @FTC_FaceID is no longer valid, either because its content changed, or\n   *   because it was deallocated or uninstalled.\n   *\n   * @input:\n   *   manager ::\n   *     The cache manager handle.\n   *\n   *   face_id ::\n   *     The @FTC_FaceID to be removed.\n   *\n   * @note:\n   *   This function flushes all nodes from the cache corresponding to this\n   *   `face_id`, with the exception of nodes with a non-null reference\n   *   count.\n   *\n   *   Such nodes are however modified internally so as to never appear in\n   *   later lookups with the same `face_id` value, and to be immediately\n   *   destroyed when released by all their users.\n   *\n   */\n  FT_EXPORT( void )\n  FTC_Manager_RemoveFaceID( FTC_Manager  manager,\n                            FTC_FaceID   face_id );\n\n\n  /**************************************************************************\n   *\n   * @type:\n   *   FTC_CMapCache\n   *\n   * @description:\n   *   An opaque handle used to model a charmap cache.  This cache is to hold\n   *   character codes -> glyph indices mappings.\n   *\n   */\n  typedef struct FTC_CMapCacheRec_*  FTC_CMapCache;\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FTC_CMapCache_New\n   *\n   * @description:\n   *   Create a new charmap cache.\n   *\n   * @input:\n   *   manager ::\n   *     A handle to the cache manager.\n   *\n   * @output:\n   *   acache ::\n   *     A new cache handle.  `NULL` in case of error.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *   Like all other caches, this one will be destroyed with the cache\n   *   manager.\n   *\n   */\n  FT_EXPORT( FT_Error )\n  FTC_CMapCache_New( FTC_Manager     manager,\n                     FTC_CMapCache  *acache );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FTC_CMapCache_Lookup\n   *\n   * @description:\n   *   Translate a character code into a glyph index, using the charmap\n   *   cache.\n   *\n   * @input:\n   *   cache ::\n   *     A charmap cache handle.\n   *\n   *   face_id ::\n   *     The source face ID.\n   *\n   *   cmap_index ::\n   *     The index of the charmap in the source face.  Any negative value\n   *     means to use the cache @FT_Face's default charmap.\n   *\n   *   char_code ::\n   *     The character code (in the corresponding charmap).\n   *\n   * @return:\n   *    Glyph index.  0~means 'no glyph'.\n   *\n   */\n  FT_EXPORT( FT_UInt )\n  FTC_CMapCache_Lookup( FTC_CMapCache  cache,\n                        FTC_FaceID     face_id,\n                        FT_Int         cmap_index,\n                        FT_UInt32      char_code );\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                       IMAGE CACHE OBJECT                      *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n  /**************************************************************************\n   *\n   * @struct:\n   *   FTC_ImageTypeRec\n   *\n   * @description:\n   *   A structure used to model the type of images in a glyph cache.\n   *\n   * @fields:\n   *   face_id ::\n   *     The face ID.\n   *\n   *   width ::\n   *     The width in pixels.\n   *\n   *   height ::\n   *     The height in pixels.\n   *\n   *   flags ::\n   *     The load flags, as in @FT_Load_Glyph.\n   *\n   */\n  typedef struct  FTC_ImageTypeRec_\n  {\n    FTC_FaceID  face_id;\n    FT_UInt     width;\n    FT_UInt     height;\n    FT_Int32    flags;\n\n  } FTC_ImageTypeRec;\n\n\n  /**************************************************************************\n   *\n   * @type:\n   *   FTC_ImageType\n   *\n   * @description:\n   *   A handle to an @FTC_ImageTypeRec structure.\n   *\n   */\n  typedef struct FTC_ImageTypeRec_*  FTC_ImageType;\n\n\n  /* */\n\n\n#define FTC_IMAGE_TYPE_COMPARE( d1, d2 )      \\\n          ( (d1)->face_id == (d2)->face_id && \\\n            (d1)->width   == (d2)->width   && \\\n            (d1)->flags   == (d2)->flags   )\n\n\n  /**************************************************************************\n   *\n   * @type:\n   *   FTC_ImageCache\n   *\n   * @description:\n   *   A handle to a glyph image cache object.  They are designed to hold\n   *   many distinct glyph images while not exceeding a certain memory\n   *   threshold.\n   */\n  typedef struct FTC_ImageCacheRec_*  FTC_ImageCache;\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FTC_ImageCache_New\n   *\n   * @description:\n   *   Create a new glyph image cache.\n   *\n   * @input:\n   *   manager ::\n   *     The parent manager for the image cache.\n   *\n   * @output:\n   *   acache ::\n   *     A handle to the new glyph image cache object.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   */\n  FT_EXPORT( FT_Error )\n  FTC_ImageCache_New( FTC_Manager      manager,\n                      FTC_ImageCache  *acache );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FTC_ImageCache_Lookup\n   *\n   * @description:\n   *   Retrieve a given glyph image from a glyph image cache.\n   *\n   * @input:\n   *   cache ::\n   *     A handle to the source glyph image cache.\n   *\n   *   type ::\n   *     A pointer to a glyph image type descriptor.\n   *\n   *   gindex ::\n   *     The glyph index to retrieve.\n   *\n   * @output:\n   *   aglyph ::\n   *     The corresponding @FT_Glyph object.  0~in case of failure.\n   *\n   *   anode ::\n   *     Used to return the address of the corresponding cache node after\n   *     incrementing its reference count (see note below).\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *   The returned glyph is owned and managed by the glyph image cache.\n   *   Never try to transform or discard it manually!  You can however create\n   *   a copy with @FT_Glyph_Copy and modify the new one.\n   *\n   *   If `anode` is _not_ `NULL`, it receives the address of the cache node\n   *   containing the glyph image, after increasing its reference count.\n   *   This ensures that the node (as well as the @FT_Glyph) will always be\n   *   kept in the cache until you call @FTC_Node_Unref to 'release' it.\n   *\n   *   If `anode` is `NULL`, the cache node is left unchanged, which means\n   *   that the @FT_Glyph could be flushed out of the cache on the next call\n   *   to one of the caching sub-system APIs.  Don't assume that it is\n   *   persistent!\n   */\n  FT_EXPORT( FT_Error )\n  FTC_ImageCache_Lookup( FTC_ImageCache  cache,\n                         FTC_ImageType   type,\n                         FT_UInt         gindex,\n                         FT_Glyph       *aglyph,\n                         FTC_Node       *anode );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FTC_ImageCache_LookupScaler\n   *\n   * @description:\n   *   A variant of @FTC_ImageCache_Lookup that uses an @FTC_ScalerRec to\n   *   specify the face ID and its size.\n   *\n   * @input:\n   *   cache ::\n   *     A handle to the source glyph image cache.\n   *\n   *   scaler ::\n   *     A pointer to a scaler descriptor.\n   *\n   *   load_flags ::\n   *     The corresponding load flags.\n   *\n   *   gindex ::\n   *     The glyph index to retrieve.\n   *\n   * @output:\n   *   aglyph ::\n   *     The corresponding @FT_Glyph object.  0~in case of failure.\n   *\n   *   anode ::\n   *     Used to return the address of the corresponding cache node after\n   *     incrementing its reference count (see note below).\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *   The returned glyph is owned and managed by the glyph image cache.\n   *   Never try to transform or discard it manually!  You can however create\n   *   a copy with @FT_Glyph_Copy and modify the new one.\n   *\n   *   If `anode` is _not_ `NULL`, it receives the address of the cache node\n   *   containing the glyph image, after increasing its reference count.\n   *   This ensures that the node (as well as the @FT_Glyph) will always be\n   *   kept in the cache until you call @FTC_Node_Unref to 'release' it.\n   *\n   *   If `anode` is `NULL`, the cache node is left unchanged, which means\n   *   that the @FT_Glyph could be flushed out of the cache on the next call\n   *   to one of the caching sub-system APIs.  Don't assume that it is\n   *   persistent!\n   *\n   *   Calls to @FT_Set_Char_Size and friends have no effect on cached\n   *   glyphs; you should always use the FreeType cache API instead.\n   */\n  FT_EXPORT( FT_Error )\n  FTC_ImageCache_LookupScaler( FTC_ImageCache  cache,\n                               FTC_Scaler      scaler,\n                               FT_ULong        load_flags,\n                               FT_UInt         gindex,\n                               FT_Glyph       *aglyph,\n                               FTC_Node       *anode );\n\n\n  /**************************************************************************\n   *\n   * @type:\n   *   FTC_SBit\n   *\n   * @description:\n   *   A handle to a small bitmap descriptor.  See the @FTC_SBitRec structure\n   *   for details.\n   */\n  typedef struct FTC_SBitRec_*  FTC_SBit;\n\n\n  /**************************************************************************\n   *\n   * @struct:\n   *   FTC_SBitRec\n   *\n   * @description:\n   *   A very compact structure used to describe a small glyph bitmap.\n   *\n   * @fields:\n   *   width ::\n   *     The bitmap width in pixels.\n   *\n   *   height ::\n   *     The bitmap height in pixels.\n   *\n   *   left ::\n   *     The horizontal distance from the pen position to the left bitmap\n   *     border (a.k.a. 'left side bearing', or 'lsb').\n   *\n   *   top ::\n   *     The vertical distance from the pen position (on the baseline) to the\n   *     upper bitmap border (a.k.a. 'top side bearing').  The distance is\n   *     positive for upwards y~coordinates.\n   *\n   *   format ::\n   *     The format of the glyph bitmap (monochrome or gray).\n   *\n   *   max_grays ::\n   *     Maximum gray level value (in the range 1 to~255).\n   *\n   *   pitch ::\n   *     The number of bytes per bitmap line.  May be positive or negative.\n   *\n   *   xadvance ::\n   *     The horizontal advance width in pixels.\n   *\n   *   yadvance ::\n   *     The vertical advance height in pixels.\n   *\n   *   buffer ::\n   *     A pointer to the bitmap pixels.\n   */\n  typedef struct  FTC_SBitRec_\n  {\n    FT_Byte   width;\n    FT_Byte   height;\n    FT_Char   left;\n    FT_Char   top;\n\n    FT_Byte   format;\n    FT_Byte   max_grays;\n    FT_Short  pitch;\n    FT_Char   xadvance;\n    FT_Char   yadvance;\n\n    FT_Byte*  buffer;\n\n  } FTC_SBitRec;\n\n\n  /**************************************************************************\n   *\n   * @type:\n   *   FTC_SBitCache\n   *\n   * @description:\n   *   A handle to a small bitmap cache.  These are special cache objects\n   *   used to store small glyph bitmaps (and anti-aliased pixmaps) in a much\n   *   more efficient way than the traditional glyph image cache implemented\n   *   by @FTC_ImageCache.\n   */\n  typedef struct FTC_SBitCacheRec_*  FTC_SBitCache;\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FTC_SBitCache_New\n   *\n   * @description:\n   *   Create a new cache to store small glyph bitmaps.\n   *\n   * @input:\n   *   manager ::\n   *     A handle to the source cache manager.\n   *\n   * @output:\n   *   acache ::\n   *     A handle to the new sbit cache.  `NULL` in case of error.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   */\n  FT_EXPORT( FT_Error )\n  FTC_SBitCache_New( FTC_Manager     manager,\n                     FTC_SBitCache  *acache );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FTC_SBitCache_Lookup\n   *\n   * @description:\n   *   Look up a given small glyph bitmap in a given sbit cache and 'lock' it\n   *   to prevent its flushing from the cache until needed.\n   *\n   * @input:\n   *   cache ::\n   *     A handle to the source sbit cache.\n   *\n   *   type ::\n   *     A pointer to the glyph image type descriptor.\n   *\n   *   gindex ::\n   *     The glyph index.\n   *\n   * @output:\n   *   sbit ::\n   *     A handle to a small bitmap descriptor.\n   *\n   *   anode ::\n   *     Used to return the address of the corresponding cache node after\n   *     incrementing its reference count (see note below).\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *   The small bitmap descriptor and its bit buffer are owned by the cache\n   *   and should never be freed by the application.  They might as well\n   *   disappear from memory on the next cache lookup, so don't treat them as\n   *   persistent data.\n   *\n   *   The descriptor's `buffer` field is set to~0 to indicate a missing\n   *   glyph bitmap.\n   *\n   *   If `anode` is _not_ `NULL`, it receives the address of the cache node\n   *   containing the bitmap, after increasing its reference count.  This\n   *   ensures that the node (as well as the image) will always be kept in\n   *   the cache until you call @FTC_Node_Unref to 'release' it.\n   *\n   *   If `anode` is `NULL`, the cache node is left unchanged, which means\n   *   that the bitmap could be flushed out of the cache on the next call to\n   *   one of the caching sub-system APIs.  Don't assume that it is\n   *   persistent!\n   */\n  FT_EXPORT( FT_Error )\n  FTC_SBitCache_Lookup( FTC_SBitCache    cache,\n                        FTC_ImageType    type,\n                        FT_UInt          gindex,\n                        FTC_SBit        *sbit,\n                        FTC_Node        *anode );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FTC_SBitCache_LookupScaler\n   *\n   * @description:\n   *   A variant of @FTC_SBitCache_Lookup that uses an @FTC_ScalerRec to\n   *   specify the face ID and its size.\n   *\n   * @input:\n   *   cache ::\n   *     A handle to the source sbit cache.\n   *\n   *   scaler ::\n   *     A pointer to the scaler descriptor.\n   *\n   *   load_flags ::\n   *     The corresponding load flags.\n   *\n   *   gindex ::\n   *     The glyph index.\n   *\n   * @output:\n   *   sbit ::\n   *     A handle to a small bitmap descriptor.\n   *\n   *   anode ::\n   *     Used to return the address of the corresponding cache node after\n   *     incrementing its reference count (see note below).\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *   The small bitmap descriptor and its bit buffer are owned by the cache\n   *   and should never be freed by the application.  They might as well\n   *   disappear from memory on the next cache lookup, so don't treat them as\n   *   persistent data.\n   *\n   *   The descriptor's `buffer` field is set to~0 to indicate a missing\n   *   glyph bitmap.\n   *\n   *   If `anode` is _not_ `NULL`, it receives the address of the cache node\n   *   containing the bitmap, after increasing its reference count.  This\n   *   ensures that the node (as well as the image) will always be kept in\n   *   the cache until you call @FTC_Node_Unref to 'release' it.\n   *\n   *   If `anode` is `NULL`, the cache node is left unchanged, which means\n   *   that the bitmap could be flushed out of the cache on the next call to\n   *   one of the caching sub-system APIs.  Don't assume that it is\n   *   persistent!\n   */\n  FT_EXPORT( FT_Error )\n  FTC_SBitCache_LookupScaler( FTC_SBitCache  cache,\n                              FTC_Scaler     scaler,\n                              FT_ULong       load_flags,\n                              FT_UInt        gindex,\n                              FTC_SBit      *sbit,\n                              FTC_Node      *anode );\n\n  /* */\n\n\nFT_END_HEADER\n\n#endif /* FTCACHE_H_ */\n\n\n/* END */\n"
  },
  {
    "path": "thirdparty/freetype/include/freetype2/freetype/ftchapters.h",
    "content": "/****************************************************************************\n *\n * This file defines the structure of the FreeType reference.\n * It is used by the python script that generates the HTML files.\n *\n */\n\n\n  /**************************************************************************\n   *\n   * @chapter:\n   *   general_remarks\n   *\n   * @title:\n   *   General Remarks\n   *\n   * @sections:\n   *   preamble\n   *   header_inclusion\n   *   user_allocation\n   *\n   */\n\n\n  /**************************************************************************\n   *\n   * @chapter:\n   *   core_api\n   *\n   * @title:\n   *   Core API\n   *\n   * @sections:\n   *   version\n   *   basic_types\n   *   base_interface\n   *   glyph_variants\n   *   color_management\n   *   layer_management\n   *   glyph_management\n   *   mac_specific\n   *   sizes_management\n   *   header_file_macros\n   *\n   */\n\n\n  /**************************************************************************\n   *\n   * @chapter:\n   *   format_specific\n   *\n   * @title:\n   *   Format-Specific API\n   *\n   * @sections:\n   *   multiple_masters\n   *   truetype_tables\n   *   type1_tables\n   *   sfnt_names\n   *   bdf_fonts\n   *   cid_fonts\n   *   pfr_fonts\n   *   winfnt_fonts\n   *   font_formats\n   *   gasp_table\n   *\n   */\n\n\n  /**************************************************************************\n   *\n   * @chapter:\n   *   module_specific\n   *\n   * @title:\n   *   Controlling FreeType Modules\n   *\n   * @sections:\n   *   auto_hinter\n   *   cff_driver\n   *   t1_cid_driver\n   *   tt_driver\n   *   pcf_driver\n   *   properties\n   *   parameter_tags\n   *   lcd_rendering\n   *\n   */\n\n\n  /**************************************************************************\n   *\n   * @chapter:\n   *   cache_subsystem\n   *\n   * @title:\n   *   Cache Sub-System\n   *\n   * @sections:\n   *   cache_subsystem\n   *\n   */\n\n\n  /**************************************************************************\n   *\n   * @chapter:\n   *   support_api\n   *\n   * @title:\n   *   Support API\n   *\n   * @sections:\n   *   computations\n   *   list_processing\n   *   outline_processing\n   *   quick_advance\n   *   bitmap_handling\n   *   raster\n   *   glyph_stroker\n   *   system_interface\n   *   module_management\n   *   gzip\n   *   lzw\n   *   bzip2\n   *   debugging_apis\n   *\n   */\n\n\n  /**************************************************************************\n   *\n   * @chapter:\n   *   error_codes\n   *\n   * @title:\n   *   Error Codes\n   *\n   * @sections:\n   *   error_enumerations\n   *   error_code_values\n   *\n   */\n\n\n/* END */\n"
  },
  {
    "path": "thirdparty/freetype/include/freetype2/freetype/ftcid.h",
    "content": "/****************************************************************************\n *\n * ftcid.h\n *\n *   FreeType API for accessing CID font information (specification).\n *\n * Copyright (C) 2007-2021 by\n * Dereg Clegg and Michael Toftdal.\n *\n * This file is part of the FreeType project, and may only be used,\n * modified, and distributed under the terms of the FreeType project\n * license, LICENSE.TXT.  By continuing to use, modify, or distribute\n * this file you indicate that you have read the license and\n * understand and accept it fully.\n *\n */\n\n\n#ifndef FTCID_H_\n#define FTCID_H_\n\n#include <freetype/freetype.h>\n\n#ifdef FREETYPE_H\n#error \"freetype.h of FreeType 1 has been loaded!\"\n#error \"Please fix the directory search order for header files\"\n#error \"so that freetype.h of FreeType 2 is found first.\"\n#endif\n\n\nFT_BEGIN_HEADER\n\n\n  /**************************************************************************\n   *\n   * @section:\n   *   cid_fonts\n   *\n   * @title:\n   *   CID Fonts\n   *\n   * @abstract:\n   *   CID-keyed font-specific API.\n   *\n   * @description:\n   *   This section contains the declaration of CID-keyed font-specific\n   *   functions.\n   *\n   */\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *    FT_Get_CID_Registry_Ordering_Supplement\n   *\n   * @description:\n   *    Retrieve the Registry/Ordering/Supplement triple (also known as the\n   *    \"R/O/S\") from a CID-keyed font.\n   *\n   * @input:\n   *    face ::\n   *      A handle to the input face.\n   *\n   * @output:\n   *    registry ::\n   *      The registry, as a C~string, owned by the face.\n   *\n   *    ordering ::\n   *      The ordering, as a C~string, owned by the face.\n   *\n   *    supplement ::\n   *      The supplement.\n   *\n   * @return:\n   *    FreeType error code.  0~means success.\n   *\n   * @note:\n   *    This function only works with CID faces, returning an error\n   *    otherwise.\n   *\n   * @since:\n   *    2.3.6\n   */\n  FT_EXPORT( FT_Error )\n  FT_Get_CID_Registry_Ordering_Supplement( FT_Face       face,\n                                           const char*  *registry,\n                                           const char*  *ordering,\n                                           FT_Int       *supplement );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *    FT_Get_CID_Is_Internally_CID_Keyed\n   *\n   * @description:\n   *    Retrieve the type of the input face, CID keyed or not.  In contrast\n   *    to the @FT_IS_CID_KEYED macro this function returns successfully also\n   *    for CID-keyed fonts in an SFNT wrapper.\n   *\n   * @input:\n   *    face ::\n   *      A handle to the input face.\n   *\n   * @output:\n   *    is_cid ::\n   *      The type of the face as an @FT_Bool.\n   *\n   * @return:\n   *    FreeType error code.  0~means success.\n   *\n   * @note:\n   *    This function only works with CID faces and OpenType fonts, returning\n   *    an error otherwise.\n   *\n   * @since:\n   *    2.3.9\n   */\n  FT_EXPORT( FT_Error )\n  FT_Get_CID_Is_Internally_CID_Keyed( FT_Face   face,\n                                      FT_Bool  *is_cid );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *    FT_Get_CID_From_Glyph_Index\n   *\n   * @description:\n   *    Retrieve the CID of the input glyph index.\n   *\n   * @input:\n   *    face ::\n   *      A handle to the input face.\n   *\n   *    glyph_index ::\n   *      The input glyph index.\n   *\n   * @output:\n   *    cid ::\n   *      The CID as an @FT_UInt.\n   *\n   * @return:\n   *    FreeType error code.  0~means success.\n   *\n   * @note:\n   *    This function only works with CID faces and OpenType fonts, returning\n   *    an error otherwise.\n   *\n   * @since:\n   *    2.3.9\n   */\n  FT_EXPORT( FT_Error )\n  FT_Get_CID_From_Glyph_Index( FT_Face   face,\n                               FT_UInt   glyph_index,\n                               FT_UInt  *cid );\n\n  /* */\n\n\nFT_END_HEADER\n\n#endif /* FTCID_H_ */\n\n\n/* END */\n"
  },
  {
    "path": "thirdparty/freetype/include/freetype2/freetype/ftcolor.h",
    "content": "/****************************************************************************\n *\n * ftcolor.h\n *\n *   FreeType's glyph color management (specification).\n *\n * Copyright (C) 2018-2021 by\n * David Turner, Robert Wilhelm, and Werner Lemberg.\n *\n * This file is part of the FreeType project, and may only be used,\n * modified, and distributed under the terms of the FreeType project\n * license, LICENSE.TXT.  By continuing to use, modify, or distribute\n * this file you indicate that you have read the license and\n * understand and accept it fully.\n *\n */\n\n\n#ifndef FTCOLOR_H_\n#define FTCOLOR_H_\n\n#include <freetype/freetype.h>\n\n#ifdef FREETYPE_H\n#error \"freetype.h of FreeType 1 has been loaded!\"\n#error \"Please fix the directory search order for header files\"\n#error \"so that freetype.h of FreeType 2 is found first.\"\n#endif\n\n\nFT_BEGIN_HEADER\n\n\n  /**************************************************************************\n   *\n   * @section:\n   *   color_management\n   *\n   * @title:\n   *   Glyph Color Management\n   *\n   * @abstract:\n   *   Retrieving and manipulating OpenType's 'CPAL' table data.\n   *\n   * @description:\n   *   The functions described here allow access and manipulation of color\n   *   palette entries in OpenType's 'CPAL' tables.\n   */\n\n\n  /**************************************************************************\n   *\n   * @struct:\n   *   FT_Color\n   *\n   * @description:\n   *   This structure models a BGRA color value of a 'CPAL' palette entry.\n   *\n   *   The used color space is sRGB; the colors are not pre-multiplied, and\n   *   alpha values must be explicitly set.\n   *\n   * @fields:\n   *   blue ::\n   *     Blue value.\n   *\n   *   green ::\n   *     Green value.\n   *\n   *   red ::\n   *     Red value.\n   *\n   *   alpha ::\n   *     Alpha value, giving the red, green, and blue color's opacity.\n   *\n   * @since:\n   *   2.10\n   */\n  typedef struct  FT_Color_\n  {\n    FT_Byte  blue;\n    FT_Byte  green;\n    FT_Byte  red;\n    FT_Byte  alpha;\n\n  } FT_Color;\n\n\n  /**************************************************************************\n   *\n   * @enum:\n   *   FT_PALETTE_XXX\n   *\n   * @description:\n   *   A list of bit field constants used in the `palette_flags` array of the\n   *   @FT_Palette_Data structure to indicate for which background a palette\n   *   with a given index is usable.\n   *\n   * @values:\n   *   FT_PALETTE_FOR_LIGHT_BACKGROUND ::\n   *     The palette is appropriate to use when displaying the font on a\n   *     light background such as white.\n   *\n   *   FT_PALETTE_FOR_DARK_BACKGROUND ::\n   *     The palette is appropriate to use when displaying the font on a dark\n   *     background such as black.\n   *\n   * @since:\n   *   2.10\n   */\n#define FT_PALETTE_FOR_LIGHT_BACKGROUND  0x01\n#define FT_PALETTE_FOR_DARK_BACKGROUND   0x02\n\n\n  /**************************************************************************\n   *\n   * @struct:\n   *   FT_Palette_Data\n   *\n   * @description:\n   *   This structure holds the data of the 'CPAL' table.\n   *\n   * @fields:\n   *   num_palettes ::\n   *     The number of palettes.\n   *\n   *   palette_name_ids ::\n   *     An optional read-only array of palette name IDs with `num_palettes`\n   *     elements, corresponding to entries like 'dark' or 'light' in the\n   *     font's 'name' table.\n   *\n   *     An empty name ID in the 'CPAL' table gets represented as value\n   *     0xFFFF.\n   *\n   *     `NULL` if the font's 'CPAL' table doesn't contain appropriate data.\n   *\n   *   palette_flags ::\n   *     An optional read-only array of palette flags with `num_palettes`\n   *     elements.  Possible values are an ORed combination of\n   *     @FT_PALETTE_FOR_LIGHT_BACKGROUND and\n   *     @FT_PALETTE_FOR_DARK_BACKGROUND.\n   *\n   *     `NULL` if the font's 'CPAL' table doesn't contain appropriate data.\n   *\n   *   num_palette_entries ::\n   *     The number of entries in a single palette.  All palettes have the\n   *     same size.\n   *\n   *   palette_entry_name_ids ::\n   *     An optional read-only array of palette entry name IDs with\n   *     `num_palette_entries`.  In each palette, entries with the same index\n   *     have the same function.  For example, index~0 might correspond to\n   *     string 'outline' in the font's 'name' table to indicate that this\n   *     palette entry is used for outlines, index~1 might correspond to\n   *     'fill' to indicate the filling color palette entry, etc.\n   *\n   *     An empty entry name ID in the 'CPAL' table gets represented as value\n   *     0xFFFF.\n   *\n   *     `NULL` if the font's 'CPAL' table doesn't contain appropriate data.\n   *\n   * @note:\n   *   Use function @FT_Get_Sfnt_Name to map name IDs and entry name IDs to\n   *   name strings.\n   *\n   *   Use function @FT_Palette_Select to get the colors associated with a\n   *   palette entry.\n   *\n   * @since:\n   *   2.10\n   */\n  typedef struct  FT_Palette_Data_ {\n    FT_UShort         num_palettes;\n    const FT_UShort*  palette_name_ids;\n    const FT_UShort*  palette_flags;\n\n    FT_UShort         num_palette_entries;\n    const FT_UShort*  palette_entry_name_ids;\n\n  } FT_Palette_Data;\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Palette_Data_Get\n   *\n   * @description:\n   *   Retrieve the face's color palette data.\n   *\n   * @input:\n   *   face ::\n   *     The source face handle.\n   *\n   * @output:\n   *   apalette ::\n   *     A pointer to an @FT_Palette_Data structure.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *   All arrays in the returned @FT_Palette_Data structure are read-only.\n   *\n   *   This function always returns an error if the config macro\n   *   `TT_CONFIG_OPTION_COLOR_LAYERS` is not defined in `ftoption.h`.\n   *\n   * @since:\n   *   2.10\n   */\n  FT_EXPORT( FT_Error )\n  FT_Palette_Data_Get( FT_Face           face,\n                       FT_Palette_Data  *apalette );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Palette_Select\n   *\n   * @description:\n   *   This function has two purposes.\n   *\n   *   (1) It activates a palette for rendering color glyphs, and\n   *\n   *   (2) it retrieves all (unmodified) color entries of this palette.  This\n   *       function returns a read-write array, which means that a calling\n   *       application can modify the palette entries on demand.\n   *\n   * A corollary of (2) is that calling the function, then modifying some\n   * values, then calling the function again with the same arguments resets\n   * all color entries to the original 'CPAL' values; all user modifications\n   * are lost.\n   *\n   * @input:\n   *   face ::\n   *     The source face handle.\n   *\n   *   palette_index ::\n   *     The palette index.\n   *\n   * @output:\n   *   apalette ::\n   *     An array of color entries for a palette with index `palette_index`,\n   *     having `num_palette_entries` elements (as found in the\n   *     `FT_Palette_Data` structure).  If `apalette` is set to `NULL`, no\n   *     array gets returned (and no color entries can be modified).\n   *\n   *     In case the font doesn't support color palettes, `NULL` is returned.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *   The array pointed to by `apalette_entries` is owned and managed by\n   *   FreeType.\n   *\n   *   This function always returns an error if the config macro\n   *   `TT_CONFIG_OPTION_COLOR_LAYERS` is not defined in `ftoption.h`.\n   *\n   * @since:\n   *   2.10\n   */\n  FT_EXPORT( FT_Error )\n  FT_Palette_Select( FT_Face     face,\n                     FT_UShort   palette_index,\n                     FT_Color*  *apalette );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Palette_Set_Foreground_Color\n   *\n   * @description:\n   *   'COLR' uses palette index 0xFFFF to indicate a 'text foreground\n   *   color'.  This function sets this value.\n   *\n   * @input:\n   *   face ::\n   *     The source face handle.\n   *\n   *   foreground_color ::\n   *     An `FT_Color` structure to define the text foreground color.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *   If this function isn't called, the text foreground color is set to\n   *   white opaque (BGRA value 0xFFFFFFFF) if\n   *   @FT_PALETTE_FOR_DARK_BACKGROUND is present for the current palette,\n   *   and black opaque (BGRA value 0x000000FF) otherwise, including the case\n   *   that no palette types are available in the 'CPAL' table.\n   *\n   *   This function always returns an error if the config macro\n   *   `TT_CONFIG_OPTION_COLOR_LAYERS` is not defined in `ftoption.h`.\n   *\n   * @since:\n   *   2.10\n   */\n  FT_EXPORT( FT_Error )\n  FT_Palette_Set_Foreground_Color( FT_Face   face,\n                                   FT_Color  foreground_color );\n\n\n  /**************************************************************************\n   *\n   * @section:\n   *   layer_management\n   *\n   * @title:\n   *   Glyph Layer Management\n   *\n   * @abstract:\n   *   Retrieving and manipulating OpenType's 'COLR' table data.\n   *\n   * @description:\n   *   The functions described here allow access of colored glyph layer data\n   *   in OpenType's 'COLR' tables.\n   */\n\n\n  /**************************************************************************\n   *\n   * @struct:\n   *   FT_LayerIterator\n   *\n   * @description:\n   *   This iterator object is needed for @FT_Get_Color_Glyph_Layer.\n   *\n   * @fields:\n   *   num_layers ::\n   *     The number of glyph layers for the requested glyph index.  Will be\n   *     set by @FT_Get_Color_Glyph_Layer.\n   *\n   *   layer ::\n   *     The current layer.  Will be set by @FT_Get_Color_Glyph_Layer.\n   *\n   *   p ::\n   *     An opaque pointer into 'COLR' table data.  The caller must set this\n   *     to `NULL` before the first call of @FT_Get_Color_Glyph_Layer.\n   */\n  typedef struct  FT_LayerIterator_\n  {\n    FT_UInt   num_layers;\n    FT_UInt   layer;\n    FT_Byte*  p;\n\n  } FT_LayerIterator;\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Get_Color_Glyph_Layer\n   *\n   * @description:\n   *   This is an interface to the 'COLR' table in OpenType fonts to\n   *   iteratively retrieve the colored glyph layers associated with the\n   *   current glyph slot.\n   *\n   *     https://docs.microsoft.com/en-us/typography/opentype/spec/colr\n   *\n   *   The glyph layer data for a given glyph index, if present, provides an\n   *   alternative, multi-color glyph representation: Instead of rendering\n   *   the outline or bitmap with the given glyph index, glyphs with the\n   *   indices and colors returned by this function are rendered layer by\n   *   layer.\n   *\n   *   The returned elements are ordered in the z~direction from bottom to\n   *   top; the 'n'th element should be rendered with the associated palette\n   *   color and blended on top of the already rendered layers (elements 0,\n   *   1, ..., n-1).\n   *\n   * @input:\n   *   face ::\n   *     A handle to the parent face object.\n   *\n   *   base_glyph ::\n   *     The glyph index the colored glyph layers are associated with.\n   *\n   * @inout:\n   *   iterator ::\n   *     An @FT_LayerIterator object.  For the first call you should set\n   *     `iterator->p` to `NULL`.  For all following calls, simply use the\n   *     same object again.\n   *\n   * @output:\n   *   aglyph_index ::\n   *     The glyph index of the current layer.\n   *\n   *   acolor_index ::\n   *     The color index into the font face's color palette of the current\n   *     layer.  The value 0xFFFF is special; it doesn't reference a palette\n   *     entry but indicates that the text foreground color should be used\n   *     instead (to be set up by the application outside of FreeType).\n   *\n   *     The color palette can be retrieved with @FT_Palette_Select.\n   *\n   * @return:\n   *   Value~1 if everything is OK.  If there are no more layers (or if there\n   *   are no layers at all), value~0 gets returned.  In case of an error,\n   *   value~0 is returned also.\n   *\n   * @note:\n   *   This function is necessary if you want to handle glyph layers by\n   *   yourself.  In particular, functions that operate with @FT_GlyphRec\n   *   objects (like @FT_Get_Glyph or @FT_Glyph_To_Bitmap) don't have access\n   *   to this information.\n   *\n   *   Note that @FT_Render_Glyph is able to handle colored glyph layers\n   *   automatically if the @FT_LOAD_COLOR flag is passed to a previous call\n   *   to @FT_Load_Glyph.  [This is an experimental feature.]\n   *\n   * @example:\n   *   ```\n   *     FT_Color*         palette;\n   *     FT_LayerIterator  iterator;\n   *\n   *     FT_Bool  have_layers;\n   *     FT_UInt  layer_glyph_index;\n   *     FT_UInt  layer_color_index;\n   *\n   *\n   *     error = FT_Palette_Select( face, palette_index, &palette );\n   *     if ( error )\n   *       palette = NULL;\n   *\n   *     iterator.p  = NULL;\n   *     have_layers = FT_Get_Color_Glyph_Layer( face,\n   *                                             glyph_index,\n   *                                             &layer_glyph_index,\n   *                                             &layer_color_index,\n   *                                             &iterator );\n   *\n   *     if ( palette && have_layers )\n   *     {\n   *       do\n   *       {\n   *         FT_Color  layer_color;\n   *\n   *\n   *         if ( layer_color_index == 0xFFFF )\n   *           layer_color = text_foreground_color;\n   *         else\n   *           layer_color = palette[layer_color_index];\n   *\n   *         // Load and render glyph `layer_glyph_index', then\n   *         // blend resulting pixmap (using color `layer_color')\n   *         // with previously created pixmaps.\n   *\n   *       } while ( FT_Get_Color_Glyph_Layer( face,\n   *                                           glyph_index,\n   *                                           &layer_glyph_index,\n   *                                           &layer_color_index,\n   *                                           &iterator ) );\n   *     }\n   *   ```\n   */\n  FT_EXPORT( FT_Bool )\n  FT_Get_Color_Glyph_Layer( FT_Face            face,\n                            FT_UInt            base_glyph,\n                            FT_UInt           *aglyph_index,\n                            FT_UInt           *acolor_index,\n                            FT_LayerIterator*  iterator );\n\n\n  /**************************************************************************\n   *\n   * @enum:\n   *   FT_PaintFormat\n   *\n   * @description:\n   *   Enumeration describing the different paint format types of the v1\n   *   extensions to the 'COLR' table, see\n   *   'https://github.com/googlefonts/colr-gradients-spec'.\n   *\n   *   The enumeration values losely correspond with the format numbers of\n   *   the specification: FreeType always returns a fully specified 'Paint'\n   *   structure for the 'Transform', 'Translate', 'Scale', 'Rotate', and\n   *   'Skew' table types even though the specification has different formats\n   *   depending on whether or not a center is specified, whether the scale\n   *   is uniform in x and y~direction or not, etc.  Also, only non-variable\n   *   format identifiers are listed in this enumeration; as soon as support\n   *   for variable 'COLR' v1 fonts is implemented, interpolation is\n   *   performed dependent on axis coordinates, which are configured on the\n   *   @FT_Face through @FT_Set_Var_Design_Coordinates.  This implies that\n   *   always static, readily interpolated values are returned in the 'Paint'\n   *   structures.\n   *\n   * @since:\n   *   2.11 -- **currently experimental only!**  There might be changes\n   *   without retaining backward compatibility of both the API and ABI.\n   *\n   */\n  typedef enum  FT_PaintFormat_\n  {\n    FT_COLR_PAINTFORMAT_COLR_LAYERS     = 1,\n    FT_COLR_PAINTFORMAT_SOLID           = 2,\n    FT_COLR_PAINTFORMAT_LINEAR_GRADIENT = 4,\n    FT_COLR_PAINTFORMAT_RADIAL_GRADIENT = 6,\n    FT_COLR_PAINTFORMAT_SWEEP_GRADIENT  = 8,\n    FT_COLR_PAINTFORMAT_GLYPH           = 10,\n    FT_COLR_PAINTFORMAT_COLR_GLYPH      = 11,\n    FT_COLR_PAINTFORMAT_TRANSFORM       = 12,\n    FT_COLR_PAINTFORMAT_TRANSLATE       = 14,\n    FT_COLR_PAINTFORMAT_SCALE           = 16,\n    FT_COLR_PAINTFORMAT_ROTATE          = 24,\n    FT_COLR_PAINTFORMAT_SKEW            = 28,\n    FT_COLR_PAINTFORMAT_COMPOSITE       = 32,\n    FT_COLR_PAINT_FORMAT_MAX            = 33,\n    FT_COLR_PAINTFORMAT_UNSUPPORTED     = 255\n\n  } FT_PaintFormat;\n\n\n  /**************************************************************************\n   *\n   * @struct:\n   *   FT_ColorStopIterator\n   *\n   * @description:\n   *   This iterator object is needed for @FT_Get_Colorline_Stops.  It keeps\n   *   state while iterating over the stops of an @FT_ColorLine,\n   *   representing the `ColorLine` struct of the v1 extensions to 'COLR',\n   *   see 'https://github.com/googlefonts/colr-gradients-spec'.\n   *\n   * @fields:\n   *   num_color_stops ::\n   *     The number of color stops for the requested glyph index.  Set by\n   *     @FT_Get_Colorline_Stops.\n   *\n   *   current_color_stop ::\n   *     The current color stop.  Set by @FT_Get_Colorline_Stops.\n   *\n   *   p ::\n   *     An opaque pointer into 'COLR' table data.  The caller must set this\n   *     to `NULL` before the first call of @FT_Get_Colorline_Stops.\n   *\n   * @since:\n   *   2.11 -- **currently experimental only!**  There might be changes\n   *   without retaining backward compatibility of both the API and ABI.\n   *\n   */\n  typedef struct  FT_ColorStopIterator_\n  {\n    FT_UInt  num_color_stops;\n    FT_UInt  current_color_stop;\n\n    FT_Byte*  p;\n\n  } FT_ColorStopIterator;\n\n\n  /**************************************************************************\n   *\n   * @struct:\n   *   FT_ColorIndex\n   *\n   * @description:\n   *   A structure representing a `ColorIndex` value of the 'COLR' v1\n   *   extensions, see 'https://github.com/googlefonts/colr-gradients-spec'.\n   *\n   * @fields:\n   *   palette_index ::\n   *     The palette index into a 'CPAL' palette.\n   *\n   *   alpha ::\n   *     Alpha transparency value multiplied with the value from 'CPAL'.\n   *\n   * @since:\n   *   2.11 -- **currently experimental only!**  There might be changes\n   *   without retaining backward compatibility of both the API and ABI.\n   *\n   */\n  typedef struct  FT_ColorIndex_\n  {\n    FT_UInt16   palette_index;\n    FT_F2Dot14  alpha;\n\n  } FT_ColorIndex;\n\n\n  /**************************************************************************\n   *\n   * @struct:\n   *   FT_ColorStop\n   *\n   * @description:\n   *   A structure representing a `ColorStop` value of the 'COLR' v1\n   *   extensions, see 'https://github.com/googlefonts/colr-gradients-spec'.\n   *\n   * @fields:\n   *   stop_offset ::\n   *     The stop offset between 0 and 1 along the gradient.\n   *\n   *   color ::\n   *     The color information for this stop, see @FT_ColorIndex.\n   *\n   * @since:\n   *   2.11 -- **currently experimental only!**  There might be changes\n   *   without retaining backward compatibility of both the API and ABI.\n   *\n   */\n  typedef struct  FT_ColorStop_\n  {\n    FT_F2Dot14     stop_offset;\n    FT_ColorIndex  color;\n\n  } FT_ColorStop;\n\n\n  /**************************************************************************\n   *\n   * @enum:\n   *   FT_PaintExtend\n   *\n   * @description:\n   *   An enumeration representing the 'Extend' mode of the 'COLR' v1\n   *   extensions, see 'https://github.com/googlefonts/colr-gradients-spec'.\n   *   It describes how the gradient fill continues at the other boundaries.\n   *\n   * @since:\n   *   2.11 -- **currently experimental only!**  There might be changes\n   *   without retaining backward compatibility of both the API and ABI.\n   *\n   */\n  typedef enum  FT_PaintExtend_\n  {\n    FT_COLR_PAINT_EXTEND_PAD     = 0,\n    FT_COLR_PAINT_EXTEND_REPEAT  = 1,\n    FT_COLR_PAINT_EXTEND_REFLECT = 2\n\n  } FT_PaintExtend;\n\n\n  /**************************************************************************\n   *\n   * @struct:\n   *   FT_ColorLine\n   *\n   * @description:\n   *   A structure representing a `ColorLine` value of the 'COLR' v1\n   *   extensions, see 'https://github.com/googlefonts/colr-gradients-spec'.\n   *   It describes a list of color stops along the defined gradient.\n   *\n   * @fields:\n   *   extend ::\n   *     The extend mode at the outer boundaries, see @FT_PaintExtend.\n   *\n   *   color_stop_iterator ::\n   *     The @FT_ColorStopIterator used to enumerate and retrieve the\n   *     actual @FT_ColorStop's.\n   *\n   * @since:\n   *   2.11 -- **currently experimental only!**  There might be changes\n   *   without retaining backward compatibility of both the API and ABI.\n   *\n   */\n  typedef struct  FT_ColorLine_\n  {\n    FT_PaintExtend        extend;\n    FT_ColorStopIterator  color_stop_iterator;\n\n  } FT_ColorLine;\n\n\n  /**************************************************************************\n   *\n   * @struct:\n   *   FT_Affine23\n   *\n   * @description:\n   *   A structure used to store a 2x3 matrix.  Coefficients are in\n   *   16.16 fixed-point format.  The computation performed is\n   *\n   *   ```\n   *     x' = x*xx + y*xy + dx\n   *     y' = x*yx + y*yy + dy\n   *   ```\n   *\n   * @fields:\n   *   xx ::\n   *     Matrix coefficient.\n   *\n   *   xy ::\n   *     Matrix coefficient.\n   *\n   *   dx ::\n   *     x translation.\n   *\n   *   yx ::\n   *     Matrix coefficient.\n   *\n   *   yy ::\n   *     Matrix coefficient.\n   *\n   *   dy ::\n   *     y translation.\n   *\n   * @since:\n   *   2.11 -- **currently experimental only!**  There might be changes\n   *   without retaining backward compatibility of both the API and ABI.\n   *\n   */\n  typedef struct  FT_Affine_23_\n  {\n    FT_Fixed  xx, xy, dx;\n    FT_Fixed  yx, yy, dy;\n\n  } FT_Affine23;\n\n\n  /**************************************************************************\n   *\n   * @enum:\n   *   FT_Composite_Mode\n   *\n   * @description:\n   *   An enumeration listing the 'COLR' v1 composite modes used in\n   *   @FT_PaintComposite.  For more details on each paint mode, see\n   *   'https://www.w3.org/TR/compositing-1/#porterduffcompositingoperators'.\n   *\n   * @since:\n   *   2.11 -- **currently experimental only!**  There might be changes\n   *   without retaining backward compatibility of both the API and ABI.\n   *\n   */\n  typedef enum  FT_Composite_Mode_\n  {\n    FT_COLR_COMPOSITE_CLEAR          = 0,\n    FT_COLR_COMPOSITE_SRC            = 1,\n    FT_COLR_COMPOSITE_DEST           = 2,\n    FT_COLR_COMPOSITE_SRC_OVER       = 3,\n    FT_COLR_COMPOSITE_DEST_OVER      = 4,\n    FT_COLR_COMPOSITE_SRC_IN         = 5,\n    FT_COLR_COMPOSITE_DEST_IN        = 6,\n    FT_COLR_COMPOSITE_SRC_OUT        = 7,\n    FT_COLR_COMPOSITE_DEST_OUT       = 8,\n    FT_COLR_COMPOSITE_SRC_ATOP       = 9,\n    FT_COLR_COMPOSITE_DEST_ATOP      = 10,\n    FT_COLR_COMPOSITE_XOR            = 11,\n    FT_COLR_COMPOSITE_SCREEN         = 12,\n    FT_COLR_COMPOSITE_OVERLAY        = 13,\n    FT_COLR_COMPOSITE_DARKEN         = 14,\n    FT_COLR_COMPOSITE_LIGHTEN        = 15,\n    FT_COLR_COMPOSITE_COLOR_DODGE    = 16,\n    FT_COLR_COMPOSITE_COLOR_BURN     = 17,\n    FT_COLR_COMPOSITE_HARD_LIGHT     = 18,\n    FT_COLR_COMPOSITE_SOFT_LIGHT     = 19,\n    FT_COLR_COMPOSITE_DIFFERENCE     = 20,\n    FT_COLR_COMPOSITE_EXCLUSION      = 21,\n    FT_COLR_COMPOSITE_MULTIPLY       = 22,\n    FT_COLR_COMPOSITE_HSL_HUE        = 23,\n    FT_COLR_COMPOSITE_HSL_SATURATION = 24,\n    FT_COLR_COMPOSITE_HSL_COLOR      = 25,\n    FT_COLR_COMPOSITE_HSL_LUMINOSITY = 26,\n    FT_COLR_COMPOSITE_MAX            = 27\n\n  } FT_Composite_Mode;\n\n\n  /**************************************************************************\n   *\n   * @struct:\n   *   FT_OpaquePaint\n   *\n   * @description:\n   *   A structure representing an offset to a `Paint` value stored in any\n   *   of the paint tables of a 'COLR' v1 font.  Compare Offset<24> there.\n   *   When 'COLR' v1 paint tables represented by FreeType objects such as\n   *   @FT_PaintColrLayers, @FT_PaintComposite, or @FT_PaintTransform\n   *   reference downstream nested paint tables, we do not immediately\n   *   retrieve them but encapsulate their location in this type.  Use\n   *   @FT_Get_Paint to retrieve the actual @FT_COLR_Paint object that\n   *   describes the details of the respective paint table.\n   *\n   * @fields:\n   *   p ::\n   *     An internal offset to a Paint table, needs to be set to NULL before\n   *     passing this struct as an argument to @FT_Get_Paint.\n   *\n   *   insert_root_transform ::\n   *     An internal boolean to track whether an initial root transform is\n   *     to be provided.  Do not set this value.\n   *\n   * @since:\n   *   2.11 -- **currently experimental only!**  There might be changes\n   *   without retaining backward compatibility of both the API and ABI.\n   *\n   */\n  typedef struct  FT_Opaque_Paint_\n  {\n    FT_Byte*  p;\n    FT_Bool   insert_root_transform;\n  } FT_OpaquePaint;\n\n\n  /**************************************************************************\n   *\n   * @struct:\n   *   FT_PaintColrLayers\n   *\n   * @description:\n   *   A structure representing a `PaintColrLayers` table of a 'COLR' v1\n   *   font.  This table describes a set of layers that are to be composited\n   *   with composite mode `FT_COLR_COMPOSITE_SRC_OVER`.  The return value\n   *   of this function is an @FT_LayerIterator initialized so that it can\n   *   be used with @FT_Get_Paint_Layers to retrieve the @FT_OpaquePaint\n   *   objects as references to each layer.\n   *\n   * @fields:\n   *   layer_iterator ::\n   *     The layer iterator that describes the layers of this paint.\n   *\n   * @since:\n   *   2.11 -- **currently experimental only!**  There might be changes\n   *   without retaining backward compatibility of both the API and ABI.\n   *\n   */\n  typedef struct  FT_PaintColrLayers_\n  {\n    FT_LayerIterator  layer_iterator;\n\n  } FT_PaintColrLayers;\n\n\n  /**************************************************************************\n   *\n   * @struct:\n   *   FT_PaintSolid\n   *\n   * @description:\n   *   A structure representing a `PaintSolid` value of the 'COLR' v1\n   *   extensions, see 'https://github.com/googlefonts/colr-gradients-spec'.\n   *   Using a `PaintSolid` value means that the glyph layer filled with\n   *   this paint is solid-colored and does not contain a gradient.\n   *\n   * @fields:\n   *   color ::\n   *     The color information for this solid paint, see @FT_ColorIndex.\n   *\n   * @since:\n   *   2.11 -- **currently experimental only!**  There might be changes\n   *   without retaining backward compatibility of both the API and ABI.\n   *\n   */\n  typedef struct  FT_PaintSolid_\n  {\n    FT_ColorIndex  color;\n\n  } FT_PaintSolid;\n\n\n  /**************************************************************************\n   *\n   * @struct:\n   *   FT_PaintLinearGradient\n   *\n   * @description:\n   *   A structure representing a `PaintLinearGradient` value of the 'COLR'\n   *   v1 extensions, see\n   *   'https://github.com/googlefonts/colr-gradients-spec'.  The glyph\n   *   layer filled with this paint is drawn filled with a linear gradient.\n   *\n   * @fields:\n   *   colorline ::\n   *     The @FT_ColorLine information for this paint, i.e., the list of\n   *     color stops along the gradient.\n   *\n   *   p0 ::\n   *     The starting point of the gradient definition (in font units).\n   *\n   *   p1 ::\n   *     The end point of the gradient definition (in font units).\n   *\n   *   p2 ::\n   *     Optional point~p2 to rotate the gradient (in font units).\n   *     Otherwise equal to~p0.\n   *\n   * @since:\n   *   2.11 -- **currently experimental only!**  There might be changes\n   *   without retaining backward compatibility of both the API and ABI.\n   *\n   */\n  typedef struct  FT_PaintLinearGradient_\n  {\n    FT_ColorLine  colorline;\n\n    /* TODO: Potentially expose those as x0, y0 etc. */\n    FT_Vector  p0;\n    FT_Vector  p1;\n    FT_Vector  p2;\n\n  } FT_PaintLinearGradient;\n\n\n  /**************************************************************************\n   *\n   * @struct:\n   *   FT_PaintRadialGradient\n   *\n   * @description:\n   *   A structure representing a `PaintRadialGradient` value of the 'COLR'\n   *   v1 extensions, see\n   *   'https://github.com/googlefonts/colr-gradients-spec'.  The glyph\n   *   layer filled with this paint is drawn filled filled with a radial\n   *   gradient.\n   *\n   * @fields:\n   *   colorline ::\n   *     The @FT_ColorLine information for this paint, i.e., the list of\n   *     color stops along the gradient.\n   *\n   *   c0 ::\n   *     The center of the starting point of the radial gradient (in font\n   *     units).\n   *\n   *   r0 ::\n   *     The radius of the starting circle of the radial gradient (in font\n   *     units).\n   *\n   *   c1 ::\n   *     The center of the end point of the radial gradient (in font units).\n   *\n   *   r1 ::\n   *     The radius of the end circle of the radial gradient (in font\n   *     units).\n   *\n   * @since:\n   *   2.11 -- **currently experimental only!**  There might be changes\n   *   without retaining backward compatibility of both the API and ABI.\n   *\n   */\n  typedef struct  FT_PaintRadialGradient_\n  {\n    FT_ColorLine  colorline;\n\n    FT_Vector  c0;\n    FT_UShort  r0;\n    FT_Vector  c1;\n    FT_UShort  r1;\n\n  } FT_PaintRadialGradient;\n\n\n  /**************************************************************************\n   *\n   * @struct:\n   *   FT_PaintSweepGradient\n   *\n   * @description:\n   *   A structure representing a `PaintSweepGradient` value of the 'COLR'\n   *   v1 extensions, see\n   *   'https://github.com/googlefonts/colr-gradients-spec'.  The glyph\n   *   layer filled with this paint is drawn filled with a sweep gradient\n   *   from `start_angle` to `end_angle`.\n   *\n   * @fields:\n   *   colorline ::\n   *     The @FT_ColorLine information for this paint, i.e., the list of\n   *     color stops along the gradient.\n   *\n   *   center ::\n   *     The center of the sweep gradient (in font units).\n   *\n   *   start_angle ::\n   *     The start angle of the sweep gradient, in 16.16 fixed point format\n   *     specifying degrees.  Values are given counter-clockwise, starting\n   *     from the (positive) y~axis.\n   *\n   *   end_angle ::\n   *     The end angle of the sweep gradient, in 16.16 fixed point format\n   *     specifying degrees.  Values are given counter-clockwise, starting\n   *     from the (positive) y~axis.\n   *\n   * @since:\n   *   2.11 -- **currently experimental only!**  There might be changes\n   *   without retaining backward compatibility of both the API and ABI.\n   *\n   */\n  typedef struct  FT_PaintSweepGradient_\n  {\n    FT_ColorLine  colorline;\n\n    FT_Vector  center;\n    FT_Fixed   start_angle;\n    FT_Fixed   end_angle;\n\n  } FT_PaintSweepGradient;\n\n\n  /**************************************************************************\n   *\n   * @struct:\n   *   FT_PaintGlyph\n   *\n   * @description:\n   *   A structure representing a 'COLR' v1 `PaintGlyph` paint table.\n   *\n   * @fields:\n   *   paint ::\n   *     An opaque paint object pointing to a `Paint` table that serves as\n   *     the fill for the glyph ID.\n   *\n   *   glyphID ::\n   *     The glyph ID from the 'glyf' table, which serves as the contour\n   *     information that is filled with paint.\n   *\n   * @since:\n   *   2.11 -- **currently experimental only!**  There might be changes\n   *   without retaining backward compatibility of both the API and ABI.\n   *\n   */\n  typedef struct  FT_PaintGlyph_\n  {\n    FT_OpaquePaint  paint;\n    FT_UInt         glyphID;\n\n  } FT_PaintGlyph;\n\n\n  /**************************************************************************\n   *\n   * @struct:\n   *   FT_PaintColrGlyph\n   *\n   * @description:\n   *   A structure representing a 'COLR' v1 `PaintColorGlyph` paint table.\n   *\n   * @fields:\n   *   glyphID ::\n   *     The glyph ID from the `BaseGlyphV1List` table that is drawn for\n   *     this paint.\n   *\n   * @since:\n   *   2.11 -- **currently experimental only!**  There might be changes\n   *   without retaining backward compatibility of both the API and ABI.\n   *\n   */\n  typedef struct  FT_PaintColrGlyph_\n  {\n    FT_UInt  glyphID;\n\n  } FT_PaintColrGlyph;\n\n\n  /**************************************************************************\n   *\n   * @struct:\n   *   FT_PaintTransform\n   *\n   * @description:\n   *   A structure representing a 'COLR' v1 `PaintTransform` paint table.\n   *\n   * @fields:\n   *   paint ::\n   *     An opaque paint that is subject to being transformed.\n   *\n   *   affine ::\n   *     A 2x3 transformation matrix in @FT_Affine23 format.\n   *\n   * @since:\n   *   2.11 -- **currently experimental only!**  There might be changes\n   *   without retaining backward compatibility of both the API and ABI.\n   *\n   */\n  typedef struct  FT_PaintTransform_\n  {\n    FT_OpaquePaint  paint;\n    FT_Affine23     affine;\n\n  } FT_PaintTransform;\n\n\n  /**************************************************************************\n   *\n   * @struct:\n   *   FT_PaintTranslate\n   *\n   * @description:\n   *   A structure representing a 'COLR' v1 `PaintTranslate` paint table.\n   *   Used for translating downstream paints by a given x and y~delta.\n   *\n   * @fields:\n   *   paint ::\n   *     An @FT_OpaquePaint object referencing the paint that is to be\n   *     rotated.\n   *\n   *   dx ::\n   *     Translation in x~direction (in font units).\n   *\n   *   dy ::\n   *     Translation in y~direction (in font units).\n   *\n   * @since:\n   *   2.11 -- **currently experimental only!**  There might be changes\n   *   without retaining backward compatibility of both the API and ABI.\n   *\n   */\n  typedef struct  FT_PaintTranslate_\n  {\n    FT_OpaquePaint  paint;\n\n    FT_Fixed  dx;\n    FT_Fixed  dy;\n\n  } FT_PaintTranslate;\n\n\n  /**************************************************************************\n   *\n   * @struct:\n   *   FT_PaintScale\n   *\n   * @description:\n   *   A structure representing all of the 'COLR' v1 'PaintScale*' paint\n   *   tables.  Used for scaling downstream paints by a given x and y~scale,\n   *   with a given center.  This structure is used for all 'PaintScale*'\n   *   types that are part of specification; fields of this structure are\n   *   filled accordingly.  If there is a center, the center values are set,\n   *   otherwise they are set to the zero coordinate.  If the source font\n   *   file has 'PaintScaleUniform*' set, the scale values are set\n   *   accordingly to the same value.\n   *\n   * @fields:\n   *   paint ::\n   *     An @FT_OpaquePaint object referencing the paint that is to be\n   *     scaled.\n   *\n   *   scale_x ::\n   *     Scale factor in x~direction.\n   *\n   *   scale_y ::\n   *     Scale factor in y~direction.\n   *\n   *   center_x ::\n   *     x~coordinate of center point to scale from.\n   *\n   *   center_y ::\n   *     y~coordinate of center point to scale from.\n   *\n   * @since:\n   *   2.11 -- **currently experimental only!**  There might be changes\n   *   without retaining backward-compatibility of both the API and ABI.\n   *\n   */\n  typedef struct  FT_PaintScale_\n  {\n    FT_OpaquePaint  paint;\n\n    FT_Fixed  scale_x;\n    FT_Fixed  scale_y;\n\n    FT_Fixed  center_x;\n    FT_Fixed  center_y;\n\n  } FT_PaintScale;\n\n\n  /**************************************************************************\n   *\n   * @struct:\n   *   FT_PaintRotate\n   *\n   * @description:\n   *   A structure representing a 'COLR' v1 `PaintRotate` paint table.  Used\n   *   for rotating downstream paints with a given center and angle.\n   *\n   * @fields:\n   *   paint ::\n   *     An @FT_OpaquePaint object referencing the paint that is to be\n   *     rotated.\n   *\n   *   angle ::\n   *     The rotation angle that is to be applied.\n   *\n   *   center_x ::\n   *     The x~coordinate of the pivot point of the rotation (in font\n   *     units).\n   *\n   *   center_y ::\n   *     The y~coordinate of the pivot point of the rotation (in font\n   *     units).\n   *\n   * @since:\n   *   2.11 -- **currently experimental only!**  There might be changes\n   *   without retaining backward compatibility of both the API and ABI.\n   *\n   */\n\n  typedef struct  FT_PaintRotate_\n  {\n    FT_OpaquePaint  paint;\n\n    FT_Fixed  angle;\n\n    FT_Fixed  center_x;\n    FT_Fixed  center_y;\n\n  } FT_PaintRotate;\n\n\n  /**************************************************************************\n   *\n   * @struct:\n   *   FT_PaintSkew\n   *\n   * @description:\n   *   A structure representing a 'COLR' v1 `PaintSkew` paint table.  Used\n   *   for skewing or shearing downstream paints by a given center and\n   *   angle.\n   *\n   * @fields:\n   *   paint ::\n   *     An @FT_OpaquePaint object referencing the paint that is to be\n   *     skewed.\n   *\n   *   x_skew_angle ::\n   *     The skewing angle in x~direction.\n   *\n   *   y_skew_angle ::\n   *     The skewing angle in y~direction.\n   *\n   *   center_x ::\n   *     The x~coordinate of the pivot point of the skew (in font units).\n   *\n   *   center_y ::\n   *     The y~coordinate of the pivot point of the skew (in font units).\n   *\n   * @since:\n   *   2.11 -- **currently experimental only!**  There might be changes\n   *   without retaining backward compatibility of both the API and ABI.\n   *\n   */\n  typedef struct  FT_PaintSkew_\n  {\n    FT_OpaquePaint  paint;\n\n    FT_Fixed  x_skew_angle;\n    FT_Fixed  y_skew_angle;\n\n    FT_Fixed  center_x;\n    FT_Fixed  center_y;\n\n  } FT_PaintSkew;\n\n\n  /**************************************************************************\n   *\n   * @struct:\n   *   FT_PaintComposite\n   *\n   * @description:\n   *   A structure representing a 'COLR'v1 `PaintComposite` paint table.\n   *   Used for compositing two paints in a 'COLR' v1 directed acycling\n   *   graph.\n   *\n   * @fields:\n   *   source_paint ::\n   *     An @FT_OpaquePaint object referencing the source that is to be\n   *     composited.\n   *\n   *   composite_mode ::\n   *     An @FT_Composite_Mode enum value determining the composition\n   *     operation.\n   *\n   *   backdrop_paint ::\n   *     An @FT_OpaquePaint object referencing the backdrop paint that\n   *     `source_paint` is composited onto.\n   *\n   * @since:\n   *   2.11 -- **currently experimental only!**  There might be changes\n   *   without retaining backward compatibility of both the API and ABI.\n   *\n   */\n  typedef struct  FT_PaintComposite_\n  {\n    FT_OpaquePaint     source_paint;\n    FT_Composite_Mode  composite_mode;\n    FT_OpaquePaint     backdrop_paint;\n\n  } FT_PaintComposite;\n\n\n  /**************************************************************************\n   *\n   * @union:\n   *   FT_COLR_Paint\n   *\n   * @description:\n   *   A union object representing format and details of a paint table of a\n   *   'COLR' v1 font, see\n   *   'https://github.com/googlefonts/colr-gradients-spec'.  Use\n   *   @FT_Get_Paint to retrieve a @FT_COLR_Paint for an @FT_OpaquePaint\n   *   object.\n   *\n   * @fields:\n   *   format ::\n   *     The gradient format for this Paint structure.\n   *\n   *   u ::\n   *     Union of all paint table types:\n   *\n   *       * @FT_PaintColrLayers\n   *       * @FT_PaintGlyph\n   *       * @FT_PaintSolid\n   *       * @FT_PaintLinearGradient\n   *       * @FT_PaintRadialGradient\n   *       * @FT_PaintSweepGradient\n   *       * @FT_PaintTransform\n   *       * @FT_PaintTranslate\n   *       * @FT_PaintRotate\n   *       * @FT_PaintSkew\n   *       * @FT_PaintComposite\n   *       * @FT_PaintColrGlyph\n   *\n   * @since:\n   *   2.11 -- **currently experimental only!**  There might be changes\n   *   without retaining backward compatibility of both the API and ABI.\n   *\n   */\n  typedef struct  FT_COLR_Paint_\n  {\n    FT_PaintFormat format;\n\n    union\n    {\n      FT_PaintColrLayers      colr_layers;\n      FT_PaintGlyph           glyph;\n      FT_PaintSolid           solid;\n      FT_PaintLinearGradient  linear_gradient;\n      FT_PaintRadialGradient  radial_gradient;\n      FT_PaintSweepGradient   sweep_gradient;\n      FT_PaintTransform       transform;\n      FT_PaintTranslate       translate;\n      FT_PaintScale           scale;\n      FT_PaintRotate          rotate;\n      FT_PaintSkew            skew;\n      FT_PaintComposite       composite;\n      FT_PaintColrGlyph       colr_glyph;\n\n    } u;\n\n  } FT_COLR_Paint;\n\n\n  /**************************************************************************\n   *\n   * @enum:\n   *   FT_Color_Root_Transform\n   *\n   * @description:\n   *   An enumeration to specify whether @FT_Get_Color_Glyph_Paint is to\n   *   return a root transform to configure the client's graphics context\n   *   matrix.\n   *\n   * @values:\n   *   FT_COLOR_INCLUDE_ROOT_TRANSFORM ::\n   *     Do include the root transform as the initial @FT_COLR_Paint object.\n   *\n   *   FT_COLOR_NO_ROOT_TRANSFORM ::\n   *     Do not output an initial root transform.\n   *\n   * @since:\n   *   2.11 -- **currently experimental only!**  There might be changes\n   *   without retaining backward compatibility of both the API and ABI.\n   *\n   */\n  typedef enum  FT_Color_Root_Transform_\n  {\n    FT_COLOR_INCLUDE_ROOT_TRANSFORM,\n    FT_COLOR_NO_ROOT_TRANSFORM,\n\n    FT_COLOR_ROOT_TRANSFORM_MAX\n\n  } FT_Color_Root_Transform;\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Get_Color_Glyph_Paint\n   *\n   * @description:\n   *   This is the starting point and interface to color gradient\n   *   information in a 'COLR' v1 table in OpenType fonts to recursively\n   *   retrieve the paint tables for the directed acyclic graph of a colored\n   *   glyph, given a glyph ID.\n   *\n   *     https://github.com/googlefonts/colr-gradients-spec\n   *\n   *   In a 'COLR' v1 font, each color glyph defines a directed acyclic\n   *   graph of nested paint tables, such as `PaintGlyph`, `PaintSolid`,\n   *   `PaintLinearGradient`, `PaintRadialGradient`, and so on.  Using this\n   *   function and specifying a glyph ID, one retrieves the root paint\n   *   table for this glyph ID.\n   *\n   *   This function allows control whether an initial root transform is\n   *   returned to configure scaling, transform, and translation correctly\n   *   on the client's graphics context.  The initial root transform is\n   *   computed and returned according to the values configured for @FT_Size\n   *   and @FT_Set_Transform on the @FT_Face object, see below for details\n   *   of the `root_transform` parameter.  This has implications for a\n   *   client 'COLR' v1 implementation: When this function returns an\n   *   initially computed root transform, at the time of executing the\n   *   @FT_PaintGlyph operation, the contours should be retrieved using\n   *   @FT_Load_Glyph at unscaled, untransformed size.  This is because the\n   *   root transform applied to the graphics context will take care of\n   *   correct scaling.\n   *\n   *   Alternatively, to allow hinting of contours, at the time of executing\n   *   @FT_Load_Glyph, the current graphics context transformation matrix\n   *   can be decomposed into a scaling matrix and a remainder, and\n   *   @FT_Load_Glyph can be used to retrieve the contours at scaled size.\n   *   Care must then be taken to blit or clip to the graphics context with\n   *   taking this remainder transformation into account.\n   *\n   * @input:\n   *   face ::\n   *     A handle to the parent face object.\n   *\n   *   base_glyph ::\n   *     The glyph index for which to retrieve the root paint table.\n   *\n   *   root_transform ::\n   *     Specifies whether an initially computed root is returned by the\n   *     @FT_PaintTransform operation to account for the activated size\n   *     (see @FT_Activate_Size) and the configured transform and translate\n   *     (see @FT_Set_Transform).\n   *\n   *     This root transform is returned before nodes of the glyph graph of\n   *     the font are returned.  Subsequent @FT_COLR_Paint structures\n   *     contain unscaled and untransformed values.  The inserted root\n   *     transform enables the client application to apply an initial\n   *     transform to its graphics context.  When executing subsequent\n   *     FT_COLR_Paint operations, values from @FT_COLR_Paint operations\n   *     will ultimately be correctly scaled because of the root transform\n   *     applied to the graphics context.  Use\n   *     @FT_COLOR_INCLUDE_ROOT_TRANSFORM to include the root transform, use\n   *     @FT_COLOR_NO_ROOT_TRANSFORM to not include it.  The latter may be\n   *     useful when traversing the 'COLR' v1 glyph graph and reaching a\n   *     @FT_PaintColrGlyph.  When recursing into @FT_PaintColrGlyph and\n   *     painting that inline, no additional root transform is needed as it\n   *     has already been applied to the graphics context at the beginning\n   *     of drawing this glyph.\n   *\n   * @output:\n   *   paint ::\n   *     The @FT_OpaquePaint object that references the actual paint table.\n   *\n   *     The respective actual @FT_COLR_Paint object is retrieved via\n   *     @FT_Get_Paint.\n   *\n   * @return:\n   *   Value~1 if everything is OK.  If no color glyph is found, or the root\n   *   paint could not be retrieved, value~0 gets returned.  In case of an\n   *   error, value~0 is returned also.\n   *\n   * @since:\n   *   2.11 -- **currently experimental only!**  There might be changes\n   *   without retaining backward compatibility of both the API and ABI.\n   *\n   */\n  FT_EXPORT( FT_Bool )\n  FT_Get_Color_Glyph_Paint( FT_Face                  face,\n                            FT_UInt                  base_glyph,\n                            FT_Color_Root_Transform  root_transform,\n                            FT_OpaquePaint*          paint );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Get_Paint_Layers\n   *\n   * @description:\n   *   Access the layers of a `PaintColrLayers` table.\n   *\n   *   If the root paint of a color glyph, or a nested paint of a 'COLR'\n   *   glyph is a `PaintColrLayers` table, this function retrieves the\n   *   layers of the `PaintColrLayers` table.\n   *\n   *   The @FT_PaintColrLayers object contains an @FT_LayerIterator, which\n   *   is used here to iterate over the layers.  Each layer is returned as\n   *   an @FT_OpaquePaint object, which then can be used with @FT_Get_Paint\n   *   to retrieve the actual paint object.\n   *\n   * @input:\n   *   face ::\n   *     A handle to the parent face object.\n   *\n   * @inout:\n   *   iterator ::\n   *     The @FT_LayerIterator from an @FT_PaintColrLayers object, for which\n   *     the layers are to be retrieved.  The internal state of the iterator\n   *     is incremented after one call to this function for retrieving one\n   *     layer.\n   *\n   * @output:\n   *   paint ::\n   *     The @FT_OpaquePaint object that references the actual paint table.\n   *     The respective actual @FT_COLR_Paint object is retrieved via\n   *     @FT_Get_Paint.\n   *\n   * @return:\n   *   Value~1 if everything is OK.  Value~0 gets returned when the paint\n   *   object can not be retrieved or any other error occurs.\n   *\n   * @since:\n   *   2.11 -- **currently experimental only!**  There might be changes\n   *   without retaining backward compatibility of both the API and ABI.\n   *\n   */\n  FT_EXPORT( FT_Bool )\n  FT_Get_Paint_Layers( FT_Face            face,\n                       FT_LayerIterator*  iterator,\n                       FT_OpaquePaint*    paint );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Get_Colorline_Stops\n   *\n   * @description:\n   *   This is an interface to color gradient information in a 'COLR' v1\n   *   table in OpenType fonts to iteratively retrieve the gradient and\n   *   solid fill information for colored glyph layers for a specified glyph\n   *   ID.\n   *\n   *     https://github.com/googlefonts/colr-gradients-spec\n   *\n   * @input:\n   *   face ::\n   *     A handle to the parent face object.\n   *\n   * @inout:\n   *   iterator ::\n   *     The retrieved @FT_ColorStopIterator, configured on an @FT_ColorLine,\n   *     which in turn got retrieved via paint information in\n   *     @FT_PaintLinearGradient or @FT_PaintRadialGradient.\n   *\n   * @output:\n   *   color_stop ::\n   *     Color index and alpha value for the retrieved color stop.\n   *\n   * @return:\n   *   Value~1 if everything is OK.  If there are no more color stops,\n   *   value~0 gets returned.  In case of an error, value~0 is returned\n   *   also.\n   *\n   * @since:\n   *   2.11 -- **currently experimental only!**  There might be changes\n   *   without retaining backward compatibility of both the API and ABI.\n   *\n   */\n  FT_EXPORT( FT_Bool )\n  FT_Get_Colorline_Stops( FT_Face                face,\n                          FT_ColorStop*          color_stop,\n                          FT_ColorStopIterator*  iterator );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *  FT_Get_Paint\n   *\n   * @description:\n   *   Access the details of a paint using an @FT_OpaquePaint opaque paint\n   *   object, which internally stores the offset to the respective `Paint`\n   *   object in the 'COLR' table.\n   *\n   * @input:\n   *   face ::\n   *     A handle to the parent face object.\n   *\n   *   opaque_paint ::\n   *     The opaque paint object for which the underlying @FT_COLR_Paint\n   *     data is to be retrieved.\n   *\n   * @output:\n   *   paint ::\n   *     The specific @FT_COLR_Paint object containing information coming\n   *     from one of the font's `Paint*` tables.\n   *\n   * @return:\n   *   Value~1 if everything is OK.  Value~0 if no details can be found for\n   *   this paint or any other error occured.\n   *\n   * @since:\n   *   2.11 -- **currently experimental only!**  There might be changes\n   *   without retaining backward compatibility of both the API and ABI.\n   *\n   */\n  FT_EXPORT( FT_Bool )\n  FT_Get_Paint( FT_Face         face,\n                FT_OpaquePaint  opaque_paint,\n                FT_COLR_Paint*  paint );\n\n  /* */\n\n\nFT_END_HEADER\n\n#endif /* FTCOLOR_H_ */\n\n\n/* END */\n"
  },
  {
    "path": "thirdparty/freetype/include/freetype2/freetype/ftdriver.h",
    "content": "/****************************************************************************\n *\n * ftdriver.h\n *\n *   FreeType API for controlling driver modules (specification only).\n *\n * Copyright (C) 2017-2021 by\n * David Turner, Robert Wilhelm, and Werner Lemberg.\n *\n * This file is part of the FreeType project, and may only be used,\n * modified, and distributed under the terms of the FreeType project\n * license, LICENSE.TXT.  By continuing to use, modify, or distribute\n * this file you indicate that you have read the license and\n * understand and accept it fully.\n *\n */\n\n\n#ifndef FTDRIVER_H_\n#define FTDRIVER_H_\n\n#include <freetype/freetype.h>\n#include <freetype/ftparams.h>\n\n#ifdef FREETYPE_H\n#error \"freetype.h of FreeType 1 has been loaded!\"\n#error \"Please fix the directory search order for header files\"\n#error \"so that freetype.h of FreeType 2 is found first.\"\n#endif\n\n\nFT_BEGIN_HEADER\n\n\n  /**************************************************************************\n   *\n   * @section:\n   *   auto_hinter\n   *\n   * @title:\n   *   The auto-hinter\n   *\n   * @abstract:\n   *   Controlling the auto-hinting module.\n   *\n   * @description:\n   *   While FreeType's auto-hinter doesn't expose API functions by itself,\n   *   it is possible to control its behaviour with @FT_Property_Set and\n   *   @FT_Property_Get.  The following lists the available properties\n   *   together with the necessary macros and structures.\n   *\n   *   Note that the auto-hinter's module name is 'autofitter' for historical\n   *   reasons.\n   *\n   *   Available properties are @increase-x-height, @no-stem-darkening\n   *   (experimental), @darkening-parameters (experimental),\n   *   @glyph-to-script-map (experimental), @fallback-script (experimental),\n   *   and @default-script (experimental), as documented in the @properties\n   *   section.\n   *\n   */\n\n\n  /**************************************************************************\n   *\n   * @section:\n   *   cff_driver\n   *\n   * @title:\n   *   The CFF driver\n   *\n   * @abstract:\n   *   Controlling the CFF driver module.\n   *\n   * @description:\n   *   While FreeType's CFF driver doesn't expose API functions by itself, it\n   *   is possible to control its behaviour with @FT_Property_Set and\n   *   @FT_Property_Get.\n   *\n   *   The CFF driver's module name is 'cff'.\n   *\n   *   Available properties are @hinting-engine, @no-stem-darkening,\n   *   @darkening-parameters, and @random-seed, as documented in the\n   *   @properties section.\n   *\n   *\n   *   **Hinting and anti-aliasing principles of the new engine**\n   *\n   *   The rasterizer is positioning horizontal features (e.g., ascender\n   *   height & x-height, or crossbars) on the pixel grid and minimizing the\n   *   amount of anti-aliasing applied to them, while placing vertical\n   *   features (vertical stems) on the pixel grid without hinting, thus\n   *   representing the stem position and weight accurately.  Sometimes the\n   *   vertical stems may be only partially black.  In this context,\n   *   'anti-aliasing' means that stems are not positioned exactly on pixel\n   *   borders, causing a fuzzy appearance.\n   *\n   *   There are two principles behind this approach.\n   *\n   *   1) No hinting in the horizontal direction: Unlike 'superhinted'\n   *   TrueType, which changes glyph widths to accommodate regular\n   *   inter-glyph spacing, Adobe's approach is 'faithful to the design' in\n   *   representing both the glyph width and the inter-glyph spacing designed\n   *   for the font.  This makes the screen display as close as it can be to\n   *   the result one would get with infinite resolution, while preserving\n   *   what is considered the key characteristics of each glyph.  Note that\n   *   the distances between unhinted and grid-fitted positions at small\n   *   sizes are comparable to kerning values and thus would be noticeable\n   *   (and distracting) while reading if hinting were applied.\n   *\n   *   One of the reasons to not hint horizontally is anti-aliasing for LCD\n   *   screens: The pixel geometry of modern displays supplies three vertical\n   *   subpixels as the eye moves horizontally across each visible pixel.  On\n   *   devices where we can be certain this characteristic is present a\n   *   rasterizer can take advantage of the subpixels to add increments of\n   *   weight.  In Western writing systems this turns out to be the more\n   *   critical direction anyway; the weights and spacing of vertical stems\n   *   (see above) are central to Armenian, Cyrillic, Greek, and Latin type\n   *   designs.  Even when the rasterizer uses greyscale anti-aliasing instead\n   *   of color (a necessary compromise when one doesn't know the screen\n   *   characteristics), the unhinted vertical features preserve the design's\n   *   weight and spacing much better than aliased type would.\n   *\n   *   2) Alignment in the vertical direction: Weights and spacing along the\n   *   y~axis are less critical; what is much more important is the visual\n   *   alignment of related features (like cap-height and x-height).  The\n   *   sense of alignment for these is enhanced by the sharpness of grid-fit\n   *   edges, while the cruder vertical resolution (full pixels instead of\n   *   1/3 pixels) is less of a problem.\n   *\n   *   On the technical side, horizontal alignment zones for ascender,\n   *   x-height, and other important height values (traditionally called\n   *   'blue zones') as defined in the font are positioned independently,\n   *   each being rounded to the nearest pixel edge, taking care of overshoot\n   *   suppression at small sizes, stem darkening, and scaling.\n   *\n   *   Hstems (this is, hint values defined in the font to help align\n   *   horizontal features) that fall within a blue zone are said to be\n   *   'captured' and are aligned to that zone.  Uncaptured stems are moved\n   *   in one of four ways, top edge up or down, bottom edge up or down.\n   *   Unless there are conflicting hstems, the smallest movement is taken to\n   *   minimize distortion.\n   *\n   */\n\n\n  /**************************************************************************\n   *\n   * @section:\n   *   pcf_driver\n   *\n   * @title:\n   *   The PCF driver\n   *\n   * @abstract:\n   *   Controlling the PCF driver module.\n   *\n   * @description:\n   *   While FreeType's PCF driver doesn't expose API functions by itself, it\n   *   is possible to control its behaviour with @FT_Property_Set and\n   *   @FT_Property_Get.  Right now, there is a single property\n   *   @no-long-family-names available if FreeType is compiled with\n   *   PCF_CONFIG_OPTION_LONG_FAMILY_NAMES.\n   *\n   *   The PCF driver's module name is 'pcf'.\n   *\n   */\n\n\n  /**************************************************************************\n   *\n   * @section:\n   *   t1_cid_driver\n   *\n   * @title:\n   *   The Type 1 and CID drivers\n   *\n   * @abstract:\n   *   Controlling the Type~1 and CID driver modules.\n   *\n   * @description:\n   *   It is possible to control the behaviour of FreeType's Type~1 and\n   *   Type~1 CID drivers with @FT_Property_Set and @FT_Property_Get.\n   *\n   *   Behind the scenes, both drivers use the Adobe CFF engine for hinting;\n   *   however, the used properties must be specified separately.\n   *\n   *   The Type~1 driver's module name is 'type1'; the CID driver's module\n   *   name is 't1cid'.\n   *\n   *   Available properties are @hinting-engine, @no-stem-darkening,\n   *   @darkening-parameters, and @random-seed, as documented in the\n   *   @properties section.\n   *\n   *   Please see the @cff_driver section for more details on the new hinting\n   *   engine.\n   *\n   */\n\n\n  /**************************************************************************\n   *\n   * @section:\n   *   tt_driver\n   *\n   * @title:\n   *   The TrueType driver\n   *\n   * @abstract:\n   *   Controlling the TrueType driver module.\n   *\n   * @description:\n   *   While FreeType's TrueType driver doesn't expose API functions by\n   *   itself, it is possible to control its behaviour with @FT_Property_Set\n   *   and @FT_Property_Get.  The following lists the available properties\n   *   together with the necessary macros and structures.\n   *\n   *   The TrueType driver's module name is 'truetype'.\n   *\n   *   A single property @interpreter-version is available, as documented in\n   *   the @properties section.\n   *\n   *   We start with a list of definitions, kindly provided by Greg\n   *   Hitchcock.\n   *\n   *   _Bi-Level Rendering_\n   *\n   *   Monochromatic rendering, exclusively used in the early days of\n   *   TrueType by both Apple and Microsoft.  Microsoft's GDI interface\n   *   supported hinting of the right-side bearing point, such that the\n   *   advance width could be non-linear.  Most often this was done to\n   *   achieve some level of glyph symmetry.  To enable reasonable\n   *   performance (e.g., not having to run hinting on all glyphs just to get\n   *   the widths) there was a bit in the head table indicating if the side\n   *   bearing was hinted, and additional tables, 'hdmx' and 'LTSH', to cache\n   *   hinting widths across multiple sizes and device aspect ratios.\n   *\n   *   _Font Smoothing_\n   *\n   *   Microsoft's GDI implementation of anti-aliasing.  Not traditional\n   *   anti-aliasing as the outlines were hinted before the sampling.  The\n   *   widths matched the bi-level rendering.\n   *\n   *   _ClearType Rendering_\n   *\n   *   Technique that uses physical subpixels to improve rendering on LCD\n   *   (and other) displays.  Because of the higher resolution, many methods\n   *   of improving symmetry in glyphs through hinting the right-side bearing\n   *   were no longer necessary.  This lead to what GDI calls 'natural\n   *   widths' ClearType, see\n   *   http://rastertragedy.com/RTRCh4.htm#Sec21.  Since hinting\n   *   has extra resolution, most non-linearity went away, but it is still\n   *   possible for hints to change the advance widths in this mode.\n   *\n   *   _ClearType Compatible Widths_\n   *\n   *   One of the earliest challenges with ClearType was allowing the\n   *   implementation in GDI to be selected without requiring all UI and\n   *   documents to reflow.  To address this, a compatible method of\n   *   rendering ClearType was added where the font hints are executed once\n   *   to determine the width in bi-level rendering, and then re-run in\n   *   ClearType, with the difference in widths being absorbed in the font\n   *   hints for ClearType (mostly in the white space of hints); see\n   *   http://rastertragedy.com/RTRCh4.htm#Sec20.  Somewhat by\n   *   definition, compatible width ClearType allows for non-linear widths,\n   *   but only when the bi-level version has non-linear widths.\n   *\n   *   _ClearType Subpixel Positioning_\n   *\n   *   One of the nice benefits of ClearType is the ability to more crisply\n   *   display fractional widths; unfortunately, the GDI model of integer\n   *   bitmaps did not support this.  However, the WPF and Direct Write\n   *   frameworks do support fractional widths.  DWrite calls this 'natural\n   *   mode', not to be confused with GDI's 'natural widths'.  Subpixel\n   *   positioning, in the current implementation of Direct Write,\n   *   unfortunately does not support hinted advance widths, see\n   *   http://rastertragedy.com/RTRCh4.htm#Sec22.  Note that the\n   *   TrueType interpreter fully allows the advance width to be adjusted in\n   *   this mode, just the DWrite client will ignore those changes.\n   *\n   *   _ClearType Backward Compatibility_\n   *\n   *   This is a set of exceptions made in the TrueType interpreter to\n   *   minimize hinting techniques that were problematic with the extra\n   *   resolution of ClearType; see\n   *   http://rastertragedy.com/RTRCh4.htm#Sec1 and\n   *   https://www.microsoft.com/typography/cleartype/truetypecleartype.aspx.\n   *   This technique is not to be confused with ClearType compatible widths.\n   *   ClearType backward compatibility has no direct impact on changing\n   *   advance widths, but there might be an indirect impact on disabling\n   *   some deltas.  This could be worked around in backward compatibility\n   *   mode.\n   *\n   *   _Native ClearType Mode_\n   *\n   *   (Not to be confused with 'natural widths'.)  This mode removes all the\n   *   exceptions in the TrueType interpreter when running with ClearType.\n   *   Any issues on widths would still apply, though.\n   *\n   */\n\n\n  /**************************************************************************\n   *\n   * @section:\n   *   properties\n   *\n   * @title:\n   *   Driver properties\n   *\n   * @abstract:\n   *   Controlling driver modules.\n   *\n   * @description:\n   *   Driver modules can be controlled by setting and unsetting properties,\n   *   using the functions @FT_Property_Set and @FT_Property_Get.  This\n   *   section documents the available properties, together with auxiliary\n   *   macros and structures.\n   *\n   */\n\n\n  /**************************************************************************\n   *\n   * @enum:\n   *   FT_HINTING_XXX\n   *\n   * @description:\n   *   A list of constants used for the @hinting-engine property to select\n   *   the hinting engine for CFF, Type~1, and CID fonts.\n   *\n   * @values:\n   *   FT_HINTING_FREETYPE ::\n   *     Use the old FreeType hinting engine.\n   *\n   *   FT_HINTING_ADOBE ::\n   *     Use the hinting engine contributed by Adobe.\n   *\n   * @since:\n   *   2.9\n   *\n   */\n#define FT_HINTING_FREETYPE  0\n#define FT_HINTING_ADOBE     1\n\n  /* these constants (introduced in 2.4.12) are deprecated */\n#define FT_CFF_HINTING_FREETYPE  FT_HINTING_FREETYPE\n#define FT_CFF_HINTING_ADOBE     FT_HINTING_ADOBE\n\n\n  /**************************************************************************\n   *\n   * @property:\n   *   hinting-engine\n   *\n   * @description:\n   *   Thanks to Adobe, which contributed a new hinting (and parsing) engine,\n   *   an application can select between 'freetype' and 'adobe' if compiled\n   *   with `CFF_CONFIG_OPTION_OLD_ENGINE`.  If this configuration macro\n   *   isn't defined, 'hinting-engine' does nothing.\n   *\n   *   The same holds for the Type~1 and CID modules if compiled with\n   *   `T1_CONFIG_OPTION_OLD_ENGINE`.\n   *\n   *   For the 'cff' module, the default engine is 'adobe'.  For both the\n   *   'type1' and 't1cid' modules, the default engine is 'adobe', too.\n   *\n   * @note:\n   *   This property can be used with @FT_Property_Get also.\n   *\n   *   This property can be set via the `FREETYPE_PROPERTIES` environment\n   *   variable (using values 'adobe' or 'freetype').\n   *\n   * @example:\n   *   The following example code demonstrates how to select Adobe's hinting\n   *   engine for the 'cff' module (omitting the error handling).\n   *\n   *   ```\n   *     FT_Library  library;\n   *     FT_UInt     hinting_engine = FT_HINTING_ADOBE;\n   *\n   *\n   *     FT_Init_FreeType( &library );\n   *\n   *     FT_Property_Set( library, \"cff\",\n   *                               \"hinting-engine\", &hinting_engine );\n   *   ```\n   *\n   * @since:\n   *   2.4.12 (for 'cff' module)\n   *\n   *   2.9 (for 'type1' and 't1cid' modules)\n   *\n   */\n\n\n  /**************************************************************************\n   *\n   * @property:\n   *   no-stem-darkening\n   *\n   * @description:\n   *   All glyphs that pass through the auto-hinter will be emboldened unless\n   *   this property is set to TRUE.  The same is true for the CFF, Type~1,\n   *   and CID font modules if the 'Adobe' engine is selected (which is the\n   *   default).\n   *\n   *   Stem darkening emboldens glyphs at smaller sizes to make them more\n   *   readable on common low-DPI screens when using linear alpha blending\n   *   and gamma correction, see @FT_Render_Glyph.  When not using linear\n   *   alpha blending and gamma correction, glyphs will appear heavy and\n   *   fuzzy!\n   *\n   *   Gamma correction essentially lightens fonts since shades of grey are\n   *   shifted to higher pixel values (=~higher brightness) to match the\n   *   original intention to the reality of our screens.  The side-effect is\n   *   that glyphs 'thin out'.  Mac OS~X and Adobe's proprietary font\n   *   rendering library implement a counter-measure: stem darkening at\n   *   smaller sizes where shades of gray dominate.  By emboldening a glyph\n   *   slightly in relation to its pixel size, individual pixels get higher\n   *   coverage of filled-in outlines and are therefore 'blacker'.  This\n   *   counteracts the 'thinning out' of glyphs, making text remain readable\n   *   at smaller sizes.\n   *\n   *   For the auto-hinter, stem-darkening is experimental currently and thus\n   *   switched off by default (this is, `no-stem-darkening` is set to TRUE\n   *   by default).  Total consistency with the CFF driver is not achieved\n   *   right now because the emboldening method differs and glyphs must be\n   *   scaled down on the Y-axis to keep outline points inside their\n   *   precomputed blue zones.  The smaller the size (especially 9ppem and\n   *   down), the higher the loss of emboldening versus the CFF driver.\n   *\n   *   Note that stem darkening is never applied if @FT_LOAD_NO_SCALE is set.\n   *\n   * @note:\n   *   This property can be used with @FT_Property_Get also.\n   *\n   *   This property can be set via the `FREETYPE_PROPERTIES` environment\n   *   variable (using values 1 and 0 for 'on' and 'off', respectively).  It\n   *   can also be set per face using @FT_Face_Properties with\n   *   @FT_PARAM_TAG_STEM_DARKENING.\n   *\n   * @example:\n   *   ```\n   *     FT_Library  library;\n   *     FT_Bool     no_stem_darkening = TRUE;\n   *\n   *\n   *     FT_Init_FreeType( &library );\n   *\n   *     FT_Property_Set( library, \"cff\",\n   *                               \"no-stem-darkening\", &no_stem_darkening );\n   *   ```\n   *\n   * @since:\n   *   2.4.12 (for 'cff' module)\n   *\n   *   2.6.2 (for 'autofitter' module)\n   *\n   *   2.9 (for 'type1' and 't1cid' modules)\n   *\n   */\n\n\n  /**************************************************************************\n   *\n   * @property:\n   *   darkening-parameters\n   *\n   * @description:\n   *   By default, the Adobe hinting engine, as used by the CFF, Type~1, and\n   *   CID font drivers, darkens stems as follows (if the `no-stem-darkening`\n   *   property isn't set):\n   *\n   *   ```\n   *     stem width <= 0.5px:   darkening amount = 0.4px\n   *     stem width  = 1px:     darkening amount = 0.275px\n   *     stem width  = 1.667px: darkening amount = 0.275px\n   *     stem width >= 2.333px: darkening amount = 0px\n   *   ```\n   *\n   *   and piecewise linear in-between.  At configuration time, these four\n   *   control points can be set with the macro\n   *   `CFF_CONFIG_OPTION_DARKENING_PARAMETERS`; the CFF, Type~1, and CID\n   *   drivers share these values.  At runtime, the control points can be\n   *   changed using the `darkening-parameters` property (see the example\n   *   below that demonstrates this for the Type~1 driver).\n   *\n   *   The x~values give the stem width, and the y~values the darkening\n   *   amount.  The unit is 1000th of pixels.  All coordinate values must be\n   *   positive; the x~values must be monotonically increasing; the y~values\n   *   must be monotonically decreasing and smaller than or equal to 500\n   *   (corresponding to half a pixel); the slope of each linear piece must\n   *   be shallower than -1 (e.g., -.4).\n   *\n   *   The auto-hinter provides this property, too, as an experimental\n   *   feature.  See @no-stem-darkening for more.\n   *\n   * @note:\n   *   This property can be used with @FT_Property_Get also.\n   *\n   *   This property can be set via the `FREETYPE_PROPERTIES` environment\n   *   variable, using eight comma-separated integers without spaces.  Here\n   *   the above example, using `\\` to break the line for readability.\n   *\n   *   ```\n   *     FREETYPE_PROPERTIES=\\\n   *     type1:darkening-parameters=500,300,1000,200,1500,100,2000,0\n   *   ```\n   *\n   * @example:\n   *   ```\n   *     FT_Library  library;\n   *     FT_Int      darken_params[8] = {  500, 300,   // x1, y1\n   *                                      1000, 200,   // x2, y2\n   *                                      1500, 100,   // x3, y3\n   *                                      2000,   0 }; // x4, y4\n   *\n   *\n   *     FT_Init_FreeType( &library );\n   *\n   *     FT_Property_Set( library, \"type1\",\n   *                               \"darkening-parameters\", darken_params );\n   *   ```\n   *\n   * @since:\n   *   2.5.1 (for 'cff' module)\n   *\n   *   2.6.2 (for 'autofitter' module)\n   *\n   *   2.9 (for 'type1' and 't1cid' modules)\n   *\n   */\n\n\n  /**************************************************************************\n   *\n   * @property:\n   *   random-seed\n   *\n   * @description:\n   *   By default, the seed value for the CFF 'random' operator and the\n   *   similar '0 28 callothersubr pop' command for the Type~1 and CID\n   *   drivers is set to a random value.  However, mainly for debugging\n   *   purposes, it is often necessary to use a known value as a seed so that\n   *   the pseudo-random number sequences generated by 'random' are\n   *   repeatable.\n   *\n   *   The `random-seed` property does that.  Its argument is a signed 32bit\n   *   integer; if the value is zero or negative, the seed given by the\n   *   `intitialRandomSeed` private DICT operator in a CFF file gets used (or\n   *   a default value if there is no such operator).  If the value is\n   *   positive, use it instead of `initialRandomSeed`, which is consequently\n   *   ignored.\n   *\n   * @note:\n   *   This property can be set via the `FREETYPE_PROPERTIES` environment\n   *   variable.  It can also be set per face using @FT_Face_Properties with\n   *   @FT_PARAM_TAG_RANDOM_SEED.\n   *\n   * @since:\n   *   2.8 (for 'cff' module)\n   *\n   *   2.9 (for 'type1' and 't1cid' modules)\n   *\n   */\n\n\n  /**************************************************************************\n   *\n   * @property:\n   *   no-long-family-names\n   *\n   * @description:\n   *   If `PCF_CONFIG_OPTION_LONG_FAMILY_NAMES` is active while compiling\n   *   FreeType, the PCF driver constructs long family names.\n   *\n   *   There are many PCF fonts just called 'Fixed' which look completely\n   *   different, and which have nothing to do with each other.  When\n   *   selecting 'Fixed' in KDE or Gnome one gets results that appear rather\n   *   random, the style changes often if one changes the size and one cannot\n   *   select some fonts at all.  The improve this situation, the PCF module\n   *   prepends the foundry name (plus a space) to the family name.  It also\n   *   checks whether there are 'wide' characters; all put together, family\n   *   names like 'Sony Fixed' or 'Misc Fixed Wide' are constructed.\n   *\n   *   If `no-long-family-names` is set, this feature gets switched off.\n   *\n   * @note:\n   *   This property can be used with @FT_Property_Get also.\n   *\n   *   This property can be set via the `FREETYPE_PROPERTIES` environment\n   *   variable (using values 1 and 0 for 'on' and 'off', respectively).\n   *\n   * @example:\n   *   ```\n   *     FT_Library  library;\n   *     FT_Bool     no_long_family_names = TRUE;\n   *\n   *\n   *     FT_Init_FreeType( &library );\n   *\n   *     FT_Property_Set( library, \"pcf\",\n   *                               \"no-long-family-names\",\n   *                               &no_long_family_names );\n   *   ```\n   *\n   * @since:\n   *   2.8\n   */\n\n\n  /**************************************************************************\n   *\n   * @enum:\n   *   TT_INTERPRETER_VERSION_XXX\n   *\n   * @description:\n   *   A list of constants used for the @interpreter-version property to\n   *   select the hinting engine for Truetype fonts.\n   *\n   *   The numeric value in the constant names represents the version number\n   *   as returned by the 'GETINFO' bytecode instruction.\n   *\n   * @values:\n   *   TT_INTERPRETER_VERSION_35 ::\n   *     Version~35 corresponds to MS rasterizer v.1.7 as used e.g. in\n   *     Windows~98; only grayscale and B/W rasterizing is supported.\n   *\n   *   TT_INTERPRETER_VERSION_38 ::\n   *     Version~38 corresponds to MS rasterizer v.1.9; it is roughly\n   *     equivalent to the hinting provided by DirectWrite ClearType (as can\n   *     be found, for example, in the Internet Explorer~9 running on\n   *     Windows~7).  It is used in FreeType to select the 'Infinality'\n   *     subpixel hinting code.  The code may be removed in a future version.\n   *\n   *   TT_INTERPRETER_VERSION_40 ::\n   *     Version~40 corresponds to MS rasterizer v.2.1; it is roughly\n   *     equivalent to the hinting provided by DirectWrite ClearType (as can\n   *     be found, for example, in Microsoft's Edge Browser on Windows~10).\n   *     It is used in FreeType to select the 'minimal' subpixel hinting\n   *     code, a stripped-down and higher performance version of the\n   *     'Infinality' code.\n   *\n   * @note:\n   *   This property controls the behaviour of the bytecode interpreter and\n   *   thus how outlines get hinted.  It does **not** control how glyph get\n   *   rasterized!  In particular, it does not control subpixel color\n   *   filtering.\n   *\n   *   If FreeType has not been compiled with the configuration option\n   *   `TT_CONFIG_OPTION_SUBPIXEL_HINTING`, selecting version~38 or~40 causes\n   *   an `FT_Err_Unimplemented_Feature` error.\n   *\n   *   Depending on the graphics framework, Microsoft uses different bytecode\n   *   and rendering engines.  As a consequence, the version numbers returned\n   *   by a call to the 'GETINFO' bytecode instruction are more convoluted\n   *   than desired.\n   *\n   *   Here are two tables that try to shed some light on the possible values\n   *   for the MS rasterizer engine, together with the additional features\n   *   introduced by it.\n   *\n   *   ```\n   *     GETINFO framework               version feature\n   *     -------------------------------------------------------------------\n   *         3   GDI (Win 3.1),            v1.0  16-bit, first version\n   *             TrueImage\n   *        33   GDI (Win NT 3.1),         v1.5  32-bit\n   *             HP Laserjet\n   *        34   GDI (Win 95)              v1.6  font smoothing,\n   *                                             new SCANTYPE opcode\n   *        35   GDI (Win 98/2000)         v1.7  (UN)SCALED_COMPONENT_OFFSET\n   *                                               bits in composite glyphs\n   *        36   MGDI (Win CE 2)           v1.6+ classic ClearType\n   *        37   GDI (XP and later),       v1.8  ClearType\n   *             GDI+ old (before Vista)\n   *        38   GDI+ old (Vista, Win 7),  v1.9  subpixel ClearType,\n   *             WPF                             Y-direction ClearType,\n   *                                             additional error checking\n   *        39   DWrite (before Win 8)     v2.0  subpixel ClearType flags\n   *                                               in GETINFO opcode,\n   *                                             bug fixes\n   *        40   GDI+ (after Win 7),       v2.1  Y-direction ClearType flag\n   *             DWrite (Win 8)                    in GETINFO opcode,\n   *                                             Gray ClearType\n   *   ```\n   *\n   *   The 'version' field gives a rough orientation only, since some\n   *   applications provided certain features much earlier (as an example,\n   *   Microsoft Reader used subpixel and Y-direction ClearType already in\n   *   Windows 2000).  Similarly, updates to a given framework might include\n   *   improved hinting support.\n   *\n   *   ```\n   *      version   sampling          rendering        comment\n   *               x        y       x           y\n   *     --------------------------------------------------------------\n   *       v1.0   normal  normal  B/W           B/W    bi-level\n   *       v1.6   high    high    gray          gray   grayscale\n   *       v1.8   high    normal  color-filter  B/W    (GDI) ClearType\n   *       v1.9   high    high    color-filter  gray   Color ClearType\n   *       v2.1   high    normal  gray          B/W    Gray ClearType\n   *       v2.1   high    high    gray          gray   Gray ClearType\n   *   ```\n   *\n   *   Color and Gray ClearType are the two available variants of\n   *   'Y-direction ClearType', meaning grayscale rasterization along the\n   *   Y-direction; the name used in the TrueType specification for this\n   *   feature is 'symmetric smoothing'.  'Classic ClearType' is the original\n   *   algorithm used before introducing a modified version in Win~XP.\n   *   Another name for v1.6's grayscale rendering is 'font smoothing', and\n   *   'Color ClearType' is sometimes also called 'DWrite ClearType'.  To\n   *   differentiate between today's Color ClearType and the earlier\n   *   ClearType variant with B/W rendering along the vertical axis, the\n   *   latter is sometimes called 'GDI ClearType'.\n   *\n   *   'Normal' and 'high' sampling describe the (virtual) resolution to\n   *   access the rasterized outline after the hinting process.  'Normal'\n   *   means 1 sample per grid line (i.e., B/W).  In the current Microsoft\n   *   implementation, 'high' means an extra virtual resolution of 16x16 (or\n   *   16x1) grid lines per pixel for bytecode instructions like 'MIRP'.\n   *   After hinting, these 16 grid lines are mapped to 6x5 (or 6x1) grid\n   *   lines for color filtering if Color ClearType is activated.\n   *\n   *   Note that 'Gray ClearType' is essentially the same as v1.6's grayscale\n   *   rendering.  However, the GETINFO instruction handles it differently:\n   *   v1.6 returns bit~12 (hinting for grayscale), while v2.1 returns\n   *   bits~13 (hinting for ClearType), 18 (symmetrical smoothing), and~19\n   *   (Gray ClearType).  Also, this mode respects bits 2 and~3 for the\n   *   version~1 gasp table exclusively (like Color ClearType), while v1.6\n   *   only respects the values of version~0 (bits 0 and~1).\n   *\n   *   Keep in mind that the features of the above interpreter versions might\n   *   not map exactly to FreeType features or behavior because it is a\n   *   fundamentally different library with different internals.\n   *\n   */\n#define TT_INTERPRETER_VERSION_35  35\n#define TT_INTERPRETER_VERSION_38  38\n#define TT_INTERPRETER_VERSION_40  40\n\n\n  /**************************************************************************\n   *\n   * @property:\n   *   interpreter-version\n   *\n   * @description:\n   *   Currently, three versions are available, two representing the bytecode\n   *   interpreter with subpixel hinting support (old 'Infinality' code and\n   *   new stripped-down and higher performance 'minimal' code) and one\n   *   without, respectively.  The default is subpixel support if\n   *   `TT_CONFIG_OPTION_SUBPIXEL_HINTING` is defined, and no subpixel\n   *   support otherwise (since it isn't available then).\n   *\n   *   If subpixel hinting is on, many TrueType bytecode instructions behave\n   *   differently compared to B/W or grayscale rendering (except if 'native\n   *   ClearType' is selected by the font).  Microsoft's main idea is to\n   *   render at a much increased horizontal resolution, then sampling down\n   *   the created output to subpixel precision.  However, many older fonts\n   *   are not suited to this and must be specially taken care of by applying\n   *   (hardcoded) tweaks in Microsoft's interpreter.\n   *\n   *   Details on subpixel hinting and some of the necessary tweaks can be\n   *   found in Greg Hitchcock's whitepaper at\n   *   'https://www.microsoft.com/typography/cleartype/truetypecleartype.aspx'.\n   *   Note that FreeType currently doesn't really 'subpixel hint' (6x1, 6x2,\n   *   or 6x5 supersampling) like discussed in the paper.  Depending on the\n   *   chosen interpreter, it simply ignores instructions on vertical stems\n   *   to arrive at very similar results.\n   *\n   * @note:\n   *   This property can be used with @FT_Property_Get also.\n   *\n   *   This property can be set via the `FREETYPE_PROPERTIES` environment\n   *   variable (using values '35', '38', or '40').\n   *\n   * @example:\n   *   The following example code demonstrates how to deactivate subpixel\n   *   hinting (omitting the error handling).\n   *\n   *   ```\n   *     FT_Library  library;\n   *     FT_Face     face;\n   *     FT_UInt     interpreter_version = TT_INTERPRETER_VERSION_35;\n   *\n   *\n   *     FT_Init_FreeType( &library );\n   *\n   *     FT_Property_Set( library, \"truetype\",\n   *                               \"interpreter-version\",\n   *                               &interpreter_version );\n   *   ```\n   *\n   * @since:\n   *   2.5\n   */\n\n\n  /**************************************************************************\n   *\n   * @property:\n   *   glyph-to-script-map\n   *\n   * @description:\n   *   **Experimental only**\n   *\n   *   The auto-hinter provides various script modules to hint glyphs.\n   *   Examples of supported scripts are Latin or CJK.  Before a glyph is\n   *   auto-hinted, the Unicode character map of the font gets examined, and\n   *   the script is then determined based on Unicode character ranges, see\n   *   below.\n   *\n   *   OpenType fonts, however, often provide much more glyphs than character\n   *   codes (small caps, superscripts, ligatures, swashes, etc.), to be\n   *   controlled by so-called 'features'.  Handling OpenType features can be\n   *   quite complicated and thus needs a separate library on top of\n   *   FreeType.\n   *\n   *   The mapping between glyph indices and scripts (in the auto-hinter\n   *   sense, see the @FT_AUTOHINTER_SCRIPT_XXX values) is stored as an array\n   *   with `num_glyphs` elements, as found in the font's @FT_Face structure.\n   *   The `glyph-to-script-map` property returns a pointer to this array,\n   *   which can be modified as needed.  Note that the modification should\n   *   happen before the first glyph gets processed by the auto-hinter so\n   *   that the global analysis of the font shapes actually uses the modified\n   *   mapping.\n   *\n   * @example:\n   *   The following example code demonstrates how to access it (omitting the\n   *   error handling).\n   *\n   *   ```\n   *     FT_Library                library;\n   *     FT_Face                   face;\n   *     FT_Prop_GlyphToScriptMap  prop;\n   *\n   *\n   *     FT_Init_FreeType( &library );\n   *     FT_New_Face( library, \"foo.ttf\", 0, &face );\n   *\n   *     prop.face = face;\n   *\n   *     FT_Property_Get( library, \"autofitter\",\n   *                               \"glyph-to-script-map\", &prop );\n   *\n   *     // adjust `prop.map' as needed right here\n   *\n   *     FT_Load_Glyph( face, ..., FT_LOAD_FORCE_AUTOHINT );\n   *   ```\n   *\n   * @since:\n   *   2.4.11\n   *\n   */\n\n\n  /**************************************************************************\n   *\n   * @enum:\n   *   FT_AUTOHINTER_SCRIPT_XXX\n   *\n   * @description:\n   *   **Experimental only**\n   *\n   *   A list of constants used for the @glyph-to-script-map property to\n   *   specify the script submodule the auto-hinter should use for hinting a\n   *   particular glyph.\n   *\n   * @values:\n   *   FT_AUTOHINTER_SCRIPT_NONE ::\n   *     Don't auto-hint this glyph.\n   *\n   *   FT_AUTOHINTER_SCRIPT_LATIN ::\n   *     Apply the latin auto-hinter.  For the auto-hinter, 'latin' is a very\n   *     broad term, including Cyrillic and Greek also since characters from\n   *     those scripts share the same design constraints.\n   *\n   *     By default, characters from the following Unicode ranges are\n   *     assigned to this submodule.\n   *\n   *     ```\n   *       U+0020 - U+007F  // Basic Latin (no control characters)\n   *       U+00A0 - U+00FF  // Latin-1 Supplement (no control characters)\n   *       U+0100 - U+017F  // Latin Extended-A\n   *       U+0180 - U+024F  // Latin Extended-B\n   *       U+0250 - U+02AF  // IPA Extensions\n   *       U+02B0 - U+02FF  // Spacing Modifier Letters\n   *       U+0300 - U+036F  // Combining Diacritical Marks\n   *       U+0370 - U+03FF  // Greek and Coptic\n   *       U+0400 - U+04FF  // Cyrillic\n   *       U+0500 - U+052F  // Cyrillic Supplement\n   *       U+1D00 - U+1D7F  // Phonetic Extensions\n   *       U+1D80 - U+1DBF  // Phonetic Extensions Supplement\n   *       U+1DC0 - U+1DFF  // Combining Diacritical Marks Supplement\n   *       U+1E00 - U+1EFF  // Latin Extended Additional\n   *       U+1F00 - U+1FFF  // Greek Extended\n   *       U+2000 - U+206F  // General Punctuation\n   *       U+2070 - U+209F  // Superscripts and Subscripts\n   *       U+20A0 - U+20CF  // Currency Symbols\n   *       U+2150 - U+218F  // Number Forms\n   *       U+2460 - U+24FF  // Enclosed Alphanumerics\n   *       U+2C60 - U+2C7F  // Latin Extended-C\n   *       U+2DE0 - U+2DFF  // Cyrillic Extended-A\n   *       U+2E00 - U+2E7F  // Supplemental Punctuation\n   *       U+A640 - U+A69F  // Cyrillic Extended-B\n   *       U+A720 - U+A7FF  // Latin Extended-D\n   *       U+FB00 - U+FB06  // Alphab. Present. Forms (Latin Ligatures)\n   *      U+1D400 - U+1D7FF // Mathematical Alphanumeric Symbols\n   *      U+1F100 - U+1F1FF // Enclosed Alphanumeric Supplement\n   *     ```\n   *\n   *   FT_AUTOHINTER_SCRIPT_CJK ::\n   *     Apply the CJK auto-hinter, covering Chinese, Japanese, Korean, old\n   *     Vietnamese, and some other scripts.\n   *\n   *     By default, characters from the following Unicode ranges are\n   *     assigned to this submodule.\n   *\n   *     ```\n   *       U+1100 - U+11FF  // Hangul Jamo\n   *       U+2E80 - U+2EFF  // CJK Radicals Supplement\n   *       U+2F00 - U+2FDF  // Kangxi Radicals\n   *       U+2FF0 - U+2FFF  // Ideographic Description Characters\n   *       U+3000 - U+303F  // CJK Symbols and Punctuation\n   *       U+3040 - U+309F  // Hiragana\n   *       U+30A0 - U+30FF  // Katakana\n   *       U+3100 - U+312F  // Bopomofo\n   *       U+3130 - U+318F  // Hangul Compatibility Jamo\n   *       U+3190 - U+319F  // Kanbun\n   *       U+31A0 - U+31BF  // Bopomofo Extended\n   *       U+31C0 - U+31EF  // CJK Strokes\n   *       U+31F0 - U+31FF  // Katakana Phonetic Extensions\n   *       U+3200 - U+32FF  // Enclosed CJK Letters and Months\n   *       U+3300 - U+33FF  // CJK Compatibility\n   *       U+3400 - U+4DBF  // CJK Unified Ideographs Extension A\n   *       U+4DC0 - U+4DFF  // Yijing Hexagram Symbols\n   *       U+4E00 - U+9FFF  // CJK Unified Ideographs\n   *       U+A960 - U+A97F  // Hangul Jamo Extended-A\n   *       U+AC00 - U+D7AF  // Hangul Syllables\n   *       U+D7B0 - U+D7FF  // Hangul Jamo Extended-B\n   *       U+F900 - U+FAFF  // CJK Compatibility Ideographs\n   *       U+FE10 - U+FE1F  // Vertical forms\n   *       U+FE30 - U+FE4F  // CJK Compatibility Forms\n   *       U+FF00 - U+FFEF  // Halfwidth and Fullwidth Forms\n   *      U+1B000 - U+1B0FF // Kana Supplement\n   *      U+1D300 - U+1D35F // Tai Xuan Hing Symbols\n   *      U+1F200 - U+1F2FF // Enclosed Ideographic Supplement\n   *      U+20000 - U+2A6DF // CJK Unified Ideographs Extension B\n   *      U+2A700 - U+2B73F // CJK Unified Ideographs Extension C\n   *      U+2B740 - U+2B81F // CJK Unified Ideographs Extension D\n   *      U+2F800 - U+2FA1F // CJK Compatibility Ideographs Supplement\n   *     ```\n   *\n   *   FT_AUTOHINTER_SCRIPT_INDIC ::\n   *     Apply the indic auto-hinter, covering all major scripts from the\n   *     Indian sub-continent and some other related scripts like Thai, Lao,\n   *     or Tibetan.\n   *\n   *     By default, characters from the following Unicode ranges are\n   *     assigned to this submodule.\n   *\n   *     ```\n   *       U+0900 - U+0DFF  // Indic Range\n   *       U+0F00 - U+0FFF  // Tibetan\n   *       U+1900 - U+194F  // Limbu\n   *       U+1B80 - U+1BBF  // Sundanese\n   *       U+A800 - U+A82F  // Syloti Nagri\n   *       U+ABC0 - U+ABFF  // Meetei Mayek\n   *      U+11800 - U+118DF // Sharada\n   *     ```\n   *\n   *     Note that currently Indic support is rudimentary only, missing blue\n   *     zone support.\n   *\n   * @since:\n   *   2.4.11\n   *\n   */\n#define FT_AUTOHINTER_SCRIPT_NONE   0\n#define FT_AUTOHINTER_SCRIPT_LATIN  1\n#define FT_AUTOHINTER_SCRIPT_CJK    2\n#define FT_AUTOHINTER_SCRIPT_INDIC  3\n\n\n  /**************************************************************************\n   *\n   * @struct:\n   *   FT_Prop_GlyphToScriptMap\n   *\n   * @description:\n   *   **Experimental only**\n   *\n   *   The data exchange structure for the @glyph-to-script-map property.\n   *\n   * @since:\n   *   2.4.11\n   *\n   */\n  typedef struct  FT_Prop_GlyphToScriptMap_\n  {\n    FT_Face     face;\n    FT_UShort*  map;\n\n  } FT_Prop_GlyphToScriptMap;\n\n\n  /**************************************************************************\n   *\n   * @property:\n   *   fallback-script\n   *\n   * @description:\n   *   **Experimental only**\n   *\n   *   If no auto-hinter script module can be assigned to a glyph, a fallback\n   *   script gets assigned to it (see also the @glyph-to-script-map\n   *   property).  By default, this is @FT_AUTOHINTER_SCRIPT_CJK.  Using the\n   *   `fallback-script` property, this fallback value can be changed.\n   *\n   * @note:\n   *   This property can be used with @FT_Property_Get also.\n   *\n   *   It's important to use the right timing for changing this value: The\n   *   creation of the glyph-to-script map that eventually uses the fallback\n   *   script value gets triggered either by setting or reading a\n   *   face-specific property like @glyph-to-script-map, or by auto-hinting\n   *   any glyph from that face.  In particular, if you have already created\n   *   an @FT_Face structure but not loaded any glyph (using the\n   *   auto-hinter), a change of the fallback script will affect this face.\n   *\n   * @example:\n   *   ```\n   *     FT_Library  library;\n   *     FT_UInt     fallback_script = FT_AUTOHINTER_SCRIPT_NONE;\n   *\n   *\n   *     FT_Init_FreeType( &library );\n   *\n   *     FT_Property_Set( library, \"autofitter\",\n   *                               \"fallback-script\", &fallback_script );\n   *   ```\n   *\n   * @since:\n   *   2.4.11\n   *\n   */\n\n\n  /**************************************************************************\n   *\n   * @property:\n   *   default-script\n   *\n   * @description:\n   *   **Experimental only**\n   *\n   *   If FreeType gets compiled with `FT_CONFIG_OPTION_USE_HARFBUZZ` to make\n   *   the HarfBuzz library access OpenType features for getting better glyph\n   *   coverages, this property sets the (auto-fitter) script to be used for\n   *   the default (OpenType) script data of a font's GSUB table.  Features\n   *   for the default script are intended for all scripts not explicitly\n   *   handled in GSUB; an example is a 'dlig' feature, containing the\n   *   combination of the characters 'T', 'E', and 'L' to form a 'TEL'\n   *   ligature.\n   *\n   *   By default, this is @FT_AUTOHINTER_SCRIPT_LATIN.  Using the\n   *   `default-script` property, this default value can be changed.\n   *\n   * @note:\n   *   This property can be used with @FT_Property_Get also.\n   *\n   *   It's important to use the right timing for changing this value: The\n   *   creation of the glyph-to-script map that eventually uses the default\n   *   script value gets triggered either by setting or reading a\n   *   face-specific property like @glyph-to-script-map, or by auto-hinting\n   *   any glyph from that face.  In particular, if you have already created\n   *   an @FT_Face structure but not loaded any glyph (using the\n   *   auto-hinter), a change of the default script will affect this face.\n   *\n   * @example:\n   *   ```\n   *     FT_Library  library;\n   *     FT_UInt     default_script = FT_AUTOHINTER_SCRIPT_NONE;\n   *\n   *\n   *     FT_Init_FreeType( &library );\n   *\n   *     FT_Property_Set( library, \"autofitter\",\n   *                               \"default-script\", &default_script );\n   *   ```\n   *\n   * @since:\n   *   2.5.3\n   *\n   */\n\n\n  /**************************************************************************\n   *\n   * @property:\n   *   increase-x-height\n   *\n   * @description:\n   *   For ppem values in the range 6~<= ppem <= `increase-x-height`, round\n   *   up the font's x~height much more often than normally.  If the value is\n   *   set to~0, which is the default, this feature is switched off.  Use\n   *   this property to improve the legibility of small font sizes if\n   *   necessary.\n   *\n   * @note:\n   *   This property can be used with @FT_Property_Get also.\n   *\n   *   Set this value right after calling @FT_Set_Char_Size, but before\n   *   loading any glyph (using the auto-hinter).\n   *\n   * @example:\n   *   ```\n   *     FT_Library               library;\n   *     FT_Face                  face;\n   *     FT_Prop_IncreaseXHeight  prop;\n   *\n   *\n   *     FT_Init_FreeType( &library );\n   *     FT_New_Face( library, \"foo.ttf\", 0, &face );\n   *     FT_Set_Char_Size( face, 10 * 64, 0, 72, 0 );\n   *\n   *     prop.face  = face;\n   *     prop.limit = 14;\n   *\n   *     FT_Property_Set( library, \"autofitter\",\n   *                               \"increase-x-height\", &prop );\n   *   ```\n   *\n   * @since:\n   *   2.4.11\n   *\n   */\n\n\n  /**************************************************************************\n   *\n   * @struct:\n   *   FT_Prop_IncreaseXHeight\n   *\n   * @description:\n   *   The data exchange structure for the @increase-x-height property.\n   *\n   */\n  typedef struct  FT_Prop_IncreaseXHeight_\n  {\n    FT_Face  face;\n    FT_UInt  limit;\n\n  } FT_Prop_IncreaseXHeight;\n\n\n  /**************************************************************************\n   *\n   * @property:\n   *   warping\n   *\n   * @description:\n   *   **Obsolete**\n   *\n   *   This property was always experimental and probably never worked\n   *   correctly.  It was entirely removed from the FreeType~2 sources.  This\n   *   entry is only here for historical reference.\n   *\n   *   Warping only worked in 'normal' auto-hinting mode replacing it.  The\n   *   idea of the code was to slightly scale and shift a glyph along the\n   *   non-hinted dimension (which is usually the horizontal axis) so that as\n   *   much of its segments were aligned (more or less) to the grid.  To find\n   *   out a glyph's optimal scaling and shifting value, various parameter\n   *   combinations were tried and scored.\n   *\n   * @since:\n   *   2.6\n   *\n   */\n\n\n /* */\n\n\nFT_END_HEADER\n\n\n#endif /* FTDRIVER_H_ */\n\n\n/* END */\n"
  },
  {
    "path": "thirdparty/freetype/include/freetype2/freetype/fterrdef.h",
    "content": "/****************************************************************************\n *\n * fterrdef.h\n *\n *   FreeType error codes (specification).\n *\n * Copyright (C) 2002-2021 by\n * David Turner, Robert Wilhelm, and Werner Lemberg.\n *\n * This file is part of the FreeType project, and may only be used,\n * modified, and distributed under the terms of the FreeType project\n * license, LICENSE.TXT.  By continuing to use, modify, or distribute\n * this file you indicate that you have read the license and\n * understand and accept it fully.\n *\n */\n\n\n  /**************************************************************************\n   *\n   * @section:\n   *  error_code_values\n   *\n   * @title:\n   *  Error Code Values\n   *\n   * @abstract:\n   *  All possible error codes returned by FreeType functions.\n   *\n   * @description:\n   *  The list below is taken verbatim from the file `fterrdef.h` (loaded\n   *  automatically by including `FT_FREETYPE_H`).  The first argument of the\n   *  `FT_ERROR_DEF_` macro is the error label; by default, the prefix\n   *  `FT_Err_` gets added so that you get error names like\n   *  `FT_Err_Cannot_Open_Resource`.  The second argument is the error code,\n   *  and the last argument an error string, which is not used by FreeType.\n   *\n   *  Within your application you should **only** use error names and\n   *  **never** its numeric values!  The latter might (and actually do)\n   *  change in forthcoming FreeType versions.\n   *\n   *  Macro `FT_NOERRORDEF_` defines `FT_Err_Ok`, which is always zero.  See\n   *  the 'Error Enumerations' subsection how to automatically generate a\n   *  list of error strings.\n   *\n   */\n\n\n  /**************************************************************************\n   *\n   * @enum:\n   *   FT_Err_XXX\n   *\n   */\n\n  /* generic errors */\n\n  FT_NOERRORDEF_( Ok,                                        0x00,\n                  \"no error\" )\n\n  FT_ERRORDEF_( Cannot_Open_Resource,                        0x01,\n                \"cannot open resource\" )\n  FT_ERRORDEF_( Unknown_File_Format,                         0x02,\n                \"unknown file format\" )\n  FT_ERRORDEF_( Invalid_File_Format,                         0x03,\n                \"broken file\" )\n  FT_ERRORDEF_( Invalid_Version,                             0x04,\n                \"invalid FreeType version\" )\n  FT_ERRORDEF_( Lower_Module_Version,                        0x05,\n                \"module version is too low\" )\n  FT_ERRORDEF_( Invalid_Argument,                            0x06,\n                \"invalid argument\" )\n  FT_ERRORDEF_( Unimplemented_Feature,                       0x07,\n                \"unimplemented feature\" )\n  FT_ERRORDEF_( Invalid_Table,                               0x08,\n                \"broken table\" )\n  FT_ERRORDEF_( Invalid_Offset,                              0x09,\n                \"broken offset within table\" )\n  FT_ERRORDEF_( Array_Too_Large,                             0x0A,\n                \"array allocation size too large\" )\n  FT_ERRORDEF_( Missing_Module,                              0x0B,\n                \"missing module\" )\n  FT_ERRORDEF_( Missing_Property,                            0x0C,\n                \"missing property\" )\n\n  /* glyph/character errors */\n\n  FT_ERRORDEF_( Invalid_Glyph_Index,                         0x10,\n                \"invalid glyph index\" )\n  FT_ERRORDEF_( Invalid_Character_Code,                      0x11,\n                \"invalid character code\" )\n  FT_ERRORDEF_( Invalid_Glyph_Format,                        0x12,\n                \"unsupported glyph image format\" )\n  FT_ERRORDEF_( Cannot_Render_Glyph,                         0x13,\n                \"cannot render this glyph format\" )\n  FT_ERRORDEF_( Invalid_Outline,                             0x14,\n                \"invalid outline\" )\n  FT_ERRORDEF_( Invalid_Composite,                           0x15,\n                \"invalid composite glyph\" )\n  FT_ERRORDEF_( Too_Many_Hints,                              0x16,\n                \"too many hints\" )\n  FT_ERRORDEF_( Invalid_Pixel_Size,                          0x17,\n                \"invalid pixel size\" )\n\n  /* handle errors */\n\n  FT_ERRORDEF_( Invalid_Handle,                              0x20,\n                \"invalid object handle\" )\n  FT_ERRORDEF_( Invalid_Library_Handle,                      0x21,\n                \"invalid library handle\" )\n  FT_ERRORDEF_( Invalid_Driver_Handle,                       0x22,\n                \"invalid module handle\" )\n  FT_ERRORDEF_( Invalid_Face_Handle,                         0x23,\n                \"invalid face handle\" )\n  FT_ERRORDEF_( Invalid_Size_Handle,                         0x24,\n                \"invalid size handle\" )\n  FT_ERRORDEF_( Invalid_Slot_Handle,                         0x25,\n                \"invalid glyph slot handle\" )\n  FT_ERRORDEF_( Invalid_CharMap_Handle,                      0x26,\n                \"invalid charmap handle\" )\n  FT_ERRORDEF_( Invalid_Cache_Handle,                        0x27,\n                \"invalid cache manager handle\" )\n  FT_ERRORDEF_( Invalid_Stream_Handle,                       0x28,\n                \"invalid stream handle\" )\n\n  /* driver errors */\n\n  FT_ERRORDEF_( Too_Many_Drivers,                            0x30,\n                \"too many modules\" )\n  FT_ERRORDEF_( Too_Many_Extensions,                         0x31,\n                \"too many extensions\" )\n\n  /* memory errors */\n\n  FT_ERRORDEF_( Out_Of_Memory,                               0x40,\n                \"out of memory\" )\n  FT_ERRORDEF_( Unlisted_Object,                             0x41,\n                \"unlisted object\" )\n\n  /* stream errors */\n\n  FT_ERRORDEF_( Cannot_Open_Stream,                          0x51,\n                \"cannot open stream\" )\n  FT_ERRORDEF_( Invalid_Stream_Seek,                         0x52,\n                \"invalid stream seek\" )\n  FT_ERRORDEF_( Invalid_Stream_Skip,                         0x53,\n                \"invalid stream skip\" )\n  FT_ERRORDEF_( Invalid_Stream_Read,                         0x54,\n                \"invalid stream read\" )\n  FT_ERRORDEF_( Invalid_Stream_Operation,                    0x55,\n                \"invalid stream operation\" )\n  FT_ERRORDEF_( Invalid_Frame_Operation,                     0x56,\n                \"invalid frame operation\" )\n  FT_ERRORDEF_( Nested_Frame_Access,                         0x57,\n                \"nested frame access\" )\n  FT_ERRORDEF_( Invalid_Frame_Read,                          0x58,\n                \"invalid frame read\" )\n\n  /* raster errors */\n\n  FT_ERRORDEF_( Raster_Uninitialized,                        0x60,\n                \"raster uninitialized\" )\n  FT_ERRORDEF_( Raster_Corrupted,                            0x61,\n                \"raster corrupted\" )\n  FT_ERRORDEF_( Raster_Overflow,                             0x62,\n                \"raster overflow\" )\n  FT_ERRORDEF_( Raster_Negative_Height,                      0x63,\n                \"negative height while rastering\" )\n\n  /* cache errors */\n\n  FT_ERRORDEF_( Too_Many_Caches,                             0x70,\n                \"too many registered caches\" )\n\n  /* TrueType and SFNT errors */\n\n  FT_ERRORDEF_( Invalid_Opcode,                              0x80,\n                \"invalid opcode\" )\n  FT_ERRORDEF_( Too_Few_Arguments,                           0x81,\n                \"too few arguments\" )\n  FT_ERRORDEF_( Stack_Overflow,                              0x82,\n                \"stack overflow\" )\n  FT_ERRORDEF_( Code_Overflow,                               0x83,\n                \"code overflow\" )\n  FT_ERRORDEF_( Bad_Argument,                                0x84,\n                \"bad argument\" )\n  FT_ERRORDEF_( Divide_By_Zero,                              0x85,\n                \"division by zero\" )\n  FT_ERRORDEF_( Invalid_Reference,                           0x86,\n                \"invalid reference\" )\n  FT_ERRORDEF_( Debug_OpCode,                                0x87,\n                \"found debug opcode\" )\n  FT_ERRORDEF_( ENDF_In_Exec_Stream,                         0x88,\n                \"found ENDF opcode in execution stream\" )\n  FT_ERRORDEF_( Nested_DEFS,                                 0x89,\n                \"nested DEFS\" )\n  FT_ERRORDEF_( Invalid_CodeRange,                           0x8A,\n                \"invalid code range\" )\n  FT_ERRORDEF_( Execution_Too_Long,                          0x8B,\n                \"execution context too long\" )\n  FT_ERRORDEF_( Too_Many_Function_Defs,                      0x8C,\n                \"too many function definitions\" )\n  FT_ERRORDEF_( Too_Many_Instruction_Defs,                   0x8D,\n                \"too many instruction definitions\" )\n  FT_ERRORDEF_( Table_Missing,                               0x8E,\n                \"SFNT font table missing\" )\n  FT_ERRORDEF_( Horiz_Header_Missing,                        0x8F,\n                \"horizontal header (hhea) table missing\" )\n  FT_ERRORDEF_( Locations_Missing,                           0x90,\n                \"locations (loca) table missing\" )\n  FT_ERRORDEF_( Name_Table_Missing,                          0x91,\n                \"name table missing\" )\n  FT_ERRORDEF_( CMap_Table_Missing,                          0x92,\n                \"character map (cmap) table missing\" )\n  FT_ERRORDEF_( Hmtx_Table_Missing,                          0x93,\n                \"horizontal metrics (hmtx) table missing\" )\n  FT_ERRORDEF_( Post_Table_Missing,                          0x94,\n                \"PostScript (post) table missing\" )\n  FT_ERRORDEF_( Invalid_Horiz_Metrics,                       0x95,\n                \"invalid horizontal metrics\" )\n  FT_ERRORDEF_( Invalid_CharMap_Format,                      0x96,\n                \"invalid character map (cmap) format\" )\n  FT_ERRORDEF_( Invalid_PPem,                                0x97,\n                \"invalid ppem value\" )\n  FT_ERRORDEF_( Invalid_Vert_Metrics,                        0x98,\n                \"invalid vertical metrics\" )\n  FT_ERRORDEF_( Could_Not_Find_Context,                      0x99,\n                \"could not find context\" )\n  FT_ERRORDEF_( Invalid_Post_Table_Format,                   0x9A,\n                \"invalid PostScript (post) table format\" )\n  FT_ERRORDEF_( Invalid_Post_Table,                          0x9B,\n                \"invalid PostScript (post) table\" )\n  FT_ERRORDEF_( DEF_In_Glyf_Bytecode,                        0x9C,\n                \"found FDEF or IDEF opcode in glyf bytecode\" )\n  FT_ERRORDEF_( Missing_Bitmap,                              0x9D,\n                \"missing bitmap in strike\" )\n\n  /* CFF, CID, and Type 1 errors */\n\n  FT_ERRORDEF_( Syntax_Error,                                0xA0,\n                \"opcode syntax error\" )\n  FT_ERRORDEF_( Stack_Underflow,                             0xA1,\n                \"argument stack underflow\" )\n  FT_ERRORDEF_( Ignore,                                      0xA2,\n                \"ignore\" )\n  FT_ERRORDEF_( No_Unicode_Glyph_Name,                       0xA3,\n                \"no Unicode glyph name found\" )\n  FT_ERRORDEF_( Glyph_Too_Big,                               0xA4,\n                \"glyph too big for hinting\" )\n\n  /* BDF errors */\n\n  FT_ERRORDEF_( Missing_Startfont_Field,                     0xB0,\n                \"`STARTFONT' field missing\" )\n  FT_ERRORDEF_( Missing_Font_Field,                          0xB1,\n                \"`FONT' field missing\" )\n  FT_ERRORDEF_( Missing_Size_Field,                          0xB2,\n                \"`SIZE' field missing\" )\n  FT_ERRORDEF_( Missing_Fontboundingbox_Field,               0xB3,\n                \"`FONTBOUNDINGBOX' field missing\" )\n  FT_ERRORDEF_( Missing_Chars_Field,                         0xB4,\n                \"`CHARS' field missing\" )\n  FT_ERRORDEF_( Missing_Startchar_Field,                     0xB5,\n                \"`STARTCHAR' field missing\" )\n  FT_ERRORDEF_( Missing_Encoding_Field,                      0xB6,\n                \"`ENCODING' field missing\" )\n  FT_ERRORDEF_( Missing_Bbx_Field,                           0xB7,\n                \"`BBX' field missing\" )\n  FT_ERRORDEF_( Bbx_Too_Big,                                 0xB8,\n                \"`BBX' too big\" )\n  FT_ERRORDEF_( Corrupted_Font_Header,                       0xB9,\n                \"Font header corrupted or missing fields\" )\n  FT_ERRORDEF_( Corrupted_Font_Glyphs,                       0xBA,\n                \"Font glyphs corrupted or missing fields\" )\n\n  /* */\n\n\n/* END */\n"
  },
  {
    "path": "thirdparty/freetype/include/freetype2/freetype/fterrors.h",
    "content": "/****************************************************************************\n *\n * fterrors.h\n *\n *   FreeType error code handling (specification).\n *\n * Copyright (C) 1996-2021 by\n * David Turner, Robert Wilhelm, and Werner Lemberg.\n *\n * This file is part of the FreeType project, and may only be used,\n * modified, and distributed under the terms of the FreeType project\n * license, LICENSE.TXT.  By continuing to use, modify, or distribute\n * this file you indicate that you have read the license and\n * understand and accept it fully.\n *\n */\n\n\n  /**************************************************************************\n   *\n   * @section:\n   *   error_enumerations\n   *\n   * @title:\n   *   Error Enumerations\n   *\n   * @abstract:\n   *   How to handle errors and error strings.\n   *\n   * @description:\n   *   The header file `fterrors.h` (which is automatically included by\n   *   `freetype.h` defines the handling of FreeType's enumeration\n   *   constants.  It can also be used to generate error message strings\n   *   with a small macro trick explained below.\n   *\n   *   **Error Formats**\n   *\n   *   The configuration macro `FT_CONFIG_OPTION_USE_MODULE_ERRORS` can be\n   *   defined in `ftoption.h` in order to make the higher byte indicate the\n   *   module where the error has happened (this is not compatible with\n   *   standard builds of FreeType~2, however).  See the file `ftmoderr.h`\n   *   for more details.\n   *\n   *   **Error Message Strings**\n   *\n   *   Error definitions are set up with special macros that allow client\n   *   applications to build a table of error message strings.  The strings\n   *   are not included in a normal build of FreeType~2 to save space (most\n   *   client applications do not use them).\n   *\n   *   To do so, you have to define the following macros before including\n   *   this file.\n   *\n   *   ```\n   *     FT_ERROR_START_LIST\n   *   ```\n   *\n   *   This macro is called before anything else to define the start of the\n   *   error list.  It is followed by several `FT_ERROR_DEF` calls.\n   *\n   *   ```\n   *     FT_ERROR_DEF( e, v, s )\n   *   ```\n   *\n   *   This macro is called to define one single error.  'e' is the error\n   *   code identifier (e.g., `Invalid_Argument`), 'v' is the error's\n   *   numerical value, and 's' is the corresponding error string.\n   *\n   *   ```\n   *     FT_ERROR_END_LIST\n   *   ```\n   *\n   *   This macro ends the list.\n   *\n   *   Additionally, you have to undefine `FTERRORS_H_` before #including\n   *   this file.\n   *\n   *   Here is a simple example.\n   *\n   *   ```\n   *     #undef FTERRORS_H_\n   *     #define FT_ERRORDEF( e, v, s )  { e, s },\n   *     #define FT_ERROR_START_LIST     {\n   *     #define FT_ERROR_END_LIST       { 0, NULL } };\n   *\n   *     const struct\n   *     {\n   *       int          err_code;\n   *       const char*  err_msg;\n   *     } ft_errors[] =\n   *\n   *     #include <freetype/fterrors.h>\n   *   ```\n   *\n   *   An alternative to using an array is a switch statement.\n   *\n   *   ```\n   *     #undef FTERRORS_H_\n   *     #define FT_ERROR_START_LIST     switch ( error_code ) {\n   *     #define FT_ERRORDEF( e, v, s )    case v: return s;\n   *     #define FT_ERROR_END_LIST       }\n   *   ```\n   *\n   *   If you use `FT_CONFIG_OPTION_USE_MODULE_ERRORS`, `error_code` should\n   *   be replaced with `FT_ERROR_BASE(error_code)` in the last example.\n   */\n\n  /* */\n\n  /* In previous FreeType versions we used `__FTERRORS_H__`.  However, */\n  /* using two successive underscores in a non-system symbol name      */\n  /* violates the C (and C++) standard, so it was changed to the       */\n  /* current form.  In spite of this, we have to make                  */\n  /*                                                                   */\n  /* ```                                                               */\n  /*   #undefine __FTERRORS_H__                                        */\n  /* ```                                                               */\n  /*                                                                   */\n  /* work for backward compatibility.                                  */\n  /*                                                                   */\n#if !( defined( FTERRORS_H_ ) && defined ( __FTERRORS_H__ ) )\n#define FTERRORS_H_\n#define __FTERRORS_H__\n\n\n  /* include module base error codes */\n#include <freetype/ftmoderr.h>\n\n\n  /*******************************************************************/\n  /*******************************************************************/\n  /*****                                                         *****/\n  /*****                       SETUP MACROS                      *****/\n  /*****                                                         *****/\n  /*******************************************************************/\n  /*******************************************************************/\n\n\n#undef  FT_NEED_EXTERN_C\n\n\n  /* FT_ERR_PREFIX is used as a prefix for error identifiers. */\n  /* By default, we use `FT_Err_`.                            */\n  /*                                                          */\n#ifndef FT_ERR_PREFIX\n#define FT_ERR_PREFIX  FT_Err_\n#endif\n\n\n  /* FT_ERR_BASE is used as the base for module-specific errors. */\n  /*                                                             */\n#ifdef FT_CONFIG_OPTION_USE_MODULE_ERRORS\n\n#ifndef FT_ERR_BASE\n#define FT_ERR_BASE  FT_Mod_Err_Base\n#endif\n\n#else\n\n#undef FT_ERR_BASE\n#define FT_ERR_BASE  0\n\n#endif /* FT_CONFIG_OPTION_USE_MODULE_ERRORS */\n\n\n  /* If FT_ERRORDEF is not defined, we need to define a simple */\n  /* enumeration type.                                         */\n  /*                                                           */\n#ifndef FT_ERRORDEF\n\n#define FT_INCLUDE_ERR_PROTOS\n\n#define FT_ERRORDEF( e, v, s )  e = v,\n#define FT_ERROR_START_LIST     enum {\n#define FT_ERROR_END_LIST       FT_ERR_CAT( FT_ERR_PREFIX, Max ) };\n\n#ifdef __cplusplus\n#define FT_NEED_EXTERN_C\n  extern \"C\" {\n#endif\n\n#endif /* !FT_ERRORDEF */\n\n\n  /* this macro is used to define an error */\n#define FT_ERRORDEF_( e, v, s )                                             \\\n          FT_ERRORDEF( FT_ERR_CAT( FT_ERR_PREFIX, e ), v + FT_ERR_BASE, s )\n\n  /* this is only used for <module>_Err_Ok, which must be 0! */\n#define FT_NOERRORDEF_( e, v, s )                             \\\n          FT_ERRORDEF( FT_ERR_CAT( FT_ERR_PREFIX, e ), v, s )\n\n\n#ifdef FT_ERROR_START_LIST\n  FT_ERROR_START_LIST\n#endif\n\n\n  /* now include the error codes */\n#include <freetype/fterrdef.h>\n\n\n#ifdef FT_ERROR_END_LIST\n  FT_ERROR_END_LIST\n#endif\n\n\n  /*******************************************************************/\n  /*******************************************************************/\n  /*****                                                         *****/\n  /*****                      SIMPLE CLEANUP                     *****/\n  /*****                                                         *****/\n  /*******************************************************************/\n  /*******************************************************************/\n\n#ifdef FT_NEED_EXTERN_C\n  }\n#endif\n\n#undef FT_ERROR_START_LIST\n#undef FT_ERROR_END_LIST\n\n#undef FT_ERRORDEF\n#undef FT_ERRORDEF_\n#undef FT_NOERRORDEF_\n\n#undef FT_NEED_EXTERN_C\n#undef FT_ERR_BASE\n\n  /* FT_ERR_PREFIX is needed internally */\n#ifndef FT2_BUILD_LIBRARY\n#undef FT_ERR_PREFIX\n#endif\n\n  /* FT_INCLUDE_ERR_PROTOS: Control whether function prototypes should be */\n  /*                        included with                                 */\n  /*                                                                      */\n  /*                          #include <freetype/fterrors.h>              */\n  /*                                                                      */\n  /*                        This is only true where `FT_ERRORDEF` is      */\n  /*                        undefined.                                    */\n  /*                                                                      */\n  /* FT_ERR_PROTOS_DEFINED: Actual multiple-inclusion protection of       */\n  /*                        `fterrors.h`.                                 */\n#ifdef FT_INCLUDE_ERR_PROTOS\n#undef FT_INCLUDE_ERR_PROTOS\n\n#ifndef FT_ERR_PROTOS_DEFINED\n#define FT_ERR_PROTOS_DEFINED\n\n\nFT_BEGIN_HEADER\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Error_String\n   *\n   * @description:\n   *   Retrieve the description of a valid FreeType error code.\n   *\n   * @input:\n   *   error_code ::\n   *     A valid FreeType error code.\n   *\n   * @return:\n   *   A C~string or `NULL`, if any error occurred.\n   *\n   * @note:\n   *   FreeType has to be compiled with `FT_CONFIG_OPTION_ERROR_STRINGS` or\n   *   `FT_DEBUG_LEVEL_ERROR` to get meaningful descriptions.\n   *   'error_string' will be `NULL` otherwise.\n   *\n   *   Module identification will be ignored:\n   *\n   *   ```c\n   *     strcmp( FT_Error_String(  FT_Err_Unknown_File_Format ),\n   *             FT_Error_String( BDF_Err_Unknown_File_Format ) ) == 0;\n   *   ```\n   */\n  FT_EXPORT( const char* )\n  FT_Error_String( FT_Error  error_code );\n\n  /* */\n\nFT_END_HEADER\n\n\n#endif /* FT_ERR_PROTOS_DEFINED */\n\n#endif /* FT_INCLUDE_ERR_PROTOS */\n\n#endif /* !(FTERRORS_H_ && __FTERRORS_H__) */\n\n\n/* END */\n"
  },
  {
    "path": "thirdparty/freetype/include/freetype2/freetype/ftfntfmt.h",
    "content": "/****************************************************************************\n *\n * ftfntfmt.h\n *\n *   Support functions for font formats.\n *\n * Copyright (C) 2002-2021 by\n * David Turner, Robert Wilhelm, and Werner Lemberg.\n *\n * This file is part of the FreeType project, and may only be used,\n * modified, and distributed under the terms of the FreeType project\n * license, LICENSE.TXT.  By continuing to use, modify, or distribute\n * this file you indicate that you have read the license and\n * understand and accept it fully.\n *\n */\n\n\n#ifndef FTFNTFMT_H_\n#define FTFNTFMT_H_\n\n#include <freetype/freetype.h>\n\n#ifdef FREETYPE_H\n#error \"freetype.h of FreeType 1 has been loaded!\"\n#error \"Please fix the directory search order for header files\"\n#error \"so that freetype.h of FreeType 2 is found first.\"\n#endif\n\n\nFT_BEGIN_HEADER\n\n\n  /**************************************************************************\n   *\n   * @section:\n   *  font_formats\n   *\n   * @title:\n   *  Font Formats\n   *\n   * @abstract:\n   *  Getting the font format.\n   *\n   * @description:\n   *  The single function in this section can be used to get the font format.\n   *  Note that this information is not needed normally; however, there are\n   *  special cases (like in PDF devices) where it is important to\n   *  differentiate, in spite of FreeType's uniform API.\n   *\n   */\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *  FT_Get_Font_Format\n   *\n   * @description:\n   *  Return a string describing the format of a given face.  Possible values\n   *  are 'TrueType', 'Type~1', 'BDF', 'PCF', 'Type~42', 'CID~Type~1', 'CFF',\n   *  'PFR', and 'Windows~FNT'.\n   *\n   *  The return value is suitable to be used as an X11 FONT_PROPERTY.\n   *\n   * @input:\n   *  face ::\n   *    Input face handle.\n   *\n   * @return:\n   *  Font format string.  `NULL` in case of error.\n   *\n   * @note:\n   *  A deprecated name for the same function is `FT_Get_X11_Font_Format`.\n   */\n  FT_EXPORT( const char* )\n  FT_Get_Font_Format( FT_Face  face );\n\n\n  /* deprecated */\n  FT_EXPORT( const char* )\n  FT_Get_X11_Font_Format( FT_Face  face );\n\n\n  /* */\n\n\nFT_END_HEADER\n\n#endif /* FTFNTFMT_H_ */\n\n\n/* END */\n"
  },
  {
    "path": "thirdparty/freetype/include/freetype2/freetype/ftgasp.h",
    "content": "/****************************************************************************\n *\n * ftgasp.h\n *\n *   Access of TrueType's 'gasp' table (specification).\n *\n * Copyright (C) 2007-2021 by\n * David Turner, Robert Wilhelm, and Werner Lemberg.\n *\n * This file is part of the FreeType project, and may only be used,\n * modified, and distributed under the terms of the FreeType project\n * license, LICENSE.TXT.  By continuing to use, modify, or distribute\n * this file you indicate that you have read the license and\n * understand and accept it fully.\n *\n */\n\n\n#ifndef FTGASP_H_\n#define FTGASP_H_\n\n#include <freetype/freetype.h>\n\n#ifdef FREETYPE_H\n#error \"freetype.h of FreeType 1 has been loaded!\"\n#error \"Please fix the directory search order for header files\"\n#error \"so that freetype.h of FreeType 2 is found first.\"\n#endif\n\n\nFT_BEGIN_HEADER\n\n\n  /**************************************************************************\n   *\n   * @section:\n   *   gasp_table\n   *\n   * @title:\n   *   Gasp Table\n   *\n   * @abstract:\n   *   Retrieving TrueType 'gasp' table entries.\n   *\n   * @description:\n   *   The function @FT_Get_Gasp can be used to query a TrueType or OpenType\n   *   font for specific entries in its 'gasp' table, if any.  This is mainly\n   *   useful when implementing native TrueType hinting with the bytecode\n   *   interpreter to duplicate the Windows text rendering results.\n   */\n\n  /**************************************************************************\n   *\n   * @enum:\n   *   FT_GASP_XXX\n   *\n   * @description:\n   *   A list of values and/or bit-flags returned by the @FT_Get_Gasp\n   *   function.\n   *\n   * @values:\n   *   FT_GASP_NO_TABLE ::\n   *     This special value means that there is no GASP table in this face.\n   *     It is up to the client to decide what to do.\n   *\n   *   FT_GASP_DO_GRIDFIT ::\n   *     Grid-fitting and hinting should be performed at the specified ppem.\n   *     This **really** means TrueType bytecode interpretation.  If this bit\n   *     is not set, no hinting gets applied.\n   *\n   *   FT_GASP_DO_GRAY ::\n   *     Anti-aliased rendering should be performed at the specified ppem.\n   *     If not set, do monochrome rendering.\n   *\n   *   FT_GASP_SYMMETRIC_SMOOTHING ::\n   *     If set, smoothing along multiple axes must be used with ClearType.\n   *\n   *   FT_GASP_SYMMETRIC_GRIDFIT ::\n   *     Grid-fitting must be used with ClearType's symmetric smoothing.\n   *\n   * @note:\n   *   The bit-flags `FT_GASP_DO_GRIDFIT` and `FT_GASP_DO_GRAY` are to be\n   *   used for standard font rasterization only.  Independently of that,\n   *   `FT_GASP_SYMMETRIC_SMOOTHING` and `FT_GASP_SYMMETRIC_GRIDFIT` are to\n   *   be used if ClearType is enabled (and `FT_GASP_DO_GRIDFIT` and\n   *   `FT_GASP_DO_GRAY` are consequently ignored).\n   *\n   *   'ClearType' is Microsoft's implementation of LCD rendering, partly\n   *   protected by patents.\n   *\n   * @since:\n   *   2.3.0\n   */\n#define FT_GASP_NO_TABLE               -1\n#define FT_GASP_DO_GRIDFIT           0x01\n#define FT_GASP_DO_GRAY              0x02\n#define FT_GASP_SYMMETRIC_GRIDFIT    0x04\n#define FT_GASP_SYMMETRIC_SMOOTHING  0x08\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Get_Gasp\n   *\n   * @description:\n   *   For a TrueType or OpenType font file, return the rasterizer behaviour\n   *   flags from the font's 'gasp' table corresponding to a given character\n   *   pixel size.\n   *\n   * @input:\n   *   face ::\n   *     The source face handle.\n   *\n   *   ppem ::\n   *     The vertical character pixel size.\n   *\n   * @return:\n   *   Bit flags (see @FT_GASP_XXX), or @FT_GASP_NO_TABLE if there is no\n   *   'gasp' table in the face.\n   *\n   * @note:\n   *   If you want to use the MM functionality of OpenType variation fonts\n   *   (i.e., using @FT_Set_Var_Design_Coordinates and friends), call this\n   *   function **after** setting an instance since the return values can\n   *   change.\n   *\n   * @since:\n   *   2.3.0\n   */\n  FT_EXPORT( FT_Int )\n  FT_Get_Gasp( FT_Face  face,\n               FT_UInt  ppem );\n\n  /* */\n\n\nFT_END_HEADER\n\n#endif /* FTGASP_H_ */\n\n\n/* END */\n"
  },
  {
    "path": "thirdparty/freetype/include/freetype2/freetype/ftglyph.h",
    "content": "/****************************************************************************\n *\n * ftglyph.h\n *\n *   FreeType convenience functions to handle glyphs (specification).\n *\n * Copyright (C) 1996-2021 by\n * David Turner, Robert Wilhelm, and Werner Lemberg.\n *\n * This file is part of the FreeType project, and may only be used,\n * modified, and distributed under the terms of the FreeType project\n * license, LICENSE.TXT.  By continuing to use, modify, or distribute\n * this file you indicate that you have read the license and\n * understand and accept it fully.\n *\n */\n\n\n  /**************************************************************************\n   *\n   * This file contains the definition of several convenience functions that\n   * can be used by client applications to easily retrieve glyph bitmaps and\n   * outlines from a given face.\n   *\n   * These functions should be optional if you are writing a font server or\n   * text layout engine on top of FreeType.  However, they are pretty handy\n   * for many other simple uses of the library.\n   *\n   */\n\n\n#ifndef FTGLYPH_H_\n#define FTGLYPH_H_\n\n\n#include <freetype/freetype.h>\n\n#ifdef FREETYPE_H\n#error \"freetype.h of FreeType 1 has been loaded!\"\n#error \"Please fix the directory search order for header files\"\n#error \"so that freetype.h of FreeType 2 is found first.\"\n#endif\n\n\nFT_BEGIN_HEADER\n\n\n  /**************************************************************************\n   *\n   * @section:\n   *   glyph_management\n   *\n   * @title:\n   *   Glyph Management\n   *\n   * @abstract:\n   *   Generic interface to manage individual glyph data.\n   *\n   * @description:\n   *   This section contains definitions used to manage glyph data through\n   *   generic @FT_Glyph objects.  Each of them can contain a bitmap,\n   *   a vector outline, or even images in other formats.  These objects are\n   *   detached from @FT_Face, contrary to @FT_GlyphSlot.\n   *\n   */\n\n\n  /* forward declaration to a private type */\n  typedef struct FT_Glyph_Class_  FT_Glyph_Class;\n\n\n  /**************************************************************************\n   *\n   * @type:\n   *   FT_Glyph\n   *\n   * @description:\n   *   Handle to an object used to model generic glyph images.  It is a\n   *   pointer to the @FT_GlyphRec structure and can contain a glyph bitmap\n   *   or pointer.\n   *\n   * @note:\n   *   Glyph objects are not owned by the library.  You must thus release\n   *   them manually (through @FT_Done_Glyph) _before_ calling\n   *   @FT_Done_FreeType.\n   */\n  typedef struct FT_GlyphRec_*  FT_Glyph;\n\n\n  /**************************************************************************\n   *\n   * @struct:\n   *   FT_GlyphRec\n   *\n   * @description:\n   *   The root glyph structure contains a given glyph image plus its advance\n   *   width in 16.16 fixed-point format.\n   *\n   * @fields:\n   *   library ::\n   *     A handle to the FreeType library object.\n   *\n   *   clazz ::\n   *     A pointer to the glyph's class.  Private.\n   *\n   *   format ::\n   *     The format of the glyph's image.\n   *\n   *   advance ::\n   *     A 16.16 vector that gives the glyph's advance width.\n   */\n  typedef struct  FT_GlyphRec_\n  {\n    FT_Library             library;\n    const FT_Glyph_Class*  clazz;\n    FT_Glyph_Format        format;\n    FT_Vector              advance;\n\n  } FT_GlyphRec;\n\n\n  /**************************************************************************\n   *\n   * @type:\n   *   FT_BitmapGlyph\n   *\n   * @description:\n   *   A handle to an object used to model a bitmap glyph image.  This is a\n   *   sub-class of @FT_Glyph, and a pointer to @FT_BitmapGlyphRec.\n   */\n  typedef struct FT_BitmapGlyphRec_*  FT_BitmapGlyph;\n\n\n  /**************************************************************************\n   *\n   * @struct:\n   *   FT_BitmapGlyphRec\n   *\n   * @description:\n   *   A structure used for bitmap glyph images.  This really is a\n   *   'sub-class' of @FT_GlyphRec.\n   *\n   * @fields:\n   *   root ::\n   *     The root @FT_Glyph fields.\n   *\n   *   left ::\n   *     The left-side bearing, i.e., the horizontal distance from the\n   *     current pen position to the left border of the glyph bitmap.\n   *\n   *   top ::\n   *     The top-side bearing, i.e., the vertical distance from the current\n   *     pen position to the top border of the glyph bitmap.  This distance\n   *     is positive for upwards~y!\n   *\n   *   bitmap ::\n   *     A descriptor for the bitmap.\n   *\n   * @note:\n   *   You can typecast an @FT_Glyph to @FT_BitmapGlyph if you have\n   *   `glyph->format == FT_GLYPH_FORMAT_BITMAP`.  This lets you access the\n   *   bitmap's contents easily.\n   *\n   *   The corresponding pixel buffer is always owned by @FT_BitmapGlyph and\n   *   is thus created and destroyed with it.\n   */\n  typedef struct  FT_BitmapGlyphRec_\n  {\n    FT_GlyphRec  root;\n    FT_Int       left;\n    FT_Int       top;\n    FT_Bitmap    bitmap;\n\n  } FT_BitmapGlyphRec;\n\n\n  /**************************************************************************\n   *\n   * @type:\n   *   FT_OutlineGlyph\n   *\n   * @description:\n   *   A handle to an object used to model an outline glyph image.  This is a\n   *   sub-class of @FT_Glyph, and a pointer to @FT_OutlineGlyphRec.\n   */\n  typedef struct FT_OutlineGlyphRec_*  FT_OutlineGlyph;\n\n\n  /**************************************************************************\n   *\n   * @struct:\n   *   FT_OutlineGlyphRec\n   *\n   * @description:\n   *   A structure used for outline (vectorial) glyph images.  This really is\n   *   a 'sub-class' of @FT_GlyphRec.\n   *\n   * @fields:\n   *   root ::\n   *     The root @FT_Glyph fields.\n   *\n   *   outline ::\n   *     A descriptor for the outline.\n   *\n   * @note:\n   *   You can typecast an @FT_Glyph to @FT_OutlineGlyph if you have\n   *   `glyph->format == FT_GLYPH_FORMAT_OUTLINE`.  This lets you access the\n   *   outline's content easily.\n   *\n   *   As the outline is extracted from a glyph slot, its coordinates are\n   *   expressed normally in 26.6 pixels, unless the flag @FT_LOAD_NO_SCALE\n   *   was used in @FT_Load_Glyph or @FT_Load_Char.\n   *\n   *   The outline's tables are always owned by the object and are destroyed\n   *   with it.\n   */\n  typedef struct  FT_OutlineGlyphRec_\n  {\n    FT_GlyphRec  root;\n    FT_Outline   outline;\n\n  } FT_OutlineGlyphRec;\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_New_Glyph\n   *\n   * @description:\n   *   A function used to create a new empty glyph image.  Note that the\n   *   created @FT_Glyph object must be released with @FT_Done_Glyph.\n   *\n   * @input:\n   *   library ::\n   *     A handle to the FreeType library object.\n   *\n   *   format ::\n   *     The format of the glyph's image.\n   *\n   * @output:\n   *   aglyph ::\n   *     A handle to the glyph object.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @since:\n   *   2.10\n   */\n  FT_EXPORT( FT_Error )\n  FT_New_Glyph( FT_Library       library,\n                FT_Glyph_Format  format,\n                FT_Glyph         *aglyph );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Get_Glyph\n   *\n   * @description:\n   *   A function used to extract a glyph image from a slot.  Note that the\n   *   created @FT_Glyph object must be released with @FT_Done_Glyph.\n   *\n   * @input:\n   *   slot ::\n   *     A handle to the source glyph slot.\n   *\n   * @output:\n   *   aglyph ::\n   *     A handle to the glyph object.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *   Because `*aglyph->advance.x` and `*aglyph->advance.y` are 16.16\n   *   fixed-point numbers, `slot->advance.x` and `slot->advance.y` (which\n   *   are in 26.6 fixed-point format) must be in the range ]-32768;32768[.\n   */\n  FT_EXPORT( FT_Error )\n  FT_Get_Glyph( FT_GlyphSlot  slot,\n                FT_Glyph     *aglyph );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Glyph_Copy\n   *\n   * @description:\n   *   A function used to copy a glyph image.  Note that the created\n   *   @FT_Glyph object must be released with @FT_Done_Glyph.\n   *\n   * @input:\n   *   source ::\n   *     A handle to the source glyph object.\n   *\n   * @output:\n   *   target ::\n   *     A handle to the target glyph object.  0~in case of error.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   */\n  FT_EXPORT( FT_Error )\n  FT_Glyph_Copy( FT_Glyph   source,\n                 FT_Glyph  *target );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Glyph_Transform\n   *\n   * @description:\n   *   Transform a glyph image if its format is scalable.\n   *\n   * @inout:\n   *   glyph ::\n   *     A handle to the target glyph object.\n   *\n   * @input:\n   *   matrix ::\n   *     A pointer to a 2x2 matrix to apply.\n   *\n   *   delta ::\n   *     A pointer to a 2d vector to apply.  Coordinates are expressed in\n   *     1/64th of a pixel.\n   *\n   * @return:\n   *   FreeType error code (if not 0, the glyph format is not scalable).\n   *\n   * @note:\n   *   The 2x2 transformation matrix is also applied to the glyph's advance\n   *   vector.\n   */\n  FT_EXPORT( FT_Error )\n  FT_Glyph_Transform( FT_Glyph    glyph,\n                      FT_Matrix*  matrix,\n                      FT_Vector*  delta );\n\n\n  /**************************************************************************\n   *\n   * @enum:\n   *   FT_Glyph_BBox_Mode\n   *\n   * @description:\n   *   The mode how the values of @FT_Glyph_Get_CBox are returned.\n   *\n   * @values:\n   *   FT_GLYPH_BBOX_UNSCALED ::\n   *     Return unscaled font units.\n   *\n   *   FT_GLYPH_BBOX_SUBPIXELS ::\n   *     Return unfitted 26.6 coordinates.\n   *\n   *   FT_GLYPH_BBOX_GRIDFIT ::\n   *     Return grid-fitted 26.6 coordinates.\n   *\n   *   FT_GLYPH_BBOX_TRUNCATE ::\n   *     Return coordinates in integer pixels.\n   *\n   *   FT_GLYPH_BBOX_PIXELS ::\n   *     Return grid-fitted pixel coordinates.\n   */\n  typedef enum  FT_Glyph_BBox_Mode_\n  {\n    FT_GLYPH_BBOX_UNSCALED  = 0,\n    FT_GLYPH_BBOX_SUBPIXELS = 0,\n    FT_GLYPH_BBOX_GRIDFIT   = 1,\n    FT_GLYPH_BBOX_TRUNCATE  = 2,\n    FT_GLYPH_BBOX_PIXELS    = 3\n\n  } FT_Glyph_BBox_Mode;\n\n\n  /* these constants are deprecated; use the corresponding */\n  /* `FT_Glyph_BBox_Mode` values instead                   */\n#define ft_glyph_bbox_unscaled   FT_GLYPH_BBOX_UNSCALED\n#define ft_glyph_bbox_subpixels  FT_GLYPH_BBOX_SUBPIXELS\n#define ft_glyph_bbox_gridfit    FT_GLYPH_BBOX_GRIDFIT\n#define ft_glyph_bbox_truncate   FT_GLYPH_BBOX_TRUNCATE\n#define ft_glyph_bbox_pixels     FT_GLYPH_BBOX_PIXELS\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Glyph_Get_CBox\n   *\n   * @description:\n   *   Return a glyph's 'control box'.  The control box encloses all the\n   *   outline's points, including Bezier control points.  Though it\n   *   coincides with the exact bounding box for most glyphs, it can be\n   *   slightly larger in some situations (like when rotating an outline that\n   *   contains Bezier outside arcs).\n   *\n   *   Computing the control box is very fast, while getting the bounding box\n   *   can take much more time as it needs to walk over all segments and arcs\n   *   in the outline.  To get the latter, you can use the 'ftbbox'\n   *   component, which is dedicated to this single task.\n   *\n   * @input:\n   *   glyph ::\n   *     A handle to the source glyph object.\n   *\n   *   mode ::\n   *     The mode that indicates how to interpret the returned bounding box\n   *     values.\n   *\n   * @output:\n   *   acbox ::\n   *     The glyph coordinate bounding box.  Coordinates are expressed in\n   *     1/64th of pixels if it is grid-fitted.\n   *\n   * @note:\n   *   Coordinates are relative to the glyph origin, using the y~upwards\n   *   convention.\n   *\n   *   If the glyph has been loaded with @FT_LOAD_NO_SCALE, `bbox_mode` must\n   *   be set to @FT_GLYPH_BBOX_UNSCALED to get unscaled font units in 26.6\n   *   pixel format.  The value @FT_GLYPH_BBOX_SUBPIXELS is another name for\n   *   this constant.\n   *\n   *   If the font is tricky and the glyph has been loaded with\n   *   @FT_LOAD_NO_SCALE, the resulting CBox is meaningless.  To get\n   *   reasonable values for the CBox it is necessary to load the glyph at a\n   *   large ppem value (so that the hinting instructions can properly shift\n   *   and scale the subglyphs), then extracting the CBox, which can be\n   *   eventually converted back to font units.\n   *\n   *   Note that the maximum coordinates are exclusive, which means that one\n   *   can compute the width and height of the glyph image (be it in integer\n   *   or 26.6 pixels) as:\n   *\n   *   ```\n   *     width  = bbox.xMax - bbox.xMin;\n   *     height = bbox.yMax - bbox.yMin;\n   *   ```\n   *\n   *   Note also that for 26.6 coordinates, if `bbox_mode` is set to\n   *   @FT_GLYPH_BBOX_GRIDFIT, the coordinates will also be grid-fitted,\n   *   which corresponds to:\n   *\n   *   ```\n   *     bbox.xMin = FLOOR(bbox.xMin);\n   *     bbox.yMin = FLOOR(bbox.yMin);\n   *     bbox.xMax = CEILING(bbox.xMax);\n   *     bbox.yMax = CEILING(bbox.yMax);\n   *   ```\n   *\n   *   To get the bbox in pixel coordinates, set `bbox_mode` to\n   *   @FT_GLYPH_BBOX_TRUNCATE.\n   *\n   *   To get the bbox in grid-fitted pixel coordinates, set `bbox_mode` to\n   *   @FT_GLYPH_BBOX_PIXELS.\n   */\n  FT_EXPORT( void )\n  FT_Glyph_Get_CBox( FT_Glyph  glyph,\n                     FT_UInt   bbox_mode,\n                     FT_BBox  *acbox );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Glyph_To_Bitmap\n   *\n   * @description:\n   *   Convert a given glyph object to a bitmap glyph object.\n   *\n   * @inout:\n   *   the_glyph ::\n   *     A pointer to a handle to the target glyph.\n   *\n   * @input:\n   *   render_mode ::\n   *     An enumeration that describes how the data is rendered.\n   *\n   *   origin ::\n   *     A pointer to a vector used to translate the glyph image before\n   *     rendering.  Can be~0 (if no translation).  The origin is expressed\n   *     in 26.6 pixels.\n   *\n   *   destroy ::\n   *     A boolean that indicates that the original glyph image should be\n   *     destroyed by this function.  It is never destroyed in case of error.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *   This function does nothing if the glyph format isn't scalable.\n   *\n   *   The glyph image is translated with the `origin` vector before\n   *   rendering.\n   *\n   *   The first parameter is a pointer to an @FT_Glyph handle, that will be\n   *   _replaced_ by this function (with newly allocated data).  Typically,\n   *   you would use (omitting error handling):\n   *\n   *   ```\n   *     FT_Glyph        glyph;\n   *     FT_BitmapGlyph  glyph_bitmap;\n   *\n   *\n   *     // load glyph\n   *     error = FT_Load_Char( face, glyph_index, FT_LOAD_DEFAULT );\n   *\n   *     // extract glyph image\n   *     error = FT_Get_Glyph( face->glyph, &glyph );\n   *\n   *     // convert to a bitmap (default render mode + destroying old)\n   *     if ( glyph->format != FT_GLYPH_FORMAT_BITMAP )\n   *     {\n   *       error = FT_Glyph_To_Bitmap( &glyph, FT_RENDER_MODE_NORMAL,\n   *                                     0, 1 );\n   *       if ( error ) // `glyph' unchanged\n   *         ...\n   *     }\n   *\n   *     // access bitmap content by typecasting\n   *     glyph_bitmap = (FT_BitmapGlyph)glyph;\n   *\n   *     // do funny stuff with it, like blitting/drawing\n   *     ...\n   *\n   *     // discard glyph image (bitmap or not)\n   *     FT_Done_Glyph( glyph );\n   *   ```\n   *\n   *   Here is another example, again without error handling:\n   *\n   *   ```\n   *     FT_Glyph  glyphs[MAX_GLYPHS]\n   *\n   *\n   *     ...\n   *\n   *     for ( idx = 0; i < MAX_GLYPHS; i++ )\n   *       error = FT_Load_Glyph( face, idx, FT_LOAD_DEFAULT ) ||\n   *               FT_Get_Glyph ( face->glyph, &glyphs[idx] );\n   *\n   *     ...\n   *\n   *     for ( idx = 0; i < MAX_GLYPHS; i++ )\n   *     {\n   *       FT_Glyph  bitmap = glyphs[idx];\n   *\n   *\n   *       ...\n   *\n   *       // after this call, `bitmap' no longer points into\n   *       // the `glyphs' array (and the old value isn't destroyed)\n   *       FT_Glyph_To_Bitmap( &bitmap, FT_RENDER_MODE_MONO, 0, 0 );\n   *\n   *       ...\n   *\n   *       FT_Done_Glyph( bitmap );\n   *     }\n   *\n   *     ...\n   *\n   *     for ( idx = 0; i < MAX_GLYPHS; i++ )\n   *       FT_Done_Glyph( glyphs[idx] );\n   *   ```\n   */\n  FT_EXPORT( FT_Error )\n  FT_Glyph_To_Bitmap( FT_Glyph*       the_glyph,\n                      FT_Render_Mode  render_mode,\n                      FT_Vector*      origin,\n                      FT_Bool         destroy );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Done_Glyph\n   *\n   * @description:\n   *   Destroy a given glyph.\n   *\n   * @input:\n   *   glyph ::\n   *     A handle to the target glyph object.\n   */\n  FT_EXPORT( void )\n  FT_Done_Glyph( FT_Glyph  glyph );\n\n  /* */\n\n\n  /* other helpful functions */\n\n  /**************************************************************************\n   *\n   * @section:\n   *   computations\n   *\n   */\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Matrix_Multiply\n   *\n   * @description:\n   *   Perform the matrix operation `b = a*b`.\n   *\n   * @input:\n   *   a ::\n   *     A pointer to matrix `a`.\n   *\n   * @inout:\n   *   b ::\n   *     A pointer to matrix `b`.\n   *\n   * @note:\n   *   The result is undefined if either `a` or `b` is zero.\n   *\n   *   Since the function uses wrap-around arithmetic, results become\n   *   meaningless if the arguments are very large.\n   */\n  FT_EXPORT( void )\n  FT_Matrix_Multiply( const FT_Matrix*  a,\n                      FT_Matrix*        b );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Matrix_Invert\n   *\n   * @description:\n   *   Invert a 2x2 matrix.  Return an error if it can't be inverted.\n   *\n   * @inout:\n   *   matrix ::\n   *     A pointer to the target matrix.  Remains untouched in case of error.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   */\n  FT_EXPORT( FT_Error )\n  FT_Matrix_Invert( FT_Matrix*  matrix );\n\n  /* */\n\n\nFT_END_HEADER\n\n#endif /* FTGLYPH_H_ */\n\n\n/* END */\n\n\n/* Local Variables: */\n/* coding: utf-8    */\n/* End:             */\n"
  },
  {
    "path": "thirdparty/freetype/include/freetype2/freetype/ftgxval.h",
    "content": "/****************************************************************************\n *\n * ftgxval.h\n *\n *   FreeType API for validating TrueTypeGX/AAT tables (specification).\n *\n * Copyright (C) 2004-2021 by\n * Masatake YAMATO, Redhat K.K,\n * David Turner, Robert Wilhelm, and Werner Lemberg.\n *\n * This file is part of the FreeType project, and may only be used,\n * modified, and distributed under the terms of the FreeType project\n * license, LICENSE.TXT.  By continuing to use, modify, or distribute\n * this file you indicate that you have read the license and\n * understand and accept it fully.\n *\n */\n\n/****************************************************************************\n *\n * gxvalid is derived from both gxlayout module and otvalid module.\n * Development of gxlayout is supported by the Information-technology\n * Promotion Agency(IPA), Japan.\n *\n */\n\n\n#ifndef FTGXVAL_H_\n#define FTGXVAL_H_\n\n#include <freetype/freetype.h>\n\n#ifdef FREETYPE_H\n#error \"freetype.h of FreeType 1 has been loaded!\"\n#error \"Please fix the directory search order for header files\"\n#error \"so that freetype.h of FreeType 2 is found first.\"\n#endif\n\n\nFT_BEGIN_HEADER\n\n\n  /**************************************************************************\n   *\n   * @section:\n   *   gx_validation\n   *\n   * @title:\n   *   TrueTypeGX/AAT Validation\n   *\n   * @abstract:\n   *   An API to validate TrueTypeGX/AAT tables.\n   *\n   * @description:\n   *   This section contains the declaration of functions to validate some\n   *   TrueTypeGX tables (feat, mort, morx, bsln, just, kern, opbd, trak,\n   *   prop, lcar).\n   *\n   * @order:\n   *   FT_TrueTypeGX_Validate\n   *   FT_TrueTypeGX_Free\n   *\n   *   FT_ClassicKern_Validate\n   *   FT_ClassicKern_Free\n   *\n   *   FT_VALIDATE_GX_LENGTH\n   *   FT_VALIDATE_GXXXX\n   *   FT_VALIDATE_CKERNXXX\n   *\n   */\n\n  /**************************************************************************\n   *\n   *\n   * Warning: Use `FT_VALIDATE_XXX` to validate a table.\n   *          Following definitions are for gxvalid developers.\n   *\n   *\n   */\n\n#define FT_VALIDATE_feat_INDEX     0\n#define FT_VALIDATE_mort_INDEX     1\n#define FT_VALIDATE_morx_INDEX     2\n#define FT_VALIDATE_bsln_INDEX     3\n#define FT_VALIDATE_just_INDEX     4\n#define FT_VALIDATE_kern_INDEX     5\n#define FT_VALIDATE_opbd_INDEX     6\n#define FT_VALIDATE_trak_INDEX     7\n#define FT_VALIDATE_prop_INDEX     8\n#define FT_VALIDATE_lcar_INDEX     9\n#define FT_VALIDATE_GX_LAST_INDEX  FT_VALIDATE_lcar_INDEX\n\n\n  /**************************************************************************\n   *\n   * @macro:\n   *   FT_VALIDATE_GX_LENGTH\n   *\n   * @description:\n   *   The number of tables checked in this module.  Use it as a parameter\n   *   for the `table-length` argument of function @FT_TrueTypeGX_Validate.\n   */\n#define FT_VALIDATE_GX_LENGTH  ( FT_VALIDATE_GX_LAST_INDEX + 1 )\n\n  /* */\n\n  /* Up to 0x1000 is used by otvalid.\n     Ox2xxx is reserved for feature OT extension. */\n#define FT_VALIDATE_GX_START  0x4000\n#define FT_VALIDATE_GX_BITFIELD( tag ) \\\n          ( FT_VALIDATE_GX_START << FT_VALIDATE_##tag##_INDEX )\n\n\n  /**************************************************************************\n   *\n   * @enum:\n   *    FT_VALIDATE_GXXXX\n   *\n   * @description:\n   *    A list of bit-field constants used with @FT_TrueTypeGX_Validate to\n   *    indicate which TrueTypeGX/AAT Type tables should be validated.\n   *\n   * @values:\n   *    FT_VALIDATE_feat ::\n   *      Validate 'feat' table.\n   *\n   *    FT_VALIDATE_mort ::\n   *      Validate 'mort' table.\n   *\n   *    FT_VALIDATE_morx ::\n   *      Validate 'morx' table.\n   *\n   *    FT_VALIDATE_bsln ::\n   *      Validate 'bsln' table.\n   *\n   *    FT_VALIDATE_just ::\n   *      Validate 'just' table.\n   *\n   *    FT_VALIDATE_kern ::\n   *      Validate 'kern' table.\n   *\n   *    FT_VALIDATE_opbd ::\n   *      Validate 'opbd' table.\n   *\n   *    FT_VALIDATE_trak ::\n   *      Validate 'trak' table.\n   *\n   *    FT_VALIDATE_prop ::\n   *      Validate 'prop' table.\n   *\n   *    FT_VALIDATE_lcar ::\n   *      Validate 'lcar' table.\n   *\n   *    FT_VALIDATE_GX ::\n   *      Validate all TrueTypeGX tables (feat, mort, morx, bsln, just, kern,\n   *      opbd, trak, prop and lcar).\n   *\n   */\n\n#define FT_VALIDATE_feat  FT_VALIDATE_GX_BITFIELD( feat )\n#define FT_VALIDATE_mort  FT_VALIDATE_GX_BITFIELD( mort )\n#define FT_VALIDATE_morx  FT_VALIDATE_GX_BITFIELD( morx )\n#define FT_VALIDATE_bsln  FT_VALIDATE_GX_BITFIELD( bsln )\n#define FT_VALIDATE_just  FT_VALIDATE_GX_BITFIELD( just )\n#define FT_VALIDATE_kern  FT_VALIDATE_GX_BITFIELD( kern )\n#define FT_VALIDATE_opbd  FT_VALIDATE_GX_BITFIELD( opbd )\n#define FT_VALIDATE_trak  FT_VALIDATE_GX_BITFIELD( trak )\n#define FT_VALIDATE_prop  FT_VALIDATE_GX_BITFIELD( prop )\n#define FT_VALIDATE_lcar  FT_VALIDATE_GX_BITFIELD( lcar )\n\n#define FT_VALIDATE_GX  ( FT_VALIDATE_feat | \\\n                          FT_VALIDATE_mort | \\\n                          FT_VALIDATE_morx | \\\n                          FT_VALIDATE_bsln | \\\n                          FT_VALIDATE_just | \\\n                          FT_VALIDATE_kern | \\\n                          FT_VALIDATE_opbd | \\\n                          FT_VALIDATE_trak | \\\n                          FT_VALIDATE_prop | \\\n                          FT_VALIDATE_lcar )\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *    FT_TrueTypeGX_Validate\n   *\n   * @description:\n   *    Validate various TrueTypeGX tables to assure that all offsets and\n   *    indices are valid.  The idea is that a higher-level library that\n   *    actually does the text layout can access those tables without error\n   *    checking (which can be quite time consuming).\n   *\n   * @input:\n   *    face ::\n   *      A handle to the input face.\n   *\n   *    validation_flags ::\n   *      A bit field that specifies the tables to be validated.  See\n   *      @FT_VALIDATE_GXXXX for possible values.\n   *\n   *    table_length ::\n   *      The size of the `tables` array.  Normally, @FT_VALIDATE_GX_LENGTH\n   *      should be passed.\n   *\n   * @output:\n   *    tables ::\n   *      The array where all validated sfnt tables are stored.  The array\n   *      itself must be allocated by a client.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *   This function only works with TrueTypeGX fonts, returning an error\n   *   otherwise.\n   *\n   *   After use, the application should deallocate the buffers pointed to by\n   *   each `tables` element, by calling @FT_TrueTypeGX_Free.  A `NULL` value\n   *   indicates that the table either doesn't exist in the font, the\n   *   application hasn't asked for validation, or the validator doesn't have\n   *   the ability to validate the sfnt table.\n   */\n  FT_EXPORT( FT_Error )\n  FT_TrueTypeGX_Validate( FT_Face   face,\n                          FT_UInt   validation_flags,\n                          FT_Bytes  tables[FT_VALIDATE_GX_LENGTH],\n                          FT_UInt   table_length );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *    FT_TrueTypeGX_Free\n   *\n   * @description:\n   *    Free the buffer allocated by TrueTypeGX validator.\n   *\n   * @input:\n   *    face ::\n   *      A handle to the input face.\n   *\n   *    table ::\n   *      The pointer to the buffer allocated by @FT_TrueTypeGX_Validate.\n   *\n   * @note:\n   *   This function must be used to free the buffer allocated by\n   *   @FT_TrueTypeGX_Validate only.\n   */\n  FT_EXPORT( void )\n  FT_TrueTypeGX_Free( FT_Face   face,\n                      FT_Bytes  table );\n\n\n  /**************************************************************************\n   *\n   * @enum:\n   *    FT_VALIDATE_CKERNXXX\n   *\n   * @description:\n   *    A list of bit-field constants used with @FT_ClassicKern_Validate to\n   *    indicate the classic kern dialect or dialects.  If the selected type\n   *    doesn't fit, @FT_ClassicKern_Validate regards the table as invalid.\n   *\n   * @values:\n   *    FT_VALIDATE_MS ::\n   *      Handle the 'kern' table as a classic Microsoft kern table.\n   *\n   *    FT_VALIDATE_APPLE ::\n   *      Handle the 'kern' table as a classic Apple kern table.\n   *\n   *    FT_VALIDATE_CKERN ::\n   *      Handle the 'kern' as either classic Apple or Microsoft kern table.\n   */\n#define FT_VALIDATE_MS     ( FT_VALIDATE_GX_START << 0 )\n#define FT_VALIDATE_APPLE  ( FT_VALIDATE_GX_START << 1 )\n\n#define FT_VALIDATE_CKERN  ( FT_VALIDATE_MS | FT_VALIDATE_APPLE )\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *    FT_ClassicKern_Validate\n   *\n   * @description:\n   *    Validate classic (16-bit format) kern table to assure that the\n   *    offsets and indices are valid.  The idea is that a higher-level\n   *    library that actually does the text layout can access those tables\n   *    without error checking (which can be quite time consuming).\n   *\n   *    The 'kern' table validator in @FT_TrueTypeGX_Validate deals with both\n   *    the new 32-bit format and the classic 16-bit format, while\n   *    FT_ClassicKern_Validate only supports the classic 16-bit format.\n   *\n   * @input:\n   *    face ::\n   *      A handle to the input face.\n   *\n   *    validation_flags ::\n   *      A bit field that specifies the dialect to be validated.  See\n   *      @FT_VALIDATE_CKERNXXX for possible values.\n   *\n   * @output:\n   *    ckern_table ::\n   *      A pointer to the kern table.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *   After use, the application should deallocate the buffers pointed to by\n   *   `ckern_table`, by calling @FT_ClassicKern_Free.  A `NULL` value\n   *   indicates that the table doesn't exist in the font.\n   */\n  FT_EXPORT( FT_Error )\n  FT_ClassicKern_Validate( FT_Face    face,\n                           FT_UInt    validation_flags,\n                           FT_Bytes  *ckern_table );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *    FT_ClassicKern_Free\n   *\n   * @description:\n   *    Free the buffer allocated by classic Kern validator.\n   *\n   * @input:\n   *    face ::\n   *      A handle to the input face.\n   *\n   *    table ::\n   *      The pointer to the buffer that is allocated by\n   *      @FT_ClassicKern_Validate.\n   *\n   * @note:\n   *   This function must be used to free the buffer allocated by\n   *   @FT_ClassicKern_Validate only.\n   */\n  FT_EXPORT( void )\n  FT_ClassicKern_Free( FT_Face   face,\n                       FT_Bytes  table );\n\n  /* */\n\n\nFT_END_HEADER\n\n#endif /* FTGXVAL_H_ */\n\n\n/* END */\n"
  },
  {
    "path": "thirdparty/freetype/include/freetype2/freetype/ftgzip.h",
    "content": "/****************************************************************************\n *\n * ftgzip.h\n *\n *   Gzip-compressed stream support.\n *\n * Copyright (C) 2002-2021 by\n * David Turner, Robert Wilhelm, and Werner Lemberg.\n *\n * This file is part of the FreeType project, and may only be used,\n * modified, and distributed under the terms of the FreeType project\n * license, LICENSE.TXT.  By continuing to use, modify, or distribute\n * this file you indicate that you have read the license and\n * understand and accept it fully.\n *\n */\n\n\n#ifndef FTGZIP_H_\n#define FTGZIP_H_\n\n#include <freetype/freetype.h>\n\n#ifdef FREETYPE_H\n#error \"freetype.h of FreeType 1 has been loaded!\"\n#error \"Please fix the directory search order for header files\"\n#error \"so that freetype.h of FreeType 2 is found first.\"\n#endif\n\n\nFT_BEGIN_HEADER\n\n  /**************************************************************************\n   *\n   * @section:\n   *   gzip\n   *\n   * @title:\n   *   GZIP Streams\n   *\n   * @abstract:\n   *   Using gzip-compressed font files.\n   *\n   * @description:\n   *   In certain builds of the library, gzip compression recognition is\n   *   automatically handled when calling @FT_New_Face or @FT_Open_Face.\n   *   This means that if no font driver is capable of handling the raw\n   *   compressed file, the library will try to open a gzipped stream from it\n   *   and re-open the face with it.\n   *\n   *   The stream implementation is very basic and resets the decompression\n   *   process each time seeking backwards is needed within the stream,\n   *   which significantly undermines the performance.\n   *\n   *   This section contains the declaration of Gzip-specific functions.\n   *\n   */\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Stream_OpenGzip\n   *\n   * @description:\n   *   Open a new stream to parse gzip-compressed font files.  This is mainly\n   *   used to support the compressed `*.pcf.gz` fonts that come with\n   *   XFree86.\n   *\n   * @input:\n   *   stream ::\n   *     The target embedding stream.\n   *\n   *   source ::\n   *     The source stream.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *   The source stream must be opened _before_ calling this function.\n   *\n   *   Calling the internal function `FT_Stream_Close` on the new stream will\n   *   **not** call `FT_Stream_Close` on the source stream.  None of the\n   *   stream objects will be released to the heap.\n   *\n   *   This function may return `FT_Err_Unimplemented_Feature` if your build\n   *   of FreeType was not compiled with zlib support.\n   */\n  FT_EXPORT( FT_Error )\n  FT_Stream_OpenGzip( FT_Stream  stream,\n                      FT_Stream  source );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Gzip_Uncompress\n   *\n   * @description:\n   *   Decompress a zipped input buffer into an output buffer.  This function\n   *   is modeled after zlib's `uncompress` function.\n   *\n   * @input:\n   *   memory ::\n   *     A FreeType memory handle.\n   *\n   *   input ::\n   *     The input buffer.\n   *\n   *   input_len ::\n   *     The length of the input buffer.\n   *\n   * @output:\n   *   output ::\n   *     The output buffer.\n   *\n   * @inout:\n   *   output_len ::\n   *     Before calling the function, this is the total size of the output\n   *     buffer, which must be large enough to hold the entire uncompressed\n   *     data (so the size of the uncompressed data must be known in\n   *     advance).  After calling the function, `output_len` is the size of\n   *     the used data in `output`.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *   This function may return `FT_Err_Unimplemented_Feature` if your build\n   *   of FreeType was not compiled with zlib support.\n   *\n   * @since:\n   *   2.5.1\n   */\n  FT_EXPORT( FT_Error )\n  FT_Gzip_Uncompress( FT_Memory       memory,\n                      FT_Byte*        output,\n                      FT_ULong*       output_len,\n                      const FT_Byte*  input,\n                      FT_ULong        input_len );\n\n  /* */\n\n\nFT_END_HEADER\n\n#endif /* FTGZIP_H_ */\n\n\n/* END */\n"
  },
  {
    "path": "thirdparty/freetype/include/freetype2/freetype/ftimage.h",
    "content": "/****************************************************************************\n *\n * ftimage.h\n *\n *   FreeType glyph image formats and default raster interface\n *   (specification).\n *\n * Copyright (C) 1996-2021 by\n * David Turner, Robert Wilhelm, and Werner Lemberg.\n *\n * This file is part of the FreeType project, and may only be used,\n * modified, and distributed under the terms of the FreeType project\n * license, LICENSE.TXT.  By continuing to use, modify, or distribute\n * this file you indicate that you have read the license and\n * understand and accept it fully.\n *\n */\n\n  /**************************************************************************\n   *\n   * Note: A 'raster' is simply a scan-line converter, used to render\n   *       FT_Outlines into FT_Bitmaps.\n   *\n   */\n\n\n#ifndef FTIMAGE_H_\n#define FTIMAGE_H_\n\n\n  /* STANDALONE_ is from ftgrays.c */\n#ifndef STANDALONE_\n#endif\n\n\nFT_BEGIN_HEADER\n\n\n  /**************************************************************************\n   *\n   * @section:\n   *   basic_types\n   *\n   */\n\n\n  /**************************************************************************\n   *\n   * @type:\n   *   FT_Pos\n   *\n   * @description:\n   *   The type FT_Pos is used to store vectorial coordinates.  Depending on\n   *   the context, these can represent distances in integer font units, or\n   *   16.16, or 26.6 fixed-point pixel coordinates.\n   */\n  typedef signed long  FT_Pos;\n\n\n  /**************************************************************************\n   *\n   * @struct:\n   *   FT_Vector\n   *\n   * @description:\n   *   A simple structure used to store a 2D vector; coordinates are of the\n   *   FT_Pos type.\n   *\n   * @fields:\n   *   x ::\n   *     The horizontal coordinate.\n   *   y ::\n   *     The vertical coordinate.\n   */\n  typedef struct  FT_Vector_\n  {\n    FT_Pos  x;\n    FT_Pos  y;\n\n  } FT_Vector;\n\n\n  /**************************************************************************\n   *\n   * @struct:\n   *   FT_BBox\n   *\n   * @description:\n   *   A structure used to hold an outline's bounding box, i.e., the\n   *   coordinates of its extrema in the horizontal and vertical directions.\n   *\n   * @fields:\n   *   xMin ::\n   *     The horizontal minimum (left-most).\n   *\n   *   yMin ::\n   *     The vertical minimum (bottom-most).\n   *\n   *   xMax ::\n   *     The horizontal maximum (right-most).\n   *\n   *   yMax ::\n   *     The vertical maximum (top-most).\n   *\n   * @note:\n   *   The bounding box is specified with the coordinates of the lower left\n   *   and the upper right corner.  In PostScript, those values are often\n   *   called (llx,lly) and (urx,ury), respectively.\n   *\n   *   If `yMin` is negative, this value gives the glyph's descender.\n   *   Otherwise, the glyph doesn't descend below the baseline.  Similarly,\n   *   if `ymax` is positive, this value gives the glyph's ascender.\n   *\n   *   `xMin` gives the horizontal distance from the glyph's origin to the\n   *   left edge of the glyph's bounding box.  If `xMin` is negative, the\n   *   glyph extends to the left of the origin.\n   */\n  typedef struct  FT_BBox_\n  {\n    FT_Pos  xMin, yMin;\n    FT_Pos  xMax, yMax;\n\n  } FT_BBox;\n\n\n  /**************************************************************************\n   *\n   * @enum:\n   *   FT_Pixel_Mode\n   *\n   * @description:\n   *   An enumeration type used to describe the format of pixels in a given\n   *   bitmap.  Note that additional formats may be added in the future.\n   *\n   * @values:\n   *   FT_PIXEL_MODE_NONE ::\n   *     Value~0 is reserved.\n   *\n   *   FT_PIXEL_MODE_MONO ::\n   *     A monochrome bitmap, using 1~bit per pixel.  Note that pixels are\n   *     stored in most-significant order (MSB), which means that the\n   *     left-most pixel in a byte has value 128.\n   *\n   *   FT_PIXEL_MODE_GRAY ::\n   *     An 8-bit bitmap, generally used to represent anti-aliased glyph\n   *     images.  Each pixel is stored in one byte.  Note that the number of\n   *     'gray' levels is stored in the `num_grays` field of the @FT_Bitmap\n   *     structure (it generally is 256).\n   *\n   *   FT_PIXEL_MODE_GRAY2 ::\n   *     A 2-bit per pixel bitmap, used to represent embedded anti-aliased\n   *     bitmaps in font files according to the OpenType specification.  We\n   *     haven't found a single font using this format, however.\n   *\n   *   FT_PIXEL_MODE_GRAY4 ::\n   *     A 4-bit per pixel bitmap, representing embedded anti-aliased bitmaps\n   *     in font files according to the OpenType specification.  We haven't\n   *     found a single font using this format, however.\n   *\n   *   FT_PIXEL_MODE_LCD ::\n   *     An 8-bit bitmap, representing RGB or BGR decimated glyph images used\n   *     for display on LCD displays; the bitmap is three times wider than\n   *     the original glyph image.  See also @FT_RENDER_MODE_LCD.\n   *\n   *   FT_PIXEL_MODE_LCD_V ::\n   *     An 8-bit bitmap, representing RGB or BGR decimated glyph images used\n   *     for display on rotated LCD displays; the bitmap is three times\n   *     taller than the original glyph image.  See also\n   *     @FT_RENDER_MODE_LCD_V.\n   *\n   *   FT_PIXEL_MODE_BGRA ::\n   *     [Since 2.5] An image with four 8-bit channels per pixel,\n   *     representing a color image (such as emoticons) with alpha channel.\n   *     For each pixel, the format is BGRA, which means, the blue channel\n   *     comes first in memory.  The color channels are pre-multiplied and in\n   *     the sRGB colorspace.  For example, full red at half-translucent\n   *     opacity will be represented as '00,00,80,80', not '00,00,FF,80'.\n   *     See also @FT_LOAD_COLOR.\n   */\n  typedef enum  FT_Pixel_Mode_\n  {\n    FT_PIXEL_MODE_NONE = 0,\n    FT_PIXEL_MODE_MONO,\n    FT_PIXEL_MODE_GRAY,\n    FT_PIXEL_MODE_GRAY2,\n    FT_PIXEL_MODE_GRAY4,\n    FT_PIXEL_MODE_LCD,\n    FT_PIXEL_MODE_LCD_V,\n    FT_PIXEL_MODE_BGRA,\n\n    FT_PIXEL_MODE_MAX      /* do not remove */\n\n  } FT_Pixel_Mode;\n\n\n  /* these constants are deprecated; use the corresponding `FT_Pixel_Mode` */\n  /* values instead.                                                       */\n#define ft_pixel_mode_none   FT_PIXEL_MODE_NONE\n#define ft_pixel_mode_mono   FT_PIXEL_MODE_MONO\n#define ft_pixel_mode_grays  FT_PIXEL_MODE_GRAY\n#define ft_pixel_mode_pal2   FT_PIXEL_MODE_GRAY2\n#define ft_pixel_mode_pal4   FT_PIXEL_MODE_GRAY4\n\n  /* */\n\n  /* For debugging, the @FT_Pixel_Mode enumeration must stay in sync */\n  /* with the `pixel_modes` array in file `ftobjs.c`.                */\n\n\n  /**************************************************************************\n   *\n   * @struct:\n   *   FT_Bitmap\n   *\n   * @description:\n   *   A structure used to describe a bitmap or pixmap to the raster.  Note\n   *   that we now manage pixmaps of various depths through the `pixel_mode`\n   *   field.\n   *\n   * @fields:\n   *   rows ::\n   *     The number of bitmap rows.\n   *\n   *   width ::\n   *     The number of pixels in bitmap row.\n   *\n   *   pitch ::\n   *     The pitch's absolute value is the number of bytes taken by one\n   *     bitmap row, including padding.  However, the pitch is positive when\n   *     the bitmap has a 'down' flow, and negative when it has an 'up' flow.\n   *     In all cases, the pitch is an offset to add to a bitmap pointer in\n   *     order to go down one row.\n   *\n   *     Note that 'padding' means the alignment of a bitmap to a byte\n   *     border, and FreeType functions normally align to the smallest\n   *     possible integer value.\n   *\n   *     For the B/W rasterizer, `pitch` is always an even number.\n   *\n   *     To change the pitch of a bitmap (say, to make it a multiple of 4),\n   *     use @FT_Bitmap_Convert.  Alternatively, you might use callback\n   *     functions to directly render to the application's surface; see the\n   *     file `example2.cpp` in the tutorial for a demonstration.\n   *\n   *   buffer ::\n   *     A typeless pointer to the bitmap buffer.  This value should be\n   *     aligned on 32-bit boundaries in most cases.\n   *\n   *   num_grays ::\n   *     This field is only used with @FT_PIXEL_MODE_GRAY; it gives the\n   *     number of gray levels used in the bitmap.\n   *\n   *   pixel_mode ::\n   *     The pixel mode, i.e., how pixel bits are stored.  See @FT_Pixel_Mode\n   *     for possible values.\n   *\n   *   palette_mode ::\n   *     This field is intended for paletted pixel modes; it indicates how\n   *     the palette is stored.  Not used currently.\n   *\n   *   palette ::\n   *     A typeless pointer to the bitmap palette; this field is intended for\n   *     paletted pixel modes.  Not used currently.\n   */\n  typedef struct  FT_Bitmap_\n  {\n    unsigned int    rows;\n    unsigned int    width;\n    int             pitch;\n    unsigned char*  buffer;\n    unsigned short  num_grays;\n    unsigned char   pixel_mode;\n    unsigned char   palette_mode;\n    void*           palette;\n\n  } FT_Bitmap;\n\n\n  /**************************************************************************\n   *\n   * @section:\n   *   outline_processing\n   *\n   */\n\n\n  /**************************************************************************\n   *\n   * @struct:\n   *   FT_Outline\n   *\n   * @description:\n   *   This structure is used to describe an outline to the scan-line\n   *   converter.\n   *\n   * @fields:\n   *   n_contours ::\n   *     The number of contours in the outline.\n   *\n   *   n_points ::\n   *     The number of points in the outline.\n   *\n   *   points ::\n   *     A pointer to an array of `n_points` @FT_Vector elements, giving the\n   *     outline's point coordinates.\n   *\n   *   tags ::\n   *     A pointer to an array of `n_points` chars, giving each outline\n   *     point's type.\n   *\n   *     If bit~0 is unset, the point is 'off' the curve, i.e., a Bezier\n   *     control point, while it is 'on' if set.\n   *\n   *     Bit~1 is meaningful for 'off' points only.  If set, it indicates a\n   *     third-order Bezier arc control point; and a second-order control\n   *     point if unset.\n   *\n   *     If bit~2 is set, bits 5-7 contain the drop-out mode (as defined in\n   *     the OpenType specification; the value is the same as the argument to\n   *     the 'SCANMODE' instruction).\n   *\n   *     Bits 3 and~4 are reserved for internal purposes.\n   *\n   *   contours ::\n   *     An array of `n_contours` shorts, giving the end point of each\n   *     contour within the outline.  For example, the first contour is\n   *     defined by the points '0' to `contours[0]`, the second one is\n   *     defined by the points `contours[0]+1` to `contours[1]`, etc.\n   *\n   *   flags ::\n   *     A set of bit flags used to characterize the outline and give hints\n   *     to the scan-converter and hinter on how to convert/grid-fit it.  See\n   *     @FT_OUTLINE_XXX.\n   *\n   * @note:\n   *   The B/W rasterizer only checks bit~2 in the `tags` array for the first\n   *   point of each contour.  The drop-out mode as given with\n   *   @FT_OUTLINE_IGNORE_DROPOUTS, @FT_OUTLINE_SMART_DROPOUTS, and\n   *   @FT_OUTLINE_INCLUDE_STUBS in `flags` is then overridden.\n   */\n  typedef struct  FT_Outline_\n  {\n    short       n_contours;      /* number of contours in glyph        */\n    short       n_points;        /* number of points in the glyph      */\n\n    FT_Vector*  points;          /* the outline's points               */\n    char*       tags;            /* the points flags                   */\n    short*      contours;        /* the contour end points             */\n\n    int         flags;           /* outline masks                      */\n\n  } FT_Outline;\n\n  /* */\n\n  /* Following limits must be consistent with */\n  /* FT_Outline.{n_contours,n_points}         */\n#define FT_OUTLINE_CONTOURS_MAX  SHRT_MAX\n#define FT_OUTLINE_POINTS_MAX    SHRT_MAX\n\n\n  /**************************************************************************\n   *\n   * @enum:\n   *   FT_OUTLINE_XXX\n   *\n   * @description:\n   *   A list of bit-field constants used for the flags in an outline's\n   *   `flags` field.\n   *\n   * @values:\n   *   FT_OUTLINE_NONE ::\n   *     Value~0 is reserved.\n   *\n   *   FT_OUTLINE_OWNER ::\n   *     If set, this flag indicates that the outline's field arrays (i.e.,\n   *     `points`, `flags`, and `contours`) are 'owned' by the outline\n   *     object, and should thus be freed when it is destroyed.\n   *\n   *   FT_OUTLINE_EVEN_ODD_FILL ::\n   *     By default, outlines are filled using the non-zero winding rule.  If\n   *     set to 1, the outline will be filled using the even-odd fill rule\n   *     (only works with the smooth rasterizer).\n   *\n   *   FT_OUTLINE_REVERSE_FILL ::\n   *     By default, outside contours of an outline are oriented in\n   *     clock-wise direction, as defined in the TrueType specification.\n   *     This flag is set if the outline uses the opposite direction\n   *     (typically for Type~1 fonts).  This flag is ignored by the scan\n   *     converter.\n   *\n   *   FT_OUTLINE_IGNORE_DROPOUTS ::\n   *     By default, the scan converter will try to detect drop-outs in an\n   *     outline and correct the glyph bitmap to ensure consistent shape\n   *     continuity.  If set, this flag hints the scan-line converter to\n   *     ignore such cases.  See below for more information.\n   *\n   *   FT_OUTLINE_SMART_DROPOUTS ::\n   *     Select smart dropout control.  If unset, use simple dropout control.\n   *     Ignored if @FT_OUTLINE_IGNORE_DROPOUTS is set.  See below for more\n   *     information.\n   *\n   *   FT_OUTLINE_INCLUDE_STUBS ::\n   *     If set, turn pixels on for 'stubs', otherwise exclude them.  Ignored\n   *     if @FT_OUTLINE_IGNORE_DROPOUTS is set.  See below for more\n   *     information.\n   *\n   *   FT_OUTLINE_OVERLAP ::\n   *     This flag indicates that this outline contains overlapping contrours\n   *     and the anti-aliased renderer should perform oversampling to\n   *     mitigate possible artifacts.  This flag should _not_ be set for\n   *     well designed glyphs without overlaps because it quadruples the\n   *     rendering time.\n   *\n   *   FT_OUTLINE_HIGH_PRECISION ::\n   *     This flag indicates that the scan-line converter should try to\n   *     convert this outline to bitmaps with the highest possible quality.\n   *     It is typically set for small character sizes.  Note that this is\n   *     only a hint that might be completely ignored by a given\n   *     scan-converter.\n   *\n   *   FT_OUTLINE_SINGLE_PASS ::\n   *     This flag is set to force a given scan-converter to only use a\n   *     single pass over the outline to render a bitmap glyph image.\n   *     Normally, it is set for very large character sizes.  It is only a\n   *     hint that might be completely ignored by a given scan-converter.\n   *\n   * @note:\n   *   The flags @FT_OUTLINE_IGNORE_DROPOUTS, @FT_OUTLINE_SMART_DROPOUTS, and\n   *   @FT_OUTLINE_INCLUDE_STUBS are ignored by the smooth rasterizer.\n   *\n   *   There exists a second mechanism to pass the drop-out mode to the B/W\n   *   rasterizer; see the `tags` field in @FT_Outline.\n   *\n   *   Please refer to the description of the 'SCANTYPE' instruction in the\n   *   OpenType specification (in file `ttinst1.doc`) how simple drop-outs,\n   *   smart drop-outs, and stubs are defined.\n   */\n#define FT_OUTLINE_NONE             0x0\n#define FT_OUTLINE_OWNER            0x1\n#define FT_OUTLINE_EVEN_ODD_FILL    0x2\n#define FT_OUTLINE_REVERSE_FILL     0x4\n#define FT_OUTLINE_IGNORE_DROPOUTS  0x8\n#define FT_OUTLINE_SMART_DROPOUTS   0x10\n#define FT_OUTLINE_INCLUDE_STUBS    0x20\n#define FT_OUTLINE_OVERLAP          0x40\n\n#define FT_OUTLINE_HIGH_PRECISION   0x100\n#define FT_OUTLINE_SINGLE_PASS      0x200\n\n\n  /* these constants are deprecated; use the corresponding */\n  /* `FT_OUTLINE_XXX` values instead                       */\n#define ft_outline_none             FT_OUTLINE_NONE\n#define ft_outline_owner            FT_OUTLINE_OWNER\n#define ft_outline_even_odd_fill    FT_OUTLINE_EVEN_ODD_FILL\n#define ft_outline_reverse_fill     FT_OUTLINE_REVERSE_FILL\n#define ft_outline_ignore_dropouts  FT_OUTLINE_IGNORE_DROPOUTS\n#define ft_outline_high_precision   FT_OUTLINE_HIGH_PRECISION\n#define ft_outline_single_pass      FT_OUTLINE_SINGLE_PASS\n\n  /* */\n\n#define FT_CURVE_TAG( flag )  ( flag & 0x03 )\n\n  /* see the `tags` field in `FT_Outline` for a description of the values */\n#define FT_CURVE_TAG_ON            0x01\n#define FT_CURVE_TAG_CONIC         0x00\n#define FT_CURVE_TAG_CUBIC         0x02\n\n#define FT_CURVE_TAG_HAS_SCANMODE  0x04\n\n#define FT_CURVE_TAG_TOUCH_X       0x08  /* reserved for TrueType hinter */\n#define FT_CURVE_TAG_TOUCH_Y       0x10  /* reserved for TrueType hinter */\n\n#define FT_CURVE_TAG_TOUCH_BOTH    ( FT_CURVE_TAG_TOUCH_X | \\\n                                     FT_CURVE_TAG_TOUCH_Y )\n  /* values 0x20, 0x40, and 0x80 are reserved */\n\n\n  /* these constants are deprecated; use the corresponding */\n  /* `FT_CURVE_TAG_XXX` values instead                     */\n#define FT_Curve_Tag_On       FT_CURVE_TAG_ON\n#define FT_Curve_Tag_Conic    FT_CURVE_TAG_CONIC\n#define FT_Curve_Tag_Cubic    FT_CURVE_TAG_CUBIC\n#define FT_Curve_Tag_Touch_X  FT_CURVE_TAG_TOUCH_X\n#define FT_Curve_Tag_Touch_Y  FT_CURVE_TAG_TOUCH_Y\n\n\n  /**************************************************************************\n   *\n   * @functype:\n   *   FT_Outline_MoveToFunc\n   *\n   * @description:\n   *   A function pointer type used to describe the signature of a 'move to'\n   *   function during outline walking/decomposition.\n   *\n   *   A 'move to' is emitted to start a new contour in an outline.\n   *\n   * @input:\n   *   to ::\n   *     A pointer to the target point of the 'move to'.\n   *\n   *   user ::\n   *     A typeless pointer, which is passed from the caller of the\n   *     decomposition function.\n   *\n   * @return:\n   *   Error code.  0~means success.\n   */\n  typedef int\n  (*FT_Outline_MoveToFunc)( const FT_Vector*  to,\n                            void*             user );\n\n#define FT_Outline_MoveTo_Func  FT_Outline_MoveToFunc\n\n\n  /**************************************************************************\n   *\n   * @functype:\n   *   FT_Outline_LineToFunc\n   *\n   * @description:\n   *   A function pointer type used to describe the signature of a 'line to'\n   *   function during outline walking/decomposition.\n   *\n   *   A 'line to' is emitted to indicate a segment in the outline.\n   *\n   * @input:\n   *   to ::\n   *     A pointer to the target point of the 'line to'.\n   *\n   *   user ::\n   *     A typeless pointer, which is passed from the caller of the\n   *     decomposition function.\n   *\n   * @return:\n   *   Error code.  0~means success.\n   */\n  typedef int\n  (*FT_Outline_LineToFunc)( const FT_Vector*  to,\n                            void*             user );\n\n#define FT_Outline_LineTo_Func  FT_Outline_LineToFunc\n\n\n  /**************************************************************************\n   *\n   * @functype:\n   *   FT_Outline_ConicToFunc\n   *\n   * @description:\n   *   A function pointer type used to describe the signature of a 'conic to'\n   *   function during outline walking or decomposition.\n   *\n   *   A 'conic to' is emitted to indicate a second-order Bezier arc in the\n   *   outline.\n   *\n   * @input:\n   *   control ::\n   *     An intermediate control point between the last position and the new\n   *     target in `to`.\n   *\n   *   to ::\n   *     A pointer to the target end point of the conic arc.\n   *\n   *   user ::\n   *     A typeless pointer, which is passed from the caller of the\n   *     decomposition function.\n   *\n   * @return:\n   *   Error code.  0~means success.\n   */\n  typedef int\n  (*FT_Outline_ConicToFunc)( const FT_Vector*  control,\n                             const FT_Vector*  to,\n                             void*             user );\n\n#define FT_Outline_ConicTo_Func  FT_Outline_ConicToFunc\n\n\n  /**************************************************************************\n   *\n   * @functype:\n   *   FT_Outline_CubicToFunc\n   *\n   * @description:\n   *   A function pointer type used to describe the signature of a 'cubic to'\n   *   function during outline walking or decomposition.\n   *\n   *   A 'cubic to' is emitted to indicate a third-order Bezier arc.\n   *\n   * @input:\n   *   control1 ::\n   *     A pointer to the first Bezier control point.\n   *\n   *   control2 ::\n   *     A pointer to the second Bezier control point.\n   *\n   *   to ::\n   *     A pointer to the target end point.\n   *\n   *   user ::\n   *     A typeless pointer, which is passed from the caller of the\n   *     decomposition function.\n   *\n   * @return:\n   *   Error code.  0~means success.\n   */\n  typedef int\n  (*FT_Outline_CubicToFunc)( const FT_Vector*  control1,\n                             const FT_Vector*  control2,\n                             const FT_Vector*  to,\n                             void*             user );\n\n#define FT_Outline_CubicTo_Func  FT_Outline_CubicToFunc\n\n\n  /**************************************************************************\n   *\n   * @struct:\n   *   FT_Outline_Funcs\n   *\n   * @description:\n   *   A structure to hold various function pointers used during outline\n   *   decomposition in order to emit segments, conic, and cubic Beziers.\n   *\n   * @fields:\n   *   move_to ::\n   *     The 'move to' emitter.\n   *\n   *   line_to ::\n   *     The segment emitter.\n   *\n   *   conic_to ::\n   *     The second-order Bezier arc emitter.\n   *\n   *   cubic_to ::\n   *     The third-order Bezier arc emitter.\n   *\n   *   shift ::\n   *     The shift that is applied to coordinates before they are sent to the\n   *     emitter.\n   *\n   *   delta ::\n   *     The delta that is applied to coordinates before they are sent to the\n   *     emitter, but after the shift.\n   *\n   * @note:\n   *   The point coordinates sent to the emitters are the transformed version\n   *   of the original coordinates (this is important for high accuracy\n   *   during scan-conversion).  The transformation is simple:\n   *\n   *   ```\n   *     x' = (x << shift) - delta\n   *     y' = (y << shift) - delta\n   *   ```\n   *\n   *   Set the values of `shift` and `delta` to~0 to get the original point\n   *   coordinates.\n   */\n  typedef struct  FT_Outline_Funcs_\n  {\n    FT_Outline_MoveToFunc   move_to;\n    FT_Outline_LineToFunc   line_to;\n    FT_Outline_ConicToFunc  conic_to;\n    FT_Outline_CubicToFunc  cubic_to;\n\n    int                     shift;\n    FT_Pos                  delta;\n\n  } FT_Outline_Funcs;\n\n\n  /**************************************************************************\n   *\n   * @section:\n   *   basic_types\n   *\n   */\n\n\n  /**************************************************************************\n   *\n   * @macro:\n   *   FT_IMAGE_TAG\n   *\n   * @description:\n   *   This macro converts four-letter tags to an unsigned long type.\n   *\n   * @note:\n   *   Since many 16-bit compilers don't like 32-bit enumerations, you should\n   *   redefine this macro in case of problems to something like this:\n   *\n   *   ```\n   *     #define FT_IMAGE_TAG( value, _x1, _x2, _x3, _x4 )  value\n   *   ```\n   *\n   *   to get a simple enumeration without assigning special numbers.\n   */\n#ifndef FT_IMAGE_TAG\n#define FT_IMAGE_TAG( value, _x1, _x2, _x3, _x4 )  \\\n          value = ( ( (unsigned long)_x1 << 24 ) | \\\n                    ( (unsigned long)_x2 << 16 ) | \\\n                    ( (unsigned long)_x3 << 8  ) | \\\n                      (unsigned long)_x4         )\n#endif /* FT_IMAGE_TAG */\n\n\n  /**************************************************************************\n   *\n   * @enum:\n   *   FT_Glyph_Format\n   *\n   * @description:\n   *   An enumeration type used to describe the format of a given glyph\n   *   image.  Note that this version of FreeType only supports two image\n   *   formats, even though future font drivers will be able to register\n   *   their own format.\n   *\n   * @values:\n   *   FT_GLYPH_FORMAT_NONE ::\n   *     The value~0 is reserved.\n   *\n   *   FT_GLYPH_FORMAT_COMPOSITE ::\n   *     The glyph image is a composite of several other images.  This format\n   *     is _only_ used with @FT_LOAD_NO_RECURSE, and is used to report\n   *     compound glyphs (like accented characters).\n   *\n   *   FT_GLYPH_FORMAT_BITMAP ::\n   *     The glyph image is a bitmap, and can be described as an @FT_Bitmap.\n   *     You generally need to access the `bitmap` field of the\n   *     @FT_GlyphSlotRec structure to read it.\n   *\n   *   FT_GLYPH_FORMAT_OUTLINE ::\n   *     The glyph image is a vectorial outline made of line segments and\n   *     Bezier arcs; it can be described as an @FT_Outline; you generally\n   *     want to access the `outline` field of the @FT_GlyphSlotRec structure\n   *     to read it.\n   *\n   *   FT_GLYPH_FORMAT_PLOTTER ::\n   *     The glyph image is a vectorial path with no inside and outside\n   *     contours.  Some Type~1 fonts, like those in the Hershey family,\n   *     contain glyphs in this format.  These are described as @FT_Outline,\n   *     but FreeType isn't currently capable of rendering them correctly.\n   */\n  typedef enum  FT_Glyph_Format_\n  {\n    FT_IMAGE_TAG( FT_GLYPH_FORMAT_NONE, 0, 0, 0, 0 ),\n\n    FT_IMAGE_TAG( FT_GLYPH_FORMAT_COMPOSITE, 'c', 'o', 'm', 'p' ),\n    FT_IMAGE_TAG( FT_GLYPH_FORMAT_BITMAP,    'b', 'i', 't', 's' ),\n    FT_IMAGE_TAG( FT_GLYPH_FORMAT_OUTLINE,   'o', 'u', 't', 'l' ),\n    FT_IMAGE_TAG( FT_GLYPH_FORMAT_PLOTTER,   'p', 'l', 'o', 't' )\n\n  } FT_Glyph_Format;\n\n\n  /* these constants are deprecated; use the corresponding */\n  /* `FT_Glyph_Format` values instead.                     */\n#define ft_glyph_format_none       FT_GLYPH_FORMAT_NONE\n#define ft_glyph_format_composite  FT_GLYPH_FORMAT_COMPOSITE\n#define ft_glyph_format_bitmap     FT_GLYPH_FORMAT_BITMAP\n#define ft_glyph_format_outline    FT_GLYPH_FORMAT_OUTLINE\n#define ft_glyph_format_plotter    FT_GLYPH_FORMAT_PLOTTER\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****            R A S T E R   D E F I N I T I O N S                *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n\n  /**************************************************************************\n   *\n   * @section:\n   *   raster\n   *\n   * @title:\n   *   Scanline Converter\n   *\n   * @abstract:\n   *   How vectorial outlines are converted into bitmaps and pixmaps.\n   *\n   * @description:\n   *   A raster or a rasterizer is a scan converter in charge of producing a\n   *   pixel coverage bitmap that can be used as an alpha channel when\n   *   compositing a glyph with a background.  FreeType comes with two\n   *   rasterizers: bilevel `raster1` and anti-aliased `smooth` are two\n   *   separate modules.  They are usually called from the high-level\n   *   @FT_Load_Glyph or @FT_Render_Glyph functions and produce the entire\n   *   coverage bitmap at once, while staying largely invisible to users.\n   *\n   *   Instead of working with complete coverage bitmaps, it is also possible\n   *   to intercept consecutive pixel runs on the same scanline with the same\n   *   coverage, called _spans_, and process them individually.  Only the\n   *   `smooth` rasterizer permits this when calling @FT_Outline_Render with\n   *   @FT_Raster_Params as described below.\n   *\n   *   Working with either complete bitmaps or spans it is important to think\n   *   of them as colorless coverage objects suitable as alpha channels to\n   *   blend arbitrary colors with a background.  For best results, it is\n   *   recommended to use gamma correction, too.\n   *\n   *   This section also describes the public API needed to set up alternative\n   *   @FT_Renderer modules.\n   *\n   * @order:\n   *   FT_Span\n   *   FT_SpanFunc\n   *   FT_Raster_Params\n   *   FT_RASTER_FLAG_XXX\n   *\n   *   FT_Raster\n   *   FT_Raster_NewFunc\n   *   FT_Raster_DoneFunc\n   *   FT_Raster_ResetFunc\n   *   FT_Raster_SetModeFunc\n   *   FT_Raster_RenderFunc\n   *   FT_Raster_Funcs\n   *\n   */\n\n\n  /**************************************************************************\n   *\n   * @struct:\n   *   FT_Span\n   *\n   * @description:\n   *   A structure to model a single span of consecutive pixels when\n   *   rendering an anti-aliased bitmap.\n   *\n   * @fields:\n   *   x ::\n   *     The span's horizontal start position.\n   *\n   *   len ::\n   *     The span's length in pixels.\n   *\n   *   coverage ::\n   *     The span color/coverage, ranging from 0 (background) to 255\n   *     (foreground).\n   *\n   * @note:\n   *   This structure is used by the span drawing callback type named\n   *   @FT_SpanFunc that takes the y~coordinate of the span as a parameter.\n   *\n   *   The anti-aliased rasterizer produces coverage values from 0 to 255,\n   *   this is, from completely transparent to completely opaque.\n   */\n  typedef struct  FT_Span_\n  {\n    short           x;\n    unsigned short  len;\n    unsigned char   coverage;\n\n  } FT_Span;\n\n\n  /**************************************************************************\n   *\n   * @functype:\n   *   FT_SpanFunc\n   *\n   * @description:\n   *   A function used as a call-back by the anti-aliased renderer in order\n   *   to let client applications draw themselves the pixel spans on each\n   *   scan line.\n   *\n   * @input:\n   *   y ::\n   *     The scanline's upward y~coordinate.\n   *\n   *   count ::\n   *     The number of spans to draw on this scanline.\n   *\n   *   spans ::\n   *     A table of `count` spans to draw on the scanline.\n   *\n   *   user ::\n   *     User-supplied data that is passed to the callback.\n   *\n   * @note:\n   *   This callback allows client applications to directly render the spans\n   *   of the anti-aliased bitmap to any kind of surfaces.\n   *\n   *   This can be used to write anti-aliased outlines directly to a given\n   *   background bitmap using alpha compositing.  It can also be used for\n   *   oversampling and averaging.\n   */\n  typedef void\n  (*FT_SpanFunc)( int             y,\n                  int             count,\n                  const FT_Span*  spans,\n                  void*           user );\n\n#define FT_Raster_Span_Func  FT_SpanFunc\n\n\n  /**************************************************************************\n   *\n   * @functype:\n   *   FT_Raster_BitTest_Func\n   *\n   * @description:\n   *   Deprecated, unimplemented.\n   */\n  typedef int\n  (*FT_Raster_BitTest_Func)( int    y,\n                             int    x,\n                             void*  user );\n\n\n  /**************************************************************************\n   *\n   * @functype:\n   *   FT_Raster_BitSet_Func\n   *\n   * @description:\n   *   Deprecated, unimplemented.\n   */\n  typedef void\n  (*FT_Raster_BitSet_Func)( int    y,\n                            int    x,\n                            void*  user );\n\n\n  /**************************************************************************\n   *\n   * @enum:\n   *   FT_RASTER_FLAG_XXX\n   *\n   * @description:\n   *   A list of bit flag constants as used in the `flags` field of a\n   *   @FT_Raster_Params structure.\n   *\n   * @values:\n   *   FT_RASTER_FLAG_DEFAULT ::\n   *     This value is 0.\n   *\n   *   FT_RASTER_FLAG_AA ::\n   *     This flag is set to indicate that an anti-aliased glyph image should\n   *     be generated.  Otherwise, it will be monochrome (1-bit).\n   *\n   *   FT_RASTER_FLAG_DIRECT ::\n   *     This flag is set to indicate direct rendering.  In this mode, client\n   *     applications must provide their own span callback.  This lets them\n   *     directly draw or compose over an existing bitmap.  If this bit is\n   *     _not_ set, the target pixmap's buffer _must_ be zeroed before\n   *     rendering and the output will be clipped to its size.\n   *\n   *     Direct rendering is only possible with anti-aliased glyphs.\n   *\n   *   FT_RASTER_FLAG_CLIP ::\n   *     This flag is only used in direct rendering mode.  If set, the output\n   *     will be clipped to a box specified in the `clip_box` field of the\n   *     @FT_Raster_Params structure.  Otherwise, the `clip_box` is\n   *     effectively set to the bounding box and all spans are generated.\n   *\n   *   FT_RASTER_FLAG_SDF ::\n   *     This flag is set to indicate that a signed distance field glyph\n   *     image should be generated.  This is only used while rendering with\n   *     the @FT_RENDER_MODE_SDF render mode.\n   */\n#define FT_RASTER_FLAG_DEFAULT  0x0\n#define FT_RASTER_FLAG_AA       0x1\n#define FT_RASTER_FLAG_DIRECT   0x2\n#define FT_RASTER_FLAG_CLIP     0x4\n#define FT_RASTER_FLAG_SDF      0x8\n\n  /* these constants are deprecated; use the corresponding */\n  /* `FT_RASTER_FLAG_XXX` values instead                   */\n#define ft_raster_flag_default  FT_RASTER_FLAG_DEFAULT\n#define ft_raster_flag_aa       FT_RASTER_FLAG_AA\n#define ft_raster_flag_direct   FT_RASTER_FLAG_DIRECT\n#define ft_raster_flag_clip     FT_RASTER_FLAG_CLIP\n\n\n  /**************************************************************************\n   *\n   * @struct:\n   *   FT_Raster_Params\n   *\n   * @description:\n   *   A structure to hold the parameters used by a raster's render function,\n   *   passed as an argument to @FT_Outline_Render.\n   *\n   * @fields:\n   *   target ::\n   *     The target bitmap.\n   *\n   *   source ::\n   *     A pointer to the source glyph image (e.g., an @FT_Outline).\n   *\n   *   flags ::\n   *     The rendering flags.\n   *\n   *   gray_spans ::\n   *     The gray span drawing callback.\n   *\n   *   black_spans ::\n   *     Unused.\n   *\n   *   bit_test ::\n   *     Unused.\n   *\n   *   bit_set ::\n   *     Unused.\n   *\n   *   user ::\n   *     User-supplied data that is passed to each drawing callback.\n   *\n   *   clip_box ::\n   *     An optional span clipping box expressed in _integer_ pixels\n   *     (not in 26.6 fixed-point units).\n   *\n   * @note:\n   *   The @FT_RASTER_FLAG_AA bit flag must be set in the `flags` to\n   *   generate an anti-aliased glyph bitmap, otherwise a monochrome bitmap\n   *   is generated.  The `target` should have appropriate pixel mode and its\n   *   dimensions define the clipping region.\n   *\n   *   If both @FT_RASTER_FLAG_AA and @FT_RASTER_FLAG_DIRECT bit flags\n   *   are set in `flags`, the raster calls an @FT_SpanFunc callback\n   *   `gray_spans` with `user` data as an argument ignoring `target`.  This\n   *   allows direct composition over a pre-existing user surface to perform\n   *   the span drawing and composition.  To optionally clip the spans, set\n   *   the @FT_RASTER_FLAG_CLIP flag and `clip_box`.  The monochrome raster\n   *   does not support the direct mode.\n   *\n   *   The gray-level rasterizer always uses 256 gray levels.  If you want\n   *   fewer gray levels, you have to use @FT_RASTER_FLAG_DIRECT and reduce\n   *   the levels in the callback function.\n   */\n  typedef struct  FT_Raster_Params_\n  {\n    const FT_Bitmap*        target;\n    const void*             source;\n    int                     flags;\n    FT_SpanFunc             gray_spans;\n    FT_SpanFunc             black_spans;  /* unused */\n    FT_Raster_BitTest_Func  bit_test;     /* unused */\n    FT_Raster_BitSet_Func   bit_set;      /* unused */\n    void*                   user;\n    FT_BBox                 clip_box;\n\n  } FT_Raster_Params;\n\n\n  /**************************************************************************\n   *\n   * @type:\n   *   FT_Raster\n   *\n   * @description:\n   *   An opaque handle (pointer) to a raster object.  Each object can be\n   *   used independently to convert an outline into a bitmap or pixmap.\n   *\n   * @note:\n   *   In FreeType 2, all rasters are now encapsulated within specific\n   *   @FT_Renderer modules and only used in their context.\n   *\n   */\n  typedef struct FT_RasterRec_*  FT_Raster;\n\n\n  /**************************************************************************\n   *\n   * @functype:\n   *   FT_Raster_NewFunc\n   *\n   * @description:\n   *   A function used to create a new raster object.\n   *\n   * @input:\n   *   memory ::\n   *     A handle to the memory allocator.\n   *\n   * @output:\n   *   raster ::\n   *     A handle to the new raster object.\n   *\n   * @return:\n   *   Error code.  0~means success.\n   *\n   * @note:\n   *   The `memory` parameter is a typeless pointer in order to avoid\n   *   un-wanted dependencies on the rest of the FreeType code.  In practice,\n   *   it is an @FT_Memory object, i.e., a handle to the standard FreeType\n   *   memory allocator.  However, this field can be completely ignored by a\n   *   given raster implementation.\n   */\n  typedef int\n  (*FT_Raster_NewFunc)( void*       memory,\n                        FT_Raster*  raster );\n\n#define FT_Raster_New_Func  FT_Raster_NewFunc\n\n\n  /**************************************************************************\n   *\n   * @functype:\n   *   FT_Raster_DoneFunc\n   *\n   * @description:\n   *   A function used to destroy a given raster object.\n   *\n   * @input:\n   *   raster ::\n   *     A handle to the raster object.\n   */\n  typedef void\n  (*FT_Raster_DoneFunc)( FT_Raster  raster );\n\n#define FT_Raster_Done_Func  FT_Raster_DoneFunc\n\n\n  /**************************************************************************\n   *\n   * @functype:\n   *   FT_Raster_ResetFunc\n   *\n   * @description:\n   *   FreeType used to provide an area of memory called the 'render pool'\n   *   available to all registered rasterizers.  This was not thread safe,\n   *   however, and now FreeType never allocates this pool.\n   *\n   *   This function is called after a new raster object is created.\n   *\n   * @input:\n   *   raster ::\n   *     A handle to the new raster object.\n   *\n   *   pool_base ::\n   *     Previously, the address in memory of the render pool.  Set this to\n   *     `NULL`.\n   *\n   *   pool_size ::\n   *     Previously, the size in bytes of the render pool.  Set this to 0.\n   *\n   * @note:\n   *   Rasterizers should rely on dynamic or stack allocation if they want to\n   *   (a handle to the memory allocator is passed to the rasterizer\n   *   constructor).\n   */\n  typedef void\n  (*FT_Raster_ResetFunc)( FT_Raster       raster,\n                          unsigned char*  pool_base,\n                          unsigned long   pool_size );\n\n#define FT_Raster_Reset_Func  FT_Raster_ResetFunc\n\n\n  /**************************************************************************\n   *\n   * @functype:\n   *   FT_Raster_SetModeFunc\n   *\n   * @description:\n   *   This function is a generic facility to change modes or attributes in a\n   *   given raster.  This can be used for debugging purposes, or simply to\n   *   allow implementation-specific 'features' in a given raster module.\n   *\n   * @input:\n   *   raster ::\n   *     A handle to the new raster object.\n   *\n   *   mode ::\n   *     A 4-byte tag used to name the mode or property.\n   *\n   *   args ::\n   *     A pointer to the new mode/property to use.\n   */\n  typedef int\n  (*FT_Raster_SetModeFunc)( FT_Raster      raster,\n                            unsigned long  mode,\n                            void*          args );\n\n#define FT_Raster_Set_Mode_Func  FT_Raster_SetModeFunc\n\n\n  /**************************************************************************\n   *\n   * @functype:\n   *   FT_Raster_RenderFunc\n   *\n   * @description:\n   *   Invoke a given raster to scan-convert a given glyph image into a\n   *   target bitmap.\n   *\n   * @input:\n   *   raster ::\n   *     A handle to the raster object.\n   *\n   *   params ::\n   *     A pointer to an @FT_Raster_Params structure used to store the\n   *     rendering parameters.\n   *\n   * @return:\n   *   Error code.  0~means success.\n   *\n   * @note:\n   *   The exact format of the source image depends on the raster's glyph\n   *   format defined in its @FT_Raster_Funcs structure.  It can be an\n   *   @FT_Outline or anything else in order to support a large array of\n   *   glyph formats.\n   *\n   *   Note also that the render function can fail and return a\n   *   `FT_Err_Unimplemented_Feature` error code if the raster used does not\n   *   support direct composition.\n   */\n  typedef int\n  (*FT_Raster_RenderFunc)( FT_Raster                raster,\n                           const FT_Raster_Params*  params );\n\n#define FT_Raster_Render_Func  FT_Raster_RenderFunc\n\n\n  /**************************************************************************\n   *\n   * @struct:\n   *   FT_Raster_Funcs\n   *\n   * @description:\n   *  A structure used to describe a given raster class to the library.\n   *\n   * @fields:\n   *   glyph_format ::\n   *     The supported glyph format for this raster.\n   *\n   *   raster_new ::\n   *     The raster constructor.\n   *\n   *   raster_reset ::\n   *     Used to reset the render pool within the raster.\n   *\n   *   raster_render ::\n   *     A function to render a glyph into a given bitmap.\n   *\n   *   raster_done ::\n   *     The raster destructor.\n   */\n  typedef struct  FT_Raster_Funcs_\n  {\n    FT_Glyph_Format        glyph_format;\n\n    FT_Raster_NewFunc      raster_new;\n    FT_Raster_ResetFunc    raster_reset;\n    FT_Raster_SetModeFunc  raster_set_mode;\n    FT_Raster_RenderFunc   raster_render;\n    FT_Raster_DoneFunc     raster_done;\n\n  } FT_Raster_Funcs;\n\n  /* */\n\n\nFT_END_HEADER\n\n#endif /* FTIMAGE_H_ */\n\n\n/* END */\n\n\n/* Local Variables: */\n/* coding: utf-8    */\n/* End:             */\n"
  },
  {
    "path": "thirdparty/freetype/include/freetype2/freetype/ftincrem.h",
    "content": "/****************************************************************************\n *\n * ftincrem.h\n *\n *   FreeType incremental loading (specification).\n *\n * Copyright (C) 2002-2021 by\n * David Turner, Robert Wilhelm, and Werner Lemberg.\n *\n * This file is part of the FreeType project, and may only be used,\n * modified, and distributed under the terms of the FreeType project\n * license, LICENSE.TXT.  By continuing to use, modify, or distribute\n * this file you indicate that you have read the license and\n * understand and accept it fully.\n *\n */\n\n\n#ifndef FTINCREM_H_\n#define FTINCREM_H_\n\n#include <freetype/freetype.h>\n#include <freetype/ftparams.h>\n\n#ifdef FREETYPE_H\n#error \"freetype.h of FreeType 1 has been loaded!\"\n#error \"Please fix the directory search order for header files\"\n#error \"so that freetype.h of FreeType 2 is found first.\"\n#endif\n\n\nFT_BEGIN_HEADER\n\n  /**************************************************************************\n   *\n   * @section:\n   *    incremental\n   *\n   * @title:\n   *    Incremental Loading\n   *\n   * @abstract:\n   *    Custom Glyph Loading.\n   *\n   * @description:\n   *   This section contains various functions used to perform so-called\n   *   'incremental' glyph loading.  This is a mode where all glyphs loaded\n   *   from a given @FT_Face are provided by the client application.\n   *\n   *   Apart from that, all other tables are loaded normally from the font\n   *   file.  This mode is useful when FreeType is used within another\n   *   engine, e.g., a PostScript Imaging Processor.\n   *\n   *   To enable this mode, you must use @FT_Open_Face, passing an\n   *   @FT_Parameter with the @FT_PARAM_TAG_INCREMENTAL tag and an\n   *   @FT_Incremental_Interface value.  See the comments for\n   *   @FT_Incremental_InterfaceRec for an example.\n   *\n   */\n\n\n  /**************************************************************************\n   *\n   * @type:\n   *   FT_Incremental\n   *\n   * @description:\n   *   An opaque type describing a user-provided object used to implement\n   *   'incremental' glyph loading within FreeType.  This is used to support\n   *   embedded fonts in certain environments (e.g., PostScript\n   *   interpreters), where the glyph data isn't in the font file, or must be\n   *   overridden by different values.\n   *\n   * @note:\n   *   It is up to client applications to create and implement\n   *   @FT_Incremental objects, as long as they provide implementations for\n   *   the methods @FT_Incremental_GetGlyphDataFunc,\n   *   @FT_Incremental_FreeGlyphDataFunc and\n   *   @FT_Incremental_GetGlyphMetricsFunc.\n   *\n   *   See the description of @FT_Incremental_InterfaceRec to understand how\n   *   to use incremental objects with FreeType.\n   *\n   */\n  typedef struct FT_IncrementalRec_*  FT_Incremental;\n\n\n  /**************************************************************************\n   *\n   * @struct:\n   *   FT_Incremental_MetricsRec\n   *\n   * @description:\n   *   A small structure used to contain the basic glyph metrics returned by\n   *   the @FT_Incremental_GetGlyphMetricsFunc method.\n   *\n   * @fields:\n   *   bearing_x ::\n   *     Left bearing, in font units.\n   *\n   *   bearing_y ::\n   *     Top bearing, in font units.\n   *\n   *   advance ::\n   *     Horizontal component of glyph advance, in font units.\n   *\n   *   advance_v ::\n   *     Vertical component of glyph advance, in font units.\n   *\n   * @note:\n   *   These correspond to horizontal or vertical metrics depending on the\n   *   value of the `vertical` argument to the function\n   *   @FT_Incremental_GetGlyphMetricsFunc.\n   *\n   */\n  typedef struct  FT_Incremental_MetricsRec_\n  {\n    FT_Long  bearing_x;\n    FT_Long  bearing_y;\n    FT_Long  advance;\n    FT_Long  advance_v;     /* since 2.3.12 */\n\n  } FT_Incremental_MetricsRec;\n\n\n  /**************************************************************************\n   *\n   * @struct:\n   *   FT_Incremental_Metrics\n   *\n   * @description:\n   *   A handle to an @FT_Incremental_MetricsRec structure.\n   *\n   */\n   typedef struct FT_Incremental_MetricsRec_*  FT_Incremental_Metrics;\n\n\n  /**************************************************************************\n   *\n   * @type:\n   *   FT_Incremental_GetGlyphDataFunc\n   *\n   * @description:\n   *   A function called by FreeType to access a given glyph's data bytes\n   *   during @FT_Load_Glyph or @FT_Load_Char if incremental loading is\n   *   enabled.\n   *\n   *   Note that the format of the glyph's data bytes depends on the font\n   *   file format.  For TrueType, it must correspond to the raw bytes within\n   *   the 'glyf' table.  For PostScript formats, it must correspond to the\n   *   **unencrypted** charstring bytes, without any `lenIV` header.  It is\n   *   undefined for any other format.\n   *\n   * @input:\n   *   incremental ::\n   *     Handle to an opaque @FT_Incremental handle provided by the client\n   *     application.\n   *\n   *   glyph_index ::\n   *     Index of relevant glyph.\n   *\n   * @output:\n   *   adata ::\n   *     A structure describing the returned glyph data bytes (which will be\n   *     accessed as a read-only byte block).\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *   If this function returns successfully the method\n   *   @FT_Incremental_FreeGlyphDataFunc will be called later to release the\n   *   data bytes.\n   *\n   *   Nested calls to @FT_Incremental_GetGlyphDataFunc can happen for\n   *   compound glyphs.\n   *\n   */\n  typedef FT_Error\n  (*FT_Incremental_GetGlyphDataFunc)( FT_Incremental  incremental,\n                                      FT_UInt         glyph_index,\n                                      FT_Data*        adata );\n\n\n  /**************************************************************************\n   *\n   * @type:\n   *   FT_Incremental_FreeGlyphDataFunc\n   *\n   * @description:\n   *   A function used to release the glyph data bytes returned by a\n   *   successful call to @FT_Incremental_GetGlyphDataFunc.\n   *\n   * @input:\n   *   incremental ::\n   *     A handle to an opaque @FT_Incremental handle provided by the client\n   *     application.\n   *\n   *   data ::\n   *     A structure describing the glyph data bytes (which will be accessed\n   *     as a read-only byte block).\n   *\n   */\n  typedef void\n  (*FT_Incremental_FreeGlyphDataFunc)( FT_Incremental  incremental,\n                                       FT_Data*        data );\n\n\n  /**************************************************************************\n   *\n   * @type:\n   *   FT_Incremental_GetGlyphMetricsFunc\n   *\n   * @description:\n   *   A function used to retrieve the basic metrics of a given glyph index\n   *   before accessing its data.  This allows for handling font types such\n   *   as PCL~XL Format~1, Class~2 downloaded TrueType fonts, where the glyph\n   *   metrics (`hmtx` and `vmtx` tables) are permitted to be omitted from\n   *   the font, and the relevant metrics included in the header of the glyph\n   *   outline data.  Importantly, this is not intended to allow custom glyph\n   *   metrics (for example, Postscript Metrics dictionaries), because that\n   *   conflicts with the requirements of outline hinting.  Such custom\n   *   metrics must be handled separately, by the calling application.\n   *\n   * @input:\n   *   incremental ::\n   *     A handle to an opaque @FT_Incremental handle provided by the client\n   *     application.\n   *\n   *   glyph_index ::\n   *     Index of relevant glyph.\n   *\n   *   vertical ::\n   *     If true, return vertical metrics.\n   *\n   *   ametrics ::\n   *     This parameter is used for both input and output.  The original\n   *     glyph metrics, if any, in font units.  If metrics are not available\n   *     all the values must be set to zero.\n   *\n   * @output:\n   *   ametrics ::\n   *     The glyph metrics in font units.\n   *\n   */\n  typedef FT_Error\n  (*FT_Incremental_GetGlyphMetricsFunc)\n                      ( FT_Incremental              incremental,\n                        FT_UInt                     glyph_index,\n                        FT_Bool                     vertical,\n                        FT_Incremental_MetricsRec  *ametrics );\n\n\n  /**************************************************************************\n   *\n   * @struct:\n   *   FT_Incremental_FuncsRec\n   *\n   * @description:\n   *   A table of functions for accessing fonts that load data incrementally.\n   *   Used in @FT_Incremental_InterfaceRec.\n   *\n   * @fields:\n   *   get_glyph_data ::\n   *     The function to get glyph data.  Must not be null.\n   *\n   *   free_glyph_data ::\n   *     The function to release glyph data.  Must not be null.\n   *\n   *   get_glyph_metrics ::\n   *     The function to get glyph metrics.  May be null if the font does not\n   *     require it.\n   *\n   */\n  typedef struct  FT_Incremental_FuncsRec_\n  {\n    FT_Incremental_GetGlyphDataFunc     get_glyph_data;\n    FT_Incremental_FreeGlyphDataFunc    free_glyph_data;\n    FT_Incremental_GetGlyphMetricsFunc  get_glyph_metrics;\n\n  } FT_Incremental_FuncsRec;\n\n\n  /**************************************************************************\n   *\n   * @struct:\n   *   FT_Incremental_InterfaceRec\n   *\n   * @description:\n   *   A structure to be used with @FT_Open_Face to indicate that the user\n   *   wants to support incremental glyph loading.  You should use it with\n   *   @FT_PARAM_TAG_INCREMENTAL as in the following example:\n   *\n   *   ```\n   *     FT_Incremental_InterfaceRec  inc_int;\n   *     FT_Parameter                 parameter;\n   *     FT_Open_Args                 open_args;\n   *\n   *\n   *     // set up incremental descriptor\n   *     inc_int.funcs  = my_funcs;\n   *     inc_int.object = my_object;\n   *\n   *     // set up optional parameter\n   *     parameter.tag  = FT_PARAM_TAG_INCREMENTAL;\n   *     parameter.data = &inc_int;\n   *\n   *     // set up FT_Open_Args structure\n   *     open_args.flags      = FT_OPEN_PATHNAME | FT_OPEN_PARAMS;\n   *     open_args.pathname   = my_font_pathname;\n   *     open_args.num_params = 1;\n   *     open_args.params     = &parameter; // we use one optional argument\n   *\n   *     // open the font\n   *     error = FT_Open_Face( library, &open_args, index, &face );\n   *     ...\n   *   ```\n   *\n   */\n  typedef struct  FT_Incremental_InterfaceRec_\n  {\n    const FT_Incremental_FuncsRec*  funcs;\n    FT_Incremental                  object;\n\n  } FT_Incremental_InterfaceRec;\n\n\n  /**************************************************************************\n   *\n   * @type:\n   *   FT_Incremental_Interface\n   *\n   * @description:\n   *   A pointer to an @FT_Incremental_InterfaceRec structure.\n   *\n   */\n  typedef FT_Incremental_InterfaceRec*   FT_Incremental_Interface;\n\n\n  /* */\n\n\nFT_END_HEADER\n\n#endif /* FTINCREM_H_ */\n\n\n/* END */\n"
  },
  {
    "path": "thirdparty/freetype/include/freetype2/freetype/ftlcdfil.h",
    "content": "/****************************************************************************\n *\n * ftlcdfil.h\n *\n *   FreeType API for color filtering of subpixel bitmap glyphs\n *   (specification).\n *\n * Copyright (C) 2006-2021 by\n * David Turner, Robert Wilhelm, and Werner Lemberg.\n *\n * This file is part of the FreeType project, and may only be used,\n * modified, and distributed under the terms of the FreeType project\n * license, LICENSE.TXT.  By continuing to use, modify, or distribute\n * this file you indicate that you have read the license and\n * understand and accept it fully.\n *\n */\n\n\n#ifndef FTLCDFIL_H_\n#define FTLCDFIL_H_\n\n#include <freetype/freetype.h>\n#include <freetype/ftparams.h>\n\n#ifdef FREETYPE_H\n#error \"freetype.h of FreeType 1 has been loaded!\"\n#error \"Please fix the directory search order for header files\"\n#error \"so that freetype.h of FreeType 2 is found first.\"\n#endif\n\n\nFT_BEGIN_HEADER\n\n  /**************************************************************************\n   *\n   * @section:\n   *   lcd_rendering\n   *\n   * @title:\n   *   Subpixel Rendering\n   *\n   * @abstract:\n   *   API to control subpixel rendering.\n   *\n   * @description:\n   *   FreeType provides two alternative subpixel rendering technologies. \n   *   Should you define `FT_CONFIG_OPTION_SUBPIXEL_RENDERING` in your\n   *   `ftoption.h` file, this enables ClearType-style rendering.\n   *   Otherwise, Harmony LCD rendering is enabled.  These technologies are\n   *   controlled differently and API described below, although always\n   *   available, performs its function when appropriate method is enabled\n   *   and does nothing otherwise.\n   *\n   *   ClearType-style LCD rendering exploits the color-striped structure of\n   *   LCD pixels, increasing the available resolution in the direction of\n   *   the stripe (usually horizontal RGB) by a factor of~3.  Using the\n   *   subpixel coverages unfiltered can create severe color fringes\n   *   especially when rendering thin features.  Indeed, to produce\n   *   black-on-white text, the nearby color subpixels must be dimmed\n   *   evenly.  Therefore, an equalizing 5-tap FIR filter should be applied\n   *   to subpixel coverages regardless of pixel boundaries and should have\n   *   these properties:\n   *\n   *   1. It should be symmetrical, like {~a, b, c, b, a~}, to avoid\n   *      any shifts in appearance.\n   *\n   *   2. It should be color-balanced, meaning a~+ b~=~c, to reduce color\n   *      fringes by distributing the computed coverage for one subpixel to\n   *      all subpixels equally.\n   *\n   *   3. It should be normalized, meaning 2a~+ 2b~+ c~=~1.0 to maintain\n   *      overall brightness.\n   *\n   *   Boxy 3-tap filter {0, 1/3, 1/3, 1/3, 0} is sharper but is less\n   *   forgiving of non-ideal gamma curves of a screen (and viewing angles),\n   *   beveled filters are fuzzier but more tolerant.\n   *\n   *   Use the @FT_Library_SetLcdFilter or @FT_Library_SetLcdFilterWeights\n   *   API to specify a low-pass filter, which is then applied to\n   *   subpixel-rendered bitmaps generated through @FT_Render_Glyph.\n   *\n   *   Harmony LCD rendering is suitable to panels with any regular subpixel\n   *   structure, not just monitors with 3 color striped subpixels, as long\n   *   as the color subpixels have fixed positions relative to the pixel\n   *   center.  In this case, each color channel can be rendered separately\n   *   after shifting the outline opposite to the subpixel shift so that the\n   *   coverage maps are aligned.  This method is immune to color fringes\n   *   because the shifts do not change integral coverage.\n   *\n   *   The subpixel geometry must be specified by xy-coordinates for each\n   *   subpixel. By convention they may come in the RGB order: {{-1/3, 0},\n   *   {0, 0}, {1/3, 0}} for standard RGB striped panel or {{-1/6, 1/4},\n   *   {-1/6, -1/4}, {1/3, 0}} for a certain PenTile panel.\n   *\n   *   Use the @FT_Library_SetLcdGeometry API to specify subpixel positions.\n   *   If one follows the RGB order convention, the same order applies to the\n   *   resulting @FT_PIXEL_MODE_LCD and @FT_PIXEL_MODE_LCD_V bitmaps.  Note,\n   *   however, that the coordinate frame for the latter must be rotated\n   *   clockwise.  Harmony with default LCD geometry is equivalent to\n   *   ClearType with light filter.\n   *\n   *   As a result of ClearType filtering or Harmony shifts, the resulting\n   *   dimensions of LCD bitmaps can be slightly wider or taller than the\n   *   dimensions the original outline with regard to the pixel grid.\n   *   For example, for @FT_RENDER_MODE_LCD, the filter adds 2~subpixels to\n   *   the left, and 2~subpixels to the right.  The bitmap offset values are\n   *   adjusted accordingly, so clients shouldn't need to modify their layout\n   *   and glyph positioning code when enabling the filter.\n   *\n   *   The ClearType and Harmony rendering is applicable to glyph bitmaps\n   *   rendered through @FT_Render_Glyph, @FT_Load_Glyph, @FT_Load_Char, and\n   *   @FT_Glyph_To_Bitmap, when @FT_RENDER_MODE_LCD or @FT_RENDER_MODE_LCD_V\n   *   is specified.  This API does not control @FT_Outline_Render and\n   *   @FT_Outline_Get_Bitmap.\n   *\n   *   The described algorithms can completely remove color artefacts when\n   *   combined with gamma-corrected alpha blending in linear space.  Each of\n   *   the 3~alpha values (subpixels) must by independently used to blend one\n   *   color channel.  That is, red alpha blends the red channel of the text\n   *   color with the red channel of the background pixel.\n   */\n\n\n  /**************************************************************************\n   *\n   * @enum:\n   *   FT_LcdFilter\n   *\n   * @description:\n   *   A list of values to identify various types of LCD filters.\n   *\n   * @values:\n   *   FT_LCD_FILTER_NONE ::\n   *     Do not perform filtering.  When used with subpixel rendering, this\n   *     results in sometimes severe color fringes.\n   *\n   *   FT_LCD_FILTER_DEFAULT ::\n   *     This is a beveled, normalized, and color-balanced five-tap filter\n   *     with weights of [0x08 0x4D 0x56 0x4D 0x08] in 1/256th units.\n   *\n   *   FT_LCD_FILTER_LIGHT ::\n   *     this is a boxy, normalized, and color-balanced three-tap filter with\n   *     weights of [0x00 0x55 0x56 0x55 0x00] in 1/256th units.\n   *\n   *   FT_LCD_FILTER_LEGACY ::\n   *   FT_LCD_FILTER_LEGACY1 ::\n   *     This filter corresponds to the original libXft color filter.  It\n   *     provides high contrast output but can exhibit really bad color\n   *     fringes if glyphs are not extremely well hinted to the pixel grid.\n   *     This filter is only provided for comparison purposes, and might be\n   *     disabled or stay unsupported in the future. The second value is\n   *     provided for compatibility with FontConfig, which historically used\n   *     different enumeration, sometimes incorrectly forwarded to FreeType.\n   *\n   * @since:\n   *   2.3.0 (`FT_LCD_FILTER_LEGACY1` since 2.6.2)\n   */\n  typedef enum  FT_LcdFilter_\n  {\n    FT_LCD_FILTER_NONE    = 0,\n    FT_LCD_FILTER_DEFAULT = 1,\n    FT_LCD_FILTER_LIGHT   = 2,\n    FT_LCD_FILTER_LEGACY1 = 3,\n    FT_LCD_FILTER_LEGACY  = 16,\n\n    FT_LCD_FILTER_MAX   /* do not remove */\n\n  } FT_LcdFilter;\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Library_SetLcdFilter\n   *\n   * @description:\n   *   This function is used to change filter applied to LCD decimated\n   *   bitmaps, like the ones used when calling @FT_Render_Glyph with\n   *   @FT_RENDER_MODE_LCD or @FT_RENDER_MODE_LCD_V.\n   *\n   * @input:\n   *   library ::\n   *     A handle to the target library instance.\n   *\n   *   filter ::\n   *     The filter type.\n   *\n   *     You can use @FT_LCD_FILTER_NONE here to disable this feature, or\n   *     @FT_LCD_FILTER_DEFAULT to use a default filter that should work well\n   *     on most LCD screens.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *   Since 2.10.3 the LCD filtering is enabled with @FT_LCD_FILTER_DEFAULT.\n   *   It is no longer necessary to call this function explicitly except\n   *   to choose a different filter or disable filtering altogether with\n   *   @FT_LCD_FILTER_NONE.\n   *\n   *   This function does nothing but returns `FT_Err_Unimplemented_Feature`\n   *   if the configuration macro `FT_CONFIG_OPTION_SUBPIXEL_RENDERING` is\n   *   not defined in your build of the library.\n   *\n   * @since:\n   *   2.3.0\n   */\n  FT_EXPORT( FT_Error )\n  FT_Library_SetLcdFilter( FT_Library    library,\n                           FT_LcdFilter  filter );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Library_SetLcdFilterWeights\n   *\n   * @description:\n   *   This function can be used to enable LCD filter with custom weights,\n   *   instead of using presets in @FT_Library_SetLcdFilter.\n   *\n   * @input:\n   *   library ::\n   *     A handle to the target library instance.\n   *\n   *   weights ::\n   *     A pointer to an array; the function copies the first five bytes and\n   *     uses them to specify the filter weights in 1/256th units.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *   This function does nothing but returns `FT_Err_Unimplemented_Feature`\n   *   if the configuration macro `FT_CONFIG_OPTION_SUBPIXEL_RENDERING` is\n   *   not defined in your build of the library.\n   *\n   *   LCD filter weights can also be set per face using @FT_Face_Properties\n   *   with @FT_PARAM_TAG_LCD_FILTER_WEIGHTS.\n   *\n   * @since:\n   *   2.4.0\n   */\n  FT_EXPORT( FT_Error )\n  FT_Library_SetLcdFilterWeights( FT_Library      library,\n                                  unsigned char  *weights );\n\n\n  /**************************************************************************\n   *\n   * @type:\n   *   FT_LcdFiveTapFilter\n   *\n   * @description:\n   *   A typedef for passing the five LCD filter weights to\n   *   @FT_Face_Properties within an @FT_Parameter structure.\n   *\n   * @since:\n   *   2.8\n   *\n   */\n#define FT_LCD_FILTER_FIVE_TAPS  5\n\n  typedef FT_Byte  FT_LcdFiveTapFilter[FT_LCD_FILTER_FIVE_TAPS];\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Library_SetLcdGeometry\n   *\n   * @description:\n   *   This function can be used to modify default positions of color\n   *   subpixels, which controls Harmony LCD rendering.\n   *\n   * @input:\n   *   library ::\n   *     A handle to the target library instance.\n   *\n   *   sub ::\n   *     A pointer to an array of 3 vectors in 26.6 fractional pixel format;\n   *     the function modifies the default values, see the note below.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *   Subpixel geometry examples:\n   *\n   *   - {{-21, 0}, {0, 0}, {21, 0}} is the default, corresponding to 3 color\n   *   stripes shifted by a third of a pixel. This could be an RGB panel.\n   *\n   *   - {{21, 0}, {0, 0}, {-21, 0}} looks the same as the default but can\n   *   specify a BGR panel instead, while keeping the bitmap in the same\n   *   RGB888 format.\n   *\n   *   - {{0, 21}, {0, 0}, {0, -21}} is the vertical RGB, but the bitmap\n   *   stays RGB888 as a result.\n   *\n   *   - {{-11, 16}, {-11, -16}, {22, 0}} is a certain PenTile arrangement.\n   *\n   *   This function does nothing and returns `FT_Err_Unimplemented_Feature`\n   *   in the context of ClearType-style subpixel rendering when\n   *   `FT_CONFIG_OPTION_SUBPIXEL_RENDERING` is defined in your build of the\n   *   library.\n   *\n   * @since:\n   *   2.10.0\n   */\n  FT_EXPORT( FT_Error )\n  FT_Library_SetLcdGeometry( FT_Library  library,\n                             FT_Vector   sub[3] );\n\n  /* */\n\n\nFT_END_HEADER\n\n#endif /* FTLCDFIL_H_ */\n\n\n/* END */\n"
  },
  {
    "path": "thirdparty/freetype/include/freetype2/freetype/ftlist.h",
    "content": "/****************************************************************************\n *\n * ftlist.h\n *\n *   Generic list support for FreeType (specification).\n *\n * Copyright (C) 1996-2021 by\n * David Turner, Robert Wilhelm, and Werner Lemberg.\n *\n * This file is part of the FreeType project, and may only be used,\n * modified, and distributed under the terms of the FreeType project\n * license, LICENSE.TXT.  By continuing to use, modify, or distribute\n * this file you indicate that you have read the license and\n * understand and accept it fully.\n *\n */\n\n\n  /**************************************************************************\n   *\n   * This file implements functions relative to list processing.  Its data\n   * structures are defined in `freetype.h`.\n   *\n   */\n\n\n#ifndef FTLIST_H_\n#define FTLIST_H_\n\n\n#include <freetype/freetype.h>\n\n#ifdef FREETYPE_H\n#error \"freetype.h of FreeType 1 has been loaded!\"\n#error \"Please fix the directory search order for header files\"\n#error \"so that freetype.h of FreeType 2 is found first.\"\n#endif\n\n\nFT_BEGIN_HEADER\n\n\n  /**************************************************************************\n   *\n   * @section:\n   *   list_processing\n   *\n   * @title:\n   *   List Processing\n   *\n   * @abstract:\n   *   Simple management of lists.\n   *\n   * @description:\n   *   This section contains various definitions related to list processing\n   *   using doubly-linked nodes.\n   *\n   * @order:\n   *   FT_List\n   *   FT_ListNode\n   *   FT_ListRec\n   *   FT_ListNodeRec\n   *\n   *   FT_List_Add\n   *   FT_List_Insert\n   *   FT_List_Find\n   *   FT_List_Remove\n   *   FT_List_Up\n   *   FT_List_Iterate\n   *   FT_List_Iterator\n   *   FT_List_Finalize\n   *   FT_List_Destructor\n   *\n   */\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_List_Find\n   *\n   * @description:\n   *   Find the list node for a given listed object.\n   *\n   * @input:\n   *   list ::\n   *     A pointer to the parent list.\n   *   data ::\n   *     The address of the listed object.\n   *\n   * @return:\n   *   List node.  `NULL` if it wasn't found.\n   */\n  FT_EXPORT( FT_ListNode )\n  FT_List_Find( FT_List  list,\n                void*    data );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_List_Add\n   *\n   * @description:\n   *   Append an element to the end of a list.\n   *\n   * @inout:\n   *   list ::\n   *     A pointer to the parent list.\n   *   node ::\n   *     The node to append.\n   */\n  FT_EXPORT( void )\n  FT_List_Add( FT_List      list,\n               FT_ListNode  node );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_List_Insert\n   *\n   * @description:\n   *   Insert an element at the head of a list.\n   *\n   * @inout:\n   *   list ::\n   *     A pointer to parent list.\n   *   node ::\n   *     The node to insert.\n   */\n  FT_EXPORT( void )\n  FT_List_Insert( FT_List      list,\n                  FT_ListNode  node );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_List_Remove\n   *\n   * @description:\n   *   Remove a node from a list.  This function doesn't check whether the\n   *   node is in the list!\n   *\n   * @input:\n   *   node ::\n   *     The node to remove.\n   *\n   * @inout:\n   *   list ::\n   *     A pointer to the parent list.\n   */\n  FT_EXPORT( void )\n  FT_List_Remove( FT_List      list,\n                  FT_ListNode  node );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_List_Up\n   *\n   * @description:\n   *   Move a node to the head/top of a list.  Used to maintain LRU lists.\n   *\n   * @inout:\n   *   list ::\n   *     A pointer to the parent list.\n   *   node ::\n   *     The node to move.\n   */\n  FT_EXPORT( void )\n  FT_List_Up( FT_List      list,\n              FT_ListNode  node );\n\n\n  /**************************************************************************\n   *\n   * @functype:\n   *   FT_List_Iterator\n   *\n   * @description:\n   *   An FT_List iterator function that is called during a list parse by\n   *   @FT_List_Iterate.\n   *\n   * @input:\n   *   node ::\n   *     The current iteration list node.\n   *\n   *   user ::\n   *     A typeless pointer passed to @FT_List_Iterate.  Can be used to point\n   *     to the iteration's state.\n   */\n  typedef FT_Error\n  (*FT_List_Iterator)( FT_ListNode  node,\n                       void*        user );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_List_Iterate\n   *\n   * @description:\n   *   Parse a list and calls a given iterator function on each element.\n   *   Note that parsing is stopped as soon as one of the iterator calls\n   *   returns a non-zero value.\n   *\n   * @input:\n   *   list ::\n   *     A handle to the list.\n   *   iterator ::\n   *     An iterator function, called on each node of the list.\n   *   user ::\n   *     A user-supplied field that is passed as the second argument to the\n   *     iterator.\n   *\n   * @return:\n   *   The result (a FreeType error code) of the last iterator call.\n   */\n  FT_EXPORT( FT_Error )\n  FT_List_Iterate( FT_List           list,\n                   FT_List_Iterator  iterator,\n                   void*             user );\n\n\n  /**************************************************************************\n   *\n   * @functype:\n   *   FT_List_Destructor\n   *\n   * @description:\n   *   An @FT_List iterator function that is called during a list\n   *   finalization by @FT_List_Finalize to destroy all elements in a given\n   *   list.\n   *\n   * @input:\n   *   system ::\n   *     The current system object.\n   *\n   *   data ::\n   *     The current object to destroy.\n   *\n   *   user ::\n   *     A typeless pointer passed to @FT_List_Iterate.  It can be used to\n   *     point to the iteration's state.\n   */\n  typedef void\n  (*FT_List_Destructor)( FT_Memory  memory,\n                         void*      data,\n                         void*      user );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_List_Finalize\n   *\n   * @description:\n   *   Destroy all elements in the list as well as the list itself.\n   *\n   * @input:\n   *   list ::\n   *     A handle to the list.\n   *\n   *   destroy ::\n   *     A list destructor that will be applied to each element of the list.\n   *     Set this to `NULL` if not needed.\n   *\n   *   memory ::\n   *     The current memory object that handles deallocation.\n   *\n   *   user ::\n   *     A user-supplied field that is passed as the last argument to the\n   *     destructor.\n   *\n   * @note:\n   *   This function expects that all nodes added by @FT_List_Add or\n   *   @FT_List_Insert have been dynamically allocated.\n   */\n  FT_EXPORT( void )\n  FT_List_Finalize( FT_List             list,\n                    FT_List_Destructor  destroy,\n                    FT_Memory           memory,\n                    void*               user );\n\n  /* */\n\n\nFT_END_HEADER\n\n#endif /* FTLIST_H_ */\n\n\n/* END */\n"
  },
  {
    "path": "thirdparty/freetype/include/freetype2/freetype/ftlogging.h",
    "content": "/****************************************************************************\n *\n * ftlogging.h\n *\n *   Additional debugging APIs.\n *\n * Copyright (C) 2020-2021 by\n * David Turner, Robert Wilhelm, and Werner Lemberg.\n *\n * This file is part of the FreeType project, and may only be used,\n * modified, and distributed under the terms of the FreeType project\n * license, LICENSE.TXT.  By continuing to use, modify, or distribute\n * this file you indicate that you have read the license and\n * understand and accept it fully.\n *\n */\n\n\n#ifndef FTLOGGING_H_\n#define FTLOGGING_H_\n\n\n#include <ft2build.h>\n#include FT_CONFIG_CONFIG_H\n\n\nFT_BEGIN_HEADER\n\n\n  /**************************************************************************\n   *\n   * @section:\n   *   debugging_apis\n   *\n   * @title:\n   *   External Debugging APIs\n   *\n   * @abstract:\n   *   Public APIs to control the `FT_DEBUG_LOGGING` macro.\n   *\n   * @description:\n   *   This section contains the declarations of public functions that\n   *   enables fine control of what the `FT_DEBUG_LOGGING` macro outputs.\n   *\n   */\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Trace_Set_Level\n   *\n   * @description:\n   *   Change the levels of tracing components of FreeType at run time.\n   *\n   * @input:\n   *   tracing_level ::\n   *     New tracing value.\n   *\n   * @example:\n   *   The following call makes FreeType trace everything but the 'memory'\n   *   component.\n   *\n   *   ```\n   *   FT_Trace_Set_Level( \"any:7 memory:0 );\n   *   ```\n   *\n   * @note:\n   *   This function does nothing if compilation option `FT_DEBUG_LOGGING`\n   *   isn't set.\n   *\n   * @since:\n   *   2.11\n   *\n   */\n  FT_EXPORT( void )\n  FT_Trace_Set_Level( const char*  tracing_level );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Trace_Set_Default_Level\n   *\n   * @description:\n   *   Reset tracing value of FreeType's components to the default value\n   *   (i.e., to the value of the `FT2_DEBUG` environment value or to NULL\n   *   if `FT2_DEBUG` is not set).\n   *\n   * @note:\n   *   This function does nothing if compilation option `FT_DEBUG_LOGGING`\n   *   isn't set.\n   *\n   * @since:\n   *   2.11\n   *\n   */\n  FT_EXPORT( void )\n  FT_Trace_Set_Default_Level( void );\n\n\n  /**************************************************************************\n   *\n   * @functype:\n   *   FT_Custom_Log_Handler\n   *\n   * @description:\n   *   A function typedef that is used to handle the logging of tracing and\n   *   debug messages on a file system.\n   *\n   * @input:\n   *   ft_component ::\n   *     The name of `FT_COMPONENT` from which the current debug or error\n   *     message is produced.\n   *\n   *   fmt ::\n   *     Actual debug or tracing message.\n   *\n   *   args::\n   *     Arguments of debug or tracing messages.\n   *\n   * @since:\n   *   2.11\n   *\n   */\n  typedef void\n  (*FT_Custom_Log_Handler)( const char*  ft_component,\n                            const char*  fmt,\n                            va_list      args );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Set_Log_Handler\n   *\n   * @description:\n   *   A function to set a custom log handler.\n   *\n   * @input:\n   *   handler ::\n   *     New logging function.\n   *\n   * @note:\n   *   This function does nothing if compilation option `FT_DEBUG_LOGGING`\n   *   isn't set.\n   *\n   * @since:\n   *   2.11\n   *\n   */\n  FT_EXPORT( void )\n  FT_Set_Log_Handler( FT_Custom_Log_Handler  handler );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Set_Default_Log_Handler\n   *\n   * @description:\n   *   A function to undo the effect of @FT_Set_Log_Handler, resetting the\n   *   log handler to FreeType's built-in version.\n   *\n   * @note:\n   *   This function does nothing if compilation option `FT_DEBUG_LOGGING`\n   *   isn't set.\n   *\n   * @since:\n   *   2.11\n   *\n   */\n  FT_EXPORT( void )\n  FT_Set_Default_Log_Handler( void );\n\n  /* */\n\n\nFT_END_HEADER\n\n#endif /* FTLOGGING_H_ */\n\n\n/* END */\n"
  },
  {
    "path": "thirdparty/freetype/include/freetype2/freetype/ftlzw.h",
    "content": "/****************************************************************************\n *\n * ftlzw.h\n *\n *   LZW-compressed stream support.\n *\n * Copyright (C) 2004-2021 by\n * David Turner, Robert Wilhelm, and Werner Lemberg.\n *\n * This file is part of the FreeType project, and may only be used,\n * modified, and distributed under the terms of the FreeType project\n * license, LICENSE.TXT.  By continuing to use, modify, or distribute\n * this file you indicate that you have read the license and\n * understand and accept it fully.\n *\n */\n\n\n#ifndef FTLZW_H_\n#define FTLZW_H_\n\n#include <freetype/freetype.h>\n\n#ifdef FREETYPE_H\n#error \"freetype.h of FreeType 1 has been loaded!\"\n#error \"Please fix the directory search order for header files\"\n#error \"so that freetype.h of FreeType 2 is found first.\"\n#endif\n\n\nFT_BEGIN_HEADER\n\n  /**************************************************************************\n   *\n   * @section:\n   *   lzw\n   *\n   * @title:\n   *   LZW Streams\n   *\n   * @abstract:\n   *   Using LZW-compressed font files.\n   *\n   * @description:\n   *   In certain builds of the library, LZW compression recognition is\n   *   automatically handled when calling @FT_New_Face or @FT_Open_Face.\n   *   This means that if no font driver is capable of handling the raw\n   *   compressed file, the library will try to open a LZW stream from it and\n   *   re-open the face with it.\n   *\n   *   The stream implementation is very basic and resets the decompression\n   *   process each time seeking backwards is needed within the stream,\n   *   which significantly undermines the performance.\n   *\n   *   This section contains the declaration of LZW-specific functions.\n   *\n   */\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Stream_OpenLZW\n   *\n   * @description:\n   *   Open a new stream to parse LZW-compressed font files.  This is mainly\n   *   used to support the compressed `*.pcf.Z` fonts that come with XFree86.\n   *\n   * @input:\n   *   stream ::\n   *     The target embedding stream.\n   *\n   *   source ::\n   *     The source stream.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *   The source stream must be opened _before_ calling this function.\n   *\n   *   Calling the internal function `FT_Stream_Close` on the new stream will\n   *   **not** call `FT_Stream_Close` on the source stream.  None of the\n   *   stream objects will be released to the heap.\n   *\n   *   This function may return `FT_Err_Unimplemented_Feature` if your build\n   *   of FreeType was not compiled with LZW support.\n   */\n  FT_EXPORT( FT_Error )\n  FT_Stream_OpenLZW( FT_Stream  stream,\n                     FT_Stream  source );\n\n  /* */\n\n\nFT_END_HEADER\n\n#endif /* FTLZW_H_ */\n\n\n/* END */\n"
  },
  {
    "path": "thirdparty/freetype/include/freetype2/freetype/ftmac.h",
    "content": "/****************************************************************************\n *\n * ftmac.h\n *\n *   Additional Mac-specific API.\n *\n * Copyright (C) 1996-2021 by\n * Just van Rossum, David Turner, Robert Wilhelm, and Werner Lemberg.\n *\n * This file is part of the FreeType project, and may only be used,\n * modified, and distributed under the terms of the FreeType project\n * license, LICENSE.TXT.  By continuing to use, modify, or distribute\n * this file you indicate that you have read the license and\n * understand and accept it fully.\n *\n */\n\n\n/****************************************************************************\n *\n * NOTE: Include this file after `FT_FREETYPE_H` and after any\n *       Mac-specific headers (because this header uses Mac types such as\n *       'Handle', 'FSSpec', 'FSRef', etc.)\n *\n */\n\n\n#ifndef FTMAC_H_\n#define FTMAC_H_\n\n\n\n\nFT_BEGIN_HEADER\n\n\n  /* gcc-3.1 and later can warn about functions tagged as deprecated */\n#ifndef FT_DEPRECATED_ATTRIBUTE\n#if defined( __GNUC__ )                                     && \\\n    ( ( __GNUC__ >= 4 )                                  ||    \\\n      ( ( __GNUC__ == 3 ) && ( __GNUC_MINOR__ >= 1 ) ) )\n#define FT_DEPRECATED_ATTRIBUTE  __attribute__(( deprecated ))\n#else\n#define FT_DEPRECATED_ATTRIBUTE\n#endif\n#endif\n\n\n  /**************************************************************************\n   *\n   * @section:\n   *   mac_specific\n   *\n   * @title:\n   *   Mac Specific Interface\n   *\n   * @abstract:\n   *   Only available on the Macintosh.\n   *\n   * @description:\n   *   The following definitions are only available if FreeType is compiled\n   *   on a Macintosh.\n   *\n   */\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_New_Face_From_FOND\n   *\n   * @description:\n   *   Create a new face object from a FOND resource.\n   *\n   * @inout:\n   *   library ::\n   *     A handle to the library resource.\n   *\n   * @input:\n   *   fond ::\n   *     A FOND resource.\n   *\n   *   face_index ::\n   *     Only supported for the -1 'sanity check' special case.\n   *\n   * @output:\n   *   aface ::\n   *     A handle to a new face object.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @example:\n   *   This function can be used to create @FT_Face objects from fonts that\n   *   are installed in the system as follows.\n   *\n   *   ```\n   *     fond  = GetResource( 'FOND', fontName );\n   *     error = FT_New_Face_From_FOND( library, fond, 0, &face );\n   *   ```\n   */\n  FT_EXPORT( FT_Error )\n  FT_New_Face_From_FOND( FT_Library  library,\n                         Handle      fond,\n                         FT_Long     face_index,\n                         FT_Face    *aface )\n                       FT_DEPRECATED_ATTRIBUTE;\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_GetFile_From_Mac_Name\n   *\n   * @description:\n   *   Return an FSSpec for the disk file containing the named font.\n   *\n   * @input:\n   *   fontName ::\n   *     Mac OS name of the font (e.g., Times New Roman Bold).\n   *\n   * @output:\n   *   pathSpec ::\n   *     FSSpec to the file.  For passing to @FT_New_Face_From_FSSpec.\n   *\n   *   face_index ::\n   *     Index of the face.  For passing to @FT_New_Face_From_FSSpec.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   */\n  FT_EXPORT( FT_Error )\n  FT_GetFile_From_Mac_Name( const char*  fontName,\n                            FSSpec*      pathSpec,\n                            FT_Long*     face_index )\n                          FT_DEPRECATED_ATTRIBUTE;\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_GetFile_From_Mac_ATS_Name\n   *\n   * @description:\n   *   Return an FSSpec for the disk file containing the named font.\n   *\n   * @input:\n   *   fontName ::\n   *     Mac OS name of the font in ATS framework.\n   *\n   * @output:\n   *   pathSpec ::\n   *     FSSpec to the file. For passing to @FT_New_Face_From_FSSpec.\n   *\n   *   face_index ::\n   *     Index of the face. For passing to @FT_New_Face_From_FSSpec.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   */\n  FT_EXPORT( FT_Error )\n  FT_GetFile_From_Mac_ATS_Name( const char*  fontName,\n                                FSSpec*      pathSpec,\n                                FT_Long*     face_index )\n                              FT_DEPRECATED_ATTRIBUTE;\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_GetFilePath_From_Mac_ATS_Name\n   *\n   * @description:\n   *   Return a pathname of the disk file and face index for given font name\n   *   that is handled by ATS framework.\n   *\n   * @input:\n   *   fontName ::\n   *     Mac OS name of the font in ATS framework.\n   *\n   * @output:\n   *   path ::\n   *     Buffer to store pathname of the file.  For passing to @FT_New_Face.\n   *     The client must allocate this buffer before calling this function.\n   *\n   *   maxPathSize ::\n   *     Lengths of the buffer `path` that client allocated.\n   *\n   *   face_index ::\n   *     Index of the face.  For passing to @FT_New_Face.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   */\n  FT_EXPORT( FT_Error )\n  FT_GetFilePath_From_Mac_ATS_Name( const char*  fontName,\n                                    UInt8*       path,\n                                    UInt32       maxPathSize,\n                                    FT_Long*     face_index )\n                                  FT_DEPRECATED_ATTRIBUTE;\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_New_Face_From_FSSpec\n   *\n   * @description:\n   *   Create a new face object from a given resource and typeface index\n   *   using an FSSpec to the font file.\n   *\n   * @inout:\n   *   library ::\n   *     A handle to the library resource.\n   *\n   * @input:\n   *   spec ::\n   *     FSSpec to the font file.\n   *\n   *   face_index ::\n   *     The index of the face within the resource.  The first face has\n   *     index~0.\n   * @output:\n   *   aface ::\n   *     A handle to a new face object.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *   @FT_New_Face_From_FSSpec is identical to @FT_New_Face except it\n   *   accepts an FSSpec instead of a path.\n   */\n  FT_EXPORT( FT_Error )\n  FT_New_Face_From_FSSpec( FT_Library     library,\n                           const FSSpec  *spec,\n                           FT_Long        face_index,\n                           FT_Face       *aface )\n                         FT_DEPRECATED_ATTRIBUTE;\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_New_Face_From_FSRef\n   *\n   * @description:\n   *   Create a new face object from a given resource and typeface index\n   *   using an FSRef to the font file.\n   *\n   * @inout:\n   *   library ::\n   *     A handle to the library resource.\n   *\n   * @input:\n   *   spec ::\n   *     FSRef to the font file.\n   *\n   *   face_index ::\n   *     The index of the face within the resource.  The first face has\n   *     index~0.\n   * @output:\n   *   aface ::\n   *     A handle to a new face object.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *   @FT_New_Face_From_FSRef is identical to @FT_New_Face except it accepts\n   *   an FSRef instead of a path.\n   */\n  FT_EXPORT( FT_Error )\n  FT_New_Face_From_FSRef( FT_Library    library,\n                          const FSRef  *ref,\n                          FT_Long       face_index,\n                          FT_Face      *aface )\n                        FT_DEPRECATED_ATTRIBUTE;\n\n  /* */\n\n\nFT_END_HEADER\n\n\n#endif /* FTMAC_H_ */\n\n\n/* END */\n"
  },
  {
    "path": "thirdparty/freetype/include/freetype2/freetype/ftmm.h",
    "content": "/****************************************************************************\n *\n * ftmm.h\n *\n *   FreeType Multiple Master font interface (specification).\n *\n * Copyright (C) 1996-2021 by\n * David Turner, Robert Wilhelm, and Werner Lemberg.\n *\n * This file is part of the FreeType project, and may only be used,\n * modified, and distributed under the terms of the FreeType project\n * license, LICENSE.TXT.  By continuing to use, modify, or distribute\n * this file you indicate that you have read the license and\n * understand and accept it fully.\n *\n */\n\n\n#ifndef FTMM_H_\n#define FTMM_H_\n\n\n#include <freetype/t1tables.h>\n\n\nFT_BEGIN_HEADER\n\n\n  /**************************************************************************\n   *\n   * @section:\n   *   multiple_masters\n   *\n   * @title:\n   *   Multiple Masters\n   *\n   * @abstract:\n   *   How to manage Multiple Masters fonts.\n   *\n   * @description:\n   *   The following types and functions are used to manage Multiple Master\n   *   fonts, i.e., the selection of specific design instances by setting\n   *   design axis coordinates.\n   *\n   *   Besides Adobe MM fonts, the interface supports Apple's TrueType GX and\n   *   OpenType variation fonts.  Some of the routines only work with Adobe\n   *   MM fonts, others will work with all three types.  They are similar\n   *   enough that a consistent interface makes sense.\n   *\n   */\n\n\n  /**************************************************************************\n   *\n   * @struct:\n   *   FT_MM_Axis\n   *\n   * @description:\n   *   A structure to model a given axis in design space for Multiple Masters\n   *   fonts.\n   *\n   *   This structure can't be used for TrueType GX or OpenType variation\n   *   fonts.\n   *\n   * @fields:\n   *   name ::\n   *     The axis's name.\n   *\n   *   minimum ::\n   *     The axis's minimum design coordinate.\n   *\n   *   maximum ::\n   *     The axis's maximum design coordinate.\n   */\n  typedef struct  FT_MM_Axis_\n  {\n    FT_String*  name;\n    FT_Long     minimum;\n    FT_Long     maximum;\n\n  } FT_MM_Axis;\n\n\n  /**************************************************************************\n   *\n   * @struct:\n   *   FT_Multi_Master\n   *\n   * @description:\n   *   A structure to model the axes and space of a Multiple Masters font.\n   *\n   *   This structure can't be used for TrueType GX or OpenType variation\n   *   fonts.\n   *\n   * @fields:\n   *   num_axis ::\n   *     Number of axes.  Cannot exceed~4.\n   *\n   *   num_designs ::\n   *     Number of designs; should be normally 2^num_axis even though the\n   *     Type~1 specification strangely allows for intermediate designs to be\n   *     present.  This number cannot exceed~16.\n   *\n   *   axis ::\n   *     A table of axis descriptors.\n   */\n  typedef struct  FT_Multi_Master_\n  {\n    FT_UInt     num_axis;\n    FT_UInt     num_designs;\n    FT_MM_Axis  axis[T1_MAX_MM_AXIS];\n\n  } FT_Multi_Master;\n\n\n  /**************************************************************************\n   *\n   * @struct:\n   *   FT_Var_Axis\n   *\n   * @description:\n   *   A structure to model a given axis in design space for Multiple\n   *   Masters, TrueType GX, and OpenType variation fonts.\n   *\n   * @fields:\n   *   name ::\n   *     The axis's name.  Not always meaningful for TrueType GX or OpenType\n   *     variation fonts.\n   *\n   *   minimum ::\n   *     The axis's minimum design coordinate.\n   *\n   *   def ::\n   *     The axis's default design coordinate.  FreeType computes meaningful\n   *     default values for Adobe MM fonts.\n   *\n   *   maximum ::\n   *     The axis's maximum design coordinate.\n   *\n   *   tag ::\n   *     The axis's tag (the equivalent to 'name' for TrueType GX and\n   *     OpenType variation fonts).  FreeType provides default values for\n   *     Adobe MM fonts if possible.\n   *\n   *   strid ::\n   *     The axis name entry in the font's 'name' table.  This is another\n   *     (and often better) version of the 'name' field for TrueType GX or\n   *     OpenType variation fonts.  Not meaningful for Adobe MM fonts.\n   *\n   * @note:\n   *   The fields `minimum`, `def`, and `maximum` are 16.16 fractional values\n   *   for TrueType GX and OpenType variation fonts.  For Adobe MM fonts, the\n   *   values are integers.\n   */\n  typedef struct  FT_Var_Axis_\n  {\n    FT_String*  name;\n\n    FT_Fixed    minimum;\n    FT_Fixed    def;\n    FT_Fixed    maximum;\n\n    FT_ULong    tag;\n    FT_UInt     strid;\n\n  } FT_Var_Axis;\n\n\n  /**************************************************************************\n   *\n   * @struct:\n   *   FT_Var_Named_Style\n   *\n   * @description:\n   *   A structure to model a named instance in a TrueType GX or OpenType\n   *   variation font.\n   *\n   *   This structure can't be used for Adobe MM fonts.\n   *\n   * @fields:\n   *   coords ::\n   *     The design coordinates for this instance.  This is an array with one\n   *     entry for each axis.\n   *\n   *   strid ::\n   *     The entry in 'name' table identifying this instance.\n   *\n   *   psid ::\n   *     The entry in 'name' table identifying a PostScript name for this\n   *     instance.  Value 0xFFFF indicates a missing entry.\n   */\n  typedef struct  FT_Var_Named_Style_\n  {\n    FT_Fixed*  coords;\n    FT_UInt    strid;\n    FT_UInt    psid;   /* since 2.7.1 */\n\n  } FT_Var_Named_Style;\n\n\n  /**************************************************************************\n   *\n   * @struct:\n   *   FT_MM_Var\n   *\n   * @description:\n   *   A structure to model the axes and space of an Adobe MM, TrueType GX,\n   *   or OpenType variation font.\n   *\n   *   Some fields are specific to one format and not to the others.\n   *\n   * @fields:\n   *   num_axis ::\n   *     The number of axes.  The maximum value is~4 for Adobe MM fonts; no\n   *     limit in TrueType GX or OpenType variation fonts.\n   *\n   *   num_designs ::\n   *     The number of designs; should be normally 2^num_axis for Adobe MM\n   *     fonts.  Not meaningful for TrueType GX or OpenType variation fonts\n   *     (where every glyph could have a different number of designs).\n   *\n   *   num_namedstyles ::\n   *     The number of named styles; a 'named style' is a tuple of design\n   *     coordinates that has a string ID (in the 'name' table) associated\n   *     with it.  The font can tell the user that, for example,\n   *     [Weight=1.5,Width=1.1] is 'Bold'.  Another name for 'named style' is\n   *     'named instance'.\n   *\n   *     For Adobe Multiple Masters fonts, this value is always zero because\n   *     the format does not support named styles.\n   *\n   *   axis ::\n   *     An axis descriptor table.  TrueType GX and OpenType variation fonts\n   *     contain slightly more data than Adobe MM fonts.  Memory management\n   *     of this pointer is done internally by FreeType.\n   *\n   *   namedstyle ::\n   *     A named style (instance) table.  Only meaningful for TrueType GX and\n   *     OpenType variation fonts.  Memory management of this pointer is done\n   *     internally by FreeType.\n   */\n  typedef struct  FT_MM_Var_\n  {\n    FT_UInt              num_axis;\n    FT_UInt              num_designs;\n    FT_UInt              num_namedstyles;\n    FT_Var_Axis*         axis;\n    FT_Var_Named_Style*  namedstyle;\n\n  } FT_MM_Var;\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Get_Multi_Master\n   *\n   * @description:\n   *   Retrieve a variation descriptor of a given Adobe MM font.\n   *\n   *   This function can't be used with TrueType GX or OpenType variation\n   *   fonts.\n   *\n   * @input:\n   *   face ::\n   *     A handle to the source face.\n   *\n   * @output:\n   *   amaster ::\n   *     The Multiple Masters descriptor.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   */\n  FT_EXPORT( FT_Error )\n  FT_Get_Multi_Master( FT_Face           face,\n                       FT_Multi_Master  *amaster );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Get_MM_Var\n   *\n   * @description:\n   *   Retrieve a variation descriptor for a given font.\n   *\n   *   This function works with all supported variation formats.\n   *\n   * @input:\n   *   face ::\n   *     A handle to the source face.\n   *\n   * @output:\n   *   amaster ::\n   *     The variation descriptor.  Allocates a data structure, which the\n   *     user must deallocate with a call to @FT_Done_MM_Var after use.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   */\n  FT_EXPORT( FT_Error )\n  FT_Get_MM_Var( FT_Face      face,\n                 FT_MM_Var*  *amaster );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Done_MM_Var\n   *\n   * @description:\n   *   Free the memory allocated by @FT_Get_MM_Var.\n   *\n   * @input:\n   *   library ::\n   *     A handle of the face's parent library object that was used in the\n   *     call to @FT_Get_MM_Var to create `amaster`.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   */\n  FT_EXPORT( FT_Error )\n  FT_Done_MM_Var( FT_Library   library,\n                  FT_MM_Var   *amaster );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Set_MM_Design_Coordinates\n   *\n   * @description:\n   *   For Adobe MM fonts, choose an interpolated font design through design\n   *   coordinates.\n   *\n   *   This function can't be used with TrueType GX or OpenType variation\n   *   fonts.\n   *\n   * @inout:\n   *   face ::\n   *     A handle to the source face.\n   *\n   * @input:\n   *   num_coords ::\n   *     The number of available design coordinates.  If it is larger than\n   *     the number of axes, ignore the excess values.  If it is smaller than\n   *     the number of axes, use default values for the remaining axes.\n   *\n   *   coords ::\n   *     An array of design coordinates.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *   [Since 2.8.1] To reset all axes to the default values, call the\n   *   function with `num_coords` set to zero and `coords` set to `NULL`.\n   *\n   *   [Since 2.9] If `num_coords` is larger than zero, this function sets\n   *   the @FT_FACE_FLAG_VARIATION bit in @FT_Face's `face_flags` field\n   *   (i.e., @FT_IS_VARIATION will return true).  If `num_coords` is zero,\n   *   this bit flag gets unset.\n   */\n  FT_EXPORT( FT_Error )\n  FT_Set_MM_Design_Coordinates( FT_Face   face,\n                                FT_UInt   num_coords,\n                                FT_Long*  coords );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Set_Var_Design_Coordinates\n   *\n   * @description:\n   *   Choose an interpolated font design through design coordinates.\n   *\n   *   This function works with all supported variation formats.\n   *\n   * @inout:\n   *   face ::\n   *     A handle to the source face.\n   *\n   * @input:\n   *   num_coords ::\n   *     The number of available design coordinates.  If it is larger than\n   *     the number of axes, ignore the excess values.  If it is smaller than\n   *     the number of axes, use default values for the remaining axes.\n   *\n   *   coords ::\n   *     An array of design coordinates.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *   [Since 2.8.1] To reset all axes to the default values, call the\n   *   function with `num_coords` set to zero and `coords` set to `NULL`.\n   *   [Since 2.9] 'Default values' means the currently selected named\n   *   instance (or the base font if no named instance is selected).\n   *\n   *   [Since 2.9] If `num_coords` is larger than zero, this function sets\n   *   the @FT_FACE_FLAG_VARIATION bit in @FT_Face's `face_flags` field\n   *   (i.e., @FT_IS_VARIATION will return true).  If `num_coords` is zero,\n   *   this bit flag gets unset.\n   */\n  FT_EXPORT( FT_Error )\n  FT_Set_Var_Design_Coordinates( FT_Face    face,\n                                 FT_UInt    num_coords,\n                                 FT_Fixed*  coords );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Get_Var_Design_Coordinates\n   *\n   * @description:\n   *   Get the design coordinates of the currently selected interpolated\n   *   font.\n   *\n   *   This function works with all supported variation formats.\n   *\n   * @input:\n   *   face ::\n   *     A handle to the source face.\n   *\n   *   num_coords ::\n   *     The number of design coordinates to retrieve.  If it is larger than\n   *     the number of axes, set the excess values to~0.\n   *\n   * @output:\n   *   coords ::\n   *     The design coordinates array.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @since:\n   *   2.7.1\n   */\n  FT_EXPORT( FT_Error )\n  FT_Get_Var_Design_Coordinates( FT_Face    face,\n                                 FT_UInt    num_coords,\n                                 FT_Fixed*  coords );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Set_MM_Blend_Coordinates\n   *\n   * @description:\n   *   Choose an interpolated font design through normalized blend\n   *   coordinates.\n   *\n   *   This function works with all supported variation formats.\n   *\n   * @inout:\n   *   face ::\n   *     A handle to the source face.\n   *\n   * @input:\n   *   num_coords ::\n   *     The number of available design coordinates.  If it is larger than\n   *     the number of axes, ignore the excess values.  If it is smaller than\n   *     the number of axes, use default values for the remaining axes.\n   *\n   *   coords ::\n   *     The design coordinates array (each element must be between 0 and 1.0\n   *     for Adobe MM fonts, and between -1.0 and 1.0 for TrueType GX and\n   *     OpenType variation fonts).\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *   [Since 2.8.1] To reset all axes to the default values, call the\n   *   function with `num_coords` set to zero and `coords` set to `NULL`.\n   *   [Since 2.9] 'Default values' means the currently selected named\n   *   instance (or the base font if no named instance is selected).\n   *\n   *   [Since 2.9] If `num_coords` is larger than zero, this function sets\n   *   the @FT_FACE_FLAG_VARIATION bit in @FT_Face's `face_flags` field\n   *   (i.e., @FT_IS_VARIATION will return true).  If `num_coords` is zero,\n   *   this bit flag gets unset.\n   */\n  FT_EXPORT( FT_Error )\n  FT_Set_MM_Blend_Coordinates( FT_Face    face,\n                               FT_UInt    num_coords,\n                               FT_Fixed*  coords );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Get_MM_Blend_Coordinates\n   *\n   * @description:\n   *   Get the normalized blend coordinates of the currently selected\n   *   interpolated font.\n   *\n   *   This function works with all supported variation formats.\n   *\n   * @input:\n   *   face ::\n   *     A handle to the source face.\n   *\n   *   num_coords ::\n   *     The number of normalized blend coordinates to retrieve.  If it is\n   *     larger than the number of axes, set the excess values to~0.5 for\n   *     Adobe MM fonts, and to~0 for TrueType GX and OpenType variation\n   *     fonts.\n   *\n   * @output:\n   *   coords ::\n   *     The normalized blend coordinates array.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @since:\n   *   2.7.1\n   */\n  FT_EXPORT( FT_Error )\n  FT_Get_MM_Blend_Coordinates( FT_Face    face,\n                               FT_UInt    num_coords,\n                               FT_Fixed*  coords );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Set_Var_Blend_Coordinates\n   *\n   * @description:\n   *   This is another name of @FT_Set_MM_Blend_Coordinates.\n   */\n  FT_EXPORT( FT_Error )\n  FT_Set_Var_Blend_Coordinates( FT_Face    face,\n                                FT_UInt    num_coords,\n                                FT_Fixed*  coords );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Get_Var_Blend_Coordinates\n   *\n   * @description:\n   *   This is another name of @FT_Get_MM_Blend_Coordinates.\n   *\n   * @since:\n   *   2.7.1\n   */\n  FT_EXPORT( FT_Error )\n  FT_Get_Var_Blend_Coordinates( FT_Face    face,\n                                FT_UInt    num_coords,\n                                FT_Fixed*  coords );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Set_MM_WeightVector\n   *\n   * @description:\n   *   For Adobe MM fonts, choose an interpolated font design by directly\n   *   setting the weight vector.\n   *\n   *   This function can't be used with TrueType GX or OpenType variation\n   *   fonts.\n   *\n   * @inout:\n   *   face ::\n   *     A handle to the source face.\n   *\n   * @input:\n   *   len ::\n   *     The length of the weight vector array.  If it is larger than the\n   *     number of designs, the extra values are ignored.  If it is less than\n   *     the number of designs, the remaining values are set to zero.\n   *\n   *   weightvector ::\n   *     An array representing the weight vector.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *   Adobe Multiple Master fonts limit the number of designs, and thus the\n   *   length of the weight vector to~16.\n   *\n   *   If `len` is zero and `weightvector` is `NULL`, the weight vector array\n   *   is reset to the default values.\n   *\n   *   The Adobe documentation also states that the values in the\n   *   WeightVector array must total 1.0 +/-~0.001.  In practice this does\n   *   not seem to be enforced, so is not enforced here, either.\n   *\n   * @since:\n   *   2.10\n   */\n  FT_EXPORT( FT_Error )\n  FT_Set_MM_WeightVector( FT_Face    face,\n                          FT_UInt    len,\n                          FT_Fixed*  weightvector );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Get_MM_WeightVector\n   *\n   * @description:\n   *   For Adobe MM fonts, retrieve the current weight vector of the font.\n   *\n   *   This function can't be used with TrueType GX or OpenType variation\n   *   fonts.\n   *\n   * @inout:\n   *   face ::\n   *     A handle to the source face.\n   *\n   *   len ::\n   *     A pointer to the size of the array to be filled.  If the size of the\n   *     array is less than the number of designs, `FT_Err_Invalid_Argument`\n   *     is returned, and `len` is set to the required size (the number of\n   *     designs).  If the size of the array is greater than the number of\n   *     designs, the remaining entries are set to~0.  On successful\n   *     completion, `len` is set to the number of designs (i.e., the number\n   *     of values written to the array).\n   *\n   * @output:\n   *   weightvector ::\n   *     An array to be filled.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *   Adobe Multiple Master fonts limit the number of designs, and thus the\n   *   length of the WeightVector to~16.\n   *\n   * @since:\n   *   2.10\n   */\n  FT_EXPORT( FT_Error )\n  FT_Get_MM_WeightVector( FT_Face    face,\n                          FT_UInt*   len,\n                          FT_Fixed*  weightvector );\n\n\n  /**************************************************************************\n   *\n   * @enum:\n   *   FT_VAR_AXIS_FLAG_XXX\n   *\n   * @description:\n   *   A list of bit flags used in the return value of\n   *   @FT_Get_Var_Axis_Flags.\n   *\n   * @values:\n   *   FT_VAR_AXIS_FLAG_HIDDEN ::\n   *     The variation axis should not be exposed to user interfaces.\n   *\n   * @since:\n   *   2.8.1\n   */\n#define FT_VAR_AXIS_FLAG_HIDDEN  1\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Get_Var_Axis_Flags\n   *\n   * @description:\n   *   Get the 'flags' field of an OpenType Variation Axis Record.\n   *\n   *   Not meaningful for Adobe MM fonts (`*flags` is always zero).\n   *\n   * @input:\n   *   master ::\n   *     The variation descriptor.\n   *\n   *   axis_index ::\n   *     The index of the requested variation axis.\n   *\n   * @output:\n   *   flags ::\n   *     The 'flags' field.  See @FT_VAR_AXIS_FLAG_XXX for possible values.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @since:\n   *   2.8.1\n   */\n  FT_EXPORT( FT_Error )\n  FT_Get_Var_Axis_Flags( FT_MM_Var*  master,\n                         FT_UInt     axis_index,\n                         FT_UInt*    flags );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Set_Named_Instance\n   *\n   * @description:\n   *   Set or change the current named instance.\n   *\n   * @input:\n   *   face ::\n   *     A handle to the source face.\n   *\n   *   instance_index ::\n   *     The index of the requested instance, starting with value 1.  If set\n   *     to value 0, FreeType switches to font access without a named\n   *     instance.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *   The function uses the value of `instance_index` to set bits 16-30 of\n   *   the face's `face_index` field.  It also resets any variation applied\n   *   to the font, and the @FT_FACE_FLAG_VARIATION bit of the face's\n   *   `face_flags` field gets reset to zero (i.e., @FT_IS_VARIATION will\n   *   return false).\n   *\n   *   For Adobe MM fonts (which don't have named instances) this function\n   *   simply resets the current face to the default instance.\n   *\n   * @since:\n   *   2.9\n   */\n  FT_EXPORT( FT_Error )\n  FT_Set_Named_Instance( FT_Face  face,\n                         FT_UInt  instance_index );\n\n  /* */\n\n\nFT_END_HEADER\n\n#endif /* FTMM_H_ */\n\n\n/* END */\n"
  },
  {
    "path": "thirdparty/freetype/include/freetype2/freetype/ftmodapi.h",
    "content": "/****************************************************************************\n *\n * ftmodapi.h\n *\n *   FreeType modules public interface (specification).\n *\n * Copyright (C) 1996-2021 by\n * David Turner, Robert Wilhelm, and Werner Lemberg.\n *\n * This file is part of the FreeType project, and may only be used,\n * modified, and distributed under the terms of the FreeType project\n * license, LICENSE.TXT.  By continuing to use, modify, or distribute\n * this file you indicate that you have read the license and\n * understand and accept it fully.\n *\n */\n\n\n#ifndef FTMODAPI_H_\n#define FTMODAPI_H_\n\n\n#include <freetype/freetype.h>\n\n#ifdef FREETYPE_H\n#error \"freetype.h of FreeType 1 has been loaded!\"\n#error \"Please fix the directory search order for header files\"\n#error \"so that freetype.h of FreeType 2 is found first.\"\n#endif\n\n\nFT_BEGIN_HEADER\n\n\n  /**************************************************************************\n   *\n   * @section:\n   *   module_management\n   *\n   * @title:\n   *   Module Management\n   *\n   * @abstract:\n   *   How to add, upgrade, remove, and control modules from FreeType.\n   *\n   * @description:\n   *   The definitions below are used to manage modules within FreeType.\n   *   Internal and external modules can be added, upgraded, and removed at\n   *   runtime.  For example, an alternative renderer or proprietary font\n   *   driver can be registered and prioritized.  Additionally, some module\n   *   properties can also be controlled.\n   *\n   *   Here is a list of existing values of the `module_name` field in the\n   *   @FT_Module_Class structure.\n   *\n   *   ```\n   *     autofitter\n   *     bdf\n   *     cff\n   *     gxvalid\n   *     otvalid\n   *     pcf\n   *     pfr\n   *     psaux\n   *     pshinter\n   *     psnames\n   *     raster1\n   *     sfnt\n   *     smooth\n   *     truetype\n   *     type1\n   *     type42\n   *     t1cid\n   *     winfonts\n   *   ```\n   *\n   *   Note that the FreeType Cache sub-system is not a FreeType module.\n   *\n   * @order:\n   *   FT_Module\n   *   FT_Module_Constructor\n   *   FT_Module_Destructor\n   *   FT_Module_Requester\n   *   FT_Module_Class\n   *\n   *   FT_Add_Module\n   *   FT_Get_Module\n   *   FT_Remove_Module\n   *   FT_Add_Default_Modules\n   *\n   *   FT_FACE_DRIVER_NAME\n   *   FT_Property_Set\n   *   FT_Property_Get\n   *   FT_Set_Default_Properties\n   *\n   *   FT_New_Library\n   *   FT_Done_Library\n   *   FT_Reference_Library\n   *\n   *   FT_Renderer\n   *   FT_Renderer_Class\n   *\n   *   FT_Get_Renderer\n   *   FT_Set_Renderer\n   *\n   *   FT_Set_Debug_Hook\n   *\n   */\n\n\n  /* module bit flags */\n#define FT_MODULE_FONT_DRIVER         1  /* this module is a font driver  */\n#define FT_MODULE_RENDERER            2  /* this module is a renderer     */\n#define FT_MODULE_HINTER              4  /* this module is a glyph hinter */\n#define FT_MODULE_STYLER              8  /* this module is a styler       */\n\n#define FT_MODULE_DRIVER_SCALABLE      0x100  /* the driver supports      */\n                                              /* scalable fonts           */\n#define FT_MODULE_DRIVER_NO_OUTLINES   0x200  /* the driver does not      */\n                                              /* support vector outlines  */\n#define FT_MODULE_DRIVER_HAS_HINTER    0x400  /* the driver provides its  */\n                                              /* own hinter               */\n#define FT_MODULE_DRIVER_HINTS_LIGHTLY 0x800  /* the driver's hinter      */\n                                              /* produces LIGHT hints     */\n\n\n  /* deprecated values */\n#define ft_module_font_driver         FT_MODULE_FONT_DRIVER\n#define ft_module_renderer            FT_MODULE_RENDERER\n#define ft_module_hinter              FT_MODULE_HINTER\n#define ft_module_styler              FT_MODULE_STYLER\n\n#define ft_module_driver_scalable       FT_MODULE_DRIVER_SCALABLE\n#define ft_module_driver_no_outlines    FT_MODULE_DRIVER_NO_OUTLINES\n#define ft_module_driver_has_hinter     FT_MODULE_DRIVER_HAS_HINTER\n#define ft_module_driver_hints_lightly  FT_MODULE_DRIVER_HINTS_LIGHTLY\n\n\n  typedef FT_Pointer  FT_Module_Interface;\n\n\n  /**************************************************************************\n   *\n   * @functype:\n   *   FT_Module_Constructor\n   *\n   * @description:\n   *   A function used to initialize (not create) a new module object.\n   *\n   * @input:\n   *   module ::\n   *     The module to initialize.\n   */\n  typedef FT_Error\n  (*FT_Module_Constructor)( FT_Module  module );\n\n\n  /**************************************************************************\n   *\n   * @functype:\n   *   FT_Module_Destructor\n   *\n   * @description:\n   *   A function used to finalize (not destroy) a given module object.\n   *\n   * @input:\n   *   module ::\n   *     The module to finalize.\n   */\n  typedef void\n  (*FT_Module_Destructor)( FT_Module  module );\n\n\n  /**************************************************************************\n   *\n   * @functype:\n   *   FT_Module_Requester\n   *\n   * @description:\n   *   A function used to query a given module for a specific interface.\n   *\n   * @input:\n   *   module ::\n   *     The module to be searched.\n   *\n   *   name ::\n   *     The name of the interface in the module.\n   */\n  typedef FT_Module_Interface\n  (*FT_Module_Requester)( FT_Module    module,\n                          const char*  name );\n\n\n  /**************************************************************************\n   *\n   * @struct:\n   *   FT_Module_Class\n   *\n   * @description:\n   *   The module class descriptor.  While being a public structure necessary\n   *   for FreeType's module bookkeeping, most of the fields are essentially\n   *   internal, not to be used directly by an application.\n   *\n   * @fields:\n   *   module_flags ::\n   *     Bit flags describing the module.\n   *\n   *   module_size ::\n   *     The size of one module object/instance in bytes.\n   *\n   *   module_name ::\n   *     The name of the module.\n   *\n   *   module_version ::\n   *     The version, as a 16.16 fixed number (major.minor).\n   *\n   *   module_requires ::\n   *     The version of FreeType this module requires, as a 16.16 fixed\n   *     number (major.minor).  Starts at version 2.0, i.e., 0x20000.\n   *\n   *   module_interface ::\n   *     A typeless pointer to a structure (which varies between different\n   *     modules) that holds the module's interface functions.  This is\n   *     essentially what `get_interface` returns.\n   *\n   *   module_init ::\n   *     The initializing function.\n   *\n   *   module_done ::\n   *     The finalizing function.\n   *\n   *   get_interface ::\n   *     The interface requesting function.\n   */\n  typedef struct  FT_Module_Class_\n  {\n    FT_ULong               module_flags;\n    FT_Long                module_size;\n    const FT_String*       module_name;\n    FT_Fixed               module_version;\n    FT_Fixed               module_requires;\n\n    const void*            module_interface;\n\n    FT_Module_Constructor  module_init;\n    FT_Module_Destructor   module_done;\n    FT_Module_Requester    get_interface;\n\n  } FT_Module_Class;\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Add_Module\n   *\n   * @description:\n   *   Add a new module to a given library instance.\n   *\n   * @inout:\n   *   library ::\n   *     A handle to the library object.\n   *\n   * @input:\n   *   clazz ::\n   *     A pointer to class descriptor for the module.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *   An error will be returned if a module already exists by that name, or\n   *   if the module requires a version of FreeType that is too great.\n   */\n  FT_EXPORT( FT_Error )\n  FT_Add_Module( FT_Library              library,\n                 const FT_Module_Class*  clazz );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Get_Module\n   *\n   * @description:\n   *   Find a module by its name.\n   *\n   * @input:\n   *   library ::\n   *     A handle to the library object.\n   *\n   *   module_name ::\n   *     The module's name (as an ASCII string).\n   *\n   * @return:\n   *   A module handle.  0~if none was found.\n   *\n   * @note:\n   *   FreeType's internal modules aren't documented very well, and you\n   *   should look up the source code for details.\n   */\n  FT_EXPORT( FT_Module )\n  FT_Get_Module( FT_Library   library,\n                 const char*  module_name );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Remove_Module\n   *\n   * @description:\n   *   Remove a given module from a library instance.\n   *\n   * @inout:\n   *   library ::\n   *     A handle to a library object.\n   *\n   * @input:\n   *   module ::\n   *     A handle to a module object.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *   The module object is destroyed by the function in case of success.\n   */\n  FT_EXPORT( FT_Error )\n  FT_Remove_Module( FT_Library  library,\n                    FT_Module   module );\n\n\n  /**************************************************************************\n   *\n   * @macro:\n   *   FT_FACE_DRIVER_NAME\n   *\n   * @description:\n   *   A macro that retrieves the name of a font driver from a face object.\n   *\n   * @note:\n   *   The font driver name is a valid `module_name` for @FT_Property_Set\n   *   and @FT_Property_Get.  This is not the same as @FT_Get_Font_Format.\n   *\n   * @since:\n   *   2.11\n   *\n   */\n#define FT_FACE_DRIVER_NAME( face ) \\\n          ( ( *(FT_Module_Class**)( ( face )->driver ) )->module_name )\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *    FT_Property_Set\n   *\n   * @description:\n   *    Set a property for a given module.\n   *\n   * @input:\n   *    library ::\n   *      A handle to the library the module is part of.\n   *\n   *    module_name ::\n   *      The module name.\n   *\n   *    property_name ::\n   *      The property name.  Properties are described in section\n   *      @properties.\n   *\n   *      Note that only a few modules have properties.\n   *\n   *    value ::\n   *      A generic pointer to a variable or structure that gives the new\n   *      value of the property.  The exact definition of `value` is\n   *      dependent on the property; see section @properties.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *    If `module_name` isn't a valid module name, or `property_name`\n   *    doesn't specify a valid property, or if `value` doesn't represent a\n   *    valid value for the given property, an error is returned.\n   *\n   *    The following example sets property 'bar' (a simple integer) in\n   *    module 'foo' to value~1.\n   *\n   *    ```\n   *      FT_UInt  bar;\n   *\n   *\n   *      bar = 1;\n   *      FT_Property_Set( library, \"foo\", \"bar\", &bar );\n   *    ```\n   *\n   *    Note that the FreeType Cache sub-system doesn't recognize module\n   *    property changes.  To avoid glyph lookup confusion within the cache\n   *    you should call @FTC_Manager_Reset to completely flush the cache if a\n   *    module property gets changed after @FTC_Manager_New has been called.\n   *\n   *    It is not possible to set properties of the FreeType Cache sub-system\n   *    itself with FT_Property_Set; use @FTC_Property_Set instead.\n   *\n   * @since:\n   *   2.4.11\n   *\n   */\n  FT_EXPORT( FT_Error )\n  FT_Property_Set( FT_Library        library,\n                   const FT_String*  module_name,\n                   const FT_String*  property_name,\n                   const void*       value );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *    FT_Property_Get\n   *\n   * @description:\n   *    Get a module's property value.\n   *\n   * @input:\n   *    library ::\n   *      A handle to the library the module is part of.\n   *\n   *    module_name ::\n   *      The module name.\n   *\n   *    property_name ::\n   *      The property name.  Properties are described in section\n   *      @properties.\n   *\n   * @inout:\n   *    value ::\n   *      A generic pointer to a variable or structure that gives the value\n   *      of the property.  The exact definition of `value` is dependent on\n   *      the property; see section @properties.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *    If `module_name` isn't a valid module name, or `property_name`\n   *    doesn't specify a valid property, or if `value` doesn't represent a\n   *    valid value for the given property, an error is returned.\n   *\n   *    The following example gets property 'baz' (a range) in module 'foo'.\n   *\n   *    ```\n   *      typedef  range_\n   *      {\n   *        FT_Int32  min;\n   *        FT_Int32  max;\n   *\n   *      } range;\n   *\n   *      range  baz;\n   *\n   *\n   *      FT_Property_Get( library, \"foo\", \"baz\", &baz );\n   *    ```\n   *\n   *    It is not possible to retrieve properties of the FreeType Cache\n   *    sub-system with FT_Property_Get; use @FTC_Property_Get instead.\n   *\n   * @since:\n   *   2.4.11\n   *\n   */\n  FT_EXPORT( FT_Error )\n  FT_Property_Get( FT_Library        library,\n                   const FT_String*  module_name,\n                   const FT_String*  property_name,\n                   void*             value );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Set_Default_Properties\n   *\n   * @description:\n   *   If compilation option `FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES` is\n   *   set, this function reads the `FREETYPE_PROPERTIES` environment\n   *   variable to control driver properties.  See section @properties for\n   *   more.\n   *\n   *   If the compilation option is not set, this function does nothing.\n   *\n   *   `FREETYPE_PROPERTIES` has the following syntax form (broken here into\n   *   multiple lines for better readability).\n   *\n   *   ```\n   *     <optional whitespace>\n   *     <module-name1> ':'\n   *     <property-name1> '=' <property-value1>\n   *     <whitespace>\n   *     <module-name2> ':'\n   *     <property-name2> '=' <property-value2>\n   *     ...\n   *   ```\n   *\n   *   Example:\n   *\n   *   ```\n   *     FREETYPE_PROPERTIES=truetype:interpreter-version=35 \\\n   *                         cff:no-stem-darkening=0\n   *   ```\n   *\n   * @inout:\n   *   library ::\n   *     A handle to a new library object.\n   *\n   * @since:\n   *   2.8\n   */\n  FT_EXPORT( void )\n  FT_Set_Default_Properties( FT_Library  library );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Reference_Library\n   *\n   * @description:\n   *   A counter gets initialized to~1 at the time an @FT_Library structure\n   *   is created.  This function increments the counter.  @FT_Done_Library\n   *   then only destroys a library if the counter is~1, otherwise it simply\n   *   decrements the counter.\n   *\n   *   This function helps in managing life-cycles of structures that\n   *   reference @FT_Library objects.\n   *\n   * @input:\n   *   library ::\n   *     A handle to a target library object.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @since:\n   *   2.4.2\n   */\n  FT_EXPORT( FT_Error )\n  FT_Reference_Library( FT_Library  library );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_New_Library\n   *\n   * @description:\n   *   This function is used to create a new FreeType library instance from a\n   *   given memory object.  It is thus possible to use libraries with\n   *   distinct memory allocators within the same program.  Note, however,\n   *   that the used @FT_Memory structure is expected to remain valid for the\n   *   life of the @FT_Library object.\n   *\n   *   Normally, you would call this function (followed by a call to\n   *   @FT_Add_Default_Modules or a series of calls to @FT_Add_Module, and a\n   *   call to @FT_Set_Default_Properties) instead of @FT_Init_FreeType to\n   *   initialize the FreeType library.\n   *\n   *   Don't use @FT_Done_FreeType but @FT_Done_Library to destroy a library\n   *   instance.\n   *\n   * @input:\n   *   memory ::\n   *     A handle to the original memory object.\n   *\n   * @output:\n   *   alibrary ::\n   *     A pointer to handle of a new library object.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *   See the discussion of reference counters in the description of\n   *   @FT_Reference_Library.\n   */\n  FT_EXPORT( FT_Error )\n  FT_New_Library( FT_Memory    memory,\n                  FT_Library  *alibrary );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Done_Library\n   *\n   * @description:\n   *   Discard a given library object.  This closes all drivers and discards\n   *   all resource objects.\n   *\n   * @input:\n   *   library ::\n   *     A handle to the target library.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *   See the discussion of reference counters in the description of\n   *   @FT_Reference_Library.\n   */\n  FT_EXPORT( FT_Error )\n  FT_Done_Library( FT_Library  library );\n\n\n  /**************************************************************************\n   *\n   * @functype:\n   *   FT_DebugHook_Func\n   *\n   * @description:\n   *   A drop-in replacement (or rather a wrapper) for the bytecode or\n   *   charstring interpreter's main loop function.\n   *\n   *   Its job is essentially\n   *\n   *   - to activate debug mode to enforce single-stepping,\n   *\n   *   - to call the main loop function to interpret the next opcode, and\n   *\n   *   - to show the changed context to the user.\n   *\n   *   An example for such a main loop function is `TT_RunIns` (declared in\n   *   FreeType's internal header file `src/truetype/ttinterp.h`).\n   *\n   *   Have a look at the source code of the `ttdebug` FreeType demo program\n   *   for an example of a drop-in replacement.\n   *\n   * @inout:\n   *   arg ::\n   *     A typeless pointer, to be cast to the main loop function's data\n   *     structure (which depends on the font module).  For TrueType fonts\n   *     it is bytecode interpreter's execution context, `TT_ExecContext`,\n   *     which is declared in FreeType's internal header file `tttypes.h`.\n   */\n  typedef FT_Error\n  (*FT_DebugHook_Func)( void*  arg );\n\n\n  /**************************************************************************\n   *\n   * @enum:\n   *   FT_DEBUG_HOOK_XXX\n   *\n   * @description:\n   *   A list of named debug hook indices.\n   *\n   * @values:\n   *   FT_DEBUG_HOOK_TRUETYPE::\n   *     This hook index identifies the TrueType bytecode debugger.\n   */\n#define FT_DEBUG_HOOK_TRUETYPE  0\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Set_Debug_Hook\n   *\n   * @description:\n   *   Set a debug hook function for debugging the interpreter of a font\n   *   format.\n   *\n   *   While this is a public API function, an application needs access to\n   *   FreeType's internal header files to do something useful.\n   *\n   *   Have a look at the source code of the `ttdebug` FreeType demo program\n   *   for an example of its usage.\n   *\n   * @inout:\n   *   library ::\n   *     A handle to the library object.\n   *\n   * @input:\n   *   hook_index ::\n   *     The index of the debug hook.  You should use defined enumeration\n   *     macros like @FT_DEBUG_HOOK_TRUETYPE.\n   *\n   *   debug_hook ::\n   *     The function used to debug the interpreter.\n   *\n   * @note:\n   *   Currently, four debug hook slots are available, but only one (for the\n   *   TrueType interpreter) is defined.\n   */\n  FT_EXPORT( void )\n  FT_Set_Debug_Hook( FT_Library         library,\n                     FT_UInt            hook_index,\n                     FT_DebugHook_Func  debug_hook );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Add_Default_Modules\n   *\n   * @description:\n   *   Add the set of default drivers to a given library object.  This is\n   *   only useful when you create a library object with @FT_New_Library\n   *   (usually to plug a custom memory manager).\n   *\n   * @inout:\n   *   library ::\n   *     A handle to a new library object.\n   */\n  FT_EXPORT( void )\n  FT_Add_Default_Modules( FT_Library  library );\n\n\n\n  /**************************************************************************\n   *\n   * @section:\n   *   truetype_engine\n   *\n   * @title:\n   *   The TrueType Engine\n   *\n   * @abstract:\n   *   TrueType bytecode support.\n   *\n   * @description:\n   *   This section contains a function used to query the level of TrueType\n   *   bytecode support compiled in this version of the library.\n   *\n   */\n\n\n  /**************************************************************************\n   *\n   * @enum:\n   *    FT_TrueTypeEngineType\n   *\n   * @description:\n   *    A list of values describing which kind of TrueType bytecode engine is\n   *    implemented in a given FT_Library instance.  It is used by the\n   *    @FT_Get_TrueType_Engine_Type function.\n   *\n   * @values:\n   *    FT_TRUETYPE_ENGINE_TYPE_NONE ::\n   *      The library doesn't implement any kind of bytecode interpreter.\n   *\n   *    FT_TRUETYPE_ENGINE_TYPE_UNPATENTED ::\n   *      Deprecated and removed.\n   *\n   *    FT_TRUETYPE_ENGINE_TYPE_PATENTED ::\n   *      The library implements a bytecode interpreter that covers the full\n   *      instruction set of the TrueType virtual machine (this was governed\n   *      by patents until May 2010, hence the name).\n   *\n   * @since:\n   *    2.2\n   *\n   */\n  typedef enum  FT_TrueTypeEngineType_\n  {\n    FT_TRUETYPE_ENGINE_TYPE_NONE = 0,\n    FT_TRUETYPE_ENGINE_TYPE_UNPATENTED,\n    FT_TRUETYPE_ENGINE_TYPE_PATENTED\n\n  } FT_TrueTypeEngineType;\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *    FT_Get_TrueType_Engine_Type\n   *\n   * @description:\n   *    Return an @FT_TrueTypeEngineType value to indicate which level of the\n   *    TrueType virtual machine a given library instance supports.\n   *\n   * @input:\n   *    library ::\n   *      A library instance.\n   *\n   * @return:\n   *    A value indicating which level is supported.\n   *\n   * @since:\n   *    2.2\n   *\n   */\n  FT_EXPORT( FT_TrueTypeEngineType )\n  FT_Get_TrueType_Engine_Type( FT_Library  library );\n\n  /* */\n\n\nFT_END_HEADER\n\n#endif /* FTMODAPI_H_ */\n\n\n/* END */\n"
  },
  {
    "path": "thirdparty/freetype/include/freetype2/freetype/ftmoderr.h",
    "content": "/****************************************************************************\n *\n * ftmoderr.h\n *\n *   FreeType module error offsets (specification).\n *\n * Copyright (C) 2001-2021 by\n * David Turner, Robert Wilhelm, and Werner Lemberg.\n *\n * This file is part of the FreeType project, and may only be used,\n * modified, and distributed under the terms of the FreeType project\n * license, LICENSE.TXT.  By continuing to use, modify, or distribute\n * this file you indicate that you have read the license and\n * understand and accept it fully.\n *\n */\n\n\n  /**************************************************************************\n   *\n   * This file is used to define the FreeType module error codes.\n   *\n   * If the macro `FT_CONFIG_OPTION_USE_MODULE_ERRORS` in `ftoption.h` is\n   * set, the lower byte of an error value identifies the error code as\n   * usual.  In addition, the higher byte identifies the module.  For\n   * example, the error `FT_Err_Invalid_File_Format` has value 0x0003, the\n   * error `TT_Err_Invalid_File_Format` has value 0x1303, the error\n   * `T1_Err_Invalid_File_Format` has value 0x1403, etc.\n   *\n   * Note that `FT_Err_Ok`, `TT_Err_Ok`, etc. are always equal to zero,\n   * including the high byte.\n   *\n   * If `FT_CONFIG_OPTION_USE_MODULE_ERRORS` isn't set, the higher byte of an\n   * error value is set to zero.\n   *\n   * To hide the various `XXX_Err_` prefixes in the source code, FreeType\n   * provides some macros in `fttypes.h`.\n   *\n   *   FT_ERR( err )\n   *\n   *     Add current error module prefix (as defined with the `FT_ERR_PREFIX`\n   *     macro) to `err`.  For example, in the BDF module the line\n   *\n   *     ```\n   *       error = FT_ERR( Invalid_Outline );\n   *     ```\n   *\n   *     expands to\n   *\n   *     ```\n   *       error = BDF_Err_Invalid_Outline;\n   *     ```\n   *\n   *     For simplicity, you can always use `FT_Err_Ok` directly instead of\n   *     `FT_ERR( Ok )`.\n   *\n   *   FT_ERR_EQ( errcode, err )\n   *   FT_ERR_NEQ( errcode, err )\n   *\n   *     Compare error code `errcode` with the error `err` for equality and\n   *     inequality, respectively.  Example:\n   *\n   *     ```\n   *       if ( FT_ERR_EQ( error, Invalid_Outline ) )\n   *         ...\n   *     ```\n   *\n   *     Using this macro you don't have to think about error prefixes.  Of\n   *     course, if module errors are not active, the above example is the\n   *     same as\n   *\n   *     ```\n   *       if ( error == FT_Err_Invalid_Outline )\n   *         ...\n   *     ```\n   *\n   *   FT_ERROR_BASE( errcode )\n   *   FT_ERROR_MODULE( errcode )\n   *\n   *     Get base error and module error code, respectively.\n   *\n   * It can also be used to create a module error message table easily with\n   * something like\n   *\n   * ```\n   *   #undef FTMODERR_H_\n   *   #define FT_MODERRDEF( e, v, s )  { FT_Mod_Err_ ## e, s },\n   *   #define FT_MODERR_START_LIST     {\n   *   #define FT_MODERR_END_LIST       { 0, 0 } };\n   *\n   *   const struct\n   *   {\n   *     int          mod_err_offset;\n   *     const char*  mod_err_msg\n   *   } ft_mod_errors[] =\n   *\n   *   #include <freetype/ftmoderr.h>\n   * ```\n   *\n   */\n\n\n#ifndef FTMODERR_H_\n#define FTMODERR_H_\n\n\n  /*******************************************************************/\n  /*******************************************************************/\n  /*****                                                         *****/\n  /*****                       SETUP MACROS                      *****/\n  /*****                                                         *****/\n  /*******************************************************************/\n  /*******************************************************************/\n\n\n#undef  FT_NEED_EXTERN_C\n\n#ifndef FT_MODERRDEF\n\n#ifdef FT_CONFIG_OPTION_USE_MODULE_ERRORS\n#define FT_MODERRDEF( e, v, s )  FT_Mod_Err_ ## e = v,\n#else\n#define FT_MODERRDEF( e, v, s )  FT_Mod_Err_ ## e = 0,\n#endif\n\n#define FT_MODERR_START_LIST  enum {\n#define FT_MODERR_END_LIST    FT_Mod_Err_Max };\n\n#ifdef __cplusplus\n#define FT_NEED_EXTERN_C\n  extern \"C\" {\n#endif\n\n#endif /* !FT_MODERRDEF */\n\n\n  /*******************************************************************/\n  /*******************************************************************/\n  /*****                                                         *****/\n  /*****               LIST MODULE ERROR BASES                   *****/\n  /*****                                                         *****/\n  /*******************************************************************/\n  /*******************************************************************/\n\n\n#ifdef FT_MODERR_START_LIST\n  FT_MODERR_START_LIST\n#endif\n\n\n  FT_MODERRDEF( Base,      0x000, \"base module\" )\n  FT_MODERRDEF( Autofit,   0x100, \"autofitter module\" )\n  FT_MODERRDEF( BDF,       0x200, \"BDF module\" )\n  FT_MODERRDEF( Bzip2,     0x300, \"Bzip2 module\" )\n  FT_MODERRDEF( Cache,     0x400, \"cache module\" )\n  FT_MODERRDEF( CFF,       0x500, \"CFF module\" )\n  FT_MODERRDEF( CID,       0x600, \"CID module\" )\n  FT_MODERRDEF( Gzip,      0x700, \"Gzip module\" )\n  FT_MODERRDEF( LZW,       0x800, \"LZW module\" )\n  FT_MODERRDEF( OTvalid,   0x900, \"OpenType validation module\" )\n  FT_MODERRDEF( PCF,       0xA00, \"PCF module\" )\n  FT_MODERRDEF( PFR,       0xB00, \"PFR module\" )\n  FT_MODERRDEF( PSaux,     0xC00, \"PS auxiliary module\" )\n  FT_MODERRDEF( PShinter,  0xD00, \"PS hinter module\" )\n  FT_MODERRDEF( PSnames,   0xE00, \"PS names module\" )\n  FT_MODERRDEF( Raster,    0xF00, \"raster module\" )\n  FT_MODERRDEF( SFNT,     0x1000, \"SFNT module\" )\n  FT_MODERRDEF( Smooth,   0x1100, \"smooth raster module\" )\n  FT_MODERRDEF( TrueType, 0x1200, \"TrueType module\" )\n  FT_MODERRDEF( Type1,    0x1300, \"Type 1 module\" )\n  FT_MODERRDEF( Type42,   0x1400, \"Type 42 module\" )\n  FT_MODERRDEF( Winfonts, 0x1500, \"Windows FON/FNT module\" )\n  FT_MODERRDEF( GXvalid,  0x1600, \"GX validation module\" )\n  FT_MODERRDEF( Sdf,      0x1700, \"Signed distance field raster module\" )\n\n\n#ifdef FT_MODERR_END_LIST\n  FT_MODERR_END_LIST\n#endif\n\n\n  /*******************************************************************/\n  /*******************************************************************/\n  /*****                                                         *****/\n  /*****                      CLEANUP                            *****/\n  /*****                                                         *****/\n  /*******************************************************************/\n  /*******************************************************************/\n\n\n#ifdef FT_NEED_EXTERN_C\n  }\n#endif\n\n#undef FT_MODERR_START_LIST\n#undef FT_MODERR_END_LIST\n#undef FT_MODERRDEF\n#undef FT_NEED_EXTERN_C\n\n\n#endif /* FTMODERR_H_ */\n\n\n/* END */\n"
  },
  {
    "path": "thirdparty/freetype/include/freetype2/freetype/ftotval.h",
    "content": "/****************************************************************************\n *\n * ftotval.h\n *\n *   FreeType API for validating OpenType tables (specification).\n *\n * Copyright (C) 2004-2021 by\n * David Turner, Robert Wilhelm, and Werner Lemberg.\n *\n * This file is part of the FreeType project, and may only be used,\n * modified, and distributed under the terms of the FreeType project\n * license, LICENSE.TXT.  By continuing to use, modify, or distribute\n * this file you indicate that you have read the license and\n * understand and accept it fully.\n *\n */\n\n\n/****************************************************************************\n *\n *\n * Warning: This module might be moved to a different library in the\n *          future to avoid a tight dependency between FreeType and the\n *          OpenType specification.\n *\n *\n */\n\n\n#ifndef FTOTVAL_H_\n#define FTOTVAL_H_\n\n#include <freetype/freetype.h>\n\n#ifdef FREETYPE_H\n#error \"freetype.h of FreeType 1 has been loaded!\"\n#error \"Please fix the directory search order for header files\"\n#error \"so that freetype.h of FreeType 2 is found first.\"\n#endif\n\n\nFT_BEGIN_HEADER\n\n\n  /**************************************************************************\n   *\n   * @section:\n   *   ot_validation\n   *\n   * @title:\n   *   OpenType Validation\n   *\n   * @abstract:\n   *   An API to validate OpenType tables.\n   *\n   * @description:\n   *   This section contains the declaration of functions to validate some\n   *   OpenType tables (BASE, GDEF, GPOS, GSUB, JSTF, MATH).\n   *\n   * @order:\n   *   FT_OpenType_Validate\n   *   FT_OpenType_Free\n   *\n   *   FT_VALIDATE_OTXXX\n   *\n   */\n\n\n  /**************************************************************************\n   *\n   * @enum:\n   *    FT_VALIDATE_OTXXX\n   *\n   * @description:\n   *    A list of bit-field constants used with @FT_OpenType_Validate to\n   *    indicate which OpenType tables should be validated.\n   *\n   * @values:\n   *    FT_VALIDATE_BASE ::\n   *      Validate BASE table.\n   *\n   *    FT_VALIDATE_GDEF ::\n   *      Validate GDEF table.\n   *\n   *    FT_VALIDATE_GPOS ::\n   *      Validate GPOS table.\n   *\n   *    FT_VALIDATE_GSUB ::\n   *      Validate GSUB table.\n   *\n   *    FT_VALIDATE_JSTF ::\n   *      Validate JSTF table.\n   *\n   *    FT_VALIDATE_MATH ::\n   *      Validate MATH table.\n   *\n   *    FT_VALIDATE_OT ::\n   *      Validate all OpenType tables (BASE, GDEF, GPOS, GSUB, JSTF, MATH).\n   *\n   */\n#define FT_VALIDATE_BASE  0x0100\n#define FT_VALIDATE_GDEF  0x0200\n#define FT_VALIDATE_GPOS  0x0400\n#define FT_VALIDATE_GSUB  0x0800\n#define FT_VALIDATE_JSTF  0x1000\n#define FT_VALIDATE_MATH  0x2000\n\n#define FT_VALIDATE_OT  ( FT_VALIDATE_BASE | \\\n                          FT_VALIDATE_GDEF | \\\n                          FT_VALIDATE_GPOS | \\\n                          FT_VALIDATE_GSUB | \\\n                          FT_VALIDATE_JSTF | \\\n                          FT_VALIDATE_MATH )\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *    FT_OpenType_Validate\n   *\n   * @description:\n   *    Validate various OpenType tables to assure that all offsets and\n   *    indices are valid.  The idea is that a higher-level library that\n   *    actually does the text layout can access those tables without error\n   *    checking (which can be quite time consuming).\n   *\n   * @input:\n   *    face ::\n   *      A handle to the input face.\n   *\n   *    validation_flags ::\n   *      A bit field that specifies the tables to be validated.  See\n   *      @FT_VALIDATE_OTXXX for possible values.\n   *\n   * @output:\n   *    BASE_table ::\n   *      A pointer to the BASE table.\n   *\n   *    GDEF_table ::\n   *      A pointer to the GDEF table.\n   *\n   *    GPOS_table ::\n   *      A pointer to the GPOS table.\n   *\n   *    GSUB_table ::\n   *      A pointer to the GSUB table.\n   *\n   *    JSTF_table ::\n   *      A pointer to the JSTF table.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *   This function only works with OpenType fonts, returning an error\n   *   otherwise.\n   *\n   *   After use, the application should deallocate the five tables with\n   *   @FT_OpenType_Free.  A `NULL` value indicates that the table either\n   *   doesn't exist in the font, or the application hasn't asked for\n   *   validation.\n   */\n  FT_EXPORT( FT_Error )\n  FT_OpenType_Validate( FT_Face    face,\n                        FT_UInt    validation_flags,\n                        FT_Bytes  *BASE_table,\n                        FT_Bytes  *GDEF_table,\n                        FT_Bytes  *GPOS_table,\n                        FT_Bytes  *GSUB_table,\n                        FT_Bytes  *JSTF_table );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *    FT_OpenType_Free\n   *\n   * @description:\n   *    Free the buffer allocated by OpenType validator.\n   *\n   * @input:\n   *    face ::\n   *      A handle to the input face.\n   *\n   *    table ::\n   *      The pointer to the buffer that is allocated by\n   *      @FT_OpenType_Validate.\n   *\n   * @note:\n   *   This function must be used to free the buffer allocated by\n   *   @FT_OpenType_Validate only.\n   */\n  FT_EXPORT( void )\n  FT_OpenType_Free( FT_Face   face,\n                    FT_Bytes  table );\n\n\n  /* */\n\n\nFT_END_HEADER\n\n#endif /* FTOTVAL_H_ */\n\n\n/* END */\n"
  },
  {
    "path": "thirdparty/freetype/include/freetype2/freetype/ftoutln.h",
    "content": "/****************************************************************************\n *\n * ftoutln.h\n *\n *   Support for the FT_Outline type used to store glyph shapes of\n *   most scalable font formats (specification).\n *\n * Copyright (C) 1996-2021 by\n * David Turner, Robert Wilhelm, and Werner Lemberg.\n *\n * This file is part of the FreeType project, and may only be used,\n * modified, and distributed under the terms of the FreeType project\n * license, LICENSE.TXT.  By continuing to use, modify, or distribute\n * this file you indicate that you have read the license and\n * understand and accept it fully.\n *\n */\n\n\n#ifndef FTOUTLN_H_\n#define FTOUTLN_H_\n\n\n#include <freetype/freetype.h>\n\n#ifdef FREETYPE_H\n#error \"freetype.h of FreeType 1 has been loaded!\"\n#error \"Please fix the directory search order for header files\"\n#error \"so that freetype.h of FreeType 2 is found first.\"\n#endif\n\n\nFT_BEGIN_HEADER\n\n\n  /**************************************************************************\n   *\n   * @section:\n   *   outline_processing\n   *\n   * @title:\n   *   Outline Processing\n   *\n   * @abstract:\n   *   Functions to create, transform, and render vectorial glyph images.\n   *\n   * @description:\n   *   This section contains routines used to create and destroy scalable\n   *   glyph images known as 'outlines'.  These can also be measured,\n   *   transformed, and converted into bitmaps and pixmaps.\n   *\n   * @order:\n   *   FT_Outline\n   *   FT_Outline_New\n   *   FT_Outline_Done\n   *   FT_Outline_Copy\n   *   FT_Outline_Translate\n   *   FT_Outline_Transform\n   *   FT_Outline_Embolden\n   *   FT_Outline_EmboldenXY\n   *   FT_Outline_Reverse\n   *   FT_Outline_Check\n   *\n   *   FT_Outline_Get_CBox\n   *   FT_Outline_Get_BBox\n   *\n   *   FT_Outline_Get_Bitmap\n   *   FT_Outline_Render\n   *   FT_Outline_Decompose\n   *   FT_Outline_Funcs\n   *   FT_Outline_MoveToFunc\n   *   FT_Outline_LineToFunc\n   *   FT_Outline_ConicToFunc\n   *   FT_Outline_CubicToFunc\n   *\n   *   FT_Orientation\n   *   FT_Outline_Get_Orientation\n   *\n   *   FT_OUTLINE_XXX\n   *\n   */\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Outline_Decompose\n   *\n   * @description:\n   *   Walk over an outline's structure to decompose it into individual\n   *   segments and Bezier arcs.  This function also emits 'move to'\n   *   operations to indicate the start of new contours in the outline.\n   *\n   * @input:\n   *   outline ::\n   *     A pointer to the source target.\n   *\n   *   func_interface ::\n   *     A table of 'emitters', i.e., function pointers called during\n   *     decomposition to indicate path operations.\n   *\n   * @inout:\n   *   user ::\n   *     A typeless pointer that is passed to each emitter during the\n   *     decomposition.  It can be used to store the state during the\n   *     decomposition.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *   A contour that contains a single point only is represented by a 'move\n   *   to' operation followed by 'line to' to the same point.  In most cases,\n   *   it is best to filter this out before using the outline for stroking\n   *   purposes (otherwise it would result in a visible dot when round caps\n   *   are used).\n   *\n   *   Similarly, the function returns success for an empty outline also\n   *   (doing nothing, this is, not calling any emitter); if necessary, you\n   *   should filter this out, too.\n   */\n  FT_EXPORT( FT_Error )\n  FT_Outline_Decompose( FT_Outline*              outline,\n                        const FT_Outline_Funcs*  func_interface,\n                        void*                    user );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Outline_New\n   *\n   * @description:\n   *   Create a new outline of a given size.\n   *\n   * @input:\n   *   library ::\n   *     A handle to the library object from where the outline is allocated.\n   *     Note however that the new outline will **not** necessarily be\n   *     **freed**, when destroying the library, by @FT_Done_FreeType.\n   *\n   *   numPoints ::\n   *     The maximum number of points within the outline.  Must be smaller\n   *     than or equal to 0xFFFF (65535).\n   *\n   *   numContours ::\n   *     The maximum number of contours within the outline.  This value must\n   *     be in the range 0 to `numPoints`.\n   *\n   * @output:\n   *   anoutline ::\n   *     A handle to the new outline.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *   The reason why this function takes a `library` parameter is simply to\n   *   use the library's memory allocator.\n   */\n  FT_EXPORT( FT_Error )\n  FT_Outline_New( FT_Library   library,\n                  FT_UInt      numPoints,\n                  FT_Int       numContours,\n                  FT_Outline  *anoutline );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Outline_Done\n   *\n   * @description:\n   *   Destroy an outline created with @FT_Outline_New.\n   *\n   * @input:\n   *   library ::\n   *     A handle of the library object used to allocate the outline.\n   *\n   *   outline ::\n   *     A pointer to the outline object to be discarded.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *   If the outline's 'owner' field is not set, only the outline descriptor\n   *   will be released.\n   */\n  FT_EXPORT( FT_Error )\n  FT_Outline_Done( FT_Library   library,\n                   FT_Outline*  outline );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Outline_Check\n   *\n   * @description:\n   *   Check the contents of an outline descriptor.\n   *\n   * @input:\n   *   outline ::\n   *     A handle to a source outline.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *   An empty outline, or an outline with a single point only is also\n   *   valid.\n   */\n  FT_EXPORT( FT_Error )\n  FT_Outline_Check( FT_Outline*  outline );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Outline_Get_CBox\n   *\n   * @description:\n   *   Return an outline's 'control box'.  The control box encloses all the\n   *   outline's points, including Bezier control points.  Though it\n   *   coincides with the exact bounding box for most glyphs, it can be\n   *   slightly larger in some situations (like when rotating an outline that\n   *   contains Bezier outside arcs).\n   *\n   *   Computing the control box is very fast, while getting the bounding box\n   *   can take much more time as it needs to walk over all segments and arcs\n   *   in the outline.  To get the latter, you can use the 'ftbbox'\n   *   component, which is dedicated to this single task.\n   *\n   * @input:\n   *   outline ::\n   *     A pointer to the source outline descriptor.\n   *\n   * @output:\n   *   acbox ::\n   *     The outline's control box.\n   *\n   * @note:\n   *   See @FT_Glyph_Get_CBox for a discussion of tricky fonts.\n   */\n  FT_EXPORT( void )\n  FT_Outline_Get_CBox( const FT_Outline*  outline,\n                       FT_BBox           *acbox );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Outline_Translate\n   *\n   * @description:\n   *   Apply a simple translation to the points of an outline.\n   *\n   * @inout:\n   *   outline ::\n   *     A pointer to the target outline descriptor.\n   *\n   * @input:\n   *   xOffset ::\n   *     The horizontal offset.\n   *\n   *   yOffset ::\n   *     The vertical offset.\n   */\n  FT_EXPORT( void )\n  FT_Outline_Translate( const FT_Outline*  outline,\n                        FT_Pos             xOffset,\n                        FT_Pos             yOffset );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Outline_Copy\n   *\n   * @description:\n   *   Copy an outline into another one.  Both objects must have the same\n   *   sizes (number of points & number of contours) when this function is\n   *   called.\n   *\n   * @input:\n   *   source ::\n   *     A handle to the source outline.\n   *\n   * @output:\n   *   target ::\n   *     A handle to the target outline.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   */\n  FT_EXPORT( FT_Error )\n  FT_Outline_Copy( const FT_Outline*  source,\n                   FT_Outline        *target );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Outline_Transform\n   *\n   * @description:\n   *   Apply a simple 2x2 matrix to all of an outline's points.  Useful for\n   *   applying rotations, slanting, flipping, etc.\n   *\n   * @inout:\n   *   outline ::\n   *     A pointer to the target outline descriptor.\n   *\n   * @input:\n   *   matrix ::\n   *     A pointer to the transformation matrix.\n   *\n   * @note:\n   *   You can use @FT_Outline_Translate if you need to translate the\n   *   outline's points.\n   */\n  FT_EXPORT( void )\n  FT_Outline_Transform( const FT_Outline*  outline,\n                        const FT_Matrix*   matrix );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Outline_Embolden\n   *\n   * @description:\n   *   Embolden an outline.  The new outline will be at most 4~times\n   *   `strength` pixels wider and higher.  You may think of the left and\n   *   bottom borders as unchanged.\n   *\n   *   Negative `strength` values to reduce the outline thickness are\n   *   possible also.\n   *\n   * @inout:\n   *   outline ::\n   *     A handle to the target outline.\n   *\n   * @input:\n   *   strength ::\n   *     How strong the glyph is emboldened.  Expressed in 26.6 pixel format.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *   The used algorithm to increase or decrease the thickness of the glyph\n   *   doesn't change the number of points; this means that certain\n   *   situations like acute angles or intersections are sometimes handled\n   *   incorrectly.\n   *\n   *   If you need 'better' metrics values you should call\n   *   @FT_Outline_Get_CBox or @FT_Outline_Get_BBox.\n   *\n   *   To get meaningful results, font scaling values must be set with\n   *   functions like @FT_Set_Char_Size before calling FT_Render_Glyph.\n   *\n   * @example:\n   *   ```\n   *     FT_Load_Glyph( face, index, FT_LOAD_DEFAULT );\n   *\n   *     if ( face->glyph->format == FT_GLYPH_FORMAT_OUTLINE )\n   *       FT_Outline_Embolden( &face->glyph->outline, strength );\n   *   ```\n   *\n   */\n  FT_EXPORT( FT_Error )\n  FT_Outline_Embolden( FT_Outline*  outline,\n                       FT_Pos       strength );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Outline_EmboldenXY\n   *\n   * @description:\n   *   Embolden an outline.  The new outline will be `xstrength` pixels wider\n   *   and `ystrength` pixels higher.  Otherwise, it is similar to\n   *   @FT_Outline_Embolden, which uses the same strength in both directions.\n   *\n   * @since:\n   *   2.4.10\n   */\n  FT_EXPORT( FT_Error )\n  FT_Outline_EmboldenXY( FT_Outline*  outline,\n                         FT_Pos       xstrength,\n                         FT_Pos       ystrength );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Outline_Reverse\n   *\n   * @description:\n   *   Reverse the drawing direction of an outline.  This is used to ensure\n   *   consistent fill conventions for mirrored glyphs.\n   *\n   * @inout:\n   *   outline ::\n   *     A pointer to the target outline descriptor.\n   *\n   * @note:\n   *   This function toggles the bit flag @FT_OUTLINE_REVERSE_FILL in the\n   *   outline's `flags` field.\n   *\n   *   It shouldn't be used by a normal client application, unless it knows\n   *   what it is doing.\n   */\n  FT_EXPORT( void )\n  FT_Outline_Reverse( FT_Outline*  outline );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Outline_Get_Bitmap\n   *\n   * @description:\n   *   Render an outline within a bitmap.  The outline's image is simply\n   *   OR-ed to the target bitmap.\n   *\n   * @input:\n   *   library ::\n   *     A handle to a FreeType library object.\n   *\n   *   outline ::\n   *     A pointer to the source outline descriptor.\n   *\n   * @inout:\n   *   abitmap ::\n   *     A pointer to the target bitmap descriptor.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *   This function does **not create** the bitmap, it only renders an\n   *   outline image within the one you pass to it!  Consequently, the\n   *   various fields in `abitmap` should be set accordingly.\n   *\n   *   It will use the raster corresponding to the default glyph format.\n   *\n   *   The value of the `num_grays` field in `abitmap` is ignored.  If you\n   *   select the gray-level rasterizer, and you want less than 256 gray\n   *   levels, you have to use @FT_Outline_Render directly.\n   */\n  FT_EXPORT( FT_Error )\n  FT_Outline_Get_Bitmap( FT_Library        library,\n                         FT_Outline*       outline,\n                         const FT_Bitmap  *abitmap );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Outline_Render\n   *\n   * @description:\n   *   Render an outline within a bitmap using the current scan-convert.\n   *\n   * @input:\n   *   library ::\n   *     A handle to a FreeType library object.\n   *\n   *   outline ::\n   *     A pointer to the source outline descriptor.\n   *\n   * @inout:\n   *   params ::\n   *     A pointer to an @FT_Raster_Params structure used to describe the\n   *     rendering operation.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *   This advanced function uses @FT_Raster_Params as an argument.\n   *   The field `params.source` will be set to `outline` before the scan\n   *   converter is called, which means that the value you give to it is\n   *   actually ignored.  Either `params.target` must point to preallocated\n   *   bitmap, or @FT_RASTER_FLAG_DIRECT must be set in `params.flags`\n   *   allowing FreeType rasterizer to be used for direct composition,\n   *   translucency, etc.  See @FT_Raster_Params for more details.\n   */\n  FT_EXPORT( FT_Error )\n  FT_Outline_Render( FT_Library         library,\n                     FT_Outline*        outline,\n                     FT_Raster_Params*  params );\n\n\n  /**************************************************************************\n   *\n   * @enum:\n   *   FT_Orientation\n   *\n   * @description:\n   *   A list of values used to describe an outline's contour orientation.\n   *\n   *   The TrueType and PostScript specifications use different conventions\n   *   to determine whether outline contours should be filled or unfilled.\n   *\n   * @values:\n   *   FT_ORIENTATION_TRUETYPE ::\n   *     According to the TrueType specification, clockwise contours must be\n   *     filled, and counter-clockwise ones must be unfilled.\n   *\n   *   FT_ORIENTATION_POSTSCRIPT ::\n   *     According to the PostScript specification, counter-clockwise\n   *     contours must be filled, and clockwise ones must be unfilled.\n   *\n   *   FT_ORIENTATION_FILL_RIGHT ::\n   *     This is identical to @FT_ORIENTATION_TRUETYPE, but is used to\n   *     remember that in TrueType, everything that is to the right of the\n   *     drawing direction of a contour must be filled.\n   *\n   *   FT_ORIENTATION_FILL_LEFT ::\n   *     This is identical to @FT_ORIENTATION_POSTSCRIPT, but is used to\n   *     remember that in PostScript, everything that is to the left of the\n   *     drawing direction of a contour must be filled.\n   *\n   *   FT_ORIENTATION_NONE ::\n   *     The orientation cannot be determined.  That is, different parts of\n   *     the glyph have different orientation.\n   *\n   */\n  typedef enum  FT_Orientation_\n  {\n    FT_ORIENTATION_TRUETYPE   = 0,\n    FT_ORIENTATION_POSTSCRIPT = 1,\n    FT_ORIENTATION_FILL_RIGHT = FT_ORIENTATION_TRUETYPE,\n    FT_ORIENTATION_FILL_LEFT  = FT_ORIENTATION_POSTSCRIPT,\n    FT_ORIENTATION_NONE\n\n  } FT_Orientation;\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Outline_Get_Orientation\n   *\n   * @description:\n   *   This function analyzes a glyph outline and tries to compute its fill\n   *   orientation (see @FT_Orientation).  This is done by integrating the\n   *   total area covered by the outline. The positive integral corresponds\n   *   to the clockwise orientation and @FT_ORIENTATION_POSTSCRIPT is\n   *   returned. The negative integral corresponds to the counter-clockwise\n   *   orientation and @FT_ORIENTATION_TRUETYPE is returned.\n   *\n   *   Note that this will return @FT_ORIENTATION_TRUETYPE for empty\n   *   outlines.\n   *\n   * @input:\n   *   outline ::\n   *     A handle to the source outline.\n   *\n   * @return:\n   *   The orientation.\n   *\n   */\n  FT_EXPORT( FT_Orientation )\n  FT_Outline_Get_Orientation( FT_Outline*  outline );\n\n\n  /* */\n\n\nFT_END_HEADER\n\n#endif /* FTOUTLN_H_ */\n\n\n/* END */\n\n\n/* Local Variables: */\n/* coding: utf-8    */\n/* End:             */\n"
  },
  {
    "path": "thirdparty/freetype/include/freetype2/freetype/ftparams.h",
    "content": "/****************************************************************************\n *\n * ftparams.h\n *\n *   FreeType API for possible FT_Parameter tags (specification only).\n *\n * Copyright (C) 2017-2021 by\n * David Turner, Robert Wilhelm, and Werner Lemberg.\n *\n * This file is part of the FreeType project, and may only be used,\n * modified, and distributed under the terms of the FreeType project\n * license, LICENSE.TXT.  By continuing to use, modify, or distribute\n * this file you indicate that you have read the license and\n * understand and accept it fully.\n *\n */\n\n\n#ifndef FTPARAMS_H_\n#define FTPARAMS_H_\n\n#include <freetype/freetype.h>\n\n#ifdef FREETYPE_H\n#error \"freetype.h of FreeType 1 has been loaded!\"\n#error \"Please fix the directory search order for header files\"\n#error \"so that freetype.h of FreeType 2 is found first.\"\n#endif\n\n\nFT_BEGIN_HEADER\n\n\n  /**************************************************************************\n   *\n   * @section:\n   *   parameter_tags\n   *\n   * @title:\n   *   Parameter Tags\n   *\n   * @abstract:\n   *   Macros for driver property and font loading parameter tags.\n   *\n   * @description:\n   *   This section contains macros for the @FT_Parameter structure that are\n   *   used with various functions to activate some special functionality or\n   *   different behaviour of various components of FreeType.\n   *\n   */\n\n\n  /**************************************************************************\n   *\n   * @enum:\n   *   FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY\n   *\n   * @description:\n   *   A tag for @FT_Parameter to make @FT_Open_Face ignore typographic\n   *   family names in the 'name' table (introduced in OpenType version 1.4).\n   *   Use this for backward compatibility with legacy systems that have a\n   *   four-faces-per-family restriction.\n   *\n   * @since:\n   *   2.8\n   *\n   */\n#define FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY \\\n          FT_MAKE_TAG( 'i', 'g', 'p', 'f' )\n\n\n  /* this constant is deprecated */\n#define FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY \\\n          FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY\n\n\n  /**************************************************************************\n   *\n   * @enum:\n   *   FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY\n   *\n   * @description:\n   *   A tag for @FT_Parameter to make @FT_Open_Face ignore typographic\n   *   subfamily names in the 'name' table (introduced in OpenType version\n   *   1.4).  Use this for backward compatibility with legacy systems that\n   *   have a four-faces-per-family restriction.\n   *\n   * @since:\n   *   2.8\n   *\n   */\n#define FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY \\\n          FT_MAKE_TAG( 'i', 'g', 'p', 's' )\n\n\n  /* this constant is deprecated */\n#define FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY \\\n          FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY\n\n\n  /**************************************************************************\n   *\n   * @enum:\n   *   FT_PARAM_TAG_INCREMENTAL\n   *\n   * @description:\n   *   An @FT_Parameter tag to be used with @FT_Open_Face to indicate\n   *   incremental glyph loading.\n   *\n   */\n#define FT_PARAM_TAG_INCREMENTAL \\\n          FT_MAKE_TAG( 'i', 'n', 'c', 'r' )\n\n\n  /**************************************************************************\n   *\n   * @enum:\n   *   FT_PARAM_TAG_LCD_FILTER_WEIGHTS\n   *\n   * @description:\n   *   An @FT_Parameter tag to be used with @FT_Face_Properties.  The\n   *   corresponding argument specifies the five LCD filter weights for a\n   *   given face (if using @FT_LOAD_TARGET_LCD, for example), overriding the\n   *   global default values or the values set up with\n   *   @FT_Library_SetLcdFilterWeights.\n   *\n   * @since:\n   *   2.8\n   *\n   */\n#define FT_PARAM_TAG_LCD_FILTER_WEIGHTS \\\n          FT_MAKE_TAG( 'l', 'c', 'd', 'f' )\n\n\n  /**************************************************************************\n   *\n   * @enum:\n   *   FT_PARAM_TAG_RANDOM_SEED\n   *\n   * @description:\n   *   An @FT_Parameter tag to be used with @FT_Face_Properties.  The\n   *   corresponding 32bit signed integer argument overrides the font\n   *   driver's random seed value with a face-specific one; see @random-seed.\n   *\n   * @since:\n   *   2.8\n   *\n   */\n#define FT_PARAM_TAG_RANDOM_SEED \\\n          FT_MAKE_TAG( 's', 'e', 'e', 'd' )\n\n\n  /**************************************************************************\n   *\n   * @enum:\n   *   FT_PARAM_TAG_STEM_DARKENING\n   *\n   * @description:\n   *   An @FT_Parameter tag to be used with @FT_Face_Properties.  The\n   *   corresponding Boolean argument specifies whether to apply stem\n   *   darkening, overriding the global default values or the values set up\n   *   with @FT_Property_Set (see @no-stem-darkening).\n   *\n   *   This is a passive setting that only takes effect if the font driver or\n   *   autohinter honors it, which the CFF, Type~1, and CID drivers always\n   *   do, but the autohinter only in 'light' hinting mode (as of version\n   *   2.9).\n   *\n   * @since:\n   *   2.8\n   *\n   */\n#define FT_PARAM_TAG_STEM_DARKENING \\\n          FT_MAKE_TAG( 'd', 'a', 'r', 'k' )\n\n\n  /**************************************************************************\n   *\n   * @enum:\n   *   FT_PARAM_TAG_UNPATENTED_HINTING\n   *\n   * @description:\n   *   Deprecated, no effect.\n   *\n   *   Previously: A constant used as the tag of an @FT_Parameter structure\n   *   to indicate that unpatented methods only should be used by the\n   *   TrueType bytecode interpreter for a typeface opened by @FT_Open_Face.\n   *\n   */\n#define FT_PARAM_TAG_UNPATENTED_HINTING \\\n          FT_MAKE_TAG( 'u', 'n', 'p', 'a' )\n\n\n  /* */\n\n\nFT_END_HEADER\n\n\n#endif /* FTPARAMS_H_ */\n\n\n/* END */\n"
  },
  {
    "path": "thirdparty/freetype/include/freetype2/freetype/ftpfr.h",
    "content": "/****************************************************************************\n *\n * ftpfr.h\n *\n *   FreeType API for accessing PFR-specific data (specification only).\n *\n * Copyright (C) 2002-2021 by\n * David Turner, Robert Wilhelm, and Werner Lemberg.\n *\n * This file is part of the FreeType project, and may only be used,\n * modified, and distributed under the terms of the FreeType project\n * license, LICENSE.TXT.  By continuing to use, modify, or distribute\n * this file you indicate that you have read the license and\n * understand and accept it fully.\n *\n */\n\n\n#ifndef FTPFR_H_\n#define FTPFR_H_\n\n#include <freetype/freetype.h>\n\n#ifdef FREETYPE_H\n#error \"freetype.h of FreeType 1 has been loaded!\"\n#error \"Please fix the directory search order for header files\"\n#error \"so that freetype.h of FreeType 2 is found first.\"\n#endif\n\n\nFT_BEGIN_HEADER\n\n\n  /**************************************************************************\n   *\n   * @section:\n   *   pfr_fonts\n   *\n   * @title:\n   *   PFR Fonts\n   *\n   * @abstract:\n   *   PFR/TrueDoc-specific API.\n   *\n   * @description:\n   *   This section contains the declaration of PFR-specific functions.\n   *\n   */\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *    FT_Get_PFR_Metrics\n   *\n   * @description:\n   *    Return the outline and metrics resolutions of a given PFR face.\n   *\n   * @input:\n   *    face ::\n   *      Handle to the input face.  It can be a non-PFR face.\n   *\n   * @output:\n   *    aoutline_resolution ::\n   *      Outline resolution.  This is equivalent to `face->units_per_EM` for\n   *      non-PFR fonts.  Optional (parameter can be `NULL`).\n   *\n   *    ametrics_resolution ::\n   *      Metrics resolution.  This is equivalent to `outline_resolution` for\n   *      non-PFR fonts.  Optional (parameter can be `NULL`).\n   *\n   *    ametrics_x_scale ::\n   *      A 16.16 fixed-point number used to scale distance expressed in\n   *      metrics units to device subpixels.  This is equivalent to\n   *      `face->size->x_scale`, but for metrics only.  Optional (parameter\n   *      can be `NULL`).\n   *\n   *    ametrics_y_scale ::\n   *      Same as `ametrics_x_scale` but for the vertical direction.\n   *      optional (parameter can be `NULL`).\n   *\n   * @return:\n   *    FreeType error code.  0~means success.\n   *\n   * @note:\n   *   If the input face is not a PFR, this function will return an error.\n   *   However, in all cases, it will return valid values.\n   */\n  FT_EXPORT( FT_Error )\n  FT_Get_PFR_Metrics( FT_Face    face,\n                      FT_UInt   *aoutline_resolution,\n                      FT_UInt   *ametrics_resolution,\n                      FT_Fixed  *ametrics_x_scale,\n                      FT_Fixed  *ametrics_y_scale );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *    FT_Get_PFR_Kerning\n   *\n   * @description:\n   *    Return the kerning pair corresponding to two glyphs in a PFR face.\n   *    The distance is expressed in metrics units, unlike the result of\n   *    @FT_Get_Kerning.\n   *\n   * @input:\n   *    face ::\n   *      A handle to the input face.\n   *\n   *    left ::\n   *      Index of the left glyph.\n   *\n   *    right ::\n   *      Index of the right glyph.\n   *\n   * @output:\n   *    avector ::\n   *      A kerning vector.\n   *\n   * @return:\n   *    FreeType error code.  0~means success.\n   *\n   * @note:\n   *    This function always return distances in original PFR metrics units.\n   *    This is unlike @FT_Get_Kerning with the @FT_KERNING_UNSCALED mode,\n   *    which always returns distances converted to outline units.\n   *\n   *    You can use the value of the `x_scale` and `y_scale` parameters\n   *    returned by @FT_Get_PFR_Metrics to scale these to device subpixels.\n   */\n  FT_EXPORT( FT_Error )\n  FT_Get_PFR_Kerning( FT_Face     face,\n                      FT_UInt     left,\n                      FT_UInt     right,\n                      FT_Vector  *avector );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *    FT_Get_PFR_Advance\n   *\n   * @description:\n   *    Return a given glyph advance, expressed in original metrics units,\n   *    from a PFR font.\n   *\n   * @input:\n   *    face ::\n   *      A handle to the input face.\n   *\n   *    gindex ::\n   *      The glyph index.\n   *\n   * @output:\n   *    aadvance ::\n   *      The glyph advance in metrics units.\n   *\n   * @return:\n   *    FreeType error code.  0~means success.\n   *\n   * @note:\n   *    You can use the `x_scale` or `y_scale` results of @FT_Get_PFR_Metrics\n   *    to convert the advance to device subpixels (i.e., 1/64th of pixels).\n   */\n  FT_EXPORT( FT_Error )\n  FT_Get_PFR_Advance( FT_Face   face,\n                      FT_UInt   gindex,\n                      FT_Pos   *aadvance );\n\n  /* */\n\n\nFT_END_HEADER\n\n#endif /* FTPFR_H_ */\n\n\n/* END */\n"
  },
  {
    "path": "thirdparty/freetype/include/freetype2/freetype/ftrender.h",
    "content": "/****************************************************************************\n *\n * ftrender.h\n *\n *   FreeType renderer modules public interface (specification).\n *\n * Copyright (C) 1996-2021 by\n * David Turner, Robert Wilhelm, and Werner Lemberg.\n *\n * This file is part of the FreeType project, and may only be used,\n * modified, and distributed under the terms of the FreeType project\n * license, LICENSE.TXT.  By continuing to use, modify, or distribute\n * this file you indicate that you have read the license and\n * understand and accept it fully.\n *\n */\n\n\n#ifndef FTRENDER_H_\n#define FTRENDER_H_\n\n\n#include <freetype/ftmodapi.h>\n#include <freetype/ftglyph.h>\n\n\nFT_BEGIN_HEADER\n\n\n  /**************************************************************************\n   *\n   * @section:\n   *   module_management\n   *\n   */\n\n\n  /* create a new glyph object */\n  typedef FT_Error\n  (*FT_Glyph_InitFunc)( FT_Glyph      glyph,\n                        FT_GlyphSlot  slot );\n\n  /* destroys a given glyph object */\n  typedef void\n  (*FT_Glyph_DoneFunc)( FT_Glyph  glyph );\n\n  typedef void\n  (*FT_Glyph_TransformFunc)( FT_Glyph          glyph,\n                             const FT_Matrix*  matrix,\n                             const FT_Vector*  delta );\n\n  typedef void\n  (*FT_Glyph_GetBBoxFunc)( FT_Glyph  glyph,\n                           FT_BBox*  abbox );\n\n  typedef FT_Error\n  (*FT_Glyph_CopyFunc)( FT_Glyph   source,\n                        FT_Glyph   target );\n\n  typedef FT_Error\n  (*FT_Glyph_PrepareFunc)( FT_Glyph      glyph,\n                           FT_GlyphSlot  slot );\n\n/* deprecated */\n#define FT_Glyph_Init_Func       FT_Glyph_InitFunc\n#define FT_Glyph_Done_Func       FT_Glyph_DoneFunc\n#define FT_Glyph_Transform_Func  FT_Glyph_TransformFunc\n#define FT_Glyph_BBox_Func       FT_Glyph_GetBBoxFunc\n#define FT_Glyph_Copy_Func       FT_Glyph_CopyFunc\n#define FT_Glyph_Prepare_Func    FT_Glyph_PrepareFunc\n\n\n  struct  FT_Glyph_Class_\n  {\n    FT_Long                 glyph_size;\n    FT_Glyph_Format         glyph_format;\n\n    FT_Glyph_InitFunc       glyph_init;\n    FT_Glyph_DoneFunc       glyph_done;\n    FT_Glyph_CopyFunc       glyph_copy;\n    FT_Glyph_TransformFunc  glyph_transform;\n    FT_Glyph_GetBBoxFunc    glyph_bbox;\n    FT_Glyph_PrepareFunc    glyph_prepare;\n  };\n\n\n  typedef FT_Error\n  (*FT_Renderer_RenderFunc)( FT_Renderer       renderer,\n                             FT_GlyphSlot      slot,\n                             FT_Render_Mode    mode,\n                             const FT_Vector*  origin );\n\n  typedef FT_Error\n  (*FT_Renderer_TransformFunc)( FT_Renderer       renderer,\n                                FT_GlyphSlot      slot,\n                                const FT_Matrix*  matrix,\n                                const FT_Vector*  delta );\n\n\n  typedef void\n  (*FT_Renderer_GetCBoxFunc)( FT_Renderer   renderer,\n                              FT_GlyphSlot  slot,\n                              FT_BBox*      cbox );\n\n\n  typedef FT_Error\n  (*FT_Renderer_SetModeFunc)( FT_Renderer  renderer,\n                              FT_ULong     mode_tag,\n                              FT_Pointer   mode_ptr );\n\n/* deprecated identifiers */\n#define FTRenderer_render  FT_Renderer_RenderFunc\n#define FTRenderer_transform  FT_Renderer_TransformFunc\n#define FTRenderer_getCBox  FT_Renderer_GetCBoxFunc\n#define FTRenderer_setMode  FT_Renderer_SetModeFunc\n\n\n  /**************************************************************************\n   *\n   * @struct:\n   *   FT_Renderer_Class\n   *\n   * @description:\n   *   The renderer module class descriptor.\n   *\n   * @fields:\n   *   root ::\n   *     The root @FT_Module_Class fields.\n   *\n   *   glyph_format ::\n   *     The glyph image format this renderer handles.\n   *\n   *   render_glyph ::\n   *     A method used to render the image that is in a given glyph slot into\n   *     a bitmap.\n   *\n   *   transform_glyph ::\n   *     A method used to transform the image that is in a given glyph slot.\n   *\n   *   get_glyph_cbox ::\n   *     A method used to access the glyph's cbox.\n   *\n   *   set_mode ::\n   *     A method used to pass additional parameters.\n   *\n   *   raster_class ::\n   *     For @FT_GLYPH_FORMAT_OUTLINE renderers only.  This is a pointer to\n   *     its raster's class.\n   */\n  typedef struct  FT_Renderer_Class_\n  {\n    FT_Module_Class            root;\n\n    FT_Glyph_Format            glyph_format;\n\n    FT_Renderer_RenderFunc     render_glyph;\n    FT_Renderer_TransformFunc  transform_glyph;\n    FT_Renderer_GetCBoxFunc    get_glyph_cbox;\n    FT_Renderer_SetModeFunc    set_mode;\n\n    FT_Raster_Funcs*           raster_class;\n\n  } FT_Renderer_Class;\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Get_Renderer\n   *\n   * @description:\n   *   Retrieve the current renderer for a given glyph format.\n   *\n   * @input:\n   *   library ::\n   *     A handle to the library object.\n   *\n   *   format ::\n   *     The glyph format.\n   *\n   * @return:\n   *   A renderer handle.  0~if none found.\n   *\n   * @note:\n   *   An error will be returned if a module already exists by that name, or\n   *   if the module requires a version of FreeType that is too great.\n   *\n   *   To add a new renderer, simply use @FT_Add_Module.  To retrieve a\n   *   renderer by its name, use @FT_Get_Module.\n   */\n  FT_EXPORT( FT_Renderer )\n  FT_Get_Renderer( FT_Library       library,\n                   FT_Glyph_Format  format );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Set_Renderer\n   *\n   * @description:\n   *   Set the current renderer to use, and set additional mode.\n   *\n   * @inout:\n   *   library ::\n   *     A handle to the library object.\n   *\n   * @input:\n   *   renderer ::\n   *     A handle to the renderer object.\n   *\n   *   num_params ::\n   *     The number of additional parameters.\n   *\n   *   parameters ::\n   *     Additional parameters.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *   In case of success, the renderer will be used to convert glyph images\n   *   in the renderer's known format into bitmaps.\n   *\n   *   This doesn't change the current renderer for other formats.\n   *\n   *   Currently, no FreeType renderer module uses `parameters`; you should\n   *   thus always pass `NULL` as the value.\n   */\n  FT_EXPORT( FT_Error )\n  FT_Set_Renderer( FT_Library     library,\n                   FT_Renderer    renderer,\n                   FT_UInt        num_params,\n                   FT_Parameter*  parameters );\n\n  /* */\n\n\nFT_END_HEADER\n\n#endif /* FTRENDER_H_ */\n\n\n/* END */\n"
  },
  {
    "path": "thirdparty/freetype/include/freetype2/freetype/ftsizes.h",
    "content": "/****************************************************************************\n *\n * ftsizes.h\n *\n *   FreeType size objects management (specification).\n *\n * Copyright (C) 1996-2021 by\n * David Turner, Robert Wilhelm, and Werner Lemberg.\n *\n * This file is part of the FreeType project, and may only be used,\n * modified, and distributed under the terms of the FreeType project\n * license, LICENSE.TXT.  By continuing to use, modify, or distribute\n * this file you indicate that you have read the license and\n * understand and accept it fully.\n *\n */\n\n\n  /**************************************************************************\n   *\n   * Typical application would normally not need to use these functions.\n   * However, they have been placed in a public API for the rare cases where\n   * they are needed.\n   *\n   */\n\n\n#ifndef FTSIZES_H_\n#define FTSIZES_H_\n\n\n#include <freetype/freetype.h>\n\n#ifdef FREETYPE_H\n#error \"freetype.h of FreeType 1 has been loaded!\"\n#error \"Please fix the directory search order for header files\"\n#error \"so that freetype.h of FreeType 2 is found first.\"\n#endif\n\n\nFT_BEGIN_HEADER\n\n\n  /**************************************************************************\n   *\n   * @section:\n   *   sizes_management\n   *\n   * @title:\n   *   Size Management\n   *\n   * @abstract:\n   *   Managing multiple sizes per face.\n   *\n   * @description:\n   *   When creating a new face object (e.g., with @FT_New_Face), an @FT_Size\n   *   object is automatically created and used to store all pixel-size\n   *   dependent information, available in the `face->size` field.\n   *\n   *   It is however possible to create more sizes for a given face, mostly\n   *   in order to manage several character pixel sizes of the same font\n   *   family and style.  See @FT_New_Size and @FT_Done_Size.\n   *\n   *   Note that @FT_Set_Pixel_Sizes and @FT_Set_Char_Size only modify the\n   *   contents of the current 'active' size; you thus need to use\n   *   @FT_Activate_Size to change it.\n   *\n   *   99% of applications won't need the functions provided here, especially\n   *   if they use the caching sub-system, so be cautious when using these.\n   *\n   */\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_New_Size\n   *\n   * @description:\n   *   Create a new size object from a given face object.\n   *\n   * @input:\n   *   face ::\n   *     A handle to a parent face object.\n   *\n   * @output:\n   *   asize ::\n   *     A handle to a new size object.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *   You need to call @FT_Activate_Size in order to select the new size for\n   *   upcoming calls to @FT_Set_Pixel_Sizes, @FT_Set_Char_Size,\n   *   @FT_Load_Glyph, @FT_Load_Char, etc.\n   */\n  FT_EXPORT( FT_Error )\n  FT_New_Size( FT_Face   face,\n               FT_Size*  size );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Done_Size\n   *\n   * @description:\n   *   Discard a given size object.  Note that @FT_Done_Face automatically\n   *   discards all size objects allocated with @FT_New_Size.\n   *\n   * @input:\n   *   size ::\n   *     A handle to a target size object.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   */\n  FT_EXPORT( FT_Error )\n  FT_Done_Size( FT_Size  size );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Activate_Size\n   *\n   * @description:\n   *   Even though it is possible to create several size objects for a given\n   *   face (see @FT_New_Size for details), functions like @FT_Load_Glyph or\n   *   @FT_Load_Char only use the one that has been activated last to\n   *   determine the 'current character pixel size'.\n   *\n   *   This function can be used to 'activate' a previously created size\n   *   object.\n   *\n   * @input:\n   *   size ::\n   *     A handle to a target size object.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *   If `face` is the size's parent face object, this function changes the\n   *   value of `face->size` to the input size handle.\n   */\n  FT_EXPORT( FT_Error )\n  FT_Activate_Size( FT_Size  size );\n\n  /* */\n\n\nFT_END_HEADER\n\n#endif /* FTSIZES_H_ */\n\n\n/* END */\n"
  },
  {
    "path": "thirdparty/freetype/include/freetype2/freetype/ftsnames.h",
    "content": "/****************************************************************************\n *\n * ftsnames.h\n *\n *   Simple interface to access SFNT 'name' tables (which are used\n *   to hold font names, copyright info, notices, etc.) (specification).\n *\n *   This is _not_ used to retrieve glyph names!\n *\n * Copyright (C) 1996-2021 by\n * David Turner, Robert Wilhelm, and Werner Lemberg.\n *\n * This file is part of the FreeType project, and may only be used,\n * modified, and distributed under the terms of the FreeType project\n * license, LICENSE.TXT.  By continuing to use, modify, or distribute\n * this file you indicate that you have read the license and\n * understand and accept it fully.\n *\n */\n\n\n#ifndef FTSNAMES_H_\n#define FTSNAMES_H_\n\n\n#include <freetype/freetype.h>\n#include <freetype/ftparams.h>\n\n#ifdef FREETYPE_H\n#error \"freetype.h of FreeType 1 has been loaded!\"\n#error \"Please fix the directory search order for header files\"\n#error \"so that freetype.h of FreeType 2 is found first.\"\n#endif\n\n\nFT_BEGIN_HEADER\n\n\n  /**************************************************************************\n   *\n   * @section:\n   *   sfnt_names\n   *\n   * @title:\n   *   SFNT Names\n   *\n   * @abstract:\n   *   Access the names embedded in TrueType and OpenType files.\n   *\n   * @description:\n   *   The TrueType and OpenType specifications allow the inclusion of a\n   *   special names table ('name') in font files.  This table contains\n   *   textual (and internationalized) information regarding the font, like\n   *   family name, copyright, version, etc.\n   *\n   *   The definitions below are used to access them if available.\n   *\n   *   Note that this has nothing to do with glyph names!\n   *\n   */\n\n\n  /**************************************************************************\n   *\n   * @struct:\n   *   FT_SfntName\n   *\n   * @description:\n   *   A structure used to model an SFNT 'name' table entry.\n   *\n   * @fields:\n   *   platform_id ::\n   *     The platform ID for `string`.  See @TT_PLATFORM_XXX for possible\n   *     values.\n   *\n   *   encoding_id ::\n   *     The encoding ID for `string`.  See @TT_APPLE_ID_XXX, @TT_MAC_ID_XXX,\n   *     @TT_ISO_ID_XXX, @TT_MS_ID_XXX, and @TT_ADOBE_ID_XXX for possible\n   *     values.\n   *\n   *   language_id ::\n   *     The language ID for `string`.  See @TT_MAC_LANGID_XXX and\n   *     @TT_MS_LANGID_XXX for possible values.\n   *\n   *     Registered OpenType values for `language_id` are always smaller than\n   *     0x8000; values equal or larger than 0x8000 usually indicate a\n   *     language tag string (introduced in OpenType version 1.6).  Use\n   *     function @FT_Get_Sfnt_LangTag with `language_id` as its argument to\n   *     retrieve the associated language tag.\n   *\n   *   name_id ::\n   *     An identifier for `string`.  See @TT_NAME_ID_XXX for possible\n   *     values.\n   *\n   *   string ::\n   *     The 'name' string.  Note that its format differs depending on the\n   *     (platform,encoding) pair, being either a string of bytes (without a\n   *     terminating `NULL` byte) or containing UTF-16BE entities.\n   *\n   *   string_len ::\n   *     The length of `string` in bytes.\n   *\n   * @note:\n   *   Please refer to the TrueType or OpenType specification for more\n   *   details.\n   */\n  typedef struct  FT_SfntName_\n  {\n    FT_UShort  platform_id;\n    FT_UShort  encoding_id;\n    FT_UShort  language_id;\n    FT_UShort  name_id;\n\n    FT_Byte*   string;      /* this string is *not* null-terminated! */\n    FT_UInt    string_len;  /* in bytes                              */\n\n  } FT_SfntName;\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Get_Sfnt_Name_Count\n   *\n   * @description:\n   *   Retrieve the number of name strings in the SFNT 'name' table.\n   *\n   * @input:\n   *   face ::\n   *     A handle to the source face.\n   *\n   * @return:\n   *   The number of strings in the 'name' table.\n   *\n   * @note:\n   *   This function always returns an error if the config macro\n   *   `TT_CONFIG_OPTION_SFNT_NAMES` is not defined in `ftoption.h`.\n   */\n  FT_EXPORT( FT_UInt )\n  FT_Get_Sfnt_Name_Count( FT_Face  face );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Get_Sfnt_Name\n   *\n   * @description:\n   *   Retrieve a string of the SFNT 'name' table for a given index.\n   *\n   * @input:\n   *   face ::\n   *     A handle to the source face.\n   *\n   *   idx ::\n   *     The index of the 'name' string.\n   *\n   * @output:\n   *   aname ::\n   *     The indexed @FT_SfntName structure.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *   The `string` array returned in the `aname` structure is not\n   *   null-terminated.  Note that you don't have to deallocate `string` by\n   *   yourself; FreeType takes care of it if you call @FT_Done_Face.\n   *\n   *   Use @FT_Get_Sfnt_Name_Count to get the total number of available\n   *   'name' table entries, then do a loop until you get the right platform,\n   *   encoding, and name ID.\n   *\n   *   'name' table format~1 entries can use language tags also, see\n   *   @FT_Get_Sfnt_LangTag.\n   *\n   *   This function always returns an error if the config macro\n   *   `TT_CONFIG_OPTION_SFNT_NAMES` is not defined in `ftoption.h`.\n   */\n  FT_EXPORT( FT_Error )\n  FT_Get_Sfnt_Name( FT_Face       face,\n                    FT_UInt       idx,\n                    FT_SfntName  *aname );\n\n\n  /**************************************************************************\n   *\n   * @struct:\n   *   FT_SfntLangTag\n   *\n   * @description:\n   *   A structure to model a language tag entry from an SFNT 'name' table.\n   *\n   * @fields:\n   *   string ::\n   *     The language tag string, encoded in UTF-16BE (without trailing\n   *     `NULL` bytes).\n   *\n   *   string_len ::\n   *     The length of `string` in **bytes**.\n   *\n   * @note:\n   *   Please refer to the TrueType or OpenType specification for more\n   *   details.\n   *\n   * @since:\n   *   2.8\n   */\n  typedef struct  FT_SfntLangTag_\n  {\n    FT_Byte*  string;      /* this string is *not* null-terminated! */\n    FT_UInt   string_len;  /* in bytes                              */\n\n  } FT_SfntLangTag;\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Get_Sfnt_LangTag\n   *\n   * @description:\n   *   Retrieve the language tag associated with a language ID of an SFNT\n   *   'name' table entry.\n   *\n   * @input:\n   *   face ::\n   *     A handle to the source face.\n   *\n   *   langID ::\n   *     The language ID, as returned by @FT_Get_Sfnt_Name.  This is always a\n   *     value larger than 0x8000.\n   *\n   * @output:\n   *   alangTag ::\n   *     The language tag associated with the 'name' table entry's language\n   *     ID.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *   The `string` array returned in the `alangTag` structure is not\n   *   null-terminated.  Note that you don't have to deallocate `string` by\n   *   yourself; FreeType takes care of it if you call @FT_Done_Face.\n   *\n   *   Only 'name' table format~1 supports language tags.  For format~0\n   *   tables, this function always returns FT_Err_Invalid_Table.  For\n   *   invalid format~1 language ID values, FT_Err_Invalid_Argument is\n   *   returned.\n   *\n   *   This function always returns an error if the config macro\n   *   `TT_CONFIG_OPTION_SFNT_NAMES` is not defined in `ftoption.h`.\n   *\n   * @since:\n   *   2.8\n   */\n  FT_EXPORT( FT_Error )\n  FT_Get_Sfnt_LangTag( FT_Face          face,\n                       FT_UInt          langID,\n                       FT_SfntLangTag  *alangTag );\n\n\n  /* */\n\n\nFT_END_HEADER\n\n#endif /* FTSNAMES_H_ */\n\n\n/* END */\n"
  },
  {
    "path": "thirdparty/freetype/include/freetype2/freetype/ftstroke.h",
    "content": "/****************************************************************************\n *\n * ftstroke.h\n *\n *   FreeType path stroker (specification).\n *\n * Copyright (C) 2002-2021 by\n * David Turner, Robert Wilhelm, and Werner Lemberg.\n *\n * This file is part of the FreeType project, and may only be used,\n * modified, and distributed under the terms of the FreeType project\n * license, LICENSE.TXT.  By continuing to use, modify, or distribute\n * this file you indicate that you have read the license and\n * understand and accept it fully.\n *\n */\n\n\n#ifndef FTSTROKE_H_\n#define FTSTROKE_H_\n\n#include <freetype/ftoutln.h>\n#include <freetype/ftglyph.h>\n\n\nFT_BEGIN_HEADER\n\n\n  /**************************************************************************\n   *\n   * @section:\n   *    glyph_stroker\n   *\n   * @title:\n   *    Glyph Stroker\n   *\n   * @abstract:\n   *    Generating bordered and stroked glyphs.\n   *\n   * @description:\n   *    This component generates stroked outlines of a given vectorial glyph.\n   *    It also allows you to retrieve the 'outside' and/or the 'inside'\n   *    borders of the stroke.\n   *\n   *    This can be useful to generate 'bordered' glyph, i.e., glyphs\n   *    displayed with a colored (and anti-aliased) border around their\n   *    shape.\n   *\n   * @order:\n   *    FT_Stroker\n   *\n   *    FT_Stroker_LineJoin\n   *    FT_Stroker_LineCap\n   *    FT_StrokerBorder\n   *\n   *    FT_Outline_GetInsideBorder\n   *    FT_Outline_GetOutsideBorder\n   *\n   *    FT_Glyph_Stroke\n   *    FT_Glyph_StrokeBorder\n   *\n   *    FT_Stroker_New\n   *    FT_Stroker_Set\n   *    FT_Stroker_Rewind\n   *    FT_Stroker_ParseOutline\n   *    FT_Stroker_Done\n   *\n   *    FT_Stroker_BeginSubPath\n   *    FT_Stroker_EndSubPath\n   *\n   *    FT_Stroker_LineTo\n   *    FT_Stroker_ConicTo\n   *    FT_Stroker_CubicTo\n   *\n   *    FT_Stroker_GetBorderCounts\n   *    FT_Stroker_ExportBorder\n   *    FT_Stroker_GetCounts\n   *    FT_Stroker_Export\n   *\n   */\n\n\n  /**************************************************************************\n   *\n   * @type:\n   *   FT_Stroker\n   *\n   * @description:\n   *   Opaque handle to a path stroker object.\n   */\n  typedef struct FT_StrokerRec_*  FT_Stroker;\n\n\n  /**************************************************************************\n   *\n   * @enum:\n   *   FT_Stroker_LineJoin\n   *\n   * @description:\n   *   These values determine how two joining lines are rendered in a\n   *   stroker.\n   *\n   * @values:\n   *   FT_STROKER_LINEJOIN_ROUND ::\n   *     Used to render rounded line joins.  Circular arcs are used to join\n   *     two lines smoothly.\n   *\n   *   FT_STROKER_LINEJOIN_BEVEL ::\n   *     Used to render beveled line joins.  The outer corner of the joined\n   *     lines is filled by enclosing the triangular region of the corner\n   *     with a straight line between the outer corners of each stroke.\n   *\n   *   FT_STROKER_LINEJOIN_MITER_FIXED ::\n   *     Used to render mitered line joins, with fixed bevels if the miter\n   *     limit is exceeded.  The outer edges of the strokes for the two\n   *     segments are extended until they meet at an angle.  A bevel join\n   *     (see above) is used if the segments meet at too sharp an angle and\n   *     the outer edges meet beyond a distance corresponding to the meter\n   *     limit.  This prevents long spikes being created.\n   *     `FT_STROKER_LINEJOIN_MITER_FIXED` generates a miter line join as\n   *     used in PostScript and PDF.\n   *\n   *   FT_STROKER_LINEJOIN_MITER_VARIABLE ::\n   *   FT_STROKER_LINEJOIN_MITER ::\n   *     Used to render mitered line joins, with variable bevels if the miter\n   *     limit is exceeded.  The intersection of the strokes is clipped\n   *     perpendicularly to the bisector, at a distance corresponding to\n   *     the miter limit. This prevents long spikes being created.\n   *     `FT_STROKER_LINEJOIN_MITER_VARIABLE` generates a mitered line join\n   *     as used in XPS.  `FT_STROKER_LINEJOIN_MITER` is an alias for\n   *     `FT_STROKER_LINEJOIN_MITER_VARIABLE`, retained for backward\n   *     compatibility.\n   */\n  typedef enum  FT_Stroker_LineJoin_\n  {\n    FT_STROKER_LINEJOIN_ROUND          = 0,\n    FT_STROKER_LINEJOIN_BEVEL          = 1,\n    FT_STROKER_LINEJOIN_MITER_VARIABLE = 2,\n    FT_STROKER_LINEJOIN_MITER          = FT_STROKER_LINEJOIN_MITER_VARIABLE,\n    FT_STROKER_LINEJOIN_MITER_FIXED    = 3\n\n  } FT_Stroker_LineJoin;\n\n\n  /**************************************************************************\n   *\n   * @enum:\n   *   FT_Stroker_LineCap\n   *\n   * @description:\n   *   These values determine how the end of opened sub-paths are rendered in\n   *   a stroke.\n   *\n   * @values:\n   *   FT_STROKER_LINECAP_BUTT ::\n   *     The end of lines is rendered as a full stop on the last point\n   *     itself.\n   *\n   *   FT_STROKER_LINECAP_ROUND ::\n   *     The end of lines is rendered as a half-circle around the last point.\n   *\n   *   FT_STROKER_LINECAP_SQUARE ::\n   *     The end of lines is rendered as a square around the last point.\n   */\n  typedef enum  FT_Stroker_LineCap_\n  {\n    FT_STROKER_LINECAP_BUTT = 0,\n    FT_STROKER_LINECAP_ROUND,\n    FT_STROKER_LINECAP_SQUARE\n\n  } FT_Stroker_LineCap;\n\n\n  /**************************************************************************\n   *\n   * @enum:\n   *   FT_StrokerBorder\n   *\n   * @description:\n   *   These values are used to select a given stroke border in\n   *   @FT_Stroker_GetBorderCounts and @FT_Stroker_ExportBorder.\n   *\n   * @values:\n   *   FT_STROKER_BORDER_LEFT ::\n   *     Select the left border, relative to the drawing direction.\n   *\n   *   FT_STROKER_BORDER_RIGHT ::\n   *     Select the right border, relative to the drawing direction.\n   *\n   * @note:\n   *   Applications are generally interested in the 'inside' and 'outside'\n   *   borders.  However, there is no direct mapping between these and the\n   *   'left' and 'right' ones, since this really depends on the glyph's\n   *   drawing orientation, which varies between font formats.\n   *\n   *   You can however use @FT_Outline_GetInsideBorder and\n   *   @FT_Outline_GetOutsideBorder to get these.\n   */\n  typedef enum  FT_StrokerBorder_\n  {\n    FT_STROKER_BORDER_LEFT = 0,\n    FT_STROKER_BORDER_RIGHT\n\n  } FT_StrokerBorder;\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Outline_GetInsideBorder\n   *\n   * @description:\n   *   Retrieve the @FT_StrokerBorder value corresponding to the 'inside'\n   *   borders of a given outline.\n   *\n   * @input:\n   *   outline ::\n   *     The source outline handle.\n   *\n   * @return:\n   *   The border index.  @FT_STROKER_BORDER_RIGHT for empty or invalid\n   *   outlines.\n   */\n  FT_EXPORT( FT_StrokerBorder )\n  FT_Outline_GetInsideBorder( FT_Outline*  outline );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Outline_GetOutsideBorder\n   *\n   * @description:\n   *   Retrieve the @FT_StrokerBorder value corresponding to the 'outside'\n   *   borders of a given outline.\n   *\n   * @input:\n   *   outline ::\n   *     The source outline handle.\n   *\n   * @return:\n   *   The border index.  @FT_STROKER_BORDER_LEFT for empty or invalid\n   *   outlines.\n   */\n  FT_EXPORT( FT_StrokerBorder )\n  FT_Outline_GetOutsideBorder( FT_Outline*  outline );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Stroker_New\n   *\n   * @description:\n   *   Create a new stroker object.\n   *\n   * @input:\n   *   library ::\n   *     FreeType library handle.\n   *\n   * @output:\n   *   astroker ::\n   *     A new stroker object handle.  `NULL` in case of error.\n   *\n   * @return:\n   *    FreeType error code.  0~means success.\n   */\n  FT_EXPORT( FT_Error )\n  FT_Stroker_New( FT_Library   library,\n                  FT_Stroker  *astroker );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Stroker_Set\n   *\n   * @description:\n   *   Reset a stroker object's attributes.\n   *\n   * @input:\n   *   stroker ::\n   *     The target stroker handle.\n   *\n   *   radius ::\n   *     The border radius.\n   *\n   *   line_cap ::\n   *     The line cap style.\n   *\n   *   line_join ::\n   *     The line join style.\n   *\n   *   miter_limit ::\n   *     The maximum reciprocal sine of half-angle at the miter join,\n   *     expressed as 16.16 fixed point value.\n   *\n   * @note:\n   *   The `radius` is expressed in the same units as the outline\n   *   coordinates.\n   *\n   *   The `miter_limit` multiplied by the `radius` gives the maximum size\n   *   of a miter spike, at which it is clipped for\n   *   @FT_STROKER_LINEJOIN_MITER_VARIABLE or replaced with a bevel join for\n   *   @FT_STROKER_LINEJOIN_MITER_FIXED.\n   *\n   *   This function calls @FT_Stroker_Rewind automatically.\n   */\n  FT_EXPORT( void )\n  FT_Stroker_Set( FT_Stroker           stroker,\n                  FT_Fixed             radius,\n                  FT_Stroker_LineCap   line_cap,\n                  FT_Stroker_LineJoin  line_join,\n                  FT_Fixed             miter_limit );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Stroker_Rewind\n   *\n   * @description:\n   *   Reset a stroker object without changing its attributes.  You should\n   *   call this function before beginning a new series of calls to\n   *   @FT_Stroker_BeginSubPath or @FT_Stroker_EndSubPath.\n   *\n   * @input:\n   *   stroker ::\n   *     The target stroker handle.\n   */\n  FT_EXPORT( void )\n  FT_Stroker_Rewind( FT_Stroker  stroker );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Stroker_ParseOutline\n   *\n   * @description:\n   *   A convenience function used to parse a whole outline with the stroker.\n   *   The resulting outline(s) can be retrieved later by functions like\n   *   @FT_Stroker_GetCounts and @FT_Stroker_Export.\n   *\n   * @input:\n   *   stroker ::\n   *     The target stroker handle.\n   *\n   *   outline ::\n   *     The source outline.\n   *\n   *   opened ::\n   *     A boolean.  If~1, the outline is treated as an open path instead of\n   *     a closed one.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *   If `opened` is~0 (the default), the outline is treated as a closed\n   *   path, and the stroker generates two distinct 'border' outlines.\n   *\n   *   If `opened` is~1, the outline is processed as an open path, and the\n   *   stroker generates a single 'stroke' outline.\n   *\n   *   This function calls @FT_Stroker_Rewind automatically.\n   */\n  FT_EXPORT( FT_Error )\n  FT_Stroker_ParseOutline( FT_Stroker   stroker,\n                           FT_Outline*  outline,\n                           FT_Bool      opened );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Stroker_BeginSubPath\n   *\n   * @description:\n   *   Start a new sub-path in the stroker.\n   *\n   * @input:\n   *   stroker ::\n   *     The target stroker handle.\n   *\n   *   to ::\n   *     A pointer to the start vector.\n   *\n   *   open ::\n   *     A boolean.  If~1, the sub-path is treated as an open one.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *   This function is useful when you need to stroke a path that is not\n   *   stored as an @FT_Outline object.\n   */\n  FT_EXPORT( FT_Error )\n  FT_Stroker_BeginSubPath( FT_Stroker  stroker,\n                           FT_Vector*  to,\n                           FT_Bool     open );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Stroker_EndSubPath\n   *\n   * @description:\n   *   Close the current sub-path in the stroker.\n   *\n   * @input:\n   *   stroker ::\n   *     The target stroker handle.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *   You should call this function after @FT_Stroker_BeginSubPath.  If the\n   *   subpath was not 'opened', this function 'draws' a single line segment\n   *   to the start position when needed.\n   */\n  FT_EXPORT( FT_Error )\n  FT_Stroker_EndSubPath( FT_Stroker  stroker );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Stroker_LineTo\n   *\n   * @description:\n   *   'Draw' a single line segment in the stroker's current sub-path, from\n   *   the last position.\n   *\n   * @input:\n   *   stroker ::\n   *     The target stroker handle.\n   *\n   *   to ::\n   *     A pointer to the destination point.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *   You should call this function between @FT_Stroker_BeginSubPath and\n   *   @FT_Stroker_EndSubPath.\n   */\n  FT_EXPORT( FT_Error )\n  FT_Stroker_LineTo( FT_Stroker  stroker,\n                     FT_Vector*  to );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Stroker_ConicTo\n   *\n   * @description:\n   *   'Draw' a single quadratic Bezier in the stroker's current sub-path,\n   *   from the last position.\n   *\n   * @input:\n   *   stroker ::\n   *     The target stroker handle.\n   *\n   *   control ::\n   *     A pointer to a Bezier control point.\n   *\n   *   to ::\n   *     A pointer to the destination point.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *   You should call this function between @FT_Stroker_BeginSubPath and\n   *   @FT_Stroker_EndSubPath.\n   */\n  FT_EXPORT( FT_Error )\n  FT_Stroker_ConicTo( FT_Stroker  stroker,\n                      FT_Vector*  control,\n                      FT_Vector*  to );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Stroker_CubicTo\n   *\n   * @description:\n   *   'Draw' a single cubic Bezier in the stroker's current sub-path, from\n   *   the last position.\n   *\n   * @input:\n   *   stroker ::\n   *     The target stroker handle.\n   *\n   *   control1 ::\n   *     A pointer to the first Bezier control point.\n   *\n   *   control2 ::\n   *     A pointer to second Bezier control point.\n   *\n   *   to ::\n   *     A pointer to the destination point.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *   You should call this function between @FT_Stroker_BeginSubPath and\n   *   @FT_Stroker_EndSubPath.\n   */\n  FT_EXPORT( FT_Error )\n  FT_Stroker_CubicTo( FT_Stroker  stroker,\n                      FT_Vector*  control1,\n                      FT_Vector*  control2,\n                      FT_Vector*  to );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Stroker_GetBorderCounts\n   *\n   * @description:\n   *   Call this function once you have finished parsing your paths with the\n   *   stroker.  It returns the number of points and contours necessary to\n   *   export one of the 'border' or 'stroke' outlines generated by the\n   *   stroker.\n   *\n   * @input:\n   *   stroker ::\n   *     The target stroker handle.\n   *\n   *   border ::\n   *     The border index.\n   *\n   * @output:\n   *   anum_points ::\n   *     The number of points.\n   *\n   *   anum_contours ::\n   *     The number of contours.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *   When an outline, or a sub-path, is 'closed', the stroker generates two\n   *   independent 'border' outlines, named 'left' and 'right'.\n   *\n   *   When the outline, or a sub-path, is 'opened', the stroker merges the\n   *   'border' outlines with caps.  The 'left' border receives all points,\n   *   while the 'right' border becomes empty.\n   *\n   *   Use the function @FT_Stroker_GetCounts instead if you want to retrieve\n   *   the counts associated to both borders.\n   */\n  FT_EXPORT( FT_Error )\n  FT_Stroker_GetBorderCounts( FT_Stroker        stroker,\n                              FT_StrokerBorder  border,\n                              FT_UInt          *anum_points,\n                              FT_UInt          *anum_contours );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Stroker_ExportBorder\n   *\n   * @description:\n   *   Call this function after @FT_Stroker_GetBorderCounts to export the\n   *   corresponding border to your own @FT_Outline structure.\n   *\n   *   Note that this function appends the border points and contours to your\n   *   outline, but does not try to resize its arrays.\n   *\n   * @input:\n   *   stroker ::\n   *     The target stroker handle.\n   *\n   *   border ::\n   *     The border index.\n   *\n   *   outline ::\n   *     The target outline handle.\n   *\n   * @note:\n   *   Always call this function after @FT_Stroker_GetBorderCounts to get\n   *   sure that there is enough room in your @FT_Outline object to receive\n   *   all new data.\n   *\n   *   When an outline, or a sub-path, is 'closed', the stroker generates two\n   *   independent 'border' outlines, named 'left' and 'right'.\n   *\n   *   When the outline, or a sub-path, is 'opened', the stroker merges the\n   *   'border' outlines with caps.  The 'left' border receives all points,\n   *   while the 'right' border becomes empty.\n   *\n   *   Use the function @FT_Stroker_Export instead if you want to retrieve\n   *   all borders at once.\n   */\n  FT_EXPORT( void )\n  FT_Stroker_ExportBorder( FT_Stroker        stroker,\n                           FT_StrokerBorder  border,\n                           FT_Outline*       outline );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Stroker_GetCounts\n   *\n   * @description:\n   *   Call this function once you have finished parsing your paths with the\n   *   stroker.  It returns the number of points and contours necessary to\n   *   export all points/borders from the stroked outline/path.\n   *\n   * @input:\n   *   stroker ::\n   *     The target stroker handle.\n   *\n   * @output:\n   *   anum_points ::\n   *     The number of points.\n   *\n   *   anum_contours ::\n   *     The number of contours.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   */\n  FT_EXPORT( FT_Error )\n  FT_Stroker_GetCounts( FT_Stroker  stroker,\n                        FT_UInt    *anum_points,\n                        FT_UInt    *anum_contours );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Stroker_Export\n   *\n   * @description:\n   *   Call this function after @FT_Stroker_GetBorderCounts to export all\n   *   borders to your own @FT_Outline structure.\n   *\n   *   Note that this function appends the border points and contours to your\n   *   outline, but does not try to resize its arrays.\n   *\n   * @input:\n   *   stroker ::\n   *     The target stroker handle.\n   *\n   *   outline ::\n   *     The target outline handle.\n   */\n  FT_EXPORT( void )\n  FT_Stroker_Export( FT_Stroker   stroker,\n                     FT_Outline*  outline );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Stroker_Done\n   *\n   * @description:\n   *   Destroy a stroker object.\n   *\n   * @input:\n   *   stroker ::\n   *     A stroker handle.  Can be `NULL`.\n   */\n  FT_EXPORT( void )\n  FT_Stroker_Done( FT_Stroker  stroker );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Glyph_Stroke\n   *\n   * @description:\n   *   Stroke a given outline glyph object with a given stroker.\n   *\n   * @inout:\n   *   pglyph ::\n   *     Source glyph handle on input, new glyph handle on output.\n   *\n   * @input:\n   *   stroker ::\n   *     A stroker handle.\n   *\n   *   destroy ::\n   *     A Boolean.  If~1, the source glyph object is destroyed on success.\n   *\n   * @return:\n   *    FreeType error code.  0~means success.\n   *\n   * @note:\n   *   The source glyph is untouched in case of error.\n   *\n   *   Adding stroke may yield a significantly wider and taller glyph\n   *   depending on how large of a radius was used to stroke the glyph.  You\n   *   may need to manually adjust horizontal and vertical advance amounts to\n   *   account for this added size.\n   */\n  FT_EXPORT( FT_Error )\n  FT_Glyph_Stroke( FT_Glyph    *pglyph,\n                   FT_Stroker   stroker,\n                   FT_Bool      destroy );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Glyph_StrokeBorder\n   *\n   * @description:\n   *   Stroke a given outline glyph object with a given stroker, but only\n   *   return either its inside or outside border.\n   *\n   * @inout:\n   *   pglyph ::\n   *     Source glyph handle on input, new glyph handle on output.\n   *\n   * @input:\n   *   stroker ::\n   *     A stroker handle.\n   *\n   *   inside ::\n   *     A Boolean.  If~1, return the inside border, otherwise the outside\n   *     border.\n   *\n   *   destroy ::\n   *     A Boolean.  If~1, the source glyph object is destroyed on success.\n   *\n   * @return:\n   *    FreeType error code.  0~means success.\n   *\n   * @note:\n   *   The source glyph is untouched in case of error.\n   *\n   *   Adding stroke may yield a significantly wider and taller glyph\n   *   depending on how large of a radius was used to stroke the glyph.  You\n   *   may need to manually adjust horizontal and vertical advance amounts to\n   *   account for this added size.\n   */\n  FT_EXPORT( FT_Error )\n  FT_Glyph_StrokeBorder( FT_Glyph    *pglyph,\n                         FT_Stroker   stroker,\n                         FT_Bool      inside,\n                         FT_Bool      destroy );\n\n  /* */\n\nFT_END_HEADER\n\n#endif /* FTSTROKE_H_ */\n\n\n/* END */\n\n\n/* Local Variables: */\n/* coding: utf-8    */\n/* End:             */\n"
  },
  {
    "path": "thirdparty/freetype/include/freetype2/freetype/ftsynth.h",
    "content": "/****************************************************************************\n *\n * ftsynth.h\n *\n *   FreeType synthesizing code for emboldening and slanting\n *   (specification).\n *\n * Copyright (C) 2000-2021 by\n * David Turner, Robert Wilhelm, and Werner Lemberg.\n *\n * This file is part of the FreeType project, and may only be used,\n * modified, and distributed under the terms of the FreeType project\n * license, LICENSE.TXT.  By continuing to use, modify, or distribute\n * this file you indicate that you have read the license and\n * understand and accept it fully.\n *\n */\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n  /*********                                                       *********/\n  /*********        WARNING, THIS IS ALPHA CODE!  THIS API         *********/\n  /*********    IS DUE TO CHANGE UNTIL STRICTLY NOTIFIED BY THE    *********/\n  /*********            FREETYPE DEVELOPMENT TEAM                  *********/\n  /*********                                                       *********/\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n  /* Main reason for not lifting the functions in this module to a  */\n  /* 'standard' API is that the used parameters for emboldening and */\n  /* slanting are not configurable.  Consider the functions as a    */\n  /* code resource that should be copied into the application and   */\n  /* adapted to the particular needs.                               */\n\n\n#ifndef FTSYNTH_H_\n#define FTSYNTH_H_\n\n\n#include <freetype/freetype.h>\n\n#ifdef FREETYPE_H\n#error \"freetype.h of FreeType 1 has been loaded!\"\n#error \"Please fix the directory search order for header files\"\n#error \"so that freetype.h of FreeType 2 is found first.\"\n#endif\n\n\nFT_BEGIN_HEADER\n\n  /* Embolden a glyph by a 'reasonable' value (which is highly a matter of */\n  /* taste).  This function is actually a convenience function, providing  */\n  /* a wrapper for @FT_Outline_Embolden and @FT_Bitmap_Embolden.           */\n  /*                                                                       */\n  /* For emboldened outlines the height, width, and advance metrics are    */\n  /* increased by the strength of the emboldening -- this even affects     */\n  /* mono-width fonts!                                                     */\n  /*                                                                       */\n  /* You can also call @FT_Outline_Get_CBox to get precise values.         */\n  FT_EXPORT( void )\n  FT_GlyphSlot_Embolden( FT_GlyphSlot  slot );\n\n  /* Slant an outline glyph to the right by about 12 degrees. */\n  FT_EXPORT( void )\n  FT_GlyphSlot_Oblique( FT_GlyphSlot  slot );\n\n  /* */\n\n\nFT_END_HEADER\n\n#endif /* FTSYNTH_H_ */\n\n\n/* END */\n"
  },
  {
    "path": "thirdparty/freetype/include/freetype2/freetype/ftsystem.h",
    "content": "/****************************************************************************\n *\n * ftsystem.h\n *\n *   FreeType low-level system interface definition (specification).\n *\n * Copyright (C) 1996-2021 by\n * David Turner, Robert Wilhelm, and Werner Lemberg.\n *\n * This file is part of the FreeType project, and may only be used,\n * modified, and distributed under the terms of the FreeType project\n * license, LICENSE.TXT.  By continuing to use, modify, or distribute\n * this file you indicate that you have read the license and\n * understand and accept it fully.\n *\n */\n\n\n#ifndef FTSYSTEM_H_\n#define FTSYSTEM_H_\n\n\n\n\nFT_BEGIN_HEADER\n\n\n  /**************************************************************************\n   *\n   * @section:\n   *  system_interface\n   *\n   * @title:\n   *  System Interface\n   *\n   * @abstract:\n   *  How FreeType manages memory and i/o.\n   *\n   * @description:\n   *  This section contains various definitions related to memory management\n   *  and i/o access.  You need to understand this information if you want to\n   *  use a custom memory manager or you own i/o streams.\n   *\n   */\n\n\n  /**************************************************************************\n   *\n   *                 M E M O R Y   M A N A G E M E N T\n   *\n   */\n\n\n  /**************************************************************************\n   *\n   * @type:\n   *   FT_Memory\n   *\n   * @description:\n   *   A handle to a given memory manager object, defined with an\n   *   @FT_MemoryRec structure.\n   *\n   */\n  typedef struct FT_MemoryRec_*  FT_Memory;\n\n\n  /**************************************************************************\n   *\n   * @functype:\n   *   FT_Alloc_Func\n   *\n   * @description:\n   *   A function used to allocate `size` bytes from `memory`.\n   *\n   * @input:\n   *   memory ::\n   *     A handle to the source memory manager.\n   *\n   *   size ::\n   *     The size in bytes to allocate.\n   *\n   * @return:\n   *   Address of new memory block.  0~in case of failure.\n   *\n   */\n  typedef void*\n  (*FT_Alloc_Func)( FT_Memory  memory,\n                    long       size );\n\n\n  /**************************************************************************\n   *\n   * @functype:\n   *   FT_Free_Func\n   *\n   * @description:\n   *   A function used to release a given block of memory.\n   *\n   * @input:\n   *   memory ::\n   *     A handle to the source memory manager.\n   *\n   *   block ::\n   *     The address of the target memory block.\n   *\n   */\n  typedef void\n  (*FT_Free_Func)( FT_Memory  memory,\n                   void*      block );\n\n\n  /**************************************************************************\n   *\n   * @functype:\n   *   FT_Realloc_Func\n   *\n   * @description:\n   *   A function used to re-allocate a given block of memory.\n   *\n   * @input:\n   *   memory ::\n   *     A handle to the source memory manager.\n   *\n   *   cur_size ::\n   *     The block's current size in bytes.\n   *\n   *   new_size ::\n   *     The block's requested new size.\n   *\n   *   block ::\n   *     The block's current address.\n   *\n   * @return:\n   *   New block address.  0~in case of memory shortage.\n   *\n   * @note:\n   *   In case of error, the old block must still be available.\n   *\n   */\n  typedef void*\n  (*FT_Realloc_Func)( FT_Memory  memory,\n                      long       cur_size,\n                      long       new_size,\n                      void*      block );\n\n\n  /**************************************************************************\n   *\n   * @struct:\n   *   FT_MemoryRec\n   *\n   * @description:\n   *   A structure used to describe a given memory manager to FreeType~2.\n   *\n   * @fields:\n   *   user ::\n   *     A generic typeless pointer for user data.\n   *\n   *   alloc ::\n   *     A pointer type to an allocation function.\n   *\n   *   free ::\n   *     A pointer type to an memory freeing function.\n   *\n   *   realloc ::\n   *     A pointer type to a reallocation function.\n   *\n   */\n  struct  FT_MemoryRec_\n  {\n    void*            user;\n    FT_Alloc_Func    alloc;\n    FT_Free_Func     free;\n    FT_Realloc_Func  realloc;\n  };\n\n\n  /**************************************************************************\n   *\n   *                      I / O   M A N A G E M E N T\n   *\n   */\n\n\n  /**************************************************************************\n   *\n   * @type:\n   *   FT_Stream\n   *\n   * @description:\n   *   A handle to an input stream.\n   *\n   * @also:\n   *   See @FT_StreamRec for the publicly accessible fields of a given stream\n   *   object.\n   *\n   */\n  typedef struct FT_StreamRec_*  FT_Stream;\n\n\n  /**************************************************************************\n   *\n   * @struct:\n   *   FT_StreamDesc\n   *\n   * @description:\n   *   A union type used to store either a long or a pointer.  This is used\n   *   to store a file descriptor or a `FILE*` in an input stream.\n   *\n   */\n  typedef union  FT_StreamDesc_\n  {\n    long   value;\n    void*  pointer;\n\n  } FT_StreamDesc;\n\n\n  /**************************************************************************\n   *\n   * @functype:\n   *   FT_Stream_IoFunc\n   *\n   * @description:\n   *   A function used to seek and read data from a given input stream.\n   *\n   * @input:\n   *   stream ::\n   *     A handle to the source stream.\n   *\n   *   offset ::\n   *     The offset of read in stream (always from start).\n   *\n   *   buffer ::\n   *     The address of the read buffer.\n   *\n   *   count ::\n   *     The number of bytes to read from the stream.\n   *\n   * @return:\n   *   The number of bytes effectively read by the stream.\n   *\n   * @note:\n   *   This function might be called to perform a seek or skip operation with\n   *   a `count` of~0.  A non-zero return value then indicates an error.\n   *\n   */\n  typedef unsigned long\n  (*FT_Stream_IoFunc)( FT_Stream       stream,\n                       unsigned long   offset,\n                       unsigned char*  buffer,\n                       unsigned long   count );\n\n\n  /**************************************************************************\n   *\n   * @functype:\n   *   FT_Stream_CloseFunc\n   *\n   * @description:\n   *   A function used to close a given input stream.\n   *\n   * @input:\n   *  stream ::\n   *    A handle to the target stream.\n   *\n   */\n  typedef void\n  (*FT_Stream_CloseFunc)( FT_Stream  stream );\n\n\n  /**************************************************************************\n   *\n   * @struct:\n   *   FT_StreamRec\n   *\n   * @description:\n   *   A structure used to describe an input stream.\n   *\n   * @input:\n   *   base ::\n   *     For memory-based streams, this is the address of the first stream\n   *     byte in memory.  This field should always be set to `NULL` for\n   *     disk-based streams.\n   *\n   *   size ::\n   *     The stream size in bytes.\n   *\n   *     In case of compressed streams where the size is unknown before\n   *     actually doing the decompression, the value is set to 0x7FFFFFFF.\n   *     (Note that this size value can occur for normal streams also; it is\n   *     thus just a hint.)\n   *\n   *   pos ::\n   *     The current position within the stream.\n   *\n   *   descriptor ::\n   *     This field is a union that can hold an integer or a pointer.  It is\n   *     used by stream implementations to store file descriptors or `FILE*`\n   *     pointers.\n   *\n   *   pathname ::\n   *     This field is completely ignored by FreeType.  However, it is often\n   *     useful during debugging to use it to store the stream's filename\n   *     (where available).\n   *\n   *   read ::\n   *     The stream's input function.\n   *\n   *   close ::\n   *     The stream's close function.\n   *\n   *   memory ::\n   *     The memory manager to use to preload frames.  This is set internally\n   *     by FreeType and shouldn't be touched by stream implementations.\n   *\n   *   cursor ::\n   *     This field is set and used internally by FreeType when parsing\n   *     frames.  In particular, the `FT_GET_XXX` macros use this instead of\n   *     the `pos` field.\n   *\n   *   limit ::\n   *     This field is set and used internally by FreeType when parsing\n   *     frames.\n   *\n   */\n  typedef struct  FT_StreamRec_\n  {\n    unsigned char*       base;\n    unsigned long        size;\n    unsigned long        pos;\n\n    FT_StreamDesc        descriptor;\n    FT_StreamDesc        pathname;\n    FT_Stream_IoFunc     read;\n    FT_Stream_CloseFunc  close;\n\n    FT_Memory            memory;\n    unsigned char*       cursor;\n    unsigned char*       limit;\n\n  } FT_StreamRec;\n\n  /* */\n\n\nFT_END_HEADER\n\n#endif /* FTSYSTEM_H_ */\n\n\n/* END */\n"
  },
  {
    "path": "thirdparty/freetype/include/freetype2/freetype/fttrigon.h",
    "content": "/****************************************************************************\n *\n * fttrigon.h\n *\n *   FreeType trigonometric functions (specification).\n *\n * Copyright (C) 2001-2021 by\n * David Turner, Robert Wilhelm, and Werner Lemberg.\n *\n * This file is part of the FreeType project, and may only be used,\n * modified, and distributed under the terms of the FreeType project\n * license, LICENSE.TXT.  By continuing to use, modify, or distribute\n * this file you indicate that you have read the license and\n * understand and accept it fully.\n *\n */\n\n\n#ifndef FTTRIGON_H_\n#define FTTRIGON_H_\n\n#include <freetype/freetype.h>\n\n#ifdef FREETYPE_H\n#error \"freetype.h of FreeType 1 has been loaded!\"\n#error \"Please fix the directory search order for header files\"\n#error \"so that freetype.h of FreeType 2 is found first.\"\n#endif\n\n\nFT_BEGIN_HEADER\n\n\n  /**************************************************************************\n   *\n   * @section:\n   *  computations\n   *\n   */\n\n\n  /**************************************************************************\n   *\n   * @type:\n   *   FT_Angle\n   *\n   * @description:\n   *   This type is used to model angle values in FreeType.  Note that the\n   *   angle is a 16.16 fixed-point value expressed in degrees.\n   *\n   */\n  typedef FT_Fixed  FT_Angle;\n\n\n  /**************************************************************************\n   *\n   * @macro:\n   *   FT_ANGLE_PI\n   *\n   * @description:\n   *   The angle pi expressed in @FT_Angle units.\n   *\n   */\n#define FT_ANGLE_PI  ( 180L << 16 )\n\n\n  /**************************************************************************\n   *\n   * @macro:\n   *   FT_ANGLE_2PI\n   *\n   * @description:\n   *   The angle 2*pi expressed in @FT_Angle units.\n   *\n   */\n#define FT_ANGLE_2PI  ( FT_ANGLE_PI * 2 )\n\n\n  /**************************************************************************\n   *\n   * @macro:\n   *   FT_ANGLE_PI2\n   *\n   * @description:\n   *   The angle pi/2 expressed in @FT_Angle units.\n   *\n   */\n#define FT_ANGLE_PI2  ( FT_ANGLE_PI / 2 )\n\n\n  /**************************************************************************\n   *\n   * @macro:\n   *   FT_ANGLE_PI4\n   *\n   * @description:\n   *   The angle pi/4 expressed in @FT_Angle units.\n   *\n   */\n#define FT_ANGLE_PI4  ( FT_ANGLE_PI / 4 )\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Sin\n   *\n   * @description:\n   *   Return the sinus of a given angle in fixed-point format.\n   *\n   * @input:\n   *   angle ::\n   *     The input angle.\n   *\n   * @return:\n   *   The sinus value.\n   *\n   * @note:\n   *   If you need both the sinus and cosinus for a given angle, use the\n   *   function @FT_Vector_Unit.\n   *\n   */\n  FT_EXPORT( FT_Fixed )\n  FT_Sin( FT_Angle  angle );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Cos\n   *\n   * @description:\n   *   Return the cosinus of a given angle in fixed-point format.\n   *\n   * @input:\n   *   angle ::\n   *     The input angle.\n   *\n   * @return:\n   *   The cosinus value.\n   *\n   * @note:\n   *   If you need both the sinus and cosinus for a given angle, use the\n   *   function @FT_Vector_Unit.\n   *\n   */\n  FT_EXPORT( FT_Fixed )\n  FT_Cos( FT_Angle  angle );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Tan\n   *\n   * @description:\n   *   Return the tangent of a given angle in fixed-point format.\n   *\n   * @input:\n   *   angle ::\n   *     The input angle.\n   *\n   * @return:\n   *   The tangent value.\n   *\n   */\n  FT_EXPORT( FT_Fixed )\n  FT_Tan( FT_Angle  angle );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Atan2\n   *\n   * @description:\n   *   Return the arc-tangent corresponding to a given vector (x,y) in the 2d\n   *   plane.\n   *\n   * @input:\n   *   x ::\n   *     The horizontal vector coordinate.\n   *\n   *   y ::\n   *     The vertical vector coordinate.\n   *\n   * @return:\n   *   The arc-tangent value (i.e. angle).\n   *\n   */\n  FT_EXPORT( FT_Angle )\n  FT_Atan2( FT_Fixed  x,\n            FT_Fixed  y );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Angle_Diff\n   *\n   * @description:\n   *   Return the difference between two angles.  The result is always\n   *   constrained to the ]-PI..PI] interval.\n   *\n   * @input:\n   *   angle1 ::\n   *     First angle.\n   *\n   *   angle2 ::\n   *     Second angle.\n   *\n   * @return:\n   *   Constrained value of `angle2-angle1`.\n   *\n   */\n  FT_EXPORT( FT_Angle )\n  FT_Angle_Diff( FT_Angle  angle1,\n                 FT_Angle  angle2 );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Vector_Unit\n   *\n   * @description:\n   *   Return the unit vector corresponding to a given angle.  After the\n   *   call, the value of `vec.x` will be `cos(angle)`, and the value of\n   *   `vec.y` will be `sin(angle)`.\n   *\n   *   This function is useful to retrieve both the sinus and cosinus of a\n   *   given angle quickly.\n   *\n   * @output:\n   *   vec ::\n   *     The address of target vector.\n   *\n   * @input:\n   *   angle ::\n   *     The input angle.\n   *\n   */\n  FT_EXPORT( void )\n  FT_Vector_Unit( FT_Vector*  vec,\n                  FT_Angle    angle );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Vector_Rotate\n   *\n   * @description:\n   *   Rotate a vector by a given angle.\n   *\n   * @inout:\n   *   vec ::\n   *     The address of target vector.\n   *\n   * @input:\n   *   angle ::\n   *     The input angle.\n   *\n   */\n  FT_EXPORT( void )\n  FT_Vector_Rotate( FT_Vector*  vec,\n                    FT_Angle    angle );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Vector_Length\n   *\n   * @description:\n   *   Return the length of a given vector.\n   *\n   * @input:\n   *   vec ::\n   *     The address of target vector.\n   *\n   * @return:\n   *   The vector length, expressed in the same units that the original\n   *   vector coordinates.\n   *\n   */\n  FT_EXPORT( FT_Fixed )\n  FT_Vector_Length( FT_Vector*  vec );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Vector_Polarize\n   *\n   * @description:\n   *   Compute both the length and angle of a given vector.\n   *\n   * @input:\n   *   vec ::\n   *     The address of source vector.\n   *\n   * @output:\n   *   length ::\n   *     The vector length.\n   *\n   *   angle ::\n   *     The vector angle.\n   *\n   */\n  FT_EXPORT( void )\n  FT_Vector_Polarize( FT_Vector*  vec,\n                      FT_Fixed   *length,\n                      FT_Angle   *angle );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Vector_From_Polar\n   *\n   * @description:\n   *   Compute vector coordinates from a length and angle.\n   *\n   * @output:\n   *   vec ::\n   *     The address of source vector.\n   *\n   * @input:\n   *   length ::\n   *     The vector length.\n   *\n   *   angle ::\n   *     The vector angle.\n   *\n   */\n  FT_EXPORT( void )\n  FT_Vector_From_Polar( FT_Vector*  vec,\n                        FT_Fixed    length,\n                        FT_Angle    angle );\n\n  /* */\n\n\nFT_END_HEADER\n\n#endif /* FTTRIGON_H_ */\n\n\n/* END */\n"
  },
  {
    "path": "thirdparty/freetype/include/freetype2/freetype/fttypes.h",
    "content": "/****************************************************************************\n *\n * fttypes.h\n *\n *   FreeType simple types definitions (specification only).\n *\n * Copyright (C) 1996-2021 by\n * David Turner, Robert Wilhelm, and Werner Lemberg.\n *\n * This file is part of the FreeType project, and may only be used,\n * modified, and distributed under the terms of the FreeType project\n * license, LICENSE.TXT.  By continuing to use, modify, or distribute\n * this file you indicate that you have read the license and\n * understand and accept it fully.\n *\n */\n\n\n#ifndef FTTYPES_H_\n#define FTTYPES_H_\n\n\n#include <ft2build.h>\n#include FT_CONFIG_CONFIG_H\n#include <freetype/ftsystem.h>\n#include <freetype/ftimage.h>\n\n#include <stddef.h>\n\n\nFT_BEGIN_HEADER\n\n\n  /**************************************************************************\n   *\n   * @section:\n   *   basic_types\n   *\n   * @title:\n   *   Basic Data Types\n   *\n   * @abstract:\n   *   The basic data types defined by the library.\n   *\n   * @description:\n   *   This section contains the basic data types defined by FreeType~2,\n   *   ranging from simple scalar types to bitmap descriptors.  More\n   *   font-specific structures are defined in a different section.\n   *\n   * @order:\n   *   FT_Byte\n   *   FT_Bytes\n   *   FT_Char\n   *   FT_Int\n   *   FT_UInt\n   *   FT_Int16\n   *   FT_UInt16\n   *   FT_Int32\n   *   FT_UInt32\n   *   FT_Int64\n   *   FT_UInt64\n   *   FT_Short\n   *   FT_UShort\n   *   FT_Long\n   *   FT_ULong\n   *   FT_Bool\n   *   FT_Offset\n   *   FT_PtrDist\n   *   FT_String\n   *   FT_Tag\n   *   FT_Error\n   *   FT_Fixed\n   *   FT_Pointer\n   *   FT_Pos\n   *   FT_Vector\n   *   FT_BBox\n   *   FT_Matrix\n   *   FT_FWord\n   *   FT_UFWord\n   *   FT_F2Dot14\n   *   FT_UnitVector\n   *   FT_F26Dot6\n   *   FT_Data\n   *\n   *   FT_MAKE_TAG\n   *\n   *   FT_Generic\n   *   FT_Generic_Finalizer\n   *\n   *   FT_Bitmap\n   *   FT_Pixel_Mode\n   *   FT_Palette_Mode\n   *   FT_Glyph_Format\n   *   FT_IMAGE_TAG\n   *\n   */\n\n\n  /**************************************************************************\n   *\n   * @type:\n   *   FT_Bool\n   *\n   * @description:\n   *   A typedef of unsigned char, used for simple booleans.  As usual,\n   *   values 1 and~0 represent true and false, respectively.\n   */\n  typedef unsigned char  FT_Bool;\n\n\n  /**************************************************************************\n   *\n   * @type:\n   *   FT_FWord\n   *\n   * @description:\n   *   A signed 16-bit integer used to store a distance in original font\n   *   units.\n   */\n  typedef signed short  FT_FWord;   /* distance in FUnits */\n\n\n  /**************************************************************************\n   *\n   * @type:\n   *   FT_UFWord\n   *\n   * @description:\n   *   An unsigned 16-bit integer used to store a distance in original font\n   *   units.\n   */\n  typedef unsigned short  FT_UFWord;  /* unsigned distance */\n\n\n  /**************************************************************************\n   *\n   * @type:\n   *   FT_Char\n   *\n   * @description:\n   *   A simple typedef for the _signed_ char type.\n   */\n  typedef signed char  FT_Char;\n\n\n  /**************************************************************************\n   *\n   * @type:\n   *   FT_Byte\n   *\n   * @description:\n   *   A simple typedef for the _unsigned_ char type.\n   */\n  typedef unsigned char  FT_Byte;\n\n\n  /**************************************************************************\n   *\n   * @type:\n   *   FT_Bytes\n   *\n   * @description:\n   *   A typedef for constant memory areas.\n   */\n  typedef const FT_Byte*  FT_Bytes;\n\n\n  /**************************************************************************\n   *\n   * @type:\n   *   FT_Tag\n   *\n   * @description:\n   *   A typedef for 32-bit tags (as used in the SFNT format).\n   */\n  typedef FT_UInt32  FT_Tag;\n\n\n  /**************************************************************************\n   *\n   * @type:\n   *   FT_String\n   *\n   * @description:\n   *   A simple typedef for the char type, usually used for strings.\n   */\n  typedef char  FT_String;\n\n\n  /**************************************************************************\n   *\n   * @type:\n   *   FT_Short\n   *\n   * @description:\n   *   A typedef for signed short.\n   */\n  typedef signed short  FT_Short;\n\n\n  /**************************************************************************\n   *\n   * @type:\n   *   FT_UShort\n   *\n   * @description:\n   *   A typedef for unsigned short.\n   */\n  typedef unsigned short  FT_UShort;\n\n\n  /**************************************************************************\n   *\n   * @type:\n   *   FT_Int\n   *\n   * @description:\n   *   A typedef for the int type.\n   */\n  typedef signed int  FT_Int;\n\n\n  /**************************************************************************\n   *\n   * @type:\n   *   FT_UInt\n   *\n   * @description:\n   *   A typedef for the unsigned int type.\n   */\n  typedef unsigned int  FT_UInt;\n\n\n  /**************************************************************************\n   *\n   * @type:\n   *   FT_Long\n   *\n   * @description:\n   *   A typedef for signed long.\n   */\n  typedef signed long  FT_Long;\n\n\n  /**************************************************************************\n   *\n   * @type:\n   *   FT_ULong\n   *\n   * @description:\n   *   A typedef for unsigned long.\n   */\n  typedef unsigned long  FT_ULong;\n\n\n  /**************************************************************************\n   *\n   * @type:\n   *   FT_F2Dot14\n   *\n   * @description:\n   *   A signed 2.14 fixed-point type used for unit vectors.\n   */\n  typedef signed short  FT_F2Dot14;\n\n\n  /**************************************************************************\n   *\n   * @type:\n   *   FT_F26Dot6\n   *\n   * @description:\n   *   A signed 26.6 fixed-point type used for vectorial pixel coordinates.\n   */\n  typedef signed long  FT_F26Dot6;\n\n\n  /**************************************************************************\n   *\n   * @type:\n   *   FT_Fixed\n   *\n   * @description:\n   *   This type is used to store 16.16 fixed-point values, like scaling\n   *   values or matrix coefficients.\n   */\n  typedef signed long  FT_Fixed;\n\n\n  /**************************************************************************\n   *\n   * @type:\n   *   FT_Error\n   *\n   * @description:\n   *   The FreeType error code type.  A value of~0 is always interpreted as a\n   *   successful operation.\n   */\n  typedef int  FT_Error;\n\n\n  /**************************************************************************\n   *\n   * @type:\n   *   FT_Pointer\n   *\n   * @description:\n   *   A simple typedef for a typeless pointer.\n   */\n  typedef void*  FT_Pointer;\n\n\n  /**************************************************************************\n   *\n   * @type:\n   *   FT_Offset\n   *\n   * @description:\n   *   This is equivalent to the ANSI~C `size_t` type, i.e., the largest\n   *   _unsigned_ integer type used to express a file size or position, or a\n   *   memory block size.\n   */\n  typedef size_t  FT_Offset;\n\n\n  /**************************************************************************\n   *\n   * @type:\n   *   FT_PtrDist\n   *\n   * @description:\n   *   This is equivalent to the ANSI~C `ptrdiff_t` type, i.e., the largest\n   *   _signed_ integer type used to express the distance between two\n   *   pointers.\n   */\n  typedef ft_ptrdiff_t  FT_PtrDist;\n\n\n  /**************************************************************************\n   *\n   * @struct:\n   *   FT_UnitVector\n   *\n   * @description:\n   *   A simple structure used to store a 2D vector unit vector.  Uses\n   *   FT_F2Dot14 types.\n   *\n   * @fields:\n   *   x ::\n   *     Horizontal coordinate.\n   *\n   *   y ::\n   *     Vertical coordinate.\n   */\n  typedef struct  FT_UnitVector_\n  {\n    FT_F2Dot14  x;\n    FT_F2Dot14  y;\n\n  } FT_UnitVector;\n\n\n  /**************************************************************************\n   *\n   * @struct:\n   *   FT_Matrix\n   *\n   * @description:\n   *   A simple structure used to store a 2x2 matrix.  Coefficients are in\n   *   16.16 fixed-point format.  The computation performed is:\n   *\n   *   ```\n   *     x' = x*xx + y*xy\n   *     y' = x*yx + y*yy\n   *   ```\n   *\n   * @fields:\n   *   xx ::\n   *     Matrix coefficient.\n   *\n   *   xy ::\n   *     Matrix coefficient.\n   *\n   *   yx ::\n   *     Matrix coefficient.\n   *\n   *   yy ::\n   *     Matrix coefficient.\n   */\n  typedef struct  FT_Matrix_\n  {\n    FT_Fixed  xx, xy;\n    FT_Fixed  yx, yy;\n\n  } FT_Matrix;\n\n\n  /**************************************************************************\n   *\n   * @struct:\n   *   FT_Data\n   *\n   * @description:\n   *   Read-only binary data represented as a pointer and a length.\n   *\n   * @fields:\n   *   pointer ::\n   *     The data.\n   *\n   *   length ::\n   *     The length of the data in bytes.\n   */\n  typedef struct  FT_Data_\n  {\n    const FT_Byte*  pointer;\n    FT_Int          length;\n\n  } FT_Data;\n\n\n  /**************************************************************************\n   *\n   * @functype:\n   *   FT_Generic_Finalizer\n   *\n   * @description:\n   *   Describe a function used to destroy the 'client' data of any FreeType\n   *   object.  See the description of the @FT_Generic type for details of\n   *   usage.\n   *\n   * @input:\n   *   The address of the FreeType object that is under finalization.  Its\n   *   client data is accessed through its `generic` field.\n   */\n  typedef void  (*FT_Generic_Finalizer)( void*  object );\n\n\n  /**************************************************************************\n   *\n   * @struct:\n   *   FT_Generic\n   *\n   * @description:\n   *   Client applications often need to associate their own data to a\n   *   variety of FreeType core objects.  For example, a text layout API\n   *   might want to associate a glyph cache to a given size object.\n   *\n   *   Some FreeType object contains a `generic` field, of type `FT_Generic`,\n   *   which usage is left to client applications and font servers.\n   *\n   *   It can be used to store a pointer to client-specific data, as well as\n   *   the address of a 'finalizer' function, which will be called by\n   *   FreeType when the object is destroyed (for example, the previous\n   *   client example would put the address of the glyph cache destructor in\n   *   the `finalizer` field).\n   *\n   * @fields:\n   *   data ::\n   *     A typeless pointer to any client-specified data. This field is\n   *     completely ignored by the FreeType library.\n   *\n   *   finalizer ::\n   *     A pointer to a 'generic finalizer' function, which will be called\n   *     when the object is destroyed.  If this field is set to `NULL`, no\n   *     code will be called.\n   */\n  typedef struct  FT_Generic_\n  {\n    void*                 data;\n    FT_Generic_Finalizer  finalizer;\n\n  } FT_Generic;\n\n\n  /**************************************************************************\n   *\n   * @macro:\n   *   FT_MAKE_TAG\n   *\n   * @description:\n   *   This macro converts four-letter tags that are used to label TrueType\n   *   tables into an unsigned long, to be used within FreeType.\n   *\n   * @note:\n   *   The produced values **must** be 32-bit integers.  Don't redefine this\n   *   macro.\n   */\n#define FT_MAKE_TAG( _x1, _x2, _x3, _x4 ) \\\n          (FT_Tag)                        \\\n          ( ( (FT_ULong)_x1 << 24 ) |     \\\n            ( (FT_ULong)_x2 << 16 ) |     \\\n            ( (FT_ULong)_x3 <<  8 ) |     \\\n              (FT_ULong)_x4         )\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*                                                                       */\n  /*                    L I S T   M A N A G E M E N T                      */\n  /*                                                                       */\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n  /**************************************************************************\n   *\n   * @section:\n   *   list_processing\n   *\n   */\n\n\n  /**************************************************************************\n   *\n   * @type:\n   *   FT_ListNode\n   *\n   * @description:\n   *    Many elements and objects in FreeType are listed through an @FT_List\n   *    record (see @FT_ListRec).  As its name suggests, an FT_ListNode is a\n   *    handle to a single list element.\n   */\n  typedef struct FT_ListNodeRec_*  FT_ListNode;\n\n\n  /**************************************************************************\n   *\n   * @type:\n   *   FT_List\n   *\n   * @description:\n   *   A handle to a list record (see @FT_ListRec).\n   */\n  typedef struct FT_ListRec_*  FT_List;\n\n\n  /**************************************************************************\n   *\n   * @struct:\n   *   FT_ListNodeRec\n   *\n   * @description:\n   *   A structure used to hold a single list element.\n   *\n   * @fields:\n   *   prev ::\n   *     The previous element in the list.  `NULL` if first.\n   *\n   *   next ::\n   *     The next element in the list.  `NULL` if last.\n   *\n   *   data ::\n   *     A typeless pointer to the listed object.\n   */\n  typedef struct  FT_ListNodeRec_\n  {\n    FT_ListNode  prev;\n    FT_ListNode  next;\n    void*        data;\n\n  } FT_ListNodeRec;\n\n\n  /**************************************************************************\n   *\n   * @struct:\n   *   FT_ListRec\n   *\n   * @description:\n   *   A structure used to hold a simple doubly-linked list.  These are used\n   *   in many parts of FreeType.\n   *\n   * @fields:\n   *   head ::\n   *     The head (first element) of doubly-linked list.\n   *\n   *   tail ::\n   *     The tail (last element) of doubly-linked list.\n   */\n  typedef struct  FT_ListRec_\n  {\n    FT_ListNode  head;\n    FT_ListNode  tail;\n\n  } FT_ListRec;\n\n  /* */\n\n\n#define FT_IS_EMPTY( list )  ( (list).head == 0 )\n#define FT_BOOL( x )  ( (FT_Bool)( (x) != 0 ) )\n\n  /* concatenate C tokens */\n#define FT_ERR_XCAT( x, y )  x ## y\n#define FT_ERR_CAT( x, y )   FT_ERR_XCAT( x, y )\n\n  /* see `ftmoderr.h` for descriptions of the following macros */\n\n#define FT_ERR( e )  FT_ERR_CAT( FT_ERR_PREFIX, e )\n\n#define FT_ERROR_BASE( x )    ( (x) & 0xFF )\n#define FT_ERROR_MODULE( x )  ( (x) & 0xFF00U )\n\n#define FT_ERR_EQ( x, e )                                        \\\n          ( FT_ERROR_BASE( x ) == FT_ERROR_BASE( FT_ERR( e ) ) )\n#define FT_ERR_NEQ( x, e )                                       \\\n          ( FT_ERROR_BASE( x ) != FT_ERROR_BASE( FT_ERR( e ) ) )\n\n\nFT_END_HEADER\n\n#endif /* FTTYPES_H_ */\n\n\n/* END */\n"
  },
  {
    "path": "thirdparty/freetype/include/freetype2/freetype/ftwinfnt.h",
    "content": "/****************************************************************************\n *\n * ftwinfnt.h\n *\n *   FreeType API for accessing Windows fnt-specific data.\n *\n * Copyright (C) 2003-2021 by\n * David Turner, Robert Wilhelm, and Werner Lemberg.\n *\n * This file is part of the FreeType project, and may only be used,\n * modified, and distributed under the terms of the FreeType project\n * license, LICENSE.TXT.  By continuing to use, modify, or distribute\n * this file you indicate that you have read the license and\n * understand and accept it fully.\n *\n */\n\n\n#ifndef FTWINFNT_H_\n#define FTWINFNT_H_\n\n#include <freetype/freetype.h>\n\n#ifdef FREETYPE_H\n#error \"freetype.h of FreeType 1 has been loaded!\"\n#error \"Please fix the directory search order for header files\"\n#error \"so that freetype.h of FreeType 2 is found first.\"\n#endif\n\n\nFT_BEGIN_HEADER\n\n\n  /**************************************************************************\n   *\n   * @section:\n   *   winfnt_fonts\n   *\n   * @title:\n   *   Window FNT Files\n   *\n   * @abstract:\n   *   Windows FNT-specific API.\n   *\n   * @description:\n   *   This section contains the declaration of Windows FNT-specific\n   *   functions.\n   *\n   */\n\n\n  /**************************************************************************\n   *\n   * @enum:\n   *   FT_WinFNT_ID_XXX\n   *\n   * @description:\n   *   A list of valid values for the `charset` byte in @FT_WinFNT_HeaderRec. \n   *   Exact mapping tables for the various 'cpXXXX' encodings (except for\n   *   'cp1361') can be found at 'ftp://ftp.unicode.org/Public/' in the\n   *   `MAPPINGS/VENDORS/MICSFT/WINDOWS` subdirectory.  'cp1361' is roughly a\n   *   superset of `MAPPINGS/OBSOLETE/EASTASIA/KSC/JOHAB.TXT`.\n   *\n   * @values:\n   *   FT_WinFNT_ID_DEFAULT ::\n   *     This is used for font enumeration and font creation as a 'don't\n   *     care' value.  Valid font files don't contain this value.  When\n   *     querying for information about the character set of the font that is\n   *     currently selected into a specified device context, this return\n   *     value (of the related Windows API) simply denotes failure.\n   *\n   *   FT_WinFNT_ID_SYMBOL ::\n   *     There is no known mapping table available.\n   *\n   *   FT_WinFNT_ID_MAC ::\n   *     Mac Roman encoding.\n   *\n   *   FT_WinFNT_ID_OEM ::\n   *     From Michael Poettgen <michael@poettgen.de>:\n   *\n   *     The 'Windows Font Mapping' article says that `FT_WinFNT_ID_OEM` is\n   *     used for the charset of vector fonts, like `modern.fon`,\n   *     `roman.fon`, and `script.fon` on Windows.\n   *\n   *     The 'CreateFont' documentation says: The `FT_WinFNT_ID_OEM` value\n   *     specifies a character set that is operating-system dependent.\n   *\n   *     The 'IFIMETRICS' documentation from the 'Windows Driver Development\n   *     Kit' says: This font supports an OEM-specific character set.  The\n   *     OEM character set is system dependent.\n   *\n   *     In general OEM, as opposed to ANSI (i.e., 'cp1252'), denotes the\n   *     second default codepage that most international versions of Windows\n   *     have.  It is one of the OEM codepages from\n   *\n   *     https://docs.microsoft.com/en-us/windows/desktop/intl/code-page-identifiers\n   *     ,\n   *\n   *     and is used for the 'DOS boxes', to support legacy applications.  A\n   *     German Windows version for example usually uses ANSI codepage 1252\n   *     and OEM codepage 850.\n   *\n   *   FT_WinFNT_ID_CP874 ::\n   *     A superset of Thai TIS 620 and ISO 8859-11.\n   *\n   *   FT_WinFNT_ID_CP932 ::\n   *     A superset of Japanese Shift-JIS (with minor deviations).\n   *\n   *   FT_WinFNT_ID_CP936 ::\n   *     A superset of simplified Chinese GB 2312-1980 (with different\n   *     ordering and minor deviations).\n   *\n   *   FT_WinFNT_ID_CP949 ::\n   *     A superset of Korean Hangul KS~C 5601-1987 (with different ordering\n   *     and minor deviations).\n   *\n   *   FT_WinFNT_ID_CP950 ::\n   *     A superset of traditional Chinese Big~5 ETen (with different\n   *     ordering and minor deviations).\n   *\n   *   FT_WinFNT_ID_CP1250 ::\n   *     A superset of East European ISO 8859-2 (with slightly different\n   *     ordering).\n   *\n   *   FT_WinFNT_ID_CP1251 ::\n   *     A superset of Russian ISO 8859-5 (with different ordering).\n   *\n   *   FT_WinFNT_ID_CP1252 ::\n   *     ANSI encoding.  A superset of ISO 8859-1.\n   *\n   *   FT_WinFNT_ID_CP1253 ::\n   *     A superset of Greek ISO 8859-7 (with minor modifications).\n   *\n   *   FT_WinFNT_ID_CP1254 ::\n   *     A superset of Turkish ISO 8859-9.\n   *\n   *   FT_WinFNT_ID_CP1255 ::\n   *     A superset of Hebrew ISO 8859-8 (with some modifications).\n   *\n   *   FT_WinFNT_ID_CP1256 ::\n   *     A superset of Arabic ISO 8859-6 (with different ordering).\n   *\n   *   FT_WinFNT_ID_CP1257 ::\n   *     A superset of Baltic ISO 8859-13 (with some deviations).\n   *\n   *   FT_WinFNT_ID_CP1258 ::\n   *     For Vietnamese.  This encoding doesn't cover all necessary\n   *     characters.\n   *\n   *   FT_WinFNT_ID_CP1361 ::\n   *     Korean (Johab).\n   */\n\n#define FT_WinFNT_ID_CP1252    0\n#define FT_WinFNT_ID_DEFAULT   1\n#define FT_WinFNT_ID_SYMBOL    2\n#define FT_WinFNT_ID_MAC      77\n#define FT_WinFNT_ID_CP932   128\n#define FT_WinFNT_ID_CP949   129\n#define FT_WinFNT_ID_CP1361  130\n#define FT_WinFNT_ID_CP936   134\n#define FT_WinFNT_ID_CP950   136\n#define FT_WinFNT_ID_CP1253  161\n#define FT_WinFNT_ID_CP1254  162\n#define FT_WinFNT_ID_CP1258  163\n#define FT_WinFNT_ID_CP1255  177\n#define FT_WinFNT_ID_CP1256  178\n#define FT_WinFNT_ID_CP1257  186\n#define FT_WinFNT_ID_CP1251  204\n#define FT_WinFNT_ID_CP874   222\n#define FT_WinFNT_ID_CP1250  238\n#define FT_WinFNT_ID_OEM     255\n\n\n  /**************************************************************************\n   *\n   * @struct:\n   *   FT_WinFNT_HeaderRec\n   *\n   * @description:\n   *   Windows FNT Header info.\n   */\n  typedef struct  FT_WinFNT_HeaderRec_\n  {\n    FT_UShort  version;\n    FT_ULong   file_size;\n    FT_Byte    copyright[60];\n    FT_UShort  file_type;\n    FT_UShort  nominal_point_size;\n    FT_UShort  vertical_resolution;\n    FT_UShort  horizontal_resolution;\n    FT_UShort  ascent;\n    FT_UShort  internal_leading;\n    FT_UShort  external_leading;\n    FT_Byte    italic;\n    FT_Byte    underline;\n    FT_Byte    strike_out;\n    FT_UShort  weight;\n    FT_Byte    charset;\n    FT_UShort  pixel_width;\n    FT_UShort  pixel_height;\n    FT_Byte    pitch_and_family;\n    FT_UShort  avg_width;\n    FT_UShort  max_width;\n    FT_Byte    first_char;\n    FT_Byte    last_char;\n    FT_Byte    default_char;\n    FT_Byte    break_char;\n    FT_UShort  bytes_per_row;\n    FT_ULong   device_offset;\n    FT_ULong   face_name_offset;\n    FT_ULong   bits_pointer;\n    FT_ULong   bits_offset;\n    FT_Byte    reserved;\n    FT_ULong   flags;\n    FT_UShort  A_space;\n    FT_UShort  B_space;\n    FT_UShort  C_space;\n    FT_UShort  color_table_offset;\n    FT_ULong   reserved1[4];\n\n  } FT_WinFNT_HeaderRec;\n\n\n  /**************************************************************************\n   *\n   * @struct:\n   *   FT_WinFNT_Header\n   *\n   * @description:\n   *   A handle to an @FT_WinFNT_HeaderRec structure.\n   */\n  typedef struct FT_WinFNT_HeaderRec_*  FT_WinFNT_Header;\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *    FT_Get_WinFNT_Header\n   *\n   * @description:\n   *    Retrieve a Windows FNT font info header.\n   *\n   * @input:\n   *    face ::\n   *      A handle to the input face.\n   *\n   * @output:\n   *    aheader ::\n   *      The WinFNT header.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *   This function only works with Windows FNT faces, returning an error\n   *   otherwise.\n   */\n  FT_EXPORT( FT_Error )\n  FT_Get_WinFNT_Header( FT_Face               face,\n                        FT_WinFNT_HeaderRec  *aheader );\n\n  /* */\n\n\nFT_END_HEADER\n\n#endif /* FTWINFNT_H_ */\n\n\n/* END */\n\n\n/* Local Variables: */\n/* coding: utf-8    */\n/* End:             */\n"
  },
  {
    "path": "thirdparty/freetype/include/freetype2/freetype/t1tables.h",
    "content": "/****************************************************************************\n *\n * t1tables.h\n *\n *   Basic Type 1/Type 2 tables definitions and interface (specification\n *   only).\n *\n * Copyright (C) 1996-2021 by\n * David Turner, Robert Wilhelm, and Werner Lemberg.\n *\n * This file is part of the FreeType project, and may only be used,\n * modified, and distributed under the terms of the FreeType project\n * license, LICENSE.TXT.  By continuing to use, modify, or distribute\n * this file you indicate that you have read the license and\n * understand and accept it fully.\n *\n */\n\n\n#ifndef T1TABLES_H_\n#define T1TABLES_H_\n\n\n#include <freetype/freetype.h>\n\n#ifdef FREETYPE_H\n#error \"freetype.h of FreeType 1 has been loaded!\"\n#error \"Please fix the directory search order for header files\"\n#error \"so that freetype.h of FreeType 2 is found first.\"\n#endif\n\n\nFT_BEGIN_HEADER\n\n\n  /**************************************************************************\n   *\n   * @section:\n   *   type1_tables\n   *\n   * @title:\n   *   Type 1 Tables\n   *\n   * @abstract:\n   *   Type~1-specific font tables.\n   *\n   * @description:\n   *   This section contains the definition of Type~1-specific tables,\n   *   including structures related to other PostScript font formats.\n   *\n   * @order:\n   *   PS_FontInfoRec\n   *   PS_FontInfo\n   *   PS_PrivateRec\n   *   PS_Private\n   *\n   *   CID_FaceDictRec\n   *   CID_FaceDict\n   *   CID_FaceInfoRec\n   *   CID_FaceInfo\n   *\n   *   FT_Has_PS_Glyph_Names\n   *   FT_Get_PS_Font_Info\n   *   FT_Get_PS_Font_Private\n   *   FT_Get_PS_Font_Value\n   *\n   *   T1_Blend_Flags\n   *   T1_EncodingType\n   *   PS_Dict_Keys\n   *\n   */\n\n\n  /* Note that we separate font data in PS_FontInfoRec and PS_PrivateRec */\n  /* structures in order to support Multiple Master fonts.               */\n\n\n  /**************************************************************************\n   *\n   * @struct:\n   *   PS_FontInfoRec\n   *\n   * @description:\n   *   A structure used to model a Type~1 or Type~2 FontInfo dictionary.\n   *   Note that for Multiple Master fonts, each instance has its own\n   *   FontInfo dictionary.\n   */\n  typedef struct  PS_FontInfoRec_\n  {\n    FT_String*  version;\n    FT_String*  notice;\n    FT_String*  full_name;\n    FT_String*  family_name;\n    FT_String*  weight;\n    FT_Long     italic_angle;\n    FT_Bool     is_fixed_pitch;\n    FT_Short    underline_position;\n    FT_UShort   underline_thickness;\n\n  } PS_FontInfoRec;\n\n\n  /**************************************************************************\n   *\n   * @struct:\n   *   PS_FontInfo\n   *\n   * @description:\n   *   A handle to a @PS_FontInfoRec structure.\n   */\n  typedef struct PS_FontInfoRec_*  PS_FontInfo;\n\n\n  /**************************************************************************\n   *\n   * @struct:\n   *   T1_FontInfo\n   *\n   * @description:\n   *   This type is equivalent to @PS_FontInfoRec.  It is deprecated but kept\n   *   to maintain source compatibility between various versions of FreeType.\n   */\n  typedef PS_FontInfoRec  T1_FontInfo;\n\n\n  /**************************************************************************\n   *\n   * @struct:\n   *   PS_PrivateRec\n   *\n   * @description:\n   *   A structure used to model a Type~1 or Type~2 private dictionary.  Note\n   *   that for Multiple Master fonts, each instance has its own Private\n   *   dictionary.\n   */\n  typedef struct  PS_PrivateRec_\n  {\n    FT_Int     unique_id;\n    FT_Int     lenIV;\n\n    FT_Byte    num_blue_values;\n    FT_Byte    num_other_blues;\n    FT_Byte    num_family_blues;\n    FT_Byte    num_family_other_blues;\n\n    FT_Short   blue_values[14];\n    FT_Short   other_blues[10];\n\n    FT_Short   family_blues      [14];\n    FT_Short   family_other_blues[10];\n\n    FT_Fixed   blue_scale;\n    FT_Int     blue_shift;\n    FT_Int     blue_fuzz;\n\n    FT_UShort  standard_width[1];\n    FT_UShort  standard_height[1];\n\n    FT_Byte    num_snap_widths;\n    FT_Byte    num_snap_heights;\n    FT_Bool    force_bold;\n    FT_Bool    round_stem_up;\n\n    FT_Short   snap_widths [13];  /* including std width  */\n    FT_Short   snap_heights[13];  /* including std height */\n\n    FT_Fixed   expansion_factor;\n\n    FT_Long    language_group;\n    FT_Long    password;\n\n    FT_Short   min_feature[2];\n\n  } PS_PrivateRec;\n\n\n  /**************************************************************************\n   *\n   * @struct:\n   *   PS_Private\n   *\n   * @description:\n   *   A handle to a @PS_PrivateRec structure.\n   */\n  typedef struct PS_PrivateRec_*  PS_Private;\n\n\n  /**************************************************************************\n   *\n   * @struct:\n   *   T1_Private\n   *\n   * @description:\n   *  This type is equivalent to @PS_PrivateRec.  It is deprecated but kept\n   *  to maintain source compatibility between various versions of FreeType.\n   */\n  typedef PS_PrivateRec  T1_Private;\n\n\n  /**************************************************************************\n   *\n   * @enum:\n   *   T1_Blend_Flags\n   *\n   * @description:\n   *   A set of flags used to indicate which fields are present in a given\n   *   blend dictionary (font info or private).  Used to support Multiple\n   *   Masters fonts.\n   *\n   * @values:\n   *   T1_BLEND_UNDERLINE_POSITION ::\n   *   T1_BLEND_UNDERLINE_THICKNESS ::\n   *   T1_BLEND_ITALIC_ANGLE ::\n   *   T1_BLEND_BLUE_VALUES ::\n   *   T1_BLEND_OTHER_BLUES ::\n   *   T1_BLEND_STANDARD_WIDTH ::\n   *   T1_BLEND_STANDARD_HEIGHT ::\n   *   T1_BLEND_STEM_SNAP_WIDTHS ::\n   *   T1_BLEND_STEM_SNAP_HEIGHTS ::\n   *   T1_BLEND_BLUE_SCALE ::\n   *   T1_BLEND_BLUE_SHIFT ::\n   *   T1_BLEND_FAMILY_BLUES ::\n   *   T1_BLEND_FAMILY_OTHER_BLUES ::\n   *   T1_BLEND_FORCE_BOLD ::\n   */\n  typedef enum  T1_Blend_Flags_\n  {\n    /* required fields in a FontInfo blend dictionary */\n    T1_BLEND_UNDERLINE_POSITION = 0,\n    T1_BLEND_UNDERLINE_THICKNESS,\n    T1_BLEND_ITALIC_ANGLE,\n\n    /* required fields in a Private blend dictionary */\n    T1_BLEND_BLUE_VALUES,\n    T1_BLEND_OTHER_BLUES,\n    T1_BLEND_STANDARD_WIDTH,\n    T1_BLEND_STANDARD_HEIGHT,\n    T1_BLEND_STEM_SNAP_WIDTHS,\n    T1_BLEND_STEM_SNAP_HEIGHTS,\n    T1_BLEND_BLUE_SCALE,\n    T1_BLEND_BLUE_SHIFT,\n    T1_BLEND_FAMILY_BLUES,\n    T1_BLEND_FAMILY_OTHER_BLUES,\n    T1_BLEND_FORCE_BOLD,\n\n    T1_BLEND_MAX    /* do not remove */\n\n  } T1_Blend_Flags;\n\n\n  /* these constants are deprecated; use the corresponding */\n  /* `T1_Blend_Flags` values instead                       */\n#define t1_blend_underline_position   T1_BLEND_UNDERLINE_POSITION\n#define t1_blend_underline_thickness  T1_BLEND_UNDERLINE_THICKNESS\n#define t1_blend_italic_angle         T1_BLEND_ITALIC_ANGLE\n#define t1_blend_blue_values          T1_BLEND_BLUE_VALUES\n#define t1_blend_other_blues          T1_BLEND_OTHER_BLUES\n#define t1_blend_standard_widths      T1_BLEND_STANDARD_WIDTH\n#define t1_blend_standard_height      T1_BLEND_STANDARD_HEIGHT\n#define t1_blend_stem_snap_widths     T1_BLEND_STEM_SNAP_WIDTHS\n#define t1_blend_stem_snap_heights    T1_BLEND_STEM_SNAP_HEIGHTS\n#define t1_blend_blue_scale           T1_BLEND_BLUE_SCALE\n#define t1_blend_blue_shift           T1_BLEND_BLUE_SHIFT\n#define t1_blend_family_blues         T1_BLEND_FAMILY_BLUES\n#define t1_blend_family_other_blues   T1_BLEND_FAMILY_OTHER_BLUES\n#define t1_blend_force_bold           T1_BLEND_FORCE_BOLD\n#define t1_blend_max                  T1_BLEND_MAX\n\n  /* */\n\n\n  /* maximum number of Multiple Masters designs, as defined in the spec */\n#define T1_MAX_MM_DESIGNS     16\n\n  /* maximum number of Multiple Masters axes, as defined in the spec */\n#define T1_MAX_MM_AXIS        4\n\n  /* maximum number of elements in a design map */\n#define T1_MAX_MM_MAP_POINTS  20\n\n\n  /* this structure is used to store the BlendDesignMap entry for an axis */\n  typedef struct  PS_DesignMap_\n  {\n    FT_Byte    num_points;\n    FT_Long*   design_points;\n    FT_Fixed*  blend_points;\n\n  } PS_DesignMapRec, *PS_DesignMap;\n\n  /* backward compatible definition */\n  typedef PS_DesignMapRec  T1_DesignMap;\n\n\n  typedef struct  PS_BlendRec_\n  {\n    FT_UInt          num_designs;\n    FT_UInt          num_axis;\n\n    FT_String*       axis_names[T1_MAX_MM_AXIS];\n    FT_Fixed*        design_pos[T1_MAX_MM_DESIGNS];\n    PS_DesignMapRec  design_map[T1_MAX_MM_AXIS];\n\n    FT_Fixed*        weight_vector;\n    FT_Fixed*        default_weight_vector;\n\n    PS_FontInfo      font_infos[T1_MAX_MM_DESIGNS + 1];\n    PS_Private       privates  [T1_MAX_MM_DESIGNS + 1];\n\n    FT_ULong         blend_bitflags;\n\n    FT_BBox*         bboxes    [T1_MAX_MM_DESIGNS + 1];\n\n    /* since 2.3.0 */\n\n    /* undocumented, optional: the default design instance;   */\n    /* corresponds to default_weight_vector --                */\n    /* num_default_design_vector == 0 means it is not present */\n    /* in the font and associated metrics files               */\n    FT_UInt          default_design_vector[T1_MAX_MM_DESIGNS];\n    FT_UInt          num_default_design_vector;\n\n  } PS_BlendRec, *PS_Blend;\n\n\n  /* backward compatible definition */\n  typedef PS_BlendRec  T1_Blend;\n\n\n  /**************************************************************************\n   *\n   * @struct:\n   *   CID_FaceDictRec\n   *\n   * @description:\n   *   A structure used to represent data in a CID top-level dictionary.  In\n   *   most cases, they are part of the font's '/FDArray' array.  Within a\n   *   CID font file, such (internal) subfont dictionaries are enclosed by\n   *   '%ADOBeginFontDict' and '%ADOEndFontDict' comments.\n   *\n   *   Note that `CID_FaceDictRec` misses a field for the '/FontName'\n   *   keyword, specifying the subfont's name (the top-level font name is\n   *   given by the '/CIDFontName' keyword).  This is an oversight, but it\n   *   doesn't limit the 'cid' font module's functionality because FreeType\n   *   neither needs this entry nor gives access to CID subfonts.\n   */\n  typedef struct  CID_FaceDictRec_\n  {\n    PS_PrivateRec  private_dict;\n\n    FT_UInt        len_buildchar;\n    FT_Fixed       forcebold_threshold;\n    FT_Pos         stroke_width;\n    FT_Fixed       expansion_factor;   /* this is a duplicate of           */\n                                       /* `private_dict->expansion_factor' */\n    FT_Byte        paint_type;\n    FT_Byte        font_type;\n    FT_Matrix      font_matrix;\n    FT_Vector      font_offset;\n\n    FT_UInt        num_subrs;\n    FT_ULong       subrmap_offset;\n    FT_Int         sd_bytes;\n\n  } CID_FaceDictRec;\n\n\n  /**************************************************************************\n   *\n   * @struct:\n   *   CID_FaceDict\n   *\n   * @description:\n   *   A handle to a @CID_FaceDictRec structure.\n   */\n  typedef struct CID_FaceDictRec_*  CID_FaceDict;\n\n\n  /**************************************************************************\n   *\n   * @struct:\n   *   CID_FontDict\n   *\n   * @description:\n   *   This type is equivalent to @CID_FaceDictRec.  It is deprecated but\n   *   kept to maintain source compatibility between various versions of\n   *   FreeType.\n   */\n  typedef CID_FaceDictRec  CID_FontDict;\n\n\n  /**************************************************************************\n   *\n   * @struct:\n   *   CID_FaceInfoRec\n   *\n   * @description:\n   *   A structure used to represent CID Face information.\n   */\n  typedef struct  CID_FaceInfoRec_\n  {\n    FT_String*      cid_font_name;\n    FT_Fixed        cid_version;\n    FT_Int          cid_font_type;\n\n    FT_String*      registry;\n    FT_String*      ordering;\n    FT_Int          supplement;\n\n    PS_FontInfoRec  font_info;\n    FT_BBox         font_bbox;\n    FT_ULong        uid_base;\n\n    FT_Int          num_xuid;\n    FT_ULong        xuid[16];\n\n    FT_ULong        cidmap_offset;\n    FT_Int          fd_bytes;\n    FT_Int          gd_bytes;\n    FT_ULong        cid_count;\n\n    FT_Int          num_dicts;\n    CID_FaceDict    font_dicts;\n\n    FT_ULong        data_offset;\n\n  } CID_FaceInfoRec;\n\n\n  /**************************************************************************\n   *\n   * @struct:\n   *   CID_FaceInfo\n   *\n   * @description:\n   *   A handle to a @CID_FaceInfoRec structure.\n   */\n  typedef struct CID_FaceInfoRec_*  CID_FaceInfo;\n\n\n  /**************************************************************************\n   *\n   * @struct:\n   *   CID_Info\n   *\n   * @description:\n   *  This type is equivalent to @CID_FaceInfoRec.  It is deprecated but kept\n   *  to maintain source compatibility between various versions of FreeType.\n   */\n  typedef CID_FaceInfoRec  CID_Info;\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *    FT_Has_PS_Glyph_Names\n   *\n   * @description:\n   *    Return true if a given face provides reliable PostScript glyph names.\n   *    This is similar to using the @FT_HAS_GLYPH_NAMES macro, except that\n   *    certain fonts (mostly TrueType) contain incorrect glyph name tables.\n   *\n   *    When this function returns true, the caller is sure that the glyph\n   *    names returned by @FT_Get_Glyph_Name are reliable.\n   *\n   * @input:\n   *    face ::\n   *      face handle\n   *\n   * @return:\n   *    Boolean.  True if glyph names are reliable.\n   *\n   */\n  FT_EXPORT( FT_Int )\n  FT_Has_PS_Glyph_Names( FT_Face  face );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *    FT_Get_PS_Font_Info\n   *\n   * @description:\n   *    Retrieve the @PS_FontInfoRec structure corresponding to a given\n   *    PostScript font.\n   *\n   * @input:\n   *    face ::\n   *      PostScript face handle.\n   *\n   * @output:\n   *    afont_info ::\n   *      Output font info structure pointer.\n   *\n   * @return:\n   *    FreeType error code.  0~means success.\n   *\n   * @note:\n   *    String pointers within the @PS_FontInfoRec structure are owned by the\n   *    face and don't need to be freed by the caller.  Missing entries in\n   *    the font's FontInfo dictionary are represented by `NULL` pointers.\n   *\n   *    If the font's format is not PostScript-based, this function will\n   *    return the `FT_Err_Invalid_Argument` error code.\n   *\n   */\n  FT_EXPORT( FT_Error )\n  FT_Get_PS_Font_Info( FT_Face      face,\n                       PS_FontInfo  afont_info );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *    FT_Get_PS_Font_Private\n   *\n   * @description:\n   *    Retrieve the @PS_PrivateRec structure corresponding to a given\n   *    PostScript font.\n   *\n   * @input:\n   *    face ::\n   *      PostScript face handle.\n   *\n   * @output:\n   *    afont_private ::\n   *      Output private dictionary structure pointer.\n   *\n   * @return:\n   *    FreeType error code.  0~means success.\n   *\n   * @note:\n   *    The string pointers within the @PS_PrivateRec structure are owned by\n   *    the face and don't need to be freed by the caller.\n   *\n   *    If the font's format is not PostScript-based, this function returns\n   *    the `FT_Err_Invalid_Argument` error code.\n   *\n   */\n  FT_EXPORT( FT_Error )\n  FT_Get_PS_Font_Private( FT_Face     face,\n                          PS_Private  afont_private );\n\n\n  /**************************************************************************\n   *\n   * @enum:\n   *   T1_EncodingType\n   *\n   * @description:\n   *   An enumeration describing the 'Encoding' entry in a Type 1 dictionary.\n   *\n   * @values:\n   *   T1_ENCODING_TYPE_NONE ::\n   *   T1_ENCODING_TYPE_ARRAY ::\n   *   T1_ENCODING_TYPE_STANDARD ::\n   *   T1_ENCODING_TYPE_ISOLATIN1 ::\n   *   T1_ENCODING_TYPE_EXPERT ::\n   *\n   * @since:\n   *   2.4.8\n   */\n  typedef enum  T1_EncodingType_\n  {\n    T1_ENCODING_TYPE_NONE = 0,\n    T1_ENCODING_TYPE_ARRAY,\n    T1_ENCODING_TYPE_STANDARD,\n    T1_ENCODING_TYPE_ISOLATIN1,\n    T1_ENCODING_TYPE_EXPERT\n\n  } T1_EncodingType;\n\n\n  /**************************************************************************\n   *\n   * @enum:\n   *   PS_Dict_Keys\n   *\n   * @description:\n   *   An enumeration used in calls to @FT_Get_PS_Font_Value to identify the\n   *   Type~1 dictionary entry to retrieve.\n   *\n   * @values:\n   *   PS_DICT_FONT_TYPE ::\n   *   PS_DICT_FONT_MATRIX ::\n   *   PS_DICT_FONT_BBOX ::\n   *   PS_DICT_PAINT_TYPE ::\n   *   PS_DICT_FONT_NAME ::\n   *   PS_DICT_UNIQUE_ID ::\n   *   PS_DICT_NUM_CHAR_STRINGS ::\n   *   PS_DICT_CHAR_STRING_KEY ::\n   *   PS_DICT_CHAR_STRING ::\n   *   PS_DICT_ENCODING_TYPE ::\n   *   PS_DICT_ENCODING_ENTRY ::\n   *   PS_DICT_NUM_SUBRS ::\n   *   PS_DICT_SUBR ::\n   *   PS_DICT_STD_HW ::\n   *   PS_DICT_STD_VW ::\n   *   PS_DICT_NUM_BLUE_VALUES ::\n   *   PS_DICT_BLUE_VALUE ::\n   *   PS_DICT_BLUE_FUZZ ::\n   *   PS_DICT_NUM_OTHER_BLUES ::\n   *   PS_DICT_OTHER_BLUE ::\n   *   PS_DICT_NUM_FAMILY_BLUES ::\n   *   PS_DICT_FAMILY_BLUE ::\n   *   PS_DICT_NUM_FAMILY_OTHER_BLUES ::\n   *   PS_DICT_FAMILY_OTHER_BLUE ::\n   *   PS_DICT_BLUE_SCALE ::\n   *   PS_DICT_BLUE_SHIFT ::\n   *   PS_DICT_NUM_STEM_SNAP_H ::\n   *   PS_DICT_STEM_SNAP_H ::\n   *   PS_DICT_NUM_STEM_SNAP_V ::\n   *   PS_DICT_STEM_SNAP_V ::\n   *   PS_DICT_FORCE_BOLD ::\n   *   PS_DICT_RND_STEM_UP ::\n   *   PS_DICT_MIN_FEATURE ::\n   *   PS_DICT_LEN_IV ::\n   *   PS_DICT_PASSWORD ::\n   *   PS_DICT_LANGUAGE_GROUP ::\n   *   PS_DICT_VERSION ::\n   *   PS_DICT_NOTICE ::\n   *   PS_DICT_FULL_NAME ::\n   *   PS_DICT_FAMILY_NAME ::\n   *   PS_DICT_WEIGHT ::\n   *   PS_DICT_IS_FIXED_PITCH ::\n   *   PS_DICT_UNDERLINE_POSITION ::\n   *   PS_DICT_UNDERLINE_THICKNESS ::\n   *   PS_DICT_FS_TYPE ::\n   *   PS_DICT_ITALIC_ANGLE ::\n   *\n   * @since:\n   *   2.4.8\n   */\n  typedef enum  PS_Dict_Keys_\n  {\n    /* conventionally in the font dictionary */\n    PS_DICT_FONT_TYPE,              /* FT_Byte         */\n    PS_DICT_FONT_MATRIX,            /* FT_Fixed        */\n    PS_DICT_FONT_BBOX,              /* FT_Fixed        */\n    PS_DICT_PAINT_TYPE,             /* FT_Byte         */\n    PS_DICT_FONT_NAME,              /* FT_String*      */\n    PS_DICT_UNIQUE_ID,              /* FT_Int          */\n    PS_DICT_NUM_CHAR_STRINGS,       /* FT_Int          */\n    PS_DICT_CHAR_STRING_KEY,        /* FT_String*      */\n    PS_DICT_CHAR_STRING,            /* FT_String*      */\n    PS_DICT_ENCODING_TYPE,          /* T1_EncodingType */\n    PS_DICT_ENCODING_ENTRY,         /* FT_String*      */\n\n    /* conventionally in the font Private dictionary */\n    PS_DICT_NUM_SUBRS,              /* FT_Int     */\n    PS_DICT_SUBR,                   /* FT_String* */\n    PS_DICT_STD_HW,                 /* FT_UShort  */\n    PS_DICT_STD_VW,                 /* FT_UShort  */\n    PS_DICT_NUM_BLUE_VALUES,        /* FT_Byte    */\n    PS_DICT_BLUE_VALUE,             /* FT_Short   */\n    PS_DICT_BLUE_FUZZ,              /* FT_Int     */\n    PS_DICT_NUM_OTHER_BLUES,        /* FT_Byte    */\n    PS_DICT_OTHER_BLUE,             /* FT_Short   */\n    PS_DICT_NUM_FAMILY_BLUES,       /* FT_Byte    */\n    PS_DICT_FAMILY_BLUE,            /* FT_Short   */\n    PS_DICT_NUM_FAMILY_OTHER_BLUES, /* FT_Byte    */\n    PS_DICT_FAMILY_OTHER_BLUE,      /* FT_Short   */\n    PS_DICT_BLUE_SCALE,             /* FT_Fixed   */\n    PS_DICT_BLUE_SHIFT,             /* FT_Int     */\n    PS_DICT_NUM_STEM_SNAP_H,        /* FT_Byte    */\n    PS_DICT_STEM_SNAP_H,            /* FT_Short   */\n    PS_DICT_NUM_STEM_SNAP_V,        /* FT_Byte    */\n    PS_DICT_STEM_SNAP_V,            /* FT_Short   */\n    PS_DICT_FORCE_BOLD,             /* FT_Bool    */\n    PS_DICT_RND_STEM_UP,            /* FT_Bool    */\n    PS_DICT_MIN_FEATURE,            /* FT_Short   */\n    PS_DICT_LEN_IV,                 /* FT_Int     */\n    PS_DICT_PASSWORD,               /* FT_Long    */\n    PS_DICT_LANGUAGE_GROUP,         /* FT_Long    */\n\n    /* conventionally in the font FontInfo dictionary */\n    PS_DICT_VERSION,                /* FT_String* */\n    PS_DICT_NOTICE,                 /* FT_String* */\n    PS_DICT_FULL_NAME,              /* FT_String* */\n    PS_DICT_FAMILY_NAME,            /* FT_String* */\n    PS_DICT_WEIGHT,                 /* FT_String* */\n    PS_DICT_IS_FIXED_PITCH,         /* FT_Bool    */\n    PS_DICT_UNDERLINE_POSITION,     /* FT_Short   */\n    PS_DICT_UNDERLINE_THICKNESS,    /* FT_UShort  */\n    PS_DICT_FS_TYPE,                /* FT_UShort  */\n    PS_DICT_ITALIC_ANGLE,           /* FT_Long    */\n\n    PS_DICT_MAX = PS_DICT_ITALIC_ANGLE\n\n  } PS_Dict_Keys;\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *    FT_Get_PS_Font_Value\n   *\n   * @description:\n   *    Retrieve the value for the supplied key from a PostScript font.\n   *\n   * @input:\n   *    face ::\n   *      PostScript face handle.\n   *\n   *    key ::\n   *      An enumeration value representing the dictionary key to retrieve.\n   *\n   *    idx ::\n   *      For array values, this specifies the index to be returned.\n   *\n   *    value ::\n   *      A pointer to memory into which to write the value.\n   *\n   *    valen_len ::\n   *      The size, in bytes, of the memory supplied for the value.\n   *\n   * @output:\n   *    value ::\n   *      The value matching the above key, if it exists.\n   *\n   * @return:\n   *    The amount of memory (in bytes) required to hold the requested value\n   *    (if it exists, -1 otherwise).\n   *\n   * @note:\n   *    The values returned are not pointers into the internal structures of\n   *    the face, but are 'fresh' copies, so that the memory containing them\n   *    belongs to the calling application.  This also enforces the\n   *    'read-only' nature of these values, i.e., this function cannot be\n   *    used to manipulate the face.\n   *\n   *    `value` is a void pointer because the values returned can be of\n   *    various types.\n   *\n   *    If either `value` is `NULL` or `value_len` is too small, just the\n   *    required memory size for the requested entry is returned.\n   *\n   *    The `idx` parameter is used, not only to retrieve elements of, for\n   *    example, the FontMatrix or FontBBox, but also to retrieve name keys\n   *    from the CharStrings dictionary, and the charstrings themselves.  It\n   *    is ignored for atomic values.\n   *\n   *    `PS_DICT_BLUE_SCALE` returns a value that is scaled up by 1000.  To\n   *    get the value as in the font stream, you need to divide by 65536000.0\n   *    (to remove the FT_Fixed scale, and the x1000 scale).\n   *\n   *    IMPORTANT: Only key/value pairs read by the FreeType interpreter can\n   *    be retrieved.  So, for example, PostScript procedures such as NP, ND,\n   *    and RD are not available.  Arbitrary keys are, obviously, not be\n   *    available either.\n   *\n   *    If the font's format is not PostScript-based, this function returns\n   *    the `FT_Err_Invalid_Argument` error code.\n   *\n   * @since:\n   *    2.4.8\n   *\n   */\n  FT_EXPORT( FT_Long )\n  FT_Get_PS_Font_Value( FT_Face       face,\n                        PS_Dict_Keys  key,\n                        FT_UInt       idx,\n                        void         *value,\n                        FT_Long       value_len );\n\n  /* */\n\nFT_END_HEADER\n\n#endif /* T1TABLES_H_ */\n\n\n/* END */\n"
  },
  {
    "path": "thirdparty/freetype/include/freetype2/freetype/ttnameid.h",
    "content": "/****************************************************************************\n *\n * ttnameid.h\n *\n *   TrueType name ID definitions (specification only).\n *\n * Copyright (C) 1996-2021 by\n * David Turner, Robert Wilhelm, and Werner Lemberg.\n *\n * This file is part of the FreeType project, and may only be used,\n * modified, and distributed under the terms of the FreeType project\n * license, LICENSE.TXT.  By continuing to use, modify, or distribute\n * this file you indicate that you have read the license and\n * understand and accept it fully.\n *\n */\n\n\n#ifndef TTNAMEID_H_\n#define TTNAMEID_H_\n\n\n\n\nFT_BEGIN_HEADER\n\n\n  /**************************************************************************\n   *\n   * @section:\n   *   truetype_tables\n   */\n\n\n  /**************************************************************************\n   *\n   * Possible values for the 'platform' identifier code in the name records\n   * of an SFNT 'name' table.\n   *\n   */\n\n\n  /**************************************************************************\n   *\n   * @enum:\n   *   TT_PLATFORM_XXX\n   *\n   * @description:\n   *   A list of valid values for the `platform_id` identifier code in\n   *   @FT_CharMapRec and @FT_SfntName structures.\n   *\n   * @values:\n   *   TT_PLATFORM_APPLE_UNICODE ::\n   *     Used by Apple to indicate a Unicode character map and/or name entry.\n   *     See @TT_APPLE_ID_XXX for corresponding `encoding_id` values.  Note\n   *     that name entries in this format are coded as big-endian UCS-2\n   *     character codes _only_.\n   *\n   *   TT_PLATFORM_MACINTOSH ::\n   *     Used by Apple to indicate a MacOS-specific charmap and/or name\n   *     entry.  See @TT_MAC_ID_XXX for corresponding `encoding_id` values.\n   *     Note that most TrueType fonts contain an Apple roman charmap to be\n   *     usable on MacOS systems (even if they contain a Microsoft charmap as\n   *     well).\n   *\n   *   TT_PLATFORM_ISO ::\n   *     This value was used to specify ISO/IEC 10646 charmaps.  It is\n   *     however now deprecated.  See @TT_ISO_ID_XXX for a list of\n   *     corresponding `encoding_id` values.\n   *\n   *   TT_PLATFORM_MICROSOFT ::\n   *     Used by Microsoft to indicate Windows-specific charmaps.  See\n   *     @TT_MS_ID_XXX for a list of corresponding `encoding_id` values.\n   *     Note that most fonts contain a Unicode charmap using\n   *     (`TT_PLATFORM_MICROSOFT`, @TT_MS_ID_UNICODE_CS).\n   *\n   *   TT_PLATFORM_CUSTOM ::\n   *     Used to indicate application-specific charmaps.\n   *\n   *   TT_PLATFORM_ADOBE ::\n   *     This value isn't part of any font format specification, but is used\n   *     by FreeType to report Adobe-specific charmaps in an @FT_CharMapRec\n   *     structure.  See @TT_ADOBE_ID_XXX.\n   */\n\n#define TT_PLATFORM_APPLE_UNICODE  0\n#define TT_PLATFORM_MACINTOSH      1\n#define TT_PLATFORM_ISO            2 /* deprecated */\n#define TT_PLATFORM_MICROSOFT      3\n#define TT_PLATFORM_CUSTOM         4\n#define TT_PLATFORM_ADOBE          7 /* artificial */\n\n\n  /**************************************************************************\n   *\n   * @enum:\n   *   TT_APPLE_ID_XXX\n   *\n   * @description:\n   *   A list of valid values for the `encoding_id` for\n   *   @TT_PLATFORM_APPLE_UNICODE charmaps and name entries.\n   *\n   * @values:\n   *   TT_APPLE_ID_DEFAULT ::\n   *     Unicode version 1.0.\n   *\n   *   TT_APPLE_ID_UNICODE_1_1 ::\n   *     Unicode 1.1; specifies Hangul characters starting at U+34xx.\n   *\n   *   TT_APPLE_ID_ISO_10646 ::\n   *     Deprecated (identical to preceding).\n   *\n   *   TT_APPLE_ID_UNICODE_2_0 ::\n   *     Unicode 2.0 and beyond (UTF-16 BMP only).\n   *\n   *   TT_APPLE_ID_UNICODE_32 ::\n   *     Unicode 3.1 and beyond, using UTF-32.\n   *\n   *   TT_APPLE_ID_VARIANT_SELECTOR ::\n   *     From Adobe, not Apple.  Not a normal cmap.  Specifies variations on\n   *     a real cmap.\n   *\n   *   TT_APPLE_ID_FULL_UNICODE ::\n   *     Used for fallback fonts that provide complete Unicode coverage with\n   *     a type~13 cmap.\n   */\n\n#define TT_APPLE_ID_DEFAULT           0 /* Unicode 1.0                   */\n#define TT_APPLE_ID_UNICODE_1_1       1 /* specify Hangul at U+34xx      */\n#define TT_APPLE_ID_ISO_10646         2 /* deprecated                    */\n#define TT_APPLE_ID_UNICODE_2_0       3 /* or later                      */\n#define TT_APPLE_ID_UNICODE_32        4 /* 2.0 or later, full repertoire */\n#define TT_APPLE_ID_VARIANT_SELECTOR  5 /* variation selector data       */\n#define TT_APPLE_ID_FULL_UNICODE      6 /* used with type 13 cmaps       */\n\n\n  /**************************************************************************\n   *\n   * @enum:\n   *   TT_MAC_ID_XXX\n   *\n   * @description:\n   *   A list of valid values for the `encoding_id` for\n   *   @TT_PLATFORM_MACINTOSH charmaps and name entries.\n   */\n\n#define TT_MAC_ID_ROMAN                 0\n#define TT_MAC_ID_JAPANESE              1\n#define TT_MAC_ID_TRADITIONAL_CHINESE   2\n#define TT_MAC_ID_KOREAN                3\n#define TT_MAC_ID_ARABIC                4\n#define TT_MAC_ID_HEBREW                5\n#define TT_MAC_ID_GREEK                 6\n#define TT_MAC_ID_RUSSIAN               7\n#define TT_MAC_ID_RSYMBOL               8\n#define TT_MAC_ID_DEVANAGARI            9\n#define TT_MAC_ID_GURMUKHI             10\n#define TT_MAC_ID_GUJARATI             11\n#define TT_MAC_ID_ORIYA                12\n#define TT_MAC_ID_BENGALI              13\n#define TT_MAC_ID_TAMIL                14\n#define TT_MAC_ID_TELUGU               15\n#define TT_MAC_ID_KANNADA              16\n#define TT_MAC_ID_MALAYALAM            17\n#define TT_MAC_ID_SINHALESE            18\n#define TT_MAC_ID_BURMESE              19\n#define TT_MAC_ID_KHMER                20\n#define TT_MAC_ID_THAI                 21\n#define TT_MAC_ID_LAOTIAN              22\n#define TT_MAC_ID_GEORGIAN             23\n#define TT_MAC_ID_ARMENIAN             24\n#define TT_MAC_ID_MALDIVIAN            25\n#define TT_MAC_ID_SIMPLIFIED_CHINESE   25\n#define TT_MAC_ID_TIBETAN              26\n#define TT_MAC_ID_MONGOLIAN            27\n#define TT_MAC_ID_GEEZ                 28\n#define TT_MAC_ID_SLAVIC               29\n#define TT_MAC_ID_VIETNAMESE           30\n#define TT_MAC_ID_SINDHI               31\n#define TT_MAC_ID_UNINTERP             32\n\n\n  /**************************************************************************\n   *\n   * @enum:\n   *   TT_ISO_ID_XXX\n   *\n   * @description:\n   *   A list of valid values for the `encoding_id` for @TT_PLATFORM_ISO\n   *   charmaps and name entries.\n   *\n   *   Their use is now deprecated.\n   *\n   * @values:\n   *   TT_ISO_ID_7BIT_ASCII ::\n   *     ASCII.\n   *   TT_ISO_ID_10646 ::\n   *     ISO/10646.\n   *   TT_ISO_ID_8859_1 ::\n   *     Also known as Latin-1.\n   */\n\n#define TT_ISO_ID_7BIT_ASCII  0\n#define TT_ISO_ID_10646       1\n#define TT_ISO_ID_8859_1      2\n\n\n  /**************************************************************************\n   *\n   * @enum:\n   *   TT_MS_ID_XXX\n   *\n   * @description:\n   *   A list of valid values for the `encoding_id` for\n   *   @TT_PLATFORM_MICROSOFT charmaps and name entries.\n   *\n   * @values:\n   *   TT_MS_ID_SYMBOL_CS ::\n   *     Microsoft symbol encoding.  See @FT_ENCODING_MS_SYMBOL.\n   *\n   *   TT_MS_ID_UNICODE_CS ::\n   *     Microsoft WGL4 charmap, matching Unicode.  See @FT_ENCODING_UNICODE.\n   *\n   *   TT_MS_ID_SJIS ::\n   *     Shift JIS Japanese encoding.  See @FT_ENCODING_SJIS.\n   *\n   *   TT_MS_ID_PRC ::\n   *     Chinese encodings as used in the People's Republic of China (PRC).\n   *     This means the encodings GB~2312 and its supersets GBK and GB~18030.\n   *     See @FT_ENCODING_PRC.\n   *\n   *   TT_MS_ID_BIG_5 ::\n   *     Traditional Chinese as used in Taiwan and Hong Kong.  See\n   *     @FT_ENCODING_BIG5.\n   *\n   *   TT_MS_ID_WANSUNG ::\n   *     Korean Extended Wansung encoding.  See @FT_ENCODING_WANSUNG.\n   *\n   *   TT_MS_ID_JOHAB ::\n   *     Korean Johab encoding.  See @FT_ENCODING_JOHAB.\n   *\n   *   TT_MS_ID_UCS_4 ::\n   *     UCS-4 or UTF-32 charmaps.  This has been added to the OpenType\n   *     specification version 1.4 (mid-2001).\n   */\n\n#define TT_MS_ID_SYMBOL_CS    0\n#define TT_MS_ID_UNICODE_CS   1\n#define TT_MS_ID_SJIS         2\n#define TT_MS_ID_PRC          3\n#define TT_MS_ID_BIG_5        4\n#define TT_MS_ID_WANSUNG      5\n#define TT_MS_ID_JOHAB        6\n#define TT_MS_ID_UCS_4       10\n\n  /* this value is deprecated */\n#define TT_MS_ID_GB2312  TT_MS_ID_PRC\n\n\n  /**************************************************************************\n   *\n   * @enum:\n   *   TT_ADOBE_ID_XXX\n   *\n   * @description:\n   *   A list of valid values for the `encoding_id` for @TT_PLATFORM_ADOBE\n   *   charmaps.  This is a FreeType-specific extension!\n   *\n   * @values:\n   *   TT_ADOBE_ID_STANDARD ::\n   *     Adobe standard encoding.\n   *   TT_ADOBE_ID_EXPERT ::\n   *     Adobe expert encoding.\n   *   TT_ADOBE_ID_CUSTOM ::\n   *     Adobe custom encoding.\n   *   TT_ADOBE_ID_LATIN_1 ::\n   *     Adobe Latin~1 encoding.\n   */\n\n#define TT_ADOBE_ID_STANDARD  0\n#define TT_ADOBE_ID_EXPERT    1\n#define TT_ADOBE_ID_CUSTOM    2\n#define TT_ADOBE_ID_LATIN_1   3\n\n\n  /**************************************************************************\n   *\n   * @enum:\n   *   TT_MAC_LANGID_XXX\n   *\n   * @description:\n   *   Possible values of the language identifier field in the name records\n   *   of the SFNT 'name' table if the 'platform' identifier code is\n   *   @TT_PLATFORM_MACINTOSH.  These values are also used as return values\n   *   for function @FT_Get_CMap_Language_ID.\n   *\n   *   The canonical source for Apple's IDs is\n   *\n   *     https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6name.html\n   */\n\n#define TT_MAC_LANGID_ENGLISH                       0\n#define TT_MAC_LANGID_FRENCH                        1\n#define TT_MAC_LANGID_GERMAN                        2\n#define TT_MAC_LANGID_ITALIAN                       3\n#define TT_MAC_LANGID_DUTCH                         4\n#define TT_MAC_LANGID_SWEDISH                       5\n#define TT_MAC_LANGID_SPANISH                       6\n#define TT_MAC_LANGID_DANISH                        7\n#define TT_MAC_LANGID_PORTUGUESE                    8\n#define TT_MAC_LANGID_NORWEGIAN                     9\n#define TT_MAC_LANGID_HEBREW                       10\n#define TT_MAC_LANGID_JAPANESE                     11\n#define TT_MAC_LANGID_ARABIC                       12\n#define TT_MAC_LANGID_FINNISH                      13\n#define TT_MAC_LANGID_GREEK                        14\n#define TT_MAC_LANGID_ICELANDIC                    15\n#define TT_MAC_LANGID_MALTESE                      16\n#define TT_MAC_LANGID_TURKISH                      17\n#define TT_MAC_LANGID_CROATIAN                     18\n#define TT_MAC_LANGID_CHINESE_TRADITIONAL          19\n#define TT_MAC_LANGID_URDU                         20\n#define TT_MAC_LANGID_HINDI                        21\n#define TT_MAC_LANGID_THAI                         22\n#define TT_MAC_LANGID_KOREAN                       23\n#define TT_MAC_LANGID_LITHUANIAN                   24\n#define TT_MAC_LANGID_POLISH                       25\n#define TT_MAC_LANGID_HUNGARIAN                    26\n#define TT_MAC_LANGID_ESTONIAN                     27\n#define TT_MAC_LANGID_LETTISH                      28\n#define TT_MAC_LANGID_SAAMISK                      29\n#define TT_MAC_LANGID_FAEROESE                     30\n#define TT_MAC_LANGID_FARSI                        31\n#define TT_MAC_LANGID_RUSSIAN                      32\n#define TT_MAC_LANGID_CHINESE_SIMPLIFIED           33\n#define TT_MAC_LANGID_FLEMISH                      34\n#define TT_MAC_LANGID_IRISH                        35\n#define TT_MAC_LANGID_ALBANIAN                     36\n#define TT_MAC_LANGID_ROMANIAN                     37\n#define TT_MAC_LANGID_CZECH                        38\n#define TT_MAC_LANGID_SLOVAK                       39\n#define TT_MAC_LANGID_SLOVENIAN                    40\n#define TT_MAC_LANGID_YIDDISH                      41\n#define TT_MAC_LANGID_SERBIAN                      42\n#define TT_MAC_LANGID_MACEDONIAN                   43\n#define TT_MAC_LANGID_BULGARIAN                    44\n#define TT_MAC_LANGID_UKRAINIAN                    45\n#define TT_MAC_LANGID_BYELORUSSIAN                 46\n#define TT_MAC_LANGID_UZBEK                        47\n#define TT_MAC_LANGID_KAZAKH                       48\n#define TT_MAC_LANGID_AZERBAIJANI                  49\n#define TT_MAC_LANGID_AZERBAIJANI_CYRILLIC_SCRIPT  49\n#define TT_MAC_LANGID_AZERBAIJANI_ARABIC_SCRIPT    50\n#define TT_MAC_LANGID_ARMENIAN                     51\n#define TT_MAC_LANGID_GEORGIAN                     52\n#define TT_MAC_LANGID_MOLDAVIAN                    53\n#define TT_MAC_LANGID_KIRGHIZ                      54\n#define TT_MAC_LANGID_TAJIKI                       55\n#define TT_MAC_LANGID_TURKMEN                      56\n#define TT_MAC_LANGID_MONGOLIAN                    57\n#define TT_MAC_LANGID_MONGOLIAN_MONGOLIAN_SCRIPT   57\n#define TT_MAC_LANGID_MONGOLIAN_CYRILLIC_SCRIPT    58\n#define TT_MAC_LANGID_PASHTO                       59\n#define TT_MAC_LANGID_KURDISH                      60\n#define TT_MAC_LANGID_KASHMIRI                     61\n#define TT_MAC_LANGID_SINDHI                       62\n#define TT_MAC_LANGID_TIBETAN                      63\n#define TT_MAC_LANGID_NEPALI                       64\n#define TT_MAC_LANGID_SANSKRIT                     65\n#define TT_MAC_LANGID_MARATHI                      66\n#define TT_MAC_LANGID_BENGALI                      67\n#define TT_MAC_LANGID_ASSAMESE                     68\n#define TT_MAC_LANGID_GUJARATI                     69\n#define TT_MAC_LANGID_PUNJABI                      70\n#define TT_MAC_LANGID_ORIYA                        71\n#define TT_MAC_LANGID_MALAYALAM                    72\n#define TT_MAC_LANGID_KANNADA                      73\n#define TT_MAC_LANGID_TAMIL                        74\n#define TT_MAC_LANGID_TELUGU                       75\n#define TT_MAC_LANGID_SINHALESE                    76\n#define TT_MAC_LANGID_BURMESE                      77\n#define TT_MAC_LANGID_KHMER                        78\n#define TT_MAC_LANGID_LAO                          79\n#define TT_MAC_LANGID_VIETNAMESE                   80\n#define TT_MAC_LANGID_INDONESIAN                   81\n#define TT_MAC_LANGID_TAGALOG                      82\n#define TT_MAC_LANGID_MALAY_ROMAN_SCRIPT           83\n#define TT_MAC_LANGID_MALAY_ARABIC_SCRIPT          84\n#define TT_MAC_LANGID_AMHARIC                      85\n#define TT_MAC_LANGID_TIGRINYA                     86\n#define TT_MAC_LANGID_GALLA                        87\n#define TT_MAC_LANGID_SOMALI                       88\n#define TT_MAC_LANGID_SWAHILI                      89\n#define TT_MAC_LANGID_RUANDA                       90\n#define TT_MAC_LANGID_RUNDI                        91\n#define TT_MAC_LANGID_CHEWA                        92\n#define TT_MAC_LANGID_MALAGASY                     93\n#define TT_MAC_LANGID_ESPERANTO                    94\n#define TT_MAC_LANGID_WELSH                       128\n#define TT_MAC_LANGID_BASQUE                      129\n#define TT_MAC_LANGID_CATALAN                     130\n#define TT_MAC_LANGID_LATIN                       131\n#define TT_MAC_LANGID_QUECHUA                     132\n#define TT_MAC_LANGID_GUARANI                     133\n#define TT_MAC_LANGID_AYMARA                      134\n#define TT_MAC_LANGID_TATAR                       135\n#define TT_MAC_LANGID_UIGHUR                      136\n#define TT_MAC_LANGID_DZONGKHA                    137\n#define TT_MAC_LANGID_JAVANESE                    138\n#define TT_MAC_LANGID_SUNDANESE                   139\n\n  /* The following codes are new as of 2000-03-10 */\n#define TT_MAC_LANGID_GALICIAN                    140\n#define TT_MAC_LANGID_AFRIKAANS                   141\n#define TT_MAC_LANGID_BRETON                      142\n#define TT_MAC_LANGID_INUKTITUT                   143\n#define TT_MAC_LANGID_SCOTTISH_GAELIC             144\n#define TT_MAC_LANGID_MANX_GAELIC                 145\n#define TT_MAC_LANGID_IRISH_GAELIC                146\n#define TT_MAC_LANGID_TONGAN                      147\n#define TT_MAC_LANGID_GREEK_POLYTONIC             148\n#define TT_MAC_LANGID_GREELANDIC                  149\n#define TT_MAC_LANGID_AZERBAIJANI_ROMAN_SCRIPT    150\n\n\n  /**************************************************************************\n   *\n   * @enum:\n   *   TT_MS_LANGID_XXX\n   *\n   * @description:\n   *   Possible values of the language identifier field in the name records\n   *   of the SFNT 'name' table if the 'platform' identifier code is\n   *   @TT_PLATFORM_MICROSOFT.  These values are also used as return values\n   *   for function @FT_Get_CMap_Language_ID.\n   *\n   *   The canonical source for Microsoft's IDs is\n   *\n   *     https://docs.microsoft.com/en-us/windows/desktop/Intl/language-identifier-constants-and-strings ,\n   *\n   *   however, we only provide macros for language identifiers present in\n   *   the OpenType specification: Microsoft has abandoned the concept of\n   *   LCIDs (language code identifiers), and format~1 of the 'name' table\n   *   provides a better mechanism for languages not covered here.\n   *\n   *   More legacy values not listed in the reference can be found in the\n   *   @FT_TRUETYPE_IDS_H header file.\n   */\n\n#define TT_MS_LANGID_ARABIC_SAUDI_ARABIA               0x0401\n#define TT_MS_LANGID_ARABIC_IRAQ                       0x0801\n#define TT_MS_LANGID_ARABIC_EGYPT                      0x0C01\n#define TT_MS_LANGID_ARABIC_LIBYA                      0x1001\n#define TT_MS_LANGID_ARABIC_ALGERIA                    0x1401\n#define TT_MS_LANGID_ARABIC_MOROCCO                    0x1801\n#define TT_MS_LANGID_ARABIC_TUNISIA                    0x1C01\n#define TT_MS_LANGID_ARABIC_OMAN                       0x2001\n#define TT_MS_LANGID_ARABIC_YEMEN                      0x2401\n#define TT_MS_LANGID_ARABIC_SYRIA                      0x2801\n#define TT_MS_LANGID_ARABIC_JORDAN                     0x2C01\n#define TT_MS_LANGID_ARABIC_LEBANON                    0x3001\n#define TT_MS_LANGID_ARABIC_KUWAIT                     0x3401\n#define TT_MS_LANGID_ARABIC_UAE                        0x3801\n#define TT_MS_LANGID_ARABIC_BAHRAIN                    0x3C01\n#define TT_MS_LANGID_ARABIC_QATAR                      0x4001\n#define TT_MS_LANGID_BULGARIAN_BULGARIA                0x0402\n#define TT_MS_LANGID_CATALAN_CATALAN                   0x0403\n#define TT_MS_LANGID_CHINESE_TAIWAN                    0x0404\n#define TT_MS_LANGID_CHINESE_PRC                       0x0804\n#define TT_MS_LANGID_CHINESE_HONG_KONG                 0x0C04\n#define TT_MS_LANGID_CHINESE_SINGAPORE                 0x1004\n#define TT_MS_LANGID_CHINESE_MACAO                     0x1404\n#define TT_MS_LANGID_CZECH_CZECH_REPUBLIC              0x0405\n#define TT_MS_LANGID_DANISH_DENMARK                    0x0406\n#define TT_MS_LANGID_GERMAN_GERMANY                    0x0407\n#define TT_MS_LANGID_GERMAN_SWITZERLAND                0x0807\n#define TT_MS_LANGID_GERMAN_AUSTRIA                    0x0C07\n#define TT_MS_LANGID_GERMAN_LUXEMBOURG                 0x1007\n#define TT_MS_LANGID_GERMAN_LIECHTENSTEIN              0x1407\n#define TT_MS_LANGID_GREEK_GREECE                      0x0408\n#define TT_MS_LANGID_ENGLISH_UNITED_STATES             0x0409\n#define TT_MS_LANGID_ENGLISH_UNITED_KINGDOM            0x0809\n#define TT_MS_LANGID_ENGLISH_AUSTRALIA                 0x0C09\n#define TT_MS_LANGID_ENGLISH_CANADA                    0x1009\n#define TT_MS_LANGID_ENGLISH_NEW_ZEALAND               0x1409\n#define TT_MS_LANGID_ENGLISH_IRELAND                   0x1809\n#define TT_MS_LANGID_ENGLISH_SOUTH_AFRICA              0x1C09\n#define TT_MS_LANGID_ENGLISH_JAMAICA                   0x2009\n#define TT_MS_LANGID_ENGLISH_CARIBBEAN                 0x2409\n#define TT_MS_LANGID_ENGLISH_BELIZE                    0x2809\n#define TT_MS_LANGID_ENGLISH_TRINIDAD                  0x2C09\n#define TT_MS_LANGID_ENGLISH_ZIMBABWE                  0x3009\n#define TT_MS_LANGID_ENGLISH_PHILIPPINES               0x3409\n#define TT_MS_LANGID_ENGLISH_INDIA                     0x4009\n#define TT_MS_LANGID_ENGLISH_MALAYSIA                  0x4409\n#define TT_MS_LANGID_ENGLISH_SINGAPORE                 0x4809\n#define TT_MS_LANGID_SPANISH_SPAIN_TRADITIONAL_SORT    0x040A\n#define TT_MS_LANGID_SPANISH_MEXICO                    0x080A\n#define TT_MS_LANGID_SPANISH_SPAIN_MODERN_SORT         0x0C0A\n#define TT_MS_LANGID_SPANISH_GUATEMALA                 0x100A\n#define TT_MS_LANGID_SPANISH_COSTA_RICA                0x140A\n#define TT_MS_LANGID_SPANISH_PANAMA                    0x180A\n#define TT_MS_LANGID_SPANISH_DOMINICAN_REPUBLIC        0x1C0A\n#define TT_MS_LANGID_SPANISH_VENEZUELA                 0x200A\n#define TT_MS_LANGID_SPANISH_COLOMBIA                  0x240A\n#define TT_MS_LANGID_SPANISH_PERU                      0x280A\n#define TT_MS_LANGID_SPANISH_ARGENTINA                 0x2C0A\n#define TT_MS_LANGID_SPANISH_ECUADOR                   0x300A\n#define TT_MS_LANGID_SPANISH_CHILE                     0x340A\n#define TT_MS_LANGID_SPANISH_URUGUAY                   0x380A\n#define TT_MS_LANGID_SPANISH_PARAGUAY                  0x3C0A\n#define TT_MS_LANGID_SPANISH_BOLIVIA                   0x400A\n#define TT_MS_LANGID_SPANISH_EL_SALVADOR               0x440A\n#define TT_MS_LANGID_SPANISH_HONDURAS                  0x480A\n#define TT_MS_LANGID_SPANISH_NICARAGUA                 0x4C0A\n#define TT_MS_LANGID_SPANISH_PUERTO_RICO               0x500A\n#define TT_MS_LANGID_SPANISH_UNITED_STATES             0x540A\n#define TT_MS_LANGID_FINNISH_FINLAND                   0x040B\n#define TT_MS_LANGID_FRENCH_FRANCE                     0x040C\n#define TT_MS_LANGID_FRENCH_BELGIUM                    0x080C\n#define TT_MS_LANGID_FRENCH_CANADA                     0x0C0C\n#define TT_MS_LANGID_FRENCH_SWITZERLAND                0x100C\n#define TT_MS_LANGID_FRENCH_LUXEMBOURG                 0x140C\n#define TT_MS_LANGID_FRENCH_MONACO                     0x180C\n#define TT_MS_LANGID_HEBREW_ISRAEL                     0x040D\n#define TT_MS_LANGID_HUNGARIAN_HUNGARY                 0x040E\n#define TT_MS_LANGID_ICELANDIC_ICELAND                 0x040F\n#define TT_MS_LANGID_ITALIAN_ITALY                     0x0410\n#define TT_MS_LANGID_ITALIAN_SWITZERLAND               0x0810\n#define TT_MS_LANGID_JAPANESE_JAPAN                    0x0411\n#define TT_MS_LANGID_KOREAN_KOREA                      0x0412\n#define TT_MS_LANGID_DUTCH_NETHERLANDS                 0x0413\n#define TT_MS_LANGID_DUTCH_BELGIUM                     0x0813\n#define TT_MS_LANGID_NORWEGIAN_NORWAY_BOKMAL           0x0414\n#define TT_MS_LANGID_NORWEGIAN_NORWAY_NYNORSK          0x0814\n#define TT_MS_LANGID_POLISH_POLAND                     0x0415\n#define TT_MS_LANGID_PORTUGUESE_BRAZIL                 0x0416\n#define TT_MS_LANGID_PORTUGUESE_PORTUGAL               0x0816\n#define TT_MS_LANGID_ROMANSH_SWITZERLAND               0x0417\n#define TT_MS_LANGID_ROMANIAN_ROMANIA                  0x0418\n#define TT_MS_LANGID_RUSSIAN_RUSSIA                    0x0419\n#define TT_MS_LANGID_CROATIAN_CROATIA                  0x041A\n#define TT_MS_LANGID_SERBIAN_SERBIA_LATIN              0x081A\n#define TT_MS_LANGID_SERBIAN_SERBIA_CYRILLIC           0x0C1A\n#define TT_MS_LANGID_CROATIAN_BOSNIA_HERZEGOVINA       0x101A\n#define TT_MS_LANGID_BOSNIAN_BOSNIA_HERZEGOVINA        0x141A\n#define TT_MS_LANGID_SERBIAN_BOSNIA_HERZ_LATIN         0x181A\n#define TT_MS_LANGID_SERBIAN_BOSNIA_HERZ_CYRILLIC      0x1C1A\n#define TT_MS_LANGID_BOSNIAN_BOSNIA_HERZ_CYRILLIC      0x201A\n#define TT_MS_LANGID_SLOVAK_SLOVAKIA                   0x041B\n#define TT_MS_LANGID_ALBANIAN_ALBANIA                  0x041C\n#define TT_MS_LANGID_SWEDISH_SWEDEN                    0x041D\n#define TT_MS_LANGID_SWEDISH_FINLAND                   0x081D\n#define TT_MS_LANGID_THAI_THAILAND                     0x041E\n#define TT_MS_LANGID_TURKISH_TURKEY                    0x041F\n#define TT_MS_LANGID_URDU_PAKISTAN                     0x0420\n#define TT_MS_LANGID_INDONESIAN_INDONESIA              0x0421\n#define TT_MS_LANGID_UKRAINIAN_UKRAINE                 0x0422\n#define TT_MS_LANGID_BELARUSIAN_BELARUS                0x0423\n#define TT_MS_LANGID_SLOVENIAN_SLOVENIA                0x0424\n#define TT_MS_LANGID_ESTONIAN_ESTONIA                  0x0425\n#define TT_MS_LANGID_LATVIAN_LATVIA                    0x0426\n#define TT_MS_LANGID_LITHUANIAN_LITHUANIA              0x0427\n#define TT_MS_LANGID_TAJIK_TAJIKISTAN                  0x0428\n#define TT_MS_LANGID_VIETNAMESE_VIET_NAM               0x042A\n#define TT_MS_LANGID_ARMENIAN_ARMENIA                  0x042B\n#define TT_MS_LANGID_AZERI_AZERBAIJAN_LATIN            0x042C\n#define TT_MS_LANGID_AZERI_AZERBAIJAN_CYRILLIC         0x082C\n#define TT_MS_LANGID_BASQUE_BASQUE                     0x042D\n#define TT_MS_LANGID_UPPER_SORBIAN_GERMANY             0x042E\n#define TT_MS_LANGID_LOWER_SORBIAN_GERMANY             0x082E\n#define TT_MS_LANGID_MACEDONIAN_MACEDONIA              0x042F\n#define TT_MS_LANGID_SETSWANA_SOUTH_AFRICA             0x0432\n#define TT_MS_LANGID_ISIXHOSA_SOUTH_AFRICA             0x0434\n#define TT_MS_LANGID_ISIZULU_SOUTH_AFRICA              0x0435\n#define TT_MS_LANGID_AFRIKAANS_SOUTH_AFRICA            0x0436\n#define TT_MS_LANGID_GEORGIAN_GEORGIA                  0x0437\n#define TT_MS_LANGID_FAEROESE_FAEROE_ISLANDS           0x0438\n#define TT_MS_LANGID_HINDI_INDIA                       0x0439\n#define TT_MS_LANGID_MALTESE_MALTA                     0x043A\n#define TT_MS_LANGID_SAMI_NORTHERN_NORWAY              0x043B\n#define TT_MS_LANGID_SAMI_NORTHERN_SWEDEN              0x083B\n#define TT_MS_LANGID_SAMI_NORTHERN_FINLAND             0x0C3B\n#define TT_MS_LANGID_SAMI_LULE_NORWAY                  0x103B\n#define TT_MS_LANGID_SAMI_LULE_SWEDEN                  0x143B\n#define TT_MS_LANGID_SAMI_SOUTHERN_NORWAY              0x183B\n#define TT_MS_LANGID_SAMI_SOUTHERN_SWEDEN              0x1C3B\n#define TT_MS_LANGID_SAMI_SKOLT_FINLAND                0x203B\n#define TT_MS_LANGID_SAMI_INARI_FINLAND                0x243B\n#define TT_MS_LANGID_IRISH_IRELAND                     0x083C\n#define TT_MS_LANGID_MALAY_MALAYSIA                    0x043E\n#define TT_MS_LANGID_MALAY_BRUNEI_DARUSSALAM           0x083E\n#define TT_MS_LANGID_KAZAKH_KAZAKHSTAN                 0x043F\n#define TT_MS_LANGID_KYRGYZ_KYRGYZSTAN /* Cyrillic*/   0x0440\n#define TT_MS_LANGID_KISWAHILI_KENYA                   0x0441\n#define TT_MS_LANGID_TURKMEN_TURKMENISTAN              0x0442\n#define TT_MS_LANGID_UZBEK_UZBEKISTAN_LATIN            0x0443\n#define TT_MS_LANGID_UZBEK_UZBEKISTAN_CYRILLIC         0x0843\n#define TT_MS_LANGID_TATAR_RUSSIA                      0x0444\n#define TT_MS_LANGID_BENGALI_INDIA                     0x0445\n#define TT_MS_LANGID_BENGALI_BANGLADESH                0x0845\n#define TT_MS_LANGID_PUNJABI_INDIA                     0x0446\n#define TT_MS_LANGID_GUJARATI_INDIA                    0x0447\n#define TT_MS_LANGID_ODIA_INDIA                        0x0448\n#define TT_MS_LANGID_TAMIL_INDIA                       0x0449\n#define TT_MS_LANGID_TELUGU_INDIA                      0x044A\n#define TT_MS_LANGID_KANNADA_INDIA                     0x044B\n#define TT_MS_LANGID_MALAYALAM_INDIA                   0x044C\n#define TT_MS_LANGID_ASSAMESE_INDIA                    0x044D\n#define TT_MS_LANGID_MARATHI_INDIA                     0x044E\n#define TT_MS_LANGID_SANSKRIT_INDIA                    0x044F\n#define TT_MS_LANGID_MONGOLIAN_MONGOLIA /* Cyrillic */ 0x0450\n#define TT_MS_LANGID_MONGOLIAN_PRC                     0x0850\n#define TT_MS_LANGID_TIBETAN_PRC                       0x0451\n#define TT_MS_LANGID_WELSH_UNITED_KINGDOM              0x0452\n#define TT_MS_LANGID_KHMER_CAMBODIA                    0x0453\n#define TT_MS_LANGID_LAO_LAOS                          0x0454\n#define TT_MS_LANGID_GALICIAN_GALICIAN                 0x0456\n#define TT_MS_LANGID_KONKANI_INDIA                     0x0457\n#define TT_MS_LANGID_SYRIAC_SYRIA                      0x045A\n#define TT_MS_LANGID_SINHALA_SRI_LANKA                 0x045B\n#define TT_MS_LANGID_INUKTITUT_CANADA                  0x045D\n#define TT_MS_LANGID_INUKTITUT_CANADA_LATIN            0x085D\n#define TT_MS_LANGID_AMHARIC_ETHIOPIA                  0x045E\n#define TT_MS_LANGID_TAMAZIGHT_ALGERIA                 0x085F\n#define TT_MS_LANGID_NEPALI_NEPAL                      0x0461\n#define TT_MS_LANGID_FRISIAN_NETHERLANDS               0x0462\n#define TT_MS_LANGID_PASHTO_AFGHANISTAN                0x0463\n#define TT_MS_LANGID_FILIPINO_PHILIPPINES              0x0464\n#define TT_MS_LANGID_DHIVEHI_MALDIVES                  0x0465\n#define TT_MS_LANGID_HAUSA_NIGERIA                     0x0468\n#define TT_MS_LANGID_YORUBA_NIGERIA                    0x046A\n#define TT_MS_LANGID_QUECHUA_BOLIVIA                   0x046B\n#define TT_MS_LANGID_QUECHUA_ECUADOR                   0x086B\n#define TT_MS_LANGID_QUECHUA_PERU                      0x0C6B\n#define TT_MS_LANGID_SESOTHO_SA_LEBOA_SOUTH_AFRICA     0x046C\n#define TT_MS_LANGID_BASHKIR_RUSSIA                    0x046D\n#define TT_MS_LANGID_LUXEMBOURGISH_LUXEMBOURG          0x046E\n#define TT_MS_LANGID_GREENLANDIC_GREENLAND             0x046F\n#define TT_MS_LANGID_IGBO_NIGERIA                      0x0470\n#define TT_MS_LANGID_YI_PRC                            0x0478\n#define TT_MS_LANGID_MAPUDUNGUN_CHILE                  0x047A\n#define TT_MS_LANGID_MOHAWK_MOHAWK                     0x047C\n#define TT_MS_LANGID_BRETON_FRANCE                     0x047E\n#define TT_MS_LANGID_UIGHUR_PRC                        0x0480\n#define TT_MS_LANGID_MAORI_NEW_ZEALAND                 0x0481\n#define TT_MS_LANGID_OCCITAN_FRANCE                    0x0482\n#define TT_MS_LANGID_CORSICAN_FRANCE                   0x0483\n#define TT_MS_LANGID_ALSATIAN_FRANCE                   0x0484\n#define TT_MS_LANGID_YAKUT_RUSSIA                      0x0485\n#define TT_MS_LANGID_KICHE_GUATEMALA                   0x0486\n#define TT_MS_LANGID_KINYARWANDA_RWANDA                0x0487\n#define TT_MS_LANGID_WOLOF_SENEGAL                     0x0488\n#define TT_MS_LANGID_DARI_AFGHANISTAN                  0x048C\n\n  /* */\n\n\n  /* legacy macro definitions not present in OpenType 1.8.1 */\n#define TT_MS_LANGID_ARABIC_GENERAL                    0x0001\n#define TT_MS_LANGID_CATALAN_SPAIN \\\n          TT_MS_LANGID_CATALAN_CATALAN\n#define TT_MS_LANGID_CHINESE_GENERAL                   0x0004\n#define TT_MS_LANGID_CHINESE_MACAU \\\n          TT_MS_LANGID_CHINESE_MACAO\n#define TT_MS_LANGID_GERMAN_LIECHTENSTEI \\\n          TT_MS_LANGID_GERMAN_LIECHTENSTEIN\n#define TT_MS_LANGID_ENGLISH_GENERAL                   0x0009\n#define TT_MS_LANGID_ENGLISH_INDONESIA                 0x3809\n#define TT_MS_LANGID_ENGLISH_HONG_KONG                 0x3C09\n#define TT_MS_LANGID_SPANISH_SPAIN_INTERNATIONAL_SORT \\\n          TT_MS_LANGID_SPANISH_SPAIN_MODERN_SORT\n#define TT_MS_LANGID_SPANISH_LATIN_AMERICA             0xE40AU\n#define TT_MS_LANGID_FRENCH_WEST_INDIES                0x1C0C\n#define TT_MS_LANGID_FRENCH_REUNION                    0x200C\n#define TT_MS_LANGID_FRENCH_CONGO                      0x240C\n  /* which was formerly: */\n#define TT_MS_LANGID_FRENCH_ZAIRE \\\n          TT_MS_LANGID_FRENCH_CONGO\n#define TT_MS_LANGID_FRENCH_SENEGAL                    0x280C\n#define TT_MS_LANGID_FRENCH_CAMEROON                   0x2C0C\n#define TT_MS_LANGID_FRENCH_COTE_D_IVOIRE              0x300C\n#define TT_MS_LANGID_FRENCH_MALI                       0x340C\n#define TT_MS_LANGID_FRENCH_MOROCCO                    0x380C\n#define TT_MS_LANGID_FRENCH_HAITI                      0x3C0C\n#define TT_MS_LANGID_FRENCH_NORTH_AFRICA               0xE40CU\n#define TT_MS_LANGID_KOREAN_EXTENDED_WANSUNG_KOREA \\\n          TT_MS_LANGID_KOREAN_KOREA\n#define TT_MS_LANGID_KOREAN_JOHAB_KOREA                0x0812\n#define TT_MS_LANGID_RHAETO_ROMANIC_SWITZERLAND \\\n          TT_MS_LANGID_ROMANSH_SWITZERLAND\n#define TT_MS_LANGID_MOLDAVIAN_MOLDAVIA                0x0818\n#define TT_MS_LANGID_RUSSIAN_MOLDAVIA                  0x0819\n#define TT_MS_LANGID_URDU_INDIA                        0x0820\n#define TT_MS_LANGID_CLASSIC_LITHUANIAN_LITHUANIA      0x0827\n#define TT_MS_LANGID_SLOVENE_SLOVENIA \\\n          TT_MS_LANGID_SLOVENIAN_SLOVENIA\n#define TT_MS_LANGID_FARSI_IRAN                        0x0429\n#define TT_MS_LANGID_BASQUE_SPAIN \\\n          TT_MS_LANGID_BASQUE_BASQUE\n#define TT_MS_LANGID_SORBIAN_GERMANY \\\n          TT_MS_LANGID_UPPER_SORBIAN_GERMANY\n#define TT_MS_LANGID_SUTU_SOUTH_AFRICA                 0x0430\n#define TT_MS_LANGID_TSONGA_SOUTH_AFRICA               0x0431\n#define TT_MS_LANGID_TSWANA_SOUTH_AFRICA \\\n          TT_MS_LANGID_SETSWANA_SOUTH_AFRICA\n#define TT_MS_LANGID_VENDA_SOUTH_AFRICA                0x0433\n#define TT_MS_LANGID_XHOSA_SOUTH_AFRICA \\\n          TT_MS_LANGID_ISIXHOSA_SOUTH_AFRICA\n#define TT_MS_LANGID_ZULU_SOUTH_AFRICA \\\n          TT_MS_LANGID_ISIZULU_SOUTH_AFRICA\n#define TT_MS_LANGID_SAAMI_LAPONIA                     0x043B\n  /* the next two values are incorrectly inverted */\n#define TT_MS_LANGID_IRISH_GAELIC_IRELAND              0x043C\n#define TT_MS_LANGID_SCOTTISH_GAELIC_UNITED_KINGDOM    0x083C\n#define TT_MS_LANGID_YIDDISH_GERMANY                   0x043D\n#define TT_MS_LANGID_KAZAK_KAZAKSTAN \\\n          TT_MS_LANGID_KAZAKH_KAZAKHSTAN\n#define TT_MS_LANGID_KIRGHIZ_KIRGHIZ_REPUBLIC \\\n          TT_MS_LANGID_KYRGYZ_KYRGYZSTAN\n#define TT_MS_LANGID_KIRGHIZ_KIRGHIZSTAN \\\n          TT_MS_LANGID_KYRGYZ_KYRGYZSTAN\n#define TT_MS_LANGID_SWAHILI_KENYA \\\n          TT_MS_LANGID_KISWAHILI_KENYA\n#define TT_MS_LANGID_TATAR_TATARSTAN \\\n          TT_MS_LANGID_TATAR_RUSSIA\n#define TT_MS_LANGID_PUNJABI_ARABIC_PAKISTAN           0x0846\n#define TT_MS_LANGID_ORIYA_INDIA \\\n          TT_MS_LANGID_ODIA_INDIA\n#define TT_MS_LANGID_MONGOLIAN_MONGOLIA_MONGOLIAN \\\n          TT_MS_LANGID_MONGOLIAN_PRC\n#define TT_MS_LANGID_TIBETAN_CHINA \\\n          TT_MS_LANGID_TIBETAN_PRC\n#define TT_MS_LANGID_DZONGHKA_BHUTAN                   0x0851\n#define TT_MS_LANGID_TIBETAN_BHUTAN \\\n          TT_MS_LANGID_DZONGHKA_BHUTAN\n#define TT_MS_LANGID_WELSH_WALES \\\n          TT_MS_LANGID_WELSH_UNITED_KINGDOM\n#define TT_MS_LANGID_BURMESE_MYANMAR                   0x0455\n#define TT_MS_LANGID_GALICIAN_SPAIN \\\n          TT_MS_LANGID_GALICIAN_GALICIAN\n#define TT_MS_LANGID_MANIPURI_INDIA  /* Bengali */     0x0458\n#define TT_MS_LANGID_SINDHI_INDIA /* Arabic */         0x0459\n#define TT_MS_LANGID_SINDHI_PAKISTAN                   0x0859\n#define TT_MS_LANGID_SINHALESE_SRI_LANKA \\\n          TT_MS_LANGID_SINHALA_SRI_LANKA\n#define TT_MS_LANGID_CHEROKEE_UNITED_STATES            0x045C\n#define TT_MS_LANGID_TAMAZIGHT_MOROCCO /* Arabic */    0x045F\n#define TT_MS_LANGID_TAMAZIGHT_MOROCCO_LATIN \\\n          TT_MS_LANGID_TAMAZIGHT_ALGERIA\n#define TT_MS_LANGID_KASHMIRI_PAKISTAN /* Arabic */    0x0460\n#define TT_MS_LANGID_KASHMIRI_SASIA                    0x0860\n#define TT_MS_LANGID_KASHMIRI_INDIA \\\n          TT_MS_LANGID_KASHMIRI_SASIA\n#define TT_MS_LANGID_NEPALI_INDIA                      0x0861\n#define TT_MS_LANGID_DIVEHI_MALDIVES \\\n          TT_MS_LANGID_DHIVEHI_MALDIVES\n#define TT_MS_LANGID_EDO_NIGERIA                       0x0466\n#define TT_MS_LANGID_FULFULDE_NIGERIA                  0x0467\n#define TT_MS_LANGID_IBIBIO_NIGERIA                    0x0469\n#define TT_MS_LANGID_SEPEDI_SOUTH_AFRICA \\\n          TT_MS_LANGID_SESOTHO_SA_LEBOA_SOUTH_AFRICA\n#define TT_MS_LANGID_SOTHO_SOUTHERN_SOUTH_AFRICA \\\n          TT_MS_LANGID_SESOTHO_SA_LEBOA_SOUTH_AFRICA\n#define TT_MS_LANGID_KANURI_NIGERIA                    0x0471\n#define TT_MS_LANGID_OROMO_ETHIOPIA                    0x0472\n#define TT_MS_LANGID_TIGRIGNA_ETHIOPIA                 0x0473\n#define TT_MS_LANGID_TIGRIGNA_ERYTHREA                 0x0873\n#define TT_MS_LANGID_TIGRIGNA_ERYTREA \\\n          TT_MS_LANGID_TIGRIGNA_ERYTHREA\n#define TT_MS_LANGID_GUARANI_PARAGUAY                  0x0474\n#define TT_MS_LANGID_HAWAIIAN_UNITED_STATES            0x0475\n#define TT_MS_LANGID_LATIN                             0x0476\n#define TT_MS_LANGID_SOMALI_SOMALIA                    0x0477\n#define TT_MS_LANGID_YI_CHINA \\\n          TT_MS_LANGID_YI_PRC\n#define TT_MS_LANGID_PAPIAMENTU_NETHERLANDS_ANTILLES   0x0479\n#define TT_MS_LANGID_UIGHUR_CHINA \\\n          TT_MS_LANGID_UIGHUR_PRC\n\n\n  /**************************************************************************\n   *\n   * @enum:\n   *   TT_NAME_ID_XXX\n   *\n   * @description:\n   *   Possible values of the 'name' identifier field in the name records of\n   *   an SFNT 'name' table.  These values are platform independent.\n   */\n\n#define TT_NAME_ID_COPYRIGHT              0\n#define TT_NAME_ID_FONT_FAMILY            1\n#define TT_NAME_ID_FONT_SUBFAMILY         2\n#define TT_NAME_ID_UNIQUE_ID              3\n#define TT_NAME_ID_FULL_NAME              4\n#define TT_NAME_ID_VERSION_STRING         5\n#define TT_NAME_ID_PS_NAME                6\n#define TT_NAME_ID_TRADEMARK              7\n\n  /* the following values are from the OpenType spec */\n#define TT_NAME_ID_MANUFACTURER           8\n#define TT_NAME_ID_DESIGNER               9\n#define TT_NAME_ID_DESCRIPTION            10\n#define TT_NAME_ID_VENDOR_URL             11\n#define TT_NAME_ID_DESIGNER_URL           12\n#define TT_NAME_ID_LICENSE                13\n#define TT_NAME_ID_LICENSE_URL            14\n  /* number 15 is reserved */\n#define TT_NAME_ID_TYPOGRAPHIC_FAMILY     16\n#define TT_NAME_ID_TYPOGRAPHIC_SUBFAMILY  17\n#define TT_NAME_ID_MAC_FULL_NAME          18\n\n  /* The following code is new as of 2000-01-21 */\n#define TT_NAME_ID_SAMPLE_TEXT            19\n\n  /* This is new in OpenType 1.3 */\n#define TT_NAME_ID_CID_FINDFONT_NAME      20\n\n  /* This is new in OpenType 1.5 */\n#define TT_NAME_ID_WWS_FAMILY             21\n#define TT_NAME_ID_WWS_SUBFAMILY          22\n\n  /* This is new in OpenType 1.7 */\n#define TT_NAME_ID_LIGHT_BACKGROUND       23\n#define TT_NAME_ID_DARK_BACKGROUND        24\n\n  /* This is new in OpenType 1.8 */\n#define TT_NAME_ID_VARIATIONS_PREFIX      25\n\n  /* these two values are deprecated */\n#define TT_NAME_ID_PREFERRED_FAMILY     TT_NAME_ID_TYPOGRAPHIC_FAMILY\n#define TT_NAME_ID_PREFERRED_SUBFAMILY  TT_NAME_ID_TYPOGRAPHIC_SUBFAMILY\n\n\n  /**************************************************************************\n   *\n   * @enum:\n   *   TT_UCR_XXX\n   *\n   * @description:\n   *   Possible bit mask values for the `ulUnicodeRangeX` fields in an SFNT\n   *   'OS/2' table.\n   */\n\n  /* ulUnicodeRange1 */\n  /* --------------- */\n\n  /* Bit  0   Basic Latin */\n#define TT_UCR_BASIC_LATIN                     (1L <<  0) /* U+0020-U+007E */\n  /* Bit  1   C1 Controls and Latin-1 Supplement */\n#define TT_UCR_LATIN1_SUPPLEMENT               (1L <<  1) /* U+0080-U+00FF */\n  /* Bit  2   Latin Extended-A */\n#define TT_UCR_LATIN_EXTENDED_A                (1L <<  2) /* U+0100-U+017F */\n  /* Bit  3   Latin Extended-B */\n#define TT_UCR_LATIN_EXTENDED_B                (1L <<  3) /* U+0180-U+024F */\n  /* Bit  4   IPA Extensions                 */\n  /*          Phonetic Extensions            */\n  /*          Phonetic Extensions Supplement */\n#define TT_UCR_IPA_EXTENSIONS                  (1L <<  4) /* U+0250-U+02AF */\n                                                          /* U+1D00-U+1D7F */\n                                                          /* U+1D80-U+1DBF */\n  /* Bit  5   Spacing Modifier Letters */\n  /*          Modifier Tone Letters    */\n#define TT_UCR_SPACING_MODIFIER                (1L <<  5) /* U+02B0-U+02FF */\n                                                          /* U+A700-U+A71F */\n  /* Bit  6   Combining Diacritical Marks            */\n  /*          Combining Diacritical Marks Supplement */\n#define TT_UCR_COMBINING_DIACRITICAL_MARKS     (1L <<  6) /* U+0300-U+036F */\n                                                          /* U+1DC0-U+1DFF */\n  /* Bit  7   Greek and Coptic */\n#define TT_UCR_GREEK                           (1L <<  7) /* U+0370-U+03FF */\n  /* Bit  8   Coptic */\n#define TT_UCR_COPTIC                          (1L <<  8) /* U+2C80-U+2CFF */\n  /* Bit  9   Cyrillic            */\n  /*          Cyrillic Supplement */\n  /*          Cyrillic Extended-A */\n  /*          Cyrillic Extended-B */\n#define TT_UCR_CYRILLIC                        (1L <<  9) /* U+0400-U+04FF */\n                                                          /* U+0500-U+052F */\n                                                          /* U+2DE0-U+2DFF */\n                                                          /* U+A640-U+A69F */\n  /* Bit 10   Armenian */\n#define TT_UCR_ARMENIAN                        (1L << 10) /* U+0530-U+058F */\n  /* Bit 11   Hebrew */\n#define TT_UCR_HEBREW                          (1L << 11) /* U+0590-U+05FF */\n  /* Bit 12   Vai */\n#define TT_UCR_VAI                             (1L << 12) /* U+A500-U+A63F */\n  /* Bit 13   Arabic            */\n  /*          Arabic Supplement */\n#define TT_UCR_ARABIC                          (1L << 13) /* U+0600-U+06FF */\n                                                          /* U+0750-U+077F */\n  /* Bit 14   NKo */\n#define TT_UCR_NKO                             (1L << 14) /* U+07C0-U+07FF */\n  /* Bit 15   Devanagari */\n#define TT_UCR_DEVANAGARI                      (1L << 15) /* U+0900-U+097F */\n  /* Bit 16   Bengali */\n#define TT_UCR_BENGALI                         (1L << 16) /* U+0980-U+09FF */\n  /* Bit 17   Gurmukhi */\n#define TT_UCR_GURMUKHI                        (1L << 17) /* U+0A00-U+0A7F */\n  /* Bit 18   Gujarati */\n#define TT_UCR_GUJARATI                        (1L << 18) /* U+0A80-U+0AFF */\n  /* Bit 19   Oriya */\n#define TT_UCR_ORIYA                           (1L << 19) /* U+0B00-U+0B7F */\n  /* Bit 20   Tamil */\n#define TT_UCR_TAMIL                           (1L << 20) /* U+0B80-U+0BFF */\n  /* Bit 21   Telugu */\n#define TT_UCR_TELUGU                          (1L << 21) /* U+0C00-U+0C7F */\n  /* Bit 22   Kannada */\n#define TT_UCR_KANNADA                         (1L << 22) /* U+0C80-U+0CFF */\n  /* Bit 23   Malayalam */\n#define TT_UCR_MALAYALAM                       (1L << 23) /* U+0D00-U+0D7F */\n  /* Bit 24   Thai */\n#define TT_UCR_THAI                            (1L << 24) /* U+0E00-U+0E7F */\n  /* Bit 25   Lao */\n#define TT_UCR_LAO                             (1L << 25) /* U+0E80-U+0EFF */\n  /* Bit 26   Georgian            */\n  /*          Georgian Supplement */\n#define TT_UCR_GEORGIAN                        (1L << 26) /* U+10A0-U+10FF */\n                                                          /* U+2D00-U+2D2F */\n  /* Bit 27   Balinese */\n#define TT_UCR_BALINESE                        (1L << 27) /* U+1B00-U+1B7F */\n  /* Bit 28   Hangul Jamo */\n#define TT_UCR_HANGUL_JAMO                     (1L << 28) /* U+1100-U+11FF */\n  /* Bit 29   Latin Extended Additional */\n  /*          Latin Extended-C          */\n  /*          Latin Extended-D          */\n#define TT_UCR_LATIN_EXTENDED_ADDITIONAL       (1L << 29) /* U+1E00-U+1EFF */\n                                                          /* U+2C60-U+2C7F */\n                                                          /* U+A720-U+A7FF */\n  /* Bit 30   Greek Extended */\n#define TT_UCR_GREEK_EXTENDED                  (1L << 30) /* U+1F00-U+1FFF */\n  /* Bit 31   General Punctuation      */\n  /*          Supplemental Punctuation */\n#define TT_UCR_GENERAL_PUNCTUATION             (1L << 31) /* U+2000-U+206F */\n                                                          /* U+2E00-U+2E7F */\n\n  /* ulUnicodeRange2 */\n  /* --------------- */\n\n  /* Bit 32   Superscripts And Subscripts */\n#define TT_UCR_SUPERSCRIPTS_SUBSCRIPTS         (1L <<  0) /* U+2070-U+209F */\n  /* Bit 33   Currency Symbols */\n#define TT_UCR_CURRENCY_SYMBOLS                (1L <<  1) /* U+20A0-U+20CF */\n  /* Bit 34   Combining Diacritical Marks For Symbols */\n#define TT_UCR_COMBINING_DIACRITICAL_MARKS_SYMB \\\n                                               (1L <<  2) /* U+20D0-U+20FF */\n  /* Bit 35   Letterlike Symbols */\n#define TT_UCR_LETTERLIKE_SYMBOLS              (1L <<  3) /* U+2100-U+214F */\n  /* Bit 36   Number Forms */\n#define TT_UCR_NUMBER_FORMS                    (1L <<  4) /* U+2150-U+218F */\n  /* Bit 37   Arrows                           */\n  /*          Supplemental Arrows-A            */\n  /*          Supplemental Arrows-B            */\n  /*          Miscellaneous Symbols and Arrows */\n#define TT_UCR_ARROWS                          (1L <<  5) /* U+2190-U+21FF */\n                                                          /* U+27F0-U+27FF */\n                                                          /* U+2900-U+297F */\n                                                          /* U+2B00-U+2BFF */\n  /* Bit 38   Mathematical Operators               */\n  /*          Supplemental Mathematical Operators  */\n  /*          Miscellaneous Mathematical Symbols-A */\n  /*          Miscellaneous Mathematical Symbols-B */\n#define TT_UCR_MATHEMATICAL_OPERATORS          (1L <<  6) /* U+2200-U+22FF */\n                                                          /* U+2A00-U+2AFF */\n                                                          /* U+27C0-U+27EF */\n                                                          /* U+2980-U+29FF */\n  /* Bit 39 Miscellaneous Technical */\n#define TT_UCR_MISCELLANEOUS_TECHNICAL         (1L <<  7) /* U+2300-U+23FF */\n  /* Bit 40   Control Pictures */\n#define TT_UCR_CONTROL_PICTURES                (1L <<  8) /* U+2400-U+243F */\n  /* Bit 41   Optical Character Recognition */\n#define TT_UCR_OCR                             (1L <<  9) /* U+2440-U+245F */\n  /* Bit 42   Enclosed Alphanumerics */\n#define TT_UCR_ENCLOSED_ALPHANUMERICS          (1L << 10) /* U+2460-U+24FF */\n  /* Bit 43   Box Drawing */\n#define TT_UCR_BOX_DRAWING                     (1L << 11) /* U+2500-U+257F */\n  /* Bit 44   Block Elements */\n#define TT_UCR_BLOCK_ELEMENTS                  (1L << 12) /* U+2580-U+259F */\n  /* Bit 45   Geometric Shapes */\n#define TT_UCR_GEOMETRIC_SHAPES                (1L << 13) /* U+25A0-U+25FF */\n  /* Bit 46   Miscellaneous Symbols */\n#define TT_UCR_MISCELLANEOUS_SYMBOLS           (1L << 14) /* U+2600-U+26FF */\n  /* Bit 47   Dingbats */\n#define TT_UCR_DINGBATS                        (1L << 15) /* U+2700-U+27BF */\n  /* Bit 48   CJK Symbols and Punctuation */\n#define TT_UCR_CJK_SYMBOLS                     (1L << 16) /* U+3000-U+303F */\n  /* Bit 49   Hiragana */\n#define TT_UCR_HIRAGANA                        (1L << 17) /* U+3040-U+309F */\n  /* Bit 50   Katakana                     */\n  /*          Katakana Phonetic Extensions */\n#define TT_UCR_KATAKANA                        (1L << 18) /* U+30A0-U+30FF */\n                                                          /* U+31F0-U+31FF */\n  /* Bit 51   Bopomofo          */\n  /*          Bopomofo Extended */\n#define TT_UCR_BOPOMOFO                        (1L << 19) /* U+3100-U+312F */\n                                                          /* U+31A0-U+31BF */\n  /* Bit 52   Hangul Compatibility Jamo */\n#define TT_UCR_HANGUL_COMPATIBILITY_JAMO       (1L << 20) /* U+3130-U+318F */\n  /* Bit 53   Phags-Pa */\n#define TT_UCR_CJK_MISC                        (1L << 21) /* U+A840-U+A87F */\n#define TT_UCR_KANBUN  TT_UCR_CJK_MISC /* deprecated */\n#define TT_UCR_PHAGSPA\n  /* Bit 54   Enclosed CJK Letters and Months */\n#define TT_UCR_ENCLOSED_CJK_LETTERS_MONTHS     (1L << 22) /* U+3200-U+32FF */\n  /* Bit 55   CJK Compatibility */\n#define TT_UCR_CJK_COMPATIBILITY               (1L << 23) /* U+3300-U+33FF */\n  /* Bit 56   Hangul Syllables */\n#define TT_UCR_HANGUL                          (1L << 24) /* U+AC00-U+D7A3 */\n  /* Bit 57   High Surrogates              */\n  /*          High Private Use Surrogates  */\n  /*          Low Surrogates               */\n\n  /* According to OpenType specs v.1.3+,   */\n  /* setting bit 57 implies that there is  */\n  /* at least one codepoint beyond the     */\n  /* Basic Multilingual Plane that is      */\n  /* supported by this font.  So it really */\n  /* means >= U+10000.                     */\n#define TT_UCR_SURROGATES                      (1L << 25) /* U+D800-U+DB7F */\n                                                          /* U+DB80-U+DBFF */\n                                                          /* U+DC00-U+DFFF */\n#define TT_UCR_NON_PLANE_0  TT_UCR_SURROGATES\n  /* Bit 58  Phoenician */\n#define TT_UCR_PHOENICIAN                      (1L << 26) /*U+10900-U+1091F*/\n  /* Bit 59   CJK Unified Ideographs             */\n  /*          CJK Radicals Supplement            */\n  /*          Kangxi Radicals                    */\n  /*          Ideographic Description Characters */\n  /*          CJK Unified Ideographs Extension A */\n  /*          CJK Unified Ideographs Extension B */\n  /*          Kanbun                             */\n#define TT_UCR_CJK_UNIFIED_IDEOGRAPHS          (1L << 27) /* U+4E00-U+9FFF */\n                                                          /* U+2E80-U+2EFF */\n                                                          /* U+2F00-U+2FDF */\n                                                          /* U+2FF0-U+2FFF */\n                                                          /* U+3400-U+4DB5 */\n                                                          /*U+20000-U+2A6DF*/\n                                                          /* U+3190-U+319F */\n  /* Bit 60   Private Use */\n#define TT_UCR_PRIVATE_USE                     (1L << 28) /* U+E000-U+F8FF */\n  /* Bit 61   CJK Strokes                             */\n  /*          CJK Compatibility Ideographs            */\n  /*          CJK Compatibility Ideographs Supplement */\n#define TT_UCR_CJK_COMPATIBILITY_IDEOGRAPHS    (1L << 29) /* U+31C0-U+31EF */\n                                                          /* U+F900-U+FAFF */\n                                                          /*U+2F800-U+2FA1F*/\n  /* Bit 62   Alphabetic Presentation Forms */\n#define TT_UCR_ALPHABETIC_PRESENTATION_FORMS   (1L << 30) /* U+FB00-U+FB4F */\n  /* Bit 63   Arabic Presentation Forms-A */\n#define TT_UCR_ARABIC_PRESENTATION_FORMS_A     (1L << 31) /* U+FB50-U+FDFF */\n\n  /* ulUnicodeRange3 */\n  /* --------------- */\n\n  /* Bit 64   Combining Half Marks */\n#define TT_UCR_COMBINING_HALF_MARKS            (1L <<  0) /* U+FE20-U+FE2F */\n  /* Bit 65   Vertical forms          */\n  /*          CJK Compatibility Forms */\n#define TT_UCR_CJK_COMPATIBILITY_FORMS         (1L <<  1) /* U+FE10-U+FE1F */\n                                                          /* U+FE30-U+FE4F */\n  /* Bit 66   Small Form Variants */\n#define TT_UCR_SMALL_FORM_VARIANTS             (1L <<  2) /* U+FE50-U+FE6F */\n  /* Bit 67   Arabic Presentation Forms-B */\n#define TT_UCR_ARABIC_PRESENTATION_FORMS_B     (1L <<  3) /* U+FE70-U+FEFE */\n  /* Bit 68   Halfwidth and Fullwidth Forms */\n#define TT_UCR_HALFWIDTH_FULLWIDTH_FORMS       (1L <<  4) /* U+FF00-U+FFEF */\n  /* Bit 69   Specials */\n#define TT_UCR_SPECIALS                        (1L <<  5) /* U+FFF0-U+FFFD */\n  /* Bit 70   Tibetan */\n#define TT_UCR_TIBETAN                         (1L <<  6) /* U+0F00-U+0FFF */\n  /* Bit 71   Syriac */\n#define TT_UCR_SYRIAC                          (1L <<  7) /* U+0700-U+074F */\n  /* Bit 72   Thaana */\n#define TT_UCR_THAANA                          (1L <<  8) /* U+0780-U+07BF */\n  /* Bit 73   Sinhala */\n#define TT_UCR_SINHALA                         (1L <<  9) /* U+0D80-U+0DFF */\n  /* Bit 74   Myanmar */\n#define TT_UCR_MYANMAR                         (1L << 10) /* U+1000-U+109F */\n  /* Bit 75   Ethiopic            */\n  /*          Ethiopic Supplement */\n  /*          Ethiopic Extended   */\n#define TT_UCR_ETHIOPIC                        (1L << 11) /* U+1200-U+137F */\n                                                          /* U+1380-U+139F */\n                                                          /* U+2D80-U+2DDF */\n  /* Bit 76   Cherokee */\n#define TT_UCR_CHEROKEE                        (1L << 12) /* U+13A0-U+13FF */\n  /* Bit 77   Unified Canadian Aboriginal Syllabics */\n#define TT_UCR_CANADIAN_ABORIGINAL_SYLLABICS   (1L << 13) /* U+1400-U+167F */\n  /* Bit 78   Ogham */\n#define TT_UCR_OGHAM                           (1L << 14) /* U+1680-U+169F */\n  /* Bit 79   Runic */\n#define TT_UCR_RUNIC                           (1L << 15) /* U+16A0-U+16FF */\n  /* Bit 80   Khmer         */\n  /*          Khmer Symbols */\n#define TT_UCR_KHMER                           (1L << 16) /* U+1780-U+17FF */\n                                                          /* U+19E0-U+19FF */\n  /* Bit 81   Mongolian */\n#define TT_UCR_MONGOLIAN                       (1L << 17) /* U+1800-U+18AF */\n  /* Bit 82   Braille Patterns */\n#define TT_UCR_BRAILLE                         (1L << 18) /* U+2800-U+28FF */\n  /* Bit 83   Yi Syllables */\n  /*          Yi Radicals  */\n#define TT_UCR_YI                              (1L << 19) /* U+A000-U+A48F */\n                                                          /* U+A490-U+A4CF */\n  /* Bit 84   Tagalog  */\n  /*          Hanunoo  */\n  /*          Buhid    */\n  /*          Tagbanwa */\n#define TT_UCR_PHILIPPINE                      (1L << 20) /* U+1700-U+171F */\n                                                          /* U+1720-U+173F */\n                                                          /* U+1740-U+175F */\n                                                          /* U+1760-U+177F */\n  /* Bit 85   Old Italic */\n#define TT_UCR_OLD_ITALIC                      (1L << 21) /*U+10300-U+1032F*/\n  /* Bit 86   Gothic */\n#define TT_UCR_GOTHIC                          (1L << 22) /*U+10330-U+1034F*/\n  /* Bit 87   Deseret */\n#define TT_UCR_DESERET                         (1L << 23) /*U+10400-U+1044F*/\n  /* Bit 88   Byzantine Musical Symbols      */\n  /*          Musical Symbols                */\n  /*          Ancient Greek Musical Notation */\n#define TT_UCR_MUSICAL_SYMBOLS                 (1L << 24) /*U+1D000-U+1D0FF*/\n                                                          /*U+1D100-U+1D1FF*/\n                                                          /*U+1D200-U+1D24F*/\n  /* Bit 89   Mathematical Alphanumeric Symbols */\n#define TT_UCR_MATH_ALPHANUMERIC_SYMBOLS       (1L << 25) /*U+1D400-U+1D7FF*/\n  /* Bit 90   Private Use (plane 15) */\n  /*          Private Use (plane 16) */\n#define TT_UCR_PRIVATE_USE_SUPPLEMENTARY       (1L << 26) /*U+F0000-U+FFFFD*/\n                                                        /*U+100000-U+10FFFD*/\n  /* Bit 91   Variation Selectors            */\n  /*          Variation Selectors Supplement */\n#define TT_UCR_VARIATION_SELECTORS             (1L << 27) /* U+FE00-U+FE0F */\n                                                          /*U+E0100-U+E01EF*/\n  /* Bit 92   Tags */\n#define TT_UCR_TAGS                            (1L << 28) /*U+E0000-U+E007F*/\n  /* Bit 93   Limbu */\n#define TT_UCR_LIMBU                           (1L << 29) /* U+1900-U+194F */\n  /* Bit 94   Tai Le */\n#define TT_UCR_TAI_LE                          (1L << 30) /* U+1950-U+197F */\n  /* Bit 95   New Tai Lue */\n#define TT_UCR_NEW_TAI_LUE                     (1L << 31) /* U+1980-U+19DF */\n\n  /* ulUnicodeRange4 */\n  /* --------------- */\n\n  /* Bit 96   Buginese */\n#define TT_UCR_BUGINESE                        (1L <<  0) /* U+1A00-U+1A1F */\n  /* Bit 97   Glagolitic */\n#define TT_UCR_GLAGOLITIC                      (1L <<  1) /* U+2C00-U+2C5F */\n  /* Bit 98   Tifinagh */\n#define TT_UCR_TIFINAGH                        (1L <<  2) /* U+2D30-U+2D7F */\n  /* Bit 99   Yijing Hexagram Symbols */\n#define TT_UCR_YIJING                          (1L <<  3) /* U+4DC0-U+4DFF */\n  /* Bit 100  Syloti Nagri */\n#define TT_UCR_SYLOTI_NAGRI                    (1L <<  4) /* U+A800-U+A82F */\n  /* Bit 101  Linear B Syllabary */\n  /*          Linear B Ideograms */\n  /*          Aegean Numbers     */\n#define TT_UCR_LINEAR_B                        (1L <<  5) /*U+10000-U+1007F*/\n                                                          /*U+10080-U+100FF*/\n                                                          /*U+10100-U+1013F*/\n  /* Bit 102  Ancient Greek Numbers */\n#define TT_UCR_ANCIENT_GREEK_NUMBERS           (1L <<  6) /*U+10140-U+1018F*/\n  /* Bit 103  Ugaritic */\n#define TT_UCR_UGARITIC                        (1L <<  7) /*U+10380-U+1039F*/\n  /* Bit 104  Old Persian */\n#define TT_UCR_OLD_PERSIAN                     (1L <<  8) /*U+103A0-U+103DF*/\n  /* Bit 105  Shavian */\n#define TT_UCR_SHAVIAN                         (1L <<  9) /*U+10450-U+1047F*/\n  /* Bit 106  Osmanya */\n#define TT_UCR_OSMANYA                         (1L << 10) /*U+10480-U+104AF*/\n  /* Bit 107  Cypriot Syllabary */\n#define TT_UCR_CYPRIOT_SYLLABARY               (1L << 11) /*U+10800-U+1083F*/\n  /* Bit 108  Kharoshthi */\n#define TT_UCR_KHAROSHTHI                      (1L << 12) /*U+10A00-U+10A5F*/\n  /* Bit 109  Tai Xuan Jing Symbols */\n#define TT_UCR_TAI_XUAN_JING                   (1L << 13) /*U+1D300-U+1D35F*/\n  /* Bit 110  Cuneiform                         */\n  /*          Cuneiform Numbers and Punctuation */\n#define TT_UCR_CUNEIFORM                       (1L << 14) /*U+12000-U+123FF*/\n                                                          /*U+12400-U+1247F*/\n  /* Bit 111  Counting Rod Numerals */\n#define TT_UCR_COUNTING_ROD_NUMERALS           (1L << 15) /*U+1D360-U+1D37F*/\n  /* Bit 112  Sundanese */\n#define TT_UCR_SUNDANESE                       (1L << 16) /* U+1B80-U+1BBF */\n  /* Bit 113  Lepcha */\n#define TT_UCR_LEPCHA                          (1L << 17) /* U+1C00-U+1C4F */\n  /* Bit 114  Ol Chiki */\n#define TT_UCR_OL_CHIKI                        (1L << 18) /* U+1C50-U+1C7F */\n  /* Bit 115  Saurashtra */\n#define TT_UCR_SAURASHTRA                      (1L << 19) /* U+A880-U+A8DF */\n  /* Bit 116  Kayah Li */\n#define TT_UCR_KAYAH_LI                        (1L << 20) /* U+A900-U+A92F */\n  /* Bit 117  Rejang */\n#define TT_UCR_REJANG                          (1L << 21) /* U+A930-U+A95F */\n  /* Bit 118  Cham */\n#define TT_UCR_CHAM                            (1L << 22) /* U+AA00-U+AA5F */\n  /* Bit 119  Ancient Symbols */\n#define TT_UCR_ANCIENT_SYMBOLS                 (1L << 23) /*U+10190-U+101CF*/\n  /* Bit 120  Phaistos Disc */\n#define TT_UCR_PHAISTOS_DISC                   (1L << 24) /*U+101D0-U+101FF*/\n  /* Bit 121  Carian */\n  /*          Lycian */\n  /*          Lydian */\n#define TT_UCR_OLD_ANATOLIAN                   (1L << 25) /*U+102A0-U+102DF*/\n                                                          /*U+10280-U+1029F*/\n                                                          /*U+10920-U+1093F*/\n  /* Bit 122  Domino Tiles  */\n  /*          Mahjong Tiles */\n#define TT_UCR_GAME_TILES                      (1L << 26) /*U+1F030-U+1F09F*/\n                                                          /*U+1F000-U+1F02F*/\n  /* Bit 123-127 Reserved for process-internal usage */\n\n  /* */\n\n  /* for backward compatibility with older FreeType versions */\n#define TT_UCR_ARABIC_PRESENTATION_A         \\\n          TT_UCR_ARABIC_PRESENTATION_FORMS_A\n#define TT_UCR_ARABIC_PRESENTATION_B         \\\n          TT_UCR_ARABIC_PRESENTATION_FORMS_B\n\n#define TT_UCR_COMBINING_DIACRITICS          \\\n          TT_UCR_COMBINING_DIACRITICAL_MARKS\n#define TT_UCR_COMBINING_DIACRITICS_SYMB          \\\n          TT_UCR_COMBINING_DIACRITICAL_MARKS_SYMB\n\n\nFT_END_HEADER\n\n#endif /* TTNAMEID_H_ */\n\n\n/* END */\n"
  },
  {
    "path": "thirdparty/freetype/include/freetype2/freetype/tttables.h",
    "content": "/****************************************************************************\n *\n * tttables.h\n *\n *   Basic SFNT/TrueType tables definitions and interface\n *   (specification only).\n *\n * Copyright (C) 1996-2021 by\n * David Turner, Robert Wilhelm, and Werner Lemberg.\n *\n * This file is part of the FreeType project, and may only be used,\n * modified, and distributed under the terms of the FreeType project\n * license, LICENSE.TXT.  By continuing to use, modify, or distribute\n * this file you indicate that you have read the license and\n * understand and accept it fully.\n *\n */\n\n\n#ifndef TTTABLES_H_\n#define TTTABLES_H_\n\n\n#include <freetype/freetype.h>\n\n#ifdef FREETYPE_H\n#error \"freetype.h of FreeType 1 has been loaded!\"\n#error \"Please fix the directory search order for header files\"\n#error \"so that freetype.h of FreeType 2 is found first.\"\n#endif\n\n\nFT_BEGIN_HEADER\n\n  /**************************************************************************\n   *\n   * @section:\n   *   truetype_tables\n   *\n   * @title:\n   *   TrueType Tables\n   *\n   * @abstract:\n   *   TrueType-specific table types and functions.\n   *\n   * @description:\n   *   This section contains definitions of some basic tables specific to\n   *   TrueType and OpenType as well as some routines used to access and\n   *   process them.\n   *\n   * @order:\n   *   TT_Header\n   *   TT_HoriHeader\n   *   TT_VertHeader\n   *   TT_OS2\n   *   TT_Postscript\n   *   TT_PCLT\n   *   TT_MaxProfile\n   *\n   *   FT_Sfnt_Tag\n   *   FT_Get_Sfnt_Table\n   *   FT_Load_Sfnt_Table\n   *   FT_Sfnt_Table_Info\n   *\n   *   FT_Get_CMap_Language_ID\n   *   FT_Get_CMap_Format\n   *\n   *   FT_PARAM_TAG_UNPATENTED_HINTING\n   *\n   */\n\n\n  /**************************************************************************\n   *\n   * @struct:\n   *   TT_Header\n   *\n   * @description:\n   *   A structure to model a TrueType font header table.  All fields follow\n   *   the OpenType specification.  The 64-bit timestamps are stored in\n   *   two-element arrays `Created` and `Modified`, first the upper then\n   *   the lower 32~bits.\n   */\n  typedef struct  TT_Header_\n  {\n    FT_Fixed   Table_Version;\n    FT_Fixed   Font_Revision;\n\n    FT_Long    CheckSum_Adjust;\n    FT_Long    Magic_Number;\n\n    FT_UShort  Flags;\n    FT_UShort  Units_Per_EM;\n\n    FT_ULong   Created [2];\n    FT_ULong   Modified[2];\n\n    FT_Short   xMin;\n    FT_Short   yMin;\n    FT_Short   xMax;\n    FT_Short   yMax;\n\n    FT_UShort  Mac_Style;\n    FT_UShort  Lowest_Rec_PPEM;\n\n    FT_Short   Font_Direction;\n    FT_Short   Index_To_Loc_Format;\n    FT_Short   Glyph_Data_Format;\n\n  } TT_Header;\n\n\n  /**************************************************************************\n   *\n   * @struct:\n   *   TT_HoriHeader\n   *\n   * @description:\n   *   A structure to model a TrueType horizontal header, the 'hhea' table,\n   *   as well as the corresponding horizontal metrics table, 'hmtx'.\n   *\n   * @fields:\n   *   Version ::\n   *     The table version.\n   *\n   *   Ascender ::\n   *     The font's ascender, i.e., the distance from the baseline to the\n   *     top-most of all glyph points found in the font.\n   *\n   *     This value is invalid in many fonts, as it is usually set by the\n   *     font designer, and often reflects only a portion of the glyphs found\n   *     in the font (maybe ASCII).\n   *\n   *     You should use the `sTypoAscender` field of the 'OS/2' table instead\n   *     if you want the correct one.\n   *\n   *   Descender ::\n   *     The font's descender, i.e., the distance from the baseline to the\n   *     bottom-most of all glyph points found in the font.  It is negative.\n   *\n   *     This value is invalid in many fonts, as it is usually set by the\n   *     font designer, and often reflects only a portion of the glyphs found\n   *     in the font (maybe ASCII).\n   *\n   *     You should use the `sTypoDescender` field of the 'OS/2' table\n   *     instead if you want the correct one.\n   *\n   *   Line_Gap ::\n   *     The font's line gap, i.e., the distance to add to the ascender and\n   *     descender to get the BTB, i.e., the baseline-to-baseline distance\n   *     for the font.\n   *\n   *   advance_Width_Max ::\n   *     This field is the maximum of all advance widths found in the font.\n   *     It can be used to compute the maximum width of an arbitrary string\n   *     of text.\n   *\n   *   min_Left_Side_Bearing ::\n   *     The minimum left side bearing of all glyphs within the font.\n   *\n   *   min_Right_Side_Bearing ::\n   *     The minimum right side bearing of all glyphs within the font.\n   *\n   *   xMax_Extent ::\n   *     The maximum horizontal extent (i.e., the 'width' of a glyph's\n   *     bounding box) for all glyphs in the font.\n   *\n   *   caret_Slope_Rise ::\n   *     The rise coefficient of the cursor's slope of the cursor\n   *     (slope=rise/run).\n   *\n   *   caret_Slope_Run ::\n   *     The run coefficient of the cursor's slope.\n   *\n   *   caret_Offset ::\n   *     The cursor's offset for slanted fonts.\n   *\n   *   Reserved ::\n   *     8~reserved bytes.\n   *\n   *   metric_Data_Format ::\n   *     Always~0.\n   *\n   *   number_Of_HMetrics ::\n   *     Number of HMetrics entries in the 'hmtx' table -- this value can be\n   *     smaller than the total number of glyphs in the font.\n   *\n   *   long_metrics ::\n   *     A pointer into the 'hmtx' table.\n   *\n   *   short_metrics ::\n   *     A pointer into the 'hmtx' table.\n   *\n   * @note:\n   *   For an OpenType variation font, the values of the following fields can\n   *   change after a call to @FT_Set_Var_Design_Coordinates (and friends) if\n   *   the font contains an 'MVAR' table: `caret_Slope_Rise`,\n   *   `caret_Slope_Run`, and `caret_Offset`.\n   */\n  typedef struct  TT_HoriHeader_\n  {\n    FT_Fixed   Version;\n    FT_Short   Ascender;\n    FT_Short   Descender;\n    FT_Short   Line_Gap;\n\n    FT_UShort  advance_Width_Max;      /* advance width maximum */\n\n    FT_Short   min_Left_Side_Bearing;  /* minimum left-sb       */\n    FT_Short   min_Right_Side_Bearing; /* minimum right-sb      */\n    FT_Short   xMax_Extent;            /* xmax extents          */\n    FT_Short   caret_Slope_Rise;\n    FT_Short   caret_Slope_Run;\n    FT_Short   caret_Offset;\n\n    FT_Short   Reserved[4];\n\n    FT_Short   metric_Data_Format;\n    FT_UShort  number_Of_HMetrics;\n\n    /* The following fields are not defined by the OpenType specification */\n    /* but they are used to connect the metrics header to the relevant    */\n    /* 'hmtx' table.                                                      */\n\n    void*      long_metrics;\n    void*      short_metrics;\n\n  } TT_HoriHeader;\n\n\n  /**************************************************************************\n   *\n   * @struct:\n   *   TT_VertHeader\n   *\n   * @description:\n   *   A structure used to model a TrueType vertical header, the 'vhea'\n   *   table, as well as the corresponding vertical metrics table, 'vmtx'.\n   *\n   * @fields:\n   *   Version ::\n   *     The table version.\n   *\n   *   Ascender ::\n   *     The font's ascender, i.e., the distance from the baseline to the\n   *     top-most of all glyph points found in the font.\n   *\n   *     This value is invalid in many fonts, as it is usually set by the\n   *     font designer, and often reflects only a portion of the glyphs found\n   *     in the font (maybe ASCII).\n   *\n   *     You should use the `sTypoAscender` field of the 'OS/2' table instead\n   *     if you want the correct one.\n   *\n   *   Descender ::\n   *     The font's descender, i.e., the distance from the baseline to the\n   *     bottom-most of all glyph points found in the font.  It is negative.\n   *\n   *     This value is invalid in many fonts, as it is usually set by the\n   *     font designer, and often reflects only a portion of the glyphs found\n   *     in the font (maybe ASCII).\n   *\n   *     You should use the `sTypoDescender` field of the 'OS/2' table\n   *     instead if you want the correct one.\n   *\n   *   Line_Gap ::\n   *     The font's line gap, i.e., the distance to add to the ascender and\n   *     descender to get the BTB, i.e., the baseline-to-baseline distance\n   *     for the font.\n   *\n   *   advance_Height_Max ::\n   *     This field is the maximum of all advance heights found in the font.\n   *     It can be used to compute the maximum height of an arbitrary string\n   *     of text.\n   *\n   *   min_Top_Side_Bearing ::\n   *     The minimum top side bearing of all glyphs within the font.\n   *\n   *   min_Bottom_Side_Bearing ::\n   *     The minimum bottom side bearing of all glyphs within the font.\n   *\n   *   yMax_Extent ::\n   *     The maximum vertical extent (i.e., the 'height' of a glyph's\n   *     bounding box) for all glyphs in the font.\n   *\n   *   caret_Slope_Rise ::\n   *     The rise coefficient of the cursor's slope of the cursor\n   *     (slope=rise/run).\n   *\n   *   caret_Slope_Run ::\n   *     The run coefficient of the cursor's slope.\n   *\n   *   caret_Offset ::\n   *     The cursor's offset for slanted fonts.\n   *\n   *   Reserved ::\n   *     8~reserved bytes.\n   *\n   *   metric_Data_Format ::\n   *     Always~0.\n   *\n   *   number_Of_VMetrics ::\n   *     Number of VMetrics entries in the 'vmtx' table -- this value can be\n   *     smaller than the total number of glyphs in the font.\n   *\n   *   long_metrics ::\n   *     A pointer into the 'vmtx' table.\n   *\n   *   short_metrics ::\n   *     A pointer into the 'vmtx' table.\n   *\n   * @note:\n   *   For an OpenType variation font, the values of the following fields can\n   *   change after a call to @FT_Set_Var_Design_Coordinates (and friends) if\n   *   the font contains an 'MVAR' table: `Ascender`, `Descender`,\n   *   `Line_Gap`, `caret_Slope_Rise`, `caret_Slope_Run`, and `caret_Offset`.\n   */\n  typedef struct  TT_VertHeader_\n  {\n    FT_Fixed   Version;\n    FT_Short   Ascender;\n    FT_Short   Descender;\n    FT_Short   Line_Gap;\n\n    FT_UShort  advance_Height_Max;      /* advance height maximum */\n\n    FT_Short   min_Top_Side_Bearing;    /* minimum top-sb          */\n    FT_Short   min_Bottom_Side_Bearing; /* minimum bottom-sb       */\n    FT_Short   yMax_Extent;             /* ymax extents            */\n    FT_Short   caret_Slope_Rise;\n    FT_Short   caret_Slope_Run;\n    FT_Short   caret_Offset;\n\n    FT_Short   Reserved[4];\n\n    FT_Short   metric_Data_Format;\n    FT_UShort  number_Of_VMetrics;\n\n    /* The following fields are not defined by the OpenType specification */\n    /* but they are used to connect the metrics header to the relevant    */\n    /* 'vmtx' table.                                                      */\n\n    void*      long_metrics;\n    void*      short_metrics;\n\n  } TT_VertHeader;\n\n\n  /**************************************************************************\n   *\n   * @struct:\n   *   TT_OS2\n   *\n   * @description:\n   *   A structure to model a TrueType 'OS/2' table.  All fields comply to\n   *   the OpenType specification.\n   *\n   *   Note that we now support old Mac fonts that do not include an 'OS/2'\n   *   table.  In this case, the `version` field is always set to 0xFFFF.\n   *\n   * @note:\n   *   For an OpenType variation font, the values of the following fields can\n   *   change after a call to @FT_Set_Var_Design_Coordinates (and friends) if\n   *   the font contains an 'MVAR' table: `sCapHeight`, `sTypoAscender`,\n   *   `sTypoDescender`, `sTypoLineGap`, `sxHeight`, `usWinAscent`,\n   *   `usWinDescent`, `yStrikeoutPosition`, `yStrikeoutSize`,\n   *   `ySubscriptXOffset`, `ySubScriptXSize`, `ySubscriptYOffset`,\n   *   `ySubscriptYSize`, `ySuperscriptXOffset`, `ySuperscriptXSize`,\n   *   `ySuperscriptYOffset`, and `ySuperscriptYSize`.\n   *\n   *   Possible values for bits in the `ulUnicodeRangeX` fields are given by\n   *   the @TT_UCR_XXX macros.\n   */\n\n  typedef struct  TT_OS2_\n  {\n    FT_UShort  version;                /* 0x0001 - more or 0xFFFF */\n    FT_Short   xAvgCharWidth;\n    FT_UShort  usWeightClass;\n    FT_UShort  usWidthClass;\n    FT_UShort  fsType;\n    FT_Short   ySubscriptXSize;\n    FT_Short   ySubscriptYSize;\n    FT_Short   ySubscriptXOffset;\n    FT_Short   ySubscriptYOffset;\n    FT_Short   ySuperscriptXSize;\n    FT_Short   ySuperscriptYSize;\n    FT_Short   ySuperscriptXOffset;\n    FT_Short   ySuperscriptYOffset;\n    FT_Short   yStrikeoutSize;\n    FT_Short   yStrikeoutPosition;\n    FT_Short   sFamilyClass;\n\n    FT_Byte    panose[10];\n\n    FT_ULong   ulUnicodeRange1;        /* Bits 0-31   */\n    FT_ULong   ulUnicodeRange2;        /* Bits 32-63  */\n    FT_ULong   ulUnicodeRange3;        /* Bits 64-95  */\n    FT_ULong   ulUnicodeRange4;        /* Bits 96-127 */\n\n    FT_Char    achVendID[4];\n\n    FT_UShort  fsSelection;\n    FT_UShort  usFirstCharIndex;\n    FT_UShort  usLastCharIndex;\n    FT_Short   sTypoAscender;\n    FT_Short   sTypoDescender;\n    FT_Short   sTypoLineGap;\n    FT_UShort  usWinAscent;\n    FT_UShort  usWinDescent;\n\n    /* only version 1 and higher: */\n\n    FT_ULong   ulCodePageRange1;       /* Bits 0-31   */\n    FT_ULong   ulCodePageRange2;       /* Bits 32-63  */\n\n    /* only version 2 and higher: */\n\n    FT_Short   sxHeight;\n    FT_Short   sCapHeight;\n    FT_UShort  usDefaultChar;\n    FT_UShort  usBreakChar;\n    FT_UShort  usMaxContext;\n\n    /* only version 5 and higher: */\n\n    FT_UShort  usLowerOpticalPointSize;       /* in twips (1/20th points) */\n    FT_UShort  usUpperOpticalPointSize;       /* in twips (1/20th points) */\n\n  } TT_OS2;\n\n\n  /**************************************************************************\n   *\n   * @struct:\n   *   TT_Postscript\n   *\n   * @description:\n   *   A structure to model a TrueType 'post' table.  All fields comply to\n   *   the OpenType specification.  This structure does not reference a\n   *   font's PostScript glyph names; use @FT_Get_Glyph_Name to retrieve\n   *   them.\n   *\n   * @note:\n   *   For an OpenType variation font, the values of the following fields can\n   *   change after a call to @FT_Set_Var_Design_Coordinates (and friends) if\n   *   the font contains an 'MVAR' table: `underlinePosition` and\n   *   `underlineThickness`.\n   */\n  typedef struct  TT_Postscript_\n  {\n    FT_Fixed  FormatType;\n    FT_Fixed  italicAngle;\n    FT_Short  underlinePosition;\n    FT_Short  underlineThickness;\n    FT_ULong  isFixedPitch;\n    FT_ULong  minMemType42;\n    FT_ULong  maxMemType42;\n    FT_ULong  minMemType1;\n    FT_ULong  maxMemType1;\n\n    /* Glyph names follow in the 'post' table, but we don't */\n    /* load them by default.                                */\n\n  } TT_Postscript;\n\n\n  /**************************************************************************\n   *\n   * @struct:\n   *   TT_PCLT\n   *\n   * @description:\n   *   A structure to model a TrueType 'PCLT' table.  All fields comply to\n   *   the OpenType specification.\n   */\n  typedef struct  TT_PCLT_\n  {\n    FT_Fixed   Version;\n    FT_ULong   FontNumber;\n    FT_UShort  Pitch;\n    FT_UShort  xHeight;\n    FT_UShort  Style;\n    FT_UShort  TypeFamily;\n    FT_UShort  CapHeight;\n    FT_UShort  SymbolSet;\n    FT_Char    TypeFace[16];\n    FT_Char    CharacterComplement[8];\n    FT_Char    FileName[6];\n    FT_Char    StrokeWeight;\n    FT_Char    WidthType;\n    FT_Byte    SerifStyle;\n    FT_Byte    Reserved;\n\n  } TT_PCLT;\n\n\n  /**************************************************************************\n   *\n   * @struct:\n   *   TT_MaxProfile\n   *\n   * @description:\n   *   The maximum profile ('maxp') table contains many max values, which can\n   *   be used to pre-allocate arrays for speeding up glyph loading and\n   *   hinting.\n   *\n   * @fields:\n   *   version ::\n   *     The version number.\n   *\n   *   numGlyphs ::\n   *     The number of glyphs in this TrueType font.\n   *\n   *   maxPoints ::\n   *     The maximum number of points in a non-composite TrueType glyph.  See\n   *     also `maxCompositePoints`.\n   *\n   *   maxContours ::\n   *     The maximum number of contours in a non-composite TrueType glyph.\n   *     See also `maxCompositeContours`.\n   *\n   *   maxCompositePoints ::\n   *     The maximum number of points in a composite TrueType glyph.  See\n   *     also `maxPoints`.\n   *\n   *   maxCompositeContours ::\n   *     The maximum number of contours in a composite TrueType glyph.  See\n   *     also `maxContours`.\n   *\n   *   maxZones ::\n   *     The maximum number of zones used for glyph hinting.\n   *\n   *   maxTwilightPoints ::\n   *     The maximum number of points in the twilight zone used for glyph\n   *     hinting.\n   *\n   *   maxStorage ::\n   *     The maximum number of elements in the storage area used for glyph\n   *     hinting.\n   *\n   *   maxFunctionDefs ::\n   *     The maximum number of function definitions in the TrueType bytecode\n   *     for this font.\n   *\n   *   maxInstructionDefs ::\n   *     The maximum number of instruction definitions in the TrueType\n   *     bytecode for this font.\n   *\n   *   maxStackElements ::\n   *     The maximum number of stack elements used during bytecode\n   *     interpretation.\n   *\n   *   maxSizeOfInstructions ::\n   *     The maximum number of TrueType opcodes used for glyph hinting.\n   *\n   *   maxComponentElements ::\n   *     The maximum number of simple (i.e., non-composite) glyphs in a\n   *     composite glyph.\n   *\n   *   maxComponentDepth ::\n   *     The maximum nesting depth of composite glyphs.\n   *\n   * @note:\n   *   This structure is only used during font loading.\n   */\n  typedef struct  TT_MaxProfile_\n  {\n    FT_Fixed   version;\n    FT_UShort  numGlyphs;\n    FT_UShort  maxPoints;\n    FT_UShort  maxContours;\n    FT_UShort  maxCompositePoints;\n    FT_UShort  maxCompositeContours;\n    FT_UShort  maxZones;\n    FT_UShort  maxTwilightPoints;\n    FT_UShort  maxStorage;\n    FT_UShort  maxFunctionDefs;\n    FT_UShort  maxInstructionDefs;\n    FT_UShort  maxStackElements;\n    FT_UShort  maxSizeOfInstructions;\n    FT_UShort  maxComponentElements;\n    FT_UShort  maxComponentDepth;\n\n  } TT_MaxProfile;\n\n\n  /**************************************************************************\n   *\n   * @enum:\n   *   FT_Sfnt_Tag\n   *\n   * @description:\n   *   An enumeration to specify indices of SFNT tables loaded and parsed by\n   *   FreeType during initialization of an SFNT font.  Used in the\n   *   @FT_Get_Sfnt_Table API function.\n   *\n   * @values:\n   *   FT_SFNT_HEAD ::\n   *     To access the font's @TT_Header structure.\n   *\n   *   FT_SFNT_MAXP ::\n   *     To access the font's @TT_MaxProfile structure.\n   *\n   *   FT_SFNT_OS2 ::\n   *     To access the font's @TT_OS2 structure.\n   *\n   *   FT_SFNT_HHEA ::\n   *     To access the font's @TT_HoriHeader structure.\n   *\n   *   FT_SFNT_VHEA ::\n   *     To access the font's @TT_VertHeader structure.\n   *\n   *   FT_SFNT_POST ::\n   *     To access the font's @TT_Postscript structure.\n   *\n   *   FT_SFNT_PCLT ::\n   *     To access the font's @TT_PCLT structure.\n   */\n  typedef enum  FT_Sfnt_Tag_\n  {\n    FT_SFNT_HEAD,\n    FT_SFNT_MAXP,\n    FT_SFNT_OS2,\n    FT_SFNT_HHEA,\n    FT_SFNT_VHEA,\n    FT_SFNT_POST,\n    FT_SFNT_PCLT,\n\n    FT_SFNT_MAX\n\n  } FT_Sfnt_Tag;\n\n  /* these constants are deprecated; use the corresponding `FT_Sfnt_Tag` */\n  /* values instead                                                      */\n#define ft_sfnt_head  FT_SFNT_HEAD\n#define ft_sfnt_maxp  FT_SFNT_MAXP\n#define ft_sfnt_os2   FT_SFNT_OS2\n#define ft_sfnt_hhea  FT_SFNT_HHEA\n#define ft_sfnt_vhea  FT_SFNT_VHEA\n#define ft_sfnt_post  FT_SFNT_POST\n#define ft_sfnt_pclt  FT_SFNT_PCLT\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Get_Sfnt_Table\n   *\n   * @description:\n   *   Return a pointer to a given SFNT table stored within a face.\n   *\n   * @input:\n   *   face ::\n   *     A handle to the source.\n   *\n   *   tag ::\n   *     The index of the SFNT table.\n   *\n   * @return:\n   *   A type-less pointer to the table.  This will be `NULL` in case of\n   *   error, or if the corresponding table was not found **OR** loaded from\n   *   the file.\n   *\n   *   Use a typecast according to `tag` to access the structure elements.\n   *\n   * @note:\n   *   The table is owned by the face object and disappears with it.\n   *\n   *   This function is only useful to access SFNT tables that are loaded by\n   *   the sfnt, truetype, and opentype drivers.  See @FT_Sfnt_Tag for a\n   *   list.\n   *\n   * @example:\n   *   Here is an example demonstrating access to the 'vhea' table.\n   *\n   *   ```\n   *     TT_VertHeader*  vert_header;\n   *\n   *\n   *     vert_header =\n   *       (TT_VertHeader*)FT_Get_Sfnt_Table( face, FT_SFNT_VHEA );\n   *   ```\n   */\n  FT_EXPORT( void* )\n  FT_Get_Sfnt_Table( FT_Face      face,\n                     FT_Sfnt_Tag  tag );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Load_Sfnt_Table\n   *\n   * @description:\n   *   Load any SFNT font table into client memory.\n   *\n   * @input:\n   *   face ::\n   *     A handle to the source face.\n   *\n   *   tag ::\n   *     The four-byte tag of the table to load.  Use value~0 if you want to\n   *     access the whole font file.  Otherwise, you can use one of the\n   *     definitions found in the @FT_TRUETYPE_TAGS_H file, or forge a new\n   *     one with @FT_MAKE_TAG.\n   *\n   *   offset ::\n   *     The starting offset in the table (or file if tag~==~0).\n   *\n   * @output:\n   *   buffer ::\n   *     The target buffer address.  The client must ensure that the memory\n   *     array is big enough to hold the data.\n   *\n   * @inout:\n   *   length ::\n   *     If the `length` parameter is `NULL`, try to load the whole table.\n   *     Return an error code if it fails.\n   *\n   *     Else, if `*length` is~0, exit immediately while returning the\n   *     table's (or file) full size in it.\n   *\n   *     Else the number of bytes to read from the table or file, from the\n   *     starting offset.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *   If you need to determine the table's length you should first call this\n   *   function with `*length` set to~0, as in the following example:\n   *\n   *   ```\n   *     FT_ULong  length = 0;\n   *\n   *\n   *     error = FT_Load_Sfnt_Table( face, tag, 0, NULL, &length );\n   *     if ( error ) { ... table does not exist ... }\n   *\n   *     buffer = malloc( length );\n   *     if ( buffer == NULL ) { ... not enough memory ... }\n   *\n   *     error = FT_Load_Sfnt_Table( face, tag, 0, buffer, &length );\n   *     if ( error ) { ... could not load table ... }\n   *   ```\n   *\n   *   Note that structures like @TT_Header or @TT_OS2 can't be used with\n   *   this function; they are limited to @FT_Get_Sfnt_Table.  Reason is that\n   *   those structures depend on the processor architecture, with varying\n   *   size (e.g. 32bit vs. 64bit) or order (big endian vs. little endian).\n   *\n   */\n  FT_EXPORT( FT_Error )\n  FT_Load_Sfnt_Table( FT_Face    face,\n                      FT_ULong   tag,\n                      FT_Long    offset,\n                      FT_Byte*   buffer,\n                      FT_ULong*  length );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Sfnt_Table_Info\n   *\n   * @description:\n   *   Return information on an SFNT table.\n   *\n   * @input:\n   *   face ::\n   *     A handle to the source face.\n   *\n   *   table_index ::\n   *     The index of an SFNT table.  The function returns\n   *     FT_Err_Table_Missing for an invalid value.\n   *\n   * @inout:\n   *   tag ::\n   *     The name tag of the SFNT table.  If the value is `NULL`,\n   *     `table_index` is ignored, and `length` returns the number of SFNT\n   *     tables in the font.\n   *\n   * @output:\n   *   length ::\n   *     The length of the SFNT table (or the number of SFNT tables,\n   *     depending on `tag`).\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *   While parsing fonts, FreeType handles SFNT tables with length zero as\n   *   missing.\n   *\n   */\n  FT_EXPORT( FT_Error )\n  FT_Sfnt_Table_Info( FT_Face    face,\n                      FT_UInt    table_index,\n                      FT_ULong  *tag,\n                      FT_ULong  *length );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Get_CMap_Language_ID\n   *\n   * @description:\n   *   Return cmap language ID as specified in the OpenType standard.\n   *   Definitions of language ID values are in file @FT_TRUETYPE_IDS_H.\n   *\n   * @input:\n   *   charmap ::\n   *     The target charmap.\n   *\n   * @return:\n   *   The language ID of `charmap`.  If `charmap` doesn't belong to an SFNT\n   *   face, just return~0 as the default value.\n   *\n   *   For a format~14 cmap (to access Unicode IVS), the return value is\n   *   0xFFFFFFFF.\n   */\n  FT_EXPORT( FT_ULong )\n  FT_Get_CMap_Language_ID( FT_CharMap  charmap );\n\n\n  /**************************************************************************\n   *\n   * @function:\n   *   FT_Get_CMap_Format\n   *\n   * @description:\n   *   Return the format of an SFNT 'cmap' table.\n   *\n   * @input:\n   *   charmap ::\n   *     The target charmap.\n   *\n   * @return:\n   *   The format of `charmap`.  If `charmap` doesn't belong to an SFNT face,\n   *   return -1.\n   */\n  FT_EXPORT( FT_Long )\n  FT_Get_CMap_Format( FT_CharMap  charmap );\n\n  /* */\n\n\nFT_END_HEADER\n\n#endif /* TTTABLES_H_ */\n\n\n/* END */\n"
  },
  {
    "path": "thirdparty/freetype/include/freetype2/freetype/tttags.h",
    "content": "/****************************************************************************\n *\n * tttags.h\n *\n *   Tags for TrueType and OpenType tables (specification only).\n *\n * Copyright (C) 1996-2021 by\n * David Turner, Robert Wilhelm, and Werner Lemberg.\n *\n * This file is part of the FreeType project, and may only be used,\n * modified, and distributed under the terms of the FreeType project\n * license, LICENSE.TXT.  By continuing to use, modify, or distribute\n * this file you indicate that you have read the license and\n * understand and accept it fully.\n *\n */\n\n\n#ifndef TTAGS_H_\n#define TTAGS_H_\n\n\n#include <freetype/freetype.h>\n\n#ifdef FREETYPE_H\n#error \"freetype.h of FreeType 1 has been loaded!\"\n#error \"Please fix the directory search order for header files\"\n#error \"so that freetype.h of FreeType 2 is found first.\"\n#endif\n\n\nFT_BEGIN_HEADER\n\n\n#define TTAG_avar  FT_MAKE_TAG( 'a', 'v', 'a', 'r' )\n#define TTAG_BASE  FT_MAKE_TAG( 'B', 'A', 'S', 'E' )\n#define TTAG_bdat  FT_MAKE_TAG( 'b', 'd', 'a', 't' )\n#define TTAG_BDF   FT_MAKE_TAG( 'B', 'D', 'F', ' ' )\n#define TTAG_bhed  FT_MAKE_TAG( 'b', 'h', 'e', 'd' )\n#define TTAG_bloc  FT_MAKE_TAG( 'b', 'l', 'o', 'c' )\n#define TTAG_bsln  FT_MAKE_TAG( 'b', 's', 'l', 'n' )\n#define TTAG_CBDT  FT_MAKE_TAG( 'C', 'B', 'D', 'T' )\n#define TTAG_CBLC  FT_MAKE_TAG( 'C', 'B', 'L', 'C' )\n#define TTAG_CFF   FT_MAKE_TAG( 'C', 'F', 'F', ' ' )\n#define TTAG_CFF2  FT_MAKE_TAG( 'C', 'F', 'F', '2' )\n#define TTAG_CID   FT_MAKE_TAG( 'C', 'I', 'D', ' ' )\n#define TTAG_cmap  FT_MAKE_TAG( 'c', 'm', 'a', 'p' )\n#define TTAG_COLR  FT_MAKE_TAG( 'C', 'O', 'L', 'R' )\n#define TTAG_CPAL  FT_MAKE_TAG( 'C', 'P', 'A', 'L' )\n#define TTAG_cvar  FT_MAKE_TAG( 'c', 'v', 'a', 'r' )\n#define TTAG_cvt   FT_MAKE_TAG( 'c', 'v', 't', ' ' )\n#define TTAG_DSIG  FT_MAKE_TAG( 'D', 'S', 'I', 'G' )\n#define TTAG_EBDT  FT_MAKE_TAG( 'E', 'B', 'D', 'T' )\n#define TTAG_EBLC  FT_MAKE_TAG( 'E', 'B', 'L', 'C' )\n#define TTAG_EBSC  FT_MAKE_TAG( 'E', 'B', 'S', 'C' )\n#define TTAG_feat  FT_MAKE_TAG( 'f', 'e', 'a', 't' )\n#define TTAG_FOND  FT_MAKE_TAG( 'F', 'O', 'N', 'D' )\n#define TTAG_fpgm  FT_MAKE_TAG( 'f', 'p', 'g', 'm' )\n#define TTAG_fvar  FT_MAKE_TAG( 'f', 'v', 'a', 'r' )\n#define TTAG_gasp  FT_MAKE_TAG( 'g', 'a', 's', 'p' )\n#define TTAG_GDEF  FT_MAKE_TAG( 'G', 'D', 'E', 'F' )\n#define TTAG_glyf  FT_MAKE_TAG( 'g', 'l', 'y', 'f' )\n#define TTAG_GPOS  FT_MAKE_TAG( 'G', 'P', 'O', 'S' )\n#define TTAG_GSUB  FT_MAKE_TAG( 'G', 'S', 'U', 'B' )\n#define TTAG_gvar  FT_MAKE_TAG( 'g', 'v', 'a', 'r' )\n#define TTAG_HVAR  FT_MAKE_TAG( 'H', 'V', 'A', 'R' )\n#define TTAG_hdmx  FT_MAKE_TAG( 'h', 'd', 'm', 'x' )\n#define TTAG_head  FT_MAKE_TAG( 'h', 'e', 'a', 'd' )\n#define TTAG_hhea  FT_MAKE_TAG( 'h', 'h', 'e', 'a' )\n#define TTAG_hmtx  FT_MAKE_TAG( 'h', 'm', 't', 'x' )\n#define TTAG_JSTF  FT_MAKE_TAG( 'J', 'S', 'T', 'F' )\n#define TTAG_just  FT_MAKE_TAG( 'j', 'u', 's', 't' )\n#define TTAG_kern  FT_MAKE_TAG( 'k', 'e', 'r', 'n' )\n#define TTAG_lcar  FT_MAKE_TAG( 'l', 'c', 'a', 'r' )\n#define TTAG_loca  FT_MAKE_TAG( 'l', 'o', 'c', 'a' )\n#define TTAG_LTSH  FT_MAKE_TAG( 'L', 'T', 'S', 'H' )\n#define TTAG_LWFN  FT_MAKE_TAG( 'L', 'W', 'F', 'N' )\n#define TTAG_MATH  FT_MAKE_TAG( 'M', 'A', 'T', 'H' )\n#define TTAG_maxp  FT_MAKE_TAG( 'm', 'a', 'x', 'p' )\n#define TTAG_META  FT_MAKE_TAG( 'M', 'E', 'T', 'A' )\n#define TTAG_MMFX  FT_MAKE_TAG( 'M', 'M', 'F', 'X' )\n#define TTAG_MMSD  FT_MAKE_TAG( 'M', 'M', 'S', 'D' )\n#define TTAG_mort  FT_MAKE_TAG( 'm', 'o', 'r', 't' )\n#define TTAG_morx  FT_MAKE_TAG( 'm', 'o', 'r', 'x' )\n#define TTAG_MVAR  FT_MAKE_TAG( 'M', 'V', 'A', 'R' )\n#define TTAG_name  FT_MAKE_TAG( 'n', 'a', 'm', 'e' )\n#define TTAG_opbd  FT_MAKE_TAG( 'o', 'p', 'b', 'd' )\n#define TTAG_OS2   FT_MAKE_TAG( 'O', 'S', '/', '2' )\n#define TTAG_OTTO  FT_MAKE_TAG( 'O', 'T', 'T', 'O' )\n#define TTAG_PCLT  FT_MAKE_TAG( 'P', 'C', 'L', 'T' )\n#define TTAG_POST  FT_MAKE_TAG( 'P', 'O', 'S', 'T' )\n#define TTAG_post  FT_MAKE_TAG( 'p', 'o', 's', 't' )\n#define TTAG_prep  FT_MAKE_TAG( 'p', 'r', 'e', 'p' )\n#define TTAG_prop  FT_MAKE_TAG( 'p', 'r', 'o', 'p' )\n#define TTAG_sbix  FT_MAKE_TAG( 's', 'b', 'i', 'x' )\n#define TTAG_sfnt  FT_MAKE_TAG( 's', 'f', 'n', 't' )\n#define TTAG_SING  FT_MAKE_TAG( 'S', 'I', 'N', 'G' )\n#define TTAG_trak  FT_MAKE_TAG( 't', 'r', 'a', 'k' )\n#define TTAG_true  FT_MAKE_TAG( 't', 'r', 'u', 'e' )\n#define TTAG_ttc   FT_MAKE_TAG( 't', 't', 'c', ' ' )\n#define TTAG_ttcf  FT_MAKE_TAG( 't', 't', 'c', 'f' )\n#define TTAG_TYP1  FT_MAKE_TAG( 'T', 'Y', 'P', '1' )\n#define TTAG_typ1  FT_MAKE_TAG( 't', 'y', 'p', '1' )\n#define TTAG_VDMX  FT_MAKE_TAG( 'V', 'D', 'M', 'X' )\n#define TTAG_vhea  FT_MAKE_TAG( 'v', 'h', 'e', 'a' )\n#define TTAG_vmtx  FT_MAKE_TAG( 'v', 'm', 't', 'x' )\n#define TTAG_VVAR  FT_MAKE_TAG( 'V', 'V', 'A', 'R' )\n#define TTAG_wOFF  FT_MAKE_TAG( 'w', 'O', 'F', 'F' )\n#define TTAG_wOF2  FT_MAKE_TAG( 'w', 'O', 'F', '2' )\n\n/* used by \"Keyboard.dfont\" on legacy Mac OS X */\n#define TTAG_0xA5kbd  FT_MAKE_TAG( 0xA5, 'k', 'b', 'd' )\n\n/* used by \"LastResort.dfont\" on legacy Mac OS X */\n#define TTAG_0xA5lst  FT_MAKE_TAG( 0xA5, 'l', 's', 't' )\n\n\nFT_END_HEADER\n\n#endif /* TTAGS_H_ */\n\n\n/* END */\n"
  },
  {
    "path": "thirdparty/freetype/include/freetype2/ft2build.h",
    "content": "/****************************************************************************\n *\n * ft2build.h\n *\n *   FreeType 2 build and setup macros.\n *\n * Copyright (C) 1996-2021 by\n * David Turner, Robert Wilhelm, and Werner Lemberg.\n *\n * This file is part of the FreeType project, and may only be used,\n * modified, and distributed under the terms of the FreeType project\n * license, LICENSE.TXT.  By continuing to use, modify, or distribute\n * this file you indicate that you have read the license and\n * understand and accept it fully.\n *\n */\n\n\n  /**************************************************************************\n   *\n   * This is the 'entry point' for FreeType header file inclusions, to be\n   * loaded before all other header files.\n   *\n   * A typical example is\n   *\n   * ```\n   *   #include <ft2build.h>\n   *   #include <freetype/freetype.h>\n   * ```\n   *\n   */\n\n\n#ifndef FT2BUILD_H_\n#define FT2BUILD_H_\n\n#include <freetype/config/ftheader.h>\n\n#endif /* FT2BUILD_H_ */\n\n\n/* END */\n"
  },
  {
    "path": "thirdparty/glfw/CMake/GenerateMappings.cmake",
    "content": "# Usage:\n# cmake -P GenerateMappings.cmake <path/to/mappings.h.in> <path/to/mappings.h>\n\nset(source_url \"https://raw.githubusercontent.com/gabomdq/SDL_GameControllerDB/master/gamecontrollerdb.txt\")\nset(source_path \"${CMAKE_CURRENT_BINARY_DIR}/gamecontrollerdb.txt\")\nset(template_path \"${CMAKE_ARGV3}\")\nset(target_path \"${CMAKE_ARGV4}\")\n\nif (NOT EXISTS \"${template_path}\")\n    message(FATAL_ERROR \"Failed to find template file ${template_path}\")\nendif()\n\nfile(DOWNLOAD \"${source_url}\" \"${source_path}\"\n     STATUS download_status\n     TLS_VERIFY on)\n\nlist(GET download_status 0 status_code)\nlist(GET download_status 1 status_message)\n\nif (status_code)\n    message(FATAL_ERROR \"Failed to download ${source_url}: ${status_message}\")\nendif()\n\nfile(STRINGS \"${source_path}\" lines)\nforeach(line ${lines})\n    if (\"${line}\" MATCHES \"^[0-9a-fA-F].*$\")\n        set(GLFW_GAMEPAD_MAPPINGS \"${GLFW_GAMEPAD_MAPPINGS}\\\"${line}\\\",\\n\")\n    endif()\nendforeach()\n\nconfigure_file(\"${template_path}\" \"${target_path}\" @ONLY NEWLINE_STYLE UNIX)\nfile(REMOVE \"${source_path}\")\n\n"
  },
  {
    "path": "thirdparty/glfw/CMake/MacOSXBundleInfo.plist.in",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>CFBundleDevelopmentRegion</key>\n\t<string>English</string>\n\t<key>CFBundleExecutable</key>\n\t<string>${MACOSX_BUNDLE_EXECUTABLE_NAME}</string>\n\t<key>CFBundleGetInfoString</key>\n\t<string>${MACOSX_BUNDLE_INFO_STRING}</string>\n\t<key>CFBundleIconFile</key>\n\t<string>${MACOSX_BUNDLE_ICON_FILE}</string>\n\t<key>CFBundleIdentifier</key>\n\t<string>${MACOSX_BUNDLE_GUI_IDENTIFIER}</string>\n\t<key>CFBundleInfoDictionaryVersion</key>\n\t<string>6.0</string>\n\t<key>CFBundleLongVersionString</key>\n\t<string>${MACOSX_BUNDLE_LONG_VERSION_STRING}</string>\n\t<key>CFBundleName</key>\n\t<string>${MACOSX_BUNDLE_BUNDLE_NAME}</string>\n\t<key>CFBundlePackageType</key>\n\t<string>APPL</string>\n\t<key>CFBundleShortVersionString</key>\n\t<string>${MACOSX_BUNDLE_SHORT_VERSION_STRING}</string>\n\t<key>CFBundleSignature</key>\n\t<string>????</string>\n\t<key>CFBundleVersion</key>\n\t<string>${MACOSX_BUNDLE_BUNDLE_VERSION}</string>\n\t<key>CSResourcesFileMapped</key>\n\t<true/>\n\t<key>LSRequiresCarbon</key>\n\t<true/>\n\t<key>NSHumanReadableCopyright</key>\n\t<string>${MACOSX_BUNDLE_COPYRIGHT}</string>\n\t<key>NSHighResolutionCapable</key>\n\t<true/>\n</dict>\n</plist>\n"
  },
  {
    "path": "thirdparty/glfw/CMake/i686-w64-mingw32-clang.cmake",
    "content": "# Define the environment for cross-compiling with 32-bit MinGW-w64 Clang\nSET(CMAKE_SYSTEM_NAME    Windows) # Target system name\nSET(CMAKE_SYSTEM_VERSION 1)\nSET(CMAKE_C_COMPILER     \"i686-w64-mingw32-clang\")\nSET(CMAKE_CXX_COMPILER   \"i686-w64-mingw32-clang++\")\nSET(CMAKE_RC_COMPILER    \"i686-w64-mingw32-windres\")\nSET(CMAKE_RANLIB         \"i686-w64-mingw32-ranlib\")\n\n# Configure the behaviour of the find commands\nSET(CMAKE_FIND_ROOT_PATH \"/usr/i686-w64-mingw32\")\nSET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)\nSET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)\nSET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)\n"
  },
  {
    "path": "thirdparty/glfw/CMake/i686-w64-mingw32.cmake",
    "content": "# Define the environment for cross-compiling with 32-bit MinGW-w64 GCC\nSET(CMAKE_SYSTEM_NAME    Windows) # Target system name\nSET(CMAKE_SYSTEM_VERSION 1)\nSET(CMAKE_C_COMPILER     \"i686-w64-mingw32-gcc\")\nSET(CMAKE_CXX_COMPILER   \"i686-w64-mingw32-g++\")\nSET(CMAKE_RC_COMPILER    \"i686-w64-mingw32-windres\")\nSET(CMAKE_RANLIB         \"i686-w64-mingw32-ranlib\")\n\n# Configure the behaviour of the find commands\nSET(CMAKE_FIND_ROOT_PATH \"/usr/i686-w64-mingw32\")\nSET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)\nSET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)\nSET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)\n"
  },
  {
    "path": "thirdparty/glfw/CMake/modules/FindEpollShim.cmake",
    "content": "# Find EpollShim\n# Once done, this will define\n#\n#   EPOLLSHIM_FOUND - System has EpollShim\n#   EPOLLSHIM_INCLUDE_DIRS - The EpollShim include directories\n#   EPOLLSHIM_LIBRARIES - The libraries needed to use EpollShim\n\nfind_path(EPOLLSHIM_INCLUDE_DIRS NAMES sys/epoll.h sys/timerfd.h HINTS /usr/local/include/libepoll-shim)\nfind_library(EPOLLSHIM_LIBRARIES NAMES epoll-shim libepoll-shim HINTS /usr/local/lib)\n\nif (EPOLLSHIM_INCLUDE_DIRS AND EPOLLSHIM_LIBRARIES)\n\tset(EPOLLSHIM_FOUND TRUE)\nendif (EPOLLSHIM_INCLUDE_DIRS AND EPOLLSHIM_LIBRARIES)\n\ninclude(FindPackageHandleStandardArgs)\nfind_package_handle_standard_args(EPOLLSHIM DEFAULT_MSG EPOLLSHIM_LIBRARIES EPOLLSHIM_INCLUDE_DIRS)\nmark_as_advanced(EPOLLSHIM_INCLUDE_DIRS EPOLLSHIM_LIBRARIES)\n"
  },
  {
    "path": "thirdparty/glfw/CMake/modules/FindOSMesa.cmake",
    "content": "# Try to find OSMesa on a Unix system\n#\n# This will define:\n#\n#   OSMESA_LIBRARIES   - Link these to use OSMesa\n#   OSMESA_INCLUDE_DIR - Include directory for OSMesa\n#\n# Copyright (c) 2014 Brandon Schaefer <brandon.schaefer@canonical.com>\n\nif (NOT WIN32)\n\n  find_package (PkgConfig)\n  pkg_check_modules (PKG_OSMESA QUIET osmesa)\n\n  set (OSMESA_INCLUDE_DIR ${PKG_OSMESA_INCLUDE_DIRS})\n  set (OSMESA_LIBRARIES   ${PKG_OSMESA_LIBRARIES})\n\nendif ()\n"
  },
  {
    "path": "thirdparty/glfw/CMake/modules/FindWaylandProtocols.cmake",
    "content": "find_package(PkgConfig)\n\npkg_check_modules(WaylandProtocols QUIET wayland-protocols>=${WaylandProtocols_FIND_VERSION})\n\nexecute_process(COMMAND ${PKG_CONFIG_EXECUTABLE} --variable=pkgdatadir wayland-protocols\n                OUTPUT_VARIABLE WaylandProtocols_PKGDATADIR\n                RESULT_VARIABLE _pkgconfig_failed)\nif (_pkgconfig_failed)\n    message(FATAL_ERROR \"Missing wayland-protocols pkgdatadir\")\nendif()\n\nstring(REGEX REPLACE \"[\\r\\n]\" \"\" WaylandProtocols_PKGDATADIR \"${WaylandProtocols_PKGDATADIR}\")\n\nfind_package_handle_standard_args(WaylandProtocols\n    FOUND_VAR\n        WaylandProtocols_FOUND\n    REQUIRED_VARS\n        WaylandProtocols_PKGDATADIR\n    VERSION_VAR\n        WaylandProtocols_VERSION\n    HANDLE_COMPONENTS\n)\n\nset(WAYLAND_PROTOCOLS_FOUND ${WaylandProtocols_FOUND})\nset(WAYLAND_PROTOCOLS_PKGDATADIR ${WaylandProtocols_PKGDATADIR})\nset(WAYLAND_PROTOCOLS_VERSION ${WaylandProtocols_VERSION})\n"
  },
  {
    "path": "thirdparty/glfw/CMake/modules/FindXKBCommon.cmake",
    "content": "# - Try to find XKBCommon\n# Once done, this will define\n#\n#   XKBCOMMON_FOUND - System has XKBCommon\n#   XKBCOMMON_INCLUDE_DIRS - The XKBCommon include directories\n#   XKBCOMMON_LIBRARIES - The libraries needed to use XKBCommon\n#   XKBCOMMON_DEFINITIONS - Compiler switches required for using XKBCommon\n\nfind_package(PkgConfig)\npkg_check_modules(PC_XKBCOMMON QUIET xkbcommon)\nset(XKBCOMMON_DEFINITIONS ${PC_XKBCOMMON_CFLAGS_OTHER})\n\nfind_path(XKBCOMMON_INCLUDE_DIR\n    NAMES xkbcommon/xkbcommon.h\n    HINTS ${PC_XKBCOMMON_INCLUDE_DIR} ${PC_XKBCOMMON_INCLUDE_DIRS}\n)\n\nfind_library(XKBCOMMON_LIBRARY\n    NAMES xkbcommon\n    HINTS ${PC_XKBCOMMON_LIBRARY} ${PC_XKBCOMMON_LIBRARY_DIRS}\n)\n\nset(XKBCOMMON_LIBRARIES ${XKBCOMMON_LIBRARY})\nset(XKBCOMMON_LIBRARY_DIRS ${XKBCOMMON_LIBRARY_DIRS})\nset(XKBCOMMON_INCLUDE_DIRS ${XKBCOMMON_INCLUDE_DIR})\n\ninclude(FindPackageHandleStandardArgs)\nfind_package_handle_standard_args(XKBCommon DEFAULT_MSG\n    XKBCOMMON_LIBRARY\n    XKBCOMMON_INCLUDE_DIR\n)\n\nmark_as_advanced(XKBCOMMON_LIBRARY XKBCOMMON_INCLUDE_DIR)\n\n"
  },
  {
    "path": "thirdparty/glfw/CMake/x86_64-w64-mingw32-clang.cmake",
    "content": "# Define the environment for cross-compiling with 64-bit MinGW-w64 Clang\nSET(CMAKE_SYSTEM_NAME    Windows) # Target system name\nSET(CMAKE_SYSTEM_VERSION 1)\nSET(CMAKE_C_COMPILER     \"x86_64-w64-mingw32-clang\")\nSET(CMAKE_CXX_COMPILER   \"x86_64-w64-mingw32-clang++\")\nSET(CMAKE_RC_COMPILER    \"x86_64-w64-mingw32-windres\")\nSET(CMAKE_RANLIB         \"x86_64-w64-mingw32-ranlib\")\n\n# Configure the behaviour of the find commands\nSET(CMAKE_FIND_ROOT_PATH \"/usr/x86_64-w64-mingw32\")\nSET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)\nSET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)\nSET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)\n"
  },
  {
    "path": "thirdparty/glfw/CMake/x86_64-w64-mingw32.cmake",
    "content": "# Define the environment for cross-compiling with 64-bit MinGW-w64 GCC\nSET(CMAKE_SYSTEM_NAME    Windows) # Target system name\nSET(CMAKE_SYSTEM_VERSION 1)\nSET(CMAKE_C_COMPILER     \"x86_64-w64-mingw32-gcc\")\nSET(CMAKE_CXX_COMPILER   \"x86_64-w64-mingw32-g++\")\nSET(CMAKE_RC_COMPILER    \"x86_64-w64-mingw32-windres\")\nSET(CMAKE_RANLIB         \"x86_64-w64-mingw32-ranlib\")\n\n# Configure the behaviour of the find commands\nSET(CMAKE_FIND_ROOT_PATH \"/usr/x86_64-w64-mingw32\")\nSET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)\nSET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)\nSET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)\n"
  },
  {
    "path": "thirdparty/glfw/CMakeLists.txt",
    "content": "cmake_minimum_required(VERSION 3.0)\n\nproject(GLFW VERSION 3.3.2 LANGUAGES C)\n\nset(CMAKE_LEGACY_CYGWIN_WIN32 OFF)\n\nif (POLICY CMP0054)\n    cmake_policy(SET CMP0054 NEW)\nendif()\n\nif (POLICY CMP0077)\n    cmake_policy(SET CMP0077 NEW)\nendif()\n\nset_property(GLOBAL PROPERTY USE_FOLDERS ON)\n\noption(BUILD_SHARED_LIBS \"Build shared libraries\" OFF)\noption(GLFW_BUILD_EXAMPLES \"Build the GLFW example programs\" ON)\noption(GLFW_BUILD_TESTS \"Build the GLFW test programs\" ON)\noption(GLFW_BUILD_DOCS \"Build the GLFW documentation\" ON)\noption(GLFW_INSTALL \"Generate installation target\" ON)\noption(GLFW_VULKAN_STATIC \"Assume the Vulkan loader is linked with the application\" OFF)\n\ninclude(GNUInstallDirs)\ninclude(CMakeDependentOption)\n\ncmake_dependent_option(GLFW_USE_OSMESA \"Use OSMesa for offscreen context creation\" OFF\n                       \"UNIX\" OFF)\ncmake_dependent_option(GLFW_USE_HYBRID_HPG \"Force use of high-performance GPU on hybrid systems\" OFF\n                       \"WIN32\" OFF)\ncmake_dependent_option(GLFW_USE_WAYLAND \"Use Wayland for window creation\" OFF\n                       \"UNIX;NOT APPLE\" OFF)\ncmake_dependent_option(USE_MSVC_RUNTIME_LIBRARY_DLL \"Use MSVC runtime library DLL\" ON\n                       \"MSVC\" OFF)\n\nif (BUILD_SHARED_LIBS)\n    set(_GLFW_BUILD_DLL 1)\nendif()\n\nif (BUILD_SHARED_LIBS AND UNIX)\n    # On Unix-like systems, shared libraries can use the soname system.\n    set(GLFW_LIB_NAME glfw)\nelse()\n    set(GLFW_LIB_NAME glfw3)\nendif()\n\nif (GLFW_VULKAN_STATIC)\n    if (BUILD_SHARED_LIBS)\n        # If you absolutely must do this, remove this line and add the Vulkan\n        # loader static library via the CMAKE_SHARED_LINKER_FLAGS\n        message(FATAL_ERROR \"You are trying to link the Vulkan loader static library into the GLFW shared library\")\n    endif()\n    set(_GLFW_VULKAN_STATIC 1)\nendif()\n\nlist(APPEND CMAKE_MODULE_PATH \"${GLFW_SOURCE_DIR}/CMake/modules\")\n\nfind_package(Threads REQUIRED)\n\nif (GLFW_BUILD_DOCS)\n    set(DOXYGEN_SKIP_DOT TRUE)\n    find_package(Doxygen)\nendif()\n\n#--------------------------------------------------------------------\n# Set compiler specific flags\n#--------------------------------------------------------------------\nif (MSVC)\n    if (MSVC90)\n        # Workaround for VS 2008 not shipping with the DirectX 9 SDK\n        include(CheckIncludeFile)\n        check_include_file(dinput.h DINPUT_H_FOUND)\n        if (NOT DINPUT_H_FOUND)\n            message(FATAL_ERROR \"DirectX 9 headers not found; install DirectX 9 SDK\")\n        endif()\n        # Workaround for VS 2008 not shipping with stdint.h\n        list(APPEND glfw_INCLUDE_DIRS \"${GLFW_SOURCE_DIR}/deps/vs2008\")\n    endif()\n\n    if (NOT USE_MSVC_RUNTIME_LIBRARY_DLL)\n        foreach (flag CMAKE_C_FLAGS\n                      CMAKE_C_FLAGS_DEBUG\n                      CMAKE_C_FLAGS_RELEASE\n                      CMAKE_C_FLAGS_MINSIZEREL\n                      CMAKE_C_FLAGS_RELWITHDEBINFO)\n\n            if (${flag} MATCHES \"/MD\")\n                string(REGEX REPLACE \"/MD\" \"/MT\" ${flag} \"${${flag}}\")\n            endif()\n            if (${flag} MATCHES \"/MDd\")\n                string(REGEX REPLACE \"/MDd\" \"/MTd\" ${flag} \"${${flag}}\")\n            endif()\n\n        endforeach()\n    endif()\nendif()\n\nif (MINGW)\n    # Workaround for legacy MinGW not providing XInput and DirectInput\n    include(CheckIncludeFile)\n\n    check_include_file(dinput.h DINPUT_H_FOUND)\n    check_include_file(xinput.h XINPUT_H_FOUND)\n    if (NOT DINPUT_H_FOUND OR NOT XINPUT_H_FOUND)\n        list(APPEND glfw_INCLUDE_DIRS \"${GLFW_SOURCE_DIR}/deps/mingw\")\n    endif()\n\n    # Enable link-time exploit mitigation features enabled by default on MSVC\n    include(CheckCCompilerFlag)\n\n    # Compatibility with data execution prevention (DEP)\n    set(CMAKE_REQUIRED_FLAGS \"-Wl,--nxcompat\")\n    check_c_compiler_flag(\"\" _GLFW_HAS_DEP)\n    if (_GLFW_HAS_DEP)\n        set(CMAKE_SHARED_LINKER_FLAGS \"-Wl,--nxcompat ${CMAKE_SHARED_LINKER_FLAGS}\")\n    endif()\n\n    # Compatibility with address space layout randomization (ASLR)\n    set(CMAKE_REQUIRED_FLAGS \"-Wl,--dynamicbase\")\n    check_c_compiler_flag(\"\" _GLFW_HAS_ASLR)\n    if (_GLFW_HAS_ASLR)\n        set(CMAKE_SHARED_LINKER_FLAGS \"-Wl,--dynamicbase ${CMAKE_SHARED_LINKER_FLAGS}\")\n    endif()\n\n    # Compatibility with 64-bit address space layout randomization (ASLR)\n    set(CMAKE_REQUIRED_FLAGS \"-Wl,--high-entropy-va\")\n    check_c_compiler_flag(\"\" _GLFW_HAS_64ASLR)\n    if (_GLFW_HAS_64ASLR)\n        set(CMAKE_SHARED_LINKER_FLAGS \"-Wl,--high-entropy-va ${CMAKE_SHARED_LINKER_FLAGS}\")\n    endif()\nendif()\n\n#--------------------------------------------------------------------\n# Detect and select backend APIs\n#--------------------------------------------------------------------\nif (GLFW_USE_WAYLAND)\n    set(_GLFW_WAYLAND 1)\n    message(STATUS \"Using Wayland for window creation\")\nelseif (GLFW_USE_OSMESA)\n    set(_GLFW_OSMESA 1)\n    message(STATUS \"Using OSMesa for headless context creation\")\nelseif (WIN32)\n    set(_GLFW_WIN32 1)\n    message(STATUS \"Using Win32 for window creation\")\nelseif (APPLE)\n    set(_GLFW_COCOA 1)\n    message(STATUS \"Using Cocoa for window creation\")\nelseif (UNIX)\n    set(_GLFW_X11 1)\n    message(STATUS \"Using X11 for window creation\")\nelse()\n    message(FATAL_ERROR \"No supported platform was detected\")\nendif()\n\n#--------------------------------------------------------------------\n# Find and add Unix math and time libraries\n#--------------------------------------------------------------------\nif (UNIX AND NOT APPLE)\n    find_library(RT_LIBRARY rt)\n    mark_as_advanced(RT_LIBRARY)\n    if (RT_LIBRARY)\n        list(APPEND glfw_LIBRARIES \"${RT_LIBRARY}\")\n        list(APPEND glfw_PKG_LIBS \"-lrt\")\n    endif()\n\n    find_library(MATH_LIBRARY m)\n    mark_as_advanced(MATH_LIBRARY)\n    if (MATH_LIBRARY)\n        list(APPEND glfw_LIBRARIES \"${MATH_LIBRARY}\")\n        list(APPEND glfw_PKG_LIBS \"-lm\")\n    endif()\n\n    if (CMAKE_DL_LIBS)\n        list(APPEND glfw_LIBRARIES \"${CMAKE_DL_LIBS}\")\n        list(APPEND glfw_PKG_LIBS \"-l${CMAKE_DL_LIBS}\")\n    endif()\nendif()\n\n#--------------------------------------------------------------------\n# Use Win32 for window creation\n#--------------------------------------------------------------------\nif (_GLFW_WIN32)\n\n    list(APPEND glfw_PKG_LIBS \"-lgdi32\")\n\n    if (GLFW_USE_HYBRID_HPG)\n        set(_GLFW_USE_HYBRID_HPG 1)\n    endif()\nendif()\n\n#--------------------------------------------------------------------\n# Use X11 for window creation\n#--------------------------------------------------------------------\nif (_GLFW_X11)\n\n    find_package(X11 REQUIRED)\n\n    list(APPEND glfw_PKG_DEPS \"x11\")\n\n    # Set up library and include paths\n    list(APPEND glfw_INCLUDE_DIRS \"${X11_X11_INCLUDE_PATH}\")\n    list(APPEND glfw_LIBRARIES \"${X11_X11_LIB}\" \"${CMAKE_THREAD_LIBS_INIT}\")\n\n    # Check for XRandR (modern resolution switching and gamma control)\n    if (NOT X11_Xrandr_INCLUDE_PATH)\n        message(FATAL_ERROR \"RandR headers not found; install libxrandr development package\")\n    endif()\n\n    # Check for Xinerama (legacy multi-monitor support)\n    if (NOT X11_Xinerama_INCLUDE_PATH)\n        message(FATAL_ERROR \"Xinerama headers not found; install libxinerama development package\")\n    endif()\n\n    # Check for Xkb (X keyboard extension)\n    if (NOT X11_Xkb_INCLUDE_PATH)\n        message(FATAL_ERROR \"XKB headers not found; install X11 development package\")\n    endif()\n\n    # Check for Xcursor (cursor creation from RGBA images)\n    if (NOT X11_Xcursor_INCLUDE_PATH)\n        message(FATAL_ERROR \"Xcursor headers not found; install libxcursor development package\")\n    endif()\n\n    # Check for XInput (modern HID input)\n    if (NOT X11_Xi_INCLUDE_PATH)\n        message(FATAL_ERROR \"XInput headers not found; install libxi development package\")\n    endif()\n\n    list(APPEND glfw_INCLUDE_DIRS \"${X11_Xrandr_INCLUDE_PATH}\"\n                                  \"${X11_Xinerama_INCLUDE_PATH}\"\n                                  \"${X11_Xkb_INCLUDE_PATH}\"\n                                  \"${X11_Xcursor_INCLUDE_PATH}\"\n                                  \"${X11_Xi_INCLUDE_PATH}\")\nendif()\n\n#--------------------------------------------------------------------\n# Use Wayland for window creation\n#--------------------------------------------------------------------\nif (_GLFW_WAYLAND)\n    find_package(ECM REQUIRED NO_MODULE)\n    list(APPEND CMAKE_MODULE_PATH \"${ECM_MODULE_PATH}\")\n\n    find_package(Wayland REQUIRED Client Cursor Egl)\n    find_package(WaylandScanner REQUIRED)\n    find_package(WaylandProtocols 1.15 REQUIRED)\n\n    list(APPEND glfw_PKG_DEPS \"wayland-egl\")\n\n    list(APPEND glfw_INCLUDE_DIRS \"${Wayland_INCLUDE_DIRS}\")\n    list(APPEND glfw_LIBRARIES \"${Wayland_LIBRARIES}\" \"${CMAKE_THREAD_LIBS_INIT}\")\n\n    find_package(XKBCommon REQUIRED)\n    list(APPEND glfw_INCLUDE_DIRS \"${XKBCOMMON_INCLUDE_DIRS}\")\n\n    include(CheckIncludeFiles)\n    include(CheckFunctionExists)\n    check_include_files(xkbcommon/xkbcommon-compose.h HAVE_XKBCOMMON_COMPOSE_H)\n    check_function_exists(memfd_create HAVE_MEMFD_CREATE)\n\n    if (NOT (\"${CMAKE_SYSTEM_NAME}\" STREQUAL \"Linux\"))\n        find_package(EpollShim)\n        if (EPOLLSHIM_FOUND)\n            list(APPEND glfw_INCLUDE_DIRS \"${EPOLLSHIM_INCLUDE_DIRS}\")\n            list(APPEND glfw_LIBRARIES \"${EPOLLSHIM_LIBRARIES}\")\n        endif()\n    endif()\nendif()\n\n#--------------------------------------------------------------------\n# Use OSMesa for offscreen context creation\n#--------------------------------------------------------------------\nif (_GLFW_OSMESA)\n    find_package(OSMesa REQUIRED)\n    list(APPEND glfw_LIBRARIES \"${CMAKE_THREAD_LIBS_INIT}\")\nendif()\n\n#--------------------------------------------------------------------\n# Use Cocoa for window creation and NSOpenGL for context creation\n#--------------------------------------------------------------------\nif (_GLFW_COCOA)\n\n    list(APPEND glfw_LIBRARIES\n        \"-framework Cocoa\"\n        \"-framework IOKit\"\n        \"-framework CoreFoundation\")\n\n    set(glfw_PKG_DEPS \"\")\n    set(glfw_PKG_LIBS \"-framework Cocoa -framework IOKit -framework CoreFoundation\")\nendif()\n\n#--------------------------------------------------------------------\n# Add the Vulkan loader as a dependency if necessary\n#--------------------------------------------------------------------\nif (GLFW_VULKAN_STATIC)\n    list(APPEND glfw_PKG_DEPS \"vulkan\")\nendif()\n\n#--------------------------------------------------------------------\n# Export GLFW library dependencies\n#--------------------------------------------------------------------\nforeach(arg ${glfw_PKG_DEPS})\n    set(GLFW_PKG_DEPS \"${GLFW_PKG_DEPS} ${arg}\")\nendforeach()\nforeach(arg ${glfw_PKG_LIBS})\n    set(GLFW_PKG_LIBS \"${GLFW_PKG_LIBS} ${arg}\")\nendforeach()\n\n#--------------------------------------------------------------------\n# Create generated files\n#--------------------------------------------------------------------\ninclude(CMakePackageConfigHelpers)\n\nset(GLFW_CONFIG_PATH \"${CMAKE_INSTALL_LIBDIR}/cmake/glfw3\")\n\nconfigure_package_config_file(src/glfw3Config.cmake.in\n                              src/glfw3Config.cmake\n                              INSTALL_DESTINATION \"${GLFW_CONFIG_PATH}\"\n                              NO_CHECK_REQUIRED_COMPONENTS_MACRO)\n\nwrite_basic_package_version_file(src/glfw3ConfigVersion.cmake\n                                 VERSION ${GLFW_VERSION}\n                                 COMPATIBILITY SameMajorVersion)\n\nconfigure_file(src/glfw_config.h.in src/glfw_config.h @ONLY)\n\nconfigure_file(src/glfw3.pc.in src/glfw3.pc @ONLY)\n\n#--------------------------------------------------------------------\n# Add subdirectories\n#--------------------------------------------------------------------\nadd_subdirectory(src)\n\nif (GLFW_BUILD_EXAMPLES)\n    add_subdirectory(examples)\nendif()\n\nif (GLFW_BUILD_TESTS)\n    add_subdirectory(tests)\nendif()\n\nif (DOXYGEN_FOUND AND GLFW_BUILD_DOCS)\n    add_subdirectory(docs)\nendif()\n\n#--------------------------------------------------------------------\n# Install files other than the library\n# The library is installed by src/CMakeLists.txt\n#--------------------------------------------------------------------\nif (GLFW_INSTALL)\n    install(DIRECTORY include/GLFW DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}\n            FILES_MATCHING PATTERN glfw3.h PATTERN glfw3native.h)\n\n    install(FILES \"${GLFW_BINARY_DIR}/src/glfw3Config.cmake\"\n                  \"${GLFW_BINARY_DIR}/src/glfw3ConfigVersion.cmake\"\n            DESTINATION \"${GLFW_CONFIG_PATH}\")\n\n    install(EXPORT glfwTargets FILE glfw3Targets.cmake\n            EXPORT_LINK_INTERFACE_LIBRARIES\n            DESTINATION \"${GLFW_CONFIG_PATH}\")\n    install(FILES \"${GLFW_BINARY_DIR}/src/glfw3.pc\"\n            DESTINATION \"${CMAKE_INSTALL_LIBDIR}/pkgconfig\")\n\n    # Only generate this target if no higher-level project already has\n    if (NOT TARGET uninstall)\n        configure_file(cmake_uninstall.cmake.in\n                       cmake_uninstall.cmake IMMEDIATE @ONLY)\n\n        add_custom_target(uninstall\n                          \"${CMAKE_COMMAND}\" -P\n                          \"${GLFW_BINARY_DIR}/cmake_uninstall.cmake\")\n        set_target_properties(uninstall PROPERTIES FOLDER \"GLFW3\")\n    endif()\nendif()\n\n"
  },
  {
    "path": "thirdparty/glfw/LICENSE.md",
    "content": "Copyright (c) 2002-2006 Marcus Geelnard\n\nCopyright (c) 2006-2019 Camilla Löwy\n\nThis software is provided 'as-is', without any express or implied\nwarranty. In no event will the authors be held liable for any damages\narising from the use of this software.\n\nPermission is granted to anyone to use this software for any purpose,\nincluding commercial applications, and to alter it and redistribute it\nfreely, subject to the following restrictions:\n\n1. The origin of this software must not be misrepresented; you must not\n   claim that you wrote the original software. If you use this software\n   in a product, an acknowledgment in the product documentation would\n   be appreciated but is not required.\n\n2. Altered source versions must be plainly marked as such, and must not\n   be misrepresented as being the original software.\n\n3. This notice may not be removed or altered from any source\n   distribution.\n\n"
  },
  {
    "path": "thirdparty/glfw/README.md",
    "content": "# GLFW\n\n[![Build status](https://travis-ci.org/glfw/glfw.svg?branch=master)](https://travis-ci.org/glfw/glfw)\n[![Build status](https://ci.appveyor.com/api/projects/status/0kf0ct9831i5l6sp/branch/master?svg=true)](https://ci.appveyor.com/project/elmindreda/glfw)\n[![Coverity Scan](https://scan.coverity.com/projects/4884/badge.svg)](https://scan.coverity.com/projects/glfw-glfw)\n\n## Introduction\n\nGLFW is an Open Source, multi-platform library for OpenGL, OpenGL ES and Vulkan\napplication development.  It provides a simple, platform-independent API for\ncreating windows, contexts and surfaces, reading input, handling events, etc.\n\nGLFW natively supports Windows, macOS and Linux and other Unix-like systems.  On\nLinux both X11 and Wayland are supported.\n\nGLFW is licensed under the [zlib/libpng\nlicense](http://www.glfw.org/license.html).\n\nYou can [download](http://www.glfw.org/download.html) the latest stable release\nas source or Windows binaries, or fetch the `latest` branch from GitHub.  Each\nrelease starting with 3.0 also has a corresponding [annotated\ntag](https://github.com/glfw/glfw/releases) with source and binary archives.\n\nThe [documentation](http://www.glfw.org/docs/latest/) is available online and is\nincluded in all source and binary archives.  See the [release\nnotes](https://www.glfw.org/docs/latest/news.html) for new features, caveats and\ndeprecations in the latest release.  For more details see the [version\nhistory](http://www.glfw.org/changelog.html).\n\nThe `master` branch is the stable integration branch and _should_ always compile\nand run on all supported platforms, although details of newly added features may\nchange until they have been included in a release.  New features and many bug\nfixes live in [other branches](https://github.com/glfw/glfw/branches/all) until\nthey are stable enough to merge.\n\nIf you are new to GLFW, you may find the\n[tutorial](http://www.glfw.org/docs/latest/quick.html) for GLFW 3 useful.  If\nyou have used GLFW 2 in the past, there is a [transition\nguide](http://www.glfw.org/docs/latest/moving.html) for moving to the GLFW\n3 API.\n\n\n## Compiling GLFW\n\nGLFW itself requires only the headers and libraries for your OS and window\nsystem.  It does not need the headers for any context creation API (WGL, GLX,\nEGL, NSGL, OSMesa) or rendering API (OpenGL, OpenGL ES, Vulkan) to enable\nsupport for them.\n\nGLFW supports compilation on Windows with Visual C++ 2010 and later, MinGW and\nMinGW-w64, on macOS with Clang and on Linux and other Unix-like systems with GCC\nand Clang.  It will likely compile in other environments as well, but this is\nnot regularly tested.\n\nThere are [pre-compiled Windows binaries](http://www.glfw.org/download.html)\navailable for all supported compilers.\n\nSee the [compilation guide](http://www.glfw.org/docs/latest/compile.html) for\nmore information about how to compile GLFW yourself.\n\n\n## Using GLFW\n\nSee the [documentation](http://www.glfw.org/docs/latest/) for tutorials, guides\nand the API reference.\n\n\n## Contributing to GLFW\n\nSee the [contribution\nguide](https://github.com/glfw/glfw/blob/master/docs/CONTRIBUTING.md) for\nmore information.\n\n\n## System requirements\n\nGLFW supports Windows XP and later and macOS 10.8 and later.  Linux and other\nUnix-like systems running the X Window System are supported even without\na desktop environment or modern extensions, although some features require\na running window or clipboard manager.  The OSMesa backend requires Mesa 6.3.\n\nSee the [compatibility guide](http://www.glfw.org/docs/latest/compat.html)\nin the documentation for more information.\n\n\n## Dependencies\n\nGLFW itself depends only on the headers and libraries for your window system.\n\nThe (experimental) Wayland backend also depends on the `extra-cmake-modules`\npackage, which is used to generate Wayland protocol headers.\n\nThe examples and test programs depend on a number of tiny libraries.  These are\nlocated in the `deps/` directory.\n\n - [getopt\\_port](https://github.com/kimgr/getopt_port/) for examples\n   with command-line options\n - [TinyCThread](https://github.com/tinycthread/tinycthread) for threaded\n   examples\n - [glad2](https://github.com/Dav1dde/glad) for loading OpenGL and Vulkan\n   functions\n - [linmath.h](https://github.com/datenwolf/linmath.h) for linear algebra in\n   examples\n - [Nuklear](https://github.com/vurtun/nuklear) for test and example UI\n - [stb\\_image\\_write](https://github.com/nothings/stb) for writing images to disk\n\nThe documentation is generated with [Doxygen](http://doxygen.org/) if CMake can\nfind that tool.\n\n\n## Reporting bugs\n\nBugs are reported to our [issue tracker](https://github.com/glfw/glfw/issues).\nPlease check the [contribution\nguide](https://github.com/glfw/glfw/blob/master/docs/CONTRIBUTING.md) for\ninformation on what to include when reporting a bug.\n\n\n## Changelog\n\n - [Win32] Bugfix: Super key was not released after Win+V hotkey (#1622)\n - [Win32] Bugfix: `glfwGetKeyName` could access out of bounds and return an\n   invalid pointer\n - [Win32] Bugfix: Some synthetic key events were reported as `GLFW_KEY_UNKNOWN`\n   (#1623)\n - [Cocoa] Added support for `VK_EXT_metal_surface` (#1619)\n - [Cocoa] Added locating the Vulkan loader at runtime in an application bundle\n - [X11] Bugfix: `glfwFocusWindow` could terminate on older WMs or without a WM\n - [X11] Bugfix: Creating an undecorated window could fail with BadMatch (#1620)\n - [X11] Bugfix: Querying a disconnected monitor could segfault (#1602)\n\n\n## Contact\n\nOn [glfw.org](http://www.glfw.org/) you can find the latest version of GLFW, as\nwell as news, documentation and other information about the project.\n\nIf you have questions related to the use of GLFW, we have a\n[forum](https://discourse.glfw.org/), and the `#glfw` IRC channel on\n[Freenode](http://freenode.net/).\n\nIf you have a bug to report, a patch to submit or a feature you'd like to\nrequest, please file it in the\n[issue tracker](https://github.com/glfw/glfw/issues) on GitHub.\n\nFinally, if you're interested in helping out with the development of GLFW or\nporting it to your favorite platform, join us on the forum, GitHub or IRC.\n\n\n## Acknowledgements\n\nGLFW exists because people around the world donated their time and lent their\nskills.\n\n - Bobyshev Alexander\n - Matt Arsenault\n - David Avedissian\n - Keith Bauer\n - John Bartholomew\n - Coşku Baş\n - Niklas Behrens\n - Andrew Belt\n - Niklas Bergström\n - Denis Bernard\n - Doug Binks\n - blanco\n - Kyle Brenneman\n - Rok Breulj\n - Kai Burjack\n - Martin Capitanio\n - David Carlier\n - Arturo Castro\n - Chi-kwan Chan\n - Ian Clarkson\n - Michał Cichoń\n - Lambert Clara\n - Anna Clarke\n - Yaron Cohen-Tal\n - Omar Cornut\n - Andrew Corrigan\n - Bailey Cosier\n - Noel Cower\n - Jason Daly\n - Jarrod Davis\n - Olivier Delannoy\n - Paul R. Deppe\n - Michael Dickens\n - Роман Донченко\n - Mario Dorn\n - Wolfgang Draxinger\n - Jonathan Dummer\n - Ralph Eastwood\n - Fredrik Ehnbom\n - Robin Eklind\n - Siavash Eliasi\n - Felipe Ferreira\n - Michael Fogleman\n - Gerald Franz\n - Mário Freitas\n - GeO4d\n - Marcus Geelnard\n - Charles Giessen\n - Ryan C. Gordon\n - Stephen Gowen\n - Kovid Goyal\n - Eloi Marín Gratacós\n - Stefan Gustavson\n - Jonathan Hale\n - Sylvain Hellegouarch\n - Matthew Henry\n - heromyth\n - Lucas Hinderberger\n - Paul Holden\n - Warren Hu\n - Charles Huber\n - IntellectualKitty\n - Aaron Jacobs\n - Erik S. V. Jansson\n - Toni Jovanoski\n - Arseny Kapoulkine\n - Cem Karan\n - Osman Keskin\n - Josh Kilmer\n - Byunghoon Kim\n - Cameron King\n - Peter Knut\n - Christoph Kubisch\n - Yuri Kunde Schlesner\n - Rokas Kupstys\n - Konstantin Käfer\n - Eric Larson\n - Francis Lecavalier\n - Robin Leffmann\n - Glenn Lewis\n - Shane Liesegang\n - Anders Lindqvist\n - Leon Linhart\n - Eyal Lotem\n - Aaron Loucks\n - Luflosi\n - lukect\n - Tristam MacDonald\n - Hans Mackowiak\n - Дмитри Малышев\n - Zbigniew Mandziejewicz\n - Adam Marcus\n - Célestin Marot\n - Kyle McDonald\n - David Medlock\n - Bryce Mehring\n - Jonathan Mercier\n - Marcel Metz\n - Liam Middlebrook\n - Ave Milia\n - Jonathan Miller\n - Kenneth Miller\n - Bruce Mitchener\n - Jack Moffitt\n - Jeff Molofee\n - Alexander Monakov\n - Pierre Morel\n - Jon Morton\n - Pierre Moulon\n - Martins Mozeiko\n - Julian Møller\n - ndogxj\n - Kristian Nielsen\n - Kamil Nowakowski\n - Denis Ovod\n - Ozzy\n - Andri Pálsson\n - Peoro\n - Braden Pellett\n - Christopher Pelloux\n - Arturo J. Pérez\n - Anthony Pesch\n - Orson Peters\n - Emmanuel Gil Peyrot\n - Cyril Pichard\n - Keith Pitt\n - Stanislav Podgorskiy\n - Konstantin Podsvirov\n - Nathan Poirier\n - Alexandre Pretyman\n - Pablo Prietz\n - przemekmirek\n - pthom\n - Guillaume Racicot\n - Philip Rideout\n - Eddie Ringle\n - Max Risuhin\n - Jorge Rodriguez\n - Ed Ropple\n - Aleksey Rybalkin\n - Riku Salminen\n - Brandon Schaefer\n - Sebastian Schuberth\n - Christian Sdunek\n - Matt Sealey\n - Steve Sexton\n - Arkady Shapkin\n - Yoshiki Shibukawa\n - Dmitri Shuralyov\n - Daniel Skorupski\n - Bradley Smith\n - Cliff Smolinsky\n - Patrick Snape\n - Erlend Sogge Heggen\n - Julian Squires\n - Johannes Stein\n - Pontus Stenetorp\n - Michael Stocker\n - Justin Stoecker\n - Elviss Strazdins\n - Paul Sultana\n - Nathan Sweet\n - TTK-Bandit\n - Sergey Tikhomirov\n - Arthur Tombs\n - Ioannis Tsakpinis\n - Samuli Tuomola\n - Matthew Turner\n - urraka\n - Elias Vanderstuyft\n - Stef Velzel\n - Jari Vetoniemi\n - Ricardo Vieira\n - Nicholas Vitovitch\n - Simon Voordouw\n - Corentin Wallez\n - Torsten Walluhn\n - Patrick Walton\n - Xo Wang\n - Jay Weisskopf\n - Frank Wille\n - Ryogo Yoshimura\n - Lukas Zanner\n - Andrey Zholos\n - Santi Zupancic\n - Jonas Ådahl\n - Lasse Öörni\n - All the unmentioned and anonymous contributors in the GLFW community, for bug\n   reports, patches, feedback, testing and encouragement\n\n"
  },
  {
    "path": "thirdparty/glfw/cmake_uninstall.cmake.in",
    "content": "\nif (NOT EXISTS \"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\")\n  message(FATAL_ERROR \"Cannot find install manifest: \\\"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\\\"\")\nendif()\n\nfile(READ \"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\" files)\nstring(REGEX REPLACE \"\\n\" \";\" files \"${files}\")\n\nforeach (file ${files})\n  message(STATUS \"Uninstalling \\\"$ENV{DESTDIR}${file}\\\"\")\n  if (EXISTS \"$ENV{DESTDIR}${file}\")\n    exec_program(\"@CMAKE_COMMAND@\" ARGS \"-E remove \\\"$ENV{DESTDIR}${file}\\\"\"\n                 OUTPUT_VARIABLE rm_out\n                 RETURN_VALUE rm_retval)\n    if (NOT \"${rm_retval}\" STREQUAL 0)\n      MESSAGE(FATAL_ERROR \"Problem when removing \\\"$ENV{DESTDIR}${file}\\\"\")\n    endif()\n  elseif (IS_SYMLINK \"$ENV{DESTDIR}${file}\")\n    EXEC_PROGRAM(\"@CMAKE_COMMAND@\" ARGS \"-E remove \\\"$ENV{DESTDIR}${file}\\\"\"\n                 OUTPUT_VARIABLE rm_out\n                 RETURN_VALUE rm_retval)\n    if (NOT \"${rm_retval}\" STREQUAL 0)\n      message(FATAL_ERROR \"Problem when removing symlink \\\"$ENV{DESTDIR}${file}\\\"\")\n    endif()\n  else()\n    message(STATUS \"File \\\"$ENV{DESTDIR}${file}\\\" does not exist.\")\n  endif()\nendforeach()\n\n"
  },
  {
    "path": "thirdparty/glfw/deps/getopt.c",
    "content": "/* Copyright (c) 2012, Kim Gräsman\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are met:\n *  * Redistributions of source code must retain the above copyright notice,\n *    this list of conditions and the following disclaimer.\n *  * Redistributions in binary form must reproduce the above copyright notice,\n *    this list of conditions and the following disclaimer in the documentation\n *    and/or other materials provided with the distribution.\n *  * Neither the name of Kim Gräsman nor the names of contributors may be used\n *    to endorse or promote products derived from this software without specific\n *    prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED. IN NO EVENT SHALL KIM GRÄSMAN BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n#include \"getopt.h\"\n\n#include <stddef.h>\n#include <string.h>\n\nconst int no_argument = 0;\nconst int required_argument = 1;\nconst int optional_argument = 2;\n\nchar* optarg;\nint optopt;\n/* The variable optind [...] shall be initialized to 1 by the system. */\nint optind = 1;\nint opterr;\n\nstatic char* optcursor = NULL;\n\n/* Implemented based on [1] and [2] for optional arguments.\n   optopt is handled FreeBSD-style, per [3].\n   Other GNU and FreeBSD extensions are purely accidental.\n\n[1] http://pubs.opengroup.org/onlinepubs/000095399/functions/getopt.html\n[2] http://www.kernel.org/doc/man-pages/online/pages/man3/getopt.3.html\n[3] http://www.freebsd.org/cgi/man.cgi?query=getopt&sektion=3&manpath=FreeBSD+9.0-RELEASE\n*/\nint getopt(int argc, char* const argv[], const char* optstring) {\n  int optchar = -1;\n  const char* optdecl = NULL;\n\n  optarg = NULL;\n  opterr = 0;\n  optopt = 0;\n\n  /* Unspecified, but we need it to avoid overrunning the argv bounds. */\n  if (optind >= argc)\n    goto no_more_optchars;\n\n  /* If, when getopt() is called argv[optind] is a null pointer, getopt()\n     shall return -1 without changing optind. */\n  if (argv[optind] == NULL)\n    goto no_more_optchars;\n\n  /* If, when getopt() is called *argv[optind]  is not the character '-',\n     getopt() shall return -1 without changing optind. */\n  if (*argv[optind] != '-')\n    goto no_more_optchars;\n\n  /* If, when getopt() is called argv[optind] points to the string \"-\",\n     getopt() shall return -1 without changing optind. */\n  if (strcmp(argv[optind], \"-\") == 0)\n    goto no_more_optchars;\n\n  /* If, when getopt() is called argv[optind] points to the string \"--\",\n     getopt() shall return -1 after incrementing optind. */\n  if (strcmp(argv[optind], \"--\") == 0) {\n    ++optind;\n    goto no_more_optchars;\n  }\n\n  if (optcursor == NULL || *optcursor == '\\0')\n    optcursor = argv[optind] + 1;\n\n  optchar = *optcursor;\n\n  /* FreeBSD: The variable optopt saves the last known option character\n     returned by getopt(). */\n  optopt = optchar;\n\n  /* The getopt() function shall return the next option character (if one is\n     found) from argv that matches a character in optstring, if there is\n     one that matches. */\n  optdecl = strchr(optstring, optchar);\n  if (optdecl) {\n    /* [I]f a character is followed by a colon, the option takes an\n       argument. */\n    if (optdecl[1] == ':') {\n      optarg = ++optcursor;\n      if (*optarg == '\\0') {\n        /* GNU extension: Two colons mean an option takes an\n           optional arg; if there is text in the current argv-element\n           (i.e., in the same word as the option name itself, for example,\n           \"-oarg\"), then it is returned in optarg, otherwise optarg is set\n           to zero. */\n        if (optdecl[2] != ':') {\n          /* If the option was the last character in the string pointed to by\n             an element of argv, then optarg shall contain the next element\n             of argv, and optind shall be incremented by 2. If the resulting\n             value of optind is greater than argc, this indicates a missing\n             option-argument, and getopt() shall return an error indication.\n\n             Otherwise, optarg shall point to the string following the\n             option character in that element of argv, and optind shall be\n             incremented by 1.\n          */\n          if (++optind < argc) {\n            optarg = argv[optind];\n          } else {\n            /* If it detects a missing option-argument, it shall return the\n               colon character ( ':' ) if the first character of optstring\n               was a colon, or a question-mark character ( '?' ) otherwise.\n            */\n            optarg = NULL;\n            optchar = (optstring[0] == ':') ? ':' : '?';\n          }\n        } else {\n          optarg = NULL;\n        }\n      }\n\n      optcursor = NULL;\n    }\n  } else {\n    /* If getopt() encounters an option character that is not contained in\n       optstring, it shall return the question-mark ( '?' ) character. */\n    optchar = '?';\n  }\n\n  if (optcursor == NULL || *++optcursor == '\\0')\n    ++optind;\n\n  return optchar;\n\nno_more_optchars:\n  optcursor = NULL;\n  return -1;\n}\n\n/* Implementation based on [1].\n\n[1] http://www.kernel.org/doc/man-pages/online/pages/man3/getopt.3.html\n*/\nint getopt_long(int argc, char* const argv[], const char* optstring,\n  const struct option* longopts, int* longindex) {\n  const struct option* o = longopts;\n  const struct option* match = NULL;\n  int num_matches = 0;\n  size_t argument_name_length = 0;\n  const char* current_argument = NULL;\n  int retval = -1;\n\n  optarg = NULL;\n  optopt = 0;\n\n  if (optind >= argc)\n    return -1;\n\n  if (strlen(argv[optind]) < 3 || strncmp(argv[optind], \"--\", 2) != 0)\n    return getopt(argc, argv, optstring);\n\n  /* It's an option; starts with -- and is longer than two chars. */\n  current_argument = argv[optind] + 2;\n  argument_name_length = strcspn(current_argument, \"=\");\n  for (; o->name; ++o) {\n    if (strncmp(o->name, current_argument, argument_name_length) == 0) {\n      match = o;\n      ++num_matches;\n    }\n  }\n\n  if (num_matches == 1) {\n    /* If longindex is not NULL, it points to a variable which is set to the\n       index of the long option relative to longopts. */\n    if (longindex)\n      *longindex = (int) (match - longopts);\n\n    /* If flag is NULL, then getopt_long() shall return val.\n       Otherwise, getopt_long() returns 0, and flag shall point to a variable\n       which shall be set to val if the option is found, but left unchanged if\n       the option is not found. */\n    if (match->flag)\n      *(match->flag) = match->val;\n\n    retval = match->flag ? 0 : match->val;\n\n    if (match->has_arg != no_argument) {\n      optarg = strchr(argv[optind], '=');\n      if (optarg != NULL)\n        ++optarg;\n\n      if (match->has_arg == required_argument) {\n        /* Only scan the next argv for required arguments. Behavior is not\n           specified, but has been observed with Ubuntu and Mac OSX. */\n        if (optarg == NULL && ++optind < argc) {\n          optarg = argv[optind];\n        }\n\n        if (optarg == NULL)\n          retval = ':';\n      }\n    } else if (strchr(argv[optind], '=')) {\n      /* An argument was provided to a non-argument option.\n         I haven't seen this specified explicitly, but both GNU and BSD-based\n         implementations show this behavior.\n      */\n      retval = '?';\n    }\n  } else {\n    /* Unknown option or ambiguous match. */\n    retval = '?';\n  }\n\n  ++optind;\n  return retval;\n}\n"
  },
  {
    "path": "thirdparty/glfw/deps/getopt.h",
    "content": "/* Copyright (c) 2012, Kim Gräsman\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are met:\n *  * Redistributions of source code must retain the above copyright notice,\n *    this list of conditions and the following disclaimer.\n *  * Redistributions in binary form must reproduce the above copyright notice,\n *    this list of conditions and the following disclaimer in the documentation\n *    and/or other materials provided with the distribution.\n *  * Neither the name of Kim Gräsman nor the names of contributors may be used\n *    to endorse or promote products derived from this software without specific\n *    prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED. IN NO EVENT SHALL KIM GRÄSMAN BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n#ifndef INCLUDED_GETOPT_PORT_H\n#define INCLUDED_GETOPT_PORT_H\n\n#if defined(__cplusplus)\nextern \"C\" {\n#endif\n\nextern const int no_argument;\nextern const int required_argument;\nextern const int optional_argument;\n\nextern char* optarg;\nextern int optind, opterr, optopt;\n\nstruct option {\n  const char* name;\n  int has_arg;\n  int* flag;\n  int val;\n};\n\nint getopt(int argc, char* const argv[], const char* optstring);\n\nint getopt_long(int argc, char* const argv[],\n  const char* optstring, const struct option* longopts, int* longindex);\n\n#if defined(__cplusplus)\n}\n#endif\n\n#endif // INCLUDED_GETOPT_PORT_H\n"
  },
  {
    "path": "thirdparty/glfw/deps/glad/gl.h",
    "content": "/**\n * Loader generated by glad 2.0.0-beta on Sun Apr 14 17:03:32 2019\n *\n * Generator: C/C++\n * Specification: gl\n * Extensions: 3\n *\n * APIs:\n *  - gl:compatibility=3.3\n *\n * Options:\n *  - MX_GLOBAL = False\n *  - LOADER = False\n *  - ALIAS = False\n *  - HEADER_ONLY = False\n *  - DEBUG = False\n *  - MX = False\n *\n * Commandline:\n *    --api='gl:compatibility=3.3' --extensions='GL_ARB_multisample,GL_ARB_robustness,GL_KHR_debug' c\n *\n * Online:\n *    http://glad.sh/#api=gl%3Acompatibility%3D3.3&extensions=GL_ARB_multisample%2CGL_ARB_robustness%2CGL_KHR_debug&generator=c&options=\n *\n */\n\n#ifndef GLAD_GL_H_\n#define GLAD_GL_H_\n\n#ifdef __gl_h_\n    #error OpenGL header already included (API: gl), remove previous include!\n#endif\n#define __gl_h_ 1\n\n\n#define GLAD_GL\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n#ifndef GLAD_PLATFORM_H_\n#define GLAD_PLATFORM_H_\n\n#ifndef GLAD_PLATFORM_WIN32\n  #if defined(_WIN32) || defined(__WIN32__) || defined(WIN32) || defined(__MINGW32__)\n    #define GLAD_PLATFORM_WIN32 1\n  #else\n    #define GLAD_PLATFORM_WIN32 0\n  #endif\n#endif\n\n#ifndef GLAD_PLATFORM_APPLE\n  #ifdef __APPLE__\n    #define GLAD_PLATFORM_APPLE 1\n  #else\n    #define GLAD_PLATFORM_APPLE 0\n  #endif\n#endif\n\n#ifndef GLAD_PLATFORM_EMSCRIPTEN\n  #ifdef __EMSCRIPTEN__\n    #define GLAD_PLATFORM_EMSCRIPTEN 1\n  #else\n    #define GLAD_PLATFORM_EMSCRIPTEN 0\n  #endif\n#endif\n\n#ifndef GLAD_PLATFORM_UWP\n  #if defined(_MSC_VER) && !defined(GLAD_INTERNAL_HAVE_WINAPIFAMILY)\n    #ifdef __has_include\n      #if __has_include(<winapifamily.h>)\n        #define GLAD_INTERNAL_HAVE_WINAPIFAMILY 1\n      #endif\n    #elif _MSC_VER >= 1700 && !_USING_V110_SDK71_\n      #define GLAD_INTERNAL_HAVE_WINAPIFAMILY 1\n    #endif\n  #endif\n\n  #ifdef GLAD_INTERNAL_HAVE_WINAPIFAMILY\n    #include <winapifamily.h>\n    #if !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) && WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)\n      #define GLAD_PLATFORM_UWP 1\n    #endif\n  #endif\n\n  #ifndef GLAD_PLATFORM_UWP\n    #define GLAD_PLATFORM_UWP 0\n  #endif\n#endif\n\n#ifdef __GNUC__\n  #define GLAD_GNUC_EXTENSION __extension__\n#else\n  #define GLAD_GNUC_EXTENSION\n#endif\n\n#ifndef GLAD_API_CALL\n  #if defined(GLAD_API_CALL_EXPORT)\n    #if GLAD_PLATFORM_WIN32 || defined(__CYGWIN__)\n      #if defined(GLAD_API_CALL_EXPORT_BUILD)\n        #if defined(__GNUC__)\n          #define GLAD_API_CALL __attribute__ ((dllexport)) extern\n        #else\n          #define GLAD_API_CALL __declspec(dllexport) extern\n        #endif\n      #else\n        #if defined(__GNUC__)\n          #define GLAD_API_CALL __attribute__ ((dllimport)) extern\n        #else\n          #define GLAD_API_CALL __declspec(dllimport) extern\n        #endif\n      #endif\n    #elif defined(__GNUC__) && defined(GLAD_API_CALL_EXPORT_BUILD)\n      #define GLAD_API_CALL __attribute__ ((visibility (\"default\"))) extern\n    #else\n      #define GLAD_API_CALL extern\n    #endif\n  #else\n    #define GLAD_API_CALL extern\n  #endif\n#endif\n\n#ifdef APIENTRY\n  #define GLAD_API_PTR APIENTRY\n#elif GLAD_PLATFORM_WIN32\n  #define GLAD_API_PTR __stdcall\n#else\n  #define GLAD_API_PTR\n#endif\n\n#ifndef GLAPI\n#define GLAPI GLAD_API_CALL\n#endif\n\n#ifndef GLAPIENTRY\n#define GLAPIENTRY GLAD_API_PTR\n#endif\n\n\n#define GLAD_MAKE_VERSION(major, minor) (major * 10000 + minor)\n#define GLAD_VERSION_MAJOR(version) (version / 10000)\n#define GLAD_VERSION_MINOR(version) (version % 10000)\n\ntypedef void (*GLADapiproc)(void);\n\ntypedef GLADapiproc (*GLADloadfunc)(const char *name);\ntypedef GLADapiproc (*GLADuserptrloadfunc)(const char *name, void *userptr);\n\ntypedef void (*GLADprecallback)(const char *name, GLADapiproc apiproc, int len_args, ...);\ntypedef void (*GLADpostcallback)(void *ret, const char *name, GLADapiproc apiproc, int len_args, ...);\n\n#endif /* GLAD_PLATFORM_H_ */\n\n#define GL_2D 0x0600\n#define GL_2_BYTES 0x1407\n#define GL_3D 0x0601\n#define GL_3D_COLOR 0x0602\n#define GL_3D_COLOR_TEXTURE 0x0603\n#define GL_3_BYTES 0x1408\n#define GL_4D_COLOR_TEXTURE 0x0604\n#define GL_4_BYTES 0x1409\n#define GL_ACCUM 0x0100\n#define GL_ACCUM_ALPHA_BITS 0x0D5B\n#define GL_ACCUM_BLUE_BITS 0x0D5A\n#define GL_ACCUM_BUFFER_BIT 0x00000200\n#define GL_ACCUM_CLEAR_VALUE 0x0B80\n#define GL_ACCUM_GREEN_BITS 0x0D59\n#define GL_ACCUM_RED_BITS 0x0D58\n#define GL_ACTIVE_ATTRIBUTES 0x8B89\n#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A\n#define GL_ACTIVE_TEXTURE 0x84E0\n#define GL_ACTIVE_UNIFORMS 0x8B86\n#define GL_ACTIVE_UNIFORM_BLOCKS 0x8A36\n#define GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH 0x8A35\n#define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87\n#define GL_ADD 0x0104\n#define GL_ADD_SIGNED 0x8574\n#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E\n#define GL_ALIASED_POINT_SIZE_RANGE 0x846D\n#define GL_ALL_ATTRIB_BITS 0xFFFFFFFF\n#define GL_ALPHA 0x1906\n#define GL_ALPHA12 0x803D\n#define GL_ALPHA16 0x803E\n#define GL_ALPHA4 0x803B\n#define GL_ALPHA8 0x803C\n#define GL_ALPHA_BIAS 0x0D1D\n#define GL_ALPHA_BITS 0x0D55\n#define GL_ALPHA_INTEGER 0x8D97\n#define GL_ALPHA_SCALE 0x0D1C\n#define GL_ALPHA_TEST 0x0BC0\n#define GL_ALPHA_TEST_FUNC 0x0BC1\n#define GL_ALPHA_TEST_REF 0x0BC2\n#define GL_ALREADY_SIGNALED 0x911A\n#define GL_ALWAYS 0x0207\n#define GL_AMBIENT 0x1200\n#define GL_AMBIENT_AND_DIFFUSE 0x1602\n#define GL_AND 0x1501\n#define GL_AND_INVERTED 0x1504\n#define GL_AND_REVERSE 0x1502\n#define GL_ANY_SAMPLES_PASSED 0x8C2F\n#define GL_ARRAY_BUFFER 0x8892\n#define GL_ARRAY_BUFFER_BINDING 0x8894\n#define GL_ATTACHED_SHADERS 0x8B85\n#define GL_ATTRIB_STACK_DEPTH 0x0BB0\n#define GL_AUTO_NORMAL 0x0D80\n#define GL_AUX0 0x0409\n#define GL_AUX1 0x040A\n#define GL_AUX2 0x040B\n#define GL_AUX3 0x040C\n#define GL_AUX_BUFFERS 0x0C00\n#define GL_BACK 0x0405\n#define GL_BACK_LEFT 0x0402\n#define GL_BACK_RIGHT 0x0403\n#define GL_BGR 0x80E0\n#define GL_BGRA 0x80E1\n#define GL_BGRA_INTEGER 0x8D9B\n#define GL_BGR_INTEGER 0x8D9A\n#define GL_BITMAP 0x1A00\n#define GL_BITMAP_TOKEN 0x0704\n#define GL_BLEND 0x0BE2\n#define GL_BLEND_COLOR 0x8005\n#define GL_BLEND_DST 0x0BE0\n#define GL_BLEND_DST_ALPHA 0x80CA\n#define GL_BLEND_DST_RGB 0x80C8\n#define GL_BLEND_EQUATION 0x8009\n#define GL_BLEND_EQUATION_ALPHA 0x883D\n#define GL_BLEND_EQUATION_RGB 0x8009\n#define GL_BLEND_SRC 0x0BE1\n#define GL_BLEND_SRC_ALPHA 0x80CB\n#define GL_BLEND_SRC_RGB 0x80C9\n#define GL_BLUE 0x1905\n#define GL_BLUE_BIAS 0x0D1B\n#define GL_BLUE_BITS 0x0D54\n#define GL_BLUE_INTEGER 0x8D96\n#define GL_BLUE_SCALE 0x0D1A\n#define GL_BOOL 0x8B56\n#define GL_BOOL_VEC2 0x8B57\n#define GL_BOOL_VEC3 0x8B58\n#define GL_BOOL_VEC4 0x8B59\n#define GL_BUFFER 0x82E0\n#define GL_BUFFER_ACCESS 0x88BB\n#define GL_BUFFER_ACCESS_FLAGS 0x911F\n#define GL_BUFFER_MAPPED 0x88BC\n#define GL_BUFFER_MAP_LENGTH 0x9120\n#define GL_BUFFER_MAP_OFFSET 0x9121\n#define GL_BUFFER_MAP_POINTER 0x88BD\n#define GL_BUFFER_SIZE 0x8764\n#define GL_BUFFER_USAGE 0x8765\n#define GL_BYTE 0x1400\n#define GL_C3F_V3F 0x2A24\n#define GL_C4F_N3F_V3F 0x2A26\n#define GL_C4UB_V2F 0x2A22\n#define GL_C4UB_V3F 0x2A23\n#define GL_CCW 0x0901\n#define GL_CLAMP 0x2900\n#define GL_CLAMP_FRAGMENT_COLOR 0x891B\n#define GL_CLAMP_READ_COLOR 0x891C\n#define GL_CLAMP_TO_BORDER 0x812D\n#define GL_CLAMP_TO_EDGE 0x812F\n#define GL_CLAMP_VERTEX_COLOR 0x891A\n#define GL_CLEAR 0x1500\n#define GL_CLIENT_ACTIVE_TEXTURE 0x84E1\n#define GL_CLIENT_ALL_ATTRIB_BITS 0xFFFFFFFF\n#define GL_CLIENT_ATTRIB_STACK_DEPTH 0x0BB1\n#define GL_CLIENT_PIXEL_STORE_BIT 0x00000001\n#define GL_CLIENT_VERTEX_ARRAY_BIT 0x00000002\n#define GL_CLIP_DISTANCE0 0x3000\n#define GL_CLIP_DISTANCE1 0x3001\n#define GL_CLIP_DISTANCE2 0x3002\n#define GL_CLIP_DISTANCE3 0x3003\n#define GL_CLIP_DISTANCE4 0x3004\n#define GL_CLIP_DISTANCE5 0x3005\n#define GL_CLIP_DISTANCE6 0x3006\n#define GL_CLIP_DISTANCE7 0x3007\n#define GL_CLIP_PLANE0 0x3000\n#define GL_CLIP_PLANE1 0x3001\n#define GL_CLIP_PLANE2 0x3002\n#define GL_CLIP_PLANE3 0x3003\n#define GL_CLIP_PLANE4 0x3004\n#define GL_CLIP_PLANE5 0x3005\n#define GL_COEFF 0x0A00\n#define GL_COLOR 0x1800\n#define GL_COLOR_ARRAY 0x8076\n#define GL_COLOR_ARRAY_BUFFER_BINDING 0x8898\n#define GL_COLOR_ARRAY_POINTER 0x8090\n#define GL_COLOR_ARRAY_SIZE 0x8081\n#define GL_COLOR_ARRAY_STRIDE 0x8083\n#define GL_COLOR_ARRAY_TYPE 0x8082\n#define GL_COLOR_ATTACHMENT0 0x8CE0\n#define GL_COLOR_ATTACHMENT1 0x8CE1\n#define GL_COLOR_ATTACHMENT10 0x8CEA\n#define GL_COLOR_ATTACHMENT11 0x8CEB\n#define GL_COLOR_ATTACHMENT12 0x8CEC\n#define GL_COLOR_ATTACHMENT13 0x8CED\n#define GL_COLOR_ATTACHMENT14 0x8CEE\n#define GL_COLOR_ATTACHMENT15 0x8CEF\n#define GL_COLOR_ATTACHMENT16 0x8CF0\n#define GL_COLOR_ATTACHMENT17 0x8CF1\n#define GL_COLOR_ATTACHMENT18 0x8CF2\n#define GL_COLOR_ATTACHMENT19 0x8CF3\n#define GL_COLOR_ATTACHMENT2 0x8CE2\n#define GL_COLOR_ATTACHMENT20 0x8CF4\n#define GL_COLOR_ATTACHMENT21 0x8CF5\n#define GL_COLOR_ATTACHMENT22 0x8CF6\n#define GL_COLOR_ATTACHMENT23 0x8CF7\n#define GL_COLOR_ATTACHMENT24 0x8CF8\n#define GL_COLOR_ATTACHMENT25 0x8CF9\n#define GL_COLOR_ATTACHMENT26 0x8CFA\n#define GL_COLOR_ATTACHMENT27 0x8CFB\n#define GL_COLOR_ATTACHMENT28 0x8CFC\n#define GL_COLOR_ATTACHMENT29 0x8CFD\n#define GL_COLOR_ATTACHMENT3 0x8CE3\n#define GL_COLOR_ATTACHMENT30 0x8CFE\n#define GL_COLOR_ATTACHMENT31 0x8CFF\n#define GL_COLOR_ATTACHMENT4 0x8CE4\n#define GL_COLOR_ATTACHMENT5 0x8CE5\n#define GL_COLOR_ATTACHMENT6 0x8CE6\n#define GL_COLOR_ATTACHMENT7 0x8CE7\n#define GL_COLOR_ATTACHMENT8 0x8CE8\n#define GL_COLOR_ATTACHMENT9 0x8CE9\n#define GL_COLOR_BUFFER_BIT 0x00004000\n#define GL_COLOR_CLEAR_VALUE 0x0C22\n#define GL_COLOR_INDEX 0x1900\n#define GL_COLOR_INDEXES 0x1603\n#define GL_COLOR_LOGIC_OP 0x0BF2\n#define GL_COLOR_MATERIAL 0x0B57\n#define GL_COLOR_MATERIAL_FACE 0x0B55\n#define GL_COLOR_MATERIAL_PARAMETER 0x0B56\n#define GL_COLOR_SUM 0x8458\n#define GL_COLOR_WRITEMASK 0x0C23\n#define GL_COMBINE 0x8570\n#define GL_COMBINE_ALPHA 0x8572\n#define GL_COMBINE_RGB 0x8571\n#define GL_COMPARE_REF_TO_TEXTURE 0x884E\n#define GL_COMPARE_R_TO_TEXTURE 0x884E\n#define GL_COMPILE 0x1300\n#define GL_COMPILE_AND_EXECUTE 0x1301\n#define GL_COMPILE_STATUS 0x8B81\n#define GL_COMPRESSED_ALPHA 0x84E9\n#define GL_COMPRESSED_INTENSITY 0x84EC\n#define GL_COMPRESSED_LUMINANCE 0x84EA\n#define GL_COMPRESSED_LUMINANCE_ALPHA 0x84EB\n#define GL_COMPRESSED_RED 0x8225\n#define GL_COMPRESSED_RED_RGTC1 0x8DBB\n#define GL_COMPRESSED_RG 0x8226\n#define GL_COMPRESSED_RGB 0x84ED\n#define GL_COMPRESSED_RGBA 0x84EE\n#define GL_COMPRESSED_RG_RGTC2 0x8DBD\n#define GL_COMPRESSED_SIGNED_RED_RGTC1 0x8DBC\n#define GL_COMPRESSED_SIGNED_RG_RGTC2 0x8DBE\n#define GL_COMPRESSED_SLUMINANCE 0x8C4A\n#define GL_COMPRESSED_SLUMINANCE_ALPHA 0x8C4B\n#define GL_COMPRESSED_SRGB 0x8C48\n#define GL_COMPRESSED_SRGB_ALPHA 0x8C49\n#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3\n#define GL_CONDITION_SATISFIED 0x911C\n#define GL_CONSTANT 0x8576\n#define GL_CONSTANT_ALPHA 0x8003\n#define GL_CONSTANT_ATTENUATION 0x1207\n#define GL_CONSTANT_COLOR 0x8001\n#define GL_CONTEXT_COMPATIBILITY_PROFILE_BIT 0x00000002\n#define GL_CONTEXT_CORE_PROFILE_BIT 0x00000001\n#define GL_CONTEXT_FLAGS 0x821E\n#define GL_CONTEXT_FLAG_DEBUG_BIT 0x00000002\n#define GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT 0x00000001\n#define GL_CONTEXT_FLAG_ROBUST_ACCESS_BIT_ARB 0x00000004\n#define GL_CONTEXT_PROFILE_MASK 0x9126\n#define GL_COORD_REPLACE 0x8862\n#define GL_COPY 0x1503\n#define GL_COPY_INVERTED 0x150C\n#define GL_COPY_PIXEL_TOKEN 0x0706\n#define GL_COPY_READ_BUFFER 0x8F36\n#define GL_COPY_WRITE_BUFFER 0x8F37\n#define GL_CULL_FACE 0x0B44\n#define GL_CULL_FACE_MODE 0x0B45\n#define GL_CURRENT_BIT 0x00000001\n#define GL_CURRENT_COLOR 0x0B00\n#define GL_CURRENT_FOG_COORD 0x8453\n#define GL_CURRENT_FOG_COORDINATE 0x8453\n#define GL_CURRENT_INDEX 0x0B01\n#define GL_CURRENT_NORMAL 0x0B02\n#define GL_CURRENT_PROGRAM 0x8B8D\n#define GL_CURRENT_QUERY 0x8865\n#define GL_CURRENT_RASTER_COLOR 0x0B04\n#define GL_CURRENT_RASTER_DISTANCE 0x0B09\n#define GL_CURRENT_RASTER_INDEX 0x0B05\n#define GL_CURRENT_RASTER_POSITION 0x0B07\n#define GL_CURRENT_RASTER_POSITION_VALID 0x0B08\n#define GL_CURRENT_RASTER_SECONDARY_COLOR 0x845F\n#define GL_CURRENT_RASTER_TEXTURE_COORDS 0x0B06\n#define GL_CURRENT_SECONDARY_COLOR 0x8459\n#define GL_CURRENT_TEXTURE_COORDS 0x0B03\n#define GL_CURRENT_VERTEX_ATTRIB 0x8626\n#define GL_CW 0x0900\n#define GL_DEBUG_CALLBACK_FUNCTION 0x8244\n#define GL_DEBUG_CALLBACK_USER_PARAM 0x8245\n#define GL_DEBUG_GROUP_STACK_DEPTH 0x826D\n#define GL_DEBUG_LOGGED_MESSAGES 0x9145\n#define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH 0x8243\n#define GL_DEBUG_OUTPUT 0x92E0\n#define GL_DEBUG_OUTPUT_SYNCHRONOUS 0x8242\n#define GL_DEBUG_SEVERITY_HIGH 0x9146\n#define GL_DEBUG_SEVERITY_LOW 0x9148\n#define GL_DEBUG_SEVERITY_MEDIUM 0x9147\n#define GL_DEBUG_SEVERITY_NOTIFICATION 0x826B\n#define GL_DEBUG_SOURCE_API 0x8246\n#define GL_DEBUG_SOURCE_APPLICATION 0x824A\n#define GL_DEBUG_SOURCE_OTHER 0x824B\n#define GL_DEBUG_SOURCE_SHADER_COMPILER 0x8248\n#define GL_DEBUG_SOURCE_THIRD_PARTY 0x8249\n#define GL_DEBUG_SOURCE_WINDOW_SYSTEM 0x8247\n#define GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR 0x824D\n#define GL_DEBUG_TYPE_ERROR 0x824C\n#define GL_DEBUG_TYPE_MARKER 0x8268\n#define GL_DEBUG_TYPE_OTHER 0x8251\n#define GL_DEBUG_TYPE_PERFORMANCE 0x8250\n#define GL_DEBUG_TYPE_POP_GROUP 0x826A\n#define GL_DEBUG_TYPE_PORTABILITY 0x824F\n#define GL_DEBUG_TYPE_PUSH_GROUP 0x8269\n#define GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR 0x824E\n#define GL_DECAL 0x2101\n#define GL_DECR 0x1E03\n#define GL_DECR_WRAP 0x8508\n#define GL_DELETE_STATUS 0x8B80\n#define GL_DEPTH 0x1801\n#define GL_DEPTH24_STENCIL8 0x88F0\n#define GL_DEPTH32F_STENCIL8 0x8CAD\n#define GL_DEPTH_ATTACHMENT 0x8D00\n#define GL_DEPTH_BIAS 0x0D1F\n#define GL_DEPTH_BITS 0x0D56\n#define GL_DEPTH_BUFFER_BIT 0x00000100\n#define GL_DEPTH_CLAMP 0x864F\n#define GL_DEPTH_CLEAR_VALUE 0x0B73\n#define GL_DEPTH_COMPONENT 0x1902\n#define GL_DEPTH_COMPONENT16 0x81A5\n#define GL_DEPTH_COMPONENT24 0x81A6\n#define GL_DEPTH_COMPONENT32 0x81A7\n#define GL_DEPTH_COMPONENT32F 0x8CAC\n#define GL_DEPTH_FUNC 0x0B74\n#define GL_DEPTH_RANGE 0x0B70\n#define GL_DEPTH_SCALE 0x0D1E\n#define GL_DEPTH_STENCIL 0x84F9\n#define GL_DEPTH_STENCIL_ATTACHMENT 0x821A\n#define GL_DEPTH_TEST 0x0B71\n#define GL_DEPTH_TEXTURE_MODE 0x884B\n#define GL_DEPTH_WRITEMASK 0x0B72\n#define GL_DIFFUSE 0x1201\n#define GL_DISPLAY_LIST 0x82E7\n#define GL_DITHER 0x0BD0\n#define GL_DOMAIN 0x0A02\n#define GL_DONT_CARE 0x1100\n#define GL_DOT3_RGB 0x86AE\n#define GL_DOT3_RGBA 0x86AF\n#define GL_DOUBLE 0x140A\n#define GL_DOUBLEBUFFER 0x0C32\n#define GL_DRAW_BUFFER 0x0C01\n#define GL_DRAW_BUFFER0 0x8825\n#define GL_DRAW_BUFFER1 0x8826\n#define GL_DRAW_BUFFER10 0x882F\n#define GL_DRAW_BUFFER11 0x8830\n#define GL_DRAW_BUFFER12 0x8831\n#define GL_DRAW_BUFFER13 0x8832\n#define GL_DRAW_BUFFER14 0x8833\n#define GL_DRAW_BUFFER15 0x8834\n#define GL_DRAW_BUFFER2 0x8827\n#define GL_DRAW_BUFFER3 0x8828\n#define GL_DRAW_BUFFER4 0x8829\n#define GL_DRAW_BUFFER5 0x882A\n#define GL_DRAW_BUFFER6 0x882B\n#define GL_DRAW_BUFFER7 0x882C\n#define GL_DRAW_BUFFER8 0x882D\n#define GL_DRAW_BUFFER9 0x882E\n#define GL_DRAW_FRAMEBUFFER 0x8CA9\n#define GL_DRAW_FRAMEBUFFER_BINDING 0x8CA6\n#define GL_DRAW_PIXEL_TOKEN 0x0705\n#define GL_DST_ALPHA 0x0304\n#define GL_DST_COLOR 0x0306\n#define GL_DYNAMIC_COPY 0x88EA\n#define GL_DYNAMIC_DRAW 0x88E8\n#define GL_DYNAMIC_READ 0x88E9\n#define GL_EDGE_FLAG 0x0B43\n#define GL_EDGE_FLAG_ARRAY 0x8079\n#define GL_EDGE_FLAG_ARRAY_BUFFER_BINDING 0x889B\n#define GL_EDGE_FLAG_ARRAY_POINTER 0x8093\n#define GL_EDGE_FLAG_ARRAY_STRIDE 0x808C\n#define GL_ELEMENT_ARRAY_BUFFER 0x8893\n#define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895\n#define GL_EMISSION 0x1600\n#define GL_ENABLE_BIT 0x00002000\n#define GL_EQUAL 0x0202\n#define GL_EQUIV 0x1509\n#define GL_EVAL_BIT 0x00010000\n#define GL_EXP 0x0800\n#define GL_EXP2 0x0801\n#define GL_EXTENSIONS 0x1F03\n#define GL_EYE_LINEAR 0x2400\n#define GL_EYE_PLANE 0x2502\n#define GL_FALSE 0\n#define GL_FASTEST 0x1101\n#define GL_FEEDBACK 0x1C01\n#define GL_FEEDBACK_BUFFER_POINTER 0x0DF0\n#define GL_FEEDBACK_BUFFER_SIZE 0x0DF1\n#define GL_FEEDBACK_BUFFER_TYPE 0x0DF2\n#define GL_FILL 0x1B02\n#define GL_FIRST_VERTEX_CONVENTION 0x8E4D\n#define GL_FIXED_ONLY 0x891D\n#define GL_FLAT 0x1D00\n#define GL_FLOAT 0x1406\n#define GL_FLOAT_32_UNSIGNED_INT_24_8_REV 0x8DAD\n#define GL_FLOAT_MAT2 0x8B5A\n#define GL_FLOAT_MAT2x3 0x8B65\n#define GL_FLOAT_MAT2x4 0x8B66\n#define GL_FLOAT_MAT3 0x8B5B\n#define GL_FLOAT_MAT3x2 0x8B67\n#define GL_FLOAT_MAT3x4 0x8B68\n#define GL_FLOAT_MAT4 0x8B5C\n#define GL_FLOAT_MAT4x2 0x8B69\n#define GL_FLOAT_MAT4x3 0x8B6A\n#define GL_FLOAT_VEC2 0x8B50\n#define GL_FLOAT_VEC3 0x8B51\n#define GL_FLOAT_VEC4 0x8B52\n#define GL_FOG 0x0B60\n#define GL_FOG_BIT 0x00000080\n#define GL_FOG_COLOR 0x0B66\n#define GL_FOG_COORD 0x8451\n#define GL_FOG_COORDINATE 0x8451\n#define GL_FOG_COORDINATE_ARRAY 0x8457\n#define GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING 0x889D\n#define GL_FOG_COORDINATE_ARRAY_POINTER 0x8456\n#define GL_FOG_COORDINATE_ARRAY_STRIDE 0x8455\n#define GL_FOG_COORDINATE_ARRAY_TYPE 0x8454\n#define GL_FOG_COORDINATE_SOURCE 0x8450\n#define GL_FOG_COORD_ARRAY 0x8457\n#define GL_FOG_COORD_ARRAY_BUFFER_BINDING 0x889D\n#define GL_FOG_COORD_ARRAY_POINTER 0x8456\n#define GL_FOG_COORD_ARRAY_STRIDE 0x8455\n#define GL_FOG_COORD_ARRAY_TYPE 0x8454\n#define GL_FOG_COORD_SRC 0x8450\n#define GL_FOG_DENSITY 0x0B62\n#define GL_FOG_END 0x0B64\n#define GL_FOG_HINT 0x0C54\n#define GL_FOG_INDEX 0x0B61\n#define GL_FOG_MODE 0x0B65\n#define GL_FOG_START 0x0B63\n#define GL_FRAGMENT_DEPTH 0x8452\n#define GL_FRAGMENT_SHADER 0x8B30\n#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT 0x8B8B\n#define GL_FRAMEBUFFER 0x8D40\n#define GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE 0x8215\n#define GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE 0x8214\n#define GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING 0x8210\n#define GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE 0x8211\n#define GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE 0x8216\n#define GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE 0x8213\n#define GL_FRAMEBUFFER_ATTACHMENT_LAYERED 0x8DA7\n#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME 0x8CD1\n#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE 0x8CD0\n#define GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE 0x8212\n#define GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE 0x8217\n#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE 0x8CD3\n#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER 0x8CD4\n#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL 0x8CD2\n#define GL_FRAMEBUFFER_BINDING 0x8CA6\n#define GL_FRAMEBUFFER_COMPLETE 0x8CD5\n#define GL_FRAMEBUFFER_DEFAULT 0x8218\n#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6\n#define GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER 0x8CDB\n#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS 0x8DA8\n#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7\n#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE 0x8D56\n#define GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER 0x8CDC\n#define GL_FRAMEBUFFER_SRGB 0x8DB9\n#define GL_FRAMEBUFFER_UNDEFINED 0x8219\n#define GL_FRAMEBUFFER_UNSUPPORTED 0x8CDD\n#define GL_FRONT 0x0404\n#define GL_FRONT_AND_BACK 0x0408\n#define GL_FRONT_FACE 0x0B46\n#define GL_FRONT_LEFT 0x0400\n#define GL_FRONT_RIGHT 0x0401\n#define GL_FUNC_ADD 0x8006\n#define GL_FUNC_REVERSE_SUBTRACT 0x800B\n#define GL_FUNC_SUBTRACT 0x800A\n#define GL_GENERATE_MIPMAP 0x8191\n#define GL_GENERATE_MIPMAP_HINT 0x8192\n#define GL_GEOMETRY_INPUT_TYPE 0x8917\n#define GL_GEOMETRY_OUTPUT_TYPE 0x8918\n#define GL_GEOMETRY_SHADER 0x8DD9\n#define GL_GEOMETRY_VERTICES_OUT 0x8916\n#define GL_GEQUAL 0x0206\n#define GL_GREATER 0x0204\n#define GL_GREEN 0x1904\n#define GL_GREEN_BIAS 0x0D19\n#define GL_GREEN_BITS 0x0D53\n#define GL_GREEN_INTEGER 0x8D95\n#define GL_GREEN_SCALE 0x0D18\n#define GL_GUILTY_CONTEXT_RESET_ARB 0x8253\n#define GL_HALF_FLOAT 0x140B\n#define GL_HINT_BIT 0x00008000\n#define GL_INCR 0x1E02\n#define GL_INCR_WRAP 0x8507\n#define GL_INDEX 0x8222\n#define GL_INDEX_ARRAY 0x8077\n#define GL_INDEX_ARRAY_BUFFER_BINDING 0x8899\n#define GL_INDEX_ARRAY_POINTER 0x8091\n#define GL_INDEX_ARRAY_STRIDE 0x8086\n#define GL_INDEX_ARRAY_TYPE 0x8085\n#define GL_INDEX_BITS 0x0D51\n#define GL_INDEX_CLEAR_VALUE 0x0C20\n#define GL_INDEX_LOGIC_OP 0x0BF1\n#define GL_INDEX_MODE 0x0C30\n#define GL_INDEX_OFFSET 0x0D13\n#define GL_INDEX_SHIFT 0x0D12\n#define GL_INDEX_WRITEMASK 0x0C21\n#define GL_INFO_LOG_LENGTH 0x8B84\n#define GL_INNOCENT_CONTEXT_RESET_ARB 0x8254\n#define GL_INT 0x1404\n#define GL_INTENSITY 0x8049\n#define GL_INTENSITY12 0x804C\n#define GL_INTENSITY16 0x804D\n#define GL_INTENSITY4 0x804A\n#define GL_INTENSITY8 0x804B\n#define GL_INTERLEAVED_ATTRIBS 0x8C8C\n#define GL_INTERPOLATE 0x8575\n#define GL_INT_2_10_10_10_REV 0x8D9F\n#define GL_INT_SAMPLER_1D 0x8DC9\n#define GL_INT_SAMPLER_1D_ARRAY 0x8DCE\n#define GL_INT_SAMPLER_2D 0x8DCA\n#define GL_INT_SAMPLER_2D_ARRAY 0x8DCF\n#define GL_INT_SAMPLER_2D_MULTISAMPLE 0x9109\n#define GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910C\n#define GL_INT_SAMPLER_2D_RECT 0x8DCD\n#define GL_INT_SAMPLER_3D 0x8DCB\n#define GL_INT_SAMPLER_BUFFER 0x8DD0\n#define GL_INT_SAMPLER_CUBE 0x8DCC\n#define GL_INT_VEC2 0x8B53\n#define GL_INT_VEC3 0x8B54\n#define GL_INT_VEC4 0x8B55\n#define GL_INVALID_ENUM 0x0500\n#define GL_INVALID_FRAMEBUFFER_OPERATION 0x0506\n#define GL_INVALID_INDEX 0xFFFFFFFF\n#define GL_INVALID_OPERATION 0x0502\n#define GL_INVALID_VALUE 0x0501\n#define GL_INVERT 0x150A\n#define GL_KEEP 0x1E00\n#define GL_LAST_VERTEX_CONVENTION 0x8E4E\n#define GL_LEFT 0x0406\n#define GL_LEQUAL 0x0203\n#define GL_LESS 0x0201\n#define GL_LIGHT0 0x4000\n#define GL_LIGHT1 0x4001\n#define GL_LIGHT2 0x4002\n#define GL_LIGHT3 0x4003\n#define GL_LIGHT4 0x4004\n#define GL_LIGHT5 0x4005\n#define GL_LIGHT6 0x4006\n#define GL_LIGHT7 0x4007\n#define GL_LIGHTING 0x0B50\n#define GL_LIGHTING_BIT 0x00000040\n#define GL_LIGHT_MODEL_AMBIENT 0x0B53\n#define GL_LIGHT_MODEL_COLOR_CONTROL 0x81F8\n#define GL_LIGHT_MODEL_LOCAL_VIEWER 0x0B51\n#define GL_LIGHT_MODEL_TWO_SIDE 0x0B52\n#define GL_LINE 0x1B01\n#define GL_LINEAR 0x2601\n#define GL_LINEAR_ATTENUATION 0x1208\n#define GL_LINEAR_MIPMAP_LINEAR 0x2703\n#define GL_LINEAR_MIPMAP_NEAREST 0x2701\n#define GL_LINES 0x0001\n#define GL_LINES_ADJACENCY 0x000A\n#define GL_LINE_BIT 0x00000004\n#define GL_LINE_LOOP 0x0002\n#define GL_LINE_RESET_TOKEN 0x0707\n#define GL_LINE_SMOOTH 0x0B20\n#define GL_LINE_SMOOTH_HINT 0x0C52\n#define GL_LINE_STIPPLE 0x0B24\n#define GL_LINE_STIPPLE_PATTERN 0x0B25\n#define GL_LINE_STIPPLE_REPEAT 0x0B26\n#define GL_LINE_STRIP 0x0003\n#define GL_LINE_STRIP_ADJACENCY 0x000B\n#define GL_LINE_TOKEN 0x0702\n#define GL_LINE_WIDTH 0x0B21\n#define GL_LINE_WIDTH_GRANULARITY 0x0B23\n#define GL_LINE_WIDTH_RANGE 0x0B22\n#define GL_LINK_STATUS 0x8B82\n#define GL_LIST_BASE 0x0B32\n#define GL_LIST_BIT 0x00020000\n#define GL_LIST_INDEX 0x0B33\n#define GL_LIST_MODE 0x0B30\n#define GL_LOAD 0x0101\n#define GL_LOGIC_OP 0x0BF1\n#define GL_LOGIC_OP_MODE 0x0BF0\n#define GL_LOSE_CONTEXT_ON_RESET_ARB 0x8252\n#define GL_LOWER_LEFT 0x8CA1\n#define GL_LUMINANCE 0x1909\n#define GL_LUMINANCE12 0x8041\n#define GL_LUMINANCE12_ALPHA12 0x8047\n#define GL_LUMINANCE12_ALPHA4 0x8046\n#define GL_LUMINANCE16 0x8042\n#define GL_LUMINANCE16_ALPHA16 0x8048\n#define GL_LUMINANCE4 0x803F\n#define GL_LUMINANCE4_ALPHA4 0x8043\n#define GL_LUMINANCE6_ALPHA2 0x8044\n#define GL_LUMINANCE8 0x8040\n#define GL_LUMINANCE8_ALPHA8 0x8045\n#define GL_LUMINANCE_ALPHA 0x190A\n#define GL_MAJOR_VERSION 0x821B\n#define GL_MAP1_COLOR_4 0x0D90\n#define GL_MAP1_GRID_DOMAIN 0x0DD0\n#define GL_MAP1_GRID_SEGMENTS 0x0DD1\n#define GL_MAP1_INDEX 0x0D91\n#define GL_MAP1_NORMAL 0x0D92\n#define GL_MAP1_TEXTURE_COORD_1 0x0D93\n#define GL_MAP1_TEXTURE_COORD_2 0x0D94\n#define GL_MAP1_TEXTURE_COORD_3 0x0D95\n#define GL_MAP1_TEXTURE_COORD_4 0x0D96\n#define GL_MAP1_VERTEX_3 0x0D97\n#define GL_MAP1_VERTEX_4 0x0D98\n#define GL_MAP2_COLOR_4 0x0DB0\n#define GL_MAP2_GRID_DOMAIN 0x0DD2\n#define GL_MAP2_GRID_SEGMENTS 0x0DD3\n#define GL_MAP2_INDEX 0x0DB1\n#define GL_MAP2_NORMAL 0x0DB2\n#define GL_MAP2_TEXTURE_COORD_1 0x0DB3\n#define GL_MAP2_TEXTURE_COORD_2 0x0DB4\n#define GL_MAP2_TEXTURE_COORD_3 0x0DB5\n#define GL_MAP2_TEXTURE_COORD_4 0x0DB6\n#define GL_MAP2_VERTEX_3 0x0DB7\n#define GL_MAP2_VERTEX_4 0x0DB8\n#define GL_MAP_COLOR 0x0D10\n#define GL_MAP_FLUSH_EXPLICIT_BIT 0x0010\n#define GL_MAP_INVALIDATE_BUFFER_BIT 0x0008\n#define GL_MAP_INVALIDATE_RANGE_BIT 0x0004\n#define GL_MAP_READ_BIT 0x0001\n#define GL_MAP_STENCIL 0x0D11\n#define GL_MAP_UNSYNCHRONIZED_BIT 0x0020\n#define GL_MAP_WRITE_BIT 0x0002\n#define GL_MATRIX_MODE 0x0BA0\n#define GL_MAX 0x8008\n#define GL_MAX_3D_TEXTURE_SIZE 0x8073\n#define GL_MAX_ARRAY_TEXTURE_LAYERS 0x88FF\n#define GL_MAX_ATTRIB_STACK_DEPTH 0x0D35\n#define GL_MAX_CLIENT_ATTRIB_STACK_DEPTH 0x0D3B\n#define GL_MAX_CLIP_DISTANCES 0x0D32\n#define GL_MAX_CLIP_PLANES 0x0D32\n#define GL_MAX_COLOR_ATTACHMENTS 0x8CDF\n#define GL_MAX_COLOR_TEXTURE_SAMPLES 0x910E\n#define GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS 0x8A33\n#define GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS 0x8A32\n#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D\n#define GL_MAX_COMBINED_UNIFORM_BLOCKS 0x8A2E\n#define GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS 0x8A31\n#define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C\n#define GL_MAX_DEBUG_GROUP_STACK_DEPTH 0x826C\n#define GL_MAX_DEBUG_LOGGED_MESSAGES 0x9144\n#define GL_MAX_DEBUG_MESSAGE_LENGTH 0x9143\n#define GL_MAX_DEPTH_TEXTURE_SAMPLES 0x910F\n#define GL_MAX_DRAW_BUFFERS 0x8824\n#define GL_MAX_DUAL_SOURCE_DRAW_BUFFERS 0x88FC\n#define GL_MAX_ELEMENTS_INDICES 0x80E9\n#define GL_MAX_ELEMENTS_VERTICES 0x80E8\n#define GL_MAX_EVAL_ORDER 0x0D30\n#define GL_MAX_FRAGMENT_INPUT_COMPONENTS 0x9125\n#define GL_MAX_FRAGMENT_UNIFORM_BLOCKS 0x8A2D\n#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS 0x8B49\n#define GL_MAX_GEOMETRY_INPUT_COMPONENTS 0x9123\n#define GL_MAX_GEOMETRY_OUTPUT_COMPONENTS 0x9124\n#define GL_MAX_GEOMETRY_OUTPUT_VERTICES 0x8DE0\n#define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS 0x8C29\n#define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS 0x8DE1\n#define GL_MAX_GEOMETRY_UNIFORM_BLOCKS 0x8A2C\n#define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS 0x8DDF\n#define GL_MAX_INTEGER_SAMPLES 0x9110\n#define GL_MAX_LABEL_LENGTH 0x82E8\n#define GL_MAX_LIGHTS 0x0D31\n#define GL_MAX_LIST_NESTING 0x0B31\n#define GL_MAX_MODELVIEW_STACK_DEPTH 0x0D36\n#define GL_MAX_NAME_STACK_DEPTH 0x0D37\n#define GL_MAX_PIXEL_MAP_TABLE 0x0D34\n#define GL_MAX_PROGRAM_TEXEL_OFFSET 0x8905\n#define GL_MAX_PROJECTION_STACK_DEPTH 0x0D38\n#define GL_MAX_RECTANGLE_TEXTURE_SIZE 0x84F8\n#define GL_MAX_RENDERBUFFER_SIZE 0x84E8\n#define GL_MAX_SAMPLES 0x8D57\n#define GL_MAX_SAMPLE_MASK_WORDS 0x8E59\n#define GL_MAX_SERVER_WAIT_TIMEOUT 0x9111\n#define GL_MAX_TEXTURE_BUFFER_SIZE 0x8C2B\n#define GL_MAX_TEXTURE_COORDS 0x8871\n#define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872\n#define GL_MAX_TEXTURE_LOD_BIAS 0x84FD\n#define GL_MAX_TEXTURE_SIZE 0x0D33\n#define GL_MAX_TEXTURE_STACK_DEPTH 0x0D39\n#define GL_MAX_TEXTURE_UNITS 0x84E2\n#define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS 0x8C8A\n#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS 0x8C8B\n#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS 0x8C80\n#define GL_MAX_UNIFORM_BLOCK_SIZE 0x8A30\n#define GL_MAX_UNIFORM_BUFFER_BINDINGS 0x8A2F\n#define GL_MAX_VARYING_COMPONENTS 0x8B4B\n#define GL_MAX_VARYING_FLOATS 0x8B4B\n#define GL_MAX_VERTEX_ATTRIBS 0x8869\n#define GL_MAX_VERTEX_OUTPUT_COMPONENTS 0x9122\n#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C\n#define GL_MAX_VERTEX_UNIFORM_BLOCKS 0x8A2B\n#define GL_MAX_VERTEX_UNIFORM_COMPONENTS 0x8B4A\n#define GL_MAX_VIEWPORT_DIMS 0x0D3A\n#define GL_MIN 0x8007\n#define GL_MINOR_VERSION 0x821C\n#define GL_MIN_PROGRAM_TEXEL_OFFSET 0x8904\n#define GL_MIRRORED_REPEAT 0x8370\n#define GL_MODELVIEW 0x1700\n#define GL_MODELVIEW_MATRIX 0x0BA6\n#define GL_MODELVIEW_STACK_DEPTH 0x0BA3\n#define GL_MODULATE 0x2100\n#define GL_MULT 0x0103\n#define GL_MULTISAMPLE 0x809D\n#define GL_MULTISAMPLE_ARB 0x809D\n#define GL_MULTISAMPLE_BIT 0x20000000\n#define GL_MULTISAMPLE_BIT_ARB 0x20000000\n#define GL_N3F_V3F 0x2A25\n#define GL_NAME_STACK_DEPTH 0x0D70\n#define GL_NAND 0x150E\n#define GL_NEAREST 0x2600\n#define GL_NEAREST_MIPMAP_LINEAR 0x2702\n#define GL_NEAREST_MIPMAP_NEAREST 0x2700\n#define GL_NEVER 0x0200\n#define GL_NICEST 0x1102\n#define GL_NONE 0\n#define GL_NOOP 0x1505\n#define GL_NOR 0x1508\n#define GL_NORMALIZE 0x0BA1\n#define GL_NORMAL_ARRAY 0x8075\n#define GL_NORMAL_ARRAY_BUFFER_BINDING 0x8897\n#define GL_NORMAL_ARRAY_POINTER 0x808F\n#define GL_NORMAL_ARRAY_STRIDE 0x807F\n#define GL_NORMAL_ARRAY_TYPE 0x807E\n#define GL_NORMAL_MAP 0x8511\n#define GL_NOTEQUAL 0x0205\n#define GL_NO_ERROR 0\n#define GL_NO_RESET_NOTIFICATION_ARB 0x8261\n#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2\n#define GL_NUM_EXTENSIONS 0x821D\n#define GL_OBJECT_LINEAR 0x2401\n#define GL_OBJECT_PLANE 0x2501\n#define GL_OBJECT_TYPE 0x9112\n#define GL_ONE 1\n#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004\n#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002\n#define GL_ONE_MINUS_DST_ALPHA 0x0305\n#define GL_ONE_MINUS_DST_COLOR 0x0307\n#define GL_ONE_MINUS_SRC1_ALPHA 0x88FB\n#define GL_ONE_MINUS_SRC1_COLOR 0x88FA\n#define GL_ONE_MINUS_SRC_ALPHA 0x0303\n#define GL_ONE_MINUS_SRC_COLOR 0x0301\n#define GL_OPERAND0_ALPHA 0x8598\n#define GL_OPERAND0_RGB 0x8590\n#define GL_OPERAND1_ALPHA 0x8599\n#define GL_OPERAND1_RGB 0x8591\n#define GL_OPERAND2_ALPHA 0x859A\n#define GL_OPERAND2_RGB 0x8592\n#define GL_OR 0x1507\n#define GL_ORDER 0x0A01\n#define GL_OR_INVERTED 0x150D\n#define GL_OR_REVERSE 0x150B\n#define GL_OUT_OF_MEMORY 0x0505\n#define GL_PACK_ALIGNMENT 0x0D05\n#define GL_PACK_IMAGE_HEIGHT 0x806C\n#define GL_PACK_LSB_FIRST 0x0D01\n#define GL_PACK_ROW_LENGTH 0x0D02\n#define GL_PACK_SKIP_IMAGES 0x806B\n#define GL_PACK_SKIP_PIXELS 0x0D04\n#define GL_PACK_SKIP_ROWS 0x0D03\n#define GL_PACK_SWAP_BYTES 0x0D00\n#define GL_PASS_THROUGH_TOKEN 0x0700\n#define GL_PERSPECTIVE_CORRECTION_HINT 0x0C50\n#define GL_PIXEL_MAP_A_TO_A 0x0C79\n#define GL_PIXEL_MAP_A_TO_A_SIZE 0x0CB9\n#define GL_PIXEL_MAP_B_TO_B 0x0C78\n#define GL_PIXEL_MAP_B_TO_B_SIZE 0x0CB8\n#define GL_PIXEL_MAP_G_TO_G 0x0C77\n#define GL_PIXEL_MAP_G_TO_G_SIZE 0x0CB7\n#define GL_PIXEL_MAP_I_TO_A 0x0C75\n#define GL_PIXEL_MAP_I_TO_A_SIZE 0x0CB5\n#define GL_PIXEL_MAP_I_TO_B 0x0C74\n#define GL_PIXEL_MAP_I_TO_B_SIZE 0x0CB4\n#define GL_PIXEL_MAP_I_TO_G 0x0C73\n#define GL_PIXEL_MAP_I_TO_G_SIZE 0x0CB3\n#define GL_PIXEL_MAP_I_TO_I 0x0C70\n#define GL_PIXEL_MAP_I_TO_I_SIZE 0x0CB0\n#define GL_PIXEL_MAP_I_TO_R 0x0C72\n#define GL_PIXEL_MAP_I_TO_R_SIZE 0x0CB2\n#define GL_PIXEL_MAP_R_TO_R 0x0C76\n#define GL_PIXEL_MAP_R_TO_R_SIZE 0x0CB6\n#define GL_PIXEL_MAP_S_TO_S 0x0C71\n#define GL_PIXEL_MAP_S_TO_S_SIZE 0x0CB1\n#define GL_PIXEL_MODE_BIT 0x00000020\n#define GL_PIXEL_PACK_BUFFER 0x88EB\n#define GL_PIXEL_PACK_BUFFER_BINDING 0x88ED\n#define GL_PIXEL_UNPACK_BUFFER 0x88EC\n#define GL_PIXEL_UNPACK_BUFFER_BINDING 0x88EF\n#define GL_POINT 0x1B00\n#define GL_POINTS 0x0000\n#define GL_POINT_BIT 0x00000002\n#define GL_POINT_DISTANCE_ATTENUATION 0x8129\n#define GL_POINT_FADE_THRESHOLD_SIZE 0x8128\n#define GL_POINT_SIZE 0x0B11\n#define GL_POINT_SIZE_GRANULARITY 0x0B13\n#define GL_POINT_SIZE_MAX 0x8127\n#define GL_POINT_SIZE_MIN 0x8126\n#define GL_POINT_SIZE_RANGE 0x0B12\n#define GL_POINT_SMOOTH 0x0B10\n#define GL_POINT_SMOOTH_HINT 0x0C51\n#define GL_POINT_SPRITE 0x8861\n#define GL_POINT_SPRITE_COORD_ORIGIN 0x8CA0\n#define GL_POINT_TOKEN 0x0701\n#define GL_POLYGON 0x0009\n#define GL_POLYGON_BIT 0x00000008\n#define GL_POLYGON_MODE 0x0B40\n#define GL_POLYGON_OFFSET_FACTOR 0x8038\n#define GL_POLYGON_OFFSET_FILL 0x8037\n#define GL_POLYGON_OFFSET_LINE 0x2A02\n#define GL_POLYGON_OFFSET_POINT 0x2A01\n#define GL_POLYGON_OFFSET_UNITS 0x2A00\n#define GL_POLYGON_SMOOTH 0x0B41\n#define GL_POLYGON_SMOOTH_HINT 0x0C53\n#define GL_POLYGON_STIPPLE 0x0B42\n#define GL_POLYGON_STIPPLE_BIT 0x00000010\n#define GL_POLYGON_TOKEN 0x0703\n#define GL_POSITION 0x1203\n#define GL_PREVIOUS 0x8578\n#define GL_PRIMARY_COLOR 0x8577\n#define GL_PRIMITIVES_GENERATED 0x8C87\n#define GL_PRIMITIVE_RESTART 0x8F9D\n#define GL_PRIMITIVE_RESTART_INDEX 0x8F9E\n#define GL_PROGRAM 0x82E2\n#define GL_PROGRAM_PIPELINE 0x82E4\n#define GL_PROGRAM_POINT_SIZE 0x8642\n#define GL_PROJECTION 0x1701\n#define GL_PROJECTION_MATRIX 0x0BA7\n#define GL_PROJECTION_STACK_DEPTH 0x0BA4\n#define GL_PROVOKING_VERTEX 0x8E4F\n#define GL_PROXY_TEXTURE_1D 0x8063\n#define GL_PROXY_TEXTURE_1D_ARRAY 0x8C19\n#define GL_PROXY_TEXTURE_2D 0x8064\n#define GL_PROXY_TEXTURE_2D_ARRAY 0x8C1B\n#define GL_PROXY_TEXTURE_2D_MULTISAMPLE 0x9101\n#define GL_PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY 0x9103\n#define GL_PROXY_TEXTURE_3D 0x8070\n#define GL_PROXY_TEXTURE_CUBE_MAP 0x851B\n#define GL_PROXY_TEXTURE_RECTANGLE 0x84F7\n#define GL_Q 0x2003\n#define GL_QUADRATIC_ATTENUATION 0x1209\n#define GL_QUADS 0x0007\n#define GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION 0x8E4C\n#define GL_QUAD_STRIP 0x0008\n#define GL_QUERY 0x82E3\n#define GL_QUERY_BY_REGION_NO_WAIT 0x8E16\n#define GL_QUERY_BY_REGION_WAIT 0x8E15\n#define GL_QUERY_COUNTER_BITS 0x8864\n#define GL_QUERY_NO_WAIT 0x8E14\n#define GL_QUERY_RESULT 0x8866\n#define GL_QUERY_RESULT_AVAILABLE 0x8867\n#define GL_QUERY_WAIT 0x8E13\n#define GL_R 0x2002\n#define GL_R11F_G11F_B10F 0x8C3A\n#define GL_R16 0x822A\n#define GL_R16F 0x822D\n#define GL_R16I 0x8233\n#define GL_R16UI 0x8234\n#define GL_R16_SNORM 0x8F98\n#define GL_R32F 0x822E\n#define GL_R32I 0x8235\n#define GL_R32UI 0x8236\n#define GL_R3_G3_B2 0x2A10\n#define GL_R8 0x8229\n#define GL_R8I 0x8231\n#define GL_R8UI 0x8232\n#define GL_R8_SNORM 0x8F94\n#define GL_RASTERIZER_DISCARD 0x8C89\n#define GL_READ_BUFFER 0x0C02\n#define GL_READ_FRAMEBUFFER 0x8CA8\n#define GL_READ_FRAMEBUFFER_BINDING 0x8CAA\n#define GL_READ_ONLY 0x88B8\n#define GL_READ_WRITE 0x88BA\n#define GL_RED 0x1903\n#define GL_RED_BIAS 0x0D15\n#define GL_RED_BITS 0x0D52\n#define GL_RED_INTEGER 0x8D94\n#define GL_RED_SCALE 0x0D14\n#define GL_REFLECTION_MAP 0x8512\n#define GL_RENDER 0x1C00\n#define GL_RENDERBUFFER 0x8D41\n#define GL_RENDERBUFFER_ALPHA_SIZE 0x8D53\n#define GL_RENDERBUFFER_BINDING 0x8CA7\n#define GL_RENDERBUFFER_BLUE_SIZE 0x8D52\n#define GL_RENDERBUFFER_DEPTH_SIZE 0x8D54\n#define GL_RENDERBUFFER_GREEN_SIZE 0x8D51\n#define GL_RENDERBUFFER_HEIGHT 0x8D43\n#define GL_RENDERBUFFER_INTERNAL_FORMAT 0x8D44\n#define GL_RENDERBUFFER_RED_SIZE 0x8D50\n#define GL_RENDERBUFFER_SAMPLES 0x8CAB\n#define GL_RENDERBUFFER_STENCIL_SIZE 0x8D55\n#define GL_RENDERBUFFER_WIDTH 0x8D42\n#define GL_RENDERER 0x1F01\n#define GL_RENDER_MODE 0x0C40\n#define GL_REPEAT 0x2901\n#define GL_REPLACE 0x1E01\n#define GL_RESCALE_NORMAL 0x803A\n#define GL_RESET_NOTIFICATION_STRATEGY_ARB 0x8256\n#define GL_RETURN 0x0102\n#define GL_RG 0x8227\n#define GL_RG16 0x822C\n#define GL_RG16F 0x822F\n#define GL_RG16I 0x8239\n#define GL_RG16UI 0x823A\n#define GL_RG16_SNORM 0x8F99\n#define GL_RG32F 0x8230\n#define GL_RG32I 0x823B\n#define GL_RG32UI 0x823C\n#define GL_RG8 0x822B\n#define GL_RG8I 0x8237\n#define GL_RG8UI 0x8238\n#define GL_RG8_SNORM 0x8F95\n#define GL_RGB 0x1907\n#define GL_RGB10 0x8052\n#define GL_RGB10_A2 0x8059\n#define GL_RGB10_A2UI 0x906F\n#define GL_RGB12 0x8053\n#define GL_RGB16 0x8054\n#define GL_RGB16F 0x881B\n#define GL_RGB16I 0x8D89\n#define GL_RGB16UI 0x8D77\n#define GL_RGB16_SNORM 0x8F9A\n#define GL_RGB32F 0x8815\n#define GL_RGB32I 0x8D83\n#define GL_RGB32UI 0x8D71\n#define GL_RGB4 0x804F\n#define GL_RGB5 0x8050\n#define GL_RGB5_A1 0x8057\n#define GL_RGB8 0x8051\n#define GL_RGB8I 0x8D8F\n#define GL_RGB8UI 0x8D7D\n#define GL_RGB8_SNORM 0x8F96\n#define GL_RGB9_E5 0x8C3D\n#define GL_RGBA 0x1908\n#define GL_RGBA12 0x805A\n#define GL_RGBA16 0x805B\n#define GL_RGBA16F 0x881A\n#define GL_RGBA16I 0x8D88\n#define GL_RGBA16UI 0x8D76\n#define GL_RGBA16_SNORM 0x8F9B\n#define GL_RGBA2 0x8055\n#define GL_RGBA32F 0x8814\n#define GL_RGBA32I 0x8D82\n#define GL_RGBA32UI 0x8D70\n#define GL_RGBA4 0x8056\n#define GL_RGBA8 0x8058\n#define GL_RGBA8I 0x8D8E\n#define GL_RGBA8UI 0x8D7C\n#define GL_RGBA8_SNORM 0x8F97\n#define GL_RGBA_INTEGER 0x8D99\n#define GL_RGBA_MODE 0x0C31\n#define GL_RGB_INTEGER 0x8D98\n#define GL_RGB_SCALE 0x8573\n#define GL_RG_INTEGER 0x8228\n#define GL_RIGHT 0x0407\n#define GL_S 0x2000\n#define GL_SAMPLER 0x82E6\n#define GL_SAMPLER_1D 0x8B5D\n#define GL_SAMPLER_1D_ARRAY 0x8DC0\n#define GL_SAMPLER_1D_ARRAY_SHADOW 0x8DC3\n#define GL_SAMPLER_1D_SHADOW 0x8B61\n#define GL_SAMPLER_2D 0x8B5E\n#define GL_SAMPLER_2D_ARRAY 0x8DC1\n#define GL_SAMPLER_2D_ARRAY_SHADOW 0x8DC4\n#define GL_SAMPLER_2D_MULTISAMPLE 0x9108\n#define GL_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910B\n#define GL_SAMPLER_2D_RECT 0x8B63\n#define GL_SAMPLER_2D_RECT_SHADOW 0x8B64\n#define GL_SAMPLER_2D_SHADOW 0x8B62\n#define GL_SAMPLER_3D 0x8B5F\n#define GL_SAMPLER_BINDING 0x8919\n#define GL_SAMPLER_BUFFER 0x8DC2\n#define GL_SAMPLER_CUBE 0x8B60\n#define GL_SAMPLER_CUBE_SHADOW 0x8DC5\n#define GL_SAMPLES 0x80A9\n#define GL_SAMPLES_ARB 0x80A9\n#define GL_SAMPLES_PASSED 0x8914\n#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E\n#define GL_SAMPLE_ALPHA_TO_COVERAGE_ARB 0x809E\n#define GL_SAMPLE_ALPHA_TO_ONE 0x809F\n#define GL_SAMPLE_ALPHA_TO_ONE_ARB 0x809F\n#define GL_SAMPLE_BUFFERS 0x80A8\n#define GL_SAMPLE_BUFFERS_ARB 0x80A8\n#define GL_SAMPLE_COVERAGE 0x80A0\n#define GL_SAMPLE_COVERAGE_ARB 0x80A0\n#define GL_SAMPLE_COVERAGE_INVERT 0x80AB\n#define GL_SAMPLE_COVERAGE_INVERT_ARB 0x80AB\n#define GL_SAMPLE_COVERAGE_VALUE 0x80AA\n#define GL_SAMPLE_COVERAGE_VALUE_ARB 0x80AA\n#define GL_SAMPLE_MASK 0x8E51\n#define GL_SAMPLE_MASK_VALUE 0x8E52\n#define GL_SAMPLE_POSITION 0x8E50\n#define GL_SCISSOR_BIT 0x00080000\n#define GL_SCISSOR_BOX 0x0C10\n#define GL_SCISSOR_TEST 0x0C11\n#define GL_SECONDARY_COLOR_ARRAY 0x845E\n#define GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING 0x889C\n#define GL_SECONDARY_COLOR_ARRAY_POINTER 0x845D\n#define GL_SECONDARY_COLOR_ARRAY_SIZE 0x845A\n#define GL_SECONDARY_COLOR_ARRAY_STRIDE 0x845C\n#define GL_SECONDARY_COLOR_ARRAY_TYPE 0x845B\n#define GL_SELECT 0x1C02\n#define GL_SELECTION_BUFFER_POINTER 0x0DF3\n#define GL_SELECTION_BUFFER_SIZE 0x0DF4\n#define GL_SEPARATE_ATTRIBS 0x8C8D\n#define GL_SEPARATE_SPECULAR_COLOR 0x81FA\n#define GL_SET 0x150F\n#define GL_SHADER 0x82E1\n#define GL_SHADER_SOURCE_LENGTH 0x8B88\n#define GL_SHADER_TYPE 0x8B4F\n#define GL_SHADE_MODEL 0x0B54\n#define GL_SHADING_LANGUAGE_VERSION 0x8B8C\n#define GL_SHININESS 0x1601\n#define GL_SHORT 0x1402\n#define GL_SIGNALED 0x9119\n#define GL_SIGNED_NORMALIZED 0x8F9C\n#define GL_SINGLE_COLOR 0x81F9\n#define GL_SLUMINANCE 0x8C46\n#define GL_SLUMINANCE8 0x8C47\n#define GL_SLUMINANCE8_ALPHA8 0x8C45\n#define GL_SLUMINANCE_ALPHA 0x8C44\n#define GL_SMOOTH 0x1D01\n#define GL_SMOOTH_LINE_WIDTH_GRANULARITY 0x0B23\n#define GL_SMOOTH_LINE_WIDTH_RANGE 0x0B22\n#define GL_SMOOTH_POINT_SIZE_GRANULARITY 0x0B13\n#define GL_SMOOTH_POINT_SIZE_RANGE 0x0B12\n#define GL_SOURCE0_ALPHA 0x8588\n#define GL_SOURCE0_RGB 0x8580\n#define GL_SOURCE1_ALPHA 0x8589\n#define GL_SOURCE1_RGB 0x8581\n#define GL_SOURCE2_ALPHA 0x858A\n#define GL_SOURCE2_RGB 0x8582\n#define GL_SPECULAR 0x1202\n#define GL_SPHERE_MAP 0x2402\n#define GL_SPOT_CUTOFF 0x1206\n#define GL_SPOT_DIRECTION 0x1204\n#define GL_SPOT_EXPONENT 0x1205\n#define GL_SRC0_ALPHA 0x8588\n#define GL_SRC0_RGB 0x8580\n#define GL_SRC1_ALPHA 0x8589\n#define GL_SRC1_COLOR 0x88F9\n#define GL_SRC1_RGB 0x8581\n#define GL_SRC2_ALPHA 0x858A\n#define GL_SRC2_RGB 0x8582\n#define GL_SRC_ALPHA 0x0302\n#define GL_SRC_ALPHA_SATURATE 0x0308\n#define GL_SRC_COLOR 0x0300\n#define GL_SRGB 0x8C40\n#define GL_SRGB8 0x8C41\n#define GL_SRGB8_ALPHA8 0x8C43\n#define GL_SRGB_ALPHA 0x8C42\n#define GL_STACK_OVERFLOW 0x0503\n#define GL_STACK_UNDERFLOW 0x0504\n#define GL_STATIC_COPY 0x88E6\n#define GL_STATIC_DRAW 0x88E4\n#define GL_STATIC_READ 0x88E5\n#define GL_STENCIL 0x1802\n#define GL_STENCIL_ATTACHMENT 0x8D20\n#define GL_STENCIL_BACK_FAIL 0x8801\n#define GL_STENCIL_BACK_FUNC 0x8800\n#define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802\n#define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803\n#define GL_STENCIL_BACK_REF 0x8CA3\n#define GL_STENCIL_BACK_VALUE_MASK 0x8CA4\n#define GL_STENCIL_BACK_WRITEMASK 0x8CA5\n#define GL_STENCIL_BITS 0x0D57\n#define GL_STENCIL_BUFFER_BIT 0x00000400\n#define GL_STENCIL_CLEAR_VALUE 0x0B91\n#define GL_STENCIL_FAIL 0x0B94\n#define GL_STENCIL_FUNC 0x0B92\n#define GL_STENCIL_INDEX 0x1901\n#define GL_STENCIL_INDEX1 0x8D46\n#define GL_STENCIL_INDEX16 0x8D49\n#define GL_STENCIL_INDEX4 0x8D47\n#define GL_STENCIL_INDEX8 0x8D48\n#define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95\n#define GL_STENCIL_PASS_DEPTH_PASS 0x0B96\n#define GL_STENCIL_REF 0x0B97\n#define GL_STENCIL_TEST 0x0B90\n#define GL_STENCIL_VALUE_MASK 0x0B93\n#define GL_STENCIL_WRITEMASK 0x0B98\n#define GL_STEREO 0x0C33\n#define GL_STREAM_COPY 0x88E2\n#define GL_STREAM_DRAW 0x88E0\n#define GL_STREAM_READ 0x88E1\n#define GL_SUBPIXEL_BITS 0x0D50\n#define GL_SUBTRACT 0x84E7\n#define GL_SYNC_CONDITION 0x9113\n#define GL_SYNC_FENCE 0x9116\n#define GL_SYNC_FLAGS 0x9115\n#define GL_SYNC_FLUSH_COMMANDS_BIT 0x00000001\n#define GL_SYNC_GPU_COMMANDS_COMPLETE 0x9117\n#define GL_SYNC_STATUS 0x9114\n#define GL_T 0x2001\n#define GL_T2F_C3F_V3F 0x2A2A\n#define GL_T2F_C4F_N3F_V3F 0x2A2C\n#define GL_T2F_C4UB_V3F 0x2A29\n#define GL_T2F_N3F_V3F 0x2A2B\n#define GL_T2F_V3F 0x2A27\n#define GL_T4F_C4F_N3F_V4F 0x2A2D\n#define GL_T4F_V4F 0x2A28\n#define GL_TEXTURE 0x1702\n#define GL_TEXTURE0 0x84C0\n#define GL_TEXTURE1 0x84C1\n#define GL_TEXTURE10 0x84CA\n#define GL_TEXTURE11 0x84CB\n#define GL_TEXTURE12 0x84CC\n#define GL_TEXTURE13 0x84CD\n#define GL_TEXTURE14 0x84CE\n#define GL_TEXTURE15 0x84CF\n#define GL_TEXTURE16 0x84D0\n#define GL_TEXTURE17 0x84D1\n#define GL_TEXTURE18 0x84D2\n#define GL_TEXTURE19 0x84D3\n#define GL_TEXTURE2 0x84C2\n#define GL_TEXTURE20 0x84D4\n#define GL_TEXTURE21 0x84D5\n#define GL_TEXTURE22 0x84D6\n#define GL_TEXTURE23 0x84D7\n#define GL_TEXTURE24 0x84D8\n#define GL_TEXTURE25 0x84D9\n#define GL_TEXTURE26 0x84DA\n#define GL_TEXTURE27 0x84DB\n#define GL_TEXTURE28 0x84DC\n#define GL_TEXTURE29 0x84DD\n#define GL_TEXTURE3 0x84C3\n#define GL_TEXTURE30 0x84DE\n#define GL_TEXTURE31 0x84DF\n#define GL_TEXTURE4 0x84C4\n#define GL_TEXTURE5 0x84C5\n#define GL_TEXTURE6 0x84C6\n#define GL_TEXTURE7 0x84C7\n#define GL_TEXTURE8 0x84C8\n#define GL_TEXTURE9 0x84C9\n#define GL_TEXTURE_1D 0x0DE0\n#define GL_TEXTURE_1D_ARRAY 0x8C18\n#define GL_TEXTURE_2D 0x0DE1\n#define GL_TEXTURE_2D_ARRAY 0x8C1A\n#define GL_TEXTURE_2D_MULTISAMPLE 0x9100\n#define GL_TEXTURE_2D_MULTISAMPLE_ARRAY 0x9102\n#define GL_TEXTURE_3D 0x806F\n#define GL_TEXTURE_ALPHA_SIZE 0x805F\n#define GL_TEXTURE_ALPHA_TYPE 0x8C13\n#define GL_TEXTURE_BASE_LEVEL 0x813C\n#define GL_TEXTURE_BINDING_1D 0x8068\n#define GL_TEXTURE_BINDING_1D_ARRAY 0x8C1C\n#define GL_TEXTURE_BINDING_2D 0x8069\n#define GL_TEXTURE_BINDING_2D_ARRAY 0x8C1D\n#define GL_TEXTURE_BINDING_2D_MULTISAMPLE 0x9104\n#define GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY 0x9105\n#define GL_TEXTURE_BINDING_3D 0x806A\n#define GL_TEXTURE_BINDING_BUFFER 0x8C2C\n#define GL_TEXTURE_BINDING_CUBE_MAP 0x8514\n#define GL_TEXTURE_BINDING_RECTANGLE 0x84F6\n#define GL_TEXTURE_BIT 0x00040000\n#define GL_TEXTURE_BLUE_SIZE 0x805E\n#define GL_TEXTURE_BLUE_TYPE 0x8C12\n#define GL_TEXTURE_BORDER 0x1005\n#define GL_TEXTURE_BORDER_COLOR 0x1004\n#define GL_TEXTURE_BUFFER 0x8C2A\n#define GL_TEXTURE_BUFFER_DATA_STORE_BINDING 0x8C2D\n#define GL_TEXTURE_COMPARE_FUNC 0x884D\n#define GL_TEXTURE_COMPARE_MODE 0x884C\n#define GL_TEXTURE_COMPONENTS 0x1003\n#define GL_TEXTURE_COMPRESSED 0x86A1\n#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE 0x86A0\n#define GL_TEXTURE_COMPRESSION_HINT 0x84EF\n#define GL_TEXTURE_COORD_ARRAY 0x8078\n#define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING 0x889A\n#define GL_TEXTURE_COORD_ARRAY_POINTER 0x8092\n#define GL_TEXTURE_COORD_ARRAY_SIZE 0x8088\n#define GL_TEXTURE_COORD_ARRAY_STRIDE 0x808A\n#define GL_TEXTURE_COORD_ARRAY_TYPE 0x8089\n#define GL_TEXTURE_CUBE_MAP 0x8513\n#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516\n#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518\n#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A\n#define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515\n#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517\n#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519\n#define GL_TEXTURE_CUBE_MAP_SEAMLESS 0x884F\n#define GL_TEXTURE_DEPTH 0x8071\n#define GL_TEXTURE_DEPTH_SIZE 0x884A\n#define GL_TEXTURE_DEPTH_TYPE 0x8C16\n#define GL_TEXTURE_ENV 0x2300\n#define GL_TEXTURE_ENV_COLOR 0x2201\n#define GL_TEXTURE_ENV_MODE 0x2200\n#define GL_TEXTURE_FILTER_CONTROL 0x8500\n#define GL_TEXTURE_FIXED_SAMPLE_LOCATIONS 0x9107\n#define GL_TEXTURE_GEN_MODE 0x2500\n#define GL_TEXTURE_GEN_Q 0x0C63\n#define GL_TEXTURE_GEN_R 0x0C62\n#define GL_TEXTURE_GEN_S 0x0C60\n#define GL_TEXTURE_GEN_T 0x0C61\n#define GL_TEXTURE_GREEN_SIZE 0x805D\n#define GL_TEXTURE_GREEN_TYPE 0x8C11\n#define GL_TEXTURE_HEIGHT 0x1001\n#define GL_TEXTURE_INTENSITY_SIZE 0x8061\n#define GL_TEXTURE_INTENSITY_TYPE 0x8C15\n#define GL_TEXTURE_INTERNAL_FORMAT 0x1003\n#define GL_TEXTURE_LOD_BIAS 0x8501\n#define GL_TEXTURE_LUMINANCE_SIZE 0x8060\n#define GL_TEXTURE_LUMINANCE_TYPE 0x8C14\n#define GL_TEXTURE_MAG_FILTER 0x2800\n#define GL_TEXTURE_MATRIX 0x0BA8\n#define GL_TEXTURE_MAX_LEVEL 0x813D\n#define GL_TEXTURE_MAX_LOD 0x813B\n#define GL_TEXTURE_MIN_FILTER 0x2801\n#define GL_TEXTURE_MIN_LOD 0x813A\n#define GL_TEXTURE_PRIORITY 0x8066\n#define GL_TEXTURE_RECTANGLE 0x84F5\n#define GL_TEXTURE_RED_SIZE 0x805C\n#define GL_TEXTURE_RED_TYPE 0x8C10\n#define GL_TEXTURE_RESIDENT 0x8067\n#define GL_TEXTURE_SAMPLES 0x9106\n#define GL_TEXTURE_SHARED_SIZE 0x8C3F\n#define GL_TEXTURE_STACK_DEPTH 0x0BA5\n#define GL_TEXTURE_STENCIL_SIZE 0x88F1\n#define GL_TEXTURE_SWIZZLE_A 0x8E45\n#define GL_TEXTURE_SWIZZLE_B 0x8E44\n#define GL_TEXTURE_SWIZZLE_G 0x8E43\n#define GL_TEXTURE_SWIZZLE_R 0x8E42\n#define GL_TEXTURE_SWIZZLE_RGBA 0x8E46\n#define GL_TEXTURE_WIDTH 0x1000\n#define GL_TEXTURE_WRAP_R 0x8072\n#define GL_TEXTURE_WRAP_S 0x2802\n#define GL_TEXTURE_WRAP_T 0x2803\n#define GL_TIMEOUT_EXPIRED 0x911B\n#define GL_TIMEOUT_IGNORED 0xFFFFFFFFFFFFFFFF\n#define GL_TIMESTAMP 0x8E28\n#define GL_TIME_ELAPSED 0x88BF\n#define GL_TRANSFORM_BIT 0x00001000\n#define GL_TRANSFORM_FEEDBACK_BUFFER 0x8C8E\n#define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING 0x8C8F\n#define GL_TRANSFORM_FEEDBACK_BUFFER_MODE 0x8C7F\n#define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE 0x8C85\n#define GL_TRANSFORM_FEEDBACK_BUFFER_START 0x8C84\n#define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN 0x8C88\n#define GL_TRANSFORM_FEEDBACK_VARYINGS 0x8C83\n#define GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH 0x8C76\n#define GL_TRANSPOSE_COLOR_MATRIX 0x84E6\n#define GL_TRANSPOSE_MODELVIEW_MATRIX 0x84E3\n#define GL_TRANSPOSE_PROJECTION_MATRIX 0x84E4\n#define GL_TRANSPOSE_TEXTURE_MATRIX 0x84E5\n#define GL_TRIANGLES 0x0004\n#define GL_TRIANGLES_ADJACENCY 0x000C\n#define GL_TRIANGLE_FAN 0x0006\n#define GL_TRIANGLE_STRIP 0x0005\n#define GL_TRIANGLE_STRIP_ADJACENCY 0x000D\n#define GL_TRUE 1\n#define GL_UNIFORM_ARRAY_STRIDE 0x8A3C\n#define GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS 0x8A42\n#define GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES 0x8A43\n#define GL_UNIFORM_BLOCK_BINDING 0x8A3F\n#define GL_UNIFORM_BLOCK_DATA_SIZE 0x8A40\n#define GL_UNIFORM_BLOCK_INDEX 0x8A3A\n#define GL_UNIFORM_BLOCK_NAME_LENGTH 0x8A41\n#define GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER 0x8A46\n#define GL_UNIFORM_BLOCK_REFERENCED_BY_GEOMETRY_SHADER 0x8A45\n#define GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER 0x8A44\n#define GL_UNIFORM_BUFFER 0x8A11\n#define GL_UNIFORM_BUFFER_BINDING 0x8A28\n#define GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT 0x8A34\n#define GL_UNIFORM_BUFFER_SIZE 0x8A2A\n#define GL_UNIFORM_BUFFER_START 0x8A29\n#define GL_UNIFORM_IS_ROW_MAJOR 0x8A3E\n#define GL_UNIFORM_MATRIX_STRIDE 0x8A3D\n#define GL_UNIFORM_NAME_LENGTH 0x8A39\n#define GL_UNIFORM_OFFSET 0x8A3B\n#define GL_UNIFORM_SIZE 0x8A38\n#define GL_UNIFORM_TYPE 0x8A37\n#define GL_UNKNOWN_CONTEXT_RESET_ARB 0x8255\n#define GL_UNPACK_ALIGNMENT 0x0CF5\n#define GL_UNPACK_IMAGE_HEIGHT 0x806E\n#define GL_UNPACK_LSB_FIRST 0x0CF1\n#define GL_UNPACK_ROW_LENGTH 0x0CF2\n#define GL_UNPACK_SKIP_IMAGES 0x806D\n#define GL_UNPACK_SKIP_PIXELS 0x0CF4\n#define GL_UNPACK_SKIP_ROWS 0x0CF3\n#define GL_UNPACK_SWAP_BYTES 0x0CF0\n#define GL_UNSIGNALED 0x9118\n#define GL_UNSIGNED_BYTE 0x1401\n#define GL_UNSIGNED_BYTE_2_3_3_REV 0x8362\n#define GL_UNSIGNED_BYTE_3_3_2 0x8032\n#define GL_UNSIGNED_INT 0x1405\n#define GL_UNSIGNED_INT_10F_11F_11F_REV 0x8C3B\n#define GL_UNSIGNED_INT_10_10_10_2 0x8036\n#define GL_UNSIGNED_INT_24_8 0x84FA\n#define GL_UNSIGNED_INT_2_10_10_10_REV 0x8368\n#define GL_UNSIGNED_INT_5_9_9_9_REV 0x8C3E\n#define GL_UNSIGNED_INT_8_8_8_8 0x8035\n#define GL_UNSIGNED_INT_8_8_8_8_REV 0x8367\n#define GL_UNSIGNED_INT_SAMPLER_1D 0x8DD1\n#define GL_UNSIGNED_INT_SAMPLER_1D_ARRAY 0x8DD6\n#define GL_UNSIGNED_INT_SAMPLER_2D 0x8DD2\n#define GL_UNSIGNED_INT_SAMPLER_2D_ARRAY 0x8DD7\n#define GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE 0x910A\n#define GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910D\n#define GL_UNSIGNED_INT_SAMPLER_2D_RECT 0x8DD5\n#define GL_UNSIGNED_INT_SAMPLER_3D 0x8DD3\n#define GL_UNSIGNED_INT_SAMPLER_BUFFER 0x8DD8\n#define GL_UNSIGNED_INT_SAMPLER_CUBE 0x8DD4\n#define GL_UNSIGNED_INT_VEC2 0x8DC6\n#define GL_UNSIGNED_INT_VEC3 0x8DC7\n#define GL_UNSIGNED_INT_VEC4 0x8DC8\n#define GL_UNSIGNED_NORMALIZED 0x8C17\n#define GL_UNSIGNED_SHORT 0x1403\n#define GL_UNSIGNED_SHORT_1_5_5_5_REV 0x8366\n#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033\n#define GL_UNSIGNED_SHORT_4_4_4_4_REV 0x8365\n#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034\n#define GL_UNSIGNED_SHORT_5_6_5 0x8363\n#define GL_UNSIGNED_SHORT_5_6_5_REV 0x8364\n#define GL_UPPER_LEFT 0x8CA2\n#define GL_V2F 0x2A20\n#define GL_V3F 0x2A21\n#define GL_VALIDATE_STATUS 0x8B83\n#define GL_VENDOR 0x1F00\n#define GL_VERSION 0x1F02\n#define GL_VERTEX_ARRAY 0x8074\n#define GL_VERTEX_ARRAY_BINDING 0x85B5\n#define GL_VERTEX_ARRAY_BUFFER_BINDING 0x8896\n#define GL_VERTEX_ARRAY_POINTER 0x808E\n#define GL_VERTEX_ARRAY_SIZE 0x807A\n#define GL_VERTEX_ARRAY_STRIDE 0x807C\n#define GL_VERTEX_ARRAY_TYPE 0x807B\n#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F\n#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR 0x88FE\n#define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622\n#define GL_VERTEX_ATTRIB_ARRAY_INTEGER 0x88FD\n#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A\n#define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645\n#define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623\n#define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624\n#define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625\n#define GL_VERTEX_PROGRAM_POINT_SIZE 0x8642\n#define GL_VERTEX_PROGRAM_TWO_SIDE 0x8643\n#define GL_VERTEX_SHADER 0x8B31\n#define GL_VIEWPORT 0x0BA2\n#define GL_VIEWPORT_BIT 0x00000800\n#define GL_WAIT_FAILED 0x911D\n#define GL_WEIGHT_ARRAY_BUFFER_BINDING 0x889E\n#define GL_WRITE_ONLY 0x88B9\n#define GL_XOR 0x1506\n#define GL_ZERO 0\n#define GL_ZOOM_X 0x0D16\n#define GL_ZOOM_Y 0x0D17\n\n\n#include <glad/khrplatform.h>\ntypedef unsigned int GLenum;\ntypedef unsigned char GLboolean;\ntypedef unsigned int GLbitfield;\ntypedef void GLvoid;\ntypedef khronos_int8_t GLbyte;\ntypedef khronos_uint8_t GLubyte;\ntypedef khronos_int16_t GLshort;\ntypedef khronos_uint16_t GLushort;\ntypedef int GLint;\ntypedef unsigned int GLuint;\ntypedef khronos_int32_t GLclampx;\ntypedef int GLsizei;\ntypedef khronos_float_t GLfloat;\ntypedef khronos_float_t GLclampf;\ntypedef double GLdouble;\ntypedef double GLclampd;\ntypedef void *GLeglClientBufferEXT;\ntypedef void *GLeglImageOES;\ntypedef char GLchar;\ntypedef char GLcharARB;\n#ifdef __APPLE__\ntypedef void *GLhandleARB;\n#else\ntypedef unsigned int GLhandleARB;\n#endif\ntypedef khronos_uint16_t GLhalf;\ntypedef khronos_uint16_t GLhalfARB;\ntypedef khronos_int32_t GLfixed;\n#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ > 1060)\ntypedef khronos_intptr_t GLintptr;\n#else\ntypedef khronos_intptr_t GLintptr;\n#endif\n#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ > 1060)\ntypedef khronos_intptr_t GLintptrARB;\n#else\ntypedef khronos_intptr_t GLintptrARB;\n#endif\n#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ > 1060)\ntypedef khronos_ssize_t GLsizeiptr;\n#else\ntypedef khronos_ssize_t GLsizeiptr;\n#endif\n#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ > 1060)\ntypedef khronos_ssize_t GLsizeiptrARB;\n#else\ntypedef khronos_ssize_t GLsizeiptrARB;\n#endif\ntypedef khronos_int64_t GLint64;\ntypedef khronos_int64_t GLint64EXT;\ntypedef khronos_uint64_t GLuint64;\ntypedef khronos_uint64_t GLuint64EXT;\ntypedef struct __GLsync *GLsync;\nstruct _cl_context;\nstruct _cl_event;\ntypedef void ( *GLDEBUGPROC)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam);\ntypedef void ( *GLDEBUGPROCARB)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam);\ntypedef void ( *GLDEBUGPROCKHR)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam);\ntypedef void ( *GLDEBUGPROCAMD)(GLuint id,GLenum category,GLenum severity,GLsizei length,const GLchar *message,void *userParam);\ntypedef unsigned short GLhalfNV;\ntypedef GLintptr GLvdpauSurfaceNV;\ntypedef void ( *GLVULKANPROCNV)(void);\n\n\n#define GL_VERSION_1_0 1\nGLAD_API_CALL int GLAD_GL_VERSION_1_0;\n#define GL_VERSION_1_1 1\nGLAD_API_CALL int GLAD_GL_VERSION_1_1;\n#define GL_VERSION_1_2 1\nGLAD_API_CALL int GLAD_GL_VERSION_1_2;\n#define GL_VERSION_1_3 1\nGLAD_API_CALL int GLAD_GL_VERSION_1_3;\n#define GL_VERSION_1_4 1\nGLAD_API_CALL int GLAD_GL_VERSION_1_4;\n#define GL_VERSION_1_5 1\nGLAD_API_CALL int GLAD_GL_VERSION_1_5;\n#define GL_VERSION_2_0 1\nGLAD_API_CALL int GLAD_GL_VERSION_2_0;\n#define GL_VERSION_2_1 1\nGLAD_API_CALL int GLAD_GL_VERSION_2_1;\n#define GL_VERSION_3_0 1\nGLAD_API_CALL int GLAD_GL_VERSION_3_0;\n#define GL_VERSION_3_1 1\nGLAD_API_CALL int GLAD_GL_VERSION_3_1;\n#define GL_VERSION_3_2 1\nGLAD_API_CALL int GLAD_GL_VERSION_3_2;\n#define GL_VERSION_3_3 1\nGLAD_API_CALL int GLAD_GL_VERSION_3_3;\n#define GL_ARB_multisample 1\nGLAD_API_CALL int GLAD_GL_ARB_multisample;\n#define GL_ARB_robustness 1\nGLAD_API_CALL int GLAD_GL_ARB_robustness;\n#define GL_KHR_debug 1\nGLAD_API_CALL int GLAD_GL_KHR_debug;\n\n\ntypedef void (GLAD_API_PTR *PFNGLACCUMPROC)(GLenum   op, GLfloat   value);\ntypedef void (GLAD_API_PTR *PFNGLACTIVETEXTUREPROC)(GLenum   texture);\ntypedef void (GLAD_API_PTR *PFNGLALPHAFUNCPROC)(GLenum   func, GLfloat   ref);\ntypedef GLboolean (GLAD_API_PTR *PFNGLARETEXTURESRESIDENTPROC)(GLsizei   n, const  GLuint  * textures, GLboolean  * residences);\ntypedef void (GLAD_API_PTR *PFNGLARRAYELEMENTPROC)(GLint   i);\ntypedef void (GLAD_API_PTR *PFNGLATTACHSHADERPROC)(GLuint   program, GLuint   shader);\ntypedef void (GLAD_API_PTR *PFNGLBEGINPROC)(GLenum   mode);\ntypedef void (GLAD_API_PTR *PFNGLBEGINCONDITIONALRENDERPROC)(GLuint   id, GLenum   mode);\ntypedef void (GLAD_API_PTR *PFNGLBEGINQUERYPROC)(GLenum   target, GLuint   id);\ntypedef void (GLAD_API_PTR *PFNGLBEGINTRANSFORMFEEDBACKPROC)(GLenum   primitiveMode);\ntypedef void (GLAD_API_PTR *PFNGLBINDATTRIBLOCATIONPROC)(GLuint   program, GLuint   index, const  GLchar  * name);\ntypedef void (GLAD_API_PTR *PFNGLBINDBUFFERPROC)(GLenum   target, GLuint   buffer);\ntypedef void (GLAD_API_PTR *PFNGLBINDBUFFERBASEPROC)(GLenum   target, GLuint   index, GLuint   buffer);\ntypedef void (GLAD_API_PTR *PFNGLBINDBUFFERRANGEPROC)(GLenum   target, GLuint   index, GLuint   buffer, GLintptr   offset, GLsizeiptr   size);\ntypedef void (GLAD_API_PTR *PFNGLBINDFRAGDATALOCATIONPROC)(GLuint   program, GLuint   color, const  GLchar  * name);\ntypedef void (GLAD_API_PTR *PFNGLBINDFRAGDATALOCATIONINDEXEDPROC)(GLuint   program, GLuint   colorNumber, GLuint   index, const  GLchar  * name);\ntypedef void (GLAD_API_PTR *PFNGLBINDFRAMEBUFFERPROC)(GLenum   target, GLuint   framebuffer);\ntypedef void (GLAD_API_PTR *PFNGLBINDRENDERBUFFERPROC)(GLenum   target, GLuint   renderbuffer);\ntypedef void (GLAD_API_PTR *PFNGLBINDSAMPLERPROC)(GLuint   unit, GLuint   sampler);\ntypedef void (GLAD_API_PTR *PFNGLBINDTEXTUREPROC)(GLenum   target, GLuint   texture);\ntypedef void (GLAD_API_PTR *PFNGLBINDVERTEXARRAYPROC)(GLuint   array);\ntypedef void (GLAD_API_PTR *PFNGLBITMAPPROC)(GLsizei   width, GLsizei   height, GLfloat   xorig, GLfloat   yorig, GLfloat   xmove, GLfloat   ymove, const  GLubyte  * bitmap);\ntypedef void (GLAD_API_PTR *PFNGLBLENDCOLORPROC)(GLfloat   red, GLfloat   green, GLfloat   blue, GLfloat   alpha);\ntypedef void (GLAD_API_PTR *PFNGLBLENDEQUATIONPROC)(GLenum   mode);\ntypedef void (GLAD_API_PTR *PFNGLBLENDEQUATIONSEPARATEPROC)(GLenum   modeRGB, GLenum   modeAlpha);\ntypedef void (GLAD_API_PTR *PFNGLBLENDFUNCPROC)(GLenum   sfactor, GLenum   dfactor);\ntypedef void (GLAD_API_PTR *PFNGLBLENDFUNCSEPARATEPROC)(GLenum   sfactorRGB, GLenum   dfactorRGB, GLenum   sfactorAlpha, GLenum   dfactorAlpha);\ntypedef void (GLAD_API_PTR *PFNGLBLITFRAMEBUFFERPROC)(GLint   srcX0, GLint   srcY0, GLint   srcX1, GLint   srcY1, GLint   dstX0, GLint   dstY0, GLint   dstX1, GLint   dstY1, GLbitfield   mask, GLenum   filter);\ntypedef void (GLAD_API_PTR *PFNGLBUFFERDATAPROC)(GLenum   target, GLsizeiptr   size, const void * data, GLenum   usage);\ntypedef void (GLAD_API_PTR *PFNGLBUFFERSUBDATAPROC)(GLenum   target, GLintptr   offset, GLsizeiptr   size, const void * data);\ntypedef void (GLAD_API_PTR *PFNGLCALLLISTPROC)(GLuint   list);\ntypedef void (GLAD_API_PTR *PFNGLCALLLISTSPROC)(GLsizei   n, GLenum   type, const void * lists);\ntypedef GLenum (GLAD_API_PTR *PFNGLCHECKFRAMEBUFFERSTATUSPROC)(GLenum   target);\ntypedef void (GLAD_API_PTR *PFNGLCLAMPCOLORPROC)(GLenum   target, GLenum   clamp);\ntypedef void (GLAD_API_PTR *PFNGLCLEARPROC)(GLbitfield   mask);\ntypedef void (GLAD_API_PTR *PFNGLCLEARACCUMPROC)(GLfloat   red, GLfloat   green, GLfloat   blue, GLfloat   alpha);\ntypedef void (GLAD_API_PTR *PFNGLCLEARBUFFERFIPROC)(GLenum   buffer, GLint   drawbuffer, GLfloat   depth, GLint   stencil);\ntypedef void (GLAD_API_PTR *PFNGLCLEARBUFFERFVPROC)(GLenum   buffer, GLint   drawbuffer, const  GLfloat  * value);\ntypedef void (GLAD_API_PTR *PFNGLCLEARBUFFERIVPROC)(GLenum   buffer, GLint   drawbuffer, const  GLint  * value);\ntypedef void (GLAD_API_PTR *PFNGLCLEARBUFFERUIVPROC)(GLenum   buffer, GLint   drawbuffer, const  GLuint  * value);\ntypedef void (GLAD_API_PTR *PFNGLCLEARCOLORPROC)(GLfloat   red, GLfloat   green, GLfloat   blue, GLfloat   alpha);\ntypedef void (GLAD_API_PTR *PFNGLCLEARDEPTHPROC)(GLdouble   depth);\ntypedef void (GLAD_API_PTR *PFNGLCLEARINDEXPROC)(GLfloat   c);\ntypedef void (GLAD_API_PTR *PFNGLCLEARSTENCILPROC)(GLint   s);\ntypedef void (GLAD_API_PTR *PFNGLCLIENTACTIVETEXTUREPROC)(GLenum   texture);\ntypedef GLenum (GLAD_API_PTR *PFNGLCLIENTWAITSYNCPROC)(GLsync   sync, GLbitfield   flags, GLuint64   timeout);\ntypedef void (GLAD_API_PTR *PFNGLCLIPPLANEPROC)(GLenum   plane, const  GLdouble  * equation);\ntypedef void (GLAD_API_PTR *PFNGLCOLOR3BPROC)(GLbyte   red, GLbyte   green, GLbyte   blue);\ntypedef void (GLAD_API_PTR *PFNGLCOLOR3BVPROC)(const  GLbyte  * v);\ntypedef void (GLAD_API_PTR *PFNGLCOLOR3DPROC)(GLdouble   red, GLdouble   green, GLdouble   blue);\ntypedef void (GLAD_API_PTR *PFNGLCOLOR3DVPROC)(const  GLdouble  * v);\ntypedef void (GLAD_API_PTR *PFNGLCOLOR3FPROC)(GLfloat   red, GLfloat   green, GLfloat   blue);\ntypedef void (GLAD_API_PTR *PFNGLCOLOR3FVPROC)(const  GLfloat  * v);\ntypedef void (GLAD_API_PTR *PFNGLCOLOR3IPROC)(GLint   red, GLint   green, GLint   blue);\ntypedef void (GLAD_API_PTR *PFNGLCOLOR3IVPROC)(const  GLint  * v);\ntypedef void (GLAD_API_PTR *PFNGLCOLOR3SPROC)(GLshort   red, GLshort   green, GLshort   blue);\ntypedef void (GLAD_API_PTR *PFNGLCOLOR3SVPROC)(const  GLshort  * v);\ntypedef void (GLAD_API_PTR *PFNGLCOLOR3UBPROC)(GLubyte   red, GLubyte   green, GLubyte   blue);\ntypedef void (GLAD_API_PTR *PFNGLCOLOR3UBVPROC)(const  GLubyte  * v);\ntypedef void (GLAD_API_PTR *PFNGLCOLOR3UIPROC)(GLuint   red, GLuint   green, GLuint   blue);\ntypedef void (GLAD_API_PTR *PFNGLCOLOR3UIVPROC)(const  GLuint  * v);\ntypedef void (GLAD_API_PTR *PFNGLCOLOR3USPROC)(GLushort   red, GLushort   green, GLushort   blue);\ntypedef void (GLAD_API_PTR *PFNGLCOLOR3USVPROC)(const  GLushort  * v);\ntypedef void (GLAD_API_PTR *PFNGLCOLOR4BPROC)(GLbyte   red, GLbyte   green, GLbyte   blue, GLbyte   alpha);\ntypedef void (GLAD_API_PTR *PFNGLCOLOR4BVPROC)(const  GLbyte  * v);\ntypedef void (GLAD_API_PTR *PFNGLCOLOR4DPROC)(GLdouble   red, GLdouble   green, GLdouble   blue, GLdouble   alpha);\ntypedef void (GLAD_API_PTR *PFNGLCOLOR4DVPROC)(const  GLdouble  * v);\ntypedef void (GLAD_API_PTR *PFNGLCOLOR4FPROC)(GLfloat   red, GLfloat   green, GLfloat   blue, GLfloat   alpha);\ntypedef void (GLAD_API_PTR *PFNGLCOLOR4FVPROC)(const  GLfloat  * v);\ntypedef void (GLAD_API_PTR *PFNGLCOLOR4IPROC)(GLint   red, GLint   green, GLint   blue, GLint   alpha);\ntypedef void (GLAD_API_PTR *PFNGLCOLOR4IVPROC)(const  GLint  * v);\ntypedef void (GLAD_API_PTR *PFNGLCOLOR4SPROC)(GLshort   red, GLshort   green, GLshort   blue, GLshort   alpha);\ntypedef void (GLAD_API_PTR *PFNGLCOLOR4SVPROC)(const  GLshort  * v);\ntypedef void (GLAD_API_PTR *PFNGLCOLOR4UBPROC)(GLubyte   red, GLubyte   green, GLubyte   blue, GLubyte   alpha);\ntypedef void (GLAD_API_PTR *PFNGLCOLOR4UBVPROC)(const  GLubyte  * v);\ntypedef void (GLAD_API_PTR *PFNGLCOLOR4UIPROC)(GLuint   red, GLuint   green, GLuint   blue, GLuint   alpha);\ntypedef void (GLAD_API_PTR *PFNGLCOLOR4UIVPROC)(const  GLuint  * v);\ntypedef void (GLAD_API_PTR *PFNGLCOLOR4USPROC)(GLushort   red, GLushort   green, GLushort   blue, GLushort   alpha);\ntypedef void (GLAD_API_PTR *PFNGLCOLOR4USVPROC)(const  GLushort  * v);\ntypedef void (GLAD_API_PTR *PFNGLCOLORMASKPROC)(GLboolean   red, GLboolean   green, GLboolean   blue, GLboolean   alpha);\ntypedef void (GLAD_API_PTR *PFNGLCOLORMASKIPROC)(GLuint   index, GLboolean   r, GLboolean   g, GLboolean   b, GLboolean   a);\ntypedef void (GLAD_API_PTR *PFNGLCOLORMATERIALPROC)(GLenum   face, GLenum   mode);\ntypedef void (GLAD_API_PTR *PFNGLCOLORP3UIPROC)(GLenum   type, GLuint   color);\ntypedef void (GLAD_API_PTR *PFNGLCOLORP3UIVPROC)(GLenum   type, const  GLuint  * color);\ntypedef void (GLAD_API_PTR *PFNGLCOLORP4UIPROC)(GLenum   type, GLuint   color);\ntypedef void (GLAD_API_PTR *PFNGLCOLORP4UIVPROC)(GLenum   type, const  GLuint  * color);\ntypedef void (GLAD_API_PTR *PFNGLCOLORPOINTERPROC)(GLint   size, GLenum   type, GLsizei   stride, const void * pointer);\ntypedef void (GLAD_API_PTR *PFNGLCOMPILESHADERPROC)(GLuint   shader);\ntypedef void (GLAD_API_PTR *PFNGLCOMPRESSEDTEXIMAGE1DPROC)(GLenum   target, GLint   level, GLenum   internalformat, GLsizei   width, GLint   border, GLsizei   imageSize, const void * data);\ntypedef void (GLAD_API_PTR *PFNGLCOMPRESSEDTEXIMAGE2DPROC)(GLenum   target, GLint   level, GLenum   internalformat, GLsizei   width, GLsizei   height, GLint   border, GLsizei   imageSize, const void * data);\ntypedef void (GLAD_API_PTR *PFNGLCOMPRESSEDTEXIMAGE3DPROC)(GLenum   target, GLint   level, GLenum   internalformat, GLsizei   width, GLsizei   height, GLsizei   depth, GLint   border, GLsizei   imageSize, const void * data);\ntypedef void (GLAD_API_PTR *PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC)(GLenum   target, GLint   level, GLint   xoffset, GLsizei   width, GLenum   format, GLsizei   imageSize, const void * data);\ntypedef void (GLAD_API_PTR *PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC)(GLenum   target, GLint   level, GLint   xoffset, GLint   yoffset, GLsizei   width, GLsizei   height, GLenum   format, GLsizei   imageSize, const void * data);\ntypedef void (GLAD_API_PTR *PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC)(GLenum   target, GLint   level, GLint   xoffset, GLint   yoffset, GLint   zoffset, GLsizei   width, GLsizei   height, GLsizei   depth, GLenum   format, GLsizei   imageSize, const void * data);\ntypedef void (GLAD_API_PTR *PFNGLCOPYBUFFERSUBDATAPROC)(GLenum   readTarget, GLenum   writeTarget, GLintptr   readOffset, GLintptr   writeOffset, GLsizeiptr   size);\ntypedef void (GLAD_API_PTR *PFNGLCOPYPIXELSPROC)(GLint   x, GLint   y, GLsizei   width, GLsizei   height, GLenum   type);\ntypedef void (GLAD_API_PTR *PFNGLCOPYTEXIMAGE1DPROC)(GLenum   target, GLint   level, GLenum   internalformat, GLint   x, GLint   y, GLsizei   width, GLint   border);\ntypedef void (GLAD_API_PTR *PFNGLCOPYTEXIMAGE2DPROC)(GLenum   target, GLint   level, GLenum   internalformat, GLint   x, GLint   y, GLsizei   width, GLsizei   height, GLint   border);\ntypedef void (GLAD_API_PTR *PFNGLCOPYTEXSUBIMAGE1DPROC)(GLenum   target, GLint   level, GLint   xoffset, GLint   x, GLint   y, GLsizei   width);\ntypedef void (GLAD_API_PTR *PFNGLCOPYTEXSUBIMAGE2DPROC)(GLenum   target, GLint   level, GLint   xoffset, GLint   yoffset, GLint   x, GLint   y, GLsizei   width, GLsizei   height);\ntypedef void (GLAD_API_PTR *PFNGLCOPYTEXSUBIMAGE3DPROC)(GLenum   target, GLint   level, GLint   xoffset, GLint   yoffset, GLint   zoffset, GLint   x, GLint   y, GLsizei   width, GLsizei   height);\ntypedef GLuint (GLAD_API_PTR *PFNGLCREATEPROGRAMPROC)(void);\ntypedef GLuint (GLAD_API_PTR *PFNGLCREATESHADERPROC)(GLenum   type);\ntypedef void (GLAD_API_PTR *PFNGLCULLFACEPROC)(GLenum   mode);\ntypedef void (GLAD_API_PTR *PFNGLDEBUGMESSAGECALLBACKPROC)(GLDEBUGPROC   callback, const void * userParam);\ntypedef void (GLAD_API_PTR *PFNGLDEBUGMESSAGECONTROLPROC)(GLenum   source, GLenum   type, GLenum   severity, GLsizei   count, const  GLuint  * ids, GLboolean   enabled);\ntypedef void (GLAD_API_PTR *PFNGLDEBUGMESSAGEINSERTPROC)(GLenum   source, GLenum   type, GLuint   id, GLenum   severity, GLsizei   length, const  GLchar  * buf);\ntypedef void (GLAD_API_PTR *PFNGLDELETEBUFFERSPROC)(GLsizei   n, const  GLuint  * buffers);\ntypedef void (GLAD_API_PTR *PFNGLDELETEFRAMEBUFFERSPROC)(GLsizei   n, const  GLuint  * framebuffers);\ntypedef void (GLAD_API_PTR *PFNGLDELETELISTSPROC)(GLuint   list, GLsizei   range);\ntypedef void (GLAD_API_PTR *PFNGLDELETEPROGRAMPROC)(GLuint   program);\ntypedef void (GLAD_API_PTR *PFNGLDELETEQUERIESPROC)(GLsizei   n, const  GLuint  * ids);\ntypedef void (GLAD_API_PTR *PFNGLDELETERENDERBUFFERSPROC)(GLsizei   n, const  GLuint  * renderbuffers);\ntypedef void (GLAD_API_PTR *PFNGLDELETESAMPLERSPROC)(GLsizei   count, const  GLuint  * samplers);\ntypedef void (GLAD_API_PTR *PFNGLDELETESHADERPROC)(GLuint   shader);\ntypedef void (GLAD_API_PTR *PFNGLDELETESYNCPROC)(GLsync   sync);\ntypedef void (GLAD_API_PTR *PFNGLDELETETEXTURESPROC)(GLsizei   n, const  GLuint  * textures);\ntypedef void (GLAD_API_PTR *PFNGLDELETEVERTEXARRAYSPROC)(GLsizei   n, const  GLuint  * arrays);\ntypedef void (GLAD_API_PTR *PFNGLDEPTHFUNCPROC)(GLenum   func);\ntypedef void (GLAD_API_PTR *PFNGLDEPTHMASKPROC)(GLboolean   flag);\ntypedef void (GLAD_API_PTR *PFNGLDEPTHRANGEPROC)(GLdouble   n, GLdouble   f);\ntypedef void (GLAD_API_PTR *PFNGLDETACHSHADERPROC)(GLuint   program, GLuint   shader);\ntypedef void (GLAD_API_PTR *PFNGLDISABLEPROC)(GLenum   cap);\ntypedef void (GLAD_API_PTR *PFNGLDISABLECLIENTSTATEPROC)(GLenum   array);\ntypedef void (GLAD_API_PTR *PFNGLDISABLEVERTEXATTRIBARRAYPROC)(GLuint   index);\ntypedef void (GLAD_API_PTR *PFNGLDISABLEIPROC)(GLenum   target, GLuint   index);\ntypedef void (GLAD_API_PTR *PFNGLDRAWARRAYSPROC)(GLenum   mode, GLint   first, GLsizei   count);\ntypedef void (GLAD_API_PTR *PFNGLDRAWARRAYSINSTANCEDPROC)(GLenum   mode, GLint   first, GLsizei   count, GLsizei   instancecount);\ntypedef void (GLAD_API_PTR *PFNGLDRAWBUFFERPROC)(GLenum   buf);\ntypedef void (GLAD_API_PTR *PFNGLDRAWBUFFERSPROC)(GLsizei   n, const  GLenum  * bufs);\ntypedef void (GLAD_API_PTR *PFNGLDRAWELEMENTSPROC)(GLenum   mode, GLsizei   count, GLenum   type, const void * indices);\ntypedef void (GLAD_API_PTR *PFNGLDRAWELEMENTSBASEVERTEXPROC)(GLenum   mode, GLsizei   count, GLenum   type, const void * indices, GLint   basevertex);\ntypedef void (GLAD_API_PTR *PFNGLDRAWELEMENTSINSTANCEDPROC)(GLenum   mode, GLsizei   count, GLenum   type, const void * indices, GLsizei   instancecount);\ntypedef void (GLAD_API_PTR *PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXPROC)(GLenum   mode, GLsizei   count, GLenum   type, const void * indices, GLsizei   instancecount, GLint   basevertex);\ntypedef void (GLAD_API_PTR *PFNGLDRAWPIXELSPROC)(GLsizei   width, GLsizei   height, GLenum   format, GLenum   type, const void * pixels);\ntypedef void (GLAD_API_PTR *PFNGLDRAWRANGEELEMENTSPROC)(GLenum   mode, GLuint   start, GLuint   end, GLsizei   count, GLenum   type, const void * indices);\ntypedef void (GLAD_API_PTR *PFNGLDRAWRANGEELEMENTSBASEVERTEXPROC)(GLenum   mode, GLuint   start, GLuint   end, GLsizei   count, GLenum   type, const void * indices, GLint   basevertex);\ntypedef void (GLAD_API_PTR *PFNGLEDGEFLAGPROC)(GLboolean   flag);\ntypedef void (GLAD_API_PTR *PFNGLEDGEFLAGPOINTERPROC)(GLsizei   stride, const void * pointer);\ntypedef void (GLAD_API_PTR *PFNGLEDGEFLAGVPROC)(const  GLboolean  * flag);\ntypedef void (GLAD_API_PTR *PFNGLENABLEPROC)(GLenum   cap);\ntypedef void (GLAD_API_PTR *PFNGLENABLECLIENTSTATEPROC)(GLenum   array);\ntypedef void (GLAD_API_PTR *PFNGLENABLEVERTEXATTRIBARRAYPROC)(GLuint   index);\ntypedef void (GLAD_API_PTR *PFNGLENABLEIPROC)(GLenum   target, GLuint   index);\ntypedef void (GLAD_API_PTR *PFNGLENDPROC)(void);\ntypedef void (GLAD_API_PTR *PFNGLENDCONDITIONALRENDERPROC)(void);\ntypedef void (GLAD_API_PTR *PFNGLENDLISTPROC)(void);\ntypedef void (GLAD_API_PTR *PFNGLENDQUERYPROC)(GLenum   target);\ntypedef void (GLAD_API_PTR *PFNGLENDTRANSFORMFEEDBACKPROC)(void);\ntypedef void (GLAD_API_PTR *PFNGLEVALCOORD1DPROC)(GLdouble   u);\ntypedef void (GLAD_API_PTR *PFNGLEVALCOORD1DVPROC)(const  GLdouble  * u);\ntypedef void (GLAD_API_PTR *PFNGLEVALCOORD1FPROC)(GLfloat   u);\ntypedef void (GLAD_API_PTR *PFNGLEVALCOORD1FVPROC)(const  GLfloat  * u);\ntypedef void (GLAD_API_PTR *PFNGLEVALCOORD2DPROC)(GLdouble   u, GLdouble   v);\ntypedef void (GLAD_API_PTR *PFNGLEVALCOORD2DVPROC)(const  GLdouble  * u);\ntypedef void (GLAD_API_PTR *PFNGLEVALCOORD2FPROC)(GLfloat   u, GLfloat   v);\ntypedef void (GLAD_API_PTR *PFNGLEVALCOORD2FVPROC)(const  GLfloat  * u);\ntypedef void (GLAD_API_PTR *PFNGLEVALMESH1PROC)(GLenum   mode, GLint   i1, GLint   i2);\ntypedef void (GLAD_API_PTR *PFNGLEVALMESH2PROC)(GLenum   mode, GLint   i1, GLint   i2, GLint   j1, GLint   j2);\ntypedef void (GLAD_API_PTR *PFNGLEVALPOINT1PROC)(GLint   i);\ntypedef void (GLAD_API_PTR *PFNGLEVALPOINT2PROC)(GLint   i, GLint   j);\ntypedef void (GLAD_API_PTR *PFNGLFEEDBACKBUFFERPROC)(GLsizei   size, GLenum   type, GLfloat  * buffer);\ntypedef GLsync (GLAD_API_PTR *PFNGLFENCESYNCPROC)(GLenum   condition, GLbitfield   flags);\ntypedef void (GLAD_API_PTR *PFNGLFINISHPROC)(void);\ntypedef void (GLAD_API_PTR *PFNGLFLUSHPROC)(void);\ntypedef void (GLAD_API_PTR *PFNGLFLUSHMAPPEDBUFFERRANGEPROC)(GLenum   target, GLintptr   offset, GLsizeiptr   length);\ntypedef void (GLAD_API_PTR *PFNGLFOGCOORDPOINTERPROC)(GLenum   type, GLsizei   stride, const void * pointer);\ntypedef void (GLAD_API_PTR *PFNGLFOGCOORDDPROC)(GLdouble   coord);\ntypedef void (GLAD_API_PTR *PFNGLFOGCOORDDVPROC)(const  GLdouble  * coord);\ntypedef void (GLAD_API_PTR *PFNGLFOGCOORDFPROC)(GLfloat   coord);\ntypedef void (GLAD_API_PTR *PFNGLFOGCOORDFVPROC)(const  GLfloat  * coord);\ntypedef void (GLAD_API_PTR *PFNGLFOGFPROC)(GLenum   pname, GLfloat   param);\ntypedef void (GLAD_API_PTR *PFNGLFOGFVPROC)(GLenum   pname, const  GLfloat  * params);\ntypedef void (GLAD_API_PTR *PFNGLFOGIPROC)(GLenum   pname, GLint   param);\ntypedef void (GLAD_API_PTR *PFNGLFOGIVPROC)(GLenum   pname, const  GLint  * params);\ntypedef void (GLAD_API_PTR *PFNGLFRAMEBUFFERRENDERBUFFERPROC)(GLenum   target, GLenum   attachment, GLenum   renderbuffertarget, GLuint   renderbuffer);\ntypedef void (GLAD_API_PTR *PFNGLFRAMEBUFFERTEXTUREPROC)(GLenum   target, GLenum   attachment, GLuint   texture, GLint   level);\ntypedef void (GLAD_API_PTR *PFNGLFRAMEBUFFERTEXTURE1DPROC)(GLenum   target, GLenum   attachment, GLenum   textarget, GLuint   texture, GLint   level);\ntypedef void (GLAD_API_PTR *PFNGLFRAMEBUFFERTEXTURE2DPROC)(GLenum   target, GLenum   attachment, GLenum   textarget, GLuint   texture, GLint   level);\ntypedef void (GLAD_API_PTR *PFNGLFRAMEBUFFERTEXTURE3DPROC)(GLenum   target, GLenum   attachment, GLenum   textarget, GLuint   texture, GLint   level, GLint   zoffset);\ntypedef void (GLAD_API_PTR *PFNGLFRAMEBUFFERTEXTURELAYERPROC)(GLenum   target, GLenum   attachment, GLuint   texture, GLint   level, GLint   layer);\ntypedef void (GLAD_API_PTR *PFNGLFRONTFACEPROC)(GLenum   mode);\ntypedef void (GLAD_API_PTR *PFNGLFRUSTUMPROC)(GLdouble   left, GLdouble   right, GLdouble   bottom, GLdouble   top, GLdouble   zNear, GLdouble   zFar);\ntypedef void (GLAD_API_PTR *PFNGLGENBUFFERSPROC)(GLsizei   n, GLuint  * buffers);\ntypedef void (GLAD_API_PTR *PFNGLGENFRAMEBUFFERSPROC)(GLsizei   n, GLuint  * framebuffers);\ntypedef GLuint (GLAD_API_PTR *PFNGLGENLISTSPROC)(GLsizei   range);\ntypedef void (GLAD_API_PTR *PFNGLGENQUERIESPROC)(GLsizei   n, GLuint  * ids);\ntypedef void (GLAD_API_PTR *PFNGLGENRENDERBUFFERSPROC)(GLsizei   n, GLuint  * renderbuffers);\ntypedef void (GLAD_API_PTR *PFNGLGENSAMPLERSPROC)(GLsizei   count, GLuint  * samplers);\ntypedef void (GLAD_API_PTR *PFNGLGENTEXTURESPROC)(GLsizei   n, GLuint  * textures);\ntypedef void (GLAD_API_PTR *PFNGLGENVERTEXARRAYSPROC)(GLsizei   n, GLuint  * arrays);\ntypedef void (GLAD_API_PTR *PFNGLGENERATEMIPMAPPROC)(GLenum   target);\ntypedef void (GLAD_API_PTR *PFNGLGETACTIVEATTRIBPROC)(GLuint   program, GLuint   index, GLsizei   bufSize, GLsizei  * length, GLint  * size, GLenum  * type, GLchar  * name);\ntypedef void (GLAD_API_PTR *PFNGLGETACTIVEUNIFORMPROC)(GLuint   program, GLuint   index, GLsizei   bufSize, GLsizei  * length, GLint  * size, GLenum  * type, GLchar  * name);\ntypedef void (GLAD_API_PTR *PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC)(GLuint   program, GLuint   uniformBlockIndex, GLsizei   bufSize, GLsizei  * length, GLchar  * uniformBlockName);\ntypedef void (GLAD_API_PTR *PFNGLGETACTIVEUNIFORMBLOCKIVPROC)(GLuint   program, GLuint   uniformBlockIndex, GLenum   pname, GLint  * params);\ntypedef void (GLAD_API_PTR *PFNGLGETACTIVEUNIFORMNAMEPROC)(GLuint   program, GLuint   uniformIndex, GLsizei   bufSize, GLsizei  * length, GLchar  * uniformName);\ntypedef void (GLAD_API_PTR *PFNGLGETACTIVEUNIFORMSIVPROC)(GLuint   program, GLsizei   uniformCount, const  GLuint  * uniformIndices, GLenum   pname, GLint  * params);\ntypedef void (GLAD_API_PTR *PFNGLGETATTACHEDSHADERSPROC)(GLuint   program, GLsizei   maxCount, GLsizei  * count, GLuint  * shaders);\ntypedef GLint (GLAD_API_PTR *PFNGLGETATTRIBLOCATIONPROC)(GLuint   program, const  GLchar  * name);\ntypedef void (GLAD_API_PTR *PFNGLGETBOOLEANI_VPROC)(GLenum   target, GLuint   index, GLboolean  * data);\ntypedef void (GLAD_API_PTR *PFNGLGETBOOLEANVPROC)(GLenum   pname, GLboolean  * data);\ntypedef void (GLAD_API_PTR *PFNGLGETBUFFERPARAMETERI64VPROC)(GLenum   target, GLenum   pname, GLint64  * params);\ntypedef void (GLAD_API_PTR *PFNGLGETBUFFERPARAMETERIVPROC)(GLenum   target, GLenum   pname, GLint  * params);\ntypedef void (GLAD_API_PTR *PFNGLGETBUFFERPOINTERVPROC)(GLenum   target, GLenum   pname, void ** params);\ntypedef void (GLAD_API_PTR *PFNGLGETBUFFERSUBDATAPROC)(GLenum   target, GLintptr   offset, GLsizeiptr   size, void * data);\ntypedef void (GLAD_API_PTR *PFNGLGETCLIPPLANEPROC)(GLenum   plane, GLdouble  * equation);\ntypedef void (GLAD_API_PTR *PFNGLGETCOMPRESSEDTEXIMAGEPROC)(GLenum   target, GLint   level, void * img);\ntypedef GLuint (GLAD_API_PTR *PFNGLGETDEBUGMESSAGELOGPROC)(GLuint   count, GLsizei   bufSize, GLenum  * sources, GLenum  * types, GLuint  * ids, GLenum  * severities, GLsizei  * lengths, GLchar  * messageLog);\ntypedef void (GLAD_API_PTR *PFNGLGETDOUBLEVPROC)(GLenum   pname, GLdouble  * data);\ntypedef GLenum (GLAD_API_PTR *PFNGLGETERRORPROC)(void);\ntypedef void (GLAD_API_PTR *PFNGLGETFLOATVPROC)(GLenum   pname, GLfloat  * data);\ntypedef GLint (GLAD_API_PTR *PFNGLGETFRAGDATAINDEXPROC)(GLuint   program, const  GLchar  * name);\ntypedef GLint (GLAD_API_PTR *PFNGLGETFRAGDATALOCATIONPROC)(GLuint   program, const  GLchar  * name);\ntypedef void (GLAD_API_PTR *PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC)(GLenum   target, GLenum   attachment, GLenum   pname, GLint  * params);\ntypedef GLenum (GLAD_API_PTR *PFNGLGETGRAPHICSRESETSTATUSARBPROC)(void);\ntypedef void (GLAD_API_PTR *PFNGLGETINTEGER64I_VPROC)(GLenum   target, GLuint   index, GLint64  * data);\ntypedef void (GLAD_API_PTR *PFNGLGETINTEGER64VPROC)(GLenum   pname, GLint64  * data);\ntypedef void (GLAD_API_PTR *PFNGLGETINTEGERI_VPROC)(GLenum   target, GLuint   index, GLint  * data);\ntypedef void (GLAD_API_PTR *PFNGLGETINTEGERVPROC)(GLenum   pname, GLint  * data);\ntypedef void (GLAD_API_PTR *PFNGLGETLIGHTFVPROC)(GLenum   light, GLenum   pname, GLfloat  * params);\ntypedef void (GLAD_API_PTR *PFNGLGETLIGHTIVPROC)(GLenum   light, GLenum   pname, GLint  * params);\ntypedef void (GLAD_API_PTR *PFNGLGETMAPDVPROC)(GLenum   target, GLenum   query, GLdouble  * v);\ntypedef void (GLAD_API_PTR *PFNGLGETMAPFVPROC)(GLenum   target, GLenum   query, GLfloat  * v);\ntypedef void (GLAD_API_PTR *PFNGLGETMAPIVPROC)(GLenum   target, GLenum   query, GLint  * v);\ntypedef void (GLAD_API_PTR *PFNGLGETMATERIALFVPROC)(GLenum   face, GLenum   pname, GLfloat  * params);\ntypedef void (GLAD_API_PTR *PFNGLGETMATERIALIVPROC)(GLenum   face, GLenum   pname, GLint  * params);\ntypedef void (GLAD_API_PTR *PFNGLGETMULTISAMPLEFVPROC)(GLenum   pname, GLuint   index, GLfloat  * val);\ntypedef void (GLAD_API_PTR *PFNGLGETOBJECTLABELPROC)(GLenum   identifier, GLuint   name, GLsizei   bufSize, GLsizei  * length, GLchar  * label);\ntypedef void (GLAD_API_PTR *PFNGLGETOBJECTPTRLABELPROC)(const void * ptr, GLsizei   bufSize, GLsizei  * length, GLchar  * label);\ntypedef void (GLAD_API_PTR *PFNGLGETPIXELMAPFVPROC)(GLenum   map, GLfloat  * values);\ntypedef void (GLAD_API_PTR *PFNGLGETPIXELMAPUIVPROC)(GLenum   map, GLuint  * values);\ntypedef void (GLAD_API_PTR *PFNGLGETPIXELMAPUSVPROC)(GLenum   map, GLushort  * values);\ntypedef void (GLAD_API_PTR *PFNGLGETPOINTERVPROC)(GLenum   pname, void ** params);\ntypedef void (GLAD_API_PTR *PFNGLGETPOLYGONSTIPPLEPROC)(GLubyte  * mask);\ntypedef void (GLAD_API_PTR *PFNGLGETPROGRAMINFOLOGPROC)(GLuint   program, GLsizei   bufSize, GLsizei  * length, GLchar  * infoLog);\ntypedef void (GLAD_API_PTR *PFNGLGETPROGRAMIVPROC)(GLuint   program, GLenum   pname, GLint  * params);\ntypedef void (GLAD_API_PTR *PFNGLGETQUERYOBJECTI64VPROC)(GLuint   id, GLenum   pname, GLint64  * params);\ntypedef void (GLAD_API_PTR *PFNGLGETQUERYOBJECTIVPROC)(GLuint   id, GLenum   pname, GLint  * params);\ntypedef void (GLAD_API_PTR *PFNGLGETQUERYOBJECTUI64VPROC)(GLuint   id, GLenum   pname, GLuint64  * params);\ntypedef void (GLAD_API_PTR *PFNGLGETQUERYOBJECTUIVPROC)(GLuint   id, GLenum   pname, GLuint  * params);\ntypedef void (GLAD_API_PTR *PFNGLGETQUERYIVPROC)(GLenum   target, GLenum   pname, GLint  * params);\ntypedef void (GLAD_API_PTR *PFNGLGETRENDERBUFFERPARAMETERIVPROC)(GLenum   target, GLenum   pname, GLint  * params);\ntypedef void (GLAD_API_PTR *PFNGLGETSAMPLERPARAMETERIIVPROC)(GLuint   sampler, GLenum   pname, GLint  * params);\ntypedef void (GLAD_API_PTR *PFNGLGETSAMPLERPARAMETERIUIVPROC)(GLuint   sampler, GLenum   pname, GLuint  * params);\ntypedef void (GLAD_API_PTR *PFNGLGETSAMPLERPARAMETERFVPROC)(GLuint   sampler, GLenum   pname, GLfloat  * params);\ntypedef void (GLAD_API_PTR *PFNGLGETSAMPLERPARAMETERIVPROC)(GLuint   sampler, GLenum   pname, GLint  * params);\ntypedef void (GLAD_API_PTR *PFNGLGETSHADERINFOLOGPROC)(GLuint   shader, GLsizei   bufSize, GLsizei  * length, GLchar  * infoLog);\ntypedef void (GLAD_API_PTR *PFNGLGETSHADERSOURCEPROC)(GLuint   shader, GLsizei   bufSize, GLsizei  * length, GLchar  * source);\ntypedef void (GLAD_API_PTR *PFNGLGETSHADERIVPROC)(GLuint   shader, GLenum   pname, GLint  * params);\ntypedef const GLubyte * (GLAD_API_PTR *PFNGLGETSTRINGPROC)(GLenum   name);\ntypedef const GLubyte * (GLAD_API_PTR *PFNGLGETSTRINGIPROC)(GLenum   name, GLuint   index);\ntypedef void (GLAD_API_PTR *PFNGLGETSYNCIVPROC)(GLsync   sync, GLenum   pname, GLsizei   bufSize, GLsizei  * length, GLint  * values);\ntypedef void (GLAD_API_PTR *PFNGLGETTEXENVFVPROC)(GLenum   target, GLenum   pname, GLfloat  * params);\ntypedef void (GLAD_API_PTR *PFNGLGETTEXENVIVPROC)(GLenum   target, GLenum   pname, GLint  * params);\ntypedef void (GLAD_API_PTR *PFNGLGETTEXGENDVPROC)(GLenum   coord, GLenum   pname, GLdouble  * params);\ntypedef void (GLAD_API_PTR *PFNGLGETTEXGENFVPROC)(GLenum   coord, GLenum   pname, GLfloat  * params);\ntypedef void (GLAD_API_PTR *PFNGLGETTEXGENIVPROC)(GLenum   coord, GLenum   pname, GLint  * params);\ntypedef void (GLAD_API_PTR *PFNGLGETTEXIMAGEPROC)(GLenum   target, GLint   level, GLenum   format, GLenum   type, void * pixels);\ntypedef void (GLAD_API_PTR *PFNGLGETTEXLEVELPARAMETERFVPROC)(GLenum   target, GLint   level, GLenum   pname, GLfloat  * params);\ntypedef void (GLAD_API_PTR *PFNGLGETTEXLEVELPARAMETERIVPROC)(GLenum   target, GLint   level, GLenum   pname, GLint  * params);\ntypedef void (GLAD_API_PTR *PFNGLGETTEXPARAMETERIIVPROC)(GLenum   target, GLenum   pname, GLint  * params);\ntypedef void (GLAD_API_PTR *PFNGLGETTEXPARAMETERIUIVPROC)(GLenum   target, GLenum   pname, GLuint  * params);\ntypedef void (GLAD_API_PTR *PFNGLGETTEXPARAMETERFVPROC)(GLenum   target, GLenum   pname, GLfloat  * params);\ntypedef void (GLAD_API_PTR *PFNGLGETTEXPARAMETERIVPROC)(GLenum   target, GLenum   pname, GLint  * params);\ntypedef void (GLAD_API_PTR *PFNGLGETTRANSFORMFEEDBACKVARYINGPROC)(GLuint   program, GLuint   index, GLsizei   bufSize, GLsizei  * length, GLsizei  * size, GLenum  * type, GLchar  * name);\ntypedef GLuint (GLAD_API_PTR *PFNGLGETUNIFORMBLOCKINDEXPROC)(GLuint   program, const  GLchar  * uniformBlockName);\ntypedef void (GLAD_API_PTR *PFNGLGETUNIFORMINDICESPROC)(GLuint   program, GLsizei   uniformCount, const  GLchar  *const* uniformNames, GLuint  * uniformIndices);\ntypedef GLint (GLAD_API_PTR *PFNGLGETUNIFORMLOCATIONPROC)(GLuint   program, const  GLchar  * name);\ntypedef void (GLAD_API_PTR *PFNGLGETUNIFORMFVPROC)(GLuint   program, GLint   location, GLfloat  * params);\ntypedef void (GLAD_API_PTR *PFNGLGETUNIFORMIVPROC)(GLuint   program, GLint   location, GLint  * params);\ntypedef void (GLAD_API_PTR *PFNGLGETUNIFORMUIVPROC)(GLuint   program, GLint   location, GLuint  * params);\ntypedef void (GLAD_API_PTR *PFNGLGETVERTEXATTRIBIIVPROC)(GLuint   index, GLenum   pname, GLint  * params);\ntypedef void (GLAD_API_PTR *PFNGLGETVERTEXATTRIBIUIVPROC)(GLuint   index, GLenum   pname, GLuint  * params);\ntypedef void (GLAD_API_PTR *PFNGLGETVERTEXATTRIBPOINTERVPROC)(GLuint   index, GLenum   pname, void ** pointer);\ntypedef void (GLAD_API_PTR *PFNGLGETVERTEXATTRIBDVPROC)(GLuint   index, GLenum   pname, GLdouble  * params);\ntypedef void (GLAD_API_PTR *PFNGLGETVERTEXATTRIBFVPROC)(GLuint   index, GLenum   pname, GLfloat  * params);\ntypedef void (GLAD_API_PTR *PFNGLGETVERTEXATTRIBIVPROC)(GLuint   index, GLenum   pname, GLint  * params);\ntypedef void (GLAD_API_PTR *PFNGLGETNCOLORTABLEARBPROC)(GLenum   target, GLenum   format, GLenum   type, GLsizei   bufSize, void * table);\ntypedef void (GLAD_API_PTR *PFNGLGETNCOMPRESSEDTEXIMAGEARBPROC)(GLenum   target, GLint   lod, GLsizei   bufSize, void * img);\ntypedef void (GLAD_API_PTR *PFNGLGETNCONVOLUTIONFILTERARBPROC)(GLenum   target, GLenum   format, GLenum   type, GLsizei   bufSize, void * image);\ntypedef void (GLAD_API_PTR *PFNGLGETNHISTOGRAMARBPROC)(GLenum   target, GLboolean   reset, GLenum   format, GLenum   type, GLsizei   bufSize, void * values);\ntypedef void (GLAD_API_PTR *PFNGLGETNMAPDVARBPROC)(GLenum   target, GLenum   query, GLsizei   bufSize, GLdouble  * v);\ntypedef void (GLAD_API_PTR *PFNGLGETNMAPFVARBPROC)(GLenum   target, GLenum   query, GLsizei   bufSize, GLfloat  * v);\ntypedef void (GLAD_API_PTR *PFNGLGETNMAPIVARBPROC)(GLenum   target, GLenum   query, GLsizei   bufSize, GLint  * v);\ntypedef void (GLAD_API_PTR *PFNGLGETNMINMAXARBPROC)(GLenum   target, GLboolean   reset, GLenum   format, GLenum   type, GLsizei   bufSize, void * values);\ntypedef void (GLAD_API_PTR *PFNGLGETNPIXELMAPFVARBPROC)(GLenum   map, GLsizei   bufSize, GLfloat  * values);\ntypedef void (GLAD_API_PTR *PFNGLGETNPIXELMAPUIVARBPROC)(GLenum   map, GLsizei   bufSize, GLuint  * values);\ntypedef void (GLAD_API_PTR *PFNGLGETNPIXELMAPUSVARBPROC)(GLenum   map, GLsizei   bufSize, GLushort  * values);\ntypedef void (GLAD_API_PTR *PFNGLGETNPOLYGONSTIPPLEARBPROC)(GLsizei   bufSize, GLubyte  * pattern);\ntypedef void (GLAD_API_PTR *PFNGLGETNSEPARABLEFILTERARBPROC)(GLenum   target, GLenum   format, GLenum   type, GLsizei   rowBufSize, void * row, GLsizei   columnBufSize, void * column, void * span);\ntypedef void (GLAD_API_PTR *PFNGLGETNTEXIMAGEARBPROC)(GLenum   target, GLint   level, GLenum   format, GLenum   type, GLsizei   bufSize, void * img);\ntypedef void (GLAD_API_PTR *PFNGLGETNUNIFORMDVARBPROC)(GLuint   program, GLint   location, GLsizei   bufSize, GLdouble  * params);\ntypedef void (GLAD_API_PTR *PFNGLGETNUNIFORMFVARBPROC)(GLuint   program, GLint   location, GLsizei   bufSize, GLfloat  * params);\ntypedef void (GLAD_API_PTR *PFNGLGETNUNIFORMIVARBPROC)(GLuint   program, GLint   location, GLsizei   bufSize, GLint  * params);\ntypedef void (GLAD_API_PTR *PFNGLGETNUNIFORMUIVARBPROC)(GLuint   program, GLint   location, GLsizei   bufSize, GLuint  * params);\ntypedef void (GLAD_API_PTR *PFNGLHINTPROC)(GLenum   target, GLenum   mode);\ntypedef void (GLAD_API_PTR *PFNGLINDEXMASKPROC)(GLuint   mask);\ntypedef void (GLAD_API_PTR *PFNGLINDEXPOINTERPROC)(GLenum   type, GLsizei   stride, const void * pointer);\ntypedef void (GLAD_API_PTR *PFNGLINDEXDPROC)(GLdouble   c);\ntypedef void (GLAD_API_PTR *PFNGLINDEXDVPROC)(const  GLdouble  * c);\ntypedef void (GLAD_API_PTR *PFNGLINDEXFPROC)(GLfloat   c);\ntypedef void (GLAD_API_PTR *PFNGLINDEXFVPROC)(const  GLfloat  * c);\ntypedef void (GLAD_API_PTR *PFNGLINDEXIPROC)(GLint   c);\ntypedef void (GLAD_API_PTR *PFNGLINDEXIVPROC)(const  GLint  * c);\ntypedef void (GLAD_API_PTR *PFNGLINDEXSPROC)(GLshort   c);\ntypedef void (GLAD_API_PTR *PFNGLINDEXSVPROC)(const  GLshort  * c);\ntypedef void (GLAD_API_PTR *PFNGLINDEXUBPROC)(GLubyte   c);\ntypedef void (GLAD_API_PTR *PFNGLINDEXUBVPROC)(const  GLubyte  * c);\ntypedef void (GLAD_API_PTR *PFNGLINITNAMESPROC)(void);\ntypedef void (GLAD_API_PTR *PFNGLINTERLEAVEDARRAYSPROC)(GLenum   format, GLsizei   stride, const void * pointer);\ntypedef GLboolean (GLAD_API_PTR *PFNGLISBUFFERPROC)(GLuint   buffer);\ntypedef GLboolean (GLAD_API_PTR *PFNGLISENABLEDPROC)(GLenum   cap);\ntypedef GLboolean (GLAD_API_PTR *PFNGLISENABLEDIPROC)(GLenum   target, GLuint   index);\ntypedef GLboolean (GLAD_API_PTR *PFNGLISFRAMEBUFFERPROC)(GLuint   framebuffer);\ntypedef GLboolean (GLAD_API_PTR *PFNGLISLISTPROC)(GLuint   list);\ntypedef GLboolean (GLAD_API_PTR *PFNGLISPROGRAMPROC)(GLuint   program);\ntypedef GLboolean (GLAD_API_PTR *PFNGLISQUERYPROC)(GLuint   id);\ntypedef GLboolean (GLAD_API_PTR *PFNGLISRENDERBUFFERPROC)(GLuint   renderbuffer);\ntypedef GLboolean (GLAD_API_PTR *PFNGLISSAMPLERPROC)(GLuint   sampler);\ntypedef GLboolean (GLAD_API_PTR *PFNGLISSHADERPROC)(GLuint   shader);\ntypedef GLboolean (GLAD_API_PTR *PFNGLISSYNCPROC)(GLsync   sync);\ntypedef GLboolean (GLAD_API_PTR *PFNGLISTEXTUREPROC)(GLuint   texture);\ntypedef GLboolean (GLAD_API_PTR *PFNGLISVERTEXARRAYPROC)(GLuint   array);\ntypedef void (GLAD_API_PTR *PFNGLLIGHTMODELFPROC)(GLenum   pname, GLfloat   param);\ntypedef void (GLAD_API_PTR *PFNGLLIGHTMODELFVPROC)(GLenum   pname, const  GLfloat  * params);\ntypedef void (GLAD_API_PTR *PFNGLLIGHTMODELIPROC)(GLenum   pname, GLint   param);\ntypedef void (GLAD_API_PTR *PFNGLLIGHTMODELIVPROC)(GLenum   pname, const  GLint  * params);\ntypedef void (GLAD_API_PTR *PFNGLLIGHTFPROC)(GLenum   light, GLenum   pname, GLfloat   param);\ntypedef void (GLAD_API_PTR *PFNGLLIGHTFVPROC)(GLenum   light, GLenum   pname, const  GLfloat  * params);\ntypedef void (GLAD_API_PTR *PFNGLLIGHTIPROC)(GLenum   light, GLenum   pname, GLint   param);\ntypedef void (GLAD_API_PTR *PFNGLLIGHTIVPROC)(GLenum   light, GLenum   pname, const  GLint  * params);\ntypedef void (GLAD_API_PTR *PFNGLLINESTIPPLEPROC)(GLint   factor, GLushort   pattern);\ntypedef void (GLAD_API_PTR *PFNGLLINEWIDTHPROC)(GLfloat   width);\ntypedef void (GLAD_API_PTR *PFNGLLINKPROGRAMPROC)(GLuint   program);\ntypedef void (GLAD_API_PTR *PFNGLLISTBASEPROC)(GLuint   base);\ntypedef void (GLAD_API_PTR *PFNGLLOADIDENTITYPROC)(void);\ntypedef void (GLAD_API_PTR *PFNGLLOADMATRIXDPROC)(const  GLdouble  * m);\ntypedef void (GLAD_API_PTR *PFNGLLOADMATRIXFPROC)(const  GLfloat  * m);\ntypedef void (GLAD_API_PTR *PFNGLLOADNAMEPROC)(GLuint   name);\ntypedef void (GLAD_API_PTR *PFNGLLOADTRANSPOSEMATRIXDPROC)(const  GLdouble  * m);\ntypedef void (GLAD_API_PTR *PFNGLLOADTRANSPOSEMATRIXFPROC)(const  GLfloat  * m);\ntypedef void (GLAD_API_PTR *PFNGLLOGICOPPROC)(GLenum   opcode);\ntypedef void (GLAD_API_PTR *PFNGLMAP1DPROC)(GLenum   target, GLdouble   u1, GLdouble   u2, GLint   stride, GLint   order, const  GLdouble  * points);\ntypedef void (GLAD_API_PTR *PFNGLMAP1FPROC)(GLenum   target, GLfloat   u1, GLfloat   u2, GLint   stride, GLint   order, const  GLfloat  * points);\ntypedef void (GLAD_API_PTR *PFNGLMAP2DPROC)(GLenum   target, GLdouble   u1, GLdouble   u2, GLint   ustride, GLint   uorder, GLdouble   v1, GLdouble   v2, GLint   vstride, GLint   vorder, const  GLdouble  * points);\ntypedef void (GLAD_API_PTR *PFNGLMAP2FPROC)(GLenum   target, GLfloat   u1, GLfloat   u2, GLint   ustride, GLint   uorder, GLfloat   v1, GLfloat   v2, GLint   vstride, GLint   vorder, const  GLfloat  * points);\ntypedef void * (GLAD_API_PTR *PFNGLMAPBUFFERPROC)(GLenum   target, GLenum   access);\ntypedef void * (GLAD_API_PTR *PFNGLMAPBUFFERRANGEPROC)(GLenum   target, GLintptr   offset, GLsizeiptr   length, GLbitfield   access);\ntypedef void (GLAD_API_PTR *PFNGLMAPGRID1DPROC)(GLint   un, GLdouble   u1, GLdouble   u2);\ntypedef void (GLAD_API_PTR *PFNGLMAPGRID1FPROC)(GLint   un, GLfloat   u1, GLfloat   u2);\ntypedef void (GLAD_API_PTR *PFNGLMAPGRID2DPROC)(GLint   un, GLdouble   u1, GLdouble   u2, GLint   vn, GLdouble   v1, GLdouble   v2);\ntypedef void (GLAD_API_PTR *PFNGLMAPGRID2FPROC)(GLint   un, GLfloat   u1, GLfloat   u2, GLint   vn, GLfloat   v1, GLfloat   v2);\ntypedef void (GLAD_API_PTR *PFNGLMATERIALFPROC)(GLenum   face, GLenum   pname, GLfloat   param);\ntypedef void (GLAD_API_PTR *PFNGLMATERIALFVPROC)(GLenum   face, GLenum   pname, const  GLfloat  * params);\ntypedef void (GLAD_API_PTR *PFNGLMATERIALIPROC)(GLenum   face, GLenum   pname, GLint   param);\ntypedef void (GLAD_API_PTR *PFNGLMATERIALIVPROC)(GLenum   face, GLenum   pname, const  GLint  * params);\ntypedef void (GLAD_API_PTR *PFNGLMATRIXMODEPROC)(GLenum   mode);\ntypedef void (GLAD_API_PTR *PFNGLMULTMATRIXDPROC)(const  GLdouble  * m);\ntypedef void (GLAD_API_PTR *PFNGLMULTMATRIXFPROC)(const  GLfloat  * m);\ntypedef void (GLAD_API_PTR *PFNGLMULTTRANSPOSEMATRIXDPROC)(const  GLdouble  * m);\ntypedef void (GLAD_API_PTR *PFNGLMULTTRANSPOSEMATRIXFPROC)(const  GLfloat  * m);\ntypedef void (GLAD_API_PTR *PFNGLMULTIDRAWARRAYSPROC)(GLenum   mode, const  GLint  * first, const  GLsizei  * count, GLsizei   drawcount);\ntypedef void (GLAD_API_PTR *PFNGLMULTIDRAWELEMENTSPROC)(GLenum   mode, const  GLsizei  * count, GLenum   type, const void *const* indices, GLsizei   drawcount);\ntypedef void (GLAD_API_PTR *PFNGLMULTIDRAWELEMENTSBASEVERTEXPROC)(GLenum   mode, const  GLsizei  * count, GLenum   type, const void *const* indices, GLsizei   drawcount, const  GLint  * basevertex);\ntypedef void (GLAD_API_PTR *PFNGLMULTITEXCOORD1DPROC)(GLenum   target, GLdouble   s);\ntypedef void (GLAD_API_PTR *PFNGLMULTITEXCOORD1DVPROC)(GLenum   target, const  GLdouble  * v);\ntypedef void (GLAD_API_PTR *PFNGLMULTITEXCOORD1FPROC)(GLenum   target, GLfloat   s);\ntypedef void (GLAD_API_PTR *PFNGLMULTITEXCOORD1FVPROC)(GLenum   target, const  GLfloat  * v);\ntypedef void (GLAD_API_PTR *PFNGLMULTITEXCOORD1IPROC)(GLenum   target, GLint   s);\ntypedef void (GLAD_API_PTR *PFNGLMULTITEXCOORD1IVPROC)(GLenum   target, const  GLint  * v);\ntypedef void (GLAD_API_PTR *PFNGLMULTITEXCOORD1SPROC)(GLenum   target, GLshort   s);\ntypedef void (GLAD_API_PTR *PFNGLMULTITEXCOORD1SVPROC)(GLenum   target, const  GLshort  * v);\ntypedef void (GLAD_API_PTR *PFNGLMULTITEXCOORD2DPROC)(GLenum   target, GLdouble   s, GLdouble   t);\ntypedef void (GLAD_API_PTR *PFNGLMULTITEXCOORD2DVPROC)(GLenum   target, const  GLdouble  * v);\ntypedef void (GLAD_API_PTR *PFNGLMULTITEXCOORD2FPROC)(GLenum   target, GLfloat   s, GLfloat   t);\ntypedef void (GLAD_API_PTR *PFNGLMULTITEXCOORD2FVPROC)(GLenum   target, const  GLfloat  * v);\ntypedef void (GLAD_API_PTR *PFNGLMULTITEXCOORD2IPROC)(GLenum   target, GLint   s, GLint   t);\ntypedef void (GLAD_API_PTR *PFNGLMULTITEXCOORD2IVPROC)(GLenum   target, const  GLint  * v);\ntypedef void (GLAD_API_PTR *PFNGLMULTITEXCOORD2SPROC)(GLenum   target, GLshort   s, GLshort   t);\ntypedef void (GLAD_API_PTR *PFNGLMULTITEXCOORD2SVPROC)(GLenum   target, const  GLshort  * v);\ntypedef void (GLAD_API_PTR *PFNGLMULTITEXCOORD3DPROC)(GLenum   target, GLdouble   s, GLdouble   t, GLdouble   r);\ntypedef void (GLAD_API_PTR *PFNGLMULTITEXCOORD3DVPROC)(GLenum   target, const  GLdouble  * v);\ntypedef void (GLAD_API_PTR *PFNGLMULTITEXCOORD3FPROC)(GLenum   target, GLfloat   s, GLfloat   t, GLfloat   r);\ntypedef void (GLAD_API_PTR *PFNGLMULTITEXCOORD3FVPROC)(GLenum   target, const  GLfloat  * v);\ntypedef void (GLAD_API_PTR *PFNGLMULTITEXCOORD3IPROC)(GLenum   target, GLint   s, GLint   t, GLint   r);\ntypedef void (GLAD_API_PTR *PFNGLMULTITEXCOORD3IVPROC)(GLenum   target, const  GLint  * v);\ntypedef void (GLAD_API_PTR *PFNGLMULTITEXCOORD3SPROC)(GLenum   target, GLshort   s, GLshort   t, GLshort   r);\ntypedef void (GLAD_API_PTR *PFNGLMULTITEXCOORD3SVPROC)(GLenum   target, const  GLshort  * v);\ntypedef void (GLAD_API_PTR *PFNGLMULTITEXCOORD4DPROC)(GLenum   target, GLdouble   s, GLdouble   t, GLdouble   r, GLdouble   q);\ntypedef void (GLAD_API_PTR *PFNGLMULTITEXCOORD4DVPROC)(GLenum   target, const  GLdouble  * v);\ntypedef void (GLAD_API_PTR *PFNGLMULTITEXCOORD4FPROC)(GLenum   target, GLfloat   s, GLfloat   t, GLfloat   r, GLfloat   q);\ntypedef void (GLAD_API_PTR *PFNGLMULTITEXCOORD4FVPROC)(GLenum   target, const  GLfloat  * v);\ntypedef void (GLAD_API_PTR *PFNGLMULTITEXCOORD4IPROC)(GLenum   target, GLint   s, GLint   t, GLint   r, GLint   q);\ntypedef void (GLAD_API_PTR *PFNGLMULTITEXCOORD4IVPROC)(GLenum   target, const  GLint  * v);\ntypedef void (GLAD_API_PTR *PFNGLMULTITEXCOORD4SPROC)(GLenum   target, GLshort   s, GLshort   t, GLshort   r, GLshort   q);\ntypedef void (GLAD_API_PTR *PFNGLMULTITEXCOORD4SVPROC)(GLenum   target, const  GLshort  * v);\ntypedef void (GLAD_API_PTR *PFNGLMULTITEXCOORDP1UIPROC)(GLenum   texture, GLenum   type, GLuint   coords);\ntypedef void (GLAD_API_PTR *PFNGLMULTITEXCOORDP1UIVPROC)(GLenum   texture, GLenum   type, const  GLuint  * coords);\ntypedef void (GLAD_API_PTR *PFNGLMULTITEXCOORDP2UIPROC)(GLenum   texture, GLenum   type, GLuint   coords);\ntypedef void (GLAD_API_PTR *PFNGLMULTITEXCOORDP2UIVPROC)(GLenum   texture, GLenum   type, const  GLuint  * coords);\ntypedef void (GLAD_API_PTR *PFNGLMULTITEXCOORDP3UIPROC)(GLenum   texture, GLenum   type, GLuint   coords);\ntypedef void (GLAD_API_PTR *PFNGLMULTITEXCOORDP3UIVPROC)(GLenum   texture, GLenum   type, const  GLuint  * coords);\ntypedef void (GLAD_API_PTR *PFNGLMULTITEXCOORDP4UIPROC)(GLenum   texture, GLenum   type, GLuint   coords);\ntypedef void (GLAD_API_PTR *PFNGLMULTITEXCOORDP4UIVPROC)(GLenum   texture, GLenum   type, const  GLuint  * coords);\ntypedef void (GLAD_API_PTR *PFNGLNEWLISTPROC)(GLuint   list, GLenum   mode);\ntypedef void (GLAD_API_PTR *PFNGLNORMAL3BPROC)(GLbyte   nx, GLbyte   ny, GLbyte   nz);\ntypedef void (GLAD_API_PTR *PFNGLNORMAL3BVPROC)(const  GLbyte  * v);\ntypedef void (GLAD_API_PTR *PFNGLNORMAL3DPROC)(GLdouble   nx, GLdouble   ny, GLdouble   nz);\ntypedef void (GLAD_API_PTR *PFNGLNORMAL3DVPROC)(const  GLdouble  * v);\ntypedef void (GLAD_API_PTR *PFNGLNORMAL3FPROC)(GLfloat   nx, GLfloat   ny, GLfloat   nz);\ntypedef void (GLAD_API_PTR *PFNGLNORMAL3FVPROC)(const  GLfloat  * v);\ntypedef void (GLAD_API_PTR *PFNGLNORMAL3IPROC)(GLint   nx, GLint   ny, GLint   nz);\ntypedef void (GLAD_API_PTR *PFNGLNORMAL3IVPROC)(const  GLint  * v);\ntypedef void (GLAD_API_PTR *PFNGLNORMAL3SPROC)(GLshort   nx, GLshort   ny, GLshort   nz);\ntypedef void (GLAD_API_PTR *PFNGLNORMAL3SVPROC)(const  GLshort  * v);\ntypedef void (GLAD_API_PTR *PFNGLNORMALP3UIPROC)(GLenum   type, GLuint   coords);\ntypedef void (GLAD_API_PTR *PFNGLNORMALP3UIVPROC)(GLenum   type, const  GLuint  * coords);\ntypedef void (GLAD_API_PTR *PFNGLNORMALPOINTERPROC)(GLenum   type, GLsizei   stride, const void * pointer);\ntypedef void (GLAD_API_PTR *PFNGLOBJECTLABELPROC)(GLenum   identifier, GLuint   name, GLsizei   length, const  GLchar  * label);\ntypedef void (GLAD_API_PTR *PFNGLOBJECTPTRLABELPROC)(const void * ptr, GLsizei   length, const  GLchar  * label);\ntypedef void (GLAD_API_PTR *PFNGLORTHOPROC)(GLdouble   left, GLdouble   right, GLdouble   bottom, GLdouble   top, GLdouble   zNear, GLdouble   zFar);\ntypedef void (GLAD_API_PTR *PFNGLPASSTHROUGHPROC)(GLfloat   token);\ntypedef void (GLAD_API_PTR *PFNGLPIXELMAPFVPROC)(GLenum   map, GLsizei   mapsize, const  GLfloat  * values);\ntypedef void (GLAD_API_PTR *PFNGLPIXELMAPUIVPROC)(GLenum   map, GLsizei   mapsize, const  GLuint  * values);\ntypedef void (GLAD_API_PTR *PFNGLPIXELMAPUSVPROC)(GLenum   map, GLsizei   mapsize, const  GLushort  * values);\ntypedef void (GLAD_API_PTR *PFNGLPIXELSTOREFPROC)(GLenum   pname, GLfloat   param);\ntypedef void (GLAD_API_PTR *PFNGLPIXELSTOREIPROC)(GLenum   pname, GLint   param);\ntypedef void (GLAD_API_PTR *PFNGLPIXELTRANSFERFPROC)(GLenum   pname, GLfloat   param);\ntypedef void (GLAD_API_PTR *PFNGLPIXELTRANSFERIPROC)(GLenum   pname, GLint   param);\ntypedef void (GLAD_API_PTR *PFNGLPIXELZOOMPROC)(GLfloat   xfactor, GLfloat   yfactor);\ntypedef void (GLAD_API_PTR *PFNGLPOINTPARAMETERFPROC)(GLenum   pname, GLfloat   param);\ntypedef void (GLAD_API_PTR *PFNGLPOINTPARAMETERFVPROC)(GLenum   pname, const  GLfloat  * params);\ntypedef void (GLAD_API_PTR *PFNGLPOINTPARAMETERIPROC)(GLenum   pname, GLint   param);\ntypedef void (GLAD_API_PTR *PFNGLPOINTPARAMETERIVPROC)(GLenum   pname, const  GLint  * params);\ntypedef void (GLAD_API_PTR *PFNGLPOINTSIZEPROC)(GLfloat   size);\ntypedef void (GLAD_API_PTR *PFNGLPOLYGONMODEPROC)(GLenum   face, GLenum   mode);\ntypedef void (GLAD_API_PTR *PFNGLPOLYGONOFFSETPROC)(GLfloat   factor, GLfloat   units);\ntypedef void (GLAD_API_PTR *PFNGLPOLYGONSTIPPLEPROC)(const  GLubyte  * mask);\ntypedef void (GLAD_API_PTR *PFNGLPOPATTRIBPROC)(void);\ntypedef void (GLAD_API_PTR *PFNGLPOPCLIENTATTRIBPROC)(void);\ntypedef void (GLAD_API_PTR *PFNGLPOPDEBUGGROUPPROC)(void);\ntypedef void (GLAD_API_PTR *PFNGLPOPMATRIXPROC)(void);\ntypedef void (GLAD_API_PTR *PFNGLPOPNAMEPROC)(void);\ntypedef void (GLAD_API_PTR *PFNGLPRIMITIVERESTARTINDEXPROC)(GLuint   index);\ntypedef void (GLAD_API_PTR *PFNGLPRIORITIZETEXTURESPROC)(GLsizei   n, const  GLuint  * textures, const  GLfloat  * priorities);\ntypedef void (GLAD_API_PTR *PFNGLPROVOKINGVERTEXPROC)(GLenum   mode);\ntypedef void (GLAD_API_PTR *PFNGLPUSHATTRIBPROC)(GLbitfield   mask);\ntypedef void (GLAD_API_PTR *PFNGLPUSHCLIENTATTRIBPROC)(GLbitfield   mask);\ntypedef void (GLAD_API_PTR *PFNGLPUSHDEBUGGROUPPROC)(GLenum   source, GLuint   id, GLsizei   length, const  GLchar  * message);\ntypedef void (GLAD_API_PTR *PFNGLPUSHMATRIXPROC)(void);\ntypedef void (GLAD_API_PTR *PFNGLPUSHNAMEPROC)(GLuint   name);\ntypedef void (GLAD_API_PTR *PFNGLQUERYCOUNTERPROC)(GLuint   id, GLenum   target);\ntypedef void (GLAD_API_PTR *PFNGLRASTERPOS2DPROC)(GLdouble   x, GLdouble   y);\ntypedef void (GLAD_API_PTR *PFNGLRASTERPOS2DVPROC)(const  GLdouble  * v);\ntypedef void (GLAD_API_PTR *PFNGLRASTERPOS2FPROC)(GLfloat   x, GLfloat   y);\ntypedef void (GLAD_API_PTR *PFNGLRASTERPOS2FVPROC)(const  GLfloat  * v);\ntypedef void (GLAD_API_PTR *PFNGLRASTERPOS2IPROC)(GLint   x, GLint   y);\ntypedef void (GLAD_API_PTR *PFNGLRASTERPOS2IVPROC)(const  GLint  * v);\ntypedef void (GLAD_API_PTR *PFNGLRASTERPOS2SPROC)(GLshort   x, GLshort   y);\ntypedef void (GLAD_API_PTR *PFNGLRASTERPOS2SVPROC)(const  GLshort  * v);\ntypedef void (GLAD_API_PTR *PFNGLRASTERPOS3DPROC)(GLdouble   x, GLdouble   y, GLdouble   z);\ntypedef void (GLAD_API_PTR *PFNGLRASTERPOS3DVPROC)(const  GLdouble  * v);\ntypedef void (GLAD_API_PTR *PFNGLRASTERPOS3FPROC)(GLfloat   x, GLfloat   y, GLfloat   z);\ntypedef void (GLAD_API_PTR *PFNGLRASTERPOS3FVPROC)(const  GLfloat  * v);\ntypedef void (GLAD_API_PTR *PFNGLRASTERPOS3IPROC)(GLint   x, GLint   y, GLint   z);\ntypedef void (GLAD_API_PTR *PFNGLRASTERPOS3IVPROC)(const  GLint  * v);\ntypedef void (GLAD_API_PTR *PFNGLRASTERPOS3SPROC)(GLshort   x, GLshort   y, GLshort   z);\ntypedef void (GLAD_API_PTR *PFNGLRASTERPOS3SVPROC)(const  GLshort  * v);\ntypedef void (GLAD_API_PTR *PFNGLRASTERPOS4DPROC)(GLdouble   x, GLdouble   y, GLdouble   z, GLdouble   w);\ntypedef void (GLAD_API_PTR *PFNGLRASTERPOS4DVPROC)(const  GLdouble  * v);\ntypedef void (GLAD_API_PTR *PFNGLRASTERPOS4FPROC)(GLfloat   x, GLfloat   y, GLfloat   z, GLfloat   w);\ntypedef void (GLAD_API_PTR *PFNGLRASTERPOS4FVPROC)(const  GLfloat  * v);\ntypedef void (GLAD_API_PTR *PFNGLRASTERPOS4IPROC)(GLint   x, GLint   y, GLint   z, GLint   w);\ntypedef void (GLAD_API_PTR *PFNGLRASTERPOS4IVPROC)(const  GLint  * v);\ntypedef void (GLAD_API_PTR *PFNGLRASTERPOS4SPROC)(GLshort   x, GLshort   y, GLshort   z, GLshort   w);\ntypedef void (GLAD_API_PTR *PFNGLRASTERPOS4SVPROC)(const  GLshort  * v);\ntypedef void (GLAD_API_PTR *PFNGLREADBUFFERPROC)(GLenum   src);\ntypedef void (GLAD_API_PTR *PFNGLREADPIXELSPROC)(GLint   x, GLint   y, GLsizei   width, GLsizei   height, GLenum   format, GLenum   type, void * pixels);\ntypedef void (GLAD_API_PTR *PFNGLREADNPIXELSPROC)(GLint   x, GLint   y, GLsizei   width, GLsizei   height, GLenum   format, GLenum   type, GLsizei   bufSize, void * data);\ntypedef void (GLAD_API_PTR *PFNGLREADNPIXELSARBPROC)(GLint   x, GLint   y, GLsizei   width, GLsizei   height, GLenum   format, GLenum   type, GLsizei   bufSize, void * data);\ntypedef void (GLAD_API_PTR *PFNGLRECTDPROC)(GLdouble   x1, GLdouble   y1, GLdouble   x2, GLdouble   y2);\ntypedef void (GLAD_API_PTR *PFNGLRECTDVPROC)(const  GLdouble  * v1, const  GLdouble  * v2);\ntypedef void (GLAD_API_PTR *PFNGLRECTFPROC)(GLfloat   x1, GLfloat   y1, GLfloat   x2, GLfloat   y2);\ntypedef void (GLAD_API_PTR *PFNGLRECTFVPROC)(const  GLfloat  * v1, const  GLfloat  * v2);\ntypedef void (GLAD_API_PTR *PFNGLRECTIPROC)(GLint   x1, GLint   y1, GLint   x2, GLint   y2);\ntypedef void (GLAD_API_PTR *PFNGLRECTIVPROC)(const  GLint  * v1, const  GLint  * v2);\ntypedef void (GLAD_API_PTR *PFNGLRECTSPROC)(GLshort   x1, GLshort   y1, GLshort   x2, GLshort   y2);\ntypedef void (GLAD_API_PTR *PFNGLRECTSVPROC)(const  GLshort  * v1, const  GLshort  * v2);\ntypedef GLint (GLAD_API_PTR *PFNGLRENDERMODEPROC)(GLenum   mode);\ntypedef void (GLAD_API_PTR *PFNGLRENDERBUFFERSTORAGEPROC)(GLenum   target, GLenum   internalformat, GLsizei   width, GLsizei   height);\ntypedef void (GLAD_API_PTR *PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC)(GLenum   target, GLsizei   samples, GLenum   internalformat, GLsizei   width, GLsizei   height);\ntypedef void (GLAD_API_PTR *PFNGLROTATEDPROC)(GLdouble   angle, GLdouble   x, GLdouble   y, GLdouble   z);\ntypedef void (GLAD_API_PTR *PFNGLROTATEFPROC)(GLfloat   angle, GLfloat   x, GLfloat   y, GLfloat   z);\ntypedef void (GLAD_API_PTR *PFNGLSAMPLECOVERAGEPROC)(GLfloat   value, GLboolean   invert);\ntypedef void (GLAD_API_PTR *PFNGLSAMPLECOVERAGEARBPROC)(GLfloat   value, GLboolean   invert);\ntypedef void (GLAD_API_PTR *PFNGLSAMPLEMASKIPROC)(GLuint   maskNumber, GLbitfield   mask);\ntypedef void (GLAD_API_PTR *PFNGLSAMPLERPARAMETERIIVPROC)(GLuint   sampler, GLenum   pname, const  GLint  * param);\ntypedef void (GLAD_API_PTR *PFNGLSAMPLERPARAMETERIUIVPROC)(GLuint   sampler, GLenum   pname, const  GLuint  * param);\ntypedef void (GLAD_API_PTR *PFNGLSAMPLERPARAMETERFPROC)(GLuint   sampler, GLenum   pname, GLfloat   param);\ntypedef void (GLAD_API_PTR *PFNGLSAMPLERPARAMETERFVPROC)(GLuint   sampler, GLenum   pname, const  GLfloat  * param);\ntypedef void (GLAD_API_PTR *PFNGLSAMPLERPARAMETERIPROC)(GLuint   sampler, GLenum   pname, GLint   param);\ntypedef void (GLAD_API_PTR *PFNGLSAMPLERPARAMETERIVPROC)(GLuint   sampler, GLenum   pname, const  GLint  * param);\ntypedef void (GLAD_API_PTR *PFNGLSCALEDPROC)(GLdouble   x, GLdouble   y, GLdouble   z);\ntypedef void (GLAD_API_PTR *PFNGLSCALEFPROC)(GLfloat   x, GLfloat   y, GLfloat   z);\ntypedef void (GLAD_API_PTR *PFNGLSCISSORPROC)(GLint   x, GLint   y, GLsizei   width, GLsizei   height);\ntypedef void (GLAD_API_PTR *PFNGLSECONDARYCOLOR3BPROC)(GLbyte   red, GLbyte   green, GLbyte   blue);\ntypedef void (GLAD_API_PTR *PFNGLSECONDARYCOLOR3BVPROC)(const  GLbyte  * v);\ntypedef void (GLAD_API_PTR *PFNGLSECONDARYCOLOR3DPROC)(GLdouble   red, GLdouble   green, GLdouble   blue);\ntypedef void (GLAD_API_PTR *PFNGLSECONDARYCOLOR3DVPROC)(const  GLdouble  * v);\ntypedef void (GLAD_API_PTR *PFNGLSECONDARYCOLOR3FPROC)(GLfloat   red, GLfloat   green, GLfloat   blue);\ntypedef void (GLAD_API_PTR *PFNGLSECONDARYCOLOR3FVPROC)(const  GLfloat  * v);\ntypedef void (GLAD_API_PTR *PFNGLSECONDARYCOLOR3IPROC)(GLint   red, GLint   green, GLint   blue);\ntypedef void (GLAD_API_PTR *PFNGLSECONDARYCOLOR3IVPROC)(const  GLint  * v);\ntypedef void (GLAD_API_PTR *PFNGLSECONDARYCOLOR3SPROC)(GLshort   red, GLshort   green, GLshort   blue);\ntypedef void (GLAD_API_PTR *PFNGLSECONDARYCOLOR3SVPROC)(const  GLshort  * v);\ntypedef void (GLAD_API_PTR *PFNGLSECONDARYCOLOR3UBPROC)(GLubyte   red, GLubyte   green, GLubyte   blue);\ntypedef void (GLAD_API_PTR *PFNGLSECONDARYCOLOR3UBVPROC)(const  GLubyte  * v);\ntypedef void (GLAD_API_PTR *PFNGLSECONDARYCOLOR3UIPROC)(GLuint   red, GLuint   green, GLuint   blue);\ntypedef void (GLAD_API_PTR *PFNGLSECONDARYCOLOR3UIVPROC)(const  GLuint  * v);\ntypedef void (GLAD_API_PTR *PFNGLSECONDARYCOLOR3USPROC)(GLushort   red, GLushort   green, GLushort   blue);\ntypedef void (GLAD_API_PTR *PFNGLSECONDARYCOLOR3USVPROC)(const  GLushort  * v);\ntypedef void (GLAD_API_PTR *PFNGLSECONDARYCOLORP3UIPROC)(GLenum   type, GLuint   color);\ntypedef void (GLAD_API_PTR *PFNGLSECONDARYCOLORP3UIVPROC)(GLenum   type, const  GLuint  * color);\ntypedef void (GLAD_API_PTR *PFNGLSECONDARYCOLORPOINTERPROC)(GLint   size, GLenum   type, GLsizei   stride, const void * pointer);\ntypedef void (GLAD_API_PTR *PFNGLSELECTBUFFERPROC)(GLsizei   size, GLuint  * buffer);\ntypedef void (GLAD_API_PTR *PFNGLSHADEMODELPROC)(GLenum   mode);\ntypedef void (GLAD_API_PTR *PFNGLSHADERSOURCEPROC)(GLuint   shader, GLsizei   count, const  GLchar  *const* string, const  GLint  * length);\ntypedef void (GLAD_API_PTR *PFNGLSTENCILFUNCPROC)(GLenum   func, GLint   ref, GLuint   mask);\ntypedef void (GLAD_API_PTR *PFNGLSTENCILFUNCSEPARATEPROC)(GLenum   face, GLenum   func, GLint   ref, GLuint   mask);\ntypedef void (GLAD_API_PTR *PFNGLSTENCILMASKPROC)(GLuint   mask);\ntypedef void (GLAD_API_PTR *PFNGLSTENCILMASKSEPARATEPROC)(GLenum   face, GLuint   mask);\ntypedef void (GLAD_API_PTR *PFNGLSTENCILOPPROC)(GLenum   fail, GLenum   zfail, GLenum   zpass);\ntypedef void (GLAD_API_PTR *PFNGLSTENCILOPSEPARATEPROC)(GLenum   face, GLenum   sfail, GLenum   dpfail, GLenum   dppass);\ntypedef void (GLAD_API_PTR *PFNGLTEXBUFFERPROC)(GLenum   target, GLenum   internalformat, GLuint   buffer);\ntypedef void (GLAD_API_PTR *PFNGLTEXCOORD1DPROC)(GLdouble   s);\ntypedef void (GLAD_API_PTR *PFNGLTEXCOORD1DVPROC)(const  GLdouble  * v);\ntypedef void (GLAD_API_PTR *PFNGLTEXCOORD1FPROC)(GLfloat   s);\ntypedef void (GLAD_API_PTR *PFNGLTEXCOORD1FVPROC)(const  GLfloat  * v);\ntypedef void (GLAD_API_PTR *PFNGLTEXCOORD1IPROC)(GLint   s);\ntypedef void (GLAD_API_PTR *PFNGLTEXCOORD1IVPROC)(const  GLint  * v);\ntypedef void (GLAD_API_PTR *PFNGLTEXCOORD1SPROC)(GLshort   s);\ntypedef void (GLAD_API_PTR *PFNGLTEXCOORD1SVPROC)(const  GLshort  * v);\ntypedef void (GLAD_API_PTR *PFNGLTEXCOORD2DPROC)(GLdouble   s, GLdouble   t);\ntypedef void (GLAD_API_PTR *PFNGLTEXCOORD2DVPROC)(const  GLdouble  * v);\ntypedef void (GLAD_API_PTR *PFNGLTEXCOORD2FPROC)(GLfloat   s, GLfloat   t);\ntypedef void (GLAD_API_PTR *PFNGLTEXCOORD2FVPROC)(const  GLfloat  * v);\ntypedef void (GLAD_API_PTR *PFNGLTEXCOORD2IPROC)(GLint   s, GLint   t);\ntypedef void (GLAD_API_PTR *PFNGLTEXCOORD2IVPROC)(const  GLint  * v);\ntypedef void (GLAD_API_PTR *PFNGLTEXCOORD2SPROC)(GLshort   s, GLshort   t);\ntypedef void (GLAD_API_PTR *PFNGLTEXCOORD2SVPROC)(const  GLshort  * v);\ntypedef void (GLAD_API_PTR *PFNGLTEXCOORD3DPROC)(GLdouble   s, GLdouble   t, GLdouble   r);\ntypedef void (GLAD_API_PTR *PFNGLTEXCOORD3DVPROC)(const  GLdouble  * v);\ntypedef void (GLAD_API_PTR *PFNGLTEXCOORD3FPROC)(GLfloat   s, GLfloat   t, GLfloat   r);\ntypedef void (GLAD_API_PTR *PFNGLTEXCOORD3FVPROC)(const  GLfloat  * v);\ntypedef void (GLAD_API_PTR *PFNGLTEXCOORD3IPROC)(GLint   s, GLint   t, GLint   r);\ntypedef void (GLAD_API_PTR *PFNGLTEXCOORD3IVPROC)(const  GLint  * v);\ntypedef void (GLAD_API_PTR *PFNGLTEXCOORD3SPROC)(GLshort   s, GLshort   t, GLshort   r);\ntypedef void (GLAD_API_PTR *PFNGLTEXCOORD3SVPROC)(const  GLshort  * v);\ntypedef void (GLAD_API_PTR *PFNGLTEXCOORD4DPROC)(GLdouble   s, GLdouble   t, GLdouble   r, GLdouble   q);\ntypedef void (GLAD_API_PTR *PFNGLTEXCOORD4DVPROC)(const  GLdouble  * v);\ntypedef void (GLAD_API_PTR *PFNGLTEXCOORD4FPROC)(GLfloat   s, GLfloat   t, GLfloat   r, GLfloat   q);\ntypedef void (GLAD_API_PTR *PFNGLTEXCOORD4FVPROC)(const  GLfloat  * v);\ntypedef void (GLAD_API_PTR *PFNGLTEXCOORD4IPROC)(GLint   s, GLint   t, GLint   r, GLint   q);\ntypedef void (GLAD_API_PTR *PFNGLTEXCOORD4IVPROC)(const  GLint  * v);\ntypedef void (GLAD_API_PTR *PFNGLTEXCOORD4SPROC)(GLshort   s, GLshort   t, GLshort   r, GLshort   q);\ntypedef void (GLAD_API_PTR *PFNGLTEXCOORD4SVPROC)(const  GLshort  * v);\ntypedef void (GLAD_API_PTR *PFNGLTEXCOORDP1UIPROC)(GLenum   type, GLuint   coords);\ntypedef void (GLAD_API_PTR *PFNGLTEXCOORDP1UIVPROC)(GLenum   type, const  GLuint  * coords);\ntypedef void (GLAD_API_PTR *PFNGLTEXCOORDP2UIPROC)(GLenum   type, GLuint   coords);\ntypedef void (GLAD_API_PTR *PFNGLTEXCOORDP2UIVPROC)(GLenum   type, const  GLuint  * coords);\ntypedef void (GLAD_API_PTR *PFNGLTEXCOORDP3UIPROC)(GLenum   type, GLuint   coords);\ntypedef void (GLAD_API_PTR *PFNGLTEXCOORDP3UIVPROC)(GLenum   type, const  GLuint  * coords);\ntypedef void (GLAD_API_PTR *PFNGLTEXCOORDP4UIPROC)(GLenum   type, GLuint   coords);\ntypedef void (GLAD_API_PTR *PFNGLTEXCOORDP4UIVPROC)(GLenum   type, const  GLuint  * coords);\ntypedef void (GLAD_API_PTR *PFNGLTEXCOORDPOINTERPROC)(GLint   size, GLenum   type, GLsizei   stride, const void * pointer);\ntypedef void (GLAD_API_PTR *PFNGLTEXENVFPROC)(GLenum   target, GLenum   pname, GLfloat   param);\ntypedef void (GLAD_API_PTR *PFNGLTEXENVFVPROC)(GLenum   target, GLenum   pname, const  GLfloat  * params);\ntypedef void (GLAD_API_PTR *PFNGLTEXENVIPROC)(GLenum   target, GLenum   pname, GLint   param);\ntypedef void (GLAD_API_PTR *PFNGLTEXENVIVPROC)(GLenum   target, GLenum   pname, const  GLint  * params);\ntypedef void (GLAD_API_PTR *PFNGLTEXGENDPROC)(GLenum   coord, GLenum   pname, GLdouble   param);\ntypedef void (GLAD_API_PTR *PFNGLTEXGENDVPROC)(GLenum   coord, GLenum   pname, const  GLdouble  * params);\ntypedef void (GLAD_API_PTR *PFNGLTEXGENFPROC)(GLenum   coord, GLenum   pname, GLfloat   param);\ntypedef void (GLAD_API_PTR *PFNGLTEXGENFVPROC)(GLenum   coord, GLenum   pname, const  GLfloat  * params);\ntypedef void (GLAD_API_PTR *PFNGLTEXGENIPROC)(GLenum   coord, GLenum   pname, GLint   param);\ntypedef void (GLAD_API_PTR *PFNGLTEXGENIVPROC)(GLenum   coord, GLenum   pname, const  GLint  * params);\ntypedef void (GLAD_API_PTR *PFNGLTEXIMAGE1DPROC)(GLenum   target, GLint   level, GLint   internalformat, GLsizei   width, GLint   border, GLenum   format, GLenum   type, const void * pixels);\ntypedef void (GLAD_API_PTR *PFNGLTEXIMAGE2DPROC)(GLenum   target, GLint   level, GLint   internalformat, GLsizei   width, GLsizei   height, GLint   border, GLenum   format, GLenum   type, const void * pixels);\ntypedef void (GLAD_API_PTR *PFNGLTEXIMAGE2DMULTISAMPLEPROC)(GLenum   target, GLsizei   samples, GLenum   internalformat, GLsizei   width, GLsizei   height, GLboolean   fixedsamplelocations);\ntypedef void (GLAD_API_PTR *PFNGLTEXIMAGE3DPROC)(GLenum   target, GLint   level, GLint   internalformat, GLsizei   width, GLsizei   height, GLsizei   depth, GLint   border, GLenum   format, GLenum   type, const void * pixels);\ntypedef void (GLAD_API_PTR *PFNGLTEXIMAGE3DMULTISAMPLEPROC)(GLenum   target, GLsizei   samples, GLenum   internalformat, GLsizei   width, GLsizei   height, GLsizei   depth, GLboolean   fixedsamplelocations);\ntypedef void (GLAD_API_PTR *PFNGLTEXPARAMETERIIVPROC)(GLenum   target, GLenum   pname, const  GLint  * params);\ntypedef void (GLAD_API_PTR *PFNGLTEXPARAMETERIUIVPROC)(GLenum   target, GLenum   pname, const  GLuint  * params);\ntypedef void (GLAD_API_PTR *PFNGLTEXPARAMETERFPROC)(GLenum   target, GLenum   pname, GLfloat   param);\ntypedef void (GLAD_API_PTR *PFNGLTEXPARAMETERFVPROC)(GLenum   target, GLenum   pname, const  GLfloat  * params);\ntypedef void (GLAD_API_PTR *PFNGLTEXPARAMETERIPROC)(GLenum   target, GLenum   pname, GLint   param);\ntypedef void (GLAD_API_PTR *PFNGLTEXPARAMETERIVPROC)(GLenum   target, GLenum   pname, const  GLint  * params);\ntypedef void (GLAD_API_PTR *PFNGLTEXSUBIMAGE1DPROC)(GLenum   target, GLint   level, GLint   xoffset, GLsizei   width, GLenum   format, GLenum   type, const void * pixels);\ntypedef void (GLAD_API_PTR *PFNGLTEXSUBIMAGE2DPROC)(GLenum   target, GLint   level, GLint   xoffset, GLint   yoffset, GLsizei   width, GLsizei   height, GLenum   format, GLenum   type, const void * pixels);\ntypedef void (GLAD_API_PTR *PFNGLTEXSUBIMAGE3DPROC)(GLenum   target, GLint   level, GLint   xoffset, GLint   yoffset, GLint   zoffset, GLsizei   width, GLsizei   height, GLsizei   depth, GLenum   format, GLenum   type, const void * pixels);\ntypedef void (GLAD_API_PTR *PFNGLTRANSFORMFEEDBACKVARYINGSPROC)(GLuint   program, GLsizei   count, const  GLchar  *const* varyings, GLenum   bufferMode);\ntypedef void (GLAD_API_PTR *PFNGLTRANSLATEDPROC)(GLdouble   x, GLdouble   y, GLdouble   z);\ntypedef void (GLAD_API_PTR *PFNGLTRANSLATEFPROC)(GLfloat   x, GLfloat   y, GLfloat   z);\ntypedef void (GLAD_API_PTR *PFNGLUNIFORM1FPROC)(GLint   location, GLfloat   v0);\ntypedef void (GLAD_API_PTR *PFNGLUNIFORM1FVPROC)(GLint   location, GLsizei   count, const  GLfloat  * value);\ntypedef void (GLAD_API_PTR *PFNGLUNIFORM1IPROC)(GLint   location, GLint   v0);\ntypedef void (GLAD_API_PTR *PFNGLUNIFORM1IVPROC)(GLint   location, GLsizei   count, const  GLint  * value);\ntypedef void (GLAD_API_PTR *PFNGLUNIFORM1UIPROC)(GLint   location, GLuint   v0);\ntypedef void (GLAD_API_PTR *PFNGLUNIFORM1UIVPROC)(GLint   location, GLsizei   count, const  GLuint  * value);\ntypedef void (GLAD_API_PTR *PFNGLUNIFORM2FPROC)(GLint   location, GLfloat   v0, GLfloat   v1);\ntypedef void (GLAD_API_PTR *PFNGLUNIFORM2FVPROC)(GLint   location, GLsizei   count, const  GLfloat  * value);\ntypedef void (GLAD_API_PTR *PFNGLUNIFORM2IPROC)(GLint   location, GLint   v0, GLint   v1);\ntypedef void (GLAD_API_PTR *PFNGLUNIFORM2IVPROC)(GLint   location, GLsizei   count, const  GLint  * value);\ntypedef void (GLAD_API_PTR *PFNGLUNIFORM2UIPROC)(GLint   location, GLuint   v0, GLuint   v1);\ntypedef void (GLAD_API_PTR *PFNGLUNIFORM2UIVPROC)(GLint   location, GLsizei   count, const  GLuint  * value);\ntypedef void (GLAD_API_PTR *PFNGLUNIFORM3FPROC)(GLint   location, GLfloat   v0, GLfloat   v1, GLfloat   v2);\ntypedef void (GLAD_API_PTR *PFNGLUNIFORM3FVPROC)(GLint   location, GLsizei   count, const  GLfloat  * value);\ntypedef void (GLAD_API_PTR *PFNGLUNIFORM3IPROC)(GLint   location, GLint   v0, GLint   v1, GLint   v2);\ntypedef void (GLAD_API_PTR *PFNGLUNIFORM3IVPROC)(GLint   location, GLsizei   count, const  GLint  * value);\ntypedef void (GLAD_API_PTR *PFNGLUNIFORM3UIPROC)(GLint   location, GLuint   v0, GLuint   v1, GLuint   v2);\ntypedef void (GLAD_API_PTR *PFNGLUNIFORM3UIVPROC)(GLint   location, GLsizei   count, const  GLuint  * value);\ntypedef void (GLAD_API_PTR *PFNGLUNIFORM4FPROC)(GLint   location, GLfloat   v0, GLfloat   v1, GLfloat   v2, GLfloat   v3);\ntypedef void (GLAD_API_PTR *PFNGLUNIFORM4FVPROC)(GLint   location, GLsizei   count, const  GLfloat  * value);\ntypedef void (GLAD_API_PTR *PFNGLUNIFORM4IPROC)(GLint   location, GLint   v0, GLint   v1, GLint   v2, GLint   v3);\ntypedef void (GLAD_API_PTR *PFNGLUNIFORM4IVPROC)(GLint   location, GLsizei   count, const  GLint  * value);\ntypedef void (GLAD_API_PTR *PFNGLUNIFORM4UIPROC)(GLint   location, GLuint   v0, GLuint   v1, GLuint   v2, GLuint   v3);\ntypedef void (GLAD_API_PTR *PFNGLUNIFORM4UIVPROC)(GLint   location, GLsizei   count, const  GLuint  * value);\ntypedef void (GLAD_API_PTR *PFNGLUNIFORMBLOCKBINDINGPROC)(GLuint   program, GLuint   uniformBlockIndex, GLuint   uniformBlockBinding);\ntypedef void (GLAD_API_PTR *PFNGLUNIFORMMATRIX2FVPROC)(GLint   location, GLsizei   count, GLboolean   transpose, const  GLfloat  * value);\ntypedef void (GLAD_API_PTR *PFNGLUNIFORMMATRIX2X3FVPROC)(GLint   location, GLsizei   count, GLboolean   transpose, const  GLfloat  * value);\ntypedef void (GLAD_API_PTR *PFNGLUNIFORMMATRIX2X4FVPROC)(GLint   location, GLsizei   count, GLboolean   transpose, const  GLfloat  * value);\ntypedef void (GLAD_API_PTR *PFNGLUNIFORMMATRIX3FVPROC)(GLint   location, GLsizei   count, GLboolean   transpose, const  GLfloat  * value);\ntypedef void (GLAD_API_PTR *PFNGLUNIFORMMATRIX3X2FVPROC)(GLint   location, GLsizei   count, GLboolean   transpose, const  GLfloat  * value);\ntypedef void (GLAD_API_PTR *PFNGLUNIFORMMATRIX3X4FVPROC)(GLint   location, GLsizei   count, GLboolean   transpose, const  GLfloat  * value);\ntypedef void (GLAD_API_PTR *PFNGLUNIFORMMATRIX4FVPROC)(GLint   location, GLsizei   count, GLboolean   transpose, const  GLfloat  * value);\ntypedef void (GLAD_API_PTR *PFNGLUNIFORMMATRIX4X2FVPROC)(GLint   location, GLsizei   count, GLboolean   transpose, const  GLfloat  * value);\ntypedef void (GLAD_API_PTR *PFNGLUNIFORMMATRIX4X3FVPROC)(GLint   location, GLsizei   count, GLboolean   transpose, const  GLfloat  * value);\ntypedef GLboolean (GLAD_API_PTR *PFNGLUNMAPBUFFERPROC)(GLenum   target);\ntypedef void (GLAD_API_PTR *PFNGLUSEPROGRAMPROC)(GLuint   program);\ntypedef void (GLAD_API_PTR *PFNGLVALIDATEPROGRAMPROC)(GLuint   program);\ntypedef void (GLAD_API_PTR *PFNGLVERTEX2DPROC)(GLdouble   x, GLdouble   y);\ntypedef void (GLAD_API_PTR *PFNGLVERTEX2DVPROC)(const  GLdouble  * v);\ntypedef void (GLAD_API_PTR *PFNGLVERTEX2FPROC)(GLfloat   x, GLfloat   y);\ntypedef void (GLAD_API_PTR *PFNGLVERTEX2FVPROC)(const  GLfloat  * v);\ntypedef void (GLAD_API_PTR *PFNGLVERTEX2IPROC)(GLint   x, GLint   y);\ntypedef void (GLAD_API_PTR *PFNGLVERTEX2IVPROC)(const  GLint  * v);\ntypedef void (GLAD_API_PTR *PFNGLVERTEX2SPROC)(GLshort   x, GLshort   y);\ntypedef void (GLAD_API_PTR *PFNGLVERTEX2SVPROC)(const  GLshort  * v);\ntypedef void (GLAD_API_PTR *PFNGLVERTEX3DPROC)(GLdouble   x, GLdouble   y, GLdouble   z);\ntypedef void (GLAD_API_PTR *PFNGLVERTEX3DVPROC)(const  GLdouble  * v);\ntypedef void (GLAD_API_PTR *PFNGLVERTEX3FPROC)(GLfloat   x, GLfloat   y, GLfloat   z);\ntypedef void (GLAD_API_PTR *PFNGLVERTEX3FVPROC)(const  GLfloat  * v);\ntypedef void (GLAD_API_PTR *PFNGLVERTEX3IPROC)(GLint   x, GLint   y, GLint   z);\ntypedef void (GLAD_API_PTR *PFNGLVERTEX3IVPROC)(const  GLint  * v);\ntypedef void (GLAD_API_PTR *PFNGLVERTEX3SPROC)(GLshort   x, GLshort   y, GLshort   z);\ntypedef void (GLAD_API_PTR *PFNGLVERTEX3SVPROC)(const  GLshort  * v);\ntypedef void (GLAD_API_PTR *PFNGLVERTEX4DPROC)(GLdouble   x, GLdouble   y, GLdouble   z, GLdouble   w);\ntypedef void (GLAD_API_PTR *PFNGLVERTEX4DVPROC)(const  GLdouble  * v);\ntypedef void (GLAD_API_PTR *PFNGLVERTEX4FPROC)(GLfloat   x, GLfloat   y, GLfloat   z, GLfloat   w);\ntypedef void (GLAD_API_PTR *PFNGLVERTEX4FVPROC)(const  GLfloat  * v);\ntypedef void (GLAD_API_PTR *PFNGLVERTEX4IPROC)(GLint   x, GLint   y, GLint   z, GLint   w);\ntypedef void (GLAD_API_PTR *PFNGLVERTEX4IVPROC)(const  GLint  * v);\ntypedef void (GLAD_API_PTR *PFNGLVERTEX4SPROC)(GLshort   x, GLshort   y, GLshort   z, GLshort   w);\ntypedef void (GLAD_API_PTR *PFNGLVERTEX4SVPROC)(const  GLshort  * v);\ntypedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB1DPROC)(GLuint   index, GLdouble   x);\ntypedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB1DVPROC)(GLuint   index, const  GLdouble  * v);\ntypedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB1FPROC)(GLuint   index, GLfloat   x);\ntypedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB1FVPROC)(GLuint   index, const  GLfloat  * v);\ntypedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB1SPROC)(GLuint   index, GLshort   x);\ntypedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB1SVPROC)(GLuint   index, const  GLshort  * v);\ntypedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB2DPROC)(GLuint   index, GLdouble   x, GLdouble   y);\ntypedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB2DVPROC)(GLuint   index, const  GLdouble  * v);\ntypedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB2FPROC)(GLuint   index, GLfloat   x, GLfloat   y);\ntypedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB2FVPROC)(GLuint   index, const  GLfloat  * v);\ntypedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB2SPROC)(GLuint   index, GLshort   x, GLshort   y);\ntypedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB2SVPROC)(GLuint   index, const  GLshort  * v);\ntypedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB3DPROC)(GLuint   index, GLdouble   x, GLdouble   y, GLdouble   z);\ntypedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB3DVPROC)(GLuint   index, const  GLdouble  * v);\ntypedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB3FPROC)(GLuint   index, GLfloat   x, GLfloat   y, GLfloat   z);\ntypedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB3FVPROC)(GLuint   index, const  GLfloat  * v);\ntypedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB3SPROC)(GLuint   index, GLshort   x, GLshort   y, GLshort   z);\ntypedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB3SVPROC)(GLuint   index, const  GLshort  * v);\ntypedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB4NBVPROC)(GLuint   index, const  GLbyte  * v);\ntypedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB4NIVPROC)(GLuint   index, const  GLint  * v);\ntypedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB4NSVPROC)(GLuint   index, const  GLshort  * v);\ntypedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB4NUBPROC)(GLuint   index, GLubyte   x, GLubyte   y, GLubyte   z, GLubyte   w);\ntypedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB4NUBVPROC)(GLuint   index, const  GLubyte  * v);\ntypedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB4NUIVPROC)(GLuint   index, const  GLuint  * v);\ntypedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB4NUSVPROC)(GLuint   index, const  GLushort  * v);\ntypedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB4BVPROC)(GLuint   index, const  GLbyte  * v);\ntypedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB4DPROC)(GLuint   index, GLdouble   x, GLdouble   y, GLdouble   z, GLdouble   w);\ntypedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB4DVPROC)(GLuint   index, const  GLdouble  * v);\ntypedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB4FPROC)(GLuint   index, GLfloat   x, GLfloat   y, GLfloat   z, GLfloat   w);\ntypedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB4FVPROC)(GLuint   index, const  GLfloat  * v);\ntypedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB4IVPROC)(GLuint   index, const  GLint  * v);\ntypedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB4SPROC)(GLuint   index, GLshort   x, GLshort   y, GLshort   z, GLshort   w);\ntypedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB4SVPROC)(GLuint   index, const  GLshort  * v);\ntypedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB4UBVPROC)(GLuint   index, const  GLubyte  * v);\ntypedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB4UIVPROC)(GLuint   index, const  GLuint  * v);\ntypedef void (GLAD_API_PTR *PFNGLVERTEXATTRIB4USVPROC)(GLuint   index, const  GLushort  * v);\ntypedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBDIVISORPROC)(GLuint   index, GLuint   divisor);\ntypedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBI1IPROC)(GLuint   index, GLint   x);\ntypedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBI1IVPROC)(GLuint   index, const  GLint  * v);\ntypedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBI1UIPROC)(GLuint   index, GLuint   x);\ntypedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBI1UIVPROC)(GLuint   index, const  GLuint  * v);\ntypedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBI2IPROC)(GLuint   index, GLint   x, GLint   y);\ntypedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBI2IVPROC)(GLuint   index, const  GLint  * v);\ntypedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBI2UIPROC)(GLuint   index, GLuint   x, GLuint   y);\ntypedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBI2UIVPROC)(GLuint   index, const  GLuint  * v);\ntypedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBI3IPROC)(GLuint   index, GLint   x, GLint   y, GLint   z);\ntypedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBI3IVPROC)(GLuint   index, const  GLint  * v);\ntypedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBI3UIPROC)(GLuint   index, GLuint   x, GLuint   y, GLuint   z);\ntypedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBI3UIVPROC)(GLuint   index, const  GLuint  * v);\ntypedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBI4BVPROC)(GLuint   index, const  GLbyte  * v);\ntypedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBI4IPROC)(GLuint   index, GLint   x, GLint   y, GLint   z, GLint   w);\ntypedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBI4IVPROC)(GLuint   index, const  GLint  * v);\ntypedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBI4SVPROC)(GLuint   index, const  GLshort  * v);\ntypedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBI4UBVPROC)(GLuint   index, const  GLubyte  * v);\ntypedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBI4UIPROC)(GLuint   index, GLuint   x, GLuint   y, GLuint   z, GLuint   w);\ntypedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBI4UIVPROC)(GLuint   index, const  GLuint  * v);\ntypedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBI4USVPROC)(GLuint   index, const  GLushort  * v);\ntypedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBIPOINTERPROC)(GLuint   index, GLint   size, GLenum   type, GLsizei   stride, const void * pointer);\ntypedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBP1UIPROC)(GLuint   index, GLenum   type, GLboolean   normalized, GLuint   value);\ntypedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBP1UIVPROC)(GLuint   index, GLenum   type, GLboolean   normalized, const  GLuint  * value);\ntypedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBP2UIPROC)(GLuint   index, GLenum   type, GLboolean   normalized, GLuint   value);\ntypedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBP2UIVPROC)(GLuint   index, GLenum   type, GLboolean   normalized, const  GLuint  * value);\ntypedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBP3UIPROC)(GLuint   index, GLenum   type, GLboolean   normalized, GLuint   value);\ntypedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBP3UIVPROC)(GLuint   index, GLenum   type, GLboolean   normalized, const  GLuint  * value);\ntypedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBP4UIPROC)(GLuint   index, GLenum   type, GLboolean   normalized, GLuint   value);\ntypedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBP4UIVPROC)(GLuint   index, GLenum   type, GLboolean   normalized, const  GLuint  * value);\ntypedef void (GLAD_API_PTR *PFNGLVERTEXATTRIBPOINTERPROC)(GLuint   index, GLint   size, GLenum   type, GLboolean   normalized, GLsizei   stride, const void * pointer);\ntypedef void (GLAD_API_PTR *PFNGLVERTEXP2UIPROC)(GLenum   type, GLuint   value);\ntypedef void (GLAD_API_PTR *PFNGLVERTEXP2UIVPROC)(GLenum   type, const  GLuint  * value);\ntypedef void (GLAD_API_PTR *PFNGLVERTEXP3UIPROC)(GLenum   type, GLuint   value);\ntypedef void (GLAD_API_PTR *PFNGLVERTEXP3UIVPROC)(GLenum   type, const  GLuint  * value);\ntypedef void (GLAD_API_PTR *PFNGLVERTEXP4UIPROC)(GLenum   type, GLuint   value);\ntypedef void (GLAD_API_PTR *PFNGLVERTEXP4UIVPROC)(GLenum   type, const  GLuint  * value);\ntypedef void (GLAD_API_PTR *PFNGLVERTEXPOINTERPROC)(GLint   size, GLenum   type, GLsizei   stride, const void * pointer);\ntypedef void (GLAD_API_PTR *PFNGLVIEWPORTPROC)(GLint   x, GLint   y, GLsizei   width, GLsizei   height);\ntypedef void (GLAD_API_PTR *PFNGLWAITSYNCPROC)(GLsync   sync, GLbitfield   flags, GLuint64   timeout);\ntypedef void (GLAD_API_PTR *PFNGLWINDOWPOS2DPROC)(GLdouble   x, GLdouble   y);\ntypedef void (GLAD_API_PTR *PFNGLWINDOWPOS2DVPROC)(const  GLdouble  * v);\ntypedef void (GLAD_API_PTR *PFNGLWINDOWPOS2FPROC)(GLfloat   x, GLfloat   y);\ntypedef void (GLAD_API_PTR *PFNGLWINDOWPOS2FVPROC)(const  GLfloat  * v);\ntypedef void (GLAD_API_PTR *PFNGLWINDOWPOS2IPROC)(GLint   x, GLint   y);\ntypedef void (GLAD_API_PTR *PFNGLWINDOWPOS2IVPROC)(const  GLint  * v);\ntypedef void (GLAD_API_PTR *PFNGLWINDOWPOS2SPROC)(GLshort   x, GLshort   y);\ntypedef void (GLAD_API_PTR *PFNGLWINDOWPOS2SVPROC)(const  GLshort  * v);\ntypedef void (GLAD_API_PTR *PFNGLWINDOWPOS3DPROC)(GLdouble   x, GLdouble   y, GLdouble   z);\ntypedef void (GLAD_API_PTR *PFNGLWINDOWPOS3DVPROC)(const  GLdouble  * v);\ntypedef void (GLAD_API_PTR *PFNGLWINDOWPOS3FPROC)(GLfloat   x, GLfloat   y, GLfloat   z);\ntypedef void (GLAD_API_PTR *PFNGLWINDOWPOS3FVPROC)(const  GLfloat  * v);\ntypedef void (GLAD_API_PTR *PFNGLWINDOWPOS3IPROC)(GLint   x, GLint   y, GLint   z);\ntypedef void (GLAD_API_PTR *PFNGLWINDOWPOS3IVPROC)(const  GLint  * v);\ntypedef void (GLAD_API_PTR *PFNGLWINDOWPOS3SPROC)(GLshort   x, GLshort   y, GLshort   z);\ntypedef void (GLAD_API_PTR *PFNGLWINDOWPOS3SVPROC)(const  GLshort  * v);\n\nGLAD_API_CALL PFNGLACCUMPROC glad_glAccum;\n#define glAccum glad_glAccum\nGLAD_API_CALL PFNGLACTIVETEXTUREPROC glad_glActiveTexture;\n#define glActiveTexture glad_glActiveTexture\nGLAD_API_CALL PFNGLALPHAFUNCPROC glad_glAlphaFunc;\n#define glAlphaFunc glad_glAlphaFunc\nGLAD_API_CALL PFNGLARETEXTURESRESIDENTPROC glad_glAreTexturesResident;\n#define glAreTexturesResident glad_glAreTexturesResident\nGLAD_API_CALL PFNGLARRAYELEMENTPROC glad_glArrayElement;\n#define glArrayElement glad_glArrayElement\nGLAD_API_CALL PFNGLATTACHSHADERPROC glad_glAttachShader;\n#define glAttachShader glad_glAttachShader\nGLAD_API_CALL PFNGLBEGINPROC glad_glBegin;\n#define glBegin glad_glBegin\nGLAD_API_CALL PFNGLBEGINCONDITIONALRENDERPROC glad_glBeginConditionalRender;\n#define glBeginConditionalRender glad_glBeginConditionalRender\nGLAD_API_CALL PFNGLBEGINQUERYPROC glad_glBeginQuery;\n#define glBeginQuery glad_glBeginQuery\nGLAD_API_CALL PFNGLBEGINTRANSFORMFEEDBACKPROC glad_glBeginTransformFeedback;\n#define glBeginTransformFeedback glad_glBeginTransformFeedback\nGLAD_API_CALL PFNGLBINDATTRIBLOCATIONPROC glad_glBindAttribLocation;\n#define glBindAttribLocation glad_glBindAttribLocation\nGLAD_API_CALL PFNGLBINDBUFFERPROC glad_glBindBuffer;\n#define glBindBuffer glad_glBindBuffer\nGLAD_API_CALL PFNGLBINDBUFFERBASEPROC glad_glBindBufferBase;\n#define glBindBufferBase glad_glBindBufferBase\nGLAD_API_CALL PFNGLBINDBUFFERRANGEPROC glad_glBindBufferRange;\n#define glBindBufferRange glad_glBindBufferRange\nGLAD_API_CALL PFNGLBINDFRAGDATALOCATIONPROC glad_glBindFragDataLocation;\n#define glBindFragDataLocation glad_glBindFragDataLocation\nGLAD_API_CALL PFNGLBINDFRAGDATALOCATIONINDEXEDPROC glad_glBindFragDataLocationIndexed;\n#define glBindFragDataLocationIndexed glad_glBindFragDataLocationIndexed\nGLAD_API_CALL PFNGLBINDFRAMEBUFFERPROC glad_glBindFramebuffer;\n#define glBindFramebuffer glad_glBindFramebuffer\nGLAD_API_CALL PFNGLBINDRENDERBUFFERPROC glad_glBindRenderbuffer;\n#define glBindRenderbuffer glad_glBindRenderbuffer\nGLAD_API_CALL PFNGLBINDSAMPLERPROC glad_glBindSampler;\n#define glBindSampler glad_glBindSampler\nGLAD_API_CALL PFNGLBINDTEXTUREPROC glad_glBindTexture;\n#define glBindTexture glad_glBindTexture\nGLAD_API_CALL PFNGLBINDVERTEXARRAYPROC glad_glBindVertexArray;\n#define glBindVertexArray glad_glBindVertexArray\nGLAD_API_CALL PFNGLBITMAPPROC glad_glBitmap;\n#define glBitmap glad_glBitmap\nGLAD_API_CALL PFNGLBLENDCOLORPROC glad_glBlendColor;\n#define glBlendColor glad_glBlendColor\nGLAD_API_CALL PFNGLBLENDEQUATIONPROC glad_glBlendEquation;\n#define glBlendEquation glad_glBlendEquation\nGLAD_API_CALL PFNGLBLENDEQUATIONSEPARATEPROC glad_glBlendEquationSeparate;\n#define glBlendEquationSeparate glad_glBlendEquationSeparate\nGLAD_API_CALL PFNGLBLENDFUNCPROC glad_glBlendFunc;\n#define glBlendFunc glad_glBlendFunc\nGLAD_API_CALL PFNGLBLENDFUNCSEPARATEPROC glad_glBlendFuncSeparate;\n#define glBlendFuncSeparate glad_glBlendFuncSeparate\nGLAD_API_CALL PFNGLBLITFRAMEBUFFERPROC glad_glBlitFramebuffer;\n#define glBlitFramebuffer glad_glBlitFramebuffer\nGLAD_API_CALL PFNGLBUFFERDATAPROC glad_glBufferData;\n#define glBufferData glad_glBufferData\nGLAD_API_CALL PFNGLBUFFERSUBDATAPROC glad_glBufferSubData;\n#define glBufferSubData glad_glBufferSubData\nGLAD_API_CALL PFNGLCALLLISTPROC glad_glCallList;\n#define glCallList glad_glCallList\nGLAD_API_CALL PFNGLCALLLISTSPROC glad_glCallLists;\n#define glCallLists glad_glCallLists\nGLAD_API_CALL PFNGLCHECKFRAMEBUFFERSTATUSPROC glad_glCheckFramebufferStatus;\n#define glCheckFramebufferStatus glad_glCheckFramebufferStatus\nGLAD_API_CALL PFNGLCLAMPCOLORPROC glad_glClampColor;\n#define glClampColor glad_glClampColor\nGLAD_API_CALL PFNGLCLEARPROC glad_glClear;\n#define glClear glad_glClear\nGLAD_API_CALL PFNGLCLEARACCUMPROC glad_glClearAccum;\n#define glClearAccum glad_glClearAccum\nGLAD_API_CALL PFNGLCLEARBUFFERFIPROC glad_glClearBufferfi;\n#define glClearBufferfi glad_glClearBufferfi\nGLAD_API_CALL PFNGLCLEARBUFFERFVPROC glad_glClearBufferfv;\n#define glClearBufferfv glad_glClearBufferfv\nGLAD_API_CALL PFNGLCLEARBUFFERIVPROC glad_glClearBufferiv;\n#define glClearBufferiv glad_glClearBufferiv\nGLAD_API_CALL PFNGLCLEARBUFFERUIVPROC glad_glClearBufferuiv;\n#define glClearBufferuiv glad_glClearBufferuiv\nGLAD_API_CALL PFNGLCLEARCOLORPROC glad_glClearColor;\n#define glClearColor glad_glClearColor\nGLAD_API_CALL PFNGLCLEARDEPTHPROC glad_glClearDepth;\n#define glClearDepth glad_glClearDepth\nGLAD_API_CALL PFNGLCLEARINDEXPROC glad_glClearIndex;\n#define glClearIndex glad_glClearIndex\nGLAD_API_CALL PFNGLCLEARSTENCILPROC glad_glClearStencil;\n#define glClearStencil glad_glClearStencil\nGLAD_API_CALL PFNGLCLIENTACTIVETEXTUREPROC glad_glClientActiveTexture;\n#define glClientActiveTexture glad_glClientActiveTexture\nGLAD_API_CALL PFNGLCLIENTWAITSYNCPROC glad_glClientWaitSync;\n#define glClientWaitSync glad_glClientWaitSync\nGLAD_API_CALL PFNGLCLIPPLANEPROC glad_glClipPlane;\n#define glClipPlane glad_glClipPlane\nGLAD_API_CALL PFNGLCOLOR3BPROC glad_glColor3b;\n#define glColor3b glad_glColor3b\nGLAD_API_CALL PFNGLCOLOR3BVPROC glad_glColor3bv;\n#define glColor3bv glad_glColor3bv\nGLAD_API_CALL PFNGLCOLOR3DPROC glad_glColor3d;\n#define glColor3d glad_glColor3d\nGLAD_API_CALL PFNGLCOLOR3DVPROC glad_glColor3dv;\n#define glColor3dv glad_glColor3dv\nGLAD_API_CALL PFNGLCOLOR3FPROC glad_glColor3f;\n#define glColor3f glad_glColor3f\nGLAD_API_CALL PFNGLCOLOR3FVPROC glad_glColor3fv;\n#define glColor3fv glad_glColor3fv\nGLAD_API_CALL PFNGLCOLOR3IPROC glad_glColor3i;\n#define glColor3i glad_glColor3i\nGLAD_API_CALL PFNGLCOLOR3IVPROC glad_glColor3iv;\n#define glColor3iv glad_glColor3iv\nGLAD_API_CALL PFNGLCOLOR3SPROC glad_glColor3s;\n#define glColor3s glad_glColor3s\nGLAD_API_CALL PFNGLCOLOR3SVPROC glad_glColor3sv;\n#define glColor3sv glad_glColor3sv\nGLAD_API_CALL PFNGLCOLOR3UBPROC glad_glColor3ub;\n#define glColor3ub glad_glColor3ub\nGLAD_API_CALL PFNGLCOLOR3UBVPROC glad_glColor3ubv;\n#define glColor3ubv glad_glColor3ubv\nGLAD_API_CALL PFNGLCOLOR3UIPROC glad_glColor3ui;\n#define glColor3ui glad_glColor3ui\nGLAD_API_CALL PFNGLCOLOR3UIVPROC glad_glColor3uiv;\n#define glColor3uiv glad_glColor3uiv\nGLAD_API_CALL PFNGLCOLOR3USPROC glad_glColor3us;\n#define glColor3us glad_glColor3us\nGLAD_API_CALL PFNGLCOLOR3USVPROC glad_glColor3usv;\n#define glColor3usv glad_glColor3usv\nGLAD_API_CALL PFNGLCOLOR4BPROC glad_glColor4b;\n#define glColor4b glad_glColor4b\nGLAD_API_CALL PFNGLCOLOR4BVPROC glad_glColor4bv;\n#define glColor4bv glad_glColor4bv\nGLAD_API_CALL PFNGLCOLOR4DPROC glad_glColor4d;\n#define glColor4d glad_glColor4d\nGLAD_API_CALL PFNGLCOLOR4DVPROC glad_glColor4dv;\n#define glColor4dv glad_glColor4dv\nGLAD_API_CALL PFNGLCOLOR4FPROC glad_glColor4f;\n#define glColor4f glad_glColor4f\nGLAD_API_CALL PFNGLCOLOR4FVPROC glad_glColor4fv;\n#define glColor4fv glad_glColor4fv\nGLAD_API_CALL PFNGLCOLOR4IPROC glad_glColor4i;\n#define glColor4i glad_glColor4i\nGLAD_API_CALL PFNGLCOLOR4IVPROC glad_glColor4iv;\n#define glColor4iv glad_glColor4iv\nGLAD_API_CALL PFNGLCOLOR4SPROC glad_glColor4s;\n#define glColor4s glad_glColor4s\nGLAD_API_CALL PFNGLCOLOR4SVPROC glad_glColor4sv;\n#define glColor4sv glad_glColor4sv\nGLAD_API_CALL PFNGLCOLOR4UBPROC glad_glColor4ub;\n#define glColor4ub glad_glColor4ub\nGLAD_API_CALL PFNGLCOLOR4UBVPROC glad_glColor4ubv;\n#define glColor4ubv glad_glColor4ubv\nGLAD_API_CALL PFNGLCOLOR4UIPROC glad_glColor4ui;\n#define glColor4ui glad_glColor4ui\nGLAD_API_CALL PFNGLCOLOR4UIVPROC glad_glColor4uiv;\n#define glColor4uiv glad_glColor4uiv\nGLAD_API_CALL PFNGLCOLOR4USPROC glad_glColor4us;\n#define glColor4us glad_glColor4us\nGLAD_API_CALL PFNGLCOLOR4USVPROC glad_glColor4usv;\n#define glColor4usv glad_glColor4usv\nGLAD_API_CALL PFNGLCOLORMASKPROC glad_glColorMask;\n#define glColorMask glad_glColorMask\nGLAD_API_CALL PFNGLCOLORMASKIPROC glad_glColorMaski;\n#define glColorMaski glad_glColorMaski\nGLAD_API_CALL PFNGLCOLORMATERIALPROC glad_glColorMaterial;\n#define glColorMaterial glad_glColorMaterial\nGLAD_API_CALL PFNGLCOLORP3UIPROC glad_glColorP3ui;\n#define glColorP3ui glad_glColorP3ui\nGLAD_API_CALL PFNGLCOLORP3UIVPROC glad_glColorP3uiv;\n#define glColorP3uiv glad_glColorP3uiv\nGLAD_API_CALL PFNGLCOLORP4UIPROC glad_glColorP4ui;\n#define glColorP4ui glad_glColorP4ui\nGLAD_API_CALL PFNGLCOLORP4UIVPROC glad_glColorP4uiv;\n#define glColorP4uiv glad_glColorP4uiv\nGLAD_API_CALL PFNGLCOLORPOINTERPROC glad_glColorPointer;\n#define glColorPointer glad_glColorPointer\nGLAD_API_CALL PFNGLCOMPILESHADERPROC glad_glCompileShader;\n#define glCompileShader glad_glCompileShader\nGLAD_API_CALL PFNGLCOMPRESSEDTEXIMAGE1DPROC glad_glCompressedTexImage1D;\n#define glCompressedTexImage1D glad_glCompressedTexImage1D\nGLAD_API_CALL PFNGLCOMPRESSEDTEXIMAGE2DPROC glad_glCompressedTexImage2D;\n#define glCompressedTexImage2D glad_glCompressedTexImage2D\nGLAD_API_CALL PFNGLCOMPRESSEDTEXIMAGE3DPROC glad_glCompressedTexImage3D;\n#define glCompressedTexImage3D glad_glCompressedTexImage3D\nGLAD_API_CALL PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC glad_glCompressedTexSubImage1D;\n#define glCompressedTexSubImage1D glad_glCompressedTexSubImage1D\nGLAD_API_CALL PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC glad_glCompressedTexSubImage2D;\n#define glCompressedTexSubImage2D glad_glCompressedTexSubImage2D\nGLAD_API_CALL PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC glad_glCompressedTexSubImage3D;\n#define glCompressedTexSubImage3D glad_glCompressedTexSubImage3D\nGLAD_API_CALL PFNGLCOPYBUFFERSUBDATAPROC glad_glCopyBufferSubData;\n#define glCopyBufferSubData glad_glCopyBufferSubData\nGLAD_API_CALL PFNGLCOPYPIXELSPROC glad_glCopyPixels;\n#define glCopyPixels glad_glCopyPixels\nGLAD_API_CALL PFNGLCOPYTEXIMAGE1DPROC glad_glCopyTexImage1D;\n#define glCopyTexImage1D glad_glCopyTexImage1D\nGLAD_API_CALL PFNGLCOPYTEXIMAGE2DPROC glad_glCopyTexImage2D;\n#define glCopyTexImage2D glad_glCopyTexImage2D\nGLAD_API_CALL PFNGLCOPYTEXSUBIMAGE1DPROC glad_glCopyTexSubImage1D;\n#define glCopyTexSubImage1D glad_glCopyTexSubImage1D\nGLAD_API_CALL PFNGLCOPYTEXSUBIMAGE2DPROC glad_glCopyTexSubImage2D;\n#define glCopyTexSubImage2D glad_glCopyTexSubImage2D\nGLAD_API_CALL PFNGLCOPYTEXSUBIMAGE3DPROC glad_glCopyTexSubImage3D;\n#define glCopyTexSubImage3D glad_glCopyTexSubImage3D\nGLAD_API_CALL PFNGLCREATEPROGRAMPROC glad_glCreateProgram;\n#define glCreateProgram glad_glCreateProgram\nGLAD_API_CALL PFNGLCREATESHADERPROC glad_glCreateShader;\n#define glCreateShader glad_glCreateShader\nGLAD_API_CALL PFNGLCULLFACEPROC glad_glCullFace;\n#define glCullFace glad_glCullFace\nGLAD_API_CALL PFNGLDEBUGMESSAGECALLBACKPROC glad_glDebugMessageCallback;\n#define glDebugMessageCallback glad_glDebugMessageCallback\nGLAD_API_CALL PFNGLDEBUGMESSAGECONTROLPROC glad_glDebugMessageControl;\n#define glDebugMessageControl glad_glDebugMessageControl\nGLAD_API_CALL PFNGLDEBUGMESSAGEINSERTPROC glad_glDebugMessageInsert;\n#define glDebugMessageInsert glad_glDebugMessageInsert\nGLAD_API_CALL PFNGLDELETEBUFFERSPROC glad_glDeleteBuffers;\n#define glDeleteBuffers glad_glDeleteBuffers\nGLAD_API_CALL PFNGLDELETEFRAMEBUFFERSPROC glad_glDeleteFramebuffers;\n#define glDeleteFramebuffers glad_glDeleteFramebuffers\nGLAD_API_CALL PFNGLDELETELISTSPROC glad_glDeleteLists;\n#define glDeleteLists glad_glDeleteLists\nGLAD_API_CALL PFNGLDELETEPROGRAMPROC glad_glDeleteProgram;\n#define glDeleteProgram glad_glDeleteProgram\nGLAD_API_CALL PFNGLDELETEQUERIESPROC glad_glDeleteQueries;\n#define glDeleteQueries glad_glDeleteQueries\nGLAD_API_CALL PFNGLDELETERENDERBUFFERSPROC glad_glDeleteRenderbuffers;\n#define glDeleteRenderbuffers glad_glDeleteRenderbuffers\nGLAD_API_CALL PFNGLDELETESAMPLERSPROC glad_glDeleteSamplers;\n#define glDeleteSamplers glad_glDeleteSamplers\nGLAD_API_CALL PFNGLDELETESHADERPROC glad_glDeleteShader;\n#define glDeleteShader glad_glDeleteShader\nGLAD_API_CALL PFNGLDELETESYNCPROC glad_glDeleteSync;\n#define glDeleteSync glad_glDeleteSync\nGLAD_API_CALL PFNGLDELETETEXTURESPROC glad_glDeleteTextures;\n#define glDeleteTextures glad_glDeleteTextures\nGLAD_API_CALL PFNGLDELETEVERTEXARRAYSPROC glad_glDeleteVertexArrays;\n#define glDeleteVertexArrays glad_glDeleteVertexArrays\nGLAD_API_CALL PFNGLDEPTHFUNCPROC glad_glDepthFunc;\n#define glDepthFunc glad_glDepthFunc\nGLAD_API_CALL PFNGLDEPTHMASKPROC glad_glDepthMask;\n#define glDepthMask glad_glDepthMask\nGLAD_API_CALL PFNGLDEPTHRANGEPROC glad_glDepthRange;\n#define glDepthRange glad_glDepthRange\nGLAD_API_CALL PFNGLDETACHSHADERPROC glad_glDetachShader;\n#define glDetachShader glad_glDetachShader\nGLAD_API_CALL PFNGLDISABLEPROC glad_glDisable;\n#define glDisable glad_glDisable\nGLAD_API_CALL PFNGLDISABLECLIENTSTATEPROC glad_glDisableClientState;\n#define glDisableClientState glad_glDisableClientState\nGLAD_API_CALL PFNGLDISABLEVERTEXATTRIBARRAYPROC glad_glDisableVertexAttribArray;\n#define glDisableVertexAttribArray glad_glDisableVertexAttribArray\nGLAD_API_CALL PFNGLDISABLEIPROC glad_glDisablei;\n#define glDisablei glad_glDisablei\nGLAD_API_CALL PFNGLDRAWARRAYSPROC glad_glDrawArrays;\n#define glDrawArrays glad_glDrawArrays\nGLAD_API_CALL PFNGLDRAWARRAYSINSTANCEDPROC glad_glDrawArraysInstanced;\n#define glDrawArraysInstanced glad_glDrawArraysInstanced\nGLAD_API_CALL PFNGLDRAWBUFFERPROC glad_glDrawBuffer;\n#define glDrawBuffer glad_glDrawBuffer\nGLAD_API_CALL PFNGLDRAWBUFFERSPROC glad_glDrawBuffers;\n#define glDrawBuffers glad_glDrawBuffers\nGLAD_API_CALL PFNGLDRAWELEMENTSPROC glad_glDrawElements;\n#define glDrawElements glad_glDrawElements\nGLAD_API_CALL PFNGLDRAWELEMENTSBASEVERTEXPROC glad_glDrawElementsBaseVertex;\n#define glDrawElementsBaseVertex glad_glDrawElementsBaseVertex\nGLAD_API_CALL PFNGLDRAWELEMENTSINSTANCEDPROC glad_glDrawElementsInstanced;\n#define glDrawElementsInstanced glad_glDrawElementsInstanced\nGLAD_API_CALL PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXPROC glad_glDrawElementsInstancedBaseVertex;\n#define glDrawElementsInstancedBaseVertex glad_glDrawElementsInstancedBaseVertex\nGLAD_API_CALL PFNGLDRAWPIXELSPROC glad_glDrawPixels;\n#define glDrawPixels glad_glDrawPixels\nGLAD_API_CALL PFNGLDRAWRANGEELEMENTSPROC glad_glDrawRangeElements;\n#define glDrawRangeElements glad_glDrawRangeElements\nGLAD_API_CALL PFNGLDRAWRANGEELEMENTSBASEVERTEXPROC glad_glDrawRangeElementsBaseVertex;\n#define glDrawRangeElementsBaseVertex glad_glDrawRangeElementsBaseVertex\nGLAD_API_CALL PFNGLEDGEFLAGPROC glad_glEdgeFlag;\n#define glEdgeFlag glad_glEdgeFlag\nGLAD_API_CALL PFNGLEDGEFLAGPOINTERPROC glad_glEdgeFlagPointer;\n#define glEdgeFlagPointer glad_glEdgeFlagPointer\nGLAD_API_CALL PFNGLEDGEFLAGVPROC glad_glEdgeFlagv;\n#define glEdgeFlagv glad_glEdgeFlagv\nGLAD_API_CALL PFNGLENABLEPROC glad_glEnable;\n#define glEnable glad_glEnable\nGLAD_API_CALL PFNGLENABLECLIENTSTATEPROC glad_glEnableClientState;\n#define glEnableClientState glad_glEnableClientState\nGLAD_API_CALL PFNGLENABLEVERTEXATTRIBARRAYPROC glad_glEnableVertexAttribArray;\n#define glEnableVertexAttribArray glad_glEnableVertexAttribArray\nGLAD_API_CALL PFNGLENABLEIPROC glad_glEnablei;\n#define glEnablei glad_glEnablei\nGLAD_API_CALL PFNGLENDPROC glad_glEnd;\n#define glEnd glad_glEnd\nGLAD_API_CALL PFNGLENDCONDITIONALRENDERPROC glad_glEndConditionalRender;\n#define glEndConditionalRender glad_glEndConditionalRender\nGLAD_API_CALL PFNGLENDLISTPROC glad_glEndList;\n#define glEndList glad_glEndList\nGLAD_API_CALL PFNGLENDQUERYPROC glad_glEndQuery;\n#define glEndQuery glad_glEndQuery\nGLAD_API_CALL PFNGLENDTRANSFORMFEEDBACKPROC glad_glEndTransformFeedback;\n#define glEndTransformFeedback glad_glEndTransformFeedback\nGLAD_API_CALL PFNGLEVALCOORD1DPROC glad_glEvalCoord1d;\n#define glEvalCoord1d glad_glEvalCoord1d\nGLAD_API_CALL PFNGLEVALCOORD1DVPROC glad_glEvalCoord1dv;\n#define glEvalCoord1dv glad_glEvalCoord1dv\nGLAD_API_CALL PFNGLEVALCOORD1FPROC glad_glEvalCoord1f;\n#define glEvalCoord1f glad_glEvalCoord1f\nGLAD_API_CALL PFNGLEVALCOORD1FVPROC glad_glEvalCoord1fv;\n#define glEvalCoord1fv glad_glEvalCoord1fv\nGLAD_API_CALL PFNGLEVALCOORD2DPROC glad_glEvalCoord2d;\n#define glEvalCoord2d glad_glEvalCoord2d\nGLAD_API_CALL PFNGLEVALCOORD2DVPROC glad_glEvalCoord2dv;\n#define glEvalCoord2dv glad_glEvalCoord2dv\nGLAD_API_CALL PFNGLEVALCOORD2FPROC glad_glEvalCoord2f;\n#define glEvalCoord2f glad_glEvalCoord2f\nGLAD_API_CALL PFNGLEVALCOORD2FVPROC glad_glEvalCoord2fv;\n#define glEvalCoord2fv glad_glEvalCoord2fv\nGLAD_API_CALL PFNGLEVALMESH1PROC glad_glEvalMesh1;\n#define glEvalMesh1 glad_glEvalMesh1\nGLAD_API_CALL PFNGLEVALMESH2PROC glad_glEvalMesh2;\n#define glEvalMesh2 glad_glEvalMesh2\nGLAD_API_CALL PFNGLEVALPOINT1PROC glad_glEvalPoint1;\n#define glEvalPoint1 glad_glEvalPoint1\nGLAD_API_CALL PFNGLEVALPOINT2PROC glad_glEvalPoint2;\n#define glEvalPoint2 glad_glEvalPoint2\nGLAD_API_CALL PFNGLFEEDBACKBUFFERPROC glad_glFeedbackBuffer;\n#define glFeedbackBuffer glad_glFeedbackBuffer\nGLAD_API_CALL PFNGLFENCESYNCPROC glad_glFenceSync;\n#define glFenceSync glad_glFenceSync\nGLAD_API_CALL PFNGLFINISHPROC glad_glFinish;\n#define glFinish glad_glFinish\nGLAD_API_CALL PFNGLFLUSHPROC glad_glFlush;\n#define glFlush glad_glFlush\nGLAD_API_CALL PFNGLFLUSHMAPPEDBUFFERRANGEPROC glad_glFlushMappedBufferRange;\n#define glFlushMappedBufferRange glad_glFlushMappedBufferRange\nGLAD_API_CALL PFNGLFOGCOORDPOINTERPROC glad_glFogCoordPointer;\n#define glFogCoordPointer glad_glFogCoordPointer\nGLAD_API_CALL PFNGLFOGCOORDDPROC glad_glFogCoordd;\n#define glFogCoordd glad_glFogCoordd\nGLAD_API_CALL PFNGLFOGCOORDDVPROC glad_glFogCoorddv;\n#define glFogCoorddv glad_glFogCoorddv\nGLAD_API_CALL PFNGLFOGCOORDFPROC glad_glFogCoordf;\n#define glFogCoordf glad_glFogCoordf\nGLAD_API_CALL PFNGLFOGCOORDFVPROC glad_glFogCoordfv;\n#define glFogCoordfv glad_glFogCoordfv\nGLAD_API_CALL PFNGLFOGFPROC glad_glFogf;\n#define glFogf glad_glFogf\nGLAD_API_CALL PFNGLFOGFVPROC glad_glFogfv;\n#define glFogfv glad_glFogfv\nGLAD_API_CALL PFNGLFOGIPROC glad_glFogi;\n#define glFogi glad_glFogi\nGLAD_API_CALL PFNGLFOGIVPROC glad_glFogiv;\n#define glFogiv glad_glFogiv\nGLAD_API_CALL PFNGLFRAMEBUFFERRENDERBUFFERPROC glad_glFramebufferRenderbuffer;\n#define glFramebufferRenderbuffer glad_glFramebufferRenderbuffer\nGLAD_API_CALL PFNGLFRAMEBUFFERTEXTUREPROC glad_glFramebufferTexture;\n#define glFramebufferTexture glad_glFramebufferTexture\nGLAD_API_CALL PFNGLFRAMEBUFFERTEXTURE1DPROC glad_glFramebufferTexture1D;\n#define glFramebufferTexture1D glad_glFramebufferTexture1D\nGLAD_API_CALL PFNGLFRAMEBUFFERTEXTURE2DPROC glad_glFramebufferTexture2D;\n#define glFramebufferTexture2D glad_glFramebufferTexture2D\nGLAD_API_CALL PFNGLFRAMEBUFFERTEXTURE3DPROC glad_glFramebufferTexture3D;\n#define glFramebufferTexture3D glad_glFramebufferTexture3D\nGLAD_API_CALL PFNGLFRAMEBUFFERTEXTURELAYERPROC glad_glFramebufferTextureLayer;\n#define glFramebufferTextureLayer glad_glFramebufferTextureLayer\nGLAD_API_CALL PFNGLFRONTFACEPROC glad_glFrontFace;\n#define glFrontFace glad_glFrontFace\nGLAD_API_CALL PFNGLFRUSTUMPROC glad_glFrustum;\n#define glFrustum glad_glFrustum\nGLAD_API_CALL PFNGLGENBUFFERSPROC glad_glGenBuffers;\n#define glGenBuffers glad_glGenBuffers\nGLAD_API_CALL PFNGLGENFRAMEBUFFERSPROC glad_glGenFramebuffers;\n#define glGenFramebuffers glad_glGenFramebuffers\nGLAD_API_CALL PFNGLGENLISTSPROC glad_glGenLists;\n#define glGenLists glad_glGenLists\nGLAD_API_CALL PFNGLGENQUERIESPROC glad_glGenQueries;\n#define glGenQueries glad_glGenQueries\nGLAD_API_CALL PFNGLGENRENDERBUFFERSPROC glad_glGenRenderbuffers;\n#define glGenRenderbuffers glad_glGenRenderbuffers\nGLAD_API_CALL PFNGLGENSAMPLERSPROC glad_glGenSamplers;\n#define glGenSamplers glad_glGenSamplers\nGLAD_API_CALL PFNGLGENTEXTURESPROC glad_glGenTextures;\n#define glGenTextures glad_glGenTextures\nGLAD_API_CALL PFNGLGENVERTEXARRAYSPROC glad_glGenVertexArrays;\n#define glGenVertexArrays glad_glGenVertexArrays\nGLAD_API_CALL PFNGLGENERATEMIPMAPPROC glad_glGenerateMipmap;\n#define glGenerateMipmap glad_glGenerateMipmap\nGLAD_API_CALL PFNGLGETACTIVEATTRIBPROC glad_glGetActiveAttrib;\n#define glGetActiveAttrib glad_glGetActiveAttrib\nGLAD_API_CALL PFNGLGETACTIVEUNIFORMPROC glad_glGetActiveUniform;\n#define glGetActiveUniform glad_glGetActiveUniform\nGLAD_API_CALL PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC glad_glGetActiveUniformBlockName;\n#define glGetActiveUniformBlockName glad_glGetActiveUniformBlockName\nGLAD_API_CALL PFNGLGETACTIVEUNIFORMBLOCKIVPROC glad_glGetActiveUniformBlockiv;\n#define glGetActiveUniformBlockiv glad_glGetActiveUniformBlockiv\nGLAD_API_CALL PFNGLGETACTIVEUNIFORMNAMEPROC glad_glGetActiveUniformName;\n#define glGetActiveUniformName glad_glGetActiveUniformName\nGLAD_API_CALL PFNGLGETACTIVEUNIFORMSIVPROC glad_glGetActiveUniformsiv;\n#define glGetActiveUniformsiv glad_glGetActiveUniformsiv\nGLAD_API_CALL PFNGLGETATTACHEDSHADERSPROC glad_glGetAttachedShaders;\n#define glGetAttachedShaders glad_glGetAttachedShaders\nGLAD_API_CALL PFNGLGETATTRIBLOCATIONPROC glad_glGetAttribLocation;\n#define glGetAttribLocation glad_glGetAttribLocation\nGLAD_API_CALL PFNGLGETBOOLEANI_VPROC glad_glGetBooleani_v;\n#define glGetBooleani_v glad_glGetBooleani_v\nGLAD_API_CALL PFNGLGETBOOLEANVPROC glad_glGetBooleanv;\n#define glGetBooleanv glad_glGetBooleanv\nGLAD_API_CALL PFNGLGETBUFFERPARAMETERI64VPROC glad_glGetBufferParameteri64v;\n#define glGetBufferParameteri64v glad_glGetBufferParameteri64v\nGLAD_API_CALL PFNGLGETBUFFERPARAMETERIVPROC glad_glGetBufferParameteriv;\n#define glGetBufferParameteriv glad_glGetBufferParameteriv\nGLAD_API_CALL PFNGLGETBUFFERPOINTERVPROC glad_glGetBufferPointerv;\n#define glGetBufferPointerv glad_glGetBufferPointerv\nGLAD_API_CALL PFNGLGETBUFFERSUBDATAPROC glad_glGetBufferSubData;\n#define glGetBufferSubData glad_glGetBufferSubData\nGLAD_API_CALL PFNGLGETCLIPPLANEPROC glad_glGetClipPlane;\n#define glGetClipPlane glad_glGetClipPlane\nGLAD_API_CALL PFNGLGETCOMPRESSEDTEXIMAGEPROC glad_glGetCompressedTexImage;\n#define glGetCompressedTexImage glad_glGetCompressedTexImage\nGLAD_API_CALL PFNGLGETDEBUGMESSAGELOGPROC glad_glGetDebugMessageLog;\n#define glGetDebugMessageLog glad_glGetDebugMessageLog\nGLAD_API_CALL PFNGLGETDOUBLEVPROC glad_glGetDoublev;\n#define glGetDoublev glad_glGetDoublev\nGLAD_API_CALL PFNGLGETERRORPROC glad_glGetError;\n#define glGetError glad_glGetError\nGLAD_API_CALL PFNGLGETFLOATVPROC glad_glGetFloatv;\n#define glGetFloatv glad_glGetFloatv\nGLAD_API_CALL PFNGLGETFRAGDATAINDEXPROC glad_glGetFragDataIndex;\n#define glGetFragDataIndex glad_glGetFragDataIndex\nGLAD_API_CALL PFNGLGETFRAGDATALOCATIONPROC glad_glGetFragDataLocation;\n#define glGetFragDataLocation glad_glGetFragDataLocation\nGLAD_API_CALL PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC glad_glGetFramebufferAttachmentParameteriv;\n#define glGetFramebufferAttachmentParameteriv glad_glGetFramebufferAttachmentParameteriv\nGLAD_API_CALL PFNGLGETGRAPHICSRESETSTATUSARBPROC glad_glGetGraphicsResetStatusARB;\n#define glGetGraphicsResetStatusARB glad_glGetGraphicsResetStatusARB\nGLAD_API_CALL PFNGLGETINTEGER64I_VPROC glad_glGetInteger64i_v;\n#define glGetInteger64i_v glad_glGetInteger64i_v\nGLAD_API_CALL PFNGLGETINTEGER64VPROC glad_glGetInteger64v;\n#define glGetInteger64v glad_glGetInteger64v\nGLAD_API_CALL PFNGLGETINTEGERI_VPROC glad_glGetIntegeri_v;\n#define glGetIntegeri_v glad_glGetIntegeri_v\nGLAD_API_CALL PFNGLGETINTEGERVPROC glad_glGetIntegerv;\n#define glGetIntegerv glad_glGetIntegerv\nGLAD_API_CALL PFNGLGETLIGHTFVPROC glad_glGetLightfv;\n#define glGetLightfv glad_glGetLightfv\nGLAD_API_CALL PFNGLGETLIGHTIVPROC glad_glGetLightiv;\n#define glGetLightiv glad_glGetLightiv\nGLAD_API_CALL PFNGLGETMAPDVPROC glad_glGetMapdv;\n#define glGetMapdv glad_glGetMapdv\nGLAD_API_CALL PFNGLGETMAPFVPROC glad_glGetMapfv;\n#define glGetMapfv glad_glGetMapfv\nGLAD_API_CALL PFNGLGETMAPIVPROC glad_glGetMapiv;\n#define glGetMapiv glad_glGetMapiv\nGLAD_API_CALL PFNGLGETMATERIALFVPROC glad_glGetMaterialfv;\n#define glGetMaterialfv glad_glGetMaterialfv\nGLAD_API_CALL PFNGLGETMATERIALIVPROC glad_glGetMaterialiv;\n#define glGetMaterialiv glad_glGetMaterialiv\nGLAD_API_CALL PFNGLGETMULTISAMPLEFVPROC glad_glGetMultisamplefv;\n#define glGetMultisamplefv glad_glGetMultisamplefv\nGLAD_API_CALL PFNGLGETOBJECTLABELPROC glad_glGetObjectLabel;\n#define glGetObjectLabel glad_glGetObjectLabel\nGLAD_API_CALL PFNGLGETOBJECTPTRLABELPROC glad_glGetObjectPtrLabel;\n#define glGetObjectPtrLabel glad_glGetObjectPtrLabel\nGLAD_API_CALL PFNGLGETPIXELMAPFVPROC glad_glGetPixelMapfv;\n#define glGetPixelMapfv glad_glGetPixelMapfv\nGLAD_API_CALL PFNGLGETPIXELMAPUIVPROC glad_glGetPixelMapuiv;\n#define glGetPixelMapuiv glad_glGetPixelMapuiv\nGLAD_API_CALL PFNGLGETPIXELMAPUSVPROC glad_glGetPixelMapusv;\n#define glGetPixelMapusv glad_glGetPixelMapusv\nGLAD_API_CALL PFNGLGETPOINTERVPROC glad_glGetPointerv;\n#define glGetPointerv glad_glGetPointerv\nGLAD_API_CALL PFNGLGETPOLYGONSTIPPLEPROC glad_glGetPolygonStipple;\n#define glGetPolygonStipple glad_glGetPolygonStipple\nGLAD_API_CALL PFNGLGETPROGRAMINFOLOGPROC glad_glGetProgramInfoLog;\n#define glGetProgramInfoLog glad_glGetProgramInfoLog\nGLAD_API_CALL PFNGLGETPROGRAMIVPROC glad_glGetProgramiv;\n#define glGetProgramiv glad_glGetProgramiv\nGLAD_API_CALL PFNGLGETQUERYOBJECTI64VPROC glad_glGetQueryObjecti64v;\n#define glGetQueryObjecti64v glad_glGetQueryObjecti64v\nGLAD_API_CALL PFNGLGETQUERYOBJECTIVPROC glad_glGetQueryObjectiv;\n#define glGetQueryObjectiv glad_glGetQueryObjectiv\nGLAD_API_CALL PFNGLGETQUERYOBJECTUI64VPROC glad_glGetQueryObjectui64v;\n#define glGetQueryObjectui64v glad_glGetQueryObjectui64v\nGLAD_API_CALL PFNGLGETQUERYOBJECTUIVPROC glad_glGetQueryObjectuiv;\n#define glGetQueryObjectuiv glad_glGetQueryObjectuiv\nGLAD_API_CALL PFNGLGETQUERYIVPROC glad_glGetQueryiv;\n#define glGetQueryiv glad_glGetQueryiv\nGLAD_API_CALL PFNGLGETRENDERBUFFERPARAMETERIVPROC glad_glGetRenderbufferParameteriv;\n#define glGetRenderbufferParameteriv glad_glGetRenderbufferParameteriv\nGLAD_API_CALL PFNGLGETSAMPLERPARAMETERIIVPROC glad_glGetSamplerParameterIiv;\n#define glGetSamplerParameterIiv glad_glGetSamplerParameterIiv\nGLAD_API_CALL PFNGLGETSAMPLERPARAMETERIUIVPROC glad_glGetSamplerParameterIuiv;\n#define glGetSamplerParameterIuiv glad_glGetSamplerParameterIuiv\nGLAD_API_CALL PFNGLGETSAMPLERPARAMETERFVPROC glad_glGetSamplerParameterfv;\n#define glGetSamplerParameterfv glad_glGetSamplerParameterfv\nGLAD_API_CALL PFNGLGETSAMPLERPARAMETERIVPROC glad_glGetSamplerParameteriv;\n#define glGetSamplerParameteriv glad_glGetSamplerParameteriv\nGLAD_API_CALL PFNGLGETSHADERINFOLOGPROC glad_glGetShaderInfoLog;\n#define glGetShaderInfoLog glad_glGetShaderInfoLog\nGLAD_API_CALL PFNGLGETSHADERSOURCEPROC glad_glGetShaderSource;\n#define glGetShaderSource glad_glGetShaderSource\nGLAD_API_CALL PFNGLGETSHADERIVPROC glad_glGetShaderiv;\n#define glGetShaderiv glad_glGetShaderiv\nGLAD_API_CALL PFNGLGETSTRINGPROC glad_glGetString;\n#define glGetString glad_glGetString\nGLAD_API_CALL PFNGLGETSTRINGIPROC glad_glGetStringi;\n#define glGetStringi glad_glGetStringi\nGLAD_API_CALL PFNGLGETSYNCIVPROC glad_glGetSynciv;\n#define glGetSynciv glad_glGetSynciv\nGLAD_API_CALL PFNGLGETTEXENVFVPROC glad_glGetTexEnvfv;\n#define glGetTexEnvfv glad_glGetTexEnvfv\nGLAD_API_CALL PFNGLGETTEXENVIVPROC glad_glGetTexEnviv;\n#define glGetTexEnviv glad_glGetTexEnviv\nGLAD_API_CALL PFNGLGETTEXGENDVPROC glad_glGetTexGendv;\n#define glGetTexGendv glad_glGetTexGendv\nGLAD_API_CALL PFNGLGETTEXGENFVPROC glad_glGetTexGenfv;\n#define glGetTexGenfv glad_glGetTexGenfv\nGLAD_API_CALL PFNGLGETTEXGENIVPROC glad_glGetTexGeniv;\n#define glGetTexGeniv glad_glGetTexGeniv\nGLAD_API_CALL PFNGLGETTEXIMAGEPROC glad_glGetTexImage;\n#define glGetTexImage glad_glGetTexImage\nGLAD_API_CALL PFNGLGETTEXLEVELPARAMETERFVPROC glad_glGetTexLevelParameterfv;\n#define glGetTexLevelParameterfv glad_glGetTexLevelParameterfv\nGLAD_API_CALL PFNGLGETTEXLEVELPARAMETERIVPROC glad_glGetTexLevelParameteriv;\n#define glGetTexLevelParameteriv glad_glGetTexLevelParameteriv\nGLAD_API_CALL PFNGLGETTEXPARAMETERIIVPROC glad_glGetTexParameterIiv;\n#define glGetTexParameterIiv glad_glGetTexParameterIiv\nGLAD_API_CALL PFNGLGETTEXPARAMETERIUIVPROC glad_glGetTexParameterIuiv;\n#define glGetTexParameterIuiv glad_glGetTexParameterIuiv\nGLAD_API_CALL PFNGLGETTEXPARAMETERFVPROC glad_glGetTexParameterfv;\n#define glGetTexParameterfv glad_glGetTexParameterfv\nGLAD_API_CALL PFNGLGETTEXPARAMETERIVPROC glad_glGetTexParameteriv;\n#define glGetTexParameteriv glad_glGetTexParameteriv\nGLAD_API_CALL PFNGLGETTRANSFORMFEEDBACKVARYINGPROC glad_glGetTransformFeedbackVarying;\n#define glGetTransformFeedbackVarying glad_glGetTransformFeedbackVarying\nGLAD_API_CALL PFNGLGETUNIFORMBLOCKINDEXPROC glad_glGetUniformBlockIndex;\n#define glGetUniformBlockIndex glad_glGetUniformBlockIndex\nGLAD_API_CALL PFNGLGETUNIFORMINDICESPROC glad_glGetUniformIndices;\n#define glGetUniformIndices glad_glGetUniformIndices\nGLAD_API_CALL PFNGLGETUNIFORMLOCATIONPROC glad_glGetUniformLocation;\n#define glGetUniformLocation glad_glGetUniformLocation\nGLAD_API_CALL PFNGLGETUNIFORMFVPROC glad_glGetUniformfv;\n#define glGetUniformfv glad_glGetUniformfv\nGLAD_API_CALL PFNGLGETUNIFORMIVPROC glad_glGetUniformiv;\n#define glGetUniformiv glad_glGetUniformiv\nGLAD_API_CALL PFNGLGETUNIFORMUIVPROC glad_glGetUniformuiv;\n#define glGetUniformuiv glad_glGetUniformuiv\nGLAD_API_CALL PFNGLGETVERTEXATTRIBIIVPROC glad_glGetVertexAttribIiv;\n#define glGetVertexAttribIiv glad_glGetVertexAttribIiv\nGLAD_API_CALL PFNGLGETVERTEXATTRIBIUIVPROC glad_glGetVertexAttribIuiv;\n#define glGetVertexAttribIuiv glad_glGetVertexAttribIuiv\nGLAD_API_CALL PFNGLGETVERTEXATTRIBPOINTERVPROC glad_glGetVertexAttribPointerv;\n#define glGetVertexAttribPointerv glad_glGetVertexAttribPointerv\nGLAD_API_CALL PFNGLGETVERTEXATTRIBDVPROC glad_glGetVertexAttribdv;\n#define glGetVertexAttribdv glad_glGetVertexAttribdv\nGLAD_API_CALL PFNGLGETVERTEXATTRIBFVPROC glad_glGetVertexAttribfv;\n#define glGetVertexAttribfv glad_glGetVertexAttribfv\nGLAD_API_CALL PFNGLGETVERTEXATTRIBIVPROC glad_glGetVertexAttribiv;\n#define glGetVertexAttribiv glad_glGetVertexAttribiv\nGLAD_API_CALL PFNGLGETNCOLORTABLEARBPROC glad_glGetnColorTableARB;\n#define glGetnColorTableARB glad_glGetnColorTableARB\nGLAD_API_CALL PFNGLGETNCOMPRESSEDTEXIMAGEARBPROC glad_glGetnCompressedTexImageARB;\n#define glGetnCompressedTexImageARB glad_glGetnCompressedTexImageARB\nGLAD_API_CALL PFNGLGETNCONVOLUTIONFILTERARBPROC glad_glGetnConvolutionFilterARB;\n#define glGetnConvolutionFilterARB glad_glGetnConvolutionFilterARB\nGLAD_API_CALL PFNGLGETNHISTOGRAMARBPROC glad_glGetnHistogramARB;\n#define glGetnHistogramARB glad_glGetnHistogramARB\nGLAD_API_CALL PFNGLGETNMAPDVARBPROC glad_glGetnMapdvARB;\n#define glGetnMapdvARB glad_glGetnMapdvARB\nGLAD_API_CALL PFNGLGETNMAPFVARBPROC glad_glGetnMapfvARB;\n#define glGetnMapfvARB glad_glGetnMapfvARB\nGLAD_API_CALL PFNGLGETNMAPIVARBPROC glad_glGetnMapivARB;\n#define glGetnMapivARB glad_glGetnMapivARB\nGLAD_API_CALL PFNGLGETNMINMAXARBPROC glad_glGetnMinmaxARB;\n#define glGetnMinmaxARB glad_glGetnMinmaxARB\nGLAD_API_CALL PFNGLGETNPIXELMAPFVARBPROC glad_glGetnPixelMapfvARB;\n#define glGetnPixelMapfvARB glad_glGetnPixelMapfvARB\nGLAD_API_CALL PFNGLGETNPIXELMAPUIVARBPROC glad_glGetnPixelMapuivARB;\n#define glGetnPixelMapuivARB glad_glGetnPixelMapuivARB\nGLAD_API_CALL PFNGLGETNPIXELMAPUSVARBPROC glad_glGetnPixelMapusvARB;\n#define glGetnPixelMapusvARB glad_glGetnPixelMapusvARB\nGLAD_API_CALL PFNGLGETNPOLYGONSTIPPLEARBPROC glad_glGetnPolygonStippleARB;\n#define glGetnPolygonStippleARB glad_glGetnPolygonStippleARB\nGLAD_API_CALL PFNGLGETNSEPARABLEFILTERARBPROC glad_glGetnSeparableFilterARB;\n#define glGetnSeparableFilterARB glad_glGetnSeparableFilterARB\nGLAD_API_CALL PFNGLGETNTEXIMAGEARBPROC glad_glGetnTexImageARB;\n#define glGetnTexImageARB glad_glGetnTexImageARB\nGLAD_API_CALL PFNGLGETNUNIFORMDVARBPROC glad_glGetnUniformdvARB;\n#define glGetnUniformdvARB glad_glGetnUniformdvARB\nGLAD_API_CALL PFNGLGETNUNIFORMFVARBPROC glad_glGetnUniformfvARB;\n#define glGetnUniformfvARB glad_glGetnUniformfvARB\nGLAD_API_CALL PFNGLGETNUNIFORMIVARBPROC glad_glGetnUniformivARB;\n#define glGetnUniformivARB glad_glGetnUniformivARB\nGLAD_API_CALL PFNGLGETNUNIFORMUIVARBPROC glad_glGetnUniformuivARB;\n#define glGetnUniformuivARB glad_glGetnUniformuivARB\nGLAD_API_CALL PFNGLHINTPROC glad_glHint;\n#define glHint glad_glHint\nGLAD_API_CALL PFNGLINDEXMASKPROC glad_glIndexMask;\n#define glIndexMask glad_glIndexMask\nGLAD_API_CALL PFNGLINDEXPOINTERPROC glad_glIndexPointer;\n#define glIndexPointer glad_glIndexPointer\nGLAD_API_CALL PFNGLINDEXDPROC glad_glIndexd;\n#define glIndexd glad_glIndexd\nGLAD_API_CALL PFNGLINDEXDVPROC glad_glIndexdv;\n#define glIndexdv glad_glIndexdv\nGLAD_API_CALL PFNGLINDEXFPROC glad_glIndexf;\n#define glIndexf glad_glIndexf\nGLAD_API_CALL PFNGLINDEXFVPROC glad_glIndexfv;\n#define glIndexfv glad_glIndexfv\nGLAD_API_CALL PFNGLINDEXIPROC glad_glIndexi;\n#define glIndexi glad_glIndexi\nGLAD_API_CALL PFNGLINDEXIVPROC glad_glIndexiv;\n#define glIndexiv glad_glIndexiv\nGLAD_API_CALL PFNGLINDEXSPROC glad_glIndexs;\n#define glIndexs glad_glIndexs\nGLAD_API_CALL PFNGLINDEXSVPROC glad_glIndexsv;\n#define glIndexsv glad_glIndexsv\nGLAD_API_CALL PFNGLINDEXUBPROC glad_glIndexub;\n#define glIndexub glad_glIndexub\nGLAD_API_CALL PFNGLINDEXUBVPROC glad_glIndexubv;\n#define glIndexubv glad_glIndexubv\nGLAD_API_CALL PFNGLINITNAMESPROC glad_glInitNames;\n#define glInitNames glad_glInitNames\nGLAD_API_CALL PFNGLINTERLEAVEDARRAYSPROC glad_glInterleavedArrays;\n#define glInterleavedArrays glad_glInterleavedArrays\nGLAD_API_CALL PFNGLISBUFFERPROC glad_glIsBuffer;\n#define glIsBuffer glad_glIsBuffer\nGLAD_API_CALL PFNGLISENABLEDPROC glad_glIsEnabled;\n#define glIsEnabled glad_glIsEnabled\nGLAD_API_CALL PFNGLISENABLEDIPROC glad_glIsEnabledi;\n#define glIsEnabledi glad_glIsEnabledi\nGLAD_API_CALL PFNGLISFRAMEBUFFERPROC glad_glIsFramebuffer;\n#define glIsFramebuffer glad_glIsFramebuffer\nGLAD_API_CALL PFNGLISLISTPROC glad_glIsList;\n#define glIsList glad_glIsList\nGLAD_API_CALL PFNGLISPROGRAMPROC glad_glIsProgram;\n#define glIsProgram glad_glIsProgram\nGLAD_API_CALL PFNGLISQUERYPROC glad_glIsQuery;\n#define glIsQuery glad_glIsQuery\nGLAD_API_CALL PFNGLISRENDERBUFFERPROC glad_glIsRenderbuffer;\n#define glIsRenderbuffer glad_glIsRenderbuffer\nGLAD_API_CALL PFNGLISSAMPLERPROC glad_glIsSampler;\n#define glIsSampler glad_glIsSampler\nGLAD_API_CALL PFNGLISSHADERPROC glad_glIsShader;\n#define glIsShader glad_glIsShader\nGLAD_API_CALL PFNGLISSYNCPROC glad_glIsSync;\n#define glIsSync glad_glIsSync\nGLAD_API_CALL PFNGLISTEXTUREPROC glad_glIsTexture;\n#define glIsTexture glad_glIsTexture\nGLAD_API_CALL PFNGLISVERTEXARRAYPROC glad_glIsVertexArray;\n#define glIsVertexArray glad_glIsVertexArray\nGLAD_API_CALL PFNGLLIGHTMODELFPROC glad_glLightModelf;\n#define glLightModelf glad_glLightModelf\nGLAD_API_CALL PFNGLLIGHTMODELFVPROC glad_glLightModelfv;\n#define glLightModelfv glad_glLightModelfv\nGLAD_API_CALL PFNGLLIGHTMODELIPROC glad_glLightModeli;\n#define glLightModeli glad_glLightModeli\nGLAD_API_CALL PFNGLLIGHTMODELIVPROC glad_glLightModeliv;\n#define glLightModeliv glad_glLightModeliv\nGLAD_API_CALL PFNGLLIGHTFPROC glad_glLightf;\n#define glLightf glad_glLightf\nGLAD_API_CALL PFNGLLIGHTFVPROC glad_glLightfv;\n#define glLightfv glad_glLightfv\nGLAD_API_CALL PFNGLLIGHTIPROC glad_glLighti;\n#define glLighti glad_glLighti\nGLAD_API_CALL PFNGLLIGHTIVPROC glad_glLightiv;\n#define glLightiv glad_glLightiv\nGLAD_API_CALL PFNGLLINESTIPPLEPROC glad_glLineStipple;\n#define glLineStipple glad_glLineStipple\nGLAD_API_CALL PFNGLLINEWIDTHPROC glad_glLineWidth;\n#define glLineWidth glad_glLineWidth\nGLAD_API_CALL PFNGLLINKPROGRAMPROC glad_glLinkProgram;\n#define glLinkProgram glad_glLinkProgram\nGLAD_API_CALL PFNGLLISTBASEPROC glad_glListBase;\n#define glListBase glad_glListBase\nGLAD_API_CALL PFNGLLOADIDENTITYPROC glad_glLoadIdentity;\n#define glLoadIdentity glad_glLoadIdentity\nGLAD_API_CALL PFNGLLOADMATRIXDPROC glad_glLoadMatrixd;\n#define glLoadMatrixd glad_glLoadMatrixd\nGLAD_API_CALL PFNGLLOADMATRIXFPROC glad_glLoadMatrixf;\n#define glLoadMatrixf glad_glLoadMatrixf\nGLAD_API_CALL PFNGLLOADNAMEPROC glad_glLoadName;\n#define glLoadName glad_glLoadName\nGLAD_API_CALL PFNGLLOADTRANSPOSEMATRIXDPROC glad_glLoadTransposeMatrixd;\n#define glLoadTransposeMatrixd glad_glLoadTransposeMatrixd\nGLAD_API_CALL PFNGLLOADTRANSPOSEMATRIXFPROC glad_glLoadTransposeMatrixf;\n#define glLoadTransposeMatrixf glad_glLoadTransposeMatrixf\nGLAD_API_CALL PFNGLLOGICOPPROC glad_glLogicOp;\n#define glLogicOp glad_glLogicOp\nGLAD_API_CALL PFNGLMAP1DPROC glad_glMap1d;\n#define glMap1d glad_glMap1d\nGLAD_API_CALL PFNGLMAP1FPROC glad_glMap1f;\n#define glMap1f glad_glMap1f\nGLAD_API_CALL PFNGLMAP2DPROC glad_glMap2d;\n#define glMap2d glad_glMap2d\nGLAD_API_CALL PFNGLMAP2FPROC glad_glMap2f;\n#define glMap2f glad_glMap2f\nGLAD_API_CALL PFNGLMAPBUFFERPROC glad_glMapBuffer;\n#define glMapBuffer glad_glMapBuffer\nGLAD_API_CALL PFNGLMAPBUFFERRANGEPROC glad_glMapBufferRange;\n#define glMapBufferRange glad_glMapBufferRange\nGLAD_API_CALL PFNGLMAPGRID1DPROC glad_glMapGrid1d;\n#define glMapGrid1d glad_glMapGrid1d\nGLAD_API_CALL PFNGLMAPGRID1FPROC glad_glMapGrid1f;\n#define glMapGrid1f glad_glMapGrid1f\nGLAD_API_CALL PFNGLMAPGRID2DPROC glad_glMapGrid2d;\n#define glMapGrid2d glad_glMapGrid2d\nGLAD_API_CALL PFNGLMAPGRID2FPROC glad_glMapGrid2f;\n#define glMapGrid2f glad_glMapGrid2f\nGLAD_API_CALL PFNGLMATERIALFPROC glad_glMaterialf;\n#define glMaterialf glad_glMaterialf\nGLAD_API_CALL PFNGLMATERIALFVPROC glad_glMaterialfv;\n#define glMaterialfv glad_glMaterialfv\nGLAD_API_CALL PFNGLMATERIALIPROC glad_glMateriali;\n#define glMateriali glad_glMateriali\nGLAD_API_CALL PFNGLMATERIALIVPROC glad_glMaterialiv;\n#define glMaterialiv glad_glMaterialiv\nGLAD_API_CALL PFNGLMATRIXMODEPROC glad_glMatrixMode;\n#define glMatrixMode glad_glMatrixMode\nGLAD_API_CALL PFNGLMULTMATRIXDPROC glad_glMultMatrixd;\n#define glMultMatrixd glad_glMultMatrixd\nGLAD_API_CALL PFNGLMULTMATRIXFPROC glad_glMultMatrixf;\n#define glMultMatrixf glad_glMultMatrixf\nGLAD_API_CALL PFNGLMULTTRANSPOSEMATRIXDPROC glad_glMultTransposeMatrixd;\n#define glMultTransposeMatrixd glad_glMultTransposeMatrixd\nGLAD_API_CALL PFNGLMULTTRANSPOSEMATRIXFPROC glad_glMultTransposeMatrixf;\n#define glMultTransposeMatrixf glad_glMultTransposeMatrixf\nGLAD_API_CALL PFNGLMULTIDRAWARRAYSPROC glad_glMultiDrawArrays;\n#define glMultiDrawArrays glad_glMultiDrawArrays\nGLAD_API_CALL PFNGLMULTIDRAWELEMENTSPROC glad_glMultiDrawElements;\n#define glMultiDrawElements glad_glMultiDrawElements\nGLAD_API_CALL PFNGLMULTIDRAWELEMENTSBASEVERTEXPROC glad_glMultiDrawElementsBaseVertex;\n#define glMultiDrawElementsBaseVertex glad_glMultiDrawElementsBaseVertex\nGLAD_API_CALL PFNGLMULTITEXCOORD1DPROC glad_glMultiTexCoord1d;\n#define glMultiTexCoord1d glad_glMultiTexCoord1d\nGLAD_API_CALL PFNGLMULTITEXCOORD1DVPROC glad_glMultiTexCoord1dv;\n#define glMultiTexCoord1dv glad_glMultiTexCoord1dv\nGLAD_API_CALL PFNGLMULTITEXCOORD1FPROC glad_glMultiTexCoord1f;\n#define glMultiTexCoord1f glad_glMultiTexCoord1f\nGLAD_API_CALL PFNGLMULTITEXCOORD1FVPROC glad_glMultiTexCoord1fv;\n#define glMultiTexCoord1fv glad_glMultiTexCoord1fv\nGLAD_API_CALL PFNGLMULTITEXCOORD1IPROC glad_glMultiTexCoord1i;\n#define glMultiTexCoord1i glad_glMultiTexCoord1i\nGLAD_API_CALL PFNGLMULTITEXCOORD1IVPROC glad_glMultiTexCoord1iv;\n#define glMultiTexCoord1iv glad_glMultiTexCoord1iv\nGLAD_API_CALL PFNGLMULTITEXCOORD1SPROC glad_glMultiTexCoord1s;\n#define glMultiTexCoord1s glad_glMultiTexCoord1s\nGLAD_API_CALL PFNGLMULTITEXCOORD1SVPROC glad_glMultiTexCoord1sv;\n#define glMultiTexCoord1sv glad_glMultiTexCoord1sv\nGLAD_API_CALL PFNGLMULTITEXCOORD2DPROC glad_glMultiTexCoord2d;\n#define glMultiTexCoord2d glad_glMultiTexCoord2d\nGLAD_API_CALL PFNGLMULTITEXCOORD2DVPROC glad_glMultiTexCoord2dv;\n#define glMultiTexCoord2dv glad_glMultiTexCoord2dv\nGLAD_API_CALL PFNGLMULTITEXCOORD2FPROC glad_glMultiTexCoord2f;\n#define glMultiTexCoord2f glad_glMultiTexCoord2f\nGLAD_API_CALL PFNGLMULTITEXCOORD2FVPROC glad_glMultiTexCoord2fv;\n#define glMultiTexCoord2fv glad_glMultiTexCoord2fv\nGLAD_API_CALL PFNGLMULTITEXCOORD2IPROC glad_glMultiTexCoord2i;\n#define glMultiTexCoord2i glad_glMultiTexCoord2i\nGLAD_API_CALL PFNGLMULTITEXCOORD2IVPROC glad_glMultiTexCoord2iv;\n#define glMultiTexCoord2iv glad_glMultiTexCoord2iv\nGLAD_API_CALL PFNGLMULTITEXCOORD2SPROC glad_glMultiTexCoord2s;\n#define glMultiTexCoord2s glad_glMultiTexCoord2s\nGLAD_API_CALL PFNGLMULTITEXCOORD2SVPROC glad_glMultiTexCoord2sv;\n#define glMultiTexCoord2sv glad_glMultiTexCoord2sv\nGLAD_API_CALL PFNGLMULTITEXCOORD3DPROC glad_glMultiTexCoord3d;\n#define glMultiTexCoord3d glad_glMultiTexCoord3d\nGLAD_API_CALL PFNGLMULTITEXCOORD3DVPROC glad_glMultiTexCoord3dv;\n#define glMultiTexCoord3dv glad_glMultiTexCoord3dv\nGLAD_API_CALL PFNGLMULTITEXCOORD3FPROC glad_glMultiTexCoord3f;\n#define glMultiTexCoord3f glad_glMultiTexCoord3f\nGLAD_API_CALL PFNGLMULTITEXCOORD3FVPROC glad_glMultiTexCoord3fv;\n#define glMultiTexCoord3fv glad_glMultiTexCoord3fv\nGLAD_API_CALL PFNGLMULTITEXCOORD3IPROC glad_glMultiTexCoord3i;\n#define glMultiTexCoord3i glad_glMultiTexCoord3i\nGLAD_API_CALL PFNGLMULTITEXCOORD3IVPROC glad_glMultiTexCoord3iv;\n#define glMultiTexCoord3iv glad_glMultiTexCoord3iv\nGLAD_API_CALL PFNGLMULTITEXCOORD3SPROC glad_glMultiTexCoord3s;\n#define glMultiTexCoord3s glad_glMultiTexCoord3s\nGLAD_API_CALL PFNGLMULTITEXCOORD3SVPROC glad_glMultiTexCoord3sv;\n#define glMultiTexCoord3sv glad_glMultiTexCoord3sv\nGLAD_API_CALL PFNGLMULTITEXCOORD4DPROC glad_glMultiTexCoord4d;\n#define glMultiTexCoord4d glad_glMultiTexCoord4d\nGLAD_API_CALL PFNGLMULTITEXCOORD4DVPROC glad_glMultiTexCoord4dv;\n#define glMultiTexCoord4dv glad_glMultiTexCoord4dv\nGLAD_API_CALL PFNGLMULTITEXCOORD4FPROC glad_glMultiTexCoord4f;\n#define glMultiTexCoord4f glad_glMultiTexCoord4f\nGLAD_API_CALL PFNGLMULTITEXCOORD4FVPROC glad_glMultiTexCoord4fv;\n#define glMultiTexCoord4fv glad_glMultiTexCoord4fv\nGLAD_API_CALL PFNGLMULTITEXCOORD4IPROC glad_glMultiTexCoord4i;\n#define glMultiTexCoord4i glad_glMultiTexCoord4i\nGLAD_API_CALL PFNGLMULTITEXCOORD4IVPROC glad_glMultiTexCoord4iv;\n#define glMultiTexCoord4iv glad_glMultiTexCoord4iv\nGLAD_API_CALL PFNGLMULTITEXCOORD4SPROC glad_glMultiTexCoord4s;\n#define glMultiTexCoord4s glad_glMultiTexCoord4s\nGLAD_API_CALL PFNGLMULTITEXCOORD4SVPROC glad_glMultiTexCoord4sv;\n#define glMultiTexCoord4sv glad_glMultiTexCoord4sv\nGLAD_API_CALL PFNGLMULTITEXCOORDP1UIPROC glad_glMultiTexCoordP1ui;\n#define glMultiTexCoordP1ui glad_glMultiTexCoordP1ui\nGLAD_API_CALL PFNGLMULTITEXCOORDP1UIVPROC glad_glMultiTexCoordP1uiv;\n#define glMultiTexCoordP1uiv glad_glMultiTexCoordP1uiv\nGLAD_API_CALL PFNGLMULTITEXCOORDP2UIPROC glad_glMultiTexCoordP2ui;\n#define glMultiTexCoordP2ui glad_glMultiTexCoordP2ui\nGLAD_API_CALL PFNGLMULTITEXCOORDP2UIVPROC glad_glMultiTexCoordP2uiv;\n#define glMultiTexCoordP2uiv glad_glMultiTexCoordP2uiv\nGLAD_API_CALL PFNGLMULTITEXCOORDP3UIPROC glad_glMultiTexCoordP3ui;\n#define glMultiTexCoordP3ui glad_glMultiTexCoordP3ui\nGLAD_API_CALL PFNGLMULTITEXCOORDP3UIVPROC glad_glMultiTexCoordP3uiv;\n#define glMultiTexCoordP3uiv glad_glMultiTexCoordP3uiv\nGLAD_API_CALL PFNGLMULTITEXCOORDP4UIPROC glad_glMultiTexCoordP4ui;\n#define glMultiTexCoordP4ui glad_glMultiTexCoordP4ui\nGLAD_API_CALL PFNGLMULTITEXCOORDP4UIVPROC glad_glMultiTexCoordP4uiv;\n#define glMultiTexCoordP4uiv glad_glMultiTexCoordP4uiv\nGLAD_API_CALL PFNGLNEWLISTPROC glad_glNewList;\n#define glNewList glad_glNewList\nGLAD_API_CALL PFNGLNORMAL3BPROC glad_glNormal3b;\n#define glNormal3b glad_glNormal3b\nGLAD_API_CALL PFNGLNORMAL3BVPROC glad_glNormal3bv;\n#define glNormal3bv glad_glNormal3bv\nGLAD_API_CALL PFNGLNORMAL3DPROC glad_glNormal3d;\n#define glNormal3d glad_glNormal3d\nGLAD_API_CALL PFNGLNORMAL3DVPROC glad_glNormal3dv;\n#define glNormal3dv glad_glNormal3dv\nGLAD_API_CALL PFNGLNORMAL3FPROC glad_glNormal3f;\n#define glNormal3f glad_glNormal3f\nGLAD_API_CALL PFNGLNORMAL3FVPROC glad_glNormal3fv;\n#define glNormal3fv glad_glNormal3fv\nGLAD_API_CALL PFNGLNORMAL3IPROC glad_glNormal3i;\n#define glNormal3i glad_glNormal3i\nGLAD_API_CALL PFNGLNORMAL3IVPROC glad_glNormal3iv;\n#define glNormal3iv glad_glNormal3iv\nGLAD_API_CALL PFNGLNORMAL3SPROC glad_glNormal3s;\n#define glNormal3s glad_glNormal3s\nGLAD_API_CALL PFNGLNORMAL3SVPROC glad_glNormal3sv;\n#define glNormal3sv glad_glNormal3sv\nGLAD_API_CALL PFNGLNORMALP3UIPROC glad_glNormalP3ui;\n#define glNormalP3ui glad_glNormalP3ui\nGLAD_API_CALL PFNGLNORMALP3UIVPROC glad_glNormalP3uiv;\n#define glNormalP3uiv glad_glNormalP3uiv\nGLAD_API_CALL PFNGLNORMALPOINTERPROC glad_glNormalPointer;\n#define glNormalPointer glad_glNormalPointer\nGLAD_API_CALL PFNGLOBJECTLABELPROC glad_glObjectLabel;\n#define glObjectLabel glad_glObjectLabel\nGLAD_API_CALL PFNGLOBJECTPTRLABELPROC glad_glObjectPtrLabel;\n#define glObjectPtrLabel glad_glObjectPtrLabel\nGLAD_API_CALL PFNGLORTHOPROC glad_glOrtho;\n#define glOrtho glad_glOrtho\nGLAD_API_CALL PFNGLPASSTHROUGHPROC glad_glPassThrough;\n#define glPassThrough glad_glPassThrough\nGLAD_API_CALL PFNGLPIXELMAPFVPROC glad_glPixelMapfv;\n#define glPixelMapfv glad_glPixelMapfv\nGLAD_API_CALL PFNGLPIXELMAPUIVPROC glad_glPixelMapuiv;\n#define glPixelMapuiv glad_glPixelMapuiv\nGLAD_API_CALL PFNGLPIXELMAPUSVPROC glad_glPixelMapusv;\n#define glPixelMapusv glad_glPixelMapusv\nGLAD_API_CALL PFNGLPIXELSTOREFPROC glad_glPixelStoref;\n#define glPixelStoref glad_glPixelStoref\nGLAD_API_CALL PFNGLPIXELSTOREIPROC glad_glPixelStorei;\n#define glPixelStorei glad_glPixelStorei\nGLAD_API_CALL PFNGLPIXELTRANSFERFPROC glad_glPixelTransferf;\n#define glPixelTransferf glad_glPixelTransferf\nGLAD_API_CALL PFNGLPIXELTRANSFERIPROC glad_glPixelTransferi;\n#define glPixelTransferi glad_glPixelTransferi\nGLAD_API_CALL PFNGLPIXELZOOMPROC glad_glPixelZoom;\n#define glPixelZoom glad_glPixelZoom\nGLAD_API_CALL PFNGLPOINTPARAMETERFPROC glad_glPointParameterf;\n#define glPointParameterf glad_glPointParameterf\nGLAD_API_CALL PFNGLPOINTPARAMETERFVPROC glad_glPointParameterfv;\n#define glPointParameterfv glad_glPointParameterfv\nGLAD_API_CALL PFNGLPOINTPARAMETERIPROC glad_glPointParameteri;\n#define glPointParameteri glad_glPointParameteri\nGLAD_API_CALL PFNGLPOINTPARAMETERIVPROC glad_glPointParameteriv;\n#define glPointParameteriv glad_glPointParameteriv\nGLAD_API_CALL PFNGLPOINTSIZEPROC glad_glPointSize;\n#define glPointSize glad_glPointSize\nGLAD_API_CALL PFNGLPOLYGONMODEPROC glad_glPolygonMode;\n#define glPolygonMode glad_glPolygonMode\nGLAD_API_CALL PFNGLPOLYGONOFFSETPROC glad_glPolygonOffset;\n#define glPolygonOffset glad_glPolygonOffset\nGLAD_API_CALL PFNGLPOLYGONSTIPPLEPROC glad_glPolygonStipple;\n#define glPolygonStipple glad_glPolygonStipple\nGLAD_API_CALL PFNGLPOPATTRIBPROC glad_glPopAttrib;\n#define glPopAttrib glad_glPopAttrib\nGLAD_API_CALL PFNGLPOPCLIENTATTRIBPROC glad_glPopClientAttrib;\n#define glPopClientAttrib glad_glPopClientAttrib\nGLAD_API_CALL PFNGLPOPDEBUGGROUPPROC glad_glPopDebugGroup;\n#define glPopDebugGroup glad_glPopDebugGroup\nGLAD_API_CALL PFNGLPOPMATRIXPROC glad_glPopMatrix;\n#define glPopMatrix glad_glPopMatrix\nGLAD_API_CALL PFNGLPOPNAMEPROC glad_glPopName;\n#define glPopName glad_glPopName\nGLAD_API_CALL PFNGLPRIMITIVERESTARTINDEXPROC glad_glPrimitiveRestartIndex;\n#define glPrimitiveRestartIndex glad_glPrimitiveRestartIndex\nGLAD_API_CALL PFNGLPRIORITIZETEXTURESPROC glad_glPrioritizeTextures;\n#define glPrioritizeTextures glad_glPrioritizeTextures\nGLAD_API_CALL PFNGLPROVOKINGVERTEXPROC glad_glProvokingVertex;\n#define glProvokingVertex glad_glProvokingVertex\nGLAD_API_CALL PFNGLPUSHATTRIBPROC glad_glPushAttrib;\n#define glPushAttrib glad_glPushAttrib\nGLAD_API_CALL PFNGLPUSHCLIENTATTRIBPROC glad_glPushClientAttrib;\n#define glPushClientAttrib glad_glPushClientAttrib\nGLAD_API_CALL PFNGLPUSHDEBUGGROUPPROC glad_glPushDebugGroup;\n#define glPushDebugGroup glad_glPushDebugGroup\nGLAD_API_CALL PFNGLPUSHMATRIXPROC glad_glPushMatrix;\n#define glPushMatrix glad_glPushMatrix\nGLAD_API_CALL PFNGLPUSHNAMEPROC glad_glPushName;\n#define glPushName glad_glPushName\nGLAD_API_CALL PFNGLQUERYCOUNTERPROC glad_glQueryCounter;\n#define glQueryCounter glad_glQueryCounter\nGLAD_API_CALL PFNGLRASTERPOS2DPROC glad_glRasterPos2d;\n#define glRasterPos2d glad_glRasterPos2d\nGLAD_API_CALL PFNGLRASTERPOS2DVPROC glad_glRasterPos2dv;\n#define glRasterPos2dv glad_glRasterPos2dv\nGLAD_API_CALL PFNGLRASTERPOS2FPROC glad_glRasterPos2f;\n#define glRasterPos2f glad_glRasterPos2f\nGLAD_API_CALL PFNGLRASTERPOS2FVPROC glad_glRasterPos2fv;\n#define glRasterPos2fv glad_glRasterPos2fv\nGLAD_API_CALL PFNGLRASTERPOS2IPROC glad_glRasterPos2i;\n#define glRasterPos2i glad_glRasterPos2i\nGLAD_API_CALL PFNGLRASTERPOS2IVPROC glad_glRasterPos2iv;\n#define glRasterPos2iv glad_glRasterPos2iv\nGLAD_API_CALL PFNGLRASTERPOS2SPROC glad_glRasterPos2s;\n#define glRasterPos2s glad_glRasterPos2s\nGLAD_API_CALL PFNGLRASTERPOS2SVPROC glad_glRasterPos2sv;\n#define glRasterPos2sv glad_glRasterPos2sv\nGLAD_API_CALL PFNGLRASTERPOS3DPROC glad_glRasterPos3d;\n#define glRasterPos3d glad_glRasterPos3d\nGLAD_API_CALL PFNGLRASTERPOS3DVPROC glad_glRasterPos3dv;\n#define glRasterPos3dv glad_glRasterPos3dv\nGLAD_API_CALL PFNGLRASTERPOS3FPROC glad_glRasterPos3f;\n#define glRasterPos3f glad_glRasterPos3f\nGLAD_API_CALL PFNGLRASTERPOS3FVPROC glad_glRasterPos3fv;\n#define glRasterPos3fv glad_glRasterPos3fv\nGLAD_API_CALL PFNGLRASTERPOS3IPROC glad_glRasterPos3i;\n#define glRasterPos3i glad_glRasterPos3i\nGLAD_API_CALL PFNGLRASTERPOS3IVPROC glad_glRasterPos3iv;\n#define glRasterPos3iv glad_glRasterPos3iv\nGLAD_API_CALL PFNGLRASTERPOS3SPROC glad_glRasterPos3s;\n#define glRasterPos3s glad_glRasterPos3s\nGLAD_API_CALL PFNGLRASTERPOS3SVPROC glad_glRasterPos3sv;\n#define glRasterPos3sv glad_glRasterPos3sv\nGLAD_API_CALL PFNGLRASTERPOS4DPROC glad_glRasterPos4d;\n#define glRasterPos4d glad_glRasterPos4d\nGLAD_API_CALL PFNGLRASTERPOS4DVPROC glad_glRasterPos4dv;\n#define glRasterPos4dv glad_glRasterPos4dv\nGLAD_API_CALL PFNGLRASTERPOS4FPROC glad_glRasterPos4f;\n#define glRasterPos4f glad_glRasterPos4f\nGLAD_API_CALL PFNGLRASTERPOS4FVPROC glad_glRasterPos4fv;\n#define glRasterPos4fv glad_glRasterPos4fv\nGLAD_API_CALL PFNGLRASTERPOS4IPROC glad_glRasterPos4i;\n#define glRasterPos4i glad_glRasterPos4i\nGLAD_API_CALL PFNGLRASTERPOS4IVPROC glad_glRasterPos4iv;\n#define glRasterPos4iv glad_glRasterPos4iv\nGLAD_API_CALL PFNGLRASTERPOS4SPROC glad_glRasterPos4s;\n#define glRasterPos4s glad_glRasterPos4s\nGLAD_API_CALL PFNGLRASTERPOS4SVPROC glad_glRasterPos4sv;\n#define glRasterPos4sv glad_glRasterPos4sv\nGLAD_API_CALL PFNGLREADBUFFERPROC glad_glReadBuffer;\n#define glReadBuffer glad_glReadBuffer\nGLAD_API_CALL PFNGLREADPIXELSPROC glad_glReadPixels;\n#define glReadPixels glad_glReadPixels\nGLAD_API_CALL PFNGLREADNPIXELSPROC glad_glReadnPixels;\n#define glReadnPixels glad_glReadnPixels\nGLAD_API_CALL PFNGLREADNPIXELSARBPROC glad_glReadnPixelsARB;\n#define glReadnPixelsARB glad_glReadnPixelsARB\nGLAD_API_CALL PFNGLRECTDPROC glad_glRectd;\n#define glRectd glad_glRectd\nGLAD_API_CALL PFNGLRECTDVPROC glad_glRectdv;\n#define glRectdv glad_glRectdv\nGLAD_API_CALL PFNGLRECTFPROC glad_glRectf;\n#define glRectf glad_glRectf\nGLAD_API_CALL PFNGLRECTFVPROC glad_glRectfv;\n#define glRectfv glad_glRectfv\nGLAD_API_CALL PFNGLRECTIPROC glad_glRecti;\n#define glRecti glad_glRecti\nGLAD_API_CALL PFNGLRECTIVPROC glad_glRectiv;\n#define glRectiv glad_glRectiv\nGLAD_API_CALL PFNGLRECTSPROC glad_glRects;\n#define glRects glad_glRects\nGLAD_API_CALL PFNGLRECTSVPROC glad_glRectsv;\n#define glRectsv glad_glRectsv\nGLAD_API_CALL PFNGLRENDERMODEPROC glad_glRenderMode;\n#define glRenderMode glad_glRenderMode\nGLAD_API_CALL PFNGLRENDERBUFFERSTORAGEPROC glad_glRenderbufferStorage;\n#define glRenderbufferStorage glad_glRenderbufferStorage\nGLAD_API_CALL PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC glad_glRenderbufferStorageMultisample;\n#define glRenderbufferStorageMultisample glad_glRenderbufferStorageMultisample\nGLAD_API_CALL PFNGLROTATEDPROC glad_glRotated;\n#define glRotated glad_glRotated\nGLAD_API_CALL PFNGLROTATEFPROC glad_glRotatef;\n#define glRotatef glad_glRotatef\nGLAD_API_CALL PFNGLSAMPLECOVERAGEPROC glad_glSampleCoverage;\n#define glSampleCoverage glad_glSampleCoverage\nGLAD_API_CALL PFNGLSAMPLECOVERAGEARBPROC glad_glSampleCoverageARB;\n#define glSampleCoverageARB glad_glSampleCoverageARB\nGLAD_API_CALL PFNGLSAMPLEMASKIPROC glad_glSampleMaski;\n#define glSampleMaski glad_glSampleMaski\nGLAD_API_CALL PFNGLSAMPLERPARAMETERIIVPROC glad_glSamplerParameterIiv;\n#define glSamplerParameterIiv glad_glSamplerParameterIiv\nGLAD_API_CALL PFNGLSAMPLERPARAMETERIUIVPROC glad_glSamplerParameterIuiv;\n#define glSamplerParameterIuiv glad_glSamplerParameterIuiv\nGLAD_API_CALL PFNGLSAMPLERPARAMETERFPROC glad_glSamplerParameterf;\n#define glSamplerParameterf glad_glSamplerParameterf\nGLAD_API_CALL PFNGLSAMPLERPARAMETERFVPROC glad_glSamplerParameterfv;\n#define glSamplerParameterfv glad_glSamplerParameterfv\nGLAD_API_CALL PFNGLSAMPLERPARAMETERIPROC glad_glSamplerParameteri;\n#define glSamplerParameteri glad_glSamplerParameteri\nGLAD_API_CALL PFNGLSAMPLERPARAMETERIVPROC glad_glSamplerParameteriv;\n#define glSamplerParameteriv glad_glSamplerParameteriv\nGLAD_API_CALL PFNGLSCALEDPROC glad_glScaled;\n#define glScaled glad_glScaled\nGLAD_API_CALL PFNGLSCALEFPROC glad_glScalef;\n#define glScalef glad_glScalef\nGLAD_API_CALL PFNGLSCISSORPROC glad_glScissor;\n#define glScissor glad_glScissor\nGLAD_API_CALL PFNGLSECONDARYCOLOR3BPROC glad_glSecondaryColor3b;\n#define glSecondaryColor3b glad_glSecondaryColor3b\nGLAD_API_CALL PFNGLSECONDARYCOLOR3BVPROC glad_glSecondaryColor3bv;\n#define glSecondaryColor3bv glad_glSecondaryColor3bv\nGLAD_API_CALL PFNGLSECONDARYCOLOR3DPROC glad_glSecondaryColor3d;\n#define glSecondaryColor3d glad_glSecondaryColor3d\nGLAD_API_CALL PFNGLSECONDARYCOLOR3DVPROC glad_glSecondaryColor3dv;\n#define glSecondaryColor3dv glad_glSecondaryColor3dv\nGLAD_API_CALL PFNGLSECONDARYCOLOR3FPROC glad_glSecondaryColor3f;\n#define glSecondaryColor3f glad_glSecondaryColor3f\nGLAD_API_CALL PFNGLSECONDARYCOLOR3FVPROC glad_glSecondaryColor3fv;\n#define glSecondaryColor3fv glad_glSecondaryColor3fv\nGLAD_API_CALL PFNGLSECONDARYCOLOR3IPROC glad_glSecondaryColor3i;\n#define glSecondaryColor3i glad_glSecondaryColor3i\nGLAD_API_CALL PFNGLSECONDARYCOLOR3IVPROC glad_glSecondaryColor3iv;\n#define glSecondaryColor3iv glad_glSecondaryColor3iv\nGLAD_API_CALL PFNGLSECONDARYCOLOR3SPROC glad_glSecondaryColor3s;\n#define glSecondaryColor3s glad_glSecondaryColor3s\nGLAD_API_CALL PFNGLSECONDARYCOLOR3SVPROC glad_glSecondaryColor3sv;\n#define glSecondaryColor3sv glad_glSecondaryColor3sv\nGLAD_API_CALL PFNGLSECONDARYCOLOR3UBPROC glad_glSecondaryColor3ub;\n#define glSecondaryColor3ub glad_glSecondaryColor3ub\nGLAD_API_CALL PFNGLSECONDARYCOLOR3UBVPROC glad_glSecondaryColor3ubv;\n#define glSecondaryColor3ubv glad_glSecondaryColor3ubv\nGLAD_API_CALL PFNGLSECONDARYCOLOR3UIPROC glad_glSecondaryColor3ui;\n#define glSecondaryColor3ui glad_glSecondaryColor3ui\nGLAD_API_CALL PFNGLSECONDARYCOLOR3UIVPROC glad_glSecondaryColor3uiv;\n#define glSecondaryColor3uiv glad_glSecondaryColor3uiv\nGLAD_API_CALL PFNGLSECONDARYCOLOR3USPROC glad_glSecondaryColor3us;\n#define glSecondaryColor3us glad_glSecondaryColor3us\nGLAD_API_CALL PFNGLSECONDARYCOLOR3USVPROC glad_glSecondaryColor3usv;\n#define glSecondaryColor3usv glad_glSecondaryColor3usv\nGLAD_API_CALL PFNGLSECONDARYCOLORP3UIPROC glad_glSecondaryColorP3ui;\n#define glSecondaryColorP3ui glad_glSecondaryColorP3ui\nGLAD_API_CALL PFNGLSECONDARYCOLORP3UIVPROC glad_glSecondaryColorP3uiv;\n#define glSecondaryColorP3uiv glad_glSecondaryColorP3uiv\nGLAD_API_CALL PFNGLSECONDARYCOLORPOINTERPROC glad_glSecondaryColorPointer;\n#define glSecondaryColorPointer glad_glSecondaryColorPointer\nGLAD_API_CALL PFNGLSELECTBUFFERPROC glad_glSelectBuffer;\n#define glSelectBuffer glad_glSelectBuffer\nGLAD_API_CALL PFNGLSHADEMODELPROC glad_glShadeModel;\n#define glShadeModel glad_glShadeModel\nGLAD_API_CALL PFNGLSHADERSOURCEPROC glad_glShaderSource;\n#define glShaderSource glad_glShaderSource\nGLAD_API_CALL PFNGLSTENCILFUNCPROC glad_glStencilFunc;\n#define glStencilFunc glad_glStencilFunc\nGLAD_API_CALL PFNGLSTENCILFUNCSEPARATEPROC glad_glStencilFuncSeparate;\n#define glStencilFuncSeparate glad_glStencilFuncSeparate\nGLAD_API_CALL PFNGLSTENCILMASKPROC glad_glStencilMask;\n#define glStencilMask glad_glStencilMask\nGLAD_API_CALL PFNGLSTENCILMASKSEPARATEPROC glad_glStencilMaskSeparate;\n#define glStencilMaskSeparate glad_glStencilMaskSeparate\nGLAD_API_CALL PFNGLSTENCILOPPROC glad_glStencilOp;\n#define glStencilOp glad_glStencilOp\nGLAD_API_CALL PFNGLSTENCILOPSEPARATEPROC glad_glStencilOpSeparate;\n#define glStencilOpSeparate glad_glStencilOpSeparate\nGLAD_API_CALL PFNGLTEXBUFFERPROC glad_glTexBuffer;\n#define glTexBuffer glad_glTexBuffer\nGLAD_API_CALL PFNGLTEXCOORD1DPROC glad_glTexCoord1d;\n#define glTexCoord1d glad_glTexCoord1d\nGLAD_API_CALL PFNGLTEXCOORD1DVPROC glad_glTexCoord1dv;\n#define glTexCoord1dv glad_glTexCoord1dv\nGLAD_API_CALL PFNGLTEXCOORD1FPROC glad_glTexCoord1f;\n#define glTexCoord1f glad_glTexCoord1f\nGLAD_API_CALL PFNGLTEXCOORD1FVPROC glad_glTexCoord1fv;\n#define glTexCoord1fv glad_glTexCoord1fv\nGLAD_API_CALL PFNGLTEXCOORD1IPROC glad_glTexCoord1i;\n#define glTexCoord1i glad_glTexCoord1i\nGLAD_API_CALL PFNGLTEXCOORD1IVPROC glad_glTexCoord1iv;\n#define glTexCoord1iv glad_glTexCoord1iv\nGLAD_API_CALL PFNGLTEXCOORD1SPROC glad_glTexCoord1s;\n#define glTexCoord1s glad_glTexCoord1s\nGLAD_API_CALL PFNGLTEXCOORD1SVPROC glad_glTexCoord1sv;\n#define glTexCoord1sv glad_glTexCoord1sv\nGLAD_API_CALL PFNGLTEXCOORD2DPROC glad_glTexCoord2d;\n#define glTexCoord2d glad_glTexCoord2d\nGLAD_API_CALL PFNGLTEXCOORD2DVPROC glad_glTexCoord2dv;\n#define glTexCoord2dv glad_glTexCoord2dv\nGLAD_API_CALL PFNGLTEXCOORD2FPROC glad_glTexCoord2f;\n#define glTexCoord2f glad_glTexCoord2f\nGLAD_API_CALL PFNGLTEXCOORD2FVPROC glad_glTexCoord2fv;\n#define glTexCoord2fv glad_glTexCoord2fv\nGLAD_API_CALL PFNGLTEXCOORD2IPROC glad_glTexCoord2i;\n#define glTexCoord2i glad_glTexCoord2i\nGLAD_API_CALL PFNGLTEXCOORD2IVPROC glad_glTexCoord2iv;\n#define glTexCoord2iv glad_glTexCoord2iv\nGLAD_API_CALL PFNGLTEXCOORD2SPROC glad_glTexCoord2s;\n#define glTexCoord2s glad_glTexCoord2s\nGLAD_API_CALL PFNGLTEXCOORD2SVPROC glad_glTexCoord2sv;\n#define glTexCoord2sv glad_glTexCoord2sv\nGLAD_API_CALL PFNGLTEXCOORD3DPROC glad_glTexCoord3d;\n#define glTexCoord3d glad_glTexCoord3d\nGLAD_API_CALL PFNGLTEXCOORD3DVPROC glad_glTexCoord3dv;\n#define glTexCoord3dv glad_glTexCoord3dv\nGLAD_API_CALL PFNGLTEXCOORD3FPROC glad_glTexCoord3f;\n#define glTexCoord3f glad_glTexCoord3f\nGLAD_API_CALL PFNGLTEXCOORD3FVPROC glad_glTexCoord3fv;\n#define glTexCoord3fv glad_glTexCoord3fv\nGLAD_API_CALL PFNGLTEXCOORD3IPROC glad_glTexCoord3i;\n#define glTexCoord3i glad_glTexCoord3i\nGLAD_API_CALL PFNGLTEXCOORD3IVPROC glad_glTexCoord3iv;\n#define glTexCoord3iv glad_glTexCoord3iv\nGLAD_API_CALL PFNGLTEXCOORD3SPROC glad_glTexCoord3s;\n#define glTexCoord3s glad_glTexCoord3s\nGLAD_API_CALL PFNGLTEXCOORD3SVPROC glad_glTexCoord3sv;\n#define glTexCoord3sv glad_glTexCoord3sv\nGLAD_API_CALL PFNGLTEXCOORD4DPROC glad_glTexCoord4d;\n#define glTexCoord4d glad_glTexCoord4d\nGLAD_API_CALL PFNGLTEXCOORD4DVPROC glad_glTexCoord4dv;\n#define glTexCoord4dv glad_glTexCoord4dv\nGLAD_API_CALL PFNGLTEXCOORD4FPROC glad_glTexCoord4f;\n#define glTexCoord4f glad_glTexCoord4f\nGLAD_API_CALL PFNGLTEXCOORD4FVPROC glad_glTexCoord4fv;\n#define glTexCoord4fv glad_glTexCoord4fv\nGLAD_API_CALL PFNGLTEXCOORD4IPROC glad_glTexCoord4i;\n#define glTexCoord4i glad_glTexCoord4i\nGLAD_API_CALL PFNGLTEXCOORD4IVPROC glad_glTexCoord4iv;\n#define glTexCoord4iv glad_glTexCoord4iv\nGLAD_API_CALL PFNGLTEXCOORD4SPROC glad_glTexCoord4s;\n#define glTexCoord4s glad_glTexCoord4s\nGLAD_API_CALL PFNGLTEXCOORD4SVPROC glad_glTexCoord4sv;\n#define glTexCoord4sv glad_glTexCoord4sv\nGLAD_API_CALL PFNGLTEXCOORDP1UIPROC glad_glTexCoordP1ui;\n#define glTexCoordP1ui glad_glTexCoordP1ui\nGLAD_API_CALL PFNGLTEXCOORDP1UIVPROC glad_glTexCoordP1uiv;\n#define glTexCoordP1uiv glad_glTexCoordP1uiv\nGLAD_API_CALL PFNGLTEXCOORDP2UIPROC glad_glTexCoordP2ui;\n#define glTexCoordP2ui glad_glTexCoordP2ui\nGLAD_API_CALL PFNGLTEXCOORDP2UIVPROC glad_glTexCoordP2uiv;\n#define glTexCoordP2uiv glad_glTexCoordP2uiv\nGLAD_API_CALL PFNGLTEXCOORDP3UIPROC glad_glTexCoordP3ui;\n#define glTexCoordP3ui glad_glTexCoordP3ui\nGLAD_API_CALL PFNGLTEXCOORDP3UIVPROC glad_glTexCoordP3uiv;\n#define glTexCoordP3uiv glad_glTexCoordP3uiv\nGLAD_API_CALL PFNGLTEXCOORDP4UIPROC glad_glTexCoordP4ui;\n#define glTexCoordP4ui glad_glTexCoordP4ui\nGLAD_API_CALL PFNGLTEXCOORDP4UIVPROC glad_glTexCoordP4uiv;\n#define glTexCoordP4uiv glad_glTexCoordP4uiv\nGLAD_API_CALL PFNGLTEXCOORDPOINTERPROC glad_glTexCoordPointer;\n#define glTexCoordPointer glad_glTexCoordPointer\nGLAD_API_CALL PFNGLTEXENVFPROC glad_glTexEnvf;\n#define glTexEnvf glad_glTexEnvf\nGLAD_API_CALL PFNGLTEXENVFVPROC glad_glTexEnvfv;\n#define glTexEnvfv glad_glTexEnvfv\nGLAD_API_CALL PFNGLTEXENVIPROC glad_glTexEnvi;\n#define glTexEnvi glad_glTexEnvi\nGLAD_API_CALL PFNGLTEXENVIVPROC glad_glTexEnviv;\n#define glTexEnviv glad_glTexEnviv\nGLAD_API_CALL PFNGLTEXGENDPROC glad_glTexGend;\n#define glTexGend glad_glTexGend\nGLAD_API_CALL PFNGLTEXGENDVPROC glad_glTexGendv;\n#define glTexGendv glad_glTexGendv\nGLAD_API_CALL PFNGLTEXGENFPROC glad_glTexGenf;\n#define glTexGenf glad_glTexGenf\nGLAD_API_CALL PFNGLTEXGENFVPROC glad_glTexGenfv;\n#define glTexGenfv glad_glTexGenfv\nGLAD_API_CALL PFNGLTEXGENIPROC glad_glTexGeni;\n#define glTexGeni glad_glTexGeni\nGLAD_API_CALL PFNGLTEXGENIVPROC glad_glTexGeniv;\n#define glTexGeniv glad_glTexGeniv\nGLAD_API_CALL PFNGLTEXIMAGE1DPROC glad_glTexImage1D;\n#define glTexImage1D glad_glTexImage1D\nGLAD_API_CALL PFNGLTEXIMAGE2DPROC glad_glTexImage2D;\n#define glTexImage2D glad_glTexImage2D\nGLAD_API_CALL PFNGLTEXIMAGE2DMULTISAMPLEPROC glad_glTexImage2DMultisample;\n#define glTexImage2DMultisample glad_glTexImage2DMultisample\nGLAD_API_CALL PFNGLTEXIMAGE3DPROC glad_glTexImage3D;\n#define glTexImage3D glad_glTexImage3D\nGLAD_API_CALL PFNGLTEXIMAGE3DMULTISAMPLEPROC glad_glTexImage3DMultisample;\n#define glTexImage3DMultisample glad_glTexImage3DMultisample\nGLAD_API_CALL PFNGLTEXPARAMETERIIVPROC glad_glTexParameterIiv;\n#define glTexParameterIiv glad_glTexParameterIiv\nGLAD_API_CALL PFNGLTEXPARAMETERIUIVPROC glad_glTexParameterIuiv;\n#define glTexParameterIuiv glad_glTexParameterIuiv\nGLAD_API_CALL PFNGLTEXPARAMETERFPROC glad_glTexParameterf;\n#define glTexParameterf glad_glTexParameterf\nGLAD_API_CALL PFNGLTEXPARAMETERFVPROC glad_glTexParameterfv;\n#define glTexParameterfv glad_glTexParameterfv\nGLAD_API_CALL PFNGLTEXPARAMETERIPROC glad_glTexParameteri;\n#define glTexParameteri glad_glTexParameteri\nGLAD_API_CALL PFNGLTEXPARAMETERIVPROC glad_glTexParameteriv;\n#define glTexParameteriv glad_glTexParameteriv\nGLAD_API_CALL PFNGLTEXSUBIMAGE1DPROC glad_glTexSubImage1D;\n#define glTexSubImage1D glad_glTexSubImage1D\nGLAD_API_CALL PFNGLTEXSUBIMAGE2DPROC glad_glTexSubImage2D;\n#define glTexSubImage2D glad_glTexSubImage2D\nGLAD_API_CALL PFNGLTEXSUBIMAGE3DPROC glad_glTexSubImage3D;\n#define glTexSubImage3D glad_glTexSubImage3D\nGLAD_API_CALL PFNGLTRANSFORMFEEDBACKVARYINGSPROC glad_glTransformFeedbackVaryings;\n#define glTransformFeedbackVaryings glad_glTransformFeedbackVaryings\nGLAD_API_CALL PFNGLTRANSLATEDPROC glad_glTranslated;\n#define glTranslated glad_glTranslated\nGLAD_API_CALL PFNGLTRANSLATEFPROC glad_glTranslatef;\n#define glTranslatef glad_glTranslatef\nGLAD_API_CALL PFNGLUNIFORM1FPROC glad_glUniform1f;\n#define glUniform1f glad_glUniform1f\nGLAD_API_CALL PFNGLUNIFORM1FVPROC glad_glUniform1fv;\n#define glUniform1fv glad_glUniform1fv\nGLAD_API_CALL PFNGLUNIFORM1IPROC glad_glUniform1i;\n#define glUniform1i glad_glUniform1i\nGLAD_API_CALL PFNGLUNIFORM1IVPROC glad_glUniform1iv;\n#define glUniform1iv glad_glUniform1iv\nGLAD_API_CALL PFNGLUNIFORM1UIPROC glad_glUniform1ui;\n#define glUniform1ui glad_glUniform1ui\nGLAD_API_CALL PFNGLUNIFORM1UIVPROC glad_glUniform1uiv;\n#define glUniform1uiv glad_glUniform1uiv\nGLAD_API_CALL PFNGLUNIFORM2FPROC glad_glUniform2f;\n#define glUniform2f glad_glUniform2f\nGLAD_API_CALL PFNGLUNIFORM2FVPROC glad_glUniform2fv;\n#define glUniform2fv glad_glUniform2fv\nGLAD_API_CALL PFNGLUNIFORM2IPROC glad_glUniform2i;\n#define glUniform2i glad_glUniform2i\nGLAD_API_CALL PFNGLUNIFORM2IVPROC glad_glUniform2iv;\n#define glUniform2iv glad_glUniform2iv\nGLAD_API_CALL PFNGLUNIFORM2UIPROC glad_glUniform2ui;\n#define glUniform2ui glad_glUniform2ui\nGLAD_API_CALL PFNGLUNIFORM2UIVPROC glad_glUniform2uiv;\n#define glUniform2uiv glad_glUniform2uiv\nGLAD_API_CALL PFNGLUNIFORM3FPROC glad_glUniform3f;\n#define glUniform3f glad_glUniform3f\nGLAD_API_CALL PFNGLUNIFORM3FVPROC glad_glUniform3fv;\n#define glUniform3fv glad_glUniform3fv\nGLAD_API_CALL PFNGLUNIFORM3IPROC glad_glUniform3i;\n#define glUniform3i glad_glUniform3i\nGLAD_API_CALL PFNGLUNIFORM3IVPROC glad_glUniform3iv;\n#define glUniform3iv glad_glUniform3iv\nGLAD_API_CALL PFNGLUNIFORM3UIPROC glad_glUniform3ui;\n#define glUniform3ui glad_glUniform3ui\nGLAD_API_CALL PFNGLUNIFORM3UIVPROC glad_glUniform3uiv;\n#define glUniform3uiv glad_glUniform3uiv\nGLAD_API_CALL PFNGLUNIFORM4FPROC glad_glUniform4f;\n#define glUniform4f glad_glUniform4f\nGLAD_API_CALL PFNGLUNIFORM4FVPROC glad_glUniform4fv;\n#define glUniform4fv glad_glUniform4fv\nGLAD_API_CALL PFNGLUNIFORM4IPROC glad_glUniform4i;\n#define glUniform4i glad_glUniform4i\nGLAD_API_CALL PFNGLUNIFORM4IVPROC glad_glUniform4iv;\n#define glUniform4iv glad_glUniform4iv\nGLAD_API_CALL PFNGLUNIFORM4UIPROC glad_glUniform4ui;\n#define glUniform4ui glad_glUniform4ui\nGLAD_API_CALL PFNGLUNIFORM4UIVPROC glad_glUniform4uiv;\n#define glUniform4uiv glad_glUniform4uiv\nGLAD_API_CALL PFNGLUNIFORMBLOCKBINDINGPROC glad_glUniformBlockBinding;\n#define glUniformBlockBinding glad_glUniformBlockBinding\nGLAD_API_CALL PFNGLUNIFORMMATRIX2FVPROC glad_glUniformMatrix2fv;\n#define glUniformMatrix2fv glad_glUniformMatrix2fv\nGLAD_API_CALL PFNGLUNIFORMMATRIX2X3FVPROC glad_glUniformMatrix2x3fv;\n#define glUniformMatrix2x3fv glad_glUniformMatrix2x3fv\nGLAD_API_CALL PFNGLUNIFORMMATRIX2X4FVPROC glad_glUniformMatrix2x4fv;\n#define glUniformMatrix2x4fv glad_glUniformMatrix2x4fv\nGLAD_API_CALL PFNGLUNIFORMMATRIX3FVPROC glad_glUniformMatrix3fv;\n#define glUniformMatrix3fv glad_glUniformMatrix3fv\nGLAD_API_CALL PFNGLUNIFORMMATRIX3X2FVPROC glad_glUniformMatrix3x2fv;\n#define glUniformMatrix3x2fv glad_glUniformMatrix3x2fv\nGLAD_API_CALL PFNGLUNIFORMMATRIX3X4FVPROC glad_glUniformMatrix3x4fv;\n#define glUniformMatrix3x4fv glad_glUniformMatrix3x4fv\nGLAD_API_CALL PFNGLUNIFORMMATRIX4FVPROC glad_glUniformMatrix4fv;\n#define glUniformMatrix4fv glad_glUniformMatrix4fv\nGLAD_API_CALL PFNGLUNIFORMMATRIX4X2FVPROC glad_glUniformMatrix4x2fv;\n#define glUniformMatrix4x2fv glad_glUniformMatrix4x2fv\nGLAD_API_CALL PFNGLUNIFORMMATRIX4X3FVPROC glad_glUniformMatrix4x3fv;\n#define glUniformMatrix4x3fv glad_glUniformMatrix4x3fv\nGLAD_API_CALL PFNGLUNMAPBUFFERPROC glad_glUnmapBuffer;\n#define glUnmapBuffer glad_glUnmapBuffer\nGLAD_API_CALL PFNGLUSEPROGRAMPROC glad_glUseProgram;\n#define glUseProgram glad_glUseProgram\nGLAD_API_CALL PFNGLVALIDATEPROGRAMPROC glad_glValidateProgram;\n#define glValidateProgram glad_glValidateProgram\nGLAD_API_CALL PFNGLVERTEX2DPROC glad_glVertex2d;\n#define glVertex2d glad_glVertex2d\nGLAD_API_CALL PFNGLVERTEX2DVPROC glad_glVertex2dv;\n#define glVertex2dv glad_glVertex2dv\nGLAD_API_CALL PFNGLVERTEX2FPROC glad_glVertex2f;\n#define glVertex2f glad_glVertex2f\nGLAD_API_CALL PFNGLVERTEX2FVPROC glad_glVertex2fv;\n#define glVertex2fv glad_glVertex2fv\nGLAD_API_CALL PFNGLVERTEX2IPROC glad_glVertex2i;\n#define glVertex2i glad_glVertex2i\nGLAD_API_CALL PFNGLVERTEX2IVPROC glad_glVertex2iv;\n#define glVertex2iv glad_glVertex2iv\nGLAD_API_CALL PFNGLVERTEX2SPROC glad_glVertex2s;\n#define glVertex2s glad_glVertex2s\nGLAD_API_CALL PFNGLVERTEX2SVPROC glad_glVertex2sv;\n#define glVertex2sv glad_glVertex2sv\nGLAD_API_CALL PFNGLVERTEX3DPROC glad_glVertex3d;\n#define glVertex3d glad_glVertex3d\nGLAD_API_CALL PFNGLVERTEX3DVPROC glad_glVertex3dv;\n#define glVertex3dv glad_glVertex3dv\nGLAD_API_CALL PFNGLVERTEX3FPROC glad_glVertex3f;\n#define glVertex3f glad_glVertex3f\nGLAD_API_CALL PFNGLVERTEX3FVPROC glad_glVertex3fv;\n#define glVertex3fv glad_glVertex3fv\nGLAD_API_CALL PFNGLVERTEX3IPROC glad_glVertex3i;\n#define glVertex3i glad_glVertex3i\nGLAD_API_CALL PFNGLVERTEX3IVPROC glad_glVertex3iv;\n#define glVertex3iv glad_glVertex3iv\nGLAD_API_CALL PFNGLVERTEX3SPROC glad_glVertex3s;\n#define glVertex3s glad_glVertex3s\nGLAD_API_CALL PFNGLVERTEX3SVPROC glad_glVertex3sv;\n#define glVertex3sv glad_glVertex3sv\nGLAD_API_CALL PFNGLVERTEX4DPROC glad_glVertex4d;\n#define glVertex4d glad_glVertex4d\nGLAD_API_CALL PFNGLVERTEX4DVPROC glad_glVertex4dv;\n#define glVertex4dv glad_glVertex4dv\nGLAD_API_CALL PFNGLVERTEX4FPROC glad_glVertex4f;\n#define glVertex4f glad_glVertex4f\nGLAD_API_CALL PFNGLVERTEX4FVPROC glad_glVertex4fv;\n#define glVertex4fv glad_glVertex4fv\nGLAD_API_CALL PFNGLVERTEX4IPROC glad_glVertex4i;\n#define glVertex4i glad_glVertex4i\nGLAD_API_CALL PFNGLVERTEX4IVPROC glad_glVertex4iv;\n#define glVertex4iv glad_glVertex4iv\nGLAD_API_CALL PFNGLVERTEX4SPROC glad_glVertex4s;\n#define glVertex4s glad_glVertex4s\nGLAD_API_CALL PFNGLVERTEX4SVPROC glad_glVertex4sv;\n#define glVertex4sv glad_glVertex4sv\nGLAD_API_CALL PFNGLVERTEXATTRIB1DPROC glad_glVertexAttrib1d;\n#define glVertexAttrib1d glad_glVertexAttrib1d\nGLAD_API_CALL PFNGLVERTEXATTRIB1DVPROC glad_glVertexAttrib1dv;\n#define glVertexAttrib1dv glad_glVertexAttrib1dv\nGLAD_API_CALL PFNGLVERTEXATTRIB1FPROC glad_glVertexAttrib1f;\n#define glVertexAttrib1f glad_glVertexAttrib1f\nGLAD_API_CALL PFNGLVERTEXATTRIB1FVPROC glad_glVertexAttrib1fv;\n#define glVertexAttrib1fv glad_glVertexAttrib1fv\nGLAD_API_CALL PFNGLVERTEXATTRIB1SPROC glad_glVertexAttrib1s;\n#define glVertexAttrib1s glad_glVertexAttrib1s\nGLAD_API_CALL PFNGLVERTEXATTRIB1SVPROC glad_glVertexAttrib1sv;\n#define glVertexAttrib1sv glad_glVertexAttrib1sv\nGLAD_API_CALL PFNGLVERTEXATTRIB2DPROC glad_glVertexAttrib2d;\n#define glVertexAttrib2d glad_glVertexAttrib2d\nGLAD_API_CALL PFNGLVERTEXATTRIB2DVPROC glad_glVertexAttrib2dv;\n#define glVertexAttrib2dv glad_glVertexAttrib2dv\nGLAD_API_CALL PFNGLVERTEXATTRIB2FPROC glad_glVertexAttrib2f;\n#define glVertexAttrib2f glad_glVertexAttrib2f\nGLAD_API_CALL PFNGLVERTEXATTRIB2FVPROC glad_glVertexAttrib2fv;\n#define glVertexAttrib2fv glad_glVertexAttrib2fv\nGLAD_API_CALL PFNGLVERTEXATTRIB2SPROC glad_glVertexAttrib2s;\n#define glVertexAttrib2s glad_glVertexAttrib2s\nGLAD_API_CALL PFNGLVERTEXATTRIB2SVPROC glad_glVertexAttrib2sv;\n#define glVertexAttrib2sv glad_glVertexAttrib2sv\nGLAD_API_CALL PFNGLVERTEXATTRIB3DPROC glad_glVertexAttrib3d;\n#define glVertexAttrib3d glad_glVertexAttrib3d\nGLAD_API_CALL PFNGLVERTEXATTRIB3DVPROC glad_glVertexAttrib3dv;\n#define glVertexAttrib3dv glad_glVertexAttrib3dv\nGLAD_API_CALL PFNGLVERTEXATTRIB3FPROC glad_glVertexAttrib3f;\n#define glVertexAttrib3f glad_glVertexAttrib3f\nGLAD_API_CALL PFNGLVERTEXATTRIB3FVPROC glad_glVertexAttrib3fv;\n#define glVertexAttrib3fv glad_glVertexAttrib3fv\nGLAD_API_CALL PFNGLVERTEXATTRIB3SPROC glad_glVertexAttrib3s;\n#define glVertexAttrib3s glad_glVertexAttrib3s\nGLAD_API_CALL PFNGLVERTEXATTRIB3SVPROC glad_glVertexAttrib3sv;\n#define glVertexAttrib3sv glad_glVertexAttrib3sv\nGLAD_API_CALL PFNGLVERTEXATTRIB4NBVPROC glad_glVertexAttrib4Nbv;\n#define glVertexAttrib4Nbv glad_glVertexAttrib4Nbv\nGLAD_API_CALL PFNGLVERTEXATTRIB4NIVPROC glad_glVertexAttrib4Niv;\n#define glVertexAttrib4Niv glad_glVertexAttrib4Niv\nGLAD_API_CALL PFNGLVERTEXATTRIB4NSVPROC glad_glVertexAttrib4Nsv;\n#define glVertexAttrib4Nsv glad_glVertexAttrib4Nsv\nGLAD_API_CALL PFNGLVERTEXATTRIB4NUBPROC glad_glVertexAttrib4Nub;\n#define glVertexAttrib4Nub glad_glVertexAttrib4Nub\nGLAD_API_CALL PFNGLVERTEXATTRIB4NUBVPROC glad_glVertexAttrib4Nubv;\n#define glVertexAttrib4Nubv glad_glVertexAttrib4Nubv\nGLAD_API_CALL PFNGLVERTEXATTRIB4NUIVPROC glad_glVertexAttrib4Nuiv;\n#define glVertexAttrib4Nuiv glad_glVertexAttrib4Nuiv\nGLAD_API_CALL PFNGLVERTEXATTRIB4NUSVPROC glad_glVertexAttrib4Nusv;\n#define glVertexAttrib4Nusv glad_glVertexAttrib4Nusv\nGLAD_API_CALL PFNGLVERTEXATTRIB4BVPROC glad_glVertexAttrib4bv;\n#define glVertexAttrib4bv glad_glVertexAttrib4bv\nGLAD_API_CALL PFNGLVERTEXATTRIB4DPROC glad_glVertexAttrib4d;\n#define glVertexAttrib4d glad_glVertexAttrib4d\nGLAD_API_CALL PFNGLVERTEXATTRIB4DVPROC glad_glVertexAttrib4dv;\n#define glVertexAttrib4dv glad_glVertexAttrib4dv\nGLAD_API_CALL PFNGLVERTEXATTRIB4FPROC glad_glVertexAttrib4f;\n#define glVertexAttrib4f glad_glVertexAttrib4f\nGLAD_API_CALL PFNGLVERTEXATTRIB4FVPROC glad_glVertexAttrib4fv;\n#define glVertexAttrib4fv glad_glVertexAttrib4fv\nGLAD_API_CALL PFNGLVERTEXATTRIB4IVPROC glad_glVertexAttrib4iv;\n#define glVertexAttrib4iv glad_glVertexAttrib4iv\nGLAD_API_CALL PFNGLVERTEXATTRIB4SPROC glad_glVertexAttrib4s;\n#define glVertexAttrib4s glad_glVertexAttrib4s\nGLAD_API_CALL PFNGLVERTEXATTRIB4SVPROC glad_glVertexAttrib4sv;\n#define glVertexAttrib4sv glad_glVertexAttrib4sv\nGLAD_API_CALL PFNGLVERTEXATTRIB4UBVPROC glad_glVertexAttrib4ubv;\n#define glVertexAttrib4ubv glad_glVertexAttrib4ubv\nGLAD_API_CALL PFNGLVERTEXATTRIB4UIVPROC glad_glVertexAttrib4uiv;\n#define glVertexAttrib4uiv glad_glVertexAttrib4uiv\nGLAD_API_CALL PFNGLVERTEXATTRIB4USVPROC glad_glVertexAttrib4usv;\n#define glVertexAttrib4usv glad_glVertexAttrib4usv\nGLAD_API_CALL PFNGLVERTEXATTRIBDIVISORPROC glad_glVertexAttribDivisor;\n#define glVertexAttribDivisor glad_glVertexAttribDivisor\nGLAD_API_CALL PFNGLVERTEXATTRIBI1IPROC glad_glVertexAttribI1i;\n#define glVertexAttribI1i glad_glVertexAttribI1i\nGLAD_API_CALL PFNGLVERTEXATTRIBI1IVPROC glad_glVertexAttribI1iv;\n#define glVertexAttribI1iv glad_glVertexAttribI1iv\nGLAD_API_CALL PFNGLVERTEXATTRIBI1UIPROC glad_glVertexAttribI1ui;\n#define glVertexAttribI1ui glad_glVertexAttribI1ui\nGLAD_API_CALL PFNGLVERTEXATTRIBI1UIVPROC glad_glVertexAttribI1uiv;\n#define glVertexAttribI1uiv glad_glVertexAttribI1uiv\nGLAD_API_CALL PFNGLVERTEXATTRIBI2IPROC glad_glVertexAttribI2i;\n#define glVertexAttribI2i glad_glVertexAttribI2i\nGLAD_API_CALL PFNGLVERTEXATTRIBI2IVPROC glad_glVertexAttribI2iv;\n#define glVertexAttribI2iv glad_glVertexAttribI2iv\nGLAD_API_CALL PFNGLVERTEXATTRIBI2UIPROC glad_glVertexAttribI2ui;\n#define glVertexAttribI2ui glad_glVertexAttribI2ui\nGLAD_API_CALL PFNGLVERTEXATTRIBI2UIVPROC glad_glVertexAttribI2uiv;\n#define glVertexAttribI2uiv glad_glVertexAttribI2uiv\nGLAD_API_CALL PFNGLVERTEXATTRIBI3IPROC glad_glVertexAttribI3i;\n#define glVertexAttribI3i glad_glVertexAttribI3i\nGLAD_API_CALL PFNGLVERTEXATTRIBI3IVPROC glad_glVertexAttribI3iv;\n#define glVertexAttribI3iv glad_glVertexAttribI3iv\nGLAD_API_CALL PFNGLVERTEXATTRIBI3UIPROC glad_glVertexAttribI3ui;\n#define glVertexAttribI3ui glad_glVertexAttribI3ui\nGLAD_API_CALL PFNGLVERTEXATTRIBI3UIVPROC glad_glVertexAttribI3uiv;\n#define glVertexAttribI3uiv glad_glVertexAttribI3uiv\nGLAD_API_CALL PFNGLVERTEXATTRIBI4BVPROC glad_glVertexAttribI4bv;\n#define glVertexAttribI4bv glad_glVertexAttribI4bv\nGLAD_API_CALL PFNGLVERTEXATTRIBI4IPROC glad_glVertexAttribI4i;\n#define glVertexAttribI4i glad_glVertexAttribI4i\nGLAD_API_CALL PFNGLVERTEXATTRIBI4IVPROC glad_glVertexAttribI4iv;\n#define glVertexAttribI4iv glad_glVertexAttribI4iv\nGLAD_API_CALL PFNGLVERTEXATTRIBI4SVPROC glad_glVertexAttribI4sv;\n#define glVertexAttribI4sv glad_glVertexAttribI4sv\nGLAD_API_CALL PFNGLVERTEXATTRIBI4UBVPROC glad_glVertexAttribI4ubv;\n#define glVertexAttribI4ubv glad_glVertexAttribI4ubv\nGLAD_API_CALL PFNGLVERTEXATTRIBI4UIPROC glad_glVertexAttribI4ui;\n#define glVertexAttribI4ui glad_glVertexAttribI4ui\nGLAD_API_CALL PFNGLVERTEXATTRIBI4UIVPROC glad_glVertexAttribI4uiv;\n#define glVertexAttribI4uiv glad_glVertexAttribI4uiv\nGLAD_API_CALL PFNGLVERTEXATTRIBI4USVPROC glad_glVertexAttribI4usv;\n#define glVertexAttribI4usv glad_glVertexAttribI4usv\nGLAD_API_CALL PFNGLVERTEXATTRIBIPOINTERPROC glad_glVertexAttribIPointer;\n#define glVertexAttribIPointer glad_glVertexAttribIPointer\nGLAD_API_CALL PFNGLVERTEXATTRIBP1UIPROC glad_glVertexAttribP1ui;\n#define glVertexAttribP1ui glad_glVertexAttribP1ui\nGLAD_API_CALL PFNGLVERTEXATTRIBP1UIVPROC glad_glVertexAttribP1uiv;\n#define glVertexAttribP1uiv glad_glVertexAttribP1uiv\nGLAD_API_CALL PFNGLVERTEXATTRIBP2UIPROC glad_glVertexAttribP2ui;\n#define glVertexAttribP2ui glad_glVertexAttribP2ui\nGLAD_API_CALL PFNGLVERTEXATTRIBP2UIVPROC glad_glVertexAttribP2uiv;\n#define glVertexAttribP2uiv glad_glVertexAttribP2uiv\nGLAD_API_CALL PFNGLVERTEXATTRIBP3UIPROC glad_glVertexAttribP3ui;\n#define glVertexAttribP3ui glad_glVertexAttribP3ui\nGLAD_API_CALL PFNGLVERTEXATTRIBP3UIVPROC glad_glVertexAttribP3uiv;\n#define glVertexAttribP3uiv glad_glVertexAttribP3uiv\nGLAD_API_CALL PFNGLVERTEXATTRIBP4UIPROC glad_glVertexAttribP4ui;\n#define glVertexAttribP4ui glad_glVertexAttribP4ui\nGLAD_API_CALL PFNGLVERTEXATTRIBP4UIVPROC glad_glVertexAttribP4uiv;\n#define glVertexAttribP4uiv glad_glVertexAttribP4uiv\nGLAD_API_CALL PFNGLVERTEXATTRIBPOINTERPROC glad_glVertexAttribPointer;\n#define glVertexAttribPointer glad_glVertexAttribPointer\nGLAD_API_CALL PFNGLVERTEXP2UIPROC glad_glVertexP2ui;\n#define glVertexP2ui glad_glVertexP2ui\nGLAD_API_CALL PFNGLVERTEXP2UIVPROC glad_glVertexP2uiv;\n#define glVertexP2uiv glad_glVertexP2uiv\nGLAD_API_CALL PFNGLVERTEXP3UIPROC glad_glVertexP3ui;\n#define glVertexP3ui glad_glVertexP3ui\nGLAD_API_CALL PFNGLVERTEXP3UIVPROC glad_glVertexP3uiv;\n#define glVertexP3uiv glad_glVertexP3uiv\nGLAD_API_CALL PFNGLVERTEXP4UIPROC glad_glVertexP4ui;\n#define glVertexP4ui glad_glVertexP4ui\nGLAD_API_CALL PFNGLVERTEXP4UIVPROC glad_glVertexP4uiv;\n#define glVertexP4uiv glad_glVertexP4uiv\nGLAD_API_CALL PFNGLVERTEXPOINTERPROC glad_glVertexPointer;\n#define glVertexPointer glad_glVertexPointer\nGLAD_API_CALL PFNGLVIEWPORTPROC glad_glViewport;\n#define glViewport glad_glViewport\nGLAD_API_CALL PFNGLWAITSYNCPROC glad_glWaitSync;\n#define glWaitSync glad_glWaitSync\nGLAD_API_CALL PFNGLWINDOWPOS2DPROC glad_glWindowPos2d;\n#define glWindowPos2d glad_glWindowPos2d\nGLAD_API_CALL PFNGLWINDOWPOS2DVPROC glad_glWindowPos2dv;\n#define glWindowPos2dv glad_glWindowPos2dv\nGLAD_API_CALL PFNGLWINDOWPOS2FPROC glad_glWindowPos2f;\n#define glWindowPos2f glad_glWindowPos2f\nGLAD_API_CALL PFNGLWINDOWPOS2FVPROC glad_glWindowPos2fv;\n#define glWindowPos2fv glad_glWindowPos2fv\nGLAD_API_CALL PFNGLWINDOWPOS2IPROC glad_glWindowPos2i;\n#define glWindowPos2i glad_glWindowPos2i\nGLAD_API_CALL PFNGLWINDOWPOS2IVPROC glad_glWindowPos2iv;\n#define glWindowPos2iv glad_glWindowPos2iv\nGLAD_API_CALL PFNGLWINDOWPOS2SPROC glad_glWindowPos2s;\n#define glWindowPos2s glad_glWindowPos2s\nGLAD_API_CALL PFNGLWINDOWPOS2SVPROC glad_glWindowPos2sv;\n#define glWindowPos2sv glad_glWindowPos2sv\nGLAD_API_CALL PFNGLWINDOWPOS3DPROC glad_glWindowPos3d;\n#define glWindowPos3d glad_glWindowPos3d\nGLAD_API_CALL PFNGLWINDOWPOS3DVPROC glad_glWindowPos3dv;\n#define glWindowPos3dv glad_glWindowPos3dv\nGLAD_API_CALL PFNGLWINDOWPOS3FPROC glad_glWindowPos3f;\n#define glWindowPos3f glad_glWindowPos3f\nGLAD_API_CALL PFNGLWINDOWPOS3FVPROC glad_glWindowPos3fv;\n#define glWindowPos3fv glad_glWindowPos3fv\nGLAD_API_CALL PFNGLWINDOWPOS3IPROC glad_glWindowPos3i;\n#define glWindowPos3i glad_glWindowPos3i\nGLAD_API_CALL PFNGLWINDOWPOS3IVPROC glad_glWindowPos3iv;\n#define glWindowPos3iv glad_glWindowPos3iv\nGLAD_API_CALL PFNGLWINDOWPOS3SPROC glad_glWindowPos3s;\n#define glWindowPos3s glad_glWindowPos3s\nGLAD_API_CALL PFNGLWINDOWPOS3SVPROC glad_glWindowPos3sv;\n#define glWindowPos3sv glad_glWindowPos3sv\n\n\nGLAD_API_CALL int gladLoadGLUserPtr( GLADuserptrloadfunc load, void *userptr);\nGLAD_API_CALL int gladLoadGL( GLADloadfunc load);\n\n\n\n\n\n\n#ifdef __cplusplus\n}\n#endif\n#endif\n"
  },
  {
    "path": "thirdparty/glfw/deps/glad/khrplatform.h",
    "content": "#ifndef __khrplatform_h_\n#define __khrplatform_h_\n\n/*\n** Copyright (c) 2008-2018 The Khronos Group Inc.\n**\n** Permission is hereby granted, free of charge, to any person obtaining a\n** copy of this software and/or associated documentation files (the\n** \"Materials\"), to deal in the Materials without restriction, including\n** without limitation the rights to use, copy, modify, merge, publish,\n** distribute, sublicense, and/or sell copies of the Materials, and to\n** permit persons to whom the Materials are furnished to do so, subject to\n** the following conditions:\n**\n** The above copyright notice and this permission notice shall be included\n** in all copies or substantial portions of the Materials.\n**\n** THE MATERIALS ARE PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\n** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\n** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\n** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.\n*/\n\n/* Khronos platform-specific types and definitions.\n *\n * The master copy of khrplatform.h is maintained in the Khronos EGL\n * Registry repository at https://github.com/KhronosGroup/EGL-Registry\n * The last semantic modification to khrplatform.h was at commit ID:\n *      67a3e0864c2d75ea5287b9f3d2eb74a745936692\n *\n * Adopters may modify this file to suit their platform. Adopters are\n * encouraged to submit platform specific modifications to the Khronos\n * group so that they can be included in future versions of this file.\n * Please submit changes by filing pull requests or issues on\n * the EGL Registry repository linked above.\n *\n *\n * See the Implementer's Guidelines for information about where this file\n * should be located on your system and for more details of its use:\n *    http://www.khronos.org/registry/implementers_guide.pdf\n *\n * This file should be included as\n *        #include <KHR/khrplatform.h>\n * by Khronos client API header files that use its types and defines.\n *\n * The types in khrplatform.h should only be used to define API-specific types.\n *\n * Types defined in khrplatform.h:\n *    khronos_int8_t              signed   8  bit\n *    khronos_uint8_t             unsigned 8  bit\n *    khronos_int16_t             signed   16 bit\n *    khronos_uint16_t            unsigned 16 bit\n *    khronos_int32_t             signed   32 bit\n *    khronos_uint32_t            unsigned 32 bit\n *    khronos_int64_t             signed   64 bit\n *    khronos_uint64_t            unsigned 64 bit\n *    khronos_intptr_t            signed   same number of bits as a pointer\n *    khronos_uintptr_t           unsigned same number of bits as a pointer\n *    khronos_ssize_t             signed   size\n *    khronos_usize_t             unsigned size\n *    khronos_float_t             signed   32 bit floating point\n *    khronos_time_ns_t           unsigned 64 bit time in nanoseconds\n *    khronos_utime_nanoseconds_t unsigned time interval or absolute time in\n *                                         nanoseconds\n *    khronos_stime_nanoseconds_t signed time interval in nanoseconds\n *    khronos_boolean_enum_t      enumerated boolean type. This should\n *      only be used as a base type when a client API's boolean type is\n *      an enum. Client APIs which use an integer or other type for\n *      booleans cannot use this as the base type for their boolean.\n *\n * Tokens defined in khrplatform.h:\n *\n *    KHRONOS_FALSE, KHRONOS_TRUE Enumerated boolean false/true values.\n *\n *    KHRONOS_SUPPORT_INT64 is 1 if 64 bit integers are supported; otherwise 0.\n *    KHRONOS_SUPPORT_FLOAT is 1 if floats are supported; otherwise 0.\n *\n * Calling convention macros defined in this file:\n *    KHRONOS_APICALL\n *    KHRONOS_APIENTRY\n *    KHRONOS_APIATTRIBUTES\n *\n * These may be used in function prototypes as:\n *\n *      KHRONOS_APICALL void KHRONOS_APIENTRY funcname(\n *                                  int arg1,\n *                                  int arg2) KHRONOS_APIATTRIBUTES;\n */\n\n/*-------------------------------------------------------------------------\n * Definition of KHRONOS_APICALL\n *-------------------------------------------------------------------------\n * This precedes the return type of the function in the function prototype.\n */\n#if defined(_WIN32) && !defined(__SCITECH_SNAP__)\n#   define KHRONOS_APICALL __declspec(dllimport)\n#elif defined (__SYMBIAN32__)\n#   define KHRONOS_APICALL IMPORT_C\n#elif defined(__ANDROID__)\n#   define KHRONOS_APICALL __attribute__((visibility(\"default\")))\n#else\n#   define KHRONOS_APICALL\n#endif\n\n/*-------------------------------------------------------------------------\n * Definition of KHRONOS_APIENTRY\n *-------------------------------------------------------------------------\n * This follows the return type of the function  and precedes the function\n * name in the function prototype.\n */\n#if defined(_WIN32) && !defined(_WIN32_WCE) && !defined(__SCITECH_SNAP__)\n    /* Win32 but not WinCE */\n#   define KHRONOS_APIENTRY __stdcall\n#else\n#   define KHRONOS_APIENTRY\n#endif\n\n/*-------------------------------------------------------------------------\n * Definition of KHRONOS_APIATTRIBUTES\n *-------------------------------------------------------------------------\n * This follows the closing parenthesis of the function prototype arguments.\n */\n#if defined (__ARMCC_2__)\n#define KHRONOS_APIATTRIBUTES __softfp\n#else\n#define KHRONOS_APIATTRIBUTES\n#endif\n\n/*-------------------------------------------------------------------------\n * basic type definitions\n *-----------------------------------------------------------------------*/\n#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(__GNUC__) || defined(__SCO__) || defined(__USLC__)\n\n\n/*\n * Using <stdint.h>\n */\n#include <stdint.h>\ntypedef int32_t                 khronos_int32_t;\ntypedef uint32_t                khronos_uint32_t;\ntypedef int64_t                 khronos_int64_t;\ntypedef uint64_t                khronos_uint64_t;\n#define KHRONOS_SUPPORT_INT64   1\n#define KHRONOS_SUPPORT_FLOAT   1\n\n#elif defined(__VMS ) || defined(__sgi)\n\n/*\n * Using <inttypes.h>\n */\n#include <inttypes.h>\ntypedef int32_t                 khronos_int32_t;\ntypedef uint32_t                khronos_uint32_t;\ntypedef int64_t                 khronos_int64_t;\ntypedef uint64_t                khronos_uint64_t;\n#define KHRONOS_SUPPORT_INT64   1\n#define KHRONOS_SUPPORT_FLOAT   1\n\n#elif defined(_WIN32) && !defined(__SCITECH_SNAP__)\n\n/*\n * Win32\n */\ntypedef __int32                 khronos_int32_t;\ntypedef unsigned __int32        khronos_uint32_t;\ntypedef __int64                 khronos_int64_t;\ntypedef unsigned __int64        khronos_uint64_t;\n#define KHRONOS_SUPPORT_INT64   1\n#define KHRONOS_SUPPORT_FLOAT   1\n\n#elif defined(__sun__) || defined(__digital__)\n\n/*\n * Sun or Digital\n */\ntypedef int                     khronos_int32_t;\ntypedef unsigned int            khronos_uint32_t;\n#if defined(__arch64__) || defined(_LP64)\ntypedef long int                khronos_int64_t;\ntypedef unsigned long int       khronos_uint64_t;\n#else\ntypedef long long int           khronos_int64_t;\ntypedef unsigned long long int  khronos_uint64_t;\n#endif /* __arch64__ */\n#define KHRONOS_SUPPORT_INT64   1\n#define KHRONOS_SUPPORT_FLOAT   1\n\n#elif 0\n\n/*\n * Hypothetical platform with no float or int64 support\n */\ntypedef int                     khronos_int32_t;\ntypedef unsigned int            khronos_uint32_t;\n#define KHRONOS_SUPPORT_INT64   0\n#define KHRONOS_SUPPORT_FLOAT   0\n\n#else\n\n/*\n * Generic fallback\n */\n#include <stdint.h>\ntypedef int32_t                 khronos_int32_t;\ntypedef uint32_t                khronos_uint32_t;\ntypedef int64_t                 khronos_int64_t;\ntypedef uint64_t                khronos_uint64_t;\n#define KHRONOS_SUPPORT_INT64   1\n#define KHRONOS_SUPPORT_FLOAT   1\n\n#endif\n\n\n/*\n * Types that are (so far) the same on all platforms\n */\ntypedef signed   char          khronos_int8_t;\ntypedef unsigned char          khronos_uint8_t;\ntypedef signed   short int     khronos_int16_t;\ntypedef unsigned short int     khronos_uint16_t;\n\n/*\n * Types that differ between LLP64 and LP64 architectures - in LLP64,\n * pointers are 64 bits, but 'long' is still 32 bits. Win64 appears\n * to be the only LLP64 architecture in current use.\n */\n#ifdef _WIN64\ntypedef signed   long long int khronos_intptr_t;\ntypedef unsigned long long int khronos_uintptr_t;\ntypedef signed   long long int khronos_ssize_t;\ntypedef unsigned long long int khronos_usize_t;\n#else\ntypedef signed   long  int     khronos_intptr_t;\ntypedef unsigned long  int     khronos_uintptr_t;\ntypedef signed   long  int     khronos_ssize_t;\ntypedef unsigned long  int     khronos_usize_t;\n#endif\n\n#if KHRONOS_SUPPORT_FLOAT\n/*\n * Float type\n */\ntypedef          float         khronos_float_t;\n#endif\n\n#if KHRONOS_SUPPORT_INT64\n/* Time types\n *\n * These types can be used to represent a time interval in nanoseconds or\n * an absolute Unadjusted System Time.  Unadjusted System Time is the number\n * of nanoseconds since some arbitrary system event (e.g. since the last\n * time the system booted).  The Unadjusted System Time is an unsigned\n * 64 bit value that wraps back to 0 every 584 years.  Time intervals\n * may be either signed or unsigned.\n */\ntypedef khronos_uint64_t       khronos_utime_nanoseconds_t;\ntypedef khronos_int64_t        khronos_stime_nanoseconds_t;\n#endif\n\n/*\n * Dummy value used to pad enum types to 32 bits.\n */\n#ifndef KHRONOS_MAX_ENUM\n#define KHRONOS_MAX_ENUM 0x7FFFFFFF\n#endif\n\n/*\n * Enumerated boolean type\n *\n * Values other than zero should be considered to be true.  Therefore\n * comparisons should not be made against KHRONOS_TRUE.\n */\ntypedef enum {\n    KHRONOS_FALSE = 0,\n    KHRONOS_TRUE  = 1,\n    KHRONOS_BOOLEAN_ENUM_FORCE_SIZE = KHRONOS_MAX_ENUM\n} khronos_boolean_enum_t;\n\n#endif /* __khrplatform_h_ */\n"
  },
  {
    "path": "thirdparty/glfw/deps/glad/vk_platform.h",
    "content": "/* */\n/* File: vk_platform.h */\n/* */\n/*\n** Copyright (c) 2014-2017 The Khronos Group Inc.\n**\n** Licensed under the Apache License, Version 2.0 (the \"License\");\n** you may not use this file except in compliance with the License.\n** You may obtain a copy of the License at\n**\n**     http://www.apache.org/licenses/LICENSE-2.0\n**\n** Unless required by applicable law or agreed to in writing, software\n** distributed under the License is distributed on an \"AS IS\" BASIS,\n** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n** See the License for the specific language governing permissions and\n** limitations under the License.\n*/\n\n\n#ifndef VK_PLATFORM_H_\n#define VK_PLATFORM_H_\n\n#ifdef __cplusplus\nextern \"C\"\n{\n#endif /* __cplusplus */\n\n/*\n***************************************************************************************************\n*   Platform-specific directives and type declarations\n***************************************************************************************************\n*/\n\n/* Platform-specific calling convention macros.\n *\n * Platforms should define these so that Vulkan clients call Vulkan commands\n * with the same calling conventions that the Vulkan implementation expects.\n *\n * VKAPI_ATTR - Placed before the return type in function declarations.\n *              Useful for C++11 and GCC/Clang-style function attribute syntax.\n * VKAPI_CALL - Placed after the return type in function declarations.\n *              Useful for MSVC-style calling convention syntax.\n * VKAPI_PTR  - Placed between the '(' and '*' in function pointer types.\n *\n * Function declaration:  VKAPI_ATTR void VKAPI_CALL vkCommand(void);\n * Function pointer type: typedef void (VKAPI_PTR *PFN_vkCommand)(void);\n */\n#if defined(_WIN32)\n    /* On Windows, Vulkan commands use the stdcall convention */\n    #define VKAPI_ATTR\n    #define VKAPI_CALL __stdcall\n    #define VKAPI_PTR  VKAPI_CALL\n#elif defined(__ANDROID__) && defined(__ARM_ARCH) && __ARM_ARCH < 7\n    #error \"Vulkan isn't supported for the 'armeabi' NDK ABI\"\n#elif defined(__ANDROID__) && defined(__ARM_ARCH) && __ARM_ARCH >= 7 && defined(__ARM_32BIT_STATE)\n    /* On Android 32-bit ARM targets, Vulkan functions use the \"hardfloat\" */\n    /* calling convention, i.e. float parameters are passed in registers. This */\n    /* is true even if the rest of the application passes floats on the stack, */\n    /* as it does by default when compiling for the armeabi-v7a NDK ABI. */\n    #define VKAPI_ATTR __attribute__((pcs(\"aapcs-vfp\")))\n    #define VKAPI_CALL\n    #define VKAPI_PTR  VKAPI_ATTR\n#else\n    /* On other platforms, use the default calling convention */\n    #define VKAPI_ATTR\n    #define VKAPI_CALL\n    #define VKAPI_PTR\n#endif\n\n#include <stddef.h>\n\n#if !defined(VK_NO_STDINT_H)\n    #if defined(_MSC_VER) && (_MSC_VER < 1600)\n        typedef signed   __int8  int8_t;\n        typedef unsigned __int8  uint8_t;\n        typedef signed   __int16 int16_t;\n        typedef unsigned __int16 uint16_t;\n        typedef signed   __int32 int32_t;\n        typedef unsigned __int32 uint32_t;\n        typedef signed   __int64 int64_t;\n        typedef unsigned __int64 uint64_t;\n    #else\n        #include <stdint.h>\n    #endif\n#endif /* !defined(VK_NO_STDINT_H) */\n\n#ifdef __cplusplus\n} /* extern \"C\" */\n#endif /* __cplusplus */\n\n#endif\n"
  },
  {
    "path": "thirdparty/glfw/deps/glad/vulkan.h",
    "content": "/**\n * Loader generated by glad 2.0.0-beta on Sun Apr 14 17:03:38 2019\n *\n * Generator: C/C++\n * Specification: vk\n * Extensions: 3\n *\n * APIs:\n *  - vulkan=1.1\n *\n * Options:\n *  - MX_GLOBAL = False\n *  - LOADER = False\n *  - ALIAS = False\n *  - HEADER_ONLY = False\n *  - DEBUG = False\n *  - MX = False\n *\n * Commandline:\n *    --api='vulkan=1.1' --extensions='VK_EXT_debug_report,VK_KHR_surface,VK_KHR_swapchain' c\n *\n * Online:\n *    http://glad.sh/#api=vulkan%3D1.1&extensions=VK_EXT_debug_report%2CVK_KHR_surface%2CVK_KHR_swapchain&generator=c&options=\n *\n */\n\n#ifndef GLAD_VULKAN_H_\n#define GLAD_VULKAN_H_\n\n#ifdef VULKAN_H_\n    #error  header already included (API: vulkan), remove previous include!\n#endif\n#define VULKAN_H_ 1\n\n#ifdef VULKAN_CORE_H_\n    #error  header already included (API: vulkan), remove previous include!\n#endif\n#define VULKAN_CORE_H_ 1\n\n\n#define GLAD_VULKAN\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n#ifndef GLAD_PLATFORM_H_\n#define GLAD_PLATFORM_H_\n\n#ifndef GLAD_PLATFORM_WIN32\n  #if defined(_WIN32) || defined(__WIN32__) || defined(WIN32) || defined(__MINGW32__)\n    #define GLAD_PLATFORM_WIN32 1\n  #else\n    #define GLAD_PLATFORM_WIN32 0\n  #endif\n#endif\n\n#ifndef GLAD_PLATFORM_APPLE\n  #ifdef __APPLE__\n    #define GLAD_PLATFORM_APPLE 1\n  #else\n    #define GLAD_PLATFORM_APPLE 0\n  #endif\n#endif\n\n#ifndef GLAD_PLATFORM_EMSCRIPTEN\n  #ifdef __EMSCRIPTEN__\n    #define GLAD_PLATFORM_EMSCRIPTEN 1\n  #else\n    #define GLAD_PLATFORM_EMSCRIPTEN 0\n  #endif\n#endif\n\n#ifndef GLAD_PLATFORM_UWP\n  #if defined(_MSC_VER) && !defined(GLAD_INTERNAL_HAVE_WINAPIFAMILY)\n    #ifdef __has_include\n      #if __has_include(<winapifamily.h>)\n        #define GLAD_INTERNAL_HAVE_WINAPIFAMILY 1\n      #endif\n    #elif _MSC_VER >= 1700 && !_USING_V110_SDK71_\n      #define GLAD_INTERNAL_HAVE_WINAPIFAMILY 1\n    #endif\n  #endif\n\n  #ifdef GLAD_INTERNAL_HAVE_WINAPIFAMILY\n    #include <winapifamily.h>\n    #if !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) && WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)\n      #define GLAD_PLATFORM_UWP 1\n    #endif\n  #endif\n\n  #ifndef GLAD_PLATFORM_UWP\n    #define GLAD_PLATFORM_UWP 0\n  #endif\n#endif\n\n#ifdef __GNUC__\n  #define GLAD_GNUC_EXTENSION __extension__\n#else\n  #define GLAD_GNUC_EXTENSION\n#endif\n\n#ifndef GLAD_API_CALL\n  #if defined(GLAD_API_CALL_EXPORT)\n    #if GLAD_PLATFORM_WIN32 || defined(__CYGWIN__)\n      #if defined(GLAD_API_CALL_EXPORT_BUILD)\n        #if defined(__GNUC__)\n          #define GLAD_API_CALL __attribute__ ((dllexport)) extern\n        #else\n          #define GLAD_API_CALL __declspec(dllexport) extern\n        #endif\n      #else\n        #if defined(__GNUC__)\n          #define GLAD_API_CALL __attribute__ ((dllimport)) extern\n        #else\n          #define GLAD_API_CALL __declspec(dllimport) extern\n        #endif\n      #endif\n    #elif defined(__GNUC__) && defined(GLAD_API_CALL_EXPORT_BUILD)\n      #define GLAD_API_CALL __attribute__ ((visibility (\"default\"))) extern\n    #else\n      #define GLAD_API_CALL extern\n    #endif\n  #else\n    #define GLAD_API_CALL extern\n  #endif\n#endif\n\n#ifdef APIENTRY\n  #define GLAD_API_PTR APIENTRY\n#elif GLAD_PLATFORM_WIN32\n  #define GLAD_API_PTR __stdcall\n#else\n  #define GLAD_API_PTR\n#endif\n\n#ifndef GLAPI\n#define GLAPI GLAD_API_CALL\n#endif\n\n#ifndef GLAPIENTRY\n#define GLAPIENTRY GLAD_API_PTR\n#endif\n\n\n#define GLAD_MAKE_VERSION(major, minor) (major * 10000 + minor)\n#define GLAD_VERSION_MAJOR(version) (version / 10000)\n#define GLAD_VERSION_MINOR(version) (version % 10000)\n\ntypedef void (*GLADapiproc)(void);\n\ntypedef GLADapiproc (*GLADloadfunc)(const char *name);\ntypedef GLADapiproc (*GLADuserptrloadfunc)(const char *name, void *userptr);\n\ntypedef void (*GLADprecallback)(const char *name, GLADapiproc apiproc, int len_args, ...);\ntypedef void (*GLADpostcallback)(void *ret, const char *name, GLADapiproc apiproc, int len_args, ...);\n\n#endif /* GLAD_PLATFORM_H_ */\n\n#define VK_ATTACHMENT_UNUSED (~0U)\n#define VK_EXT_DEBUG_REPORT_EXTENSION_NAME \"VK_EXT_debug_report\"\n#define VK_EXT_DEBUG_REPORT_SPEC_VERSION 9\n#define VK_FALSE 0\n#define VK_KHR_SURFACE_EXTENSION_NAME \"VK_KHR_surface\"\n#define VK_KHR_SURFACE_SPEC_VERSION 25\n#define VK_KHR_SWAPCHAIN_EXTENSION_NAME \"VK_KHR_swapchain\"\n#define VK_KHR_SWAPCHAIN_SPEC_VERSION 70\n#define VK_LOD_CLAMP_NONE 1000.0f\n#define VK_LUID_SIZE 8\n#define VK_MAX_DESCRIPTION_SIZE 256\n#define VK_MAX_DEVICE_GROUP_SIZE 32\n#define VK_MAX_EXTENSION_NAME_SIZE 256\n#define VK_MAX_MEMORY_HEAPS 16\n#define VK_MAX_MEMORY_TYPES 32\n#define VK_MAX_PHYSICAL_DEVICE_NAME_SIZE 256\n#define VK_QUEUE_FAMILY_EXTERNAL (~0U-1)\n#define VK_QUEUE_FAMILY_IGNORED (~0U)\n#define VK_REMAINING_ARRAY_LAYERS (~0U)\n#define VK_REMAINING_MIP_LEVELS (~0U)\n#define VK_SUBPASS_EXTERNAL (~0U)\n#define VK_TRUE 1\n#define VK_UUID_SIZE 16\n#define VK_WHOLE_SIZE (~0ULL)\n\n\n#include <glad/vk_platform.h>\n#define VK_MAKE_VERSION(major, minor, patch) \\\n    (((major) << 22) | ((minor) << 12) | (patch))\n#define VK_VERSION_MAJOR(version) ((uint32_t)(version) >> 22)\n#define VK_VERSION_MINOR(version) (((uint32_t)(version) >> 12) & 0x3ff)\n#define VK_VERSION_PATCH(version) ((uint32_t)(version) & 0xfff)\n/* DEPRECATED: This define has been removed. Specific version defines (e.g. VK_API_VERSION_1_0), or the VK_MAKE_VERSION macro, should be used instead. */\n/*#define VK_API_VERSION VK_MAKE_VERSION(1, 0, 0) // Patch version should always be set to 0 */\n/* Vulkan 1.0 version number */\n#define VK_API_VERSION_1_0 VK_MAKE_VERSION(1, 0, 0)/* Patch version should always be set to 0 */\n/* Vulkan 1.1 version number */\n#define VK_API_VERSION_1_1 VK_MAKE_VERSION(1, 1, 0)/* Patch version should always be set to 0 */\n/* Version of this file */\n#define VK_HEADER_VERSION 106\n#define VK_DEFINE_HANDLE(object) typedef struct object##_T* object;\n#if !defined(VK_DEFINE_NON_DISPATCHABLE_HANDLE)\n#if defined(__LP64__) || defined(_WIN64) || (defined(__x86_64__) && !defined(__ILP32__) ) || defined(_M_X64) || defined(__ia64) || defined (_M_IA64) || defined(__aarch64__) || defined(__powerpc64__)\n        #define VK_DEFINE_NON_DISPATCHABLE_HANDLE(object) typedef struct object##_T *object;\n#else\n        #define VK_DEFINE_NON_DISPATCHABLE_HANDLE(object) typedef uint64_t object;\n#endif\n#endif\n#define VK_NULL_HANDLE 0\n\n\n\n\n\n\n\n\nVK_DEFINE_HANDLE(VkInstance)\nVK_DEFINE_HANDLE(VkPhysicalDevice)\nVK_DEFINE_HANDLE(VkDevice)\nVK_DEFINE_HANDLE(VkQueue)\nVK_DEFINE_HANDLE(VkCommandBuffer)\nVK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDeviceMemory)\nVK_DEFINE_NON_DISPATCHABLE_HANDLE(VkCommandPool)\nVK_DEFINE_NON_DISPATCHABLE_HANDLE(VkBuffer)\nVK_DEFINE_NON_DISPATCHABLE_HANDLE(VkBufferView)\nVK_DEFINE_NON_DISPATCHABLE_HANDLE(VkImage)\nVK_DEFINE_NON_DISPATCHABLE_HANDLE(VkImageView)\nVK_DEFINE_NON_DISPATCHABLE_HANDLE(VkShaderModule)\nVK_DEFINE_NON_DISPATCHABLE_HANDLE(VkPipeline)\nVK_DEFINE_NON_DISPATCHABLE_HANDLE(VkPipelineLayout)\nVK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSampler)\nVK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDescriptorSet)\nVK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDescriptorSetLayout)\nVK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDescriptorPool)\nVK_DEFINE_NON_DISPATCHABLE_HANDLE(VkFence)\nVK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSemaphore)\nVK_DEFINE_NON_DISPATCHABLE_HANDLE(VkEvent)\nVK_DEFINE_NON_DISPATCHABLE_HANDLE(VkQueryPool)\nVK_DEFINE_NON_DISPATCHABLE_HANDLE(VkFramebuffer)\nVK_DEFINE_NON_DISPATCHABLE_HANDLE(VkRenderPass)\nVK_DEFINE_NON_DISPATCHABLE_HANDLE(VkPipelineCache)\nVK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDescriptorUpdateTemplate)\nVK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSamplerYcbcrConversion)\nVK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSurfaceKHR)\nVK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSwapchainKHR)\nVK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDebugReportCallbackEXT)\ntypedef enum VkAttachmentLoadOp {\n    VK_ATTACHMENT_LOAD_OP_LOAD = 0,\n    VK_ATTACHMENT_LOAD_OP_CLEAR = 1,\n    VK_ATTACHMENT_LOAD_OP_DONT_CARE = 2\n} VkAttachmentLoadOp;\ntypedef enum VkAttachmentStoreOp {\n    VK_ATTACHMENT_STORE_OP_STORE = 0,\n    VK_ATTACHMENT_STORE_OP_DONT_CARE = 1\n} VkAttachmentStoreOp;\ntypedef enum VkBlendFactor {\n    VK_BLEND_FACTOR_ZERO = 0,\n    VK_BLEND_FACTOR_ONE = 1,\n    VK_BLEND_FACTOR_SRC_COLOR = 2,\n    VK_BLEND_FACTOR_ONE_MINUS_SRC_COLOR = 3,\n    VK_BLEND_FACTOR_DST_COLOR = 4,\n    VK_BLEND_FACTOR_ONE_MINUS_DST_COLOR = 5,\n    VK_BLEND_FACTOR_SRC_ALPHA = 6,\n    VK_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA = 7,\n    VK_BLEND_FACTOR_DST_ALPHA = 8,\n    VK_BLEND_FACTOR_ONE_MINUS_DST_ALPHA = 9,\n    VK_BLEND_FACTOR_CONSTANT_COLOR = 10,\n    VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR = 11,\n    VK_BLEND_FACTOR_CONSTANT_ALPHA = 12,\n    VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA = 13,\n    VK_BLEND_FACTOR_SRC_ALPHA_SATURATE = 14,\n    VK_BLEND_FACTOR_SRC1_COLOR = 15,\n    VK_BLEND_FACTOR_ONE_MINUS_SRC1_COLOR = 16,\n    VK_BLEND_FACTOR_SRC1_ALPHA = 17,\n    VK_BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA = 18\n} VkBlendFactor;\ntypedef enum VkBlendOp {\n    VK_BLEND_OP_ADD = 0,\n    VK_BLEND_OP_SUBTRACT = 1,\n    VK_BLEND_OP_REVERSE_SUBTRACT = 2,\n    VK_BLEND_OP_MIN = 3,\n    VK_BLEND_OP_MAX = 4\n} VkBlendOp;\ntypedef enum VkBorderColor {\n    VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK = 0,\n    VK_BORDER_COLOR_INT_TRANSPARENT_BLACK = 1,\n    VK_BORDER_COLOR_FLOAT_OPAQUE_BLACK = 2,\n    VK_BORDER_COLOR_INT_OPAQUE_BLACK = 3,\n    VK_BORDER_COLOR_FLOAT_OPAQUE_WHITE = 4,\n    VK_BORDER_COLOR_INT_OPAQUE_WHITE = 5\n} VkBorderColor;\n\ntypedef enum VkPipelineCacheHeaderVersion {\n    VK_PIPELINE_CACHE_HEADER_VERSION_ONE = 1\n} VkPipelineCacheHeaderVersion;\n\ntypedef enum VkDeviceQueueCreateFlagBits {\n    VK_DEVICE_QUEUE_CREATE_PROTECTED_BIT = 1\n} VkDeviceQueueCreateFlagBits;\ntypedef enum VkBufferCreateFlagBits {\n    VK_BUFFER_CREATE_SPARSE_BINDING_BIT = 1,\n    VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT = 2,\n    VK_BUFFER_CREATE_SPARSE_ALIASED_BIT = 4,\n    VK_BUFFER_CREATE_PROTECTED_BIT = 8\n} VkBufferCreateFlagBits;\ntypedef enum VkBufferUsageFlagBits {\n    VK_BUFFER_USAGE_TRANSFER_SRC_BIT = 1,\n    VK_BUFFER_USAGE_TRANSFER_DST_BIT = 2,\n    VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT = 4,\n    VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT = 8,\n    VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT = 16,\n    VK_BUFFER_USAGE_STORAGE_BUFFER_BIT = 32,\n    VK_BUFFER_USAGE_INDEX_BUFFER_BIT = 64,\n    VK_BUFFER_USAGE_VERTEX_BUFFER_BIT = 128,\n    VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT = 256\n} VkBufferUsageFlagBits;\ntypedef enum VkColorComponentFlagBits {\n    VK_COLOR_COMPONENT_R_BIT = 1,\n    VK_COLOR_COMPONENT_G_BIT = 2,\n    VK_COLOR_COMPONENT_B_BIT = 4,\n    VK_COLOR_COMPONENT_A_BIT = 8\n} VkColorComponentFlagBits;\ntypedef enum VkComponentSwizzle {\n    VK_COMPONENT_SWIZZLE_IDENTITY = 0,\n    VK_COMPONENT_SWIZZLE_ZERO = 1,\n    VK_COMPONENT_SWIZZLE_ONE = 2,\n    VK_COMPONENT_SWIZZLE_R = 3,\n    VK_COMPONENT_SWIZZLE_G = 4,\n    VK_COMPONENT_SWIZZLE_B = 5,\n    VK_COMPONENT_SWIZZLE_A = 6\n} VkComponentSwizzle;\ntypedef enum VkCommandPoolCreateFlagBits {\n    VK_COMMAND_POOL_CREATE_TRANSIENT_BIT = 1,\n    VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT = 2,\n    VK_COMMAND_POOL_CREATE_PROTECTED_BIT = 4\n} VkCommandPoolCreateFlagBits;\ntypedef enum VkCommandPoolResetFlagBits {\n    VK_COMMAND_POOL_RESET_RELEASE_RESOURCES_BIT = 1\n} VkCommandPoolResetFlagBits;\ntypedef enum VkCommandBufferResetFlagBits {\n    VK_COMMAND_BUFFER_RESET_RELEASE_RESOURCES_BIT = 1\n} VkCommandBufferResetFlagBits;\ntypedef enum VkCommandBufferLevel {\n    VK_COMMAND_BUFFER_LEVEL_PRIMARY = 0,\n    VK_COMMAND_BUFFER_LEVEL_SECONDARY = 1\n} VkCommandBufferLevel;\ntypedef enum VkCommandBufferUsageFlagBits {\n    VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT = 1,\n    VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT = 2,\n    VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT = 4\n} VkCommandBufferUsageFlagBits;\ntypedef enum VkCompareOp {\n    VK_COMPARE_OP_NEVER = 0,\n    VK_COMPARE_OP_LESS = 1,\n    VK_COMPARE_OP_EQUAL = 2,\n    VK_COMPARE_OP_LESS_OR_EQUAL = 3,\n    VK_COMPARE_OP_GREATER = 4,\n    VK_COMPARE_OP_NOT_EQUAL = 5,\n    VK_COMPARE_OP_GREATER_OR_EQUAL = 6,\n    VK_COMPARE_OP_ALWAYS = 7\n} VkCompareOp;\ntypedef enum VkCullModeFlagBits {\n    VK_CULL_MODE_NONE = 0,\n    VK_CULL_MODE_FRONT_BIT = 1,\n    VK_CULL_MODE_BACK_BIT = 2,\n    VK_CULL_MODE_FRONT_AND_BACK = 0x00000003\n} VkCullModeFlagBits;\ntypedef enum VkDescriptorType {\n    VK_DESCRIPTOR_TYPE_SAMPLER = 0,\n    VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER = 1,\n    VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE = 2,\n    VK_DESCRIPTOR_TYPE_STORAGE_IMAGE = 3,\n    VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER = 4,\n    VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER = 5,\n    VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER = 6,\n    VK_DESCRIPTOR_TYPE_STORAGE_BUFFER = 7,\n    VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC = 8,\n    VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC = 9,\n    VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT = 10\n} VkDescriptorType;\ntypedef enum VkDynamicState {\n    VK_DYNAMIC_STATE_VIEWPORT = 0,\n    VK_DYNAMIC_STATE_SCISSOR = 1,\n    VK_DYNAMIC_STATE_LINE_WIDTH = 2,\n    VK_DYNAMIC_STATE_DEPTH_BIAS = 3,\n    VK_DYNAMIC_STATE_BLEND_CONSTANTS = 4,\n    VK_DYNAMIC_STATE_DEPTH_BOUNDS = 5,\n    VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK = 6,\n    VK_DYNAMIC_STATE_STENCIL_WRITE_MASK = 7,\n    VK_DYNAMIC_STATE_STENCIL_REFERENCE = 8,\n    VK_DYNAMIC_STATE_RANGE_SIZE = (VK_DYNAMIC_STATE_STENCIL_REFERENCE - VK_DYNAMIC_STATE_VIEWPORT + 1)\n} VkDynamicState;\ntypedef enum VkFenceCreateFlagBits {\n    VK_FENCE_CREATE_SIGNALED_BIT = 1\n} VkFenceCreateFlagBits;\ntypedef enum VkPolygonMode {\n    VK_POLYGON_MODE_FILL = 0,\n    VK_POLYGON_MODE_LINE = 1,\n    VK_POLYGON_MODE_POINT = 2\n} VkPolygonMode;\ntypedef enum VkFormat {\n    VK_FORMAT_UNDEFINED = 0,\n    VK_FORMAT_R4G4_UNORM_PACK8 = 1,\n    VK_FORMAT_R4G4B4A4_UNORM_PACK16 = 2,\n    VK_FORMAT_B4G4R4A4_UNORM_PACK16 = 3,\n    VK_FORMAT_R5G6B5_UNORM_PACK16 = 4,\n    VK_FORMAT_B5G6R5_UNORM_PACK16 = 5,\n    VK_FORMAT_R5G5B5A1_UNORM_PACK16 = 6,\n    VK_FORMAT_B5G5R5A1_UNORM_PACK16 = 7,\n    VK_FORMAT_A1R5G5B5_UNORM_PACK16 = 8,\n    VK_FORMAT_R8_UNORM = 9,\n    VK_FORMAT_R8_SNORM = 10,\n    VK_FORMAT_R8_USCALED = 11,\n    VK_FORMAT_R8_SSCALED = 12,\n    VK_FORMAT_R8_UINT = 13,\n    VK_FORMAT_R8_SINT = 14,\n    VK_FORMAT_R8_SRGB = 15,\n    VK_FORMAT_R8G8_UNORM = 16,\n    VK_FORMAT_R8G8_SNORM = 17,\n    VK_FORMAT_R8G8_USCALED = 18,\n    VK_FORMAT_R8G8_SSCALED = 19,\n    VK_FORMAT_R8G8_UINT = 20,\n    VK_FORMAT_R8G8_SINT = 21,\n    VK_FORMAT_R8G8_SRGB = 22,\n    VK_FORMAT_R8G8B8_UNORM = 23,\n    VK_FORMAT_R8G8B8_SNORM = 24,\n    VK_FORMAT_R8G8B8_USCALED = 25,\n    VK_FORMAT_R8G8B8_SSCALED = 26,\n    VK_FORMAT_R8G8B8_UINT = 27,\n    VK_FORMAT_R8G8B8_SINT = 28,\n    VK_FORMAT_R8G8B8_SRGB = 29,\n    VK_FORMAT_B8G8R8_UNORM = 30,\n    VK_FORMAT_B8G8R8_SNORM = 31,\n    VK_FORMAT_B8G8R8_USCALED = 32,\n    VK_FORMAT_B8G8R8_SSCALED = 33,\n    VK_FORMAT_B8G8R8_UINT = 34,\n    VK_FORMAT_B8G8R8_SINT = 35,\n    VK_FORMAT_B8G8R8_SRGB = 36,\n    VK_FORMAT_R8G8B8A8_UNORM = 37,\n    VK_FORMAT_R8G8B8A8_SNORM = 38,\n    VK_FORMAT_R8G8B8A8_USCALED = 39,\n    VK_FORMAT_R8G8B8A8_SSCALED = 40,\n    VK_FORMAT_R8G8B8A8_UINT = 41,\n    VK_FORMAT_R8G8B8A8_SINT = 42,\n    VK_FORMAT_R8G8B8A8_SRGB = 43,\n    VK_FORMAT_B8G8R8A8_UNORM = 44,\n    VK_FORMAT_B8G8R8A8_SNORM = 45,\n    VK_FORMAT_B8G8R8A8_USCALED = 46,\n    VK_FORMAT_B8G8R8A8_SSCALED = 47,\n    VK_FORMAT_B8G8R8A8_UINT = 48,\n    VK_FORMAT_B8G8R8A8_SINT = 49,\n    VK_FORMAT_B8G8R8A8_SRGB = 50,\n    VK_FORMAT_A8B8G8R8_UNORM_PACK32 = 51,\n    VK_FORMAT_A8B8G8R8_SNORM_PACK32 = 52,\n    VK_FORMAT_A8B8G8R8_USCALED_PACK32 = 53,\n    VK_FORMAT_A8B8G8R8_SSCALED_PACK32 = 54,\n    VK_FORMAT_A8B8G8R8_UINT_PACK32 = 55,\n    VK_FORMAT_A8B8G8R8_SINT_PACK32 = 56,\n    VK_FORMAT_A8B8G8R8_SRGB_PACK32 = 57,\n    VK_FORMAT_A2R10G10B10_UNORM_PACK32 = 58,\n    VK_FORMAT_A2R10G10B10_SNORM_PACK32 = 59,\n    VK_FORMAT_A2R10G10B10_USCALED_PACK32 = 60,\n    VK_FORMAT_A2R10G10B10_SSCALED_PACK32 = 61,\n    VK_FORMAT_A2R10G10B10_UINT_PACK32 = 62,\n    VK_FORMAT_A2R10G10B10_SINT_PACK32 = 63,\n    VK_FORMAT_A2B10G10R10_UNORM_PACK32 = 64,\n    VK_FORMAT_A2B10G10R10_SNORM_PACK32 = 65,\n    VK_FORMAT_A2B10G10R10_USCALED_PACK32 = 66,\n    VK_FORMAT_A2B10G10R10_SSCALED_PACK32 = 67,\n    VK_FORMAT_A2B10G10R10_UINT_PACK32 = 68,\n    VK_FORMAT_A2B10G10R10_SINT_PACK32 = 69,\n    VK_FORMAT_R16_UNORM = 70,\n    VK_FORMAT_R16_SNORM = 71,\n    VK_FORMAT_R16_USCALED = 72,\n    VK_FORMAT_R16_SSCALED = 73,\n    VK_FORMAT_R16_UINT = 74,\n    VK_FORMAT_R16_SINT = 75,\n    VK_FORMAT_R16_SFLOAT = 76,\n    VK_FORMAT_R16G16_UNORM = 77,\n    VK_FORMAT_R16G16_SNORM = 78,\n    VK_FORMAT_R16G16_USCALED = 79,\n    VK_FORMAT_R16G16_SSCALED = 80,\n    VK_FORMAT_R16G16_UINT = 81,\n    VK_FORMAT_R16G16_SINT = 82,\n    VK_FORMAT_R16G16_SFLOAT = 83,\n    VK_FORMAT_R16G16B16_UNORM = 84,\n    VK_FORMAT_R16G16B16_SNORM = 85,\n    VK_FORMAT_R16G16B16_USCALED = 86,\n    VK_FORMAT_R16G16B16_SSCALED = 87,\n    VK_FORMAT_R16G16B16_UINT = 88,\n    VK_FORMAT_R16G16B16_SINT = 89,\n    VK_FORMAT_R16G16B16_SFLOAT = 90,\n    VK_FORMAT_R16G16B16A16_UNORM = 91,\n    VK_FORMAT_R16G16B16A16_SNORM = 92,\n    VK_FORMAT_R16G16B16A16_USCALED = 93,\n    VK_FORMAT_R16G16B16A16_SSCALED = 94,\n    VK_FORMAT_R16G16B16A16_UINT = 95,\n    VK_FORMAT_R16G16B16A16_SINT = 96,\n    VK_FORMAT_R16G16B16A16_SFLOAT = 97,\n    VK_FORMAT_R32_UINT = 98,\n    VK_FORMAT_R32_SINT = 99,\n    VK_FORMAT_R32_SFLOAT = 100,\n    VK_FORMAT_R32G32_UINT = 101,\n    VK_FORMAT_R32G32_SINT = 102,\n    VK_FORMAT_R32G32_SFLOAT = 103,\n    VK_FORMAT_R32G32B32_UINT = 104,\n    VK_FORMAT_R32G32B32_SINT = 105,\n    VK_FORMAT_R32G32B32_SFLOAT = 106,\n    VK_FORMAT_R32G32B32A32_UINT = 107,\n    VK_FORMAT_R32G32B32A32_SINT = 108,\n    VK_FORMAT_R32G32B32A32_SFLOAT = 109,\n    VK_FORMAT_R64_UINT = 110,\n    VK_FORMAT_R64_SINT = 111,\n    VK_FORMAT_R64_SFLOAT = 112,\n    VK_FORMAT_R64G64_UINT = 113,\n    VK_FORMAT_R64G64_SINT = 114,\n    VK_FORMAT_R64G64_SFLOAT = 115,\n    VK_FORMAT_R64G64B64_UINT = 116,\n    VK_FORMAT_R64G64B64_SINT = 117,\n    VK_FORMAT_R64G64B64_SFLOAT = 118,\n    VK_FORMAT_R64G64B64A64_UINT = 119,\n    VK_FORMAT_R64G64B64A64_SINT = 120,\n    VK_FORMAT_R64G64B64A64_SFLOAT = 121,\n    VK_FORMAT_B10G11R11_UFLOAT_PACK32 = 122,\n    VK_FORMAT_E5B9G9R9_UFLOAT_PACK32 = 123,\n    VK_FORMAT_D16_UNORM = 124,\n    VK_FORMAT_X8_D24_UNORM_PACK32 = 125,\n    VK_FORMAT_D32_SFLOAT = 126,\n    VK_FORMAT_S8_UINT = 127,\n    VK_FORMAT_D16_UNORM_S8_UINT = 128,\n    VK_FORMAT_D24_UNORM_S8_UINT = 129,\n    VK_FORMAT_D32_SFLOAT_S8_UINT = 130,\n    VK_FORMAT_BC1_RGB_UNORM_BLOCK = 131,\n    VK_FORMAT_BC1_RGB_SRGB_BLOCK = 132,\n    VK_FORMAT_BC1_RGBA_UNORM_BLOCK = 133,\n    VK_FORMAT_BC1_RGBA_SRGB_BLOCK = 134,\n    VK_FORMAT_BC2_UNORM_BLOCK = 135,\n    VK_FORMAT_BC2_SRGB_BLOCK = 136,\n    VK_FORMAT_BC3_UNORM_BLOCK = 137,\n    VK_FORMAT_BC3_SRGB_BLOCK = 138,\n    VK_FORMAT_BC4_UNORM_BLOCK = 139,\n    VK_FORMAT_BC4_SNORM_BLOCK = 140,\n    VK_FORMAT_BC5_UNORM_BLOCK = 141,\n    VK_FORMAT_BC5_SNORM_BLOCK = 142,\n    VK_FORMAT_BC6H_UFLOAT_BLOCK = 143,\n    VK_FORMAT_BC6H_SFLOAT_BLOCK = 144,\n    VK_FORMAT_BC7_UNORM_BLOCK = 145,\n    VK_FORMAT_BC7_SRGB_BLOCK = 146,\n    VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK = 147,\n    VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK = 148,\n    VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK = 149,\n    VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK = 150,\n    VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK = 151,\n    VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK = 152,\n    VK_FORMAT_EAC_R11_UNORM_BLOCK = 153,\n    VK_FORMAT_EAC_R11_SNORM_BLOCK = 154,\n    VK_FORMAT_EAC_R11G11_UNORM_BLOCK = 155,\n    VK_FORMAT_EAC_R11G11_SNORM_BLOCK = 156,\n    VK_FORMAT_ASTC_4x4_UNORM_BLOCK = 157,\n    VK_FORMAT_ASTC_4x4_SRGB_BLOCK = 158,\n    VK_FORMAT_ASTC_5x4_UNORM_BLOCK = 159,\n    VK_FORMAT_ASTC_5x4_SRGB_BLOCK = 160,\n    VK_FORMAT_ASTC_5x5_UNORM_BLOCK = 161,\n    VK_FORMAT_ASTC_5x5_SRGB_BLOCK = 162,\n    VK_FORMAT_ASTC_6x5_UNORM_BLOCK = 163,\n    VK_FORMAT_ASTC_6x5_SRGB_BLOCK = 164,\n    VK_FORMAT_ASTC_6x6_UNORM_BLOCK = 165,\n    VK_FORMAT_ASTC_6x6_SRGB_BLOCK = 166,\n    VK_FORMAT_ASTC_8x5_UNORM_BLOCK = 167,\n    VK_FORMAT_ASTC_8x5_SRGB_BLOCK = 168,\n    VK_FORMAT_ASTC_8x6_UNORM_BLOCK = 169,\n    VK_FORMAT_ASTC_8x6_SRGB_BLOCK = 170,\n    VK_FORMAT_ASTC_8x8_UNORM_BLOCK = 171,\n    VK_FORMAT_ASTC_8x8_SRGB_BLOCK = 172,\n    VK_FORMAT_ASTC_10x5_UNORM_BLOCK = 173,\n    VK_FORMAT_ASTC_10x5_SRGB_BLOCK = 174,\n    VK_FORMAT_ASTC_10x6_UNORM_BLOCK = 175,\n    VK_FORMAT_ASTC_10x6_SRGB_BLOCK = 176,\n    VK_FORMAT_ASTC_10x8_UNORM_BLOCK = 177,\n    VK_FORMAT_ASTC_10x8_SRGB_BLOCK = 178,\n    VK_FORMAT_ASTC_10x10_UNORM_BLOCK = 179,\n    VK_FORMAT_ASTC_10x10_SRGB_BLOCK = 180,\n    VK_FORMAT_ASTC_12x10_UNORM_BLOCK = 181,\n    VK_FORMAT_ASTC_12x10_SRGB_BLOCK = 182,\n    VK_FORMAT_ASTC_12x12_UNORM_BLOCK = 183,\n    VK_FORMAT_ASTC_12x12_SRGB_BLOCK = 184,\n    VK_FORMAT_G8B8G8R8_422_UNORM = 1000156000,\n    VK_FORMAT_B8G8R8G8_422_UNORM = 1000156001,\n    VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM = 1000156002,\n    VK_FORMAT_G8_B8R8_2PLANE_420_UNORM = 1000156003,\n    VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM = 1000156004,\n    VK_FORMAT_G8_B8R8_2PLANE_422_UNORM = 1000156005,\n    VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM = 1000156006,\n    VK_FORMAT_R10X6_UNORM_PACK16 = 1000156007,\n    VK_FORMAT_R10X6G10X6_UNORM_2PACK16 = 1000156008,\n    VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16 = 1000156009,\n    VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16 = 1000156010,\n    VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16 = 1000156011,\n    VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16 = 1000156012,\n    VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16 = 1000156013,\n    VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16 = 1000156014,\n    VK_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16 = 1000156015,\n    VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16 = 1000156016,\n    VK_FORMAT_R12X4_UNORM_PACK16 = 1000156017,\n    VK_FORMAT_R12X4G12X4_UNORM_2PACK16 = 1000156018,\n    VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16 = 1000156019,\n    VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16 = 1000156020,\n    VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16 = 1000156021,\n    VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16 = 1000156022,\n    VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16 = 1000156023,\n    VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16 = 1000156024,\n    VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16 = 1000156025,\n    VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16 = 1000156026,\n    VK_FORMAT_G16B16G16R16_422_UNORM = 1000156027,\n    VK_FORMAT_B16G16R16G16_422_UNORM = 1000156028,\n    VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM = 1000156029,\n    VK_FORMAT_G16_B16R16_2PLANE_420_UNORM = 1000156030,\n    VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM = 1000156031,\n    VK_FORMAT_G16_B16R16_2PLANE_422_UNORM = 1000156032,\n    VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM = 1000156033\n} VkFormat;\ntypedef enum VkFormatFeatureFlagBits {\n    VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT = 1,\n    VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT = 2,\n    VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT = 4,\n    VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT = 8,\n    VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT = 16,\n    VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT = 32,\n    VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT = 64,\n    VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT = 128,\n    VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT = 256,\n    VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT = 512,\n    VK_FORMAT_FEATURE_BLIT_SRC_BIT = 1024,\n    VK_FORMAT_FEATURE_BLIT_DST_BIT = 2048,\n    VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT = 4096,\n    VK_FORMAT_FEATURE_TRANSFER_SRC_BIT = 16384,\n    VK_FORMAT_FEATURE_TRANSFER_DST_BIT = 32768,\n    VK_FORMAT_FEATURE_MIDPOINT_CHROMA_SAMPLES_BIT = 131072,\n    VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER_BIT = 262144,\n    VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_SEPARATE_RECONSTRUCTION_FILTER_BIT = 524288,\n    VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_BIT = 1048576,\n    VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE_BIT = 2097152,\n    VK_FORMAT_FEATURE_DISJOINT_BIT = 4194304,\n    VK_FORMAT_FEATURE_COSITED_CHROMA_SAMPLES_BIT = 8388608\n} VkFormatFeatureFlagBits;\ntypedef enum VkFrontFace {\n    VK_FRONT_FACE_COUNTER_CLOCKWISE = 0,\n    VK_FRONT_FACE_CLOCKWISE = 1\n} VkFrontFace;\ntypedef enum VkImageAspectFlagBits {\n    VK_IMAGE_ASPECT_COLOR_BIT = 1,\n    VK_IMAGE_ASPECT_DEPTH_BIT = 2,\n    VK_IMAGE_ASPECT_STENCIL_BIT = 4,\n    VK_IMAGE_ASPECT_METADATA_BIT = 8,\n    VK_IMAGE_ASPECT_PLANE_0_BIT = 16,\n    VK_IMAGE_ASPECT_PLANE_1_BIT = 32,\n    VK_IMAGE_ASPECT_PLANE_2_BIT = 64\n} VkImageAspectFlagBits;\ntypedef enum VkImageCreateFlagBits {\n    VK_IMAGE_CREATE_SPARSE_BINDING_BIT = 1,\n    VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT = 2,\n    VK_IMAGE_CREATE_SPARSE_ALIASED_BIT = 4,\n    VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT = 8,\n    VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT = 16,\n    VK_IMAGE_CREATE_ALIAS_BIT = 1024,\n    VK_IMAGE_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT = 64,\n    VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT = 32,\n    VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT = 128,\n    VK_IMAGE_CREATE_EXTENDED_USAGE_BIT = 256,\n    VK_IMAGE_CREATE_PROTECTED_BIT = 2048,\n    VK_IMAGE_CREATE_DISJOINT_BIT = 512\n} VkImageCreateFlagBits;\ntypedef enum VkImageLayout {\n    VK_IMAGE_LAYOUT_UNDEFINED = 0,\n    VK_IMAGE_LAYOUT_GENERAL = 1,\n    VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL = 2,\n    VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL = 3,\n    VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL = 4,\n    VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL = 5,\n    VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL = 6,\n    VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL = 7,\n    VK_IMAGE_LAYOUT_PREINITIALIZED = 8,\n    VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL = 1000117000,\n    VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL = 1000117001,\n    VK_IMAGE_LAYOUT_PRESENT_SRC_KHR = 1000001002\n} VkImageLayout;\ntypedef enum VkImageTiling {\n    VK_IMAGE_TILING_OPTIMAL = 0,\n    VK_IMAGE_TILING_LINEAR = 1\n} VkImageTiling;\ntypedef enum VkImageType {\n    VK_IMAGE_TYPE_1D = 0,\n    VK_IMAGE_TYPE_2D = 1,\n    VK_IMAGE_TYPE_3D = 2\n} VkImageType;\ntypedef enum VkImageUsageFlagBits {\n    VK_IMAGE_USAGE_TRANSFER_SRC_BIT = 1,\n    VK_IMAGE_USAGE_TRANSFER_DST_BIT = 2,\n    VK_IMAGE_USAGE_SAMPLED_BIT = 4,\n    VK_IMAGE_USAGE_STORAGE_BIT = 8,\n    VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT = 16,\n    VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT = 32,\n    VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT = 64,\n    VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT = 128\n} VkImageUsageFlagBits;\n\ntypedef enum VkImageViewType {\n    VK_IMAGE_VIEW_TYPE_1D = 0,\n    VK_IMAGE_VIEW_TYPE_2D = 1,\n    VK_IMAGE_VIEW_TYPE_3D = 2,\n    VK_IMAGE_VIEW_TYPE_CUBE = 3,\n    VK_IMAGE_VIEW_TYPE_1D_ARRAY = 4,\n    VK_IMAGE_VIEW_TYPE_2D_ARRAY = 5,\n    VK_IMAGE_VIEW_TYPE_CUBE_ARRAY = 6\n} VkImageViewType;\ntypedef enum VkSharingMode {\n    VK_SHARING_MODE_EXCLUSIVE = 0,\n    VK_SHARING_MODE_CONCURRENT = 1\n} VkSharingMode;\ntypedef enum VkIndexType {\n    VK_INDEX_TYPE_UINT16 = 0,\n    VK_INDEX_TYPE_UINT32 = 1\n} VkIndexType;\ntypedef enum VkLogicOp {\n    VK_LOGIC_OP_CLEAR = 0,\n    VK_LOGIC_OP_AND = 1,\n    VK_LOGIC_OP_AND_REVERSE = 2,\n    VK_LOGIC_OP_COPY = 3,\n    VK_LOGIC_OP_AND_INVERTED = 4,\n    VK_LOGIC_OP_NO_OP = 5,\n    VK_LOGIC_OP_XOR = 6,\n    VK_LOGIC_OP_OR = 7,\n    VK_LOGIC_OP_NOR = 8,\n    VK_LOGIC_OP_EQUIVALENT = 9,\n    VK_LOGIC_OP_INVERT = 10,\n    VK_LOGIC_OP_OR_REVERSE = 11,\n    VK_LOGIC_OP_COPY_INVERTED = 12,\n    VK_LOGIC_OP_OR_INVERTED = 13,\n    VK_LOGIC_OP_NAND = 14,\n    VK_LOGIC_OP_SET = 15\n} VkLogicOp;\ntypedef enum VkMemoryHeapFlagBits {\n    VK_MEMORY_HEAP_DEVICE_LOCAL_BIT = 1,\n    VK_MEMORY_HEAP_MULTI_INSTANCE_BIT = 2\n} VkMemoryHeapFlagBits;\ntypedef enum VkAccessFlagBits {\n    VK_ACCESS_INDIRECT_COMMAND_READ_BIT = 1,\n    VK_ACCESS_INDEX_READ_BIT = 2,\n    VK_ACCESS_VERTEX_ATTRIBUTE_READ_BIT = 4,\n    VK_ACCESS_UNIFORM_READ_BIT = 8,\n    VK_ACCESS_INPUT_ATTACHMENT_READ_BIT = 16,\n    VK_ACCESS_SHADER_READ_BIT = 32,\n    VK_ACCESS_SHADER_WRITE_BIT = 64,\n    VK_ACCESS_COLOR_ATTACHMENT_READ_BIT = 128,\n    VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT = 256,\n    VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT = 512,\n    VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT = 1024,\n    VK_ACCESS_TRANSFER_READ_BIT = 2048,\n    VK_ACCESS_TRANSFER_WRITE_BIT = 4096,\n    VK_ACCESS_HOST_READ_BIT = 8192,\n    VK_ACCESS_HOST_WRITE_BIT = 16384,\n    VK_ACCESS_MEMORY_READ_BIT = 32768,\n    VK_ACCESS_MEMORY_WRITE_BIT = 65536\n} VkAccessFlagBits;\ntypedef enum VkMemoryPropertyFlagBits {\n    VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT = 1,\n    VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT = 2,\n    VK_MEMORY_PROPERTY_HOST_COHERENT_BIT = 4,\n    VK_MEMORY_PROPERTY_HOST_CACHED_BIT = 8,\n    VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT = 16,\n    VK_MEMORY_PROPERTY_PROTECTED_BIT = 32\n} VkMemoryPropertyFlagBits;\ntypedef enum VkPhysicalDeviceType {\n    VK_PHYSICAL_DEVICE_TYPE_OTHER = 0,\n    VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU = 1,\n    VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU = 2,\n    VK_PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU = 3,\n    VK_PHYSICAL_DEVICE_TYPE_CPU = 4\n} VkPhysicalDeviceType;\ntypedef enum VkPipelineBindPoint {\n    VK_PIPELINE_BIND_POINT_GRAPHICS = 0,\n    VK_PIPELINE_BIND_POINT_COMPUTE = 1\n} VkPipelineBindPoint;\ntypedef enum VkPipelineCreateFlagBits {\n    VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT = 1,\n    VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT = 2,\n    VK_PIPELINE_CREATE_DERIVATIVE_BIT = 4,\n    VK_PIPELINE_CREATE_VIEW_INDEX_FROM_DEVICE_INDEX_BIT = 8,\n    VK_PIPELINE_CREATE_DISPATCH_BASE = 16\n} VkPipelineCreateFlagBits;\ntypedef enum VkPrimitiveTopology {\n    VK_PRIMITIVE_TOPOLOGY_POINT_LIST = 0,\n    VK_PRIMITIVE_TOPOLOGY_LINE_LIST = 1,\n    VK_PRIMITIVE_TOPOLOGY_LINE_STRIP = 2,\n    VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST = 3,\n    VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP = 4,\n    VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN = 5,\n    VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY = 6,\n    VK_PRIMITIVE_TOPOLOGY_LINE_STRIP_WITH_ADJACENCY = 7,\n    VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY = 8,\n    VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_WITH_ADJACENCY = 9,\n    VK_PRIMITIVE_TOPOLOGY_PATCH_LIST = 10\n} VkPrimitiveTopology;\ntypedef enum VkQueryControlFlagBits {\n    VK_QUERY_CONTROL_PRECISE_BIT = 1\n} VkQueryControlFlagBits;\ntypedef enum VkQueryPipelineStatisticFlagBits {\n    VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_VERTICES_BIT = 1,\n    VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_PRIMITIVES_BIT = 2,\n    VK_QUERY_PIPELINE_STATISTIC_VERTEX_SHADER_INVOCATIONS_BIT = 4,\n    VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_INVOCATIONS_BIT = 8,\n    VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_PRIMITIVES_BIT = 16,\n    VK_QUERY_PIPELINE_STATISTIC_CLIPPING_INVOCATIONS_BIT = 32,\n    VK_QUERY_PIPELINE_STATISTIC_CLIPPING_PRIMITIVES_BIT = 64,\n    VK_QUERY_PIPELINE_STATISTIC_FRAGMENT_SHADER_INVOCATIONS_BIT = 128,\n    VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_CONTROL_SHADER_PATCHES_BIT = 256,\n    VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_EVALUATION_SHADER_INVOCATIONS_BIT = 512,\n    VK_QUERY_PIPELINE_STATISTIC_COMPUTE_SHADER_INVOCATIONS_BIT = 1024\n} VkQueryPipelineStatisticFlagBits;\ntypedef enum VkQueryResultFlagBits {\n    VK_QUERY_RESULT_64_BIT = 1,\n    VK_QUERY_RESULT_WAIT_BIT = 2,\n    VK_QUERY_RESULT_WITH_AVAILABILITY_BIT = 4,\n    VK_QUERY_RESULT_PARTIAL_BIT = 8\n} VkQueryResultFlagBits;\ntypedef enum VkQueryType {\n    VK_QUERY_TYPE_OCCLUSION = 0,\n    VK_QUERY_TYPE_PIPELINE_STATISTICS = 1,\n    VK_QUERY_TYPE_TIMESTAMP = 2\n} VkQueryType;\ntypedef enum VkQueueFlagBits {\n    VK_QUEUE_GRAPHICS_BIT = 1,\n    VK_QUEUE_COMPUTE_BIT = 2,\n    VK_QUEUE_TRANSFER_BIT = 4,\n    VK_QUEUE_SPARSE_BINDING_BIT = 8,\n    VK_QUEUE_PROTECTED_BIT = 16\n} VkQueueFlagBits;\ntypedef enum VkSubpassContents {\n    VK_SUBPASS_CONTENTS_INLINE = 0,\n    VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS = 1\n} VkSubpassContents;\ntypedef enum VkResult {\n    VK_SUCCESS = 0,\n    VK_NOT_READY = 1,\n    VK_TIMEOUT = 2,\n    VK_EVENT_SET = 3,\n    VK_EVENT_RESET = 4,\n    VK_INCOMPLETE = 5,\n    VK_ERROR_OUT_OF_HOST_MEMORY = -1,\n    VK_ERROR_OUT_OF_DEVICE_MEMORY = -2,\n    VK_ERROR_INITIALIZATION_FAILED = -3,\n    VK_ERROR_DEVICE_LOST = -4,\n    VK_ERROR_MEMORY_MAP_FAILED = -5,\n    VK_ERROR_LAYER_NOT_PRESENT = -6,\n    VK_ERROR_EXTENSION_NOT_PRESENT = -7,\n    VK_ERROR_FEATURE_NOT_PRESENT = -8,\n    VK_ERROR_INCOMPATIBLE_DRIVER = -9,\n    VK_ERROR_TOO_MANY_OBJECTS = -10,\n    VK_ERROR_FORMAT_NOT_SUPPORTED = -11,\n    VK_ERROR_FRAGMENTED_POOL = -12,\n    VK_ERROR_OUT_OF_POOL_MEMORY = -1000069000,\n    VK_ERROR_INVALID_EXTERNAL_HANDLE = -1000072003,\n    VK_ERROR_SURFACE_LOST_KHR = -1000000000,\n    VK_ERROR_NATIVE_WINDOW_IN_USE_KHR = -1000000001,\n    VK_SUBOPTIMAL_KHR = 1000001003,\n    VK_ERROR_OUT_OF_DATE_KHR = -1000001004,\n    VK_ERROR_VALIDATION_FAILED_EXT = -1000011001\n} VkResult;\ntypedef enum VkShaderStageFlagBits {\n    VK_SHADER_STAGE_VERTEX_BIT = 1,\n    VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT = 2,\n    VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT = 4,\n    VK_SHADER_STAGE_GEOMETRY_BIT = 8,\n    VK_SHADER_STAGE_FRAGMENT_BIT = 16,\n    VK_SHADER_STAGE_COMPUTE_BIT = 32,\n    VK_SHADER_STAGE_ALL_GRAPHICS = 0x0000001F,\n    VK_SHADER_STAGE_ALL = 0x7FFFFFFF\n} VkShaderStageFlagBits;\ntypedef enum VkSparseMemoryBindFlagBits {\n    VK_SPARSE_MEMORY_BIND_METADATA_BIT = 1\n} VkSparseMemoryBindFlagBits;\ntypedef enum VkStencilFaceFlagBits {\n    VK_STENCIL_FACE_FRONT_BIT = 1,\n    VK_STENCIL_FACE_BACK_BIT = 2,\n    VK_STENCIL_FRONT_AND_BACK = 0x00000003\n} VkStencilFaceFlagBits;\ntypedef enum VkStencilOp {\n    VK_STENCIL_OP_KEEP = 0,\n    VK_STENCIL_OP_ZERO = 1,\n    VK_STENCIL_OP_REPLACE = 2,\n    VK_STENCIL_OP_INCREMENT_AND_CLAMP = 3,\n    VK_STENCIL_OP_DECREMENT_AND_CLAMP = 4,\n    VK_STENCIL_OP_INVERT = 5,\n    VK_STENCIL_OP_INCREMENT_AND_WRAP = 6,\n    VK_STENCIL_OP_DECREMENT_AND_WRAP = 7\n} VkStencilOp;\ntypedef enum VkStructureType {\n    VK_STRUCTURE_TYPE_APPLICATION_INFO = 0,\n    VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO = 1,\n    VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO = 2,\n    VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO = 3,\n    VK_STRUCTURE_TYPE_SUBMIT_INFO = 4,\n    VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO = 5,\n    VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE = 6,\n    VK_STRUCTURE_TYPE_BIND_SPARSE_INFO = 7,\n    VK_STRUCTURE_TYPE_FENCE_CREATE_INFO = 8,\n    VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO = 9,\n    VK_STRUCTURE_TYPE_EVENT_CREATE_INFO = 10,\n    VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO = 11,\n    VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO = 12,\n    VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO = 13,\n    VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO = 14,\n    VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO = 15,\n    VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO = 16,\n    VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO = 17,\n    VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO = 18,\n    VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO = 19,\n    VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO = 20,\n    VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO = 21,\n    VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO = 22,\n    VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO = 23,\n    VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO = 24,\n    VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO = 25,\n    VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO = 26,\n    VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO = 27,\n    VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO = 28,\n    VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO = 29,\n    VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO = 30,\n    VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO = 31,\n    VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO = 32,\n    VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO = 33,\n    VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO = 34,\n    VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET = 35,\n    VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET = 36,\n    VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO = 37,\n    VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO = 38,\n    VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO = 39,\n    VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO = 40,\n    VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO = 41,\n    VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO = 42,\n    VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO = 43,\n    VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER = 44,\n    VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER = 45,\n    VK_STRUCTURE_TYPE_MEMORY_BARRIER = 46,\n    VK_STRUCTURE_TYPE_LOADER_INSTANCE_CREATE_INFO = 47,\n    VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO = 48,\n    VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_PROPERTIES = 1000094000,\n    VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO = 1000157000,\n    VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO = 1000157001,\n    VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES = 1000083000,\n    VK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS = 1000127000,\n    VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO = 1000127001,\n    VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFO = 1000060000,\n    VK_STRUCTURE_TYPE_DEVICE_GROUP_RENDER_PASS_BEGIN_INFO = 1000060003,\n    VK_STRUCTURE_TYPE_DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO = 1000060004,\n    VK_STRUCTURE_TYPE_DEVICE_GROUP_SUBMIT_INFO = 1000060005,\n    VK_STRUCTURE_TYPE_DEVICE_GROUP_BIND_SPARSE_INFO = 1000060006,\n    VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_DEVICE_GROUP_INFO = 1000060013,\n    VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_DEVICE_GROUP_INFO = 1000060014,\n    VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GROUP_PROPERTIES = 1000070000,\n    VK_STRUCTURE_TYPE_DEVICE_GROUP_DEVICE_CREATE_INFO = 1000070001,\n    VK_STRUCTURE_TYPE_BUFFER_MEMORY_REQUIREMENTS_INFO_2 = 1000146000,\n    VK_STRUCTURE_TYPE_IMAGE_MEMORY_REQUIREMENTS_INFO_2 = 1000146001,\n    VK_STRUCTURE_TYPE_IMAGE_SPARSE_MEMORY_REQUIREMENTS_INFO_2 = 1000146002,\n    VK_STRUCTURE_TYPE_MEMORY_REQUIREMENTS_2 = 1000146003,\n    VK_STRUCTURE_TYPE_SPARSE_IMAGE_MEMORY_REQUIREMENTS_2 = 1000146004,\n    VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2 = 1000059000,\n    VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2 = 1000059001,\n    VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2 = 1000059002,\n    VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2 = 1000059003,\n    VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2 = 1000059004,\n    VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2 = 1000059005,\n    VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PROPERTIES_2 = 1000059006,\n    VK_STRUCTURE_TYPE_SPARSE_IMAGE_FORMAT_PROPERTIES_2 = 1000059007,\n    VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SPARSE_IMAGE_FORMAT_INFO_2 = 1000059008,\n    VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_POINT_CLIPPING_PROPERTIES = 1000117000,\n    VK_STRUCTURE_TYPE_RENDER_PASS_INPUT_ATTACHMENT_ASPECT_CREATE_INFO = 1000117001,\n    VK_STRUCTURE_TYPE_IMAGE_VIEW_USAGE_CREATE_INFO = 1000117002,\n    VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_DOMAIN_ORIGIN_STATE_CREATE_INFO = 1000117003,\n    VK_STRUCTURE_TYPE_RENDER_PASS_MULTIVIEW_CREATE_INFO = 1000053000,\n    VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES = 1000053001,\n    VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES = 1000053002,\n    VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTERS_FEATURES = 1000120000,\n    VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTER_FEATURES = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTERS_FEATURES,\n    VK_STRUCTURE_TYPE_PROTECTED_SUBMIT_INFO = 1000145000,\n    VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_FEATURES = 1000145001,\n    VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_PROPERTIES = 1000145002,\n    VK_STRUCTURE_TYPE_DEVICE_QUEUE_INFO_2 = 1000145003,\n    VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_CREATE_INFO = 1000156000,\n    VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_INFO = 1000156001,\n    VK_STRUCTURE_TYPE_BIND_IMAGE_PLANE_MEMORY_INFO = 1000156002,\n    VK_STRUCTURE_TYPE_IMAGE_PLANE_MEMORY_REQUIREMENTS_INFO = 1000156003,\n    VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES = 1000156004,\n    VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_IMAGE_FORMAT_PROPERTIES = 1000156005,\n    VK_STRUCTURE_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_CREATE_INFO = 1000085000,\n    VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO = 1000071000,\n    VK_STRUCTURE_TYPE_EXTERNAL_IMAGE_FORMAT_PROPERTIES = 1000071001,\n    VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_BUFFER_INFO = 1000071002,\n    VK_STRUCTURE_TYPE_EXTERNAL_BUFFER_PROPERTIES = 1000071003,\n    VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES = 1000071004,\n    VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_BUFFER_CREATE_INFO = 1000072000,\n    VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO = 1000072001,\n    VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO = 1000072002,\n    VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_FENCE_INFO = 1000112000,\n    VK_STRUCTURE_TYPE_EXTERNAL_FENCE_PROPERTIES = 1000112001,\n    VK_STRUCTURE_TYPE_EXPORT_FENCE_CREATE_INFO = 1000113000,\n    VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO = 1000077000,\n    VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_SEMAPHORE_INFO = 1000076000,\n    VK_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_PROPERTIES = 1000076001,\n    VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_3_PROPERTIES = 1000168000,\n    VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_SUPPORT = 1000168001,\n    VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DRAW_PARAMETERS_FEATURES = 1000063000,\n    VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DRAW_PARAMETER_FEATURES = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DRAW_PARAMETERS_FEATURES,\n    VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR = 1000001000,\n    VK_STRUCTURE_TYPE_PRESENT_INFO_KHR = 1000001001,\n    VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_CAPABILITIES_KHR = 1000060007,\n    VK_STRUCTURE_TYPE_IMAGE_SWAPCHAIN_CREATE_INFO_KHR = 1000060008,\n    VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_SWAPCHAIN_INFO_KHR = 1000060009,\n    VK_STRUCTURE_TYPE_ACQUIRE_NEXT_IMAGE_INFO_KHR = 1000060010,\n    VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_INFO_KHR = 1000060011,\n    VK_STRUCTURE_TYPE_DEVICE_GROUP_SWAPCHAIN_CREATE_INFO_KHR = 1000060012,\n    VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT = 1000011000,\n    VK_STRUCTURE_TYPE_DEBUG_REPORT_CREATE_INFO_EXT = VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT\n} VkStructureType;\ntypedef enum VkSystemAllocationScope {\n    VK_SYSTEM_ALLOCATION_SCOPE_COMMAND = 0,\n    VK_SYSTEM_ALLOCATION_SCOPE_OBJECT = 1,\n    VK_SYSTEM_ALLOCATION_SCOPE_CACHE = 2,\n    VK_SYSTEM_ALLOCATION_SCOPE_DEVICE = 3,\n    VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE = 4\n} VkSystemAllocationScope;\ntypedef enum VkInternalAllocationType {\n    VK_INTERNAL_ALLOCATION_TYPE_EXECUTABLE = 0\n} VkInternalAllocationType;\ntypedef enum VkSamplerAddressMode {\n    VK_SAMPLER_ADDRESS_MODE_REPEAT = 0,\n    VK_SAMPLER_ADDRESS_MODE_MIRRORED_REPEAT = 1,\n    VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE = 2,\n    VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER = 3\n} VkSamplerAddressMode;\ntypedef enum VkFilter {\n    VK_FILTER_NEAREST = 0,\n    VK_FILTER_LINEAR = 1\n} VkFilter;\ntypedef enum VkSamplerMipmapMode {\n    VK_SAMPLER_MIPMAP_MODE_NEAREST = 0,\n    VK_SAMPLER_MIPMAP_MODE_LINEAR = 1\n} VkSamplerMipmapMode;\ntypedef enum VkVertexInputRate {\n    VK_VERTEX_INPUT_RATE_VERTEX = 0,\n    VK_VERTEX_INPUT_RATE_INSTANCE = 1\n} VkVertexInputRate;\ntypedef enum VkPipelineStageFlagBits {\n    VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT = 1,\n    VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT = 2,\n    VK_PIPELINE_STAGE_VERTEX_INPUT_BIT = 4,\n    VK_PIPELINE_STAGE_VERTEX_SHADER_BIT = 8,\n    VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT = 16,\n    VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT = 32,\n    VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT = 64,\n    VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT = 128,\n    VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT = 256,\n    VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT = 512,\n    VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT = 1024,\n    VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT = 2048,\n    VK_PIPELINE_STAGE_TRANSFER_BIT = 4096,\n    VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT = 8192,\n    VK_PIPELINE_STAGE_HOST_BIT = 16384,\n    VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT = 32768,\n    VK_PIPELINE_STAGE_ALL_COMMANDS_BIT = 65536\n} VkPipelineStageFlagBits;\ntypedef enum VkSparseImageFormatFlagBits {\n    VK_SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT = 1,\n    VK_SPARSE_IMAGE_FORMAT_ALIGNED_MIP_SIZE_BIT = 2,\n    VK_SPARSE_IMAGE_FORMAT_NONSTANDARD_BLOCK_SIZE_BIT = 4\n} VkSparseImageFormatFlagBits;\ntypedef enum VkSampleCountFlagBits {\n    VK_SAMPLE_COUNT_1_BIT = 1,\n    VK_SAMPLE_COUNT_2_BIT = 2,\n    VK_SAMPLE_COUNT_4_BIT = 4,\n    VK_SAMPLE_COUNT_8_BIT = 8,\n    VK_SAMPLE_COUNT_16_BIT = 16,\n    VK_SAMPLE_COUNT_32_BIT = 32,\n    VK_SAMPLE_COUNT_64_BIT = 64\n} VkSampleCountFlagBits;\ntypedef enum VkAttachmentDescriptionFlagBits {\n    VK_ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT = 1\n} VkAttachmentDescriptionFlagBits;\ntypedef enum VkDescriptorPoolCreateFlagBits {\n    VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT = 1\n} VkDescriptorPoolCreateFlagBits;\ntypedef enum VkDependencyFlagBits {\n    VK_DEPENDENCY_BY_REGION_BIT = 1,\n    VK_DEPENDENCY_DEVICE_GROUP_BIT = 4,\n    VK_DEPENDENCY_VIEW_LOCAL_BIT = 2\n} VkDependencyFlagBits;\ntypedef enum VkObjectType {\n    VK_OBJECT_TYPE_UNKNOWN = 0,\n    VK_OBJECT_TYPE_INSTANCE = 1,\n    VK_OBJECT_TYPE_PHYSICAL_DEVICE = 2,\n    VK_OBJECT_TYPE_DEVICE = 3,\n    VK_OBJECT_TYPE_QUEUE = 4,\n    VK_OBJECT_TYPE_SEMAPHORE = 5,\n    VK_OBJECT_TYPE_COMMAND_BUFFER = 6,\n    VK_OBJECT_TYPE_FENCE = 7,\n    VK_OBJECT_TYPE_DEVICE_MEMORY = 8,\n    VK_OBJECT_TYPE_BUFFER = 9,\n    VK_OBJECT_TYPE_IMAGE = 10,\n    VK_OBJECT_TYPE_EVENT = 11,\n    VK_OBJECT_TYPE_QUERY_POOL = 12,\n    VK_OBJECT_TYPE_BUFFER_VIEW = 13,\n    VK_OBJECT_TYPE_IMAGE_VIEW = 14,\n    VK_OBJECT_TYPE_SHADER_MODULE = 15,\n    VK_OBJECT_TYPE_PIPELINE_CACHE = 16,\n    VK_OBJECT_TYPE_PIPELINE_LAYOUT = 17,\n    VK_OBJECT_TYPE_RENDER_PASS = 18,\n    VK_OBJECT_TYPE_PIPELINE = 19,\n    VK_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT = 20,\n    VK_OBJECT_TYPE_SAMPLER = 21,\n    VK_OBJECT_TYPE_DESCRIPTOR_POOL = 22,\n    VK_OBJECT_TYPE_DESCRIPTOR_SET = 23,\n    VK_OBJECT_TYPE_FRAMEBUFFER = 24,\n    VK_OBJECT_TYPE_COMMAND_POOL = 25,\n    VK_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION = 1000156000,\n    VK_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE = 1000085000,\n    VK_OBJECT_TYPE_SURFACE_KHR = 1000000000,\n    VK_OBJECT_TYPE_SWAPCHAIN_KHR = 1000001000,\n    VK_OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT = 1000011000\n} VkObjectType;\ntypedef enum VkDescriptorUpdateTemplateType {\n    VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET = 0\n} VkDescriptorUpdateTemplateType;\n\ntypedef enum VkPointClippingBehavior {\n    VK_POINT_CLIPPING_BEHAVIOR_ALL_CLIP_PLANES = 0,\n    VK_POINT_CLIPPING_BEHAVIOR_USER_CLIP_PLANES_ONLY = 1\n} VkPointClippingBehavior;\ntypedef enum VkColorSpaceKHR {\n    VK_COLOR_SPACE_SRGB_NONLINEAR_KHR = 0,\n    VK_COLORSPACE_SRGB_NONLINEAR_KHR = VK_COLOR_SPACE_SRGB_NONLINEAR_KHR\n} VkColorSpaceKHR;\ntypedef enum VkCompositeAlphaFlagBitsKHR {\n    VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR = 1,\n    VK_COMPOSITE_ALPHA_PRE_MULTIPLIED_BIT_KHR = 2,\n    VK_COMPOSITE_ALPHA_POST_MULTIPLIED_BIT_KHR = 4,\n    VK_COMPOSITE_ALPHA_INHERIT_BIT_KHR = 8\n} VkCompositeAlphaFlagBitsKHR;\ntypedef enum VkPresentModeKHR {\n    VK_PRESENT_MODE_IMMEDIATE_KHR = 0,\n    VK_PRESENT_MODE_MAILBOX_KHR = 1,\n    VK_PRESENT_MODE_FIFO_KHR = 2,\n    VK_PRESENT_MODE_FIFO_RELAXED_KHR = 3\n} VkPresentModeKHR;\ntypedef enum VkSurfaceTransformFlagBitsKHR {\n    VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR = 1,\n    VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR = 2,\n    VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR = 4,\n    VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR = 8,\n    VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_BIT_KHR = 16,\n    VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_90_BIT_KHR = 32,\n    VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_180_BIT_KHR = 64,\n    VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_270_BIT_KHR = 128,\n    VK_SURFACE_TRANSFORM_INHERIT_BIT_KHR = 256\n} VkSurfaceTransformFlagBitsKHR;\ntypedef enum VkDebugReportFlagBitsEXT {\n    VK_DEBUG_REPORT_INFORMATION_BIT_EXT = 1,\n    VK_DEBUG_REPORT_WARNING_BIT_EXT = 2,\n    VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT = 4,\n    VK_DEBUG_REPORT_ERROR_BIT_EXT = 8,\n    VK_DEBUG_REPORT_DEBUG_BIT_EXT = 16\n} VkDebugReportFlagBitsEXT;\ntypedef enum VkDebugReportObjectTypeEXT {\n    VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT = 0,\n    VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT = 1,\n    VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT = 2,\n    VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT = 3,\n    VK_DEBUG_REPORT_OBJECT_TYPE_QUEUE_EXT = 4,\n    VK_DEBUG_REPORT_OBJECT_TYPE_SEMAPHORE_EXT = 5,\n    VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT = 6,\n    VK_DEBUG_REPORT_OBJECT_TYPE_FENCE_EXT = 7,\n    VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT = 8,\n    VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_EXT = 9,\n    VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT = 10,\n    VK_DEBUG_REPORT_OBJECT_TYPE_EVENT_EXT = 11,\n    VK_DEBUG_REPORT_OBJECT_TYPE_QUERY_POOL_EXT = 12,\n    VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_VIEW_EXT = 13,\n    VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_VIEW_EXT = 14,\n    VK_DEBUG_REPORT_OBJECT_TYPE_SHADER_MODULE_EXT = 15,\n    VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_CACHE_EXT = 16,\n    VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_LAYOUT_EXT = 17,\n    VK_DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT = 18,\n    VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT = 19,\n    VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT_EXT = 20,\n    VK_DEBUG_REPORT_OBJECT_TYPE_SAMPLER_EXT = 21,\n    VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_POOL_EXT = 22,\n    VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT = 23,\n    VK_DEBUG_REPORT_OBJECT_TYPE_FRAMEBUFFER_EXT = 24,\n    VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_POOL_EXT = 25,\n    VK_DEBUG_REPORT_OBJECT_TYPE_SURFACE_KHR_EXT = 26,\n    VK_DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT = 27,\n    VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT_EXT = 28,\n    VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_EXT = VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT_EXT,\n    VK_DEBUG_REPORT_OBJECT_TYPE_DISPLAY_KHR_EXT = 29,\n    VK_DEBUG_REPORT_OBJECT_TYPE_DISPLAY_MODE_KHR_EXT = 30,\n    VK_DEBUG_REPORT_OBJECT_TYPE_OBJECT_TABLE_NVX_EXT = 31,\n    VK_DEBUG_REPORT_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_NVX_EXT = 32,\n    VK_DEBUG_REPORT_OBJECT_TYPE_VALIDATION_CACHE_EXT_EXT = 33,\n    VK_DEBUG_REPORT_OBJECT_TYPE_VALIDATION_CACHE_EXT = VK_DEBUG_REPORT_OBJECT_TYPE_VALIDATION_CACHE_EXT_EXT,\n    VK_DEBUG_REPORT_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION_EXT = 1000156000,\n    VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_EXT = 1000085000\n} VkDebugReportObjectTypeEXT;\ntypedef enum VkExternalMemoryHandleTypeFlagBits {\n    VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT = 1,\n    VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT = 2,\n    VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT = 4,\n    VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT = 8,\n    VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_KMT_BIT = 16,\n    VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP_BIT = 32,\n    VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT = 64\n} VkExternalMemoryHandleTypeFlagBits;\ntypedef enum VkExternalMemoryFeatureFlagBits {\n    VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT = 1,\n    VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT = 2,\n    VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT = 4\n} VkExternalMemoryFeatureFlagBits;\ntypedef enum VkExternalSemaphoreHandleTypeFlagBits {\n    VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT = 1,\n    VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_BIT = 2,\n    VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT = 4,\n    VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE_BIT = 8,\n    VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT = 16\n} VkExternalSemaphoreHandleTypeFlagBits;\ntypedef enum VkExternalSemaphoreFeatureFlagBits {\n    VK_EXTERNAL_SEMAPHORE_FEATURE_EXPORTABLE_BIT = 1,\n    VK_EXTERNAL_SEMAPHORE_FEATURE_IMPORTABLE_BIT = 2\n} VkExternalSemaphoreFeatureFlagBits;\ntypedef enum VkSemaphoreImportFlagBits {\n    VK_SEMAPHORE_IMPORT_TEMPORARY_BIT = 1\n} VkSemaphoreImportFlagBits;\ntypedef enum VkExternalFenceHandleTypeFlagBits {\n    VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_FD_BIT = 1,\n    VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_BIT = 2,\n    VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT = 4,\n    VK_EXTERNAL_FENCE_HANDLE_TYPE_SYNC_FD_BIT = 8\n} VkExternalFenceHandleTypeFlagBits;\ntypedef enum VkExternalFenceFeatureFlagBits {\n    VK_EXTERNAL_FENCE_FEATURE_EXPORTABLE_BIT = 1,\n    VK_EXTERNAL_FENCE_FEATURE_IMPORTABLE_BIT = 2\n} VkExternalFenceFeatureFlagBits;\ntypedef enum VkFenceImportFlagBits {\n    VK_FENCE_IMPORT_TEMPORARY_BIT = 1\n} VkFenceImportFlagBits;\ntypedef enum VkPeerMemoryFeatureFlagBits {\n    VK_PEER_MEMORY_FEATURE_COPY_SRC_BIT = 1,\n    VK_PEER_MEMORY_FEATURE_COPY_DST_BIT = 2,\n    VK_PEER_MEMORY_FEATURE_GENERIC_SRC_BIT = 4,\n    VK_PEER_MEMORY_FEATURE_GENERIC_DST_BIT = 8\n} VkPeerMemoryFeatureFlagBits;\ntypedef enum VkMemoryAllocateFlagBits {\n    VK_MEMORY_ALLOCATE_DEVICE_MASK_BIT = 1\n} VkMemoryAllocateFlagBits;\ntypedef enum VkDeviceGroupPresentModeFlagBitsKHR {\n    VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_BIT_KHR = 1,\n    VK_DEVICE_GROUP_PRESENT_MODE_REMOTE_BIT_KHR = 2,\n    VK_DEVICE_GROUP_PRESENT_MODE_SUM_BIT_KHR = 4,\n    VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_MULTI_DEVICE_BIT_KHR = 8\n} VkDeviceGroupPresentModeFlagBitsKHR;\ntypedef enum VkSwapchainCreateFlagBitsKHR {\n    VK_SWAPCHAIN_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT_KHR = 1,\n    VK_SWAPCHAIN_CREATE_PROTECTED_BIT_KHR = 2\n} VkSwapchainCreateFlagBitsKHR;\ntypedef enum VkSubgroupFeatureFlagBits {\n    VK_SUBGROUP_FEATURE_BASIC_BIT = 1,\n    VK_SUBGROUP_FEATURE_VOTE_BIT = 2,\n    VK_SUBGROUP_FEATURE_ARITHMETIC_BIT = 4,\n    VK_SUBGROUP_FEATURE_BALLOT_BIT = 8,\n    VK_SUBGROUP_FEATURE_SHUFFLE_BIT = 16,\n    VK_SUBGROUP_FEATURE_SHUFFLE_RELATIVE_BIT = 32,\n    VK_SUBGROUP_FEATURE_CLUSTERED_BIT = 64,\n    VK_SUBGROUP_FEATURE_QUAD_BIT = 128\n} VkSubgroupFeatureFlagBits;\ntypedef enum VkTessellationDomainOrigin {\n    VK_TESSELLATION_DOMAIN_ORIGIN_UPPER_LEFT = 0,\n    VK_TESSELLATION_DOMAIN_ORIGIN_LOWER_LEFT = 1\n} VkTessellationDomainOrigin;\ntypedef enum VkSamplerYcbcrModelConversion {\n    VK_SAMPLER_YCBCR_MODEL_CONVERSION_RGB_IDENTITY = 0,\n    VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_IDENTITY = 1,\n    VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_709 = 2,\n    VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_601 = 3,\n    VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_2020 = 4\n} VkSamplerYcbcrModelConversion;\ntypedef enum VkSamplerYcbcrRange {\n    VK_SAMPLER_YCBCR_RANGE_ITU_FULL = 0,\n    VK_SAMPLER_YCBCR_RANGE_ITU_NARROW = 1\n} VkSamplerYcbcrRange;\ntypedef enum VkChromaLocation {\n    VK_CHROMA_LOCATION_COSITED_EVEN = 0,\n    VK_CHROMA_LOCATION_MIDPOINT = 1\n} VkChromaLocation;\ntypedef enum VkVendorId {\n    VK_VENDOR_ID_VIV = 0x10001,\n    VK_VENDOR_ID_VSI = 0x10002,\n    VK_VENDOR_ID_KAZAN = 0x10003\n} VkVendorId;\ntypedef void (VKAPI_PTR *PFN_vkInternalAllocationNotification)(\n    void*                                       pUserData,\n    size_t                                      size,\n    VkInternalAllocationType                    allocationType,\n    VkSystemAllocationScope                     allocationScope);\ntypedef void (VKAPI_PTR *PFN_vkInternalFreeNotification)(\n    void*                                       pUserData,\n    size_t                                      size,\n    VkInternalAllocationType                    allocationType,\n    VkSystemAllocationScope                     allocationScope);\ntypedef void* (VKAPI_PTR *PFN_vkReallocationFunction)(\n    void*                                       pUserData,\n    void*                                       pOriginal,\n    size_t                                      size,\n    size_t                                      alignment,\n    VkSystemAllocationScope                     allocationScope);\ntypedef void* (VKAPI_PTR *PFN_vkAllocationFunction)(\n    void*                                       pUserData,\n    size_t                                      size,\n    size_t                                      alignment,\n    VkSystemAllocationScope                     allocationScope);\ntypedef void (VKAPI_PTR *PFN_vkFreeFunction)(\n    void*                                       pUserData,\n    void*                                       pMemory);\ntypedef void (VKAPI_PTR *PFN_vkVoidFunction)(void);\ntypedef struct VkBaseOutStructure {\n    VkStructureType   sType;\n    struct  VkBaseOutStructure *  pNext;\n} VkBaseOutStructure;\ntypedef struct VkBaseInStructure {\n    VkStructureType   sType;\n    const struct  VkBaseInStructure *  pNext;\n} VkBaseInStructure;\ntypedef struct VkOffset2D {\n    int32_t          x;\n    int32_t          y;\n} VkOffset2D;\ntypedef struct VkOffset3D {\n    int32_t          x;\n    int32_t          y;\n    int32_t          z;\n} VkOffset3D;\ntypedef struct VkExtent2D {\n    uint32_t          width;\n    uint32_t          height;\n} VkExtent2D;\ntypedef struct VkExtent3D {\n    uint32_t          width;\n    uint32_t          height;\n    uint32_t          depth;\n} VkExtent3D;\ntypedef struct VkViewport {\n    float   x;\n    float   y;\n    float   width;\n    float   height;\n    float                         minDepth;\n    float                         maxDepth;\n} VkViewport;\ntypedef struct VkRect2D {\n    VkOffset2D       offset;\n    VkExtent2D       extent;\n} VkRect2D;\ntypedef struct VkClearRect {\n    VkRect2D         rect;\n    uint32_t         baseArrayLayer;\n    uint32_t         layerCount;\n} VkClearRect;\ntypedef struct VkComponentMapping {\n    VkComponentSwizzle   r;\n    VkComponentSwizzle   g;\n    VkComponentSwizzle   b;\n    VkComponentSwizzle   a;\n} VkComponentMapping;\ntypedef struct VkExtensionProperties {\n    char              extensionName [ VK_MAX_EXTENSION_NAME_SIZE ];\n    uint32_t          specVersion;\n} VkExtensionProperties;\ntypedef struct VkLayerProperties {\n    char              layerName [ VK_MAX_EXTENSION_NAME_SIZE ];\n    uint32_t          specVersion;\n    uint32_t          implementationVersion;\n    char              description [ VK_MAX_DESCRIPTION_SIZE ];\n} VkLayerProperties;\ntypedef struct VkApplicationInfo {\n    VkStructureType   sType;\n    const  void *      pNext;\n    const  char *      pApplicationName;\n    uint32_t          applicationVersion;\n    const  char *      pEngineName;\n    uint32_t          engineVersion;\n    uint32_t          apiVersion;\n} VkApplicationInfo;\ntypedef struct VkAllocationCallbacks {\n    void *            pUserData;\n    PFN_vkAllocationFunction     pfnAllocation;\n    PFN_vkReallocationFunction   pfnReallocation;\n    PFN_vkFreeFunction      pfnFree;\n    PFN_vkInternalAllocationNotification   pfnInternalAllocation;\n    PFN_vkInternalFreeNotification   pfnInternalFree;\n} VkAllocationCallbacks;\ntypedef struct VkDescriptorImageInfo {\n    VkSampler         sampler;\n    VkImageView       imageView;\n    VkImageLayout     imageLayout;\n} VkDescriptorImageInfo;\ntypedef struct VkCopyDescriptorSet {\n    VkStructureType   sType;\n    const  void *             pNext;\n    VkDescriptorSet          srcSet;\n    uint32_t                 srcBinding;\n    uint32_t                 srcArrayElement;\n    VkDescriptorSet          dstSet;\n    uint32_t                 dstBinding;\n    uint32_t                 dstArrayElement;\n    uint32_t                 descriptorCount;\n} VkCopyDescriptorSet;\ntypedef struct VkDescriptorPoolSize {\n    VkDescriptorType         type;\n    uint32_t                 descriptorCount;\n} VkDescriptorPoolSize;\ntypedef struct VkDescriptorSetAllocateInfo {\n    VkStructureType   sType;\n    const  void *             pNext;\n    VkDescriptorPool         descriptorPool;\n    uint32_t                 descriptorSetCount;\n    const  VkDescriptorSetLayout *  pSetLayouts;\n} VkDescriptorSetAllocateInfo;\ntypedef struct VkSpecializationMapEntry {\n    uint32_t                       constantID;\n    uint32_t                       offset;\n    size_t   size;\n} VkSpecializationMapEntry;\ntypedef struct VkSpecializationInfo {\n    uint32_t                 mapEntryCount;\n    const  VkSpecializationMapEntry *  pMapEntries;\n    size_t                   dataSize;\n    const  void *             pData;\n} VkSpecializationInfo;\ntypedef struct VkVertexInputBindingDescription {\n    uint32_t                 binding;\n    uint32_t                 stride;\n    VkVertexInputRate        inputRate;\n} VkVertexInputBindingDescription;\ntypedef struct VkVertexInputAttributeDescription {\n    uint32_t                 location;\n    uint32_t                 binding;\n    VkFormat                 format;\n    uint32_t                 offset;\n} VkVertexInputAttributeDescription;\ntypedef struct VkStencilOpState {\n    VkStencilOp              failOp;\n    VkStencilOp              passOp;\n    VkStencilOp              depthFailOp;\n    VkCompareOp              compareOp;\n    uint32_t                 compareMask;\n    uint32_t                 writeMask;\n    uint32_t                 reference;\n} VkStencilOpState;\ntypedef struct VkCommandBufferAllocateInfo {\n    VkStructureType   sType;\n    const  void *             pNext;\n    VkCommandPool            commandPool;\n    VkCommandBufferLevel     level;\n    uint32_t                 commandBufferCount;\n} VkCommandBufferAllocateInfo;\ntypedef union VkClearColorValue {\n    float                    float32 [4];\n    int32_t                  int32 [4];\n    uint32_t                 uint32 [4];\n} VkClearColorValue;\ntypedef struct VkClearDepthStencilValue {\n    float                    depth;\n    uint32_t                 stencil;\n} VkClearDepthStencilValue;\ntypedef union VkClearValue {\n    VkClearColorValue        color;\n    VkClearDepthStencilValue   depthStencil;\n} VkClearValue;\ntypedef struct VkAttachmentReference {\n    uint32_t                 attachment;\n    VkImageLayout            layout;\n} VkAttachmentReference;\ntypedef struct VkDrawIndirectCommand {\n    uint32_t                         vertexCount;\n    uint32_t                         instanceCount;\n    uint32_t                         firstVertex;\n    uint32_t   firstInstance;\n} VkDrawIndirectCommand;\ntypedef struct VkDrawIndexedIndirectCommand {\n    uint32_t                         indexCount;\n    uint32_t                         instanceCount;\n    uint32_t                         firstIndex;\n    int32_t                          vertexOffset;\n    uint32_t   firstInstance;\n} VkDrawIndexedIndirectCommand;\ntypedef struct VkDispatchIndirectCommand {\n    uint32_t   x;\n    uint32_t   y;\n    uint32_t   z;\n} VkDispatchIndirectCommand;\ntypedef struct VkSurfaceFormatKHR {\n    VkFormat                           format;\n    VkColorSpaceKHR                    colorSpace;\n} VkSurfaceFormatKHR;\ntypedef struct VkPresentInfoKHR {\n    VkStructureType   sType;\n    const  void *   pNext;\n    uint32_t           waitSemaphoreCount;\n    const  VkSemaphore *  pWaitSemaphores;\n    uint32_t                           swapchainCount;\n    const  VkSwapchainKHR *  pSwapchains;\n    const  uint32_t *  pImageIndices;\n    VkResult *  pResults;\n} VkPresentInfoKHR;\ntypedef struct VkPhysicalDeviceExternalImageFormatInfo {\n    VkStructureType   sType;\n    const  void *                       pNext;\n    VkExternalMemoryHandleTypeFlagBits   handleType;\n} VkPhysicalDeviceExternalImageFormatInfo;\ntypedef struct VkPhysicalDeviceExternalSemaphoreInfo {\n    VkStructureType   sType;\n    const  void *                       pNext;\n    VkExternalSemaphoreHandleTypeFlagBits   handleType;\n} VkPhysicalDeviceExternalSemaphoreInfo;\ntypedef struct VkPhysicalDeviceExternalFenceInfo {\n    VkStructureType   sType;\n    const  void *                       pNext;\n    VkExternalFenceHandleTypeFlagBits   handleType;\n} VkPhysicalDeviceExternalFenceInfo;\ntypedef struct VkPhysicalDeviceMultiviewProperties {\n    VkStructureType   sType;\n    void *                             pNext;\n    uint32_t                           maxMultiviewViewCount;\n    uint32_t                           maxMultiviewInstanceIndex;\n} VkPhysicalDeviceMultiviewProperties;\ntypedef struct VkRenderPassMultiviewCreateInfo {\n    VkStructureType          sType;\n    const  void *             pNext;\n    uint32_t                 subpassCount;\n    const  uint32_t *      pViewMasks;\n    uint32_t                 dependencyCount;\n    const  int32_t *    pViewOffsets;\n    uint32_t                 correlationMaskCount;\n    const  uint32_t *  pCorrelationMasks;\n} VkRenderPassMultiviewCreateInfo;\ntypedef struct VkBindBufferMemoryDeviceGroupInfo {\n    VkStructureType   sType;\n    const  void *                       pNext;\n    uint32_t           deviceIndexCount;\n    const  uint32_t *   pDeviceIndices;\n} VkBindBufferMemoryDeviceGroupInfo;\ntypedef struct VkBindImageMemoryDeviceGroupInfo {\n    VkStructureType   sType;\n    const  void *                       pNext;\n    uint32_t           deviceIndexCount;\n    const  uint32_t *   pDeviceIndices;\n    uint32_t           splitInstanceBindRegionCount;\n    const  VkRect2D *   pSplitInstanceBindRegions;\n} VkBindImageMemoryDeviceGroupInfo;\ntypedef struct VkDeviceGroupRenderPassBeginInfo {\n    VkStructureType   sType;\n    const  void *                       pNext;\n    uint32_t                           deviceMask;\n    uint32_t           deviceRenderAreaCount;\n    const  VkRect2D *   pDeviceRenderAreas;\n} VkDeviceGroupRenderPassBeginInfo;\ntypedef struct VkDeviceGroupCommandBufferBeginInfo {\n    VkStructureType   sType;\n    const  void *                       pNext;\n    uint32_t                           deviceMask;\n} VkDeviceGroupCommandBufferBeginInfo;\ntypedef struct VkDeviceGroupSubmitInfo {\n    VkStructureType   sType;\n    const  void *                       pNext;\n    uint32_t           waitSemaphoreCount;\n    const  uint32_t *     pWaitSemaphoreDeviceIndices;\n    uint32_t           commandBufferCount;\n    const  uint32_t *     pCommandBufferDeviceMasks;\n    uint32_t           signalSemaphoreCount;\n    const  uint32_t *   pSignalSemaphoreDeviceIndices;\n} VkDeviceGroupSubmitInfo;\ntypedef struct VkDeviceGroupBindSparseInfo {\n    VkStructureType   sType;\n    const  void *                       pNext;\n    uint32_t                           resourceDeviceIndex;\n    uint32_t                           memoryDeviceIndex;\n} VkDeviceGroupBindSparseInfo;\ntypedef struct VkImageSwapchainCreateInfoKHR {\n    VkStructureType   sType;\n    const  void *                       pNext;\n    VkSwapchainKHR     swapchain;\n} VkImageSwapchainCreateInfoKHR;\ntypedef struct VkBindImageMemorySwapchainInfoKHR {\n    VkStructureType   sType;\n    const  void *                       pNext;\n    VkSwapchainKHR   swapchain;\n    uint32_t                           imageIndex;\n} VkBindImageMemorySwapchainInfoKHR;\ntypedef struct VkAcquireNextImageInfoKHR {\n    VkStructureType   sType;\n    const  void *                       pNext;\n    VkSwapchainKHR   swapchain;\n    uint64_t                           timeout;\n    VkSemaphore   semaphore;\n    VkFence   fence;\n    uint32_t                           deviceMask;\n} VkAcquireNextImageInfoKHR;\ntypedef struct VkDeviceGroupPresentInfoKHR {\n    VkStructureType   sType;\n    const  void *                       pNext;\n    uint32_t           swapchainCount;\n    const  uint32_t *  pDeviceMasks;\n    VkDeviceGroupPresentModeFlagBitsKHR   mode;\n} VkDeviceGroupPresentInfoKHR;\ntypedef struct VkDeviceGroupDeviceCreateInfo {\n    VkStructureType   sType;\n    const  void *                       pNext;\n    uint32_t                           physicalDeviceCount;\n    const  VkPhysicalDevice *   pPhysicalDevices;\n} VkDeviceGroupDeviceCreateInfo;\ntypedef struct VkDescriptorUpdateTemplateEntry {\n    uint32_t                           dstBinding;\n    uint32_t                           dstArrayElement;\n    uint32_t                           descriptorCount;\n    VkDescriptorType                   descriptorType;\n    size_t                             offset;\n    size_t                             stride;\n} VkDescriptorUpdateTemplateEntry;\ntypedef struct VkBufferMemoryRequirementsInfo2 {\n    VkStructureType   sType;\n    const  void *                                                           pNext;\n    VkBuffer                                                               buffer;\n} VkBufferMemoryRequirementsInfo2;\ntypedef struct VkImageMemoryRequirementsInfo2 {\n    VkStructureType   sType;\n    const  void *                                                           pNext;\n    VkImage                                                                image;\n} VkImageMemoryRequirementsInfo2;\ntypedef struct VkImageSparseMemoryRequirementsInfo2 {\n    VkStructureType   sType;\n    const  void *                                                           pNext;\n    VkImage                                                                image;\n} VkImageSparseMemoryRequirementsInfo2;\ntypedef struct VkPhysicalDevicePointClippingProperties {\n    VkStructureType   sType;\n    void *                             pNext;\n    VkPointClippingBehavior        pointClippingBehavior;\n} VkPhysicalDevicePointClippingProperties;\ntypedef struct VkMemoryDedicatedAllocateInfo {\n    VkStructureType   sType;\n    const  void *                       pNext;\n    VkImage            image;\n    VkBuffer           buffer;\n} VkMemoryDedicatedAllocateInfo;\ntypedef struct VkPipelineTessellationDomainOriginStateCreateInfo {\n    VkStructureType   sType;\n    const  void *                       pNext;\n    VkTessellationDomainOrigin      domainOrigin;\n} VkPipelineTessellationDomainOriginStateCreateInfo;\ntypedef struct VkSamplerYcbcrConversionInfo {\n    VkStructureType   sType;\n    const  void *                       pNext;\n    VkSamplerYcbcrConversion        conversion;\n} VkSamplerYcbcrConversionInfo;\ntypedef struct VkBindImagePlaneMemoryInfo {\n    VkStructureType   sType;\n    const  void *                       pNext;\n    VkImageAspectFlagBits              planeAspect;\n} VkBindImagePlaneMemoryInfo;\ntypedef struct VkImagePlaneMemoryRequirementsInfo {\n    VkStructureType   sType;\n    const  void *                       pNext;\n    VkImageAspectFlagBits              planeAspect;\n} VkImagePlaneMemoryRequirementsInfo;\ntypedef struct VkSamplerYcbcrConversionImageFormatProperties {\n    VkStructureType   sType;\n    void *       pNext;\n    uint32_t                           combinedImageSamplerDescriptorCount;\n} VkSamplerYcbcrConversionImageFormatProperties;\ntypedef uint32_t VkSampleMask;\ntypedef uint32_t VkBool32;\ntypedef uint32_t VkFlags;\ntypedef uint64_t VkDeviceSize;\ntypedef VkFlags VkFramebufferCreateFlags;\ntypedef VkFlags VkQueryPoolCreateFlags;\ntypedef VkFlags VkRenderPassCreateFlags;\ntypedef VkFlags VkSamplerCreateFlags;\ntypedef VkFlags VkPipelineLayoutCreateFlags;\ntypedef VkFlags VkPipelineCacheCreateFlags;\ntypedef VkFlags VkPipelineDepthStencilStateCreateFlags;\ntypedef VkFlags VkPipelineDynamicStateCreateFlags;\ntypedef VkFlags VkPipelineColorBlendStateCreateFlags;\ntypedef VkFlags VkPipelineMultisampleStateCreateFlags;\ntypedef VkFlags VkPipelineRasterizationStateCreateFlags;\ntypedef VkFlags VkPipelineViewportStateCreateFlags;\ntypedef VkFlags VkPipelineTessellationStateCreateFlags;\ntypedef VkFlags VkPipelineInputAssemblyStateCreateFlags;\ntypedef VkFlags VkPipelineVertexInputStateCreateFlags;\ntypedef VkFlags VkPipelineShaderStageCreateFlags;\ntypedef VkFlags VkDescriptorSetLayoutCreateFlags;\ntypedef VkFlags VkBufferViewCreateFlags;\ntypedef VkFlags VkInstanceCreateFlags;\ntypedef VkFlags VkDeviceCreateFlags;\ntypedef VkFlags VkDeviceQueueCreateFlags;\ntypedef VkFlags VkQueueFlags;\ntypedef VkFlags VkMemoryPropertyFlags;\ntypedef VkFlags VkMemoryHeapFlags;\ntypedef VkFlags VkAccessFlags;\ntypedef VkFlags VkBufferUsageFlags;\ntypedef VkFlags VkBufferCreateFlags;\ntypedef VkFlags VkShaderStageFlags;\ntypedef VkFlags VkImageUsageFlags;\ntypedef VkFlags VkImageCreateFlags;\ntypedef VkFlags VkImageViewCreateFlags;\ntypedef VkFlags VkPipelineCreateFlags;\ntypedef VkFlags VkColorComponentFlags;\ntypedef VkFlags VkFenceCreateFlags;\ntypedef VkFlags VkSemaphoreCreateFlags;\ntypedef VkFlags VkFormatFeatureFlags;\ntypedef VkFlags VkQueryControlFlags;\ntypedef VkFlags VkQueryResultFlags;\ntypedef VkFlags VkShaderModuleCreateFlags;\ntypedef VkFlags VkEventCreateFlags;\ntypedef VkFlags VkCommandPoolCreateFlags;\ntypedef VkFlags VkCommandPoolResetFlags;\ntypedef VkFlags VkCommandBufferResetFlags;\ntypedef VkFlags VkCommandBufferUsageFlags;\ntypedef VkFlags VkQueryPipelineStatisticFlags;\ntypedef VkFlags VkMemoryMapFlags;\ntypedef VkFlags VkImageAspectFlags;\ntypedef VkFlags VkSparseMemoryBindFlags;\ntypedef VkFlags VkSparseImageFormatFlags;\ntypedef VkFlags VkSubpassDescriptionFlags;\ntypedef VkFlags VkPipelineStageFlags;\ntypedef VkFlags VkSampleCountFlags;\ntypedef VkFlags VkAttachmentDescriptionFlags;\ntypedef VkFlags VkStencilFaceFlags;\ntypedef VkFlags VkCullModeFlags;\ntypedef VkFlags VkDescriptorPoolCreateFlags;\ntypedef VkFlags VkDescriptorPoolResetFlags;\ntypedef VkFlags VkDependencyFlags;\ntypedef VkFlags VkSubgroupFeatureFlags;\ntypedef VkFlags VkDescriptorUpdateTemplateCreateFlags;\ntypedef VkFlags VkCompositeAlphaFlagsKHR;\ntypedef VkFlags VkSurfaceTransformFlagsKHR;\ntypedef VkFlags VkSwapchainCreateFlagsKHR;\ntypedef VkFlags VkPeerMemoryFeatureFlags;\ntypedef VkFlags VkMemoryAllocateFlags;\ntypedef VkFlags VkDeviceGroupPresentModeFlagsKHR;\ntypedef VkFlags VkDebugReportFlagsEXT;\ntypedef VkFlags VkCommandPoolTrimFlags;\ntypedef VkFlags VkExternalMemoryHandleTypeFlags;\ntypedef VkFlags VkExternalMemoryFeatureFlags;\ntypedef VkFlags VkExternalSemaphoreHandleTypeFlags;\ntypedef VkFlags VkExternalSemaphoreFeatureFlags;\ntypedef VkFlags VkSemaphoreImportFlags;\ntypedef VkFlags VkExternalFenceHandleTypeFlags;\ntypedef VkFlags VkExternalFenceFeatureFlags;\ntypedef VkFlags VkFenceImportFlags;\ntypedef VkBool32 (VKAPI_PTR *PFN_vkDebugReportCallbackEXT)(\n    VkDebugReportFlagsEXT                       flags,\n    VkDebugReportObjectTypeEXT                  objectType,\n    uint64_t                                    object,\n    size_t                                      location,\n    int32_t                                     messageCode,\n    const char*                                 pLayerPrefix,\n    const char*                                 pMessage,\n    void*                                       pUserData);\ntypedef struct VkDeviceQueueCreateInfo {\n    VkStructureType   sType;\n    const  void *      pNext;\n    VkDeviceQueueCreateFlags      flags;\n    uint32_t          queueFamilyIndex;\n    uint32_t          queueCount;\n    const  float *     pQueuePriorities;\n} VkDeviceQueueCreateInfo;\ntypedef struct VkInstanceCreateInfo {\n    VkStructureType   sType;\n    const  void *      pNext;\n    VkInstanceCreateFlags    flags;\n    const  VkApplicationInfo *  pApplicationInfo;\n    uint32_t                 enabledLayerCount;\n    const  char * const*       ppEnabledLayerNames;\n    uint32_t                 enabledExtensionCount;\n    const  char * const*       ppEnabledExtensionNames;\n} VkInstanceCreateInfo;\ntypedef struct VkQueueFamilyProperties {\n    VkQueueFlags             queueFlags;\n    uint32_t                 queueCount;\n    uint32_t                 timestampValidBits;\n    VkExtent3D               minImageTransferGranularity;\n} VkQueueFamilyProperties;\ntypedef struct VkMemoryAllocateInfo {\n    VkStructureType   sType;\n    const  void *             pNext;\n    VkDeviceSize             allocationSize;\n    uint32_t                 memoryTypeIndex;\n} VkMemoryAllocateInfo;\ntypedef struct VkMemoryRequirements {\n    VkDeviceSize             size;\n    VkDeviceSize             alignment;\n    uint32_t                 memoryTypeBits;\n} VkMemoryRequirements;\ntypedef struct VkSparseImageFormatProperties {\n    VkImageAspectFlags       aspectMask;\n    VkExtent3D               imageGranularity;\n    VkSparseImageFormatFlags   flags;\n} VkSparseImageFormatProperties;\ntypedef struct VkSparseImageMemoryRequirements {\n    VkSparseImageFormatProperties   formatProperties;\n    uint32_t                 imageMipTailFirstLod;\n    VkDeviceSize             imageMipTailSize;\n    VkDeviceSize             imageMipTailOffset;\n    VkDeviceSize             imageMipTailStride;\n} VkSparseImageMemoryRequirements;\ntypedef struct VkMemoryType {\n    VkMemoryPropertyFlags    propertyFlags;\n    uint32_t                 heapIndex;\n} VkMemoryType;\ntypedef struct VkMemoryHeap {\n    VkDeviceSize             size;\n    VkMemoryHeapFlags        flags;\n} VkMemoryHeap;\ntypedef struct VkMappedMemoryRange {\n    VkStructureType   sType;\n    const  void *             pNext;\n    VkDeviceMemory           memory;\n    VkDeviceSize             offset;\n    VkDeviceSize             size;\n} VkMappedMemoryRange;\ntypedef struct VkFormatProperties {\n    VkFormatFeatureFlags     linearTilingFeatures;\n    VkFormatFeatureFlags     optimalTilingFeatures;\n    VkFormatFeatureFlags     bufferFeatures;\n} VkFormatProperties;\ntypedef struct VkImageFormatProperties {\n    VkExtent3D               maxExtent;\n    uint32_t                 maxMipLevels;\n    uint32_t                 maxArrayLayers;\n    VkSampleCountFlags       sampleCounts;\n    VkDeviceSize             maxResourceSize;\n} VkImageFormatProperties;\ntypedef struct VkDescriptorBufferInfo {\n    VkBuffer                 buffer;\n    VkDeviceSize             offset;\n    VkDeviceSize             range;\n} VkDescriptorBufferInfo;\ntypedef struct VkWriteDescriptorSet {\n    VkStructureType   sType;\n    const  void *             pNext;\n    VkDescriptorSet          dstSet;\n    uint32_t                 dstBinding;\n    uint32_t                 dstArrayElement;\n    uint32_t                 descriptorCount;\n    VkDescriptorType         descriptorType;\n    const  VkDescriptorImageInfo *  pImageInfo;\n    const  VkDescriptorBufferInfo *  pBufferInfo;\n    const  VkBufferView *     pTexelBufferView;\n} VkWriteDescriptorSet;\ntypedef struct VkBufferCreateInfo {\n    VkStructureType   sType;\n    const  void *             pNext;\n    VkBufferCreateFlags      flags;\n    VkDeviceSize             size;\n    VkBufferUsageFlags       usage;\n    VkSharingMode            sharingMode;\n    uint32_t                 queueFamilyIndexCount;\n    const  uint32_t *         pQueueFamilyIndices;\n} VkBufferCreateInfo;\ntypedef struct VkBufferViewCreateInfo {\n    VkStructureType   sType;\n    const  void *             pNext;\n    VkBufferViewCreateFlags flags;\n    VkBuffer                 buffer;\n    VkFormat                 format;\n    VkDeviceSize             offset;\n    VkDeviceSize             range;\n} VkBufferViewCreateInfo;\ntypedef struct VkImageSubresource {\n    VkImageAspectFlags       aspectMask;\n    uint32_t                 mipLevel;\n    uint32_t                 arrayLayer;\n} VkImageSubresource;\ntypedef struct VkImageSubresourceLayers {\n    VkImageAspectFlags       aspectMask;\n    uint32_t                 mipLevel;\n    uint32_t                 baseArrayLayer;\n    uint32_t                 layerCount;\n} VkImageSubresourceLayers;\ntypedef struct VkImageSubresourceRange {\n    VkImageAspectFlags       aspectMask;\n    uint32_t                 baseMipLevel;\n    uint32_t                 levelCount;\n    uint32_t                 baseArrayLayer;\n    uint32_t                 layerCount;\n} VkImageSubresourceRange;\ntypedef struct VkMemoryBarrier {\n    VkStructureType   sType;\n    const  void *             pNext;\n    VkAccessFlags            srcAccessMask;\n    VkAccessFlags            dstAccessMask;\n} VkMemoryBarrier;\ntypedef struct VkBufferMemoryBarrier {\n    VkStructureType   sType;\n    const  void *             pNext;\n    VkAccessFlags            srcAccessMask;\n    VkAccessFlags            dstAccessMask;\n    uint32_t                 srcQueueFamilyIndex;\n    uint32_t                 dstQueueFamilyIndex;\n    VkBuffer                 buffer;\n    VkDeviceSize             offset;\n    VkDeviceSize             size;\n} VkBufferMemoryBarrier;\ntypedef struct VkImageMemoryBarrier {\n    VkStructureType   sType;\n    const  void *             pNext;\n    VkAccessFlags            srcAccessMask;\n    VkAccessFlags            dstAccessMask;\n    VkImageLayout            oldLayout;\n    VkImageLayout            newLayout;\n    uint32_t                 srcQueueFamilyIndex;\n    uint32_t                 dstQueueFamilyIndex;\n    VkImage                  image;\n    VkImageSubresourceRange   subresourceRange;\n} VkImageMemoryBarrier;\ntypedef struct VkImageCreateInfo {\n    VkStructureType   sType;\n    const  void *             pNext;\n    VkImageCreateFlags       flags;\n    VkImageType              imageType;\n    VkFormat                 format;\n    VkExtent3D               extent;\n    uint32_t                 mipLevels;\n    uint32_t                 arrayLayers;\n    VkSampleCountFlagBits    samples;\n    VkImageTiling            tiling;\n    VkImageUsageFlags        usage;\n    VkSharingMode            sharingMode;\n    uint32_t                 queueFamilyIndexCount;\n    const  uint32_t *         pQueueFamilyIndices;\n    VkImageLayout            initialLayout;\n} VkImageCreateInfo;\ntypedef struct VkSubresourceLayout {\n    VkDeviceSize             offset;\n    VkDeviceSize             size;\n    VkDeviceSize             rowPitch;\n    VkDeviceSize             arrayPitch;\n    VkDeviceSize             depthPitch;\n} VkSubresourceLayout;\ntypedef struct VkImageViewCreateInfo {\n    VkStructureType   sType;\n    const  void *             pNext;\n    VkImageViewCreateFlags   flags;\n    VkImage                  image;\n    VkImageViewType          viewType;\n    VkFormat                 format;\n    VkComponentMapping       components;\n    VkImageSubresourceRange   subresourceRange;\n} VkImageViewCreateInfo;\ntypedef struct VkBufferCopy {\n    VkDeviceSize                         srcOffset;\n    VkDeviceSize                         dstOffset;\n    VkDeviceSize   size;\n} VkBufferCopy;\ntypedef struct VkSparseMemoryBind {\n    VkDeviceSize             resourceOffset;\n    VkDeviceSize             size;\n    VkDeviceMemory           memory;\n    VkDeviceSize             memoryOffset;\n    VkSparseMemoryBindFlags flags;\n} VkSparseMemoryBind;\ntypedef struct VkSparseImageMemoryBind {\n    VkImageSubresource       subresource;\n    VkOffset3D               offset;\n    VkExtent3D               extent;\n    VkDeviceMemory           memory;\n    VkDeviceSize             memoryOffset;\n    VkSparseMemoryBindFlags flags;\n} VkSparseImageMemoryBind;\ntypedef struct VkSparseBufferMemoryBindInfo {\n    VkBuffer   buffer;\n    uint32_t                 bindCount;\n    const  VkSparseMemoryBind *  pBinds;\n} VkSparseBufferMemoryBindInfo;\ntypedef struct VkSparseImageOpaqueMemoryBindInfo {\n    VkImage   image;\n    uint32_t                 bindCount;\n    const  VkSparseMemoryBind *  pBinds;\n} VkSparseImageOpaqueMemoryBindInfo;\ntypedef struct VkSparseImageMemoryBindInfo {\n    VkImage   image;\n    uint32_t                 bindCount;\n    const  VkSparseImageMemoryBind *  pBinds;\n} VkSparseImageMemoryBindInfo;\ntypedef struct VkBindSparseInfo {\n    VkStructureType   sType;\n    const  void *             pNext;\n    uint32_t                 waitSemaphoreCount;\n    const  VkSemaphore *      pWaitSemaphores;\n    uint32_t                 bufferBindCount;\n    const  VkSparseBufferMemoryBindInfo *  pBufferBinds;\n    uint32_t                 imageOpaqueBindCount;\n    const  VkSparseImageOpaqueMemoryBindInfo *  pImageOpaqueBinds;\n    uint32_t                 imageBindCount;\n    const  VkSparseImageMemoryBindInfo *  pImageBinds;\n    uint32_t                 signalSemaphoreCount;\n    const  VkSemaphore *      pSignalSemaphores;\n} VkBindSparseInfo;\ntypedef struct VkImageCopy {\n    VkImageSubresourceLayers   srcSubresource;\n    VkOffset3D               srcOffset;\n    VkImageSubresourceLayers   dstSubresource;\n    VkOffset3D               dstOffset;\n    VkExtent3D               extent;\n} VkImageCopy;\ntypedef struct VkImageBlit {\n    VkImageSubresourceLayers   srcSubresource;\n    VkOffset3D               srcOffsets [2];\n    VkImageSubresourceLayers   dstSubresource;\n    VkOffset3D               dstOffsets [2];\n} VkImageBlit;\ntypedef struct VkBufferImageCopy {\n    VkDeviceSize             bufferOffset;\n    uint32_t                 bufferRowLength;\n    uint32_t                 bufferImageHeight;\n    VkImageSubresourceLayers   imageSubresource;\n    VkOffset3D               imageOffset;\n    VkExtent3D               imageExtent;\n} VkBufferImageCopy;\ntypedef struct VkImageResolve {\n    VkImageSubresourceLayers   srcSubresource;\n    VkOffset3D               srcOffset;\n    VkImageSubresourceLayers   dstSubresource;\n    VkOffset3D               dstOffset;\n    VkExtent3D               extent;\n} VkImageResolve;\ntypedef struct VkShaderModuleCreateInfo {\n    VkStructureType   sType;\n    const  void *             pNext;\n    VkShaderModuleCreateFlags   flags;\n    size_t                   codeSize;\n    const  uint32_t *             pCode;\n} VkShaderModuleCreateInfo;\ntypedef struct VkDescriptorSetLayoutBinding {\n    uint32_t                 binding;\n    VkDescriptorType         descriptorType;\n    uint32_t   descriptorCount;\n    VkShaderStageFlags       stageFlags;\n    const  VkSampler *        pImmutableSamplers;\n} VkDescriptorSetLayoutBinding;\ntypedef struct VkDescriptorSetLayoutCreateInfo {\n    VkStructureType   sType;\n    const  void *             pNext;\n    VkDescriptorSetLayoutCreateFlags      flags;\n    uint32_t                 bindingCount;\n    const  VkDescriptorSetLayoutBinding *  pBindings;\n} VkDescriptorSetLayoutCreateInfo;\ntypedef struct VkDescriptorPoolCreateInfo {\n    VkStructureType   sType;\n    const  void *             pNext;\n    VkDescriptorPoolCreateFlags    flags;\n    uint32_t                 maxSets;\n    uint32_t                 poolSizeCount;\n    const  VkDescriptorPoolSize *  pPoolSizes;\n} VkDescriptorPoolCreateInfo;\ntypedef struct VkPipelineShaderStageCreateInfo {\n    VkStructureType   sType;\n    const  void *             pNext;\n    VkPipelineShaderStageCreateFlags      flags;\n    VkShaderStageFlagBits    stage;\n    VkShaderModule           module;\n    const  char *             pName;\n    const  VkSpecializationInfo *  pSpecializationInfo;\n} VkPipelineShaderStageCreateInfo;\ntypedef struct VkComputePipelineCreateInfo {\n    VkStructureType   sType;\n    const  void *             pNext;\n    VkPipelineCreateFlags    flags;\n    VkPipelineShaderStageCreateInfo   stage;\n    VkPipelineLayout         layout;\n    VkPipeline        basePipelineHandle;\n    int32_t                  basePipelineIndex;\n} VkComputePipelineCreateInfo;\ntypedef struct VkPipelineVertexInputStateCreateInfo {\n    VkStructureType   sType;\n    const  void *             pNext;\n    VkPipelineVertexInputStateCreateFlags      flags;\n    uint32_t                 vertexBindingDescriptionCount;\n    const  VkVertexInputBindingDescription *  pVertexBindingDescriptions;\n    uint32_t                 vertexAttributeDescriptionCount;\n    const  VkVertexInputAttributeDescription *  pVertexAttributeDescriptions;\n} VkPipelineVertexInputStateCreateInfo;\ntypedef struct VkPipelineInputAssemblyStateCreateInfo {\n    VkStructureType   sType;\n    const  void *             pNext;\n    VkPipelineInputAssemblyStateCreateFlags      flags;\n    VkPrimitiveTopology      topology;\n    VkBool32                 primitiveRestartEnable;\n} VkPipelineInputAssemblyStateCreateInfo;\ntypedef struct VkPipelineTessellationStateCreateInfo {\n    VkStructureType   sType;\n    const  void *             pNext;\n    VkPipelineTessellationStateCreateFlags      flags;\n    uint32_t                 patchControlPoints;\n} VkPipelineTessellationStateCreateInfo;\ntypedef struct VkPipelineViewportStateCreateInfo {\n    VkStructureType   sType;\n    const  void *             pNext;\n    VkPipelineViewportStateCreateFlags      flags;\n    uint32_t                 viewportCount;\n    const  VkViewport *       pViewports;\n    uint32_t                 scissorCount;\n    const  VkRect2D *         pScissors;\n} VkPipelineViewportStateCreateInfo;\ntypedef struct VkPipelineRasterizationStateCreateInfo {\n    VkStructureType   sType;\n    const  void *  pNext;\n    VkPipelineRasterizationStateCreateFlags      flags;\n    VkBool32                 depthClampEnable;\n    VkBool32                 rasterizerDiscardEnable;\n    VkPolygonMode            polygonMode;\n    VkCullModeFlags          cullMode;\n    VkFrontFace              frontFace;\n    VkBool32                 depthBiasEnable;\n    float                    depthBiasConstantFactor;\n    float                    depthBiasClamp;\n    float                    depthBiasSlopeFactor;\n    float                    lineWidth;\n} VkPipelineRasterizationStateCreateInfo;\ntypedef struct VkPipelineMultisampleStateCreateInfo {\n    VkStructureType   sType;\n    const  void *             pNext;\n    VkPipelineMultisampleStateCreateFlags      flags;\n    VkSampleCountFlagBits    rasterizationSamples;\n    VkBool32                 sampleShadingEnable;\n    float                    minSampleShading;\n    const  VkSampleMask *     pSampleMask;\n    VkBool32                 alphaToCoverageEnable;\n    VkBool32                 alphaToOneEnable;\n} VkPipelineMultisampleStateCreateInfo;\ntypedef struct VkPipelineColorBlendAttachmentState {\n    VkBool32                 blendEnable;\n    VkBlendFactor            srcColorBlendFactor;\n    VkBlendFactor            dstColorBlendFactor;\n    VkBlendOp                colorBlendOp;\n    VkBlendFactor            srcAlphaBlendFactor;\n    VkBlendFactor            dstAlphaBlendFactor;\n    VkBlendOp                alphaBlendOp;\n    VkColorComponentFlags    colorWriteMask;\n} VkPipelineColorBlendAttachmentState;\ntypedef struct VkPipelineColorBlendStateCreateInfo {\n    VkStructureType   sType;\n    const  void *             pNext;\n    VkPipelineColorBlendStateCreateFlags      flags;\n    VkBool32                 logicOpEnable;\n    VkLogicOp                logicOp;\n    uint32_t                 attachmentCount;\n    const  VkPipelineColorBlendAttachmentState *  pAttachments;\n    float                    blendConstants [4];\n} VkPipelineColorBlendStateCreateInfo;\ntypedef struct VkPipelineDynamicStateCreateInfo {\n    VkStructureType   sType;\n    const  void *             pNext;\n    VkPipelineDynamicStateCreateFlags      flags;\n    uint32_t                 dynamicStateCount;\n    const  VkDynamicState *   pDynamicStates;\n} VkPipelineDynamicStateCreateInfo;\ntypedef struct VkPipelineDepthStencilStateCreateInfo {\n    VkStructureType   sType;\n    const  void *             pNext;\n    VkPipelineDepthStencilStateCreateFlags      flags;\n    VkBool32                 depthTestEnable;\n    VkBool32                 depthWriteEnable;\n    VkCompareOp              depthCompareOp;\n    VkBool32                 depthBoundsTestEnable;\n    VkBool32                 stencilTestEnable;\n    VkStencilOpState         front;\n    VkStencilOpState         back;\n    float                    minDepthBounds;\n    float                    maxDepthBounds;\n} VkPipelineDepthStencilStateCreateInfo;\ntypedef struct VkGraphicsPipelineCreateInfo {\n    VkStructureType   sType;\n    const  void *             pNext;\n    VkPipelineCreateFlags    flags;\n    uint32_t                 stageCount;\n    const  VkPipelineShaderStageCreateInfo *  pStages;\n    const  VkPipelineVertexInputStateCreateInfo *  pVertexInputState;\n    const  VkPipelineInputAssemblyStateCreateInfo *  pInputAssemblyState;\n    const  VkPipelineTessellationStateCreateInfo *  pTessellationState;\n    const  VkPipelineViewportStateCreateInfo *  pViewportState;\n    const  VkPipelineRasterizationStateCreateInfo *  pRasterizationState;\n    const  VkPipelineMultisampleStateCreateInfo *  pMultisampleState;\n    const  VkPipelineDepthStencilStateCreateInfo *  pDepthStencilState;\n    const  VkPipelineColorBlendStateCreateInfo *  pColorBlendState;\n    const  VkPipelineDynamicStateCreateInfo *  pDynamicState;\n    VkPipelineLayout         layout;\n    VkRenderPass             renderPass;\n    uint32_t                 subpass;\n    VkPipeline        basePipelineHandle;\n    int32_t                  basePipelineIndex;\n} VkGraphicsPipelineCreateInfo;\ntypedef struct VkPipelineCacheCreateInfo {\n    VkStructureType   sType;\n    const  void *             pNext;\n    VkPipelineCacheCreateFlags      flags;\n    size_t                   initialDataSize;\n    const  void *             pInitialData;\n} VkPipelineCacheCreateInfo;\ntypedef struct VkPushConstantRange {\n    VkShaderStageFlags       stageFlags;\n    uint32_t                 offset;\n    uint32_t                 size;\n} VkPushConstantRange;\ntypedef struct VkPipelineLayoutCreateInfo {\n    VkStructureType   sType;\n    const  void *             pNext;\n    VkPipelineLayoutCreateFlags      flags;\n    uint32_t                 setLayoutCount;\n    const  VkDescriptorSetLayout *  pSetLayouts;\n    uint32_t                 pushConstantRangeCount;\n    const  VkPushConstantRange *  pPushConstantRanges;\n} VkPipelineLayoutCreateInfo;\ntypedef struct VkSamplerCreateInfo {\n    VkStructureType   sType;\n    const  void *             pNext;\n    VkSamplerCreateFlags     flags;\n    VkFilter                 magFilter;\n    VkFilter                 minFilter;\n    VkSamplerMipmapMode      mipmapMode;\n    VkSamplerAddressMode     addressModeU;\n    VkSamplerAddressMode     addressModeV;\n    VkSamplerAddressMode     addressModeW;\n    float                    mipLodBias;\n    VkBool32                 anisotropyEnable;\n    float                    maxAnisotropy;\n    VkBool32                 compareEnable;\n    VkCompareOp              compareOp;\n    float                    minLod;\n    float                    maxLod;\n    VkBorderColor            borderColor;\n    VkBool32                 unnormalizedCoordinates;\n} VkSamplerCreateInfo;\ntypedef struct VkCommandPoolCreateInfo {\n    VkStructureType   sType;\n    const  void *             pNext;\n    VkCommandPoolCreateFlags     flags;\n    uint32_t                 queueFamilyIndex;\n} VkCommandPoolCreateInfo;\ntypedef struct VkCommandBufferInheritanceInfo {\n    VkStructureType   sType;\n    const  void *             pNext;\n    VkRenderPass      renderPass;\n    uint32_t                 subpass;\n    VkFramebuffer     framebuffer;\n    VkBool32                 occlusionQueryEnable;\n    VkQueryControlFlags      queryFlags;\n    VkQueryPipelineStatisticFlags   pipelineStatistics;\n} VkCommandBufferInheritanceInfo;\ntypedef struct VkCommandBufferBeginInfo {\n    VkStructureType   sType;\n    const  void *             pNext;\n    VkCommandBufferUsageFlags    flags;\n    const  VkCommandBufferInheritanceInfo *        pInheritanceInfo;\n} VkCommandBufferBeginInfo;\ntypedef struct VkRenderPassBeginInfo {\n    VkStructureType   sType;\n    const  void *             pNext;\n    VkRenderPass             renderPass;\n    VkFramebuffer            framebuffer;\n    VkRect2D                 renderArea;\n    uint32_t                 clearValueCount;\n    const  VkClearValue *     pClearValues;\n} VkRenderPassBeginInfo;\ntypedef struct VkClearAttachment {\n    VkImageAspectFlags       aspectMask;\n    uint32_t                 colorAttachment;\n    VkClearValue             clearValue;\n} VkClearAttachment;\ntypedef struct VkAttachmentDescription {\n    VkAttachmentDescriptionFlags   flags;\n    VkFormat                 format;\n    VkSampleCountFlagBits    samples;\n    VkAttachmentLoadOp       loadOp;\n    VkAttachmentStoreOp      storeOp;\n    VkAttachmentLoadOp       stencilLoadOp;\n    VkAttachmentStoreOp      stencilStoreOp;\n    VkImageLayout            initialLayout;\n    VkImageLayout            finalLayout;\n} VkAttachmentDescription;\ntypedef struct VkSubpassDescription {\n    VkSubpassDescriptionFlags   flags;\n    VkPipelineBindPoint      pipelineBindPoint;\n    uint32_t                 inputAttachmentCount;\n    const  VkAttachmentReference *  pInputAttachments;\n    uint32_t                 colorAttachmentCount;\n    const  VkAttachmentReference *  pColorAttachments;\n    const  VkAttachmentReference *  pResolveAttachments;\n    const  VkAttachmentReference *  pDepthStencilAttachment;\n    uint32_t                 preserveAttachmentCount;\n    const  uint32_t *  pPreserveAttachments;\n} VkSubpassDescription;\ntypedef struct VkSubpassDependency {\n    uint32_t                 srcSubpass;\n    uint32_t                 dstSubpass;\n    VkPipelineStageFlags     srcStageMask;\n    VkPipelineStageFlags     dstStageMask;\n    VkAccessFlags            srcAccessMask;\n    VkAccessFlags            dstAccessMask;\n    VkDependencyFlags        dependencyFlags;\n} VkSubpassDependency;\ntypedef struct VkRenderPassCreateInfo {\n    VkStructureType   sType;\n    const  void *             pNext;\n    VkRenderPassCreateFlags      flags;\n    uint32_t     attachmentCount;\n    const  VkAttachmentDescription *  pAttachments;\n    uint32_t                 subpassCount;\n    const  VkSubpassDescription *  pSubpasses;\n    uint32_t         dependencyCount;\n    const  VkSubpassDependency *  pDependencies;\n} VkRenderPassCreateInfo;\ntypedef struct VkEventCreateInfo {\n    VkStructureType   sType;\n    const  void *             pNext;\n    VkEventCreateFlags       flags;\n} VkEventCreateInfo;\ntypedef struct VkFenceCreateInfo {\n    VkStructureType   sType;\n    const  void *             pNext;\n    VkFenceCreateFlags       flags;\n} VkFenceCreateInfo;\ntypedef struct VkPhysicalDeviceFeatures {\n    VkBool32                 robustBufferAccess;\n    VkBool32                 fullDrawIndexUint32;\n    VkBool32                 imageCubeArray;\n    VkBool32                 independentBlend;\n    VkBool32                 geometryShader;\n    VkBool32                 tessellationShader;\n    VkBool32                 sampleRateShading;\n    VkBool32                 dualSrcBlend;\n    VkBool32                 logicOp;\n    VkBool32                 multiDrawIndirect;\n    VkBool32                 drawIndirectFirstInstance;\n    VkBool32                 depthClamp;\n    VkBool32                 depthBiasClamp;\n    VkBool32                 fillModeNonSolid;\n    VkBool32                 depthBounds;\n    VkBool32                 wideLines;\n    VkBool32                 largePoints;\n    VkBool32                 alphaToOne;\n    VkBool32                 multiViewport;\n    VkBool32                 samplerAnisotropy;\n    VkBool32                 textureCompressionETC2;\n    VkBool32                 textureCompressionASTC_LDR;\n    VkBool32                 textureCompressionBC;\n    VkBool32                 occlusionQueryPrecise;\n    VkBool32                 pipelineStatisticsQuery;\n    VkBool32                 vertexPipelineStoresAndAtomics;\n    VkBool32                 fragmentStoresAndAtomics;\n    VkBool32                 shaderTessellationAndGeometryPointSize;\n    VkBool32                 shaderImageGatherExtended;\n    VkBool32                 shaderStorageImageExtendedFormats;\n    VkBool32                 shaderStorageImageMultisample;\n    VkBool32                 shaderStorageImageReadWithoutFormat;\n    VkBool32                 shaderStorageImageWriteWithoutFormat;\n    VkBool32                 shaderUniformBufferArrayDynamicIndexing;\n    VkBool32                 shaderSampledImageArrayDynamicIndexing;\n    VkBool32                 shaderStorageBufferArrayDynamicIndexing;\n    VkBool32                 shaderStorageImageArrayDynamicIndexing;\n    VkBool32                 shaderClipDistance;\n    VkBool32                 shaderCullDistance;\n    VkBool32                 shaderFloat64;\n    VkBool32                 shaderInt64;\n    VkBool32                 shaderInt16;\n    VkBool32                 shaderResourceResidency;\n    VkBool32                 shaderResourceMinLod;\n    VkBool32                 sparseBinding;\n    VkBool32                 sparseResidencyBuffer;\n    VkBool32                 sparseResidencyImage2D;\n    VkBool32                 sparseResidencyImage3D;\n    VkBool32                 sparseResidency2Samples;\n    VkBool32                 sparseResidency4Samples;\n    VkBool32                 sparseResidency8Samples;\n    VkBool32                 sparseResidency16Samples;\n    VkBool32                 sparseResidencyAliased;\n    VkBool32                 variableMultisampleRate;\n    VkBool32                 inheritedQueries;\n} VkPhysicalDeviceFeatures;\ntypedef struct VkPhysicalDeviceSparseProperties {\n    VkBool32                 residencyStandard2DBlockShape;\n    VkBool32                 residencyStandard2DMultisampleBlockShape;\n    VkBool32                 residencyStandard3DBlockShape;\n    VkBool32                 residencyAlignedMipSize;\n    VkBool32                 residencyNonResidentStrict;\n} VkPhysicalDeviceSparseProperties;\ntypedef struct VkPhysicalDeviceLimits {\n    uint32_t                 maxImageDimension1D;\n    uint32_t                 maxImageDimension2D;\n    uint32_t                 maxImageDimension3D;\n    uint32_t                 maxImageDimensionCube;\n    uint32_t                 maxImageArrayLayers;\n    uint32_t                 maxTexelBufferElements;\n    uint32_t                 maxUniformBufferRange;\n    uint32_t                 maxStorageBufferRange;\n    uint32_t                 maxPushConstantsSize;\n    uint32_t                 maxMemoryAllocationCount;\n    uint32_t                 maxSamplerAllocationCount;\n    VkDeviceSize             bufferImageGranularity;\n    VkDeviceSize             sparseAddressSpaceSize;\n    uint32_t                 maxBoundDescriptorSets;\n    uint32_t                 maxPerStageDescriptorSamplers;\n    uint32_t                 maxPerStageDescriptorUniformBuffers;\n    uint32_t                 maxPerStageDescriptorStorageBuffers;\n    uint32_t                 maxPerStageDescriptorSampledImages;\n    uint32_t                 maxPerStageDescriptorStorageImages;\n    uint32_t                 maxPerStageDescriptorInputAttachments;\n    uint32_t                 maxPerStageResources;\n    uint32_t                 maxDescriptorSetSamplers;\n    uint32_t                 maxDescriptorSetUniformBuffers;\n    uint32_t                 maxDescriptorSetUniformBuffersDynamic;\n    uint32_t                 maxDescriptorSetStorageBuffers;\n    uint32_t                 maxDescriptorSetStorageBuffersDynamic;\n    uint32_t                 maxDescriptorSetSampledImages;\n    uint32_t                 maxDescriptorSetStorageImages;\n    uint32_t                 maxDescriptorSetInputAttachments;\n    uint32_t                 maxVertexInputAttributes;\n    uint32_t                 maxVertexInputBindings;\n    uint32_t                 maxVertexInputAttributeOffset;\n    uint32_t                 maxVertexInputBindingStride;\n    uint32_t                 maxVertexOutputComponents;\n    uint32_t                 maxTessellationGenerationLevel;\n    uint32_t                 maxTessellationPatchSize;\n    uint32_t                 maxTessellationControlPerVertexInputComponents;\n    uint32_t                 maxTessellationControlPerVertexOutputComponents;\n    uint32_t                 maxTessellationControlPerPatchOutputComponents;\n    uint32_t                 maxTessellationControlTotalOutputComponents;\n    uint32_t                 maxTessellationEvaluationInputComponents;\n    uint32_t                 maxTessellationEvaluationOutputComponents;\n    uint32_t                 maxGeometryShaderInvocations;\n    uint32_t                 maxGeometryInputComponents;\n    uint32_t                 maxGeometryOutputComponents;\n    uint32_t                 maxGeometryOutputVertices;\n    uint32_t                 maxGeometryTotalOutputComponents;\n    uint32_t                 maxFragmentInputComponents;\n    uint32_t                 maxFragmentOutputAttachments;\n    uint32_t                 maxFragmentDualSrcAttachments;\n    uint32_t                 maxFragmentCombinedOutputResources;\n    uint32_t                 maxComputeSharedMemorySize;\n    uint32_t                 maxComputeWorkGroupCount [3];\n    uint32_t                 maxComputeWorkGroupInvocations;\n    uint32_t                 maxComputeWorkGroupSize [3];\n    uint32_t                 subPixelPrecisionBits;\n    uint32_t                 subTexelPrecisionBits;\n    uint32_t                 mipmapPrecisionBits;\n    uint32_t                 maxDrawIndexedIndexValue;\n    uint32_t                 maxDrawIndirectCount;\n    float                    maxSamplerLodBias;\n    float                    maxSamplerAnisotropy;\n    uint32_t                 maxViewports;\n    uint32_t                 maxViewportDimensions [2];\n    float                    viewportBoundsRange [2];\n    uint32_t                 viewportSubPixelBits;\n    size_t                   minMemoryMapAlignment;\n    VkDeviceSize             minTexelBufferOffsetAlignment;\n    VkDeviceSize             minUniformBufferOffsetAlignment;\n    VkDeviceSize             minStorageBufferOffsetAlignment;\n    int32_t                  minTexelOffset;\n    uint32_t                 maxTexelOffset;\n    int32_t                  minTexelGatherOffset;\n    uint32_t                 maxTexelGatherOffset;\n    float                    minInterpolationOffset;\n    float                    maxInterpolationOffset;\n    uint32_t                 subPixelInterpolationOffsetBits;\n    uint32_t                 maxFramebufferWidth;\n    uint32_t                 maxFramebufferHeight;\n    uint32_t                 maxFramebufferLayers;\n    VkSampleCountFlags       framebufferColorSampleCounts;\n    VkSampleCountFlags       framebufferDepthSampleCounts;\n    VkSampleCountFlags       framebufferStencilSampleCounts;\n    VkSampleCountFlags       framebufferNoAttachmentsSampleCounts;\n    uint32_t                 maxColorAttachments;\n    VkSampleCountFlags       sampledImageColorSampleCounts;\n    VkSampleCountFlags       sampledImageIntegerSampleCounts;\n    VkSampleCountFlags       sampledImageDepthSampleCounts;\n    VkSampleCountFlags       sampledImageStencilSampleCounts;\n    VkSampleCountFlags       storageImageSampleCounts;\n    uint32_t                 maxSampleMaskWords;\n    VkBool32                 timestampComputeAndGraphics;\n    float                    timestampPeriod;\n    uint32_t                 maxClipDistances;\n    uint32_t                 maxCullDistances;\n    uint32_t                 maxCombinedClipAndCullDistances;\n    uint32_t                 discreteQueuePriorities;\n    float                    pointSizeRange [2];\n    float                    lineWidthRange [2];\n    float                    pointSizeGranularity;\n    float                    lineWidthGranularity;\n    VkBool32                 strictLines;\n    VkBool32                 standardSampleLocations;\n    VkDeviceSize             optimalBufferCopyOffsetAlignment;\n    VkDeviceSize             optimalBufferCopyRowPitchAlignment;\n    VkDeviceSize             nonCoherentAtomSize;\n} VkPhysicalDeviceLimits;\ntypedef struct VkSemaphoreCreateInfo {\n    VkStructureType   sType;\n    const  void *             pNext;\n    VkSemaphoreCreateFlags   flags;\n} VkSemaphoreCreateInfo;\ntypedef struct VkQueryPoolCreateInfo {\n    VkStructureType   sType;\n    const  void *             pNext;\n    VkQueryPoolCreateFlags   flags;\n    VkQueryType              queryType;\n    uint32_t                 queryCount;\n    VkQueryPipelineStatisticFlags   pipelineStatistics;\n} VkQueryPoolCreateInfo;\ntypedef struct VkFramebufferCreateInfo {\n    VkStructureType   sType;\n    const  void *             pNext;\n    VkFramebufferCreateFlags      flags;\n    VkRenderPass             renderPass;\n    uint32_t                 attachmentCount;\n    const  VkImageView *      pAttachments;\n    uint32_t                 width;\n    uint32_t                 height;\n    uint32_t                 layers;\n} VkFramebufferCreateInfo;\ntypedef struct VkSubmitInfo {\n    VkStructureType   sType;\n    const  void *  pNext;\n    uint32_t         waitSemaphoreCount;\n    const  VkSemaphore *      pWaitSemaphores;\n    const  VkPipelineStageFlags *            pWaitDstStageMask;\n    uint32_t         commandBufferCount;\n    const  VkCommandBuffer *      pCommandBuffers;\n    uint32_t         signalSemaphoreCount;\n    const  VkSemaphore *      pSignalSemaphores;\n} VkSubmitInfo;\ntypedef struct VkSurfaceCapabilitiesKHR {\n    uint32_t                           minImageCount;\n    uint32_t                           maxImageCount;\n    VkExtent2D                         currentExtent;\n    VkExtent2D                         minImageExtent;\n    VkExtent2D                         maxImageExtent;\n    uint32_t                           maxImageArrayLayers;\n    VkSurfaceTransformFlagsKHR         supportedTransforms;\n    VkSurfaceTransformFlagBitsKHR      currentTransform;\n    VkCompositeAlphaFlagsKHR           supportedCompositeAlpha;\n    VkImageUsageFlags                  supportedUsageFlags;\n} VkSurfaceCapabilitiesKHR;\ntypedef struct VkSwapchainCreateInfoKHR {\n    VkStructureType   sType;\n    const  void *                       pNext;\n    VkSwapchainCreateFlagsKHR          flags;\n    VkSurfaceKHR                       surface;\n    uint32_t                           minImageCount;\n    VkFormat                           imageFormat;\n    VkColorSpaceKHR                    imageColorSpace;\n    VkExtent2D                         imageExtent;\n    uint32_t                           imageArrayLayers;\n    VkImageUsageFlags                  imageUsage;\n    VkSharingMode                      imageSharingMode;\n    uint32_t           queueFamilyIndexCount;\n    const  uint32_t *                   pQueueFamilyIndices;\n    VkSurfaceTransformFlagBitsKHR      preTransform;\n    VkCompositeAlphaFlagBitsKHR        compositeAlpha;\n    VkPresentModeKHR                   presentMode;\n    VkBool32                           clipped;\n    VkSwapchainKHR     oldSwapchain;\n} VkSwapchainCreateInfoKHR;\ntypedef struct VkDebugReportCallbackCreateInfoEXT {\n    VkStructureType   sType;\n    const  void *                       pNext;\n    VkDebugReportFlagsEXT              flags;\n    PFN_vkDebugReportCallbackEXT       pfnCallback;\n    void *             pUserData;\n} VkDebugReportCallbackCreateInfoEXT;\ntypedef struct VkPhysicalDeviceFeatures2 {\n    VkStructureType   sType;\n    void *                             pNext;\n    VkPhysicalDeviceFeatures           features;\n} VkPhysicalDeviceFeatures2;\ntypedef struct VkFormatProperties2 {\n    VkStructureType   sType;\n    void *                             pNext;\n    VkFormatProperties                 formatProperties;\n} VkFormatProperties2;\ntypedef struct VkImageFormatProperties2 {\n    VkStructureType   sType;\n    void *  pNext;\n    VkImageFormatProperties            imageFormatProperties;\n} VkImageFormatProperties2;\ntypedef struct VkPhysicalDeviceImageFormatInfo2 {\n    VkStructureType   sType;\n    const  void *  pNext;\n    VkFormat                           format;\n    VkImageType                        type;\n    VkImageTiling                      tiling;\n    VkImageUsageFlags                  usage;\n    VkImageCreateFlags   flags;\n} VkPhysicalDeviceImageFormatInfo2;\ntypedef struct VkQueueFamilyProperties2 {\n    VkStructureType   sType;\n    void *                             pNext;\n    VkQueueFamilyProperties            queueFamilyProperties;\n} VkQueueFamilyProperties2;\ntypedef struct VkSparseImageFormatProperties2 {\n    VkStructureType   sType;\n    void *                             pNext;\n    VkSparseImageFormatProperties      properties;\n} VkSparseImageFormatProperties2;\ntypedef struct VkPhysicalDeviceSparseImageFormatInfo2 {\n    VkStructureType   sType;\n    const  void *                       pNext;\n    VkFormat                           format;\n    VkImageType                        type;\n    VkSampleCountFlagBits              samples;\n    VkImageUsageFlags                  usage;\n    VkImageTiling                      tiling;\n} VkPhysicalDeviceSparseImageFormatInfo2;\ntypedef struct VkPhysicalDeviceVariablePointersFeatures {\n    VkStructureType   sType;\n    void *                             pNext;\n    VkBool32                           variablePointersStorageBuffer;\n    VkBool32                           variablePointers;\n} VkPhysicalDeviceVariablePointersFeatures;\ntypedef struct VkPhysicalDeviceVariablePointerFeatures  VkPhysicalDeviceVariablePointerFeatures;\ntypedef struct VkExternalMemoryProperties {\n    VkExternalMemoryFeatureFlags    externalMemoryFeatures;\n    VkExternalMemoryHandleTypeFlags   exportFromImportedHandleTypes;\n    VkExternalMemoryHandleTypeFlags   compatibleHandleTypes;\n} VkExternalMemoryProperties;\ntypedef struct VkExternalImageFormatProperties {\n    VkStructureType   sType;\n    void *                             pNext;\n    VkExternalMemoryProperties   externalMemoryProperties;\n} VkExternalImageFormatProperties;\ntypedef struct VkPhysicalDeviceExternalBufferInfo {\n    VkStructureType   sType;\n    const  void *                       pNext;\n    VkBufferCreateFlags   flags;\n    VkBufferUsageFlags                 usage;\n    VkExternalMemoryHandleTypeFlagBits   handleType;\n} VkPhysicalDeviceExternalBufferInfo;\ntypedef struct VkExternalBufferProperties {\n    VkStructureType   sType;\n    void *                             pNext;\n    VkExternalMemoryProperties      externalMemoryProperties;\n} VkExternalBufferProperties;\ntypedef struct VkPhysicalDeviceIDProperties {\n    VkStructureType   sType;\n    void *                             pNext;\n    uint8_t                            deviceUUID [ VK_UUID_SIZE ];\n    uint8_t                            driverUUID [ VK_UUID_SIZE ];\n    uint8_t                            deviceLUID [ VK_LUID_SIZE ];\n    uint32_t                           deviceNodeMask;\n    VkBool32                           deviceLUIDValid;\n} VkPhysicalDeviceIDProperties;\ntypedef struct VkExternalMemoryImageCreateInfo {\n    VkStructureType   sType;\n    const  void *                       pNext;\n    VkExternalMemoryHandleTypeFlags   handleTypes;\n} VkExternalMemoryImageCreateInfo;\ntypedef struct VkExternalMemoryBufferCreateInfo {\n    VkStructureType   sType;\n    const  void *                       pNext;\n    VkExternalMemoryHandleTypeFlags   handleTypes;\n} VkExternalMemoryBufferCreateInfo;\ntypedef struct VkExportMemoryAllocateInfo {\n    VkStructureType   sType;\n    const  void *                       pNext;\n    VkExternalMemoryHandleTypeFlags   handleTypes;\n} VkExportMemoryAllocateInfo;\ntypedef struct VkExternalSemaphoreProperties {\n    VkStructureType   sType;\n    void *                             pNext;\n    VkExternalSemaphoreHandleTypeFlags   exportFromImportedHandleTypes;\n    VkExternalSemaphoreHandleTypeFlags   compatibleHandleTypes;\n    VkExternalSemaphoreFeatureFlags   externalSemaphoreFeatures;\n} VkExternalSemaphoreProperties;\ntypedef struct VkExportSemaphoreCreateInfo {\n    VkStructureType   sType;\n    const  void *                       pNext;\n    VkExternalSemaphoreHandleTypeFlags   handleTypes;\n} VkExportSemaphoreCreateInfo;\ntypedef struct VkExternalFenceProperties {\n    VkStructureType   sType;\n    void *                             pNext;\n    VkExternalFenceHandleTypeFlags   exportFromImportedHandleTypes;\n    VkExternalFenceHandleTypeFlags   compatibleHandleTypes;\n    VkExternalFenceFeatureFlags   externalFenceFeatures;\n} VkExternalFenceProperties;\ntypedef struct VkExportFenceCreateInfo {\n    VkStructureType   sType;\n    const  void *                       pNext;\n    VkExternalFenceHandleTypeFlags   handleTypes;\n} VkExportFenceCreateInfo;\ntypedef struct VkPhysicalDeviceMultiviewFeatures {\n    VkStructureType   sType;\n    void *                             pNext;\n    VkBool32                           multiview;\n    VkBool32                           multiviewGeometryShader;\n    VkBool32                           multiviewTessellationShader;\n} VkPhysicalDeviceMultiviewFeatures;\ntypedef struct VkPhysicalDeviceGroupProperties {\n    VkStructureType   sType;\n    void *                             pNext;\n    uint32_t                           physicalDeviceCount;\n    VkPhysicalDevice                   physicalDevices [ VK_MAX_DEVICE_GROUP_SIZE ];\n    VkBool32                           subsetAllocation;\n} VkPhysicalDeviceGroupProperties;\ntypedef struct VkMemoryAllocateFlagsInfo {\n    VkStructureType   sType;\n    const  void *                       pNext;\n    VkMemoryAllocateFlags   flags;\n    uint32_t                           deviceMask;\n} VkMemoryAllocateFlagsInfo;\ntypedef struct VkBindBufferMemoryInfo {\n    VkStructureType   sType;\n    const  void *                       pNext;\n    VkBuffer                           buffer;\n    VkDeviceMemory                     memory;\n    VkDeviceSize                       memoryOffset;\n} VkBindBufferMemoryInfo;\ntypedef struct VkBindImageMemoryInfo {\n    VkStructureType   sType;\n    const  void *                       pNext;\n    VkImage                            image;\n    VkDeviceMemory                     memory;\n    VkDeviceSize                       memoryOffset;\n} VkBindImageMemoryInfo;\ntypedef struct VkDeviceGroupPresentCapabilitiesKHR {\n    VkStructureType   sType;\n    const  void *                       pNext;\n    uint32_t                           presentMask [ VK_MAX_DEVICE_GROUP_SIZE ];\n    VkDeviceGroupPresentModeFlagsKHR   modes;\n} VkDeviceGroupPresentCapabilitiesKHR;\ntypedef struct VkDeviceGroupSwapchainCreateInfoKHR {\n    VkStructureType   sType;\n    const  void *                       pNext;\n    VkDeviceGroupPresentModeFlagsKHR                           modes;\n} VkDeviceGroupSwapchainCreateInfoKHR;\ntypedef struct VkDescriptorUpdateTemplateCreateInfo {\n    VkStructureType   sType;\n    const  void *                                pNext;\n    VkDescriptorUpdateTemplateCreateFlags      flags;\n    uint32_t                   descriptorUpdateEntryCount;\n    const  VkDescriptorUpdateTemplateEntry *  pDescriptorUpdateEntries;\n    VkDescriptorUpdateTemplateType   templateType;\n    VkDescriptorSetLayout   descriptorSetLayout;\n    VkPipelineBindPoint   pipelineBindPoint;\n    VkPipelineLayout pipelineLayout;\n    uint32_t   set;\n} VkDescriptorUpdateTemplateCreateInfo;\ntypedef struct VkInputAttachmentAspectReference {\n    uint32_t                          subpass;\n    uint32_t                          inputAttachmentIndex;\n    VkImageAspectFlags                aspectMask;\n} VkInputAttachmentAspectReference;\ntypedef struct VkRenderPassInputAttachmentAspectCreateInfo {\n    VkStructureType   sType;\n    const  void *                      pNext;\n    uint32_t                          aspectReferenceCount;\n    const  VkInputAttachmentAspectReference *  pAspectReferences;\n} VkRenderPassInputAttachmentAspectCreateInfo;\ntypedef struct VkPhysicalDevice16BitStorageFeatures {\n    VkStructureType   sType;\n    void *       pNext;\n    VkBool32                           storageBuffer16BitAccess;\n    VkBool32                           uniformAndStorageBuffer16BitAccess;\n    VkBool32                           storagePushConstant16;\n    VkBool32                           storageInputOutput16;\n} VkPhysicalDevice16BitStorageFeatures;\ntypedef struct VkPhysicalDeviceSubgroupProperties {\n    VkStructureType   sType;\n    void *                    pNext;\n    uint32_t                        subgroupSize;\n    VkShaderStageFlags              supportedStages;\n    VkSubgroupFeatureFlags          supportedOperations;\n    VkBool32   quadOperationsInAllStages;\n} VkPhysicalDeviceSubgroupProperties;\ntypedef struct VkMemoryRequirements2 {\n    VkStructureType   sType;\n    void *  pNext;\n    VkMemoryRequirements                                                   memoryRequirements;\n} VkMemoryRequirements2;\ntypedef struct VkMemoryRequirements2KHR  VkMemoryRequirements2KHR;\ntypedef struct VkSparseImageMemoryRequirements2 {\n    VkStructureType   sType;\n    void *                                        pNext;\n    VkSparseImageMemoryRequirements                                        memoryRequirements;\n} VkSparseImageMemoryRequirements2;\ntypedef struct VkMemoryDedicatedRequirements {\n    VkStructureType   sType;\n    void *                             pNext;\n    VkBool32                           prefersDedicatedAllocation;\n    VkBool32                           requiresDedicatedAllocation;\n} VkMemoryDedicatedRequirements;\ntypedef struct VkImageViewUsageCreateInfo {\n    VkStructureType   sType;\n    const  void *  pNext;\n    VkImageUsageFlags   usage;\n} VkImageViewUsageCreateInfo;\ntypedef struct VkSamplerYcbcrConversionCreateInfo {\n    VkStructureType   sType;\n    const  void *                       pNext;\n    VkFormat                           format;\n    VkSamplerYcbcrModelConversion   ycbcrModel;\n    VkSamplerYcbcrRange             ycbcrRange;\n    VkComponentMapping                 components;\n    VkChromaLocation                xChromaOffset;\n    VkChromaLocation                yChromaOffset;\n    VkFilter                           chromaFilter;\n    VkBool32                           forceExplicitReconstruction;\n} VkSamplerYcbcrConversionCreateInfo;\ntypedef struct VkPhysicalDeviceSamplerYcbcrConversionFeatures {\n    VkStructureType   sType;\n    void *       pNext;\n    VkBool32                           samplerYcbcrConversion;\n} VkPhysicalDeviceSamplerYcbcrConversionFeatures;\ntypedef struct VkProtectedSubmitInfo {\n    VkStructureType   sType;\n    const  void *                      pNext;\n    VkBool32                          protectedSubmit;\n} VkProtectedSubmitInfo;\ntypedef struct VkPhysicalDeviceProtectedMemoryFeatures {\n    VkStructureType   sType;\n    void *                                pNext;\n    VkBool32                              protectedMemory;\n} VkPhysicalDeviceProtectedMemoryFeatures;\ntypedef struct VkPhysicalDeviceProtectedMemoryProperties {\n    VkStructureType   sType;\n    void *                                pNext;\n    VkBool32                              protectedNoFault;\n} VkPhysicalDeviceProtectedMemoryProperties;\ntypedef struct VkDeviceQueueInfo2 {\n    VkStructureType   sType;\n    const  void *                          pNext;\n    VkDeviceQueueCreateFlags              flags;\n    uint32_t                              queueFamilyIndex;\n    uint32_t                              queueIndex;\n} VkDeviceQueueInfo2;\ntypedef struct VkPhysicalDeviceMaintenance3Properties {\n    VkStructureType   sType;\n    void *                             pNext;\n    uint32_t                           maxPerSetDescriptors;\n    VkDeviceSize                       maxMemoryAllocationSize;\n} VkPhysicalDeviceMaintenance3Properties;\ntypedef struct VkDescriptorSetLayoutSupport {\n    VkStructureType   sType;\n    void *             pNext;\n    VkBool32           supported;\n} VkDescriptorSetLayoutSupport;\ntypedef struct VkPhysicalDeviceShaderDrawParametersFeatures {\n    VkStructureType   sType;\n    void *                             pNext;\n    VkBool32                           shaderDrawParameters;\n} VkPhysicalDeviceShaderDrawParametersFeatures;\ntypedef struct VkPhysicalDeviceShaderDrawParameterFeatures  VkPhysicalDeviceShaderDrawParameterFeatures;\ntypedef struct VkPhysicalDeviceProperties {\n    uint32_t         apiVersion;\n    uint32_t         driverVersion;\n    uint32_t         vendorID;\n    uint32_t         deviceID;\n    VkPhysicalDeviceType   deviceType;\n    char             deviceName [ VK_MAX_PHYSICAL_DEVICE_NAME_SIZE ];\n    uint8_t          pipelineCacheUUID [ VK_UUID_SIZE ];\n    VkPhysicalDeviceLimits   limits;\n    VkPhysicalDeviceSparseProperties   sparseProperties;\n} VkPhysicalDeviceProperties;\ntypedef struct VkDeviceCreateInfo {\n    VkStructureType   sType;\n    const  void *      pNext;\n    VkDeviceCreateFlags      flags;\n    uint32_t          queueCreateInfoCount;\n    const  VkDeviceQueueCreateInfo *  pQueueCreateInfos;\n    uint32_t                 enabledLayerCount;\n    const  char * const*       ppEnabledLayerNames;\n    uint32_t                 enabledExtensionCount;\n    const  char * const*       ppEnabledExtensionNames;\n    const  VkPhysicalDeviceFeatures *  pEnabledFeatures;\n} VkDeviceCreateInfo;\ntypedef struct VkPhysicalDeviceMemoryProperties {\n    uint32_t                 memoryTypeCount;\n    VkMemoryType             memoryTypes [ VK_MAX_MEMORY_TYPES ];\n    uint32_t                 memoryHeapCount;\n    VkMemoryHeap             memoryHeaps [ VK_MAX_MEMORY_HEAPS ];\n} VkPhysicalDeviceMemoryProperties;\ntypedef struct VkPhysicalDeviceProperties2 {\n    VkStructureType   sType;\n    void *                             pNext;\n    VkPhysicalDeviceProperties         properties;\n} VkPhysicalDeviceProperties2;\ntypedef struct VkPhysicalDeviceMemoryProperties2 {\n    VkStructureType   sType;\n    void *                             pNext;\n    VkPhysicalDeviceMemoryProperties   memoryProperties;\n} VkPhysicalDeviceMemoryProperties2;\n\n\n#define VK_VERSION_1_0 1\nGLAD_API_CALL int GLAD_VK_VERSION_1_0;\n#define VK_VERSION_1_1 1\nGLAD_API_CALL int GLAD_VK_VERSION_1_1;\n#define VK_EXT_debug_report 1\nGLAD_API_CALL int GLAD_VK_EXT_debug_report;\n#define VK_KHR_surface 1\nGLAD_API_CALL int GLAD_VK_KHR_surface;\n#define VK_KHR_swapchain 1\nGLAD_API_CALL int GLAD_VK_KHR_swapchain;\n\n\ntypedef VkResult (GLAD_API_PTR *PFN_vkAcquireNextImage2KHR)(VkDevice   device, const  VkAcquireNextImageInfoKHR *  pAcquireInfo, uint32_t *  pImageIndex);\ntypedef VkResult (GLAD_API_PTR *PFN_vkAcquireNextImageKHR)(VkDevice   device, VkSwapchainKHR   swapchain, uint64_t   timeout, VkSemaphore   semaphore, VkFence   fence, uint32_t *  pImageIndex);\ntypedef VkResult (GLAD_API_PTR *PFN_vkAllocateCommandBuffers)(VkDevice   device, const  VkCommandBufferAllocateInfo *  pAllocateInfo, VkCommandBuffer *  pCommandBuffers);\ntypedef VkResult (GLAD_API_PTR *PFN_vkAllocateDescriptorSets)(VkDevice   device, const  VkDescriptorSetAllocateInfo *  pAllocateInfo, VkDescriptorSet *  pDescriptorSets);\ntypedef VkResult (GLAD_API_PTR *PFN_vkAllocateMemory)(VkDevice   device, const  VkMemoryAllocateInfo *  pAllocateInfo, const  VkAllocationCallbacks *  pAllocator, VkDeviceMemory *  pMemory);\ntypedef VkResult (GLAD_API_PTR *PFN_vkBeginCommandBuffer)(VkCommandBuffer   commandBuffer, const  VkCommandBufferBeginInfo *  pBeginInfo);\ntypedef VkResult (GLAD_API_PTR *PFN_vkBindBufferMemory)(VkDevice   device, VkBuffer   buffer, VkDeviceMemory   memory, VkDeviceSize   memoryOffset);\ntypedef VkResult (GLAD_API_PTR *PFN_vkBindBufferMemory2)(VkDevice   device, uint32_t   bindInfoCount, const  VkBindBufferMemoryInfo *  pBindInfos);\ntypedef VkResult (GLAD_API_PTR *PFN_vkBindImageMemory)(VkDevice   device, VkImage   image, VkDeviceMemory   memory, VkDeviceSize   memoryOffset);\ntypedef VkResult (GLAD_API_PTR *PFN_vkBindImageMemory2)(VkDevice   device, uint32_t   bindInfoCount, const  VkBindImageMemoryInfo *  pBindInfos);\ntypedef void (GLAD_API_PTR *PFN_vkCmdBeginQuery)(VkCommandBuffer   commandBuffer, VkQueryPool   queryPool, uint32_t   query, VkQueryControlFlags   flags);\ntypedef void (GLAD_API_PTR *PFN_vkCmdBeginRenderPass)(VkCommandBuffer   commandBuffer, const  VkRenderPassBeginInfo *  pRenderPassBegin, VkSubpassContents   contents);\ntypedef void (GLAD_API_PTR *PFN_vkCmdBindDescriptorSets)(VkCommandBuffer   commandBuffer, VkPipelineBindPoint   pipelineBindPoint, VkPipelineLayout   layout, uint32_t   firstSet, uint32_t   descriptorSetCount, const  VkDescriptorSet *  pDescriptorSets, uint32_t   dynamicOffsetCount, const  uint32_t *  pDynamicOffsets);\ntypedef void (GLAD_API_PTR *PFN_vkCmdBindIndexBuffer)(VkCommandBuffer   commandBuffer, VkBuffer   buffer, VkDeviceSize   offset, VkIndexType   indexType);\ntypedef void (GLAD_API_PTR *PFN_vkCmdBindPipeline)(VkCommandBuffer   commandBuffer, VkPipelineBindPoint   pipelineBindPoint, VkPipeline   pipeline);\ntypedef void (GLAD_API_PTR *PFN_vkCmdBindVertexBuffers)(VkCommandBuffer   commandBuffer, uint32_t   firstBinding, uint32_t   bindingCount, const  VkBuffer *  pBuffers, const  VkDeviceSize *  pOffsets);\ntypedef void (GLAD_API_PTR *PFN_vkCmdBlitImage)(VkCommandBuffer   commandBuffer, VkImage   srcImage, VkImageLayout   srcImageLayout, VkImage   dstImage, VkImageLayout   dstImageLayout, uint32_t   regionCount, const  VkImageBlit *  pRegions, VkFilter   filter);\ntypedef void (GLAD_API_PTR *PFN_vkCmdClearAttachments)(VkCommandBuffer   commandBuffer, uint32_t   attachmentCount, const  VkClearAttachment *  pAttachments, uint32_t   rectCount, const  VkClearRect *  pRects);\ntypedef void (GLAD_API_PTR *PFN_vkCmdClearColorImage)(VkCommandBuffer   commandBuffer, VkImage   image, VkImageLayout   imageLayout, const  VkClearColorValue *  pColor, uint32_t   rangeCount, const  VkImageSubresourceRange *  pRanges);\ntypedef void (GLAD_API_PTR *PFN_vkCmdClearDepthStencilImage)(VkCommandBuffer   commandBuffer, VkImage   image, VkImageLayout   imageLayout, const  VkClearDepthStencilValue *  pDepthStencil, uint32_t   rangeCount, const  VkImageSubresourceRange *  pRanges);\ntypedef void (GLAD_API_PTR *PFN_vkCmdCopyBuffer)(VkCommandBuffer   commandBuffer, VkBuffer   srcBuffer, VkBuffer   dstBuffer, uint32_t   regionCount, const  VkBufferCopy *  pRegions);\ntypedef void (GLAD_API_PTR *PFN_vkCmdCopyBufferToImage)(VkCommandBuffer   commandBuffer, VkBuffer   srcBuffer, VkImage   dstImage, VkImageLayout   dstImageLayout, uint32_t   regionCount, const  VkBufferImageCopy *  pRegions);\ntypedef void (GLAD_API_PTR *PFN_vkCmdCopyImage)(VkCommandBuffer   commandBuffer, VkImage   srcImage, VkImageLayout   srcImageLayout, VkImage   dstImage, VkImageLayout   dstImageLayout, uint32_t   regionCount, const  VkImageCopy *  pRegions);\ntypedef void (GLAD_API_PTR *PFN_vkCmdCopyImageToBuffer)(VkCommandBuffer   commandBuffer, VkImage   srcImage, VkImageLayout   srcImageLayout, VkBuffer   dstBuffer, uint32_t   regionCount, const  VkBufferImageCopy *  pRegions);\ntypedef void (GLAD_API_PTR *PFN_vkCmdCopyQueryPoolResults)(VkCommandBuffer   commandBuffer, VkQueryPool   queryPool, uint32_t   firstQuery, uint32_t   queryCount, VkBuffer   dstBuffer, VkDeviceSize   dstOffset, VkDeviceSize   stride, VkQueryResultFlags   flags);\ntypedef void (GLAD_API_PTR *PFN_vkCmdDispatch)(VkCommandBuffer   commandBuffer, uint32_t   groupCountX, uint32_t   groupCountY, uint32_t   groupCountZ);\ntypedef void (GLAD_API_PTR *PFN_vkCmdDispatchBase)(VkCommandBuffer   commandBuffer, uint32_t   baseGroupX, uint32_t   baseGroupY, uint32_t   baseGroupZ, uint32_t   groupCountX, uint32_t   groupCountY, uint32_t   groupCountZ);\ntypedef void (GLAD_API_PTR *PFN_vkCmdDispatchIndirect)(VkCommandBuffer   commandBuffer, VkBuffer   buffer, VkDeviceSize   offset);\ntypedef void (GLAD_API_PTR *PFN_vkCmdDraw)(VkCommandBuffer   commandBuffer, uint32_t   vertexCount, uint32_t   instanceCount, uint32_t   firstVertex, uint32_t   firstInstance);\ntypedef void (GLAD_API_PTR *PFN_vkCmdDrawIndexed)(VkCommandBuffer   commandBuffer, uint32_t   indexCount, uint32_t   instanceCount, uint32_t   firstIndex, int32_t   vertexOffset, uint32_t   firstInstance);\ntypedef void (GLAD_API_PTR *PFN_vkCmdDrawIndexedIndirect)(VkCommandBuffer   commandBuffer, VkBuffer   buffer, VkDeviceSize   offset, uint32_t   drawCount, uint32_t   stride);\ntypedef void (GLAD_API_PTR *PFN_vkCmdDrawIndirect)(VkCommandBuffer   commandBuffer, VkBuffer   buffer, VkDeviceSize   offset, uint32_t   drawCount, uint32_t   stride);\ntypedef void (GLAD_API_PTR *PFN_vkCmdEndQuery)(VkCommandBuffer   commandBuffer, VkQueryPool   queryPool, uint32_t   query);\ntypedef void (GLAD_API_PTR *PFN_vkCmdEndRenderPass)(VkCommandBuffer   commandBuffer);\ntypedef void (GLAD_API_PTR *PFN_vkCmdExecuteCommands)(VkCommandBuffer   commandBuffer, uint32_t   commandBufferCount, const  VkCommandBuffer *  pCommandBuffers);\ntypedef void (GLAD_API_PTR *PFN_vkCmdFillBuffer)(VkCommandBuffer   commandBuffer, VkBuffer   dstBuffer, VkDeviceSize   dstOffset, VkDeviceSize   size, uint32_t   data);\ntypedef void (GLAD_API_PTR *PFN_vkCmdNextSubpass)(VkCommandBuffer   commandBuffer, VkSubpassContents   contents);\ntypedef void (GLAD_API_PTR *PFN_vkCmdPipelineBarrier)(VkCommandBuffer   commandBuffer, VkPipelineStageFlags   srcStageMask, VkPipelineStageFlags   dstStageMask, VkDependencyFlags   dependencyFlags, uint32_t   memoryBarrierCount, const  VkMemoryBarrier *  pMemoryBarriers, uint32_t   bufferMemoryBarrierCount, const  VkBufferMemoryBarrier *  pBufferMemoryBarriers, uint32_t   imageMemoryBarrierCount, const  VkImageMemoryBarrier *  pImageMemoryBarriers);\ntypedef void (GLAD_API_PTR *PFN_vkCmdPushConstants)(VkCommandBuffer   commandBuffer, VkPipelineLayout   layout, VkShaderStageFlags   stageFlags, uint32_t   offset, uint32_t   size, const  void *  pValues);\ntypedef void (GLAD_API_PTR *PFN_vkCmdResetEvent)(VkCommandBuffer   commandBuffer, VkEvent   event, VkPipelineStageFlags   stageMask);\ntypedef void (GLAD_API_PTR *PFN_vkCmdResetQueryPool)(VkCommandBuffer   commandBuffer, VkQueryPool   queryPool, uint32_t   firstQuery, uint32_t   queryCount);\ntypedef void (GLAD_API_PTR *PFN_vkCmdResolveImage)(VkCommandBuffer   commandBuffer, VkImage   srcImage, VkImageLayout   srcImageLayout, VkImage   dstImage, VkImageLayout   dstImageLayout, uint32_t   regionCount, const  VkImageResolve *  pRegions);\ntypedef void (GLAD_API_PTR *PFN_vkCmdSetBlendConstants)(VkCommandBuffer   commandBuffer, const  float   blendConstants [4]);\ntypedef void (GLAD_API_PTR *PFN_vkCmdSetDepthBias)(VkCommandBuffer   commandBuffer, float   depthBiasConstantFactor, float   depthBiasClamp, float   depthBiasSlopeFactor);\ntypedef void (GLAD_API_PTR *PFN_vkCmdSetDepthBounds)(VkCommandBuffer   commandBuffer, float   minDepthBounds, float   maxDepthBounds);\ntypedef void (GLAD_API_PTR *PFN_vkCmdSetDeviceMask)(VkCommandBuffer   commandBuffer, uint32_t   deviceMask);\ntypedef void (GLAD_API_PTR *PFN_vkCmdSetEvent)(VkCommandBuffer   commandBuffer, VkEvent   event, VkPipelineStageFlags   stageMask);\ntypedef void (GLAD_API_PTR *PFN_vkCmdSetLineWidth)(VkCommandBuffer   commandBuffer, float   lineWidth);\ntypedef void (GLAD_API_PTR *PFN_vkCmdSetScissor)(VkCommandBuffer   commandBuffer, uint32_t   firstScissor, uint32_t   scissorCount, const  VkRect2D *  pScissors);\ntypedef void (GLAD_API_PTR *PFN_vkCmdSetStencilCompareMask)(VkCommandBuffer   commandBuffer, VkStencilFaceFlags   faceMask, uint32_t   compareMask);\ntypedef void (GLAD_API_PTR *PFN_vkCmdSetStencilReference)(VkCommandBuffer   commandBuffer, VkStencilFaceFlags   faceMask, uint32_t   reference);\ntypedef void (GLAD_API_PTR *PFN_vkCmdSetStencilWriteMask)(VkCommandBuffer   commandBuffer, VkStencilFaceFlags   faceMask, uint32_t   writeMask);\ntypedef void (GLAD_API_PTR *PFN_vkCmdSetViewport)(VkCommandBuffer   commandBuffer, uint32_t   firstViewport, uint32_t   viewportCount, const  VkViewport *  pViewports);\ntypedef void (GLAD_API_PTR *PFN_vkCmdUpdateBuffer)(VkCommandBuffer   commandBuffer, VkBuffer   dstBuffer, VkDeviceSize   dstOffset, VkDeviceSize   dataSize, const  void *  pData);\ntypedef void (GLAD_API_PTR *PFN_vkCmdWaitEvents)(VkCommandBuffer   commandBuffer, uint32_t   eventCount, const  VkEvent *  pEvents, VkPipelineStageFlags   srcStageMask, VkPipelineStageFlags   dstStageMask, uint32_t   memoryBarrierCount, const  VkMemoryBarrier *  pMemoryBarriers, uint32_t   bufferMemoryBarrierCount, const  VkBufferMemoryBarrier *  pBufferMemoryBarriers, uint32_t   imageMemoryBarrierCount, const  VkImageMemoryBarrier *  pImageMemoryBarriers);\ntypedef void (GLAD_API_PTR *PFN_vkCmdWriteTimestamp)(VkCommandBuffer   commandBuffer, VkPipelineStageFlagBits   pipelineStage, VkQueryPool   queryPool, uint32_t   query);\ntypedef VkResult (GLAD_API_PTR *PFN_vkCreateBuffer)(VkDevice   device, const  VkBufferCreateInfo *  pCreateInfo, const  VkAllocationCallbacks *  pAllocator, VkBuffer *  pBuffer);\ntypedef VkResult (GLAD_API_PTR *PFN_vkCreateBufferView)(VkDevice   device, const  VkBufferViewCreateInfo *  pCreateInfo, const  VkAllocationCallbacks *  pAllocator, VkBufferView *  pView);\ntypedef VkResult (GLAD_API_PTR *PFN_vkCreateCommandPool)(VkDevice   device, const  VkCommandPoolCreateInfo *  pCreateInfo, const  VkAllocationCallbacks *  pAllocator, VkCommandPool *  pCommandPool);\ntypedef VkResult (GLAD_API_PTR *PFN_vkCreateComputePipelines)(VkDevice   device, VkPipelineCache   pipelineCache, uint32_t   createInfoCount, const  VkComputePipelineCreateInfo *  pCreateInfos, const  VkAllocationCallbacks *  pAllocator, VkPipeline *  pPipelines);\ntypedef VkResult (GLAD_API_PTR *PFN_vkCreateDebugReportCallbackEXT)(VkInstance   instance, const  VkDebugReportCallbackCreateInfoEXT *  pCreateInfo, const  VkAllocationCallbacks *  pAllocator, VkDebugReportCallbackEXT *  pCallback);\ntypedef VkResult (GLAD_API_PTR *PFN_vkCreateDescriptorPool)(VkDevice   device, const  VkDescriptorPoolCreateInfo *  pCreateInfo, const  VkAllocationCallbacks *  pAllocator, VkDescriptorPool *  pDescriptorPool);\ntypedef VkResult (GLAD_API_PTR *PFN_vkCreateDescriptorSetLayout)(VkDevice   device, const  VkDescriptorSetLayoutCreateInfo *  pCreateInfo, const  VkAllocationCallbacks *  pAllocator, VkDescriptorSetLayout *  pSetLayout);\ntypedef VkResult (GLAD_API_PTR *PFN_vkCreateDescriptorUpdateTemplate)(VkDevice   device, const  VkDescriptorUpdateTemplateCreateInfo *  pCreateInfo, const  VkAllocationCallbacks *  pAllocator, VkDescriptorUpdateTemplate *  pDescriptorUpdateTemplate);\ntypedef VkResult (GLAD_API_PTR *PFN_vkCreateDevice)(VkPhysicalDevice   physicalDevice, const  VkDeviceCreateInfo *  pCreateInfo, const  VkAllocationCallbacks *  pAllocator, VkDevice *  pDevice);\ntypedef VkResult (GLAD_API_PTR *PFN_vkCreateEvent)(VkDevice   device, const  VkEventCreateInfo *  pCreateInfo, const  VkAllocationCallbacks *  pAllocator, VkEvent *  pEvent);\ntypedef VkResult (GLAD_API_PTR *PFN_vkCreateFence)(VkDevice   device, const  VkFenceCreateInfo *  pCreateInfo, const  VkAllocationCallbacks *  pAllocator, VkFence *  pFence);\ntypedef VkResult (GLAD_API_PTR *PFN_vkCreateFramebuffer)(VkDevice   device, const  VkFramebufferCreateInfo *  pCreateInfo, const  VkAllocationCallbacks *  pAllocator, VkFramebuffer *  pFramebuffer);\ntypedef VkResult (GLAD_API_PTR *PFN_vkCreateGraphicsPipelines)(VkDevice   device, VkPipelineCache   pipelineCache, uint32_t   createInfoCount, const  VkGraphicsPipelineCreateInfo *  pCreateInfos, const  VkAllocationCallbacks *  pAllocator, VkPipeline *  pPipelines);\ntypedef VkResult (GLAD_API_PTR *PFN_vkCreateImage)(VkDevice   device, const  VkImageCreateInfo *  pCreateInfo, const  VkAllocationCallbacks *  pAllocator, VkImage *  pImage);\ntypedef VkResult (GLAD_API_PTR *PFN_vkCreateImageView)(VkDevice   device, const  VkImageViewCreateInfo *  pCreateInfo, const  VkAllocationCallbacks *  pAllocator, VkImageView *  pView);\ntypedef VkResult (GLAD_API_PTR *PFN_vkCreateInstance)(const  VkInstanceCreateInfo *  pCreateInfo, const  VkAllocationCallbacks *  pAllocator, VkInstance *  pInstance);\ntypedef VkResult (GLAD_API_PTR *PFN_vkCreatePipelineCache)(VkDevice   device, const  VkPipelineCacheCreateInfo *  pCreateInfo, const  VkAllocationCallbacks *  pAllocator, VkPipelineCache *  pPipelineCache);\ntypedef VkResult (GLAD_API_PTR *PFN_vkCreatePipelineLayout)(VkDevice   device, const  VkPipelineLayoutCreateInfo *  pCreateInfo, const  VkAllocationCallbacks *  pAllocator, VkPipelineLayout *  pPipelineLayout);\ntypedef VkResult (GLAD_API_PTR *PFN_vkCreateQueryPool)(VkDevice   device, const  VkQueryPoolCreateInfo *  pCreateInfo, const  VkAllocationCallbacks *  pAllocator, VkQueryPool *  pQueryPool);\ntypedef VkResult (GLAD_API_PTR *PFN_vkCreateRenderPass)(VkDevice   device, const  VkRenderPassCreateInfo *  pCreateInfo, const  VkAllocationCallbacks *  pAllocator, VkRenderPass *  pRenderPass);\ntypedef VkResult (GLAD_API_PTR *PFN_vkCreateSampler)(VkDevice   device, const  VkSamplerCreateInfo *  pCreateInfo, const  VkAllocationCallbacks *  pAllocator, VkSampler *  pSampler);\ntypedef VkResult (GLAD_API_PTR *PFN_vkCreateSamplerYcbcrConversion)(VkDevice   device, const  VkSamplerYcbcrConversionCreateInfo *  pCreateInfo, const  VkAllocationCallbacks *  pAllocator, VkSamplerYcbcrConversion *  pYcbcrConversion);\ntypedef VkResult (GLAD_API_PTR *PFN_vkCreateSemaphore)(VkDevice   device, const  VkSemaphoreCreateInfo *  pCreateInfo, const  VkAllocationCallbacks *  pAllocator, VkSemaphore *  pSemaphore);\ntypedef VkResult (GLAD_API_PTR *PFN_vkCreateShaderModule)(VkDevice   device, const  VkShaderModuleCreateInfo *  pCreateInfo, const  VkAllocationCallbacks *  pAllocator, VkShaderModule *  pShaderModule);\ntypedef VkResult (GLAD_API_PTR *PFN_vkCreateSwapchainKHR)(VkDevice   device, const  VkSwapchainCreateInfoKHR *  pCreateInfo, const  VkAllocationCallbacks *  pAllocator, VkSwapchainKHR *  pSwapchain);\ntypedef void (GLAD_API_PTR *PFN_vkDebugReportMessageEXT)(VkInstance   instance, VkDebugReportFlagsEXT   flags, VkDebugReportObjectTypeEXT   objectType, uint64_t   object, size_t   location, int32_t   messageCode, const  char *  pLayerPrefix, const  char *  pMessage);\ntypedef void (GLAD_API_PTR *PFN_vkDestroyBuffer)(VkDevice   device, VkBuffer   buffer, const  VkAllocationCallbacks *  pAllocator);\ntypedef void (GLAD_API_PTR *PFN_vkDestroyBufferView)(VkDevice   device, VkBufferView   bufferView, const  VkAllocationCallbacks *  pAllocator);\ntypedef void (GLAD_API_PTR *PFN_vkDestroyCommandPool)(VkDevice   device, VkCommandPool   commandPool, const  VkAllocationCallbacks *  pAllocator);\ntypedef void (GLAD_API_PTR *PFN_vkDestroyDebugReportCallbackEXT)(VkInstance   instance, VkDebugReportCallbackEXT   callback, const  VkAllocationCallbacks *  pAllocator);\ntypedef void (GLAD_API_PTR *PFN_vkDestroyDescriptorPool)(VkDevice   device, VkDescriptorPool   descriptorPool, const  VkAllocationCallbacks *  pAllocator);\ntypedef void (GLAD_API_PTR *PFN_vkDestroyDescriptorSetLayout)(VkDevice   device, VkDescriptorSetLayout   descriptorSetLayout, const  VkAllocationCallbacks *  pAllocator);\ntypedef void (GLAD_API_PTR *PFN_vkDestroyDescriptorUpdateTemplate)(VkDevice   device, VkDescriptorUpdateTemplate   descriptorUpdateTemplate, const  VkAllocationCallbacks *  pAllocator);\ntypedef void (GLAD_API_PTR *PFN_vkDestroyDevice)(VkDevice   device, const  VkAllocationCallbacks *  pAllocator);\ntypedef void (GLAD_API_PTR *PFN_vkDestroyEvent)(VkDevice   device, VkEvent   event, const  VkAllocationCallbacks *  pAllocator);\ntypedef void (GLAD_API_PTR *PFN_vkDestroyFence)(VkDevice   device, VkFence   fence, const  VkAllocationCallbacks *  pAllocator);\ntypedef void (GLAD_API_PTR *PFN_vkDestroyFramebuffer)(VkDevice   device, VkFramebuffer   framebuffer, const  VkAllocationCallbacks *  pAllocator);\ntypedef void (GLAD_API_PTR *PFN_vkDestroyImage)(VkDevice   device, VkImage   image, const  VkAllocationCallbacks *  pAllocator);\ntypedef void (GLAD_API_PTR *PFN_vkDestroyImageView)(VkDevice   device, VkImageView   imageView, const  VkAllocationCallbacks *  pAllocator);\ntypedef void (GLAD_API_PTR *PFN_vkDestroyInstance)(VkInstance   instance, const  VkAllocationCallbacks *  pAllocator);\ntypedef void (GLAD_API_PTR *PFN_vkDestroyPipeline)(VkDevice   device, VkPipeline   pipeline, const  VkAllocationCallbacks *  pAllocator);\ntypedef void (GLAD_API_PTR *PFN_vkDestroyPipelineCache)(VkDevice   device, VkPipelineCache   pipelineCache, const  VkAllocationCallbacks *  pAllocator);\ntypedef void (GLAD_API_PTR *PFN_vkDestroyPipelineLayout)(VkDevice   device, VkPipelineLayout   pipelineLayout, const  VkAllocationCallbacks *  pAllocator);\ntypedef void (GLAD_API_PTR *PFN_vkDestroyQueryPool)(VkDevice   device, VkQueryPool   queryPool, const  VkAllocationCallbacks *  pAllocator);\ntypedef void (GLAD_API_PTR *PFN_vkDestroyRenderPass)(VkDevice   device, VkRenderPass   renderPass, const  VkAllocationCallbacks *  pAllocator);\ntypedef void (GLAD_API_PTR *PFN_vkDestroySampler)(VkDevice   device, VkSampler   sampler, const  VkAllocationCallbacks *  pAllocator);\ntypedef void (GLAD_API_PTR *PFN_vkDestroySamplerYcbcrConversion)(VkDevice   device, VkSamplerYcbcrConversion   ycbcrConversion, const  VkAllocationCallbacks *  pAllocator);\ntypedef void (GLAD_API_PTR *PFN_vkDestroySemaphore)(VkDevice   device, VkSemaphore   semaphore, const  VkAllocationCallbacks *  pAllocator);\ntypedef void (GLAD_API_PTR *PFN_vkDestroyShaderModule)(VkDevice   device, VkShaderModule   shaderModule, const  VkAllocationCallbacks *  pAllocator);\ntypedef void (GLAD_API_PTR *PFN_vkDestroySurfaceKHR)(VkInstance   instance, VkSurfaceKHR   surface, const  VkAllocationCallbacks *  pAllocator);\ntypedef void (GLAD_API_PTR *PFN_vkDestroySwapchainKHR)(VkDevice   device, VkSwapchainKHR   swapchain, const  VkAllocationCallbacks *  pAllocator);\ntypedef VkResult (GLAD_API_PTR *PFN_vkDeviceWaitIdle)(VkDevice   device);\ntypedef VkResult (GLAD_API_PTR *PFN_vkEndCommandBuffer)(VkCommandBuffer   commandBuffer);\ntypedef VkResult (GLAD_API_PTR *PFN_vkEnumerateDeviceExtensionProperties)(VkPhysicalDevice   physicalDevice, const  char *  pLayerName, uint32_t *  pPropertyCount, VkExtensionProperties *  pProperties);\ntypedef VkResult (GLAD_API_PTR *PFN_vkEnumerateDeviceLayerProperties)(VkPhysicalDevice   physicalDevice, uint32_t *  pPropertyCount, VkLayerProperties *  pProperties);\ntypedef VkResult (GLAD_API_PTR *PFN_vkEnumerateInstanceExtensionProperties)(const  char *  pLayerName, uint32_t *  pPropertyCount, VkExtensionProperties *  pProperties);\ntypedef VkResult (GLAD_API_PTR *PFN_vkEnumerateInstanceLayerProperties)(uint32_t *  pPropertyCount, VkLayerProperties *  pProperties);\ntypedef VkResult (GLAD_API_PTR *PFN_vkEnumerateInstanceVersion)(uint32_t *  pApiVersion);\ntypedef VkResult (GLAD_API_PTR *PFN_vkEnumeratePhysicalDeviceGroups)(VkInstance   instance, uint32_t *  pPhysicalDeviceGroupCount, VkPhysicalDeviceGroupProperties *  pPhysicalDeviceGroupProperties);\ntypedef VkResult (GLAD_API_PTR *PFN_vkEnumeratePhysicalDevices)(VkInstance   instance, uint32_t *  pPhysicalDeviceCount, VkPhysicalDevice *  pPhysicalDevices);\ntypedef VkResult (GLAD_API_PTR *PFN_vkFlushMappedMemoryRanges)(VkDevice   device, uint32_t   memoryRangeCount, const  VkMappedMemoryRange *  pMemoryRanges);\ntypedef void (GLAD_API_PTR *PFN_vkFreeCommandBuffers)(VkDevice   device, VkCommandPool   commandPool, uint32_t   commandBufferCount, const  VkCommandBuffer *  pCommandBuffers);\ntypedef VkResult (GLAD_API_PTR *PFN_vkFreeDescriptorSets)(VkDevice   device, VkDescriptorPool   descriptorPool, uint32_t   descriptorSetCount, const  VkDescriptorSet *  pDescriptorSets);\ntypedef void (GLAD_API_PTR *PFN_vkFreeMemory)(VkDevice   device, VkDeviceMemory   memory, const  VkAllocationCallbacks *  pAllocator);\ntypedef void (GLAD_API_PTR *PFN_vkGetBufferMemoryRequirements)(VkDevice   device, VkBuffer   buffer, VkMemoryRequirements *  pMemoryRequirements);\ntypedef void (GLAD_API_PTR *PFN_vkGetBufferMemoryRequirements2)(VkDevice   device, const  VkBufferMemoryRequirementsInfo2 *  pInfo, VkMemoryRequirements2 *  pMemoryRequirements);\ntypedef void (GLAD_API_PTR *PFN_vkGetDescriptorSetLayoutSupport)(VkDevice   device, const  VkDescriptorSetLayoutCreateInfo *  pCreateInfo, VkDescriptorSetLayoutSupport *  pSupport);\ntypedef void (GLAD_API_PTR *PFN_vkGetDeviceGroupPeerMemoryFeatures)(VkDevice   device, uint32_t   heapIndex, uint32_t   localDeviceIndex, uint32_t   remoteDeviceIndex, VkPeerMemoryFeatureFlags *  pPeerMemoryFeatures);\ntypedef VkResult (GLAD_API_PTR *PFN_vkGetDeviceGroupPresentCapabilitiesKHR)(VkDevice   device, VkDeviceGroupPresentCapabilitiesKHR *  pDeviceGroupPresentCapabilities);\ntypedef VkResult (GLAD_API_PTR *PFN_vkGetDeviceGroupSurfacePresentModesKHR)(VkDevice   device, VkSurfaceKHR   surface, VkDeviceGroupPresentModeFlagsKHR *  pModes);\ntypedef void (GLAD_API_PTR *PFN_vkGetDeviceMemoryCommitment)(VkDevice   device, VkDeviceMemory   memory, VkDeviceSize *  pCommittedMemoryInBytes);\ntypedef PFN_vkVoidFunction (GLAD_API_PTR *PFN_vkGetDeviceProcAddr)(VkDevice   device, const  char *  pName);\ntypedef void (GLAD_API_PTR *PFN_vkGetDeviceQueue)(VkDevice   device, uint32_t   queueFamilyIndex, uint32_t   queueIndex, VkQueue *  pQueue);\ntypedef void (GLAD_API_PTR *PFN_vkGetDeviceQueue2)(VkDevice   device, const  VkDeviceQueueInfo2 *  pQueueInfo, VkQueue *  pQueue);\ntypedef VkResult (GLAD_API_PTR *PFN_vkGetEventStatus)(VkDevice   device, VkEvent   event);\ntypedef VkResult (GLAD_API_PTR *PFN_vkGetFenceStatus)(VkDevice   device, VkFence   fence);\ntypedef void (GLAD_API_PTR *PFN_vkGetImageMemoryRequirements)(VkDevice   device, VkImage   image, VkMemoryRequirements *  pMemoryRequirements);\ntypedef void (GLAD_API_PTR *PFN_vkGetImageMemoryRequirements2)(VkDevice   device, const  VkImageMemoryRequirementsInfo2 *  pInfo, VkMemoryRequirements2 *  pMemoryRequirements);\ntypedef void (GLAD_API_PTR *PFN_vkGetImageSparseMemoryRequirements)(VkDevice   device, VkImage   image, uint32_t *  pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements *  pSparseMemoryRequirements);\ntypedef void (GLAD_API_PTR *PFN_vkGetImageSparseMemoryRequirements2)(VkDevice   device, const  VkImageSparseMemoryRequirementsInfo2 *  pInfo, uint32_t *  pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements2 *  pSparseMemoryRequirements);\ntypedef void (GLAD_API_PTR *PFN_vkGetImageSubresourceLayout)(VkDevice   device, VkImage   image, const  VkImageSubresource *  pSubresource, VkSubresourceLayout *  pLayout);\ntypedef PFN_vkVoidFunction (GLAD_API_PTR *PFN_vkGetInstanceProcAddr)(VkInstance   instance, const  char *  pName);\ntypedef void (GLAD_API_PTR *PFN_vkGetPhysicalDeviceExternalBufferProperties)(VkPhysicalDevice   physicalDevice, const  VkPhysicalDeviceExternalBufferInfo *  pExternalBufferInfo, VkExternalBufferProperties *  pExternalBufferProperties);\ntypedef void (GLAD_API_PTR *PFN_vkGetPhysicalDeviceExternalFenceProperties)(VkPhysicalDevice   physicalDevice, const  VkPhysicalDeviceExternalFenceInfo *  pExternalFenceInfo, VkExternalFenceProperties *  pExternalFenceProperties);\ntypedef void (GLAD_API_PTR *PFN_vkGetPhysicalDeviceExternalSemaphoreProperties)(VkPhysicalDevice   physicalDevice, const  VkPhysicalDeviceExternalSemaphoreInfo *  pExternalSemaphoreInfo, VkExternalSemaphoreProperties *  pExternalSemaphoreProperties);\ntypedef void (GLAD_API_PTR *PFN_vkGetPhysicalDeviceFeatures)(VkPhysicalDevice   physicalDevice, VkPhysicalDeviceFeatures *  pFeatures);\ntypedef void (GLAD_API_PTR *PFN_vkGetPhysicalDeviceFeatures2)(VkPhysicalDevice   physicalDevice, VkPhysicalDeviceFeatures2 *  pFeatures);\ntypedef void (GLAD_API_PTR *PFN_vkGetPhysicalDeviceFormatProperties)(VkPhysicalDevice   physicalDevice, VkFormat   format, VkFormatProperties *  pFormatProperties);\ntypedef void (GLAD_API_PTR *PFN_vkGetPhysicalDeviceFormatProperties2)(VkPhysicalDevice   physicalDevice, VkFormat   format, VkFormatProperties2 *  pFormatProperties);\ntypedef VkResult (GLAD_API_PTR *PFN_vkGetPhysicalDeviceImageFormatProperties)(VkPhysicalDevice   physicalDevice, VkFormat   format, VkImageType   type, VkImageTiling   tiling, VkImageUsageFlags   usage, VkImageCreateFlags   flags, VkImageFormatProperties *  pImageFormatProperties);\ntypedef VkResult (GLAD_API_PTR *PFN_vkGetPhysicalDeviceImageFormatProperties2)(VkPhysicalDevice   physicalDevice, const  VkPhysicalDeviceImageFormatInfo2 *  pImageFormatInfo, VkImageFormatProperties2 *  pImageFormatProperties);\ntypedef void (GLAD_API_PTR *PFN_vkGetPhysicalDeviceMemoryProperties)(VkPhysicalDevice   physicalDevice, VkPhysicalDeviceMemoryProperties *  pMemoryProperties);\ntypedef void (GLAD_API_PTR *PFN_vkGetPhysicalDeviceMemoryProperties2)(VkPhysicalDevice   physicalDevice, VkPhysicalDeviceMemoryProperties2 *  pMemoryProperties);\ntypedef VkResult (GLAD_API_PTR *PFN_vkGetPhysicalDevicePresentRectanglesKHR)(VkPhysicalDevice   physicalDevice, VkSurfaceKHR   surface, uint32_t *  pRectCount, VkRect2D *  pRects);\ntypedef void (GLAD_API_PTR *PFN_vkGetPhysicalDeviceProperties)(VkPhysicalDevice   physicalDevice, VkPhysicalDeviceProperties *  pProperties);\ntypedef void (GLAD_API_PTR *PFN_vkGetPhysicalDeviceProperties2)(VkPhysicalDevice   physicalDevice, VkPhysicalDeviceProperties2 *  pProperties);\ntypedef void (GLAD_API_PTR *PFN_vkGetPhysicalDeviceQueueFamilyProperties)(VkPhysicalDevice   physicalDevice, uint32_t *  pQueueFamilyPropertyCount, VkQueueFamilyProperties *  pQueueFamilyProperties);\ntypedef void (GLAD_API_PTR *PFN_vkGetPhysicalDeviceQueueFamilyProperties2)(VkPhysicalDevice   physicalDevice, uint32_t *  pQueueFamilyPropertyCount, VkQueueFamilyProperties2 *  pQueueFamilyProperties);\ntypedef void (GLAD_API_PTR *PFN_vkGetPhysicalDeviceSparseImageFormatProperties)(VkPhysicalDevice   physicalDevice, VkFormat   format, VkImageType   type, VkSampleCountFlagBits   samples, VkImageUsageFlags   usage, VkImageTiling   tiling, uint32_t *  pPropertyCount, VkSparseImageFormatProperties *  pProperties);\ntypedef void (GLAD_API_PTR *PFN_vkGetPhysicalDeviceSparseImageFormatProperties2)(VkPhysicalDevice   physicalDevice, const  VkPhysicalDeviceSparseImageFormatInfo2 *  pFormatInfo, uint32_t *  pPropertyCount, VkSparseImageFormatProperties2 *  pProperties);\ntypedef VkResult (GLAD_API_PTR *PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR)(VkPhysicalDevice   physicalDevice, VkSurfaceKHR   surface, VkSurfaceCapabilitiesKHR *  pSurfaceCapabilities);\ntypedef VkResult (GLAD_API_PTR *PFN_vkGetPhysicalDeviceSurfaceFormatsKHR)(VkPhysicalDevice   physicalDevice, VkSurfaceKHR   surface, uint32_t *  pSurfaceFormatCount, VkSurfaceFormatKHR *  pSurfaceFormats);\ntypedef VkResult (GLAD_API_PTR *PFN_vkGetPhysicalDeviceSurfacePresentModesKHR)(VkPhysicalDevice   physicalDevice, VkSurfaceKHR   surface, uint32_t *  pPresentModeCount, VkPresentModeKHR *  pPresentModes);\ntypedef VkResult (GLAD_API_PTR *PFN_vkGetPhysicalDeviceSurfaceSupportKHR)(VkPhysicalDevice   physicalDevice, uint32_t   queueFamilyIndex, VkSurfaceKHR   surface, VkBool32 *  pSupported);\ntypedef VkResult (GLAD_API_PTR *PFN_vkGetPipelineCacheData)(VkDevice   device, VkPipelineCache   pipelineCache, size_t *  pDataSize, void *  pData);\ntypedef VkResult (GLAD_API_PTR *PFN_vkGetQueryPoolResults)(VkDevice   device, VkQueryPool   queryPool, uint32_t   firstQuery, uint32_t   queryCount, size_t   dataSize, void *  pData, VkDeviceSize   stride, VkQueryResultFlags   flags);\ntypedef void (GLAD_API_PTR *PFN_vkGetRenderAreaGranularity)(VkDevice   device, VkRenderPass   renderPass, VkExtent2D *  pGranularity);\ntypedef VkResult (GLAD_API_PTR *PFN_vkGetSwapchainImagesKHR)(VkDevice   device, VkSwapchainKHR   swapchain, uint32_t *  pSwapchainImageCount, VkImage *  pSwapchainImages);\ntypedef VkResult (GLAD_API_PTR *PFN_vkInvalidateMappedMemoryRanges)(VkDevice   device, uint32_t   memoryRangeCount, const  VkMappedMemoryRange *  pMemoryRanges);\ntypedef VkResult (GLAD_API_PTR *PFN_vkMapMemory)(VkDevice   device, VkDeviceMemory   memory, VkDeviceSize   offset, VkDeviceSize   size, VkMemoryMapFlags   flags, void **  ppData);\ntypedef VkResult (GLAD_API_PTR *PFN_vkMergePipelineCaches)(VkDevice   device, VkPipelineCache   dstCache, uint32_t   srcCacheCount, const  VkPipelineCache *  pSrcCaches);\ntypedef VkResult (GLAD_API_PTR *PFN_vkQueueBindSparse)(VkQueue   queue, uint32_t   bindInfoCount, const  VkBindSparseInfo *  pBindInfo, VkFence   fence);\ntypedef VkResult (GLAD_API_PTR *PFN_vkQueuePresentKHR)(VkQueue   queue, const  VkPresentInfoKHR *  pPresentInfo);\ntypedef VkResult (GLAD_API_PTR *PFN_vkQueueSubmit)(VkQueue   queue, uint32_t   submitCount, const  VkSubmitInfo *  pSubmits, VkFence   fence);\ntypedef VkResult (GLAD_API_PTR *PFN_vkQueueWaitIdle)(VkQueue   queue);\ntypedef VkResult (GLAD_API_PTR *PFN_vkResetCommandBuffer)(VkCommandBuffer   commandBuffer, VkCommandBufferResetFlags   flags);\ntypedef VkResult (GLAD_API_PTR *PFN_vkResetCommandPool)(VkDevice   device, VkCommandPool   commandPool, VkCommandPoolResetFlags   flags);\ntypedef VkResult (GLAD_API_PTR *PFN_vkResetDescriptorPool)(VkDevice   device, VkDescriptorPool   descriptorPool, VkDescriptorPoolResetFlags   flags);\ntypedef VkResult (GLAD_API_PTR *PFN_vkResetEvent)(VkDevice   device, VkEvent   event);\ntypedef VkResult (GLAD_API_PTR *PFN_vkResetFences)(VkDevice   device, uint32_t   fenceCount, const  VkFence *  pFences);\ntypedef VkResult (GLAD_API_PTR *PFN_vkSetEvent)(VkDevice   device, VkEvent   event);\ntypedef void (GLAD_API_PTR *PFN_vkTrimCommandPool)(VkDevice   device, VkCommandPool   commandPool, VkCommandPoolTrimFlags   flags);\ntypedef void (GLAD_API_PTR *PFN_vkUnmapMemory)(VkDevice   device, VkDeviceMemory   memory);\ntypedef void (GLAD_API_PTR *PFN_vkUpdateDescriptorSetWithTemplate)(VkDevice   device, VkDescriptorSet   descriptorSet, VkDescriptorUpdateTemplate   descriptorUpdateTemplate, const  void *  pData);\ntypedef void (GLAD_API_PTR *PFN_vkUpdateDescriptorSets)(VkDevice   device, uint32_t   descriptorWriteCount, const  VkWriteDescriptorSet *  pDescriptorWrites, uint32_t   descriptorCopyCount, const  VkCopyDescriptorSet *  pDescriptorCopies);\ntypedef VkResult (GLAD_API_PTR *PFN_vkWaitForFences)(VkDevice   device, uint32_t   fenceCount, const  VkFence *  pFences, VkBool32   waitAll, uint64_t   timeout);\n\nGLAD_API_CALL PFN_vkAcquireNextImage2KHR glad_vkAcquireNextImage2KHR;\n#define vkAcquireNextImage2KHR glad_vkAcquireNextImage2KHR\nGLAD_API_CALL PFN_vkAcquireNextImageKHR glad_vkAcquireNextImageKHR;\n#define vkAcquireNextImageKHR glad_vkAcquireNextImageKHR\nGLAD_API_CALL PFN_vkAllocateCommandBuffers glad_vkAllocateCommandBuffers;\n#define vkAllocateCommandBuffers glad_vkAllocateCommandBuffers\nGLAD_API_CALL PFN_vkAllocateDescriptorSets glad_vkAllocateDescriptorSets;\n#define vkAllocateDescriptorSets glad_vkAllocateDescriptorSets\nGLAD_API_CALL PFN_vkAllocateMemory glad_vkAllocateMemory;\n#define vkAllocateMemory glad_vkAllocateMemory\nGLAD_API_CALL PFN_vkBeginCommandBuffer glad_vkBeginCommandBuffer;\n#define vkBeginCommandBuffer glad_vkBeginCommandBuffer\nGLAD_API_CALL PFN_vkBindBufferMemory glad_vkBindBufferMemory;\n#define vkBindBufferMemory glad_vkBindBufferMemory\nGLAD_API_CALL PFN_vkBindBufferMemory2 glad_vkBindBufferMemory2;\n#define vkBindBufferMemory2 glad_vkBindBufferMemory2\nGLAD_API_CALL PFN_vkBindImageMemory glad_vkBindImageMemory;\n#define vkBindImageMemory glad_vkBindImageMemory\nGLAD_API_CALL PFN_vkBindImageMemory2 glad_vkBindImageMemory2;\n#define vkBindImageMemory2 glad_vkBindImageMemory2\nGLAD_API_CALL PFN_vkCmdBeginQuery glad_vkCmdBeginQuery;\n#define vkCmdBeginQuery glad_vkCmdBeginQuery\nGLAD_API_CALL PFN_vkCmdBeginRenderPass glad_vkCmdBeginRenderPass;\n#define vkCmdBeginRenderPass glad_vkCmdBeginRenderPass\nGLAD_API_CALL PFN_vkCmdBindDescriptorSets glad_vkCmdBindDescriptorSets;\n#define vkCmdBindDescriptorSets glad_vkCmdBindDescriptorSets\nGLAD_API_CALL PFN_vkCmdBindIndexBuffer glad_vkCmdBindIndexBuffer;\n#define vkCmdBindIndexBuffer glad_vkCmdBindIndexBuffer\nGLAD_API_CALL PFN_vkCmdBindPipeline glad_vkCmdBindPipeline;\n#define vkCmdBindPipeline glad_vkCmdBindPipeline\nGLAD_API_CALL PFN_vkCmdBindVertexBuffers glad_vkCmdBindVertexBuffers;\n#define vkCmdBindVertexBuffers glad_vkCmdBindVertexBuffers\nGLAD_API_CALL PFN_vkCmdBlitImage glad_vkCmdBlitImage;\n#define vkCmdBlitImage glad_vkCmdBlitImage\nGLAD_API_CALL PFN_vkCmdClearAttachments glad_vkCmdClearAttachments;\n#define vkCmdClearAttachments glad_vkCmdClearAttachments\nGLAD_API_CALL PFN_vkCmdClearColorImage glad_vkCmdClearColorImage;\n#define vkCmdClearColorImage glad_vkCmdClearColorImage\nGLAD_API_CALL PFN_vkCmdClearDepthStencilImage glad_vkCmdClearDepthStencilImage;\n#define vkCmdClearDepthStencilImage glad_vkCmdClearDepthStencilImage\nGLAD_API_CALL PFN_vkCmdCopyBuffer glad_vkCmdCopyBuffer;\n#define vkCmdCopyBuffer glad_vkCmdCopyBuffer\nGLAD_API_CALL PFN_vkCmdCopyBufferToImage glad_vkCmdCopyBufferToImage;\n#define vkCmdCopyBufferToImage glad_vkCmdCopyBufferToImage\nGLAD_API_CALL PFN_vkCmdCopyImage glad_vkCmdCopyImage;\n#define vkCmdCopyImage glad_vkCmdCopyImage\nGLAD_API_CALL PFN_vkCmdCopyImageToBuffer glad_vkCmdCopyImageToBuffer;\n#define vkCmdCopyImageToBuffer glad_vkCmdCopyImageToBuffer\nGLAD_API_CALL PFN_vkCmdCopyQueryPoolResults glad_vkCmdCopyQueryPoolResults;\n#define vkCmdCopyQueryPoolResults glad_vkCmdCopyQueryPoolResults\nGLAD_API_CALL PFN_vkCmdDispatch glad_vkCmdDispatch;\n#define vkCmdDispatch glad_vkCmdDispatch\nGLAD_API_CALL PFN_vkCmdDispatchBase glad_vkCmdDispatchBase;\n#define vkCmdDispatchBase glad_vkCmdDispatchBase\nGLAD_API_CALL PFN_vkCmdDispatchIndirect glad_vkCmdDispatchIndirect;\n#define vkCmdDispatchIndirect glad_vkCmdDispatchIndirect\nGLAD_API_CALL PFN_vkCmdDraw glad_vkCmdDraw;\n#define vkCmdDraw glad_vkCmdDraw\nGLAD_API_CALL PFN_vkCmdDrawIndexed glad_vkCmdDrawIndexed;\n#define vkCmdDrawIndexed glad_vkCmdDrawIndexed\nGLAD_API_CALL PFN_vkCmdDrawIndexedIndirect glad_vkCmdDrawIndexedIndirect;\n#define vkCmdDrawIndexedIndirect glad_vkCmdDrawIndexedIndirect\nGLAD_API_CALL PFN_vkCmdDrawIndirect glad_vkCmdDrawIndirect;\n#define vkCmdDrawIndirect glad_vkCmdDrawIndirect\nGLAD_API_CALL PFN_vkCmdEndQuery glad_vkCmdEndQuery;\n#define vkCmdEndQuery glad_vkCmdEndQuery\nGLAD_API_CALL PFN_vkCmdEndRenderPass glad_vkCmdEndRenderPass;\n#define vkCmdEndRenderPass glad_vkCmdEndRenderPass\nGLAD_API_CALL PFN_vkCmdExecuteCommands glad_vkCmdExecuteCommands;\n#define vkCmdExecuteCommands glad_vkCmdExecuteCommands\nGLAD_API_CALL PFN_vkCmdFillBuffer glad_vkCmdFillBuffer;\n#define vkCmdFillBuffer glad_vkCmdFillBuffer\nGLAD_API_CALL PFN_vkCmdNextSubpass glad_vkCmdNextSubpass;\n#define vkCmdNextSubpass glad_vkCmdNextSubpass\nGLAD_API_CALL PFN_vkCmdPipelineBarrier glad_vkCmdPipelineBarrier;\n#define vkCmdPipelineBarrier glad_vkCmdPipelineBarrier\nGLAD_API_CALL PFN_vkCmdPushConstants glad_vkCmdPushConstants;\n#define vkCmdPushConstants glad_vkCmdPushConstants\nGLAD_API_CALL PFN_vkCmdResetEvent glad_vkCmdResetEvent;\n#define vkCmdResetEvent glad_vkCmdResetEvent\nGLAD_API_CALL PFN_vkCmdResetQueryPool glad_vkCmdResetQueryPool;\n#define vkCmdResetQueryPool glad_vkCmdResetQueryPool\nGLAD_API_CALL PFN_vkCmdResolveImage glad_vkCmdResolveImage;\n#define vkCmdResolveImage glad_vkCmdResolveImage\nGLAD_API_CALL PFN_vkCmdSetBlendConstants glad_vkCmdSetBlendConstants;\n#define vkCmdSetBlendConstants glad_vkCmdSetBlendConstants\nGLAD_API_CALL PFN_vkCmdSetDepthBias glad_vkCmdSetDepthBias;\n#define vkCmdSetDepthBias glad_vkCmdSetDepthBias\nGLAD_API_CALL PFN_vkCmdSetDepthBounds glad_vkCmdSetDepthBounds;\n#define vkCmdSetDepthBounds glad_vkCmdSetDepthBounds\nGLAD_API_CALL PFN_vkCmdSetDeviceMask glad_vkCmdSetDeviceMask;\n#define vkCmdSetDeviceMask glad_vkCmdSetDeviceMask\nGLAD_API_CALL PFN_vkCmdSetEvent glad_vkCmdSetEvent;\n#define vkCmdSetEvent glad_vkCmdSetEvent\nGLAD_API_CALL PFN_vkCmdSetLineWidth glad_vkCmdSetLineWidth;\n#define vkCmdSetLineWidth glad_vkCmdSetLineWidth\nGLAD_API_CALL PFN_vkCmdSetScissor glad_vkCmdSetScissor;\n#define vkCmdSetScissor glad_vkCmdSetScissor\nGLAD_API_CALL PFN_vkCmdSetStencilCompareMask glad_vkCmdSetStencilCompareMask;\n#define vkCmdSetStencilCompareMask glad_vkCmdSetStencilCompareMask\nGLAD_API_CALL PFN_vkCmdSetStencilReference glad_vkCmdSetStencilReference;\n#define vkCmdSetStencilReference glad_vkCmdSetStencilReference\nGLAD_API_CALL PFN_vkCmdSetStencilWriteMask glad_vkCmdSetStencilWriteMask;\n#define vkCmdSetStencilWriteMask glad_vkCmdSetStencilWriteMask\nGLAD_API_CALL PFN_vkCmdSetViewport glad_vkCmdSetViewport;\n#define vkCmdSetViewport glad_vkCmdSetViewport\nGLAD_API_CALL PFN_vkCmdUpdateBuffer glad_vkCmdUpdateBuffer;\n#define vkCmdUpdateBuffer glad_vkCmdUpdateBuffer\nGLAD_API_CALL PFN_vkCmdWaitEvents glad_vkCmdWaitEvents;\n#define vkCmdWaitEvents glad_vkCmdWaitEvents\nGLAD_API_CALL PFN_vkCmdWriteTimestamp glad_vkCmdWriteTimestamp;\n#define vkCmdWriteTimestamp glad_vkCmdWriteTimestamp\nGLAD_API_CALL PFN_vkCreateBuffer glad_vkCreateBuffer;\n#define vkCreateBuffer glad_vkCreateBuffer\nGLAD_API_CALL PFN_vkCreateBufferView glad_vkCreateBufferView;\n#define vkCreateBufferView glad_vkCreateBufferView\nGLAD_API_CALL PFN_vkCreateCommandPool glad_vkCreateCommandPool;\n#define vkCreateCommandPool glad_vkCreateCommandPool\nGLAD_API_CALL PFN_vkCreateComputePipelines glad_vkCreateComputePipelines;\n#define vkCreateComputePipelines glad_vkCreateComputePipelines\nGLAD_API_CALL PFN_vkCreateDebugReportCallbackEXT glad_vkCreateDebugReportCallbackEXT;\n#define vkCreateDebugReportCallbackEXT glad_vkCreateDebugReportCallbackEXT\nGLAD_API_CALL PFN_vkCreateDescriptorPool glad_vkCreateDescriptorPool;\n#define vkCreateDescriptorPool glad_vkCreateDescriptorPool\nGLAD_API_CALL PFN_vkCreateDescriptorSetLayout glad_vkCreateDescriptorSetLayout;\n#define vkCreateDescriptorSetLayout glad_vkCreateDescriptorSetLayout\nGLAD_API_CALL PFN_vkCreateDescriptorUpdateTemplate glad_vkCreateDescriptorUpdateTemplate;\n#define vkCreateDescriptorUpdateTemplate glad_vkCreateDescriptorUpdateTemplate\nGLAD_API_CALL PFN_vkCreateDevice glad_vkCreateDevice;\n#define vkCreateDevice glad_vkCreateDevice\nGLAD_API_CALL PFN_vkCreateEvent glad_vkCreateEvent;\n#define vkCreateEvent glad_vkCreateEvent\nGLAD_API_CALL PFN_vkCreateFence glad_vkCreateFence;\n#define vkCreateFence glad_vkCreateFence\nGLAD_API_CALL PFN_vkCreateFramebuffer glad_vkCreateFramebuffer;\n#define vkCreateFramebuffer glad_vkCreateFramebuffer\nGLAD_API_CALL PFN_vkCreateGraphicsPipelines glad_vkCreateGraphicsPipelines;\n#define vkCreateGraphicsPipelines glad_vkCreateGraphicsPipelines\nGLAD_API_CALL PFN_vkCreateImage glad_vkCreateImage;\n#define vkCreateImage glad_vkCreateImage\nGLAD_API_CALL PFN_vkCreateImageView glad_vkCreateImageView;\n#define vkCreateImageView glad_vkCreateImageView\nGLAD_API_CALL PFN_vkCreateInstance glad_vkCreateInstance;\n#define vkCreateInstance glad_vkCreateInstance\nGLAD_API_CALL PFN_vkCreatePipelineCache glad_vkCreatePipelineCache;\n#define vkCreatePipelineCache glad_vkCreatePipelineCache\nGLAD_API_CALL PFN_vkCreatePipelineLayout glad_vkCreatePipelineLayout;\n#define vkCreatePipelineLayout glad_vkCreatePipelineLayout\nGLAD_API_CALL PFN_vkCreateQueryPool glad_vkCreateQueryPool;\n#define vkCreateQueryPool glad_vkCreateQueryPool\nGLAD_API_CALL PFN_vkCreateRenderPass glad_vkCreateRenderPass;\n#define vkCreateRenderPass glad_vkCreateRenderPass\nGLAD_API_CALL PFN_vkCreateSampler glad_vkCreateSampler;\n#define vkCreateSampler glad_vkCreateSampler\nGLAD_API_CALL PFN_vkCreateSamplerYcbcrConversion glad_vkCreateSamplerYcbcrConversion;\n#define vkCreateSamplerYcbcrConversion glad_vkCreateSamplerYcbcrConversion\nGLAD_API_CALL PFN_vkCreateSemaphore glad_vkCreateSemaphore;\n#define vkCreateSemaphore glad_vkCreateSemaphore\nGLAD_API_CALL PFN_vkCreateShaderModule glad_vkCreateShaderModule;\n#define vkCreateShaderModule glad_vkCreateShaderModule\nGLAD_API_CALL PFN_vkCreateSwapchainKHR glad_vkCreateSwapchainKHR;\n#define vkCreateSwapchainKHR glad_vkCreateSwapchainKHR\nGLAD_API_CALL PFN_vkDebugReportMessageEXT glad_vkDebugReportMessageEXT;\n#define vkDebugReportMessageEXT glad_vkDebugReportMessageEXT\nGLAD_API_CALL PFN_vkDestroyBuffer glad_vkDestroyBuffer;\n#define vkDestroyBuffer glad_vkDestroyBuffer\nGLAD_API_CALL PFN_vkDestroyBufferView glad_vkDestroyBufferView;\n#define vkDestroyBufferView glad_vkDestroyBufferView\nGLAD_API_CALL PFN_vkDestroyCommandPool glad_vkDestroyCommandPool;\n#define vkDestroyCommandPool glad_vkDestroyCommandPool\nGLAD_API_CALL PFN_vkDestroyDebugReportCallbackEXT glad_vkDestroyDebugReportCallbackEXT;\n#define vkDestroyDebugReportCallbackEXT glad_vkDestroyDebugReportCallbackEXT\nGLAD_API_CALL PFN_vkDestroyDescriptorPool glad_vkDestroyDescriptorPool;\n#define vkDestroyDescriptorPool glad_vkDestroyDescriptorPool\nGLAD_API_CALL PFN_vkDestroyDescriptorSetLayout glad_vkDestroyDescriptorSetLayout;\n#define vkDestroyDescriptorSetLayout glad_vkDestroyDescriptorSetLayout\nGLAD_API_CALL PFN_vkDestroyDescriptorUpdateTemplate glad_vkDestroyDescriptorUpdateTemplate;\n#define vkDestroyDescriptorUpdateTemplate glad_vkDestroyDescriptorUpdateTemplate\nGLAD_API_CALL PFN_vkDestroyDevice glad_vkDestroyDevice;\n#define vkDestroyDevice glad_vkDestroyDevice\nGLAD_API_CALL PFN_vkDestroyEvent glad_vkDestroyEvent;\n#define vkDestroyEvent glad_vkDestroyEvent\nGLAD_API_CALL PFN_vkDestroyFence glad_vkDestroyFence;\n#define vkDestroyFence glad_vkDestroyFence\nGLAD_API_CALL PFN_vkDestroyFramebuffer glad_vkDestroyFramebuffer;\n#define vkDestroyFramebuffer glad_vkDestroyFramebuffer\nGLAD_API_CALL PFN_vkDestroyImage glad_vkDestroyImage;\n#define vkDestroyImage glad_vkDestroyImage\nGLAD_API_CALL PFN_vkDestroyImageView glad_vkDestroyImageView;\n#define vkDestroyImageView glad_vkDestroyImageView\nGLAD_API_CALL PFN_vkDestroyInstance glad_vkDestroyInstance;\n#define vkDestroyInstance glad_vkDestroyInstance\nGLAD_API_CALL PFN_vkDestroyPipeline glad_vkDestroyPipeline;\n#define vkDestroyPipeline glad_vkDestroyPipeline\nGLAD_API_CALL PFN_vkDestroyPipelineCache glad_vkDestroyPipelineCache;\n#define vkDestroyPipelineCache glad_vkDestroyPipelineCache\nGLAD_API_CALL PFN_vkDestroyPipelineLayout glad_vkDestroyPipelineLayout;\n#define vkDestroyPipelineLayout glad_vkDestroyPipelineLayout\nGLAD_API_CALL PFN_vkDestroyQueryPool glad_vkDestroyQueryPool;\n#define vkDestroyQueryPool glad_vkDestroyQueryPool\nGLAD_API_CALL PFN_vkDestroyRenderPass glad_vkDestroyRenderPass;\n#define vkDestroyRenderPass glad_vkDestroyRenderPass\nGLAD_API_CALL PFN_vkDestroySampler glad_vkDestroySampler;\n#define vkDestroySampler glad_vkDestroySampler\nGLAD_API_CALL PFN_vkDestroySamplerYcbcrConversion glad_vkDestroySamplerYcbcrConversion;\n#define vkDestroySamplerYcbcrConversion glad_vkDestroySamplerYcbcrConversion\nGLAD_API_CALL PFN_vkDestroySemaphore glad_vkDestroySemaphore;\n#define vkDestroySemaphore glad_vkDestroySemaphore\nGLAD_API_CALL PFN_vkDestroyShaderModule glad_vkDestroyShaderModule;\n#define vkDestroyShaderModule glad_vkDestroyShaderModule\nGLAD_API_CALL PFN_vkDestroySurfaceKHR glad_vkDestroySurfaceKHR;\n#define vkDestroySurfaceKHR glad_vkDestroySurfaceKHR\nGLAD_API_CALL PFN_vkDestroySwapchainKHR glad_vkDestroySwapchainKHR;\n#define vkDestroySwapchainKHR glad_vkDestroySwapchainKHR\nGLAD_API_CALL PFN_vkDeviceWaitIdle glad_vkDeviceWaitIdle;\n#define vkDeviceWaitIdle glad_vkDeviceWaitIdle\nGLAD_API_CALL PFN_vkEndCommandBuffer glad_vkEndCommandBuffer;\n#define vkEndCommandBuffer glad_vkEndCommandBuffer\nGLAD_API_CALL PFN_vkEnumerateDeviceExtensionProperties glad_vkEnumerateDeviceExtensionProperties;\n#define vkEnumerateDeviceExtensionProperties glad_vkEnumerateDeviceExtensionProperties\nGLAD_API_CALL PFN_vkEnumerateDeviceLayerProperties glad_vkEnumerateDeviceLayerProperties;\n#define vkEnumerateDeviceLayerProperties glad_vkEnumerateDeviceLayerProperties\nGLAD_API_CALL PFN_vkEnumerateInstanceExtensionProperties glad_vkEnumerateInstanceExtensionProperties;\n#define vkEnumerateInstanceExtensionProperties glad_vkEnumerateInstanceExtensionProperties\nGLAD_API_CALL PFN_vkEnumerateInstanceLayerProperties glad_vkEnumerateInstanceLayerProperties;\n#define vkEnumerateInstanceLayerProperties glad_vkEnumerateInstanceLayerProperties\nGLAD_API_CALL PFN_vkEnumerateInstanceVersion glad_vkEnumerateInstanceVersion;\n#define vkEnumerateInstanceVersion glad_vkEnumerateInstanceVersion\nGLAD_API_CALL PFN_vkEnumeratePhysicalDeviceGroups glad_vkEnumeratePhysicalDeviceGroups;\n#define vkEnumeratePhysicalDeviceGroups glad_vkEnumeratePhysicalDeviceGroups\nGLAD_API_CALL PFN_vkEnumeratePhysicalDevices glad_vkEnumeratePhysicalDevices;\n#define vkEnumeratePhysicalDevices glad_vkEnumeratePhysicalDevices\nGLAD_API_CALL PFN_vkFlushMappedMemoryRanges glad_vkFlushMappedMemoryRanges;\n#define vkFlushMappedMemoryRanges glad_vkFlushMappedMemoryRanges\nGLAD_API_CALL PFN_vkFreeCommandBuffers glad_vkFreeCommandBuffers;\n#define vkFreeCommandBuffers glad_vkFreeCommandBuffers\nGLAD_API_CALL PFN_vkFreeDescriptorSets glad_vkFreeDescriptorSets;\n#define vkFreeDescriptorSets glad_vkFreeDescriptorSets\nGLAD_API_CALL PFN_vkFreeMemory glad_vkFreeMemory;\n#define vkFreeMemory glad_vkFreeMemory\nGLAD_API_CALL PFN_vkGetBufferMemoryRequirements glad_vkGetBufferMemoryRequirements;\n#define vkGetBufferMemoryRequirements glad_vkGetBufferMemoryRequirements\nGLAD_API_CALL PFN_vkGetBufferMemoryRequirements2 glad_vkGetBufferMemoryRequirements2;\n#define vkGetBufferMemoryRequirements2 glad_vkGetBufferMemoryRequirements2\nGLAD_API_CALL PFN_vkGetDescriptorSetLayoutSupport glad_vkGetDescriptorSetLayoutSupport;\n#define vkGetDescriptorSetLayoutSupport glad_vkGetDescriptorSetLayoutSupport\nGLAD_API_CALL PFN_vkGetDeviceGroupPeerMemoryFeatures glad_vkGetDeviceGroupPeerMemoryFeatures;\n#define vkGetDeviceGroupPeerMemoryFeatures glad_vkGetDeviceGroupPeerMemoryFeatures\nGLAD_API_CALL PFN_vkGetDeviceGroupPresentCapabilitiesKHR glad_vkGetDeviceGroupPresentCapabilitiesKHR;\n#define vkGetDeviceGroupPresentCapabilitiesKHR glad_vkGetDeviceGroupPresentCapabilitiesKHR\nGLAD_API_CALL PFN_vkGetDeviceGroupSurfacePresentModesKHR glad_vkGetDeviceGroupSurfacePresentModesKHR;\n#define vkGetDeviceGroupSurfacePresentModesKHR glad_vkGetDeviceGroupSurfacePresentModesKHR\nGLAD_API_CALL PFN_vkGetDeviceMemoryCommitment glad_vkGetDeviceMemoryCommitment;\n#define vkGetDeviceMemoryCommitment glad_vkGetDeviceMemoryCommitment\nGLAD_API_CALL PFN_vkGetDeviceProcAddr glad_vkGetDeviceProcAddr;\n#define vkGetDeviceProcAddr glad_vkGetDeviceProcAddr\nGLAD_API_CALL PFN_vkGetDeviceQueue glad_vkGetDeviceQueue;\n#define vkGetDeviceQueue glad_vkGetDeviceQueue\nGLAD_API_CALL PFN_vkGetDeviceQueue2 glad_vkGetDeviceQueue2;\n#define vkGetDeviceQueue2 glad_vkGetDeviceQueue2\nGLAD_API_CALL PFN_vkGetEventStatus glad_vkGetEventStatus;\n#define vkGetEventStatus glad_vkGetEventStatus\nGLAD_API_CALL PFN_vkGetFenceStatus glad_vkGetFenceStatus;\n#define vkGetFenceStatus glad_vkGetFenceStatus\nGLAD_API_CALL PFN_vkGetImageMemoryRequirements glad_vkGetImageMemoryRequirements;\n#define vkGetImageMemoryRequirements glad_vkGetImageMemoryRequirements\nGLAD_API_CALL PFN_vkGetImageMemoryRequirements2 glad_vkGetImageMemoryRequirements2;\n#define vkGetImageMemoryRequirements2 glad_vkGetImageMemoryRequirements2\nGLAD_API_CALL PFN_vkGetImageSparseMemoryRequirements glad_vkGetImageSparseMemoryRequirements;\n#define vkGetImageSparseMemoryRequirements glad_vkGetImageSparseMemoryRequirements\nGLAD_API_CALL PFN_vkGetImageSparseMemoryRequirements2 glad_vkGetImageSparseMemoryRequirements2;\n#define vkGetImageSparseMemoryRequirements2 glad_vkGetImageSparseMemoryRequirements2\nGLAD_API_CALL PFN_vkGetImageSubresourceLayout glad_vkGetImageSubresourceLayout;\n#define vkGetImageSubresourceLayout glad_vkGetImageSubresourceLayout\nGLAD_API_CALL PFN_vkGetInstanceProcAddr glad_vkGetInstanceProcAddr;\n#define vkGetInstanceProcAddr glad_vkGetInstanceProcAddr\nGLAD_API_CALL PFN_vkGetPhysicalDeviceExternalBufferProperties glad_vkGetPhysicalDeviceExternalBufferProperties;\n#define vkGetPhysicalDeviceExternalBufferProperties glad_vkGetPhysicalDeviceExternalBufferProperties\nGLAD_API_CALL PFN_vkGetPhysicalDeviceExternalFenceProperties glad_vkGetPhysicalDeviceExternalFenceProperties;\n#define vkGetPhysicalDeviceExternalFenceProperties glad_vkGetPhysicalDeviceExternalFenceProperties\nGLAD_API_CALL PFN_vkGetPhysicalDeviceExternalSemaphoreProperties glad_vkGetPhysicalDeviceExternalSemaphoreProperties;\n#define vkGetPhysicalDeviceExternalSemaphoreProperties glad_vkGetPhysicalDeviceExternalSemaphoreProperties\nGLAD_API_CALL PFN_vkGetPhysicalDeviceFeatures glad_vkGetPhysicalDeviceFeatures;\n#define vkGetPhysicalDeviceFeatures glad_vkGetPhysicalDeviceFeatures\nGLAD_API_CALL PFN_vkGetPhysicalDeviceFeatures2 glad_vkGetPhysicalDeviceFeatures2;\n#define vkGetPhysicalDeviceFeatures2 glad_vkGetPhysicalDeviceFeatures2\nGLAD_API_CALL PFN_vkGetPhysicalDeviceFormatProperties glad_vkGetPhysicalDeviceFormatProperties;\n#define vkGetPhysicalDeviceFormatProperties glad_vkGetPhysicalDeviceFormatProperties\nGLAD_API_CALL PFN_vkGetPhysicalDeviceFormatProperties2 glad_vkGetPhysicalDeviceFormatProperties2;\n#define vkGetPhysicalDeviceFormatProperties2 glad_vkGetPhysicalDeviceFormatProperties2\nGLAD_API_CALL PFN_vkGetPhysicalDeviceImageFormatProperties glad_vkGetPhysicalDeviceImageFormatProperties;\n#define vkGetPhysicalDeviceImageFormatProperties glad_vkGetPhysicalDeviceImageFormatProperties\nGLAD_API_CALL PFN_vkGetPhysicalDeviceImageFormatProperties2 glad_vkGetPhysicalDeviceImageFormatProperties2;\n#define vkGetPhysicalDeviceImageFormatProperties2 glad_vkGetPhysicalDeviceImageFormatProperties2\nGLAD_API_CALL PFN_vkGetPhysicalDeviceMemoryProperties glad_vkGetPhysicalDeviceMemoryProperties;\n#define vkGetPhysicalDeviceMemoryProperties glad_vkGetPhysicalDeviceMemoryProperties\nGLAD_API_CALL PFN_vkGetPhysicalDeviceMemoryProperties2 glad_vkGetPhysicalDeviceMemoryProperties2;\n#define vkGetPhysicalDeviceMemoryProperties2 glad_vkGetPhysicalDeviceMemoryProperties2\nGLAD_API_CALL PFN_vkGetPhysicalDevicePresentRectanglesKHR glad_vkGetPhysicalDevicePresentRectanglesKHR;\n#define vkGetPhysicalDevicePresentRectanglesKHR glad_vkGetPhysicalDevicePresentRectanglesKHR\nGLAD_API_CALL PFN_vkGetPhysicalDeviceProperties glad_vkGetPhysicalDeviceProperties;\n#define vkGetPhysicalDeviceProperties glad_vkGetPhysicalDeviceProperties\nGLAD_API_CALL PFN_vkGetPhysicalDeviceProperties2 glad_vkGetPhysicalDeviceProperties2;\n#define vkGetPhysicalDeviceProperties2 glad_vkGetPhysicalDeviceProperties2\nGLAD_API_CALL PFN_vkGetPhysicalDeviceQueueFamilyProperties glad_vkGetPhysicalDeviceQueueFamilyProperties;\n#define vkGetPhysicalDeviceQueueFamilyProperties glad_vkGetPhysicalDeviceQueueFamilyProperties\nGLAD_API_CALL PFN_vkGetPhysicalDeviceQueueFamilyProperties2 glad_vkGetPhysicalDeviceQueueFamilyProperties2;\n#define vkGetPhysicalDeviceQueueFamilyProperties2 glad_vkGetPhysicalDeviceQueueFamilyProperties2\nGLAD_API_CALL PFN_vkGetPhysicalDeviceSparseImageFormatProperties glad_vkGetPhysicalDeviceSparseImageFormatProperties;\n#define vkGetPhysicalDeviceSparseImageFormatProperties glad_vkGetPhysicalDeviceSparseImageFormatProperties\nGLAD_API_CALL PFN_vkGetPhysicalDeviceSparseImageFormatProperties2 glad_vkGetPhysicalDeviceSparseImageFormatProperties2;\n#define vkGetPhysicalDeviceSparseImageFormatProperties2 glad_vkGetPhysicalDeviceSparseImageFormatProperties2\nGLAD_API_CALL PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR glad_vkGetPhysicalDeviceSurfaceCapabilitiesKHR;\n#define vkGetPhysicalDeviceSurfaceCapabilitiesKHR glad_vkGetPhysicalDeviceSurfaceCapabilitiesKHR\nGLAD_API_CALL PFN_vkGetPhysicalDeviceSurfaceFormatsKHR glad_vkGetPhysicalDeviceSurfaceFormatsKHR;\n#define vkGetPhysicalDeviceSurfaceFormatsKHR glad_vkGetPhysicalDeviceSurfaceFormatsKHR\nGLAD_API_CALL PFN_vkGetPhysicalDeviceSurfacePresentModesKHR glad_vkGetPhysicalDeviceSurfacePresentModesKHR;\n#define vkGetPhysicalDeviceSurfacePresentModesKHR glad_vkGetPhysicalDeviceSurfacePresentModesKHR\nGLAD_API_CALL PFN_vkGetPhysicalDeviceSurfaceSupportKHR glad_vkGetPhysicalDeviceSurfaceSupportKHR;\n#define vkGetPhysicalDeviceSurfaceSupportKHR glad_vkGetPhysicalDeviceSurfaceSupportKHR\nGLAD_API_CALL PFN_vkGetPipelineCacheData glad_vkGetPipelineCacheData;\n#define vkGetPipelineCacheData glad_vkGetPipelineCacheData\nGLAD_API_CALL PFN_vkGetQueryPoolResults glad_vkGetQueryPoolResults;\n#define vkGetQueryPoolResults glad_vkGetQueryPoolResults\nGLAD_API_CALL PFN_vkGetRenderAreaGranularity glad_vkGetRenderAreaGranularity;\n#define vkGetRenderAreaGranularity glad_vkGetRenderAreaGranularity\nGLAD_API_CALL PFN_vkGetSwapchainImagesKHR glad_vkGetSwapchainImagesKHR;\n#define vkGetSwapchainImagesKHR glad_vkGetSwapchainImagesKHR\nGLAD_API_CALL PFN_vkInvalidateMappedMemoryRanges glad_vkInvalidateMappedMemoryRanges;\n#define vkInvalidateMappedMemoryRanges glad_vkInvalidateMappedMemoryRanges\nGLAD_API_CALL PFN_vkMapMemory glad_vkMapMemory;\n#define vkMapMemory glad_vkMapMemory\nGLAD_API_CALL PFN_vkMergePipelineCaches glad_vkMergePipelineCaches;\n#define vkMergePipelineCaches glad_vkMergePipelineCaches\nGLAD_API_CALL PFN_vkQueueBindSparse glad_vkQueueBindSparse;\n#define vkQueueBindSparse glad_vkQueueBindSparse\nGLAD_API_CALL PFN_vkQueuePresentKHR glad_vkQueuePresentKHR;\n#define vkQueuePresentKHR glad_vkQueuePresentKHR\nGLAD_API_CALL PFN_vkQueueSubmit glad_vkQueueSubmit;\n#define vkQueueSubmit glad_vkQueueSubmit\nGLAD_API_CALL PFN_vkQueueWaitIdle glad_vkQueueWaitIdle;\n#define vkQueueWaitIdle glad_vkQueueWaitIdle\nGLAD_API_CALL PFN_vkResetCommandBuffer glad_vkResetCommandBuffer;\n#define vkResetCommandBuffer glad_vkResetCommandBuffer\nGLAD_API_CALL PFN_vkResetCommandPool glad_vkResetCommandPool;\n#define vkResetCommandPool glad_vkResetCommandPool\nGLAD_API_CALL PFN_vkResetDescriptorPool glad_vkResetDescriptorPool;\n#define vkResetDescriptorPool glad_vkResetDescriptorPool\nGLAD_API_CALL PFN_vkResetEvent glad_vkResetEvent;\n#define vkResetEvent glad_vkResetEvent\nGLAD_API_CALL PFN_vkResetFences glad_vkResetFences;\n#define vkResetFences glad_vkResetFences\nGLAD_API_CALL PFN_vkSetEvent glad_vkSetEvent;\n#define vkSetEvent glad_vkSetEvent\nGLAD_API_CALL PFN_vkTrimCommandPool glad_vkTrimCommandPool;\n#define vkTrimCommandPool glad_vkTrimCommandPool\nGLAD_API_CALL PFN_vkUnmapMemory glad_vkUnmapMemory;\n#define vkUnmapMemory glad_vkUnmapMemory\nGLAD_API_CALL PFN_vkUpdateDescriptorSetWithTemplate glad_vkUpdateDescriptorSetWithTemplate;\n#define vkUpdateDescriptorSetWithTemplate glad_vkUpdateDescriptorSetWithTemplate\nGLAD_API_CALL PFN_vkUpdateDescriptorSets glad_vkUpdateDescriptorSets;\n#define vkUpdateDescriptorSets glad_vkUpdateDescriptorSets\nGLAD_API_CALL PFN_vkWaitForFences glad_vkWaitForFences;\n#define vkWaitForFences glad_vkWaitForFences\n\n\nGLAD_API_CALL int gladLoadVulkanUserPtr( VkPhysicalDevice physical_device, GLADuserptrloadfunc load, void *userptr);\nGLAD_API_CALL int gladLoadVulkan( VkPhysicalDevice physical_device, GLADloadfunc load);\n\n\n\n\n\n\n#ifdef __cplusplus\n}\n#endif\n#endif\n"
  },
  {
    "path": "thirdparty/glfw/deps/glad_gl.c",
    "content": "#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <glad/gl.h>\n\n#ifndef GLAD_IMPL_UTIL_C_\n#define GLAD_IMPL_UTIL_C_\n\n#ifdef _MSC_VER\n#define GLAD_IMPL_UTIL_SSCANF sscanf_s\n#else\n#define GLAD_IMPL_UTIL_SSCANF sscanf\n#endif\n\n#endif /* GLAD_IMPL_UTIL_C_ */\n\n\nint GLAD_GL_VERSION_1_0 = 0;\nint GLAD_GL_VERSION_1_1 = 0;\nint GLAD_GL_VERSION_1_2 = 0;\nint GLAD_GL_VERSION_1_3 = 0;\nint GLAD_GL_VERSION_1_4 = 0;\nint GLAD_GL_VERSION_1_5 = 0;\nint GLAD_GL_VERSION_2_0 = 0;\nint GLAD_GL_VERSION_2_1 = 0;\nint GLAD_GL_VERSION_3_0 = 0;\nint GLAD_GL_VERSION_3_1 = 0;\nint GLAD_GL_VERSION_3_2 = 0;\nint GLAD_GL_VERSION_3_3 = 0;\nint GLAD_GL_ARB_multisample = 0;\nint GLAD_GL_ARB_robustness = 0;\nint GLAD_GL_KHR_debug = 0;\n\n\n\nPFNGLACCUMPROC glad_glAccum = NULL;\nPFNGLACTIVETEXTUREPROC glad_glActiveTexture = NULL;\nPFNGLALPHAFUNCPROC glad_glAlphaFunc = NULL;\nPFNGLARETEXTURESRESIDENTPROC glad_glAreTexturesResident = NULL;\nPFNGLARRAYELEMENTPROC glad_glArrayElement = NULL;\nPFNGLATTACHSHADERPROC glad_glAttachShader = NULL;\nPFNGLBEGINPROC glad_glBegin = NULL;\nPFNGLBEGINCONDITIONALRENDERPROC glad_glBeginConditionalRender = NULL;\nPFNGLBEGINQUERYPROC glad_glBeginQuery = NULL;\nPFNGLBEGINTRANSFORMFEEDBACKPROC glad_glBeginTransformFeedback = NULL;\nPFNGLBINDATTRIBLOCATIONPROC glad_glBindAttribLocation = NULL;\nPFNGLBINDBUFFERPROC glad_glBindBuffer = NULL;\nPFNGLBINDBUFFERBASEPROC glad_glBindBufferBase = NULL;\nPFNGLBINDBUFFERRANGEPROC glad_glBindBufferRange = NULL;\nPFNGLBINDFRAGDATALOCATIONPROC glad_glBindFragDataLocation = NULL;\nPFNGLBINDFRAGDATALOCATIONINDEXEDPROC glad_glBindFragDataLocationIndexed = NULL;\nPFNGLBINDFRAMEBUFFERPROC glad_glBindFramebuffer = NULL;\nPFNGLBINDRENDERBUFFERPROC glad_glBindRenderbuffer = NULL;\nPFNGLBINDSAMPLERPROC glad_glBindSampler = NULL;\nPFNGLBINDTEXTUREPROC glad_glBindTexture = NULL;\nPFNGLBINDVERTEXARRAYPROC glad_glBindVertexArray = NULL;\nPFNGLBITMAPPROC glad_glBitmap = NULL;\nPFNGLBLENDCOLORPROC glad_glBlendColor = NULL;\nPFNGLBLENDEQUATIONPROC glad_glBlendEquation = NULL;\nPFNGLBLENDEQUATIONSEPARATEPROC glad_glBlendEquationSeparate = NULL;\nPFNGLBLENDFUNCPROC glad_glBlendFunc = NULL;\nPFNGLBLENDFUNCSEPARATEPROC glad_glBlendFuncSeparate = NULL;\nPFNGLBLITFRAMEBUFFERPROC glad_glBlitFramebuffer = NULL;\nPFNGLBUFFERDATAPROC glad_glBufferData = NULL;\nPFNGLBUFFERSUBDATAPROC glad_glBufferSubData = NULL;\nPFNGLCALLLISTPROC glad_glCallList = NULL;\nPFNGLCALLLISTSPROC glad_glCallLists = NULL;\nPFNGLCHECKFRAMEBUFFERSTATUSPROC glad_glCheckFramebufferStatus = NULL;\nPFNGLCLAMPCOLORPROC glad_glClampColor = NULL;\nPFNGLCLEARPROC glad_glClear = NULL;\nPFNGLCLEARACCUMPROC glad_glClearAccum = NULL;\nPFNGLCLEARBUFFERFIPROC glad_glClearBufferfi = NULL;\nPFNGLCLEARBUFFERFVPROC glad_glClearBufferfv = NULL;\nPFNGLCLEARBUFFERIVPROC glad_glClearBufferiv = NULL;\nPFNGLCLEARBUFFERUIVPROC glad_glClearBufferuiv = NULL;\nPFNGLCLEARCOLORPROC glad_glClearColor = NULL;\nPFNGLCLEARDEPTHPROC glad_glClearDepth = NULL;\nPFNGLCLEARINDEXPROC glad_glClearIndex = NULL;\nPFNGLCLEARSTENCILPROC glad_glClearStencil = NULL;\nPFNGLCLIENTACTIVETEXTUREPROC glad_glClientActiveTexture = NULL;\nPFNGLCLIENTWAITSYNCPROC glad_glClientWaitSync = NULL;\nPFNGLCLIPPLANEPROC glad_glClipPlane = NULL;\nPFNGLCOLOR3BPROC glad_glColor3b = NULL;\nPFNGLCOLOR3BVPROC glad_glColor3bv = NULL;\nPFNGLCOLOR3DPROC glad_glColor3d = NULL;\nPFNGLCOLOR3DVPROC glad_glColor3dv = NULL;\nPFNGLCOLOR3FPROC glad_glColor3f = NULL;\nPFNGLCOLOR3FVPROC glad_glColor3fv = NULL;\nPFNGLCOLOR3IPROC glad_glColor3i = NULL;\nPFNGLCOLOR3IVPROC glad_glColor3iv = NULL;\nPFNGLCOLOR3SPROC glad_glColor3s = NULL;\nPFNGLCOLOR3SVPROC glad_glColor3sv = NULL;\nPFNGLCOLOR3UBPROC glad_glColor3ub = NULL;\nPFNGLCOLOR3UBVPROC glad_glColor3ubv = NULL;\nPFNGLCOLOR3UIPROC glad_glColor3ui = NULL;\nPFNGLCOLOR3UIVPROC glad_glColor3uiv = NULL;\nPFNGLCOLOR3USPROC glad_glColor3us = NULL;\nPFNGLCOLOR3USVPROC glad_glColor3usv = NULL;\nPFNGLCOLOR4BPROC glad_glColor4b = NULL;\nPFNGLCOLOR4BVPROC glad_glColor4bv = NULL;\nPFNGLCOLOR4DPROC glad_glColor4d = NULL;\nPFNGLCOLOR4DVPROC glad_glColor4dv = NULL;\nPFNGLCOLOR4FPROC glad_glColor4f = NULL;\nPFNGLCOLOR4FVPROC glad_glColor4fv = NULL;\nPFNGLCOLOR4IPROC glad_glColor4i = NULL;\nPFNGLCOLOR4IVPROC glad_glColor4iv = NULL;\nPFNGLCOLOR4SPROC glad_glColor4s = NULL;\nPFNGLCOLOR4SVPROC glad_glColor4sv = NULL;\nPFNGLCOLOR4UBPROC glad_glColor4ub = NULL;\nPFNGLCOLOR4UBVPROC glad_glColor4ubv = NULL;\nPFNGLCOLOR4UIPROC glad_glColor4ui = NULL;\nPFNGLCOLOR4UIVPROC glad_glColor4uiv = NULL;\nPFNGLCOLOR4USPROC glad_glColor4us = NULL;\nPFNGLCOLOR4USVPROC glad_glColor4usv = NULL;\nPFNGLCOLORMASKPROC glad_glColorMask = NULL;\nPFNGLCOLORMASKIPROC glad_glColorMaski = NULL;\nPFNGLCOLORMATERIALPROC glad_glColorMaterial = NULL;\nPFNGLCOLORP3UIPROC glad_glColorP3ui = NULL;\nPFNGLCOLORP3UIVPROC glad_glColorP3uiv = NULL;\nPFNGLCOLORP4UIPROC glad_glColorP4ui = NULL;\nPFNGLCOLORP4UIVPROC glad_glColorP4uiv = NULL;\nPFNGLCOLORPOINTERPROC glad_glColorPointer = NULL;\nPFNGLCOMPILESHADERPROC glad_glCompileShader = NULL;\nPFNGLCOMPRESSEDTEXIMAGE1DPROC glad_glCompressedTexImage1D = NULL;\nPFNGLCOMPRESSEDTEXIMAGE2DPROC glad_glCompressedTexImage2D = NULL;\nPFNGLCOMPRESSEDTEXIMAGE3DPROC glad_glCompressedTexImage3D = NULL;\nPFNGLCOMPRESSEDTEXSUBIMAGE1DPROC glad_glCompressedTexSubImage1D = NULL;\nPFNGLCOMPRESSEDTEXSUBIMAGE2DPROC glad_glCompressedTexSubImage2D = NULL;\nPFNGLCOMPRESSEDTEXSUBIMAGE3DPROC glad_glCompressedTexSubImage3D = NULL;\nPFNGLCOPYBUFFERSUBDATAPROC glad_glCopyBufferSubData = NULL;\nPFNGLCOPYPIXELSPROC glad_glCopyPixels = NULL;\nPFNGLCOPYTEXIMAGE1DPROC glad_glCopyTexImage1D = NULL;\nPFNGLCOPYTEXIMAGE2DPROC glad_glCopyTexImage2D = NULL;\nPFNGLCOPYTEXSUBIMAGE1DPROC glad_glCopyTexSubImage1D = NULL;\nPFNGLCOPYTEXSUBIMAGE2DPROC glad_glCopyTexSubImage2D = NULL;\nPFNGLCOPYTEXSUBIMAGE3DPROC glad_glCopyTexSubImage3D = NULL;\nPFNGLCREATEPROGRAMPROC glad_glCreateProgram = NULL;\nPFNGLCREATESHADERPROC glad_glCreateShader = NULL;\nPFNGLCULLFACEPROC glad_glCullFace = NULL;\nPFNGLDEBUGMESSAGECALLBACKPROC glad_glDebugMessageCallback = NULL;\nPFNGLDEBUGMESSAGECONTROLPROC glad_glDebugMessageControl = NULL;\nPFNGLDEBUGMESSAGEINSERTPROC glad_glDebugMessageInsert = NULL;\nPFNGLDELETEBUFFERSPROC glad_glDeleteBuffers = NULL;\nPFNGLDELETEFRAMEBUFFERSPROC glad_glDeleteFramebuffers = NULL;\nPFNGLDELETELISTSPROC glad_glDeleteLists = NULL;\nPFNGLDELETEPROGRAMPROC glad_glDeleteProgram = NULL;\nPFNGLDELETEQUERIESPROC glad_glDeleteQueries = NULL;\nPFNGLDELETERENDERBUFFERSPROC glad_glDeleteRenderbuffers = NULL;\nPFNGLDELETESAMPLERSPROC glad_glDeleteSamplers = NULL;\nPFNGLDELETESHADERPROC glad_glDeleteShader = NULL;\nPFNGLDELETESYNCPROC glad_glDeleteSync = NULL;\nPFNGLDELETETEXTURESPROC glad_glDeleteTextures = NULL;\nPFNGLDELETEVERTEXARRAYSPROC glad_glDeleteVertexArrays = NULL;\nPFNGLDEPTHFUNCPROC glad_glDepthFunc = NULL;\nPFNGLDEPTHMASKPROC glad_glDepthMask = NULL;\nPFNGLDEPTHRANGEPROC glad_glDepthRange = NULL;\nPFNGLDETACHSHADERPROC glad_glDetachShader = NULL;\nPFNGLDISABLEPROC glad_glDisable = NULL;\nPFNGLDISABLECLIENTSTATEPROC glad_glDisableClientState = NULL;\nPFNGLDISABLEVERTEXATTRIBARRAYPROC glad_glDisableVertexAttribArray = NULL;\nPFNGLDISABLEIPROC glad_glDisablei = NULL;\nPFNGLDRAWARRAYSPROC glad_glDrawArrays = NULL;\nPFNGLDRAWARRAYSINSTANCEDPROC glad_glDrawArraysInstanced = NULL;\nPFNGLDRAWBUFFERPROC glad_glDrawBuffer = NULL;\nPFNGLDRAWBUFFERSPROC glad_glDrawBuffers = NULL;\nPFNGLDRAWELEMENTSPROC glad_glDrawElements = NULL;\nPFNGLDRAWELEMENTSBASEVERTEXPROC glad_glDrawElementsBaseVertex = NULL;\nPFNGLDRAWELEMENTSINSTANCEDPROC glad_glDrawElementsInstanced = NULL;\nPFNGLDRAWELEMENTSINSTANCEDBASEVERTEXPROC glad_glDrawElementsInstancedBaseVertex = NULL;\nPFNGLDRAWPIXELSPROC glad_glDrawPixels = NULL;\nPFNGLDRAWRANGEELEMENTSPROC glad_glDrawRangeElements = NULL;\nPFNGLDRAWRANGEELEMENTSBASEVERTEXPROC glad_glDrawRangeElementsBaseVertex = NULL;\nPFNGLEDGEFLAGPROC glad_glEdgeFlag = NULL;\nPFNGLEDGEFLAGPOINTERPROC glad_glEdgeFlagPointer = NULL;\nPFNGLEDGEFLAGVPROC glad_glEdgeFlagv = NULL;\nPFNGLENABLEPROC glad_glEnable = NULL;\nPFNGLENABLECLIENTSTATEPROC glad_glEnableClientState = NULL;\nPFNGLENABLEVERTEXATTRIBARRAYPROC glad_glEnableVertexAttribArray = NULL;\nPFNGLENABLEIPROC glad_glEnablei = NULL;\nPFNGLENDPROC glad_glEnd = NULL;\nPFNGLENDCONDITIONALRENDERPROC glad_glEndConditionalRender = NULL;\nPFNGLENDLISTPROC glad_glEndList = NULL;\nPFNGLENDQUERYPROC glad_glEndQuery = NULL;\nPFNGLENDTRANSFORMFEEDBACKPROC glad_glEndTransformFeedback = NULL;\nPFNGLEVALCOORD1DPROC glad_glEvalCoord1d = NULL;\nPFNGLEVALCOORD1DVPROC glad_glEvalCoord1dv = NULL;\nPFNGLEVALCOORD1FPROC glad_glEvalCoord1f = NULL;\nPFNGLEVALCOORD1FVPROC glad_glEvalCoord1fv = NULL;\nPFNGLEVALCOORD2DPROC glad_glEvalCoord2d = NULL;\nPFNGLEVALCOORD2DVPROC glad_glEvalCoord2dv = NULL;\nPFNGLEVALCOORD2FPROC glad_glEvalCoord2f = NULL;\nPFNGLEVALCOORD2FVPROC glad_glEvalCoord2fv = NULL;\nPFNGLEVALMESH1PROC glad_glEvalMesh1 = NULL;\nPFNGLEVALMESH2PROC glad_glEvalMesh2 = NULL;\nPFNGLEVALPOINT1PROC glad_glEvalPoint1 = NULL;\nPFNGLEVALPOINT2PROC glad_glEvalPoint2 = NULL;\nPFNGLFEEDBACKBUFFERPROC glad_glFeedbackBuffer = NULL;\nPFNGLFENCESYNCPROC glad_glFenceSync = NULL;\nPFNGLFINISHPROC glad_glFinish = NULL;\nPFNGLFLUSHPROC glad_glFlush = NULL;\nPFNGLFLUSHMAPPEDBUFFERRANGEPROC glad_glFlushMappedBufferRange = NULL;\nPFNGLFOGCOORDPOINTERPROC glad_glFogCoordPointer = NULL;\nPFNGLFOGCOORDDPROC glad_glFogCoordd = NULL;\nPFNGLFOGCOORDDVPROC glad_glFogCoorddv = NULL;\nPFNGLFOGCOORDFPROC glad_glFogCoordf = NULL;\nPFNGLFOGCOORDFVPROC glad_glFogCoordfv = NULL;\nPFNGLFOGFPROC glad_glFogf = NULL;\nPFNGLFOGFVPROC glad_glFogfv = NULL;\nPFNGLFOGIPROC glad_glFogi = NULL;\nPFNGLFOGIVPROC glad_glFogiv = NULL;\nPFNGLFRAMEBUFFERRENDERBUFFERPROC glad_glFramebufferRenderbuffer = NULL;\nPFNGLFRAMEBUFFERTEXTUREPROC glad_glFramebufferTexture = NULL;\nPFNGLFRAMEBUFFERTEXTURE1DPROC glad_glFramebufferTexture1D = NULL;\nPFNGLFRAMEBUFFERTEXTURE2DPROC glad_glFramebufferTexture2D = NULL;\nPFNGLFRAMEBUFFERTEXTURE3DPROC glad_glFramebufferTexture3D = NULL;\nPFNGLFRAMEBUFFERTEXTURELAYERPROC glad_glFramebufferTextureLayer = NULL;\nPFNGLFRONTFACEPROC glad_glFrontFace = NULL;\nPFNGLFRUSTUMPROC glad_glFrustum = NULL;\nPFNGLGENBUFFERSPROC glad_glGenBuffers = NULL;\nPFNGLGENFRAMEBUFFERSPROC glad_glGenFramebuffers = NULL;\nPFNGLGENLISTSPROC glad_glGenLists = NULL;\nPFNGLGENQUERIESPROC glad_glGenQueries = NULL;\nPFNGLGENRENDERBUFFERSPROC glad_glGenRenderbuffers = NULL;\nPFNGLGENSAMPLERSPROC glad_glGenSamplers = NULL;\nPFNGLGENTEXTURESPROC glad_glGenTextures = NULL;\nPFNGLGENVERTEXARRAYSPROC glad_glGenVertexArrays = NULL;\nPFNGLGENERATEMIPMAPPROC glad_glGenerateMipmap = NULL;\nPFNGLGETACTIVEATTRIBPROC glad_glGetActiveAttrib = NULL;\nPFNGLGETACTIVEUNIFORMPROC glad_glGetActiveUniform = NULL;\nPFNGLGETACTIVEUNIFORMBLOCKNAMEPROC glad_glGetActiveUniformBlockName = NULL;\nPFNGLGETACTIVEUNIFORMBLOCKIVPROC glad_glGetActiveUniformBlockiv = NULL;\nPFNGLGETACTIVEUNIFORMNAMEPROC glad_glGetActiveUniformName = NULL;\nPFNGLGETACTIVEUNIFORMSIVPROC glad_glGetActiveUniformsiv = NULL;\nPFNGLGETATTACHEDSHADERSPROC glad_glGetAttachedShaders = NULL;\nPFNGLGETATTRIBLOCATIONPROC glad_glGetAttribLocation = NULL;\nPFNGLGETBOOLEANI_VPROC glad_glGetBooleani_v = NULL;\nPFNGLGETBOOLEANVPROC glad_glGetBooleanv = NULL;\nPFNGLGETBUFFERPARAMETERI64VPROC glad_glGetBufferParameteri64v = NULL;\nPFNGLGETBUFFERPARAMETERIVPROC glad_glGetBufferParameteriv = NULL;\nPFNGLGETBUFFERPOINTERVPROC glad_glGetBufferPointerv = NULL;\nPFNGLGETBUFFERSUBDATAPROC glad_glGetBufferSubData = NULL;\nPFNGLGETCLIPPLANEPROC glad_glGetClipPlane = NULL;\nPFNGLGETCOMPRESSEDTEXIMAGEPROC glad_glGetCompressedTexImage = NULL;\nPFNGLGETDEBUGMESSAGELOGPROC glad_glGetDebugMessageLog = NULL;\nPFNGLGETDOUBLEVPROC glad_glGetDoublev = NULL;\nPFNGLGETERRORPROC glad_glGetError = NULL;\nPFNGLGETFLOATVPROC glad_glGetFloatv = NULL;\nPFNGLGETFRAGDATAINDEXPROC glad_glGetFragDataIndex = NULL;\nPFNGLGETFRAGDATALOCATIONPROC glad_glGetFragDataLocation = NULL;\nPFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC glad_glGetFramebufferAttachmentParameteriv = NULL;\nPFNGLGETGRAPHICSRESETSTATUSARBPROC glad_glGetGraphicsResetStatusARB = NULL;\nPFNGLGETINTEGER64I_VPROC glad_glGetInteger64i_v = NULL;\nPFNGLGETINTEGER64VPROC glad_glGetInteger64v = NULL;\nPFNGLGETINTEGERI_VPROC glad_glGetIntegeri_v = NULL;\nPFNGLGETINTEGERVPROC glad_glGetIntegerv = NULL;\nPFNGLGETLIGHTFVPROC glad_glGetLightfv = NULL;\nPFNGLGETLIGHTIVPROC glad_glGetLightiv = NULL;\nPFNGLGETMAPDVPROC glad_glGetMapdv = NULL;\nPFNGLGETMAPFVPROC glad_glGetMapfv = NULL;\nPFNGLGETMAPIVPROC glad_glGetMapiv = NULL;\nPFNGLGETMATERIALFVPROC glad_glGetMaterialfv = NULL;\nPFNGLGETMATERIALIVPROC glad_glGetMaterialiv = NULL;\nPFNGLGETMULTISAMPLEFVPROC glad_glGetMultisamplefv = NULL;\nPFNGLGETOBJECTLABELPROC glad_glGetObjectLabel = NULL;\nPFNGLGETOBJECTPTRLABELPROC glad_glGetObjectPtrLabel = NULL;\nPFNGLGETPIXELMAPFVPROC glad_glGetPixelMapfv = NULL;\nPFNGLGETPIXELMAPUIVPROC glad_glGetPixelMapuiv = NULL;\nPFNGLGETPIXELMAPUSVPROC glad_glGetPixelMapusv = NULL;\nPFNGLGETPOINTERVPROC glad_glGetPointerv = NULL;\nPFNGLGETPOLYGONSTIPPLEPROC glad_glGetPolygonStipple = NULL;\nPFNGLGETPROGRAMINFOLOGPROC glad_glGetProgramInfoLog = NULL;\nPFNGLGETPROGRAMIVPROC glad_glGetProgramiv = NULL;\nPFNGLGETQUERYOBJECTI64VPROC glad_glGetQueryObjecti64v = NULL;\nPFNGLGETQUERYOBJECTIVPROC glad_glGetQueryObjectiv = NULL;\nPFNGLGETQUERYOBJECTUI64VPROC glad_glGetQueryObjectui64v = NULL;\nPFNGLGETQUERYOBJECTUIVPROC glad_glGetQueryObjectuiv = NULL;\nPFNGLGETQUERYIVPROC glad_glGetQueryiv = NULL;\nPFNGLGETRENDERBUFFERPARAMETERIVPROC glad_glGetRenderbufferParameteriv = NULL;\nPFNGLGETSAMPLERPARAMETERIIVPROC glad_glGetSamplerParameterIiv = NULL;\nPFNGLGETSAMPLERPARAMETERIUIVPROC glad_glGetSamplerParameterIuiv = NULL;\nPFNGLGETSAMPLERPARAMETERFVPROC glad_glGetSamplerParameterfv = NULL;\nPFNGLGETSAMPLERPARAMETERIVPROC glad_glGetSamplerParameteriv = NULL;\nPFNGLGETSHADERINFOLOGPROC glad_glGetShaderInfoLog = NULL;\nPFNGLGETSHADERSOURCEPROC glad_glGetShaderSource = NULL;\nPFNGLGETSHADERIVPROC glad_glGetShaderiv = NULL;\nPFNGLGETSTRINGPROC glad_glGetString = NULL;\nPFNGLGETSTRINGIPROC glad_glGetStringi = NULL;\nPFNGLGETSYNCIVPROC glad_glGetSynciv = NULL;\nPFNGLGETTEXENVFVPROC glad_glGetTexEnvfv = NULL;\nPFNGLGETTEXENVIVPROC glad_glGetTexEnviv = NULL;\nPFNGLGETTEXGENDVPROC glad_glGetTexGendv = NULL;\nPFNGLGETTEXGENFVPROC glad_glGetTexGenfv = NULL;\nPFNGLGETTEXGENIVPROC glad_glGetTexGeniv = NULL;\nPFNGLGETTEXIMAGEPROC glad_glGetTexImage = NULL;\nPFNGLGETTEXLEVELPARAMETERFVPROC glad_glGetTexLevelParameterfv = NULL;\nPFNGLGETTEXLEVELPARAMETERIVPROC glad_glGetTexLevelParameteriv = NULL;\nPFNGLGETTEXPARAMETERIIVPROC glad_glGetTexParameterIiv = NULL;\nPFNGLGETTEXPARAMETERIUIVPROC glad_glGetTexParameterIuiv = NULL;\nPFNGLGETTEXPARAMETERFVPROC glad_glGetTexParameterfv = NULL;\nPFNGLGETTEXPARAMETERIVPROC glad_glGetTexParameteriv = NULL;\nPFNGLGETTRANSFORMFEEDBACKVARYINGPROC glad_glGetTransformFeedbackVarying = NULL;\nPFNGLGETUNIFORMBLOCKINDEXPROC glad_glGetUniformBlockIndex = NULL;\nPFNGLGETUNIFORMINDICESPROC glad_glGetUniformIndices = NULL;\nPFNGLGETUNIFORMLOCATIONPROC glad_glGetUniformLocation = NULL;\nPFNGLGETUNIFORMFVPROC glad_glGetUniformfv = NULL;\nPFNGLGETUNIFORMIVPROC glad_glGetUniformiv = NULL;\nPFNGLGETUNIFORMUIVPROC glad_glGetUniformuiv = NULL;\nPFNGLGETVERTEXATTRIBIIVPROC glad_glGetVertexAttribIiv = NULL;\nPFNGLGETVERTEXATTRIBIUIVPROC glad_glGetVertexAttribIuiv = NULL;\nPFNGLGETVERTEXATTRIBPOINTERVPROC glad_glGetVertexAttribPointerv = NULL;\nPFNGLGETVERTEXATTRIBDVPROC glad_glGetVertexAttribdv = NULL;\nPFNGLGETVERTEXATTRIBFVPROC glad_glGetVertexAttribfv = NULL;\nPFNGLGETVERTEXATTRIBIVPROC glad_glGetVertexAttribiv = NULL;\nPFNGLGETNCOLORTABLEARBPROC glad_glGetnColorTableARB = NULL;\nPFNGLGETNCOMPRESSEDTEXIMAGEARBPROC glad_glGetnCompressedTexImageARB = NULL;\nPFNGLGETNCONVOLUTIONFILTERARBPROC glad_glGetnConvolutionFilterARB = NULL;\nPFNGLGETNHISTOGRAMARBPROC glad_glGetnHistogramARB = NULL;\nPFNGLGETNMAPDVARBPROC glad_glGetnMapdvARB = NULL;\nPFNGLGETNMAPFVARBPROC glad_glGetnMapfvARB = NULL;\nPFNGLGETNMAPIVARBPROC glad_glGetnMapivARB = NULL;\nPFNGLGETNMINMAXARBPROC glad_glGetnMinmaxARB = NULL;\nPFNGLGETNPIXELMAPFVARBPROC glad_glGetnPixelMapfvARB = NULL;\nPFNGLGETNPIXELMAPUIVARBPROC glad_glGetnPixelMapuivARB = NULL;\nPFNGLGETNPIXELMAPUSVARBPROC glad_glGetnPixelMapusvARB = NULL;\nPFNGLGETNPOLYGONSTIPPLEARBPROC glad_glGetnPolygonStippleARB = NULL;\nPFNGLGETNSEPARABLEFILTERARBPROC glad_glGetnSeparableFilterARB = NULL;\nPFNGLGETNTEXIMAGEARBPROC glad_glGetnTexImageARB = NULL;\nPFNGLGETNUNIFORMDVARBPROC glad_glGetnUniformdvARB = NULL;\nPFNGLGETNUNIFORMFVARBPROC glad_glGetnUniformfvARB = NULL;\nPFNGLGETNUNIFORMIVARBPROC glad_glGetnUniformivARB = NULL;\nPFNGLGETNUNIFORMUIVARBPROC glad_glGetnUniformuivARB = NULL;\nPFNGLHINTPROC glad_glHint = NULL;\nPFNGLINDEXMASKPROC glad_glIndexMask = NULL;\nPFNGLINDEXPOINTERPROC glad_glIndexPointer = NULL;\nPFNGLINDEXDPROC glad_glIndexd = NULL;\nPFNGLINDEXDVPROC glad_glIndexdv = NULL;\nPFNGLINDEXFPROC glad_glIndexf = NULL;\nPFNGLINDEXFVPROC glad_glIndexfv = NULL;\nPFNGLINDEXIPROC glad_glIndexi = NULL;\nPFNGLINDEXIVPROC glad_glIndexiv = NULL;\nPFNGLINDEXSPROC glad_glIndexs = NULL;\nPFNGLINDEXSVPROC glad_glIndexsv = NULL;\nPFNGLINDEXUBPROC glad_glIndexub = NULL;\nPFNGLINDEXUBVPROC glad_glIndexubv = NULL;\nPFNGLINITNAMESPROC glad_glInitNames = NULL;\nPFNGLINTERLEAVEDARRAYSPROC glad_glInterleavedArrays = NULL;\nPFNGLISBUFFERPROC glad_glIsBuffer = NULL;\nPFNGLISENABLEDPROC glad_glIsEnabled = NULL;\nPFNGLISENABLEDIPROC glad_glIsEnabledi = NULL;\nPFNGLISFRAMEBUFFERPROC glad_glIsFramebuffer = NULL;\nPFNGLISLISTPROC glad_glIsList = NULL;\nPFNGLISPROGRAMPROC glad_glIsProgram = NULL;\nPFNGLISQUERYPROC glad_glIsQuery = NULL;\nPFNGLISRENDERBUFFERPROC glad_glIsRenderbuffer = NULL;\nPFNGLISSAMPLERPROC glad_glIsSampler = NULL;\nPFNGLISSHADERPROC glad_glIsShader = NULL;\nPFNGLISSYNCPROC glad_glIsSync = NULL;\nPFNGLISTEXTUREPROC glad_glIsTexture = NULL;\nPFNGLISVERTEXARRAYPROC glad_glIsVertexArray = NULL;\nPFNGLLIGHTMODELFPROC glad_glLightModelf = NULL;\nPFNGLLIGHTMODELFVPROC glad_glLightModelfv = NULL;\nPFNGLLIGHTMODELIPROC glad_glLightModeli = NULL;\nPFNGLLIGHTMODELIVPROC glad_glLightModeliv = NULL;\nPFNGLLIGHTFPROC glad_glLightf = NULL;\nPFNGLLIGHTFVPROC glad_glLightfv = NULL;\nPFNGLLIGHTIPROC glad_glLighti = NULL;\nPFNGLLIGHTIVPROC glad_glLightiv = NULL;\nPFNGLLINESTIPPLEPROC glad_glLineStipple = NULL;\nPFNGLLINEWIDTHPROC glad_glLineWidth = NULL;\nPFNGLLINKPROGRAMPROC glad_glLinkProgram = NULL;\nPFNGLLISTBASEPROC glad_glListBase = NULL;\nPFNGLLOADIDENTITYPROC glad_glLoadIdentity = NULL;\nPFNGLLOADMATRIXDPROC glad_glLoadMatrixd = NULL;\nPFNGLLOADMATRIXFPROC glad_glLoadMatrixf = NULL;\nPFNGLLOADNAMEPROC glad_glLoadName = NULL;\nPFNGLLOADTRANSPOSEMATRIXDPROC glad_glLoadTransposeMatrixd = NULL;\nPFNGLLOADTRANSPOSEMATRIXFPROC glad_glLoadTransposeMatrixf = NULL;\nPFNGLLOGICOPPROC glad_glLogicOp = NULL;\nPFNGLMAP1DPROC glad_glMap1d = NULL;\nPFNGLMAP1FPROC glad_glMap1f = NULL;\nPFNGLMAP2DPROC glad_glMap2d = NULL;\nPFNGLMAP2FPROC glad_glMap2f = NULL;\nPFNGLMAPBUFFERPROC glad_glMapBuffer = NULL;\nPFNGLMAPBUFFERRANGEPROC glad_glMapBufferRange = NULL;\nPFNGLMAPGRID1DPROC glad_glMapGrid1d = NULL;\nPFNGLMAPGRID1FPROC glad_glMapGrid1f = NULL;\nPFNGLMAPGRID2DPROC glad_glMapGrid2d = NULL;\nPFNGLMAPGRID2FPROC glad_glMapGrid2f = NULL;\nPFNGLMATERIALFPROC glad_glMaterialf = NULL;\nPFNGLMATERIALFVPROC glad_glMaterialfv = NULL;\nPFNGLMATERIALIPROC glad_glMateriali = NULL;\nPFNGLMATERIALIVPROC glad_glMaterialiv = NULL;\nPFNGLMATRIXMODEPROC glad_glMatrixMode = NULL;\nPFNGLMULTMATRIXDPROC glad_glMultMatrixd = NULL;\nPFNGLMULTMATRIXFPROC glad_glMultMatrixf = NULL;\nPFNGLMULTTRANSPOSEMATRIXDPROC glad_glMultTransposeMatrixd = NULL;\nPFNGLMULTTRANSPOSEMATRIXFPROC glad_glMultTransposeMatrixf = NULL;\nPFNGLMULTIDRAWARRAYSPROC glad_glMultiDrawArrays = NULL;\nPFNGLMULTIDRAWELEMENTSPROC glad_glMultiDrawElements = NULL;\nPFNGLMULTIDRAWELEMENTSBASEVERTEXPROC glad_glMultiDrawElementsBaseVertex = NULL;\nPFNGLMULTITEXCOORD1DPROC glad_glMultiTexCoord1d = NULL;\nPFNGLMULTITEXCOORD1DVPROC glad_glMultiTexCoord1dv = NULL;\nPFNGLMULTITEXCOORD1FPROC glad_glMultiTexCoord1f = NULL;\nPFNGLMULTITEXCOORD1FVPROC glad_glMultiTexCoord1fv = NULL;\nPFNGLMULTITEXCOORD1IPROC glad_glMultiTexCoord1i = NULL;\nPFNGLMULTITEXCOORD1IVPROC glad_glMultiTexCoord1iv = NULL;\nPFNGLMULTITEXCOORD1SPROC glad_glMultiTexCoord1s = NULL;\nPFNGLMULTITEXCOORD1SVPROC glad_glMultiTexCoord1sv = NULL;\nPFNGLMULTITEXCOORD2DPROC glad_glMultiTexCoord2d = NULL;\nPFNGLMULTITEXCOORD2DVPROC glad_glMultiTexCoord2dv = NULL;\nPFNGLMULTITEXCOORD2FPROC glad_glMultiTexCoord2f = NULL;\nPFNGLMULTITEXCOORD2FVPROC glad_glMultiTexCoord2fv = NULL;\nPFNGLMULTITEXCOORD2IPROC glad_glMultiTexCoord2i = NULL;\nPFNGLMULTITEXCOORD2IVPROC glad_glMultiTexCoord2iv = NULL;\nPFNGLMULTITEXCOORD2SPROC glad_glMultiTexCoord2s = NULL;\nPFNGLMULTITEXCOORD2SVPROC glad_glMultiTexCoord2sv = NULL;\nPFNGLMULTITEXCOORD3DPROC glad_glMultiTexCoord3d = NULL;\nPFNGLMULTITEXCOORD3DVPROC glad_glMultiTexCoord3dv = NULL;\nPFNGLMULTITEXCOORD3FPROC glad_glMultiTexCoord3f = NULL;\nPFNGLMULTITEXCOORD3FVPROC glad_glMultiTexCoord3fv = NULL;\nPFNGLMULTITEXCOORD3IPROC glad_glMultiTexCoord3i = NULL;\nPFNGLMULTITEXCOORD3IVPROC glad_glMultiTexCoord3iv = NULL;\nPFNGLMULTITEXCOORD3SPROC glad_glMultiTexCoord3s = NULL;\nPFNGLMULTITEXCOORD3SVPROC glad_glMultiTexCoord3sv = NULL;\nPFNGLMULTITEXCOORD4DPROC glad_glMultiTexCoord4d = NULL;\nPFNGLMULTITEXCOORD4DVPROC glad_glMultiTexCoord4dv = NULL;\nPFNGLMULTITEXCOORD4FPROC glad_glMultiTexCoord4f = NULL;\nPFNGLMULTITEXCOORD4FVPROC glad_glMultiTexCoord4fv = NULL;\nPFNGLMULTITEXCOORD4IPROC glad_glMultiTexCoord4i = NULL;\nPFNGLMULTITEXCOORD4IVPROC glad_glMultiTexCoord4iv = NULL;\nPFNGLMULTITEXCOORD4SPROC glad_glMultiTexCoord4s = NULL;\nPFNGLMULTITEXCOORD4SVPROC glad_glMultiTexCoord4sv = NULL;\nPFNGLMULTITEXCOORDP1UIPROC glad_glMultiTexCoordP1ui = NULL;\nPFNGLMULTITEXCOORDP1UIVPROC glad_glMultiTexCoordP1uiv = NULL;\nPFNGLMULTITEXCOORDP2UIPROC glad_glMultiTexCoordP2ui = NULL;\nPFNGLMULTITEXCOORDP2UIVPROC glad_glMultiTexCoordP2uiv = NULL;\nPFNGLMULTITEXCOORDP3UIPROC glad_glMultiTexCoordP3ui = NULL;\nPFNGLMULTITEXCOORDP3UIVPROC glad_glMultiTexCoordP3uiv = NULL;\nPFNGLMULTITEXCOORDP4UIPROC glad_glMultiTexCoordP4ui = NULL;\nPFNGLMULTITEXCOORDP4UIVPROC glad_glMultiTexCoordP4uiv = NULL;\nPFNGLNEWLISTPROC glad_glNewList = NULL;\nPFNGLNORMAL3BPROC glad_glNormal3b = NULL;\nPFNGLNORMAL3BVPROC glad_glNormal3bv = NULL;\nPFNGLNORMAL3DPROC glad_glNormal3d = NULL;\nPFNGLNORMAL3DVPROC glad_glNormal3dv = NULL;\nPFNGLNORMAL3FPROC glad_glNormal3f = NULL;\nPFNGLNORMAL3FVPROC glad_glNormal3fv = NULL;\nPFNGLNORMAL3IPROC glad_glNormal3i = NULL;\nPFNGLNORMAL3IVPROC glad_glNormal3iv = NULL;\nPFNGLNORMAL3SPROC glad_glNormal3s = NULL;\nPFNGLNORMAL3SVPROC glad_glNormal3sv = NULL;\nPFNGLNORMALP3UIPROC glad_glNormalP3ui = NULL;\nPFNGLNORMALP3UIVPROC glad_glNormalP3uiv = NULL;\nPFNGLNORMALPOINTERPROC glad_glNormalPointer = NULL;\nPFNGLOBJECTLABELPROC glad_glObjectLabel = NULL;\nPFNGLOBJECTPTRLABELPROC glad_glObjectPtrLabel = NULL;\nPFNGLORTHOPROC glad_glOrtho = NULL;\nPFNGLPASSTHROUGHPROC glad_glPassThrough = NULL;\nPFNGLPIXELMAPFVPROC glad_glPixelMapfv = NULL;\nPFNGLPIXELMAPUIVPROC glad_glPixelMapuiv = NULL;\nPFNGLPIXELMAPUSVPROC glad_glPixelMapusv = NULL;\nPFNGLPIXELSTOREFPROC glad_glPixelStoref = NULL;\nPFNGLPIXELSTOREIPROC glad_glPixelStorei = NULL;\nPFNGLPIXELTRANSFERFPROC glad_glPixelTransferf = NULL;\nPFNGLPIXELTRANSFERIPROC glad_glPixelTransferi = NULL;\nPFNGLPIXELZOOMPROC glad_glPixelZoom = NULL;\nPFNGLPOINTPARAMETERFPROC glad_glPointParameterf = NULL;\nPFNGLPOINTPARAMETERFVPROC glad_glPointParameterfv = NULL;\nPFNGLPOINTPARAMETERIPROC glad_glPointParameteri = NULL;\nPFNGLPOINTPARAMETERIVPROC glad_glPointParameteriv = NULL;\nPFNGLPOINTSIZEPROC glad_glPointSize = NULL;\nPFNGLPOLYGONMODEPROC glad_glPolygonMode = NULL;\nPFNGLPOLYGONOFFSETPROC glad_glPolygonOffset = NULL;\nPFNGLPOLYGONSTIPPLEPROC glad_glPolygonStipple = NULL;\nPFNGLPOPATTRIBPROC glad_glPopAttrib = NULL;\nPFNGLPOPCLIENTATTRIBPROC glad_glPopClientAttrib = NULL;\nPFNGLPOPDEBUGGROUPPROC glad_glPopDebugGroup = NULL;\nPFNGLPOPMATRIXPROC glad_glPopMatrix = NULL;\nPFNGLPOPNAMEPROC glad_glPopName = NULL;\nPFNGLPRIMITIVERESTARTINDEXPROC glad_glPrimitiveRestartIndex = NULL;\nPFNGLPRIORITIZETEXTURESPROC glad_glPrioritizeTextures = NULL;\nPFNGLPROVOKINGVERTEXPROC glad_glProvokingVertex = NULL;\nPFNGLPUSHATTRIBPROC glad_glPushAttrib = NULL;\nPFNGLPUSHCLIENTATTRIBPROC glad_glPushClientAttrib = NULL;\nPFNGLPUSHDEBUGGROUPPROC glad_glPushDebugGroup = NULL;\nPFNGLPUSHMATRIXPROC glad_glPushMatrix = NULL;\nPFNGLPUSHNAMEPROC glad_glPushName = NULL;\nPFNGLQUERYCOUNTERPROC glad_glQueryCounter = NULL;\nPFNGLRASTERPOS2DPROC glad_glRasterPos2d = NULL;\nPFNGLRASTERPOS2DVPROC glad_glRasterPos2dv = NULL;\nPFNGLRASTERPOS2FPROC glad_glRasterPos2f = NULL;\nPFNGLRASTERPOS2FVPROC glad_glRasterPos2fv = NULL;\nPFNGLRASTERPOS2IPROC glad_glRasterPos2i = NULL;\nPFNGLRASTERPOS2IVPROC glad_glRasterPos2iv = NULL;\nPFNGLRASTERPOS2SPROC glad_glRasterPos2s = NULL;\nPFNGLRASTERPOS2SVPROC glad_glRasterPos2sv = NULL;\nPFNGLRASTERPOS3DPROC glad_glRasterPos3d = NULL;\nPFNGLRASTERPOS3DVPROC glad_glRasterPos3dv = NULL;\nPFNGLRASTERPOS3FPROC glad_glRasterPos3f = NULL;\nPFNGLRASTERPOS3FVPROC glad_glRasterPos3fv = NULL;\nPFNGLRASTERPOS3IPROC glad_glRasterPos3i = NULL;\nPFNGLRASTERPOS3IVPROC glad_glRasterPos3iv = NULL;\nPFNGLRASTERPOS3SPROC glad_glRasterPos3s = NULL;\nPFNGLRASTERPOS3SVPROC glad_glRasterPos3sv = NULL;\nPFNGLRASTERPOS4DPROC glad_glRasterPos4d = NULL;\nPFNGLRASTERPOS4DVPROC glad_glRasterPos4dv = NULL;\nPFNGLRASTERPOS4FPROC glad_glRasterPos4f = NULL;\nPFNGLRASTERPOS4FVPROC glad_glRasterPos4fv = NULL;\nPFNGLRASTERPOS4IPROC glad_glRasterPos4i = NULL;\nPFNGLRASTERPOS4IVPROC glad_glRasterPos4iv = NULL;\nPFNGLRASTERPOS4SPROC glad_glRasterPos4s = NULL;\nPFNGLRASTERPOS4SVPROC glad_glRasterPos4sv = NULL;\nPFNGLREADBUFFERPROC glad_glReadBuffer = NULL;\nPFNGLREADPIXELSPROC glad_glReadPixels = NULL;\nPFNGLREADNPIXELSPROC glad_glReadnPixels = NULL;\nPFNGLREADNPIXELSARBPROC glad_glReadnPixelsARB = NULL;\nPFNGLRECTDPROC glad_glRectd = NULL;\nPFNGLRECTDVPROC glad_glRectdv = NULL;\nPFNGLRECTFPROC glad_glRectf = NULL;\nPFNGLRECTFVPROC glad_glRectfv = NULL;\nPFNGLRECTIPROC glad_glRecti = NULL;\nPFNGLRECTIVPROC glad_glRectiv = NULL;\nPFNGLRECTSPROC glad_glRects = NULL;\nPFNGLRECTSVPROC glad_glRectsv = NULL;\nPFNGLRENDERMODEPROC glad_glRenderMode = NULL;\nPFNGLRENDERBUFFERSTORAGEPROC glad_glRenderbufferStorage = NULL;\nPFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC glad_glRenderbufferStorageMultisample = NULL;\nPFNGLROTATEDPROC glad_glRotated = NULL;\nPFNGLROTATEFPROC glad_glRotatef = NULL;\nPFNGLSAMPLECOVERAGEPROC glad_glSampleCoverage = NULL;\nPFNGLSAMPLECOVERAGEARBPROC glad_glSampleCoverageARB = NULL;\nPFNGLSAMPLEMASKIPROC glad_glSampleMaski = NULL;\nPFNGLSAMPLERPARAMETERIIVPROC glad_glSamplerParameterIiv = NULL;\nPFNGLSAMPLERPARAMETERIUIVPROC glad_glSamplerParameterIuiv = NULL;\nPFNGLSAMPLERPARAMETERFPROC glad_glSamplerParameterf = NULL;\nPFNGLSAMPLERPARAMETERFVPROC glad_glSamplerParameterfv = NULL;\nPFNGLSAMPLERPARAMETERIPROC glad_glSamplerParameteri = NULL;\nPFNGLSAMPLERPARAMETERIVPROC glad_glSamplerParameteriv = NULL;\nPFNGLSCALEDPROC glad_glScaled = NULL;\nPFNGLSCALEFPROC glad_glScalef = NULL;\nPFNGLSCISSORPROC glad_glScissor = NULL;\nPFNGLSECONDARYCOLOR3BPROC glad_glSecondaryColor3b = NULL;\nPFNGLSECONDARYCOLOR3BVPROC glad_glSecondaryColor3bv = NULL;\nPFNGLSECONDARYCOLOR3DPROC glad_glSecondaryColor3d = NULL;\nPFNGLSECONDARYCOLOR3DVPROC glad_glSecondaryColor3dv = NULL;\nPFNGLSECONDARYCOLOR3FPROC glad_glSecondaryColor3f = NULL;\nPFNGLSECONDARYCOLOR3FVPROC glad_glSecondaryColor3fv = NULL;\nPFNGLSECONDARYCOLOR3IPROC glad_glSecondaryColor3i = NULL;\nPFNGLSECONDARYCOLOR3IVPROC glad_glSecondaryColor3iv = NULL;\nPFNGLSECONDARYCOLOR3SPROC glad_glSecondaryColor3s = NULL;\nPFNGLSECONDARYCOLOR3SVPROC glad_glSecondaryColor3sv = NULL;\nPFNGLSECONDARYCOLOR3UBPROC glad_glSecondaryColor3ub = NULL;\nPFNGLSECONDARYCOLOR3UBVPROC glad_glSecondaryColor3ubv = NULL;\nPFNGLSECONDARYCOLOR3UIPROC glad_glSecondaryColor3ui = NULL;\nPFNGLSECONDARYCOLOR3UIVPROC glad_glSecondaryColor3uiv = NULL;\nPFNGLSECONDARYCOLOR3USPROC glad_glSecondaryColor3us = NULL;\nPFNGLSECONDARYCOLOR3USVPROC glad_glSecondaryColor3usv = NULL;\nPFNGLSECONDARYCOLORP3UIPROC glad_glSecondaryColorP3ui = NULL;\nPFNGLSECONDARYCOLORP3UIVPROC glad_glSecondaryColorP3uiv = NULL;\nPFNGLSECONDARYCOLORPOINTERPROC glad_glSecondaryColorPointer = NULL;\nPFNGLSELECTBUFFERPROC glad_glSelectBuffer = NULL;\nPFNGLSHADEMODELPROC glad_glShadeModel = NULL;\nPFNGLSHADERSOURCEPROC glad_glShaderSource = NULL;\nPFNGLSTENCILFUNCPROC glad_glStencilFunc = NULL;\nPFNGLSTENCILFUNCSEPARATEPROC glad_glStencilFuncSeparate = NULL;\nPFNGLSTENCILMASKPROC glad_glStencilMask = NULL;\nPFNGLSTENCILMASKSEPARATEPROC glad_glStencilMaskSeparate = NULL;\nPFNGLSTENCILOPPROC glad_glStencilOp = NULL;\nPFNGLSTENCILOPSEPARATEPROC glad_glStencilOpSeparate = NULL;\nPFNGLTEXBUFFERPROC glad_glTexBuffer = NULL;\nPFNGLTEXCOORD1DPROC glad_glTexCoord1d = NULL;\nPFNGLTEXCOORD1DVPROC glad_glTexCoord1dv = NULL;\nPFNGLTEXCOORD1FPROC glad_glTexCoord1f = NULL;\nPFNGLTEXCOORD1FVPROC glad_glTexCoord1fv = NULL;\nPFNGLTEXCOORD1IPROC glad_glTexCoord1i = NULL;\nPFNGLTEXCOORD1IVPROC glad_glTexCoord1iv = NULL;\nPFNGLTEXCOORD1SPROC glad_glTexCoord1s = NULL;\nPFNGLTEXCOORD1SVPROC glad_glTexCoord1sv = NULL;\nPFNGLTEXCOORD2DPROC glad_glTexCoord2d = NULL;\nPFNGLTEXCOORD2DVPROC glad_glTexCoord2dv = NULL;\nPFNGLTEXCOORD2FPROC glad_glTexCoord2f = NULL;\nPFNGLTEXCOORD2FVPROC glad_glTexCoord2fv = NULL;\nPFNGLTEXCOORD2IPROC glad_glTexCoord2i = NULL;\nPFNGLTEXCOORD2IVPROC glad_glTexCoord2iv = NULL;\nPFNGLTEXCOORD2SPROC glad_glTexCoord2s = NULL;\nPFNGLTEXCOORD2SVPROC glad_glTexCoord2sv = NULL;\nPFNGLTEXCOORD3DPROC glad_glTexCoord3d = NULL;\nPFNGLTEXCOORD3DVPROC glad_glTexCoord3dv = NULL;\nPFNGLTEXCOORD3FPROC glad_glTexCoord3f = NULL;\nPFNGLTEXCOORD3FVPROC glad_glTexCoord3fv = NULL;\nPFNGLTEXCOORD3IPROC glad_glTexCoord3i = NULL;\nPFNGLTEXCOORD3IVPROC glad_glTexCoord3iv = NULL;\nPFNGLTEXCOORD3SPROC glad_glTexCoord3s = NULL;\nPFNGLTEXCOORD3SVPROC glad_glTexCoord3sv = NULL;\nPFNGLTEXCOORD4DPROC glad_glTexCoord4d = NULL;\nPFNGLTEXCOORD4DVPROC glad_glTexCoord4dv = NULL;\nPFNGLTEXCOORD4FPROC glad_glTexCoord4f = NULL;\nPFNGLTEXCOORD4FVPROC glad_glTexCoord4fv = NULL;\nPFNGLTEXCOORD4IPROC glad_glTexCoord4i = NULL;\nPFNGLTEXCOORD4IVPROC glad_glTexCoord4iv = NULL;\nPFNGLTEXCOORD4SPROC glad_glTexCoord4s = NULL;\nPFNGLTEXCOORD4SVPROC glad_glTexCoord4sv = NULL;\nPFNGLTEXCOORDP1UIPROC glad_glTexCoordP1ui = NULL;\nPFNGLTEXCOORDP1UIVPROC glad_glTexCoordP1uiv = NULL;\nPFNGLTEXCOORDP2UIPROC glad_glTexCoordP2ui = NULL;\nPFNGLTEXCOORDP2UIVPROC glad_glTexCoordP2uiv = NULL;\nPFNGLTEXCOORDP3UIPROC glad_glTexCoordP3ui = NULL;\nPFNGLTEXCOORDP3UIVPROC glad_glTexCoordP3uiv = NULL;\nPFNGLTEXCOORDP4UIPROC glad_glTexCoordP4ui = NULL;\nPFNGLTEXCOORDP4UIVPROC glad_glTexCoordP4uiv = NULL;\nPFNGLTEXCOORDPOINTERPROC glad_glTexCoordPointer = NULL;\nPFNGLTEXENVFPROC glad_glTexEnvf = NULL;\nPFNGLTEXENVFVPROC glad_glTexEnvfv = NULL;\nPFNGLTEXENVIPROC glad_glTexEnvi = NULL;\nPFNGLTEXENVIVPROC glad_glTexEnviv = NULL;\nPFNGLTEXGENDPROC glad_glTexGend = NULL;\nPFNGLTEXGENDVPROC glad_glTexGendv = NULL;\nPFNGLTEXGENFPROC glad_glTexGenf = NULL;\nPFNGLTEXGENFVPROC glad_glTexGenfv = NULL;\nPFNGLTEXGENIPROC glad_glTexGeni = NULL;\nPFNGLTEXGENIVPROC glad_glTexGeniv = NULL;\nPFNGLTEXIMAGE1DPROC glad_glTexImage1D = NULL;\nPFNGLTEXIMAGE2DPROC glad_glTexImage2D = NULL;\nPFNGLTEXIMAGE2DMULTISAMPLEPROC glad_glTexImage2DMultisample = NULL;\nPFNGLTEXIMAGE3DPROC glad_glTexImage3D = NULL;\nPFNGLTEXIMAGE3DMULTISAMPLEPROC glad_glTexImage3DMultisample = NULL;\nPFNGLTEXPARAMETERIIVPROC glad_glTexParameterIiv = NULL;\nPFNGLTEXPARAMETERIUIVPROC glad_glTexParameterIuiv = NULL;\nPFNGLTEXPARAMETERFPROC glad_glTexParameterf = NULL;\nPFNGLTEXPARAMETERFVPROC glad_glTexParameterfv = NULL;\nPFNGLTEXPARAMETERIPROC glad_glTexParameteri = NULL;\nPFNGLTEXPARAMETERIVPROC glad_glTexParameteriv = NULL;\nPFNGLTEXSUBIMAGE1DPROC glad_glTexSubImage1D = NULL;\nPFNGLTEXSUBIMAGE2DPROC glad_glTexSubImage2D = NULL;\nPFNGLTEXSUBIMAGE3DPROC glad_glTexSubImage3D = NULL;\nPFNGLTRANSFORMFEEDBACKVARYINGSPROC glad_glTransformFeedbackVaryings = NULL;\nPFNGLTRANSLATEDPROC glad_glTranslated = NULL;\nPFNGLTRANSLATEFPROC glad_glTranslatef = NULL;\nPFNGLUNIFORM1FPROC glad_glUniform1f = NULL;\nPFNGLUNIFORM1FVPROC glad_glUniform1fv = NULL;\nPFNGLUNIFORM1IPROC glad_glUniform1i = NULL;\nPFNGLUNIFORM1IVPROC glad_glUniform1iv = NULL;\nPFNGLUNIFORM1UIPROC glad_glUniform1ui = NULL;\nPFNGLUNIFORM1UIVPROC glad_glUniform1uiv = NULL;\nPFNGLUNIFORM2FPROC glad_glUniform2f = NULL;\nPFNGLUNIFORM2FVPROC glad_glUniform2fv = NULL;\nPFNGLUNIFORM2IPROC glad_glUniform2i = NULL;\nPFNGLUNIFORM2IVPROC glad_glUniform2iv = NULL;\nPFNGLUNIFORM2UIPROC glad_glUniform2ui = NULL;\nPFNGLUNIFORM2UIVPROC glad_glUniform2uiv = NULL;\nPFNGLUNIFORM3FPROC glad_glUniform3f = NULL;\nPFNGLUNIFORM3FVPROC glad_glUniform3fv = NULL;\nPFNGLUNIFORM3IPROC glad_glUniform3i = NULL;\nPFNGLUNIFORM3IVPROC glad_glUniform3iv = NULL;\nPFNGLUNIFORM3UIPROC glad_glUniform3ui = NULL;\nPFNGLUNIFORM3UIVPROC glad_glUniform3uiv = NULL;\nPFNGLUNIFORM4FPROC glad_glUniform4f = NULL;\nPFNGLUNIFORM4FVPROC glad_glUniform4fv = NULL;\nPFNGLUNIFORM4IPROC glad_glUniform4i = NULL;\nPFNGLUNIFORM4IVPROC glad_glUniform4iv = NULL;\nPFNGLUNIFORM4UIPROC glad_glUniform4ui = NULL;\nPFNGLUNIFORM4UIVPROC glad_glUniform4uiv = NULL;\nPFNGLUNIFORMBLOCKBINDINGPROC glad_glUniformBlockBinding = NULL;\nPFNGLUNIFORMMATRIX2FVPROC glad_glUniformMatrix2fv = NULL;\nPFNGLUNIFORMMATRIX2X3FVPROC glad_glUniformMatrix2x3fv = NULL;\nPFNGLUNIFORMMATRIX2X4FVPROC glad_glUniformMatrix2x4fv = NULL;\nPFNGLUNIFORMMATRIX3FVPROC glad_glUniformMatrix3fv = NULL;\nPFNGLUNIFORMMATRIX3X2FVPROC glad_glUniformMatrix3x2fv = NULL;\nPFNGLUNIFORMMATRIX3X4FVPROC glad_glUniformMatrix3x4fv = NULL;\nPFNGLUNIFORMMATRIX4FVPROC glad_glUniformMatrix4fv = NULL;\nPFNGLUNIFORMMATRIX4X2FVPROC glad_glUniformMatrix4x2fv = NULL;\nPFNGLUNIFORMMATRIX4X3FVPROC glad_glUniformMatrix4x3fv = NULL;\nPFNGLUNMAPBUFFERPROC glad_glUnmapBuffer = NULL;\nPFNGLUSEPROGRAMPROC glad_glUseProgram = NULL;\nPFNGLVALIDATEPROGRAMPROC glad_glValidateProgram = NULL;\nPFNGLVERTEX2DPROC glad_glVertex2d = NULL;\nPFNGLVERTEX2DVPROC glad_glVertex2dv = NULL;\nPFNGLVERTEX2FPROC glad_glVertex2f = NULL;\nPFNGLVERTEX2FVPROC glad_glVertex2fv = NULL;\nPFNGLVERTEX2IPROC glad_glVertex2i = NULL;\nPFNGLVERTEX2IVPROC glad_glVertex2iv = NULL;\nPFNGLVERTEX2SPROC glad_glVertex2s = NULL;\nPFNGLVERTEX2SVPROC glad_glVertex2sv = NULL;\nPFNGLVERTEX3DPROC glad_glVertex3d = NULL;\nPFNGLVERTEX3DVPROC glad_glVertex3dv = NULL;\nPFNGLVERTEX3FPROC glad_glVertex3f = NULL;\nPFNGLVERTEX3FVPROC glad_glVertex3fv = NULL;\nPFNGLVERTEX3IPROC glad_glVertex3i = NULL;\nPFNGLVERTEX3IVPROC glad_glVertex3iv = NULL;\nPFNGLVERTEX3SPROC glad_glVertex3s = NULL;\nPFNGLVERTEX3SVPROC glad_glVertex3sv = NULL;\nPFNGLVERTEX4DPROC glad_glVertex4d = NULL;\nPFNGLVERTEX4DVPROC glad_glVertex4dv = NULL;\nPFNGLVERTEX4FPROC glad_glVertex4f = NULL;\nPFNGLVERTEX4FVPROC glad_glVertex4fv = NULL;\nPFNGLVERTEX4IPROC glad_glVertex4i = NULL;\nPFNGLVERTEX4IVPROC glad_glVertex4iv = NULL;\nPFNGLVERTEX4SPROC glad_glVertex4s = NULL;\nPFNGLVERTEX4SVPROC glad_glVertex4sv = NULL;\nPFNGLVERTEXATTRIB1DPROC glad_glVertexAttrib1d = NULL;\nPFNGLVERTEXATTRIB1DVPROC glad_glVertexAttrib1dv = NULL;\nPFNGLVERTEXATTRIB1FPROC glad_glVertexAttrib1f = NULL;\nPFNGLVERTEXATTRIB1FVPROC glad_glVertexAttrib1fv = NULL;\nPFNGLVERTEXATTRIB1SPROC glad_glVertexAttrib1s = NULL;\nPFNGLVERTEXATTRIB1SVPROC glad_glVertexAttrib1sv = NULL;\nPFNGLVERTEXATTRIB2DPROC glad_glVertexAttrib2d = NULL;\nPFNGLVERTEXATTRIB2DVPROC glad_glVertexAttrib2dv = NULL;\nPFNGLVERTEXATTRIB2FPROC glad_glVertexAttrib2f = NULL;\nPFNGLVERTEXATTRIB2FVPROC glad_glVertexAttrib2fv = NULL;\nPFNGLVERTEXATTRIB2SPROC glad_glVertexAttrib2s = NULL;\nPFNGLVERTEXATTRIB2SVPROC glad_glVertexAttrib2sv = NULL;\nPFNGLVERTEXATTRIB3DPROC glad_glVertexAttrib3d = NULL;\nPFNGLVERTEXATTRIB3DVPROC glad_glVertexAttrib3dv = NULL;\nPFNGLVERTEXATTRIB3FPROC glad_glVertexAttrib3f = NULL;\nPFNGLVERTEXATTRIB3FVPROC glad_glVertexAttrib3fv = NULL;\nPFNGLVERTEXATTRIB3SPROC glad_glVertexAttrib3s = NULL;\nPFNGLVERTEXATTRIB3SVPROC glad_glVertexAttrib3sv = NULL;\nPFNGLVERTEXATTRIB4NBVPROC glad_glVertexAttrib4Nbv = NULL;\nPFNGLVERTEXATTRIB4NIVPROC glad_glVertexAttrib4Niv = NULL;\nPFNGLVERTEXATTRIB4NSVPROC glad_glVertexAttrib4Nsv = NULL;\nPFNGLVERTEXATTRIB4NUBPROC glad_glVertexAttrib4Nub = NULL;\nPFNGLVERTEXATTRIB4NUBVPROC glad_glVertexAttrib4Nubv = NULL;\nPFNGLVERTEXATTRIB4NUIVPROC glad_glVertexAttrib4Nuiv = NULL;\nPFNGLVERTEXATTRIB4NUSVPROC glad_glVertexAttrib4Nusv = NULL;\nPFNGLVERTEXATTRIB4BVPROC glad_glVertexAttrib4bv = NULL;\nPFNGLVERTEXATTRIB4DPROC glad_glVertexAttrib4d = NULL;\nPFNGLVERTEXATTRIB4DVPROC glad_glVertexAttrib4dv = NULL;\nPFNGLVERTEXATTRIB4FPROC glad_glVertexAttrib4f = NULL;\nPFNGLVERTEXATTRIB4FVPROC glad_glVertexAttrib4fv = NULL;\nPFNGLVERTEXATTRIB4IVPROC glad_glVertexAttrib4iv = NULL;\nPFNGLVERTEXATTRIB4SPROC glad_glVertexAttrib4s = NULL;\nPFNGLVERTEXATTRIB4SVPROC glad_glVertexAttrib4sv = NULL;\nPFNGLVERTEXATTRIB4UBVPROC glad_glVertexAttrib4ubv = NULL;\nPFNGLVERTEXATTRIB4UIVPROC glad_glVertexAttrib4uiv = NULL;\nPFNGLVERTEXATTRIB4USVPROC glad_glVertexAttrib4usv = NULL;\nPFNGLVERTEXATTRIBDIVISORPROC glad_glVertexAttribDivisor = NULL;\nPFNGLVERTEXATTRIBI1IPROC glad_glVertexAttribI1i = NULL;\nPFNGLVERTEXATTRIBI1IVPROC glad_glVertexAttribI1iv = NULL;\nPFNGLVERTEXATTRIBI1UIPROC glad_glVertexAttribI1ui = NULL;\nPFNGLVERTEXATTRIBI1UIVPROC glad_glVertexAttribI1uiv = NULL;\nPFNGLVERTEXATTRIBI2IPROC glad_glVertexAttribI2i = NULL;\nPFNGLVERTEXATTRIBI2IVPROC glad_glVertexAttribI2iv = NULL;\nPFNGLVERTEXATTRIBI2UIPROC glad_glVertexAttribI2ui = NULL;\nPFNGLVERTEXATTRIBI2UIVPROC glad_glVertexAttribI2uiv = NULL;\nPFNGLVERTEXATTRIBI3IPROC glad_glVertexAttribI3i = NULL;\nPFNGLVERTEXATTRIBI3IVPROC glad_glVertexAttribI3iv = NULL;\nPFNGLVERTEXATTRIBI3UIPROC glad_glVertexAttribI3ui = NULL;\nPFNGLVERTEXATTRIBI3UIVPROC glad_glVertexAttribI3uiv = NULL;\nPFNGLVERTEXATTRIBI4BVPROC glad_glVertexAttribI4bv = NULL;\nPFNGLVERTEXATTRIBI4IPROC glad_glVertexAttribI4i = NULL;\nPFNGLVERTEXATTRIBI4IVPROC glad_glVertexAttribI4iv = NULL;\nPFNGLVERTEXATTRIBI4SVPROC glad_glVertexAttribI4sv = NULL;\nPFNGLVERTEXATTRIBI4UBVPROC glad_glVertexAttribI4ubv = NULL;\nPFNGLVERTEXATTRIBI4UIPROC glad_glVertexAttribI4ui = NULL;\nPFNGLVERTEXATTRIBI4UIVPROC glad_glVertexAttribI4uiv = NULL;\nPFNGLVERTEXATTRIBI4USVPROC glad_glVertexAttribI4usv = NULL;\nPFNGLVERTEXATTRIBIPOINTERPROC glad_glVertexAttribIPointer = NULL;\nPFNGLVERTEXATTRIBP1UIPROC glad_glVertexAttribP1ui = NULL;\nPFNGLVERTEXATTRIBP1UIVPROC glad_glVertexAttribP1uiv = NULL;\nPFNGLVERTEXATTRIBP2UIPROC glad_glVertexAttribP2ui = NULL;\nPFNGLVERTEXATTRIBP2UIVPROC glad_glVertexAttribP2uiv = NULL;\nPFNGLVERTEXATTRIBP3UIPROC glad_glVertexAttribP3ui = NULL;\nPFNGLVERTEXATTRIBP3UIVPROC glad_glVertexAttribP3uiv = NULL;\nPFNGLVERTEXATTRIBP4UIPROC glad_glVertexAttribP4ui = NULL;\nPFNGLVERTEXATTRIBP4UIVPROC glad_glVertexAttribP4uiv = NULL;\nPFNGLVERTEXATTRIBPOINTERPROC glad_glVertexAttribPointer = NULL;\nPFNGLVERTEXP2UIPROC glad_glVertexP2ui = NULL;\nPFNGLVERTEXP2UIVPROC glad_glVertexP2uiv = NULL;\nPFNGLVERTEXP3UIPROC glad_glVertexP3ui = NULL;\nPFNGLVERTEXP3UIVPROC glad_glVertexP3uiv = NULL;\nPFNGLVERTEXP4UIPROC glad_glVertexP4ui = NULL;\nPFNGLVERTEXP4UIVPROC glad_glVertexP4uiv = NULL;\nPFNGLVERTEXPOINTERPROC glad_glVertexPointer = NULL;\nPFNGLVIEWPORTPROC glad_glViewport = NULL;\nPFNGLWAITSYNCPROC glad_glWaitSync = NULL;\nPFNGLWINDOWPOS2DPROC glad_glWindowPos2d = NULL;\nPFNGLWINDOWPOS2DVPROC glad_glWindowPos2dv = NULL;\nPFNGLWINDOWPOS2FPROC glad_glWindowPos2f = NULL;\nPFNGLWINDOWPOS2FVPROC glad_glWindowPos2fv = NULL;\nPFNGLWINDOWPOS2IPROC glad_glWindowPos2i = NULL;\nPFNGLWINDOWPOS2IVPROC glad_glWindowPos2iv = NULL;\nPFNGLWINDOWPOS2SPROC glad_glWindowPos2s = NULL;\nPFNGLWINDOWPOS2SVPROC glad_glWindowPos2sv = NULL;\nPFNGLWINDOWPOS3DPROC glad_glWindowPos3d = NULL;\nPFNGLWINDOWPOS3DVPROC glad_glWindowPos3dv = NULL;\nPFNGLWINDOWPOS3FPROC glad_glWindowPos3f = NULL;\nPFNGLWINDOWPOS3FVPROC glad_glWindowPos3fv = NULL;\nPFNGLWINDOWPOS3IPROC glad_glWindowPos3i = NULL;\nPFNGLWINDOWPOS3IVPROC glad_glWindowPos3iv = NULL;\nPFNGLWINDOWPOS3SPROC glad_glWindowPos3s = NULL;\nPFNGLWINDOWPOS3SVPROC glad_glWindowPos3sv = NULL;\n\n\nstatic void glad_gl_load_GL_VERSION_1_0( GLADuserptrloadfunc load, void* userptr) {\n    if(!GLAD_GL_VERSION_1_0) return;\n    glAccum = (PFNGLACCUMPROC) load(\"glAccum\", userptr);\n    glAlphaFunc = (PFNGLALPHAFUNCPROC) load(\"glAlphaFunc\", userptr);\n    glBegin = (PFNGLBEGINPROC) load(\"glBegin\", userptr);\n    glBitmap = (PFNGLBITMAPPROC) load(\"glBitmap\", userptr);\n    glBlendFunc = (PFNGLBLENDFUNCPROC) load(\"glBlendFunc\", userptr);\n    glCallList = (PFNGLCALLLISTPROC) load(\"glCallList\", userptr);\n    glCallLists = (PFNGLCALLLISTSPROC) load(\"glCallLists\", userptr);\n    glClear = (PFNGLCLEARPROC) load(\"glClear\", userptr);\n    glClearAccum = (PFNGLCLEARACCUMPROC) load(\"glClearAccum\", userptr);\n    glClearColor = (PFNGLCLEARCOLORPROC) load(\"glClearColor\", userptr);\n    glClearDepth = (PFNGLCLEARDEPTHPROC) load(\"glClearDepth\", userptr);\n    glClearIndex = (PFNGLCLEARINDEXPROC) load(\"glClearIndex\", userptr);\n    glClearStencil = (PFNGLCLEARSTENCILPROC) load(\"glClearStencil\", userptr);\n    glClipPlane = (PFNGLCLIPPLANEPROC) load(\"glClipPlane\", userptr);\n    glColor3b = (PFNGLCOLOR3BPROC) load(\"glColor3b\", userptr);\n    glColor3bv = (PFNGLCOLOR3BVPROC) load(\"glColor3bv\", userptr);\n    glColor3d = (PFNGLCOLOR3DPROC) load(\"glColor3d\", userptr);\n    glColor3dv = (PFNGLCOLOR3DVPROC) load(\"glColor3dv\", userptr);\n    glColor3f = (PFNGLCOLOR3FPROC) load(\"glColor3f\", userptr);\n    glColor3fv = (PFNGLCOLOR3FVPROC) load(\"glColor3fv\", userptr);\n    glColor3i = (PFNGLCOLOR3IPROC) load(\"glColor3i\", userptr);\n    glColor3iv = (PFNGLCOLOR3IVPROC) load(\"glColor3iv\", userptr);\n    glColor3s = (PFNGLCOLOR3SPROC) load(\"glColor3s\", userptr);\n    glColor3sv = (PFNGLCOLOR3SVPROC) load(\"glColor3sv\", userptr);\n    glColor3ub = (PFNGLCOLOR3UBPROC) load(\"glColor3ub\", userptr);\n    glColor3ubv = (PFNGLCOLOR3UBVPROC) load(\"glColor3ubv\", userptr);\n    glColor3ui = (PFNGLCOLOR3UIPROC) load(\"glColor3ui\", userptr);\n    glColor3uiv = (PFNGLCOLOR3UIVPROC) load(\"glColor3uiv\", userptr);\n    glColor3us = (PFNGLCOLOR3USPROC) load(\"glColor3us\", userptr);\n    glColor3usv = (PFNGLCOLOR3USVPROC) load(\"glColor3usv\", userptr);\n    glColor4b = (PFNGLCOLOR4BPROC) load(\"glColor4b\", userptr);\n    glColor4bv = (PFNGLCOLOR4BVPROC) load(\"glColor4bv\", userptr);\n    glColor4d = (PFNGLCOLOR4DPROC) load(\"glColor4d\", userptr);\n    glColor4dv = (PFNGLCOLOR4DVPROC) load(\"glColor4dv\", userptr);\n    glColor4f = (PFNGLCOLOR4FPROC) load(\"glColor4f\", userptr);\n    glColor4fv = (PFNGLCOLOR4FVPROC) load(\"glColor4fv\", userptr);\n    glColor4i = (PFNGLCOLOR4IPROC) load(\"glColor4i\", userptr);\n    glColor4iv = (PFNGLCOLOR4IVPROC) load(\"glColor4iv\", userptr);\n    glColor4s = (PFNGLCOLOR4SPROC) load(\"glColor4s\", userptr);\n    glColor4sv = (PFNGLCOLOR4SVPROC) load(\"glColor4sv\", userptr);\n    glColor4ub = (PFNGLCOLOR4UBPROC) load(\"glColor4ub\", userptr);\n    glColor4ubv = (PFNGLCOLOR4UBVPROC) load(\"glColor4ubv\", userptr);\n    glColor4ui = (PFNGLCOLOR4UIPROC) load(\"glColor4ui\", userptr);\n    glColor4uiv = (PFNGLCOLOR4UIVPROC) load(\"glColor4uiv\", userptr);\n    glColor4us = (PFNGLCOLOR4USPROC) load(\"glColor4us\", userptr);\n    glColor4usv = (PFNGLCOLOR4USVPROC) load(\"glColor4usv\", userptr);\n    glColorMask = (PFNGLCOLORMASKPROC) load(\"glColorMask\", userptr);\n    glColorMaterial = (PFNGLCOLORMATERIALPROC) load(\"glColorMaterial\", userptr);\n    glCopyPixels = (PFNGLCOPYPIXELSPROC) load(\"glCopyPixels\", userptr);\n    glCullFace = (PFNGLCULLFACEPROC) load(\"glCullFace\", userptr);\n    glDeleteLists = (PFNGLDELETELISTSPROC) load(\"glDeleteLists\", userptr);\n    glDepthFunc = (PFNGLDEPTHFUNCPROC) load(\"glDepthFunc\", userptr);\n    glDepthMask = (PFNGLDEPTHMASKPROC) load(\"glDepthMask\", userptr);\n    glDepthRange = (PFNGLDEPTHRANGEPROC) load(\"glDepthRange\", userptr);\n    glDisable = (PFNGLDISABLEPROC) load(\"glDisable\", userptr);\n    glDrawBuffer = (PFNGLDRAWBUFFERPROC) load(\"glDrawBuffer\", userptr);\n    glDrawPixels = (PFNGLDRAWPIXELSPROC) load(\"glDrawPixels\", userptr);\n    glEdgeFlag = (PFNGLEDGEFLAGPROC) load(\"glEdgeFlag\", userptr);\n    glEdgeFlagv = (PFNGLEDGEFLAGVPROC) load(\"glEdgeFlagv\", userptr);\n    glEnable = (PFNGLENABLEPROC) load(\"glEnable\", userptr);\n    glEnd = (PFNGLENDPROC) load(\"glEnd\", userptr);\n    glEndList = (PFNGLENDLISTPROC) load(\"glEndList\", userptr);\n    glEvalCoord1d = (PFNGLEVALCOORD1DPROC) load(\"glEvalCoord1d\", userptr);\n    glEvalCoord1dv = (PFNGLEVALCOORD1DVPROC) load(\"glEvalCoord1dv\", userptr);\n    glEvalCoord1f = (PFNGLEVALCOORD1FPROC) load(\"glEvalCoord1f\", userptr);\n    glEvalCoord1fv = (PFNGLEVALCOORD1FVPROC) load(\"glEvalCoord1fv\", userptr);\n    glEvalCoord2d = (PFNGLEVALCOORD2DPROC) load(\"glEvalCoord2d\", userptr);\n    glEvalCoord2dv = (PFNGLEVALCOORD2DVPROC) load(\"glEvalCoord2dv\", userptr);\n    glEvalCoord2f = (PFNGLEVALCOORD2FPROC) load(\"glEvalCoord2f\", userptr);\n    glEvalCoord2fv = (PFNGLEVALCOORD2FVPROC) load(\"glEvalCoord2fv\", userptr);\n    glEvalMesh1 = (PFNGLEVALMESH1PROC) load(\"glEvalMesh1\", userptr);\n    glEvalMesh2 = (PFNGLEVALMESH2PROC) load(\"glEvalMesh2\", userptr);\n    glEvalPoint1 = (PFNGLEVALPOINT1PROC) load(\"glEvalPoint1\", userptr);\n    glEvalPoint2 = (PFNGLEVALPOINT2PROC) load(\"glEvalPoint2\", userptr);\n    glFeedbackBuffer = (PFNGLFEEDBACKBUFFERPROC) load(\"glFeedbackBuffer\", userptr);\n    glFinish = (PFNGLFINISHPROC) load(\"glFinish\", userptr);\n    glFlush = (PFNGLFLUSHPROC) load(\"glFlush\", userptr);\n    glFogf = (PFNGLFOGFPROC) load(\"glFogf\", userptr);\n    glFogfv = (PFNGLFOGFVPROC) load(\"glFogfv\", userptr);\n    glFogi = (PFNGLFOGIPROC) load(\"glFogi\", userptr);\n    glFogiv = (PFNGLFOGIVPROC) load(\"glFogiv\", userptr);\n    glFrontFace = (PFNGLFRONTFACEPROC) load(\"glFrontFace\", userptr);\n    glFrustum = (PFNGLFRUSTUMPROC) load(\"glFrustum\", userptr);\n    glGenLists = (PFNGLGENLISTSPROC) load(\"glGenLists\", userptr);\n    glGetBooleanv = (PFNGLGETBOOLEANVPROC) load(\"glGetBooleanv\", userptr);\n    glGetClipPlane = (PFNGLGETCLIPPLANEPROC) load(\"glGetClipPlane\", userptr);\n    glGetDoublev = (PFNGLGETDOUBLEVPROC) load(\"glGetDoublev\", userptr);\n    glGetError = (PFNGLGETERRORPROC) load(\"glGetError\", userptr);\n    glGetFloatv = (PFNGLGETFLOATVPROC) load(\"glGetFloatv\", userptr);\n    glGetIntegerv = (PFNGLGETINTEGERVPROC) load(\"glGetIntegerv\", userptr);\n    glGetLightfv = (PFNGLGETLIGHTFVPROC) load(\"glGetLightfv\", userptr);\n    glGetLightiv = (PFNGLGETLIGHTIVPROC) load(\"glGetLightiv\", userptr);\n    glGetMapdv = (PFNGLGETMAPDVPROC) load(\"glGetMapdv\", userptr);\n    glGetMapfv = (PFNGLGETMAPFVPROC) load(\"glGetMapfv\", userptr);\n    glGetMapiv = (PFNGLGETMAPIVPROC) load(\"glGetMapiv\", userptr);\n    glGetMaterialfv = (PFNGLGETMATERIALFVPROC) load(\"glGetMaterialfv\", userptr);\n    glGetMaterialiv = (PFNGLGETMATERIALIVPROC) load(\"glGetMaterialiv\", userptr);\n    glGetPixelMapfv = (PFNGLGETPIXELMAPFVPROC) load(\"glGetPixelMapfv\", userptr);\n    glGetPixelMapuiv = (PFNGLGETPIXELMAPUIVPROC) load(\"glGetPixelMapuiv\", userptr);\n    glGetPixelMapusv = (PFNGLGETPIXELMAPUSVPROC) load(\"glGetPixelMapusv\", userptr);\n    glGetPolygonStipple = (PFNGLGETPOLYGONSTIPPLEPROC) load(\"glGetPolygonStipple\", userptr);\n    glGetString = (PFNGLGETSTRINGPROC) load(\"glGetString\", userptr);\n    glGetTexEnvfv = (PFNGLGETTEXENVFVPROC) load(\"glGetTexEnvfv\", userptr);\n    glGetTexEnviv = (PFNGLGETTEXENVIVPROC) load(\"glGetTexEnviv\", userptr);\n    glGetTexGendv = (PFNGLGETTEXGENDVPROC) load(\"glGetTexGendv\", userptr);\n    glGetTexGenfv = (PFNGLGETTEXGENFVPROC) load(\"glGetTexGenfv\", userptr);\n    glGetTexGeniv = (PFNGLGETTEXGENIVPROC) load(\"glGetTexGeniv\", userptr);\n    glGetTexImage = (PFNGLGETTEXIMAGEPROC) load(\"glGetTexImage\", userptr);\n    glGetTexLevelParameterfv = (PFNGLGETTEXLEVELPARAMETERFVPROC) load(\"glGetTexLevelParameterfv\", userptr);\n    glGetTexLevelParameteriv = (PFNGLGETTEXLEVELPARAMETERIVPROC) load(\"glGetTexLevelParameteriv\", userptr);\n    glGetTexParameterfv = (PFNGLGETTEXPARAMETERFVPROC) load(\"glGetTexParameterfv\", userptr);\n    glGetTexParameteriv = (PFNGLGETTEXPARAMETERIVPROC) load(\"glGetTexParameteriv\", userptr);\n    glHint = (PFNGLHINTPROC) load(\"glHint\", userptr);\n    glIndexMask = (PFNGLINDEXMASKPROC) load(\"glIndexMask\", userptr);\n    glIndexd = (PFNGLINDEXDPROC) load(\"glIndexd\", userptr);\n    glIndexdv = (PFNGLINDEXDVPROC) load(\"glIndexdv\", userptr);\n    glIndexf = (PFNGLINDEXFPROC) load(\"glIndexf\", userptr);\n    glIndexfv = (PFNGLINDEXFVPROC) load(\"glIndexfv\", userptr);\n    glIndexi = (PFNGLINDEXIPROC) load(\"glIndexi\", userptr);\n    glIndexiv = (PFNGLINDEXIVPROC) load(\"glIndexiv\", userptr);\n    glIndexs = (PFNGLINDEXSPROC) load(\"glIndexs\", userptr);\n    glIndexsv = (PFNGLINDEXSVPROC) load(\"glIndexsv\", userptr);\n    glInitNames = (PFNGLINITNAMESPROC) load(\"glInitNames\", userptr);\n    glIsEnabled = (PFNGLISENABLEDPROC) load(\"glIsEnabled\", userptr);\n    glIsList = (PFNGLISLISTPROC) load(\"glIsList\", userptr);\n    glLightModelf = (PFNGLLIGHTMODELFPROC) load(\"glLightModelf\", userptr);\n    glLightModelfv = (PFNGLLIGHTMODELFVPROC) load(\"glLightModelfv\", userptr);\n    glLightModeli = (PFNGLLIGHTMODELIPROC) load(\"glLightModeli\", userptr);\n    glLightModeliv = (PFNGLLIGHTMODELIVPROC) load(\"glLightModeliv\", userptr);\n    glLightf = (PFNGLLIGHTFPROC) load(\"glLightf\", userptr);\n    glLightfv = (PFNGLLIGHTFVPROC) load(\"glLightfv\", userptr);\n    glLighti = (PFNGLLIGHTIPROC) load(\"glLighti\", userptr);\n    glLightiv = (PFNGLLIGHTIVPROC) load(\"glLightiv\", userptr);\n    glLineStipple = (PFNGLLINESTIPPLEPROC) load(\"glLineStipple\", userptr);\n    glLineWidth = (PFNGLLINEWIDTHPROC) load(\"glLineWidth\", userptr);\n    glListBase = (PFNGLLISTBASEPROC) load(\"glListBase\", userptr);\n    glLoadIdentity = (PFNGLLOADIDENTITYPROC) load(\"glLoadIdentity\", userptr);\n    glLoadMatrixd = (PFNGLLOADMATRIXDPROC) load(\"glLoadMatrixd\", userptr);\n    glLoadMatrixf = (PFNGLLOADMATRIXFPROC) load(\"glLoadMatrixf\", userptr);\n    glLoadName = (PFNGLLOADNAMEPROC) load(\"glLoadName\", userptr);\n    glLogicOp = (PFNGLLOGICOPPROC) load(\"glLogicOp\", userptr);\n    glMap1d = (PFNGLMAP1DPROC) load(\"glMap1d\", userptr);\n    glMap1f = (PFNGLMAP1FPROC) load(\"glMap1f\", userptr);\n    glMap2d = (PFNGLMAP2DPROC) load(\"glMap2d\", userptr);\n    glMap2f = (PFNGLMAP2FPROC) load(\"glMap2f\", userptr);\n    glMapGrid1d = (PFNGLMAPGRID1DPROC) load(\"glMapGrid1d\", userptr);\n    glMapGrid1f = (PFNGLMAPGRID1FPROC) load(\"glMapGrid1f\", userptr);\n    glMapGrid2d = (PFNGLMAPGRID2DPROC) load(\"glMapGrid2d\", userptr);\n    glMapGrid2f = (PFNGLMAPGRID2FPROC) load(\"glMapGrid2f\", userptr);\n    glMaterialf = (PFNGLMATERIALFPROC) load(\"glMaterialf\", userptr);\n    glMaterialfv = (PFNGLMATERIALFVPROC) load(\"glMaterialfv\", userptr);\n    glMateriali = (PFNGLMATERIALIPROC) load(\"glMateriali\", userptr);\n    glMaterialiv = (PFNGLMATERIALIVPROC) load(\"glMaterialiv\", userptr);\n    glMatrixMode = (PFNGLMATRIXMODEPROC) load(\"glMatrixMode\", userptr);\n    glMultMatrixd = (PFNGLMULTMATRIXDPROC) load(\"glMultMatrixd\", userptr);\n    glMultMatrixf = (PFNGLMULTMATRIXFPROC) load(\"glMultMatrixf\", userptr);\n    glNewList = (PFNGLNEWLISTPROC) load(\"glNewList\", userptr);\n    glNormal3b = (PFNGLNORMAL3BPROC) load(\"glNormal3b\", userptr);\n    glNormal3bv = (PFNGLNORMAL3BVPROC) load(\"glNormal3bv\", userptr);\n    glNormal3d = (PFNGLNORMAL3DPROC) load(\"glNormal3d\", userptr);\n    glNormal3dv = (PFNGLNORMAL3DVPROC) load(\"glNormal3dv\", userptr);\n    glNormal3f = (PFNGLNORMAL3FPROC) load(\"glNormal3f\", userptr);\n    glNormal3fv = (PFNGLNORMAL3FVPROC) load(\"glNormal3fv\", userptr);\n    glNormal3i = (PFNGLNORMAL3IPROC) load(\"glNormal3i\", userptr);\n    glNormal3iv = (PFNGLNORMAL3IVPROC) load(\"glNormal3iv\", userptr);\n    glNormal3s = (PFNGLNORMAL3SPROC) load(\"glNormal3s\", userptr);\n    glNormal3sv = (PFNGLNORMAL3SVPROC) load(\"glNormal3sv\", userptr);\n    glOrtho = (PFNGLORTHOPROC) load(\"glOrtho\", userptr);\n    glPassThrough = (PFNGLPASSTHROUGHPROC) load(\"glPassThrough\", userptr);\n    glPixelMapfv = (PFNGLPIXELMAPFVPROC) load(\"glPixelMapfv\", userptr);\n    glPixelMapuiv = (PFNGLPIXELMAPUIVPROC) load(\"glPixelMapuiv\", userptr);\n    glPixelMapusv = (PFNGLPIXELMAPUSVPROC) load(\"glPixelMapusv\", userptr);\n    glPixelStoref = (PFNGLPIXELSTOREFPROC) load(\"glPixelStoref\", userptr);\n    glPixelStorei = (PFNGLPIXELSTOREIPROC) load(\"glPixelStorei\", userptr);\n    glPixelTransferf = (PFNGLPIXELTRANSFERFPROC) load(\"glPixelTransferf\", userptr);\n    glPixelTransferi = (PFNGLPIXELTRANSFERIPROC) load(\"glPixelTransferi\", userptr);\n    glPixelZoom = (PFNGLPIXELZOOMPROC) load(\"glPixelZoom\", userptr);\n    glPointSize = (PFNGLPOINTSIZEPROC) load(\"glPointSize\", userptr);\n    glPolygonMode = (PFNGLPOLYGONMODEPROC) load(\"glPolygonMode\", userptr);\n    glPolygonStipple = (PFNGLPOLYGONSTIPPLEPROC) load(\"glPolygonStipple\", userptr);\n    glPopAttrib = (PFNGLPOPATTRIBPROC) load(\"glPopAttrib\", userptr);\n    glPopMatrix = (PFNGLPOPMATRIXPROC) load(\"glPopMatrix\", userptr);\n    glPopName = (PFNGLPOPNAMEPROC) load(\"glPopName\", userptr);\n    glPushAttrib = (PFNGLPUSHATTRIBPROC) load(\"glPushAttrib\", userptr);\n    glPushMatrix = (PFNGLPUSHMATRIXPROC) load(\"glPushMatrix\", userptr);\n    glPushName = (PFNGLPUSHNAMEPROC) load(\"glPushName\", userptr);\n    glRasterPos2d = (PFNGLRASTERPOS2DPROC) load(\"glRasterPos2d\", userptr);\n    glRasterPos2dv = (PFNGLRASTERPOS2DVPROC) load(\"glRasterPos2dv\", userptr);\n    glRasterPos2f = (PFNGLRASTERPOS2FPROC) load(\"glRasterPos2f\", userptr);\n    glRasterPos2fv = (PFNGLRASTERPOS2FVPROC) load(\"glRasterPos2fv\", userptr);\n    glRasterPos2i = (PFNGLRASTERPOS2IPROC) load(\"glRasterPos2i\", userptr);\n    glRasterPos2iv = (PFNGLRASTERPOS2IVPROC) load(\"glRasterPos2iv\", userptr);\n    glRasterPos2s = (PFNGLRASTERPOS2SPROC) load(\"glRasterPos2s\", userptr);\n    glRasterPos2sv = (PFNGLRASTERPOS2SVPROC) load(\"glRasterPos2sv\", userptr);\n    glRasterPos3d = (PFNGLRASTERPOS3DPROC) load(\"glRasterPos3d\", userptr);\n    glRasterPos3dv = (PFNGLRASTERPOS3DVPROC) load(\"glRasterPos3dv\", userptr);\n    glRasterPos3f = (PFNGLRASTERPOS3FPROC) load(\"glRasterPos3f\", userptr);\n    glRasterPos3fv = (PFNGLRASTERPOS3FVPROC) load(\"glRasterPos3fv\", userptr);\n    glRasterPos3i = (PFNGLRASTERPOS3IPROC) load(\"glRasterPos3i\", userptr);\n    glRasterPos3iv = (PFNGLRASTERPOS3IVPROC) load(\"glRasterPos3iv\", userptr);\n    glRasterPos3s = (PFNGLRASTERPOS3SPROC) load(\"glRasterPos3s\", userptr);\n    glRasterPos3sv = (PFNGLRASTERPOS3SVPROC) load(\"glRasterPos3sv\", userptr);\n    glRasterPos4d = (PFNGLRASTERPOS4DPROC) load(\"glRasterPos4d\", userptr);\n    glRasterPos4dv = (PFNGLRASTERPOS4DVPROC) load(\"glRasterPos4dv\", userptr);\n    glRasterPos4f = (PFNGLRASTERPOS4FPROC) load(\"glRasterPos4f\", userptr);\n    glRasterPos4fv = (PFNGLRASTERPOS4FVPROC) load(\"glRasterPos4fv\", userptr);\n    glRasterPos4i = (PFNGLRASTERPOS4IPROC) load(\"glRasterPos4i\", userptr);\n    glRasterPos4iv = (PFNGLRASTERPOS4IVPROC) load(\"glRasterPos4iv\", userptr);\n    glRasterPos4s = (PFNGLRASTERPOS4SPROC) load(\"glRasterPos4s\", userptr);\n    glRasterPos4sv = (PFNGLRASTERPOS4SVPROC) load(\"glRasterPos4sv\", userptr);\n    glReadBuffer = (PFNGLREADBUFFERPROC) load(\"glReadBuffer\", userptr);\n    glReadPixels = (PFNGLREADPIXELSPROC) load(\"glReadPixels\", userptr);\n    glRectd = (PFNGLRECTDPROC) load(\"glRectd\", userptr);\n    glRectdv = (PFNGLRECTDVPROC) load(\"glRectdv\", userptr);\n    glRectf = (PFNGLRECTFPROC) load(\"glRectf\", userptr);\n    glRectfv = (PFNGLRECTFVPROC) load(\"glRectfv\", userptr);\n    glRecti = (PFNGLRECTIPROC) load(\"glRecti\", userptr);\n    glRectiv = (PFNGLRECTIVPROC) load(\"glRectiv\", userptr);\n    glRects = (PFNGLRECTSPROC) load(\"glRects\", userptr);\n    glRectsv = (PFNGLRECTSVPROC) load(\"glRectsv\", userptr);\n    glRenderMode = (PFNGLRENDERMODEPROC) load(\"glRenderMode\", userptr);\n    glRotated = (PFNGLROTATEDPROC) load(\"glRotated\", userptr);\n    glRotatef = (PFNGLROTATEFPROC) load(\"glRotatef\", userptr);\n    glScaled = (PFNGLSCALEDPROC) load(\"glScaled\", userptr);\n    glScalef = (PFNGLSCALEFPROC) load(\"glScalef\", userptr);\n    glScissor = (PFNGLSCISSORPROC) load(\"glScissor\", userptr);\n    glSelectBuffer = (PFNGLSELECTBUFFERPROC) load(\"glSelectBuffer\", userptr);\n    glShadeModel = (PFNGLSHADEMODELPROC) load(\"glShadeModel\", userptr);\n    glStencilFunc = (PFNGLSTENCILFUNCPROC) load(\"glStencilFunc\", userptr);\n    glStencilMask = (PFNGLSTENCILMASKPROC) load(\"glStencilMask\", userptr);\n    glStencilOp = (PFNGLSTENCILOPPROC) load(\"glStencilOp\", userptr);\n    glTexCoord1d = (PFNGLTEXCOORD1DPROC) load(\"glTexCoord1d\", userptr);\n    glTexCoord1dv = (PFNGLTEXCOORD1DVPROC) load(\"glTexCoord1dv\", userptr);\n    glTexCoord1f = (PFNGLTEXCOORD1FPROC) load(\"glTexCoord1f\", userptr);\n    glTexCoord1fv = (PFNGLTEXCOORD1FVPROC) load(\"glTexCoord1fv\", userptr);\n    glTexCoord1i = (PFNGLTEXCOORD1IPROC) load(\"glTexCoord1i\", userptr);\n    glTexCoord1iv = (PFNGLTEXCOORD1IVPROC) load(\"glTexCoord1iv\", userptr);\n    glTexCoord1s = (PFNGLTEXCOORD1SPROC) load(\"glTexCoord1s\", userptr);\n    glTexCoord1sv = (PFNGLTEXCOORD1SVPROC) load(\"glTexCoord1sv\", userptr);\n    glTexCoord2d = (PFNGLTEXCOORD2DPROC) load(\"glTexCoord2d\", userptr);\n    glTexCoord2dv = (PFNGLTEXCOORD2DVPROC) load(\"glTexCoord2dv\", userptr);\n    glTexCoord2f = (PFNGLTEXCOORD2FPROC) load(\"glTexCoord2f\", userptr);\n    glTexCoord2fv = (PFNGLTEXCOORD2FVPROC) load(\"glTexCoord2fv\", userptr);\n    glTexCoord2i = (PFNGLTEXCOORD2IPROC) load(\"glTexCoord2i\", userptr);\n    glTexCoord2iv = (PFNGLTEXCOORD2IVPROC) load(\"glTexCoord2iv\", userptr);\n    glTexCoord2s = (PFNGLTEXCOORD2SPROC) load(\"glTexCoord2s\", userptr);\n    glTexCoord2sv = (PFNGLTEXCOORD2SVPROC) load(\"glTexCoord2sv\", userptr);\n    glTexCoord3d = (PFNGLTEXCOORD3DPROC) load(\"glTexCoord3d\", userptr);\n    glTexCoord3dv = (PFNGLTEXCOORD3DVPROC) load(\"glTexCoord3dv\", userptr);\n    glTexCoord3f = (PFNGLTEXCOORD3FPROC) load(\"glTexCoord3f\", userptr);\n    glTexCoord3fv = (PFNGLTEXCOORD3FVPROC) load(\"glTexCoord3fv\", userptr);\n    glTexCoord3i = (PFNGLTEXCOORD3IPROC) load(\"glTexCoord3i\", userptr);\n    glTexCoord3iv = (PFNGLTEXCOORD3IVPROC) load(\"glTexCoord3iv\", userptr);\n    glTexCoord3s = (PFNGLTEXCOORD3SPROC) load(\"glTexCoord3s\", userptr);\n    glTexCoord3sv = (PFNGLTEXCOORD3SVPROC) load(\"glTexCoord3sv\", userptr);\n    glTexCoord4d = (PFNGLTEXCOORD4DPROC) load(\"glTexCoord4d\", userptr);\n    glTexCoord4dv = (PFNGLTEXCOORD4DVPROC) load(\"glTexCoord4dv\", userptr);\n    glTexCoord4f = (PFNGLTEXCOORD4FPROC) load(\"glTexCoord4f\", userptr);\n    glTexCoord4fv = (PFNGLTEXCOORD4FVPROC) load(\"glTexCoord4fv\", userptr);\n    glTexCoord4i = (PFNGLTEXCOORD4IPROC) load(\"glTexCoord4i\", userptr);\n    glTexCoord4iv = (PFNGLTEXCOORD4IVPROC) load(\"glTexCoord4iv\", userptr);\n    glTexCoord4s = (PFNGLTEXCOORD4SPROC) load(\"glTexCoord4s\", userptr);\n    glTexCoord4sv = (PFNGLTEXCOORD4SVPROC) load(\"glTexCoord4sv\", userptr);\n    glTexEnvf = (PFNGLTEXENVFPROC) load(\"glTexEnvf\", userptr);\n    glTexEnvfv = (PFNGLTEXENVFVPROC) load(\"glTexEnvfv\", userptr);\n    glTexEnvi = (PFNGLTEXENVIPROC) load(\"glTexEnvi\", userptr);\n    glTexEnviv = (PFNGLTEXENVIVPROC) load(\"glTexEnviv\", userptr);\n    glTexGend = (PFNGLTEXGENDPROC) load(\"glTexGend\", userptr);\n    glTexGendv = (PFNGLTEXGENDVPROC) load(\"glTexGendv\", userptr);\n    glTexGenf = (PFNGLTEXGENFPROC) load(\"glTexGenf\", userptr);\n    glTexGenfv = (PFNGLTEXGENFVPROC) load(\"glTexGenfv\", userptr);\n    glTexGeni = (PFNGLTEXGENIPROC) load(\"glTexGeni\", userptr);\n    glTexGeniv = (PFNGLTEXGENIVPROC) load(\"glTexGeniv\", userptr);\n    glTexImage1D = (PFNGLTEXIMAGE1DPROC) load(\"glTexImage1D\", userptr);\n    glTexImage2D = (PFNGLTEXIMAGE2DPROC) load(\"glTexImage2D\", userptr);\n    glTexParameterf = (PFNGLTEXPARAMETERFPROC) load(\"glTexParameterf\", userptr);\n    glTexParameterfv = (PFNGLTEXPARAMETERFVPROC) load(\"glTexParameterfv\", userptr);\n    glTexParameteri = (PFNGLTEXPARAMETERIPROC) load(\"glTexParameteri\", userptr);\n    glTexParameteriv = (PFNGLTEXPARAMETERIVPROC) load(\"glTexParameteriv\", userptr);\n    glTranslated = (PFNGLTRANSLATEDPROC) load(\"glTranslated\", userptr);\n    glTranslatef = (PFNGLTRANSLATEFPROC) load(\"glTranslatef\", userptr);\n    glVertex2d = (PFNGLVERTEX2DPROC) load(\"glVertex2d\", userptr);\n    glVertex2dv = (PFNGLVERTEX2DVPROC) load(\"glVertex2dv\", userptr);\n    glVertex2f = (PFNGLVERTEX2FPROC) load(\"glVertex2f\", userptr);\n    glVertex2fv = (PFNGLVERTEX2FVPROC) load(\"glVertex2fv\", userptr);\n    glVertex2i = (PFNGLVERTEX2IPROC) load(\"glVertex2i\", userptr);\n    glVertex2iv = (PFNGLVERTEX2IVPROC) load(\"glVertex2iv\", userptr);\n    glVertex2s = (PFNGLVERTEX2SPROC) load(\"glVertex2s\", userptr);\n    glVertex2sv = (PFNGLVERTEX2SVPROC) load(\"glVertex2sv\", userptr);\n    glVertex3d = (PFNGLVERTEX3DPROC) load(\"glVertex3d\", userptr);\n    glVertex3dv = (PFNGLVERTEX3DVPROC) load(\"glVertex3dv\", userptr);\n    glVertex3f = (PFNGLVERTEX3FPROC) load(\"glVertex3f\", userptr);\n    glVertex3fv = (PFNGLVERTEX3FVPROC) load(\"glVertex3fv\", userptr);\n    glVertex3i = (PFNGLVERTEX3IPROC) load(\"glVertex3i\", userptr);\n    glVertex3iv = (PFNGLVERTEX3IVPROC) load(\"glVertex3iv\", userptr);\n    glVertex3s = (PFNGLVERTEX3SPROC) load(\"glVertex3s\", userptr);\n    glVertex3sv = (PFNGLVERTEX3SVPROC) load(\"glVertex3sv\", userptr);\n    glVertex4d = (PFNGLVERTEX4DPROC) load(\"glVertex4d\", userptr);\n    glVertex4dv = (PFNGLVERTEX4DVPROC) load(\"glVertex4dv\", userptr);\n    glVertex4f = (PFNGLVERTEX4FPROC) load(\"glVertex4f\", userptr);\n    glVertex4fv = (PFNGLVERTEX4FVPROC) load(\"glVertex4fv\", userptr);\n    glVertex4i = (PFNGLVERTEX4IPROC) load(\"glVertex4i\", userptr);\n    glVertex4iv = (PFNGLVERTEX4IVPROC) load(\"glVertex4iv\", userptr);\n    glVertex4s = (PFNGLVERTEX4SPROC) load(\"glVertex4s\", userptr);\n    glVertex4sv = (PFNGLVERTEX4SVPROC) load(\"glVertex4sv\", userptr);\n    glViewport = (PFNGLVIEWPORTPROC) load(\"glViewport\", userptr);\n}\nstatic void glad_gl_load_GL_VERSION_1_1( GLADuserptrloadfunc load, void* userptr) {\n    if(!GLAD_GL_VERSION_1_1) return;\n    glAreTexturesResident = (PFNGLARETEXTURESRESIDENTPROC) load(\"glAreTexturesResident\", userptr);\n    glArrayElement = (PFNGLARRAYELEMENTPROC) load(\"glArrayElement\", userptr);\n    glBindTexture = (PFNGLBINDTEXTUREPROC) load(\"glBindTexture\", userptr);\n    glColorPointer = (PFNGLCOLORPOINTERPROC) load(\"glColorPointer\", userptr);\n    glCopyTexImage1D = (PFNGLCOPYTEXIMAGE1DPROC) load(\"glCopyTexImage1D\", userptr);\n    glCopyTexImage2D = (PFNGLCOPYTEXIMAGE2DPROC) load(\"glCopyTexImage2D\", userptr);\n    glCopyTexSubImage1D = (PFNGLCOPYTEXSUBIMAGE1DPROC) load(\"glCopyTexSubImage1D\", userptr);\n    glCopyTexSubImage2D = (PFNGLCOPYTEXSUBIMAGE2DPROC) load(\"glCopyTexSubImage2D\", userptr);\n    glDeleteTextures = (PFNGLDELETETEXTURESPROC) load(\"glDeleteTextures\", userptr);\n    glDisableClientState = (PFNGLDISABLECLIENTSTATEPROC) load(\"glDisableClientState\", userptr);\n    glDrawArrays = (PFNGLDRAWARRAYSPROC) load(\"glDrawArrays\", userptr);\n    glDrawElements = (PFNGLDRAWELEMENTSPROC) load(\"glDrawElements\", userptr);\n    glEdgeFlagPointer = (PFNGLEDGEFLAGPOINTERPROC) load(\"glEdgeFlagPointer\", userptr);\n    glEnableClientState = (PFNGLENABLECLIENTSTATEPROC) load(\"glEnableClientState\", userptr);\n    glGenTextures = (PFNGLGENTEXTURESPROC) load(\"glGenTextures\", userptr);\n    glGetPointerv = (PFNGLGETPOINTERVPROC) load(\"glGetPointerv\", userptr);\n    glIndexPointer = (PFNGLINDEXPOINTERPROC) load(\"glIndexPointer\", userptr);\n    glIndexub = (PFNGLINDEXUBPROC) load(\"glIndexub\", userptr);\n    glIndexubv = (PFNGLINDEXUBVPROC) load(\"glIndexubv\", userptr);\n    glInterleavedArrays = (PFNGLINTERLEAVEDARRAYSPROC) load(\"glInterleavedArrays\", userptr);\n    glIsTexture = (PFNGLISTEXTUREPROC) load(\"glIsTexture\", userptr);\n    glNormalPointer = (PFNGLNORMALPOINTERPROC) load(\"glNormalPointer\", userptr);\n    glPolygonOffset = (PFNGLPOLYGONOFFSETPROC) load(\"glPolygonOffset\", userptr);\n    glPopClientAttrib = (PFNGLPOPCLIENTATTRIBPROC) load(\"glPopClientAttrib\", userptr);\n    glPrioritizeTextures = (PFNGLPRIORITIZETEXTURESPROC) load(\"glPrioritizeTextures\", userptr);\n    glPushClientAttrib = (PFNGLPUSHCLIENTATTRIBPROC) load(\"glPushClientAttrib\", userptr);\n    glTexCoordPointer = (PFNGLTEXCOORDPOINTERPROC) load(\"glTexCoordPointer\", userptr);\n    glTexSubImage1D = (PFNGLTEXSUBIMAGE1DPROC) load(\"glTexSubImage1D\", userptr);\n    glTexSubImage2D = (PFNGLTEXSUBIMAGE2DPROC) load(\"glTexSubImage2D\", userptr);\n    glVertexPointer = (PFNGLVERTEXPOINTERPROC) load(\"glVertexPointer\", userptr);\n}\nstatic void glad_gl_load_GL_VERSION_1_2( GLADuserptrloadfunc load, void* userptr) {\n    if(!GLAD_GL_VERSION_1_2) return;\n    glCopyTexSubImage3D = (PFNGLCOPYTEXSUBIMAGE3DPROC) load(\"glCopyTexSubImage3D\", userptr);\n    glDrawRangeElements = (PFNGLDRAWRANGEELEMENTSPROC) load(\"glDrawRangeElements\", userptr);\n    glTexImage3D = (PFNGLTEXIMAGE3DPROC) load(\"glTexImage3D\", userptr);\n    glTexSubImage3D = (PFNGLTEXSUBIMAGE3DPROC) load(\"glTexSubImage3D\", userptr);\n}\nstatic void glad_gl_load_GL_VERSION_1_3( GLADuserptrloadfunc load, void* userptr) {\n    if(!GLAD_GL_VERSION_1_3) return;\n    glActiveTexture = (PFNGLACTIVETEXTUREPROC) load(\"glActiveTexture\", userptr);\n    glClientActiveTexture = (PFNGLCLIENTACTIVETEXTUREPROC) load(\"glClientActiveTexture\", userptr);\n    glCompressedTexImage1D = (PFNGLCOMPRESSEDTEXIMAGE1DPROC) load(\"glCompressedTexImage1D\", userptr);\n    glCompressedTexImage2D = (PFNGLCOMPRESSEDTEXIMAGE2DPROC) load(\"glCompressedTexImage2D\", userptr);\n    glCompressedTexImage3D = (PFNGLCOMPRESSEDTEXIMAGE3DPROC) load(\"glCompressedTexImage3D\", userptr);\n    glCompressedTexSubImage1D = (PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC) load(\"glCompressedTexSubImage1D\", userptr);\n    glCompressedTexSubImage2D = (PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) load(\"glCompressedTexSubImage2D\", userptr);\n    glCompressedTexSubImage3D = (PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC) load(\"glCompressedTexSubImage3D\", userptr);\n    glGetCompressedTexImage = (PFNGLGETCOMPRESSEDTEXIMAGEPROC) load(\"glGetCompressedTexImage\", userptr);\n    glLoadTransposeMatrixd = (PFNGLLOADTRANSPOSEMATRIXDPROC) load(\"glLoadTransposeMatrixd\", userptr);\n    glLoadTransposeMatrixf = (PFNGLLOADTRANSPOSEMATRIXFPROC) load(\"glLoadTransposeMatrixf\", userptr);\n    glMultTransposeMatrixd = (PFNGLMULTTRANSPOSEMATRIXDPROC) load(\"glMultTransposeMatrixd\", userptr);\n    glMultTransposeMatrixf = (PFNGLMULTTRANSPOSEMATRIXFPROC) load(\"glMultTransposeMatrixf\", userptr);\n    glMultiTexCoord1d = (PFNGLMULTITEXCOORD1DPROC) load(\"glMultiTexCoord1d\", userptr);\n    glMultiTexCoord1dv = (PFNGLMULTITEXCOORD1DVPROC) load(\"glMultiTexCoord1dv\", userptr);\n    glMultiTexCoord1f = (PFNGLMULTITEXCOORD1FPROC) load(\"glMultiTexCoord1f\", userptr);\n    glMultiTexCoord1fv = (PFNGLMULTITEXCOORD1FVPROC) load(\"glMultiTexCoord1fv\", userptr);\n    glMultiTexCoord1i = (PFNGLMULTITEXCOORD1IPROC) load(\"glMultiTexCoord1i\", userptr);\n    glMultiTexCoord1iv = (PFNGLMULTITEXCOORD1IVPROC) load(\"glMultiTexCoord1iv\", userptr);\n    glMultiTexCoord1s = (PFNGLMULTITEXCOORD1SPROC) load(\"glMultiTexCoord1s\", userptr);\n    glMultiTexCoord1sv = (PFNGLMULTITEXCOORD1SVPROC) load(\"glMultiTexCoord1sv\", userptr);\n    glMultiTexCoord2d = (PFNGLMULTITEXCOORD2DPROC) load(\"glMultiTexCoord2d\", userptr);\n    glMultiTexCoord2dv = (PFNGLMULTITEXCOORD2DVPROC) load(\"glMultiTexCoord2dv\", userptr);\n    glMultiTexCoord2f = (PFNGLMULTITEXCOORD2FPROC) load(\"glMultiTexCoord2f\", userptr);\n    glMultiTexCoord2fv = (PFNGLMULTITEXCOORD2FVPROC) load(\"glMultiTexCoord2fv\", userptr);\n    glMultiTexCoord2i = (PFNGLMULTITEXCOORD2IPROC) load(\"glMultiTexCoord2i\", userptr);\n    glMultiTexCoord2iv = (PFNGLMULTITEXCOORD2IVPROC) load(\"glMultiTexCoord2iv\", userptr);\n    glMultiTexCoord2s = (PFNGLMULTITEXCOORD2SPROC) load(\"glMultiTexCoord2s\", userptr);\n    glMultiTexCoord2sv = (PFNGLMULTITEXCOORD2SVPROC) load(\"glMultiTexCoord2sv\", userptr);\n    glMultiTexCoord3d = (PFNGLMULTITEXCOORD3DPROC) load(\"glMultiTexCoord3d\", userptr);\n    glMultiTexCoord3dv = (PFNGLMULTITEXCOORD3DVPROC) load(\"glMultiTexCoord3dv\", userptr);\n    glMultiTexCoord3f = (PFNGLMULTITEXCOORD3FPROC) load(\"glMultiTexCoord3f\", userptr);\n    glMultiTexCoord3fv = (PFNGLMULTITEXCOORD3FVPROC) load(\"glMultiTexCoord3fv\", userptr);\n    glMultiTexCoord3i = (PFNGLMULTITEXCOORD3IPROC) load(\"glMultiTexCoord3i\", userptr);\n    glMultiTexCoord3iv = (PFNGLMULTITEXCOORD3IVPROC) load(\"glMultiTexCoord3iv\", userptr);\n    glMultiTexCoord3s = (PFNGLMULTITEXCOORD3SPROC) load(\"glMultiTexCoord3s\", userptr);\n    glMultiTexCoord3sv = (PFNGLMULTITEXCOORD3SVPROC) load(\"glMultiTexCoord3sv\", userptr);\n    glMultiTexCoord4d = (PFNGLMULTITEXCOORD4DPROC) load(\"glMultiTexCoord4d\", userptr);\n    glMultiTexCoord4dv = (PFNGLMULTITEXCOORD4DVPROC) load(\"glMultiTexCoord4dv\", userptr);\n    glMultiTexCoord4f = (PFNGLMULTITEXCOORD4FPROC) load(\"glMultiTexCoord4f\", userptr);\n    glMultiTexCoord4fv = (PFNGLMULTITEXCOORD4FVPROC) load(\"glMultiTexCoord4fv\", userptr);\n    glMultiTexCoord4i = (PFNGLMULTITEXCOORD4IPROC) load(\"glMultiTexCoord4i\", userptr);\n    glMultiTexCoord4iv = (PFNGLMULTITEXCOORD4IVPROC) load(\"glMultiTexCoord4iv\", userptr);\n    glMultiTexCoord4s = (PFNGLMULTITEXCOORD4SPROC) load(\"glMultiTexCoord4s\", userptr);\n    glMultiTexCoord4sv = (PFNGLMULTITEXCOORD4SVPROC) load(\"glMultiTexCoord4sv\", userptr);\n    glSampleCoverage = (PFNGLSAMPLECOVERAGEPROC) load(\"glSampleCoverage\", userptr);\n}\nstatic void glad_gl_load_GL_VERSION_1_4( GLADuserptrloadfunc load, void* userptr) {\n    if(!GLAD_GL_VERSION_1_4) return;\n    glBlendColor = (PFNGLBLENDCOLORPROC) load(\"glBlendColor\", userptr);\n    glBlendEquation = (PFNGLBLENDEQUATIONPROC) load(\"glBlendEquation\", userptr);\n    glBlendFuncSeparate = (PFNGLBLENDFUNCSEPARATEPROC) load(\"glBlendFuncSeparate\", userptr);\n    glFogCoordPointer = (PFNGLFOGCOORDPOINTERPROC) load(\"glFogCoordPointer\", userptr);\n    glFogCoordd = (PFNGLFOGCOORDDPROC) load(\"glFogCoordd\", userptr);\n    glFogCoorddv = (PFNGLFOGCOORDDVPROC) load(\"glFogCoorddv\", userptr);\n    glFogCoordf = (PFNGLFOGCOORDFPROC) load(\"glFogCoordf\", userptr);\n    glFogCoordfv = (PFNGLFOGCOORDFVPROC) load(\"glFogCoordfv\", userptr);\n    glMultiDrawArrays = (PFNGLMULTIDRAWARRAYSPROC) load(\"glMultiDrawArrays\", userptr);\n    glMultiDrawElements = (PFNGLMULTIDRAWELEMENTSPROC) load(\"glMultiDrawElements\", userptr);\n    glPointParameterf = (PFNGLPOINTPARAMETERFPROC) load(\"glPointParameterf\", userptr);\n    glPointParameterfv = (PFNGLPOINTPARAMETERFVPROC) load(\"glPointParameterfv\", userptr);\n    glPointParameteri = (PFNGLPOINTPARAMETERIPROC) load(\"glPointParameteri\", userptr);\n    glPointParameteriv = (PFNGLPOINTPARAMETERIVPROC) load(\"glPointParameteriv\", userptr);\n    glSecondaryColor3b = (PFNGLSECONDARYCOLOR3BPROC) load(\"glSecondaryColor3b\", userptr);\n    glSecondaryColor3bv = (PFNGLSECONDARYCOLOR3BVPROC) load(\"glSecondaryColor3bv\", userptr);\n    glSecondaryColor3d = (PFNGLSECONDARYCOLOR3DPROC) load(\"glSecondaryColor3d\", userptr);\n    glSecondaryColor3dv = (PFNGLSECONDARYCOLOR3DVPROC) load(\"glSecondaryColor3dv\", userptr);\n    glSecondaryColor3f = (PFNGLSECONDARYCOLOR3FPROC) load(\"glSecondaryColor3f\", userptr);\n    glSecondaryColor3fv = (PFNGLSECONDARYCOLOR3FVPROC) load(\"glSecondaryColor3fv\", userptr);\n    glSecondaryColor3i = (PFNGLSECONDARYCOLOR3IPROC) load(\"glSecondaryColor3i\", userptr);\n    glSecondaryColor3iv = (PFNGLSECONDARYCOLOR3IVPROC) load(\"glSecondaryColor3iv\", userptr);\n    glSecondaryColor3s = (PFNGLSECONDARYCOLOR3SPROC) load(\"glSecondaryColor3s\", userptr);\n    glSecondaryColor3sv = (PFNGLSECONDARYCOLOR3SVPROC) load(\"glSecondaryColor3sv\", userptr);\n    glSecondaryColor3ub = (PFNGLSECONDARYCOLOR3UBPROC) load(\"glSecondaryColor3ub\", userptr);\n    glSecondaryColor3ubv = (PFNGLSECONDARYCOLOR3UBVPROC) load(\"glSecondaryColor3ubv\", userptr);\n    glSecondaryColor3ui = (PFNGLSECONDARYCOLOR3UIPROC) load(\"glSecondaryColor3ui\", userptr);\n    glSecondaryColor3uiv = (PFNGLSECONDARYCOLOR3UIVPROC) load(\"glSecondaryColor3uiv\", userptr);\n    glSecondaryColor3us = (PFNGLSECONDARYCOLOR3USPROC) load(\"glSecondaryColor3us\", userptr);\n    glSecondaryColor3usv = (PFNGLSECONDARYCOLOR3USVPROC) load(\"glSecondaryColor3usv\", userptr);\n    glSecondaryColorPointer = (PFNGLSECONDARYCOLORPOINTERPROC) load(\"glSecondaryColorPointer\", userptr);\n    glWindowPos2d = (PFNGLWINDOWPOS2DPROC) load(\"glWindowPos2d\", userptr);\n    glWindowPos2dv = (PFNGLWINDOWPOS2DVPROC) load(\"glWindowPos2dv\", userptr);\n    glWindowPos2f = (PFNGLWINDOWPOS2FPROC) load(\"glWindowPos2f\", userptr);\n    glWindowPos2fv = (PFNGLWINDOWPOS2FVPROC) load(\"glWindowPos2fv\", userptr);\n    glWindowPos2i = (PFNGLWINDOWPOS2IPROC) load(\"glWindowPos2i\", userptr);\n    glWindowPos2iv = (PFNGLWINDOWPOS2IVPROC) load(\"glWindowPos2iv\", userptr);\n    glWindowPos2s = (PFNGLWINDOWPOS2SPROC) load(\"glWindowPos2s\", userptr);\n    glWindowPos2sv = (PFNGLWINDOWPOS2SVPROC) load(\"glWindowPos2sv\", userptr);\n    glWindowPos3d = (PFNGLWINDOWPOS3DPROC) load(\"glWindowPos3d\", userptr);\n    glWindowPos3dv = (PFNGLWINDOWPOS3DVPROC) load(\"glWindowPos3dv\", userptr);\n    glWindowPos3f = (PFNGLWINDOWPOS3FPROC) load(\"glWindowPos3f\", userptr);\n    glWindowPos3fv = (PFNGLWINDOWPOS3FVPROC) load(\"glWindowPos3fv\", userptr);\n    glWindowPos3i = (PFNGLWINDOWPOS3IPROC) load(\"glWindowPos3i\", userptr);\n    glWindowPos3iv = (PFNGLWINDOWPOS3IVPROC) load(\"glWindowPos3iv\", userptr);\n    glWindowPos3s = (PFNGLWINDOWPOS3SPROC) load(\"glWindowPos3s\", userptr);\n    glWindowPos3sv = (PFNGLWINDOWPOS3SVPROC) load(\"glWindowPos3sv\", userptr);\n}\nstatic void glad_gl_load_GL_VERSION_1_5( GLADuserptrloadfunc load, void* userptr) {\n    if(!GLAD_GL_VERSION_1_5) return;\n    glBeginQuery = (PFNGLBEGINQUERYPROC) load(\"glBeginQuery\", userptr);\n    glBindBuffer = (PFNGLBINDBUFFERPROC) load(\"glBindBuffer\", userptr);\n    glBufferData = (PFNGLBUFFERDATAPROC) load(\"glBufferData\", userptr);\n    glBufferSubData = (PFNGLBUFFERSUBDATAPROC) load(\"glBufferSubData\", userptr);\n    glDeleteBuffers = (PFNGLDELETEBUFFERSPROC) load(\"glDeleteBuffers\", userptr);\n    glDeleteQueries = (PFNGLDELETEQUERIESPROC) load(\"glDeleteQueries\", userptr);\n    glEndQuery = (PFNGLENDQUERYPROC) load(\"glEndQuery\", userptr);\n    glGenBuffers = (PFNGLGENBUFFERSPROC) load(\"glGenBuffers\", userptr);\n    glGenQueries = (PFNGLGENQUERIESPROC) load(\"glGenQueries\", userptr);\n    glGetBufferParameteriv = (PFNGLGETBUFFERPARAMETERIVPROC) load(\"glGetBufferParameteriv\", userptr);\n    glGetBufferPointerv = (PFNGLGETBUFFERPOINTERVPROC) load(\"glGetBufferPointerv\", userptr);\n    glGetBufferSubData = (PFNGLGETBUFFERSUBDATAPROC) load(\"glGetBufferSubData\", userptr);\n    glGetQueryObjectiv = (PFNGLGETQUERYOBJECTIVPROC) load(\"glGetQueryObjectiv\", userptr);\n    glGetQueryObjectuiv = (PFNGLGETQUERYOBJECTUIVPROC) load(\"glGetQueryObjectuiv\", userptr);\n    glGetQueryiv = (PFNGLGETQUERYIVPROC) load(\"glGetQueryiv\", userptr);\n    glIsBuffer = (PFNGLISBUFFERPROC) load(\"glIsBuffer\", userptr);\n    glIsQuery = (PFNGLISQUERYPROC) load(\"glIsQuery\", userptr);\n    glMapBuffer = (PFNGLMAPBUFFERPROC) load(\"glMapBuffer\", userptr);\n    glUnmapBuffer = (PFNGLUNMAPBUFFERPROC) load(\"glUnmapBuffer\", userptr);\n}\nstatic void glad_gl_load_GL_VERSION_2_0( GLADuserptrloadfunc load, void* userptr) {\n    if(!GLAD_GL_VERSION_2_0) return;\n    glAttachShader = (PFNGLATTACHSHADERPROC) load(\"glAttachShader\", userptr);\n    glBindAttribLocation = (PFNGLBINDATTRIBLOCATIONPROC) load(\"glBindAttribLocation\", userptr);\n    glBlendEquationSeparate = (PFNGLBLENDEQUATIONSEPARATEPROC) load(\"glBlendEquationSeparate\", userptr);\n    glCompileShader = (PFNGLCOMPILESHADERPROC) load(\"glCompileShader\", userptr);\n    glCreateProgram = (PFNGLCREATEPROGRAMPROC) load(\"glCreateProgram\", userptr);\n    glCreateShader = (PFNGLCREATESHADERPROC) load(\"glCreateShader\", userptr);\n    glDeleteProgram = (PFNGLDELETEPROGRAMPROC) load(\"glDeleteProgram\", userptr);\n    glDeleteShader = (PFNGLDELETESHADERPROC) load(\"glDeleteShader\", userptr);\n    glDetachShader = (PFNGLDETACHSHADERPROC) load(\"glDetachShader\", userptr);\n    glDisableVertexAttribArray = (PFNGLDISABLEVERTEXATTRIBARRAYPROC) load(\"glDisableVertexAttribArray\", userptr);\n    glDrawBuffers = (PFNGLDRAWBUFFERSPROC) load(\"glDrawBuffers\", userptr);\n    glEnableVertexAttribArray = (PFNGLENABLEVERTEXATTRIBARRAYPROC) load(\"glEnableVertexAttribArray\", userptr);\n    glGetActiveAttrib = (PFNGLGETACTIVEATTRIBPROC) load(\"glGetActiveAttrib\", userptr);\n    glGetActiveUniform = (PFNGLGETACTIVEUNIFORMPROC) load(\"glGetActiveUniform\", userptr);\n    glGetAttachedShaders = (PFNGLGETATTACHEDSHADERSPROC) load(\"glGetAttachedShaders\", userptr);\n    glGetAttribLocation = (PFNGLGETATTRIBLOCATIONPROC) load(\"glGetAttribLocation\", userptr);\n    glGetProgramInfoLog = (PFNGLGETPROGRAMINFOLOGPROC) load(\"glGetProgramInfoLog\", userptr);\n    glGetProgramiv = (PFNGLGETPROGRAMIVPROC) load(\"glGetProgramiv\", userptr);\n    glGetShaderInfoLog = (PFNGLGETSHADERINFOLOGPROC) load(\"glGetShaderInfoLog\", userptr);\n    glGetShaderSource = (PFNGLGETSHADERSOURCEPROC) load(\"glGetShaderSource\", userptr);\n    glGetShaderiv = (PFNGLGETSHADERIVPROC) load(\"glGetShaderiv\", userptr);\n    glGetUniformLocation = (PFNGLGETUNIFORMLOCATIONPROC) load(\"glGetUniformLocation\", userptr);\n    glGetUniformfv = (PFNGLGETUNIFORMFVPROC) load(\"glGetUniformfv\", userptr);\n    glGetUniformiv = (PFNGLGETUNIFORMIVPROC) load(\"glGetUniformiv\", userptr);\n    glGetVertexAttribPointerv = (PFNGLGETVERTEXATTRIBPOINTERVPROC) load(\"glGetVertexAttribPointerv\", userptr);\n    glGetVertexAttribdv = (PFNGLGETVERTEXATTRIBDVPROC) load(\"glGetVertexAttribdv\", userptr);\n    glGetVertexAttribfv = (PFNGLGETVERTEXATTRIBFVPROC) load(\"glGetVertexAttribfv\", userptr);\n    glGetVertexAttribiv = (PFNGLGETVERTEXATTRIBIVPROC) load(\"glGetVertexAttribiv\", userptr);\n    glIsProgram = (PFNGLISPROGRAMPROC) load(\"glIsProgram\", userptr);\n    glIsShader = (PFNGLISSHADERPROC) load(\"glIsShader\", userptr);\n    glLinkProgram = (PFNGLLINKPROGRAMPROC) load(\"glLinkProgram\", userptr);\n    glShaderSource = (PFNGLSHADERSOURCEPROC) load(\"glShaderSource\", userptr);\n    glStencilFuncSeparate = (PFNGLSTENCILFUNCSEPARATEPROC) load(\"glStencilFuncSeparate\", userptr);\n    glStencilMaskSeparate = (PFNGLSTENCILMASKSEPARATEPROC) load(\"glStencilMaskSeparate\", userptr);\n    glStencilOpSeparate = (PFNGLSTENCILOPSEPARATEPROC) load(\"glStencilOpSeparate\", userptr);\n    glUniform1f = (PFNGLUNIFORM1FPROC) load(\"glUniform1f\", userptr);\n    glUniform1fv = (PFNGLUNIFORM1FVPROC) load(\"glUniform1fv\", userptr);\n    glUniform1i = (PFNGLUNIFORM1IPROC) load(\"glUniform1i\", userptr);\n    glUniform1iv = (PFNGLUNIFORM1IVPROC) load(\"glUniform1iv\", userptr);\n    glUniform2f = (PFNGLUNIFORM2FPROC) load(\"glUniform2f\", userptr);\n    glUniform2fv = (PFNGLUNIFORM2FVPROC) load(\"glUniform2fv\", userptr);\n    glUniform2i = (PFNGLUNIFORM2IPROC) load(\"glUniform2i\", userptr);\n    glUniform2iv = (PFNGLUNIFORM2IVPROC) load(\"glUniform2iv\", userptr);\n    glUniform3f = (PFNGLUNIFORM3FPROC) load(\"glUniform3f\", userptr);\n    glUniform3fv = (PFNGLUNIFORM3FVPROC) load(\"glUniform3fv\", userptr);\n    glUniform3i = (PFNGLUNIFORM3IPROC) load(\"glUniform3i\", userptr);\n    glUniform3iv = (PFNGLUNIFORM3IVPROC) load(\"glUniform3iv\", userptr);\n    glUniform4f = (PFNGLUNIFORM4FPROC) load(\"glUniform4f\", userptr);\n    glUniform4fv = (PFNGLUNIFORM4FVPROC) load(\"glUniform4fv\", userptr);\n    glUniform4i = (PFNGLUNIFORM4IPROC) load(\"glUniform4i\", userptr);\n    glUniform4iv = (PFNGLUNIFORM4IVPROC) load(\"glUniform4iv\", userptr);\n    glUniformMatrix2fv = (PFNGLUNIFORMMATRIX2FVPROC) load(\"glUniformMatrix2fv\", userptr);\n    glUniformMatrix3fv = (PFNGLUNIFORMMATRIX3FVPROC) load(\"glUniformMatrix3fv\", userptr);\n    glUniformMatrix4fv = (PFNGLUNIFORMMATRIX4FVPROC) load(\"glUniformMatrix4fv\", userptr);\n    glUseProgram = (PFNGLUSEPROGRAMPROC) load(\"glUseProgram\", userptr);\n    glValidateProgram = (PFNGLVALIDATEPROGRAMPROC) load(\"glValidateProgram\", userptr);\n    glVertexAttrib1d = (PFNGLVERTEXATTRIB1DPROC) load(\"glVertexAttrib1d\", userptr);\n    glVertexAttrib1dv = (PFNGLVERTEXATTRIB1DVPROC) load(\"glVertexAttrib1dv\", userptr);\n    glVertexAttrib1f = (PFNGLVERTEXATTRIB1FPROC) load(\"glVertexAttrib1f\", userptr);\n    glVertexAttrib1fv = (PFNGLVERTEXATTRIB1FVPROC) load(\"glVertexAttrib1fv\", userptr);\n    glVertexAttrib1s = (PFNGLVERTEXATTRIB1SPROC) load(\"glVertexAttrib1s\", userptr);\n    glVertexAttrib1sv = (PFNGLVERTEXATTRIB1SVPROC) load(\"glVertexAttrib1sv\", userptr);\n    glVertexAttrib2d = (PFNGLVERTEXATTRIB2DPROC) load(\"glVertexAttrib2d\", userptr);\n    glVertexAttrib2dv = (PFNGLVERTEXATTRIB2DVPROC) load(\"glVertexAttrib2dv\", userptr);\n    glVertexAttrib2f = (PFNGLVERTEXATTRIB2FPROC) load(\"glVertexAttrib2f\", userptr);\n    glVertexAttrib2fv = (PFNGLVERTEXATTRIB2FVPROC) load(\"glVertexAttrib2fv\", userptr);\n    glVertexAttrib2s = (PFNGLVERTEXATTRIB2SPROC) load(\"glVertexAttrib2s\", userptr);\n    glVertexAttrib2sv = (PFNGLVERTEXATTRIB2SVPROC) load(\"glVertexAttrib2sv\", userptr);\n    glVertexAttrib3d = (PFNGLVERTEXATTRIB3DPROC) load(\"glVertexAttrib3d\", userptr);\n    glVertexAttrib3dv = (PFNGLVERTEXATTRIB3DVPROC) load(\"glVertexAttrib3dv\", userptr);\n    glVertexAttrib3f = (PFNGLVERTEXATTRIB3FPROC) load(\"glVertexAttrib3f\", userptr);\n    glVertexAttrib3fv = (PFNGLVERTEXATTRIB3FVPROC) load(\"glVertexAttrib3fv\", userptr);\n    glVertexAttrib3s = (PFNGLVERTEXATTRIB3SPROC) load(\"glVertexAttrib3s\", userptr);\n    glVertexAttrib3sv = (PFNGLVERTEXATTRIB3SVPROC) load(\"glVertexAttrib3sv\", userptr);\n    glVertexAttrib4Nbv = (PFNGLVERTEXATTRIB4NBVPROC) load(\"glVertexAttrib4Nbv\", userptr);\n    glVertexAttrib4Niv = (PFNGLVERTEXATTRIB4NIVPROC) load(\"glVertexAttrib4Niv\", userptr);\n    glVertexAttrib4Nsv = (PFNGLVERTEXATTRIB4NSVPROC) load(\"glVertexAttrib4Nsv\", userptr);\n    glVertexAttrib4Nub = (PFNGLVERTEXATTRIB4NUBPROC) load(\"glVertexAttrib4Nub\", userptr);\n    glVertexAttrib4Nubv = (PFNGLVERTEXATTRIB4NUBVPROC) load(\"glVertexAttrib4Nubv\", userptr);\n    glVertexAttrib4Nuiv = (PFNGLVERTEXATTRIB4NUIVPROC) load(\"glVertexAttrib4Nuiv\", userptr);\n    glVertexAttrib4Nusv = (PFNGLVERTEXATTRIB4NUSVPROC) load(\"glVertexAttrib4Nusv\", userptr);\n    glVertexAttrib4bv = (PFNGLVERTEXATTRIB4BVPROC) load(\"glVertexAttrib4bv\", userptr);\n    glVertexAttrib4d = (PFNGLVERTEXATTRIB4DPROC) load(\"glVertexAttrib4d\", userptr);\n    glVertexAttrib4dv = (PFNGLVERTEXATTRIB4DVPROC) load(\"glVertexAttrib4dv\", userptr);\n    glVertexAttrib4f = (PFNGLVERTEXATTRIB4FPROC) load(\"glVertexAttrib4f\", userptr);\n    glVertexAttrib4fv = (PFNGLVERTEXATTRIB4FVPROC) load(\"glVertexAttrib4fv\", userptr);\n    glVertexAttrib4iv = (PFNGLVERTEXATTRIB4IVPROC) load(\"glVertexAttrib4iv\", userptr);\n    glVertexAttrib4s = (PFNGLVERTEXATTRIB4SPROC) load(\"glVertexAttrib4s\", userptr);\n    glVertexAttrib4sv = (PFNGLVERTEXATTRIB4SVPROC) load(\"glVertexAttrib4sv\", userptr);\n    glVertexAttrib4ubv = (PFNGLVERTEXATTRIB4UBVPROC) load(\"glVertexAttrib4ubv\", userptr);\n    glVertexAttrib4uiv = (PFNGLVERTEXATTRIB4UIVPROC) load(\"glVertexAttrib4uiv\", userptr);\n    glVertexAttrib4usv = (PFNGLVERTEXATTRIB4USVPROC) load(\"glVertexAttrib4usv\", userptr);\n    glVertexAttribPointer = (PFNGLVERTEXATTRIBPOINTERPROC) load(\"glVertexAttribPointer\", userptr);\n}\nstatic void glad_gl_load_GL_VERSION_2_1( GLADuserptrloadfunc load, void* userptr) {\n    if(!GLAD_GL_VERSION_2_1) return;\n    glUniformMatrix2x3fv = (PFNGLUNIFORMMATRIX2X3FVPROC) load(\"glUniformMatrix2x3fv\", userptr);\n    glUniformMatrix2x4fv = (PFNGLUNIFORMMATRIX2X4FVPROC) load(\"glUniformMatrix2x4fv\", userptr);\n    glUniformMatrix3x2fv = (PFNGLUNIFORMMATRIX3X2FVPROC) load(\"glUniformMatrix3x2fv\", userptr);\n    glUniformMatrix3x4fv = (PFNGLUNIFORMMATRIX3X4FVPROC) load(\"glUniformMatrix3x4fv\", userptr);\n    glUniformMatrix4x2fv = (PFNGLUNIFORMMATRIX4X2FVPROC) load(\"glUniformMatrix4x2fv\", userptr);\n    glUniformMatrix4x3fv = (PFNGLUNIFORMMATRIX4X3FVPROC) load(\"glUniformMatrix4x3fv\", userptr);\n}\nstatic void glad_gl_load_GL_VERSION_3_0( GLADuserptrloadfunc load, void* userptr) {\n    if(!GLAD_GL_VERSION_3_0) return;\n    glBeginConditionalRender = (PFNGLBEGINCONDITIONALRENDERPROC) load(\"glBeginConditionalRender\", userptr);\n    glBeginTransformFeedback = (PFNGLBEGINTRANSFORMFEEDBACKPROC) load(\"glBeginTransformFeedback\", userptr);\n    glBindBufferBase = (PFNGLBINDBUFFERBASEPROC) load(\"glBindBufferBase\", userptr);\n    glBindBufferRange = (PFNGLBINDBUFFERRANGEPROC) load(\"glBindBufferRange\", userptr);\n    glBindFragDataLocation = (PFNGLBINDFRAGDATALOCATIONPROC) load(\"glBindFragDataLocation\", userptr);\n    glBindFramebuffer = (PFNGLBINDFRAMEBUFFERPROC) load(\"glBindFramebuffer\", userptr);\n    glBindRenderbuffer = (PFNGLBINDRENDERBUFFERPROC) load(\"glBindRenderbuffer\", userptr);\n    glBindVertexArray = (PFNGLBINDVERTEXARRAYPROC) load(\"glBindVertexArray\", userptr);\n    glBlitFramebuffer = (PFNGLBLITFRAMEBUFFERPROC) load(\"glBlitFramebuffer\", userptr);\n    glCheckFramebufferStatus = (PFNGLCHECKFRAMEBUFFERSTATUSPROC) load(\"glCheckFramebufferStatus\", userptr);\n    glClampColor = (PFNGLCLAMPCOLORPROC) load(\"glClampColor\", userptr);\n    glClearBufferfi = (PFNGLCLEARBUFFERFIPROC) load(\"glClearBufferfi\", userptr);\n    glClearBufferfv = (PFNGLCLEARBUFFERFVPROC) load(\"glClearBufferfv\", userptr);\n    glClearBufferiv = (PFNGLCLEARBUFFERIVPROC) load(\"glClearBufferiv\", userptr);\n    glClearBufferuiv = (PFNGLCLEARBUFFERUIVPROC) load(\"glClearBufferuiv\", userptr);\n    glColorMaski = (PFNGLCOLORMASKIPROC) load(\"glColorMaski\", userptr);\n    glDeleteFramebuffers = (PFNGLDELETEFRAMEBUFFERSPROC) load(\"glDeleteFramebuffers\", userptr);\n    glDeleteRenderbuffers = (PFNGLDELETERENDERBUFFERSPROC) load(\"glDeleteRenderbuffers\", userptr);\n    glDeleteVertexArrays = (PFNGLDELETEVERTEXARRAYSPROC) load(\"glDeleteVertexArrays\", userptr);\n    glDisablei = (PFNGLDISABLEIPROC) load(\"glDisablei\", userptr);\n    glEnablei = (PFNGLENABLEIPROC) load(\"glEnablei\", userptr);\n    glEndConditionalRender = (PFNGLENDCONDITIONALRENDERPROC) load(\"glEndConditionalRender\", userptr);\n    glEndTransformFeedback = (PFNGLENDTRANSFORMFEEDBACKPROC) load(\"glEndTransformFeedback\", userptr);\n    glFlushMappedBufferRange = (PFNGLFLUSHMAPPEDBUFFERRANGEPROC) load(\"glFlushMappedBufferRange\", userptr);\n    glFramebufferRenderbuffer = (PFNGLFRAMEBUFFERRENDERBUFFERPROC) load(\"glFramebufferRenderbuffer\", userptr);\n    glFramebufferTexture1D = (PFNGLFRAMEBUFFERTEXTURE1DPROC) load(\"glFramebufferTexture1D\", userptr);\n    glFramebufferTexture2D = (PFNGLFRAMEBUFFERTEXTURE2DPROC) load(\"glFramebufferTexture2D\", userptr);\n    glFramebufferTexture3D = (PFNGLFRAMEBUFFERTEXTURE3DPROC) load(\"glFramebufferTexture3D\", userptr);\n    glFramebufferTextureLayer = (PFNGLFRAMEBUFFERTEXTURELAYERPROC) load(\"glFramebufferTextureLayer\", userptr);\n    glGenFramebuffers = (PFNGLGENFRAMEBUFFERSPROC) load(\"glGenFramebuffers\", userptr);\n    glGenRenderbuffers = (PFNGLGENRENDERBUFFERSPROC) load(\"glGenRenderbuffers\", userptr);\n    glGenVertexArrays = (PFNGLGENVERTEXARRAYSPROC) load(\"glGenVertexArrays\", userptr);\n    glGenerateMipmap = (PFNGLGENERATEMIPMAPPROC) load(\"glGenerateMipmap\", userptr);\n    glGetBooleani_v = (PFNGLGETBOOLEANI_VPROC) load(\"glGetBooleani_v\", userptr);\n    glGetFragDataLocation = (PFNGLGETFRAGDATALOCATIONPROC) load(\"glGetFragDataLocation\", userptr);\n    glGetFramebufferAttachmentParameteriv = (PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC) load(\"glGetFramebufferAttachmentParameteriv\", userptr);\n    glGetIntegeri_v = (PFNGLGETINTEGERI_VPROC) load(\"glGetIntegeri_v\", userptr);\n    glGetRenderbufferParameteriv = (PFNGLGETRENDERBUFFERPARAMETERIVPROC) load(\"glGetRenderbufferParameteriv\", userptr);\n    glGetStringi = (PFNGLGETSTRINGIPROC) load(\"glGetStringi\", userptr);\n    glGetTexParameterIiv = (PFNGLGETTEXPARAMETERIIVPROC) load(\"glGetTexParameterIiv\", userptr);\n    glGetTexParameterIuiv = (PFNGLGETTEXPARAMETERIUIVPROC) load(\"glGetTexParameterIuiv\", userptr);\n    glGetTransformFeedbackVarying = (PFNGLGETTRANSFORMFEEDBACKVARYINGPROC) load(\"glGetTransformFeedbackVarying\", userptr);\n    glGetUniformuiv = (PFNGLGETUNIFORMUIVPROC) load(\"glGetUniformuiv\", userptr);\n    glGetVertexAttribIiv = (PFNGLGETVERTEXATTRIBIIVPROC) load(\"glGetVertexAttribIiv\", userptr);\n    glGetVertexAttribIuiv = (PFNGLGETVERTEXATTRIBIUIVPROC) load(\"glGetVertexAttribIuiv\", userptr);\n    glIsEnabledi = (PFNGLISENABLEDIPROC) load(\"glIsEnabledi\", userptr);\n    glIsFramebuffer = (PFNGLISFRAMEBUFFERPROC) load(\"glIsFramebuffer\", userptr);\n    glIsRenderbuffer = (PFNGLISRENDERBUFFERPROC) load(\"glIsRenderbuffer\", userptr);\n    glIsVertexArray = (PFNGLISVERTEXARRAYPROC) load(\"glIsVertexArray\", userptr);\n    glMapBufferRange = (PFNGLMAPBUFFERRANGEPROC) load(\"glMapBufferRange\", userptr);\n    glRenderbufferStorage = (PFNGLRENDERBUFFERSTORAGEPROC) load(\"glRenderbufferStorage\", userptr);\n    glRenderbufferStorageMultisample = (PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC) load(\"glRenderbufferStorageMultisample\", userptr);\n    glTexParameterIiv = (PFNGLTEXPARAMETERIIVPROC) load(\"glTexParameterIiv\", userptr);\n    glTexParameterIuiv = (PFNGLTEXPARAMETERIUIVPROC) load(\"glTexParameterIuiv\", userptr);\n    glTransformFeedbackVaryings = (PFNGLTRANSFORMFEEDBACKVARYINGSPROC) load(\"glTransformFeedbackVaryings\", userptr);\n    glUniform1ui = (PFNGLUNIFORM1UIPROC) load(\"glUniform1ui\", userptr);\n    glUniform1uiv = (PFNGLUNIFORM1UIVPROC) load(\"glUniform1uiv\", userptr);\n    glUniform2ui = (PFNGLUNIFORM2UIPROC) load(\"glUniform2ui\", userptr);\n    glUniform2uiv = (PFNGLUNIFORM2UIVPROC) load(\"glUniform2uiv\", userptr);\n    glUniform3ui = (PFNGLUNIFORM3UIPROC) load(\"glUniform3ui\", userptr);\n    glUniform3uiv = (PFNGLUNIFORM3UIVPROC) load(\"glUniform3uiv\", userptr);\n    glUniform4ui = (PFNGLUNIFORM4UIPROC) load(\"glUniform4ui\", userptr);\n    glUniform4uiv = (PFNGLUNIFORM4UIVPROC) load(\"glUniform4uiv\", userptr);\n    glVertexAttribI1i = (PFNGLVERTEXATTRIBI1IPROC) load(\"glVertexAttribI1i\", userptr);\n    glVertexAttribI1iv = (PFNGLVERTEXATTRIBI1IVPROC) load(\"glVertexAttribI1iv\", userptr);\n    glVertexAttribI1ui = (PFNGLVERTEXATTRIBI1UIPROC) load(\"glVertexAttribI1ui\", userptr);\n    glVertexAttribI1uiv = (PFNGLVERTEXATTRIBI1UIVPROC) load(\"glVertexAttribI1uiv\", userptr);\n    glVertexAttribI2i = (PFNGLVERTEXATTRIBI2IPROC) load(\"glVertexAttribI2i\", userptr);\n    glVertexAttribI2iv = (PFNGLVERTEXATTRIBI2IVPROC) load(\"glVertexAttribI2iv\", userptr);\n    glVertexAttribI2ui = (PFNGLVERTEXATTRIBI2UIPROC) load(\"glVertexAttribI2ui\", userptr);\n    glVertexAttribI2uiv = (PFNGLVERTEXATTRIBI2UIVPROC) load(\"glVertexAttribI2uiv\", userptr);\n    glVertexAttribI3i = (PFNGLVERTEXATTRIBI3IPROC) load(\"glVertexAttribI3i\", userptr);\n    glVertexAttribI3iv = (PFNGLVERTEXATTRIBI3IVPROC) load(\"glVertexAttribI3iv\", userptr);\n    glVertexAttribI3ui = (PFNGLVERTEXATTRIBI3UIPROC) load(\"glVertexAttribI3ui\", userptr);\n    glVertexAttribI3uiv = (PFNGLVERTEXATTRIBI3UIVPROC) load(\"glVertexAttribI3uiv\", userptr);\n    glVertexAttribI4bv = (PFNGLVERTEXATTRIBI4BVPROC) load(\"glVertexAttribI4bv\", userptr);\n    glVertexAttribI4i = (PFNGLVERTEXATTRIBI4IPROC) load(\"glVertexAttribI4i\", userptr);\n    glVertexAttribI4iv = (PFNGLVERTEXATTRIBI4IVPROC) load(\"glVertexAttribI4iv\", userptr);\n    glVertexAttribI4sv = (PFNGLVERTEXATTRIBI4SVPROC) load(\"glVertexAttribI4sv\", userptr);\n    glVertexAttribI4ubv = (PFNGLVERTEXATTRIBI4UBVPROC) load(\"glVertexAttribI4ubv\", userptr);\n    glVertexAttribI4ui = (PFNGLVERTEXATTRIBI4UIPROC) load(\"glVertexAttribI4ui\", userptr);\n    glVertexAttribI4uiv = (PFNGLVERTEXATTRIBI4UIVPROC) load(\"glVertexAttribI4uiv\", userptr);\n    glVertexAttribI4usv = (PFNGLVERTEXATTRIBI4USVPROC) load(\"glVertexAttribI4usv\", userptr);\n    glVertexAttribIPointer = (PFNGLVERTEXATTRIBIPOINTERPROC) load(\"glVertexAttribIPointer\", userptr);\n}\nstatic void glad_gl_load_GL_VERSION_3_1( GLADuserptrloadfunc load, void* userptr) {\n    if(!GLAD_GL_VERSION_3_1) return;\n    glBindBufferBase = (PFNGLBINDBUFFERBASEPROC) load(\"glBindBufferBase\", userptr);\n    glBindBufferRange = (PFNGLBINDBUFFERRANGEPROC) load(\"glBindBufferRange\", userptr);\n    glCopyBufferSubData = (PFNGLCOPYBUFFERSUBDATAPROC) load(\"glCopyBufferSubData\", userptr);\n    glDrawArraysInstanced = (PFNGLDRAWARRAYSINSTANCEDPROC) load(\"glDrawArraysInstanced\", userptr);\n    glDrawElementsInstanced = (PFNGLDRAWELEMENTSINSTANCEDPROC) load(\"glDrawElementsInstanced\", userptr);\n    glGetActiveUniformBlockName = (PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC) load(\"glGetActiveUniformBlockName\", userptr);\n    glGetActiveUniformBlockiv = (PFNGLGETACTIVEUNIFORMBLOCKIVPROC) load(\"glGetActiveUniformBlockiv\", userptr);\n    glGetActiveUniformName = (PFNGLGETACTIVEUNIFORMNAMEPROC) load(\"glGetActiveUniformName\", userptr);\n    glGetActiveUniformsiv = (PFNGLGETACTIVEUNIFORMSIVPROC) load(\"glGetActiveUniformsiv\", userptr);\n    glGetIntegeri_v = (PFNGLGETINTEGERI_VPROC) load(\"glGetIntegeri_v\", userptr);\n    glGetUniformBlockIndex = (PFNGLGETUNIFORMBLOCKINDEXPROC) load(\"glGetUniformBlockIndex\", userptr);\n    glGetUniformIndices = (PFNGLGETUNIFORMINDICESPROC) load(\"glGetUniformIndices\", userptr);\n    glPrimitiveRestartIndex = (PFNGLPRIMITIVERESTARTINDEXPROC) load(\"glPrimitiveRestartIndex\", userptr);\n    glTexBuffer = (PFNGLTEXBUFFERPROC) load(\"glTexBuffer\", userptr);\n    glUniformBlockBinding = (PFNGLUNIFORMBLOCKBINDINGPROC) load(\"glUniformBlockBinding\", userptr);\n}\nstatic void glad_gl_load_GL_VERSION_3_2( GLADuserptrloadfunc load, void* userptr) {\n    if(!GLAD_GL_VERSION_3_2) return;\n    glClientWaitSync = (PFNGLCLIENTWAITSYNCPROC) load(\"glClientWaitSync\", userptr);\n    glDeleteSync = (PFNGLDELETESYNCPROC) load(\"glDeleteSync\", userptr);\n    glDrawElementsBaseVertex = (PFNGLDRAWELEMENTSBASEVERTEXPROC) load(\"glDrawElementsBaseVertex\", userptr);\n    glDrawElementsInstancedBaseVertex = (PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXPROC) load(\"glDrawElementsInstancedBaseVertex\", userptr);\n    glDrawRangeElementsBaseVertex = (PFNGLDRAWRANGEELEMENTSBASEVERTEXPROC) load(\"glDrawRangeElementsBaseVertex\", userptr);\n    glFenceSync = (PFNGLFENCESYNCPROC) load(\"glFenceSync\", userptr);\n    glFramebufferTexture = (PFNGLFRAMEBUFFERTEXTUREPROC) load(\"glFramebufferTexture\", userptr);\n    glGetBufferParameteri64v = (PFNGLGETBUFFERPARAMETERI64VPROC) load(\"glGetBufferParameteri64v\", userptr);\n    glGetInteger64i_v = (PFNGLGETINTEGER64I_VPROC) load(\"glGetInteger64i_v\", userptr);\n    glGetInteger64v = (PFNGLGETINTEGER64VPROC) load(\"glGetInteger64v\", userptr);\n    glGetMultisamplefv = (PFNGLGETMULTISAMPLEFVPROC) load(\"glGetMultisamplefv\", userptr);\n    glGetSynciv = (PFNGLGETSYNCIVPROC) load(\"glGetSynciv\", userptr);\n    glIsSync = (PFNGLISSYNCPROC) load(\"glIsSync\", userptr);\n    glMultiDrawElementsBaseVertex = (PFNGLMULTIDRAWELEMENTSBASEVERTEXPROC) load(\"glMultiDrawElementsBaseVertex\", userptr);\n    glProvokingVertex = (PFNGLPROVOKINGVERTEXPROC) load(\"glProvokingVertex\", userptr);\n    glSampleMaski = (PFNGLSAMPLEMASKIPROC) load(\"glSampleMaski\", userptr);\n    glTexImage2DMultisample = (PFNGLTEXIMAGE2DMULTISAMPLEPROC) load(\"glTexImage2DMultisample\", userptr);\n    glTexImage3DMultisample = (PFNGLTEXIMAGE3DMULTISAMPLEPROC) load(\"glTexImage3DMultisample\", userptr);\n    glWaitSync = (PFNGLWAITSYNCPROC) load(\"glWaitSync\", userptr);\n}\nstatic void glad_gl_load_GL_VERSION_3_3( GLADuserptrloadfunc load, void* userptr) {\n    if(!GLAD_GL_VERSION_3_3) return;\n    glBindFragDataLocationIndexed = (PFNGLBINDFRAGDATALOCATIONINDEXEDPROC) load(\"glBindFragDataLocationIndexed\", userptr);\n    glBindSampler = (PFNGLBINDSAMPLERPROC) load(\"glBindSampler\", userptr);\n    glColorP3ui = (PFNGLCOLORP3UIPROC) load(\"glColorP3ui\", userptr);\n    glColorP3uiv = (PFNGLCOLORP3UIVPROC) load(\"glColorP3uiv\", userptr);\n    glColorP4ui = (PFNGLCOLORP4UIPROC) load(\"glColorP4ui\", userptr);\n    glColorP4uiv = (PFNGLCOLORP4UIVPROC) load(\"glColorP4uiv\", userptr);\n    glDeleteSamplers = (PFNGLDELETESAMPLERSPROC) load(\"glDeleteSamplers\", userptr);\n    glGenSamplers = (PFNGLGENSAMPLERSPROC) load(\"glGenSamplers\", userptr);\n    glGetFragDataIndex = (PFNGLGETFRAGDATAINDEXPROC) load(\"glGetFragDataIndex\", userptr);\n    glGetQueryObjecti64v = (PFNGLGETQUERYOBJECTI64VPROC) load(\"glGetQueryObjecti64v\", userptr);\n    glGetQueryObjectui64v = (PFNGLGETQUERYOBJECTUI64VPROC) load(\"glGetQueryObjectui64v\", userptr);\n    glGetSamplerParameterIiv = (PFNGLGETSAMPLERPARAMETERIIVPROC) load(\"glGetSamplerParameterIiv\", userptr);\n    glGetSamplerParameterIuiv = (PFNGLGETSAMPLERPARAMETERIUIVPROC) load(\"glGetSamplerParameterIuiv\", userptr);\n    glGetSamplerParameterfv = (PFNGLGETSAMPLERPARAMETERFVPROC) load(\"glGetSamplerParameterfv\", userptr);\n    glGetSamplerParameteriv = (PFNGLGETSAMPLERPARAMETERIVPROC) load(\"glGetSamplerParameteriv\", userptr);\n    glIsSampler = (PFNGLISSAMPLERPROC) load(\"glIsSampler\", userptr);\n    glMultiTexCoordP1ui = (PFNGLMULTITEXCOORDP1UIPROC) load(\"glMultiTexCoordP1ui\", userptr);\n    glMultiTexCoordP1uiv = (PFNGLMULTITEXCOORDP1UIVPROC) load(\"glMultiTexCoordP1uiv\", userptr);\n    glMultiTexCoordP2ui = (PFNGLMULTITEXCOORDP2UIPROC) load(\"glMultiTexCoordP2ui\", userptr);\n    glMultiTexCoordP2uiv = (PFNGLMULTITEXCOORDP2UIVPROC) load(\"glMultiTexCoordP2uiv\", userptr);\n    glMultiTexCoordP3ui = (PFNGLMULTITEXCOORDP3UIPROC) load(\"glMultiTexCoordP3ui\", userptr);\n    glMultiTexCoordP3uiv = (PFNGLMULTITEXCOORDP3UIVPROC) load(\"glMultiTexCoordP3uiv\", userptr);\n    glMultiTexCoordP4ui = (PFNGLMULTITEXCOORDP4UIPROC) load(\"glMultiTexCoordP4ui\", userptr);\n    glMultiTexCoordP4uiv = (PFNGLMULTITEXCOORDP4UIVPROC) load(\"glMultiTexCoordP4uiv\", userptr);\n    glNormalP3ui = (PFNGLNORMALP3UIPROC) load(\"glNormalP3ui\", userptr);\n    glNormalP3uiv = (PFNGLNORMALP3UIVPROC) load(\"glNormalP3uiv\", userptr);\n    glQueryCounter = (PFNGLQUERYCOUNTERPROC) load(\"glQueryCounter\", userptr);\n    glSamplerParameterIiv = (PFNGLSAMPLERPARAMETERIIVPROC) load(\"glSamplerParameterIiv\", userptr);\n    glSamplerParameterIuiv = (PFNGLSAMPLERPARAMETERIUIVPROC) load(\"glSamplerParameterIuiv\", userptr);\n    glSamplerParameterf = (PFNGLSAMPLERPARAMETERFPROC) load(\"glSamplerParameterf\", userptr);\n    glSamplerParameterfv = (PFNGLSAMPLERPARAMETERFVPROC) load(\"glSamplerParameterfv\", userptr);\n    glSamplerParameteri = (PFNGLSAMPLERPARAMETERIPROC) load(\"glSamplerParameteri\", userptr);\n    glSamplerParameteriv = (PFNGLSAMPLERPARAMETERIVPROC) load(\"glSamplerParameteriv\", userptr);\n    glSecondaryColorP3ui = (PFNGLSECONDARYCOLORP3UIPROC) load(\"glSecondaryColorP3ui\", userptr);\n    glSecondaryColorP3uiv = (PFNGLSECONDARYCOLORP3UIVPROC) load(\"glSecondaryColorP3uiv\", userptr);\n    glTexCoordP1ui = (PFNGLTEXCOORDP1UIPROC) load(\"glTexCoordP1ui\", userptr);\n    glTexCoordP1uiv = (PFNGLTEXCOORDP1UIVPROC) load(\"glTexCoordP1uiv\", userptr);\n    glTexCoordP2ui = (PFNGLTEXCOORDP2UIPROC) load(\"glTexCoordP2ui\", userptr);\n    glTexCoordP2uiv = (PFNGLTEXCOORDP2UIVPROC) load(\"glTexCoordP2uiv\", userptr);\n    glTexCoordP3ui = (PFNGLTEXCOORDP3UIPROC) load(\"glTexCoordP3ui\", userptr);\n    glTexCoordP3uiv = (PFNGLTEXCOORDP3UIVPROC) load(\"glTexCoordP3uiv\", userptr);\n    glTexCoordP4ui = (PFNGLTEXCOORDP4UIPROC) load(\"glTexCoordP4ui\", userptr);\n    glTexCoordP4uiv = (PFNGLTEXCOORDP4UIVPROC) load(\"glTexCoordP4uiv\", userptr);\n    glVertexAttribDivisor = (PFNGLVERTEXATTRIBDIVISORPROC) load(\"glVertexAttribDivisor\", userptr);\n    glVertexAttribP1ui = (PFNGLVERTEXATTRIBP1UIPROC) load(\"glVertexAttribP1ui\", userptr);\n    glVertexAttribP1uiv = (PFNGLVERTEXATTRIBP1UIVPROC) load(\"glVertexAttribP1uiv\", userptr);\n    glVertexAttribP2ui = (PFNGLVERTEXATTRIBP2UIPROC) load(\"glVertexAttribP2ui\", userptr);\n    glVertexAttribP2uiv = (PFNGLVERTEXATTRIBP2UIVPROC) load(\"glVertexAttribP2uiv\", userptr);\n    glVertexAttribP3ui = (PFNGLVERTEXATTRIBP3UIPROC) load(\"glVertexAttribP3ui\", userptr);\n    glVertexAttribP3uiv = (PFNGLVERTEXATTRIBP3UIVPROC) load(\"glVertexAttribP3uiv\", userptr);\n    glVertexAttribP4ui = (PFNGLVERTEXATTRIBP4UIPROC) load(\"glVertexAttribP4ui\", userptr);\n    glVertexAttribP4uiv = (PFNGLVERTEXATTRIBP4UIVPROC) load(\"glVertexAttribP4uiv\", userptr);\n    glVertexP2ui = (PFNGLVERTEXP2UIPROC) load(\"glVertexP2ui\", userptr);\n    glVertexP2uiv = (PFNGLVERTEXP2UIVPROC) load(\"glVertexP2uiv\", userptr);\n    glVertexP3ui = (PFNGLVERTEXP3UIPROC) load(\"glVertexP3ui\", userptr);\n    glVertexP3uiv = (PFNGLVERTEXP3UIVPROC) load(\"glVertexP3uiv\", userptr);\n    glVertexP4ui = (PFNGLVERTEXP4UIPROC) load(\"glVertexP4ui\", userptr);\n    glVertexP4uiv = (PFNGLVERTEXP4UIVPROC) load(\"glVertexP4uiv\", userptr);\n}\nstatic void glad_gl_load_GL_ARB_multisample( GLADuserptrloadfunc load, void* userptr) {\n    if(!GLAD_GL_ARB_multisample) return;\n    glSampleCoverage = (PFNGLSAMPLECOVERAGEPROC) load(\"glSampleCoverage\", userptr);\n    glSampleCoverageARB = (PFNGLSAMPLECOVERAGEARBPROC) load(\"glSampleCoverageARB\", userptr);\n}\nstatic void glad_gl_load_GL_ARB_robustness( GLADuserptrloadfunc load, void* userptr) {\n    if(!GLAD_GL_ARB_robustness) return;\n    glGetGraphicsResetStatusARB = (PFNGLGETGRAPHICSRESETSTATUSARBPROC) load(\"glGetGraphicsResetStatusARB\", userptr);\n    glGetnColorTableARB = (PFNGLGETNCOLORTABLEARBPROC) load(\"glGetnColorTableARB\", userptr);\n    glGetnCompressedTexImageARB = (PFNGLGETNCOMPRESSEDTEXIMAGEARBPROC) load(\"glGetnCompressedTexImageARB\", userptr);\n    glGetnConvolutionFilterARB = (PFNGLGETNCONVOLUTIONFILTERARBPROC) load(\"glGetnConvolutionFilterARB\", userptr);\n    glGetnHistogramARB = (PFNGLGETNHISTOGRAMARBPROC) load(\"glGetnHistogramARB\", userptr);\n    glGetnMapdvARB = (PFNGLGETNMAPDVARBPROC) load(\"glGetnMapdvARB\", userptr);\n    glGetnMapfvARB = (PFNGLGETNMAPFVARBPROC) load(\"glGetnMapfvARB\", userptr);\n    glGetnMapivARB = (PFNGLGETNMAPIVARBPROC) load(\"glGetnMapivARB\", userptr);\n    glGetnMinmaxARB = (PFNGLGETNMINMAXARBPROC) load(\"glGetnMinmaxARB\", userptr);\n    glGetnPixelMapfvARB = (PFNGLGETNPIXELMAPFVARBPROC) load(\"glGetnPixelMapfvARB\", userptr);\n    glGetnPixelMapuivARB = (PFNGLGETNPIXELMAPUIVARBPROC) load(\"glGetnPixelMapuivARB\", userptr);\n    glGetnPixelMapusvARB = (PFNGLGETNPIXELMAPUSVARBPROC) load(\"glGetnPixelMapusvARB\", userptr);\n    glGetnPolygonStippleARB = (PFNGLGETNPOLYGONSTIPPLEARBPROC) load(\"glGetnPolygonStippleARB\", userptr);\n    glGetnSeparableFilterARB = (PFNGLGETNSEPARABLEFILTERARBPROC) load(\"glGetnSeparableFilterARB\", userptr);\n    glGetnTexImageARB = (PFNGLGETNTEXIMAGEARBPROC) load(\"glGetnTexImageARB\", userptr);\n    glGetnUniformdvARB = (PFNGLGETNUNIFORMDVARBPROC) load(\"glGetnUniformdvARB\", userptr);\n    glGetnUniformfvARB = (PFNGLGETNUNIFORMFVARBPROC) load(\"glGetnUniformfvARB\", userptr);\n    glGetnUniformivARB = (PFNGLGETNUNIFORMIVARBPROC) load(\"glGetnUniformivARB\", userptr);\n    glGetnUniformuivARB = (PFNGLGETNUNIFORMUIVARBPROC) load(\"glGetnUniformuivARB\", userptr);\n    glReadnPixels = (PFNGLREADNPIXELSPROC) load(\"glReadnPixels\", userptr);\n    glReadnPixelsARB = (PFNGLREADNPIXELSARBPROC) load(\"glReadnPixelsARB\", userptr);\n}\nstatic void glad_gl_load_GL_KHR_debug( GLADuserptrloadfunc load, void* userptr) {\n    if(!GLAD_GL_KHR_debug) return;\n    glDebugMessageCallback = (PFNGLDEBUGMESSAGECALLBACKPROC) load(\"glDebugMessageCallback\", userptr);\n    glDebugMessageControl = (PFNGLDEBUGMESSAGECONTROLPROC) load(\"glDebugMessageControl\", userptr);\n    glDebugMessageInsert = (PFNGLDEBUGMESSAGEINSERTPROC) load(\"glDebugMessageInsert\", userptr);\n    glGetDebugMessageLog = (PFNGLGETDEBUGMESSAGELOGPROC) load(\"glGetDebugMessageLog\", userptr);\n    glGetObjectLabel = (PFNGLGETOBJECTLABELPROC) load(\"glGetObjectLabel\", userptr);\n    glGetObjectPtrLabel = (PFNGLGETOBJECTPTRLABELPROC) load(\"glGetObjectPtrLabel\", userptr);\n    glGetPointerv = (PFNGLGETPOINTERVPROC) load(\"glGetPointerv\", userptr);\n    glObjectLabel = (PFNGLOBJECTLABELPROC) load(\"glObjectLabel\", userptr);\n    glObjectPtrLabel = (PFNGLOBJECTPTRLABELPROC) load(\"glObjectPtrLabel\", userptr);\n    glPopDebugGroup = (PFNGLPOPDEBUGGROUPPROC) load(\"glPopDebugGroup\", userptr);\n    glPushDebugGroup = (PFNGLPUSHDEBUGGROUPPROC) load(\"glPushDebugGroup\", userptr);\n}\n\n\n\n#if defined(GL_ES_VERSION_3_0) || defined(GL_VERSION_3_0)\n#define GLAD_GL_IS_SOME_NEW_VERSION 1\n#else\n#define GLAD_GL_IS_SOME_NEW_VERSION 0\n#endif\n\nstatic int glad_gl_get_extensions( int version, const char **out_exts, unsigned int *out_num_exts_i, char ***out_exts_i) {\n#if GLAD_GL_IS_SOME_NEW_VERSION\n    if(GLAD_VERSION_MAJOR(version) < 3) {\n#else\n    (void) version;\n    (void) out_num_exts_i;\n    (void) out_exts_i;\n#endif\n        if (glGetString == NULL) {\n            return 0;\n        }\n        *out_exts = (const char *)glGetString(GL_EXTENSIONS);\n#if GLAD_GL_IS_SOME_NEW_VERSION\n    } else {\n        unsigned int index = 0;\n        unsigned int num_exts_i = 0;\n        char **exts_i = NULL;\n        if (glGetStringi == NULL || glGetIntegerv == NULL) {\n            return 0;\n        }\n        glGetIntegerv(GL_NUM_EXTENSIONS, (int*) &num_exts_i);\n        if (num_exts_i > 0) {\n            exts_i = (char **) malloc(num_exts_i * (sizeof *exts_i));\n        }\n        if (exts_i == NULL) {\n            return 0;\n        }\n        for(index = 0; index < num_exts_i; index++) {\n            const char *gl_str_tmp = (const char*) glGetStringi(GL_EXTENSIONS, index);\n            size_t len = strlen(gl_str_tmp) + 1;\n\n            char *local_str = (char*) malloc(len * sizeof(char));\n            if(local_str != NULL) {\n                memcpy(local_str, gl_str_tmp, len * sizeof(char));\n            }\n\n            exts_i[index] = local_str;\n        }\n\n        *out_num_exts_i = num_exts_i;\n        *out_exts_i = exts_i;\n    }\n#endif\n    return 1;\n}\nstatic void glad_gl_free_extensions(char **exts_i, unsigned int num_exts_i) {\n    if (exts_i != NULL) {\n        unsigned int index;\n        for(index = 0; index < num_exts_i; index++) {\n            free((void *) (exts_i[index]));\n        }\n        free((void *)exts_i);\n        exts_i = NULL;\n    }\n}\nstatic int glad_gl_has_extension(int version, const char *exts, unsigned int num_exts_i, char **exts_i, const char *ext) {\n    if(GLAD_VERSION_MAJOR(version) < 3 || !GLAD_GL_IS_SOME_NEW_VERSION) {\n        const char *extensions;\n        const char *loc;\n        const char *terminator;\n        extensions = exts;\n        if(extensions == NULL || ext == NULL) {\n            return 0;\n        }\n        while(1) {\n            loc = strstr(extensions, ext);\n            if(loc == NULL) {\n                return 0;\n            }\n            terminator = loc + strlen(ext);\n            if((loc == extensions || *(loc - 1) == ' ') &&\n                (*terminator == ' ' || *terminator == '\\0')) {\n                return 1;\n            }\n            extensions = terminator;\n        }\n    } else {\n        unsigned int index;\n        for(index = 0; index < num_exts_i; index++) {\n            const char *e = exts_i[index];\n            if(strcmp(e, ext) == 0) {\n                return 1;\n            }\n        }\n    }\n    return 0;\n}\n\nstatic GLADapiproc glad_gl_get_proc_from_userptr(const char* name, void *userptr) {\n    return (GLAD_GNUC_EXTENSION (GLADapiproc (*)(const char *name)) userptr)(name);\n}\n\nstatic int glad_gl_find_extensions_gl( int version) {\n    const char *exts = NULL;\n    unsigned int num_exts_i = 0;\n    char **exts_i = NULL;\n    if (!glad_gl_get_extensions(version, &exts, &num_exts_i, &exts_i)) return 0;\n\n    GLAD_GL_ARB_multisample = glad_gl_has_extension(version, exts, num_exts_i, exts_i, \"GL_ARB_multisample\");\n    GLAD_GL_ARB_robustness = glad_gl_has_extension(version, exts, num_exts_i, exts_i, \"GL_ARB_robustness\");\n    GLAD_GL_KHR_debug = glad_gl_has_extension(version, exts, num_exts_i, exts_i, \"GL_KHR_debug\");\n\n    glad_gl_free_extensions(exts_i, num_exts_i);\n\n    return 1;\n}\n\nstatic int glad_gl_find_core_gl(void) {\n    int i, major, minor;\n    const char* version;\n    const char* prefixes[] = {\n        \"OpenGL ES-CM \",\n        \"OpenGL ES-CL \",\n        \"OpenGL ES \",\n        NULL\n    };\n    version = (const char*) glGetString(GL_VERSION);\n    if (!version) return 0;\n    for (i = 0;  prefixes[i];  i++) {\n        const size_t length = strlen(prefixes[i]);\n        if (strncmp(version, prefixes[i], length) == 0) {\n            version += length;\n            break;\n        }\n    }\n\n    GLAD_IMPL_UTIL_SSCANF(version, \"%d.%d\", &major, &minor);\n\n    GLAD_GL_VERSION_1_0 = (major == 1 && minor >= 0) || major > 1;\n    GLAD_GL_VERSION_1_1 = (major == 1 && minor >= 1) || major > 1;\n    GLAD_GL_VERSION_1_2 = (major == 1 && minor >= 2) || major > 1;\n    GLAD_GL_VERSION_1_3 = (major == 1 && minor >= 3) || major > 1;\n    GLAD_GL_VERSION_1_4 = (major == 1 && minor >= 4) || major > 1;\n    GLAD_GL_VERSION_1_5 = (major == 1 && minor >= 5) || major > 1;\n    GLAD_GL_VERSION_2_0 = (major == 2 && minor >= 0) || major > 2;\n    GLAD_GL_VERSION_2_1 = (major == 2 && minor >= 1) || major > 2;\n    GLAD_GL_VERSION_3_0 = (major == 3 && minor >= 0) || major > 3;\n    GLAD_GL_VERSION_3_1 = (major == 3 && minor >= 1) || major > 3;\n    GLAD_GL_VERSION_3_2 = (major == 3 && minor >= 2) || major > 3;\n    GLAD_GL_VERSION_3_3 = (major == 3 && minor >= 3) || major > 3;\n\n    return GLAD_MAKE_VERSION(major, minor);\n}\n\nint gladLoadGLUserPtr( GLADuserptrloadfunc load, void *userptr) {\n    int version;\n\n    glGetString = (PFNGLGETSTRINGPROC) load(\"glGetString\", userptr);\n    if(glGetString == NULL) return 0;\n    if(glGetString(GL_VERSION) == NULL) return 0;\n    version = glad_gl_find_core_gl();\n\n    glad_gl_load_GL_VERSION_1_0(load, userptr);\n    glad_gl_load_GL_VERSION_1_1(load, userptr);\n    glad_gl_load_GL_VERSION_1_2(load, userptr);\n    glad_gl_load_GL_VERSION_1_3(load, userptr);\n    glad_gl_load_GL_VERSION_1_4(load, userptr);\n    glad_gl_load_GL_VERSION_1_5(load, userptr);\n    glad_gl_load_GL_VERSION_2_0(load, userptr);\n    glad_gl_load_GL_VERSION_2_1(load, userptr);\n    glad_gl_load_GL_VERSION_3_0(load, userptr);\n    glad_gl_load_GL_VERSION_3_1(load, userptr);\n    glad_gl_load_GL_VERSION_3_2(load, userptr);\n    glad_gl_load_GL_VERSION_3_3(load, userptr);\n\n    if (!glad_gl_find_extensions_gl(version)) return 0;\n    glad_gl_load_GL_ARB_multisample(load, userptr);\n    glad_gl_load_GL_ARB_robustness(load, userptr);\n    glad_gl_load_GL_KHR_debug(load, userptr);\n\n\n\n    return version;\n}\n\n\nint gladLoadGL( GLADloadfunc load) {\n    return gladLoadGLUserPtr( glad_gl_get_proc_from_userptr, GLAD_GNUC_EXTENSION (void*) load);\n}\n\n\n\n\n"
  },
  {
    "path": "thirdparty/glfw/deps/glad_vulkan.c",
    "content": "#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <glad/vulkan.h>\n\n#ifndef GLAD_IMPL_UTIL_C_\n#define GLAD_IMPL_UTIL_C_\n\n#ifdef _MSC_VER\n#define GLAD_IMPL_UTIL_SSCANF sscanf_s\n#else\n#define GLAD_IMPL_UTIL_SSCANF sscanf\n#endif\n\n#endif /* GLAD_IMPL_UTIL_C_ */\n\n\nint GLAD_VK_VERSION_1_0 = 0;\nint GLAD_VK_VERSION_1_1 = 0;\nint GLAD_VK_EXT_debug_report = 0;\nint GLAD_VK_KHR_surface = 0;\nint GLAD_VK_KHR_swapchain = 0;\n\n\n\nPFN_vkAcquireNextImage2KHR glad_vkAcquireNextImage2KHR = NULL;\nPFN_vkAcquireNextImageKHR glad_vkAcquireNextImageKHR = NULL;\nPFN_vkAllocateCommandBuffers glad_vkAllocateCommandBuffers = NULL;\nPFN_vkAllocateDescriptorSets glad_vkAllocateDescriptorSets = NULL;\nPFN_vkAllocateMemory glad_vkAllocateMemory = NULL;\nPFN_vkBeginCommandBuffer glad_vkBeginCommandBuffer = NULL;\nPFN_vkBindBufferMemory glad_vkBindBufferMemory = NULL;\nPFN_vkBindBufferMemory2 glad_vkBindBufferMemory2 = NULL;\nPFN_vkBindImageMemory glad_vkBindImageMemory = NULL;\nPFN_vkBindImageMemory2 glad_vkBindImageMemory2 = NULL;\nPFN_vkCmdBeginQuery glad_vkCmdBeginQuery = NULL;\nPFN_vkCmdBeginRenderPass glad_vkCmdBeginRenderPass = NULL;\nPFN_vkCmdBindDescriptorSets glad_vkCmdBindDescriptorSets = NULL;\nPFN_vkCmdBindIndexBuffer glad_vkCmdBindIndexBuffer = NULL;\nPFN_vkCmdBindPipeline glad_vkCmdBindPipeline = NULL;\nPFN_vkCmdBindVertexBuffers glad_vkCmdBindVertexBuffers = NULL;\nPFN_vkCmdBlitImage glad_vkCmdBlitImage = NULL;\nPFN_vkCmdClearAttachments glad_vkCmdClearAttachments = NULL;\nPFN_vkCmdClearColorImage glad_vkCmdClearColorImage = NULL;\nPFN_vkCmdClearDepthStencilImage glad_vkCmdClearDepthStencilImage = NULL;\nPFN_vkCmdCopyBuffer glad_vkCmdCopyBuffer = NULL;\nPFN_vkCmdCopyBufferToImage glad_vkCmdCopyBufferToImage = NULL;\nPFN_vkCmdCopyImage glad_vkCmdCopyImage = NULL;\nPFN_vkCmdCopyImageToBuffer glad_vkCmdCopyImageToBuffer = NULL;\nPFN_vkCmdCopyQueryPoolResults glad_vkCmdCopyQueryPoolResults = NULL;\nPFN_vkCmdDispatch glad_vkCmdDispatch = NULL;\nPFN_vkCmdDispatchBase glad_vkCmdDispatchBase = NULL;\nPFN_vkCmdDispatchIndirect glad_vkCmdDispatchIndirect = NULL;\nPFN_vkCmdDraw glad_vkCmdDraw = NULL;\nPFN_vkCmdDrawIndexed glad_vkCmdDrawIndexed = NULL;\nPFN_vkCmdDrawIndexedIndirect glad_vkCmdDrawIndexedIndirect = NULL;\nPFN_vkCmdDrawIndirect glad_vkCmdDrawIndirect = NULL;\nPFN_vkCmdEndQuery glad_vkCmdEndQuery = NULL;\nPFN_vkCmdEndRenderPass glad_vkCmdEndRenderPass = NULL;\nPFN_vkCmdExecuteCommands glad_vkCmdExecuteCommands = NULL;\nPFN_vkCmdFillBuffer glad_vkCmdFillBuffer = NULL;\nPFN_vkCmdNextSubpass glad_vkCmdNextSubpass = NULL;\nPFN_vkCmdPipelineBarrier glad_vkCmdPipelineBarrier = NULL;\nPFN_vkCmdPushConstants glad_vkCmdPushConstants = NULL;\nPFN_vkCmdResetEvent glad_vkCmdResetEvent = NULL;\nPFN_vkCmdResetQueryPool glad_vkCmdResetQueryPool = NULL;\nPFN_vkCmdResolveImage glad_vkCmdResolveImage = NULL;\nPFN_vkCmdSetBlendConstants glad_vkCmdSetBlendConstants = NULL;\nPFN_vkCmdSetDepthBias glad_vkCmdSetDepthBias = NULL;\nPFN_vkCmdSetDepthBounds glad_vkCmdSetDepthBounds = NULL;\nPFN_vkCmdSetDeviceMask glad_vkCmdSetDeviceMask = NULL;\nPFN_vkCmdSetEvent glad_vkCmdSetEvent = NULL;\nPFN_vkCmdSetLineWidth glad_vkCmdSetLineWidth = NULL;\nPFN_vkCmdSetScissor glad_vkCmdSetScissor = NULL;\nPFN_vkCmdSetStencilCompareMask glad_vkCmdSetStencilCompareMask = NULL;\nPFN_vkCmdSetStencilReference glad_vkCmdSetStencilReference = NULL;\nPFN_vkCmdSetStencilWriteMask glad_vkCmdSetStencilWriteMask = NULL;\nPFN_vkCmdSetViewport glad_vkCmdSetViewport = NULL;\nPFN_vkCmdUpdateBuffer glad_vkCmdUpdateBuffer = NULL;\nPFN_vkCmdWaitEvents glad_vkCmdWaitEvents = NULL;\nPFN_vkCmdWriteTimestamp glad_vkCmdWriteTimestamp = NULL;\nPFN_vkCreateBuffer glad_vkCreateBuffer = NULL;\nPFN_vkCreateBufferView glad_vkCreateBufferView = NULL;\nPFN_vkCreateCommandPool glad_vkCreateCommandPool = NULL;\nPFN_vkCreateComputePipelines glad_vkCreateComputePipelines = NULL;\nPFN_vkCreateDebugReportCallbackEXT glad_vkCreateDebugReportCallbackEXT = NULL;\nPFN_vkCreateDescriptorPool glad_vkCreateDescriptorPool = NULL;\nPFN_vkCreateDescriptorSetLayout glad_vkCreateDescriptorSetLayout = NULL;\nPFN_vkCreateDescriptorUpdateTemplate glad_vkCreateDescriptorUpdateTemplate = NULL;\nPFN_vkCreateDevice glad_vkCreateDevice = NULL;\nPFN_vkCreateEvent glad_vkCreateEvent = NULL;\nPFN_vkCreateFence glad_vkCreateFence = NULL;\nPFN_vkCreateFramebuffer glad_vkCreateFramebuffer = NULL;\nPFN_vkCreateGraphicsPipelines glad_vkCreateGraphicsPipelines = NULL;\nPFN_vkCreateImage glad_vkCreateImage = NULL;\nPFN_vkCreateImageView glad_vkCreateImageView = NULL;\nPFN_vkCreateInstance glad_vkCreateInstance = NULL;\nPFN_vkCreatePipelineCache glad_vkCreatePipelineCache = NULL;\nPFN_vkCreatePipelineLayout glad_vkCreatePipelineLayout = NULL;\nPFN_vkCreateQueryPool glad_vkCreateQueryPool = NULL;\nPFN_vkCreateRenderPass glad_vkCreateRenderPass = NULL;\nPFN_vkCreateSampler glad_vkCreateSampler = NULL;\nPFN_vkCreateSamplerYcbcrConversion glad_vkCreateSamplerYcbcrConversion = NULL;\nPFN_vkCreateSemaphore glad_vkCreateSemaphore = NULL;\nPFN_vkCreateShaderModule glad_vkCreateShaderModule = NULL;\nPFN_vkCreateSwapchainKHR glad_vkCreateSwapchainKHR = NULL;\nPFN_vkDebugReportMessageEXT glad_vkDebugReportMessageEXT = NULL;\nPFN_vkDestroyBuffer glad_vkDestroyBuffer = NULL;\nPFN_vkDestroyBufferView glad_vkDestroyBufferView = NULL;\nPFN_vkDestroyCommandPool glad_vkDestroyCommandPool = NULL;\nPFN_vkDestroyDebugReportCallbackEXT glad_vkDestroyDebugReportCallbackEXT = NULL;\nPFN_vkDestroyDescriptorPool glad_vkDestroyDescriptorPool = NULL;\nPFN_vkDestroyDescriptorSetLayout glad_vkDestroyDescriptorSetLayout = NULL;\nPFN_vkDestroyDescriptorUpdateTemplate glad_vkDestroyDescriptorUpdateTemplate = NULL;\nPFN_vkDestroyDevice glad_vkDestroyDevice = NULL;\nPFN_vkDestroyEvent glad_vkDestroyEvent = NULL;\nPFN_vkDestroyFence glad_vkDestroyFence = NULL;\nPFN_vkDestroyFramebuffer glad_vkDestroyFramebuffer = NULL;\nPFN_vkDestroyImage glad_vkDestroyImage = NULL;\nPFN_vkDestroyImageView glad_vkDestroyImageView = NULL;\nPFN_vkDestroyInstance glad_vkDestroyInstance = NULL;\nPFN_vkDestroyPipeline glad_vkDestroyPipeline = NULL;\nPFN_vkDestroyPipelineCache glad_vkDestroyPipelineCache = NULL;\nPFN_vkDestroyPipelineLayout glad_vkDestroyPipelineLayout = NULL;\nPFN_vkDestroyQueryPool glad_vkDestroyQueryPool = NULL;\nPFN_vkDestroyRenderPass glad_vkDestroyRenderPass = NULL;\nPFN_vkDestroySampler glad_vkDestroySampler = NULL;\nPFN_vkDestroySamplerYcbcrConversion glad_vkDestroySamplerYcbcrConversion = NULL;\nPFN_vkDestroySemaphore glad_vkDestroySemaphore = NULL;\nPFN_vkDestroyShaderModule glad_vkDestroyShaderModule = NULL;\nPFN_vkDestroySurfaceKHR glad_vkDestroySurfaceKHR = NULL;\nPFN_vkDestroySwapchainKHR glad_vkDestroySwapchainKHR = NULL;\nPFN_vkDeviceWaitIdle glad_vkDeviceWaitIdle = NULL;\nPFN_vkEndCommandBuffer glad_vkEndCommandBuffer = NULL;\nPFN_vkEnumerateDeviceExtensionProperties glad_vkEnumerateDeviceExtensionProperties = NULL;\nPFN_vkEnumerateDeviceLayerProperties glad_vkEnumerateDeviceLayerProperties = NULL;\nPFN_vkEnumerateInstanceExtensionProperties glad_vkEnumerateInstanceExtensionProperties = NULL;\nPFN_vkEnumerateInstanceLayerProperties glad_vkEnumerateInstanceLayerProperties = NULL;\nPFN_vkEnumerateInstanceVersion glad_vkEnumerateInstanceVersion = NULL;\nPFN_vkEnumeratePhysicalDeviceGroups glad_vkEnumeratePhysicalDeviceGroups = NULL;\nPFN_vkEnumeratePhysicalDevices glad_vkEnumeratePhysicalDevices = NULL;\nPFN_vkFlushMappedMemoryRanges glad_vkFlushMappedMemoryRanges = NULL;\nPFN_vkFreeCommandBuffers glad_vkFreeCommandBuffers = NULL;\nPFN_vkFreeDescriptorSets glad_vkFreeDescriptorSets = NULL;\nPFN_vkFreeMemory glad_vkFreeMemory = NULL;\nPFN_vkGetBufferMemoryRequirements glad_vkGetBufferMemoryRequirements = NULL;\nPFN_vkGetBufferMemoryRequirements2 glad_vkGetBufferMemoryRequirements2 = NULL;\nPFN_vkGetDescriptorSetLayoutSupport glad_vkGetDescriptorSetLayoutSupport = NULL;\nPFN_vkGetDeviceGroupPeerMemoryFeatures glad_vkGetDeviceGroupPeerMemoryFeatures = NULL;\nPFN_vkGetDeviceGroupPresentCapabilitiesKHR glad_vkGetDeviceGroupPresentCapabilitiesKHR = NULL;\nPFN_vkGetDeviceGroupSurfacePresentModesKHR glad_vkGetDeviceGroupSurfacePresentModesKHR = NULL;\nPFN_vkGetDeviceMemoryCommitment glad_vkGetDeviceMemoryCommitment = NULL;\nPFN_vkGetDeviceProcAddr glad_vkGetDeviceProcAddr = NULL;\nPFN_vkGetDeviceQueue glad_vkGetDeviceQueue = NULL;\nPFN_vkGetDeviceQueue2 glad_vkGetDeviceQueue2 = NULL;\nPFN_vkGetEventStatus glad_vkGetEventStatus = NULL;\nPFN_vkGetFenceStatus glad_vkGetFenceStatus = NULL;\nPFN_vkGetImageMemoryRequirements glad_vkGetImageMemoryRequirements = NULL;\nPFN_vkGetImageMemoryRequirements2 glad_vkGetImageMemoryRequirements2 = NULL;\nPFN_vkGetImageSparseMemoryRequirements glad_vkGetImageSparseMemoryRequirements = NULL;\nPFN_vkGetImageSparseMemoryRequirements2 glad_vkGetImageSparseMemoryRequirements2 = NULL;\nPFN_vkGetImageSubresourceLayout glad_vkGetImageSubresourceLayout = NULL;\nPFN_vkGetInstanceProcAddr glad_vkGetInstanceProcAddr = NULL;\nPFN_vkGetPhysicalDeviceExternalBufferProperties glad_vkGetPhysicalDeviceExternalBufferProperties = NULL;\nPFN_vkGetPhysicalDeviceExternalFenceProperties glad_vkGetPhysicalDeviceExternalFenceProperties = NULL;\nPFN_vkGetPhysicalDeviceExternalSemaphoreProperties glad_vkGetPhysicalDeviceExternalSemaphoreProperties = NULL;\nPFN_vkGetPhysicalDeviceFeatures glad_vkGetPhysicalDeviceFeatures = NULL;\nPFN_vkGetPhysicalDeviceFeatures2 glad_vkGetPhysicalDeviceFeatures2 = NULL;\nPFN_vkGetPhysicalDeviceFormatProperties glad_vkGetPhysicalDeviceFormatProperties = NULL;\nPFN_vkGetPhysicalDeviceFormatProperties2 glad_vkGetPhysicalDeviceFormatProperties2 = NULL;\nPFN_vkGetPhysicalDeviceImageFormatProperties glad_vkGetPhysicalDeviceImageFormatProperties = NULL;\nPFN_vkGetPhysicalDeviceImageFormatProperties2 glad_vkGetPhysicalDeviceImageFormatProperties2 = NULL;\nPFN_vkGetPhysicalDeviceMemoryProperties glad_vkGetPhysicalDeviceMemoryProperties = NULL;\nPFN_vkGetPhysicalDeviceMemoryProperties2 glad_vkGetPhysicalDeviceMemoryProperties2 = NULL;\nPFN_vkGetPhysicalDevicePresentRectanglesKHR glad_vkGetPhysicalDevicePresentRectanglesKHR = NULL;\nPFN_vkGetPhysicalDeviceProperties glad_vkGetPhysicalDeviceProperties = NULL;\nPFN_vkGetPhysicalDeviceProperties2 glad_vkGetPhysicalDeviceProperties2 = NULL;\nPFN_vkGetPhysicalDeviceQueueFamilyProperties glad_vkGetPhysicalDeviceQueueFamilyProperties = NULL;\nPFN_vkGetPhysicalDeviceQueueFamilyProperties2 glad_vkGetPhysicalDeviceQueueFamilyProperties2 = NULL;\nPFN_vkGetPhysicalDeviceSparseImageFormatProperties glad_vkGetPhysicalDeviceSparseImageFormatProperties = NULL;\nPFN_vkGetPhysicalDeviceSparseImageFormatProperties2 glad_vkGetPhysicalDeviceSparseImageFormatProperties2 = NULL;\nPFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR glad_vkGetPhysicalDeviceSurfaceCapabilitiesKHR = NULL;\nPFN_vkGetPhysicalDeviceSurfaceFormatsKHR glad_vkGetPhysicalDeviceSurfaceFormatsKHR = NULL;\nPFN_vkGetPhysicalDeviceSurfacePresentModesKHR glad_vkGetPhysicalDeviceSurfacePresentModesKHR = NULL;\nPFN_vkGetPhysicalDeviceSurfaceSupportKHR glad_vkGetPhysicalDeviceSurfaceSupportKHR = NULL;\nPFN_vkGetPipelineCacheData glad_vkGetPipelineCacheData = NULL;\nPFN_vkGetQueryPoolResults glad_vkGetQueryPoolResults = NULL;\nPFN_vkGetRenderAreaGranularity glad_vkGetRenderAreaGranularity = NULL;\nPFN_vkGetSwapchainImagesKHR glad_vkGetSwapchainImagesKHR = NULL;\nPFN_vkInvalidateMappedMemoryRanges glad_vkInvalidateMappedMemoryRanges = NULL;\nPFN_vkMapMemory glad_vkMapMemory = NULL;\nPFN_vkMergePipelineCaches glad_vkMergePipelineCaches = NULL;\nPFN_vkQueueBindSparse glad_vkQueueBindSparse = NULL;\nPFN_vkQueuePresentKHR glad_vkQueuePresentKHR = NULL;\nPFN_vkQueueSubmit glad_vkQueueSubmit = NULL;\nPFN_vkQueueWaitIdle glad_vkQueueWaitIdle = NULL;\nPFN_vkResetCommandBuffer glad_vkResetCommandBuffer = NULL;\nPFN_vkResetCommandPool glad_vkResetCommandPool = NULL;\nPFN_vkResetDescriptorPool glad_vkResetDescriptorPool = NULL;\nPFN_vkResetEvent glad_vkResetEvent = NULL;\nPFN_vkResetFences glad_vkResetFences = NULL;\nPFN_vkSetEvent glad_vkSetEvent = NULL;\nPFN_vkTrimCommandPool glad_vkTrimCommandPool = NULL;\nPFN_vkUnmapMemory glad_vkUnmapMemory = NULL;\nPFN_vkUpdateDescriptorSetWithTemplate glad_vkUpdateDescriptorSetWithTemplate = NULL;\nPFN_vkUpdateDescriptorSets glad_vkUpdateDescriptorSets = NULL;\nPFN_vkWaitForFences glad_vkWaitForFences = NULL;\n\n\nstatic void glad_vk_load_VK_VERSION_1_0( GLADuserptrloadfunc load, void* userptr) {\n    if(!GLAD_VK_VERSION_1_0) return;\n    vkAllocateCommandBuffers = (PFN_vkAllocateCommandBuffers) load(\"vkAllocateCommandBuffers\", userptr);\n    vkAllocateDescriptorSets = (PFN_vkAllocateDescriptorSets) load(\"vkAllocateDescriptorSets\", userptr);\n    vkAllocateMemory = (PFN_vkAllocateMemory) load(\"vkAllocateMemory\", userptr);\n    vkBeginCommandBuffer = (PFN_vkBeginCommandBuffer) load(\"vkBeginCommandBuffer\", userptr);\n    vkBindBufferMemory = (PFN_vkBindBufferMemory) load(\"vkBindBufferMemory\", userptr);\n    vkBindImageMemory = (PFN_vkBindImageMemory) load(\"vkBindImageMemory\", userptr);\n    vkCmdBeginQuery = (PFN_vkCmdBeginQuery) load(\"vkCmdBeginQuery\", userptr);\n    vkCmdBeginRenderPass = (PFN_vkCmdBeginRenderPass) load(\"vkCmdBeginRenderPass\", userptr);\n    vkCmdBindDescriptorSets = (PFN_vkCmdBindDescriptorSets) load(\"vkCmdBindDescriptorSets\", userptr);\n    vkCmdBindIndexBuffer = (PFN_vkCmdBindIndexBuffer) load(\"vkCmdBindIndexBuffer\", userptr);\n    vkCmdBindPipeline = (PFN_vkCmdBindPipeline) load(\"vkCmdBindPipeline\", userptr);\n    vkCmdBindVertexBuffers = (PFN_vkCmdBindVertexBuffers) load(\"vkCmdBindVertexBuffers\", userptr);\n    vkCmdBlitImage = (PFN_vkCmdBlitImage) load(\"vkCmdBlitImage\", userptr);\n    vkCmdClearAttachments = (PFN_vkCmdClearAttachments) load(\"vkCmdClearAttachments\", userptr);\n    vkCmdClearColorImage = (PFN_vkCmdClearColorImage) load(\"vkCmdClearColorImage\", userptr);\n    vkCmdClearDepthStencilImage = (PFN_vkCmdClearDepthStencilImage) load(\"vkCmdClearDepthStencilImage\", userptr);\n    vkCmdCopyBuffer = (PFN_vkCmdCopyBuffer) load(\"vkCmdCopyBuffer\", userptr);\n    vkCmdCopyBufferToImage = (PFN_vkCmdCopyBufferToImage) load(\"vkCmdCopyBufferToImage\", userptr);\n    vkCmdCopyImage = (PFN_vkCmdCopyImage) load(\"vkCmdCopyImage\", userptr);\n    vkCmdCopyImageToBuffer = (PFN_vkCmdCopyImageToBuffer) load(\"vkCmdCopyImageToBuffer\", userptr);\n    vkCmdCopyQueryPoolResults = (PFN_vkCmdCopyQueryPoolResults) load(\"vkCmdCopyQueryPoolResults\", userptr);\n    vkCmdDispatch = (PFN_vkCmdDispatch) load(\"vkCmdDispatch\", userptr);\n    vkCmdDispatchIndirect = (PFN_vkCmdDispatchIndirect) load(\"vkCmdDispatchIndirect\", userptr);\n    vkCmdDraw = (PFN_vkCmdDraw) load(\"vkCmdDraw\", userptr);\n    vkCmdDrawIndexed = (PFN_vkCmdDrawIndexed) load(\"vkCmdDrawIndexed\", userptr);\n    vkCmdDrawIndexedIndirect = (PFN_vkCmdDrawIndexedIndirect) load(\"vkCmdDrawIndexedIndirect\", userptr);\n    vkCmdDrawIndirect = (PFN_vkCmdDrawIndirect) load(\"vkCmdDrawIndirect\", userptr);\n    vkCmdEndQuery = (PFN_vkCmdEndQuery) load(\"vkCmdEndQuery\", userptr);\n    vkCmdEndRenderPass = (PFN_vkCmdEndRenderPass) load(\"vkCmdEndRenderPass\", userptr);\n    vkCmdExecuteCommands = (PFN_vkCmdExecuteCommands) load(\"vkCmdExecuteCommands\", userptr);\n    vkCmdFillBuffer = (PFN_vkCmdFillBuffer) load(\"vkCmdFillBuffer\", userptr);\n    vkCmdNextSubpass = (PFN_vkCmdNextSubpass) load(\"vkCmdNextSubpass\", userptr);\n    vkCmdPipelineBarrier = (PFN_vkCmdPipelineBarrier) load(\"vkCmdPipelineBarrier\", userptr);\n    vkCmdPushConstants = (PFN_vkCmdPushConstants) load(\"vkCmdPushConstants\", userptr);\n    vkCmdResetEvent = (PFN_vkCmdResetEvent) load(\"vkCmdResetEvent\", userptr);\n    vkCmdResetQueryPool = (PFN_vkCmdResetQueryPool) load(\"vkCmdResetQueryPool\", userptr);\n    vkCmdResolveImage = (PFN_vkCmdResolveImage) load(\"vkCmdResolveImage\", userptr);\n    vkCmdSetBlendConstants = (PFN_vkCmdSetBlendConstants) load(\"vkCmdSetBlendConstants\", userptr);\n    vkCmdSetDepthBias = (PFN_vkCmdSetDepthBias) load(\"vkCmdSetDepthBias\", userptr);\n    vkCmdSetDepthBounds = (PFN_vkCmdSetDepthBounds) load(\"vkCmdSetDepthBounds\", userptr);\n    vkCmdSetEvent = (PFN_vkCmdSetEvent) load(\"vkCmdSetEvent\", userptr);\n    vkCmdSetLineWidth = (PFN_vkCmdSetLineWidth) load(\"vkCmdSetLineWidth\", userptr);\n    vkCmdSetScissor = (PFN_vkCmdSetScissor) load(\"vkCmdSetScissor\", userptr);\n    vkCmdSetStencilCompareMask = (PFN_vkCmdSetStencilCompareMask) load(\"vkCmdSetStencilCompareMask\", userptr);\n    vkCmdSetStencilReference = (PFN_vkCmdSetStencilReference) load(\"vkCmdSetStencilReference\", userptr);\n    vkCmdSetStencilWriteMask = (PFN_vkCmdSetStencilWriteMask) load(\"vkCmdSetStencilWriteMask\", userptr);\n    vkCmdSetViewport = (PFN_vkCmdSetViewport) load(\"vkCmdSetViewport\", userptr);\n    vkCmdUpdateBuffer = (PFN_vkCmdUpdateBuffer) load(\"vkCmdUpdateBuffer\", userptr);\n    vkCmdWaitEvents = (PFN_vkCmdWaitEvents) load(\"vkCmdWaitEvents\", userptr);\n    vkCmdWriteTimestamp = (PFN_vkCmdWriteTimestamp) load(\"vkCmdWriteTimestamp\", userptr);\n    vkCreateBuffer = (PFN_vkCreateBuffer) load(\"vkCreateBuffer\", userptr);\n    vkCreateBufferView = (PFN_vkCreateBufferView) load(\"vkCreateBufferView\", userptr);\n    vkCreateCommandPool = (PFN_vkCreateCommandPool) load(\"vkCreateCommandPool\", userptr);\n    vkCreateComputePipelines = (PFN_vkCreateComputePipelines) load(\"vkCreateComputePipelines\", userptr);\n    vkCreateDescriptorPool = (PFN_vkCreateDescriptorPool) load(\"vkCreateDescriptorPool\", userptr);\n    vkCreateDescriptorSetLayout = (PFN_vkCreateDescriptorSetLayout) load(\"vkCreateDescriptorSetLayout\", userptr);\n    vkCreateDevice = (PFN_vkCreateDevice) load(\"vkCreateDevice\", userptr);\n    vkCreateEvent = (PFN_vkCreateEvent) load(\"vkCreateEvent\", userptr);\n    vkCreateFence = (PFN_vkCreateFence) load(\"vkCreateFence\", userptr);\n    vkCreateFramebuffer = (PFN_vkCreateFramebuffer) load(\"vkCreateFramebuffer\", userptr);\n    vkCreateGraphicsPipelines = (PFN_vkCreateGraphicsPipelines) load(\"vkCreateGraphicsPipelines\", userptr);\n    vkCreateImage = (PFN_vkCreateImage) load(\"vkCreateImage\", userptr);\n    vkCreateImageView = (PFN_vkCreateImageView) load(\"vkCreateImageView\", userptr);\n    vkCreateInstance = (PFN_vkCreateInstance) load(\"vkCreateInstance\", userptr);\n    vkCreatePipelineCache = (PFN_vkCreatePipelineCache) load(\"vkCreatePipelineCache\", userptr);\n    vkCreatePipelineLayout = (PFN_vkCreatePipelineLayout) load(\"vkCreatePipelineLayout\", userptr);\n    vkCreateQueryPool = (PFN_vkCreateQueryPool) load(\"vkCreateQueryPool\", userptr);\n    vkCreateRenderPass = (PFN_vkCreateRenderPass) load(\"vkCreateRenderPass\", userptr);\n    vkCreateSampler = (PFN_vkCreateSampler) load(\"vkCreateSampler\", userptr);\n    vkCreateSemaphore = (PFN_vkCreateSemaphore) load(\"vkCreateSemaphore\", userptr);\n    vkCreateShaderModule = (PFN_vkCreateShaderModule) load(\"vkCreateShaderModule\", userptr);\n    vkDestroyBuffer = (PFN_vkDestroyBuffer) load(\"vkDestroyBuffer\", userptr);\n    vkDestroyBufferView = (PFN_vkDestroyBufferView) load(\"vkDestroyBufferView\", userptr);\n    vkDestroyCommandPool = (PFN_vkDestroyCommandPool) load(\"vkDestroyCommandPool\", userptr);\n    vkDestroyDescriptorPool = (PFN_vkDestroyDescriptorPool) load(\"vkDestroyDescriptorPool\", userptr);\n    vkDestroyDescriptorSetLayout = (PFN_vkDestroyDescriptorSetLayout) load(\"vkDestroyDescriptorSetLayout\", userptr);\n    vkDestroyDevice = (PFN_vkDestroyDevice) load(\"vkDestroyDevice\", userptr);\n    vkDestroyEvent = (PFN_vkDestroyEvent) load(\"vkDestroyEvent\", userptr);\n    vkDestroyFence = (PFN_vkDestroyFence) load(\"vkDestroyFence\", userptr);\n    vkDestroyFramebuffer = (PFN_vkDestroyFramebuffer) load(\"vkDestroyFramebuffer\", userptr);\n    vkDestroyImage = (PFN_vkDestroyImage) load(\"vkDestroyImage\", userptr);\n    vkDestroyImageView = (PFN_vkDestroyImageView) load(\"vkDestroyImageView\", userptr);\n    vkDestroyInstance = (PFN_vkDestroyInstance) load(\"vkDestroyInstance\", userptr);\n    vkDestroyPipeline = (PFN_vkDestroyPipeline) load(\"vkDestroyPipeline\", userptr);\n    vkDestroyPipelineCache = (PFN_vkDestroyPipelineCache) load(\"vkDestroyPipelineCache\", userptr);\n    vkDestroyPipelineLayout = (PFN_vkDestroyPipelineLayout) load(\"vkDestroyPipelineLayout\", userptr);\n    vkDestroyQueryPool = (PFN_vkDestroyQueryPool) load(\"vkDestroyQueryPool\", userptr);\n    vkDestroyRenderPass = (PFN_vkDestroyRenderPass) load(\"vkDestroyRenderPass\", userptr);\n    vkDestroySampler = (PFN_vkDestroySampler) load(\"vkDestroySampler\", userptr);\n    vkDestroySemaphore = (PFN_vkDestroySemaphore) load(\"vkDestroySemaphore\", userptr);\n    vkDestroyShaderModule = (PFN_vkDestroyShaderModule) load(\"vkDestroyShaderModule\", userptr);\n    vkDeviceWaitIdle = (PFN_vkDeviceWaitIdle) load(\"vkDeviceWaitIdle\", userptr);\n    vkEndCommandBuffer = (PFN_vkEndCommandBuffer) load(\"vkEndCommandBuffer\", userptr);\n    vkEnumerateDeviceExtensionProperties = (PFN_vkEnumerateDeviceExtensionProperties) load(\"vkEnumerateDeviceExtensionProperties\", userptr);\n    vkEnumerateDeviceLayerProperties = (PFN_vkEnumerateDeviceLayerProperties) load(\"vkEnumerateDeviceLayerProperties\", userptr);\n    vkEnumerateInstanceExtensionProperties = (PFN_vkEnumerateInstanceExtensionProperties) load(\"vkEnumerateInstanceExtensionProperties\", userptr);\n    vkEnumerateInstanceLayerProperties = (PFN_vkEnumerateInstanceLayerProperties) load(\"vkEnumerateInstanceLayerProperties\", userptr);\n    vkEnumeratePhysicalDevices = (PFN_vkEnumeratePhysicalDevices) load(\"vkEnumeratePhysicalDevices\", userptr);\n    vkFlushMappedMemoryRanges = (PFN_vkFlushMappedMemoryRanges) load(\"vkFlushMappedMemoryRanges\", userptr);\n    vkFreeCommandBuffers = (PFN_vkFreeCommandBuffers) load(\"vkFreeCommandBuffers\", userptr);\n    vkFreeDescriptorSets = (PFN_vkFreeDescriptorSets) load(\"vkFreeDescriptorSets\", userptr);\n    vkFreeMemory = (PFN_vkFreeMemory) load(\"vkFreeMemory\", userptr);\n    vkGetBufferMemoryRequirements = (PFN_vkGetBufferMemoryRequirements) load(\"vkGetBufferMemoryRequirements\", userptr);\n    vkGetDeviceMemoryCommitment = (PFN_vkGetDeviceMemoryCommitment) load(\"vkGetDeviceMemoryCommitment\", userptr);\n    vkGetDeviceProcAddr = (PFN_vkGetDeviceProcAddr) load(\"vkGetDeviceProcAddr\", userptr);\n    vkGetDeviceQueue = (PFN_vkGetDeviceQueue) load(\"vkGetDeviceQueue\", userptr);\n    vkGetEventStatus = (PFN_vkGetEventStatus) load(\"vkGetEventStatus\", userptr);\n    vkGetFenceStatus = (PFN_vkGetFenceStatus) load(\"vkGetFenceStatus\", userptr);\n    vkGetImageMemoryRequirements = (PFN_vkGetImageMemoryRequirements) load(\"vkGetImageMemoryRequirements\", userptr);\n    vkGetImageSparseMemoryRequirements = (PFN_vkGetImageSparseMemoryRequirements) load(\"vkGetImageSparseMemoryRequirements\", userptr);\n    vkGetImageSubresourceLayout = (PFN_vkGetImageSubresourceLayout) load(\"vkGetImageSubresourceLayout\", userptr);\n    vkGetInstanceProcAddr = (PFN_vkGetInstanceProcAddr) load(\"vkGetInstanceProcAddr\", userptr);\n    vkGetPhysicalDeviceFeatures = (PFN_vkGetPhysicalDeviceFeatures) load(\"vkGetPhysicalDeviceFeatures\", userptr);\n    vkGetPhysicalDeviceFormatProperties = (PFN_vkGetPhysicalDeviceFormatProperties) load(\"vkGetPhysicalDeviceFormatProperties\", userptr);\n    vkGetPhysicalDeviceImageFormatProperties = (PFN_vkGetPhysicalDeviceImageFormatProperties) load(\"vkGetPhysicalDeviceImageFormatProperties\", userptr);\n    vkGetPhysicalDeviceMemoryProperties = (PFN_vkGetPhysicalDeviceMemoryProperties) load(\"vkGetPhysicalDeviceMemoryProperties\", userptr);\n    vkGetPhysicalDeviceProperties = (PFN_vkGetPhysicalDeviceProperties) load(\"vkGetPhysicalDeviceProperties\", userptr);\n    vkGetPhysicalDeviceQueueFamilyProperties = (PFN_vkGetPhysicalDeviceQueueFamilyProperties) load(\"vkGetPhysicalDeviceQueueFamilyProperties\", userptr);\n    vkGetPhysicalDeviceSparseImageFormatProperties = (PFN_vkGetPhysicalDeviceSparseImageFormatProperties) load(\"vkGetPhysicalDeviceSparseImageFormatProperties\", userptr);\n    vkGetPipelineCacheData = (PFN_vkGetPipelineCacheData) load(\"vkGetPipelineCacheData\", userptr);\n    vkGetQueryPoolResults = (PFN_vkGetQueryPoolResults) load(\"vkGetQueryPoolResults\", userptr);\n    vkGetRenderAreaGranularity = (PFN_vkGetRenderAreaGranularity) load(\"vkGetRenderAreaGranularity\", userptr);\n    vkInvalidateMappedMemoryRanges = (PFN_vkInvalidateMappedMemoryRanges) load(\"vkInvalidateMappedMemoryRanges\", userptr);\n    vkMapMemory = (PFN_vkMapMemory) load(\"vkMapMemory\", userptr);\n    vkMergePipelineCaches = (PFN_vkMergePipelineCaches) load(\"vkMergePipelineCaches\", userptr);\n    vkQueueBindSparse = (PFN_vkQueueBindSparse) load(\"vkQueueBindSparse\", userptr);\n    vkQueueSubmit = (PFN_vkQueueSubmit) load(\"vkQueueSubmit\", userptr);\n    vkQueueWaitIdle = (PFN_vkQueueWaitIdle) load(\"vkQueueWaitIdle\", userptr);\n    vkResetCommandBuffer = (PFN_vkResetCommandBuffer) load(\"vkResetCommandBuffer\", userptr);\n    vkResetCommandPool = (PFN_vkResetCommandPool) load(\"vkResetCommandPool\", userptr);\n    vkResetDescriptorPool = (PFN_vkResetDescriptorPool) load(\"vkResetDescriptorPool\", userptr);\n    vkResetEvent = (PFN_vkResetEvent) load(\"vkResetEvent\", userptr);\n    vkResetFences = (PFN_vkResetFences) load(\"vkResetFences\", userptr);\n    vkSetEvent = (PFN_vkSetEvent) load(\"vkSetEvent\", userptr);\n    vkUnmapMemory = (PFN_vkUnmapMemory) load(\"vkUnmapMemory\", userptr);\n    vkUpdateDescriptorSets = (PFN_vkUpdateDescriptorSets) load(\"vkUpdateDescriptorSets\", userptr);\n    vkWaitForFences = (PFN_vkWaitForFences) load(\"vkWaitForFences\", userptr);\n}\nstatic void glad_vk_load_VK_VERSION_1_1( GLADuserptrloadfunc load, void* userptr) {\n    if(!GLAD_VK_VERSION_1_1) return;\n    vkBindBufferMemory2 = (PFN_vkBindBufferMemory2) load(\"vkBindBufferMemory2\", userptr);\n    vkBindImageMemory2 = (PFN_vkBindImageMemory2) load(\"vkBindImageMemory2\", userptr);\n    vkCmdDispatchBase = (PFN_vkCmdDispatchBase) load(\"vkCmdDispatchBase\", userptr);\n    vkCmdSetDeviceMask = (PFN_vkCmdSetDeviceMask) load(\"vkCmdSetDeviceMask\", userptr);\n    vkCreateDescriptorUpdateTemplate = (PFN_vkCreateDescriptorUpdateTemplate) load(\"vkCreateDescriptorUpdateTemplate\", userptr);\n    vkCreateSamplerYcbcrConversion = (PFN_vkCreateSamplerYcbcrConversion) load(\"vkCreateSamplerYcbcrConversion\", userptr);\n    vkDestroyDescriptorUpdateTemplate = (PFN_vkDestroyDescriptorUpdateTemplate) load(\"vkDestroyDescriptorUpdateTemplate\", userptr);\n    vkDestroySamplerYcbcrConversion = (PFN_vkDestroySamplerYcbcrConversion) load(\"vkDestroySamplerYcbcrConversion\", userptr);\n    vkEnumerateInstanceVersion = (PFN_vkEnumerateInstanceVersion) load(\"vkEnumerateInstanceVersion\", userptr);\n    vkEnumeratePhysicalDeviceGroups = (PFN_vkEnumeratePhysicalDeviceGroups) load(\"vkEnumeratePhysicalDeviceGroups\", userptr);\n    vkGetBufferMemoryRequirements2 = (PFN_vkGetBufferMemoryRequirements2) load(\"vkGetBufferMemoryRequirements2\", userptr);\n    vkGetDescriptorSetLayoutSupport = (PFN_vkGetDescriptorSetLayoutSupport) load(\"vkGetDescriptorSetLayoutSupport\", userptr);\n    vkGetDeviceGroupPeerMemoryFeatures = (PFN_vkGetDeviceGroupPeerMemoryFeatures) load(\"vkGetDeviceGroupPeerMemoryFeatures\", userptr);\n    vkGetDeviceQueue2 = (PFN_vkGetDeviceQueue2) load(\"vkGetDeviceQueue2\", userptr);\n    vkGetImageMemoryRequirements2 = (PFN_vkGetImageMemoryRequirements2) load(\"vkGetImageMemoryRequirements2\", userptr);\n    vkGetImageSparseMemoryRequirements2 = (PFN_vkGetImageSparseMemoryRequirements2) load(\"vkGetImageSparseMemoryRequirements2\", userptr);\n    vkGetPhysicalDeviceExternalBufferProperties = (PFN_vkGetPhysicalDeviceExternalBufferProperties) load(\"vkGetPhysicalDeviceExternalBufferProperties\", userptr);\n    vkGetPhysicalDeviceExternalFenceProperties = (PFN_vkGetPhysicalDeviceExternalFenceProperties) load(\"vkGetPhysicalDeviceExternalFenceProperties\", userptr);\n    vkGetPhysicalDeviceExternalSemaphoreProperties = (PFN_vkGetPhysicalDeviceExternalSemaphoreProperties) load(\"vkGetPhysicalDeviceExternalSemaphoreProperties\", userptr);\n    vkGetPhysicalDeviceFeatures2 = (PFN_vkGetPhysicalDeviceFeatures2) load(\"vkGetPhysicalDeviceFeatures2\", userptr);\n    vkGetPhysicalDeviceFormatProperties2 = (PFN_vkGetPhysicalDeviceFormatProperties2) load(\"vkGetPhysicalDeviceFormatProperties2\", userptr);\n    vkGetPhysicalDeviceImageFormatProperties2 = (PFN_vkGetPhysicalDeviceImageFormatProperties2) load(\"vkGetPhysicalDeviceImageFormatProperties2\", userptr);\n    vkGetPhysicalDeviceMemoryProperties2 = (PFN_vkGetPhysicalDeviceMemoryProperties2) load(\"vkGetPhysicalDeviceMemoryProperties2\", userptr);\n    vkGetPhysicalDeviceProperties2 = (PFN_vkGetPhysicalDeviceProperties2) load(\"vkGetPhysicalDeviceProperties2\", userptr);\n    vkGetPhysicalDeviceQueueFamilyProperties2 = (PFN_vkGetPhysicalDeviceQueueFamilyProperties2) load(\"vkGetPhysicalDeviceQueueFamilyProperties2\", userptr);\n    vkGetPhysicalDeviceSparseImageFormatProperties2 = (PFN_vkGetPhysicalDeviceSparseImageFormatProperties2) load(\"vkGetPhysicalDeviceSparseImageFormatProperties2\", userptr);\n    vkTrimCommandPool = (PFN_vkTrimCommandPool) load(\"vkTrimCommandPool\", userptr);\n    vkUpdateDescriptorSetWithTemplate = (PFN_vkUpdateDescriptorSetWithTemplate) load(\"vkUpdateDescriptorSetWithTemplate\", userptr);\n}\nstatic void glad_vk_load_VK_EXT_debug_report( GLADuserptrloadfunc load, void* userptr) {\n    if(!GLAD_VK_EXT_debug_report) return;\n    vkCreateDebugReportCallbackEXT = (PFN_vkCreateDebugReportCallbackEXT) load(\"vkCreateDebugReportCallbackEXT\", userptr);\n    vkDebugReportMessageEXT = (PFN_vkDebugReportMessageEXT) load(\"vkDebugReportMessageEXT\", userptr);\n    vkDestroyDebugReportCallbackEXT = (PFN_vkDestroyDebugReportCallbackEXT) load(\"vkDestroyDebugReportCallbackEXT\", userptr);\n}\nstatic void glad_vk_load_VK_KHR_surface( GLADuserptrloadfunc load, void* userptr) {\n    if(!GLAD_VK_KHR_surface) return;\n    vkDestroySurfaceKHR = (PFN_vkDestroySurfaceKHR) load(\"vkDestroySurfaceKHR\", userptr);\n    vkGetPhysicalDeviceSurfaceCapabilitiesKHR = (PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR) load(\"vkGetPhysicalDeviceSurfaceCapabilitiesKHR\", userptr);\n    vkGetPhysicalDeviceSurfaceFormatsKHR = (PFN_vkGetPhysicalDeviceSurfaceFormatsKHR) load(\"vkGetPhysicalDeviceSurfaceFormatsKHR\", userptr);\n    vkGetPhysicalDeviceSurfacePresentModesKHR = (PFN_vkGetPhysicalDeviceSurfacePresentModesKHR) load(\"vkGetPhysicalDeviceSurfacePresentModesKHR\", userptr);\n    vkGetPhysicalDeviceSurfaceSupportKHR = (PFN_vkGetPhysicalDeviceSurfaceSupportKHR) load(\"vkGetPhysicalDeviceSurfaceSupportKHR\", userptr);\n}\nstatic void glad_vk_load_VK_KHR_swapchain( GLADuserptrloadfunc load, void* userptr) {\n    if(!GLAD_VK_KHR_swapchain) return;\n    vkAcquireNextImage2KHR = (PFN_vkAcquireNextImage2KHR) load(\"vkAcquireNextImage2KHR\", userptr);\n    vkAcquireNextImageKHR = (PFN_vkAcquireNextImageKHR) load(\"vkAcquireNextImageKHR\", userptr);\n    vkCreateSwapchainKHR = (PFN_vkCreateSwapchainKHR) load(\"vkCreateSwapchainKHR\", userptr);\n    vkDestroySwapchainKHR = (PFN_vkDestroySwapchainKHR) load(\"vkDestroySwapchainKHR\", userptr);\n    vkGetDeviceGroupPresentCapabilitiesKHR = (PFN_vkGetDeviceGroupPresentCapabilitiesKHR) load(\"vkGetDeviceGroupPresentCapabilitiesKHR\", userptr);\n    vkGetDeviceGroupSurfacePresentModesKHR = (PFN_vkGetDeviceGroupSurfacePresentModesKHR) load(\"vkGetDeviceGroupSurfacePresentModesKHR\", userptr);\n    vkGetPhysicalDevicePresentRectanglesKHR = (PFN_vkGetPhysicalDevicePresentRectanglesKHR) load(\"vkGetPhysicalDevicePresentRectanglesKHR\", userptr);\n    vkGetSwapchainImagesKHR = (PFN_vkGetSwapchainImagesKHR) load(\"vkGetSwapchainImagesKHR\", userptr);\n    vkQueuePresentKHR = (PFN_vkQueuePresentKHR) load(\"vkQueuePresentKHR\", userptr);\n}\n\n\n\nstatic int glad_vk_get_extensions( VkPhysicalDevice physical_device, uint32_t *out_extension_count, char ***out_extensions) {\n    uint32_t i;\n    uint32_t instance_extension_count = 0;\n    uint32_t device_extension_count = 0;\n    uint32_t max_extension_count;\n    uint32_t total_extension_count;\n    char **extensions;\n    VkExtensionProperties *ext_properties;\n    VkResult result;\n\n    if (vkEnumerateInstanceExtensionProperties == NULL || (physical_device != NULL && vkEnumerateDeviceExtensionProperties == NULL)) {\n        return 0;\n    }\n\n    result = vkEnumerateInstanceExtensionProperties(NULL, &instance_extension_count, NULL);\n    if (result != VK_SUCCESS) {\n        return 0;\n    }\n\n    if (physical_device != NULL) {\n        result = vkEnumerateDeviceExtensionProperties(physical_device, NULL, &device_extension_count, NULL);\n        if (result != VK_SUCCESS) {\n            return 0;\n        }\n    }\n\n    total_extension_count = instance_extension_count + device_extension_count;\n    max_extension_count = instance_extension_count > device_extension_count\n        ? instance_extension_count : device_extension_count;\n\n    ext_properties = (VkExtensionProperties*) malloc(max_extension_count * sizeof(VkExtensionProperties));\n    if (ext_properties == NULL) {\n        return 0;\n    }\n\n    result = vkEnumerateInstanceExtensionProperties(NULL, &instance_extension_count, ext_properties);\n    if (result != VK_SUCCESS) {\n        free((void*) ext_properties);\n        return 0;\n    }\n\n    extensions = (char**) calloc(total_extension_count, sizeof(char*));\n    if (extensions == NULL) {\n        free((void*) ext_properties);\n        return 0;\n    }\n\n    for (i = 0; i < instance_extension_count; ++i) {\n        VkExtensionProperties ext = ext_properties[i];\n\n        size_t extension_name_length = strlen(ext.extensionName) + 1;\n        extensions[i] = (char*) malloc(extension_name_length * sizeof(char));\n        memcpy(extensions[i], ext.extensionName, extension_name_length * sizeof(char));\n    }\n\n    if (physical_device != NULL) {\n        result = vkEnumerateDeviceExtensionProperties(physical_device, NULL, &device_extension_count, ext_properties);\n        if (result != VK_SUCCESS) {\n            for (i = 0; i < instance_extension_count; ++i) {\n                free((void*) extensions[i]);\n            }\n            free(extensions);\n            return 0;\n        }\n\n        for (i = 0; i < device_extension_count; ++i) {\n            VkExtensionProperties ext = ext_properties[i];\n\n            size_t extension_name_length = strlen(ext.extensionName) + 1;\n            extensions[instance_extension_count + i] = (char*) malloc(extension_name_length * sizeof(char));\n            memcpy(extensions[instance_extension_count + i], ext.extensionName, extension_name_length * sizeof(char));\n        }\n    }\n\n    free((void*) ext_properties);\n\n    *out_extension_count = total_extension_count;\n    *out_extensions = extensions;\n\n    return 1;\n}\n\nstatic void glad_vk_free_extensions(uint32_t extension_count, char **extensions) {\n    uint32_t i;\n\n    for(i = 0; i < extension_count ; ++i) {\n        free((void*) (extensions[i]));\n    }\n\n    free((void*) extensions);\n}\n\nstatic int glad_vk_has_extension(const char *name, uint32_t extension_count, char **extensions) {\n    uint32_t i;\n\n    for (i = 0; i < extension_count; ++i) {\n        if(strcmp(name, extensions[i]) == 0) {\n            return 1;\n        }\n    }\n\n    return 0;\n}\n\nstatic GLADapiproc glad_vk_get_proc_from_userptr(const char* name, void *userptr) {\n    return (GLAD_GNUC_EXTENSION (GLADapiproc (*)(const char *name)) userptr)(name);\n}\n\nstatic int glad_vk_find_extensions_vulkan( VkPhysicalDevice physical_device) {\n    uint32_t extension_count = 0;\n    char **extensions = NULL;\n    if (!glad_vk_get_extensions(physical_device, &extension_count, &extensions)) return 0;\n\n    GLAD_VK_EXT_debug_report = glad_vk_has_extension(\"VK_EXT_debug_report\", extension_count, extensions);\n    GLAD_VK_KHR_surface = glad_vk_has_extension(\"VK_KHR_surface\", extension_count, extensions);\n    GLAD_VK_KHR_swapchain = glad_vk_has_extension(\"VK_KHR_swapchain\", extension_count, extensions);\n\n    glad_vk_free_extensions(extension_count, extensions);\n\n    return 1;\n}\n\nstatic int glad_vk_find_core_vulkan( VkPhysicalDevice physical_device) {\n    int major = 1;\n    int minor = 0;\n\n#ifdef VK_VERSION_1_1\n    if (vkEnumerateInstanceVersion  != NULL) {\n        uint32_t version;\n        VkResult result;\n\n        result = vkEnumerateInstanceVersion(&version);\n        if (result == VK_SUCCESS) {\n            major = (int) VK_VERSION_MAJOR(version);\n            minor = (int) VK_VERSION_MINOR(version);\n        }\n    }\n#endif\n\n    if (physical_device != NULL && vkGetPhysicalDeviceProperties  != NULL) {\n        VkPhysicalDeviceProperties properties;\n        vkGetPhysicalDeviceProperties(physical_device, &properties);\n\n        major = (int) VK_VERSION_MAJOR(properties.apiVersion);\n        minor = (int) VK_VERSION_MINOR(properties.apiVersion);\n    }\n\n    GLAD_VK_VERSION_1_0 = (major == 1 && minor >= 0) || major > 1;\n    GLAD_VK_VERSION_1_1 = (major == 1 && minor >= 1) || major > 1;\n\n    return GLAD_MAKE_VERSION(major, minor);\n}\n\nint gladLoadVulkanUserPtr( VkPhysicalDevice physical_device, GLADuserptrloadfunc load, void *userptr) {\n    int version;\n\n#ifdef VK_VERSION_1_1\n    vkEnumerateInstanceVersion  = (PFN_vkEnumerateInstanceVersion) load(\"vkEnumerateInstanceVersion\", userptr);\n#endif\n    version = glad_vk_find_core_vulkan( physical_device);\n    if (!version) {\n        return 0;\n    }\n\n    glad_vk_load_VK_VERSION_1_0(load, userptr);\n    glad_vk_load_VK_VERSION_1_1(load, userptr);\n\n    if (!glad_vk_find_extensions_vulkan( physical_device)) return 0;\n    glad_vk_load_VK_EXT_debug_report(load, userptr);\n    glad_vk_load_VK_KHR_surface(load, userptr);\n    glad_vk_load_VK_KHR_swapchain(load, userptr);\n\n\n    return version;\n}\n\n\nint gladLoadVulkan( VkPhysicalDevice physical_device, GLADloadfunc load) {\n    return gladLoadVulkanUserPtr( physical_device, glad_vk_get_proc_from_userptr, GLAD_GNUC_EXTENSION (void*) load);\n}\n\n\n\n\n"
  },
  {
    "path": "thirdparty/glfw/deps/linmath.h",
    "content": "#ifndef LINMATH_H\n#define LINMATH_H\n\n#include <math.h>\n\n#ifdef _MSC_VER\n#define inline __inline\n#endif\n\n#define LINMATH_H_DEFINE_VEC(n) \\\ntypedef float vec##n[n]; \\\nstatic inline void vec##n##_add(vec##n r, vec##n const a, vec##n const b) \\\n{ \\\n\tint i; \\\n\tfor(i=0; i<n; ++i) \\\n\t\tr[i] = a[i] + b[i]; \\\n} \\\nstatic inline void vec##n##_sub(vec##n r, vec##n const a, vec##n const b) \\\n{ \\\n\tint i; \\\n\tfor(i=0; i<n; ++i) \\\n\t\tr[i] = a[i] - b[i]; \\\n} \\\nstatic inline void vec##n##_scale(vec##n r, vec##n const v, float const s) \\\n{ \\\n\tint i; \\\n\tfor(i=0; i<n; ++i) \\\n\t\tr[i] = v[i] * s; \\\n} \\\nstatic inline float vec##n##_mul_inner(vec##n const a, vec##n const b) \\\n{ \\\n\tfloat p = 0.; \\\n\tint i; \\\n\tfor(i=0; i<n; ++i) \\\n\t\tp += b[i]*a[i]; \\\n\treturn p; \\\n} \\\nstatic inline float vec##n##_len(vec##n const v) \\\n{ \\\n\treturn (float) sqrt(vec##n##_mul_inner(v,v)); \\\n} \\\nstatic inline void vec##n##_norm(vec##n r, vec##n const v) \\\n{ \\\n\tfloat k = 1.f / vec##n##_len(v); \\\n\tvec##n##_scale(r, v, k); \\\n}\n\nLINMATH_H_DEFINE_VEC(2)\nLINMATH_H_DEFINE_VEC(3)\nLINMATH_H_DEFINE_VEC(4)\n\nstatic inline void vec3_mul_cross(vec3 r, vec3 const a, vec3 const b)\n{\n\tr[0] = a[1]*b[2] - a[2]*b[1];\n\tr[1] = a[2]*b[0] - a[0]*b[2];\n\tr[2] = a[0]*b[1] - a[1]*b[0];\n}\n\nstatic inline void vec3_reflect(vec3 r, vec3 const v, vec3 const n)\n{\n\tfloat p  = 2.f*vec3_mul_inner(v, n);\n\tint i;\n\tfor(i=0;i<3;++i)\n\t\tr[i] = v[i] - p*n[i];\n}\n\nstatic inline void vec4_mul_cross(vec4 r, vec4 a, vec4 b)\n{\n\tr[0] = a[1]*b[2] - a[2]*b[1];\n\tr[1] = a[2]*b[0] - a[0]*b[2];\n\tr[2] = a[0]*b[1] - a[1]*b[0];\n\tr[3] = 1.f;\n}\n\nstatic inline void vec4_reflect(vec4 r, vec4 v, vec4 n)\n{\n\tfloat p  = 2.f*vec4_mul_inner(v, n);\n\tint i;\n\tfor(i=0;i<4;++i)\n\t\tr[i] = v[i] - p*n[i];\n}\n\ntypedef vec4 mat4x4[4];\nstatic inline void mat4x4_identity(mat4x4 M)\n{\n\tint i, j;\n\tfor(i=0; i<4; ++i)\n\t\tfor(j=0; j<4; ++j)\n\t\t\tM[i][j] = i==j ? 1.f : 0.f;\n}\nstatic inline void mat4x4_dup(mat4x4 M, mat4x4 N)\n{\n\tint i, j;\n\tfor(i=0; i<4; ++i)\n\t\tfor(j=0; j<4; ++j)\n\t\t\tM[i][j] = N[i][j];\n}\nstatic inline void mat4x4_row(vec4 r, mat4x4 M, int i)\n{\n\tint k;\n\tfor(k=0; k<4; ++k)\n\t\tr[k] = M[k][i];\n}\nstatic inline void mat4x4_col(vec4 r, mat4x4 M, int i)\n{\n\tint k;\n\tfor(k=0; k<4; ++k)\n\t\tr[k] = M[i][k];\n}\nstatic inline void mat4x4_transpose(mat4x4 M, mat4x4 N)\n{\n\tint i, j;\n\tfor(j=0; j<4; ++j)\n\t\tfor(i=0; i<4; ++i)\n\t\t\tM[i][j] = N[j][i];\n}\nstatic inline void mat4x4_add(mat4x4 M, mat4x4 a, mat4x4 b)\n{\n\tint i;\n\tfor(i=0; i<4; ++i)\n\t\tvec4_add(M[i], a[i], b[i]);\n}\nstatic inline void mat4x4_sub(mat4x4 M, mat4x4 a, mat4x4 b)\n{\n\tint i;\n\tfor(i=0; i<4; ++i)\n\t\tvec4_sub(M[i], a[i], b[i]);\n}\nstatic inline void mat4x4_scale(mat4x4 M, mat4x4 a, float k)\n{\n\tint i;\n\tfor(i=0; i<4; ++i)\n\t\tvec4_scale(M[i], a[i], k);\n}\nstatic inline void mat4x4_scale_aniso(mat4x4 M, mat4x4 a, float x, float y, float z)\n{\n\tint i;\n\tvec4_scale(M[0], a[0], x);\n\tvec4_scale(M[1], a[1], y);\n\tvec4_scale(M[2], a[2], z);\n\tfor(i = 0; i < 4; ++i) {\n\t\tM[3][i] = a[3][i];\n\t}\n}\nstatic inline void mat4x4_mul(mat4x4 M, mat4x4 a, mat4x4 b)\n{\n\tmat4x4 temp;\n\tint k, r, c;\n\tfor(c=0; c<4; ++c) for(r=0; r<4; ++r) {\n\t\ttemp[c][r] = 0.f;\n\t\tfor(k=0; k<4; ++k)\n\t\t\ttemp[c][r] += a[k][r] * b[c][k];\n\t}\n\tmat4x4_dup(M, temp);\n}\nstatic inline void mat4x4_mul_vec4(vec4 r, mat4x4 M, vec4 v)\n{\n\tint i, j;\n\tfor(j=0; j<4; ++j) {\n\t\tr[j] = 0.f;\n\t\tfor(i=0; i<4; ++i)\n\t\t\tr[j] += M[i][j] * v[i];\n\t}\n}\nstatic inline void mat4x4_translate(mat4x4 T, float x, float y, float z)\n{\n\tmat4x4_identity(T);\n\tT[3][0] = x;\n\tT[3][1] = y;\n\tT[3][2] = z;\n}\nstatic inline void mat4x4_translate_in_place(mat4x4 M, float x, float y, float z)\n{\n\tvec4 t = {x, y, z, 0};\n\tvec4 r;\n\tint i;\n\tfor (i = 0; i < 4; ++i) {\n\t\tmat4x4_row(r, M, i);\n\t\tM[3][i] += vec4_mul_inner(r, t);\n\t}\n}\nstatic inline void mat4x4_from_vec3_mul_outer(mat4x4 M, vec3 a, vec3 b)\n{\n\tint i, j;\n\tfor(i=0; i<4; ++i) for(j=0; j<4; ++j)\n\t\tM[i][j] = i<3 && j<3 ? a[i] * b[j] : 0.f;\n}\nstatic inline void mat4x4_rotate(mat4x4 R, mat4x4 M, float x, float y, float z, float angle)\n{\n\tfloat s = sinf(angle);\n\tfloat c = cosf(angle);\n\tvec3 u = {x, y, z};\n\n\tif(vec3_len(u) > 1e-4) {\n\t\tmat4x4 T, C, S = {{0}};\n\n\t\tvec3_norm(u, u);\n\t\tmat4x4_from_vec3_mul_outer(T, u, u);\n\n\t\tS[1][2] =  u[0];\n\t\tS[2][1] = -u[0];\n\t\tS[2][0] =  u[1];\n\t\tS[0][2] = -u[1];\n\t\tS[0][1] =  u[2];\n\t\tS[1][0] = -u[2];\n\n\t\tmat4x4_scale(S, S, s);\n\n\t\tmat4x4_identity(C);\n\t\tmat4x4_sub(C, C, T);\n\n\t\tmat4x4_scale(C, C, c);\n\n\t\tmat4x4_add(T, T, C);\n\t\tmat4x4_add(T, T, S);\n\n\t\tT[3][3] = 1.;\n\t\tmat4x4_mul(R, M, T);\n\t} else {\n\t\tmat4x4_dup(R, M);\n\t}\n}\nstatic inline void mat4x4_rotate_X(mat4x4 Q, mat4x4 M, float angle)\n{\n\tfloat s = sinf(angle);\n\tfloat c = cosf(angle);\n\tmat4x4 R = {\n\t\t{1.f, 0.f, 0.f, 0.f},\n\t\t{0.f,   c,   s, 0.f},\n\t\t{0.f,  -s,   c, 0.f},\n\t\t{0.f, 0.f, 0.f, 1.f}\n\t};\n\tmat4x4_mul(Q, M, R);\n}\nstatic inline void mat4x4_rotate_Y(mat4x4 Q, mat4x4 M, float angle)\n{\n\tfloat s = sinf(angle);\n\tfloat c = cosf(angle);\n\tmat4x4 R = {\n\t\t{   c, 0.f,   s, 0.f},\n\t\t{ 0.f, 1.f, 0.f, 0.f},\n\t\t{  -s, 0.f,   c, 0.f},\n\t\t{ 0.f, 0.f, 0.f, 1.f}\n\t};\n\tmat4x4_mul(Q, M, R);\n}\nstatic inline void mat4x4_rotate_Z(mat4x4 Q, mat4x4 M, float angle)\n{\n\tfloat s = sinf(angle);\n\tfloat c = cosf(angle);\n\tmat4x4 R = {\n\t\t{   c,   s, 0.f, 0.f},\n\t\t{  -s,   c, 0.f, 0.f},\n\t\t{ 0.f, 0.f, 1.f, 0.f},\n\t\t{ 0.f, 0.f, 0.f, 1.f}\n\t};\n\tmat4x4_mul(Q, M, R);\n}\nstatic inline void mat4x4_invert(mat4x4 T, mat4x4 M)\n{\n\tfloat idet;\n\tfloat s[6];\n\tfloat c[6];\n\ts[0] = M[0][0]*M[1][1] - M[1][0]*M[0][1];\n\ts[1] = M[0][0]*M[1][2] - M[1][0]*M[0][2];\n\ts[2] = M[0][0]*M[1][3] - M[1][0]*M[0][3];\n\ts[3] = M[0][1]*M[1][2] - M[1][1]*M[0][2];\n\ts[4] = M[0][1]*M[1][3] - M[1][1]*M[0][3];\n\ts[5] = M[0][2]*M[1][3] - M[1][2]*M[0][3];\n\n\tc[0] = M[2][0]*M[3][1] - M[3][0]*M[2][1];\n\tc[1] = M[2][0]*M[3][2] - M[3][0]*M[2][2];\n\tc[2] = M[2][0]*M[3][3] - M[3][0]*M[2][3];\n\tc[3] = M[2][1]*M[3][2] - M[3][1]*M[2][2];\n\tc[4] = M[2][1]*M[3][3] - M[3][1]*M[2][3];\n\tc[5] = M[2][2]*M[3][3] - M[3][2]*M[2][3];\n\n\t/* Assumes it is invertible */\n\tidet = 1.0f/( s[0]*c[5]-s[1]*c[4]+s[2]*c[3]+s[3]*c[2]-s[4]*c[1]+s[5]*c[0] );\n\n\tT[0][0] = ( M[1][1] * c[5] - M[1][2] * c[4] + M[1][3] * c[3]) * idet;\n\tT[0][1] = (-M[0][1] * c[5] + M[0][2] * c[4] - M[0][3] * c[3]) * idet;\n\tT[0][2] = ( M[3][1] * s[5] - M[3][2] * s[4] + M[3][3] * s[3]) * idet;\n\tT[0][3] = (-M[2][1] * s[5] + M[2][2] * s[4] - M[2][3] * s[3]) * idet;\n\n\tT[1][0] = (-M[1][0] * c[5] + M[1][2] * c[2] - M[1][3] * c[1]) * idet;\n\tT[1][1] = ( M[0][0] * c[5] - M[0][2] * c[2] + M[0][3] * c[1]) * idet;\n\tT[1][2] = (-M[3][0] * s[5] + M[3][2] * s[2] - M[3][3] * s[1]) * idet;\n\tT[1][3] = ( M[2][0] * s[5] - M[2][2] * s[2] + M[2][3] * s[1]) * idet;\n\n\tT[2][0] = ( M[1][0] * c[4] - M[1][1] * c[2] + M[1][3] * c[0]) * idet;\n\tT[2][1] = (-M[0][0] * c[4] + M[0][1] * c[2] - M[0][3] * c[0]) * idet;\n\tT[2][2] = ( M[3][0] * s[4] - M[3][1] * s[2] + M[3][3] * s[0]) * idet;\n\tT[2][3] = (-M[2][0] * s[4] + M[2][1] * s[2] - M[2][3] * s[0]) * idet;\n\n\tT[3][0] = (-M[1][0] * c[3] + M[1][1] * c[1] - M[1][2] * c[0]) * idet;\n\tT[3][1] = ( M[0][0] * c[3] - M[0][1] * c[1] + M[0][2] * c[0]) * idet;\n\tT[3][2] = (-M[3][0] * s[3] + M[3][1] * s[1] - M[3][2] * s[0]) * idet;\n\tT[3][3] = ( M[2][0] * s[3] - M[2][1] * s[1] + M[2][2] * s[0]) * idet;\n}\nstatic inline void mat4x4_orthonormalize(mat4x4 R, mat4x4 M)\n{\n\tfloat s = 1.;\n\tvec3 h;\n\n\tmat4x4_dup(R, M);\n\tvec3_norm(R[2], R[2]);\n\n\ts = vec3_mul_inner(R[1], R[2]);\n\tvec3_scale(h, R[2], s);\n\tvec3_sub(R[1], R[1], h);\n\tvec3_norm(R[2], R[2]);\n\n\ts = vec3_mul_inner(R[1], R[2]);\n\tvec3_scale(h, R[2], s);\n\tvec3_sub(R[1], R[1], h);\n\tvec3_norm(R[1], R[1]);\n\n\ts = vec3_mul_inner(R[0], R[1]);\n\tvec3_scale(h, R[1], s);\n\tvec3_sub(R[0], R[0], h);\n\tvec3_norm(R[0], R[0]);\n}\n\nstatic inline void mat4x4_frustum(mat4x4 M, float l, float r, float b, float t, float n, float f)\n{\n\tM[0][0] = 2.f*n/(r-l);\n\tM[0][1] = M[0][2] = M[0][3] = 0.f;\n\n\tM[1][1] = 2.f*n/(t-b);\n\tM[1][0] = M[1][2] = M[1][3] = 0.f;\n\n\tM[2][0] = (r+l)/(r-l);\n\tM[2][1] = (t+b)/(t-b);\n\tM[2][2] = -(f+n)/(f-n);\n\tM[2][3] = -1.f;\n\n\tM[3][2] = -2.f*(f*n)/(f-n);\n\tM[3][0] = M[3][1] = M[3][3] = 0.f;\n}\nstatic inline void mat4x4_ortho(mat4x4 M, float l, float r, float b, float t, float n, float f)\n{\n\tM[0][0] = 2.f/(r-l);\n\tM[0][1] = M[0][2] = M[0][3] = 0.f;\n\n\tM[1][1] = 2.f/(t-b);\n\tM[1][0] = M[1][2] = M[1][3] = 0.f;\n\n\tM[2][2] = -2.f/(f-n);\n\tM[2][0] = M[2][1] = M[2][3] = 0.f;\n\n\tM[3][0] = -(r+l)/(r-l);\n\tM[3][1] = -(t+b)/(t-b);\n\tM[3][2] = -(f+n)/(f-n);\n\tM[3][3] = 1.f;\n}\nstatic inline void mat4x4_perspective(mat4x4 m, float y_fov, float aspect, float n, float f)\n{\n\t/* NOTE: Degrees are an unhandy unit to work with.\n\t * linmath.h uses radians for everything! */\n\tfloat const a = 1.f / (float) tan(y_fov / 2.f);\n\n\tm[0][0] = a / aspect;\n\tm[0][1] = 0.f;\n\tm[0][2] = 0.f;\n\tm[0][3] = 0.f;\n\n\tm[1][0] = 0.f;\n\tm[1][1] = a;\n\tm[1][2] = 0.f;\n\tm[1][3] = 0.f;\n\n\tm[2][0] = 0.f;\n\tm[2][1] = 0.f;\n\tm[2][2] = -((f + n) / (f - n));\n\tm[2][3] = -1.f;\n\n\tm[3][0] = 0.f;\n\tm[3][1] = 0.f;\n\tm[3][2] = -((2.f * f * n) / (f - n));\n\tm[3][3] = 0.f;\n}\nstatic inline void mat4x4_look_at(mat4x4 m, vec3 eye, vec3 center, vec3 up)\n{\n\t/* Adapted from Android's OpenGL Matrix.java.                        */\n\t/* See the OpenGL GLUT documentation for gluLookAt for a description */\n\t/* of the algorithm. We implement it in a straightforward way:       */\n\n\t/* TODO: The negation of of can be spared by swapping the order of\n\t *       operands in the following cross products in the right way. */\n\tvec3 f;\n\tvec3 s;\n\tvec3 t;\n\n\tvec3_sub(f, center, eye);\n\tvec3_norm(f, f);\n\n\tvec3_mul_cross(s, f, up);\n\tvec3_norm(s, s);\n\n\tvec3_mul_cross(t, s, f);\n\n\tm[0][0] =  s[0];\n\tm[0][1] =  t[0];\n\tm[0][2] = -f[0];\n\tm[0][3] =   0.f;\n\n\tm[1][0] =  s[1];\n\tm[1][1] =  t[1];\n\tm[1][2] = -f[1];\n\tm[1][3] =   0.f;\n\n\tm[2][0] =  s[2];\n\tm[2][1] =  t[2];\n\tm[2][2] = -f[2];\n\tm[2][3] =   0.f;\n\n\tm[3][0] =  0.f;\n\tm[3][1] =  0.f;\n\tm[3][2] =  0.f;\n\tm[3][3] =  1.f;\n\n\tmat4x4_translate_in_place(m, -eye[0], -eye[1], -eye[2]);\n}\n\ntypedef float quat[4];\nstatic inline void quat_identity(quat q)\n{\n\tq[0] = q[1] = q[2] = 0.f;\n\tq[3] = 1.f;\n}\nstatic inline void quat_add(quat r, quat a, quat b)\n{\n\tint i;\n\tfor(i=0; i<4; ++i)\n\t\tr[i] = a[i] + b[i];\n}\nstatic inline void quat_sub(quat r, quat a, quat b)\n{\n\tint i;\n\tfor(i=0; i<4; ++i)\n\t\tr[i] = a[i] - b[i];\n}\nstatic inline void quat_mul(quat r, quat p, quat q)\n{\n\tvec3 w;\n\tvec3_mul_cross(r, p, q);\n\tvec3_scale(w, p, q[3]);\n\tvec3_add(r, r, w);\n\tvec3_scale(w, q, p[3]);\n\tvec3_add(r, r, w);\n\tr[3] = p[3]*q[3] - vec3_mul_inner(p, q);\n}\nstatic inline void quat_scale(quat r, quat v, float s)\n{\n\tint i;\n\tfor(i=0; i<4; ++i)\n\t\tr[i] = v[i] * s;\n}\nstatic inline float quat_inner_product(quat a, quat b)\n{\n\tfloat p = 0.f;\n\tint i;\n\tfor(i=0; i<4; ++i)\n\t\tp += b[i]*a[i];\n\treturn p;\n}\nstatic inline void quat_conj(quat r, quat q)\n{\n\tint i;\n\tfor(i=0; i<3; ++i)\n\t\tr[i] = -q[i];\n\tr[3] = q[3];\n}\nstatic inline void quat_rotate(quat r, float angle, vec3 axis) {\n\tint i;\n\tvec3 v;\n\tvec3_scale(v, axis, sinf(angle / 2));\n\tfor(i=0; i<3; ++i)\n\t\tr[i] = v[i];\n\tr[3] = cosf(angle / 2);\n}\n#define quat_norm vec4_norm\nstatic inline void quat_mul_vec3(vec3 r, quat q, vec3 v)\n{\n/*\n * Method by Fabian 'ryg' Giessen (of Farbrausch)\nt = 2 * cross(q.xyz, v)\nv' = v + q.w * t + cross(q.xyz, t)\n */\n\tvec3 t = {q[0], q[1], q[2]};\n\tvec3 u = {q[0], q[1], q[2]};\n\n\tvec3_mul_cross(t, t, v);\n\tvec3_scale(t, t, 2);\n\n\tvec3_mul_cross(u, u, t);\n\tvec3_scale(t, t, q[3]);\n\n\tvec3_add(r, v, t);\n\tvec3_add(r, r, u);\n}\nstatic inline void mat4x4_from_quat(mat4x4 M, quat q)\n{\n\tfloat a = q[3];\n\tfloat b = q[0];\n\tfloat c = q[1];\n\tfloat d = q[2];\n\tfloat a2 = a*a;\n\tfloat b2 = b*b;\n\tfloat c2 = c*c;\n\tfloat d2 = d*d;\n\n\tM[0][0] = a2 + b2 - c2 - d2;\n\tM[0][1] = 2.f*(b*c + a*d);\n\tM[0][2] = 2.f*(b*d - a*c);\n\tM[0][3] = 0.f;\n\n\tM[1][0] = 2*(b*c - a*d);\n\tM[1][1] = a2 - b2 + c2 - d2;\n\tM[1][2] = 2.f*(c*d + a*b);\n\tM[1][3] = 0.f;\n\n\tM[2][0] = 2.f*(b*d + a*c);\n\tM[2][1] = 2.f*(c*d - a*b);\n\tM[2][2] = a2 - b2 - c2 + d2;\n\tM[2][3] = 0.f;\n\n\tM[3][0] = M[3][1] = M[3][2] = 0.f;\n\tM[3][3] = 1.f;\n}\n\nstatic inline void mat4x4o_mul_quat(mat4x4 R, mat4x4 M, quat q)\n{\n/*  XXX: The way this is written only works for othogonal matrices. */\n/* TODO: Take care of non-orthogonal case. */\n\tquat_mul_vec3(R[0], q, M[0]);\n\tquat_mul_vec3(R[1], q, M[1]);\n\tquat_mul_vec3(R[2], q, M[2]);\n\n\tR[3][0] = R[3][1] = R[3][2] = 0.f;\n\tR[3][3] = 1.f;\n}\nstatic inline void quat_from_mat4x4(quat q, mat4x4 M)\n{\n\tfloat r=0.f;\n\tint i;\n\n\tint perm[] = { 0, 1, 2, 0, 1 };\n\tint *p = perm;\n\n\tfor(i = 0; i<3; i++) {\n\t\tfloat m = M[i][i];\n\t\tif( m < r )\n\t\t\tcontinue;\n\t\tm = r;\n\t\tp = &perm[i];\n\t}\n\n\tr = (float) sqrt(1.f + M[p[0]][p[0]] - M[p[1]][p[1]] - M[p[2]][p[2]] );\n\n\tif(r < 1e-6) {\n\t\tq[0] = 1.f;\n\t\tq[1] = q[2] = q[3] = 0.f;\n\t\treturn;\n\t}\n\n\tq[0] = r/2.f;\n\tq[1] = (M[p[0]][p[1]] - M[p[1]][p[0]])/(2.f*r);\n\tq[2] = (M[p[2]][p[0]] - M[p[0]][p[2]])/(2.f*r);\n\tq[3] = (M[p[2]][p[1]] - M[p[1]][p[2]])/(2.f*r);\n}\n\n#endif\n"
  },
  {
    "path": "thirdparty/glfw/deps/mingw/_mingw_dxhelper.h",
    "content": "/**\n * This file has no copyright assigned and is placed in the Public Domain.\n * This file is part of the mingw-w64 runtime package.\n * No warranty is given; refer to the file DISCLAIMER within this package.\n */\n\n#if defined(_MSC_VER) && !defined(_MSC_EXTENSIONS)\n#define NONAMELESSUNION\t\t1\n#endif\n#if defined(NONAMELESSSTRUCT) && \\\n   !defined(NONAMELESSUNION)\n#define NONAMELESSUNION\t\t1\n#endif\n#if defined(NONAMELESSUNION)  && \\\n   !defined(NONAMELESSSTRUCT)\n#define NONAMELESSSTRUCT\t1\n#endif\n#if !defined(__GNU_EXTENSION)\n#if defined(__GNUC__) || defined(__GNUG__)\n#define __GNU_EXTENSION\t\t__extension__\n#else\n#define __GNU_EXTENSION\n#endif\n#endif /* __extension__ */\n\n#ifndef __ANONYMOUS_DEFINED\n#define __ANONYMOUS_DEFINED\n#if defined(__GNUC__) || defined(__GNUG__)\n#define _ANONYMOUS_UNION\t__extension__\n#define _ANONYMOUS_STRUCT\t__extension__\n#else\n#define _ANONYMOUS_UNION\n#define _ANONYMOUS_STRUCT\n#endif\n#ifndef NONAMELESSUNION\n#define _UNION_NAME(x)\n#define _STRUCT_NAME(x)\n#else /* NONAMELESSUNION */\n#define _UNION_NAME(x)  x\n#define _STRUCT_NAME(x) x\n#endif\n#endif\t/* __ANONYMOUS_DEFINED */\n\n#ifndef DUMMYUNIONNAME\n# ifdef NONAMELESSUNION\n#  define DUMMYUNIONNAME  u\n#  define DUMMYUNIONNAME1 u1\t/* Wine uses this variant */\n#  define DUMMYUNIONNAME2 u2\n#  define DUMMYUNIONNAME3 u3\n#  define DUMMYUNIONNAME4 u4\n#  define DUMMYUNIONNAME5 u5\n#  define DUMMYUNIONNAME6 u6\n#  define DUMMYUNIONNAME7 u7\n#  define DUMMYUNIONNAME8 u8\n#  define DUMMYUNIONNAME9 u9\n# else /* NONAMELESSUNION */\n#  define DUMMYUNIONNAME\n#  define DUMMYUNIONNAME1\t/* Wine uses this variant */\n#  define DUMMYUNIONNAME2\n#  define DUMMYUNIONNAME3\n#  define DUMMYUNIONNAME4\n#  define DUMMYUNIONNAME5\n#  define DUMMYUNIONNAME6\n#  define DUMMYUNIONNAME7\n#  define DUMMYUNIONNAME8\n#  define DUMMYUNIONNAME9\n# endif\n#endif\t/* DUMMYUNIONNAME */\n\n#if !defined(DUMMYUNIONNAME1)\t/* MinGW does not define this one */\n# ifdef NONAMELESSUNION\n#  define DUMMYUNIONNAME1 u1\t/* Wine uses this variant */\n# else\n#  define DUMMYUNIONNAME1\t/* Wine uses this variant */\n# endif\n#endif\t/* DUMMYUNIONNAME1 */\n\n#ifndef DUMMYSTRUCTNAME\n# ifdef NONAMELESSUNION\n#  define DUMMYSTRUCTNAME  s\n#  define DUMMYSTRUCTNAME1 s1\t/* Wine uses this variant */\n#  define DUMMYSTRUCTNAME2 s2\n#  define DUMMYSTRUCTNAME3 s3\n#  define DUMMYSTRUCTNAME4 s4\n#  define DUMMYSTRUCTNAME5 s5\n# else\n#  define DUMMYSTRUCTNAME\n#  define DUMMYSTRUCTNAME1\t/* Wine uses this variant */\n#  define DUMMYSTRUCTNAME2\n#  define DUMMYSTRUCTNAME3\n#  define DUMMYSTRUCTNAME4\n#  define DUMMYSTRUCTNAME5\n# endif\n#endif /* DUMMYSTRUCTNAME */\n\n/* These are for compatibility with the Wine source tree */\n\n#ifndef WINELIB_NAME_AW\n# ifdef __MINGW_NAME_AW\n#   define WINELIB_NAME_AW  __MINGW_NAME_AW\n# else\n#  ifdef UNICODE\n#   define WINELIB_NAME_AW(func) func##W\n#  else\n#   define WINELIB_NAME_AW(func) func##A\n#  endif\n# endif\n#endif\t/* WINELIB_NAME_AW */\n\n#ifndef DECL_WINELIB_TYPE_AW\n# ifdef __MINGW_TYPEDEF_AW\n#  define DECL_WINELIB_TYPE_AW  __MINGW_TYPEDEF_AW\n# else\n#  define DECL_WINELIB_TYPE_AW(type)  typedef WINELIB_NAME_AW(type) type;\n# endif\n#endif\t/* DECL_WINELIB_TYPE_AW */\n\n"
  },
  {
    "path": "thirdparty/glfw/deps/mingw/dinput.h",
    "content": "/*\n * Copyright (C) the Wine project\n *\n * This library is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 2.1 of the License, or (at your option) any later version.\n *\n * This library is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with this library; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA\n */\n\n#ifndef __DINPUT_INCLUDED__\n#define __DINPUT_INCLUDED__\n\n#define COM_NO_WINDOWS_H\n#include <objbase.h>\n#include <_mingw_dxhelper.h>\n\n#ifndef DIRECTINPUT_VERSION\n#define DIRECTINPUT_VERSION\t0x0800\n#endif\n\n/* Classes */\nDEFINE_GUID(CLSID_DirectInput,\t\t0x25E609E0,0xB259,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);\nDEFINE_GUID(CLSID_DirectInputDevice,\t0x25E609E1,0xB259,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);\n\nDEFINE_GUID(CLSID_DirectInput8,\t\t0x25E609E4,0xB259,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);\nDEFINE_GUID(CLSID_DirectInputDevice8,\t0x25E609E5,0xB259,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);\n\n/* Interfaces */\nDEFINE_GUID(IID_IDirectInputA,\t\t0x89521360,0xAA8A,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);\nDEFINE_GUID(IID_IDirectInputW,\t\t0x89521361,0xAA8A,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);\nDEFINE_GUID(IID_IDirectInput2A,\t\t0x5944E662,0xAA8A,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);\nDEFINE_GUID(IID_IDirectInput2W,\t\t0x5944E663,0xAA8A,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);\nDEFINE_GUID(IID_IDirectInput7A,\t\t0x9A4CB684,0x236D,0x11D3,0x8E,0x9D,0x00,0xC0,0x4F,0x68,0x44,0xAE);\nDEFINE_GUID(IID_IDirectInput7W,\t\t0x9A4CB685,0x236D,0x11D3,0x8E,0x9D,0x00,0xC0,0x4F,0x68,0x44,0xAE);\nDEFINE_GUID(IID_IDirectInput8A,\t\t0xBF798030,0x483A,0x4DA2,0xAA,0x99,0x5D,0x64,0xED,0x36,0x97,0x00);\nDEFINE_GUID(IID_IDirectInput8W,\t\t0xBF798031,0x483A,0x4DA2,0xAA,0x99,0x5D,0x64,0xED,0x36,0x97,0x00);\nDEFINE_GUID(IID_IDirectInputDeviceA,\t0x5944E680,0xC92E,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);\nDEFINE_GUID(IID_IDirectInputDeviceW,\t0x5944E681,0xC92E,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);\nDEFINE_GUID(IID_IDirectInputDevice2A,\t0x5944E682,0xC92E,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);\nDEFINE_GUID(IID_IDirectInputDevice2W,\t0x5944E683,0xC92E,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);\nDEFINE_GUID(IID_IDirectInputDevice7A,\t0x57D7C6BC,0x2356,0x11D3,0x8E,0x9D,0x00,0xC0,0x4F,0x68,0x44,0xAE);\nDEFINE_GUID(IID_IDirectInputDevice7W,\t0x57D7C6BD,0x2356,0x11D3,0x8E,0x9D,0x00,0xC0,0x4F,0x68,0x44,0xAE);\nDEFINE_GUID(IID_IDirectInputDevice8A,\t0x54D41080,0xDC15,0x4833,0xA4,0x1B,0x74,0x8F,0x73,0xA3,0x81,0x79);\nDEFINE_GUID(IID_IDirectInputDevice8W,\t0x54D41081,0xDC15,0x4833,0xA4,0x1B,0x74,0x8F,0x73,0xA3,0x81,0x79);\nDEFINE_GUID(IID_IDirectInputEffect,\t0xE7E1F7C0,0x88D2,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);\n\n/* Predefined object types */\nDEFINE_GUID(GUID_XAxis,\t0xA36D02E0,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);\nDEFINE_GUID(GUID_YAxis,\t0xA36D02E1,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);\nDEFINE_GUID(GUID_ZAxis,\t0xA36D02E2,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);\nDEFINE_GUID(GUID_RxAxis,0xA36D02F4,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);\nDEFINE_GUID(GUID_RyAxis,0xA36D02F5,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);\nDEFINE_GUID(GUID_RzAxis,0xA36D02E3,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);\nDEFINE_GUID(GUID_Slider,0xA36D02E4,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);\nDEFINE_GUID(GUID_Button,0xA36D02F0,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);\nDEFINE_GUID(GUID_Key,\t0x55728220,0xD33C,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);\nDEFINE_GUID(GUID_POV,\t0xA36D02F2,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);\nDEFINE_GUID(GUID_Unknown,0xA36D02F3,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);\n\n/* Predefined product GUIDs */\nDEFINE_GUID(GUID_SysMouse,\t0x6F1D2B60,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);\nDEFINE_GUID(GUID_SysKeyboard,\t0x6F1D2B61,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);\nDEFINE_GUID(GUID_Joystick,\t0x6F1D2B70,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);\nDEFINE_GUID(GUID_SysMouseEm,\t0x6F1D2B80,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);\nDEFINE_GUID(GUID_SysMouseEm2,\t0x6F1D2B81,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);\nDEFINE_GUID(GUID_SysKeyboardEm,\t0x6F1D2B82,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);\nDEFINE_GUID(GUID_SysKeyboardEm2,0x6F1D2B83,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);\n\n/* predefined forcefeedback effects */\nDEFINE_GUID(GUID_ConstantForce,\t0x13541C20,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);\nDEFINE_GUID(GUID_RampForce,\t0x13541C21,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);\nDEFINE_GUID(GUID_Square,\t0x13541C22,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);\nDEFINE_GUID(GUID_Sine,\t\t0x13541C23,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);\nDEFINE_GUID(GUID_Triangle,\t0x13541C24,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);\nDEFINE_GUID(GUID_SawtoothUp,\t0x13541C25,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);\nDEFINE_GUID(GUID_SawtoothDown,\t0x13541C26,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);\nDEFINE_GUID(GUID_Spring,\t0x13541C27,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);\nDEFINE_GUID(GUID_Damper,\t0x13541C28,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);\nDEFINE_GUID(GUID_Inertia,\t0x13541C29,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);\nDEFINE_GUID(GUID_Friction,\t0x13541C2A,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);\nDEFINE_GUID(GUID_CustomForce,\t0x13541C2B,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);\n\ntypedef struct IDirectInputA *LPDIRECTINPUTA;\ntypedef struct IDirectInputW *LPDIRECTINPUTW;\ntypedef struct IDirectInput2A *LPDIRECTINPUT2A;\ntypedef struct IDirectInput2W *LPDIRECTINPUT2W;\ntypedef struct IDirectInput7A *LPDIRECTINPUT7A;\ntypedef struct IDirectInput7W *LPDIRECTINPUT7W;\n#if DIRECTINPUT_VERSION >= 0x0800\ntypedef struct IDirectInput8A *LPDIRECTINPUT8A;\ntypedef struct IDirectInput8W *LPDIRECTINPUT8W;\n#endif /* DI8 */\ntypedef struct IDirectInputDeviceA *LPDIRECTINPUTDEVICEA;\ntypedef struct IDirectInputDeviceW *LPDIRECTINPUTDEVICEW;\n#if DIRECTINPUT_VERSION >= 0x0500\ntypedef struct IDirectInputDevice2A *LPDIRECTINPUTDEVICE2A;\ntypedef struct IDirectInputDevice2W *LPDIRECTINPUTDEVICE2W;\n#endif /* DI5 */\n#if DIRECTINPUT_VERSION >= 0x0700\ntypedef struct IDirectInputDevice7A *LPDIRECTINPUTDEVICE7A;\ntypedef struct IDirectInputDevice7W *LPDIRECTINPUTDEVICE7W;\n#endif /* DI7 */\n#if DIRECTINPUT_VERSION >= 0x0800\ntypedef struct IDirectInputDevice8A *LPDIRECTINPUTDEVICE8A;\ntypedef struct IDirectInputDevice8W *LPDIRECTINPUTDEVICE8W;\n#endif /* DI8 */\n#if DIRECTINPUT_VERSION >= 0x0500\ntypedef struct IDirectInputEffect *LPDIRECTINPUTEFFECT;\n#endif /* DI5 */\ntypedef struct SysKeyboardA *LPSYSKEYBOARDA;\ntypedef struct SysMouseA *LPSYSMOUSEA;\n\n#define IID_IDirectInput WINELIB_NAME_AW(IID_IDirectInput)\n#define IDirectInput WINELIB_NAME_AW(IDirectInput)\nDECL_WINELIB_TYPE_AW(LPDIRECTINPUT)\n#define IID_IDirectInput2 WINELIB_NAME_AW(IID_IDirectInput2)\n#define IDirectInput2 WINELIB_NAME_AW(IDirectInput2)\nDECL_WINELIB_TYPE_AW(LPDIRECTINPUT2)\n#define IID_IDirectInput7 WINELIB_NAME_AW(IID_IDirectInput7)\n#define IDirectInput7 WINELIB_NAME_AW(IDirectInput7)\nDECL_WINELIB_TYPE_AW(LPDIRECTINPUT7)\n#if DIRECTINPUT_VERSION >= 0x0800\n#define IID_IDirectInput8 WINELIB_NAME_AW(IID_IDirectInput8)\n#define IDirectInput8 WINELIB_NAME_AW(IDirectInput8)\nDECL_WINELIB_TYPE_AW(LPDIRECTINPUT8)\n#endif /* DI8 */\n#define IID_IDirectInputDevice WINELIB_NAME_AW(IID_IDirectInputDevice)\n#define IDirectInputDevice WINELIB_NAME_AW(IDirectInputDevice)\nDECL_WINELIB_TYPE_AW(LPDIRECTINPUTDEVICE)\n#if DIRECTINPUT_VERSION >= 0x0500\n#define IID_IDirectInputDevice2 WINELIB_NAME_AW(IID_IDirectInputDevice2)\n#define IDirectInputDevice2 WINELIB_NAME_AW(IDirectInputDevice2)\nDECL_WINELIB_TYPE_AW(LPDIRECTINPUTDEVICE2)\n#endif /* DI5 */\n#if DIRECTINPUT_VERSION >= 0x0700\n#define IID_IDirectInputDevice7 WINELIB_NAME_AW(IID_IDirectInputDevice7)\n#define IDirectInputDevice7 WINELIB_NAME_AW(IDirectInputDevice7)\nDECL_WINELIB_TYPE_AW(LPDIRECTINPUTDEVICE7)\n#endif /* DI7 */\n#if DIRECTINPUT_VERSION >= 0x0800\n#define IID_IDirectInputDevice8 WINELIB_NAME_AW(IID_IDirectInputDevice8)\n#define IDirectInputDevice8 WINELIB_NAME_AW(IDirectInputDevice8)\nDECL_WINELIB_TYPE_AW(LPDIRECTINPUTDEVICE8)\n#endif /* DI8 */\n\n#define DI_OK                           S_OK\n#define DI_NOTATTACHED                  S_FALSE\n#define DI_BUFFEROVERFLOW               S_FALSE\n#define DI_PROPNOEFFECT                 S_FALSE\n#define DI_NOEFFECT                     S_FALSE\n#define DI_POLLEDDEVICE                 ((HRESULT)0x00000002L)\n#define DI_DOWNLOADSKIPPED              ((HRESULT)0x00000003L)\n#define DI_EFFECTRESTARTED              ((HRESULT)0x00000004L)\n#define DI_TRUNCATED                    ((HRESULT)0x00000008L)\n#define DI_SETTINGSNOTSAVED             ((HRESULT)0x0000000BL)\n#define DI_TRUNCATEDANDRESTARTED        ((HRESULT)0x0000000CL)\n#define DI_WRITEPROTECT                 ((HRESULT)0x00000013L)\n\n#define DIERR_OLDDIRECTINPUTVERSION     \\\n    MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_OLD_WIN_VERSION)\n#define DIERR_BETADIRECTINPUTVERSION    \\\n    MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_RMODE_APP)\n#define DIERR_BADDRIVERVER              \\\n    MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_BAD_DRIVER_LEVEL)\n#define DIERR_DEVICENOTREG              REGDB_E_CLASSNOTREG\n#define DIERR_NOTFOUND                  \\\n    MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_FILE_NOT_FOUND)\n#define DIERR_OBJECTNOTFOUND            \\\n    MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_FILE_NOT_FOUND)\n#define DIERR_INVALIDPARAM              E_INVALIDARG\n#define DIERR_NOINTERFACE               E_NOINTERFACE\n#define DIERR_GENERIC                   E_FAIL\n#define DIERR_OUTOFMEMORY               E_OUTOFMEMORY\n#define DIERR_UNSUPPORTED               E_NOTIMPL\n#define DIERR_NOTINITIALIZED            \\\n    MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_NOT_READY)\n#define DIERR_ALREADYINITIALIZED        \\\n    MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_ALREADY_INITIALIZED)\n#define DIERR_NOAGGREGATION             CLASS_E_NOAGGREGATION\n#define DIERR_OTHERAPPHASPRIO           E_ACCESSDENIED\n#define DIERR_INPUTLOST                 \\\n    MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_READ_FAULT)\n#define DIERR_ACQUIRED                  \\\n    MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_BUSY)\n#define DIERR_NOTACQUIRED               \\\n    MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_INVALID_ACCESS)\n#define DIERR_READONLY                  E_ACCESSDENIED\n#define DIERR_HANDLEEXISTS              E_ACCESSDENIED\n#ifndef E_PENDING\n#define E_PENDING                       0x8000000AL\n#endif\n#define DIERR_INSUFFICIENTPRIVS         0x80040200L\n#define DIERR_DEVICEFULL                0x80040201L\n#define DIERR_MOREDATA                  0x80040202L\n#define DIERR_NOTDOWNLOADED             0x80040203L\n#define DIERR_HASEFFECTS                0x80040204L\n#define DIERR_NOTEXCLUSIVEACQUIRED      0x80040205L\n#define DIERR_INCOMPLETEEFFECT          0x80040206L\n#define DIERR_NOTBUFFERED               0x80040207L\n#define DIERR_EFFECTPLAYING             0x80040208L\n#define DIERR_UNPLUGGED                 0x80040209L\n#define DIERR_REPORTFULL                0x8004020AL\n#define DIERR_MAPFILEFAIL               0x8004020BL\n\n#define DIENUM_STOP                     0\n#define DIENUM_CONTINUE                 1\n\n#define DIEDFL_ALLDEVICES               0x00000000\n#define DIEDFL_ATTACHEDONLY             0x00000001\n#define DIEDFL_FORCEFEEDBACK            0x00000100\n#define DIEDFL_INCLUDEALIASES           0x00010000\n#define DIEDFL_INCLUDEPHANTOMS          0x00020000\n#define DIEDFL_INCLUDEHIDDEN\t\t0x00040000\n\n#define DIDEVTYPE_DEVICE                1\n#define DIDEVTYPE_MOUSE                 2\n#define DIDEVTYPE_KEYBOARD              3\n#define DIDEVTYPE_JOYSTICK              4\n#define DIDEVTYPE_HID                   0x00010000\n\n#define DI8DEVCLASS_ALL             0\n#define DI8DEVCLASS_DEVICE          1\n#define DI8DEVCLASS_POINTER         2\n#define DI8DEVCLASS_KEYBOARD        3\n#define DI8DEVCLASS_GAMECTRL        4\n\n#define DI8DEVTYPE_DEVICE           0x11\n#define DI8DEVTYPE_MOUSE            0x12\n#define DI8DEVTYPE_KEYBOARD         0x13\n#define DI8DEVTYPE_JOYSTICK         0x14\n#define DI8DEVTYPE_GAMEPAD          0x15\n#define DI8DEVTYPE_DRIVING          0x16\n#define DI8DEVTYPE_FLIGHT           0x17\n#define DI8DEVTYPE_1STPERSON        0x18\n#define DI8DEVTYPE_DEVICECTRL       0x19\n#define DI8DEVTYPE_SCREENPOINTER    0x1A\n#define DI8DEVTYPE_REMOTE           0x1B\n#define DI8DEVTYPE_SUPPLEMENTAL     0x1C\n\t\n#define DIDEVTYPEMOUSE_UNKNOWN          1\n#define DIDEVTYPEMOUSE_TRADITIONAL      2\n#define DIDEVTYPEMOUSE_FINGERSTICK      3\n#define DIDEVTYPEMOUSE_TOUCHPAD         4\n#define DIDEVTYPEMOUSE_TRACKBALL        5\n\n#define DIDEVTYPEKEYBOARD_UNKNOWN       0\n#define DIDEVTYPEKEYBOARD_PCXT          1\n#define DIDEVTYPEKEYBOARD_OLIVETTI      2\n#define DIDEVTYPEKEYBOARD_PCAT          3\n#define DIDEVTYPEKEYBOARD_PCENH         4\n#define DIDEVTYPEKEYBOARD_NOKIA1050     5\n#define DIDEVTYPEKEYBOARD_NOKIA9140     6\n#define DIDEVTYPEKEYBOARD_NEC98         7\n#define DIDEVTYPEKEYBOARD_NEC98LAPTOP   8\n#define DIDEVTYPEKEYBOARD_NEC98106      9\n#define DIDEVTYPEKEYBOARD_JAPAN106     10\n#define DIDEVTYPEKEYBOARD_JAPANAX      11\n#define DIDEVTYPEKEYBOARD_J3100        12\n\n#define DIDEVTYPEJOYSTICK_UNKNOWN       1\n#define DIDEVTYPEJOYSTICK_TRADITIONAL   2\n#define DIDEVTYPEJOYSTICK_FLIGHTSTICK   3\n#define DIDEVTYPEJOYSTICK_GAMEPAD       4\n#define DIDEVTYPEJOYSTICK_RUDDER        5\n#define DIDEVTYPEJOYSTICK_WHEEL         6\n#define DIDEVTYPEJOYSTICK_HEADTRACKER   7\n\n#define DI8DEVTYPEMOUSE_UNKNOWN                     1\n#define DI8DEVTYPEMOUSE_TRADITIONAL                 2\n#define DI8DEVTYPEMOUSE_FINGERSTICK                 3\n#define DI8DEVTYPEMOUSE_TOUCHPAD                    4\n#define DI8DEVTYPEMOUSE_TRACKBALL                   5\n#define DI8DEVTYPEMOUSE_ABSOLUTE                    6\n\n#define DI8DEVTYPEKEYBOARD_UNKNOWN                  0\n#define DI8DEVTYPEKEYBOARD_PCXT                     1\n#define DI8DEVTYPEKEYBOARD_OLIVETTI                 2\n#define DI8DEVTYPEKEYBOARD_PCAT                     3\n#define DI8DEVTYPEKEYBOARD_PCENH                    4\n#define DI8DEVTYPEKEYBOARD_NOKIA1050                5\n#define DI8DEVTYPEKEYBOARD_NOKIA9140                6\n#define DI8DEVTYPEKEYBOARD_NEC98                    7\n#define DI8DEVTYPEKEYBOARD_NEC98LAPTOP              8\n#define DI8DEVTYPEKEYBOARD_NEC98106                 9\n#define DI8DEVTYPEKEYBOARD_JAPAN106                10\n#define DI8DEVTYPEKEYBOARD_JAPANAX                 11\n#define DI8DEVTYPEKEYBOARD_J3100                   12\n\n#define DI8DEVTYPE_LIMITEDGAMESUBTYPE               1\n\n#define DI8DEVTYPEJOYSTICK_LIMITED                  DI8DEVTYPE_LIMITEDGAMESUBTYPE\n#define DI8DEVTYPEJOYSTICK_STANDARD                 2\n\n#define DI8DEVTYPEGAMEPAD_LIMITED                   DI8DEVTYPE_LIMITEDGAMESUBTYPE\n#define DI8DEVTYPEGAMEPAD_STANDARD                  2\n#define DI8DEVTYPEGAMEPAD_TILT                      3\n\n#define DI8DEVTYPEDRIVING_LIMITED                   DI8DEVTYPE_LIMITEDGAMESUBTYPE\n#define DI8DEVTYPEDRIVING_COMBINEDPEDALS            2\n#define DI8DEVTYPEDRIVING_DUALPEDALS                3\n#define DI8DEVTYPEDRIVING_THREEPEDALS               4\n#define DI8DEVTYPEDRIVING_HANDHELD                  5\n\n#define DI8DEVTYPEFLIGHT_LIMITED                    DI8DEVTYPE_LIMITEDGAMESUBTYPE\n#define DI8DEVTYPEFLIGHT_STICK                      2\n#define DI8DEVTYPEFLIGHT_YOKE                       3\n#define DI8DEVTYPEFLIGHT_RC                         4\n\n#define DI8DEVTYPE1STPERSON_LIMITED                 DI8DEVTYPE_LIMITEDGAMESUBTYPE\n#define DI8DEVTYPE1STPERSON_UNKNOWN                 2\n#define DI8DEVTYPE1STPERSON_SIXDOF                  3\n#define DI8DEVTYPE1STPERSON_SHOOTER                 4\n\n#define DI8DEVTYPESCREENPTR_UNKNOWN                 2\n#define DI8DEVTYPESCREENPTR_LIGHTGUN                3\n#define DI8DEVTYPESCREENPTR_LIGHTPEN                4\n#define DI8DEVTYPESCREENPTR_TOUCH                   5\n\n#define DI8DEVTYPEREMOTE_UNKNOWN                    2\n\n#define DI8DEVTYPEDEVICECTRL_UNKNOWN                2\n#define DI8DEVTYPEDEVICECTRL_COMMSSELECTION         3\n#define DI8DEVTYPEDEVICECTRL_COMMSSELECTION_HARDWIRED 4\n\n#define DI8DEVTYPESUPPLEMENTAL_UNKNOWN              2\n#define DI8DEVTYPESUPPLEMENTAL_2NDHANDCONTROLLER    3\n#define DI8DEVTYPESUPPLEMENTAL_HEADTRACKER          4\n#define DI8DEVTYPESUPPLEMENTAL_HANDTRACKER          5\n#define DI8DEVTYPESUPPLEMENTAL_SHIFTSTICKGATE       6\n#define DI8DEVTYPESUPPLEMENTAL_SHIFTER              7\n#define DI8DEVTYPESUPPLEMENTAL_THROTTLE             8\n#define DI8DEVTYPESUPPLEMENTAL_SPLITTHROTTLE        9\n#define DI8DEVTYPESUPPLEMENTAL_COMBINEDPEDALS      10\n#define DI8DEVTYPESUPPLEMENTAL_DUALPEDALS          11\n#define DI8DEVTYPESUPPLEMENTAL_THREEPEDALS         12\n#define DI8DEVTYPESUPPLEMENTAL_RUDDERPEDALS        13\n\t\n#define GET_DIDEVICE_TYPE(dwDevType)     LOBYTE(dwDevType)\n#define GET_DIDEVICE_SUBTYPE(dwDevType)  HIBYTE(dwDevType)\n\ntypedef struct DIDEVICEOBJECTINSTANCE_DX3A {\n    DWORD   dwSize;\n    GUID    guidType;\n    DWORD   dwOfs;\n    DWORD   dwType;\n    DWORD   dwFlags;\n    CHAR    tszName[MAX_PATH];\n} DIDEVICEOBJECTINSTANCE_DX3A, *LPDIDEVICEOBJECTINSTANCE_DX3A;\ntypedef const DIDEVICEOBJECTINSTANCE_DX3A *LPCDIDEVICEOBJECTINSTANCE_DX3A;\ntypedef struct DIDEVICEOBJECTINSTANCE_DX3W {\n    DWORD   dwSize;\n    GUID    guidType;\n    DWORD   dwOfs;\n    DWORD   dwType;\n    DWORD   dwFlags;\n    WCHAR   tszName[MAX_PATH];\n} DIDEVICEOBJECTINSTANCE_DX3W, *LPDIDEVICEOBJECTINSTANCE_DX3W;\ntypedef const DIDEVICEOBJECTINSTANCE_DX3W *LPCDIDEVICEOBJECTINSTANCE_DX3W;\n\nDECL_WINELIB_TYPE_AW(DIDEVICEOBJECTINSTANCE_DX3)\nDECL_WINELIB_TYPE_AW(LPDIDEVICEOBJECTINSTANCE_DX3)\nDECL_WINELIB_TYPE_AW(LPCDIDEVICEOBJECTINSTANCE_DX3)\n\ntypedef struct DIDEVICEOBJECTINSTANCEA {\n    DWORD\tdwSize;\n    GUID\tguidType;\n    DWORD\tdwOfs;\n    DWORD\tdwType;\n    DWORD\tdwFlags;\n    CHAR\ttszName[MAX_PATH];\n#if(DIRECTINPUT_VERSION >= 0x0500)\n    DWORD\tdwFFMaxForce;\n    DWORD\tdwFFForceResolution;\n    WORD\twCollectionNumber;\n    WORD\twDesignatorIndex;\n    WORD\twUsagePage;\n    WORD\twUsage;\n    DWORD\tdwDimension;\n    WORD\twExponent;\n    WORD\twReserved;\n#endif /* DIRECTINPUT_VERSION >= 0x0500 */\n} DIDEVICEOBJECTINSTANCEA, *LPDIDEVICEOBJECTINSTANCEA;\ntypedef const DIDEVICEOBJECTINSTANCEA *LPCDIDEVICEOBJECTINSTANCEA;\n\ntypedef struct DIDEVICEOBJECTINSTANCEW {\n    DWORD\tdwSize;\n    GUID\tguidType;\n    DWORD\tdwOfs;\n    DWORD\tdwType;\n    DWORD\tdwFlags;\n    WCHAR\ttszName[MAX_PATH];\n#if(DIRECTINPUT_VERSION >= 0x0500)\n    DWORD\tdwFFMaxForce;\n    DWORD\tdwFFForceResolution;\n    WORD\twCollectionNumber;\n    WORD\twDesignatorIndex;\n    WORD\twUsagePage;\n    WORD\twUsage;\n    DWORD\tdwDimension;\n    WORD\twExponent;\n    WORD\twReserved;\n#endif /* DIRECTINPUT_VERSION >= 0x0500 */\n} DIDEVICEOBJECTINSTANCEW, *LPDIDEVICEOBJECTINSTANCEW;\ntypedef const DIDEVICEOBJECTINSTANCEW *LPCDIDEVICEOBJECTINSTANCEW;\n\nDECL_WINELIB_TYPE_AW(DIDEVICEOBJECTINSTANCE)\nDECL_WINELIB_TYPE_AW(LPDIDEVICEOBJECTINSTANCE)\nDECL_WINELIB_TYPE_AW(LPCDIDEVICEOBJECTINSTANCE)\n\ntypedef struct DIDEVICEINSTANCE_DX3A {\n    DWORD   dwSize;\n    GUID    guidInstance;\n    GUID    guidProduct;\n    DWORD   dwDevType;\n    CHAR    tszInstanceName[MAX_PATH];\n    CHAR    tszProductName[MAX_PATH];\n} DIDEVICEINSTANCE_DX3A, *LPDIDEVICEINSTANCE_DX3A;\ntypedef const DIDEVICEINSTANCE_DX3A *LPCDIDEVICEINSTANCE_DX3A;\ntypedef struct DIDEVICEINSTANCE_DX3W {\n    DWORD   dwSize;\n    GUID    guidInstance;\n    GUID    guidProduct;\n    DWORD   dwDevType;\n    WCHAR   tszInstanceName[MAX_PATH];\n    WCHAR   tszProductName[MAX_PATH];\n} DIDEVICEINSTANCE_DX3W, *LPDIDEVICEINSTANCE_DX3W;\ntypedef const DIDEVICEINSTANCE_DX3W *LPCDIDEVICEINSTANCE_DX3W;\n\nDECL_WINELIB_TYPE_AW(DIDEVICEINSTANCE_DX3)\nDECL_WINELIB_TYPE_AW(LPDIDEVICEINSTANCE_DX3)\nDECL_WINELIB_TYPE_AW(LPCDIDEVICEINSTANCE_DX3)\n\ntypedef struct DIDEVICEINSTANCEA {\n    DWORD\tdwSize;\n    GUID\tguidInstance;\n    GUID\tguidProduct;\n    DWORD\tdwDevType;\n    CHAR\ttszInstanceName[MAX_PATH];\n    CHAR\ttszProductName[MAX_PATH];\n#if(DIRECTINPUT_VERSION >= 0x0500)\n    GUID\tguidFFDriver;\n    WORD\twUsagePage;\n    WORD\twUsage;\n#endif /* DIRECTINPUT_VERSION >= 0x0500 */\n} DIDEVICEINSTANCEA, *LPDIDEVICEINSTANCEA;\ntypedef const DIDEVICEINSTANCEA *LPCDIDEVICEINSTANCEA;\n\ntypedef struct DIDEVICEINSTANCEW {\n    DWORD\tdwSize;\n    GUID\tguidInstance;\n    GUID\tguidProduct;\n    DWORD\tdwDevType;\n    WCHAR\ttszInstanceName[MAX_PATH];\n    WCHAR\ttszProductName[MAX_PATH];\n#if(DIRECTINPUT_VERSION >= 0x0500)\n    GUID\tguidFFDriver;\n    WORD\twUsagePage;\n    WORD\twUsage;\n#endif /* DIRECTINPUT_VERSION >= 0x0500 */\n} DIDEVICEINSTANCEW, *LPDIDEVICEINSTANCEW;\ntypedef const DIDEVICEINSTANCEW *LPCDIDEVICEINSTANCEW;\n\nDECL_WINELIB_TYPE_AW(DIDEVICEINSTANCE)\nDECL_WINELIB_TYPE_AW(LPDIDEVICEINSTANCE)\nDECL_WINELIB_TYPE_AW(LPCDIDEVICEINSTANCE)\n\ntypedef BOOL (CALLBACK *LPDIENUMDEVICESCALLBACKA)(LPCDIDEVICEINSTANCEA,LPVOID);\ntypedef BOOL (CALLBACK *LPDIENUMDEVICESCALLBACKW)(LPCDIDEVICEINSTANCEW,LPVOID);\nDECL_WINELIB_TYPE_AW(LPDIENUMDEVICESCALLBACK)\n\n#define DIEDBS_MAPPEDPRI1\t\t0x00000001\n#define DIEDBS_MAPPEDPRI2\t\t0x00000002\n#define DIEDBS_RECENTDEVICE\t\t0x00000010\n#define DIEDBS_NEWDEVICE\t\t0x00000020\n\n#define DIEDBSFL_ATTACHEDONLY\t\t0x00000000\n#define DIEDBSFL_THISUSER\t\t0x00000010\n#define DIEDBSFL_FORCEFEEDBACK\t\tDIEDFL_FORCEFEEDBACK\n#define DIEDBSFL_AVAILABLEDEVICES\t0x00001000\n#define DIEDBSFL_MULTIMICEKEYBOARDS\t0x00002000\n#define DIEDBSFL_NONGAMINGDEVICES\t0x00004000\n#define DIEDBSFL_VALID\t\t\t0x00007110\n\n#if DIRECTINPUT_VERSION >= 0x0800\ntypedef BOOL (CALLBACK *LPDIENUMDEVICESBYSEMANTICSCBA)(LPCDIDEVICEINSTANCEA,LPDIRECTINPUTDEVICE8A,DWORD,DWORD,LPVOID);\ntypedef BOOL (CALLBACK *LPDIENUMDEVICESBYSEMANTICSCBW)(LPCDIDEVICEINSTANCEW,LPDIRECTINPUTDEVICE8W,DWORD,DWORD,LPVOID);\nDECL_WINELIB_TYPE_AW(LPDIENUMDEVICESBYSEMANTICSCB)\n#endif\n\ntypedef BOOL (CALLBACK *LPDICONFIGUREDEVICESCALLBACK)(LPUNKNOWN,LPVOID);\n\ntypedef BOOL (CALLBACK *LPDIENUMDEVICEOBJECTSCALLBACKA)(LPCDIDEVICEOBJECTINSTANCEA,LPVOID);\ntypedef BOOL (CALLBACK *LPDIENUMDEVICEOBJECTSCALLBACKW)(LPCDIDEVICEOBJECTINSTANCEW,LPVOID);\nDECL_WINELIB_TYPE_AW(LPDIENUMDEVICEOBJECTSCALLBACK)\n\n#if DIRECTINPUT_VERSION >= 0x0500\ntypedef BOOL (CALLBACK *LPDIENUMCREATEDEFFECTOBJECTSCALLBACK)(LPDIRECTINPUTEFFECT, LPVOID);\n#endif\n\n#define DIK_ESCAPE          0x01\n#define DIK_1               0x02\n#define DIK_2               0x03\n#define DIK_3               0x04\n#define DIK_4               0x05\n#define DIK_5               0x06\n#define DIK_6               0x07\n#define DIK_7               0x08\n#define DIK_8               0x09\n#define DIK_9               0x0A\n#define DIK_0               0x0B\n#define DIK_MINUS           0x0C    /* - on main keyboard */\n#define DIK_EQUALS          0x0D\n#define DIK_BACK            0x0E    /* backspace */\n#define DIK_TAB             0x0F\n#define DIK_Q               0x10\n#define DIK_W               0x11\n#define DIK_E               0x12\n#define DIK_R               0x13\n#define DIK_T               0x14\n#define DIK_Y               0x15\n#define DIK_U               0x16\n#define DIK_I               0x17\n#define DIK_O               0x18\n#define DIK_P               0x19\n#define DIK_LBRACKET        0x1A\n#define DIK_RBRACKET        0x1B\n#define DIK_RETURN          0x1C    /* Enter on main keyboard */\n#define DIK_LCONTROL        0x1D\n#define DIK_A               0x1E\n#define DIK_S               0x1F\n#define DIK_D               0x20\n#define DIK_F               0x21\n#define DIK_G               0x22\n#define DIK_H               0x23\n#define DIK_J               0x24\n#define DIK_K               0x25\n#define DIK_L               0x26\n#define DIK_SEMICOLON       0x27\n#define DIK_APOSTROPHE      0x28\n#define DIK_GRAVE           0x29    /* accent grave */\n#define DIK_LSHIFT          0x2A\n#define DIK_BACKSLASH       0x2B\n#define DIK_Z               0x2C\n#define DIK_X               0x2D\n#define DIK_C               0x2E\n#define DIK_V               0x2F\n#define DIK_B               0x30\n#define DIK_N               0x31\n#define DIK_M               0x32\n#define DIK_COMMA           0x33\n#define DIK_PERIOD          0x34    /* . on main keyboard */\n#define DIK_SLASH           0x35    /* / on main keyboard */\n#define DIK_RSHIFT          0x36\n#define DIK_MULTIPLY        0x37    /* * on numeric keypad */\n#define DIK_LMENU           0x38    /* left Alt */\n#define DIK_SPACE           0x39\n#define DIK_CAPITAL         0x3A\n#define DIK_F1              0x3B\n#define DIK_F2              0x3C\n#define DIK_F3              0x3D\n#define DIK_F4              0x3E\n#define DIK_F5              0x3F\n#define DIK_F6              0x40\n#define DIK_F7              0x41\n#define DIK_F8              0x42\n#define DIK_F9              0x43\n#define DIK_F10             0x44\n#define DIK_NUMLOCK         0x45\n#define DIK_SCROLL          0x46    /* Scroll Lock */\n#define DIK_NUMPAD7         0x47\n#define DIK_NUMPAD8         0x48\n#define DIK_NUMPAD9         0x49\n#define DIK_SUBTRACT        0x4A    /* - on numeric keypad */\n#define DIK_NUMPAD4         0x4B\n#define DIK_NUMPAD5         0x4C\n#define DIK_NUMPAD6         0x4D\n#define DIK_ADD             0x4E    /* + on numeric keypad */\n#define DIK_NUMPAD1         0x4F\n#define DIK_NUMPAD2         0x50\n#define DIK_NUMPAD3         0x51\n#define DIK_NUMPAD0         0x52\n#define DIK_DECIMAL         0x53    /* . on numeric keypad */\n#define DIK_OEM_102         0x56    /* < > | on UK/Germany keyboards */\n#define DIK_F11             0x57\n#define DIK_F12             0x58\n#define DIK_F13             0x64    /*                     (NEC PC98) */\n#define DIK_F14             0x65    /*                     (NEC PC98) */\n#define DIK_F15             0x66    /*                     (NEC PC98) */\n#define DIK_KANA            0x70    /* (Japanese keyboard)            */\n#define DIK_ABNT_C1         0x73    /* / ? on Portugese (Brazilian) keyboards */\n#define DIK_CONVERT         0x79    /* (Japanese keyboard)            */\n#define DIK_NOCONVERT       0x7B    /* (Japanese keyboard)            */\n#define DIK_YEN             0x7D    /* (Japanese keyboard)            */\n#define DIK_ABNT_C2         0x7E    /* Numpad . on Portugese (Brazilian) keyboards */\n#define DIK_NUMPADEQUALS    0x8D    /* = on numeric keypad (NEC PC98) */\n#define DIK_CIRCUMFLEX      0x90    /* (Japanese keyboard)            */\n#define DIK_AT              0x91    /*                     (NEC PC98) */\n#define DIK_COLON           0x92    /*                     (NEC PC98) */\n#define DIK_UNDERLINE       0x93    /*                     (NEC PC98) */\n#define DIK_KANJI           0x94    /* (Japanese keyboard)            */\n#define DIK_STOP            0x95    /*                     (NEC PC98) */\n#define DIK_AX              0x96    /*                     (Japan AX) */\n#define DIK_UNLABELED       0x97    /*                        (J3100) */\n#define DIK_NEXTTRACK       0x99    /* Next Track */\n#define DIK_NUMPADENTER     0x9C    /* Enter on numeric keypad */\n#define DIK_RCONTROL        0x9D\n#define DIK_MUTE\t    0xA0    /* Mute */\n#define DIK_CALCULATOR      0xA1    /* Calculator */\n#define DIK_PLAYPAUSE       0xA2    /* Play / Pause */\n#define DIK_MEDIASTOP       0xA4    /* Media Stop */\n#define DIK_VOLUMEDOWN      0xAE    /* Volume - */\n#define DIK_VOLUMEUP        0xB0    /* Volume + */\n#define DIK_WEBHOME         0xB2    /* Web home */\n#define DIK_NUMPADCOMMA     0xB3    /* , on numeric keypad (NEC PC98) */\n#define DIK_DIVIDE          0xB5    /* / on numeric keypad */\n#define DIK_SYSRQ           0xB7\n#define DIK_RMENU           0xB8    /* right Alt */\n#define DIK_PAUSE           0xC5    /* Pause */\n#define DIK_HOME            0xC7    /* Home on arrow keypad */\n#define DIK_UP              0xC8    /* UpArrow on arrow keypad */\n#define DIK_PRIOR           0xC9    /* PgUp on arrow keypad */\n#define DIK_LEFT            0xCB    /* LeftArrow on arrow keypad */\n#define DIK_RIGHT           0xCD    /* RightArrow on arrow keypad */\n#define DIK_END             0xCF    /* End on arrow keypad */\n#define DIK_DOWN            0xD0    /* DownArrow on arrow keypad */\n#define DIK_NEXT            0xD1    /* PgDn on arrow keypad */\n#define DIK_INSERT          0xD2    /* Insert on arrow keypad */\n#define DIK_DELETE          0xD3    /* Delete on arrow keypad */\n#define DIK_LWIN            0xDB    /* Left Windows key */\n#define DIK_RWIN            0xDC    /* Right Windows key */\n#define DIK_APPS            0xDD    /* AppMenu key */\n#define DIK_POWER           0xDE\n#define DIK_SLEEP           0xDF\n#define DIK_WAKE            0xE3    /* System Wake */\n#define DIK_WEBSEARCH       0xE5    /* Web Search */\n#define DIK_WEBFAVORITES    0xE6    /* Web Favorites */\n#define DIK_WEBREFRESH      0xE7    /* Web Refresh */\n#define DIK_WEBSTOP         0xE8    /* Web Stop */\n#define DIK_WEBFORWARD      0xE9    /* Web Forward */\n#define DIK_WEBBACK         0xEA    /* Web Back */\n#define DIK_MYCOMPUTER      0xEB    /* My Computer */\n#define DIK_MAIL            0xEC    /* Mail */\n#define DIK_MEDIASELECT     0xED    /* Media Select */\n\n#define DIK_BACKSPACE       DIK_BACK            /* backspace */\n#define DIK_NUMPADSTAR      DIK_MULTIPLY        /* * on numeric keypad */\n#define DIK_LALT            DIK_LMENU           /* left Alt */\n#define DIK_CAPSLOCK        DIK_CAPITAL         /* CapsLock */\n#define DIK_NUMPADMINUS     DIK_SUBTRACT        /* - on numeric keypad */\n#define DIK_NUMPADPLUS      DIK_ADD             /* + on numeric keypad */\n#define DIK_NUMPADPERIOD    DIK_DECIMAL         /* . on numeric keypad */\n#define DIK_NUMPADSLASH     DIK_DIVIDE          /* / on numeric keypad */\n#define DIK_RALT            DIK_RMENU           /* right Alt */\n#define DIK_UPARROW         DIK_UP              /* UpArrow on arrow keypad */\n#define DIK_PGUP            DIK_PRIOR           /* PgUp on arrow keypad */\n#define DIK_LEFTARROW       DIK_LEFT            /* LeftArrow on arrow keypad */\n#define DIK_RIGHTARROW      DIK_RIGHT           /* RightArrow on arrow keypad */\n#define DIK_DOWNARROW       DIK_DOWN            /* DownArrow on arrow keypad */\n#define DIK_PGDN            DIK_NEXT            /* PgDn on arrow keypad */\n\n#define DIDFT_ALL\t\t0x00000000\n#define DIDFT_RELAXIS\t\t0x00000001\n#define DIDFT_ABSAXIS\t\t0x00000002\n#define DIDFT_AXIS\t\t0x00000003\n#define DIDFT_PSHBUTTON\t\t0x00000004\n#define DIDFT_TGLBUTTON\t\t0x00000008\n#define DIDFT_BUTTON\t\t0x0000000C\n#define DIDFT_POV\t\t0x00000010\n#define DIDFT_COLLECTION\t0x00000040\n#define DIDFT_NODATA\t\t0x00000080\n#define DIDFT_ANYINSTANCE\t0x00FFFF00\n#define DIDFT_INSTANCEMASK\tDIDFT_ANYINSTANCE\n#define DIDFT_MAKEINSTANCE(n)\t((WORD)(n) << 8)\n#define DIDFT_GETTYPE(n)\tLOBYTE(n)\n#define DIDFT_GETINSTANCE(n)\tLOWORD((n) >> 8)\n#define DIDFT_FFACTUATOR\t0x01000000\n#define DIDFT_FFEFFECTTRIGGER\t0x02000000\n#if DIRECTINPUT_VERSION >= 0x050a\n#define DIDFT_OUTPUT\t\t0x10000000\n#define DIDFT_VENDORDEFINED\t0x04000000\n#define DIDFT_ALIAS\t\t0x08000000\n#endif /* DI5a */\n#ifndef DIDFT_OPTIONAL\n#define DIDFT_OPTIONAL\t\t0x80000000\n#endif\n#define DIDFT_ENUMCOLLECTION(n)\t((WORD)(n) << 8)\n#define DIDFT_NOCOLLECTION\t0x00FFFF00\n\n#define DIDF_ABSAXIS\t\t0x00000001\n#define DIDF_RELAXIS\t\t0x00000002\n\n#define DIGDD_PEEK\t\t0x00000001\n\n#define DISEQUENCE_COMPARE(dwSq1,cmp,dwSq2) ((int)((dwSq1) - (dwSq2)) cmp 0)\n\ntypedef struct DIDEVICEOBJECTDATA_DX3 {\n    DWORD\tdwOfs;\n    DWORD\tdwData;\n    DWORD\tdwTimeStamp;\n    DWORD\tdwSequence;\n} DIDEVICEOBJECTDATA_DX3,*LPDIDEVICEOBJECTDATA_DX3;\ntypedef const DIDEVICEOBJECTDATA_DX3 *LPCDIDEVICEOBJECTDATA_DX3;\n\ntypedef struct DIDEVICEOBJECTDATA {\n    DWORD\tdwOfs;\n    DWORD\tdwData;\n    DWORD\tdwTimeStamp;\n    DWORD\tdwSequence;\n#if(DIRECTINPUT_VERSION >= 0x0800)\n    UINT_PTR\tuAppData;\n#endif /* DIRECTINPUT_VERSION >= 0x0800 */\n} DIDEVICEOBJECTDATA, *LPDIDEVICEOBJECTDATA;\ntypedef const DIDEVICEOBJECTDATA *LPCDIDEVICEOBJECTDATA;\n\ntypedef struct _DIOBJECTDATAFORMAT {\n    const GUID *pguid;\n    DWORD\tdwOfs;\n    DWORD\tdwType;\n    DWORD\tdwFlags;\n} DIOBJECTDATAFORMAT, *LPDIOBJECTDATAFORMAT;\ntypedef const DIOBJECTDATAFORMAT *LPCDIOBJECTDATAFORMAT;\n\ntypedef struct _DIDATAFORMAT {\n    DWORD\t\t\tdwSize;\n    DWORD\t\t\tdwObjSize;\n    DWORD\t\t\tdwFlags;\n    DWORD\t\t\tdwDataSize;\n    DWORD\t\t\tdwNumObjs;\n    LPDIOBJECTDATAFORMAT\trgodf;\n} DIDATAFORMAT, *LPDIDATAFORMAT;\ntypedef const DIDATAFORMAT *LPCDIDATAFORMAT;\n\n#if DIRECTINPUT_VERSION >= 0x0500\n#define DIDOI_FFACTUATOR\t0x00000001\n#define DIDOI_FFEFFECTTRIGGER\t0x00000002\n#define DIDOI_POLLED\t\t0x00008000\n#define DIDOI_ASPECTPOSITION\t0x00000100\n#define DIDOI_ASPECTVELOCITY\t0x00000200\n#define DIDOI_ASPECTACCEL\t0x00000300\n#define DIDOI_ASPECTFORCE\t0x00000400\n#define DIDOI_ASPECTMASK\t0x00000F00\n#endif /* DI5 */\n#if DIRECTINPUT_VERSION >= 0x050a\n#define DIDOI_GUIDISUSAGE\t0x00010000\n#endif /* DI5a */\n\ntypedef struct DIPROPHEADER {\n    DWORD\tdwSize;\n    DWORD\tdwHeaderSize;\n    DWORD\tdwObj;\n    DWORD\tdwHow;\n} DIPROPHEADER,*LPDIPROPHEADER;\ntypedef const DIPROPHEADER *LPCDIPROPHEADER;\n\n#define DIPH_DEVICE\t0\n#define DIPH_BYOFFSET\t1\n#define DIPH_BYID\t2\n#if DIRECTINPUT_VERSION >= 0x050a\n#define DIPH_BYUSAGE\t3\n\n#define DIMAKEUSAGEDWORD(UsagePage, Usage) (DWORD)MAKELONG(Usage, UsagePage)\n#endif /* DI5a */\n\ntypedef struct DIPROPDWORD {\n\tDIPROPHEADER\tdiph;\n\tDWORD\t\tdwData;\n} DIPROPDWORD, *LPDIPROPDWORD;\ntypedef const DIPROPDWORD *LPCDIPROPDWORD;\n\ntypedef struct DIPROPRANGE {\n\tDIPROPHEADER\tdiph;\n\tLONG\t\tlMin;\n\tLONG\t\tlMax;\n} DIPROPRANGE, *LPDIPROPRANGE;\ntypedef const DIPROPRANGE *LPCDIPROPRANGE;\n\n#define DIPROPRANGE_NOMIN\t((LONG)0x80000000)\n#define DIPROPRANGE_NOMAX\t((LONG)0x7FFFFFFF)\n\n#if DIRECTINPUT_VERSION >= 0x050a\ntypedef struct DIPROPCAL {\n\tDIPROPHEADER diph;\n\tLONG\tlMin;\n\tLONG\tlCenter;\n\tLONG\tlMax;\n} DIPROPCAL, *LPDIPROPCAL;\ntypedef const DIPROPCAL *LPCDIPROPCAL;\n\ntypedef struct DIPROPCALPOV {\n\tDIPROPHEADER\tdiph;\n\tLONG\t\tlMin[5];\n\tLONG\t\tlMax[5];\n} DIPROPCALPOV, *LPDIPROPCALPOV;\ntypedef const DIPROPCALPOV *LPCDIPROPCALPOV;\n\ntypedef struct DIPROPGUIDANDPATH {\n\tDIPROPHEADER diph;\n\tGUID    guidClass;\n\tWCHAR   wszPath[MAX_PATH];\n} DIPROPGUIDANDPATH, *LPDIPROPGUIDANDPATH;\ntypedef const DIPROPGUIDANDPATH *LPCDIPROPGUIDANDPATH;\n\ntypedef struct DIPROPSTRING {\n        DIPROPHEADER diph;\n        WCHAR        wsz[MAX_PATH];\n} DIPROPSTRING, *LPDIPROPSTRING;\ntypedef const DIPROPSTRING *LPCDIPROPSTRING;\n#endif /* DI5a */\n\n#if DIRECTINPUT_VERSION >= 0x0800\ntypedef struct DIPROPPOINTER {\n\tDIPROPHEADER diph;\n\tUINT_PTR     uData;\n} DIPROPPOINTER, *LPDIPROPPOINTER;\ntypedef const DIPROPPOINTER *LPCDIPROPPOINTER;\n#endif /* DI8 */\n\n/* special property GUIDs */\n#ifdef __cplusplus\n#define MAKEDIPROP(prop)\t(*(const GUID *)(prop))\n#else\n#define MAKEDIPROP(prop)\t((REFGUID)(prop))\n#endif\n#define DIPROP_BUFFERSIZE\tMAKEDIPROP(1)\n#define DIPROP_AXISMODE\t\tMAKEDIPROP(2)\n\n#define DIPROPAXISMODE_ABS\t0\n#define DIPROPAXISMODE_REL\t1\n\n#define DIPROP_GRANULARITY\tMAKEDIPROP(3)\n#define DIPROP_RANGE\t\tMAKEDIPROP(4)\n#define DIPROP_DEADZONE\t\tMAKEDIPROP(5)\n#define DIPROP_SATURATION\tMAKEDIPROP(6)\n#define DIPROP_FFGAIN\t\tMAKEDIPROP(7)\n#define DIPROP_FFLOAD\t\tMAKEDIPROP(8)\n#define DIPROP_AUTOCENTER\tMAKEDIPROP(9)\n\n#define DIPROPAUTOCENTER_OFF\t0\n#define DIPROPAUTOCENTER_ON\t1\n\n#define DIPROP_CALIBRATIONMODE\tMAKEDIPROP(10)\n\n#define DIPROPCALIBRATIONMODE_COOKED\t0\n#define DIPROPCALIBRATIONMODE_RAW\t1\n\n#if DIRECTINPUT_VERSION >= 0x050a\n#define DIPROP_CALIBRATION\tMAKEDIPROP(11)\n#define DIPROP_GUIDANDPATH\tMAKEDIPROP(12)\n#define DIPROP_INSTANCENAME\tMAKEDIPROP(13)\n#define DIPROP_PRODUCTNAME\tMAKEDIPROP(14)\n#endif\n\n#if DIRECTINPUT_VERSION >= 0x5B2\n#define DIPROP_JOYSTICKID\tMAKEDIPROP(15)\n#define DIPROP_GETPORTDISPLAYNAME\tMAKEDIPROP(16)\n#endif\n\n#if DIRECTINPUT_VERSION >= 0x0700\n#define DIPROP_PHYSICALRANGE\tMAKEDIPROP(18)\n#define DIPROP_LOGICALRANGE\tMAKEDIPROP(19)\n#endif\n\n#if(DIRECTINPUT_VERSION >= 0x0800)\n#define DIPROP_KEYNAME\t\tMAKEDIPROP(20)\n#define DIPROP_CPOINTS\t\tMAKEDIPROP(21)\n#define DIPROP_APPDATA\t\tMAKEDIPROP(22)\n#define DIPROP_SCANCODE\t\tMAKEDIPROP(23)\n#define DIPROP_VIDPID\t\tMAKEDIPROP(24)\n#define DIPROP_USERNAME\t\tMAKEDIPROP(25)\n#define DIPROP_TYPENAME\t\tMAKEDIPROP(26)\n\n#define MAXCPOINTSNUM\t\t8\n\ntypedef struct _CPOINT {\n    LONG\tlP;\n    DWORD\tdwLog;\n} CPOINT, *PCPOINT;\n\ntypedef struct DIPROPCPOINTS {\n    DIPROPHEADER diph;\n    DWORD\tdwCPointsNum;\n    CPOINT\tcp[MAXCPOINTSNUM];\n} DIPROPCPOINTS, *LPDIPROPCPOINTS;\ntypedef const DIPROPCPOINTS *LPCDIPROPCPOINTS;\n#endif /* DI8 */\n\n\ntypedef struct DIDEVCAPS_DX3 {\n    DWORD\tdwSize;\n    DWORD\tdwFlags;\n    DWORD\tdwDevType;\n    DWORD\tdwAxes;\n    DWORD\tdwButtons;\n    DWORD\tdwPOVs;\n} DIDEVCAPS_DX3, *LPDIDEVCAPS_DX3;\n\ntypedef struct DIDEVCAPS {\n    DWORD\tdwSize;\n    DWORD\tdwFlags;\n    DWORD\tdwDevType;\n    DWORD\tdwAxes;\n    DWORD\tdwButtons;\n    DWORD\tdwPOVs;\n#if(DIRECTINPUT_VERSION >= 0x0500)\n    DWORD\tdwFFSamplePeriod;\n    DWORD\tdwFFMinTimeResolution;\n    DWORD\tdwFirmwareRevision;\n    DWORD\tdwHardwareRevision;\n    DWORD\tdwFFDriverVersion;\n#endif /* DIRECTINPUT_VERSION >= 0x0500 */\n} DIDEVCAPS,*LPDIDEVCAPS;\n\n#define DIDC_ATTACHED\t\t0x00000001\n#define DIDC_POLLEDDEVICE\t0x00000002\n#define DIDC_EMULATED\t\t0x00000004\n#define DIDC_POLLEDDATAFORMAT\t0x00000008\n#define DIDC_FORCEFEEDBACK\t0x00000100\n#define DIDC_FFATTACK\t\t0x00000200\n#define DIDC_FFFADE\t\t0x00000400\n#define DIDC_SATURATION\t\t0x00000800\n#define DIDC_POSNEGCOEFFICIENTS\t0x00001000\n#define DIDC_POSNEGSATURATION\t0x00002000\n#define DIDC_DEADBAND\t\t0x00004000\n#define DIDC_STARTDELAY\t\t0x00008000\n#define DIDC_ALIAS\t\t0x00010000\n#define DIDC_PHANTOM\t\t0x00020000\n#define DIDC_HIDDEN\t\t0x00040000\n\n\n/* SetCooperativeLevel dwFlags */\n#define DISCL_EXCLUSIVE\t\t0x00000001\n#define DISCL_NONEXCLUSIVE\t0x00000002\n#define DISCL_FOREGROUND\t0x00000004\n#define DISCL_BACKGROUND\t0x00000008\n#define DISCL_NOWINKEY          0x00000010\n\n#if (DIRECTINPUT_VERSION >= 0x0500)\n/* Device FF flags */\n#define DISFFC_RESET            0x00000001\n#define DISFFC_STOPALL          0x00000002\n#define DISFFC_PAUSE            0x00000004\n#define DISFFC_CONTINUE         0x00000008\n#define DISFFC_SETACTUATORSON   0x00000010\n#define DISFFC_SETACTUATORSOFF  0x00000020\n\n#define DIGFFS_EMPTY            0x00000001\n#define DIGFFS_STOPPED          0x00000002\n#define DIGFFS_PAUSED           0x00000004\n#define DIGFFS_ACTUATORSON      0x00000010\n#define DIGFFS_ACTUATORSOFF     0x00000020\n#define DIGFFS_POWERON          0x00000040\n#define DIGFFS_POWEROFF         0x00000080\n#define DIGFFS_SAFETYSWITCHON   0x00000100\n#define DIGFFS_SAFETYSWITCHOFF  0x00000200\n#define DIGFFS_USERFFSWITCHON   0x00000400\n#define DIGFFS_USERFFSWITCHOFF  0x00000800\n#define DIGFFS_DEVICELOST       0x80000000\n\n/* Effect flags */\n#define DIEFT_ALL\t\t0x00000000\n\n#define DIEFT_CONSTANTFORCE\t0x00000001\n#define DIEFT_RAMPFORCE\t\t0x00000002\n#define DIEFT_PERIODIC\t\t0x00000003\n#define DIEFT_CONDITION\t\t0x00000004\n#define DIEFT_CUSTOMFORCE\t0x00000005\n#define DIEFT_HARDWARE\t\t0x000000FF\n#define DIEFT_FFATTACK\t\t0x00000200\n#define DIEFT_FFFADE\t\t0x00000400\n#define DIEFT_SATURATION\t0x00000800\n#define DIEFT_POSNEGCOEFFICIENTS 0x00001000\n#define DIEFT_POSNEGSATURATION\t0x00002000\n#define DIEFT_DEADBAND\t\t0x00004000\n#define DIEFT_STARTDELAY\t0x00008000\n#define DIEFT_GETTYPE(n)\tLOBYTE(n)\n\n#define DIEFF_OBJECTIDS         0x00000001\n#define DIEFF_OBJECTOFFSETS     0x00000002\n#define DIEFF_CARTESIAN         0x00000010\n#define DIEFF_POLAR             0x00000020\n#define DIEFF_SPHERICAL         0x00000040\n\n#define DIEP_DURATION           0x00000001\n#define DIEP_SAMPLEPERIOD       0x00000002\n#define DIEP_GAIN               0x00000004\n#define DIEP_TRIGGERBUTTON      0x00000008\n#define DIEP_TRIGGERREPEATINTERVAL 0x00000010\n#define DIEP_AXES               0x00000020\n#define DIEP_DIRECTION          0x00000040\n#define DIEP_ENVELOPE           0x00000080\n#define DIEP_TYPESPECIFICPARAMS 0x00000100\n#if(DIRECTINPUT_VERSION >= 0x0600)\n#define DIEP_STARTDELAY         0x00000200\n#define DIEP_ALLPARAMS_DX5      0x000001FF\n#define DIEP_ALLPARAMS          0x000003FF\n#else\n#define DIEP_ALLPARAMS          0x000001FF\n#endif /* DIRECTINPUT_VERSION >= 0x0600 */\n#define DIEP_START              0x20000000\n#define DIEP_NORESTART          0x40000000\n#define DIEP_NODOWNLOAD         0x80000000\n#define DIEB_NOTRIGGER          0xFFFFFFFF\n\n#define DIES_SOLO               0x00000001\n#define DIES_NODOWNLOAD         0x80000000\n\n#define DIEGES_PLAYING          0x00000001\n#define DIEGES_EMULATED         0x00000002\n\n#define DI_DEGREES\t\t100\n#define DI_FFNOMINALMAX\t\t10000\n#define DI_SECONDS\t\t1000000\n\ntypedef struct DICONSTANTFORCE {\n\tLONG\t\t\tlMagnitude;\n} DICONSTANTFORCE, *LPDICONSTANTFORCE;\ntypedef const DICONSTANTFORCE *LPCDICONSTANTFORCE;\n\ntypedef struct DIRAMPFORCE {\n\tLONG\t\t\tlStart;\n\tLONG\t\t\tlEnd;\n} DIRAMPFORCE, *LPDIRAMPFORCE;\ntypedef const DIRAMPFORCE *LPCDIRAMPFORCE;\n\ntypedef struct DIPERIODIC {\n\tDWORD\t\t\tdwMagnitude;\n\tLONG\t\t\tlOffset;\n\tDWORD\t\t\tdwPhase;\n\tDWORD\t\t\tdwPeriod;\n} DIPERIODIC, *LPDIPERIODIC;\ntypedef const DIPERIODIC *LPCDIPERIODIC;\n\ntypedef struct DICONDITION {\n\tLONG\t\t\tlOffset;\n\tLONG\t\t\tlPositiveCoefficient;\n\tLONG\t\t\tlNegativeCoefficient;\n\tDWORD\t\t\tdwPositiveSaturation;\n\tDWORD\t\t\tdwNegativeSaturation;\n\tLONG\t\t\tlDeadBand;\n} DICONDITION, *LPDICONDITION;\ntypedef const DICONDITION *LPCDICONDITION;\n\ntypedef struct DICUSTOMFORCE {\n\tDWORD\t\t\tcChannels;\n\tDWORD\t\t\tdwSamplePeriod;\n\tDWORD\t\t\tcSamples;\n\tLPLONG\t\t\trglForceData;\n} DICUSTOMFORCE, *LPDICUSTOMFORCE;\ntypedef const DICUSTOMFORCE *LPCDICUSTOMFORCE;\n\ntypedef struct DIENVELOPE {\n\tDWORD\t\t\tdwSize;\n\tDWORD\t\t\tdwAttackLevel;\n\tDWORD\t\t\tdwAttackTime;\n\tDWORD\t\t\tdwFadeLevel;\n\tDWORD\t\t\tdwFadeTime;\n} DIENVELOPE, *LPDIENVELOPE;\ntypedef const DIENVELOPE *LPCDIENVELOPE;\n\ntypedef struct DIEFFECT_DX5 {\n\tDWORD\t\t\tdwSize;\n\tDWORD\t\t\tdwFlags;\n\tDWORD\t\t\tdwDuration;\n\tDWORD\t\t\tdwSamplePeriod;\n\tDWORD\t\t\tdwGain;\n\tDWORD\t\t\tdwTriggerButton;\n\tDWORD\t\t\tdwTriggerRepeatInterval;\n\tDWORD\t\t\tcAxes;\n\tLPDWORD\t\t\trgdwAxes;\n\tLPLONG\t\t\trglDirection;\n\tLPDIENVELOPE\t\tlpEnvelope;\n\tDWORD\t\t\tcbTypeSpecificParams;\n\tLPVOID\t\t\tlpvTypeSpecificParams;\n} DIEFFECT_DX5, *LPDIEFFECT_DX5;\ntypedef const DIEFFECT_DX5 *LPCDIEFFECT_DX5;\n\ntypedef struct DIEFFECT {\n\tDWORD\t\t\tdwSize;\n\tDWORD\t\t\tdwFlags;\n\tDWORD\t\t\tdwDuration;\n\tDWORD\t\t\tdwSamplePeriod;\n\tDWORD\t\t\tdwGain;\n\tDWORD\t\t\tdwTriggerButton;\n\tDWORD\t\t\tdwTriggerRepeatInterval;\n\tDWORD\t\t\tcAxes;\n\tLPDWORD\t\t\trgdwAxes;\n\tLPLONG\t\t\trglDirection;\n\tLPDIENVELOPE\t\tlpEnvelope;\n\tDWORD\t\t\tcbTypeSpecificParams;\n\tLPVOID\t\t\tlpvTypeSpecificParams;\n#if(DIRECTINPUT_VERSION >= 0x0600)\n\tDWORD\t\t\tdwStartDelay;\n#endif /* DIRECTINPUT_VERSION >= 0x0600 */\n} DIEFFECT, *LPDIEFFECT;\ntypedef const DIEFFECT *LPCDIEFFECT;\ntypedef DIEFFECT DIEFFECT_DX6;\ntypedef LPDIEFFECT LPDIEFFECT_DX6;\n\ntypedef struct DIEFFECTINFOA {\n\tDWORD\t\t\tdwSize;\n\tGUID\t\t\tguid;\n\tDWORD\t\t\tdwEffType;\n\tDWORD\t\t\tdwStaticParams;\n\tDWORD\t\t\tdwDynamicParams;\n\tCHAR\t\t\ttszName[MAX_PATH];\n} DIEFFECTINFOA, *LPDIEFFECTINFOA;\ntypedef const DIEFFECTINFOA *LPCDIEFFECTINFOA;\n\ntypedef struct DIEFFECTINFOW {\n\tDWORD\t\t\tdwSize;\n\tGUID\t\t\tguid;\n\tDWORD\t\t\tdwEffType;\n\tDWORD\t\t\tdwStaticParams;\n\tDWORD\t\t\tdwDynamicParams;\n\tWCHAR\t\t\ttszName[MAX_PATH];\n} DIEFFECTINFOW, *LPDIEFFECTINFOW;\ntypedef const DIEFFECTINFOW *LPCDIEFFECTINFOW;\n\nDECL_WINELIB_TYPE_AW(DIEFFECTINFO)\nDECL_WINELIB_TYPE_AW(LPDIEFFECTINFO)\nDECL_WINELIB_TYPE_AW(LPCDIEFFECTINFO)\n\ntypedef BOOL (CALLBACK *LPDIENUMEFFECTSCALLBACKA)(LPCDIEFFECTINFOA, LPVOID);\ntypedef BOOL (CALLBACK *LPDIENUMEFFECTSCALLBACKW)(LPCDIEFFECTINFOW, LPVOID);\n\ntypedef struct DIEFFESCAPE {\n\tDWORD\tdwSize;\n\tDWORD\tdwCommand;\n\tLPVOID\tlpvInBuffer;\n\tDWORD\tcbInBuffer;\n\tLPVOID\tlpvOutBuffer;\n\tDWORD\tcbOutBuffer;\n} DIEFFESCAPE, *LPDIEFFESCAPE;\n\ntypedef struct DIJOYSTATE {\n\tLONG\tlX;\n\tLONG\tlY;\n\tLONG\tlZ;\n\tLONG\tlRx;\n\tLONG\tlRy;\n\tLONG\tlRz;\n\tLONG\trglSlider[2];\n\tDWORD\trgdwPOV[4];\n\tBYTE\trgbButtons[32];\n} DIJOYSTATE, *LPDIJOYSTATE;\n\ntypedef struct DIJOYSTATE2 {\n\tLONG\tlX;\n\tLONG\tlY;\n\tLONG\tlZ;\n\tLONG\tlRx;\n\tLONG\tlRy;\n\tLONG\tlRz;\n\tLONG\trglSlider[2];\n\tDWORD\trgdwPOV[4];\n\tBYTE\trgbButtons[128];\n\tLONG\tlVX;\t\t/* 'v' as in velocity */\n\tLONG\tlVY;\n\tLONG\tlVZ;\n\tLONG\tlVRx;\n\tLONG\tlVRy;\n\tLONG\tlVRz;\n\tLONG\trglVSlider[2];\n\tLONG\tlAX;\t\t/* 'a' as in acceleration */\n\tLONG\tlAY;\n\tLONG\tlAZ;\n\tLONG\tlARx;\n\tLONG\tlARy;\n\tLONG\tlARz;\n\tLONG\trglASlider[2];\n\tLONG\tlFX;\t\t/* 'f' as in force */\n\tLONG\tlFY;\n\tLONG\tlFZ;\n\tLONG\tlFRx;\t\t/* 'fr' as in rotational force aka torque */\n\tLONG\tlFRy;\n\tLONG\tlFRz;\n\tLONG\trglFSlider[2];\n} DIJOYSTATE2, *LPDIJOYSTATE2;\n\n#define DIJOFS_X\t\tFIELD_OFFSET(DIJOYSTATE, lX)\n#define DIJOFS_Y\t\tFIELD_OFFSET(DIJOYSTATE, lY)\n#define DIJOFS_Z\t\tFIELD_OFFSET(DIJOYSTATE, lZ)\n#define DIJOFS_RX\t\tFIELD_OFFSET(DIJOYSTATE, lRx)\n#define DIJOFS_RY\t\tFIELD_OFFSET(DIJOYSTATE, lRy)\n#define DIJOFS_RZ\t\tFIELD_OFFSET(DIJOYSTATE, lRz)\n#define DIJOFS_SLIDER(n)\t(FIELD_OFFSET(DIJOYSTATE, rglSlider) + \\\n                                                        (n) * sizeof(LONG))\n#define DIJOFS_POV(n)\t\t(FIELD_OFFSET(DIJOYSTATE, rgdwPOV) + \\\n                                                        (n) * sizeof(DWORD))\n#define DIJOFS_BUTTON(n)\t(FIELD_OFFSET(DIJOYSTATE, rgbButtons) + (n))\n#define DIJOFS_BUTTON0\t\tDIJOFS_BUTTON(0)\n#define DIJOFS_BUTTON1\t\tDIJOFS_BUTTON(1)\n#define DIJOFS_BUTTON2\t\tDIJOFS_BUTTON(2)\n#define DIJOFS_BUTTON3\t\tDIJOFS_BUTTON(3)\n#define DIJOFS_BUTTON4\t\tDIJOFS_BUTTON(4)\n#define DIJOFS_BUTTON5\t\tDIJOFS_BUTTON(5)\n#define DIJOFS_BUTTON6\t\tDIJOFS_BUTTON(6)\n#define DIJOFS_BUTTON7\t\tDIJOFS_BUTTON(7)\n#define DIJOFS_BUTTON8\t\tDIJOFS_BUTTON(8)\n#define DIJOFS_BUTTON9\t\tDIJOFS_BUTTON(9)\n#define DIJOFS_BUTTON10\t\tDIJOFS_BUTTON(10)\n#define DIJOFS_BUTTON11\t\tDIJOFS_BUTTON(11)\n#define DIJOFS_BUTTON12\t\tDIJOFS_BUTTON(12)\n#define DIJOFS_BUTTON13\t\tDIJOFS_BUTTON(13)\n#define DIJOFS_BUTTON14\t\tDIJOFS_BUTTON(14)\n#define DIJOFS_BUTTON15\t\tDIJOFS_BUTTON(15)\n#define DIJOFS_BUTTON16\t\tDIJOFS_BUTTON(16)\n#define DIJOFS_BUTTON17\t\tDIJOFS_BUTTON(17)\n#define DIJOFS_BUTTON18\t\tDIJOFS_BUTTON(18)\n#define DIJOFS_BUTTON19\t\tDIJOFS_BUTTON(19)\n#define DIJOFS_BUTTON20\t\tDIJOFS_BUTTON(20)\n#define DIJOFS_BUTTON21\t\tDIJOFS_BUTTON(21)\n#define DIJOFS_BUTTON22\t\tDIJOFS_BUTTON(22)\n#define DIJOFS_BUTTON23\t\tDIJOFS_BUTTON(23)\n#define DIJOFS_BUTTON24\t\tDIJOFS_BUTTON(24)\n#define DIJOFS_BUTTON25\t\tDIJOFS_BUTTON(25)\n#define DIJOFS_BUTTON26\t\tDIJOFS_BUTTON(26)\n#define DIJOFS_BUTTON27\t\tDIJOFS_BUTTON(27)\n#define DIJOFS_BUTTON28\t\tDIJOFS_BUTTON(28)\n#define DIJOFS_BUTTON29\t\tDIJOFS_BUTTON(29)\n#define DIJOFS_BUTTON30\t\tDIJOFS_BUTTON(30)\n#define DIJOFS_BUTTON31\t\tDIJOFS_BUTTON(31)\n#endif /* DIRECTINPUT_VERSION >= 0x0500 */\n\n/* DInput 7 structures, types */\n#if(DIRECTINPUT_VERSION >= 0x0700)\ntypedef struct DIFILEEFFECT {\n  DWORD       dwSize;\n  GUID        GuidEffect;\n  LPCDIEFFECT lpDiEffect;\n  CHAR        szFriendlyName[MAX_PATH];\n} DIFILEEFFECT, *LPDIFILEEFFECT;\n\ntypedef const DIFILEEFFECT *LPCDIFILEEFFECT;\ntypedef BOOL (CALLBACK *LPDIENUMEFFECTSINFILECALLBACK)(LPCDIFILEEFFECT , LPVOID);\n#endif /* DIRECTINPUT_VERSION >= 0x0700 */\n\n/* DInput 8 structures and types */\n#if DIRECTINPUT_VERSION >= 0x0800\ntypedef struct _DIACTIONA {\n\tUINT_PTR\tuAppData;\n\tDWORD\t\tdwSemantic;\n\tDWORD\t\tdwFlags;\n\t__GNU_EXTENSION union {\n\t\tLPCSTR\tlptszActionName;\n\t\tUINT\tuResIdString;\n\t} DUMMYUNIONNAME;\n\tGUID\t\tguidInstance;\n\tDWORD\t\tdwObjID;\n\tDWORD\t\tdwHow;\n} DIACTIONA, *LPDIACTIONA;\ntypedef const DIACTIONA *LPCDIACTIONA;\n\ntypedef struct _DIACTIONW {\n\tUINT_PTR\tuAppData;\n\tDWORD\t\tdwSemantic;\n\tDWORD\t\tdwFlags;\n\t__GNU_EXTENSION union {\n\t\tLPCWSTR\tlptszActionName;\n\t\tUINT\tuResIdString;\n\t} DUMMYUNIONNAME;\n\tGUID\t\tguidInstance;\n\tDWORD\t\tdwObjID;\n\tDWORD\t\tdwHow;\n} DIACTIONW, *LPDIACTIONW;\ntypedef const DIACTIONW *LPCDIACTIONW;\n\nDECL_WINELIB_TYPE_AW(DIACTION)\nDECL_WINELIB_TYPE_AW(LPDIACTION)\nDECL_WINELIB_TYPE_AW(LPCDIACTION)\n\n#define DIA_FORCEFEEDBACK\t0x00000001\n#define DIA_APPMAPPED\t\t0x00000002\n#define DIA_APPNOMAP\t\t0x00000004\n#define DIA_NORANGE\t\t0x00000008\n#define DIA_APPFIXED\t\t0x00000010\n\n#define DIAH_UNMAPPED\t\t0x00000000\n#define DIAH_USERCONFIG\t\t0x00000001\n#define DIAH_APPREQUESTED\t0x00000002\n#define DIAH_HWAPP\t\t0x00000004\n#define DIAH_HWDEFAULT\t\t0x00000008\n#define DIAH_DEFAULT\t\t0x00000020\n#define DIAH_ERROR\t\t0x80000000\n\ntypedef struct _DIACTIONFORMATA {\n\tDWORD\t\tdwSize;\n\tDWORD\t\tdwActionSize;\n\tDWORD\t\tdwDataSize;\n\tDWORD\t\tdwNumActions;\n\tLPDIACTIONA\trgoAction;\n\tGUID\t\tguidActionMap;\n\tDWORD\t\tdwGenre;\n\tDWORD\t\tdwBufferSize;\n\tLONG\t\tlAxisMin;\n\tLONG\t\tlAxisMax;\n\tHINSTANCE\thInstString;\n\tFILETIME\tftTimeStamp;\n\tDWORD\t\tdwCRC;\n\tCHAR\t\ttszActionMap[MAX_PATH];\n} DIACTIONFORMATA, *LPDIACTIONFORMATA;\ntypedef const DIACTIONFORMATA *LPCDIACTIONFORMATA;\n\ntypedef struct _DIACTIONFORMATW {\n\tDWORD\t\tdwSize;\n\tDWORD\t\tdwActionSize;\n\tDWORD\t\tdwDataSize;\n\tDWORD\t\tdwNumActions;\n\tLPDIACTIONW\trgoAction;\n\tGUID\t\tguidActionMap;\n\tDWORD\t\tdwGenre;\n\tDWORD\t\tdwBufferSize;\n\tLONG\t\tlAxisMin;\n\tLONG\t\tlAxisMax;\n\tHINSTANCE\thInstString;\n\tFILETIME\tftTimeStamp;\n\tDWORD\t\tdwCRC;\n\tWCHAR\t\ttszActionMap[MAX_PATH];\n} DIACTIONFORMATW, *LPDIACTIONFORMATW;\ntypedef const DIACTIONFORMATW *LPCDIACTIONFORMATW;\n\nDECL_WINELIB_TYPE_AW(DIACTIONFORMAT)\nDECL_WINELIB_TYPE_AW(LPDIACTIONFORMAT)\nDECL_WINELIB_TYPE_AW(LPCDIACTIONFORMAT)\n\n#define DIAFTS_NEWDEVICELOW\t0xFFFFFFFF\n#define DIAFTS_NEWDEVICEHIGH\t0xFFFFFFFF\n#define DIAFTS_UNUSEDDEVICELOW\t0x00000000\n#define DIAFTS_UNUSEDDEVICEHIGH\t0x00000000\n\n#define DIDBAM_DEFAULT\t\t0x00000000\n#define DIDBAM_PRESERVE\t\t0x00000001\n#define DIDBAM_INITIALIZE\t0x00000002\n#define DIDBAM_HWDEFAULTS\t0x00000004\n\n#define DIDSAM_DEFAULT\t\t0x00000000\n#define DIDSAM_NOUSER\t\t0x00000001\n#define DIDSAM_FORCESAVE\t0x00000002\n\n#define DICD_DEFAULT\t\t0x00000000\n#define DICD_EDIT\t\t0x00000001\n\n#ifndef D3DCOLOR_DEFINED\ntypedef DWORD D3DCOLOR;\n#define D3DCOLOR_DEFINED\n#endif\n\ntypedef struct _DICOLORSET {\n\tDWORD\t\tdwSize;\n\tD3DCOLOR\tcTextFore;\n\tD3DCOLOR\tcTextHighlight;\n\tD3DCOLOR\tcCalloutLine;\n\tD3DCOLOR\tcCalloutHighlight;\n\tD3DCOLOR\tcBorder;\n\tD3DCOLOR\tcControlFill;\n\tD3DCOLOR\tcHighlightFill;\n\tD3DCOLOR\tcAreaFill;\n} DICOLORSET, *LPDICOLORSET;\ntypedef const DICOLORSET *LPCDICOLORSET;\n\ntypedef struct _DICONFIGUREDEVICESPARAMSA {\n\tDWORD\t\t\tdwSize;\n\tDWORD\t\t\tdwcUsers;\n\tLPSTR\t\t\tlptszUserNames;\n\tDWORD\t\t\tdwcFormats;\n\tLPDIACTIONFORMATA\tlprgFormats;\n\tHWND\t\t\thwnd;\n\tDICOLORSET\t\tdics;\n\tLPUNKNOWN\t\tlpUnkDDSTarget;\n} DICONFIGUREDEVICESPARAMSA, *LPDICONFIGUREDEVICESPARAMSA;\ntypedef const DICONFIGUREDEVICESPARAMSA *LPCDICONFIGUREDEVICESPARAMSA;\n\ntypedef struct _DICONFIGUREDEVICESPARAMSW {\n\tDWORD\t\t\tdwSize;\n\tDWORD\t\t\tdwcUsers;\n\tLPWSTR\t\t\tlptszUserNames;\n\tDWORD\t\t\tdwcFormats;\n\tLPDIACTIONFORMATW\tlprgFormats;\n\tHWND\t\t\thwnd;\n\tDICOLORSET\t\tdics;\n\tLPUNKNOWN\t\tlpUnkDDSTarget;\n} DICONFIGUREDEVICESPARAMSW, *LPDICONFIGUREDEVICESPARAMSW;\ntypedef const DICONFIGUREDEVICESPARAMSW *LPCDICONFIGUREDEVICESPARAMSW;\n\nDECL_WINELIB_TYPE_AW(DICONFIGUREDEVICESPARAMS)\nDECL_WINELIB_TYPE_AW(LPDICONFIGUREDEVICESPARAMS)\nDECL_WINELIB_TYPE_AW(LPCDICONFIGUREDEVICESPARAMS)\n\n#define DIDIFT_CONFIGURATION\t0x00000001\n#define DIDIFT_OVERLAY\t\t0x00000002\n\n#define DIDAL_CENTERED\t\t0x00000000\n#define DIDAL_LEFTALIGNED\t0x00000001\n#define DIDAL_RIGHTALIGNED\t0x00000002\n#define DIDAL_MIDDLE\t\t0x00000000\n#define DIDAL_TOPALIGNED\t0x00000004\n#define DIDAL_BOTTOMALIGNED\t0x00000008\n\ntypedef struct _DIDEVICEIMAGEINFOA {\n\tCHAR\ttszImagePath[MAX_PATH];\n\tDWORD\tdwFlags;\n\tDWORD\tdwViewID;\n\tRECT\trcOverlay;\n\tDWORD\tdwObjID;\n\tDWORD\tdwcValidPts;\n\tPOINT\trgptCalloutLine[5];\n\tRECT\trcCalloutRect;\n\tDWORD\tdwTextAlign;\n} DIDEVICEIMAGEINFOA, *LPDIDEVICEIMAGEINFOA;\ntypedef const DIDEVICEIMAGEINFOA *LPCDIDEVICEIMAGEINFOA;\n\ntypedef struct _DIDEVICEIMAGEINFOW {\n\tWCHAR\ttszImagePath[MAX_PATH];\n\tDWORD\tdwFlags;\n\tDWORD\tdwViewID;\n\tRECT\trcOverlay;\n\tDWORD\tdwObjID;\n\tDWORD\tdwcValidPts;\n\tPOINT\trgptCalloutLine[5];\n\tRECT\trcCalloutRect;\n\tDWORD\tdwTextAlign;\n} DIDEVICEIMAGEINFOW, *LPDIDEVICEIMAGEINFOW;\ntypedef const DIDEVICEIMAGEINFOW *LPCDIDEVICEIMAGEINFOW;\n\nDECL_WINELIB_TYPE_AW(DIDEVICEIMAGEINFO)\nDECL_WINELIB_TYPE_AW(LPDIDEVICEIMAGEINFO)\nDECL_WINELIB_TYPE_AW(LPCDIDEVICEIMAGEINFO)\n\ntypedef struct _DIDEVICEIMAGEINFOHEADERA {\n\tDWORD\tdwSize;\n\tDWORD\tdwSizeImageInfo;\n\tDWORD\tdwcViews;\n\tDWORD\tdwcButtons;\n\tDWORD\tdwcAxes;\n\tDWORD\tdwcPOVs;\n\tDWORD\tdwBufferSize;\n\tDWORD\tdwBufferUsed;\n\tLPDIDEVICEIMAGEINFOA\tlprgImageInfoArray;\n} DIDEVICEIMAGEINFOHEADERA, *LPDIDEVICEIMAGEINFOHEADERA;\ntypedef const DIDEVICEIMAGEINFOHEADERA *LPCDIDEVICEIMAGEINFOHEADERA;\n\ntypedef struct _DIDEVICEIMAGEINFOHEADERW {\n\tDWORD\tdwSize;\n\tDWORD\tdwSizeImageInfo;\n\tDWORD\tdwcViews;\n\tDWORD\tdwcButtons;\n\tDWORD\tdwcAxes;\n\tDWORD\tdwcPOVs;\n\tDWORD\tdwBufferSize;\n\tDWORD\tdwBufferUsed;\n\tLPDIDEVICEIMAGEINFOW\tlprgImageInfoArray;\n} DIDEVICEIMAGEINFOHEADERW, *LPDIDEVICEIMAGEINFOHEADERW;\ntypedef const DIDEVICEIMAGEINFOHEADERW *LPCDIDEVICEIMAGEINFOHEADERW;\n\nDECL_WINELIB_TYPE_AW(DIDEVICEIMAGEINFOHEADER)\nDECL_WINELIB_TYPE_AW(LPDIDEVICEIMAGEINFOHEADER)\nDECL_WINELIB_TYPE_AW(LPCDIDEVICEIMAGEINFOHEADER)\n\n#endif /* DI8 */\n\n\n/*****************************************************************************\n * IDirectInputEffect interface\n */\n#if (DIRECTINPUT_VERSION >= 0x0500)\n#undef INTERFACE\n#define INTERFACE IDirectInputEffect\nDECLARE_INTERFACE_(IDirectInputEffect,IUnknown)\n{\n    /*** IUnknown methods ***/\n    STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;\n    STDMETHOD_(ULONG,AddRef)(THIS) PURE;\n    STDMETHOD_(ULONG,Release)(THIS) PURE;\n    /*** IDirectInputEffect methods ***/\n    STDMETHOD(Initialize)(THIS_ HINSTANCE, DWORD, REFGUID) PURE;\n    STDMETHOD(GetEffectGuid)(THIS_ LPGUID) PURE;\n    STDMETHOD(GetParameters)(THIS_ LPDIEFFECT, DWORD) PURE;\n    STDMETHOD(SetParameters)(THIS_ LPCDIEFFECT, DWORD) PURE;\n    STDMETHOD(Start)(THIS_ DWORD, DWORD) PURE;\n    STDMETHOD(Stop)(THIS) PURE;\n    STDMETHOD(GetEffectStatus)(THIS_ LPDWORD) PURE;\n    STDMETHOD(Download)(THIS) PURE;\n    STDMETHOD(Unload)(THIS) PURE;\n    STDMETHOD(Escape)(THIS_ LPDIEFFESCAPE) PURE;\n};\n\n#if !defined(__cplusplus) || defined(CINTERFACE)\n/*** IUnknown methods ***/\n#define IDirectInputEffect_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)\n#define IDirectInputEffect_AddRef(p)             (p)->lpVtbl->AddRef(p)\n#define IDirectInputEffect_Release(p)            (p)->lpVtbl->Release(p)\n/*** IDirectInputEffect methods ***/\n#define IDirectInputEffect_Initialize(p,a,b,c)    (p)->lpVtbl->Initialize(p,a,b,c)\n#define IDirectInputEffect_GetEffectGuid(p,a)     (p)->lpVtbl->GetEffectGuid(p,a)\n#define IDirectInputEffect_GetParameters(p,a,b)   (p)->lpVtbl->GetParameters(p,a,b)\n#define IDirectInputEffect_SetParameters(p,a,b)   (p)->lpVtbl->SetParameters(p,a,b)\n#define IDirectInputEffect_Start(p,a,b)           (p)->lpVtbl->Start(p,a,b)\n#define IDirectInputEffect_Stop(p)                (p)->lpVtbl->Stop(p)\n#define IDirectInputEffect_GetEffectStatus(p,a)   (p)->lpVtbl->GetEffectStatus(p,a)\n#define IDirectInputEffect_Download(p)            (p)->lpVtbl->Download(p)\n#define IDirectInputEffect_Unload(p)              (p)->lpVtbl->Unload(p)\n#define IDirectInputEffect_Escape(p,a)            (p)->lpVtbl->Escape(p,a)\n#else\n/*** IUnknown methods ***/\n#define IDirectInputEffect_QueryInterface(p,a,b) (p)->QueryInterface(a,b)\n#define IDirectInputEffect_AddRef(p)             (p)->AddRef()\n#define IDirectInputEffect_Release(p)            (p)->Release()\n/*** IDirectInputEffect methods ***/\n#define IDirectInputEffect_Initialize(p,a,b,c)    (p)->Initialize(a,b,c)\n#define IDirectInputEffect_GetEffectGuid(p,a)     (p)->GetEffectGuid(a)\n#define IDirectInputEffect_GetParameters(p,a,b)   (p)->GetParameters(a,b)\n#define IDirectInputEffect_SetParameters(p,a,b)   (p)->SetParameters(a,b)\n#define IDirectInputEffect_Start(p,a,b)           (p)->Start(a,b)\n#define IDirectInputEffect_Stop(p)                (p)->Stop()\n#define IDirectInputEffect_GetEffectStatus(p,a)   (p)->GetEffectStatus(a)\n#define IDirectInputEffect_Download(p)            (p)->Download()\n#define IDirectInputEffect_Unload(p)              (p)->Unload()\n#define IDirectInputEffect_Escape(p,a)            (p)->Escape(a)\n#endif\n\n#endif /* DI5 */\n\n\n/*****************************************************************************\n * IDirectInputDeviceA interface\n */\n#undef INTERFACE\n#define INTERFACE IDirectInputDeviceA\nDECLARE_INTERFACE_(IDirectInputDeviceA,IUnknown)\n{\n    /*** IUnknown methods ***/\n    STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;\n    STDMETHOD_(ULONG,AddRef)(THIS) PURE;\n    STDMETHOD_(ULONG,Release)(THIS) PURE;\n    /*** IDirectInputDeviceA methods ***/\n    STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS lpDIDevCaps) PURE;\n    STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKA lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;\n    STDMETHOD(GetProperty)(THIS_ REFGUID rguidProp, LPDIPROPHEADER pdiph) PURE;\n    STDMETHOD(SetProperty)(THIS_ REFGUID rguidProp, LPCDIPROPHEADER pdiph) PURE;\n    STDMETHOD(Acquire)(THIS) PURE;\n    STDMETHOD(Unacquire)(THIS) PURE;\n    STDMETHOD(GetDeviceState)(THIS_ DWORD cbData, LPVOID lpvData) PURE;\n    STDMETHOD(GetDeviceData)(THIS_ DWORD cbObjectData, LPDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD dwFlags) PURE;\n    STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT lpdf) PURE;\n    STDMETHOD(SetEventNotification)(THIS_ HANDLE hEvent) PURE;\n    STDMETHOD(SetCooperativeLevel)(THIS_ HWND hwnd, DWORD dwFlags) PURE;\n    STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEA pdidoi, DWORD dwObj, DWORD dwHow) PURE;\n    STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEA pdidi) PURE;\n    STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE;\n    STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion, REFGUID rguid) PURE;\n};\n\n/*****************************************************************************\n * IDirectInputDeviceW interface\n */\n#undef INTERFACE\n#define INTERFACE IDirectInputDeviceW\nDECLARE_INTERFACE_(IDirectInputDeviceW,IUnknown)\n{\n    /*** IUnknown methods ***/\n    STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;\n    STDMETHOD_(ULONG,AddRef)(THIS) PURE;\n    STDMETHOD_(ULONG,Release)(THIS) PURE;\n    /*** IDirectInputDeviceW methods ***/\n    STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS lpDIDevCaps) PURE;\n    STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKW lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;\n    STDMETHOD(GetProperty)(THIS_ REFGUID rguidProp, LPDIPROPHEADER pdiph) PURE;\n    STDMETHOD(SetProperty)(THIS_ REFGUID rguidProp, LPCDIPROPHEADER pdiph) PURE;\n    STDMETHOD(Acquire)(THIS) PURE;\n    STDMETHOD(Unacquire)(THIS) PURE;\n    STDMETHOD(GetDeviceState)(THIS_ DWORD cbData, LPVOID lpvData) PURE;\n    STDMETHOD(GetDeviceData)(THIS_ DWORD cbObjectData, LPDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD dwFlags) PURE;\n    STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT lpdf) PURE;\n    STDMETHOD(SetEventNotification)(THIS_ HANDLE hEvent) PURE;\n    STDMETHOD(SetCooperativeLevel)(THIS_ HWND hwnd, DWORD dwFlags) PURE;\n    STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEW pdidoi, DWORD dwObj, DWORD dwHow) PURE;\n    STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEW pdidi) PURE;\n    STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE;\n    STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion, REFGUID rguid) PURE;\n};\n\n#if !defined(__cplusplus) || defined(CINTERFACE)\n/*** IUnknown methods ***/\n#define IDirectInputDevice_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)\n#define IDirectInputDevice_AddRef(p)             (p)->lpVtbl->AddRef(p)\n#define IDirectInputDevice_Release(p)            (p)->lpVtbl->Release(p)\n/*** IDirectInputDevice methods ***/\n#define IDirectInputDevice_GetCapabilities(p,a)       (p)->lpVtbl->GetCapabilities(p,a)\n#define IDirectInputDevice_EnumObjects(p,a,b,c)       (p)->lpVtbl->EnumObjects(p,a,b,c)\n#define IDirectInputDevice_GetProperty(p,a,b)         (p)->lpVtbl->GetProperty(p,a,b)\n#define IDirectInputDevice_SetProperty(p,a,b)         (p)->lpVtbl->SetProperty(p,a,b)\n#define IDirectInputDevice_Acquire(p)                 (p)->lpVtbl->Acquire(p)\n#define IDirectInputDevice_Unacquire(p)               (p)->lpVtbl->Unacquire(p)\n#define IDirectInputDevice_GetDeviceState(p,a,b)      (p)->lpVtbl->GetDeviceState(p,a,b)\n#define IDirectInputDevice_GetDeviceData(p,a,b,c,d)   (p)->lpVtbl->GetDeviceData(p,a,b,c,d)\n#define IDirectInputDevice_SetDataFormat(p,a)         (p)->lpVtbl->SetDataFormat(p,a)\n#define IDirectInputDevice_SetEventNotification(p,a)  (p)->lpVtbl->SetEventNotification(p,a)\n#define IDirectInputDevice_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b)\n#define IDirectInputDevice_GetObjectInfo(p,a,b,c)     (p)->lpVtbl->GetObjectInfo(p,a,b,c)\n#define IDirectInputDevice_GetDeviceInfo(p,a)         (p)->lpVtbl->GetDeviceInfo(p,a)\n#define IDirectInputDevice_RunControlPanel(p,a,b)     (p)->lpVtbl->RunControlPanel(p,a,b)\n#define IDirectInputDevice_Initialize(p,a,b,c)        (p)->lpVtbl->Initialize(p,a,b,c)\n#else\n/*** IUnknown methods ***/\n#define IDirectInputDevice_QueryInterface(p,a,b) (p)->QueryInterface(a,b)\n#define IDirectInputDevice_AddRef(p)             (p)->AddRef()\n#define IDirectInputDevice_Release(p)            (p)->Release()\n/*** IDirectInputDevice methods ***/\n#define IDirectInputDevice_GetCapabilities(p,a)       (p)->GetCapabilities(a)\n#define IDirectInputDevice_EnumObjects(p,a,b,c)       (p)->EnumObjects(a,b,c)\n#define IDirectInputDevice_GetProperty(p,a,b)         (p)->GetProperty(a,b)\n#define IDirectInputDevice_SetProperty(p,a,b)         (p)->SetProperty(a,b)\n#define IDirectInputDevice_Acquire(p)                 (p)->Acquire()\n#define IDirectInputDevice_Unacquire(p)               (p)->Unacquire()\n#define IDirectInputDevice_GetDeviceState(p,a,b)      (p)->GetDeviceState(a,b)\n#define IDirectInputDevice_GetDeviceData(p,a,b,c,d)   (p)->GetDeviceData(a,b,c,d)\n#define IDirectInputDevice_SetDataFormat(p,a)         (p)->SetDataFormat(a)\n#define IDirectInputDevice_SetEventNotification(p,a)  (p)->SetEventNotification(a)\n#define IDirectInputDevice_SetCooperativeLevel(p,a,b) (p)->SetCooperativeLevel(a,b)\n#define IDirectInputDevice_GetObjectInfo(p,a,b,c)     (p)->GetObjectInfo(a,b,c)\n#define IDirectInputDevice_GetDeviceInfo(p,a)         (p)->GetDeviceInfo(a)\n#define IDirectInputDevice_RunControlPanel(p,a,b)     (p)->RunControlPanel(a,b)\n#define IDirectInputDevice_Initialize(p,a,b,c)        (p)->Initialize(a,b,c)\n#endif\n\n\n#if (DIRECTINPUT_VERSION >= 0x0500)\n/*****************************************************************************\n * IDirectInputDevice2A interface\n */\n#undef INTERFACE\n#define INTERFACE IDirectInputDevice2A\nDECLARE_INTERFACE_(IDirectInputDevice2A,IDirectInputDeviceA)\n{\n    /*** IUnknown methods ***/\n    STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;\n    STDMETHOD_(ULONG,AddRef)(THIS) PURE;\n    STDMETHOD_(ULONG,Release)(THIS) PURE;\n    /*** IDirectInputDeviceA methods ***/\n    STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS lpDIDevCaps) PURE;\n    STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKA lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;\n    STDMETHOD(GetProperty)(THIS_ REFGUID rguidProp, LPDIPROPHEADER pdiph) PURE;\n    STDMETHOD(SetProperty)(THIS_ REFGUID rguidProp, LPCDIPROPHEADER pdiph) PURE;\n    STDMETHOD(Acquire)(THIS) PURE;\n    STDMETHOD(Unacquire)(THIS) PURE;\n    STDMETHOD(GetDeviceState)(THIS_ DWORD cbData, LPVOID lpvData) PURE;\n    STDMETHOD(GetDeviceData)(THIS_ DWORD cbObjectData, LPDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD dwFlags) PURE;\n    STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT lpdf) PURE;\n    STDMETHOD(SetEventNotification)(THIS_ HANDLE hEvent) PURE;\n    STDMETHOD(SetCooperativeLevel)(THIS_ HWND hwnd, DWORD dwFlags) PURE;\n    STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEA pdidoi, DWORD dwObj, DWORD dwHow) PURE;\n    STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEA pdidi) PURE;\n    STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE;\n    STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion, REFGUID rguid) PURE;\n    /*** IDirectInputDevice2A methods ***/\n    STDMETHOD(CreateEffect)(THIS_ REFGUID rguid, LPCDIEFFECT lpeff, LPDIRECTINPUTEFFECT *ppdeff, LPUNKNOWN punkOuter) PURE;\n    STDMETHOD(EnumEffects)(THIS_ LPDIENUMEFFECTSCALLBACKA lpCallback, LPVOID pvRef, DWORD dwEffType) PURE;\n    STDMETHOD(GetEffectInfo)(THIS_ LPDIEFFECTINFOA pdei, REFGUID rguid) PURE;\n    STDMETHOD(GetForceFeedbackState)(THIS_ LPDWORD pdwOut) PURE;\n    STDMETHOD(SendForceFeedbackCommand)(THIS_ DWORD dwFlags) PURE;\n    STDMETHOD(EnumCreatedEffectObjects)(THIS_ LPDIENUMCREATEDEFFECTOBJECTSCALLBACK lpCallback, LPVOID pvRef, DWORD fl) PURE;\n    STDMETHOD(Escape)(THIS_ LPDIEFFESCAPE pesc) PURE;\n    STDMETHOD(Poll)(THIS) PURE;\n    STDMETHOD(SendDeviceData)(THIS_ DWORD cbObjectData, LPCDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD fl) PURE;\n};\n\n/*****************************************************************************\n * IDirectInputDevice2W interface\n */\n#undef INTERFACE\n#define INTERFACE IDirectInputDevice2W\nDECLARE_INTERFACE_(IDirectInputDevice2W,IDirectInputDeviceW)\n{\n    /*** IUnknown methods ***/\n    STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;\n    STDMETHOD_(ULONG,AddRef)(THIS) PURE;\n    STDMETHOD_(ULONG,Release)(THIS) PURE;\n    /*** IDirectInputDeviceW methods ***/\n    STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS lpDIDevCaps) PURE;\n    STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKW lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;\n    STDMETHOD(GetProperty)(THIS_ REFGUID rguidProp, LPDIPROPHEADER pdiph) PURE;\n    STDMETHOD(SetProperty)(THIS_ REFGUID rguidProp, LPCDIPROPHEADER pdiph) PURE;\n    STDMETHOD(Acquire)(THIS) PURE;\n    STDMETHOD(Unacquire)(THIS) PURE;\n    STDMETHOD(GetDeviceState)(THIS_ DWORD cbData, LPVOID lpvData) PURE;\n    STDMETHOD(GetDeviceData)(THIS_ DWORD cbObjectData, LPDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD dwFlags) PURE;\n    STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT lpdf) PURE;\n    STDMETHOD(SetEventNotification)(THIS_ HANDLE hEvent) PURE;\n    STDMETHOD(SetCooperativeLevel)(THIS_ HWND hwnd, DWORD dwFlags) PURE;\n    STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEW pdidoi, DWORD dwObj, DWORD dwHow) PURE;\n    STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEW pdidi) PURE;\n    STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE;\n    STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion, REFGUID rguid) PURE;\n    /*** IDirectInputDevice2W methods ***/\n    STDMETHOD(CreateEffect)(THIS_ REFGUID rguid, LPCDIEFFECT lpeff, LPDIRECTINPUTEFFECT *ppdeff, LPUNKNOWN punkOuter) PURE;\n    STDMETHOD(EnumEffects)(THIS_ LPDIENUMEFFECTSCALLBACKW lpCallback, LPVOID pvRef, DWORD dwEffType) PURE;\n    STDMETHOD(GetEffectInfo)(THIS_ LPDIEFFECTINFOW pdei, REFGUID rguid) PURE;\n    STDMETHOD(GetForceFeedbackState)(THIS_ LPDWORD pdwOut) PURE;\n    STDMETHOD(SendForceFeedbackCommand)(THIS_ DWORD dwFlags) PURE;\n    STDMETHOD(EnumCreatedEffectObjects)(THIS_ LPDIENUMCREATEDEFFECTOBJECTSCALLBACK lpCallback, LPVOID pvRef, DWORD fl) PURE;\n    STDMETHOD(Escape)(THIS_ LPDIEFFESCAPE pesc) PURE;\n    STDMETHOD(Poll)(THIS) PURE;\n    STDMETHOD(SendDeviceData)(THIS_ DWORD cbObjectData, LPCDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD fl) PURE;\n};\n\n#if !defined(__cplusplus) || defined(CINTERFACE)\n/*** IUnknown methods ***/\n#define IDirectInputDevice2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)\n#define IDirectInputDevice2_AddRef(p)             (p)->lpVtbl->AddRef(p)\n#define IDirectInputDevice2_Release(p)            (p)->lpVtbl->Release(p)\n/*** IDirectInputDevice methods ***/\n#define IDirectInputDevice2_GetCapabilities(p,a)       (p)->lpVtbl->GetCapabilities(p,a)\n#define IDirectInputDevice2_EnumObjects(p,a,b,c)       (p)->lpVtbl->EnumObjects(p,a,b,c)\n#define IDirectInputDevice2_GetProperty(p,a,b)         (p)->lpVtbl->GetProperty(p,a,b)\n#define IDirectInputDevice2_SetProperty(p,a,b)         (p)->lpVtbl->SetProperty(p,a,b)\n#define IDirectInputDevice2_Acquire(p)                 (p)->lpVtbl->Acquire(p)\n#define IDirectInputDevice2_Unacquire(p)               (p)->lpVtbl->Unacquire(p)\n#define IDirectInputDevice2_GetDeviceState(p,a,b)      (p)->lpVtbl->GetDeviceState(p,a,b)\n#define IDirectInputDevice2_GetDeviceData(p,a,b,c,d)   (p)->lpVtbl->GetDeviceData(p,a,b,c,d)\n#define IDirectInputDevice2_SetDataFormat(p,a)         (p)->lpVtbl->SetDataFormat(p,a)\n#define IDirectInputDevice2_SetEventNotification(p,a)  (p)->lpVtbl->SetEventNotification(p,a)\n#define IDirectInputDevice2_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b)\n#define IDirectInputDevice2_GetObjectInfo(p,a,b,c)     (p)->lpVtbl->GetObjectInfo(p,a,b,c)\n#define IDirectInputDevice2_GetDeviceInfo(p,a)         (p)->lpVtbl->GetDeviceInfo(p,a)\n#define IDirectInputDevice2_RunControlPanel(p,a,b)     (p)->lpVtbl->RunControlPanel(p,a,b)\n#define IDirectInputDevice2_Initialize(p,a,b,c)        (p)->lpVtbl->Initialize(p,a,b,c)\n/*** IDirectInputDevice2 methods ***/\n#define IDirectInputDevice2_CreateEffect(p,a,b,c,d)           (p)->lpVtbl->CreateEffect(p,a,b,c,d)\n#define IDirectInputDevice2_EnumEffects(p,a,b,c)              (p)->lpVtbl->EnumEffects(p,a,b,c)\n#define IDirectInputDevice2_GetEffectInfo(p,a,b)              (p)->lpVtbl->GetEffectInfo(p,a,b)\n#define IDirectInputDevice2_GetForceFeedbackState(p,a)        (p)->lpVtbl->GetForceFeedbackState(p,a)\n#define IDirectInputDevice2_SendForceFeedbackCommand(p,a)     (p)->lpVtbl->SendForceFeedbackCommand(p,a)\n#define IDirectInputDevice2_EnumCreatedEffectObjects(p,a,b,c) (p)->lpVtbl->EnumCreatedEffectObjects(p,a,b,c)\n#define IDirectInputDevice2_Escape(p,a)                       (p)->lpVtbl->Escape(p,a)\n#define IDirectInputDevice2_Poll(p)                           (p)->lpVtbl->Poll(p)\n#define IDirectInputDevice2_SendDeviceData(p,a,b,c,d)         (p)->lpVtbl->SendDeviceData(p,a,b,c,d)\n#else\n/*** IUnknown methods ***/\n#define IDirectInputDevice2_QueryInterface(p,a,b) (p)->QueryInterface(a,b)\n#define IDirectInputDevice2_AddRef(p)             (p)->AddRef()\n#define IDirectInputDevice2_Release(p)            (p)->Release()\n/*** IDirectInputDevice methods ***/\n#define IDirectInputDevice2_GetCapabilities(p,a)       (p)->GetCapabilities(a)\n#define IDirectInputDevice2_EnumObjects(p,a,b,c)       (p)->EnumObjects(a,b,c)\n#define IDirectInputDevice2_GetProperty(p,a,b)         (p)->GetProperty(a,b)\n#define IDirectInputDevice2_SetProperty(p,a,b)         (p)->SetProperty(a,b)\n#define IDirectInputDevice2_Acquire(p)                 (p)->Acquire()\n#define IDirectInputDevice2_Unacquire(p)               (p)->Unacquire()\n#define IDirectInputDevice2_GetDeviceState(p,a,b)      (p)->GetDeviceState(a,b)\n#define IDirectInputDevice2_GetDeviceData(p,a,b,c,d)   (p)->GetDeviceData(a,b,c,d)\n#define IDirectInputDevice2_SetDataFormat(p,a)         (p)->SetDataFormat(a)\n#define IDirectInputDevice2_SetEventNotification(p,a)  (p)->SetEventNotification(a)\n#define IDirectInputDevice2_SetCooperativeLevel(p,a,b) (p)->SetCooperativeLevel(a,b)\n#define IDirectInputDevice2_GetObjectInfo(p,a,b,c)     (p)->GetObjectInfo(a,b,c)\n#define IDirectInputDevice2_GetDeviceInfo(p,a)         (p)->GetDeviceInfo(a)\n#define IDirectInputDevice2_RunControlPanel(p,a,b)     (p)->RunControlPanel(a,b)\n#define IDirectInputDevice2_Initialize(p,a,b,c)        (p)->Initialize(a,b,c)\n/*** IDirectInputDevice2 methods ***/\n#define IDirectInputDevice2_CreateEffect(p,a,b,c,d)           (p)->CreateEffect(a,b,c,d)\n#define IDirectInputDevice2_EnumEffects(p,a,b,c)              (p)->EnumEffects(a,b,c)\n#define IDirectInputDevice2_GetEffectInfo(p,a,b)              (p)->GetEffectInfo(a,b)\n#define IDirectInputDevice2_GetForceFeedbackState(p,a)        (p)->GetForceFeedbackState(a)\n#define IDirectInputDevice2_SendForceFeedbackCommand(p,a)     (p)->SendForceFeedbackCommand(a)\n#define IDirectInputDevice2_EnumCreatedEffectObjects(p,a,b,c) (p)->EnumCreatedEffectObjects(a,b,c)\n#define IDirectInputDevice2_Escape(p,a)                       (p)->Escape(a)\n#define IDirectInputDevice2_Poll(p)                           (p)->Poll()\n#define IDirectInputDevice2_SendDeviceData(p,a,b,c,d)         (p)->SendDeviceData(a,b,c,d)\n#endif\n#endif /* DI5 */\n\n#if DIRECTINPUT_VERSION >= 0x0700\n/*****************************************************************************\n * IDirectInputDevice7A interface\n */\n#undef INTERFACE\n#define INTERFACE IDirectInputDevice7A\nDECLARE_INTERFACE_(IDirectInputDevice7A,IDirectInputDevice2A)\n{\n    /*** IUnknown methods ***/\n    STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;\n    STDMETHOD_(ULONG,AddRef)(THIS) PURE;\n    STDMETHOD_(ULONG,Release)(THIS) PURE;\n    /*** IDirectInputDeviceA methods ***/\n    STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS lpDIDevCaps) PURE;\n    STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKA lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;\n    STDMETHOD(GetProperty)(THIS_ REFGUID rguidProp, LPDIPROPHEADER pdiph) PURE;\n    STDMETHOD(SetProperty)(THIS_ REFGUID rguidProp, LPCDIPROPHEADER pdiph) PURE;\n    STDMETHOD(Acquire)(THIS) PURE;\n    STDMETHOD(Unacquire)(THIS) PURE;\n    STDMETHOD(GetDeviceState)(THIS_ DWORD cbData, LPVOID lpvData) PURE;\n    STDMETHOD(GetDeviceData)(THIS_ DWORD cbObjectData, LPDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD dwFlags) PURE;\n    STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT lpdf) PURE;\n    STDMETHOD(SetEventNotification)(THIS_ HANDLE hEvent) PURE;\n    STDMETHOD(SetCooperativeLevel)(THIS_ HWND hwnd, DWORD dwFlags) PURE;\n    STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEA pdidoi, DWORD dwObj, DWORD dwHow) PURE;\n    STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEA pdidi) PURE;\n    STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE;\n    STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion, REFGUID rguid) PURE;\n    /*** IDirectInputDevice2A methods ***/\n    STDMETHOD(CreateEffect)(THIS_ REFGUID rguid, LPCDIEFFECT lpeff, LPDIRECTINPUTEFFECT *ppdeff, LPUNKNOWN punkOuter) PURE;\n    STDMETHOD(EnumEffects)(THIS_ LPDIENUMEFFECTSCALLBACKA lpCallback, LPVOID pvRef, DWORD dwEffType) PURE;\n    STDMETHOD(GetEffectInfo)(THIS_ LPDIEFFECTINFOA pdei, REFGUID rguid) PURE;\n    STDMETHOD(GetForceFeedbackState)(THIS_ LPDWORD pdwOut) PURE;\n    STDMETHOD(SendForceFeedbackCommand)(THIS_ DWORD dwFlags) PURE;\n    STDMETHOD(EnumCreatedEffectObjects)(THIS_ LPDIENUMCREATEDEFFECTOBJECTSCALLBACK lpCallback, LPVOID pvRef, DWORD fl) PURE;\n    STDMETHOD(Escape)(THIS_ LPDIEFFESCAPE pesc) PURE;\n    STDMETHOD(Poll)(THIS) PURE;\n    STDMETHOD(SendDeviceData)(THIS_ DWORD cbObjectData, LPCDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD fl) PURE;\n    /*** IDirectInputDevice7A methods ***/\n    STDMETHOD(EnumEffectsInFile)(THIS_ LPCSTR lpszFileName,LPDIENUMEFFECTSINFILECALLBACK pec,LPVOID pvRef,DWORD dwFlags) PURE;\n    STDMETHOD(WriteEffectToFile)(THIS_ LPCSTR lpszFileName,DWORD dwEntries,LPDIFILEEFFECT rgDiFileEft,DWORD dwFlags) PURE;\n};\n\n/*****************************************************************************\n * IDirectInputDevice7W interface\n */\n#undef INTERFACE\n#define INTERFACE IDirectInputDevice7W\nDECLARE_INTERFACE_(IDirectInputDevice7W,IDirectInputDevice2W)\n{\n    /*** IUnknown methods ***/\n    STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;\n    STDMETHOD_(ULONG,AddRef)(THIS) PURE;\n    STDMETHOD_(ULONG,Release)(THIS) PURE;\n    /*** IDirectInputDeviceW methods ***/\n    STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS lpDIDevCaps) PURE;\n    STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKW lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;\n    STDMETHOD(GetProperty)(THIS_ REFGUID rguidProp, LPDIPROPHEADER pdiph) PURE;\n    STDMETHOD(SetProperty)(THIS_ REFGUID rguidProp, LPCDIPROPHEADER pdiph) PURE;\n    STDMETHOD(Acquire)(THIS) PURE;\n    STDMETHOD(Unacquire)(THIS) PURE;\n    STDMETHOD(GetDeviceState)(THIS_ DWORD cbData, LPVOID lpvData) PURE;\n    STDMETHOD(GetDeviceData)(THIS_ DWORD cbObjectData, LPDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD dwFlags) PURE;\n    STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT lpdf) PURE;\n    STDMETHOD(SetEventNotification)(THIS_ HANDLE hEvent) PURE;\n    STDMETHOD(SetCooperativeLevel)(THIS_ HWND hwnd, DWORD dwFlags) PURE;\n    STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEW pdidoi, DWORD dwObj, DWORD dwHow) PURE;\n    STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEW pdidi) PURE;\n    STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE;\n    STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion, REFGUID rguid) PURE;\n    /*** IDirectInputDevice2W methods ***/\n    STDMETHOD(CreateEffect)(THIS_ REFGUID rguid, LPCDIEFFECT lpeff, LPDIRECTINPUTEFFECT *ppdeff, LPUNKNOWN punkOuter) PURE;\n    STDMETHOD(EnumEffects)(THIS_ LPDIENUMEFFECTSCALLBACKW lpCallback, LPVOID pvRef, DWORD dwEffType) PURE;\n    STDMETHOD(GetEffectInfo)(THIS_ LPDIEFFECTINFOW pdei, REFGUID rguid) PURE;\n    STDMETHOD(GetForceFeedbackState)(THIS_ LPDWORD pdwOut) PURE;\n    STDMETHOD(SendForceFeedbackCommand)(THIS_ DWORD dwFlags) PURE;\n    STDMETHOD(EnumCreatedEffectObjects)(THIS_ LPDIENUMCREATEDEFFECTOBJECTSCALLBACK lpCallback, LPVOID pvRef, DWORD fl) PURE;\n    STDMETHOD(Escape)(THIS_ LPDIEFFESCAPE pesc) PURE;\n    STDMETHOD(Poll)(THIS) PURE;\n    STDMETHOD(SendDeviceData)(THIS_ DWORD cbObjectData, LPCDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD fl) PURE;\n    /*** IDirectInputDevice7W methods ***/\n    STDMETHOD(EnumEffectsInFile)(THIS_ LPCWSTR lpszFileName,LPDIENUMEFFECTSINFILECALLBACK pec,LPVOID pvRef,DWORD dwFlags) PURE;\n    STDMETHOD(WriteEffectToFile)(THIS_ LPCWSTR lpszFileName,DWORD dwEntries,LPDIFILEEFFECT rgDiFileEft,DWORD dwFlags) PURE;\n};\n\n#if !defined(__cplusplus) || defined(CINTERFACE)\n/*** IUnknown methods ***/\n#define IDirectInputDevice7_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)\n#define IDirectInputDevice7_AddRef(p)             (p)->lpVtbl->AddRef(p)\n#define IDirectInputDevice7_Release(p)            (p)->lpVtbl->Release(p)\n/*** IDirectInputDevice methods ***/\n#define IDirectInputDevice7_GetCapabilities(p,a)       (p)->lpVtbl->GetCapabilities(p,a)\n#define IDirectInputDevice7_EnumObjects(p,a,b,c)       (p)->lpVtbl->EnumObjects(p,a,b,c)\n#define IDirectInputDevice7_GetProperty(p,a,b)         (p)->lpVtbl->GetProperty(p,a,b)\n#define IDirectInputDevice7_SetProperty(p,a,b)         (p)->lpVtbl->SetProperty(p,a,b)\n#define IDirectInputDevice7_Acquire(p)                 (p)->lpVtbl->Acquire(p)\n#define IDirectInputDevice7_Unacquire(p)               (p)->lpVtbl->Unacquire(p)\n#define IDirectInputDevice7_GetDeviceState(p,a,b)      (p)->lpVtbl->GetDeviceState(p,a,b)\n#define IDirectInputDevice7_GetDeviceData(p,a,b,c,d)   (p)->lpVtbl->GetDeviceData(p,a,b,c,d)\n#define IDirectInputDevice7_SetDataFormat(p,a)         (p)->lpVtbl->SetDataFormat(p,a)\n#define IDirectInputDevice7_SetEventNotification(p,a)  (p)->lpVtbl->SetEventNotification(p,a)\n#define IDirectInputDevice7_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b)\n#define IDirectInputDevice7_GetObjectInfo(p,a,b,c)     (p)->lpVtbl->GetObjectInfo(p,a,b,c)\n#define IDirectInputDevice7_GetDeviceInfo(p,a)         (p)->lpVtbl->GetDeviceInfo(p,a)\n#define IDirectInputDevice7_RunControlPanel(p,a,b)     (p)->lpVtbl->RunControlPanel(p,a,b)\n#define IDirectInputDevice7_Initialize(p,a,b,c)        (p)->lpVtbl->Initialize(p,a,b,c)\n/*** IDirectInputDevice2 methods ***/\n#define IDirectInputDevice7_CreateEffect(p,a,b,c,d)           (p)->lpVtbl->CreateEffect(p,a,b,c,d)\n#define IDirectInputDevice7_EnumEffects(p,a,b,c)              (p)->lpVtbl->EnumEffects(p,a,b,c)\n#define IDirectInputDevice7_GetEffectInfo(p,a,b)              (p)->lpVtbl->GetEffectInfo(p,a,b)\n#define IDirectInputDevice7_GetForceFeedbackState(p,a)        (p)->lpVtbl->GetForceFeedbackState(p,a)\n#define IDirectInputDevice7_SendForceFeedbackCommand(p,a)     (p)->lpVtbl->SendForceFeedbackCommand(p,a)\n#define IDirectInputDevice7_EnumCreatedEffectObjects(p,a,b,c) (p)->lpVtbl->EnumCreatedEffectObjects(p,a,b,c)\n#define IDirectInputDevice7_Escape(p,a)                       (p)->lpVtbl->Escape(p,a)\n#define IDirectInputDevice7_Poll(p)                           (p)->lpVtbl->Poll(p)\n#define IDirectInputDevice7_SendDeviceData(p,a,b,c,d)         (p)->lpVtbl->SendDeviceData(p,a,b,c,d)\n/*** IDirectInputDevice7 methods ***/\n#define IDirectInputDevice7_EnumEffectsInFile(p,a,b,c,d) (p)->lpVtbl->EnumEffectsInFile(p,a,b,c,d)\n#define IDirectInputDevice7_WriteEffectToFile(p,a,b,c,d) (p)->lpVtbl->WriteEffectToFile(p,a,b,c,d)\n#else\n/*** IUnknown methods ***/\n#define IDirectInputDevice7_QueryInterface(p,a,b) (p)->QueryInterface(a,b)\n#define IDirectInputDevice7_AddRef(p)             (p)->AddRef()\n#define IDirectInputDevice7_Release(p)            (p)->Release()\n/*** IDirectInputDevice methods ***/\n#define IDirectInputDevice7_GetCapabilities(p,a)       (p)->GetCapabilities(a)\n#define IDirectInputDevice7_EnumObjects(p,a,b,c)       (p)->EnumObjects(a,b,c)\n#define IDirectInputDevice7_GetProperty(p,a,b)         (p)->GetProperty(a,b)\n#define IDirectInputDevice7_SetProperty(p,a,b)         (p)->SetProperty(a,b)\n#define IDirectInputDevice7_Acquire(p)                 (p)->Acquire()\n#define IDirectInputDevice7_Unacquire(p)               (p)->Unacquire()\n#define IDirectInputDevice7_GetDeviceState(p,a,b)      (p)->GetDeviceState(a,b)\n#define IDirectInputDevice7_GetDeviceData(p,a,b,c,d)   (p)->GetDeviceData(a,b,c,d)\n#define IDirectInputDevice7_SetDataFormat(p,a)         (p)->SetDataFormat(a)\n#define IDirectInputDevice7_SetEventNotification(p,a)  (p)->SetEventNotification(a)\n#define IDirectInputDevice7_SetCooperativeLevel(p,a,b) (p)->SetCooperativeLevel(a,b)\n#define IDirectInputDevice7_GetObjectInfo(p,a,b,c)     (p)->GetObjectInfo(a,b,c)\n#define IDirectInputDevice7_GetDeviceInfo(p,a)         (p)->GetDeviceInfo(a)\n#define IDirectInputDevice7_RunControlPanel(p,a,b)     (p)->RunControlPanel(a,b)\n#define IDirectInputDevice7_Initialize(p,a,b,c)        (p)->Initialize(a,b,c)\n/*** IDirectInputDevice2 methods ***/\n#define IDirectInputDevice7_CreateEffect(p,a,b,c,d)           (p)->CreateEffect(a,b,c,d)\n#define IDirectInputDevice7_EnumEffects(p,a,b,c)              (p)->EnumEffects(a,b,c)\n#define IDirectInputDevice7_GetEffectInfo(p,a,b)              (p)->GetEffectInfo(a,b)\n#define IDirectInputDevice7_GetForceFeedbackState(p,a)        (p)->GetForceFeedbackState(a)\n#define IDirectInputDevice7_SendForceFeedbackCommand(p,a)     (p)->SendForceFeedbackCommand(a)\n#define IDirectInputDevice7_EnumCreatedEffectObjects(p,a,b,c) (p)->EnumCreatedEffectObjects(a,b,c)\n#define IDirectInputDevice7_Escape(p,a)                       (p)->Escape(a)\n#define IDirectInputDevice7_Poll(p)                           (p)->Poll()\n#define IDirectInputDevice7_SendDeviceData(p,a,b,c,d)         (p)->SendDeviceData(a,b,c,d)\n/*** IDirectInputDevice7 methods ***/\n#define IDirectInputDevice7_EnumEffectsInFile(p,a,b,c,d) (p)->EnumEffectsInFile(a,b,c,d)\n#define IDirectInputDevice7_WriteEffectToFile(p,a,b,c,d) (p)->WriteEffectToFile(a,b,c,d)\n#endif\n\n#endif /* DI7 */\n\n#if DIRECTINPUT_VERSION >= 0x0800\n/*****************************************************************************\n * IDirectInputDevice8A interface\n */\n#undef INTERFACE\n#define INTERFACE IDirectInputDevice8A\nDECLARE_INTERFACE_(IDirectInputDevice8A,IDirectInputDevice7A)\n{\n    /*** IUnknown methods ***/\n    STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;\n    STDMETHOD_(ULONG,AddRef)(THIS) PURE;\n    STDMETHOD_(ULONG,Release)(THIS) PURE;\n    /*** IDirectInputDeviceA methods ***/\n    STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS lpDIDevCaps) PURE;\n    STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKA lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;\n    STDMETHOD(GetProperty)(THIS_ REFGUID rguidProp, LPDIPROPHEADER pdiph) PURE;\n    STDMETHOD(SetProperty)(THIS_ REFGUID rguidProp, LPCDIPROPHEADER pdiph) PURE;\n    STDMETHOD(Acquire)(THIS) PURE;\n    STDMETHOD(Unacquire)(THIS) PURE;\n    STDMETHOD(GetDeviceState)(THIS_ DWORD cbData, LPVOID lpvData) PURE;\n    STDMETHOD(GetDeviceData)(THIS_ DWORD cbObjectData, LPDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD dwFlags) PURE;\n    STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT lpdf) PURE;\n    STDMETHOD(SetEventNotification)(THIS_ HANDLE hEvent) PURE;\n    STDMETHOD(SetCooperativeLevel)(THIS_ HWND hwnd, DWORD dwFlags) PURE;\n    STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEA pdidoi, DWORD dwObj, DWORD dwHow) PURE;\n    STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEA pdidi) PURE;\n    STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE;\n    STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion, REFGUID rguid) PURE;\n    /*** IDirectInputDevice2A methods ***/\n    STDMETHOD(CreateEffect)(THIS_ REFGUID rguid, LPCDIEFFECT lpeff, LPDIRECTINPUTEFFECT *ppdeff, LPUNKNOWN punkOuter) PURE;\n    STDMETHOD(EnumEffects)(THIS_ LPDIENUMEFFECTSCALLBACKA lpCallback, LPVOID pvRef, DWORD dwEffType) PURE;\n    STDMETHOD(GetEffectInfo)(THIS_ LPDIEFFECTINFOA pdei, REFGUID rguid) PURE;\n    STDMETHOD(GetForceFeedbackState)(THIS_ LPDWORD pdwOut) PURE;\n    STDMETHOD(SendForceFeedbackCommand)(THIS_ DWORD dwFlags) PURE;\n    STDMETHOD(EnumCreatedEffectObjects)(THIS_ LPDIENUMCREATEDEFFECTOBJECTSCALLBACK lpCallback, LPVOID pvRef, DWORD fl) PURE;\n    STDMETHOD(Escape)(THIS_ LPDIEFFESCAPE pesc) PURE;\n    STDMETHOD(Poll)(THIS) PURE;\n    STDMETHOD(SendDeviceData)(THIS_ DWORD cbObjectData, LPCDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD fl) PURE;\n    /*** IDirectInputDevice7A methods ***/\n    STDMETHOD(EnumEffectsInFile)(THIS_ LPCSTR lpszFileName,LPDIENUMEFFECTSINFILECALLBACK pec,LPVOID pvRef,DWORD dwFlags) PURE;\n    STDMETHOD(WriteEffectToFile)(THIS_ LPCSTR lpszFileName,DWORD dwEntries,LPDIFILEEFFECT rgDiFileEft,DWORD dwFlags) PURE;\n    /*** IDirectInputDevice8A methods ***/\n    STDMETHOD(BuildActionMap)(THIS_ LPDIACTIONFORMATA lpdiaf, LPCSTR lpszUserName, DWORD dwFlags) PURE;\n    STDMETHOD(SetActionMap)(THIS_ LPDIACTIONFORMATA lpdiaf, LPCSTR lpszUserName, DWORD dwFlags) PURE;\n    STDMETHOD(GetImageInfo)(THIS_ LPDIDEVICEIMAGEINFOHEADERA lpdiDevImageInfoHeader) PURE;\n};\n\n/*****************************************************************************\n * IDirectInputDevice8W interface\n */\n#undef INTERFACE\n#define INTERFACE IDirectInputDevice8W\nDECLARE_INTERFACE_(IDirectInputDevice8W,IDirectInputDevice7W)\n{\n    /*** IUnknown methods ***/\n    STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;\n    STDMETHOD_(ULONG,AddRef)(THIS) PURE;\n    STDMETHOD_(ULONG,Release)(THIS) PURE;\n    /*** IDirectInputDeviceW methods ***/\n    STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS lpDIDevCaps) PURE;\n    STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKW lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;\n    STDMETHOD(GetProperty)(THIS_ REFGUID rguidProp, LPDIPROPHEADER pdiph) PURE;\n    STDMETHOD(SetProperty)(THIS_ REFGUID rguidProp, LPCDIPROPHEADER pdiph) PURE;\n    STDMETHOD(Acquire)(THIS) PURE;\n    STDMETHOD(Unacquire)(THIS) PURE;\n    STDMETHOD(GetDeviceState)(THIS_ DWORD cbData, LPVOID lpvData) PURE;\n    STDMETHOD(GetDeviceData)(THIS_ DWORD cbObjectData, LPDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD dwFlags) PURE;\n    STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT lpdf) PURE;\n    STDMETHOD(SetEventNotification)(THIS_ HANDLE hEvent) PURE;\n    STDMETHOD(SetCooperativeLevel)(THIS_ HWND hwnd, DWORD dwFlags) PURE;\n    STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEW pdidoi, DWORD dwObj, DWORD dwHow) PURE;\n    STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEW pdidi) PURE;\n    STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE;\n    STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion, REFGUID rguid) PURE;\n    /*** IDirectInputDevice2W methods ***/\n    STDMETHOD(CreateEffect)(THIS_ REFGUID rguid, LPCDIEFFECT lpeff, LPDIRECTINPUTEFFECT *ppdeff, LPUNKNOWN punkOuter) PURE;\n    STDMETHOD(EnumEffects)(THIS_ LPDIENUMEFFECTSCALLBACKW lpCallback, LPVOID pvRef, DWORD dwEffType) PURE;\n    STDMETHOD(GetEffectInfo)(THIS_ LPDIEFFECTINFOW pdei, REFGUID rguid) PURE;\n    STDMETHOD(GetForceFeedbackState)(THIS_ LPDWORD pdwOut) PURE;\n    STDMETHOD(SendForceFeedbackCommand)(THIS_ DWORD dwFlags) PURE;\n    STDMETHOD(EnumCreatedEffectObjects)(THIS_ LPDIENUMCREATEDEFFECTOBJECTSCALLBACK lpCallback, LPVOID pvRef, DWORD fl) PURE;\n    STDMETHOD(Escape)(THIS_ LPDIEFFESCAPE pesc) PURE;\n    STDMETHOD(Poll)(THIS) PURE;\n    STDMETHOD(SendDeviceData)(THIS_ DWORD cbObjectData, LPCDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD fl) PURE;\n    /*** IDirectInputDevice7W methods ***/\n    STDMETHOD(EnumEffectsInFile)(THIS_ LPCWSTR lpszFileName,LPDIENUMEFFECTSINFILECALLBACK pec,LPVOID pvRef,DWORD dwFlags) PURE;\n    STDMETHOD(WriteEffectToFile)(THIS_ LPCWSTR lpszFileName,DWORD dwEntries,LPDIFILEEFFECT rgDiFileEft,DWORD dwFlags) PURE;\n    /*** IDirectInputDevice8W methods ***/\n    STDMETHOD(BuildActionMap)(THIS_ LPDIACTIONFORMATW lpdiaf, LPCWSTR lpszUserName, DWORD dwFlags) PURE;\n    STDMETHOD(SetActionMap)(THIS_ LPDIACTIONFORMATW lpdiaf, LPCWSTR lpszUserName, DWORD dwFlags) PURE;\n    STDMETHOD(GetImageInfo)(THIS_ LPDIDEVICEIMAGEINFOHEADERW lpdiDevImageInfoHeader) PURE;\n};\n\n#if !defined(__cplusplus) || defined(CINTERFACE)\n/*** IUnknown methods ***/\n#define IDirectInputDevice8_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)\n#define IDirectInputDevice8_AddRef(p)             (p)->lpVtbl->AddRef(p)\n#define IDirectInputDevice8_Release(p)            (p)->lpVtbl->Release(p)\n/*** IDirectInputDevice methods ***/\n#define IDirectInputDevice8_GetCapabilities(p,a)       (p)->lpVtbl->GetCapabilities(p,a)\n#define IDirectInputDevice8_EnumObjects(p,a,b,c)       (p)->lpVtbl->EnumObjects(p,a,b,c)\n#define IDirectInputDevice8_GetProperty(p,a,b)         (p)->lpVtbl->GetProperty(p,a,b)\n#define IDirectInputDevice8_SetProperty(p,a,b)         (p)->lpVtbl->SetProperty(p,a,b)\n#define IDirectInputDevice8_Acquire(p)                 (p)->lpVtbl->Acquire(p)\n#define IDirectInputDevice8_Unacquire(p)               (p)->lpVtbl->Unacquire(p)\n#define IDirectInputDevice8_GetDeviceState(p,a,b)      (p)->lpVtbl->GetDeviceState(p,a,b)\n#define IDirectInputDevice8_GetDeviceData(p,a,b,c,d)   (p)->lpVtbl->GetDeviceData(p,a,b,c,d)\n#define IDirectInputDevice8_SetDataFormat(p,a)         (p)->lpVtbl->SetDataFormat(p,a)\n#define IDirectInputDevice8_SetEventNotification(p,a)  (p)->lpVtbl->SetEventNotification(p,a)\n#define IDirectInputDevice8_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b)\n#define IDirectInputDevice8_GetObjectInfo(p,a,b,c)     (p)->lpVtbl->GetObjectInfo(p,a,b,c)\n#define IDirectInputDevice8_GetDeviceInfo(p,a)         (p)->lpVtbl->GetDeviceInfo(p,a)\n#define IDirectInputDevice8_RunControlPanel(p,a,b)     (p)->lpVtbl->RunControlPanel(p,a,b)\n#define IDirectInputDevice8_Initialize(p,a,b,c)        (p)->lpVtbl->Initialize(p,a,b,c)\n/*** IDirectInputDevice2 methods ***/\n#define IDirectInputDevice8_CreateEffect(p,a,b,c,d)           (p)->lpVtbl->CreateEffect(p,a,b,c,d)\n#define IDirectInputDevice8_EnumEffects(p,a,b,c)              (p)->lpVtbl->EnumEffects(p,a,b,c)\n#define IDirectInputDevice8_GetEffectInfo(p,a,b)              (p)->lpVtbl->GetEffectInfo(p,a,b)\n#define IDirectInputDevice8_GetForceFeedbackState(p,a)        (p)->lpVtbl->GetForceFeedbackState(p,a)\n#define IDirectInputDevice8_SendForceFeedbackCommand(p,a)     (p)->lpVtbl->SendForceFeedbackCommand(p,a)\n#define IDirectInputDevice8_EnumCreatedEffectObjects(p,a,b,c) (p)->lpVtbl->EnumCreatedEffectObjects(p,a,b,c)\n#define IDirectInputDevice8_Escape(p,a)                       (p)->lpVtbl->Escape(p,a)\n#define IDirectInputDevice8_Poll(p)                           (p)->lpVtbl->Poll(p)\n#define IDirectInputDevice8_SendDeviceData(p,a,b,c,d)         (p)->lpVtbl->SendDeviceData(p,a,b,c,d)\n/*** IDirectInputDevice7 methods ***/\n#define IDirectInputDevice8_EnumEffectsInFile(p,a,b,c,d) (p)->lpVtbl->EnumEffectsInFile(p,a,b,c,d)\n#define IDirectInputDevice8_WriteEffectToFile(p,a,b,c,d) (p)->lpVtbl->WriteEffectToFile(p,a,b,c,d)\n/*** IDirectInputDevice8 methods ***/\n#define IDirectInputDevice8_BuildActionMap(p,a,b,c) (p)->lpVtbl->BuildActionMap(p,a,b,c)\n#define IDirectInputDevice8_SetActionMap(p,a,b,c)   (p)->lpVtbl->SetActionMap(p,a,b,c)\n#define IDirectInputDevice8_GetImageInfo(p,a)       (p)->lpVtbl->GetImageInfo(p,a)\n#else\n/*** IUnknown methods ***/\n#define IDirectInputDevice8_QueryInterface(p,a,b) (p)->QueryInterface(a,b)\n#define IDirectInputDevice8_AddRef(p)             (p)->AddRef()\n#define IDirectInputDevice8_Release(p)            (p)->Release()\n/*** IDirectInputDevice methods ***/\n#define IDirectInputDevice8_GetCapabilities(p,a)       (p)->GetCapabilities(a)\n#define IDirectInputDevice8_EnumObjects(p,a,b,c)       (p)->EnumObjects(a,b,c)\n#define IDirectInputDevice8_GetProperty(p,a,b)         (p)->GetProperty(a,b)\n#define IDirectInputDevice8_SetProperty(p,a,b)         (p)->SetProperty(a,b)\n#define IDirectInputDevice8_Acquire(p)                 (p)->Acquire()\n#define IDirectInputDevice8_Unacquire(p)               (p)->Unacquire()\n#define IDirectInputDevice8_GetDeviceState(p,a,b)      (p)->GetDeviceState(a,b)\n#define IDirectInputDevice8_GetDeviceData(p,a,b,c,d)   (p)->GetDeviceData(a,b,c,d)\n#define IDirectInputDevice8_SetDataFormat(p,a)         (p)->SetDataFormat(a)\n#define IDirectInputDevice8_SetEventNotification(p,a)  (p)->SetEventNotification(a)\n#define IDirectInputDevice8_SetCooperativeLevel(p,a,b) (p)->SetCooperativeLevel(a,b)\n#define IDirectInputDevice8_GetObjectInfo(p,a,b,c)     (p)->GetObjectInfo(a,b,c)\n#define IDirectInputDevice8_GetDeviceInfo(p,a)         (p)->GetDeviceInfo(a)\n#define IDirectInputDevice8_RunControlPanel(p,a,b)     (p)->RunControlPanel(a,b)\n#define IDirectInputDevice8_Initialize(p,a,b,c)        (p)->Initialize(a,b,c)\n/*** IDirectInputDevice2 methods ***/\n#define IDirectInputDevice8_CreateEffect(p,a,b,c,d)           (p)->CreateEffect(a,b,c,d)\n#define IDirectInputDevice8_EnumEffects(p,a,b,c)              (p)->EnumEffects(a,b,c)\n#define IDirectInputDevice8_GetEffectInfo(p,a,b)              (p)->GetEffectInfo(a,b)\n#define IDirectInputDevice8_GetForceFeedbackState(p,a)        (p)->GetForceFeedbackState(a)\n#define IDirectInputDevice8_SendForceFeedbackCommand(p,a)     (p)->SendForceFeedbackCommand(a)\n#define IDirectInputDevice8_EnumCreatedEffectObjects(p,a,b,c) (p)->EnumCreatedEffectObjects(a,b,c)\n#define IDirectInputDevice8_Escape(p,a)                       (p)->Escape(a)\n#define IDirectInputDevice8_Poll(p)                           (p)->Poll()\n#define IDirectInputDevice8_SendDeviceData(p,a,b,c,d)         (p)->SendDeviceData(a,b,c,d)\n/*** IDirectInputDevice7 methods ***/\n#define IDirectInputDevice8_EnumEffectsInFile(p,a,b,c,d) (p)->EnumEffectsInFile(a,b,c,d)\n#define IDirectInputDevice8_WriteEffectToFile(p,a,b,c,d) (p)->WriteEffectToFile(a,b,c,d)\n/*** IDirectInputDevice8 methods ***/\n#define IDirectInputDevice8_BuildActionMap(p,a,b,c) (p)->BuildActionMap(a,b,c)\n#define IDirectInputDevice8_SetActionMap(p,a,b,c)   (p)->SetActionMap(a,b,c)\n#define IDirectInputDevice8_GetImageInfo(p,a)       (p)->GetImageInfo(a)\n#endif\n\n#endif /* DI8 */\n\n/* \"Standard\" Mouse report... */\ntypedef struct DIMOUSESTATE {\n  LONG lX;\n  LONG lY;\n  LONG lZ;\n  BYTE rgbButtons[4];\n} DIMOUSESTATE;\n\n#if DIRECTINPUT_VERSION >= 0x0700\n/* \"Standard\" Mouse report for DInput 7... */\ntypedef struct DIMOUSESTATE2 {\n  LONG lX;\n  LONG lY;\n  LONG lZ;\n  BYTE rgbButtons[8];\n} DIMOUSESTATE2;\n#endif /* DI7 */\n\n#define DIMOFS_X        FIELD_OFFSET(DIMOUSESTATE, lX)\n#define DIMOFS_Y        FIELD_OFFSET(DIMOUSESTATE, lY)\n#define DIMOFS_Z        FIELD_OFFSET(DIMOUSESTATE, lZ)\n#define DIMOFS_BUTTON0 (FIELD_OFFSET(DIMOUSESTATE, rgbButtons) + 0)\n#define DIMOFS_BUTTON1 (FIELD_OFFSET(DIMOUSESTATE, rgbButtons) + 1)\n#define DIMOFS_BUTTON2 (FIELD_OFFSET(DIMOUSESTATE, rgbButtons) + 2)\n#define DIMOFS_BUTTON3 (FIELD_OFFSET(DIMOUSESTATE, rgbButtons) + 3)\n#if DIRECTINPUT_VERSION >= 0x0700\n#define DIMOFS_BUTTON4 (FIELD_OFFSET(DIMOUSESTATE2, rgbButtons) + 4)\n#define DIMOFS_BUTTON5 (FIELD_OFFSET(DIMOUSESTATE2, rgbButtons) + 5)\n#define DIMOFS_BUTTON6 (FIELD_OFFSET(DIMOUSESTATE2, rgbButtons) + 6)\n#define DIMOFS_BUTTON7 (FIELD_OFFSET(DIMOUSESTATE2, rgbButtons) + 7)\n#endif /* DI7 */\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\nextern const DIDATAFORMAT c_dfDIMouse;\n#if DIRECTINPUT_VERSION >= 0x0700\nextern const DIDATAFORMAT c_dfDIMouse2; /* DX 7 */\n#endif /* DI7 */\nextern const DIDATAFORMAT c_dfDIKeyboard;\n#if DIRECTINPUT_VERSION >= 0x0500\nextern const DIDATAFORMAT c_dfDIJoystick;\nextern const DIDATAFORMAT c_dfDIJoystick2;\n#endif /* DI5 */\n#ifdef __cplusplus\n};\n#endif\n\n/*****************************************************************************\n * IDirectInputA interface\n */\n#undef INTERFACE\n#define INTERFACE IDirectInputA\nDECLARE_INTERFACE_(IDirectInputA,IUnknown)\n{\n    /*** IUnknown methods ***/\n    STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;\n    STDMETHOD_(ULONG,AddRef)(THIS) PURE;\n    STDMETHOD_(ULONG,Release)(THIS) PURE;\n    /*** IDirectInputA methods ***/\n    STDMETHOD(CreateDevice)(THIS_ REFGUID rguid, LPDIRECTINPUTDEVICEA *lplpDirectInputDevice, LPUNKNOWN pUnkOuter) PURE;\n    STDMETHOD(EnumDevices)(THIS_ DWORD dwDevType, LPDIENUMDEVICESCALLBACKA lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;\n    STDMETHOD(GetDeviceStatus)(THIS_ REFGUID rguidInstance) PURE;\n    STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE;\n    STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion) PURE;\n};\n\n/*****************************************************************************\n * IDirectInputW interface\n */\n#undef INTERFACE\n#define INTERFACE IDirectInputW\nDECLARE_INTERFACE_(IDirectInputW,IUnknown)\n{\n    /*** IUnknown methods ***/\n    STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;\n    STDMETHOD_(ULONG,AddRef)(THIS) PURE;\n    STDMETHOD_(ULONG,Release)(THIS) PURE;\n    /*** IDirectInputW methods ***/\n    STDMETHOD(CreateDevice)(THIS_ REFGUID rguid, LPDIRECTINPUTDEVICEW *lplpDirectInputDevice, LPUNKNOWN pUnkOuter) PURE;\n    STDMETHOD(EnumDevices)(THIS_ DWORD dwDevType, LPDIENUMDEVICESCALLBACKW lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;\n    STDMETHOD(GetDeviceStatus)(THIS_ REFGUID rguidInstance) PURE;\n    STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE;\n    STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion) PURE;\n};\n\n#if !defined(__cplusplus) || defined(CINTERFACE)\n/*** IUnknown methods ***/\n#define IDirectInput_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)\n#define IDirectInput_AddRef(p)             (p)->lpVtbl->AddRef(p)\n#define IDirectInput_Release(p)            (p)->lpVtbl->Release(p)\n/*** IDirectInput methods ***/\n#define IDirectInput_CreateDevice(p,a,b,c)  (p)->lpVtbl->CreateDevice(p,a,b,c)\n#define IDirectInput_EnumDevices(p,a,b,c,d) (p)->lpVtbl->EnumDevices(p,a,b,c,d)\n#define IDirectInput_GetDeviceStatus(p,a)   (p)->lpVtbl->GetDeviceStatus(p,a)\n#define IDirectInput_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b)\n#define IDirectInput_Initialize(p,a,b)      (p)->lpVtbl->Initialize(p,a,b)\n#else\n/*** IUnknown methods ***/\n#define IDirectInput_QueryInterface(p,a,b) (p)->QueryInterface(a,b)\n#define IDirectInput_AddRef(p)             (p)->AddRef()\n#define IDirectInput_Release(p)            (p)->Release()\n/*** IDirectInput methods ***/\n#define IDirectInput_CreateDevice(p,a,b,c)  (p)->CreateDevice(a,b,c)\n#define IDirectInput_EnumDevices(p,a,b,c,d) (p)->EnumDevices(a,b,c,d)\n#define IDirectInput_GetDeviceStatus(p,a)   (p)->GetDeviceStatus(a)\n#define IDirectInput_RunControlPanel(p,a,b) (p)->RunControlPanel(a,b)\n#define IDirectInput_Initialize(p,a,b)      (p)->Initialize(a,b)\n#endif\n\n/*****************************************************************************\n * IDirectInput2A interface\n */\n#undef INTERFACE\n#define INTERFACE IDirectInput2A\nDECLARE_INTERFACE_(IDirectInput2A,IDirectInputA)\n{\n    /*** IUnknown methods ***/\n    STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;\n    STDMETHOD_(ULONG,AddRef)(THIS) PURE;\n    STDMETHOD_(ULONG,Release)(THIS) PURE;\n    /*** IDirectInputA methods ***/\n    STDMETHOD(CreateDevice)(THIS_ REFGUID rguid, LPDIRECTINPUTDEVICEA *lplpDirectInputDevice, LPUNKNOWN pUnkOuter) PURE;\n    STDMETHOD(EnumDevices)(THIS_ DWORD dwDevType, LPDIENUMDEVICESCALLBACKA lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;\n    STDMETHOD(GetDeviceStatus)(THIS_ REFGUID rguidInstance) PURE;\n    STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE;\n    STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion) PURE;\n    /*** IDirectInput2A methods ***/\n    STDMETHOD(FindDevice)(THIS_ REFGUID rguid, LPCSTR pszName, LPGUID pguidInstance) PURE;\n};\n\n/*****************************************************************************\n * IDirectInput2W interface\n */\n#undef INTERFACE\n#define INTERFACE IDirectInput2W\nDECLARE_INTERFACE_(IDirectInput2W,IDirectInputW)\n{\n    /*** IUnknown methods ***/\n    STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;\n    STDMETHOD_(ULONG,AddRef)(THIS) PURE;\n    STDMETHOD_(ULONG,Release)(THIS) PURE;\n    /*** IDirectInputW methods ***/\n    STDMETHOD(CreateDevice)(THIS_ REFGUID rguid, LPDIRECTINPUTDEVICEW *lplpDirectInputDevice, LPUNKNOWN pUnkOuter) PURE;\n    STDMETHOD(EnumDevices)(THIS_ DWORD dwDevType, LPDIENUMDEVICESCALLBACKW lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;\n    STDMETHOD(GetDeviceStatus)(THIS_ REFGUID rguidInstance) PURE;\n    STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE;\n    STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion) PURE;\n    /*** IDirectInput2W methods ***/\n    STDMETHOD(FindDevice)(THIS_ REFGUID rguid, LPCWSTR pszName, LPGUID pguidInstance) PURE;\n};\n\n#if !defined(__cplusplus) || defined(CINTERFACE)\n/*** IUnknown methods ***/\n#define IDirectInput2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)\n#define IDirectInput2_AddRef(p)             (p)->lpVtbl->AddRef(p)\n#define IDirectInput2_Release(p)            (p)->lpVtbl->Release(p)\n/*** IDirectInput methods ***/\n#define IDirectInput2_CreateDevice(p,a,b,c)  (p)->lpVtbl->CreateDevice(p,a,b,c)\n#define IDirectInput2_EnumDevices(p,a,b,c,d) (p)->lpVtbl->EnumDevices(p,a,b,c,d)\n#define IDirectInput2_GetDeviceStatus(p,a)   (p)->lpVtbl->GetDeviceStatus(p,a)\n#define IDirectInput2_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b)\n#define IDirectInput2_Initialize(p,a,b)      (p)->lpVtbl->Initialize(p,a,b)\n/*** IDirectInput2 methods ***/\n#define IDirectInput2_FindDevice(p,a,b,c)    (p)->lpVtbl->FindDevice(p,a,b,c)\n#else\n/*** IUnknown methods ***/\n#define IDirectInput2_QueryInterface(p,a,b) (p)->QueryInterface(a,b)\n#define IDirectInput2_AddRef(p)             (p)->AddRef()\n#define IDirectInput2_Release(p)            (p)->Release()\n/*** IDirectInput methods ***/\n#define IDirectInput2_CreateDevice(p,a,b,c)  (p)->CreateDevice(a,b,c)\n#define IDirectInput2_EnumDevices(p,a,b,c,d) (p)->EnumDevices(a,b,c,d)\n#define IDirectInput2_GetDeviceStatus(p,a)   (p)->GetDeviceStatus(a)\n#define IDirectInput2_RunControlPanel(p,a,b) (p)->RunControlPanel(a,b)\n#define IDirectInput2_Initialize(p,a,b)      (p)->Initialize(a,b)\n/*** IDirectInput2 methods ***/\n#define IDirectInput2_FindDevice(p,a,b,c)    (p)->FindDevice(a,b,c)\n#endif\n\n/*****************************************************************************\n * IDirectInput7A interface\n */\n#undef INTERFACE\n#define INTERFACE IDirectInput7A\nDECLARE_INTERFACE_(IDirectInput7A,IDirectInput2A)\n{\n    /*** IUnknown methods ***/\n    STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;\n    STDMETHOD_(ULONG,AddRef)(THIS) PURE;\n    STDMETHOD_(ULONG,Release)(THIS) PURE;\n    /*** IDirectInputA methods ***/\n    STDMETHOD(CreateDevice)(THIS_ REFGUID rguid, LPDIRECTINPUTDEVICEA *lplpDirectInputDevice, LPUNKNOWN pUnkOuter) PURE;\n    STDMETHOD(EnumDevices)(THIS_ DWORD dwDevType, LPDIENUMDEVICESCALLBACKA lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;\n    STDMETHOD(GetDeviceStatus)(THIS_ REFGUID rguidInstance) PURE;\n    STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE;\n    STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion) PURE;\n    /*** IDirectInput2A methods ***/\n    STDMETHOD(FindDevice)(THIS_ REFGUID rguid, LPCSTR pszName, LPGUID pguidInstance) PURE;\n    /*** IDirectInput7A methods ***/\n    STDMETHOD(CreateDeviceEx)(THIS_ REFGUID rguid, REFIID riid, LPVOID *pvOut, LPUNKNOWN lpUnknownOuter) PURE;\n};\n\n/*****************************************************************************\n * IDirectInput7W interface\n */\n#undef INTERFACE\n#define INTERFACE IDirectInput7W\nDECLARE_INTERFACE_(IDirectInput7W,IDirectInput2W)\n{\n    /*** IUnknown methods ***/\n    STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;\n    STDMETHOD_(ULONG,AddRef)(THIS) PURE;\n    STDMETHOD_(ULONG,Release)(THIS) PURE;\n    /*** IDirectInputW methods ***/\n    STDMETHOD(CreateDevice)(THIS_ REFGUID rguid, LPDIRECTINPUTDEVICEW *lplpDirectInputDevice, LPUNKNOWN pUnkOuter) PURE;\n    STDMETHOD(EnumDevices)(THIS_ DWORD dwDevType, LPDIENUMDEVICESCALLBACKW lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;\n    STDMETHOD(GetDeviceStatus)(THIS_ REFGUID rguidInstance) PURE;\n    STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE;\n    STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion) PURE;\n    /*** IDirectInput2W methods ***/\n    STDMETHOD(FindDevice)(THIS_ REFGUID rguid, LPCWSTR pszName, LPGUID pguidInstance) PURE;\n    /*** IDirectInput7W methods ***/\n    STDMETHOD(CreateDeviceEx)(THIS_ REFGUID rguid, REFIID riid, LPVOID *pvOut, LPUNKNOWN lpUnknownOuter) PURE;\n};\n\n#if !defined(__cplusplus) || defined(CINTERFACE)\n/*** IUnknown methods ***/\n#define IDirectInput7_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)\n#define IDirectInput7_AddRef(p)             (p)->lpVtbl->AddRef(p)\n#define IDirectInput7_Release(p)            (p)->lpVtbl->Release(p)\n/*** IDirectInput methods ***/\n#define IDirectInput7_CreateDevice(p,a,b,c)  (p)->lpVtbl->CreateDevice(p,a,b,c)\n#define IDirectInput7_EnumDevices(p,a,b,c,d) (p)->lpVtbl->EnumDevices(p,a,b,c,d)\n#define IDirectInput7_GetDeviceStatus(p,a)   (p)->lpVtbl->GetDeviceStatus(p,a)\n#define IDirectInput7_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b)\n#define IDirectInput7_Initialize(p,a,b)      (p)->lpVtbl->Initialize(p,a,b)\n/*** IDirectInput2 methods ***/\n#define IDirectInput7_FindDevice(p,a,b,c)    (p)->lpVtbl->FindDevice(p,a,b,c)\n/*** IDirectInput7 methods ***/\n#define IDirectInput7_CreateDeviceEx(p,a,b,c,d) (p)->lpVtbl->CreateDeviceEx(p,a,b,c,d)\n#else\n/*** IUnknown methods ***/\n#define IDirectInput7_QueryInterface(p,a,b) (p)->QueryInterface(a,b)\n#define IDirectInput7_AddRef(p)             (p)->AddRef()\n#define IDirectInput7_Release(p)            (p)->Release()\n/*** IDirectInput methods ***/\n#define IDirectInput7_CreateDevice(p,a,b,c)  (p)->CreateDevice(a,b,c)\n#define IDirectInput7_EnumDevices(p,a,b,c,d) (p)->EnumDevices(a,b,c,d)\n#define IDirectInput7_GetDeviceStatus(p,a)   (p)->GetDeviceStatus(a)\n#define IDirectInput7_RunControlPanel(p,a,b) (p)->RunControlPanel(a,b)\n#define IDirectInput7_Initialize(p,a,b)      (p)->Initialize(a,b)\n/*** IDirectInput2 methods ***/\n#define IDirectInput7_FindDevice(p,a,b,c)    (p)->FindDevice(a,b,c)\n/*** IDirectInput7 methods ***/\n#define IDirectInput7_CreateDeviceEx(p,a,b,c,d) (p)->CreateDeviceEx(a,b,c,d)\n#endif\n\n\n#if DIRECTINPUT_VERSION >= 0x0800\n/*****************************************************************************\n * IDirectInput8A interface\n */\n#undef INTERFACE\n#define INTERFACE IDirectInput8A\nDECLARE_INTERFACE_(IDirectInput8A,IUnknown)\n{\n    /*** IUnknown methods ***/\n    STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;\n    STDMETHOD_(ULONG,AddRef)(THIS) PURE;\n    STDMETHOD_(ULONG,Release)(THIS) PURE;\n    /*** IDirectInput8A methods ***/\n    STDMETHOD(CreateDevice)(THIS_ REFGUID rguid, LPDIRECTINPUTDEVICE8A *lplpDirectInputDevice, LPUNKNOWN pUnkOuter) PURE;\n    STDMETHOD(EnumDevices)(THIS_ DWORD dwDevType, LPDIENUMDEVICESCALLBACKA lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;\n    STDMETHOD(GetDeviceStatus)(THIS_ REFGUID rguidInstance) PURE;\n    STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE;\n    STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion) PURE;\n    STDMETHOD(FindDevice)(THIS_ REFGUID rguid, LPCSTR pszName, LPGUID pguidInstance) PURE;\n    STDMETHOD(EnumDevicesBySemantics)(THIS_ LPCSTR ptszUserName, LPDIACTIONFORMATA lpdiActionFormat, LPDIENUMDEVICESBYSEMANTICSCBA lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;\n    STDMETHOD(ConfigureDevices)(THIS_ LPDICONFIGUREDEVICESCALLBACK lpdiCallback, LPDICONFIGUREDEVICESPARAMSA lpdiCDParams, DWORD dwFlags, LPVOID pvRefData) PURE;\n};\n\n/*****************************************************************************\n * IDirectInput8W interface\n */\n#undef INTERFACE\n#define INTERFACE IDirectInput8W\nDECLARE_INTERFACE_(IDirectInput8W,IUnknown)\n{\n    /*** IUnknown methods ***/\n    STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;\n    STDMETHOD_(ULONG,AddRef)(THIS) PURE;\n    STDMETHOD_(ULONG,Release)(THIS) PURE;\n    /*** IDirectInput8W methods ***/\n    STDMETHOD(CreateDevice)(THIS_ REFGUID rguid, LPDIRECTINPUTDEVICE8W *lplpDirectInputDevice, LPUNKNOWN pUnkOuter) PURE;\n    STDMETHOD(EnumDevices)(THIS_ DWORD dwDevType, LPDIENUMDEVICESCALLBACKW lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;\n    STDMETHOD(GetDeviceStatus)(THIS_ REFGUID rguidInstance) PURE;\n    STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE;\n    STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion) PURE;\n    STDMETHOD(FindDevice)(THIS_ REFGUID rguid, LPCWSTR pszName, LPGUID pguidInstance) PURE;\n    STDMETHOD(EnumDevicesBySemantics)(THIS_ LPCWSTR ptszUserName, LPDIACTIONFORMATW lpdiActionFormat, LPDIENUMDEVICESBYSEMANTICSCBW lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;\n    STDMETHOD(ConfigureDevices)(THIS_ LPDICONFIGUREDEVICESCALLBACK lpdiCallback, LPDICONFIGUREDEVICESPARAMSW lpdiCDParams, DWORD dwFlags, LPVOID pvRefData) PURE;\n};\n#undef INTERFACE\n\n#if !defined(__cplusplus) || defined(CINTERFACE)\n/*** IUnknown methods ***/\n#define IDirectInput8_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)\n#define IDirectInput8_AddRef(p)             (p)->lpVtbl->AddRef(p)\n#define IDirectInput8_Release(p)            (p)->lpVtbl->Release(p)\n/*** IDirectInput8 methods ***/\n#define IDirectInput8_CreateDevice(p,a,b,c)       (p)->lpVtbl->CreateDevice(p,a,b,c)\n#define IDirectInput8_EnumDevices(p,a,b,c,d)      (p)->lpVtbl->EnumDevices(p,a,b,c,d)\n#define IDirectInput8_GetDeviceStatus(p,a)        (p)->lpVtbl->GetDeviceStatus(p,a)\n#define IDirectInput8_RunControlPanel(p,a,b)      (p)->lpVtbl->RunControlPanel(p,a,b)\n#define IDirectInput8_Initialize(p,a,b)           (p)->lpVtbl->Initialize(p,a,b)\n#define IDirectInput8_FindDevice(p,a,b,c)         (p)->lpVtbl->FindDevice(p,a,b,c)\n#define IDirectInput8_EnumDevicesBySemantics(p,a,b,c,d,e) (p)->lpVtbl->EnumDevicesBySemantics(p,a,b,c,d,e)\n#define IDirectInput8_ConfigureDevices(p,a,b,c,d) (p)->lpVtbl->ConfigureDevices(p,a,b,c,d)\n#else\n/*** IUnknown methods ***/\n#define IDirectInput8_QueryInterface(p,a,b) (p)->QueryInterface(a,b)\n#define IDirectInput8_AddRef(p)             (p)->AddRef()\n#define IDirectInput8_Release(p)            (p)->Release()\n/*** IDirectInput8 methods ***/\n#define IDirectInput8_CreateDevice(p,a,b,c)       (p)->CreateDevice(a,b,c)\n#define IDirectInput8_EnumDevices(p,a,b,c,d)      (p)->EnumDevices(a,b,c,d)\n#define IDirectInput8_GetDeviceStatus(p,a)        (p)->GetDeviceStatus(a)\n#define IDirectInput8_RunControlPanel(p,a,b)      (p)->RunControlPanel(a,b)\n#define IDirectInput8_Initialize(p,a,b)           (p)->Initialize(a,b)\n#define IDirectInput8_FindDevice(p,a,b,c)         (p)->FindDevice(a,b,c)\n#define IDirectInput8_EnumDevicesBySemantics(p,a,b,c,d,e) (p)->EnumDevicesBySemantics(a,b,c,d,e)\n#define IDirectInput8_ConfigureDevices(p,a,b,c,d) (p)->ConfigureDevices(a,b,c,d)\n#endif\n\n#endif /* DI8 */\n\n/* Export functions */\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n#if DIRECTINPUT_VERSION >= 0x0800\nHRESULT WINAPI DirectInput8Create(HINSTANCE,DWORD,REFIID,LPVOID *,LPUNKNOWN);\n#else /* DI < 8 */\nHRESULT WINAPI DirectInputCreateA(HINSTANCE,DWORD,LPDIRECTINPUTA *,LPUNKNOWN);\nHRESULT WINAPI DirectInputCreateW(HINSTANCE,DWORD,LPDIRECTINPUTW *,LPUNKNOWN);\n#define DirectInputCreate WINELIB_NAME_AW(DirectInputCreate)\n\nHRESULT WINAPI DirectInputCreateEx(HINSTANCE,DWORD,REFIID,LPVOID *,LPUNKNOWN);\n#endif /* DI8 */\n\n#ifdef __cplusplus\n};\n#endif\n\n#endif /* __DINPUT_INCLUDED__ */\n"
  },
  {
    "path": "thirdparty/glfw/deps/mingw/xinput.h",
    "content": "/*\n * The Wine project - Xinput Joystick Library\n * Copyright 2008 Andrew Fenn\n *\n * This library is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 2.1 of the License, or (at your option) any later version.\n *\n * This library is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with this library; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA\n */\n\n#ifndef __WINE_XINPUT_H\n#define __WINE_XINPUT_H\n\n#include <windef.h>\n\n/*\n * Bitmasks for the joysticks buttons, determines what has\n * been pressed on the joystick, these need to be mapped\n * to whatever device you're using instead of an xbox 360\n * joystick\n */\n\n#define XINPUT_GAMEPAD_DPAD_UP          0x0001\n#define XINPUT_GAMEPAD_DPAD_DOWN        0x0002\n#define XINPUT_GAMEPAD_DPAD_LEFT        0x0004\n#define XINPUT_GAMEPAD_DPAD_RIGHT       0x0008\n#define XINPUT_GAMEPAD_START            0x0010\n#define XINPUT_GAMEPAD_BACK             0x0020\n#define XINPUT_GAMEPAD_LEFT_THUMB       0x0040\n#define XINPUT_GAMEPAD_RIGHT_THUMB      0x0080\n#define XINPUT_GAMEPAD_LEFT_SHOULDER    0x0100\n#define XINPUT_GAMEPAD_RIGHT_SHOULDER   0x0200\n#define XINPUT_GAMEPAD_A                0x1000\n#define XINPUT_GAMEPAD_B                0x2000\n#define XINPUT_GAMEPAD_X                0x4000\n#define XINPUT_GAMEPAD_Y                0x8000\n\n/*\n * Defines the flags used to determine if the user is pushing\n * down on a button, not holding a button, etc\n */\n\n#define XINPUT_KEYSTROKE_KEYDOWN        0x0001\n#define XINPUT_KEYSTROKE_KEYUP          0x0002\n#define XINPUT_KEYSTROKE_REPEAT         0x0004\n\n/*\n * Defines the codes which are returned by XInputGetKeystroke\n */\n\n#define VK_PAD_A                        0x5800\n#define VK_PAD_B                        0x5801\n#define VK_PAD_X                        0x5802\n#define VK_PAD_Y                        0x5803\n#define VK_PAD_RSHOULDER                0x5804\n#define VK_PAD_LSHOULDER                0x5805\n#define VK_PAD_LTRIGGER                 0x5806\n#define VK_PAD_RTRIGGER                 0x5807\n#define VK_PAD_DPAD_UP                  0x5810\n#define VK_PAD_DPAD_DOWN                0x5811\n#define VK_PAD_DPAD_LEFT                0x5812\n#define VK_PAD_DPAD_RIGHT               0x5813\n#define VK_PAD_START                    0x5814\n#define VK_PAD_BACK                     0x5815\n#define VK_PAD_LTHUMB_PRESS             0x5816\n#define VK_PAD_RTHUMB_PRESS             0x5817\n#define VK_PAD_LTHUMB_UP                0x5820\n#define VK_PAD_LTHUMB_DOWN              0x5821\n#define VK_PAD_LTHUMB_RIGHT             0x5822\n#define VK_PAD_LTHUMB_LEFT              0x5823\n#define VK_PAD_LTHUMB_UPLEFT            0x5824\n#define VK_PAD_LTHUMB_UPRIGHT           0x5825\n#define VK_PAD_LTHUMB_DOWNRIGHT         0x5826\n#define VK_PAD_LTHUMB_DOWNLEFT          0x5827\n#define VK_PAD_RTHUMB_UP                0x5830\n#define VK_PAD_RTHUMB_DOWN              0x5831\n#define VK_PAD_RTHUMB_RIGHT             0x5832\n#define VK_PAD_RTHUMB_LEFT              0x5833\n#define VK_PAD_RTHUMB_UPLEFT            0x5834\n#define VK_PAD_RTHUMB_UPRIGHT           0x5835\n#define VK_PAD_RTHUMB_DOWNRIGHT         0x5836\n#define VK_PAD_RTHUMB_DOWNLEFT          0x5837\n\n/*\n * Deadzones are for analogue joystick controls on the joypad\n * which determine when input should be assumed to be in the\n * middle of the pad. This is a threshold to stop a joypad\n * controlling the game when the player isn't touching the\n * controls.\n */\n\n#define XINPUT_GAMEPAD_LEFT_THUMB_DEADZONE  7849\n#define XINPUT_GAMEPAD_RIGHT_THUMB_DEADZONE 8689\n#define XINPUT_GAMEPAD_TRIGGER_THRESHOLD    30\n\n\n/*\n * Defines what type of abilities the type of joystick has\n * DEVTYPE_GAMEPAD is available for all joysticks, however\n * there may be more specific identifiers for other joysticks\n * which are being used.\n */\n\n#define XINPUT_DEVTYPE_GAMEPAD          0x01\n#define XINPUT_DEVSUBTYPE_GAMEPAD       0x01\n#define XINPUT_DEVSUBTYPE_WHEEL         0x02\n#define XINPUT_DEVSUBTYPE_ARCADE_STICK  0x03\n#define XINPUT_DEVSUBTYPE_FLIGHT_SICK   0x04\n#define XINPUT_DEVSUBTYPE_DANCE_PAD     0x05\n#define XINPUT_DEVSUBTYPE_GUITAR        0x06\n#define XINPUT_DEVSUBTYPE_DRUM_KIT      0x08\n\n/*\n * These are used with the XInputGetCapabilities function to\n * determine the abilities to the joystick which has been\n * plugged in.\n */\n\n#define XINPUT_CAPS_VOICE_SUPPORTED     0x0004\n#define XINPUT_FLAG_GAMEPAD             0x00000001\n\n/*\n * Defines the status of the battery if one is used in the\n * attached joystick. The first two define if the joystick\n * supports a battery. Disconnected means that the joystick\n * isn't connected. Wired shows that the joystick is a wired\n * joystick.\n */\n\n#define BATTERY_DEVTYPE_GAMEPAD         0x00\n#define BATTERY_DEVTYPE_HEADSET         0x01\n#define BATTERY_TYPE_DISCONNECTED       0x00\n#define BATTERY_TYPE_WIRED              0x01\n#define BATTERY_TYPE_ALKALINE           0x02\n#define BATTERY_TYPE_NIMH               0x03\n#define BATTERY_TYPE_UNKNOWN            0xFF\n#define BATTERY_LEVEL_EMPTY             0x00\n#define BATTERY_LEVEL_LOW               0x01\n#define BATTERY_LEVEL_MEDIUM            0x02\n#define BATTERY_LEVEL_FULL              0x03\n\n/*\n * How many joysticks can be used with this library. Games that\n * use the xinput library will not go over this number.\n */\n\n#define XUSER_MAX_COUNT                 4\n#define XUSER_INDEX_ANY                 0x000000FF\n\n/*\n * Defines the structure of an xbox 360 joystick.\n */\n\ntypedef struct _XINPUT_GAMEPAD {\n    WORD wButtons;\n    BYTE bLeftTrigger;\n    BYTE bRightTrigger;\n    SHORT sThumbLX;\n    SHORT sThumbLY;\n    SHORT sThumbRX;\n    SHORT sThumbRY;\n} XINPUT_GAMEPAD, *PXINPUT_GAMEPAD;\n\ntypedef struct _XINPUT_STATE {\n    DWORD dwPacketNumber;\n    XINPUT_GAMEPAD Gamepad;\n} XINPUT_STATE, *PXINPUT_STATE;\n\n/*\n * Defines the structure of how much vibration is set on both the\n * right and left motors in a joystick. If you're not using a 360\n * joystick you will have to map these to your device.\n */\n\ntypedef struct _XINPUT_VIBRATION {\n    WORD wLeftMotorSpeed;\n    WORD wRightMotorSpeed;\n} XINPUT_VIBRATION, *PXINPUT_VIBRATION;\n\n/*\n * Defines the structure for what kind of abilities the joystick has\n * such abilities are things such as if the joystick has the ability\n * to send and receive audio, if the joystick is in fact a driving\n * wheel or perhaps if the joystick is some kind of dance pad or\n * guitar.\n */\n\ntypedef struct _XINPUT_CAPABILITIES {\n    BYTE Type;\n    BYTE SubType;\n    WORD Flags;\n    XINPUT_GAMEPAD Gamepad;\n    XINPUT_VIBRATION Vibration;\n} XINPUT_CAPABILITIES, *PXINPUT_CAPABILITIES;\n\n/*\n * Defines the structure for a joystick input event which is\n * retrieved using the function XInputGetKeystroke\n */\ntypedef struct _XINPUT_KEYSTROKE {\n    WORD VirtualKey;\n    WCHAR Unicode;\n    WORD Flags;\n    BYTE UserIndex;\n    BYTE HidCode;\n} XINPUT_KEYSTROKE, *PXINPUT_KEYSTROKE;\n\ntypedef struct _XINPUT_BATTERY_INFORMATION\n{\n    BYTE BatteryType;\n    BYTE BatteryLevel;\n} XINPUT_BATTERY_INFORMATION, *PXINPUT_BATTERY_INFORMATION;\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\nvoid WINAPI XInputEnable(WINBOOL);\nDWORD WINAPI XInputSetState(DWORD, XINPUT_VIBRATION*);\nDWORD WINAPI XInputGetState(DWORD, XINPUT_STATE*);\nDWORD WINAPI XInputGetKeystroke(DWORD, DWORD, PXINPUT_KEYSTROKE);\nDWORD WINAPI XInputGetCapabilities(DWORD, DWORD, XINPUT_CAPABILITIES*);\nDWORD WINAPI XInputGetDSoundAudioDeviceGuids(DWORD, GUID*, GUID*);\nDWORD WINAPI XInputGetBatteryInformation(DWORD, BYTE, XINPUT_BATTERY_INFORMATION*);\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif /* __WINE_XINPUT_H */\n"
  },
  {
    "path": "thirdparty/glfw/deps/nuklear.h",
    "content": "/*\n/// # Nuklear\n/// ![](https://cloud.githubusercontent.com/assets/8057201/11761525/ae06f0ca-a0c6-11e5-819d-5610b25f6ef4.gif)\n///\n/// ## Contents\n/// 1. About section\n/// 2. Highlights section\n/// 3. Features section\n/// 4. Usage section\n///     1. Flags section\n///     2. Constants section\n///     3. Dependencies section\n/// 5. Example section\n/// 6. API section\n///     1. Context section\n///     2. Input section\n///     3. Drawing section\n///     4. Window section\n///     5. Layouting section\n///     6. Groups section\n///     7. Tree section\n///     8. Properties section\n/// 7. License section\n/// 8. Changelog section\n/// 9. Gallery section\n/// 10. Credits section\n///\n/// ## About\n/// This is a minimal state immediate mode graphical user interface toolkit\n/// written in ANSI C and licensed under public domain. It was designed as a simple\n/// embeddable user interface for application and does not have any dependencies,\n/// a default renderbackend or OS window and input handling but instead provides a very modular\n/// library approach by using simple input state for input and draw\n/// commands describing primitive shapes as output. So instead of providing a\n/// layered library that tries to abstract over a number of platform and\n/// render backends it only focuses on the actual UI.\n///\n/// ## Highlights\n/// - Graphical user interface toolkit\n/// - Single header library\n/// - Written in C89 (a.k.a. ANSI C or ISO C90)\n/// - Small codebase (~18kLOC)\n/// - Focus on portability, efficiency and simplicity\n/// - No dependencies (not even the standard library if not wanted)\n/// - Fully skinnable and customizable\n/// - Low memory footprint with total memory control if needed or wanted\n/// - UTF-8 support\n/// - No global or hidden state\n/// - Customizable library modules (you can compile and use only what you need)\n/// - Optional font baker and vertex buffer output\n///\n/// ## Features\n/// - Absolutely no platform dependent code\n/// - Memory management control ranging from/to\n///     - Ease of use by allocating everything from standard library\n///     - Control every byte of memory inside the library\n/// - Font handling control ranging from/to\n///     - Use your own font implementation for everything\n///     - Use this libraries internal font baking and handling API\n/// - Drawing output control ranging from/to\n///     - Simple shapes for more high level APIs which already have drawing capabilities\n///     - Hardware accessible anti-aliased vertex buffer output\n/// - Customizable colors and properties ranging from/to\n///     - Simple changes to color by filling a simple color table\n///     - Complete control with ability to use skinning to decorate widgets\n/// - Bendable UI library with widget ranging from/to\n///     - Basic widgets like buttons, checkboxes, slider, ...\n///     - Advanced widget like abstract comboboxes, contextual menus,...\n/// - Compile time configuration to only compile what you need\n///     - Subset which can be used if you do not want to link or use the standard library\n/// - Can be easily modified to only update on user input instead of frame updates\n///\n/// ## Usage\n/// This library is self contained in one single header file and can be used either\n/// in header only mode or in implementation mode. The header only mode is used\n/// by default when included and allows including this header in other headers\n/// and does not contain the actual implementation. <br /><br />\n///\n/// The implementation mode requires to define  the preprocessor macro\n/// NK_IMPLEMENTATION in *one* .c/.cpp file before #includeing this file, e.g.:\n///\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~C\n///     #define NK_IMPLEMENTATION\n///     #include \"nuklear.h\"\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// Also optionally define the symbols listed in the section \"OPTIONAL DEFINES\"\n/// below in header and implementation mode if you want to use additional functionality\n/// or need more control over the library.\n///\n/// !!! WARNING\n///     Every time nuklear is included define the same compiler flags. This very important not doing so could lead to compiler errors or even worse stack corruptions.\n///\n/// ### Flags\n/// Flag                            | Description\n/// --------------------------------|------------------------------------------\n/// NK_PRIVATE                      | If defined declares all functions as static, so they can only be accessed inside the file that contains the implementation\n/// NK_INCLUDE_FIXED_TYPES          | If defined it will include header `<stdint.h>` for fixed sized types otherwise nuklear tries to select the correct type. If that fails it will throw a compiler error and you have to select the correct types yourself.\n/// NK_INCLUDE_DEFAULT_ALLOCATOR    | If defined it will include header `<stdlib.h>` and provide additional functions to use this library without caring for memory allocation control and therefore ease memory management.\n/// NK_INCLUDE_STANDARD_IO          | If defined it will include header `<stdio.h>` and provide additional functions depending on file loading.\n/// NK_INCLUDE_STANDARD_VARARGS     | If defined it will include header <stdio.h> and provide additional functions depending on file loading.\n/// NK_INCLUDE_VERTEX_BUFFER_OUTPUT | Defining this adds a vertex draw command list backend to this library, which allows you to convert queue commands into vertex draw commands. This is mainly if you need a hardware accessible format for OpenGL, DirectX, Vulkan, Metal,...\n/// NK_INCLUDE_FONT_BAKING          | Defining this adds `stb_truetype` and `stb_rect_pack` implementation to this library and provides font baking and rendering. If you already have font handling or do not want to use this font handler you don't have to define it.\n/// NK_INCLUDE_DEFAULT_FONT         | Defining this adds the default font: ProggyClean.ttf into this library which can be loaded into a font atlas and allows using this library without having a truetype font\n/// NK_INCLUDE_COMMAND_USERDATA     | Defining this adds a userdata pointer into each command. Can be useful for example if you want to provide custom shaders depending on the used widget. Can be combined with the style structures.\n/// NK_BUTTON_TRIGGER_ON_RELEASE    | Different platforms require button clicks occurring either on buttons being pressed (up to down) or released (down to up). By default this library will react on buttons being pressed, but if you define this it will only trigger if a button is released.\n/// NK_ZERO_COMMAND_MEMORY          | Defining this will zero out memory for each drawing command added to a drawing queue (inside nk_command_buffer_push). Zeroing command memory is very useful for fast checking (using memcmp) if command buffers are equal and avoid drawing frames when nothing on screen has changed since previous frame.\n///\n/// !!! WARNING\n///     The following flags will pull in the standard C library:\n///     - NK_INCLUDE_DEFAULT_ALLOCATOR\n///     - NK_INCLUDE_STANDARD_IO\n///     - NK_INCLUDE_STANDARD_VARARGS\n///\n/// !!! WARNING\n///     The following flags if defined need to be defined for both header and implementation:\n///     - NK_INCLUDE_FIXED_TYPES\n///     - NK_INCLUDE_DEFAULT_ALLOCATOR\n///     - NK_INCLUDE_STANDARD_VARARGS\n///     - NK_INCLUDE_VERTEX_BUFFER_OUTPUT\n///     - NK_INCLUDE_FONT_BAKING\n///     - NK_INCLUDE_DEFAULT_FONT\n///     - NK_INCLUDE_STANDARD_VARARGS\n///     - NK_INCLUDE_COMMAND_USERDATA\n///\n/// ### Constants\n/// Define                          | Description\n/// --------------------------------|---------------------------------------\n/// NK_BUFFER_DEFAULT_INITIAL_SIZE  | Initial buffer size allocated by all buffers while using the default allocator functions included by defining NK_INCLUDE_DEFAULT_ALLOCATOR. If you don't want to allocate the default 4k memory then redefine it.\n/// NK_MAX_NUMBER_BUFFER            | Maximum buffer size for the conversion buffer between float and string Under normal circumstances this should be more than sufficient.\n/// NK_INPUT_MAX                    | Defines the max number of bytes which can be added as text input in one frame. Under normal circumstances this should be more than sufficient.\n///\n/// !!! WARNING\n///     The following constants if defined need to be defined for both header and implementation:\n///     - NK_MAX_NUMBER_BUFFER\n///     - NK_BUFFER_DEFAULT_INITIAL_SIZE\n///     - NK_INPUT_MAX\n///\n/// ### Dependencies\n/// Function    | Description\n/// ------------|---------------------------------------------------------------\n/// NK_ASSERT   | If you don't define this, nuklear will use <assert.h> with assert().\n/// NK_MEMSET   | You can define this to 'memset' or your own memset implementation replacement. If not nuklear will use its own version.\n/// NK_MEMCPY   | You can define this to 'memcpy' or your own memcpy implementation replacement. If not nuklear will use its own version.\n/// NK_SQRT     | You can define this to 'sqrt' or your own sqrt implementation replacement. If not nuklear will use its own slow and not highly accurate version.\n/// NK_SIN      | You can define this to 'sinf' or your own sine implementation replacement. If not nuklear will use its own approximation implementation.\n/// NK_COS      | You can define this to 'cosf' or your own cosine implementation replacement. If not nuklear will use its own approximation implementation.\n/// NK_STRTOD   | You can define this to `strtod` or your own string to double conversion implementation replacement. If not defined nuklear will use its own imprecise and possibly unsafe version (does not handle nan or infinity!).\n/// NK_DTOA     | You can define this to `dtoa` or your own double to string conversion implementation replacement. If not defined nuklear will use its own imprecise and possibly unsafe version (does not handle nan or infinity!).\n/// NK_VSNPRINTF| If you define `NK_INCLUDE_STANDARD_VARARGS` as well as `NK_INCLUDE_STANDARD_IO` and want to be safe define this to `vsnprintf` on compilers supporting later versions of C or C++. By default nuklear will check for your stdlib version in C as well as compiler version in C++. if `vsnprintf` is available it will define it to `vsnprintf` directly. If not defined and if you have older versions of C or C++ it will be defined to `vsprintf` which is unsafe.\n///\n/// !!! WARNING\n///     The following dependencies will pull in the standard C library if not redefined:\n///     - NK_ASSERT\n///\n/// !!! WARNING\n///     The following dependencies if defined need to be defined for both header and implementation:\n///     - NK_ASSERT\n///\n/// !!! WARNING\n///     The following dependencies if defined need to be defined only for the implementation part:\n///     - NK_MEMSET\n///     - NK_MEMCPY\n///     - NK_SQRT\n///     - NK_SIN\n///     - NK_COS\n///     - NK_STRTOD\n///     - NK_DTOA\n///     - NK_VSNPRINTF\n///\n/// ## Example\n///\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// // init gui state\n/// enum {EASY, HARD};\n/// static int op = EASY;\n/// static float value = 0.6f;\n/// static int i =  20;\n/// struct nk_context ctx;\n///\n/// nk_init_fixed(&ctx, calloc(1, MAX_MEMORY), MAX_MEMORY, &font);\n/// if (nk_begin(&ctx, \"Show\", nk_rect(50, 50, 220, 220),\n///     NK_WINDOW_BORDER|NK_WINDOW_MOVABLE|NK_WINDOW_CLOSABLE)) {\n///     // fixed widget pixel width\n///     nk_layout_row_static(&ctx, 30, 80, 1);\n///     if (nk_button_label(&ctx, \"button\")) {\n///         // event handling\n///     }\n///\n///     // fixed widget window ratio width\n///     nk_layout_row_dynamic(&ctx, 30, 2);\n///     if (nk_option_label(&ctx, \"easy\", op == EASY)) op = EASY;\n///     if (nk_option_label(&ctx, \"hard\", op == HARD)) op = HARD;\n///\n///     // custom widget pixel width\n///     nk_layout_row_begin(&ctx, NK_STATIC, 30, 2);\n///     {\n///         nk_layout_row_push(&ctx, 50);\n///         nk_label(&ctx, \"Volume:\", NK_TEXT_LEFT);\n///         nk_layout_row_push(&ctx, 110);\n///         nk_slider_float(&ctx, 0, &value, 1.0f, 0.1f);\n///     }\n///     nk_layout_row_end(&ctx);\n/// }\n/// nk_end(&ctx);\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// ![](https://cloud.githubusercontent.com/assets/8057201/10187981/584ecd68-675c-11e5-897c-822ef534a876.png)\n///\n/// ## API\n///\n*/\n#ifndef NK_SINGLE_FILE\n  #define NK_SINGLE_FILE\n#endif\n\n#ifndef NK_NUKLEAR_H_\n#define NK_NUKLEAR_H_\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n/*\n * ==============================================================\n *\n *                          CONSTANTS\n *\n * ===============================================================\n */\n#define NK_UNDEFINED (-1.0f)\n#define NK_UTF_INVALID 0xFFFD /* internal invalid utf8 rune */\n#define NK_UTF_SIZE 4 /* describes the number of bytes a glyph consists of*/\n#ifndef NK_INPUT_MAX\n  #define NK_INPUT_MAX 16\n#endif\n#ifndef NK_MAX_NUMBER_BUFFER\n  #define NK_MAX_NUMBER_BUFFER 64\n#endif\n#ifndef NK_SCROLLBAR_HIDING_TIMEOUT\n  #define NK_SCROLLBAR_HIDING_TIMEOUT 4.0f\n#endif\n/*\n * ==============================================================\n *\n *                          HELPER\n *\n * ===============================================================\n */\n#ifndef NK_API\n  #ifdef NK_PRIVATE\n    #if (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199409L))\n      #define NK_API static inline\n    #elif defined(__cplusplus)\n      #define NK_API static inline\n    #else\n      #define NK_API static\n    #endif\n  #else\n    #define NK_API extern\n  #endif\n#endif\n#ifndef NK_LIB\n  #ifdef NK_SINGLE_FILE\n    #define NK_LIB static\n  #else\n    #define NK_LIB extern\n  #endif\n#endif\n\n#define NK_INTERN static\n#define NK_STORAGE static\n#define NK_GLOBAL static\n\n#define NK_FLAG(x) (1 << (x))\n#define NK_STRINGIFY(x) #x\n#define NK_MACRO_STRINGIFY(x) NK_STRINGIFY(x)\n#define NK_STRING_JOIN_IMMEDIATE(arg1, arg2) arg1 ## arg2\n#define NK_STRING_JOIN_DELAY(arg1, arg2) NK_STRING_JOIN_IMMEDIATE(arg1, arg2)\n#define NK_STRING_JOIN(arg1, arg2) NK_STRING_JOIN_DELAY(arg1, arg2)\n\n#ifdef _MSC_VER\n  #define NK_UNIQUE_NAME(name) NK_STRING_JOIN(name,__COUNTER__)\n#else\n  #define NK_UNIQUE_NAME(name) NK_STRING_JOIN(name,__LINE__)\n#endif\n\n#ifndef NK_STATIC_ASSERT\n  #define NK_STATIC_ASSERT(exp) typedef char NK_UNIQUE_NAME(_dummy_array)[(exp)?1:-1]\n#endif\n\n#ifndef NK_FILE_LINE\n#ifdef _MSC_VER\n  #define NK_FILE_LINE __FILE__ \":\" NK_MACRO_STRINGIFY(__COUNTER__)\n#else\n  #define NK_FILE_LINE __FILE__ \":\" NK_MACRO_STRINGIFY(__LINE__)\n#endif\n#endif\n\n#define NK_MIN(a,b) ((a) < (b) ? (a) : (b))\n#define NK_MAX(a,b) ((a) < (b) ? (b) : (a))\n#define NK_CLAMP(i,v,x) (NK_MAX(NK_MIN(v,x), i))\n\n#ifdef NK_INCLUDE_STANDARD_VARARGS\n  #if defined(_MSC_VER) && (_MSC_VER >= 1600) /* VS 2010 and above */\n    #include <sal.h>\n    #define NK_PRINTF_FORMAT_STRING _Printf_format_string_\n  #else\n    #define NK_PRINTF_FORMAT_STRING\n  #endif\n  #if defined(__GNUC__)\n    #define NK_PRINTF_VARARG_FUNC(fmtargnumber) __attribute__((format(__printf__, fmtargnumber, fmtargnumber+1)))\n    #define NK_PRINTF_VALIST_FUNC(fmtargnumber) __attribute__((format(__printf__, fmtargnumber, 0)))\n  #else\n    #define NK_PRINTF_VARARG_FUNC(fmtargnumber)\n    #define NK_PRINTF_VALIST_FUNC(fmtargnumber)\n  #endif\n  #include <stdarg.h> /* valist, va_start, va_end, ... */\n#endif\n\n/*\n * ===============================================================\n *\n *                          BASIC\n *\n * ===============================================================\n */\n#ifdef NK_INCLUDE_FIXED_TYPES\n #include <stdint.h>\n #define NK_INT8 int8_t\n #define NK_UINT8 uint8_t\n #define NK_INT16 int16_t\n #define NK_UINT16 uint16_t\n #define NK_INT32 int32_t\n #define NK_UINT32 uint32_t\n #define NK_SIZE_TYPE uintptr_t\n #define NK_POINTER_TYPE uintptr_t\n#else\n  #ifndef NK_INT8\n    #define NK_INT8 char\n  #endif\n  #ifndef NK_UINT8\n    #define NK_UINT8 unsigned char\n  #endif\n  #ifndef NK_INT16\n    #define NK_INT16 signed short\n  #endif\n  #ifndef NK_UINT16\n    #define NK_UINT16 unsigned short\n  #endif\n  #ifndef NK_INT32\n    #if defined(_MSC_VER)\n      #define NK_INT32 __int32\n    #else\n      #define NK_INT32 signed int\n    #endif\n  #endif\n  #ifndef NK_UINT32\n    #if defined(_MSC_VER)\n      #define NK_UINT32 unsigned __int32\n    #else\n      #define NK_UINT32 unsigned int\n    #endif\n  #endif\n  #ifndef NK_SIZE_TYPE\n    #if defined(_WIN64) && defined(_MSC_VER)\n      #define NK_SIZE_TYPE unsigned __int64\n    #elif (defined(_WIN32) || defined(WIN32)) && defined(_MSC_VER)\n      #define NK_SIZE_TYPE unsigned __int32\n    #elif defined(__GNUC__) || defined(__clang__)\n      #if defined(__x86_64__) || defined(__ppc64__)\n        #define NK_SIZE_TYPE unsigned long\n      #else\n        #define NK_SIZE_TYPE unsigned int\n      #endif\n    #else\n      #define NK_SIZE_TYPE unsigned long\n    #endif\n  #endif\n  #ifndef NK_POINTER_TYPE\n    #if defined(_WIN64) && defined(_MSC_VER)\n      #define NK_POINTER_TYPE unsigned __int64\n    #elif (defined(_WIN32) || defined(WIN32)) && defined(_MSC_VER)\n      #define NK_POINTER_TYPE unsigned __int32\n    #elif defined(__GNUC__) || defined(__clang__)\n      #if defined(__x86_64__) || defined(__ppc64__)\n        #define NK_POINTER_TYPE unsigned long\n      #else\n        #define NK_POINTER_TYPE unsigned int\n      #endif\n    #else\n      #define NK_POINTER_TYPE unsigned long\n    #endif\n  #endif\n#endif\n\ntypedef NK_INT8 nk_char;\ntypedef NK_UINT8 nk_uchar;\ntypedef NK_UINT8 nk_byte;\ntypedef NK_INT16 nk_short;\ntypedef NK_UINT16 nk_ushort;\ntypedef NK_INT32 nk_int;\ntypedef NK_UINT32 nk_uint;\ntypedef NK_SIZE_TYPE nk_size;\ntypedef NK_POINTER_TYPE nk_ptr;\n\ntypedef nk_uint nk_hash;\ntypedef nk_uint nk_flags;\ntypedef nk_uint nk_rune;\n\n/* Make sure correct type size:\n * This will fire with a negative subscript error if the type sizes\n * are set incorrectly by the compiler, and compile out if not */\nNK_STATIC_ASSERT(sizeof(nk_short) == 2);\nNK_STATIC_ASSERT(sizeof(nk_ushort) == 2);\nNK_STATIC_ASSERT(sizeof(nk_uint) == 4);\nNK_STATIC_ASSERT(sizeof(nk_int) == 4);\nNK_STATIC_ASSERT(sizeof(nk_byte) == 1);\nNK_STATIC_ASSERT(sizeof(nk_flags) >= 4);\nNK_STATIC_ASSERT(sizeof(nk_rune) >= 4);\nNK_STATIC_ASSERT(sizeof(nk_size) >= sizeof(void*));\nNK_STATIC_ASSERT(sizeof(nk_ptr) >= sizeof(void*));\n\n/* ============================================================================\n *\n *                                  API\n *\n * =========================================================================== */\nstruct nk_buffer;\nstruct nk_allocator;\nstruct nk_command_buffer;\nstruct nk_draw_command;\nstruct nk_convert_config;\nstruct nk_style_item;\nstruct nk_text_edit;\nstruct nk_draw_list;\nstruct nk_user_font;\nstruct nk_panel;\nstruct nk_context;\nstruct nk_draw_vertex_layout_element;\nstruct nk_style_button;\nstruct nk_style_toggle;\nstruct nk_style_selectable;\nstruct nk_style_slide;\nstruct nk_style_progress;\nstruct nk_style_scrollbar;\nstruct nk_style_edit;\nstruct nk_style_property;\nstruct nk_style_chart;\nstruct nk_style_combo;\nstruct nk_style_tab;\nstruct nk_style_window_header;\nstruct nk_style_window;\n\nenum {nk_false, nk_true};\nstruct nk_color {nk_byte r,g,b,a;};\nstruct nk_colorf {float r,g,b,a;};\nstruct nk_vec2 {float x,y;};\nstruct nk_vec2i {short x, y;};\nstruct nk_rect {float x,y,w,h;};\nstruct nk_recti {short x,y,w,h;};\ntypedef char nk_glyph[NK_UTF_SIZE];\ntypedef union {void *ptr; int id;} nk_handle;\nstruct nk_image {nk_handle handle;unsigned short w,h;unsigned short region[4];};\nstruct nk_cursor {struct nk_image img; struct nk_vec2 size, offset;};\nstruct nk_scroll {nk_uint x, y;};\n\nenum nk_heading         {NK_UP, NK_RIGHT, NK_DOWN, NK_LEFT};\nenum nk_button_behavior {NK_BUTTON_DEFAULT, NK_BUTTON_REPEATER};\nenum nk_modify          {NK_FIXED = nk_false, NK_MODIFIABLE = nk_true};\nenum nk_orientation     {NK_VERTICAL, NK_HORIZONTAL};\nenum nk_collapse_states {NK_MINIMIZED = nk_false, NK_MAXIMIZED = nk_true};\nenum nk_show_states     {NK_HIDDEN = nk_false, NK_SHOWN = nk_true};\nenum nk_chart_type      {NK_CHART_LINES, NK_CHART_COLUMN, NK_CHART_MAX};\nenum nk_chart_event     {NK_CHART_HOVERING = 0x01, NK_CHART_CLICKED = 0x02};\nenum nk_color_format    {NK_RGB, NK_RGBA};\nenum nk_popup_type      {NK_POPUP_STATIC, NK_POPUP_DYNAMIC};\nenum nk_layout_format   {NK_DYNAMIC, NK_STATIC};\nenum nk_tree_type       {NK_TREE_NODE, NK_TREE_TAB};\n\ntypedef void*(*nk_plugin_alloc)(nk_handle, void *old, nk_size);\ntypedef void (*nk_plugin_free)(nk_handle, void *old);\ntypedef int(*nk_plugin_filter)(const struct nk_text_edit*, nk_rune unicode);\ntypedef void(*nk_plugin_paste)(nk_handle, struct nk_text_edit*);\ntypedef void(*nk_plugin_copy)(nk_handle, const char*, int len);\n\nstruct nk_allocator {\n    nk_handle userdata;\n    nk_plugin_alloc alloc;\n    nk_plugin_free free;\n};\nenum nk_symbol_type {\n    NK_SYMBOL_NONE,\n    NK_SYMBOL_X,\n    NK_SYMBOL_UNDERSCORE,\n    NK_SYMBOL_CIRCLE_SOLID,\n    NK_SYMBOL_CIRCLE_OUTLINE,\n    NK_SYMBOL_RECT_SOLID,\n    NK_SYMBOL_RECT_OUTLINE,\n    NK_SYMBOL_TRIANGLE_UP,\n    NK_SYMBOL_TRIANGLE_DOWN,\n    NK_SYMBOL_TRIANGLE_LEFT,\n    NK_SYMBOL_TRIANGLE_RIGHT,\n    NK_SYMBOL_PLUS,\n    NK_SYMBOL_MINUS,\n    NK_SYMBOL_MAX\n};\n/* =============================================================================\n *\n *                                  CONTEXT\n *\n * =============================================================================*/\n/*/// ### Context\n/// Contexts are the main entry point and the majestro of nuklear and contain all required state.\n/// They are used for window, memory, input, style, stack, commands and time management and need\n/// to be passed into all nuklear GUI specific functions.\n///\n/// #### Usage\n/// To use a context it first has to be initialized which can be achieved by calling\n/// one of either `nk_init_default`, `nk_init_fixed`, `nk_init`, `nk_init_custom`.\n/// Each takes in a font handle and a specific way of handling memory. Memory control\n/// hereby ranges from standard library to just specifying a fixed sized block of memory\n/// which nuklear has to manage itself from.\n///\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// struct nk_context ctx;\n/// nk_init_xxx(&ctx, ...);\n/// while (1) {\n///     // [...]\n///     nk_clear(&ctx);\n/// }\n/// nk_free(&ctx);\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// #### Reference\n/// Function            | Description\n/// --------------------|-------------------------------------------------------\n/// __nk_init_default__ | Initializes context with standard library memory allocation (malloc,free)\n/// __nk_init_fixed__   | Initializes context from single fixed size memory block\n/// __nk_init__         | Initializes context with memory allocator callbacks for alloc and free\n/// __nk_init_custom__  | Initializes context from two buffers. One for draw commands the other for window/panel/table allocations\n/// __nk_clear__        | Called at the end of the frame to reset and prepare the context for the next frame\n/// __nk_free__         | Shutdown and free all memory allocated inside the context\n/// __nk_set_user_data__| Utility function to pass user data to draw command\n */\n#ifdef NK_INCLUDE_DEFAULT_ALLOCATOR\n/*/// #### nk_init_default\n/// Initializes a `nk_context` struct with a default standard library allocator.\n/// Should be used if you don't want to be bothered with memory management in nuklear.\n///\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// int nk_init_default(struct nk_context *ctx, const struct nk_user_font *font);\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// Parameter   | Description\n/// ------------|---------------------------------------------------------------\n/// __ctx__     | Must point to an either stack or heap allocated `nk_context` struct\n/// __font__    | Must point to a previously initialized font handle for more info look at font documentation\n///\n/// Returns either `false(0)` on failure or `true(1)` on success.\n///\n*/\nNK_API int nk_init_default(struct nk_context*, const struct nk_user_font*);\n#endif\n/*/// #### nk_init_fixed\n/// Initializes a `nk_context` struct from single fixed size memory block\n/// Should be used if you want complete control over nuklear's memory management.\n/// Especially recommended for system with little memory or systems with virtual memory.\n/// For the later case you can just allocate for example 16MB of virtual memory\n/// and only the required amount of memory will actually be committed.\n///\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// int nk_init_fixed(struct nk_context *ctx, void *memory, nk_size size, const struct nk_user_font *font);\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// !!! Warning\n///     make sure the passed memory block is aligned correctly for `nk_draw_commands`.\n///\n/// Parameter   | Description\n/// ------------|--------------------------------------------------------------\n/// __ctx__     | Must point to an either stack or heap allocated `nk_context` struct\n/// __memory__  | Must point to a previously allocated memory block\n/// __size__    | Must contain the total size of __memory__\n/// __font__    | Must point to a previously initialized font handle for more info look at font documentation\n///\n/// Returns either `false(0)` on failure or `true(1)` on success.\n*/\nNK_API int nk_init_fixed(struct nk_context*, void *memory, nk_size size, const struct nk_user_font*);\n/*/// #### nk_init\n/// Initializes a `nk_context` struct with memory allocation callbacks for nuklear to allocate\n/// memory from. Used internally for `nk_init_default` and provides a kitchen sink allocation\n/// interface to nuklear. Can be useful for cases like monitoring memory consumption.\n///\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// int nk_init(struct nk_context *ctx, struct nk_allocator *alloc, const struct nk_user_font *font);\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// Parameter   | Description\n/// ------------|---------------------------------------------------------------\n/// __ctx__     | Must point to an either stack or heap allocated `nk_context` struct\n/// __alloc__   | Must point to a previously allocated memory allocator\n/// __font__    | Must point to a previously initialized font handle for more info look at font documentation\n///\n/// Returns either `false(0)` on failure or `true(1)` on success.\n*/\nNK_API int nk_init(struct nk_context*, struct nk_allocator*, const struct nk_user_font*);\n/*/// #### nk_init_custom\n/// Initializes a `nk_context` struct from two different either fixed or growing\n/// buffers. The first buffer is for allocating draw commands while the second buffer is\n/// used for allocating windows, panels and state tables.\n///\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// int nk_init_custom(struct nk_context *ctx, struct nk_buffer *cmds, struct nk_buffer *pool, const struct nk_user_font *font);\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// Parameter   | Description\n/// ------------|---------------------------------------------------------------\n/// __ctx__     | Must point to an either stack or heap allocated `nk_context` struct\n/// __cmds__    | Must point to a previously initialized memory buffer either fixed or dynamic to store draw commands into\n/// __pool__    | Must point to a previously initialized memory buffer either fixed or dynamic to store windows, panels and tables\n/// __font__    | Must point to a previously initialized font handle for more info look at font documentation\n///\n/// Returns either `false(0)` on failure or `true(1)` on success.\n*/\nNK_API int nk_init_custom(struct nk_context*, struct nk_buffer *cmds, struct nk_buffer *pool, const struct nk_user_font*);\n/*/// #### nk_clear\n/// Resets the context state at the end of the frame. This includes mostly\n/// garbage collector tasks like removing windows or table not called and therefore\n/// used anymore.\n///\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// void nk_clear(struct nk_context *ctx);\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// Parameter   | Description\n/// ------------|-----------------------------------------------------------\n/// __ctx__     | Must point to a previously initialized `nk_context` struct\n*/\nNK_API void nk_clear(struct nk_context*);\n/*/// #### nk_free\n/// Frees all memory allocated by nuklear. Not needed if context was\n/// initialized with `nk_init_fixed`.\n///\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// void nk_free(struct nk_context *ctx);\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// Parameter   | Description\n/// ------------|-----------------------------------------------------------\n/// __ctx__     | Must point to a previously initialized `nk_context` struct\n*/\nNK_API void nk_free(struct nk_context*);\n#ifdef NK_INCLUDE_COMMAND_USERDATA\n/*/// #### nk_set_user_data\n/// Sets the currently passed userdata passed down into each draw command.\n///\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// void nk_set_user_data(struct nk_context *ctx, nk_handle data);\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// Parameter   | Description\n/// ------------|--------------------------------------------------------------\n/// __ctx__     | Must point to a previously initialized `nk_context` struct\n/// __data__    | Handle with either pointer or index to be passed into every draw commands\n*/\nNK_API void nk_set_user_data(struct nk_context*, nk_handle handle);\n#endif\n/* =============================================================================\n *\n *                                  INPUT\n *\n * =============================================================================*/\n/*/// ### Input\n/// The input API is responsible for holding the current input state composed of\n/// mouse, key and text input states.\n/// It is worth noting that no direct OS or window handling is done in nuklear.\n/// Instead all input state has to be provided by platform specific code. This on one hand\n/// expects more work from the user and complicates usage but on the other hand\n/// provides simple abstraction over a big number of platforms, libraries and other\n/// already provided functionality.\n///\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// nk_input_begin(&ctx);\n/// while (GetEvent(&evt)) {\n///     if (evt.type == MOUSE_MOVE)\n///         nk_input_motion(&ctx, evt.motion.x, evt.motion.y);\n///     else if (evt.type == [...]) {\n///         // [...]\n///     }\n/// } nk_input_end(&ctx);\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// #### Usage\n/// Input state needs to be provided to nuklear by first calling `nk_input_begin`\n/// which resets internal state like delta mouse position and button transistions.\n/// After `nk_input_begin` all current input state needs to be provided. This includes\n/// mouse motion, button and key pressed and released, text input and scrolling.\n/// Both event- or state-based input handling are supported by this API\n/// and should work without problems. Finally after all input state has been\n/// mirrored `nk_input_end` needs to be called to finish input process.\n///\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// struct nk_context ctx;\n/// nk_init_xxx(&ctx, ...);\n/// while (1) {\n///     Event evt;\n///     nk_input_begin(&ctx);\n///     while (GetEvent(&evt)) {\n///         if (evt.type == MOUSE_MOVE)\n///             nk_input_motion(&ctx, evt.motion.x, evt.motion.y);\n///         else if (evt.type == [...]) {\n///             // [...]\n///         }\n///     }\n///     nk_input_end(&ctx);\n///     // [...]\n///     nk_clear(&ctx);\n/// } nk_free(&ctx);\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// #### Reference\n/// Function            | Description\n/// --------------------|-------------------------------------------------------\n/// __nk_input_begin__  | Begins the input mirroring process. Needs to be called before all other `nk_input_xxx` calls\n/// __nk_input_motion__ | Mirrors mouse cursor position\n/// __nk_input_key__    | Mirrors key state with either pressed or released\n/// __nk_input_button__ | Mirrors mouse button state with either pressed or released\n/// __nk_input_scroll__ | Mirrors mouse scroll values\n/// __nk_input_char__   | Adds a single ASCII text character into an internal text buffer\n/// __nk_input_glyph__  | Adds a single multi-byte UTF-8 character into an internal text buffer\n/// __nk_input_unicode__| Adds a single unicode rune into an internal text buffer\n/// __nk_input_end__    | Ends the input mirroring process by calculating state changes. Don't call any `nk_input_xxx` function referenced above after this call\n*/\nenum nk_keys {\n    NK_KEY_NONE,\n    NK_KEY_SHIFT,\n    NK_KEY_CTRL,\n    NK_KEY_DEL,\n    NK_KEY_ENTER,\n    NK_KEY_TAB,\n    NK_KEY_BACKSPACE,\n    NK_KEY_COPY,\n    NK_KEY_CUT,\n    NK_KEY_PASTE,\n    NK_KEY_UP,\n    NK_KEY_DOWN,\n    NK_KEY_LEFT,\n    NK_KEY_RIGHT,\n    /* Shortcuts: text field */\n    NK_KEY_TEXT_INSERT_MODE,\n    NK_KEY_TEXT_REPLACE_MODE,\n    NK_KEY_TEXT_RESET_MODE,\n    NK_KEY_TEXT_LINE_START,\n    NK_KEY_TEXT_LINE_END,\n    NK_KEY_TEXT_START,\n    NK_KEY_TEXT_END,\n    NK_KEY_TEXT_UNDO,\n    NK_KEY_TEXT_REDO,\n    NK_KEY_TEXT_SELECT_ALL,\n    NK_KEY_TEXT_WORD_LEFT,\n    NK_KEY_TEXT_WORD_RIGHT,\n    /* Shortcuts: scrollbar */\n    NK_KEY_SCROLL_START,\n    NK_KEY_SCROLL_END,\n    NK_KEY_SCROLL_DOWN,\n    NK_KEY_SCROLL_UP,\n    NK_KEY_MAX\n};\nenum nk_buttons {\n    NK_BUTTON_LEFT,\n    NK_BUTTON_MIDDLE,\n    NK_BUTTON_RIGHT,\n    NK_BUTTON_DOUBLE,\n    NK_BUTTON_MAX\n};\n/*/// #### nk_input_begin\n/// Begins the input mirroring process by resetting text, scroll\n/// mouse, previous mouse position and movement as well as key state transitions,\n///\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// void nk_input_begin(struct nk_context*);\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// Parameter   | Description\n/// ------------|-----------------------------------------------------------\n/// __ctx__     | Must point to a previously initialized `nk_context` struct\n*/\nNK_API void nk_input_begin(struct nk_context*);\n/*/// #### nk_input_motion\n/// Mirrors current mouse position to nuklear\n///\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// void nk_input_motion(struct nk_context *ctx, int x, int y);\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// Parameter   | Description\n/// ------------|-----------------------------------------------------------\n/// __ctx__     | Must point to a previously initialized `nk_context` struct\n/// __x__       | Must hold an integer describing the current mouse cursor x-position\n/// __y__       | Must hold an integer describing the current mouse cursor y-position\n*/\nNK_API void nk_input_motion(struct nk_context*, int x, int y);\n/*/// #### nk_input_key\n/// Mirrors the state of a specific key to nuklear\n///\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// void nk_input_key(struct nk_context*, enum nk_keys key, int down);\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// Parameter   | Description\n/// ------------|-----------------------------------------------------------\n/// __ctx__     | Must point to a previously initialized `nk_context` struct\n/// __key__     | Must be any value specified in enum `nk_keys` that needs to be mirrored\n/// __down__    | Must be 0 for key is up and 1 for key is down\n*/\nNK_API void nk_input_key(struct nk_context*, enum nk_keys, int down);\n/*/// #### nk_input_button\n/// Mirrors the state of a specific mouse button to nuklear\n///\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// void nk_input_button(struct nk_context *ctx, enum nk_buttons btn, int x, int y, int down);\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// Parameter   | Description\n/// ------------|-----------------------------------------------------------\n/// __ctx__     | Must point to a previously initialized `nk_context` struct\n/// __btn__     | Must be any value specified in enum `nk_buttons` that needs to be mirrored\n/// __x__       | Must contain an integer describing mouse cursor x-position on click up/down\n/// __y__       | Must contain an integer describing mouse cursor y-position on click up/down\n/// __down__    | Must be 0 for key is up and 1 for key is down\n*/\nNK_API void nk_input_button(struct nk_context*, enum nk_buttons, int x, int y, int down);\n/*/// #### nk_input_scroll\n/// Copies the last mouse scroll value to nuklear. Is generally\n/// a scroll value. So does not have to come from mouse and could also originate\n/// TODO finish this sentence\n///\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// void nk_input_scroll(struct nk_context *ctx, struct nk_vec2 val);\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// Parameter   | Description\n/// ------------|-----------------------------------------------------------\n/// __ctx__     | Must point to a previously initialized `nk_context` struct\n/// __val__     | vector with both X- as well as Y-scroll value\n*/\nNK_API void nk_input_scroll(struct nk_context*, struct nk_vec2 val);\n/*/// #### nk_input_char\n/// Copies a single ASCII character into an internal text buffer\n/// This is basically a helper function to quickly push ASCII characters into\n/// nuklear.\n///\n/// !!! Note\n///     Stores up to NK_INPUT_MAX bytes between `nk_input_begin` and `nk_input_end`.\n///\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// void nk_input_char(struct nk_context *ctx, char c);\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// Parameter   | Description\n/// ------------|-----------------------------------------------------------\n/// __ctx__     | Must point to a previously initialized `nk_context` struct\n/// __c__       | Must be a single ASCII character preferable one that can be printed\n*/\nNK_API void nk_input_char(struct nk_context*, char);\n/*/// #### nk_input_glyph\n/// Converts an encoded unicode rune into UTF-8 and copies the result into an\n/// internal text buffer.\n///\n/// !!! Note\n///     Stores up to NK_INPUT_MAX bytes between `nk_input_begin` and `nk_input_end`.\n///\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// void nk_input_glyph(struct nk_context *ctx, const nk_glyph g);\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// Parameter   | Description\n/// ------------|-----------------------------------------------------------\n/// __ctx__     | Must point to a previously initialized `nk_context` struct\n/// __g__       | UTF-32 unicode codepoint\n*/\nNK_API void nk_input_glyph(struct nk_context*, const nk_glyph);\n/*/// #### nk_input_unicode\n/// Converts a unicode rune into UTF-8 and copies the result\n/// into an internal text buffer.\n/// !!! Note\n///     Stores up to NK_INPUT_MAX bytes between `nk_input_begin` and `nk_input_end`.\n///\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// void nk_input_unicode(struct nk_context*, nk_rune rune);\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// Parameter   | Description\n/// ------------|-----------------------------------------------------------\n/// __ctx__     | Must point to a previously initialized `nk_context` struct\n/// __rune__    | UTF-32 unicode codepoint\n*/\nNK_API void nk_input_unicode(struct nk_context*, nk_rune);\n/*/// #### nk_input_end\n/// End the input mirroring process by resetting mouse grabbing\n/// state to ensure the mouse cursor is not grabbed indefinitely.\n///\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// void nk_input_end(struct nk_context *ctx);\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// Parameter   | Description\n/// ------------|-----------------------------------------------------------\n/// __ctx__     | Must point to a previously initialized `nk_context` struct\n*/\nNK_API void nk_input_end(struct nk_context*);\n/* =============================================================================\n *\n *                                  DRAWING\n *\n * =============================================================================*/\n/*/// ### Drawing\n/// This library was designed to be render backend agnostic so it does\n/// not draw anything to screen directly. Instead all drawn shapes, widgets\n/// are made of, are buffered into memory and make up a command queue.\n/// Each frame therefore fills the command buffer with draw commands\n/// that then need to be executed by the user and his own render backend.\n/// After that the command buffer needs to be cleared and a new frame can be\n/// started. It is probably important to note that the command buffer is the main\n/// drawing API and the optional vertex buffer API only takes this format and\n/// converts it into a hardware accessible format.\n///\n/// #### Usage\n/// To draw all draw commands accumulated over a frame you need your own render\n/// backend able to draw a number of 2D primitives. This includes at least\n/// filled and stroked rectangles, circles, text, lines, triangles and scissors.\n/// As soon as this criterion is met you can iterate over each draw command\n/// and execute each draw command in a interpreter like fashion:\n///\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// const struct nk_command *cmd = 0;\n/// nk_foreach(cmd, &ctx) {\n///     switch (cmd->type) {\n///     case NK_COMMAND_LINE:\n///         your_draw_line_function(...)\n///         break;\n///     case NK_COMMAND_RECT\n///         your_draw_rect_function(...)\n///         break;\n///     case //...:\n///         //[...]\n///     }\n/// }\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// In program flow context draw commands need to be executed after input has been\n/// gathered and the complete UI with windows and their contained widgets have\n/// been executed and before calling `nk_clear` which frees all previously\n/// allocated draw commands.\n///\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// struct nk_context ctx;\n/// nk_init_xxx(&ctx, ...);\n/// while (1) {\n///     Event evt;\n///     nk_input_begin(&ctx);\n///     while (GetEvent(&evt)) {\n///         if (evt.type == MOUSE_MOVE)\n///             nk_input_motion(&ctx, evt.motion.x, evt.motion.y);\n///         else if (evt.type == [...]) {\n///             [...]\n///         }\n///     }\n///     nk_input_end(&ctx);\n///     //\n///     // [...]\n///     //\n///     const struct nk_command *cmd = 0;\n///     nk_foreach(cmd, &ctx) {\n///     switch (cmd->type) {\n///     case NK_COMMAND_LINE:\n///         your_draw_line_function(...)\n///         break;\n///     case NK_COMMAND_RECT\n///         your_draw_rect_function(...)\n///         break;\n///     case ...:\n///         // [...]\n///     }\n///     nk_clear(&ctx);\n/// }\n/// nk_free(&ctx);\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// You probably noticed that you have to draw all of the UI each frame which is\n/// quite wasteful. While the actual UI updating loop is quite fast rendering\n/// without actually needing it is not. So there are multiple things you could do.\n///\n/// First is only update on input. This of course is only an option if your\n/// application only depends on the UI and does not require any outside calculations.\n/// If you actually only update on input make sure to update the UI two times each\n/// frame and call `nk_clear` directly after the first pass and only draw in\n/// the second pass. In addition it is recommended to also add additional timers\n/// to make sure the UI is not drawn more than a fixed number of frames per second.\n///\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// struct nk_context ctx;\n/// nk_init_xxx(&ctx, ...);\n/// while (1) {\n///     // [...wait for input ]\n///     // [...do two UI passes ...]\n///     do_ui(...)\n///     nk_clear(&ctx);\n///     do_ui(...)\n///     //\n///     // draw\n///     const struct nk_command *cmd = 0;\n///     nk_foreach(cmd, &ctx) {\n///     switch (cmd->type) {\n///     case NK_COMMAND_LINE:\n///         your_draw_line_function(...)\n///         break;\n///     case NK_COMMAND_RECT\n///         your_draw_rect_function(...)\n///         break;\n///     case ...:\n///         //[...]\n///     }\n///     nk_clear(&ctx);\n/// }\n/// nk_free(&ctx);\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// The second probably more applicable trick is to only draw if anything changed.\n/// It is not really useful for applications with continuous draw loop but\n/// quite useful for desktop applications. To actually get nuklear to only\n/// draw on changes you first have to define `NK_ZERO_COMMAND_MEMORY` and\n/// allocate a memory buffer that will store each unique drawing output.\n/// After each frame you compare the draw command memory inside the library\n/// with your allocated buffer by memcmp. If memcmp detects differences\n/// you have to copy the command buffer into the allocated buffer\n/// and then draw like usual (this example uses fixed memory but you could\n/// use dynamically allocated memory).\n///\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// //[... other defines ...]\n/// #define NK_ZERO_COMMAND_MEMORY\n/// #include \"nuklear.h\"\n/// //\n/// // setup context\n/// struct nk_context ctx;\n/// void *last = calloc(1,64*1024);\n/// void *buf = calloc(1,64*1024);\n/// nk_init_fixed(&ctx, buf, 64*1024);\n/// //\n/// // loop\n/// while (1) {\n///     // [...input...]\n///     // [...ui...]\n///     void *cmds = nk_buffer_memory(&ctx.memory);\n///     if (memcmp(cmds, last, ctx.memory.allocated)) {\n///         memcpy(last,cmds,ctx.memory.allocated);\n///         const struct nk_command *cmd = 0;\n///         nk_foreach(cmd, &ctx) {\n///             switch (cmd->type) {\n///             case NK_COMMAND_LINE:\n///                 your_draw_line_function(...)\n///                 break;\n///             case NK_COMMAND_RECT\n///                 your_draw_rect_function(...)\n///                 break;\n///             case ...:\n///                 // [...]\n///             }\n///         }\n///     }\n///     nk_clear(&ctx);\n/// }\n/// nk_free(&ctx);\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// Finally while using draw commands makes sense for higher abstracted platforms like\n/// X11 and Win32 or drawing libraries it is often desirable to use graphics\n/// hardware directly. Therefore it is possible to just define\n/// `NK_INCLUDE_VERTEX_BUFFER_OUTPUT` which includes optional vertex output.\n/// To access the vertex output you first have to convert all draw commands into\n/// vertexes by calling `nk_convert` which takes in your preferred vertex format.\n/// After successfully converting all draw commands just iterate over and execute all\n/// vertex draw commands:\n///\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// // fill configuration\n/// struct nk_convert_config cfg = {};\n/// static const struct nk_draw_vertex_layout_element vertex_layout[] = {\n///     {NK_VERTEX_POSITION, NK_FORMAT_FLOAT, NK_OFFSETOF(struct your_vertex, pos)},\n///     {NK_VERTEX_TEXCOORD, NK_FORMAT_FLOAT, NK_OFFSETOF(struct your_vertex, uv)},\n///     {NK_VERTEX_COLOR, NK_FORMAT_R8G8B8A8, NK_OFFSETOF(struct your_vertex, col)},\n///     {NK_VERTEX_LAYOUT_END}\n/// };\n/// cfg.shape_AA = NK_ANTI_ALIASING_ON;\n/// cfg.line_AA = NK_ANTI_ALIASING_ON;\n/// cfg.vertex_layout = vertex_layout;\n/// cfg.vertex_size = sizeof(struct your_vertex);\n/// cfg.vertex_alignment = NK_ALIGNOF(struct your_vertex);\n/// cfg.circle_segment_count = 22;\n/// cfg.curve_segment_count = 22;\n/// cfg.arc_segment_count = 22;\n/// cfg.global_alpha = 1.0f;\n/// cfg.null = dev->null;\n/// //\n/// // setup buffers and convert\n/// struct nk_buffer cmds, verts, idx;\n/// nk_buffer_init_default(&cmds);\n/// nk_buffer_init_default(&verts);\n/// nk_buffer_init_default(&idx);\n/// nk_convert(&ctx, &cmds, &verts, &idx, &cfg);\n/// //\n/// // draw\n/// nk_draw_foreach(cmd, &ctx, &cmds) {\n/// if (!cmd->elem_count) continue;\n///     //[...]\n/// }\n/// nk_buffer_free(&cms);\n/// nk_buffer_free(&verts);\n/// nk_buffer_free(&idx);\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// #### Reference\n/// Function            | Description\n/// --------------------|-------------------------------------------------------\n/// __nk__begin__       | Returns the first draw command in the context draw command list to be drawn\n/// __nk__next__        | Increments the draw command iterator to the next command inside the context draw command list\n/// __nk_foreach__      | Iterates over each draw command inside the context draw command list\n/// __nk_convert__      | Converts from the abstract draw commands list into a hardware accessible vertex format\n/// __nk_draw_begin__   | Returns the first vertex command in the context vertex draw list to be executed\n/// __nk__draw_next__   | Increments the vertex command iterator to the next command inside the context vertex command list\n/// __nk__draw_end__    | Returns the end of the vertex draw list\n/// __nk_draw_foreach__ | Iterates over each vertex draw command inside the vertex draw list\n*/\nenum nk_anti_aliasing {NK_ANTI_ALIASING_OFF, NK_ANTI_ALIASING_ON};\nenum nk_convert_result {\n    NK_CONVERT_SUCCESS = 0,\n    NK_CONVERT_INVALID_PARAM = 1,\n    NK_CONVERT_COMMAND_BUFFER_FULL = NK_FLAG(1),\n    NK_CONVERT_VERTEX_BUFFER_FULL = NK_FLAG(2),\n    NK_CONVERT_ELEMENT_BUFFER_FULL = NK_FLAG(3)\n};\nstruct nk_draw_null_texture {\n    nk_handle texture; /* texture handle to a texture with a white pixel */\n    struct nk_vec2 uv; /* coordinates to a white pixel in the texture  */\n};\nstruct nk_convert_config {\n    float global_alpha; /* global alpha value */\n    enum nk_anti_aliasing line_AA; /* line anti-aliasing flag can be turned off if you are tight on memory */\n    enum nk_anti_aliasing shape_AA; /* shape anti-aliasing flag can be turned off if you are tight on memory */\n    unsigned circle_segment_count; /* number of segments used for circles: default to 22 */\n    unsigned arc_segment_count; /* number of segments used for arcs: default to 22 */\n    unsigned curve_segment_count; /* number of segments used for curves: default to 22 */\n    struct nk_draw_null_texture null; /* handle to texture with a white pixel for shape drawing */\n    const struct nk_draw_vertex_layout_element *vertex_layout; /* describes the vertex output format and packing */\n    nk_size vertex_size; /* sizeof one vertex for vertex packing */\n    nk_size vertex_alignment; /* vertex alignment: Can be obtained by NK_ALIGNOF */\n};\n/*/// #### nk__begin\n/// Returns a draw command list iterator to iterate all draw\n/// commands accumulated over one frame.\n///\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// const struct nk_command* nk__begin(struct nk_context*);\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// Parameter   | Description\n/// ------------|-----------------------------------------------------------\n/// __ctx__     | must point to an previously initialized `nk_context` struct at the end of a frame\n///\n/// Returns draw command pointer pointing to the first command inside the draw command list\n*/\nNK_API const struct nk_command* nk__begin(struct nk_context*);\n/*/// #### nk__next\n/// Returns draw command pointer pointing to the next command inside the draw command list\n///\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// const struct nk_command* nk__next(struct nk_context*, const struct nk_command*);\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// Parameter   | Description\n/// ------------|-----------------------------------------------------------\n/// __ctx__     | Must point to an previously initialized `nk_context` struct at the end of a frame\n/// __cmd__     | Must point to an previously a draw command either returned by `nk__begin` or `nk__next`\n///\n/// Returns draw command pointer pointing to the next command inside the draw command list\n*/\nNK_API const struct nk_command* nk__next(struct nk_context*, const struct nk_command*);\n/*/// #### nk_foreach\n/// Iterates over each draw command inside the context draw command list\n///\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// #define nk_foreach(c, ctx)\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// Parameter   | Description\n/// ------------|-----------------------------------------------------------\n/// __ctx__     | Must point to an previously initialized `nk_context` struct at the end of a frame\n/// __cmd__     | Command pointer initialized to NULL\n///\n/// Iterates over each draw command inside the context draw command list\n*/\n#define nk_foreach(c, ctx) for((c) = nk__begin(ctx); (c) != 0; (c) = nk__next(ctx,c))\n#ifdef NK_INCLUDE_VERTEX_BUFFER_OUTPUT\n/*/// #### nk_convert\n/// Converts all internal draw commands into vertex draw commands and fills\n/// three buffers with vertexes, vertex draw commands and vertex indices. The vertex format\n/// as well as some other configuration values have to be configured by filling out a\n/// `nk_convert_config` struct.\n///\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// nk_flags nk_convert(struct nk_context *ctx, struct nk_buffer *cmds,\n//      struct nk_buffer *vertices, struct nk_buffer *elements, const struct nk_convert_config*);\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// Parameter   | Description\n/// ------------|-----------------------------------------------------------\n/// __ctx__     | Must point to an previously initialized `nk_context` struct at the end of a frame\n/// __cmds__    | Must point to a previously initialized buffer to hold converted vertex draw commands\n/// __vertices__| Must point to a previously initialized buffer to hold all produced vertices\n/// __elements__| Must point to a previously initialized buffer to hold all produced vertex indices\n/// __config__  | Must point to a filled out `nk_config` struct to configure the conversion process\n///\n/// Returns one of enum nk_convert_result error codes\n///\n/// Parameter                       | Description\n/// --------------------------------|-----------------------------------------------------------\n/// NK_CONVERT_SUCCESS              | Signals a successful draw command to vertex buffer conversion\n/// NK_CONVERT_INVALID_PARAM        | An invalid argument was passed in the function call\n/// NK_CONVERT_COMMAND_BUFFER_FULL  | The provided buffer for storing draw commands is full or failed to allocate more memory\n/// NK_CONVERT_VERTEX_BUFFER_FULL   | The provided buffer for storing vertices is full or failed to allocate more memory\n/// NK_CONVERT_ELEMENT_BUFFER_FULL  | The provided buffer for storing indicies is full or failed to allocate more memory\n*/\nNK_API nk_flags nk_convert(struct nk_context*, struct nk_buffer *cmds, struct nk_buffer *vertices, struct nk_buffer *elements, const struct nk_convert_config*);\n/*/// #### nk__draw_begin\n/// Returns a draw vertex command buffer iterator to iterate over the vertex draw command buffer\n///\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// const struct nk_draw_command* nk__draw_begin(const struct nk_context*, const struct nk_buffer*);\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// Parameter   | Description\n/// ------------|-----------------------------------------------------------\n/// __ctx__     | Must point to an previously initialized `nk_context` struct at the end of a frame\n/// __buf__     | Must point to an previously by `nk_convert` filled out vertex draw command buffer\n///\n/// Returns vertex draw command pointer pointing to the first command inside the vertex draw command buffer\n*/\nNK_API const struct nk_draw_command* nk__draw_begin(const struct nk_context*, const struct nk_buffer*);\n/*/// #### nk__draw_end\n/// Returns the vertex draw command at the end of the vertex draw command buffer\n///\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// const struct nk_draw_command* nk__draw_end(const struct nk_context *ctx, const struct nk_buffer *buf);\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// Parameter   | Description\n/// ------------|-----------------------------------------------------------\n/// __ctx__     | Must point to an previously initialized `nk_context` struct at the end of a frame\n/// __buf__     | Must point to an previously by `nk_convert` filled out vertex draw command buffer\n///\n/// Returns vertex draw command pointer pointing to the end of the last vertex draw command inside the vertex draw command buffer\n*/\nNK_API const struct nk_draw_command* nk__draw_end(const struct nk_context*, const struct nk_buffer*);\n/*/// #### nk__draw_next\n/// Increments the vertex draw command buffer iterator\n///\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// const struct nk_draw_command* nk__draw_next(const struct nk_draw_command*, const struct nk_buffer*, const struct nk_context*);\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// Parameter   | Description\n/// ------------|-----------------------------------------------------------\n/// __cmd__     | Must point to an previously either by `nk__draw_begin` or `nk__draw_next` returned vertex draw command\n/// __buf__     | Must point to an previously by `nk_convert` filled out vertex draw command buffer\n/// __ctx__     | Must point to an previously initialized `nk_context` struct at the end of a frame\n///\n/// Returns vertex draw command pointer pointing to the end of the last vertex draw command inside the vertex draw command buffer\n*/\nNK_API const struct nk_draw_command* nk__draw_next(const struct nk_draw_command*, const struct nk_buffer*, const struct nk_context*);\n/*/// #### nk_draw_foreach\n/// Iterates over each vertex draw command inside a vertex draw command buffer\n///\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// #define nk_draw_foreach(cmd,ctx, b)\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// Parameter   | Description\n/// ------------|-----------------------------------------------------------\n/// __cmd__     | `nk_draw_command`iterator set to NULL\n/// __buf__     | Must point to an previously by `nk_convert` filled out vertex draw command buffer\n/// __ctx__     | Must point to an previously initialized `nk_context` struct at the end of a frame\n*/\n#define nk_draw_foreach(cmd,ctx, b) for((cmd)=nk__draw_begin(ctx, b); (cmd)!=0; (cmd)=nk__draw_next(cmd, b, ctx))\n#endif\n/* =============================================================================\n *\n *                                  WINDOW\n *\n * =============================================================================\n/// ### Window\n/// Windows are the main persistent state used inside nuklear and are life time\n/// controlled by simply \"retouching\" (i.e. calling) each window each frame.\n/// All widgets inside nuklear can only be added inside the function pair `nk_begin_xxx`\n/// and `nk_end`. Calling any widgets outside these two functions will result in an\n/// assert in debug or no state change in release mode.<br /><br />\n///\n/// Each window holds frame persistent state like position, size, flags, state tables,\n/// and some garbage collected internal persistent widget state. Each window\n/// is linked into a window stack list which determines the drawing and overlapping\n/// order. The topmost window thereby is the currently active window.<br /><br />\n///\n/// To change window position inside the stack occurs either automatically by\n/// user input by being clicked on or programmatically by calling `nk_window_focus`.\n/// Windows by default are visible unless explicitly being defined with flag\n/// `NK_WINDOW_HIDDEN`, the user clicked the close button on windows with flag\n/// `NK_WINDOW_CLOSABLE` or if a window was explicitly hidden by calling\n/// `nk_window_show`. To explicitly close and destroy a window call `nk_window_close`.<br /><br />\n///\n/// #### Usage\n/// To create and keep a window you have to call one of the two `nk_begin_xxx`\n/// functions to start window declarations and `nk_end` at the end. Furthermore it\n/// is recommended to check the return value of `nk_begin_xxx` and only process\n/// widgets inside the window if the value is not 0. Either way you have to call\n/// `nk_end` at the end of window declarations. Furthermore, do not attempt to\n/// nest `nk_begin_xxx` calls which will hopefully result in an assert or if not\n/// in a segmentation fault.\n///\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// if (nk_begin_xxx(...) {\n///     // [... widgets ...]\n/// }\n/// nk_end(ctx);\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// In the grand concept window and widget declarations need to occur after input\n/// handling and before drawing to screen. Not doing so can result in higher\n/// latency or at worst invalid behavior. Furthermore make sure that `nk_clear`\n/// is called at the end of the frame. While nuklear's default platform backends\n/// already call `nk_clear` for you if you write your own backend not calling\n/// `nk_clear` can cause asserts or even worse undefined behavior.\n///\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// struct nk_context ctx;\n/// nk_init_xxx(&ctx, ...);\n/// while (1) {\n///     Event evt;\n///     nk_input_begin(&ctx);\n///     while (GetEvent(&evt)) {\n///         if (evt.type == MOUSE_MOVE)\n///             nk_input_motion(&ctx, evt.motion.x, evt.motion.y);\n///         else if (evt.type == [...]) {\n///             nk_input_xxx(...);\n///         }\n///     }\n///     nk_input_end(&ctx);\n///\n///     if (nk_begin_xxx(...) {\n///         //[...]\n///     }\n///     nk_end(ctx);\n///\n///     const struct nk_command *cmd = 0;\n///     nk_foreach(cmd, &ctx) {\n///     case NK_COMMAND_LINE:\n///         your_draw_line_function(...)\n///         break;\n///     case NK_COMMAND_RECT\n///         your_draw_rect_function(...)\n///         break;\n///     case //...:\n///         //[...]\n///     }\n///     nk_clear(&ctx);\n/// }\n/// nk_free(&ctx);\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// #### Reference\n/// Function                            | Description\n/// ------------------------------------|----------------------------------------\n/// nk_begin                            | Starts a new window; needs to be called every frame for every window (unless hidden) or otherwise the window gets removed\n/// nk_begin_titled                     | Extended window start with separated title and identifier to allow multiple windows with same name but not title\n/// nk_end                              | Needs to be called at the end of the window building process to process scaling, scrollbars and general cleanup\n//\n/// nk_window_find                      | Finds and returns the window with give name\n/// nk_window_get_bounds                | Returns a rectangle with screen position and size of the currently processed window.\n/// nk_window_get_position              | Returns the position of the currently processed window\n/// nk_window_get_size                  | Returns the size with width and height of the currently processed window\n/// nk_window_get_width                 | Returns the width of the currently processed window\n/// nk_window_get_height                | Returns the height of the currently processed window\n/// nk_window_get_panel                 | Returns the underlying panel which contains all processing state of the current window\n/// nk_window_get_content_region        | Returns the position and size of the currently visible and non-clipped space inside the currently processed window\n/// nk_window_get_content_region_min    | Returns the upper rectangle position of the currently visible and non-clipped space inside the currently processed window\n/// nk_window_get_content_region_max    | Returns the upper rectangle position of the currently visible and non-clipped space inside the currently processed window\n/// nk_window_get_content_region_size   | Returns the size of the currently visible and non-clipped space inside the currently processed window\n/// nk_window_get_canvas                | Returns the draw command buffer. Can be used to draw custom widgets\n/// nk_window_has_focus                 | Returns if the currently processed window is currently active\n/// nk_window_is_collapsed              | Returns if the window with given name is currently minimized/collapsed\n/// nk_window_is_closed                 | Returns if the currently processed window was closed\n/// nk_window_is_hidden                 | Returns if the currently processed window was hidden\n/// nk_window_is_active                 | Same as nk_window_has_focus for some reason\n/// nk_window_is_hovered                | Returns if the currently processed window is currently being hovered by mouse\n/// nk_window_is_any_hovered            | Return if any window currently hovered\n/// nk_item_is_any_active               | Returns if any window or widgets is currently hovered or active\n//\n/// nk_window_set_bounds                | Updates position and size of the currently processed window\n/// nk_window_set_position              | Updates position of the currently process window\n/// nk_window_set_size                  | Updates the size of the currently processed window\n/// nk_window_set_focus                 | Set the currently processed window as active window\n//\n/// nk_window_close                     | Closes the window with given window name which deletes the window at the end of the frame\n/// nk_window_collapse                  | Collapses the window with given window name\n/// nk_window_collapse_if               | Collapses the window with given window name if the given condition was met\n/// nk_window_show                      | Hides a visible or reshows a hidden window\n/// nk_window_show_if                   | Hides/shows a window depending on condition\n*/\n/*\n/// #### nk_panel_flags\n/// Flag                        | Description\n/// ----------------------------|----------------------------------------\n/// NK_WINDOW_BORDER            | Draws a border around the window to visually separate window from the background\n/// NK_WINDOW_MOVABLE           | The movable flag indicates that a window can be moved by user input or by dragging the window header\n/// NK_WINDOW_SCALABLE          | The scalable flag indicates that a window can be scaled by user input by dragging a scaler icon at the button of the window\n/// NK_WINDOW_CLOSABLE          | Adds a closable icon into the header\n/// NK_WINDOW_MINIMIZABLE       | Adds a minimize icon into the header\n/// NK_WINDOW_NO_SCROLLBAR      | Removes the scrollbar from the window\n/// NK_WINDOW_TITLE             | Forces a header at the top at the window showing the title\n/// NK_WINDOW_SCROLL_AUTO_HIDE  | Automatically hides the window scrollbar if no user interaction: also requires delta time in `nk_context` to be set each frame\n/// NK_WINDOW_BACKGROUND        | Always keep window in the background\n/// NK_WINDOW_SCALE_LEFT        | Puts window scaler in the left-ottom corner instead right-bottom\n/// NK_WINDOW_NO_INPUT          | Prevents window of scaling, moving or getting focus\n///\n/// #### nk_collapse_states\n/// State           | Description\n/// ----------------|-----------------------------------------------------------\n/// __NK_MINIMIZED__| UI section is collased and not visibile until maximized\n/// __NK_MAXIMIZED__| UI section is extended and visibile until minimized\n/// <br /><br />\n*/\nenum nk_panel_flags {\n    NK_WINDOW_BORDER            = NK_FLAG(0),\n    NK_WINDOW_MOVABLE           = NK_FLAG(1),\n    NK_WINDOW_SCALABLE          = NK_FLAG(2),\n    NK_WINDOW_CLOSABLE          = NK_FLAG(3),\n    NK_WINDOW_MINIMIZABLE       = NK_FLAG(4),\n    NK_WINDOW_NO_SCROLLBAR      = NK_FLAG(5),\n    NK_WINDOW_TITLE             = NK_FLAG(6),\n    NK_WINDOW_SCROLL_AUTO_HIDE  = NK_FLAG(7),\n    NK_WINDOW_BACKGROUND        = NK_FLAG(8),\n    NK_WINDOW_SCALE_LEFT        = NK_FLAG(9),\n    NK_WINDOW_NO_INPUT          = NK_FLAG(10)\n};\n/*/// #### nk_begin\n/// Starts a new window; needs to be called every frame for every\n/// window (unless hidden) or otherwise the window gets removed\n///\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// int nk_begin(struct nk_context *ctx, const char *title, struct nk_rect bounds, nk_flags flags);\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// Parameter   | Description\n/// ------------|-----------------------------------------------------------\n/// __ctx__     | Must point to an previously initialized `nk_context` struct\n/// __title__   | Window title and identifier. Needs to be persistent over frames to identify the window\n/// __bounds__  | Initial position and window size. However if you do not define `NK_WINDOW_SCALABLE` or `NK_WINDOW_MOVABLE` you can set window position and size every frame\n/// __flags__   | Window flags defined in the nk_panel_flags section with a number of different window behaviors\n///\n/// Returns `true(1)` if the window can be filled up with widgets from this point\n/// until `nk_end` or `false(0)` otherwise for example if minimized\n*/\nNK_API int nk_begin(struct nk_context *ctx, const char *title, struct nk_rect bounds, nk_flags flags);\n/*/// #### nk_begin_titled\n/// Extended window start with separated title and identifier to allow multiple\n/// windows with same title but not name\n///\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// int nk_begin_titled(struct nk_context *ctx, const char *name, const char *title, struct nk_rect bounds, nk_flags flags);\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// Parameter   | Description\n/// ------------|-----------------------------------------------------------\n/// __ctx__     | Must point to an previously initialized `nk_context` struct\n/// __name__    | Window identifier. Needs to be persistent over frames to identify the window\n/// __title__   | Window title displayed inside header if flag `NK_WINDOW_TITLE` or either `NK_WINDOW_CLOSABLE` or `NK_WINDOW_MINIMIZED` was set\n/// __bounds__  | Initial position and window size. However if you do not define `NK_WINDOW_SCALABLE` or `NK_WINDOW_MOVABLE` you can set window position and size every frame\n/// __flags__   | Window flags defined in the nk_panel_flags section with a number of different window behaviors\n///\n/// Returns `true(1)` if the window can be filled up with widgets from this point\n/// until `nk_end` or `false(0)` otherwise for example if minimized\n*/\nNK_API int nk_begin_titled(struct nk_context *ctx, const char *name, const char *title, struct nk_rect bounds, nk_flags flags);\n/*/// #### nk_end\n/// Needs to be called at the end of the window building process to process scaling, scrollbars and general cleanup.\n/// All widget calls after this functions will result in asserts or no state changes\n///\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// void nk_end(struct nk_context *ctx);\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// Parameter   | Description\n/// ------------|-----------------------------------------------------------\n/// __ctx__     | Must point to an previously initialized `nk_context` struct\n*/\nNK_API void nk_end(struct nk_context *ctx);\n/*/// #### nk_window_find\n/// Finds and returns a window from passed name\n///\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// void nk_end(struct nk_context *ctx);\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// Parameter   | Description\n/// ------------|-----------------------------------------------------------\n/// __ctx__     | Must point to an previously initialized `nk_context` struct\n/// __name__    | Window identifier\n///\n/// Returns a `nk_window` struct pointing to the identified window or NULL if\n/// no window with the given name was found\n*/\nNK_API struct nk_window *nk_window_find(struct nk_context *ctx, const char *name);\n/*/// #### nk_window_get_bounds\n/// Returns a rectangle with screen position and size of the currently processed window\n///\n/// !!! WARNING\n///     Only call this function between calls `nk_begin_xxx` and `nk_end`\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// struct nk_rect nk_window_get_bounds(const struct nk_context *ctx);\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// Parameter   | Description\n/// ------------|-----------------------------------------------------------\n/// __ctx__     | Must point to an previously initialized `nk_context` struct\n///\n/// Returns a `nk_rect` struct with window upper left window position and size\n*/\nNK_API struct nk_rect nk_window_get_bounds(const struct nk_context *ctx);\n/*/// #### nk_window_get_position\n/// Returns the position of the currently processed window.\n///\n/// !!! WARNING\n///     Only call this function between calls `nk_begin_xxx` and `nk_end`\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// struct nk_vec2 nk_window_get_position(const struct nk_context *ctx);\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// Parameter   | Description\n/// ------------|-----------------------------------------------------------\n/// __ctx__     | Must point to an previously initialized `nk_context` struct\n///\n/// Returns a `nk_vec2` struct with window upper left position\n*/\nNK_API struct nk_vec2 nk_window_get_position(const struct nk_context *ctx);\n/*/// #### nk_window_get_size\n/// Returns the size with width and height of the currently processed window.\n///\n/// !!! WARNING\n///     Only call this function between calls `nk_begin_xxx` and `nk_end`\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// struct nk_vec2 nk_window_get_size(const struct nk_context *ctx);\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// Parameter   | Description\n/// ------------|-----------------------------------------------------------\n/// __ctx__     | Must point to an previously initialized `nk_context` struct\n///\n/// Returns a `nk_vec2` struct with window width and height\n*/\nNK_API struct nk_vec2 nk_window_get_size(const struct nk_context*);\n/*/// #### nk_window_get_width\n/// Returns the width of the currently processed window.\n///\n/// !!! WARNING\n///     Only call this function between calls `nk_begin_xxx` and `nk_end`\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// float nk_window_get_width(const struct nk_context *ctx);\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// Parameter   | Description\n/// ------------|-----------------------------------------------------------\n/// __ctx__     | Must point to an previously initialized `nk_context` struct\n///\n/// Returns the current window width\n*/\nNK_API float nk_window_get_width(const struct nk_context*);\n/*/// #### nk_window_get_height\n/// Returns the height of the currently processed window.\n///\n/// !!! WARNING\n///     Only call this function between calls `nk_begin_xxx` and `nk_end`\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// float nk_window_get_height(const struct nk_context *ctx);\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// Parameter   | Description\n/// ------------|-----------------------------------------------------------\n/// __ctx__     | Must point to an previously initialized `nk_context` struct\n///\n/// Returns the current window height\n*/\nNK_API float nk_window_get_height(const struct nk_context*);\n/*/// #### nk_window_get_panel\n/// Returns the underlying panel which contains all processing state of the current window.\n///\n/// !!! WARNING\n///     Only call this function between calls `nk_begin_xxx` and `nk_end`\n/// !!! WARNING\n///     Do not keep the returned panel pointer around, it is only valid until `nk_end`\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// struct nk_panel* nk_window_get_panel(struct nk_context *ctx);\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// Parameter   | Description\n/// ------------|-----------------------------------------------------------\n/// __ctx__     | Must point to an previously initialized `nk_context` struct\n///\n/// Returns a pointer to window internal `nk_panel` state.\n*/\nNK_API struct nk_panel* nk_window_get_panel(struct nk_context*);\n/*/// #### nk_window_get_content_region\n/// Returns the position and size of the currently visible and non-clipped space\n/// inside the currently processed window.\n///\n/// !!! WARNING\n///     Only call this function between calls `nk_begin_xxx` and `nk_end`\n///\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// struct nk_rect nk_window_get_content_region(struct nk_context *ctx);\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// Parameter   | Description\n/// ------------|-----------------------------------------------------------\n/// __ctx__     | Must point to an previously initialized `nk_context` struct\n///\n/// Returns `nk_rect` struct with screen position and size (no scrollbar offset)\n/// of the visible space inside the current window\n*/\nNK_API struct nk_rect nk_window_get_content_region(struct nk_context*);\n/*/// #### nk_window_get_content_region_min\n/// Returns the upper left position of the currently visible and non-clipped\n/// space inside the currently processed window.\n///\n/// !!! WARNING\n///     Only call this function between calls `nk_begin_xxx` and `nk_end`\n///\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// struct nk_vec2 nk_window_get_content_region_min(struct nk_context *ctx);\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// Parameter   | Description\n/// ------------|-----------------------------------------------------------\n/// __ctx__     | Must point to an previously initialized `nk_context` struct\n///\n/// returns `nk_vec2` struct with  upper left screen position (no scrollbar offset)\n/// of the visible space inside the current window\n*/\nNK_API struct nk_vec2 nk_window_get_content_region_min(struct nk_context*);\n/*/// #### nk_window_get_content_region_max\n/// Returns the lower right screen position of the currently visible and\n/// non-clipped space inside the currently processed window.\n///\n/// !!! WARNING\n///     Only call this function between calls `nk_begin_xxx` and `nk_end`\n///\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// struct nk_vec2 nk_window_get_content_region_max(struct nk_context *ctx);\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// Parameter   | Description\n/// ------------|-----------------------------------------------------------\n/// __ctx__     | Must point to an previously initialized `nk_context` struct\n///\n/// Returns `nk_vec2` struct with lower right screen position (no scrollbar offset)\n/// of the visible space inside the current window\n*/\nNK_API struct nk_vec2 nk_window_get_content_region_max(struct nk_context*);\n/*/// #### nk_window_get_content_region_size\n/// Returns the size of the currently visible and non-clipped space inside the\n/// currently processed window\n///\n/// !!! WARNING\n///     Only call this function between calls `nk_begin_xxx` and `nk_end`\n///\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// struct nk_vec2 nk_window_get_content_region_size(struct nk_context *ctx);\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// Parameter   | Description\n/// ------------|-----------------------------------------------------------\n/// __ctx__     | Must point to an previously initialized `nk_context` struct\n///\n/// Returns `nk_vec2` struct with size the visible space inside the current window\n*/\nNK_API struct nk_vec2 nk_window_get_content_region_size(struct nk_context*);\n/*/// #### nk_window_get_canvas\n/// Returns the draw command buffer. Can be used to draw custom widgets\n/// !!! WARNING\n///     Only call this function between calls `nk_begin_xxx` and `nk_end`\n/// !!! WARNING\n///     Do not keep the returned command buffer pointer around it is only valid until `nk_end`\n///\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// struct nk_command_buffer* nk_window_get_canvas(struct nk_context *ctx);\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// Parameter   | Description\n/// ------------|-----------------------------------------------------------\n/// __ctx__     | Must point to an previously initialized `nk_context` struct\n///\n/// Returns a pointer to window internal `nk_command_buffer` struct used as\n/// drawing canvas. Can be used to do custom drawing.\n*/\nNK_API struct nk_command_buffer* nk_window_get_canvas(struct nk_context*);\n/*/// #### nk_window_has_focus\n/// Returns if the currently processed window is currently active\n/// !!! WARNING\n///     Only call this function between calls `nk_begin_xxx` and `nk_end`\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// int nk_window_has_focus(const struct nk_context *ctx);\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// Parameter   | Description\n/// ------------|-----------------------------------------------------------\n/// __ctx__     | Must point to an previously initialized `nk_context` struct\n///\n/// Returns `false(0)` if current window is not active or `true(1)` if it is\n*/\nNK_API int nk_window_has_focus(const struct nk_context*);\n/*/// #### nk_window_is_hovered\n/// Return if the current window is being hovered\n/// !!! WARNING\n///     Only call this function between calls `nk_begin_xxx` and `nk_end`\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// int nk_window_is_hovered(struct nk_context *ctx);\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// Parameter   | Description\n/// ------------|-----------------------------------------------------------\n/// __ctx__     | Must point to an previously initialized `nk_context` struct\n///\n/// Returns `true(1)` if current window is hovered or `false(0)` otherwise\n*/\nNK_API int nk_window_is_hovered(struct nk_context*);\n/*/// #### nk_window_is_collapsed\n/// Returns if the window with given name is currently minimized/collapsed\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// int nk_window_is_collapsed(struct nk_context *ctx, const char *name);\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// Parameter   | Description\n/// ------------|-----------------------------------------------------------\n/// __ctx__     | Must point to an previously initialized `nk_context` struct\n/// __name__    | Identifier of window you want to check if it is collapsed\n///\n/// Returns `true(1)` if current window is minimized and `false(0)` if window not\n/// found or is not minimized\n*/\nNK_API int nk_window_is_collapsed(struct nk_context *ctx, const char *name);\n/*/// #### nk_window_is_closed\n/// Returns if the window with given name was closed by calling `nk_close`\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// int nk_window_is_closed(struct nk_context *ctx, const char *name);\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// Parameter   | Description\n/// ------------|-----------------------------------------------------------\n/// __ctx__     | Must point to an previously initialized `nk_context` struct\n/// __name__    | Identifier of window you want to check if it is closed\n///\n/// Returns `true(1)` if current window was closed or `false(0)` window not found or not closed\n*/\nNK_API int nk_window_is_closed(struct nk_context*, const char*);\n/*/// #### nk_window_is_hidden\n/// Returns if the window with given name is hidden\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// int nk_window_is_hidden(struct nk_context *ctx, const char *name);\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// Parameter   | Description\n/// ------------|-----------------------------------------------------------\n/// __ctx__     | Must point to an previously initialized `nk_context` struct\n/// __name__    | Identifier of window you want to check if it is hidden\n///\n/// Returns `true(1)` if current window is hidden or `false(0)` window not found or visible\n*/\nNK_API int nk_window_is_hidden(struct nk_context*, const char*);\n/*/// #### nk_window_is_active\n/// Same as nk_window_has_focus for some reason\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// int nk_window_is_active(struct nk_context *ctx, const char *name);\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// Parameter   | Description\n/// ------------|-----------------------------------------------------------\n/// __ctx__     | Must point to an previously initialized `nk_context` struct\n/// __name__    | Identifier of window you want to check if it is active\n///\n/// Returns `true(1)` if current window is active or `false(0)` window not found or not active\n*/\nNK_API int nk_window_is_active(struct nk_context*, const char*);\n/*/// #### nk_window_is_any_hovered\n/// Returns if the any window is being hovered\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// int nk_window_is_any_hovered(struct nk_context*);\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// Parameter   | Description\n/// ------------|-----------------------------------------------------------\n/// __ctx__     | Must point to an previously initialized `nk_context` struct\n///\n/// Returns `true(1)` if any window is hovered or `false(0)` otherwise\n*/\nNK_API int nk_window_is_any_hovered(struct nk_context*);\n/*/// #### nk_item_is_any_active\n/// Returns if the any window is being hovered or any widget is currently active.\n/// Can be used to decide if input should be processed by UI or your specific input handling.\n/// Example could be UI and 3D camera to move inside a 3D space.\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// int nk_item_is_any_active(struct nk_context*);\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// Parameter   | Description\n/// ------------|-----------------------------------------------------------\n/// __ctx__     | Must point to an previously initialized `nk_context` struct\n///\n/// Returns `true(1)` if any window is hovered or any item is active or `false(0)` otherwise\n*/\nNK_API int nk_item_is_any_active(struct nk_context*);\n/*/// #### nk_window_set_bounds\n/// Updates position and size of window with passed in name\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// void nk_window_set_bounds(struct nk_context*, const char *name, struct nk_rect bounds);\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// Parameter   | Description\n/// ------------|-----------------------------------------------------------\n/// __ctx__     | Must point to an previously initialized `nk_context` struct\n/// __name__    | Identifier of the window to modify both position and size\n/// __bounds__  | Must point to a `nk_rect` struct with the new position and size\n*/\nNK_API void nk_window_set_bounds(struct nk_context*, const char *name, struct nk_rect bounds);\n/*/// #### nk_window_set_position\n/// Updates position of window with passed name\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// void nk_window_set_position(struct nk_context*, const char *name, struct nk_vec2 pos);\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// Parameter   | Description\n/// ------------|-----------------------------------------------------------\n/// __ctx__     | Must point to an previously initialized `nk_context` struct\n/// __name__    | Identifier of the window to modify both position\n/// __pos__     | Must point to a `nk_vec2` struct with the new position\n*/\nNK_API void nk_window_set_position(struct nk_context*, const char *name, struct nk_vec2 pos);\n/*/// #### nk_window_set_size\n/// Updates size of window with passed in name\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// void nk_window_set_size(struct nk_context*, const char *name, struct nk_vec2);\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// Parameter   | Description\n/// ------------|-----------------------------------------------------------\n/// __ctx__     | Must point to an previously initialized `nk_context` struct\n/// __name__    | Identifier of the window to modify both window size\n/// __size__    | Must point to a `nk_vec2` struct with new window size\n*/\nNK_API void nk_window_set_size(struct nk_context*, const char *name, struct nk_vec2);\n/*/// #### nk_window_set_focus\n/// Sets the window with given name as active\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// void nk_window_set_focus(struct nk_context*, const char *name);\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// Parameter   | Description\n/// ------------|-----------------------------------------------------------\n/// __ctx__     | Must point to an previously initialized `nk_context` struct\n/// __name__    | Identifier of the window to set focus on\n*/\nNK_API void nk_window_set_focus(struct nk_context*, const char *name);\n/*/// #### nk_window_close\n/// Closes a window and marks it for being freed at the end of the frame\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// void nk_window_close(struct nk_context *ctx, const char *name);\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// Parameter   | Description\n/// ------------|-----------------------------------------------------------\n/// __ctx__     | Must point to an previously initialized `nk_context` struct\n/// __name__    | Identifier of the window to close\n*/\nNK_API void nk_window_close(struct nk_context *ctx, const char *name);\n/*/// #### nk_window_collapse\n/// Updates collapse state of a window with given name\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// void nk_window_collapse(struct nk_context*, const char *name, enum nk_collapse_states state);\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// Parameter   | Description\n/// ------------|-----------------------------------------------------------\n/// __ctx__     | Must point to an previously initialized `nk_context` struct\n/// __name__    | Identifier of the window to close\n/// __state__   | value out of nk_collapse_states section\n*/\nNK_API void nk_window_collapse(struct nk_context*, const char *name, enum nk_collapse_states state);\n/*/// #### nk_window_collapse_if\n/// Updates collapse state of a window with given name if given condition is met\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// void nk_window_collapse_if(struct nk_context*, const char *name, enum nk_collapse_states, int cond);\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// Parameter   | Description\n/// ------------|-----------------------------------------------------------\n/// __ctx__     | Must point to an previously initialized `nk_context` struct\n/// __name__    | Identifier of the window to either collapse or maximize\n/// __state__   | value out of nk_collapse_states section the window should be put into\n/// __cond__    | condition that has to be met to actually commit the collapse state change\n*/\nNK_API void nk_window_collapse_if(struct nk_context*, const char *name, enum nk_collapse_states, int cond);\n/*/// #### nk_window_show\n/// updates visibility state of a window with given name\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// void nk_window_show(struct nk_context*, const char *name, enum nk_show_states);\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// Parameter   | Description\n/// ------------|-----------------------------------------------------------\n/// __ctx__     | Must point to an previously initialized `nk_context` struct\n/// __name__    | Identifier of the window to either collapse or maximize\n/// __state__   | state with either visible or hidden to modify the window with\n*/\nNK_API void nk_window_show(struct nk_context*, const char *name, enum nk_show_states);\n/*/// #### nk_window_show_if\n/// Updates visibility state of a window with given name if a given condition is met\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// void nk_window_show_if(struct nk_context*, const char *name, enum nk_show_states, int cond);\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// Parameter   | Description\n/// ------------|-----------------------------------------------------------\n/// __ctx__     | Must point to an previously initialized `nk_context` struct\n/// __name__    | Identifier of the window to either hide or show\n/// __state__   | state with either visible or hidden to modify the window with\n/// __cond__    | condition that has to be met to actually commit the visbility state change\n*/\nNK_API void nk_window_show_if(struct nk_context*, const char *name, enum nk_show_states, int cond);\n/* =============================================================================\n *\n *                                  LAYOUT\n *\n * =============================================================================\n/// ### Layouting\n/// Layouting in general describes placing widget inside a window with position and size.\n/// While in this particular implementation there are five different APIs for layouting\n/// each with different trade offs between control and ease of use. <br /><br />\n///\n/// All layouting methods in this library are based around the concept of a row.\n/// A row has a height the window content grows by and a number of columns and each\n/// layouting method specifies how each widget is placed inside the row.\n/// After a row has been allocated by calling a layouting functions and then\n/// filled with widgets will advance an internal pointer over the allocated row. <br /><br />\n///\n/// To actually define a layout you just call the appropriate layouting function\n/// and each subsequent widget call will place the widget as specified. Important\n/// here is that if you define more widgets then columns defined inside the layout\n/// functions it will allocate the next row without you having to make another layouting <br /><br />\n/// call.\n///\n/// Biggest limitation with using all these APIs outside the `nk_layout_space_xxx` API\n/// is that you have to define the row height for each. However the row height\n/// often depends on the height of the font. <br /><br />\n///\n/// To fix that internally nuklear uses a minimum row height that is set to the\n/// height plus padding of currently active font and overwrites the row height\n/// value if zero. <br /><br />\n///\n/// If you manually want to change the minimum row height then\n/// use nk_layout_set_min_row_height, and use nk_layout_reset_min_row_height to\n/// reset it back to be derived from font height. <br /><br />\n///\n/// Also if you change the font in nuklear it will automatically change the minimum\n/// row height for you and. This means if you change the font but still want\n/// a minimum row height smaller than the font you have to repush your value. <br /><br />\n///\n/// For actually more advanced UI I would even recommend using the `nk_layout_space_xxx`\n/// layouting method in combination with a cassowary constraint solver (there are\n/// some versions on github with permissive license model) to take over all control over widget\n/// layouting yourself. However for quick and dirty layouting using all the other layouting\n/// functions should be fine.\n///\n/// #### Usage\n/// 1.  __nk_layout_row_dynamic__<br /><br />\n///     The easiest layouting function is `nk_layout_row_dynamic`. It provides each\n///     widgets with same horizontal space inside the row and dynamically grows\n///     if the owning window grows in width. So the number of columns dictates\n///     the size of each widget dynamically by formula:\n///\n///     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n///     widget_width = (window_width - padding - spacing) * (1/colum_count)\n///     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n///     Just like all other layouting APIs if you define more widget than columns this\n///     library will allocate a new row and keep all layouting parameters previously\n///     defined.\n///\n///     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n///     if (nk_begin_xxx(...) {\n///         // first row with height: 30 composed of two widgets\n///         nk_layout_row_dynamic(&ctx, 30, 2);\n///         nk_widget(...);\n///         nk_widget(...);\n///         //\n///         // second row with same parameter as defined above\n///         nk_widget(...);\n///         nk_widget(...);\n///         //\n///         // third row uses 0 for height which will use auto layouting\n///         nk_layout_row_dynamic(&ctx, 0, 2);\n///         nk_widget(...);\n///         nk_widget(...);\n///     }\n///     nk_end(...);\n///     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// 2.  __nk_layout_row_static__<br /><br />\n///     Another easy layouting function is `nk_layout_row_static`. It provides each\n///     widget with same horizontal pixel width inside the row and does not grow\n///     if the owning window scales smaller or bigger.\n///\n///     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n///     if (nk_begin_xxx(...) {\n///         // first row with height: 30 composed of two widgets with width: 80\n///         nk_layout_row_static(&ctx, 30, 80, 2);\n///         nk_widget(...);\n///         nk_widget(...);\n///         //\n///         // second row with same parameter as defined above\n///         nk_widget(...);\n///         nk_widget(...);\n///         //\n///         // third row uses 0 for height which will use auto layouting\n///         nk_layout_row_static(&ctx, 0, 80, 2);\n///         nk_widget(...);\n///         nk_widget(...);\n///     }\n///     nk_end(...);\n///     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// 3.  __nk_layout_row_xxx__<br /><br />\n///     A little bit more advanced layouting API are functions `nk_layout_row_begin`,\n///     `nk_layout_row_push` and `nk_layout_row_end`. They allow to directly\n///     specify each column pixel or window ratio in a row. It supports either\n///     directly setting per column pixel width or widget window ratio but not\n///     both. Furthermore it is a immediate mode API so each value is directly\n///     pushed before calling a widget. Therefore the layout is not automatically\n///     repeating like the last two layouting functions.\n///\n///     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n///     if (nk_begin_xxx(...) {\n///         // first row with height: 25 composed of two widgets with width 60 and 40\n///         nk_layout_row_begin(ctx, NK_STATIC, 25, 2);\n///         nk_layout_row_push(ctx, 60);\n///         nk_widget(...);\n///         nk_layout_row_push(ctx, 40);\n///         nk_widget(...);\n///         nk_layout_row_end(ctx);\n///         //\n///         // second row with height: 25 composed of two widgets with window ratio 0.25 and 0.75\n///         nk_layout_row_begin(ctx, NK_DYNAMIC, 25, 2);\n///         nk_layout_row_push(ctx, 0.25f);\n///         nk_widget(...);\n///         nk_layout_row_push(ctx, 0.75f);\n///         nk_widget(...);\n///         nk_layout_row_end(ctx);\n///         //\n///         // third row with auto generated height: composed of two widgets with window ratio 0.25 and 0.75\n///         nk_layout_row_begin(ctx, NK_DYNAMIC, 0, 2);\n///         nk_layout_row_push(ctx, 0.25f);\n///         nk_widget(...);\n///         nk_layout_row_push(ctx, 0.75f);\n///         nk_widget(...);\n///         nk_layout_row_end(ctx);\n///     }\n///     nk_end(...);\n///     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// 4.  __nk_layout_row__<br /><br />\n///     The array counterpart to API nk_layout_row_xxx is the single nk_layout_row\n///     functions. Instead of pushing either pixel or window ratio for every widget\n///     it allows to define it by array. The trade of for less control is that\n///     `nk_layout_row` is automatically repeating. Otherwise the behavior is the\n///     same.\n///\n///     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n///     if (nk_begin_xxx(...) {\n///         // two rows with height: 30 composed of two widgets with width 60 and 40\n///         const float size[] = {60,40};\n///         nk_layout_row(ctx, NK_STATIC, 30, 2, ratio);\n///         nk_widget(...);\n///         nk_widget(...);\n///         nk_widget(...);\n///         nk_widget(...);\n///         //\n///         // two rows with height: 30 composed of two widgets with window ratio 0.25 and 0.75\n///         const float ratio[] = {0.25, 0.75};\n///         nk_layout_row(ctx, NK_DYNAMIC, 30, 2, ratio);\n///         nk_widget(...);\n///         nk_widget(...);\n///         nk_widget(...);\n///         nk_widget(...);\n///         //\n///         // two rows with auto generated height composed of two widgets with window ratio 0.25 and 0.75\n///         const float ratio[] = {0.25, 0.75};\n///         nk_layout_row(ctx, NK_DYNAMIC, 30, 2, ratio);\n///         nk_widget(...);\n///         nk_widget(...);\n///         nk_widget(...);\n///         nk_widget(...);\n///     }\n///     nk_end(...);\n///     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// 5.  __nk_layout_row_template_xxx__<br /><br />\n///     The most complex and second most flexible API is a simplified flexbox version without\n///     line wrapping and weights for dynamic widgets. It is an immediate mode API but\n///     unlike `nk_layout_row_xxx` it has auto repeat behavior and needs to be called\n///     before calling the templated widgets.\n///     The row template layout has three different per widget size specifier. The first\n///     one is the `nk_layout_row_template_push_static`  with fixed widget pixel width.\n///     They do not grow if the row grows and will always stay the same.\n///     The second size specifier is `nk_layout_row_template_push_variable`\n///     which defines a minimum widget size but it also can grow if more space is available\n///     not taken by other widgets.\n///     Finally there are dynamic widgets with `nk_layout_row_template_push_dynamic`\n///     which are completely flexible and unlike variable widgets can even shrink\n///     to zero if not enough space is provided.\n///\n///     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n///     if (nk_begin_xxx(...) {\n///         // two rows with height: 30 composed of three widgets\n///         nk_layout_row_template_begin(ctx, 30);\n///         nk_layout_row_template_push_dynamic(ctx);\n///         nk_layout_row_template_push_variable(ctx, 80);\n///         nk_layout_row_template_push_static(ctx, 80);\n///         nk_layout_row_template_end(ctx);\n///         //\n///         // first row\n///         nk_widget(...); // dynamic widget can go to zero if not enough space\n///         nk_widget(...); // variable widget with min 80 pixel but can grow bigger if enough space\n///         nk_widget(...); // static widget with fixed 80 pixel width\n///         //\n///         // second row same layout\n///         nk_widget(...);\n///         nk_widget(...);\n///         nk_widget(...);\n///     }\n///     nk_end(...);\n///     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// 6.  __nk_layout_space_xxx__<br /><br />\n///     Finally the most flexible API directly allows you to place widgets inside the\n///     window. The space layout API is an immediate mode API which does not support\n///     row auto repeat and directly sets position and size of a widget. Position\n///     and size hereby can be either specified as ratio of allocated space or\n///     allocated space local position and pixel size. Since this API is quite\n///     powerful there are a number of utility functions to get the available space\n///     and convert between local allocated space and screen space.\n///\n///     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n///     if (nk_begin_xxx(...) {\n///         // static row with height: 500 (you can set column count to INT_MAX if you don't want to be bothered)\n///         nk_layout_space_begin(ctx, NK_STATIC, 500, INT_MAX);\n///         nk_layout_space_push(ctx, nk_rect(0,0,150,200));\n///         nk_widget(...);\n///         nk_layout_space_push(ctx, nk_rect(200,200,100,200));\n///         nk_widget(...);\n///         nk_layout_space_end(ctx);\n///         //\n///         // dynamic row with height: 500 (you can set column count to INT_MAX if you don't want to be bothered)\n///         nk_layout_space_begin(ctx, NK_DYNAMIC, 500, INT_MAX);\n///         nk_layout_space_push(ctx, nk_rect(0.5,0.5,0.1,0.1));\n///         nk_widget(...);\n///         nk_layout_space_push(ctx, nk_rect(0.7,0.6,0.1,0.1));\n///         nk_widget(...);\n///     }\n///     nk_end(...);\n///     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// #### Reference\n/// Function                                | Description\n/// ----------------------------------------|------------------------------------\n/// nk_layout_set_min_row_height            | Set the currently used minimum row height to a specified value\n/// nk_layout_reset_min_row_height          | Resets the currently used minimum row height to font height\n/// nk_layout_widget_bounds                 | Calculates current width a static layout row can fit inside a window\n/// nk_layout_ratio_from_pixel              | Utility functions to calculate window ratio from pixel size\n//\n/// nk_layout_row_dynamic                   | Current layout is divided into n same sized growing columns\n/// nk_layout_row_static                    | Current layout is divided into n same fixed sized columns\n/// nk_layout_row_begin                     | Starts a new row with given height and number of columns\n/// nk_layout_row_push                      | Pushes another column with given size or window ratio\n/// nk_layout_row_end                       | Finished previously started row\n/// nk_layout_row                           | Specifies row columns in array as either window ratio or size\n//\n/// nk_layout_row_template_begin            | Begins the row template declaration\n/// nk_layout_row_template_push_dynamic     | Adds a dynamic column that dynamically grows and can go to zero if not enough space\n/// nk_layout_row_template_push_variable    | Adds a variable column that dynamically grows but does not shrink below specified pixel width\n/// nk_layout_row_template_push_static      | Adds a static column that does not grow and will always have the same size\n/// nk_layout_row_template_end              | Marks the end of the row template\n//\n/// nk_layout_space_begin                   | Begins a new layouting space that allows to specify each widgets position and size\n/// nk_layout_space_push                    | Pushes position and size of the next widget in own coordinate space either as pixel or ratio\n/// nk_layout_space_end                     | Marks the end of the layouting space\n//\n/// nk_layout_space_bounds                  | Callable after nk_layout_space_begin and returns total space allocated\n/// nk_layout_space_to_screen               | Converts vector from nk_layout_space coordinate space into screen space\n/// nk_layout_space_to_local                | Converts vector from screen space into nk_layout_space coordinates\n/// nk_layout_space_rect_to_screen          | Converts rectangle from nk_layout_space coordinate space into screen space\n/// nk_layout_space_rect_to_local           | Converts rectangle from screen space into nk_layout_space coordinates\n*/\n/*/// #### nk_layout_set_min_row_height\n/// Sets the currently used minimum row height.\n/// !!! WARNING\n///     The passed height needs to include both your preferred row height\n///     as well as padding. No internal padding is added.\n///\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// void nk_layout_set_min_row_height(struct nk_context*, float height);\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// Parameter   | Description\n/// ------------|-----------------------------------------------------------\n/// __ctx__     | Must point to an previously initialized `nk_context` struct after call `nk_begin_xxx`\n/// __height__  | New minimum row height to be used for auto generating the row height\n*/\nNK_API void nk_layout_set_min_row_height(struct nk_context*, float height);\n/*/// #### nk_layout_reset_min_row_height\n/// Reset the currently used minimum row height back to `font_height + text_padding + padding`\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// void nk_layout_reset_min_row_height(struct nk_context*);\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// Parameter   | Description\n/// ------------|-----------------------------------------------------------\n/// __ctx__     | Must point to an previously initialized `nk_context` struct after call `nk_begin_xxx`\n*/\nNK_API void nk_layout_reset_min_row_height(struct nk_context*);\n/*/// #### nk_layout_widget_bounds\n/// Returns the width of the next row allocate by one of the layouting functions\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// struct nk_rect nk_layout_widget_bounds(struct nk_context*);\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// Parameter   | Description\n/// ------------|-----------------------------------------------------------\n/// __ctx__     | Must point to an previously initialized `nk_context` struct after call `nk_begin_xxx`\n///\n/// Return `nk_rect` with both position and size of the next row\n*/\nNK_API struct nk_rect nk_layout_widget_bounds(struct nk_context*);\n/*/// #### nk_layout_ratio_from_pixel\n/// Utility functions to calculate window ratio from pixel size\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// float nk_layout_ratio_from_pixel(struct nk_context*, float pixel_width);\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// Parameter   | Description\n/// ------------|-----------------------------------------------------------\n/// __ctx__     | Must point to an previously initialized `nk_context` struct after call `nk_begin_xxx`\n/// __pixel__   | Pixel_width to convert to window ratio\n///\n/// Returns `nk_rect` with both position and size of the next row\n*/\nNK_API float nk_layout_ratio_from_pixel(struct nk_context*, float pixel_width);\n/*/// #### nk_layout_row_dynamic\n/// Sets current row layout to share horizontal space\n/// between @cols number of widgets evenly. Once called all subsequent widget\n/// calls greater than @cols will allocate a new row with same layout.\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// void nk_layout_row_dynamic(struct nk_context *ctx, float height, int cols);\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// Parameter   | Description\n/// ------------|-----------------------------------------------------------\n/// __ctx__     | Must point to an previously initialized `nk_context` struct after call `nk_begin_xxx`\n/// __height__  | Holds height of each widget in row or zero for auto layouting\n/// __columns__ | Number of widget inside row\n*/\nNK_API void nk_layout_row_dynamic(struct nk_context *ctx, float height, int cols);\n/*/// #### nk_layout_row_static\n/// Sets current row layout to fill @cols number of widgets\n/// in row with same @item_width horizontal size. Once called all subsequent widget\n/// calls greater than @cols will allocate a new row with same layout.\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// void nk_layout_row_static(struct nk_context *ctx, float height, int item_width, int cols);\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// Parameter   | Description\n/// ------------|-----------------------------------------------------------\n/// __ctx__     | Must point to an previously initialized `nk_context` struct after call `nk_begin_xxx`\n/// __height__  | Holds height of each widget in row or zero for auto layouting\n/// __width__   | Holds pixel width of each widget in the row\n/// __columns__ | Number of widget inside row\n*/\nNK_API void nk_layout_row_static(struct nk_context *ctx, float height, int item_width, int cols);\n/*/// #### nk_layout_row_begin\n/// Starts a new dynamic or fixed row with given height and columns.\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// void nk_layout_row_begin(struct nk_context *ctx, enum nk_layout_format fmt, float row_height, int cols);\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// Parameter   | Description\n/// ------------|-----------------------------------------------------------\n/// __ctx__     | Must point to an previously initialized `nk_context` struct after call `nk_begin_xxx`\n/// __fmt__     | either `NK_DYNAMIC` for window ratio or `NK_STATIC` for fixed size columns\n/// __height__  | holds height of each widget in row or zero for auto layouting\n/// __columns__ | Number of widget inside row\n*/\nNK_API void nk_layout_row_begin(struct nk_context *ctx, enum nk_layout_format fmt, float row_height, int cols);\n/*/// #### nk_layout_row_push\n/// Specifies either window ratio or width of a single column\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// void nk_layout_row_push(struct nk_context*, float value);\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// Parameter   | Description\n/// ------------|-----------------------------------------------------------\n/// __ctx__     | Must point to an previously initialized `nk_context` struct after call `nk_begin_xxx`\n/// __value__   | either a window ratio or fixed width depending on @fmt in previous `nk_layout_row_begin` call\n*/\nNK_API void nk_layout_row_push(struct nk_context*, float value);\n/*/// #### nk_layout_row_end\n/// Finished previously started row\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// void nk_layout_row_end(struct nk_context*);\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// Parameter   | Description\n/// ------------|-----------------------------------------------------------\n/// __ctx__     | Must point to an previously initialized `nk_context` struct after call `nk_begin_xxx`\n*/\nNK_API void nk_layout_row_end(struct nk_context*);\n/*/// #### nk_layout_row\n/// Specifies row columns in array as either window ratio or size\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// void nk_layout_row(struct nk_context*, enum nk_layout_format, float height, int cols, const float *ratio);\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// Parameter   | Description\n/// ------------|-----------------------------------------------------------\n/// __ctx__     | Must point to an previously initialized `nk_context` struct after call `nk_begin_xxx`\n/// __fmt__     | Either `NK_DYNAMIC` for window ratio or `NK_STATIC` for fixed size columns\n/// __height__  | Holds height of each widget in row or zero for auto layouting\n/// __columns__ | Number of widget inside row\n*/\nNK_API void nk_layout_row(struct nk_context*, enum nk_layout_format, float height, int cols, const float *ratio);\n/*/// #### nk_layout_row_template_begin\n/// Begins the row template declaration\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// void nk_layout_row_template_begin(struct nk_context*, float row_height);\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// Parameter   | Description\n/// ------------|-----------------------------------------------------------\n/// __ctx__     | Must point to an previously initialized `nk_context` struct after call `nk_begin_xxx`\n/// __height__  | Holds height of each widget in row or zero for auto layouting\n*/\nNK_API void nk_layout_row_template_begin(struct nk_context*, float row_height);\n/*/// #### nk_layout_row_template_push_dynamic\n/// Adds a dynamic column that dynamically grows and can go to zero if not enough space\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// void nk_layout_row_template_push_dynamic(struct nk_context*);\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// Parameter   | Description\n/// ------------|-----------------------------------------------------------\n/// __ctx__     | Must point to an previously initialized `nk_context` struct after call `nk_begin_xxx`\n/// __height__  | Holds height of each widget in row or zero for auto layouting\n*/\nNK_API void nk_layout_row_template_push_dynamic(struct nk_context*);\n/*/// #### nk_layout_row_template_push_variable\n/// Adds a variable column that dynamically grows but does not shrink below specified pixel width\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// void nk_layout_row_template_push_variable(struct nk_context*, float min_width);\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// Parameter   | Description\n/// ------------|-----------------------------------------------------------\n/// __ctx__     | Must point to an previously initialized `nk_context` struct after call `nk_begin_xxx`\n/// __width__   | Holds the minimum pixel width the next column must always be\n*/\nNK_API void nk_layout_row_template_push_variable(struct nk_context*, float min_width);\n/*/// #### nk_layout_row_template_push_static\n/// Adds a static column that does not grow and will always have the same size\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// void nk_layout_row_template_push_static(struct nk_context*, float width);\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// Parameter   | Description\n/// ------------|-----------------------------------------------------------\n/// __ctx__     | Must point to an previously initialized `nk_context` struct after call `nk_begin_xxx`\n/// __width__   | Holds the absolute pixel width value the next column must be\n*/\nNK_API void nk_layout_row_template_push_static(struct nk_context*, float width);\n/*/// #### nk_layout_row_template_end\n/// Marks the end of the row template\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// void nk_layout_row_template_end(struct nk_context*);\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// Parameter   | Description\n/// ------------|-----------------------------------------------------------\n/// __ctx__     | Must point to an previously initialized `nk_context` struct after call `nk_begin_xxx`\n*/\nNK_API void nk_layout_row_template_end(struct nk_context*);\n/*/// #### nk_layout_space_begin\n/// Begins a new layouting space that allows to specify each widgets position and size.\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// void nk_layout_space_begin(struct nk_context*, enum nk_layout_format, float height, int widget_count);\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// Parameter   | Description\n/// ------------|-----------------------------------------------------------\n/// __ctx__     | Must point to an previously initialized `nk_context` struct after call `nk_begin_xxx`\n/// __fmt__     | Either `NK_DYNAMIC` for window ratio or `NK_STATIC` for fixed size columns\n/// __height__  | Holds height of each widget in row or zero for auto layouting\n/// __columns__ | Number of widgets inside row\n*/\nNK_API void nk_layout_space_begin(struct nk_context*, enum nk_layout_format, float height, int widget_count);\n/*/// #### nk_layout_space_push\n/// Pushes position and size of the next widget in own coordinate space either as pixel or ratio\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// void nk_layout_space_push(struct nk_context *ctx, struct nk_rect bounds);\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// Parameter   | Description\n/// ------------|-----------------------------------------------------------\n/// __ctx__     | Must point to an previously initialized `nk_context` struct after call `nk_layout_space_begin`\n/// __bounds__  | Position and size in laoyut space local coordinates\n*/\nNK_API void nk_layout_space_push(struct nk_context*, struct nk_rect bounds);\n/*/// #### nk_layout_space_end\n/// Marks the end of the layout space\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// void nk_layout_space_end(struct nk_context*);\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// Parameter   | Description\n/// ------------|-----------------------------------------------------------\n/// __ctx__     | Must point to an previously initialized `nk_context` struct after call `nk_layout_space_begin`\n*/\nNK_API void nk_layout_space_end(struct nk_context*);\n/*/// #### nk_layout_space_bounds\n/// Utility function to calculate total space allocated for `nk_layout_space`\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// struct nk_rect nk_layout_space_bounds(struct nk_context*);\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// Parameter   | Description\n/// ------------|-----------------------------------------------------------\n/// __ctx__     | Must point to an previously initialized `nk_context` struct after call `nk_layout_space_begin`\n///\n/// Returns `nk_rect` holding the total space allocated\n*/\nNK_API struct nk_rect nk_layout_space_bounds(struct nk_context*);\n/*/// #### nk_layout_space_to_screen\n/// Converts vector from nk_layout_space coordinate space into screen space\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// struct nk_vec2 nk_layout_space_to_screen(struct nk_context*, struct nk_vec2);\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// Parameter   | Description\n/// ------------|-----------------------------------------------------------\n/// __ctx__     | Must point to an previously initialized `nk_context` struct after call `nk_layout_space_begin`\n/// __vec__     | Position to convert from layout space into screen coordinate space\n///\n/// Returns transformed `nk_vec2` in screen space coordinates\n*/\nNK_API struct nk_vec2 nk_layout_space_to_screen(struct nk_context*, struct nk_vec2);\n/*/// #### nk_layout_space_to_local\n/// Converts vector from layout space into screen space\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// struct nk_vec2 nk_layout_space_to_local(struct nk_context*, struct nk_vec2);\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// Parameter   | Description\n/// ------------|-----------------------------------------------------------\n/// __ctx__     | Must point to an previously initialized `nk_context` struct after call `nk_layout_space_begin`\n/// __vec__     | Position to convert from screen space into layout coordinate space\n///\n/// Returns transformed `nk_vec2` in layout space coordinates\n*/\nNK_API struct nk_vec2 nk_layout_space_to_local(struct nk_context*, struct nk_vec2);\n/*/// #### nk_layout_space_rect_to_screen\n/// Converts rectangle from screen space into layout space\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// struct nk_rect nk_layout_space_rect_to_screen(struct nk_context*, struct nk_rect);\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// Parameter   | Description\n/// ------------|-----------------------------------------------------------\n/// __ctx__     | Must point to an previously initialized `nk_context` struct after call `nk_layout_space_begin`\n/// __bounds__  | Rectangle to convert from layout space into screen space\n///\n/// Returns transformed `nk_rect` in screen space coordinates\n*/\nNK_API struct nk_rect nk_layout_space_rect_to_screen(struct nk_context*, struct nk_rect);\n/*/// #### nk_layout_space_rect_to_local\n/// Converts rectangle from layout space into screen space\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// struct nk_rect nk_layout_space_rect_to_local(struct nk_context*, struct nk_rect);\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// Parameter   | Description\n/// ------------|-----------------------------------------------------------\n/// __ctx__     | Must point to an previously initialized `nk_context` struct after call `nk_layout_space_begin`\n/// __bounds__  | Rectangle to convert from layout space into screen space\n///\n/// Returns transformed `nk_rect` in layout space coordinates\n*/\nNK_API struct nk_rect nk_layout_space_rect_to_local(struct nk_context*, struct nk_rect);\n/* =============================================================================\n *\n *                                  GROUP\n *\n * =============================================================================\n/// ### Groups\n/// Groups are basically windows inside windows. They allow to subdivide space\n/// in a window to layout widgets as a group. Almost all more complex widget\n/// layouting requirements can be solved using groups and basic layouting\n/// fuctionality. Groups just like windows are identified by an unique name and\n/// internally keep track of scrollbar offsets by default. However additional\n/// versions are provided to directly manage the scrollbar.\n///\n/// #### Usage\n/// To create a group you have to call one of the three `nk_group_begin_xxx`\n/// functions to start group declarations and `nk_group_end` at the end. Furthermore it\n/// is required to check the return value of `nk_group_begin_xxx` and only process\n/// widgets inside the window if the value is not 0.\n/// Nesting groups is possible and even encouraged since many layouting schemes\n/// can only be achieved by nesting. Groups, unlike windows, need `nk_group_end`\n/// to be only called if the corosponding `nk_group_begin_xxx` call does not return 0:\n///\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// if (nk_group_begin_xxx(ctx, ...) {\n///     // [... widgets ...]\n///     nk_group_end(ctx);\n/// }\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// In the grand concept groups can be called after starting a window\n/// with `nk_begin_xxx` and before calling `nk_end`:\n///\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// struct nk_context ctx;\n/// nk_init_xxx(&ctx, ...);\n/// while (1) {\n///     // Input\n///     Event evt;\n///     nk_input_begin(&ctx);\n///     while (GetEvent(&evt)) {\n///         if (evt.type == MOUSE_MOVE)\n///             nk_input_motion(&ctx, evt.motion.x, evt.motion.y);\n///         else if (evt.type == [...]) {\n///             nk_input_xxx(...);\n///         }\n///     }\n///     nk_input_end(&ctx);\n///     //\n///     // Window\n///     if (nk_begin_xxx(...) {\n///         // [...widgets...]\n///         nk_layout_row_dynamic(...);\n///         if (nk_group_begin_xxx(ctx, ...) {\n///             //[... widgets ...]\n///             nk_group_end(ctx);\n///         }\n///     }\n///     nk_end(ctx);\n///     //\n///     // Draw\n///     const struct nk_command *cmd = 0;\n///     nk_foreach(cmd, &ctx) {\n///     switch (cmd->type) {\n///     case NK_COMMAND_LINE:\n///         your_draw_line_function(...)\n///         break;\n///     case NK_COMMAND_RECT\n///         your_draw_rect_function(...)\n///         break;\n///     case ...:\n///         // [...]\n///     }\n//      nk_clear(&ctx);\n/// }\n/// nk_free(&ctx);\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n/// #### Reference\n/// Function                        | Description\n/// --------------------------------|-------------------------------------------\n/// nk_group_begin                  | Start a new group with internal scrollbar handling\n/// nk_group_begin_titled           | Start a new group with separeted name and title and internal scrollbar handling\n/// nk_group_end                    | Ends a group. Should only be called if nk_group_begin returned non-zero\n/// nk_group_scrolled_offset_begin  | Start a new group with manual separated handling of scrollbar x- and y-offset\n/// nk_group_scrolled_begin         | Start a new group with manual scrollbar handling\n/// nk_group_scrolled_end           | Ends a group with manual scrollbar handling. Should only be called if nk_group_begin returned non-zero\n*/\n/*/// #### nk_group_begin\n/// Starts a new widget group. Requires a previous layouting function to specify a pos/size.\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// int nk_group_begin(struct nk_context*, const char *title, nk_flags);\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// Parameter   | Description\n/// ------------|-----------------------------------------------------------\n/// __ctx__     | Must point to an previously initialized `nk_context` struct\n/// __title__   | Must be an unique identifier for this group that is also used for the group header\n/// __flags__   | Window flags defined in the nk_panel_flags section with a number of different group behaviors\n///\n/// Returns `true(1)` if visible and fillable with widgets or `false(0)` otherwise\n*/\nNK_API int nk_group_begin(struct nk_context*, const char *title, nk_flags);\n/*/// #### nk_group_begin_titled\n/// Starts a new widget group. Requires a previous layouting function to specify a pos/size.\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// int nk_group_begin_titled(struct nk_context*, const char *name, const char *title, nk_flags);\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// Parameter   | Description\n/// ------------|-----------------------------------------------------------\n/// __ctx__     | Must point to an previously initialized `nk_context` struct\n/// __id__      | Must be an unique identifier for this group\n/// __title__   | Group header title\n/// __flags__   | Window flags defined in the nk_panel_flags section with a number of different group behaviors\n///\n/// Returns `true(1)` if visible and fillable with widgets or `false(0)` otherwise\n*/\nNK_API int nk_group_begin_titled(struct nk_context*, const char *name, const char *title, nk_flags);\n/*/// #### nk_group_end\n/// Ends a widget group\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// void nk_group_end(struct nk_context*);\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// Parameter   | Description\n/// ------------|-----------------------------------------------------------\n/// __ctx__     | Must point to an previously initialized `nk_context` struct\n*/\nNK_API void nk_group_end(struct nk_context*);\n/*/// #### nk_group_scrolled_offset_begin\n/// starts a new widget group. requires a previous layouting function to specify\n/// a size. Does not keep track of scrollbar.\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// int nk_group_scrolled_offset_begin(struct nk_context*, nk_uint *x_offset, nk_uint *y_offset, const char *title, nk_flags flags);\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// Parameter   | Description\n/// ------------|-----------------------------------------------------------\n/// __ctx__     | Must point to an previously initialized `nk_context` struct\n/// __x_offset__| Scrollbar x-offset to offset all widgets inside the group horizontally.\n/// __y_offset__| Scrollbar y-offset to offset all widgets inside the group vertically\n/// __title__   | Window unique group title used to both identify and display in the group header\n/// __flags__   | Window flags from the nk_panel_flags section\n///\n/// Returns `true(1)` if visible and fillable with widgets or `false(0)` otherwise\n*/\nNK_API int nk_group_scrolled_offset_begin(struct nk_context*, nk_uint *x_offset, nk_uint *y_offset, const char *title, nk_flags flags);\n/*/// #### nk_group_scrolled_begin\n/// Starts a new widget group. requires a previous\n/// layouting function to specify a size. Does not keep track of scrollbar.\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// int nk_group_scrolled_begin(struct nk_context*, struct nk_scroll *off, const char *title, nk_flags);\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// Parameter   | Description\n/// ------------|-----------------------------------------------------------\n/// __ctx__     | Must point to an previously initialized `nk_context` struct\n/// __off__     | Both x- and y- scroll offset. Allows for manual scrollbar control\n/// __title__   | Window unique group title used to both identify and display in the group header\n/// __flags__   | Window flags from nk_panel_flags section\n///\n/// Returns `true(1)` if visible and fillable with widgets or `false(0)` otherwise\n*/\nNK_API int nk_group_scrolled_begin(struct nk_context*, struct nk_scroll *off, const char *title, nk_flags);\n/*/// #### nk_group_scrolled_end\n/// Ends a widget group after calling nk_group_scrolled_offset_begin or nk_group_scrolled_begin.\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// void nk_group_scrolled_end(struct nk_context*);\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// Parameter   | Description\n/// ------------|-----------------------------------------------------------\n/// __ctx__     | Must point to an previously initialized `nk_context` struct\n*/\nNK_API void nk_group_scrolled_end(struct nk_context*);\n/* =============================================================================\n *\n *                                  TREE\n *\n * ============================================================================= \n/// ### Tree\n/// Trees represent two different concept. First the concept of a collapsable\n/// UI section that can be either in a hidden or visibile state. They allow the UI\n/// user to selectively minimize the current set of visible UI to comprehend.\n/// The second concept are tree widgets for visual UI representation of trees.<br /><br />\n///\n/// Trees thereby can be nested for tree representations and multiple nested\n/// collapsable UI sections. All trees are started by calling of the\n/// `nk_tree_xxx_push_tree` functions and ended by calling one of the\n/// `nk_tree_xxx_pop_xxx()` functions. Each starting functions takes a title label\n/// and optionally an image to be displayed and the initial collapse state from\n/// the nk_collapse_states section.<br /><br />\n///\n/// The runtime state of the tree is either stored outside the library by the caller\n/// or inside which requires a unique ID. The unique ID can either be generated\n/// automatically from `__FILE__` and `__LINE__` with function `nk_tree_push`,\n/// by `__FILE__` and a user provided ID generated for example by loop index with\n/// function `nk_tree_push_id` or completely provided from outside by user with\n/// function `nk_tree_push_hashed`.\n///\n/// #### Usage\n/// To create a tree you have to call one of the seven `nk_tree_xxx_push_xxx`\n/// functions to start a collapsable UI section and `nk_tree_xxx_pop` to mark the\n/// end.\n/// Each starting function will either return `false(0)` if the tree is collapsed\n/// or hidden and therefore does not need to be filled with content or `true(1)`\n/// if visible and required to be filled.\n///\n/// !!! Note\n///     The tree header does not require and layouting function and instead\n///     calculates a auto height based on the currently used font size\n///\n/// The tree ending functions only need to be called if the tree content is\n/// actually visible. So make sure the tree push function is guarded by `if`\n/// and the pop call is only taken if the tree is visible.\n///\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// if (nk_tree_push(ctx, NK_TREE_TAB, \"Tree\", NK_MINIMIZED)) {\n///     nk_layout_row_dynamic(...);\n///     nk_widget(...);\n///     nk_tree_pop(ctx);\n/// }\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// #### Reference\n/// Function                    | Description\n/// ----------------------------|-------------------------------------------\n/// nk_tree_push                | Start a collapsable UI section with internal state management\n/// nk_tree_push_id             | Start a collapsable UI section with internal state management callable in a look\n/// nk_tree_push_hashed         | Start a collapsable UI section with internal state management with full control over internal unique ID use to store state\n/// nk_tree_image_push          | Start a collapsable UI section with image and label header\n/// nk_tree_image_push_id       | Start a collapsable UI section with image and label header and internal state management callable in a look\n/// nk_tree_image_push_hashed   | Start a collapsable UI section with image and label header and internal state management with full control over internal unique ID use to store state\n/// nk_tree_pop                 | Ends a collapsable UI section\n//\n/// nk_tree_state_push          | Start a collapsable UI section with external state management\n/// nk_tree_state_image_push    | Start a collapsable UI section with image and label header and external state management\n/// nk_tree_state_pop           | Ends a collapsabale UI section\n///\n/// #### nk_tree_type\n/// Flag            | Description\n/// ----------------|----------------------------------------\n/// NK_TREE_NODE    | Highlighted tree header to mark a collapsable UI section\n/// NK_TREE_TAB     | Non-highighted tree header closer to tree representations\n*/\n/*/// #### nk_tree_push\n/// Starts a collapsable UI section with internal state management\n/// !!! WARNING\n///     To keep track of the runtime tree collapsable state this function uses\n///     defines `__FILE__` and `__LINE__` to generate a unique ID. If you want\n///     to call this function in a loop please use `nk_tree_push_id` or\n///     `nk_tree_push_hashed` instead.\n///\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// #define nk_tree_push(ctx, type, title, state)\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// Parameter   | Description\n/// ------------|-----------------------------------------------------------\n/// __ctx__     | Must point to an previously initialized `nk_context` struct\n/// __type__    | Value from the nk_tree_type section to visually mark a tree node header as either a collapseable UI section or tree node\n/// __title__   | Label printed in the tree header\n/// __state__   | Initial tree state value out of nk_collapse_states\n///\n/// Returns `true(1)` if visible and fillable with widgets or `false(0)` otherwise\n*/\n#define nk_tree_push(ctx, type, title, state) nk_tree_push_hashed(ctx, type, title, state, NK_FILE_LINE,nk_strlen(NK_FILE_LINE),__LINE__)\n/*/// #### nk_tree_push_id\n/// Starts a collapsable UI section with internal state management callable in a look\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// #define nk_tree_push_id(ctx, type, title, state, id)\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// Parameter   | Description\n/// ------------|-----------------------------------------------------------\n/// __ctx__     | Must point to an previously initialized `nk_context` struct\n/// __type__    | Value from the nk_tree_type section to visually mark a tree node header as either a collapseable UI section or tree node\n/// __title__   | Label printed in the tree header\n/// __state__   | Initial tree state value out of nk_collapse_states\n/// __id__      | Loop counter index if this function is called in a loop\n///\n/// Returns `true(1)` if visible and fillable with widgets or `false(0)` otherwise\n*/\n#define nk_tree_push_id(ctx, type, title, state, id) nk_tree_push_hashed(ctx, type, title, state, NK_FILE_LINE,nk_strlen(NK_FILE_LINE),id)\n/*/// #### nk_tree_push_hashed\n/// Start a collapsable UI section with internal state management with full\n/// control over internal unique ID used to store state\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// int nk_tree_push_hashed(struct nk_context*, enum nk_tree_type, const char *title, enum nk_collapse_states initial_state, const char *hash, int len,int seed);\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// Parameter   | Description\n/// ------------|-----------------------------------------------------------\n/// __ctx__     | Must point to an previously initialized `nk_context` struct\n/// __type__    | Value from the nk_tree_type section to visually mark a tree node header as either a collapseable UI section or tree node\n/// __title__   | Label printed in the tree header\n/// __state__   | Initial tree state value out of nk_collapse_states\n/// __hash__    | Memory block or string to generate the ID from\n/// __len__     | Size of passed memory block or string in __hash__\n/// __seed__    | Seeding value if this function is called in a loop or default to `0`\n///\n/// Returns `true(1)` if visible and fillable with widgets or `false(0)` otherwise\n*/\nNK_API int nk_tree_push_hashed(struct nk_context*, enum nk_tree_type, const char *title, enum nk_collapse_states initial_state, const char *hash, int len,int seed);\n/*/// #### nk_tree_image_push\n/// Start a collapsable UI section with image and label header\n/// !!! WARNING\n///     To keep track of the runtime tree collapsable state this function uses\n///     defines `__FILE__` and `__LINE__` to generate a unique ID. If you want\n///     to call this function in a loop please use `nk_tree_image_push_id` or\n///     `nk_tree_image_push_hashed` instead.\n///\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// #define nk_tree_image_push(ctx, type, img, title, state)\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n//\n/// Parameter   | Description\n/// ------------|-----------------------------------------------------------\n/// __ctx__     | Must point to an previously initialized `nk_context` struct\n/// __type__    | Value from the nk_tree_type section to visually mark a tree node header as either a collapseable UI section or tree node\n/// __img__     | Image to display inside the header on the left of the label\n/// __title__   | Label printed in the tree header\n/// __state__   | Initial tree state value out of nk_collapse_states\n///\n/// Returns `true(1)` if visible and fillable with widgets or `false(0)` otherwise\n*/\n#define nk_tree_image_push(ctx, type, img, title, state) nk_tree_image_push_hashed(ctx, type, img, title, state, NK_FILE_LINE,nk_strlen(NK_FILE_LINE),__LINE__)\n/*/// #### nk_tree_image_push_id\n/// Start a collapsable UI section with image and label header and internal state\n/// management callable in a look\n///\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// #define nk_tree_image_push_id(ctx, type, img, title, state, id)\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// Parameter   | Description\n/// ------------|-----------------------------------------------------------\n/// __ctx__     | Must point to an previously initialized `nk_context` struct\n/// __type__    | Value from the nk_tree_type section to visually mark a tree node header as either a collapseable UI section or tree node\n/// __img__     | Image to display inside the header on the left of the label\n/// __title__   | Label printed in the tree header\n/// __state__   | Initial tree state value out of nk_collapse_states\n/// __id__      | Loop counter index if this function is called in a loop\n///\n/// Returns `true(1)` if visible and fillable with widgets or `false(0)` otherwise\n*/\n#define nk_tree_image_push_id(ctx, type, img, title, state, id) nk_tree_image_push_hashed(ctx, type, img, title, state, NK_FILE_LINE,nk_strlen(NK_FILE_LINE),id)\n/*/// #### nk_tree_image_push_hashed\n/// Start a collapsable UI section with internal state management with full\n/// control over internal unique ID used to store state\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// int nk_tree_image_push_hashed(struct nk_context*, enum nk_tree_type, struct nk_image, const char *title, enum nk_collapse_states initial_state, const char *hash, int len,int seed);\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// Parameter   | Description\n/// ------------|-----------------------------------------------------------\n/// __ctx__     | Must point to an previously initialized `nk_context` struct\n/// __type__    | Value from the nk_tree_type section to visually mark a tree node header as either a collapseable UI section or tree node\n/// __img__     | Image to display inside the header on the left of the label\n/// __title__   | Label printed in the tree header\n/// __state__   | Initial tree state value out of nk_collapse_states\n/// __hash__    | Memory block or string to generate the ID from\n/// __len__     | Size of passed memory block or string in __hash__\n/// __seed__    | Seeding value if this function is called in a loop or default to `0`\n///\n/// Returns `true(1)` if visible and fillable with widgets or `false(0)` otherwise\n*/\nNK_API int nk_tree_image_push_hashed(struct nk_context*, enum nk_tree_type, struct nk_image, const char *title, enum nk_collapse_states initial_state, const char *hash, int len,int seed);\n/*/// #### nk_tree_pop\n/// Ends a collapsabale UI section\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// void nk_tree_pop(struct nk_context*);\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// Parameter   | Description\n/// ------------|-----------------------------------------------------------\n/// __ctx__     | Must point to an previously initialized `nk_context` struct after calling `nk_tree_xxx_push_xxx`\n*/\nNK_API void nk_tree_pop(struct nk_context*);\n/*/// #### nk_tree_state_push\n/// Start a collapsable UI section with external state management\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// int nk_tree_state_push(struct nk_context*, enum nk_tree_type, const char *title, enum nk_collapse_states *state);\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// Parameter   | Description\n/// ------------|-----------------------------------------------------------\n/// __ctx__     | Must point to an previously initialized `nk_context` struct after calling `nk_tree_xxx_push_xxx`\n/// __type__    | Value from the nk_tree_type section to visually mark a tree node header as either a collapseable UI section or tree node\n/// __title__   | Label printed in the tree header\n/// __state__   | Persistent state to update\n///\n/// Returns `true(1)` if visible and fillable with widgets or `false(0)` otherwise\n*/\nNK_API int nk_tree_state_push(struct nk_context*, enum nk_tree_type, const char *title, enum nk_collapse_states *state);\n/*/// #### nk_tree_state_image_push\n/// Start a collapsable UI section with image and label header and external state management\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// int nk_tree_state_image_push(struct nk_context*, enum nk_tree_type, struct nk_image, const char *title, enum nk_collapse_states *state);\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// Parameter   | Description\n/// ------------|-----------------------------------------------------------\n/// __ctx__     | Must point to an previously initialized `nk_context` struct after calling `nk_tree_xxx_push_xxx`\n/// __img__     | Image to display inside the header on the left of the label\n/// __type__    | Value from the nk_tree_type section to visually mark a tree node header as either a collapseable UI section or tree node\n/// __title__   | Label printed in the tree header\n/// __state__   | Persistent state to update\n///\n/// Returns `true(1)` if visible and fillable with widgets or `false(0)` otherwise\n*/\nNK_API int nk_tree_state_image_push(struct nk_context*, enum nk_tree_type, struct nk_image, const char *title, enum nk_collapse_states *state);\n/*/// #### nk_tree_state_pop\n/// Ends a collapsabale UI section\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// void nk_tree_state_pop(struct nk_context*);\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// Parameter   | Description\n/// ------------|-----------------------------------------------------------\n/// __ctx__     | Must point to an previously initialized `nk_context` struct after calling `nk_tree_xxx_push_xxx`\n*/\nNK_API void nk_tree_state_pop(struct nk_context*);\n\n#define nk_tree_element_push(ctx, type, title, state, sel) nk_tree_element_push_hashed(ctx, type, title, state, sel, NK_FILE_LINE,nk_strlen(NK_FILE_LINE),__LINE__)\n#define nk_tree_element_push_id(ctx, type, title, state, sel, id) nk_tree_element_push_hashed(ctx, type, title, state, sel, NK_FILE_LINE,nk_strlen(NK_FILE_LINE),id)\nNK_API int nk_tree_element_push_hashed(struct nk_context*, enum nk_tree_type, const char *title, enum nk_collapse_states initial_state, int *selected, const char *hash, int len, int seed);\nNK_API int nk_tree_element_image_push_hashed(struct nk_context*, enum nk_tree_type, struct nk_image, const char *title, enum nk_collapse_states initial_state, int *selected, const char *hash, int len,int seed);\nNK_API void nk_tree_element_pop(struct nk_context*);\n\n/* =============================================================================\n *\n *                                  LIST VIEW\n *\n * ============================================================================= */\nstruct nk_list_view {\n/* public: */\n    int begin, end, count;\n/* private: */\n    int total_height;\n    struct nk_context *ctx;\n    nk_uint *scroll_pointer;\n    nk_uint scroll_value;\n};\nNK_API int nk_list_view_begin(struct nk_context*, struct nk_list_view *out, const char *id, nk_flags, int row_height, int row_count);\nNK_API void nk_list_view_end(struct nk_list_view*);\n/* =============================================================================\n *\n *                                  WIDGET\n *\n * ============================================================================= */\nenum nk_widget_layout_states {\n    NK_WIDGET_INVALID, /* The widget cannot be seen and is completely out of view */\n    NK_WIDGET_VALID, /* The widget is completely inside the window and can be updated and drawn */\n    NK_WIDGET_ROM /* The widget is partially visible and cannot be updated */\n};\nenum nk_widget_states {\n    NK_WIDGET_STATE_MODIFIED    = NK_FLAG(1),\n    NK_WIDGET_STATE_INACTIVE    = NK_FLAG(2), /* widget is neither active nor hovered */\n    NK_WIDGET_STATE_ENTERED     = NK_FLAG(3), /* widget has been hovered on the current frame */\n    NK_WIDGET_STATE_HOVER       = NK_FLAG(4), /* widget is being hovered */\n    NK_WIDGET_STATE_ACTIVED     = NK_FLAG(5),/* widget is currently activated */\n    NK_WIDGET_STATE_LEFT        = NK_FLAG(6), /* widget is from this frame on not hovered anymore */\n    NK_WIDGET_STATE_HOVERED     = NK_WIDGET_STATE_HOVER|NK_WIDGET_STATE_MODIFIED, /* widget is being hovered */\n    NK_WIDGET_STATE_ACTIVE      = NK_WIDGET_STATE_ACTIVED|NK_WIDGET_STATE_MODIFIED /* widget is currently activated */\n};\nNK_API enum nk_widget_layout_states nk_widget(struct nk_rect*, const struct nk_context*);\nNK_API enum nk_widget_layout_states nk_widget_fitting(struct nk_rect*, struct nk_context*, struct nk_vec2);\nNK_API struct nk_rect nk_widget_bounds(struct nk_context*);\nNK_API struct nk_vec2 nk_widget_position(struct nk_context*);\nNK_API struct nk_vec2 nk_widget_size(struct nk_context*);\nNK_API float nk_widget_width(struct nk_context*);\nNK_API float nk_widget_height(struct nk_context*);\nNK_API int nk_widget_is_hovered(struct nk_context*);\nNK_API int nk_widget_is_mouse_clicked(struct nk_context*, enum nk_buttons);\nNK_API int nk_widget_has_mouse_click_down(struct nk_context*, enum nk_buttons, int down);\nNK_API void nk_spacing(struct nk_context*, int cols);\n/* =============================================================================\n *\n *                                  TEXT\n *\n * ============================================================================= */\nenum nk_text_align {\n    NK_TEXT_ALIGN_LEFT        = 0x01,\n    NK_TEXT_ALIGN_CENTERED    = 0x02,\n    NK_TEXT_ALIGN_RIGHT       = 0x04,\n    NK_TEXT_ALIGN_TOP         = 0x08,\n    NK_TEXT_ALIGN_MIDDLE      = 0x10,\n    NK_TEXT_ALIGN_BOTTOM      = 0x20\n};\nenum nk_text_alignment {\n    NK_TEXT_LEFT        = NK_TEXT_ALIGN_MIDDLE|NK_TEXT_ALIGN_LEFT,\n    NK_TEXT_CENTERED    = NK_TEXT_ALIGN_MIDDLE|NK_TEXT_ALIGN_CENTERED,\n    NK_TEXT_RIGHT       = NK_TEXT_ALIGN_MIDDLE|NK_TEXT_ALIGN_RIGHT\n};\nNK_API void nk_text(struct nk_context*, const char*, int, nk_flags);\nNK_API void nk_text_colored(struct nk_context*, const char*, int, nk_flags, struct nk_color);\nNK_API void nk_text_wrap(struct nk_context*, const char*, int);\nNK_API void nk_text_wrap_colored(struct nk_context*, const char*, int, struct nk_color);\nNK_API void nk_label(struct nk_context*, const char*, nk_flags align);\nNK_API void nk_label_colored(struct nk_context*, const char*, nk_flags align, struct nk_color);\nNK_API void nk_label_wrap(struct nk_context*, const char*);\nNK_API void nk_label_colored_wrap(struct nk_context*, const char*, struct nk_color);\nNK_API void nk_image(struct nk_context*, struct nk_image);\nNK_API void nk_image_color(struct nk_context*, struct nk_image, struct nk_color);\n#ifdef NK_INCLUDE_STANDARD_VARARGS\nNK_API void nk_labelf(struct nk_context*, nk_flags, NK_PRINTF_FORMAT_STRING const char*, ...) NK_PRINTF_VARARG_FUNC(3);\nNK_API void nk_labelf_colored(struct nk_context*, nk_flags, struct nk_color, NK_PRINTF_FORMAT_STRING const char*,...) NK_PRINTF_VARARG_FUNC(4);\nNK_API void nk_labelf_wrap(struct nk_context*, NK_PRINTF_FORMAT_STRING const char*,...) NK_PRINTF_VARARG_FUNC(2);\nNK_API void nk_labelf_colored_wrap(struct nk_context*, struct nk_color, NK_PRINTF_FORMAT_STRING const char*,...) NK_PRINTF_VARARG_FUNC(3);\nNK_API void nk_labelfv(struct nk_context*, nk_flags, NK_PRINTF_FORMAT_STRING const char*, va_list) NK_PRINTF_VALIST_FUNC(3);\nNK_API void nk_labelfv_colored(struct nk_context*, nk_flags, struct nk_color, NK_PRINTF_FORMAT_STRING const char*, va_list) NK_PRINTF_VALIST_FUNC(4);\nNK_API void nk_labelfv_wrap(struct nk_context*, NK_PRINTF_FORMAT_STRING const char*, va_list) NK_PRINTF_VALIST_FUNC(2);\nNK_API void nk_labelfv_colored_wrap(struct nk_context*, struct nk_color, NK_PRINTF_FORMAT_STRING const char*, va_list) NK_PRINTF_VALIST_FUNC(3);\nNK_API void nk_value_bool(struct nk_context*, const char *prefix, int);\nNK_API void nk_value_int(struct nk_context*, const char *prefix, int);\nNK_API void nk_value_uint(struct nk_context*, const char *prefix, unsigned int);\nNK_API void nk_value_float(struct nk_context*, const char *prefix, float);\nNK_API void nk_value_color_byte(struct nk_context*, const char *prefix, struct nk_color);\nNK_API void nk_value_color_float(struct nk_context*, const char *prefix, struct nk_color);\nNK_API void nk_value_color_hex(struct nk_context*, const char *prefix, struct nk_color);\n#endif\n/* =============================================================================\n *\n *                                  BUTTON\n *\n * ============================================================================= */\nNK_API int nk_button_text(struct nk_context*, const char *title, int len);\nNK_API int nk_button_label(struct nk_context*, const char *title);\nNK_API int nk_button_color(struct nk_context*, struct nk_color);\nNK_API int nk_button_symbol(struct nk_context*, enum nk_symbol_type);\nNK_API int nk_button_image(struct nk_context*, struct nk_image img);\nNK_API int nk_button_symbol_label(struct nk_context*, enum nk_symbol_type, const char*, nk_flags text_alignment);\nNK_API int nk_button_symbol_text(struct nk_context*, enum nk_symbol_type, const char*, int, nk_flags alignment);\nNK_API int nk_button_image_label(struct nk_context*, struct nk_image img, const char*, nk_flags text_alignment);\nNK_API int nk_button_image_text(struct nk_context*, struct nk_image img, const char*, int, nk_flags alignment);\nNK_API int nk_button_text_styled(struct nk_context*, const struct nk_style_button*, const char *title, int len);\nNK_API int nk_button_label_styled(struct nk_context*, const struct nk_style_button*, const char *title);\nNK_API int nk_button_symbol_styled(struct nk_context*, const struct nk_style_button*, enum nk_symbol_type);\nNK_API int nk_button_image_styled(struct nk_context*, const struct nk_style_button*, struct nk_image img);\nNK_API int nk_button_symbol_text_styled(struct nk_context*,const struct nk_style_button*, enum nk_symbol_type, const char*, int, nk_flags alignment);\nNK_API int nk_button_symbol_label_styled(struct nk_context *ctx, const struct nk_style_button *style, enum nk_symbol_type symbol, const char *title, nk_flags align);\nNK_API int nk_button_image_label_styled(struct nk_context*,const struct nk_style_button*, struct nk_image img, const char*, nk_flags text_alignment);\nNK_API int nk_button_image_text_styled(struct nk_context*,const struct nk_style_button*, struct nk_image img, const char*, int, nk_flags alignment);\nNK_API void nk_button_set_behavior(struct nk_context*, enum nk_button_behavior);\nNK_API int nk_button_push_behavior(struct nk_context*, enum nk_button_behavior);\nNK_API int nk_button_pop_behavior(struct nk_context*);\n/* =============================================================================\n *\n *                                  CHECKBOX\n *\n * ============================================================================= */\nNK_API int nk_check_label(struct nk_context*, const char*, int active);\nNK_API int nk_check_text(struct nk_context*, const char*, int,int active);\nNK_API unsigned nk_check_flags_label(struct nk_context*, const char*, unsigned int flags, unsigned int value);\nNK_API unsigned nk_check_flags_text(struct nk_context*, const char*, int, unsigned int flags, unsigned int value);\nNK_API int nk_checkbox_label(struct nk_context*, const char*, int *active);\nNK_API int nk_checkbox_text(struct nk_context*, const char*, int, int *active);\nNK_API int nk_checkbox_flags_label(struct nk_context*, const char*, unsigned int *flags, unsigned int value);\nNK_API int nk_checkbox_flags_text(struct nk_context*, const char*, int, unsigned int *flags, unsigned int value);\n/* =============================================================================\n *\n *                                  RADIO BUTTON\n *\n * ============================================================================= */\nNK_API int nk_radio_label(struct nk_context*, const char*, int *active);\nNK_API int nk_radio_text(struct nk_context*, const char*, int, int *active);\nNK_API int nk_option_label(struct nk_context*, const char*, int active);\nNK_API int nk_option_text(struct nk_context*, const char*, int, int active);\n/* =============================================================================\n *\n *                                  SELECTABLE\n *\n * ============================================================================= */\nNK_API int nk_selectable_label(struct nk_context*, const char*, nk_flags align, int *value);\nNK_API int nk_selectable_text(struct nk_context*, const char*, int, nk_flags align, int *value);\nNK_API int nk_selectable_image_label(struct nk_context*,struct nk_image,  const char*, nk_flags align, int *value);\nNK_API int nk_selectable_image_text(struct nk_context*,struct nk_image, const char*, int, nk_flags align, int *value);\nNK_API int nk_selectable_symbol_label(struct nk_context*,enum nk_symbol_type,  const char*, nk_flags align, int *value);\nNK_API int nk_selectable_symbol_text(struct nk_context*,enum nk_symbol_type, const char*, int, nk_flags align, int *value);\n\nNK_API int nk_select_label(struct nk_context*, const char*, nk_flags align, int value);\nNK_API int nk_select_text(struct nk_context*, const char*, int, nk_flags align, int value);\nNK_API int nk_select_image_label(struct nk_context*, struct nk_image,const char*, nk_flags align, int value);\nNK_API int nk_select_image_text(struct nk_context*, struct nk_image,const char*, int, nk_flags align, int value);\nNK_API int nk_select_symbol_label(struct nk_context*,enum nk_symbol_type,  const char*, nk_flags align, int value);\nNK_API int nk_select_symbol_text(struct nk_context*,enum nk_symbol_type, const char*, int, nk_flags align, int value);\n\n/* =============================================================================\n *\n *                                  SLIDER\n *\n * ============================================================================= */\nNK_API float nk_slide_float(struct nk_context*, float min, float val, float max, float step);\nNK_API int nk_slide_int(struct nk_context*, int min, int val, int max, int step);\nNK_API int nk_slider_float(struct nk_context*, float min, float *val, float max, float step);\nNK_API int nk_slider_int(struct nk_context*, int min, int *val, int max, int step);\n/* =============================================================================\n *\n *                                  PROGRESSBAR\n *\n * ============================================================================= */\nNK_API int nk_progress(struct nk_context*, nk_size *cur, nk_size max, int modifyable);\nNK_API nk_size nk_prog(struct nk_context*, nk_size cur, nk_size max, int modifyable);\n\n/* =============================================================================\n *\n *                                  COLOR PICKER\n *\n * ============================================================================= */\nNK_API struct nk_colorf nk_color_picker(struct nk_context*, struct nk_colorf, enum nk_color_format);\nNK_API int nk_color_pick(struct nk_context*, struct nk_colorf*, enum nk_color_format);\n/* =============================================================================\n *\n *                                  PROPERTIES\n *\n * =============================================================================\n/// ### Properties\n/// Properties are the main value modification widgets in Nuklear. Changing a value\n/// can be achieved by dragging, adding/removing incremental steps on button click\n/// or by directly typing a number.\n///\n/// #### Usage\n/// Each property requires a unique name for identifaction that is also used for\n/// displaying a label. If you want to use the same name multiple times make sure\n/// add a '#' before your name. The '#' will not be shown but will generate a\n/// unique ID. Each propery also takes in a minimum and maximum value. If you want\n/// to make use of the complete number range of a type just use the provided\n/// type limits from `limits.h`. For example `INT_MIN` and `INT_MAX` for\n/// `nk_property_int` and `nk_propertyi`. In additional each property takes in\n/// a increment value that will be added or subtracted if either the increment\n/// decrement button is clicked. Finally there is a value for increment per pixel\n/// dragged that is added or subtracted from the value.\n///\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// int value = 0;\n/// struct nk_context ctx;\n/// nk_init_xxx(&ctx, ...);\n/// while (1) {\n///     // Input\n///     Event evt;\n///     nk_input_begin(&ctx);\n///     while (GetEvent(&evt)) {\n///         if (evt.type == MOUSE_MOVE)\n///             nk_input_motion(&ctx, evt.motion.x, evt.motion.y);\n///         else if (evt.type == [...]) {\n///             nk_input_xxx(...);\n///         }\n///     }\n///     nk_input_end(&ctx);\n///     //\n///     // Window\n///     if (nk_begin_xxx(...) {\n///         // Property\n///         nk_layout_row_dynamic(...);\n///         nk_property_int(ctx, \"ID\", INT_MIN, &value, INT_MAX, 1, 1);\n///     }\n///     nk_end(ctx);\n///     //\n///     // Draw\n///     const struct nk_command *cmd = 0;\n///     nk_foreach(cmd, &ctx) {\n///     switch (cmd->type) {\n///     case NK_COMMAND_LINE:\n///         your_draw_line_function(...)\n///         break;\n///     case NK_COMMAND_RECT\n///         your_draw_rect_function(...)\n///         break;\n///     case ...:\n///         // [...]\n///     }\n//      nk_clear(&ctx);\n/// }\n/// nk_free(&ctx);\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// #### Reference\n/// Function            | Description\n/// --------------------|-------------------------------------------\n/// nk_property_int     | Integer property directly modifing a passed in value\n/// nk_property_float   | Float property directly modifing a passed in value\n/// nk_property_double  | Double property directly modifing a passed in value\n/// nk_propertyi        | Integer property returning the modified int value\n/// nk_propertyf        | Float property returning the modified float value\n/// nk_propertyd        | Double property returning the modified double value\n///\n*/\n/*/// #### nk_property_int\n/// Integer property directly modifing a passed in value\n/// !!! WARNING\n///     To generate a unique property ID using the same label make sure to insert\n///     a `#` at the beginning. It will not be shown but guarantees correct behavior.\n///\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// void nk_property_int(struct nk_context *ctx, const char *name, int min, int *val, int max, int step, float inc_per_pixel);\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// Parameter           | Description\n/// --------------------|-----------------------------------------------------------\n/// __ctx__             | Must point to an previously initialized `nk_context` struct after calling a layouting function\n/// __name__            | String used both as a label as well as a unique identifier\n/// __min__             | Minimum value not allowed to be underflown\n/// __val__             | Integer pointer to be modified\n/// __max__             | Maximum value not allowed to be overflown\n/// __step__            | Increment added and subtracted on increment and decrement button\n/// __inc_per_pixel__   | Value per pixel added or subtracted on dragging\n*/\nNK_API void nk_property_int(struct nk_context*, const char *name, int min, int *val, int max, int step, float inc_per_pixel);\n/*/// #### nk_property_float\n/// Float property directly modifing a passed in value\n/// !!! WARNING\n///     To generate a unique property ID using the same label make sure to insert\n///     a `#` at the beginning. It will not be shown but guarantees correct behavior.\n///\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// void nk_property_float(struct nk_context *ctx, const char *name, float min, float *val, float max, float step, float inc_per_pixel);\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// Parameter           | Description\n/// --------------------|-----------------------------------------------------------\n/// __ctx__             | Must point to an previously initialized `nk_context` struct after calling a layouting function\n/// __name__            | String used both as a label as well as a unique identifier\n/// __min__             | Minimum value not allowed to be underflown\n/// __val__             | Float pointer to be modified\n/// __max__             | Maximum value not allowed to be overflown\n/// __step__            | Increment added and subtracted on increment and decrement button\n/// __inc_per_pixel__   | Value per pixel added or subtracted on dragging\n*/\nNK_API void nk_property_float(struct nk_context*, const char *name, float min, float *val, float max, float step, float inc_per_pixel);\n/*/// #### nk_property_double\n/// Double property directly modifing a passed in value\n/// !!! WARNING\n///     To generate a unique property ID using the same label make sure to insert\n///     a `#` at the beginning. It will not be shown but guarantees correct behavior.\n///\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// void nk_property_double(struct nk_context *ctx, const char *name, double min, double *val, double max, double step, double inc_per_pixel);\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// Parameter           | Description\n/// --------------------|-----------------------------------------------------------\n/// __ctx__             | Must point to an previously initialized `nk_context` struct after calling a layouting function\n/// __name__            | String used both as a label as well as a unique identifier\n/// __min__             | Minimum value not allowed to be underflown\n/// __val__             | Double pointer to be modified\n/// __max__             | Maximum value not allowed to be overflown\n/// __step__            | Increment added and subtracted on increment and decrement button\n/// __inc_per_pixel__   | Value per pixel added or subtracted on dragging\n*/\nNK_API void nk_property_double(struct nk_context*, const char *name, double min, double *val, double max, double step, float inc_per_pixel);\n/*/// #### nk_propertyi\n/// Integer property modifing a passed in value and returning the new value\n/// !!! WARNING\n///     To generate a unique property ID using the same label make sure to insert\n///     a `#` at the beginning. It will not be shown but guarantees correct behavior.\n///\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// int nk_propertyi(struct nk_context *ctx, const char *name, int min, int val, int max, int step, float inc_per_pixel);\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// Parameter           | Description\n/// --------------------|-----------------------------------------------------------\n/// __ctx__             | Must point to an previously initialized `nk_context` struct after calling a layouting function\n/// __name__            | String used both as a label as well as a unique identifier\n/// __min__             | Minimum value not allowed to be underflown\n/// __val__             | Current integer value to be modified and returned\n/// __max__             | Maximum value not allowed to be overflown\n/// __step__            | Increment added and subtracted on increment and decrement button\n/// __inc_per_pixel__   | Value per pixel added or subtracted on dragging\n///\n/// Returns the new modified integer value\n*/\nNK_API int nk_propertyi(struct nk_context*, const char *name, int min, int val, int max, int step, float inc_per_pixel);\n/*/// #### nk_propertyf\n/// Float property modifing a passed in value and returning the new value\n/// !!! WARNING\n///     To generate a unique property ID using the same label make sure to insert\n///     a `#` at the beginning. It will not be shown but guarantees correct behavior.\n///\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// float nk_propertyf(struct nk_context *ctx, const char *name, float min, float val, float max, float step, float inc_per_pixel);\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// Parameter           | Description\n/// --------------------|-----------------------------------------------------------\n/// __ctx__             | Must point to an previously initialized `nk_context` struct after calling a layouting function\n/// __name__            | String used both as a label as well as a unique identifier\n/// __min__             | Minimum value not allowed to be underflown\n/// __val__             | Current float value to be modified and returned\n/// __max__             | Maximum value not allowed to be overflown\n/// __step__            | Increment added and subtracted on increment and decrement button\n/// __inc_per_pixel__   | Value per pixel added or subtracted on dragging\n///\n/// Returns the new modified float value\n*/\nNK_API float nk_propertyf(struct nk_context*, const char *name, float min, float val, float max, float step, float inc_per_pixel);\n/*/// #### nk_propertyd\n/// Float property modifing a passed in value and returning the new value\n/// !!! WARNING\n///     To generate a unique property ID using the same label make sure to insert\n///     a `#` at the beginning. It will not be shown but guarantees correct behavior.\n///\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c\n/// float nk_propertyd(struct nk_context *ctx, const char *name, double min, double val, double max, double step, double inc_per_pixel);\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n///\n/// Parameter           | Description\n/// --------------------|-----------------------------------------------------------\n/// __ctx__             | Must point to an previously initialized `nk_context` struct after calling a layouting function\n/// __name__            | String used both as a label as well as a unique identifier\n/// __min__             | Minimum value not allowed to be underflown\n/// __val__             | Current double value to be modified and returned\n/// __max__             | Maximum value not allowed to be overflown\n/// __step__            | Increment added and subtracted on increment and decrement button\n/// __inc_per_pixel__   | Value per pixel added or subtracted on dragging\n///\n/// Returns the new modified double value\n*/\nNK_API double nk_propertyd(struct nk_context*, const char *name, double min, double val, double max, double step, float inc_per_pixel);\n/* =============================================================================\n *\n *                                  TEXT EDIT\n *\n * ============================================================================= */\nenum nk_edit_flags {\n    NK_EDIT_DEFAULT                 = 0,\n    NK_EDIT_READ_ONLY               = NK_FLAG(0),\n    NK_EDIT_AUTO_SELECT             = NK_FLAG(1),\n    NK_EDIT_SIG_ENTER               = NK_FLAG(2),\n    NK_EDIT_ALLOW_TAB               = NK_FLAG(3),\n    NK_EDIT_NO_CURSOR               = NK_FLAG(4),\n    NK_EDIT_SELECTABLE              = NK_FLAG(5),\n    NK_EDIT_CLIPBOARD               = NK_FLAG(6),\n    NK_EDIT_CTRL_ENTER_NEWLINE      = NK_FLAG(7),\n    NK_EDIT_NO_HORIZONTAL_SCROLL    = NK_FLAG(8),\n    NK_EDIT_ALWAYS_INSERT_MODE      = NK_FLAG(9),\n    NK_EDIT_MULTILINE               = NK_FLAG(10),\n    NK_EDIT_GOTO_END_ON_ACTIVATE    = NK_FLAG(11)\n};\nenum nk_edit_types {\n    NK_EDIT_SIMPLE  = NK_EDIT_ALWAYS_INSERT_MODE,\n    NK_EDIT_FIELD   = NK_EDIT_SIMPLE|NK_EDIT_SELECTABLE|NK_EDIT_CLIPBOARD,\n    NK_EDIT_BOX     = NK_EDIT_ALWAYS_INSERT_MODE| NK_EDIT_SELECTABLE| NK_EDIT_MULTILINE|NK_EDIT_ALLOW_TAB|NK_EDIT_CLIPBOARD,\n    NK_EDIT_EDITOR  = NK_EDIT_SELECTABLE|NK_EDIT_MULTILINE|NK_EDIT_ALLOW_TAB| NK_EDIT_CLIPBOARD\n};\nenum nk_edit_events {\n    NK_EDIT_ACTIVE      = NK_FLAG(0), /* edit widget is currently being modified */\n    NK_EDIT_INACTIVE    = NK_FLAG(1), /* edit widget is not active and is not being modified */\n    NK_EDIT_ACTIVATED   = NK_FLAG(2), /* edit widget went from state inactive to state active */\n    NK_EDIT_DEACTIVATED = NK_FLAG(3), /* edit widget went from state active to state inactive */\n    NK_EDIT_COMMITED    = NK_FLAG(4) /* edit widget has received an enter and lost focus */\n};\nNK_API nk_flags nk_edit_string(struct nk_context*, nk_flags, char *buffer, int *len, int max, nk_plugin_filter);\nNK_API nk_flags nk_edit_string_zero_terminated(struct nk_context*, nk_flags, char *buffer, int max, nk_plugin_filter);\nNK_API nk_flags nk_edit_buffer(struct nk_context*, nk_flags, struct nk_text_edit*, nk_plugin_filter);\nNK_API void nk_edit_focus(struct nk_context*, nk_flags flags);\nNK_API void nk_edit_unfocus(struct nk_context*);\n/* =============================================================================\n *\n *                                  CHART\n *\n * ============================================================================= */\nNK_API int nk_chart_begin(struct nk_context*, enum nk_chart_type, int num, float min, float max);\nNK_API int nk_chart_begin_colored(struct nk_context*, enum nk_chart_type, struct nk_color, struct nk_color active, int num, float min, float max);\nNK_API void nk_chart_add_slot(struct nk_context *ctx, const enum nk_chart_type, int count, float min_value, float max_value);\nNK_API void nk_chart_add_slot_colored(struct nk_context *ctx, const enum nk_chart_type, struct nk_color, struct nk_color active, int count, float min_value, float max_value);\nNK_API nk_flags nk_chart_push(struct nk_context*, float);\nNK_API nk_flags nk_chart_push_slot(struct nk_context*, float, int);\nNK_API void nk_chart_end(struct nk_context*);\nNK_API void nk_plot(struct nk_context*, enum nk_chart_type, const float *values, int count, int offset);\nNK_API void nk_plot_function(struct nk_context*, enum nk_chart_type, void *userdata, float(*value_getter)(void* user, int index), int count, int offset);\n/* =============================================================================\n *\n *                                  POPUP\n *\n * ============================================================================= */\nNK_API int nk_popup_begin(struct nk_context*, enum nk_popup_type, const char*, nk_flags, struct nk_rect bounds);\nNK_API void nk_popup_close(struct nk_context*);\nNK_API void nk_popup_end(struct nk_context*);\n/* =============================================================================\n *\n *                                  COMBOBOX\n *\n * ============================================================================= */\nNK_API int nk_combo(struct nk_context*, const char **items, int count, int selected, int item_height, struct nk_vec2 size);\nNK_API int nk_combo_separator(struct nk_context*, const char *items_separated_by_separator, int separator, int selected, int count, int item_height, struct nk_vec2 size);\nNK_API int nk_combo_string(struct nk_context*, const char *items_separated_by_zeros, int selected, int count, int item_height, struct nk_vec2 size);\nNK_API int nk_combo_callback(struct nk_context*, void(*item_getter)(void*, int, const char**), void *userdata, int selected, int count, int item_height, struct nk_vec2 size);\nNK_API void nk_combobox(struct nk_context*, const char **items, int count, int *selected, int item_height, struct nk_vec2 size);\nNK_API void nk_combobox_string(struct nk_context*, const char *items_separated_by_zeros, int *selected, int count, int item_height, struct nk_vec2 size);\nNK_API void nk_combobox_separator(struct nk_context*, const char *items_separated_by_separator, int separator,int *selected, int count, int item_height, struct nk_vec2 size);\nNK_API void nk_combobox_callback(struct nk_context*, void(*item_getter)(void*, int, const char**), void*, int *selected, int count, int item_height, struct nk_vec2 size);\n/* =============================================================================\n *\n *                                  ABSTRACT COMBOBOX\n *\n * ============================================================================= */\nNK_API int nk_combo_begin_text(struct nk_context*, const char *selected, int, struct nk_vec2 size);\nNK_API int nk_combo_begin_label(struct nk_context*, const char *selected, struct nk_vec2 size);\nNK_API int nk_combo_begin_color(struct nk_context*, struct nk_color color, struct nk_vec2 size);\nNK_API int nk_combo_begin_symbol(struct nk_context*,  enum nk_symbol_type,  struct nk_vec2 size);\nNK_API int nk_combo_begin_symbol_label(struct nk_context*, const char *selected, enum nk_symbol_type, struct nk_vec2 size);\nNK_API int nk_combo_begin_symbol_text(struct nk_context*, const char *selected, int, enum nk_symbol_type, struct nk_vec2 size);\nNK_API int nk_combo_begin_image(struct nk_context*, struct nk_image img,  struct nk_vec2 size);\nNK_API int nk_combo_begin_image_label(struct nk_context*, const char *selected, struct nk_image, struct nk_vec2 size);\nNK_API int nk_combo_begin_image_text(struct nk_context*,  const char *selected, int, struct nk_image, struct nk_vec2 size);\nNK_API int nk_combo_item_label(struct nk_context*, const char*, nk_flags alignment);\nNK_API int nk_combo_item_text(struct nk_context*, const char*,int, nk_flags alignment);\nNK_API int nk_combo_item_image_label(struct nk_context*, struct nk_image, const char*, nk_flags alignment);\nNK_API int nk_combo_item_image_text(struct nk_context*, struct nk_image, const char*, int,nk_flags alignment);\nNK_API int nk_combo_item_symbol_label(struct nk_context*, enum nk_symbol_type, const char*, nk_flags alignment);\nNK_API int nk_combo_item_symbol_text(struct nk_context*, enum nk_symbol_type, const char*, int, nk_flags alignment);\nNK_API void nk_combo_close(struct nk_context*);\nNK_API void nk_combo_end(struct nk_context*);\n/* =============================================================================\n *\n *                                  CONTEXTUAL\n *\n * ============================================================================= */\nNK_API int nk_contextual_begin(struct nk_context*, nk_flags, struct nk_vec2, struct nk_rect trigger_bounds);\nNK_API int nk_contextual_item_text(struct nk_context*, const char*, int,nk_flags align);\nNK_API int nk_contextual_item_label(struct nk_context*, const char*, nk_flags align);\nNK_API int nk_contextual_item_image_label(struct nk_context*, struct nk_image, const char*, nk_flags alignment);\nNK_API int nk_contextual_item_image_text(struct nk_context*, struct nk_image, const char*, int len, nk_flags alignment);\nNK_API int nk_contextual_item_symbol_label(struct nk_context*, enum nk_symbol_type, const char*, nk_flags alignment);\nNK_API int nk_contextual_item_symbol_text(struct nk_context*, enum nk_symbol_type, const char*, int, nk_flags alignment);\nNK_API void nk_contextual_close(struct nk_context*);\nNK_API void nk_contextual_end(struct nk_context*);\n/* =============================================================================\n *\n *                                  TOOLTIP\n *\n * ============================================================================= */\nNK_API void nk_tooltip(struct nk_context*, const char*);\n#ifdef NK_INCLUDE_STANDARD_VARARGS\nNK_API void nk_tooltipf(struct nk_context*, NK_PRINTF_FORMAT_STRING const char*, ...) NK_PRINTF_VARARG_FUNC(2);\nNK_API void nk_tooltipfv(struct nk_context*, NK_PRINTF_FORMAT_STRING const char*, va_list) NK_PRINTF_VALIST_FUNC(2);\n#endif\nNK_API int nk_tooltip_begin(struct nk_context*, float width);\nNK_API void nk_tooltip_end(struct nk_context*);\n/* =============================================================================\n *\n *                                  MENU\n *\n * ============================================================================= */\nNK_API void nk_menubar_begin(struct nk_context*);\nNK_API void nk_menubar_end(struct nk_context*);\nNK_API int nk_menu_begin_text(struct nk_context*, const char* title, int title_len, nk_flags align, struct nk_vec2 size);\nNK_API int nk_menu_begin_label(struct nk_context*, const char*, nk_flags align, struct nk_vec2 size);\nNK_API int nk_menu_begin_image(struct nk_context*, const char*, struct nk_image, struct nk_vec2 size);\nNK_API int nk_menu_begin_image_text(struct nk_context*, const char*, int,nk_flags align,struct nk_image, struct nk_vec2 size);\nNK_API int nk_menu_begin_image_label(struct nk_context*, const char*, nk_flags align,struct nk_image, struct nk_vec2 size);\nNK_API int nk_menu_begin_symbol(struct nk_context*, const char*, enum nk_symbol_type, struct nk_vec2 size);\nNK_API int nk_menu_begin_symbol_text(struct nk_context*, const char*, int,nk_flags align,enum nk_symbol_type, struct nk_vec2 size);\nNK_API int nk_menu_begin_symbol_label(struct nk_context*, const char*, nk_flags align,enum nk_symbol_type, struct nk_vec2 size);\nNK_API int nk_menu_item_text(struct nk_context*, const char*, int,nk_flags align);\nNK_API int nk_menu_item_label(struct nk_context*, const char*, nk_flags alignment);\nNK_API int nk_menu_item_image_label(struct nk_context*, struct nk_image, const char*, nk_flags alignment);\nNK_API int nk_menu_item_image_text(struct nk_context*, struct nk_image, const char*, int len, nk_flags alignment);\nNK_API int nk_menu_item_symbol_text(struct nk_context*, enum nk_symbol_type, const char*, int, nk_flags alignment);\nNK_API int nk_menu_item_symbol_label(struct nk_context*, enum nk_symbol_type, const char*, nk_flags alignment);\nNK_API void nk_menu_close(struct nk_context*);\nNK_API void nk_menu_end(struct nk_context*);\n/* =============================================================================\n *\n *                                  STYLE\n *\n * ============================================================================= */\nenum nk_style_colors {\n    NK_COLOR_TEXT,\n    NK_COLOR_WINDOW,\n    NK_COLOR_HEADER,\n    NK_COLOR_BORDER,\n    NK_COLOR_BUTTON,\n    NK_COLOR_BUTTON_HOVER,\n    NK_COLOR_BUTTON_ACTIVE,\n    NK_COLOR_TOGGLE,\n    NK_COLOR_TOGGLE_HOVER,\n    NK_COLOR_TOGGLE_CURSOR,\n    NK_COLOR_SELECT,\n    NK_COLOR_SELECT_ACTIVE,\n    NK_COLOR_SLIDER,\n    NK_COLOR_SLIDER_CURSOR,\n    NK_COLOR_SLIDER_CURSOR_HOVER,\n    NK_COLOR_SLIDER_CURSOR_ACTIVE,\n    NK_COLOR_PROPERTY,\n    NK_COLOR_EDIT,\n    NK_COLOR_EDIT_CURSOR,\n    NK_COLOR_COMBO,\n    NK_COLOR_CHART,\n    NK_COLOR_CHART_COLOR,\n    NK_COLOR_CHART_COLOR_HIGHLIGHT,\n    NK_COLOR_SCROLLBAR,\n    NK_COLOR_SCROLLBAR_CURSOR,\n    NK_COLOR_SCROLLBAR_CURSOR_HOVER,\n    NK_COLOR_SCROLLBAR_CURSOR_ACTIVE,\n    NK_COLOR_TAB_HEADER,\n    NK_COLOR_COUNT\n};\nenum nk_style_cursor {\n    NK_CURSOR_ARROW,\n    NK_CURSOR_TEXT,\n    NK_CURSOR_MOVE,\n    NK_CURSOR_RESIZE_VERTICAL,\n    NK_CURSOR_RESIZE_HORIZONTAL,\n    NK_CURSOR_RESIZE_TOP_LEFT_DOWN_RIGHT,\n    NK_CURSOR_RESIZE_TOP_RIGHT_DOWN_LEFT,\n    NK_CURSOR_COUNT\n};\nNK_API void nk_style_default(struct nk_context*);\nNK_API void nk_style_from_table(struct nk_context*, const struct nk_color*);\nNK_API void nk_style_load_cursor(struct nk_context*, enum nk_style_cursor, const struct nk_cursor*);\nNK_API void nk_style_load_all_cursors(struct nk_context*, struct nk_cursor*);\nNK_API const char* nk_style_get_color_by_name(enum nk_style_colors);\nNK_API void nk_style_set_font(struct nk_context*, const struct nk_user_font*);\nNK_API int nk_style_set_cursor(struct nk_context*, enum nk_style_cursor);\nNK_API void nk_style_show_cursor(struct nk_context*);\nNK_API void nk_style_hide_cursor(struct nk_context*);\n\nNK_API int nk_style_push_font(struct nk_context*, const struct nk_user_font*);\nNK_API int nk_style_push_float(struct nk_context*, float*, float);\nNK_API int nk_style_push_vec2(struct nk_context*, struct nk_vec2*, struct nk_vec2);\nNK_API int nk_style_push_style_item(struct nk_context*, struct nk_style_item*, struct nk_style_item);\nNK_API int nk_style_push_flags(struct nk_context*, nk_flags*, nk_flags);\nNK_API int nk_style_push_color(struct nk_context*, struct nk_color*, struct nk_color);\n\nNK_API int nk_style_pop_font(struct nk_context*);\nNK_API int nk_style_pop_float(struct nk_context*);\nNK_API int nk_style_pop_vec2(struct nk_context*);\nNK_API int nk_style_pop_style_item(struct nk_context*);\nNK_API int nk_style_pop_flags(struct nk_context*);\nNK_API int nk_style_pop_color(struct nk_context*);\n/* =============================================================================\n *\n *                                  COLOR\n *\n * ============================================================================= */\nNK_API struct nk_color nk_rgb(int r, int g, int b);\nNK_API struct nk_color nk_rgb_iv(const int *rgb);\nNK_API struct nk_color nk_rgb_bv(const nk_byte* rgb);\nNK_API struct nk_color nk_rgb_f(float r, float g, float b);\nNK_API struct nk_color nk_rgb_fv(const float *rgb);\nNK_API struct nk_color nk_rgb_cf(struct nk_colorf c);\nNK_API struct nk_color nk_rgb_hex(const char *rgb);\n\nNK_API struct nk_color nk_rgba(int r, int g, int b, int a);\nNK_API struct nk_color nk_rgba_u32(nk_uint);\nNK_API struct nk_color nk_rgba_iv(const int *rgba);\nNK_API struct nk_color nk_rgba_bv(const nk_byte *rgba);\nNK_API struct nk_color nk_rgba_f(float r, float g, float b, float a);\nNK_API struct nk_color nk_rgba_fv(const float *rgba);\nNK_API struct nk_color nk_rgba_cf(struct nk_colorf c);\nNK_API struct nk_color nk_rgba_hex(const char *rgb);\n\nNK_API struct nk_colorf nk_hsva_colorf(float h, float s, float v, float a);\nNK_API struct nk_colorf nk_hsva_colorfv(float *c);\nNK_API void nk_colorf_hsva_f(float *out_h, float *out_s, float *out_v, float *out_a, struct nk_colorf in);\nNK_API void nk_colorf_hsva_fv(float *hsva, struct nk_colorf in);\n\nNK_API struct nk_color nk_hsv(int h, int s, int v);\nNK_API struct nk_color nk_hsv_iv(const int *hsv);\nNK_API struct nk_color nk_hsv_bv(const nk_byte *hsv);\nNK_API struct nk_color nk_hsv_f(float h, float s, float v);\nNK_API struct nk_color nk_hsv_fv(const float *hsv);\n\nNK_API struct nk_color nk_hsva(int h, int s, int v, int a);\nNK_API struct nk_color nk_hsva_iv(const int *hsva);\nNK_API struct nk_color nk_hsva_bv(const nk_byte *hsva);\nNK_API struct nk_color nk_hsva_f(float h, float s, float v, float a);\nNK_API struct nk_color nk_hsva_fv(const float *hsva);\n\n/* color (conversion nuklear --> user) */\nNK_API void nk_color_f(float *r, float *g, float *b, float *a, struct nk_color);\nNK_API void nk_color_fv(float *rgba_out, struct nk_color);\nNK_API struct nk_colorf nk_color_cf(struct nk_color);\nNK_API void nk_color_d(double *r, double *g, double *b, double *a, struct nk_color);\nNK_API void nk_color_dv(double *rgba_out, struct nk_color);\n\nNK_API nk_uint nk_color_u32(struct nk_color);\nNK_API void nk_color_hex_rgba(char *output, struct nk_color);\nNK_API void nk_color_hex_rgb(char *output, struct nk_color);\n\nNK_API void nk_color_hsv_i(int *out_h, int *out_s, int *out_v, struct nk_color);\nNK_API void nk_color_hsv_b(nk_byte *out_h, nk_byte *out_s, nk_byte *out_v, struct nk_color);\nNK_API void nk_color_hsv_iv(int *hsv_out, struct nk_color);\nNK_API void nk_color_hsv_bv(nk_byte *hsv_out, struct nk_color);\nNK_API void nk_color_hsv_f(float *out_h, float *out_s, float *out_v, struct nk_color);\nNK_API void nk_color_hsv_fv(float *hsv_out, struct nk_color);\n\nNK_API void nk_color_hsva_i(int *h, int *s, int *v, int *a, struct nk_color);\nNK_API void nk_color_hsva_b(nk_byte *h, nk_byte *s, nk_byte *v, nk_byte *a, struct nk_color);\nNK_API void nk_color_hsva_iv(int *hsva_out, struct nk_color);\nNK_API void nk_color_hsva_bv(nk_byte *hsva_out, struct nk_color);\nNK_API void nk_color_hsva_f(float *out_h, float *out_s, float *out_v, float *out_a, struct nk_color);\nNK_API void nk_color_hsva_fv(float *hsva_out, struct nk_color);\n/* =============================================================================\n *\n *                                  IMAGE\n *\n * ============================================================================= */\nNK_API nk_handle nk_handle_ptr(void*);\nNK_API nk_handle nk_handle_id(int);\nNK_API struct nk_image nk_image_handle(nk_handle);\nNK_API struct nk_image nk_image_ptr(void*);\nNK_API struct nk_image nk_image_id(int);\nNK_API int nk_image_is_subimage(const struct nk_image* img);\nNK_API struct nk_image nk_subimage_ptr(void*, unsigned short w, unsigned short h, struct nk_rect sub_region);\nNK_API struct nk_image nk_subimage_id(int, unsigned short w, unsigned short h, struct nk_rect sub_region);\nNK_API struct nk_image nk_subimage_handle(nk_handle, unsigned short w, unsigned short h, struct nk_rect sub_region);\n/* =============================================================================\n *\n *                                  MATH\n *\n * ============================================================================= */\nNK_API nk_hash nk_murmur_hash(const void *key, int len, nk_hash seed);\nNK_API void nk_triangle_from_direction(struct nk_vec2 *result, struct nk_rect r, float pad_x, float pad_y, enum nk_heading);\n\nNK_API struct nk_vec2 nk_vec2(float x, float y);\nNK_API struct nk_vec2 nk_vec2i(int x, int y);\nNK_API struct nk_vec2 nk_vec2v(const float *xy);\nNK_API struct nk_vec2 nk_vec2iv(const int *xy);\n\nNK_API struct nk_rect nk_get_null_rect(void);\nNK_API struct nk_rect nk_rect(float x, float y, float w, float h);\nNK_API struct nk_rect nk_recti(int x, int y, int w, int h);\nNK_API struct nk_rect nk_recta(struct nk_vec2 pos, struct nk_vec2 size);\nNK_API struct nk_rect nk_rectv(const float *xywh);\nNK_API struct nk_rect nk_rectiv(const int *xywh);\nNK_API struct nk_vec2 nk_rect_pos(struct nk_rect);\nNK_API struct nk_vec2 nk_rect_size(struct nk_rect);\n/* =============================================================================\n *\n *                                  STRING\n *\n * ============================================================================= */\nNK_API int nk_strlen(const char *str);\nNK_API int nk_stricmp(const char *s1, const char *s2);\nNK_API int nk_stricmpn(const char *s1, const char *s2, int n);\nNK_API int nk_strtoi(const char *str, const char **endptr);\nNK_API float nk_strtof(const char *str, const char **endptr);\nNK_API double nk_strtod(const char *str, const char **endptr);\nNK_API int nk_strfilter(const char *text, const char *regexp);\nNK_API int nk_strmatch_fuzzy_string(char const *str, char const *pattern, int *out_score);\nNK_API int nk_strmatch_fuzzy_text(const char *txt, int txt_len, const char *pattern, int *out_score);\n/* =============================================================================\n *\n *                                  UTF-8\n *\n * ============================================================================= */\nNK_API int nk_utf_decode(const char*, nk_rune*, int);\nNK_API int nk_utf_encode(nk_rune, char*, int);\nNK_API int nk_utf_len(const char*, int byte_len);\nNK_API const char* nk_utf_at(const char *buffer, int length, int index, nk_rune *unicode, int *len);\n/* ===============================================================\n *\n *                          FONT\n *\n * ===============================================================*/\n/*  Font handling in this library was designed to be quite customizable and lets\n    you decide what you want to use and what you want to provide. There are three\n    different ways to use the font atlas. The first two will use your font\n    handling scheme and only requires essential data to run nuklear. The next\n    slightly more advanced features is font handling with vertex buffer output.\n    Finally the most complex API wise is using nuklear's font baking API.\n\n    1.) Using your own implementation without vertex buffer output\n    --------------------------------------------------------------\n    So first up the easiest way to do font handling is by just providing a\n    `nk_user_font` struct which only requires the height in pixel of the used\n    font and a callback to calculate the width of a string. This way of handling\n    fonts is best fitted for using the normal draw shape command API where you\n    do all the text drawing yourself and the library does not require any kind\n    of deeper knowledge about which font handling mechanism you use.\n    IMPORTANT: the `nk_user_font` pointer provided to nuklear has to persist\n    over the complete life time! I know this sucks but it is currently the only\n    way to switch between fonts.\n\n        float your_text_width_calculation(nk_handle handle, float height, const char *text, int len)\n        {\n            your_font_type *type = handle.ptr;\n            float text_width = ...;\n            return text_width;\n        }\n\n        struct nk_user_font font;\n        font.userdata.ptr = &your_font_class_or_struct;\n        font.height = your_font_height;\n        font.width = your_text_width_calculation;\n\n        struct nk_context ctx;\n        nk_init_default(&ctx, &font);\n\n    2.) Using your own implementation with vertex buffer output\n    --------------------------------------------------------------\n    While the first approach works fine if you don't want to use the optional\n    vertex buffer output it is not enough if you do. To get font handling working\n    for these cases you have to provide two additional parameters inside the\n    `nk_user_font`. First a texture atlas handle used to draw text as subimages\n    of a bigger font atlas texture and a callback to query a character's glyph\n    information (offset, size, ...). So it is still possible to provide your own\n    font and use the vertex buffer output.\n\n        float your_text_width_calculation(nk_handle handle, float height, const char *text, int len)\n        {\n            your_font_type *type = handle.ptr;\n            float text_width = ...;\n            return text_width;\n        }\n        void query_your_font_glyph(nk_handle handle, float font_height, struct nk_user_font_glyph *glyph, nk_rune codepoint, nk_rune next_codepoint)\n        {\n            your_font_type *type = handle.ptr;\n            glyph.width = ...;\n            glyph.height = ...;\n            glyph.xadvance = ...;\n            glyph.uv[0].x = ...;\n            glyph.uv[0].y = ...;\n            glyph.uv[1].x = ...;\n            glyph.uv[1].y = ...;\n            glyph.offset.x = ...;\n            glyph.offset.y = ...;\n        }\n\n        struct nk_user_font font;\n        font.userdata.ptr = &your_font_class_or_struct;\n        font.height = your_font_height;\n        font.width = your_text_width_calculation;\n        font.query = query_your_font_glyph;\n        font.texture.id = your_font_texture;\n\n        struct nk_context ctx;\n        nk_init_default(&ctx, &font);\n\n    3.) Nuklear font baker\n    ------------------------------------\n    The final approach if you do not have a font handling functionality or don't\n    want to use it in this library is by using the optional font baker.\n    The font baker APIs can be used to create a font plus font atlas texture\n    and can be used with or without the vertex buffer output.\n\n    It still uses the `nk_user_font` struct and the two different approaches\n    previously stated still work. The font baker is not located inside\n    `nk_context` like all other systems since it can be understood as more of\n    an extension to nuklear and does not really depend on any `nk_context` state.\n\n    Font baker need to be initialized first by one of the nk_font_atlas_init_xxx\n    functions. If you don't care about memory just call the default version\n    `nk_font_atlas_init_default` which will allocate all memory from the standard library.\n    If you want to control memory allocation but you don't care if the allocated\n    memory is temporary and therefore can be freed directly after the baking process\n    is over or permanent you can call `nk_font_atlas_init`.\n\n    After successfully initializing the font baker you can add Truetype(.ttf) fonts from\n    different sources like memory or from file by calling one of the `nk_font_atlas_add_xxx`.\n    functions. Adding font will permanently store each font, font config and ttf memory block(!)\n    inside the font atlas and allows to reuse the font atlas. If you don't want to reuse\n    the font baker by for example adding additional fonts you can call\n    `nk_font_atlas_cleanup` after the baking process is over (after calling nk_font_atlas_end).\n\n    As soon as you added all fonts you wanted you can now start the baking process\n    for every selected glyph to image by calling `nk_font_atlas_bake`.\n    The baking process returns image memory, width and height which can be used to\n    either create your own image object or upload it to any graphics library.\n    No matter which case you finally have to call `nk_font_atlas_end` which\n    will free all temporary memory including the font atlas image so make sure\n    you created our texture beforehand. `nk_font_atlas_end` requires a handle\n    to your font texture or object and optionally fills a `struct nk_draw_null_texture`\n    which can be used for the optional vertex output. If you don't want it just\n    set the argument to `NULL`.\n\n    At this point you are done and if you don't want to reuse the font atlas you\n    can call `nk_font_atlas_cleanup` to free all truetype blobs and configuration\n    memory. Finally if you don't use the font atlas and any of it's fonts anymore\n    you need to call `nk_font_atlas_clear` to free all memory still being used.\n\n        struct nk_font_atlas atlas;\n        nk_font_atlas_init_default(&atlas);\n        nk_font_atlas_begin(&atlas);\n        nk_font *font = nk_font_atlas_add_from_file(&atlas, \"Path/To/Your/TTF_Font.ttf\", 13, 0);\n        nk_font *font2 = nk_font_atlas_add_from_file(&atlas, \"Path/To/Your/TTF_Font2.ttf\", 16, 0);\n        const void* img = nk_font_atlas_bake(&atlas, &img_width, &img_height, NK_FONT_ATLAS_RGBA32);\n        nk_font_atlas_end(&atlas, nk_handle_id(texture), 0);\n\n        struct nk_context ctx;\n        nk_init_default(&ctx, &font->handle);\n        while (1) {\n\n        }\n        nk_font_atlas_clear(&atlas);\n\n    The font baker API is probably the most complex API inside this library and\n    I would suggest reading some of my examples `example/` to get a grip on how\n    to use the font atlas. There are a number of details I left out. For example\n    how to merge fonts, configure a font with `nk_font_config` to use other languages,\n    use another texture coordinate format and a lot more:\n\n        struct nk_font_config cfg = nk_font_config(font_pixel_height);\n        cfg.merge_mode = nk_false or nk_true;\n        cfg.range = nk_font_korean_glyph_ranges();\n        cfg.coord_type = NK_COORD_PIXEL;\n        nk_font *font = nk_font_atlas_add_from_file(&atlas, \"Path/To/Your/TTF_Font.ttf\", 13, &cfg);\n\n*/\nstruct nk_user_font_glyph;\ntypedef float(*nk_text_width_f)(nk_handle, float h, const char*, int len);\ntypedef void(*nk_query_font_glyph_f)(nk_handle handle, float font_height,\n                                    struct nk_user_font_glyph *glyph,\n                                    nk_rune codepoint, nk_rune next_codepoint);\n\n#if defined(NK_INCLUDE_VERTEX_BUFFER_OUTPUT) || defined(NK_INCLUDE_SOFTWARE_FONT)\nstruct nk_user_font_glyph {\n    struct nk_vec2 uv[2];\n    /* texture coordinates */\n    struct nk_vec2 offset;\n    /* offset between top left and glyph */\n    float width, height;\n    /* size of the glyph  */\n    float xadvance;\n    /* offset to the next glyph */\n};\n#endif\n\nstruct nk_user_font {\n    nk_handle userdata;\n    /* user provided font handle */\n    float height;\n    /* max height of the font */\n    nk_text_width_f width;\n    /* font string width in pixel callback */\n#ifdef NK_INCLUDE_VERTEX_BUFFER_OUTPUT\n    nk_query_font_glyph_f query;\n    /* font glyph callback to query drawing info */\n    nk_handle texture;\n    /* texture handle to the used font atlas or texture */\n#endif\n};\n\n#ifdef NK_INCLUDE_FONT_BAKING\nenum nk_font_coord_type {\n    NK_COORD_UV, /* texture coordinates inside font glyphs are clamped between 0-1 */\n    NK_COORD_PIXEL /* texture coordinates inside font glyphs are in absolute pixel */\n};\n\nstruct nk_font;\nstruct nk_baked_font {\n    float height;\n    /* height of the font  */\n    float ascent, descent;\n    /* font glyphs ascent and descent  */\n    nk_rune glyph_offset;\n    /* glyph array offset inside the font glyph baking output array  */\n    nk_rune glyph_count;\n    /* number of glyphs of this font inside the glyph baking array output */\n    const nk_rune *ranges;\n    /* font codepoint ranges as pairs of (from/to) and 0 as last element */\n};\n\nstruct nk_font_config {\n    struct nk_font_config *next;\n    /* NOTE: only used internally */\n    void *ttf_blob;\n    /* pointer to loaded TTF file memory block.\n     * NOTE: not needed for nk_font_atlas_add_from_memory and nk_font_atlas_add_from_file. */\n    nk_size ttf_size;\n    /* size of the loaded TTF file memory block\n     * NOTE: not needed for nk_font_atlas_add_from_memory and nk_font_atlas_add_from_file. */\n\n    unsigned char ttf_data_owned_by_atlas;\n    /* used inside font atlas: default to: 0*/\n    unsigned char merge_mode;\n    /* merges this font into the last font */\n    unsigned char pixel_snap;\n    /* align every character to pixel boundary (if true set oversample (1,1)) */\n    unsigned char oversample_v, oversample_h;\n    /* rasterize at hight quality for sub-pixel position */\n    unsigned char padding[3];\n\n    float size;\n    /* baked pixel height of the font */\n    enum nk_font_coord_type coord_type;\n    /* texture coordinate format with either pixel or UV coordinates */\n    struct nk_vec2 spacing;\n    /* extra pixel spacing between glyphs  */\n    const nk_rune *range;\n    /* list of unicode ranges (2 values per range, zero terminated) */\n    struct nk_baked_font *font;\n    /* font to setup in the baking process: NOTE: not needed for font atlas */\n    nk_rune fallback_glyph;\n    /* fallback glyph to use if a given rune is not found */\n    struct nk_font_config *n;\n    struct nk_font_config *p;\n};\n\nstruct nk_font_glyph {\n    nk_rune codepoint;\n    float xadvance;\n    float x0, y0, x1, y1, w, h;\n    float u0, v0, u1, v1;\n};\n\nstruct nk_font {\n    struct nk_font *next;\n    struct nk_user_font handle;\n    struct nk_baked_font info;\n    float scale;\n    struct nk_font_glyph *glyphs;\n    const struct nk_font_glyph *fallback;\n    nk_rune fallback_codepoint;\n    nk_handle texture;\n    struct nk_font_config *config;\n};\n\nenum nk_font_atlas_format {\n    NK_FONT_ATLAS_ALPHA8,\n    NK_FONT_ATLAS_RGBA32\n};\n\nstruct nk_font_atlas {\n    void *pixel;\n    int tex_width;\n    int tex_height;\n\n    struct nk_allocator permanent;\n    struct nk_allocator temporary;\n\n    struct nk_recti custom;\n    struct nk_cursor cursors[NK_CURSOR_COUNT];\n\n    int glyph_count;\n    struct nk_font_glyph *glyphs;\n    struct nk_font *default_font;\n    struct nk_font *fonts;\n    struct nk_font_config *config;\n    int font_num;\n};\n\n/* some language glyph codepoint ranges */\nNK_API const nk_rune *nk_font_default_glyph_ranges(void);\nNK_API const nk_rune *nk_font_chinese_glyph_ranges(void);\nNK_API const nk_rune *nk_font_cyrillic_glyph_ranges(void);\nNK_API const nk_rune *nk_font_korean_glyph_ranges(void);\n\n#ifdef NK_INCLUDE_DEFAULT_ALLOCATOR\nNK_API void nk_font_atlas_init_default(struct nk_font_atlas*);\n#endif\nNK_API void nk_font_atlas_init(struct nk_font_atlas*, struct nk_allocator*);\nNK_API void nk_font_atlas_init_custom(struct nk_font_atlas*, struct nk_allocator *persistent, struct nk_allocator *transient);\nNK_API void nk_font_atlas_begin(struct nk_font_atlas*);\nNK_API struct nk_font_config nk_font_config(float pixel_height);\nNK_API struct nk_font *nk_font_atlas_add(struct nk_font_atlas*, const struct nk_font_config*);\n#ifdef NK_INCLUDE_DEFAULT_FONT\nNK_API struct nk_font* nk_font_atlas_add_default(struct nk_font_atlas*, float height, const struct nk_font_config*);\n#endif\nNK_API struct nk_font* nk_font_atlas_add_from_memory(struct nk_font_atlas *atlas, void *memory, nk_size size, float height, const struct nk_font_config *config);\n#ifdef NK_INCLUDE_STANDARD_IO\nNK_API struct nk_font* nk_font_atlas_add_from_file(struct nk_font_atlas *atlas, const char *file_path, float height, const struct nk_font_config*);\n#endif\nNK_API struct nk_font *nk_font_atlas_add_compressed(struct nk_font_atlas*, void *memory, nk_size size, float height, const struct nk_font_config*);\nNK_API struct nk_font* nk_font_atlas_add_compressed_base85(struct nk_font_atlas*, const char *data, float height, const struct nk_font_config *config);\nNK_API const void* nk_font_atlas_bake(struct nk_font_atlas*, int *width, int *height, enum nk_font_atlas_format);\nNK_API void nk_font_atlas_end(struct nk_font_atlas*, nk_handle tex, struct nk_draw_null_texture*);\nNK_API const struct nk_font_glyph* nk_font_find_glyph(struct nk_font*, nk_rune unicode);\nNK_API void nk_font_atlas_cleanup(struct nk_font_atlas *atlas);\nNK_API void nk_font_atlas_clear(struct nk_font_atlas*);\n\n#endif\n\n/* ==============================================================\n *\n *                          MEMORY BUFFER\n *\n * ===============================================================*/\n/*  A basic (double)-buffer with linear allocation and resetting as only\n    freeing policy. The buffer's main purpose is to control all memory management\n    inside the GUI toolkit and still leave memory control as much as possible in\n    the hand of the user while also making sure the library is easy to use if\n    not as much control is needed.\n    In general all memory inside this library can be provided from the user in\n    three different ways.\n\n    The first way and the one providing most control is by just passing a fixed\n    size memory block. In this case all control lies in the hand of the user\n    since he can exactly control where the memory comes from and how much memory\n    the library should consume. Of course using the fixed size API removes the\n    ability to automatically resize a buffer if not enough memory is provided so\n    you have to take over the resizing. While being a fixed sized buffer sounds\n    quite limiting, it is very effective in this library since the actual memory\n    consumption is quite stable and has a fixed upper bound for a lot of cases.\n\n    If you don't want to think about how much memory the library should allocate\n    at all time or have a very dynamic UI with unpredictable memory consumption\n    habits but still want control over memory allocation you can use the dynamic\n    allocator based API. The allocator consists of two callbacks for allocating\n    and freeing memory and optional userdata so you can plugin your own allocator.\n\n    The final and easiest way can be used by defining\n    NK_INCLUDE_DEFAULT_ALLOCATOR which uses the standard library memory\n    allocation functions malloc and free and takes over complete control over\n    memory in this library.\n*/\nstruct nk_memory_status {\n    void *memory;\n    unsigned int type;\n    nk_size size;\n    nk_size allocated;\n    nk_size needed;\n    nk_size calls;\n};\n\nenum nk_allocation_type {\n    NK_BUFFER_FIXED,\n    NK_BUFFER_DYNAMIC\n};\n\nenum nk_buffer_allocation_type {\n    NK_BUFFER_FRONT,\n    NK_BUFFER_BACK,\n    NK_BUFFER_MAX\n};\n\nstruct nk_buffer_marker {\n    int active;\n    nk_size offset;\n};\n\nstruct nk_memory {void *ptr;nk_size size;};\nstruct nk_buffer {\n    struct nk_buffer_marker marker[NK_BUFFER_MAX];\n    /* buffer marker to free a buffer to a certain offset */\n    struct nk_allocator pool;\n    /* allocator callback for dynamic buffers */\n    enum nk_allocation_type type;\n    /* memory management type */\n    struct nk_memory memory;\n    /* memory and size of the current memory block */\n    float grow_factor;\n    /* growing factor for dynamic memory management */\n    nk_size allocated;\n    /* total amount of memory allocated */\n    nk_size needed;\n    /* totally consumed memory given that enough memory is present */\n    nk_size calls;\n    /* number of allocation calls */\n    nk_size size;\n    /* current size of the buffer */\n};\n\n#ifdef NK_INCLUDE_DEFAULT_ALLOCATOR\nNK_API void nk_buffer_init_default(struct nk_buffer*);\n#endif\nNK_API void nk_buffer_init(struct nk_buffer*, const struct nk_allocator*, nk_size size);\nNK_API void nk_buffer_init_fixed(struct nk_buffer*, void *memory, nk_size size);\nNK_API void nk_buffer_info(struct nk_memory_status*, struct nk_buffer*);\nNK_API void nk_buffer_push(struct nk_buffer*, enum nk_buffer_allocation_type type, const void *memory, nk_size size, nk_size align);\nNK_API void nk_buffer_mark(struct nk_buffer*, enum nk_buffer_allocation_type type);\nNK_API void nk_buffer_reset(struct nk_buffer*, enum nk_buffer_allocation_type type);\nNK_API void nk_buffer_clear(struct nk_buffer*);\nNK_API void nk_buffer_free(struct nk_buffer*);\nNK_API void *nk_buffer_memory(struct nk_buffer*);\nNK_API const void *nk_buffer_memory_const(const struct nk_buffer*);\nNK_API nk_size nk_buffer_total(struct nk_buffer*);\n\n/* ==============================================================\n *\n *                          STRING\n *\n * ===============================================================*/\n/*  Basic string buffer which is only used in context with the text editor\n *  to manage and manipulate dynamic or fixed size string content. This is _NOT_\n *  the default string handling method. The only instance you should have any contact\n *  with this API is if you interact with an `nk_text_edit` object inside one of the\n *  copy and paste functions and even there only for more advanced cases. */\nstruct nk_str {\n    struct nk_buffer buffer;\n    int len; /* in codepoints/runes/glyphs */\n};\n\n#ifdef NK_INCLUDE_DEFAULT_ALLOCATOR\nNK_API void nk_str_init_default(struct nk_str*);\n#endif\nNK_API void nk_str_init(struct nk_str*, const struct nk_allocator*, nk_size size);\nNK_API void nk_str_init_fixed(struct nk_str*, void *memory, nk_size size);\nNK_API void nk_str_clear(struct nk_str*);\nNK_API void nk_str_free(struct nk_str*);\n\nNK_API int nk_str_append_text_char(struct nk_str*, const char*, int);\nNK_API int nk_str_append_str_char(struct nk_str*, const char*);\nNK_API int nk_str_append_text_utf8(struct nk_str*, const char*, int);\nNK_API int nk_str_append_str_utf8(struct nk_str*, const char*);\nNK_API int nk_str_append_text_runes(struct nk_str*, const nk_rune*, int);\nNK_API int nk_str_append_str_runes(struct nk_str*, const nk_rune*);\n\nNK_API int nk_str_insert_at_char(struct nk_str*, int pos, const char*, int);\nNK_API int nk_str_insert_at_rune(struct nk_str*, int pos, const char*, int);\n\nNK_API int nk_str_insert_text_char(struct nk_str*, int pos, const char*, int);\nNK_API int nk_str_insert_str_char(struct nk_str*, int pos, const char*);\nNK_API int nk_str_insert_text_utf8(struct nk_str*, int pos, const char*, int);\nNK_API int nk_str_insert_str_utf8(struct nk_str*, int pos, const char*);\nNK_API int nk_str_insert_text_runes(struct nk_str*, int pos, const nk_rune*, int);\nNK_API int nk_str_insert_str_runes(struct nk_str*, int pos, const nk_rune*);\n\nNK_API void nk_str_remove_chars(struct nk_str*, int len);\nNK_API void nk_str_remove_runes(struct nk_str *str, int len);\nNK_API void nk_str_delete_chars(struct nk_str*, int pos, int len);\nNK_API void nk_str_delete_runes(struct nk_str*, int pos, int len);\n\nNK_API char *nk_str_at_char(struct nk_str*, int pos);\nNK_API char *nk_str_at_rune(struct nk_str*, int pos, nk_rune *unicode, int *len);\nNK_API nk_rune nk_str_rune_at(const struct nk_str*, int pos);\nNK_API const char *nk_str_at_char_const(const struct nk_str*, int pos);\nNK_API const char *nk_str_at_const(const struct nk_str*, int pos, nk_rune *unicode, int *len);\n\nNK_API char *nk_str_get(struct nk_str*);\nNK_API const char *nk_str_get_const(const struct nk_str*);\nNK_API int nk_str_len(struct nk_str*);\nNK_API int nk_str_len_char(struct nk_str*);\n\n/*===============================================================\n *\n *                      TEXT EDITOR\n *\n * ===============================================================*/\n/* Editing text in this library is handled by either `nk_edit_string` or\n * `nk_edit_buffer`. But like almost everything in this library there are multiple\n * ways of doing it and a balance between control and ease of use with memory\n * as well as functionality controlled by flags.\n *\n * This library generally allows three different levels of memory control:\n * First of is the most basic way of just providing a simple char array with\n * string length. This method is probably the easiest way of handling simple\n * user text input. Main upside is complete control over memory while the biggest\n * downside in comparison with the other two approaches is missing undo/redo.\n *\n * For UIs that require undo/redo the second way was created. It is based on\n * a fixed size nk_text_edit struct, which has an internal undo/redo stack.\n * This is mainly useful if you want something more like a text editor but don't want\n * to have a dynamically growing buffer.\n *\n * The final way is using a dynamically growing nk_text_edit struct, which\n * has both a default version if you don't care where memory comes from and an\n * allocator version if you do. While the text editor is quite powerful for its\n * complexity I would not recommend editing gigabytes of data with it.\n * It is rather designed for uses cases which make sense for a GUI library not for\n * an full blown text editor.\n */\n#ifndef NK_TEXTEDIT_UNDOSTATECOUNT\n#define NK_TEXTEDIT_UNDOSTATECOUNT     99\n#endif\n\n#ifndef NK_TEXTEDIT_UNDOCHARCOUNT\n#define NK_TEXTEDIT_UNDOCHARCOUNT      999\n#endif\n\nstruct nk_text_edit;\nstruct nk_clipboard {\n    nk_handle userdata;\n    nk_plugin_paste paste;\n    nk_plugin_copy copy;\n};\n\nstruct nk_text_undo_record {\n   int where;\n   short insert_length;\n   short delete_length;\n   short char_storage;\n};\n\nstruct nk_text_undo_state {\n   struct nk_text_undo_record undo_rec[NK_TEXTEDIT_UNDOSTATECOUNT];\n   nk_rune undo_char[NK_TEXTEDIT_UNDOCHARCOUNT];\n   short undo_point;\n   short redo_point;\n   short undo_char_point;\n   short redo_char_point;\n};\n\nenum nk_text_edit_type {\n    NK_TEXT_EDIT_SINGLE_LINE,\n    NK_TEXT_EDIT_MULTI_LINE\n};\n\nenum nk_text_edit_mode {\n    NK_TEXT_EDIT_MODE_VIEW,\n    NK_TEXT_EDIT_MODE_INSERT,\n    NK_TEXT_EDIT_MODE_REPLACE\n};\n\nstruct nk_text_edit {\n    struct nk_clipboard clip;\n    struct nk_str string;\n    nk_plugin_filter filter;\n    struct nk_vec2 scrollbar;\n\n    int cursor;\n    int select_start;\n    int select_end;\n    unsigned char mode;\n    unsigned char cursor_at_end_of_line;\n    unsigned char initialized;\n    unsigned char has_preferred_x;\n    unsigned char single_line;\n    unsigned char active;\n    unsigned char padding1;\n    float preferred_x;\n    struct nk_text_undo_state undo;\n};\n\n/* filter function */\nNK_API int nk_filter_default(const struct nk_text_edit*, nk_rune unicode);\nNK_API int nk_filter_ascii(const struct nk_text_edit*, nk_rune unicode);\nNK_API int nk_filter_float(const struct nk_text_edit*, nk_rune unicode);\nNK_API int nk_filter_decimal(const struct nk_text_edit*, nk_rune unicode);\nNK_API int nk_filter_hex(const struct nk_text_edit*, nk_rune unicode);\nNK_API int nk_filter_oct(const struct nk_text_edit*, nk_rune unicode);\nNK_API int nk_filter_binary(const struct nk_text_edit*, nk_rune unicode);\n\n/* text editor */\n#ifdef NK_INCLUDE_DEFAULT_ALLOCATOR\nNK_API void nk_textedit_init_default(struct nk_text_edit*);\n#endif\nNK_API void nk_textedit_init(struct nk_text_edit*, struct nk_allocator*, nk_size size);\nNK_API void nk_textedit_init_fixed(struct nk_text_edit*, void *memory, nk_size size);\nNK_API void nk_textedit_free(struct nk_text_edit*);\nNK_API void nk_textedit_text(struct nk_text_edit*, const char*, int total_len);\nNK_API void nk_textedit_delete(struct nk_text_edit*, int where, int len);\nNK_API void nk_textedit_delete_selection(struct nk_text_edit*);\nNK_API void nk_textedit_select_all(struct nk_text_edit*);\nNK_API int nk_textedit_cut(struct nk_text_edit*);\nNK_API int nk_textedit_paste(struct nk_text_edit*, char const*, int len);\nNK_API void nk_textedit_undo(struct nk_text_edit*);\nNK_API void nk_textedit_redo(struct nk_text_edit*);\n\n/* ===============================================================\n *\n *                          DRAWING\n *\n * ===============================================================*/\n/*  This library was designed to be render backend agnostic so it does\n    not draw anything to screen. Instead all drawn shapes, widgets\n    are made of, are buffered into memory and make up a command queue.\n    Each frame therefore fills the command buffer with draw commands\n    that then need to be executed by the user and his own render backend.\n    After that the command buffer needs to be cleared and a new frame can be\n    started. It is probably important to note that the command buffer is the main\n    drawing API and the optional vertex buffer API only takes this format and\n    converts it into a hardware accessible format.\n\n    To use the command queue to draw your own widgets you can access the\n    command buffer of each window by calling `nk_window_get_canvas` after\n    previously having called `nk_begin`:\n\n        void draw_red_rectangle_widget(struct nk_context *ctx)\n        {\n            struct nk_command_buffer *canvas;\n            struct nk_input *input = &ctx->input;\n            canvas = nk_window_get_canvas(ctx);\n\n            struct nk_rect space;\n            enum nk_widget_layout_states state;\n            state = nk_widget(&space, ctx);\n            if (!state) return;\n\n            if (state != NK_WIDGET_ROM)\n                update_your_widget_by_user_input(...);\n            nk_fill_rect(canvas, space, 0, nk_rgb(255,0,0));\n        }\n\n        if (nk_begin(...)) {\n            nk_layout_row_dynamic(ctx, 25, 1);\n            draw_red_rectangle_widget(ctx);\n        }\n        nk_end(..)\n\n    Important to know if you want to create your own widgets is the `nk_widget`\n    call. It allocates space on the panel reserved for this widget to be used,\n    but also returns the state of the widget space. If your widget is not seen and does\n    not have to be updated it is '0' and you can just return. If it only has\n    to be drawn the state will be `NK_WIDGET_ROM` otherwise you can do both\n    update and draw your widget. The reason for separating is to only draw and\n    update what is actually necessary which is crucial for performance.\n*/\nenum nk_command_type {\n    NK_COMMAND_NOP,\n    NK_COMMAND_SCISSOR,\n    NK_COMMAND_LINE,\n    NK_COMMAND_CURVE,\n    NK_COMMAND_RECT,\n    NK_COMMAND_RECT_FILLED,\n    NK_COMMAND_RECT_MULTI_COLOR,\n    NK_COMMAND_CIRCLE,\n    NK_COMMAND_CIRCLE_FILLED,\n    NK_COMMAND_ARC,\n    NK_COMMAND_ARC_FILLED,\n    NK_COMMAND_TRIANGLE,\n    NK_COMMAND_TRIANGLE_FILLED,\n    NK_COMMAND_POLYGON,\n    NK_COMMAND_POLYGON_FILLED,\n    NK_COMMAND_POLYLINE,\n    NK_COMMAND_TEXT,\n    NK_COMMAND_IMAGE,\n    NK_COMMAND_CUSTOM\n};\n\n/* command base and header of every command inside the buffer */\nstruct nk_command {\n    enum nk_command_type type;\n    nk_size next;\n#ifdef NK_INCLUDE_COMMAND_USERDATA\n    nk_handle userdata;\n#endif\n};\n\nstruct nk_command_scissor {\n    struct nk_command header;\n    short x, y;\n    unsigned short w, h;\n};\n\nstruct nk_command_line {\n    struct nk_command header;\n    unsigned short line_thickness;\n    struct nk_vec2i begin;\n    struct nk_vec2i end;\n    struct nk_color color;\n};\n\nstruct nk_command_curve {\n    struct nk_command header;\n    unsigned short line_thickness;\n    struct nk_vec2i begin;\n    struct nk_vec2i end;\n    struct nk_vec2i ctrl[2];\n    struct nk_color color;\n};\n\nstruct nk_command_rect {\n    struct nk_command header;\n    unsigned short rounding;\n    unsigned short line_thickness;\n    short x, y;\n    unsigned short w, h;\n    struct nk_color color;\n};\n\nstruct nk_command_rect_filled {\n    struct nk_command header;\n    unsigned short rounding;\n    short x, y;\n    unsigned short w, h;\n    struct nk_color color;\n};\n\nstruct nk_command_rect_multi_color {\n    struct nk_command header;\n    short x, y;\n    unsigned short w, h;\n    struct nk_color left;\n    struct nk_color top;\n    struct nk_color bottom;\n    struct nk_color right;\n};\n\nstruct nk_command_triangle {\n    struct nk_command header;\n    unsigned short line_thickness;\n    struct nk_vec2i a;\n    struct nk_vec2i b;\n    struct nk_vec2i c;\n    struct nk_color color;\n};\n\nstruct nk_command_triangle_filled {\n    struct nk_command header;\n    struct nk_vec2i a;\n    struct nk_vec2i b;\n    struct nk_vec2i c;\n    struct nk_color color;\n};\n\nstruct nk_command_circle {\n    struct nk_command header;\n    short x, y;\n    unsigned short line_thickness;\n    unsigned short w, h;\n    struct nk_color color;\n};\n\nstruct nk_command_circle_filled {\n    struct nk_command header;\n    short x, y;\n    unsigned short w, h;\n    struct nk_color color;\n};\n\nstruct nk_command_arc {\n    struct nk_command header;\n    short cx, cy;\n    unsigned short r;\n    unsigned short line_thickness;\n    float a[2];\n    struct nk_color color;\n};\n\nstruct nk_command_arc_filled {\n    struct nk_command header;\n    short cx, cy;\n    unsigned short r;\n    float a[2];\n    struct nk_color color;\n};\n\nstruct nk_command_polygon {\n    struct nk_command header;\n    struct nk_color color;\n    unsigned short line_thickness;\n    unsigned short point_count;\n    struct nk_vec2i points[1];\n};\n\nstruct nk_command_polygon_filled {\n    struct nk_command header;\n    struct nk_color color;\n    unsigned short point_count;\n    struct nk_vec2i points[1];\n};\n\nstruct nk_command_polyline {\n    struct nk_command header;\n    struct nk_color color;\n    unsigned short line_thickness;\n    unsigned short point_count;\n    struct nk_vec2i points[1];\n};\n\nstruct nk_command_image {\n    struct nk_command header;\n    short x, y;\n    unsigned short w, h;\n    struct nk_image img;\n    struct nk_color col;\n};\n\ntypedef void (*nk_command_custom_callback)(void *canvas, short x,short y,\n    unsigned short w, unsigned short h, nk_handle callback_data);\nstruct nk_command_custom {\n    struct nk_command header;\n    short x, y;\n    unsigned short w, h;\n    nk_handle callback_data;\n    nk_command_custom_callback callback;\n};\n\nstruct nk_command_text {\n    struct nk_command header;\n    const struct nk_user_font *font;\n    struct nk_color background;\n    struct nk_color foreground;\n    short x, y;\n    unsigned short w, h;\n    float height;\n    int length;\n    char string[1];\n};\n\nenum nk_command_clipping {\n    NK_CLIPPING_OFF = nk_false,\n    NK_CLIPPING_ON = nk_true\n};\n\nstruct nk_command_buffer {\n    struct nk_buffer *base;\n    struct nk_rect clip;\n    int use_clipping;\n    nk_handle userdata;\n    nk_size begin, end, last;\n};\n\n/* shape outlines */\nNK_API void nk_stroke_line(struct nk_command_buffer *b, float x0, float y0, float x1, float y1, float line_thickness, struct nk_color);\nNK_API void nk_stroke_curve(struct nk_command_buffer*, float, float, float, float, float, float, float, float, float line_thickness, struct nk_color);\nNK_API void nk_stroke_rect(struct nk_command_buffer*, struct nk_rect, float rounding, float line_thickness, struct nk_color);\nNK_API void nk_stroke_circle(struct nk_command_buffer*, struct nk_rect, float line_thickness, struct nk_color);\nNK_API void nk_stroke_arc(struct nk_command_buffer*, float cx, float cy, float radius, float a_min, float a_max, float line_thickness, struct nk_color);\nNK_API void nk_stroke_triangle(struct nk_command_buffer*, float, float, float, float, float, float, float line_thichness, struct nk_color);\nNK_API void nk_stroke_polyline(struct nk_command_buffer*, float *points, int point_count, float line_thickness, struct nk_color col);\nNK_API void nk_stroke_polygon(struct nk_command_buffer*, float*, int point_count, float line_thickness, struct nk_color);\n\n/* filled shades */\nNK_API void nk_fill_rect(struct nk_command_buffer*, struct nk_rect, float rounding, struct nk_color);\nNK_API void nk_fill_rect_multi_color(struct nk_command_buffer*, struct nk_rect, struct nk_color left, struct nk_color top, struct nk_color right, struct nk_color bottom);\nNK_API void nk_fill_circle(struct nk_command_buffer*, struct nk_rect, struct nk_color);\nNK_API void nk_fill_arc(struct nk_command_buffer*, float cx, float cy, float radius, float a_min, float a_max, struct nk_color);\nNK_API void nk_fill_triangle(struct nk_command_buffer*, float x0, float y0, float x1, float y1, float x2, float y2, struct nk_color);\nNK_API void nk_fill_polygon(struct nk_command_buffer*, float*, int point_count, struct nk_color);\n\n/* misc */\nNK_API void nk_draw_image(struct nk_command_buffer*, struct nk_rect, const struct nk_image*, struct nk_color);\nNK_API void nk_draw_text(struct nk_command_buffer*, struct nk_rect, const char *text, int len, const struct nk_user_font*, struct nk_color, struct nk_color);\nNK_API void nk_push_scissor(struct nk_command_buffer*, struct nk_rect);\nNK_API void nk_push_custom(struct nk_command_buffer*, struct nk_rect, nk_command_custom_callback, nk_handle usr);\n\n/* ===============================================================\n *\n *                          INPUT\n *\n * ===============================================================*/\nstruct nk_mouse_button {\n    int down;\n    unsigned int clicked;\n    struct nk_vec2 clicked_pos;\n};\nstruct nk_mouse {\n    struct nk_mouse_button buttons[NK_BUTTON_MAX];\n    struct nk_vec2 pos;\n    struct nk_vec2 prev;\n    struct nk_vec2 delta;\n    struct nk_vec2 scroll_delta;\n    unsigned char grab;\n    unsigned char grabbed;\n    unsigned char ungrab;\n};\n\nstruct nk_key {\n    int down;\n    unsigned int clicked;\n};\nstruct nk_keyboard {\n    struct nk_key keys[NK_KEY_MAX];\n    char text[NK_INPUT_MAX];\n    int text_len;\n};\n\nstruct nk_input {\n    struct nk_keyboard keyboard;\n    struct nk_mouse mouse;\n};\n\nNK_API int nk_input_has_mouse_click(const struct nk_input*, enum nk_buttons);\nNK_API int nk_input_has_mouse_click_in_rect(const struct nk_input*, enum nk_buttons, struct nk_rect);\nNK_API int nk_input_has_mouse_click_down_in_rect(const struct nk_input*, enum nk_buttons, struct nk_rect, int down);\nNK_API int nk_input_is_mouse_click_in_rect(const struct nk_input*, enum nk_buttons, struct nk_rect);\nNK_API int nk_input_is_mouse_click_down_in_rect(const struct nk_input *i, enum nk_buttons id, struct nk_rect b, int down);\nNK_API int nk_input_any_mouse_click_in_rect(const struct nk_input*, struct nk_rect);\nNK_API int nk_input_is_mouse_prev_hovering_rect(const struct nk_input*, struct nk_rect);\nNK_API int nk_input_is_mouse_hovering_rect(const struct nk_input*, struct nk_rect);\nNK_API int nk_input_mouse_clicked(const struct nk_input*, enum nk_buttons, struct nk_rect);\nNK_API int nk_input_is_mouse_down(const struct nk_input*, enum nk_buttons);\nNK_API int nk_input_is_mouse_pressed(const struct nk_input*, enum nk_buttons);\nNK_API int nk_input_is_mouse_released(const struct nk_input*, enum nk_buttons);\nNK_API int nk_input_is_key_pressed(const struct nk_input*, enum nk_keys);\nNK_API int nk_input_is_key_released(const struct nk_input*, enum nk_keys);\nNK_API int nk_input_is_key_down(const struct nk_input*, enum nk_keys);\n\n/* ===============================================================\n *\n *                          DRAW LIST\n *\n * ===============================================================*/\n#ifdef NK_INCLUDE_VERTEX_BUFFER_OUTPUT\n/*  The optional vertex buffer draw list provides a 2D drawing context\n    with antialiasing functionality which takes basic filled or outlined shapes\n    or a path and outputs vertexes, elements and draw commands.\n    The actual draw list API is not required to be used directly while using this\n    library since converting the default library draw command output is done by\n    just calling `nk_convert` but I decided to still make this library accessible\n    since it can be useful.\n\n    The draw list is based on a path buffering and polygon and polyline\n    rendering API which allows a lot of ways to draw 2D content to screen.\n    In fact it is probably more powerful than needed but allows even more crazy\n    things than this library provides by default.\n*/\ntypedef nk_ushort nk_draw_index;\nenum nk_draw_list_stroke {\n    NK_STROKE_OPEN = nk_false,\n    /* build up path has no connection back to the beginning */\n    NK_STROKE_CLOSED = nk_true\n    /* build up path has a connection back to the beginning */\n};\n\nenum nk_draw_vertex_layout_attribute {\n    NK_VERTEX_POSITION,\n    NK_VERTEX_COLOR,\n    NK_VERTEX_TEXCOORD,\n    NK_VERTEX_ATTRIBUTE_COUNT\n};\n\nenum nk_draw_vertex_layout_format {\n    NK_FORMAT_SCHAR,\n    NK_FORMAT_SSHORT,\n    NK_FORMAT_SINT,\n    NK_FORMAT_UCHAR,\n    NK_FORMAT_USHORT,\n    NK_FORMAT_UINT,\n    NK_FORMAT_FLOAT,\n    NK_FORMAT_DOUBLE,\n\nNK_FORMAT_COLOR_BEGIN,\n    NK_FORMAT_R8G8B8 = NK_FORMAT_COLOR_BEGIN,\n    NK_FORMAT_R16G15B16,\n    NK_FORMAT_R32G32B32,\n\n    NK_FORMAT_R8G8B8A8,\n    NK_FORMAT_B8G8R8A8,\n    NK_FORMAT_R16G15B16A16,\n    NK_FORMAT_R32G32B32A32,\n    NK_FORMAT_R32G32B32A32_FLOAT,\n    NK_FORMAT_R32G32B32A32_DOUBLE,\n\n    NK_FORMAT_RGB32,\n    NK_FORMAT_RGBA32,\nNK_FORMAT_COLOR_END = NK_FORMAT_RGBA32,\n    NK_FORMAT_COUNT\n};\n\n#define NK_VERTEX_LAYOUT_END NK_VERTEX_ATTRIBUTE_COUNT,NK_FORMAT_COUNT,0\nstruct nk_draw_vertex_layout_element {\n    enum nk_draw_vertex_layout_attribute attribute;\n    enum nk_draw_vertex_layout_format format;\n    nk_size offset;\n};\n\nstruct nk_draw_command {\n    unsigned int elem_count;\n    /* number of elements in the current draw batch */\n    struct nk_rect clip_rect;\n    /* current screen clipping rectangle */\n    nk_handle texture;\n    /* current texture to set */\n#ifdef NK_INCLUDE_COMMAND_USERDATA\n    nk_handle userdata;\n#endif\n};\n\nstruct nk_draw_list {\n    struct nk_rect clip_rect;\n    struct nk_vec2 circle_vtx[12];\n    struct nk_convert_config config;\n\n    struct nk_buffer *buffer;\n    struct nk_buffer *vertices;\n    struct nk_buffer *elements;\n\n    unsigned int element_count;\n    unsigned int vertex_count;\n    unsigned int cmd_count;\n    nk_size cmd_offset;\n\n    unsigned int path_count;\n    unsigned int path_offset;\n\n    enum nk_anti_aliasing line_AA;\n    enum nk_anti_aliasing shape_AA;\n\n#ifdef NK_INCLUDE_COMMAND_USERDATA\n    nk_handle userdata;\n#endif\n};\n\n/* draw list */\nNK_API void nk_draw_list_init(struct nk_draw_list*);\nNK_API void nk_draw_list_setup(struct nk_draw_list*, const struct nk_convert_config*, struct nk_buffer *cmds, struct nk_buffer *vertices, struct nk_buffer *elements, enum nk_anti_aliasing line_aa,enum nk_anti_aliasing shape_aa);\n\n/* drawing */\n#define nk_draw_list_foreach(cmd, can, b) for((cmd)=nk__draw_list_begin(can, b); (cmd)!=0; (cmd)=nk__draw_list_next(cmd, b, can))\nNK_API const struct nk_draw_command* nk__draw_list_begin(const struct nk_draw_list*, const struct nk_buffer*);\nNK_API const struct nk_draw_command* nk__draw_list_next(const struct nk_draw_command*, const struct nk_buffer*, const struct nk_draw_list*);\nNK_API const struct nk_draw_command* nk__draw_list_end(const struct nk_draw_list*, const struct nk_buffer*);\n\n/* path */\nNK_API void nk_draw_list_path_clear(struct nk_draw_list*);\nNK_API void nk_draw_list_path_line_to(struct nk_draw_list*, struct nk_vec2 pos);\nNK_API void nk_draw_list_path_arc_to_fast(struct nk_draw_list*, struct nk_vec2 center, float radius, int a_min, int a_max);\nNK_API void nk_draw_list_path_arc_to(struct nk_draw_list*, struct nk_vec2 center, float radius, float a_min, float a_max, unsigned int segments);\nNK_API void nk_draw_list_path_rect_to(struct nk_draw_list*, struct nk_vec2 a, struct nk_vec2 b, float rounding);\nNK_API void nk_draw_list_path_curve_to(struct nk_draw_list*, struct nk_vec2 p2, struct nk_vec2 p3, struct nk_vec2 p4, unsigned int num_segments);\nNK_API void nk_draw_list_path_fill(struct nk_draw_list*, struct nk_color);\nNK_API void nk_draw_list_path_stroke(struct nk_draw_list*, struct nk_color, enum nk_draw_list_stroke closed, float thickness);\n\n/* stroke */\nNK_API void nk_draw_list_stroke_line(struct nk_draw_list*, struct nk_vec2 a, struct nk_vec2 b, struct nk_color, float thickness);\nNK_API void nk_draw_list_stroke_rect(struct nk_draw_list*, struct nk_rect rect, struct nk_color, float rounding, float thickness);\nNK_API void nk_draw_list_stroke_triangle(struct nk_draw_list*, struct nk_vec2 a, struct nk_vec2 b, struct nk_vec2 c, struct nk_color, float thickness);\nNK_API void nk_draw_list_stroke_circle(struct nk_draw_list*, struct nk_vec2 center, float radius, struct nk_color, unsigned int segs, float thickness);\nNK_API void nk_draw_list_stroke_curve(struct nk_draw_list*, struct nk_vec2 p0, struct nk_vec2 cp0, struct nk_vec2 cp1, struct nk_vec2 p1, struct nk_color, unsigned int segments, float thickness);\nNK_API void nk_draw_list_stroke_poly_line(struct nk_draw_list*, const struct nk_vec2 *pnts, const unsigned int cnt, struct nk_color, enum nk_draw_list_stroke, float thickness, enum nk_anti_aliasing);\n\n/* fill */\nNK_API void nk_draw_list_fill_rect(struct nk_draw_list*, struct nk_rect rect, struct nk_color, float rounding);\nNK_API void nk_draw_list_fill_rect_multi_color(struct nk_draw_list*, struct nk_rect rect, struct nk_color left, struct nk_color top, struct nk_color right, struct nk_color bottom);\nNK_API void nk_draw_list_fill_triangle(struct nk_draw_list*, struct nk_vec2 a, struct nk_vec2 b, struct nk_vec2 c, struct nk_color);\nNK_API void nk_draw_list_fill_circle(struct nk_draw_list*, struct nk_vec2 center, float radius, struct nk_color col, unsigned int segs);\nNK_API void nk_draw_list_fill_poly_convex(struct nk_draw_list*, const struct nk_vec2 *points, const unsigned int count, struct nk_color, enum nk_anti_aliasing);\n\n/* misc */\nNK_API void nk_draw_list_add_image(struct nk_draw_list*, struct nk_image texture, struct nk_rect rect, struct nk_color);\nNK_API void nk_draw_list_add_text(struct nk_draw_list*, const struct nk_user_font*, struct nk_rect, const char *text, int len, float font_height, struct nk_color);\n#ifdef NK_INCLUDE_COMMAND_USERDATA\nNK_API void nk_draw_list_push_userdata(struct nk_draw_list*, nk_handle userdata);\n#endif\n\n#endif\n\n/* ===============================================================\n *\n *                          GUI\n *\n * ===============================================================*/\nenum nk_style_item_type {\n    NK_STYLE_ITEM_COLOR,\n    NK_STYLE_ITEM_IMAGE\n};\n\nunion nk_style_item_data {\n    struct nk_image image;\n    struct nk_color color;\n};\n\nstruct nk_style_item {\n    enum nk_style_item_type type;\n    union nk_style_item_data data;\n};\n\nstruct nk_style_text {\n    struct nk_color color;\n    struct nk_vec2 padding;\n};\n\nstruct nk_style_button {\n    /* background */\n    struct nk_style_item normal;\n    struct nk_style_item hover;\n    struct nk_style_item active;\n    struct nk_color border_color;\n\n    /* text */\n    struct nk_color text_background;\n    struct nk_color text_normal;\n    struct nk_color text_hover;\n    struct nk_color text_active;\n    nk_flags text_alignment;\n\n    /* properties */\n    float border;\n    float rounding;\n    struct nk_vec2 padding;\n    struct nk_vec2 image_padding;\n    struct nk_vec2 touch_padding;\n\n    /* optional user callbacks */\n    nk_handle userdata;\n    void(*draw_begin)(struct nk_command_buffer*, nk_handle userdata);\n    void(*draw_end)(struct nk_command_buffer*, nk_handle userdata);\n};\n\nstruct nk_style_toggle {\n    /* background */\n    struct nk_style_item normal;\n    struct nk_style_item hover;\n    struct nk_style_item active;\n    struct nk_color border_color;\n\n    /* cursor */\n    struct nk_style_item cursor_normal;\n    struct nk_style_item cursor_hover;\n\n    /* text */\n    struct nk_color text_normal;\n    struct nk_color text_hover;\n    struct nk_color text_active;\n    struct nk_color text_background;\n    nk_flags text_alignment;\n\n    /* properties */\n    struct nk_vec2 padding;\n    struct nk_vec2 touch_padding;\n    float spacing;\n    float border;\n\n    /* optional user callbacks */\n    nk_handle userdata;\n    void(*draw_begin)(struct nk_command_buffer*, nk_handle);\n    void(*draw_end)(struct nk_command_buffer*, nk_handle);\n};\n\nstruct nk_style_selectable {\n    /* background (inactive) */\n    struct nk_style_item normal;\n    struct nk_style_item hover;\n    struct nk_style_item pressed;\n\n    /* background (active) */\n    struct nk_style_item normal_active;\n    struct nk_style_item hover_active;\n    struct nk_style_item pressed_active;\n\n    /* text color (inactive) */\n    struct nk_color text_normal;\n    struct nk_color text_hover;\n    struct nk_color text_pressed;\n\n    /* text color (active) */\n    struct nk_color text_normal_active;\n    struct nk_color text_hover_active;\n    struct nk_color text_pressed_active;\n    struct nk_color text_background;\n    nk_flags text_alignment;\n\n    /* properties */\n    float rounding;\n    struct nk_vec2 padding;\n    struct nk_vec2 touch_padding;\n    struct nk_vec2 image_padding;\n\n    /* optional user callbacks */\n    nk_handle userdata;\n    void(*draw_begin)(struct nk_command_buffer*, nk_handle);\n    void(*draw_end)(struct nk_command_buffer*, nk_handle);\n};\n\nstruct nk_style_slider {\n    /* background */\n    struct nk_style_item normal;\n    struct nk_style_item hover;\n    struct nk_style_item active;\n    struct nk_color border_color;\n\n    /* background bar */\n    struct nk_color bar_normal;\n    struct nk_color bar_hover;\n    struct nk_color bar_active;\n    struct nk_color bar_filled;\n\n    /* cursor */\n    struct nk_style_item cursor_normal;\n    struct nk_style_item cursor_hover;\n    struct nk_style_item cursor_active;\n\n    /* properties */\n    float border;\n    float rounding;\n    float bar_height;\n    struct nk_vec2 padding;\n    struct nk_vec2 spacing;\n    struct nk_vec2 cursor_size;\n\n    /* optional buttons */\n    int show_buttons;\n    struct nk_style_button inc_button;\n    struct nk_style_button dec_button;\n    enum nk_symbol_type inc_symbol;\n    enum nk_symbol_type dec_symbol;\n\n    /* optional user callbacks */\n    nk_handle userdata;\n    void(*draw_begin)(struct nk_command_buffer*, nk_handle);\n    void(*draw_end)(struct nk_command_buffer*, nk_handle);\n};\n\nstruct nk_style_progress {\n    /* background */\n    struct nk_style_item normal;\n    struct nk_style_item hover;\n    struct nk_style_item active;\n    struct nk_color border_color;\n\n    /* cursor */\n    struct nk_style_item cursor_normal;\n    struct nk_style_item cursor_hover;\n    struct nk_style_item cursor_active;\n    struct nk_color cursor_border_color;\n\n    /* properties */\n    float rounding;\n    float border;\n    float cursor_border;\n    float cursor_rounding;\n    struct nk_vec2 padding;\n\n    /* optional user callbacks */\n    nk_handle userdata;\n    void(*draw_begin)(struct nk_command_buffer*, nk_handle);\n    void(*draw_end)(struct nk_command_buffer*, nk_handle);\n};\n\nstruct nk_style_scrollbar {\n    /* background */\n    struct nk_style_item normal;\n    struct nk_style_item hover;\n    struct nk_style_item active;\n    struct nk_color border_color;\n\n    /* cursor */\n    struct nk_style_item cursor_normal;\n    struct nk_style_item cursor_hover;\n    struct nk_style_item cursor_active;\n    struct nk_color cursor_border_color;\n\n    /* properties */\n    float border;\n    float rounding;\n    float border_cursor;\n    float rounding_cursor;\n    struct nk_vec2 padding;\n\n    /* optional buttons */\n    int show_buttons;\n    struct nk_style_button inc_button;\n    struct nk_style_button dec_button;\n    enum nk_symbol_type inc_symbol;\n    enum nk_symbol_type dec_symbol;\n\n    /* optional user callbacks */\n    nk_handle userdata;\n    void(*draw_begin)(struct nk_command_buffer*, nk_handle);\n    void(*draw_end)(struct nk_command_buffer*, nk_handle);\n};\n\nstruct nk_style_edit {\n    /* background */\n    struct nk_style_item normal;\n    struct nk_style_item hover;\n    struct nk_style_item active;\n    struct nk_color border_color;\n    struct nk_style_scrollbar scrollbar;\n\n    /* cursor  */\n    struct nk_color cursor_normal;\n    struct nk_color cursor_hover;\n    struct nk_color cursor_text_normal;\n    struct nk_color cursor_text_hover;\n\n    /* text (unselected) */\n    struct nk_color text_normal;\n    struct nk_color text_hover;\n    struct nk_color text_active;\n\n    /* text (selected) */\n    struct nk_color selected_normal;\n    struct nk_color selected_hover;\n    struct nk_color selected_text_normal;\n    struct nk_color selected_text_hover;\n\n    /* properties */\n    float border;\n    float rounding;\n    float cursor_size;\n    struct nk_vec2 scrollbar_size;\n    struct nk_vec2 padding;\n    float row_padding;\n};\n\nstruct nk_style_property {\n    /* background */\n    struct nk_style_item normal;\n    struct nk_style_item hover;\n    struct nk_style_item active;\n    struct nk_color border_color;\n\n    /* text */\n    struct nk_color label_normal;\n    struct nk_color label_hover;\n    struct nk_color label_active;\n\n    /* symbols */\n    enum nk_symbol_type sym_left;\n    enum nk_symbol_type sym_right;\n\n    /* properties */\n    float border;\n    float rounding;\n    struct nk_vec2 padding;\n\n    struct nk_style_edit edit;\n    struct nk_style_button inc_button;\n    struct nk_style_button dec_button;\n\n    /* optional user callbacks */\n    nk_handle userdata;\n    void(*draw_begin)(struct nk_command_buffer*, nk_handle);\n    void(*draw_end)(struct nk_command_buffer*, nk_handle);\n};\n\nstruct nk_style_chart {\n    /* colors */\n    struct nk_style_item background;\n    struct nk_color border_color;\n    struct nk_color selected_color;\n    struct nk_color color;\n\n    /* properties */\n    float border;\n    float rounding;\n    struct nk_vec2 padding;\n};\n\nstruct nk_style_combo {\n    /* background */\n    struct nk_style_item normal;\n    struct nk_style_item hover;\n    struct nk_style_item active;\n    struct nk_color border_color;\n\n    /* label */\n    struct nk_color label_normal;\n    struct nk_color label_hover;\n    struct nk_color label_active;\n\n    /* symbol */\n    struct nk_color symbol_normal;\n    struct nk_color symbol_hover;\n    struct nk_color symbol_active;\n\n    /* button */\n    struct nk_style_button button;\n    enum nk_symbol_type sym_normal;\n    enum nk_symbol_type sym_hover;\n    enum nk_symbol_type sym_active;\n\n    /* properties */\n    float border;\n    float rounding;\n    struct nk_vec2 content_padding;\n    struct nk_vec2 button_padding;\n    struct nk_vec2 spacing;\n};\n\nstruct nk_style_tab {\n    /* background */\n    struct nk_style_item background;\n    struct nk_color border_color;\n    struct nk_color text;\n\n    /* button */\n    struct nk_style_button tab_maximize_button;\n    struct nk_style_button tab_minimize_button;\n    struct nk_style_button node_maximize_button;\n    struct nk_style_button node_minimize_button;\n    enum nk_symbol_type sym_minimize;\n    enum nk_symbol_type sym_maximize;\n\n    /* properties */\n    float border;\n    float rounding;\n    float indent;\n    struct nk_vec2 padding;\n    struct nk_vec2 spacing;\n};\n\nenum nk_style_header_align {\n    NK_HEADER_LEFT,\n    NK_HEADER_RIGHT\n};\nstruct nk_style_window_header {\n    /* background */\n    struct nk_style_item normal;\n    struct nk_style_item hover;\n    struct nk_style_item active;\n\n    /* button */\n    struct nk_style_button close_button;\n    struct nk_style_button minimize_button;\n    enum nk_symbol_type close_symbol;\n    enum nk_symbol_type minimize_symbol;\n    enum nk_symbol_type maximize_symbol;\n\n    /* title */\n    struct nk_color label_normal;\n    struct nk_color label_hover;\n    struct nk_color label_active;\n\n    /* properties */\n    enum nk_style_header_align align;\n    struct nk_vec2 padding;\n    struct nk_vec2 label_padding;\n    struct nk_vec2 spacing;\n};\n\nstruct nk_style_window {\n    struct nk_style_window_header header;\n    struct nk_style_item fixed_background;\n    struct nk_color background;\n\n    struct nk_color border_color;\n    struct nk_color popup_border_color;\n    struct nk_color combo_border_color;\n    struct nk_color contextual_border_color;\n    struct nk_color menu_border_color;\n    struct nk_color group_border_color;\n    struct nk_color tooltip_border_color;\n    struct nk_style_item scaler;\n\n    float border;\n    float combo_border;\n    float contextual_border;\n    float menu_border;\n    float group_border;\n    float tooltip_border;\n    float popup_border;\n    float min_row_height_padding;\n\n    float rounding;\n    struct nk_vec2 spacing;\n    struct nk_vec2 scrollbar_size;\n    struct nk_vec2 min_size;\n\n    struct nk_vec2 padding;\n    struct nk_vec2 group_padding;\n    struct nk_vec2 popup_padding;\n    struct nk_vec2 combo_padding;\n    struct nk_vec2 contextual_padding;\n    struct nk_vec2 menu_padding;\n    struct nk_vec2 tooltip_padding;\n};\n\nstruct nk_style {\n    const struct nk_user_font *font;\n    const struct nk_cursor *cursors[NK_CURSOR_COUNT];\n    const struct nk_cursor *cursor_active;\n    struct nk_cursor *cursor_last;\n    int cursor_visible;\n\n    struct nk_style_text text;\n    struct nk_style_button button;\n    struct nk_style_button contextual_button;\n    struct nk_style_button menu_button;\n    struct nk_style_toggle option;\n    struct nk_style_toggle checkbox;\n    struct nk_style_selectable selectable;\n    struct nk_style_slider slider;\n    struct nk_style_progress progress;\n    struct nk_style_property property;\n    struct nk_style_edit edit;\n    struct nk_style_chart chart;\n    struct nk_style_scrollbar scrollh;\n    struct nk_style_scrollbar scrollv;\n    struct nk_style_tab tab;\n    struct nk_style_combo combo;\n    struct nk_style_window window;\n};\n\nNK_API struct nk_style_item nk_style_item_image(struct nk_image img);\nNK_API struct nk_style_item nk_style_item_color(struct nk_color);\nNK_API struct nk_style_item nk_style_item_hide(void);\n\n/*==============================================================\n *                          PANEL\n * =============================================================*/\n#ifndef NK_MAX_LAYOUT_ROW_TEMPLATE_COLUMNS\n#define NK_MAX_LAYOUT_ROW_TEMPLATE_COLUMNS 16\n#endif\n#ifndef NK_CHART_MAX_SLOT\n#define NK_CHART_MAX_SLOT 4\n#endif\n\nenum nk_panel_type {\n    NK_PANEL_NONE       = 0,\n    NK_PANEL_WINDOW     = NK_FLAG(0),\n    NK_PANEL_GROUP      = NK_FLAG(1),\n    NK_PANEL_POPUP      = NK_FLAG(2),\n    NK_PANEL_CONTEXTUAL = NK_FLAG(4),\n    NK_PANEL_COMBO      = NK_FLAG(5),\n    NK_PANEL_MENU       = NK_FLAG(6),\n    NK_PANEL_TOOLTIP    = NK_FLAG(7)\n};\nenum nk_panel_set {\n    NK_PANEL_SET_NONBLOCK = NK_PANEL_CONTEXTUAL|NK_PANEL_COMBO|NK_PANEL_MENU|NK_PANEL_TOOLTIP,\n    NK_PANEL_SET_POPUP = NK_PANEL_SET_NONBLOCK|NK_PANEL_POPUP,\n    NK_PANEL_SET_SUB = NK_PANEL_SET_POPUP|NK_PANEL_GROUP\n};\n\nstruct nk_chart_slot {\n    enum nk_chart_type type;\n    struct nk_color color;\n    struct nk_color highlight;\n    float min, max, range;\n    int count;\n    struct nk_vec2 last;\n    int index;\n};\n\nstruct nk_chart {\n    int slot;\n    float x, y, w, h;\n    struct nk_chart_slot slots[NK_CHART_MAX_SLOT];\n};\n\nenum nk_panel_row_layout_type {\n    NK_LAYOUT_DYNAMIC_FIXED = 0,\n    NK_LAYOUT_DYNAMIC_ROW,\n    NK_LAYOUT_DYNAMIC_FREE,\n    NK_LAYOUT_DYNAMIC,\n    NK_LAYOUT_STATIC_FIXED,\n    NK_LAYOUT_STATIC_ROW,\n    NK_LAYOUT_STATIC_FREE,\n    NK_LAYOUT_STATIC,\n    NK_LAYOUT_TEMPLATE,\n    NK_LAYOUT_COUNT\n};\nstruct nk_row_layout {\n    enum nk_panel_row_layout_type type;\n    int index;\n    float height;\n    float min_height;\n    int columns;\n    const float *ratio;\n    float item_width;\n    float item_height;\n    float item_offset;\n    float filled;\n    struct nk_rect item;\n    int tree_depth;\n    float templates[NK_MAX_LAYOUT_ROW_TEMPLATE_COLUMNS];\n};\n\nstruct nk_popup_buffer {\n    nk_size begin;\n    nk_size parent;\n    nk_size last;\n    nk_size end;\n    int active;\n};\n\nstruct nk_menu_state {\n    float x, y, w, h;\n    struct nk_scroll offset;\n};\n\nstruct nk_panel {\n    enum nk_panel_type type;\n    nk_flags flags;\n    struct nk_rect bounds;\n    nk_uint *offset_x;\n    nk_uint *offset_y;\n    float at_x, at_y, max_x;\n    float footer_height;\n    float header_height;\n    float border;\n    unsigned int has_scrolling;\n    struct nk_rect clip;\n    struct nk_menu_state menu;\n    struct nk_row_layout row;\n    struct nk_chart chart;\n    struct nk_command_buffer *buffer;\n    struct nk_panel *parent;\n};\n\n/*==============================================================\n *                          WINDOW\n * =============================================================*/\n#ifndef NK_WINDOW_MAX_NAME\n#define NK_WINDOW_MAX_NAME 64\n#endif\n\nstruct nk_table;\nenum nk_window_flags {\n    NK_WINDOW_PRIVATE       = NK_FLAG(11),\n    NK_WINDOW_DYNAMIC       = NK_WINDOW_PRIVATE,\n    /* special window type growing up in height while being filled to a certain maximum height */\n    NK_WINDOW_ROM           = NK_FLAG(12),\n    /* sets window widgets into a read only mode and does not allow input changes */\n    NK_WINDOW_NOT_INTERACTIVE = NK_WINDOW_ROM|NK_WINDOW_NO_INPUT,\n    /* prevents all interaction caused by input to either window or widgets inside */\n    NK_WINDOW_HIDDEN        = NK_FLAG(13),\n    /* Hides window and stops any window interaction and drawing */\n    NK_WINDOW_CLOSED        = NK_FLAG(14),\n    /* Directly closes and frees the window at the end of the frame */\n    NK_WINDOW_MINIMIZED     = NK_FLAG(15),\n    /* marks the window as minimized */\n    NK_WINDOW_REMOVE_ROM    = NK_FLAG(16)\n    /* Removes read only mode at the end of the window */\n};\n\nstruct nk_popup_state {\n    struct nk_window *win;\n    enum nk_panel_type type;\n    struct nk_popup_buffer buf;\n    nk_hash name;\n    int active;\n    unsigned combo_count;\n    unsigned con_count, con_old;\n    unsigned active_con;\n    struct nk_rect header;\n};\n\nstruct nk_edit_state {\n    nk_hash name;\n    unsigned int seq;\n    unsigned int old;\n    int active, prev;\n    int cursor;\n    int sel_start;\n    int sel_end;\n    struct nk_scroll scrollbar;\n    unsigned char mode;\n    unsigned char single_line;\n};\n\nstruct nk_property_state {\n    int active, prev;\n    char buffer[NK_MAX_NUMBER_BUFFER];\n    int length;\n    int cursor;\n    int select_start;\n    int select_end;\n    nk_hash name;\n    unsigned int seq;\n    unsigned int old;\n    int state;\n};\n\nstruct nk_window {\n    unsigned int seq;\n    nk_hash name;\n    char name_string[NK_WINDOW_MAX_NAME];\n    nk_flags flags;\n\n    struct nk_rect bounds;\n    struct nk_scroll scrollbar;\n    struct nk_command_buffer buffer;\n    struct nk_panel *layout;\n    float scrollbar_hiding_timer;\n\n    /* persistent widget state */\n    struct nk_property_state property;\n    struct nk_popup_state popup;\n    struct nk_edit_state edit;\n    unsigned int scrolled;\n\n    struct nk_table *tables;\n    unsigned int table_count;\n\n    /* window list hooks */\n    struct nk_window *next;\n    struct nk_window *prev;\n    struct nk_window *parent;\n};\n\n/*==============================================================\n *                          STACK\n * =============================================================*/\n/* The style modifier stack can be used to temporarily change a\n * property inside `nk_style`. For example if you want a special\n * red button you can temporarily push the old button color onto a stack\n * draw the button with a red color and then you just pop the old color\n * back from the stack:\n *\n *      nk_style_push_style_item(ctx, &ctx->style.button.normal, nk_style_item_color(nk_rgb(255,0,0)));\n *      nk_style_push_style_item(ctx, &ctx->style.button.hover, nk_style_item_color(nk_rgb(255,0,0)));\n *      nk_style_push_style_item(ctx, &ctx->style.button.active, nk_style_item_color(nk_rgb(255,0,0)));\n *      nk_style_push_vec2(ctx, &cx->style.button.padding, nk_vec2(2,2));\n *\n *      nk_button(...);\n *\n *      nk_style_pop_style_item(ctx);\n *      nk_style_pop_style_item(ctx);\n *      nk_style_pop_style_item(ctx);\n *      nk_style_pop_vec2(ctx);\n *\n * Nuklear has a stack for style_items, float properties, vector properties,\n * flags, colors, fonts and for button_behavior. Each has it's own fixed size stack\n * which can be changed at compile time.\n */\n#ifndef NK_BUTTON_BEHAVIOR_STACK_SIZE\n#define NK_BUTTON_BEHAVIOR_STACK_SIZE 8\n#endif\n\n#ifndef NK_FONT_STACK_SIZE\n#define NK_FONT_STACK_SIZE 8\n#endif\n\n#ifndef NK_STYLE_ITEM_STACK_SIZE\n#define NK_STYLE_ITEM_STACK_SIZE 16\n#endif\n\n#ifndef NK_FLOAT_STACK_SIZE\n#define NK_FLOAT_STACK_SIZE 32\n#endif\n\n#ifndef NK_VECTOR_STACK_SIZE\n#define NK_VECTOR_STACK_SIZE 16\n#endif\n\n#ifndef NK_FLAGS_STACK_SIZE\n#define NK_FLAGS_STACK_SIZE 32\n#endif\n\n#ifndef NK_COLOR_STACK_SIZE\n#define NK_COLOR_STACK_SIZE 32\n#endif\n\n#define NK_CONFIGURATION_STACK_TYPE(prefix, name, type)\\\n    struct nk_config_stack_##name##_element {\\\n        prefix##_##type *address;\\\n        prefix##_##type old_value;\\\n    }\n#define NK_CONFIG_STACK(type,size)\\\n    struct nk_config_stack_##type {\\\n        int head;\\\n        struct nk_config_stack_##type##_element elements[size];\\\n    }\n\n#define nk_float float\nNK_CONFIGURATION_STACK_TYPE(struct nk, style_item, style_item);\nNK_CONFIGURATION_STACK_TYPE(nk ,float, float);\nNK_CONFIGURATION_STACK_TYPE(struct nk, vec2, vec2);\nNK_CONFIGURATION_STACK_TYPE(nk ,flags, flags);\nNK_CONFIGURATION_STACK_TYPE(struct nk, color, color);\nNK_CONFIGURATION_STACK_TYPE(const struct nk, user_font, user_font*);\nNK_CONFIGURATION_STACK_TYPE(enum nk, button_behavior, button_behavior);\n\nNK_CONFIG_STACK(style_item, NK_STYLE_ITEM_STACK_SIZE);\nNK_CONFIG_STACK(float, NK_FLOAT_STACK_SIZE);\nNK_CONFIG_STACK(vec2, NK_VECTOR_STACK_SIZE);\nNK_CONFIG_STACK(flags, NK_FLAGS_STACK_SIZE);\nNK_CONFIG_STACK(color, NK_COLOR_STACK_SIZE);\nNK_CONFIG_STACK(user_font, NK_FONT_STACK_SIZE);\nNK_CONFIG_STACK(button_behavior, NK_BUTTON_BEHAVIOR_STACK_SIZE);\n\nstruct nk_configuration_stacks {\n    struct nk_config_stack_style_item style_items;\n    struct nk_config_stack_float floats;\n    struct nk_config_stack_vec2 vectors;\n    struct nk_config_stack_flags flags;\n    struct nk_config_stack_color colors;\n    struct nk_config_stack_user_font fonts;\n    struct nk_config_stack_button_behavior button_behaviors;\n};\n\n/*==============================================================\n *                          CONTEXT\n * =============================================================*/\n#define NK_VALUE_PAGE_CAPACITY \\\n    (((NK_MAX(sizeof(struct nk_window),sizeof(struct nk_panel)) / sizeof(nk_uint))) / 2)\n\nstruct nk_table {\n    unsigned int seq;\n    unsigned int size;\n    nk_hash keys[NK_VALUE_PAGE_CAPACITY];\n    nk_uint values[NK_VALUE_PAGE_CAPACITY];\n    struct nk_table *next, *prev;\n};\n\nunion nk_page_data {\n    struct nk_table tbl;\n    struct nk_panel pan;\n    struct nk_window win;\n};\n\nstruct nk_page_element {\n    union nk_page_data data;\n    struct nk_page_element *next;\n    struct nk_page_element *prev;\n};\n\nstruct nk_page {\n    unsigned int size;\n    struct nk_page *next;\n    struct nk_page_element win[1];\n};\n\nstruct nk_pool {\n    struct nk_allocator alloc;\n    enum nk_allocation_type type;\n    unsigned int page_count;\n    struct nk_page *pages;\n    struct nk_page_element *freelist;\n    unsigned capacity;\n    nk_size size;\n    nk_size cap;\n};\n\nstruct nk_context {\n/* public: can be accessed freely */\n    struct nk_input input;\n    struct nk_style style;\n    struct nk_buffer memory;\n    struct nk_clipboard clip;\n    nk_flags last_widget_state;\n    enum nk_button_behavior button_behavior;\n    struct nk_configuration_stacks stacks;\n    float delta_time_seconds;\n\n/* private:\n    should only be accessed if you\n    know what you are doing */\n#ifdef NK_INCLUDE_VERTEX_BUFFER_OUTPUT\n    struct nk_draw_list draw_list;\n#endif\n#ifdef NK_INCLUDE_COMMAND_USERDATA\n    nk_handle userdata;\n#endif\n    /* text editor objects are quite big because of an internal\n     * undo/redo stack. Therefore it does not make sense to have one for\n     * each window for temporary use cases, so I only provide *one* instance\n     * for all windows. This works because the content is cleared anyway */\n    struct nk_text_edit text_edit;\n    /* draw buffer used for overlay drawing operation like cursor */\n    struct nk_command_buffer overlay;\n\n    /* windows */\n    int build;\n    int use_pool;\n    struct nk_pool pool;\n    struct nk_window *begin;\n    struct nk_window *end;\n    struct nk_window *active;\n    struct nk_window *current;\n    struct nk_page_element *freelist;\n    unsigned int count;\n    unsigned int seq;\n};\n\n/* ==============================================================\n *                          MATH\n * =============================================================== */\n#define NK_PI 3.141592654f\n#define NK_UTF_INVALID 0xFFFD\n#define NK_MAX_FLOAT_PRECISION 2\n\n#define NK_UNUSED(x) ((void)(x))\n#define NK_SATURATE(x) (NK_MAX(0, NK_MIN(1.0f, x)))\n#define NK_LEN(a) (sizeof(a)/sizeof(a)[0])\n#define NK_ABS(a) (((a) < 0) ? -(a) : (a))\n#define NK_BETWEEN(x, a, b) ((a) <= (x) && (x) < (b))\n#define NK_INBOX(px, py, x, y, w, h)\\\n    (NK_BETWEEN(px,x,x+w) && NK_BETWEEN(py,y,y+h))\n#define NK_INTERSECT(x0, y0, w0, h0, x1, y1, w1, h1) \\\n    (!(((x1 > (x0 + w0)) || ((x1 + w1) < x0) || (y1 > (y0 + h0)) || (y1 + h1) < y0)))\n#define NK_CONTAINS(x, y, w, h, bx, by, bw, bh)\\\n    (NK_INBOX(x,y, bx, by, bw, bh) && NK_INBOX(x+w,y+h, bx, by, bw, bh))\n\n#define nk_vec2_sub(a, b) nk_vec2((a).x - (b).x, (a).y - (b).y)\n#define nk_vec2_add(a, b) nk_vec2((a).x + (b).x, (a).y + (b).y)\n#define nk_vec2_len_sqr(a) ((a).x*(a).x+(a).y*(a).y)\n#define nk_vec2_muls(a, t) nk_vec2((a).x * (t), (a).y * (t))\n\n#define nk_ptr_add(t, p, i) ((t*)((void*)((nk_byte*)(p) + (i))))\n#define nk_ptr_add_const(t, p, i) ((const t*)((const void*)((const nk_byte*)(p) + (i))))\n#define nk_zero_struct(s) nk_zero(&s, sizeof(s))\n\n/* ==============================================================\n *                          ALIGNMENT\n * =============================================================== */\n/* Pointer to Integer type conversion for pointer alignment */\n#if defined(__PTRDIFF_TYPE__) /* This case should work for GCC*/\n# define NK_UINT_TO_PTR(x) ((void*)(__PTRDIFF_TYPE__)(x))\n# define NK_PTR_TO_UINT(x) ((nk_size)(__PTRDIFF_TYPE__)(x))\n#elif !defined(__GNUC__) /* works for compilers other than LLVM */\n# define NK_UINT_TO_PTR(x) ((void*)&((char*)0)[x])\n# define NK_PTR_TO_UINT(x) ((nk_size)(((char*)x)-(char*)0))\n#elif defined(NK_USE_FIXED_TYPES) /* used if we have <stdint.h> */\n# define NK_UINT_TO_PTR(x) ((void*)(uintptr_t)(x))\n# define NK_PTR_TO_UINT(x) ((uintptr_t)(x))\n#else /* generates warning but works */\n# define NK_UINT_TO_PTR(x) ((void*)(x))\n# define NK_PTR_TO_UINT(x) ((nk_size)(x))\n#endif\n\n#define NK_ALIGN_PTR(x, mask)\\\n    (NK_UINT_TO_PTR((NK_PTR_TO_UINT((nk_byte*)(x) + (mask-1)) & ~(mask-1))))\n#define NK_ALIGN_PTR_BACK(x, mask)\\\n    (NK_UINT_TO_PTR((NK_PTR_TO_UINT((nk_byte*)(x)) & ~(mask-1))))\n\n#define NK_OFFSETOF(st,m) ((nk_ptr)&(((st*)0)->m))\n#define NK_CONTAINER_OF(ptr,type,member)\\\n    (type*)((void*)((char*)(1 ? (ptr): &((type*)0)->member) - NK_OFFSETOF(type, member)))\n\n#ifdef __cplusplus\n}\n#endif\n\n#ifdef __cplusplus\ntemplate<typename T> struct nk_alignof;\ntemplate<typename T, int size_diff> struct nk_helper{enum {value = size_diff};};\ntemplate<typename T> struct nk_helper<T,0>{enum {value = nk_alignof<T>::value};};\ntemplate<typename T> struct nk_alignof{struct Big {T x; char c;}; enum {\n    diff = sizeof(Big) - sizeof(T), value = nk_helper<Big, diff>::value};};\n#define NK_ALIGNOF(t) (nk_alignof<t>::value)\n#elif defined(_MSC_VER)\n#define NK_ALIGNOF(t) (__alignof(t))\n#else\n#define NK_ALIGNOF(t) ((char*)(&((struct {char c; t _h;}*)0)->_h) - (char*)0)\n#endif\n\n#endif /* NK_NUKLEAR_H_ */\n\n\n#ifdef NK_IMPLEMENTATION\n\n#ifndef NK_INTERNAL_H\n#define NK_INTERNAL_H\n\n#ifndef NK_POOL_DEFAULT_CAPACITY\n#define NK_POOL_DEFAULT_CAPACITY 16\n#endif\n\n#ifndef NK_DEFAULT_COMMAND_BUFFER_SIZE\n#define NK_DEFAULT_COMMAND_BUFFER_SIZE (4*1024)\n#endif\n\n#ifndef NK_BUFFER_DEFAULT_INITIAL_SIZE\n#define NK_BUFFER_DEFAULT_INITIAL_SIZE (4*1024)\n#endif\n\n/* standard library headers */\n#ifdef NK_INCLUDE_DEFAULT_ALLOCATOR\n#include <stdlib.h> /* malloc, free */\n#endif\n#ifdef NK_INCLUDE_STANDARD_IO\n#include <stdio.h> /* fopen, fclose,... */\n#endif\n#ifndef NK_ASSERT\n#include <assert.h>\n#define NK_ASSERT(expr) assert(expr)\n#endif\n\n#ifndef NK_MEMSET\n#define NK_MEMSET nk_memset\n#endif\n#ifndef NK_MEMCPY\n#define NK_MEMCPY nk_memcopy\n#endif\n#ifndef NK_SQRT\n#define NK_SQRT nk_sqrt\n#endif\n#ifndef NK_SIN\n#define NK_SIN nk_sin\n#endif\n#ifndef NK_COS\n#define NK_COS nk_cos\n#endif\n#ifndef NK_STRTOD\n#define NK_STRTOD nk_strtod\n#endif\n#ifndef NK_DTOA\n#define NK_DTOA nk_dtoa\n#endif\n\n#define NK_DEFAULT (-1)\n\n#ifndef NK_VSNPRINTF\n/* If your compiler does support `vsnprintf` I would highly recommend\n * defining this to vsnprintf instead since `vsprintf` is basically\n * unbelievable unsafe and should *NEVER* be used. But I have to support\n * it since C89 only provides this unsafe version. */\n  #if (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)) ||\\\n      (defined(__cplusplus) && (__cplusplus >= 201103L)) || \\\n      (defined(_POSIX_C_SOURCE) && (_POSIX_C_SOURCE >= 200112L)) ||\\\n      (defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500)) ||\\\n       defined(_ISOC99_SOURCE) || defined(_BSD_SOURCE)\n      #define NK_VSNPRINTF(s,n,f,a) vsnprintf(s,n,f,a)\n  #else\n    #define NK_VSNPRINTF(s,n,f,a) vsprintf(s,f,a)\n  #endif\n#endif\n\n#define NK_SCHAR_MIN (-127)\n#define NK_SCHAR_MAX 127\n#define NK_UCHAR_MIN 0\n#define NK_UCHAR_MAX 256\n#define NK_SSHORT_MIN (-32767)\n#define NK_SSHORT_MAX 32767\n#define NK_USHORT_MIN 0\n#define NK_USHORT_MAX 65535\n#define NK_SINT_MIN (-2147483647)\n#define NK_SINT_MAX 2147483647\n#define NK_UINT_MIN 0\n#define NK_UINT_MAX 4294967295u\n\n/* Make sure correct type size:\n * This will fire with a negative subscript error if the type sizes\n * are set incorrectly by the compiler, and compile out if not */\nNK_STATIC_ASSERT(sizeof(nk_size) >= sizeof(void*));\nNK_STATIC_ASSERT(sizeof(nk_ptr) == sizeof(void*));\nNK_STATIC_ASSERT(sizeof(nk_flags) >= 4);\nNK_STATIC_ASSERT(sizeof(nk_rune) >= 4);\nNK_STATIC_ASSERT(sizeof(nk_ushort) == 2);\nNK_STATIC_ASSERT(sizeof(nk_short) == 2);\nNK_STATIC_ASSERT(sizeof(nk_uint) == 4);\nNK_STATIC_ASSERT(sizeof(nk_int) == 4);\nNK_STATIC_ASSERT(sizeof(nk_byte) == 1);\n\nNK_GLOBAL const struct nk_rect nk_null_rect = {-8192.0f, -8192.0f, 16384, 16384};\n#define NK_FLOAT_PRECISION 0.00000000000001\n\nNK_GLOBAL const struct nk_color nk_red = {255,0,0,255};\nNK_GLOBAL const struct nk_color nk_green = {0,255,0,255};\nNK_GLOBAL const struct nk_color nk_blue = {0,0,255,255};\nNK_GLOBAL const struct nk_color nk_white = {255,255,255,255};\nNK_GLOBAL const struct nk_color nk_black = {0,0,0,255};\nNK_GLOBAL const struct nk_color nk_yellow = {255,255,0,255};\n\n/* widget */\n#define nk_widget_state_reset(s)\\\n    if ((*(s)) & NK_WIDGET_STATE_MODIFIED)\\\n        (*(s)) = NK_WIDGET_STATE_INACTIVE|NK_WIDGET_STATE_MODIFIED;\\\n    else (*(s)) = NK_WIDGET_STATE_INACTIVE;\n\n/* math */\nNK_LIB float nk_inv_sqrt(float n);\nNK_LIB float nk_sqrt(float x);\nNK_LIB float nk_sin(float x);\nNK_LIB float nk_cos(float x);\nNK_LIB nk_uint nk_round_up_pow2(nk_uint v);\nNK_LIB struct nk_rect nk_shrink_rect(struct nk_rect r, float amount);\nNK_LIB struct nk_rect nk_pad_rect(struct nk_rect r, struct nk_vec2 pad);\nNK_LIB void nk_unify(struct nk_rect *clip, const struct nk_rect *a, float x0, float y0, float x1, float y1);\nNK_LIB double nk_pow(double x, int n);\nNK_LIB int nk_ifloord(double x);\nNK_LIB int nk_ifloorf(float x);\nNK_LIB int nk_iceilf(float x);\nNK_LIB int nk_log10(double n);\n\n/* util */\nenum {NK_DO_NOT_STOP_ON_NEW_LINE, NK_STOP_ON_NEW_LINE};\nNK_LIB int nk_is_lower(int c);\nNK_LIB int nk_is_upper(int c);\nNK_LIB int nk_to_upper(int c);\nNK_LIB int nk_to_lower(int c);\nNK_LIB void* nk_memcopy(void *dst, const void *src, nk_size n);\nNK_LIB void nk_memset(void *ptr, int c0, nk_size size);\nNK_LIB void nk_zero(void *ptr, nk_size size);\nNK_LIB char *nk_itoa(char *s, long n);\nNK_LIB int nk_string_float_limit(char *string, int prec);\nNK_LIB char *nk_dtoa(char *s, double n);\nNK_LIB int nk_text_clamp(const struct nk_user_font *font, const char *text, int text_len, float space, int *glyphs, float *text_width, nk_rune *sep_list, int sep_count);\nNK_LIB struct nk_vec2 nk_text_calculate_text_bounds(const struct nk_user_font *font, const char *begin, int byte_len, float row_height, const char **remaining, struct nk_vec2 *out_offset, int *glyphs, int op);\n#ifdef NK_INCLUDE_STANDARD_VARARGS\nNK_LIB int nk_strfmt(char *buf, int buf_size, const char *fmt, va_list args);\n#endif\n#ifdef NK_INCLUDE_STANDARD_IO\nNK_LIB char *nk_file_load(const char* path, nk_size* siz, struct nk_allocator *alloc);\n#endif\n\n/* buffer */\n#ifdef NK_INCLUDE_DEFAULT_ALLOCATOR\nNK_LIB void* nk_malloc(nk_handle unused, void *old,nk_size size);\nNK_LIB void nk_mfree(nk_handle unused, void *ptr);\n#endif\nNK_LIB void* nk_buffer_align(void *unaligned, nk_size align, nk_size *alignment, enum nk_buffer_allocation_type type);\nNK_LIB void* nk_buffer_alloc(struct nk_buffer *b, enum nk_buffer_allocation_type type, nk_size size, nk_size align);\nNK_LIB void* nk_buffer_realloc(struct nk_buffer *b, nk_size capacity, nk_size *size);\n\n/* draw */\nNK_LIB void nk_command_buffer_init(struct nk_command_buffer *cb, struct nk_buffer *b, enum nk_command_clipping clip);\nNK_LIB void nk_command_buffer_reset(struct nk_command_buffer *b);\nNK_LIB void* nk_command_buffer_push(struct nk_command_buffer* b, enum nk_command_type t, nk_size size);\nNK_LIB void nk_draw_symbol(struct nk_command_buffer *out, enum nk_symbol_type type, struct nk_rect content, struct nk_color background, struct nk_color foreground, float border_width, const struct nk_user_font *font);\n\n/* buffering */\nNK_LIB void nk_start_buffer(struct nk_context *ctx, struct nk_command_buffer *b);\nNK_LIB void nk_start(struct nk_context *ctx, struct nk_window *win);\nNK_LIB void nk_start_popup(struct nk_context *ctx, struct nk_window *win);\nNK_LIB void nk_finish_popup(struct nk_context *ctx, struct nk_window*);\nNK_LIB void nk_finish_buffer(struct nk_context *ctx, struct nk_command_buffer *b);\nNK_LIB void nk_finish(struct nk_context *ctx, struct nk_window *w);\nNK_LIB void nk_build(struct nk_context *ctx);\n\n/* text editor */\nNK_LIB void nk_textedit_clear_state(struct nk_text_edit *state, enum nk_text_edit_type type, nk_plugin_filter filter);\nNK_LIB void nk_textedit_click(struct nk_text_edit *state, float x, float y, const struct nk_user_font *font, float row_height);\nNK_LIB void nk_textedit_drag(struct nk_text_edit *state, float x, float y, const struct nk_user_font *font, float row_height);\nNK_LIB void nk_textedit_key(struct nk_text_edit *state, enum nk_keys key, int shift_mod, const struct nk_user_font *font, float row_height);\n\n/* window */\nenum nk_window_insert_location {\n    NK_INSERT_BACK, /* inserts window into the back of list (front of screen) */\n    NK_INSERT_FRONT /* inserts window into the front of list (back of screen) */\n};\nNK_LIB void *nk_create_window(struct nk_context *ctx);\nNK_LIB void nk_remove_window(struct nk_context*, struct nk_window*);\nNK_LIB void nk_free_window(struct nk_context *ctx, struct nk_window *win);\nNK_LIB struct nk_window *nk_find_window(struct nk_context *ctx, nk_hash hash, const char *name);\nNK_LIB void nk_insert_window(struct nk_context *ctx, struct nk_window *win, enum nk_window_insert_location loc);\n\n/* pool */\nNK_LIB void nk_pool_init(struct nk_pool *pool, struct nk_allocator *alloc, unsigned int capacity);\nNK_LIB void nk_pool_free(struct nk_pool *pool);\nNK_LIB void nk_pool_init_fixed(struct nk_pool *pool, void *memory, nk_size size);\nNK_LIB struct nk_page_element *nk_pool_alloc(struct nk_pool *pool);\n\n/* page-element */\nNK_LIB struct nk_page_element* nk_create_page_element(struct nk_context *ctx);\nNK_LIB void nk_link_page_element_into_freelist(struct nk_context *ctx, struct nk_page_element *elem);\nNK_LIB void nk_free_page_element(struct nk_context *ctx, struct nk_page_element *elem);\n\n/* table */\nNK_LIB struct nk_table* nk_create_table(struct nk_context *ctx);\nNK_LIB void nk_remove_table(struct nk_window *win, struct nk_table *tbl);\nNK_LIB void nk_free_table(struct nk_context *ctx, struct nk_table *tbl);\nNK_LIB void nk_push_table(struct nk_window *win, struct nk_table *tbl);\nNK_LIB nk_uint *nk_add_value(struct nk_context *ctx, struct nk_window *win, nk_hash name, nk_uint value);\nNK_LIB nk_uint *nk_find_value(struct nk_window *win, nk_hash name);\n\n/* panel */\nNK_LIB void *nk_create_panel(struct nk_context *ctx);\nNK_LIB void nk_free_panel(struct nk_context*, struct nk_panel *pan);\nNK_LIB int nk_panel_has_header(nk_flags flags, const char *title);\nNK_LIB struct nk_vec2 nk_panel_get_padding(const struct nk_style *style, enum nk_panel_type type);\nNK_LIB float nk_panel_get_border(const struct nk_style *style, nk_flags flags, enum nk_panel_type type);\nNK_LIB struct nk_color nk_panel_get_border_color(const struct nk_style *style, enum nk_panel_type type);\nNK_LIB int nk_panel_is_sub(enum nk_panel_type type);\nNK_LIB int nk_panel_is_nonblock(enum nk_panel_type type);\nNK_LIB int nk_panel_begin(struct nk_context *ctx, const char *title, enum nk_panel_type panel_type);\nNK_LIB void nk_panel_end(struct nk_context *ctx);\n\n/* layout */\nNK_LIB float nk_layout_row_calculate_usable_space(const struct nk_style *style, enum nk_panel_type type, float total_space, int columns);\nNK_LIB void nk_panel_layout(const struct nk_context *ctx, struct nk_window *win, float height, int cols);\nNK_LIB void nk_row_layout(struct nk_context *ctx, enum nk_layout_format fmt, float height, int cols, int width);\nNK_LIB void nk_panel_alloc_row(const struct nk_context *ctx, struct nk_window *win);\nNK_LIB void nk_layout_widget_space(struct nk_rect *bounds, const struct nk_context *ctx, struct nk_window *win, int modify);\nNK_LIB void nk_panel_alloc_space(struct nk_rect *bounds, const struct nk_context *ctx);\nNK_LIB void nk_layout_peek(struct nk_rect *bounds, struct nk_context *ctx);\n\n/* popup */\nNK_LIB int nk_nonblock_begin(struct nk_context *ctx, nk_flags flags, struct nk_rect body, struct nk_rect header, enum nk_panel_type panel_type);\n\n/* text */\nstruct nk_text {\n    struct nk_vec2 padding;\n    struct nk_color background;\n    struct nk_color text;\n};\nNK_LIB void nk_widget_text(struct nk_command_buffer *o, struct nk_rect b, const char *string, int len, const struct nk_text *t, nk_flags a, const struct nk_user_font *f);\nNK_LIB void nk_widget_text_wrap(struct nk_command_buffer *o, struct nk_rect b, const char *string, int len, const struct nk_text *t, const struct nk_user_font *f);\n\n/* button */\nNK_LIB int nk_button_behavior(nk_flags *state, struct nk_rect r, const struct nk_input *i, enum nk_button_behavior behavior);\nNK_LIB const struct nk_style_item* nk_draw_button(struct nk_command_buffer *out, const struct nk_rect *bounds, nk_flags state, const struct nk_style_button *style);\nNK_LIB int nk_do_button(nk_flags *state, struct nk_command_buffer *out, struct nk_rect r, const struct nk_style_button *style, const struct nk_input *in, enum nk_button_behavior behavior, struct nk_rect *content);\nNK_LIB void nk_draw_button_text(struct nk_command_buffer *out, const struct nk_rect *bounds, const struct nk_rect *content, nk_flags state, const struct nk_style_button *style, const char *txt, int len, nk_flags text_alignment, const struct nk_user_font *font);\nNK_LIB int nk_do_button_text(nk_flags *state, struct nk_command_buffer *out, struct nk_rect bounds, const char *string, int len, nk_flags align, enum nk_button_behavior behavior, const struct nk_style_button *style, const struct nk_input *in, const struct nk_user_font *font);\nNK_LIB void nk_draw_button_symbol(struct nk_command_buffer *out, const struct nk_rect *bounds, const struct nk_rect *content, nk_flags state, const struct nk_style_button *style, enum nk_symbol_type type, const struct nk_user_font *font);\nNK_LIB int nk_do_button_symbol(nk_flags *state, struct nk_command_buffer *out, struct nk_rect bounds, enum nk_symbol_type symbol, enum nk_button_behavior behavior, const struct nk_style_button *style, const struct nk_input *in, const struct nk_user_font *font);\nNK_LIB void nk_draw_button_image(struct nk_command_buffer *out, const struct nk_rect *bounds, const struct nk_rect *content, nk_flags state, const struct nk_style_button *style, const struct nk_image *img);\nNK_LIB int nk_do_button_image(nk_flags *state, struct nk_command_buffer *out, struct nk_rect bounds, struct nk_image img, enum nk_button_behavior b, const struct nk_style_button *style, const struct nk_input *in);\nNK_LIB void nk_draw_button_text_symbol(struct nk_command_buffer *out, const struct nk_rect *bounds, const struct nk_rect *label, const struct nk_rect *symbol, nk_flags state, const struct nk_style_button *style, const char *str, int len, enum nk_symbol_type type, const struct nk_user_font *font);\nNK_LIB int nk_do_button_text_symbol(nk_flags *state, struct nk_command_buffer *out, struct nk_rect bounds, enum nk_symbol_type symbol, const char *str, int len, nk_flags align, enum nk_button_behavior behavior, const struct nk_style_button *style, const struct nk_user_font *font, const struct nk_input *in);\nNK_LIB void nk_draw_button_text_image(struct nk_command_buffer *out, const struct nk_rect *bounds, const struct nk_rect *label, const struct nk_rect *image, nk_flags state, const struct nk_style_button *style, const char *str, int len, const struct nk_user_font *font, const struct nk_image *img);\nNK_LIB int nk_do_button_text_image(nk_flags *state, struct nk_command_buffer *out, struct nk_rect bounds, struct nk_image img, const char* str, int len, nk_flags align, enum nk_button_behavior behavior, const struct nk_style_button *style, const struct nk_user_font *font, const struct nk_input *in);\n\n/* toggle */\nenum nk_toggle_type {\n    NK_TOGGLE_CHECK,\n    NK_TOGGLE_OPTION\n};\nNK_LIB int nk_toggle_behavior(const struct nk_input *in, struct nk_rect select, nk_flags *state, int active);\nNK_LIB void nk_draw_checkbox(struct nk_command_buffer *out, nk_flags state, const struct nk_style_toggle *style, int active, const struct nk_rect *label, const struct nk_rect *selector, const struct nk_rect *cursors, const char *string, int len, const struct nk_user_font *font);\nNK_LIB void nk_draw_option(struct nk_command_buffer *out, nk_flags state, const struct nk_style_toggle *style, int active, const struct nk_rect *label, const struct nk_rect *selector, const struct nk_rect *cursors, const char *string, int len, const struct nk_user_font *font);\nNK_LIB int nk_do_toggle(nk_flags *state, struct nk_command_buffer *out, struct nk_rect r, int *active, const char *str, int len, enum nk_toggle_type type, const struct nk_style_toggle *style, const struct nk_input *in, const struct nk_user_font *font);\n\n/* progress */\nNK_LIB nk_size nk_progress_behavior(nk_flags *state, struct nk_input *in, struct nk_rect r, struct nk_rect cursor, nk_size max, nk_size value, int modifiable);\nNK_LIB void nk_draw_progress(struct nk_command_buffer *out, nk_flags state, const struct nk_style_progress *style, const struct nk_rect *bounds, const struct nk_rect *scursor, nk_size value, nk_size max);\nNK_LIB nk_size nk_do_progress(nk_flags *state, struct nk_command_buffer *out, struct nk_rect bounds, nk_size value, nk_size max, int modifiable, const struct nk_style_progress *style, struct nk_input *in);\n\n/* slider */\nNK_LIB float nk_slider_behavior(nk_flags *state, struct nk_rect *logical_cursor, struct nk_rect *visual_cursor, struct nk_input *in, struct nk_rect bounds, float slider_min, float slider_max, float slider_value, float slider_step, float slider_steps);\nNK_LIB void nk_draw_slider(struct nk_command_buffer *out, nk_flags state, const struct nk_style_slider *style, const struct nk_rect *bounds, const struct nk_rect *visual_cursor, float min, float value, float max);\nNK_LIB float nk_do_slider(nk_flags *state, struct nk_command_buffer *out, struct nk_rect bounds, float min, float val, float max, float step, const struct nk_style_slider *style, struct nk_input *in, const struct nk_user_font *font);\n\n/* scrollbar */\nNK_LIB float nk_scrollbar_behavior(nk_flags *state, struct nk_input *in, int has_scrolling, const struct nk_rect *scroll, const struct nk_rect *cursor, const struct nk_rect *empty0, const struct nk_rect *empty1, float scroll_offset, float target, float scroll_step, enum nk_orientation o);\nNK_LIB void nk_draw_scrollbar(struct nk_command_buffer *out, nk_flags state, const struct nk_style_scrollbar *style, const struct nk_rect *bounds, const struct nk_rect *scroll);\nNK_LIB float nk_do_scrollbarv(nk_flags *state, struct nk_command_buffer *out, struct nk_rect scroll, int has_scrolling, float offset, float target, float step, float button_pixel_inc, const struct nk_style_scrollbar *style, struct nk_input *in, const struct nk_user_font *font);\nNK_LIB float nk_do_scrollbarh(nk_flags *state, struct nk_command_buffer *out, struct nk_rect scroll, int has_scrolling, float offset, float target, float step, float button_pixel_inc, const struct nk_style_scrollbar *style, struct nk_input *in, const struct nk_user_font *font);\n\n/* selectable */\nNK_LIB void nk_draw_selectable(struct nk_command_buffer *out, nk_flags state, const struct nk_style_selectable *style, int active, const struct nk_rect *bounds, const struct nk_rect *icon, const struct nk_image *img, enum nk_symbol_type sym, const char *string, int len, nk_flags align, const struct nk_user_font *font);\nNK_LIB int nk_do_selectable(nk_flags *state, struct nk_command_buffer *out, struct nk_rect bounds, const char *str, int len, nk_flags align, int *value, const struct nk_style_selectable *style, const struct nk_input *in, const struct nk_user_font *font);\nNK_LIB int nk_do_selectable_image(nk_flags *state, struct nk_command_buffer *out, struct nk_rect bounds, const char *str, int len, nk_flags align, int *value, const struct nk_image *img, const struct nk_style_selectable *style, const struct nk_input *in, const struct nk_user_font *font);\n\n/* edit */\nNK_LIB void nk_edit_draw_text(struct nk_command_buffer *out, const struct nk_style_edit *style, float pos_x, float pos_y, float x_offset, const char *text, int byte_len, float row_height, const struct nk_user_font *font, struct nk_color background, struct nk_color foreground, int is_selected);\nNK_LIB nk_flags nk_do_edit(nk_flags *state, struct nk_command_buffer *out, struct nk_rect bounds, nk_flags flags, nk_plugin_filter filter, struct nk_text_edit *edit, const struct nk_style_edit *style, struct nk_input *in, const struct nk_user_font *font);\n\n/* color-picker */\nNK_LIB int nk_color_picker_behavior(nk_flags *state, const struct nk_rect *bounds, const struct nk_rect *matrix, const struct nk_rect *hue_bar, const struct nk_rect *alpha_bar, struct nk_colorf *color, const struct nk_input *in);\nNK_LIB void nk_draw_color_picker(struct nk_command_buffer *o, const struct nk_rect *matrix, const struct nk_rect *hue_bar, const struct nk_rect *alpha_bar, struct nk_colorf col);\nNK_LIB int nk_do_color_picker(nk_flags *state, struct nk_command_buffer *out, struct nk_colorf *col, enum nk_color_format fmt, struct nk_rect bounds, struct nk_vec2 padding, const struct nk_input *in, const struct nk_user_font *font);\n\n/* property */\nenum nk_property_status {\n    NK_PROPERTY_DEFAULT,\n    NK_PROPERTY_EDIT,\n    NK_PROPERTY_DRAG\n};\nenum nk_property_filter {\n    NK_FILTER_INT,\n    NK_FILTER_FLOAT\n};\nenum nk_property_kind {\n    NK_PROPERTY_INT,\n    NK_PROPERTY_FLOAT,\n    NK_PROPERTY_DOUBLE\n};\nunion nk_property {\n    int i;\n    float f;\n    double d;\n};\nstruct nk_property_variant {\n    enum nk_property_kind kind;\n    union nk_property value;\n    union nk_property min_value;\n    union nk_property max_value;\n    union nk_property step;\n};\nNK_LIB struct nk_property_variant nk_property_variant_int(int value, int min_value, int max_value, int step);\nNK_LIB struct nk_property_variant nk_property_variant_float(float value, float min_value, float max_value, float step);\nNK_LIB struct nk_property_variant nk_property_variant_double(double value, double min_value, double max_value, double step);\n\nNK_LIB void nk_drag_behavior(nk_flags *state, const struct nk_input *in, struct nk_rect drag, struct nk_property_variant *variant, float inc_per_pixel);\nNK_LIB void nk_property_behavior(nk_flags *ws, const struct nk_input *in, struct nk_rect property,  struct nk_rect label, struct nk_rect edit, struct nk_rect empty, int *state, struct nk_property_variant *variant, float inc_per_pixel);\nNK_LIB void nk_draw_property(struct nk_command_buffer *out, const struct nk_style_property *style, const struct nk_rect *bounds, const struct nk_rect *label, nk_flags state, const char *name, int len, const struct nk_user_font *font);\nNK_LIB void nk_do_property(nk_flags *ws, struct nk_command_buffer *out, struct nk_rect property, const char *name, struct nk_property_variant *variant, float inc_per_pixel, char *buffer, int *len, int *state, int *cursor, int *select_begin, int *select_end, const struct nk_style_property *style, enum nk_property_filter filter, struct nk_input *in, const struct nk_user_font *font, struct nk_text_edit *text_edit, enum nk_button_behavior behavior);\nNK_LIB void nk_property(struct nk_context *ctx, const char *name, struct nk_property_variant *variant, float inc_per_pixel, const enum nk_property_filter filter);\n\n#endif\n\n\n\n\n\n/* ===============================================================\n *\n *                              MATH\n *\n * ===============================================================*/\n/*  Since nuklear is supposed to work on all systems providing floating point\n    math without any dependencies I also had to implement my own math functions\n    for sqrt, sin and cos. Since the actual highly accurate implementations for\n    the standard library functions are quite complex and I do not need high\n    precision for my use cases I use approximations.\n\n    Sqrt\n    ----\n    For square root nuklear uses the famous fast inverse square root:\n    https://en.wikipedia.org/wiki/Fast_inverse_square_root with\n    slightly tweaked magic constant. While on today's hardware it is\n    probably not faster it is still fast and accurate enough for\n    nuklear's use cases. IMPORTANT: this requires float format IEEE 754\n\n    Sine/Cosine\n    -----------\n    All constants inside both function are generated Remez's minimax\n    approximations for value range 0...2*PI. The reason why I decided to\n    approximate exactly that range is that nuklear only needs sine and\n    cosine to generate circles which only requires that exact range.\n    In addition I used Remez instead of Taylor for additional precision:\n    www.lolengine.net/blog/2011/12/21/better-function-approximations.\n\n    The tool I used to generate constants for both sine and cosine\n    (it can actually approximate a lot more functions) can be\n    found here: www.lolengine.net/wiki/oss/lolremez\n*/\nNK_LIB float\nnk_inv_sqrt(float n)\n{\n    float x2;\n    const float threehalfs = 1.5f;\n    union {nk_uint i; float f;} conv = {0};\n    conv.f = n;\n    x2 = n * 0.5f;\n    conv.i = 0x5f375A84 - (conv.i >> 1);\n    conv.f = conv.f * (threehalfs - (x2 * conv.f * conv.f));\n    return conv.f;\n}\nNK_LIB float\nnk_sqrt(float x)\n{\n    return x * nk_inv_sqrt(x);\n}\nNK_LIB float\nnk_sin(float x)\n{\n    NK_STORAGE const float a0 = +1.91059300966915117e-31f;\n    NK_STORAGE const float a1 = +1.00086760103908896f;\n    NK_STORAGE const float a2 = -1.21276126894734565e-2f;\n    NK_STORAGE const float a3 = -1.38078780785773762e-1f;\n    NK_STORAGE const float a4 = -2.67353392911981221e-2f;\n    NK_STORAGE const float a5 = +2.08026600266304389e-2f;\n    NK_STORAGE const float a6 = -3.03996055049204407e-3f;\n    NK_STORAGE const float a7 = +1.38235642404333740e-4f;\n    return a0 + x*(a1 + x*(a2 + x*(a3 + x*(a4 + x*(a5 + x*(a6 + x*a7))))));\n}\nNK_LIB float\nnk_cos(float x)\n{\n    NK_STORAGE const float a0 = +1.00238601909309722f;\n    NK_STORAGE const float a1 = -3.81919947353040024e-2f;\n    NK_STORAGE const float a2 = -3.94382342128062756e-1f;\n    NK_STORAGE const float a3 = -1.18134036025221444e-1f;\n    NK_STORAGE const float a4 = +1.07123798512170878e-1f;\n    NK_STORAGE const float a5 = -1.86637164165180873e-2f;\n    NK_STORAGE const float a6 = +9.90140908664079833e-4f;\n    NK_STORAGE const float a7 = -5.23022132118824778e-14f;\n    return a0 + x*(a1 + x*(a2 + x*(a3 + x*(a4 + x*(a5 + x*(a6 + x*a7))))));\n}\nNK_LIB nk_uint\nnk_round_up_pow2(nk_uint v)\n{\n    v--;\n    v |= v >> 1;\n    v |= v >> 2;\n    v |= v >> 4;\n    v |= v >> 8;\n    v |= v >> 16;\n    v++;\n    return v;\n}\nNK_LIB double\nnk_pow(double x, int n)\n{\n    /*  check the sign of n */\n    double r = 1;\n    int plus = n >= 0;\n    n = (plus) ? n : -n;\n    while (n > 0) {\n        if ((n & 1) == 1)\n            r *= x;\n        n /= 2;\n        x *= x;\n    }\n    return plus ? r : 1.0 / r;\n}\nNK_LIB int\nnk_ifloord(double x)\n{\n    x = (double)((int)x - ((x < 0.0) ? 1 : 0));\n    return (int)x;\n}\nNK_LIB int\nnk_ifloorf(float x)\n{\n    x = (float)((int)x - ((x < 0.0f) ? 1 : 0));\n    return (int)x;\n}\nNK_LIB int\nnk_iceilf(float x)\n{\n    if (x >= 0) {\n        int i = (int)x;\n        return (x > i) ? i+1: i;\n    } else {\n        int t = (int)x;\n        float r = x - (float)t;\n        return (r > 0.0f) ? t+1: t;\n    }\n}\nNK_LIB int\nnk_log10(double n)\n{\n    int neg;\n    int ret;\n    int exp = 0;\n\n    neg = (n < 0) ? 1 : 0;\n    ret = (neg) ? (int)-n : (int)n;\n    while ((ret / 10) > 0) {\n        ret /= 10;\n        exp++;\n    }\n    if (neg) exp = -exp;\n    return exp;\n}\nNK_API struct nk_rect\nnk_get_null_rect(void)\n{\n    return nk_null_rect;\n}\nNK_API struct nk_rect\nnk_rect(float x, float y, float w, float h)\n{\n    struct nk_rect r;\n    r.x = x; r.y = y;\n    r.w = w; r.h = h;\n    return r;\n}\nNK_API struct nk_rect\nnk_recti(int x, int y, int w, int h)\n{\n    struct nk_rect r;\n    r.x = (float)x;\n    r.y = (float)y;\n    r.w = (float)w;\n    r.h = (float)h;\n    return r;\n}\nNK_API struct nk_rect\nnk_recta(struct nk_vec2 pos, struct nk_vec2 size)\n{\n    return nk_rect(pos.x, pos.y, size.x, size.y);\n}\nNK_API struct nk_rect\nnk_rectv(const float *r)\n{\n    return nk_rect(r[0], r[1], r[2], r[3]);\n}\nNK_API struct nk_rect\nnk_rectiv(const int *r)\n{\n    return nk_recti(r[0], r[1], r[2], r[3]);\n}\nNK_API struct nk_vec2\nnk_rect_pos(struct nk_rect r)\n{\n    struct nk_vec2 ret;\n    ret.x = r.x; ret.y = r.y;\n    return ret;\n}\nNK_API struct nk_vec2\nnk_rect_size(struct nk_rect r)\n{\n    struct nk_vec2 ret;\n    ret.x = r.w; ret.y = r.h;\n    return ret;\n}\nNK_LIB struct nk_rect\nnk_shrink_rect(struct nk_rect r, float amount)\n{\n    struct nk_rect res;\n    r.w = NK_MAX(r.w, 2 * amount);\n    r.h = NK_MAX(r.h, 2 * amount);\n    res.x = r.x + amount;\n    res.y = r.y + amount;\n    res.w = r.w - 2 * amount;\n    res.h = r.h - 2 * amount;\n    return res;\n}\nNK_LIB struct nk_rect\nnk_pad_rect(struct nk_rect r, struct nk_vec2 pad)\n{\n    r.w = NK_MAX(r.w, 2 * pad.x);\n    r.h = NK_MAX(r.h, 2 * pad.y);\n    r.x += pad.x; r.y += pad.y;\n    r.w -= 2 * pad.x;\n    r.h -= 2 * pad.y;\n    return r;\n}\nNK_API struct nk_vec2\nnk_vec2(float x, float y)\n{\n    struct nk_vec2 ret;\n    ret.x = x; ret.y = y;\n    return ret;\n}\nNK_API struct nk_vec2\nnk_vec2i(int x, int y)\n{\n    struct nk_vec2 ret;\n    ret.x = (float)x;\n    ret.y = (float)y;\n    return ret;\n}\nNK_API struct nk_vec2\nnk_vec2v(const float *v)\n{\n    return nk_vec2(v[0], v[1]);\n}\nNK_API struct nk_vec2\nnk_vec2iv(const int *v)\n{\n    return nk_vec2i(v[0], v[1]);\n}\nNK_LIB void\nnk_unify(struct nk_rect *clip, const struct nk_rect *a, float x0, float y0,\n    float x1, float y1)\n{\n    NK_ASSERT(a);\n    NK_ASSERT(clip);\n    clip->x = NK_MAX(a->x, x0);\n    clip->y = NK_MAX(a->y, y0);\n    clip->w = NK_MIN(a->x + a->w, x1) - clip->x;\n    clip->h = NK_MIN(a->y + a->h, y1) - clip->y;\n    clip->w = NK_MAX(0, clip->w);\n    clip->h = NK_MAX(0, clip->h);\n}\n\nNK_API void\nnk_triangle_from_direction(struct nk_vec2 *result, struct nk_rect r,\n    float pad_x, float pad_y, enum nk_heading direction)\n{\n    float w_half, h_half;\n    NK_ASSERT(result);\n\n    r.w = NK_MAX(2 * pad_x, r.w);\n    r.h = NK_MAX(2 * pad_y, r.h);\n    r.w = r.w - 2 * pad_x;\n    r.h = r.h - 2 * pad_y;\n\n    r.x = r.x + pad_x;\n    r.y = r.y + pad_y;\n\n    w_half = r.w / 2.0f;\n    h_half = r.h / 2.0f;\n\n    if (direction == NK_UP) {\n        result[0] = nk_vec2(r.x + w_half, r.y);\n        result[1] = nk_vec2(r.x + r.w, r.y + r.h);\n        result[2] = nk_vec2(r.x, r.y + r.h);\n    } else if (direction == NK_RIGHT) {\n        result[0] = nk_vec2(r.x, r.y);\n        result[1] = nk_vec2(r.x + r.w, r.y + h_half);\n        result[2] = nk_vec2(r.x, r.y + r.h);\n    } else if (direction == NK_DOWN) {\n        result[0] = nk_vec2(r.x, r.y);\n        result[1] = nk_vec2(r.x + r.w, r.y);\n        result[2] = nk_vec2(r.x + w_half, r.y + r.h);\n    } else {\n        result[0] = nk_vec2(r.x, r.y + h_half);\n        result[1] = nk_vec2(r.x + r.w, r.y);\n        result[2] = nk_vec2(r.x + r.w, r.y + r.h);\n    }\n}\n\n\n\n\n\n/* ===============================================================\n *\n *                              UTIL\n *\n * ===============================================================*/\nNK_INTERN int nk_str_match_here(const char *regexp, const char *text);\nNK_INTERN int nk_str_match_star(int c, const char *regexp, const char *text);\nNK_LIB int nk_is_lower(int c) {return (c >= 'a' && c <= 'z') || (c >= 0xE0 && c <= 0xFF);}\nNK_LIB int nk_is_upper(int c){return (c >= 'A' && c <= 'Z') || (c >= 0xC0 && c <= 0xDF);}\nNK_LIB int nk_to_upper(int c) {return (c >= 'a' && c <= 'z') ? (c - ('a' - 'A')) : c;}\nNK_LIB int nk_to_lower(int c) {return (c >= 'A' && c <= 'Z') ? (c - ('a' + 'A')) : c;}\n\nNK_LIB void*\nnk_memcopy(void *dst0, const void *src0, nk_size length)\n{\n    nk_ptr t;\n    char *dst = (char*)dst0;\n    const char *src = (const char*)src0;\n    if (length == 0 || dst == src)\n        goto done;\n\n    #define nk_word int\n    #define nk_wsize sizeof(nk_word)\n    #define nk_wmask (nk_wsize-1)\n    #define NK_TLOOP(s) if (t) NK_TLOOP1(s)\n    #define NK_TLOOP1(s) do { s; } while (--t)\n\n    if (dst < src) {\n        t = (nk_ptr)src; /* only need low bits */\n        if ((t | (nk_ptr)dst) & nk_wmask) {\n            if ((t ^ (nk_ptr)dst) & nk_wmask || length < nk_wsize)\n                t = length;\n            else\n                t = nk_wsize - (t & nk_wmask);\n            length -= t;\n            NK_TLOOP1(*dst++ = *src++);\n        }\n        t = length / nk_wsize;\n        NK_TLOOP(*(nk_word*)(void*)dst = *(const nk_word*)(const void*)src;\n            src += nk_wsize; dst += nk_wsize);\n        t = length & nk_wmask;\n        NK_TLOOP(*dst++ = *src++);\n    } else {\n        src += length;\n        dst += length;\n        t = (nk_ptr)src;\n        if ((t | (nk_ptr)dst) & nk_wmask) {\n            if ((t ^ (nk_ptr)dst) & nk_wmask || length <= nk_wsize)\n                t = length;\n            else\n                t &= nk_wmask;\n            length -= t;\n            NK_TLOOP1(*--dst = *--src);\n        }\n        t = length / nk_wsize;\n        NK_TLOOP(src -= nk_wsize; dst -= nk_wsize;\n            *(nk_word*)(void*)dst = *(const nk_word*)(const void*)src);\n        t = length & nk_wmask;\n        NK_TLOOP(*--dst = *--src);\n    }\n    #undef nk_word\n    #undef nk_wsize\n    #undef nk_wmask\n    #undef NK_TLOOP\n    #undef NK_TLOOP1\ndone:\n    return (dst0);\n}\nNK_LIB void\nnk_memset(void *ptr, int c0, nk_size size)\n{\n    #define nk_word unsigned\n    #define nk_wsize sizeof(nk_word)\n    #define nk_wmask (nk_wsize - 1)\n    nk_byte *dst = (nk_byte*)ptr;\n    unsigned c = 0;\n    nk_size t = 0;\n\n    if ((c = (nk_byte)c0) != 0) {\n        c = (c << 8) | c; /* at least 16-bits  */\n        if (sizeof(unsigned int) > 2)\n            c = (c << 16) | c; /* at least 32-bits*/\n    }\n\n    /* too small of a word count */\n    dst = (nk_byte*)ptr;\n    if (size < 3 * nk_wsize) {\n        while (size--) *dst++ = (nk_byte)c0;\n        return;\n    }\n\n    /* align destination */\n    if ((t = NK_PTR_TO_UINT(dst) & nk_wmask) != 0) {\n        t = nk_wsize -t;\n        size -= t;\n        do {\n            *dst++ = (nk_byte)c0;\n        } while (--t != 0);\n    }\n\n    /* fill word */\n    t = size / nk_wsize;\n    do {\n        *(nk_word*)((void*)dst) = c;\n        dst += nk_wsize;\n    } while (--t != 0);\n\n    /* fill trailing bytes */\n    t = (size & nk_wmask);\n    if (t != 0) {\n        do {\n            *dst++ = (nk_byte)c0;\n        } while (--t != 0);\n    }\n\n    #undef nk_word\n    #undef nk_wsize\n    #undef nk_wmask\n}\nNK_LIB void\nnk_zero(void *ptr, nk_size size)\n{\n    NK_ASSERT(ptr);\n    NK_MEMSET(ptr, 0, size);\n}\nNK_API int\nnk_strlen(const char *str)\n{\n    int siz = 0;\n    NK_ASSERT(str);\n    while (str && *str++ != '\\0') siz++;\n    return siz;\n}\nNK_API int\nnk_strtoi(const char *str, const char **endptr)\n{\n    int neg = 1;\n    const char *p = str;\n    int value = 0;\n\n    NK_ASSERT(str);\n    if (!str) return 0;\n\n    /* skip whitespace */\n    while (*p == ' ') p++;\n    if (*p == '-') {\n        neg = -1;\n        p++;\n    }\n    while (*p && *p >= '0' && *p <= '9') {\n        value = value * 10 + (int) (*p - '0');\n        p++;\n    }\n    if (endptr)\n        *endptr = p;\n    return neg*value;\n}\nNK_API double\nnk_strtod(const char *str, const char **endptr)\n{\n    double m;\n    double neg = 1.0;\n    const char *p = str;\n    double value = 0;\n    double number = 0;\n\n    NK_ASSERT(str);\n    if (!str) return 0;\n\n    /* skip whitespace */\n    while (*p == ' ') p++;\n    if (*p == '-') {\n        neg = -1.0;\n        p++;\n    }\n\n    while (*p && *p != '.' && *p != 'e') {\n        value = value * 10.0 + (double) (*p - '0');\n        p++;\n    }\n\n    if (*p == '.') {\n        p++;\n        for(m = 0.1; *p && *p != 'e'; p++ ) {\n            value = value + (double) (*p - '0') * m;\n            m *= 0.1;\n        }\n    }\n    if (*p == 'e') {\n        int i, pow, div;\n        p++;\n        if (*p == '-') {\n            div = nk_true;\n            p++;\n        } else if (*p == '+') {\n            div = nk_false;\n            p++;\n        } else div = nk_false;\n\n        for (pow = 0; *p; p++)\n            pow = pow * 10 + (int) (*p - '0');\n\n        for (m = 1.0, i = 0; i < pow; i++)\n            m *= 10.0;\n\n        if (div)\n            value /= m;\n        else value *= m;\n    }\n    number = value * neg;\n    if (endptr)\n        *endptr = p;\n    return number;\n}\nNK_API float\nnk_strtof(const char *str, const char **endptr)\n{\n    float float_value;\n    double double_value;\n    double_value = NK_STRTOD(str, endptr);\n    float_value = (float)double_value;\n    return float_value;\n}\nNK_API int\nnk_stricmp(const char *s1, const char *s2)\n{\n    nk_int c1,c2,d;\n    do {\n        c1 = *s1++;\n        c2 = *s2++;\n        d = c1 - c2;\n        while (d) {\n            if (c1 <= 'Z' && c1 >= 'A') {\n                d += ('a' - 'A');\n                if (!d) break;\n            }\n            if (c2 <= 'Z' && c2 >= 'A') {\n                d -= ('a' - 'A');\n                if (!d) break;\n            }\n            return ((d >= 0) << 1) - 1;\n        }\n    } while (c1);\n    return 0;\n}\nNK_API int\nnk_stricmpn(const char *s1, const char *s2, int n)\n{\n    int c1,c2,d;\n    NK_ASSERT(n >= 0);\n    do {\n        c1 = *s1++;\n        c2 = *s2++;\n        if (!n--) return 0;\n\n        d = c1 - c2;\n        while (d) {\n            if (c1 <= 'Z' && c1 >= 'A') {\n                d += ('a' - 'A');\n                if (!d) break;\n            }\n            if (c2 <= 'Z' && c2 >= 'A') {\n                d -= ('a' - 'A');\n                if (!d) break;\n            }\n            return ((d >= 0) << 1) - 1;\n        }\n    } while (c1);\n    return 0;\n}\nNK_INTERN int\nnk_str_match_here(const char *regexp, const char *text)\n{\n    if (regexp[0] == '\\0')\n        return 1;\n    if (regexp[1] == '*')\n        return nk_str_match_star(regexp[0], regexp+2, text);\n    if (regexp[0] == '$' && regexp[1] == '\\0')\n        return *text == '\\0';\n    if (*text!='\\0' && (regexp[0]=='.' || regexp[0]==*text))\n        return nk_str_match_here(regexp+1, text+1);\n    return 0;\n}\nNK_INTERN int\nnk_str_match_star(int c, const char *regexp, const char *text)\n{\n    do {/* a '* matches zero or more instances */\n        if (nk_str_match_here(regexp, text))\n            return 1;\n    } while (*text != '\\0' && (*text++ == c || c == '.'));\n    return 0;\n}\nNK_API int\nnk_strfilter(const char *text, const char *regexp)\n{\n    /*\n    c    matches any literal character c\n    .    matches any single character\n    ^    matches the beginning of the input string\n    $    matches the end of the input string\n    *    matches zero or more occurrences of the previous character*/\n    if (regexp[0] == '^')\n        return nk_str_match_here(regexp+1, text);\n    do {    /* must look even if string is empty */\n        if (nk_str_match_here(regexp, text))\n            return 1;\n    } while (*text++ != '\\0');\n    return 0;\n}\nNK_API int\nnk_strmatch_fuzzy_text(const char *str, int str_len,\n    const char *pattern, int *out_score)\n{\n    /* Returns true if each character in pattern is found sequentially within str\n     * if found then out_score is also set. Score value has no intrinsic meaning.\n     * Range varies with pattern. Can only compare scores with same search pattern. */\n\n    /* bonus for adjacent matches */\n    #define NK_ADJACENCY_BONUS 5\n    /* bonus if match occurs after a separator */\n    #define NK_SEPARATOR_BONUS 10\n    /* bonus if match is uppercase and prev is lower */\n    #define NK_CAMEL_BONUS 10\n    /* penalty applied for every letter in str before the first match */\n    #define NK_LEADING_LETTER_PENALTY (-3)\n    /* maximum penalty for leading letters */\n    #define NK_MAX_LEADING_LETTER_PENALTY (-9)\n    /* penalty for every letter that doesn't matter */\n    #define NK_UNMATCHED_LETTER_PENALTY (-1)\n\n    /* loop variables */\n    int score = 0;\n    char const * pattern_iter = pattern;\n    int str_iter = 0;\n    int prev_matched = nk_false;\n    int prev_lower = nk_false;\n    /* true so if first letter match gets separator bonus*/\n    int prev_separator = nk_true;\n\n    /* use \"best\" matched letter if multiple string letters match the pattern */\n    char const * best_letter = 0;\n    int best_letter_score = 0;\n\n    /* loop over strings */\n    NK_ASSERT(str);\n    NK_ASSERT(pattern);\n    if (!str || !str_len || !pattern) return 0;\n    while (str_iter < str_len)\n    {\n        const char pattern_letter = *pattern_iter;\n        const char str_letter = str[str_iter];\n\n        int next_match = *pattern_iter != '\\0' &&\n            nk_to_lower(pattern_letter) == nk_to_lower(str_letter);\n        int rematch = best_letter && nk_to_upper(*best_letter) == nk_to_upper(str_letter);\n\n        int advanced = next_match && best_letter;\n        int pattern_repeat = best_letter && *pattern_iter != '\\0';\n        pattern_repeat = pattern_repeat &&\n            nk_to_lower(*best_letter) == nk_to_lower(pattern_letter);\n\n        if (advanced || pattern_repeat) {\n            score += best_letter_score;\n            best_letter = 0;\n            best_letter_score = 0;\n        }\n\n        if (next_match || rematch)\n        {\n            int new_score = 0;\n            /* Apply penalty for each letter before the first pattern match */\n            if (pattern_iter == pattern) {\n                int count = (int)(&str[str_iter] - str);\n                int penalty = NK_LEADING_LETTER_PENALTY * count;\n                if (penalty < NK_MAX_LEADING_LETTER_PENALTY)\n                    penalty = NK_MAX_LEADING_LETTER_PENALTY;\n\n                score += penalty;\n            }\n\n            /* apply bonus for consecutive bonuses */\n            if (prev_matched)\n                new_score += NK_ADJACENCY_BONUS;\n\n            /* apply bonus for matches after a separator */\n            if (prev_separator)\n                new_score += NK_SEPARATOR_BONUS;\n\n            /* apply bonus across camel case boundaries */\n            if (prev_lower && nk_is_upper(str_letter))\n                new_score += NK_CAMEL_BONUS;\n\n            /* update pattern iter IFF the next pattern letter was matched */\n            if (next_match)\n                ++pattern_iter;\n\n            /* update best letter in str which may be for a \"next\" letter or a rematch */\n            if (new_score >= best_letter_score) {\n                /* apply penalty for now skipped letter */\n                if (best_letter != 0)\n                    score += NK_UNMATCHED_LETTER_PENALTY;\n\n                best_letter = &str[str_iter];\n                best_letter_score = new_score;\n            }\n            prev_matched = nk_true;\n        } else {\n            score += NK_UNMATCHED_LETTER_PENALTY;\n            prev_matched = nk_false;\n        }\n\n        /* separators should be more easily defined */\n        prev_lower = nk_is_lower(str_letter) != 0;\n        prev_separator = str_letter == '_' || str_letter == ' ';\n\n        ++str_iter;\n    }\n\n    /* apply score for last match */\n    if (best_letter)\n        score += best_letter_score;\n\n    /* did not match full pattern */\n    if (*pattern_iter != '\\0')\n        return nk_false;\n\n    if (out_score)\n        *out_score = score;\n    return nk_true;\n}\nNK_API int\nnk_strmatch_fuzzy_string(char const *str, char const *pattern, int *out_score)\n{\n    return nk_strmatch_fuzzy_text(str, nk_strlen(str), pattern, out_score);\n}\nNK_LIB int\nnk_string_float_limit(char *string, int prec)\n{\n    int dot = 0;\n    char *c = string;\n    while (*c) {\n        if (*c == '.') {\n            dot = 1;\n            c++;\n            continue;\n        }\n        if (dot == (prec+1)) {\n            *c = 0;\n            break;\n        }\n        if (dot > 0) dot++;\n        c++;\n    }\n    return (int)(c - string);\n}\nNK_INTERN void\nnk_strrev_ascii(char *s)\n{\n    int len = nk_strlen(s);\n    int end = len / 2;\n    int i = 0;\n    char t;\n    for (; i < end; ++i) {\n        t = s[i];\n        s[i] = s[len - 1 - i];\n        s[len -1 - i] = t;\n    }\n}\nNK_LIB char*\nnk_itoa(char *s, long n)\n{\n    long i = 0;\n    if (n == 0) {\n        s[i++] = '0';\n        s[i] = 0;\n        return s;\n    }\n    if (n < 0) {\n        s[i++] = '-';\n        n = -n;\n    }\n    while (n > 0) {\n        s[i++] = (char)('0' + (n % 10));\n        n /= 10;\n    }\n    s[i] = 0;\n    if (s[0] == '-')\n        ++s;\n\n    nk_strrev_ascii(s);\n    return s;\n}\nNK_LIB char*\nnk_dtoa(char *s, double n)\n{\n    int useExp = 0;\n    int digit = 0, m = 0, m1 = 0;\n    char *c = s;\n    int neg = 0;\n\n    NK_ASSERT(s);\n    if (!s) return 0;\n\n    if (n == 0.0) {\n        s[0] = '0'; s[1] = '\\0';\n        return s;\n    }\n\n    neg = (n < 0);\n    if (neg) n = -n;\n\n    /* calculate magnitude */\n    m = nk_log10(n);\n    useExp = (m >= 14 || (neg && m >= 9) || m <= -9);\n    if (neg) *(c++) = '-';\n\n    /* set up for scientific notation */\n    if (useExp) {\n        if (m < 0)\n           m -= 1;\n        n = n / (double)nk_pow(10.0, m);\n        m1 = m;\n        m = 0;\n    }\n    if (m < 1.0) {\n        m = 0;\n    }\n\n    /* convert the number */\n    while (n > NK_FLOAT_PRECISION || m >= 0) {\n        double weight = nk_pow(10.0, m);\n        if (weight > 0) {\n            double t = (double)n / weight;\n            digit = nk_ifloord(t);\n            n -= ((double)digit * weight);\n            *(c++) = (char)('0' + (char)digit);\n        }\n        if (m == 0 && n > 0)\n            *(c++) = '.';\n        m--;\n    }\n\n    if (useExp) {\n        /* convert the exponent */\n        int i, j;\n        *(c++) = 'e';\n        if (m1 > 0) {\n            *(c++) = '+';\n        } else {\n            *(c++) = '-';\n            m1 = -m1;\n        }\n        m = 0;\n        while (m1 > 0) {\n            *(c++) = (char)('0' + (char)(m1 % 10));\n            m1 /= 10;\n            m++;\n        }\n        c -= m;\n        for (i = 0, j = m-1; i<j; i++, j--) {\n            /* swap without temporary */\n            c[i] ^= c[j];\n            c[j] ^= c[i];\n            c[i] ^= c[j];\n        }\n        c += m;\n    }\n    *(c) = '\\0';\n    return s;\n}\n#ifdef NK_INCLUDE_STANDARD_VARARGS\n#ifndef NK_INCLUDE_STANDARD_IO\nNK_INTERN int\nnk_vsnprintf(char *buf, int buf_size, const char *fmt, va_list args)\n{\n    enum nk_arg_type {\n        NK_ARG_TYPE_CHAR,\n        NK_ARG_TYPE_SHORT,\n        NK_ARG_TYPE_DEFAULT,\n        NK_ARG_TYPE_LONG\n    };\n    enum nk_arg_flags {\n        NK_ARG_FLAG_LEFT = 0x01,\n        NK_ARG_FLAG_PLUS = 0x02,\n        NK_ARG_FLAG_SPACE = 0x04,\n        NK_ARG_FLAG_NUM = 0x10,\n        NK_ARG_FLAG_ZERO = 0x20\n    };\n\n    char number_buffer[NK_MAX_NUMBER_BUFFER];\n    enum nk_arg_type arg_type = NK_ARG_TYPE_DEFAULT;\n    int precision = NK_DEFAULT;\n    int width = NK_DEFAULT;\n    nk_flags flag = 0;\n\n    int len = 0;\n    int result = -1;\n    const char *iter = fmt;\n\n    NK_ASSERT(buf);\n    NK_ASSERT(buf_size);\n    if (!buf || !buf_size || !fmt) return 0;\n    for (iter = fmt; *iter && len < buf_size; iter++) {\n        /* copy all non-format characters */\n        while (*iter && (*iter != '%') && (len < buf_size))\n            buf[len++] = *iter++;\n        if (!(*iter) || len >= buf_size) break;\n        iter++;\n\n        /* flag arguments */\n        while (*iter) {\n            if (*iter == '-') flag |= NK_ARG_FLAG_LEFT;\n            else if (*iter == '+') flag |= NK_ARG_FLAG_PLUS;\n            else if (*iter == ' ') flag |= NK_ARG_FLAG_SPACE;\n            else if (*iter == '#') flag |= NK_ARG_FLAG_NUM;\n            else if (*iter == '0') flag |= NK_ARG_FLAG_ZERO;\n            else break;\n            iter++;\n        }\n\n        /* width argument */\n        width = NK_DEFAULT;\n        if (*iter >= '1' && *iter <= '9') {\n            const char *end;\n            width = nk_strtoi(iter, &end);\n            if (end == iter)\n                width = -1;\n            else iter = end;\n        } else if (*iter == '*') {\n            width = va_arg(args, int);\n            iter++;\n        }\n\n        /* precision argument */\n        precision = NK_DEFAULT;\n        if (*iter == '.') {\n            iter++;\n            if (*iter == '*') {\n                precision = va_arg(args, int);\n                iter++;\n            } else {\n                const char *end;\n                precision = nk_strtoi(iter, &end);\n                if (end == iter)\n                    precision = -1;\n                else iter = end;\n            }\n        }\n\n        /* length modifier */\n        if (*iter == 'h') {\n            if (*(iter+1) == 'h') {\n                arg_type = NK_ARG_TYPE_CHAR;\n                iter++;\n            } else arg_type = NK_ARG_TYPE_SHORT;\n            iter++;\n        } else if (*iter == 'l') {\n            arg_type = NK_ARG_TYPE_LONG;\n            iter++;\n        } else arg_type = NK_ARG_TYPE_DEFAULT;\n\n        /* specifier */\n        if (*iter == '%') {\n            NK_ASSERT(arg_type == NK_ARG_TYPE_DEFAULT);\n            NK_ASSERT(precision == NK_DEFAULT);\n            NK_ASSERT(width == NK_DEFAULT);\n            if (len < buf_size)\n                buf[len++] = '%';\n        } else if (*iter == 's') {\n            /* string  */\n            const char *str = va_arg(args, const char*);\n            NK_ASSERT(str != buf && \"buffer and argument are not allowed to overlap!\");\n            NK_ASSERT(arg_type == NK_ARG_TYPE_DEFAULT);\n            NK_ASSERT(precision == NK_DEFAULT);\n            NK_ASSERT(width == NK_DEFAULT);\n            if (str == buf) return -1;\n            while (str && *str && len < buf_size)\n                buf[len++] = *str++;\n        } else if (*iter == 'n') {\n            /* current length callback */\n            signed int *n = va_arg(args, int*);\n            NK_ASSERT(arg_type == NK_ARG_TYPE_DEFAULT);\n            NK_ASSERT(precision == NK_DEFAULT);\n            NK_ASSERT(width == NK_DEFAULT);\n            if (n) *n = len;\n        } else if (*iter == 'c' || *iter == 'i' || *iter == 'd') {\n            /* signed integer */\n            long value = 0;\n            const char *num_iter;\n            int num_len, num_print, padding;\n            int cur_precision = NK_MAX(precision, 1);\n            int cur_width = NK_MAX(width, 0);\n\n            /* retrieve correct value type */\n            if (arg_type == NK_ARG_TYPE_CHAR)\n                value = (signed char)va_arg(args, int);\n            else if (arg_type == NK_ARG_TYPE_SHORT)\n                value = (signed short)va_arg(args, int);\n            else if (arg_type == NK_ARG_TYPE_LONG)\n                value = va_arg(args, signed long);\n            else if (*iter == 'c')\n                value = (unsigned char)va_arg(args, int);\n            else value = va_arg(args, signed int);\n\n            /* convert number to string */\n            nk_itoa(number_buffer, value);\n            num_len = nk_strlen(number_buffer);\n            padding = NK_MAX(cur_width - NK_MAX(cur_precision, num_len), 0);\n            if ((flag & NK_ARG_FLAG_PLUS) || (flag & NK_ARG_FLAG_SPACE))\n                padding = NK_MAX(padding-1, 0);\n\n            /* fill left padding up to a total of `width` characters */\n            if (!(flag & NK_ARG_FLAG_LEFT)) {\n                while (padding-- > 0 && (len < buf_size)) {\n                    if ((flag & NK_ARG_FLAG_ZERO) && (precision == NK_DEFAULT))\n                        buf[len++] = '0';\n                    else buf[len++] = ' ';\n                }\n            }\n\n            /* copy string value representation into buffer */\n            if ((flag & NK_ARG_FLAG_PLUS) && value >= 0 && len < buf_size)\n                buf[len++] = '+';\n            else if ((flag & NK_ARG_FLAG_SPACE) && value >= 0 && len < buf_size)\n                buf[len++] = ' ';\n\n            /* fill up to precision number of digits with '0' */\n            num_print = NK_MAX(cur_precision, num_len);\n            while (precision && (num_print > num_len) && (len < buf_size)) {\n                buf[len++] = '0';\n                num_print--;\n            }\n\n            /* copy string value representation into buffer */\n            num_iter = number_buffer;\n            while (precision && *num_iter && len < buf_size)\n                buf[len++] = *num_iter++;\n\n            /* fill right padding up to width characters */\n            if (flag & NK_ARG_FLAG_LEFT) {\n                while ((padding-- > 0) && (len < buf_size))\n                    buf[len++] = ' ';\n            }\n        } else if (*iter == 'o' || *iter == 'x' || *iter == 'X' || *iter == 'u') {\n            /* unsigned integer */\n            unsigned long value = 0;\n            int num_len = 0, num_print, padding = 0;\n            int cur_precision = NK_MAX(precision, 1);\n            int cur_width = NK_MAX(width, 0);\n            unsigned int base = (*iter == 'o') ? 8: (*iter == 'u')? 10: 16;\n\n            /* print oct/hex/dec value */\n            const char *upper_output_format = \"0123456789ABCDEF\";\n            const char *lower_output_format = \"0123456789abcdef\";\n            const char *output_format = (*iter == 'x') ?\n                lower_output_format: upper_output_format;\n\n            /* retrieve correct value type */\n            if (arg_type == NK_ARG_TYPE_CHAR)\n                value = (unsigned char)va_arg(args, int);\n            else if (arg_type == NK_ARG_TYPE_SHORT)\n                value = (unsigned short)va_arg(args, int);\n            else if (arg_type == NK_ARG_TYPE_LONG)\n                value = va_arg(args, unsigned long);\n            else value = va_arg(args, unsigned int);\n\n            do {\n                /* convert decimal number into hex/oct number */\n                int digit = output_format[value % base];\n                if (num_len < NK_MAX_NUMBER_BUFFER)\n                    number_buffer[num_len++] = (char)digit;\n                value /= base;\n            } while (value > 0);\n\n            num_print = NK_MAX(cur_precision, num_len);\n            padding = NK_MAX(cur_width - NK_MAX(cur_precision, num_len), 0);\n            if (flag & NK_ARG_FLAG_NUM)\n                padding = NK_MAX(padding-1, 0);\n\n            /* fill left padding up to a total of `width` characters */\n            if (!(flag & NK_ARG_FLAG_LEFT)) {\n                while ((padding-- > 0) && (len < buf_size)) {\n                    if ((flag & NK_ARG_FLAG_ZERO) && (precision == NK_DEFAULT))\n                        buf[len++] = '0';\n                    else buf[len++] = ' ';\n                }\n            }\n\n            /* fill up to precision number of digits */\n            if (num_print && (flag & NK_ARG_FLAG_NUM)) {\n                if ((*iter == 'o') && (len < buf_size)) {\n                    buf[len++] = '0';\n                } else if ((*iter == 'x') && ((len+1) < buf_size)) {\n                    buf[len++] = '0';\n                    buf[len++] = 'x';\n                } else if ((*iter == 'X') && ((len+1) < buf_size)) {\n                    buf[len++] = '0';\n                    buf[len++] = 'X';\n                }\n            }\n            while (precision && (num_print > num_len) && (len < buf_size)) {\n                buf[len++] = '0';\n                num_print--;\n            }\n\n            /* reverse number direction */\n            while (num_len > 0) {\n                if (precision && (len < buf_size))\n                    buf[len++] = number_buffer[num_len-1];\n                num_len--;\n            }\n\n            /* fill right padding up to width characters */\n            if (flag & NK_ARG_FLAG_LEFT) {\n                while ((padding-- > 0) && (len < buf_size))\n                    buf[len++] = ' ';\n            }\n        } else if (*iter == 'f') {\n            /* floating point */\n            const char *num_iter;\n            int cur_precision = (precision < 0) ? 6: precision;\n            int prefix, cur_width = NK_MAX(width, 0);\n            double value = va_arg(args, double);\n            int num_len = 0, frac_len = 0, dot = 0;\n            int padding = 0;\n\n            NK_ASSERT(arg_type == NK_ARG_TYPE_DEFAULT);\n            NK_DTOA(number_buffer, value);\n            num_len = nk_strlen(number_buffer);\n\n            /* calculate padding */\n            num_iter = number_buffer;\n            while (*num_iter && *num_iter != '.')\n                num_iter++;\n\n            prefix = (*num_iter == '.')?(int)(num_iter - number_buffer)+1:0;\n            padding = NK_MAX(cur_width - (prefix + NK_MIN(cur_precision, num_len - prefix)) , 0);\n            if ((flag & NK_ARG_FLAG_PLUS) || (flag & NK_ARG_FLAG_SPACE))\n                padding = NK_MAX(padding-1, 0);\n\n            /* fill left padding up to a total of `width` characters */\n            if (!(flag & NK_ARG_FLAG_LEFT)) {\n                while (padding-- > 0 && (len < buf_size)) {\n                    if (flag & NK_ARG_FLAG_ZERO)\n                        buf[len++] = '0';\n                    else buf[len++] = ' ';\n                }\n            }\n\n            /* copy string value representation into buffer */\n            num_iter = number_buffer;\n            if ((flag & NK_ARG_FLAG_PLUS) && (value >= 0) && (len < buf_size))\n                buf[len++] = '+';\n            else if ((flag & NK_ARG_FLAG_SPACE) && (value >= 0) && (len < buf_size))\n                buf[len++] = ' ';\n            while (*num_iter) {\n                if (dot) frac_len++;\n                if (len < buf_size)\n                    buf[len++] = *num_iter;\n                if (*num_iter == '.') dot = 1;\n                if (frac_len >= cur_precision) break;\n                num_iter++;\n            }\n\n            /* fill number up to precision */\n            while (frac_len < cur_precision) {\n                if (!dot && len < buf_size) {\n                    buf[len++] = '.';\n                    dot = 1;\n                }\n                if (len < buf_size)\n                    buf[len++] = '0';\n                frac_len++;\n            }\n\n            /* fill right padding up to width characters */\n            if (flag & NK_ARG_FLAG_LEFT) {\n                while ((padding-- > 0) && (len < buf_size))\n                    buf[len++] = ' ';\n            }\n        } else {\n            /* Specifier not supported: g,G,e,E,p,z */\n            NK_ASSERT(0 && \"specifier is not supported!\");\n            return result;\n        }\n    }\n    buf[(len >= buf_size)?(buf_size-1):len] = 0;\n    result = (len >= buf_size)?-1:len;\n    return result;\n}\n#endif\nNK_LIB int\nnk_strfmt(char *buf, int buf_size, const char *fmt, va_list args)\n{\n    int result = -1;\n    NK_ASSERT(buf);\n    NK_ASSERT(buf_size);\n    if (!buf || !buf_size || !fmt) return 0;\n#ifdef NK_INCLUDE_STANDARD_IO\n    result = NK_VSNPRINTF(buf, (nk_size)buf_size, fmt, args);\n    result = (result >= buf_size) ? -1: result;\n    buf[buf_size-1] = 0;\n#else\n    result = nk_vsnprintf(buf, buf_size, fmt, args);\n#endif\n    return result;\n}\n#endif\nNK_API nk_hash\nnk_murmur_hash(const void * key, int len, nk_hash seed)\n{\n    /* 32-Bit MurmurHash3: https://code.google.com/p/smhasher/wiki/MurmurHash3*/\n    #define NK_ROTL(x,r) ((x) << (r) | ((x) >> (32 - r)))\n    union {const nk_uint *i; const nk_byte *b;} conv = {0};\n    const nk_byte *data = (const nk_byte*)key;\n    const int nblocks = len/4;\n    nk_uint h1 = seed;\n    const nk_uint c1 = 0xcc9e2d51;\n    const nk_uint c2 = 0x1b873593;\n    const nk_byte *tail;\n    const nk_uint *blocks;\n    nk_uint k1;\n    int i;\n\n    /* body */\n    if (!key) return 0;\n    conv.b = (data + nblocks*4);\n    blocks = (const nk_uint*)conv.i;\n    for (i = -nblocks; i; ++i) {\n        k1 = blocks[i];\n        k1 *= c1;\n        k1 = NK_ROTL(k1,15);\n        k1 *= c2;\n\n        h1 ^= k1;\n        h1 = NK_ROTL(h1,13);\n        h1 = h1*5+0xe6546b64;\n    }\n\n    /* tail */\n    tail = (const nk_byte*)(data + nblocks*4);\n    k1 = 0;\n    switch (len & 3) {\n    case 3: k1 ^= (nk_uint)(tail[2] << 16); /* fallthrough */\n    case 2: k1 ^= (nk_uint)(tail[1] << 8u); /* fallthrough */\n    case 1: k1 ^= tail[0];\n            k1 *= c1;\n            k1 = NK_ROTL(k1,15);\n            k1 *= c2;\n            h1 ^= k1;\n            break;\n    default: break;\n    }\n\n    /* finalization */\n    h1 ^= (nk_uint)len;\n    /* fmix32 */\n    h1 ^= h1 >> 16;\n    h1 *= 0x85ebca6b;\n    h1 ^= h1 >> 13;\n    h1 *= 0xc2b2ae35;\n    h1 ^= h1 >> 16;\n\n    #undef NK_ROTL\n    return h1;\n}\n#ifdef NK_INCLUDE_STANDARD_IO\nNK_LIB char*\nnk_file_load(const char* path, nk_size* siz, struct nk_allocator *alloc)\n{\n    char *buf;\n    FILE *fd;\n    long ret;\n\n    NK_ASSERT(path);\n    NK_ASSERT(siz);\n    NK_ASSERT(alloc);\n    if (!path || !siz || !alloc)\n        return 0;\n\n    fd = fopen(path, \"rb\");\n    if (!fd) return 0;\n    fseek(fd, 0, SEEK_END);\n    ret = ftell(fd);\n    if (ret < 0) {\n        fclose(fd);\n        return 0;\n    }\n    *siz = (nk_size)ret;\n    fseek(fd, 0, SEEK_SET);\n    buf = (char*)alloc->alloc(alloc->userdata,0, *siz);\n    NK_ASSERT(buf);\n    if (!buf) {\n        fclose(fd);\n        return 0;\n    }\n    *siz = (nk_size)fread(buf, 1,*siz, fd);\n    fclose(fd);\n    return buf;\n}\n#endif\nNK_LIB int\nnk_text_clamp(const struct nk_user_font *font, const char *text,\n    int text_len, float space, int *glyphs, float *text_width,\n    nk_rune *sep_list, int sep_count)\n{\n    int i = 0;\n    int glyph_len = 0;\n    float last_width = 0;\n    nk_rune unicode = 0;\n    float width = 0;\n    int len = 0;\n    int g = 0;\n    float s;\n\n    int sep_len = 0;\n    int sep_g = 0;\n    float sep_width = 0;\n    sep_count = NK_MAX(sep_count,0);\n\n    glyph_len = nk_utf_decode(text, &unicode, text_len);\n    while (glyph_len && (width < space) && (len < text_len)) {\n        len += glyph_len;\n        s = font->width(font->userdata, font->height, text, len);\n        for (i = 0; i < sep_count; ++i) {\n            if (unicode != sep_list[i]) continue;\n            sep_width = last_width = width;\n            sep_g = g+1;\n            sep_len = len;\n            break;\n        }\n        if (i == sep_count){\n            last_width = sep_width = width;\n            sep_g = g+1;\n        }\n        width = s;\n        glyph_len = nk_utf_decode(&text[len], &unicode, text_len - len);\n        g++;\n    }\n    if (len >= text_len) {\n        *glyphs = g;\n        *text_width = last_width;\n        return len;\n    } else {\n        *glyphs = sep_g;\n        *text_width = sep_width;\n        return (!sep_len) ? len: sep_len;\n    }\n}\nNK_LIB struct nk_vec2\nnk_text_calculate_text_bounds(const struct nk_user_font *font,\n    const char *begin, int byte_len, float row_height, const char **remaining,\n    struct nk_vec2 *out_offset, int *glyphs, int op)\n{\n    float line_height = row_height;\n    struct nk_vec2 text_size = nk_vec2(0,0);\n    float line_width = 0.0f;\n\n    float glyph_width;\n    int glyph_len = 0;\n    nk_rune unicode = 0;\n    int text_len = 0;\n    if (!begin || byte_len <= 0 || !font)\n        return nk_vec2(0,row_height);\n\n    glyph_len = nk_utf_decode(begin, &unicode, byte_len);\n    if (!glyph_len) return text_size;\n    glyph_width = font->width(font->userdata, font->height, begin, glyph_len);\n\n    *glyphs = 0;\n    while ((text_len < byte_len) && glyph_len) {\n        if (unicode == '\\n') {\n            text_size.x = NK_MAX(text_size.x, line_width);\n            text_size.y += line_height;\n            line_width = 0;\n            *glyphs+=1;\n            if (op == NK_STOP_ON_NEW_LINE)\n                break;\n\n            text_len++;\n            glyph_len = nk_utf_decode(begin + text_len, &unicode, byte_len-text_len);\n            continue;\n        }\n\n        if (unicode == '\\r') {\n            text_len++;\n            *glyphs+=1;\n            glyph_len = nk_utf_decode(begin + text_len, &unicode, byte_len-text_len);\n            continue;\n        }\n\n        *glyphs = *glyphs + 1;\n        text_len += glyph_len;\n        line_width += (float)glyph_width;\n        glyph_len = nk_utf_decode(begin + text_len, &unicode, byte_len-text_len);\n        glyph_width = font->width(font->userdata, font->height, begin+text_len, glyph_len);\n        continue;\n    }\n\n    if (text_size.x < line_width)\n        text_size.x = line_width;\n    if (out_offset)\n        *out_offset = nk_vec2(line_width, text_size.y + line_height);\n    if (line_width > 0 || text_size.y == 0.0f)\n        text_size.y += line_height;\n    if (remaining)\n        *remaining = begin+text_len;\n    return text_size;\n}\n\n\n\n\n\n/* ==============================================================\n *\n *                          COLOR\n *\n * ===============================================================*/\nNK_INTERN int\nnk_parse_hex(const char *p, int length)\n{\n    int i = 0;\n    int len = 0;\n    while (len < length) {\n        i <<= 4;\n        if (p[len] >= 'a' && p[len] <= 'f')\n            i += ((p[len] - 'a') + 10);\n        else if (p[len] >= 'A' && p[len] <= 'F')\n            i += ((p[len] - 'A') + 10);\n        else i += (p[len] - '0');\n        len++;\n    }\n    return i;\n}\nNK_API struct nk_color\nnk_rgba(int r, int g, int b, int a)\n{\n    struct nk_color ret;\n    ret.r = (nk_byte)NK_CLAMP(0, r, 255);\n    ret.g = (nk_byte)NK_CLAMP(0, g, 255);\n    ret.b = (nk_byte)NK_CLAMP(0, b, 255);\n    ret.a = (nk_byte)NK_CLAMP(0, a, 255);\n    return ret;\n}\nNK_API struct nk_color\nnk_rgb_hex(const char *rgb)\n{\n    struct nk_color col;\n    const char *c = rgb;\n    if (*c == '#') c++;\n    col.r = (nk_byte)nk_parse_hex(c, 2);\n    col.g = (nk_byte)nk_parse_hex(c+2, 2);\n    col.b = (nk_byte)nk_parse_hex(c+4, 2);\n    col.a = 255;\n    return col;\n}\nNK_API struct nk_color\nnk_rgba_hex(const char *rgb)\n{\n    struct nk_color col;\n    const char *c = rgb;\n    if (*c == '#') c++;\n    col.r = (nk_byte)nk_parse_hex(c, 2);\n    col.g = (nk_byte)nk_parse_hex(c+2, 2);\n    col.b = (nk_byte)nk_parse_hex(c+4, 2);\n    col.a = (nk_byte)nk_parse_hex(c+6, 2);\n    return col;\n}\nNK_API void\nnk_color_hex_rgba(char *output, struct nk_color col)\n{\n    #define NK_TO_HEX(i) ((i) <= 9 ? '0' + (i): 'A' - 10 + (i))\n    output[0] = (char)NK_TO_HEX((col.r & 0xF0) >> 4);\n    output[1] = (char)NK_TO_HEX((col.r & 0x0F));\n    output[2] = (char)NK_TO_HEX((col.g & 0xF0) >> 4);\n    output[3] = (char)NK_TO_HEX((col.g & 0x0F));\n    output[4] = (char)NK_TO_HEX((col.b & 0xF0) >> 4);\n    output[5] = (char)NK_TO_HEX((col.b & 0x0F));\n    output[6] = (char)NK_TO_HEX((col.a & 0xF0) >> 4);\n    output[7] = (char)NK_TO_HEX((col.a & 0x0F));\n    output[8] = '\\0';\n    #undef NK_TO_HEX\n}\nNK_API void\nnk_color_hex_rgb(char *output, struct nk_color col)\n{\n    #define NK_TO_HEX(i) ((i) <= 9 ? '0' + (i): 'A' - 10 + (i))\n    output[0] = (char)NK_TO_HEX((col.r & 0xF0) >> 4);\n    output[1] = (char)NK_TO_HEX((col.r & 0x0F));\n    output[2] = (char)NK_TO_HEX((col.g & 0xF0) >> 4);\n    output[3] = (char)NK_TO_HEX((col.g & 0x0F));\n    output[4] = (char)NK_TO_HEX((col.b & 0xF0) >> 4);\n    output[5] = (char)NK_TO_HEX((col.b & 0x0F));\n    output[6] = '\\0';\n    #undef NK_TO_HEX\n}\nNK_API struct nk_color\nnk_rgba_iv(const int *c)\n{\n    return nk_rgba(c[0], c[1], c[2], c[3]);\n}\nNK_API struct nk_color\nnk_rgba_bv(const nk_byte *c)\n{\n    return nk_rgba(c[0], c[1], c[2], c[3]);\n}\nNK_API struct nk_color\nnk_rgb(int r, int g, int b)\n{\n    struct nk_color ret;\n    ret.r = (nk_byte)NK_CLAMP(0, r, 255);\n    ret.g = (nk_byte)NK_CLAMP(0, g, 255);\n    ret.b = (nk_byte)NK_CLAMP(0, b, 255);\n    ret.a = (nk_byte)255;\n    return ret;\n}\nNK_API struct nk_color\nnk_rgb_iv(const int *c)\n{\n    return nk_rgb(c[0], c[1], c[2]);\n}\nNK_API struct nk_color\nnk_rgb_bv(const nk_byte* c)\n{\n    return nk_rgb(c[0], c[1], c[2]);\n}\nNK_API struct nk_color\nnk_rgba_u32(nk_uint in)\n{\n    struct nk_color ret;\n    ret.r = (in & 0xFF);\n    ret.g = ((in >> 8) & 0xFF);\n    ret.b = ((in >> 16) & 0xFF);\n    ret.a = (nk_byte)((in >> 24) & 0xFF);\n    return ret;\n}\nNK_API struct nk_color\nnk_rgba_f(float r, float g, float b, float a)\n{\n    struct nk_color ret;\n    ret.r = (nk_byte)(NK_SATURATE(r) * 255.0f);\n    ret.g = (nk_byte)(NK_SATURATE(g) * 255.0f);\n    ret.b = (nk_byte)(NK_SATURATE(b) * 255.0f);\n    ret.a = (nk_byte)(NK_SATURATE(a) * 255.0f);\n    return ret;\n}\nNK_API struct nk_color\nnk_rgba_fv(const float *c)\n{\n    return nk_rgba_f(c[0], c[1], c[2], c[3]);\n}\nNK_API struct nk_color\nnk_rgba_cf(struct nk_colorf c)\n{\n    return nk_rgba_f(c.r, c.g, c.b, c.a);\n}\nNK_API struct nk_color\nnk_rgb_f(float r, float g, float b)\n{\n    struct nk_color ret;\n    ret.r = (nk_byte)(NK_SATURATE(r) * 255.0f);\n    ret.g = (nk_byte)(NK_SATURATE(g) * 255.0f);\n    ret.b = (nk_byte)(NK_SATURATE(b) * 255.0f);\n    ret.a = 255;\n    return ret;\n}\nNK_API struct nk_color\nnk_rgb_fv(const float *c)\n{\n    return nk_rgb_f(c[0], c[1], c[2]);\n}\nNK_API struct nk_color\nnk_rgb_cf(struct nk_colorf c)\n{\n    return nk_rgb_f(c.r, c.g, c.b);\n}\nNK_API struct nk_color\nnk_hsv(int h, int s, int v)\n{\n    return nk_hsva(h, s, v, 255);\n}\nNK_API struct nk_color\nnk_hsv_iv(const int *c)\n{\n    return nk_hsv(c[0], c[1], c[2]);\n}\nNK_API struct nk_color\nnk_hsv_bv(const nk_byte *c)\n{\n    return nk_hsv(c[0], c[1], c[2]);\n}\nNK_API struct nk_color\nnk_hsv_f(float h, float s, float v)\n{\n    return nk_hsva_f(h, s, v, 1.0f);\n}\nNK_API struct nk_color\nnk_hsv_fv(const float *c)\n{\n    return nk_hsv_f(c[0], c[1], c[2]);\n}\nNK_API struct nk_color\nnk_hsva(int h, int s, int v, int a)\n{\n    float hf = ((float)NK_CLAMP(0, h, 255)) / 255.0f;\n    float sf = ((float)NK_CLAMP(0, s, 255)) / 255.0f;\n    float vf = ((float)NK_CLAMP(0, v, 255)) / 255.0f;\n    float af = ((float)NK_CLAMP(0, a, 255)) / 255.0f;\n    return nk_hsva_f(hf, sf, vf, af);\n}\nNK_API struct nk_color\nnk_hsva_iv(const int *c)\n{\n    return nk_hsva(c[0], c[1], c[2], c[3]);\n}\nNK_API struct nk_color\nnk_hsva_bv(const nk_byte *c)\n{\n    return nk_hsva(c[0], c[1], c[2], c[3]);\n}\nNK_API struct nk_colorf\nnk_hsva_colorf(float h, float s, float v, float a)\n{\n    int i;\n    float p, q, t, f;\n    struct nk_colorf out = {0,0,0,0};\n    if (s <= 0.0f) {\n        out.r = v; out.g = v; out.b = v; out.a = a;\n        return out;\n    }\n    h = h / (60.0f/360.0f);\n    i = (int)h;\n    f = h - (float)i;\n    p = v * (1.0f - s);\n    q = v * (1.0f - (s * f));\n    t = v * (1.0f - s * (1.0f - f));\n\n    switch (i) {\n    case 0: default: out.r = v; out.g = t; out.b = p; break;\n    case 1: out.r = q; out.g = v; out.b = p; break;\n    case 2: out.r = p; out.g = v; out.b = t; break;\n    case 3: out.r = p; out.g = q; out.b = v; break;\n    case 4: out.r = t; out.g = p; out.b = v; break;\n    case 5: out.r = v; out.g = p; out.b = q; break;}\n    out.a = a;\n    return out;\n}\nNK_API struct nk_colorf\nnk_hsva_colorfv(float *c)\n{\n    return nk_hsva_colorf(c[0], c[1], c[2], c[3]);\n}\nNK_API struct nk_color\nnk_hsva_f(float h, float s, float v, float a)\n{\n    struct nk_colorf c = nk_hsva_colorf(h, s, v, a);\n    return nk_rgba_f(c.r, c.g, c.b, c.a);\n}\nNK_API struct nk_color\nnk_hsva_fv(const float *c)\n{\n    return nk_hsva_f(c[0], c[1], c[2], c[3]);\n}\nNK_API nk_uint\nnk_color_u32(struct nk_color in)\n{\n    nk_uint out = (nk_uint)in.r;\n    out |= ((nk_uint)in.g << 8);\n    out |= ((nk_uint)in.b << 16);\n    out |= ((nk_uint)in.a << 24);\n    return out;\n}\nNK_API void\nnk_color_f(float *r, float *g, float *b, float *a, struct nk_color in)\n{\n    NK_STORAGE const float s = 1.0f/255.0f;\n    *r = (float)in.r * s;\n    *g = (float)in.g * s;\n    *b = (float)in.b * s;\n    *a = (float)in.a * s;\n}\nNK_API void\nnk_color_fv(float *c, struct nk_color in)\n{\n    nk_color_f(&c[0], &c[1], &c[2], &c[3], in);\n}\nNK_API struct nk_colorf\nnk_color_cf(struct nk_color in)\n{\n    struct nk_colorf o;\n    nk_color_f(&o.r, &o.g, &o.b, &o.a, in);\n    return o;\n}\nNK_API void\nnk_color_d(double *r, double *g, double *b, double *a, struct nk_color in)\n{\n    NK_STORAGE const double s = 1.0/255.0;\n    *r = (double)in.r * s;\n    *g = (double)in.g * s;\n    *b = (double)in.b * s;\n    *a = (double)in.a * s;\n}\nNK_API void\nnk_color_dv(double *c, struct nk_color in)\n{\n    nk_color_d(&c[0], &c[1], &c[2], &c[3], in);\n}\nNK_API void\nnk_color_hsv_f(float *out_h, float *out_s, float *out_v, struct nk_color in)\n{\n    float a;\n    nk_color_hsva_f(out_h, out_s, out_v, &a, in);\n}\nNK_API void\nnk_color_hsv_fv(float *out, struct nk_color in)\n{\n    float a;\n    nk_color_hsva_f(&out[0], &out[1], &out[2], &a, in);\n}\nNK_API void\nnk_colorf_hsva_f(float *out_h, float *out_s,\n    float *out_v, float *out_a, struct nk_colorf in)\n{\n    float chroma;\n    float K = 0.0f;\n    if (in.g < in.b) {\n        const float t = in.g; in.g = in.b; in.b = t;\n        K = -1.f;\n    }\n    if (in.r < in.g) {\n        const float t = in.r; in.r = in.g; in.g = t;\n        K = -2.f/6.0f - K;\n    }\n    chroma = in.r - ((in.g < in.b) ? in.g: in.b);\n    *out_h = NK_ABS(K + (in.g - in.b)/(6.0f * chroma + 1e-20f));\n    *out_s = chroma / (in.r + 1e-20f);\n    *out_v = in.r;\n    *out_a = in.a;\n\n}\nNK_API void\nnk_colorf_hsva_fv(float *hsva, struct nk_colorf in)\n{\n    nk_colorf_hsva_f(&hsva[0], &hsva[1], &hsva[2], &hsva[3], in);\n}\nNK_API void\nnk_color_hsva_f(float *out_h, float *out_s,\n    float *out_v, float *out_a, struct nk_color in)\n{\n    struct nk_colorf col;\n    nk_color_f(&col.r,&col.g,&col.b,&col.a, in);\n    nk_colorf_hsva_f(out_h, out_s, out_v, out_a, col);\n}\nNK_API void\nnk_color_hsva_fv(float *out, struct nk_color in)\n{\n    nk_color_hsva_f(&out[0], &out[1], &out[2], &out[3], in);\n}\nNK_API void\nnk_color_hsva_i(int *out_h, int *out_s, int *out_v,\n                int *out_a, struct nk_color in)\n{\n    float h,s,v,a;\n    nk_color_hsva_f(&h, &s, &v, &a, in);\n    *out_h = (nk_byte)(h * 255.0f);\n    *out_s = (nk_byte)(s * 255.0f);\n    *out_v = (nk_byte)(v * 255.0f);\n    *out_a = (nk_byte)(a * 255.0f);\n}\nNK_API void\nnk_color_hsva_iv(int *out, struct nk_color in)\n{\n    nk_color_hsva_i(&out[0], &out[1], &out[2], &out[3], in);\n}\nNK_API void\nnk_color_hsva_bv(nk_byte *out, struct nk_color in)\n{\n    int tmp[4];\n    nk_color_hsva_i(&tmp[0], &tmp[1], &tmp[2], &tmp[3], in);\n    out[0] = (nk_byte)tmp[0];\n    out[1] = (nk_byte)tmp[1];\n    out[2] = (nk_byte)tmp[2];\n    out[3] = (nk_byte)tmp[3];\n}\nNK_API void\nnk_color_hsva_b(nk_byte *h, nk_byte *s, nk_byte *v, nk_byte *a, struct nk_color in)\n{\n    int tmp[4];\n    nk_color_hsva_i(&tmp[0], &tmp[1], &tmp[2], &tmp[3], in);\n    *h = (nk_byte)tmp[0];\n    *s = (nk_byte)tmp[1];\n    *v = (nk_byte)tmp[2];\n    *a = (nk_byte)tmp[3];\n}\nNK_API void\nnk_color_hsv_i(int *out_h, int *out_s, int *out_v, struct nk_color in)\n{\n    int a;\n    nk_color_hsva_i(out_h, out_s, out_v, &a, in);\n}\nNK_API void\nnk_color_hsv_b(nk_byte *out_h, nk_byte *out_s, nk_byte *out_v, struct nk_color in)\n{\n    int tmp[4];\n    nk_color_hsva_i(&tmp[0], &tmp[1], &tmp[2], &tmp[3], in);\n    *out_h = (nk_byte)tmp[0];\n    *out_s = (nk_byte)tmp[1];\n    *out_v = (nk_byte)tmp[2];\n}\nNK_API void\nnk_color_hsv_iv(int *out, struct nk_color in)\n{\n    nk_color_hsv_i(&out[0], &out[1], &out[2], in);\n}\nNK_API void\nnk_color_hsv_bv(nk_byte *out, struct nk_color in)\n{\n    int tmp[4];\n    nk_color_hsv_i(&tmp[0], &tmp[1], &tmp[2], in);\n    out[0] = (nk_byte)tmp[0];\n    out[1] = (nk_byte)tmp[1];\n    out[2] = (nk_byte)tmp[2];\n}\n\n\n\n\n\n/* ===============================================================\n *\n *                              UTF-8\n *\n * ===============================================================*/\nNK_GLOBAL const nk_byte nk_utfbyte[NK_UTF_SIZE+1] = {0x80, 0, 0xC0, 0xE0, 0xF0};\nNK_GLOBAL const nk_byte nk_utfmask[NK_UTF_SIZE+1] = {0xC0, 0x80, 0xE0, 0xF0, 0xF8};\nNK_GLOBAL const nk_uint nk_utfmin[NK_UTF_SIZE+1] = {0, 0, 0x80, 0x800, 0x10000};\nNK_GLOBAL const nk_uint nk_utfmax[NK_UTF_SIZE+1] = {0x10FFFF, 0x7F, 0x7FF, 0xFFFF, 0x10FFFF};\n\nNK_INTERN int\nnk_utf_validate(nk_rune *u, int i)\n{\n    NK_ASSERT(u);\n    if (!u) return 0;\n    if (!NK_BETWEEN(*u, nk_utfmin[i], nk_utfmax[i]) ||\n         NK_BETWEEN(*u, 0xD800, 0xDFFF))\n            *u = NK_UTF_INVALID;\n    for (i = 1; *u > nk_utfmax[i]; ++i);\n    return i;\n}\nNK_INTERN nk_rune\nnk_utf_decode_byte(char c, int *i)\n{\n    NK_ASSERT(i);\n    if (!i) return 0;\n    for(*i = 0; *i < (int)NK_LEN(nk_utfmask); ++(*i)) {\n        if (((nk_byte)c & nk_utfmask[*i]) == nk_utfbyte[*i])\n            return (nk_byte)(c & ~nk_utfmask[*i]);\n    }\n    return 0;\n}\nNK_API int\nnk_utf_decode(const char *c, nk_rune *u, int clen)\n{\n    int i, j, len, type=0;\n    nk_rune udecoded;\n\n    NK_ASSERT(c);\n    NK_ASSERT(u);\n\n    if (!c || !u) return 0;\n    if (!clen) return 0;\n    *u = NK_UTF_INVALID;\n\n    udecoded = nk_utf_decode_byte(c[0], &len);\n    if (!NK_BETWEEN(len, 1, NK_UTF_SIZE))\n        return 1;\n\n    for (i = 1, j = 1; i < clen && j < len; ++i, ++j) {\n        udecoded = (udecoded << 6) | nk_utf_decode_byte(c[i], &type);\n        if (type != 0)\n            return j;\n    }\n    if (j < len)\n        return 0;\n    *u = udecoded;\n    nk_utf_validate(u, len);\n    return len;\n}\nNK_INTERN char\nnk_utf_encode_byte(nk_rune u, int i)\n{\n    return (char)((nk_utfbyte[i]) | ((nk_byte)u & ~nk_utfmask[i]));\n}\nNK_API int\nnk_utf_encode(nk_rune u, char *c, int clen)\n{\n    int len, i;\n    len = nk_utf_validate(&u, 0);\n    if (clen < len || !len || len > NK_UTF_SIZE)\n        return 0;\n\n    for (i = len - 1; i != 0; --i) {\n        c[i] = nk_utf_encode_byte(u, 0);\n        u >>= 6;\n    }\n    c[0] = nk_utf_encode_byte(u, len);\n    return len;\n}\nNK_API int\nnk_utf_len(const char *str, int len)\n{\n    const char *text;\n    int glyphs = 0;\n    int text_len;\n    int glyph_len;\n    int src_len = 0;\n    nk_rune unicode;\n\n    NK_ASSERT(str);\n    if (!str || !len) return 0;\n\n    text = str;\n    text_len = len;\n    glyph_len = nk_utf_decode(text, &unicode, text_len);\n    while (glyph_len && src_len < len) {\n        glyphs++;\n        src_len = src_len + glyph_len;\n        glyph_len = nk_utf_decode(text + src_len, &unicode, text_len - src_len);\n    }\n    return glyphs;\n}\nNK_API const char*\nnk_utf_at(const char *buffer, int length, int index,\n    nk_rune *unicode, int *len)\n{\n    int i = 0;\n    int src_len = 0;\n    int glyph_len = 0;\n    const char *text;\n    int text_len;\n\n    NK_ASSERT(buffer);\n    NK_ASSERT(unicode);\n    NK_ASSERT(len);\n\n    if (!buffer || !unicode || !len) return 0;\n    if (index < 0) {\n        *unicode = NK_UTF_INVALID;\n        *len = 0;\n        return 0;\n    }\n\n    text = buffer;\n    text_len = length;\n    glyph_len = nk_utf_decode(text, unicode, text_len);\n    while (glyph_len) {\n        if (i == index) {\n            *len = glyph_len;\n            break;\n        }\n\n        i++;\n        src_len = src_len + glyph_len;\n        glyph_len = nk_utf_decode(text + src_len, unicode, text_len - src_len);\n    }\n    if (i != index) return 0;\n    return buffer + src_len;\n}\n\n\n\n\n\n/* ==============================================================\n *\n *                          BUFFER\n *\n * ===============================================================*/\n#ifdef NK_INCLUDE_DEFAULT_ALLOCATOR\nNK_LIB void*\nnk_malloc(nk_handle unused, void *old,nk_size size)\n{\n    NK_UNUSED(unused);\n    NK_UNUSED(old);\n    return malloc(size);\n}\nNK_LIB void\nnk_mfree(nk_handle unused, void *ptr)\n{\n    NK_UNUSED(unused);\n    free(ptr);\n}\nNK_API void\nnk_buffer_init_default(struct nk_buffer *buffer)\n{\n    struct nk_allocator alloc;\n    alloc.userdata.ptr = 0;\n    alloc.alloc = nk_malloc;\n    alloc.free = nk_mfree;\n    nk_buffer_init(buffer, &alloc, NK_BUFFER_DEFAULT_INITIAL_SIZE);\n}\n#endif\n\nNK_API void\nnk_buffer_init(struct nk_buffer *b, const struct nk_allocator *a,\n    nk_size initial_size)\n{\n    NK_ASSERT(b);\n    NK_ASSERT(a);\n    NK_ASSERT(initial_size);\n    if (!b || !a || !initial_size) return;\n\n    nk_zero(b, sizeof(*b));\n    b->type = NK_BUFFER_DYNAMIC;\n    b->memory.ptr = a->alloc(a->userdata,0, initial_size);\n    b->memory.size = initial_size;\n    b->size = initial_size;\n    b->grow_factor = 2.0f;\n    b->pool = *a;\n}\nNK_API void\nnk_buffer_init_fixed(struct nk_buffer *b, void *m, nk_size size)\n{\n    NK_ASSERT(b);\n    NK_ASSERT(m);\n    NK_ASSERT(size);\n    if (!b || !m || !size) return;\n\n    nk_zero(b, sizeof(*b));\n    b->type = NK_BUFFER_FIXED;\n    b->memory.ptr = m;\n    b->memory.size = size;\n    b->size = size;\n}\nNK_LIB void*\nnk_buffer_align(void *unaligned,\n    nk_size align, nk_size *alignment,\n    enum nk_buffer_allocation_type type)\n{\n    void *memory = 0;\n    switch (type) {\n    default:\n    case NK_BUFFER_MAX:\n    case NK_BUFFER_FRONT:\n        if (align) {\n            memory = NK_ALIGN_PTR(unaligned, align);\n            *alignment = (nk_size)((nk_byte*)memory - (nk_byte*)unaligned);\n        } else {\n            memory = unaligned;\n            *alignment = 0;\n        }\n        break;\n    case NK_BUFFER_BACK:\n        if (align) {\n            memory = NK_ALIGN_PTR_BACK(unaligned, align);\n            *alignment = (nk_size)((nk_byte*)unaligned - (nk_byte*)memory);\n        } else {\n            memory = unaligned;\n            *alignment = 0;\n        }\n        break;\n    }\n    return memory;\n}\nNK_LIB void*\nnk_buffer_realloc(struct nk_buffer *b, nk_size capacity, nk_size *size)\n{\n    void *temp;\n    nk_size buffer_size;\n\n    NK_ASSERT(b);\n    NK_ASSERT(size);\n    if (!b || !size || !b->pool.alloc || !b->pool.free)\n        return 0;\n\n    buffer_size = b->memory.size;\n    temp = b->pool.alloc(b->pool.userdata, b->memory.ptr, capacity);\n    NK_ASSERT(temp);\n    if (!temp) return 0;\n\n    *size = capacity;\n    if (temp != b->memory.ptr) {\n        NK_MEMCPY(temp, b->memory.ptr, buffer_size);\n        b->pool.free(b->pool.userdata, b->memory.ptr);\n    }\n\n    if (b->size == buffer_size) {\n        /* no back buffer so just set correct size */\n        b->size = capacity;\n        return temp;\n    } else {\n        /* copy back buffer to the end of the new buffer */\n        void *dst, *src;\n        nk_size back_size;\n        back_size = buffer_size - b->size;\n        dst = nk_ptr_add(void, temp, capacity - back_size);\n        src = nk_ptr_add(void, temp, b->size);\n        NK_MEMCPY(dst, src, back_size);\n        b->size = capacity - back_size;\n    }\n    return temp;\n}\nNK_LIB void*\nnk_buffer_alloc(struct nk_buffer *b, enum nk_buffer_allocation_type type,\n    nk_size size, nk_size align)\n{\n    int full;\n    nk_size alignment;\n    void *unaligned;\n    void *memory;\n\n    NK_ASSERT(b);\n    NK_ASSERT(size);\n    if (!b || !size) return 0;\n    b->needed += size;\n\n    /* calculate total size with needed alignment + size */\n    if (type == NK_BUFFER_FRONT)\n        unaligned = nk_ptr_add(void, b->memory.ptr, b->allocated);\n    else unaligned = nk_ptr_add(void, b->memory.ptr, b->size - size);\n    memory = nk_buffer_align(unaligned, align, &alignment, type);\n\n    /* check if buffer has enough memory*/\n    if (type == NK_BUFFER_FRONT)\n        full = ((b->allocated + size + alignment) > b->size);\n    else full = ((b->size - NK_MIN(b->size,(size + alignment))) <= b->allocated);\n\n    if (full) {\n        nk_size capacity;\n        if (b->type != NK_BUFFER_DYNAMIC)\n            return 0;\n        NK_ASSERT(b->pool.alloc && b->pool.free);\n        if (b->type != NK_BUFFER_DYNAMIC || !b->pool.alloc || !b->pool.free)\n            return 0;\n\n        /* buffer is full so allocate bigger buffer if dynamic */\n        capacity = (nk_size)((float)b->memory.size * b->grow_factor);\n        capacity = NK_MAX(capacity, nk_round_up_pow2((nk_uint)(b->allocated + size)));\n        b->memory.ptr = nk_buffer_realloc(b, capacity, &b->memory.size);\n        if (!b->memory.ptr) return 0;\n\n        /* align newly allocated pointer */\n        if (type == NK_BUFFER_FRONT)\n            unaligned = nk_ptr_add(void, b->memory.ptr, b->allocated);\n        else unaligned = nk_ptr_add(void, b->memory.ptr, b->size - size);\n        memory = nk_buffer_align(unaligned, align, &alignment, type);\n    }\n    if (type == NK_BUFFER_FRONT)\n        b->allocated += size + alignment;\n    else b->size -= (size + alignment);\n    b->needed += alignment;\n    b->calls++;\n    return memory;\n}\nNK_API void\nnk_buffer_push(struct nk_buffer *b, enum nk_buffer_allocation_type type,\n    const void *memory, nk_size size, nk_size align)\n{\n    void *mem = nk_buffer_alloc(b, type, size, align);\n    if (!mem) return;\n    NK_MEMCPY(mem, memory, size);\n}\nNK_API void\nnk_buffer_mark(struct nk_buffer *buffer, enum nk_buffer_allocation_type type)\n{\n    NK_ASSERT(buffer);\n    if (!buffer) return;\n    buffer->marker[type].active = nk_true;\n    if (type == NK_BUFFER_BACK)\n        buffer->marker[type].offset = buffer->size;\n    else buffer->marker[type].offset = buffer->allocated;\n}\nNK_API void\nnk_buffer_reset(struct nk_buffer *buffer, enum nk_buffer_allocation_type type)\n{\n    NK_ASSERT(buffer);\n    if (!buffer) return;\n    if (type == NK_BUFFER_BACK) {\n        /* reset back buffer either back to marker or empty */\n        buffer->needed -= (buffer->memory.size - buffer->marker[type].offset);\n        if (buffer->marker[type].active)\n            buffer->size = buffer->marker[type].offset;\n        else buffer->size = buffer->memory.size;\n        buffer->marker[type].active = nk_false;\n    } else {\n        /* reset front buffer either back to back marker or empty */\n        buffer->needed -= (buffer->allocated - buffer->marker[type].offset);\n        if (buffer->marker[type].active)\n            buffer->allocated = buffer->marker[type].offset;\n        else buffer->allocated = 0;\n        buffer->marker[type].active = nk_false;\n    }\n}\nNK_API void\nnk_buffer_clear(struct nk_buffer *b)\n{\n    NK_ASSERT(b);\n    if (!b) return;\n    b->allocated = 0;\n    b->size = b->memory.size;\n    b->calls = 0;\n    b->needed = 0;\n}\nNK_API void\nnk_buffer_free(struct nk_buffer *b)\n{\n    NK_ASSERT(b);\n    if (!b || !b->memory.ptr) return;\n    if (b->type == NK_BUFFER_FIXED) return;\n    if (!b->pool.free) return;\n    NK_ASSERT(b->pool.free);\n    b->pool.free(b->pool.userdata, b->memory.ptr);\n}\nNK_API void\nnk_buffer_info(struct nk_memory_status *s, struct nk_buffer *b)\n{\n    NK_ASSERT(b);\n    NK_ASSERT(s);\n    if (!s || !b) return;\n    s->allocated = b->allocated;\n    s->size =  b->memory.size;\n    s->needed = b->needed;\n    s->memory = b->memory.ptr;\n    s->calls = b->calls;\n}\nNK_API void*\nnk_buffer_memory(struct nk_buffer *buffer)\n{\n    NK_ASSERT(buffer);\n    if (!buffer) return 0;\n    return buffer->memory.ptr;\n}\nNK_API const void*\nnk_buffer_memory_const(const struct nk_buffer *buffer)\n{\n    NK_ASSERT(buffer);\n    if (!buffer) return 0;\n    return buffer->memory.ptr;\n}\nNK_API nk_size\nnk_buffer_total(struct nk_buffer *buffer)\n{\n    NK_ASSERT(buffer);\n    if (!buffer) return 0;\n    return buffer->memory.size;\n}\n\n\n\n\n\n/* ===============================================================\n *\n *                              STRING\n *\n * ===============================================================*/\n#ifdef NK_INCLUDE_DEFAULT_ALLOCATOR\nNK_API void\nnk_str_init_default(struct nk_str *str)\n{\n    struct nk_allocator alloc;\n    alloc.userdata.ptr = 0;\n    alloc.alloc = nk_malloc;\n    alloc.free = nk_mfree;\n    nk_buffer_init(&str->buffer, &alloc, 32);\n    str->len = 0;\n}\n#endif\n\nNK_API void\nnk_str_init(struct nk_str *str, const struct nk_allocator *alloc, nk_size size)\n{\n    nk_buffer_init(&str->buffer, alloc, size);\n    str->len = 0;\n}\nNK_API void\nnk_str_init_fixed(struct nk_str *str, void *memory, nk_size size)\n{\n    nk_buffer_init_fixed(&str->buffer, memory, size);\n    str->len = 0;\n}\nNK_API int\nnk_str_append_text_char(struct nk_str *s, const char *str, int len)\n{\n    char *mem;\n    NK_ASSERT(s);\n    NK_ASSERT(str);\n    if (!s || !str || !len) return 0;\n    mem = (char*)nk_buffer_alloc(&s->buffer, NK_BUFFER_FRONT, (nk_size)len * sizeof(char), 0);\n    if (!mem) return 0;\n    NK_MEMCPY(mem, str, (nk_size)len * sizeof(char));\n    s->len += nk_utf_len(str, len);\n    return len;\n}\nNK_API int\nnk_str_append_str_char(struct nk_str *s, const char *str)\n{\n    return nk_str_append_text_char(s, str, nk_strlen(str));\n}\nNK_API int\nnk_str_append_text_utf8(struct nk_str *str, const char *text, int len)\n{\n    int i = 0;\n    int byte_len = 0;\n    nk_rune unicode;\n    if (!str || !text || !len) return 0;\n    for (i = 0; i < len; ++i)\n        byte_len += nk_utf_decode(text+byte_len, &unicode, 4);\n    nk_str_append_text_char(str, text, byte_len);\n    return len;\n}\nNK_API int\nnk_str_append_str_utf8(struct nk_str *str, const char *text)\n{\n    int runes = 0;\n    int byte_len = 0;\n    int num_runes = 0;\n    int glyph_len = 0;\n    nk_rune unicode;\n    if (!str || !text) return 0;\n\n    glyph_len = byte_len = nk_utf_decode(text+byte_len, &unicode, 4);\n    while (unicode != '\\0' && glyph_len) {\n        glyph_len = nk_utf_decode(text+byte_len, &unicode, 4);\n        byte_len += glyph_len;\n        num_runes++;\n    }\n    nk_str_append_text_char(str, text, byte_len);\n    return runes;\n}\nNK_API int\nnk_str_append_text_runes(struct nk_str *str, const nk_rune *text, int len)\n{\n    int i = 0;\n    int byte_len = 0;\n    nk_glyph glyph;\n\n    NK_ASSERT(str);\n    if (!str || !text || !len) return 0;\n    for (i = 0; i < len; ++i) {\n        byte_len = nk_utf_encode(text[i], glyph, NK_UTF_SIZE);\n        if (!byte_len) break;\n        nk_str_append_text_char(str, glyph, byte_len);\n    }\n    return len;\n}\nNK_API int\nnk_str_append_str_runes(struct nk_str *str, const nk_rune *runes)\n{\n    int i = 0;\n    nk_glyph glyph;\n    int byte_len;\n    NK_ASSERT(str);\n    if (!str || !runes) return 0;\n    while (runes[i] != '\\0') {\n        byte_len = nk_utf_encode(runes[i], glyph, NK_UTF_SIZE);\n        nk_str_append_text_char(str, glyph, byte_len);\n        i++;\n    }\n    return i;\n}\nNK_API int\nnk_str_insert_at_char(struct nk_str *s, int pos, const char *str, int len)\n{\n    int i;\n    void *mem;\n    char *src;\n    char *dst;\n\n    int copylen;\n    NK_ASSERT(s);\n    NK_ASSERT(str);\n    NK_ASSERT(len >= 0);\n    if (!s || !str || !len || (nk_size)pos > s->buffer.allocated) return 0;\n    if ((s->buffer.allocated + (nk_size)len >= s->buffer.memory.size) &&\n        (s->buffer.type == NK_BUFFER_FIXED)) return 0;\n\n    copylen = (int)s->buffer.allocated - pos;\n    if (!copylen) {\n        nk_str_append_text_char(s, str, len);\n        return 1;\n    }\n    mem = nk_buffer_alloc(&s->buffer, NK_BUFFER_FRONT, (nk_size)len * sizeof(char), 0);\n    if (!mem) return 0;\n\n    /* memmove */\n    NK_ASSERT(((int)pos + (int)len + ((int)copylen - 1)) >= 0);\n    NK_ASSERT(((int)pos + ((int)copylen - 1)) >= 0);\n    dst = nk_ptr_add(char, s->buffer.memory.ptr, pos + len + (copylen - 1));\n    src = nk_ptr_add(char, s->buffer.memory.ptr, pos + (copylen-1));\n    for (i = 0; i < copylen; ++i) *dst-- = *src--;\n    mem = nk_ptr_add(void, s->buffer.memory.ptr, pos);\n    NK_MEMCPY(mem, str, (nk_size)len * sizeof(char));\n    s->len = nk_utf_len((char *)s->buffer.memory.ptr, (int)s->buffer.allocated);\n    return 1;\n}\nNK_API int\nnk_str_insert_at_rune(struct nk_str *str, int pos, const char *cstr, int len)\n{\n    int glyph_len;\n    nk_rune unicode;\n    const char *begin;\n    const char *buffer;\n\n    NK_ASSERT(str);\n    NK_ASSERT(cstr);\n    NK_ASSERT(len);\n    if (!str || !cstr || !len) return 0;\n    begin = nk_str_at_rune(str, pos, &unicode, &glyph_len);\n    if (!str->len)\n        return nk_str_append_text_char(str, cstr, len);\n    buffer = nk_str_get_const(str);\n    if (!begin) return 0;\n    return nk_str_insert_at_char(str, (int)(begin - buffer), cstr, len);\n}\nNK_API int\nnk_str_insert_text_char(struct nk_str *str, int pos, const char *text, int len)\n{\n    return nk_str_insert_text_utf8(str, pos, text, len);\n}\nNK_API int\nnk_str_insert_str_char(struct nk_str *str, int pos, const char *text)\n{\n    return nk_str_insert_text_utf8(str, pos, text, nk_strlen(text));\n}\nNK_API int\nnk_str_insert_text_utf8(struct nk_str *str, int pos, const char *text, int len)\n{\n    int i = 0;\n    int byte_len = 0;\n    nk_rune unicode;\n\n    NK_ASSERT(str);\n    NK_ASSERT(text);\n    if (!str || !text || !len) return 0;\n    for (i = 0; i < len; ++i)\n        byte_len += nk_utf_decode(text+byte_len, &unicode, 4);\n    nk_str_insert_at_rune(str, pos, text, byte_len);\n    return len;\n}\nNK_API int\nnk_str_insert_str_utf8(struct nk_str *str, int pos, const char *text)\n{\n    int runes = 0;\n    int byte_len = 0;\n    int num_runes = 0;\n    int glyph_len = 0;\n    nk_rune unicode;\n    if (!str || !text) return 0;\n\n    glyph_len = byte_len = nk_utf_decode(text+byte_len, &unicode, 4);\n    while (unicode != '\\0' && glyph_len) {\n        glyph_len = nk_utf_decode(text+byte_len, &unicode, 4);\n        byte_len += glyph_len;\n        num_runes++;\n    }\n    nk_str_insert_at_rune(str, pos, text, byte_len);\n    return runes;\n}\nNK_API int\nnk_str_insert_text_runes(struct nk_str *str, int pos, const nk_rune *runes, int len)\n{\n    int i = 0;\n    int byte_len = 0;\n    nk_glyph glyph;\n\n    NK_ASSERT(str);\n    if (!str || !runes || !len) return 0;\n    for (i = 0; i < len; ++i) {\n        byte_len = nk_utf_encode(runes[i], glyph, NK_UTF_SIZE);\n        if (!byte_len) break;\n        nk_str_insert_at_rune(str, pos+i, glyph, byte_len);\n    }\n    return len;\n}\nNK_API int\nnk_str_insert_str_runes(struct nk_str *str, int pos, const nk_rune *runes)\n{\n    int i = 0;\n    nk_glyph glyph;\n    int byte_len;\n    NK_ASSERT(str);\n    if (!str || !runes) return 0;\n    while (runes[i] != '\\0') {\n        byte_len = nk_utf_encode(runes[i], glyph, NK_UTF_SIZE);\n        nk_str_insert_at_rune(str, pos+i, glyph, byte_len);\n        i++;\n    }\n    return i;\n}\nNK_API void\nnk_str_remove_chars(struct nk_str *s, int len)\n{\n    NK_ASSERT(s);\n    NK_ASSERT(len >= 0);\n    if (!s || len < 0 || (nk_size)len > s->buffer.allocated) return;\n    NK_ASSERT(((int)s->buffer.allocated - (int)len) >= 0);\n    s->buffer.allocated -= (nk_size)len;\n    s->len = nk_utf_len((char *)s->buffer.memory.ptr, (int)s->buffer.allocated);\n}\nNK_API void\nnk_str_remove_runes(struct nk_str *str, int len)\n{\n    int index;\n    const char *begin;\n    const char *end;\n    nk_rune unicode;\n\n    NK_ASSERT(str);\n    NK_ASSERT(len >= 0);\n    if (!str || len < 0) return;\n    if (len >= str->len) {\n        str->len = 0;\n        return;\n    }\n\n    index = str->len - len;\n    begin = nk_str_at_rune(str, index, &unicode, &len);\n    end = (const char*)str->buffer.memory.ptr + str->buffer.allocated;\n    nk_str_remove_chars(str, (int)(end-begin)+1);\n}\nNK_API void\nnk_str_delete_chars(struct nk_str *s, int pos, int len)\n{\n    NK_ASSERT(s);\n    if (!s || !len || (nk_size)pos > s->buffer.allocated ||\n        (nk_size)(pos + len) > s->buffer.allocated) return;\n\n    if ((nk_size)(pos + len) < s->buffer.allocated) {\n        /* memmove */\n        char *dst = nk_ptr_add(char, s->buffer.memory.ptr, pos);\n        char *src = nk_ptr_add(char, s->buffer.memory.ptr, pos + len);\n        NK_MEMCPY(dst, src, s->buffer.allocated - (nk_size)(pos + len));\n        NK_ASSERT(((int)s->buffer.allocated - (int)len) >= 0);\n        s->buffer.allocated -= (nk_size)len;\n    } else nk_str_remove_chars(s, len);\n    s->len = nk_utf_len((char *)s->buffer.memory.ptr, (int)s->buffer.allocated);\n}\nNK_API void\nnk_str_delete_runes(struct nk_str *s, int pos, int len)\n{\n    char *temp;\n    nk_rune unicode;\n    char *begin;\n    char *end;\n    int unused;\n\n    NK_ASSERT(s);\n    NK_ASSERT(s->len >= pos + len);\n    if (s->len < pos + len)\n        len = NK_CLAMP(0, (s->len - pos), s->len);\n    if (!len) return;\n\n    temp = (char *)s->buffer.memory.ptr;\n    begin = nk_str_at_rune(s, pos, &unicode, &unused);\n    if (!begin) return;\n    s->buffer.memory.ptr = begin;\n    end = nk_str_at_rune(s, len, &unicode, &unused);\n    s->buffer.memory.ptr = temp;\n    if (!end) return;\n    nk_str_delete_chars(s, (int)(begin - temp), (int)(end - begin));\n}\nNK_API char*\nnk_str_at_char(struct nk_str *s, int pos)\n{\n    NK_ASSERT(s);\n    if (!s || pos > (int)s->buffer.allocated) return 0;\n    return nk_ptr_add(char, s->buffer.memory.ptr, pos);\n}\nNK_API char*\nnk_str_at_rune(struct nk_str *str, int pos, nk_rune *unicode, int *len)\n{\n    int i = 0;\n    int src_len = 0;\n    int glyph_len = 0;\n    char *text;\n    int text_len;\n\n    NK_ASSERT(str);\n    NK_ASSERT(unicode);\n    NK_ASSERT(len);\n\n    if (!str || !unicode || !len) return 0;\n    if (pos < 0) {\n        *unicode = 0;\n        *len = 0;\n        return 0;\n    }\n\n    text = (char*)str->buffer.memory.ptr;\n    text_len = (int)str->buffer.allocated;\n    glyph_len = nk_utf_decode(text, unicode, text_len);\n    while (glyph_len) {\n        if (i == pos) {\n            *len = glyph_len;\n            break;\n        }\n\n        i++;\n        src_len = src_len + glyph_len;\n        glyph_len = nk_utf_decode(text + src_len, unicode, text_len - src_len);\n    }\n    if (i != pos) return 0;\n    return text + src_len;\n}\nNK_API const char*\nnk_str_at_char_const(const struct nk_str *s, int pos)\n{\n    NK_ASSERT(s);\n    if (!s || pos > (int)s->buffer.allocated) return 0;\n    return nk_ptr_add(char, s->buffer.memory.ptr, pos);\n}\nNK_API const char*\nnk_str_at_const(const struct nk_str *str, int pos, nk_rune *unicode, int *len)\n{\n    int i = 0;\n    int src_len = 0;\n    int glyph_len = 0;\n    char *text;\n    int text_len;\n\n    NK_ASSERT(str);\n    NK_ASSERT(unicode);\n    NK_ASSERT(len);\n\n    if (!str || !unicode || !len) return 0;\n    if (pos < 0) {\n        *unicode = 0;\n        *len = 0;\n        return 0;\n    }\n\n    text = (char*)str->buffer.memory.ptr;\n    text_len = (int)str->buffer.allocated;\n    glyph_len = nk_utf_decode(text, unicode, text_len);\n    while (glyph_len) {\n        if (i == pos) {\n            *len = glyph_len;\n            break;\n        }\n\n        i++;\n        src_len = src_len + glyph_len;\n        glyph_len = nk_utf_decode(text + src_len, unicode, text_len - src_len);\n    }\n    if (i != pos) return 0;\n    return text + src_len;\n}\nNK_API nk_rune\nnk_str_rune_at(const struct nk_str *str, int pos)\n{\n    int len;\n    nk_rune unicode = 0;\n    nk_str_at_const(str, pos, &unicode, &len);\n    return unicode;\n}\nNK_API char*\nnk_str_get(struct nk_str *s)\n{\n    NK_ASSERT(s);\n    if (!s || !s->len || !s->buffer.allocated) return 0;\n    return (char*)s->buffer.memory.ptr;\n}\nNK_API const char*\nnk_str_get_const(const struct nk_str *s)\n{\n    NK_ASSERT(s);\n    if (!s || !s->len || !s->buffer.allocated) return 0;\n    return (const char*)s->buffer.memory.ptr;\n}\nNK_API int\nnk_str_len(struct nk_str *s)\n{\n    NK_ASSERT(s);\n    if (!s || !s->len || !s->buffer.allocated) return 0;\n    return s->len;\n}\nNK_API int\nnk_str_len_char(struct nk_str *s)\n{\n    NK_ASSERT(s);\n    if (!s || !s->len || !s->buffer.allocated) return 0;\n    return (int)s->buffer.allocated;\n}\nNK_API void\nnk_str_clear(struct nk_str *str)\n{\n    NK_ASSERT(str);\n    nk_buffer_clear(&str->buffer);\n    str->len = 0;\n}\nNK_API void\nnk_str_free(struct nk_str *str)\n{\n    NK_ASSERT(str);\n    nk_buffer_free(&str->buffer);\n    str->len = 0;\n}\n\n\n\n\n\n/* ==============================================================\n *\n *                          DRAW\n *\n * ===============================================================*/\nNK_LIB void\nnk_command_buffer_init(struct nk_command_buffer *cb,\n    struct nk_buffer *b, enum nk_command_clipping clip)\n{\n    NK_ASSERT(cb);\n    NK_ASSERT(b);\n    if (!cb || !b) return;\n    cb->base = b;\n    cb->use_clipping = (int)clip;\n    cb->begin = b->allocated;\n    cb->end = b->allocated;\n    cb->last = b->allocated;\n}\nNK_LIB void\nnk_command_buffer_reset(struct nk_command_buffer *b)\n{\n    NK_ASSERT(b);\n    if (!b) return;\n    b->begin = 0;\n    b->end = 0;\n    b->last = 0;\n    b->clip = nk_null_rect;\n#ifdef NK_INCLUDE_COMMAND_USERDATA\n    b->userdata.ptr = 0;\n#endif\n}\nNK_LIB void*\nnk_command_buffer_push(struct nk_command_buffer* b,\n    enum nk_command_type t, nk_size size)\n{\n    NK_STORAGE const nk_size align = NK_ALIGNOF(struct nk_command);\n    struct nk_command *cmd;\n    nk_size alignment;\n    void *unaligned;\n    void *memory;\n\n    NK_ASSERT(b);\n    NK_ASSERT(b->base);\n    if (!b) return 0;\n    cmd = (struct nk_command*)nk_buffer_alloc(b->base,NK_BUFFER_FRONT,size,align);\n    if (!cmd) return 0;\n\n    /* make sure the offset to the next command is aligned */\n    b->last = (nk_size)((nk_byte*)cmd - (nk_byte*)b->base->memory.ptr);\n    unaligned = (nk_byte*)cmd + size;\n    memory = NK_ALIGN_PTR(unaligned, align);\n    alignment = (nk_size)((nk_byte*)memory - (nk_byte*)unaligned);\n#ifdef NK_ZERO_COMMAND_MEMORY\n    NK_MEMSET(cmd, 0, size + alignment);\n#endif\n\n    cmd->type = t;\n    cmd->next = b->base->allocated + alignment;\n#ifdef NK_INCLUDE_COMMAND_USERDATA\n    cmd->userdata = b->userdata;\n#endif\n    b->end = cmd->next;\n    return cmd;\n}\nNK_API void\nnk_push_scissor(struct nk_command_buffer *b, struct nk_rect r)\n{\n    struct nk_command_scissor *cmd;\n    NK_ASSERT(b);\n    if (!b) return;\n\n    b->clip.x = r.x;\n    b->clip.y = r.y;\n    b->clip.w = r.w;\n    b->clip.h = r.h;\n    cmd = (struct nk_command_scissor*)\n        nk_command_buffer_push(b, NK_COMMAND_SCISSOR, sizeof(*cmd));\n\n    if (!cmd) return;\n    cmd->x = (short)r.x;\n    cmd->y = (short)r.y;\n    cmd->w = (unsigned short)NK_MAX(0, r.w);\n    cmd->h = (unsigned short)NK_MAX(0, r.h);\n}\nNK_API void\nnk_stroke_line(struct nk_command_buffer *b, float x0, float y0,\n    float x1, float y1, float line_thickness, struct nk_color c)\n{\n    struct nk_command_line *cmd;\n    NK_ASSERT(b);\n    if (!b || line_thickness <= 0) return;\n    cmd = (struct nk_command_line*)\n        nk_command_buffer_push(b, NK_COMMAND_LINE, sizeof(*cmd));\n    if (!cmd) return;\n    cmd->line_thickness = (unsigned short)line_thickness;\n    cmd->begin.x = (short)x0;\n    cmd->begin.y = (short)y0;\n    cmd->end.x = (short)x1;\n    cmd->end.y = (short)y1;\n    cmd->color = c;\n}\nNK_API void\nnk_stroke_curve(struct nk_command_buffer *b, float ax, float ay,\n    float ctrl0x, float ctrl0y, float ctrl1x, float ctrl1y,\n    float bx, float by, float line_thickness, struct nk_color col)\n{\n    struct nk_command_curve *cmd;\n    NK_ASSERT(b);\n    if (!b || col.a == 0 || line_thickness <= 0) return;\n\n    cmd = (struct nk_command_curve*)\n        nk_command_buffer_push(b, NK_COMMAND_CURVE, sizeof(*cmd));\n    if (!cmd) return;\n    cmd->line_thickness = (unsigned short)line_thickness;\n    cmd->begin.x = (short)ax;\n    cmd->begin.y = (short)ay;\n    cmd->ctrl[0].x = (short)ctrl0x;\n    cmd->ctrl[0].y = (short)ctrl0y;\n    cmd->ctrl[1].x = (short)ctrl1x;\n    cmd->ctrl[1].y = (short)ctrl1y;\n    cmd->end.x = (short)bx;\n    cmd->end.y = (short)by;\n    cmd->color = col;\n}\nNK_API void\nnk_stroke_rect(struct nk_command_buffer *b, struct nk_rect rect,\n    float rounding, float line_thickness, struct nk_color c)\n{\n    struct nk_command_rect *cmd;\n    NK_ASSERT(b);\n    if (!b || c.a == 0 || rect.w == 0 || rect.h == 0 || line_thickness <= 0) return;\n    if (b->use_clipping) {\n        const struct nk_rect *clip = &b->clip;\n        if (!NK_INTERSECT(rect.x, rect.y, rect.w, rect.h,\n            clip->x, clip->y, clip->w, clip->h)) return;\n    }\n    cmd = (struct nk_command_rect*)\n        nk_command_buffer_push(b, NK_COMMAND_RECT, sizeof(*cmd));\n    if (!cmd) return;\n    cmd->rounding = (unsigned short)rounding;\n    cmd->line_thickness = (unsigned short)line_thickness;\n    cmd->x = (short)rect.x;\n    cmd->y = (short)rect.y;\n    cmd->w = (unsigned short)NK_MAX(0, rect.w);\n    cmd->h = (unsigned short)NK_MAX(0, rect.h);\n    cmd->color = c;\n}\nNK_API void\nnk_fill_rect(struct nk_command_buffer *b, struct nk_rect rect,\n    float rounding, struct nk_color c)\n{\n    struct nk_command_rect_filled *cmd;\n    NK_ASSERT(b);\n    if (!b || c.a == 0 || rect.w == 0 || rect.h == 0) return;\n    if (b->use_clipping) {\n        const struct nk_rect *clip = &b->clip;\n        if (!NK_INTERSECT(rect.x, rect.y, rect.w, rect.h,\n            clip->x, clip->y, clip->w, clip->h)) return;\n    }\n\n    cmd = (struct nk_command_rect_filled*)\n        nk_command_buffer_push(b, NK_COMMAND_RECT_FILLED, sizeof(*cmd));\n    if (!cmd) return;\n    cmd->rounding = (unsigned short)rounding;\n    cmd->x = (short)rect.x;\n    cmd->y = (short)rect.y;\n    cmd->w = (unsigned short)NK_MAX(0, rect.w);\n    cmd->h = (unsigned short)NK_MAX(0, rect.h);\n    cmd->color = c;\n}\nNK_API void\nnk_fill_rect_multi_color(struct nk_command_buffer *b, struct nk_rect rect,\n    struct nk_color left, struct nk_color top, struct nk_color right,\n    struct nk_color bottom)\n{\n    struct nk_command_rect_multi_color *cmd;\n    NK_ASSERT(b);\n    if (!b || rect.w == 0 || rect.h == 0) return;\n    if (b->use_clipping) {\n        const struct nk_rect *clip = &b->clip;\n        if (!NK_INTERSECT(rect.x, rect.y, rect.w, rect.h,\n            clip->x, clip->y, clip->w, clip->h)) return;\n    }\n\n    cmd = (struct nk_command_rect_multi_color*)\n        nk_command_buffer_push(b, NK_COMMAND_RECT_MULTI_COLOR, sizeof(*cmd));\n    if (!cmd) return;\n    cmd->x = (short)rect.x;\n    cmd->y = (short)rect.y;\n    cmd->w = (unsigned short)NK_MAX(0, rect.w);\n    cmd->h = (unsigned short)NK_MAX(0, rect.h);\n    cmd->left = left;\n    cmd->top = top;\n    cmd->right = right;\n    cmd->bottom = bottom;\n}\nNK_API void\nnk_stroke_circle(struct nk_command_buffer *b, struct nk_rect r,\n    float line_thickness, struct nk_color c)\n{\n    struct nk_command_circle *cmd;\n    if (!b || r.w == 0 || r.h == 0 || line_thickness <= 0) return;\n    if (b->use_clipping) {\n        const struct nk_rect *clip = &b->clip;\n        if (!NK_INTERSECT(r.x, r.y, r.w, r.h, clip->x, clip->y, clip->w, clip->h))\n            return;\n    }\n\n    cmd = (struct nk_command_circle*)\n        nk_command_buffer_push(b, NK_COMMAND_CIRCLE, sizeof(*cmd));\n    if (!cmd) return;\n    cmd->line_thickness = (unsigned short)line_thickness;\n    cmd->x = (short)r.x;\n    cmd->y = (short)r.y;\n    cmd->w = (unsigned short)NK_MAX(r.w, 0);\n    cmd->h = (unsigned short)NK_MAX(r.h, 0);\n    cmd->color = c;\n}\nNK_API void\nnk_fill_circle(struct nk_command_buffer *b, struct nk_rect r, struct nk_color c)\n{\n    struct nk_command_circle_filled *cmd;\n    NK_ASSERT(b);\n    if (!b || c.a == 0 || r.w == 0 || r.h == 0) return;\n    if (b->use_clipping) {\n        const struct nk_rect *clip = &b->clip;\n        if (!NK_INTERSECT(r.x, r.y, r.w, r.h, clip->x, clip->y, clip->w, clip->h))\n            return;\n    }\n\n    cmd = (struct nk_command_circle_filled*)\n        nk_command_buffer_push(b, NK_COMMAND_CIRCLE_FILLED, sizeof(*cmd));\n    if (!cmd) return;\n    cmd->x = (short)r.x;\n    cmd->y = (short)r.y;\n    cmd->w = (unsigned short)NK_MAX(r.w, 0);\n    cmd->h = (unsigned short)NK_MAX(r.h, 0);\n    cmd->color = c;\n}\nNK_API void\nnk_stroke_arc(struct nk_command_buffer *b, float cx, float cy, float radius,\n    float a_min, float a_max, float line_thickness, struct nk_color c)\n{\n    struct nk_command_arc *cmd;\n    if (!b || c.a == 0 || line_thickness <= 0) return;\n    cmd = (struct nk_command_arc*)\n        nk_command_buffer_push(b, NK_COMMAND_ARC, sizeof(*cmd));\n    if (!cmd) return;\n    cmd->line_thickness = (unsigned short)line_thickness;\n    cmd->cx = (short)cx;\n    cmd->cy = (short)cy;\n    cmd->r = (unsigned short)radius;\n    cmd->a[0] = a_min;\n    cmd->a[1] = a_max;\n    cmd->color = c;\n}\nNK_API void\nnk_fill_arc(struct nk_command_buffer *b, float cx, float cy, float radius,\n    float a_min, float a_max, struct nk_color c)\n{\n    struct nk_command_arc_filled *cmd;\n    NK_ASSERT(b);\n    if (!b || c.a == 0) return;\n    cmd = (struct nk_command_arc_filled*)\n        nk_command_buffer_push(b, NK_COMMAND_ARC_FILLED, sizeof(*cmd));\n    if (!cmd) return;\n    cmd->cx = (short)cx;\n    cmd->cy = (short)cy;\n    cmd->r = (unsigned short)radius;\n    cmd->a[0] = a_min;\n    cmd->a[1] = a_max;\n    cmd->color = c;\n}\nNK_API void\nnk_stroke_triangle(struct nk_command_buffer *b, float x0, float y0, float x1,\n    float y1, float x2, float y2, float line_thickness, struct nk_color c)\n{\n    struct nk_command_triangle *cmd;\n    NK_ASSERT(b);\n    if (!b || c.a == 0 || line_thickness <= 0) return;\n    if (b->use_clipping) {\n        const struct nk_rect *clip = &b->clip;\n        if (!NK_INBOX(x0, y0, clip->x, clip->y, clip->w, clip->h) &&\n            !NK_INBOX(x1, y1, clip->x, clip->y, clip->w, clip->h) &&\n            !NK_INBOX(x2, y2, clip->x, clip->y, clip->w, clip->h))\n            return;\n    }\n\n    cmd = (struct nk_command_triangle*)\n        nk_command_buffer_push(b, NK_COMMAND_TRIANGLE, sizeof(*cmd));\n    if (!cmd) return;\n    cmd->line_thickness = (unsigned short)line_thickness;\n    cmd->a.x = (short)x0;\n    cmd->a.y = (short)y0;\n    cmd->b.x = (short)x1;\n    cmd->b.y = (short)y1;\n    cmd->c.x = (short)x2;\n    cmd->c.y = (short)y2;\n    cmd->color = c;\n}\nNK_API void\nnk_fill_triangle(struct nk_command_buffer *b, float x0, float y0, float x1,\n    float y1, float x2, float y2, struct nk_color c)\n{\n    struct nk_command_triangle_filled *cmd;\n    NK_ASSERT(b);\n    if (!b || c.a == 0) return;\n    if (!b) return;\n    if (b->use_clipping) {\n        const struct nk_rect *clip = &b->clip;\n        if (!NK_INBOX(x0, y0, clip->x, clip->y, clip->w, clip->h) &&\n            !NK_INBOX(x1, y1, clip->x, clip->y, clip->w, clip->h) &&\n            !NK_INBOX(x2, y2, clip->x, clip->y, clip->w, clip->h))\n            return;\n    }\n\n    cmd = (struct nk_command_triangle_filled*)\n        nk_command_buffer_push(b, NK_COMMAND_TRIANGLE_FILLED, sizeof(*cmd));\n    if (!cmd) return;\n    cmd->a.x = (short)x0;\n    cmd->a.y = (short)y0;\n    cmd->b.x = (short)x1;\n    cmd->b.y = (short)y1;\n    cmd->c.x = (short)x2;\n    cmd->c.y = (short)y2;\n    cmd->color = c;\n}\nNK_API void\nnk_stroke_polygon(struct nk_command_buffer *b,  float *points, int point_count,\n    float line_thickness, struct nk_color col)\n{\n    int i;\n    nk_size size = 0;\n    struct nk_command_polygon *cmd;\n\n    NK_ASSERT(b);\n    if (!b || col.a == 0 || line_thickness <= 0) return;\n    size = sizeof(*cmd) + sizeof(short) * 2 * (nk_size)point_count;\n    cmd = (struct nk_command_polygon*) nk_command_buffer_push(b, NK_COMMAND_POLYGON, size);\n    if (!cmd) return;\n    cmd->color = col;\n    cmd->line_thickness = (unsigned short)line_thickness;\n    cmd->point_count = (unsigned short)point_count;\n    for (i = 0; i < point_count; ++i) {\n        cmd->points[i].x = (short)points[i*2];\n        cmd->points[i].y = (short)points[i*2+1];\n    }\n}\nNK_API void\nnk_fill_polygon(struct nk_command_buffer *b, float *points, int point_count,\n    struct nk_color col)\n{\n    int i;\n    nk_size size = 0;\n    struct nk_command_polygon_filled *cmd;\n\n    NK_ASSERT(b);\n    if (!b || col.a == 0) return;\n    size = sizeof(*cmd) + sizeof(short) * 2 * (nk_size)point_count;\n    cmd = (struct nk_command_polygon_filled*)\n        nk_command_buffer_push(b, NK_COMMAND_POLYGON_FILLED, size);\n    if (!cmd) return;\n    cmd->color = col;\n    cmd->point_count = (unsigned short)point_count;\n    for (i = 0; i < point_count; ++i) {\n        cmd->points[i].x = (short)points[i*2+0];\n        cmd->points[i].y = (short)points[i*2+1];\n    }\n}\nNK_API void\nnk_stroke_polyline(struct nk_command_buffer *b, float *points, int point_count,\n    float line_thickness, struct nk_color col)\n{\n    int i;\n    nk_size size = 0;\n    struct nk_command_polyline *cmd;\n\n    NK_ASSERT(b);\n    if (!b || col.a == 0 || line_thickness <= 0) return;\n    size = sizeof(*cmd) + sizeof(short) * 2 * (nk_size)point_count;\n    cmd = (struct nk_command_polyline*) nk_command_buffer_push(b, NK_COMMAND_POLYLINE, size);\n    if (!cmd) return;\n    cmd->color = col;\n    cmd->point_count = (unsigned short)point_count;\n    cmd->line_thickness = (unsigned short)line_thickness;\n    for (i = 0; i < point_count; ++i) {\n        cmd->points[i].x = (short)points[i*2];\n        cmd->points[i].y = (short)points[i*2+1];\n    }\n}\nNK_API void\nnk_draw_image(struct nk_command_buffer *b, struct nk_rect r,\n    const struct nk_image *img, struct nk_color col)\n{\n    struct nk_command_image *cmd;\n    NK_ASSERT(b);\n    if (!b) return;\n    if (b->use_clipping) {\n        const struct nk_rect *c = &b->clip;\n        if (c->w == 0 || c->h == 0 || !NK_INTERSECT(r.x, r.y, r.w, r.h, c->x, c->y, c->w, c->h))\n            return;\n    }\n\n    cmd = (struct nk_command_image*)\n        nk_command_buffer_push(b, NK_COMMAND_IMAGE, sizeof(*cmd));\n    if (!cmd) return;\n    cmd->x = (short)r.x;\n    cmd->y = (short)r.y;\n    cmd->w = (unsigned short)NK_MAX(0, r.w);\n    cmd->h = (unsigned short)NK_MAX(0, r.h);\n    cmd->img = *img;\n    cmd->col = col;\n}\nNK_API void\nnk_push_custom(struct nk_command_buffer *b, struct nk_rect r,\n    nk_command_custom_callback cb, nk_handle usr)\n{\n    struct nk_command_custom *cmd;\n    NK_ASSERT(b);\n    if (!b) return;\n    if (b->use_clipping) {\n        const struct nk_rect *c = &b->clip;\n        if (c->w == 0 || c->h == 0 || !NK_INTERSECT(r.x, r.y, r.w, r.h, c->x, c->y, c->w, c->h))\n            return;\n    }\n\n    cmd = (struct nk_command_custom*)\n        nk_command_buffer_push(b, NK_COMMAND_CUSTOM, sizeof(*cmd));\n    if (!cmd) return;\n    cmd->x = (short)r.x;\n    cmd->y = (short)r.y;\n    cmd->w = (unsigned short)NK_MAX(0, r.w);\n    cmd->h = (unsigned short)NK_MAX(0, r.h);\n    cmd->callback_data = usr;\n    cmd->callback = cb;\n}\nNK_API void\nnk_draw_text(struct nk_command_buffer *b, struct nk_rect r,\n    const char *string, int length, const struct nk_user_font *font,\n    struct nk_color bg, struct nk_color fg)\n{\n    float text_width = 0;\n    struct nk_command_text *cmd;\n\n    NK_ASSERT(b);\n    NK_ASSERT(font);\n    if (!b || !string || !length || (bg.a == 0 && fg.a == 0)) return;\n    if (b->use_clipping) {\n        const struct nk_rect *c = &b->clip;\n        if (c->w == 0 || c->h == 0 || !NK_INTERSECT(r.x, r.y, r.w, r.h, c->x, c->y, c->w, c->h))\n            return;\n    }\n\n    /* make sure text fits inside bounds */\n    text_width = font->width(font->userdata, font->height, string, length);\n    if (text_width > r.w){\n        int glyphs = 0;\n        float txt_width = (float)text_width;\n        length = nk_text_clamp(font, string, length, r.w, &glyphs, &txt_width, 0,0);\n    }\n\n    if (!length) return;\n    cmd = (struct nk_command_text*)\n        nk_command_buffer_push(b, NK_COMMAND_TEXT, sizeof(*cmd) + (nk_size)(length + 1));\n    if (!cmd) return;\n    cmd->x = (short)r.x;\n    cmd->y = (short)r.y;\n    cmd->w = (unsigned short)r.w;\n    cmd->h = (unsigned short)r.h;\n    cmd->background = bg;\n    cmd->foreground = fg;\n    cmd->font = font;\n    cmd->length = length;\n    cmd->height = font->height;\n    NK_MEMCPY(cmd->string, string, (nk_size)length);\n    cmd->string[length] = '\\0';\n}\n\n\n\n\n\n/* ===============================================================\n *\n *                              VERTEX\n *\n * ===============================================================*/\n#ifdef NK_INCLUDE_VERTEX_BUFFER_OUTPUT\nNK_API void\nnk_draw_list_init(struct nk_draw_list *list)\n{\n    nk_size i = 0;\n    NK_ASSERT(list);\n    if (!list) return;\n    nk_zero(list, sizeof(*list));\n    for (i = 0; i < NK_LEN(list->circle_vtx); ++i) {\n        const float a = ((float)i / (float)NK_LEN(list->circle_vtx)) * 2 * NK_PI;\n        list->circle_vtx[i].x = (float)NK_COS(a);\n        list->circle_vtx[i].y = (float)NK_SIN(a);\n    }\n}\nNK_API void\nnk_draw_list_setup(struct nk_draw_list *canvas, const struct nk_convert_config *config,\n    struct nk_buffer *cmds, struct nk_buffer *vertices, struct nk_buffer *elements,\n    enum nk_anti_aliasing line_aa, enum nk_anti_aliasing shape_aa)\n{\n    NK_ASSERT(canvas);\n    NK_ASSERT(config);\n    NK_ASSERT(cmds);\n    NK_ASSERT(vertices);\n    NK_ASSERT(elements);\n    if (!canvas || !config || !cmds || !vertices || !elements)\n        return;\n\n    canvas->buffer = cmds;\n    canvas->config = *config;\n    canvas->elements = elements;\n    canvas->vertices = vertices;\n    canvas->line_AA = line_aa;\n    canvas->shape_AA = shape_aa;\n    canvas->clip_rect = nk_null_rect;\n\n    canvas->cmd_offset = 0;\n    canvas->element_count = 0;\n    canvas->vertex_count = 0;\n    canvas->cmd_offset = 0;\n    canvas->cmd_count = 0;\n    canvas->path_count = 0;\n}\nNK_API const struct nk_draw_command*\nnk__draw_list_begin(const struct nk_draw_list *canvas, const struct nk_buffer *buffer)\n{\n    nk_byte *memory;\n    nk_size offset;\n    const struct nk_draw_command *cmd;\n\n    NK_ASSERT(buffer);\n    if (!buffer || !buffer->size || !canvas->cmd_count)\n        return 0;\n\n    memory = (nk_byte*)buffer->memory.ptr;\n    offset = buffer->memory.size - canvas->cmd_offset;\n    cmd = nk_ptr_add(const struct nk_draw_command, memory, offset);\n    return cmd;\n}\nNK_API const struct nk_draw_command*\nnk__draw_list_end(const struct nk_draw_list *canvas, const struct nk_buffer *buffer)\n{\n    nk_size size;\n    nk_size offset;\n    nk_byte *memory;\n    const struct nk_draw_command *end;\n\n    NK_ASSERT(buffer);\n    NK_ASSERT(canvas);\n    if (!buffer || !canvas)\n        return 0;\n\n    memory = (nk_byte*)buffer->memory.ptr;\n    size = buffer->memory.size;\n    offset = size - canvas->cmd_offset;\n    end = nk_ptr_add(const struct nk_draw_command, memory, offset);\n    end -= (canvas->cmd_count-1);\n    return end;\n}\nNK_API const struct nk_draw_command*\nnk__draw_list_next(const struct nk_draw_command *cmd,\n    const struct nk_buffer *buffer, const struct nk_draw_list *canvas)\n{\n    const struct nk_draw_command *end;\n    NK_ASSERT(buffer);\n    NK_ASSERT(canvas);\n    if (!cmd || !buffer || !canvas)\n        return 0;\n\n    end = nk__draw_list_end(canvas, buffer);\n    if (cmd <= end) return 0;\n    return (cmd-1);\n}\nNK_INTERN struct nk_vec2*\nnk_draw_list_alloc_path(struct nk_draw_list *list, int count)\n{\n    struct nk_vec2 *points;\n    NK_STORAGE const nk_size point_align = NK_ALIGNOF(struct nk_vec2);\n    NK_STORAGE const nk_size point_size = sizeof(struct nk_vec2);\n    points = (struct nk_vec2*)\n        nk_buffer_alloc(list->buffer, NK_BUFFER_FRONT,\n                        point_size * (nk_size)count, point_align);\n\n    if (!points) return 0;\n    if (!list->path_offset) {\n        void *memory = nk_buffer_memory(list->buffer);\n        list->path_offset = (unsigned int)((nk_byte*)points - (nk_byte*)memory);\n    }\n    list->path_count += (unsigned int)count;\n    return points;\n}\nNK_INTERN struct nk_vec2\nnk_draw_list_path_last(struct nk_draw_list *list)\n{\n    void *memory;\n    struct nk_vec2 *point;\n    NK_ASSERT(list->path_count);\n    memory = nk_buffer_memory(list->buffer);\n    point = nk_ptr_add(struct nk_vec2, memory, list->path_offset);\n    point += (list->path_count-1);\n    return *point;\n}\nNK_INTERN struct nk_draw_command*\nnk_draw_list_push_command(struct nk_draw_list *list, struct nk_rect clip,\n    nk_handle texture)\n{\n    NK_STORAGE const nk_size cmd_align = NK_ALIGNOF(struct nk_draw_command);\n    NK_STORAGE const nk_size cmd_size = sizeof(struct nk_draw_command);\n    struct nk_draw_command *cmd;\n\n    NK_ASSERT(list);\n    cmd = (struct nk_draw_command*)\n        nk_buffer_alloc(list->buffer, NK_BUFFER_BACK, cmd_size, cmd_align);\n\n    if (!cmd) return 0;\n    if (!list->cmd_count) {\n        nk_byte *memory = (nk_byte*)nk_buffer_memory(list->buffer);\n        nk_size total = nk_buffer_total(list->buffer);\n        memory = nk_ptr_add(nk_byte, memory, total);\n        list->cmd_offset = (nk_size)(memory - (nk_byte*)cmd);\n    }\n\n    cmd->elem_count = 0;\n    cmd->clip_rect = clip;\n    cmd->texture = texture;\n#ifdef NK_INCLUDE_COMMAND_USERDATA\n    cmd->userdata = list->userdata;\n#endif\n\n    list->cmd_count++;\n    list->clip_rect = clip;\n    return cmd;\n}\nNK_INTERN struct nk_draw_command*\nnk_draw_list_command_last(struct nk_draw_list *list)\n{\n    void *memory;\n    nk_size size;\n    struct nk_draw_command *cmd;\n    NK_ASSERT(list->cmd_count);\n\n    memory = nk_buffer_memory(list->buffer);\n    size = nk_buffer_total(list->buffer);\n    cmd = nk_ptr_add(struct nk_draw_command, memory, size - list->cmd_offset);\n    return (cmd - (list->cmd_count-1));\n}\nNK_INTERN void\nnk_draw_list_add_clip(struct nk_draw_list *list, struct nk_rect rect)\n{\n    NK_ASSERT(list);\n    if (!list) return;\n    if (!list->cmd_count) {\n        nk_draw_list_push_command(list, rect, list->config.null.texture);\n    } else {\n        struct nk_draw_command *prev = nk_draw_list_command_last(list);\n        if (prev->elem_count == 0)\n            prev->clip_rect = rect;\n        nk_draw_list_push_command(list, rect, prev->texture);\n    }\n}\nNK_INTERN void\nnk_draw_list_push_image(struct nk_draw_list *list, nk_handle texture)\n{\n    NK_ASSERT(list);\n    if (!list) return;\n    if (!list->cmd_count) {\n        nk_draw_list_push_command(list, nk_null_rect, texture);\n    } else {\n        struct nk_draw_command *prev = nk_draw_list_command_last(list);\n        if (prev->elem_count == 0) {\n            prev->texture = texture;\n        #ifdef NK_INCLUDE_COMMAND_USERDATA\n            prev->userdata = list->userdata;\n        #endif\n    } else if (prev->texture.id != texture.id\n        #ifdef NK_INCLUDE_COMMAND_USERDATA\n            || prev->userdata.id != list->userdata.id\n        #endif\n        ) nk_draw_list_push_command(list, prev->clip_rect, texture);\n    }\n}\n#ifdef NK_INCLUDE_COMMAND_USERDATA\nNK_API void\nnk_draw_list_push_userdata(struct nk_draw_list *list, nk_handle userdata)\n{\n    list->userdata = userdata;\n}\n#endif\nNK_INTERN void*\nnk_draw_list_alloc_vertices(struct nk_draw_list *list, nk_size count)\n{\n    void *vtx;\n    NK_ASSERT(list);\n    if (!list) return 0;\n    vtx = nk_buffer_alloc(list->vertices, NK_BUFFER_FRONT,\n        list->config.vertex_size*count, list->config.vertex_alignment);\n    if (!vtx) return 0;\n    list->vertex_count += (unsigned int)count;\n\n    /* This assert triggers because your are drawing a lot of stuff and nuklear\n     * defined `nk_draw_index` as `nk_ushort` to safe space be default.\n     *\n     * So you reached the maximum number of indicies or rather vertexes.\n     * To solve this issue please change typdef `nk_draw_index` to `nk_uint`\n     * and don't forget to specify the new element size in your drawing\n     * backend (OpenGL, DirectX, ...). For example in OpenGL for `glDrawElements`\n     * instead of specifing `GL_UNSIGNED_SHORT` you have to define `GL_UNSIGNED_INT`.\n     * Sorry for the inconvenience. */\n    NK_ASSERT((sizeof(nk_draw_index) == 2 && list->vertex_count < NK_USHORT_MAX &&\n        \"To many verticies for 16-bit vertex indicies. Please read comment above on how to solve this problem\"));\n    return vtx;\n}\nNK_INTERN nk_draw_index*\nnk_draw_list_alloc_elements(struct nk_draw_list *list, nk_size count)\n{\n    nk_draw_index *ids;\n    struct nk_draw_command *cmd;\n    NK_STORAGE const nk_size elem_align = NK_ALIGNOF(nk_draw_index);\n    NK_STORAGE const nk_size elem_size = sizeof(nk_draw_index);\n    NK_ASSERT(list);\n    if (!list) return 0;\n\n    ids = (nk_draw_index*)\n        nk_buffer_alloc(list->elements, NK_BUFFER_FRONT, elem_size*count, elem_align);\n    if (!ids) return 0;\n    cmd = nk_draw_list_command_last(list);\n    list->element_count += (unsigned int)count;\n    cmd->elem_count += (unsigned int)count;\n    return ids;\n}\nNK_INTERN int\nnk_draw_vertex_layout_element_is_end_of_layout(\n    const struct nk_draw_vertex_layout_element *element)\n{\n    return (element->attribute == NK_VERTEX_ATTRIBUTE_COUNT ||\n            element->format == NK_FORMAT_COUNT);\n}\nNK_INTERN void\nnk_draw_vertex_color(void *attr, const float *vals,\n    enum nk_draw_vertex_layout_format format)\n{\n    /* if this triggers you tried to provide a value format for a color */\n    float val[4];\n    NK_ASSERT(format >= NK_FORMAT_COLOR_BEGIN);\n    NK_ASSERT(format <= NK_FORMAT_COLOR_END);\n    if (format < NK_FORMAT_COLOR_BEGIN || format > NK_FORMAT_COLOR_END) return;\n\n    val[0] = NK_SATURATE(vals[0]);\n    val[1] = NK_SATURATE(vals[1]);\n    val[2] = NK_SATURATE(vals[2]);\n    val[3] = NK_SATURATE(vals[3]);\n\n    switch (format) {\n    default: NK_ASSERT(0 && \"Invalid vertex layout color format\"); break;\n    case NK_FORMAT_R8G8B8A8:\n    case NK_FORMAT_R8G8B8: {\n        struct nk_color col = nk_rgba_fv(val);\n        NK_MEMCPY(attr, &col.r, sizeof(col));\n    } break;\n    case NK_FORMAT_B8G8R8A8: {\n        struct nk_color col = nk_rgba_fv(val);\n        struct nk_color bgra = nk_rgba(col.b, col.g, col.r, col.a);\n        NK_MEMCPY(attr, &bgra, sizeof(bgra));\n    } break;\n    case NK_FORMAT_R16G15B16: {\n        nk_ushort col[3];\n        col[0] = (nk_ushort)(val[0]*(float)NK_USHORT_MAX);\n        col[1] = (nk_ushort)(val[1]*(float)NK_USHORT_MAX);\n        col[2] = (nk_ushort)(val[2]*(float)NK_USHORT_MAX);\n        NK_MEMCPY(attr, col, sizeof(col));\n    } break;\n    case NK_FORMAT_R16G15B16A16: {\n        nk_ushort col[4];\n        col[0] = (nk_ushort)(val[0]*(float)NK_USHORT_MAX);\n        col[1] = (nk_ushort)(val[1]*(float)NK_USHORT_MAX);\n        col[2] = (nk_ushort)(val[2]*(float)NK_USHORT_MAX);\n        col[3] = (nk_ushort)(val[3]*(float)NK_USHORT_MAX);\n        NK_MEMCPY(attr, col, sizeof(col));\n    } break;\n    case NK_FORMAT_R32G32B32: {\n        nk_uint col[3];\n        col[0] = (nk_uint)(val[0]*(float)NK_UINT_MAX);\n        col[1] = (nk_uint)(val[1]*(float)NK_UINT_MAX);\n        col[2] = (nk_uint)(val[2]*(float)NK_UINT_MAX);\n        NK_MEMCPY(attr, col, sizeof(col));\n    } break;\n    case NK_FORMAT_R32G32B32A32: {\n        nk_uint col[4];\n        col[0] = (nk_uint)(val[0]*(float)NK_UINT_MAX);\n        col[1] = (nk_uint)(val[1]*(float)NK_UINT_MAX);\n        col[2] = (nk_uint)(val[2]*(float)NK_UINT_MAX);\n        col[3] = (nk_uint)(val[3]*(float)NK_UINT_MAX);\n        NK_MEMCPY(attr, col, sizeof(col));\n    } break;\n    case NK_FORMAT_R32G32B32A32_FLOAT:\n        NK_MEMCPY(attr, val, sizeof(float)*4);\n        break;\n    case NK_FORMAT_R32G32B32A32_DOUBLE: {\n        double col[4];\n        col[0] = (double)val[0];\n        col[1] = (double)val[1];\n        col[2] = (double)val[2];\n        col[3] = (double)val[3];\n        NK_MEMCPY(attr, col, sizeof(col));\n    } break;\n    case NK_FORMAT_RGB32:\n    case NK_FORMAT_RGBA32: {\n        struct nk_color col = nk_rgba_fv(val);\n        nk_uint color = nk_color_u32(col);\n        NK_MEMCPY(attr, &color, sizeof(color));\n    } break; }\n}\nNK_INTERN void\nnk_draw_vertex_element(void *dst, const float *values, int value_count,\n    enum nk_draw_vertex_layout_format format)\n{\n    int value_index;\n    void *attribute = dst;\n    /* if this triggers you tried to provide a color format for a value */\n    NK_ASSERT(format < NK_FORMAT_COLOR_BEGIN);\n    if (format >= NK_FORMAT_COLOR_BEGIN && format <= NK_FORMAT_COLOR_END) return;\n    for (value_index = 0; value_index < value_count; ++value_index) {\n        switch (format) {\n        default: NK_ASSERT(0 && \"invalid vertex layout format\"); break;\n        case NK_FORMAT_SCHAR: {\n            char value = (char)NK_CLAMP((float)NK_SCHAR_MIN, values[value_index], (float)NK_SCHAR_MAX);\n            NK_MEMCPY(attribute, &value, sizeof(value));\n            attribute = (void*)((char*)attribute + sizeof(char));\n        } break;\n        case NK_FORMAT_SSHORT: {\n            nk_short value = (nk_short)NK_CLAMP((float)NK_SSHORT_MIN, values[value_index], (float)NK_SSHORT_MAX);\n            NK_MEMCPY(attribute, &value, sizeof(value));\n            attribute = (void*)((char*)attribute + sizeof(value));\n        } break;\n        case NK_FORMAT_SINT: {\n            nk_int value = (nk_int)NK_CLAMP((float)NK_SINT_MIN, values[value_index], (float)NK_SINT_MAX);\n            NK_MEMCPY(attribute, &value, sizeof(value));\n            attribute = (void*)((char*)attribute + sizeof(nk_int));\n        } break;\n        case NK_FORMAT_UCHAR: {\n            unsigned char value = (unsigned char)NK_CLAMP((float)NK_UCHAR_MIN, values[value_index], (float)NK_UCHAR_MAX);\n            NK_MEMCPY(attribute, &value, sizeof(value));\n            attribute = (void*)((char*)attribute + sizeof(unsigned char));\n        } break;\n        case NK_FORMAT_USHORT: {\n            nk_ushort value = (nk_ushort)NK_CLAMP((float)NK_USHORT_MIN, values[value_index], (float)NK_USHORT_MAX);\n            NK_MEMCPY(attribute, &value, sizeof(value));\n            attribute = (void*)((char*)attribute + sizeof(value));\n            } break;\n        case NK_FORMAT_UINT: {\n            nk_uint value = (nk_uint)NK_CLAMP((float)NK_UINT_MIN, values[value_index], (float)NK_UINT_MAX);\n            NK_MEMCPY(attribute, &value, sizeof(value));\n            attribute = (void*)((char*)attribute + sizeof(nk_uint));\n        } break;\n        case NK_FORMAT_FLOAT:\n            NK_MEMCPY(attribute, &values[value_index], sizeof(values[value_index]));\n            attribute = (void*)((char*)attribute + sizeof(float));\n            break;\n        case NK_FORMAT_DOUBLE: {\n            double value = (double)values[value_index];\n            NK_MEMCPY(attribute, &value, sizeof(value));\n            attribute = (void*)((char*)attribute + sizeof(double));\n            } break;\n        }\n    }\n}\nNK_INTERN void*\nnk_draw_vertex(void *dst, const struct nk_convert_config *config,\n    struct nk_vec2 pos, struct nk_vec2 uv, struct nk_colorf color)\n{\n    void *result = (void*)((char*)dst + config->vertex_size);\n    const struct nk_draw_vertex_layout_element *elem_iter = config->vertex_layout;\n    while (!nk_draw_vertex_layout_element_is_end_of_layout(elem_iter)) {\n        void *address = (void*)((char*)dst + elem_iter->offset);\n        switch (elem_iter->attribute) {\n        case NK_VERTEX_ATTRIBUTE_COUNT:\n        default: NK_ASSERT(0 && \"wrong element attribute\"); break;\n        case NK_VERTEX_POSITION: nk_draw_vertex_element(address, &pos.x, 2, elem_iter->format); break;\n        case NK_VERTEX_TEXCOORD: nk_draw_vertex_element(address, &uv.x, 2, elem_iter->format); break;\n        case NK_VERTEX_COLOR: nk_draw_vertex_color(address, &color.r, elem_iter->format); break;\n        }\n        elem_iter++;\n    }\n    return result;\n}\nNK_API void\nnk_draw_list_stroke_poly_line(struct nk_draw_list *list, const struct nk_vec2 *points,\n    const unsigned int points_count, struct nk_color color, enum nk_draw_list_stroke closed,\n    float thickness, enum nk_anti_aliasing aliasing)\n{\n    nk_size count;\n    int thick_line;\n    struct nk_colorf col;\n    struct nk_colorf col_trans;\n    NK_ASSERT(list);\n    if (!list || points_count < 2) return;\n\n    color.a = (nk_byte)((float)color.a * list->config.global_alpha);\n    count = points_count;\n    if (!closed) count = points_count-1;\n    thick_line = thickness > 1.0f;\n\n#ifdef NK_INCLUDE_COMMAND_USERDATA\n    nk_draw_list_push_userdata(list, list->userdata);\n#endif\n\n    color.a = (nk_byte)((float)color.a * list->config.global_alpha);\n    nk_color_fv(&col.r, color);\n    col_trans = col;\n    col_trans.a = 0;\n\n    if (aliasing == NK_ANTI_ALIASING_ON) {\n        /* ANTI-ALIASED STROKE */\n        const float AA_SIZE = 1.0f;\n        NK_STORAGE const nk_size pnt_align = NK_ALIGNOF(struct nk_vec2);\n        NK_STORAGE const nk_size pnt_size = sizeof(struct nk_vec2);\n\n        /* allocate vertices and elements  */\n        nk_size i1 = 0;\n        nk_size vertex_offset;\n        nk_size index = list->vertex_count;\n\n        const nk_size idx_count = (thick_line) ?  (count * 18) : (count * 12);\n        const nk_size vtx_count = (thick_line) ? (points_count * 4): (points_count *3);\n\n        void *vtx = nk_draw_list_alloc_vertices(list, vtx_count);\n        nk_draw_index *ids = nk_draw_list_alloc_elements(list, idx_count);\n\n        nk_size size;\n        struct nk_vec2 *normals, *temp;\n        if (!vtx || !ids) return;\n\n        /* temporary allocate normals + points */\n        vertex_offset = (nk_size)((nk_byte*)vtx - (nk_byte*)list->vertices->memory.ptr);\n        nk_buffer_mark(list->vertices, NK_BUFFER_FRONT);\n        size = pnt_size * ((thick_line) ? 5 : 3) * points_count;\n        normals = (struct nk_vec2*) nk_buffer_alloc(list->vertices, NK_BUFFER_FRONT, size, pnt_align);\n        if (!normals) return;\n        temp = normals + points_count;\n\n        /* make sure vertex pointer is still correct */\n        vtx = (void*)((nk_byte*)list->vertices->memory.ptr + vertex_offset);\n\n        /* calculate normals */\n        for (i1 = 0; i1 < count; ++i1) {\n            const nk_size i2 = ((i1 + 1) == points_count) ? 0 : (i1 + 1);\n            struct nk_vec2 diff = nk_vec2_sub(points[i2], points[i1]);\n            float len;\n\n            /* vec2 inverted length  */\n            len = nk_vec2_len_sqr(diff);\n            if (len != 0.0f)\n                len = nk_inv_sqrt(len);\n            else len = 1.0f;\n\n            diff = nk_vec2_muls(diff, len);\n            normals[i1].x = diff.y;\n            normals[i1].y = -diff.x;\n        }\n\n        if (!closed)\n            normals[points_count-1] = normals[points_count-2];\n\n        if (!thick_line) {\n            nk_size idx1, i;\n            if (!closed) {\n                struct nk_vec2 d;\n                temp[0] = nk_vec2_add(points[0], nk_vec2_muls(normals[0], AA_SIZE));\n                temp[1] = nk_vec2_sub(points[0], nk_vec2_muls(normals[0], AA_SIZE));\n                d = nk_vec2_muls(normals[points_count-1], AA_SIZE);\n                temp[(points_count-1) * 2 + 0] = nk_vec2_add(points[points_count-1], d);\n                temp[(points_count-1) * 2 + 1] = nk_vec2_sub(points[points_count-1], d);\n            }\n\n            /* fill elements */\n            idx1 = index;\n            for (i1 = 0; i1 < count; i1++) {\n                struct nk_vec2 dm;\n                float dmr2;\n                nk_size i2 = ((i1 + 1) == points_count) ? 0 : (i1 + 1);\n                nk_size idx2 = ((i1+1) == points_count) ? index: (idx1 + 3);\n\n                /* average normals */\n                dm = nk_vec2_muls(nk_vec2_add(normals[i1], normals[i2]), 0.5f);\n                dmr2 = dm.x * dm.x + dm.y* dm.y;\n                if (dmr2 > 0.000001f) {\n                    float scale = 1.0f/dmr2;\n                    scale = NK_MIN(100.0f, scale);\n                    dm = nk_vec2_muls(dm, scale);\n                }\n\n                dm = nk_vec2_muls(dm, AA_SIZE);\n                temp[i2*2+0] = nk_vec2_add(points[i2], dm);\n                temp[i2*2+1] = nk_vec2_sub(points[i2], dm);\n\n                ids[0] = (nk_draw_index)(idx2 + 0); ids[1] = (nk_draw_index)(idx1+0);\n                ids[2] = (nk_draw_index)(idx1 + 2); ids[3] = (nk_draw_index)(idx1+2);\n                ids[4] = (nk_draw_index)(idx2 + 2); ids[5] = (nk_draw_index)(idx2+0);\n                ids[6] = (nk_draw_index)(idx2 + 1); ids[7] = (nk_draw_index)(idx1+1);\n                ids[8] = (nk_draw_index)(idx1 + 0); ids[9] = (nk_draw_index)(idx1+0);\n                ids[10]= (nk_draw_index)(idx2 + 0); ids[11]= (nk_draw_index)(idx2+1);\n                ids += 12;\n                idx1 = idx2;\n            }\n\n            /* fill vertices */\n            for (i = 0; i < points_count; ++i) {\n                const struct nk_vec2 uv = list->config.null.uv;\n                vtx = nk_draw_vertex(vtx, &list->config, points[i], uv, col);\n                vtx = nk_draw_vertex(vtx, &list->config, temp[i*2+0], uv, col_trans);\n                vtx = nk_draw_vertex(vtx, &list->config, temp[i*2+1], uv, col_trans);\n            }\n        } else {\n            nk_size idx1, i;\n            const float half_inner_thickness = (thickness - AA_SIZE) * 0.5f;\n            if (!closed) {\n                struct nk_vec2 d1 = nk_vec2_muls(normals[0], half_inner_thickness + AA_SIZE);\n                struct nk_vec2 d2 = nk_vec2_muls(normals[0], half_inner_thickness);\n\n                temp[0] = nk_vec2_add(points[0], d1);\n                temp[1] = nk_vec2_add(points[0], d2);\n                temp[2] = nk_vec2_sub(points[0], d2);\n                temp[3] = nk_vec2_sub(points[0], d1);\n\n                d1 = nk_vec2_muls(normals[points_count-1], half_inner_thickness + AA_SIZE);\n                d2 = nk_vec2_muls(normals[points_count-1], half_inner_thickness);\n\n                temp[(points_count-1)*4+0] = nk_vec2_add(points[points_count-1], d1);\n                temp[(points_count-1)*4+1] = nk_vec2_add(points[points_count-1], d2);\n                temp[(points_count-1)*4+2] = nk_vec2_sub(points[points_count-1], d2);\n                temp[(points_count-1)*4+3] = nk_vec2_sub(points[points_count-1], d1);\n            }\n\n            /* add all elements */\n            idx1 = index;\n            for (i1 = 0; i1 < count; ++i1) {\n                struct nk_vec2 dm_out, dm_in;\n                const nk_size i2 = ((i1+1) == points_count) ? 0: (i1 + 1);\n                nk_size idx2 = ((i1+1) == points_count) ? index: (idx1 + 4);\n\n                /* average normals */\n                struct nk_vec2 dm = nk_vec2_muls(nk_vec2_add(normals[i1], normals[i2]), 0.5f);\n                float dmr2 = dm.x * dm.x + dm.y* dm.y;\n                if (dmr2 > 0.000001f) {\n                    float scale = 1.0f/dmr2;\n                    scale = NK_MIN(100.0f, scale);\n                    dm = nk_vec2_muls(dm, scale);\n                }\n\n                dm_out = nk_vec2_muls(dm, ((half_inner_thickness) + AA_SIZE));\n                dm_in = nk_vec2_muls(dm, half_inner_thickness);\n                temp[i2*4+0] = nk_vec2_add(points[i2], dm_out);\n                temp[i2*4+1] = nk_vec2_add(points[i2], dm_in);\n                temp[i2*4+2] = nk_vec2_sub(points[i2], dm_in);\n                temp[i2*4+3] = nk_vec2_sub(points[i2], dm_out);\n\n                /* add indexes */\n                ids[0] = (nk_draw_index)(idx2 + 1); ids[1] = (nk_draw_index)(idx1+1);\n                ids[2] = (nk_draw_index)(idx1 + 2); ids[3] = (nk_draw_index)(idx1+2);\n                ids[4] = (nk_draw_index)(idx2 + 2); ids[5] = (nk_draw_index)(idx2+1);\n                ids[6] = (nk_draw_index)(idx2 + 1); ids[7] = (nk_draw_index)(idx1+1);\n                ids[8] = (nk_draw_index)(idx1 + 0); ids[9] = (nk_draw_index)(idx1+0);\n                ids[10]= (nk_draw_index)(idx2 + 0); ids[11] = (nk_draw_index)(idx2+1);\n                ids[12]= (nk_draw_index)(idx2 + 2); ids[13] = (nk_draw_index)(idx1+2);\n                ids[14]= (nk_draw_index)(idx1 + 3); ids[15] = (nk_draw_index)(idx1+3);\n                ids[16]= (nk_draw_index)(idx2 + 3); ids[17] = (nk_draw_index)(idx2+2);\n                ids += 18;\n                idx1 = idx2;\n            }\n\n            /* add vertices */\n            for (i = 0; i < points_count; ++i) {\n                const struct nk_vec2 uv = list->config.null.uv;\n                vtx = nk_draw_vertex(vtx, &list->config, temp[i*4+0], uv, col_trans);\n                vtx = nk_draw_vertex(vtx, &list->config, temp[i*4+1], uv, col);\n                vtx = nk_draw_vertex(vtx, &list->config, temp[i*4+2], uv, col);\n                vtx = nk_draw_vertex(vtx, &list->config, temp[i*4+3], uv, col_trans);\n            }\n        }\n        /* free temporary normals + points */\n        nk_buffer_reset(list->vertices, NK_BUFFER_FRONT);\n    } else {\n        /* NON ANTI-ALIASED STROKE */\n        nk_size i1 = 0;\n        nk_size idx = list->vertex_count;\n        const nk_size idx_count = count * 6;\n        const nk_size vtx_count = count * 4;\n        void *vtx = nk_draw_list_alloc_vertices(list, vtx_count);\n        nk_draw_index *ids = nk_draw_list_alloc_elements(list, idx_count);\n        if (!vtx || !ids) return;\n\n        for (i1 = 0; i1 < count; ++i1) {\n            float dx, dy;\n            const struct nk_vec2 uv = list->config.null.uv;\n            const nk_size i2 = ((i1+1) == points_count) ? 0 : i1 + 1;\n            const struct nk_vec2 p1 = points[i1];\n            const struct nk_vec2 p2 = points[i2];\n            struct nk_vec2 diff = nk_vec2_sub(p2, p1);\n            float len;\n\n            /* vec2 inverted length  */\n            len = nk_vec2_len_sqr(diff);\n            if (len != 0.0f)\n                len = nk_inv_sqrt(len);\n            else len = 1.0f;\n            diff = nk_vec2_muls(diff, len);\n\n            /* add vertices */\n            dx = diff.x * (thickness * 0.5f);\n            dy = diff.y * (thickness * 0.5f);\n\n            vtx = nk_draw_vertex(vtx, &list->config, nk_vec2(p1.x + dy, p1.y - dx), uv, col);\n            vtx = nk_draw_vertex(vtx, &list->config, nk_vec2(p2.x + dy, p2.y - dx), uv, col);\n            vtx = nk_draw_vertex(vtx, &list->config, nk_vec2(p2.x - dy, p2.y + dx), uv, col);\n            vtx = nk_draw_vertex(vtx, &list->config, nk_vec2(p1.x - dy, p1.y + dx), uv, col);\n\n            ids[0] = (nk_draw_index)(idx+0); ids[1] = (nk_draw_index)(idx+1);\n            ids[2] = (nk_draw_index)(idx+2); ids[3] = (nk_draw_index)(idx+0);\n            ids[4] = (nk_draw_index)(idx+2); ids[5] = (nk_draw_index)(idx+3);\n\n            ids += 6;\n            idx += 4;\n        }\n    }\n}\nNK_API void\nnk_draw_list_fill_poly_convex(struct nk_draw_list *list,\n    const struct nk_vec2 *points, const unsigned int points_count,\n    struct nk_color color, enum nk_anti_aliasing aliasing)\n{\n    struct nk_colorf col;\n    struct nk_colorf col_trans;\n\n    NK_STORAGE const nk_size pnt_align = NK_ALIGNOF(struct nk_vec2);\n    NK_STORAGE const nk_size pnt_size = sizeof(struct nk_vec2);\n    NK_ASSERT(list);\n    if (!list || points_count < 3) return;\n\n#ifdef NK_INCLUDE_COMMAND_USERDATA\n    nk_draw_list_push_userdata(list, list->userdata);\n#endif\n\n    color.a = (nk_byte)((float)color.a * list->config.global_alpha);\n    nk_color_fv(&col.r, color);\n    col_trans = col;\n    col_trans.a = 0;\n\n    if (aliasing == NK_ANTI_ALIASING_ON) {\n        nk_size i = 0;\n        nk_size i0 = 0;\n        nk_size i1 = 0;\n\n        const float AA_SIZE = 1.0f;\n        nk_size vertex_offset = 0;\n        nk_size index = list->vertex_count;\n\n        const nk_size idx_count = (points_count-2)*3 + points_count*6;\n        const nk_size vtx_count = (points_count*2);\n\n        void *vtx = nk_draw_list_alloc_vertices(list, vtx_count);\n        nk_draw_index *ids = nk_draw_list_alloc_elements(list, idx_count);\n\n        nk_size size = 0;\n        struct nk_vec2 *normals = 0;\n        unsigned int vtx_inner_idx = (unsigned int)(index + 0);\n        unsigned int vtx_outer_idx = (unsigned int)(index + 1);\n        if (!vtx || !ids) return;\n\n        /* temporary allocate normals */\n        vertex_offset = (nk_size)((nk_byte*)vtx - (nk_byte*)list->vertices->memory.ptr);\n        nk_buffer_mark(list->vertices, NK_BUFFER_FRONT);\n        size = pnt_size * points_count;\n        normals = (struct nk_vec2*) nk_buffer_alloc(list->vertices, NK_BUFFER_FRONT, size, pnt_align);\n        if (!normals) return;\n        vtx = (void*)((nk_byte*)list->vertices->memory.ptr + vertex_offset);\n\n        /* add elements */\n        for (i = 2; i < points_count; i++) {\n            ids[0] = (nk_draw_index)(vtx_inner_idx);\n            ids[1] = (nk_draw_index)(vtx_inner_idx + ((i-1) << 1));\n            ids[2] = (nk_draw_index)(vtx_inner_idx + (i << 1));\n            ids += 3;\n        }\n\n        /* compute normals */\n        for (i0 = points_count-1, i1 = 0; i1 < points_count; i0 = i1++) {\n            struct nk_vec2 p0 = points[i0];\n            struct nk_vec2 p1 = points[i1];\n            struct nk_vec2 diff = nk_vec2_sub(p1, p0);\n\n            /* vec2 inverted length  */\n            float len = nk_vec2_len_sqr(diff);\n            if (len != 0.0f)\n                len = nk_inv_sqrt(len);\n            else len = 1.0f;\n            diff = nk_vec2_muls(diff, len);\n\n            normals[i0].x = diff.y;\n            normals[i0].y = -diff.x;\n        }\n\n        /* add vertices + indexes */\n        for (i0 = points_count-1, i1 = 0; i1 < points_count; i0 = i1++) {\n            const struct nk_vec2 uv = list->config.null.uv;\n            struct nk_vec2 n0 = normals[i0];\n            struct nk_vec2 n1 = normals[i1];\n            struct nk_vec2 dm = nk_vec2_muls(nk_vec2_add(n0, n1), 0.5f);\n            float dmr2 = dm.x*dm.x + dm.y*dm.y;\n            if (dmr2 > 0.000001f) {\n                float scale = 1.0f / dmr2;\n                scale = NK_MIN(scale, 100.0f);\n                dm = nk_vec2_muls(dm, scale);\n            }\n            dm = nk_vec2_muls(dm, AA_SIZE * 0.5f);\n\n            /* add vertices */\n            vtx = nk_draw_vertex(vtx, &list->config, nk_vec2_sub(points[i1], dm), uv, col);\n            vtx = nk_draw_vertex(vtx, &list->config, nk_vec2_add(points[i1], dm), uv, col_trans);\n\n            /* add indexes */\n            ids[0] = (nk_draw_index)(vtx_inner_idx+(i1<<1));\n            ids[1] = (nk_draw_index)(vtx_inner_idx+(i0<<1));\n            ids[2] = (nk_draw_index)(vtx_outer_idx+(i0<<1));\n            ids[3] = (nk_draw_index)(vtx_outer_idx+(i0<<1));\n            ids[4] = (nk_draw_index)(vtx_outer_idx+(i1<<1));\n            ids[5] = (nk_draw_index)(vtx_inner_idx+(i1<<1));\n            ids += 6;\n        }\n        /* free temporary normals + points */\n        nk_buffer_reset(list->vertices, NK_BUFFER_FRONT);\n    } else {\n        nk_size i = 0;\n        nk_size index = list->vertex_count;\n        const nk_size idx_count = (points_count-2)*3;\n        const nk_size vtx_count = points_count;\n        void *vtx = nk_draw_list_alloc_vertices(list, vtx_count);\n        nk_draw_index *ids = nk_draw_list_alloc_elements(list, idx_count);\n\n        if (!vtx || !ids) return;\n        for (i = 0; i < vtx_count; ++i)\n            vtx = nk_draw_vertex(vtx, &list->config, points[i], list->config.null.uv, col);\n        for (i = 2; i < points_count; ++i) {\n            ids[0] = (nk_draw_index)index;\n            ids[1] = (nk_draw_index)(index+ i - 1);\n            ids[2] = (nk_draw_index)(index+i);\n            ids += 3;\n        }\n    }\n}\nNK_API void\nnk_draw_list_path_clear(struct nk_draw_list *list)\n{\n    NK_ASSERT(list);\n    if (!list) return;\n    nk_buffer_reset(list->buffer, NK_BUFFER_FRONT);\n    list->path_count = 0;\n    list->path_offset = 0;\n}\nNK_API void\nnk_draw_list_path_line_to(struct nk_draw_list *list, struct nk_vec2 pos)\n{\n    struct nk_vec2 *points = 0;\n    struct nk_draw_command *cmd = 0;\n    NK_ASSERT(list);\n    if (!list) return;\n    if (!list->cmd_count)\n        nk_draw_list_add_clip(list, nk_null_rect);\n\n    cmd = nk_draw_list_command_last(list);\n    if (cmd && cmd->texture.ptr != list->config.null.texture.ptr)\n        nk_draw_list_push_image(list, list->config.null.texture);\n\n    points = nk_draw_list_alloc_path(list, 1);\n    if (!points) return;\n    points[0] = pos;\n}\nNK_API void\nnk_draw_list_path_arc_to_fast(struct nk_draw_list *list, struct nk_vec2 center,\n    float radius, int a_min, int a_max)\n{\n    int a = 0;\n    NK_ASSERT(list);\n    if (!list) return;\n    if (a_min <= a_max) {\n        for (a = a_min; a <= a_max; a++) {\n            const struct nk_vec2 c = list->circle_vtx[(nk_size)a % NK_LEN(list->circle_vtx)];\n            const float x = center.x + c.x * radius;\n            const float y = center.y + c.y * radius;\n            nk_draw_list_path_line_to(list, nk_vec2(x, y));\n        }\n    }\n}\nNK_API void\nnk_draw_list_path_arc_to(struct nk_draw_list *list, struct nk_vec2 center,\n    float radius, float a_min, float a_max, unsigned int segments)\n{\n    unsigned int i = 0;\n    NK_ASSERT(list);\n    if (!list) return;\n    if (radius == 0.0f) return;\n\n    /*  This algorithm for arc drawing relies on these two trigonometric identities[1]:\n            sin(a + b) = sin(a) * cos(b) + cos(a) * sin(b)\n            cos(a + b) = cos(a) * cos(b) - sin(a) * sin(b)\n\n        Two coordinates (x, y) of a point on a circle centered on\n        the origin can be written in polar form as:\n            x = r * cos(a)\n            y = r * sin(a)\n        where r is the radius of the circle,\n            a is the angle between (x, y) and the origin.\n\n        This allows us to rotate the coordinates around the\n        origin by an angle b using the following transformation:\n            x' = r * cos(a + b) = x * cos(b) - y * sin(b)\n            y' = r * sin(a + b) = y * cos(b) + x * sin(b)\n\n        [1] https://en.wikipedia.org/wiki/List_of_trigonometric_identities#Angle_sum_and_difference_identities\n    */\n    {const float d_angle = (a_max - a_min) / (float)segments;\n    const float sin_d = (float)NK_SIN(d_angle);\n    const float cos_d = (float)NK_COS(d_angle);\n\n    float cx = (float)NK_COS(a_min) * radius;\n    float cy = (float)NK_SIN(a_min) * radius;\n    for(i = 0; i <= segments; ++i) {\n        float new_cx, new_cy;\n        const float x = center.x + cx;\n        const float y = center.y + cy;\n        nk_draw_list_path_line_to(list, nk_vec2(x, y));\n\n        new_cx = cx * cos_d - cy * sin_d;\n        new_cy = cy * cos_d + cx * sin_d;\n        cx = new_cx;\n        cy = new_cy;\n    }}\n}\nNK_API void\nnk_draw_list_path_rect_to(struct nk_draw_list *list, struct nk_vec2 a,\n    struct nk_vec2 b, float rounding)\n{\n    float r;\n    NK_ASSERT(list);\n    if (!list) return;\n    r = rounding;\n    r = NK_MIN(r, ((b.x-a.x) < 0) ? -(b.x-a.x): (b.x-a.x));\n    r = NK_MIN(r, ((b.y-a.y) < 0) ? -(b.y-a.y): (b.y-a.y));\n\n    if (r == 0.0f) {\n        nk_draw_list_path_line_to(list, a);\n        nk_draw_list_path_line_to(list, nk_vec2(b.x,a.y));\n        nk_draw_list_path_line_to(list, b);\n        nk_draw_list_path_line_to(list, nk_vec2(a.x,b.y));\n    } else {\n        nk_draw_list_path_arc_to_fast(list, nk_vec2(a.x + r, a.y + r), r, 6, 9);\n        nk_draw_list_path_arc_to_fast(list, nk_vec2(b.x - r, a.y + r), r, 9, 12);\n        nk_draw_list_path_arc_to_fast(list, nk_vec2(b.x - r, b.y - r), r, 0, 3);\n        nk_draw_list_path_arc_to_fast(list, nk_vec2(a.x + r, b.y - r), r, 3, 6);\n    }\n}\nNK_API void\nnk_draw_list_path_curve_to(struct nk_draw_list *list, struct nk_vec2 p2,\n    struct nk_vec2 p3, struct nk_vec2 p4, unsigned int num_segments)\n{\n    float t_step;\n    unsigned int i_step;\n    struct nk_vec2 p1;\n\n    NK_ASSERT(list);\n    NK_ASSERT(list->path_count);\n    if (!list || !list->path_count) return;\n    num_segments = NK_MAX(num_segments, 1);\n\n    p1 = nk_draw_list_path_last(list);\n    t_step = 1.0f/(float)num_segments;\n    for (i_step = 1; i_step <= num_segments; ++i_step) {\n        float t = t_step * (float)i_step;\n        float u = 1.0f - t;\n        float w1 = u*u*u;\n        float w2 = 3*u*u*t;\n        float w3 = 3*u*t*t;\n        float w4 = t * t *t;\n        float x = w1 * p1.x + w2 * p2.x + w3 * p3.x + w4 * p4.x;\n        float y = w1 * p1.y + w2 * p2.y + w3 * p3.y + w4 * p4.y;\n        nk_draw_list_path_line_to(list, nk_vec2(x,y));\n    }\n}\nNK_API void\nnk_draw_list_path_fill(struct nk_draw_list *list, struct nk_color color)\n{\n    struct nk_vec2 *points;\n    NK_ASSERT(list);\n    if (!list) return;\n    points = (struct nk_vec2*)nk_buffer_memory(list->buffer);\n    nk_draw_list_fill_poly_convex(list, points, list->path_count, color, list->config.shape_AA);\n    nk_draw_list_path_clear(list);\n}\nNK_API void\nnk_draw_list_path_stroke(struct nk_draw_list *list, struct nk_color color,\n    enum nk_draw_list_stroke closed, float thickness)\n{\n    struct nk_vec2 *points;\n    NK_ASSERT(list);\n    if (!list) return;\n    points = (struct nk_vec2*)nk_buffer_memory(list->buffer);\n    nk_draw_list_stroke_poly_line(list, points, list->path_count, color,\n        closed, thickness, list->config.line_AA);\n    nk_draw_list_path_clear(list);\n}\nNK_API void\nnk_draw_list_stroke_line(struct nk_draw_list *list, struct nk_vec2 a,\n    struct nk_vec2 b, struct nk_color col, float thickness)\n{\n    NK_ASSERT(list);\n    if (!list || !col.a) return;\n    if (list->line_AA == NK_ANTI_ALIASING_ON) {\n        nk_draw_list_path_line_to(list, a);\n        nk_draw_list_path_line_to(list, b);\n    } else {\n        nk_draw_list_path_line_to(list, nk_vec2_sub(a,nk_vec2(0.5f,0.5f)));\n        nk_draw_list_path_line_to(list, nk_vec2_sub(b,nk_vec2(0.5f,0.5f)));\n    }\n    nk_draw_list_path_stroke(list,  col, NK_STROKE_OPEN, thickness);\n}\nNK_API void\nnk_draw_list_fill_rect(struct nk_draw_list *list, struct nk_rect rect,\n    struct nk_color col, float rounding)\n{\n    NK_ASSERT(list);\n    if (!list || !col.a) return;\n\n    if (list->line_AA == NK_ANTI_ALIASING_ON) {\n        nk_draw_list_path_rect_to(list, nk_vec2(rect.x, rect.y),\n            nk_vec2(rect.x + rect.w, rect.y + rect.h), rounding);\n    } else {\n        nk_draw_list_path_rect_to(list, nk_vec2(rect.x-0.5f, rect.y-0.5f),\n            nk_vec2(rect.x + rect.w, rect.y + rect.h), rounding);\n    } nk_draw_list_path_fill(list,  col);\n}\nNK_API void\nnk_draw_list_stroke_rect(struct nk_draw_list *list, struct nk_rect rect,\n    struct nk_color col, float rounding, float thickness)\n{\n    NK_ASSERT(list);\n    if (!list || !col.a) return;\n    if (list->line_AA == NK_ANTI_ALIASING_ON) {\n        nk_draw_list_path_rect_to(list, nk_vec2(rect.x, rect.y),\n            nk_vec2(rect.x + rect.w, rect.y + rect.h), rounding);\n    } else {\n        nk_draw_list_path_rect_to(list, nk_vec2(rect.x-0.5f, rect.y-0.5f),\n            nk_vec2(rect.x + rect.w, rect.y + rect.h), rounding);\n    } nk_draw_list_path_stroke(list,  col, NK_STROKE_CLOSED, thickness);\n}\nNK_API void\nnk_draw_list_fill_rect_multi_color(struct nk_draw_list *list, struct nk_rect rect,\n    struct nk_color left, struct nk_color top, struct nk_color right,\n    struct nk_color bottom)\n{\n    void *vtx;\n    struct nk_colorf col_left, col_top;\n    struct nk_colorf col_right, col_bottom;\n    nk_draw_index *idx;\n    nk_draw_index index;\n\n    nk_color_fv(&col_left.r, left);\n    nk_color_fv(&col_right.r, right);\n    nk_color_fv(&col_top.r, top);\n    nk_color_fv(&col_bottom.r, bottom);\n\n    NK_ASSERT(list);\n    if (!list) return;\n\n    nk_draw_list_push_image(list, list->config.null.texture);\n    index = (nk_draw_index)list->vertex_count;\n    vtx = nk_draw_list_alloc_vertices(list, 4);\n    idx = nk_draw_list_alloc_elements(list, 6);\n    if (!vtx || !idx) return;\n\n    idx[0] = (nk_draw_index)(index+0); idx[1] = (nk_draw_index)(index+1);\n    idx[2] = (nk_draw_index)(index+2); idx[3] = (nk_draw_index)(index+0);\n    idx[4] = (nk_draw_index)(index+2); idx[5] = (nk_draw_index)(index+3);\n\n    vtx = nk_draw_vertex(vtx, &list->config, nk_vec2(rect.x, rect.y), list->config.null.uv, col_left);\n    vtx = nk_draw_vertex(vtx, &list->config, nk_vec2(rect.x + rect.w, rect.y), list->config.null.uv, col_top);\n    vtx = nk_draw_vertex(vtx, &list->config, nk_vec2(rect.x + rect.w, rect.y + rect.h), list->config.null.uv, col_right);\n    vtx = nk_draw_vertex(vtx, &list->config, nk_vec2(rect.x, rect.y + rect.h), list->config.null.uv, col_bottom);\n}\nNK_API void\nnk_draw_list_fill_triangle(struct nk_draw_list *list, struct nk_vec2 a,\n    struct nk_vec2 b, struct nk_vec2 c, struct nk_color col)\n{\n    NK_ASSERT(list);\n    if (!list || !col.a) return;\n    nk_draw_list_path_line_to(list, a);\n    nk_draw_list_path_line_to(list, b);\n    nk_draw_list_path_line_to(list, c);\n    nk_draw_list_path_fill(list, col);\n}\nNK_API void\nnk_draw_list_stroke_triangle(struct nk_draw_list *list, struct nk_vec2 a,\n    struct nk_vec2 b, struct nk_vec2 c, struct nk_color col, float thickness)\n{\n    NK_ASSERT(list);\n    if (!list || !col.a) return;\n    nk_draw_list_path_line_to(list, a);\n    nk_draw_list_path_line_to(list, b);\n    nk_draw_list_path_line_to(list, c);\n    nk_draw_list_path_stroke(list, col, NK_STROKE_CLOSED, thickness);\n}\nNK_API void\nnk_draw_list_fill_circle(struct nk_draw_list *list, struct nk_vec2 center,\n    float radius, struct nk_color col, unsigned int segs)\n{\n    float a_max;\n    NK_ASSERT(list);\n    if (!list || !col.a) return;\n    a_max = NK_PI * 2.0f * ((float)segs - 1.0f) / (float)segs;\n    nk_draw_list_path_arc_to(list, center, radius, 0.0f, a_max, segs);\n    nk_draw_list_path_fill(list, col);\n}\nNK_API void\nnk_draw_list_stroke_circle(struct nk_draw_list *list, struct nk_vec2 center,\n    float radius, struct nk_color col, unsigned int segs, float thickness)\n{\n    float a_max;\n    NK_ASSERT(list);\n    if (!list || !col.a) return;\n    a_max = NK_PI * 2.0f * ((float)segs - 1.0f) / (float)segs;\n    nk_draw_list_path_arc_to(list, center, radius, 0.0f, a_max, segs);\n    nk_draw_list_path_stroke(list, col, NK_STROKE_CLOSED, thickness);\n}\nNK_API void\nnk_draw_list_stroke_curve(struct nk_draw_list *list, struct nk_vec2 p0,\n    struct nk_vec2 cp0, struct nk_vec2 cp1, struct nk_vec2 p1,\n    struct nk_color col, unsigned int segments, float thickness)\n{\n    NK_ASSERT(list);\n    if (!list || !col.a) return;\n    nk_draw_list_path_line_to(list, p0);\n    nk_draw_list_path_curve_to(list, cp0, cp1, p1, segments);\n    nk_draw_list_path_stroke(list, col, NK_STROKE_OPEN, thickness);\n}\nNK_INTERN void\nnk_draw_list_push_rect_uv(struct nk_draw_list *list, struct nk_vec2 a,\n    struct nk_vec2 c, struct nk_vec2 uva, struct nk_vec2 uvc,\n    struct nk_color color)\n{\n    void *vtx;\n    struct nk_vec2 uvb;\n    struct nk_vec2 uvd;\n    struct nk_vec2 b;\n    struct nk_vec2 d;\n\n    struct nk_colorf col;\n    nk_draw_index *idx;\n    nk_draw_index index;\n    NK_ASSERT(list);\n    if (!list) return;\n\n    nk_color_fv(&col.r, color);\n    uvb = nk_vec2(uvc.x, uva.y);\n    uvd = nk_vec2(uva.x, uvc.y);\n    b = nk_vec2(c.x, a.y);\n    d = nk_vec2(a.x, c.y);\n\n    index = (nk_draw_index)list->vertex_count;\n    vtx = nk_draw_list_alloc_vertices(list, 4);\n    idx = nk_draw_list_alloc_elements(list, 6);\n    if (!vtx || !idx) return;\n\n    idx[0] = (nk_draw_index)(index+0); idx[1] = (nk_draw_index)(index+1);\n    idx[2] = (nk_draw_index)(index+2); idx[3] = (nk_draw_index)(index+0);\n    idx[4] = (nk_draw_index)(index+2); idx[5] = (nk_draw_index)(index+3);\n\n    vtx = nk_draw_vertex(vtx, &list->config, a, uva, col);\n    vtx = nk_draw_vertex(vtx, &list->config, b, uvb, col);\n    vtx = nk_draw_vertex(vtx, &list->config, c, uvc, col);\n    vtx = nk_draw_vertex(vtx, &list->config, d, uvd, col);\n}\nNK_API void\nnk_draw_list_add_image(struct nk_draw_list *list, struct nk_image texture,\n    struct nk_rect rect, struct nk_color color)\n{\n    NK_ASSERT(list);\n    if (!list) return;\n    /* push new command with given texture */\n    nk_draw_list_push_image(list, texture.handle);\n    if (nk_image_is_subimage(&texture)) {\n        /* add region inside of the texture  */\n        struct nk_vec2 uv[2];\n        uv[0].x = (float)texture.region[0]/(float)texture.w;\n        uv[0].y = (float)texture.region[1]/(float)texture.h;\n        uv[1].x = (float)(texture.region[0] + texture.region[2])/(float)texture.w;\n        uv[1].y = (float)(texture.region[1] + texture.region[3])/(float)texture.h;\n        nk_draw_list_push_rect_uv(list, nk_vec2(rect.x, rect.y),\n            nk_vec2(rect.x + rect.w, rect.y + rect.h),  uv[0], uv[1], color);\n    } else nk_draw_list_push_rect_uv(list, nk_vec2(rect.x, rect.y),\n            nk_vec2(rect.x + rect.w, rect.y + rect.h),\n            nk_vec2(0.0f, 0.0f), nk_vec2(1.0f, 1.0f),color);\n}\nNK_API void\nnk_draw_list_add_text(struct nk_draw_list *list, const struct nk_user_font *font,\n    struct nk_rect rect, const char *text, int len, float font_height,\n    struct nk_color fg)\n{\n    float x = 0;\n    int text_len = 0;\n    nk_rune unicode = 0;\n    nk_rune next = 0;\n    int glyph_len = 0;\n    int next_glyph_len = 0;\n    struct nk_user_font_glyph g;\n\n    NK_ASSERT(list);\n    if (!list || !len || !text) return;\n    if (!NK_INTERSECT(rect.x, rect.y, rect.w, rect.h,\n        list->clip_rect.x, list->clip_rect.y, list->clip_rect.w, list->clip_rect.h)) return;\n\n    nk_draw_list_push_image(list, font->texture);\n    x = rect.x;\n    glyph_len = nk_utf_decode(text, &unicode, len);\n    if (!glyph_len) return;\n\n    /* draw every glyph image */\n    fg.a = (nk_byte)((float)fg.a * list->config.global_alpha);\n    while (text_len < len && glyph_len) {\n        float gx, gy, gh, gw;\n        float char_width = 0;\n        if (unicode == NK_UTF_INVALID) break;\n\n        /* query currently drawn glyph information */\n        next_glyph_len = nk_utf_decode(text + text_len + glyph_len, &next, (int)len - text_len);\n        font->query(font->userdata, font_height, &g, unicode,\n                    (next == NK_UTF_INVALID) ? '\\0' : next);\n\n        /* calculate and draw glyph drawing rectangle and image */\n        gx = x + g.offset.x;\n        gy = rect.y + g.offset.y;\n        gw = g.width; gh = g.height;\n        char_width = g.xadvance;\n        nk_draw_list_push_rect_uv(list, nk_vec2(gx,gy), nk_vec2(gx + gw, gy+ gh),\n            g.uv[0], g.uv[1], fg);\n\n        /* offset next glyph */\n        text_len += glyph_len;\n        x += char_width;\n        glyph_len = next_glyph_len;\n        unicode = next;\n    }\n}\nNK_API nk_flags\nnk_convert(struct nk_context *ctx, struct nk_buffer *cmds,\n    struct nk_buffer *vertices, struct nk_buffer *elements,\n    const struct nk_convert_config *config)\n{\n    nk_flags res = NK_CONVERT_SUCCESS;\n    const struct nk_command *cmd;\n    NK_ASSERT(ctx);\n    NK_ASSERT(cmds);\n    NK_ASSERT(vertices);\n    NK_ASSERT(elements);\n    NK_ASSERT(config);\n    NK_ASSERT(config->vertex_layout);\n    NK_ASSERT(config->vertex_size);\n    if (!ctx || !cmds || !vertices || !elements || !config || !config->vertex_layout)\n        return NK_CONVERT_INVALID_PARAM;\n\n    nk_draw_list_setup(&ctx->draw_list, config, cmds, vertices, elements,\n        config->line_AA, config->shape_AA);\n    nk_foreach(cmd, ctx)\n    {\n#ifdef NK_INCLUDE_COMMAND_USERDATA\n        ctx->draw_list.userdata = cmd->userdata;\n#endif\n        switch (cmd->type) {\n        case NK_COMMAND_NOP: break;\n        case NK_COMMAND_SCISSOR: {\n            const struct nk_command_scissor *s = (const struct nk_command_scissor*)cmd;\n            nk_draw_list_add_clip(&ctx->draw_list, nk_rect(s->x, s->y, s->w, s->h));\n        } break;\n        case NK_COMMAND_LINE: {\n            const struct nk_command_line *l = (const struct nk_command_line*)cmd;\n            nk_draw_list_stroke_line(&ctx->draw_list, nk_vec2(l->begin.x, l->begin.y),\n                nk_vec2(l->end.x, l->end.y), l->color, l->line_thickness);\n        } break;\n        case NK_COMMAND_CURVE: {\n            const struct nk_command_curve *q = (const struct nk_command_curve*)cmd;\n            nk_draw_list_stroke_curve(&ctx->draw_list, nk_vec2(q->begin.x, q->begin.y),\n                nk_vec2(q->ctrl[0].x, q->ctrl[0].y), nk_vec2(q->ctrl[1].x,\n                q->ctrl[1].y), nk_vec2(q->end.x, q->end.y), q->color,\n                config->curve_segment_count, q->line_thickness);\n        } break;\n        case NK_COMMAND_RECT: {\n            const struct nk_command_rect *r = (const struct nk_command_rect*)cmd;\n            nk_draw_list_stroke_rect(&ctx->draw_list, nk_rect(r->x, r->y, r->w, r->h),\n                r->color, (float)r->rounding, r->line_thickness);\n        } break;\n        case NK_COMMAND_RECT_FILLED: {\n            const struct nk_command_rect_filled *r = (const struct nk_command_rect_filled*)cmd;\n            nk_draw_list_fill_rect(&ctx->draw_list, nk_rect(r->x, r->y, r->w, r->h),\n                r->color, (float)r->rounding);\n        } break;\n        case NK_COMMAND_RECT_MULTI_COLOR: {\n            const struct nk_command_rect_multi_color *r = (const struct nk_command_rect_multi_color*)cmd;\n            nk_draw_list_fill_rect_multi_color(&ctx->draw_list, nk_rect(r->x, r->y, r->w, r->h),\n                r->left, r->top, r->right, r->bottom);\n        } break;\n        case NK_COMMAND_CIRCLE: {\n            const struct nk_command_circle *c = (const struct nk_command_circle*)cmd;\n            nk_draw_list_stroke_circle(&ctx->draw_list, nk_vec2((float)c->x + (float)c->w/2,\n                (float)c->y + (float)c->h/2), (float)c->w/2, c->color,\n                config->circle_segment_count, c->line_thickness);\n        } break;\n        case NK_COMMAND_CIRCLE_FILLED: {\n            const struct nk_command_circle_filled *c = (const struct nk_command_circle_filled *)cmd;\n            nk_draw_list_fill_circle(&ctx->draw_list, nk_vec2((float)c->x + (float)c->w/2,\n                (float)c->y + (float)c->h/2), (float)c->w/2, c->color,\n                config->circle_segment_count);\n        } break;\n        case NK_COMMAND_ARC: {\n            const struct nk_command_arc *c = (const struct nk_command_arc*)cmd;\n            nk_draw_list_path_line_to(&ctx->draw_list, nk_vec2(c->cx, c->cy));\n            nk_draw_list_path_arc_to(&ctx->draw_list, nk_vec2(c->cx, c->cy), c->r,\n                c->a[0], c->a[1], config->arc_segment_count);\n            nk_draw_list_path_stroke(&ctx->draw_list, c->color, NK_STROKE_CLOSED, c->line_thickness);\n        } break;\n        case NK_COMMAND_ARC_FILLED: {\n            const struct nk_command_arc_filled *c = (const struct nk_command_arc_filled*)cmd;\n            nk_draw_list_path_line_to(&ctx->draw_list, nk_vec2(c->cx, c->cy));\n            nk_draw_list_path_arc_to(&ctx->draw_list, nk_vec2(c->cx, c->cy), c->r,\n                c->a[0], c->a[1], config->arc_segment_count);\n            nk_draw_list_path_fill(&ctx->draw_list, c->color);\n        } break;\n        case NK_COMMAND_TRIANGLE: {\n            const struct nk_command_triangle *t = (const struct nk_command_triangle*)cmd;\n            nk_draw_list_stroke_triangle(&ctx->draw_list, nk_vec2(t->a.x, t->a.y),\n                nk_vec2(t->b.x, t->b.y), nk_vec2(t->c.x, t->c.y), t->color,\n                t->line_thickness);\n        } break;\n        case NK_COMMAND_TRIANGLE_FILLED: {\n            const struct nk_command_triangle_filled *t = (const struct nk_command_triangle_filled*)cmd;\n            nk_draw_list_fill_triangle(&ctx->draw_list, nk_vec2(t->a.x, t->a.y),\n                nk_vec2(t->b.x, t->b.y), nk_vec2(t->c.x, t->c.y), t->color);\n        } break;\n        case NK_COMMAND_POLYGON: {\n            int i;\n            const struct nk_command_polygon*p = (const struct nk_command_polygon*)cmd;\n            for (i = 0; i < p->point_count; ++i) {\n                struct nk_vec2 pnt = nk_vec2((float)p->points[i].x, (float)p->points[i].y);\n                nk_draw_list_path_line_to(&ctx->draw_list, pnt);\n            }\n            nk_draw_list_path_stroke(&ctx->draw_list, p->color, NK_STROKE_CLOSED, p->line_thickness);\n        } break;\n        case NK_COMMAND_POLYGON_FILLED: {\n            int i;\n            const struct nk_command_polygon_filled *p = (const struct nk_command_polygon_filled*)cmd;\n            for (i = 0; i < p->point_count; ++i) {\n                struct nk_vec2 pnt = nk_vec2((float)p->points[i].x, (float)p->points[i].y);\n                nk_draw_list_path_line_to(&ctx->draw_list, pnt);\n            }\n            nk_draw_list_path_fill(&ctx->draw_list, p->color);\n        } break;\n        case NK_COMMAND_POLYLINE: {\n            int i;\n            const struct nk_command_polyline *p = (const struct nk_command_polyline*)cmd;\n            for (i = 0; i < p->point_count; ++i) {\n                struct nk_vec2 pnt = nk_vec2((float)p->points[i].x, (float)p->points[i].y);\n                nk_draw_list_path_line_to(&ctx->draw_list, pnt);\n            }\n            nk_draw_list_path_stroke(&ctx->draw_list, p->color, NK_STROKE_OPEN, p->line_thickness);\n        } break;\n        case NK_COMMAND_TEXT: {\n            const struct nk_command_text *t = (const struct nk_command_text*)cmd;\n            nk_draw_list_add_text(&ctx->draw_list, t->font, nk_rect(t->x, t->y, t->w, t->h),\n                t->string, t->length, t->height, t->foreground);\n        } break;\n        case NK_COMMAND_IMAGE: {\n            const struct nk_command_image *i = (const struct nk_command_image*)cmd;\n            nk_draw_list_add_image(&ctx->draw_list, i->img, nk_rect(i->x, i->y, i->w, i->h), i->col);\n        } break;\n        case NK_COMMAND_CUSTOM: {\n            const struct nk_command_custom *c = (const struct nk_command_custom*)cmd;\n            c->callback(&ctx->draw_list, c->x, c->y, c->w, c->h, c->callback_data);\n        } break;\n        default: break;\n        }\n    }\n    res |= (cmds->needed > cmds->allocated + (cmds->memory.size - cmds->size)) ? NK_CONVERT_COMMAND_BUFFER_FULL: 0;\n    res |= (vertices->needed > vertices->allocated) ? NK_CONVERT_VERTEX_BUFFER_FULL: 0;\n    res |= (elements->needed > elements->allocated) ? NK_CONVERT_ELEMENT_BUFFER_FULL: 0;\n    return res;\n}\nNK_API const struct nk_draw_command*\nnk__draw_begin(const struct nk_context *ctx,\n    const struct nk_buffer *buffer)\n{\n    return nk__draw_list_begin(&ctx->draw_list, buffer);\n}\nNK_API const struct nk_draw_command*\nnk__draw_end(const struct nk_context *ctx, const struct nk_buffer *buffer)\n{\n    return nk__draw_list_end(&ctx->draw_list, buffer);\n}\nNK_API const struct nk_draw_command*\nnk__draw_next(const struct nk_draw_command *cmd,\n    const struct nk_buffer *buffer, const struct nk_context *ctx)\n{\n    return nk__draw_list_next(cmd, buffer, &ctx->draw_list);\n}\n#endif\n\n\n\n\n\n#ifdef NK_INCLUDE_FONT_BAKING\n/* -------------------------------------------------------------\n *\n *                          RECT PACK\n *\n * --------------------------------------------------------------*/\n/* stb_rect_pack.h - v0.05 - public domain - rectangle packing */\n/* Sean Barrett 2014 */\n#define NK_RP__MAXVAL  0xffff\ntypedef unsigned short nk_rp_coord;\n\nstruct nk_rp_rect {\n    /* reserved for your use: */\n    int id;\n    /* input: */\n    nk_rp_coord w, h;\n    /* output: */\n    nk_rp_coord x, y;\n    int was_packed;\n    /* non-zero if valid packing */\n}; /* 16 bytes, nominally */\n\nstruct nk_rp_node {\n    nk_rp_coord  x,y;\n    struct nk_rp_node  *next;\n};\n\nstruct nk_rp_context {\n    int width;\n    int height;\n    int align;\n    int init_mode;\n    int heuristic;\n    int num_nodes;\n    struct nk_rp_node *active_head;\n    struct nk_rp_node *free_head;\n    struct nk_rp_node extra[2];\n    /* we allocate two extra nodes so optimal user-node-count is 'width' not 'width+2' */\n};\n\nstruct nk_rp__findresult {\n    int x,y;\n    struct nk_rp_node **prev_link;\n};\n\nenum NK_RP_HEURISTIC {\n    NK_RP_HEURISTIC_Skyline_default=0,\n    NK_RP_HEURISTIC_Skyline_BL_sortHeight = NK_RP_HEURISTIC_Skyline_default,\n    NK_RP_HEURISTIC_Skyline_BF_sortHeight\n};\nenum NK_RP_INIT_STATE{NK_RP__INIT_skyline = 1};\n\nNK_INTERN void\nnk_rp_setup_allow_out_of_mem(struct nk_rp_context *context, int allow_out_of_mem)\n{\n    if (allow_out_of_mem)\n        /* if it's ok to run out of memory, then don't bother aligning them; */\n        /* this gives better packing, but may fail due to OOM (even though */\n        /* the rectangles easily fit). @TODO a smarter approach would be to only */\n        /* quantize once we've hit OOM, then we could get rid of this parameter. */\n        context->align = 1;\n    else {\n        /* if it's not ok to run out of memory, then quantize the widths */\n        /* so that num_nodes is always enough nodes. */\n        /* */\n        /* I.e. num_nodes * align >= width */\n        /*                  align >= width / num_nodes */\n        /*                  align = ceil(width/num_nodes) */\n        context->align = (context->width + context->num_nodes-1) / context->num_nodes;\n    }\n}\nNK_INTERN void\nnk_rp_init_target(struct nk_rp_context *context, int width, int height,\n    struct nk_rp_node *nodes, int num_nodes)\n{\n    int i;\n#ifndef STBRP_LARGE_RECTS\n    NK_ASSERT(width <= 0xffff && height <= 0xffff);\n#endif\n\n    for (i=0; i < num_nodes-1; ++i)\n        nodes[i].next = &nodes[i+1];\n    nodes[i].next = 0;\n    context->init_mode = NK_RP__INIT_skyline;\n    context->heuristic = NK_RP_HEURISTIC_Skyline_default;\n    context->free_head = &nodes[0];\n    context->active_head = &context->extra[0];\n    context->width = width;\n    context->height = height;\n    context->num_nodes = num_nodes;\n    nk_rp_setup_allow_out_of_mem(context, 0);\n\n    /* node 0 is the full width, node 1 is the sentinel (lets us not store width explicitly) */\n    context->extra[0].x = 0;\n    context->extra[0].y = 0;\n    context->extra[0].next = &context->extra[1];\n    context->extra[1].x = (nk_rp_coord) width;\n    context->extra[1].y = 65535;\n    context->extra[1].next = 0;\n}\n/* find minimum y position if it starts at x1 */\nNK_INTERN int\nnk_rp__skyline_find_min_y(struct nk_rp_context *c, struct nk_rp_node *first,\n    int x0, int width, int *pwaste)\n{\n    struct nk_rp_node *node = first;\n    int x1 = x0 + width;\n    int min_y, visited_width, waste_area;\n    NK_ASSERT(first->x <= x0);\n    NK_UNUSED(c);\n\n    NK_ASSERT(node->next->x > x0);\n    /* we ended up handling this in the caller for efficiency */\n    NK_ASSERT(node->x <= x0);\n\n    min_y = 0;\n    waste_area = 0;\n    visited_width = 0;\n    while (node->x < x1)\n    {\n        if (node->y > min_y) {\n            /* raise min_y higher. */\n            /* we've accounted for all waste up to min_y, */\n            /* but we'll now add more waste for everything we've visited */\n            waste_area += visited_width * (node->y - min_y);\n            min_y = node->y;\n            /* the first time through, visited_width might be reduced */\n            if (node->x < x0)\n            visited_width += node->next->x - x0;\n            else\n            visited_width += node->next->x - node->x;\n        } else {\n            /* add waste area */\n            int under_width = node->next->x - node->x;\n            if (under_width + visited_width > width)\n            under_width = width - visited_width;\n            waste_area += under_width * (min_y - node->y);\n            visited_width += under_width;\n        }\n        node = node->next;\n    }\n    *pwaste = waste_area;\n    return min_y;\n}\nNK_INTERN struct nk_rp__findresult\nnk_rp__skyline_find_best_pos(struct nk_rp_context *c, int width, int height)\n{\n    int best_waste = (1<<30), best_x, best_y = (1 << 30);\n    struct nk_rp__findresult fr;\n    struct nk_rp_node **prev, *node, *tail, **best = 0;\n\n    /* align to multiple of c->align */\n    width = (width + c->align - 1);\n    width -= width % c->align;\n    NK_ASSERT(width % c->align == 0);\n\n    node = c->active_head;\n    prev = &c->active_head;\n    while (node->x + width <= c->width) {\n        int y,waste;\n        y = nk_rp__skyline_find_min_y(c, node, node->x, width, &waste);\n        /* actually just want to test BL */\n        if (c->heuristic == NK_RP_HEURISTIC_Skyline_BL_sortHeight) {\n            /* bottom left */\n            if (y < best_y) {\n            best_y = y;\n            best = prev;\n            }\n        } else {\n            /* best-fit */\n            if (y + height <= c->height) {\n                /* can only use it if it first vertically */\n                if (y < best_y || (y == best_y && waste < best_waste)) {\n                    best_y = y;\n                    best_waste = waste;\n                    best = prev;\n                }\n            }\n        }\n        prev = &node->next;\n        node = node->next;\n    }\n    best_x = (best == 0) ? 0 : (*best)->x;\n\n    /* if doing best-fit (BF), we also have to try aligning right edge to each node position */\n    /* */\n    /* e.g, if fitting */\n    /* */\n    /*     ____________________ */\n    /*    |____________________| */\n    /* */\n    /*            into */\n    /* */\n    /*   |                         | */\n    /*   |             ____________| */\n    /*   |____________| */\n    /* */\n    /* then right-aligned reduces waste, but bottom-left BL is always chooses left-aligned */\n    /* */\n    /* This makes BF take about 2x the time */\n    if (c->heuristic == NK_RP_HEURISTIC_Skyline_BF_sortHeight)\n    {\n        tail = c->active_head;\n        node = c->active_head;\n        prev = &c->active_head;\n        /* find first node that's admissible */\n        while (tail->x < width)\n            tail = tail->next;\n        while (tail)\n        {\n            int xpos = tail->x - width;\n            int y,waste;\n            NK_ASSERT(xpos >= 0);\n            /* find the left position that matches this */\n            while (node->next->x <= xpos) {\n                prev = &node->next;\n                node = node->next;\n            }\n            NK_ASSERT(node->next->x > xpos && node->x <= xpos);\n            y = nk_rp__skyline_find_min_y(c, node, xpos, width, &waste);\n            if (y + height < c->height) {\n                if (y <= best_y) {\n                    if (y < best_y || waste < best_waste || (waste==best_waste && xpos < best_x)) {\n                        best_x = xpos;\n                        NK_ASSERT(y <= best_y);\n                        best_y = y;\n                        best_waste = waste;\n                        best = prev;\n                    }\n                }\n            }\n            tail = tail->next;\n        }\n    }\n    fr.prev_link = best;\n    fr.x = best_x;\n    fr.y = best_y;\n    return fr;\n}\nNK_INTERN struct nk_rp__findresult\nnk_rp__skyline_pack_rectangle(struct nk_rp_context *context, int width, int height)\n{\n    /* find best position according to heuristic */\n    struct nk_rp__findresult res = nk_rp__skyline_find_best_pos(context, width, height);\n    struct nk_rp_node *node, *cur;\n\n    /* bail if: */\n    /*    1. it failed */\n    /*    2. the best node doesn't fit (we don't always check this) */\n    /*    3. we're out of memory */\n    if (res.prev_link == 0 || res.y + height > context->height || context->free_head == 0) {\n        res.prev_link = 0;\n        return res;\n    }\n\n    /* on success, create new node */\n    node = context->free_head;\n    node->x = (nk_rp_coord) res.x;\n    node->y = (nk_rp_coord) (res.y + height);\n\n    context->free_head = node->next;\n\n    /* insert the new node into the right starting point, and */\n    /* let 'cur' point to the remaining nodes needing to be */\n    /* stitched back in */\n    cur = *res.prev_link;\n    if (cur->x < res.x) {\n        /* preserve the existing one, so start testing with the next one */\n        struct nk_rp_node *next = cur->next;\n        cur->next = node;\n        cur = next;\n    } else {\n        *res.prev_link = node;\n    }\n\n    /* from here, traverse cur and free the nodes, until we get to one */\n    /* that shouldn't be freed */\n    while (cur->next && cur->next->x <= res.x + width) {\n        struct nk_rp_node *next = cur->next;\n        /* move the current node to the free list */\n        cur->next = context->free_head;\n        context->free_head = cur;\n        cur = next;\n    }\n    /* stitch the list back in */\n    node->next = cur;\n\n    if (cur->x < res.x + width)\n        cur->x = (nk_rp_coord) (res.x + width);\n    return res;\n}\nNK_INTERN int\nnk_rect_height_compare(const void *a, const void *b)\n{\n    const struct nk_rp_rect *p = (const struct nk_rp_rect *) a;\n    const struct nk_rp_rect *q = (const struct nk_rp_rect *) b;\n    if (p->h > q->h)\n        return -1;\n    if (p->h < q->h)\n        return  1;\n    return (p->w > q->w) ? -1 : (p->w < q->w);\n}\nNK_INTERN int\nnk_rect_original_order(const void *a, const void *b)\n{\n    const struct nk_rp_rect *p = (const struct nk_rp_rect *) a;\n    const struct nk_rp_rect *q = (const struct nk_rp_rect *) b;\n    return (p->was_packed < q->was_packed) ? -1 : (p->was_packed > q->was_packed);\n}\nNK_INTERN void\nnk_rp_qsort(struct nk_rp_rect *array, unsigned int len, int(*cmp)(const void*,const void*))\n{\n    /* iterative quick sort */\n    #define NK_MAX_SORT_STACK 64\n    unsigned right, left = 0, stack[NK_MAX_SORT_STACK], pos = 0;\n    unsigned seed = len/2 * 69069+1;\n    for (;;) {\n        for (; left+1 < len; len++) {\n            struct nk_rp_rect pivot, tmp;\n            if (pos == NK_MAX_SORT_STACK) len = stack[pos = 0];\n            pivot = array[left+seed%(len-left)];\n            seed = seed * 69069 + 1;\n            stack[pos++] = len;\n            for (right = left-1;;) {\n                while (cmp(&array[++right], &pivot) < 0);\n                while (cmp(&pivot, &array[--len]) < 0);\n                if (right >= len) break;\n                tmp = array[right];\n                array[right] = array[len];\n                array[len] = tmp;\n            }\n        }\n        if (pos == 0) break;\n        left = len;\n        len = stack[--pos];\n    }\n    #undef NK_MAX_SORT_STACK\n}\nNK_INTERN void\nnk_rp_pack_rects(struct nk_rp_context *context, struct nk_rp_rect *rects, int num_rects)\n{\n    int i;\n    /* we use the 'was_packed' field internally to allow sorting/unsorting */\n    for (i=0; i < num_rects; ++i) {\n        rects[i].was_packed = i;\n    }\n\n    /* sort according to heuristic */\n    nk_rp_qsort(rects, (unsigned)num_rects, nk_rect_height_compare);\n\n    for (i=0; i < num_rects; ++i) {\n        struct nk_rp__findresult fr = nk_rp__skyline_pack_rectangle(context, rects[i].w, rects[i].h);\n        if (fr.prev_link) {\n            rects[i].x = (nk_rp_coord) fr.x;\n            rects[i].y = (nk_rp_coord) fr.y;\n        } else {\n            rects[i].x = rects[i].y = NK_RP__MAXVAL;\n        }\n    }\n\n    /* unsort */\n    nk_rp_qsort(rects, (unsigned)num_rects, nk_rect_original_order);\n\n    /* set was_packed flags */\n    for (i=0; i < num_rects; ++i)\n        rects[i].was_packed = !(rects[i].x == NK_RP__MAXVAL && rects[i].y == NK_RP__MAXVAL);\n}\n\n/*\n * ==============================================================\n *\n *                          TRUETYPE\n *\n * ===============================================================\n */\n/* stb_truetype.h - v1.07 - public domain */\n#define NK_TT_MAX_OVERSAMPLE   8\n#define NK_TT__OVER_MASK  (NK_TT_MAX_OVERSAMPLE-1)\n\nstruct nk_tt_bakedchar {\n    unsigned short x0,y0,x1,y1;\n    /* coordinates of bbox in bitmap */\n    float xoff,yoff,xadvance;\n};\n\nstruct nk_tt_aligned_quad{\n    float x0,y0,s0,t0; /* top-left */\n    float x1,y1,s1,t1; /* bottom-right */\n};\n\nstruct nk_tt_packedchar {\n    unsigned short x0,y0,x1,y1;\n    /* coordinates of bbox in bitmap */\n    float xoff,yoff,xadvance;\n    float xoff2,yoff2;\n};\n\nstruct nk_tt_pack_range {\n    float font_size;\n    int first_unicode_codepoint_in_range;\n    /* if non-zero, then the chars are continuous, and this is the first codepoint */\n    int *array_of_unicode_codepoints;\n    /* if non-zero, then this is an array of unicode codepoints */\n    int num_chars;\n    struct nk_tt_packedchar *chardata_for_range; /* output */\n    unsigned char h_oversample, v_oversample;\n    /* don't set these, they're used internally */\n};\n\nstruct nk_tt_pack_context {\n    void *pack_info;\n    int   width;\n    int   height;\n    int   stride_in_bytes;\n    int   padding;\n    unsigned int   h_oversample, v_oversample;\n    unsigned char *pixels;\n    void  *nodes;\n};\n\nstruct nk_tt_fontinfo {\n    const unsigned char* data; /* pointer to .ttf file */\n    int fontstart;/* offset of start of font */\n    int numGlyphs;/* number of glyphs, needed for range checking */\n    int loca,head,glyf,hhea,hmtx,kern; /* table locations as offset from start of .ttf */\n    int index_map; /* a cmap mapping for our chosen character encoding */\n    int indexToLocFormat; /* format needed to map from glyph index to glyph */\n};\n\nenum {\n  NK_TT_vmove=1,\n  NK_TT_vline,\n  NK_TT_vcurve\n};\n\nstruct nk_tt_vertex {\n    short x,y,cx,cy;\n    unsigned char type,padding;\n};\n\nstruct nk_tt__bitmap{\n   int w,h,stride;\n   unsigned char *pixels;\n};\n\nstruct nk_tt__hheap_chunk {\n    struct nk_tt__hheap_chunk *next;\n};\nstruct nk_tt__hheap {\n    struct nk_allocator alloc;\n    struct nk_tt__hheap_chunk *head;\n    void   *first_free;\n    int    num_remaining_in_head_chunk;\n};\n\nstruct nk_tt__edge {\n    float x0,y0, x1,y1;\n    int invert;\n};\n\nstruct nk_tt__active_edge {\n    struct nk_tt__active_edge *next;\n    float fx,fdx,fdy;\n    float direction;\n    float sy;\n    float ey;\n};\nstruct nk_tt__point {float x,y;};\n\n#define NK_TT_MACSTYLE_DONTCARE     0\n#define NK_TT_MACSTYLE_BOLD         1\n#define NK_TT_MACSTYLE_ITALIC       2\n#define NK_TT_MACSTYLE_UNDERSCORE   4\n#define NK_TT_MACSTYLE_NONE         8\n/* <= not same as 0, this makes us check the bitfield is 0 */\n\nenum { /* platformID */\n   NK_TT_PLATFORM_ID_UNICODE   =0,\n   NK_TT_PLATFORM_ID_MAC       =1,\n   NK_TT_PLATFORM_ID_ISO       =2,\n   NK_TT_PLATFORM_ID_MICROSOFT =3\n};\n\nenum { /* encodingID for NK_TT_PLATFORM_ID_UNICODE */\n   NK_TT_UNICODE_EID_UNICODE_1_0    =0,\n   NK_TT_UNICODE_EID_UNICODE_1_1    =1,\n   NK_TT_UNICODE_EID_ISO_10646      =2,\n   NK_TT_UNICODE_EID_UNICODE_2_0_BMP=3,\n   NK_TT_UNICODE_EID_UNICODE_2_0_FULL=4\n};\n\nenum { /* encodingID for NK_TT_PLATFORM_ID_MICROSOFT */\n   NK_TT_MS_EID_SYMBOL        =0,\n   NK_TT_MS_EID_UNICODE_BMP   =1,\n   NK_TT_MS_EID_SHIFTJIS      =2,\n   NK_TT_MS_EID_UNICODE_FULL  =10\n};\n\nenum { /* encodingID for NK_TT_PLATFORM_ID_MAC; same as Script Manager codes */\n   NK_TT_MAC_EID_ROMAN        =0,   NK_TT_MAC_EID_ARABIC       =4,\n   NK_TT_MAC_EID_JAPANESE     =1,   NK_TT_MAC_EID_HEBREW       =5,\n   NK_TT_MAC_EID_CHINESE_TRAD =2,   NK_TT_MAC_EID_GREEK        =6,\n   NK_TT_MAC_EID_KOREAN       =3,   NK_TT_MAC_EID_RUSSIAN      =7\n};\n\nenum { /* languageID for NK_TT_PLATFORM_ID_MICROSOFT; same as LCID... */\n       /* problematic because there are e.g. 16 english LCIDs and 16 arabic LCIDs */\n   NK_TT_MS_LANG_ENGLISH     =0x0409,   NK_TT_MS_LANG_ITALIAN     =0x0410,\n   NK_TT_MS_LANG_CHINESE     =0x0804,   NK_TT_MS_LANG_JAPANESE    =0x0411,\n   NK_TT_MS_LANG_DUTCH       =0x0413,   NK_TT_MS_LANG_KOREAN      =0x0412,\n   NK_TT_MS_LANG_FRENCH      =0x040c,   NK_TT_MS_LANG_RUSSIAN     =0x0419,\n   NK_TT_MS_LANG_GERMAN      =0x0407,   NK_TT_MS_LANG_SPANISH     =0x0409,\n   NK_TT_MS_LANG_HEBREW      =0x040d,   NK_TT_MS_LANG_SWEDISH     =0x041D\n};\n\nenum { /* languageID for NK_TT_PLATFORM_ID_MAC */\n   NK_TT_MAC_LANG_ENGLISH      =0 ,   NK_TT_MAC_LANG_JAPANESE     =11,\n   NK_TT_MAC_LANG_ARABIC       =12,   NK_TT_MAC_LANG_KOREAN       =23,\n   NK_TT_MAC_LANG_DUTCH        =4 ,   NK_TT_MAC_LANG_RUSSIAN      =32,\n   NK_TT_MAC_LANG_FRENCH       =1 ,   NK_TT_MAC_LANG_SPANISH      =6 ,\n   NK_TT_MAC_LANG_GERMAN       =2 ,   NK_TT_MAC_LANG_SWEDISH      =5 ,\n   NK_TT_MAC_LANG_HEBREW       =10,   NK_TT_MAC_LANG_CHINESE_SIMPLIFIED =33,\n   NK_TT_MAC_LANG_ITALIAN      =3 ,   NK_TT_MAC_LANG_CHINESE_TRAD =19\n};\n\n#define nk_ttBYTE(p)     (* (const nk_byte *) (p))\n#define nk_ttCHAR(p)     (* (const char *) (p))\n\n#if defined(NK_BIGENDIAN) && !defined(NK_ALLOW_UNALIGNED_TRUETYPE)\n   #define nk_ttUSHORT(p)   (* (nk_ushort *) (p))\n   #define nk_ttSHORT(p)    (* (nk_short *) (p))\n   #define nk_ttULONG(p)    (* (nk_uint *) (p))\n   #define nk_ttLONG(p)     (* (nk_int *) (p))\n#else\n    static nk_ushort nk_ttUSHORT(const nk_byte *p) { return (nk_ushort)(p[0]*256 + p[1]); }\n    static nk_short nk_ttSHORT(const nk_byte *p)   { return (nk_short)(p[0]*256 + p[1]); }\n    static nk_uint nk_ttULONG(const nk_byte *p)  { return (nk_uint)((p[0]<<24) + (p[1]<<16) + (p[2]<<8) + p[3]); }\n#endif\n\n#define nk_tt_tag4(p,c0,c1,c2,c3)\\\n    ((p)[0] == (c0) && (p)[1] == (c1) && (p)[2] == (c2) && (p)[3] == (c3))\n#define nk_tt_tag(p,str) nk_tt_tag4(p,str[0],str[1],str[2],str[3])\n\nNK_INTERN int nk_tt_GetGlyphShape(const struct nk_tt_fontinfo *info, struct nk_allocator *alloc,\n                                int glyph_index, struct nk_tt_vertex **pvertices);\n\nNK_INTERN nk_uint\nnk_tt__find_table(const nk_byte *data, nk_uint fontstart, const char *tag)\n{\n    /* @OPTIMIZE: binary search */\n    nk_int num_tables = nk_ttUSHORT(data+fontstart+4);\n    nk_uint tabledir = fontstart + 12;\n    nk_int i;\n    for (i = 0; i < num_tables; ++i) {\n        nk_uint loc = tabledir + (nk_uint)(16*i);\n        if (nk_tt_tag(data+loc+0, tag))\n            return nk_ttULONG(data+loc+8);\n    }\n    return 0;\n}\nNK_INTERN int\nnk_tt_InitFont(struct nk_tt_fontinfo *info, const unsigned char *data2, int fontstart)\n{\n    nk_uint cmap, t;\n    nk_int i,numTables;\n    const nk_byte *data = (const nk_byte *) data2;\n\n    info->data = data;\n    info->fontstart = fontstart;\n\n    cmap = nk_tt__find_table(data, (nk_uint)fontstart, \"cmap\");       /* required */\n    info->loca = (int)nk_tt__find_table(data, (nk_uint)fontstart, \"loca\"); /* required */\n    info->head = (int)nk_tt__find_table(data, (nk_uint)fontstart, \"head\"); /* required */\n    info->glyf = (int)nk_tt__find_table(data, (nk_uint)fontstart, \"glyf\"); /* required */\n    info->hhea = (int)nk_tt__find_table(data, (nk_uint)fontstart, \"hhea\"); /* required */\n    info->hmtx = (int)nk_tt__find_table(data, (nk_uint)fontstart, \"hmtx\"); /* required */\n    info->kern = (int)nk_tt__find_table(data, (nk_uint)fontstart, \"kern\"); /* not required */\n    if (!cmap || !info->loca || !info->head || !info->glyf || !info->hhea || !info->hmtx)\n        return 0;\n\n    t = nk_tt__find_table(data, (nk_uint)fontstart, \"maxp\");\n    if (t) info->numGlyphs = nk_ttUSHORT(data+t+4);\n    else info->numGlyphs = 0xffff;\n\n    /* find a cmap encoding table we understand *now* to avoid searching */\n    /* later. (todo: could make this installable) */\n    /* the same regardless of glyph. */\n    numTables = nk_ttUSHORT(data + cmap + 2);\n    info->index_map = 0;\n    for (i=0; i < numTables; ++i)\n    {\n        nk_uint encoding_record = cmap + 4 + 8 * (nk_uint)i;\n        /* find an encoding we understand: */\n        switch(nk_ttUSHORT(data+encoding_record)) {\n        case NK_TT_PLATFORM_ID_MICROSOFT:\n            switch (nk_ttUSHORT(data+encoding_record+2)) {\n            case NK_TT_MS_EID_UNICODE_BMP:\n            case NK_TT_MS_EID_UNICODE_FULL:\n                /* MS/Unicode */\n                info->index_map = (int)(cmap + nk_ttULONG(data+encoding_record+4));\n                break;\n            default: break;\n            } break;\n        case NK_TT_PLATFORM_ID_UNICODE:\n            /* Mac/iOS has these */\n            /* all the encodingIDs are unicode, so we don't bother to check it */\n            info->index_map = (int)(cmap + nk_ttULONG(data+encoding_record+4));\n            break;\n        default: break;\n        }\n    }\n    if (info->index_map == 0)\n        return 0;\n    info->indexToLocFormat = nk_ttUSHORT(data+info->head + 50);\n    return 1;\n}\nNK_INTERN int\nnk_tt_FindGlyphIndex(const struct nk_tt_fontinfo *info, int unicode_codepoint)\n{\n    const nk_byte *data = info->data;\n    nk_uint index_map = (nk_uint)info->index_map;\n\n    nk_ushort format = nk_ttUSHORT(data + index_map + 0);\n    if (format == 0) { /* apple byte encoding */\n        nk_int bytes = nk_ttUSHORT(data + index_map + 2);\n        if (unicode_codepoint < bytes-6)\n            return nk_ttBYTE(data + index_map + 6 + unicode_codepoint);\n        return 0;\n    } else if (format == 6) {\n        nk_uint first = nk_ttUSHORT(data + index_map + 6);\n        nk_uint count = nk_ttUSHORT(data + index_map + 8);\n        if ((nk_uint) unicode_codepoint >= first && (nk_uint) unicode_codepoint < first+count)\n            return nk_ttUSHORT(data + index_map + 10 + (unicode_codepoint - (int)first)*2);\n        return 0;\n    } else if (format == 2) {\n        NK_ASSERT(0); /* @TODO: high-byte mapping for japanese/chinese/korean */\n        return 0;\n    } else if (format == 4) { /* standard mapping for windows fonts: binary search collection of ranges */\n        nk_ushort segcount = nk_ttUSHORT(data+index_map+6) >> 1;\n        nk_ushort searchRange = nk_ttUSHORT(data+index_map+8) >> 1;\n        nk_ushort entrySelector = nk_ttUSHORT(data+index_map+10);\n        nk_ushort rangeShift = nk_ttUSHORT(data+index_map+12) >> 1;\n\n        /* do a binary search of the segments */\n        nk_uint endCount = index_map + 14;\n        nk_uint search = endCount;\n\n        if (unicode_codepoint > 0xffff)\n            return 0;\n\n        /* they lie from endCount .. endCount + segCount */\n        /* but searchRange is the nearest power of two, so... */\n        if (unicode_codepoint >= nk_ttUSHORT(data + search + rangeShift*2))\n            search += (nk_uint)(rangeShift*2);\n\n        /* now decrement to bias correctly to find smallest */\n        search -= 2;\n        while (entrySelector) {\n            nk_ushort end;\n            searchRange >>= 1;\n            end = nk_ttUSHORT(data + search + searchRange*2);\n            if (unicode_codepoint > end)\n                search += (nk_uint)(searchRange*2);\n            --entrySelector;\n        }\n        search += 2;\n\n      {\n         nk_ushort offset, start;\n         nk_ushort item = (nk_ushort) ((search - endCount) >> 1);\n\n         NK_ASSERT(unicode_codepoint <= nk_ttUSHORT(data + endCount + 2*item));\n         start = nk_ttUSHORT(data + index_map + 14 + segcount*2 + 2 + 2*item);\n         if (unicode_codepoint < start)\n            return 0;\n\n         offset = nk_ttUSHORT(data + index_map + 14 + segcount*6 + 2 + 2*item);\n         if (offset == 0)\n            return (nk_ushort) (unicode_codepoint + nk_ttSHORT(data + index_map + 14 + segcount*4 + 2 + 2*item));\n\n         return nk_ttUSHORT(data + offset + (unicode_codepoint-start)*2 + index_map + 14 + segcount*6 + 2 + 2*item);\n      }\n   } else if (format == 12 || format == 13) {\n        nk_uint ngroups = nk_ttULONG(data+index_map+12);\n        nk_int low,high;\n        low = 0; high = (nk_int)ngroups;\n        /* Binary search the right group. */\n        while (low < high) {\n            nk_int mid = low + ((high-low) >> 1); /* rounds down, so low <= mid < high */\n            nk_uint start_char = nk_ttULONG(data+index_map+16+mid*12);\n            nk_uint end_char = nk_ttULONG(data+index_map+16+mid*12+4);\n            if ((nk_uint) unicode_codepoint < start_char)\n                high = mid;\n            else if ((nk_uint) unicode_codepoint > end_char)\n                low = mid+1;\n            else {\n                nk_uint start_glyph = nk_ttULONG(data+index_map+16+mid*12+8);\n                if (format == 12)\n                    return (int)start_glyph + (int)unicode_codepoint - (int)start_char;\n                else /* format == 13 */\n                    return (int)start_glyph;\n            }\n        }\n        return 0; /* not found */\n    }\n    /* @TODO */\n    NK_ASSERT(0);\n    return 0;\n}\nNK_INTERN void\nnk_tt_setvertex(struct nk_tt_vertex *v, nk_byte type, nk_int x, nk_int y, nk_int cx, nk_int cy)\n{\n    v->type = type;\n    v->x = (nk_short) x;\n    v->y = (nk_short) y;\n    v->cx = (nk_short) cx;\n    v->cy = (nk_short) cy;\n}\nNK_INTERN int\nnk_tt__GetGlyfOffset(const struct nk_tt_fontinfo *info, int glyph_index)\n{\n    int g1,g2;\n    if (glyph_index >= info->numGlyphs) return -1; /* glyph index out of range */\n    if (info->indexToLocFormat >= 2)    return -1; /* unknown index->glyph map format */\n\n    if (info->indexToLocFormat == 0) {\n        g1 = info->glyf + nk_ttUSHORT(info->data + info->loca + glyph_index * 2) * 2;\n        g2 = info->glyf + nk_ttUSHORT(info->data + info->loca + glyph_index * 2 + 2) * 2;\n    } else {\n        g1 = info->glyf + (int)nk_ttULONG (info->data + info->loca + glyph_index * 4);\n        g2 = info->glyf + (int)nk_ttULONG (info->data + info->loca + glyph_index * 4 + 4);\n    }\n    return g1==g2 ? -1 : g1; /* if length is 0, return -1 */\n}\nNK_INTERN int\nnk_tt_GetGlyphBox(const struct nk_tt_fontinfo *info, int glyph_index,\n    int *x0, int *y0, int *x1, int *y1)\n{\n    int g = nk_tt__GetGlyfOffset(info, glyph_index);\n    if (g < 0) return 0;\n\n    if (x0) *x0 = nk_ttSHORT(info->data + g + 2);\n    if (y0) *y0 = nk_ttSHORT(info->data + g + 4);\n    if (x1) *x1 = nk_ttSHORT(info->data + g + 6);\n    if (y1) *y1 = nk_ttSHORT(info->data + g + 8);\n    return 1;\n}\nNK_INTERN int\nnk_tt__close_shape(struct nk_tt_vertex *vertices, int num_vertices, int was_off,\n    int start_off, nk_int sx, nk_int sy, nk_int scx, nk_int scy, nk_int cx, nk_int cy)\n{\n   if (start_off) {\n      if (was_off)\n         nk_tt_setvertex(&vertices[num_vertices++], NK_TT_vcurve, (cx+scx)>>1, (cy+scy)>>1, cx,cy);\n      nk_tt_setvertex(&vertices[num_vertices++], NK_TT_vcurve, sx,sy,scx,scy);\n   } else {\n      if (was_off)\n         nk_tt_setvertex(&vertices[num_vertices++], NK_TT_vcurve,sx,sy,cx,cy);\n      else\n         nk_tt_setvertex(&vertices[num_vertices++], NK_TT_vline,sx,sy,0,0);\n   }\n   return num_vertices;\n}\nNK_INTERN int\nnk_tt_GetGlyphShape(const struct nk_tt_fontinfo *info, struct nk_allocator *alloc,\n    int glyph_index, struct nk_tt_vertex **pvertices)\n{\n    nk_short numberOfContours;\n    const nk_byte *endPtsOfContours;\n    const nk_byte *data = info->data;\n    struct nk_tt_vertex *vertices=0;\n    int num_vertices=0;\n    int g = nk_tt__GetGlyfOffset(info, glyph_index);\n    *pvertices = 0;\n\n    if (g < 0) return 0;\n    numberOfContours = nk_ttSHORT(data + g);\n    if (numberOfContours > 0) {\n        nk_byte flags=0,flagcount;\n        nk_int ins, i,j=0,m,n, next_move, was_off=0, off, start_off=0;\n        nk_int x,y,cx,cy,sx,sy, scx,scy;\n        const nk_byte *points;\n        endPtsOfContours = (data + g + 10);\n        ins = nk_ttUSHORT(data + g + 10 + numberOfContours * 2);\n        points = data + g + 10 + numberOfContours * 2 + 2 + ins;\n\n        n = 1+nk_ttUSHORT(endPtsOfContours + numberOfContours*2-2);\n        m = n + 2*numberOfContours;  /* a loose bound on how many vertices we might need */\n        vertices = (struct nk_tt_vertex *)alloc->alloc(alloc->userdata, 0, (nk_size)m * sizeof(vertices[0]));\n        if (vertices == 0)\n            return 0;\n\n        next_move = 0;\n        flagcount=0;\n\n        /* in first pass, we load uninterpreted data into the allocated array */\n        /* above, shifted to the end of the array so we won't overwrite it when */\n        /* we create our final data starting from the front */\n        off = m - n; /* starting offset for uninterpreted data, regardless of how m ends up being calculated */\n\n        /* first load flags */\n        for (i=0; i < n; ++i) {\n            if (flagcount == 0) {\n                flags = *points++;\n                if (flags & 8)\n                    flagcount = *points++;\n            } else --flagcount;\n            vertices[off+i].type = flags;\n        }\n\n        /* now load x coordinates */\n        x=0;\n        for (i=0; i < n; ++i) {\n            flags = vertices[off+i].type;\n            if (flags & 2) {\n                nk_short dx = *points++;\n                x += (flags & 16) ? dx : -dx; /* ??? */\n            } else {\n                if (!(flags & 16)) {\n                    x = x + (nk_short) (points[0]*256 + points[1]);\n                    points += 2;\n                }\n            }\n            vertices[off+i].x = (nk_short) x;\n        }\n\n        /* now load y coordinates */\n        y=0;\n        for (i=0; i < n; ++i) {\n            flags = vertices[off+i].type;\n            if (flags & 4) {\n                nk_short dy = *points++;\n                y += (flags & 32) ? dy : -dy; /* ??? */\n            } else {\n                if (!(flags & 32)) {\n                    y = y + (nk_short) (points[0]*256 + points[1]);\n                    points += 2;\n                }\n            }\n            vertices[off+i].y = (nk_short) y;\n        }\n\n        /* now convert them to our format */\n        num_vertices=0;\n        sx = sy = cx = cy = scx = scy = 0;\n        for (i=0; i < n; ++i)\n        {\n            flags = vertices[off+i].type;\n            x     = (nk_short) vertices[off+i].x;\n            y     = (nk_short) vertices[off+i].y;\n\n            if (next_move == i) {\n                if (i != 0)\n                    num_vertices = nk_tt__close_shape(vertices, num_vertices, was_off, start_off, sx,sy,scx,scy,cx,cy);\n\n                /* now start the new one                */\n                start_off = !(flags & 1);\n                if (start_off) {\n                    /* if we start off with an off-curve point, then when we need to find a point on the curve */\n                    /* where we can start, and we need to save some state for when we wraparound. */\n                    scx = x;\n                    scy = y;\n                    if (!(vertices[off+i+1].type & 1)) {\n                        /* next point is also a curve point, so interpolate an on-point curve */\n                        sx = (x + (nk_int) vertices[off+i+1].x) >> 1;\n                        sy = (y + (nk_int) vertices[off+i+1].y) >> 1;\n                    } else {\n                        /* otherwise just use the next point as our start point */\n                        sx = (nk_int) vertices[off+i+1].x;\n                        sy = (nk_int) vertices[off+i+1].y;\n                        ++i; /* we're using point i+1 as the starting point, so skip it */\n                    }\n                } else {\n                    sx = x;\n                    sy = y;\n                }\n                nk_tt_setvertex(&vertices[num_vertices++], NK_TT_vmove,sx,sy,0,0);\n                was_off = 0;\n                next_move = 1 + nk_ttUSHORT(endPtsOfContours+j*2);\n                ++j;\n            } else {\n                if (!(flags & 1))\n                { /* if it's a curve */\n                    if (was_off) /* two off-curve control points in a row means interpolate an on-curve midpoint */\n                        nk_tt_setvertex(&vertices[num_vertices++], NK_TT_vcurve, (cx+x)>>1, (cy+y)>>1, cx, cy);\n                    cx = x;\n                    cy = y;\n                    was_off = 1;\n                } else {\n                    if (was_off)\n                        nk_tt_setvertex(&vertices[num_vertices++], NK_TT_vcurve, x,y, cx, cy);\n                    else nk_tt_setvertex(&vertices[num_vertices++], NK_TT_vline, x,y,0,0);\n                    was_off = 0;\n                }\n            }\n        }\n        num_vertices = nk_tt__close_shape(vertices, num_vertices, was_off, start_off, sx,sy,scx,scy,cx,cy);\n    } else if (numberOfContours == -1) {\n        /* Compound shapes. */\n        int more = 1;\n        const nk_byte *comp = data + g + 10;\n        num_vertices = 0;\n        vertices = 0;\n\n        while (more)\n        {\n            nk_ushort flags, gidx;\n            int comp_num_verts = 0, i;\n            struct nk_tt_vertex *comp_verts = 0, *tmp = 0;\n            float mtx[6] = {1,0,0,1,0,0}, m, n;\n\n            flags = (nk_ushort)nk_ttSHORT(comp); comp+=2;\n            gidx = (nk_ushort)nk_ttSHORT(comp); comp+=2;\n\n            if (flags & 2) { /* XY values */\n                if (flags & 1) { /* shorts */\n                    mtx[4] = nk_ttSHORT(comp); comp+=2;\n                    mtx[5] = nk_ttSHORT(comp); comp+=2;\n                } else {\n                    mtx[4] = nk_ttCHAR(comp); comp+=1;\n                    mtx[5] = nk_ttCHAR(comp); comp+=1;\n                }\n            } else {\n                /* @TODO handle matching point */\n                NK_ASSERT(0);\n            }\n            if (flags & (1<<3)) { /* WE_HAVE_A_SCALE */\n                mtx[0] = mtx[3] = nk_ttSHORT(comp)/16384.0f; comp+=2;\n                mtx[1] = mtx[2] = 0;\n            } else if (flags & (1<<6)) { /* WE_HAVE_AN_X_AND_YSCALE */\n                mtx[0] = nk_ttSHORT(comp)/16384.0f; comp+=2;\n                mtx[1] = mtx[2] = 0;\n                mtx[3] = nk_ttSHORT(comp)/16384.0f; comp+=2;\n            } else if (flags & (1<<7)) { /* WE_HAVE_A_TWO_BY_TWO */\n                mtx[0] = nk_ttSHORT(comp)/16384.0f; comp+=2;\n                mtx[1] = nk_ttSHORT(comp)/16384.0f; comp+=2;\n                mtx[2] = nk_ttSHORT(comp)/16384.0f; comp+=2;\n                mtx[3] = nk_ttSHORT(comp)/16384.0f; comp+=2;\n            }\n\n             /* Find transformation scales. */\n            m = (float) NK_SQRT(mtx[0]*mtx[0] + mtx[1]*mtx[1]);\n            n = (float) NK_SQRT(mtx[2]*mtx[2] + mtx[3]*mtx[3]);\n\n             /* Get indexed glyph. */\n            comp_num_verts = nk_tt_GetGlyphShape(info, alloc, gidx, &comp_verts);\n            if (comp_num_verts > 0)\n            {\n                /* Transform vertices. */\n                for (i = 0; i < comp_num_verts; ++i) {\n                    struct nk_tt_vertex* v = &comp_verts[i];\n                    short x,y;\n                    x=v->x; y=v->y;\n                    v->x = (short)(m * (mtx[0]*x + mtx[2]*y + mtx[4]));\n                    v->y = (short)(n * (mtx[1]*x + mtx[3]*y + mtx[5]));\n                    x=v->cx; y=v->cy;\n                    v->cx = (short)(m * (mtx[0]*x + mtx[2]*y + mtx[4]));\n                    v->cy = (short)(n * (mtx[1]*x + mtx[3]*y + mtx[5]));\n                }\n                /* Append vertices. */\n                tmp = (struct nk_tt_vertex*)alloc->alloc(alloc->userdata, 0,\n                    (nk_size)(num_vertices+comp_num_verts)*sizeof(struct nk_tt_vertex));\n                if (!tmp) {\n                    if (vertices) alloc->free(alloc->userdata, vertices);\n                    if (comp_verts) alloc->free(alloc->userdata, comp_verts);\n                    return 0;\n                }\n                if (num_vertices > 0) NK_MEMCPY(tmp, vertices, (nk_size)num_vertices*sizeof(struct nk_tt_vertex));\n                NK_MEMCPY(tmp+num_vertices, comp_verts, (nk_size)comp_num_verts*sizeof(struct nk_tt_vertex));\n                if (vertices) alloc->free(alloc->userdata,vertices);\n                vertices = tmp;\n                alloc->free(alloc->userdata,comp_verts);\n                num_vertices += comp_num_verts;\n            }\n            /* More components ? */\n            more = flags & (1<<5);\n        }\n    } else if (numberOfContours < 0) {\n        /* @TODO other compound variations? */\n        NK_ASSERT(0);\n    } else {\n        /* numberOfCounters == 0, do nothing */\n    }\n    *pvertices = vertices;\n    return num_vertices;\n}\nNK_INTERN void\nnk_tt_GetGlyphHMetrics(const struct nk_tt_fontinfo *info, int glyph_index,\n    int *advanceWidth, int *leftSideBearing)\n{\n    nk_ushort numOfLongHorMetrics = nk_ttUSHORT(info->data+info->hhea + 34);\n    if (glyph_index < numOfLongHorMetrics) {\n        if (advanceWidth)\n            *advanceWidth    = nk_ttSHORT(info->data + info->hmtx + 4*glyph_index);\n        if (leftSideBearing)\n            *leftSideBearing = nk_ttSHORT(info->data + info->hmtx + 4*glyph_index + 2);\n    } else {\n        if (advanceWidth)\n            *advanceWidth    = nk_ttSHORT(info->data + info->hmtx + 4*(numOfLongHorMetrics-1));\n        if (leftSideBearing)\n            *leftSideBearing = nk_ttSHORT(info->data + info->hmtx + 4*numOfLongHorMetrics + 2*(glyph_index - numOfLongHorMetrics));\n    }\n}\nNK_INTERN void\nnk_tt_GetFontVMetrics(const struct nk_tt_fontinfo *info,\n    int *ascent, int *descent, int *lineGap)\n{\n   if (ascent ) *ascent  = nk_ttSHORT(info->data+info->hhea + 4);\n   if (descent) *descent = nk_ttSHORT(info->data+info->hhea + 6);\n   if (lineGap) *lineGap = nk_ttSHORT(info->data+info->hhea + 8);\n}\nNK_INTERN float\nnk_tt_ScaleForPixelHeight(const struct nk_tt_fontinfo *info, float height)\n{\n   int fheight = nk_ttSHORT(info->data + info->hhea + 4) - nk_ttSHORT(info->data + info->hhea + 6);\n   return (float) height / (float)fheight;\n}\nNK_INTERN float\nnk_tt_ScaleForMappingEmToPixels(const struct nk_tt_fontinfo *info, float pixels)\n{\n   int unitsPerEm = nk_ttUSHORT(info->data + info->head + 18);\n   return pixels / (float)unitsPerEm;\n}\n\n/*-------------------------------------------------------------\n *            antialiasing software rasterizer\n * --------------------------------------------------------------*/\nNK_INTERN void\nnk_tt_GetGlyphBitmapBoxSubpixel(const struct nk_tt_fontinfo *font,\n    int glyph, float scale_x, float scale_y,float shift_x, float shift_y,\n    int *ix0, int *iy0, int *ix1, int *iy1)\n{\n    int x0,y0,x1,y1;\n    if (!nk_tt_GetGlyphBox(font, glyph, &x0,&y0,&x1,&y1)) {\n        /* e.g. space character */\n        if (ix0) *ix0 = 0;\n        if (iy0) *iy0 = 0;\n        if (ix1) *ix1 = 0;\n        if (iy1) *iy1 = 0;\n    } else {\n        /* move to integral bboxes (treating pixels as little squares, what pixels get touched)? */\n        if (ix0) *ix0 = nk_ifloorf((float)x0 * scale_x + shift_x);\n        if (iy0) *iy0 = nk_ifloorf((float)-y1 * scale_y + shift_y);\n        if (ix1) *ix1 = nk_iceilf ((float)x1 * scale_x + shift_x);\n        if (iy1) *iy1 = nk_iceilf ((float)-y0 * scale_y + shift_y);\n    }\n}\nNK_INTERN void\nnk_tt_GetGlyphBitmapBox(const struct nk_tt_fontinfo *font, int glyph,\n    float scale_x, float scale_y, int *ix0, int *iy0, int *ix1, int *iy1)\n{\n   nk_tt_GetGlyphBitmapBoxSubpixel(font, glyph, scale_x, scale_y,0.0f,0.0f, ix0, iy0, ix1, iy1);\n}\n\n/*-------------------------------------------------------------\n *                          Rasterizer\n * --------------------------------------------------------------*/\nNK_INTERN void*\nnk_tt__hheap_alloc(struct nk_tt__hheap *hh, nk_size size)\n{\n    if (hh->first_free) {\n        void *p = hh->first_free;\n        hh->first_free = * (void **) p;\n        return p;\n    } else {\n        if (hh->num_remaining_in_head_chunk == 0) {\n            int count = (size < 32 ? 2000 : size < 128 ? 800 : 100);\n            struct nk_tt__hheap_chunk *c = (struct nk_tt__hheap_chunk *)\n                hh->alloc.alloc(hh->alloc.userdata, 0,\n                sizeof(struct nk_tt__hheap_chunk) + size * (nk_size)count);\n            if (c == 0) return 0;\n            c->next = hh->head;\n            hh->head = c;\n            hh->num_remaining_in_head_chunk = count;\n        }\n        --hh->num_remaining_in_head_chunk;\n        return (char *) (hh->head) + size * (nk_size)hh->num_remaining_in_head_chunk;\n    }\n}\nNK_INTERN void\nnk_tt__hheap_free(struct nk_tt__hheap *hh, void *p)\n{\n    *(void **) p = hh->first_free;\n    hh->first_free = p;\n}\nNK_INTERN void\nnk_tt__hheap_cleanup(struct nk_tt__hheap *hh)\n{\n    struct nk_tt__hheap_chunk *c = hh->head;\n    while (c) {\n        struct nk_tt__hheap_chunk *n = c->next;\n        hh->alloc.free(hh->alloc.userdata, c);\n        c = n;\n    }\n}\nNK_INTERN struct nk_tt__active_edge*\nnk_tt__new_active(struct nk_tt__hheap *hh, struct nk_tt__edge *e,\n    int off_x, float start_point)\n{\n    struct nk_tt__active_edge *z = (struct nk_tt__active_edge *)\n        nk_tt__hheap_alloc(hh, sizeof(*z));\n    float dxdy = (e->x1 - e->x0) / (e->y1 - e->y0);\n    /*STBTT_assert(e->y0 <= start_point); */\n    if (!z) return z;\n    z->fdx = dxdy;\n    z->fdy = (dxdy != 0) ? (1/dxdy): 0;\n    z->fx = e->x0 + dxdy * (start_point - e->y0);\n    z->fx -= (float)off_x;\n    z->direction = e->invert ? 1.0f : -1.0f;\n    z->sy = e->y0;\n    z->ey = e->y1;\n    z->next = 0;\n    return z;\n}\nNK_INTERN void\nnk_tt__handle_clipped_edge(float *scanline, int x, struct nk_tt__active_edge *e,\n    float x0, float y0, float x1, float y1)\n{\n    if (y0 == y1) return;\n    NK_ASSERT(y0 < y1);\n    NK_ASSERT(e->sy <= e->ey);\n    if (y0 > e->ey) return;\n    if (y1 < e->sy) return;\n    if (y0 < e->sy) {\n        x0 += (x1-x0) * (e->sy - y0) / (y1-y0);\n        y0 = e->sy;\n    }\n    if (y1 > e->ey) {\n        x1 += (x1-x0) * (e->ey - y1) / (y1-y0);\n        y1 = e->ey;\n    }\n\n    if (x0 == x) NK_ASSERT(x1 <= x+1);\n    else if (x0 == x+1) NK_ASSERT(x1 >= x);\n    else if (x0 <= x) NK_ASSERT(x1 <= x);\n    else if (x0 >= x+1) NK_ASSERT(x1 >= x+1);\n    else NK_ASSERT(x1 >= x && x1 <= x+1);\n\n    if (x0 <= x && x1 <= x)\n        scanline[x] += e->direction * (y1-y0);\n    else if (x0 >= x+1 && x1 >= x+1);\n    else {\n        NK_ASSERT(x0 >= x && x0 <= x+1 && x1 >= x && x1 <= x+1);\n        /* coverage = 1 - average x position */\n        scanline[x] += (float)e->direction * (float)(y1-y0) * (1.0f-((x0-(float)x)+(x1-(float)x))/2.0f);\n    }\n}\nNK_INTERN void\nnk_tt__fill_active_edges_new(float *scanline, float *scanline_fill, int len,\n    struct nk_tt__active_edge *e, float y_top)\n{\n    float y_bottom = y_top+1;\n    while (e)\n    {\n        /* brute force every pixel */\n        /* compute intersection points with top & bottom */\n        NK_ASSERT(e->ey >= y_top);\n        if (e->fdx == 0) {\n            float x0 = e->fx;\n            if (x0 < len) {\n                if (x0 >= 0) {\n                    nk_tt__handle_clipped_edge(scanline,(int) x0,e, x0,y_top, x0,y_bottom);\n                    nk_tt__handle_clipped_edge(scanline_fill-1,(int) x0+1,e, x0,y_top, x0,y_bottom);\n                } else {\n                    nk_tt__handle_clipped_edge(scanline_fill-1,0,e, x0,y_top, x0,y_bottom);\n                }\n            }\n        } else {\n            float x0 = e->fx;\n            float dx = e->fdx;\n            float xb = x0 + dx;\n            float x_top, x_bottom;\n            float y0,y1;\n            float dy = e->fdy;\n            NK_ASSERT(e->sy <= y_bottom && e->ey >= y_top);\n\n            /* compute endpoints of line segment clipped to this scanline (if the */\n            /* line segment starts on this scanline. x0 is the intersection of the */\n            /* line with y_top, but that may be off the line segment. */\n            if (e->sy > y_top) {\n                x_top = x0 + dx * (e->sy - y_top);\n                y0 = e->sy;\n            } else {\n                x_top = x0;\n                y0 = y_top;\n            }\n\n            if (e->ey < y_bottom) {\n                x_bottom = x0 + dx * (e->ey - y_top);\n                y1 = e->ey;\n            } else {\n                x_bottom = xb;\n                y1 = y_bottom;\n            }\n\n            if (x_top >= 0 && x_bottom >= 0 && x_top < len && x_bottom < len)\n            {\n                /* from here on, we don't have to range check x values */\n                if ((int) x_top == (int) x_bottom) {\n                    float height;\n                    /* simple case, only spans one pixel */\n                    int x = (int) x_top;\n                    height = y1 - y0;\n                    NK_ASSERT(x >= 0 && x < len);\n                    scanline[x] += e->direction * (1.0f-(((float)x_top - (float)x) + ((float)x_bottom-(float)x))/2.0f)  * (float)height;\n                    scanline_fill[x] += e->direction * (float)height; /* everything right of this pixel is filled */\n                } else {\n                    int x,x1,x2;\n                    float y_crossing, step, sign, area;\n                    /* covers 2+ pixels */\n                    if (x_top > x_bottom)\n                    {\n                        /* flip scanline vertically; signed area is the same */\n                        float t;\n                        y0 = y_bottom - (y0 - y_top);\n                        y1 = y_bottom - (y1 - y_top);\n                        t = y0; y0 = y1; y1 = t;\n                        t = x_bottom; x_bottom = x_top; x_top = t;\n                        dx = -dx;\n                        dy = -dy;\n                        t = x0; x0 = xb; xb = t;\n                    }\n\n                    x1 = (int) x_top;\n                    x2 = (int) x_bottom;\n                    /* compute intersection with y axis at x1+1 */\n                    y_crossing = ((float)x1+1 - (float)x0) * (float)dy + (float)y_top;\n\n                    sign = e->direction;\n                    /* area of the rectangle covered from y0..y_crossing */\n                    area = sign * (y_crossing-y0);\n                    /* area of the triangle (x_top,y0), (x+1,y0), (x+1,y_crossing) */\n                    scanline[x1] += area * (1.0f-((float)((float)x_top - (float)x1)+(float)(x1+1-x1))/2.0f);\n\n                    step = sign * dy;\n                    for (x = x1+1; x < x2; ++x) {\n                        scanline[x] += area + step/2;\n                        area += step;\n                    }\n                    y_crossing += (float)dy * (float)(x2 - (x1+1));\n\n                    scanline[x2] += area + sign * (1.0f-((float)(x2-x2)+((float)x_bottom-(float)x2))/2.0f) * (y1-y_crossing);\n                    scanline_fill[x2] += sign * (y1-y0);\n                }\n            }\n            else\n            {\n                /* if edge goes outside of box we're drawing, we require */\n                /* clipping logic. since this does not match the intended use */\n                /* of this library, we use a different, very slow brute */\n                /* force implementation */\n                int x;\n                for (x=0; x < len; ++x)\n                {\n                    /* cases: */\n                    /* */\n                    /* there can be up to two intersections with the pixel. any intersection */\n                    /* with left or right edges can be handled by splitting into two (or three) */\n                    /* regions. intersections with top & bottom do not necessitate case-wise logic. */\n                    /* */\n                    /* the old way of doing this found the intersections with the left & right edges, */\n                    /* then used some simple logic to produce up to three segments in sorted order */\n                    /* from top-to-bottom. however, this had a problem: if an x edge was epsilon */\n                    /* across the x border, then the corresponding y position might not be distinct */\n                    /* from the other y segment, and it might ignored as an empty segment. to avoid */\n                    /* that, we need to explicitly produce segments based on x positions. */\n\n                    /* rename variables to clear pairs */\n                    float ya = y_top;\n                    float x1 = (float) (x);\n                    float x2 = (float) (x+1);\n                    float x3 = xb;\n                    float y3 = y_bottom;\n                    float yb,y2;\n\n                    yb = ((float)x - x0) / dx + y_top;\n                    y2 = ((float)x+1 - x0) / dx + y_top;\n\n                    if (x0 < x1 && x3 > x2) {         /* three segments descending down-right */\n                        nk_tt__handle_clipped_edge(scanline,x,e, x0,ya, x1,yb);\n                        nk_tt__handle_clipped_edge(scanline,x,e, x1,yb, x2,y2);\n                        nk_tt__handle_clipped_edge(scanline,x,e, x2,y2, x3,y3);\n                    } else if (x3 < x1 && x0 > x2) {  /* three segments descending down-left */\n                        nk_tt__handle_clipped_edge(scanline,x,e, x0,ya, x2,y2);\n                        nk_tt__handle_clipped_edge(scanline,x,e, x2,y2, x1,yb);\n                        nk_tt__handle_clipped_edge(scanline,x,e, x1,yb, x3,y3);\n                    } else if (x0 < x1 && x3 > x1) {  /* two segments across x, down-right */\n                        nk_tt__handle_clipped_edge(scanline,x,e, x0,ya, x1,yb);\n                        nk_tt__handle_clipped_edge(scanline,x,e, x1,yb, x3,y3);\n                    } else if (x3 < x1 && x0 > x1) {  /* two segments across x, down-left */\n                        nk_tt__handle_clipped_edge(scanline,x,e, x0,ya, x1,yb);\n                        nk_tt__handle_clipped_edge(scanline,x,e, x1,yb, x3,y3);\n                    } else if (x0 < x2 && x3 > x2) {  /* two segments across x+1, down-right */\n                        nk_tt__handle_clipped_edge(scanline,x,e, x0,ya, x2,y2);\n                        nk_tt__handle_clipped_edge(scanline,x,e, x2,y2, x3,y3);\n                    } else if (x3 < x2 && x0 > x2) {  /* two segments across x+1, down-left */\n                        nk_tt__handle_clipped_edge(scanline,x,e, x0,ya, x2,y2);\n                        nk_tt__handle_clipped_edge(scanline,x,e, x2,y2, x3,y3);\n                    } else {  /* one segment */\n                        nk_tt__handle_clipped_edge(scanline,x,e, x0,ya, x3,y3);\n                    }\n                }\n            }\n        }\n        e = e->next;\n    }\n}\nNK_INTERN void\nnk_tt__rasterize_sorted_edges(struct nk_tt__bitmap *result, struct nk_tt__edge *e,\n    int n, int vsubsample, int off_x, int off_y, struct nk_allocator *alloc)\n{\n    /* directly AA rasterize edges w/o supersampling */\n    struct nk_tt__hheap hh;\n    struct nk_tt__active_edge *active = 0;\n    int y,j=0, i;\n    float scanline_data[129], *scanline, *scanline2;\n\n    NK_UNUSED(vsubsample);\n    nk_zero_struct(hh);\n    hh.alloc = *alloc;\n\n    if (result->w > 64)\n        scanline = (float *) alloc->alloc(alloc->userdata,0, (nk_size)(result->w*2+1) * sizeof(float));\n    else scanline = scanline_data;\n\n    scanline2 = scanline + result->w;\n    y = off_y;\n    e[n].y0 = (float) (off_y + result->h) + 1;\n\n    while (j < result->h)\n    {\n        /* find center of pixel for this scanline */\n        float scan_y_top    = (float)y + 0.0f;\n        float scan_y_bottom = (float)y + 1.0f;\n        struct nk_tt__active_edge **step = &active;\n\n        NK_MEMSET(scanline , 0, (nk_size)result->w*sizeof(scanline[0]));\n        NK_MEMSET(scanline2, 0, (nk_size)(result->w+1)*sizeof(scanline[0]));\n\n        /* update all active edges; */\n        /* remove all active edges that terminate before the top of this scanline */\n        while (*step) {\n            struct nk_tt__active_edge * z = *step;\n            if (z->ey <= scan_y_top) {\n                *step = z->next; /* delete from list */\n                NK_ASSERT(z->direction);\n                z->direction = 0;\n                nk_tt__hheap_free(&hh, z);\n            } else {\n                step = &((*step)->next); /* advance through list */\n            }\n        }\n\n        /* insert all edges that start before the bottom of this scanline */\n        while (e->y0 <= scan_y_bottom) {\n            if (e->y0 != e->y1) {\n                struct nk_tt__active_edge *z = nk_tt__new_active(&hh, e, off_x, scan_y_top);\n                if (z != 0) {\n                    NK_ASSERT(z->ey >= scan_y_top);\n                    /* insert at front */\n                    z->next = active;\n                    active = z;\n                }\n            }\n            ++e;\n        }\n\n        /* now process all active edges */\n        if (active)\n            nk_tt__fill_active_edges_new(scanline, scanline2+1, result->w, active, scan_y_top);\n\n        {\n            float sum = 0;\n            for (i=0; i < result->w; ++i) {\n                float k;\n                int m;\n                sum += scanline2[i];\n                k = scanline[i] + sum;\n                k = (float) NK_ABS(k) * 255.0f + 0.5f;\n                m = (int) k;\n                if (m > 255) m = 255;\n                result->pixels[j*result->stride + i] = (unsigned char) m;\n            }\n        }\n        /* advance all the edges */\n        step = &active;\n        while (*step) {\n            struct nk_tt__active_edge *z = *step;\n            z->fx += z->fdx; /* advance to position for current scanline */\n            step = &((*step)->next); /* advance through list */\n        }\n        ++y;\n        ++j;\n    }\n    nk_tt__hheap_cleanup(&hh);\n    if (scanline != scanline_data)\n        alloc->free(alloc->userdata, scanline);\n}\nNK_INTERN void\nnk_tt__sort_edges_ins_sort(struct nk_tt__edge *p, int n)\n{\n    int i,j;\n    #define NK_TT__COMPARE(a,b)  ((a)->y0 < (b)->y0)\n    for (i=1; i < n; ++i) {\n        struct nk_tt__edge t = p[i], *a = &t;\n        j = i;\n        while (j > 0) {\n            struct nk_tt__edge *b = &p[j-1];\n            int c = NK_TT__COMPARE(a,b);\n            if (!c) break;\n            p[j] = p[j-1];\n            --j;\n        }\n        if (i != j)\n            p[j] = t;\n    }\n}\nNK_INTERN void\nnk_tt__sort_edges_quicksort(struct nk_tt__edge *p, int n)\n{\n    /* threshold for transitioning to insertion sort */\n    while (n > 12) {\n        struct nk_tt__edge t;\n        int c01,c12,c,m,i,j;\n\n        /* compute median of three */\n        m = n >> 1;\n        c01 = NK_TT__COMPARE(&p[0],&p[m]);\n        c12 = NK_TT__COMPARE(&p[m],&p[n-1]);\n\n        /* if 0 >= mid >= end, or 0 < mid < end, then use mid */\n        if (c01 != c12) {\n            /* otherwise, we'll need to swap something else to middle */\n            int z;\n            c = NK_TT__COMPARE(&p[0],&p[n-1]);\n            /* 0>mid && mid<n:  0>n => n; 0<n => 0 */\n            /* 0<mid && mid>n:  0>n => 0; 0<n => n */\n            z = (c == c12) ? 0 : n-1;\n            t = p[z];\n            p[z] = p[m];\n            p[m] = t;\n        }\n\n        /* now p[m] is the median-of-three */\n        /* swap it to the beginning so it won't move around */\n        t = p[0];\n        p[0] = p[m];\n        p[m] = t;\n\n        /* partition loop */\n        i=1;\n        j=n-1;\n        for(;;) {\n            /* handling of equality is crucial here */\n            /* for sentinels & efficiency with duplicates */\n            for (;;++i) {\n                if (!NK_TT__COMPARE(&p[i], &p[0])) break;\n            }\n            for (;;--j) {\n                if (!NK_TT__COMPARE(&p[0], &p[j])) break;\n            }\n\n            /* make sure we haven't crossed */\n             if (i >= j) break;\n             t = p[i];\n             p[i] = p[j];\n             p[j] = t;\n\n            ++i;\n            --j;\n\n        }\n\n        /* recurse on smaller side, iterate on larger */\n        if (j < (n-i)) {\n            nk_tt__sort_edges_quicksort(p,j);\n            p = p+i;\n            n = n-i;\n        } else {\n            nk_tt__sort_edges_quicksort(p+i, n-i);\n            n = j;\n        }\n    }\n}\nNK_INTERN void\nnk_tt__sort_edges(struct nk_tt__edge *p, int n)\n{\n   nk_tt__sort_edges_quicksort(p, n);\n   nk_tt__sort_edges_ins_sort(p, n);\n}\nNK_INTERN void\nnk_tt__rasterize(struct nk_tt__bitmap *result, struct nk_tt__point *pts,\n    int *wcount, int windings, float scale_x, float scale_y,\n    float shift_x, float shift_y, int off_x, int off_y, int invert,\n    struct nk_allocator *alloc)\n{\n    float y_scale_inv = invert ? -scale_y : scale_y;\n    struct nk_tt__edge *e;\n    int n,i,j,k,m;\n    int vsubsample = 1;\n    /* vsubsample should divide 255 evenly; otherwise we won't reach full opacity */\n\n    /* now we have to blow out the windings into explicit edge lists */\n    n = 0;\n    for (i=0; i < windings; ++i)\n        n += wcount[i];\n\n    e = (struct nk_tt__edge*)\n       alloc->alloc(alloc->userdata, 0,(sizeof(*e) * (nk_size)(n+1)));\n    if (e == 0) return;\n    n = 0;\n\n    m=0;\n    for (i=0; i < windings; ++i)\n    {\n        struct nk_tt__point *p = pts + m;\n        m += wcount[i];\n        j = wcount[i]-1;\n        for (k=0; k < wcount[i]; j=k++) {\n            int a=k,b=j;\n            /* skip the edge if horizontal */\n            if (p[j].y == p[k].y)\n                continue;\n\n            /* add edge from j to k to the list */\n            e[n].invert = 0;\n            if (invert ? p[j].y > p[k].y : p[j].y < p[k].y) {\n                e[n].invert = 1;\n                a=j,b=k;\n            }\n            e[n].x0 = p[a].x * scale_x + shift_x;\n            e[n].y0 = (p[a].y * y_scale_inv + shift_y) * (float)vsubsample;\n            e[n].x1 = p[b].x * scale_x + shift_x;\n            e[n].y1 = (p[b].y * y_scale_inv + shift_y) * (float)vsubsample;\n            ++n;\n        }\n    }\n\n    /* now sort the edges by their highest point (should snap to integer, and then by x) */\n    /*STBTT_sort(e, n, sizeof(e[0]), nk_tt__edge_compare); */\n    nk_tt__sort_edges(e, n);\n    /* now, traverse the scanlines and find the intersections on each scanline, use xor winding rule */\n    nk_tt__rasterize_sorted_edges(result, e, n, vsubsample, off_x, off_y, alloc);\n    alloc->free(alloc->userdata, e);\n}\nNK_INTERN void\nnk_tt__add_point(struct nk_tt__point *points, int n, float x, float y)\n{\n    if (!points) return; /* during first pass, it's unallocated */\n    points[n].x = x;\n    points[n].y = y;\n}\nNK_INTERN int\nnk_tt__tesselate_curve(struct nk_tt__point *points, int *num_points,\n    float x0, float y0, float x1, float y1, float x2, float y2,\n    float objspace_flatness_squared, int n)\n{\n    /* tesselate until threshold p is happy...\n     * @TODO warped to compensate for non-linear stretching */\n    /* midpoint */\n    float mx = (x0 + 2*x1 + x2)/4;\n    float my = (y0 + 2*y1 + y2)/4;\n    /* versus directly drawn line */\n    float dx = (x0+x2)/2 - mx;\n    float dy = (y0+y2)/2 - my;\n    if (n > 16) /* 65536 segments on one curve better be enough! */\n        return 1;\n\n    /* half-pixel error allowed... need to be smaller if AA */\n    if (dx*dx+dy*dy > objspace_flatness_squared) {\n        nk_tt__tesselate_curve(points, num_points, x0,y0,\n            (x0+x1)/2.0f,(y0+y1)/2.0f, mx,my, objspace_flatness_squared,n+1);\n        nk_tt__tesselate_curve(points, num_points, mx,my,\n            (x1+x2)/2.0f,(y1+y2)/2.0f, x2,y2, objspace_flatness_squared,n+1);\n    } else {\n        nk_tt__add_point(points, *num_points,x2,y2);\n        *num_points = *num_points+1;\n    }\n    return 1;\n}\nNK_INTERN struct nk_tt__point*\nnk_tt_FlattenCurves(struct nk_tt_vertex *vertices, int num_verts,\n    float objspace_flatness, int **contour_lengths, int *num_contours,\n    struct nk_allocator *alloc)\n{\n    /* returns number of contours */\n    struct nk_tt__point *points=0;\n    int num_points=0;\n    float objspace_flatness_squared = objspace_flatness * objspace_flatness;\n    int i;\n    int n=0;\n    int start=0;\n    int pass;\n\n    /* count how many \"moves\" there are to get the contour count */\n    for (i=0; i < num_verts; ++i)\n        if (vertices[i].type == NK_TT_vmove) ++n;\n\n    *num_contours = n;\n    if (n == 0) return 0;\n\n    *contour_lengths = (int *)\n        alloc->alloc(alloc->userdata,0, (sizeof(**contour_lengths) * (nk_size)n));\n    if (*contour_lengths == 0) {\n        *num_contours = 0;\n        return 0;\n    }\n\n    /* make two passes through the points so we don't need to realloc */\n    for (pass=0; pass < 2; ++pass)\n    {\n        float x=0,y=0;\n        if (pass == 1) {\n            points = (struct nk_tt__point *)\n                alloc->alloc(alloc->userdata,0, (nk_size)num_points * sizeof(points[0]));\n            if (points == 0) goto error;\n        }\n        num_points = 0;\n        n= -1;\n\n        for (i=0; i < num_verts; ++i)\n        {\n            switch (vertices[i].type) {\n            case NK_TT_vmove:\n                /* start the next contour */\n                if (n >= 0)\n                (*contour_lengths)[n] = num_points - start;\n                ++n;\n                start = num_points;\n\n                x = vertices[i].x, y = vertices[i].y;\n                nk_tt__add_point(points, num_points++, x,y);\n                break;\n            case NK_TT_vline:\n               x = vertices[i].x, y = vertices[i].y;\n               nk_tt__add_point(points, num_points++, x, y);\n               break;\n            case NK_TT_vcurve:\n               nk_tt__tesselate_curve(points, &num_points, x,y,\n                                        vertices[i].cx, vertices[i].cy,\n                                        vertices[i].x,  vertices[i].y,\n                                        objspace_flatness_squared, 0);\n               x = vertices[i].x, y = vertices[i].y;\n               break;\n            default: break;\n         }\n      }\n      (*contour_lengths)[n] = num_points - start;\n   }\n   return points;\n\nerror:\n   alloc->free(alloc->userdata, points);\n   alloc->free(alloc->userdata, *contour_lengths);\n   *contour_lengths = 0;\n   *num_contours = 0;\n   return 0;\n}\nNK_INTERN void\nnk_tt_Rasterize(struct nk_tt__bitmap *result, float flatness_in_pixels,\n    struct nk_tt_vertex *vertices, int num_verts,\n    float scale_x, float scale_y, float shift_x, float shift_y,\n    int x_off, int y_off, int invert, struct nk_allocator *alloc)\n{\n    float scale = scale_x > scale_y ? scale_y : scale_x;\n    int winding_count, *winding_lengths;\n    struct nk_tt__point *windings = nk_tt_FlattenCurves(vertices, num_verts,\n        flatness_in_pixels / scale, &winding_lengths, &winding_count, alloc);\n\n    NK_ASSERT(alloc);\n    if (windings) {\n        nk_tt__rasterize(result, windings, winding_lengths, winding_count,\n            scale_x, scale_y, shift_x, shift_y, x_off, y_off, invert, alloc);\n        alloc->free(alloc->userdata, winding_lengths);\n        alloc->free(alloc->userdata, windings);\n    }\n}\nNK_INTERN void\nnk_tt_MakeGlyphBitmapSubpixel(const struct nk_tt_fontinfo *info, unsigned char *output,\n    int out_w, int out_h, int out_stride, float scale_x, float scale_y,\n    float shift_x, float shift_y, int glyph, struct nk_allocator *alloc)\n{\n    int ix0,iy0;\n    struct nk_tt_vertex *vertices;\n    int num_verts = nk_tt_GetGlyphShape(info, alloc, glyph, &vertices);\n    struct nk_tt__bitmap gbm;\n\n    nk_tt_GetGlyphBitmapBoxSubpixel(info, glyph, scale_x, scale_y, shift_x,\n        shift_y, &ix0,&iy0,0,0);\n    gbm.pixels = output;\n    gbm.w = out_w;\n    gbm.h = out_h;\n    gbm.stride = out_stride;\n\n    if (gbm.w && gbm.h)\n        nk_tt_Rasterize(&gbm, 0.35f, vertices, num_verts, scale_x, scale_y,\n            shift_x, shift_y, ix0,iy0, 1, alloc);\n    alloc->free(alloc->userdata, vertices);\n}\n\n/*-------------------------------------------------------------\n *                          Bitmap baking\n * --------------------------------------------------------------*/\nNK_INTERN int\nnk_tt_PackBegin(struct nk_tt_pack_context *spc, unsigned char *pixels,\n    int pw, int ph, int stride_in_bytes, int padding, struct nk_allocator *alloc)\n{\n    int num_nodes = pw - padding;\n    struct nk_rp_context *context = (struct nk_rp_context *)\n        alloc->alloc(alloc->userdata,0, sizeof(*context));\n    struct nk_rp_node *nodes = (struct nk_rp_node*)\n        alloc->alloc(alloc->userdata,0, (sizeof(*nodes  ) * (nk_size)num_nodes));\n\n    if (context == 0 || nodes == 0) {\n        if (context != 0) alloc->free(alloc->userdata, context);\n        if (nodes   != 0) alloc->free(alloc->userdata, nodes);\n        return 0;\n    }\n\n    spc->width = pw;\n    spc->height = ph;\n    spc->pixels = pixels;\n    spc->pack_info = context;\n    spc->nodes = nodes;\n    spc->padding = padding;\n    spc->stride_in_bytes = (stride_in_bytes != 0) ? stride_in_bytes : pw;\n    spc->h_oversample = 1;\n    spc->v_oversample = 1;\n\n    nk_rp_init_target(context, pw-padding, ph-padding, nodes, num_nodes);\n    if (pixels)\n        NK_MEMSET(pixels, 0, (nk_size)(pw*ph)); /* background of 0 around pixels */\n    return 1;\n}\nNK_INTERN void\nnk_tt_PackEnd(struct nk_tt_pack_context *spc, struct nk_allocator *alloc)\n{\n    alloc->free(alloc->userdata, spc->nodes);\n    alloc->free(alloc->userdata, spc->pack_info);\n}\nNK_INTERN void\nnk_tt_PackSetOversampling(struct nk_tt_pack_context *spc,\n    unsigned int h_oversample, unsigned int v_oversample)\n{\n   NK_ASSERT(h_oversample <= NK_TT_MAX_OVERSAMPLE);\n   NK_ASSERT(v_oversample <= NK_TT_MAX_OVERSAMPLE);\n   if (h_oversample <= NK_TT_MAX_OVERSAMPLE)\n      spc->h_oversample = h_oversample;\n   if (v_oversample <= NK_TT_MAX_OVERSAMPLE)\n      spc->v_oversample = v_oversample;\n}\nNK_INTERN void\nnk_tt__h_prefilter(unsigned char *pixels, int w, int h, int stride_in_bytes,\n    int kernel_width)\n{\n    unsigned char buffer[NK_TT_MAX_OVERSAMPLE];\n    int safe_w = w - kernel_width;\n    int j;\n\n    for (j=0; j < h; ++j)\n    {\n        int i;\n        unsigned int total;\n        NK_MEMSET(buffer, 0, (nk_size)kernel_width);\n\n        total = 0;\n\n        /* make kernel_width a constant in common cases so compiler can optimize out the divide */\n        switch (kernel_width) {\n        case 2:\n            for (i=0; i <= safe_w; ++i) {\n                total += (unsigned int)(pixels[i] - buffer[i & NK_TT__OVER_MASK]);\n                buffer[(i+kernel_width) & NK_TT__OVER_MASK] = pixels[i];\n                pixels[i] = (unsigned char) (total / 2);\n            }\n            break;\n        case 3:\n            for (i=0; i <= safe_w; ++i) {\n                total += (unsigned int)(pixels[i] - buffer[i & NK_TT__OVER_MASK]);\n                buffer[(i+kernel_width) & NK_TT__OVER_MASK] = pixels[i];\n                pixels[i] = (unsigned char) (total / 3);\n            }\n            break;\n        case 4:\n            for (i=0; i <= safe_w; ++i) {\n                total += (unsigned int)pixels[i] - buffer[i & NK_TT__OVER_MASK];\n                buffer[(i+kernel_width) & NK_TT__OVER_MASK] = pixels[i];\n                pixels[i] = (unsigned char) (total / 4);\n            }\n            break;\n        case 5:\n            for (i=0; i <= safe_w; ++i) {\n                total += (unsigned int)(pixels[i] - buffer[i & NK_TT__OVER_MASK]);\n                buffer[(i+kernel_width) & NK_TT__OVER_MASK] = pixels[i];\n                pixels[i] = (unsigned char) (total / 5);\n            }\n            break;\n        default:\n            for (i=0; i <= safe_w; ++i) {\n                total += (unsigned int)(pixels[i] - buffer[i & NK_TT__OVER_MASK]);\n                buffer[(i+kernel_width) & NK_TT__OVER_MASK] = pixels[i];\n                pixels[i] = (unsigned char) (total / (unsigned int)kernel_width);\n            }\n            break;\n        }\n\n        for (; i < w; ++i) {\n            NK_ASSERT(pixels[i] == 0);\n            total -= (unsigned int)(buffer[i & NK_TT__OVER_MASK]);\n            pixels[i] = (unsigned char) (total / (unsigned int)kernel_width);\n        }\n        pixels += stride_in_bytes;\n    }\n}\nNK_INTERN void\nnk_tt__v_prefilter(unsigned char *pixels, int w, int h, int stride_in_bytes,\n    int kernel_width)\n{\n    unsigned char buffer[NK_TT_MAX_OVERSAMPLE];\n    int safe_h = h - kernel_width;\n    int j;\n\n    for (j=0; j < w; ++j)\n    {\n        int i;\n        unsigned int total;\n        NK_MEMSET(buffer, 0, (nk_size)kernel_width);\n\n        total = 0;\n\n        /* make kernel_width a constant in common cases so compiler can optimize out the divide */\n        switch (kernel_width) {\n        case 2:\n            for (i=0; i <= safe_h; ++i) {\n                total += (unsigned int)(pixels[i*stride_in_bytes] - buffer[i & NK_TT__OVER_MASK]);\n                buffer[(i+kernel_width) & NK_TT__OVER_MASK] = pixels[i*stride_in_bytes];\n                pixels[i*stride_in_bytes] = (unsigned char) (total / 2);\n            }\n            break;\n         case 3:\n            for (i=0; i <= safe_h; ++i) {\n                total += (unsigned int)(pixels[i*stride_in_bytes] - buffer[i & NK_TT__OVER_MASK]);\n                buffer[(i+kernel_width) & NK_TT__OVER_MASK] = pixels[i*stride_in_bytes];\n                pixels[i*stride_in_bytes] = (unsigned char) (total / 3);\n            }\n            break;\n         case 4:\n            for (i=0; i <= safe_h; ++i) {\n                total += (unsigned int)(pixels[i*stride_in_bytes] - buffer[i & NK_TT__OVER_MASK]);\n                buffer[(i+kernel_width) & NK_TT__OVER_MASK] = pixels[i*stride_in_bytes];\n                pixels[i*stride_in_bytes] = (unsigned char) (total / 4);\n            }\n            break;\n         case 5:\n            for (i=0; i <= safe_h; ++i) {\n                total += (unsigned int)(pixels[i*stride_in_bytes] - buffer[i & NK_TT__OVER_MASK]);\n                buffer[(i+kernel_width) & NK_TT__OVER_MASK] = pixels[i*stride_in_bytes];\n                pixels[i*stride_in_bytes] = (unsigned char) (total / 5);\n            }\n            break;\n         default:\n            for (i=0; i <= safe_h; ++i) {\n                total += (unsigned int)(pixels[i*stride_in_bytes] - buffer[i & NK_TT__OVER_MASK]);\n                buffer[(i+kernel_width) & NK_TT__OVER_MASK] = pixels[i*stride_in_bytes];\n                pixels[i*stride_in_bytes] = (unsigned char) (total / (unsigned int)kernel_width);\n            }\n            break;\n        }\n\n        for (; i < h; ++i) {\n            NK_ASSERT(pixels[i*stride_in_bytes] == 0);\n            total -= (unsigned int)(buffer[i & NK_TT__OVER_MASK]);\n            pixels[i*stride_in_bytes] = (unsigned char) (total / (unsigned int)kernel_width);\n        }\n        pixels += 1;\n    }\n}\nNK_INTERN float\nnk_tt__oversample_shift(int oversample)\n{\n    if (!oversample)\n        return 0.0f;\n\n    /* The prefilter is a box filter of width \"oversample\", */\n    /* which shifts phase by (oversample - 1)/2 pixels in */\n    /* oversampled space. We want to shift in the opposite */\n    /* direction to counter this. */\n    return (float)-(oversample - 1) / (2.0f * (float)oversample);\n}\nNK_INTERN int\nnk_tt_PackFontRangesGatherRects(struct nk_tt_pack_context *spc,\n    struct nk_tt_fontinfo *info, struct nk_tt_pack_range *ranges,\n    int num_ranges, struct nk_rp_rect *rects)\n{\n    /* rects array must be big enough to accommodate all characters in the given ranges */\n    int i,j,k;\n    k = 0;\n\n    for (i=0; i < num_ranges; ++i) {\n        float fh = ranges[i].font_size;\n        float scale = (fh > 0) ? nk_tt_ScaleForPixelHeight(info, fh):\n            nk_tt_ScaleForMappingEmToPixels(info, -fh);\n        ranges[i].h_oversample = (unsigned char) spc->h_oversample;\n        ranges[i].v_oversample = (unsigned char) spc->v_oversample;\n        for (j=0; j < ranges[i].num_chars; ++j) {\n            int x0,y0,x1,y1;\n            int codepoint = ranges[i].first_unicode_codepoint_in_range ?\n                ranges[i].first_unicode_codepoint_in_range + j :\n                ranges[i].array_of_unicode_codepoints[j];\n\n            int glyph = nk_tt_FindGlyphIndex(info, codepoint);\n            nk_tt_GetGlyphBitmapBoxSubpixel(info,glyph, scale * (float)spc->h_oversample,\n                scale * (float)spc->v_oversample, 0,0, &x0,&y0,&x1,&y1);\n            rects[k].w = (nk_rp_coord) (x1-x0 + spc->padding + (int)spc->h_oversample-1);\n            rects[k].h = (nk_rp_coord) (y1-y0 + spc->padding + (int)spc->v_oversample-1);\n            ++k;\n        }\n    }\n    return k;\n}\nNK_INTERN int\nnk_tt_PackFontRangesRenderIntoRects(struct nk_tt_pack_context *spc,\n    struct nk_tt_fontinfo *info, struct nk_tt_pack_range *ranges,\n    int num_ranges, struct nk_rp_rect *rects, struct nk_allocator *alloc)\n{\n    int i,j,k, return_value = 1;\n    /* save current values */\n    int old_h_over = (int)spc->h_oversample;\n    int old_v_over = (int)spc->v_oversample;\n    /* rects array must be big enough to accommodate all characters in the given ranges */\n\n    k = 0;\n    for (i=0; i < num_ranges; ++i)\n    {\n        float fh = ranges[i].font_size;\n        float recip_h,recip_v,sub_x,sub_y;\n        float scale = fh > 0 ? nk_tt_ScaleForPixelHeight(info, fh):\n            nk_tt_ScaleForMappingEmToPixels(info, -fh);\n\n        spc->h_oversample = ranges[i].h_oversample;\n        spc->v_oversample = ranges[i].v_oversample;\n\n        recip_h = 1.0f / (float)spc->h_oversample;\n        recip_v = 1.0f / (float)spc->v_oversample;\n\n        sub_x = nk_tt__oversample_shift((int)spc->h_oversample);\n        sub_y = nk_tt__oversample_shift((int)spc->v_oversample);\n\n        for (j=0; j < ranges[i].num_chars; ++j)\n        {\n            struct nk_rp_rect *r = &rects[k];\n            if (r->was_packed)\n            {\n                struct nk_tt_packedchar *bc = &ranges[i].chardata_for_range[j];\n                int advance, lsb, x0,y0,x1,y1;\n                int codepoint = ranges[i].first_unicode_codepoint_in_range ?\n                    ranges[i].first_unicode_codepoint_in_range + j :\n                    ranges[i].array_of_unicode_codepoints[j];\n                int glyph = nk_tt_FindGlyphIndex(info, codepoint);\n                nk_rp_coord pad = (nk_rp_coord) spc->padding;\n\n                /* pad on left and top */\n                r->x = (nk_rp_coord)((int)r->x + (int)pad);\n                r->y = (nk_rp_coord)((int)r->y + (int)pad);\n                r->w = (nk_rp_coord)((int)r->w - (int)pad);\n                r->h = (nk_rp_coord)((int)r->h - (int)pad);\n\n                nk_tt_GetGlyphHMetrics(info, glyph, &advance, &lsb);\n                nk_tt_GetGlyphBitmapBox(info, glyph, scale * (float)spc->h_oversample,\n                        (scale * (float)spc->v_oversample), &x0,&y0,&x1,&y1);\n                nk_tt_MakeGlyphBitmapSubpixel(info, spc->pixels + r->x + r->y*spc->stride_in_bytes,\n                    (int)(r->w - spc->h_oversample+1), (int)(r->h - spc->v_oversample+1),\n                    spc->stride_in_bytes, scale * (float)spc->h_oversample,\n                    scale * (float)spc->v_oversample, 0,0, glyph, alloc);\n\n                if (spc->h_oversample > 1)\n                   nk_tt__h_prefilter(spc->pixels + r->x + r->y*spc->stride_in_bytes,\n                        r->w, r->h, spc->stride_in_bytes, (int)spc->h_oversample);\n\n                if (spc->v_oversample > 1)\n                   nk_tt__v_prefilter(spc->pixels + r->x + r->y*spc->stride_in_bytes,\n                        r->w, r->h, spc->stride_in_bytes, (int)spc->v_oversample);\n\n                bc->x0       = (nk_ushort)  r->x;\n                bc->y0       = (nk_ushort)  r->y;\n                bc->x1       = (nk_ushort) (r->x + r->w);\n                bc->y1       = (nk_ushort) (r->y + r->h);\n                bc->xadvance = scale * (float)advance;\n                bc->xoff     = (float)  x0 * recip_h + sub_x;\n                bc->yoff     = (float)  y0 * recip_v + sub_y;\n                bc->xoff2    = ((float)x0 + r->w) * recip_h + sub_x;\n                bc->yoff2    = ((float)y0 + r->h) * recip_v + sub_y;\n            } else {\n                return_value = 0; /* if any fail, report failure */\n            }\n            ++k;\n        }\n    }\n    /* restore original values */\n    spc->h_oversample = (unsigned int)old_h_over;\n    spc->v_oversample = (unsigned int)old_v_over;\n    return return_value;\n}\nNK_INTERN void\nnk_tt_GetPackedQuad(struct nk_tt_packedchar *chardata, int pw, int ph,\n    int char_index, float *xpos, float *ypos, struct nk_tt_aligned_quad *q,\n    int align_to_integer)\n{\n    float ipw = 1.0f / (float)pw, iph = 1.0f / (float)ph;\n    struct nk_tt_packedchar *b = (struct nk_tt_packedchar*)(chardata + char_index);\n    if (align_to_integer) {\n        int tx = nk_ifloorf((*xpos + b->xoff) + 0.5f);\n        int ty = nk_ifloorf((*ypos + b->yoff) + 0.5f);\n\n        float x = (float)tx;\n        float y = (float)ty;\n\n        q->x0 = x;\n        q->y0 = y;\n        q->x1 = x + b->xoff2 - b->xoff;\n        q->y1 = y + b->yoff2 - b->yoff;\n    } else {\n        q->x0 = *xpos + b->xoff;\n        q->y0 = *ypos + b->yoff;\n        q->x1 = *xpos + b->xoff2;\n        q->y1 = *ypos + b->yoff2;\n    }\n    q->s0 = b->x0 * ipw;\n    q->t0 = b->y0 * iph;\n    q->s1 = b->x1 * ipw;\n    q->t1 = b->y1 * iph;\n    *xpos += b->xadvance;\n}\n\n/* -------------------------------------------------------------\n *\n *                          FONT BAKING\n *\n * --------------------------------------------------------------*/\nstruct nk_font_bake_data {\n    struct nk_tt_fontinfo info;\n    struct nk_rp_rect *rects;\n    struct nk_tt_pack_range *ranges;\n    nk_rune range_count;\n};\n\nstruct nk_font_baker {\n    struct nk_allocator alloc;\n    struct nk_tt_pack_context spc;\n    struct nk_font_bake_data *build;\n    struct nk_tt_packedchar *packed_chars;\n    struct nk_rp_rect *rects;\n    struct nk_tt_pack_range *ranges;\n};\n\nNK_GLOBAL const nk_size nk_rect_align = NK_ALIGNOF(struct nk_rp_rect);\nNK_GLOBAL const nk_size nk_range_align = NK_ALIGNOF(struct nk_tt_pack_range);\nNK_GLOBAL const nk_size nk_char_align = NK_ALIGNOF(struct nk_tt_packedchar);\nNK_GLOBAL const nk_size nk_build_align = NK_ALIGNOF(struct nk_font_bake_data);\nNK_GLOBAL const nk_size nk_baker_align = NK_ALIGNOF(struct nk_font_baker);\n\nNK_INTERN int\nnk_range_count(const nk_rune *range)\n{\n    const nk_rune *iter = range;\n    NK_ASSERT(range);\n    if (!range) return 0;\n    while (*(iter++) != 0);\n    return (iter == range) ? 0 : (int)((iter - range)/2);\n}\nNK_INTERN int\nnk_range_glyph_count(const nk_rune *range, int count)\n{\n    int i = 0;\n    int total_glyphs = 0;\n    for (i = 0; i < count; ++i) {\n        int diff;\n        nk_rune f = range[(i*2)+0];\n        nk_rune t = range[(i*2)+1];\n        NK_ASSERT(t >= f);\n        diff = (int)((t - f) + 1);\n        total_glyphs += diff;\n    }\n    return total_glyphs;\n}\nNK_API const nk_rune*\nnk_font_default_glyph_ranges(void)\n{\n    NK_STORAGE const nk_rune ranges[] = {0x0020, 0x00FF, 0};\n    return ranges;\n}\nNK_API const nk_rune*\nnk_font_chinese_glyph_ranges(void)\n{\n    NK_STORAGE const nk_rune ranges[] = {\n        0x0020, 0x00FF,\n        0x3000, 0x30FF,\n        0x31F0, 0x31FF,\n        0xFF00, 0xFFEF,\n        0x4e00, 0x9FAF,\n        0\n    };\n    return ranges;\n}\nNK_API const nk_rune*\nnk_font_cyrillic_glyph_ranges(void)\n{\n    NK_STORAGE const nk_rune ranges[] = {\n        0x0020, 0x00FF,\n        0x0400, 0x052F,\n        0x2DE0, 0x2DFF,\n        0xA640, 0xA69F,\n        0\n    };\n    return ranges;\n}\nNK_API const nk_rune*\nnk_font_korean_glyph_ranges(void)\n{\n    NK_STORAGE const nk_rune ranges[] = {\n        0x0020, 0x00FF,\n        0x3131, 0x3163,\n        0xAC00, 0xD79D,\n        0\n    };\n    return ranges;\n}\nNK_INTERN void\nnk_font_baker_memory(nk_size *temp, int *glyph_count,\n    struct nk_font_config *config_list, int count)\n{\n    int range_count = 0;\n    int total_range_count = 0;\n    struct nk_font_config *iter, *i;\n\n    NK_ASSERT(config_list);\n    NK_ASSERT(glyph_count);\n    if (!config_list) {\n        *temp = 0;\n        *glyph_count = 0;\n        return;\n    }\n    *glyph_count = 0;\n    for (iter = config_list; iter; iter = iter->next) {\n        i = iter;\n        do {if (!i->range) iter->range = nk_font_default_glyph_ranges();\n            range_count = nk_range_count(i->range);\n            total_range_count += range_count;\n            *glyph_count += nk_range_glyph_count(i->range, range_count);\n        } while ((i = i->n) != iter);\n    }\n    *temp = (nk_size)*glyph_count * sizeof(struct nk_rp_rect);\n    *temp += (nk_size)total_range_count * sizeof(struct nk_tt_pack_range);\n    *temp += (nk_size)*glyph_count * sizeof(struct nk_tt_packedchar);\n    *temp += (nk_size)count * sizeof(struct nk_font_bake_data);\n    *temp += sizeof(struct nk_font_baker);\n    *temp += nk_rect_align + nk_range_align + nk_char_align;\n    *temp += nk_build_align + nk_baker_align;\n}\nNK_INTERN struct nk_font_baker*\nnk_font_baker(void *memory, int glyph_count, int count, struct nk_allocator *alloc)\n{\n    struct nk_font_baker *baker;\n    if (!memory) return 0;\n    /* setup baker inside a memory block  */\n    baker = (struct nk_font_baker*)NK_ALIGN_PTR(memory, nk_baker_align);\n    baker->build = (struct nk_font_bake_data*)NK_ALIGN_PTR((baker + 1), nk_build_align);\n    baker->packed_chars = (struct nk_tt_packedchar*)NK_ALIGN_PTR((baker->build + count), nk_char_align);\n    baker->rects = (struct nk_rp_rect*)NK_ALIGN_PTR((baker->packed_chars + glyph_count), nk_rect_align);\n    baker->ranges = (struct nk_tt_pack_range*)NK_ALIGN_PTR((baker->rects + glyph_count), nk_range_align);\n    baker->alloc = *alloc;\n    return baker;\n}\nNK_INTERN int\nnk_font_bake_pack(struct nk_font_baker *baker,\n    nk_size *image_memory, int *width, int *height, struct nk_recti *custom,\n    const struct nk_font_config *config_list, int count,\n    struct nk_allocator *alloc)\n{\n    NK_STORAGE const nk_size max_height = 1024 * 32;\n    const struct nk_font_config *config_iter, *it;\n    int total_glyph_count = 0;\n    int total_range_count = 0;\n    int range_count = 0;\n    int i = 0;\n\n    NK_ASSERT(image_memory);\n    NK_ASSERT(width);\n    NK_ASSERT(height);\n    NK_ASSERT(config_list);\n    NK_ASSERT(count);\n    NK_ASSERT(alloc);\n\n    if (!image_memory || !width || !height || !config_list || !count) return nk_false;\n    for (config_iter = config_list; config_iter; config_iter = config_iter->next) {\n        it = config_iter;\n        do {range_count = nk_range_count(it->range);\n            total_range_count += range_count;\n            total_glyph_count += nk_range_glyph_count(it->range, range_count);\n        } while ((it = it->n) != config_iter);\n    }\n    /* setup font baker from temporary memory */\n    for (config_iter = config_list; config_iter; config_iter = config_iter->next) {\n        it = config_iter;\n        do {if (!nk_tt_InitFont(&baker->build[i++].info, (const unsigned char*)it->ttf_blob, 0))\n            return nk_false;\n        } while ((it = it->n) != config_iter);\n    }\n    *height = 0;\n    *width = (total_glyph_count > 1000) ? 1024 : 512;\n    nk_tt_PackBegin(&baker->spc, 0, (int)*width, (int)max_height, 0, 1, alloc);\n    {\n        int input_i = 0;\n        int range_n = 0;\n        int rect_n = 0;\n        int char_n = 0;\n\n        if (custom) {\n            /* pack custom user data first so it will be in the upper left corner*/\n            struct nk_rp_rect custom_space;\n            nk_zero(&custom_space, sizeof(custom_space));\n            custom_space.w = (nk_rp_coord)(custom->w);\n            custom_space.h = (nk_rp_coord)(custom->h);\n\n            nk_tt_PackSetOversampling(&baker->spc, 1, 1);\n            nk_rp_pack_rects((struct nk_rp_context*)baker->spc.pack_info, &custom_space, 1);\n            *height = NK_MAX(*height, (int)(custom_space.y + custom_space.h));\n\n            custom->x = (short)custom_space.x;\n            custom->y = (short)custom_space.y;\n            custom->w = (short)custom_space.w;\n            custom->h = (short)custom_space.h;\n        }\n\n        /* first font pass: pack all glyphs */\n        for (input_i = 0, config_iter = config_list; input_i < count && config_iter;\n            config_iter = config_iter->next) {\n            it = config_iter;\n            do {int n = 0;\n                int glyph_count;\n                const nk_rune *in_range;\n                const struct nk_font_config *cfg = it;\n                struct nk_font_bake_data *tmp = &baker->build[input_i++];\n\n                /* count glyphs + ranges in current font */\n                glyph_count = 0; range_count = 0;\n                for (in_range = cfg->range; in_range[0] && in_range[1]; in_range += 2) {\n                    glyph_count += (int)(in_range[1] - in_range[0]) + 1;\n                    range_count++;\n                }\n\n                /* setup ranges  */\n                tmp->ranges = baker->ranges + range_n;\n                tmp->range_count = (nk_rune)range_count;\n                range_n += range_count;\n                for (i = 0; i < range_count; ++i) {\n                    in_range = &cfg->range[i * 2];\n                    tmp->ranges[i].font_size = cfg->size;\n                    tmp->ranges[i].first_unicode_codepoint_in_range = (int)in_range[0];\n                    tmp->ranges[i].num_chars = (int)(in_range[1]- in_range[0]) + 1;\n                    tmp->ranges[i].chardata_for_range = baker->packed_chars + char_n;\n                    char_n += tmp->ranges[i].num_chars;\n                }\n\n                /* pack */\n                tmp->rects = baker->rects + rect_n;\n                rect_n += glyph_count;\n                nk_tt_PackSetOversampling(&baker->spc, cfg->oversample_h, cfg->oversample_v);\n                n = nk_tt_PackFontRangesGatherRects(&baker->spc, &tmp->info,\n                    tmp->ranges, (int)tmp->range_count, tmp->rects);\n                nk_rp_pack_rects((struct nk_rp_context*)baker->spc.pack_info, tmp->rects, (int)n);\n\n                /* texture height */\n                for (i = 0; i < n; ++i) {\n                    if (tmp->rects[i].was_packed)\n                        *height = NK_MAX(*height, tmp->rects[i].y + tmp->rects[i].h);\n                }\n            } while ((it = it->n) != config_iter);\n        }\n        NK_ASSERT(rect_n == total_glyph_count);\n        NK_ASSERT(char_n == total_glyph_count);\n        NK_ASSERT(range_n == total_range_count);\n    }\n    *height = (int)nk_round_up_pow2((nk_uint)*height);\n    *image_memory = (nk_size)(*width) * (nk_size)(*height);\n    return nk_true;\n}\nNK_INTERN void\nnk_font_bake(struct nk_font_baker *baker, void *image_memory, int width, int height,\n    struct nk_font_glyph *glyphs, int glyphs_count,\n    const struct nk_font_config *config_list, int font_count)\n{\n    int input_i = 0;\n    nk_rune glyph_n = 0;\n    const struct nk_font_config *config_iter;\n    const struct nk_font_config *it;\n\n    NK_ASSERT(image_memory);\n    NK_ASSERT(width);\n    NK_ASSERT(height);\n    NK_ASSERT(config_list);\n    NK_ASSERT(baker);\n    NK_ASSERT(font_count);\n    NK_ASSERT(glyphs_count);\n    if (!image_memory || !width || !height || !config_list ||\n        !font_count || !glyphs || !glyphs_count)\n        return;\n\n    /* second font pass: render glyphs */\n    nk_zero(image_memory, (nk_size)((nk_size)width * (nk_size)height));\n    baker->spc.pixels = (unsigned char*)image_memory;\n    baker->spc.height = (int)height;\n    for (input_i = 0, config_iter = config_list; input_i < font_count && config_iter;\n        config_iter = config_iter->next) {\n        it = config_iter;\n        do {const struct nk_font_config *cfg = it;\n            struct nk_font_bake_data *tmp = &baker->build[input_i++];\n            nk_tt_PackSetOversampling(&baker->spc, cfg->oversample_h, cfg->oversample_v);\n            nk_tt_PackFontRangesRenderIntoRects(&baker->spc, &tmp->info, tmp->ranges,\n                (int)tmp->range_count, tmp->rects, &baker->alloc);\n        } while ((it = it->n) != config_iter);\n    } nk_tt_PackEnd(&baker->spc, &baker->alloc);\n\n    /* third pass: setup font and glyphs */\n    for (input_i = 0, config_iter = config_list; input_i < font_count && config_iter;\n        config_iter = config_iter->next) {\n        it = config_iter;\n        do {nk_size i = 0;\n            int char_idx = 0;\n            nk_rune glyph_count = 0;\n            const struct nk_font_config *cfg = it;\n            struct nk_font_bake_data *tmp = &baker->build[input_i++];\n            struct nk_baked_font *dst_font = cfg->font;\n\n            float font_scale = nk_tt_ScaleForPixelHeight(&tmp->info, cfg->size);\n            int unscaled_ascent, unscaled_descent, unscaled_line_gap;\n            nk_tt_GetFontVMetrics(&tmp->info, &unscaled_ascent, &unscaled_descent,\n                                    &unscaled_line_gap);\n\n            /* fill baked font */\n            if (!cfg->merge_mode) {\n                dst_font->ranges = cfg->range;\n                dst_font->height = cfg->size;\n                dst_font->ascent = ((float)unscaled_ascent * font_scale);\n                dst_font->descent = ((float)unscaled_descent * font_scale);\n                dst_font->glyph_offset = glyph_n;\n            }\n\n            /* fill own baked font glyph array */\n            for (i = 0; i < tmp->range_count; ++i) {\n                struct nk_tt_pack_range *range = &tmp->ranges[i];\n                for (char_idx = 0; char_idx < range->num_chars; char_idx++)\n                {\n                    nk_rune codepoint = 0;\n                    float dummy_x = 0, dummy_y = 0;\n                    struct nk_tt_aligned_quad q;\n                    struct nk_font_glyph *glyph;\n\n                    /* query glyph bounds from stb_truetype */\n                    const struct nk_tt_packedchar *pc = &range->chardata_for_range[char_idx];\n                    if (!pc->x0 && !pc->x1 && !pc->y0 && !pc->y1) continue;\n                    codepoint = (nk_rune)(range->first_unicode_codepoint_in_range + char_idx);\n                    nk_tt_GetPackedQuad(range->chardata_for_range, (int)width,\n                        (int)height, char_idx, &dummy_x, &dummy_y, &q, 0);\n\n                    /* fill own glyph type with data */\n                    glyph = &glyphs[dst_font->glyph_offset + dst_font->glyph_count + (unsigned int)glyph_count];\n                    glyph->codepoint = codepoint;\n                    glyph->x0 = q.x0; glyph->y0 = q.y0;\n                    glyph->x1 = q.x1; glyph->y1 = q.y1;\n                    glyph->y0 += (dst_font->ascent + 0.5f);\n                    glyph->y1 += (dst_font->ascent + 0.5f);\n                    glyph->w = glyph->x1 - glyph->x0 + 0.5f;\n                    glyph->h = glyph->y1 - glyph->y0;\n\n                    if (cfg->coord_type == NK_COORD_PIXEL) {\n                        glyph->u0 = q.s0 * (float)width;\n                        glyph->v0 = q.t0 * (float)height;\n                        glyph->u1 = q.s1 * (float)width;\n                        glyph->v1 = q.t1 * (float)height;\n                    } else {\n                        glyph->u0 = q.s0;\n                        glyph->v0 = q.t0;\n                        glyph->u1 = q.s1;\n                        glyph->v1 = q.t1;\n                    }\n                    glyph->xadvance = (pc->xadvance + cfg->spacing.x);\n                    if (cfg->pixel_snap)\n                        glyph->xadvance = (float)(int)(glyph->xadvance + 0.5f);\n                    glyph_count++;\n                }\n            }\n            dst_font->glyph_count += glyph_count;\n            glyph_n += glyph_count;\n        } while ((it = it->n) != config_iter);\n    }\n}\nNK_INTERN void\nnk_font_bake_custom_data(void *img_memory, int img_width, int img_height,\n    struct nk_recti img_dst, const char *texture_data_mask, int tex_width,\n    int tex_height, char white, char black)\n{\n    nk_byte *pixels;\n    int y = 0;\n    int x = 0;\n    int n = 0;\n\n    NK_ASSERT(img_memory);\n    NK_ASSERT(img_width);\n    NK_ASSERT(img_height);\n    NK_ASSERT(texture_data_mask);\n    NK_UNUSED(tex_height);\n    if (!img_memory || !img_width || !img_height || !texture_data_mask)\n        return;\n\n    pixels = (nk_byte*)img_memory;\n    for (y = 0, n = 0; y < tex_height; ++y) {\n        for (x = 0; x < tex_width; ++x, ++n) {\n            const int off0 = ((img_dst.x + x) + (img_dst.y + y) * img_width);\n            const int off1 = off0 + 1 + tex_width;\n            pixels[off0] = (texture_data_mask[n] == white) ? 0xFF : 0x00;\n            pixels[off1] = (texture_data_mask[n] == black) ? 0xFF : 0x00;\n        }\n    }\n}\nNK_INTERN void\nnk_font_bake_convert(void *out_memory, int img_width, int img_height,\n    const void *in_memory)\n{\n    int n = 0;\n    nk_rune *dst;\n    const nk_byte *src;\n\n    NK_ASSERT(out_memory);\n    NK_ASSERT(in_memory);\n    NK_ASSERT(img_width);\n    NK_ASSERT(img_height);\n    if (!out_memory || !in_memory || !img_height || !img_width) return;\n\n    dst = (nk_rune*)out_memory;\n    src = (const nk_byte*)in_memory;\n    for (n = (int)(img_width * img_height); n > 0; n--)\n        *dst++ = ((nk_rune)(*src++) << 24) | 0x00FFFFFF;\n}\n\n/* -------------------------------------------------------------\n *\n *                          FONT\n *\n * --------------------------------------------------------------*/\nNK_INTERN float\nnk_font_text_width(nk_handle handle, float height, const char *text, int len)\n{\n    nk_rune unicode;\n    int text_len  = 0;\n    float text_width = 0;\n    int glyph_len = 0;\n    float scale = 0;\n\n    struct nk_font *font = (struct nk_font*)handle.ptr;\n    NK_ASSERT(font);\n    NK_ASSERT(font->glyphs);\n    if (!font || !text || !len)\n        return 0;\n\n    scale = height/font->info.height;\n    glyph_len = text_len = nk_utf_decode(text, &unicode, (int)len);\n    if (!glyph_len) return 0;\n    while (text_len <= (int)len && glyph_len) {\n        const struct nk_font_glyph *g;\n        if (unicode == NK_UTF_INVALID) break;\n\n        /* query currently drawn glyph information */\n        g = nk_font_find_glyph(font, unicode);\n        text_width += g->xadvance * scale;\n\n        /* offset next glyph */\n        glyph_len = nk_utf_decode(text + text_len, &unicode, (int)len - text_len);\n        text_len += glyph_len;\n    }\n    return text_width;\n}\n#ifdef NK_INCLUDE_VERTEX_BUFFER_OUTPUT\nNK_INTERN void\nnk_font_query_font_glyph(nk_handle handle, float height,\n    struct nk_user_font_glyph *glyph, nk_rune codepoint, nk_rune next_codepoint)\n{\n    float scale;\n    const struct nk_font_glyph *g;\n    struct nk_font *font;\n\n    NK_ASSERT(glyph);\n    NK_UNUSED(next_codepoint);\n\n    font = (struct nk_font*)handle.ptr;\n    NK_ASSERT(font);\n    NK_ASSERT(font->glyphs);\n    if (!font || !glyph)\n        return;\n\n    scale = height/font->info.height;\n    g = nk_font_find_glyph(font, codepoint);\n    glyph->width = (g->x1 - g->x0) * scale;\n    glyph->height = (g->y1 - g->y0) * scale;\n    glyph->offset = nk_vec2(g->x0 * scale, g->y0 * scale);\n    glyph->xadvance = (g->xadvance * scale);\n    glyph->uv[0] = nk_vec2(g->u0, g->v0);\n    glyph->uv[1] = nk_vec2(g->u1, g->v1);\n}\n#endif\nNK_API const struct nk_font_glyph*\nnk_font_find_glyph(struct nk_font *font, nk_rune unicode)\n{\n    int i = 0;\n    int count;\n    int total_glyphs = 0;\n    const struct nk_font_glyph *glyph = 0;\n    const struct nk_font_config *iter = 0;\n\n    NK_ASSERT(font);\n    NK_ASSERT(font->glyphs);\n    NK_ASSERT(font->info.ranges);\n    if (!font || !font->glyphs) return 0;\n\n    glyph = font->fallback;\n    iter = font->config;\n    do {count = nk_range_count(iter->range);\n        for (i = 0; i < count; ++i) {\n            nk_rune f = iter->range[(i*2)+0];\n            nk_rune t = iter->range[(i*2)+1];\n            int diff = (int)((t - f) + 1);\n            if (unicode >= f && unicode <= t)\n                return &font->glyphs[((nk_rune)total_glyphs + (unicode - f))];\n            total_glyphs += diff;\n        }\n    } while ((iter = iter->n) != font->config);\n    return glyph;\n}\nNK_INTERN void\nnk_font_init(struct nk_font *font, float pixel_height,\n    nk_rune fallback_codepoint, struct nk_font_glyph *glyphs,\n    const struct nk_baked_font *baked_font, nk_handle atlas)\n{\n    struct nk_baked_font baked;\n    NK_ASSERT(font);\n    NK_ASSERT(glyphs);\n    NK_ASSERT(baked_font);\n    if (!font || !glyphs || !baked_font)\n        return;\n\n    baked = *baked_font;\n    font->fallback = 0;\n    font->info = baked;\n    font->scale = (float)pixel_height / (float)font->info.height;\n    font->glyphs = &glyphs[baked_font->glyph_offset];\n    font->texture = atlas;\n    font->fallback_codepoint = fallback_codepoint;\n    font->fallback = nk_font_find_glyph(font, fallback_codepoint);\n\n    font->handle.height = font->info.height * font->scale;\n    font->handle.width = nk_font_text_width;\n    font->handle.userdata.ptr = font;\n#ifdef NK_INCLUDE_VERTEX_BUFFER_OUTPUT\n    font->handle.query = nk_font_query_font_glyph;\n    font->handle.texture = font->texture;\n#endif\n}\n\n/* ---------------------------------------------------------------------------\n *\n *                          DEFAULT FONT\n *\n * ProggyClean.ttf\n * Copyright (c) 2004, 2005 Tristan Grimmer\n * MIT license (see License.txt in http://www.upperbounds.net/download/ProggyClean.ttf.zip)\n * Download and more information at http://upperbounds.net\n *-----------------------------------------------------------------------------*/\n#ifdef __clang__\n#pragma clang diagnostic push\n#pragma clang diagnostic ignored \"-Woverlength-strings\"\n#elif defined(__GNUC__) || defined(__GNUG__)\n#pragma GCC diagnostic push\n#pragma GCC diagnostic ignored \"-Woverlength-strings\"\n#endif\n\n#ifdef NK_INCLUDE_DEFAULT_FONT\n\nNK_GLOBAL const char nk_proggy_clean_ttf_compressed_data_base85[11980+1] =\n    \"7])#######hV0qs'/###[),##/l:$#Q6>##5[n42>c-TH`->>#/e>11NNV=Bv(*:.F?uu#(gRU.o0XGH`$vhLG1hxt9?W`#,5LsCp#-i>.r$<$6pD>Lb';9Crc6tgXmKVeU2cD4Eo3R/\"\n    \"2*>]b(MC;$jPfY.;h^`IWM9<Lh2TlS+f-s$o6Q<BWH`YiU.xfLq$N;$0iR/GX:U(jcW2p/W*q?-qmnUCI;jHSAiFWM.R*kU@C=GH?a9wp8f$e.-4^Qg1)Q-GL(lf(r/7GrRgwV%MS=C#\"\n    \"`8ND>Qo#t'X#(v#Y9w0#1D$CIf;W'#pWUPXOuxXuU(H9M(1<q-UE31#^-V'8IRUo7Qf./L>=Ke$$'5F%)]0^#0X@U.a<r:QLtFsLcL6##lOj)#.Y5<-R&KgLwqJfLgN&;Q?gI^#DY2uL\"\n    \"i@^rMl9t=cWq6##weg>$FBjVQTSDgEKnIS7EM9>ZY9w0#L;>>#Mx&4Mvt//L[MkA#W@lK.N'[0#7RL_&#w+F%HtG9M#XL`N&.,GM4Pg;-<nLENhvx>-VsM.M0rJfLH2eTM`*oJMHRC`N\"\n    \"kfimM2J,W-jXS:)r0wK#@Fge$U>`w'N7G#$#fB#$E^$#:9:hk+eOe--6x)F7*E%?76%^GMHePW-Z5l'&GiF#$956:rS?dA#fiK:)Yr+`&#0j@'DbG&#^$PG.Ll+DNa<XCMKEV*N)LN/N\"\n    \"*b=%Q6pia-Xg8I$<MR&,VdJe$<(7G;Ckl'&hF;;$<_=X(b.RS%%)###MPBuuE1V:v&cX&#2m#(&cV]`k9OhLMbn%s$G2,B$BfD3X*sp5#l,$R#]x_X1xKX%b5U*[r5iMfUo9U`N99hG)\"\n    \"tm+/Us9pG)XPu`<0s-)WTt(gCRxIg(%6sfh=ktMKn3j)<6<b5Sk_/0(^]AaN#(p/L>&VZ>1i%h1S9u5o@YaaW$e+b<TWFn/Z:Oh(Cx2$lNEoN^e)#CFY@@I;BOQ*sRwZtZxRcU7uW6CX\"\n    \"ow0i(?$Q[cjOd[P4d)]>ROPOpxTO7Stwi1::iB1q)C_=dV26J;2,]7op$]uQr@_V7$q^%lQwtuHY]=DX,n3L#0PHDO4f9>dC@O>HBuKPpP*E,N+b3L#lpR/MrTEH.IAQk.a>D[.e;mc.\"\n    \"x]Ip.PH^'/aqUO/$1WxLoW0[iLA<QT;5HKD+@qQ'NQ(3_PLhE48R.qAPSwQ0/WK?Z,[x?-J;jQTWA0X@KJ(_Y8N-:/M74:/-ZpKrUss?d#dZq]DAbkU*JqkL+nwX@@47`5>w=4h(9.`G\"\n    \"CRUxHPeR`5Mjol(dUWxZa(>STrPkrJiWx`5U7F#.g*jrohGg`cg:lSTvEY/EV_7H4Q9[Z%cnv;JQYZ5q.l7Zeas:HOIZOB?G<Nald$qs]@]L<J7bR*>gv:[7MI2k).'2($5FNP&EQ(,)\"\n    \"U]W]+fh18.vsai00);D3@4ku5P?DP8aJt+;qUM]=+b'8@;mViBKx0DE[-auGl8:PJ&Dj+M6OC]O^((##]`0i)drT;-7X`=-H3[igUnPG-NZlo.#k@h#=Ork$m>a>$-?Tm$UV(?#P6YY#\"\n    \"'/###xe7q.73rI3*pP/$1>s9)W,JrM7SN]'/4C#v$U`0#V.[0>xQsH$fEmPMgY2u7Kh(G%siIfLSoS+MK2eTM$=5,M8p`A.;_R%#u[K#$x4AG8.kK/HSB==-'Ie/QTtG?-.*^N-4B/ZM\"\n    \"_3YlQC7(p7q)&](`6_c)$/*JL(L-^(]$wIM`dPtOdGA,U3:w2M-0<q-]L_?^)1vw'.,MRsqVr.L;aN&#/EgJ)PBc[-f>+WomX2u7lqM2iEumMTcsF?-aT=Z-97UEnXglEn1K-bnEO`gu\"\n    \"Ft(c%=;Am_Qs@jLooI&NX;]0#j4#F14;gl8-GQpgwhrq8'=l_f-b49'UOqkLu7-##oDY2L(te+Mch&gLYtJ,MEtJfLh'x'M=$CS-ZZ%P]8bZ>#S?YY#%Q&q'3^Fw&?D)UDNrocM3A76/\"\n    \"/oL?#h7gl85[qW/NDOk%16ij;+:1a'iNIdb-ou8.P*w,v5#EI$TWS>Pot-R*H'-SEpA:g)f+O$%%`kA#G=8RMmG1&O`>to8bC]T&$,n.LoO>29sp3dt-52U%VM#q7'DHpg+#Z9%H[K<L\"\n    \"%a2E-grWVM3@2=-k22tL]4$##6We'8UJCKE[d_=%wI;'6X-GsLX4j^SgJ$##R*w,vP3wK#iiW&#*h^D&R?jp7+/u&#(AP##XU8c$fSYW-J95_-Dp[g9wcO&#M-h1OcJlc-*vpw0xUX&#\"\n    \"OQFKNX@QI'IoPp7nb,QU//MQ&ZDkKP)X<WSVL(68uVl&#c'[0#(s1X&xm$Y%B7*K:eDA323j998GXbA#pwMs-jgD$9QISB-A_(aN4xoFM^@C58D0+Q+q3n0#3U1InDjF682-SjMXJK)(\"\n    \"h$hxua_K]ul92%'BOU&#BRRh-slg8KDlr:%L71Ka:.A;%YULjDPmL<LYs8i#XwJOYaKPKc1h:'9Ke,g)b),78=I39B;xiY$bgGw-&.Zi9InXDuYa%G*f2Bq7mn9^#p1vv%#(Wi-;/Z5h\"\n    \"o;#2:;%d&#x9v68C5g?ntX0X)pT`;%pB3q7mgGN)3%(P8nTd5L7GeA-GL@+%J3u2:(Yf>et`e;)f#Km8&+DC$I46>#Kr]]u-[=99tts1.qb#q72g1WJO81q+eN'03'eM>&1XxY-caEnO\"\n    \"j%2n8)),?ILR5^.Ibn<-X-Mq7[a82Lq:F&#ce+S9wsCK*x`569E8ew'He]h:sI[2LM$[guka3ZRd6:t%IG:;$%YiJ:Nq=?eAw;/:nnDq0(CYcMpG)qLN4$##&J<j$UpK<Q4a1]MupW^-\"\n    \"sj_$%[HK%'F####QRZJ::Y3EGl4'@%FkiAOg#p[##O`gukTfBHagL<LHw%q&OV0##F=6/:chIm0@eCP8X]:kFI%hl8hgO@RcBhS-@Qb$%+m=hPDLg*%K8ln(wcf3/'DW-$.lR?n[nCH-\"\n    \"eXOONTJlh:.RYF%3'p6sq:UIMA945&^HFS87@$EP2iG<-lCO$%c`uKGD3rC$x0BL8aFn--`ke%#HMP'vh1/R&O_J9'um,.<tx[@%wsJk&bUT2`0uMv7gg#qp/ij.L56'hl;.s5CUrxjO\"\n    \"M7-##.l+Au'A&O:-T72L]P`&=;ctp'XScX*rU.>-XTt,%OVU4)S1+R-#dg0/Nn?Ku1^0f$B*P:Rowwm-`0PKjYDDM'3]d39VZHEl4,.j']Pk-M.h^&:0FACm$maq-&sgw0t7/6(^xtk%\"\n    \"LuH88Fj-ekm>GA#_>568x6(OFRl-IZp`&b,_P'$M<Jnq79VsJW/mWS*PUiq76;]/NM_>hLbxfc$mj`,O;&%W2m`Zh:/)Uetw:aJ%]K9h:TcF]u_-Sj9,VK3M.*'&0D[Ca]J9gp8,kAW]\"\n    \"%(?A%R$f<->Zts'^kn=-^@c4%-pY6qI%J%1IGxfLU9CP8cbPlXv);C=b),<2mOvP8up,UVf3839acAWAW-W?#ao/^#%KYo8fRULNd2.>%m]UK:n%r$'sw]J;5pAoO_#2mO3n,'=H5(et\"\n    \"Hg*`+RLgv>=4U8guD$I%D:W>-r5V*%j*W:Kvej.Lp$<M-SGZ':+Q_k+uvOSLiEo(<aD/K<CCc`'Lx>'?;++O'>()jLR-^u68PHm8ZFWe+ej8h:9r6L*0//c&iH&R8pRbA#Kjm%upV1g:\"\n    \"a_#Ur7FuA#(tRh#.Y5K+@?3<-8m0$PEn;J:rh6?I6uG<-`wMU'ircp0LaE_OtlMb&1#6T.#FDKu#1Lw%u%+GM+X'e?YLfjM[VO0MbuFp7;>Q&#WIo)0@F%q7c#4XAXN-U&VB<HFF*qL(\"\n    \"$/V,;(kXZejWO`<[5?\\?ewY(*9=%wDc;,u<'9t3W-(H1th3+G]ucQ]kLs7df($/*JL]@*t7Bu_G3_7mp7<iaQjO@.kLg;x3B0lqp7Hf,^Ze7-##@/c58Mo(3;knp0%)A7?-W+eI'o8)b<\"\n    \"nKnw'Ho8C=Y>pqB>0ie&jhZ[?iLR@@_AvA-iQC(=ksRZRVp7`.=+NpBC%rh&3]R:8XDmE5^V8O(x<<aG/1N$#FX$0V5Y6x'aErI3I$7x%E`v<-BY,)%-?Psf*l?%C3.mM(=/M0:JxG'?\"\n    \"7WhH%o'a<-80g0NBxoO(GH<dM]n.+%q@jH?f.UsJ2Ggs&4<-e47&Kl+f//9@`b+?.TeN_&B8Ss?v;^Trk;f#YvJkl&w$]>-+k?'(<S:68tq*WoDfZu';mM?8X[ma8W%*`-=;D.(nc7/;\"\n    \")g:T1=^J$&BRV(-lTmNB6xqB[@0*o.erM*<SWF]u2=st-*(6v>^](H.aREZSi,#1:[IXaZFOm<-ui#qUq2$##Ri;u75OK#(RtaW-K-F`S+cF]uN`-KMQ%rP/Xri.LRcB##=YL3BgM/3M\"\n    \"D?@f&1'BW-)Ju<L25gl8uhVm1hL$##*8###'A3/LkKW+(^rWX?5W_8g)a(m&K8P>#bmmWCMkk&#TR`C,5d>g)F;t,4:@_l8G/5h4vUd%&%950:VXD'QdWoY-F$BtUwmfe$YqL'8(PWX(\"\n    \"P?^@Po3$##`MSs?DWBZ/S>+4%>fX,VWv/w'KD`LP5IbH;rTV>n3cEK8U#bX]l-/V+^lj3;vlMb&[5YQ8#pekX9JP3XUC72L,,?+Ni&co7ApnO*5NK,((W-i:$,kp'UDAO(G0Sq7MVjJs\"\n    \"bIu)'Z,*[>br5fX^:FPAWr-m2KgL<LUN098kTF&#lvo58=/vjDo;.;)Ka*hLR#/k=rKbxuV`>Q_nN6'8uTG&#1T5g)uLv:873UpTLgH+#FgpH'_o1780Ph8KmxQJ8#H72L4@768@Tm&Q\"\n    \"h4CB/5OvmA&,Q&QbUoi$a_%3M01H)4x7I^&KQVgtFnV+;[Pc>[m4k//,]1?#`VY[Jr*3&&slRfLiVZJ:]?=K3Sw=[$=uRB?3xk48@aeg<Z'<$#4H)6,>e0jT6'N#(q%.O=?2S]u*(m<-\"\n    \"V8J'(1)G][68hW$5'q[GC&5j`TE?m'esFGNRM)j,ffZ?-qx8;->g4t*:CIP/[Qap7/9'#(1sao7w-.qNUdkJ)tCF&#B^;xGvn2r9FEPFFFcL@.iFNkTve$m%#QvQS8U@)2Z+3K:AKM5i\"\n    \"sZ88+dKQ)W6>J%CL<KE>`.d*(B`-n8D9oK<Up]c$X$(,)M8Zt7/[rdkqTgl-0cuGMv'?>-XV1q['-5k'cAZ69e;D_?$ZPP&s^+7])$*$#@QYi9,5P&#9r+$%CE=68>K8r0=dSC%%(@p7\"\n    \".m7jilQ02'0-VWAg<a/''3u.=4L$Y)6k/K:_[3=&jvL<L0C/2'v:^;-DIBW,B4E68:kZ;%?8(Q8BH=kO65BW?xSG&#@uU,DS*,?.+(o(#1vCS8#CHF>TlGW'b)Tq7VT9q^*^$$.:&N@@\"\n    \"$&)WHtPm*5_rO0&e%K&#-30j(E4#'Zb.o/(Tpm$>K'f@[PvFl,hfINTNU6u'0pao7%XUp9]5.>%h`8_=VYbxuel.NTSsJfLacFu3B'lQSu/m6-Oqem8T+oE--$0a/k]uj9EwsG>%veR*\"\n    \"hv^BFpQj:K'#SJ,sB-'#](j.Lg92rTw-*n%@/;39rrJF,l#qV%OrtBeC6/,;qB3ebNW[?,Hqj2L.1NP&GjUR=1D8QaS3Up&@*9wP?+lo7b?@%'k4`p0Z$22%K3+iCZj?XJN4Nm&+YF]u\"\n    \"@-W$U%VEQ/,,>>#)D<h#`)h0:<Q6909ua+&VU%n2:cG3FJ-%@Bj-DgLr`Hw&HAKjKjseK</xKT*)B,N9X3]krc12t'pgTV(Lv-tL[xg_%=M_q7a^x?7Ubd>#%8cY#YZ?=,`Wdxu/ae&#\"\n    \"w6)R89tI#6@s'(6Bf7a&?S=^ZI_kS&ai`&=tE72L_D,;^R)7[$s<Eh#c&)q.MXI%#v9ROa5FZO%sF7q7Nwb&#ptUJ:aqJe$Sl68%.D###EC><?-aF&#RNQv>o8lKN%5/$(vdfq7+ebA#\"\n    \"u1p]ovUKW&Y%q]'>$1@-[xfn$7ZTp7mM,G,Ko7a&Gu%G[RMxJs[0MM%wci.LFDK)(<c`Q8N)jEIF*+?P2a8g%)$q]o2aH8C&<SibC/q,(e:v;-b#6[$NtDZ84Je2KNvB#$P5?tQ3nt(0\"\n    \"d=j.LQf./Ll33+(;q3L-w=8dX$#WF&uIJ@-bfI>%:_i2B5CsR8&9Z&#=mPEnm0f`<&c)QL5uJ#%u%lJj+D-r;BoF&#4DoS97h5g)E#o:&S4weDF,9^Hoe`h*L+_a*NrLW-1pG_&2UdB8\"\n    \"6e%B/:=>)N4xeW.*wft-;$'58-ESqr<b?UI(_%@[P46>#U`'6AQ]m&6/`Z>#S?YY#Vc;r7U2&326d=w&H####?TZ`*4?&.MK?LP8Vxg>$[QXc%QJv92.(Db*B)gb*BM9dM*hJMAo*c&#\"\n    \"b0v=Pjer]$gG&JXDf->'StvU7505l9$AFvgYRI^&<^b68?j#q9QX4SM'RO#&sL1IM.rJfLUAj221]d##DW=m83u5;'bYx,*Sl0hL(W;;$doB&O/TQ:(Z^xBdLjL<Lni;''X.`$#8+1GD\"\n    \":k$YUWsbn8ogh6rxZ2Z9]%nd+>V#*8U_72Lh+2Q8Cj0i:6hp&$C/:p(HK>T8Y[gHQ4`4)'$Ab(Nof%V'8hL&#<NEdtg(n'=S1A(Q1/I&4([%dM`,Iu'1:_hL>SfD07&6D<fp8dHM7/g+\"\n    \"tlPN9J*rKaPct&?'uBCem^jn%9_K)<,C5K3s=5g&GmJb*[SYq7K;TRLGCsM-$$;S%:Y@r7AK0pprpL<Lrh,q7e/%KWK:50I^+m'vi`3?%Zp+<-d+$L-Sv:@.o19n$s0&39;kn;S%BSq*\"\n    \"$3WoJSCLweV[aZ'MQIjO<7;X-X;&+dMLvu#^UsGEC9WEc[X(wI7#2.(F0jV*eZf<-Qv3J-c+J5AlrB#$p(H68LvEA'q3n0#m,[`*8Ft)FcYgEud]CWfm68,(aLA$@EFTgLXoBq/UPlp7\"\n    \":d[/;r_ix=:TF`S5H-b<LI&HY(K=h#)]Lk$K14lVfm:x$H<3^Ql<M`$OhapBnkup'D#L$Pb_`N*g]2e;X/Dtg,bsj&K#2[-:iYr'_wgH)NUIR8a1n#S?Yej'h8^58UbZd+^FKD*T@;6A\"\n    \"7aQC[K8d-(v6GI$x:T<&'Gp5Uf>@M.*J:;$-rv29'M]8qMv-tLp,'886iaC=Hb*YJoKJ,(j%K=H`K.v9HggqBIiZu'QvBT.#=)0ukruV&.)3=(^1`o*Pj4<-<aN((^7('#Z0wK#5GX@7\"\n    \"u][`*S^43933A4rl][`*O4CgLEl]v$1Q3AeF37dbXk,.)vj#x'd`;qgbQR%FW,2(?LO=s%Sc68%NP'##Aotl8x=BE#j1UD([3$M(]UI2LX3RpKN@;/#f'f/&_mt&F)XdF<9t4)Qa.*kT\"\n    \"LwQ'(TTB9.xH'>#MJ+gLq9-##@HuZPN0]u:h7.T..G:;$/Usj(T7`Q8tT72LnYl<-qx8;-HV7Q-&Xdx%1a,hC=0u+HlsV>nuIQL-5<N?)NBS)QN*_I,?&)2'IM%L3I)X((e/dl2&8'<M\"\n    \":^#M*Q+[T.Xri.LYS3v%fF`68h;b-X[/En'CR.q7E)p'/kle2HM,u;^%OKC-N+Ll%F9CF<Nf'^#t2L,;27W:0O@6##U6W7:$rJfLWHj$#)woqBefIZ.PK<b*t7ed;p*_m;4ExK#h@&]>\"\n    \"_>@kXQtMacfD.m-VAb8;IReM3$wf0''hra*so568'Ip&vRs849'MRYSp%:t:h5qSgwpEr$B>Q,;s(C#$)`svQuF$##-D,##,g68@2[T;.XSdN9Qe)rpt._K-#5wF)sP'##p#C0c%-Gb%\"\n    \"hd+<-j'Ai*x&&HMkT]C'OSl##5RG[JXaHN;d'uA#x._U;.`PU@(Z3dt4r152@:v,'R.Sj'w#0<-;kPI)FfJ&#AYJ&#//)>-k=m=*XnK$>=)72L]0I%>.G690a:$##<,);?;72#?x9+d;\"\n    \"^V'9;jY@;)br#q^YQpx:X#Te$Z^'=-=bGhLf:D6&bNwZ9-ZD#n^9HhLMr5G;']d&6'wYmTFmL<LD)F^%[tC'8;+9E#C$g%#5Y>q9wI>P(9mI[>kC-ekLC/R&CH+s'B;K-M6$EB%is00:\"\n    \"+A4[7xks.LrNk0&E)wILYF@2L'0Nb$+pv<(2.768/FrY&h$^3i&@+G%JT'<-,v`3;_)I9M^AE]CN?Cl2AZg+%4iTpT3<n-&%H%b<FDj2M<hH=&Eh<2Len$b*aTX=-8QxN)k11IM1c^j%\"\n    \"9s<L<NFSo)B?+<-(GxsF,^-Eh@$4dXhN$+#rxK8'je'D7k`e;)2pYwPA'_p9&@^18ml1^[@g4t*[JOa*[=Qp7(qJ_oOL^('7fB&Hq-:sf,sNj8xq^>$U4O]GKx'm9)b@p7YsvK3w^YR-\"\n    \"CdQ*:Ir<($u&)#(&?L9Rg3H)4fiEp^iI9O8KnTj,]H?D*r7'M;PwZ9K0E^k&-cpI;.p/6_vwoFMV<->#%Xi.LxVnrU(4&8/P+:hLSKj$#U%]49t'I:rgMi'FL@a:0Y-uA[39',(vbma*\"\n    \"hU%<-SRF`Tt:542R_VV$p@[p8DV[A,?1839FWdF<TddF<9Ah-6&9tWoDlh]&1SpGMq>Ti1O*H&#(AL8[_P%.M>v^-))qOT*F5Cq0`Ye%+$B6i:7@0IX<N+T+0MlMBPQ*Vj>SsD<U4JHY\"\n    \"8kD2)2fU/M#$e.)T4,_=8hLim[&);?UkK'-x?'(:siIfL<$pFM`i<?%W(mGDHM%>iWP,##P`%/L<eXi:@Z9C.7o=@(pXdAO/NLQ8lPl+HPOQa8wD8=^GlPa8TKI1CjhsCTSLJM'/Wl>-\"\n    \"S(qw%sf/@%#B6;/U7K]uZbi^Oc^2n<bhPmUkMw>%t<)'mEVE''n`WnJra$^TKvX5B>;_aSEK',(hwa0:i4G?.Bci.(X[?b*($,=-n<.Q%`(X=?+@Am*Js0&=3bh8K]mL<LoNs'6,'85`\"\n    \"0?t/'_U59@]ddF<#LdF<eWdF<OuN/45rY<-L@&#+fm>69=Lb,OcZV/);TTm8VI;?%OtJ<(b4mq7M6:u?KRdF<gR@2L=FNU-<b[(9c/ML3m;Z[$oF3g)GAWqpARc=<ROu7cL5l;-[A]%/\"\n    \"+fsd;l#SafT/f*W]0=O'$(Tb<[)*@e775R-:Yob%g*>l*:xP?Yb.5)%w_I?7uk5JC+FS(m#i'k.'a0i)9<7b'fs'59hq$*5Uhv##pi^8+hIEBF`nvo`;'l0.^S1<-wUK2/Coh58KKhLj\"\n    \"M=SO*rfO`+qC`W-On.=AJ56>>i2@2LH6A:&5q`?9I3@@'04&p2/LVa*T-4<-i3;M9UvZd+N7>b*eIwg:CC)c<>nO&#<IGe;__.thjZl<%w(Wk2xmp4Q@I#I9,DF]u7-P=.-_:YJ]aS@V\"\n    \"?6*C()dOp7:WL,b&3Rg/.cmM9&r^>$(>.Z-I&J(Q0Hd5Q%7Co-b`-c<N(6r@ip+AurK<m86QIth*#v;-OBqi+L7wDE-Ir8K['m+DDSLwK&/.?-V%U_%3:qKNu$_b*B-kp7NaD'QdWQPK\"\n    \"Yq[@>P)hI;*_F]u`Rb[.j8_Q/<&>uu+VsH$sM9TA%?)(vmJ80),P7E>)tjD%2L=-t#fK[%`v=Q8<FfNkgg^oIbah*#8/Qt$F&:K*-(N/'+1vMB,u()-a.VUU*#[e%gAAO(S>WlA2);Sa\"\n    \">gXm8YB`1d@K#n]76-a$U,mF<fX]idqd)<3,]J7JmW4`6]uks=4-72L(jEk+:bJ0M^q-8Dm_Z?0olP1C9Sa&H[d&c$ooQUj]Exd*3ZM@-WGW2%s',B-_M%>%Ul:#/'xoFM9QX-$.QN'>\"\n    \"[%$Z$uF6pA6Ki2O5:8w*vP1<-1`[G,)-m#>0`P&#eb#.3i)rtB61(o'$?X3B</R90;eZ]%Ncq;-Tl]#F>2Qft^ae_5tKL9MUe9b*sLEQ95C&`=G?@Mj=wh*'3E>=-<)Gt*Iw)'QG:`@I\"\n    \"wOf7&]1i'S01B+Ev/Nac#9S;=;YQpg_6U`*kVY39xK,[/6Aj7:'1Bm-_1EYfa1+o&o4hp7KN_Q(OlIo@S%;jVdn0'1<Vc52=u`3^o-n1'g4v58Hj&6_t7$##?M)c<$bgQ_'SY((-xkA#\"\n    \"Y(,p'H9rIVY-b,'%bCPF7.J<Up^,(dU1VY*5#WkTU>h19w,WQhLI)3S#f$2(eb,jr*b;3Vw]*7NH%$c4Vs,eD9>XW8?N]o+(*pgC%/72LV-u<Hp,3@e^9UB1J+ak9-TN/mhKPg+AJYd$\"\n    \"MlvAF_jCK*.O-^(63adMT->W%iewS8W6m2rtCpo'RS1R84=@paTKt)>=%&1[)*vp'u+x,VrwN;&]kuO9JDbg=pO$J*.jVe;u'm0dr9l,<*wMK*Oe=g8lV_KEBFkO'oU]^=[-792#ok,)\"\n    \"i]lR8qQ2oA8wcRCZ^7w/Njh;?.stX?Q1>S1q4Bn$)K1<-rGdO'$Wr.Lc.CG)$/*JL4tNR/,SVO3,aUw'DJN:)Ss;wGn9A32ijw%FL+Z0Fn.U9;reSq)bmI32U==5ALuG&#Vf1398/pVo\"\n    \"1*c-(aY168o<`JsSbk-,1N;$>0:OUas(3:8Z972LSfF8eb=c-;>SPw7.6hn3m`9^Xkn(r.qS[0;T%&Qc=+STRxX'q1BNk3&*eu2;&8q$&x>Q#Q7^Tf+6<(d%ZVmj2bDi%.3L2n+4W'$P\"\n    \"iDDG)g,r%+?,$@?uou5tSe2aN_AQU*<h`e-GI7)?OK2A.d7_c)?wQ5AS@DL3r#7fSkgl6-++D:'A,uq7SvlB$pcpH'q3n0#_%dY#xCpr-l<F0NR@-##FEV6NTF6##$l84N1w?AO>'IAO\"\n    \"URQ##V^Fv-XFbGM7Fl(N<3DhLGF%q.1rC$#:T__&Pi68%0xi_&[qFJ(77j_&JWoF.V735&T,[R*:xFR*K5>>#`bW-?4Ne_&6Ne_&6Ne_&n`kr-#GJcM6X;uM6X;uM(.a..^2TkL%oR(#\"\n    \";u.T%fAr%4tJ8&><1=GHZ_+m9/#H1F^R#SC#*N=BA9(D?v[UiFY>>^8p,KKF.W]L29uLkLlu/+4T<XoIB&hx=T1PcDaB&;HH+-AFr?(m9HZV)FKS8JCw;SD=6[^/DZUL`EUDf]GGlG&>\"\n    \"w$)F./^n3+rlo+DB;5sIYGNk+i1t-69Jg--0pao7Sm#K)pdHW&;LuDNH@H>#/X-TI(;P>#,Gc>#0Su>#4`1?#8lC?#<xU?#@.i?#D:%@#HF7@#LRI@#P_[@#Tkn@#Xw*A#]-=A#a9OA#\"\n    \"d<F&#*;G##.GY##2Sl##6`($#:l:$#>xL$#B.`$#F:r$#JF.%#NR@%#R_R%#Vke%#Zww%#_-4&#3^Rh%Sflr-k'MS.o?.5/sWel/wpEM0%3'/1)K^f1-d>G21&v(35>V`39V7A4=onx4\"\n    \"A1OY5EI0;6Ibgr6M$HS7Q<)58C5w,;WoA*#[%T*#`1g*#d=#+#hI5+#lUG+#pbY+#tnl+#x$),#&1;,#*=M,#.I`,#2Ur,#6b.-#;w[H#iQtA#m^0B#qjBB#uvTB##-hB#'9$C#+E6C#\"\n    \"/QHC#3^ZC#7jmC#;v)D#?,<D#C8ND#GDaD#KPsD#O]/E#g1A5#KA*1#gC17#MGd;#8(02#L-d3#rWM4#Hga1#,<w0#T.j<#O#'2#CYN1#qa^:#_4m3#o@/=#eG8=#t8J5#`+78#4uI-#\"\n    \"m3B2#SB[8#Q0@8#i[*9#iOn8#1Nm;#^sN9#qh<9#:=x-#P;K2#$%X9#bC+.#Rg;<#mN=.#MTF.#RZO.#2?)4#Y#(/#[)1/#b;L/#dAU/#0Sv;#lY$0#n`-0#sf60#(F24#wrH0#%/e0#\"\n    \"TmD<#%JSMFove:CTBEXI:<eh2g)B,3h2^G3i;#d3jD>)4kMYD4lVu`4m`:&5niUA5@(A5BA1]PBB:xlBCC=2CDLXMCEUtiCf&0g2'tN?PGT4CPGT4CPGT4CPGT4CPGT4CPGT4CPGT4CP\"\n    \"GT4CPGT4CPGT4CPGT4CPGT4CPGT4CP-qekC`.9kEg^+F$kwViFJTB&5KTB&5KTB&5KTB&5KTB&5KTB&5KTB&5KTB&5KTB&5KTB&5KTB&5KTB&5KTB&5KTB&5KTB&5o,^<-28ZI'O?;xp\"\n    \"O?;xpO?;xpO?;xpO?;xpO?;xpO?;xpO?;xpO?;xpO?;xpO?;xpO?;xpO?;xpO?;xp;7q-#lLYI:xvD=#\";\n\n#endif /* NK_INCLUDE_DEFAULT_FONT */\n\n#define NK_CURSOR_DATA_W 90\n#define NK_CURSOR_DATA_H 27\nNK_GLOBAL const char nk_custom_cursor_data[NK_CURSOR_DATA_W * NK_CURSOR_DATA_H + 1] =\n{\n    \"..-         -XXXXXXX-    X    -           X           -XXXXXXX          -          XXXXXXX\"\n    \"..-         -X.....X-   X.X   -          X.X          -X.....X          -          X.....X\"\n    \"---         -XXX.XXX-  X...X  -         X...X         -X....X           -           X....X\"\n    \"X           -  X.X  - X.....X -        X.....X        -X...X            -            X...X\"\n    \"XX          -  X.X  -X.......X-       X.......X       -X..X.X           -           X.X..X\"\n    \"X.X         -  X.X  -XXXX.XXXX-       XXXX.XXXX       -X.X X.X          -          X.X X.X\"\n    \"X..X        -  X.X  -   X.X   -          X.X          -XX   X.X         -         X.X   XX\"\n    \"X...X       -  X.X  -   X.X   -    XX    X.X    XX    -      X.X        -        X.X      \"\n    \"X....X      -  X.X  -   X.X   -   X.X    X.X    X.X   -       X.X       -       X.X       \"\n    \"X.....X     -  X.X  -   X.X   -  X..X    X.X    X..X  -        X.X      -      X.X        \"\n    \"X......X    -  X.X  -   X.X   - X...XXXXXX.XXXXXX...X -         X.X   XX-XX   X.X         \"\n    \"X.......X   -  X.X  -   X.X   -X.....................X-          X.X X.X-X.X X.X          \"\n    \"X........X  -  X.X  -   X.X   - X...XXXXXX.XXXXXX...X -           X.X..X-X..X.X           \"\n    \"X.........X -XXX.XXX-   X.X   -  X..X    X.X    X..X  -            X...X-X...X            \"\n    \"X..........X-X.....X-   X.X   -   X.X    X.X    X.X   -           X....X-X....X           \"\n    \"X......XXXXX-XXXXXXX-   X.X   -    XX    X.X    XX    -          X.....X-X.....X          \"\n    \"X...X..X    ---------   X.X   -          X.X          -          XXXXXXX-XXXXXXX          \"\n    \"X..X X..X   -       -XXXX.XXXX-       XXXX.XXXX       ------------------------------------\"\n    \"X.X  X..X   -       -X.......X-       X.......X       -    XX           XX    -           \"\n    \"XX    X..X  -       - X.....X -        X.....X        -   X.X           X.X   -           \"\n    \"      X..X          -  X...X  -         X...X         -  X..X           X..X  -           \"\n    \"       XX           -   X.X   -          X.X          - X...XXXXXXXXXXXXX...X -           \"\n    \"------------        -    X    -           X           -X.....................X-           \"\n    \"                    ----------------------------------- X...XXXXXXXXXXXXX...X -           \"\n    \"                                                      -  X..X           X..X  -           \"\n    \"                                                      -   X.X           X.X   -           \"\n    \"                                                      -    XX           XX    -           \"\n};\n\n#ifdef __clang__\n#pragma clang diagnostic pop\n#elif defined(__GNUC__) || defined(__GNUG__)\n#pragma GCC diagnostic pop\n#endif\n\nNK_GLOBAL unsigned char *nk__barrier;\nNK_GLOBAL unsigned char *nk__barrier2;\nNK_GLOBAL unsigned char *nk__barrier3;\nNK_GLOBAL unsigned char *nk__barrier4;\nNK_GLOBAL unsigned char *nk__dout;\n\nNK_INTERN unsigned int\nnk_decompress_length(unsigned char *input)\n{\n    return (unsigned int)((input[8] << 24) + (input[9] << 16) + (input[10] << 8) + input[11]);\n}\nNK_INTERN void\nnk__match(unsigned char *data, unsigned int length)\n{\n    /* INVERSE of memmove... write each byte before copying the next...*/\n    NK_ASSERT (nk__dout + length <= nk__barrier);\n    if (nk__dout + length > nk__barrier) { nk__dout += length; return; }\n    if (data < nk__barrier4) { nk__dout = nk__barrier+1; return; }\n    while (length--) *nk__dout++ = *data++;\n}\nNK_INTERN void\nnk__lit(unsigned char *data, unsigned int length)\n{\n    NK_ASSERT (nk__dout + length <= nk__barrier);\n    if (nk__dout + length > nk__barrier) { nk__dout += length; return; }\n    if (data < nk__barrier2) { nk__dout = nk__barrier+1; return; }\n    NK_MEMCPY(nk__dout, data, length);\n    nk__dout += length;\n}\nNK_INTERN unsigned char*\nnk_decompress_token(unsigned char *i)\n{\n    #define nk__in2(x)   ((i[x] << 8) + i[(x)+1])\n    #define nk__in3(x)   ((i[x] << 16) + nk__in2((x)+1))\n    #define nk__in4(x)   ((i[x] << 24) + nk__in3((x)+1))\n\n    if (*i >= 0x20) { /* use fewer if's for cases that expand small */\n        if (*i >= 0x80)       nk__match(nk__dout-i[1]-1, (unsigned int)i[0] - 0x80 + 1), i += 2;\n        else if (*i >= 0x40)  nk__match(nk__dout-(nk__in2(0) - 0x4000 + 1), (unsigned int)i[2]+1), i += 3;\n        else /* *i >= 0x20 */ nk__lit(i+1, (unsigned int)i[0] - 0x20 + 1), i += 1 + (i[0] - 0x20 + 1);\n    } else { /* more ifs for cases that expand large, since overhead is amortized */\n        if (*i >= 0x18)       nk__match(nk__dout-(unsigned int)(nk__in3(0) - 0x180000 + 1), (unsigned int)i[3]+1), i += 4;\n        else if (*i >= 0x10)  nk__match(nk__dout-(unsigned int)(nk__in3(0) - 0x100000 + 1), (unsigned int)nk__in2(3)+1), i += 5;\n        else if (*i >= 0x08)  nk__lit(i+2, (unsigned int)nk__in2(0) - 0x0800 + 1), i += 2 + (nk__in2(0) - 0x0800 + 1);\n        else if (*i == 0x07)  nk__lit(i+3, (unsigned int)nk__in2(1) + 1), i += 3 + (nk__in2(1) + 1);\n        else if (*i == 0x06)  nk__match(nk__dout-(unsigned int)(nk__in3(1)+1), i[4]+1u), i += 5;\n        else if (*i == 0x04)  nk__match(nk__dout-(unsigned int)(nk__in3(1)+1), (unsigned int)nk__in2(4)+1u), i += 6;\n    }\n    return i;\n}\nNK_INTERN unsigned int\nnk_adler32(unsigned int adler32, unsigned char *buffer, unsigned int buflen)\n{\n    const unsigned long ADLER_MOD = 65521;\n    unsigned long s1 = adler32 & 0xffff, s2 = adler32 >> 16;\n    unsigned long blocklen, i;\n\n    blocklen = buflen % 5552;\n    while (buflen) {\n        for (i=0; i + 7 < blocklen; i += 8) {\n            s1 += buffer[0]; s2 += s1;\n            s1 += buffer[1]; s2 += s1;\n            s1 += buffer[2]; s2 += s1;\n            s1 += buffer[3]; s2 += s1;\n            s1 += buffer[4]; s2 += s1;\n            s1 += buffer[5]; s2 += s1;\n            s1 += buffer[6]; s2 += s1;\n            s1 += buffer[7]; s2 += s1;\n            buffer += 8;\n        }\n        for (; i < blocklen; ++i) {\n            s1 += *buffer++; s2 += s1;\n        }\n\n        s1 %= ADLER_MOD; s2 %= ADLER_MOD;\n        buflen -= (unsigned int)blocklen;\n        blocklen = 5552;\n    }\n    return (unsigned int)(s2 << 16) + (unsigned int)s1;\n}\nNK_INTERN unsigned int\nnk_decompress(unsigned char *output, unsigned char *i, unsigned int length)\n{\n    unsigned int olen;\n    if (nk__in4(0) != 0x57bC0000) return 0;\n    if (nk__in4(4) != 0)          return 0; /* error! stream is > 4GB */\n    olen = nk_decompress_length(i);\n    nk__barrier2 = i;\n    nk__barrier3 = i+length;\n    nk__barrier = output + olen;\n    nk__barrier4 = output;\n    i += 16;\n\n    nk__dout = output;\n    for (;;) {\n        unsigned char *old_i = i;\n        i = nk_decompress_token(i);\n        if (i == old_i) {\n            if (*i == 0x05 && i[1] == 0xfa) {\n                NK_ASSERT(nk__dout == output + olen);\n                if (nk__dout != output + olen) return 0;\n                if (nk_adler32(1, output, olen) != (unsigned int) nk__in4(2))\n                    return 0;\n                return olen;\n            } else {\n                NK_ASSERT(0); /* NOTREACHED */\n                return 0;\n            }\n        }\n        NK_ASSERT(nk__dout <= output + olen);\n        if (nk__dout > output + olen)\n            return 0;\n    }\n}\nNK_INTERN unsigned int\nnk_decode_85_byte(char c)\n{\n    return (unsigned int)((c >= '\\\\') ? c-36 : c-35);\n}\nNK_INTERN void\nnk_decode_85(unsigned char* dst, const unsigned char* src)\n{\n    while (*src)\n    {\n        unsigned int tmp =\n            nk_decode_85_byte((char)src[0]) +\n            85 * (nk_decode_85_byte((char)src[1]) +\n            85 * (nk_decode_85_byte((char)src[2]) +\n            85 * (nk_decode_85_byte((char)src[3]) +\n            85 * nk_decode_85_byte((char)src[4]))));\n\n        /* we can't assume little-endianess. */\n        dst[0] = (unsigned char)((tmp >> 0) & 0xFF);\n        dst[1] = (unsigned char)((tmp >> 8) & 0xFF);\n        dst[2] = (unsigned char)((tmp >> 16) & 0xFF);\n        dst[3] = (unsigned char)((tmp >> 24) & 0xFF);\n\n        src += 5;\n        dst += 4;\n    }\n}\n\n/* -------------------------------------------------------------\n *\n *                          FONT ATLAS\n *\n * --------------------------------------------------------------*/\nNK_API struct nk_font_config\nnk_font_config(float pixel_height)\n{\n    struct nk_font_config cfg;\n    nk_zero_struct(cfg);\n    cfg.ttf_blob = 0;\n    cfg.ttf_size = 0;\n    cfg.ttf_data_owned_by_atlas = 0;\n    cfg.size = pixel_height;\n    cfg.oversample_h = 3;\n    cfg.oversample_v = 1;\n    cfg.pixel_snap = 0;\n    cfg.coord_type = NK_COORD_UV;\n    cfg.spacing = nk_vec2(0,0);\n    cfg.range = nk_font_default_glyph_ranges();\n    cfg.merge_mode = 0;\n    cfg.fallback_glyph = '?';\n    cfg.font = 0;\n    cfg.n = 0;\n    return cfg;\n}\n#ifdef NK_INCLUDE_DEFAULT_ALLOCATOR\nNK_API void\nnk_font_atlas_init_default(struct nk_font_atlas *atlas)\n{\n    NK_ASSERT(atlas);\n    if (!atlas) return;\n    nk_zero_struct(*atlas);\n    atlas->temporary.userdata.ptr = 0;\n    atlas->temporary.alloc = nk_malloc;\n    atlas->temporary.free = nk_mfree;\n    atlas->permanent.userdata.ptr = 0;\n    atlas->permanent.alloc = nk_malloc;\n    atlas->permanent.free = nk_mfree;\n}\n#endif\nNK_API void\nnk_font_atlas_init(struct nk_font_atlas *atlas, struct nk_allocator *alloc)\n{\n    NK_ASSERT(atlas);\n    NK_ASSERT(alloc);\n    if (!atlas || !alloc) return;\n    nk_zero_struct(*atlas);\n    atlas->permanent = *alloc;\n    atlas->temporary = *alloc;\n}\nNK_API void\nnk_font_atlas_init_custom(struct nk_font_atlas *atlas,\n    struct nk_allocator *permanent, struct nk_allocator *temporary)\n{\n    NK_ASSERT(atlas);\n    NK_ASSERT(permanent);\n    NK_ASSERT(temporary);\n    if (!atlas || !permanent || !temporary) return;\n    nk_zero_struct(*atlas);\n    atlas->permanent = *permanent;\n    atlas->temporary = *temporary;\n}\nNK_API void\nnk_font_atlas_begin(struct nk_font_atlas *atlas)\n{\n    NK_ASSERT(atlas);\n    NK_ASSERT(atlas->temporary.alloc && atlas->temporary.free);\n    NK_ASSERT(atlas->permanent.alloc && atlas->permanent.free);\n    if (!atlas || !atlas->permanent.alloc || !atlas->permanent.free ||\n        !atlas->temporary.alloc || !atlas->temporary.free) return;\n    if (atlas->glyphs) {\n        atlas->permanent.free(atlas->permanent.userdata, atlas->glyphs);\n        atlas->glyphs = 0;\n    }\n    if (atlas->pixel) {\n        atlas->permanent.free(atlas->permanent.userdata, atlas->pixel);\n        atlas->pixel = 0;\n    }\n}\nNK_API struct nk_font*\nnk_font_atlas_add(struct nk_font_atlas *atlas, const struct nk_font_config *config)\n{\n    struct nk_font *font = 0;\n    struct nk_font_config *cfg;\n\n    NK_ASSERT(atlas);\n    NK_ASSERT(atlas->permanent.alloc);\n    NK_ASSERT(atlas->permanent.free);\n    NK_ASSERT(atlas->temporary.alloc);\n    NK_ASSERT(atlas->temporary.free);\n\n    NK_ASSERT(config);\n    NK_ASSERT(config->ttf_blob);\n    NK_ASSERT(config->ttf_size);\n    NK_ASSERT(config->size > 0.0f);\n\n    if (!atlas || !config || !config->ttf_blob || !config->ttf_size || config->size <= 0.0f||\n        !atlas->permanent.alloc || !atlas->permanent.free ||\n        !atlas->temporary.alloc || !atlas->temporary.free)\n        return 0;\n\n    /* allocate font config  */\n    cfg = (struct nk_font_config*)\n        atlas->permanent.alloc(atlas->permanent.userdata,0, sizeof(struct nk_font_config));\n    NK_MEMCPY(cfg, config, sizeof(*config));\n    cfg->n = cfg;\n    cfg->p = cfg;\n\n    if (!config->merge_mode) {\n        /* insert font config into list */\n        if (!atlas->config) {\n            atlas->config = cfg;\n            cfg->next = 0;\n        } else {\n            struct nk_font_config *i = atlas->config;\n            while (i->next) i = i->next;\n            i->next = cfg;\n            cfg->next = 0;\n        }\n        /* allocate new font */\n        font = (struct nk_font*)\n            atlas->permanent.alloc(atlas->permanent.userdata,0, sizeof(struct nk_font));\n        NK_ASSERT(font);\n        nk_zero(font, sizeof(*font));\n        if (!font) return 0;\n        font->config = cfg;\n\n        /* insert font into list */\n        if (!atlas->fonts) {\n            atlas->fonts = font;\n            font->next = 0;\n        } else {\n            struct nk_font *i = atlas->fonts;\n            while (i->next) i = i->next;\n            i->next = font;\n            font->next = 0;\n        }\n        cfg->font = &font->info;\n    } else {\n        /* extend previously added font */\n        struct nk_font *f = 0;\n        struct nk_font_config *c = 0;\n        NK_ASSERT(atlas->font_num);\n        f = atlas->fonts;\n        c = f->config;\n        cfg->font = &f->info;\n\n        cfg->n = c;\n        cfg->p = c->p;\n        c->p->n = cfg;\n        c->p = cfg;\n    }\n    /* create own copy of .TTF font blob */\n    if (!config->ttf_data_owned_by_atlas) {\n        cfg->ttf_blob = atlas->permanent.alloc(atlas->permanent.userdata,0, cfg->ttf_size);\n        NK_ASSERT(cfg->ttf_blob);\n        if (!cfg->ttf_blob) {\n            atlas->font_num++;\n            return 0;\n        }\n        NK_MEMCPY(cfg->ttf_blob, config->ttf_blob, cfg->ttf_size);\n        cfg->ttf_data_owned_by_atlas = 1;\n    }\n    atlas->font_num++;\n    return font;\n}\nNK_API struct nk_font*\nnk_font_atlas_add_from_memory(struct nk_font_atlas *atlas, void *memory,\n    nk_size size, float height, const struct nk_font_config *config)\n{\n    struct nk_font_config cfg;\n    NK_ASSERT(memory);\n    NK_ASSERT(size);\n\n    NK_ASSERT(atlas);\n    NK_ASSERT(atlas->temporary.alloc);\n    NK_ASSERT(atlas->temporary.free);\n    NK_ASSERT(atlas->permanent.alloc);\n    NK_ASSERT(atlas->permanent.free);\n    if (!atlas || !atlas->temporary.alloc || !atlas->temporary.free || !memory || !size ||\n        !atlas->permanent.alloc || !atlas->permanent.free)\n        return 0;\n\n    cfg = (config) ? *config: nk_font_config(height);\n    cfg.ttf_blob = memory;\n    cfg.ttf_size = size;\n    cfg.size = height;\n    cfg.ttf_data_owned_by_atlas = 0;\n    return nk_font_atlas_add(atlas, &cfg);\n}\n#ifdef NK_INCLUDE_STANDARD_IO\nNK_API struct nk_font*\nnk_font_atlas_add_from_file(struct nk_font_atlas *atlas, const char *file_path,\n    float height, const struct nk_font_config *config)\n{\n    nk_size size;\n    char *memory;\n    struct nk_font_config cfg;\n\n    NK_ASSERT(atlas);\n    NK_ASSERT(atlas->temporary.alloc);\n    NK_ASSERT(atlas->temporary.free);\n    NK_ASSERT(atlas->permanent.alloc);\n    NK_ASSERT(atlas->permanent.free);\n\n    if (!atlas || !file_path) return 0;\n    memory = nk_file_load(file_path, &size, &atlas->permanent);\n    if (!memory) return 0;\n\n    cfg = (config) ? *config: nk_font_config(height);\n    cfg.ttf_blob = memory;\n    cfg.ttf_size = size;\n    cfg.size = height;\n    cfg.ttf_data_owned_by_atlas = 1;\n    return nk_font_atlas_add(atlas, &cfg);\n}\n#endif\nNK_API struct nk_font*\nnk_font_atlas_add_compressed(struct nk_font_atlas *atlas,\n    void *compressed_data, nk_size compressed_size, float height,\n    const struct nk_font_config *config)\n{\n    unsigned int decompressed_size;\n    void *decompressed_data;\n    struct nk_font_config cfg;\n\n    NK_ASSERT(atlas);\n    NK_ASSERT(atlas->temporary.alloc);\n    NK_ASSERT(atlas->temporary.free);\n    NK_ASSERT(atlas->permanent.alloc);\n    NK_ASSERT(atlas->permanent.free);\n\n    NK_ASSERT(compressed_data);\n    NK_ASSERT(compressed_size);\n    if (!atlas || !compressed_data || !atlas->temporary.alloc || !atlas->temporary.free ||\n        !atlas->permanent.alloc || !atlas->permanent.free)\n        return 0;\n\n    decompressed_size = nk_decompress_length((unsigned char*)compressed_data);\n    decompressed_data = atlas->permanent.alloc(atlas->permanent.userdata,0,decompressed_size);\n    NK_ASSERT(decompressed_data);\n    if (!decompressed_data) return 0;\n    nk_decompress((unsigned char*)decompressed_data, (unsigned char*)compressed_data,\n        (unsigned int)compressed_size);\n\n    cfg = (config) ? *config: nk_font_config(height);\n    cfg.ttf_blob = decompressed_data;\n    cfg.ttf_size = decompressed_size;\n    cfg.size = height;\n    cfg.ttf_data_owned_by_atlas = 1;\n    return nk_font_atlas_add(atlas, &cfg);\n}\nNK_API struct nk_font*\nnk_font_atlas_add_compressed_base85(struct nk_font_atlas *atlas,\n    const char *data_base85, float height, const struct nk_font_config *config)\n{\n    int compressed_size;\n    void *compressed_data;\n    struct nk_font *font;\n\n    NK_ASSERT(atlas);\n    NK_ASSERT(atlas->temporary.alloc);\n    NK_ASSERT(atlas->temporary.free);\n    NK_ASSERT(atlas->permanent.alloc);\n    NK_ASSERT(atlas->permanent.free);\n\n    NK_ASSERT(data_base85);\n    if (!atlas || !data_base85 || !atlas->temporary.alloc || !atlas->temporary.free ||\n        !atlas->permanent.alloc || !atlas->permanent.free)\n        return 0;\n\n    compressed_size = (((int)nk_strlen(data_base85) + 4) / 5) * 4;\n    compressed_data = atlas->temporary.alloc(atlas->temporary.userdata,0, (nk_size)compressed_size);\n    NK_ASSERT(compressed_data);\n    if (!compressed_data) return 0;\n    nk_decode_85((unsigned char*)compressed_data, (const unsigned char*)data_base85);\n    font = nk_font_atlas_add_compressed(atlas, compressed_data,\n                    (nk_size)compressed_size, height, config);\n    atlas->temporary.free(atlas->temporary.userdata, compressed_data);\n    return font;\n}\n\n#ifdef NK_INCLUDE_DEFAULT_FONT\nNK_API struct nk_font*\nnk_font_atlas_add_default(struct nk_font_atlas *atlas,\n    float pixel_height, const struct nk_font_config *config)\n{\n    NK_ASSERT(atlas);\n    NK_ASSERT(atlas->temporary.alloc);\n    NK_ASSERT(atlas->temporary.free);\n    NK_ASSERT(atlas->permanent.alloc);\n    NK_ASSERT(atlas->permanent.free);\n    return nk_font_atlas_add_compressed_base85(atlas,\n        nk_proggy_clean_ttf_compressed_data_base85, pixel_height, config);\n}\n#endif\nNK_API const void*\nnk_font_atlas_bake(struct nk_font_atlas *atlas, int *width, int *height,\n    enum nk_font_atlas_format fmt)\n{\n    int i = 0;\n    void *tmp = 0;\n    nk_size tmp_size, img_size;\n    struct nk_font *font_iter;\n    struct nk_font_baker *baker;\n\n    NK_ASSERT(atlas);\n    NK_ASSERT(atlas->temporary.alloc);\n    NK_ASSERT(atlas->temporary.free);\n    NK_ASSERT(atlas->permanent.alloc);\n    NK_ASSERT(atlas->permanent.free);\n\n    NK_ASSERT(width);\n    NK_ASSERT(height);\n    if (!atlas || !width || !height ||\n        !atlas->temporary.alloc || !atlas->temporary.free ||\n        !atlas->permanent.alloc || !atlas->permanent.free)\n        return 0;\n\n#ifdef NK_INCLUDE_DEFAULT_FONT\n    /* no font added so just use default font */\n    if (!atlas->font_num)\n        atlas->default_font = nk_font_atlas_add_default(atlas, 13.0f, 0);\n#endif\n    NK_ASSERT(atlas->font_num);\n    if (!atlas->font_num) return 0;\n\n    /* allocate temporary baker memory required for the baking process */\n    nk_font_baker_memory(&tmp_size, &atlas->glyph_count, atlas->config, atlas->font_num);\n    tmp = atlas->temporary.alloc(atlas->temporary.userdata,0, tmp_size);\n    NK_ASSERT(tmp);\n    if (!tmp) goto failed;\n\n    /* allocate glyph memory for all fonts */\n    baker = nk_font_baker(tmp, atlas->glyph_count, atlas->font_num, &atlas->temporary);\n    atlas->glyphs = (struct nk_font_glyph*)atlas->permanent.alloc(\n        atlas->permanent.userdata,0, sizeof(struct nk_font_glyph)*(nk_size)atlas->glyph_count);\n    NK_ASSERT(atlas->glyphs);\n    if (!atlas->glyphs)\n        goto failed;\n\n    /* pack all glyphs into a tight fit space */\n    atlas->custom.w = (NK_CURSOR_DATA_W*2)+1;\n    atlas->custom.h = NK_CURSOR_DATA_H + 1;\n    if (!nk_font_bake_pack(baker, &img_size, width, height, &atlas->custom,\n        atlas->config, atlas->font_num, &atlas->temporary))\n        goto failed;\n\n    /* allocate memory for the baked image font atlas */\n    atlas->pixel = atlas->temporary.alloc(atlas->temporary.userdata,0, img_size);\n    NK_ASSERT(atlas->pixel);\n    if (!atlas->pixel)\n        goto failed;\n\n    /* bake glyphs and custom white pixel into image */\n    nk_font_bake(baker, atlas->pixel, *width, *height,\n        atlas->glyphs, atlas->glyph_count, atlas->config, atlas->font_num);\n    nk_font_bake_custom_data(atlas->pixel, *width, *height, atlas->custom,\n            nk_custom_cursor_data, NK_CURSOR_DATA_W, NK_CURSOR_DATA_H, '.', 'X');\n\n    if (fmt == NK_FONT_ATLAS_RGBA32) {\n        /* convert alpha8 image into rgba32 image */\n        void *img_rgba = atlas->temporary.alloc(atlas->temporary.userdata,0,\n                            (nk_size)(*width * *height * 4));\n        NK_ASSERT(img_rgba);\n        if (!img_rgba) goto failed;\n        nk_font_bake_convert(img_rgba, *width, *height, atlas->pixel);\n        atlas->temporary.free(atlas->temporary.userdata, atlas->pixel);\n        atlas->pixel = img_rgba;\n    }\n    atlas->tex_width = *width;\n    atlas->tex_height = *height;\n\n    /* initialize each font */\n    for (font_iter = atlas->fonts; font_iter; font_iter = font_iter->next) {\n        struct nk_font *font = font_iter;\n        struct nk_font_config *config = font->config;\n        nk_font_init(font, config->size, config->fallback_glyph, atlas->glyphs,\n            config->font, nk_handle_ptr(0));\n    }\n\n    /* initialize each cursor */\n    {NK_STORAGE const struct nk_vec2 nk_cursor_data[NK_CURSOR_COUNT][3] = {\n        /* Pos      Size        Offset */\n        {{ 0, 3},   {12,19},    { 0, 0}},\n        {{13, 0},   { 7,16},    { 4, 8}},\n        {{31, 0},   {23,23},    {11,11}},\n        {{21, 0},   { 9, 23},   { 5,11}},\n        {{55,18},   {23, 9},    {11, 5}},\n        {{73, 0},   {17,17},    { 9, 9}},\n        {{55, 0},   {17,17},    { 9, 9}}\n    };\n    for (i = 0; i < NK_CURSOR_COUNT; ++i) {\n        struct nk_cursor *cursor = &atlas->cursors[i];\n        cursor->img.w = (unsigned short)*width;\n        cursor->img.h = (unsigned short)*height;\n        cursor->img.region[0] = (unsigned short)(atlas->custom.x + nk_cursor_data[i][0].x);\n        cursor->img.region[1] = (unsigned short)(atlas->custom.y + nk_cursor_data[i][0].y);\n        cursor->img.region[2] = (unsigned short)nk_cursor_data[i][1].x;\n        cursor->img.region[3] = (unsigned short)nk_cursor_data[i][1].y;\n        cursor->size = nk_cursor_data[i][1];\n        cursor->offset = nk_cursor_data[i][2];\n    }}\n    /* free temporary memory */\n    atlas->temporary.free(atlas->temporary.userdata, tmp);\n    return atlas->pixel;\n\nfailed:\n    /* error so cleanup all memory */\n    if (tmp) atlas->temporary.free(atlas->temporary.userdata, tmp);\n    if (atlas->glyphs) {\n        atlas->permanent.free(atlas->permanent.userdata, atlas->glyphs);\n        atlas->glyphs = 0;\n    }\n    if (atlas->pixel) {\n        atlas->temporary.free(atlas->temporary.userdata, atlas->pixel);\n        atlas->pixel = 0;\n    }\n    return 0;\n}\nNK_API void\nnk_font_atlas_end(struct nk_font_atlas *atlas, nk_handle texture,\n    struct nk_draw_null_texture *null)\n{\n    int i = 0;\n    struct nk_font *font_iter;\n    NK_ASSERT(atlas);\n    if (!atlas) {\n        if (!null) return;\n        null->texture = texture;\n        null->uv = nk_vec2(0.5f,0.5f);\n    }\n    if (null) {\n        null->texture = texture;\n        null->uv.x = (atlas->custom.x + 0.5f)/(float)atlas->tex_width;\n        null->uv.y = (atlas->custom.y + 0.5f)/(float)atlas->tex_height;\n    }\n    for (font_iter = atlas->fonts; font_iter; font_iter = font_iter->next) {\n        font_iter->texture = texture;\n#ifdef NK_INCLUDE_VERTEX_BUFFER_OUTPUT\n        font_iter->handle.texture = texture;\n#endif\n    }\n    for (i = 0; i < NK_CURSOR_COUNT; ++i)\n        atlas->cursors[i].img.handle = texture;\n\n    atlas->temporary.free(atlas->temporary.userdata, atlas->pixel);\n    atlas->pixel = 0;\n    atlas->tex_width = 0;\n    atlas->tex_height = 0;\n    atlas->custom.x = 0;\n    atlas->custom.y = 0;\n    atlas->custom.w = 0;\n    atlas->custom.h = 0;\n}\nNK_API void\nnk_font_atlas_cleanup(struct nk_font_atlas *atlas)\n{\n    NK_ASSERT(atlas);\n    NK_ASSERT(atlas->temporary.alloc);\n    NK_ASSERT(atlas->temporary.free);\n    NK_ASSERT(atlas->permanent.alloc);\n    NK_ASSERT(atlas->permanent.free);\n    if (!atlas || !atlas->permanent.alloc || !atlas->permanent.free) return;\n    if (atlas->config) {\n        struct nk_font_config *iter;\n        for (iter = atlas->config; iter; iter = iter->next) {\n            struct nk_font_config *i;\n            for (i = iter->n; i != iter; i = i->n) {\n                atlas->permanent.free(atlas->permanent.userdata, i->ttf_blob);\n                i->ttf_blob = 0;\n            }\n            atlas->permanent.free(atlas->permanent.userdata, iter->ttf_blob);\n            iter->ttf_blob = 0;\n        }\n    }\n}\nNK_API void\nnk_font_atlas_clear(struct nk_font_atlas *atlas)\n{\n    NK_ASSERT(atlas);\n    NK_ASSERT(atlas->temporary.alloc);\n    NK_ASSERT(atlas->temporary.free);\n    NK_ASSERT(atlas->permanent.alloc);\n    NK_ASSERT(atlas->permanent.free);\n    if (!atlas || !atlas->permanent.alloc || !atlas->permanent.free) return;\n\n    if (atlas->config) {\n        struct nk_font_config *iter, *next;\n        for (iter = atlas->config; iter; iter = next) {\n            struct nk_font_config *i, *n;\n            for (i = iter->n; i != iter; i = n) {\n                n = i->n;\n                if (i->ttf_blob)\n                    atlas->permanent.free(atlas->permanent.userdata, i->ttf_blob);\n                atlas->permanent.free(atlas->permanent.userdata, i);\n            }\n            next = iter->next;\n            if (i->ttf_blob)\n                atlas->permanent.free(atlas->permanent.userdata, iter->ttf_blob);\n            atlas->permanent.free(atlas->permanent.userdata, iter);\n        }\n        atlas->config = 0;\n    }\n    if (atlas->fonts) {\n        struct nk_font *iter, *next;\n        for (iter = atlas->fonts; iter; iter = next) {\n            next = iter->next;\n            atlas->permanent.free(atlas->permanent.userdata, iter);\n        }\n        atlas->fonts = 0;\n    }\n    if (atlas->glyphs)\n        atlas->permanent.free(atlas->permanent.userdata, atlas->glyphs);\n    nk_zero_struct(*atlas);\n}\n#endif\n\n\n\n\n\n/* ===============================================================\n *\n *                          INPUT\n *\n * ===============================================================*/\nNK_API void\nnk_input_begin(struct nk_context *ctx)\n{\n    int i;\n    struct nk_input *in;\n    NK_ASSERT(ctx);\n    if (!ctx) return;\n    in = &ctx->input;\n    for (i = 0; i < NK_BUTTON_MAX; ++i)\n        in->mouse.buttons[i].clicked = 0;\n\n    in->keyboard.text_len = 0;\n    in->mouse.scroll_delta = nk_vec2(0,0);\n    in->mouse.prev.x = in->mouse.pos.x;\n    in->mouse.prev.y = in->mouse.pos.y;\n    in->mouse.delta.x = 0;\n    in->mouse.delta.y = 0;\n    for (i = 0; i < NK_KEY_MAX; i++)\n        in->keyboard.keys[i].clicked = 0;\n}\nNK_API void\nnk_input_end(struct nk_context *ctx)\n{\n    struct nk_input *in;\n    NK_ASSERT(ctx);\n    if (!ctx) return;\n    in = &ctx->input;\n    if (in->mouse.grab)\n        in->mouse.grab = 0;\n    if (in->mouse.ungrab) {\n        in->mouse.grabbed = 0;\n        in->mouse.ungrab = 0;\n        in->mouse.grab = 0;\n    }\n}\nNK_API void\nnk_input_motion(struct nk_context *ctx, int x, int y)\n{\n    struct nk_input *in;\n    NK_ASSERT(ctx);\n    if (!ctx) return;\n    in = &ctx->input;\n    in->mouse.pos.x = (float)x;\n    in->mouse.pos.y = (float)y;\n    in->mouse.delta.x = in->mouse.pos.x - in->mouse.prev.x;\n    in->mouse.delta.y = in->mouse.pos.y - in->mouse.prev.y;\n}\nNK_API void\nnk_input_key(struct nk_context *ctx, enum nk_keys key, int down)\n{\n    struct nk_input *in;\n    NK_ASSERT(ctx);\n    if (!ctx) return;\n    in = &ctx->input;\n    if (in->keyboard.keys[key].down != down)\n        in->keyboard.keys[key].clicked++;\n    in->keyboard.keys[key].down = down;\n}\nNK_API void\nnk_input_button(struct nk_context *ctx, enum nk_buttons id, int x, int y, int down)\n{\n    struct nk_mouse_button *btn;\n    struct nk_input *in;\n    NK_ASSERT(ctx);\n    if (!ctx) return;\n    in = &ctx->input;\n    if (in->mouse.buttons[id].down == down) return;\n\n    btn = &in->mouse.buttons[id];\n    btn->clicked_pos.x = (float)x;\n    btn->clicked_pos.y = (float)y;\n    btn->down = down;\n    btn->clicked++;\n}\nNK_API void\nnk_input_scroll(struct nk_context *ctx, struct nk_vec2 val)\n{\n    NK_ASSERT(ctx);\n    if (!ctx) return;\n    ctx->input.mouse.scroll_delta.x += val.x;\n    ctx->input.mouse.scroll_delta.y += val.y;\n}\nNK_API void\nnk_input_glyph(struct nk_context *ctx, const nk_glyph glyph)\n{\n    int len = 0;\n    nk_rune unicode;\n    struct nk_input *in;\n\n    NK_ASSERT(ctx);\n    if (!ctx) return;\n    in = &ctx->input;\n\n    len = nk_utf_decode(glyph, &unicode, NK_UTF_SIZE);\n    if (len && ((in->keyboard.text_len + len) < NK_INPUT_MAX)) {\n        nk_utf_encode(unicode, &in->keyboard.text[in->keyboard.text_len],\n            NK_INPUT_MAX - in->keyboard.text_len);\n        in->keyboard.text_len += len;\n    }\n}\nNK_API void\nnk_input_char(struct nk_context *ctx, char c)\n{\n    nk_glyph glyph;\n    NK_ASSERT(ctx);\n    if (!ctx) return;\n    glyph[0] = c;\n    nk_input_glyph(ctx, glyph);\n}\nNK_API void\nnk_input_unicode(struct nk_context *ctx, nk_rune unicode)\n{\n    nk_glyph rune;\n    NK_ASSERT(ctx);\n    if (!ctx) return;\n    nk_utf_encode(unicode, rune, NK_UTF_SIZE);\n    nk_input_glyph(ctx, rune);\n}\nNK_API int\nnk_input_has_mouse_click(const struct nk_input *i, enum nk_buttons id)\n{\n    const struct nk_mouse_button *btn;\n    if (!i) return nk_false;\n    btn = &i->mouse.buttons[id];\n    return (btn->clicked && btn->down == nk_false) ? nk_true : nk_false;\n}\nNK_API int\nnk_input_has_mouse_click_in_rect(const struct nk_input *i, enum nk_buttons id,\n    struct nk_rect b)\n{\n    const struct nk_mouse_button *btn;\n    if (!i) return nk_false;\n    btn = &i->mouse.buttons[id];\n    if (!NK_INBOX(btn->clicked_pos.x,btn->clicked_pos.y,b.x,b.y,b.w,b.h))\n        return nk_false;\n    return nk_true;\n}\nNK_API int\nnk_input_has_mouse_click_down_in_rect(const struct nk_input *i, enum nk_buttons id,\n    struct nk_rect b, int down)\n{\n    const struct nk_mouse_button *btn;\n    if (!i) return nk_false;\n    btn = &i->mouse.buttons[id];\n    return nk_input_has_mouse_click_in_rect(i, id, b) && (btn->down == down);\n}\nNK_API int\nnk_input_is_mouse_click_in_rect(const struct nk_input *i, enum nk_buttons id,\n    struct nk_rect b)\n{\n    const struct nk_mouse_button *btn;\n    if (!i) return nk_false;\n    btn = &i->mouse.buttons[id];\n    return (nk_input_has_mouse_click_down_in_rect(i, id, b, nk_false) &&\n            btn->clicked) ? nk_true : nk_false;\n}\nNK_API int\nnk_input_is_mouse_click_down_in_rect(const struct nk_input *i, enum nk_buttons id,\n    struct nk_rect b, int down)\n{\n    const struct nk_mouse_button *btn;\n    if (!i) return nk_false;\n    btn = &i->mouse.buttons[id];\n    return (nk_input_has_mouse_click_down_in_rect(i, id, b, down) &&\n            btn->clicked) ? nk_true : nk_false;\n}\nNK_API int\nnk_input_any_mouse_click_in_rect(const struct nk_input *in, struct nk_rect b)\n{\n    int i, down = 0;\n    for (i = 0; i < NK_BUTTON_MAX; ++i)\n        down = down || nk_input_is_mouse_click_in_rect(in, (enum nk_buttons)i, b);\n    return down;\n}\nNK_API int\nnk_input_is_mouse_hovering_rect(const struct nk_input *i, struct nk_rect rect)\n{\n    if (!i) return nk_false;\n    return NK_INBOX(i->mouse.pos.x, i->mouse.pos.y, rect.x, rect.y, rect.w, rect.h);\n}\nNK_API int\nnk_input_is_mouse_prev_hovering_rect(const struct nk_input *i, struct nk_rect rect)\n{\n    if (!i) return nk_false;\n    return NK_INBOX(i->mouse.prev.x, i->mouse.prev.y, rect.x, rect.y, rect.w, rect.h);\n}\nNK_API int\nnk_input_mouse_clicked(const struct nk_input *i, enum nk_buttons id, struct nk_rect rect)\n{\n    if (!i) return nk_false;\n    if (!nk_input_is_mouse_hovering_rect(i, rect)) return nk_false;\n    return nk_input_is_mouse_click_in_rect(i, id, rect);\n}\nNK_API int\nnk_input_is_mouse_down(const struct nk_input *i, enum nk_buttons id)\n{\n    if (!i) return nk_false;\n    return i->mouse.buttons[id].down;\n}\nNK_API int\nnk_input_is_mouse_pressed(const struct nk_input *i, enum nk_buttons id)\n{\n    const struct nk_mouse_button *b;\n    if (!i) return nk_false;\n    b = &i->mouse.buttons[id];\n    if (b->down && b->clicked)\n        return nk_true;\n    return nk_false;\n}\nNK_API int\nnk_input_is_mouse_released(const struct nk_input *i, enum nk_buttons id)\n{\n    if (!i) return nk_false;\n    return (!i->mouse.buttons[id].down && i->mouse.buttons[id].clicked);\n}\nNK_API int\nnk_input_is_key_pressed(const struct nk_input *i, enum nk_keys key)\n{\n    const struct nk_key *k;\n    if (!i) return nk_false;\n    k = &i->keyboard.keys[key];\n    if ((k->down && k->clicked) || (!k->down && k->clicked >= 2))\n        return nk_true;\n    return nk_false;\n}\nNK_API int\nnk_input_is_key_released(const struct nk_input *i, enum nk_keys key)\n{\n    const struct nk_key *k;\n    if (!i) return nk_false;\n    k = &i->keyboard.keys[key];\n    if ((!k->down && k->clicked) || (k->down && k->clicked >= 2))\n        return nk_true;\n    return nk_false;\n}\nNK_API int\nnk_input_is_key_down(const struct nk_input *i, enum nk_keys key)\n{\n    const struct nk_key *k;\n    if (!i) return nk_false;\n    k = &i->keyboard.keys[key];\n    if (k->down) return nk_true;\n    return nk_false;\n}\n\n\n\n\n\n/* ===============================================================\n *\n *                              STYLE\n *\n * ===============================================================*/\nNK_API void nk_style_default(struct nk_context *ctx){nk_style_from_table(ctx, 0);}\n#define NK_COLOR_MAP(NK_COLOR)\\\n    NK_COLOR(NK_COLOR_TEXT,                     175,175,175,255) \\\n    NK_COLOR(NK_COLOR_WINDOW,                   45, 45, 45, 255) \\\n    NK_COLOR(NK_COLOR_HEADER,                   40, 40, 40, 255) \\\n    NK_COLOR(NK_COLOR_BORDER,                   65, 65, 65, 255) \\\n    NK_COLOR(NK_COLOR_BUTTON,                   50, 50, 50, 255) \\\n    NK_COLOR(NK_COLOR_BUTTON_HOVER,             40, 40, 40, 255) \\\n    NK_COLOR(NK_COLOR_BUTTON_ACTIVE,            35, 35, 35, 255) \\\n    NK_COLOR(NK_COLOR_TOGGLE,                   100,100,100,255) \\\n    NK_COLOR(NK_COLOR_TOGGLE_HOVER,             120,120,120,255) \\\n    NK_COLOR(NK_COLOR_TOGGLE_CURSOR,            45, 45, 45, 255) \\\n    NK_COLOR(NK_COLOR_SELECT,                   45, 45, 45, 255) \\\n    NK_COLOR(NK_COLOR_SELECT_ACTIVE,            35, 35, 35,255) \\\n    NK_COLOR(NK_COLOR_SLIDER,                   38, 38, 38, 255) \\\n    NK_COLOR(NK_COLOR_SLIDER_CURSOR,            100,100,100,255) \\\n    NK_COLOR(NK_COLOR_SLIDER_CURSOR_HOVER,      120,120,120,255) \\\n    NK_COLOR(NK_COLOR_SLIDER_CURSOR_ACTIVE,     150,150,150,255) \\\n    NK_COLOR(NK_COLOR_PROPERTY,                 38, 38, 38, 255) \\\n    NK_COLOR(NK_COLOR_EDIT,                     38, 38, 38, 255)  \\\n    NK_COLOR(NK_COLOR_EDIT_CURSOR,              175,175,175,255) \\\n    NK_COLOR(NK_COLOR_COMBO,                    45, 45, 45, 255) \\\n    NK_COLOR(NK_COLOR_CHART,                    120,120,120,255) \\\n    NK_COLOR(NK_COLOR_CHART_COLOR,              45, 45, 45, 255) \\\n    NK_COLOR(NK_COLOR_CHART_COLOR_HIGHLIGHT,    255, 0,  0, 255) \\\n    NK_COLOR(NK_COLOR_SCROLLBAR,                40, 40, 40, 255) \\\n    NK_COLOR(NK_COLOR_SCROLLBAR_CURSOR,         100,100,100,255) \\\n    NK_COLOR(NK_COLOR_SCROLLBAR_CURSOR_HOVER,   120,120,120,255) \\\n    NK_COLOR(NK_COLOR_SCROLLBAR_CURSOR_ACTIVE,  150,150,150,255) \\\n    NK_COLOR(NK_COLOR_TAB_HEADER,               40, 40, 40,255)\n\nNK_GLOBAL const struct nk_color\nnk_default_color_style[NK_COLOR_COUNT] = {\n#define NK_COLOR(a,b,c,d,e) {b,c,d,e},\n    NK_COLOR_MAP(NK_COLOR)\n#undef NK_COLOR\n};\nNK_GLOBAL const char *nk_color_names[NK_COLOR_COUNT] = {\n#define NK_COLOR(a,b,c,d,e) #a,\n    NK_COLOR_MAP(NK_COLOR)\n#undef NK_COLOR\n};\n\nNK_API const char*\nnk_style_get_color_by_name(enum nk_style_colors c)\n{\n    return nk_color_names[c];\n}\nNK_API struct nk_style_item\nnk_style_item_image(struct nk_image img)\n{\n    struct nk_style_item i;\n    i.type = NK_STYLE_ITEM_IMAGE;\n    i.data.image = img;\n    return i;\n}\nNK_API struct nk_style_item\nnk_style_item_color(struct nk_color col)\n{\n    struct nk_style_item i;\n    i.type = NK_STYLE_ITEM_COLOR;\n    i.data.color = col;\n    return i;\n}\nNK_API struct nk_style_item\nnk_style_item_hide(void)\n{\n    struct nk_style_item i;\n    i.type = NK_STYLE_ITEM_COLOR;\n    i.data.color = nk_rgba(0,0,0,0);\n    return i;\n}\nNK_API void\nnk_style_from_table(struct nk_context *ctx, const struct nk_color *table)\n{\n    struct nk_style *style;\n    struct nk_style_text *text;\n    struct nk_style_button *button;\n    struct nk_style_toggle *toggle;\n    struct nk_style_selectable *select;\n    struct nk_style_slider *slider;\n    struct nk_style_progress *prog;\n    struct nk_style_scrollbar *scroll;\n    struct nk_style_edit *edit;\n    struct nk_style_property *property;\n    struct nk_style_combo *combo;\n    struct nk_style_chart *chart;\n    struct nk_style_tab *tab;\n    struct nk_style_window *win;\n\n    NK_ASSERT(ctx);\n    if (!ctx) return;\n    style = &ctx->style;\n    table = (!table) ? nk_default_color_style: table;\n\n    /* default text */\n    text = &style->text;\n    text->color = table[NK_COLOR_TEXT];\n    text->padding = nk_vec2(0,0);\n\n    /* default button */\n    button = &style->button;\n    nk_zero_struct(*button);\n    button->normal          = nk_style_item_color(table[NK_COLOR_BUTTON]);\n    button->hover           = nk_style_item_color(table[NK_COLOR_BUTTON_HOVER]);\n    button->active          = nk_style_item_color(table[NK_COLOR_BUTTON_ACTIVE]);\n    button->border_color    = table[NK_COLOR_BORDER];\n    button->text_background = table[NK_COLOR_BUTTON];\n    button->text_normal     = table[NK_COLOR_TEXT];\n    button->text_hover      = table[NK_COLOR_TEXT];\n    button->text_active     = table[NK_COLOR_TEXT];\n    button->padding         = nk_vec2(2.0f,2.0f);\n    button->image_padding   = nk_vec2(0.0f,0.0f);\n    button->touch_padding   = nk_vec2(0.0f, 0.0f);\n    button->userdata        = nk_handle_ptr(0);\n    button->text_alignment  = NK_TEXT_CENTERED;\n    button->border          = 1.0f;\n    button->rounding        = 4.0f;\n    button->draw_begin      = 0;\n    button->draw_end        = 0;\n\n    /* contextual button */\n    button = &style->contextual_button;\n    nk_zero_struct(*button);\n    button->normal          = nk_style_item_color(table[NK_COLOR_WINDOW]);\n    button->hover           = nk_style_item_color(table[NK_COLOR_BUTTON_HOVER]);\n    button->active          = nk_style_item_color(table[NK_COLOR_BUTTON_ACTIVE]);\n    button->border_color    = table[NK_COLOR_WINDOW];\n    button->text_background = table[NK_COLOR_WINDOW];\n    button->text_normal     = table[NK_COLOR_TEXT];\n    button->text_hover      = table[NK_COLOR_TEXT];\n    button->text_active     = table[NK_COLOR_TEXT];\n    button->padding         = nk_vec2(2.0f,2.0f);\n    button->touch_padding   = nk_vec2(0.0f,0.0f);\n    button->userdata        = nk_handle_ptr(0);\n    button->text_alignment  = NK_TEXT_CENTERED;\n    button->border          = 0.0f;\n    button->rounding        = 0.0f;\n    button->draw_begin      = 0;\n    button->draw_end        = 0;\n\n    /* menu button */\n    button = &style->menu_button;\n    nk_zero_struct(*button);\n    button->normal          = nk_style_item_color(table[NK_COLOR_WINDOW]);\n    button->hover           = nk_style_item_color(table[NK_COLOR_WINDOW]);\n    button->active          = nk_style_item_color(table[NK_COLOR_WINDOW]);\n    button->border_color    = table[NK_COLOR_WINDOW];\n    button->text_background = table[NK_COLOR_WINDOW];\n    button->text_normal     = table[NK_COLOR_TEXT];\n    button->text_hover      = table[NK_COLOR_TEXT];\n    button->text_active     = table[NK_COLOR_TEXT];\n    button->padding         = nk_vec2(2.0f,2.0f);\n    button->touch_padding   = nk_vec2(0.0f,0.0f);\n    button->userdata        = nk_handle_ptr(0);\n    button->text_alignment  = NK_TEXT_CENTERED;\n    button->border          = 0.0f;\n    button->rounding        = 1.0f;\n    button->draw_begin      = 0;\n    button->draw_end        = 0;\n\n    /* checkbox toggle */\n    toggle = &style->checkbox;\n    nk_zero_struct(*toggle);\n    toggle->normal          = nk_style_item_color(table[NK_COLOR_TOGGLE]);\n    toggle->hover           = nk_style_item_color(table[NK_COLOR_TOGGLE_HOVER]);\n    toggle->active          = nk_style_item_color(table[NK_COLOR_TOGGLE_HOVER]);\n    toggle->cursor_normal   = nk_style_item_color(table[NK_COLOR_TOGGLE_CURSOR]);\n    toggle->cursor_hover    = nk_style_item_color(table[NK_COLOR_TOGGLE_CURSOR]);\n    toggle->userdata        = nk_handle_ptr(0);\n    toggle->text_background = table[NK_COLOR_WINDOW];\n    toggle->text_normal     = table[NK_COLOR_TEXT];\n    toggle->text_hover      = table[NK_COLOR_TEXT];\n    toggle->text_active     = table[NK_COLOR_TEXT];\n    toggle->padding         = nk_vec2(2.0f, 2.0f);\n    toggle->touch_padding   = nk_vec2(0,0);\n    toggle->border_color    = nk_rgba(0,0,0,0);\n    toggle->border          = 0.0f;\n    toggle->spacing         = 4;\n\n    /* option toggle */\n    toggle = &style->option;\n    nk_zero_struct(*toggle);\n    toggle->normal          = nk_style_item_color(table[NK_COLOR_TOGGLE]);\n    toggle->hover           = nk_style_item_color(table[NK_COLOR_TOGGLE_HOVER]);\n    toggle->active          = nk_style_item_color(table[NK_COLOR_TOGGLE_HOVER]);\n    toggle->cursor_normal   = nk_style_item_color(table[NK_COLOR_TOGGLE_CURSOR]);\n    toggle->cursor_hover    = nk_style_item_color(table[NK_COLOR_TOGGLE_CURSOR]);\n    toggle->userdata        = nk_handle_ptr(0);\n    toggle->text_background = table[NK_COLOR_WINDOW];\n    toggle->text_normal     = table[NK_COLOR_TEXT];\n    toggle->text_hover      = table[NK_COLOR_TEXT];\n    toggle->text_active     = table[NK_COLOR_TEXT];\n    toggle->padding         = nk_vec2(3.0f, 3.0f);\n    toggle->touch_padding   = nk_vec2(0,0);\n    toggle->border_color    = nk_rgba(0,0,0,0);\n    toggle->border          = 0.0f;\n    toggle->spacing         = 4;\n\n    /* selectable */\n    select = &style->selectable;\n    nk_zero_struct(*select);\n    select->normal          = nk_style_item_color(table[NK_COLOR_SELECT]);\n    select->hover           = nk_style_item_color(table[NK_COLOR_SELECT]);\n    select->pressed         = nk_style_item_color(table[NK_COLOR_SELECT]);\n    select->normal_active   = nk_style_item_color(table[NK_COLOR_SELECT_ACTIVE]);\n    select->hover_active    = nk_style_item_color(table[NK_COLOR_SELECT_ACTIVE]);\n    select->pressed_active  = nk_style_item_color(table[NK_COLOR_SELECT_ACTIVE]);\n    select->text_normal     = table[NK_COLOR_TEXT];\n    select->text_hover      = table[NK_COLOR_TEXT];\n    select->text_pressed    = table[NK_COLOR_TEXT];\n    select->text_normal_active  = table[NK_COLOR_TEXT];\n    select->text_hover_active   = table[NK_COLOR_TEXT];\n    select->text_pressed_active = table[NK_COLOR_TEXT];\n    select->padding         = nk_vec2(2.0f,2.0f);\n    select->image_padding   = nk_vec2(2.0f,2.0f);\n    select->touch_padding   = nk_vec2(0,0);\n    select->userdata        = nk_handle_ptr(0);\n    select->rounding        = 0.0f;\n    select->draw_begin      = 0;\n    select->draw_end        = 0;\n\n    /* slider */\n    slider = &style->slider;\n    nk_zero_struct(*slider);\n    slider->normal          = nk_style_item_hide();\n    slider->hover           = nk_style_item_hide();\n    slider->active          = nk_style_item_hide();\n    slider->bar_normal      = table[NK_COLOR_SLIDER];\n    slider->bar_hover       = table[NK_COLOR_SLIDER];\n    slider->bar_active      = table[NK_COLOR_SLIDER];\n    slider->bar_filled      = table[NK_COLOR_SLIDER_CURSOR];\n    slider->cursor_normal   = nk_style_item_color(table[NK_COLOR_SLIDER_CURSOR]);\n    slider->cursor_hover    = nk_style_item_color(table[NK_COLOR_SLIDER_CURSOR_HOVER]);\n    slider->cursor_active   = nk_style_item_color(table[NK_COLOR_SLIDER_CURSOR_ACTIVE]);\n    slider->inc_symbol      = NK_SYMBOL_TRIANGLE_RIGHT;\n    slider->dec_symbol      = NK_SYMBOL_TRIANGLE_LEFT;\n    slider->cursor_size     = nk_vec2(16,16);\n    slider->padding         = nk_vec2(2,2);\n    slider->spacing         = nk_vec2(2,2);\n    slider->userdata        = nk_handle_ptr(0);\n    slider->show_buttons    = nk_false;\n    slider->bar_height      = 8;\n    slider->rounding        = 0;\n    slider->draw_begin      = 0;\n    slider->draw_end        = 0;\n\n    /* slider buttons */\n    button = &style->slider.inc_button;\n    button->normal          = nk_style_item_color(nk_rgb(40,40,40));\n    button->hover           = nk_style_item_color(nk_rgb(42,42,42));\n    button->active          = nk_style_item_color(nk_rgb(44,44,44));\n    button->border_color    = nk_rgb(65,65,65);\n    button->text_background = nk_rgb(40,40,40);\n    button->text_normal     = nk_rgb(175,175,175);\n    button->text_hover      = nk_rgb(175,175,175);\n    button->text_active     = nk_rgb(175,175,175);\n    button->padding         = nk_vec2(8.0f,8.0f);\n    button->touch_padding   = nk_vec2(0.0f,0.0f);\n    button->userdata        = nk_handle_ptr(0);\n    button->text_alignment  = NK_TEXT_CENTERED;\n    button->border          = 1.0f;\n    button->rounding        = 0.0f;\n    button->draw_begin      = 0;\n    button->draw_end        = 0;\n    style->slider.dec_button = style->slider.inc_button;\n\n    /* progressbar */\n    prog = &style->progress;\n    nk_zero_struct(*prog);\n    prog->normal            = nk_style_item_color(table[NK_COLOR_SLIDER]);\n    prog->hover             = nk_style_item_color(table[NK_COLOR_SLIDER]);\n    prog->active            = nk_style_item_color(table[NK_COLOR_SLIDER]);\n    prog->cursor_normal     = nk_style_item_color(table[NK_COLOR_SLIDER_CURSOR]);\n    prog->cursor_hover      = nk_style_item_color(table[NK_COLOR_SLIDER_CURSOR_HOVER]);\n    prog->cursor_active     = nk_style_item_color(table[NK_COLOR_SLIDER_CURSOR_ACTIVE]);\n    prog->border_color      = nk_rgba(0,0,0,0);\n    prog->cursor_border_color = nk_rgba(0,0,0,0);\n    prog->userdata          = nk_handle_ptr(0);\n    prog->padding           = nk_vec2(4,4);\n    prog->rounding          = 0;\n    prog->border            = 0;\n    prog->cursor_rounding   = 0;\n    prog->cursor_border     = 0;\n    prog->draw_begin        = 0;\n    prog->draw_end          = 0;\n\n    /* scrollbars */\n    scroll = &style->scrollh;\n    nk_zero_struct(*scroll);\n    scroll->normal          = nk_style_item_color(table[NK_COLOR_SCROLLBAR]);\n    scroll->hover           = nk_style_item_color(table[NK_COLOR_SCROLLBAR]);\n    scroll->active          = nk_style_item_color(table[NK_COLOR_SCROLLBAR]);\n    scroll->cursor_normal   = nk_style_item_color(table[NK_COLOR_SCROLLBAR_CURSOR]);\n    scroll->cursor_hover    = nk_style_item_color(table[NK_COLOR_SCROLLBAR_CURSOR_HOVER]);\n    scroll->cursor_active   = nk_style_item_color(table[NK_COLOR_SCROLLBAR_CURSOR_ACTIVE]);\n    scroll->dec_symbol      = NK_SYMBOL_CIRCLE_SOLID;\n    scroll->inc_symbol      = NK_SYMBOL_CIRCLE_SOLID;\n    scroll->userdata        = nk_handle_ptr(0);\n    scroll->border_color    = table[NK_COLOR_SCROLLBAR];\n    scroll->cursor_border_color = table[NK_COLOR_SCROLLBAR];\n    scroll->padding         = nk_vec2(0,0);\n    scroll->show_buttons    = nk_false;\n    scroll->border          = 0;\n    scroll->rounding        = 0;\n    scroll->border_cursor   = 0;\n    scroll->rounding_cursor = 0;\n    scroll->draw_begin      = 0;\n    scroll->draw_end        = 0;\n    style->scrollv = style->scrollh;\n\n    /* scrollbars buttons */\n    button = &style->scrollh.inc_button;\n    button->normal          = nk_style_item_color(nk_rgb(40,40,40));\n    button->hover           = nk_style_item_color(nk_rgb(42,42,42));\n    button->active          = nk_style_item_color(nk_rgb(44,44,44));\n    button->border_color    = nk_rgb(65,65,65);\n    button->text_background = nk_rgb(40,40,40);\n    button->text_normal     = nk_rgb(175,175,175);\n    button->text_hover      = nk_rgb(175,175,175);\n    button->text_active     = nk_rgb(175,175,175);\n    button->padding         = nk_vec2(4.0f,4.0f);\n    button->touch_padding   = nk_vec2(0.0f,0.0f);\n    button->userdata        = nk_handle_ptr(0);\n    button->text_alignment  = NK_TEXT_CENTERED;\n    button->border          = 1.0f;\n    button->rounding        = 0.0f;\n    button->draw_begin      = 0;\n    button->draw_end        = 0;\n    style->scrollh.dec_button = style->scrollh.inc_button;\n    style->scrollv.inc_button = style->scrollh.inc_button;\n    style->scrollv.dec_button = style->scrollh.inc_button;\n\n    /* edit */\n    edit = &style->edit;\n    nk_zero_struct(*edit);\n    edit->normal            = nk_style_item_color(table[NK_COLOR_EDIT]);\n    edit->hover             = nk_style_item_color(table[NK_COLOR_EDIT]);\n    edit->active            = nk_style_item_color(table[NK_COLOR_EDIT]);\n    edit->cursor_normal     = table[NK_COLOR_TEXT];\n    edit->cursor_hover      = table[NK_COLOR_TEXT];\n    edit->cursor_text_normal= table[NK_COLOR_EDIT];\n    edit->cursor_text_hover = table[NK_COLOR_EDIT];\n    edit->border_color      = table[NK_COLOR_BORDER];\n    edit->text_normal       = table[NK_COLOR_TEXT];\n    edit->text_hover        = table[NK_COLOR_TEXT];\n    edit->text_active       = table[NK_COLOR_TEXT];\n    edit->selected_normal   = table[NK_COLOR_TEXT];\n    edit->selected_hover    = table[NK_COLOR_TEXT];\n    edit->selected_text_normal  = table[NK_COLOR_EDIT];\n    edit->selected_text_hover   = table[NK_COLOR_EDIT];\n    edit->scrollbar_size    = nk_vec2(10,10);\n    edit->scrollbar         = style->scrollv;\n    edit->padding           = nk_vec2(4,4);\n    edit->row_padding       = 2;\n    edit->cursor_size       = 4;\n    edit->border            = 1;\n    edit->rounding          = 0;\n\n    /* property */\n    property = &style->property;\n    nk_zero_struct(*property);\n    property->normal        = nk_style_item_color(table[NK_COLOR_PROPERTY]);\n    property->hover         = nk_style_item_color(table[NK_COLOR_PROPERTY]);\n    property->active        = nk_style_item_color(table[NK_COLOR_PROPERTY]);\n    property->border_color  = table[NK_COLOR_BORDER];\n    property->label_normal  = table[NK_COLOR_TEXT];\n    property->label_hover   = table[NK_COLOR_TEXT];\n    property->label_active  = table[NK_COLOR_TEXT];\n    property->sym_left      = NK_SYMBOL_TRIANGLE_LEFT;\n    property->sym_right     = NK_SYMBOL_TRIANGLE_RIGHT;\n    property->userdata      = nk_handle_ptr(0);\n    property->padding       = nk_vec2(4,4);\n    property->border        = 1;\n    property->rounding      = 10;\n    property->draw_begin    = 0;\n    property->draw_end      = 0;\n\n    /* property buttons */\n    button = &style->property.dec_button;\n    nk_zero_struct(*button);\n    button->normal          = nk_style_item_color(table[NK_COLOR_PROPERTY]);\n    button->hover           = nk_style_item_color(table[NK_COLOR_PROPERTY]);\n    button->active          = nk_style_item_color(table[NK_COLOR_PROPERTY]);\n    button->border_color    = nk_rgba(0,0,0,0);\n    button->text_background = table[NK_COLOR_PROPERTY];\n    button->text_normal     = table[NK_COLOR_TEXT];\n    button->text_hover      = table[NK_COLOR_TEXT];\n    button->text_active     = table[NK_COLOR_TEXT];\n    button->padding         = nk_vec2(0.0f,0.0f);\n    button->touch_padding   = nk_vec2(0.0f,0.0f);\n    button->userdata        = nk_handle_ptr(0);\n    button->text_alignment  = NK_TEXT_CENTERED;\n    button->border          = 0.0f;\n    button->rounding        = 0.0f;\n    button->draw_begin      = 0;\n    button->draw_end        = 0;\n    style->property.inc_button = style->property.dec_button;\n\n    /* property edit */\n    edit = &style->property.edit;\n    nk_zero_struct(*edit);\n    edit->normal            = nk_style_item_color(table[NK_COLOR_PROPERTY]);\n    edit->hover             = nk_style_item_color(table[NK_COLOR_PROPERTY]);\n    edit->active            = nk_style_item_color(table[NK_COLOR_PROPERTY]);\n    edit->border_color      = nk_rgba(0,0,0,0);\n    edit->cursor_normal     = table[NK_COLOR_TEXT];\n    edit->cursor_hover      = table[NK_COLOR_TEXT];\n    edit->cursor_text_normal= table[NK_COLOR_EDIT];\n    edit->cursor_text_hover = table[NK_COLOR_EDIT];\n    edit->text_normal       = table[NK_COLOR_TEXT];\n    edit->text_hover        = table[NK_COLOR_TEXT];\n    edit->text_active       = table[NK_COLOR_TEXT];\n    edit->selected_normal   = table[NK_COLOR_TEXT];\n    edit->selected_hover    = table[NK_COLOR_TEXT];\n    edit->selected_text_normal  = table[NK_COLOR_EDIT];\n    edit->selected_text_hover   = table[NK_COLOR_EDIT];\n    edit->padding           = nk_vec2(0,0);\n    edit->cursor_size       = 8;\n    edit->border            = 0;\n    edit->rounding          = 0;\n\n    /* chart */\n    chart = &style->chart;\n    nk_zero_struct(*chart);\n    chart->background       = nk_style_item_color(table[NK_COLOR_CHART]);\n    chart->border_color     = table[NK_COLOR_BORDER];\n    chart->selected_color   = table[NK_COLOR_CHART_COLOR_HIGHLIGHT];\n    chart->color            = table[NK_COLOR_CHART_COLOR];\n    chart->padding          = nk_vec2(4,4);\n    chart->border           = 0;\n    chart->rounding         = 0;\n\n    /* combo */\n    combo = &style->combo;\n    combo->normal           = nk_style_item_color(table[NK_COLOR_COMBO]);\n    combo->hover            = nk_style_item_color(table[NK_COLOR_COMBO]);\n    combo->active           = nk_style_item_color(table[NK_COLOR_COMBO]);\n    combo->border_color     = table[NK_COLOR_BORDER];\n    combo->label_normal     = table[NK_COLOR_TEXT];\n    combo->label_hover      = table[NK_COLOR_TEXT];\n    combo->label_active     = table[NK_COLOR_TEXT];\n    combo->sym_normal       = NK_SYMBOL_TRIANGLE_DOWN;\n    combo->sym_hover        = NK_SYMBOL_TRIANGLE_DOWN;\n    combo->sym_active       = NK_SYMBOL_TRIANGLE_DOWN;\n    combo->content_padding  = nk_vec2(4,4);\n    combo->button_padding   = nk_vec2(0,4);\n    combo->spacing          = nk_vec2(4,0);\n    combo->border           = 1;\n    combo->rounding         = 0;\n\n    /* combo button */\n    button = &style->combo.button;\n    nk_zero_struct(*button);\n    button->normal          = nk_style_item_color(table[NK_COLOR_COMBO]);\n    button->hover           = nk_style_item_color(table[NK_COLOR_COMBO]);\n    button->active          = nk_style_item_color(table[NK_COLOR_COMBO]);\n    button->border_color    = nk_rgba(0,0,0,0);\n    button->text_background = table[NK_COLOR_COMBO];\n    button->text_normal     = table[NK_COLOR_TEXT];\n    button->text_hover      = table[NK_COLOR_TEXT];\n    button->text_active     = table[NK_COLOR_TEXT];\n    button->padding         = nk_vec2(2.0f,2.0f);\n    button->touch_padding   = nk_vec2(0.0f,0.0f);\n    button->userdata        = nk_handle_ptr(0);\n    button->text_alignment  = NK_TEXT_CENTERED;\n    button->border          = 0.0f;\n    button->rounding        = 0.0f;\n    button->draw_begin      = 0;\n    button->draw_end        = 0;\n\n    /* tab */\n    tab = &style->tab;\n    tab->background         = nk_style_item_color(table[NK_COLOR_TAB_HEADER]);\n    tab->border_color       = table[NK_COLOR_BORDER];\n    tab->text               = table[NK_COLOR_TEXT];\n    tab->sym_minimize       = NK_SYMBOL_TRIANGLE_RIGHT;\n    tab->sym_maximize       = NK_SYMBOL_TRIANGLE_DOWN;\n    tab->padding            = nk_vec2(4,4);\n    tab->spacing            = nk_vec2(4,4);\n    tab->indent             = 10.0f;\n    tab->border             = 1;\n    tab->rounding           = 0;\n\n    /* tab button */\n    button = &style->tab.tab_minimize_button;\n    nk_zero_struct(*button);\n    button->normal          = nk_style_item_color(table[NK_COLOR_TAB_HEADER]);\n    button->hover           = nk_style_item_color(table[NK_COLOR_TAB_HEADER]);\n    button->active          = nk_style_item_color(table[NK_COLOR_TAB_HEADER]);\n    button->border_color    = nk_rgba(0,0,0,0);\n    button->text_background = table[NK_COLOR_TAB_HEADER];\n    button->text_normal     = table[NK_COLOR_TEXT];\n    button->text_hover      = table[NK_COLOR_TEXT];\n    button->text_active     = table[NK_COLOR_TEXT];\n    button->padding         = nk_vec2(2.0f,2.0f);\n    button->touch_padding   = nk_vec2(0.0f,0.0f);\n    button->userdata        = nk_handle_ptr(0);\n    button->text_alignment  = NK_TEXT_CENTERED;\n    button->border          = 0.0f;\n    button->rounding        = 0.0f;\n    button->draw_begin      = 0;\n    button->draw_end        = 0;\n    style->tab.tab_maximize_button =*button;\n\n    /* node button */\n    button = &style->tab.node_minimize_button;\n    nk_zero_struct(*button);\n    button->normal          = nk_style_item_color(table[NK_COLOR_WINDOW]);\n    button->hover           = nk_style_item_color(table[NK_COLOR_WINDOW]);\n    button->active          = nk_style_item_color(table[NK_COLOR_WINDOW]);\n    button->border_color    = nk_rgba(0,0,0,0);\n    button->text_background = table[NK_COLOR_TAB_HEADER];\n    button->text_normal     = table[NK_COLOR_TEXT];\n    button->text_hover      = table[NK_COLOR_TEXT];\n    button->text_active     = table[NK_COLOR_TEXT];\n    button->padding         = nk_vec2(2.0f,2.0f);\n    button->touch_padding   = nk_vec2(0.0f,0.0f);\n    button->userdata        = nk_handle_ptr(0);\n    button->text_alignment  = NK_TEXT_CENTERED;\n    button->border          = 0.0f;\n    button->rounding        = 0.0f;\n    button->draw_begin      = 0;\n    button->draw_end        = 0;\n    style->tab.node_maximize_button =*button;\n\n    /* window header */\n    win = &style->window;\n    win->header.align = NK_HEADER_RIGHT;\n    win->header.close_symbol = NK_SYMBOL_X;\n    win->header.minimize_symbol = NK_SYMBOL_MINUS;\n    win->header.maximize_symbol = NK_SYMBOL_PLUS;\n    win->header.normal = nk_style_item_color(table[NK_COLOR_HEADER]);\n    win->header.hover = nk_style_item_color(table[NK_COLOR_HEADER]);\n    win->header.active = nk_style_item_color(table[NK_COLOR_HEADER]);\n    win->header.label_normal = table[NK_COLOR_TEXT];\n    win->header.label_hover = table[NK_COLOR_TEXT];\n    win->header.label_active = table[NK_COLOR_TEXT];\n    win->header.label_padding = nk_vec2(4,4);\n    win->header.padding = nk_vec2(4,4);\n    win->header.spacing = nk_vec2(0,0);\n\n    /* window header close button */\n    button = &style->window.header.close_button;\n    nk_zero_struct(*button);\n    button->normal          = nk_style_item_color(table[NK_COLOR_HEADER]);\n    button->hover           = nk_style_item_color(table[NK_COLOR_HEADER]);\n    button->active          = nk_style_item_color(table[NK_COLOR_HEADER]);\n    button->border_color    = nk_rgba(0,0,0,0);\n    button->text_background = table[NK_COLOR_HEADER];\n    button->text_normal     = table[NK_COLOR_TEXT];\n    button->text_hover      = table[NK_COLOR_TEXT];\n    button->text_active     = table[NK_COLOR_TEXT];\n    button->padding         = nk_vec2(0.0f,0.0f);\n    button->touch_padding   = nk_vec2(0.0f,0.0f);\n    button->userdata        = nk_handle_ptr(0);\n    button->text_alignment  = NK_TEXT_CENTERED;\n    button->border          = 0.0f;\n    button->rounding        = 0.0f;\n    button->draw_begin      = 0;\n    button->draw_end        = 0;\n\n    /* window header minimize button */\n    button = &style->window.header.minimize_button;\n    nk_zero_struct(*button);\n    button->normal          = nk_style_item_color(table[NK_COLOR_HEADER]);\n    button->hover           = nk_style_item_color(table[NK_COLOR_HEADER]);\n    button->active          = nk_style_item_color(table[NK_COLOR_HEADER]);\n    button->border_color    = nk_rgba(0,0,0,0);\n    button->text_background = table[NK_COLOR_HEADER];\n    button->text_normal     = table[NK_COLOR_TEXT];\n    button->text_hover      = table[NK_COLOR_TEXT];\n    button->text_active     = table[NK_COLOR_TEXT];\n    button->padding         = nk_vec2(0.0f,0.0f);\n    button->touch_padding   = nk_vec2(0.0f,0.0f);\n    button->userdata        = nk_handle_ptr(0);\n    button->text_alignment  = NK_TEXT_CENTERED;\n    button->border          = 0.0f;\n    button->rounding        = 0.0f;\n    button->draw_begin      = 0;\n    button->draw_end        = 0;\n\n    /* window */\n    win->background = table[NK_COLOR_WINDOW];\n    win->fixed_background = nk_style_item_color(table[NK_COLOR_WINDOW]);\n    win->border_color = table[NK_COLOR_BORDER];\n    win->popup_border_color = table[NK_COLOR_BORDER];\n    win->combo_border_color = table[NK_COLOR_BORDER];\n    win->contextual_border_color = table[NK_COLOR_BORDER];\n    win->menu_border_color = table[NK_COLOR_BORDER];\n    win->group_border_color = table[NK_COLOR_BORDER];\n    win->tooltip_border_color = table[NK_COLOR_BORDER];\n    win->scaler = nk_style_item_color(table[NK_COLOR_TEXT]);\n\n    win->rounding = 0.0f;\n    win->spacing = nk_vec2(4,4);\n    win->scrollbar_size = nk_vec2(10,10);\n    win->min_size = nk_vec2(64,64);\n\n    win->combo_border = 1.0f;\n    win->contextual_border = 1.0f;\n    win->menu_border = 1.0f;\n    win->group_border = 1.0f;\n    win->tooltip_border = 1.0f;\n    win->popup_border = 1.0f;\n    win->border = 2.0f;\n    win->min_row_height_padding = 8;\n\n    win->padding = nk_vec2(4,4);\n    win->group_padding = nk_vec2(4,4);\n    win->popup_padding = nk_vec2(4,4);\n    win->combo_padding = nk_vec2(4,4);\n    win->contextual_padding = nk_vec2(4,4);\n    win->menu_padding = nk_vec2(4,4);\n    win->tooltip_padding = nk_vec2(4,4);\n}\nNK_API void\nnk_style_set_font(struct nk_context *ctx, const struct nk_user_font *font)\n{\n    struct nk_style *style;\n    NK_ASSERT(ctx);\n\n    if (!ctx) return;\n    style = &ctx->style;\n    style->font = font;\n    ctx->stacks.fonts.head = 0;\n    if (ctx->current)\n        nk_layout_reset_min_row_height(ctx);\n}\nNK_API int\nnk_style_push_font(struct nk_context *ctx, const struct nk_user_font *font)\n{\n    struct nk_config_stack_user_font *font_stack;\n    struct nk_config_stack_user_font_element *element;\n\n    NK_ASSERT(ctx);\n    if (!ctx) return 0;\n\n    font_stack = &ctx->stacks.fonts;\n    NK_ASSERT(font_stack->head < (int)NK_LEN(font_stack->elements));\n    if (font_stack->head >= (int)NK_LEN(font_stack->elements))\n        return 0;\n\n    element = &font_stack->elements[font_stack->head++];\n    element->address = &ctx->style.font;\n    element->old_value = ctx->style.font;\n    ctx->style.font = font;\n    return 1;\n}\nNK_API int\nnk_style_pop_font(struct nk_context *ctx)\n{\n    struct nk_config_stack_user_font *font_stack;\n    struct nk_config_stack_user_font_element *element;\n\n    NK_ASSERT(ctx);\n    if (!ctx) return 0;\n\n    font_stack = &ctx->stacks.fonts;\n    NK_ASSERT(font_stack->head > 0);\n    if (font_stack->head < 1)\n        return 0;\n\n    element = &font_stack->elements[--font_stack->head];\n    *element->address = element->old_value;\n    return 1;\n}\n#define NK_STYLE_PUSH_IMPLEMENATION(prefix, type, stack) \\\nnk_style_push_##type(struct nk_context *ctx, prefix##_##type *address, prefix##_##type value)\\\n{\\\n    struct nk_config_stack_##type * type_stack;\\\n    struct nk_config_stack_##type##_element *element;\\\n    NK_ASSERT(ctx);\\\n    if (!ctx) return 0;\\\n    type_stack = &ctx->stacks.stack;\\\n    NK_ASSERT(type_stack->head < (int)NK_LEN(type_stack->elements));\\\n    if (type_stack->head >= (int)NK_LEN(type_stack->elements))\\\n        return 0;\\\n    element = &type_stack->elements[type_stack->head++];\\\n    element->address = address;\\\n    element->old_value = *address;\\\n    *address = value;\\\n    return 1;\\\n}\n#define NK_STYLE_POP_IMPLEMENATION(type, stack) \\\nnk_style_pop_##type(struct nk_context *ctx)\\\n{\\\n    struct nk_config_stack_##type *type_stack;\\\n    struct nk_config_stack_##type##_element *element;\\\n    NK_ASSERT(ctx);\\\n    if (!ctx) return 0;\\\n    type_stack = &ctx->stacks.stack;\\\n    NK_ASSERT(type_stack->head > 0);\\\n    if (type_stack->head < 1)\\\n        return 0;\\\n    element = &type_stack->elements[--type_stack->head];\\\n    *element->address = element->old_value;\\\n    return 1;\\\n}\nNK_API int NK_STYLE_PUSH_IMPLEMENATION(struct nk, style_item, style_items)\nNK_API int NK_STYLE_PUSH_IMPLEMENATION(nk,float, floats)\nNK_API int NK_STYLE_PUSH_IMPLEMENATION(struct nk, vec2, vectors)\nNK_API int NK_STYLE_PUSH_IMPLEMENATION(nk,flags, flags)\nNK_API int NK_STYLE_PUSH_IMPLEMENATION(struct nk,color, colors)\n\nNK_API int NK_STYLE_POP_IMPLEMENATION(style_item, style_items)\nNK_API int NK_STYLE_POP_IMPLEMENATION(float,floats)\nNK_API int NK_STYLE_POP_IMPLEMENATION(vec2, vectors)\nNK_API int NK_STYLE_POP_IMPLEMENATION(flags,flags)\nNK_API int NK_STYLE_POP_IMPLEMENATION(color,colors)\n\nNK_API int\nnk_style_set_cursor(struct nk_context *ctx, enum nk_style_cursor c)\n{\n    struct nk_style *style;\n    NK_ASSERT(ctx);\n    if (!ctx) return 0;\n    style = &ctx->style;\n    if (style->cursors[c]) {\n        style->cursor_active = style->cursors[c];\n        return 1;\n    }\n    return 0;\n}\nNK_API void\nnk_style_show_cursor(struct nk_context *ctx)\n{\n    ctx->style.cursor_visible = nk_true;\n}\nNK_API void\nnk_style_hide_cursor(struct nk_context *ctx)\n{\n    ctx->style.cursor_visible = nk_false;\n}\nNK_API void\nnk_style_load_cursor(struct nk_context *ctx, enum nk_style_cursor cursor,\n    const struct nk_cursor *c)\n{\n    struct nk_style *style;\n    NK_ASSERT(ctx);\n    if (!ctx) return;\n    style = &ctx->style;\n    style->cursors[cursor] = c;\n}\nNK_API void\nnk_style_load_all_cursors(struct nk_context *ctx, struct nk_cursor *cursors)\n{\n    int i = 0;\n    struct nk_style *style;\n    NK_ASSERT(ctx);\n    if (!ctx) return;\n    style = &ctx->style;\n    for (i = 0; i < NK_CURSOR_COUNT; ++i)\n        style->cursors[i] = &cursors[i];\n    style->cursor_visible = nk_true;\n}\n\n\n\n\n\n/* ==============================================================\n *\n *                          CONTEXT\n *\n * ===============================================================*/\nNK_INTERN void\nnk_setup(struct nk_context *ctx, const struct nk_user_font *font)\n{\n    NK_ASSERT(ctx);\n    if (!ctx) return;\n    nk_zero_struct(*ctx);\n    nk_style_default(ctx);\n    ctx->seq = 1;\n    if (font) ctx->style.font = font;\n#ifdef NK_INCLUDE_VERTEX_BUFFER_OUTPUT\n    nk_draw_list_init(&ctx->draw_list);\n#endif\n}\n#ifdef NK_INCLUDE_DEFAULT_ALLOCATOR\nNK_API int\nnk_init_default(struct nk_context *ctx, const struct nk_user_font *font)\n{\n    struct nk_allocator alloc;\n    alloc.userdata.ptr = 0;\n    alloc.alloc = nk_malloc;\n    alloc.free = nk_mfree;\n    return nk_init(ctx, &alloc, font);\n}\n#endif\nNK_API int\nnk_init_fixed(struct nk_context *ctx, void *memory, nk_size size,\n    const struct nk_user_font *font)\n{\n    NK_ASSERT(memory);\n    if (!memory) return 0;\n    nk_setup(ctx, font);\n    nk_buffer_init_fixed(&ctx->memory, memory, size);\n    ctx->use_pool = nk_false;\n    return 1;\n}\nNK_API int\nnk_init_custom(struct nk_context *ctx, struct nk_buffer *cmds,\n    struct nk_buffer *pool, const struct nk_user_font *font)\n{\n    NK_ASSERT(cmds);\n    NK_ASSERT(pool);\n    if (!cmds || !pool) return 0;\n\n    nk_setup(ctx, font);\n    ctx->memory = *cmds;\n    if (pool->type == NK_BUFFER_FIXED) {\n        /* take memory from buffer and alloc fixed pool */\n        nk_pool_init_fixed(&ctx->pool, pool->memory.ptr, pool->memory.size);\n    } else {\n        /* create dynamic pool from buffer allocator */\n        struct nk_allocator *alloc = &pool->pool;\n        nk_pool_init(&ctx->pool, alloc, NK_POOL_DEFAULT_CAPACITY);\n    }\n    ctx->use_pool = nk_true;\n    return 1;\n}\nNK_API int\nnk_init(struct nk_context *ctx, struct nk_allocator *alloc,\n    const struct nk_user_font *font)\n{\n    NK_ASSERT(alloc);\n    if (!alloc) return 0;\n    nk_setup(ctx, font);\n    nk_buffer_init(&ctx->memory, alloc, NK_DEFAULT_COMMAND_BUFFER_SIZE);\n    nk_pool_init(&ctx->pool, alloc, NK_POOL_DEFAULT_CAPACITY);\n    ctx->use_pool = nk_true;\n    return 1;\n}\n#ifdef NK_INCLUDE_COMMAND_USERDATA\nNK_API void\nnk_set_user_data(struct nk_context *ctx, nk_handle handle)\n{\n    if (!ctx) return;\n    ctx->userdata = handle;\n    if (ctx->current)\n        ctx->current->buffer.userdata = handle;\n}\n#endif\nNK_API void\nnk_free(struct nk_context *ctx)\n{\n    NK_ASSERT(ctx);\n    if (!ctx) return;\n    nk_buffer_free(&ctx->memory);\n    if (ctx->use_pool)\n        nk_pool_free(&ctx->pool);\n\n    nk_zero(&ctx->input, sizeof(ctx->input));\n    nk_zero(&ctx->style, sizeof(ctx->style));\n    nk_zero(&ctx->memory, sizeof(ctx->memory));\n\n    ctx->seq = 0;\n    ctx->build = 0;\n    ctx->begin = 0;\n    ctx->end = 0;\n    ctx->active = 0;\n    ctx->current = 0;\n    ctx->freelist = 0;\n    ctx->count = 0;\n}\nNK_API void\nnk_clear(struct nk_context *ctx)\n{\n    struct nk_window *iter;\n    struct nk_window *next;\n    NK_ASSERT(ctx);\n\n    if (!ctx) return;\n    if (ctx->use_pool)\n        nk_buffer_clear(&ctx->memory);\n    else nk_buffer_reset(&ctx->memory, NK_BUFFER_FRONT);\n\n    ctx->build = 0;\n    ctx->memory.calls = 0;\n    ctx->last_widget_state = 0;\n    ctx->style.cursor_active = ctx->style.cursors[NK_CURSOR_ARROW];\n    NK_MEMSET(&ctx->overlay, 0, sizeof(ctx->overlay));\n\n    /* garbage collector */\n    iter = ctx->begin;\n    while (iter) {\n        /* make sure valid minimized windows do not get removed */\n        if ((iter->flags & NK_WINDOW_MINIMIZED) &&\n            !(iter->flags & NK_WINDOW_CLOSED) &&\n            iter->seq == ctx->seq) {\n            iter = iter->next;\n            continue;\n        }\n        /* remove hotness from hidden or closed windows*/\n        if (((iter->flags & NK_WINDOW_HIDDEN) ||\n            (iter->flags & NK_WINDOW_CLOSED)) &&\n            iter == ctx->active) {\n            ctx->active = iter->prev;\n            ctx->end = iter->prev;\n            if (!ctx->end)\n                ctx->begin = 0;\n            if (ctx->active)\n                ctx->active->flags &= ~(unsigned)NK_WINDOW_ROM;\n        }\n        /* free unused popup windows */\n        if (iter->popup.win && iter->popup.win->seq != ctx->seq) {\n            nk_free_window(ctx, iter->popup.win);\n            iter->popup.win = 0;\n        }\n        /* remove unused window state tables */\n        {struct nk_table *n, *it = iter->tables;\n        while (it) {\n            n = it->next;\n            if (it->seq != ctx->seq) {\n                nk_remove_table(iter, it);\n                nk_zero(it, sizeof(union nk_page_data));\n                nk_free_table(ctx, it);\n                if (it == iter->tables)\n                    iter->tables = n;\n            } it = n;\n        }}\n        /* window itself is not used anymore so free */\n        if (iter->seq != ctx->seq || iter->flags & NK_WINDOW_CLOSED) {\n            next = iter->next;\n            nk_remove_window(ctx, iter);\n            nk_free_window(ctx, iter);\n            iter = next;\n        } else iter = iter->next;\n    }\n    ctx->seq++;\n}\nNK_LIB void\nnk_start_buffer(struct nk_context *ctx, struct nk_command_buffer *buffer)\n{\n    NK_ASSERT(ctx);\n    NK_ASSERT(buffer);\n    if (!ctx || !buffer) return;\n    buffer->begin = ctx->memory.allocated;\n    buffer->end = buffer->begin;\n    buffer->last = buffer->begin;\n    buffer->clip = nk_null_rect;\n}\nNK_LIB void\nnk_start(struct nk_context *ctx, struct nk_window *win)\n{\n    NK_ASSERT(ctx);\n    NK_ASSERT(win);\n    nk_start_buffer(ctx, &win->buffer);\n}\nNK_LIB void\nnk_start_popup(struct nk_context *ctx, struct nk_window *win)\n{\n    struct nk_popup_buffer *buf;\n    NK_ASSERT(ctx);\n    NK_ASSERT(win);\n    if (!ctx || !win) return;\n\n    /* save buffer fill state for popup */\n    buf = &win->popup.buf;\n    buf->begin = win->buffer.end;\n    buf->end = win->buffer.end;\n    buf->parent = win->buffer.last;\n    buf->last = buf->begin;\n    buf->active = nk_true;\n}\nNK_LIB void\nnk_finish_popup(struct nk_context *ctx, struct nk_window *win)\n{\n    struct nk_popup_buffer *buf;\n    NK_ASSERT(ctx);\n    NK_ASSERT(win);\n    if (!ctx || !win) return;\n\n    buf = &win->popup.buf;\n    buf->last = win->buffer.last;\n    buf->end = win->buffer.end;\n}\nNK_LIB void\nnk_finish_buffer(struct nk_context *ctx, struct nk_command_buffer *buffer)\n{\n    NK_ASSERT(ctx);\n    NK_ASSERT(buffer);\n    if (!ctx || !buffer) return;\n    buffer->end = ctx->memory.allocated;\n}\nNK_LIB void\nnk_finish(struct nk_context *ctx, struct nk_window *win)\n{\n    struct nk_popup_buffer *buf;\n    struct nk_command *parent_last;\n    void *memory;\n\n    NK_ASSERT(ctx);\n    NK_ASSERT(win);\n    if (!ctx || !win) return;\n    nk_finish_buffer(ctx, &win->buffer);\n    if (!win->popup.buf.active) return;\n\n    buf = &win->popup.buf;\n    memory = ctx->memory.memory.ptr;\n    parent_last = nk_ptr_add(struct nk_command, memory, buf->parent);\n    parent_last->next = buf->end;\n}\nNK_LIB void\nnk_build(struct nk_context *ctx)\n{\n    struct nk_window *it = 0;\n    struct nk_command *cmd = 0;\n    nk_byte *buffer = 0;\n\n    /* draw cursor overlay */\n    if (!ctx->style.cursor_active)\n        ctx->style.cursor_active = ctx->style.cursors[NK_CURSOR_ARROW];\n    if (ctx->style.cursor_active && !ctx->input.mouse.grabbed && ctx->style.cursor_visible) {\n        struct nk_rect mouse_bounds;\n        const struct nk_cursor *cursor = ctx->style.cursor_active;\n        nk_command_buffer_init(&ctx->overlay, &ctx->memory, NK_CLIPPING_OFF);\n        nk_start_buffer(ctx, &ctx->overlay);\n\n        mouse_bounds.x = ctx->input.mouse.pos.x - cursor->offset.x;\n        mouse_bounds.y = ctx->input.mouse.pos.y - cursor->offset.y;\n        mouse_bounds.w = cursor->size.x;\n        mouse_bounds.h = cursor->size.y;\n\n        nk_draw_image(&ctx->overlay, mouse_bounds, &cursor->img, nk_white);\n        nk_finish_buffer(ctx, &ctx->overlay);\n    }\n    /* build one big draw command list out of all window buffers */\n    it = ctx->begin;\n    buffer = (nk_byte*)ctx->memory.memory.ptr;\n    while (it != 0) {\n        struct nk_window *next = it->next;\n        if (it->buffer.last == it->buffer.begin || (it->flags & NK_WINDOW_HIDDEN)||\n            it->seq != ctx->seq)\n            goto cont;\n\n        cmd = nk_ptr_add(struct nk_command, buffer, it->buffer.last);\n        while (next && ((next->buffer.last == next->buffer.begin) ||\n            (next->flags & NK_WINDOW_HIDDEN) || next->seq != ctx->seq))\n            next = next->next; /* skip empty command buffers */\n\n        if (next) cmd->next = next->buffer.begin;\n        cont: it = next;\n    }\n    /* append all popup draw commands into lists */\n    it = ctx->begin;\n    while (it != 0) {\n        struct nk_window *next = it->next;\n        struct nk_popup_buffer *buf;\n        if (!it->popup.buf.active)\n            goto skip;\n\n        buf = &it->popup.buf;\n        cmd->next = buf->begin;\n        cmd = nk_ptr_add(struct nk_command, buffer, buf->last);\n        buf->active = nk_false;\n        skip: it = next;\n    }\n    if (cmd) {\n        /* append overlay commands */\n        if (ctx->overlay.end != ctx->overlay.begin)\n            cmd->next = ctx->overlay.begin;\n        else cmd->next = ctx->memory.allocated;\n    }\n}\nNK_API const struct nk_command*\nnk__begin(struct nk_context *ctx)\n{\n    struct nk_window *iter;\n    nk_byte *buffer;\n    NK_ASSERT(ctx);\n    if (!ctx) return 0;\n    if (!ctx->count) return 0;\n\n    buffer = (nk_byte*)ctx->memory.memory.ptr;\n    if (!ctx->build) {\n        nk_build(ctx);\n        ctx->build = nk_true;\n    }\n    iter = ctx->begin;\n    while (iter && ((iter->buffer.begin == iter->buffer.end) ||\n        (iter->flags & NK_WINDOW_HIDDEN) || iter->seq != ctx->seq))\n        iter = iter->next;\n    if (!iter) return 0;\n    return nk_ptr_add_const(struct nk_command, buffer, iter->buffer.begin);\n}\n\nNK_API const struct nk_command*\nnk__next(struct nk_context *ctx, const struct nk_command *cmd)\n{\n    nk_byte *buffer;\n    const struct nk_command *next;\n    NK_ASSERT(ctx);\n    if (!ctx || !cmd || !ctx->count) return 0;\n    if (cmd->next >= ctx->memory.allocated) return 0;\n    buffer = (nk_byte*)ctx->memory.memory.ptr;\n    next = nk_ptr_add_const(struct nk_command, buffer, cmd->next);\n    return next;\n}\n\n\n\n\n\n\n/* ===============================================================\n *\n *                              POOL\n *\n * ===============================================================*/\nNK_LIB void\nnk_pool_init(struct nk_pool *pool, struct nk_allocator *alloc,\n    unsigned int capacity)\n{\n    nk_zero(pool, sizeof(*pool));\n    pool->alloc = *alloc;\n    pool->capacity = capacity;\n    pool->type = NK_BUFFER_DYNAMIC;\n    pool->pages = 0;\n}\nNK_LIB void\nnk_pool_free(struct nk_pool *pool)\n{\n    struct nk_page *iter = pool->pages;\n    if (!pool) return;\n    if (pool->type == NK_BUFFER_FIXED) return;\n    while (iter) {\n        struct nk_page *next = iter->next;\n        pool->alloc.free(pool->alloc.userdata, iter);\n        iter = next;\n    }\n}\nNK_LIB void\nnk_pool_init_fixed(struct nk_pool *pool, void *memory, nk_size size)\n{\n    nk_zero(pool, sizeof(*pool));\n    NK_ASSERT(size >= sizeof(struct nk_page));\n    if (size < sizeof(struct nk_page)) return;\n    pool->capacity = (unsigned)(size - sizeof(struct nk_page)) / sizeof(struct nk_page_element);\n    pool->pages = (struct nk_page*)memory;\n    pool->type = NK_BUFFER_FIXED;\n    pool->size = size;\n}\nNK_LIB struct nk_page_element*\nnk_pool_alloc(struct nk_pool *pool)\n{\n    if (!pool->pages || pool->pages->size >= pool->capacity) {\n        /* allocate new page */\n        struct nk_page *page;\n        if (pool->type == NK_BUFFER_FIXED) {\n            NK_ASSERT(pool->pages);\n            if (!pool->pages) return 0;\n            NK_ASSERT(pool->pages->size < pool->capacity);\n            return 0;\n        } else {\n            nk_size size = sizeof(struct nk_page);\n            size += NK_POOL_DEFAULT_CAPACITY * sizeof(union nk_page_data);\n            page = (struct nk_page*)pool->alloc.alloc(pool->alloc.userdata,0, size);\n            page->next = pool->pages;\n            pool->pages = page;\n            page->size = 0;\n        }\n    } return &pool->pages->win[pool->pages->size++];\n}\n\n\n\n\n\n/* ===============================================================\n *\n *                          PAGE ELEMENT\n *\n * ===============================================================*/\nNK_LIB struct nk_page_element*\nnk_create_page_element(struct nk_context *ctx)\n{\n    struct nk_page_element *elem;\n    if (ctx->freelist) {\n        /* unlink page element from free list */\n        elem = ctx->freelist;\n        ctx->freelist = elem->next;\n    } else if (ctx->use_pool) {\n        /* allocate page element from memory pool */\n        elem = nk_pool_alloc(&ctx->pool);\n        NK_ASSERT(elem);\n        if (!elem) return 0;\n    } else {\n        /* allocate new page element from back of fixed size memory buffer */\n        NK_STORAGE const nk_size size = sizeof(struct nk_page_element);\n        NK_STORAGE const nk_size align = NK_ALIGNOF(struct nk_page_element);\n        elem = (struct nk_page_element*)nk_buffer_alloc(&ctx->memory, NK_BUFFER_BACK, size, align);\n        NK_ASSERT(elem);\n        if (!elem) return 0;\n    }\n    nk_zero_struct(*elem);\n    elem->next = 0;\n    elem->prev = 0;\n    return elem;\n}\nNK_LIB void\nnk_link_page_element_into_freelist(struct nk_context *ctx,\n    struct nk_page_element *elem)\n{\n    /* link table into freelist */\n    if (!ctx->freelist) {\n        ctx->freelist = elem;\n    } else {\n        elem->next = ctx->freelist;\n        ctx->freelist = elem;\n    }\n}\nNK_LIB void\nnk_free_page_element(struct nk_context *ctx, struct nk_page_element *elem)\n{\n    /* we have a pool so just add to free list */\n    if (ctx->use_pool) {\n        nk_link_page_element_into_freelist(ctx, elem);\n        return;\n    }\n    /* if possible remove last element from back of fixed memory buffer */\n    {void *elem_end = (void*)(elem + 1);\n    void *buffer_end = (nk_byte*)ctx->memory.memory.ptr + ctx->memory.size;\n    if (elem_end == buffer_end)\n        ctx->memory.size -= sizeof(struct nk_page_element);\n    else nk_link_page_element_into_freelist(ctx, elem);}\n}\n\n\n\n\n\n/* ===============================================================\n *\n *                              TABLE\n *\n * ===============================================================*/\nNK_LIB struct nk_table*\nnk_create_table(struct nk_context *ctx)\n{\n    struct nk_page_element *elem;\n    elem = nk_create_page_element(ctx);\n    if (!elem) return 0;\n    nk_zero_struct(*elem);\n    return &elem->data.tbl;\n}\nNK_LIB void\nnk_free_table(struct nk_context *ctx, struct nk_table *tbl)\n{\n    union nk_page_data *pd = NK_CONTAINER_OF(tbl, union nk_page_data, tbl);\n    struct nk_page_element *pe = NK_CONTAINER_OF(pd, struct nk_page_element, data);\n    nk_free_page_element(ctx, pe);\n}\nNK_LIB void\nnk_push_table(struct nk_window *win, struct nk_table *tbl)\n{\n    if (!win->tables) {\n        win->tables = tbl;\n        tbl->next = 0;\n        tbl->prev = 0;\n        tbl->size = 0;\n        win->table_count = 1;\n        return;\n    }\n    win->tables->prev = tbl;\n    tbl->next = win->tables;\n    tbl->prev = 0;\n    tbl->size = 0;\n    win->tables = tbl;\n    win->table_count++;\n}\nNK_LIB void\nnk_remove_table(struct nk_window *win, struct nk_table *tbl)\n{\n    if (win->tables == tbl)\n        win->tables = tbl->next;\n    if (tbl->next)\n        tbl->next->prev = tbl->prev;\n    if (tbl->prev)\n        tbl->prev->next = tbl->next;\n    tbl->next = 0;\n    tbl->prev = 0;\n}\nNK_LIB nk_uint*\nnk_add_value(struct nk_context *ctx, struct nk_window *win,\n            nk_hash name, nk_uint value)\n{\n    NK_ASSERT(ctx);\n    NK_ASSERT(win);\n    if (!win || !ctx) return 0;\n    if (!win->tables || win->tables->size >= NK_VALUE_PAGE_CAPACITY) {\n        struct nk_table *tbl = nk_create_table(ctx);\n        NK_ASSERT(tbl);\n        if (!tbl) return 0;\n        nk_push_table(win, tbl);\n    }\n    win->tables->seq = win->seq;\n    win->tables->keys[win->tables->size] = name;\n    win->tables->values[win->tables->size] = value;\n    return &win->tables->values[win->tables->size++];\n}\nNK_LIB nk_uint*\nnk_find_value(struct nk_window *win, nk_hash name)\n{\n    struct nk_table *iter = win->tables;\n    while (iter) {\n        unsigned int i = 0;\n        unsigned int size = iter->size;\n        for (i = 0; i < size; ++i) {\n            if (iter->keys[i] == name) {\n                iter->seq = win->seq;\n                return &iter->values[i];\n            }\n        } size = NK_VALUE_PAGE_CAPACITY;\n        iter = iter->next;\n    }\n    return 0;\n}\n\n\n\n\n\n/* ===============================================================\n *\n *                              PANEL\n *\n * ===============================================================*/\nNK_LIB void*\nnk_create_panel(struct nk_context *ctx)\n{\n    struct nk_page_element *elem;\n    elem = nk_create_page_element(ctx);\n    if (!elem) return 0;\n    nk_zero_struct(*elem);\n    return &elem->data.pan;\n}\nNK_LIB void\nnk_free_panel(struct nk_context *ctx, struct nk_panel *pan)\n{\n    union nk_page_data *pd = NK_CONTAINER_OF(pan, union nk_page_data, pan);\n    struct nk_page_element *pe = NK_CONTAINER_OF(pd, struct nk_page_element, data);\n    nk_free_page_element(ctx, pe);\n}\nNK_LIB int\nnk_panel_has_header(nk_flags flags, const char *title)\n{\n    int active = 0;\n    active = (flags & (NK_WINDOW_CLOSABLE|NK_WINDOW_MINIMIZABLE));\n    active = active || (flags & NK_WINDOW_TITLE);\n    active = active && !(flags & NK_WINDOW_HIDDEN) && title;\n    return active;\n}\nNK_LIB struct nk_vec2\nnk_panel_get_padding(const struct nk_style *style, enum nk_panel_type type)\n{\n    switch (type) {\n    default:\n    case NK_PANEL_WINDOW: return style->window.padding;\n    case NK_PANEL_GROUP: return style->window.group_padding;\n    case NK_PANEL_POPUP: return style->window.popup_padding;\n    case NK_PANEL_CONTEXTUAL: return style->window.contextual_padding;\n    case NK_PANEL_COMBO: return style->window.combo_padding;\n    case NK_PANEL_MENU: return style->window.menu_padding;\n    case NK_PANEL_TOOLTIP: return style->window.menu_padding;}\n}\nNK_LIB float\nnk_panel_get_border(const struct nk_style *style, nk_flags flags,\n    enum nk_panel_type type)\n{\n    if (flags & NK_WINDOW_BORDER) {\n        switch (type) {\n        default:\n        case NK_PANEL_WINDOW: return style->window.border;\n        case NK_PANEL_GROUP: return style->window.group_border;\n        case NK_PANEL_POPUP: return style->window.popup_border;\n        case NK_PANEL_CONTEXTUAL: return style->window.contextual_border;\n        case NK_PANEL_COMBO: return style->window.combo_border;\n        case NK_PANEL_MENU: return style->window.menu_border;\n        case NK_PANEL_TOOLTIP: return style->window.menu_border;\n    }} else return 0;\n}\nNK_LIB struct nk_color\nnk_panel_get_border_color(const struct nk_style *style, enum nk_panel_type type)\n{\n    switch (type) {\n    default:\n    case NK_PANEL_WINDOW: return style->window.border_color;\n    case NK_PANEL_GROUP: return style->window.group_border_color;\n    case NK_PANEL_POPUP: return style->window.popup_border_color;\n    case NK_PANEL_CONTEXTUAL: return style->window.contextual_border_color;\n    case NK_PANEL_COMBO: return style->window.combo_border_color;\n    case NK_PANEL_MENU: return style->window.menu_border_color;\n    case NK_PANEL_TOOLTIP: return style->window.menu_border_color;}\n}\nNK_LIB int\nnk_panel_is_sub(enum nk_panel_type type)\n{\n    return (type & NK_PANEL_SET_SUB)?1:0;\n}\nNK_LIB int\nnk_panel_is_nonblock(enum nk_panel_type type)\n{\n    return (type & NK_PANEL_SET_NONBLOCK)?1:0;\n}\nNK_LIB int\nnk_panel_begin(struct nk_context *ctx, const char *title, enum nk_panel_type panel_type)\n{\n    struct nk_input *in;\n    struct nk_window *win;\n    struct nk_panel *layout;\n    struct nk_command_buffer *out;\n    const struct nk_style *style;\n    const struct nk_user_font *font;\n\n    struct nk_vec2 scrollbar_size;\n    struct nk_vec2 panel_padding;\n\n    NK_ASSERT(ctx);\n    NK_ASSERT(ctx->current);\n    NK_ASSERT(ctx->current->layout);\n    if (!ctx || !ctx->current || !ctx->current->layout) return 0;\n    nk_zero(ctx->current->layout, sizeof(*ctx->current->layout));\n    if ((ctx->current->flags & NK_WINDOW_HIDDEN) || (ctx->current->flags & NK_WINDOW_CLOSED)) {\n        nk_zero(ctx->current->layout, sizeof(struct nk_panel));\n        ctx->current->layout->type = panel_type;\n        return 0;\n    }\n    /* pull state into local stack */\n    style = &ctx->style;\n    font = style->font;\n    win = ctx->current;\n    layout = win->layout;\n    out = &win->buffer;\n    in = (win->flags & NK_WINDOW_NO_INPUT) ? 0: &ctx->input;\n#ifdef NK_INCLUDE_COMMAND_USERDATA\n    win->buffer.userdata = ctx->userdata;\n#endif\n    /* pull style configuration into local stack */\n    scrollbar_size = style->window.scrollbar_size;\n    panel_padding = nk_panel_get_padding(style, panel_type);\n\n    /* window movement */\n    if ((win->flags & NK_WINDOW_MOVABLE) && !(win->flags & NK_WINDOW_ROM)) {\n        int left_mouse_down;\n        int left_mouse_clicked;\n        int left_mouse_click_in_cursor;\n\n        /* calculate draggable window space */\n        struct nk_rect header;\n        header.x = win->bounds.x;\n        header.y = win->bounds.y;\n        header.w = win->bounds.w;\n        if (nk_panel_has_header(win->flags, title)) {\n            header.h = font->height + 2.0f * style->window.header.padding.y;\n            header.h += 2.0f * style->window.header.label_padding.y;\n        } else header.h = panel_padding.y;\n\n        /* window movement by dragging */\n        left_mouse_down = in->mouse.buttons[NK_BUTTON_LEFT].down;\n        left_mouse_clicked = (int)in->mouse.buttons[NK_BUTTON_LEFT].clicked;\n        left_mouse_click_in_cursor = nk_input_has_mouse_click_down_in_rect(in,\n            NK_BUTTON_LEFT, header, nk_true);\n        if (left_mouse_down && left_mouse_click_in_cursor && !left_mouse_clicked) {\n            win->bounds.x = win->bounds.x + in->mouse.delta.x;\n            win->bounds.y = win->bounds.y + in->mouse.delta.y;\n            in->mouse.buttons[NK_BUTTON_LEFT].clicked_pos.x += in->mouse.delta.x;\n            in->mouse.buttons[NK_BUTTON_LEFT].clicked_pos.y += in->mouse.delta.y;\n            ctx->style.cursor_active = ctx->style.cursors[NK_CURSOR_MOVE];\n        }\n    }\n\n    /* setup panel */\n    layout->type = panel_type;\n    layout->flags = win->flags;\n    layout->bounds = win->bounds;\n    layout->bounds.x += panel_padding.x;\n    layout->bounds.w -= 2*panel_padding.x;\n    if (win->flags & NK_WINDOW_BORDER) {\n        layout->border = nk_panel_get_border(style, win->flags, panel_type);\n        layout->bounds = nk_shrink_rect(layout->bounds, layout->border);\n    } else layout->border = 0;\n    layout->at_y = layout->bounds.y;\n    layout->at_x = layout->bounds.x;\n    layout->max_x = 0;\n    layout->header_height = 0;\n    layout->footer_height = 0;\n    nk_layout_reset_min_row_height(ctx);\n    layout->row.index = 0;\n    layout->row.columns = 0;\n    layout->row.ratio = 0;\n    layout->row.item_width = 0;\n    layout->row.tree_depth = 0;\n    layout->row.height = panel_padding.y;\n    layout->has_scrolling = nk_true;\n    if (!(win->flags & NK_WINDOW_NO_SCROLLBAR))\n        layout->bounds.w -= scrollbar_size.x;\n    if (!nk_panel_is_nonblock(panel_type)) {\n        layout->footer_height = 0;\n        if (!(win->flags & NK_WINDOW_NO_SCROLLBAR) || win->flags & NK_WINDOW_SCALABLE)\n            layout->footer_height = scrollbar_size.y;\n        layout->bounds.h -= layout->footer_height;\n    }\n\n    /* panel header */\n    if (nk_panel_has_header(win->flags, title))\n    {\n        struct nk_text text;\n        struct nk_rect header;\n        const struct nk_style_item *background = 0;\n\n        /* calculate header bounds */\n        header.x = win->bounds.x;\n        header.y = win->bounds.y;\n        header.w = win->bounds.w;\n        header.h = font->height + 2.0f * style->window.header.padding.y;\n        header.h += (2.0f * style->window.header.label_padding.y);\n\n        /* shrink panel by header */\n        layout->header_height = header.h;\n        layout->bounds.y += header.h;\n        layout->bounds.h -= header.h;\n        layout->at_y += header.h;\n\n        /* select correct header background and text color */\n        if (ctx->active == win) {\n            background = &style->window.header.active;\n            text.text = style->window.header.label_active;\n        } else if (nk_input_is_mouse_hovering_rect(&ctx->input, header)) {\n            background = &style->window.header.hover;\n            text.text = style->window.header.label_hover;\n        } else {\n            background = &style->window.header.normal;\n            text.text = style->window.header.label_normal;\n        }\n\n        /* draw header background */\n        header.h += 1.0f;\n        if (background->type == NK_STYLE_ITEM_IMAGE) {\n            text.background = nk_rgba(0,0,0,0);\n            nk_draw_image(&win->buffer, header, &background->data.image, nk_white);\n        } else {\n            text.background = background->data.color;\n            nk_fill_rect(out, header, 0, background->data.color);\n        }\n\n        /* window close button */\n        {struct nk_rect button;\n        button.y = header.y + style->window.header.padding.y;\n        button.h = header.h - 2 * style->window.header.padding.y;\n        button.w = button.h;\n        if (win->flags & NK_WINDOW_CLOSABLE) {\n            nk_flags ws = 0;\n            if (style->window.header.align == NK_HEADER_RIGHT) {\n                button.x = (header.w + header.x) - (button.w + style->window.header.padding.x);\n                header.w -= button.w + style->window.header.spacing.x + style->window.header.padding.x;\n            } else {\n                button.x = header.x + style->window.header.padding.x;\n                header.x += button.w + style->window.header.spacing.x + style->window.header.padding.x;\n            }\n\n            if (nk_do_button_symbol(&ws, &win->buffer, button,\n                style->window.header.close_symbol, NK_BUTTON_DEFAULT,\n                &style->window.header.close_button, in, style->font) && !(win->flags & NK_WINDOW_ROM))\n            {\n                layout->flags |= NK_WINDOW_HIDDEN;\n                layout->flags &= (nk_flags)~NK_WINDOW_MINIMIZED;\n            }\n        }\n\n        /* window minimize button */\n        if (win->flags & NK_WINDOW_MINIMIZABLE) {\n            nk_flags ws = 0;\n            if (style->window.header.align == NK_HEADER_RIGHT) {\n                button.x = (header.w + header.x) - button.w;\n                if (!(win->flags & NK_WINDOW_CLOSABLE)) {\n                    button.x -= style->window.header.padding.x;\n                    header.w -= style->window.header.padding.x;\n                }\n                header.w -= button.w + style->window.header.spacing.x;\n            } else {\n                button.x = header.x;\n                header.x += button.w + style->window.header.spacing.x + style->window.header.padding.x;\n            }\n            if (nk_do_button_symbol(&ws, &win->buffer, button, (layout->flags & NK_WINDOW_MINIMIZED)?\n                style->window.header.maximize_symbol: style->window.header.minimize_symbol,\n                NK_BUTTON_DEFAULT, &style->window.header.minimize_button, in, style->font) && !(win->flags & NK_WINDOW_ROM))\n                layout->flags = (layout->flags & NK_WINDOW_MINIMIZED) ?\n                    layout->flags & (nk_flags)~NK_WINDOW_MINIMIZED:\n                    layout->flags | NK_WINDOW_MINIMIZED;\n        }}\n\n        {/* window header title */\n        int text_len = nk_strlen(title);\n        struct nk_rect label = {0,0,0,0};\n        float t = font->width(font->userdata, font->height, title, text_len);\n        text.padding = nk_vec2(0,0);\n\n        label.x = header.x + style->window.header.padding.x;\n        label.x += style->window.header.label_padding.x;\n        label.y = header.y + style->window.header.label_padding.y;\n        label.h = font->height + 2 * style->window.header.label_padding.y;\n        label.w = t + 2 * style->window.header.spacing.x;\n        label.w = NK_CLAMP(0, label.w, header.x + header.w - label.x);\n        nk_widget_text(out, label,(const char*)title, text_len, &text, NK_TEXT_LEFT, font);}\n    }\n\n    /* draw window background */\n    if (!(layout->flags & NK_WINDOW_MINIMIZED) && !(layout->flags & NK_WINDOW_DYNAMIC)) {\n        struct nk_rect body;\n        body.x = win->bounds.x;\n        body.w = win->bounds.w;\n        body.y = (win->bounds.y + layout->header_height);\n        body.h = (win->bounds.h - layout->header_height);\n        if (style->window.fixed_background.type == NK_STYLE_ITEM_IMAGE)\n            nk_draw_image(out, body, &style->window.fixed_background.data.image, nk_white);\n        else nk_fill_rect(out, body, 0, style->window.fixed_background.data.color);\n    }\n\n    /* set clipping rectangle */\n    {struct nk_rect clip;\n    layout->clip = layout->bounds;\n    nk_unify(&clip, &win->buffer.clip, layout->clip.x, layout->clip.y,\n        layout->clip.x + layout->clip.w, layout->clip.y + layout->clip.h);\n    nk_push_scissor(out, clip);\n    layout->clip = clip;}\n    return !(layout->flags & NK_WINDOW_HIDDEN) && !(layout->flags & NK_WINDOW_MINIMIZED);\n}\nNK_LIB void\nnk_panel_end(struct nk_context *ctx)\n{\n    struct nk_input *in;\n    struct nk_window *window;\n    struct nk_panel *layout;\n    const struct nk_style *style;\n    struct nk_command_buffer *out;\n\n    struct nk_vec2 scrollbar_size;\n    struct nk_vec2 panel_padding;\n\n    NK_ASSERT(ctx);\n    NK_ASSERT(ctx->current);\n    NK_ASSERT(ctx->current->layout);\n    if (!ctx || !ctx->current || !ctx->current->layout)\n        return;\n\n    window = ctx->current;\n    layout = window->layout;\n    style = &ctx->style;\n    out = &window->buffer;\n    in = (layout->flags & NK_WINDOW_ROM || layout->flags & NK_WINDOW_NO_INPUT) ? 0 :&ctx->input;\n    if (!nk_panel_is_sub(layout->type))\n        nk_push_scissor(out, nk_null_rect);\n\n    /* cache configuration data */\n    scrollbar_size = style->window.scrollbar_size;\n    panel_padding = nk_panel_get_padding(style, layout->type);\n\n    /* update the current cursor Y-position to point over the last added widget */\n    layout->at_y += layout->row.height;\n\n    /* dynamic panels */\n    if (layout->flags & NK_WINDOW_DYNAMIC && !(layout->flags & NK_WINDOW_MINIMIZED))\n    {\n        /* update panel height to fit dynamic growth */\n        struct nk_rect empty_space;\n        if (layout->at_y < (layout->bounds.y + layout->bounds.h))\n            layout->bounds.h = layout->at_y - layout->bounds.y;\n\n        /* fill top empty space */\n        empty_space.x = window->bounds.x;\n        empty_space.y = layout->bounds.y;\n        empty_space.h = panel_padding.y;\n        empty_space.w = window->bounds.w;\n        nk_fill_rect(out, empty_space, 0, style->window.background);\n\n        /* fill left empty space */\n        empty_space.x = window->bounds.x;\n        empty_space.y = layout->bounds.y;\n        empty_space.w = panel_padding.x + layout->border;\n        empty_space.h = layout->bounds.h;\n        nk_fill_rect(out, empty_space, 0, style->window.background);\n\n        /* fill right empty space */\n        empty_space.x = layout->bounds.x + layout->bounds.w - layout->border;\n        empty_space.y = layout->bounds.y;\n        empty_space.w = panel_padding.x + layout->border;\n        empty_space.h = layout->bounds.h;\n        if (*layout->offset_y == 0 && !(layout->flags & NK_WINDOW_NO_SCROLLBAR))\n            empty_space.w += scrollbar_size.x;\n        nk_fill_rect(out, empty_space, 0, style->window.background);\n\n        /* fill bottom empty space */\n        if (*layout->offset_x != 0 && !(layout->flags & NK_WINDOW_NO_SCROLLBAR)) {\n            empty_space.x = window->bounds.x;\n            empty_space.y = layout->bounds.y + layout->bounds.h;\n            empty_space.w = window->bounds.w;\n            empty_space.h = scrollbar_size.y;\n            nk_fill_rect(out, empty_space, 0, style->window.background);\n        }\n    }\n\n    /* scrollbars */\n    if (!(layout->flags & NK_WINDOW_NO_SCROLLBAR) &&\n        !(layout->flags & NK_WINDOW_MINIMIZED) &&\n        window->scrollbar_hiding_timer < NK_SCROLLBAR_HIDING_TIMEOUT)\n    {\n        struct nk_rect scroll;\n        int scroll_has_scrolling;\n        float scroll_target;\n        float scroll_offset;\n        float scroll_step;\n        float scroll_inc;\n\n        /* mouse wheel scrolling */\n        if (nk_panel_is_sub(layout->type))\n        {\n            /* sub-window mouse wheel scrolling */\n            struct nk_window *root_window = window;\n            struct nk_panel *root_panel = window->layout;\n            while (root_panel->parent)\n                root_panel = root_panel->parent;\n            while (root_window->parent)\n                root_window = root_window->parent;\n\n            /* only allow scrolling if parent window is active */\n            scroll_has_scrolling = 0;\n            if ((root_window == ctx->active) && layout->has_scrolling) {\n                /* and panel is being hovered and inside clip rect*/\n                if (nk_input_is_mouse_hovering_rect(in, layout->bounds) &&\n                    NK_INTERSECT(layout->bounds.x, layout->bounds.y, layout->bounds.w, layout->bounds.h,\n                        root_panel->clip.x, root_panel->clip.y, root_panel->clip.w, root_panel->clip.h))\n                {\n                    /* deactivate all parent scrolling */\n                    root_panel = window->layout;\n                    while (root_panel->parent) {\n                        root_panel->has_scrolling = nk_false;\n                        root_panel = root_panel->parent;\n                    }\n                    root_panel->has_scrolling = nk_false;\n                    scroll_has_scrolling = nk_true;\n                }\n            }\n        } else if (!nk_panel_is_sub(layout->type)) {\n            /* window mouse wheel scrolling */\n            scroll_has_scrolling = (window == ctx->active) && layout->has_scrolling;\n            if (in && (in->mouse.scroll_delta.y > 0 || in->mouse.scroll_delta.x > 0) && scroll_has_scrolling)\n                window->scrolled = nk_true;\n            else window->scrolled = nk_false;\n        } else scroll_has_scrolling = nk_false;\n\n        {\n            /* vertical scrollbar */\n            nk_flags state = 0;\n            scroll.x = layout->bounds.x + layout->bounds.w + panel_padding.x;\n            scroll.y = layout->bounds.y;\n            scroll.w = scrollbar_size.x;\n            scroll.h = layout->bounds.h;\n\n            scroll_offset = (float)*layout->offset_y;\n            scroll_step = scroll.h * 0.10f;\n            scroll_inc = scroll.h * 0.01f;\n            scroll_target = (float)(int)(layout->at_y - scroll.y);\n            scroll_offset = nk_do_scrollbarv(&state, out, scroll, scroll_has_scrolling,\n                scroll_offset, scroll_target, scroll_step, scroll_inc,\n                &ctx->style.scrollv, in, style->font);\n            *layout->offset_y = (nk_uint)scroll_offset;\n            if (in && scroll_has_scrolling)\n                in->mouse.scroll_delta.y = 0;\n        }\n        {\n            /* horizontal scrollbar */\n            nk_flags state = 0;\n            scroll.x = layout->bounds.x;\n            scroll.y = layout->bounds.y + layout->bounds.h;\n            scroll.w = layout->bounds.w;\n            scroll.h = scrollbar_size.y;\n\n            scroll_offset = (float)*layout->offset_x;\n            scroll_target = (float)(int)(layout->max_x - scroll.x);\n            scroll_step = layout->max_x * 0.05f;\n            scroll_inc = layout->max_x * 0.005f;\n            scroll_offset = nk_do_scrollbarh(&state, out, scroll, scroll_has_scrolling,\n                scroll_offset, scroll_target, scroll_step, scroll_inc,\n                &ctx->style.scrollh, in, style->font);\n            *layout->offset_x = (nk_uint)scroll_offset;\n        }\n    }\n\n    /* hide scroll if no user input */\n    if (window->flags & NK_WINDOW_SCROLL_AUTO_HIDE) {\n        int has_input = ctx->input.mouse.delta.x != 0 || ctx->input.mouse.delta.y != 0 || ctx->input.mouse.scroll_delta.y != 0;\n        int is_window_hovered = nk_window_is_hovered(ctx);\n        int any_item_active = (ctx->last_widget_state & NK_WIDGET_STATE_MODIFIED);\n        if ((!has_input && is_window_hovered) || (!is_window_hovered && !any_item_active))\n            window->scrollbar_hiding_timer += ctx->delta_time_seconds;\n        else window->scrollbar_hiding_timer = 0;\n    } else window->scrollbar_hiding_timer = 0;\n\n    /* window border */\n    if (layout->flags & NK_WINDOW_BORDER)\n    {\n        struct nk_color border_color = nk_panel_get_border_color(style, layout->type);\n        const float padding_y = (layout->flags & NK_WINDOW_MINIMIZED)\n            ? (style->window.border + window->bounds.y + layout->header_height)\n            : ((layout->flags & NK_WINDOW_DYNAMIC)\n                ? (layout->bounds.y + layout->bounds.h + layout->footer_height)\n                : (window->bounds.y + window->bounds.h));\n        struct nk_rect b = window->bounds;\n        b.h = padding_y - window->bounds.y;\n        nk_stroke_rect(out, b, 0, layout->border, border_color);\n    }\n\n    /* scaler */\n    if ((layout->flags & NK_WINDOW_SCALABLE) && in && !(layout->flags & NK_WINDOW_MINIMIZED))\n    {\n        /* calculate scaler bounds */\n        struct nk_rect scaler;\n        scaler.w = scrollbar_size.x;\n        scaler.h = scrollbar_size.y;\n        scaler.y = layout->bounds.y + layout->bounds.h;\n        if (layout->flags & NK_WINDOW_SCALE_LEFT)\n            scaler.x = layout->bounds.x - panel_padding.x * 0.5f;\n        else scaler.x = layout->bounds.x + layout->bounds.w + panel_padding.x;\n        if (layout->flags & NK_WINDOW_NO_SCROLLBAR)\n            scaler.x -= scaler.w;\n\n        /* draw scaler */\n        {const struct nk_style_item *item = &style->window.scaler;\n        if (item->type == NK_STYLE_ITEM_IMAGE)\n            nk_draw_image(out, scaler, &item->data.image, nk_white);\n        else {\n            if (layout->flags & NK_WINDOW_SCALE_LEFT) {\n                nk_fill_triangle(out, scaler.x, scaler.y, scaler.x,\n                    scaler.y + scaler.h, scaler.x + scaler.w,\n                    scaler.y + scaler.h, item->data.color);\n            } else {\n                nk_fill_triangle(out, scaler.x + scaler.w, scaler.y, scaler.x + scaler.w,\n                    scaler.y + scaler.h, scaler.x, scaler.y + scaler.h, item->data.color);\n            }\n        }}\n\n        /* do window scaling */\n        if (!(window->flags & NK_WINDOW_ROM)) {\n            struct nk_vec2 window_size = style->window.min_size;\n            int left_mouse_down = in->mouse.buttons[NK_BUTTON_LEFT].down;\n            int left_mouse_click_in_scaler = nk_input_has_mouse_click_down_in_rect(in,\n                    NK_BUTTON_LEFT, scaler, nk_true);\n\n            if (left_mouse_down && left_mouse_click_in_scaler) {\n                float delta_x = in->mouse.delta.x;\n                if (layout->flags & NK_WINDOW_SCALE_LEFT) {\n                    delta_x = -delta_x;\n                    window->bounds.x += in->mouse.delta.x;\n                }\n                /* dragging in x-direction  */\n                if (window->bounds.w + delta_x >= window_size.x) {\n                    if ((delta_x < 0) || (delta_x > 0 && in->mouse.pos.x >= scaler.x)) {\n                        window->bounds.w = window->bounds.w + delta_x;\n                        scaler.x += in->mouse.delta.x;\n                    }\n                }\n                /* dragging in y-direction (only possible if static window) */\n                if (!(layout->flags & NK_WINDOW_DYNAMIC)) {\n                    if (window_size.y < window->bounds.h + in->mouse.delta.y) {\n                        if ((in->mouse.delta.y < 0) || (in->mouse.delta.y > 0 && in->mouse.pos.y >= scaler.y)) {\n                            window->bounds.h = window->bounds.h + in->mouse.delta.y;\n                            scaler.y += in->mouse.delta.y;\n                        }\n                    }\n                }\n                ctx->style.cursor_active = ctx->style.cursors[NK_CURSOR_RESIZE_TOP_RIGHT_DOWN_LEFT];\n                in->mouse.buttons[NK_BUTTON_LEFT].clicked_pos.x = scaler.x + scaler.w/2.0f;\n                in->mouse.buttons[NK_BUTTON_LEFT].clicked_pos.y = scaler.y + scaler.h/2.0f;\n            }\n        }\n    }\n    if (!nk_panel_is_sub(layout->type)) {\n        /* window is hidden so clear command buffer  */\n        if (layout->flags & NK_WINDOW_HIDDEN)\n            nk_command_buffer_reset(&window->buffer);\n        /* window is visible and not tab */\n        else nk_finish(ctx, window);\n    }\n\n    /* NK_WINDOW_REMOVE_ROM flag was set so remove NK_WINDOW_ROM */\n    if (layout->flags & NK_WINDOW_REMOVE_ROM) {\n        layout->flags &= ~(nk_flags)NK_WINDOW_ROM;\n        layout->flags &= ~(nk_flags)NK_WINDOW_REMOVE_ROM;\n    }\n    window->flags = layout->flags;\n\n    /* property garbage collector */\n    if (window->property.active && window->property.old != window->property.seq &&\n        window->property.active == window->property.prev) {\n        nk_zero(&window->property, sizeof(window->property));\n    } else {\n        window->property.old = window->property.seq;\n        window->property.prev = window->property.active;\n        window->property.seq = 0;\n    }\n    /* edit garbage collector */\n    if (window->edit.active && window->edit.old != window->edit.seq &&\n       window->edit.active == window->edit.prev) {\n        nk_zero(&window->edit, sizeof(window->edit));\n    } else {\n        window->edit.old = window->edit.seq;\n        window->edit.prev = window->edit.active;\n        window->edit.seq = 0;\n    }\n    /* contextual garbage collector */\n    if (window->popup.active_con && window->popup.con_old != window->popup.con_count) {\n        window->popup.con_count = 0;\n        window->popup.con_old = 0;\n        window->popup.active_con = 0;\n    } else {\n        window->popup.con_old = window->popup.con_count;\n        window->popup.con_count = 0;\n    }\n    window->popup.combo_count = 0;\n    /* helper to make sure you have a 'nk_tree_push' for every 'nk_tree_pop' */\n    NK_ASSERT(!layout->row.tree_depth);\n}\n\n\n\n\n\n/* ===============================================================\n *\n *                              WINDOW\n *\n * ===============================================================*/\nNK_LIB void*\nnk_create_window(struct nk_context *ctx)\n{\n    struct nk_page_element *elem;\n    elem = nk_create_page_element(ctx);\n    if (!elem) return 0;\n    elem->data.win.seq = ctx->seq;\n    return &elem->data.win;\n}\nNK_LIB void\nnk_free_window(struct nk_context *ctx, struct nk_window *win)\n{\n    /* unlink windows from list */\n    struct nk_table *it = win->tables;\n    if (win->popup.win) {\n        nk_free_window(ctx, win->popup.win);\n        win->popup.win = 0;\n    }\n    win->next = 0;\n    win->prev = 0;\n\n    while (it) {\n        /*free window state tables */\n        struct nk_table *n = it->next;\n        nk_remove_table(win, it);\n        nk_free_table(ctx, it);\n        if (it == win->tables)\n            win->tables = n;\n        it = n;\n    }\n\n    /* link windows into freelist */\n    {union nk_page_data *pd = NK_CONTAINER_OF(win, union nk_page_data, win);\n    struct nk_page_element *pe = NK_CONTAINER_OF(pd, struct nk_page_element, data);\n    nk_free_page_element(ctx, pe);}\n}\nNK_LIB struct nk_window*\nnk_find_window(struct nk_context *ctx, nk_hash hash, const char *name)\n{\n    struct nk_window *iter;\n    iter = ctx->begin;\n    while (iter) {\n        NK_ASSERT(iter != iter->next);\n        if (iter->name == hash) {\n            int max_len = nk_strlen(iter->name_string);\n            if (!nk_stricmpn(iter->name_string, name, max_len))\n                return iter;\n        }\n        iter = iter->next;\n    }\n    return 0;\n}\nNK_LIB void\nnk_insert_window(struct nk_context *ctx, struct nk_window *win,\n    enum nk_window_insert_location loc)\n{\n    const struct nk_window *iter;\n    NK_ASSERT(ctx);\n    NK_ASSERT(win);\n    if (!win || !ctx) return;\n\n    iter = ctx->begin;\n    while (iter) {\n        NK_ASSERT(iter != iter->next);\n        NK_ASSERT(iter != win);\n        if (iter == win) return;\n        iter = iter->next;\n    }\n\n    if (!ctx->begin) {\n        win->next = 0;\n        win->prev = 0;\n        ctx->begin = win;\n        ctx->end = win;\n        ctx->count = 1;\n        return;\n    }\n    if (loc == NK_INSERT_BACK) {\n        struct nk_window *end;\n        end = ctx->end;\n        end->flags |= NK_WINDOW_ROM;\n        end->next = win;\n        win->prev = ctx->end;\n        win->next = 0;\n        ctx->end = win;\n        ctx->active = ctx->end;\n        ctx->end->flags &= ~(nk_flags)NK_WINDOW_ROM;\n    } else {\n        /*ctx->end->flags |= NK_WINDOW_ROM;*/\n        ctx->begin->prev = win;\n        win->next = ctx->begin;\n        win->prev = 0;\n        ctx->begin = win;\n        ctx->begin->flags &= ~(nk_flags)NK_WINDOW_ROM;\n    }\n    ctx->count++;\n}\nNK_LIB void\nnk_remove_window(struct nk_context *ctx, struct nk_window *win)\n{\n    if (win == ctx->begin || win == ctx->end) {\n        if (win == ctx->begin) {\n            ctx->begin = win->next;\n            if (win->next)\n                win->next->prev = 0;\n        }\n        if (win == ctx->end) {\n            ctx->end = win->prev;\n            if (win->prev)\n                win->prev->next = 0;\n        }\n    } else {\n        if (win->next)\n            win->next->prev = win->prev;\n        if (win->prev)\n            win->prev->next = win->next;\n    }\n    if (win == ctx->active || !ctx->active) {\n        ctx->active = ctx->end;\n        if (ctx->end)\n            ctx->end->flags &= ~(nk_flags)NK_WINDOW_ROM;\n    }\n    win->next = 0;\n    win->prev = 0;\n    ctx->count--;\n}\nNK_API int\nnk_begin(struct nk_context *ctx, const char *title,\n    struct nk_rect bounds, nk_flags flags)\n{\n    return nk_begin_titled(ctx, title, title, bounds, flags);\n}\nNK_API int\nnk_begin_titled(struct nk_context *ctx, const char *name, const char *title,\n    struct nk_rect bounds, nk_flags flags)\n{\n    struct nk_window *win;\n    struct nk_style *style;\n    nk_hash title_hash;\n    int title_len;\n    int ret = 0;\n\n    NK_ASSERT(ctx);\n    NK_ASSERT(name);\n    NK_ASSERT(title);\n    NK_ASSERT(ctx->style.font && ctx->style.font->width && \"if this triggers you forgot to add a font\");\n    NK_ASSERT(!ctx->current && \"if this triggers you missed a `nk_end` call\");\n    if (!ctx || ctx->current || !title || !name)\n        return 0;\n\n    /* find or create window */\n    style = &ctx->style;\n    title_len = (int)nk_strlen(name);\n    title_hash = nk_murmur_hash(name, (int)title_len, NK_WINDOW_TITLE);\n    win = nk_find_window(ctx, title_hash, name);\n    if (!win) {\n        /* create new window */\n        nk_size name_length = (nk_size)nk_strlen(name);\n        win = (struct nk_window*)nk_create_window(ctx);\n        NK_ASSERT(win);\n        if (!win) return 0;\n\n        if (flags & NK_WINDOW_BACKGROUND)\n            nk_insert_window(ctx, win, NK_INSERT_FRONT);\n        else nk_insert_window(ctx, win, NK_INSERT_BACK);\n        nk_command_buffer_init(&win->buffer, &ctx->memory, NK_CLIPPING_ON);\n\n        win->flags = flags;\n        win->bounds = bounds;\n        win->name = title_hash;\n        name_length = NK_MIN(name_length, NK_WINDOW_MAX_NAME-1);\n        NK_MEMCPY(win->name_string, name, name_length);\n        win->name_string[name_length] = 0;\n        win->popup.win = 0;\n        if (!ctx->active)\n            ctx->active = win;\n    } else {\n        /* update window */\n        win->flags &= ~(nk_flags)(NK_WINDOW_PRIVATE-1);\n        win->flags |= flags;\n        if (!(win->flags & (NK_WINDOW_MOVABLE | NK_WINDOW_SCALABLE)))\n            win->bounds = bounds;\n        /* If this assert triggers you either:\n         *\n         * I.) Have more than one window with the same name or\n         * II.) You forgot to actually draw the window.\n         *      More specific you did not call `nk_clear` (nk_clear will be\n         *      automatically called for you if you are using one of the\n         *      provided demo backends). */\n        NK_ASSERT(win->seq != ctx->seq);\n        win->seq = ctx->seq;\n        if (!ctx->active && !(win->flags & NK_WINDOW_HIDDEN)) {\n            ctx->active = win;\n            ctx->end = win;\n        }\n    }\n    if (win->flags & NK_WINDOW_HIDDEN) {\n        ctx->current = win;\n        win->layout = 0;\n        return 0;\n    } else nk_start(ctx, win);\n\n    /* window overlapping */\n    if (!(win->flags & NK_WINDOW_HIDDEN) && !(win->flags & NK_WINDOW_NO_INPUT))\n    {\n        int inpanel, ishovered;\n        struct nk_window *iter = win;\n        float h = ctx->style.font->height + 2.0f * style->window.header.padding.y +\n            (2.0f * style->window.header.label_padding.y);\n        struct nk_rect win_bounds = (!(win->flags & NK_WINDOW_MINIMIZED))?\n            win->bounds: nk_rect(win->bounds.x, win->bounds.y, win->bounds.w, h);\n\n        /* activate window if hovered and no other window is overlapping this window */\n        inpanel = nk_input_has_mouse_click_down_in_rect(&ctx->input, NK_BUTTON_LEFT, win_bounds, nk_true);\n        inpanel = inpanel && ctx->input.mouse.buttons[NK_BUTTON_LEFT].clicked;\n        ishovered = nk_input_is_mouse_hovering_rect(&ctx->input, win_bounds);\n        if ((win != ctx->active) && ishovered && !ctx->input.mouse.buttons[NK_BUTTON_LEFT].down) {\n            iter = win->next;\n            while (iter) {\n                struct nk_rect iter_bounds = (!(iter->flags & NK_WINDOW_MINIMIZED))?\n                    iter->bounds: nk_rect(iter->bounds.x, iter->bounds.y, iter->bounds.w, h);\n                if (NK_INTERSECT(win_bounds.x, win_bounds.y, win_bounds.w, win_bounds.h,\n                    iter_bounds.x, iter_bounds.y, iter_bounds.w, iter_bounds.h) &&\n                    (!(iter->flags & NK_WINDOW_HIDDEN)))\n                    break;\n\n                if (iter->popup.win && iter->popup.active && !(iter->flags & NK_WINDOW_HIDDEN) &&\n                    NK_INTERSECT(win->bounds.x, win_bounds.y, win_bounds.w, win_bounds.h,\n                    iter->popup.win->bounds.x, iter->popup.win->bounds.y,\n                    iter->popup.win->bounds.w, iter->popup.win->bounds.h))\n                    break;\n                iter = iter->next;\n            }\n        }\n\n        /* activate window if clicked */\n        if (iter && inpanel && (win != ctx->end)) {\n            iter = win->next;\n            while (iter) {\n                /* try to find a panel with higher priority in the same position */\n                struct nk_rect iter_bounds = (!(iter->flags & NK_WINDOW_MINIMIZED))?\n                iter->bounds: nk_rect(iter->bounds.x, iter->bounds.y, iter->bounds.w, h);\n                if (NK_INBOX(ctx->input.mouse.pos.x, ctx->input.mouse.pos.y,\n                    iter_bounds.x, iter_bounds.y, iter_bounds.w, iter_bounds.h) &&\n                    !(iter->flags & NK_WINDOW_HIDDEN))\n                    break;\n                if (iter->popup.win && iter->popup.active && !(iter->flags & NK_WINDOW_HIDDEN) &&\n                    NK_INTERSECT(win_bounds.x, win_bounds.y, win_bounds.w, win_bounds.h,\n                    iter->popup.win->bounds.x, iter->popup.win->bounds.y,\n                    iter->popup.win->bounds.w, iter->popup.win->bounds.h))\n                    break;\n                iter = iter->next;\n            }\n        }\n        if (iter && !(win->flags & NK_WINDOW_ROM) && (win->flags & NK_WINDOW_BACKGROUND)) {\n            win->flags |= (nk_flags)NK_WINDOW_ROM;\n            iter->flags &= ~(nk_flags)NK_WINDOW_ROM;\n            ctx->active = iter;\n            if (!(iter->flags & NK_WINDOW_BACKGROUND)) {\n                /* current window is active in that position so transfer to top\n                 * at the highest priority in stack */\n                nk_remove_window(ctx, iter);\n                nk_insert_window(ctx, iter, NK_INSERT_BACK);\n            }\n        } else {\n            if (!iter && ctx->end != win) {\n                if (!(win->flags & NK_WINDOW_BACKGROUND)) {\n                    /* current window is active in that position so transfer to top\n                     * at the highest priority in stack */\n                    nk_remove_window(ctx, win);\n                    nk_insert_window(ctx, win, NK_INSERT_BACK);\n                }\n                win->flags &= ~(nk_flags)NK_WINDOW_ROM;\n                ctx->active = win;\n            }\n            if (ctx->end != win && !(win->flags & NK_WINDOW_BACKGROUND))\n                win->flags |= NK_WINDOW_ROM;\n        }\n    }\n    win->layout = (struct nk_panel*)nk_create_panel(ctx);\n    ctx->current = win;\n    ret = nk_panel_begin(ctx, title, NK_PANEL_WINDOW);\n    win->layout->offset_x = &win->scrollbar.x;\n    win->layout->offset_y = &win->scrollbar.y;\n    return ret;\n}\nNK_API void\nnk_end(struct nk_context *ctx)\n{\n    struct nk_panel *layout;\n    NK_ASSERT(ctx);\n    NK_ASSERT(ctx->current && \"if this triggers you forgot to call `nk_begin`\");\n    if (!ctx || !ctx->current)\n        return;\n\n    layout = ctx->current->layout;\n    if (!layout || (layout->type == NK_PANEL_WINDOW && (ctx->current->flags & NK_WINDOW_HIDDEN))) {\n        ctx->current = 0;\n        return;\n    }\n    nk_panel_end(ctx);\n    nk_free_panel(ctx, ctx->current->layout);\n    ctx->current = 0;\n}\nNK_API struct nk_rect\nnk_window_get_bounds(const struct nk_context *ctx)\n{\n    NK_ASSERT(ctx);\n    NK_ASSERT(ctx->current);\n    if (!ctx || !ctx->current) return nk_rect(0,0,0,0);\n    return ctx->current->bounds;\n}\nNK_API struct nk_vec2\nnk_window_get_position(const struct nk_context *ctx)\n{\n    NK_ASSERT(ctx);\n    NK_ASSERT(ctx->current);\n    if (!ctx || !ctx->current) return nk_vec2(0,0);\n    return nk_vec2(ctx->current->bounds.x, ctx->current->bounds.y);\n}\nNK_API struct nk_vec2\nnk_window_get_size(const struct nk_context *ctx)\n{\n    NK_ASSERT(ctx);\n    NK_ASSERT(ctx->current);\n    if (!ctx || !ctx->current) return nk_vec2(0,0);\n    return nk_vec2(ctx->current->bounds.w, ctx->current->bounds.h);\n}\nNK_API float\nnk_window_get_width(const struct nk_context *ctx)\n{\n    NK_ASSERT(ctx);\n    NK_ASSERT(ctx->current);\n    if (!ctx || !ctx->current) return 0;\n    return ctx->current->bounds.w;\n}\nNK_API float\nnk_window_get_height(const struct nk_context *ctx)\n{\n    NK_ASSERT(ctx);\n    NK_ASSERT(ctx->current);\n    if (!ctx || !ctx->current) return 0;\n    return ctx->current->bounds.h;\n}\nNK_API struct nk_rect\nnk_window_get_content_region(struct nk_context *ctx)\n{\n    NK_ASSERT(ctx);\n    NK_ASSERT(ctx->current);\n    if (!ctx || !ctx->current) return nk_rect(0,0,0,0);\n    return ctx->current->layout->clip;\n}\nNK_API struct nk_vec2\nnk_window_get_content_region_min(struct nk_context *ctx)\n{\n    NK_ASSERT(ctx);\n    NK_ASSERT(ctx->current);\n    NK_ASSERT(ctx->current->layout);\n    if (!ctx || !ctx->current) return nk_vec2(0,0);\n    return nk_vec2(ctx->current->layout->clip.x, ctx->current->layout->clip.y);\n}\nNK_API struct nk_vec2\nnk_window_get_content_region_max(struct nk_context *ctx)\n{\n    NK_ASSERT(ctx);\n    NK_ASSERT(ctx->current);\n    NK_ASSERT(ctx->current->layout);\n    if (!ctx || !ctx->current) return nk_vec2(0,0);\n    return nk_vec2(ctx->current->layout->clip.x + ctx->current->layout->clip.w,\n        ctx->current->layout->clip.y + ctx->current->layout->clip.h);\n}\nNK_API struct nk_vec2\nnk_window_get_content_region_size(struct nk_context *ctx)\n{\n    NK_ASSERT(ctx);\n    NK_ASSERT(ctx->current);\n    NK_ASSERT(ctx->current->layout);\n    if (!ctx || !ctx->current) return nk_vec2(0,0);\n    return nk_vec2(ctx->current->layout->clip.w, ctx->current->layout->clip.h);\n}\nNK_API struct nk_command_buffer*\nnk_window_get_canvas(struct nk_context *ctx)\n{\n    NK_ASSERT(ctx);\n    NK_ASSERT(ctx->current);\n    NK_ASSERT(ctx->current->layout);\n    if (!ctx || !ctx->current) return 0;\n    return &ctx->current->buffer;\n}\nNK_API struct nk_panel*\nnk_window_get_panel(struct nk_context *ctx)\n{\n    NK_ASSERT(ctx);\n    NK_ASSERT(ctx->current);\n    if (!ctx || !ctx->current) return 0;\n    return ctx->current->layout;\n}\nNK_API int\nnk_window_has_focus(const struct nk_context *ctx)\n{\n    NK_ASSERT(ctx);\n    NK_ASSERT(ctx->current);\n    NK_ASSERT(ctx->current->layout);\n    if (!ctx || !ctx->current) return 0;\n    return ctx->current == ctx->active;\n}\nNK_API int\nnk_window_is_hovered(struct nk_context *ctx)\n{\n    NK_ASSERT(ctx);\n    NK_ASSERT(ctx->current);\n    if (!ctx || !ctx->current) return 0;\n    if(ctx->current->flags & NK_WINDOW_HIDDEN)\n        return 0;\n    return nk_input_is_mouse_hovering_rect(&ctx->input, ctx->current->bounds);\n}\nNK_API int\nnk_window_is_any_hovered(struct nk_context *ctx)\n{\n    struct nk_window *iter;\n    NK_ASSERT(ctx);\n    if (!ctx) return 0;\n    iter = ctx->begin;\n    while (iter) {\n        /* check if window is being hovered */\n        if(!(iter->flags & NK_WINDOW_HIDDEN)) {\n            /* check if window popup is being hovered */\n            if (iter->popup.active && iter->popup.win && nk_input_is_mouse_hovering_rect(&ctx->input, iter->popup.win->bounds))\n                return 1;\n\n            if (iter->flags & NK_WINDOW_MINIMIZED) {\n                struct nk_rect header = iter->bounds;\n                header.h = ctx->style.font->height + 2 * ctx->style.window.header.padding.y;\n                if (nk_input_is_mouse_hovering_rect(&ctx->input, header))\n                    return 1;\n            } else if (nk_input_is_mouse_hovering_rect(&ctx->input, iter->bounds)) {\n                return 1;\n            }\n        }\n        iter = iter->next;\n    }\n    return 0;\n}\nNK_API int\nnk_item_is_any_active(struct nk_context *ctx)\n{\n    int any_hovered = nk_window_is_any_hovered(ctx);\n    int any_active = (ctx->last_widget_state & NK_WIDGET_STATE_MODIFIED);\n    return any_hovered || any_active;\n}\nNK_API int\nnk_window_is_collapsed(struct nk_context *ctx, const char *name)\n{\n    int title_len;\n    nk_hash title_hash;\n    struct nk_window *win;\n    NK_ASSERT(ctx);\n    if (!ctx) return 0;\n\n    title_len = (int)nk_strlen(name);\n    title_hash = nk_murmur_hash(name, (int)title_len, NK_WINDOW_TITLE);\n    win = nk_find_window(ctx, title_hash, name);\n    if (!win) return 0;\n    return win->flags & NK_WINDOW_MINIMIZED;\n}\nNK_API int\nnk_window_is_closed(struct nk_context *ctx, const char *name)\n{\n    int title_len;\n    nk_hash title_hash;\n    struct nk_window *win;\n    NK_ASSERT(ctx);\n    if (!ctx) return 1;\n\n    title_len = (int)nk_strlen(name);\n    title_hash = nk_murmur_hash(name, (int)title_len, NK_WINDOW_TITLE);\n    win = nk_find_window(ctx, title_hash, name);\n    if (!win) return 1;\n    return (win->flags & NK_WINDOW_CLOSED);\n}\nNK_API int\nnk_window_is_hidden(struct nk_context *ctx, const char *name)\n{\n    int title_len;\n    nk_hash title_hash;\n    struct nk_window *win;\n    NK_ASSERT(ctx);\n    if (!ctx) return 1;\n\n    title_len = (int)nk_strlen(name);\n    title_hash = nk_murmur_hash(name, (int)title_len, NK_WINDOW_TITLE);\n    win = nk_find_window(ctx, title_hash, name);\n    if (!win) return 1;\n    return (win->flags & NK_WINDOW_HIDDEN);\n}\nNK_API int\nnk_window_is_active(struct nk_context *ctx, const char *name)\n{\n    int title_len;\n    nk_hash title_hash;\n    struct nk_window *win;\n    NK_ASSERT(ctx);\n    if (!ctx) return 0;\n\n    title_len = (int)nk_strlen(name);\n    title_hash = nk_murmur_hash(name, (int)title_len, NK_WINDOW_TITLE);\n    win = nk_find_window(ctx, title_hash, name);\n    if (!win) return 0;\n    return win == ctx->active;\n}\nNK_API struct nk_window*\nnk_window_find(struct nk_context *ctx, const char *name)\n{\n    int title_len;\n    nk_hash title_hash;\n    title_len = (int)nk_strlen(name);\n    title_hash = nk_murmur_hash(name, (int)title_len, NK_WINDOW_TITLE);\n    return nk_find_window(ctx, title_hash, name);\n}\nNK_API void\nnk_window_close(struct nk_context *ctx, const char *name)\n{\n    struct nk_window *win;\n    NK_ASSERT(ctx);\n    if (!ctx) return;\n    win = nk_window_find(ctx, name);\n    if (!win) return;\n    NK_ASSERT(ctx->current != win && \"You cannot close a currently active window\");\n    if (ctx->current == win) return;\n    win->flags |= NK_WINDOW_HIDDEN;\n    win->flags |= NK_WINDOW_CLOSED;\n}\nNK_API void\nnk_window_set_bounds(struct nk_context *ctx,\n    const char *name, struct nk_rect bounds)\n{\n    struct nk_window *win;\n    NK_ASSERT(ctx);\n    if (!ctx) return;\n    win = nk_window_find(ctx, name);\n    if (!win) return;\n    NK_ASSERT(ctx->current != win && \"You cannot update a currently in procecss window\");\n    win->bounds = bounds;\n}\nNK_API void\nnk_window_set_position(struct nk_context *ctx,\n    const char *name, struct nk_vec2 pos)\n{\n    struct nk_window *win = nk_window_find(ctx, name);\n    if (!win) return;\n    win->bounds.x = pos.x;\n    win->bounds.y = pos.y;\n}\nNK_API void\nnk_window_set_size(struct nk_context *ctx,\n    const char *name, struct nk_vec2 size)\n{\n    struct nk_window *win = nk_window_find(ctx, name);\n    if (!win) return;\n    win->bounds.w = size.x;\n    win->bounds.h = size.y;\n}\nNK_API void\nnk_window_collapse(struct nk_context *ctx, const char *name,\n                    enum nk_collapse_states c)\n{\n    int title_len;\n    nk_hash title_hash;\n    struct nk_window *win;\n    NK_ASSERT(ctx);\n    if (!ctx) return;\n\n    title_len = (int)nk_strlen(name);\n    title_hash = nk_murmur_hash(name, (int)title_len, NK_WINDOW_TITLE);\n    win = nk_find_window(ctx, title_hash, name);\n    if (!win) return;\n    if (c == NK_MINIMIZED)\n        win->flags |= NK_WINDOW_MINIMIZED;\n    else win->flags &= ~(nk_flags)NK_WINDOW_MINIMIZED;\n}\nNK_API void\nnk_window_collapse_if(struct nk_context *ctx, const char *name,\n    enum nk_collapse_states c, int cond)\n{\n    NK_ASSERT(ctx);\n    if (!ctx || !cond) return;\n    nk_window_collapse(ctx, name, c);\n}\nNK_API void\nnk_window_show(struct nk_context *ctx, const char *name, enum nk_show_states s)\n{\n    int title_len;\n    nk_hash title_hash;\n    struct nk_window *win;\n    NK_ASSERT(ctx);\n    if (!ctx) return;\n\n    title_len = (int)nk_strlen(name);\n    title_hash = nk_murmur_hash(name, (int)title_len, NK_WINDOW_TITLE);\n    win = nk_find_window(ctx, title_hash, name);\n    if (!win) return;\n    if (s == NK_HIDDEN) {\n        win->flags |= NK_WINDOW_HIDDEN;\n    } else win->flags &= ~(nk_flags)NK_WINDOW_HIDDEN;\n}\nNK_API void\nnk_window_show_if(struct nk_context *ctx, const char *name,\n    enum nk_show_states s, int cond)\n{\n    NK_ASSERT(ctx);\n    if (!ctx || !cond) return;\n    nk_window_show(ctx, name, s);\n}\n\nNK_API void\nnk_window_set_focus(struct nk_context *ctx, const char *name)\n{\n    int title_len;\n    nk_hash title_hash;\n    struct nk_window *win;\n    NK_ASSERT(ctx);\n    if (!ctx) return;\n\n    title_len = (int)nk_strlen(name);\n    title_hash = nk_murmur_hash(name, (int)title_len, NK_WINDOW_TITLE);\n    win = nk_find_window(ctx, title_hash, name);\n    if (win && ctx->end != win) {\n        nk_remove_window(ctx, win);\n        nk_insert_window(ctx, win, NK_INSERT_BACK);\n    }\n    ctx->active = win;\n}\n\n\n\n\n\n/* ===============================================================\n *\n *                              POPUP\n *\n * ===============================================================*/\nNK_API int\nnk_popup_begin(struct nk_context *ctx, enum nk_popup_type type,\n    const char *title, nk_flags flags, struct nk_rect rect)\n{\n    struct nk_window *popup;\n    struct nk_window *win;\n    struct nk_panel *panel;\n\n    int title_len;\n    nk_hash title_hash;\n    nk_size allocated;\n\n    NK_ASSERT(ctx);\n    NK_ASSERT(title);\n    NK_ASSERT(ctx->current);\n    NK_ASSERT(ctx->current->layout);\n    if (!ctx || !ctx->current || !ctx->current->layout)\n        return 0;\n\n    win = ctx->current;\n    panel = win->layout;\n    NK_ASSERT(!(panel->type & NK_PANEL_SET_POPUP) && \"popups are not allowed to have popups\");\n    (void)panel;\n    title_len = (int)nk_strlen(title);\n    title_hash = nk_murmur_hash(title, (int)title_len, NK_PANEL_POPUP);\n\n    popup = win->popup.win;\n    if (!popup) {\n        popup = (struct nk_window*)nk_create_window(ctx);\n        popup->parent = win;\n        win->popup.win = popup;\n        win->popup.active = 0;\n        win->popup.type = NK_PANEL_POPUP;\n    }\n\n    /* make sure we have correct popup */\n    if (win->popup.name != title_hash) {\n        if (!win->popup.active) {\n            nk_zero(popup, sizeof(*popup));\n            win->popup.name = title_hash;\n            win->popup.active = 1;\n            win->popup.type = NK_PANEL_POPUP;\n        } else return 0;\n    }\n\n    /* popup position is local to window */\n    ctx->current = popup;\n    rect.x += win->layout->clip.x;\n    rect.y += win->layout->clip.y;\n\n    /* setup popup data */\n    popup->parent = win;\n    popup->bounds = rect;\n    popup->seq = ctx->seq;\n    popup->layout = (struct nk_panel*)nk_create_panel(ctx);\n    popup->flags = flags;\n    popup->flags |= NK_WINDOW_BORDER;\n    if (type == NK_POPUP_DYNAMIC)\n        popup->flags |= NK_WINDOW_DYNAMIC;\n\n    popup->buffer = win->buffer;\n    nk_start_popup(ctx, win);\n    allocated = ctx->memory.allocated;\n    nk_push_scissor(&popup->buffer, nk_null_rect);\n\n    if (nk_panel_begin(ctx, title, NK_PANEL_POPUP)) {\n        /* popup is running therefore invalidate parent panels */\n        struct nk_panel *root;\n        root = win->layout;\n        while (root) {\n            root->flags |= NK_WINDOW_ROM;\n            root->flags &= ~(nk_flags)NK_WINDOW_REMOVE_ROM;\n            root = root->parent;\n        }\n        win->popup.active = 1;\n        popup->layout->offset_x = &popup->scrollbar.x;\n        popup->layout->offset_y = &popup->scrollbar.y;\n        popup->layout->parent = win->layout;\n        return 1;\n    } else {\n        /* popup was closed/is invalid so cleanup */\n        struct nk_panel *root;\n        root = win->layout;\n        while (root) {\n            root->flags |= NK_WINDOW_REMOVE_ROM;\n            root = root->parent;\n        }\n        win->popup.buf.active = 0;\n        win->popup.active = 0;\n        ctx->memory.allocated = allocated;\n        ctx->current = win;\n        nk_free_panel(ctx, popup->layout);\n        popup->layout = 0;\n        return 0;\n    }\n}\nNK_LIB int\nnk_nonblock_begin(struct nk_context *ctx,\n    nk_flags flags, struct nk_rect body, struct nk_rect header,\n    enum nk_panel_type panel_type)\n{\n    struct nk_window *popup;\n    struct nk_window *win;\n    struct nk_panel *panel;\n    int is_active = nk_true;\n\n    NK_ASSERT(ctx);\n    NK_ASSERT(ctx->current);\n    NK_ASSERT(ctx->current->layout);\n    if (!ctx || !ctx->current || !ctx->current->layout)\n        return 0;\n\n    /* popups cannot have popups */\n    win = ctx->current;\n    panel = win->layout;\n    NK_ASSERT(!(panel->type & NK_PANEL_SET_POPUP));\n    (void)panel;\n    popup = win->popup.win;\n    if (!popup) {\n        /* create window for nonblocking popup */\n        popup = (struct nk_window*)nk_create_window(ctx);\n        popup->parent = win;\n        win->popup.win = popup;\n        win->popup.type = panel_type;\n        nk_command_buffer_init(&popup->buffer, &ctx->memory, NK_CLIPPING_ON);\n    } else {\n        /* close the popup if user pressed outside or in the header */\n        int pressed, in_body, in_header;\n        pressed = nk_input_is_mouse_pressed(&ctx->input, NK_BUTTON_LEFT);\n        in_body = nk_input_is_mouse_hovering_rect(&ctx->input, body);\n        in_header = nk_input_is_mouse_hovering_rect(&ctx->input, header);\n        if (pressed && (!in_body || in_header))\n            is_active = nk_false;\n    }\n    win->popup.header = header;\n\n    if (!is_active) {\n        /* remove read only mode from all parent panels */\n        struct nk_panel *root = win->layout;\n        while (root) {\n            root->flags |= NK_WINDOW_REMOVE_ROM;\n            root = root->parent;\n        }\n        return is_active;\n    }\n    popup->bounds = body;\n    popup->parent = win;\n    popup->layout = (struct nk_panel*)nk_create_panel(ctx);\n    popup->flags = flags;\n    popup->flags |= NK_WINDOW_BORDER;\n    popup->flags |= NK_WINDOW_DYNAMIC;\n    popup->seq = ctx->seq;\n    win->popup.active = 1;\n    NK_ASSERT(popup->layout);\n\n    nk_start_popup(ctx, win);\n    popup->buffer = win->buffer;\n    nk_push_scissor(&popup->buffer, nk_null_rect);\n    ctx->current = popup;\n\n    nk_panel_begin(ctx, 0, panel_type);\n    win->buffer = popup->buffer;\n    popup->layout->parent = win->layout;\n    popup->layout->offset_x = &popup->scrollbar.x;\n    popup->layout->offset_y = &popup->scrollbar.y;\n\n    /* set read only mode to all parent panels */\n    {struct nk_panel *root;\n    root = win->layout;\n    while (root) {\n        root->flags |= NK_WINDOW_ROM;\n        root = root->parent;\n    }}\n    return is_active;\n}\nNK_API void\nnk_popup_close(struct nk_context *ctx)\n{\n    struct nk_window *popup;\n    NK_ASSERT(ctx);\n    if (!ctx || !ctx->current) return;\n\n    popup = ctx->current;\n    NK_ASSERT(popup->parent);\n    NK_ASSERT(popup->layout->type & NK_PANEL_SET_POPUP);\n    popup->flags |= NK_WINDOW_HIDDEN;\n}\nNK_API void\nnk_popup_end(struct nk_context *ctx)\n{\n    struct nk_window *win;\n    struct nk_window *popup;\n\n    NK_ASSERT(ctx);\n    NK_ASSERT(ctx->current);\n    NK_ASSERT(ctx->current->layout);\n    if (!ctx || !ctx->current || !ctx->current->layout)\n        return;\n\n    popup = ctx->current;\n    if (!popup->parent) return;\n    win = popup->parent;\n    if (popup->flags & NK_WINDOW_HIDDEN) {\n        struct nk_panel *root;\n        root = win->layout;\n        while (root) {\n            root->flags |= NK_WINDOW_REMOVE_ROM;\n            root = root->parent;\n        }\n        win->popup.active = 0;\n    }\n    nk_push_scissor(&popup->buffer, nk_null_rect);\n    nk_end(ctx);\n\n    win->buffer = popup->buffer;\n    nk_finish_popup(ctx, win);\n    ctx->current = win;\n    nk_push_scissor(&win->buffer, win->layout->clip);\n}\n\n\n\n\n\n/* ==============================================================\n *\n *                          CONTEXTUAL\n *\n * ===============================================================*/\nNK_API int\nnk_contextual_begin(struct nk_context *ctx, nk_flags flags, struct nk_vec2 size,\n    struct nk_rect trigger_bounds)\n{\n    struct nk_window *win;\n    struct nk_window *popup;\n    struct nk_rect body;\n\n    NK_STORAGE const struct nk_rect null_rect = {-1,-1,0,0};\n    int is_clicked = 0;\n    int is_open = 0;\n    int ret = 0;\n\n    NK_ASSERT(ctx);\n    NK_ASSERT(ctx->current);\n    NK_ASSERT(ctx->current->layout);\n    if (!ctx || !ctx->current || !ctx->current->layout)\n        return 0;\n\n    win = ctx->current;\n    ++win->popup.con_count;\n    if (ctx->current != ctx->active)\n        return 0;\n\n    /* check if currently active contextual is active */\n    popup = win->popup.win;\n    is_open = (popup && win->popup.type == NK_PANEL_CONTEXTUAL);\n    is_clicked = nk_input_mouse_clicked(&ctx->input, NK_BUTTON_RIGHT, trigger_bounds);\n    if (win->popup.active_con && win->popup.con_count != win->popup.active_con)\n        return 0;\n    if (!is_open && win->popup.active_con)\n        win->popup.active_con = 0;\n    if ((!is_open && !is_clicked))\n        return 0;\n\n    /* calculate contextual position on click */\n    win->popup.active_con = win->popup.con_count;\n    if (is_clicked) {\n        body.x = ctx->input.mouse.pos.x;\n        body.y = ctx->input.mouse.pos.y;\n    } else {\n        body.x = popup->bounds.x;\n        body.y = popup->bounds.y;\n    }\n    body.w = size.x;\n    body.h = size.y;\n\n    /* start nonblocking contextual popup */\n    ret = nk_nonblock_begin(ctx, flags|NK_WINDOW_NO_SCROLLBAR, body,\n            null_rect, NK_PANEL_CONTEXTUAL);\n    if (ret) win->popup.type = NK_PANEL_CONTEXTUAL;\n    else {\n        win->popup.active_con = 0;\n        win->popup.type = NK_PANEL_NONE;\n        if (win->popup.win)\n            win->popup.win->flags = 0;\n    }\n    return ret;\n}\nNK_API int\nnk_contextual_item_text(struct nk_context *ctx, const char *text, int len,\n    nk_flags alignment)\n{\n    struct nk_window *win;\n    const struct nk_input *in;\n    const struct nk_style *style;\n\n    struct nk_rect bounds;\n    enum nk_widget_layout_states state;\n\n    NK_ASSERT(ctx);\n    NK_ASSERT(ctx->current);\n    NK_ASSERT(ctx->current->layout);\n    if (!ctx || !ctx->current || !ctx->current->layout)\n        return 0;\n\n    win = ctx->current;\n    style = &ctx->style;\n    state = nk_widget_fitting(&bounds, ctx, style->contextual_button.padding);\n    if (!state) return nk_false;\n\n    in = (state == NK_WIDGET_ROM || win->layout->flags & NK_WINDOW_ROM) ? 0 : &ctx->input;\n    if (nk_do_button_text(&ctx->last_widget_state, &win->buffer, bounds,\n        text, len, alignment, NK_BUTTON_DEFAULT, &style->contextual_button, in, style->font)) {\n        nk_contextual_close(ctx);\n        return nk_true;\n    }\n    return nk_false;\n}\nNK_API int\nnk_contextual_item_label(struct nk_context *ctx, const char *label, nk_flags align)\n{\n    return nk_contextual_item_text(ctx, label, nk_strlen(label), align);\n}\nNK_API int\nnk_contextual_item_image_text(struct nk_context *ctx, struct nk_image img,\n    const char *text, int len, nk_flags align)\n{\n    struct nk_window *win;\n    const struct nk_input *in;\n    const struct nk_style *style;\n\n    struct nk_rect bounds;\n    enum nk_widget_layout_states state;\n\n    NK_ASSERT(ctx);\n    NK_ASSERT(ctx->current);\n    NK_ASSERT(ctx->current->layout);\n    if (!ctx || !ctx->current || !ctx->current->layout)\n        return 0;\n\n    win = ctx->current;\n    style = &ctx->style;\n    state = nk_widget_fitting(&bounds, ctx, style->contextual_button.padding);\n    if (!state) return nk_false;\n\n    in = (state == NK_WIDGET_ROM || win->layout->flags & NK_WINDOW_ROM) ? 0 : &ctx->input;\n    if (nk_do_button_text_image(&ctx->last_widget_state, &win->buffer, bounds,\n        img, text, len, align, NK_BUTTON_DEFAULT, &style->contextual_button, style->font, in)){\n        nk_contextual_close(ctx);\n        return nk_true;\n    }\n    return nk_false;\n}\nNK_API int\nnk_contextual_item_image_label(struct nk_context *ctx, struct nk_image img,\n    const char *label, nk_flags align)\n{\n    return nk_contextual_item_image_text(ctx, img, label, nk_strlen(label), align);\n}\nNK_API int\nnk_contextual_item_symbol_text(struct nk_context *ctx, enum nk_symbol_type symbol,\n    const char *text, int len, nk_flags align)\n{\n    struct nk_window *win;\n    const struct nk_input *in;\n    const struct nk_style *style;\n\n    struct nk_rect bounds;\n    enum nk_widget_layout_states state;\n\n    NK_ASSERT(ctx);\n    NK_ASSERT(ctx->current);\n    NK_ASSERT(ctx->current->layout);\n    if (!ctx || !ctx->current || !ctx->current->layout)\n        return 0;\n\n    win = ctx->current;\n    style = &ctx->style;\n    state = nk_widget_fitting(&bounds, ctx, style->contextual_button.padding);\n    if (!state) return nk_false;\n\n    in = (state == NK_WIDGET_ROM || win->layout->flags & NK_WINDOW_ROM) ? 0 : &ctx->input;\n    if (nk_do_button_text_symbol(&ctx->last_widget_state, &win->buffer, bounds,\n        symbol, text, len, align, NK_BUTTON_DEFAULT, &style->contextual_button, style->font, in)) {\n        nk_contextual_close(ctx);\n        return nk_true;\n    }\n    return nk_false;\n}\nNK_API int\nnk_contextual_item_symbol_label(struct nk_context *ctx, enum nk_symbol_type symbol,\n    const char *text, nk_flags align)\n{\n    return nk_contextual_item_symbol_text(ctx, symbol, text, nk_strlen(text), align);\n}\nNK_API void\nnk_contextual_close(struct nk_context *ctx)\n{\n    NK_ASSERT(ctx);\n    NK_ASSERT(ctx->current);\n    NK_ASSERT(ctx->current->layout);\n    if (!ctx || !ctx->current || !ctx->current->layout) return;\n    nk_popup_close(ctx);\n}\nNK_API void\nnk_contextual_end(struct nk_context *ctx)\n{\n    struct nk_window *popup;\n    struct nk_panel *panel;\n    NK_ASSERT(ctx);\n    NK_ASSERT(ctx->current);\n    if (!ctx || !ctx->current) return;\n\n    popup = ctx->current;\n    panel = popup->layout;\n    NK_ASSERT(popup->parent);\n    NK_ASSERT(panel->type & NK_PANEL_SET_POPUP);\n    if (panel->flags & NK_WINDOW_DYNAMIC) {\n        /* Close behavior\n        This is a bit of a hack solution since we do not know before we end our popup\n        how big it will be. We therefore do not directly know when a\n        click outside the non-blocking popup must close it at that direct frame.\n        Instead it will be closed in the next frame.*/\n        struct nk_rect body = {0,0,0,0};\n        if (panel->at_y < (panel->bounds.y + panel->bounds.h)) {\n            struct nk_vec2 padding = nk_panel_get_padding(&ctx->style, panel->type);\n            body = panel->bounds;\n            body.y = (panel->at_y + panel->footer_height + panel->border + padding.y + panel->row.height);\n            body.h = (panel->bounds.y + panel->bounds.h) - body.y;\n        }\n        {int pressed = nk_input_is_mouse_pressed(&ctx->input, NK_BUTTON_LEFT);\n        int in_body = nk_input_is_mouse_hovering_rect(&ctx->input, body);\n        if (pressed && in_body)\n            popup->flags |= NK_WINDOW_HIDDEN;\n        }\n    }\n    if (popup->flags & NK_WINDOW_HIDDEN)\n        popup->seq = 0;\n    nk_popup_end(ctx);\n    return;\n}\n\n\n\n\n\n/* ===============================================================\n *\n *                              MENU\n *\n * ===============================================================*/\nNK_API void\nnk_menubar_begin(struct nk_context *ctx)\n{\n    struct nk_panel *layout;\n    NK_ASSERT(ctx);\n    NK_ASSERT(ctx->current);\n    NK_ASSERT(ctx->current->layout);\n    if (!ctx || !ctx->current || !ctx->current->layout)\n        return;\n\n    layout = ctx->current->layout;\n    NK_ASSERT(layout->at_y == layout->bounds.y);\n    /* if this assert triggers you allocated space between nk_begin and nk_menubar_begin.\n    If you want a menubar the first nuklear function after `nk_begin` has to be a\n    `nk_menubar_begin` call. Inside the menubar you then have to allocate space for\n    widgets (also supports multiple rows).\n    Example:\n        if (nk_begin(...)) {\n            nk_menubar_begin(...);\n                nk_layout_xxxx(...);\n                nk_button(...);\n                nk_layout_xxxx(...);\n                nk_button(...);\n            nk_menubar_end(...);\n        }\n        nk_end(...);\n    */\n    if (layout->flags & NK_WINDOW_HIDDEN || layout->flags & NK_WINDOW_MINIMIZED)\n        return;\n\n    layout->menu.x = layout->at_x;\n    layout->menu.y = layout->at_y + layout->row.height;\n    layout->menu.w = layout->bounds.w;\n    layout->menu.offset.x = *layout->offset_x;\n    layout->menu.offset.y = *layout->offset_y;\n    *layout->offset_y = 0;\n}\nNK_API void\nnk_menubar_end(struct nk_context *ctx)\n{\n    struct nk_window *win;\n    struct nk_panel *layout;\n    struct nk_command_buffer *out;\n\n    NK_ASSERT(ctx);\n    NK_ASSERT(ctx->current);\n    NK_ASSERT(ctx->current->layout);\n    if (!ctx || !ctx->current || !ctx->current->layout)\n        return;\n\n    win = ctx->current;\n    out = &win->buffer;\n    layout = win->layout;\n    if (layout->flags & NK_WINDOW_HIDDEN || layout->flags & NK_WINDOW_MINIMIZED)\n        return;\n\n    layout->menu.h = layout->at_y - layout->menu.y;\n    layout->bounds.y += layout->menu.h + ctx->style.window.spacing.y + layout->row.height;\n    layout->bounds.h -= layout->menu.h + ctx->style.window.spacing.y + layout->row.height;\n\n    *layout->offset_x = layout->menu.offset.x;\n    *layout->offset_y = layout->menu.offset.y;\n    layout->at_y = layout->bounds.y - layout->row.height;\n\n    layout->clip.y = layout->bounds.y;\n    layout->clip.h = layout->bounds.h;\n    nk_push_scissor(out, layout->clip);\n}\nNK_INTERN int\nnk_menu_begin(struct nk_context *ctx, struct nk_window *win,\n    const char *id, int is_clicked, struct nk_rect header, struct nk_vec2 size)\n{\n    int is_open = 0;\n    int is_active = 0;\n    struct nk_rect body;\n    struct nk_window *popup;\n    nk_hash hash = nk_murmur_hash(id, (int)nk_strlen(id), NK_PANEL_MENU);\n\n    NK_ASSERT(ctx);\n    NK_ASSERT(ctx->current);\n    NK_ASSERT(ctx->current->layout);\n    if (!ctx || !ctx->current || !ctx->current->layout)\n        return 0;\n\n    body.x = header.x;\n    body.w = size.x;\n    body.y = header.y + header.h;\n    body.h = size.y;\n\n    popup = win->popup.win;\n    is_open = popup ? nk_true : nk_false;\n    is_active = (popup && (win->popup.name == hash) && win->popup.type == NK_PANEL_MENU);\n    if ((is_clicked && is_open && !is_active) || (is_open && !is_active) ||\n        (!is_open && !is_active && !is_clicked)) return 0;\n    if (!nk_nonblock_begin(ctx, NK_WINDOW_NO_SCROLLBAR, body, header, NK_PANEL_MENU))\n        return 0;\n\n    win->popup.type = NK_PANEL_MENU;\n    win->popup.name = hash;\n    return 1;\n}\nNK_API int\nnk_menu_begin_text(struct nk_context *ctx, const char *title, int len,\n    nk_flags align, struct nk_vec2 size)\n{\n    struct nk_window *win;\n    const struct nk_input *in;\n    struct nk_rect header;\n    int is_clicked = nk_false;\n    nk_flags state;\n\n    NK_ASSERT(ctx);\n    NK_ASSERT(ctx->current);\n    NK_ASSERT(ctx->current->layout);\n    if (!ctx || !ctx->current || !ctx->current->layout)\n        return 0;\n\n    win = ctx->current;\n    state = nk_widget(&header, ctx);\n    if (!state) return 0;\n    in = (state == NK_WIDGET_ROM || win->flags & NK_WINDOW_ROM) ? 0 : &ctx->input;\n    if (nk_do_button_text(&ctx->last_widget_state, &win->buffer, header,\n        title, len, align, NK_BUTTON_DEFAULT, &ctx->style.menu_button, in, ctx->style.font))\n        is_clicked = nk_true;\n    return nk_menu_begin(ctx, win, title, is_clicked, header, size);\n}\nNK_API int nk_menu_begin_label(struct nk_context *ctx,\n    const char *text, nk_flags align, struct nk_vec2 size)\n{\n    return nk_menu_begin_text(ctx, text, nk_strlen(text), align, size);\n}\nNK_API int\nnk_menu_begin_image(struct nk_context *ctx, const char *id, struct nk_image img,\n    struct nk_vec2 size)\n{\n    struct nk_window *win;\n    struct nk_rect header;\n    const struct nk_input *in;\n    int is_clicked = nk_false;\n    nk_flags state;\n\n    NK_ASSERT(ctx);\n    NK_ASSERT(ctx->current);\n    NK_ASSERT(ctx->current->layout);\n    if (!ctx || !ctx->current || !ctx->current->layout)\n        return 0;\n\n    win = ctx->current;\n    state = nk_widget(&header, ctx);\n    if (!state) return 0;\n    in = (state == NK_WIDGET_ROM || win->layout->flags & NK_WINDOW_ROM) ? 0 : &ctx->input;\n    if (nk_do_button_image(&ctx->last_widget_state, &win->buffer, header,\n        img, NK_BUTTON_DEFAULT, &ctx->style.menu_button, in))\n        is_clicked = nk_true;\n    return nk_menu_begin(ctx, win, id, is_clicked, header, size);\n}\nNK_API int\nnk_menu_begin_symbol(struct nk_context *ctx, const char *id,\n    enum nk_symbol_type sym, struct nk_vec2 size)\n{\n    struct nk_window *win;\n    const struct nk_input *in;\n    struct nk_rect header;\n    int is_clicked = nk_false;\n    nk_flags state;\n\n    NK_ASSERT(ctx);\n    NK_ASSERT(ctx->current);\n    NK_ASSERT(ctx->current->layout);\n    if (!ctx || !ctx->current || !ctx->current->layout)\n        return 0;\n\n    win = ctx->current;\n    state = nk_widget(&header, ctx);\n    if (!state) return 0;\n    in = (state == NK_WIDGET_ROM || win->layout->flags & NK_WINDOW_ROM) ? 0 : &ctx->input;\n    if (nk_do_button_symbol(&ctx->last_widget_state,  &win->buffer, header,\n        sym, NK_BUTTON_DEFAULT, &ctx->style.menu_button, in, ctx->style.font))\n        is_clicked = nk_true;\n    return nk_menu_begin(ctx, win, id, is_clicked, header, size);\n}\nNK_API int\nnk_menu_begin_image_text(struct nk_context *ctx, const char *title, int len,\n    nk_flags align, struct nk_image img, struct nk_vec2 size)\n{\n    struct nk_window *win;\n    struct nk_rect header;\n    const struct nk_input *in;\n    int is_clicked = nk_false;\n    nk_flags state;\n\n    NK_ASSERT(ctx);\n    NK_ASSERT(ctx->current);\n    NK_ASSERT(ctx->current->layout);\n    if (!ctx || !ctx->current || !ctx->current->layout)\n        return 0;\n\n    win = ctx->current;\n    state = nk_widget(&header, ctx);\n    if (!state) return 0;\n    in = (state == NK_WIDGET_ROM || win->layout->flags & NK_WINDOW_ROM) ? 0 : &ctx->input;\n    if (nk_do_button_text_image(&ctx->last_widget_state, &win->buffer,\n        header, img, title, len, align, NK_BUTTON_DEFAULT, &ctx->style.menu_button,\n        ctx->style.font, in))\n        is_clicked = nk_true;\n    return nk_menu_begin(ctx, win, title, is_clicked, header, size);\n}\nNK_API int\nnk_menu_begin_image_label(struct nk_context *ctx,\n    const char *title, nk_flags align, struct nk_image img, struct nk_vec2 size)\n{\n    return nk_menu_begin_image_text(ctx, title, nk_strlen(title), align, img, size);\n}\nNK_API int\nnk_menu_begin_symbol_text(struct nk_context *ctx, const char *title, int len,\n    nk_flags align, enum nk_symbol_type sym, struct nk_vec2 size)\n{\n    struct nk_window *win;\n    struct nk_rect header;\n    const struct nk_input *in;\n    int is_clicked = nk_false;\n    nk_flags state;\n\n    NK_ASSERT(ctx);\n    NK_ASSERT(ctx->current);\n    NK_ASSERT(ctx->current->layout);\n    if (!ctx || !ctx->current || !ctx->current->layout)\n        return 0;\n\n    win = ctx->current;\n    state = nk_widget(&header, ctx);\n    if (!state) return 0;\n\n    in = (state == NK_WIDGET_ROM || win->layout->flags & NK_WINDOW_ROM) ? 0 : &ctx->input;\n    if (nk_do_button_text_symbol(&ctx->last_widget_state, &win->buffer,\n        header, sym, title, len, align, NK_BUTTON_DEFAULT, &ctx->style.menu_button,\n        ctx->style.font, in)) is_clicked = nk_true;\n    return nk_menu_begin(ctx, win, title, is_clicked, header, size);\n}\nNK_API int\nnk_menu_begin_symbol_label(struct nk_context *ctx,\n    const char *title, nk_flags align, enum nk_symbol_type sym, struct nk_vec2 size )\n{\n    return nk_menu_begin_symbol_text(ctx, title, nk_strlen(title), align,sym,size);\n}\nNK_API int\nnk_menu_item_text(struct nk_context *ctx, const char *title, int len, nk_flags align)\n{\n    return nk_contextual_item_text(ctx, title, len, align);\n}\nNK_API int\nnk_menu_item_label(struct nk_context *ctx, const char *label, nk_flags align)\n{\n    return nk_contextual_item_label(ctx, label, align);\n}\nNK_API int\nnk_menu_item_image_label(struct nk_context *ctx, struct nk_image img,\n    const char *label, nk_flags align)\n{\n    return nk_contextual_item_image_label(ctx, img, label, align);\n}\nNK_API int\nnk_menu_item_image_text(struct nk_context *ctx, struct nk_image img,\n    const char *text, int len, nk_flags align)\n{\n    return nk_contextual_item_image_text(ctx, img, text, len, align);\n}\nNK_API int nk_menu_item_symbol_text(struct nk_context *ctx, enum nk_symbol_type sym,\n    const char *text, int len, nk_flags align)\n{\n    return nk_contextual_item_symbol_text(ctx, sym, text, len, align);\n}\nNK_API int nk_menu_item_symbol_label(struct nk_context *ctx, enum nk_symbol_type sym,\n    const char *label, nk_flags align)\n{\n    return nk_contextual_item_symbol_label(ctx, sym, label, align);\n}\nNK_API void nk_menu_close(struct nk_context *ctx)\n{\n    nk_contextual_close(ctx);\n}\nNK_API void\nnk_menu_end(struct nk_context *ctx)\n{\n    nk_contextual_end(ctx);\n}\n\n\n\n\n\n/* ===============================================================\n *\n *                          LAYOUT\n *\n * ===============================================================*/\nNK_API void\nnk_layout_set_min_row_height(struct nk_context *ctx, float height)\n{\n    struct nk_window *win;\n    struct nk_panel *layout;\n\n    NK_ASSERT(ctx);\n    NK_ASSERT(ctx->current);\n    NK_ASSERT(ctx->current->layout);\n    if (!ctx || !ctx->current || !ctx->current->layout)\n        return;\n\n    win = ctx->current;\n    layout = win->layout;\n    layout->row.min_height = height;\n}\nNK_API void\nnk_layout_reset_min_row_height(struct nk_context *ctx)\n{\n    struct nk_window *win;\n    struct nk_panel *layout;\n\n    NK_ASSERT(ctx);\n    NK_ASSERT(ctx->current);\n    NK_ASSERT(ctx->current->layout);\n    if (!ctx || !ctx->current || !ctx->current->layout)\n        return;\n\n    win = ctx->current;\n    layout = win->layout;\n    layout->row.min_height = ctx->style.font->height;\n    layout->row.min_height += ctx->style.text.padding.y*2;\n    layout->row.min_height += ctx->style.window.min_row_height_padding*2;\n}\nNK_LIB float\nnk_layout_row_calculate_usable_space(const struct nk_style *style, enum nk_panel_type type,\n    float total_space, int columns)\n{\n    float panel_padding;\n    float panel_spacing;\n    float panel_space;\n\n    struct nk_vec2 spacing;\n    struct nk_vec2 padding;\n\n    spacing = style->window.spacing;\n    padding = nk_panel_get_padding(style, type);\n\n    /* calculate the usable panel space */\n    panel_padding = 2 * padding.x;\n    panel_spacing = (float)NK_MAX(columns - 1, 0) * spacing.x;\n    panel_space  = total_space - panel_padding - panel_spacing;\n    return panel_space;\n}\nNK_LIB void\nnk_panel_layout(const struct nk_context *ctx, struct nk_window *win,\n    float height, int cols)\n{\n    struct nk_panel *layout;\n    const struct nk_style *style;\n    struct nk_command_buffer *out;\n\n    struct nk_vec2 item_spacing;\n    struct nk_color color;\n\n    NK_ASSERT(ctx);\n    NK_ASSERT(ctx->current);\n    NK_ASSERT(ctx->current->layout);\n    if (!ctx || !ctx->current || !ctx->current->layout)\n        return;\n\n    /* prefetch some configuration data */\n    layout = win->layout;\n    style = &ctx->style;\n    out = &win->buffer;\n    color = style->window.background;\n    item_spacing = style->window.spacing;\n\n    /*  if one of these triggers you forgot to add an `if` condition around either\n        a window, group, popup, combobox or contextual menu `begin` and `end` block.\n        Example:\n            if (nk_begin(...) {...} nk_end(...); or\n            if (nk_group_begin(...) { nk_group_end(...);} */\n    NK_ASSERT(!(layout->flags & NK_WINDOW_MINIMIZED));\n    NK_ASSERT(!(layout->flags & NK_WINDOW_HIDDEN));\n    NK_ASSERT(!(layout->flags & NK_WINDOW_CLOSED));\n\n    /* update the current row and set the current row layout */\n    layout->row.index = 0;\n    layout->at_y += layout->row.height;\n    layout->row.columns = cols;\n    if (height == 0.0f)\n        layout->row.height = NK_MAX(height, layout->row.min_height) + item_spacing.y;\n    else layout->row.height = height + item_spacing.y;\n\n    layout->row.item_offset = 0;\n    if (layout->flags & NK_WINDOW_DYNAMIC) {\n        /* draw background for dynamic panels */\n        struct nk_rect background;\n        background.x = win->bounds.x;\n        background.w = win->bounds.w;\n        background.y = layout->at_y - 1.0f;\n        background.h = layout->row.height + 1.0f;\n        nk_fill_rect(out, background, 0, color);\n    }\n}\nNK_LIB void\nnk_row_layout(struct nk_context *ctx, enum nk_layout_format fmt,\n    float height, int cols, int width)\n{\n    /* update the current row and set the current row layout */\n    struct nk_window *win;\n    NK_ASSERT(ctx);\n    NK_ASSERT(ctx->current);\n    NK_ASSERT(ctx->current->layout);\n    if (!ctx || !ctx->current || !ctx->current->layout)\n        return;\n\n    win = ctx->current;\n    nk_panel_layout(ctx, win, height, cols);\n    if (fmt == NK_DYNAMIC)\n        win->layout->row.type = NK_LAYOUT_DYNAMIC_FIXED;\n    else win->layout->row.type = NK_LAYOUT_STATIC_FIXED;\n\n    win->layout->row.ratio = 0;\n    win->layout->row.filled = 0;\n    win->layout->row.item_offset = 0;\n    win->layout->row.item_width = (float)width;\n}\nNK_API float\nnk_layout_ratio_from_pixel(struct nk_context *ctx, float pixel_width)\n{\n    struct nk_window *win;\n    NK_ASSERT(ctx);\n    NK_ASSERT(pixel_width);\n    if (!ctx || !ctx->current || !ctx->current->layout) return 0;\n    win = ctx->current;\n    return NK_CLAMP(0.0f, pixel_width/win->bounds.x, 1.0f);\n}\nNK_API void\nnk_layout_row_dynamic(struct nk_context *ctx, float height, int cols)\n{\n    nk_row_layout(ctx, NK_DYNAMIC, height, cols, 0);\n}\nNK_API void\nnk_layout_row_static(struct nk_context *ctx, float height, int item_width, int cols)\n{\n    nk_row_layout(ctx, NK_STATIC, height, cols, item_width);\n}\nNK_API void\nnk_layout_row_begin(struct nk_context *ctx, enum nk_layout_format fmt,\n    float row_height, int cols)\n{\n    struct nk_window *win;\n    struct nk_panel *layout;\n\n    NK_ASSERT(ctx);\n    NK_ASSERT(ctx->current);\n    NK_ASSERT(ctx->current->layout);\n    if (!ctx || !ctx->current || !ctx->current->layout)\n        return;\n\n    win = ctx->current;\n    layout = win->layout;\n    nk_panel_layout(ctx, win, row_height, cols);\n    if (fmt == NK_DYNAMIC)\n        layout->row.type = NK_LAYOUT_DYNAMIC_ROW;\n    else layout->row.type = NK_LAYOUT_STATIC_ROW;\n\n    layout->row.ratio = 0;\n    layout->row.filled = 0;\n    layout->row.item_width = 0;\n    layout->row.item_offset = 0;\n    layout->row.columns = cols;\n}\nNK_API void\nnk_layout_row_push(struct nk_context *ctx, float ratio_or_width)\n{\n    struct nk_window *win;\n    struct nk_panel *layout;\n\n    NK_ASSERT(ctx);\n    NK_ASSERT(ctx->current);\n    NK_ASSERT(ctx->current->layout);\n    if (!ctx || !ctx->current || !ctx->current->layout)\n        return;\n\n    win = ctx->current;\n    layout = win->layout;\n    NK_ASSERT(layout->row.type == NK_LAYOUT_STATIC_ROW || layout->row.type == NK_LAYOUT_DYNAMIC_ROW);\n    if (layout->row.type != NK_LAYOUT_STATIC_ROW && layout->row.type != NK_LAYOUT_DYNAMIC_ROW)\n        return;\n\n    if (layout->row.type == NK_LAYOUT_DYNAMIC_ROW) {\n        float ratio = ratio_or_width;\n        if ((ratio + layout->row.filled) > 1.0f) return;\n        if (ratio > 0.0f)\n            layout->row.item_width = NK_SATURATE(ratio);\n        else layout->row.item_width = 1.0f - layout->row.filled;\n    } else layout->row.item_width = ratio_or_width;\n}\nNK_API void\nnk_layout_row_end(struct nk_context *ctx)\n{\n    struct nk_window *win;\n    struct nk_panel *layout;\n\n    NK_ASSERT(ctx);\n    NK_ASSERT(ctx->current);\n    NK_ASSERT(ctx->current->layout);\n    if (!ctx || !ctx->current || !ctx->current->layout)\n        return;\n\n    win = ctx->current;\n    layout = win->layout;\n    NK_ASSERT(layout->row.type == NK_LAYOUT_STATIC_ROW || layout->row.type == NK_LAYOUT_DYNAMIC_ROW);\n    if (layout->row.type != NK_LAYOUT_STATIC_ROW && layout->row.type != NK_LAYOUT_DYNAMIC_ROW)\n        return;\n    layout->row.item_width = 0;\n    layout->row.item_offset = 0;\n}\nNK_API void\nnk_layout_row(struct nk_context *ctx, enum nk_layout_format fmt,\n    float height, int cols, const float *ratio)\n{\n    int i;\n    int n_undef = 0;\n    struct nk_window *win;\n    struct nk_panel *layout;\n\n    NK_ASSERT(ctx);\n    NK_ASSERT(ctx->current);\n    NK_ASSERT(ctx->current->layout);\n    if (!ctx || !ctx->current || !ctx->current->layout)\n        return;\n\n    win = ctx->current;\n    layout = win->layout;\n    nk_panel_layout(ctx, win, height, cols);\n    if (fmt == NK_DYNAMIC) {\n        /* calculate width of undefined widget ratios */\n        float r = 0;\n        layout->row.ratio = ratio;\n        for (i = 0; i < cols; ++i) {\n            if (ratio[i] < 0.0f)\n                n_undef++;\n            else r += ratio[i];\n        }\n        r = NK_SATURATE(1.0f - r);\n        layout->row.type = NK_LAYOUT_DYNAMIC;\n        layout->row.item_width = (r > 0 && n_undef > 0) ? (r / (float)n_undef):0;\n    } else {\n        layout->row.ratio = ratio;\n        layout->row.type = NK_LAYOUT_STATIC;\n        layout->row.item_width = 0;\n        layout->row.item_offset = 0;\n    }\n    layout->row.item_offset = 0;\n    layout->row.filled = 0;\n}\nNK_API void\nnk_layout_row_template_begin(struct nk_context *ctx, float height)\n{\n    struct nk_window *win;\n    struct nk_panel *layout;\n\n    NK_ASSERT(ctx);\n    NK_ASSERT(ctx->current);\n    NK_ASSERT(ctx->current->layout);\n    if (!ctx || !ctx->current || !ctx->current->layout)\n        return;\n\n    win = ctx->current;\n    layout = win->layout;\n    nk_panel_layout(ctx, win, height, 1);\n    layout->row.type = NK_LAYOUT_TEMPLATE;\n    layout->row.columns = 0;\n    layout->row.ratio = 0;\n    layout->row.item_width = 0;\n    layout->row.item_height = 0;\n    layout->row.item_offset = 0;\n    layout->row.filled = 0;\n    layout->row.item.x = 0;\n    layout->row.item.y = 0;\n    layout->row.item.w = 0;\n    layout->row.item.h = 0;\n}\nNK_API void\nnk_layout_row_template_push_dynamic(struct nk_context *ctx)\n{\n    struct nk_window *win;\n    struct nk_panel *layout;\n\n    NK_ASSERT(ctx);\n    NK_ASSERT(ctx->current);\n    NK_ASSERT(ctx->current->layout);\n    if (!ctx || !ctx->current || !ctx->current->layout)\n        return;\n\n    win = ctx->current;\n    layout = win->layout;\n    NK_ASSERT(layout->row.type == NK_LAYOUT_TEMPLATE);\n    NK_ASSERT(layout->row.columns < NK_MAX_LAYOUT_ROW_TEMPLATE_COLUMNS);\n    if (layout->row.type != NK_LAYOUT_TEMPLATE) return;\n    if (layout->row.columns >= NK_MAX_LAYOUT_ROW_TEMPLATE_COLUMNS) return;\n    layout->row.templates[layout->row.columns++] = -1.0f;\n}\nNK_API void\nnk_layout_row_template_push_variable(struct nk_context *ctx, float min_width)\n{\n    struct nk_window *win;\n    struct nk_panel *layout;\n\n    NK_ASSERT(ctx);\n    NK_ASSERT(ctx->current);\n    NK_ASSERT(ctx->current->layout);\n    if (!ctx || !ctx->current || !ctx->current->layout)\n        return;\n\n    win = ctx->current;\n    layout = win->layout;\n    NK_ASSERT(layout->row.type == NK_LAYOUT_TEMPLATE);\n    NK_ASSERT(layout->row.columns < NK_MAX_LAYOUT_ROW_TEMPLATE_COLUMNS);\n    if (layout->row.type != NK_LAYOUT_TEMPLATE) return;\n    if (layout->row.columns >= NK_MAX_LAYOUT_ROW_TEMPLATE_COLUMNS) return;\n    layout->row.templates[layout->row.columns++] = -min_width;\n}\nNK_API void\nnk_layout_row_template_push_static(struct nk_context *ctx, float width)\n{\n    struct nk_window *win;\n    struct nk_panel *layout;\n\n    NK_ASSERT(ctx);\n    NK_ASSERT(ctx->current);\n    NK_ASSERT(ctx->current->layout);\n    if (!ctx || !ctx->current || !ctx->current->layout)\n        return;\n\n    win = ctx->current;\n    layout = win->layout;\n    NK_ASSERT(layout->row.type == NK_LAYOUT_TEMPLATE);\n    NK_ASSERT(layout->row.columns < NK_MAX_LAYOUT_ROW_TEMPLATE_COLUMNS);\n    if (layout->row.type != NK_LAYOUT_TEMPLATE) return;\n    if (layout->row.columns >= NK_MAX_LAYOUT_ROW_TEMPLATE_COLUMNS) return;\n    layout->row.templates[layout->row.columns++] = width;\n}\nNK_API void\nnk_layout_row_template_end(struct nk_context *ctx)\n{\n    struct nk_window *win;\n    struct nk_panel *layout;\n\n    int i = 0;\n    int variable_count = 0;\n    int min_variable_count = 0;\n    float min_fixed_width = 0.0f;\n    float total_fixed_width = 0.0f;\n    float max_variable_width = 0.0f;\n\n    NK_ASSERT(ctx);\n    NK_ASSERT(ctx->current);\n    NK_ASSERT(ctx->current->layout);\n    if (!ctx || !ctx->current || !ctx->current->layout)\n        return;\n\n    win = ctx->current;\n    layout = win->layout;\n    NK_ASSERT(layout->row.type == NK_LAYOUT_TEMPLATE);\n    if (layout->row.type != NK_LAYOUT_TEMPLATE) return;\n    for (i = 0; i < layout->row.columns; ++i) {\n        float width = layout->row.templates[i];\n        if (width >= 0.0f) {\n            total_fixed_width += width;\n            min_fixed_width += width;\n        } else if (width < -1.0f) {\n            width = -width;\n            total_fixed_width += width;\n            max_variable_width = NK_MAX(max_variable_width, width);\n            variable_count++;\n        } else {\n            min_variable_count++;\n            variable_count++;\n        }\n    }\n    if (variable_count) {\n        float space = nk_layout_row_calculate_usable_space(&ctx->style, layout->type,\n                            layout->bounds.w, layout->row.columns);\n        float var_width = (NK_MAX(space-min_fixed_width,0.0f)) / (float)variable_count;\n        int enough_space = var_width >= max_variable_width;\n        if (!enough_space)\n            var_width = (NK_MAX(space-total_fixed_width,0)) / (float)min_variable_count;\n        for (i = 0; i < layout->row.columns; ++i) {\n            float *width = &layout->row.templates[i];\n            *width = (*width >= 0.0f)? *width: (*width < -1.0f && !enough_space)? -(*width): var_width;\n        }\n    }\n}\nNK_API void\nnk_layout_space_begin(struct nk_context *ctx, enum nk_layout_format fmt,\n    float height, int widget_count)\n{\n    struct nk_window *win;\n    struct nk_panel *layout;\n\n    NK_ASSERT(ctx);\n    NK_ASSERT(ctx->current);\n    NK_ASSERT(ctx->current->layout);\n    if (!ctx || !ctx->current || !ctx->current->layout)\n        return;\n\n    win = ctx->current;\n    layout = win->layout;\n    nk_panel_layout(ctx, win, height, widget_count);\n    if (fmt == NK_STATIC)\n        layout->row.type = NK_LAYOUT_STATIC_FREE;\n    else layout->row.type = NK_LAYOUT_DYNAMIC_FREE;\n\n    layout->row.ratio = 0;\n    layout->row.filled = 0;\n    layout->row.item_width = 0;\n    layout->row.item_offset = 0;\n}\nNK_API void\nnk_layout_space_end(struct nk_context *ctx)\n{\n    struct nk_window *win;\n    struct nk_panel *layout;\n\n    NK_ASSERT(ctx);\n    NK_ASSERT(ctx->current);\n    NK_ASSERT(ctx->current->layout);\n    if (!ctx || !ctx->current || !ctx->current->layout)\n        return;\n\n    win = ctx->current;\n    layout = win->layout;\n    layout->row.item_width = 0;\n    layout->row.item_height = 0;\n    layout->row.item_offset = 0;\n    nk_zero(&layout->row.item, sizeof(layout->row.item));\n}\nNK_API void\nnk_layout_space_push(struct nk_context *ctx, struct nk_rect rect)\n{\n    struct nk_window *win;\n    struct nk_panel *layout;\n\n    NK_ASSERT(ctx);\n    NK_ASSERT(ctx->current);\n    NK_ASSERT(ctx->current->layout);\n    if (!ctx || !ctx->current || !ctx->current->layout)\n        return;\n\n    win = ctx->current;\n    layout = win->layout;\n    layout->row.item = rect;\n}\nNK_API struct nk_rect\nnk_layout_space_bounds(struct nk_context *ctx)\n{\n    struct nk_rect ret;\n    struct nk_window *win;\n    struct nk_panel *layout;\n\n    NK_ASSERT(ctx);\n    NK_ASSERT(ctx->current);\n    NK_ASSERT(ctx->current->layout);\n    win = ctx->current;\n    layout = win->layout;\n\n    ret.x = layout->clip.x;\n    ret.y = layout->clip.y;\n    ret.w = layout->clip.w;\n    ret.h = layout->row.height;\n    return ret;\n}\nNK_API struct nk_rect\nnk_layout_widget_bounds(struct nk_context *ctx)\n{\n    struct nk_rect ret;\n    struct nk_window *win;\n    struct nk_panel *layout;\n\n    NK_ASSERT(ctx);\n    NK_ASSERT(ctx->current);\n    NK_ASSERT(ctx->current->layout);\n    win = ctx->current;\n    layout = win->layout;\n\n    ret.x = layout->at_x;\n    ret.y = layout->at_y;\n    ret.w = layout->bounds.w - NK_MAX(layout->at_x - layout->bounds.x,0);\n    ret.h = layout->row.height;\n    return ret;\n}\nNK_API struct nk_vec2\nnk_layout_space_to_screen(struct nk_context *ctx, struct nk_vec2 ret)\n{\n    struct nk_window *win;\n    struct nk_panel *layout;\n\n    NK_ASSERT(ctx);\n    NK_ASSERT(ctx->current);\n    NK_ASSERT(ctx->current->layout);\n    win = ctx->current;\n    layout = win->layout;\n\n    ret.x += layout->at_x - (float)*layout->offset_x;\n    ret.y += layout->at_y - (float)*layout->offset_y;\n    return ret;\n}\nNK_API struct nk_vec2\nnk_layout_space_to_local(struct nk_context *ctx, struct nk_vec2 ret)\n{\n    struct nk_window *win;\n    struct nk_panel *layout;\n\n    NK_ASSERT(ctx);\n    NK_ASSERT(ctx->current);\n    NK_ASSERT(ctx->current->layout);\n    win = ctx->current;\n    layout = win->layout;\n\n    ret.x += -layout->at_x + (float)*layout->offset_x;\n    ret.y += -layout->at_y + (float)*layout->offset_y;\n    return ret;\n}\nNK_API struct nk_rect\nnk_layout_space_rect_to_screen(struct nk_context *ctx, struct nk_rect ret)\n{\n    struct nk_window *win;\n    struct nk_panel *layout;\n\n    NK_ASSERT(ctx);\n    NK_ASSERT(ctx->current);\n    NK_ASSERT(ctx->current->layout);\n    win = ctx->current;\n    layout = win->layout;\n\n    ret.x += layout->at_x - (float)*layout->offset_x;\n    ret.y += layout->at_y - (float)*layout->offset_y;\n    return ret;\n}\nNK_API struct nk_rect\nnk_layout_space_rect_to_local(struct nk_context *ctx, struct nk_rect ret)\n{\n    struct nk_window *win;\n    struct nk_panel *layout;\n\n    NK_ASSERT(ctx);\n    NK_ASSERT(ctx->current);\n    NK_ASSERT(ctx->current->layout);\n    win = ctx->current;\n    layout = win->layout;\n\n    ret.x += -layout->at_x + (float)*layout->offset_x;\n    ret.y += -layout->at_y + (float)*layout->offset_y;\n    return ret;\n}\nNK_LIB void\nnk_panel_alloc_row(const struct nk_context *ctx, struct nk_window *win)\n{\n    struct nk_panel *layout = win->layout;\n    struct nk_vec2 spacing = ctx->style.window.spacing;\n    const float row_height = layout->row.height - spacing.y;\n    nk_panel_layout(ctx, win, row_height, layout->row.columns);\n}\nNK_LIB void\nnk_layout_widget_space(struct nk_rect *bounds, const struct nk_context *ctx,\n    struct nk_window *win, int modify)\n{\n    struct nk_panel *layout;\n    const struct nk_style *style;\n\n    struct nk_vec2 spacing;\n    struct nk_vec2 padding;\n\n    float item_offset = 0;\n    float item_width = 0;\n    float item_spacing = 0;\n    float panel_space = 0;\n\n    NK_ASSERT(ctx);\n    NK_ASSERT(ctx->current);\n    NK_ASSERT(ctx->current->layout);\n    if (!ctx || !ctx->current || !ctx->current->layout)\n        return;\n\n    win = ctx->current;\n    layout = win->layout;\n    style = &ctx->style;\n    NK_ASSERT(bounds);\n\n    spacing = style->window.spacing;\n    padding = nk_panel_get_padding(style, layout->type);\n    panel_space = nk_layout_row_calculate_usable_space(&ctx->style, layout->type,\n                                            layout->bounds.w, layout->row.columns);\n\n    /* calculate the width of one item inside the current layout space */\n    switch (layout->row.type) {\n    case NK_LAYOUT_DYNAMIC_FIXED: {\n        /* scaling fixed size widgets item width */\n        item_width = NK_MAX(1.0f,panel_space) / (float)layout->row.columns;\n        item_offset = (float)layout->row.index * item_width;\n        item_spacing = (float)layout->row.index * spacing.x;\n    } break;\n    case NK_LAYOUT_DYNAMIC_ROW: {\n        /* scaling single ratio widget width */\n        item_width = layout->row.item_width * panel_space;\n        item_offset = layout->row.item_offset;\n        item_spacing = 0;\n\n        if (modify) {\n            layout->row.item_offset += item_width + spacing.x;\n            layout->row.filled += layout->row.item_width;\n            layout->row.index = 0;\n        }\n    } break;\n    case NK_LAYOUT_DYNAMIC_FREE: {\n        /* panel width depended free widget placing */\n        bounds->x = layout->at_x + (layout->bounds.w * layout->row.item.x);\n        bounds->x -= (float)*layout->offset_x;\n        bounds->y = layout->at_y + (layout->row.height * layout->row.item.y);\n        bounds->y -= (float)*layout->offset_y;\n        bounds->w = layout->bounds.w  * layout->row.item.w;\n        bounds->h = layout->row.height * layout->row.item.h;\n        return;\n    }\n    case NK_LAYOUT_DYNAMIC: {\n        /* scaling arrays of panel width ratios for every widget */\n        float ratio;\n        NK_ASSERT(layout->row.ratio);\n        ratio = (layout->row.ratio[layout->row.index] < 0) ?\n            layout->row.item_width : layout->row.ratio[layout->row.index];\n\n        item_spacing = (float)layout->row.index * spacing.x;\n        item_width = (ratio * panel_space);\n        item_offset = layout->row.item_offset;\n\n        if (modify) {\n            layout->row.item_offset += item_width;\n            layout->row.filled += ratio;\n        }\n    } break;\n    case NK_LAYOUT_STATIC_FIXED: {\n        /* non-scaling fixed widgets item width */\n        item_width = layout->row.item_width;\n        item_offset = (float)layout->row.index * item_width;\n        item_spacing = (float)layout->row.index * spacing.x;\n    } break;\n    case NK_LAYOUT_STATIC_ROW: {\n        /* scaling single ratio widget width */\n        item_width = layout->row.item_width;\n        item_offset = layout->row.item_offset;\n        item_spacing = (float)layout->row.index * spacing.x;\n        if (modify) layout->row.item_offset += item_width;\n    } break;\n    case NK_LAYOUT_STATIC_FREE: {\n        /* free widget placing */\n        bounds->x = layout->at_x + layout->row.item.x;\n        bounds->w = layout->row.item.w;\n        if (((bounds->x + bounds->w) > layout->max_x) && modify)\n            layout->max_x = (bounds->x + bounds->w);\n        bounds->x -= (float)*layout->offset_x;\n        bounds->y = layout->at_y + layout->row.item.y;\n        bounds->y -= (float)*layout->offset_y;\n        bounds->h = layout->row.item.h;\n        return;\n    }\n    case NK_LAYOUT_STATIC: {\n        /* non-scaling array of panel pixel width for every widget */\n        item_spacing = (float)layout->row.index * spacing.x;\n        item_width = layout->row.ratio[layout->row.index];\n        item_offset = layout->row.item_offset;\n        if (modify) layout->row.item_offset += item_width;\n    } break;\n    case NK_LAYOUT_TEMPLATE: {\n        /* stretchy row layout with combined dynamic/static widget width*/\n        NK_ASSERT(layout->row.index < layout->row.columns);\n        NK_ASSERT(layout->row.index < NK_MAX_LAYOUT_ROW_TEMPLATE_COLUMNS);\n        item_width = layout->row.templates[layout->row.index];\n        item_offset = layout->row.item_offset;\n        item_spacing = (float)layout->row.index * spacing.x;\n        if (modify) layout->row.item_offset += item_width;\n    } break;\n    default: NK_ASSERT(0); break;\n    };\n\n    /* set the bounds of the newly allocated widget */\n    bounds->w = item_width;\n    bounds->h = layout->row.height - spacing.y;\n    bounds->y = layout->at_y - (float)*layout->offset_y;\n    bounds->x = layout->at_x + item_offset + item_spacing + padding.x;\n    if (((bounds->x + bounds->w) > layout->max_x) && modify)\n        layout->max_x = bounds->x + bounds->w;\n    bounds->x -= (float)*layout->offset_x;\n}\nNK_LIB void\nnk_panel_alloc_space(struct nk_rect *bounds, const struct nk_context *ctx)\n{\n    struct nk_window *win;\n    struct nk_panel *layout;\n\n    NK_ASSERT(ctx);\n    NK_ASSERT(ctx->current);\n    NK_ASSERT(ctx->current->layout);\n    if (!ctx || !ctx->current || !ctx->current->layout)\n        return;\n\n    /* check if the end of the row has been hit and begin new row if so */\n    win = ctx->current;\n    layout = win->layout;\n    if (layout->row.index >= layout->row.columns)\n        nk_panel_alloc_row(ctx, win);\n\n    /* calculate widget position and size */\n    nk_layout_widget_space(bounds, ctx, win, nk_true);\n    layout->row.index++;\n}\nNK_LIB void\nnk_layout_peek(struct nk_rect *bounds, struct nk_context *ctx)\n{\n    float y;\n    int index;\n    struct nk_window *win;\n    struct nk_panel *layout;\n\n    NK_ASSERT(ctx);\n    NK_ASSERT(ctx->current);\n    NK_ASSERT(ctx->current->layout);\n    if (!ctx || !ctx->current || !ctx->current->layout)\n        return;\n\n    win = ctx->current;\n    layout = win->layout;\n    y = layout->at_y;\n    index = layout->row.index;\n    if (layout->row.index >= layout->row.columns) {\n        layout->at_y += layout->row.height;\n        layout->row.index = 0;\n    }\n    nk_layout_widget_space(bounds, ctx, win, nk_false);\n    if (!layout->row.index) {\n        bounds->x -= layout->row.item_offset;\n    }\n    layout->at_y = y;\n    layout->row.index = index;\n}\n\n\n\n\n\n/* ===============================================================\n *\n *                              TREE\n *\n * ===============================================================*/\nNK_INTERN int\nnk_tree_state_base(struct nk_context *ctx, enum nk_tree_type type,\n    struct nk_image *img, const char *title, enum nk_collapse_states *state)\n{\n    struct nk_window *win;\n    struct nk_panel *layout;\n    const struct nk_style *style;\n    struct nk_command_buffer *out;\n    const struct nk_input *in;\n    const struct nk_style_button *button;\n    enum nk_symbol_type symbol;\n    float row_height;\n\n    struct nk_vec2 item_spacing;\n    struct nk_rect header = {0,0,0,0};\n    struct nk_rect sym = {0,0,0,0};\n    struct nk_text text;\n\n    nk_flags ws = 0;\n    enum nk_widget_layout_states widget_state;\n\n    NK_ASSERT(ctx);\n    NK_ASSERT(ctx->current);\n    NK_ASSERT(ctx->current->layout);\n    if (!ctx || !ctx->current || !ctx->current->layout)\n        return 0;\n\n    /* cache some data */\n    win = ctx->current;\n    layout = win->layout;\n    out = &win->buffer;\n    style = &ctx->style;\n    item_spacing = style->window.spacing;\n\n    /* calculate header bounds and draw background */\n    row_height = style->font->height + 2 * style->tab.padding.y;\n    nk_layout_set_min_row_height(ctx, row_height);\n    nk_layout_row_dynamic(ctx, row_height, 1);\n    nk_layout_reset_min_row_height(ctx);\n\n    widget_state = nk_widget(&header, ctx);\n    if (type == NK_TREE_TAB) {\n        const struct nk_style_item *background = &style->tab.background;\n        if (background->type == NK_STYLE_ITEM_IMAGE) {\n            nk_draw_image(out, header, &background->data.image, nk_white);\n            text.background = nk_rgba(0,0,0,0);\n        } else {\n            text.background = background->data.color;\n            nk_fill_rect(out, header, 0, style->tab.border_color);\n            nk_fill_rect(out, nk_shrink_rect(header, style->tab.border),\n                style->tab.rounding, background->data.color);\n        }\n    } else text.background = style->window.background;\n\n    /* update node state */\n    in = (!(layout->flags & NK_WINDOW_ROM)) ? &ctx->input: 0;\n    in = (in && widget_state == NK_WIDGET_VALID) ? &ctx->input : 0;\n    if (nk_button_behavior(&ws, header, in, NK_BUTTON_DEFAULT))\n        *state = (*state == NK_MAXIMIZED) ? NK_MINIMIZED : NK_MAXIMIZED;\n\n    /* select correct button style */\n    if (*state == NK_MAXIMIZED) {\n        symbol = style->tab.sym_maximize;\n        if (type == NK_TREE_TAB)\n            button = &style->tab.tab_maximize_button;\n        else button = &style->tab.node_maximize_button;\n    } else {\n        symbol = style->tab.sym_minimize;\n        if (type == NK_TREE_TAB)\n            button = &style->tab.tab_minimize_button;\n        else button = &style->tab.node_minimize_button;\n    }\n\n    {/* draw triangle button */\n    sym.w = sym.h = style->font->height;\n    sym.y = header.y + style->tab.padding.y;\n    sym.x = header.x + style->tab.padding.x;\n    nk_do_button_symbol(&ws, &win->buffer, sym, symbol, NK_BUTTON_DEFAULT,\n        button, 0, style->font);\n\n    if (img) {\n        /* draw optional image icon */\n        sym.x = sym.x + sym.w + 4 * item_spacing.x;\n        nk_draw_image(&win->buffer, sym, img, nk_white);\n        sym.w = style->font->height + style->tab.spacing.x;}\n    }\n\n    {/* draw label */\n    struct nk_rect label;\n    header.w = NK_MAX(header.w, sym.w + item_spacing.x);\n    label.x = sym.x + sym.w + item_spacing.x;\n    label.y = sym.y;\n    label.w = header.w - (sym.w + item_spacing.y + style->tab.indent);\n    label.h = style->font->height;\n    text.text = style->tab.text;\n    text.padding = nk_vec2(0,0);\n    nk_widget_text(out, label, title, nk_strlen(title), &text,\n        NK_TEXT_LEFT, style->font);}\n\n    /* increase x-axis cursor widget position pointer */\n    if (*state == NK_MAXIMIZED) {\n        layout->at_x = header.x + (float)*layout->offset_x + style->tab.indent;\n        layout->bounds.w = NK_MAX(layout->bounds.w, style->tab.indent);\n        layout->bounds.w -= (style->tab.indent + style->window.padding.x);\n        layout->row.tree_depth++;\n        return nk_true;\n    } else return nk_false;\n}\nNK_INTERN int\nnk_tree_base(struct nk_context *ctx, enum nk_tree_type type,\n    struct nk_image *img, const char *title, enum nk_collapse_states initial_state,\n    const char *hash, int len, int line)\n{\n    struct nk_window *win = ctx->current;\n    int title_len = 0;\n    nk_hash tree_hash = 0;\n    nk_uint *state = 0;\n\n    /* retrieve tree state from internal widget state tables */\n    if (!hash) {\n        title_len = (int)nk_strlen(title);\n        tree_hash = nk_murmur_hash(title, (int)title_len, (nk_hash)line);\n    } else tree_hash = nk_murmur_hash(hash, len, (nk_hash)line);\n    state = nk_find_value(win, tree_hash);\n    if (!state) {\n        state = nk_add_value(ctx, win, tree_hash, 0);\n        *state = initial_state;\n    }\n    return nk_tree_state_base(ctx, type, img, title, (enum nk_collapse_states*)state);\n}\nNK_API int\nnk_tree_state_push(struct nk_context *ctx, enum nk_tree_type type,\n    const char *title, enum nk_collapse_states *state)\n{\n    return nk_tree_state_base(ctx, type, 0, title, state);\n}\nNK_API int\nnk_tree_state_image_push(struct nk_context *ctx, enum nk_tree_type type,\n    struct nk_image img, const char *title, enum nk_collapse_states *state)\n{\n    return nk_tree_state_base(ctx, type, &img, title, state);\n}\nNK_API void\nnk_tree_state_pop(struct nk_context *ctx)\n{\n    struct nk_window *win = 0;\n    struct nk_panel *layout = 0;\n\n    NK_ASSERT(ctx);\n    NK_ASSERT(ctx->current);\n    NK_ASSERT(ctx->current->layout);\n    if (!ctx || !ctx->current || !ctx->current->layout)\n        return;\n\n    win = ctx->current;\n    layout = win->layout;\n    layout->at_x -= ctx->style.tab.indent + ctx->style.window.padding.x;\n    layout->bounds.w += ctx->style.tab.indent + ctx->style.window.padding.x;\n    NK_ASSERT(layout->row.tree_depth);\n    layout->row.tree_depth--;\n}\nNK_API int\nnk_tree_push_hashed(struct nk_context *ctx, enum nk_tree_type type,\n    const char *title, enum nk_collapse_states initial_state,\n    const char *hash, int len, int line)\n{\n    return nk_tree_base(ctx, type, 0, title, initial_state, hash, len, line);\n}\nNK_API int\nnk_tree_image_push_hashed(struct nk_context *ctx, enum nk_tree_type type,\n    struct nk_image img, const char *title, enum nk_collapse_states initial_state,\n    const char *hash, int len,int seed)\n{\n    return nk_tree_base(ctx, type, &img, title, initial_state, hash, len, seed);\n}\nNK_API void\nnk_tree_pop(struct nk_context *ctx)\n{\n    nk_tree_state_pop(ctx);\n}\nNK_INTERN int\nnk_tree_element_image_push_hashed_base(struct nk_context *ctx, enum nk_tree_type type,\n    struct nk_image *img, const char *title, int title_len,\n    enum nk_collapse_states *state, int *selected)\n{\n    struct nk_window *win;\n    struct nk_panel *layout;\n    const struct nk_style *style;\n    struct nk_command_buffer *out;\n    const struct nk_input *in;\n    const struct nk_style_button *button;\n    enum nk_symbol_type symbol;\n    float row_height;\n    struct nk_vec2 padding;\n\n    int text_len;\n    float text_width;\n\n    struct nk_vec2 item_spacing;\n    struct nk_rect header = {0,0,0,0};\n    struct nk_rect sym = {0,0,0,0};\n    struct nk_text text;\n\n    nk_flags ws = 0;\n    enum nk_widget_layout_states widget_state;\n\n    NK_ASSERT(ctx);\n    NK_ASSERT(ctx->current);\n    NK_ASSERT(ctx->current->layout);\n    if (!ctx || !ctx->current || !ctx->current->layout)\n        return 0;\n\n    /* cache some data */\n    win = ctx->current;\n    layout = win->layout;\n    out = &win->buffer;\n    style = &ctx->style;\n    item_spacing = style->window.spacing;\n    padding = style->selectable.padding;\n\n    /* calculate header bounds and draw background */\n    row_height = style->font->height + 2 * style->tab.padding.y;\n    nk_layout_set_min_row_height(ctx, row_height);\n    nk_layout_row_dynamic(ctx, row_height, 1);\n    nk_layout_reset_min_row_height(ctx);\n\n    widget_state = nk_widget(&header, ctx);\n    if (type == NK_TREE_TAB) {\n        const struct nk_style_item *background = &style->tab.background;\n        if (background->type == NK_STYLE_ITEM_IMAGE) {\n            nk_draw_image(out, header, &background->data.image, nk_white);\n            text.background = nk_rgba(0,0,0,0);\n        } else {\n            text.background = background->data.color;\n            nk_fill_rect(out, header, 0, style->tab.border_color);\n            nk_fill_rect(out, nk_shrink_rect(header, style->tab.border),\n                style->tab.rounding, background->data.color);\n        }\n    } else text.background = style->window.background;\n\n    in = (!(layout->flags & NK_WINDOW_ROM)) ? &ctx->input: 0;\n    in = (in && widget_state == NK_WIDGET_VALID) ? &ctx->input : 0;\n\n    /* select correct button style */\n    if (*state == NK_MAXIMIZED) {\n        symbol = style->tab.sym_maximize;\n        if (type == NK_TREE_TAB)\n            button = &style->tab.tab_maximize_button;\n        else button = &style->tab.node_maximize_button;\n    } else {\n        symbol = style->tab.sym_minimize;\n        if (type == NK_TREE_TAB)\n            button = &style->tab.tab_minimize_button;\n        else button = &style->tab.node_minimize_button;\n    }\n    {/* draw triangle button */\n    sym.w = sym.h = style->font->height;\n    sym.y = header.y + style->tab.padding.y;\n    sym.x = header.x + style->tab.padding.x;\n    if (nk_do_button_symbol(&ws, &win->buffer, sym, symbol, NK_BUTTON_DEFAULT, button, in, style->font))\n        *state = (*state == NK_MAXIMIZED) ? NK_MINIMIZED : NK_MAXIMIZED;}\n\n    /* draw label */\n    {nk_flags dummy = 0;\n    struct nk_rect label;\n    /* calculate size of the text and tooltip */\n    text_len = nk_strlen(title);\n    text_width = style->font->width(style->font->userdata, style->font->height, title, text_len);\n    text_width += (4 * padding.x);\n\n    header.w = NK_MAX(header.w, sym.w + item_spacing.x);\n    label.x = sym.x + sym.w + item_spacing.x;\n    label.y = sym.y;\n    label.w = NK_MIN(header.w - (sym.w + item_spacing.y + style->tab.indent), text_width);\n    label.h = style->font->height;\n\n    if (img) {\n        nk_do_selectable_image(&dummy, &win->buffer, label, title, title_len, NK_TEXT_LEFT,\n            selected, img, &style->selectable, in, style->font);\n    } else nk_do_selectable(&dummy, &win->buffer, label, title, title_len, NK_TEXT_LEFT,\n            selected, &style->selectable, in, style->font);\n    }\n    /* increase x-axis cursor widget position pointer */\n    if (*state == NK_MAXIMIZED) {\n        layout->at_x = header.x + (float)*layout->offset_x + style->tab.indent;\n        layout->bounds.w = NK_MAX(layout->bounds.w, style->tab.indent);\n        layout->bounds.w -= (style->tab.indent + style->window.padding.x);\n        layout->row.tree_depth++;\n        return nk_true;\n    } else return nk_false;\n}\nNK_INTERN int\nnk_tree_element_base(struct nk_context *ctx, enum nk_tree_type type,\n    struct nk_image *img, const char *title, enum nk_collapse_states initial_state,\n    int *selected, const char *hash, int len, int line)\n{\n    struct nk_window *win = ctx->current;\n    int title_len = 0;\n    nk_hash tree_hash = 0;\n    nk_uint *state = 0;\n\n    /* retrieve tree state from internal widget state tables */\n    if (!hash) {\n        title_len = (int)nk_strlen(title);\n        tree_hash = nk_murmur_hash(title, (int)title_len, (nk_hash)line);\n    } else tree_hash = nk_murmur_hash(hash, len, (nk_hash)line);\n    state = nk_find_value(win, tree_hash);\n    if (!state) {\n        state = nk_add_value(ctx, win, tree_hash, 0);\n        *state = initial_state;\n    } return nk_tree_element_image_push_hashed_base(ctx, type, img, title,\n        nk_strlen(title), (enum nk_collapse_states*)state, selected);\n}\nNK_API int\nnk_tree_element_push_hashed(struct nk_context *ctx, enum nk_tree_type type,\n    const char *title, enum nk_collapse_states initial_state,\n    int *selected, const char *hash, int len, int seed)\n{\n    return nk_tree_element_base(ctx, type, 0, title, initial_state, selected, hash, len, seed);\n}\nNK_API int\nnk_tree_element_image_push_hashed(struct nk_context *ctx, enum nk_tree_type type,\n    struct nk_image img, const char *title, enum nk_collapse_states initial_state,\n    int *selected, const char *hash, int len,int seed)\n{\n    return nk_tree_element_base(ctx, type, &img, title, initial_state, selected, hash, len, seed);\n}\nNK_API void\nnk_tree_element_pop(struct nk_context *ctx)\n{\n    nk_tree_state_pop(ctx);\n}\n\n\n\n\n\n/* ===============================================================\n *\n *                          GROUP\n *\n * ===============================================================*/\nNK_API int\nnk_group_scrolled_offset_begin(struct nk_context *ctx,\n    nk_uint *x_offset, nk_uint *y_offset, const char *title, nk_flags flags)\n{\n    struct nk_rect bounds;\n    struct nk_window panel;\n    struct nk_window *win;\n\n    win = ctx->current;\n    nk_panel_alloc_space(&bounds, ctx);\n    {const struct nk_rect *c = &win->layout->clip;\n    if (!NK_INTERSECT(c->x, c->y, c->w, c->h, bounds.x, bounds.y, bounds.w, bounds.h) &&\n        !(flags & NK_WINDOW_MOVABLE)) {\n        return 0;\n    }}\n    if (win->flags & NK_WINDOW_ROM)\n        flags |= NK_WINDOW_ROM;\n\n    /* initialize a fake window to create the panel from */\n    nk_zero(&panel, sizeof(panel));\n    panel.bounds = bounds;\n    panel.flags = flags;\n    panel.scrollbar.x = *x_offset;\n    panel.scrollbar.y = *y_offset;\n    panel.buffer = win->buffer;\n    panel.layout = (struct nk_panel*)nk_create_panel(ctx);\n    ctx->current = &panel;\n    nk_panel_begin(ctx, (flags & NK_WINDOW_TITLE) ? title: 0, NK_PANEL_GROUP);\n\n    win->buffer = panel.buffer;\n    win->buffer.clip = panel.layout->clip;\n    panel.layout->offset_x = x_offset;\n    panel.layout->offset_y = y_offset;\n    panel.layout->parent = win->layout;\n    win->layout = panel.layout;\n\n    ctx->current = win;\n    if ((panel.layout->flags & NK_WINDOW_CLOSED) ||\n        (panel.layout->flags & NK_WINDOW_MINIMIZED))\n    {\n        nk_flags f = panel.layout->flags;\n        nk_group_scrolled_end(ctx);\n        if (f & NK_WINDOW_CLOSED)\n            return NK_WINDOW_CLOSED;\n        if (f & NK_WINDOW_MINIMIZED)\n            return NK_WINDOW_MINIMIZED;\n    }\n    return 1;\n}\nNK_API void\nnk_group_scrolled_end(struct nk_context *ctx)\n{\n    struct nk_window *win;\n    struct nk_panel *parent;\n    struct nk_panel *g;\n\n    struct nk_rect clip;\n    struct nk_window pan;\n    struct nk_vec2 panel_padding;\n\n    NK_ASSERT(ctx);\n    NK_ASSERT(ctx->current);\n    if (!ctx || !ctx->current)\n        return;\n\n    /* make sure nk_group_begin was called correctly */\n    NK_ASSERT(ctx->current);\n    win = ctx->current;\n    NK_ASSERT(win->layout);\n    g = win->layout;\n    NK_ASSERT(g->parent);\n    parent = g->parent;\n\n    /* dummy window */\n    nk_zero_struct(pan);\n    panel_padding = nk_panel_get_padding(&ctx->style, NK_PANEL_GROUP);\n    pan.bounds.y = g->bounds.y - (g->header_height + g->menu.h);\n    pan.bounds.x = g->bounds.x - panel_padding.x;\n    pan.bounds.w = g->bounds.w + 2 * panel_padding.x;\n    pan.bounds.h = g->bounds.h + g->header_height + g->menu.h;\n    if (g->flags & NK_WINDOW_BORDER) {\n        pan.bounds.x -= g->border;\n        pan.bounds.y -= g->border;\n        pan.bounds.w += 2*g->border;\n        pan.bounds.h += 2*g->border;\n    }\n    if (!(g->flags & NK_WINDOW_NO_SCROLLBAR)) {\n        pan.bounds.w += ctx->style.window.scrollbar_size.x;\n        pan.bounds.h += ctx->style.window.scrollbar_size.y;\n    }\n    pan.scrollbar.x = *g->offset_x;\n    pan.scrollbar.y = *g->offset_y;\n    pan.flags = g->flags;\n    pan.buffer = win->buffer;\n    pan.layout = g;\n    pan.parent = win;\n    ctx->current = &pan;\n\n    /* make sure group has correct clipping rectangle */\n    nk_unify(&clip, &parent->clip, pan.bounds.x, pan.bounds.y,\n        pan.bounds.x + pan.bounds.w, pan.bounds.y + pan.bounds.h + panel_padding.x);\n    nk_push_scissor(&pan.buffer, clip);\n    nk_end(ctx);\n\n    win->buffer = pan.buffer;\n    nk_push_scissor(&win->buffer, parent->clip);\n    ctx->current = win;\n    win->layout = parent;\n    g->bounds = pan.bounds;\n    return;\n}\nNK_API int\nnk_group_scrolled_begin(struct nk_context *ctx,\n    struct nk_scroll *scroll, const char *title, nk_flags flags)\n{\n    return nk_group_scrolled_offset_begin(ctx, &scroll->x, &scroll->y, title, flags);\n}\nNK_API int\nnk_group_begin_titled(struct nk_context *ctx, const char *id,\n    const char *title, nk_flags flags)\n{\n    int id_len;\n    nk_hash id_hash;\n    struct nk_window *win;\n    nk_uint *x_offset;\n    nk_uint *y_offset;\n\n    NK_ASSERT(ctx);\n    NK_ASSERT(id);\n    NK_ASSERT(ctx->current);\n    NK_ASSERT(ctx->current->layout);\n    if (!ctx || !ctx->current || !ctx->current->layout || !id)\n        return 0;\n\n    /* find persistent group scrollbar value */\n    win = ctx->current;\n    id_len = (int)nk_strlen(id);\n    id_hash = nk_murmur_hash(id, (int)id_len, NK_PANEL_GROUP);\n    x_offset = nk_find_value(win, id_hash);\n    if (!x_offset) {\n        x_offset = nk_add_value(ctx, win, id_hash, 0);\n        y_offset = nk_add_value(ctx, win, id_hash+1, 0);\n\n        NK_ASSERT(x_offset);\n        NK_ASSERT(y_offset);\n        if (!x_offset || !y_offset) return 0;\n        *x_offset = *y_offset = 0;\n    } else y_offset = nk_find_value(win, id_hash+1);\n    return nk_group_scrolled_offset_begin(ctx, x_offset, y_offset, title, flags);\n}\nNK_API int\nnk_group_begin(struct nk_context *ctx, const char *title, nk_flags flags)\n{\n    return nk_group_begin_titled(ctx, title, title, flags);\n}\nNK_API void\nnk_group_end(struct nk_context *ctx)\n{\n    nk_group_scrolled_end(ctx);\n}\n\n\n\n\n\n/* ===============================================================\n *\n *                          LIST VIEW\n *\n * ===============================================================*/\nNK_API int\nnk_list_view_begin(struct nk_context *ctx, struct nk_list_view *view,\n    const char *title, nk_flags flags, int row_height, int row_count)\n{\n    int title_len;\n    nk_hash title_hash;\n    nk_uint *x_offset;\n    nk_uint *y_offset;\n\n    int result;\n    struct nk_window *win;\n    struct nk_panel *layout;\n    const struct nk_style *style;\n    struct nk_vec2 item_spacing;\n\n    NK_ASSERT(ctx);\n    NK_ASSERT(view);\n    NK_ASSERT(title);\n    if (!ctx || !view || !title) return 0;\n\n    win = ctx->current;\n    style = &ctx->style;\n    item_spacing = style->window.spacing;\n    row_height += NK_MAX(0, (int)item_spacing.y);\n\n    /* find persistent list view scrollbar offset */\n    title_len = (int)nk_strlen(title);\n    title_hash = nk_murmur_hash(title, (int)title_len, NK_PANEL_GROUP);\n    x_offset = nk_find_value(win, title_hash);\n    if (!x_offset) {\n        x_offset = nk_add_value(ctx, win, title_hash, 0);\n        y_offset = nk_add_value(ctx, win, title_hash+1, 0);\n\n        NK_ASSERT(x_offset);\n        NK_ASSERT(y_offset);\n        if (!x_offset || !y_offset) return 0;\n        *x_offset = *y_offset = 0;\n    } else y_offset = nk_find_value(win, title_hash+1);\n    view->scroll_value = *y_offset;\n    view->scroll_pointer = y_offset;\n\n    *y_offset = 0;\n    result = nk_group_scrolled_offset_begin(ctx, x_offset, y_offset, title, flags);\n    win = ctx->current;\n    layout = win->layout;\n\n    view->total_height = row_height * NK_MAX(row_count,1);\n    view->begin = (int)NK_MAX(((float)view->scroll_value / (float)row_height), 0.0f);\n    view->count = (int)NK_MAX(nk_iceilf((layout->clip.h)/(float)row_height),0);\n    view->count = NK_MIN(view->count, row_count - view->begin);\n    view->end = view->begin + view->count;\n    view->ctx = ctx;\n    return result;\n}\nNK_API void\nnk_list_view_end(struct nk_list_view *view)\n{\n    struct nk_context *ctx;\n    struct nk_window *win;\n    struct nk_panel *layout;\n\n    NK_ASSERT(view);\n    NK_ASSERT(view->ctx);\n    NK_ASSERT(view->scroll_pointer);\n    if (!view || !view->ctx) return;\n\n    ctx = view->ctx;\n    win = ctx->current;\n    layout = win->layout;\n    layout->at_y = layout->bounds.y + (float)view->total_height;\n    *view->scroll_pointer = *view->scroll_pointer + view->scroll_value;\n    nk_group_end(view->ctx);\n}\n\n\n\n\n\n/* ===============================================================\n *\n *                              WIDGET\n *\n * ===============================================================*/\nNK_API struct nk_rect\nnk_widget_bounds(struct nk_context *ctx)\n{\n    struct nk_rect bounds;\n    NK_ASSERT(ctx);\n    NK_ASSERT(ctx->current);\n    if (!ctx || !ctx->current)\n        return nk_rect(0,0,0,0);\n    nk_layout_peek(&bounds, ctx);\n    return bounds;\n}\nNK_API struct nk_vec2\nnk_widget_position(struct nk_context *ctx)\n{\n    struct nk_rect bounds;\n    NK_ASSERT(ctx);\n    NK_ASSERT(ctx->current);\n    if (!ctx || !ctx->current)\n        return nk_vec2(0,0);\n\n    nk_layout_peek(&bounds, ctx);\n    return nk_vec2(bounds.x, bounds.y);\n}\nNK_API struct nk_vec2\nnk_widget_size(struct nk_context *ctx)\n{\n    struct nk_rect bounds;\n    NK_ASSERT(ctx);\n    NK_ASSERT(ctx->current);\n    if (!ctx || !ctx->current)\n        return nk_vec2(0,0);\n\n    nk_layout_peek(&bounds, ctx);\n    return nk_vec2(bounds.w, bounds.h);\n}\nNK_API float\nnk_widget_width(struct nk_context *ctx)\n{\n    struct nk_rect bounds;\n    NK_ASSERT(ctx);\n    NK_ASSERT(ctx->current);\n    if (!ctx || !ctx->current)\n        return 0;\n\n    nk_layout_peek(&bounds, ctx);\n    return bounds.w;\n}\nNK_API float\nnk_widget_height(struct nk_context *ctx)\n{\n    struct nk_rect bounds;\n    NK_ASSERT(ctx);\n    NK_ASSERT(ctx->current);\n    if (!ctx || !ctx->current)\n        return 0;\n\n    nk_layout_peek(&bounds, ctx);\n    return bounds.h;\n}\nNK_API int\nnk_widget_is_hovered(struct nk_context *ctx)\n{\n    struct nk_rect c, v;\n    struct nk_rect bounds;\n    NK_ASSERT(ctx);\n    NK_ASSERT(ctx->current);\n    if (!ctx || !ctx->current || ctx->active != ctx->current)\n        return 0;\n\n    c = ctx->current->layout->clip;\n    c.x = (float)((int)c.x);\n    c.y = (float)((int)c.y);\n    c.w = (float)((int)c.w);\n    c.h = (float)((int)c.h);\n\n    nk_layout_peek(&bounds, ctx);\n    nk_unify(&v, &c, bounds.x, bounds.y, bounds.x + bounds.w, bounds.y + bounds.h);\n    if (!NK_INTERSECT(c.x, c.y, c.w, c.h, bounds.x, bounds.y, bounds.w, bounds.h))\n        return 0;\n    return nk_input_is_mouse_hovering_rect(&ctx->input, bounds);\n}\nNK_API int\nnk_widget_is_mouse_clicked(struct nk_context *ctx, enum nk_buttons btn)\n{\n    struct nk_rect c, v;\n    struct nk_rect bounds;\n    NK_ASSERT(ctx);\n    NK_ASSERT(ctx->current);\n    if (!ctx || !ctx->current || ctx->active != ctx->current)\n        return 0;\n\n    c = ctx->current->layout->clip;\n    c.x = (float)((int)c.x);\n    c.y = (float)((int)c.y);\n    c.w = (float)((int)c.w);\n    c.h = (float)((int)c.h);\n\n    nk_layout_peek(&bounds, ctx);\n    nk_unify(&v, &c, bounds.x, bounds.y, bounds.x + bounds.w, bounds.y + bounds.h);\n    if (!NK_INTERSECT(c.x, c.y, c.w, c.h, bounds.x, bounds.y, bounds.w, bounds.h))\n        return 0;\n    return nk_input_mouse_clicked(&ctx->input, btn, bounds);\n}\nNK_API int\nnk_widget_has_mouse_click_down(struct nk_context *ctx, enum nk_buttons btn, int down)\n{\n    struct nk_rect c, v;\n    struct nk_rect bounds;\n    NK_ASSERT(ctx);\n    NK_ASSERT(ctx->current);\n    if (!ctx || !ctx->current || ctx->active != ctx->current)\n        return 0;\n\n    c = ctx->current->layout->clip;\n    c.x = (float)((int)c.x);\n    c.y = (float)((int)c.y);\n    c.w = (float)((int)c.w);\n    c.h = (float)((int)c.h);\n\n    nk_layout_peek(&bounds, ctx);\n    nk_unify(&v, &c, bounds.x, bounds.y, bounds.x + bounds.w, bounds.y + bounds.h);\n    if (!NK_INTERSECT(c.x, c.y, c.w, c.h, bounds.x, bounds.y, bounds.w, bounds.h))\n        return 0;\n    return nk_input_has_mouse_click_down_in_rect(&ctx->input, btn, bounds, down);\n}\nNK_API enum nk_widget_layout_states\nnk_widget(struct nk_rect *bounds, const struct nk_context *ctx)\n{\n    struct nk_rect c, v;\n    struct nk_window *win;\n    struct nk_panel *layout;\n    const struct nk_input *in;\n\n    NK_ASSERT(ctx);\n    NK_ASSERT(ctx->current);\n    NK_ASSERT(ctx->current->layout);\n    if (!ctx || !ctx->current || !ctx->current->layout)\n        return NK_WIDGET_INVALID;\n\n    /* allocate space and check if the widget needs to be updated and drawn */\n    nk_panel_alloc_space(bounds, ctx);\n    win = ctx->current;\n    layout = win->layout;\n    in = &ctx->input;\n    c = layout->clip;\n\n    /*  if one of these triggers you forgot to add an `if` condition around either\n        a window, group, popup, combobox or contextual menu `begin` and `end` block.\n        Example:\n            if (nk_begin(...) {...} nk_end(...); or\n            if (nk_group_begin(...) { nk_group_end(...);} */\n    NK_ASSERT(!(layout->flags & NK_WINDOW_MINIMIZED));\n    NK_ASSERT(!(layout->flags & NK_WINDOW_HIDDEN));\n    NK_ASSERT(!(layout->flags & NK_WINDOW_CLOSED));\n\n    /* need to convert to int here to remove floating point errors */\n    bounds->x = (float)((int)bounds->x);\n    bounds->y = (float)((int)bounds->y);\n    bounds->w = (float)((int)bounds->w);\n    bounds->h = (float)((int)bounds->h);\n\n    c.x = (float)((int)c.x);\n    c.y = (float)((int)c.y);\n    c.w = (float)((int)c.w);\n    c.h = (float)((int)c.h);\n\n    nk_unify(&v, &c, bounds->x, bounds->y, bounds->x + bounds->w, bounds->y + bounds->h);\n    if (!NK_INTERSECT(c.x, c.y, c.w, c.h, bounds->x, bounds->y, bounds->w, bounds->h))\n        return NK_WIDGET_INVALID;\n    if (!NK_INBOX(in->mouse.pos.x, in->mouse.pos.y, v.x, v.y, v.w, v.h))\n        return NK_WIDGET_ROM;\n    return NK_WIDGET_VALID;\n}\nNK_API enum nk_widget_layout_states\nnk_widget_fitting(struct nk_rect *bounds, struct nk_context *ctx,\n    struct nk_vec2 item_padding)\n{\n    /* update the bounds to stand without padding  */\n    struct nk_window *win;\n    struct nk_style *style;\n    struct nk_panel *layout;\n    enum nk_widget_layout_states state;\n    struct nk_vec2 panel_padding;\n\n    NK_ASSERT(ctx);\n    NK_ASSERT(ctx->current);\n    NK_ASSERT(ctx->current->layout);\n    if (!ctx || !ctx->current || !ctx->current->layout)\n        return NK_WIDGET_INVALID;\n\n    win = ctx->current;\n    style = &ctx->style;\n    layout = win->layout;\n    state = nk_widget(bounds, ctx);\n\n    panel_padding = nk_panel_get_padding(style, layout->type);\n    if (layout->row.index == 1) {\n        bounds->w += panel_padding.x;\n        bounds->x -= panel_padding.x;\n    } else bounds->x -= item_padding.x;\n\n    if (layout->row.index == layout->row.columns)\n        bounds->w += panel_padding.x;\n    else bounds->w += item_padding.x;\n    return state;\n}\nNK_API void\nnk_spacing(struct nk_context *ctx, int cols)\n{\n    struct nk_window *win;\n    struct nk_panel *layout;\n    struct nk_rect none;\n    int i, index, rows;\n\n    NK_ASSERT(ctx);\n    NK_ASSERT(ctx->current);\n    NK_ASSERT(ctx->current->layout);\n    if (!ctx || !ctx->current || !ctx->current->layout)\n        return;\n\n    /* spacing over row boundaries */\n    win = ctx->current;\n    layout = win->layout;\n    index = (layout->row.index + cols) % layout->row.columns;\n    rows = (layout->row.index + cols) / layout->row.columns;\n    if (rows) {\n        for (i = 0; i < rows; ++i)\n            nk_panel_alloc_row(ctx, win);\n        cols = index;\n    }\n    /* non table layout need to allocate space */\n    if (layout->row.type != NK_LAYOUT_DYNAMIC_FIXED &&\n        layout->row.type != NK_LAYOUT_STATIC_FIXED) {\n        for (i = 0; i < cols; ++i)\n            nk_panel_alloc_space(&none, ctx);\n    } layout->row.index = index;\n}\n\n\n\n\n\n/* ===============================================================\n *\n *                              TEXT\n *\n * ===============================================================*/\nNK_LIB void\nnk_widget_text(struct nk_command_buffer *o, struct nk_rect b,\n    const char *string, int len, const struct nk_text *t,\n    nk_flags a, const struct nk_user_font *f)\n{\n    struct nk_rect label;\n    float text_width;\n\n    NK_ASSERT(o);\n    NK_ASSERT(t);\n    if (!o || !t) return;\n\n    b.h = NK_MAX(b.h, 2 * t->padding.y);\n    label.x = 0; label.w = 0;\n    label.y = b.y + t->padding.y;\n    label.h = NK_MIN(f->height, b.h - 2 * t->padding.y);\n\n    text_width = f->width(f->userdata, f->height, (const char*)string, len);\n    text_width += (2.0f * t->padding.x);\n\n    /* align in x-axis */\n    if (a & NK_TEXT_ALIGN_LEFT) {\n        label.x = b.x + t->padding.x;\n        label.w = NK_MAX(0, b.w - 2 * t->padding.x);\n    } else if (a & NK_TEXT_ALIGN_CENTERED) {\n        label.w = NK_MAX(1, 2 * t->padding.x + (float)text_width);\n        label.x = (b.x + t->padding.x + ((b.w - 2 * t->padding.x) - label.w) / 2);\n        label.x = NK_MAX(b.x + t->padding.x, label.x);\n        label.w = NK_MIN(b.x + b.w, label.x + label.w);\n        if (label.w >= label.x) label.w -= label.x;\n    } else if (a & NK_TEXT_ALIGN_RIGHT) {\n        label.x = NK_MAX(b.x + t->padding.x, (b.x + b.w) - (2 * t->padding.x + (float)text_width));\n        label.w = (float)text_width + 2 * t->padding.x;\n    } else return;\n\n    /* align in y-axis */\n    if (a & NK_TEXT_ALIGN_MIDDLE) {\n        label.y = b.y + b.h/2.0f - (float)f->height/2.0f;\n        label.h = NK_MAX(b.h/2.0f, b.h - (b.h/2.0f + f->height/2.0f));\n    } else if (a & NK_TEXT_ALIGN_BOTTOM) {\n        label.y = b.y + b.h - f->height;\n        label.h = f->height;\n    }\n    nk_draw_text(o, label, (const char*)string, len, f, t->background, t->text);\n}\nNK_LIB void\nnk_widget_text_wrap(struct nk_command_buffer *o, struct nk_rect b,\n    const char *string, int len, const struct nk_text *t,\n    const struct nk_user_font *f)\n{\n    float width;\n    int glyphs = 0;\n    int fitting = 0;\n    int done = 0;\n    struct nk_rect line;\n    struct nk_text text;\n    NK_INTERN nk_rune seperator[] = {' '};\n\n    NK_ASSERT(o);\n    NK_ASSERT(t);\n    if (!o || !t) return;\n\n    text.padding = nk_vec2(0,0);\n    text.background = t->background;\n    text.text = t->text;\n\n    b.w = NK_MAX(b.w, 2 * t->padding.x);\n    b.h = NK_MAX(b.h, 2 * t->padding.y);\n    b.h = b.h - 2 * t->padding.y;\n\n    line.x = b.x + t->padding.x;\n    line.y = b.y + t->padding.y;\n    line.w = b.w - 2 * t->padding.x;\n    line.h = 2 * t->padding.y + f->height;\n\n    fitting = nk_text_clamp(f, string, len, line.w, &glyphs, &width, seperator,NK_LEN(seperator));\n    while (done < len) {\n        if (!fitting || line.y + line.h >= (b.y + b.h)) break;\n        nk_widget_text(o, line, &string[done], fitting, &text, NK_TEXT_LEFT, f);\n        done += fitting;\n        line.y += f->height + 2 * t->padding.y;\n        fitting = nk_text_clamp(f, &string[done], len - done, line.w, &glyphs, &width, seperator,NK_LEN(seperator));\n    }\n}\nNK_API void\nnk_text_colored(struct nk_context *ctx, const char *str, int len,\n    nk_flags alignment, struct nk_color color)\n{\n    struct nk_window *win;\n    const struct nk_style *style;\n\n    struct nk_vec2 item_padding;\n    struct nk_rect bounds;\n    struct nk_text text;\n\n    NK_ASSERT(ctx);\n    NK_ASSERT(ctx->current);\n    NK_ASSERT(ctx->current->layout);\n    if (!ctx || !ctx->current || !ctx->current->layout) return;\n\n    win = ctx->current;\n    style = &ctx->style;\n    nk_panel_alloc_space(&bounds, ctx);\n    item_padding = style->text.padding;\n\n    text.padding.x = item_padding.x;\n    text.padding.y = item_padding.y;\n    text.background = style->window.background;\n    text.text = color;\n    nk_widget_text(&win->buffer, bounds, str, len, &text, alignment, style->font);\n}\nNK_API void\nnk_text_wrap_colored(struct nk_context *ctx, const char *str,\n    int len, struct nk_color color)\n{\n    struct nk_window *win;\n    const struct nk_style *style;\n\n    struct nk_vec2 item_padding;\n    struct nk_rect bounds;\n    struct nk_text text;\n\n    NK_ASSERT(ctx);\n    NK_ASSERT(ctx->current);\n    NK_ASSERT(ctx->current->layout);\n    if (!ctx || !ctx->current || !ctx->current->layout) return;\n\n    win = ctx->current;\n    style = &ctx->style;\n    nk_panel_alloc_space(&bounds, ctx);\n    item_padding = style->text.padding;\n\n    text.padding.x = item_padding.x;\n    text.padding.y = item_padding.y;\n    text.background = style->window.background;\n    text.text = color;\n    nk_widget_text_wrap(&win->buffer, bounds, str, len, &text, style->font);\n}\n#ifdef NK_INCLUDE_STANDARD_VARARGS\nNK_API void\nnk_labelf_colored(struct nk_context *ctx, nk_flags flags,\n    struct nk_color color, const char *fmt, ...)\n{\n    va_list args;\n    va_start(args, fmt);\n    nk_labelfv_colored(ctx, flags, color, fmt, args);\n    va_end(args);\n}\nNK_API void\nnk_labelf_colored_wrap(struct nk_context *ctx, struct nk_color color,\n    const char *fmt, ...)\n{\n    va_list args;\n    va_start(args, fmt);\n    nk_labelfv_colored_wrap(ctx, color, fmt, args);\n    va_end(args);\n}\nNK_API void\nnk_labelf(struct nk_context *ctx, nk_flags flags, const char *fmt, ...)\n{\n    va_list args;\n    va_start(args, fmt);\n    nk_labelfv(ctx, flags, fmt, args);\n    va_end(args);\n}\nNK_API void\nnk_labelf_wrap(struct nk_context *ctx, const char *fmt,...)\n{\n    va_list args;\n    va_start(args, fmt);\n    nk_labelfv_wrap(ctx, fmt, args);\n    va_end(args);\n}\nNK_API void\nnk_labelfv_colored(struct nk_context *ctx, nk_flags flags,\n    struct nk_color color, const char *fmt, va_list args)\n{\n    char buf[256];\n    nk_strfmt(buf, NK_LEN(buf), fmt, args);\n    nk_label_colored(ctx, buf, flags, color);\n}\n\nNK_API void\nnk_labelfv_colored_wrap(struct nk_context *ctx, struct nk_color color,\n    const char *fmt, va_list args)\n{\n    char buf[256];\n    nk_strfmt(buf, NK_LEN(buf), fmt, args);\n    nk_label_colored_wrap(ctx, buf, color);\n}\n\nNK_API void\nnk_labelfv(struct nk_context *ctx, nk_flags flags, const char *fmt, va_list args)\n{\n    char buf[256];\n    nk_strfmt(buf, NK_LEN(buf), fmt, args);\n    nk_label(ctx, buf, flags);\n}\n\nNK_API void\nnk_labelfv_wrap(struct nk_context *ctx, const char *fmt, va_list args)\n{\n    char buf[256];\n    nk_strfmt(buf, NK_LEN(buf), fmt, args);\n    nk_label_wrap(ctx, buf);\n}\n\nNK_API void\nnk_value_bool(struct nk_context *ctx, const char *prefix, int value)\n{\n    nk_labelf(ctx, NK_TEXT_LEFT, \"%s: %s\", prefix, ((value) ? \"true\": \"false\"));\n}\nNK_API void\nnk_value_int(struct nk_context *ctx, const char *prefix, int value)\n{\n    nk_labelf(ctx, NK_TEXT_LEFT, \"%s: %d\", prefix, value);\n}\nNK_API void\nnk_value_uint(struct nk_context *ctx, const char *prefix, unsigned int value)\n{\n    nk_labelf(ctx, NK_TEXT_LEFT, \"%s: %u\", prefix, value);\n}\nNK_API void\nnk_value_float(struct nk_context *ctx, const char *prefix, float value)\n{\n    double double_value = (double)value;\n    nk_labelf(ctx, NK_TEXT_LEFT, \"%s: %.3f\", prefix, double_value);\n}\nNK_API void\nnk_value_color_byte(struct nk_context *ctx, const char *p, struct nk_color c)\n{\n    nk_labelf(ctx, NK_TEXT_LEFT, \"%s: (%d, %d, %d, %d)\", p, c.r, c.g, c.b, c.a);\n}\nNK_API void\nnk_value_color_float(struct nk_context *ctx, const char *p, struct nk_color color)\n{\n    double c[4]; nk_color_dv(c, color);\n    nk_labelf(ctx, NK_TEXT_LEFT, \"%s: (%.2f, %.2f, %.2f, %.2f)\",\n        p, c[0], c[1], c[2], c[3]);\n}\nNK_API void\nnk_value_color_hex(struct nk_context *ctx, const char *prefix, struct nk_color color)\n{\n    char hex[16];\n    nk_color_hex_rgba(hex, color);\n    nk_labelf(ctx, NK_TEXT_LEFT, \"%s: %s\", prefix, hex);\n}\n#endif\nNK_API void\nnk_text(struct nk_context *ctx, const char *str, int len, nk_flags alignment)\n{\n    NK_ASSERT(ctx);\n    if (!ctx) return;\n    nk_text_colored(ctx, str, len, alignment, ctx->style.text.color);\n}\nNK_API void\nnk_text_wrap(struct nk_context *ctx, const char *str, int len)\n{\n    NK_ASSERT(ctx);\n    if (!ctx) return;\n    nk_text_wrap_colored(ctx, str, len, ctx->style.text.color);\n}\nNK_API void\nnk_label(struct nk_context *ctx, const char *str, nk_flags alignment)\n{\n    nk_text(ctx, str, nk_strlen(str), alignment);\n}\nNK_API void\nnk_label_colored(struct nk_context *ctx, const char *str, nk_flags align,\n    struct nk_color color)\n{\n    nk_text_colored(ctx, str, nk_strlen(str), align, color);\n}\nNK_API void\nnk_label_wrap(struct nk_context *ctx, const char *str)\n{\n    nk_text_wrap(ctx, str, nk_strlen(str));\n}\nNK_API void\nnk_label_colored_wrap(struct nk_context *ctx, const char *str, struct nk_color color)\n{\n    nk_text_wrap_colored(ctx, str, nk_strlen(str), color);\n}\n\n\n\n\n\n/* ===============================================================\n *\n *                          IMAGE\n *\n * ===============================================================*/\nNK_API nk_handle\nnk_handle_ptr(void *ptr)\n{\n    nk_handle handle = {0};\n    handle.ptr = ptr;\n    return handle;\n}\nNK_API nk_handle\nnk_handle_id(int id)\n{\n    nk_handle handle;\n    nk_zero_struct(handle);\n    handle.id = id;\n    return handle;\n}\nNK_API struct nk_image\nnk_subimage_ptr(void *ptr, unsigned short w, unsigned short h, struct nk_rect r)\n{\n    struct nk_image s;\n    nk_zero(&s, sizeof(s));\n    s.handle.ptr = ptr;\n    s.w = w; s.h = h;\n    s.region[0] = (unsigned short)r.x;\n    s.region[1] = (unsigned short)r.y;\n    s.region[2] = (unsigned short)r.w;\n    s.region[3] = (unsigned short)r.h;\n    return s;\n}\nNK_API struct nk_image\nnk_subimage_id(int id, unsigned short w, unsigned short h, struct nk_rect r)\n{\n    struct nk_image s;\n    nk_zero(&s, sizeof(s));\n    s.handle.id = id;\n    s.w = w; s.h = h;\n    s.region[0] = (unsigned short)r.x;\n    s.region[1] = (unsigned short)r.y;\n    s.region[2] = (unsigned short)r.w;\n    s.region[3] = (unsigned short)r.h;\n    return s;\n}\nNK_API struct nk_image\nnk_subimage_handle(nk_handle handle, unsigned short w, unsigned short h,\n    struct nk_rect r)\n{\n    struct nk_image s;\n    nk_zero(&s, sizeof(s));\n    s.handle = handle;\n    s.w = w; s.h = h;\n    s.region[0] = (unsigned short)r.x;\n    s.region[1] = (unsigned short)r.y;\n    s.region[2] = (unsigned short)r.w;\n    s.region[3] = (unsigned short)r.h;\n    return s;\n}\nNK_API struct nk_image\nnk_image_handle(nk_handle handle)\n{\n    struct nk_image s;\n    nk_zero(&s, sizeof(s));\n    s.handle = handle;\n    s.w = 0; s.h = 0;\n    s.region[0] = 0;\n    s.region[1] = 0;\n    s.region[2] = 0;\n    s.region[3] = 0;\n    return s;\n}\nNK_API struct nk_image\nnk_image_ptr(void *ptr)\n{\n    struct nk_image s;\n    nk_zero(&s, sizeof(s));\n    NK_ASSERT(ptr);\n    s.handle.ptr = ptr;\n    s.w = 0; s.h = 0;\n    s.region[0] = 0;\n    s.region[1] = 0;\n    s.region[2] = 0;\n    s.region[3] = 0;\n    return s;\n}\nNK_API struct nk_image\nnk_image_id(int id)\n{\n    struct nk_image s;\n    nk_zero(&s, sizeof(s));\n    s.handle.id = id;\n    s.w = 0; s.h = 0;\n    s.region[0] = 0;\n    s.region[1] = 0;\n    s.region[2] = 0;\n    s.region[3] = 0;\n    return s;\n}\nNK_API int\nnk_image_is_subimage(const struct nk_image* img)\n{\n    NK_ASSERT(img);\n    return !(img->w == 0 && img->h == 0);\n}\nNK_API void\nnk_image(struct nk_context *ctx, struct nk_image img)\n{\n    struct nk_window *win;\n    struct nk_rect bounds;\n\n    NK_ASSERT(ctx);\n    NK_ASSERT(ctx->current);\n    NK_ASSERT(ctx->current->layout);\n    if (!ctx || !ctx->current || !ctx->current->layout) return;\n\n    win = ctx->current;\n    if (!nk_widget(&bounds, ctx)) return;\n    nk_draw_image(&win->buffer, bounds, &img, nk_white);\n}\nNK_API void\nnk_image_color(struct nk_context *ctx, struct nk_image img, struct nk_color col)\n{\n    struct nk_window *win;\n    struct nk_rect bounds;\n\n    NK_ASSERT(ctx);\n    NK_ASSERT(ctx->current);\n    NK_ASSERT(ctx->current->layout);\n    if (!ctx || !ctx->current || !ctx->current->layout) return;\n\n    win = ctx->current;\n    if (!nk_widget(&bounds, ctx)) return;\n    nk_draw_image(&win->buffer, bounds, &img, col);\n}\n\n\n\n\n\n/* ==============================================================\n *\n *                          BUTTON\n *\n * ===============================================================*/\nNK_LIB void\nnk_draw_symbol(struct nk_command_buffer *out, enum nk_symbol_type type,\n    struct nk_rect content, struct nk_color background, struct nk_color foreground,\n    float border_width, const struct nk_user_font *font)\n{\n    switch (type) {\n    case NK_SYMBOL_X:\n    case NK_SYMBOL_UNDERSCORE:\n    case NK_SYMBOL_PLUS:\n    case NK_SYMBOL_MINUS: {\n        /* single character text symbol */\n        const char *X = (type == NK_SYMBOL_X) ? \"x\":\n            (type == NK_SYMBOL_UNDERSCORE) ? \"_\":\n            (type == NK_SYMBOL_PLUS) ? \"+\": \"-\";\n        struct nk_text text;\n        text.padding = nk_vec2(0,0);\n        text.background = background;\n        text.text = foreground;\n        nk_widget_text(out, content, X, 1, &text, NK_TEXT_CENTERED, font);\n    } break;\n    case NK_SYMBOL_CIRCLE_SOLID:\n    case NK_SYMBOL_CIRCLE_OUTLINE:\n    case NK_SYMBOL_RECT_SOLID:\n    case NK_SYMBOL_RECT_OUTLINE: {\n        /* simple empty/filled shapes */\n        if (type == NK_SYMBOL_RECT_SOLID || type == NK_SYMBOL_RECT_OUTLINE) {\n            nk_fill_rect(out, content,  0, foreground);\n            if (type == NK_SYMBOL_RECT_OUTLINE)\n                nk_fill_rect(out, nk_shrink_rect(content, border_width), 0, background);\n        } else {\n            nk_fill_circle(out, content, foreground);\n            if (type == NK_SYMBOL_CIRCLE_OUTLINE)\n                nk_fill_circle(out, nk_shrink_rect(content, 1), background);\n        }\n    } break;\n    case NK_SYMBOL_TRIANGLE_UP:\n    case NK_SYMBOL_TRIANGLE_DOWN:\n    case NK_SYMBOL_TRIANGLE_LEFT:\n    case NK_SYMBOL_TRIANGLE_RIGHT: {\n        enum nk_heading heading;\n        struct nk_vec2 points[3];\n        heading = (type == NK_SYMBOL_TRIANGLE_RIGHT) ? NK_RIGHT :\n            (type == NK_SYMBOL_TRIANGLE_LEFT) ? NK_LEFT:\n            (type == NK_SYMBOL_TRIANGLE_UP) ? NK_UP: NK_DOWN;\n        nk_triangle_from_direction(points, content, 0, 0, heading);\n        nk_fill_triangle(out, points[0].x, points[0].y, points[1].x, points[1].y,\n            points[2].x, points[2].y, foreground);\n    } break;\n    default:\n    case NK_SYMBOL_NONE:\n    case NK_SYMBOL_MAX: break;\n    }\n}\nNK_LIB int\nnk_button_behavior(nk_flags *state, struct nk_rect r,\n    const struct nk_input *i, enum nk_button_behavior behavior)\n{\n    int ret = 0;\n    nk_widget_state_reset(state);\n    if (!i) return 0;\n    if (nk_input_is_mouse_hovering_rect(i, r)) {\n        *state = NK_WIDGET_STATE_HOVERED;\n        if (nk_input_is_mouse_down(i, NK_BUTTON_LEFT))\n            *state = NK_WIDGET_STATE_ACTIVE;\n        if (nk_input_has_mouse_click_in_rect(i, NK_BUTTON_LEFT, r)) {\n            ret = (behavior != NK_BUTTON_DEFAULT) ?\n                nk_input_is_mouse_down(i, NK_BUTTON_LEFT):\n#ifdef NK_BUTTON_TRIGGER_ON_RELEASE\n                nk_input_is_mouse_released(i, NK_BUTTON_LEFT);\n#else\n                nk_input_is_mouse_pressed(i, NK_BUTTON_LEFT);\n#endif\n        }\n    }\n    if (*state & NK_WIDGET_STATE_HOVER && !nk_input_is_mouse_prev_hovering_rect(i, r))\n        *state |= NK_WIDGET_STATE_ENTERED;\n    else if (nk_input_is_mouse_prev_hovering_rect(i, r))\n        *state |= NK_WIDGET_STATE_LEFT;\n    return ret;\n}\nNK_LIB const struct nk_style_item*\nnk_draw_button(struct nk_command_buffer *out,\n    const struct nk_rect *bounds, nk_flags state,\n    const struct nk_style_button *style)\n{\n    const struct nk_style_item *background;\n    if (state & NK_WIDGET_STATE_HOVER)\n        background = &style->hover;\n    else if (state & NK_WIDGET_STATE_ACTIVED)\n        background = &style->active;\n    else background = &style->normal;\n\n    if (background->type == NK_STYLE_ITEM_IMAGE) {\n        nk_draw_image(out, *bounds, &background->data.image, nk_white);\n    } else {\n        nk_fill_rect(out, *bounds, style->rounding, background->data.color);\n        nk_stroke_rect(out, *bounds, style->rounding, style->border, style->border_color);\n    }\n    return background;\n}\nNK_LIB int\nnk_do_button(nk_flags *state, struct nk_command_buffer *out, struct nk_rect r,\n    const struct nk_style_button *style, const struct nk_input *in,\n    enum nk_button_behavior behavior, struct nk_rect *content)\n{\n    struct nk_rect bounds;\n    NK_ASSERT(style);\n    NK_ASSERT(state);\n    NK_ASSERT(out);\n    if (!out || !style)\n        return nk_false;\n\n    /* calculate button content space */\n    content->x = r.x + style->padding.x + style->border + style->rounding;\n    content->y = r.y + style->padding.y + style->border + style->rounding;\n    content->w = r.w - (2 * style->padding.x + style->border + style->rounding*2);\n    content->h = r.h - (2 * style->padding.y + style->border + style->rounding*2);\n\n    /* execute button behavior */\n    bounds.x = r.x - style->touch_padding.x;\n    bounds.y = r.y - style->touch_padding.y;\n    bounds.w = r.w + 2 * style->touch_padding.x;\n    bounds.h = r.h + 2 * style->touch_padding.y;\n    return nk_button_behavior(state, bounds, in, behavior);\n}\nNK_LIB void\nnk_draw_button_text(struct nk_command_buffer *out,\n    const struct nk_rect *bounds, const struct nk_rect *content, nk_flags state,\n    const struct nk_style_button *style, const char *txt, int len,\n    nk_flags text_alignment, const struct nk_user_font *font)\n{\n    struct nk_text text;\n    const struct nk_style_item *background;\n    background = nk_draw_button(out, bounds, state, style);\n\n    /* select correct colors/images */\n    if (background->type == NK_STYLE_ITEM_COLOR)\n        text.background = background->data.color;\n    else text.background = style->text_background;\n    if (state & NK_WIDGET_STATE_HOVER)\n        text.text = style->text_hover;\n    else if (state & NK_WIDGET_STATE_ACTIVED)\n        text.text = style->text_active;\n    else text.text = style->text_normal;\n\n    text.padding = nk_vec2(0,0);\n    nk_widget_text(out, *content, txt, len, &text, text_alignment, font);\n}\nNK_LIB int\nnk_do_button_text(nk_flags *state,\n    struct nk_command_buffer *out, struct nk_rect bounds,\n    const char *string, int len, nk_flags align, enum nk_button_behavior behavior,\n    const struct nk_style_button *style, const struct nk_input *in,\n    const struct nk_user_font *font)\n{\n    struct nk_rect content;\n    int ret = nk_false;\n\n    NK_ASSERT(state);\n    NK_ASSERT(style);\n    NK_ASSERT(out);\n    NK_ASSERT(string);\n    NK_ASSERT(font);\n    if (!out || !style || !font || !string)\n        return nk_false;\n\n    ret = nk_do_button(state, out, bounds, style, in, behavior, &content);\n    if (style->draw_begin) style->draw_begin(out, style->userdata);\n    nk_draw_button_text(out, &bounds, &content, *state, style, string, len, align, font);\n    if (style->draw_end) style->draw_end(out, style->userdata);\n    return ret;\n}\nNK_LIB void\nnk_draw_button_symbol(struct nk_command_buffer *out,\n    const struct nk_rect *bounds, const struct nk_rect *content,\n    nk_flags state, const struct nk_style_button *style,\n    enum nk_symbol_type type, const struct nk_user_font *font)\n{\n    struct nk_color sym, bg;\n    const struct nk_style_item *background;\n\n    /* select correct colors/images */\n    background = nk_draw_button(out, bounds, state, style);\n    if (background->type == NK_STYLE_ITEM_COLOR)\n        bg = background->data.color;\n    else bg = style->text_background;\n\n    if (state & NK_WIDGET_STATE_HOVER)\n        sym = style->text_hover;\n    else if (state & NK_WIDGET_STATE_ACTIVED)\n        sym = style->text_active;\n    else sym = style->text_normal;\n    nk_draw_symbol(out, type, *content, bg, sym, 1, font);\n}\nNK_LIB int\nnk_do_button_symbol(nk_flags *state,\n    struct nk_command_buffer *out, struct nk_rect bounds,\n    enum nk_symbol_type symbol, enum nk_button_behavior behavior,\n    const struct nk_style_button *style, const struct nk_input *in,\n    const struct nk_user_font *font)\n{\n    int ret;\n    struct nk_rect content;\n\n    NK_ASSERT(state);\n    NK_ASSERT(style);\n    NK_ASSERT(font);\n    NK_ASSERT(out);\n    if (!out || !style || !font || !state)\n        return nk_false;\n\n    ret = nk_do_button(state, out, bounds, style, in, behavior, &content);\n    if (style->draw_begin) style->draw_begin(out, style->userdata);\n    nk_draw_button_symbol(out, &bounds, &content, *state, style, symbol, font);\n    if (style->draw_end) style->draw_end(out, style->userdata);\n    return ret;\n}\nNK_LIB void\nnk_draw_button_image(struct nk_command_buffer *out,\n    const struct nk_rect *bounds, const struct nk_rect *content,\n    nk_flags state, const struct nk_style_button *style, const struct nk_image *img)\n{\n    nk_draw_button(out, bounds, state, style);\n    nk_draw_image(out, *content, img, nk_white);\n}\nNK_LIB int\nnk_do_button_image(nk_flags *state,\n    struct nk_command_buffer *out, struct nk_rect bounds,\n    struct nk_image img, enum nk_button_behavior b,\n    const struct nk_style_button *style, const struct nk_input *in)\n{\n    int ret;\n    struct nk_rect content;\n\n    NK_ASSERT(state);\n    NK_ASSERT(style);\n    NK_ASSERT(out);\n    if (!out || !style || !state)\n        return nk_false;\n\n    ret = nk_do_button(state, out, bounds, style, in, b, &content);\n    content.x += style->image_padding.x;\n    content.y += style->image_padding.y;\n    content.w -= 2 * style->image_padding.x;\n    content.h -= 2 * style->image_padding.y;\n\n    if (style->draw_begin) style->draw_begin(out, style->userdata);\n    nk_draw_button_image(out, &bounds, &content, *state, style, &img);\n    if (style->draw_end) style->draw_end(out, style->userdata);\n    return ret;\n}\nNK_LIB void\nnk_draw_button_text_symbol(struct nk_command_buffer *out,\n    const struct nk_rect *bounds, const struct nk_rect *label,\n    const struct nk_rect *symbol, nk_flags state, const struct nk_style_button *style,\n    const char *str, int len, enum nk_symbol_type type,\n    const struct nk_user_font *font)\n{\n    struct nk_color sym;\n    struct nk_text text;\n    const struct nk_style_item *background;\n\n    /* select correct background colors/images */\n    background = nk_draw_button(out, bounds, state, style);\n    if (background->type == NK_STYLE_ITEM_COLOR)\n        text.background = background->data.color;\n    else text.background = style->text_background;\n\n    /* select correct text colors */\n    if (state & NK_WIDGET_STATE_HOVER) {\n        sym = style->text_hover;\n        text.text = style->text_hover;\n    } else if (state & NK_WIDGET_STATE_ACTIVED) {\n        sym = style->text_active;\n        text.text = style->text_active;\n    } else {\n        sym = style->text_normal;\n        text.text = style->text_normal;\n    }\n\n    text.padding = nk_vec2(0,0);\n    nk_draw_symbol(out, type, *symbol, style->text_background, sym, 0, font);\n    nk_widget_text(out, *label, str, len, &text, NK_TEXT_CENTERED, font);\n}\nNK_LIB int\nnk_do_button_text_symbol(nk_flags *state,\n    struct nk_command_buffer *out, struct nk_rect bounds,\n    enum nk_symbol_type symbol, const char *str, int len, nk_flags align,\n    enum nk_button_behavior behavior, const struct nk_style_button *style,\n    const struct nk_user_font *font, const struct nk_input *in)\n{\n    int ret;\n    struct nk_rect tri = {0,0,0,0};\n    struct nk_rect content;\n\n    NK_ASSERT(style);\n    NK_ASSERT(out);\n    NK_ASSERT(font);\n    if (!out || !style || !font)\n        return nk_false;\n\n    ret = nk_do_button(state, out, bounds, style, in, behavior, &content);\n    tri.y = content.y + (content.h/2) - font->height/2;\n    tri.w = font->height; tri.h = font->height;\n    if (align & NK_TEXT_ALIGN_LEFT) {\n        tri.x = (content.x + content.w) - (2 * style->padding.x + tri.w);\n        tri.x = NK_MAX(tri.x, 0);\n    } else tri.x = content.x + 2 * style->padding.x;\n\n    /* draw button */\n    if (style->draw_begin) style->draw_begin(out, style->userdata);\n    nk_draw_button_text_symbol(out, &bounds, &content, &tri,\n        *state, style, str, len, symbol, font);\n    if (style->draw_end) style->draw_end(out, style->userdata);\n    return ret;\n}\nNK_LIB void\nnk_draw_button_text_image(struct nk_command_buffer *out,\n    const struct nk_rect *bounds, const struct nk_rect *label,\n    const struct nk_rect *image, nk_flags state, const struct nk_style_button *style,\n    const char *str, int len, const struct nk_user_font *font,\n    const struct nk_image *img)\n{\n    struct nk_text text;\n    const struct nk_style_item *background;\n    background = nk_draw_button(out, bounds, state, style);\n\n    /* select correct colors */\n    if (background->type == NK_STYLE_ITEM_COLOR)\n        text.background = background->data.color;\n    else text.background = style->text_background;\n    if (state & NK_WIDGET_STATE_HOVER)\n        text.text = style->text_hover;\n    else if (state & NK_WIDGET_STATE_ACTIVED)\n        text.text = style->text_active;\n    else text.text = style->text_normal;\n\n    text.padding = nk_vec2(0,0);\n    nk_widget_text(out, *label, str, len, &text, NK_TEXT_CENTERED, font);\n    nk_draw_image(out, *image, img, nk_white);\n}\nNK_LIB int\nnk_do_button_text_image(nk_flags *state,\n    struct nk_command_buffer *out, struct nk_rect bounds,\n    struct nk_image img, const char* str, int len, nk_flags align,\n    enum nk_button_behavior behavior, const struct nk_style_button *style,\n    const struct nk_user_font *font, const struct nk_input *in)\n{\n    int ret;\n    struct nk_rect icon;\n    struct nk_rect content;\n\n    NK_ASSERT(style);\n    NK_ASSERT(state);\n    NK_ASSERT(font);\n    NK_ASSERT(out);\n    if (!out || !font || !style || !str)\n        return nk_false;\n\n    ret = nk_do_button(state, out, bounds, style, in, behavior, &content);\n    icon.y = bounds.y + style->padding.y;\n    icon.w = icon.h = bounds.h - 2 * style->padding.y;\n    if (align & NK_TEXT_ALIGN_LEFT) {\n        icon.x = (bounds.x + bounds.w) - (2 * style->padding.x + icon.w);\n        icon.x = NK_MAX(icon.x, 0);\n    } else icon.x = bounds.x + 2 * style->padding.x;\n\n    icon.x += style->image_padding.x;\n    icon.y += style->image_padding.y;\n    icon.w -= 2 * style->image_padding.x;\n    icon.h -= 2 * style->image_padding.y;\n\n    if (style->draw_begin) style->draw_begin(out, style->userdata);\n    nk_draw_button_text_image(out, &bounds, &content, &icon, *state, style, str, len, font, &img);\n    if (style->draw_end) style->draw_end(out, style->userdata);\n    return ret;\n}\nNK_API void\nnk_button_set_behavior(struct nk_context *ctx, enum nk_button_behavior behavior)\n{\n    NK_ASSERT(ctx);\n    if (!ctx) return;\n    ctx->button_behavior = behavior;\n}\nNK_API int\nnk_button_push_behavior(struct nk_context *ctx, enum nk_button_behavior behavior)\n{\n    struct nk_config_stack_button_behavior *button_stack;\n    struct nk_config_stack_button_behavior_element *element;\n\n    NK_ASSERT(ctx);\n    if (!ctx) return 0;\n\n    button_stack = &ctx->stacks.button_behaviors;\n    NK_ASSERT(button_stack->head < (int)NK_LEN(button_stack->elements));\n    if (button_stack->head >= (int)NK_LEN(button_stack->elements))\n        return 0;\n\n    element = &button_stack->elements[button_stack->head++];\n    element->address = &ctx->button_behavior;\n    element->old_value = ctx->button_behavior;\n    ctx->button_behavior = behavior;\n    return 1;\n}\nNK_API int\nnk_button_pop_behavior(struct nk_context *ctx)\n{\n    struct nk_config_stack_button_behavior *button_stack;\n    struct nk_config_stack_button_behavior_element *element;\n\n    NK_ASSERT(ctx);\n    if (!ctx) return 0;\n\n    button_stack = &ctx->stacks.button_behaviors;\n    NK_ASSERT(button_stack->head > 0);\n    if (button_stack->head < 1)\n        return 0;\n\n    element = &button_stack->elements[--button_stack->head];\n    *element->address = element->old_value;\n    return 1;\n}\nNK_API int\nnk_button_text_styled(struct nk_context *ctx,\n    const struct nk_style_button *style, const char *title, int len)\n{\n    struct nk_window *win;\n    struct nk_panel *layout;\n    const struct nk_input *in;\n\n    struct nk_rect bounds;\n    enum nk_widget_layout_states state;\n\n    NK_ASSERT(ctx);\n    NK_ASSERT(style);\n    NK_ASSERT(ctx->current);\n    NK_ASSERT(ctx->current->layout);\n    if (!style || !ctx || !ctx->current || !ctx->current->layout) return 0;\n\n    win = ctx->current;\n    layout = win->layout;\n    state = nk_widget(&bounds, ctx);\n\n    if (!state) return 0;\n    in = (state == NK_WIDGET_ROM || layout->flags & NK_WINDOW_ROM) ? 0 : &ctx->input;\n    return nk_do_button_text(&ctx->last_widget_state, &win->buffer, bounds,\n                    title, len, style->text_alignment, ctx->button_behavior,\n                    style, in, ctx->style.font);\n}\nNK_API int\nnk_button_text(struct nk_context *ctx, const char *title, int len)\n{\n    NK_ASSERT(ctx);\n    if (!ctx) return 0;\n    return nk_button_text_styled(ctx, &ctx->style.button, title, len);\n}\nNK_API int nk_button_label_styled(struct nk_context *ctx,\n    const struct nk_style_button *style, const char *title)\n{\n    return nk_button_text_styled(ctx, style, title, nk_strlen(title));\n}\nNK_API int nk_button_label(struct nk_context *ctx, const char *title)\n{\n    return nk_button_text(ctx, title, nk_strlen(title));\n}\nNK_API int\nnk_button_color(struct nk_context *ctx, struct nk_color color)\n{\n    struct nk_window *win;\n    struct nk_panel *layout;\n    const struct nk_input *in;\n    struct nk_style_button button;\n\n    int ret = 0;\n    struct nk_rect bounds;\n    struct nk_rect content;\n    enum nk_widget_layout_states state;\n\n    NK_ASSERT(ctx);\n    NK_ASSERT(ctx->current);\n    NK_ASSERT(ctx->current->layout);\n    if (!ctx || !ctx->current || !ctx->current->layout)\n        return 0;\n\n    win = ctx->current;\n    layout = win->layout;\n\n    state = nk_widget(&bounds, ctx);\n    if (!state) return 0;\n    in = (state == NK_WIDGET_ROM || layout->flags & NK_WINDOW_ROM) ? 0 : &ctx->input;\n\n    button = ctx->style.button;\n    button.normal = nk_style_item_color(color);\n    button.hover = nk_style_item_color(color);\n    button.active = nk_style_item_color(color);\n    ret = nk_do_button(&ctx->last_widget_state, &win->buffer, bounds,\n                &button, in, ctx->button_behavior, &content);\n    nk_draw_button(&win->buffer, &bounds, ctx->last_widget_state, &button);\n    return ret;\n}\nNK_API int\nnk_button_symbol_styled(struct nk_context *ctx,\n    const struct nk_style_button *style, enum nk_symbol_type symbol)\n{\n    struct nk_window *win;\n    struct nk_panel *layout;\n    const struct nk_input *in;\n\n    struct nk_rect bounds;\n    enum nk_widget_layout_states state;\n\n    NK_ASSERT(ctx);\n    NK_ASSERT(ctx->current);\n    NK_ASSERT(ctx->current->layout);\n    if (!ctx || !ctx->current || !ctx->current->layout)\n        return 0;\n\n    win = ctx->current;\n    layout = win->layout;\n    state = nk_widget(&bounds, ctx);\n    if (!state) return 0;\n    in = (state == NK_WIDGET_ROM || layout->flags & NK_WINDOW_ROM) ? 0 : &ctx->input;\n    return nk_do_button_symbol(&ctx->last_widget_state, &win->buffer, bounds,\n            symbol, ctx->button_behavior, style, in, ctx->style.font);\n}\nNK_API int\nnk_button_symbol(struct nk_context *ctx, enum nk_symbol_type symbol)\n{\n    NK_ASSERT(ctx);\n    if (!ctx) return 0;\n    return nk_button_symbol_styled(ctx, &ctx->style.button, symbol);\n}\nNK_API int\nnk_button_image_styled(struct nk_context *ctx, const struct nk_style_button *style,\n    struct nk_image img)\n{\n    struct nk_window *win;\n    struct nk_panel *layout;\n    const struct nk_input *in;\n\n    struct nk_rect bounds;\n    enum nk_widget_layout_states state;\n\n    NK_ASSERT(ctx);\n    NK_ASSERT(ctx->current);\n    NK_ASSERT(ctx->current->layout);\n    if (!ctx || !ctx->current || !ctx->current->layout)\n        return 0;\n\n    win = ctx->current;\n    layout = win->layout;\n\n    state = nk_widget(&bounds, ctx);\n    if (!state) return 0;\n    in = (state == NK_WIDGET_ROM || layout->flags & NK_WINDOW_ROM) ? 0 : &ctx->input;\n    return nk_do_button_image(&ctx->last_widget_state, &win->buffer, bounds,\n                img, ctx->button_behavior, style, in);\n}\nNK_API int\nnk_button_image(struct nk_context *ctx, struct nk_image img)\n{\n    NK_ASSERT(ctx);\n    if (!ctx) return 0;\n    return nk_button_image_styled(ctx, &ctx->style.button, img);\n}\nNK_API int\nnk_button_symbol_text_styled(struct nk_context *ctx,\n    const struct nk_style_button *style, enum nk_symbol_type symbol,\n    const char *text, int len, nk_flags align)\n{\n    struct nk_window *win;\n    struct nk_panel *layout;\n    const struct nk_input *in;\n\n    struct nk_rect bounds;\n    enum nk_widget_layout_states state;\n\n    NK_ASSERT(ctx);\n    NK_ASSERT(ctx->current);\n    NK_ASSERT(ctx->current->layout);\n    if (!ctx || !ctx->current || !ctx->current->layout)\n        return 0;\n\n    win = ctx->current;\n    layout = win->layout;\n\n    state = nk_widget(&bounds, ctx);\n    if (!state) return 0;\n    in = (state == NK_WIDGET_ROM || layout->flags & NK_WINDOW_ROM) ? 0 : &ctx->input;\n    return nk_do_button_text_symbol(&ctx->last_widget_state, &win->buffer, bounds,\n                symbol, text, len, align, ctx->button_behavior,\n                style, ctx->style.font, in);\n}\nNK_API int\nnk_button_symbol_text(struct nk_context *ctx, enum nk_symbol_type symbol,\n    const char* text, int len, nk_flags align)\n{\n    NK_ASSERT(ctx);\n    if (!ctx) return 0;\n    return nk_button_symbol_text_styled(ctx, &ctx->style.button, symbol, text, len, align);\n}\nNK_API int nk_button_symbol_label(struct nk_context *ctx, enum nk_symbol_type symbol,\n    const char *label, nk_flags align)\n{\n    return nk_button_symbol_text(ctx, symbol, label, nk_strlen(label), align);\n}\nNK_API int nk_button_symbol_label_styled(struct nk_context *ctx,\n    const struct nk_style_button *style, enum nk_symbol_type symbol,\n    const char *title, nk_flags align)\n{\n    return nk_button_symbol_text_styled(ctx, style, symbol, title, nk_strlen(title), align);\n}\nNK_API int\nnk_button_image_text_styled(struct nk_context *ctx,\n    const struct nk_style_button *style, struct nk_image img, const char *text,\n    int len, nk_flags align)\n{\n    struct nk_window *win;\n    struct nk_panel *layout;\n    const struct nk_input *in;\n\n    struct nk_rect bounds;\n    enum nk_widget_layout_states state;\n\n    NK_ASSERT(ctx);\n    NK_ASSERT(ctx->current);\n    NK_ASSERT(ctx->current->layout);\n    if (!ctx || !ctx->current || !ctx->current->layout)\n        return 0;\n\n    win = ctx->current;\n    layout = win->layout;\n\n    state = nk_widget(&bounds, ctx);\n    if (!state) return 0;\n    in = (state == NK_WIDGET_ROM || layout->flags & NK_WINDOW_ROM) ? 0 : &ctx->input;\n    return nk_do_button_text_image(&ctx->last_widget_state, &win->buffer,\n            bounds, img, text, len, align, ctx->button_behavior,\n            style, ctx->style.font, in);\n}\nNK_API int\nnk_button_image_text(struct nk_context *ctx, struct nk_image img,\n    const char *text, int len, nk_flags align)\n{\n    return nk_button_image_text_styled(ctx, &ctx->style.button,img, text, len, align);\n}\nNK_API int nk_button_image_label(struct nk_context *ctx, struct nk_image img,\n    const char *label, nk_flags align)\n{\n    return nk_button_image_text(ctx, img, label, nk_strlen(label), align);\n}\nNK_API int nk_button_image_label_styled(struct nk_context *ctx,\n    const struct nk_style_button *style, struct nk_image img,\n    const char *label, nk_flags text_alignment)\n{\n    return nk_button_image_text_styled(ctx, style, img, label, nk_strlen(label), text_alignment);\n}\n\n\n\n\n\n/* ===============================================================\n *\n *                              TOGGLE\n *\n * ===============================================================*/\nNK_LIB int\nnk_toggle_behavior(const struct nk_input *in, struct nk_rect select,\n    nk_flags *state, int active)\n{\n    nk_widget_state_reset(state);\n    if (nk_button_behavior(state, select, in, NK_BUTTON_DEFAULT)) {\n        *state = NK_WIDGET_STATE_ACTIVE;\n        active = !active;\n    }\n    if (*state & NK_WIDGET_STATE_HOVER && !nk_input_is_mouse_prev_hovering_rect(in, select))\n        *state |= NK_WIDGET_STATE_ENTERED;\n    else if (nk_input_is_mouse_prev_hovering_rect(in, select))\n        *state |= NK_WIDGET_STATE_LEFT;\n    return active;\n}\nNK_LIB void\nnk_draw_checkbox(struct nk_command_buffer *out,\n    nk_flags state, const struct nk_style_toggle *style, int active,\n    const struct nk_rect *label, const struct nk_rect *selector,\n    const struct nk_rect *cursors, const char *string, int len,\n    const struct nk_user_font *font)\n{\n    const struct nk_style_item *background;\n    const struct nk_style_item *cursor;\n    struct nk_text text;\n\n    /* select correct colors/images */\n    if (state & NK_WIDGET_STATE_HOVER) {\n        background = &style->hover;\n        cursor = &style->cursor_hover;\n        text.text = style->text_hover;\n    } else if (state & NK_WIDGET_STATE_ACTIVED) {\n        background = &style->hover;\n        cursor = &style->cursor_hover;\n        text.text = style->text_active;\n    } else {\n        background = &style->normal;\n        cursor = &style->cursor_normal;\n        text.text = style->text_normal;\n    }\n\n    /* draw background and cursor */\n    if (background->type == NK_STYLE_ITEM_COLOR) {\n        nk_fill_rect(out, *selector, 0, style->border_color);\n        nk_fill_rect(out, nk_shrink_rect(*selector, style->border), 0, background->data.color);\n    } else nk_draw_image(out, *selector, &background->data.image, nk_white);\n    if (active) {\n        if (cursor->type == NK_STYLE_ITEM_IMAGE)\n            nk_draw_image(out, *cursors, &cursor->data.image, nk_white);\n        else nk_fill_rect(out, *cursors, 0, cursor->data.color);\n    }\n\n    text.padding.x = 0;\n    text.padding.y = 0;\n    text.background = style->text_background;\n    nk_widget_text(out, *label, string, len, &text, NK_TEXT_LEFT, font);\n}\nNK_LIB void\nnk_draw_option(struct nk_command_buffer *out,\n    nk_flags state, const struct nk_style_toggle *style, int active,\n    const struct nk_rect *label, const struct nk_rect *selector,\n    const struct nk_rect *cursors, const char *string, int len,\n    const struct nk_user_font *font)\n{\n    const struct nk_style_item *background;\n    const struct nk_style_item *cursor;\n    struct nk_text text;\n\n    /* select correct colors/images */\n    if (state & NK_WIDGET_STATE_HOVER) {\n        background = &style->hover;\n        cursor = &style->cursor_hover;\n        text.text = style->text_hover;\n    } else if (state & NK_WIDGET_STATE_ACTIVED) {\n        background = &style->hover;\n        cursor = &style->cursor_hover;\n        text.text = style->text_active;\n    } else {\n        background = &style->normal;\n        cursor = &style->cursor_normal;\n        text.text = style->text_normal;\n    }\n\n    /* draw background and cursor */\n    if (background->type == NK_STYLE_ITEM_COLOR) {\n        nk_fill_circle(out, *selector, style->border_color);\n        nk_fill_circle(out, nk_shrink_rect(*selector, style->border), background->data.color);\n    } else nk_draw_image(out, *selector, &background->data.image, nk_white);\n    if (active) {\n        if (cursor->type == NK_STYLE_ITEM_IMAGE)\n            nk_draw_image(out, *cursors, &cursor->data.image, nk_white);\n        else nk_fill_circle(out, *cursors, cursor->data.color);\n    }\n\n    text.padding.x = 0;\n    text.padding.y = 0;\n    text.background = style->text_background;\n    nk_widget_text(out, *label, string, len, &text, NK_TEXT_LEFT, font);\n}\nNK_LIB int\nnk_do_toggle(nk_flags *state,\n    struct nk_command_buffer *out, struct nk_rect r,\n    int *active, const char *str, int len, enum nk_toggle_type type,\n    const struct nk_style_toggle *style, const struct nk_input *in,\n    const struct nk_user_font *font)\n{\n    int was_active;\n    struct nk_rect bounds;\n    struct nk_rect select;\n    struct nk_rect cursor;\n    struct nk_rect label;\n\n    NK_ASSERT(style);\n    NK_ASSERT(out);\n    NK_ASSERT(font);\n    if (!out || !style || !font || !active)\n        return 0;\n\n    r.w = NK_MAX(r.w, font->height + 2 * style->padding.x);\n    r.h = NK_MAX(r.h, font->height + 2 * style->padding.y);\n\n    /* add additional touch padding for touch screen devices */\n    bounds.x = r.x - style->touch_padding.x;\n    bounds.y = r.y - style->touch_padding.y;\n    bounds.w = r.w + 2 * style->touch_padding.x;\n    bounds.h = r.h + 2 * style->touch_padding.y;\n\n    /* calculate the selector space */\n    select.w = font->height;\n    select.h = select.w;\n    select.y = r.y + r.h/2.0f - select.h/2.0f;\n    select.x = r.x;\n\n    /* calculate the bounds of the cursor inside the selector */\n    cursor.x = select.x + style->padding.x + style->border;\n    cursor.y = select.y + style->padding.y + style->border;\n    cursor.w = select.w - (2 * style->padding.x + 2 * style->border);\n    cursor.h = select.h - (2 * style->padding.y + 2 * style->border);\n\n    /* label behind the selector */\n    label.x = select.x + select.w + style->spacing;\n    label.y = select.y;\n    label.w = NK_MAX(r.x + r.w, label.x) - label.x;\n    label.h = select.w;\n\n    /* update selector */\n    was_active = *active;\n    *active = nk_toggle_behavior(in, bounds, state, *active);\n\n    /* draw selector */\n    if (style->draw_begin)\n        style->draw_begin(out, style->userdata);\n    if (type == NK_TOGGLE_CHECK) {\n        nk_draw_checkbox(out, *state, style, *active, &label, &select, &cursor, str, len, font);\n    } else {\n        nk_draw_option(out, *state, style, *active, &label, &select, &cursor, str, len, font);\n    }\n    if (style->draw_end)\n        style->draw_end(out, style->userdata);\n    return (was_active != *active);\n}\n/*----------------------------------------------------------------\n *\n *                          CHECKBOX\n *\n * --------------------------------------------------------------*/\nNK_API int\nnk_check_text(struct nk_context *ctx, const char *text, int len, int active)\n{\n    struct nk_window *win;\n    struct nk_panel *layout;\n    const struct nk_input *in;\n    const struct nk_style *style;\n\n    struct nk_rect bounds;\n    enum nk_widget_layout_states state;\n\n    NK_ASSERT(ctx);\n    NK_ASSERT(ctx->current);\n    NK_ASSERT(ctx->current->layout);\n    if (!ctx || !ctx->current || !ctx->current->layout)\n        return active;\n\n    win = ctx->current;\n    style = &ctx->style;\n    layout = win->layout;\n\n    state = nk_widget(&bounds, ctx);\n    if (!state) return active;\n    in = (state == NK_WIDGET_ROM || layout->flags & NK_WINDOW_ROM) ? 0 : &ctx->input;\n    nk_do_toggle(&ctx->last_widget_state, &win->buffer, bounds, &active,\n        text, len, NK_TOGGLE_CHECK, &style->checkbox, in, style->font);\n    return active;\n}\nNK_API unsigned int\nnk_check_flags_text(struct nk_context *ctx, const char *text, int len,\n    unsigned int flags, unsigned int value)\n{\n    int old_active;\n    NK_ASSERT(ctx);\n    NK_ASSERT(text);\n    if (!ctx || !text) return flags;\n    old_active = (int)((flags & value) & value);\n    if (nk_check_text(ctx, text, len, old_active))\n        flags |= value;\n    else flags &= ~value;\n    return flags;\n}\nNK_API int\nnk_checkbox_text(struct nk_context *ctx, const char *text, int len, int *active)\n{\n    int old_val;\n    NK_ASSERT(ctx);\n    NK_ASSERT(text);\n    NK_ASSERT(active);\n    if (!ctx || !text || !active) return 0;\n    old_val = *active;\n    *active = nk_check_text(ctx, text, len, *active);\n    return old_val != *active;\n}\nNK_API int\nnk_checkbox_flags_text(struct nk_context *ctx, const char *text, int len,\n    unsigned int *flags, unsigned int value)\n{\n    int active;\n    NK_ASSERT(ctx);\n    NK_ASSERT(text);\n    NK_ASSERT(flags);\n    if (!ctx || !text || !flags) return 0;\n\n    active = (int)((*flags & value) & value);\n    if (nk_checkbox_text(ctx, text, len, &active)) {\n        if (active) *flags |= value;\n        else *flags &= ~value;\n        return 1;\n    }\n    return 0;\n}\nNK_API int nk_check_label(struct nk_context *ctx, const char *label, int active)\n{\n    return nk_check_text(ctx, label, nk_strlen(label), active);\n}\nNK_API unsigned int nk_check_flags_label(struct nk_context *ctx, const char *label,\n    unsigned int flags, unsigned int value)\n{\n    return nk_check_flags_text(ctx, label, nk_strlen(label), flags, value);\n}\nNK_API int nk_checkbox_label(struct nk_context *ctx, const char *label, int *active)\n{\n    return nk_checkbox_text(ctx, label, nk_strlen(label), active);\n}\nNK_API int nk_checkbox_flags_label(struct nk_context *ctx, const char *label,\n    unsigned int *flags, unsigned int value)\n{\n    return nk_checkbox_flags_text(ctx, label, nk_strlen(label), flags, value);\n}\n/*----------------------------------------------------------------\n *\n *                          OPTION\n *\n * --------------------------------------------------------------*/\nNK_API int\nnk_option_text(struct nk_context *ctx, const char *text, int len, int is_active)\n{\n    struct nk_window *win;\n    struct nk_panel *layout;\n    const struct nk_input *in;\n    const struct nk_style *style;\n\n    struct nk_rect bounds;\n    enum nk_widget_layout_states state;\n\n    NK_ASSERT(ctx);\n    NK_ASSERT(ctx->current);\n    NK_ASSERT(ctx->current->layout);\n    if (!ctx || !ctx->current || !ctx->current->layout)\n        return is_active;\n\n    win = ctx->current;\n    style = &ctx->style;\n    layout = win->layout;\n\n    state = nk_widget(&bounds, ctx);\n    if (!state) return (int)state;\n    in = (state == NK_WIDGET_ROM || layout->flags & NK_WINDOW_ROM) ? 0 : &ctx->input;\n    nk_do_toggle(&ctx->last_widget_state, &win->buffer, bounds, &is_active,\n        text, len, NK_TOGGLE_OPTION, &style->option, in, style->font);\n    return is_active;\n}\nNK_API int\nnk_radio_text(struct nk_context *ctx, const char *text, int len, int *active)\n{\n    int old_value;\n    NK_ASSERT(ctx);\n    NK_ASSERT(text);\n    NK_ASSERT(active);\n    if (!ctx || !text || !active) return 0;\n    old_value = *active;\n    *active = nk_option_text(ctx, text, len, old_value);\n    return old_value != *active;\n}\nNK_API int\nnk_option_label(struct nk_context *ctx, const char *label, int active)\n{\n    return nk_option_text(ctx, label, nk_strlen(label), active);\n}\nNK_API int\nnk_radio_label(struct nk_context *ctx, const char *label, int *active)\n{\n    return nk_radio_text(ctx, label, nk_strlen(label), active);\n}\n\n\n\n\n\n/* ===============================================================\n *\n *                              SELECTABLE\n *\n * ===============================================================*/\nNK_LIB void\nnk_draw_selectable(struct nk_command_buffer *out,\n    nk_flags state, const struct nk_style_selectable *style, int active,\n    const struct nk_rect *bounds,\n    const struct nk_rect *icon, const struct nk_image *img, enum nk_symbol_type sym,\n    const char *string, int len, nk_flags align, const struct nk_user_font *font)\n{\n    const struct nk_style_item *background;\n    struct nk_text text;\n    text.padding = style->padding;\n\n    /* select correct colors/images */\n    if (!active) {\n        if (state & NK_WIDGET_STATE_ACTIVED) {\n            background = &style->pressed;\n            text.text = style->text_pressed;\n        } else if (state & NK_WIDGET_STATE_HOVER) {\n            background = &style->hover;\n            text.text = style->text_hover;\n        } else {\n            background = &style->normal;\n            text.text = style->text_normal;\n        }\n    } else {\n        if (state & NK_WIDGET_STATE_ACTIVED) {\n            background = &style->pressed_active;\n            text.text = style->text_pressed_active;\n        } else if (state & NK_WIDGET_STATE_HOVER) {\n            background = &style->hover_active;\n            text.text = style->text_hover_active;\n        } else {\n            background = &style->normal_active;\n            text.text = style->text_normal_active;\n        }\n    }\n    /* draw selectable background and text */\n    if (background->type == NK_STYLE_ITEM_IMAGE) {\n        nk_draw_image(out, *bounds, &background->data.image, nk_white);\n        text.background = nk_rgba(0,0,0,0);\n    } else {\n        nk_fill_rect(out, *bounds, style->rounding, background->data.color);\n        text.background = background->data.color;\n    }\n    if (icon) {\n        if (img) nk_draw_image(out, *icon, img, nk_white);\n        else nk_draw_symbol(out, sym, *icon, text.background, text.text, 1, font);\n    }\n    nk_widget_text(out, *bounds, string, len, &text, align, font);\n}\nNK_LIB int\nnk_do_selectable(nk_flags *state, struct nk_command_buffer *out,\n    struct nk_rect bounds, const char *str, int len, nk_flags align, int *value,\n    const struct nk_style_selectable *style, const struct nk_input *in,\n    const struct nk_user_font *font)\n{\n    int old_value;\n    struct nk_rect touch;\n\n    NK_ASSERT(state);\n    NK_ASSERT(out);\n    NK_ASSERT(str);\n    NK_ASSERT(len);\n    NK_ASSERT(value);\n    NK_ASSERT(style);\n    NK_ASSERT(font);\n\n    if (!state || !out || !str || !len || !value || !style || !font) return 0;\n    old_value = *value;\n\n    /* remove padding */\n    touch.x = bounds.x - style->touch_padding.x;\n    touch.y = bounds.y - style->touch_padding.y;\n    touch.w = bounds.w + style->touch_padding.x * 2;\n    touch.h = bounds.h + style->touch_padding.y * 2;\n\n    /* update button */\n    if (nk_button_behavior(state, touch, in, NK_BUTTON_DEFAULT))\n        *value = !(*value);\n\n    /* draw selectable */\n    if (style->draw_begin) style->draw_begin(out, style->userdata);\n    nk_draw_selectable(out, *state, style, *value, &bounds, 0,0,NK_SYMBOL_NONE, str, len, align, font);\n    if (style->draw_end) style->draw_end(out, style->userdata);\n    return old_value != *value;\n}\nNK_LIB int\nnk_do_selectable_image(nk_flags *state, struct nk_command_buffer *out,\n    struct nk_rect bounds, const char *str, int len, nk_flags align, int *value,\n    const struct nk_image *img, const struct nk_style_selectable *style,\n    const struct nk_input *in, const struct nk_user_font *font)\n{\n    int old_value;\n    struct nk_rect touch;\n    struct nk_rect icon;\n\n    NK_ASSERT(state);\n    NK_ASSERT(out);\n    NK_ASSERT(str);\n    NK_ASSERT(len);\n    NK_ASSERT(value);\n    NK_ASSERT(style);\n    NK_ASSERT(font);\n\n    if (!state || !out || !str || !len || !value || !style || !font) return 0;\n    old_value = *value;\n\n    /* toggle behavior */\n    touch.x = bounds.x - style->touch_padding.x;\n    touch.y = bounds.y - style->touch_padding.y;\n    touch.w = bounds.w + style->touch_padding.x * 2;\n    touch.h = bounds.h + style->touch_padding.y * 2;\n    if (nk_button_behavior(state, touch, in, NK_BUTTON_DEFAULT))\n        *value = !(*value);\n\n    icon.y = bounds.y + style->padding.y;\n    icon.w = icon.h = bounds.h - 2 * style->padding.y;\n    if (align & NK_TEXT_ALIGN_LEFT) {\n        icon.x = (bounds.x + bounds.w) - (2 * style->padding.x + icon.w);\n        icon.x = NK_MAX(icon.x, 0);\n    } else icon.x = bounds.x + 2 * style->padding.x;\n\n    icon.x += style->image_padding.x;\n    icon.y += style->image_padding.y;\n    icon.w -= 2 * style->image_padding.x;\n    icon.h -= 2 * style->image_padding.y;\n\n    /* draw selectable */\n    if (style->draw_begin) style->draw_begin(out, style->userdata);\n    nk_draw_selectable(out, *state, style, *value, &bounds, &icon, img, NK_SYMBOL_NONE, str, len, align, font);\n    if (style->draw_end) style->draw_end(out, style->userdata);\n    return old_value != *value;\n}\nNK_LIB int\nnk_do_selectable_symbol(nk_flags *state, struct nk_command_buffer *out,\n    struct nk_rect bounds, const char *str, int len, nk_flags align, int *value,\n    enum nk_symbol_type sym, const struct nk_style_selectable *style,\n    const struct nk_input *in, const struct nk_user_font *font)\n{\n    int old_value;\n    struct nk_rect touch;\n    struct nk_rect icon;\n\n    NK_ASSERT(state);\n    NK_ASSERT(out);\n    NK_ASSERT(str);\n    NK_ASSERT(len);\n    NK_ASSERT(value);\n    NK_ASSERT(style);\n    NK_ASSERT(font);\n\n    if (!state || !out || !str || !len || !value || !style || !font) return 0;\n    old_value = *value;\n\n    /* toggle behavior */\n    touch.x = bounds.x - style->touch_padding.x;\n    touch.y = bounds.y - style->touch_padding.y;\n    touch.w = bounds.w + style->touch_padding.x * 2;\n    touch.h = bounds.h + style->touch_padding.y * 2;\n    if (nk_button_behavior(state, touch, in, NK_BUTTON_DEFAULT))\n        *value = !(*value);\n\n    icon.y = bounds.y + style->padding.y;\n    icon.w = icon.h = bounds.h - 2 * style->padding.y;\n    if (align & NK_TEXT_ALIGN_LEFT) {\n        icon.x = (bounds.x + bounds.w) - (2 * style->padding.x + icon.w);\n        icon.x = NK_MAX(icon.x, 0);\n    } else icon.x = bounds.x + 2 * style->padding.x;\n\n    icon.x += style->image_padding.x;\n    icon.y += style->image_padding.y;\n    icon.w -= 2 * style->image_padding.x;\n    icon.h -= 2 * style->image_padding.y;\n\n    /* draw selectable */\n    if (style->draw_begin) style->draw_begin(out, style->userdata);\n    nk_draw_selectable(out, *state, style, *value, &bounds, &icon, 0, sym, str, len, align, font);\n    if (style->draw_end) style->draw_end(out, style->userdata);\n    return old_value != *value;\n}\n\nNK_API int\nnk_selectable_text(struct nk_context *ctx, const char *str, int len,\n    nk_flags align, int *value)\n{\n    struct nk_window *win;\n    struct nk_panel *layout;\n    const struct nk_input *in;\n    const struct nk_style *style;\n\n    enum nk_widget_layout_states state;\n    struct nk_rect bounds;\n\n    NK_ASSERT(ctx);\n    NK_ASSERT(value);\n    NK_ASSERT(ctx->current);\n    NK_ASSERT(ctx->current->layout);\n    if (!ctx || !ctx->current || !ctx->current->layout || !value)\n        return 0;\n\n    win = ctx->current;\n    layout = win->layout;\n    style = &ctx->style;\n\n    state = nk_widget(&bounds, ctx);\n    if (!state) return 0;\n    in = (state == NK_WIDGET_ROM || layout->flags & NK_WINDOW_ROM) ? 0 : &ctx->input;\n    return nk_do_selectable(&ctx->last_widget_state, &win->buffer, bounds,\n                str, len, align, value, &style->selectable, in, style->font);\n}\nNK_API int\nnk_selectable_image_text(struct nk_context *ctx, struct nk_image img,\n    const char *str, int len, nk_flags align, int *value)\n{\n    struct nk_window *win;\n    struct nk_panel *layout;\n    const struct nk_input *in;\n    const struct nk_style *style;\n\n    enum nk_widget_layout_states state;\n    struct nk_rect bounds;\n\n    NK_ASSERT(ctx);\n    NK_ASSERT(value);\n    NK_ASSERT(ctx->current);\n    NK_ASSERT(ctx->current->layout);\n    if (!ctx || !ctx->current || !ctx->current->layout || !value)\n        return 0;\n\n    win = ctx->current;\n    layout = win->layout;\n    style = &ctx->style;\n\n    state = nk_widget(&bounds, ctx);\n    if (!state) return 0;\n    in = (state == NK_WIDGET_ROM || layout->flags & NK_WINDOW_ROM) ? 0 : &ctx->input;\n    return nk_do_selectable_image(&ctx->last_widget_state, &win->buffer, bounds,\n                str, len, align, value, &img, &style->selectable, in, style->font);\n}\nNK_API int\nnk_selectable_symbol_text(struct nk_context *ctx, enum nk_symbol_type sym,\n    const char *str, int len, nk_flags align, int *value)\n{\n    struct nk_window *win;\n    struct nk_panel *layout;\n    const struct nk_input *in;\n    const struct nk_style *style;\n\n    enum nk_widget_layout_states state;\n    struct nk_rect bounds;\n\n    NK_ASSERT(ctx);\n    NK_ASSERT(value);\n    NK_ASSERT(ctx->current);\n    NK_ASSERT(ctx->current->layout);\n    if (!ctx || !ctx->current || !ctx->current->layout || !value)\n        return 0;\n\n    win = ctx->current;\n    layout = win->layout;\n    style = &ctx->style;\n\n    state = nk_widget(&bounds, ctx);\n    if (!state) return 0;\n    in = (state == NK_WIDGET_ROM || layout->flags & NK_WINDOW_ROM) ? 0 : &ctx->input;\n    return nk_do_selectable_symbol(&ctx->last_widget_state, &win->buffer, bounds,\n                str, len, align, value, sym, &style->selectable, in, style->font);\n}\nNK_API int\nnk_selectable_symbol_label(struct nk_context *ctx, enum nk_symbol_type sym,\n    const char *title, nk_flags align, int *value)\n{\n    return nk_selectable_symbol_text(ctx, sym, title, nk_strlen(title), align, value);\n}\nNK_API int nk_select_text(struct nk_context *ctx, const char *str, int len,\n    nk_flags align, int value)\n{\n    nk_selectable_text(ctx, str, len, align, &value);return value;\n}\nNK_API int nk_selectable_label(struct nk_context *ctx, const char *str, nk_flags align, int *value)\n{\n    return nk_selectable_text(ctx, str, nk_strlen(str), align, value);\n}\nNK_API int nk_selectable_image_label(struct nk_context *ctx,struct nk_image img,\n    const char *str, nk_flags align, int *value)\n{\n    return nk_selectable_image_text(ctx, img, str, nk_strlen(str), align, value);\n}\nNK_API int nk_select_label(struct nk_context *ctx, const char *str, nk_flags align, int value)\n{\n    nk_selectable_text(ctx, str, nk_strlen(str), align, &value);return value;\n}\nNK_API int nk_select_image_label(struct nk_context *ctx, struct nk_image img,\n    const char *str, nk_flags align, int value)\n{\n    nk_selectable_image_text(ctx, img, str, nk_strlen(str), align, &value);return value;\n}\nNK_API int nk_select_image_text(struct nk_context *ctx, struct nk_image img,\n    const char *str, int len, nk_flags align, int value)\n{\n    nk_selectable_image_text(ctx, img, str, len, align, &value);return value;\n}\nNK_API int\nnk_select_symbol_text(struct nk_context *ctx, enum nk_symbol_type sym,\n    const char *title, int title_len, nk_flags align, int value)\n{\n    nk_selectable_symbol_text(ctx, sym, title, title_len, align, &value);return value;\n}\nNK_API int\nnk_select_symbol_label(struct nk_context *ctx, enum nk_symbol_type sym,\n    const char *title, nk_flags align, int value)\n{\n    return nk_select_symbol_text(ctx, sym, title, nk_strlen(title), align, value);\n}\n\n\n\n\n\n/* ===============================================================\n *\n *                              SLIDER\n *\n * ===============================================================*/\nNK_LIB float\nnk_slider_behavior(nk_flags *state, struct nk_rect *logical_cursor,\n    struct nk_rect *visual_cursor, struct nk_input *in,\n    struct nk_rect bounds, float slider_min, float slider_max, float slider_value,\n    float slider_step, float slider_steps)\n{\n    int left_mouse_down;\n    int left_mouse_click_in_cursor;\n\n    /* check if visual cursor is being dragged */\n    nk_widget_state_reset(state);\n    left_mouse_down = in && in->mouse.buttons[NK_BUTTON_LEFT].down;\n    left_mouse_click_in_cursor = in && nk_input_has_mouse_click_down_in_rect(in,\n            NK_BUTTON_LEFT, *visual_cursor, nk_true);\n\n    if (left_mouse_down && left_mouse_click_in_cursor) {\n        float ratio = 0;\n        const float d = in->mouse.pos.x - (visual_cursor->x+visual_cursor->w*0.5f);\n        const float pxstep = bounds.w / slider_steps;\n\n        /* only update value if the next slider step is reached */\n        *state = NK_WIDGET_STATE_ACTIVE;\n        if (NK_ABS(d) >= pxstep) {\n            const float steps = (float)((int)(NK_ABS(d) / pxstep));\n            slider_value += (d > 0) ? (slider_step*steps) : -(slider_step*steps);\n            slider_value = NK_CLAMP(slider_min, slider_value, slider_max);\n            ratio = (slider_value - slider_min)/slider_step;\n            logical_cursor->x = bounds.x + (logical_cursor->w * ratio);\n            in->mouse.buttons[NK_BUTTON_LEFT].clicked_pos.x = logical_cursor->x;\n        }\n    }\n\n    /* slider widget state */\n    if (nk_input_is_mouse_hovering_rect(in, bounds))\n        *state = NK_WIDGET_STATE_HOVERED;\n    if (*state & NK_WIDGET_STATE_HOVER &&\n        !nk_input_is_mouse_prev_hovering_rect(in, bounds))\n        *state |= NK_WIDGET_STATE_ENTERED;\n    else if (nk_input_is_mouse_prev_hovering_rect(in, bounds))\n        *state |= NK_WIDGET_STATE_LEFT;\n    return slider_value;\n}\nNK_LIB void\nnk_draw_slider(struct nk_command_buffer *out, nk_flags state,\n    const struct nk_style_slider *style, const struct nk_rect *bounds,\n    const struct nk_rect *visual_cursor, float min, float value, float max)\n{\n    struct nk_rect fill;\n    struct nk_rect bar;\n    const struct nk_style_item *background;\n\n    /* select correct slider images/colors */\n    struct nk_color bar_color;\n    const struct nk_style_item *cursor;\n\n    NK_UNUSED(min);\n    NK_UNUSED(max);\n    NK_UNUSED(value);\n\n    if (state & NK_WIDGET_STATE_ACTIVED) {\n        background = &style->active;\n        bar_color = style->bar_active;\n        cursor = &style->cursor_active;\n    } else if (state & NK_WIDGET_STATE_HOVER) {\n        background = &style->hover;\n        bar_color = style->bar_hover;\n        cursor = &style->cursor_hover;\n    } else {\n        background = &style->normal;\n        bar_color = style->bar_normal;\n        cursor = &style->cursor_normal;\n    }\n    /* calculate slider background bar */\n    bar.x = bounds->x;\n    bar.y = (visual_cursor->y + visual_cursor->h/2) - bounds->h/12;\n    bar.w = bounds->w;\n    bar.h = bounds->h/6;\n\n    /* filled background bar style */\n    fill.w = (visual_cursor->x + (visual_cursor->w/2.0f)) - bar.x;\n    fill.x = bar.x;\n    fill.y = bar.y;\n    fill.h = bar.h;\n\n    /* draw background */\n    if (background->type == NK_STYLE_ITEM_IMAGE) {\n        nk_draw_image(out, *bounds, &background->data.image, nk_white);\n    } else {\n        nk_fill_rect(out, *bounds, style->rounding, background->data.color);\n        nk_stroke_rect(out, *bounds, style->rounding, style->border, style->border_color);\n    }\n\n    /* draw slider bar */\n    nk_fill_rect(out, bar, style->rounding, bar_color);\n    nk_fill_rect(out, fill, style->rounding, style->bar_filled);\n\n    /* draw cursor */\n    if (cursor->type == NK_STYLE_ITEM_IMAGE)\n        nk_draw_image(out, *visual_cursor, &cursor->data.image, nk_white);\n    else nk_fill_circle(out, *visual_cursor, cursor->data.color);\n}\nNK_LIB float\nnk_do_slider(nk_flags *state,\n    struct nk_command_buffer *out, struct nk_rect bounds,\n    float min, float val, float max, float step,\n    const struct nk_style_slider *style, struct nk_input *in,\n    const struct nk_user_font *font)\n{\n    float slider_range;\n    float slider_min;\n    float slider_max;\n    float slider_value;\n    float slider_steps;\n    float cursor_offset;\n\n    struct nk_rect visual_cursor;\n    struct nk_rect logical_cursor;\n\n    NK_ASSERT(style);\n    NK_ASSERT(out);\n    if (!out || !style)\n        return 0;\n\n    /* remove padding from slider bounds */\n    bounds.x = bounds.x + style->padding.x;\n    bounds.y = bounds.y + style->padding.y;\n    bounds.h = NK_MAX(bounds.h, 2*style->padding.y);\n    bounds.w = NK_MAX(bounds.w, 2*style->padding.x + style->cursor_size.x);\n    bounds.w -= 2 * style->padding.x;\n    bounds.h -= 2 * style->padding.y;\n\n    /* optional buttons */\n    if (style->show_buttons) {\n        nk_flags ws;\n        struct nk_rect button;\n        button.y = bounds.y;\n        button.w = bounds.h;\n        button.h = bounds.h;\n\n        /* decrement button */\n        button.x = bounds.x;\n        if (nk_do_button_symbol(&ws, out, button, style->dec_symbol, NK_BUTTON_DEFAULT,\n            &style->dec_button, in, font))\n            val -= step;\n\n        /* increment button */\n        button.x = (bounds.x + bounds.w) - button.w;\n        if (nk_do_button_symbol(&ws, out, button, style->inc_symbol, NK_BUTTON_DEFAULT,\n            &style->inc_button, in, font))\n            val += step;\n\n        bounds.x = bounds.x + button.w + style->spacing.x;\n        bounds.w = bounds.w - (2*button.w + 2*style->spacing.x);\n    }\n\n    /* remove one cursor size to support visual cursor */\n    bounds.x += style->cursor_size.x*0.5f;\n    bounds.w -= style->cursor_size.x;\n\n    /* make sure the provided values are correct */\n    slider_max = NK_MAX(min, max);\n    slider_min = NK_MIN(min, max);\n    slider_value = NK_CLAMP(slider_min, val, slider_max);\n    slider_range = slider_max - slider_min;\n    slider_steps = slider_range / step;\n    cursor_offset = (slider_value - slider_min) / step;\n\n    /* calculate cursor\n    Basically you have two cursors. One for visual representation and interaction\n    and one for updating the actual cursor value. */\n    logical_cursor.h = bounds.h;\n    logical_cursor.w = bounds.w / slider_steps;\n    logical_cursor.x = bounds.x + (logical_cursor.w * cursor_offset);\n    logical_cursor.y = bounds.y;\n\n    visual_cursor.h = style->cursor_size.y;\n    visual_cursor.w = style->cursor_size.x;\n    visual_cursor.y = (bounds.y + bounds.h*0.5f) - visual_cursor.h*0.5f;\n    visual_cursor.x = logical_cursor.x - visual_cursor.w*0.5f;\n\n    slider_value = nk_slider_behavior(state, &logical_cursor, &visual_cursor,\n        in, bounds, slider_min, slider_max, slider_value, step, slider_steps);\n    visual_cursor.x = logical_cursor.x - visual_cursor.w*0.5f;\n\n    /* draw slider */\n    if (style->draw_begin) style->draw_begin(out, style->userdata);\n    nk_draw_slider(out, *state, style, &bounds, &visual_cursor, slider_min, slider_value, slider_max);\n    if (style->draw_end) style->draw_end(out, style->userdata);\n    return slider_value;\n}\nNK_API int\nnk_slider_float(struct nk_context *ctx, float min_value, float *value, float max_value,\n    float value_step)\n{\n    struct nk_window *win;\n    struct nk_panel *layout;\n    struct nk_input *in;\n    const struct nk_style *style;\n\n    int ret = 0;\n    float old_value;\n    struct nk_rect bounds;\n    enum nk_widget_layout_states state;\n\n    NK_ASSERT(ctx);\n    NK_ASSERT(ctx->current);\n    NK_ASSERT(ctx->current->layout);\n    NK_ASSERT(value);\n    if (!ctx || !ctx->current || !ctx->current->layout || !value)\n        return ret;\n\n    win = ctx->current;\n    style = &ctx->style;\n    layout = win->layout;\n\n    state = nk_widget(&bounds, ctx);\n    if (!state) return ret;\n    in = (/*state == NK_WIDGET_ROM || */ layout->flags & NK_WINDOW_ROM) ? 0 : &ctx->input;\n\n    old_value = *value;\n    *value = nk_do_slider(&ctx->last_widget_state, &win->buffer, bounds, min_value,\n                old_value, max_value, value_step, &style->slider, in, style->font);\n    return (old_value > *value || old_value < *value);\n}\nNK_API float\nnk_slide_float(struct nk_context *ctx, float min, float val, float max, float step)\n{\n    nk_slider_float(ctx, min, &val, max, step); return val;\n}\nNK_API int\nnk_slide_int(struct nk_context *ctx, int min, int val, int max, int step)\n{\n    float value = (float)val;\n    nk_slider_float(ctx, (float)min, &value, (float)max, (float)step);\n    return (int)value;\n}\nNK_API int\nnk_slider_int(struct nk_context *ctx, int min, int *val, int max, int step)\n{\n    int ret;\n    float value = (float)*val;\n    ret = nk_slider_float(ctx, (float)min, &value, (float)max, (float)step);\n    *val =  (int)value;\n    return ret;\n}\n\n\n\n\n\n/* ===============================================================\n *\n *                          PROGRESS\n *\n * ===============================================================*/\nNK_LIB nk_size\nnk_progress_behavior(nk_flags *state, struct nk_input *in,\n    struct nk_rect r, struct nk_rect cursor, nk_size max, nk_size value, int modifiable)\n{\n    int left_mouse_down = 0;\n    int left_mouse_click_in_cursor = 0;\n\n    nk_widget_state_reset(state);\n    if (!in || !modifiable) return value;\n    left_mouse_down = in && in->mouse.buttons[NK_BUTTON_LEFT].down;\n    left_mouse_click_in_cursor = in && nk_input_has_mouse_click_down_in_rect(in,\n            NK_BUTTON_LEFT, cursor, nk_true);\n    if (nk_input_is_mouse_hovering_rect(in, r))\n        *state = NK_WIDGET_STATE_HOVERED;\n\n    if (in && left_mouse_down && left_mouse_click_in_cursor) {\n        if (left_mouse_down && left_mouse_click_in_cursor) {\n            float ratio = NK_MAX(0, (float)(in->mouse.pos.x - cursor.x)) / (float)cursor.w;\n            value = (nk_size)NK_CLAMP(0, (float)max * ratio, (float)max);\n            in->mouse.buttons[NK_BUTTON_LEFT].clicked_pos.x = cursor.x + cursor.w/2.0f;\n            *state |= NK_WIDGET_STATE_ACTIVE;\n        }\n    }\n    /* set progressbar widget state */\n    if (*state & NK_WIDGET_STATE_HOVER && !nk_input_is_mouse_prev_hovering_rect(in, r))\n        *state |= NK_WIDGET_STATE_ENTERED;\n    else if (nk_input_is_mouse_prev_hovering_rect(in, r))\n        *state |= NK_WIDGET_STATE_LEFT;\n    return value;\n}\nNK_LIB void\nnk_draw_progress(struct nk_command_buffer *out, nk_flags state,\n    const struct nk_style_progress *style, const struct nk_rect *bounds,\n    const struct nk_rect *scursor, nk_size value, nk_size max)\n{\n    const struct nk_style_item *background;\n    const struct nk_style_item *cursor;\n\n    NK_UNUSED(max);\n    NK_UNUSED(value);\n\n    /* select correct colors/images to draw */\n    if (state & NK_WIDGET_STATE_ACTIVED) {\n        background = &style->active;\n        cursor = &style->cursor_active;\n    } else if (state & NK_WIDGET_STATE_HOVER){\n        background = &style->hover;\n        cursor = &style->cursor_hover;\n    } else {\n        background = &style->normal;\n        cursor = &style->cursor_normal;\n    }\n\n    /* draw background */\n    if (background->type == NK_STYLE_ITEM_COLOR) {\n        nk_fill_rect(out, *bounds, style->rounding, background->data.color);\n        nk_stroke_rect(out, *bounds, style->rounding, style->border, style->border_color);\n    } else nk_draw_image(out, *bounds, &background->data.image, nk_white);\n\n    /* draw cursor */\n    if (cursor->type == NK_STYLE_ITEM_COLOR) {\n        nk_fill_rect(out, *scursor, style->rounding, cursor->data.color);\n        nk_stroke_rect(out, *scursor, style->rounding, style->border, style->border_color);\n    } else nk_draw_image(out, *scursor, &cursor->data.image, nk_white);\n}\nNK_LIB nk_size\nnk_do_progress(nk_flags *state,\n    struct nk_command_buffer *out, struct nk_rect bounds,\n    nk_size value, nk_size max, int modifiable,\n    const struct nk_style_progress *style, struct nk_input *in)\n{\n    float prog_scale;\n    nk_size prog_value;\n    struct nk_rect cursor;\n\n    NK_ASSERT(style);\n    NK_ASSERT(out);\n    if (!out || !style) return 0;\n\n    /* calculate progressbar cursor */\n    cursor.w = NK_MAX(bounds.w, 2 * style->padding.x + 2 * style->border);\n    cursor.h = NK_MAX(bounds.h, 2 * style->padding.y + 2 * style->border);\n    cursor = nk_pad_rect(bounds, nk_vec2(style->padding.x + style->border, style->padding.y + style->border));\n    prog_scale = (float)value / (float)max;\n\n    /* update progressbar */\n    prog_value = NK_MIN(value, max);\n    prog_value = nk_progress_behavior(state, in, bounds, cursor,max, prog_value, modifiable);\n    cursor.w = cursor.w * prog_scale;\n\n    /* draw progressbar */\n    if (style->draw_begin) style->draw_begin(out, style->userdata);\n    nk_draw_progress(out, *state, style, &bounds, &cursor, value, max);\n    if (style->draw_end) style->draw_end(out, style->userdata);\n    return prog_value;\n}\nNK_API int\nnk_progress(struct nk_context *ctx, nk_size *cur, nk_size max, int is_modifyable)\n{\n    struct nk_window *win;\n    struct nk_panel *layout;\n    const struct nk_style *style;\n    struct nk_input *in;\n\n    struct nk_rect bounds;\n    enum nk_widget_layout_states state;\n    nk_size old_value;\n\n    NK_ASSERT(ctx);\n    NK_ASSERT(cur);\n    NK_ASSERT(ctx->current);\n    NK_ASSERT(ctx->current->layout);\n    if (!ctx || !ctx->current || !ctx->current->layout || !cur)\n        return 0;\n\n    win = ctx->current;\n    style = &ctx->style;\n    layout = win->layout;\n    state = nk_widget(&bounds, ctx);\n    if (!state) return 0;\n\n    in = (state == NK_WIDGET_ROM || layout->flags & NK_WINDOW_ROM) ? 0 : &ctx->input;\n    old_value = *cur;\n    *cur = nk_do_progress(&ctx->last_widget_state, &win->buffer, bounds,\n            *cur, max, is_modifyable, &style->progress, in);\n    return (*cur != old_value);\n}\nNK_API nk_size\nnk_prog(struct nk_context *ctx, nk_size cur, nk_size max, int modifyable)\n{\n    nk_progress(ctx, &cur, max, modifyable);\n    return cur;\n}\n\n\n\n\n\n/* ===============================================================\n *\n *                              SCROLLBAR\n *\n * ===============================================================*/\nNK_LIB float\nnk_scrollbar_behavior(nk_flags *state, struct nk_input *in,\n    int has_scrolling, const struct nk_rect *scroll,\n    const struct nk_rect *cursor, const struct nk_rect *empty0,\n    const struct nk_rect *empty1, float scroll_offset,\n    float target, float scroll_step, enum nk_orientation o)\n{\n    nk_flags ws = 0;\n    int left_mouse_down;\n    int left_mouse_click_in_cursor;\n    float scroll_delta;\n\n    nk_widget_state_reset(state);\n    if (!in) return scroll_offset;\n\n    left_mouse_down = in->mouse.buttons[NK_BUTTON_LEFT].down;\n    left_mouse_click_in_cursor = nk_input_has_mouse_click_down_in_rect(in,\n        NK_BUTTON_LEFT, *cursor, nk_true);\n    if (nk_input_is_mouse_hovering_rect(in, *scroll))\n        *state = NK_WIDGET_STATE_HOVERED;\n\n    scroll_delta = (o == NK_VERTICAL) ? in->mouse.scroll_delta.y: in->mouse.scroll_delta.x;\n    if (left_mouse_down && left_mouse_click_in_cursor) {\n        /* update cursor by mouse dragging */\n        float pixel, delta;\n        *state = NK_WIDGET_STATE_ACTIVE;\n        if (o == NK_VERTICAL) {\n            float cursor_y;\n            pixel = in->mouse.delta.y;\n            delta = (pixel / scroll->h) * target;\n            scroll_offset = NK_CLAMP(0, scroll_offset + delta, target - scroll->h);\n            cursor_y = scroll->y + ((scroll_offset/target) * scroll->h);\n            in->mouse.buttons[NK_BUTTON_LEFT].clicked_pos.y = cursor_y + cursor->h/2.0f;\n        } else {\n            float cursor_x;\n            pixel = in->mouse.delta.x;\n            delta = (pixel / scroll->w) * target;\n            scroll_offset = NK_CLAMP(0, scroll_offset + delta, target - scroll->w);\n            cursor_x = scroll->x + ((scroll_offset/target) * scroll->w);\n            in->mouse.buttons[NK_BUTTON_LEFT].clicked_pos.x = cursor_x + cursor->w/2.0f;\n        }\n    } else if ((nk_input_is_key_pressed(in, NK_KEY_SCROLL_UP) && o == NK_VERTICAL && has_scrolling)||\n            nk_button_behavior(&ws, *empty0, in, NK_BUTTON_DEFAULT)) {\n        /* scroll page up by click on empty space or shortcut */\n        if (o == NK_VERTICAL)\n            scroll_offset = NK_MAX(0, scroll_offset - scroll->h);\n        else scroll_offset = NK_MAX(0, scroll_offset - scroll->w);\n    } else if ((nk_input_is_key_pressed(in, NK_KEY_SCROLL_DOWN) && o == NK_VERTICAL && has_scrolling) ||\n        nk_button_behavior(&ws, *empty1, in, NK_BUTTON_DEFAULT)) {\n        /* scroll page down by click on empty space or shortcut */\n        if (o == NK_VERTICAL)\n            scroll_offset = NK_MIN(scroll_offset + scroll->h, target - scroll->h);\n        else scroll_offset = NK_MIN(scroll_offset + scroll->w, target - scroll->w);\n    } else if (has_scrolling) {\n        if ((scroll_delta < 0 || (scroll_delta > 0))) {\n            /* update cursor by mouse scrolling */\n            scroll_offset = scroll_offset + scroll_step * (-scroll_delta);\n            if (o == NK_VERTICAL)\n                scroll_offset = NK_CLAMP(0, scroll_offset, target - scroll->h);\n            else scroll_offset = NK_CLAMP(0, scroll_offset, target - scroll->w);\n        } else if (nk_input_is_key_pressed(in, NK_KEY_SCROLL_START)) {\n            /* update cursor to the beginning  */\n            if (o == NK_VERTICAL) scroll_offset = 0;\n        } else if (nk_input_is_key_pressed(in, NK_KEY_SCROLL_END)) {\n            /* update cursor to the end */\n            if (o == NK_VERTICAL) scroll_offset = target - scroll->h;\n        }\n    }\n    if (*state & NK_WIDGET_STATE_HOVER && !nk_input_is_mouse_prev_hovering_rect(in, *scroll))\n        *state |= NK_WIDGET_STATE_ENTERED;\n    else if (nk_input_is_mouse_prev_hovering_rect(in, *scroll))\n        *state |= NK_WIDGET_STATE_LEFT;\n    return scroll_offset;\n}\nNK_LIB void\nnk_draw_scrollbar(struct nk_command_buffer *out, nk_flags state,\n    const struct nk_style_scrollbar *style, const struct nk_rect *bounds,\n    const struct nk_rect *scroll)\n{\n    const struct nk_style_item *background;\n    const struct nk_style_item *cursor;\n\n    /* select correct colors/images to draw */\n    if (state & NK_WIDGET_STATE_ACTIVED) {\n        background = &style->active;\n        cursor = &style->cursor_active;\n    } else if (state & NK_WIDGET_STATE_HOVER) {\n        background = &style->hover;\n        cursor = &style->cursor_hover;\n    } else {\n        background = &style->normal;\n        cursor = &style->cursor_normal;\n    }\n\n    /* draw background */\n    if (background->type == NK_STYLE_ITEM_COLOR) {\n        nk_fill_rect(out, *bounds, style->rounding, background->data.color);\n        nk_stroke_rect(out, *bounds, style->rounding, style->border, style->border_color);\n    } else {\n        nk_draw_image(out, *bounds, &background->data.image, nk_white);\n    }\n\n    /* draw cursor */\n    if (cursor->type == NK_STYLE_ITEM_COLOR) {\n        nk_fill_rect(out, *scroll, style->rounding_cursor, cursor->data.color);\n        nk_stroke_rect(out, *scroll, style->rounding_cursor, style->border_cursor, style->cursor_border_color);\n    } else nk_draw_image(out, *scroll, &cursor->data.image, nk_white);\n}\nNK_LIB float\nnk_do_scrollbarv(nk_flags *state,\n    struct nk_command_buffer *out, struct nk_rect scroll, int has_scrolling,\n    float offset, float target, float step, float button_pixel_inc,\n    const struct nk_style_scrollbar *style, struct nk_input *in,\n    const struct nk_user_font *font)\n{\n    struct nk_rect empty_north;\n    struct nk_rect empty_south;\n    struct nk_rect cursor;\n\n    float scroll_step;\n    float scroll_offset;\n    float scroll_off;\n    float scroll_ratio;\n\n    NK_ASSERT(out);\n    NK_ASSERT(style);\n    NK_ASSERT(state);\n    if (!out || !style) return 0;\n\n    scroll.w = NK_MAX(scroll.w, 1);\n    scroll.h = NK_MAX(scroll.h, 0);\n    if (target <= scroll.h) return 0;\n\n    /* optional scrollbar buttons */\n    if (style->show_buttons) {\n        nk_flags ws;\n        float scroll_h;\n        struct nk_rect button;\n\n        button.x = scroll.x;\n        button.w = scroll.w;\n        button.h = scroll.w;\n\n        scroll_h = NK_MAX(scroll.h - 2 * button.h,0);\n        scroll_step = NK_MIN(step, button_pixel_inc);\n\n        /* decrement button */\n        button.y = scroll.y;\n        if (nk_do_button_symbol(&ws, out, button, style->dec_symbol,\n            NK_BUTTON_REPEATER, &style->dec_button, in, font))\n            offset = offset - scroll_step;\n\n        /* increment button */\n        button.y = scroll.y + scroll.h - button.h;\n        if (nk_do_button_symbol(&ws, out, button, style->inc_symbol,\n            NK_BUTTON_REPEATER, &style->inc_button, in, font))\n            offset = offset + scroll_step;\n\n        scroll.y = scroll.y + button.h;\n        scroll.h = scroll_h;\n    }\n\n    /* calculate scrollbar constants */\n    scroll_step = NK_MIN(step, scroll.h);\n    scroll_offset = NK_CLAMP(0, offset, target - scroll.h);\n    scroll_ratio = scroll.h / target;\n    scroll_off = scroll_offset / target;\n\n    /* calculate scrollbar cursor bounds */\n    cursor.h = NK_MAX((scroll_ratio * scroll.h) - (2*style->border + 2*style->padding.y), 0);\n    cursor.y = scroll.y + (scroll_off * scroll.h) + style->border + style->padding.y;\n    cursor.w = scroll.w - (2 * style->border + 2 * style->padding.x);\n    cursor.x = scroll.x + style->border + style->padding.x;\n\n    /* calculate empty space around cursor */\n    empty_north.x = scroll.x;\n    empty_north.y = scroll.y;\n    empty_north.w = scroll.w;\n    empty_north.h = NK_MAX(cursor.y - scroll.y, 0);\n\n    empty_south.x = scroll.x;\n    empty_south.y = cursor.y + cursor.h;\n    empty_south.w = scroll.w;\n    empty_south.h = NK_MAX((scroll.y + scroll.h) - (cursor.y + cursor.h), 0);\n\n    /* update scrollbar */\n    scroll_offset = nk_scrollbar_behavior(state, in, has_scrolling, &scroll, &cursor,\n        &empty_north, &empty_south, scroll_offset, target, scroll_step, NK_VERTICAL);\n    scroll_off = scroll_offset / target;\n    cursor.y = scroll.y + (scroll_off * scroll.h) + style->border_cursor + style->padding.y;\n\n    /* draw scrollbar */\n    if (style->draw_begin) style->draw_begin(out, style->userdata);\n    nk_draw_scrollbar(out, *state, style, &scroll, &cursor);\n    if (style->draw_end) style->draw_end(out, style->userdata);\n    return scroll_offset;\n}\nNK_LIB float\nnk_do_scrollbarh(nk_flags *state,\n    struct nk_command_buffer *out, struct nk_rect scroll, int has_scrolling,\n    float offset, float target, float step, float button_pixel_inc,\n    const struct nk_style_scrollbar *style, struct nk_input *in,\n    const struct nk_user_font *font)\n{\n    struct nk_rect cursor;\n    struct nk_rect empty_west;\n    struct nk_rect empty_east;\n\n    float scroll_step;\n    float scroll_offset;\n    float scroll_off;\n    float scroll_ratio;\n\n    NK_ASSERT(out);\n    NK_ASSERT(style);\n    if (!out || !style) return 0;\n\n    /* scrollbar background */\n    scroll.h = NK_MAX(scroll.h, 1);\n    scroll.w = NK_MAX(scroll.w, 2 * scroll.h);\n    if (target <= scroll.w) return 0;\n\n    /* optional scrollbar buttons */\n    if (style->show_buttons) {\n        nk_flags ws;\n        float scroll_w;\n        struct nk_rect button;\n        button.y = scroll.y;\n        button.w = scroll.h;\n        button.h = scroll.h;\n\n        scroll_w = scroll.w - 2 * button.w;\n        scroll_step = NK_MIN(step, button_pixel_inc);\n\n        /* decrement button */\n        button.x = scroll.x;\n        if (nk_do_button_symbol(&ws, out, button, style->dec_symbol,\n            NK_BUTTON_REPEATER, &style->dec_button, in, font))\n            offset = offset - scroll_step;\n\n        /* increment button */\n        button.x = scroll.x + scroll.w - button.w;\n        if (nk_do_button_symbol(&ws, out, button, style->inc_symbol,\n            NK_BUTTON_REPEATER, &style->inc_button, in, font))\n            offset = offset + scroll_step;\n\n        scroll.x = scroll.x + button.w;\n        scroll.w = scroll_w;\n    }\n\n    /* calculate scrollbar constants */\n    scroll_step = NK_MIN(step, scroll.w);\n    scroll_offset = NK_CLAMP(0, offset, target - scroll.w);\n    scroll_ratio = scroll.w / target;\n    scroll_off = scroll_offset / target;\n\n    /* calculate cursor bounds */\n    cursor.w = (scroll_ratio * scroll.w) - (2*style->border + 2*style->padding.x);\n    cursor.x = scroll.x + (scroll_off * scroll.w) + style->border + style->padding.x;\n    cursor.h = scroll.h - (2 * style->border + 2 * style->padding.y);\n    cursor.y = scroll.y + style->border + style->padding.y;\n\n    /* calculate empty space around cursor */\n    empty_west.x = scroll.x;\n    empty_west.y = scroll.y;\n    empty_west.w = cursor.x - scroll.x;\n    empty_west.h = scroll.h;\n\n    empty_east.x = cursor.x + cursor.w;\n    empty_east.y = scroll.y;\n    empty_east.w = (scroll.x + scroll.w) - (cursor.x + cursor.w);\n    empty_east.h = scroll.h;\n\n    /* update scrollbar */\n    scroll_offset = nk_scrollbar_behavior(state, in, has_scrolling, &scroll, &cursor,\n        &empty_west, &empty_east, scroll_offset, target, scroll_step, NK_HORIZONTAL);\n    scroll_off = scroll_offset / target;\n    cursor.x = scroll.x + (scroll_off * scroll.w);\n\n    /* draw scrollbar */\n    if (style->draw_begin) style->draw_begin(out, style->userdata);\n    nk_draw_scrollbar(out, *state, style, &scroll, &cursor);\n    if (style->draw_end) style->draw_end(out, style->userdata);\n    return scroll_offset;\n}\n\n\n\n\n\n/* ===============================================================\n *\n *                          TEXT EDITOR\n *\n * ===============================================================*/\n/* stb_textedit.h - v1.8  - public domain - Sean Barrett */\nstruct nk_text_find {\n   float x,y;    /* position of n'th character */\n   float height; /* height of line */\n   int first_char, length; /* first char of row, and length */\n   int prev_first;  /*_ first char of previous row */\n};\n\nstruct nk_text_edit_row {\n   float x0,x1;\n   /* starting x location, end x location (allows for align=right, etc) */\n   float baseline_y_delta;\n   /* position of baseline relative to previous row's baseline*/\n   float ymin,ymax;\n   /* height of row above and below baseline */\n   int num_chars;\n};\n\n/* forward declarations */\nNK_INTERN void nk_textedit_makeundo_delete(struct nk_text_edit*, int, int);\nNK_INTERN void nk_textedit_makeundo_insert(struct nk_text_edit*, int, int);\nNK_INTERN void nk_textedit_makeundo_replace(struct nk_text_edit*, int, int, int);\n#define NK_TEXT_HAS_SELECTION(s)   ((s)->select_start != (s)->select_end)\n\nNK_INTERN float\nnk_textedit_get_width(const struct nk_text_edit *edit, int line_start, int char_id,\n    const struct nk_user_font *font)\n{\n    int len = 0;\n    nk_rune unicode = 0;\n    const char *str = nk_str_at_const(&edit->string, line_start + char_id, &unicode, &len);\n    return font->width(font->userdata, font->height, str, len);\n}\nNK_INTERN void\nnk_textedit_layout_row(struct nk_text_edit_row *r, struct nk_text_edit *edit,\n    int line_start_id, float row_height, const struct nk_user_font *font)\n{\n    int l;\n    int glyphs = 0;\n    nk_rune unicode;\n    const char *remaining;\n    int len = nk_str_len_char(&edit->string);\n    const char *end = nk_str_get_const(&edit->string) + len;\n    const char *text = nk_str_at_const(&edit->string, line_start_id, &unicode, &l);\n    const struct nk_vec2 size = nk_text_calculate_text_bounds(font,\n        text, (int)(end - text), row_height, &remaining, 0, &glyphs, NK_STOP_ON_NEW_LINE);\n\n    r->x0 = 0.0f;\n    r->x1 = size.x;\n    r->baseline_y_delta = size.y;\n    r->ymin = 0.0f;\n    r->ymax = size.y;\n    r->num_chars = glyphs;\n}\nNK_INTERN int\nnk_textedit_locate_coord(struct nk_text_edit *edit, float x, float y,\n    const struct nk_user_font *font, float row_height)\n{\n    struct nk_text_edit_row r;\n    int n = edit->string.len;\n    float base_y = 0, prev_x;\n    int i=0, k;\n\n    r.x0 = r.x1 = 0;\n    r.ymin = r.ymax = 0;\n    r.num_chars = 0;\n\n    /* search rows to find one that straddles 'y' */\n    while (i < n) {\n        nk_textedit_layout_row(&r, edit, i, row_height, font);\n        if (r.num_chars <= 0)\n            return n;\n\n        if (i==0 && y < base_y + r.ymin)\n            return 0;\n\n        if (y < base_y + r.ymax)\n            break;\n\n        i += r.num_chars;\n        base_y += r.baseline_y_delta;\n    }\n\n    /* below all text, return 'after' last character */\n    if (i >= n)\n        return n;\n\n    /* check if it's before the beginning of the line */\n    if (x < r.x0)\n        return i;\n\n    /* check if it's before the end of the line */\n    if (x < r.x1) {\n        /* search characters in row for one that straddles 'x' */\n        k = i;\n        prev_x = r.x0;\n        for (i=0; i < r.num_chars; ++i) {\n            float w = nk_textedit_get_width(edit, k, i, font);\n            if (x < prev_x+w) {\n                if (x < prev_x+w/2)\n                    return k+i;\n                else return k+i+1;\n            }\n            prev_x += w;\n        }\n        /* shouldn't happen, but if it does, fall through to end-of-line case */\n    }\n\n    /* if the last character is a newline, return that.\n     * otherwise return 'after' the last character */\n    if (nk_str_rune_at(&edit->string, i+r.num_chars-1) == '\\n')\n        return i+r.num_chars-1;\n    else return i+r.num_chars;\n}\nNK_LIB void\nnk_textedit_click(struct nk_text_edit *state, float x, float y,\n    const struct nk_user_font *font, float row_height)\n{\n    /* API click: on mouse down, move the cursor to the clicked location,\n     * and reset the selection */\n    state->cursor = nk_textedit_locate_coord(state, x, y, font, row_height);\n    state->select_start = state->cursor;\n    state->select_end = state->cursor;\n    state->has_preferred_x = 0;\n}\nNK_LIB void\nnk_textedit_drag(struct nk_text_edit *state, float x, float y,\n    const struct nk_user_font *font, float row_height)\n{\n    /* API drag: on mouse drag, move the cursor and selection endpoint\n     * to the clicked location */\n    int p = nk_textedit_locate_coord(state, x, y, font, row_height);\n    if (state->select_start == state->select_end)\n        state->select_start = state->cursor;\n    state->cursor = state->select_end = p;\n}\nNK_INTERN void\nnk_textedit_find_charpos(struct nk_text_find *find, struct nk_text_edit *state,\n    int n, int single_line, const struct nk_user_font *font, float row_height)\n{\n    /* find the x/y location of a character, and remember info about the previous\n     * row in case we get a move-up event (for page up, we'll have to rescan) */\n    struct nk_text_edit_row r;\n    int prev_start = 0;\n    int z = state->string.len;\n    int i=0, first;\n\n    nk_zero_struct(r);\n    if (n == z) {\n        /* if it's at the end, then find the last line -- simpler than trying to\n        explicitly handle this case in the regular code */\n        nk_textedit_layout_row(&r, state, 0, row_height, font);\n        if (single_line) {\n            find->first_char = 0;\n            find->length = z;\n        } else {\n            while (i < z) {\n                prev_start = i;\n                i += r.num_chars;\n                nk_textedit_layout_row(&r, state, i, row_height, font);\n            }\n\n            find->first_char = i;\n            find->length = r.num_chars;\n        }\n        find->x = r.x1;\n        find->y = r.ymin;\n        find->height = r.ymax - r.ymin;\n        find->prev_first = prev_start;\n        return;\n    }\n\n    /* search rows to find the one that straddles character n */\n    find->y = 0;\n\n    for(;;) {\n        nk_textedit_layout_row(&r, state, i, row_height, font);\n        if (n < i + r.num_chars) break;\n        prev_start = i;\n        i += r.num_chars;\n        find->y += r.baseline_y_delta;\n    }\n\n    find->first_char = first = i;\n    find->length = r.num_chars;\n    find->height = r.ymax - r.ymin;\n    find->prev_first = prev_start;\n\n    /* now scan to find xpos */\n    find->x = r.x0;\n    for (i=0; first+i < n; ++i)\n        find->x += nk_textedit_get_width(state, first, i, font);\n}\nNK_INTERN void\nnk_textedit_clamp(struct nk_text_edit *state)\n{\n    /* make the selection/cursor state valid if client altered the string */\n    int n = state->string.len;\n    if (NK_TEXT_HAS_SELECTION(state)) {\n        if (state->select_start > n) state->select_start = n;\n        if (state->select_end   > n) state->select_end = n;\n        /* if clamping forced them to be equal, move the cursor to match */\n        if (state->select_start == state->select_end)\n            state->cursor = state->select_start;\n    }\n    if (state->cursor > n) state->cursor = n;\n}\nNK_API void\nnk_textedit_delete(struct nk_text_edit *state, int where, int len)\n{\n    /* delete characters while updating undo */\n    nk_textedit_makeundo_delete(state, where, len);\n    nk_str_delete_runes(&state->string, where, len);\n    state->has_preferred_x = 0;\n}\nNK_API void\nnk_textedit_delete_selection(struct nk_text_edit *state)\n{\n    /* delete the section */\n    nk_textedit_clamp(state);\n    if (NK_TEXT_HAS_SELECTION(state)) {\n        if (state->select_start < state->select_end) {\n            nk_textedit_delete(state, state->select_start,\n                state->select_end - state->select_start);\n            state->select_end = state->cursor = state->select_start;\n        } else {\n            nk_textedit_delete(state, state->select_end,\n                state->select_start - state->select_end);\n            state->select_start = state->cursor = state->select_end;\n        }\n        state->has_preferred_x = 0;\n    }\n}\nNK_INTERN void\nnk_textedit_sortselection(struct nk_text_edit *state)\n{\n    /* canonicalize the selection so start <= end */\n    if (state->select_end < state->select_start) {\n        int temp = state->select_end;\n        state->select_end = state->select_start;\n        state->select_start = temp;\n    }\n}\nNK_INTERN void\nnk_textedit_move_to_first(struct nk_text_edit *state)\n{\n    /* move cursor to first character of selection */\n    if (NK_TEXT_HAS_SELECTION(state)) {\n        nk_textedit_sortselection(state);\n        state->cursor = state->select_start;\n        state->select_end = state->select_start;\n        state->has_preferred_x = 0;\n    }\n}\nNK_INTERN void\nnk_textedit_move_to_last(struct nk_text_edit *state)\n{\n    /* move cursor to last character of selection */\n    if (NK_TEXT_HAS_SELECTION(state)) {\n        nk_textedit_sortselection(state);\n        nk_textedit_clamp(state);\n        state->cursor = state->select_end;\n        state->select_start = state->select_end;\n        state->has_preferred_x = 0;\n    }\n}\nNK_INTERN int\nnk_is_word_boundary( struct nk_text_edit *state, int idx)\n{\n    int len;\n    nk_rune c;\n    if (idx <= 0) return 1;\n    if (!nk_str_at_rune(&state->string, idx, &c, &len)) return 1;\n    return (c == ' ' || c == '\\t' ||c == 0x3000 || c == ',' || c == ';' ||\n            c == '(' || c == ')' || c == '{' || c == '}' || c == '[' || c == ']' ||\n            c == '|');\n}\nNK_INTERN int\nnk_textedit_move_to_word_previous(struct nk_text_edit *state)\n{\n   int c = state->cursor - 1;\n   while( c >= 0 && !nk_is_word_boundary(state, c))\n      --c;\n\n   if( c < 0 )\n      c = 0;\n\n   return c;\n}\nNK_INTERN int\nnk_textedit_move_to_word_next(struct nk_text_edit *state)\n{\n   const int len = state->string.len;\n   int c = state->cursor+1;\n   while( c < len && !nk_is_word_boundary(state, c))\n      ++c;\n\n   if( c > len )\n      c = len;\n\n   return c;\n}\nNK_INTERN void\nnk_textedit_prep_selection_at_cursor(struct nk_text_edit *state)\n{\n    /* update selection and cursor to match each other */\n    if (!NK_TEXT_HAS_SELECTION(state))\n        state->select_start = state->select_end = state->cursor;\n    else state->cursor = state->select_end;\n}\nNK_API int\nnk_textedit_cut(struct nk_text_edit *state)\n{\n    /* API cut: delete selection */\n    if (state->mode == NK_TEXT_EDIT_MODE_VIEW)\n        return 0;\n    if (NK_TEXT_HAS_SELECTION(state)) {\n        nk_textedit_delete_selection(state); /* implicitly clamps */\n        state->has_preferred_x = 0;\n        return 1;\n    }\n   return 0;\n}\nNK_API int\nnk_textedit_paste(struct nk_text_edit *state, char const *ctext, int len)\n{\n    /* API paste: replace existing selection with passed-in text */\n    int glyphs;\n    const char *text = (const char *) ctext;\n    if (state->mode == NK_TEXT_EDIT_MODE_VIEW) return 0;\n\n    /* if there's a selection, the paste should delete it */\n    nk_textedit_clamp(state);\n    nk_textedit_delete_selection(state);\n\n    /* try to insert the characters */\n    glyphs = nk_utf_len(ctext, len);\n    if (nk_str_insert_text_char(&state->string, state->cursor, text, len)) {\n        nk_textedit_makeundo_insert(state, state->cursor, glyphs);\n        state->cursor += len;\n        state->has_preferred_x = 0;\n        return 1;\n    }\n    /* remove the undo since we didn't actually insert the characters */\n    if (state->undo.undo_point)\n        --state->undo.undo_point;\n    return 0;\n}\nNK_API void\nnk_textedit_text(struct nk_text_edit *state, const char *text, int total_len)\n{\n    nk_rune unicode;\n    int glyph_len;\n    int text_len = 0;\n\n    NK_ASSERT(state);\n    NK_ASSERT(text);\n    if (!text || !total_len || state->mode == NK_TEXT_EDIT_MODE_VIEW) return;\n\n    glyph_len = nk_utf_decode(text, &unicode, total_len);\n    while ((text_len < total_len) && glyph_len)\n    {\n        /* don't insert a backward delete, just process the event */\n        if (unicode == 127) goto next;\n        /* can't add newline in single-line mode */\n        if (unicode == '\\n' && state->single_line) goto next;\n        /* filter incoming text */\n        if (state->filter && !state->filter(state, unicode)) goto next;\n\n        if (!NK_TEXT_HAS_SELECTION(state) &&\n            state->cursor < state->string.len)\n        {\n            if (state->mode == NK_TEXT_EDIT_MODE_REPLACE) {\n                nk_textedit_makeundo_replace(state, state->cursor, 1, 1);\n                nk_str_delete_runes(&state->string, state->cursor, 1);\n            }\n            if (nk_str_insert_text_utf8(&state->string, state->cursor,\n                                        text+text_len, 1))\n            {\n                ++state->cursor;\n                state->has_preferred_x = 0;\n            }\n        } else {\n            nk_textedit_delete_selection(state); /* implicitly clamps */\n            if (nk_str_insert_text_utf8(&state->string, state->cursor,\n                                        text+text_len, 1))\n            {\n                nk_textedit_makeundo_insert(state, state->cursor, 1);\n                ++state->cursor;\n                state->has_preferred_x = 0;\n            }\n        }\n        next:\n        text_len += glyph_len;\n        glyph_len = nk_utf_decode(text + text_len, &unicode, total_len-text_len);\n    }\n}\nNK_LIB void\nnk_textedit_key(struct nk_text_edit *state, enum nk_keys key, int shift_mod,\n    const struct nk_user_font *font, float row_height)\n{\nretry:\n    switch (key)\n    {\n    case NK_KEY_NONE:\n    case NK_KEY_CTRL:\n    case NK_KEY_ENTER:\n    case NK_KEY_SHIFT:\n    case NK_KEY_TAB:\n    case NK_KEY_COPY:\n    case NK_KEY_CUT:\n    case NK_KEY_PASTE:\n    case NK_KEY_MAX:\n    default: break;\n    case NK_KEY_TEXT_UNDO:\n         nk_textedit_undo(state);\n         state->has_preferred_x = 0;\n         break;\n\n    case NK_KEY_TEXT_REDO:\n        nk_textedit_redo(state);\n        state->has_preferred_x = 0;\n        break;\n\n    case NK_KEY_TEXT_SELECT_ALL:\n        nk_textedit_select_all(state);\n        state->has_preferred_x = 0;\n        break;\n\n    case NK_KEY_TEXT_INSERT_MODE:\n        if (state->mode == NK_TEXT_EDIT_MODE_VIEW)\n            state->mode = NK_TEXT_EDIT_MODE_INSERT;\n        break;\n    case NK_KEY_TEXT_REPLACE_MODE:\n        if (state->mode == NK_TEXT_EDIT_MODE_VIEW)\n            state->mode = NK_TEXT_EDIT_MODE_REPLACE;\n        break;\n    case NK_KEY_TEXT_RESET_MODE:\n        if (state->mode == NK_TEXT_EDIT_MODE_INSERT ||\n            state->mode == NK_TEXT_EDIT_MODE_REPLACE)\n            state->mode = NK_TEXT_EDIT_MODE_VIEW;\n        break;\n\n    case NK_KEY_LEFT:\n        if (shift_mod) {\n            nk_textedit_clamp(state);\n            nk_textedit_prep_selection_at_cursor(state);\n            /* move selection left */\n            if (state->select_end > 0)\n                --state->select_end;\n            state->cursor = state->select_end;\n            state->has_preferred_x = 0;\n        } else {\n            /* if currently there's a selection,\n             * move cursor to start of selection */\n            if (NK_TEXT_HAS_SELECTION(state))\n                nk_textedit_move_to_first(state);\n            else if (state->cursor > 0)\n               --state->cursor;\n            state->has_preferred_x = 0;\n        } break;\n\n    case NK_KEY_RIGHT:\n        if (shift_mod) {\n            nk_textedit_prep_selection_at_cursor(state);\n            /* move selection right */\n            ++state->select_end;\n            nk_textedit_clamp(state);\n            state->cursor = state->select_end;\n            state->has_preferred_x = 0;\n        } else {\n            /* if currently there's a selection,\n             * move cursor to end of selection */\n            if (NK_TEXT_HAS_SELECTION(state))\n                nk_textedit_move_to_last(state);\n            else ++state->cursor;\n            nk_textedit_clamp(state);\n            state->has_preferred_x = 0;\n        } break;\n\n    case NK_KEY_TEXT_WORD_LEFT:\n        if (shift_mod) {\n            if( !NK_TEXT_HAS_SELECTION( state ) )\n            nk_textedit_prep_selection_at_cursor(state);\n            state->cursor = nk_textedit_move_to_word_previous(state);\n            state->select_end = state->cursor;\n            nk_textedit_clamp(state );\n        } else {\n            if (NK_TEXT_HAS_SELECTION(state))\n                nk_textedit_move_to_first(state);\n            else {\n                state->cursor = nk_textedit_move_to_word_previous(state);\n                nk_textedit_clamp(state );\n            }\n        } break;\n\n    case NK_KEY_TEXT_WORD_RIGHT:\n        if (shift_mod) {\n            if( !NK_TEXT_HAS_SELECTION( state ) )\n                nk_textedit_prep_selection_at_cursor(state);\n            state->cursor = nk_textedit_move_to_word_next(state);\n            state->select_end = state->cursor;\n            nk_textedit_clamp(state);\n        } else {\n            if (NK_TEXT_HAS_SELECTION(state))\n                nk_textedit_move_to_last(state);\n            else {\n                state->cursor = nk_textedit_move_to_word_next(state);\n                nk_textedit_clamp(state );\n            }\n        } break;\n\n    case NK_KEY_DOWN: {\n        struct nk_text_find find;\n        struct nk_text_edit_row row;\n        int i, sel = shift_mod;\n\n        if (state->single_line) {\n            /* on windows, up&down in single-line behave like left&right */\n            key = NK_KEY_RIGHT;\n            goto retry;\n        }\n\n        if (sel)\n            nk_textedit_prep_selection_at_cursor(state);\n        else if (NK_TEXT_HAS_SELECTION(state))\n            nk_textedit_move_to_last(state);\n\n        /* compute current position of cursor point */\n        nk_textedit_clamp(state);\n        nk_textedit_find_charpos(&find, state, state->cursor, state->single_line,\n            font, row_height);\n\n        /* now find character position down a row */\n        if (find.length)\n        {\n            float x;\n            float goal_x = state->has_preferred_x ? state->preferred_x : find.x;\n            int start = find.first_char + find.length;\n\n            state->cursor = start;\n            nk_textedit_layout_row(&row, state, state->cursor, row_height, font);\n            x = row.x0;\n\n            for (i=0; i < row.num_chars && x < row.x1; ++i) {\n                float dx = nk_textedit_get_width(state, start, i, font);\n                x += dx;\n                if (x > goal_x)\n                    break;\n                ++state->cursor;\n            }\n            nk_textedit_clamp(state);\n\n            state->has_preferred_x = 1;\n            state->preferred_x = goal_x;\n            if (sel)\n                state->select_end = state->cursor;\n        }\n    } break;\n\n    case NK_KEY_UP: {\n        struct nk_text_find find;\n        struct nk_text_edit_row row;\n        int i, sel = shift_mod;\n\n        if (state->single_line) {\n            /* on windows, up&down become left&right */\n            key = NK_KEY_LEFT;\n            goto retry;\n        }\n\n        if (sel)\n            nk_textedit_prep_selection_at_cursor(state);\n        else if (NK_TEXT_HAS_SELECTION(state))\n            nk_textedit_move_to_first(state);\n\n         /* compute current position of cursor point */\n         nk_textedit_clamp(state);\n         nk_textedit_find_charpos(&find, state, state->cursor, state->single_line,\n                font, row_height);\n\n         /* can only go up if there's a previous row */\n         if (find.prev_first != find.first_char) {\n            /* now find character position up a row */\n            float x;\n            float goal_x = state->has_preferred_x ? state->preferred_x : find.x;\n\n            state->cursor = find.prev_first;\n            nk_textedit_layout_row(&row, state, state->cursor, row_height, font);\n            x = row.x0;\n\n            for (i=0; i < row.num_chars && x < row.x1; ++i) {\n                float dx = nk_textedit_get_width(state, find.prev_first, i, font);\n                x += dx;\n                if (x > goal_x)\n                    break;\n                ++state->cursor;\n            }\n            nk_textedit_clamp(state);\n\n            state->has_preferred_x = 1;\n            state->preferred_x = goal_x;\n            if (sel) state->select_end = state->cursor;\n         }\n      } break;\n\n    case NK_KEY_DEL:\n        if (state->mode == NK_TEXT_EDIT_MODE_VIEW)\n            break;\n        if (NK_TEXT_HAS_SELECTION(state))\n            nk_textedit_delete_selection(state);\n        else {\n            int n = state->string.len;\n            if (state->cursor < n)\n                nk_textedit_delete(state, state->cursor, 1);\n         }\n         state->has_preferred_x = 0;\n         break;\n\n    case NK_KEY_BACKSPACE:\n        if (state->mode == NK_TEXT_EDIT_MODE_VIEW)\n            break;\n        if (NK_TEXT_HAS_SELECTION(state))\n            nk_textedit_delete_selection(state);\n        else {\n            nk_textedit_clamp(state);\n            if (state->cursor > 0) {\n                nk_textedit_delete(state, state->cursor-1, 1);\n                --state->cursor;\n            }\n         }\n         state->has_preferred_x = 0;\n         break;\n\n    case NK_KEY_TEXT_START:\n         if (shift_mod) {\n            nk_textedit_prep_selection_at_cursor(state);\n            state->cursor = state->select_end = 0;\n            state->has_preferred_x = 0;\n         } else {\n            state->cursor = state->select_start = state->select_end = 0;\n            state->has_preferred_x = 0;\n         }\n         break;\n\n    case NK_KEY_TEXT_END:\n         if (shift_mod) {\n            nk_textedit_prep_selection_at_cursor(state);\n            state->cursor = state->select_end = state->string.len;\n            state->has_preferred_x = 0;\n         } else {\n            state->cursor = state->string.len;\n            state->select_start = state->select_end = 0;\n            state->has_preferred_x = 0;\n         }\n         break;\n\n    case NK_KEY_TEXT_LINE_START: {\n        if (shift_mod) {\n            struct nk_text_find find;\n           nk_textedit_clamp(state);\n            nk_textedit_prep_selection_at_cursor(state);\n            if (state->string.len && state->cursor == state->string.len)\n                --state->cursor;\n            nk_textedit_find_charpos(&find, state,state->cursor, state->single_line,\n                font, row_height);\n            state->cursor = state->select_end = find.first_char;\n            state->has_preferred_x = 0;\n        } else {\n            struct nk_text_find find;\n            if (state->string.len && state->cursor == state->string.len)\n                --state->cursor;\n            nk_textedit_clamp(state);\n            nk_textedit_move_to_first(state);\n            nk_textedit_find_charpos(&find, state, state->cursor, state->single_line,\n                font, row_height);\n            state->cursor = find.first_char;\n            state->has_preferred_x = 0;\n        }\n      } break;\n\n    case NK_KEY_TEXT_LINE_END: {\n        if (shift_mod) {\n            struct nk_text_find find;\n            nk_textedit_clamp(state);\n            nk_textedit_prep_selection_at_cursor(state);\n            nk_textedit_find_charpos(&find, state, state->cursor, state->single_line,\n                font, row_height);\n            state->has_preferred_x = 0;\n            state->cursor = find.first_char + find.length;\n            if (find.length > 0 && nk_str_rune_at(&state->string, state->cursor-1) == '\\n')\n                --state->cursor;\n            state->select_end = state->cursor;\n        } else {\n            struct nk_text_find find;\n            nk_textedit_clamp(state);\n            nk_textedit_move_to_first(state);\n            nk_textedit_find_charpos(&find, state, state->cursor, state->single_line,\n                font, row_height);\n\n            state->has_preferred_x = 0;\n            state->cursor = find.first_char + find.length;\n            if (find.length > 0 && nk_str_rune_at(&state->string, state->cursor-1) == '\\n')\n                --state->cursor;\n        }} break;\n    }\n}\nNK_INTERN void\nnk_textedit_flush_redo(struct nk_text_undo_state *state)\n{\n    state->redo_point = NK_TEXTEDIT_UNDOSTATECOUNT;\n    state->redo_char_point = NK_TEXTEDIT_UNDOCHARCOUNT;\n}\nNK_INTERN void\nnk_textedit_discard_undo(struct nk_text_undo_state *state)\n{\n    /* discard the oldest entry in the undo list */\n    if (state->undo_point > 0) {\n        /* if the 0th undo state has characters, clean those up */\n        if (state->undo_rec[0].char_storage >= 0) {\n            int n = state->undo_rec[0].insert_length, i;\n            /* delete n characters from all other records */\n            state->undo_char_point = (short)(state->undo_char_point - n);\n            NK_MEMCPY(state->undo_char, state->undo_char + n,\n                (nk_size)state->undo_char_point*sizeof(nk_rune));\n            for (i=0; i < state->undo_point; ++i) {\n                if (state->undo_rec[i].char_storage >= 0)\n                state->undo_rec[i].char_storage = (short)\n                    (state->undo_rec[i].char_storage - n);\n            }\n        }\n        --state->undo_point;\n        NK_MEMCPY(state->undo_rec, state->undo_rec+1,\n            (nk_size)((nk_size)state->undo_point * sizeof(state->undo_rec[0])));\n    }\n}\nNK_INTERN void\nnk_textedit_discard_redo(struct nk_text_undo_state *state)\n{\n/*  discard the oldest entry in the redo list--it's bad if this\n    ever happens, but because undo & redo have to store the actual\n    characters in different cases, the redo character buffer can\n    fill up even though the undo buffer didn't */\n    nk_size num;\n    int k = NK_TEXTEDIT_UNDOSTATECOUNT-1;\n    if (state->redo_point <= k) {\n        /* if the k'th undo state has characters, clean those up */\n        if (state->undo_rec[k].char_storage >= 0) {\n            int n = state->undo_rec[k].insert_length, i;\n            /* delete n characters from all other records */\n            state->redo_char_point = (short)(state->redo_char_point + n);\n            num = (nk_size)(NK_TEXTEDIT_UNDOCHARCOUNT - state->redo_char_point);\n            NK_MEMCPY(state->undo_char + state->redo_char_point,\n                state->undo_char + state->redo_char_point-n, num * sizeof(char));\n            for (i = state->redo_point; i < k; ++i) {\n                if (state->undo_rec[i].char_storage >= 0) {\n                    state->undo_rec[i].char_storage = (short)\n                        (state->undo_rec[i].char_storage + n);\n                }\n            }\n        }\n        ++state->redo_point;\n        num = (nk_size)(NK_TEXTEDIT_UNDOSTATECOUNT - state->redo_point);\n        if (num) NK_MEMCPY(state->undo_rec + state->redo_point-1,\n            state->undo_rec + state->redo_point, num * sizeof(state->undo_rec[0]));\n    }\n}\nNK_INTERN struct nk_text_undo_record*\nnk_textedit_create_undo_record(struct nk_text_undo_state *state, int numchars)\n{\n    /* any time we create a new undo record, we discard redo*/\n    nk_textedit_flush_redo(state);\n\n    /* if we have no free records, we have to make room,\n     * by sliding the existing records down */\n    if (state->undo_point == NK_TEXTEDIT_UNDOSTATECOUNT)\n        nk_textedit_discard_undo(state);\n\n    /* if the characters to store won't possibly fit in the buffer,\n     * we can't undo */\n    if (numchars > NK_TEXTEDIT_UNDOCHARCOUNT) {\n        state->undo_point = 0;\n        state->undo_char_point = 0;\n        return 0;\n    }\n\n    /* if we don't have enough free characters in the buffer,\n     * we have to make room */\n    while (state->undo_char_point + numchars > NK_TEXTEDIT_UNDOCHARCOUNT)\n        nk_textedit_discard_undo(state);\n    return &state->undo_rec[state->undo_point++];\n}\nNK_INTERN nk_rune*\nnk_textedit_createundo(struct nk_text_undo_state *state, int pos,\n    int insert_len, int delete_len)\n{\n    struct nk_text_undo_record *r = nk_textedit_create_undo_record(state, insert_len);\n    if (r == 0)\n        return 0;\n\n    r->where = pos;\n    r->insert_length = (short) insert_len;\n    r->delete_length = (short) delete_len;\n\n    if (insert_len == 0) {\n        r->char_storage = -1;\n        return 0;\n    } else {\n        r->char_storage = state->undo_char_point;\n        state->undo_char_point = (short)(state->undo_char_point +  insert_len);\n        return &state->undo_char[r->char_storage];\n    }\n}\nNK_API void\nnk_textedit_undo(struct nk_text_edit *state)\n{\n    struct nk_text_undo_state *s = &state->undo;\n    struct nk_text_undo_record u, *r;\n    if (s->undo_point == 0)\n        return;\n\n    /* we need to do two things: apply the undo record, and create a redo record */\n    u = s->undo_rec[s->undo_point-1];\n    r = &s->undo_rec[s->redo_point-1];\n    r->char_storage = -1;\n\n    r->insert_length = u.delete_length;\n    r->delete_length = u.insert_length;\n    r->where = u.where;\n\n    if (u.delete_length)\n    {\n       /*   if the undo record says to delete characters, then the redo record will\n            need to re-insert the characters that get deleted, so we need to store\n            them.\n            there are three cases:\n                - there's enough room to store the characters\n                - characters stored for *redoing* don't leave room for redo\n                - characters stored for *undoing* don't leave room for redo\n            if the last is true, we have to bail */\n        if (s->undo_char_point + u.delete_length >= NK_TEXTEDIT_UNDOCHARCOUNT) {\n            /* the undo records take up too much character space; there's no space\n            * to store the redo characters */\n            r->insert_length = 0;\n        } else {\n            int i;\n            /* there's definitely room to store the characters eventually */\n            while (s->undo_char_point + u.delete_length > s->redo_char_point) {\n                /* there's currently not enough room, so discard a redo record */\n                nk_textedit_discard_redo(s);\n                /* should never happen: */\n                if (s->redo_point == NK_TEXTEDIT_UNDOSTATECOUNT)\n                    return;\n            }\n\n            r = &s->undo_rec[s->redo_point-1];\n            r->char_storage = (short)(s->redo_char_point - u.delete_length);\n            s->redo_char_point = (short)(s->redo_char_point -  u.delete_length);\n\n            /* now save the characters */\n            for (i=0; i < u.delete_length; ++i)\n                s->undo_char[r->char_storage + i] =\n                    nk_str_rune_at(&state->string, u.where + i);\n        }\n        /* now we can carry out the deletion */\n        nk_str_delete_runes(&state->string, u.where, u.delete_length);\n    }\n\n    /* check type of recorded action: */\n    if (u.insert_length) {\n        /* easy case: was a deletion, so we need to insert n characters */\n        nk_str_insert_text_runes(&state->string, u.where,\n            &s->undo_char[u.char_storage], u.insert_length);\n        s->undo_char_point = (short)(s->undo_char_point - u.insert_length);\n    }\n    state->cursor = (short)(u.where + u.insert_length);\n\n    s->undo_point--;\n    s->redo_point--;\n}\nNK_API void\nnk_textedit_redo(struct nk_text_edit *state)\n{\n    struct nk_text_undo_state *s = &state->undo;\n    struct nk_text_undo_record *u, r;\n    if (s->redo_point == NK_TEXTEDIT_UNDOSTATECOUNT)\n        return;\n\n    /* we need to do two things: apply the redo record, and create an undo record */\n    u = &s->undo_rec[s->undo_point];\n    r = s->undo_rec[s->redo_point];\n\n    /* we KNOW there must be room for the undo record, because the redo record\n    was derived from an undo record */\n    u->delete_length = r.insert_length;\n    u->insert_length = r.delete_length;\n    u->where = r.where;\n    u->char_storage = -1;\n\n    if (r.delete_length) {\n        /* the redo record requires us to delete characters, so the undo record\n        needs to store the characters */\n        if (s->undo_char_point + u->insert_length > s->redo_char_point) {\n            u->insert_length = 0;\n            u->delete_length = 0;\n        } else {\n            int i;\n            u->char_storage = s->undo_char_point;\n            s->undo_char_point = (short)(s->undo_char_point + u->insert_length);\n\n            /* now save the characters */\n            for (i=0; i < u->insert_length; ++i) {\n                s->undo_char[u->char_storage + i] =\n                    nk_str_rune_at(&state->string, u->where + i);\n            }\n        }\n        nk_str_delete_runes(&state->string, r.where, r.delete_length);\n    }\n\n    if (r.insert_length) {\n        /* easy case: need to insert n characters */\n        nk_str_insert_text_runes(&state->string, r.where,\n            &s->undo_char[r.char_storage], r.insert_length);\n    }\n    state->cursor = r.where + r.insert_length;\n\n    s->undo_point++;\n    s->redo_point++;\n}\nNK_INTERN void\nnk_textedit_makeundo_insert(struct nk_text_edit *state, int where, int length)\n{\n    nk_textedit_createundo(&state->undo, where, 0, length);\n}\nNK_INTERN void\nnk_textedit_makeundo_delete(struct nk_text_edit *state, int where, int length)\n{\n    int i;\n    nk_rune *p = nk_textedit_createundo(&state->undo, where, length, 0);\n    if (p) {\n        for (i=0; i < length; ++i)\n            p[i] = nk_str_rune_at(&state->string, where+i);\n    }\n}\nNK_INTERN void\nnk_textedit_makeundo_replace(struct nk_text_edit *state, int where,\n    int old_length, int new_length)\n{\n    int i;\n    nk_rune *p = nk_textedit_createundo(&state->undo, where, old_length, new_length);\n    if (p) {\n        for (i=0; i < old_length; ++i)\n            p[i] = nk_str_rune_at(&state->string, where+i);\n    }\n}\nNK_LIB void\nnk_textedit_clear_state(struct nk_text_edit *state, enum nk_text_edit_type type,\n    nk_plugin_filter filter)\n{\n    /* reset the state to default */\n   state->undo.undo_point = 0;\n   state->undo.undo_char_point = 0;\n   state->undo.redo_point = NK_TEXTEDIT_UNDOSTATECOUNT;\n   state->undo.redo_char_point = NK_TEXTEDIT_UNDOCHARCOUNT;\n   state->select_end = state->select_start = 0;\n   state->cursor = 0;\n   state->has_preferred_x = 0;\n   state->preferred_x = 0;\n   state->cursor_at_end_of_line = 0;\n   state->initialized = 1;\n   state->single_line = (unsigned char)(type == NK_TEXT_EDIT_SINGLE_LINE);\n   state->mode = NK_TEXT_EDIT_MODE_VIEW;\n   state->filter = filter;\n   state->scrollbar = nk_vec2(0,0);\n}\nNK_API void\nnk_textedit_init_fixed(struct nk_text_edit *state, void *memory, nk_size size)\n{\n    NK_ASSERT(state);\n    NK_ASSERT(memory);\n    if (!state || !memory || !size) return;\n    NK_MEMSET(state, 0, sizeof(struct nk_text_edit));\n    nk_textedit_clear_state(state, NK_TEXT_EDIT_SINGLE_LINE, 0);\n    nk_str_init_fixed(&state->string, memory, size);\n}\nNK_API void\nnk_textedit_init(struct nk_text_edit *state, struct nk_allocator *alloc, nk_size size)\n{\n    NK_ASSERT(state);\n    NK_ASSERT(alloc);\n    if (!state || !alloc) return;\n    NK_MEMSET(state, 0, sizeof(struct nk_text_edit));\n    nk_textedit_clear_state(state, NK_TEXT_EDIT_SINGLE_LINE, 0);\n    nk_str_init(&state->string, alloc, size);\n}\n#ifdef NK_INCLUDE_DEFAULT_ALLOCATOR\nNK_API void\nnk_textedit_init_default(struct nk_text_edit *state)\n{\n    NK_ASSERT(state);\n    if (!state) return;\n    NK_MEMSET(state, 0, sizeof(struct nk_text_edit));\n    nk_textedit_clear_state(state, NK_TEXT_EDIT_SINGLE_LINE, 0);\n    nk_str_init_default(&state->string);\n}\n#endif\nNK_API void\nnk_textedit_select_all(struct nk_text_edit *state)\n{\n    NK_ASSERT(state);\n    state->select_start = 0;\n    state->select_end = state->string.len;\n}\nNK_API void\nnk_textedit_free(struct nk_text_edit *state)\n{\n    NK_ASSERT(state);\n    if (!state) return;\n    nk_str_free(&state->string);\n}\n\n\n\n\n\n/* ===============================================================\n *\n *                          FILTER\n *\n * ===============================================================*/\nNK_API int\nnk_filter_default(const struct nk_text_edit *box, nk_rune unicode)\n{\n    NK_UNUSED(unicode);\n    NK_UNUSED(box);\n    return nk_true;\n}\nNK_API int\nnk_filter_ascii(const struct nk_text_edit *box, nk_rune unicode)\n{\n    NK_UNUSED(box);\n    if (unicode > 128) return nk_false;\n    else return nk_true;\n}\nNK_API int\nnk_filter_float(const struct nk_text_edit *box, nk_rune unicode)\n{\n    NK_UNUSED(box);\n    if ((unicode < '0' || unicode > '9') && unicode != '.' && unicode != '-')\n        return nk_false;\n    else return nk_true;\n}\nNK_API int\nnk_filter_decimal(const struct nk_text_edit *box, nk_rune unicode)\n{\n    NK_UNUSED(box);\n    if ((unicode < '0' || unicode > '9') && unicode != '-')\n        return nk_false;\n    else return nk_true;\n}\nNK_API int\nnk_filter_hex(const struct nk_text_edit *box, nk_rune unicode)\n{\n    NK_UNUSED(box);\n    if ((unicode < '0' || unicode > '9') &&\n        (unicode < 'a' || unicode > 'f') &&\n        (unicode < 'A' || unicode > 'F'))\n        return nk_false;\n    else return nk_true;\n}\nNK_API int\nnk_filter_oct(const struct nk_text_edit *box, nk_rune unicode)\n{\n    NK_UNUSED(box);\n    if (unicode < '0' || unicode > '7')\n        return nk_false;\n    else return nk_true;\n}\nNK_API int\nnk_filter_binary(const struct nk_text_edit *box, nk_rune unicode)\n{\n    NK_UNUSED(box);\n    if (unicode != '0' && unicode != '1')\n        return nk_false;\n    else return nk_true;\n}\n\n/* ===============================================================\n *\n *                          EDIT\n *\n * ===============================================================*/\nNK_LIB void\nnk_edit_draw_text(struct nk_command_buffer *out,\n    const struct nk_style_edit *style, float pos_x, float pos_y,\n    float x_offset, const char *text, int byte_len, float row_height,\n    const struct nk_user_font *font, struct nk_color background,\n    struct nk_color foreground, int is_selected)\n{\n    NK_ASSERT(out);\n    NK_ASSERT(font);\n    NK_ASSERT(style);\n    if (!text || !byte_len || !out || !style) return;\n\n    {int glyph_len = 0;\n    nk_rune unicode = 0;\n    int text_len = 0;\n    float line_width = 0;\n    float glyph_width;\n    const char *line = text;\n    float line_offset = 0;\n    int line_count = 0;\n\n    struct nk_text txt;\n    txt.padding = nk_vec2(0,0);\n    txt.background = background;\n    txt.text = foreground;\n\n    glyph_len = nk_utf_decode(text+text_len, &unicode, byte_len-text_len);\n    if (!glyph_len) return;\n    while ((text_len < byte_len) && glyph_len)\n    {\n        if (unicode == '\\n') {\n            /* new line separator so draw previous line */\n            struct nk_rect label;\n            label.y = pos_y + line_offset;\n            label.h = row_height;\n            label.w = line_width;\n            label.x = pos_x;\n            if (!line_count)\n                label.x += x_offset;\n\n            if (is_selected) /* selection needs to draw different background color */\n                nk_fill_rect(out, label, 0, background);\n            nk_widget_text(out, label, line, (int)((text + text_len) - line),\n                &txt, NK_TEXT_CENTERED, font);\n\n            text_len++;\n            line_count++;\n            line_width = 0;\n            line = text + text_len;\n            line_offset += row_height;\n            glyph_len = nk_utf_decode(text + text_len, &unicode, (int)(byte_len-text_len));\n            continue;\n        }\n        if (unicode == '\\r') {\n            text_len++;\n            glyph_len = nk_utf_decode(text + text_len, &unicode, byte_len-text_len);\n            continue;\n        }\n        glyph_width = font->width(font->userdata, font->height, text+text_len, glyph_len);\n        line_width += (float)glyph_width;\n        text_len += glyph_len;\n        glyph_len = nk_utf_decode(text + text_len, &unicode, byte_len-text_len);\n        continue;\n    }\n    if (line_width > 0) {\n        /* draw last line */\n        struct nk_rect label;\n        label.y = pos_y + line_offset;\n        label.h = row_height;\n        label.w = line_width;\n        label.x = pos_x;\n        if (!line_count)\n            label.x += x_offset;\n\n        if (is_selected)\n            nk_fill_rect(out, label, 0, background);\n        nk_widget_text(out, label, line, (int)((text + text_len) - line),\n            &txt, NK_TEXT_LEFT, font);\n    }}\n}\nNK_LIB nk_flags\nnk_do_edit(nk_flags *state, struct nk_command_buffer *out,\n    struct nk_rect bounds, nk_flags flags, nk_plugin_filter filter,\n    struct nk_text_edit *edit, const struct nk_style_edit *style,\n    struct nk_input *in, const struct nk_user_font *font)\n{\n    struct nk_rect area;\n    nk_flags ret = 0;\n    float row_height;\n    char prev_state = 0;\n    char is_hovered = 0;\n    char select_all = 0;\n    char cursor_follow = 0;\n    struct nk_rect old_clip;\n    struct nk_rect clip;\n\n    NK_ASSERT(state);\n    NK_ASSERT(out);\n    NK_ASSERT(style);\n    if (!state || !out || !style)\n        return ret;\n\n    /* visible text area calculation */\n    area.x = bounds.x + style->padding.x + style->border;\n    area.y = bounds.y + style->padding.y + style->border;\n    area.w = bounds.w - (2.0f * style->padding.x + 2 * style->border);\n    area.h = bounds.h - (2.0f * style->padding.y + 2 * style->border);\n    if (flags & NK_EDIT_MULTILINE)\n        area.w = NK_MAX(0, area.w - style->scrollbar_size.x);\n    row_height = (flags & NK_EDIT_MULTILINE)? font->height + style->row_padding: area.h;\n\n    /* calculate clipping rectangle */\n    old_clip = out->clip;\n    nk_unify(&clip, &old_clip, area.x, area.y, area.x + area.w, area.y + area.h);\n\n    /* update edit state */\n    prev_state = (char)edit->active;\n    is_hovered = (char)nk_input_is_mouse_hovering_rect(in, bounds);\n    if (in && in->mouse.buttons[NK_BUTTON_LEFT].clicked && in->mouse.buttons[NK_BUTTON_LEFT].down) {\n        edit->active = NK_INBOX(in->mouse.pos.x, in->mouse.pos.y,\n                                bounds.x, bounds.y, bounds.w, bounds.h);\n    }\n\n    /* (de)activate text editor */\n    if (!prev_state && edit->active) {\n        const enum nk_text_edit_type type = (flags & NK_EDIT_MULTILINE) ?\n            NK_TEXT_EDIT_MULTI_LINE: NK_TEXT_EDIT_SINGLE_LINE;\n        nk_textedit_clear_state(edit, type, filter);\n        if (flags & NK_EDIT_AUTO_SELECT)\n            select_all = nk_true;\n        if (flags & NK_EDIT_GOTO_END_ON_ACTIVATE) {\n            edit->cursor = edit->string.len;\n            in = 0;\n        }\n    } else if (!edit->active) edit->mode = NK_TEXT_EDIT_MODE_VIEW;\n    if (flags & NK_EDIT_READ_ONLY)\n        edit->mode = NK_TEXT_EDIT_MODE_VIEW;\n    else if (flags & NK_EDIT_ALWAYS_INSERT_MODE)\n        edit->mode = NK_TEXT_EDIT_MODE_INSERT;\n\n    ret = (edit->active) ? NK_EDIT_ACTIVE: NK_EDIT_INACTIVE;\n    if (prev_state != edit->active)\n        ret |= (edit->active) ? NK_EDIT_ACTIVATED: NK_EDIT_DEACTIVATED;\n\n    /* handle user input */\n    if (edit->active && in)\n    {\n        int shift_mod = in->keyboard.keys[NK_KEY_SHIFT].down;\n        const float mouse_x = (in->mouse.pos.x - area.x) + edit->scrollbar.x;\n        const float mouse_y = (in->mouse.pos.y - area.y) + edit->scrollbar.y;\n\n        /* mouse click handler */\n        is_hovered = (char)nk_input_is_mouse_hovering_rect(in, area);\n        if (select_all) {\n            nk_textedit_select_all(edit);\n        } else if (is_hovered && in->mouse.buttons[NK_BUTTON_LEFT].down &&\n            in->mouse.buttons[NK_BUTTON_LEFT].clicked) {\n            nk_textedit_click(edit, mouse_x, mouse_y, font, row_height);\n        } else if (is_hovered && in->mouse.buttons[NK_BUTTON_LEFT].down &&\n            (in->mouse.delta.x != 0.0f || in->mouse.delta.y != 0.0f)) {\n            nk_textedit_drag(edit, mouse_x, mouse_y, font, row_height);\n            cursor_follow = nk_true;\n        } else if (is_hovered && in->mouse.buttons[NK_BUTTON_RIGHT].clicked &&\n            in->mouse.buttons[NK_BUTTON_RIGHT].down) {\n            nk_textedit_key(edit, NK_KEY_TEXT_WORD_LEFT, nk_false, font, row_height);\n            nk_textedit_key(edit, NK_KEY_TEXT_WORD_RIGHT, nk_true, font, row_height);\n            cursor_follow = nk_true;\n        }\n\n        {int i; /* keyboard input */\n        int old_mode = edit->mode;\n        for (i = 0; i < NK_KEY_MAX; ++i) {\n            if (i == NK_KEY_ENTER || i == NK_KEY_TAB) continue; /* special case */\n            if (nk_input_is_key_pressed(in, (enum nk_keys)i)) {\n                nk_textedit_key(edit, (enum nk_keys)i, shift_mod, font, row_height);\n                cursor_follow = nk_true;\n            }\n        }\n        if (old_mode != edit->mode) {\n            in->keyboard.text_len = 0;\n        }}\n\n        /* text input */\n        edit->filter = filter;\n        if (in->keyboard.text_len) {\n            nk_textedit_text(edit, in->keyboard.text, in->keyboard.text_len);\n            cursor_follow = nk_true;\n            in->keyboard.text_len = 0;\n        }\n\n        /* enter key handler */\n        if (nk_input_is_key_pressed(in, NK_KEY_ENTER)) {\n            cursor_follow = nk_true;\n            if (flags & NK_EDIT_CTRL_ENTER_NEWLINE && shift_mod)\n                nk_textedit_text(edit, \"\\n\", 1);\n            else if (flags & NK_EDIT_SIG_ENTER)\n                ret |= NK_EDIT_COMMITED;\n            else nk_textedit_text(edit, \"\\n\", 1);\n        }\n\n        /* cut & copy handler */\n        {int copy= nk_input_is_key_pressed(in, NK_KEY_COPY);\n        int cut = nk_input_is_key_pressed(in, NK_KEY_CUT);\n        if ((copy || cut) && (flags & NK_EDIT_CLIPBOARD))\n        {\n            int glyph_len;\n            nk_rune unicode;\n            const char *text;\n            int b = edit->select_start;\n            int e = edit->select_end;\n\n            int begin = NK_MIN(b, e);\n            int end = NK_MAX(b, e);\n            text = nk_str_at_const(&edit->string, begin, &unicode, &glyph_len);\n            if (edit->clip.copy)\n                edit->clip.copy(edit->clip.userdata, text, end - begin);\n            if (cut && !(flags & NK_EDIT_READ_ONLY)){\n                nk_textedit_cut(edit);\n                cursor_follow = nk_true;\n            }\n        }}\n\n        /* paste handler */\n        {int paste = nk_input_is_key_pressed(in, NK_KEY_PASTE);\n        if (paste && (flags & NK_EDIT_CLIPBOARD) && edit->clip.paste) {\n            edit->clip.paste(edit->clip.userdata, edit);\n            cursor_follow = nk_true;\n        }}\n\n        /* tab handler */\n        {int tab = nk_input_is_key_pressed(in, NK_KEY_TAB);\n        if (tab && (flags & NK_EDIT_ALLOW_TAB)) {\n            nk_textedit_text(edit, \"    \", 4);\n            cursor_follow = nk_true;\n        }}\n    }\n\n    /* set widget state */\n    if (edit->active)\n        *state = NK_WIDGET_STATE_ACTIVE;\n    else nk_widget_state_reset(state);\n\n    if (is_hovered)\n        *state |= NK_WIDGET_STATE_HOVERED;\n\n    /* DRAW EDIT */\n    {const char *text = nk_str_get_const(&edit->string);\n    int len = nk_str_len_char(&edit->string);\n\n    {/* select background colors/images  */\n    const struct nk_style_item *background;\n    if (*state & NK_WIDGET_STATE_ACTIVED)\n        background = &style->active;\n    else if (*state & NK_WIDGET_STATE_HOVER)\n        background = &style->hover;\n    else background = &style->normal;\n\n    /* draw background frame */\n    if (background->type == NK_STYLE_ITEM_COLOR) {\n        nk_stroke_rect(out, bounds, style->rounding, style->border, style->border_color);\n        nk_fill_rect(out, bounds, style->rounding, background->data.color);\n    } else nk_draw_image(out, bounds, &background->data.image, nk_white);}\n\n    area.w = NK_MAX(0, area.w - style->cursor_size);\n    if (edit->active)\n    {\n        int total_lines = 1;\n        struct nk_vec2 text_size = nk_vec2(0,0);\n\n        /* text pointer positions */\n        const char *cursor_ptr = 0;\n        const char *select_begin_ptr = 0;\n        const char *select_end_ptr = 0;\n\n        /* 2D pixel positions */\n        struct nk_vec2 cursor_pos = nk_vec2(0,0);\n        struct nk_vec2 selection_offset_start = nk_vec2(0,0);\n        struct nk_vec2 selection_offset_end = nk_vec2(0,0);\n\n        int selection_begin = NK_MIN(edit->select_start, edit->select_end);\n        int selection_end = NK_MAX(edit->select_start, edit->select_end);\n\n        /* calculate total line count + total space + cursor/selection position */\n        float line_width = 0.0f;\n        if (text && len)\n        {\n            /* utf8 encoding */\n            float glyph_width;\n            int glyph_len = 0;\n            nk_rune unicode = 0;\n            int text_len = 0;\n            int glyphs = 0;\n            int row_begin = 0;\n\n            glyph_len = nk_utf_decode(text, &unicode, len);\n            glyph_width = font->width(font->userdata, font->height, text, glyph_len);\n            line_width = 0;\n\n            /* iterate all lines */\n            while ((text_len < len) && glyph_len)\n            {\n                /* set cursor 2D position and line */\n                if (!cursor_ptr && glyphs == edit->cursor)\n                {\n                    int glyph_offset;\n                    struct nk_vec2 out_offset;\n                    struct nk_vec2 row_size;\n                    const char *remaining;\n\n                    /* calculate 2d position */\n                    cursor_pos.y = (float)(total_lines-1) * row_height;\n                    row_size = nk_text_calculate_text_bounds(font, text+row_begin,\n                                text_len-row_begin, row_height, &remaining,\n                                &out_offset, &glyph_offset, NK_STOP_ON_NEW_LINE);\n                    cursor_pos.x = row_size.x;\n                    cursor_ptr = text + text_len;\n                }\n\n                /* set start selection 2D position and line */\n                if (!select_begin_ptr && edit->select_start != edit->select_end &&\n                    glyphs == selection_begin)\n                {\n                    int glyph_offset;\n                    struct nk_vec2 out_offset;\n                    struct nk_vec2 row_size;\n                    const char *remaining;\n\n                    /* calculate 2d position */\n                    selection_offset_start.y = (float)(NK_MAX(total_lines-1,0)) * row_height;\n                    row_size = nk_text_calculate_text_bounds(font, text+row_begin,\n                                text_len-row_begin, row_height, &remaining,\n                                &out_offset, &glyph_offset, NK_STOP_ON_NEW_LINE);\n                    selection_offset_start.x = row_size.x;\n                    select_begin_ptr = text + text_len;\n                }\n\n                /* set end selection 2D position and line */\n                if (!select_end_ptr && edit->select_start != edit->select_end &&\n                    glyphs == selection_end)\n                {\n                    int glyph_offset;\n                    struct nk_vec2 out_offset;\n                    struct nk_vec2 row_size;\n                    const char *remaining;\n\n                    /* calculate 2d position */\n                    selection_offset_end.y = (float)(total_lines-1) * row_height;\n                    row_size = nk_text_calculate_text_bounds(font, text+row_begin,\n                                text_len-row_begin, row_height, &remaining,\n                                &out_offset, &glyph_offset, NK_STOP_ON_NEW_LINE);\n                    selection_offset_end.x = row_size.x;\n                    select_end_ptr = text + text_len;\n                }\n                if (unicode == '\\n') {\n                    text_size.x = NK_MAX(text_size.x, line_width);\n                    total_lines++;\n                    line_width = 0;\n                    text_len++;\n                    glyphs++;\n                    row_begin = text_len;\n                    glyph_len = nk_utf_decode(text + text_len, &unicode, len-text_len);\n                    glyph_width = font->width(font->userdata, font->height, text+text_len, glyph_len);\n                    continue;\n                }\n\n                glyphs++;\n                text_len += glyph_len;\n                line_width += (float)glyph_width;\n\n                glyph_len = nk_utf_decode(text + text_len, &unicode, len-text_len);\n                glyph_width = font->width(font->userdata, font->height,\n                    text+text_len, glyph_len);\n                continue;\n            }\n            text_size.y = (float)total_lines * row_height;\n\n            /* handle case when cursor is at end of text buffer */\n            if (!cursor_ptr && edit->cursor == edit->string.len) {\n                cursor_pos.x = line_width;\n                cursor_pos.y = text_size.y - row_height;\n            }\n        }\n        {\n            /* scrollbar */\n            if (cursor_follow)\n            {\n                /* update scrollbar to follow cursor */\n                if (!(flags & NK_EDIT_NO_HORIZONTAL_SCROLL)) {\n                    /* horizontal scroll */\n                    const float scroll_increment = area.w * 0.25f;\n                    if (cursor_pos.x < edit->scrollbar.x)\n                        edit->scrollbar.x = (float)(int)NK_MAX(0.0f, cursor_pos.x - scroll_increment);\n                    if (cursor_pos.x >= edit->scrollbar.x + area.w)\n                        edit->scrollbar.x = (float)(int)NK_MAX(0.0f, edit->scrollbar.x + scroll_increment);\n                } else edit->scrollbar.x = 0;\n\n                if (flags & NK_EDIT_MULTILINE) {\n                    /* vertical scroll */\n                    if (cursor_pos.y < edit->scrollbar.y)\n                        edit->scrollbar.y = NK_MAX(0.0f, cursor_pos.y - row_height);\n                    if (cursor_pos.y >= edit->scrollbar.y + area.h)\n                        edit->scrollbar.y = edit->scrollbar.y + row_height;\n                } else edit->scrollbar.y = 0;\n            }\n\n            /* scrollbar widget */\n            if (flags & NK_EDIT_MULTILINE)\n            {\n                nk_flags ws;\n                struct nk_rect scroll;\n                float scroll_target;\n                float scroll_offset;\n                float scroll_step;\n                float scroll_inc;\n\n                scroll = area;\n                scroll.x = (bounds.x + bounds.w - style->border) - style->scrollbar_size.x;\n                scroll.w = style->scrollbar_size.x;\n\n                scroll_offset = edit->scrollbar.y;\n                scroll_step = scroll.h * 0.10f;\n                scroll_inc = scroll.h * 0.01f;\n                scroll_target = text_size.y;\n                edit->scrollbar.y = nk_do_scrollbarv(&ws, out, scroll, 0,\n                        scroll_offset, scroll_target, scroll_step, scroll_inc,\n                        &style->scrollbar, in, font);\n            }\n        }\n\n        /* draw text */\n        {struct nk_color background_color;\n        struct nk_color text_color;\n        struct nk_color sel_background_color;\n        struct nk_color sel_text_color;\n        struct nk_color cursor_color;\n        struct nk_color cursor_text_color;\n        const struct nk_style_item *background;\n        nk_push_scissor(out, clip);\n\n        /* select correct colors to draw */\n        if (*state & NK_WIDGET_STATE_ACTIVED) {\n            background = &style->active;\n            text_color = style->text_active;\n            sel_text_color = style->selected_text_hover;\n            sel_background_color = style->selected_hover;\n            cursor_color = style->cursor_hover;\n            cursor_text_color = style->cursor_text_hover;\n        } else if (*state & NK_WIDGET_STATE_HOVER) {\n            background = &style->hover;\n            text_color = style->text_hover;\n            sel_text_color = style->selected_text_hover;\n            sel_background_color = style->selected_hover;\n            cursor_text_color = style->cursor_text_hover;\n            cursor_color = style->cursor_hover;\n        } else {\n            background = &style->normal;\n            text_color = style->text_normal;\n            sel_text_color = style->selected_text_normal;\n            sel_background_color = style->selected_normal;\n            cursor_color = style->cursor_normal;\n            cursor_text_color = style->cursor_text_normal;\n        }\n        if (background->type == NK_STYLE_ITEM_IMAGE)\n            background_color = nk_rgba(0,0,0,0);\n        else background_color = background->data.color;\n\n\n        if (edit->select_start == edit->select_end) {\n            /* no selection so just draw the complete text */\n            const char *begin = nk_str_get_const(&edit->string);\n            int l = nk_str_len_char(&edit->string);\n            nk_edit_draw_text(out, style, area.x - edit->scrollbar.x,\n                area.y - edit->scrollbar.y, 0, begin, l, row_height, font,\n                background_color, text_color, nk_false);\n        } else {\n            /* edit has selection so draw 1-3 text chunks */\n            if (edit->select_start != edit->select_end && selection_begin > 0){\n                /* draw unselected text before selection */\n                const char *begin = nk_str_get_const(&edit->string);\n                NK_ASSERT(select_begin_ptr);\n                nk_edit_draw_text(out, style, area.x - edit->scrollbar.x,\n                    area.y - edit->scrollbar.y, 0, begin, (int)(select_begin_ptr - begin),\n                    row_height, font, background_color, text_color, nk_false);\n            }\n            if (edit->select_start != edit->select_end) {\n                /* draw selected text */\n                NK_ASSERT(select_begin_ptr);\n                if (!select_end_ptr) {\n                    const char *begin = nk_str_get_const(&edit->string);\n                    select_end_ptr = begin + nk_str_len_char(&edit->string);\n                }\n                nk_edit_draw_text(out, style,\n                    area.x - edit->scrollbar.x,\n                    area.y + selection_offset_start.y - edit->scrollbar.y,\n                    selection_offset_start.x,\n                    select_begin_ptr, (int)(select_end_ptr - select_begin_ptr),\n                    row_height, font, sel_background_color, sel_text_color, nk_true);\n            }\n            if ((edit->select_start != edit->select_end &&\n                selection_end < edit->string.len))\n            {\n                /* draw unselected text after selected text */\n                const char *begin = select_end_ptr;\n                const char *end = nk_str_get_const(&edit->string) +\n                                    nk_str_len_char(&edit->string);\n                NK_ASSERT(select_end_ptr);\n                nk_edit_draw_text(out, style,\n                    area.x - edit->scrollbar.x,\n                    area.y + selection_offset_end.y - edit->scrollbar.y,\n                    selection_offset_end.x,\n                    begin, (int)(end - begin), row_height, font,\n                    background_color, text_color, nk_true);\n            }\n        }\n\n        /* cursor */\n        if (edit->select_start == edit->select_end)\n        {\n            if (edit->cursor >= nk_str_len(&edit->string) ||\n                (cursor_ptr && *cursor_ptr == '\\n')) {\n                /* draw cursor at end of line */\n                struct nk_rect cursor;\n                cursor.w = style->cursor_size;\n                cursor.h = font->height;\n                cursor.x = area.x + cursor_pos.x - edit->scrollbar.x;\n                cursor.y = area.y + cursor_pos.y + row_height/2.0f - cursor.h/2.0f;\n                cursor.y -= edit->scrollbar.y;\n                nk_fill_rect(out, cursor, 0, cursor_color);\n            } else {\n                /* draw cursor inside text */\n                int glyph_len;\n                struct nk_rect label;\n                struct nk_text txt;\n\n                nk_rune unicode;\n                NK_ASSERT(cursor_ptr);\n                glyph_len = nk_utf_decode(cursor_ptr, &unicode, 4);\n\n                label.x = area.x + cursor_pos.x - edit->scrollbar.x;\n                label.y = area.y + cursor_pos.y - edit->scrollbar.y;\n                label.w = font->width(font->userdata, font->height, cursor_ptr, glyph_len);\n                label.h = row_height;\n\n                txt.padding = nk_vec2(0,0);\n                txt.background = cursor_color;;\n                txt.text = cursor_text_color;\n                nk_fill_rect(out, label, 0, cursor_color);\n                nk_widget_text(out, label, cursor_ptr, glyph_len, &txt, NK_TEXT_LEFT, font);\n            }\n        }}\n    } else {\n        /* not active so just draw text */\n        int l = nk_str_len_char(&edit->string);\n        const char *begin = nk_str_get_const(&edit->string);\n\n        const struct nk_style_item *background;\n        struct nk_color background_color;\n        struct nk_color text_color;\n        nk_push_scissor(out, clip);\n        if (*state & NK_WIDGET_STATE_ACTIVED) {\n            background = &style->active;\n            text_color = style->text_active;\n        } else if (*state & NK_WIDGET_STATE_HOVER) {\n            background = &style->hover;\n            text_color = style->text_hover;\n        } else {\n            background = &style->normal;\n            text_color = style->text_normal;\n        }\n        if (background->type == NK_STYLE_ITEM_IMAGE)\n            background_color = nk_rgba(0,0,0,0);\n        else background_color = background->data.color;\n        nk_edit_draw_text(out, style, area.x - edit->scrollbar.x,\n            area.y - edit->scrollbar.y, 0, begin, l, row_height, font,\n            background_color, text_color, nk_false);\n    }\n    nk_push_scissor(out, old_clip);}\n    return ret;\n}\nNK_API void\nnk_edit_focus(struct nk_context *ctx, nk_flags flags)\n{\n    nk_hash hash;\n    struct nk_window *win;\n\n    NK_ASSERT(ctx);\n    NK_ASSERT(ctx->current);\n    if (!ctx || !ctx->current) return;\n\n    win = ctx->current;\n    hash = win->edit.seq;\n    win->edit.active = nk_true;\n    win->edit.name = hash;\n    if (flags & NK_EDIT_ALWAYS_INSERT_MODE)\n        win->edit.mode = NK_TEXT_EDIT_MODE_INSERT;\n}\nNK_API void\nnk_edit_unfocus(struct nk_context *ctx)\n{\n    struct nk_window *win;\n    NK_ASSERT(ctx);\n    NK_ASSERT(ctx->current);\n    if (!ctx || !ctx->current) return;\n\n    win = ctx->current;\n    win->edit.active = nk_false;\n    win->edit.name = 0;\n}\nNK_API nk_flags\nnk_edit_string(struct nk_context *ctx, nk_flags flags,\n    char *memory, int *len, int max, nk_plugin_filter filter)\n{\n    nk_hash hash;\n    nk_flags state;\n    struct nk_text_edit *edit;\n    struct nk_window *win;\n\n    NK_ASSERT(ctx);\n    NK_ASSERT(memory);\n    NK_ASSERT(len);\n    if (!ctx || !memory || !len)\n        return 0;\n\n    filter = (!filter) ? nk_filter_default: filter;\n    win = ctx->current;\n    hash = win->edit.seq;\n    edit = &ctx->text_edit;\n    nk_textedit_clear_state(&ctx->text_edit, (flags & NK_EDIT_MULTILINE)?\n        NK_TEXT_EDIT_MULTI_LINE: NK_TEXT_EDIT_SINGLE_LINE, filter);\n\n    if (win->edit.active && hash == win->edit.name) {\n        if (flags & NK_EDIT_NO_CURSOR)\n            edit->cursor = nk_utf_len(memory, *len);\n        else edit->cursor = win->edit.cursor;\n        if (!(flags & NK_EDIT_SELECTABLE)) {\n            edit->select_start = win->edit.cursor;\n            edit->select_end = win->edit.cursor;\n        } else {\n            edit->select_start = win->edit.sel_start;\n            edit->select_end = win->edit.sel_end;\n        }\n        edit->mode = win->edit.mode;\n        edit->scrollbar.x = (float)win->edit.scrollbar.x;\n        edit->scrollbar.y = (float)win->edit.scrollbar.y;\n        edit->active = nk_true;\n    } else edit->active = nk_false;\n\n    max = NK_MAX(1, max);\n    *len = NK_MIN(*len, max-1);\n    nk_str_init_fixed(&edit->string, memory, (nk_size)max);\n    edit->string.buffer.allocated = (nk_size)*len;\n    edit->string.len = nk_utf_len(memory, *len);\n    state = nk_edit_buffer(ctx, flags, edit, filter);\n    *len = (int)edit->string.buffer.allocated;\n\n    if (edit->active) {\n        win->edit.cursor = edit->cursor;\n        win->edit.sel_start = edit->select_start;\n        win->edit.sel_end = edit->select_end;\n        win->edit.mode = edit->mode;\n        win->edit.scrollbar.x = (nk_uint)edit->scrollbar.x;\n        win->edit.scrollbar.y = (nk_uint)edit->scrollbar.y;\n    } return state;\n}\nNK_API nk_flags\nnk_edit_buffer(struct nk_context *ctx, nk_flags flags,\n    struct nk_text_edit *edit, nk_plugin_filter filter)\n{\n    struct nk_window *win;\n    struct nk_style *style;\n    struct nk_input *in;\n\n    enum nk_widget_layout_states state;\n    struct nk_rect bounds;\n\n    nk_flags ret_flags = 0;\n    unsigned char prev_state;\n    nk_hash hash;\n\n    /* make sure correct values */\n    NK_ASSERT(ctx);\n    NK_ASSERT(edit);\n    NK_ASSERT(ctx->current);\n    NK_ASSERT(ctx->current->layout);\n    if (!ctx || !ctx->current || !ctx->current->layout)\n        return 0;\n\n    win = ctx->current;\n    style = &ctx->style;\n    state = nk_widget(&bounds, ctx);\n    if (!state) return state;\n    in = (win->layout->flags & NK_WINDOW_ROM) ? 0 : &ctx->input;\n\n    /* check if edit is currently hot item */\n    hash = win->edit.seq++;\n    if (win->edit.active && hash == win->edit.name) {\n        if (flags & NK_EDIT_NO_CURSOR)\n            edit->cursor = edit->string.len;\n        if (!(flags & NK_EDIT_SELECTABLE)) {\n            edit->select_start = edit->cursor;\n            edit->select_end = edit->cursor;\n        }\n        if (flags & NK_EDIT_CLIPBOARD)\n            edit->clip = ctx->clip;\n        edit->active = (unsigned char)win->edit.active;\n    } else edit->active = nk_false;\n    edit->mode = win->edit.mode;\n\n    filter = (!filter) ? nk_filter_default: filter;\n    prev_state = (unsigned char)edit->active;\n    in = (flags & NK_EDIT_READ_ONLY) ? 0: in;\n    ret_flags = nk_do_edit(&ctx->last_widget_state, &win->buffer, bounds, flags,\n                    filter, edit, &style->edit, in, style->font);\n\n    if (ctx->last_widget_state & NK_WIDGET_STATE_HOVER)\n        ctx->style.cursor_active = ctx->style.cursors[NK_CURSOR_TEXT];\n    if (edit->active && prev_state != edit->active) {\n        /* current edit is now hot */\n        win->edit.active = nk_true;\n        win->edit.name = hash;\n    } else if (prev_state && !edit->active) {\n        /* current edit is now cold */\n        win->edit.active = nk_false;\n    } return ret_flags;\n}\nNK_API nk_flags\nnk_edit_string_zero_terminated(struct nk_context *ctx, nk_flags flags,\n    char *buffer, int max, nk_plugin_filter filter)\n{\n    nk_flags result;\n    int len = nk_strlen(buffer);\n    result = nk_edit_string(ctx, flags, buffer, &len, max, filter);\n    buffer[NK_MIN(NK_MAX(max-1,0), len)] = '\\0';\n    return result;\n}\n\n\n\n\n\n/* ===============================================================\n *\n *                              PROPERTY\n *\n * ===============================================================*/\nNK_LIB void\nnk_drag_behavior(nk_flags *state, const struct nk_input *in,\n    struct nk_rect drag, struct nk_property_variant *variant,\n    float inc_per_pixel)\n{\n    int left_mouse_down = in && in->mouse.buttons[NK_BUTTON_LEFT].down;\n    int left_mouse_click_in_cursor = in &&\n        nk_input_has_mouse_click_down_in_rect(in, NK_BUTTON_LEFT, drag, nk_true);\n\n    nk_widget_state_reset(state);\n    if (nk_input_is_mouse_hovering_rect(in, drag))\n        *state = NK_WIDGET_STATE_HOVERED;\n\n    if (left_mouse_down && left_mouse_click_in_cursor) {\n        float delta, pixels;\n        pixels = in->mouse.delta.x;\n        delta = pixels * inc_per_pixel;\n        switch (variant->kind) {\n        default: break;\n        case NK_PROPERTY_INT:\n            variant->value.i = variant->value.i + (int)delta;\n            variant->value.i = NK_CLAMP(variant->min_value.i, variant->value.i, variant->max_value.i);\n            break;\n        case NK_PROPERTY_FLOAT:\n            variant->value.f = variant->value.f + (float)delta;\n            variant->value.f = NK_CLAMP(variant->min_value.f, variant->value.f, variant->max_value.f);\n            break;\n        case NK_PROPERTY_DOUBLE:\n            variant->value.d = variant->value.d + (double)delta;\n            variant->value.d = NK_CLAMP(variant->min_value.d, variant->value.d, variant->max_value.d);\n            break;\n        }\n        *state = NK_WIDGET_STATE_ACTIVE;\n    }\n    if (*state & NK_WIDGET_STATE_HOVER && !nk_input_is_mouse_prev_hovering_rect(in, drag))\n        *state |= NK_WIDGET_STATE_ENTERED;\n    else if (nk_input_is_mouse_prev_hovering_rect(in, drag))\n        *state |= NK_WIDGET_STATE_LEFT;\n}\nNK_LIB void\nnk_property_behavior(nk_flags *ws, const struct nk_input *in,\n    struct nk_rect property,  struct nk_rect label, struct nk_rect edit,\n    struct nk_rect empty, int *state, struct nk_property_variant *variant,\n    float inc_per_pixel)\n{\n    if (in && *state == NK_PROPERTY_DEFAULT) {\n        if (nk_button_behavior(ws, edit, in, NK_BUTTON_DEFAULT))\n            *state = NK_PROPERTY_EDIT;\n        else if (nk_input_is_mouse_click_down_in_rect(in, NK_BUTTON_LEFT, label, nk_true))\n            *state = NK_PROPERTY_DRAG;\n        else if (nk_input_is_mouse_click_down_in_rect(in, NK_BUTTON_LEFT, empty, nk_true))\n            *state = NK_PROPERTY_DRAG;\n    }\n    if (*state == NK_PROPERTY_DRAG) {\n        nk_drag_behavior(ws, in, property, variant, inc_per_pixel);\n        if (!(*ws & NK_WIDGET_STATE_ACTIVED)) *state = NK_PROPERTY_DEFAULT;\n    }\n}\nNK_LIB void\nnk_draw_property(struct nk_command_buffer *out, const struct nk_style_property *style,\n    const struct nk_rect *bounds, const struct nk_rect *label, nk_flags state,\n    const char *name, int len, const struct nk_user_font *font)\n{\n    struct nk_text text;\n    const struct nk_style_item *background;\n\n    /* select correct background and text color */\n    if (state & NK_WIDGET_STATE_ACTIVED) {\n        background = &style->active;\n        text.text = style->label_active;\n    } else if (state & NK_WIDGET_STATE_HOVER) {\n        background = &style->hover;\n        text.text = style->label_hover;\n    } else {\n        background = &style->normal;\n        text.text = style->label_normal;\n    }\n\n    /* draw background */\n    if (background->type == NK_STYLE_ITEM_IMAGE) {\n        nk_draw_image(out, *bounds, &background->data.image, nk_white);\n        text.background = nk_rgba(0,0,0,0);\n    } else {\n        text.background = background->data.color;\n        nk_fill_rect(out, *bounds, style->rounding, background->data.color);\n        nk_stroke_rect(out, *bounds, style->rounding, style->border, background->data.color);\n    }\n\n    /* draw label */\n    text.padding = nk_vec2(0,0);\n    nk_widget_text(out, *label, name, len, &text, NK_TEXT_CENTERED, font);\n}\nNK_LIB void\nnk_do_property(nk_flags *ws,\n    struct nk_command_buffer *out, struct nk_rect property,\n    const char *name, struct nk_property_variant *variant,\n    float inc_per_pixel, char *buffer, int *len,\n    int *state, int *cursor, int *select_begin, int *select_end,\n    const struct nk_style_property *style,\n    enum nk_property_filter filter, struct nk_input *in,\n    const struct nk_user_font *font, struct nk_text_edit *text_edit,\n    enum nk_button_behavior behavior)\n{\n    const nk_plugin_filter filters[] = {\n        nk_filter_decimal,\n        nk_filter_float\n    };\n    int active, old;\n    int num_len, name_len;\n    char string[NK_MAX_NUMBER_BUFFER];\n    float size;\n\n    char *dst = 0;\n    int *length;\n\n    struct nk_rect left;\n    struct nk_rect right;\n    struct nk_rect label;\n    struct nk_rect edit;\n    struct nk_rect empty;\n\n    /* left decrement button */\n    left.h = font->height/2;\n    left.w = left.h;\n    left.x = property.x + style->border + style->padding.x;\n    left.y = property.y + style->border + property.h/2.0f - left.h/2;\n\n    /* text label */\n    name_len = nk_strlen(name);\n    size = font->width(font->userdata, font->height, name, name_len);\n    label.x = left.x + left.w + style->padding.x;\n    label.w = (float)size + 2 * style->padding.x;\n    label.y = property.y + style->border + style->padding.y;\n    label.h = property.h - (2 * style->border + 2 * style->padding.y);\n\n    /* right increment button */\n    right.y = left.y;\n    right.w = left.w;\n    right.h = left.h;\n    right.x = property.x + property.w - (right.w + style->padding.x);\n\n    /* edit */\n    if (*state == NK_PROPERTY_EDIT) {\n        size = font->width(font->userdata, font->height, buffer, *len);\n        size += style->edit.cursor_size;\n        length = len;\n        dst = buffer;\n    } else {\n        switch (variant->kind) {\n        default: break;\n        case NK_PROPERTY_INT:\n            nk_itoa(string, variant->value.i);\n            num_len = nk_strlen(string);\n            break;\n        case NK_PROPERTY_FLOAT:\n            NK_DTOA(string, (double)variant->value.f);\n            num_len = nk_string_float_limit(string, NK_MAX_FLOAT_PRECISION);\n            break;\n        case NK_PROPERTY_DOUBLE:\n            NK_DTOA(string, variant->value.d);\n            num_len = nk_string_float_limit(string, NK_MAX_FLOAT_PRECISION);\n            break;\n        }\n        size = font->width(font->userdata, font->height, string, num_len);\n        dst = string;\n        length = &num_len;\n    }\n\n    edit.w =  (float)size + 2 * style->padding.x;\n    edit.w = NK_MIN(edit.w, right.x - (label.x + label.w));\n    edit.x = right.x - (edit.w + style->padding.x);\n    edit.y = property.y + style->border;\n    edit.h = property.h - (2 * style->border);\n\n    /* empty left space activator */\n    empty.w = edit.x - (label.x + label.w);\n    empty.x = label.x + label.w;\n    empty.y = property.y;\n    empty.h = property.h;\n\n    /* update property */\n    old = (*state == NK_PROPERTY_EDIT);\n    nk_property_behavior(ws, in, property, label, edit, empty, state, variant, inc_per_pixel);\n\n    /* draw property */\n    if (style->draw_begin) style->draw_begin(out, style->userdata);\n    nk_draw_property(out, style, &property, &label, *ws, name, name_len, font);\n    if (style->draw_end) style->draw_end(out, style->userdata);\n\n    /* execute right button  */\n    if (nk_do_button_symbol(ws, out, left, style->sym_left, behavior, &style->dec_button, in, font)) {\n        switch (variant->kind) {\n        default: break;\n        case NK_PROPERTY_INT:\n            variant->value.i = NK_CLAMP(variant->min_value.i, variant->value.i - variant->step.i, variant->max_value.i); break;\n        case NK_PROPERTY_FLOAT:\n            variant->value.f = NK_CLAMP(variant->min_value.f, variant->value.f - variant->step.f, variant->max_value.f); break;\n        case NK_PROPERTY_DOUBLE:\n            variant->value.d = NK_CLAMP(variant->min_value.d, variant->value.d - variant->step.d, variant->max_value.d); break;\n        }\n    }\n    /* execute left button  */\n    if (nk_do_button_symbol(ws, out, right, style->sym_right, behavior, &style->inc_button, in, font)) {\n        switch (variant->kind) {\n        default: break;\n        case NK_PROPERTY_INT:\n            variant->value.i = NK_CLAMP(variant->min_value.i, variant->value.i + variant->step.i, variant->max_value.i); break;\n        case NK_PROPERTY_FLOAT:\n            variant->value.f = NK_CLAMP(variant->min_value.f, variant->value.f + variant->step.f, variant->max_value.f); break;\n        case NK_PROPERTY_DOUBLE:\n            variant->value.d = NK_CLAMP(variant->min_value.d, variant->value.d + variant->step.d, variant->max_value.d); break;\n        }\n    }\n    if (old != NK_PROPERTY_EDIT && (*state == NK_PROPERTY_EDIT)) {\n        /* property has been activated so setup buffer */\n        NK_MEMCPY(buffer, dst, (nk_size)*length);\n        *cursor = nk_utf_len(buffer, *length);\n        *len = *length;\n        length = len;\n        dst = buffer;\n        active = 0;\n    } else active = (*state == NK_PROPERTY_EDIT);\n\n    /* execute and run text edit field */\n    nk_textedit_clear_state(text_edit, NK_TEXT_EDIT_SINGLE_LINE, filters[filter]);\n    text_edit->active = (unsigned char)active;\n    text_edit->string.len = *length;\n    text_edit->cursor = NK_CLAMP(0, *cursor, *length);\n    text_edit->select_start = NK_CLAMP(0,*select_begin, *length);\n    text_edit->select_end = NK_CLAMP(0,*select_end, *length);\n    text_edit->string.buffer.allocated = (nk_size)*length;\n    text_edit->string.buffer.memory.size = NK_MAX_NUMBER_BUFFER;\n    text_edit->string.buffer.memory.ptr = dst;\n    text_edit->string.buffer.size = NK_MAX_NUMBER_BUFFER;\n    text_edit->mode = NK_TEXT_EDIT_MODE_INSERT;\n    nk_do_edit(ws, out, edit, NK_EDIT_FIELD|NK_EDIT_AUTO_SELECT,\n        filters[filter], text_edit, &style->edit, (*state == NK_PROPERTY_EDIT) ? in: 0, font);\n\n    *length = text_edit->string.len;\n    *cursor = text_edit->cursor;\n    *select_begin = text_edit->select_start;\n    *select_end = text_edit->select_end;\n    if (text_edit->active && nk_input_is_key_pressed(in, NK_KEY_ENTER))\n        text_edit->active = nk_false;\n\n    if (active && !text_edit->active) {\n        /* property is now not active so convert edit text to value*/\n        *state = NK_PROPERTY_DEFAULT;\n        buffer[*len] = '\\0';\n        switch (variant->kind) {\n        default: break;\n        case NK_PROPERTY_INT:\n            variant->value.i = nk_strtoi(buffer, 0);\n            variant->value.i = NK_CLAMP(variant->min_value.i, variant->value.i, variant->max_value.i);\n            break;\n        case NK_PROPERTY_FLOAT:\n            nk_string_float_limit(buffer, NK_MAX_FLOAT_PRECISION);\n            variant->value.f = nk_strtof(buffer, 0);\n            variant->value.f = NK_CLAMP(variant->min_value.f, variant->value.f, variant->max_value.f);\n            break;\n        case NK_PROPERTY_DOUBLE:\n            nk_string_float_limit(buffer, NK_MAX_FLOAT_PRECISION);\n            variant->value.d = nk_strtod(buffer, 0);\n            variant->value.d = NK_CLAMP(variant->min_value.d, variant->value.d, variant->max_value.d);\n            break;\n        }\n    }\n}\nNK_LIB struct nk_property_variant\nnk_property_variant_int(int value, int min_value, int max_value, int step)\n{\n    struct nk_property_variant result;\n    result.kind = NK_PROPERTY_INT;\n    result.value.i = value;\n    result.min_value.i = min_value;\n    result.max_value.i = max_value;\n    result.step.i = step;\n    return result;\n}\nNK_LIB struct nk_property_variant\nnk_property_variant_float(float value, float min_value, float max_value, float step)\n{\n    struct nk_property_variant result;\n    result.kind = NK_PROPERTY_FLOAT;\n    result.value.f = value;\n    result.min_value.f = min_value;\n    result.max_value.f = max_value;\n    result.step.f = step;\n    return result;\n}\nNK_LIB struct nk_property_variant\nnk_property_variant_double(double value, double min_value, double max_value,\n    double step)\n{\n    struct nk_property_variant result;\n    result.kind = NK_PROPERTY_DOUBLE;\n    result.value.d = value;\n    result.min_value.d = min_value;\n    result.max_value.d = max_value;\n    result.step.d = step;\n    return result;\n}\nNK_LIB void\nnk_property(struct nk_context *ctx, const char *name, struct nk_property_variant *variant,\n    float inc_per_pixel, const enum nk_property_filter filter)\n{\n    struct nk_window *win;\n    struct nk_panel *layout;\n    struct nk_input *in;\n    const struct nk_style *style;\n\n    struct nk_rect bounds;\n    enum nk_widget_layout_states s;\n\n    int *state = 0;\n    nk_hash hash = 0;\n    char *buffer = 0;\n    int *len = 0;\n    int *cursor = 0;\n    int *select_begin = 0;\n    int *select_end = 0;\n    int old_state;\n\n    char dummy_buffer[NK_MAX_NUMBER_BUFFER];\n    int dummy_state = NK_PROPERTY_DEFAULT;\n    int dummy_length = 0;\n    int dummy_cursor = 0;\n    int dummy_select_begin = 0;\n    int dummy_select_end = 0;\n\n    NK_ASSERT(ctx);\n    NK_ASSERT(ctx->current);\n    NK_ASSERT(ctx->current->layout);\n    if (!ctx || !ctx->current || !ctx->current->layout)\n        return;\n\n    win = ctx->current;\n    layout = win->layout;\n    style = &ctx->style;\n    s = nk_widget(&bounds, ctx);\n    if (!s) return;\n\n    /* calculate hash from name */\n    if (name[0] == '#') {\n        hash = nk_murmur_hash(name, (int)nk_strlen(name), win->property.seq++);\n        name++; /* special number hash */\n    } else hash = nk_murmur_hash(name, (int)nk_strlen(name), 42);\n\n    /* check if property is currently hot item */\n    if (win->property.active && hash == win->property.name) {\n        buffer = win->property.buffer;\n        len = &win->property.length;\n        cursor = &win->property.cursor;\n        state = &win->property.state;\n        select_begin = &win->property.select_start;\n        select_end = &win->property.select_end;\n    } else {\n        buffer = dummy_buffer;\n        len = &dummy_length;\n        cursor = &dummy_cursor;\n        state = &dummy_state;\n        select_begin =  &dummy_select_begin;\n        select_end = &dummy_select_end;\n    }\n\n    /* execute property widget */\n    old_state = *state;\n    ctx->text_edit.clip = ctx->clip;\n    in = ((s == NK_WIDGET_ROM && !win->property.active) ||\n        layout->flags & NK_WINDOW_ROM) ? 0 : &ctx->input;\n    nk_do_property(&ctx->last_widget_state, &win->buffer, bounds, name,\n        variant, inc_per_pixel, buffer, len, state, cursor, select_begin,\n        select_end, &style->property, filter, in, style->font, &ctx->text_edit,\n        ctx->button_behavior);\n\n    if (in && *state != NK_PROPERTY_DEFAULT && !win->property.active) {\n        /* current property is now hot */\n        win->property.active = 1;\n        NK_MEMCPY(win->property.buffer, buffer, (nk_size)*len);\n        win->property.length = *len;\n        win->property.cursor = *cursor;\n        win->property.state = *state;\n        win->property.name = hash;\n        win->property.select_start = *select_begin;\n        win->property.select_end = *select_end;\n        if (*state == NK_PROPERTY_DRAG) {\n            ctx->input.mouse.grab = nk_true;\n            ctx->input.mouse.grabbed = nk_true;\n        }\n    }\n    /* check if previously active property is now inactive */\n    if (*state == NK_PROPERTY_DEFAULT && old_state != NK_PROPERTY_DEFAULT) {\n        if (old_state == NK_PROPERTY_DRAG) {\n            ctx->input.mouse.grab = nk_false;\n            ctx->input.mouse.grabbed = nk_false;\n            ctx->input.mouse.ungrab = nk_true;\n        }\n        win->property.select_start = 0;\n        win->property.select_end = 0;\n        win->property.active = 0;\n    }\n}\nNK_API void\nnk_property_int(struct nk_context *ctx, const char *name,\n    int min, int *val, int max, int step, float inc_per_pixel)\n{\n    struct nk_property_variant variant;\n    NK_ASSERT(ctx);\n    NK_ASSERT(name);\n    NK_ASSERT(val);\n\n    if (!ctx || !ctx->current || !name || !val) return;\n    variant = nk_property_variant_int(*val, min, max, step);\n    nk_property(ctx, name, &variant, inc_per_pixel, NK_FILTER_INT);\n    *val = variant.value.i;\n}\nNK_API void\nnk_property_float(struct nk_context *ctx, const char *name,\n    float min, float *val, float max, float step, float inc_per_pixel)\n{\n    struct nk_property_variant variant;\n    NK_ASSERT(ctx);\n    NK_ASSERT(name);\n    NK_ASSERT(val);\n\n    if (!ctx || !ctx->current || !name || !val) return;\n    variant = nk_property_variant_float(*val, min, max, step);\n    nk_property(ctx, name, &variant, inc_per_pixel, NK_FILTER_FLOAT);\n    *val = variant.value.f;\n}\nNK_API void\nnk_property_double(struct nk_context *ctx, const char *name,\n    double min, double *val, double max, double step, float inc_per_pixel)\n{\n    struct nk_property_variant variant;\n    NK_ASSERT(ctx);\n    NK_ASSERT(name);\n    NK_ASSERT(val);\n\n    if (!ctx || !ctx->current || !name || !val) return;\n    variant = nk_property_variant_double(*val, min, max, step);\n    nk_property(ctx, name, &variant, inc_per_pixel, NK_FILTER_FLOAT);\n    *val = variant.value.d;\n}\nNK_API int\nnk_propertyi(struct nk_context *ctx, const char *name, int min, int val,\n    int max, int step, float inc_per_pixel)\n{\n    struct nk_property_variant variant;\n    NK_ASSERT(ctx);\n    NK_ASSERT(name);\n\n    if (!ctx || !ctx->current || !name) return val;\n    variant = nk_property_variant_int(val, min, max, step);\n    nk_property(ctx, name, &variant, inc_per_pixel, NK_FILTER_INT);\n    val = variant.value.i;\n    return val;\n}\nNK_API float\nnk_propertyf(struct nk_context *ctx, const char *name, float min,\n    float val, float max, float step, float inc_per_pixel)\n{\n    struct nk_property_variant variant;\n    NK_ASSERT(ctx);\n    NK_ASSERT(name);\n\n    if (!ctx || !ctx->current || !name) return val;\n    variant = nk_property_variant_float(val, min, max, step);\n    nk_property(ctx, name, &variant, inc_per_pixel, NK_FILTER_FLOAT);\n    val = variant.value.f;\n    return val;\n}\nNK_API double\nnk_propertyd(struct nk_context *ctx, const char *name, double min,\n    double val, double max, double step, float inc_per_pixel)\n{\n    struct nk_property_variant variant;\n    NK_ASSERT(ctx);\n    NK_ASSERT(name);\n\n    if (!ctx || !ctx->current || !name) return val;\n    variant = nk_property_variant_double(val, min, max, step);\n    nk_property(ctx, name, &variant, inc_per_pixel, NK_FILTER_FLOAT);\n    val = variant.value.d;\n    return val;\n}\n\n\n\n\n\n/* ==============================================================\n *\n *                          CHART\n *\n * ===============================================================*/\nNK_API int\nnk_chart_begin_colored(struct nk_context *ctx, enum nk_chart_type type,\n    struct nk_color color, struct nk_color highlight,\n    int count, float min_value, float max_value)\n{\n    struct nk_window *win;\n    struct nk_chart *chart;\n    const struct nk_style *config;\n    const struct nk_style_chart *style;\n\n    const struct nk_style_item *background;\n    struct nk_rect bounds = {0, 0, 0, 0};\n\n    NK_ASSERT(ctx);\n    NK_ASSERT(ctx->current);\n    NK_ASSERT(ctx->current->layout);\n\n    if (!ctx || !ctx->current || !ctx->current->layout) return 0;\n    if (!nk_widget(&bounds, ctx)) {\n        chart = &ctx->current->layout->chart;\n        nk_zero(chart, sizeof(*chart));\n        return 0;\n    }\n\n    win = ctx->current;\n    config = &ctx->style;\n    chart = &win->layout->chart;\n    style = &config->chart;\n\n    /* setup basic generic chart  */\n    nk_zero(chart, sizeof(*chart));\n    chart->x = bounds.x + style->padding.x;\n    chart->y = bounds.y + style->padding.y;\n    chart->w = bounds.w - 2 * style->padding.x;\n    chart->h = bounds.h - 2 * style->padding.y;\n    chart->w = NK_MAX(chart->w, 2 * style->padding.x);\n    chart->h = NK_MAX(chart->h, 2 * style->padding.y);\n\n    /* add first slot into chart */\n    {struct nk_chart_slot *slot = &chart->slots[chart->slot++];\n    slot->type = type;\n    slot->count = count;\n    slot->color = color;\n    slot->highlight = highlight;\n    slot->min = NK_MIN(min_value, max_value);\n    slot->max = NK_MAX(min_value, max_value);\n    slot->range = slot->max - slot->min;}\n\n    /* draw chart background */\n    background = &style->background;\n    if (background->type == NK_STYLE_ITEM_IMAGE) {\n        nk_draw_image(&win->buffer, bounds, &background->data.image, nk_white);\n    } else {\n        nk_fill_rect(&win->buffer, bounds, style->rounding, style->border_color);\n        nk_fill_rect(&win->buffer, nk_shrink_rect(bounds, style->border),\n            style->rounding, style->background.data.color);\n    }\n    return 1;\n}\nNK_API int\nnk_chart_begin(struct nk_context *ctx, const enum nk_chart_type type,\n    int count, float min_value, float max_value)\n{\n    return nk_chart_begin_colored(ctx, type, ctx->style.chart.color,\n                ctx->style.chart.selected_color, count, min_value, max_value);\n}\nNK_API void\nnk_chart_add_slot_colored(struct nk_context *ctx, const enum nk_chart_type type,\n    struct nk_color color, struct nk_color highlight,\n    int count, float min_value, float max_value)\n{\n    NK_ASSERT(ctx);\n    NK_ASSERT(ctx->current);\n    NK_ASSERT(ctx->current->layout);\n    NK_ASSERT(ctx->current->layout->chart.slot < NK_CHART_MAX_SLOT);\n    if (!ctx || !ctx->current || !ctx->current->layout) return;\n    if (ctx->current->layout->chart.slot >= NK_CHART_MAX_SLOT) return;\n\n    /* add another slot into the graph */\n    {struct nk_chart *chart = &ctx->current->layout->chart;\n    struct nk_chart_slot *slot = &chart->slots[chart->slot++];\n    slot->type = type;\n    slot->count = count;\n    slot->color = color;\n    slot->highlight = highlight;\n    slot->min = NK_MIN(min_value, max_value);\n    slot->max = NK_MAX(min_value, max_value);\n    slot->range = slot->max - slot->min;}\n}\nNK_API void\nnk_chart_add_slot(struct nk_context *ctx, const enum nk_chart_type type,\n    int count, float min_value, float max_value)\n{\n    nk_chart_add_slot_colored(ctx, type, ctx->style.chart.color,\n        ctx->style.chart.selected_color, count, min_value, max_value);\n}\nNK_INTERN nk_flags\nnk_chart_push_line(struct nk_context *ctx, struct nk_window *win,\n    struct nk_chart *g, float value, int slot)\n{\n    struct nk_panel *layout = win->layout;\n    const struct nk_input *i = &ctx->input;\n    struct nk_command_buffer *out = &win->buffer;\n\n    nk_flags ret = 0;\n    struct nk_vec2 cur;\n    struct nk_rect bounds;\n    struct nk_color color;\n    float step;\n    float range;\n    float ratio;\n\n    NK_ASSERT(slot >= 0 && slot < NK_CHART_MAX_SLOT);\n    step = g->w / (float)g->slots[slot].count;\n    range = g->slots[slot].max - g->slots[slot].min;\n    ratio = (value - g->slots[slot].min) / range;\n\n    if (g->slots[slot].index == 0) {\n        /* first data point does not have a connection */\n        g->slots[slot].last.x = g->x;\n        g->slots[slot].last.y = (g->y + g->h) - ratio * (float)g->h;\n\n        bounds.x = g->slots[slot].last.x - 2;\n        bounds.y = g->slots[slot].last.y - 2;\n        bounds.w = bounds.h = 4;\n\n        color = g->slots[slot].color;\n        if (!(layout->flags & NK_WINDOW_ROM) &&\n            NK_INBOX(i->mouse.pos.x,i->mouse.pos.y, g->slots[slot].last.x-3, g->slots[slot].last.y-3, 6, 6)){\n            ret = nk_input_is_mouse_hovering_rect(i, bounds) ? NK_CHART_HOVERING : 0;\n            ret |= (i->mouse.buttons[NK_BUTTON_LEFT].down &&\n                i->mouse.buttons[NK_BUTTON_LEFT].clicked) ? NK_CHART_CLICKED: 0;\n            color = g->slots[slot].highlight;\n        }\n        nk_fill_rect(out, bounds, 0, color);\n        g->slots[slot].index += 1;\n        return ret;\n    }\n\n    /* draw a line between the last data point and the new one */\n    color = g->slots[slot].color;\n    cur.x = g->x + (float)(step * (float)g->slots[slot].index);\n    cur.y = (g->y + g->h) - (ratio * (float)g->h);\n    nk_stroke_line(out, g->slots[slot].last.x, g->slots[slot].last.y, cur.x, cur.y, 1.0f, color);\n\n    bounds.x = cur.x - 3;\n    bounds.y = cur.y - 3;\n    bounds.w = bounds.h = 6;\n\n    /* user selection of current data point */\n    if (!(layout->flags & NK_WINDOW_ROM)) {\n        if (nk_input_is_mouse_hovering_rect(i, bounds)) {\n            ret = NK_CHART_HOVERING;\n            ret |= (!i->mouse.buttons[NK_BUTTON_LEFT].down &&\n                i->mouse.buttons[NK_BUTTON_LEFT].clicked) ? NK_CHART_CLICKED: 0;\n            color = g->slots[slot].highlight;\n        }\n    }\n    nk_fill_rect(out, nk_rect(cur.x - 2, cur.y - 2, 4, 4), 0, color);\n\n    /* save current data point position */\n    g->slots[slot].last.x = cur.x;\n    g->slots[slot].last.y = cur.y;\n    g->slots[slot].index  += 1;\n    return ret;\n}\nNK_INTERN nk_flags\nnk_chart_push_column(const struct nk_context *ctx, struct nk_window *win,\n    struct nk_chart *chart, float value, int slot)\n{\n    struct nk_command_buffer *out = &win->buffer;\n    const struct nk_input *in = &ctx->input;\n    struct nk_panel *layout = win->layout;\n\n    float ratio;\n    nk_flags ret = 0;\n    struct nk_color color;\n    struct nk_rect item = {0,0,0,0};\n\n    NK_ASSERT(slot >= 0 && slot < NK_CHART_MAX_SLOT);\n    if (chart->slots[slot].index  >= chart->slots[slot].count)\n        return nk_false;\n    if (chart->slots[slot].count) {\n        float padding = (float)(chart->slots[slot].count-1);\n        item.w = (chart->w - padding) / (float)(chart->slots[slot].count);\n    }\n\n    /* calculate bounds of current bar chart entry */\n    color = chart->slots[slot].color;;\n    item.h = chart->h * NK_ABS((value/chart->slots[slot].range));\n    if (value >= 0) {\n        ratio = (value + NK_ABS(chart->slots[slot].min)) / NK_ABS(chart->slots[slot].range);\n        item.y = (chart->y + chart->h) - chart->h * ratio;\n    } else {\n        ratio = (value - chart->slots[slot].max) / chart->slots[slot].range;\n        item.y = chart->y + (chart->h * NK_ABS(ratio)) - item.h;\n    }\n    item.x = chart->x + ((float)chart->slots[slot].index * item.w);\n    item.x = item.x + ((float)chart->slots[slot].index);\n\n    /* user chart bar selection */\n    if (!(layout->flags & NK_WINDOW_ROM) &&\n        NK_INBOX(in->mouse.pos.x,in->mouse.pos.y,item.x,item.y,item.w,item.h)) {\n        ret = NK_CHART_HOVERING;\n        ret |= (!in->mouse.buttons[NK_BUTTON_LEFT].down &&\n                in->mouse.buttons[NK_BUTTON_LEFT].clicked) ? NK_CHART_CLICKED: 0;\n        color = chart->slots[slot].highlight;\n    }\n    nk_fill_rect(out, item, 0, color);\n    chart->slots[slot].index += 1;\n    return ret;\n}\nNK_API nk_flags\nnk_chart_push_slot(struct nk_context *ctx, float value, int slot)\n{\n    nk_flags flags;\n    struct nk_window *win;\n\n    NK_ASSERT(ctx);\n    NK_ASSERT(ctx->current);\n    NK_ASSERT(slot >= 0 && slot < NK_CHART_MAX_SLOT);\n    NK_ASSERT(slot < ctx->current->layout->chart.slot);\n    if (!ctx || !ctx->current || slot >= NK_CHART_MAX_SLOT) return nk_false;\n    if (slot >= ctx->current->layout->chart.slot) return nk_false;\n\n    win = ctx->current;\n    if (win->layout->chart.slot < slot) return nk_false;\n    switch (win->layout->chart.slots[slot].type) {\n    case NK_CHART_LINES:\n        flags = nk_chart_push_line(ctx, win, &win->layout->chart, value, slot); break;\n    case NK_CHART_COLUMN:\n        flags = nk_chart_push_column(ctx, win, &win->layout->chart, value, slot); break;\n    default:\n    case NK_CHART_MAX:\n        flags = 0;\n    }\n    return flags;\n}\nNK_API nk_flags\nnk_chart_push(struct nk_context *ctx, float value)\n{\n    return nk_chart_push_slot(ctx, value, 0);\n}\nNK_API void\nnk_chart_end(struct nk_context *ctx)\n{\n    struct nk_window *win;\n    struct nk_chart *chart;\n\n    NK_ASSERT(ctx);\n    NK_ASSERT(ctx->current);\n    if (!ctx || !ctx->current)\n        return;\n\n    win = ctx->current;\n    chart = &win->layout->chart;\n    NK_MEMSET(chart, 0, sizeof(*chart));\n    return;\n}\nNK_API void\nnk_plot(struct nk_context *ctx, enum nk_chart_type type, const float *values,\n    int count, int offset)\n{\n    int i = 0;\n    float min_value;\n    float max_value;\n\n    NK_ASSERT(ctx);\n    NK_ASSERT(values);\n    if (!ctx || !values || !count) return;\n\n    min_value = values[offset];\n    max_value = values[offset];\n    for (i = 0; i < count; ++i) {\n        min_value = NK_MIN(values[i + offset], min_value);\n        max_value = NK_MAX(values[i + offset], max_value);\n    }\n\n    if (nk_chart_begin(ctx, type, count, min_value, max_value)) {\n        for (i = 0; i < count; ++i)\n            nk_chart_push(ctx, values[i + offset]);\n        nk_chart_end(ctx);\n    }\n}\nNK_API void\nnk_plot_function(struct nk_context *ctx, enum nk_chart_type type, void *userdata,\n    float(*value_getter)(void* user, int index), int count, int offset)\n{\n    int i = 0;\n    float min_value;\n    float max_value;\n\n    NK_ASSERT(ctx);\n    NK_ASSERT(value_getter);\n    if (!ctx || !value_getter || !count) return;\n\n    max_value = min_value = value_getter(userdata, offset);\n    for (i = 0; i < count; ++i) {\n        float value = value_getter(userdata, i + offset);\n        min_value = NK_MIN(value, min_value);\n        max_value = NK_MAX(value, max_value);\n    }\n\n    if (nk_chart_begin(ctx, type, count, min_value, max_value)) {\n        for (i = 0; i < count; ++i)\n            nk_chart_push(ctx, value_getter(userdata, i + offset));\n        nk_chart_end(ctx);\n    }\n}\n\n\n\n\n\n/* ==============================================================\n *\n *                          COLOR PICKER\n *\n * ===============================================================*/\nNK_LIB int\nnk_color_picker_behavior(nk_flags *state,\n    const struct nk_rect *bounds, const struct nk_rect *matrix,\n    const struct nk_rect *hue_bar, const struct nk_rect *alpha_bar,\n    struct nk_colorf *color, const struct nk_input *in)\n{\n    float hsva[4];\n    int value_changed = 0;\n    int hsv_changed = 0;\n\n    NK_ASSERT(state);\n    NK_ASSERT(matrix);\n    NK_ASSERT(hue_bar);\n    NK_ASSERT(color);\n\n    /* color matrix */\n    nk_colorf_hsva_fv(hsva, *color);\n    if (nk_button_behavior(state, *matrix, in, NK_BUTTON_REPEATER)) {\n        hsva[1] = NK_SATURATE((in->mouse.pos.x - matrix->x) / (matrix->w-1));\n        hsva[2] = 1.0f - NK_SATURATE((in->mouse.pos.y - matrix->y) / (matrix->h-1));\n        value_changed = hsv_changed = 1;\n    }\n    /* hue bar */\n    if (nk_button_behavior(state, *hue_bar, in, NK_BUTTON_REPEATER)) {\n        hsva[0] = NK_SATURATE((in->mouse.pos.y - hue_bar->y) / (hue_bar->h-1));\n        value_changed = hsv_changed = 1;\n    }\n    /* alpha bar */\n    if (alpha_bar) {\n        if (nk_button_behavior(state, *alpha_bar, in, NK_BUTTON_REPEATER)) {\n            hsva[3] = 1.0f - NK_SATURATE((in->mouse.pos.y - alpha_bar->y) / (alpha_bar->h-1));\n            value_changed = 1;\n        }\n    }\n    nk_widget_state_reset(state);\n    if (hsv_changed) {\n        *color = nk_hsva_colorfv(hsva);\n        *state = NK_WIDGET_STATE_ACTIVE;\n    }\n    if (value_changed) {\n        color->a = hsva[3];\n        *state = NK_WIDGET_STATE_ACTIVE;\n    }\n    /* set color picker widget state */\n    if (nk_input_is_mouse_hovering_rect(in, *bounds))\n        *state = NK_WIDGET_STATE_HOVERED;\n    if (*state & NK_WIDGET_STATE_HOVER && !nk_input_is_mouse_prev_hovering_rect(in, *bounds))\n        *state |= NK_WIDGET_STATE_ENTERED;\n    else if (nk_input_is_mouse_prev_hovering_rect(in, *bounds))\n        *state |= NK_WIDGET_STATE_LEFT;\n    return value_changed;\n}\nNK_LIB void\nnk_draw_color_picker(struct nk_command_buffer *o, const struct nk_rect *matrix,\n    const struct nk_rect *hue_bar, const struct nk_rect *alpha_bar,\n    struct nk_colorf col)\n{\n    NK_STORAGE const struct nk_color black = {0,0,0,255};\n    NK_STORAGE const struct nk_color white = {255, 255, 255, 255};\n    NK_STORAGE const struct nk_color black_trans = {0,0,0,0};\n\n    const float crosshair_size = 7.0f;\n    struct nk_color temp;\n    float hsva[4];\n    float line_y;\n    int i;\n\n    NK_ASSERT(o);\n    NK_ASSERT(matrix);\n    NK_ASSERT(hue_bar);\n\n    /* draw hue bar */\n    nk_colorf_hsva_fv(hsva, col);\n    for (i = 0; i < 6; ++i) {\n        NK_GLOBAL const struct nk_color hue_colors[] = {\n            {255, 0, 0, 255}, {255,255,0,255}, {0,255,0,255}, {0, 255,255,255},\n            {0,0,255,255}, {255, 0, 255, 255}, {255, 0, 0, 255}\n        };\n        nk_fill_rect_multi_color(o,\n            nk_rect(hue_bar->x, hue_bar->y + (float)i * (hue_bar->h/6.0f) + 0.5f,\n                hue_bar->w, (hue_bar->h/6.0f) + 0.5f), hue_colors[i], hue_colors[i],\n                hue_colors[i+1], hue_colors[i+1]);\n    }\n    line_y = (float)(int)(hue_bar->y + hsva[0] * matrix->h + 0.5f);\n    nk_stroke_line(o, hue_bar->x-1, line_y, hue_bar->x + hue_bar->w + 2,\n        line_y, 1, nk_rgb(255,255,255));\n\n    /* draw alpha bar */\n    if (alpha_bar) {\n        float alpha = NK_SATURATE(col.a);\n        line_y = (float)(int)(alpha_bar->y +  (1.0f - alpha) * matrix->h + 0.5f);\n\n        nk_fill_rect_multi_color(o, *alpha_bar, white, white, black, black);\n        nk_stroke_line(o, alpha_bar->x-1, line_y, alpha_bar->x + alpha_bar->w + 2,\n            line_y, 1, nk_rgb(255,255,255));\n    }\n\n    /* draw color matrix */\n    temp = nk_hsv_f(hsva[0], 1.0f, 1.0f);\n    nk_fill_rect_multi_color(o, *matrix, white, temp, temp, white);\n    nk_fill_rect_multi_color(o, *matrix, black_trans, black_trans, black, black);\n\n    /* draw cross-hair */\n    {struct nk_vec2 p; float S = hsva[1]; float V = hsva[2];\n    p.x = (float)(int)(matrix->x + S * matrix->w);\n    p.y = (float)(int)(matrix->y + (1.0f - V) * matrix->h);\n    nk_stroke_line(o, p.x - crosshair_size, p.y, p.x-2, p.y, 1.0f, white);\n    nk_stroke_line(o, p.x + crosshair_size + 1, p.y, p.x+3, p.y, 1.0f, white);\n    nk_stroke_line(o, p.x, p.y + crosshair_size + 1, p.x, p.y+3, 1.0f, white);\n    nk_stroke_line(o, p.x, p.y - crosshair_size, p.x, p.y-2, 1.0f, white);}\n}\nNK_LIB int\nnk_do_color_picker(nk_flags *state,\n    struct nk_command_buffer *out, struct nk_colorf *col,\n    enum nk_color_format fmt, struct nk_rect bounds,\n    struct nk_vec2 padding, const struct nk_input *in,\n    const struct nk_user_font *font)\n{\n    int ret = 0;\n    struct nk_rect matrix;\n    struct nk_rect hue_bar;\n    struct nk_rect alpha_bar;\n    float bar_w;\n\n    NK_ASSERT(out);\n    NK_ASSERT(col);\n    NK_ASSERT(state);\n    NK_ASSERT(font);\n    if (!out || !col || !state || !font)\n        return ret;\n\n    bar_w = font->height;\n    bounds.x += padding.x;\n    bounds.y += padding.x;\n    bounds.w -= 2 * padding.x;\n    bounds.h -= 2 * padding.y;\n\n    matrix.x = bounds.x;\n    matrix.y = bounds.y;\n    matrix.h = bounds.h;\n    matrix.w = bounds.w - (3 * padding.x + 2 * bar_w);\n\n    hue_bar.w = bar_w;\n    hue_bar.y = bounds.y;\n    hue_bar.h = matrix.h;\n    hue_bar.x = matrix.x + matrix.w + padding.x;\n\n    alpha_bar.x = hue_bar.x + hue_bar.w + padding.x;\n    alpha_bar.y = bounds.y;\n    alpha_bar.w = bar_w;\n    alpha_bar.h = matrix.h;\n\n    ret = nk_color_picker_behavior(state, &bounds, &matrix, &hue_bar,\n        (fmt == NK_RGBA) ? &alpha_bar:0, col, in);\n    nk_draw_color_picker(out, &matrix, &hue_bar, (fmt == NK_RGBA) ? &alpha_bar:0, *col);\n    return ret;\n}\nNK_API int\nnk_color_pick(struct nk_context * ctx, struct nk_colorf *color,\n    enum nk_color_format fmt)\n{\n    struct nk_window *win;\n    struct nk_panel *layout;\n    const struct nk_style *config;\n    const struct nk_input *in;\n\n    enum nk_widget_layout_states state;\n    struct nk_rect bounds;\n\n    NK_ASSERT(ctx);\n    NK_ASSERT(color);\n    NK_ASSERT(ctx->current);\n    NK_ASSERT(ctx->current->layout);\n    if (!ctx || !ctx->current || !ctx->current->layout || !color)\n        return 0;\n\n    win = ctx->current;\n    config = &ctx->style;\n    layout = win->layout;\n    state = nk_widget(&bounds, ctx);\n    if (!state) return 0;\n    in = (state == NK_WIDGET_ROM || layout->flags & NK_WINDOW_ROM) ? 0 : &ctx->input;\n    return nk_do_color_picker(&ctx->last_widget_state, &win->buffer, color, fmt, bounds,\n                nk_vec2(0,0), in, config->font);\n}\nNK_API struct nk_colorf\nnk_color_picker(struct nk_context *ctx, struct nk_colorf color,\n    enum nk_color_format fmt)\n{\n    nk_color_pick(ctx, &color, fmt);\n    return color;\n}\n\n\n\n\n\n/* ==============================================================\n *\n *                          COMBO\n *\n * ===============================================================*/\nNK_INTERN int\nnk_combo_begin(struct nk_context *ctx, struct nk_window *win,\n    struct nk_vec2 size, int is_clicked, struct nk_rect header)\n{\n    struct nk_window *popup;\n    int is_open = 0;\n    int is_active = 0;\n    struct nk_rect body;\n    nk_hash hash;\n\n    NK_ASSERT(ctx);\n    NK_ASSERT(ctx->current);\n    NK_ASSERT(ctx->current->layout);\n    if (!ctx || !ctx->current || !ctx->current->layout)\n        return 0;\n\n    popup = win->popup.win;\n    body.x = header.x;\n    body.w = size.x;\n    body.y = header.y + header.h-ctx->style.window.combo_border;\n    body.h = size.y;\n\n    hash = win->popup.combo_count++;\n    is_open = (popup) ? nk_true:nk_false;\n    is_active = (popup && (win->popup.name == hash) && win->popup.type == NK_PANEL_COMBO);\n    if ((is_clicked && is_open && !is_active) || (is_open && !is_active) ||\n        (!is_open && !is_active && !is_clicked)) return 0;\n    if (!nk_nonblock_begin(ctx, 0, body,\n        (is_clicked && is_open)?nk_rect(0,0,0,0):header, NK_PANEL_COMBO)) return 0;\n\n    win->popup.type = NK_PANEL_COMBO;\n    win->popup.name = hash;\n    return 1;\n}\nNK_API int\nnk_combo_begin_text(struct nk_context *ctx, const char *selected, int len,\n    struct nk_vec2 size)\n{\n    const struct nk_input *in;\n    struct nk_window *win;\n    struct nk_style *style;\n\n    enum nk_widget_layout_states s;\n    int is_clicked = nk_false;\n    struct nk_rect header;\n    const struct nk_style_item *background;\n    struct nk_text text;\n\n    NK_ASSERT(ctx);\n    NK_ASSERT(selected);\n    NK_ASSERT(ctx->current);\n    NK_ASSERT(ctx->current->layout);\n    if (!ctx || !ctx->current || !ctx->current->layout || !selected)\n        return 0;\n\n    win = ctx->current;\n    style = &ctx->style;\n    s = nk_widget(&header, ctx);\n    if (s == NK_WIDGET_INVALID)\n        return 0;\n\n    in = (win->layout->flags & NK_WINDOW_ROM || s == NK_WIDGET_ROM)? 0: &ctx->input;\n    if (nk_button_behavior(&ctx->last_widget_state, header, in, NK_BUTTON_DEFAULT))\n        is_clicked = nk_true;\n\n    /* draw combo box header background and border */\n    if (ctx->last_widget_state & NK_WIDGET_STATE_ACTIVED) {\n        background = &style->combo.active;\n        text.text = style->combo.label_active;\n    } else if (ctx->last_widget_state & NK_WIDGET_STATE_HOVER) {\n        background = &style->combo.hover;\n        text.text = style->combo.label_hover;\n    } else {\n        background = &style->combo.normal;\n        text.text = style->combo.label_normal;\n    }\n    if (background->type == NK_STYLE_ITEM_IMAGE) {\n        text.background = nk_rgba(0,0,0,0);\n        nk_draw_image(&win->buffer, header, &background->data.image, nk_white);\n    } else {\n        text.background = background->data.color;\n        nk_fill_rect(&win->buffer, header, style->combo.rounding, background->data.color);\n        nk_stroke_rect(&win->buffer, header, style->combo.rounding, style->combo.border, style->combo.border_color);\n    }\n    {\n        /* print currently selected text item */\n        struct nk_rect label;\n        struct nk_rect button;\n        struct nk_rect content;\n\n        enum nk_symbol_type sym;\n        if (ctx->last_widget_state & NK_WIDGET_STATE_HOVER)\n            sym = style->combo.sym_hover;\n        else if (is_clicked)\n            sym = style->combo.sym_active;\n        else sym = style->combo.sym_normal;\n\n        /* calculate button */\n        button.w = header.h - 2 * style->combo.button_padding.y;\n        button.x = (header.x + header.w - header.h) - style->combo.button_padding.x;\n        button.y = header.y + style->combo.button_padding.y;\n        button.h = button.w;\n\n        content.x = button.x + style->combo.button.padding.x;\n        content.y = button.y + style->combo.button.padding.y;\n        content.w = button.w - 2 * style->combo.button.padding.x;\n        content.h = button.h - 2 * style->combo.button.padding.y;\n\n        /* draw selected label */\n        text.padding = nk_vec2(0,0);\n        label.x = header.x + style->combo.content_padding.x;\n        label.y = header.y + style->combo.content_padding.y;\n        label.w = button.x - (style->combo.content_padding.x + style->combo.spacing.x) - label.x;;\n        label.h = header.h - 2 * style->combo.content_padding.y;\n        nk_widget_text(&win->buffer, label, selected, len, &text,\n            NK_TEXT_LEFT, ctx->style.font);\n\n        /* draw open/close button */\n        nk_draw_button_symbol(&win->buffer, &button, &content, ctx->last_widget_state,\n            &ctx->style.combo.button, sym, style->font);\n    }\n    return nk_combo_begin(ctx, win, size, is_clicked, header);\n}\nNK_API int\nnk_combo_begin_label(struct nk_context *ctx, const char *selected, struct nk_vec2 size)\n{\n    return nk_combo_begin_text(ctx, selected, nk_strlen(selected), size);\n}\nNK_API int\nnk_combo_begin_color(struct nk_context *ctx, struct nk_color color, struct nk_vec2 size)\n{\n    struct nk_window *win;\n    struct nk_style *style;\n    const struct nk_input *in;\n\n    struct nk_rect header;\n    int is_clicked = nk_false;\n    enum nk_widget_layout_states s;\n    const struct nk_style_item *background;\n\n    NK_ASSERT(ctx);\n    NK_ASSERT(ctx->current);\n    NK_ASSERT(ctx->current->layout);\n    if (!ctx || !ctx->current || !ctx->current->layout)\n        return 0;\n\n    win = ctx->current;\n    style = &ctx->style;\n    s = nk_widget(&header, ctx);\n    if (s == NK_WIDGET_INVALID)\n        return 0;\n\n    in = (win->layout->flags & NK_WINDOW_ROM || s == NK_WIDGET_ROM)? 0: &ctx->input;\n    if (nk_button_behavior(&ctx->last_widget_state, header, in, NK_BUTTON_DEFAULT))\n        is_clicked = nk_true;\n\n    /* draw combo box header background and border */\n    if (ctx->last_widget_state & NK_WIDGET_STATE_ACTIVED)\n        background = &style->combo.active;\n    else if (ctx->last_widget_state & NK_WIDGET_STATE_HOVER)\n        background = &style->combo.hover;\n    else background = &style->combo.normal;\n\n    if (background->type == NK_STYLE_ITEM_IMAGE) {\n        nk_draw_image(&win->buffer, header, &background->data.image,nk_white);\n    } else {\n        nk_fill_rect(&win->buffer, header, style->combo.rounding, background->data.color);\n        nk_stroke_rect(&win->buffer, header, style->combo.rounding, style->combo.border, style->combo.border_color);\n    }\n    {\n        struct nk_rect content;\n        struct nk_rect button;\n        struct nk_rect bounds;\n\n        enum nk_symbol_type sym;\n        if (ctx->last_widget_state & NK_WIDGET_STATE_HOVER)\n            sym = style->combo.sym_hover;\n        else if (is_clicked)\n            sym = style->combo.sym_active;\n        else sym = style->combo.sym_normal;\n\n        /* calculate button */\n        button.w = header.h - 2 * style->combo.button_padding.y;\n        button.x = (header.x + header.w - header.h) - style->combo.button_padding.x;\n        button.y = header.y + style->combo.button_padding.y;\n        button.h = button.w;\n\n        content.x = button.x + style->combo.button.padding.x;\n        content.y = button.y + style->combo.button.padding.y;\n        content.w = button.w - 2 * style->combo.button.padding.x;\n        content.h = button.h - 2 * style->combo.button.padding.y;\n\n        /* draw color */\n        bounds.h = header.h - 4 * style->combo.content_padding.y;\n        bounds.y = header.y + 2 * style->combo.content_padding.y;\n        bounds.x = header.x + 2 * style->combo.content_padding.x;\n        bounds.w = (button.x - (style->combo.content_padding.x + style->combo.spacing.x)) - bounds.x;\n        nk_fill_rect(&win->buffer, bounds, 0, color);\n\n        /* draw open/close button */\n        nk_draw_button_symbol(&win->buffer, &button, &content, ctx->last_widget_state,\n            &ctx->style.combo.button, sym, style->font);\n    }\n    return nk_combo_begin(ctx, win, size, is_clicked, header);\n}\nNK_API int\nnk_combo_begin_symbol(struct nk_context *ctx, enum nk_symbol_type symbol, struct nk_vec2 size)\n{\n    struct nk_window *win;\n    struct nk_style *style;\n    const struct nk_input *in;\n\n    struct nk_rect header;\n    int is_clicked = nk_false;\n    enum nk_widget_layout_states s;\n    const struct nk_style_item *background;\n    struct nk_color sym_background;\n    struct nk_color symbol_color;\n\n    NK_ASSERT(ctx);\n    NK_ASSERT(ctx->current);\n    NK_ASSERT(ctx->current->layout);\n    if (!ctx || !ctx->current || !ctx->current->layout)\n        return 0;\n\n    win = ctx->current;\n    style = &ctx->style;\n    s = nk_widget(&header, ctx);\n    if (s == NK_WIDGET_INVALID)\n        return 0;\n\n    in = (win->layout->flags & NK_WINDOW_ROM || s == NK_WIDGET_ROM)? 0: &ctx->input;\n    if (nk_button_behavior(&ctx->last_widget_state, header, in, NK_BUTTON_DEFAULT))\n        is_clicked = nk_true;\n\n    /* draw combo box header background and border */\n    if (ctx->last_widget_state & NK_WIDGET_STATE_ACTIVED) {\n        background = &style->combo.active;\n        symbol_color = style->combo.symbol_active;\n    } else if (ctx->last_widget_state & NK_WIDGET_STATE_HOVER) {\n        background = &style->combo.hover;\n        symbol_color = style->combo.symbol_hover;\n    } else {\n        background = &style->combo.normal;\n        symbol_color = style->combo.symbol_hover;\n    }\n\n    if (background->type == NK_STYLE_ITEM_IMAGE) {\n        sym_background = nk_rgba(0,0,0,0);\n        nk_draw_image(&win->buffer, header, &background->data.image, nk_white);\n    } else {\n        sym_background = background->data.color;\n        nk_fill_rect(&win->buffer, header, style->combo.rounding, background->data.color);\n        nk_stroke_rect(&win->buffer, header, style->combo.rounding, style->combo.border, style->combo.border_color);\n    }\n    {\n        struct nk_rect bounds = {0,0,0,0};\n        struct nk_rect content;\n        struct nk_rect button;\n\n        enum nk_symbol_type sym;\n        if (ctx->last_widget_state & NK_WIDGET_STATE_HOVER)\n            sym = style->combo.sym_hover;\n        else if (is_clicked)\n            sym = style->combo.sym_active;\n        else sym = style->combo.sym_normal;\n\n        /* calculate button */\n        button.w = header.h - 2 * style->combo.button_padding.y;\n        button.x = (header.x + header.w - header.h) - style->combo.button_padding.y;\n        button.y = header.y + style->combo.button_padding.y;\n        button.h = button.w;\n\n        content.x = button.x + style->combo.button.padding.x;\n        content.y = button.y + style->combo.button.padding.y;\n        content.w = button.w - 2 * style->combo.button.padding.x;\n        content.h = button.h - 2 * style->combo.button.padding.y;\n\n        /* draw symbol */\n        bounds.h = header.h - 2 * style->combo.content_padding.y;\n        bounds.y = header.y + style->combo.content_padding.y;\n        bounds.x = header.x + style->combo.content_padding.x;\n        bounds.w = (button.x - style->combo.content_padding.y) - bounds.x;\n        nk_draw_symbol(&win->buffer, symbol, bounds, sym_background, symbol_color,\n            1.0f, style->font);\n\n        /* draw open/close button */\n        nk_draw_button_symbol(&win->buffer, &bounds, &content, ctx->last_widget_state,\n            &ctx->style.combo.button, sym, style->font);\n    }\n    return nk_combo_begin(ctx, win, size, is_clicked, header);\n}\nNK_API int\nnk_combo_begin_symbol_text(struct nk_context *ctx, const char *selected, int len,\n    enum nk_symbol_type symbol, struct nk_vec2 size)\n{\n    struct nk_window *win;\n    struct nk_style *style;\n    struct nk_input *in;\n\n    struct nk_rect header;\n    int is_clicked = nk_false;\n    enum nk_widget_layout_states s;\n    const struct nk_style_item *background;\n    struct nk_color symbol_color;\n    struct nk_text text;\n\n    NK_ASSERT(ctx);\n    NK_ASSERT(ctx->current);\n    NK_ASSERT(ctx->current->layout);\n    if (!ctx || !ctx->current || !ctx->current->layout)\n        return 0;\n\n    win = ctx->current;\n    style = &ctx->style;\n    s = nk_widget(&header, ctx);\n    if (!s) return 0;\n\n    in = (win->layout->flags & NK_WINDOW_ROM || s == NK_WIDGET_ROM)? 0: &ctx->input;\n    if (nk_button_behavior(&ctx->last_widget_state, header, in, NK_BUTTON_DEFAULT))\n        is_clicked = nk_true;\n\n    /* draw combo box header background and border */\n    if (ctx->last_widget_state & NK_WIDGET_STATE_ACTIVED) {\n        background = &style->combo.active;\n        symbol_color = style->combo.symbol_active;\n        text.text = style->combo.label_active;\n    } else if (ctx->last_widget_state & NK_WIDGET_STATE_HOVER) {\n        background = &style->combo.hover;\n        symbol_color = style->combo.symbol_hover;\n        text.text = style->combo.label_hover;\n    } else {\n        background = &style->combo.normal;\n        symbol_color = style->combo.symbol_normal;\n        text.text = style->combo.label_normal;\n    }\n    if (background->type == NK_STYLE_ITEM_IMAGE) {\n        text.background = nk_rgba(0,0,0,0);\n        nk_draw_image(&win->buffer, header, &background->data.image, nk_white);\n    } else {\n        text.background = background->data.color;\n        nk_fill_rect(&win->buffer, header, style->combo.rounding, background->data.color);\n        nk_stroke_rect(&win->buffer, header, style->combo.rounding, style->combo.border, style->combo.border_color);\n    }\n    {\n        struct nk_rect content;\n        struct nk_rect button;\n        struct nk_rect label;\n        struct nk_rect image;\n\n        enum nk_symbol_type sym;\n        if (ctx->last_widget_state & NK_WIDGET_STATE_HOVER)\n            sym = style->combo.sym_hover;\n        else if (is_clicked)\n            sym = style->combo.sym_active;\n        else sym = style->combo.sym_normal;\n\n        /* calculate button */\n        button.w = header.h - 2 * style->combo.button_padding.y;\n        button.x = (header.x + header.w - header.h) - style->combo.button_padding.x;\n        button.y = header.y + style->combo.button_padding.y;\n        button.h = button.w;\n\n        content.x = button.x + style->combo.button.padding.x;\n        content.y = button.y + style->combo.button.padding.y;\n        content.w = button.w - 2 * style->combo.button.padding.x;\n        content.h = button.h - 2 * style->combo.button.padding.y;\n        nk_draw_button_symbol(&win->buffer, &button, &content, ctx->last_widget_state,\n            &ctx->style.combo.button, sym, style->font);\n\n        /* draw symbol */\n        image.x = header.x + style->combo.content_padding.x;\n        image.y = header.y + style->combo.content_padding.y;\n        image.h = header.h - 2 * style->combo.content_padding.y;\n        image.w = image.h;\n        nk_draw_symbol(&win->buffer, symbol, image, text.background, symbol_color,\n            1.0f, style->font);\n\n        /* draw label */\n        text.padding = nk_vec2(0,0);\n        label.x = image.x + image.w + style->combo.spacing.x + style->combo.content_padding.x;\n        label.y = header.y + style->combo.content_padding.y;\n        label.w = (button.x - style->combo.content_padding.x) - label.x;\n        label.h = header.h - 2 * style->combo.content_padding.y;\n        nk_widget_text(&win->buffer, label, selected, len, &text, NK_TEXT_LEFT, style->font);\n    }\n    return nk_combo_begin(ctx, win, size, is_clicked, header);\n}\nNK_API int\nnk_combo_begin_image(struct nk_context *ctx, struct nk_image img, struct nk_vec2 size)\n{\n    struct nk_window *win;\n    struct nk_style *style;\n    const struct nk_input *in;\n\n    struct nk_rect header;\n    int is_clicked = nk_false;\n    enum nk_widget_layout_states s;\n    const struct nk_style_item *background;\n\n    NK_ASSERT(ctx);\n    NK_ASSERT(ctx->current);\n    NK_ASSERT(ctx->current->layout);\n    if (!ctx || !ctx->current || !ctx->current->layout)\n        return 0;\n\n    win = ctx->current;\n    style = &ctx->style;\n    s = nk_widget(&header, ctx);\n    if (s == NK_WIDGET_INVALID)\n        return 0;\n\n    in = (win->layout->flags & NK_WINDOW_ROM || s == NK_WIDGET_ROM)? 0: &ctx->input;\n    if (nk_button_behavior(&ctx->last_widget_state, header, in, NK_BUTTON_DEFAULT))\n        is_clicked = nk_true;\n\n    /* draw combo box header background and border */\n    if (ctx->last_widget_state & NK_WIDGET_STATE_ACTIVED)\n        background = &style->combo.active;\n    else if (ctx->last_widget_state & NK_WIDGET_STATE_HOVER)\n        background = &style->combo.hover;\n    else background = &style->combo.normal;\n\n    if (background->type == NK_STYLE_ITEM_IMAGE) {\n        nk_draw_image(&win->buffer, header, &background->data.image, nk_white);\n    } else {\n        nk_fill_rect(&win->buffer, header, style->combo.rounding, background->data.color);\n        nk_stroke_rect(&win->buffer, header, style->combo.rounding, style->combo.border, style->combo.border_color);\n    }\n    {\n        struct nk_rect bounds = {0,0,0,0};\n        struct nk_rect content;\n        struct nk_rect button;\n\n        enum nk_symbol_type sym;\n        if (ctx->last_widget_state & NK_WIDGET_STATE_HOVER)\n            sym = style->combo.sym_hover;\n        else if (is_clicked)\n            sym = style->combo.sym_active;\n        else sym = style->combo.sym_normal;\n\n        /* calculate button */\n        button.w = header.h - 2 * style->combo.button_padding.y;\n        button.x = (header.x + header.w - header.h) - style->combo.button_padding.y;\n        button.y = header.y + style->combo.button_padding.y;\n        button.h = button.w;\n\n        content.x = button.x + style->combo.button.padding.x;\n        content.y = button.y + style->combo.button.padding.y;\n        content.w = button.w - 2 * style->combo.button.padding.x;\n        content.h = button.h - 2 * style->combo.button.padding.y;\n\n        /* draw image */\n        bounds.h = header.h - 2 * style->combo.content_padding.y;\n        bounds.y = header.y + style->combo.content_padding.y;\n        bounds.x = header.x + style->combo.content_padding.x;\n        bounds.w = (button.x - style->combo.content_padding.y) - bounds.x;\n        nk_draw_image(&win->buffer, bounds, &img, nk_white);\n\n        /* draw open/close button */\n        nk_draw_button_symbol(&win->buffer, &bounds, &content, ctx->last_widget_state,\n            &ctx->style.combo.button, sym, style->font);\n    }\n    return nk_combo_begin(ctx, win, size, is_clicked, header);\n}\nNK_API int\nnk_combo_begin_image_text(struct nk_context *ctx, const char *selected, int len,\n    struct nk_image img, struct nk_vec2 size)\n{\n    struct nk_window *win;\n    struct nk_style *style;\n    struct nk_input *in;\n\n    struct nk_rect header;\n    int is_clicked = nk_false;\n    enum nk_widget_layout_states s;\n    const struct nk_style_item *background;\n    struct nk_text text;\n\n    NK_ASSERT(ctx);\n    NK_ASSERT(ctx->current);\n    NK_ASSERT(ctx->current->layout);\n    if (!ctx || !ctx->current || !ctx->current->layout)\n        return 0;\n\n    win = ctx->current;\n    style = &ctx->style;\n    s = nk_widget(&header, ctx);\n    if (!s) return 0;\n\n    in = (win->layout->flags & NK_WINDOW_ROM || s == NK_WIDGET_ROM)? 0: &ctx->input;\n    if (nk_button_behavior(&ctx->last_widget_state, header, in, NK_BUTTON_DEFAULT))\n        is_clicked = nk_true;\n\n    /* draw combo box header background and border */\n    if (ctx->last_widget_state & NK_WIDGET_STATE_ACTIVED) {\n        background = &style->combo.active;\n        text.text = style->combo.label_active;\n    } else if (ctx->last_widget_state & NK_WIDGET_STATE_HOVER) {\n        background = &style->combo.hover;\n        text.text = style->combo.label_hover;\n    } else {\n        background = &style->combo.normal;\n        text.text = style->combo.label_normal;\n    }\n    if (background->type == NK_STYLE_ITEM_IMAGE) {\n        text.background = nk_rgba(0,0,0,0);\n        nk_draw_image(&win->buffer, header, &background->data.image, nk_white);\n    } else {\n        text.background = background->data.color;\n        nk_fill_rect(&win->buffer, header, style->combo.rounding, background->data.color);\n        nk_stroke_rect(&win->buffer, header, style->combo.rounding, style->combo.border, style->combo.border_color);\n    }\n    {\n        struct nk_rect content;\n        struct nk_rect button;\n        struct nk_rect label;\n        struct nk_rect image;\n\n        enum nk_symbol_type sym;\n        if (ctx->last_widget_state & NK_WIDGET_STATE_HOVER)\n            sym = style->combo.sym_hover;\n        else if (is_clicked)\n            sym = style->combo.sym_active;\n        else sym = style->combo.sym_normal;\n\n        /* calculate button */\n        button.w = header.h - 2 * style->combo.button_padding.y;\n        button.x = (header.x + header.w - header.h) - style->combo.button_padding.x;\n        button.y = header.y + style->combo.button_padding.y;\n        button.h = button.w;\n\n        content.x = button.x + style->combo.button.padding.x;\n        content.y = button.y + style->combo.button.padding.y;\n        content.w = button.w - 2 * style->combo.button.padding.x;\n        content.h = button.h - 2 * style->combo.button.padding.y;\n        nk_draw_button_symbol(&win->buffer, &button, &content, ctx->last_widget_state,\n            &ctx->style.combo.button, sym, style->font);\n\n        /* draw image */\n        image.x = header.x + style->combo.content_padding.x;\n        image.y = header.y + style->combo.content_padding.y;\n        image.h = header.h - 2 * style->combo.content_padding.y;\n        image.w = image.h;\n        nk_draw_image(&win->buffer, image, &img, nk_white);\n\n        /* draw label */\n        text.padding = nk_vec2(0,0);\n        label.x = image.x + image.w + style->combo.spacing.x + style->combo.content_padding.x;\n        label.y = header.y + style->combo.content_padding.y;\n        label.w = (button.x - style->combo.content_padding.x) - label.x;\n        label.h = header.h - 2 * style->combo.content_padding.y;\n        nk_widget_text(&win->buffer, label, selected, len, &text, NK_TEXT_LEFT, style->font);\n    }\n    return nk_combo_begin(ctx, win, size, is_clicked, header);\n}\nNK_API int\nnk_combo_begin_symbol_label(struct nk_context *ctx,\n    const char *selected, enum nk_symbol_type type, struct nk_vec2 size)\n{\n    return nk_combo_begin_symbol_text(ctx, selected, nk_strlen(selected), type, size);\n}\nNK_API int\nnk_combo_begin_image_label(struct nk_context *ctx,\n    const char *selected, struct nk_image img, struct nk_vec2 size)\n{\n    return nk_combo_begin_image_text(ctx, selected, nk_strlen(selected), img, size);\n}\nNK_API int\nnk_combo_item_text(struct nk_context *ctx, const char *text, int len,nk_flags align)\n{\n    return nk_contextual_item_text(ctx, text, len, align);\n}\nNK_API int\nnk_combo_item_label(struct nk_context *ctx, const char *label, nk_flags align)\n{\n    return nk_contextual_item_label(ctx, label, align);\n}\nNK_API int\nnk_combo_item_image_text(struct nk_context *ctx, struct nk_image img, const char *text,\n    int len, nk_flags alignment)\n{\n    return nk_contextual_item_image_text(ctx, img, text, len, alignment);\n}\nNK_API int\nnk_combo_item_image_label(struct nk_context *ctx, struct nk_image img,\n    const char *text, nk_flags alignment)\n{\n    return nk_contextual_item_image_label(ctx, img, text, alignment);\n}\nNK_API int\nnk_combo_item_symbol_text(struct nk_context *ctx, enum nk_symbol_type sym,\n    const char *text, int len, nk_flags alignment)\n{\n    return nk_contextual_item_symbol_text(ctx, sym, text, len, alignment);\n}\nNK_API int\nnk_combo_item_symbol_label(struct nk_context *ctx, enum nk_symbol_type sym,\n    const char *label, nk_flags alignment)\n{\n    return nk_contextual_item_symbol_label(ctx, sym, label, alignment);\n}\nNK_API void nk_combo_end(struct nk_context *ctx)\n{\n    nk_contextual_end(ctx);\n}\nNK_API void nk_combo_close(struct nk_context *ctx)\n{\n    nk_contextual_close(ctx);\n}\nNK_API int\nnk_combo(struct nk_context *ctx, const char **items, int count,\n    int selected, int item_height, struct nk_vec2 size)\n{\n    int i = 0;\n    int max_height;\n    struct nk_vec2 item_spacing;\n    struct nk_vec2 window_padding;\n\n    NK_ASSERT(ctx);\n    NK_ASSERT(items);\n    NK_ASSERT(ctx->current);\n    if (!ctx || !items ||!count)\n        return selected;\n\n    item_spacing = ctx->style.window.spacing;\n    window_padding = nk_panel_get_padding(&ctx->style, ctx->current->layout->type);\n    max_height = count * item_height + count * (int)item_spacing.y;\n    max_height += (int)item_spacing.y * 2 + (int)window_padding.y * 2;\n    size.y = NK_MIN(size.y, (float)max_height);\n    if (nk_combo_begin_label(ctx, items[selected], size)) {\n        nk_layout_row_dynamic(ctx, (float)item_height, 1);\n        for (i = 0; i < count; ++i) {\n            if (nk_combo_item_label(ctx, items[i], NK_TEXT_LEFT))\n                selected = i;\n        }\n        nk_combo_end(ctx);\n    }\n    return selected;\n}\nNK_API int\nnk_combo_separator(struct nk_context *ctx, const char *items_separated_by_separator,\n    int separator, int selected, int count, int item_height, struct nk_vec2 size)\n{\n    int i;\n    int max_height;\n    struct nk_vec2 item_spacing;\n    struct nk_vec2 window_padding;\n    const char *current_item;\n    const char *iter;\n    int length = 0;\n\n    NK_ASSERT(ctx);\n    NK_ASSERT(items_separated_by_separator);\n    if (!ctx || !items_separated_by_separator)\n        return selected;\n\n    /* calculate popup window */\n    item_spacing = ctx->style.window.spacing;\n    window_padding = nk_panel_get_padding(&ctx->style, ctx->current->layout->type);\n    max_height = count * item_height + count * (int)item_spacing.y;\n    max_height += (int)item_spacing.y * 2 + (int)window_padding.y * 2;\n    size.y = NK_MIN(size.y, (float)max_height);\n\n    /* find selected item */\n    current_item = items_separated_by_separator;\n    for (i = 0; i < count; ++i) {\n        iter = current_item;\n        while (*iter && *iter != separator) iter++;\n        length = (int)(iter - current_item);\n        if (i == selected) break;\n        current_item = iter + 1;\n    }\n\n    if (nk_combo_begin_text(ctx, current_item, length, size)) {\n        current_item = items_separated_by_separator;\n        nk_layout_row_dynamic(ctx, (float)item_height, 1);\n        for (i = 0; i < count; ++i) {\n            iter = current_item;\n            while (*iter && *iter != separator) iter++;\n            length = (int)(iter - current_item);\n            if (nk_combo_item_text(ctx, current_item, length, NK_TEXT_LEFT))\n                selected = i;\n            current_item = current_item + length + 1;\n        }\n        nk_combo_end(ctx);\n    }\n    return selected;\n}\nNK_API int\nnk_combo_string(struct nk_context *ctx, const char *items_separated_by_zeros,\n    int selected, int count, int item_height, struct nk_vec2 size)\n{\n    return nk_combo_separator(ctx, items_separated_by_zeros, '\\0', selected, count, item_height, size);\n}\nNK_API int\nnk_combo_callback(struct nk_context *ctx, void(*item_getter)(void*, int, const char**),\n    void *userdata, int selected, int count, int item_height, struct nk_vec2 size)\n{\n    int i;\n    int max_height;\n    struct nk_vec2 item_spacing;\n    struct nk_vec2 window_padding;\n    const char *item;\n\n    NK_ASSERT(ctx);\n    NK_ASSERT(item_getter);\n    if (!ctx || !item_getter)\n        return selected;\n\n    /* calculate popup window */\n    item_spacing = ctx->style.window.spacing;\n    window_padding = nk_panel_get_padding(&ctx->style, ctx->current->layout->type);\n    max_height = count * item_height + count * (int)item_spacing.y;\n    max_height += (int)item_spacing.y * 2 + (int)window_padding.y * 2;\n    size.y = NK_MIN(size.y, (float)max_height);\n\n    item_getter(userdata, selected, &item);\n    if (nk_combo_begin_label(ctx, item, size)) {\n        nk_layout_row_dynamic(ctx, (float)item_height, 1);\n        for (i = 0; i < count; ++i) {\n            item_getter(userdata, i, &item);\n            if (nk_combo_item_label(ctx, item, NK_TEXT_LEFT))\n                selected = i;\n        }\n        nk_combo_end(ctx);\n    } return selected;\n}\nNK_API void\nnk_combobox(struct nk_context *ctx, const char **items, int count,\n    int *selected, int item_height, struct nk_vec2 size)\n{\n    *selected = nk_combo(ctx, items, count, *selected, item_height, size);\n}\nNK_API void\nnk_combobox_string(struct nk_context *ctx, const char *items_separated_by_zeros,\n    int *selected, int count, int item_height, struct nk_vec2 size)\n{\n    *selected = nk_combo_string(ctx, items_separated_by_zeros, *selected, count, item_height, size);\n}\nNK_API void\nnk_combobox_separator(struct nk_context *ctx, const char *items_separated_by_separator,\n    int separator,int *selected, int count, int item_height, struct nk_vec2 size)\n{\n    *selected = nk_combo_separator(ctx, items_separated_by_separator, separator,\n                                    *selected, count, item_height, size);\n}\nNK_API void\nnk_combobox_callback(struct nk_context *ctx,\n    void(*item_getter)(void* data, int id, const char **out_text),\n    void *userdata, int *selected, int count, int item_height, struct nk_vec2 size)\n{\n    *selected = nk_combo_callback(ctx, item_getter, userdata,  *selected, count, item_height, size);\n}\n\n\n\n\n\n/* ===============================================================\n *\n *                              TOOLTIP\n *\n * ===============================================================*/\nNK_API int\nnk_tooltip_begin(struct nk_context *ctx, float width)\n{\n    int x,y,w,h;\n    struct nk_window *win;\n    const struct nk_input *in;\n    struct nk_rect bounds;\n    int ret;\n\n    NK_ASSERT(ctx);\n    NK_ASSERT(ctx->current);\n    NK_ASSERT(ctx->current->layout);\n    if (!ctx || !ctx->current || !ctx->current->layout)\n        return 0;\n\n    /* make sure that no nonblocking popup is currently active */\n    win = ctx->current;\n    in = &ctx->input;\n    if (win->popup.win && (win->popup.type & NK_PANEL_SET_NONBLOCK))\n        return 0;\n\n    w = nk_iceilf(width);\n    h = nk_iceilf(nk_null_rect.h);\n    x = nk_ifloorf(in->mouse.pos.x + 1) - (int)win->layout->clip.x;\n    y = nk_ifloorf(in->mouse.pos.y + 1) - (int)win->layout->clip.y;\n\n    bounds.x = (float)x;\n    bounds.y = (float)y;\n    bounds.w = (float)w;\n    bounds.h = (float)h;\n\n    ret = nk_popup_begin(ctx, NK_POPUP_DYNAMIC,\n        \"__##Tooltip##__\", NK_WINDOW_NO_SCROLLBAR|NK_WINDOW_BORDER, bounds);\n    if (ret) win->layout->flags &= ~(nk_flags)NK_WINDOW_ROM;\n    win->popup.type = NK_PANEL_TOOLTIP;\n    ctx->current->layout->type = NK_PANEL_TOOLTIP;\n    return ret;\n}\n\nNK_API void\nnk_tooltip_end(struct nk_context *ctx)\n{\n    NK_ASSERT(ctx);\n    NK_ASSERT(ctx->current);\n    if (!ctx || !ctx->current) return;\n    ctx->current->seq--;\n    nk_popup_close(ctx);\n    nk_popup_end(ctx);\n}\nNK_API void\nnk_tooltip(struct nk_context *ctx, const char *text)\n{\n    const struct nk_style *style;\n    struct nk_vec2 padding;\n\n    int text_len;\n    float text_width;\n    float text_height;\n\n    NK_ASSERT(ctx);\n    NK_ASSERT(ctx->current);\n    NK_ASSERT(ctx->current->layout);\n    NK_ASSERT(text);\n    if (!ctx || !ctx->current || !ctx->current->layout || !text)\n        return;\n\n    /* fetch configuration data */\n    style = &ctx->style;\n    padding = style->window.padding;\n\n    /* calculate size of the text and tooltip */\n    text_len = nk_strlen(text);\n    text_width = style->font->width(style->font->userdata,\n                    style->font->height, text, text_len);\n    text_width += (4 * padding.x);\n    text_height = (style->font->height + 2 * padding.y);\n\n    /* execute tooltip and fill with text */\n    if (nk_tooltip_begin(ctx, (float)text_width)) {\n        nk_layout_row_dynamic(ctx, (float)text_height, 1);\n        nk_text(ctx, text, text_len, NK_TEXT_LEFT);\n        nk_tooltip_end(ctx);\n    }\n}\n#ifdef NK_INCLUDE_STANDARD_VARARGS\nNK_API void\nnk_tooltipf(struct nk_context *ctx, const char *fmt, ...)\n{\n    va_list args;\n    va_start(args, fmt);\n    nk_tooltipfv(ctx, fmt, args);\n    va_end(args);\n}\nNK_API void\nnk_tooltipfv(struct nk_context *ctx, const char *fmt, va_list args)\n{\n    char buf[256];\n    nk_strfmt(buf, NK_LEN(buf), fmt, args);\n    nk_tooltip(ctx, buf);\n}\n#endif\n\n\n\n#endif /* NK_IMPLEMENTATION */\n\n/*\n/// ## License\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~none\n///    ------------------------------------------------------------------------------\n///    This software is available under 2 licenses -- choose whichever you prefer.\n///    ------------------------------------------------------------------------------\n///    ALTERNATIVE A - MIT License\n///    Copyright (c) 2016-2018 Micha Mettke\n///    Permission is hereby granted, free of charge, to any person obtaining a copy of\n///    this software and associated documentation files (the \"Software\"), to deal in\n///    the Software without restriction, including without limitation the rights to\n///    use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\n///    of the Software, and to permit persons to whom the Software is furnished to do\n///    so, subject to the following conditions:\n///    The above copyright notice and this permission notice shall be included in all\n///    copies or substantial portions of the Software.\n///    THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n///    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n///    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n///    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n///    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n///    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n///    SOFTWARE.\n///    ------------------------------------------------------------------------------\n///    ALTERNATIVE B - Public Domain (www.unlicense.org)\n///    This is free and unencumbered software released into the public domain.\n///    Anyone is free to copy, modify, publish, use, compile, sell, or distribute this\n///    software, either in source code form or as a compiled binary, for any purpose,\n///    commercial or non-commercial, and by any means.\n///    In jurisdictions that recognize copyright laws, the author or authors of this\n///    software dedicate any and all copyright interest in the software to the public\n///    domain. We make this dedication for the benefit of the public at large and to\n///    the detriment of our heirs and successors. We intend this dedication to be an\n///    overt act of relinquishment in perpetuity of all present and future rights to\n///    this software under copyright law.\n///    THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n///    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n///    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n///    AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN\n///    ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n///    WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n///    ------------------------------------------------------------------------------\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n/// ## Changelog\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~none\n/// [date][x.yy.zz]-[description]\n/// -[date]: date on which the change has been pushed\n/// -[x.yy.zz]: Numerical version string representation. Each version number on the right\n///             resets back to zero if version on the left is incremented.\n///    - [x]: Major version with API and library breaking changes\n///    - [yy]: Minor version with non-breaking API and library changes\n///    - [zz]: Bug fix version with no direct changes to API\n///\n/// - 2018/04/01 (4.00.1) - Fixed calling `nk_convert` multiple time per single frame\n/// - 2018/04/01 (4.00.0) - BREAKING CHANGE: nk_draw_list_clear no longer tries to\n///                         clear provided buffers. So make sure to either free\n///                         or clear each passed buffer after calling nk_convert.\n/// - 2018/02/23 (3.00.6) - Fixed slider dragging behavior\n/// - 2018/01/31 (3.00.5) - Fixed overcalculation of cursor data in font baking process\n/// - 2018/01/31 (3.00.4) - Removed name collision with stb_truetype\n/// - 2018/01/28 (3.00.3) - Fixed panel window border drawing bug\n/// - 2018/01/12 (3.00.2) - Added `nk_group_begin_titled` for separed group identifier and title\n/// - 2018/01/07 (3.00.1) - Started to change documentation style\n/// - 2018/01/05 (3.00.0) - BREAKING CHANGE: The previous color picker API was broken\n///                        because of conversions between float and byte color representation.\n///                        Color pickers now use floating point values to represent\n///                        HSV values. To get back the old behavior I added some additional\n///                        color conversion functions to cast between nk_color and\n///                        nk_colorf.\n/// - 2017/12/23 (2.00.7) - Fixed small warning\n/// - 2017/12/23 (2.00.7) - Fixed nk_edit_buffer behavior if activated to allow input\n/// - 2017/12/23 (2.00.7) - Fixed modifyable progressbar dragging visuals and input behavior\n/// - 2017/12/04 (2.00.6) - Added formated string tooltip widget\n/// - 2017/11/18 (2.00.5) - Fixed window becoming hidden with flag NK_WINDOW_NO_INPUT\n/// - 2017/11/15 (2.00.4) - Fixed font merging\n/// - 2017/11/07 (2.00.3) - Fixed window size and position modifier functions\n/// - 2017/09/14 (2.00.2) - Fixed nk_edit_buffer and nk_edit_focus behavior\n/// - 2017/09/14 (2.00.1) - Fixed window closing behavior\n/// - 2017/09/14 (2.00.0) - BREAKING CHANGE: Modifing window position and size funtions now\n///                        require the name of the window and must happen outside the window\n///                        building process (between function call nk_begin and nk_end).\n/// - 2017/09/11 (1.40.9) - Fixed window background flag if background window is declared last\n/// - 2017/08/27 (1.40.8) - Fixed `nk_item_is_any_active` for hidden windows\n/// - 2017/08/27 (1.40.7) - Fixed window background flag\n/// - 2017/07/07 (1.40.6) - Fixed missing clipping rect check for hovering/clicked\n///                        query for widgets\n/// - 2017/07/07 (1.40.5) - Fixed drawing bug for vertex output for lines and stroked\n///                        and filled rectangles\n/// - 2017/07/07 (1.40.4) - Fixed bug in nk_convert trying to add windows that are in\n///                        process of being destroyed.\n/// - 2017/07/07 (1.40.3) - Fixed table internal bug caused by storing table size in\n///                        window instead of directly in table.\n/// - 2017/06/30 (1.40.2) - Removed unneeded semicolon in C++ NK_ALIGNOF macro\n/// - 2017/06/30 (1.40.1) - Fixed drawing lines smaller or equal zero\n/// - 2017/06/08 (1.40.0) - Removed the breaking part of last commit. Auto layout now only\n///                        comes in effect if you pass in zero was row height argument\n/// - 2017/06/08 (1.40.0) - BREAKING CHANGE: while not directly API breaking it will change\n///                        how layouting works. From now there will be an internal minimum\n///                        row height derived from font height. If you need a row smaller than\n///                        that you can directly set it by `nk_layout_set_min_row_height` and\n///                        reset the value back by calling `nk_layout_reset_min_row_height.\n/// - 2017/06/08 (1.39.1) - Fixed property text edit handling bug caused by past `nk_widget` fix\n/// - 2017/06/08 (1.39.0) - Added function to retrieve window space without calling a nk_layout_xxx function\n/// - 2017/06/06 (1.38.5) - Fixed `nk_convert` return flag for command buffer\n/// - 2017/05/23 (1.38.4) - Fixed activation behavior for widgets partially clipped\n/// - 2017/05/10 (1.38.3) - Fixed wrong min window size mouse scaling over boundries\n/// - 2017/05/09 (1.38.2) - Fixed vertical scrollbar drawing with not enough space\n/// - 2017/05/09 (1.38.1) - Fixed scaler dragging behavior if window size hits minimum size\n/// - 2017/05/06 (1.38.0) - Added platform double-click support\n/// - 2017/04/20 (1.37.1) - Fixed key repeat found inside glfw demo backends\n/// - 2017/04/20 (1.37.0) - Extended properties with selection and clipbard support\n/// - 2017/04/20 (1.36.2) - Fixed #405 overlapping rows with zero padding and spacing\n/// - 2017/04/09 (1.36.1) - Fixed #403 with another widget float error\n/// - 2017/04/09 (1.36.0) - Added window `NK_WINDOW_NO_INPUT` and `NK_WINDOW_NOT_INTERACTIVE` flags\n/// - 2017/04/09 (1.35.3) - Fixed buffer heap corruption\n/// - 2017/03/25 (1.35.2) - Fixed popup overlapping for `NK_WINDOW_BACKGROUND` windows\n/// - 2017/03/25 (1.35.1) - Fixed windows closing behavior\n/// - 2017/03/18 (1.35.0) - Added horizontal scroll requested in #377\n/// - 2017/03/18 (1.34.3) - Fixed long window header titles\n/// - 2017/03/04 (1.34.2) - Fixed text edit filtering\n/// - 2017/03/04 (1.34.1) - Fixed group closable flag\n/// - 2017/02/25 (1.34.0) - Added custom draw command for better language binding support\n/// - 2017/01/24 (1.33.0) - Added programatic way of remove edit focus\n/// - 2017/01/24 (1.32.3) - Fixed wrong define for basic type definitions for windows\n/// - 2017/01/21 (1.32.2) - Fixed input capture from hidden or closed windows\n/// - 2017/01/21 (1.32.1) - Fixed slider behavior and drawing\n/// - 2017/01/13 (1.32.0) - Added flag to put scaler into the bottom left corner\n/// - 2017/01/13 (1.31.0) - Added additional row layouting method to combine both\n///                        dynamic and static widgets.\n/// - 2016/12/31 (1.30.0) - Extended scrollbar offset from 16-bit to 32-bit\n/// - 2016/12/31 (1.29.2)- Fixed closing window bug of minimized windows\n/// - 2016/12/03 (1.29.1)- Fixed wrapped text with no seperator and C89 error\n/// - 2016/12/03 (1.29.0) - Changed text wrapping to process words not characters\n/// - 2016/11/22 (1.28.6)- Fixed window minimized closing bug\n/// - 2016/11/19 (1.28.5)- Fixed abstract combo box closing behavior\n/// - 2016/11/19 (1.28.4)- Fixed tooltip flickering\n/// - 2016/11/19 (1.28.3)- Fixed memory leak caused by popup repeated closing\n/// - 2016/11/18 (1.28.2)- Fixed memory leak caused by popup panel allocation\n/// - 2016/11/10 (1.28.1)- Fixed some warnings and C++ error\n/// - 2016/11/10 (1.28.0)- Added additional `nk_button` versions which allows to directly\n///                        pass in a style struct to change buttons visual.\n/// - 2016/11/10 (1.27.0)- Added additional 'nk_tree' versions to support external state\n///                        storage. Just like last the `nk_group` commit the main\n///                        advantage is that you optionally can minimize nuklears runtime\n///                        memory consumption or handle hash collisions.\n/// - 2016/11/09 (1.26.0)- Added additional `nk_group` version to support external scrollbar\n///                        offset storage. Main advantage is that you can externalize\n///                        the memory management for the offset. It could also be helpful\n///                        if you have a hash collision in `nk_group_begin` but really\n///                        want the name. In addition I added `nk_list_view` which allows\n///                        to draw big lists inside a group without actually having to\n///                        commit the whole list to nuklear (issue #269).\n/// - 2016/10/30 (1.25.1)- Fixed clipping rectangle bug inside `nk_draw_list`\n/// - 2016/10/29 (1.25.0)- Pulled `nk_panel` memory management into nuklear and out of\n///                        the hands of the user. From now on users don't have to care\n///                        about panels unless they care about some information. If you\n///                        still need the panel just call `nk_window_get_panel`.\n/// - 2016/10/21 (1.24.0)- Changed widget border drawing to stroked rectangle from filled\n///                        rectangle for less overdraw and widget background transparency.\n/// - 2016/10/18 (1.23.0)- Added `nk_edit_focus` for manually edit widget focus control\n/// - 2016/09/29 (1.22.7)- Fixed deduction of basic type in non `<stdint.h>` compilation\n/// - 2016/09/29 (1.22.6)- Fixed edit widget UTF-8 text cursor drawing bug\n/// - 2016/09/28 (1.22.5)- Fixed edit widget UTF-8 text appending/inserting/removing\n/// - 2016/09/28 (1.22.4)- Fixed drawing bug inside edit widgets which offset all text\n///                        text in every edit widget if one of them is scrolled.\n/// - 2016/09/28 (1.22.3)- Fixed small bug in edit widgets if not active. The wrong\n///                        text length is passed. It should have been in bytes but\n///                        was passed as glyphes.\n/// - 2016/09/20 (1.22.2)- Fixed color button size calculation\n/// - 2016/09/20 (1.22.1)- Fixed some `nk_vsnprintf` behavior bugs and removed\n///                        `<stdio.h>` again from `NK_INCLUDE_STANDARD_VARARGS`.\n/// - 2016/09/18 (1.22.0)- C89 does not support vsnprintf only C99 and newer as well\n///                        as C++11 and newer. In addition to use vsnprintf you have\n///                        to include <stdio.h>. So just defining `NK_INCLUDE_STD_VAR_ARGS`\n///                        is not enough. That behavior is now fixed. By default if\n///                        both varargs as well as stdio is selected I try to use\n///                        vsnprintf if not possible I will revert to vsprintf. If\n///                        varargs but not stdio was defined I will use my own function.\n/// - 2016/09/15 (1.21.2)- Fixed panel `close` behavior for deeper panel levels\n/// - 2016/09/15 (1.21.1)- Fixed C++ errors and wrong argument to `nk_panel_get_xxxx`\n/// - 2016/09/13 (1.21.0) - !BREAKING! Fixed nonblocking popup behavior in menu, combo,\n///                        and contextual which prevented closing in y-direction if\n///                        popup did not reach max height.\n///                        In addition the height parameter was changed into vec2\n///                        for width and height to have more control over the popup size.\n/// - 2016/09/13 (1.20.3) - Cleaned up and extended type selection\n/// - 2016/09/13 (1.20.2)- Fixed slider behavior hopefully for the last time. This time\n///                        all calculation are correct so no more hackery.\n/// - 2016/09/13 (1.20.1)- Internal change to divide window/panel flags into panel flags and types.\n///                        Suprisinly spend years in C and still happened to confuse types\n///                        with flags. Probably something to take note.\n/// - 2016/09/08 (1.20.0)- Added additional helper function to make it easier to just\n///                        take the produced buffers from `nk_convert` and unplug the\n///                        iteration process from `nk_context`. So now you can\n///                        just use the vertex,element and command buffer + two pointer\n///                        inside the command buffer retrieved by calls `nk__draw_begin`\n///                        and `nk__draw_end` and macro `nk_draw_foreach_bounded`.\n/// - 2016/09/08 (1.19.0)- Added additional asserts to make sure every `nk_xxx_begin` call\n///                        for windows, popups, combobox, menu and contextual is guarded by\n///                        `if` condition and does not produce false drawing output.\n/// - 2016/09/08 (1.18.0)- Changed confusing name for `NK_SYMBOL_RECT_FILLED`, `NK_SYMBOL_RECT`\n///                        to hopefully easier to understand `NK_SYMBOL_RECT_FILLED` and\n///                        `NK_SYMBOL_RECT_OUTLINE`.\n/// - 2016/09/08 (1.17.0)- Changed confusing name for `NK_SYMBOL_CIRLCE_FILLED`, `NK_SYMBOL_CIRCLE`\n///                        to hopefully easier to understand `NK_SYMBOL_CIRCLE_FILLED` and\n///                        `NK_SYMBOL_CIRCLE_OUTLINE`.\n/// - 2016/09/08 (1.16.0)- Added additional checks to select correct types if `NK_INCLUDE_FIXED_TYPES`\n///                        is not defined by supporting the biggest compiler GCC, clang and MSVC.\n/// - 2016/09/07 (1.15.3)- Fixed `NK_INCLUDE_COMMAND_USERDATA` define to not cause an error\n/// - 2016/09/04 (1.15.2)- Fixed wrong combobox height calculation\n/// - 2016/09/03 (1.15.1)- Fixed gaps inside combo boxes in OpenGL\n/// - 2016/09/02 (1.15.0) - Changed nuklear to not have any default vertex layout and\n///                        instead made it user provided. The range of types to convert\n///                        to is quite limited at the moment, but I would be more than\n///                        happy to accept PRs to add additional.\n/// - 2016/08/30 (1.14.2) - Removed unused variables\n/// - 2016/08/30 (1.14.1) - Fixed C++ build errors\n/// - 2016/08/30 (1.14.0) - Removed mouse dragging from SDL demo since it does not work correctly\n/// - 2016/08/30 (1.13.4) - Tweaked some default styling variables\n/// - 2016/08/30 (1.13.3) - Hopefully fixed drawing bug in slider, in general I would\n///                        refrain from using slider with a big number of steps.\n/// - 2016/08/30 (1.13.2) - Fixed close and minimize button which would fire even if the\n///                        window was in Read Only Mode.\n/// - 2016/08/30 (1.13.1) - Fixed popup panel padding handling which was previously just\n///                        a hack for combo box and menu.\n/// - 2016/08/30 (1.13.0) - Removed `NK_WINDOW_DYNAMIC` flag from public API since\n///                        it is bugged and causes issues in window selection.\n/// - 2016/08/30 (1.12.0) - Removed scaler size. The size of the scaler is now\n///                        determined by the scrollbar size\n/// - 2016/08/30 (1.11.2) - Fixed some drawing bugs caused by changes from 1.11\n/// - 2016/08/30 (1.11.1) - Fixed overlapping minimized window selection\n/// - 2016/08/30 (1.11.0) - Removed some internal complexity and overly complex code\n///                        handling panel padding and panel border.\n/// - 2016/08/29 (1.10.0) - Added additional height parameter to `nk_combobox_xxx`\n/// - 2016/08/29 (1.10.0) - Fixed drawing bug in dynamic popups\n/// - 2016/08/29 (1.10.0) - Added experimental mouse scrolling to popups, menus and comboboxes\n/// - 2016/08/26 (1.10.0) - Added window name string prepresentation to account for\n///                        hash collisions. Currently limited to NK_WINDOW_MAX_NAME\n///                        which in term can be redefined if not big enough.\n/// - 2016/08/26 (1.10.0) - Added stacks for temporary style/UI changes in code\n/// - 2016/08/25 (1.10.0) - Changed `nk_input_is_key_pressed` and 'nk_input_is_key_released'\n///                        to account for key press and release happening in one frame.\n/// - 2016/08/25 (1.10.0) - Added additional nk_edit flag to directly jump to the end on activate\n/// - 2016/08/17 (1.09.6)- Removed invalid check for value zero in nk_propertyx\n/// - 2016/08/16 (1.09.5)- Fixed ROM mode for deeper levels of popup windows parents.\n/// - 2016/08/15 (1.09.4)- Editbox are now still active if enter was pressed with flag\n///                        `NK_EDIT_SIG_ENTER`. Main reasoning is to be able to keep\n///                        typing after commiting.\n/// - 2016/08/15 (1.09.4)- Removed redundant code\n/// - 2016/08/15 (1.09.4)- Fixed negative numbers in `nk_strtoi` and remove unused variable\n/// - 2016/08/15 (1.09.3)- Fixed `NK_WINDOW_BACKGROUND` flag behavior to select a background\n///                        window only as selected by hovering and not by clicking.\n/// - 2016/08/14 (1.09.2)- Fixed a bug in font atlas which caused wrong loading\n///                        of glyphes for font with multiple ranges.\n/// - 2016/08/12 (1.09.1)- Added additional function to check if window is currently\n///                        hidden and therefore not visible.\n/// - 2016/08/12 (1.09.1)- nk_window_is_closed now queries the correct flag `NK_WINDOW_CLOSED`\n///                        instead of the old flag `NK_WINDOW_HIDDEN`\n/// - 2016/08/09 (1.09.0) - Added additional double version to nk_property and changed\n///                        the underlying implementation to not cast to float and instead\n///                        work directly on the given values.\n/// - 2016/08/09 (1.08.0) - Added additional define to overwrite library internal\n///                        floating pointer number to string conversion for additional\n///                        precision.\n/// - 2016/08/09 (1.08.0) - Added additional define to overwrite library internal\n///                        string to floating point number conversion for additional\n///                        precision.\n/// - 2016/08/08 (1.07.2)- Fixed compiling error without define NK_INCLUDE_FIXED_TYPE\n/// - 2016/08/08 (1.07.1)- Fixed possible floating point error inside `nk_widget` leading\n///                        to wrong wiget width calculation which results in widgets falsly\n///                        becomming tagged as not inside window and cannot be accessed.\n/// - 2016/08/08 (1.07.0) - Nuklear now differentiates between hiding a window (NK_WINDOW_HIDDEN) and\n///                        closing a window (NK_WINDOW_CLOSED). A window can be hidden/shown\n///                        by using `nk_window_show` and closed by either clicking the close\n///                        icon in a window or by calling `nk_window_close`. Only closed\n///                        windows get removed at the end of the frame while hidden windows\n///                        remain.\n/// - 2016/08/08 (1.06.0) - Added `nk_edit_string_zero_terminated` as a second option to\n///                        `nk_edit_string` which takes, edits and outputs a '\\0' terminated string.\n/// - 2016/08/08 (1.05.4)- Fixed scrollbar auto hiding behavior\n/// - 2016/08/08 (1.05.3)- Fixed wrong panel padding selection in `nk_layout_widget_space`\n/// - 2016/08/07 (1.05.2)- Fixed old bug in dynamic immediate mode layout API, calculating\n///                        wrong item spacing and panel width.\n///- 2016/08/07 (1.05.1)- Hopefully finally fixed combobox popup drawing bug\n///- 2016/08/07 (1.05.0) - Split varargs away from NK_INCLUDE_STANDARD_IO into own\n///                        define NK_INCLUDE_STANDARD_VARARGS to allow more fine\n///                        grained controlled over library includes.\n/// - 2016/08/06 (1.04.5)- Changed memset calls to NK_MEMSET\n/// - 2016/08/04 (1.04.4)- Fixed fast window scaling behavior\n/// - 2016/08/04 (1.04.3)- Fixed window scaling, movement bug which appears if you\n///                        move/scale a window and another window is behind it.\n///                        If you are fast enough then the window behind gets activated\n///                        and the operation is blocked. I now require activating\n///                        by hovering only if mouse is not pressed.\n/// - 2016/08/04 (1.04.2)- Fixed changing fonts\n/// - 2016/08/03 (1.04.1)- Fixed `NK_WINDOW_BACKGROUND` behavior\n/// - 2016/08/03 (1.04.0) - Added color parameter to `nk_draw_image`\n/// - 2016/08/03 (1.04.0) - Added additional window padding style attributes for\n///                        sub windows (combo, menu, ...)\n/// - 2016/08/03 (1.04.0) - Added functions to show/hide software cursor\n/// - 2016/08/03 (1.04.0) - Added `NK_WINDOW_BACKGROUND` flag to force a window\n///                        to be always in the background of the screen\n/// - 2016/08/03 (1.03.2)- Removed invalid assert macro for NK_RGB color picker\n/// - 2016/08/01 (1.03.1)- Added helper macros into header include guard\n/// - 2016/07/29 (1.03.0) - Moved the window/table pool into the header part to\n///                        simplify memory management by removing the need to\n///                        allocate the pool.\n/// - 2016/07/29 (1.02.0) - Added auto scrollbar hiding window flag which if enabled\n///                        will hide the window scrollbar after NK_SCROLLBAR_HIDING_TIMEOUT\n///                        seconds without window interaction. To make it work\n///                        you have to also set a delta time inside the `nk_context`.\n/// - 2016/07/25 (1.01.1) - Fixed small panel and panel border drawing bugs\n/// - 2016/07/15 (1.01.0) - Added software cursor to `nk_style` and `nk_context`\n/// - 2016/07/15 (1.01.0) - Added const correctness to `nk_buffer_push' data argument\n/// - 2016/07/15 (1.01.0) - Removed internal font baking API and simplified\n///                        font atlas memory management by converting pointer\n///                        arrays for fonts and font configurations to lists.\n/// - 2016/07/15 (1.00.0) - Changed button API to use context dependend button\n///                        behavior instead of passing it for every function call.\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n/// ## Gallery\n/// ![Figure [blue]: Feature overview with blue color styling](https://cloud.githubusercontent.com/assets/8057201/13538240/acd96876-e249-11e5-9547-5ac0b19667a0.png)\n/// ![Figure [red]: Feature overview with red color styling](https://cloud.githubusercontent.com/assets/8057201/13538243/b04acd4c-e249-11e5-8fd2-ad7744a5b446.png)\n/// ![Figure [widgets]: Widget overview](https://cloud.githubusercontent.com/assets/8057201/11282359/3325e3c6-8eff-11e5-86cb-cf02b0596087.png)\n/// ![Figure [blackwhite]: Black and white](https://cloud.githubusercontent.com/assets/8057201/11033668/59ab5d04-86e5-11e5-8091-c56f16411565.png)\n/// ![Figure [filexp]: File explorer](https://cloud.githubusercontent.com/assets/8057201/10718115/02a9ba08-7b6b-11e5-950f-adacdd637739.png)\n/// ![Figure [opengl]: OpenGL Editor](https://cloud.githubusercontent.com/assets/8057201/12779619/2a20d72c-ca69-11e5-95fe-4edecf820d5c.png)\n/// ![Figure [nodedit]: Node Editor](https://cloud.githubusercontent.com/assets/8057201/9976995/e81ac04a-5ef7-11e5-872b-acd54fbeee03.gif)\n/// ![Figure [skinning]: Using skinning in Nuklear](https://cloud.githubusercontent.com/assets/8057201/15991632/76494854-30b8-11e6-9555-a69840d0d50b.png)\n/// ![Figure [bf]: Heavy modified version](https://cloud.githubusercontent.com/assets/8057201/14902576/339926a8-0d9c-11e6-9fee-a8b73af04473.png)\n///\n/// ## Credits\n/// Developed by Micha Mettke and every direct or indirect github contributor. <br /><br />\n///\n/// Embeds [stb_texedit](https://github.com/nothings/stb/blob/master/stb_textedit.h), [stb_truetype](https://github.com/nothings/stb/blob/master/stb_truetype.h) and [stb_rectpack](https://github.com/nothings/stb/blob/master/stb_rect_pack.h) by Sean Barret (public domain) <br />\n/// Uses [stddoc.c](https://github.com/r-lyeh/stddoc.c) from r-lyeh@github.com for documentation generation <br /><br />\n/// Embeds ProggyClean.ttf font by Tristan Grimmer (MIT license). <br />\n///\n/// Big thank you to Omar Cornut (ocornut@github) for his [imgui library](https://github.com/ocornut/imgui) and\n/// giving me the inspiration for this library, Casey Muratori for handmade hero\n/// and his original immediate mode graphical user interface idea and Sean\n/// Barret for his amazing single header libraries which restored my faith\n/// in libraries and brought me to create some of my own. Finally Apoorva Joshi\n/// for his single header file packer.\n*/\n\n"
  },
  {
    "path": "thirdparty/glfw/deps/nuklear_glfw_gl2.h",
    "content": "/*\n * Nuklear - v1.32.0 - public domain\n * no warrenty implied; use at your own risk.\n * authored from 2015-2017 by Micha Mettke\n */\n/*\n * ==============================================================\n *\n *                              API\n *\n * ===============================================================\n */\n#ifndef NK_GLFW_GL2_H_\n#define NK_GLFW_GL2_H_\n\n#include <GLFW/glfw3.h>\n\nenum nk_glfw_init_state{\n    NK_GLFW3_DEFAULT = 0,\n    NK_GLFW3_INSTALL_CALLBACKS\n};\nNK_API struct nk_context*   nk_glfw3_init(GLFWwindow *win, enum nk_glfw_init_state);\nNK_API void                 nk_glfw3_font_stash_begin(struct nk_font_atlas **atlas);\nNK_API void                 nk_glfw3_font_stash_end(void);\n\nNK_API void                 nk_glfw3_new_frame(void);\nNK_API void                 nk_glfw3_render(enum nk_anti_aliasing);\nNK_API void                 nk_glfw3_shutdown(void);\n\nNK_API void                 nk_glfw3_char_callback(GLFWwindow *win, unsigned int codepoint);\nNK_API void                 nk_gflw3_scroll_callback(GLFWwindow *win, double xoff, double yoff);\n\n#endif\n\n/*\n * ==============================================================\n *\n *                          IMPLEMENTATION\n *\n * ===============================================================\n */\n#ifdef NK_GLFW_GL2_IMPLEMENTATION\n\n#ifndef NK_GLFW_TEXT_MAX\n#define NK_GLFW_TEXT_MAX 256\n#endif\n#ifndef NK_GLFW_DOUBLE_CLICK_LO\n#define NK_GLFW_DOUBLE_CLICK_LO 0.02\n#endif\n#ifndef NK_GLFW_DOUBLE_CLICK_HI\n#define NK_GLFW_DOUBLE_CLICK_HI 0.2\n#endif\n\nstruct nk_glfw_device {\n    struct nk_buffer cmds;\n    struct nk_draw_null_texture null;\n    GLuint font_tex;\n};\n\nstruct nk_glfw_vertex {\n    float position[2];\n    float uv[2];\n    nk_byte col[4];\n};\n\nstatic struct nk_glfw {\n    GLFWwindow *win;\n    int width, height;\n    int display_width, display_height;\n    struct nk_glfw_device ogl;\n    struct nk_context ctx;\n    struct nk_font_atlas atlas;\n    struct nk_vec2 fb_scale;\n    unsigned int text[NK_GLFW_TEXT_MAX];\n    int text_len;\n    struct nk_vec2 scroll;\n    double last_button_click;\n    int is_double_click_down;\n    struct nk_vec2 double_click_pos;\n} glfw;\n\nNK_INTERN void\nnk_glfw3_device_upload_atlas(const void *image, int width, int height)\n{\n    struct nk_glfw_device *dev = &glfw.ogl;\n    glGenTextures(1, &dev->font_tex);\n    glBindTexture(GL_TEXTURE_2D, dev->font_tex);\n    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);\n    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);\n    glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, (GLsizei)width, (GLsizei)height, 0,\n                GL_RGBA, GL_UNSIGNED_BYTE, image);\n}\n\nNK_API void\nnk_glfw3_render(enum nk_anti_aliasing AA)\n{\n    /* setup global state */\n    struct nk_glfw_device *dev = &glfw.ogl;\n    glPushAttrib(GL_ENABLE_BIT|GL_COLOR_BUFFER_BIT|GL_TRANSFORM_BIT);\n    glDisable(GL_CULL_FACE);\n    glDisable(GL_DEPTH_TEST);\n    glEnable(GL_SCISSOR_TEST);\n    glEnable(GL_BLEND);\n    glEnable(GL_TEXTURE_2D);\n    glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);\n\n    /* setup viewport/project */\n    glViewport(0,0,(GLsizei)glfw.display_width,(GLsizei)glfw.display_height);\n    glMatrixMode(GL_PROJECTION);\n    glPushMatrix();\n    glLoadIdentity();\n    glOrtho(0.0f, glfw.width, glfw.height, 0.0f, -1.0f, 1.0f);\n    glMatrixMode(GL_MODELVIEW);\n    glPushMatrix();\n    glLoadIdentity();\n\n    glEnableClientState(GL_VERTEX_ARRAY);\n    glEnableClientState(GL_TEXTURE_COORD_ARRAY);\n    glEnableClientState(GL_COLOR_ARRAY);\n    {\n        GLsizei vs = sizeof(struct nk_glfw_vertex);\n        size_t vp = offsetof(struct nk_glfw_vertex, position);\n        size_t vt = offsetof(struct nk_glfw_vertex, uv);\n        size_t vc = offsetof(struct nk_glfw_vertex, col);\n\n        /* convert from command queue into draw list and draw to screen */\n        const struct nk_draw_command *cmd;\n        const nk_draw_index *offset = NULL;\n        struct nk_buffer vbuf, ebuf;\n\n        /* fill convert configuration */\n        struct nk_convert_config config;\n        static const struct nk_draw_vertex_layout_element vertex_layout[] = {\n            {NK_VERTEX_POSITION, NK_FORMAT_FLOAT, NK_OFFSETOF(struct nk_glfw_vertex, position)},\n            {NK_VERTEX_TEXCOORD, NK_FORMAT_FLOAT, NK_OFFSETOF(struct nk_glfw_vertex, uv)},\n            {NK_VERTEX_COLOR, NK_FORMAT_R8G8B8A8, NK_OFFSETOF(struct nk_glfw_vertex, col)},\n            {NK_VERTEX_LAYOUT_END}\n        };\n        NK_MEMSET(&config, 0, sizeof(config));\n        config.vertex_layout = vertex_layout;\n        config.vertex_size = sizeof(struct nk_glfw_vertex);\n        config.vertex_alignment = NK_ALIGNOF(struct nk_glfw_vertex);\n        config.null = dev->null;\n        config.circle_segment_count = 22;\n        config.curve_segment_count = 22;\n        config.arc_segment_count = 22;\n        config.global_alpha = 1.0f;\n        config.shape_AA = AA;\n        config.line_AA = AA;\n\n        /* convert shapes into vertexes */\n        nk_buffer_init_default(&vbuf);\n        nk_buffer_init_default(&ebuf);\n        nk_convert(&glfw.ctx, &dev->cmds, &vbuf, &ebuf, &config);\n\n        /* setup vertex buffer pointer */\n        {const void *vertices = nk_buffer_memory_const(&vbuf);\n        glVertexPointer(2, GL_FLOAT, vs, (const void*)((const nk_byte*)vertices + vp));\n        glTexCoordPointer(2, GL_FLOAT, vs, (const void*)((const nk_byte*)vertices + vt));\n        glColorPointer(4, GL_UNSIGNED_BYTE, vs, (const void*)((const nk_byte*)vertices + vc));}\n\n        /* iterate over and execute each draw command */\n        offset = (const nk_draw_index*)nk_buffer_memory_const(&ebuf);\n        nk_draw_foreach(cmd, &glfw.ctx, &dev->cmds)\n        {\n            if (!cmd->elem_count) continue;\n            glBindTexture(GL_TEXTURE_2D, (GLuint)cmd->texture.id);\n            glScissor(\n                (GLint)(cmd->clip_rect.x * glfw.fb_scale.x),\n                (GLint)((glfw.height - (GLint)(cmd->clip_rect.y + cmd->clip_rect.h)) * glfw.fb_scale.y),\n                (GLint)(cmd->clip_rect.w * glfw.fb_scale.x),\n                (GLint)(cmd->clip_rect.h * glfw.fb_scale.y));\n            glDrawElements(GL_TRIANGLES, (GLsizei)cmd->elem_count, GL_UNSIGNED_SHORT, offset);\n            offset += cmd->elem_count;\n        }\n        nk_clear(&glfw.ctx);\n        nk_buffer_free(&vbuf);\n        nk_buffer_free(&ebuf);\n    }\n\n    /* default OpenGL state */\n    glDisableClientState(GL_VERTEX_ARRAY);\n    glDisableClientState(GL_TEXTURE_COORD_ARRAY);\n    glDisableClientState(GL_COLOR_ARRAY);\n\n    glDisable(GL_CULL_FACE);\n    glDisable(GL_DEPTH_TEST);\n    glDisable(GL_SCISSOR_TEST);\n    glDisable(GL_BLEND);\n    glDisable(GL_TEXTURE_2D);\n\n    glBindTexture(GL_TEXTURE_2D, 0);\n    glMatrixMode(GL_MODELVIEW);\n    glPopMatrix();\n    glMatrixMode(GL_PROJECTION);\n    glPopMatrix();\n    glPopAttrib();\n}\n\nNK_API void\nnk_glfw3_char_callback(GLFWwindow *win, unsigned int codepoint)\n{\n    (void)win;\n    if (glfw.text_len < NK_GLFW_TEXT_MAX)\n        glfw.text[glfw.text_len++] = codepoint;\n}\n\nNK_API void\nnk_gflw3_scroll_callback(GLFWwindow *win, double xoff, double yoff)\n{\n    (void)win; (void)xoff;\n    glfw.scroll.x += (float)xoff;\n    glfw.scroll.y += (float)yoff;\n}\n\nNK_API void\nnk_glfw3_mouse_button_callback(GLFWwindow* window, int button, int action, int mods)\n{\n    double x, y;\n    if (button != GLFW_MOUSE_BUTTON_LEFT) return;\n    glfwGetCursorPos(window, &x, &y);\n    if (action == GLFW_PRESS)  {\n        double dt = glfwGetTime() - glfw.last_button_click;\n        if (dt > NK_GLFW_DOUBLE_CLICK_LO && dt < NK_GLFW_DOUBLE_CLICK_HI) {\n            glfw.is_double_click_down = nk_true;\n            glfw.double_click_pos = nk_vec2((float)x, (float)y);\n        }\n        glfw.last_button_click = glfwGetTime();\n    } else glfw.is_double_click_down = nk_false;\n}\n\nNK_INTERN void\nnk_glfw3_clipbard_paste(nk_handle usr, struct nk_text_edit *edit)\n{\n    const char *text = glfwGetClipboardString(glfw.win);\n    if (text) nk_textedit_paste(edit, text, nk_strlen(text));\n    (void)usr;\n}\n\nNK_INTERN void\nnk_glfw3_clipbard_copy(nk_handle usr, const char *text, int len)\n{\n    char *str = 0;\n    (void)usr;\n    if (!len) return;\n    str = (char*)malloc((size_t)len+1);\n    if (!str) return;\n    NK_MEMCPY(str, text, (size_t)len);\n    str[len] = '\\0';\n    glfwSetClipboardString(glfw.win, str);\n    free(str);\n}\n\nNK_API struct nk_context*\nnk_glfw3_init(GLFWwindow *win, enum nk_glfw_init_state init_state)\n{\n    glfw.win = win;\n    if (init_state == NK_GLFW3_INSTALL_CALLBACKS) {\n        glfwSetScrollCallback(win, nk_gflw3_scroll_callback);\n        glfwSetCharCallback(win, nk_glfw3_char_callback);\n        glfwSetMouseButtonCallback(win, nk_glfw3_mouse_button_callback);\n    }\n    nk_init_default(&glfw.ctx, 0);\n    glfw.ctx.clip.copy = nk_glfw3_clipbard_copy;\n    glfw.ctx.clip.paste = nk_glfw3_clipbard_paste;\n    glfw.ctx.clip.userdata = nk_handle_ptr(0);\n    nk_buffer_init_default(&glfw.ogl.cmds);\n\n    glfw.is_double_click_down = nk_false;\n    glfw.double_click_pos = nk_vec2(0, 0);\n\n    return &glfw.ctx;\n}\n\nNK_API void\nnk_glfw3_font_stash_begin(struct nk_font_atlas **atlas)\n{\n    nk_font_atlas_init_default(&glfw.atlas);\n    nk_font_atlas_begin(&glfw.atlas);\n    *atlas = &glfw.atlas;\n}\n\nNK_API void\nnk_glfw3_font_stash_end(void)\n{\n    const void *image; int w, h;\n    image = nk_font_atlas_bake(&glfw.atlas, &w, &h, NK_FONT_ATLAS_RGBA32);\n    nk_glfw3_device_upload_atlas(image, w, h);\n    nk_font_atlas_end(&glfw.atlas, nk_handle_id((int)glfw.ogl.font_tex), &glfw.ogl.null);\n    if (glfw.atlas.default_font)\n        nk_style_set_font(&glfw.ctx, &glfw.atlas.default_font->handle);\n}\n\nNK_API void\nnk_glfw3_new_frame(void)\n{\n    int i;\n    double x, y;\n    struct nk_context *ctx = &glfw.ctx;\n    struct GLFWwindow *win = glfw.win;\n\n    glfwGetWindowSize(win, &glfw.width, &glfw.height);\n    glfwGetFramebufferSize(win, &glfw.display_width, &glfw.display_height);\n    glfw.fb_scale.x = (float)glfw.display_width/(float)glfw.width;\n    glfw.fb_scale.y = (float)glfw.display_height/(float)glfw.height;\n\n    nk_input_begin(ctx);\n    for (i = 0; i < glfw.text_len; ++i)\n        nk_input_unicode(ctx, glfw.text[i]);\n\n    /* optional grabbing behavior */\n    if (ctx->input.mouse.grab)\n        glfwSetInputMode(glfw.win, GLFW_CURSOR, GLFW_CURSOR_HIDDEN);\n    else if (ctx->input.mouse.ungrab)\n        glfwSetInputMode(glfw.win, GLFW_CURSOR, GLFW_CURSOR_NORMAL);\n\n    nk_input_key(ctx, NK_KEY_DEL, glfwGetKey(win, GLFW_KEY_DELETE) == GLFW_PRESS);\n    nk_input_key(ctx, NK_KEY_ENTER, glfwGetKey(win, GLFW_KEY_ENTER) == GLFW_PRESS);\n    nk_input_key(ctx, NK_KEY_TAB, glfwGetKey(win, GLFW_KEY_TAB) == GLFW_PRESS);\n    nk_input_key(ctx, NK_KEY_BACKSPACE, glfwGetKey(win, GLFW_KEY_BACKSPACE) == GLFW_PRESS);\n    nk_input_key(ctx, NK_KEY_UP, glfwGetKey(win, GLFW_KEY_UP) == GLFW_PRESS);\n    nk_input_key(ctx, NK_KEY_DOWN, glfwGetKey(win, GLFW_KEY_DOWN) == GLFW_PRESS);\n    nk_input_key(ctx, NK_KEY_TEXT_START, glfwGetKey(win, GLFW_KEY_HOME) == GLFW_PRESS);\n    nk_input_key(ctx, NK_KEY_TEXT_END, glfwGetKey(win, GLFW_KEY_END) == GLFW_PRESS);\n    nk_input_key(ctx, NK_KEY_SCROLL_START, glfwGetKey(win, GLFW_KEY_HOME) == GLFW_PRESS);\n    nk_input_key(ctx, NK_KEY_SCROLL_END, glfwGetKey(win, GLFW_KEY_END) == GLFW_PRESS);\n    nk_input_key(ctx, NK_KEY_SCROLL_DOWN, glfwGetKey(win, GLFW_KEY_PAGE_DOWN) == GLFW_PRESS);\n    nk_input_key(ctx, NK_KEY_SCROLL_UP, glfwGetKey(win, GLFW_KEY_PAGE_UP) == GLFW_PRESS);\n    nk_input_key(ctx, NK_KEY_SHIFT, glfwGetKey(win, GLFW_KEY_LEFT_SHIFT) == GLFW_PRESS||\n                                    glfwGetKey(win, GLFW_KEY_RIGHT_SHIFT) == GLFW_PRESS);\n\n    if (glfwGetKey(win, GLFW_KEY_LEFT_CONTROL) == GLFW_PRESS ||\n        glfwGetKey(win, GLFW_KEY_RIGHT_CONTROL) == GLFW_PRESS) {\n        nk_input_key(ctx, NK_KEY_COPY, glfwGetKey(win, GLFW_KEY_C) == GLFW_PRESS);\n        nk_input_key(ctx, NK_KEY_PASTE, glfwGetKey(win, GLFW_KEY_V) == GLFW_PRESS);\n        nk_input_key(ctx, NK_KEY_CUT, glfwGetKey(win, GLFW_KEY_X) == GLFW_PRESS);\n        nk_input_key(ctx, NK_KEY_TEXT_UNDO, glfwGetKey(win, GLFW_KEY_Z) == GLFW_PRESS);\n        nk_input_key(ctx, NK_KEY_TEXT_REDO, glfwGetKey(win, GLFW_KEY_R) == GLFW_PRESS);\n        nk_input_key(ctx, NK_KEY_TEXT_WORD_LEFT, glfwGetKey(win, GLFW_KEY_LEFT) == GLFW_PRESS);\n        nk_input_key(ctx, NK_KEY_TEXT_WORD_RIGHT, glfwGetKey(win, GLFW_KEY_RIGHT) == GLFW_PRESS);\n        nk_input_key(ctx, NK_KEY_TEXT_LINE_START, glfwGetKey(win, GLFW_KEY_B) == GLFW_PRESS);\n        nk_input_key(ctx, NK_KEY_TEXT_LINE_END, glfwGetKey(win, GLFW_KEY_E) == GLFW_PRESS);\n    } else {\n        nk_input_key(ctx, NK_KEY_LEFT, glfwGetKey(win, GLFW_KEY_LEFT) == GLFW_PRESS);\n        nk_input_key(ctx, NK_KEY_RIGHT, glfwGetKey(win, GLFW_KEY_RIGHT) == GLFW_PRESS);\n        nk_input_key(ctx, NK_KEY_COPY, 0);\n        nk_input_key(ctx, NK_KEY_PASTE, 0);\n        nk_input_key(ctx, NK_KEY_CUT, 0);\n        nk_input_key(ctx, NK_KEY_SHIFT, 0);\n    }\n\n    glfwGetCursorPos(win, &x, &y);\n    nk_input_motion(ctx, (int)x, (int)y);\n    if (ctx->input.mouse.grabbed) {\n        glfwSetCursorPos(glfw.win, (double)ctx->input.mouse.prev.x, (double)ctx->input.mouse.prev.y);\n        ctx->input.mouse.pos.x = ctx->input.mouse.prev.x;\n        ctx->input.mouse.pos.y = ctx->input.mouse.prev.y;\n    }\n\n    nk_input_button(ctx, NK_BUTTON_LEFT, (int)x, (int)y, glfwGetMouseButton(win, GLFW_MOUSE_BUTTON_LEFT) == GLFW_PRESS);\n    nk_input_button(ctx, NK_BUTTON_MIDDLE, (int)x, (int)y, glfwGetMouseButton(win, GLFW_MOUSE_BUTTON_MIDDLE) == GLFW_PRESS);\n    nk_input_button(ctx, NK_BUTTON_RIGHT, (int)x, (int)y, glfwGetMouseButton(win, GLFW_MOUSE_BUTTON_RIGHT) == GLFW_PRESS);\n    nk_input_button(ctx, NK_BUTTON_DOUBLE, (int)glfw.double_click_pos.x, (int)glfw.double_click_pos.y, glfw.is_double_click_down);\n    nk_input_scroll(ctx, glfw.scroll);\n    nk_input_end(&glfw.ctx);\n    glfw.text_len = 0;\n    glfw.scroll = nk_vec2(0,0);\n}\n\nNK_API\nvoid nk_glfw3_shutdown(void)\n{\n    struct nk_glfw_device *dev = &glfw.ogl;\n    nk_font_atlas_clear(&glfw.atlas);\n    nk_free(&glfw.ctx);\n    glDeleteTextures(1, &dev->font_tex);\n    nk_buffer_free(&dev->cmds);\n    NK_MEMSET(&glfw, 0, sizeof(glfw));\n}\n\n#endif\n"
  },
  {
    "path": "thirdparty/glfw/deps/stb_image_write.h",
    "content": "/* stb_image_write - v1.02 - public domain - http://nothings.org/stb/stb_image_write.h\n   writes out PNG/BMP/TGA images to C stdio - Sean Barrett 2010-2015\n                                     no warranty implied; use at your own risk\n\n   Before #including,\n\n       #define STB_IMAGE_WRITE_IMPLEMENTATION\n\n   in the file that you want to have the implementation.\n\n   Will probably not work correctly with strict-aliasing optimizations.\n\nABOUT:\n\n   This header file is a library for writing images to C stdio. It could be\n   adapted to write to memory or a general streaming interface; let me know.\n\n   The PNG output is not optimal; it is 20-50% larger than the file\n   written by a decent optimizing implementation. This library is designed\n   for source code compactness and simplicity, not optimal image file size\n   or run-time performance.\n\nBUILDING:\n\n   You can #define STBIW_ASSERT(x) before the #include to avoid using assert.h.\n   You can #define STBIW_MALLOC(), STBIW_REALLOC(), and STBIW_FREE() to replace\n   malloc,realloc,free.\n   You can define STBIW_MEMMOVE() to replace memmove()\n\nUSAGE:\n\n   There are four functions, one for each image file format:\n\n     int stbi_write_png(char const *filename, int w, int h, int comp, const void *data, int stride_in_bytes);\n     int stbi_write_bmp(char const *filename, int w, int h, int comp, const void *data);\n     int stbi_write_tga(char const *filename, int w, int h, int comp, const void *data);\n     int stbi_write_hdr(char const *filename, int w, int h, int comp, const float *data);\n\n   There are also four equivalent functions that use an arbitrary write function. You are\n   expected to open/close your file-equivalent before and after calling these:\n\n     int stbi_write_png_to_func(stbi_write_func *func, void *context, int w, int h, int comp, const void  *data, int stride_in_bytes);\n     int stbi_write_bmp_to_func(stbi_write_func *func, void *context, int w, int h, int comp, const void  *data);\n     int stbi_write_tga_to_func(stbi_write_func *func, void *context, int w, int h, int comp, const void  *data);\n     int stbi_write_hdr_to_func(stbi_write_func *func, void *context, int w, int h, int comp, const float *data);\n\n   where the callback is:\n      void stbi_write_func(void *context, void *data, int size);\n\n   You can define STBI_WRITE_NO_STDIO to disable the file variant of these\n   functions, so the library will not use stdio.h at all. However, this will\n   also disable HDR writing, because it requires stdio for formatted output.\n\n   Each function returns 0 on failure and non-0 on success.\n\n   The functions create an image file defined by the parameters. The image\n   is a rectangle of pixels stored from left-to-right, top-to-bottom.\n   Each pixel contains 'comp' channels of data stored interleaved with 8-bits\n   per channel, in the following order: 1=Y, 2=YA, 3=RGB, 4=RGBA. (Y is\n   monochrome color.) The rectangle is 'w' pixels wide and 'h' pixels tall.\n   The *data pointer points to the first byte of the top-left-most pixel.\n   For PNG, \"stride_in_bytes\" is the distance in bytes from the first byte of\n   a row of pixels to the first byte of the next row of pixels.\n\n   PNG creates output files with the same number of components as the input.\n   The BMP format expands Y to RGB in the file format and does not\n   output alpha.\n\n   PNG supports writing rectangles of data even when the bytes storing rows of\n   data are not consecutive in memory (e.g. sub-rectangles of a larger image),\n   by supplying the stride between the beginning of adjacent rows. The other\n   formats do not. (Thus you cannot write a native-format BMP through the BMP\n   writer, both because it is in BGR order and because it may have padding\n   at the end of the line.)\n\n   HDR expects linear float data. Since the format is always 32-bit rgb(e)\n   data, alpha (if provided) is discarded, and for monochrome data it is\n   replicated across all three channels.\n\n   TGA supports RLE or non-RLE compressed data. To use non-RLE-compressed\n   data, set the global variable 'stbi_write_tga_with_rle' to 0.\n\nCREDITS:\n\n   PNG/BMP/TGA\n      Sean Barrett\n   HDR\n      Baldur Karlsson\n   TGA monochrome:\n      Jean-Sebastien Guay\n   misc enhancements:\n      Tim Kelsey\n   TGA RLE\n      Alan Hickman\n   initial file IO callback implementation\n      Emmanuel Julien\n   bugfixes:\n      github:Chribba\n      Guillaume Chereau\n      github:jry2\n      github:romigrou\n      Sergio Gonzalez\n      Jonas Karlsson\n      Filip Wasil\n      Thatcher Ulrich\n      \nLICENSE\n\nThis software is dual-licensed to the public domain and under the following\nlicense: you are granted a perpetual, irrevocable license to copy, modify,\npublish, and distribute this file as you see fit.\n\n*/\n\n#ifndef INCLUDE_STB_IMAGE_WRITE_H\n#define INCLUDE_STB_IMAGE_WRITE_H\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n#ifdef STB_IMAGE_WRITE_STATIC\n#define STBIWDEF static\n#else\n#define STBIWDEF extern\nextern int stbi_write_tga_with_rle;\n#endif\n\n#ifndef STBI_WRITE_NO_STDIO\nSTBIWDEF int stbi_write_png(char const *filename, int w, int h, int comp, const void  *data, int stride_in_bytes);\nSTBIWDEF int stbi_write_bmp(char const *filename, int w, int h, int comp, const void  *data);\nSTBIWDEF int stbi_write_tga(char const *filename, int w, int h, int comp, const void  *data);\nSTBIWDEF int stbi_write_hdr(char const *filename, int w, int h, int comp, const float *data);\n#endif\n\ntypedef void stbi_write_func(void *context, void *data, int size);\n\nSTBIWDEF int stbi_write_png_to_func(stbi_write_func *func, void *context, int w, int h, int comp, const void  *data, int stride_in_bytes);\nSTBIWDEF int stbi_write_bmp_to_func(stbi_write_func *func, void *context, int w, int h, int comp, const void  *data);\nSTBIWDEF int stbi_write_tga_to_func(stbi_write_func *func, void *context, int w, int h, int comp, const void  *data);\nSTBIWDEF int stbi_write_hdr_to_func(stbi_write_func *func, void *context, int w, int h, int comp, const float *data);\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif//INCLUDE_STB_IMAGE_WRITE_H\n\n#ifdef STB_IMAGE_WRITE_IMPLEMENTATION\n\n#ifdef _WIN32\n   #ifndef _CRT_SECURE_NO_WARNINGS\n   #define _CRT_SECURE_NO_WARNINGS\n   #endif\n   #ifndef _CRT_NONSTDC_NO_DEPRECATE\n   #define _CRT_NONSTDC_NO_DEPRECATE\n   #endif\n#endif\n\n#ifndef STBI_WRITE_NO_STDIO\n#include <stdio.h>\n#endif // STBI_WRITE_NO_STDIO\n\n#include <stdarg.h>\n#include <stdlib.h>\n#include <string.h>\n#include <math.h>\n\n#if defined(STBIW_MALLOC) && defined(STBIW_FREE) && (defined(STBIW_REALLOC) || defined(STBIW_REALLOC_SIZED))\n// ok\n#elif !defined(STBIW_MALLOC) && !defined(STBIW_FREE) && !defined(STBIW_REALLOC) && !defined(STBIW_REALLOC_SIZED)\n// ok\n#else\n#error \"Must define all or none of STBIW_MALLOC, STBIW_FREE, and STBIW_REALLOC (or STBIW_REALLOC_SIZED).\"\n#endif\n\n#ifndef STBIW_MALLOC\n#define STBIW_MALLOC(sz)        malloc(sz)\n#define STBIW_REALLOC(p,newsz)  realloc(p,newsz)\n#define STBIW_FREE(p)           free(p)\n#endif\n\n#ifndef STBIW_REALLOC_SIZED\n#define STBIW_REALLOC_SIZED(p,oldsz,newsz) STBIW_REALLOC(p,newsz)\n#endif\n\n\n#ifndef STBIW_MEMMOVE\n#define STBIW_MEMMOVE(a,b,sz) memmove(a,b,sz)\n#endif\n\n\n#ifndef STBIW_ASSERT\n#include <assert.h>\n#define STBIW_ASSERT(x) assert(x)\n#endif\n\n#define STBIW_UCHAR(x) (unsigned char) ((x) & 0xff)\n\ntypedef struct\n{\n   stbi_write_func *func;\n   void *context;\n} stbi__write_context;\n\n// initialize a callback-based context\nstatic void stbi__start_write_callbacks(stbi__write_context *s, stbi_write_func *c, void *context)\n{\n   s->func    = c;\n   s->context = context;\n}\n\n#ifndef STBI_WRITE_NO_STDIO\n\nstatic void stbi__stdio_write(void *context, void *data, int size)\n{\n   fwrite(data,1,size,(FILE*) context);\n}\n\nstatic int stbi__start_write_file(stbi__write_context *s, const char *filename)\n{\n   FILE *f = fopen(filename, \"wb\");\n   stbi__start_write_callbacks(s, stbi__stdio_write, (void *) f);\n   return f != NULL;\n}\n\nstatic void stbi__end_write_file(stbi__write_context *s)\n{\n   fclose((FILE *)s->context);\n}\n\n#endif // !STBI_WRITE_NO_STDIO\n\ntypedef unsigned int stbiw_uint32;\ntypedef int stb_image_write_test[sizeof(stbiw_uint32)==4 ? 1 : -1];\n\n#ifdef STB_IMAGE_WRITE_STATIC\nstatic int stbi_write_tga_with_rle = 1;\n#else\nint stbi_write_tga_with_rle = 1;\n#endif\n\nstatic void stbiw__writefv(stbi__write_context *s, const char *fmt, va_list v)\n{\n   while (*fmt) {\n      switch (*fmt++) {\n         case ' ': break;\n         case '1': { unsigned char x = STBIW_UCHAR(va_arg(v, int));\n                     s->func(s->context,&x,1);\n                     break; }\n         case '2': { int x = va_arg(v,int);\n                     unsigned char b[2];\n                     b[0] = STBIW_UCHAR(x);\n                     b[1] = STBIW_UCHAR(x>>8);\n                     s->func(s->context,b,2);\n                     break; }\n         case '4': { stbiw_uint32 x = va_arg(v,int);\n                     unsigned char b[4];\n                     b[0]=STBIW_UCHAR(x);\n                     b[1]=STBIW_UCHAR(x>>8);\n                     b[2]=STBIW_UCHAR(x>>16);\n                     b[3]=STBIW_UCHAR(x>>24);\n                     s->func(s->context,b,4);\n                     break; }\n         default:\n            STBIW_ASSERT(0);\n            return;\n      }\n   }\n}\n\nstatic void stbiw__writef(stbi__write_context *s, const char *fmt, ...)\n{\n   va_list v;\n   va_start(v, fmt);\n   stbiw__writefv(s, fmt, v);\n   va_end(v);\n}\n\nstatic void stbiw__write3(stbi__write_context *s, unsigned char a, unsigned char b, unsigned char c)\n{\n   unsigned char arr[3];\n   arr[0] = a, arr[1] = b, arr[2] = c;\n   s->func(s->context, arr, 3);\n}\n\nstatic void stbiw__write_pixel(stbi__write_context *s, int rgb_dir, int comp, int write_alpha, int expand_mono, unsigned char *d)\n{\n   unsigned char bg[3] = { 255, 0, 255}, px[3];\n   int k;\n\n   if (write_alpha < 0)\n      s->func(s->context, &d[comp - 1], 1);\n\n   switch (comp) {\n      case 1:\n         s->func(s->context,d,1);\n         break;\n      case 2:\n         if (expand_mono)\n            stbiw__write3(s, d[0], d[0], d[0]); // monochrome bmp\n         else\n            s->func(s->context, d, 1);  // monochrome TGA\n         break;\n      case 4:\n         if (!write_alpha) {\n            // composite against pink background\n            for (k = 0; k < 3; ++k)\n               px[k] = bg[k] + ((d[k] - bg[k]) * d[3]) / 255;\n            stbiw__write3(s, px[1 - rgb_dir], px[1], px[1 + rgb_dir]);\n            break;\n         }\n         /* FALLTHROUGH */\n      case 3:\n         stbiw__write3(s, d[1 - rgb_dir], d[1], d[1 + rgb_dir]);\n         break;\n   }\n   if (write_alpha > 0)\n      s->func(s->context, &d[comp - 1], 1);\n}\n\nstatic void stbiw__write_pixels(stbi__write_context *s, int rgb_dir, int vdir, int x, int y, int comp, void *data, int write_alpha, int scanline_pad, int expand_mono)\n{\n   stbiw_uint32 zero = 0;\n   int i,j, j_end;\n\n   if (y <= 0)\n      return;\n\n   if (vdir < 0)\n      j_end = -1, j = y-1;\n   else\n      j_end =  y, j = 0;\n\n   for (; j != j_end; j += vdir) {\n      for (i=0; i < x; ++i) {\n         unsigned char *d = (unsigned char *) data + (j*x+i)*comp;\n         stbiw__write_pixel(s, rgb_dir, comp, write_alpha, expand_mono, d);\n      }\n      s->func(s->context, &zero, scanline_pad);\n   }\n}\n\nstatic int stbiw__outfile(stbi__write_context *s, int rgb_dir, int vdir, int x, int y, int comp, int expand_mono, void *data, int alpha, int pad, const char *fmt, ...)\n{\n   if (y < 0 || x < 0) {\n      return 0;\n   } else {\n      va_list v;\n      va_start(v, fmt);\n      stbiw__writefv(s, fmt, v);\n      va_end(v);\n      stbiw__write_pixels(s,rgb_dir,vdir,x,y,comp,data,alpha,pad, expand_mono);\n      return 1;\n   }\n}\n\nstatic int stbi_write_bmp_core(stbi__write_context *s, int x, int y, int comp, const void *data)\n{\n   int pad = (-x*3) & 3;\n   return stbiw__outfile(s,-1,-1,x,y,comp,1,(void *) data,0,pad,\n           \"11 4 22 4\" \"4 44 22 444444\",\n           'B', 'M', 14+40+(x*3+pad)*y, 0,0, 14+40,  // file header\n            40, x,y, 1,24, 0,0,0,0,0,0);             // bitmap header\n}\n\nSTBIWDEF int stbi_write_bmp_to_func(stbi_write_func *func, void *context, int x, int y, int comp, const void *data)\n{\n   stbi__write_context s;\n   stbi__start_write_callbacks(&s, func, context);\n   return stbi_write_bmp_core(&s, x, y, comp, data);\n}\n\n#ifndef STBI_WRITE_NO_STDIO\nSTBIWDEF int stbi_write_bmp(char const *filename, int x, int y, int comp, const void *data)\n{\n   stbi__write_context s;\n   if (stbi__start_write_file(&s,filename)) {\n      int r = stbi_write_bmp_core(&s, x, y, comp, data);\n      stbi__end_write_file(&s);\n      return r;\n   } else\n      return 0;\n}\n#endif //!STBI_WRITE_NO_STDIO\n\nstatic int stbi_write_tga_core(stbi__write_context *s, int x, int y, int comp, void *data)\n{\n   int has_alpha = (comp == 2 || comp == 4);\n   int colorbytes = has_alpha ? comp-1 : comp;\n   int format = colorbytes < 2 ? 3 : 2; // 3 color channels (RGB/RGBA) = 2, 1 color channel (Y/YA) = 3\n\n   if (y < 0 || x < 0)\n      return 0;\n\n   if (!stbi_write_tga_with_rle) {\n      return stbiw__outfile(s, -1, -1, x, y, comp, 0, (void *) data, has_alpha, 0,\n         \"111 221 2222 11\", 0, 0, format, 0, 0, 0, 0, 0, x, y, (colorbytes + has_alpha) * 8, has_alpha * 8);\n   } else {\n      int i,j,k;\n\n      stbiw__writef(s, \"111 221 2222 11\", 0,0,format+8, 0,0,0, 0,0,x,y, (colorbytes + has_alpha) * 8, has_alpha * 8);\n\n      for (j = y - 1; j >= 0; --j) {\n          unsigned char *row = (unsigned char *) data + j * x * comp;\n         int len;\n\n         for (i = 0; i < x; i += len) {\n            unsigned char *begin = row + i * comp;\n            int diff = 1;\n            len = 1;\n\n            if (i < x - 1) {\n               ++len;\n               diff = memcmp(begin, row + (i + 1) * comp, comp);\n               if (diff) {\n                  const unsigned char *prev = begin;\n                  for (k = i + 2; k < x && len < 128; ++k) {\n                     if (memcmp(prev, row + k * comp, comp)) {\n                        prev += comp;\n                        ++len;\n                     } else {\n                        --len;\n                        break;\n                     }\n                  }\n               } else {\n                  for (k = i + 2; k < x && len < 128; ++k) {\n                     if (!memcmp(begin, row + k * comp, comp)) {\n                        ++len;\n                     } else {\n                        break;\n                     }\n                  }\n               }\n            }\n\n            if (diff) {\n               unsigned char header = STBIW_UCHAR(len - 1);\n               s->func(s->context, &header, 1);\n               for (k = 0; k < len; ++k) {\n                  stbiw__write_pixel(s, -1, comp, has_alpha, 0, begin + k * comp);\n               }\n            } else {\n               unsigned char header = STBIW_UCHAR(len - 129);\n               s->func(s->context, &header, 1);\n               stbiw__write_pixel(s, -1, comp, has_alpha, 0, begin);\n            }\n         }\n      }\n   }\n   return 1;\n}\n\nint stbi_write_tga_to_func(stbi_write_func *func, void *context, int x, int y, int comp, const void *data)\n{\n   stbi__write_context s;\n   stbi__start_write_callbacks(&s, func, context);\n   return stbi_write_tga_core(&s, x, y, comp, (void *) data);\n}\n\n#ifndef STBI_WRITE_NO_STDIO\nint stbi_write_tga(char const *filename, int x, int y, int comp, const void *data)\n{\n   stbi__write_context s;\n   if (stbi__start_write_file(&s,filename)) {\n      int r = stbi_write_tga_core(&s, x, y, comp, (void *) data);\n      stbi__end_write_file(&s);\n      return r;\n   } else\n      return 0;\n}\n#endif\n\n// *************************************************************************************************\n// Radiance RGBE HDR writer\n// by Baldur Karlsson\n#ifndef STBI_WRITE_NO_STDIO\n\n#define stbiw__max(a, b)  ((a) > (b) ? (a) : (b))\n\nvoid stbiw__linear_to_rgbe(unsigned char *rgbe, float *linear)\n{\n   int exponent;\n   float maxcomp = stbiw__max(linear[0], stbiw__max(linear[1], linear[2]));\n\n   if (maxcomp < 1e-32f) {\n      rgbe[0] = rgbe[1] = rgbe[2] = rgbe[3] = 0;\n   } else {\n      float normalize = (float) frexp(maxcomp, &exponent) * 256.0f/maxcomp;\n\n      rgbe[0] = (unsigned char)(linear[0] * normalize);\n      rgbe[1] = (unsigned char)(linear[1] * normalize);\n      rgbe[2] = (unsigned char)(linear[2] * normalize);\n      rgbe[3] = (unsigned char)(exponent + 128);\n   }\n}\n\nvoid stbiw__write_run_data(stbi__write_context *s, int length, unsigned char databyte)\n{\n   unsigned char lengthbyte = STBIW_UCHAR(length+128);\n   STBIW_ASSERT(length+128 <= 255);\n   s->func(s->context, &lengthbyte, 1);\n   s->func(s->context, &databyte, 1);\n}\n\nvoid stbiw__write_dump_data(stbi__write_context *s, int length, unsigned char *data)\n{\n   unsigned char lengthbyte = STBIW_UCHAR(length);\n   STBIW_ASSERT(length <= 128); // inconsistent with spec but consistent with official code\n   s->func(s->context, &lengthbyte, 1);\n   s->func(s->context, data, length);\n}\n\nvoid stbiw__write_hdr_scanline(stbi__write_context *s, int width, int ncomp, unsigned char *scratch, float *scanline)\n{\n   unsigned char scanlineheader[4] = { 2, 2, 0, 0 };\n   unsigned char rgbe[4];\n   float linear[3];\n   int x;\n\n   scanlineheader[2] = (width&0xff00)>>8;\n   scanlineheader[3] = (width&0x00ff);\n\n   /* skip RLE for images too small or large */\n   if (width < 8 || width >= 32768) {\n      for (x=0; x < width; x++) {\n         switch (ncomp) {\n            case 4: /* fallthrough */\n            case 3: linear[2] = scanline[x*ncomp + 2];\n                    linear[1] = scanline[x*ncomp + 1];\n                    linear[0] = scanline[x*ncomp + 0];\n                    break;\n            default:\n                    linear[0] = linear[1] = linear[2] = scanline[x*ncomp + 0];\n                    break;\n         }\n         stbiw__linear_to_rgbe(rgbe, linear);\n         s->func(s->context, rgbe, 4);\n      }\n   } else {\n      int c,r;\n      /* encode into scratch buffer */\n      for (x=0; x < width; x++) {\n         switch(ncomp) {\n            case 4: /* fallthrough */\n            case 3: linear[2] = scanline[x*ncomp + 2];\n                    linear[1] = scanline[x*ncomp + 1];\n                    linear[0] = scanline[x*ncomp + 0];\n                    break;\n            default:\n                    linear[0] = linear[1] = linear[2] = scanline[x*ncomp + 0];\n                    break;\n         }\n         stbiw__linear_to_rgbe(rgbe, linear);\n         scratch[x + width*0] = rgbe[0];\n         scratch[x + width*1] = rgbe[1];\n         scratch[x + width*2] = rgbe[2];\n         scratch[x + width*3] = rgbe[3];\n      }\n\n      s->func(s->context, scanlineheader, 4);\n\n      /* RLE each component separately */\n      for (c=0; c < 4; c++) {\n         unsigned char *comp = &scratch[width*c];\n\n         x = 0;\n         while (x < width) {\n            // find first run\n            r = x;\n            while (r+2 < width) {\n               if (comp[r] == comp[r+1] && comp[r] == comp[r+2])\n                  break;\n               ++r;\n            }\n            if (r+2 >= width)\n               r = width;\n            // dump up to first run\n            while (x < r) {\n               int len = r-x;\n               if (len > 128) len = 128;\n               stbiw__write_dump_data(s, len, &comp[x]);\n               x += len;\n            }\n            // if there's a run, output it\n            if (r+2 < width) { // same test as what we break out of in search loop, so only true if we break'd\n               // find next byte after run\n               while (r < width && comp[r] == comp[x])\n                  ++r;\n               // output run up to r\n               while (x < r) {\n                  int len = r-x;\n                  if (len > 127) len = 127;\n                  stbiw__write_run_data(s, len, comp[x]);\n                  x += len;\n               }\n            }\n         }\n      }\n   }\n}\n\nstatic int stbi_write_hdr_core(stbi__write_context *s, int x, int y, int comp, float *data)\n{\n   if (y <= 0 || x <= 0 || data == NULL)\n      return 0;\n   else {\n      // Each component is stored separately. Allocate scratch space for full output scanline.\n      unsigned char *scratch = (unsigned char *) STBIW_MALLOC(x*4);\n      int i, len;\n      char buffer[128];\n      char header[] = \"#?RADIANCE\\n# Written by stb_image_write.h\\nFORMAT=32-bit_rle_rgbe\\n\";\n      s->func(s->context, header, sizeof(header)-1);\n\n      len = sprintf(buffer, \"EXPOSURE=          1.0000000000000\\n\\n-Y %d +X %d\\n\", y, x);\n      s->func(s->context, buffer, len);\n\n      for(i=0; i < y; i++)\n         stbiw__write_hdr_scanline(s, x, comp, scratch, data + comp*i*x);\n      STBIW_FREE(scratch);\n      return 1;\n   }\n}\n\nint stbi_write_hdr_to_func(stbi_write_func *func, void *context, int x, int y, int comp, const float *data)\n{\n   stbi__write_context s;\n   stbi__start_write_callbacks(&s, func, context);\n   return stbi_write_hdr_core(&s, x, y, comp, (float *) data);\n}\n\nint stbi_write_hdr(char const *filename, int x, int y, int comp, const float *data)\n{\n   stbi__write_context s;\n   if (stbi__start_write_file(&s,filename)) {\n      int r = stbi_write_hdr_core(&s, x, y, comp, (float *) data);\n      stbi__end_write_file(&s);\n      return r;\n   } else\n      return 0;\n}\n#endif // STBI_WRITE_NO_STDIO\n\n\n//////////////////////////////////////////////////////////////////////////////\n//\n// PNG writer\n//\n\n// stretchy buffer; stbiw__sbpush() == vector<>::push_back() -- stbiw__sbcount() == vector<>::size()\n#define stbiw__sbraw(a) ((int *) (a) - 2)\n#define stbiw__sbm(a)   stbiw__sbraw(a)[0]\n#define stbiw__sbn(a)   stbiw__sbraw(a)[1]\n\n#define stbiw__sbneedgrow(a,n)  ((a)==0 || stbiw__sbn(a)+n >= stbiw__sbm(a))\n#define stbiw__sbmaybegrow(a,n) (stbiw__sbneedgrow(a,(n)) ? stbiw__sbgrow(a,n) : 0)\n#define stbiw__sbgrow(a,n)  stbiw__sbgrowf((void **) &(a), (n), sizeof(*(a)))\n\n#define stbiw__sbpush(a, v)      (stbiw__sbmaybegrow(a,1), (a)[stbiw__sbn(a)++] = (v))\n#define stbiw__sbcount(a)        ((a) ? stbiw__sbn(a) : 0)\n#define stbiw__sbfree(a)         ((a) ? STBIW_FREE(stbiw__sbraw(a)),0 : 0)\n\nstatic void *stbiw__sbgrowf(void **arr, int increment, int itemsize)\n{\n   int m = *arr ? 2*stbiw__sbm(*arr)+increment : increment+1;\n   void *p = STBIW_REALLOC_SIZED(*arr ? stbiw__sbraw(*arr) : 0, *arr ? (stbiw__sbm(*arr)*itemsize + sizeof(int)*2) : 0, itemsize * m + sizeof(int)*2);\n   STBIW_ASSERT(p);\n   if (p) {\n      if (!*arr) ((int *) p)[1] = 0;\n      *arr = (void *) ((int *) p + 2);\n      stbiw__sbm(*arr) = m;\n   }\n   return *arr;\n}\n\nstatic unsigned char *stbiw__zlib_flushf(unsigned char *data, unsigned int *bitbuffer, int *bitcount)\n{\n   while (*bitcount >= 8) {\n      stbiw__sbpush(data, STBIW_UCHAR(*bitbuffer));\n      *bitbuffer >>= 8;\n      *bitcount -= 8;\n   }\n   return data;\n}\n\nstatic int stbiw__zlib_bitrev(int code, int codebits)\n{\n   int res=0;\n   while (codebits--) {\n      res = (res << 1) | (code & 1);\n      code >>= 1;\n   }\n   return res;\n}\n\nstatic unsigned int stbiw__zlib_countm(unsigned char *a, unsigned char *b, int limit)\n{\n   int i;\n   for (i=0; i < limit && i < 258; ++i)\n      if (a[i] != b[i]) break;\n   return i;\n}\n\nstatic unsigned int stbiw__zhash(unsigned char *data)\n{\n   stbiw_uint32 hash = data[0] + (data[1] << 8) + (data[2] << 16);\n   hash ^= hash << 3;\n   hash += hash >> 5;\n   hash ^= hash << 4;\n   hash += hash >> 17;\n   hash ^= hash << 25;\n   hash += hash >> 6;\n   return hash;\n}\n\n#define stbiw__zlib_flush() (out = stbiw__zlib_flushf(out, &bitbuf, &bitcount))\n#define stbiw__zlib_add(code,codebits) \\\n      (bitbuf |= (code) << bitcount, bitcount += (codebits), stbiw__zlib_flush())\n#define stbiw__zlib_huffa(b,c)  stbiw__zlib_add(stbiw__zlib_bitrev(b,c),c)\n// default huffman tables\n#define stbiw__zlib_huff1(n)  stbiw__zlib_huffa(0x30 + (n), 8)\n#define stbiw__zlib_huff2(n)  stbiw__zlib_huffa(0x190 + (n)-144, 9)\n#define stbiw__zlib_huff3(n)  stbiw__zlib_huffa(0 + (n)-256,7)\n#define stbiw__zlib_huff4(n)  stbiw__zlib_huffa(0xc0 + (n)-280,8)\n#define stbiw__zlib_huff(n)  ((n) <= 143 ? stbiw__zlib_huff1(n) : (n) <= 255 ? stbiw__zlib_huff2(n) : (n) <= 279 ? stbiw__zlib_huff3(n) : stbiw__zlib_huff4(n))\n#define stbiw__zlib_huffb(n) ((n) <= 143 ? stbiw__zlib_huff1(n) : stbiw__zlib_huff2(n))\n\n#define stbiw__ZHASH   16384\n\nunsigned char * stbi_zlib_compress(unsigned char *data, int data_len, int *out_len, int quality)\n{\n   static unsigned short lengthc[] = { 3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258, 259 };\n   static unsigned char  lengtheb[]= { 0,0,0,0,0,0,0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4,  4,  5,  5,  5,  5,  0 };\n   static unsigned short distc[]   = { 1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577, 32768 };\n   static unsigned char  disteb[]  = { 0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13 };\n   unsigned int bitbuf=0;\n   int i,j, bitcount=0;\n   unsigned char *out = NULL;\n   unsigned char ***hash_table = (unsigned char***) STBIW_MALLOC(stbiw__ZHASH * sizeof(char**));\n   if (quality < 5) quality = 5;\n\n   stbiw__sbpush(out, 0x78);   // DEFLATE 32K window\n   stbiw__sbpush(out, 0x5e);   // FLEVEL = 1\n   stbiw__zlib_add(1,1);  // BFINAL = 1\n   stbiw__zlib_add(1,2);  // BTYPE = 1 -- fixed huffman\n\n   for (i=0; i < stbiw__ZHASH; ++i)\n      hash_table[i] = NULL;\n\n   i=0;\n   while (i < data_len-3) {\n      // hash next 3 bytes of data to be compressed\n      int h = stbiw__zhash(data+i)&(stbiw__ZHASH-1), best=3;\n      unsigned char *bestloc = 0;\n      unsigned char **hlist = hash_table[h];\n      int n = stbiw__sbcount(hlist);\n      for (j=0; j < n; ++j) {\n         if (hlist[j]-data > i-32768) { // if entry lies within window\n            int d = stbiw__zlib_countm(hlist[j], data+i, data_len-i);\n            if (d >= best) best=d,bestloc=hlist[j];\n         }\n      }\n      // when hash table entry is too long, delete half the entries\n      if (hash_table[h] && stbiw__sbn(hash_table[h]) == 2*quality) {\n         STBIW_MEMMOVE(hash_table[h], hash_table[h]+quality, sizeof(hash_table[h][0])*quality);\n         stbiw__sbn(hash_table[h]) = quality;\n      }\n      stbiw__sbpush(hash_table[h],data+i);\n\n      if (bestloc) {\n         // \"lazy matching\" - check match at *next* byte, and if it's better, do cur byte as literal\n         h = stbiw__zhash(data+i+1)&(stbiw__ZHASH-1);\n         hlist = hash_table[h];\n         n = stbiw__sbcount(hlist);\n         for (j=0; j < n; ++j) {\n            if (hlist[j]-data > i-32767) {\n               int e = stbiw__zlib_countm(hlist[j], data+i+1, data_len-i-1);\n               if (e > best) { // if next match is better, bail on current match\n                  bestloc = NULL;\n                  break;\n               }\n            }\n         }\n      }\n\n      if (bestloc) {\n         int d = (int) (data+i - bestloc); // distance back\n         STBIW_ASSERT(d <= 32767 && best <= 258);\n         for (j=0; best > lengthc[j+1]-1; ++j);\n         stbiw__zlib_huff(j+257);\n         if (lengtheb[j]) stbiw__zlib_add(best - lengthc[j], lengtheb[j]);\n         for (j=0; d > distc[j+1]-1; ++j);\n         stbiw__zlib_add(stbiw__zlib_bitrev(j,5),5);\n         if (disteb[j]) stbiw__zlib_add(d - distc[j], disteb[j]);\n         i += best;\n      } else {\n         stbiw__zlib_huffb(data[i]);\n         ++i;\n      }\n   }\n   // write out final bytes\n   for (;i < data_len; ++i)\n      stbiw__zlib_huffb(data[i]);\n   stbiw__zlib_huff(256); // end of block\n   // pad with 0 bits to byte boundary\n   while (bitcount)\n      stbiw__zlib_add(0,1);\n\n   for (i=0; i < stbiw__ZHASH; ++i)\n      (void) stbiw__sbfree(hash_table[i]);\n   STBIW_FREE(hash_table);\n\n   {\n      // compute adler32 on input\n      unsigned int s1=1, s2=0;\n      int blocklen = (int) (data_len % 5552);\n      j=0;\n      while (j < data_len) {\n         for (i=0; i < blocklen; ++i) s1 += data[j+i], s2 += s1;\n         s1 %= 65521, s2 %= 65521;\n         j += blocklen;\n         blocklen = 5552;\n      }\n      stbiw__sbpush(out, STBIW_UCHAR(s2 >> 8));\n      stbiw__sbpush(out, STBIW_UCHAR(s2));\n      stbiw__sbpush(out, STBIW_UCHAR(s1 >> 8));\n      stbiw__sbpush(out, STBIW_UCHAR(s1));\n   }\n   *out_len = stbiw__sbn(out);\n   // make returned pointer freeable\n   STBIW_MEMMOVE(stbiw__sbraw(out), out, *out_len);\n   return (unsigned char *) stbiw__sbraw(out);\n}\n\nstatic unsigned int stbiw__crc32(unsigned char *buffer, int len)\n{\n   static unsigned int crc_table[256] =\n   {\n      0x00000000, 0x77073096, 0xEE0E612C, 0x990951BA, 0x076DC419, 0x706AF48F, 0xE963A535, 0x9E6495A3,\n      0x0eDB8832, 0x79DCB8A4, 0xE0D5E91E, 0x97D2D988, 0x09B64C2B, 0x7EB17CBD, 0xE7B82D07, 0x90BF1D91,\n      0x1DB71064, 0x6AB020F2, 0xF3B97148, 0x84BE41DE, 0x1ADAD47D, 0x6DDDE4EB, 0xF4D4B551, 0x83D385C7,\n      0x136C9856, 0x646BA8C0, 0xFD62F97A, 0x8A65C9EC, 0x14015C4F, 0x63066CD9, 0xFA0F3D63, 0x8D080DF5,\n      0x3B6E20C8, 0x4C69105E, 0xD56041E4, 0xA2677172, 0x3C03E4D1, 0x4B04D447, 0xD20D85FD, 0xA50AB56B,\n      0x35B5A8FA, 0x42B2986C, 0xDBBBC9D6, 0xACBCF940, 0x32D86CE3, 0x45DF5C75, 0xDCD60DCF, 0xABD13D59,\n      0x26D930AC, 0x51DE003A, 0xC8D75180, 0xBFD06116, 0x21B4F4B5, 0x56B3C423, 0xCFBA9599, 0xB8BDA50F,\n      0x2802B89E, 0x5F058808, 0xC60CD9B2, 0xB10BE924, 0x2F6F7C87, 0x58684C11, 0xC1611DAB, 0xB6662D3D,\n      0x76DC4190, 0x01DB7106, 0x98D220BC, 0xEFD5102A, 0x71B18589, 0x06B6B51F, 0x9FBFE4A5, 0xE8B8D433,\n      0x7807C9A2, 0x0F00F934, 0x9609A88E, 0xE10E9818, 0x7F6A0DBB, 0x086D3D2D, 0x91646C97, 0xE6635C01,\n      0x6B6B51F4, 0x1C6C6162, 0x856530D8, 0xF262004E, 0x6C0695ED, 0x1B01A57B, 0x8208F4C1, 0xF50FC457,\n      0x65B0D9C6, 0x12B7E950, 0x8BBEB8EA, 0xFCB9887C, 0x62DD1DDF, 0x15DA2D49, 0x8CD37CF3, 0xFBD44C65,\n      0x4DB26158, 0x3AB551CE, 0xA3BC0074, 0xD4BB30E2, 0x4ADFA541, 0x3DD895D7, 0xA4D1C46D, 0xD3D6F4FB,\n      0x4369E96A, 0x346ED9FC, 0xAD678846, 0xDA60B8D0, 0x44042D73, 0x33031DE5, 0xAA0A4C5F, 0xDD0D7CC9,\n      0x5005713C, 0x270241AA, 0xBE0B1010, 0xC90C2086, 0x5768B525, 0x206F85B3, 0xB966D409, 0xCE61E49F,\n      0x5EDEF90E, 0x29D9C998, 0xB0D09822, 0xC7D7A8B4, 0x59B33D17, 0x2EB40D81, 0xB7BD5C3B, 0xC0BA6CAD,\n      0xEDB88320, 0x9ABFB3B6, 0x03B6E20C, 0x74B1D29A, 0xEAD54739, 0x9DD277AF, 0x04DB2615, 0x73DC1683,\n      0xE3630B12, 0x94643B84, 0x0D6D6A3E, 0x7A6A5AA8, 0xE40ECF0B, 0x9309FF9D, 0x0A00AE27, 0x7D079EB1,\n      0xF00F9344, 0x8708A3D2, 0x1E01F268, 0x6906C2FE, 0xF762575D, 0x806567CB, 0x196C3671, 0x6E6B06E7,\n      0xFED41B76, 0x89D32BE0, 0x10DA7A5A, 0x67DD4ACC, 0xF9B9DF6F, 0x8EBEEFF9, 0x17B7BE43, 0x60B08ED5,\n      0xD6D6A3E8, 0xA1D1937E, 0x38D8C2C4, 0x4FDFF252, 0xD1BB67F1, 0xA6BC5767, 0x3FB506DD, 0x48B2364B,\n      0xD80D2BDA, 0xAF0A1B4C, 0x36034AF6, 0x41047A60, 0xDF60EFC3, 0xA867DF55, 0x316E8EEF, 0x4669BE79,\n      0xCB61B38C, 0xBC66831A, 0x256FD2A0, 0x5268E236, 0xCC0C7795, 0xBB0B4703, 0x220216B9, 0x5505262F,\n      0xC5BA3BBE, 0xB2BD0B28, 0x2BB45A92, 0x5CB36A04, 0xC2D7FFA7, 0xB5D0CF31, 0x2CD99E8B, 0x5BDEAE1D,\n      0x9B64C2B0, 0xEC63F226, 0x756AA39C, 0x026D930A, 0x9C0906A9, 0xEB0E363F, 0x72076785, 0x05005713,\n      0x95BF4A82, 0xE2B87A14, 0x7BB12BAE, 0x0CB61B38, 0x92D28E9B, 0xE5D5BE0D, 0x7CDCEFB7, 0x0BDBDF21,\n      0x86D3D2D4, 0xF1D4E242, 0x68DDB3F8, 0x1FDA836E, 0x81BE16CD, 0xF6B9265B, 0x6FB077E1, 0x18B74777,\n      0x88085AE6, 0xFF0F6A70, 0x66063BCA, 0x11010B5C, 0x8F659EFF, 0xF862AE69, 0x616BFFD3, 0x166CCF45,\n      0xA00AE278, 0xD70DD2EE, 0x4E048354, 0x3903B3C2, 0xA7672661, 0xD06016F7, 0x4969474D, 0x3E6E77DB,\n      0xAED16A4A, 0xD9D65ADC, 0x40DF0B66, 0x37D83BF0, 0xA9BCAE53, 0xDEBB9EC5, 0x47B2CF7F, 0x30B5FFE9,\n      0xBDBDF21C, 0xCABAC28A, 0x53B39330, 0x24B4A3A6, 0xBAD03605, 0xCDD70693, 0x54DE5729, 0x23D967BF,\n      0xB3667A2E, 0xC4614AB8, 0x5D681B02, 0x2A6F2B94, 0xB40BBE37, 0xC30C8EA1, 0x5A05DF1B, 0x2D02EF8D\n   };\n\n   unsigned int crc = ~0u;\n   int i;\n   for (i=0; i < len; ++i)\n      crc = (crc >> 8) ^ crc_table[buffer[i] ^ (crc & 0xff)];\n   return ~crc;\n}\n\n#define stbiw__wpng4(o,a,b,c,d) ((o)[0]=STBIW_UCHAR(a),(o)[1]=STBIW_UCHAR(b),(o)[2]=STBIW_UCHAR(c),(o)[3]=STBIW_UCHAR(d),(o)+=4)\n#define stbiw__wp32(data,v) stbiw__wpng4(data, (v)>>24,(v)>>16,(v)>>8,(v));\n#define stbiw__wptag(data,s) stbiw__wpng4(data, s[0],s[1],s[2],s[3])\n\nstatic void stbiw__wpcrc(unsigned char **data, int len)\n{\n   unsigned int crc = stbiw__crc32(*data - len - 4, len+4);\n   stbiw__wp32(*data, crc);\n}\n\nstatic unsigned char stbiw__paeth(int a, int b, int c)\n{\n   int p = a + b - c, pa = abs(p-a), pb = abs(p-b), pc = abs(p-c);\n   if (pa <= pb && pa <= pc) return STBIW_UCHAR(a);\n   if (pb <= pc) return STBIW_UCHAR(b);\n   return STBIW_UCHAR(c);\n}\n\nunsigned char *stbi_write_png_to_mem(unsigned char *pixels, int stride_bytes, int x, int y, int n, int *out_len)\n{\n   int ctype[5] = { -1, 0, 4, 2, 6 };\n   unsigned char sig[8] = { 137,80,78,71,13,10,26,10 };\n   unsigned char *out,*o, *filt, *zlib;\n   signed char *line_buffer;\n   int i,j,k,p,zlen;\n\n   if (stride_bytes == 0)\n      stride_bytes = x * n;\n\n   filt = (unsigned char *) STBIW_MALLOC((x*n+1) * y); if (!filt) return 0;\n   line_buffer = (signed char *) STBIW_MALLOC(x * n); if (!line_buffer) { STBIW_FREE(filt); return 0; }\n   for (j=0; j < y; ++j) {\n      static int mapping[] = { 0,1,2,3,4 };\n      static int firstmap[] = { 0,1,0,5,6 };\n      int *mymap = j ? mapping : firstmap;\n      int best = 0, bestval = 0x7fffffff;\n      for (p=0; p < 2; ++p) {\n         for (k= p?best:0; k < 5; ++k) {\n            int type = mymap[k],est=0;\n            unsigned char *z = pixels + stride_bytes*j;\n            for (i=0; i < n; ++i)\n               switch (type) {\n                  case 0: line_buffer[i] = z[i]; break;\n                  case 1: line_buffer[i] = z[i]; break;\n                  case 2: line_buffer[i] = z[i] - z[i-stride_bytes]; break;\n                  case 3: line_buffer[i] = z[i] - (z[i-stride_bytes]>>1); break;\n                  case 4: line_buffer[i] = (signed char) (z[i] - stbiw__paeth(0,z[i-stride_bytes],0)); break;\n                  case 5: line_buffer[i] = z[i]; break;\n                  case 6: line_buffer[i] = z[i]; break;\n               }\n            for (i=n; i < x*n; ++i) {\n               switch (type) {\n                  case 0: line_buffer[i] = z[i]; break;\n                  case 1: line_buffer[i] = z[i] - z[i-n]; break;\n                  case 2: line_buffer[i] = z[i] - z[i-stride_bytes]; break;\n                  case 3: line_buffer[i] = z[i] - ((z[i-n] + z[i-stride_bytes])>>1); break;\n                  case 4: line_buffer[i] = z[i] - stbiw__paeth(z[i-n], z[i-stride_bytes], z[i-stride_bytes-n]); break;\n                  case 5: line_buffer[i] = z[i] - (z[i-n]>>1); break;\n                  case 6: line_buffer[i] = z[i] - stbiw__paeth(z[i-n], 0,0); break;\n               }\n            }\n            if (p) break;\n            for (i=0; i < x*n; ++i)\n               est += abs((signed char) line_buffer[i]);\n            if (est < bestval) { bestval = est; best = k; }\n         }\n      }\n      // when we get here, best contains the filter type, and line_buffer contains the data\n      filt[j*(x*n+1)] = (unsigned char) best;\n      STBIW_MEMMOVE(filt+j*(x*n+1)+1, line_buffer, x*n);\n   }\n   STBIW_FREE(line_buffer);\n   zlib = stbi_zlib_compress(filt, y*( x*n+1), &zlen, 8); // increase 8 to get smaller but use more memory\n   STBIW_FREE(filt);\n   if (!zlib) return 0;\n\n   // each tag requires 12 bytes of overhead\n   out = (unsigned char *) STBIW_MALLOC(8 + 12+13 + 12+zlen + 12);\n   if (!out) return 0;\n   *out_len = 8 + 12+13 + 12+zlen + 12;\n\n   o=out;\n   STBIW_MEMMOVE(o,sig,8); o+= 8;\n   stbiw__wp32(o, 13); // header length\n   stbiw__wptag(o, \"IHDR\");\n   stbiw__wp32(o, x);\n   stbiw__wp32(o, y);\n   *o++ = 8;\n   *o++ = STBIW_UCHAR(ctype[n]);\n   *o++ = 0;\n   *o++ = 0;\n   *o++ = 0;\n   stbiw__wpcrc(&o,13);\n\n   stbiw__wp32(o, zlen);\n   stbiw__wptag(o, \"IDAT\");\n   STBIW_MEMMOVE(o, zlib, zlen);\n   o += zlen;\n   STBIW_FREE(zlib);\n   stbiw__wpcrc(&o, zlen);\n\n   stbiw__wp32(o,0);\n   stbiw__wptag(o, \"IEND\");\n   stbiw__wpcrc(&o,0);\n\n   STBIW_ASSERT(o == out + *out_len);\n\n   return out;\n}\n\n#ifndef STBI_WRITE_NO_STDIO\nSTBIWDEF int stbi_write_png(char const *filename, int x, int y, int comp, const void *data, int stride_bytes)\n{\n   FILE *f;\n   int len;\n   unsigned char *png = stbi_write_png_to_mem((unsigned char *) data, stride_bytes, x, y, comp, &len);\n   if (png == NULL) return 0;\n   f = fopen(filename, \"wb\");\n   if (!f) { STBIW_FREE(png); return 0; }\n   fwrite(png, 1, len, f);\n   fclose(f);\n   STBIW_FREE(png);\n   return 1;\n}\n#endif\n\nSTBIWDEF int stbi_write_png_to_func(stbi_write_func *func, void *context, int x, int y, int comp, const void *data, int stride_bytes)\n{\n   int len;\n   unsigned char *png = stbi_write_png_to_mem((unsigned char *) data, stride_bytes, x, y, comp, &len);\n   if (png == NULL) return 0;\n   func(context, png, len);\n   STBIW_FREE(png);\n   return 1;\n}\n\n#endif // STB_IMAGE_WRITE_IMPLEMENTATION\n\n/* Revision history\n      1.02 (2016-04-02)\n             avoid allocating large structures on the stack\n      1.01 (2016-01-16)\n             STBIW_REALLOC_SIZED: support allocators with no realloc support\n             avoid race-condition in crc initialization\n             minor compile issues\n      1.00 (2015-09-14)\n             installable file IO function\n      0.99 (2015-09-13)\n             warning fixes; TGA rle support\n      0.98 (2015-04-08)\n             added STBIW_MALLOC, STBIW_ASSERT etc\n      0.97 (2015-01-18)\n             fixed HDR asserts, rewrote HDR rle logic\n      0.96 (2015-01-17)\n             add HDR output\n             fix monochrome BMP\n      0.95 (2014-08-17)\n\t\t       add monochrome TGA output\n      0.94 (2014-05-31)\n             rename private functions to avoid conflicts with stb_image.h\n      0.93 (2014-05-27)\n             warning fixes\n      0.92 (2010-08-01)\n             casts to unsigned char to fix warnings\n      0.91 (2010-07-17)\n             first public release\n      0.90   first internal release\n*/\n"
  },
  {
    "path": "thirdparty/glfw/deps/tinycthread.c",
    "content": "/* -*- mode: c; tab-width: 2; indent-tabs-mode: nil; -*-\nCopyright (c) 2012 Marcus Geelnard\n\nThis software is provided 'as-is', without any express or implied\nwarranty. In no event will the authors be held liable for any damages\narising from the use of this software.\n\nPermission is granted to anyone to use this software for any purpose,\nincluding commercial applications, and to alter it and redistribute it\nfreely, subject to the following restrictions:\n\n    1. The origin of this software must not be misrepresented; you must not\n    claim that you wrote the original software. If you use this software\n    in a product, an acknowledgment in the product documentation would be\n    appreciated but is not required.\n\n    2. Altered source versions must be plainly marked as such, and must not be\n    misrepresented as being the original software.\n\n    3. This notice may not be removed or altered from any source\n    distribution.\n*/\n\n/* 2013-01-06 Camilla Löwy <elmindreda@glfw.org>\n *\n * Added casts from time_t to DWORD to avoid warnings on VC++.\n * Fixed time retrieval on POSIX systems.\n */\n\n#include \"tinycthread.h\"\n#include <stdlib.h>\n\n/* Platform specific includes */\n#if defined(_TTHREAD_POSIX_)\n  #include <signal.h>\n  #include <sched.h>\n  #include <unistd.h>\n  #include <sys/time.h>\n  #include <errno.h>\n#elif defined(_TTHREAD_WIN32_)\n  #include <process.h>\n  #include <sys/timeb.h>\n#endif\n\n/* Standard, good-to-have defines */\n#ifndef NULL\n  #define NULL (void*)0\n#endif\n#ifndef TRUE\n  #define TRUE 1\n#endif\n#ifndef FALSE\n  #define FALSE 0\n#endif\n\nint mtx_init(mtx_t *mtx, int type)\n{\n#if defined(_TTHREAD_WIN32_)\n  mtx->mAlreadyLocked = FALSE;\n  mtx->mRecursive = type & mtx_recursive;\n  InitializeCriticalSection(&mtx->mHandle);\n  return thrd_success;\n#else\n  int ret;\n  pthread_mutexattr_t attr;\n  pthread_mutexattr_init(&attr);\n  if (type & mtx_recursive)\n  {\n    pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);\n  }\n  ret = pthread_mutex_init(mtx, &attr);\n  pthread_mutexattr_destroy(&attr);\n  return ret == 0 ? thrd_success : thrd_error;\n#endif\n}\n\nvoid mtx_destroy(mtx_t *mtx)\n{\n#if defined(_TTHREAD_WIN32_)\n  DeleteCriticalSection(&mtx->mHandle);\n#else\n  pthread_mutex_destroy(mtx);\n#endif\n}\n\nint mtx_lock(mtx_t *mtx)\n{\n#if defined(_TTHREAD_WIN32_)\n  EnterCriticalSection(&mtx->mHandle);\n  if (!mtx->mRecursive)\n  {\n    while(mtx->mAlreadyLocked) Sleep(1000); /* Simulate deadlock... */\n    mtx->mAlreadyLocked = TRUE;\n  }\n  return thrd_success;\n#else\n  return pthread_mutex_lock(mtx) == 0 ? thrd_success : thrd_error;\n#endif\n}\n\nint mtx_timedlock(mtx_t *mtx, const struct timespec *ts)\n{\n  /* FIXME! */\n  (void)mtx;\n  (void)ts;\n  return thrd_error;\n}\n\nint mtx_trylock(mtx_t *mtx)\n{\n#if defined(_TTHREAD_WIN32_)\n  int ret = TryEnterCriticalSection(&mtx->mHandle) ? thrd_success : thrd_busy;\n  if ((!mtx->mRecursive) && (ret == thrd_success) && mtx->mAlreadyLocked)\n  {\n    LeaveCriticalSection(&mtx->mHandle);\n    ret = thrd_busy;\n  }\n  return ret;\n#else\n  return (pthread_mutex_trylock(mtx) == 0) ? thrd_success : thrd_busy;\n#endif\n}\n\nint mtx_unlock(mtx_t *mtx)\n{\n#if defined(_TTHREAD_WIN32_)\n  mtx->mAlreadyLocked = FALSE;\n  LeaveCriticalSection(&mtx->mHandle);\n  return thrd_success;\n#else\n  return pthread_mutex_unlock(mtx) == 0 ? thrd_success : thrd_error;;\n#endif\n}\n\n#if defined(_TTHREAD_WIN32_)\n#define _CONDITION_EVENT_ONE 0\n#define _CONDITION_EVENT_ALL 1\n#endif\n\nint cnd_init(cnd_t *cond)\n{\n#if defined(_TTHREAD_WIN32_)\n  cond->mWaitersCount = 0;\n\n  /* Init critical section */\n  InitializeCriticalSection(&cond->mWaitersCountLock);\n\n  /* Init events */\n  cond->mEvents[_CONDITION_EVENT_ONE] = CreateEvent(NULL, FALSE, FALSE, NULL);\n  if (cond->mEvents[_CONDITION_EVENT_ONE] == NULL)\n  {\n    cond->mEvents[_CONDITION_EVENT_ALL] = NULL;\n    return thrd_error;\n  }\n  cond->mEvents[_CONDITION_EVENT_ALL] = CreateEvent(NULL, TRUE, FALSE, NULL);\n  if (cond->mEvents[_CONDITION_EVENT_ALL] == NULL)\n  {\n    CloseHandle(cond->mEvents[_CONDITION_EVENT_ONE]);\n    cond->mEvents[_CONDITION_EVENT_ONE] = NULL;\n    return thrd_error;\n  }\n\n  return thrd_success;\n#else\n  return pthread_cond_init(cond, NULL) == 0 ? thrd_success : thrd_error;\n#endif\n}\n\nvoid cnd_destroy(cnd_t *cond)\n{\n#if defined(_TTHREAD_WIN32_)\n  if (cond->mEvents[_CONDITION_EVENT_ONE] != NULL)\n  {\n    CloseHandle(cond->mEvents[_CONDITION_EVENT_ONE]);\n  }\n  if (cond->mEvents[_CONDITION_EVENT_ALL] != NULL)\n  {\n    CloseHandle(cond->mEvents[_CONDITION_EVENT_ALL]);\n  }\n  DeleteCriticalSection(&cond->mWaitersCountLock);\n#else\n  pthread_cond_destroy(cond);\n#endif\n}\n\nint cnd_signal(cnd_t *cond)\n{\n#if defined(_TTHREAD_WIN32_)\n  int haveWaiters;\n\n  /* Are there any waiters? */\n  EnterCriticalSection(&cond->mWaitersCountLock);\n  haveWaiters = (cond->mWaitersCount > 0);\n  LeaveCriticalSection(&cond->mWaitersCountLock);\n\n  /* If we have any waiting threads, send them a signal */\n  if(haveWaiters)\n  {\n    if (SetEvent(cond->mEvents[_CONDITION_EVENT_ONE]) == 0)\n    {\n      return thrd_error;\n    }\n  }\n\n  return thrd_success;\n#else\n  return pthread_cond_signal(cond) == 0 ? thrd_success : thrd_error;\n#endif\n}\n\nint cnd_broadcast(cnd_t *cond)\n{\n#if defined(_TTHREAD_WIN32_)\n  int haveWaiters;\n\n  /* Are there any waiters? */\n  EnterCriticalSection(&cond->mWaitersCountLock);\n  haveWaiters = (cond->mWaitersCount > 0);\n  LeaveCriticalSection(&cond->mWaitersCountLock);\n\n  /* If we have any waiting threads, send them a signal */\n  if(haveWaiters)\n  {\n    if (SetEvent(cond->mEvents[_CONDITION_EVENT_ALL]) == 0)\n    {\n      return thrd_error;\n    }\n  }\n\n  return thrd_success;\n#else\n  return pthread_cond_signal(cond) == 0 ? thrd_success : thrd_error;\n#endif\n}\n\n#if defined(_TTHREAD_WIN32_)\nstatic int _cnd_timedwait_win32(cnd_t *cond, mtx_t *mtx, DWORD timeout)\n{\n  int result, lastWaiter;\n\n  /* Increment number of waiters */\n  EnterCriticalSection(&cond->mWaitersCountLock);\n  ++ cond->mWaitersCount;\n  LeaveCriticalSection(&cond->mWaitersCountLock);\n\n  /* Release the mutex while waiting for the condition (will decrease\n     the number of waiters when done)... */\n  mtx_unlock(mtx);\n\n  /* Wait for either event to become signaled due to cnd_signal() or\n     cnd_broadcast() being called */\n  result = WaitForMultipleObjects(2, cond->mEvents, FALSE, timeout);\n  if (result == WAIT_TIMEOUT)\n  {\n    return thrd_timeout;\n  }\n  else if (result == (int)WAIT_FAILED)\n  {\n    return thrd_error;\n  }\n\n  /* Check if we are the last waiter */\n  EnterCriticalSection(&cond->mWaitersCountLock);\n  -- cond->mWaitersCount;\n  lastWaiter = (result == (WAIT_OBJECT_0 + _CONDITION_EVENT_ALL)) &&\n               (cond->mWaitersCount == 0);\n  LeaveCriticalSection(&cond->mWaitersCountLock);\n\n  /* If we are the last waiter to be notified to stop waiting, reset the event */\n  if (lastWaiter)\n  {\n    if (ResetEvent(cond->mEvents[_CONDITION_EVENT_ALL]) == 0)\n    {\n      return thrd_error;\n    }\n  }\n\n  /* Re-acquire the mutex */\n  mtx_lock(mtx);\n\n  return thrd_success;\n}\n#endif\n\nint cnd_wait(cnd_t *cond, mtx_t *mtx)\n{\n#if defined(_TTHREAD_WIN32_)\n  return _cnd_timedwait_win32(cond, mtx, INFINITE);\n#else\n  return pthread_cond_wait(cond, mtx) == 0 ? thrd_success : thrd_error;\n#endif\n}\n\nint cnd_timedwait(cnd_t *cond, mtx_t *mtx, const struct timespec *ts)\n{\n#if defined(_TTHREAD_WIN32_)\n  struct timespec now;\n  if (clock_gettime(CLOCK_REALTIME, &now) == 0)\n  {\n    DWORD delta = (DWORD) ((ts->tv_sec - now.tv_sec) * 1000 +\n                           (ts->tv_nsec - now.tv_nsec + 500000) / 1000000);\n    return _cnd_timedwait_win32(cond, mtx, delta);\n  }\n  else\n    return thrd_error;\n#else\n  int ret;\n  ret = pthread_cond_timedwait(cond, mtx, ts);\n  if (ret == ETIMEDOUT)\n  {\n    return thrd_timeout;\n  }\n  return ret == 0 ? thrd_success : thrd_error;\n#endif\n}\n\n\n/** Information to pass to the new thread (what to run). */\ntypedef struct {\n  thrd_start_t mFunction; /**< Pointer to the function to be executed. */\n  void * mArg;            /**< Function argument for the thread function. */\n} _thread_start_info;\n\n/* Thread wrapper function. */\n#if defined(_TTHREAD_WIN32_)\nstatic unsigned WINAPI _thrd_wrapper_function(void * aArg)\n#elif defined(_TTHREAD_POSIX_)\nstatic void * _thrd_wrapper_function(void * aArg)\n#endif\n{\n  thrd_start_t fun;\n  void *arg;\n  int  res;\n#if defined(_TTHREAD_POSIX_)\n  void *pres;\n#endif\n\n  /* Get thread startup information */\n  _thread_start_info *ti = (_thread_start_info *) aArg;\n  fun = ti->mFunction;\n  arg = ti->mArg;\n\n  /* The thread is responsible for freeing the startup information */\n  free((void *)ti);\n\n  /* Call the actual client thread function */\n  res = fun(arg);\n\n#if defined(_TTHREAD_WIN32_)\n  return res;\n#else\n  pres = malloc(sizeof(int));\n  if (pres != NULL)\n  {\n    *(int*)pres = res;\n  }\n  return pres;\n#endif\n}\n\nint thrd_create(thrd_t *thr, thrd_start_t func, void *arg)\n{\n  /* Fill out the thread startup information (passed to the thread wrapper,\n     which will eventually free it) */\n  _thread_start_info* ti = (_thread_start_info*)malloc(sizeof(_thread_start_info));\n  if (ti == NULL)\n  {\n    return thrd_nomem;\n  }\n  ti->mFunction = func;\n  ti->mArg = arg;\n\n  /* Create the thread */\n#if defined(_TTHREAD_WIN32_)\n  *thr = (HANDLE)_beginthreadex(NULL, 0, _thrd_wrapper_function, (void *)ti, 0, NULL);\n#elif defined(_TTHREAD_POSIX_)\n  if(pthread_create(thr, NULL, _thrd_wrapper_function, (void *)ti) != 0)\n  {\n    *thr = 0;\n  }\n#endif\n\n  /* Did we fail to create the thread? */\n  if(!*thr)\n  {\n    free(ti);\n    return thrd_error;\n  }\n\n  return thrd_success;\n}\n\nthrd_t thrd_current(void)\n{\n#if defined(_TTHREAD_WIN32_)\n  return GetCurrentThread();\n#else\n  return pthread_self();\n#endif\n}\n\nint thrd_detach(thrd_t thr)\n{\n  /* FIXME! */\n  (void)thr;\n  return thrd_error;\n}\n\nint thrd_equal(thrd_t thr0, thrd_t thr1)\n{\n#if defined(_TTHREAD_WIN32_)\n  return thr0 == thr1;\n#else\n  return pthread_equal(thr0, thr1);\n#endif\n}\n\nvoid thrd_exit(int res)\n{\n#if defined(_TTHREAD_WIN32_)\n  ExitThread(res);\n#else\n  void *pres = malloc(sizeof(int));\n  if (pres != NULL)\n  {\n    *(int*)pres = res;\n  }\n  pthread_exit(pres);\n#endif\n}\n\nint thrd_join(thrd_t thr, int *res)\n{\n#if defined(_TTHREAD_WIN32_)\n  if (WaitForSingleObject(thr, INFINITE) == WAIT_FAILED)\n  {\n    return thrd_error;\n  }\n  if (res != NULL)\n  {\n    DWORD dwRes;\n    GetExitCodeThread(thr, &dwRes);\n    *res = dwRes;\n  }\n#elif defined(_TTHREAD_POSIX_)\n  void *pres;\n  int ires = 0;\n  if (pthread_join(thr, &pres) != 0)\n  {\n    return thrd_error;\n  }\n  if (pres != NULL)\n  {\n    ires = *(int*)pres;\n    free(pres);\n  }\n  if (res != NULL)\n  {\n    *res = ires;\n  }\n#endif\n  return thrd_success;\n}\n\nint thrd_sleep(const struct timespec *time_point, struct timespec *remaining)\n{\n  struct timespec now;\n#if defined(_TTHREAD_WIN32_)\n  DWORD delta;\n#else\n  long delta;\n#endif\n\n  /* Get the current time */\n  if (clock_gettime(CLOCK_REALTIME, &now) != 0)\n    return -2;  // FIXME: Some specific error code?\n\n#if defined(_TTHREAD_WIN32_)\n  /* Delta in milliseconds */\n  delta = (DWORD) ((time_point->tv_sec - now.tv_sec) * 1000 +\n                   (time_point->tv_nsec - now.tv_nsec + 500000) / 1000000);\n  if (delta > 0)\n  {\n    Sleep(delta);\n  }\n#else\n  /* Delta in microseconds */\n  delta = (time_point->tv_sec - now.tv_sec) * 1000000L +\n          (time_point->tv_nsec - now.tv_nsec + 500L) / 1000L;\n\n  /* On some systems, the usleep argument must be < 1000000 */\n  while (delta > 999999L)\n  {\n    usleep(999999);\n    delta -= 999999L;\n  }\n  if (delta > 0L)\n  {\n    usleep((useconds_t)delta);\n  }\n#endif\n\n  /* We don't support waking up prematurely (yet) */\n  if (remaining)\n  {\n    remaining->tv_sec = 0;\n    remaining->tv_nsec = 0;\n  }\n  return 0;\n}\n\nvoid thrd_yield(void)\n{\n#if defined(_TTHREAD_WIN32_)\n  Sleep(0);\n#else\n  sched_yield();\n#endif\n}\n\nint tss_create(tss_t *key, tss_dtor_t dtor)\n{\n#if defined(_TTHREAD_WIN32_)\n  /* FIXME: The destructor function is not supported yet... */\n  if (dtor != NULL)\n  {\n    return thrd_error;\n  }\n  *key = TlsAlloc();\n  if (*key == TLS_OUT_OF_INDEXES)\n  {\n    return thrd_error;\n  }\n#else\n  if (pthread_key_create(key, dtor) != 0)\n  {\n    return thrd_error;\n  }\n#endif\n  return thrd_success;\n}\n\nvoid tss_delete(tss_t key)\n{\n#if defined(_TTHREAD_WIN32_)\n  TlsFree(key);\n#else\n  pthread_key_delete(key);\n#endif\n}\n\nvoid *tss_get(tss_t key)\n{\n#if defined(_TTHREAD_WIN32_)\n  return TlsGetValue(key);\n#else\n  return pthread_getspecific(key);\n#endif\n}\n\nint tss_set(tss_t key, void *val)\n{\n#if defined(_TTHREAD_WIN32_)\n  if (TlsSetValue(key, val) == 0)\n  {\n    return thrd_error;\n  }\n#else\n  if (pthread_setspecific(key, val) != 0)\n  {\n    return thrd_error;\n  }\n#endif\n  return thrd_success;\n}\n\n#if defined(_TTHREAD_EMULATE_CLOCK_GETTIME_)\nint _tthread_clock_gettime(clockid_t clk_id, struct timespec *ts)\n{\n#if defined(_TTHREAD_WIN32_)\n  struct _timeb tb;\n  _ftime(&tb);\n  ts->tv_sec = (time_t)tb.time;\n  ts->tv_nsec = 1000000L * (long)tb.millitm;\n#else\n  struct timeval tv;\n  gettimeofday(&tv, NULL);\n  ts->tv_sec = (time_t)tv.tv_sec;\n  ts->tv_nsec = 1000L * (long)tv.tv_usec;\n#endif\n  return 0;\n}\n#endif // _TTHREAD_EMULATE_CLOCK_GETTIME_\n\n"
  },
  {
    "path": "thirdparty/glfw/deps/tinycthread.h",
    "content": "/* -*- mode: c; tab-width: 2; indent-tabs-mode: nil; -*-\nCopyright (c) 2012 Marcus Geelnard\n\nThis software is provided 'as-is', without any express or implied\nwarranty. In no event will the authors be held liable for any damages\narising from the use of this software.\n\nPermission is granted to anyone to use this software for any purpose,\nincluding commercial applications, and to alter it and redistribute it\nfreely, subject to the following restrictions:\n\n    1. The origin of this software must not be misrepresented; you must not\n    claim that you wrote the original software. If you use this software\n    in a product, an acknowledgment in the product documentation would be\n    appreciated but is not required.\n\n    2. Altered source versions must be plainly marked as such, and must not be\n    misrepresented as being the original software.\n\n    3. This notice may not be removed or altered from any source\n    distribution.\n*/\n\n#ifndef _TINYCTHREAD_H_\n#define _TINYCTHREAD_H_\n\n/**\n* @file\n* @mainpage TinyCThread API Reference\n*\n* @section intro_sec Introduction\n* TinyCThread is a minimal, portable implementation of basic threading\n* classes for C.\n*\n* They closely mimic the functionality and naming of the C11 standard, and\n* should be easily replaceable with the corresponding standard variants.\n*\n* @section port_sec Portability\n* The Win32 variant uses the native Win32 API for implementing the thread\n* classes, while for other systems, the POSIX threads API (pthread) is used.\n*\n* @section misc_sec Miscellaneous\n* The following special keywords are available: #_Thread_local.\n*\n* For more detailed information, browse the different sections of this\n* documentation. A good place to start is:\n* tinycthread.h.\n*/\n\n/* Which platform are we on? */\n#if !defined(_TTHREAD_PLATFORM_DEFINED_)\n  #if defined(_WIN32) || defined(__WIN32__) || defined(__WINDOWS__)\n    #define _TTHREAD_WIN32_\n  #else\n    #define _TTHREAD_POSIX_\n  #endif\n  #define _TTHREAD_PLATFORM_DEFINED_\n#endif\n\n/* Activate some POSIX functionality (e.g. clock_gettime and recursive mutexes) */\n#if defined(_TTHREAD_POSIX_)\n  #undef _FEATURES_H\n  #if !defined(_GNU_SOURCE)\n    #define _GNU_SOURCE\n  #endif\n  #if !defined(_POSIX_C_SOURCE) || ((_POSIX_C_SOURCE - 0) < 199309L)\n    #undef _POSIX_C_SOURCE\n    #define _POSIX_C_SOURCE 199309L\n  #endif\n  #if !defined(_XOPEN_SOURCE) || ((_XOPEN_SOURCE - 0) < 500)\n    #undef _XOPEN_SOURCE\n    #define _XOPEN_SOURCE 500\n  #endif\n#endif\n\n/* Generic includes */\n#include <time.h>\n\n/* Platform specific includes */\n#if defined(_TTHREAD_POSIX_)\n  #include <sys/time.h>\n  #include <pthread.h>\n#elif defined(_TTHREAD_WIN32_)\n  #ifndef WIN32_LEAN_AND_MEAN\n    #define WIN32_LEAN_AND_MEAN\n    #define __UNDEF_LEAN_AND_MEAN\n  #endif\n  #include <windows.h>\n  #ifdef __UNDEF_LEAN_AND_MEAN\n    #undef WIN32_LEAN_AND_MEAN\n    #undef __UNDEF_LEAN_AND_MEAN\n  #endif\n#endif\n\n/* Workaround for missing TIME_UTC: If time.h doesn't provide TIME_UTC,\n   it's quite likely that libc does not support it either. Hence, fall back to\n   the only other supported time specifier: CLOCK_REALTIME (and if that fails,\n   we're probably emulating clock_gettime anyway, so anything goes). */\n#ifndef TIME_UTC\n  #ifdef CLOCK_REALTIME\n    #define TIME_UTC CLOCK_REALTIME\n  #else\n    #define TIME_UTC 0\n  #endif\n#endif\n\n/* Workaround for missing clock_gettime (most Windows compilers, afaik) */\n#if defined(_TTHREAD_WIN32_) || defined(__APPLE_CC__)\n#define _TTHREAD_EMULATE_CLOCK_GETTIME_\n/* Emulate struct timespec */\n#if defined(_TTHREAD_WIN32_)\nstruct _ttherad_timespec {\n  time_t tv_sec;\n  long   tv_nsec;\n};\n#define timespec _ttherad_timespec\n#endif\n\n/* Emulate clockid_t */\ntypedef int _tthread_clockid_t;\n#define clockid_t _tthread_clockid_t\n\n/* Emulate clock_gettime */\nint _tthread_clock_gettime(clockid_t clk_id, struct timespec *ts);\n#define clock_gettime _tthread_clock_gettime\n#ifndef CLOCK_REALTIME\n  #define CLOCK_REALTIME 0\n#endif\n#endif\n\n\n/** TinyCThread version (major number). */\n#define TINYCTHREAD_VERSION_MAJOR 1\n/** TinyCThread version (minor number). */\n#define TINYCTHREAD_VERSION_MINOR 1\n/** TinyCThread version (full version). */\n#define TINYCTHREAD_VERSION (TINYCTHREAD_VERSION_MAJOR * 100 + TINYCTHREAD_VERSION_MINOR)\n\n/**\n* @def _Thread_local\n* Thread local storage keyword.\n* A variable that is declared with the @c _Thread_local keyword makes the\n* value of the variable local to each thread (known as thread-local storage,\n* or TLS). Example usage:\n* @code\n* // This variable is local to each thread.\n* _Thread_local int variable;\n* @endcode\n* @note The @c _Thread_local keyword is a macro that maps to the corresponding\n* compiler directive (e.g. @c __declspec(thread)).\n* @note This directive is currently not supported on Mac OS X (it will give\n* a compiler error), since compile-time TLS is not supported in the Mac OS X\n* executable format. Also, some older versions of MinGW (before GCC 4.x) do\n* not support this directive.\n* @hideinitializer\n*/\n\n/* FIXME: Check for a PROPER value of __STDC_VERSION__ to know if we have C11 */\n#if !(defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201102L)) && !defined(_Thread_local)\n #if defined(__GNUC__) || defined(__INTEL_COMPILER) || defined(__SUNPRO_CC) || defined(__IBMCPP__)\n  #define _Thread_local __thread\n #else\n  #define _Thread_local __declspec(thread)\n #endif\n#endif\n\n/* Macros */\n#define TSS_DTOR_ITERATIONS 0\n\n/* Function return values */\n#define thrd_error    0 /**< The requested operation failed */\n#define thrd_success  1 /**< The requested operation succeeded */\n#define thrd_timeout  2 /**< The time specified in the call was reached without acquiring the requested resource */\n#define thrd_busy     3 /**< The requested operation failed because a tesource requested by a test and return function is already in use */\n#define thrd_nomem    4 /**< The requested operation failed because it was unable to allocate memory */\n\n/* Mutex types */\n#define mtx_plain     1\n#define mtx_timed     2\n#define mtx_try       4\n#define mtx_recursive 8\n\n/* Mutex */\n#if defined(_TTHREAD_WIN32_)\ntypedef struct {\n  CRITICAL_SECTION mHandle;   /* Critical section handle */\n  int mAlreadyLocked;         /* TRUE if the mutex is already locked */\n  int mRecursive;             /* TRUE if the mutex is recursive */\n} mtx_t;\n#else\ntypedef pthread_mutex_t mtx_t;\n#endif\n\n/** Create a mutex object.\n* @param mtx A mutex object.\n* @param type Bit-mask that must have one of the following six values:\n*   @li @c mtx_plain for a simple non-recursive mutex\n*   @li @c mtx_timed for a non-recursive mutex that supports timeout\n*   @li @c mtx_try for a non-recursive mutex that supports test and return\n*   @li @c mtx_plain | @c mtx_recursive (same as @c mtx_plain, but recursive)\n*   @li @c mtx_timed | @c mtx_recursive (same as @c mtx_timed, but recursive)\n*   @li @c mtx_try | @c mtx_recursive (same as @c mtx_try, but recursive)\n* @return @ref thrd_success on success, or @ref thrd_error if the request could\n* not be honored.\n*/\nint mtx_init(mtx_t *mtx, int type);\n\n/** Release any resources used by the given mutex.\n* @param mtx A mutex object.\n*/\nvoid mtx_destroy(mtx_t *mtx);\n\n/** Lock the given mutex.\n* Blocks until the given mutex can be locked. If the mutex is non-recursive, and\n* the calling thread already has a lock on the mutex, this call will block\n* forever.\n* @param mtx A mutex object.\n* @return @ref thrd_success on success, or @ref thrd_error if the request could\n* not be honored.\n*/\nint mtx_lock(mtx_t *mtx);\n\n/** NOT YET IMPLEMENTED.\n*/\nint mtx_timedlock(mtx_t *mtx, const struct timespec *ts);\n\n/** Try to lock the given mutex.\n* The specified mutex shall support either test and return or timeout. If the\n* mutex is already locked, the function returns without blocking.\n* @param mtx A mutex object.\n* @return @ref thrd_success on success, or @ref thrd_busy if the resource\n* requested is already in use, or @ref thrd_error if the request could not be\n* honored.\n*/\nint mtx_trylock(mtx_t *mtx);\n\n/** Unlock the given mutex.\n* @param mtx A mutex object.\n* @return @ref thrd_success on success, or @ref thrd_error if the request could\n* not be honored.\n*/\nint mtx_unlock(mtx_t *mtx);\n\n/* Condition variable */\n#if defined(_TTHREAD_WIN32_)\ntypedef struct {\n  HANDLE mEvents[2];                  /* Signal and broadcast event HANDLEs. */\n  unsigned int mWaitersCount;         /* Count of the number of waiters. */\n  CRITICAL_SECTION mWaitersCountLock; /* Serialize access to mWaitersCount. */\n} cnd_t;\n#else\ntypedef pthread_cond_t cnd_t;\n#endif\n\n/** Create a condition variable object.\n* @param cond A condition variable object.\n* @return @ref thrd_success on success, or @ref thrd_error if the request could\n* not be honored.\n*/\nint cnd_init(cnd_t *cond);\n\n/** Release any resources used by the given condition variable.\n* @param cond A condition variable object.\n*/\nvoid cnd_destroy(cnd_t *cond);\n\n/** Signal a condition variable.\n* Unblocks one of the threads that are blocked on the given condition variable\n* at the time of the call. If no threads are blocked on the condition variable\n* at the time of the call, the function does nothing and return success.\n* @param cond A condition variable object.\n* @return @ref thrd_success on success, or @ref thrd_error if the request could\n* not be honored.\n*/\nint cnd_signal(cnd_t *cond);\n\n/** Broadcast a condition variable.\n* Unblocks all of the threads that are blocked on the given condition variable\n* at the time of the call. If no threads are blocked on the condition variable\n* at the time of the call, the function does nothing and return success.\n* @param cond A condition variable object.\n* @return @ref thrd_success on success, or @ref thrd_error if the request could\n* not be honored.\n*/\nint cnd_broadcast(cnd_t *cond);\n\n/** Wait for a condition variable to become signaled.\n* The function atomically unlocks the given mutex and endeavors to block until\n* the given condition variable is signaled by a call to cnd_signal or to\n* cnd_broadcast. When the calling thread becomes unblocked it locks the mutex\n* before it returns.\n* @param cond A condition variable object.\n* @param mtx A mutex object.\n* @return @ref thrd_success on success, or @ref thrd_error if the request could\n* not be honored.\n*/\nint cnd_wait(cnd_t *cond, mtx_t *mtx);\n\n/** Wait for a condition variable to become signaled.\n* The function atomically unlocks the given mutex and endeavors to block until\n* the given condition variable is signaled by a call to cnd_signal or to\n* cnd_broadcast, or until after the specified time. When the calling thread\n* becomes unblocked it locks the mutex before it returns.\n* @param cond A condition variable object.\n* @param mtx A mutex object.\n* @param xt A point in time at which the request will time out (absolute time).\n* @return @ref thrd_success upon success, or @ref thrd_timeout if the time\n* specified in the call was reached without acquiring the requested resource, or\n* @ref thrd_error if the request could not be honored.\n*/\nint cnd_timedwait(cnd_t *cond, mtx_t *mtx, const struct timespec *ts);\n\n/* Thread */\n#if defined(_TTHREAD_WIN32_)\ntypedef HANDLE thrd_t;\n#else\ntypedef pthread_t thrd_t;\n#endif\n\n/** Thread start function.\n* Any thread that is started with the @ref thrd_create() function must be\n* started through a function of this type.\n* @param arg The thread argument (the @c arg argument of the corresponding\n*        @ref thrd_create() call).\n* @return The thread return value, which can be obtained by another thread\n* by using the @ref thrd_join() function.\n*/\ntypedef int (*thrd_start_t)(void *arg);\n\n/** Create a new thread.\n* @param thr Identifier of the newly created thread.\n* @param func A function pointer to the function that will be executed in\n*        the new thread.\n* @param arg An argument to the thread function.\n* @return @ref thrd_success on success, or @ref thrd_nomem if no memory could\n* be allocated for the thread requested, or @ref thrd_error if the request\n* could not be honored.\n* @note A thread’s identifier may be reused for a different thread once the\n* original thread has exited and either been detached or joined to another\n* thread.\n*/\nint thrd_create(thrd_t *thr, thrd_start_t func, void *arg);\n\n/** Identify the calling thread.\n* @return The identifier of the calling thread.\n*/\nthrd_t thrd_current(void);\n\n/** NOT YET IMPLEMENTED.\n*/\nint thrd_detach(thrd_t thr);\n\n/** Compare two thread identifiers.\n* The function determines if two thread identifiers refer to the same thread.\n* @return Zero if the two thread identifiers refer to different threads.\n* Otherwise a nonzero value is returned.\n*/\nint thrd_equal(thrd_t thr0, thrd_t thr1);\n\n/** Terminate execution of the calling thread.\n* @param res Result code of the calling thread.\n*/\nvoid thrd_exit(int res);\n\n/** Wait for a thread to terminate.\n* The function joins the given thread with the current thread by blocking\n* until the other thread has terminated.\n* @param thr The thread to join with.\n* @param res If this pointer is not NULL, the function will store the result\n*        code of the given thread in the integer pointed to by @c res.\n* @return @ref thrd_success on success, or @ref thrd_error if the request could\n* not be honored.\n*/\nint thrd_join(thrd_t thr, int *res);\n\n/** Put the calling thread to sleep.\n* Suspend execution of the calling thread.\n* @param time_point A point in time at which the thread will resume (absolute time).\n* @param remaining If non-NULL, this parameter will hold the remaining time until\n*                  time_point upon return. This will typically be zero, but if\n*                  the thread was woken up by a signal that is not ignored before\n*                  time_point was reached @c remaining will hold a positive\n*                  time.\n* @return 0 (zero) on successful sleep, or -1 if an interrupt occurred.\n*/\nint thrd_sleep(const struct timespec *time_point, struct timespec *remaining);\n\n/** Yield execution to another thread.\n* Permit other threads to run, even if the current thread would ordinarily\n* continue to run.\n*/\nvoid thrd_yield(void);\n\n/* Thread local storage */\n#if defined(_TTHREAD_WIN32_)\ntypedef DWORD tss_t;\n#else\ntypedef pthread_key_t tss_t;\n#endif\n\n/** Destructor function for a thread-specific storage.\n* @param val The value of the destructed thread-specific storage.\n*/\ntypedef void (*tss_dtor_t)(void *val);\n\n/** Create a thread-specific storage.\n* @param key The unique key identifier that will be set if the function is\n*        successful.\n* @param dtor Destructor function. This can be NULL.\n* @return @ref thrd_success on success, or @ref thrd_error if the request could\n* not be honored.\n* @note The destructor function is not supported under Windows. If @c dtor is\n* not NULL when calling this function under Windows, the function will fail\n* and return @ref thrd_error.\n*/\nint tss_create(tss_t *key, tss_dtor_t dtor);\n\n/** Delete a thread-specific storage.\n* The function releases any resources used by the given thread-specific\n* storage.\n* @param key The key that shall be deleted.\n*/\nvoid tss_delete(tss_t key);\n\n/** Get the value for a thread-specific storage.\n* @param key The thread-specific storage identifier.\n* @return The value for the current thread held in the given thread-specific\n* storage.\n*/\nvoid *tss_get(tss_t key);\n\n/** Set the value for a thread-specific storage.\n* @param key The thread-specific storage identifier.\n* @param val The value of the thread-specific storage to set for the current\n*        thread.\n* @return @ref thrd_success on success, or @ref thrd_error if the request could\n* not be honored.\n*/\nint tss_set(tss_t key, void *val);\n\n\n#endif /* _TINYTHREAD_H_ */\n\n"
  },
  {
    "path": "thirdparty/glfw/deps/vs2008/stdint.h",
    "content": "// ISO C9x  compliant stdint.h for Microsoft Visual Studio\n// Based on ISO/IEC 9899:TC2 Committee draft (May 6, 2005) WG14/N1124 \n// \n//  Copyright (c) 2006-2008 Alexander Chemeris\n// \n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n// \n//   1. Redistributions of source code must retain the above copyright notice,\n//      this list of conditions and the following disclaimer.\n// \n//   2. Redistributions in binary form must reproduce the above copyright\n//      notice, this list of conditions and the following disclaimer in the\n//      documentation and/or other materials provided with the distribution.\n// \n//   3. The name of the author may be used to endorse or promote products\n//      derived from this software without specific prior written permission.\n// \n// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED\n// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\n// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\n// EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;\n// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, \n// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR\n// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF\n// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n// \n///////////////////////////////////////////////////////////////////////////////\n\n#ifndef _MSC_VER // [\n#error \"Use this header only with Microsoft Visual C++ compilers!\"\n#endif // _MSC_VER ]\n\n#ifndef _MSC_STDINT_H_ // [\n#define _MSC_STDINT_H_\n\n#if _MSC_VER > 1000\n#pragma once\n#endif\n\n#include <limits.h>\n\n// For Visual Studio 6 in C++ mode and for many Visual Studio versions when\n// compiling for ARM we should wrap <wchar.h> include with 'extern \"C++\" {}'\n// or compiler give many errors like this:\n//   error C2733: second C linkage of overloaded function 'wmemchr' not allowed\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n#  include <wchar.h>\n#ifdef __cplusplus\n}\n#endif\n\n// Define _W64 macros to mark types changing their size, like intptr_t.\n#ifndef _W64\n#  if !defined(__midl) && (defined(_X86_) || defined(_M_IX86)) && _MSC_VER >= 1300\n#     define _W64 __w64\n#  else\n#     define _W64\n#  endif\n#endif\n\n\n// 7.18.1 Integer types\n\n// 7.18.1.1 Exact-width integer types\n\n// Visual Studio 6 and Embedded Visual C++ 4 doesn't\n// realize that, e.g. char has the same size as __int8\n// so we give up on __intX for them.\n#if (_MSC_VER < 1300)\n   typedef signed char       int8_t;\n   typedef signed short      int16_t;\n   typedef signed int        int32_t;\n   typedef unsigned char     uint8_t;\n   typedef unsigned short    uint16_t;\n   typedef unsigned int      uint32_t;\n#else\n   typedef signed __int8     int8_t;\n   typedef signed __int16    int16_t;\n   typedef signed __int32    int32_t;\n   typedef unsigned __int8   uint8_t;\n   typedef unsigned __int16  uint16_t;\n   typedef unsigned __int32  uint32_t;\n#endif\ntypedef signed __int64       int64_t;\ntypedef unsigned __int64     uint64_t;\n\n\n// 7.18.1.2 Minimum-width integer types\ntypedef int8_t    int_least8_t;\ntypedef int16_t   int_least16_t;\ntypedef int32_t   int_least32_t;\ntypedef int64_t   int_least64_t;\ntypedef uint8_t   uint_least8_t;\ntypedef uint16_t  uint_least16_t;\ntypedef uint32_t  uint_least32_t;\ntypedef uint64_t  uint_least64_t;\n\n// 7.18.1.3 Fastest minimum-width integer types\ntypedef int8_t    int_fast8_t;\ntypedef int16_t   int_fast16_t;\ntypedef int32_t   int_fast32_t;\ntypedef int64_t   int_fast64_t;\ntypedef uint8_t   uint_fast8_t;\ntypedef uint16_t  uint_fast16_t;\ntypedef uint32_t  uint_fast32_t;\ntypedef uint64_t  uint_fast64_t;\n\n// 7.18.1.4 Integer types capable of holding object pointers\n#ifdef _WIN64 // [\n   typedef signed __int64    intptr_t;\n   typedef unsigned __int64  uintptr_t;\n#else // _WIN64 ][\n   typedef _W64 signed int   intptr_t;\n   typedef _W64 unsigned int uintptr_t;\n#endif // _WIN64 ]\n\n// 7.18.1.5 Greatest-width integer types\ntypedef int64_t   intmax_t;\ntypedef uint64_t  uintmax_t;\n\n\n// 7.18.2 Limits of specified-width integer types\n\n#if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) // [   See footnote 220 at page 257 and footnote 221 at page 259\n\n// 7.18.2.1 Limits of exact-width integer types\n#define INT8_MIN     ((int8_t)_I8_MIN)\n#define INT8_MAX     _I8_MAX\n#define INT16_MIN    ((int16_t)_I16_MIN)\n#define INT16_MAX    _I16_MAX\n#define INT32_MIN    ((int32_t)_I32_MIN)\n#define INT32_MAX    _I32_MAX\n#define INT64_MIN    ((int64_t)_I64_MIN)\n#define INT64_MAX    _I64_MAX\n#define UINT8_MAX    _UI8_MAX\n#define UINT16_MAX   _UI16_MAX\n#define UINT32_MAX   _UI32_MAX\n#define UINT64_MAX   _UI64_MAX\n\n// 7.18.2.2 Limits of minimum-width integer types\n#define INT_LEAST8_MIN    INT8_MIN\n#define INT_LEAST8_MAX    INT8_MAX\n#define INT_LEAST16_MIN   INT16_MIN\n#define INT_LEAST16_MAX   INT16_MAX\n#define INT_LEAST32_MIN   INT32_MIN\n#define INT_LEAST32_MAX   INT32_MAX\n#define INT_LEAST64_MIN   INT64_MIN\n#define INT_LEAST64_MAX   INT64_MAX\n#define UINT_LEAST8_MAX   UINT8_MAX\n#define UINT_LEAST16_MAX  UINT16_MAX\n#define UINT_LEAST32_MAX  UINT32_MAX\n#define UINT_LEAST64_MAX  UINT64_MAX\n\n// 7.18.2.3 Limits of fastest minimum-width integer types\n#define INT_FAST8_MIN    INT8_MIN\n#define INT_FAST8_MAX    INT8_MAX\n#define INT_FAST16_MIN   INT16_MIN\n#define INT_FAST16_MAX   INT16_MAX\n#define INT_FAST32_MIN   INT32_MIN\n#define INT_FAST32_MAX   INT32_MAX\n#define INT_FAST64_MIN   INT64_MIN\n#define INT_FAST64_MAX   INT64_MAX\n#define UINT_FAST8_MAX   UINT8_MAX\n#define UINT_FAST16_MAX  UINT16_MAX\n#define UINT_FAST32_MAX  UINT32_MAX\n#define UINT_FAST64_MAX  UINT64_MAX\n\n// 7.18.2.4 Limits of integer types capable of holding object pointers\n#ifdef _WIN64 // [\n#  define INTPTR_MIN   INT64_MIN\n#  define INTPTR_MAX   INT64_MAX\n#  define UINTPTR_MAX  UINT64_MAX\n#else // _WIN64 ][\n#  define INTPTR_MIN   INT32_MIN\n#  define INTPTR_MAX   INT32_MAX\n#  define UINTPTR_MAX  UINT32_MAX\n#endif // _WIN64 ]\n\n// 7.18.2.5 Limits of greatest-width integer types\n#define INTMAX_MIN   INT64_MIN\n#define INTMAX_MAX   INT64_MAX\n#define UINTMAX_MAX  UINT64_MAX\n\n// 7.18.3 Limits of other integer types\n\n#ifdef _WIN64 // [\n#  define PTRDIFF_MIN  _I64_MIN\n#  define PTRDIFF_MAX  _I64_MAX\n#else  // _WIN64 ][\n#  define PTRDIFF_MIN  _I32_MIN\n#  define PTRDIFF_MAX  _I32_MAX\n#endif  // _WIN64 ]\n\n#define SIG_ATOMIC_MIN  INT_MIN\n#define SIG_ATOMIC_MAX  INT_MAX\n\n#ifndef SIZE_MAX // [\n#  ifdef _WIN64 // [\n#     define SIZE_MAX  _UI64_MAX\n#  else // _WIN64 ][\n#     define SIZE_MAX  _UI32_MAX\n#  endif // _WIN64 ]\n#endif // SIZE_MAX ]\n\n// WCHAR_MIN and WCHAR_MAX are also defined in <wchar.h>\n#ifndef WCHAR_MIN // [\n#  define WCHAR_MIN  0\n#endif  // WCHAR_MIN ]\n#ifndef WCHAR_MAX // [\n#  define WCHAR_MAX  _UI16_MAX\n#endif  // WCHAR_MAX ]\n\n#define WINT_MIN  0\n#define WINT_MAX  _UI16_MAX\n\n#endif // __STDC_LIMIT_MACROS ]\n\n\n// 7.18.4 Limits of other integer types\n\n#if !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS) // [   See footnote 224 at page 260\n\n// 7.18.4.1 Macros for minimum-width integer constants\n\n#define INT8_C(val)  val##i8\n#define INT16_C(val) val##i16\n#define INT32_C(val) val##i32\n#define INT64_C(val) val##i64\n\n#define UINT8_C(val)  val##ui8\n#define UINT16_C(val) val##ui16\n#define UINT32_C(val) val##ui32\n#define UINT64_C(val) val##ui64\n\n// 7.18.4.2 Macros for greatest-width integer constants\n#define INTMAX_C   INT64_C\n#define UINTMAX_C  UINT64_C\n\n#endif // __STDC_CONSTANT_MACROS ]\n\n\n#endif // _MSC_STDINT_H_ ]\n"
  },
  {
    "path": "thirdparty/glfw/docs/CMakeLists.txt",
    "content": "\n# NOTE: The order of this list determines the order of items in the Guides\n#       (i.e. Pages) list in the generated documentation\nset(GLFW_DOXYGEN_SOURCES\n    \"include/GLFW/glfw3.h\"\n    \"include/GLFW/glfw3native.h\"\n    \"docs/main.dox\"\n    \"docs/news.dox\"\n    \"docs/quick.dox\"\n    \"docs/moving.dox\"\n    \"docs/compile.dox\"\n    \"docs/build.dox\"\n    \"docs/intro.dox\"\n    \"docs/context.dox\"\n    \"docs/monitor.dox\"\n    \"docs/window.dox\"\n    \"docs/input.dox\"\n    \"docs/vulkan.dox\"\n    \"docs/compat.dox\"\n    \"docs/internal.dox\")\n\n# Format the source list into a Doxyfile INPUT value that Doxygen can parse\nforeach(path IN LISTS GLFW_DOXYGEN_SOURCES)\n    set(GLFW_DOXYGEN_INPUT \"${GLFW_DOXYGEN_INPUT} \\\\\\n\\\"${GLFW_SOURCE_DIR}/${path}\\\"\")\nendforeach()\n\nconfigure_file(Doxyfile.in Doxyfile @ONLY)\n\nadd_custom_target(docs ALL \"${DOXYGEN_EXECUTABLE}\"\n                  WORKING_DIRECTORY \"${GLFW_BINARY_DIR}/docs\"\n                  COMMENT \"Generating HTML documentation\" VERBATIM)\n\n"
  },
  {
    "path": "thirdparty/glfw/docs/CODEOWNERS",
    "content": "\n*               @elmindreda\n\nsrc/wl_*        @linkmauve\n\ndocs/*.css      @glfw/webdev\ndocs/*.less     @glfw/webdev\ndocs/*.html     @glfw/webdev\ndocs/*.xml      @glfw/webdev\n\n"
  },
  {
    "path": "thirdparty/glfw/docs/CONTRIBUTING.md",
    "content": "# Contribution Guide\n\n## Contents\n\n- [Asking a question](#asking-a-question)\n- [Reporting a bug](#reporting-a-bug)\n    - [Reporting a compile or link bug](#reporting-a-compile-or-link-bug)\n    - [Reporting a segfault or other crash bug](#reporting-a-segfault-or-other-crash-bug)\n    - [Reporting a context creation bug](#reporting-a-context-creation-bug)\n    - [Reporting a monitor or video mode bug](#reporting-a-monitor-or-video-mode-bug)\n    - [Reporting a window, input or event bug](#reporting-a-window-input-or-event-bug)\n    - [Reporting some other library bug](#reporting-some-other-library-bug)\n    - [Reporting a documentation bug](#reporting-a-documentation-bug)\n    - [Reporting a website bug](#reporting-a-website-bug)\n- [Requesting a feature](#requesting-a-feature)\n- [Contributing a bug fix](#contributing-a-bug-fix)\n- [Contributing a feature](#contributing-a-feature)\n\n\n## Asking a question\n\nQuestions about how to use GLFW should be asked either in the [support\nsection](https://discourse.glfw.org/c/support) of the forum, under the [Stack\nOverflow tag](https://stackoverflow.com/questions/tagged/glfw) or [Game\nDevelopment tag](https://gamedev.stackexchange.com/questions/tagged/glfw) on\nStack Exchange or in the IRC channel `#glfw` on\n[Freenode](http://freenode.net/).\n\nQuestions about the design or implementation of GLFW or about future plans\nshould be asked in the [dev section](https://discourse.glfw.org/c/dev) of the\nforum or in the IRC channel.  Please don't open a GitHub issue to discuss design\nquestions without first checking with a maintainer.\n\n\n## Reporting a bug\n\nIf GLFW is behaving unexpectedly at run-time, start by setting an [error\ncallback](https://www.glfw.org/docs/latest/intro_guide.html#error_handling).\nGLFW will often tell you the cause of an error via this callback.  If it\ndoesn't, that might be a separate bug.\n\nIf GLFW is crashing or triggering asserts, make sure that all your object\nhandles and other pointers are valid.\n\nFor bugs where it makes sense, a short, self contained example is absolutely\ninvaluable.  Just put it inline in the body text.  Note that if the bug is\nreproducible with one of the test programs that come with GLFW, just mention\nthat instead.\n\n__Don't worry about adding too much information__.  Unimportant information can\nbe abbreviated or removed later, but missing information can stall bug fixing,\nespecially when your schedule doesn't align with that of the maintainer.\n\n__Please provide text as text, not as images__.  This includes code, error\nmessages and any other text.  Text in images cannot be found by other users\nsearching for the same problem and may have to be re-typed by maintainers when\ndebugging.\n\nYou don't need to manually indent your code or other text to quote it with\nGitHub Markdown; just surround it with triple backticks:\n\n    ```\n    Some quoted text.\n    ```\n\nYou can also add syntax highlighting by appending the common file extension:\n\n    ```c\n    int five(void)\n    {\n        return 5;\n    }\n    ```\n\nThere are issue labels for both platforms and GPU manufacturers, so there is no\nneed to mention these in the subject line.  If you do, it will be removed when\nthe issue is labeled.\n\nIf your bug is already reported, please add any new information you have, or if\nit already has everything, give it a :+1:.\n\n\n### Reporting a compile or link bug\n\n__Note:__ GLFW needs many system APIs to do its job, which on some platforms\nmeans linking to many system libraries.  If you are using GLFW as a static\nlibrary, that means your application needs to link to these in addition to GLFW.\n\n__Note:__ Check the [Compiling\nGLFW](https://www.glfw.org/docs/latest/compile.html) guide and or [Building\napplications](https://www.glfw.org/docs/latest/build.html) guide for before\nopening an issue of this kind.  Most issues are caused by a missing package or\nlinker flag.\n\nAlways include the __operating system name and version__ (e.g. `Windows\n7 64-bit` or `Ubuntu 15.10`) and the __compiler name and version__ (e.g. `Visual\nC++ 2015 Update 2`).  If you are using an official release of GLFW,\ninclude the __GLFW release version__ (e.g. `3.1.2`), otherwise include the\n__GLFW commit ID__ (e.g.  `3795d78b14ef06008889cc422a1fb8d642597751`) from Git.\n\nPlease also include the __complete build log__ from your compiler and linker,\neven if it's long.  It can always be shortened later, if necessary.\n\n\n#### Quick template\n\n```\nOS and version:\nCompiler version:\nRelease or commit:\nBuild log:\n```\n\n\n### Reporting a segfault or other crash bug\n\nAlways include the __operating system name and version__ (e.g. `Windows\n7 64-bit` or `Ubuntu 15.10`).  If you are using an official release of GLFW,\ninclude the __GLFW release version__ (e.g. `3.1.2`), otherwise include the\n__GLFW commit ID__ (e.g.  `3795d78b14ef06008889cc422a1fb8d642597751`) from Git.\n\nPlease also include any __error messages__ provided to your application via the\n[error\ncallback](https://www.glfw.org/docs/latest/intro_guide.html#error_handling) and\nthe __full call stack__ of the crash, or if the crash does not occur in debug\nmode, mention that instead.\n\n\n#### Quick template\n\n```\nOS and version:\nRelease or commit:\nError messages:\nCall stack:\n```\n\n\n### Reporting a context creation bug\n\n__Note:__ Windows ships with graphics drivers that do not support OpenGL.  If\nGLFW says that your machine lacks support for OpenGL, it very likely does.\nInstall drivers from the computer manufacturer or graphics card manufacturer\n([Nvidia](https://www.geforce.com/drivers),\n[AMD](https://www.amd.com/en/support),\n[Intel](https://www-ssl.intel.com/content/www/us/en/support/detect.html)) to\nfix this.\n\n__Note:__ AMD only supports OpenGL ES on Windows via EGL.  See the\n[GLFW\\_CONTEXT\\_CREATION\\_API](https://www.glfw.org/docs/latest/window_guide.html#window_hints_ctx)\nhint for how to select EGL.\n\nPlease verify that context creation also fails with the `glfwinfo` tool before\nreporting it as a bug.  This tool is included in the GLFW source tree as\n`tests/glfwinfo.c` and is built along with the library.  It has switches for all\nGLFW context and framebuffer hints.  Run `glfwinfo -h` for a complete list.\n\nAlways include the __operating system name and version__ (e.g. `Windows\n7 64-bit` or `Ubuntu 15.10`).  If you are using an official release of GLFW,\ninclude the __GLFW release version__ (e.g. `3.1.2`), otherwise include the\n__GLFW commit ID__ (e.g.  `3795d78b14ef06008889cc422a1fb8d642597751`) from Git.\n\nIf you are running your program in a virtual machine, please mention this and\ninclude the __VM name and version__ (e.g. `VirtualBox 5.1`).\n\nPlease also include the __GLFW version string__ (`3.2.0 X11 EGL clock_gettime\n/dev/js`), as described\n[here](https://www.glfw.org/docs/latest/intro.html#intro_version_string), the\n__GPU model and driver version__ (e.g. `GeForce GTX660 with 352.79`), and the\n__output of `glfwinfo`__ (with switches matching any hints you set in your\ncode) when reporting this kind of bug.  If this tool doesn't run on the machine,\nmention that instead.\n\n\n#### Quick template\n\n```\nOS and version:\nGPU and driver:\nRelease or commit:\nVersion string:\nglfwinfo output:\n```\n\n\n### Reporting a monitor or video mode bug\n\n__Note:__ On headless systems on some platforms, no monitors are reported.  This\ncauses glfwGetPrimaryMonitor to return `NULL`, which not all applications are\nprepared for.\n\n__Note:__ Some third-party tools report more video modes than are approved of\nby the OS.  For safety and compatibility, GLFW only reports video modes the OS\nwants programs to use.  This is not a bug.\n\nThe `monitors` tool is included in the GLFW source tree as `tests/monitors.c`\nand is built along with the library.  It lists all information GLFW provides\nabout monitors it detects.\n\nAlways include the __operating system name and version__ (e.g. `Windows\n7 64-bit` or `Ubuntu 15.10`).  If you are using an official release of GLFW,\ninclude the __GLFW release version__ (e.g. `3.1.2`), otherwise include the\n__GLFW commit ID__ (e.g.  `3795d78b14ef06008889cc422a1fb8d642597751`) from Git.\n\nIf you are running your program in a virtual machine, please mention this and\ninclude the __VM name and version__ (e.g. `VirtualBox 5.1`).\n\nPlease also include any __error messages__ provided to your application via the\n[error\ncallback](https://www.glfw.org/docs/latest/intro_guide.html#error_handling) and\nthe __output of `monitors`__ when reporting this kind of bug.  If this tool\ndoesn't run on the machine, mention this instead.\n\n\n#### Quick template\n\n```\nOS and version:\nRelease or commit:\nError messages:\nmonitors output:\n```\n\n\n### Reporting a window, input or event bug\n\n__Note:__ The exact ordering of related window events will sometimes differ.\n\n__Note:__ Window moving and resizing (by the user) will block the main thread on\nsome platforms.  This is not a bug.  Set a [refresh\ncallback](https://www.glfw.org/docs/latest/window.html#window_refresh) if you\nwant to keep the window contents updated during a move or size operation.\n\nThe `events` tool is included in the GLFW source tree as `tests/events.c` and is\nbuilt along with the library.  It prints all information provided to every\ncallback supported by GLFW as events occur.  Each event is listed with the time\nand a unique number to make discussions about event logs easier.  The tool has\ncommand-line options for creating multiple windows and full screen windows.\n\nAlways include the __operating system name and version__ (e.g. `Windows\n7 64-bit` or `Ubuntu 15.10`).  If you are using an official release of GLFW,\ninclude the __GLFW release version__ (e.g. `3.1.2`), otherwise include the\n__GLFW commit ID__ (e.g.  `3795d78b14ef06008889cc422a1fb8d642597751`) from Git.\n\nIf you are running your program in a virtual machine, please mention this and\ninclude the __VM name and version__ (e.g. `VirtualBox 5.1`).\n\nPlease also include any __error messages__ provided to your application via the\n[error\ncallback](https://www.glfw.org/docs/latest/intro_guide.html#error_handling) and\nif relevant, the __output of `events`__ when reporting this kind of bug.  If\nthis tool doesn't run on the machine, mention this instead.\n\n__X11:__ If possible, please include what desktop environment (e.g. GNOME,\nUnity, KDE) and/or window manager (e.g. Openbox, dwm, Window Maker) you are\nrunning.  If the bug is related to keyboard input, please include any input\nmethod (e.g. ibus, SCIM) you are using.\n\n\n#### Quick template\n\n```\nOS and version:\nRelease or commit:\nError messages:\nevents output:\n```\n\n\n### Reporting some other library bug\n\nAlways include the __operating system name and version__ (e.g. `Windows\n7 64-bit` or `Ubuntu 15.10`).  If you are using an official release of GLFW,\ninclude the __GLFW release version__ (e.g. `3.1.2`), otherwise include the\n__GLFW commit ID__ (e.g.  `3795d78b14ef06008889cc422a1fb8d642597751`) from Git.\n\nPlease also include any __error messages__ provided to your application via the\n[error\ncallback](https://www.glfw.org/docs/latest/intro_guide.html#error_handling), if\nrelevant.\n\n\n#### Quick template\n\n```\nOS and version:\nRelease or commit:\nError messages:\n```\n\n\n### Reporting a documentation bug\n\nIf you found a bug in the documentation, including this file, then it's fine to\njust link to that web page or mention that source file.  You don't need to match\nthe source to the output or vice versa.\n\n\n### Reporting a website bug\n\nIf the bug is in the documentation (anything under `/docs/`) then please see the\nsection above.  Bugs in the rest of the site are reported to the [website\nsource repository](https://github.com/glfw/website/issues).\n\n\n## Requesting a feature\n\nPlease explain why you need the feature and how you intend to use it.  If you\nhave a specific API design in mind, please add that as well.  If you have or are\nplanning to write code for the feature, see the section below.\n\nIf there already is a request for the feature you need, add your specific use\ncase unless it is already mentioned.  If it is, give it a :+1:.\n\n\n## Contributing a bug fix\n\n__Note:__ You must have all necessary [intellectual\nproperty rights](https://en.wikipedia.org/wiki/Intellectual_property) to any\ncode you contribute.  If you did not write the code yourself, you must explain\nwhere it came from and under what license you received it.  Even code using the\nsame license as GLFW may not be copied without attribution.\n\n__There is no preferred patch size__.  A one character fix is just as welcome as\na thousand line one, if that is the appropriate size for the fix.\n\nIn addition to the code, a complete bug fix includes:\n\n- Change log entry in `README.md`, describing the incorrect behavior\n- Credits entries for all authors of the bug fix\n\nBug fixes will not be rejected because they don't include all the above parts,\nbut please keep in mind that maintainer time is finite and that there are many\nother bugs and features to work on.\n\nIf the patch fixes a bug introduced after the last release, it should not get\na change log entry.\n\nIf you haven't already, read the excellent article [How to Write a Git Commit\nMessage](https://chris.beams.io/posts/git-commit/).\n\n\n## Contributing a feature\n\n__Note:__ You must have all necessary rights to any code you contribute.  If you\ndid not write the code yourself, you must explain where it came from and under\nwhat license.  Even code using the same license as GLFW may not be copied\nwithout attribution.\n\n__Note:__ If you haven't already implemented the feature, check first if there\nalready is an open issue for it and if it's already being developed in an\n[experimental branch](https://github.com/glfw/glfw/branches/all).\n\n__There is no preferred patch size__.  A one character change is just as welcome\nas one adding a thousand line one, if that is the appropriate size for the\nfeature.\n\nIn addition to the code, a complete feature includes:\n\n- Change log entry in `README.md`, listing all new symbols\n- News page entry, briefly describing the feature\n- Guide documentation, with minimal examples, in the relevant guide\n- Reference documentation, with all applicable tags\n- Cross-references and mentions in appropriate places\n- Credits entries for all authors of the feature\n\nIf the feature requires platform-specific code, at minimum stubs must be added\nfor the new platform function to all supported and experimental platforms.\n\nIf it adds a new callback, support for it must be added to `tests/event.c`.\n\nIf it adds a new monitor property, support for it must be added to\n`tests/monitor.c`.\n\nIf it adds a new OpenGL, OpenGL ES or Vulkan option or extension, support\nfor it must be added to `tests/glfwinfo.c` and the behavior of the library when\nthe extension is missing documented in `docs/compat.dox`.\n\nIf you haven't already, read the excellent article [How to Write a Git Commit\nMessage](https://chris.beams.io/posts/git-commit/).\n\nFeatures will not be rejected because they don't include all the above parts,\nbut please keep in mind that maintainer time is finite and that there are many\nother features and bugs to work on.\n\nPlease also keep in mind that any part of the public API that has been included\nin a release cannot be changed until the next _major_ version.  Features can be\nadded and existing parts can sometimes be overloaded (in the general sense of\ndoing more things, not in the C++ sense), but code written to the API of one\nminor release should both compile and run on subsequent minor releases.\n\n"
  },
  {
    "path": "thirdparty/glfw/docs/Doxyfile.in",
    "content": "# Doxyfile 1.8.3.1\n\n# This file describes the settings to be used by the documentation system\n# doxygen (www.doxygen.org) for a project.\n#\n# All text after a hash (#) is considered a comment and will be ignored.\n# The format is:\n#       TAG = value [value, ...]\n# For lists items can also be appended using:\n#       TAG += value [value, ...]\n# Values that contain spaces should be placed between quotes (\" \").\n\n#---------------------------------------------------------------------------\n# Project related configuration options\n#---------------------------------------------------------------------------\n\n# This tag specifies the encoding used for all characters in the config file\n# that follow. The default is UTF-8 which is also the encoding used for all\n# text before the first occurrence of this tag. Doxygen uses libiconv (or the\n# iconv built into libc) for the transcoding. See\n# http://www.gnu.org/software/libiconv for the list of possible encodings.\n\nDOXYFILE_ENCODING      = UTF-8\n\n# The PROJECT_NAME tag is a single word (or sequence of words) that should\n# identify the project. Note that if you do not use Doxywizard you need\n# to put quotes around the project name if it contains spaces.\n\nPROJECT_NAME           = \"GLFW\"\n\n# The PROJECT_NUMBER tag can be used to enter a project or revision number.\n# This could be handy for archiving the generated documentation or\n# if some version control system is used.\n\nPROJECT_NUMBER         = @GLFW_VERSION@\n\n# Using the PROJECT_BRIEF tag one can provide an optional one line description\n# for a project that appears at the top of each page and should give viewer\n# a quick idea about the purpose of the project. Keep the description short.\n\nPROJECT_BRIEF          = \"A multi-platform library for OpenGL, window and input\"\n\n# With the PROJECT_LOGO tag one can specify an logo or icon that is\n# included in the documentation. The maximum height of the logo should not\n# exceed 55 pixels and the maximum width should not exceed 200 pixels.\n# Doxygen will copy the logo to the output directory.\n\nPROJECT_LOGO           =\n\n# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)\n# base path where the generated documentation will be put.\n# If a relative path is entered, it will be relative to the location\n# where doxygen was started. If left blank the current directory will be used.\n\nOUTPUT_DIRECTORY       = \"@GLFW_BINARY_DIR@/docs\"\n\n# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create\n# 4096 sub-directories (in 2 levels) under the output directory of each output\n# format and will distribute the generated files over these directories.\n# Enabling this option can be useful when feeding doxygen a huge amount of\n# source files, where putting all generated files in the same directory would\n# otherwise cause performance problems for the file system.\n\nCREATE_SUBDIRS         = NO\n\n# The OUTPUT_LANGUAGE tag is used to specify the language in which all\n# documentation generated by doxygen is written. Doxygen will use this\n# information to generate all constant output in the proper language.\n# The default language is English, other supported languages are:\n# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional,\n# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German,\n# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English\n# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian,\n# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak,\n# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese.\n\nOUTPUT_LANGUAGE        = English\n\n# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will\n# include brief member descriptions after the members that are listed in\n# the file and class documentation (similar to JavaDoc).\n# Set to NO to disable this.\n\nBRIEF_MEMBER_DESC      = YES\n\n# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend\n# the brief description of a member or function before the detailed description.\n# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the\n# brief descriptions will be completely suppressed.\n\nREPEAT_BRIEF           = NO\n\n# This tag implements a quasi-intelligent brief description abbreviator\n# that is used to form the text in various listings. Each string\n# in this list, if found as the leading text of the brief description, will be\n# stripped from the text and the result after processing the whole list, is\n# used as the annotated text. Otherwise, the brief description is used as-is.\n# If left blank, the following values are used (\"$name\" is automatically\n# replaced with the name of the entity): \"The $name class\" \"The $name widget\"\n# \"The $name file\" \"is\" \"provides\" \"specifies\" \"contains\"\n# \"represents\" \"a\" \"an\" \"the\"\n\nABBREVIATE_BRIEF       =\n\n# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then\n# Doxygen will generate a detailed section even if there is only a brief\n# description.\n\nALWAYS_DETAILED_SEC    = YES\n\n# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all\n# inherited members of a class in the documentation of that class as if those\n# members were ordinary class members. Constructors, destructors and assignment\n# operators of the base classes will not be shown.\n\nINLINE_INHERITED_MEMB  = NO\n\n# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full\n# path before files name in the file list and in the header files. If set\n# to NO the shortest path that makes the file name unique will be used.\n\nFULL_PATH_NAMES        = NO\n\n# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag\n# can be used to strip a user-defined part of the path. Stripping is\n# only done if one of the specified strings matches the left-hand part of\n# the path. The tag can be used to show relative paths in the file list.\n# If left blank the directory from which doxygen is run is used as the\n# path to strip. Note that you specify absolute paths here, but also\n# relative paths, which will be relative from the directory where doxygen is\n# started.\n\nSTRIP_FROM_PATH        =\n\n# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of\n# the path mentioned in the documentation of a class, which tells\n# the reader which header file to include in order to use a class.\n# If left blank only the name of the header file containing the class\n# definition is used. Otherwise one should specify the include paths that\n# are normally passed to the compiler using the -I flag.\n\nSTRIP_FROM_INC_PATH    =\n\n# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter\n# (but less readable) file names. This can be useful if your file system\n# doesn't support long names like on DOS, Mac, or CD-ROM.\n\nSHORT_NAMES            = NO\n\n# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen\n# will interpret the first line (until the first dot) of a JavaDoc-style\n# comment as the brief description. If set to NO, the JavaDoc\n# comments will behave just like regular Qt-style comments\n# (thus requiring an explicit @brief command for a brief description.)\n\nJAVADOC_AUTOBRIEF      = NO\n\n# If the QT_AUTOBRIEF tag is set to YES then Doxygen will\n# interpret the first line (until the first dot) of a Qt-style\n# comment as the brief description. If set to NO, the comments\n# will behave just like regular Qt-style comments (thus requiring\n# an explicit \\brief command for a brief description.)\n\nQT_AUTOBRIEF           = NO\n\n# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen\n# treat a multi-line C++ special comment block (i.e. a block of //! or ///\n# comments) as a brief description. This used to be the default behaviour.\n# The new default is to treat a multi-line C++ comment block as a detailed\n# description. Set this tag to YES if you prefer the old behaviour instead.\n\nMULTILINE_CPP_IS_BRIEF = NO\n\n# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented\n# member inherits the documentation from any documented member that it\n# re-implements.\n\nINHERIT_DOCS           = YES\n\n# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce\n# a new page for each member. If set to NO, the documentation of a member will\n# be part of the file/class/namespace that contains it.\n\nSEPARATE_MEMBER_PAGES  = NO\n\n# The TAB_SIZE tag can be used to set the number of spaces in a tab.\n# Doxygen uses this value to replace tabs by spaces in code fragments.\n\nTAB_SIZE               = 8\n\n# This tag can be used to specify a number of aliases that acts\n# as commands in the documentation. An alias has the form \"name=value\".\n# For example adding \"sideeffect=\\par Side Effects:\\n\" will allow you to\n# put the command \\sideeffect (or @sideeffect) in the documentation, which\n# will result in a user-defined paragraph with heading \"Side Effects:\".\n# You can put \\n's in the value part of an alias to insert newlines.\n\nALIASES                = \"thread_safety=@par Thread safety^^\" \\\n                         \"pointer_lifetime=@par Pointer lifetime^^\" \\\n                         \"analysis=@par Analysis^^\" \\\n                         \"reentrancy=@par Reentrancy^^\" \\\n                         \"errors=@par Errors^^\" \\\n                         \"callback_signature=@par Callback signature^^\" \\\n                         \"glfw3=__GLFW 3:__\" \\\n                         \"x11=__X11:__\" \\\n                         \"wayland=__Wayland:__\" \\\n                         \"win32=__Windows:__\" \\\n                         \"macos=__macOS:__\" \\\n                         \"linux=__Linux:__\"\n\n# This tag can be used to specify a number of word-keyword mappings (TCL only).\n# A mapping has the form \"name=value\". For example adding\n# \"class=itcl::class\" will allow you to use the command class in the\n# itcl::class meaning.\n\nTCL_SUBST              =\n\n# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C\n# sources only. Doxygen will then generate output that is more tailored for C.\n# For instance, some of the names that are used will be different. The list\n# of all members will be omitted, etc.\n\nOPTIMIZE_OUTPUT_FOR_C  = YES\n\n# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java\n# sources only. Doxygen will then generate output that is more tailored for\n# Java. For instance, namespaces will be presented as packages, qualified\n# scopes will look different, etc.\n\nOPTIMIZE_OUTPUT_JAVA   = NO\n\n# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran\n# sources only. Doxygen will then generate output that is more tailored for\n# Fortran.\n\nOPTIMIZE_FOR_FORTRAN   = NO\n\n# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL\n# sources. Doxygen will then generate output that is tailored for\n# VHDL.\n\nOPTIMIZE_OUTPUT_VHDL   = NO\n\n# Doxygen selects the parser to use depending on the extension of the files it\n# parses. With this tag you can assign which parser to use for a given\n# extension. Doxygen has a built-in mapping, but you can override or extend it\n# using this tag. The format is ext=language, where ext is a file extension,\n# and language is one of the parsers supported by doxygen: IDL, Java,\n# Javascript, CSharp, C, C++, D, PHP, Objective-C, Python, Fortran, VHDL, C,\n# C++. For instance to make doxygen treat .inc files as Fortran files (default\n# is PHP), and .f files as C (default is Fortran), use: inc=Fortran f=C. Note\n# that for custom extensions you also need to set FILE_PATTERNS otherwise the\n# files are not read by doxygen.\n\nEXTENSION_MAPPING      =\n\n# If MARKDOWN_SUPPORT is enabled (the default) then doxygen pre-processes all\n# comments according to the Markdown format, which allows for more readable\n# documentation. See http://daringfireball.net/projects/markdown/ for details.\n# The output of markdown processing is further processed by doxygen, so you\n# can mix doxygen, HTML, and XML commands with Markdown formatting.\n# Disable only in case of backward compatibilities issues.\n\nMARKDOWN_SUPPORT       = YES\n\n# When enabled doxygen tries to link words that correspond to documented classes,\n# or namespaces to their corresponding documentation. Such a link can be\n# prevented in individual cases by putting a % sign in front of the word or\n# globally by setting AUTOLINK_SUPPORT to NO.\n\nAUTOLINK_SUPPORT       = YES\n\n# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want\n# to include (a tag file for) the STL sources as input, then you should\n# set this tag to YES in order to let doxygen match functions declarations and\n# definitions whose arguments contain STL classes (e.g. func(std::string); v.s.\n# func(std::string) {}). This also makes the inheritance and collaboration\n# diagrams that involve STL classes more complete and accurate.\n\nBUILTIN_STL_SUPPORT    = NO\n\n# If you use Microsoft's C++/CLI language, you should set this option to YES to\n# enable parsing support.\n\nCPP_CLI_SUPPORT        = NO\n\n# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only.\n# Doxygen will parse them like normal C++ but will assume all classes use public\n# instead of private inheritance when no explicit protection keyword is present.\n\nSIP_SUPPORT            = NO\n\n# For Microsoft's IDL there are propget and propput attributes to indicate\n# getter and setter methods for a property. Setting this option to YES (the\n# default) will make doxygen replace the get and set methods by a property in\n# the documentation. This will only work if the methods are indeed getting or\n# setting a simple type. If this is not the case, or you want to show the\n# methods anyway, you should set this option to NO.\n\nIDL_PROPERTY_SUPPORT   = NO\n\n# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC\n# tag is set to YES, then doxygen will reuse the documentation of the first\n# member in the group (if any) for the other members of the group. By default\n# all members of a group must be documented explicitly.\n\nDISTRIBUTE_GROUP_DOC   = NO\n\n# Set the SUBGROUPING tag to YES (the default) to allow class member groups of\n# the same type (for instance a group of public functions) to be put as a\n# subgroup of that type (e.g. under the Public Functions section). Set it to\n# NO to prevent subgrouping. Alternatively, this can be done per class using\n# the \\nosubgrouping command.\n\nSUBGROUPING            = YES\n\n# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and\n# unions are shown inside the group in which they are included (e.g. using\n# @ingroup) instead of on a separate page (for HTML and Man pages) or\n# section (for LaTeX and RTF).\n\nINLINE_GROUPED_CLASSES = NO\n\n# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and\n# unions with only public data fields will be shown inline in the documentation\n# of the scope in which they are defined (i.e. file, namespace, or group\n# documentation), provided this scope is documented. If set to NO (the default),\n# structs, classes, and unions are shown on a separate page (for HTML and Man\n# pages) or section (for LaTeX and RTF).\n\nINLINE_SIMPLE_STRUCTS  = NO\n\n# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum\n# is documented as struct, union, or enum with the name of the typedef. So\n# typedef struct TypeS {} TypeT, will appear in the documentation as a struct\n# with name TypeT. When disabled the typedef will appear as a member of a file,\n# namespace, or class. And the struct will be named TypeS. This can typically\n# be useful for C code in case the coding convention dictates that all compound\n# types are typedef'ed and only the typedef is referenced, never the tag name.\n\nTYPEDEF_HIDES_STRUCT   = NO\n\n# Similar to the SYMBOL_CACHE_SIZE the size of the symbol lookup cache can be\n# set using LOOKUP_CACHE_SIZE. This cache is used to resolve symbols given\n# their name and scope. Since this can be an expensive process and often the\n# same symbol appear multiple times in the code, doxygen keeps a cache of\n# pre-resolved symbols. If the cache is too small doxygen will become slower.\n# If the cache is too large, memory is wasted. The cache size is given by this\n# formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range is 0..9, the default is 0,\n# corresponding to a cache size of 2^16 = 65536 symbols.\n\nLOOKUP_CACHE_SIZE      = 0\n\n#---------------------------------------------------------------------------\n# Build related configuration options\n#---------------------------------------------------------------------------\n\n# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in\n# documentation are documented, even if no documentation was available.\n# Private class members and static file members will be hidden unless\n# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES\n\nEXTRACT_ALL            = YES\n\n# If the EXTRACT_PRIVATE tag is set to YES all private members of a class\n# will be included in the documentation.\n\nEXTRACT_PRIVATE        = NO\n\n# If the EXTRACT_PACKAGE tag is set to YES all members with package or internal\n# scope will be included in the documentation.\n\nEXTRACT_PACKAGE        = NO\n\n# If the EXTRACT_STATIC tag is set to YES all static members of a file\n# will be included in the documentation.\n\nEXTRACT_STATIC         = NO\n\n# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs)\n# defined locally in source files will be included in the documentation.\n# If set to NO only classes defined in header files are included.\n\nEXTRACT_LOCAL_CLASSES  = YES\n\n# This flag is only useful for Objective-C code. When set to YES local\n# methods, which are defined in the implementation section but not in\n# the interface are included in the documentation.\n# If set to NO (the default) only methods in the interface are included.\n\nEXTRACT_LOCAL_METHODS  = NO\n\n# If this flag is set to YES, the members of anonymous namespaces will be\n# extracted and appear in the documentation as a namespace called\n# 'anonymous_namespace{file}', where file will be replaced with the base\n# name of the file that contains the anonymous namespace. By default\n# anonymous namespaces are hidden.\n\nEXTRACT_ANON_NSPACES   = NO\n\n# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all\n# undocumented members of documented classes, files or namespaces.\n# If set to NO (the default) these members will be included in the\n# various overviews, but no documentation section is generated.\n# This option has no effect if EXTRACT_ALL is enabled.\n\nHIDE_UNDOC_MEMBERS     = NO\n\n# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all\n# undocumented classes that are normally visible in the class hierarchy.\n# If set to NO (the default) these classes will be included in the various\n# overviews. This option has no effect if EXTRACT_ALL is enabled.\n\nHIDE_UNDOC_CLASSES     = NO\n\n# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all\n# friend (class|struct|union) declarations.\n# If set to NO (the default) these declarations will be included in the\n# documentation.\n\nHIDE_FRIEND_COMPOUNDS  = NO\n\n# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any\n# documentation blocks found inside the body of a function.\n# If set to NO (the default) these blocks will be appended to the\n# function's detailed documentation block.\n\nHIDE_IN_BODY_DOCS      = NO\n\n# The INTERNAL_DOCS tag determines if documentation\n# that is typed after a \\internal command is included. If the tag is set\n# to NO (the default) then the documentation will be excluded.\n# Set it to YES to include the internal documentation.\n\nINTERNAL_DOCS          = NO\n\n# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate\n# file names in lower-case letters. If set to YES upper-case letters are also\n# allowed. This is useful if you have classes or files whose names only differ\n# in case and if your file system supports case sensitive file names. Windows\n# and Mac users are advised to set this option to NO.\n\nCASE_SENSE_NAMES       = YES\n\n# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen\n# will show members with their full class and namespace scopes in the\n# documentation. If set to YES the scope will be hidden.\n\nHIDE_SCOPE_NAMES       = NO\n\n# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen\n# will put a list of the files that are included by a file in the documentation\n# of that file.\n\nSHOW_INCLUDE_FILES     = NO\n\n# If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen\n# will list include files with double quotes in the documentation\n# rather than with sharp brackets.\n\nFORCE_LOCAL_INCLUDES   = NO\n\n# If the INLINE_INFO tag is set to YES (the default) then a tag [inline]\n# is inserted in the documentation for inline members.\n\nINLINE_INFO            = YES\n\n# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen\n# will sort the (detailed) documentation of file and class members\n# alphabetically by member name. If set to NO the members will appear in\n# declaration order.\n\nSORT_MEMBER_DOCS       = NO\n\n# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the\n# brief documentation of file, namespace and class members alphabetically\n# by member name. If set to NO (the default) the members will appear in\n# declaration order.\n\nSORT_BRIEF_DOCS        = NO\n\n# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen\n# will sort the (brief and detailed) documentation of class members so that\n# constructors and destructors are listed first. If set to NO (the default)\n# the constructors will appear in the respective orders defined by\n# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS.\n# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO\n# and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO.\n\nSORT_MEMBERS_CTORS_1ST = NO\n\n# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the\n# hierarchy of group names into alphabetical order. If set to NO (the default)\n# the group names will appear in their defined order.\n\nSORT_GROUP_NAMES       = YES\n\n# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be\n# sorted by fully-qualified names, including namespaces. If set to\n# NO (the default), the class list will be sorted only by class name,\n# not including the namespace part.\n# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.\n# Note: This option applies only to the class list, not to the\n# alphabetical list.\n\nSORT_BY_SCOPE_NAME     = NO\n\n# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to\n# do proper type resolution of all parameters of a function it will reject a\n# match between the prototype and the implementation of a member function even\n# if there is only one candidate or it is obvious which candidate to choose\n# by doing a simple string match. By disabling STRICT_PROTO_MATCHING doxygen\n# will still accept a match between prototype and implementation in such cases.\n\nSTRICT_PROTO_MATCHING  = NO\n\n# The GENERATE_TODOLIST tag can be used to enable (YES) or\n# disable (NO) the todo list. This list is created by putting \\todo\n# commands in the documentation.\n\nGENERATE_TODOLIST      = YES\n\n# The GENERATE_TESTLIST tag can be used to enable (YES) or\n# disable (NO) the test list. This list is created by putting \\test\n# commands in the documentation.\n\nGENERATE_TESTLIST      = YES\n\n# The GENERATE_BUGLIST tag can be used to enable (YES) or\n# disable (NO) the bug list. This list is created by putting \\bug\n# commands in the documentation.\n\nGENERATE_BUGLIST       = YES\n\n# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or\n# disable (NO) the deprecated list. This list is created by putting\n# \\deprecated commands in the documentation.\n\nGENERATE_DEPRECATEDLIST= YES\n\n# The ENABLED_SECTIONS tag can be used to enable conditional\n# documentation sections, marked by \\if section-label ... \\endif\n# and \\cond section-label ... \\endcond blocks.\n\nENABLED_SECTIONS       =\n\n# The MAX_INITIALIZER_LINES tag determines the maximum number of lines\n# the initial value of a variable or macro consists of for it to appear in\n# the documentation. If the initializer consists of more lines than specified\n# here it will be hidden. Use a value of 0 to hide initializers completely.\n# The appearance of the initializer of individual variables and macros in the\n# documentation can be controlled using \\showinitializer or \\hideinitializer\n# command in the documentation regardless of this setting.\n\nMAX_INITIALIZER_LINES  = 30\n\n# Set the SHOW_USED_FILES tag to NO to disable the list of files generated\n# at the bottom of the documentation of classes and structs. If set to YES the\n# list will mention the files that were used to generate the documentation.\n\nSHOW_USED_FILES        = YES\n\n# Set the SHOW_FILES tag to NO to disable the generation of the Files page.\n# This will remove the Files entry from the Quick Index and from the\n# Folder Tree View (if specified). The default is YES.\n\nSHOW_FILES             = YES\n\n# Set the SHOW_NAMESPACES tag to NO to disable the generation of the\n# Namespaces page.\n# This will remove the Namespaces entry from the Quick Index\n# and from the Folder Tree View (if specified). The default is YES.\n\nSHOW_NAMESPACES        = NO\n\n# The FILE_VERSION_FILTER tag can be used to specify a program or script that\n# doxygen should invoke to get the current version for each file (typically from\n# the version control system). Doxygen will invoke the program by executing (via\n# popen()) the command <command> <input-file>, where <command> is the value of\n# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file\n# provided by doxygen. Whatever the program writes to standard output\n# is used as the file version. See the manual for examples.\n\nFILE_VERSION_FILTER    =\n\n# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed\n# by doxygen. The layout file controls the global structure of the generated\n# output files in an output format independent way. To create the layout file\n# that represents doxygen's defaults, run doxygen with the -l option.\n# You can optionally specify a file name after the option, if omitted\n# DoxygenLayout.xml will be used as the name of the layout file.\n\nLAYOUT_FILE            = \"@GLFW_SOURCE_DIR@/docs/DoxygenLayout.xml\"\n\n# The CITE_BIB_FILES tag can be used to specify one or more bib files\n# containing the references data. This must be a list of .bib files. The\n# .bib extension is automatically appended if omitted. Using this command\n# requires the bibtex tool to be installed. See also\n# http://en.wikipedia.org/wiki/BibTeX for more info. For LaTeX the style\n# of the bibliography can be controlled using LATEX_BIB_STYLE. To use this\n# feature you need bibtex and perl available in the search path. Do not use\n# file names with spaces, bibtex cannot handle them.\n\nCITE_BIB_FILES         =\n\n#---------------------------------------------------------------------------\n# configuration options related to warning and progress messages\n#---------------------------------------------------------------------------\n\n# The QUIET tag can be used to turn on/off the messages that are generated\n# by doxygen. Possible values are YES and NO. If left blank NO is used.\n\nQUIET                  = YES\n\n# The WARNINGS tag can be used to turn on/off the warning messages that are\n# generated by doxygen. Possible values are YES and NO. If left blank\n# NO is used.\n\nWARNINGS               = YES\n\n# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings\n# for undocumented members. If EXTRACT_ALL is set to YES then this flag will\n# automatically be disabled.\n\nWARN_IF_UNDOCUMENTED   = YES\n\n# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for\n# potential errors in the documentation, such as not documenting some\n# parameters in a documented function, or documenting parameters that\n# don't exist or using markup commands wrongly.\n\nWARN_IF_DOC_ERROR      = YES\n\n# The WARN_NO_PARAMDOC option can be enabled to get warnings for\n# functions that are documented, but have no documentation for their parameters\n# or return value. If set to NO (the default) doxygen will only warn about\n# wrong or incomplete parameter documentation, but not about the absence of\n# documentation.\n\nWARN_NO_PARAMDOC       = YES\n\n# The WARN_FORMAT tag determines the format of the warning messages that\n# doxygen can produce. The string should contain the $file, $line, and $text\n# tags, which will be replaced by the file and line number from which the\n# warning originated and the warning text. Optionally the format may contain\n# $version, which will be replaced by the version of the file (if it could\n# be obtained via FILE_VERSION_FILTER)\n\nWARN_FORMAT            = \"$file:$line: $text\"\n\n# The WARN_LOGFILE tag can be used to specify a file to which warning\n# and error messages should be written. If left blank the output is written\n# to stderr.\n\nWARN_LOGFILE           = \"@GLFW_BINARY_DIR@/docs/warnings.txt\"\n\n#---------------------------------------------------------------------------\n# configuration options related to the input files\n#---------------------------------------------------------------------------\n\n# The INPUT tag can be used to specify the files and/or directories that contain\n# documented source files. You may enter file names like \"myfile.cpp\" or\n# directories like \"/usr/src/myproject\". Separate the files or directories\n# with spaces.\n\nINPUT                  = @GLFW_DOXYGEN_INPUT@\n\n# This tag can be used to specify the character encoding of the source files\n# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is\n# also the default input encoding. Doxygen uses libiconv (or the iconv built\n# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for\n# the list of possible encodings.\n\nINPUT_ENCODING         = UTF-8\n\n# If the value of the INPUT tag contains directories, you can use the\n# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp\n# and *.h) to filter out the source-files in the directories. If left\n# blank the following patterns are tested:\n# *.c *.cc *.cxx *.cpp *.c++ *.d *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh\n# *.hxx *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.dox *.py\n# *.f90 *.f *.for *.vhd *.vhdl\n\nFILE_PATTERNS          = *.h *.dox\n\n# The RECURSIVE tag can be used to turn specify whether or not subdirectories\n# should be searched for input files as well. Possible values are YES and NO.\n# If left blank NO is used.\n\nRECURSIVE              = NO\n\n# The EXCLUDE tag can be used to specify files and/or directories that should be\n# excluded from the INPUT source files. This way you can easily exclude a\n# subdirectory from a directory tree whose root is specified with the INPUT tag.\n# Note that relative paths are relative to the directory from which doxygen is\n# run.\n\nEXCLUDE                =\n\n# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or\n# directories that are symbolic links (a Unix file system feature) are excluded\n# from the input.\n\nEXCLUDE_SYMLINKS       = NO\n\n# If the value of the INPUT tag contains directories, you can use the\n# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude\n# certain files from those directories. Note that the wildcards are matched\n# against the file with absolute path, so to exclude all test directories\n# for example use the pattern */test/*\n\nEXCLUDE_PATTERNS       =\n\n# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names\n# (namespaces, classes, functions, etc.) that should be excluded from the\n# output. The symbol name can be a fully qualified name, a word, or if the\n# wildcard * is used, a substring. Examples: ANamespace, AClass,\n# AClass::ANamespace, ANamespace::*Test\n\nEXCLUDE_SYMBOLS        = APIENTRY GLFWAPI\n\n# The EXAMPLE_PATH tag can be used to specify one or more files or\n# directories that contain example code fragments that are included (see\n# the \\include command).\n\nEXAMPLE_PATH           = \"@GLFW_SOURCE_DIR@/examples\"\n\n# If the value of the EXAMPLE_PATH tag contains directories, you can use the\n# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp\n# and *.h) to filter out the source-files in the directories. If left\n# blank all files are included.\n\nEXAMPLE_PATTERNS       =\n\n# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be\n# searched for input files to be used with the \\include or \\dontinclude\n# commands irrespective of the value of the RECURSIVE tag.\n# Possible values are YES and NO. If left blank NO is used.\n\nEXAMPLE_RECURSIVE      = NO\n\n# The IMAGE_PATH tag can be used to specify one or more files or\n# directories that contain image that are included in the documentation (see\n# the \\image command).\n\nIMAGE_PATH             =\n\n# The INPUT_FILTER tag can be used to specify a program that doxygen should\n# invoke to filter for each input file. Doxygen will invoke the filter program\n# by executing (via popen()) the command <filter> <input-file>, where <filter>\n# is the value of the INPUT_FILTER tag, and <input-file> is the name of an\n# input file. Doxygen will then use the output that the filter program writes\n# to standard output.\n# If FILTER_PATTERNS is specified, this tag will be\n# ignored.\n\nINPUT_FILTER           =\n\n# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern\n# basis.\n# Doxygen will compare the file name with each pattern and apply the\n# filter if there is a match.\n# The filters are a list of the form:\n# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further\n# info on how filters are used. If FILTER_PATTERNS is empty or if\n# non of the patterns match the file name, INPUT_FILTER is applied.\n\nFILTER_PATTERNS        =\n\n# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using\n# INPUT_FILTER) will be used to filter the input files when producing source\n# files to browse (i.e. when SOURCE_BROWSER is set to YES).\n\nFILTER_SOURCE_FILES    = NO\n\n# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file\n# pattern. A pattern will override the setting for FILTER_PATTERN (if any)\n# and it is also possible to disable source filtering for a specific pattern\n# using *.ext= (so without naming a filter). This option only has effect when\n# FILTER_SOURCE_FILES is enabled.\n\nFILTER_SOURCE_PATTERNS =\n\n# If the USE_MD_FILE_AS_MAINPAGE tag refers to the name of a markdown file that\n# is part of the input, its contents will be placed on the main page (index.html).\n# This can be useful if you have a project on for instance GitHub and want reuse\n# the introduction page also for the doxygen output.\n\nUSE_MDFILE_AS_MAINPAGE =\n\n#---------------------------------------------------------------------------\n# configuration options related to source browsing\n#---------------------------------------------------------------------------\n\n# If the SOURCE_BROWSER tag is set to YES then a list of source files will\n# be generated. Documented entities will be cross-referenced with these sources.\n# Note: To get rid of all source code in the generated output, make sure also\n# VERBATIM_HEADERS is set to NO.\n\nSOURCE_BROWSER         = NO\n\n# Setting the INLINE_SOURCES tag to YES will include the body\n# of functions and classes directly in the documentation.\n\nINLINE_SOURCES         = NO\n\n# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct\n# doxygen to hide any special comment blocks from generated source code\n# fragments. Normal C, C++ and Fortran comments will always remain visible.\n\nSTRIP_CODE_COMMENTS    = YES\n\n# If the REFERENCED_BY_RELATION tag is set to YES\n# then for each documented function all documented\n# functions referencing it will be listed.\n\nREFERENCED_BY_RELATION = NO\n\n# If the REFERENCES_RELATION tag is set to YES\n# then for each documented function all documented entities\n# called/used by that function will be listed.\n\nREFERENCES_RELATION    = NO\n\n# If the REFERENCES_LINK_SOURCE tag is set to YES (the default)\n# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from\n# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will\n# link to the source code.\n# Otherwise they will link to the documentation.\n\nREFERENCES_LINK_SOURCE = YES\n\n# If the USE_HTAGS tag is set to YES then the references to source code\n# will point to the HTML generated by the htags(1) tool instead of doxygen\n# built-in source browser. The htags tool is part of GNU's global source\n# tagging system (see http://www.gnu.org/software/global/global.html). You\n# will need version 4.8.6 or higher.\n\nUSE_HTAGS              = NO\n\n# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen\n# will generate a verbatim copy of the header file for each class for\n# which an include is specified. Set to NO to disable this.\n\nVERBATIM_HEADERS       = YES\n\n#---------------------------------------------------------------------------\n# configuration options related to the alphabetical class index\n#---------------------------------------------------------------------------\n\n# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index\n# of all compounds will be generated. Enable this if the project\n# contains a lot of classes, structs, unions or interfaces.\n\nALPHABETICAL_INDEX     = YES\n\n# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then\n# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns\n# in which this list will be split (can be a number in the range [1..20])\n\nCOLS_IN_ALPHA_INDEX    = 5\n\n# In case all classes in a project start with a common prefix, all\n# classes will be put under the same header in the alphabetical index.\n# The IGNORE_PREFIX tag can be used to specify one or more prefixes that\n# should be ignored while generating the index headers.\n\nIGNORE_PREFIX          = glfw GLFW_\n\n#---------------------------------------------------------------------------\n# configuration options related to the HTML output\n#---------------------------------------------------------------------------\n\n# If the GENERATE_HTML tag is set to YES (the default) Doxygen will\n# generate HTML output.\n\nGENERATE_HTML          = YES\n\n# The HTML_OUTPUT tag is used to specify where the HTML docs will be put.\n# If a relative path is entered the value of OUTPUT_DIRECTORY will be\n# put in front of it. If left blank `html' will be used as the default path.\n\nHTML_OUTPUT            = html\n\n# The HTML_FILE_EXTENSION tag can be used to specify the file extension for\n# each generated HTML page (for example: .htm,.php,.asp). If it is left blank\n# doxygen will generate files with .html extension.\n\nHTML_FILE_EXTENSION    = .html\n\n# The HTML_HEADER tag can be used to specify a personal HTML header for\n# each generated HTML page. If it is left blank doxygen will generate a\n# standard header. Note that when using a custom header you are responsible\n#  for the proper inclusion of any scripts and style sheets that doxygen\n# needs, which is dependent on the configuration options used.\n# It is advised to generate a default header using \"doxygen -w html\n# header.html footer.html stylesheet.css YourConfigFile\" and then modify\n# that header. Note that the header is subject to change so you typically\n# have to redo this when upgrading to a newer version of doxygen or when\n# changing the value of configuration settings such as GENERATE_TREEVIEW!\n\nHTML_HEADER            = \"@GLFW_SOURCE_DIR@/docs/header.html\"\n\n# The HTML_FOOTER tag can be used to specify a personal HTML footer for\n# each generated HTML page. If it is left blank doxygen will generate a\n# standard footer.\n\nHTML_FOOTER            = \"@GLFW_SOURCE_DIR@/docs/footer.html\"\n\n# The HTML_STYLESHEET tag can be used to specify a user-defined cascading\n# style sheet that is used by each HTML page. It can be used to\n# fine-tune the look of the HTML output. If left blank doxygen will\n# generate a default style sheet. Note that it is recommended to use\n# HTML_EXTRA_STYLESHEET instead of this one, as it is more robust and this\n# tag will in the future become obsolete.\n\nHTML_STYLESHEET        =\n\n# The HTML_EXTRA_STYLESHEET tag can be used to specify an additional\n# user-defined cascading style sheet that is included after the standard\n# style sheets created by doxygen. Using this option one can overrule\n# certain style aspects. This is preferred over using HTML_STYLESHEET\n# since it does not replace the standard style sheet and is therefor more\n# robust against future updates. Doxygen will copy the style sheet file to\n# the output directory.\n\nHTML_EXTRA_STYLESHEET  = \"@GLFW_SOURCE_DIR@/docs/extra.css\"\n\n# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or\n# other source files which should be copied to the HTML output directory. Note\n# that these files will be copied to the base HTML output directory. Use the\n# $relpath$ marker in the HTML_HEADER and/or HTML_FOOTER files to load these\n# files. In the HTML_STYLESHEET file, use the file name only. Also note that\n# the files will be copied as-is; there are no commands or markers available.\n\nHTML_EXTRA_FILES       = \"@GLFW_SOURCE_DIR@/docs/spaces.svg\"\n\n# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output.\n# Doxygen will adjust the colors in the style sheet and background images\n# according to this color. Hue is specified as an angle on a colorwheel,\n# see http://en.wikipedia.org/wiki/Hue for more information.\n# For instance the value 0 represents red, 60 is yellow, 120 is green,\n# 180 is cyan, 240 is blue, 300 purple, and 360 is red again.\n# The allowed range is 0 to 359.\n\nHTML_COLORSTYLE_HUE    = 220\n\n# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of\n# the colors in the HTML output. For a value of 0 the output will use\n# grayscales only. A value of 255 will produce the most vivid colors.\n\nHTML_COLORSTYLE_SAT    = 100\n\n# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to\n# the luminance component of the colors in the HTML output. Values below\n# 100 gradually make the output lighter, whereas values above 100 make\n# the output darker. The value divided by 100 is the actual gamma applied,\n# so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2,\n# and 100 does not change the gamma.\n\nHTML_COLORSTYLE_GAMMA  = 80\n\n# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML\n# page will contain the date and time when the page was generated. Setting\n# this to NO can help when comparing the output of multiple runs.\n\nHTML_TIMESTAMP         = YES\n\n# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML\n# documentation will contain sections that can be hidden and shown after the\n# page has loaded.\n\nHTML_DYNAMIC_SECTIONS  = NO\n\n# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of\n# entries shown in the various tree structured indices initially; the user\n# can expand and collapse entries dynamically later on. Doxygen will expand\n# the tree to such a level that at most the specified number of entries are\n# visible (unless a fully collapsed tree already exceeds this amount).\n# So setting the number of entries 1 will produce a full collapsed tree by\n# default. 0 is a special value representing an infinite number of entries\n# and will result in a full expanded tree by default.\n\nHTML_INDEX_NUM_ENTRIES = 100\n\n# If the GENERATE_DOCSET tag is set to YES, additional index files\n# will be generated that can be used as input for Apple's Xcode 3\n# integrated development environment, introduced with OSX 10.5 (Leopard).\n# To create a documentation set, doxygen will generate a Makefile in the\n# HTML output directory. Running make will produce the docset in that\n# directory and running \"make install\" will install the docset in\n# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find\n# it at startup.\n# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html\n# for more information.\n\nGENERATE_DOCSET        = NO\n\n# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the\n# feed. A documentation feed provides an umbrella under which multiple\n# documentation sets from a single provider (such as a company or product suite)\n# can be grouped.\n\nDOCSET_FEEDNAME        = \"Doxygen generated docs\"\n\n# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that\n# should uniquely identify the documentation set bundle. This should be a\n# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen\n# will append .docset to the name.\n\nDOCSET_BUNDLE_ID       = org.doxygen.Project\n\n# When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely\n# identify the documentation publisher. This should be a reverse domain-name\n# style string, e.g. com.mycompany.MyDocSet.documentation.\n\nDOCSET_PUBLISHER_ID    = org.doxygen.Publisher\n\n# The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher.\n\nDOCSET_PUBLISHER_NAME  = Publisher\n\n# If the GENERATE_HTMLHELP tag is set to YES, additional index files\n# will be generated that can be used as input for tools like the\n# Microsoft HTML help workshop to generate a compiled HTML help file (.chm)\n# of the generated HTML documentation.\n\nGENERATE_HTMLHELP      = NO\n\n# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can\n# be used to specify the file name of the resulting .chm file. You\n# can add a path in front of the file if the result should not be\n# written to the html output directory.\n\nCHM_FILE               =\n\n# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can\n# be used to specify the location (absolute path including file name) of\n# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run\n# the HTML help compiler on the generated index.hhp.\n\nHHC_LOCATION           =\n\n# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag\n# controls if a separate .chi index file is generated (YES) or that\n# it should be included in the master .chm file (NO).\n\nGENERATE_CHI           = NO\n\n# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING\n# is used to encode HtmlHelp index (hhk), content (hhc) and project file\n# content.\n\nCHM_INDEX_ENCODING     =\n\n# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag\n# controls whether a binary table of contents is generated (YES) or a\n# normal table of contents (NO) in the .chm file.\n\nBINARY_TOC             = NO\n\n# The TOC_EXPAND flag can be set to YES to add extra items for group members\n# to the contents of the HTML help documentation and to the tree view.\n\nTOC_EXPAND             = NO\n\n# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and\n# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated\n# that can be used as input for Qt's qhelpgenerator to generate a\n# Qt Compressed Help (.qch) of the generated HTML documentation.\n\nGENERATE_QHP           = NO\n\n# If the QHG_LOCATION tag is specified, the QCH_FILE tag can\n# be used to specify the file name of the resulting .qch file.\n# The path specified is relative to the HTML output folder.\n\nQCH_FILE               =\n\n# The QHP_NAMESPACE tag specifies the namespace to use when generating\n# Qt Help Project output. For more information please see\n# http://doc.trolltech.com/qthelpproject.html#namespace\n\nQHP_NAMESPACE          = org.doxygen.Project\n\n# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating\n# Qt Help Project output. For more information please see\n# http://doc.trolltech.com/qthelpproject.html#virtual-folders\n\nQHP_VIRTUAL_FOLDER     = doc\n\n# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to\n# add. For more information please see\n# http://doc.trolltech.com/qthelpproject.html#custom-filters\n\nQHP_CUST_FILTER_NAME   =\n\n# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the\n# custom filter to add. For more information please see\n# <a href=\"http://doc.trolltech.com/qthelpproject.html#custom-filters\">\n# Qt Help Project / Custom Filters</a>.\n\nQHP_CUST_FILTER_ATTRS  =\n\n# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this\n# project's\n# filter section matches.\n# <a href=\"http://doc.trolltech.com/qthelpproject.html#filter-attributes\">\n# Qt Help Project / Filter Attributes</a>.\n\nQHP_SECT_FILTER_ATTRS  =\n\n# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can\n# be used to specify the location of Qt's qhelpgenerator.\n# If non-empty doxygen will try to run qhelpgenerator on the generated\n# .qhp file.\n\nQHG_LOCATION           =\n\n# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files\n#  will be generated, which together with the HTML files, form an Eclipse help\n# plugin. To install this plugin and make it available under the help contents\n# menu in Eclipse, the contents of the directory containing the HTML and XML\n# files needs to be copied into the plugins directory of eclipse. The name of\n# the directory within the plugins directory should be the same as\n# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before\n# the help appears.\n\nGENERATE_ECLIPSEHELP   = NO\n\n# A unique identifier for the eclipse help plugin. When installing the plugin\n# the directory name containing the HTML and XML files should also have\n# this name.\n\nECLIPSE_DOC_ID         = org.doxygen.Project\n\n# The DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs)\n# at top of each HTML page. The value NO (the default) enables the index and\n# the value YES disables it. Since the tabs have the same information as the\n# navigation tree you can set this option to NO if you already set\n# GENERATE_TREEVIEW to YES.\n\nDISABLE_INDEX          = NO\n\n# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index\n# structure should be generated to display hierarchical information.\n# If the tag value is set to YES, a side panel will be generated\n# containing a tree-like index structure (just like the one that\n# is generated for HTML Help). For this to work a browser that supports\n# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser).\n# Windows users are probably better off using the HTML help feature.\n# Since the tree basically has the same information as the tab index you\n# could consider to set DISABLE_INDEX to NO when enabling this option.\n\nGENERATE_TREEVIEW      = NO\n\n# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values\n# (range [0,1..20]) that doxygen will group on one line in the generated HTML\n# documentation. Note that a value of 0 will completely suppress the enum\n# values from appearing in the overview section.\n\nENUM_VALUES_PER_LINE   = 4\n\n# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be\n# used to set the initial width (in pixels) of the frame in which the tree\n# is shown.\n\nTREEVIEW_WIDTH         = 300\n\n# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open\n# links to external symbols imported via tag files in a separate window.\n\nEXT_LINKS_IN_WINDOW    = NO\n\n# Use this tag to change the font size of Latex formulas included\n# as images in the HTML documentation. The default is 10. Note that\n# when you change the font size after a successful doxygen run you need\n# to manually remove any form_*.png images from the HTML output directory\n# to force them to be regenerated.\n\nFORMULA_FONTSIZE       = 10\n\n# Use the FORMULA_TRANPARENT tag to determine whether or not the images\n# generated for formulas are transparent PNGs. Transparent PNGs are\n# not supported properly for IE 6.0, but are supported on all modern browsers.\n# Note that when changing this option you need to delete any form_*.png files\n# in the HTML output before the changes have effect.\n\nFORMULA_TRANSPARENT    = YES\n\n# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax\n# (see http://www.mathjax.org) which uses client side Javascript for the\n# rendering instead of using prerendered bitmaps. Use this if you do not\n# have LaTeX installed or if you want to formulas look prettier in the HTML\n# output. When enabled you may also need to install MathJax separately and\n# configure the path to it using the MATHJAX_RELPATH option.\n\nUSE_MATHJAX            = NO\n\n# When MathJax is enabled you can set the default output format to be used for\n# thA MathJax output. Supported types are HTML-CSS, NativeMML (i.e. MathML) and\n# SVG. The default value is HTML-CSS, which is slower, but has the best\n# compatibility.\n\nMATHJAX_FORMAT         = HTML-CSS\n\n# When MathJax is enabled you need to specify the location relative to the\n# HTML output directory using the MATHJAX_RELPATH option. The destination\n# directory should contain the MathJax.js script. For instance, if the mathjax\n# directory is located at the same level as the HTML output directory, then\n# MATHJAX_RELPATH should be ../mathjax. The default value points to\n# the MathJax Content Delivery Network so you can quickly see the result without\n# installing MathJax.\n# However, it is strongly recommended to install a local\n# copy of MathJax from http://www.mathjax.org before deployment.\n\nMATHJAX_RELPATH        = http://cdn.mathjax.org/mathjax/latest\n\n# The MATHJAX_EXTENSIONS tag can be used to specify one or MathJax extension\n# names that should be enabled during MathJax rendering.\n\nMATHJAX_EXTENSIONS     =\n\n# When the SEARCHENGINE tag is enabled doxygen will generate a search box\n# for the HTML output. The underlying search engine uses javascript\n# and DHTML and should work on any modern browser. Note that when using\n# HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets\n# (GENERATE_DOCSET) there is already a search function so this one should\n# typically be disabled. For large projects the javascript based search engine\n# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution.\n\nSEARCHENGINE           = YES\n\n# When the SERVER_BASED_SEARCH tag is enabled the search engine will be\n# implemented using a web server instead of a web client using Javascript.\n# There are two flavours of web server based search depending on the\n# EXTERNAL_SEARCH setting. When disabled, doxygen will generate a PHP script for\n# searching and an index file used by the script. When EXTERNAL_SEARCH is\n# enabled the indexing and searching needs to be provided by external tools.\n# See the manual for details.\n\nSERVER_BASED_SEARCH    = NO\n\n# When EXTERNAL_SEARCH is enabled doxygen will no longer generate the PHP\n# script for searching. Instead the search results are written to an XML file\n# which needs to be processed by an external indexer. Doxygen will invoke an\n# external search engine pointed to by the SEARCHENGINE_URL option to obtain\n# the search results. Doxygen ships with an example indexer (doxyindexer) and\n# search engine (doxysearch.cgi) which are based on the open source search engine\n# library Xapian. See the manual for configuration details.\n\nEXTERNAL_SEARCH        = NO\n\n# The SEARCHENGINE_URL should point to a search engine hosted by a web server\n# which will returned the search results when EXTERNAL_SEARCH is enabled.\n# Doxygen ships with an example search engine (doxysearch) which is based on\n# the open source search engine library Xapian. See the manual for configuration\n# details.\n\nSEARCHENGINE_URL       =\n\n# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the unindexed\n# search data is written to a file for indexing by an external tool. With the\n# SEARCHDATA_FILE tag the name of this file can be specified.\n\nSEARCHDATA_FILE        = searchdata.xml\n\n# When SERVER_BASED_SEARCH AND EXTERNAL_SEARCH are both enabled the\n# EXTERNAL_SEARCH_ID tag can be used as an identifier for the project. This is\n# useful in combination with EXTRA_SEARCH_MAPPINGS to search through multiple\n# projects and redirect the results back to the right project.\n\nEXTERNAL_SEARCH_ID     =\n\n# The EXTRA_SEARCH_MAPPINGS tag can be used to enable searching through doxygen\n# projects other than the one defined by this configuration file, but that are\n# all added to the same external search index. Each project needs to have a\n# unique id set via EXTERNAL_SEARCH_ID. The search mapping then maps the id\n# of to a relative location where the documentation can be found.\n# The format is: EXTRA_SEARCH_MAPPINGS = id1=loc1 id2=loc2 ...\n\nEXTRA_SEARCH_MAPPINGS  =\n\n#---------------------------------------------------------------------------\n# configuration options related to the LaTeX output\n#---------------------------------------------------------------------------\n\n# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will\n# generate Latex output.\n\nGENERATE_LATEX         = NO\n\n# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.\n# If a relative path is entered the value of OUTPUT_DIRECTORY will be\n# put in front of it. If left blank `latex' will be used as the default path.\n\nLATEX_OUTPUT           = latex\n\n# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be\n# invoked. If left blank `latex' will be used as the default command name.\n# Note that when enabling USE_PDFLATEX this option is only used for\n# generating bitmaps for formulas in the HTML output, but not in the\n# Makefile that is written to the output directory.\n\nLATEX_CMD_NAME         = latex\n\n# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to\n# generate index for LaTeX. If left blank `makeindex' will be used as the\n# default command name.\n\nMAKEINDEX_CMD_NAME     = makeindex\n\n# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact\n# LaTeX documents. This may be useful for small projects and may help to\n# save some trees in general.\n\nCOMPACT_LATEX          = NO\n\n# The PAPER_TYPE tag can be used to set the paper type that is used\n# by the printer. Possible values are: a4, letter, legal and\n# executive. If left blank a4wide will be used.\n\nPAPER_TYPE             = a4\n\n# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX\n# packages that should be included in the LaTeX output.\n\nEXTRA_PACKAGES         =\n\n# The LATEX_HEADER tag can be used to specify a personal LaTeX header for\n# the generated latex document. The header should contain everything until\n# the first chapter. If it is left blank doxygen will generate a\n# standard header. Notice: only use this tag if you know what you are doing!\n\nLATEX_HEADER           =\n\n# The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for\n# the generated latex document. The footer should contain everything after\n# the last chapter. If it is left blank doxygen will generate a\n# standard footer. Notice: only use this tag if you know what you are doing!\n\nLATEX_FOOTER           =\n\n# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated\n# is prepared for conversion to pdf (using ps2pdf). The pdf file will\n# contain links (just like the HTML output) instead of page references\n# This makes the output suitable for online browsing using a pdf viewer.\n\nPDF_HYPERLINKS         = YES\n\n# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of\n# plain latex in the generated Makefile. Set this option to YES to get a\n# higher quality PDF documentation.\n\nUSE_PDFLATEX           = YES\n\n# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\\\batchmode.\n# command to the generated LaTeX files. This will instruct LaTeX to keep\n# running if errors occur, instead of asking the user for help.\n# This option is also used when generating formulas in HTML.\n\nLATEX_BATCHMODE        = NO\n\n# If LATEX_HIDE_INDICES is set to YES then doxygen will not\n# include the index chapters (such as File Index, Compound Index, etc.)\n# in the output.\n\nLATEX_HIDE_INDICES     = NO\n\n# If LATEX_SOURCE_CODE is set to YES then doxygen will include\n# source code with syntax highlighting in the LaTeX output.\n# Note that which sources are shown also depends on other settings\n# such as SOURCE_BROWSER.\n\nLATEX_SOURCE_CODE      = NO\n\n# The LATEX_BIB_STYLE tag can be used to specify the style to use for the\n# bibliography, e.g. plainnat, or ieeetr. The default style is \"plain\". See\n# http://en.wikipedia.org/wiki/BibTeX for more info.\n\nLATEX_BIB_STYLE        = plain\n\n#---------------------------------------------------------------------------\n# configuration options related to the RTF output\n#---------------------------------------------------------------------------\n\n# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output\n# The RTF output is optimized for Word 97 and may not look very pretty with\n# other RTF readers or editors.\n\nGENERATE_RTF           = NO\n\n# The RTF_OUTPUT tag is used to specify where the RTF docs will be put.\n# If a relative path is entered the value of OUTPUT_DIRECTORY will be\n# put in front of it. If left blank `rtf' will be used as the default path.\n\nRTF_OUTPUT             = rtf\n\n# If the COMPACT_RTF tag is set to YES Doxygen generates more compact\n# RTF documents. This may be useful for small projects and may help to\n# save some trees in general.\n\nCOMPACT_RTF            = NO\n\n# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated\n# will contain hyperlink fields. The RTF file will\n# contain links (just like the HTML output) instead of page references.\n# This makes the output suitable for online browsing using WORD or other\n# programs which support those fields.\n# Note: wordpad (write) and others do not support links.\n\nRTF_HYPERLINKS         = NO\n\n# Load style sheet definitions from file. Syntax is similar to doxygen's\n# config file, i.e. a series of assignments. You only have to provide\n# replacements, missing definitions are set to their default value.\n\nRTF_STYLESHEET_FILE    =\n\n# Set optional variables used in the generation of an rtf document.\n# Syntax is similar to doxygen's config file.\n\nRTF_EXTENSIONS_FILE    =\n\n#---------------------------------------------------------------------------\n# configuration options related to the man page output\n#---------------------------------------------------------------------------\n\n# If the GENERATE_MAN tag is set to YES (the default) Doxygen will\n# generate man pages\n\nGENERATE_MAN           = NO\n\n# The MAN_OUTPUT tag is used to specify where the man pages will be put.\n# If a relative path is entered the value of OUTPUT_DIRECTORY will be\n# put in front of it. If left blank `man' will be used as the default path.\n\nMAN_OUTPUT             = man\n\n# The MAN_EXTENSION tag determines the extension that is added to\n# the generated man pages (default is the subroutine's section .3)\n\nMAN_EXTENSION          = .3\n\n# If the MAN_LINKS tag is set to YES and Doxygen generates man output,\n# then it will generate one additional man file for each entity\n# documented in the real man page(s). These additional files\n# only source the real man page, but without them the man command\n# would be unable to find the correct page. The default is NO.\n\nMAN_LINKS              = NO\n\n#---------------------------------------------------------------------------\n# configuration options related to the XML output\n#---------------------------------------------------------------------------\n\n# If the GENERATE_XML tag is set to YES Doxygen will\n# generate an XML file that captures the structure of\n# the code including all documentation.\n\nGENERATE_XML           = NO\n\n# The XML_OUTPUT tag is used to specify where the XML pages will be put.\n# If a relative path is entered the value of OUTPUT_DIRECTORY will be\n# put in front of it. If left blank `xml' will be used as the default path.\n\nXML_OUTPUT             = xml\n\n# If the XML_PROGRAMLISTING tag is set to YES Doxygen will\n# dump the program listings (including syntax highlighting\n# and cross-referencing information) to the XML output. Note that\n# enabling this will significantly increase the size of the XML output.\n\nXML_PROGRAMLISTING     = YES\n\n#---------------------------------------------------------------------------\n# configuration options for the AutoGen Definitions output\n#---------------------------------------------------------------------------\n\n# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will\n# generate an AutoGen Definitions (see autogen.sf.net) file\n# that captures the structure of the code including all\n# documentation. Note that this feature is still experimental\n# and incomplete at the moment.\n\nGENERATE_AUTOGEN_DEF   = NO\n\n#---------------------------------------------------------------------------\n# configuration options related to the Perl module output\n#---------------------------------------------------------------------------\n\n# If the GENERATE_PERLMOD tag is set to YES Doxygen will\n# generate a Perl module file that captures the structure of\n# the code including all documentation. Note that this\n# feature is still experimental and incomplete at the\n# moment.\n\nGENERATE_PERLMOD       = NO\n\n# If the PERLMOD_LATEX tag is set to YES Doxygen will generate\n# the necessary Makefile rules, Perl scripts and LaTeX code to be able\n# to generate PDF and DVI output from the Perl module output.\n\nPERLMOD_LATEX          = NO\n\n# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be\n# nicely formatted so it can be parsed by a human reader.\n# This is useful\n# if you want to understand what is going on.\n# On the other hand, if this\n# tag is set to NO the size of the Perl module output will be much smaller\n# and Perl will parse it just the same.\n\nPERLMOD_PRETTY         = YES\n\n# The names of the make variables in the generated doxyrules.make file\n# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX.\n# This is useful so different doxyrules.make files included by the same\n# Makefile don't overwrite each other's variables.\n\nPERLMOD_MAKEVAR_PREFIX =\n\n#---------------------------------------------------------------------------\n# Configuration options related to the preprocessor\n#---------------------------------------------------------------------------\n\n# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will\n# evaluate all C-preprocessor directives found in the sources and include\n# files.\n\nENABLE_PREPROCESSING   = YES\n\n# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro\n# names in the source code. If set to NO (the default) only conditional\n# compilation will be performed. Macro expansion can be done in a controlled\n# way by setting EXPAND_ONLY_PREDEF to YES.\n\nMACRO_EXPANSION        = YES\n\n# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES\n# then the macro expansion is limited to the macros specified with the\n# PREDEFINED and EXPAND_AS_DEFINED tags.\n\nEXPAND_ONLY_PREDEF     = YES\n\n# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files\n# pointed to by INCLUDE_PATH will be searched when a #include is found.\n\nSEARCH_INCLUDES        = YES\n\n# The INCLUDE_PATH tag can be used to specify one or more directories that\n# contain include files that are not input files but should be processed by\n# the preprocessor.\n\nINCLUDE_PATH           =\n\n# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard\n# patterns (like *.h and *.hpp) to filter out the header-files in the\n# directories. If left blank, the patterns specified with FILE_PATTERNS will\n# be used.\n\nINCLUDE_FILE_PATTERNS  =\n\n# The PREDEFINED tag can be used to specify one or more macro names that\n# are defined before the preprocessor is started (similar to the -D option of\n# gcc). The argument of the tag is a list of macros of the form: name\n# or name=definition (no spaces). If the definition and the = are\n# omitted =1 is assumed. To prevent a macro definition from being\n# undefined via #undef or recursively expanded use the := operator\n# instead of the = operator.\n\nPREDEFINED             = GLFWAPI=                   \\\n                         GLFW_EXPOSE_NATIVE_WIN32   \\\n                         GLFW_EXPOSE_NATIVE_WGL     \\\n                         GLFW_EXPOSE_NATIVE_X11     \\\n                         GLFW_EXPOSE_NATIVE_WAYLAND \\\n                         GLFW_EXPOSE_NATIVE_GLX     \\\n                         GLFW_EXPOSE_NATIVE_COCOA   \\\n                         GLFW_EXPOSE_NATIVE_NSGL    \\\n                         GLFW_EXPOSE_NATIVE_EGL     \\\n                         GLFW_EXPOSE_NATIVE_OSMESA  \\\n                         VK_VERSION_1_0\n\n# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then\n# this tag can be used to specify a list of macro names that should be expanded.\n# The macro definition that is found in the sources will be used.\n# Use the PREDEFINED tag if you want to use a different macro definition that\n# overrules the definition found in the source code.\n\nEXPAND_AS_DEFINED      =\n\n# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then\n# doxygen's preprocessor will remove all references to function-like macros\n# that are alone on a line, have an all uppercase name, and do not end with a\n# semicolon, because these will confuse the parser if not removed.\n\nSKIP_FUNCTION_MACROS   = YES\n\n#---------------------------------------------------------------------------\n# Configuration::additions related to external references\n#---------------------------------------------------------------------------\n\n# The TAGFILES option can be used to specify one or more tagfiles. For each\n# tag file the location of the external documentation should be added. The\n# format of a tag file without this location is as follows:\n#\n# TAGFILES = file1 file2 ...\n# Adding location for the tag files is done as follows:\n#\n# TAGFILES = file1=loc1 \"file2 = loc2\" ...\n# where \"loc1\" and \"loc2\" can be relative or absolute paths\n# or URLs. Note that each tag file must have a unique name (where the name does\n# NOT include the path). If a tag file is not located in the directory in which\n# doxygen is run, you must also specify the path to the tagfile here.\n\nTAGFILES               =\n\n# When a file name is specified after GENERATE_TAGFILE, doxygen will create\n# a tag file that is based on the input files it reads.\n\nGENERATE_TAGFILE       =\n\n# If the ALLEXTERNALS tag is set to YES all external classes will be listed\n# in the class index. If set to NO only the inherited external classes\n# will be listed.\n\nALLEXTERNALS           = NO\n\n# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed\n# in the modules index. If set to NO, only the current project's groups will\n# be listed.\n\nEXTERNAL_GROUPS        = YES\n\n#---------------------------------------------------------------------------\n# Configuration options related to the dot tool\n#---------------------------------------------------------------------------\n\n# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will\n# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base\n# or super classes. Setting the tag to NO turns the diagrams off. Note that\n# this option also works with HAVE_DOT disabled, but it is recommended to\n# install and use dot, since it yields more powerful graphs.\n\nCLASS_DIAGRAMS         = YES\n\n# If set to YES, the inheritance and collaboration graphs will hide\n# inheritance and usage relations if the target is undocumented\n# or is not a class.\n\nHIDE_UNDOC_RELATIONS   = YES\n\n# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is\n# available from the path. This tool is part of Graphviz, a graph visualization\n# toolkit from AT&T and Lucent Bell Labs. The other options in this section\n# have no effect if this option is set to NO (the default)\n\nHAVE_DOT               = NO\n\n# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is\n# allowed to run in parallel. When set to 0 (the default) doxygen will\n# base this on the number of processors available in the system. You can set it\n# explicitly to a value larger than 0 to get control over the balance\n# between CPU load and processing speed.\n\nDOT_NUM_THREADS        = 0\n\n# By default doxygen will use the Helvetica font for all dot files that\n# doxygen generates. When you want a differently looking font you can specify\n# the font name using DOT_FONTNAME. You need to make sure dot is able to find\n# the font, which can be done by putting it in a standard location or by setting\n# the DOTFONTPATH environment variable or by setting DOT_FONTPATH to the\n# directory containing the font.\n\nDOT_FONTNAME           = Helvetica\n\n# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs.\n# The default size is 10pt.\n\nDOT_FONTSIZE           = 10\n\n# By default doxygen will tell dot to use the Helvetica font.\n# If you specify a different font using DOT_FONTNAME you can use DOT_FONTPATH to\n# set the path where dot can find it.\n\nDOT_FONTPATH           =\n\n# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen\n# will generate a graph for each documented class showing the direct and\n# indirect inheritance relations. Setting this tag to YES will force the\n# CLASS_DIAGRAMS tag to NO.\n\nCLASS_GRAPH            = YES\n\n# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen\n# will generate a graph for each documented class showing the direct and\n# indirect implementation dependencies (inheritance, containment, and\n# class references variables) of the class with other documented classes.\n\nCOLLABORATION_GRAPH    = YES\n\n# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen\n# will generate a graph for groups, showing the direct groups dependencies\n\nGROUP_GRAPHS           = YES\n\n# If the UML_LOOK tag is set to YES doxygen will generate inheritance and\n# collaboration diagrams in a style similar to the OMG's Unified Modeling\n# Language.\n\nUML_LOOK               = NO\n\n# If the UML_LOOK tag is enabled, the fields and methods are shown inside\n# the class node. If there are many fields or methods and many nodes the\n# graph may become too big to be useful. The UML_LIMIT_NUM_FIELDS\n# threshold limits the number of items for each type to make the size more\n# manageable. Set this to 0 for no limit. Note that the threshold may be\n# exceeded by 50% before the limit is enforced.\n\nUML_LIMIT_NUM_FIELDS   = 10\n\n# If set to YES, the inheritance and collaboration graphs will show the\n# relations between templates and their instances.\n\nTEMPLATE_RELATIONS     = NO\n\n# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT\n# tags are set to YES then doxygen will generate a graph for each documented\n# file showing the direct and indirect include dependencies of the file with\n# other documented files.\n\nINCLUDE_GRAPH          = YES\n\n# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and\n# HAVE_DOT tags are set to YES then doxygen will generate a graph for each\n# documented header file showing the documented files that directly or\n# indirectly include this file.\n\nINCLUDED_BY_GRAPH      = YES\n\n# If the CALL_GRAPH and HAVE_DOT options are set to YES then\n# doxygen will generate a call dependency graph for every global function\n# or class method. Note that enabling this option will significantly increase\n# the time of a run. So in most cases it will be better to enable call graphs\n# for selected functions only using the \\callgraph command.\n\nCALL_GRAPH             = NO\n\n# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then\n# doxygen will generate a caller dependency graph for every global function\n# or class method. Note that enabling this option will significantly increase\n# the time of a run. So in most cases it will be better to enable caller\n# graphs for selected functions only using the \\callergraph command.\n\nCALLER_GRAPH           = NO\n\n# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen\n# will generate a graphical hierarchy of all classes instead of a textual one.\n\nGRAPHICAL_HIERARCHY    = YES\n\n# If the DIRECTORY_GRAPH and HAVE_DOT tags are set to YES\n# then doxygen will show the dependencies a directory has on other directories\n# in a graphical way. The dependency relations are determined by the #include\n# relations between the files in the directories.\n\nDIRECTORY_GRAPH        = YES\n\n# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images\n# generated by dot. Possible values are svg, png, jpg, or gif.\n# If left blank png will be used. If you choose svg you need to set\n# HTML_FILE_EXTENSION to xhtml in order to make the SVG files\n# visible in IE 9+ (other browsers do not have this requirement).\n\nDOT_IMAGE_FORMAT       = png\n\n# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to\n# enable generation of interactive SVG images that allow zooming and panning.\n# Note that this requires a modern browser other than Internet Explorer.\n# Tested and working are Firefox, Chrome, Safari, and Opera. For IE 9+ you\n# need to set HTML_FILE_EXTENSION to xhtml in order to make the SVG files\n# visible. Older versions of IE do not have SVG support.\n\nINTERACTIVE_SVG        = NO\n\n# The tag DOT_PATH can be used to specify the path where the dot tool can be\n# found. If left blank, it is assumed the dot tool can be found in the path.\n\nDOT_PATH               =\n\n# The DOTFILE_DIRS tag can be used to specify one or more directories that\n# contain dot files that are included in the documentation (see the\n# \\dotfile command).\n\nDOTFILE_DIRS           =\n\n# The MSCFILE_DIRS tag can be used to specify one or more directories that\n# contain msc files that are included in the documentation (see the\n# \\mscfile command).\n\nMSCFILE_DIRS           =\n\n# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of\n# nodes that will be shown in the graph. If the number of nodes in a graph\n# becomes larger than this value, doxygen will truncate the graph, which is\n# visualized by representing a node as a red box. Note that doxygen if the\n# number of direct children of the root node in a graph is already larger than\n# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note\n# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.\n\nDOT_GRAPH_MAX_NODES    = 50\n\n# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the\n# graphs generated by dot. A depth value of 3 means that only nodes reachable\n# from the root by following a path via at most 3 edges will be shown. Nodes\n# that lay further from the root node will be omitted. Note that setting this\n# option to 1 or 2 may greatly reduce the computation time needed for large\n# code bases. Also note that the size of a graph can be further restricted by\n# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.\n\nMAX_DOT_GRAPH_DEPTH    = 0\n\n# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent\n# background. This is disabled by default, because dot on Windows does not\n# seem to support this out of the box. Warning: Depending on the platform used,\n# enabling this option may lead to badly anti-aliased labels on the edges of\n# a graph (i.e. they become hard to read).\n\nDOT_TRANSPARENT        = NO\n\n# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output\n# files in one run (i.e. multiple -o and -T options on the command line). This\n# makes dot run faster, but since only newer versions of dot (>1.8.10)\n# support this, this feature is disabled by default.\n\nDOT_MULTI_TARGETS      = NO\n\n# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will\n# generate a legend page explaining the meaning of the various boxes and\n# arrows in the dot generated graphs.\n\nGENERATE_LEGEND        = YES\n\n# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will\n# remove the intermediate dot files that are used to generate\n# the various graphs.\n\nDOT_CLEANUP            = YES\n"
  },
  {
    "path": "thirdparty/glfw/docs/DoxygenLayout.xml",
    "content": "<doxygenlayout version=\"1.0\">\n  <!-- Generated by doxygen 1.8.14 -->\n  <!-- Navigation index tabs for HTML output -->\n  <navindex>\n    <tab type=\"mainpage\" visible=\"yes\" title=\"Introduction\"/>\n    <tab type=\"user\" url=\"quick_guide.html\" title=\"Tutorial\"/>\n    <tab type=\"pages\" visible=\"yes\" title=\"Guides\" intro=\"\"/>\n    <tab type=\"modules\" visible=\"yes\" title=\"Reference\" intro=\"\"/>\n    <tab type=\"filelist\" visible=\"yes\" title=\"Files\"/>\n  </navindex>\n\n  <!-- Layout definition for a file page -->\n  <file>\n    <detaileddescription title=\"Description\"/>\n    <includes visible=\"$SHOW_INCLUDE_FILES\"/>\n    <sourcelink visible=\"yes\"/>\n    <memberdecl>\n      <constantgroups visible=\"yes\" title=\"\"/>\n      <defines title=\"\"/>\n      <typedefs title=\"\"/>\n      <enums title=\"\"/>\n      <functions title=\"\"/>\n      <variables title=\"\"/>\n      <membergroups visible=\"yes\"/>\n    </memberdecl>\n    <memberdef>\n      <defines title=\"\"/>\n      <typedefs title=\"\"/>\n      <enums title=\"\"/>\n      <functions title=\"\"/>\n      <variables title=\"\"/>\n    </memberdef>\n    <authorsection/>\n  </file>\n\n  <!-- Layout definition for a group page -->\n  <group>\n    <detaileddescription title=\"Description\"/>\n    <memberdecl>\n      <nestedgroups visible=\"yes\" title=\"\"/>\n      <dirs visible=\"yes\" title=\"\"/>\n      <files visible=\"yes\" title=\"\"/>\n      <defines title=\"\"/>\n      <typedefs title=\"\"/>\n      <enums title=\"\"/>\n      <enumvalues title=\"\"/>\n      <functions title=\"\"/>\n      <variables title=\"\"/>\n    </memberdecl>\n    <memberdef>\n      <pagedocs/>\n      <defines title=\"\"/>\n      <typedefs title=\"\"/>\n      <enums title=\"\"/>\n      <enumvalues title=\"\"/>\n      <functions title=\"\"/>\n      <variables title=\"\"/>\n    </memberdef>\n    <authorsection visible=\"yes\"/>\n  </group>\n\n  <!-- Layout definition for a directory page -->\n  <directory>\n    <briefdescription visible=\"yes\"/>\n    <memberdecl>\n      <dirs visible=\"yes\"/>\n      <files visible=\"yes\"/>\n    </memberdecl>\n    <detaileddescription title=\"\"/>\n  </directory>\n</doxygenlayout>\n"
  },
  {
    "path": "thirdparty/glfw/docs/SUPPORT.md",
    "content": "# Support resources\n\nSee the [latest documentation](http://www.glfw.org/docs/latest/) for tutorials,\nguides and the API reference.\n\nIf you have questions about using GLFW, we have a\n[forum](https://discourse.glfw.org/), and the `#glfw` IRC channel on\n[Freenode](http://freenode.net/).\n\nBugs are reported to our [issue tracker](https://github.com/glfw/glfw/issues).\nPlease check the [contribution\nguide](https://github.com/glfw/glfw/blob/master/docs/CONTRIBUTING.md) for\ninformation on what to include when reporting a bug.\n\n"
  },
  {
    "path": "thirdparty/glfw/docs/build.dox",
    "content": "/*!\n\n@page build_guide Building applications\n\n@tableofcontents\n\nThis is about compiling and linking applications that use GLFW.  For information on\nhow to write such applications, start with the\n[introductory tutorial](@ref quick_guide).  For information on how to compile\nthe GLFW library itself, see @ref compile_guide.\n\nThis is not a tutorial on compilation or linking.  It assumes basic\nunderstanding of how to compile and link a C program as well as how to use the\nspecific compiler of your chosen development environment.  The compilation\nand linking process should be explained in your C programming material and in\nthe documentation for your development environment.\n\n\n@section build_include Including the GLFW header file\n\nYou should include the GLFW header in the source files where you use OpenGL or\nGLFW.\n\n@code\n#include <GLFW/glfw3.h>\n@endcode\n\nThis header declares the GLFW API and by default also includes the OpenGL header\nfrom your development environment.  See below for how to control this.\n\nThe GLFW header also defines any platform-specific macros needed by your OpenGL\nheader, so it can be included without needing any window system headers.\n\nFor example, under Windows you are normally required to include `windows.h`\nbefore the OpenGL header, which would bring in the whole Win32 API.  The GLFW\nheader duplicates the small number of macros needed.\n\nIt does this only when needed, so if `windows.h` _is_ included, the GLFW header\ndoes not try to redefine those symbols.  The reverse is not true, i.e.\n`windows.h` cannot cope if any of its symbols have already been defined.\n\nIn other words:\n\n - Do _not_ include the OpenGL headers yourself, as GLFW does this for you\n - Do _not_ include `windows.h` or other platform-specific headers unless you\n   plan on using those APIs directly\n - If you _do_ need to include such headers, do it _before_ including\n   the GLFW header and it will handle this\n\nIf you are using an OpenGL extension loading library such as\n[glad](https://github.com/Dav1dde/glad), the extension loader header should\nbe included _before_ the GLFW one.\n\n@code\n#include <glad/gl.h>\n#include <GLFW/glfw3.h>\n@endcode\n\nAlternatively the @ref GLFW_INCLUDE_NONE macro (described below) can be used to\nprevent the GLFW header from including the OpenGL header.\n\n@code\n#define GLFW_INCLUDE_NONE\n#include <GLFW/glfw3.h>\n#include <glad/gl.h>\n@endcode\n\n\n@subsection build_macros GLFW header option macros\n\nThese macros may be defined before the inclusion of the GLFW header and affect\nits behavior.\n\n@anchor GLFW_DLL\n__GLFW_DLL__ is required on Windows when using the GLFW DLL, to tell the\ncompiler that the GLFW functions are defined in a DLL.\n\nThe following macros control which OpenGL or OpenGL ES API header is included.\nOnly one of these may be defined at a time.\n\n@note GLFW does not provide any of the API headers mentioned below.  They are\nprovided by your development environment or your OpenGL, OpenGL ES or Vulkan\nSDK, and most of them can be downloaded from the\n[Khronos Registry](https://www.khronos.org/registry/).\n\n@anchor GLFW_INCLUDE_GLCOREARB\n__GLFW_INCLUDE_GLCOREARB__ makes the GLFW header include the modern\n`GL/glcorearb.h` header (`OpenGL/gl3.h` on macOS) instead of the regular OpenGL\nheader.\n\n@anchor GLFW_INCLUDE_ES1\n__GLFW_INCLUDE_ES1__ makes the GLFW header include the OpenGL ES 1.x `GLES/gl.h`\nheader instead of the regular OpenGL header.\n\n@anchor GLFW_INCLUDE_ES2\n__GLFW_INCLUDE_ES2__ makes the GLFW header include the OpenGL ES 2.0\n`GLES2/gl2.h` header instead of the regular OpenGL header.\n\n@anchor GLFW_INCLUDE_ES3\n__GLFW_INCLUDE_ES3__ makes the GLFW header include the OpenGL ES 3.0\n`GLES3/gl3.h` header instead of the regular OpenGL header.\n\n@anchor GLFW_INCLUDE_ES31\n__GLFW_INCLUDE_ES31__ makes the GLFW header include the OpenGL ES 3.1\n`GLES3/gl31.h` header instead of the regular OpenGL header.\n\n@anchor GLFW_INCLUDE_ES32\n__GLFW_INCLUDE_ES31__ makes the GLFW header include the OpenGL ES 3.2\n`GLES3/gl32.h` header instead of the regular OpenGL header.\n\n@anchor GLFW_INCLUDE_NONE\n__GLFW_INCLUDE_NONE__ makes the GLFW header not include any OpenGL or OpenGL ES\nAPI header.  This is useful in combination with an extension loading library.\n\nIf none of the above inclusion macros are defined, the standard OpenGL `GL/gl.h`\nheader (`OpenGL/gl.h` on macOS) is included.\n\nThe following macros control the inclusion of additional API headers.  Any\nnumber of these may be defined simultaneously, and/or together with one of the\nabove macros.\n\n@anchor GLFW_INCLUDE_VULKAN\n__GLFW_INCLUDE_VULKAN__ makes the GLFW header include the Vulkan\n`vulkan/vulkan.h` header in addition to any selected OpenGL or OpenGL ES header.\n\n@anchor GLFW_INCLUDE_GLEXT\n__GLFW_INCLUDE_GLEXT__ makes the GLFW header include the appropriate extension\nheader for the OpenGL or OpenGL ES header selected above after and in addition\nto that header.\n\n@anchor GLFW_INCLUDE_GLU\n__GLFW_INCLUDE_GLU__ makes the header include the GLU header in addition to the\nheader selected above.  This should only be used with the standard OpenGL header\nand only for compatibility with legacy code.  GLU has been deprecated and should\nnot be used in new code.\n\n@note None of these macros may be defined during the compilation of GLFW itself.\nIf your build includes GLFW and you define any these in your build files, make\nsure they are not applied to the GLFW sources.\n\n\n@section build_link Link with the right libraries\n\nGLFW is essentially a wrapper of various platform-specific APIs and therefore\nneeds to link against many different system libraries.  If you are using GLFW as\na shared library / dynamic library / DLL then it takes care of these links.\nHowever, if you are using GLFW as a static library then your executable will\nneed to link against these libraries.\n\nOn Windows and macOS, the list of system libraries is static and can be\nhard-coded into your build environment.  See the section for your development\nenvironment below.  On Linux and other Unix-like operating systems, the list\nvaries but can be retrieved in various ways as described below.\n\nA good general introduction to linking is\n[Beginner's Guide to Linkers](https://www.lurklurk.org/linkers/linkers.html) by\nDavid Drysdale.\n\n\n@subsection build_link_win32 With MinGW or Visual C++ on Windows\n\nThe static version of the GLFW library is named `glfw3`.  When using this\nversion, it is also necessary to link with some libraries that GLFW uses.\n\nWhen using MinGW to link an application with the static version of GLFW, you\nmust also explicitly link with `gdi32`. Other toolchains including MinGW-w64\ninclude it in the set of default libraries along with other dependencies like\n`user32` and `kernel32`.\n\nThe link library for the GLFW DLL is named `glfw3dll`.  When compiling an\napplication that uses the DLL version of GLFW, you need to define the @ref\nGLFW_DLL macro _before_ any inclusion of the GLFW header.  This can be done\neither with a compiler switch or by defining it in your source code.\n\n\n@subsection build_link_cmake_source With CMake and GLFW source\n\nThis section is about using CMake to compile and link GLFW along with your\napplication.  If you want to use an installed binary instead, see @ref\nbuild_link_cmake_package.\n\nWith a few changes to your `CMakeLists.txt` you can have the GLFW source tree\nbuilt along with your application.\n\nWhen including GLFW as part of your build, you probably don't want to build the\nGLFW tests, examples and documentation.  To disable these, set the corresponding\ncache variables before adding the GLFW source tree.\n\n@code\nset(GLFW_BUILD_DOCS OFF CACHE BOOL \"\" FORCE)\nset(GLFW_BUILD_TESTS OFF CACHE BOOL \"\" FORCE)\nset(GLFW_BUILD_EXAMPLES OFF CACHE BOOL \"\" FORCE)\n@endcode\n\nAdd the root directory of the GLFW source tree to your project.  This will add\nthe `glfw` target to your project.\n\n@code{.cmake}\nadd_subdirectory(path/to/glfw)\n@endcode\n\nOnce GLFW has been added, link your application against the `glfw` target.\nThis adds the GLFW library and its link-time dependencies as it is currently\nconfigured, the include directory for the GLFW header and, when applicable, the\n@ref GLFW_DLL macro.\n\n@code{.cmake}\ntarget_link_libraries(myapp glfw)\n@endcode\n\nNote that the `glfw` target does not depend on OpenGL, as GLFW loads any OpenGL,\nOpenGL ES or Vulkan libraries it needs at runtime.  If your application calls\nOpenGL directly, instead of using a modern\n[extension loader library](@ref context_glext_auto), use the OpenGL CMake\npackage.\n\n@code{.cmake}\nfind_package(OpenGL REQUIRED)\n@endcode\n\nIf OpenGL is found, the `OpenGL::GL` target is added to your project, containing\nlibrary and include directory paths.  Link against this like above.\n\n@code{.cmake}\ntarget_link_libraries(myapp OpenGL::GL)\n@endcode\n\n\n@subsection build_link_cmake_package With CMake and installed GLFW binaries\n\nThis section is about using CMake to link GLFW after it has been built and\ninstalled.  If you want to build it along with your application instead, see\n@ref build_link_cmake_source.\n\nWith a few changes to your `CMakeLists.txt` you can locate the package and\ntarget files generated when GLFW is installed.\n\n@code{.cmake}\nfind_package(glfw3 3.3 REQUIRED)\n@endcode\n\nOnce GLFW has been added to the project, link against it with the `glfw` target.\nThis adds the GLFW library and its link-time dependencies, the include directory\nfor the GLFW header and, when applicable, the @ref GLFW_DLL macro.\n\n@code{.cmake}\ntarget_link_libraries(myapp glfw)\n@endcode\n\nNote that the `glfw` target does not depend on OpenGL, as GLFW loads any OpenGL,\nOpenGL ES or Vulkan libraries it needs at runtime.  If your application calls\nOpenGL directly, instead of using a modern\n[extension loader library](@ref context_glext_auto), use the OpenGL CMake\npackage.\n\n@code{.cmake}\nfind_package(OpenGL REQUIRED)\n@endcode\n\nIf OpenGL is found, the `OpenGL::GL` target is added to your project, containing\nlibrary and include directory paths.  Link against this like above.\n\n@code{.cmake}\ntarget_link_libraries(myapp OpenGL::GL)\n@endcode\n\n\n@subsection build_link_pkgconfig With makefiles and pkg-config on Unix\n\nGLFW supports [pkg-config](https://www.freedesktop.org/wiki/Software/pkg-config/),\nand the `glfw3.pc` pkg-config file is generated when the GLFW library is built\nand is installed along with it.  A pkg-config file describes all necessary\ncompile-time and link-time flags and dependencies needed to use a library.  When\nthey are updated or if they differ between systems, you will get the correct\nones automatically.\n\nA typical compile and link command-line when using the static version of the\nGLFW library may look like this:\n\n@code{.sh}\ncc $(pkg-config --cflags glfw3) -o myprog myprog.c $(pkg-config --static --libs glfw3)\n@endcode\n\nIf you are using the shared version of the GLFW library, omit the `--static`\nflag.\n\n@code{.sh}\ncc $(pkg-config --cflags glfw3) -o myprog myprog.c $(pkg-config --libs glfw3)\n@endcode\n\nYou can also use the `glfw3.pc` file without installing it first, by using the\n`PKG_CONFIG_PATH` environment variable.\n\n@code{.sh}\nenv PKG_CONFIG_PATH=path/to/glfw/src cc $(pkg-config --cflags glfw3) -o myprog myprog.c $(pkg-config --libs glfw3)\n@endcode\n\nThe dependencies do not include OpenGL, as GLFW loads any OpenGL, OpenGL ES or\nVulkan libraries it needs at runtime.  If your application calls OpenGL\ndirectly, instead of using a modern\n[extension loader library](@ref context_glext_auto), you should add the `gl`\npkg-config package.\n\n@code{.sh}\ncc $(pkg-config --cflags glfw3 gl) -o myprog myprog.c $(pkg-config --libs glfw3 gl)\n@endcode\n\n\n@subsection build_link_xcode With Xcode on macOS\n\nIf you are using the dynamic library version of GLFW, add it to the project\ndependencies.\n\nIf you are using the static library version of GLFW, add it and the Cocoa,\nOpenGL and IOKit frameworks to the project as dependencies.  They can all be\nfound in `/System/Library/Frameworks`.\n\n\n@subsection build_link_osx With command-line on macOS\n\nIt is recommended that you use [pkg-config](@ref build_link_pkgconfig) when\nbuilding from the command line on macOS.  That way you will get any new\ndependencies added automatically.  If you still wish to build manually, you need\nto add the required frameworks and libraries to your command-line yourself using\nthe `-l` and `-framework` switches.\n\nIf you are using the dynamic GLFW library, which is named `libglfw.3.dylib`, do:\n\n@code{.sh}\ncc -o myprog myprog.c -lglfw -framework Cocoa -framework OpenGL -framework IOKit\n@endcode\n\nIf you are using the static library, named `libglfw3.a`, substitute `-lglfw3`\nfor `-lglfw`.\n\nNote that you do not add the `.framework` extension to a framework when linking\nagainst it from the command-line.\n\n@note Your machine may have `libGL.*.dylib` style OpenGL library, but that is\nfor the X Window System and will not work with the macOS native version of GLFW.\n\n*/\n"
  },
  {
    "path": "thirdparty/glfw/docs/compat.dox",
    "content": "/*!\n\n@page compat_guide Standards conformance\n\n@tableofcontents\n\nThis guide describes the various API extensions used by this version of GLFW.\nIt lists what are essentially implementation details, but which are nonetheless\nvital knowledge for developers intending to deploy their applications on a wide\nrange of machines.\n\nThe information in this guide is not a part of GLFW API, but merely\npreconditions for some parts of the library to function on a given machine.  Any\npart of this information may change in future versions of GLFW and that will not\nbe considered a breaking API change.\n\n\n@section compat_x11 X11 extensions, protocols and IPC standards\n\nAs GLFW uses Xlib directly, without any intervening toolkit\nlibrary, it has sole responsibility for interacting well with the many and\nvaried window managers in use on Unix-like systems.  In order for applications\nand window managers to work well together, a number of standards and\nconventions have been developed that regulate behavior outside the scope of the\nX11 API; most importantly the\n[Inter-Client Communication Conventions Manual](https://www.tronche.com/gui/x/icccm/)\n(ICCCM) and\n[Extended Window Manager Hints](https://standards.freedesktop.org/wm-spec/wm-spec-latest.html)\n(EWMH) standards.\n\nGLFW uses the `_MOTIF_WM_HINTS` window property to support borderless windows.\nIf the running window manager does not support this property, the\n`GLFW_DECORATED` hint will have no effect.\n\nGLFW uses the ICCCM `WM_DELETE_WINDOW` protocol to intercept the user\nattempting to close the GLFW window.  If the running window manager does not\nsupport this protocol, the close callback will never be called.\n\nGLFW uses the EWMH `_NET_WM_PING` protocol, allowing the window manager notify\nthe user when the application has stopped responding, i.e. when it has ceased to\nprocess events.  If the running window manager does not support this protocol,\nthe user will not be notified if the application locks up.\n\nGLFW uses the EWMH `_NET_WM_STATE_FULLSCREEN` window state to tell the window\nmanager to make the GLFW window full screen.  If the running window manager does\nnot support this state, full screen windows may not work properly.  GLFW has\na fallback code path in case this state is unavailable, but every window manager\nbehaves slightly differently in this regard.\n\nGLFW uses the EWMH `_NET_WM_BYPASS_COMPOSITOR` window property to tell a\ncompositing window manager to un-redirect full screen GLFW windows.  If the\nrunning window manager uses compositing but does not support this property then\nadditional copying may be performed for each buffer swap of full screen windows.\n\nGLFW uses the\n[clipboard manager protocol](https://www.freedesktop.org/wiki/ClipboardManager/)\nto push a clipboard string (i.e. selection) owned by a GLFW window about to be\ndestroyed to the clipboard manager.  If there is no running clipboard manager,\nthe clipboard string will be unavailable once the window has been destroyed.\n\nGLFW uses the\n[X drag-and-drop protocol](https://www.freedesktop.org/wiki/Specifications/XDND/)\nto provide file drop events.  If the application originating the drag does not\nsupport this protocol, drag and drop will not work.\n\nGLFW uses the XRandR 1.3 extension to provide multi-monitor support.  If the\nrunning X server does not support this version of this extension, multi-monitor\nsupport will not function and only a single, desktop-spanning monitor will be\nreported.\n\nGLFW uses the XRandR 1.3 and Xf86vidmode extensions to provide gamma ramp\nsupport.  If the running X server does not support either or both of these\nextensions, gamma ramp support will not function.\n\nGLFW uses the Xkb extension and detectable auto-repeat to provide keyboard\ninput.  If the running X server does not support this extension, a non-Xkb\nfallback path is used.\n\nGLFW uses the XInput2 extension to provide raw, non-accelerated mouse motion\nwhen the cursor is disabled.  If the running X server does not support this\nextension, regular accelerated mouse motion will be used.\n\nGLFW uses both the XRender extension and the compositing manager to support\ntransparent window framebuffers.  If the running X server does not support this\nextension or there is no running compositing manager, the\n`GLFW_TRANSPARENT_FRAMEBUFFER` framebuffer hint will have no effect.\n\n\n@section compat_wayland Wayland protocols and IPC standards\n\nAs GLFW uses libwayland directly, without any intervening toolkit library, it\nhas sole responsibility for interacting well with every compositor in use on\nUnix-like systems.  Most of the features are provided by the core protocol,\nwhile cursor support is provided by the libwayland-cursor helper library, EGL\nintegration by libwayland-egl, and keyboard handling by\n[libxkbcommon](https://xkbcommon.org/).  In addition, GLFW uses some protocols\nfrom wayland-protocols to provide additional features if the compositor\nsupports them.\n\nGLFW uses xkbcommon 0.5.0 to provide compose key support.  When it has been\nbuilt against an older xkbcommon, the compose key will be disabled even if it\nhas been configured in the compositor.\n\nGLFW uses the [xdg-shell\nprotocol](https://cgit.freedesktop.org/wayland/wayland-protocols/tree/stable/xdg-shell/xdg-shell.xml)\nto provide better window management.  This protocol is part of\nwayland-protocols 1.12, and mandatory at build time.  If the running compositor\ndoes not support this protocol, the older [wl_shell\ninterface](https://cgit.freedesktop.org/wayland/wayland/tree/protocol/wayland.xml#n972)\nwill be used instead.  This will result in a worse integration with the\ndesktop, especially on tiling compositors.\n\nGLFW uses the [relative pointer\nprotocol](https://cgit.freedesktop.org/wayland/wayland-protocols/tree/unstable/relative-pointer/relative-pointer-unstable-v1.xml)\nalongside the [pointer constraints\nprotocol](https://cgit.freedesktop.org/wayland/wayland-protocols/tree/unstable/pointer-constraints/pointer-constraints-unstable-v1.xml)\nto implement disabled cursor.  These two protocols are part of\nwayland-protocols 1.1, and mandatory at build time.  If the running compositor\ndoes not support both of these protocols, disabling the cursor will have no\neffect.\n\nGLFW uses the [idle inhibit\nprotocol](https://cgit.freedesktop.org/wayland/wayland-protocols/tree/unstable/idle-inhibit/idle-inhibit-unstable-v1.xml)\nto prohibit the screensaver from starting.  This protocol is part of\nwayland-protocols 1.6, and mandatory at build time.  If the running compositor\ndoes not support this protocol, the screensaver may start even for full screen\nwindows.\n\nGLFW uses the [xdg-decoration\nprotocol](https://cgit.freedesktop.org/wayland/wayland-protocols/tree/unstable/xdg-decoration/xdg-decoration-unstable-v1.xml)\nto request decorations to be drawn around its windows.  This protocol is part\nof wayland-protocols 1.15, and mandatory at build time.  If the running\ncompositor does not support this protocol, a very simple frame will be drawn by\nGLFW itself, using the [viewporter\nprotocol](https://cgit.freedesktop.org/wayland/wayland-protocols/tree/stable/viewporter/viewporter.xml)\nalongside\n[subsurfaces](https://cgit.freedesktop.org/wayland/wayland/tree/protocol/wayland.xml#n2598).\nThis protocol is part of wayland-protocols 1.4, and mandatory at build time.\nIf the running compositor does not support this protocol either, no decorations\nwill be drawn around windows.\n\n\n@section compat_glx GLX extensions\n\nThe GLX API is the default API used to create OpenGL contexts on Unix-like\nsystems using the X Window System.\n\nGLFW uses the GLX 1.3 `GLXFBConfig` functions to enumerate and select framebuffer pixel\nformats.  If GLX 1.3 is not supported, @ref glfwInit will fail.\n\nGLFW uses the `GLX_MESA_swap_control,` `GLX_EXT_swap_control` and\n`GLX_SGI_swap_control` extensions to provide vertical retrace synchronization\n(or _vsync_), in that order of preference.  Where none of these extension are\navailable, calling @ref glfwSwapInterval will have no effect.\n\nGLFW uses the `GLX_ARB_multisample` extension to create contexts with\nmultisampling anti-aliasing.  Where this extension is unavailable, the\n`GLFW_SAMPLES` hint will have no effect.\n\nGLFW uses the `GLX_ARB_create_context` extension when available, even when\ncreating OpenGL contexts of version 2.1 and below.  Where this extension is\nunavailable, the `GLFW_CONTEXT_VERSION_MAJOR` and `GLFW_CONTEXT_VERSION_MINOR`\nhints will only be partially supported, the `GLFW_OPENGL_DEBUG_CONTEXT` hint\nwill have no effect, and setting the `GLFW_OPENGL_PROFILE` or\n`GLFW_OPENGL_FORWARD_COMPAT` hints to `GLFW_TRUE` will cause @ref\nglfwCreateWindow to fail.\n\nGLFW uses the `GLX_ARB_create_context_profile` extension to provide support for\ncontext profiles.  Where this extension is unavailable, setting the\n`GLFW_OPENGL_PROFILE` hint to anything but `GLFW_OPENGL_ANY_PROFILE`, or setting\n`GLFW_CLIENT_API` to anything but `GLFW_OPENGL_API` or `GLFW_NO_API` will cause\n@ref glfwCreateWindow to fail.\n\nGLFW uses the `GLX_ARB_context_flush_control` extension to provide control over\nwhether a context is flushed when it is released (made non-current).  Where this\nextension is unavailable, the `GLFW_CONTEXT_RELEASE_BEHAVIOR` hint will have no\neffect and the context will always be flushed when released.\n\nGLFW uses the `GLX_ARB_framebuffer_sRGB` and `GLX_EXT_framebuffer_sRGB`\nextensions to provide support for sRGB framebuffers.  Where both of these\nextensions are unavailable, the `GLFW_SRGB_CAPABLE` hint will have no effect.\n\n\n@section compat_wgl WGL extensions\n\nThe WGL API is used to create OpenGL contexts on Microsoft Windows and other\nimplementations of the Win32 API, such as Wine.\n\nGLFW uses either the `WGL_EXT_extension_string` or the\n`WGL_ARB_extension_string` extension to check for the presence of all other WGL\nextensions listed below.  If both are available, the EXT one is preferred.  If\nneither is available, no other extensions are used and many GLFW features\nrelated to context creation will have no effect or cause errors when used.\n\nGLFW uses the `WGL_EXT_swap_control` extension to provide vertical retrace\nsynchronization (or _vsync_).  Where this extension is unavailable, calling @ref\nglfwSwapInterval will have no effect.\n\nGLFW uses the `WGL_ARB_pixel_format` and `WGL_ARB_multisample` extensions to\ncreate contexts with multisampling anti-aliasing.  Where these extensions are\nunavailable, the `GLFW_SAMPLES` hint will have no effect.\n\nGLFW uses the `WGL_ARB_create_context` extension when available, even when\ncreating OpenGL contexts of version 2.1 and below.  Where this extension is\nunavailable, the `GLFW_CONTEXT_VERSION_MAJOR` and `GLFW_CONTEXT_VERSION_MINOR`\nhints will only be partially supported, the `GLFW_OPENGL_DEBUG_CONTEXT` hint\nwill have no effect, and setting the `GLFW_OPENGL_PROFILE` or\n`GLFW_OPENGL_FORWARD_COMPAT` hints to `GLFW_TRUE` will cause @ref\nglfwCreateWindow to fail.\n\nGLFW uses the `WGL_ARB_create_context_profile` extension to provide support for\ncontext profiles.  Where this extension is unavailable, setting the\n`GLFW_OPENGL_PROFILE` hint to anything but `GLFW_OPENGL_ANY_PROFILE` will cause\n@ref glfwCreateWindow to fail.\n\nGLFW uses the `WGL_ARB_context_flush_control` extension to provide control over\nwhether a context is flushed when it is released (made non-current).  Where this\nextension is unavailable, the `GLFW_CONTEXT_RELEASE_BEHAVIOR` hint will have no\neffect and the context will always be flushed when released.\n\nGLFW uses the `WGL_ARB_framebuffer_sRGB` and `WGL_EXT_framebuffer_sRGB`\nextensions to provide support for sRGB framebuffers.  Where both of these\nextension are unavailable, the `GLFW_SRGB_CAPABLE` hint will have no effect.\n\n\n@section compat_osx OpenGL on macOS\n\nSupport for OpenGL 3.2 and above was introduced with OS X 10.7 and even then\nonly forward-compatible, core profile contexts are supported.  Support for\nOpenGL 4.1 was introduced with OS X 10.9, also limited to forward-compatible,\ncore profile contexts.  There is also still no mechanism for requesting debug\ncontexts or no-error contexts.  Versions of Mac OS X earlier than 10.7 support\nat most OpenGL version 2.1.\n\nBecause of this, on OS X 10.7 and later, the `GLFW_CONTEXT_VERSION_MAJOR` and\n`GLFW_CONTEXT_VERSION_MINOR` hints will cause @ref glfwCreateWindow to fail if\ngiven version 3.0 or 3.1.  The `GLFW_OPENGL_FORWARD_COMPAT` hint must be set to\n`GLFW_TRUE` and the `GLFW_OPENGL_PROFILE` hint must be set to\n`GLFW_OPENGL_CORE_PROFILE` when creating OpenGL 3.2 and later contexts.  The\n`GLFW_OPENGL_DEBUG_CONTEXT` and `GLFW_CONTEXT_NO_ERROR` hints are ignored.\n\nAlso, on Mac OS X 10.6 and below, the `GLFW_CONTEXT_VERSION_MAJOR` and\n`GLFW_CONTEXT_VERSION_MINOR` hints will fail if given a version above 2.1,\nsetting the `GLFW_OPENGL_PROFILE` or `GLFW_OPENGL_FORWARD_COMPAT` hints to\na non-default value will cause @ref glfwCreateWindow to fail and the\n`GLFW_OPENGL_DEBUG_CONTEXT` hint is ignored.\n\n\n@section compat_vulkan Vulkan loader and API\n\nBy default, GLFW uses the standard system-wide Vulkan loader to access the\nVulkan API on all platforms except macOS.  This is installed by both graphics\ndrivers and Vulkan SDKs.  If either the loader or at least one minimally\nfunctional ICD is missing, @ref glfwVulkanSupported will return `GLFW_FALSE` and\nall other Vulkan-related functions will fail with an @ref GLFW_API_UNAVAILABLE\nerror.\n\n\n@section compat_wsi Vulkan WSI extensions\n\nThe Vulkan WSI extensions are used to create Vulkan surfaces for GLFW windows on\nall supported platforms.\n\nGLFW uses the `VK_KHR_surface` and `VK_KHR_win32_surface` extensions to create\nsurfaces on Microsoft Windows.  If any of these extensions are not available,\n@ref glfwGetRequiredInstanceExtensions will return an empty list and window\nsurface creation will fail.\n\nGLFW uses the `VK_KHR_surface` and either the `VK_MVK_macos_surface` or\n`VK_EXT_metal_surface` extensions to create surfaces on macOS.  If any of these\nextensions are not available, @ref glfwGetRequiredInstanceExtensions will\nreturn an empty list and window surface creation will fail.\n\nGLFW uses the `VK_KHR_surface` and either the `VK_KHR_xlib_surface` or\n`VK_KHR_xcb_surface` extensions to create surfaces on X11.  If `VK_KHR_surface`\nor both `VK_KHR_xlib_surface` and `VK_KHR_xcb_surface` are not available, @ref\nglfwGetRequiredInstanceExtensions will return an empty list and window surface\ncreation will fail.\n\nGLFW uses the `VK_KHR_surface` and `VK_KHR_wayland_surface` extensions to create\nsurfaces on Wayland.  If any of these extensions are not available, @ref\nglfwGetRequiredInstanceExtensions will return an empty list and window surface\ncreation will fail.\n\n*/\n"
  },
  {
    "path": "thirdparty/glfw/docs/compile.dox",
    "content": "/*!\n\n@page compile_guide Compiling GLFW\n\n@tableofcontents\n\nThis is about compiling the GLFW library itself.  For information on how to\nbuild applications that use GLFW, see @ref build_guide.\n\n\n@section compile_cmake Using CMake\n\nGLFW uses [CMake](https://cmake.org/) to generate project files or makefiles\nfor a particular development environment.  If you are on a Unix-like system such\nas Linux or FreeBSD or have a package system like Fink, MacPorts, Cygwin or\nHomebrew, you can install its CMake package.  If not, you can download\ninstallers for Windows and macOS from the\n[CMake website](https://cmake.org/).\n\n@note CMake only generates project files or makefiles.  It does not compile the\nactual GLFW library.  To compile GLFW, first generate these files for your\nchosen development environment and then use them to compile the actual GLFW\nlibrary.\n\n\n@subsection compile_deps Dependencies\n\nOnce you have installed CMake, make sure that all other dependencies are\navailable.  On some platforms, GLFW needs a few additional packages to be\ninstalled.  See the section for your chosen platform and development environment\nbelow.\n\n\n@subsubsection compile_deps_msvc Dependencies for Visual C++ on Windows\n\nThe Windows SDK bundled with Visual C++ already contains all the necessary\nheaders, link libraries and tools except for CMake.  Move on to @ref\ncompile_generate.\n\n\n@subsubsection compile_deps_mingw Dependencies for MinGW or MinGW-w64 on Windows\n\nBoth the MinGW and the MinGW-w64 packages already contain all the necessary\nheaders, link libraries and tools except for CMake.  Move on to @ref\ncompile_generate.\n\n\n@subsubsection compile_deps_mingw_cross Dependencies for MinGW or MinGW-w64 cross-compilation\n\nBoth Cygwin and many Linux distributions have MinGW or MinGW-w64 packages.  For\nexample, Cygwin has the `mingw64-i686-gcc` and `mingw64-x86_64-gcc` packages\nfor 32- and 64-bit version of MinGW-w64, while Debian GNU/Linux and derivatives\nlike Ubuntu have the `mingw-w64` package for both.\n\nGLFW has CMake toolchain files in the `CMake/` directory that set up\ncross-compilation of Windows binaries.  To use these files you add an option\nwhen running `cmake` to generate the project files or makefiles:\n\n@code{.sh}\ncmake -DCMAKE_TOOLCHAIN_FILE=<toolchain-file> .\n@endcode\n\nThe exact toolchain file to use depends on the prefix used by the MinGW or\nMinGW-w64 binaries on your system.  You can usually see this in the /usr\ndirectory.  For example, both the Debian/Ubuntu and Cygwin MinGW-w64 packages\nhave `/usr/x86_64-w64-mingw32` for the 64-bit compilers, so the correct\ninvocation would be:\n\n@code{.sh}\ncmake -DCMAKE_TOOLCHAIN_FILE=CMake/x86_64-w64-mingw32.cmake .\n@endcode\n\nFor more details see the article\n[CMake Cross Compiling](https://gitlab.kitware.com/cmake/community/wikis/doc/cmake/CrossCompiling) on\nthe CMake wiki.\n\nOnce you have this set up, move on to @ref compile_generate.\n\n\n@subsubsection compile_deps_xcode Dependencies for Xcode on macOS\n\nXcode comes with all necessary tools except for CMake.  The required headers\nand libraries are included in the core macOS frameworks.  Xcode can be\ndownloaded from the Mac App Store or from the ADC Member Center.\n\nOnce you have Xcode installed, move on to @ref compile_generate.\n\n\n@subsubsection compile_deps_x11 Dependencies for Linux and X11\n\nTo compile GLFW for X11, you need to have the X11 packages installed, as well as\nthe basic development tools like GCC and make.  For example, on Ubuntu and other\ndistributions based on Debian GNU/Linux, you need to install the `xorg-dev`\npackage, which pulls in all X.org header packages.\n\nOnce you have installed the necessary packages, move on to @ref\ncompile_generate.\n\n\n@subsubsection compile_deps_wayland Dependencies for Linux and Wayland\n\nTo compile GLFW for Wayland, you need to have the Wayland packages installed,\nas well as the basic development tools like GCC and make.  For example, on\nUbuntu and other distributions based on Debian GNU/Linux, you need to install\nthe `libwayland-dev` package, which contains all Wayland headers and pulls in\nwayland-scanner, as well as the `wayland-protocols` and `extra-cmake-modules`\npackages.\n\nOnce you have installed the necessary packages, move on to @ref\ncompile_generate.\n\n\n@subsection compile_deps_osmesa Dependencies for Linux and OSMesa\n\nTo compile GLFW for OSMesa, you need to install the OSMesa library and header\npackages.  For example, on Ubuntu and other distributions based on Debian\nGNU/Linux, you need to install the `libosmesa6-dev` package.  The OSMesa library\nis required at runtime for context creation and is loaded on demand.\n\nOnce you have installed the necessary packages, move on to @ref\ncompile_generate.\n\n\n@subsection compile_generate Generating build files with CMake\n\nOnce you have all necessary dependencies it is time to generate the project\nfiles or makefiles for your development environment.  CMake needs to know two\npaths for this: the path to the _root_ directory of the GLFW source tree (i.e.\n_not_ the `src` subdirectory) and the target path for the generated files and\ncompiled binaries.  If these are the same, it is called an in-tree build,\notherwise it is called an out-of-tree build.\n\nOne of several advantages of out-of-tree builds is that you can generate files\nand compile for different development environments using a single source tree.\n\n@note This section is about generating the project files or makefiles necessary\nto compile the GLFW library, not about compiling the actual library.\n\n\n@subsubsection compile_generate_cli Generating files with the CMake command-line tool\n\nTo make an in-tree build, enter the _root_ directory of the GLFW source tree\n(i.e. _not_ the `src` subdirectory) and run CMake.  The current directory is\nused as target path, while the path provided as an argument is used to find the\nsource tree.\n\n@code{.sh}\ncd <glfw-root-dir>\ncmake .\n@endcode\n\nTo make an out-of-tree build, make a directory outside of the source tree, enter\nit and run CMake with the (relative or absolute) path to the root of the source\ntree as an argument.\n\n@code{.sh}\nmkdir glfw-build\ncd glfw-build\ncmake <glfw-root-dir>\n@endcode\n\nOnce you have generated the project files or makefiles for your chosen\ndevelopment environment, move on to @ref compile_compile.\n\n\n@subsubsection compile_generate_gui Generating files with the CMake GUI\n\nIf you are using the GUI version, choose the root of the GLFW source tree as\nsource location and the same directory or another, empty directory as the\ndestination for binaries.  Choose _Configure_, change any options you wish to,\n_Configure_ again to let the changes take effect and then _Generate_.\n\nOnce you have generated the project files or makefiles for your chosen\ndevelopment environment, move on to @ref compile_compile.\n\n\n@subsection compile_compile Compiling the library\n\nYou should now have all required dependencies and the project files or makefiles\nnecessary to compile GLFW.  Go ahead and compile the actual GLFW library with\nthese files, as you would with any other project.\n\nOnce the GLFW library is compiled, you are ready to build your applications,\nlinking it to the GLFW library.  See @ref build_guide for more information.\n\n\n@subsection compile_options CMake options\n\nThe CMake files for GLFW provide a number of options, although not all are\navailable on all supported platforms.  Some of these are de facto standards\namong projects using CMake and so have no `GLFW_` prefix.\n\nIf you are using the GUI version of CMake, these are listed and can be changed\nfrom there.  If you are using the command-line version of CMake you can use the\n`ccmake` ncurses GUI to set options.  Some package systems like Ubuntu and other\ndistributions based on Debian GNU/Linux have this tool in a separate\n`cmake-curses-gui` package.\n\nFinally, if you don't want to use any GUI, you can set options from the `cmake`\ncommand-line with the `-D` flag.\n\n@code{.sh}\ncmake -DBUILD_SHARED_LIBS=ON .\n@endcode\n\n\n@subsubsection compile_options_shared Shared CMake options\n\n@anchor BUILD_SHARED_LIBS\n__BUILD_SHARED_LIBS__ determines whether GLFW is built as a static\nlibrary or as a DLL / shared library / dynamic library.\n\n@anchor GLFW_BUILD_EXAMPLES\n__GLFW_BUILD_EXAMPLES__ determines whether the GLFW examples are built\nalong with the library.\n\n@anchor GLFW_BUILD_TESTS\n__GLFW_BUILD_TESTS__ determines whether the GLFW test programs are\nbuilt along with the library.\n\n@anchor GLFW_BUILD_DOCS\n__GLFW_BUILD_DOCS__ determines whether the GLFW documentation is built along\nwith the library.\n\n@anchor GLFW_VULKAN_STATIC\n__GLFW_VULKAN_STATIC__ determines whether to use the Vulkan loader linked\ndirectly with the application.\n\n\n@subsubsection compile_options_win32 Windows specific CMake options\n\n@anchor USE_MSVC_RUNTIME_LIBRARY_DLL\n__USE_MSVC_RUNTIME_LIBRARY_DLL__ determines whether to use the DLL version or the\nstatic library version of the Visual C++ runtime library.  If set to `ON`, the\nDLL version of the Visual C++ library is used.\n\n@anchor GLFW_USE_HYBRID_HPG\n__GLFW_USE_HYBRID_HPG__ determines whether to export the `NvOptimusEnablement` and\n`AmdPowerXpressRequestHighPerformance` symbols, which force the use of the\nhigh-performance GPU on Nvidia Optimus and AMD PowerXpress systems.  These symbols\nneed to be exported by the EXE to be detected by the driver, so the override\nwill not work if GLFW is built as a DLL.\n\n\n@section compile_manual Compiling GLFW manually\n\nIf you wish to compile GLFW without its CMake build environment then you will\nhave to do at least some of the platform detection yourself.  GLFW needs\na configuration macro to be defined in order to know what window system it's\nbeing compiled for and also has optional, platform-specific ones for various\nfeatures.\n\nWhen building with CMake, the `glfw_config.h` configuration header is generated\nbased on the current platform and CMake options.  The GLFW CMake environment\ndefines @b GLFW_USE_CONFIG_H, which causes this header to be included by\n`internal.h`.  Without this macro, GLFW will expect the necessary configuration\nmacros to be defined on the command-line.\n\nThe window creation API is used to create windows, handle input, monitors, gamma\nramps and clipboard.  The options are:\n\n - @b _GLFW_COCOA to use the Cocoa frameworks\n - @b _GLFW_WIN32 to use the Win32 API\n - @b _GLFW_X11 to use the X Window System\n - @b _GLFW_WAYLAND to use the Wayland API (experimental and incomplete)\n - @b _GLFW_OSMESA to use the OSMesa API (headless and non-interactive)\n\nIf you are building GLFW as a shared library / dynamic library / DLL then you\nmust also define @b _GLFW_BUILD_DLL.  Otherwise, you must not define it.\n\nIf you are linking the Vulkan loader directly with your application then you\nmust also define @b _GLFW_VULKAN_STATIC.  Otherwise, GLFW will attempt to use the\nexternal version.\n\nIf you are using a custom name for the Vulkan, EGL, GLX, OSMesa, OpenGL, GLESv1\nor GLESv2 library, you can override the default names by defining those you need\nof @b _GLFW_VULKAN_LIBRARY, @b _GLFW_EGL_LIBRARY, @b _GLFW_GLX_LIBRARY, @b\n_GLFW_OSMESA_LIBRARY, @b _GLFW_OPENGL_LIBRARY, @b _GLFW_GLESV1_LIBRARY and @b\n_GLFW_GLESV2_LIBRARY.  Otherwise, GLFW will use the built-in default names.\n\nFor the EGL context creation API, the following options are available:\n\n - @b _GLFW_USE_EGLPLATFORM_H to use an existing `EGL/eglplatform.h` header file\n   for native handle types (fallback)\n\n@note None of the @ref build_macros may be defined during the compilation of\nGLFW.  If you define any of these in your build files, make sure they are not\napplied to the GLFW sources.\n\n*/\n"
  },
  {
    "path": "thirdparty/glfw/docs/context.dox",
    "content": "/*!\n\n@page context_guide Context guide\n\n@tableofcontents\n\nThis guide introduces the OpenGL and OpenGL ES context related functions of\nGLFW.  For details on a specific function in this category, see the @ref\ncontext.  There are also guides for the other areas of the GLFW API.\n\n - @ref intro_guide\n - @ref window_guide\n - @ref vulkan_guide\n - @ref monitor_guide\n - @ref input_guide\n\n\n@section context_object Context objects\n\nA window object encapsulates both a top-level window and an OpenGL or OpenGL ES\ncontext.  It is created with @ref glfwCreateWindow and destroyed with @ref\nglfwDestroyWindow or @ref glfwTerminate.  See @ref window_creation for more\ninformation.\n\nAs the window and context are inseparably linked, the window object also serves\nas the context handle.\n\nTo test the creation of various kinds of contexts and see their properties, run\nthe `glfwinfo` test program.\n\n@note Vulkan does not have a context and the Vulkan instance is created via the\nVulkan API itself.  If you will be using Vulkan to render to a window, disable\ncontext creation by setting the [GLFW_CLIENT_API](@ref GLFW_CLIENT_API_hint)\nhint to `GLFW_NO_API`.  For more information, see the @ref vulkan_guide.\n\n\n@subsection context_hints Context creation hints\n\nThere are a number of hints, specified using @ref glfwWindowHint, related to\nwhat kind of context is created.  See\n[context related hints](@ref window_hints_ctx) in the window guide.\n\n\n@subsection context_sharing Context object sharing\n\nWhen creating a window and its OpenGL or OpenGL ES context with @ref\nglfwCreateWindow, you can specify another window whose context the new one\nshould share its objects (textures, vertex and element buffers, etc.) with.\n\n@code\nGLFWwindow* second_window = glfwCreateWindow(640, 480, \"Second Window\", NULL, first_window);\n@endcode\n\nObject sharing is implemented by the operating system and graphics driver.  On\nplatforms where it is possible to choose which types of objects are shared, GLFW\nrequests that all types are shared.\n\nSee the relevant chapter of the [OpenGL](https://www.opengl.org/registry/) or\n[OpenGL ES](https://www.khronos.org/opengles/) reference documents for more\ninformation.  The name and number of this chapter unfortunately varies between\nversions and APIs, but has at times been named _Shared Objects and Multiple\nContexts_.\n\nGLFW comes with a barebones object sharing example program called `sharing`.\n\n\n@subsection context_offscreen Offscreen contexts\n\nGLFW doesn't support creating contexts without an associated window.  However,\ncontexts with hidden windows can be created with the\n[GLFW_VISIBLE](@ref GLFW_VISIBLE_hint) window hint.\n\n@code\nglfwWindowHint(GLFW_VISIBLE, GLFW_FALSE);\n\nGLFWwindow* offscreen_context = glfwCreateWindow(640, 480, \"\", NULL, NULL);\n@endcode\n\nThe window never needs to be shown and its context can be used as a plain\noffscreen context.  Depending on the window manager, the size of a hidden\nwindow's framebuffer may not be usable or modifiable, so framebuffer\nobjects are recommended for rendering with such contexts.\n\nYou should still [process events](@ref events) as long as you have at least one\nwindow, even if none of them are visible.\n\n@macos The first time a window is created the menu bar is created.  This is not\ndesirable for example when writing a command-line only application.  Menu bar\ncreation can be disabled with the @ref GLFW_COCOA_MENUBAR init hint.\n\n\n@subsection context_less Windows without contexts\n\nYou can disable context creation by setting the\n[GLFW_CLIENT_API](@ref GLFW_CLIENT_API_hint) hint to `GLFW_NO_API`.  Windows\nwithout contexts must not be passed to @ref glfwMakeContextCurrent or @ref\nglfwSwapBuffers.\n\n\n@section context_current Current context\n\nBefore you can make OpenGL or OpenGL ES calls, you need to have a current\ncontext of the correct type.  A context can only be current for a single thread\nat a time, and a thread can only have a single context current at a time.\n\nWhen moving a context between threads, you must make it non-current on the old\nthread before making it current on the new one.\n\nThe context of a window is made current with @ref glfwMakeContextCurrent.\n\n@code\nglfwMakeContextCurrent(window);\n@endcode\n\nThe window of the current context is returned by @ref glfwGetCurrentContext.\n\n@code\nGLFWwindow* window = glfwGetCurrentContext();\n@endcode\n\nThe following GLFW functions require a context to be current.  Calling any these\nfunctions without a current context will generate a @ref GLFW_NO_CURRENT_CONTEXT\nerror.\n\n - @ref glfwSwapInterval\n - @ref glfwExtensionSupported\n - @ref glfwGetProcAddress\n\n\n@section context_swap Buffer swapping\n\nSee @ref buffer_swap in the window guide.\n\n\n@section context_glext OpenGL and OpenGL ES extensions\n\nOne of the benefits of OpenGL and OpenGL ES is their extensibility.\nHardware vendors may include extensions in their implementations that extend the\nAPI before that functionality is included in a new version of the OpenGL or\nOpenGL ES specification, and some extensions are never included and remain\nas extensions until they become obsolete.\n\nAn extension is defined by:\n\n- An extension name (e.g. `GL_ARB_debug_output`)\n- New OpenGL tokens (e.g. `GL_DEBUG_SEVERITY_HIGH_ARB`)\n- New OpenGL functions (e.g. `glGetDebugMessageLogARB`)\n\nNote the `ARB` affix, which stands for Architecture Review Board and is used\nfor official extensions.  The extension above was created by the ARB, but there\nare many different affixes, like `NV` for Nvidia and `AMD` for, well, AMD.  Any\ngroup may also use the generic `EXT` affix.  Lists of extensions, together with\ntheir specifications, can be found at the\n[OpenGL Registry](https://www.opengl.org/registry/) and\n[OpenGL ES Registry](https://www.khronos.org/registry/gles/).\n\n\n@subsection context_glext_auto Loading extension with a loader library\n\nAn extension loader library is the easiest and best way to access both OpenGL and\nOpenGL ES extensions and modern versions of the core OpenGL or OpenGL ES APIs.\nThey will take care of all the details of declaring and loading everything you\nneed.  One such library is [glad](https://github.com/Dav1dde/glad) and there are\nseveral others.\n\nThe following example will use glad but all extension loader libraries work\nsimilarly.\n\nFirst you need to generate the source files using the glad Python script.  This\nexample generates a loader for any version of OpenGL, which is the default for\nboth GLFW and glad, but loaders for OpenGL ES, as well as loaders for specific\nAPI versions and extension sets can be generated.  The generated files are\nwritten to the `output` directory.\n\n@code{.sh}\npython main.py --generator c --no-loader --out-path output\n@endcode\n\nThe `--no-loader` option is added because GLFW already provides a function for\nloading OpenGL and OpenGL ES function pointers, one that automatically uses the\nselected context creation API, and glad can call this instead of having to\nimplement its own.  There are several other command-line options as well.  See\nthe glad documentation for details.\n\nAdd the generated `output/src/glad.c`, `output/include/glad/glad.h` and\n`output/include/KHR/khrplatform.h` files to your build.  Then you need to\ninclude the glad header file, which will replace the OpenGL header of your\ndevelopment environment.  By including the glad header before the GLFW header,\nit suppresses the development environment's OpenGL or OpenGL ES header.\n\n@code\n#include <glad/glad.h>\n#include <GLFW/glfw3.h>\n@endcode\n\nFinally you need to initialize glad once you have a suitable current context.\n\n@code\nwindow = glfwCreateWindow(640, 480, \"My Window\", NULL, NULL);\nif (!window)\n{\n    ...\n}\n\nglfwMakeContextCurrent(window);\n\ngladLoadGLLoader((GLADloadproc) glfwGetProcAddress);\n@endcode\n\nOnce glad has been loaded, you have access to all OpenGL core and extension\nfunctions supported by both the context you created and the glad loader you\ngenerated and you are ready to start rendering.\n\nYou can specify a minimum required OpenGL or OpenGL ES version with\n[context hints](@ref window_hints_ctx).  If your needs are more complex, you can\ncheck the actual OpenGL or OpenGL ES version with\n[context attributes](@ref window_attribs_ctx), or you can check whether\na specific version is supported by the current context with the\n`GLAD_GL_VERSION_x_x` booleans.\n\n@code\nif (GLAD_GL_VERSION_3_2)\n{\n    // Call OpenGL 3.2+ specific code\n}\n@endcode\n\nTo check whether a specific extension is supported, use the `GLAD_GL_xxx`\nbooleans.\n\n@code\nif (GLAD_GL_ARB_debug_output)\n{\n    // Use GL_ARB_debug_output\n}\n@endcode\n\n\n@subsection context_glext_manual Loading extensions manually\n\n__Do not use this technique__ unless it is absolutely necessary.  An\n[extension loader library](@ref context_glext_auto) will save you a ton of\ntedious, repetitive, error prone work.\n\nTo use a certain extension, you must first check whether the context supports\nthat extension and then, if it introduces new functions, retrieve the pointers\nto those functions.  GLFW provides @ref glfwExtensionSupported and @ref\nglfwGetProcAddress for manual loading of extensions and new API functions.\n\nThis section will demonstrate manual loading of OpenGL extensions.  The loading\nof OpenGL ES extensions is identical except for the name of the extension header.\n\n\n@subsubsection context_glext_header The glext.h header\n\nThe `glext.h` extension header is a continually updated file that defines the\ninterfaces for all OpenGL extensions.  The latest version of this can always be\nfound at the [OpenGL Registry](https://www.opengl.org/registry/).  There are also\nextension headers for the various versions of OpenGL ES at the\n[OpenGL ES Registry](https://www.khronos.org/registry/gles/).  It it strongly\nrecommended that you use your own copy of the extension header, as the one\nincluded in your development environment may be several years out of date and\nmay not include the extensions you wish to use.\n\nThe header defines function pointer types for all functions of all extensions it\nsupports.  These have names like `PFNGLGETDEBUGMESSAGELOGARBPROC` (for\n`glGetDebugMessageLogARB`), i.e. the name is made uppercase and `PFN` (pointer\nto function) and `PROC` (procedure) are added to the ends.\n\nTo include the extension header, define @ref GLFW_INCLUDE_GLEXT before including\nthe GLFW header.\n\n@code\n#define GLFW_INCLUDE_GLEXT\n#include <GLFW/glfw3.h>\n@endcode\n\n\n@subsubsection context_glext_string Checking for extensions\n\nA given machine may not actually support the extension (it may have older\ndrivers or a graphics card that lacks the necessary hardware features), so it\nis necessary to check at run-time whether the context supports the extension.\nThis is done with @ref glfwExtensionSupported.\n\n@code\nif (glfwExtensionSupported(\"GL_ARB_debug_output\"))\n{\n    // The extension is supported by the current context\n}\n@endcode\n\nThe argument is a null terminated ASCII string with the extension name.  If the\nextension is supported, @ref glfwExtensionSupported returns `GLFW_TRUE`,\notherwise it returns `GLFW_FALSE`.\n\n\n@subsubsection context_glext_proc Fetching function pointers\n\nMany extensions, though not all, require the use of new OpenGL functions.\nThese functions often do not have entry points in the client API libraries of\nyour operating system, making it necessary to fetch them at run time.  You can\nretrieve pointers to these functions with @ref glfwGetProcAddress.\n\n@code\nPFNGLGETDEBUGMESSAGELOGARBPROC pfnGetDebugMessageLog = glfwGetProcAddress(\"glGetDebugMessageLogARB\");\n@endcode\n\nIn general, you should avoid giving the function pointer variables the (exact)\nsame name as the function, as this may confuse your linker.  Instead, you can\nuse a different prefix, like above, or some other naming scheme.\n\nNow that all the pieces have been introduced, here is what they might look like\nwhen used together.\n\n@code\n#define GLFW_INCLUDE_GLEXT\n#include <GLFW/glfw3.h>\n\n#define glGetDebugMessageLogARB pfnGetDebugMessageLog\nPFNGLGETDEBUGMESSAGELOGARBPROC pfnGetDebugMessageLog;\n\n// Flag indicating whether the extension is supported\nint has_ARB_debug_output = 0;\n\nvoid load_extensions(void)\n{\n    if (glfwExtensionSupported(\"GL_ARB_debug_output\"))\n    {\n        pfnGetDebugMessageLog = (PFNGLGETDEBUGMESSAGELOGARBPROC)\n            glfwGetProcAddress(\"glGetDebugMessageLogARB\");\n        has_ARB_debug_output = 1;\n    }\n}\n\nvoid some_function(void)\n{\n    if (has_ARB_debug_output)\n    {\n        // Now the extension function can be called as usual\n        glGetDebugMessageLogARB(...);\n    }\n}\n@endcode\n\n*/\n"
  },
  {
    "path": "thirdparty/glfw/docs/extra.css",
    "content": ".sm-dox,.sm-dox a,.sm-dox a:focus,.sm-dox a:active,.sm-dox a:hover,.sm-dox a.highlighted,.sm-dox ul a:hover{background:none;text-shadow:none}.sm-dox a span.sub-arrow{border-color:#f2f2f2 transparent transparent transparent}.sm-dox a span.sub-arrow:active,.sm-dox a span.sub-arrow:focus,.sm-dox a span.sub-arrow:hover,.sm-dox a:hover span.sub-arrow{border-color:#f60 transparent transparent transparent}.sm-dox ul a span.sub-arrow:active,.sm-dox ul a span.sub-arrow:focus,.sm-dox ul a span.sub-arrow:hover,.sm-dox ul a:hover span.sub-arrow{border-color:transparent transparent transparent #f60}.sm-dox ul a:hover{background:#666;text-shadow:none}.sm-dox ul.sm-nowrap a{color:#4d4d4d;text-shadow:none}#main-nav,#main-menu,#main-menu a,#main-menu a:visited,#main-menu a:hover,#main-menu li,.memdoc,dl.reflist dd,div.toc li,.ah,span.lineno,span.lineno a,span.lineno a:hover,.note code,.pre code,.post code,.invariant code,.warning code,.attention code,.deprecated code,.bug code,.todo code,.test code,.doxtable code,.markdownTable code{background:none}#titlearea,.footer,.contents,div.header,.memdoc,table.doxtable td,table.doxtable th,table.markdownTable td,table.markdownTable th,hr,.memSeparator{border:none}#main-menu a,#main-menu a:visited,#main-menu a:hover,#main-menu li,.reflist dt a.el,.levels span,.directory .levels span{text-shadow:none}.memdoc,dl.reflist dd{box-shadow:none}div.headertitle,.note code,.pre code,.post code,.invariant code,.warning code,.attention code,.deprecated code,.bug code,.todo code,.test code,table.doxtable code,table.markdownTable code{padding:0}#nav-path,.directory .levels,span.lineno{display:none}html,#titlearea,.footer,tr.even,.directory tr.even,.doxtable tr:nth-child(even),tr.markdownTableBody:nth-child(even),.mdescLeft,.mdescRight,.memItemLeft,.memItemRight,code,.markdownTableRowEven{background:#f2f2f2}body{color:#4d4d4d}h1,h2,h2.groupheader,h3,div.toc h3,h4,h5,h6,strong,em{color:#1a1a1a;border-bottom:none}h1{padding-top:0.5em;font-size:180%}h2{padding-top:0.5em;margin-bottom:0;font-size:140%}h3{padding-top:0.5em;margin-bottom:0;font-size:110%}.glfwheader{font-size:16px;height:64px;max-width:920px;min-width:800px;padding:0 32px;margin:0 auto}#glfwhome{line-height:64px;padding-right:48px;color:#666;font-size:2.5em;background:url(\"https://www.glfw.org/css/arrow.png\") no-repeat right}.glfwnavbar{list-style-type:none;margin:0 auto;float:right}#glfwhome,.glfwnavbar li{float:left}.glfwnavbar a,.glfwnavbar a:visited{line-height:64px;margin-left:2em;display:block;color:#666}#glfwhome,.glfwnavbar a,.glfwnavbar a:visited{transition:.35s ease}#titlearea,.footer{color:#666}address.footer{text-align:center;padding:2em;margin-top:3em}#top{background:#666}#main-nav{max-width:960px;min-width:800px;margin:0 auto;font-size:13px}#main-menu{max-width:920px;min-width:800px;margin:0 auto;font-size:13px}.memtitle{display:none}.memproto,.memname{font-weight:bold;text-shadow:none}#main-menu{height:36px;display:block;position:relative}#main-menu a,#main-menu a:visited,#main-menu a:hover,#main-menu li{color:#f2f2f2}#main-menu li ul.sm-nowrap li a{color:#4d4d4d}#main-menu li ul.sm-nowrap li a:hover{color:#f60}.contents{min-height:590px}div.contents,div.header{max-width:920px;margin:0 auto;padding:0 32px;background:#fff none}table.doxtable th,table.markdownTable th,dl.reflist dt{background:linear-gradient(to bottom, #ffa733 0, #f60 100%);box-shadow:inset 0 0 32px #f60;text-shadow:0 -1px 1px #b34700;text-align:left;color:#fff}dl.reflist dt a.el{color:#f60;padding:.2em;border-radius:4px;background-color:#ffe0cc}div.toc{float:none;width:auto}div.toc h3{font-size:1.17em}div.toc ul{padding-left:1.5em}div.toc li{font-size:1em;padding-left:0;list-style-type:disc}div.toc,.memproto,div.qindex,div.ah{background:linear-gradient(to bottom, #f2f2f2 0, #e6e6e6 100%);box-shadow:inset 0 0 32px #e6e6e6;text-shadow:0 1px 1px #fff;color:#1a1a1a;border:2px solid #e6e6e6;border-radius:4px}.paramname{color:#803300}dl.reflist dt{border:2px solid #f60;border-top-left-radius:4px;border-top-right-radius:4px;border-bottom:none}dl.reflist dd{border:2px solid #f60;border-bottom-right-radius:4px;border-bottom-left-radius:4px;border-top:none}table.doxtable,table.markdownTable{border-collapse:inherit;border-spacing:0;border:2px solid #f60;border-radius:4px}a,a:hover,a:visited,a:visited:hover,.contents a:visited,.el,a.el:visited,#glfwhome:hover,#main-menu a:hover,span.lineno a:hover{color:#f60;text-decoration:none}div.directory{border-collapse:inherit;border-spacing:0;border:2px solid #f60;border-radius:4px}hr,.memSeparator{height:2px;background:linear-gradient(to right, #f2f2f2 0, #d9d9d9 50%, #f2f2f2 100%)}dl.note,dl.pre,dl.post,dl.invariant{background:linear-gradient(to bottom, #ddfad1 0, #cbf7ba 100%);box-shadow:inset 0 0 32px #baf5a3;color:#1e5309;border:2px solid #afe599}dl.warning,dl.attention{background:linear-gradient(to bottom, #fae8d1 0, #f7ddba 100%);box-shadow:inset 0 0 32px #f5d1a3;color:#533309;border:2px solid #e5c499}dl.deprecated,dl.bug{background:linear-gradient(to bottom, #fad1e3 0, #f7bad6 100%);box-shadow:inset 0 0 32px #f5a3c8;color:#53092a;border:2px solid #e599bb}dl.todo,dl.test{background:linear-gradient(to bottom, #d1ecfa 0, #bae3f7 100%);box-shadow:inset 0 0 32px #a3daf5;color:#093a53;border:2px solid #99cce5}dl.note,dl.pre,dl.post,dl.invariant,dl.warning,dl.attention,dl.deprecated,dl.bug,dl.todo,dl.test{border-radius:4px;padding:1em;text-shadow:0 1px 1px #fff;margin:1em 0}.note a,.pre a,.post a,.invariant a,.warning a,.attention a,.deprecated a,.bug a,.todo a,.test a,.note a:visited,.pre a:visited,.post a:visited,.invariant a:visited,.warning a:visited,.attention a:visited,.deprecated a:visited,.bug a:visited,.todo a:visited,.test a:visited{color:inherit}div.line{line-height:inherit}div.fragment,pre.fragment{background:#f2f2f2;border-radius:4px;border:none;padding:1em;overflow:auto;border-left:4px solid #ccc;margin:1em 0}.lineno a,.lineno a:visited,.line,pre.fragment{color:#4d4d4d}span.preprocessor,span.comment{color:#007899}a.code,a.code:visited{color:#e64500}span.keyword,span.keywordtype,span.keywordflow{color:#404040;font-weight:bold}span.stringliteral{color:#360099}code{padding:.1em;border-radius:4px}\n"
  },
  {
    "path": "thirdparty/glfw/docs/extra.less",
    "content": "// NOTE: Please use this file to perform modifications on default style sheets.\n//\n// You need to install a few Ruby gems to generate extra.css from this file:\n// gem install less therubyracer\n//\n// Run this command to regenerate extra.css after you're finished with changes:\n// lessc --compress extra.less > extra.css\n//\n// Alternatively you can use online services to regenerate extra.css.\n\n\n// Default text color for page contents\n@default-text-color: hsl(0,0%,30%);\n\n// Page header, footer, table rows, inline codes and definition lists\n@header-footer-background-color: hsl(0,0%,95%);\n\n// Page header, footer links and navigation bar background\n@header-footer-link-color: hsl(0,0%,40%);\n\n// Doxygen navigation bar links\n@navbar-link-color: @header-footer-background-color;\n\n// Page content background color\n@content-background-color: hsl(0,0%,100%);\n\n// Bold, italic, h1, h2, ... and table of contents\n@heading-color: hsl(0,0%,10%);\n\n// Function, enum and macro definition separator\n@def-separator-color: @header-footer-background-color;\n\n// Base color hue\n@base-hue: 24;\n\n// Default color used for links\n@default-link-color: hsl(@base-hue,100%,50%);\n\n// Doxygen navigation bar active tab\n@tab-text-color: hsl(0,0%,100%);\n@tab-background-color1: @default-link-color;\n@tab-background-color2: lighten(spin(@tab-background-color1, 10), 10%);\n\n// Table borders\n@default-border-color: @default-link-color;\n\n// Table header\n@table-text-color: @tab-text-color;\n@table-background-color1: @tab-background-color1;\n@table-background-color2: @tab-background-color2;\n\n// Table of contents, data structure index and prototypes\n@toc-background-color1: hsl(0,0%,90%);\n@toc-background-color2: lighten(@toc-background-color1, 5%);\n\n// Function prototype parameters color\n@prototype-param-color: darken(@default-link-color, 25%);\n\n// Message box color: note, pre, post and invariant\n@box-note-color: hsl(103,80%,85%);\n\n// Message box color: warning and attention\n@box-warning-color: hsl(34,80%,85%);\n\n// Message box color: deprecated and bug\n@box-bug-color: hsl(333,80%,85%);\n\n// Message box color: todo and test\n@box-todo-color: hsl(200,80%,85%);\n\n// Message box helper function\n.message-box(@base-color) {\n\tbackground:linear-gradient(to bottom,lighten(@base-color, 5%) 0%,@base-color 100%);\n\tbox-shadow:inset 0 0 32px darken(@base-color, 5%);\n\tcolor:darken(@base-color, 67%);\n\tborder:2px solid desaturate(darken(@base-color, 10%), 20%);\n}\n\n.sm-dox,.sm-dox a,.sm-dox a:focus,.sm-dox a:active,.sm-dox a:hover,.sm-dox a.highlighted,.sm-dox ul a:hover {\n    background:none;\n    text-shadow:none;\n}\n\n.sm-dox a span.sub-arrow {\n\tborder-color:@navbar-link-color transparent transparent transparent;\n}\n\n.sm-dox a span.sub-arrow:active,.sm-dox a span.sub-arrow:focus,.sm-dox a span.sub-arrow:hover,.sm-dox a:hover span.sub-arrow {\n\tborder-color:@default-link-color transparent transparent transparent;\n}\n\n.sm-dox ul a span.sub-arrow:active,.sm-dox ul a span.sub-arrow:focus,.sm-dox ul a span.sub-arrow:hover,.sm-dox ul a:hover span.sub-arrow {\n\tborder-color:transparent transparent transparent @default-link-color;\n}\n\n.sm-dox ul a:hover {\n    background:@header-footer-link-color;\n    text-shadow:none;\n}\n\n.sm-dox ul.sm-nowrap a {\n\tcolor:@default-text-color;\n    text-shadow:none;\n}\n\n#main-nav,#main-menu,#main-menu a,#main-menu a:visited,#main-menu a:hover,#main-menu li,.memdoc,dl.reflist dd,div.toc li,.ah,span.lineno,span.lineno a,span.lineno a:hover,.note code,.pre code,.post code,.invariant code,.warning code,.attention code,.deprecated code,.bug code,.todo code,.test code,.doxtable code,.markdownTable code {\n\tbackground:none;\n}\n\n#titlearea,.footer,.contents,div.header,.memdoc,table.doxtable td,table.doxtable th,table.markdownTable td,table.markdownTable th,hr,.memSeparator {\n\tborder:none;\n}\n\n#main-menu a,#main-menu a:visited,#main-menu a:hover,#main-menu li,.reflist dt a.el,.levels span,.directory .levels span {\n\ttext-shadow:none;\n}\n\n.memdoc,dl.reflist dd {\n\tbox-shadow:none;\n}\n\ndiv.headertitle,.note code,.pre code,.post code,.invariant code,.warning code,.attention code,.deprecated code,.bug code,.todo code,.test code,table.doxtable code,table.markdownTable code {\n\tpadding:0;\n}\n\n#nav-path,.directory .levels,span.lineno {\n\tdisplay:none;\n}\n\nhtml,#titlearea,.footer,tr.even,.directory tr.even,.doxtable tr:nth-child(even),tr.markdownTableBody:nth-child(even),.mdescLeft,.mdescRight,.memItemLeft,.memItemRight,code,.markdownTableRowEven {\n\tbackground:@header-footer-background-color;\n}\n\nbody {\n\tcolor:@default-text-color;\n}\n\nh1,h2,h2.groupheader,h3,div.toc h3,h4,h5,h6,strong,em {\n\tcolor:@heading-color;\n\tborder-bottom:none;\n}\n\nh1 {\n  padding-top:0.5em;\n  font-size:180%;\n}\n\nh2 {\n  padding-top:0.5em;\n  margin-bottom:0;\n  font-size:140%;\n}\n\nh3 {\n  padding-top:0.5em;\n  margin-bottom:0;\n  font-size:110%;\n}\n\n.glfwheader {\n\tfont-size:16px;\n\theight:64px;\n\tmax-width:920px;\n\tmin-width:800px;\n\tpadding:0 32px;\n\tmargin:0 auto;\n}\n\n#glfwhome {\n\tline-height:64px;\n\tpadding-right:48px;\n\tcolor:@header-footer-link-color;\n\tfont-size:2.5em;\n\tbackground:url(\"https://www.glfw.org/css/arrow.png\") no-repeat right;\n}\n\n.glfwnavbar {\n\tlist-style-type:none;\n\tmargin:0 auto;\n\tfloat:right;\n}\n\n#glfwhome,.glfwnavbar li {\n\tfloat:left;\n}\n\n.glfwnavbar a,.glfwnavbar a:visited {\n\tline-height:64px;\n\tmargin-left:2em;\n\tdisplay:block;\n\tcolor:@header-footer-link-color;\n}\n\n#glfwhome,.glfwnavbar a,.glfwnavbar a:visited {\n\ttransition:.35s ease;\n}\n\n#titlearea,.footer {\n\tcolor:@header-footer-link-color;\n}\n\naddress.footer {\n\ttext-align:center;\n\tpadding:2em;\n\tmargin-top:3em;\n}\n\n#top {\n\tbackground:@header-footer-link-color;\n}\n\n#main-nav {\n\tmax-width:960px;\n\tmin-width:800px;\n\tmargin:0 auto;\n\tfont-size:13px;\n}\n\n#main-menu {\n\tmax-width:920px;\n\tmin-width:800px;\n\tmargin:0 auto;\n\tfont-size:13px;\n}\n\n.memtitle {\n    display:none;\n}\n\n.memproto,.memname {\n    font-weight:bold;\n    text-shadow:none;\n}\n\n#main-menu {\n\theight:36px;\n\tdisplay:block;\n\tposition:relative;\n}\n\n#main-menu a,#main-menu a:visited,#main-menu a:hover,#main-menu li {\n\tcolor:@navbar-link-color;\n}\n\n#main-menu li ul.sm-nowrap li a {\n\tcolor:@default-text-color;\n}\n\n#main-menu li ul.sm-nowrap li a:hover {\n\tcolor:@default-link-color;\n}\n\n.contents {\n\tmin-height:590px;\n}\n\ndiv.contents,div.header {\n\tmax-width:920px;\n\tmargin:0 auto;\n\tpadding:0 32px;\n\tbackground:@content-background-color none;\n}\n\ntable.doxtable th,table.markdownTable th,dl.reflist dt {\n\tbackground:linear-gradient(to bottom,@table-background-color2 0%,@table-background-color1 100%);\n\tbox-shadow:inset 0 0 32px @table-background-color1;\n\ttext-shadow:0 -1px 1px darken(@table-background-color1, 15%);\n\ttext-align:left;\n\tcolor:@table-text-color;\n}\n\ndl.reflist dt a.el {\n\tcolor:@default-link-color;\n\tpadding:.2em;\n\tborder-radius:4px;\n\tbackground-color:lighten(@default-link-color, 40%);\n}\n\ndiv.toc {\n\tfloat:none;\n\twidth:auto;\n}\n\ndiv.toc h3 {\n\tfont-size:1.17em;\n}\n\ndiv.toc ul {\n\tpadding-left:1.5em;\n}\n\ndiv.toc li {\n\tfont-size:1em;\n\tpadding-left:0;\n\tlist-style-type:disc;\n}\n\ndiv.toc,.memproto,div.qindex,div.ah {\n\tbackground:linear-gradient(to bottom,@toc-background-color2 0%,@toc-background-color1 100%);\n\tbox-shadow:inset 0 0 32px @toc-background-color1;\n\ttext-shadow:0 1px 1px lighten(@toc-background-color2, 10%);\n\tcolor:@heading-color;\n\tborder:2px solid @toc-background-color1;\n\tborder-radius:4px;\n}\n\n.paramname {\n\tcolor:@prototype-param-color;\n}\n\ndl.reflist dt {\n\tborder:2px solid @default-border-color;\n\tborder-top-left-radius:4px;\n\tborder-top-right-radius:4px;\n\tborder-bottom:none;\n}\n\ndl.reflist dd {\n\tborder:2px solid @default-border-color;\n\tborder-bottom-right-radius:4px;\n\tborder-bottom-left-radius:4px;\n\tborder-top:none;\n}\n\ntable.doxtable,table.markdownTable {\n\tborder-collapse:inherit;\n\tborder-spacing:0;\n\tborder:2px solid @default-border-color;\n\tborder-radius:4px;\n}\n\na,a:hover,a:visited,a:visited:hover,.contents a:visited,.el,a.el:visited,#glfwhome:hover,#main-menu a:hover,span.lineno a:hover {\n\tcolor:@default-link-color;\n\ttext-decoration:none;\n}\n\ndiv.directory {\n\tborder-collapse:inherit;\n\tborder-spacing:0;\n\tborder:2px solid @default-border-color;\n\tborder-radius:4px;\n}\n\nhr,.memSeparator {\n\theight:2px;\n\tbackground:linear-gradient(to right,@def-separator-color 0%,darken(@def-separator-color, 10%) 50%,@def-separator-color 100%);\n}\n\ndl.note,dl.pre,dl.post,dl.invariant {\n\t.message-box(@box-note-color);\n}\n\ndl.warning,dl.attention {\n\t.message-box(@box-warning-color);\n}\n\ndl.deprecated,dl.bug {\n\t.message-box(@box-bug-color);\n}\n\ndl.todo,dl.test {\n\t.message-box(@box-todo-color);\n}\n\ndl.note,dl.pre,dl.post,dl.invariant,dl.warning,dl.attention,dl.deprecated,dl.bug,dl.todo,dl.test {\n\tborder-radius:4px;\n\tpadding:1em;\n\ttext-shadow:0 1px 1px hsl(0,0%,100%);\n\tmargin:1em 0;\n}\n\n.note a,.pre a,.post a,.invariant a,.warning a,.attention a,.deprecated a,.bug a,.todo a,.test a,.note a:visited,.pre a:visited,.post a:visited,.invariant a:visited,.warning a:visited,.attention a:visited,.deprecated a:visited,.bug a:visited,.todo a:visited,.test a:visited {\n\tcolor:inherit;\n}\n\ndiv.line {\n\tline-height:inherit;\n}\n\ndiv.fragment,pre.fragment {\n\tbackground:hsl(0,0%,95%);\n\tborder-radius:4px;\n\tborder:none;\n\tpadding:1em;\n\toverflow:auto;\n\tborder-left:4px solid hsl(0,0%,80%);\n\tmargin:1em 0;\n}\n\n.lineno a,.lineno a:visited,.line,pre.fragment {\n\tcolor:@default-text-color;\n}\n\nspan.preprocessor,span.comment {\n\tcolor:hsl(193,100%,30%);\n}\n\na.code,a.code:visited {\n\tcolor:hsl(18,100%,45%);\n}\n\nspan.keyword,span.keywordtype,span.keywordflow {\n\tcolor:darken(@default-text-color, 5%);\n\tfont-weight:bold;\n}\n\nspan.stringliteral {\n\tcolor:hsl(261,100%,30%);\n}\n\ncode {\n\tpadding:.1em;\n\tborder-radius:4px;\n}\n"
  },
  {
    "path": "thirdparty/glfw/docs/footer.html",
    "content": "<address class=\"footer\">\n<p>\nLast update on $date for $projectname $projectnumber\n</p>\n</address>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/header.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta http-equiv=\"X-UA-Compatible\" content=\"IE=9\"/>\n<meta name=\"generator\" content=\"Doxygen $doxygenversion\"/>\n<!--BEGIN PROJECT_NAME--><title>$projectname: $title</title><!--END PROJECT_NAME-->\n<!--BEGIN !PROJECT_NAME--><title>$title</title><!--END !PROJECT_NAME-->\n<link href=\"$relpath^tabs.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"$relpath^jquery.js\"></script>\n<script type=\"text/javascript\" src=\"$relpath^dynsections.js\"></script>\n$treeview\n$search\n$mathjax\n<link href=\"$relpath^$stylesheet\" rel=\"stylesheet\" type=\"text/css\" />\n$extrastylesheet\n</head>\n<body>\n<div id=\"top\"><!-- do not remove this div, it is closed by doxygen! -->\n\n<!--BEGIN TITLEAREA-->\n<div id=\"titlearea\">\n\t<div class=\"glfwheader\">\n\t\t<a href=\"https://www.glfw.org/\" id=\"glfwhome\">GLFW</a>\n\t\t<ul class=\"glfwnavbar\">\n\t\t\t<li><a href=\"https://www.glfw.org/documentation.html\">Documentation</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/download.html\">Download</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/community.html\">Community</a></li>\n\t\t</ul>\n\t</div>\n</div>\n<!--END TITLEAREA-->\n<!-- end header part -->\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/bug.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta http-equiv=\"X-UA-Compatible\" content=\"IE=9\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<title>GLFW: Bug List</title>\n<link href=\"tabs.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"jquery.js\"></script>\n<script type=\"text/javascript\" src=\"dynsections.js\"></script>\n<link href=\"search/search.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"search/searchdata.js\"></script>\n<script type=\"text/javascript\" src=\"search/search.js\"></script>\n<link href=\"doxygen.css\" rel=\"stylesheet\" type=\"text/css\" />\n<link href=\"extra.css\" rel=\"stylesheet\" type=\"text/css\"/>\n</head>\n<body>\n<div id=\"top\"><!-- do not remove this div, it is closed by doxygen! -->\n<div id=\"titlearea\">\n\t<div class=\"glfwheader\">\n\t\t<a href=\"https://www.glfw.org/\" id=\"glfwhome\">GLFW</a>\n\t\t<ul class=\"glfwnavbar\">\n\t\t\t<li><a href=\"https://www.glfw.org/documentation.html\">Documentation</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/download.html\">Download</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/community.html\">Community</a></li>\n\t\t</ul>\n\t</div>\n</div>\n<!-- end header part -->\n<!-- Generated by Doxygen 1.8.16 -->\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\nvar searchBox = new SearchBox(\"searchBox\", \"search\",false,'Search');\n/* @license-end */\n</script>\n<script type=\"text/javascript\" src=\"menudata.js\"></script>\n<script type=\"text/javascript\" src=\"menu.js\"></script>\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\n$(function() {\n  initMenu('',true,false,'search.php','Search');\n  $(document).ready(function() { init_search(); });\n});\n/* @license-end */</script>\n<div id=\"main-nav\"></div>\n<!-- window showing the filter options -->\n<div id=\"MSearchSelectWindow\"\n     onmouseover=\"return searchBox.OnSearchSelectShow()\"\n     onmouseout=\"return searchBox.OnSearchSelectHide()\"\n     onkeydown=\"return searchBox.OnSearchSelectKey(event)\">\n</div>\n\n<!-- iframe showing the search results (closed by default) -->\n<div id=\"MSearchResultsWindow\">\n<iframe src=\"javascript:void(0)\" frameborder=\"0\" \n        name=\"MSearchResults\" id=\"MSearchResults\">\n</iframe>\n</div>\n\n</div><!-- top -->\n<div class=\"PageDoc\"><div class=\"header\">\n  <div class=\"headertitle\">\n<div class=\"title\">Bug List </div>  </div>\n</div><!--header-->\n<div class=\"contents\">\n<div class=\"textblock\"><dl class=\"reflist\">\n<dt>Page <a class=\"el\" href=\"window_guide.html\">Window guide</a>  </dt>\n<dd><a class=\"anchor\" id=\"_bug000001\"></a>On some Linux systems, creating contexts via both the native and EGL APIs in a single process will cause the application to segfault. Stick to one API or the other on Linux for now.</dd>\n</dl>\n</div></div><!-- contents -->\n</div><!-- PageDoc -->\n<address class=\"footer\">\n<p>\nLast update on Mon Jan 20 2020 for GLFW 3.3.2\n</p>\n</address>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/build_8dox.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta http-equiv=\"X-UA-Compatible\" content=\"IE=9\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<title>GLFW: build.dox File Reference</title>\n<link href=\"tabs.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"jquery.js\"></script>\n<script type=\"text/javascript\" src=\"dynsections.js\"></script>\n<link href=\"search/search.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"search/searchdata.js\"></script>\n<script type=\"text/javascript\" src=\"search/search.js\"></script>\n<link href=\"doxygen.css\" rel=\"stylesheet\" type=\"text/css\" />\n<link href=\"extra.css\" rel=\"stylesheet\" type=\"text/css\"/>\n</head>\n<body>\n<div id=\"top\"><!-- do not remove this div, it is closed by doxygen! -->\n<div id=\"titlearea\">\n\t<div class=\"glfwheader\">\n\t\t<a href=\"https://www.glfw.org/\" id=\"glfwhome\">GLFW</a>\n\t\t<ul class=\"glfwnavbar\">\n\t\t\t<li><a href=\"https://www.glfw.org/documentation.html\">Documentation</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/download.html\">Download</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/community.html\">Community</a></li>\n\t\t</ul>\n\t</div>\n</div>\n<!-- end header part -->\n<!-- Generated by Doxygen 1.8.16 -->\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\nvar searchBox = new SearchBox(\"searchBox\", \"search\",false,'Search');\n/* @license-end */\n</script>\n<script type=\"text/javascript\" src=\"menudata.js\"></script>\n<script type=\"text/javascript\" src=\"menu.js\"></script>\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\n$(function() {\n  initMenu('',true,false,'search.php','Search');\n  $(document).ready(function() { init_search(); });\n});\n/* @license-end */</script>\n<div id=\"main-nav\"></div>\n<!-- window showing the filter options -->\n<div id=\"MSearchSelectWindow\"\n     onmouseover=\"return searchBox.OnSearchSelectShow()\"\n     onmouseout=\"return searchBox.OnSearchSelectHide()\"\n     onkeydown=\"return searchBox.OnSearchSelectKey(event)\">\n</div>\n\n<!-- iframe showing the search results (closed by default) -->\n<div id=\"MSearchResultsWindow\">\n<iframe src=\"javascript:void(0)\" frameborder=\"0\" \n        name=\"MSearchResults\" id=\"MSearchResults\">\n</iframe>\n</div>\n\n</div><!-- top -->\n<div class=\"header\">\n  <div class=\"headertitle\">\n<div class=\"title\">build.dox File Reference</div>  </div>\n</div><!--header-->\n<div class=\"contents\">\n</div><!-- contents -->\n<address class=\"footer\">\n<p>\nLast update on Mon Jan 20 2020 for GLFW 3.3.2\n</p>\n</address>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/build_guide.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta http-equiv=\"X-UA-Compatible\" content=\"IE=9\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<title>GLFW: Building applications</title>\n<link href=\"tabs.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"jquery.js\"></script>\n<script type=\"text/javascript\" src=\"dynsections.js\"></script>\n<link href=\"search/search.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"search/searchdata.js\"></script>\n<script type=\"text/javascript\" src=\"search/search.js\"></script>\n<link href=\"doxygen.css\" rel=\"stylesheet\" type=\"text/css\" />\n<link href=\"extra.css\" rel=\"stylesheet\" type=\"text/css\"/>\n</head>\n<body>\n<div id=\"top\"><!-- do not remove this div, it is closed by doxygen! -->\n<div id=\"titlearea\">\n\t<div class=\"glfwheader\">\n\t\t<a href=\"https://www.glfw.org/\" id=\"glfwhome\">GLFW</a>\n\t\t<ul class=\"glfwnavbar\">\n\t\t\t<li><a href=\"https://www.glfw.org/documentation.html\">Documentation</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/download.html\">Download</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/community.html\">Community</a></li>\n\t\t</ul>\n\t</div>\n</div>\n<!-- end header part -->\n<!-- Generated by Doxygen 1.8.16 -->\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\nvar searchBox = new SearchBox(\"searchBox\", \"search\",false,'Search');\n/* @license-end */\n</script>\n<script type=\"text/javascript\" src=\"menudata.js\"></script>\n<script type=\"text/javascript\" src=\"menu.js\"></script>\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\n$(function() {\n  initMenu('',true,false,'search.php','Search');\n  $(document).ready(function() { init_search(); });\n});\n/* @license-end */</script>\n<div id=\"main-nav\"></div>\n<!-- window showing the filter options -->\n<div id=\"MSearchSelectWindow\"\n     onmouseover=\"return searchBox.OnSearchSelectShow()\"\n     onmouseout=\"return searchBox.OnSearchSelectHide()\"\n     onkeydown=\"return searchBox.OnSearchSelectKey(event)\">\n</div>\n\n<!-- iframe showing the search results (closed by default) -->\n<div id=\"MSearchResultsWindow\">\n<iframe src=\"javascript:void(0)\" frameborder=\"0\" \n        name=\"MSearchResults\" id=\"MSearchResults\">\n</iframe>\n</div>\n\n</div><!-- top -->\n<div class=\"PageDoc\"><div class=\"header\">\n  <div class=\"headertitle\">\n<div class=\"title\">Building applications </div>  </div>\n</div><!--header-->\n<div class=\"contents\">\n<div class=\"toc\"><h3>Table of Contents</h3>\n<ul><li class=\"level1\"><a href=\"#build_include\">Including the GLFW header file</a><ul><li class=\"level2\"><a href=\"#build_macros\">GLFW header option macros</a></li>\n</ul>\n</li>\n<li class=\"level1\"><a href=\"#build_link\">Link with the right libraries</a><ul><li class=\"level2\"><a href=\"#build_link_win32\">With MinGW or Visual C++ on Windows</a></li>\n<li class=\"level2\"><a href=\"#build_link_cmake_source\">With CMake and GLFW source</a></li>\n<li class=\"level2\"><a href=\"#build_link_cmake_package\">With CMake and installed GLFW binaries</a></li>\n<li class=\"level2\"><a href=\"#build_link_pkgconfig\">With makefiles and pkg-config on Unix</a></li>\n<li class=\"level2\"><a href=\"#build_link_xcode\">With Xcode on macOS</a></li>\n<li class=\"level2\"><a href=\"#build_link_osx\">With command-line on macOS</a></li>\n</ul>\n</li>\n</ul>\n</div>\n<div class=\"textblock\"><p>This is about compiling and linking applications that use GLFW. For information on how to write such applications, start with the <a class=\"el\" href=\"quick_guide.html\">introductory tutorial</a>. For information on how to compile the GLFW library itself, see <a class=\"el\" href=\"compile_guide.html\">Compiling GLFW</a>.</p>\n<p>This is not a tutorial on compilation or linking. It assumes basic understanding of how to compile and link a C program as well as how to use the specific compiler of your chosen development environment. The compilation and linking process should be explained in your C programming material and in the documentation for your development environment.</p>\n<h1><a class=\"anchor\" id=\"build_include\"></a>\nIncluding the GLFW header file</h1>\n<p>You should include the GLFW header in the source files where you use OpenGL or GLFW.</p>\n<div class=\"fragment\"><div class=\"line\"><span class=\"preprocessor\">#include &lt;<a class=\"code\" href=\"glfw3_8h.html\">GLFW/glfw3.h</a>&gt;</span></div>\n</div><!-- fragment --><p>This header declares the GLFW API and by default also includes the OpenGL header from your development environment. See below for how to control this.</p>\n<p>The GLFW header also defines any platform-specific macros needed by your OpenGL header, so it can be included without needing any window system headers.</p>\n<p>For example, under Windows you are normally required to include <code>windows.h</code> before the OpenGL header, which would bring in the whole Win32 API. The GLFW header duplicates the small number of macros needed.</p>\n<p>It does this only when needed, so if <code>windows.h</code> <em>is</em> included, the GLFW header does not try to redefine those symbols. The reverse is not true, i.e. <code>windows.h</code> cannot cope if any of its symbols have already been defined.</p>\n<p>In other words:</p>\n<ul>\n<li>Do <em>not</em> include the OpenGL headers yourself, as GLFW does this for you</li>\n<li>Do <em>not</em> include <code>windows.h</code> or other platform-specific headers unless you plan on using those APIs directly</li>\n<li>If you <em>do</em> need to include such headers, do it <em>before</em> including the GLFW header and it will handle this</li>\n</ul>\n<p>If you are using an OpenGL extension loading library such as <a href=\"https://github.com/Dav1dde/glad\">glad</a>, the extension loader header should be included <em>before</em> the GLFW one.</p>\n<div class=\"fragment\"><div class=\"line\"><span class=\"preprocessor\">#include &lt;glad/gl.h&gt;</span></div>\n<div class=\"line\"><span class=\"preprocessor\">#include &lt;<a class=\"code\" href=\"glfw3_8h.html\">GLFW/glfw3.h</a>&gt;</span></div>\n</div><!-- fragment --><p>Alternatively the <a class=\"el\" href=\"build_guide.html#GLFW_INCLUDE_NONE\">GLFW_INCLUDE_NONE</a> macro (described below) can be used to prevent the GLFW header from including the OpenGL header.</p>\n<div class=\"fragment\"><div class=\"line\"><span class=\"preprocessor\">#define GLFW_INCLUDE_NONE</span></div>\n<div class=\"line\"><span class=\"preprocessor\">#include &lt;<a class=\"code\" href=\"glfw3_8h.html\">GLFW/glfw3.h</a>&gt;</span></div>\n<div class=\"line\"><span class=\"preprocessor\">#include &lt;glad/gl.h&gt;</span></div>\n</div><!-- fragment --><h2><a class=\"anchor\" id=\"build_macros\"></a>\nGLFW header option macros</h2>\n<p>These macros may be defined before the inclusion of the GLFW header and affect its behavior.</p>\n<p><a class=\"anchor\" id=\"GLFW_DLL\"></a><b>GLFW_DLL</b> is required on Windows when using the GLFW DLL, to tell the compiler that the GLFW functions are defined in a DLL.</p>\n<p>The following macros control which OpenGL or OpenGL ES API header is included. Only one of these may be defined at a time.</p>\n<dl class=\"section note\"><dt>Note</dt><dd>GLFW does not provide any of the API headers mentioned below. They are provided by your development environment or your OpenGL, OpenGL ES or Vulkan SDK, and most of them can be downloaded from the <a href=\"https://www.khronos.org/registry/\">Khronos Registry</a>.</dd></dl>\n<p><a class=\"anchor\" id=\"GLFW_INCLUDE_GLCOREARB\"></a><b>GLFW_INCLUDE_GLCOREARB</b> makes the GLFW header include the modern <code>GL/glcorearb.h</code> header (<code>OpenGL/gl3.h</code> on macOS) instead of the regular OpenGL header.</p>\n<p><a class=\"anchor\" id=\"GLFW_INCLUDE_ES1\"></a><b>GLFW_INCLUDE_ES1</b> makes the GLFW header include the OpenGL ES 1.x <code>GLES/gl.h</code> header instead of the regular OpenGL header.</p>\n<p><a class=\"anchor\" id=\"GLFW_INCLUDE_ES2\"></a><b>GLFW_INCLUDE_ES2</b> makes the GLFW header include the OpenGL ES 2.0 <code>GLES2/gl2.h</code> header instead of the regular OpenGL header.</p>\n<p><a class=\"anchor\" id=\"GLFW_INCLUDE_ES3\"></a><b>GLFW_INCLUDE_ES3</b> makes the GLFW header include the OpenGL ES 3.0 <code>GLES3/gl3.h</code> header instead of the regular OpenGL header.</p>\n<p><a class=\"anchor\" id=\"GLFW_INCLUDE_ES31\"></a><b>GLFW_INCLUDE_ES31</b> makes the GLFW header include the OpenGL ES 3.1 <code>GLES3/gl31.h</code> header instead of the regular OpenGL header.</p>\n<p><a class=\"anchor\" id=\"GLFW_INCLUDE_ES32\"></a><b>GLFW_INCLUDE_ES31</b> makes the GLFW header include the OpenGL ES 3.2 <code>GLES3/gl32.h</code> header instead of the regular OpenGL header.</p>\n<p><a class=\"anchor\" id=\"GLFW_INCLUDE_NONE\"></a><b>GLFW_INCLUDE_NONE</b> makes the GLFW header not include any OpenGL or OpenGL ES API header. This is useful in combination with an extension loading library.</p>\n<p>If none of the above inclusion macros are defined, the standard OpenGL <code>GL/gl.h</code> header (<code>OpenGL/gl.h</code> on macOS) is included.</p>\n<p>The following macros control the inclusion of additional API headers. Any number of these may be defined simultaneously, and/or together with one of the above macros.</p>\n<p><a class=\"anchor\" id=\"GLFW_INCLUDE_VULKAN\"></a><b>GLFW_INCLUDE_VULKAN</b> makes the GLFW header include the Vulkan <code>vulkan/vulkan.h</code> header in addition to any selected OpenGL or OpenGL ES header.</p>\n<p><a class=\"anchor\" id=\"GLFW_INCLUDE_GLEXT\"></a><b>GLFW_INCLUDE_GLEXT</b> makes the GLFW header include the appropriate extension header for the OpenGL or OpenGL ES header selected above after and in addition to that header.</p>\n<p><a class=\"anchor\" id=\"GLFW_INCLUDE_GLU\"></a><b>GLFW_INCLUDE_GLU</b> makes the header include the GLU header in addition to the header selected above. This should only be used with the standard OpenGL header and only for compatibility with legacy code. GLU has been deprecated and should not be used in new code.</p>\n<dl class=\"section note\"><dt>Note</dt><dd>None of these macros may be defined during the compilation of GLFW itself. If your build includes GLFW and you define any these in your build files, make sure they are not applied to the GLFW sources.</dd></dl>\n<h1><a class=\"anchor\" id=\"build_link\"></a>\nLink with the right libraries</h1>\n<p>GLFW is essentially a wrapper of various platform-specific APIs and therefore needs to link against many different system libraries. If you are using GLFW as a shared library / dynamic library / DLL then it takes care of these links. However, if you are using GLFW as a static library then your executable will need to link against these libraries.</p>\n<p>On Windows and macOS, the list of system libraries is static and can be hard-coded into your build environment. See the section for your development environment below. On Linux and other Unix-like operating systems, the list varies but can be retrieved in various ways as described below.</p>\n<p>A good general introduction to linking is <a href=\"https://www.lurklurk.org/linkers/linkers.html\">Beginner's Guide to Linkers</a> by David Drysdale.</p>\n<h2><a class=\"anchor\" id=\"build_link_win32\"></a>\nWith MinGW or Visual C++ on Windows</h2>\n<p>The static version of the GLFW library is named <code>glfw3</code>. When using this version, it is also necessary to link with some libraries that GLFW uses.</p>\n<p>When using MinGW to link an application with the static version of GLFW, you must also explicitly link with <code>gdi32</code>. Other toolchains including MinGW-w64 include it in the set of default libraries along with other dependencies like <code>user32</code> and <code>kernel32</code>.</p>\n<p>The link library for the GLFW DLL is named <code>glfw3dll</code>. When compiling an application that uses the DLL version of GLFW, you need to define the <a class=\"el\" href=\"build_guide.html#GLFW_DLL\">GLFW_DLL</a> macro <em>before</em> any inclusion of the GLFW header. This can be done either with a compiler switch or by defining it in your source code.</p>\n<h2><a class=\"anchor\" id=\"build_link_cmake_source\"></a>\nWith CMake and GLFW source</h2>\n<p>This section is about using CMake to compile and link GLFW along with your application. If you want to use an installed binary instead, see <a class=\"el\" href=\"build_guide.html#build_link_cmake_package\">With CMake and installed GLFW binaries</a>.</p>\n<p>With a few changes to your <code>CMakeLists.txt</code> you can have the GLFW source tree built along with your application.</p>\n<p>When including GLFW as part of your build, you probably don't want to build the GLFW tests, examples and documentation. To disable these, set the corresponding cache variables before adding the GLFW source tree.</p>\n<div class=\"fragment\"><div class=\"line\">set(GLFW_BUILD_DOCS OFF CACHE BOOL <span class=\"stringliteral\">&quot;&quot;</span> FORCE)</div>\n<div class=\"line\">set(GLFW_BUILD_TESTS OFF CACHE BOOL <span class=\"stringliteral\">&quot;&quot;</span> FORCE)</div>\n<div class=\"line\">set(GLFW_BUILD_EXAMPLES OFF CACHE BOOL <span class=\"stringliteral\">&quot;&quot;</span> FORCE)</div>\n</div><!-- fragment --><p>Add the root directory of the GLFW source tree to your project. This will add the <code>glfw</code> target to your project.</p>\n<div class=\"fragment\"><div class=\"line\">add_subdirectory(path/to/glfw)</div>\n</div><!-- fragment --><p>Once GLFW has been added, link your application against the <code>glfw</code> target. This adds the GLFW library and its link-time dependencies as it is currently configured, the include directory for the GLFW header and, when applicable, the <a class=\"el\" href=\"build_guide.html#GLFW_DLL\">GLFW_DLL</a> macro.</p>\n<div class=\"fragment\"><div class=\"line\">target_link_libraries(myapp glfw)</div>\n</div><!-- fragment --><p>Note that the <code>glfw</code> target does not depend on OpenGL, as GLFW loads any OpenGL, OpenGL ES or Vulkan libraries it needs at runtime. If your application calls OpenGL directly, instead of using a modern <a class=\"el\" href=\"context_guide.html#context_glext_auto\">extension loader library</a>, use the OpenGL CMake package.</p>\n<div class=\"fragment\"><div class=\"line\">find_package(OpenGL REQUIRED)</div>\n</div><!-- fragment --><p>If OpenGL is found, the <code>OpenGL::GL</code> target is added to your project, containing library and include directory paths. Link against this like above.</p>\n<div class=\"fragment\"><div class=\"line\">target_link_libraries(myapp OpenGL::GL)</div>\n</div><!-- fragment --><h2><a class=\"anchor\" id=\"build_link_cmake_package\"></a>\nWith CMake and installed GLFW binaries</h2>\n<p>This section is about using CMake to link GLFW after it has been built and installed. If you want to build it along with your application instead, see <a class=\"el\" href=\"build_guide.html#build_link_cmake_source\">With CMake and GLFW source</a>.</p>\n<p>With a few changes to your <code>CMakeLists.txt</code> you can locate the package and target files generated when GLFW is installed.</p>\n<div class=\"fragment\"><div class=\"line\">find_package(glfw3 3.3 REQUIRED)</div>\n</div><!-- fragment --><p>Once GLFW has been added to the project, link against it with the <code>glfw</code> target. This adds the GLFW library and its link-time dependencies, the include directory for the GLFW header and, when applicable, the <a class=\"el\" href=\"build_guide.html#GLFW_DLL\">GLFW_DLL</a> macro.</p>\n<div class=\"fragment\"><div class=\"line\">target_link_libraries(myapp glfw)</div>\n</div><!-- fragment --><p>Note that the <code>glfw</code> target does not depend on OpenGL, as GLFW loads any OpenGL, OpenGL ES or Vulkan libraries it needs at runtime. If your application calls OpenGL directly, instead of using a modern <a class=\"el\" href=\"context_guide.html#context_glext_auto\">extension loader library</a>, use the OpenGL CMake package.</p>\n<div class=\"fragment\"><div class=\"line\">find_package(OpenGL REQUIRED)</div>\n</div><!-- fragment --><p>If OpenGL is found, the <code>OpenGL::GL</code> target is added to your project, containing library and include directory paths. Link against this like above.</p>\n<div class=\"fragment\"><div class=\"line\">target_link_libraries(myapp OpenGL::GL)</div>\n</div><!-- fragment --><h2><a class=\"anchor\" id=\"build_link_pkgconfig\"></a>\nWith makefiles and pkg-config on Unix</h2>\n<p>GLFW supports <a href=\"https://www.freedesktop.org/wiki/Software/pkg-config/\">pkg-config</a>, and the <code>glfw3.pc</code> pkg-config file is generated when the GLFW library is built and is installed along with it. A pkg-config file describes all necessary compile-time and link-time flags and dependencies needed to use a library. When they are updated or if they differ between systems, you will get the correct ones automatically.</p>\n<p>A typical compile and link command-line when using the static version of the GLFW library may look like this:</p>\n<div class=\"fragment\"><div class=\"line\">cc $(pkg-config --cflags glfw3) -o myprog myprog.c $(pkg-config --static --libs glfw3)</div>\n</div><!-- fragment --><p>If you are using the shared version of the GLFW library, omit the <code>--static</code> flag.</p>\n<div class=\"fragment\"><div class=\"line\">cc $(pkg-config --cflags glfw3) -o myprog myprog.c $(pkg-config --libs glfw3)</div>\n</div><!-- fragment --><p>You can also use the <code>glfw3.pc</code> file without installing it first, by using the <code>PKG_CONFIG_PATH</code> environment variable.</p>\n<div class=\"fragment\"><div class=\"line\">env PKG_CONFIG_PATH=path/to/glfw/src cc $(pkg-config --cflags glfw3) -o myprog myprog.c $(pkg-config --libs glfw3)</div>\n</div><!-- fragment --><p>The dependencies do not include OpenGL, as GLFW loads any OpenGL, OpenGL ES or Vulkan libraries it needs at runtime. If your application calls OpenGL directly, instead of using a modern <a class=\"el\" href=\"context_guide.html#context_glext_auto\">extension loader library</a>, you should add the <code>gl</code> pkg-config package.</p>\n<div class=\"fragment\"><div class=\"line\">cc $(pkg-config --cflags glfw3 gl) -o myprog myprog.c $(pkg-config --libs glfw3 gl)</div>\n</div><!-- fragment --><h2><a class=\"anchor\" id=\"build_link_xcode\"></a>\nWith Xcode on macOS</h2>\n<p>If you are using the dynamic library version of GLFW, add it to the project dependencies.</p>\n<p>If you are using the static library version of GLFW, add it and the Cocoa, OpenGL and IOKit frameworks to the project as dependencies. They can all be found in <code>/System/Library/Frameworks</code>.</p>\n<h2><a class=\"anchor\" id=\"build_link_osx\"></a>\nWith command-line on macOS</h2>\n<p>It is recommended that you use <a class=\"el\" href=\"build_guide.html#build_link_pkgconfig\">pkg-config</a> when building from the command line on macOS. That way you will get any new dependencies added automatically. If you still wish to build manually, you need to add the required frameworks and libraries to your command-line yourself using the <code>-l</code> and <code>-framework</code> switches.</p>\n<p>If you are using the dynamic GLFW library, which is named <code>libglfw.3.dylib</code>, do:</p>\n<div class=\"fragment\"><div class=\"line\">cc -o myprog myprog.c -lglfw -framework Cocoa -framework OpenGL -framework IOKit</div>\n</div><!-- fragment --><p>If you are using the static library, named <code>libglfw3.a</code>, substitute <code>-lglfw3</code> for <code>-lglfw</code>.</p>\n<p>Note that you do not add the <code>.framework</code> extension to a framework when linking against it from the command-line.</p>\n<dl class=\"section note\"><dt>Note</dt><dd>Your machine may have <code>libGL.*.dylib</code> style OpenGL library, but that is for the X Window System and will not work with the macOS native version of GLFW. </dd></dl>\n</div></div><!-- contents -->\n</div><!-- PageDoc -->\n<div class=\"ttc\" id=\"aglfw3_8h_html\"><div class=\"ttname\"><a href=\"glfw3_8h.html\">glfw3.h</a></div><div class=\"ttdoc\">The header of the GLFW 3 API.</div></div>\n<address class=\"footer\">\n<p>\nLast update on Mon Jan 20 2020 for GLFW 3.3.2\n</p>\n</address>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/compat_8dox.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta http-equiv=\"X-UA-Compatible\" content=\"IE=9\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<title>GLFW: compat.dox File Reference</title>\n<link href=\"tabs.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"jquery.js\"></script>\n<script type=\"text/javascript\" src=\"dynsections.js\"></script>\n<link href=\"search/search.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"search/searchdata.js\"></script>\n<script type=\"text/javascript\" src=\"search/search.js\"></script>\n<link href=\"doxygen.css\" rel=\"stylesheet\" type=\"text/css\" />\n<link href=\"extra.css\" rel=\"stylesheet\" type=\"text/css\"/>\n</head>\n<body>\n<div id=\"top\"><!-- do not remove this div, it is closed by doxygen! -->\n<div id=\"titlearea\">\n\t<div class=\"glfwheader\">\n\t\t<a href=\"https://www.glfw.org/\" id=\"glfwhome\">GLFW</a>\n\t\t<ul class=\"glfwnavbar\">\n\t\t\t<li><a href=\"https://www.glfw.org/documentation.html\">Documentation</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/download.html\">Download</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/community.html\">Community</a></li>\n\t\t</ul>\n\t</div>\n</div>\n<!-- end header part -->\n<!-- Generated by Doxygen 1.8.16 -->\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\nvar searchBox = new SearchBox(\"searchBox\", \"search\",false,'Search');\n/* @license-end */\n</script>\n<script type=\"text/javascript\" src=\"menudata.js\"></script>\n<script type=\"text/javascript\" src=\"menu.js\"></script>\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\n$(function() {\n  initMenu('',true,false,'search.php','Search');\n  $(document).ready(function() { init_search(); });\n});\n/* @license-end */</script>\n<div id=\"main-nav\"></div>\n<!-- window showing the filter options -->\n<div id=\"MSearchSelectWindow\"\n     onmouseover=\"return searchBox.OnSearchSelectShow()\"\n     onmouseout=\"return searchBox.OnSearchSelectHide()\"\n     onkeydown=\"return searchBox.OnSearchSelectKey(event)\">\n</div>\n\n<!-- iframe showing the search results (closed by default) -->\n<div id=\"MSearchResultsWindow\">\n<iframe src=\"javascript:void(0)\" frameborder=\"0\" \n        name=\"MSearchResults\" id=\"MSearchResults\">\n</iframe>\n</div>\n\n</div><!-- top -->\n<div class=\"header\">\n  <div class=\"headertitle\">\n<div class=\"title\">compat.dox File Reference</div>  </div>\n</div><!--header-->\n<div class=\"contents\">\n</div><!-- contents -->\n<address class=\"footer\">\n<p>\nLast update on Mon Jan 20 2020 for GLFW 3.3.2\n</p>\n</address>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/compat_guide.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta http-equiv=\"X-UA-Compatible\" content=\"IE=9\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<title>GLFW: Standards conformance</title>\n<link href=\"tabs.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"jquery.js\"></script>\n<script type=\"text/javascript\" src=\"dynsections.js\"></script>\n<link href=\"search/search.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"search/searchdata.js\"></script>\n<script type=\"text/javascript\" src=\"search/search.js\"></script>\n<link href=\"doxygen.css\" rel=\"stylesheet\" type=\"text/css\" />\n<link href=\"extra.css\" rel=\"stylesheet\" type=\"text/css\"/>\n</head>\n<body>\n<div id=\"top\"><!-- do not remove this div, it is closed by doxygen! -->\n<div id=\"titlearea\">\n\t<div class=\"glfwheader\">\n\t\t<a href=\"https://www.glfw.org/\" id=\"glfwhome\">GLFW</a>\n\t\t<ul class=\"glfwnavbar\">\n\t\t\t<li><a href=\"https://www.glfw.org/documentation.html\">Documentation</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/download.html\">Download</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/community.html\">Community</a></li>\n\t\t</ul>\n\t</div>\n</div>\n<!-- end header part -->\n<!-- Generated by Doxygen 1.8.16 -->\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\nvar searchBox = new SearchBox(\"searchBox\", \"search\",false,'Search');\n/* @license-end */\n</script>\n<script type=\"text/javascript\" src=\"menudata.js\"></script>\n<script type=\"text/javascript\" src=\"menu.js\"></script>\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\n$(function() {\n  initMenu('',true,false,'search.php','Search');\n  $(document).ready(function() { init_search(); });\n});\n/* @license-end */</script>\n<div id=\"main-nav\"></div>\n<!-- window showing the filter options -->\n<div id=\"MSearchSelectWindow\"\n     onmouseover=\"return searchBox.OnSearchSelectShow()\"\n     onmouseout=\"return searchBox.OnSearchSelectHide()\"\n     onkeydown=\"return searchBox.OnSearchSelectKey(event)\">\n</div>\n\n<!-- iframe showing the search results (closed by default) -->\n<div id=\"MSearchResultsWindow\">\n<iframe src=\"javascript:void(0)\" frameborder=\"0\" \n        name=\"MSearchResults\" id=\"MSearchResults\">\n</iframe>\n</div>\n\n</div><!-- top -->\n<div class=\"PageDoc\"><div class=\"header\">\n  <div class=\"headertitle\">\n<div class=\"title\">Standards conformance </div>  </div>\n</div><!--header-->\n<div class=\"contents\">\n<div class=\"toc\"><h3>Table of Contents</h3>\n<ul><li class=\"level1\"><a href=\"#compat_x11\">X11 extensions, protocols and IPC standards</a></li>\n<li class=\"level1\"><a href=\"#compat_wayland\">Wayland protocols and IPC standards</a></li>\n<li class=\"level1\"><a href=\"#compat_glx\">GLX extensions</a></li>\n<li class=\"level1\"><a href=\"#compat_wgl\">WGL extensions</a></li>\n<li class=\"level1\"><a href=\"#compat_osx\">OpenGL on macOS</a></li>\n<li class=\"level1\"><a href=\"#compat_vulkan\">Vulkan loader and API</a></li>\n<li class=\"level1\"><a href=\"#compat_wsi\">Vulkan WSI extensions</a></li>\n</ul>\n</div>\n<div class=\"textblock\"><p>This guide describes the various API extensions used by this version of GLFW. It lists what are essentially implementation details, but which are nonetheless vital knowledge for developers intending to deploy their applications on a wide range of machines.</p>\n<p>The information in this guide is not a part of GLFW API, but merely preconditions for some parts of the library to function on a given machine. Any part of this information may change in future versions of GLFW and that will not be considered a breaking API change.</p>\n<h1><a class=\"anchor\" id=\"compat_x11\"></a>\nX11 extensions, protocols and IPC standards</h1>\n<p>As GLFW uses Xlib directly, without any intervening toolkit library, it has sole responsibility for interacting well with the many and varied window managers in use on Unix-like systems. In order for applications and window managers to work well together, a number of standards and conventions have been developed that regulate behavior outside the scope of the X11 API; most importantly the <a href=\"https://www.tronche.com/gui/x/icccm/\">Inter-Client Communication Conventions Manual</a> (ICCCM) and <a href=\"https://standards.freedesktop.org/wm-spec/wm-spec-latest.html\">Extended Window Manager Hints</a> (EWMH) standards.</p>\n<p>GLFW uses the <code>_MOTIF_WM_HINTS</code> window property to support borderless windows. If the running window manager does not support this property, the <code>GLFW_DECORATED</code> hint will have no effect.</p>\n<p>GLFW uses the ICCCM <code>WM_DELETE_WINDOW</code> protocol to intercept the user attempting to close the GLFW window. If the running window manager does not support this protocol, the close callback will never be called.</p>\n<p>GLFW uses the EWMH <code>_NET_WM_PING</code> protocol, allowing the window manager notify the user when the application has stopped responding, i.e. when it has ceased to process events. If the running window manager does not support this protocol, the user will not be notified if the application locks up.</p>\n<p>GLFW uses the EWMH <code>_NET_WM_STATE_FULLSCREEN</code> window state to tell the window manager to make the GLFW window full screen. If the running window manager does not support this state, full screen windows may not work properly. GLFW has a fallback code path in case this state is unavailable, but every window manager behaves slightly differently in this regard.</p>\n<p>GLFW uses the EWMH <code>_NET_WM_BYPASS_COMPOSITOR</code> window property to tell a compositing window manager to un-redirect full screen GLFW windows. If the running window manager uses compositing but does not support this property then additional copying may be performed for each buffer swap of full screen windows.</p>\n<p>GLFW uses the <a href=\"https://www.freedesktop.org/wiki/ClipboardManager/\">clipboard manager protocol</a> to push a clipboard string (i.e. selection) owned by a GLFW window about to be destroyed to the clipboard manager. If there is no running clipboard manager, the clipboard string will be unavailable once the window has been destroyed.</p>\n<p>GLFW uses the <a href=\"https://www.freedesktop.org/wiki/Specifications/XDND/\">X drag-and-drop protocol</a> to provide file drop events. If the application originating the drag does not support this protocol, drag and drop will not work.</p>\n<p>GLFW uses the XRandR 1.3 extension to provide multi-monitor support. If the running X server does not support this version of this extension, multi-monitor support will not function and only a single, desktop-spanning monitor will be reported.</p>\n<p>GLFW uses the XRandR 1.3 and Xf86vidmode extensions to provide gamma ramp support. If the running X server does not support either or both of these extensions, gamma ramp support will not function.</p>\n<p>GLFW uses the Xkb extension and detectable auto-repeat to provide keyboard input. If the running X server does not support this extension, a non-Xkb fallback path is used.</p>\n<p>GLFW uses the XInput2 extension to provide raw, non-accelerated mouse motion when the cursor is disabled. If the running X server does not support this extension, regular accelerated mouse motion will be used.</p>\n<p>GLFW uses both the XRender extension and the compositing manager to support transparent window framebuffers. If the running X server does not support this extension or there is no running compositing manager, the <code>GLFW_TRANSPARENT_FRAMEBUFFER</code> framebuffer hint will have no effect.</p>\n<h1><a class=\"anchor\" id=\"compat_wayland\"></a>\nWayland protocols and IPC standards</h1>\n<p>As GLFW uses libwayland directly, without any intervening toolkit library, it has sole responsibility for interacting well with every compositor in use on Unix-like systems. Most of the features are provided by the core protocol, while cursor support is provided by the libwayland-cursor helper library, EGL integration by libwayland-egl, and keyboard handling by <a href=\"https://xkbcommon.org/\">libxkbcommon</a>. In addition, GLFW uses some protocols from wayland-protocols to provide additional features if the compositor supports them.</p>\n<p>GLFW uses xkbcommon 0.5.0 to provide compose key support. When it has been built against an older xkbcommon, the compose key will be disabled even if it has been configured in the compositor.</p>\n<p>GLFW uses the <a href=\"https://cgit.freedesktop.org/wayland/wayland-protocols/tree/stable/xdg-shell/xdg-shell.xml\">xdg-shell protocol</a> to provide better window management. This protocol is part of wayland-protocols 1.12, and mandatory at build time. If the running compositor does not support this protocol, the older <a href=\"https://cgit.freedesktop.org/wayland/wayland/tree/protocol/wayland.xml#n972\">wl_shell interface</a> will be used instead. This will result in a worse integration with the desktop, especially on tiling compositors.</p>\n<p>GLFW uses the <a href=\"https://cgit.freedesktop.org/wayland/wayland-protocols/tree/unstable/relative-pointer/relative-pointer-unstable-v1.xml\">relative pointer protocol</a> alongside the <a href=\"https://cgit.freedesktop.org/wayland/wayland-protocols/tree/unstable/pointer-constraints/pointer-constraints-unstable-v1.xml\">pointer constraints protocol</a> to implement disabled cursor. These two protocols are part of wayland-protocols 1.1, and mandatory at build time. If the running compositor does not support both of these protocols, disabling the cursor will have no effect.</p>\n<p>GLFW uses the <a href=\"https://cgit.freedesktop.org/wayland/wayland-protocols/tree/unstable/idle-inhibit/idle-inhibit-unstable-v1.xml\">idle inhibit protocol</a> to prohibit the screensaver from starting. This protocol is part of wayland-protocols 1.6, and mandatory at build time. If the running compositor does not support this protocol, the screensaver may start even for full screen windows.</p>\n<p>GLFW uses the <a href=\"https://cgit.freedesktop.org/wayland/wayland-protocols/tree/unstable/xdg-decoration/xdg-decoration-unstable-v1.xml\">xdg-decoration protocol</a> to request decorations to be drawn around its windows. This protocol is part of wayland-protocols 1.15, and mandatory at build time. If the running compositor does not support this protocol, a very simple frame will be drawn by GLFW itself, using the <a href=\"https://cgit.freedesktop.org/wayland/wayland-protocols/tree/stable/viewporter/viewporter.xml\">viewporter protocol</a> alongside <a href=\"https://cgit.freedesktop.org/wayland/wayland/tree/protocol/wayland.xml#n2598\">subsurfaces</a>. This protocol is part of wayland-protocols 1.4, and mandatory at build time. If the running compositor does not support this protocol either, no decorations will be drawn around windows.</p>\n<h1><a class=\"anchor\" id=\"compat_glx\"></a>\nGLX extensions</h1>\n<p>The GLX API is the default API used to create OpenGL contexts on Unix-like systems using the X Window System.</p>\n<p>GLFW uses the GLX 1.3 <code>GLXFBConfig</code> functions to enumerate and select framebuffer pixel formats. If GLX 1.3 is not supported, <a class=\"el\" href=\"group__init.html#ga317aac130a235ab08c6db0834907d85e\">glfwInit</a> will fail.</p>\n<p>GLFW uses the <code>GLX_MESA_swap_control,</code> <code>GLX_EXT_swap_control</code> and <code>GLX_SGI_swap_control</code> extensions to provide vertical retrace synchronization (or <em>vsync</em>), in that order of preference. Where none of these extension are available, calling <a class=\"el\" href=\"group__context.html#ga6d4e0cdf151b5e579bd67f13202994ed\">glfwSwapInterval</a> will have no effect.</p>\n<p>GLFW uses the <code>GLX_ARB_multisample</code> extension to create contexts with multisampling anti-aliasing. Where this extension is unavailable, the <code>GLFW_SAMPLES</code> hint will have no effect.</p>\n<p>GLFW uses the <code>GLX_ARB_create_context</code> extension when available, even when creating OpenGL contexts of version 2.1 and below. Where this extension is unavailable, the <code>GLFW_CONTEXT_VERSION_MAJOR</code> and <code>GLFW_CONTEXT_VERSION_MINOR</code> hints will only be partially supported, the <code>GLFW_OPENGL_DEBUG_CONTEXT</code> hint will have no effect, and setting the <code>GLFW_OPENGL_PROFILE</code> or <code>GLFW_OPENGL_FORWARD_COMPAT</code> hints to <code>GLFW_TRUE</code> will cause <a class=\"el\" href=\"group__window.html#ga5c336fddf2cbb5b92f65f10fb6043344\">glfwCreateWindow</a> to fail.</p>\n<p>GLFW uses the <code>GLX_ARB_create_context_profile</code> extension to provide support for context profiles. Where this extension is unavailable, setting the <code>GLFW_OPENGL_PROFILE</code> hint to anything but <code>GLFW_OPENGL_ANY_PROFILE</code>, or setting <code>GLFW_CLIENT_API</code> to anything but <code>GLFW_OPENGL_API</code> or <code>GLFW_NO_API</code> will cause <a class=\"el\" href=\"group__window.html#ga5c336fddf2cbb5b92f65f10fb6043344\">glfwCreateWindow</a> to fail.</p>\n<p>GLFW uses the <code>GLX_ARB_context_flush_control</code> extension to provide control over whether a context is flushed when it is released (made non-current). Where this extension is unavailable, the <code>GLFW_CONTEXT_RELEASE_BEHAVIOR</code> hint will have no effect and the context will always be flushed when released.</p>\n<p>GLFW uses the <code>GLX_ARB_framebuffer_sRGB</code> and <code>GLX_EXT_framebuffer_sRGB</code> extensions to provide support for sRGB framebuffers. Where both of these extensions are unavailable, the <code>GLFW_SRGB_CAPABLE</code> hint will have no effect.</p>\n<h1><a class=\"anchor\" id=\"compat_wgl\"></a>\nWGL extensions</h1>\n<p>The WGL API is used to create OpenGL contexts on Microsoft Windows and other implementations of the Win32 API, such as Wine.</p>\n<p>GLFW uses either the <code>WGL_EXT_extension_string</code> or the <code>WGL_ARB_extension_string</code> extension to check for the presence of all other WGL extensions listed below. If both are available, the EXT one is preferred. If neither is available, no other extensions are used and many GLFW features related to context creation will have no effect or cause errors when used.</p>\n<p>GLFW uses the <code>WGL_EXT_swap_control</code> extension to provide vertical retrace synchronization (or <em>vsync</em>). Where this extension is unavailable, calling <a class=\"el\" href=\"group__context.html#ga6d4e0cdf151b5e579bd67f13202994ed\">glfwSwapInterval</a> will have no effect.</p>\n<p>GLFW uses the <code>WGL_ARB_pixel_format</code> and <code>WGL_ARB_multisample</code> extensions to create contexts with multisampling anti-aliasing. Where these extensions are unavailable, the <code>GLFW_SAMPLES</code> hint will have no effect.</p>\n<p>GLFW uses the <code>WGL_ARB_create_context</code> extension when available, even when creating OpenGL contexts of version 2.1 and below. Where this extension is unavailable, the <code>GLFW_CONTEXT_VERSION_MAJOR</code> and <code>GLFW_CONTEXT_VERSION_MINOR</code> hints will only be partially supported, the <code>GLFW_OPENGL_DEBUG_CONTEXT</code> hint will have no effect, and setting the <code>GLFW_OPENGL_PROFILE</code> or <code>GLFW_OPENGL_FORWARD_COMPAT</code> hints to <code>GLFW_TRUE</code> will cause <a class=\"el\" href=\"group__window.html#ga5c336fddf2cbb5b92f65f10fb6043344\">glfwCreateWindow</a> to fail.</p>\n<p>GLFW uses the <code>WGL_ARB_create_context_profile</code> extension to provide support for context profiles. Where this extension is unavailable, setting the <code>GLFW_OPENGL_PROFILE</code> hint to anything but <code>GLFW_OPENGL_ANY_PROFILE</code> will cause <a class=\"el\" href=\"group__window.html#ga5c336fddf2cbb5b92f65f10fb6043344\">glfwCreateWindow</a> to fail.</p>\n<p>GLFW uses the <code>WGL_ARB_context_flush_control</code> extension to provide control over whether a context is flushed when it is released (made non-current). Where this extension is unavailable, the <code>GLFW_CONTEXT_RELEASE_BEHAVIOR</code> hint will have no effect and the context will always be flushed when released.</p>\n<p>GLFW uses the <code>WGL_ARB_framebuffer_sRGB</code> and <code>WGL_EXT_framebuffer_sRGB</code> extensions to provide support for sRGB framebuffers. Where both of these extension are unavailable, the <code>GLFW_SRGB_CAPABLE</code> hint will have no effect.</p>\n<h1><a class=\"anchor\" id=\"compat_osx\"></a>\nOpenGL on macOS</h1>\n<p>Support for OpenGL 3.2 and above was introduced with OS X 10.7 and even then only forward-compatible, core profile contexts are supported. Support for OpenGL 4.1 was introduced with OS X 10.9, also limited to forward-compatible, core profile contexts. There is also still no mechanism for requesting debug contexts or no-error contexts. Versions of Mac OS X earlier than 10.7 support at most OpenGL version 2.1.</p>\n<p>Because of this, on OS X 10.7 and later, the <code>GLFW_CONTEXT_VERSION_MAJOR</code> and <code>GLFW_CONTEXT_VERSION_MINOR</code> hints will cause <a class=\"el\" href=\"group__window.html#ga5c336fddf2cbb5b92f65f10fb6043344\">glfwCreateWindow</a> to fail if given version 3.0 or 3.1. The <code>GLFW_OPENGL_FORWARD_COMPAT</code> hint must be set to <code>GLFW_TRUE</code> and the <code>GLFW_OPENGL_PROFILE</code> hint must be set to <code>GLFW_OPENGL_CORE_PROFILE</code> when creating OpenGL 3.2 and later contexts. The <code>GLFW_OPENGL_DEBUG_CONTEXT</code> and <code>GLFW_CONTEXT_NO_ERROR</code> hints are ignored.</p>\n<p>Also, on Mac OS X 10.6 and below, the <code>GLFW_CONTEXT_VERSION_MAJOR</code> and <code>GLFW_CONTEXT_VERSION_MINOR</code> hints will fail if given a version above 2.1, setting the <code>GLFW_OPENGL_PROFILE</code> or <code>GLFW_OPENGL_FORWARD_COMPAT</code> hints to a non-default value will cause <a class=\"el\" href=\"group__window.html#ga5c336fddf2cbb5b92f65f10fb6043344\">glfwCreateWindow</a> to fail and the <code>GLFW_OPENGL_DEBUG_CONTEXT</code> hint is ignored.</p>\n<h1><a class=\"anchor\" id=\"compat_vulkan\"></a>\nVulkan loader and API</h1>\n<p>By default, GLFW uses the standard system-wide Vulkan loader to access the Vulkan API on all platforms except macOS. This is installed by both graphics drivers and Vulkan SDKs. If either the loader or at least one minimally functional ICD is missing, <a class=\"el\" href=\"group__vulkan.html#ga2e7f30931e02464b5bc8d0d4b6f9fe2b\">glfwVulkanSupported</a> will return <code>GLFW_FALSE</code> and all other Vulkan-related functions will fail with an <a class=\"el\" href=\"group__errors.html#ga56882b290db23261cc6c053c40c2d08e\">GLFW_API_UNAVAILABLE</a> error.</p>\n<h1><a class=\"anchor\" id=\"compat_wsi\"></a>\nVulkan WSI extensions</h1>\n<p>The Vulkan WSI extensions are used to create Vulkan surfaces for GLFW windows on all supported platforms.</p>\n<p>GLFW uses the <code>VK_KHR_surface</code> and <code>VK_KHR_win32_surface</code> extensions to create surfaces on Microsoft Windows. If any of these extensions are not available, <a class=\"el\" href=\"group__vulkan.html#ga1abcbe61033958f22f63ef82008874b1\">glfwGetRequiredInstanceExtensions</a> will return an empty list and window surface creation will fail.</p>\n<p>GLFW uses the <code>VK_KHR_surface</code> and either the <code>VK_MVK_macos_surface</code> or <code>VK_EXT_metal_surface</code> extensions to create surfaces on macOS. If any of these extensions are not available, <a class=\"el\" href=\"group__vulkan.html#ga1abcbe61033958f22f63ef82008874b1\">glfwGetRequiredInstanceExtensions</a> will return an empty list and window surface creation will fail.</p>\n<p>GLFW uses the <code>VK_KHR_surface</code> and either the <code>VK_KHR_xlib_surface</code> or <code>VK_KHR_xcb_surface</code> extensions to create surfaces on X11. If <code>VK_KHR_surface</code> or both <code>VK_KHR_xlib_surface</code> and <code>VK_KHR_xcb_surface</code> are not available, <a class=\"el\" href=\"group__vulkan.html#ga1abcbe61033958f22f63ef82008874b1\">glfwGetRequiredInstanceExtensions</a> will return an empty list and window surface creation will fail.</p>\n<p>GLFW uses the <code>VK_KHR_surface</code> and <code>VK_KHR_wayland_surface</code> extensions to create surfaces on Wayland. If any of these extensions are not available, <a class=\"el\" href=\"group__vulkan.html#ga1abcbe61033958f22f63ef82008874b1\">glfwGetRequiredInstanceExtensions</a> will return an empty list and window surface creation will fail. </p>\n</div></div><!-- contents -->\n</div><!-- PageDoc -->\n<address class=\"footer\">\n<p>\nLast update on Mon Jan 20 2020 for GLFW 3.3.2\n</p>\n</address>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/compile_8dox.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta http-equiv=\"X-UA-Compatible\" content=\"IE=9\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<title>GLFW: compile.dox File Reference</title>\n<link href=\"tabs.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"jquery.js\"></script>\n<script type=\"text/javascript\" src=\"dynsections.js\"></script>\n<link href=\"search/search.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"search/searchdata.js\"></script>\n<script type=\"text/javascript\" src=\"search/search.js\"></script>\n<link href=\"doxygen.css\" rel=\"stylesheet\" type=\"text/css\" />\n<link href=\"extra.css\" rel=\"stylesheet\" type=\"text/css\"/>\n</head>\n<body>\n<div id=\"top\"><!-- do not remove this div, it is closed by doxygen! -->\n<div id=\"titlearea\">\n\t<div class=\"glfwheader\">\n\t\t<a href=\"https://www.glfw.org/\" id=\"glfwhome\">GLFW</a>\n\t\t<ul class=\"glfwnavbar\">\n\t\t\t<li><a href=\"https://www.glfw.org/documentation.html\">Documentation</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/download.html\">Download</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/community.html\">Community</a></li>\n\t\t</ul>\n\t</div>\n</div>\n<!-- end header part -->\n<!-- Generated by Doxygen 1.8.16 -->\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\nvar searchBox = new SearchBox(\"searchBox\", \"search\",false,'Search');\n/* @license-end */\n</script>\n<script type=\"text/javascript\" src=\"menudata.js\"></script>\n<script type=\"text/javascript\" src=\"menu.js\"></script>\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\n$(function() {\n  initMenu('',true,false,'search.php','Search');\n  $(document).ready(function() { init_search(); });\n});\n/* @license-end */</script>\n<div id=\"main-nav\"></div>\n<!-- window showing the filter options -->\n<div id=\"MSearchSelectWindow\"\n     onmouseover=\"return searchBox.OnSearchSelectShow()\"\n     onmouseout=\"return searchBox.OnSearchSelectHide()\"\n     onkeydown=\"return searchBox.OnSearchSelectKey(event)\">\n</div>\n\n<!-- iframe showing the search results (closed by default) -->\n<div id=\"MSearchResultsWindow\">\n<iframe src=\"javascript:void(0)\" frameborder=\"0\" \n        name=\"MSearchResults\" id=\"MSearchResults\">\n</iframe>\n</div>\n\n</div><!-- top -->\n<div class=\"header\">\n  <div class=\"headertitle\">\n<div class=\"title\">compile.dox File Reference</div>  </div>\n</div><!--header-->\n<div class=\"contents\">\n</div><!-- contents -->\n<address class=\"footer\">\n<p>\nLast update on Mon Jan 20 2020 for GLFW 3.3.2\n</p>\n</address>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/compile_guide.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta http-equiv=\"X-UA-Compatible\" content=\"IE=9\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<title>GLFW: Compiling GLFW</title>\n<link href=\"tabs.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"jquery.js\"></script>\n<script type=\"text/javascript\" src=\"dynsections.js\"></script>\n<link href=\"search/search.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"search/searchdata.js\"></script>\n<script type=\"text/javascript\" src=\"search/search.js\"></script>\n<link href=\"doxygen.css\" rel=\"stylesheet\" type=\"text/css\" />\n<link href=\"extra.css\" rel=\"stylesheet\" type=\"text/css\"/>\n</head>\n<body>\n<div id=\"top\"><!-- do not remove this div, it is closed by doxygen! -->\n<div id=\"titlearea\">\n\t<div class=\"glfwheader\">\n\t\t<a href=\"https://www.glfw.org/\" id=\"glfwhome\">GLFW</a>\n\t\t<ul class=\"glfwnavbar\">\n\t\t\t<li><a href=\"https://www.glfw.org/documentation.html\">Documentation</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/download.html\">Download</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/community.html\">Community</a></li>\n\t\t</ul>\n\t</div>\n</div>\n<!-- end header part -->\n<!-- Generated by Doxygen 1.8.16 -->\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\nvar searchBox = new SearchBox(\"searchBox\", \"search\",false,'Search');\n/* @license-end */\n</script>\n<script type=\"text/javascript\" src=\"menudata.js\"></script>\n<script type=\"text/javascript\" src=\"menu.js\"></script>\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\n$(function() {\n  initMenu('',true,false,'search.php','Search');\n  $(document).ready(function() { init_search(); });\n});\n/* @license-end */</script>\n<div id=\"main-nav\"></div>\n<!-- window showing the filter options -->\n<div id=\"MSearchSelectWindow\"\n     onmouseover=\"return searchBox.OnSearchSelectShow()\"\n     onmouseout=\"return searchBox.OnSearchSelectHide()\"\n     onkeydown=\"return searchBox.OnSearchSelectKey(event)\">\n</div>\n\n<!-- iframe showing the search results (closed by default) -->\n<div id=\"MSearchResultsWindow\">\n<iframe src=\"javascript:void(0)\" frameborder=\"0\" \n        name=\"MSearchResults\" id=\"MSearchResults\">\n</iframe>\n</div>\n\n</div><!-- top -->\n<div class=\"PageDoc\"><div class=\"header\">\n  <div class=\"headertitle\">\n<div class=\"title\">Compiling GLFW </div>  </div>\n</div><!--header-->\n<div class=\"contents\">\n<div class=\"toc\"><h3>Table of Contents</h3>\n<ul><li class=\"level1\"><a href=\"#compile_cmake\">Using CMake</a><ul><li class=\"level2\"><a href=\"#compile_deps\">Dependencies</a><ul><li class=\"level3\"><a href=\"#compile_deps_msvc\">Dependencies for Visual C++ on Windows</a></li>\n<li class=\"level3\"><a href=\"#compile_deps_mingw\">Dependencies for MinGW or MinGW-w64 on Windows</a></li>\n<li class=\"level3\"><a href=\"#compile_deps_mingw_cross\">Dependencies for MinGW or MinGW-w64 cross-compilation</a></li>\n<li class=\"level3\"><a href=\"#compile_deps_xcode\">Dependencies for Xcode on macOS</a></li>\n<li class=\"level3\"><a href=\"#compile_deps_x11\">Dependencies for Linux and X11</a></li>\n<li class=\"level3\"><a href=\"#compile_deps_wayland\">Dependencies for Linux and Wayland</a></li>\n</ul>\n</li>\n<li class=\"level2\"><a href=\"#compile_deps_osmesa\">Dependencies for Linux and OSMesa</a></li>\n<li class=\"level2\"><a href=\"#compile_generate\">Generating build files with CMake</a><ul><li class=\"level3\"><a href=\"#compile_generate_cli\">Generating files with the CMake command-line tool</a></li>\n<li class=\"level3\"><a href=\"#compile_generate_gui\">Generating files with the CMake GUI</a></li>\n</ul>\n</li>\n<li class=\"level2\"><a href=\"#compile_compile\">Compiling the library</a></li>\n<li class=\"level2\"><a href=\"#compile_options\">CMake options</a><ul><li class=\"level3\"><a href=\"#compile_options_shared\">Shared CMake options</a></li>\n<li class=\"level3\"><a href=\"#compile_options_win32\">Windows specific CMake options</a></li>\n</ul>\n</li>\n</ul>\n</li>\n<li class=\"level1\"><a href=\"#compile_manual\">Compiling GLFW manually</a></li>\n</ul>\n</div>\n<div class=\"textblock\"><p>This is about compiling the GLFW library itself. For information on how to build applications that use GLFW, see <a class=\"el\" href=\"build_guide.html\">Building applications</a>.</p>\n<h1><a class=\"anchor\" id=\"compile_cmake\"></a>\nUsing CMake</h1>\n<p>GLFW uses <a href=\"https://cmake.org/\">CMake</a> to generate project files or makefiles for a particular development environment. If you are on a Unix-like system such as Linux or FreeBSD or have a package system like Fink, MacPorts, Cygwin or Homebrew, you can install its CMake package. If not, you can download installers for Windows and macOS from the <a href=\"https://cmake.org/\">CMake website</a>.</p>\n<dl class=\"section note\"><dt>Note</dt><dd>CMake only generates project files or makefiles. It does not compile the actual GLFW library. To compile GLFW, first generate these files for your chosen development environment and then use them to compile the actual GLFW library.</dd></dl>\n<h2><a class=\"anchor\" id=\"compile_deps\"></a>\nDependencies</h2>\n<p>Once you have installed CMake, make sure that all other dependencies are available. On some platforms, GLFW needs a few additional packages to be installed. See the section for your chosen platform and development environment below.</p>\n<h3><a class=\"anchor\" id=\"compile_deps_msvc\"></a>\nDependencies for Visual C++ on Windows</h3>\n<p>The Windows SDK bundled with Visual C++ already contains all the necessary headers, link libraries and tools except for CMake. Move on to <a class=\"el\" href=\"compile_guide.html#compile_generate\">Generating build files with CMake</a>.</p>\n<h3><a class=\"anchor\" id=\"compile_deps_mingw\"></a>\nDependencies for MinGW or MinGW-w64 on Windows</h3>\n<p>Both the MinGW and the MinGW-w64 packages already contain all the necessary headers, link libraries and tools except for CMake. Move on to <a class=\"el\" href=\"compile_guide.html#compile_generate\">Generating build files with CMake</a>.</p>\n<h3><a class=\"anchor\" id=\"compile_deps_mingw_cross\"></a>\nDependencies for MinGW or MinGW-w64 cross-compilation</h3>\n<p>Both Cygwin and many Linux distributions have MinGW or MinGW-w64 packages. For example, Cygwin has the <code>mingw64-i686-gcc</code> and <code>mingw64-x86_64-gcc</code> packages for 32- and 64-bit version of MinGW-w64, while Debian GNU/Linux and derivatives like Ubuntu have the <code>mingw-w64</code> package for both.</p>\n<p>GLFW has CMake toolchain files in the <code>CMake/</code> directory that set up cross-compilation of Windows binaries. To use these files you add an option when running <code>cmake</code> to generate the project files or makefiles:</p>\n<div class=\"fragment\"><div class=\"line\">cmake -DCMAKE_TOOLCHAIN_FILE=&lt;toolchain-file&gt; .</div>\n</div><!-- fragment --><p>The exact toolchain file to use depends on the prefix used by the MinGW or MinGW-w64 binaries on your system. You can usually see this in the /usr directory. For example, both the Debian/Ubuntu and Cygwin MinGW-w64 packages have <code>/usr/x86_64-w64-mingw32</code> for the 64-bit compilers, so the correct invocation would be:</p>\n<div class=\"fragment\"><div class=\"line\">cmake -DCMAKE_TOOLCHAIN_FILE=CMake/x86_64-w64-mingw32.cmake .</div>\n</div><!-- fragment --><p>For more details see the article <a href=\"https://gitlab.kitware.com/cmake/community/wikis/doc/cmake/CrossCompiling\">CMake Cross Compiling</a> on the CMake wiki.</p>\n<p>Once you have this set up, move on to <a class=\"el\" href=\"compile_guide.html#compile_generate\">Generating build files with CMake</a>.</p>\n<h3><a class=\"anchor\" id=\"compile_deps_xcode\"></a>\nDependencies for Xcode on macOS</h3>\n<p>Xcode comes with all necessary tools except for CMake. The required headers and libraries are included in the core macOS frameworks. Xcode can be downloaded from the Mac App Store or from the ADC Member Center.</p>\n<p>Once you have Xcode installed, move on to <a class=\"el\" href=\"compile_guide.html#compile_generate\">Generating build files with CMake</a>.</p>\n<h3><a class=\"anchor\" id=\"compile_deps_x11\"></a>\nDependencies for Linux and X11</h3>\n<p>To compile GLFW for X11, you need to have the X11 packages installed, as well as the basic development tools like GCC and make. For example, on Ubuntu and other distributions based on Debian GNU/Linux, you need to install the <code>xorg-dev</code> package, which pulls in all X.org header packages.</p>\n<p>Once you have installed the necessary packages, move on to <a class=\"el\" href=\"compile_guide.html#compile_generate\">Generating build files with CMake</a>.</p>\n<h3><a class=\"anchor\" id=\"compile_deps_wayland\"></a>\nDependencies for Linux and Wayland</h3>\n<p>To compile GLFW for Wayland, you need to have the Wayland packages installed, as well as the basic development tools like GCC and make. For example, on Ubuntu and other distributions based on Debian GNU/Linux, you need to install the <code>libwayland-dev</code> package, which contains all Wayland headers and pulls in wayland-scanner, as well as the <code>wayland-protocols</code> and <code>extra-cmake-modules</code> packages.</p>\n<p>Once you have installed the necessary packages, move on to <a class=\"el\" href=\"compile_guide.html#compile_generate\">Generating build files with CMake</a>.</p>\n<h2><a class=\"anchor\" id=\"compile_deps_osmesa\"></a>\nDependencies for Linux and OSMesa</h2>\n<p>To compile GLFW for OSMesa, you need to install the OSMesa library and header packages. For example, on Ubuntu and other distributions based on Debian GNU/Linux, you need to install the <code>libosmesa6-dev</code> package. The OSMesa library is required at runtime for context creation and is loaded on demand.</p>\n<p>Once you have installed the necessary packages, move on to <a class=\"el\" href=\"compile_guide.html#compile_generate\">Generating build files with CMake</a>.</p>\n<h2><a class=\"anchor\" id=\"compile_generate\"></a>\nGenerating build files with CMake</h2>\n<p>Once you have all necessary dependencies it is time to generate the project files or makefiles for your development environment. CMake needs to know two paths for this: the path to the <em>root</em> directory of the GLFW source tree (i.e. <em>not</em> the <code>src</code> subdirectory) and the target path for the generated files and compiled binaries. If these are the same, it is called an in-tree build, otherwise it is called an out-of-tree build.</p>\n<p>One of several advantages of out-of-tree builds is that you can generate files and compile for different development environments using a single source tree.</p>\n<dl class=\"section note\"><dt>Note</dt><dd>This section is about generating the project files or makefiles necessary to compile the GLFW library, not about compiling the actual library.</dd></dl>\n<h3><a class=\"anchor\" id=\"compile_generate_cli\"></a>\nGenerating files with the CMake command-line tool</h3>\n<p>To make an in-tree build, enter the <em>root</em> directory of the GLFW source tree (i.e. <em>not</em> the <code>src</code> subdirectory) and run CMake. The current directory is used as target path, while the path provided as an argument is used to find the source tree.</p>\n<div class=\"fragment\"><div class=\"line\">cd &lt;glfw-root-dir&gt;</div>\n<div class=\"line\">cmake .</div>\n</div><!-- fragment --><p>To make an out-of-tree build, make a directory outside of the source tree, enter it and run CMake with the (relative or absolute) path to the root of the source tree as an argument.</p>\n<div class=\"fragment\"><div class=\"line\">mkdir glfw-build</div>\n<div class=\"line\">cd glfw-build</div>\n<div class=\"line\">cmake &lt;glfw-root-dir&gt;</div>\n</div><!-- fragment --><p>Once you have generated the project files or makefiles for your chosen development environment, move on to <a class=\"el\" href=\"compile_guide.html#compile_compile\">Compiling the library</a>.</p>\n<h3><a class=\"anchor\" id=\"compile_generate_gui\"></a>\nGenerating files with the CMake GUI</h3>\n<p>If you are using the GUI version, choose the root of the GLFW source tree as source location and the same directory or another, empty directory as the destination for binaries. Choose <em>Configure</em>, change any options you wish to, <em>Configure</em> again to let the changes take effect and then <em>Generate</em>.</p>\n<p>Once you have generated the project files or makefiles for your chosen development environment, move on to <a class=\"el\" href=\"compile_guide.html#compile_compile\">Compiling the library</a>.</p>\n<h2><a class=\"anchor\" id=\"compile_compile\"></a>\nCompiling the library</h2>\n<p>You should now have all required dependencies and the project files or makefiles necessary to compile GLFW. Go ahead and compile the actual GLFW library with these files, as you would with any other project.</p>\n<p>Once the GLFW library is compiled, you are ready to build your applications, linking it to the GLFW library. See <a class=\"el\" href=\"build_guide.html\">Building applications</a> for more information.</p>\n<h2><a class=\"anchor\" id=\"compile_options\"></a>\nCMake options</h2>\n<p>The CMake files for GLFW provide a number of options, although not all are available on all supported platforms. Some of these are de facto standards among projects using CMake and so have no <code>GLFW_</code> prefix.</p>\n<p>If you are using the GUI version of CMake, these are listed and can be changed from there. If you are using the command-line version of CMake you can use the <code>ccmake</code> ncurses GUI to set options. Some package systems like Ubuntu and other distributions based on Debian GNU/Linux have this tool in a separate <code>cmake-curses-gui</code> package.</p>\n<p>Finally, if you don't want to use any GUI, you can set options from the <code>cmake</code> command-line with the <code>-D</code> flag.</p>\n<div class=\"fragment\"><div class=\"line\">cmake -DBUILD_SHARED_LIBS=ON .</div>\n</div><!-- fragment --><h3><a class=\"anchor\" id=\"compile_options_shared\"></a>\nShared CMake options</h3>\n<p><a class=\"anchor\" id=\"BUILD_SHARED_LIBS\"></a><b>BUILD_SHARED_LIBS</b> determines whether GLFW is built as a static library or as a DLL / shared library / dynamic library.</p>\n<p><a class=\"anchor\" id=\"GLFW_BUILD_EXAMPLES\"></a><b>GLFW_BUILD_EXAMPLES</b> determines whether the GLFW examples are built along with the library.</p>\n<p><a class=\"anchor\" id=\"GLFW_BUILD_TESTS\"></a><b>GLFW_BUILD_TESTS</b> determines whether the GLFW test programs are built along with the library.</p>\n<p><a class=\"anchor\" id=\"GLFW_BUILD_DOCS\"></a><b>GLFW_BUILD_DOCS</b> determines whether the GLFW documentation is built along with the library.</p>\n<p><a class=\"anchor\" id=\"GLFW_VULKAN_STATIC\"></a><b>GLFW_VULKAN_STATIC</b> determines whether to use the Vulkan loader linked directly with the application.</p>\n<h3><a class=\"anchor\" id=\"compile_options_win32\"></a>\nWindows specific CMake options</h3>\n<p><a class=\"anchor\" id=\"USE_MSVC_RUNTIME_LIBRARY_DLL\"></a><b>USE_MSVC_RUNTIME_LIBRARY_DLL</b> determines whether to use the DLL version or the static library version of the Visual C++ runtime library. If set to <code>ON</code>, the DLL version of the Visual C++ library is used.</p>\n<p><a class=\"anchor\" id=\"GLFW_USE_HYBRID_HPG\"></a><b>GLFW_USE_HYBRID_HPG</b> determines whether to export the <code>NvOptimusEnablement</code> and <code>AmdPowerXpressRequestHighPerformance</code> symbols, which force the use of the high-performance GPU on Nvidia Optimus and AMD PowerXpress systems. These symbols need to be exported by the EXE to be detected by the driver, so the override will not work if GLFW is built as a DLL.</p>\n<h1><a class=\"anchor\" id=\"compile_manual\"></a>\nCompiling GLFW manually</h1>\n<p>If you wish to compile GLFW without its CMake build environment then you will have to do at least some of the platform detection yourself. GLFW needs a configuration macro to be defined in order to know what window system it's being compiled for and also has optional, platform-specific ones for various features.</p>\n<p>When building with CMake, the <code>glfw_config.h</code> configuration header is generated based on the current platform and CMake options. The GLFW CMake environment defines <b>GLFW_USE_CONFIG_H</b>, which causes this header to be included by <code>internal.h</code>. Without this macro, GLFW will expect the necessary configuration macros to be defined on the command-line.</p>\n<p>The window creation API is used to create windows, handle input, monitors, gamma ramps and clipboard. The options are:</p>\n<ul>\n<li><b>_GLFW_COCOA</b> to use the Cocoa frameworks</li>\n<li><b>_GLFW_WIN32</b> to use the Win32 API</li>\n<li><b>_GLFW_X11</b> to use the X Window System</li>\n<li><b>_GLFW_WAYLAND</b> to use the Wayland API (experimental and incomplete)</li>\n<li><b>_GLFW_OSMESA</b> to use the OSMesa API (headless and non-interactive)</li>\n</ul>\n<p>If you are building GLFW as a shared library / dynamic library / DLL then you must also define <b>_GLFW_BUILD_DLL</b>. Otherwise, you must not define it.</p>\n<p>If you are linking the Vulkan loader directly with your application then you must also define <b>_GLFW_VULKAN_STATIC</b>. Otherwise, GLFW will attempt to use the external version.</p>\n<p>If you are using a custom name for the Vulkan, EGL, GLX, OSMesa, OpenGL, GLESv1 or GLESv2 library, you can override the default names by defining those you need of <b>_GLFW_VULKAN_LIBRARY</b>, <b>_GLFW_EGL_LIBRARY</b>, <b>_GLFW_GLX_LIBRARY</b>, <b>_GLFW_OSMESA_LIBRARY</b>, <b>_GLFW_OPENGL_LIBRARY</b>, <b>_GLFW_GLESV1_LIBRARY</b> and <b>_GLFW_GLESV2_LIBRARY</b>. Otherwise, GLFW will use the built-in default names.</p>\n<p>For the EGL context creation API, the following options are available:</p>\n<ul>\n<li><b>_GLFW_USE_EGLPLATFORM_H</b> to use an existing <code>EGL/eglplatform.h</code> header file for native handle types (fallback)</li>\n</ul>\n<dl class=\"section note\"><dt>Note</dt><dd>None of the <a class=\"el\" href=\"build_guide.html#build_macros\">GLFW header option macros</a> may be defined during the compilation of GLFW. If you define any of these in your build files, make sure they are not applied to the GLFW sources. </dd></dl>\n</div></div><!-- contents -->\n</div><!-- PageDoc -->\n<address class=\"footer\">\n<p>\nLast update on Mon Jan 20 2020 for GLFW 3.3.2\n</p>\n</address>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/context_8dox.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta http-equiv=\"X-UA-Compatible\" content=\"IE=9\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<title>GLFW: context.dox File Reference</title>\n<link href=\"tabs.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"jquery.js\"></script>\n<script type=\"text/javascript\" src=\"dynsections.js\"></script>\n<link href=\"search/search.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"search/searchdata.js\"></script>\n<script type=\"text/javascript\" src=\"search/search.js\"></script>\n<link href=\"doxygen.css\" rel=\"stylesheet\" type=\"text/css\" />\n<link href=\"extra.css\" rel=\"stylesheet\" type=\"text/css\"/>\n</head>\n<body>\n<div id=\"top\"><!-- do not remove this div, it is closed by doxygen! -->\n<div id=\"titlearea\">\n\t<div class=\"glfwheader\">\n\t\t<a href=\"https://www.glfw.org/\" id=\"glfwhome\">GLFW</a>\n\t\t<ul class=\"glfwnavbar\">\n\t\t\t<li><a href=\"https://www.glfw.org/documentation.html\">Documentation</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/download.html\">Download</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/community.html\">Community</a></li>\n\t\t</ul>\n\t</div>\n</div>\n<!-- end header part -->\n<!-- Generated by Doxygen 1.8.16 -->\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\nvar searchBox = new SearchBox(\"searchBox\", \"search\",false,'Search');\n/* @license-end */\n</script>\n<script type=\"text/javascript\" src=\"menudata.js\"></script>\n<script type=\"text/javascript\" src=\"menu.js\"></script>\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\n$(function() {\n  initMenu('',true,false,'search.php','Search');\n  $(document).ready(function() { init_search(); });\n});\n/* @license-end */</script>\n<div id=\"main-nav\"></div>\n<!-- window showing the filter options -->\n<div id=\"MSearchSelectWindow\"\n     onmouseover=\"return searchBox.OnSearchSelectShow()\"\n     onmouseout=\"return searchBox.OnSearchSelectHide()\"\n     onkeydown=\"return searchBox.OnSearchSelectKey(event)\">\n</div>\n\n<!-- iframe showing the search results (closed by default) -->\n<div id=\"MSearchResultsWindow\">\n<iframe src=\"javascript:void(0)\" frameborder=\"0\" \n        name=\"MSearchResults\" id=\"MSearchResults\">\n</iframe>\n</div>\n\n</div><!-- top -->\n<div class=\"header\">\n  <div class=\"headertitle\">\n<div class=\"title\">context.dox File Reference</div>  </div>\n</div><!--header-->\n<div class=\"contents\">\n</div><!-- contents -->\n<address class=\"footer\">\n<p>\nLast update on Mon Jan 20 2020 for GLFW 3.3.2\n</p>\n</address>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/context_guide.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta http-equiv=\"X-UA-Compatible\" content=\"IE=9\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<title>GLFW: Context guide</title>\n<link href=\"tabs.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"jquery.js\"></script>\n<script type=\"text/javascript\" src=\"dynsections.js\"></script>\n<link href=\"search/search.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"search/searchdata.js\"></script>\n<script type=\"text/javascript\" src=\"search/search.js\"></script>\n<link href=\"doxygen.css\" rel=\"stylesheet\" type=\"text/css\" />\n<link href=\"extra.css\" rel=\"stylesheet\" type=\"text/css\"/>\n</head>\n<body>\n<div id=\"top\"><!-- do not remove this div, it is closed by doxygen! -->\n<div id=\"titlearea\">\n\t<div class=\"glfwheader\">\n\t\t<a href=\"https://www.glfw.org/\" id=\"glfwhome\">GLFW</a>\n\t\t<ul class=\"glfwnavbar\">\n\t\t\t<li><a href=\"https://www.glfw.org/documentation.html\">Documentation</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/download.html\">Download</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/community.html\">Community</a></li>\n\t\t</ul>\n\t</div>\n</div>\n<!-- end header part -->\n<!-- Generated by Doxygen 1.8.16 -->\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\nvar searchBox = new SearchBox(\"searchBox\", \"search\",false,'Search');\n/* @license-end */\n</script>\n<script type=\"text/javascript\" src=\"menudata.js\"></script>\n<script type=\"text/javascript\" src=\"menu.js\"></script>\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\n$(function() {\n  initMenu('',true,false,'search.php','Search');\n  $(document).ready(function() { init_search(); });\n});\n/* @license-end */</script>\n<div id=\"main-nav\"></div>\n<!-- window showing the filter options -->\n<div id=\"MSearchSelectWindow\"\n     onmouseover=\"return searchBox.OnSearchSelectShow()\"\n     onmouseout=\"return searchBox.OnSearchSelectHide()\"\n     onkeydown=\"return searchBox.OnSearchSelectKey(event)\">\n</div>\n\n<!-- iframe showing the search results (closed by default) -->\n<div id=\"MSearchResultsWindow\">\n<iframe src=\"javascript:void(0)\" frameborder=\"0\" \n        name=\"MSearchResults\" id=\"MSearchResults\">\n</iframe>\n</div>\n\n</div><!-- top -->\n<div class=\"PageDoc\"><div class=\"header\">\n  <div class=\"headertitle\">\n<div class=\"title\">Context guide </div>  </div>\n</div><!--header-->\n<div class=\"contents\">\n<div class=\"toc\"><h3>Table of Contents</h3>\n<ul><li class=\"level1\"><a href=\"#context_object\">Context objects</a><ul><li class=\"level2\"><a href=\"#context_hints\">Context creation hints</a></li>\n<li class=\"level2\"><a href=\"#context_sharing\">Context object sharing</a></li>\n<li class=\"level2\"><a href=\"#context_offscreen\">Offscreen contexts</a></li>\n<li class=\"level2\"><a href=\"#context_less\">Windows without contexts</a></li>\n</ul>\n</li>\n<li class=\"level1\"><a href=\"#context_current\">Current context</a></li>\n<li class=\"level1\"><a href=\"#context_swap\">Buffer swapping</a></li>\n<li class=\"level1\"><a href=\"#context_glext\">OpenGL and OpenGL ES extensions</a><ul><li class=\"level2\"><a href=\"#context_glext_auto\">Loading extension with a loader library</a></li>\n<li class=\"level2\"><a href=\"#context_glext_manual\">Loading extensions manually</a><ul><li class=\"level3\"><a href=\"#context_glext_header\">The glext.h header</a></li>\n<li class=\"level3\"><a href=\"#context_glext_string\">Checking for extensions</a></li>\n<li class=\"level3\"><a href=\"#context_glext_proc\">Fetching function pointers</a></li>\n</ul>\n</li>\n</ul>\n</li>\n</ul>\n</div>\n<div class=\"textblock\"><p>This guide introduces the OpenGL and OpenGL ES context related functions of GLFW. For details on a specific function in this category, see the <a class=\"el\" href=\"group__context.html\">Context reference</a>. There are also guides for the other areas of the GLFW API.</p>\n<ul>\n<li><a class=\"el\" href=\"intro_guide.html\">Introduction to the API</a></li>\n<li><a class=\"el\" href=\"window_guide.html\">Window guide</a></li>\n<li><a class=\"el\" href=\"vulkan_guide.html\">Vulkan guide</a></li>\n<li><a class=\"el\" href=\"monitor_guide.html\">Monitor guide</a></li>\n<li><a class=\"el\" href=\"input_guide.html\">Input guide</a></li>\n</ul>\n<h1><a class=\"anchor\" id=\"context_object\"></a>\nContext objects</h1>\n<p>A window object encapsulates both a top-level window and an OpenGL or OpenGL ES context. It is created with <a class=\"el\" href=\"group__window.html#ga5c336fddf2cbb5b92f65f10fb6043344\">glfwCreateWindow</a> and destroyed with <a class=\"el\" href=\"group__window.html#gacdf43e51376051d2c091662e9fe3d7b2\">glfwDestroyWindow</a> or <a class=\"el\" href=\"group__init.html#gaaae48c0a18607ea4a4ba951d939f0901\">glfwTerminate</a>. See <a class=\"el\" href=\"window_guide.html#window_creation\">Window creation</a> for more information.</p>\n<p>As the window and context are inseparably linked, the window object also serves as the context handle.</p>\n<p>To test the creation of various kinds of contexts and see their properties, run the <code>glfwinfo</code> test program.</p>\n<dl class=\"section note\"><dt>Note</dt><dd>Vulkan does not have a context and the Vulkan instance is created via the Vulkan API itself. If you will be using Vulkan to render to a window, disable context creation by setting the <a class=\"el\" href=\"window_guide.html#GLFW_CLIENT_API_hint\">GLFW_CLIENT_API</a> hint to <code>GLFW_NO_API</code>. For more information, see the <a class=\"el\" href=\"vulkan_guide.html\">Vulkan guide</a>.</dd></dl>\n<h2><a class=\"anchor\" id=\"context_hints\"></a>\nContext creation hints</h2>\n<p>There are a number of hints, specified using <a class=\"el\" href=\"group__window.html#ga7d9c8c62384b1e2821c4dc48952d2033\">glfwWindowHint</a>, related to what kind of context is created. See <a class=\"el\" href=\"window_guide.html#window_hints_ctx\">context related hints</a> in the window guide.</p>\n<h2><a class=\"anchor\" id=\"context_sharing\"></a>\nContext object sharing</h2>\n<p>When creating a window and its OpenGL or OpenGL ES context with <a class=\"el\" href=\"group__window.html#ga5c336fddf2cbb5b92f65f10fb6043344\">glfwCreateWindow</a>, you can specify another window whose context the new one should share its objects (textures, vertex and element buffers, etc.) with.</p>\n<div class=\"fragment\"><div class=\"line\"><a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* second_window = <a class=\"code\" href=\"group__window.html#ga5c336fddf2cbb5b92f65f10fb6043344\">glfwCreateWindow</a>(640, 480, <span class=\"stringliteral\">&quot;Second Window&quot;</span>, NULL, first_window);</div>\n</div><!-- fragment --><p>Object sharing is implemented by the operating system and graphics driver. On platforms where it is possible to choose which types of objects are shared, GLFW requests that all types are shared.</p>\n<p>See the relevant chapter of the <a href=\"https://www.opengl.org/registry/\">OpenGL</a> or <a href=\"https://www.khronos.org/opengles/\">OpenGL ES</a> reference documents for more information. The name and number of this chapter unfortunately varies between versions and APIs, but has at times been named <em>Shared Objects and Multiple Contexts</em>.</p>\n<p>GLFW comes with a barebones object sharing example program called <code>sharing</code>.</p>\n<h2><a class=\"anchor\" id=\"context_offscreen\"></a>\nOffscreen contexts</h2>\n<p>GLFW doesn't support creating contexts without an associated window. However, contexts with hidden windows can be created with the <a class=\"el\" href=\"window_guide.html#GLFW_VISIBLE_hint\">GLFW_VISIBLE</a> window hint.</p>\n<div class=\"fragment\"><div class=\"line\"><a class=\"code\" href=\"group__window.html#ga7d9c8c62384b1e2821c4dc48952d2033\">glfwWindowHint</a>(<a class=\"code\" href=\"group__window.html#gafb3cdc45297e06d8f1eb13adc69ca6c4\">GLFW_VISIBLE</a>, <a class=\"code\" href=\"group__init.html#gac877fe3b627d21ef3a0a23e0a73ba8c5\">GLFW_FALSE</a>);</div>\n<div class=\"line\"> </div>\n<div class=\"line\"><a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* offscreen_context = <a class=\"code\" href=\"group__window.html#ga5c336fddf2cbb5b92f65f10fb6043344\">glfwCreateWindow</a>(640, 480, <span class=\"stringliteral\">&quot;&quot;</span>, NULL, NULL);</div>\n</div><!-- fragment --><p>The window never needs to be shown and its context can be used as a plain offscreen context. Depending on the window manager, the size of a hidden window's framebuffer may not be usable or modifiable, so framebuffer objects are recommended for rendering with such contexts.</p>\n<p>You should still <a class=\"el\" href=\"input_guide.html#events\">process events</a> as long as you have at least one window, even if none of them are visible.</p>\n<p><b>macOS:</b> The first time a window is created the menu bar is created. This is not desirable for example when writing a command-line only application. Menu bar creation can be disabled with the <a class=\"el\" href=\"group__init.html#ga71e0b4ce2f2696a84a9b8c5e12dc70cf\">GLFW_COCOA_MENUBAR</a> init hint.</p>\n<h2><a class=\"anchor\" id=\"context_less\"></a>\nWindows without contexts</h2>\n<p>You can disable context creation by setting the <a class=\"el\" href=\"window_guide.html#GLFW_CLIENT_API_hint\">GLFW_CLIENT_API</a> hint to <code>GLFW_NO_API</code>. Windows without contexts must not be passed to <a class=\"el\" href=\"group__context.html#ga1c04dc242268f827290fe40aa1c91157\">glfwMakeContextCurrent</a> or <a class=\"el\" href=\"group__window.html#ga15a5a1ee5b3c2ca6b15ca209a12efd14\">glfwSwapBuffers</a>.</p>\n<h1><a class=\"anchor\" id=\"context_current\"></a>\nCurrent context</h1>\n<p>Before you can make OpenGL or OpenGL ES calls, you need to have a current context of the correct type. A context can only be current for a single thread at a time, and a thread can only have a single context current at a time.</p>\n<p>When moving a context between threads, you must make it non-current on the old thread before making it current on the new one.</p>\n<p>The context of a window is made current with <a class=\"el\" href=\"group__context.html#ga1c04dc242268f827290fe40aa1c91157\">glfwMakeContextCurrent</a>.</p>\n<div class=\"fragment\"><div class=\"line\"><a class=\"code\" href=\"group__context.html#ga1c04dc242268f827290fe40aa1c91157\">glfwMakeContextCurrent</a>(window);</div>\n</div><!-- fragment --><p>The window of the current context is returned by <a class=\"el\" href=\"group__context.html#gac84759b1f6c2d271a4fea8ae89ec980d\">glfwGetCurrentContext</a>.</p>\n<div class=\"fragment\"><div class=\"line\"><a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window = <a class=\"code\" href=\"group__context.html#gac84759b1f6c2d271a4fea8ae89ec980d\">glfwGetCurrentContext</a>();</div>\n</div><!-- fragment --><p>The following GLFW functions require a context to be current. Calling any these functions without a current context will generate a <a class=\"el\" href=\"group__errors.html#gaa8290386e9528ccb9e42a3a4e16fc0d0\">GLFW_NO_CURRENT_CONTEXT</a> error.</p>\n<ul>\n<li><a class=\"el\" href=\"group__context.html#ga6d4e0cdf151b5e579bd67f13202994ed\">glfwSwapInterval</a></li>\n<li><a class=\"el\" href=\"group__context.html#ga87425065c011cef1ebd6aac75e059dfa\">glfwExtensionSupported</a></li>\n<li><a class=\"el\" href=\"group__context.html#ga35f1837e6f666781842483937612f163\">glfwGetProcAddress</a></li>\n</ul>\n<h1><a class=\"anchor\" id=\"context_swap\"></a>\nBuffer swapping</h1>\n<p>See <a class=\"el\" href=\"window_guide.html#buffer_swap\">Buffer swapping</a> in the window guide.</p>\n<h1><a class=\"anchor\" id=\"context_glext\"></a>\nOpenGL and OpenGL ES extensions</h1>\n<p>One of the benefits of OpenGL and OpenGL ES is their extensibility. Hardware vendors may include extensions in their implementations that extend the API before that functionality is included in a new version of the OpenGL or OpenGL ES specification, and some extensions are never included and remain as extensions until they become obsolete.</p>\n<p>An extension is defined by:</p>\n<ul>\n<li>An extension name (e.g. <code>GL_ARB_debug_output</code>)</li>\n<li>New OpenGL tokens (e.g. <code>GL_DEBUG_SEVERITY_HIGH_ARB</code>)</li>\n<li>New OpenGL functions (e.g. <code>glGetDebugMessageLogARB</code>)</li>\n</ul>\n<p>Note the <code>ARB</code> affix, which stands for Architecture Review Board and is used for official extensions. The extension above was created by the ARB, but there are many different affixes, like <code>NV</code> for Nvidia and <code>AMD</code> for, well, AMD. Any group may also use the generic <code>EXT</code> affix. Lists of extensions, together with their specifications, can be found at the <a href=\"https://www.opengl.org/registry/\">OpenGL Registry</a> and <a href=\"https://www.khronos.org/registry/gles/\">OpenGL ES Registry</a>.</p>\n<h2><a class=\"anchor\" id=\"context_glext_auto\"></a>\nLoading extension with a loader library</h2>\n<p>An extension loader library is the easiest and best way to access both OpenGL and OpenGL ES extensions and modern versions of the core OpenGL or OpenGL ES APIs. They will take care of all the details of declaring and loading everything you need. One such library is <a href=\"https://github.com/Dav1dde/glad\">glad</a> and there are several others.</p>\n<p>The following example will use glad but all extension loader libraries work similarly.</p>\n<p>First you need to generate the source files using the glad Python script. This example generates a loader for any version of OpenGL, which is the default for both GLFW and glad, but loaders for OpenGL ES, as well as loaders for specific API versions and extension sets can be generated. The generated files are written to the <code>output</code> directory.</p>\n<div class=\"fragment\"><div class=\"line\">python main.py --generator c --no-loader --out-path output</div>\n</div><!-- fragment --><p>The <code>--no-loader</code> option is added because GLFW already provides a function for loading OpenGL and OpenGL ES function pointers, one that automatically uses the selected context creation API, and glad can call this instead of having to implement its own. There are several other command-line options as well. See the glad documentation for details.</p>\n<p>Add the generated <code>output/src/glad.c</code>, <code>output/include/glad/glad.h</code> and <code>output/include/KHR/khrplatform.h</code> files to your build. Then you need to include the glad header file, which will replace the OpenGL header of your development environment. By including the glad header before the GLFW header, it suppresses the development environment's OpenGL or OpenGL ES header.</p>\n<div class=\"fragment\"><div class=\"line\"><span class=\"preprocessor\">#include &lt;glad/glad.h&gt;</span></div>\n<div class=\"line\"><span class=\"preprocessor\">#include &lt;<a class=\"code\" href=\"glfw3_8h.html\">GLFW/glfw3.h</a>&gt;</span></div>\n</div><!-- fragment --><p>Finally you need to initialize glad once you have a suitable current context.</p>\n<div class=\"fragment\"><div class=\"line\">window = <a class=\"code\" href=\"group__window.html#ga5c336fddf2cbb5b92f65f10fb6043344\">glfwCreateWindow</a>(640, 480, <span class=\"stringliteral\">&quot;My Window&quot;</span>, NULL, NULL);</div>\n<div class=\"line\"><span class=\"keywordflow\">if</span> (!window)</div>\n<div class=\"line\">{</div>\n<div class=\"line\">    ...</div>\n<div class=\"line\">}</div>\n<div class=\"line\"> </div>\n<div class=\"line\"><a class=\"code\" href=\"group__context.html#ga1c04dc242268f827290fe40aa1c91157\">glfwMakeContextCurrent</a>(window);</div>\n<div class=\"line\"> </div>\n<div class=\"line\">gladLoadGLLoader((GLADloadproc) <a class=\"code\" href=\"group__context.html#ga35f1837e6f666781842483937612f163\">glfwGetProcAddress</a>);</div>\n</div><!-- fragment --><p>Once glad has been loaded, you have access to all OpenGL core and extension functions supported by both the context you created and the glad loader you generated and you are ready to start rendering.</p>\n<p>You can specify a minimum required OpenGL or OpenGL ES version with <a class=\"el\" href=\"window_guide.html#window_hints_ctx\">context hints</a>. If your needs are more complex, you can check the actual OpenGL or OpenGL ES version with <a class=\"el\" href=\"window_guide.html#window_attribs_ctx\">context attributes</a>, or you can check whether a specific version is supported by the current context with the <code>GLAD_GL_VERSION_x_x</code> booleans.</p>\n<div class=\"fragment\"><div class=\"line\"><span class=\"keywordflow\">if</span> (GLAD_GL_VERSION_3_2)</div>\n<div class=\"line\">{</div>\n<div class=\"line\">    <span class=\"comment\">// Call OpenGL 3.2+ specific code</span></div>\n<div class=\"line\">}</div>\n</div><!-- fragment --><p>To check whether a specific extension is supported, use the <code>GLAD_GL_xxx</code> booleans.</p>\n<div class=\"fragment\"><div class=\"line\"><span class=\"keywordflow\">if</span> (GLAD_GL_ARB_debug_output)</div>\n<div class=\"line\">{</div>\n<div class=\"line\">    <span class=\"comment\">// Use GL_ARB_debug_output</span></div>\n<div class=\"line\">}</div>\n</div><!-- fragment --><h2><a class=\"anchor\" id=\"context_glext_manual\"></a>\nLoading extensions manually</h2>\n<p><b>Do not use this technique</b> unless it is absolutely necessary. An <a class=\"el\" href=\"context_guide.html#context_glext_auto\">extension loader library</a> will save you a ton of tedious, repetitive, error prone work.</p>\n<p>To use a certain extension, you must first check whether the context supports that extension and then, if it introduces new functions, retrieve the pointers to those functions. GLFW provides <a class=\"el\" href=\"group__context.html#ga87425065c011cef1ebd6aac75e059dfa\">glfwExtensionSupported</a> and <a class=\"el\" href=\"group__context.html#ga35f1837e6f666781842483937612f163\">glfwGetProcAddress</a> for manual loading of extensions and new API functions.</p>\n<p>This section will demonstrate manual loading of OpenGL extensions. The loading of OpenGL ES extensions is identical except for the name of the extension header.</p>\n<h3><a class=\"anchor\" id=\"context_glext_header\"></a>\nThe glext.h header</h3>\n<p>The <code>glext.h</code> extension header is a continually updated file that defines the interfaces for all OpenGL extensions. The latest version of this can always be found at the <a href=\"https://www.opengl.org/registry/\">OpenGL Registry</a>. There are also extension headers for the various versions of OpenGL ES at the <a href=\"https://www.khronos.org/registry/gles/\">OpenGL ES Registry</a>. It it strongly recommended that you use your own copy of the extension header, as the one included in your development environment may be several years out of date and may not include the extensions you wish to use.</p>\n<p>The header defines function pointer types for all functions of all extensions it supports. These have names like <code>PFNGLGETDEBUGMESSAGELOGARBPROC</code> (for <code>glGetDebugMessageLogARB</code>), i.e. the name is made uppercase and <code>PFN</code> (pointer to function) and <code>PROC</code> (procedure) are added to the ends.</p>\n<p>To include the extension header, define <a class=\"el\" href=\"build_guide.html#GLFW_INCLUDE_GLEXT\">GLFW_INCLUDE_GLEXT</a> before including the GLFW header.</p>\n<div class=\"fragment\"><div class=\"line\"><span class=\"preprocessor\">#define GLFW_INCLUDE_GLEXT</span></div>\n<div class=\"line\"><span class=\"preprocessor\">#include &lt;GLFW/glfw3.h&gt;</span></div>\n</div><!-- fragment --><h3><a class=\"anchor\" id=\"context_glext_string\"></a>\nChecking for extensions</h3>\n<p>A given machine may not actually support the extension (it may have older drivers or a graphics card that lacks the necessary hardware features), so it is necessary to check at run-time whether the context supports the extension. This is done with <a class=\"el\" href=\"group__context.html#ga87425065c011cef1ebd6aac75e059dfa\">glfwExtensionSupported</a>.</p>\n<div class=\"fragment\"><div class=\"line\"><span class=\"keywordflow\">if</span> (<a class=\"code\" href=\"group__context.html#ga87425065c011cef1ebd6aac75e059dfa\">glfwExtensionSupported</a>(<span class=\"stringliteral\">&quot;GL_ARB_debug_output&quot;</span>))</div>\n<div class=\"line\">{</div>\n<div class=\"line\">    <span class=\"comment\">// The extension is supported by the current context</span></div>\n<div class=\"line\">}</div>\n</div><!-- fragment --><p>The argument is a null terminated ASCII string with the extension name. If the extension is supported, <a class=\"el\" href=\"group__context.html#ga87425065c011cef1ebd6aac75e059dfa\">glfwExtensionSupported</a> returns <code>GLFW_TRUE</code>, otherwise it returns <code>GLFW_FALSE</code>.</p>\n<h3><a class=\"anchor\" id=\"context_glext_proc\"></a>\nFetching function pointers</h3>\n<p>Many extensions, though not all, require the use of new OpenGL functions. These functions often do not have entry points in the client API libraries of your operating system, making it necessary to fetch them at run time. You can retrieve pointers to these functions with <a class=\"el\" href=\"group__context.html#ga35f1837e6f666781842483937612f163\">glfwGetProcAddress</a>.</p>\n<div class=\"fragment\"><div class=\"line\">PFNGLGETDEBUGMESSAGELOGARBPROC pfnGetDebugMessageLog = <a class=\"code\" href=\"group__context.html#ga35f1837e6f666781842483937612f163\">glfwGetProcAddress</a>(<span class=\"stringliteral\">&quot;glGetDebugMessageLogARB&quot;</span>);</div>\n</div><!-- fragment --><p>In general, you should avoid giving the function pointer variables the (exact) same name as the function, as this may confuse your linker. Instead, you can use a different prefix, like above, or some other naming scheme.</p>\n<p>Now that all the pieces have been introduced, here is what they might look like when used together.</p>\n<div class=\"fragment\"><div class=\"line\"><span class=\"preprocessor\">#define GLFW_INCLUDE_GLEXT</span></div>\n<div class=\"line\"><span class=\"preprocessor\">#include &lt;<a class=\"code\" href=\"glfw3_8h.html\">GLFW/glfw3.h</a>&gt;</span></div>\n<div class=\"line\"> </div>\n<div class=\"line\"><span class=\"preprocessor\">#define glGetDebugMessageLogARB pfnGetDebugMessageLog</span></div>\n<div class=\"line\">PFNGLGETDEBUGMESSAGELOGARBPROC pfnGetDebugMessageLog;</div>\n<div class=\"line\"> </div>\n<div class=\"line\"><span class=\"comment\">// Flag indicating whether the extension is supported</span></div>\n<div class=\"line\"><span class=\"keywordtype\">int</span> has_ARB_debug_output = 0;</div>\n<div class=\"line\"> </div>\n<div class=\"line\"><span class=\"keywordtype\">void</span> load_extensions(<span class=\"keywordtype\">void</span>)</div>\n<div class=\"line\">{</div>\n<div class=\"line\">    <span class=\"keywordflow\">if</span> (<a class=\"code\" href=\"group__context.html#ga87425065c011cef1ebd6aac75e059dfa\">glfwExtensionSupported</a>(<span class=\"stringliteral\">&quot;GL_ARB_debug_output&quot;</span>))</div>\n<div class=\"line\">    {</div>\n<div class=\"line\">        pfnGetDebugMessageLog = (PFNGLGETDEBUGMESSAGELOGARBPROC)</div>\n<div class=\"line\">            <a class=\"code\" href=\"group__context.html#ga35f1837e6f666781842483937612f163\">glfwGetProcAddress</a>(<span class=\"stringliteral\">&quot;glGetDebugMessageLogARB&quot;</span>);</div>\n<div class=\"line\">        has_ARB_debug_output = 1;</div>\n<div class=\"line\">    }</div>\n<div class=\"line\">}</div>\n<div class=\"line\"> </div>\n<div class=\"line\"><span class=\"keywordtype\">void</span> some_function(<span class=\"keywordtype\">void</span>)</div>\n<div class=\"line\">{</div>\n<div class=\"line\">    <span class=\"keywordflow\">if</span> (has_ARB_debug_output)</div>\n<div class=\"line\">    {</div>\n<div class=\"line\">        <span class=\"comment\">// Now the extension function can be called as usual</span></div>\n<div class=\"line\">        glGetDebugMessageLogARB(...);</div>\n<div class=\"line\">    }</div>\n<div class=\"line\">}</div>\n</div><!-- fragment --> </div></div><!-- contents -->\n</div><!-- PageDoc -->\n<div class=\"ttc\" id=\"aglfw3_8h_html\"><div class=\"ttname\"><a href=\"glfw3_8h.html\">glfw3.h</a></div><div class=\"ttdoc\">The header of the GLFW 3 API.</div></div>\n<div class=\"ttc\" id=\"agroup__context_html_gac84759b1f6c2d271a4fea8ae89ec980d\"><div class=\"ttname\"><a href=\"group__context.html#gac84759b1f6c2d271a4fea8ae89ec980d\">glfwGetCurrentContext</a></div><div class=\"ttdeci\">GLFWwindow * glfwGetCurrentContext(void)</div><div class=\"ttdoc\">Returns the window whose context is current on the calling thread.</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_ga3c96d80d363e67d13a41b5d1821f3242\"><div class=\"ttname\"><a href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a></div><div class=\"ttdeci\">struct GLFWwindow GLFWwindow</div><div class=\"ttdoc\">Opaque window object.</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:1152</div></div>\n<div class=\"ttc\" id=\"agroup__context_html_ga87425065c011cef1ebd6aac75e059dfa\"><div class=\"ttname\"><a href=\"group__context.html#ga87425065c011cef1ebd6aac75e059dfa\">glfwExtensionSupported</a></div><div class=\"ttdeci\">int glfwExtensionSupported(const char *extension)</div><div class=\"ttdoc\">Returns whether the specified extension is available.</div></div>\n<div class=\"ttc\" id=\"agroup__context_html_ga1c04dc242268f827290fe40aa1c91157\"><div class=\"ttname\"><a href=\"group__context.html#ga1c04dc242268f827290fe40aa1c91157\">glfwMakeContextCurrent</a></div><div class=\"ttdeci\">void glfwMakeContextCurrent(GLFWwindow *window)</div><div class=\"ttdoc\">Makes the context of the specified window current for the calling thread.</div></div>\n<div class=\"ttc\" id=\"agroup__init_html_gac877fe3b627d21ef3a0a23e0a73ba8c5\"><div class=\"ttname\"><a href=\"group__init.html#gac877fe3b627d21ef3a0a23e0a73ba8c5\">GLFW_FALSE</a></div><div class=\"ttdeci\">#define GLFW_FALSE</div><div class=\"ttdoc\">Zero.</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:289</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_ga5c336fddf2cbb5b92f65f10fb6043344\"><div class=\"ttname\"><a href=\"group__window.html#ga5c336fddf2cbb5b92f65f10fb6043344\">glfwCreateWindow</a></div><div class=\"ttdeci\">GLFWwindow * glfwCreateWindow(int width, int height, const char *title, GLFWmonitor *monitor, GLFWwindow *share)</div><div class=\"ttdoc\">Creates a window and its associated context.</div></div>\n<div class=\"ttc\" id=\"agroup__context_html_ga35f1837e6f666781842483937612f163\"><div class=\"ttname\"><a href=\"group__context.html#ga35f1837e6f666781842483937612f163\">glfwGetProcAddress</a></div><div class=\"ttdeci\">GLFWglproc glfwGetProcAddress(const char *procname)</div><div class=\"ttdoc\">Returns the address of the specified function for the current context.</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_ga7d9c8c62384b1e2821c4dc48952d2033\"><div class=\"ttname\"><a href=\"group__window.html#ga7d9c8c62384b1e2821c4dc48952d2033\">glfwWindowHint</a></div><div class=\"ttdeci\">void glfwWindowHint(int hint, int value)</div><div class=\"ttdoc\">Sets the specified window hint to the desired value.</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_gafb3cdc45297e06d8f1eb13adc69ca6c4\"><div class=\"ttname\"><a href=\"group__window.html#gafb3cdc45297e06d8f1eb13adc69ca6c4\">GLFW_VISIBLE</a></div><div class=\"ttdeci\">#define GLFW_VISIBLE</div><div class=\"ttdoc\">Window visibility window hint and attribute.</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:782</div></div>\n<address class=\"footer\">\n<p>\nLast update on Mon Jan 20 2020 for GLFW 3.3.2\n</p>\n</address>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/deprecated.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta http-equiv=\"X-UA-Compatible\" content=\"IE=9\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<title>GLFW: Deprecated List</title>\n<link href=\"tabs.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"jquery.js\"></script>\n<script type=\"text/javascript\" src=\"dynsections.js\"></script>\n<link href=\"search/search.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"search/searchdata.js\"></script>\n<script type=\"text/javascript\" src=\"search/search.js\"></script>\n<link href=\"doxygen.css\" rel=\"stylesheet\" type=\"text/css\" />\n<link href=\"extra.css\" rel=\"stylesheet\" type=\"text/css\"/>\n</head>\n<body>\n<div id=\"top\"><!-- do not remove this div, it is closed by doxygen! -->\n<div id=\"titlearea\">\n\t<div class=\"glfwheader\">\n\t\t<a href=\"https://www.glfw.org/\" id=\"glfwhome\">GLFW</a>\n\t\t<ul class=\"glfwnavbar\">\n\t\t\t<li><a href=\"https://www.glfw.org/documentation.html\">Documentation</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/download.html\">Download</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/community.html\">Community</a></li>\n\t\t</ul>\n\t</div>\n</div>\n<!-- end header part -->\n<!-- Generated by Doxygen 1.8.16 -->\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\nvar searchBox = new SearchBox(\"searchBox\", \"search\",false,'Search');\n/* @license-end */\n</script>\n<script type=\"text/javascript\" src=\"menudata.js\"></script>\n<script type=\"text/javascript\" src=\"menu.js\"></script>\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\n$(function() {\n  initMenu('',true,false,'search.php','Search');\n  $(document).ready(function() { init_search(); });\n});\n/* @license-end */</script>\n<div id=\"main-nav\"></div>\n<!-- window showing the filter options -->\n<div id=\"MSearchSelectWindow\"\n     onmouseover=\"return searchBox.OnSearchSelectShow()\"\n     onmouseout=\"return searchBox.OnSearchSelectHide()\"\n     onkeydown=\"return searchBox.OnSearchSelectKey(event)\">\n</div>\n\n<!-- iframe showing the search results (closed by default) -->\n<div id=\"MSearchResultsWindow\">\n<iframe src=\"javascript:void(0)\" frameborder=\"0\" \n        name=\"MSearchResults\" id=\"MSearchResults\">\n</iframe>\n</div>\n\n</div><!-- top -->\n<div class=\"PageDoc\"><div class=\"header\">\n  <div class=\"headertitle\">\n<div class=\"title\">Deprecated List </div>  </div>\n</div><!--header-->\n<div class=\"contents\">\n<div class=\"textblock\"><dl class=\"reflist\">\n<dt>Global <a class=\"el\" href=\"group__input.html#gae36fb6897d2b7df9b128900c8ce9c507\">GLFWcharmodsfun</a>  )(GLFWwindow *, unsigned int, int)</dt>\n<dd><a class=\"anchor\" id=\"_deprecated000001\"></a>Scheduled for removal in version 4.0. </dd>\n<dt>Global <a class=\"el\" href=\"group__input.html#ga0b7f4ad13c2b17435ff13b6dcfb4e43c\">glfwSetCharModsCallback</a>  (GLFWwindow *window, GLFWcharmodsfun callback)</dt>\n<dd><a class=\"anchor\" id=\"_deprecated000002\"></a>Scheduled for removal in version 4.0.</dd>\n</dl>\n</div></div><!-- contents -->\n</div><!-- PageDoc -->\n<address class=\"footer\">\n<p>\nLast update on Mon Jan 20 2020 for GLFW 3.3.2\n</p>\n</address>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/dir_15a5176d7c9cc5c407ed4f611edf0684.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta http-equiv=\"X-UA-Compatible\" content=\"IE=9\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<title>GLFW: GLFW Directory Reference</title>\n<link href=\"tabs.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"jquery.js\"></script>\n<script type=\"text/javascript\" src=\"dynsections.js\"></script>\n<link href=\"search/search.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"search/searchdata.js\"></script>\n<script type=\"text/javascript\" src=\"search/search.js\"></script>\n<link href=\"doxygen.css\" rel=\"stylesheet\" type=\"text/css\" />\n<link href=\"extra.css\" rel=\"stylesheet\" type=\"text/css\"/>\n</head>\n<body>\n<div id=\"top\"><!-- do not remove this div, it is closed by doxygen! -->\n<div id=\"titlearea\">\n\t<div class=\"glfwheader\">\n\t\t<a href=\"https://www.glfw.org/\" id=\"glfwhome\">GLFW</a>\n\t\t<ul class=\"glfwnavbar\">\n\t\t\t<li><a href=\"https://www.glfw.org/documentation.html\">Documentation</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/download.html\">Download</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/community.html\">Community</a></li>\n\t\t</ul>\n\t</div>\n</div>\n<!-- end header part -->\n<!-- Generated by Doxygen 1.8.16 -->\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\nvar searchBox = new SearchBox(\"searchBox\", \"search\",false,'Search');\n/* @license-end */\n</script>\n<script type=\"text/javascript\" src=\"menudata.js\"></script>\n<script type=\"text/javascript\" src=\"menu.js\"></script>\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\n$(function() {\n  initMenu('',true,false,'search.php','Search');\n  $(document).ready(function() { init_search(); });\n});\n/* @license-end */</script>\n<div id=\"main-nav\"></div>\n<!-- window showing the filter options -->\n<div id=\"MSearchSelectWindow\"\n     onmouseover=\"return searchBox.OnSearchSelectShow()\"\n     onmouseout=\"return searchBox.OnSearchSelectHide()\"\n     onkeydown=\"return searchBox.OnSearchSelectKey(event)\">\n</div>\n\n<!-- iframe showing the search results (closed by default) -->\n<div id=\"MSearchResultsWindow\">\n<iframe src=\"javascript:void(0)\" frameborder=\"0\" \n        name=\"MSearchResults\" id=\"MSearchResults\">\n</iframe>\n</div>\n\n<div id=\"nav-path\" class=\"navpath\">\n  <ul>\n<li class=\"navelem\"><a class=\"el\" href=\"dir_bc6505cac00d7a6291dbfd9af70666b7.html\">glfw-3.3.2</a></li><li class=\"navelem\"><a class=\"el\" href=\"dir_a58ef735c5cc5a9a31d321e1abe7c42e.html\">include</a></li><li class=\"navelem\"><a class=\"el\" href=\"dir_15a5176d7c9cc5c407ed4f611edf0684.html\">GLFW</a></li>  </ul>\n</div>\n</div><!-- top -->\n<div class=\"header\">\n  <div class=\"headertitle\">\n<div class=\"title\">GLFW Directory Reference</div>  </div>\n</div><!--header-->\n<div class=\"contents\">\n<table class=\"memberdecls\">\n<tr class=\"heading\"><td colspan=\"2\"><h2 class=\"groupheader\"><a name=\"files\"></a>\nFiles</h2></td></tr>\n<tr class=\"memitem:glfw3_8h\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">file &#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"glfw3_8h.html\">glfw3.h</a> <a href=\"glfw3_8h_source.html\">[code]</a></td></tr>\n<tr class=\"memdesc:glfw3_8h\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">The header of the GLFW 3 API. <br /></td></tr>\n<tr class=\"separator:\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:glfw3native_8h\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">file &#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"glfw3native_8h.html\">glfw3native.h</a> <a href=\"glfw3native_8h_source.html\">[code]</a></td></tr>\n<tr class=\"memdesc:glfw3native_8h\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">The header of the native access functions. <br /></td></tr>\n<tr class=\"separator:\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n</table>\n</div><!-- contents -->\n<address class=\"footer\">\n<p>\nLast update on Mon Jan 20 2020 for GLFW 3.3.2\n</p>\n</address>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/dir_a58ef735c5cc5a9a31d321e1abe7c42e.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta http-equiv=\"X-UA-Compatible\" content=\"IE=9\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<title>GLFW: include Directory Reference</title>\n<link href=\"tabs.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"jquery.js\"></script>\n<script type=\"text/javascript\" src=\"dynsections.js\"></script>\n<link href=\"search/search.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"search/searchdata.js\"></script>\n<script type=\"text/javascript\" src=\"search/search.js\"></script>\n<link href=\"doxygen.css\" rel=\"stylesheet\" type=\"text/css\" />\n<link href=\"extra.css\" rel=\"stylesheet\" type=\"text/css\"/>\n</head>\n<body>\n<div id=\"top\"><!-- do not remove this div, it is closed by doxygen! -->\n<div id=\"titlearea\">\n\t<div class=\"glfwheader\">\n\t\t<a href=\"https://www.glfw.org/\" id=\"glfwhome\">GLFW</a>\n\t\t<ul class=\"glfwnavbar\">\n\t\t\t<li><a href=\"https://www.glfw.org/documentation.html\">Documentation</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/download.html\">Download</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/community.html\">Community</a></li>\n\t\t</ul>\n\t</div>\n</div>\n<!-- end header part -->\n<!-- Generated by Doxygen 1.8.16 -->\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\nvar searchBox = new SearchBox(\"searchBox\", \"search\",false,'Search');\n/* @license-end */\n</script>\n<script type=\"text/javascript\" src=\"menudata.js\"></script>\n<script type=\"text/javascript\" src=\"menu.js\"></script>\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\n$(function() {\n  initMenu('',true,false,'search.php','Search');\n  $(document).ready(function() { init_search(); });\n});\n/* @license-end */</script>\n<div id=\"main-nav\"></div>\n<!-- window showing the filter options -->\n<div id=\"MSearchSelectWindow\"\n     onmouseover=\"return searchBox.OnSearchSelectShow()\"\n     onmouseout=\"return searchBox.OnSearchSelectHide()\"\n     onkeydown=\"return searchBox.OnSearchSelectKey(event)\">\n</div>\n\n<!-- iframe showing the search results (closed by default) -->\n<div id=\"MSearchResultsWindow\">\n<iframe src=\"javascript:void(0)\" frameborder=\"0\" \n        name=\"MSearchResults\" id=\"MSearchResults\">\n</iframe>\n</div>\n\n<div id=\"nav-path\" class=\"navpath\">\n  <ul>\n<li class=\"navelem\"><a class=\"el\" href=\"dir_bc6505cac00d7a6291dbfd9af70666b7.html\">glfw-3.3.2</a></li><li class=\"navelem\"><a class=\"el\" href=\"dir_a58ef735c5cc5a9a31d321e1abe7c42e.html\">include</a></li>  </ul>\n</div>\n</div><!-- top -->\n<div class=\"header\">\n  <div class=\"headertitle\">\n<div class=\"title\">include Directory Reference</div>  </div>\n</div><!--header-->\n<div class=\"contents\">\n<table class=\"memberdecls\">\n<tr class=\"heading\"><td colspan=\"2\"><h2 class=\"groupheader\"><a name=\"subdirs\"></a>\nDirectories</h2></td></tr>\n<tr class=\"memitem:dir_15a5176d7c9cc5c407ed4f611edf0684\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">directory &#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"dir_15a5176d7c9cc5c407ed4f611edf0684.html\">GLFW</a></td></tr>\n<tr class=\"separator:\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n</table>\n</div><!-- contents -->\n<address class=\"footer\">\n<p>\nLast update on Mon Jan 20 2020 for GLFW 3.3.2\n</p>\n</address>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/dir_abae1f34c5d965773b98e3c915cdaeb5.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta http-equiv=\"X-UA-Compatible\" content=\"IE=9\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<title>GLFW: docs Directory Reference</title>\n<link href=\"tabs.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"jquery.js\"></script>\n<script type=\"text/javascript\" src=\"dynsections.js\"></script>\n<link href=\"search/search.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"search/searchdata.js\"></script>\n<script type=\"text/javascript\" src=\"search/search.js\"></script>\n<link href=\"doxygen.css\" rel=\"stylesheet\" type=\"text/css\" />\n<link href=\"extra.css\" rel=\"stylesheet\" type=\"text/css\"/>\n</head>\n<body>\n<div id=\"top\"><!-- do not remove this div, it is closed by doxygen! -->\n<div id=\"titlearea\">\n\t<div class=\"glfwheader\">\n\t\t<a href=\"https://www.glfw.org/\" id=\"glfwhome\">GLFW</a>\n\t\t<ul class=\"glfwnavbar\">\n\t\t\t<li><a href=\"https://www.glfw.org/documentation.html\">Documentation</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/download.html\">Download</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/community.html\">Community</a></li>\n\t\t</ul>\n\t</div>\n</div>\n<!-- end header part -->\n<!-- Generated by Doxygen 1.8.16 -->\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\nvar searchBox = new SearchBox(\"searchBox\", \"search\",false,'Search');\n/* @license-end */\n</script>\n<script type=\"text/javascript\" src=\"menudata.js\"></script>\n<script type=\"text/javascript\" src=\"menu.js\"></script>\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\n$(function() {\n  initMenu('',true,false,'search.php','Search');\n  $(document).ready(function() { init_search(); });\n});\n/* @license-end */</script>\n<div id=\"main-nav\"></div>\n<!-- window showing the filter options -->\n<div id=\"MSearchSelectWindow\"\n     onmouseover=\"return searchBox.OnSearchSelectShow()\"\n     onmouseout=\"return searchBox.OnSearchSelectHide()\"\n     onkeydown=\"return searchBox.OnSearchSelectKey(event)\">\n</div>\n\n<!-- iframe showing the search results (closed by default) -->\n<div id=\"MSearchResultsWindow\">\n<iframe src=\"javascript:void(0)\" frameborder=\"0\" \n        name=\"MSearchResults\" id=\"MSearchResults\">\n</iframe>\n</div>\n\n<div id=\"nav-path\" class=\"navpath\">\n  <ul>\n<li class=\"navelem\"><a class=\"el\" href=\"dir_bc6505cac00d7a6291dbfd9af70666b7.html\">glfw-3.3.2</a></li><li class=\"navelem\"><a class=\"el\" href=\"dir_abae1f34c5d965773b98e3c915cdaeb5.html\">docs</a></li>  </ul>\n</div>\n</div><!-- top -->\n<div class=\"header\">\n  <div class=\"headertitle\">\n<div class=\"title\">docs Directory Reference</div>  </div>\n</div><!--header-->\n<div class=\"contents\">\n</div><!-- contents -->\n<address class=\"footer\">\n<p>\nLast update on Mon Jan 20 2020 for GLFW 3.3.2\n</p>\n</address>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/dir_bc6505cac00d7a6291dbfd9af70666b7.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta http-equiv=\"X-UA-Compatible\" content=\"IE=9\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<title>GLFW: glfw-3.3.2 Directory Reference</title>\n<link href=\"tabs.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"jquery.js\"></script>\n<script type=\"text/javascript\" src=\"dynsections.js\"></script>\n<link href=\"search/search.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"search/searchdata.js\"></script>\n<script type=\"text/javascript\" src=\"search/search.js\"></script>\n<link href=\"doxygen.css\" rel=\"stylesheet\" type=\"text/css\" />\n<link href=\"extra.css\" rel=\"stylesheet\" type=\"text/css\"/>\n</head>\n<body>\n<div id=\"top\"><!-- do not remove this div, it is closed by doxygen! -->\n<div id=\"titlearea\">\n\t<div class=\"glfwheader\">\n\t\t<a href=\"https://www.glfw.org/\" id=\"glfwhome\">GLFW</a>\n\t\t<ul class=\"glfwnavbar\">\n\t\t\t<li><a href=\"https://www.glfw.org/documentation.html\">Documentation</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/download.html\">Download</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/community.html\">Community</a></li>\n\t\t</ul>\n\t</div>\n</div>\n<!-- end header part -->\n<!-- Generated by Doxygen 1.8.16 -->\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\nvar searchBox = new SearchBox(\"searchBox\", \"search\",false,'Search');\n/* @license-end */\n</script>\n<script type=\"text/javascript\" src=\"menudata.js\"></script>\n<script type=\"text/javascript\" src=\"menu.js\"></script>\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\n$(function() {\n  initMenu('',true,false,'search.php','Search');\n  $(document).ready(function() { init_search(); });\n});\n/* @license-end */</script>\n<div id=\"main-nav\"></div>\n<!-- window showing the filter options -->\n<div id=\"MSearchSelectWindow\"\n     onmouseover=\"return searchBox.OnSearchSelectShow()\"\n     onmouseout=\"return searchBox.OnSearchSelectHide()\"\n     onkeydown=\"return searchBox.OnSearchSelectKey(event)\">\n</div>\n\n<!-- iframe showing the search results (closed by default) -->\n<div id=\"MSearchResultsWindow\">\n<iframe src=\"javascript:void(0)\" frameborder=\"0\" \n        name=\"MSearchResults\" id=\"MSearchResults\">\n</iframe>\n</div>\n\n<div id=\"nav-path\" class=\"navpath\">\n  <ul>\n<li class=\"navelem\"><a class=\"el\" href=\"dir_bc6505cac00d7a6291dbfd9af70666b7.html\">glfw-3.3.2</a></li>  </ul>\n</div>\n</div><!-- top -->\n<div class=\"header\">\n  <div class=\"headertitle\">\n<div class=\"title\">glfw-3.3.2 Directory Reference</div>  </div>\n</div><!--header-->\n<div class=\"contents\">\n<table class=\"memberdecls\">\n<tr class=\"heading\"><td colspan=\"2\"><h2 class=\"groupheader\"><a name=\"subdirs\"></a>\nDirectories</h2></td></tr>\n<tr class=\"memitem:dir_abae1f34c5d965773b98e3c915cdaeb5\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">directory &#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"dir_abae1f34c5d965773b98e3c915cdaeb5.html\">docs</a></td></tr>\n<tr class=\"separator:\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:dir_a58ef735c5cc5a9a31d321e1abe7c42e\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">directory &#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"dir_a58ef735c5cc5a9a31d321e1abe7c42e.html\">include</a></td></tr>\n<tr class=\"separator:\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n</table>\n</div><!-- contents -->\n<address class=\"footer\">\n<p>\nLast update on Mon Jan 20 2020 for GLFW 3.3.2\n</p>\n</address>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/doxygen.css",
    "content": "/* The standard CSS for doxygen 1.8.16 */\n\nbody, table, div, p, dl {\n\tfont: 400 14px/22px Roboto,sans-serif;\n}\n\np.reference, p.definition {\n\tfont: 400 14px/22px Roboto,sans-serif;\n}\n\n/* @group Heading Levels */\n\nh1.groupheader {\n\tfont-size: 150%;\n}\n\n.title {\n\tfont: 400 14px/28px Roboto,sans-serif;\n\tfont-size: 150%;\n\tfont-weight: bold;\n\tmargin: 10px 2px;\n}\n\nh2.groupheader {\n\tborder-bottom: 1px solid #879ECB;\n\tcolor: #354C7B;\n\tfont-size: 150%;\n\tfont-weight: normal;\n\tmargin-top: 1.75em;\n\tpadding-top: 8px;\n\tpadding-bottom: 4px;\n\twidth: 100%;\n}\n\nh3.groupheader {\n\tfont-size: 100%;\n}\n\nh1, h2, h3, h4, h5, h6 {\n\t-webkit-transition: text-shadow 0.5s linear;\n\t-moz-transition: text-shadow 0.5s linear;\n\t-ms-transition: text-shadow 0.5s linear;\n\t-o-transition: text-shadow 0.5s linear;\n\ttransition: text-shadow 0.5s linear;\n\tmargin-right: 15px;\n}\n\nh1.glow, h2.glow, h3.glow, h4.glow, h5.glow, h6.glow {\n\ttext-shadow: 0 0 15px cyan;\n}\n\ndt {\n\tfont-weight: bold;\n}\n\nul.multicol {\n\t-moz-column-gap: 1em;\n\t-webkit-column-gap: 1em;\n\tcolumn-gap: 1em;\n\t-moz-column-count: 3;\n\t-webkit-column-count: 3;\n\tcolumn-count: 3;\n}\n\np.startli, p.startdd {\n\tmargin-top: 2px;\n}\n\np.starttd {\n\tmargin-top: 0px;\n}\n\np.endli {\n\tmargin-bottom: 0px;\n}\n\np.enddd {\n\tmargin-bottom: 4px;\n}\n\np.endtd {\n\tmargin-bottom: 2px;\n}\n\np.interli {\n}\n\np.interdd {\n}\n\np.intertd {\n}\n\n/* @end */\n\ncaption {\n\tfont-weight: bold;\n}\n\nspan.legend {\n        font-size: 70%;\n        text-align: center;\n}\n\nh3.version {\n        font-size: 90%;\n        text-align: center;\n}\n\ndiv.qindex, div.navtab{\n\tbackground-color: #EBEFF6;\n\tborder: 1px solid #A3B4D7;\n\ttext-align: center;\n}\n\ndiv.qindex, div.navpath {\n\twidth: 100%;\n\tline-height: 140%;\n}\n\ndiv.navtab {\n\tmargin-right: 15px;\n}\n\n/* @group Link Styling */\n\na {\n\tcolor: #3D578C;\n\tfont-weight: normal;\n\ttext-decoration: none;\n}\n\n.contents a:visited {\n\tcolor: #4665A2;\n}\n\na:hover {\n\ttext-decoration: underline;\n}\n\na.qindex {\n\tfont-weight: bold;\n}\n\na.qindexHL {\n\tfont-weight: bold;\n\tbackground-color: #9CAFD4;\n\tcolor: #FFFFFF;\n\tborder: 1px double #869DCA;\n}\n\n.contents a.qindexHL:visited {\n        color: #FFFFFF;\n}\n\na.el {\n\tfont-weight: bold;\n}\n\na.elRef {\n}\n\na.code, a.code:visited, a.line, a.line:visited {\n\tcolor: #4665A2; \n}\n\na.codeRef, a.codeRef:visited, a.lineRef, a.lineRef:visited {\n\tcolor: #4665A2; \n}\n\n/* @end */\n\ndl.el {\n\tmargin-left: -1cm;\n}\n\nul {\n  overflow: hidden; /*Fixed: list item bullets overlap floating elements*/\n}\n\n#side-nav ul {\n  overflow: visible; /* reset ul rule for scroll bar in GENERATE_TREEVIEW window */\n}\n\n#main-nav ul {\n  overflow: visible; /* reset ul rule for the navigation bar drop down lists */\n}\n\n.fragment {\n  text-align: left;\n  direction: ltr;\n  overflow-x: auto; /*Fixed: fragment lines overlap floating elements*/\n  overflow-y: hidden;\n}\n\npre.fragment {\n        border: 1px solid #C4CFE5;\n        background-color: #FBFCFD;\n        padding: 4px 6px;\n        margin: 4px 8px 4px 2px;\n        overflow: auto;\n        word-wrap: break-word;\n        font-size:  9pt;\n        line-height: 125%;\n        font-family: monospace, fixed;\n        font-size: 105%;\n}\n\ndiv.fragment {\n  padding: 0 0 1px 0; /*Fixed: last line underline overlap border*/\n  margin: 4px 8px 4px 2px;\n\tbackground-color: #FBFCFD;\n\tborder: 1px solid #C4CFE5;\n}\n\ndiv.line {\n\tfont-family: monospace, fixed;\n        font-size: 13px;\n\tmin-height: 13px;\n\tline-height: 1.0;\n\ttext-wrap: unrestricted;\n\twhite-space: -moz-pre-wrap; /* Moz */\n\twhite-space: -pre-wrap;     /* Opera 4-6 */\n\twhite-space: -o-pre-wrap;   /* Opera 7 */\n\twhite-space: pre-wrap;      /* CSS3  */\n\tword-wrap: break-word;      /* IE 5.5+ */\n\ttext-indent: -53px;\n\tpadding-left: 53px;\n\tpadding-bottom: 0px;\n\tmargin: 0px;\n\t-webkit-transition-property: background-color, box-shadow;\n\t-webkit-transition-duration: 0.5s;\n\t-moz-transition-property: background-color, box-shadow;\n\t-moz-transition-duration: 0.5s;\n\t-ms-transition-property: background-color, box-shadow;\n\t-ms-transition-duration: 0.5s;\n\t-o-transition-property: background-color, box-shadow;\n\t-o-transition-duration: 0.5s;\n\ttransition-property: background-color, box-shadow;\n\ttransition-duration: 0.5s;\n}\n\ndiv.line:after {\n    content:\"\\000A\";\n    white-space: pre;\n}\n\ndiv.line.glow {\n\tbackground-color: cyan;\n\tbox-shadow: 0 0 10px cyan;\n}\n\n\nspan.lineno {\n\tpadding-right: 4px;\n\ttext-align: right;\n\tborder-right: 2px solid #0F0;\n\tbackground-color: #E8E8E8;\n        white-space: pre;\n}\nspan.lineno a {\n\tbackground-color: #D8D8D8;\n}\n\nspan.lineno a:hover {\n\tbackground-color: #C8C8C8;\n}\n\n.lineno {\n\t-webkit-touch-callout: none;\n\t-webkit-user-select: none;\n\t-khtml-user-select: none;\n\t-moz-user-select: none;\n\t-ms-user-select: none;\n\tuser-select: none;\n}\n\ndiv.ah, span.ah {\n\tbackground-color: black;\n\tfont-weight: bold;\n\tcolor: #FFFFFF;\n\tmargin-bottom: 3px;\n\tmargin-top: 3px;\n\tpadding: 0.2em;\n\tborder: solid thin #333;\n\tborder-radius: 0.5em;\n\t-webkit-border-radius: .5em;\n\t-moz-border-radius: .5em;\n\tbox-shadow: 2px 2px 3px #999;\n\t-webkit-box-shadow: 2px 2px 3px #999;\n\t-moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px;\n\tbackground-image: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#000),color-stop(0.3, #444));\n\tbackground-image: -moz-linear-gradient(center top, #eee 0%, #444 40%, #000 110%);\n}\n\ndiv.classindex ul {\n        list-style: none;\n        padding-left: 0;\n}\n\ndiv.classindex span.ai {\n        display: inline-block;\n}\n\ndiv.groupHeader {\n\tmargin-left: 16px;\n\tmargin-top: 12px;\n\tfont-weight: bold;\n}\n\ndiv.groupText {\n\tmargin-left: 16px;\n\tfont-style: italic;\n}\n\nbody {\n\tbackground-color: white;\n\tcolor: black;\n        margin: 0;\n}\n\ndiv.contents {\n\tmargin-top: 10px;\n\tmargin-left: 12px;\n\tmargin-right: 8px;\n}\n\ntd.indexkey {\n\tbackground-color: #EBEFF6;\n\tfont-weight: bold;\n\tborder: 1px solid #C4CFE5;\n\tmargin: 2px 0px 2px 0;\n\tpadding: 2px 10px;\n        white-space: nowrap;\n        vertical-align: top;\n}\n\ntd.indexvalue {\n\tbackground-color: #EBEFF6;\n\tborder: 1px solid #C4CFE5;\n\tpadding: 2px 10px;\n\tmargin: 2px 0px;\n}\n\ntr.memlist {\n\tbackground-color: #EEF1F7;\n}\n\np.formulaDsp {\n\ttext-align: center;\n}\n\nimg.formulaDsp {\n\t\n}\n\nimg.formulaInl, img.inline {\n\tvertical-align: middle;\n}\n\ndiv.center {\n\ttext-align: center;\n        margin-top: 0px;\n        margin-bottom: 0px;\n        padding: 0px;\n}\n\ndiv.center img {\n\tborder: 0px;\n}\n\naddress.footer {\n\ttext-align: right;\n\tpadding-right: 12px;\n}\n\nimg.footer {\n\tborder: 0px;\n\tvertical-align: middle;\n}\n\n/* @group Code Colorization */\n\nspan.keyword {\n\tcolor: #008000\n}\n\nspan.keywordtype {\n\tcolor: #604020\n}\n\nspan.keywordflow {\n\tcolor: #e08000\n}\n\nspan.comment {\n\tcolor: #800000\n}\n\nspan.preprocessor {\n\tcolor: #806020\n}\n\nspan.stringliteral {\n\tcolor: #002080\n}\n\nspan.charliteral {\n\tcolor: #008080\n}\n\nspan.vhdldigit { \n\tcolor: #ff00ff \n}\n\nspan.vhdlchar { \n\tcolor: #000000 \n}\n\nspan.vhdlkeyword { \n\tcolor: #700070 \n}\n\nspan.vhdllogic { \n\tcolor: #ff0000 \n}\n\nblockquote {\n        background-color: #F7F8FB;\n        border-left: 2px solid #9CAFD4;\n        margin: 0 24px 0 4px;\n        padding: 0 12px 0 16px;\n}\n\nblockquote.DocNodeRTL {\n   border-left: 0;\n   border-right: 2px solid #9CAFD4;\n   margin: 0 4px 0 24px;\n   padding: 0 16px 0 12px;\n}\n\n/* @end */\n\n/*\n.search {\n\tcolor: #003399;\n\tfont-weight: bold;\n}\n\nform.search {\n\tmargin-bottom: 0px;\n\tmargin-top: 0px;\n}\n\ninput.search {\n\tfont-size: 75%;\n\tcolor: #000080;\n\tfont-weight: normal;\n\tbackground-color: #e8eef2;\n}\n*/\n\ntd.tiny {\n\tfont-size: 75%;\n}\n\n.dirtab {\n\tpadding: 4px;\n\tborder-collapse: collapse;\n\tborder: 1px solid #A3B4D7;\n}\n\nth.dirtab {\n\tbackground: #EBEFF6;\n\tfont-weight: bold;\n}\n\nhr {\n\theight: 0px;\n\tborder: none;\n\tborder-top: 1px solid #4A6AAA;\n}\n\nhr.footer {\n\theight: 1px;\n}\n\n/* @group Member Descriptions */\n\ntable.memberdecls {\n\tborder-spacing: 0px;\n\tpadding: 0px;\n}\n\n.memberdecls td, .fieldtable tr {\n\t-webkit-transition-property: background-color, box-shadow;\n\t-webkit-transition-duration: 0.5s;\n\t-moz-transition-property: background-color, box-shadow;\n\t-moz-transition-duration: 0.5s;\n\t-ms-transition-property: background-color, box-shadow;\n\t-ms-transition-duration: 0.5s;\n\t-o-transition-property: background-color, box-shadow;\n\t-o-transition-duration: 0.5s;\n\ttransition-property: background-color, box-shadow;\n\ttransition-duration: 0.5s;\n}\n\n.memberdecls td.glow, .fieldtable tr.glow {\n\tbackground-color: cyan;\n\tbox-shadow: 0 0 15px cyan;\n}\n\n.mdescLeft, .mdescRight,\n.memItemLeft, .memItemRight,\n.memTemplItemLeft, .memTemplItemRight, .memTemplParams {\n\tbackground-color: #F9FAFC;\n\tborder: none;\n\tmargin: 4px;\n\tpadding: 1px 0 0 8px;\n}\n\n.mdescLeft, .mdescRight {\n\tpadding: 0px 8px 4px 8px;\n\tcolor: #555;\n}\n\n.memSeparator {\n        border-bottom: 1px solid #DEE4F0;\n        line-height: 1px;\n        margin: 0px;\n        padding: 0px;\n}\n\n.memItemLeft, .memTemplItemLeft {\n        white-space: nowrap;\n}\n\n.memItemRight {\n\twidth: 100%;\n}\n\n.memTemplParams {\n\tcolor: #4665A2;\n        white-space: nowrap;\n\tfont-size: 80%;\n}\n\n/* @end */\n\n/* @group Member Details */\n\n/* Styles for detailed member documentation */\n\n.memtitle {\n\tpadding: 8px;\n\tborder-top: 1px solid #A8B8D9;\n\tborder-left: 1px solid #A8B8D9;\n\tborder-right: 1px solid #A8B8D9;\n\tborder-top-right-radius: 4px;\n\tborder-top-left-radius: 4px;\n\tmargin-bottom: -1px;\n\tbackground-image: url('nav_f.png');\n\tbackground-repeat: repeat-x;\n\tbackground-color: #E2E8F2;\n\tline-height: 1.25;\n\tfont-weight: 300;\n\tfloat:left;\n}\n\n.permalink\n{\n        font-size: 65%;\n        display: inline-block;\n        vertical-align: middle;\n}\n\n.memtemplate {\n\tfont-size: 80%;\n\tcolor: #4665A2;\n\tfont-weight: normal;\n\tmargin-left: 9px;\n}\n\n.memnav {\n\tbackground-color: #EBEFF6;\n\tborder: 1px solid #A3B4D7;\n\ttext-align: center;\n\tmargin: 2px;\n\tmargin-right: 15px;\n\tpadding: 2px;\n}\n\n.mempage {\n\twidth: 100%;\n}\n\n.memitem {\n\tpadding: 0;\n\tmargin-bottom: 10px;\n\tmargin-right: 5px;\n        -webkit-transition: box-shadow 0.5s linear;\n        -moz-transition: box-shadow 0.5s linear;\n        -ms-transition: box-shadow 0.5s linear;\n        -o-transition: box-shadow 0.5s linear;\n        transition: box-shadow 0.5s linear;\n        display: table !important;\n        width: 100%;\n}\n\n.memitem.glow {\n         box-shadow: 0 0 15px cyan;\n}\n\n.memname {\n        font-weight: 400;\n        margin-left: 6px;\n}\n\n.memname td {\n\tvertical-align: bottom;\n}\n\n.memproto, dl.reflist dt {\n        border-top: 1px solid #A8B8D9;\n        border-left: 1px solid #A8B8D9;\n        border-right: 1px solid #A8B8D9;\n        padding: 6px 0px 6px 0px;\n        color: #253555;\n        font-weight: bold;\n        text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9);\n        background-color: #DFE5F1;\n        /* opera specific markup */\n        box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);\n        border-top-right-radius: 4px;\n        /* firefox specific markup */\n        -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px;\n        -moz-border-radius-topright: 4px;\n        /* webkit specific markup */\n        -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);\n        -webkit-border-top-right-radius: 4px;\n\n}\n\n.overload {\n        font-family: \"courier new\",courier,monospace;\n\tfont-size: 65%;\n}\n\n.memdoc, dl.reflist dd {\n        border-bottom: 1px solid #A8B8D9;      \n        border-left: 1px solid #A8B8D9;      \n        border-right: 1px solid #A8B8D9; \n        padding: 6px 10px 2px 10px;\n        background-color: #FBFCFD;\n        border-top-width: 0;\n        background-image:url('nav_g.png');\n        background-repeat:repeat-x;\n        background-color: #FFFFFF;\n        /* opera specific markup */\n        border-bottom-left-radius: 4px;\n        border-bottom-right-radius: 4px;\n        box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);\n        /* firefox specific markup */\n        -moz-border-radius-bottomleft: 4px;\n        -moz-border-radius-bottomright: 4px;\n        -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px;\n        /* webkit specific markup */\n        -webkit-border-bottom-left-radius: 4px;\n        -webkit-border-bottom-right-radius: 4px;\n        -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);\n}\n\ndl.reflist dt {\n        padding: 5px;\n}\n\ndl.reflist dd {\n        margin: 0px 0px 10px 0px;\n        padding: 5px;\n}\n\n.paramkey {\n\ttext-align: right;\n}\n\n.paramtype {\n\twhite-space: nowrap;\n}\n\n.paramname {\n\tcolor: #602020;\n\twhite-space: nowrap;\n}\n.paramname em {\n\tfont-style: normal;\n}\n.paramname code {\n        line-height: 14px;\n}\n\n.params, .retval, .exception, .tparams {\n        margin-left: 0px;\n        padding-left: 0px;\n}       \n\n.params .paramname, .retval .paramname, .tparams .paramname, .exception .paramname {\n        font-weight: bold;\n        vertical-align: top;\n}\n        \n.params .paramtype, .tparams .paramtype {\n        font-style: italic;\n        vertical-align: top;\n}       \n        \n.params .paramdir, .tparams .paramdir {\n        font-family: \"courier new\",courier,monospace;\n        vertical-align: top;\n}\n\ntable.mlabels {\n\tborder-spacing: 0px;\n}\n\ntd.mlabels-left {\n\twidth: 100%;\n\tpadding: 0px;\n}\n\ntd.mlabels-right {\n\tvertical-align: bottom;\n\tpadding: 0px;\n\twhite-space: nowrap;\n}\n\nspan.mlabels {\n        margin-left: 8px;\n}\n\nspan.mlabel {\n        background-color: #728DC1;\n        border-top:1px solid #5373B4;\n        border-left:1px solid #5373B4;\n        border-right:1px solid #C4CFE5;\n        border-bottom:1px solid #C4CFE5;\n\ttext-shadow: none;\n\tcolor: white;\n\tmargin-right: 4px;\n\tpadding: 2px 3px;\n\tborder-radius: 3px;\n\tfont-size: 7pt;\n\twhite-space: nowrap;\n\tvertical-align: middle;\n}\n\n\n\n/* @end */\n\n/* these are for tree view inside a (index) page */\n\ndiv.directory {\n        margin: 10px 0px;\n        border-top: 1px solid #9CAFD4;\n        border-bottom: 1px solid #9CAFD4;\n        width: 100%;\n}\n\n.directory table {\n        border-collapse:collapse;\n}\n\n.directory td {\n        margin: 0px;\n        padding: 0px;\n\tvertical-align: top;\n}\n\n.directory td.entry {\n        white-space: nowrap;\n        padding-right: 6px;\n\tpadding-top: 3px;\n}\n\n.directory td.entry a {\n        outline:none;\n}\n\n.directory td.entry a img {\n        border: none;\n}\n\n.directory td.desc {\n        width: 100%;\n        padding-left: 6px;\n\tpadding-right: 6px;\n\tpadding-top: 3px;\n\tborder-left: 1px solid rgba(0,0,0,0.05);\n}\n\n.directory tr.even {\n\tpadding-left: 6px;\n\tbackground-color: #F7F8FB;\n}\n\n.directory img {\n\tvertical-align: -30%;\n}\n\n.directory .levels {\n        white-space: nowrap;\n        width: 100%;\n        text-align: right;\n        font-size: 9pt;\n}\n\n.directory .levels span {\n        cursor: pointer;\n        padding-left: 2px;\n        padding-right: 2px;\n\tcolor: #3D578C;\n}\n\n.arrow {\n    color: #9CAFD4;\n    -webkit-user-select: none;\n    -khtml-user-select: none;\n    -moz-user-select: none;\n    -ms-user-select: none;\n    user-select: none;\n    cursor: pointer;\n    font-size: 80%;\n    display: inline-block;\n    width: 16px;\n    height: 22px;\n}\n\n.icon {\n    font-family: Arial, Helvetica;\n    font-weight: bold;\n    font-size: 12px;\n    height: 14px;\n    width: 16px;\n    display: inline-block;\n    background-color: #728DC1;\n    color: white;\n    text-align: center;\n    border-radius: 4px;\n    margin-left: 2px;\n    margin-right: 2px;\n}\n\n.icona {\n    width: 24px;\n    height: 22px;\n    display: inline-block;\n}\n\n.iconfopen {\n    width: 24px;\n    height: 18px;\n    margin-bottom: 4px;\n    background-image:url('folderopen.png');\n    background-position: 0px -4px;\n    background-repeat: repeat-y;\n    vertical-align:top;\n    display: inline-block;\n}\n\n.iconfclosed {\n    width: 24px;\n    height: 18px;\n    margin-bottom: 4px;\n    background-image:url('folderclosed.png');\n    background-position: 0px -4px;\n    background-repeat: repeat-y;\n    vertical-align:top;\n    display: inline-block;\n}\n\n.icondoc {\n    width: 24px;\n    height: 18px;\n    margin-bottom: 4px;\n    background-image:url('doc.png');\n    background-position: 0px -4px;\n    background-repeat: repeat-y;\n    vertical-align:top;\n    display: inline-block;\n}\n\ntable.directory {\n    font: 400 14px Roboto,sans-serif;\n}\n\n/* @end */\n\ndiv.dynheader {\n        margin-top: 8px;\n\t-webkit-touch-callout: none;\n\t-webkit-user-select: none;\n\t-khtml-user-select: none;\n\t-moz-user-select: none;\n\t-ms-user-select: none;\n\tuser-select: none;\n}\n\naddress {\n\tfont-style: normal;\n\tcolor: #2A3D61;\n}\n\ntable.doxtable caption {\n\tcaption-side: top;\n}\n\ntable.doxtable {\n\tborder-collapse:collapse;\n        margin-top: 4px;\n        margin-bottom: 4px;\n}\n\ntable.doxtable td, table.doxtable th {\n\tborder: 1px solid #2D4068;\n\tpadding: 3px 7px 2px;\n}\n\ntable.doxtable th {\n\tbackground-color: #374F7F;\n\tcolor: #FFFFFF;\n\tfont-size: 110%;\n\tpadding-bottom: 4px;\n\tpadding-top: 5px;\n}\n\ntable.fieldtable {\n        /*width: 100%;*/\n        margin-bottom: 10px;\n        border: 1px solid #A8B8D9;\n        border-spacing: 0px;\n        -moz-border-radius: 4px;\n        -webkit-border-radius: 4px;\n        border-radius: 4px;\n        -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px;\n        -webkit-box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15);\n        box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15);\n}\n\n.fieldtable td, .fieldtable th {\n        padding: 3px 7px 2px;\n}\n\n.fieldtable td.fieldtype, .fieldtable td.fieldname {\n        white-space: nowrap;\n        border-right: 1px solid #A8B8D9;\n        border-bottom: 1px solid #A8B8D9;\n        vertical-align: top;\n}\n\n.fieldtable td.fieldname {\n        padding-top: 3px;\n}\n\n.fieldtable td.fielddoc {\n        border-bottom: 1px solid #A8B8D9;\n        /*width: 100%;*/\n}\n\n.fieldtable td.fielddoc p:first-child {\n        margin-top: 0px;\n}       \n        \n.fieldtable td.fielddoc p:last-child {\n        margin-bottom: 2px;\n}\n\n.fieldtable tr:last-child td {\n        border-bottom: none;\n}\n\n.fieldtable th {\n        background-image:url('nav_f.png');\n        background-repeat:repeat-x;\n        background-color: #E2E8F2;\n        font-size: 90%;\n        color: #253555;\n        padding-bottom: 4px;\n        padding-top: 5px;\n        text-align:left;\n        font-weight: 400;\n        -moz-border-radius-topleft: 4px;\n        -moz-border-radius-topright: 4px;\n        -webkit-border-top-left-radius: 4px;\n        -webkit-border-top-right-radius: 4px;\n        border-top-left-radius: 4px;\n        border-top-right-radius: 4px;\n        border-bottom: 1px solid #A8B8D9;\n}\n\n\n.tabsearch {\n\ttop: 0px;\n\tleft: 10px;\n\theight: 36px;\n\tbackground-image: url('tab_b.png');\n\tz-index: 101;\n\toverflow: hidden;\n\tfont-size: 13px;\n}\n\n.navpath ul\n{\n\tfont-size: 11px;\n\tbackground-image:url('tab_b.png');\n\tbackground-repeat:repeat-x;\n\tbackground-position: 0 -5px;\n\theight:30px;\n\tline-height:30px;\n\tcolor:#8AA0CC;\n\tborder:solid 1px #C2CDE4;\n\toverflow:hidden;\n\tmargin:0px;\n\tpadding:0px;\n}\n\n.navpath li\n{\n\tlist-style-type:none;\n\tfloat:left;\n\tpadding-left:10px;\n\tpadding-right:15px;\n\tbackground-image:url('bc_s.png');\n\tbackground-repeat:no-repeat;\n\tbackground-position:right;\n\tcolor:#364D7C;\n}\n\n.navpath li.navelem a\n{\n\theight:32px;\n\tdisplay:block;\n\ttext-decoration: none;\n\toutline: none;\n\tcolor: #283A5D;\n\tfont-family: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif;\n\ttext-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9);\n\ttext-decoration: none;        \n}\n\n.navpath li.navelem a:hover\n{\n\tcolor:#6884BD;\n}\n\n.navpath li.footer\n{\n        list-style-type:none;\n        float:right;\n        padding-left:10px;\n        padding-right:15px;\n        background-image:none;\n        background-repeat:no-repeat;\n        background-position:right;\n        color:#364D7C;\n        font-size: 8pt;\n}\n\n\ndiv.summary\n{\n\tfloat: right;\n\tfont-size: 8pt;\n\tpadding-right: 5px;\n\twidth: 50%;\n\ttext-align: right;\n}       \n\ndiv.summary a\n{\n\twhite-space: nowrap;\n}\n\ntable.classindex\n{\n        margin: 10px;\n        white-space: nowrap;\n        margin-left: 3%;\n        margin-right: 3%;\n        width: 94%;\n        border: 0;\n        border-spacing: 0; \n        padding: 0;\n}\n\ndiv.ingroups\n{\n\tfont-size: 8pt;\n\twidth: 50%;\n\ttext-align: left;\n}\n\ndiv.ingroups a\n{\n\twhite-space: nowrap;\n}\n\ndiv.header\n{\n        background-image:url('nav_h.png');\n        background-repeat:repeat-x;\n\tbackground-color: #F9FAFC;\n\tmargin:  0px;\n\tborder-bottom: 1px solid #C4CFE5;\n}\n\ndiv.headertitle\n{\n\tpadding: 5px 5px 5px 10px;\n}\n\n.PageDocRTL-title div.headertitle {\n  text-align: right;\n  direction: rtl;\n}\n\ndl {\n        padding: 0 0 0 0;\n}\n\n/* dl.note, dl.warning, dl.attention, dl.pre, dl.post, dl.invariant, dl.deprecated, dl.todo, dl.test, dl.bug, dl.examples */\ndl.section {\n\tmargin-left: 0px;\n\tpadding-left: 0px;\n}\n\ndl.section.DocNodeRTL {\n  margin-right: 0px;\n  padding-right: 0px;\n}\n\ndl.note {\n  margin-left: -7px;\n  padding-left: 3px;\n  border-left: 4px solid;\n  border-color: #D0C000;\n}\n\ndl.note.DocNodeRTL {\n  margin-left: 0;\n  padding-left: 0;\n  border-left: 0;\n  margin-right: -7px;\n  padding-right: 3px;\n  border-right: 4px solid;\n  border-color: #D0C000;\n}\n\ndl.warning, dl.attention {\n  margin-left: -7px;\n  padding-left: 3px;\n  border-left: 4px solid;\n  border-color: #FF0000;\n}\n\ndl.warning.DocNodeRTL, dl.attention.DocNodeRTL {\n  margin-left: 0;\n  padding-left: 0;\n  border-left: 0;\n  margin-right: -7px;\n  padding-right: 3px;\n  border-right: 4px solid;\n  border-color: #FF0000;\n}\n\ndl.pre, dl.post, dl.invariant {\n  margin-left: -7px;\n  padding-left: 3px;\n  border-left: 4px solid;\n  border-color: #00D000;\n}\n\ndl.pre.DocNodeRTL, dl.post.DocNodeRTL, dl.invariant.DocNodeRTL {\n  margin-left: 0;\n  padding-left: 0;\n  border-left: 0;\n  margin-right: -7px;\n  padding-right: 3px;\n  border-right: 4px solid;\n  border-color: #00D000;\n}\n\ndl.deprecated {\n  margin-left: -7px;\n  padding-left: 3px;\n  border-left: 4px solid;\n  border-color: #505050;\n}\n\ndl.deprecated.DocNodeRTL {\n  margin-left: 0;\n  padding-left: 0;\n  border-left: 0;\n  margin-right: -7px;\n  padding-right: 3px;\n  border-right: 4px solid;\n  border-color: #505050;\n}\n\ndl.todo {\n  margin-left: -7px;\n  padding-left: 3px;\n  border-left: 4px solid;\n  border-color: #00C0E0;\n}\n\ndl.todo.DocNodeRTL {\n  margin-left: 0;\n  padding-left: 0;\n  border-left: 0;\n  margin-right: -7px;\n  padding-right: 3px;\n  border-right: 4px solid;\n  border-color: #00C0E0;\n}\n\ndl.test {\n  margin-left: -7px;\n  padding-left: 3px;\n  border-left: 4px solid;\n  border-color: #3030E0;\n}\n\ndl.test.DocNodeRTL {\n  margin-left: 0;\n  padding-left: 0;\n  border-left: 0;\n  margin-right: -7px;\n  padding-right: 3px;\n  border-right: 4px solid;\n  border-color: #3030E0;\n}\n\ndl.bug {\n  margin-left: -7px;\n  padding-left: 3px;\n  border-left: 4px solid;\n  border-color: #C08050;\n}\n\ndl.bug.DocNodeRTL {\n  margin-left: 0;\n  padding-left: 0;\n  border-left: 0;\n  margin-right: -7px;\n  padding-right: 3px;\n  border-right: 4px solid;\n  border-color: #C08050;\n}\n\ndl.section dd {\n\tmargin-bottom: 6px;\n}\n\n\n#projectlogo\n{\n\ttext-align: center;\n\tvertical-align: bottom;\n\tborder-collapse: separate;\n}\n \n#projectlogo img\n{ \n\tborder: 0px none;\n}\n \n#projectalign\n{\n        vertical-align: middle;\n}\n\n#projectname\n{\n\tfont: 300% Tahoma, Arial,sans-serif;\n\tmargin: 0px;\n\tpadding: 2px 0px;\n}\n    \n#projectbrief\n{\n\tfont: 120% Tahoma, Arial,sans-serif;\n\tmargin: 0px;\n\tpadding: 0px;\n}\n\n#projectnumber\n{\n\tfont: 50% Tahoma, Arial,sans-serif;\n\tmargin: 0px;\n\tpadding: 0px;\n}\n\n#titlearea\n{\n\tpadding: 0px;\n\tmargin: 0px;\n\twidth: 100%;\n\tborder-bottom: 1px solid #5373B4;\n}\n\n.image\n{\n        text-align: center;\n}\n\n.dotgraph\n{\n        text-align: center;\n}\n\n.mscgraph\n{\n        text-align: center;\n}\n\n.plantumlgraph\n{\n        text-align: center;\n}\n\n.diagraph\n{\n        text-align: center;\n}\n\n.caption\n{\n\tfont-weight: bold;\n}\n\ndiv.zoom\n{\n\tborder: 1px solid #90A5CE;\n}\n\ndl.citelist {\n        margin-bottom:50px;\n}\n\ndl.citelist dt {\n        color:#334975;\n        float:left;\n        font-weight:bold;\n        margin-right:10px;\n        padding:5px;\n}\n\ndl.citelist dd {\n        margin:2px 0;\n        padding:5px 0;\n}\n\ndiv.toc {\n        padding: 14px 25px;\n        background-color: #F4F6FA;\n        border: 1px solid #D8DFEE;\n        border-radius: 7px 7px 7px 7px;\n        float: right;\n        height: auto;\n        margin: 0 8px 10px 10px;\n        width: 200px;\n}\n\n.PageDocRTL-title div.toc {\n  float: left !important;\n  text-align: right;\n}\n\ndiv.toc li {\n        background: url(\"bdwn.png\") no-repeat scroll 0 5px transparent;\n        font: 10px/1.2 Verdana,DejaVu Sans,Geneva,sans-serif;\n        margin-top: 5px;\n        padding-left: 10px;\n        padding-top: 2px;\n}\n\n.PageDocRTL-title div.toc li {\n  background-position-x: right !important;\n  padding-left: 0 !important;\n  padding-right: 10px;\n}\n\ndiv.toc h3 {\n        font: bold 12px/1.2 Arial,FreeSans,sans-serif;\n\tcolor: #4665A2;\n        border-bottom: 0 none;\n        margin: 0;\n}\n\ndiv.toc ul {\n        list-style: none outside none;\n        border: medium none;\n        padding: 0px;\n}       \n\ndiv.toc li.level1 {\n        margin-left: 0px;\n}\n\ndiv.toc li.level2 {\n        margin-left: 15px;\n}\n\ndiv.toc li.level3 {\n        margin-left: 30px;\n}\n\ndiv.toc li.level4 {\n        margin-left: 45px;\n}\n\n.PageDocRTL-title div.toc li.level1 {\n  margin-left: 0 !important;\n  margin-right: 0;\n}\n\n.PageDocRTL-title div.toc li.level2 {\n  margin-left: 0 !important;\n  margin-right: 15px;\n}\n\n.PageDocRTL-title div.toc li.level3 {\n  margin-left: 0 !important;\n  margin-right: 30px;\n}\n\n.PageDocRTL-title div.toc li.level4 {\n  margin-left: 0 !important;\n  margin-right: 45px;\n}\n\n.inherit_header {\n        font-weight: bold;\n        color: gray;\n        cursor: pointer;\n\t-webkit-touch-callout: none;\n\t-webkit-user-select: none;\n\t-khtml-user-select: none;\n\t-moz-user-select: none;\n\t-ms-user-select: none;\n\tuser-select: none;\n}\n\n.inherit_header td {\n        padding: 6px 0px 2px 5px;\n}\n\n.inherit {\n        display: none;\n}\n\ntr.heading h2 {\n        margin-top: 12px;\n        margin-bottom: 4px;\n}\n\n/* tooltip related style info */\n\n.ttc {\n        position: absolute;\n        display: none;\n}\n\n#powerTip {\n\tcursor: default;\n\twhite-space: nowrap;\n\tbackground-color: white;\n\tborder: 1px solid gray;\n\tborder-radius: 4px 4px 4px 4px;\n\tbox-shadow: 1px 1px 7px gray;\n\tdisplay: none;\n\tfont-size: smaller;\n\tmax-width: 80%;\n\topacity: 0.9;\n\tpadding: 1ex 1em 1em;\n\tposition: absolute;\n\tz-index: 2147483647;\n}\n\n#powerTip div.ttdoc {\n        color: grey;\n\tfont-style: italic;\n}\n\n#powerTip div.ttname a {\n        font-weight: bold;\n}\n\n#powerTip div.ttname {\n        font-weight: bold;\n}\n\n#powerTip div.ttdeci {\n        color: #006318;\n}\n\n#powerTip div {\n        margin: 0px;\n        padding: 0px;\n        font: 12px/16px Roboto,sans-serif;\n}\n\n#powerTip:before, #powerTip:after {\n\tcontent: \"\";\n\tposition: absolute;\n\tmargin: 0px;\n}\n\n#powerTip.n:after,  #powerTip.n:before,\n#powerTip.s:after,  #powerTip.s:before,\n#powerTip.w:after,  #powerTip.w:before,\n#powerTip.e:after,  #powerTip.e:before,\n#powerTip.ne:after, #powerTip.ne:before,\n#powerTip.se:after, #powerTip.se:before,\n#powerTip.nw:after, #powerTip.nw:before,\n#powerTip.sw:after, #powerTip.sw:before {\n\tborder: solid transparent;\n\tcontent: \" \";\n\theight: 0;\n\twidth: 0;\n\tposition: absolute;\n}\n\n#powerTip.n:after,  #powerTip.s:after,\n#powerTip.w:after,  #powerTip.e:after,\n#powerTip.nw:after, #powerTip.ne:after,\n#powerTip.sw:after, #powerTip.se:after {\n\tborder-color: rgba(255, 255, 255, 0);\n}\n\n#powerTip.n:before,  #powerTip.s:before,\n#powerTip.w:before,  #powerTip.e:before,\n#powerTip.nw:before, #powerTip.ne:before,\n#powerTip.sw:before, #powerTip.se:before {\n\tborder-color: rgba(128, 128, 128, 0);\n}\n\n#powerTip.n:after,  #powerTip.n:before,\n#powerTip.ne:after, #powerTip.ne:before,\n#powerTip.nw:after, #powerTip.nw:before {\n\ttop: 100%;\n}\n\n#powerTip.n:after, #powerTip.ne:after, #powerTip.nw:after {\n\tborder-top-color: #FFFFFF;\n\tborder-width: 10px;\n\tmargin: 0px -10px;\n}\n#powerTip.n:before {\n\tborder-top-color: #808080;\n\tborder-width: 11px;\n\tmargin: 0px -11px;\n}\n#powerTip.n:after, #powerTip.n:before {\n\tleft: 50%;\n}\n\n#powerTip.nw:after, #powerTip.nw:before {\n\tright: 14px;\n}\n\n#powerTip.ne:after, #powerTip.ne:before {\n\tleft: 14px;\n}\n\n#powerTip.s:after,  #powerTip.s:before,\n#powerTip.se:after, #powerTip.se:before,\n#powerTip.sw:after, #powerTip.sw:before {\n\tbottom: 100%;\n}\n\n#powerTip.s:after, #powerTip.se:after, #powerTip.sw:after {\n\tborder-bottom-color: #FFFFFF;\n\tborder-width: 10px;\n\tmargin: 0px -10px;\n}\n\n#powerTip.s:before, #powerTip.se:before, #powerTip.sw:before {\n\tborder-bottom-color: #808080;\n\tborder-width: 11px;\n\tmargin: 0px -11px;\n}\n\n#powerTip.s:after, #powerTip.s:before {\n\tleft: 50%;\n}\n\n#powerTip.sw:after, #powerTip.sw:before {\n\tright: 14px;\n}\n\n#powerTip.se:after, #powerTip.se:before {\n\tleft: 14px;\n}\n\n#powerTip.e:after, #powerTip.e:before {\n\tleft: 100%;\n}\n#powerTip.e:after {\n\tborder-left-color: #FFFFFF;\n\tborder-width: 10px;\n\ttop: 50%;\n\tmargin-top: -10px;\n}\n#powerTip.e:before {\n\tborder-left-color: #808080;\n\tborder-width: 11px;\n\ttop: 50%;\n\tmargin-top: -11px;\n}\n\n#powerTip.w:after, #powerTip.w:before {\n\tright: 100%;\n}\n#powerTip.w:after {\n\tborder-right-color: #FFFFFF;\n\tborder-width: 10px;\n\ttop: 50%;\n\tmargin-top: -10px;\n}\n#powerTip.w:before {\n\tborder-right-color: #808080;\n\tborder-width: 11px;\n\ttop: 50%;\n\tmargin-top: -11px;\n}\n\n@media print\n{\n  #top { display: none; }\n  #side-nav { display: none; }\n  #nav-path { display: none; }\n  body { overflow:visible; }\n  h1, h2, h3, h4, h5, h6 { page-break-after: avoid; }\n  .summary { display: none; }\n  .memitem { page-break-inside: avoid; }\n  #doc-content\n  {\n    margin-left:0 !important;\n    height:auto !important;\n    width:auto !important;\n    overflow:inherit;\n    display:inline;\n  }\n}\n\n/* @group Markdown */\n\n/*\ntable.markdownTable {\n\tborder-collapse:collapse;\n        margin-top: 4px;\n        margin-bottom: 4px;\n}\n\ntable.markdownTable td, table.markdownTable th {\n\tborder: 1px solid #2D4068;\n\tpadding: 3px 7px 2px;\n}\n\ntable.markdownTableHead tr {\n}\n\ntable.markdownTableBodyLeft td, table.markdownTable th {\n\tborder: 1px solid #2D4068;\n\tpadding: 3px 7px 2px;\n}\n\nth.markdownTableHeadLeft th.markdownTableHeadRight th.markdownTableHeadCenter th.markdownTableHeadNone {\n\tbackground-color: #374F7F;\n\tcolor: #FFFFFF;\n\tfont-size: 110%;\n\tpadding-bottom: 4px;\n\tpadding-top: 5px;\n}\n\nth.markdownTableHeadLeft {\n\ttext-align: left\n}\n\nth.markdownTableHeadRight {\n\ttext-align: right\n}\n\nth.markdownTableHeadCenter {\n\ttext-align: center\n}\n*/\n\ntable.markdownTable {\n\tborder-collapse:collapse;\n        margin-top: 4px;\n        margin-bottom: 4px;\n}\n\ntable.markdownTable td, table.markdownTable th {\n\tborder: 1px solid #2D4068;\n\tpadding: 3px 7px 2px;\n}\n\ntable.markdownTable tr {\n}\n\nth.markdownTableHeadLeft, th.markdownTableHeadRight, th.markdownTableHeadCenter, th.markdownTableHeadNone {\n\tbackground-color: #374F7F;\n\tcolor: #FFFFFF;\n\tfont-size: 110%;\n\tpadding-bottom: 4px;\n\tpadding-top: 5px;\n}\n\nth.markdownTableHeadLeft, td.markdownTableBodyLeft {\n\ttext-align: left\n}\n\nth.markdownTableHeadRight, td.markdownTableBodyRight {\n\ttext-align: right\n}\n\nth.markdownTableHeadCenter, td.markdownTableBodyCenter {\n\ttext-align: center\n}\n\n.DocNodeRTL {\n  text-align: right;\n  direction: rtl;\n}\n\n.DocNodeLTR {\n  text-align: left;\n  direction: ltr;\n}\n\ntable.DocNodeRTL {\n   width: auto;\n   margin-right: 0;\n   margin-left: auto;\n}\n\ntable.DocNodeLTR {\n   width: auto;\n   margin-right: auto;\n   margin-left: 0;\n}\n\ntt, code, kbd, samp\n{\n  display: inline-block;\n  direction:ltr; \n}\n/* @end */\n\nu {\n\ttext-decoration: underline;\n}\n\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/dynsections.js",
    "content": "/*\n @licstart  The following is the entire license notice for the\n JavaScript code in this file.\n\n Copyright (C) 1997-2017 by Dimitri van Heesch\n\n This program is free software; you can redistribute it and/or modify\n it under the terms of the GNU General Public License as published by\n the Free Software Foundation; either version 2 of the License, or\n (at your option) any later version.\n\n This program is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n GNU General Public License for more details.\n\n You should have received a copy of the GNU General Public License along\n with this program; if not, write to the Free Software Foundation, Inc.,\n 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.\n\n @licend  The above is the entire license notice\n for the JavaScript code in this file\n */\nfunction toggleVisibility(linkObj)\n{\n var base = $(linkObj).attr('id');\n var summary = $('#'+base+'-summary');\n var content = $('#'+base+'-content');\n var trigger = $('#'+base+'-trigger');\n var src=$(trigger).attr('src');\n if (content.is(':visible')===true) {\n   content.hide();\n   summary.show();\n   $(linkObj).addClass('closed').removeClass('opened');\n   $(trigger).attr('src',src.substring(0,src.length-8)+'closed.png');\n } else {\n   content.show();\n   summary.hide();\n   $(linkObj).removeClass('closed').addClass('opened');\n   $(trigger).attr('src',src.substring(0,src.length-10)+'open.png');\n }\n return false;\n}\n\nfunction updateStripes()\n{\n  $('table.directory tr').\n       removeClass('even').filter(':visible:even').addClass('even');\n}\n\nfunction toggleLevel(level)\n{\n  $('table.directory tr').each(function() {\n    var l = this.id.split('_').length-1;\n    var i = $('#img'+this.id.substring(3));\n    var a = $('#arr'+this.id.substring(3));\n    if (l<level+1) {\n      i.removeClass('iconfopen iconfclosed').addClass('iconfopen');\n      a.html('&#9660;');\n      $(this).show();\n    } else if (l==level+1) {\n      i.removeClass('iconfclosed iconfopen').addClass('iconfclosed');\n      a.html('&#9658;');\n      $(this).show();\n    } else {\n      $(this).hide();\n    }\n  });\n  updateStripes();\n}\n\nfunction toggleFolder(id)\n{\n  // the clicked row\n  var currentRow = $('#row_'+id);\n\n  // all rows after the clicked row\n  var rows = currentRow.nextAll(\"tr\");\n\n  var re = new RegExp('^row_'+id+'\\\\d+_$', \"i\"); //only one sub\n\n  // only match elements AFTER this one (can't hide elements before)\n  var childRows = rows.filter(function() { return this.id.match(re); });\n\n  // first row is visible we are HIDING\n  if (childRows.filter(':first').is(':visible')===true) {\n    // replace down arrow by right arrow for current row\n    var currentRowSpans = currentRow.find(\"span\");\n    currentRowSpans.filter(\".iconfopen\").removeClass(\"iconfopen\").addClass(\"iconfclosed\");\n    currentRowSpans.filter(\".arrow\").html('&#9658;');\n    rows.filter(\"[id^=row_\"+id+\"]\").hide(); // hide all children\n  } else { // we are SHOWING\n    // replace right arrow by down arrow for current row\n    var currentRowSpans = currentRow.find(\"span\");\n    currentRowSpans.filter(\".iconfclosed\").removeClass(\"iconfclosed\").addClass(\"iconfopen\");\n    currentRowSpans.filter(\".arrow\").html('&#9660;');\n    // replace down arrows by right arrows for child rows\n    var childRowsSpans = childRows.find(\"span\");\n    childRowsSpans.filter(\".iconfopen\").removeClass(\"iconfopen\").addClass(\"iconfclosed\");\n    childRowsSpans.filter(\".arrow\").html('&#9658;');\n    childRows.show(); //show all children\n  }\n  updateStripes();\n}\n\n\nfunction toggleInherit(id)\n{\n  var rows = $('tr.inherit.'+id);\n  var img = $('tr.inherit_header.'+id+' img');\n  var src = $(img).attr('src');\n  if (rows.filter(':first').is(':visible')===true) {\n    rows.css('display','none');\n    $(img).attr('src',src.substring(0,src.length-8)+'closed.png');\n  } else {\n    rows.css('display','table-row'); // using show() causes jump in firefox\n    $(img).attr('src',src.substring(0,src.length-10)+'open.png');\n  }\n}\n/* @license-end */\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/extra.css",
    "content": ".sm-dox,.sm-dox a,.sm-dox a:focus,.sm-dox a:active,.sm-dox a:hover,.sm-dox a.highlighted,.sm-dox ul a:hover{background:none;text-shadow:none}.sm-dox a span.sub-arrow{border-color:#f2f2f2 transparent transparent transparent}.sm-dox a span.sub-arrow:active,.sm-dox a span.sub-arrow:focus,.sm-dox a span.sub-arrow:hover,.sm-dox a:hover span.sub-arrow{border-color:#f60 transparent transparent transparent}.sm-dox ul a span.sub-arrow:active,.sm-dox ul a span.sub-arrow:focus,.sm-dox ul a span.sub-arrow:hover,.sm-dox ul a:hover span.sub-arrow{border-color:transparent transparent transparent #f60}.sm-dox ul a:hover{background:#666;text-shadow:none}.sm-dox ul.sm-nowrap a{color:#4d4d4d;text-shadow:none}#main-nav,#main-menu,#main-menu a,#main-menu a:visited,#main-menu a:hover,#main-menu li,.memdoc,dl.reflist dd,div.toc li,.ah,span.lineno,span.lineno a,span.lineno a:hover,.note code,.pre code,.post code,.invariant code,.warning code,.attention code,.deprecated code,.bug code,.todo code,.test code,.doxtable code,.markdownTable code{background:none}#titlearea,.footer,.contents,div.header,.memdoc,table.doxtable td,table.doxtable th,table.markdownTable td,table.markdownTable th,hr,.memSeparator{border:none}#main-menu a,#main-menu a:visited,#main-menu a:hover,#main-menu li,.reflist dt a.el,.levels span,.directory .levels span{text-shadow:none}.memdoc,dl.reflist dd{box-shadow:none}div.headertitle,.note code,.pre code,.post code,.invariant code,.warning code,.attention code,.deprecated code,.bug code,.todo code,.test code,table.doxtable code,table.markdownTable code{padding:0}#nav-path,.directory .levels,span.lineno{display:none}html,#titlearea,.footer,tr.even,.directory tr.even,.doxtable tr:nth-child(even),tr.markdownTableBody:nth-child(even),.mdescLeft,.mdescRight,.memItemLeft,.memItemRight,code,.markdownTableRowEven{background:#f2f2f2}body{color:#4d4d4d}h1,h2,h2.groupheader,h3,div.toc h3,h4,h5,h6,strong,em{color:#1a1a1a;border-bottom:none}h1{padding-top:0.5em;font-size:180%}h2{padding-top:0.5em;margin-bottom:0;font-size:140%}h3{padding-top:0.5em;margin-bottom:0;font-size:110%}.glfwheader{font-size:16px;height:64px;max-width:920px;min-width:800px;padding:0 32px;margin:0 auto}#glfwhome{line-height:64px;padding-right:48px;color:#666;font-size:2.5em;background:url(\"https://www.glfw.org/css/arrow.png\") no-repeat right}.glfwnavbar{list-style-type:none;margin:0 auto;float:right}#glfwhome,.glfwnavbar li{float:left}.glfwnavbar a,.glfwnavbar a:visited{line-height:64px;margin-left:2em;display:block;color:#666}#glfwhome,.glfwnavbar a,.glfwnavbar a:visited{transition:.35s ease}#titlearea,.footer{color:#666}address.footer{text-align:center;padding:2em;margin-top:3em}#top{background:#666}#main-nav{max-width:960px;min-width:800px;margin:0 auto;font-size:13px}#main-menu{max-width:920px;min-width:800px;margin:0 auto;font-size:13px}.memtitle{display:none}.memproto,.memname{font-weight:bold;text-shadow:none}#main-menu{height:36px;display:block;position:relative}#main-menu a,#main-menu a:visited,#main-menu a:hover,#main-menu li{color:#f2f2f2}#main-menu li ul.sm-nowrap li a{color:#4d4d4d}#main-menu li ul.sm-nowrap li a:hover{color:#f60}.contents{min-height:590px}div.contents,div.header{max-width:920px;margin:0 auto;padding:0 32px;background:#fff none}table.doxtable th,table.markdownTable th,dl.reflist dt{background:linear-gradient(to bottom, #ffa733 0, #f60 100%);box-shadow:inset 0 0 32px #f60;text-shadow:0 -1px 1px #b34700;text-align:left;color:#fff}dl.reflist dt a.el{color:#f60;padding:.2em;border-radius:4px;background-color:#ffe0cc}div.toc{float:none;width:auto}div.toc h3{font-size:1.17em}div.toc ul{padding-left:1.5em}div.toc li{font-size:1em;padding-left:0;list-style-type:disc}div.toc,.memproto,div.qindex,div.ah{background:linear-gradient(to bottom, #f2f2f2 0, #e6e6e6 100%);box-shadow:inset 0 0 32px #e6e6e6;text-shadow:0 1px 1px #fff;color:#1a1a1a;border:2px solid #e6e6e6;border-radius:4px}.paramname{color:#803300}dl.reflist dt{border:2px solid #f60;border-top-left-radius:4px;border-top-right-radius:4px;border-bottom:none}dl.reflist dd{border:2px solid #f60;border-bottom-right-radius:4px;border-bottom-left-radius:4px;border-top:none}table.doxtable,table.markdownTable{border-collapse:inherit;border-spacing:0;border:2px solid #f60;border-radius:4px}a,a:hover,a:visited,a:visited:hover,.contents a:visited,.el,a.el:visited,#glfwhome:hover,#main-menu a:hover,span.lineno a:hover{color:#f60;text-decoration:none}div.directory{border-collapse:inherit;border-spacing:0;border:2px solid #f60;border-radius:4px}hr,.memSeparator{height:2px;background:linear-gradient(to right, #f2f2f2 0, #d9d9d9 50%, #f2f2f2 100%)}dl.note,dl.pre,dl.post,dl.invariant{background:linear-gradient(to bottom, #ddfad1 0, #cbf7ba 100%);box-shadow:inset 0 0 32px #baf5a3;color:#1e5309;border:2px solid #afe599}dl.warning,dl.attention{background:linear-gradient(to bottom, #fae8d1 0, #f7ddba 100%);box-shadow:inset 0 0 32px #f5d1a3;color:#533309;border:2px solid #e5c499}dl.deprecated,dl.bug{background:linear-gradient(to bottom, #fad1e3 0, #f7bad6 100%);box-shadow:inset 0 0 32px #f5a3c8;color:#53092a;border:2px solid #e599bb}dl.todo,dl.test{background:linear-gradient(to bottom, #d1ecfa 0, #bae3f7 100%);box-shadow:inset 0 0 32px #a3daf5;color:#093a53;border:2px solid #99cce5}dl.note,dl.pre,dl.post,dl.invariant,dl.warning,dl.attention,dl.deprecated,dl.bug,dl.todo,dl.test{border-radius:4px;padding:1em;text-shadow:0 1px 1px #fff;margin:1em 0}.note a,.pre a,.post a,.invariant a,.warning a,.attention a,.deprecated a,.bug a,.todo a,.test a,.note a:visited,.pre a:visited,.post a:visited,.invariant a:visited,.warning a:visited,.attention a:visited,.deprecated a:visited,.bug a:visited,.todo a:visited,.test a:visited{color:inherit}div.line{line-height:inherit}div.fragment,pre.fragment{background:#f2f2f2;border-radius:4px;border:none;padding:1em;overflow:auto;border-left:4px solid #ccc;margin:1em 0}.lineno a,.lineno a:visited,.line,pre.fragment{color:#4d4d4d}span.preprocessor,span.comment{color:#007899}a.code,a.code:visited{color:#e64500}span.keyword,span.keywordtype,span.keywordflow{color:#404040;font-weight:bold}span.stringliteral{color:#360099}code{padding:.1em;border-radius:4px}\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/files.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta http-equiv=\"X-UA-Compatible\" content=\"IE=9\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<title>GLFW: Files</title>\n<link href=\"tabs.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"jquery.js\"></script>\n<script type=\"text/javascript\" src=\"dynsections.js\"></script>\n<link href=\"search/search.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"search/searchdata.js\"></script>\n<script type=\"text/javascript\" src=\"search/search.js\"></script>\n<link href=\"doxygen.css\" rel=\"stylesheet\" type=\"text/css\" />\n<link href=\"extra.css\" rel=\"stylesheet\" type=\"text/css\"/>\n</head>\n<body>\n<div id=\"top\"><!-- do not remove this div, it is closed by doxygen! -->\n<div id=\"titlearea\">\n\t<div class=\"glfwheader\">\n\t\t<a href=\"https://www.glfw.org/\" id=\"glfwhome\">GLFW</a>\n\t\t<ul class=\"glfwnavbar\">\n\t\t\t<li><a href=\"https://www.glfw.org/documentation.html\">Documentation</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/download.html\">Download</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/community.html\">Community</a></li>\n\t\t</ul>\n\t</div>\n</div>\n<!-- end header part -->\n<!-- Generated by Doxygen 1.8.16 -->\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\nvar searchBox = new SearchBox(\"searchBox\", \"search\",false,'Search');\n/* @license-end */\n</script>\n<script type=\"text/javascript\" src=\"menudata.js\"></script>\n<script type=\"text/javascript\" src=\"menu.js\"></script>\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\n$(function() {\n  initMenu('',true,false,'search.php','Search');\n  $(document).ready(function() { init_search(); });\n});\n/* @license-end */</script>\n<div id=\"main-nav\"></div>\n</div><!-- top -->\n<!-- window showing the filter options -->\n<div id=\"MSearchSelectWindow\"\n     onmouseover=\"return searchBox.OnSearchSelectShow()\"\n     onmouseout=\"return searchBox.OnSearchSelectHide()\"\n     onkeydown=\"return searchBox.OnSearchSelectKey(event)\">\n</div>\n\n<!-- iframe showing the search results (closed by default) -->\n<div id=\"MSearchResultsWindow\">\n<iframe src=\"javascript:void(0)\" frameborder=\"0\" \n        name=\"MSearchResults\" id=\"MSearchResults\">\n</iframe>\n</div>\n\n<div class=\"header\">\n  <div class=\"headertitle\">\n<div class=\"title\">Files</div>  </div>\n</div><!--header-->\n<div class=\"contents\">\n<div class=\"textblock\">Here is a list of all files with brief descriptions:</div><div class=\"directory\">\n<table class=\"directory\">\n<tr id=\"row_0_\" class=\"even\"><td class=\"entry\"><span style=\"width:16px;display:inline-block;\">&#160;</span><a href=\"glfw3_8h_source.html\"><span class=\"icondoc\"></span></a><a class=\"el\" href=\"glfw3_8h.html\" target=\"_self\">glfw3.h</a></td><td class=\"desc\">The header of the GLFW 3 API </td></tr>\n<tr id=\"row_1_\"><td class=\"entry\"><span style=\"width:16px;display:inline-block;\">&#160;</span><a href=\"glfw3native_8h_source.html\"><span class=\"icondoc\"></span></a><a class=\"el\" href=\"glfw3native_8h.html\" target=\"_self\">glfw3native.h</a></td><td class=\"desc\">The header of the native access functions </td></tr>\n</table>\n</div><!-- directory -->\n</div><!-- contents -->\n<address class=\"footer\">\n<p>\nLast update on Mon Jan 20 2020 for GLFW 3.3.2\n</p>\n</address>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/glfw3_8h.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta http-equiv=\"X-UA-Compatible\" content=\"IE=9\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<title>GLFW: glfw3.h File Reference</title>\n<link href=\"tabs.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"jquery.js\"></script>\n<script type=\"text/javascript\" src=\"dynsections.js\"></script>\n<link href=\"search/search.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"search/searchdata.js\"></script>\n<script type=\"text/javascript\" src=\"search/search.js\"></script>\n<link href=\"doxygen.css\" rel=\"stylesheet\" type=\"text/css\" />\n<link href=\"extra.css\" rel=\"stylesheet\" type=\"text/css\"/>\n</head>\n<body>\n<div id=\"top\"><!-- do not remove this div, it is closed by doxygen! -->\n<div id=\"titlearea\">\n\t<div class=\"glfwheader\">\n\t\t<a href=\"https://www.glfw.org/\" id=\"glfwhome\">GLFW</a>\n\t\t<ul class=\"glfwnavbar\">\n\t\t\t<li><a href=\"https://www.glfw.org/documentation.html\">Documentation</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/download.html\">Download</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/community.html\">Community</a></li>\n\t\t</ul>\n\t</div>\n</div>\n<!-- end header part -->\n<!-- Generated by Doxygen 1.8.16 -->\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\nvar searchBox = new SearchBox(\"searchBox\", \"search\",false,'Search');\n/* @license-end */\n</script>\n<script type=\"text/javascript\" src=\"menudata.js\"></script>\n<script type=\"text/javascript\" src=\"menu.js\"></script>\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\n$(function() {\n  initMenu('',true,false,'search.php','Search');\n  $(document).ready(function() { init_search(); });\n});\n/* @license-end */</script>\n<div id=\"main-nav\"></div>\n<!-- window showing the filter options -->\n<div id=\"MSearchSelectWindow\"\n     onmouseover=\"return searchBox.OnSearchSelectShow()\"\n     onmouseout=\"return searchBox.OnSearchSelectHide()\"\n     onkeydown=\"return searchBox.OnSearchSelectKey(event)\">\n</div>\n\n<!-- iframe showing the search results (closed by default) -->\n<div id=\"MSearchResultsWindow\">\n<iframe src=\"javascript:void(0)\" frameborder=\"0\" \n        name=\"MSearchResults\" id=\"MSearchResults\">\n</iframe>\n</div>\n\n<div id=\"nav-path\" class=\"navpath\">\n  <ul>\n<li class=\"navelem\"><a class=\"el\" href=\"dir_bc6505cac00d7a6291dbfd9af70666b7.html\">glfw-3.3.2</a></li><li class=\"navelem\"><a class=\"el\" href=\"dir_a58ef735c5cc5a9a31d321e1abe7c42e.html\">include</a></li><li class=\"navelem\"><a class=\"el\" href=\"dir_15a5176d7c9cc5c407ed4f611edf0684.html\">GLFW</a></li>  </ul>\n</div>\n</div><!-- top -->\n<div class=\"header\">\n  <div class=\"summary\">\n<a href=\"#define-members\">Macros</a> &#124;\n<a href=\"#typedef-members\">Typedefs</a> &#124;\n<a href=\"#func-members\">Functions</a>  </div>\n  <div class=\"headertitle\">\n<div class=\"title\">glfw3.h File Reference</div>  </div>\n</div><!--header-->\n<div class=\"contents\">\n<a name=\"details\" id=\"details\"></a><h2 class=\"groupheader\">Description</h2>\n<div class=\"textblock\"><p>This is the header file of the GLFW 3 API. It defines all its types and declares all its functions.</p>\n<p>For more information about how to use this file, see <a class=\"el\" href=\"build_guide.html#build_include\">Including the GLFW header file</a>. </p>\n</div>\n<p><a href=\"glfw3_8h_source.html\">Go to the source code of this file.</a></p>\n<table class=\"memberdecls\">\n<tr class=\"heading\"><td colspan=\"2\"><h2 class=\"groupheader\"><a name=\"define-members\"></a>\nMacros</h2></td></tr>\n<tr class=\"memitem:a8a8538c5500308b4211844f2fb26c7b9\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"glfw3_8h.html#a8a8538c5500308b4211844f2fb26c7b9\">GLFW_APIENTRY_DEFINED</a></td></tr>\n<tr class=\"separator:a8a8538c5500308b4211844f2fb26c7b9\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga2744fbb29b5631bb28802dbe0cf36eba\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__init.html#ga2744fbb29b5631bb28802dbe0cf36eba\">GLFW_TRUE</a>&#160;&#160;&#160;1</td></tr>\n<tr class=\"memdesc:ga2744fbb29b5631bb28802dbe0cf36eba\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">One.  <a href=\"group__init.html#ga2744fbb29b5631bb28802dbe0cf36eba\">More...</a><br /></td></tr>\n<tr class=\"separator:ga2744fbb29b5631bb28802dbe0cf36eba\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gac877fe3b627d21ef3a0a23e0a73ba8c5\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__init.html#gac877fe3b627d21ef3a0a23e0a73ba8c5\">GLFW_FALSE</a>&#160;&#160;&#160;0</td></tr>\n<tr class=\"memdesc:gac877fe3b627d21ef3a0a23e0a73ba8c5\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Zero.  <a href=\"group__init.html#gac877fe3b627d21ef3a0a23e0a73ba8c5\">More...</a><br /></td></tr>\n<tr class=\"separator:gac877fe3b627d21ef3a0a23e0a73ba8c5\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gae2c0bcb7aec609e4736437554f6638fd\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__hat__state.html#gae2c0bcb7aec609e4736437554f6638fd\">GLFW_HAT_CENTERED</a>&#160;&#160;&#160;0</td></tr>\n<tr class=\"separator:gae2c0bcb7aec609e4736437554f6638fd\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga8c9720c76cd1b912738159ed74c85b36\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__hat__state.html#ga8c9720c76cd1b912738159ed74c85b36\">GLFW_HAT_UP</a>&#160;&#160;&#160;1</td></tr>\n<tr class=\"separator:ga8c9720c76cd1b912738159ed74c85b36\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga252586e3bbde75f4b0e07ad3124867f5\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__hat__state.html#ga252586e3bbde75f4b0e07ad3124867f5\">GLFW_HAT_RIGHT</a>&#160;&#160;&#160;2</td></tr>\n<tr class=\"separator:ga252586e3bbde75f4b0e07ad3124867f5\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gad60d1fd0dc85c18f2642cbae96d3deff\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__hat__state.html#gad60d1fd0dc85c18f2642cbae96d3deff\">GLFW_HAT_DOWN</a>&#160;&#160;&#160;4</td></tr>\n<tr class=\"separator:gad60d1fd0dc85c18f2642cbae96d3deff\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gac775f4b3154fdf5db93eb432ba546dff\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__hat__state.html#gac775f4b3154fdf5db93eb432ba546dff\">GLFW_HAT_LEFT</a>&#160;&#160;&#160;8</td></tr>\n<tr class=\"separator:gac775f4b3154fdf5db93eb432ba546dff\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga94aea0ae241a8b902883536c592ee693\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__hat__state.html#ga94aea0ae241a8b902883536c592ee693\">GLFW_HAT_RIGHT_UP</a>&#160;&#160;&#160;(<a class=\"el\" href=\"group__hat__state.html#ga252586e3bbde75f4b0e07ad3124867f5\">GLFW_HAT_RIGHT</a> | <a class=\"el\" href=\"group__hat__state.html#ga8c9720c76cd1b912738159ed74c85b36\">GLFW_HAT_UP</a>)</td></tr>\n<tr class=\"separator:ga94aea0ae241a8b902883536c592ee693\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gad7f0e4f52fd68d734863aaeadab3a3f5\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__hat__state.html#gad7f0e4f52fd68d734863aaeadab3a3f5\">GLFW_HAT_RIGHT_DOWN</a>&#160;&#160;&#160;(<a class=\"el\" href=\"group__hat__state.html#ga252586e3bbde75f4b0e07ad3124867f5\">GLFW_HAT_RIGHT</a> | <a class=\"el\" href=\"group__hat__state.html#gad60d1fd0dc85c18f2642cbae96d3deff\">GLFW_HAT_DOWN</a>)</td></tr>\n<tr class=\"separator:gad7f0e4f52fd68d734863aaeadab3a3f5\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga638f0e20dc5de90de21a33564e8ce129\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__hat__state.html#ga638f0e20dc5de90de21a33564e8ce129\">GLFW_HAT_LEFT_UP</a>&#160;&#160;&#160;(<a class=\"el\" href=\"group__hat__state.html#gac775f4b3154fdf5db93eb432ba546dff\">GLFW_HAT_LEFT</a>  | <a class=\"el\" href=\"group__hat__state.html#ga8c9720c76cd1b912738159ed74c85b36\">GLFW_HAT_UP</a>)</td></tr>\n<tr class=\"separator:ga638f0e20dc5de90de21a33564e8ce129\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga76c02baf1ea345fcbe3e8ff176a73e19\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__hat__state.html#ga76c02baf1ea345fcbe3e8ff176a73e19\">GLFW_HAT_LEFT_DOWN</a>&#160;&#160;&#160;(<a class=\"el\" href=\"group__hat__state.html#gac775f4b3154fdf5db93eb432ba546dff\">GLFW_HAT_LEFT</a>  | <a class=\"el\" href=\"group__hat__state.html#gad60d1fd0dc85c18f2642cbae96d3deff\">GLFW_HAT_DOWN</a>)</td></tr>\n<tr class=\"separator:ga76c02baf1ea345fcbe3e8ff176a73e19\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga99aacc875b6b27a072552631e13775c7\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga99aacc875b6b27a072552631e13775c7\">GLFW_KEY_UNKNOWN</a>&#160;&#160;&#160;-1</td></tr>\n<tr class=\"separator:ga99aacc875b6b27a072552631e13775c7\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gaddb2c23772b97fd7e26e8ee66f1ad014\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gaddb2c23772b97fd7e26e8ee66f1ad014\">GLFW_KEY_SPACE</a>&#160;&#160;&#160;32</td></tr>\n<tr class=\"separator:gaddb2c23772b97fd7e26e8ee66f1ad014\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga6059b0b048ba6980b6107fffbd3b4b24\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga6059b0b048ba6980b6107fffbd3b4b24\">GLFW_KEY_APOSTROPHE</a>&#160;&#160;&#160;39  /* ' */</td></tr>\n<tr class=\"separator:ga6059b0b048ba6980b6107fffbd3b4b24\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gab3d5d72e59d3055f494627b0a524926c\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gab3d5d72e59d3055f494627b0a524926c\">GLFW_KEY_COMMA</a>&#160;&#160;&#160;44  /* , */</td></tr>\n<tr class=\"separator:gab3d5d72e59d3055f494627b0a524926c\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gac556b360f7f6fca4b70ba0aecf313fd4\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gac556b360f7f6fca4b70ba0aecf313fd4\">GLFW_KEY_MINUS</a>&#160;&#160;&#160;45  /* - */</td></tr>\n<tr class=\"separator:gac556b360f7f6fca4b70ba0aecf313fd4\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga37e296b650eab419fc474ff69033d927\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga37e296b650eab419fc474ff69033d927\">GLFW_KEY_PERIOD</a>&#160;&#160;&#160;46  /* . */</td></tr>\n<tr class=\"separator:ga37e296b650eab419fc474ff69033d927\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gadf3d753b2d479148d711de34b83fd0db\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gadf3d753b2d479148d711de34b83fd0db\">GLFW_KEY_SLASH</a>&#160;&#160;&#160;47  /* / */</td></tr>\n<tr class=\"separator:gadf3d753b2d479148d711de34b83fd0db\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga50391730e9d7112ad4fd42d0bd1597c1\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga50391730e9d7112ad4fd42d0bd1597c1\">GLFW_KEY_0</a>&#160;&#160;&#160;48</td></tr>\n<tr class=\"separator:ga50391730e9d7112ad4fd42d0bd1597c1\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga05e4cae9ddb8d40cf6d82c8f11f2502f\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga05e4cae9ddb8d40cf6d82c8f11f2502f\">GLFW_KEY_1</a>&#160;&#160;&#160;49</td></tr>\n<tr class=\"separator:ga05e4cae9ddb8d40cf6d82c8f11f2502f\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gadc8e66b3a4c4b5c39ad1305cf852863c\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gadc8e66b3a4c4b5c39ad1305cf852863c\">GLFW_KEY_2</a>&#160;&#160;&#160;50</td></tr>\n<tr class=\"separator:gadc8e66b3a4c4b5c39ad1305cf852863c\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga812f0273fe1a981e1fa002ae73e92271\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga812f0273fe1a981e1fa002ae73e92271\">GLFW_KEY_3</a>&#160;&#160;&#160;51</td></tr>\n<tr class=\"separator:ga812f0273fe1a981e1fa002ae73e92271\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga9e14b6975a9cc8f66cdd5cb3d3861356\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga9e14b6975a9cc8f66cdd5cb3d3861356\">GLFW_KEY_4</a>&#160;&#160;&#160;52</td></tr>\n<tr class=\"separator:ga9e14b6975a9cc8f66cdd5cb3d3861356\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga4d74ddaa5d4c609993b4d4a15736c924\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga4d74ddaa5d4c609993b4d4a15736c924\">GLFW_KEY_5</a>&#160;&#160;&#160;53</td></tr>\n<tr class=\"separator:ga4d74ddaa5d4c609993b4d4a15736c924\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga9ea4ab80c313a227b14d0a7c6f810b5d\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga9ea4ab80c313a227b14d0a7c6f810b5d\">GLFW_KEY_6</a>&#160;&#160;&#160;54</td></tr>\n<tr class=\"separator:ga9ea4ab80c313a227b14d0a7c6f810b5d\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gab79b1cfae7bd630cfc4604c1f263c666\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gab79b1cfae7bd630cfc4604c1f263c666\">GLFW_KEY_7</a>&#160;&#160;&#160;55</td></tr>\n<tr class=\"separator:gab79b1cfae7bd630cfc4604c1f263c666\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gadeaa109a0f9f5afc94fe4a108e686f6f\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gadeaa109a0f9f5afc94fe4a108e686f6f\">GLFW_KEY_8</a>&#160;&#160;&#160;56</td></tr>\n<tr class=\"separator:gadeaa109a0f9f5afc94fe4a108e686f6f\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga2924cb5349ebbf97c8987f3521c44f39\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga2924cb5349ebbf97c8987f3521c44f39\">GLFW_KEY_9</a>&#160;&#160;&#160;57</td></tr>\n<tr class=\"separator:ga2924cb5349ebbf97c8987f3521c44f39\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga84233de9ee5bb3e8788a5aa07d80af7d\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga84233de9ee5bb3e8788a5aa07d80af7d\">GLFW_KEY_SEMICOLON</a>&#160;&#160;&#160;59  /* ; */</td></tr>\n<tr class=\"separator:ga84233de9ee5bb3e8788a5aa07d80af7d\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gae1a2de47240d6664423c204bdd91bd17\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gae1a2de47240d6664423c204bdd91bd17\">GLFW_KEY_EQUAL</a>&#160;&#160;&#160;61  /* = */</td></tr>\n<tr class=\"separator:gae1a2de47240d6664423c204bdd91bd17\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga03e842608e1ea323370889d33b8f70ff\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga03e842608e1ea323370889d33b8f70ff\">GLFW_KEY_A</a>&#160;&#160;&#160;65</td></tr>\n<tr class=\"separator:ga03e842608e1ea323370889d33b8f70ff\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga8e3fb647ff3aca9e8dbf14fe66332941\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga8e3fb647ff3aca9e8dbf14fe66332941\">GLFW_KEY_B</a>&#160;&#160;&#160;66</td></tr>\n<tr class=\"separator:ga8e3fb647ff3aca9e8dbf14fe66332941\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga00ccf3475d9ee2e679480d540d554669\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga00ccf3475d9ee2e679480d540d554669\">GLFW_KEY_C</a>&#160;&#160;&#160;67</td></tr>\n<tr class=\"separator:ga00ccf3475d9ee2e679480d540d554669\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga011f7cdc9a654da984a2506479606933\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga011f7cdc9a654da984a2506479606933\">GLFW_KEY_D</a>&#160;&#160;&#160;68</td></tr>\n<tr class=\"separator:ga011f7cdc9a654da984a2506479606933\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gabf48fcc3afbe69349df432b470c96ef2\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gabf48fcc3afbe69349df432b470c96ef2\">GLFW_KEY_E</a>&#160;&#160;&#160;69</td></tr>\n<tr class=\"separator:gabf48fcc3afbe69349df432b470c96ef2\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga5df402e02aca08444240058fd9b42a55\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga5df402e02aca08444240058fd9b42a55\">GLFW_KEY_F</a>&#160;&#160;&#160;70</td></tr>\n<tr class=\"separator:ga5df402e02aca08444240058fd9b42a55\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gae74ecddf7cc96104ab23989b1cdab536\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gae74ecddf7cc96104ab23989b1cdab536\">GLFW_KEY_G</a>&#160;&#160;&#160;71</td></tr>\n<tr class=\"separator:gae74ecddf7cc96104ab23989b1cdab536\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gad4cc98fc8f35f015d9e2fb94bf136076\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gad4cc98fc8f35f015d9e2fb94bf136076\">GLFW_KEY_H</a>&#160;&#160;&#160;72</td></tr>\n<tr class=\"separator:gad4cc98fc8f35f015d9e2fb94bf136076\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga274655c8bfe39742684ca393cf8ed093\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga274655c8bfe39742684ca393cf8ed093\">GLFW_KEY_I</a>&#160;&#160;&#160;73</td></tr>\n<tr class=\"separator:ga274655c8bfe39742684ca393cf8ed093\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga65ff2aedb129a3149ad9cb3e4159a75f\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga65ff2aedb129a3149ad9cb3e4159a75f\">GLFW_KEY_J</a>&#160;&#160;&#160;74</td></tr>\n<tr class=\"separator:ga65ff2aedb129a3149ad9cb3e4159a75f\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga4ae8debadf6d2a691badae0b53ea3ba0\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga4ae8debadf6d2a691badae0b53ea3ba0\">GLFW_KEY_K</a>&#160;&#160;&#160;75</td></tr>\n<tr class=\"separator:ga4ae8debadf6d2a691badae0b53ea3ba0\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gaaa8b54a13f6b1eed85ac86f82d550db2\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gaaa8b54a13f6b1eed85ac86f82d550db2\">GLFW_KEY_L</a>&#160;&#160;&#160;76</td></tr>\n<tr class=\"separator:gaaa8b54a13f6b1eed85ac86f82d550db2\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga4d7f0260c82e4ea3d6ebc7a21d6e3716\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga4d7f0260c82e4ea3d6ebc7a21d6e3716\">GLFW_KEY_M</a>&#160;&#160;&#160;77</td></tr>\n<tr class=\"separator:ga4d7f0260c82e4ea3d6ebc7a21d6e3716\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gae00856dfeb5d13aafebf59d44de5cdda\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gae00856dfeb5d13aafebf59d44de5cdda\">GLFW_KEY_N</a>&#160;&#160;&#160;78</td></tr>\n<tr class=\"separator:gae00856dfeb5d13aafebf59d44de5cdda\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gaecbbb79130df419d58dd7f09a169efe9\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gaecbbb79130df419d58dd7f09a169efe9\">GLFW_KEY_O</a>&#160;&#160;&#160;79</td></tr>\n<tr class=\"separator:gaecbbb79130df419d58dd7f09a169efe9\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga8fc15819c1094fb2afa01d84546b33e1\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga8fc15819c1094fb2afa01d84546b33e1\">GLFW_KEY_P</a>&#160;&#160;&#160;80</td></tr>\n<tr class=\"separator:ga8fc15819c1094fb2afa01d84546b33e1\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gafdd01e38b120d67cf51e348bb47f3964\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gafdd01e38b120d67cf51e348bb47f3964\">GLFW_KEY_Q</a>&#160;&#160;&#160;81</td></tr>\n<tr class=\"separator:gafdd01e38b120d67cf51e348bb47f3964\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga4ce6c70a0c98c50b3fe4ab9a728d4d36\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga4ce6c70a0c98c50b3fe4ab9a728d4d36\">GLFW_KEY_R</a>&#160;&#160;&#160;82</td></tr>\n<tr class=\"separator:ga4ce6c70a0c98c50b3fe4ab9a728d4d36\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga1570e2ccaab036ea82bed66fc1dab2a9\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga1570e2ccaab036ea82bed66fc1dab2a9\">GLFW_KEY_S</a>&#160;&#160;&#160;83</td></tr>\n<tr class=\"separator:ga1570e2ccaab036ea82bed66fc1dab2a9\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga90e0560422ec7a30e7f3f375bc9f37f9\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga90e0560422ec7a30e7f3f375bc9f37f9\">GLFW_KEY_T</a>&#160;&#160;&#160;84</td></tr>\n<tr class=\"separator:ga90e0560422ec7a30e7f3f375bc9f37f9\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gacad52f3bf7d378fc0ffa72a76769256d\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gacad52f3bf7d378fc0ffa72a76769256d\">GLFW_KEY_U</a>&#160;&#160;&#160;85</td></tr>\n<tr class=\"separator:gacad52f3bf7d378fc0ffa72a76769256d\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga22c7763899ecf7788862e5f90eacce6b\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga22c7763899ecf7788862e5f90eacce6b\">GLFW_KEY_V</a>&#160;&#160;&#160;86</td></tr>\n<tr class=\"separator:ga22c7763899ecf7788862e5f90eacce6b\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gaa06a712e6202661fc03da5bdb7b6e545\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gaa06a712e6202661fc03da5bdb7b6e545\">GLFW_KEY_W</a>&#160;&#160;&#160;87</td></tr>\n<tr class=\"separator:gaa06a712e6202661fc03da5bdb7b6e545\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gac1c42c0bf4192cea713c55598b06b744\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gac1c42c0bf4192cea713c55598b06b744\">GLFW_KEY_X</a>&#160;&#160;&#160;88</td></tr>\n<tr class=\"separator:gac1c42c0bf4192cea713c55598b06b744\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gafd9f115a549effdf8e372a787c360313\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gafd9f115a549effdf8e372a787c360313\">GLFW_KEY_Y</a>&#160;&#160;&#160;89</td></tr>\n<tr class=\"separator:gafd9f115a549effdf8e372a787c360313\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gac489e208c26afda8d4938ed88718760a\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gac489e208c26afda8d4938ed88718760a\">GLFW_KEY_Z</a>&#160;&#160;&#160;90</td></tr>\n<tr class=\"separator:gac489e208c26afda8d4938ed88718760a\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gad1c8d9adac53925276ecb1d592511d8a\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gad1c8d9adac53925276ecb1d592511d8a\">GLFW_KEY_LEFT_BRACKET</a>&#160;&#160;&#160;91  /* [ */</td></tr>\n<tr class=\"separator:gad1c8d9adac53925276ecb1d592511d8a\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gab8155ea99d1ab27ff56f24f8dc73f8d1\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gab8155ea99d1ab27ff56f24f8dc73f8d1\">GLFW_KEY_BACKSLASH</a>&#160;&#160;&#160;92  /* \\ */</td></tr>\n<tr class=\"separator:gab8155ea99d1ab27ff56f24f8dc73f8d1\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga86ef225fd6a66404caae71044cdd58d8\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga86ef225fd6a66404caae71044cdd58d8\">GLFW_KEY_RIGHT_BRACKET</a>&#160;&#160;&#160;93  /* ] */</td></tr>\n<tr class=\"separator:ga86ef225fd6a66404caae71044cdd58d8\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga7a3701fb4e2a0b136ff4b568c3c8d668\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga7a3701fb4e2a0b136ff4b568c3c8d668\">GLFW_KEY_GRAVE_ACCENT</a>&#160;&#160;&#160;96  /* ` */</td></tr>\n<tr class=\"separator:ga7a3701fb4e2a0b136ff4b568c3c8d668\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gadc78dad3dab76bcd4b5c20114052577a\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gadc78dad3dab76bcd4b5c20114052577a\">GLFW_KEY_WORLD_1</a>&#160;&#160;&#160;161 /* non-US #1 */</td></tr>\n<tr class=\"separator:gadc78dad3dab76bcd4b5c20114052577a\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga20494bfebf0bb4fc9503afca18ab2c5e\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga20494bfebf0bb4fc9503afca18ab2c5e\">GLFW_KEY_WORLD_2</a>&#160;&#160;&#160;162 /* non-US #2 */</td></tr>\n<tr class=\"separator:ga20494bfebf0bb4fc9503afca18ab2c5e\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gaac6596c350b635c245113b81c2123b93\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gaac6596c350b635c245113b81c2123b93\">GLFW_KEY_ESCAPE</a>&#160;&#160;&#160;256</td></tr>\n<tr class=\"separator:gaac6596c350b635c245113b81c2123b93\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga9555a92ecbecdbc1f3435219c571d667\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga9555a92ecbecdbc1f3435219c571d667\">GLFW_KEY_ENTER</a>&#160;&#160;&#160;257</td></tr>\n<tr class=\"separator:ga9555a92ecbecdbc1f3435219c571d667\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga6908a4bda9950a3e2b73f794bbe985df\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga6908a4bda9950a3e2b73f794bbe985df\">GLFW_KEY_TAB</a>&#160;&#160;&#160;258</td></tr>\n<tr class=\"separator:ga6908a4bda9950a3e2b73f794bbe985df\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga6c0df1fe2f156bbd5a98c66d76ff3635\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga6c0df1fe2f156bbd5a98c66d76ff3635\">GLFW_KEY_BACKSPACE</a>&#160;&#160;&#160;259</td></tr>\n<tr class=\"separator:ga6c0df1fe2f156bbd5a98c66d76ff3635\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga373ac7365435d6b0eb1068f470e34f47\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga373ac7365435d6b0eb1068f470e34f47\">GLFW_KEY_INSERT</a>&#160;&#160;&#160;260</td></tr>\n<tr class=\"separator:ga373ac7365435d6b0eb1068f470e34f47\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gadb111e4df74b8a715f2c05dad58d2682\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gadb111e4df74b8a715f2c05dad58d2682\">GLFW_KEY_DELETE</a>&#160;&#160;&#160;261</td></tr>\n<tr class=\"separator:gadb111e4df74b8a715f2c05dad58d2682\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga06ba07662e8c291a4a84535379ffc7ac\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga06ba07662e8c291a4a84535379ffc7ac\">GLFW_KEY_RIGHT</a>&#160;&#160;&#160;262</td></tr>\n<tr class=\"separator:ga06ba07662e8c291a4a84535379ffc7ac\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gae12a010d33c309a67ab9460c51eb2462\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gae12a010d33c309a67ab9460c51eb2462\">GLFW_KEY_LEFT</a>&#160;&#160;&#160;263</td></tr>\n<tr class=\"separator:gae12a010d33c309a67ab9460c51eb2462\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gae2e3958c71595607416aa7bf082be2f9\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gae2e3958c71595607416aa7bf082be2f9\">GLFW_KEY_DOWN</a>&#160;&#160;&#160;264</td></tr>\n<tr class=\"separator:gae2e3958c71595607416aa7bf082be2f9\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga2f3342b194020d3544c67e3506b6f144\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga2f3342b194020d3544c67e3506b6f144\">GLFW_KEY_UP</a>&#160;&#160;&#160;265</td></tr>\n<tr class=\"separator:ga2f3342b194020d3544c67e3506b6f144\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga3ab731f9622f0db280178a5f3cc6d586\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga3ab731f9622f0db280178a5f3cc6d586\">GLFW_KEY_PAGE_UP</a>&#160;&#160;&#160;266</td></tr>\n<tr class=\"separator:ga3ab731f9622f0db280178a5f3cc6d586\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gaee0a8fa442001cc2147812f84b59041c\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gaee0a8fa442001cc2147812f84b59041c\">GLFW_KEY_PAGE_DOWN</a>&#160;&#160;&#160;267</td></tr>\n<tr class=\"separator:gaee0a8fa442001cc2147812f84b59041c\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga41452c7287195d481e43207318c126a7\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga41452c7287195d481e43207318c126a7\">GLFW_KEY_HOME</a>&#160;&#160;&#160;268</td></tr>\n<tr class=\"separator:ga41452c7287195d481e43207318c126a7\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga86587ea1df19a65978d3e3b8439bedd9\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga86587ea1df19a65978d3e3b8439bedd9\">GLFW_KEY_END</a>&#160;&#160;&#160;269</td></tr>\n<tr class=\"separator:ga86587ea1df19a65978d3e3b8439bedd9\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga92c1d2c9d63485f3d70f94f688d48672\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga92c1d2c9d63485f3d70f94f688d48672\">GLFW_KEY_CAPS_LOCK</a>&#160;&#160;&#160;280</td></tr>\n<tr class=\"separator:ga92c1d2c9d63485f3d70f94f688d48672\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gaf622b63b9537f7084c2ab649b8365630\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gaf622b63b9537f7084c2ab649b8365630\">GLFW_KEY_SCROLL_LOCK</a>&#160;&#160;&#160;281</td></tr>\n<tr class=\"separator:gaf622b63b9537f7084c2ab649b8365630\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga3946edc362aeff213b2be6304296cf43\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga3946edc362aeff213b2be6304296cf43\">GLFW_KEY_NUM_LOCK</a>&#160;&#160;&#160;282</td></tr>\n<tr class=\"separator:ga3946edc362aeff213b2be6304296cf43\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gaf964c2e65e97d0cf785a5636ee8df642\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gaf964c2e65e97d0cf785a5636ee8df642\">GLFW_KEY_PRINT_SCREEN</a>&#160;&#160;&#160;283</td></tr>\n<tr class=\"separator:gaf964c2e65e97d0cf785a5636ee8df642\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga8116b9692d87382afb5849b6d8907f18\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga8116b9692d87382afb5849b6d8907f18\">GLFW_KEY_PAUSE</a>&#160;&#160;&#160;284</td></tr>\n<tr class=\"separator:ga8116b9692d87382afb5849b6d8907f18\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gafb8d66c573acf22e364049477dcbea30\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gafb8d66c573acf22e364049477dcbea30\">GLFW_KEY_F1</a>&#160;&#160;&#160;290</td></tr>\n<tr class=\"separator:gafb8d66c573acf22e364049477dcbea30\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga0900750aff94889b940f5e428c07daee\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga0900750aff94889b940f5e428c07daee\">GLFW_KEY_F2</a>&#160;&#160;&#160;291</td></tr>\n<tr class=\"separator:ga0900750aff94889b940f5e428c07daee\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gaed7cd729c0147a551bb8b7bb36c17015\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gaed7cd729c0147a551bb8b7bb36c17015\">GLFW_KEY_F3</a>&#160;&#160;&#160;292</td></tr>\n<tr class=\"separator:gaed7cd729c0147a551bb8b7bb36c17015\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga9b61ebd0c63b44b7332fda2c9763eaa6\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga9b61ebd0c63b44b7332fda2c9763eaa6\">GLFW_KEY_F4</a>&#160;&#160;&#160;293</td></tr>\n<tr class=\"separator:ga9b61ebd0c63b44b7332fda2c9763eaa6\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gaf258dda9947daa428377938ed577c8c2\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gaf258dda9947daa428377938ed577c8c2\">GLFW_KEY_F5</a>&#160;&#160;&#160;294</td></tr>\n<tr class=\"separator:gaf258dda9947daa428377938ed577c8c2\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga6dc2d3f87b9d51ffbbbe2ef0299d8e1d\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga6dc2d3f87b9d51ffbbbe2ef0299d8e1d\">GLFW_KEY_F6</a>&#160;&#160;&#160;295</td></tr>\n<tr class=\"separator:ga6dc2d3f87b9d51ffbbbe2ef0299d8e1d\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gacca6ef8a2162c52a0ac1d881e8d9c38a\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gacca6ef8a2162c52a0ac1d881e8d9c38a\">GLFW_KEY_F7</a>&#160;&#160;&#160;296</td></tr>\n<tr class=\"separator:gacca6ef8a2162c52a0ac1d881e8d9c38a\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gac9d39390336ae14e4a93e295de43c7e8\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gac9d39390336ae14e4a93e295de43c7e8\">GLFW_KEY_F8</a>&#160;&#160;&#160;297</td></tr>\n<tr class=\"separator:gac9d39390336ae14e4a93e295de43c7e8\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gae40de0de1c9f21cd26c9afa3d7050851\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gae40de0de1c9f21cd26c9afa3d7050851\">GLFW_KEY_F9</a>&#160;&#160;&#160;298</td></tr>\n<tr class=\"separator:gae40de0de1c9f21cd26c9afa3d7050851\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga718d11d2f7d57471a2f6a894235995b1\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga718d11d2f7d57471a2f6a894235995b1\">GLFW_KEY_F10</a>&#160;&#160;&#160;299</td></tr>\n<tr class=\"separator:ga718d11d2f7d57471a2f6a894235995b1\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga0bc04b11627e7d69339151e7306b2832\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga0bc04b11627e7d69339151e7306b2832\">GLFW_KEY_F11</a>&#160;&#160;&#160;300</td></tr>\n<tr class=\"separator:ga0bc04b11627e7d69339151e7306b2832\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gaf5908fa9b0a906ae03fc2c61ac7aa3e2\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gaf5908fa9b0a906ae03fc2c61ac7aa3e2\">GLFW_KEY_F12</a>&#160;&#160;&#160;301</td></tr>\n<tr class=\"separator:gaf5908fa9b0a906ae03fc2c61ac7aa3e2\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gad637f4308655e1001bd6ad942bc0fd4b\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gad637f4308655e1001bd6ad942bc0fd4b\">GLFW_KEY_F13</a>&#160;&#160;&#160;302</td></tr>\n<tr class=\"separator:gad637f4308655e1001bd6ad942bc0fd4b\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gaf14c66cff3396e5bd46e803c035e6c1f\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gaf14c66cff3396e5bd46e803c035e6c1f\">GLFW_KEY_F14</a>&#160;&#160;&#160;303</td></tr>\n<tr class=\"separator:gaf14c66cff3396e5bd46e803c035e6c1f\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga7f70970db6e8be1794da8516a6d14058\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga7f70970db6e8be1794da8516a6d14058\">GLFW_KEY_F15</a>&#160;&#160;&#160;304</td></tr>\n<tr class=\"separator:ga7f70970db6e8be1794da8516a6d14058\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gaa582dbb1d2ba2050aa1dca0838095b27\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gaa582dbb1d2ba2050aa1dca0838095b27\">GLFW_KEY_F16</a>&#160;&#160;&#160;305</td></tr>\n<tr class=\"separator:gaa582dbb1d2ba2050aa1dca0838095b27\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga972ce5c365e2394b36104b0e3125c748\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga972ce5c365e2394b36104b0e3125c748\">GLFW_KEY_F17</a>&#160;&#160;&#160;306</td></tr>\n<tr class=\"separator:ga972ce5c365e2394b36104b0e3125c748\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gaebf6391058d5566601e357edc5ea737c\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gaebf6391058d5566601e357edc5ea737c\">GLFW_KEY_F18</a>&#160;&#160;&#160;307</td></tr>\n<tr class=\"separator:gaebf6391058d5566601e357edc5ea737c\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gaec011d9ba044058cb54529da710e9791\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gaec011d9ba044058cb54529da710e9791\">GLFW_KEY_F19</a>&#160;&#160;&#160;308</td></tr>\n<tr class=\"separator:gaec011d9ba044058cb54529da710e9791\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga82b9c721ada04cd5ca8de767da38022f\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga82b9c721ada04cd5ca8de767da38022f\">GLFW_KEY_F20</a>&#160;&#160;&#160;309</td></tr>\n<tr class=\"separator:ga82b9c721ada04cd5ca8de767da38022f\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga356afb14d3440ff2bb378f74f7ebc60f\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga356afb14d3440ff2bb378f74f7ebc60f\">GLFW_KEY_F21</a>&#160;&#160;&#160;310</td></tr>\n<tr class=\"separator:ga356afb14d3440ff2bb378f74f7ebc60f\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga90960bd2a155f2b09675324d3dff1565\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga90960bd2a155f2b09675324d3dff1565\">GLFW_KEY_F22</a>&#160;&#160;&#160;311</td></tr>\n<tr class=\"separator:ga90960bd2a155f2b09675324d3dff1565\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga43c21099aac10952d1be909a8ddee4d5\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga43c21099aac10952d1be909a8ddee4d5\">GLFW_KEY_F23</a>&#160;&#160;&#160;312</td></tr>\n<tr class=\"separator:ga43c21099aac10952d1be909a8ddee4d5\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga8150374677b5bed3043408732152dea2\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga8150374677b5bed3043408732152dea2\">GLFW_KEY_F24</a>&#160;&#160;&#160;313</td></tr>\n<tr class=\"separator:ga8150374677b5bed3043408732152dea2\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gaa4bbd93ed73bb4c6ae7d83df880b7199\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gaa4bbd93ed73bb4c6ae7d83df880b7199\">GLFW_KEY_F25</a>&#160;&#160;&#160;314</td></tr>\n<tr class=\"separator:gaa4bbd93ed73bb4c6ae7d83df880b7199\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga10515dafc55b71e7683f5b4fedd1c70d\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga10515dafc55b71e7683f5b4fedd1c70d\">GLFW_KEY_KP_0</a>&#160;&#160;&#160;320</td></tr>\n<tr class=\"separator:ga10515dafc55b71e7683f5b4fedd1c70d\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gaf3a29a334402c5eaf0b3439edf5587c3\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gaf3a29a334402c5eaf0b3439edf5587c3\">GLFW_KEY_KP_1</a>&#160;&#160;&#160;321</td></tr>\n<tr class=\"separator:gaf3a29a334402c5eaf0b3439edf5587c3\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gaf82d5a802ab8213c72653d7480c16f13\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gaf82d5a802ab8213c72653d7480c16f13\">GLFW_KEY_KP_2</a>&#160;&#160;&#160;322</td></tr>\n<tr class=\"separator:gaf82d5a802ab8213c72653d7480c16f13\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga7e25ff30d56cd512828c1d4ae8d54ef2\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga7e25ff30d56cd512828c1d4ae8d54ef2\">GLFW_KEY_KP_3</a>&#160;&#160;&#160;323</td></tr>\n<tr class=\"separator:ga7e25ff30d56cd512828c1d4ae8d54ef2\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gada7ec86778b85e0b4de0beea72234aea\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gada7ec86778b85e0b4de0beea72234aea\">GLFW_KEY_KP_4</a>&#160;&#160;&#160;324</td></tr>\n<tr class=\"separator:gada7ec86778b85e0b4de0beea72234aea\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga9a5be274434866c51738cafbb6d26b45\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga9a5be274434866c51738cafbb6d26b45\">GLFW_KEY_KP_5</a>&#160;&#160;&#160;325</td></tr>\n<tr class=\"separator:ga9a5be274434866c51738cafbb6d26b45\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gafc141b0f8450519084c01092a3157faa\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gafc141b0f8450519084c01092a3157faa\">GLFW_KEY_KP_6</a>&#160;&#160;&#160;326</td></tr>\n<tr class=\"separator:gafc141b0f8450519084c01092a3157faa\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga8882f411f05d04ec77a9563974bbfa53\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga8882f411f05d04ec77a9563974bbfa53\">GLFW_KEY_KP_7</a>&#160;&#160;&#160;327</td></tr>\n<tr class=\"separator:ga8882f411f05d04ec77a9563974bbfa53\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gab2ea2e6a12f89d315045af520ac78cec\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gab2ea2e6a12f89d315045af520ac78cec\">GLFW_KEY_KP_8</a>&#160;&#160;&#160;328</td></tr>\n<tr class=\"separator:gab2ea2e6a12f89d315045af520ac78cec\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gafb21426b630ed4fcc084868699ba74c1\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gafb21426b630ed4fcc084868699ba74c1\">GLFW_KEY_KP_9</a>&#160;&#160;&#160;329</td></tr>\n<tr class=\"separator:gafb21426b630ed4fcc084868699ba74c1\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga4e231d968796331a9ea0dbfb98d4005b\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga4e231d968796331a9ea0dbfb98d4005b\">GLFW_KEY_KP_DECIMAL</a>&#160;&#160;&#160;330</td></tr>\n<tr class=\"separator:ga4e231d968796331a9ea0dbfb98d4005b\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gabca1733780a273d549129ad0f250d1e5\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gabca1733780a273d549129ad0f250d1e5\">GLFW_KEY_KP_DIVIDE</a>&#160;&#160;&#160;331</td></tr>\n<tr class=\"separator:gabca1733780a273d549129ad0f250d1e5\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga9ada267eb0e78ed2ada8701dd24a56ef\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga9ada267eb0e78ed2ada8701dd24a56ef\">GLFW_KEY_KP_MULTIPLY</a>&#160;&#160;&#160;332</td></tr>\n<tr class=\"separator:ga9ada267eb0e78ed2ada8701dd24a56ef\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gaa3dbd60782ff93d6082a124bce1fa236\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gaa3dbd60782ff93d6082a124bce1fa236\">GLFW_KEY_KP_SUBTRACT</a>&#160;&#160;&#160;333</td></tr>\n<tr class=\"separator:gaa3dbd60782ff93d6082a124bce1fa236\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gad09c7c98acc79e89aa6a0a91275becac\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gad09c7c98acc79e89aa6a0a91275becac\">GLFW_KEY_KP_ADD</a>&#160;&#160;&#160;334</td></tr>\n<tr class=\"separator:gad09c7c98acc79e89aa6a0a91275becac\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga4f728f8738f2986bd63eedd3d412e8cf\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga4f728f8738f2986bd63eedd3d412e8cf\">GLFW_KEY_KP_ENTER</a>&#160;&#160;&#160;335</td></tr>\n<tr class=\"separator:ga4f728f8738f2986bd63eedd3d412e8cf\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gaebdc76d4a808191e6d21b7e4ad2acd97\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gaebdc76d4a808191e6d21b7e4ad2acd97\">GLFW_KEY_KP_EQUAL</a>&#160;&#160;&#160;336</td></tr>\n<tr class=\"separator:gaebdc76d4a808191e6d21b7e4ad2acd97\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga8a530a28a65c44ab5d00b759b756d3f6\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga8a530a28a65c44ab5d00b759b756d3f6\">GLFW_KEY_LEFT_SHIFT</a>&#160;&#160;&#160;340</td></tr>\n<tr class=\"separator:ga8a530a28a65c44ab5d00b759b756d3f6\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga9f97b743e81460ac4b2deddecd10a464\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga9f97b743e81460ac4b2deddecd10a464\">GLFW_KEY_LEFT_CONTROL</a>&#160;&#160;&#160;341</td></tr>\n<tr class=\"separator:ga9f97b743e81460ac4b2deddecd10a464\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga7f27dabf63a7789daa31e1c96790219b\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga7f27dabf63a7789daa31e1c96790219b\">GLFW_KEY_LEFT_ALT</a>&#160;&#160;&#160;342</td></tr>\n<tr class=\"separator:ga7f27dabf63a7789daa31e1c96790219b\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gafb1207c91997fc295afd1835fbc5641a\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gafb1207c91997fc295afd1835fbc5641a\">GLFW_KEY_LEFT_SUPER</a>&#160;&#160;&#160;343</td></tr>\n<tr class=\"separator:gafb1207c91997fc295afd1835fbc5641a\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gaffca36b99c9dce1a19cb9befbadce691\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gaffca36b99c9dce1a19cb9befbadce691\">GLFW_KEY_RIGHT_SHIFT</a>&#160;&#160;&#160;344</td></tr>\n<tr class=\"separator:gaffca36b99c9dce1a19cb9befbadce691\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gad1ca2094b2694e7251d0ab1fd34f8519\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gad1ca2094b2694e7251d0ab1fd34f8519\">GLFW_KEY_RIGHT_CONTROL</a>&#160;&#160;&#160;345</td></tr>\n<tr class=\"separator:gad1ca2094b2694e7251d0ab1fd34f8519\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga687b38009131cfdd07a8d05fff8fa446\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga687b38009131cfdd07a8d05fff8fa446\">GLFW_KEY_RIGHT_ALT</a>&#160;&#160;&#160;346</td></tr>\n<tr class=\"separator:ga687b38009131cfdd07a8d05fff8fa446\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gad4547a3e8e247594acb60423fe6502db\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gad4547a3e8e247594acb60423fe6502db\">GLFW_KEY_RIGHT_SUPER</a>&#160;&#160;&#160;347</td></tr>\n<tr class=\"separator:gad4547a3e8e247594acb60423fe6502db\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga9845be48a745fc232045c9ec174d8820\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga9845be48a745fc232045c9ec174d8820\">GLFW_KEY_MENU</a>&#160;&#160;&#160;348</td></tr>\n<tr class=\"separator:ga9845be48a745fc232045c9ec174d8820\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga442cbaef7bfb9a4ba13594dd7fbf2789\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga442cbaef7bfb9a4ba13594dd7fbf2789\">GLFW_KEY_LAST</a>&#160;&#160;&#160;<a class=\"el\" href=\"group__keys.html#ga9845be48a745fc232045c9ec174d8820\">GLFW_KEY_MENU</a></td></tr>\n<tr class=\"separator:ga442cbaef7bfb9a4ba13594dd7fbf2789\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga14994d3196c290aaa347248e51740274\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__mods.html#ga14994d3196c290aaa347248e51740274\">GLFW_MOD_SHIFT</a>&#160;&#160;&#160;0x0001</td></tr>\n<tr class=\"memdesc:ga14994d3196c290aaa347248e51740274\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">If this bit is set one or more Shift keys were held down.  <a href=\"group__mods.html#ga14994d3196c290aaa347248e51740274\">More...</a><br /></td></tr>\n<tr class=\"separator:ga14994d3196c290aaa347248e51740274\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga6ed94871c3208eefd85713fa929d45aa\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__mods.html#ga6ed94871c3208eefd85713fa929d45aa\">GLFW_MOD_CONTROL</a>&#160;&#160;&#160;0x0002</td></tr>\n<tr class=\"memdesc:ga6ed94871c3208eefd85713fa929d45aa\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">If this bit is set one or more Control keys were held down.  <a href=\"group__mods.html#ga6ed94871c3208eefd85713fa929d45aa\">More...</a><br /></td></tr>\n<tr class=\"separator:ga6ed94871c3208eefd85713fa929d45aa\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gad2acd5633463c29e07008687ea73c0f4\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__mods.html#gad2acd5633463c29e07008687ea73c0f4\">GLFW_MOD_ALT</a>&#160;&#160;&#160;0x0004</td></tr>\n<tr class=\"memdesc:gad2acd5633463c29e07008687ea73c0f4\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">If this bit is set one or more Alt keys were held down.  <a href=\"group__mods.html#gad2acd5633463c29e07008687ea73c0f4\">More...</a><br /></td></tr>\n<tr class=\"separator:gad2acd5633463c29e07008687ea73c0f4\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga6b64ba10ea0227cf6f42efd0a220aba1\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__mods.html#ga6b64ba10ea0227cf6f42efd0a220aba1\">GLFW_MOD_SUPER</a>&#160;&#160;&#160;0x0008</td></tr>\n<tr class=\"memdesc:ga6b64ba10ea0227cf6f42efd0a220aba1\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">If this bit is set one or more Super keys were held down.  <a href=\"group__mods.html#ga6b64ba10ea0227cf6f42efd0a220aba1\">More...</a><br /></td></tr>\n<tr class=\"separator:ga6b64ba10ea0227cf6f42efd0a220aba1\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gaefeef8fcf825a6e43e241b337897200f\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__mods.html#gaefeef8fcf825a6e43e241b337897200f\">GLFW_MOD_CAPS_LOCK</a>&#160;&#160;&#160;0x0010</td></tr>\n<tr class=\"memdesc:gaefeef8fcf825a6e43e241b337897200f\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">If this bit is set the Caps Lock key is enabled.  <a href=\"group__mods.html#gaefeef8fcf825a6e43e241b337897200f\">More...</a><br /></td></tr>\n<tr class=\"separator:gaefeef8fcf825a6e43e241b337897200f\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga64e020b8a42af8376e944baf61feecbe\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__mods.html#ga64e020b8a42af8376e944baf61feecbe\">GLFW_MOD_NUM_LOCK</a>&#160;&#160;&#160;0x0020</td></tr>\n<tr class=\"memdesc:ga64e020b8a42af8376e944baf61feecbe\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">If this bit is set the Num Lock key is enabled.  <a href=\"group__mods.html#ga64e020b8a42af8376e944baf61feecbe\">More...</a><br /></td></tr>\n<tr class=\"separator:ga64e020b8a42af8376e944baf61feecbe\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga181a6e875251fd8671654eff00f9112e\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__buttons.html#ga181a6e875251fd8671654eff00f9112e\">GLFW_MOUSE_BUTTON_1</a>&#160;&#160;&#160;0</td></tr>\n<tr class=\"separator:ga181a6e875251fd8671654eff00f9112e\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga604b39b92c88ce9bd332e97fc3f4156c\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__buttons.html#ga604b39b92c88ce9bd332e97fc3f4156c\">GLFW_MOUSE_BUTTON_2</a>&#160;&#160;&#160;1</td></tr>\n<tr class=\"separator:ga604b39b92c88ce9bd332e97fc3f4156c\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga0130d505563d0236a6f85545f19e1721\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__buttons.html#ga0130d505563d0236a6f85545f19e1721\">GLFW_MOUSE_BUTTON_3</a>&#160;&#160;&#160;2</td></tr>\n<tr class=\"separator:ga0130d505563d0236a6f85545f19e1721\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga53f4097bb01d5521c7d9513418c91ca9\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__buttons.html#ga53f4097bb01d5521c7d9513418c91ca9\">GLFW_MOUSE_BUTTON_4</a>&#160;&#160;&#160;3</td></tr>\n<tr class=\"separator:ga53f4097bb01d5521c7d9513418c91ca9\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gaf08c4ddecb051d3d9667db1d5e417c9c\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__buttons.html#gaf08c4ddecb051d3d9667db1d5e417c9c\">GLFW_MOUSE_BUTTON_5</a>&#160;&#160;&#160;4</td></tr>\n<tr class=\"separator:gaf08c4ddecb051d3d9667db1d5e417c9c\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gae8513e06aab8aa393b595f22c6d8257a\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__buttons.html#gae8513e06aab8aa393b595f22c6d8257a\">GLFW_MOUSE_BUTTON_6</a>&#160;&#160;&#160;5</td></tr>\n<tr class=\"separator:gae8513e06aab8aa393b595f22c6d8257a\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga8b02a1ab55dde45b3a3883d54ffd7dc7\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__buttons.html#ga8b02a1ab55dde45b3a3883d54ffd7dc7\">GLFW_MOUSE_BUTTON_7</a>&#160;&#160;&#160;6</td></tr>\n<tr class=\"separator:ga8b02a1ab55dde45b3a3883d54ffd7dc7\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga35d5c4263e0dc0d0a4731ca6c562f32c\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__buttons.html#ga35d5c4263e0dc0d0a4731ca6c562f32c\">GLFW_MOUSE_BUTTON_8</a>&#160;&#160;&#160;7</td></tr>\n<tr class=\"separator:ga35d5c4263e0dc0d0a4731ca6c562f32c\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gab1fd86a4518a9141ec7bcde2e15a2fdf\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__buttons.html#gab1fd86a4518a9141ec7bcde2e15a2fdf\">GLFW_MOUSE_BUTTON_LAST</a>&#160;&#160;&#160;<a class=\"el\" href=\"group__buttons.html#ga35d5c4263e0dc0d0a4731ca6c562f32c\">GLFW_MOUSE_BUTTON_8</a></td></tr>\n<tr class=\"separator:gab1fd86a4518a9141ec7bcde2e15a2fdf\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gaf37100431dcd5082d48f95ee8bc8cd56\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__buttons.html#gaf37100431dcd5082d48f95ee8bc8cd56\">GLFW_MOUSE_BUTTON_LEFT</a>&#160;&#160;&#160;<a class=\"el\" href=\"group__buttons.html#ga181a6e875251fd8671654eff00f9112e\">GLFW_MOUSE_BUTTON_1</a></td></tr>\n<tr class=\"separator:gaf37100431dcd5082d48f95ee8bc8cd56\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga3e2f2cf3c4942df73cc094247d275e74\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__buttons.html#ga3e2f2cf3c4942df73cc094247d275e74\">GLFW_MOUSE_BUTTON_RIGHT</a>&#160;&#160;&#160;<a class=\"el\" href=\"group__buttons.html#ga604b39b92c88ce9bd332e97fc3f4156c\">GLFW_MOUSE_BUTTON_2</a></td></tr>\n<tr class=\"separator:ga3e2f2cf3c4942df73cc094247d275e74\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga34a4d2a701434f763fd93a2ff842b95a\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__buttons.html#ga34a4d2a701434f763fd93a2ff842b95a\">GLFW_MOUSE_BUTTON_MIDDLE</a>&#160;&#160;&#160;<a class=\"el\" href=\"group__buttons.html#ga0130d505563d0236a6f85545f19e1721\">GLFW_MOUSE_BUTTON_3</a></td></tr>\n<tr class=\"separator:ga34a4d2a701434f763fd93a2ff842b95a\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga34a0443d059e9f22272cd4669073f73d\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__joysticks.html#ga34a0443d059e9f22272cd4669073f73d\">GLFW_JOYSTICK_1</a>&#160;&#160;&#160;0</td></tr>\n<tr class=\"separator:ga34a0443d059e9f22272cd4669073f73d\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga6eab65ec88e65e0850ef8413504cb50c\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__joysticks.html#ga6eab65ec88e65e0850ef8413504cb50c\">GLFW_JOYSTICK_2</a>&#160;&#160;&#160;1</td></tr>\n<tr class=\"separator:ga6eab65ec88e65e0850ef8413504cb50c\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gae6f3eedfeb42424c2f5e3161efb0b654\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__joysticks.html#gae6f3eedfeb42424c2f5e3161efb0b654\">GLFW_JOYSTICK_3</a>&#160;&#160;&#160;2</td></tr>\n<tr class=\"separator:gae6f3eedfeb42424c2f5e3161efb0b654\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga97ddbcad02b7f48d74fad4ddb08fff59\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__joysticks.html#ga97ddbcad02b7f48d74fad4ddb08fff59\">GLFW_JOYSTICK_4</a>&#160;&#160;&#160;3</td></tr>\n<tr class=\"separator:ga97ddbcad02b7f48d74fad4ddb08fff59\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gae43281bc66d3fa5089fb50c3e7a28695\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__joysticks.html#gae43281bc66d3fa5089fb50c3e7a28695\">GLFW_JOYSTICK_5</a>&#160;&#160;&#160;4</td></tr>\n<tr class=\"separator:gae43281bc66d3fa5089fb50c3e7a28695\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga74771620aa53bd68a487186dea66fd77\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__joysticks.html#ga74771620aa53bd68a487186dea66fd77\">GLFW_JOYSTICK_6</a>&#160;&#160;&#160;5</td></tr>\n<tr class=\"separator:ga74771620aa53bd68a487186dea66fd77\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga20a9f4f3aaefed9ea5e66072fc588b87\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__joysticks.html#ga20a9f4f3aaefed9ea5e66072fc588b87\">GLFW_JOYSTICK_7</a>&#160;&#160;&#160;6</td></tr>\n<tr class=\"separator:ga20a9f4f3aaefed9ea5e66072fc588b87\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga21a934c940bcf25db0e4c8fe9b364bdb\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__joysticks.html#ga21a934c940bcf25db0e4c8fe9b364bdb\">GLFW_JOYSTICK_8</a>&#160;&#160;&#160;7</td></tr>\n<tr class=\"separator:ga21a934c940bcf25db0e4c8fe9b364bdb\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga87689d47df0ba6f9f5fcbbcaf7b3cecf\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__joysticks.html#ga87689d47df0ba6f9f5fcbbcaf7b3cecf\">GLFW_JOYSTICK_9</a>&#160;&#160;&#160;8</td></tr>\n<tr class=\"separator:ga87689d47df0ba6f9f5fcbbcaf7b3cecf\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gaef55389ee605d6dfc31aef6fe98c54ec\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__joysticks.html#gaef55389ee605d6dfc31aef6fe98c54ec\">GLFW_JOYSTICK_10</a>&#160;&#160;&#160;9</td></tr>\n<tr class=\"separator:gaef55389ee605d6dfc31aef6fe98c54ec\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gae7d26e3df447c2c14a569fcc18516af4\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__joysticks.html#gae7d26e3df447c2c14a569fcc18516af4\">GLFW_JOYSTICK_11</a>&#160;&#160;&#160;10</td></tr>\n<tr class=\"separator:gae7d26e3df447c2c14a569fcc18516af4\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gab91bbf5b7ca6be8d3ac5c4d89ff48ac7\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__joysticks.html#gab91bbf5b7ca6be8d3ac5c4d89ff48ac7\">GLFW_JOYSTICK_12</a>&#160;&#160;&#160;11</td></tr>\n<tr class=\"separator:gab91bbf5b7ca6be8d3ac5c4d89ff48ac7\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga5c84fb4e49bf661d7d7c78eb4018c508\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__joysticks.html#ga5c84fb4e49bf661d7d7c78eb4018c508\">GLFW_JOYSTICK_13</a>&#160;&#160;&#160;12</td></tr>\n<tr class=\"separator:ga5c84fb4e49bf661d7d7c78eb4018c508\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga89540873278ae5a42b3e70d64164dc74\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__joysticks.html#ga89540873278ae5a42b3e70d64164dc74\">GLFW_JOYSTICK_14</a>&#160;&#160;&#160;13</td></tr>\n<tr class=\"separator:ga89540873278ae5a42b3e70d64164dc74\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga7b02ab70daf7a78bcc942d5d4cc1dcf9\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__joysticks.html#ga7b02ab70daf7a78bcc942d5d4cc1dcf9\">GLFW_JOYSTICK_15</a>&#160;&#160;&#160;14</td></tr>\n<tr class=\"separator:ga7b02ab70daf7a78bcc942d5d4cc1dcf9\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga453edeeabf350827646b6857df4f80ce\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__joysticks.html#ga453edeeabf350827646b6857df4f80ce\">GLFW_JOYSTICK_16</a>&#160;&#160;&#160;15</td></tr>\n<tr class=\"separator:ga453edeeabf350827646b6857df4f80ce\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga9ca13ebf24c331dd98df17d84a4b72c9\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__joysticks.html#ga9ca13ebf24c331dd98df17d84a4b72c9\">GLFW_JOYSTICK_LAST</a>&#160;&#160;&#160;<a class=\"el\" href=\"group__joysticks.html#ga453edeeabf350827646b6857df4f80ce\">GLFW_JOYSTICK_16</a></td></tr>\n<tr class=\"separator:ga9ca13ebf24c331dd98df17d84a4b72c9\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gae055a12fbf4b48b5954c8e1cd129b810\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__gamepad__buttons.html#gae055a12fbf4b48b5954c8e1cd129b810\">GLFW_GAMEPAD_BUTTON_A</a>&#160;&#160;&#160;0</td></tr>\n<tr class=\"separator:gae055a12fbf4b48b5954c8e1cd129b810\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga2228a6512fd5950cdb51ba07846546fa\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__gamepad__buttons.html#ga2228a6512fd5950cdb51ba07846546fa\">GLFW_GAMEPAD_BUTTON_B</a>&#160;&#160;&#160;1</td></tr>\n<tr class=\"separator:ga2228a6512fd5950cdb51ba07846546fa\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga52cc94785cf3fe9a12e246539259887c\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__gamepad__buttons.html#ga52cc94785cf3fe9a12e246539259887c\">GLFW_GAMEPAD_BUTTON_X</a>&#160;&#160;&#160;2</td></tr>\n<tr class=\"separator:ga52cc94785cf3fe9a12e246539259887c\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gafc931248bda494b530cbe057f386a5ed\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__gamepad__buttons.html#gafc931248bda494b530cbe057f386a5ed\">GLFW_GAMEPAD_BUTTON_Y</a>&#160;&#160;&#160;3</td></tr>\n<tr class=\"separator:gafc931248bda494b530cbe057f386a5ed\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga17d67b4f39a39d6b813bd1567a3507c3\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__gamepad__buttons.html#ga17d67b4f39a39d6b813bd1567a3507c3\">GLFW_GAMEPAD_BUTTON_LEFT_BUMPER</a>&#160;&#160;&#160;4</td></tr>\n<tr class=\"separator:ga17d67b4f39a39d6b813bd1567a3507c3\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gadfbc9ea9bf3aae896b79fa49fdc85c7f\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__gamepad__buttons.html#gadfbc9ea9bf3aae896b79fa49fdc85c7f\">GLFW_GAMEPAD_BUTTON_RIGHT_BUMPER</a>&#160;&#160;&#160;5</td></tr>\n<tr class=\"separator:gadfbc9ea9bf3aae896b79fa49fdc85c7f\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gabc7c0264ce778835b516a472b47f6caf\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__gamepad__buttons.html#gabc7c0264ce778835b516a472b47f6caf\">GLFW_GAMEPAD_BUTTON_BACK</a>&#160;&#160;&#160;6</td></tr>\n<tr class=\"separator:gabc7c0264ce778835b516a472b47f6caf\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga04606949dd9139434b8a1bedf4ac1021\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__gamepad__buttons.html#ga04606949dd9139434b8a1bedf4ac1021\">GLFW_GAMEPAD_BUTTON_START</a>&#160;&#160;&#160;7</td></tr>\n<tr class=\"separator:ga04606949dd9139434b8a1bedf4ac1021\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga7fa48c32e5b2f5db2f080aa0b8b573dc\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__gamepad__buttons.html#ga7fa48c32e5b2f5db2f080aa0b8b573dc\">GLFW_GAMEPAD_BUTTON_GUIDE</a>&#160;&#160;&#160;8</td></tr>\n<tr class=\"separator:ga7fa48c32e5b2f5db2f080aa0b8b573dc\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga3e089787327454f7bfca7364d6ca206a\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__gamepad__buttons.html#ga3e089787327454f7bfca7364d6ca206a\">GLFW_GAMEPAD_BUTTON_LEFT_THUMB</a>&#160;&#160;&#160;9</td></tr>\n<tr class=\"separator:ga3e089787327454f7bfca7364d6ca206a\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga1c003f52b5aebb45272475b48953b21a\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__gamepad__buttons.html#ga1c003f52b5aebb45272475b48953b21a\">GLFW_GAMEPAD_BUTTON_RIGHT_THUMB</a>&#160;&#160;&#160;10</td></tr>\n<tr class=\"separator:ga1c003f52b5aebb45272475b48953b21a\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga4f1ed6f974a47bc8930d4874a283476a\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__gamepad__buttons.html#ga4f1ed6f974a47bc8930d4874a283476a\">GLFW_GAMEPAD_BUTTON_DPAD_UP</a>&#160;&#160;&#160;11</td></tr>\n<tr class=\"separator:ga4f1ed6f974a47bc8930d4874a283476a\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gae2a780d2a8c79e0b77c0b7b601ca57c6\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__gamepad__buttons.html#gae2a780d2a8c79e0b77c0b7b601ca57c6\">GLFW_GAMEPAD_BUTTON_DPAD_RIGHT</a>&#160;&#160;&#160;12</td></tr>\n<tr class=\"separator:gae2a780d2a8c79e0b77c0b7b601ca57c6\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga8f2b731b97d80f90f11967a83207665c\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__gamepad__buttons.html#ga8f2b731b97d80f90f11967a83207665c\">GLFW_GAMEPAD_BUTTON_DPAD_DOWN</a>&#160;&#160;&#160;13</td></tr>\n<tr class=\"separator:ga8f2b731b97d80f90f11967a83207665c\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gaf0697e0e8607b2ebe1c93b0c6befe301\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__gamepad__buttons.html#gaf0697e0e8607b2ebe1c93b0c6befe301\">GLFW_GAMEPAD_BUTTON_DPAD_LEFT</a>&#160;&#160;&#160;14</td></tr>\n<tr class=\"separator:gaf0697e0e8607b2ebe1c93b0c6befe301\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga5cc98882f4f81dacf761639a567f61eb\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__gamepad__buttons.html#ga5cc98882f4f81dacf761639a567f61eb\">GLFW_GAMEPAD_BUTTON_LAST</a>&#160;&#160;&#160;<a class=\"el\" href=\"group__gamepad__buttons.html#gaf0697e0e8607b2ebe1c93b0c6befe301\">GLFW_GAMEPAD_BUTTON_DPAD_LEFT</a></td></tr>\n<tr class=\"separator:ga5cc98882f4f81dacf761639a567f61eb\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gaf08d0df26527c9305253422bd98ed63a\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__gamepad__buttons.html#gaf08d0df26527c9305253422bd98ed63a\">GLFW_GAMEPAD_BUTTON_CROSS</a>&#160;&#160;&#160;<a class=\"el\" href=\"group__gamepad__buttons.html#gae055a12fbf4b48b5954c8e1cd129b810\">GLFW_GAMEPAD_BUTTON_A</a></td></tr>\n<tr class=\"separator:gaf08d0df26527c9305253422bd98ed63a\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gaaef094b3dacbf15f272b274516839b82\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__gamepad__buttons.html#gaaef094b3dacbf15f272b274516839b82\">GLFW_GAMEPAD_BUTTON_CIRCLE</a>&#160;&#160;&#160;<a class=\"el\" href=\"group__gamepad__buttons.html#ga2228a6512fd5950cdb51ba07846546fa\">GLFW_GAMEPAD_BUTTON_B</a></td></tr>\n<tr class=\"separator:gaaef094b3dacbf15f272b274516839b82\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gafc7821e87d77d41ed2cd3e1f726ec35f\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__gamepad__buttons.html#gafc7821e87d77d41ed2cd3e1f726ec35f\">GLFW_GAMEPAD_BUTTON_SQUARE</a>&#160;&#160;&#160;<a class=\"el\" href=\"group__gamepad__buttons.html#ga52cc94785cf3fe9a12e246539259887c\">GLFW_GAMEPAD_BUTTON_X</a></td></tr>\n<tr class=\"separator:gafc7821e87d77d41ed2cd3e1f726ec35f\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga3a7ef6bcb768a08cd3bf142f7f09f802\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__gamepad__buttons.html#ga3a7ef6bcb768a08cd3bf142f7f09f802\">GLFW_GAMEPAD_BUTTON_TRIANGLE</a>&#160;&#160;&#160;<a class=\"el\" href=\"group__gamepad__buttons.html#gafc931248bda494b530cbe057f386a5ed\">GLFW_GAMEPAD_BUTTON_Y</a></td></tr>\n<tr class=\"separator:ga3a7ef6bcb768a08cd3bf142f7f09f802\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga544e396d092036a7d80c1e5f233f7a38\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__gamepad__axes.html#ga544e396d092036a7d80c1e5f233f7a38\">GLFW_GAMEPAD_AXIS_LEFT_X</a>&#160;&#160;&#160;0</td></tr>\n<tr class=\"separator:ga544e396d092036a7d80c1e5f233f7a38\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga64dcf2c6e9be50b7c556ff7671996dd5\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__gamepad__axes.html#ga64dcf2c6e9be50b7c556ff7671996dd5\">GLFW_GAMEPAD_AXIS_LEFT_Y</a>&#160;&#160;&#160;1</td></tr>\n<tr class=\"separator:ga64dcf2c6e9be50b7c556ff7671996dd5\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gabd6785106cd3c5a044a6e49a395ee2fc\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__gamepad__axes.html#gabd6785106cd3c5a044a6e49a395ee2fc\">GLFW_GAMEPAD_AXIS_RIGHT_X</a>&#160;&#160;&#160;2</td></tr>\n<tr class=\"separator:gabd6785106cd3c5a044a6e49a395ee2fc\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga1cc20566d44d521b7183681a8e88e2e4\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__gamepad__axes.html#ga1cc20566d44d521b7183681a8e88e2e4\">GLFW_GAMEPAD_AXIS_RIGHT_Y</a>&#160;&#160;&#160;3</td></tr>\n<tr class=\"separator:ga1cc20566d44d521b7183681a8e88e2e4\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga6d79561dd8907c37354426242901b86e\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__gamepad__axes.html#ga6d79561dd8907c37354426242901b86e\">GLFW_GAMEPAD_AXIS_LEFT_TRIGGER</a>&#160;&#160;&#160;4</td></tr>\n<tr class=\"separator:ga6d79561dd8907c37354426242901b86e\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga121a7d5d20589a423cd1634dd6ee6eab\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__gamepad__axes.html#ga121a7d5d20589a423cd1634dd6ee6eab\">GLFW_GAMEPAD_AXIS_RIGHT_TRIGGER</a>&#160;&#160;&#160;5</td></tr>\n<tr class=\"separator:ga121a7d5d20589a423cd1634dd6ee6eab\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga0818fd9433e1359692b7443293e5ac86\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__gamepad__axes.html#ga0818fd9433e1359692b7443293e5ac86\">GLFW_GAMEPAD_AXIS_LAST</a>&#160;&#160;&#160;<a class=\"el\" href=\"group__gamepad__axes.html#ga121a7d5d20589a423cd1634dd6ee6eab\">GLFW_GAMEPAD_AXIS_RIGHT_TRIGGER</a></td></tr>\n<tr class=\"separator:ga0818fd9433e1359692b7443293e5ac86\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gafa30deee5db4d69c4c93d116ed87dbf4\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__errors.html#gafa30deee5db4d69c4c93d116ed87dbf4\">GLFW_NO_ERROR</a>&#160;&#160;&#160;0</td></tr>\n<tr class=\"memdesc:gafa30deee5db4d69c4c93d116ed87dbf4\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">No error has occurred.  <a href=\"group__errors.html#gafa30deee5db4d69c4c93d116ed87dbf4\">More...</a><br /></td></tr>\n<tr class=\"separator:gafa30deee5db4d69c4c93d116ed87dbf4\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga2374ee02c177f12e1fa76ff3ed15e14a\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a>&#160;&#160;&#160;0x00010001</td></tr>\n<tr class=\"memdesc:ga2374ee02c177f12e1fa76ff3ed15e14a\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">GLFW has not been initialized.  <a href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">More...</a><br /></td></tr>\n<tr class=\"separator:ga2374ee02c177f12e1fa76ff3ed15e14a\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gaa8290386e9528ccb9e42a3a4e16fc0d0\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__errors.html#gaa8290386e9528ccb9e42a3a4e16fc0d0\">GLFW_NO_CURRENT_CONTEXT</a>&#160;&#160;&#160;0x00010002</td></tr>\n<tr class=\"memdesc:gaa8290386e9528ccb9e42a3a4e16fc0d0\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">No context is current for this thread.  <a href=\"group__errors.html#gaa8290386e9528ccb9e42a3a4e16fc0d0\">More...</a><br /></td></tr>\n<tr class=\"separator:gaa8290386e9528ccb9e42a3a4e16fc0d0\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga76f6bb9c4eea73db675f096b404593ce\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__errors.html#ga76f6bb9c4eea73db675f096b404593ce\">GLFW_INVALID_ENUM</a>&#160;&#160;&#160;0x00010003</td></tr>\n<tr class=\"memdesc:ga76f6bb9c4eea73db675f096b404593ce\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">One of the arguments to the function was an invalid enum value.  <a href=\"group__errors.html#ga76f6bb9c4eea73db675f096b404593ce\">More...</a><br /></td></tr>\n<tr class=\"separator:ga76f6bb9c4eea73db675f096b404593ce\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gaaf2ef9aa8202c2b82ac2d921e554c687\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__errors.html#gaaf2ef9aa8202c2b82ac2d921e554c687\">GLFW_INVALID_VALUE</a>&#160;&#160;&#160;0x00010004</td></tr>\n<tr class=\"memdesc:gaaf2ef9aa8202c2b82ac2d921e554c687\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">One of the arguments to the function was an invalid value.  <a href=\"group__errors.html#gaaf2ef9aa8202c2b82ac2d921e554c687\">More...</a><br /></td></tr>\n<tr class=\"separator:gaaf2ef9aa8202c2b82ac2d921e554c687\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga9023953a2bcb98c2906afd071d21ee7f\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__errors.html#ga9023953a2bcb98c2906afd071d21ee7f\">GLFW_OUT_OF_MEMORY</a>&#160;&#160;&#160;0x00010005</td></tr>\n<tr class=\"memdesc:ga9023953a2bcb98c2906afd071d21ee7f\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">A memory allocation failed.  <a href=\"group__errors.html#ga9023953a2bcb98c2906afd071d21ee7f\">More...</a><br /></td></tr>\n<tr class=\"separator:ga9023953a2bcb98c2906afd071d21ee7f\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga56882b290db23261cc6c053c40c2d08e\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__errors.html#ga56882b290db23261cc6c053c40c2d08e\">GLFW_API_UNAVAILABLE</a>&#160;&#160;&#160;0x00010006</td></tr>\n<tr class=\"memdesc:ga56882b290db23261cc6c053c40c2d08e\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">GLFW could not find support for the requested API on the system.  <a href=\"group__errors.html#ga56882b290db23261cc6c053c40c2d08e\">More...</a><br /></td></tr>\n<tr class=\"separator:ga56882b290db23261cc6c053c40c2d08e\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gad16c5565b4a69f9c2a9ac2c0dbc89462\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__errors.html#gad16c5565b4a69f9c2a9ac2c0dbc89462\">GLFW_VERSION_UNAVAILABLE</a>&#160;&#160;&#160;0x00010007</td></tr>\n<tr class=\"memdesc:gad16c5565b4a69f9c2a9ac2c0dbc89462\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">The requested OpenGL or OpenGL ES version is not available.  <a href=\"group__errors.html#gad16c5565b4a69f9c2a9ac2c0dbc89462\">More...</a><br /></td></tr>\n<tr class=\"separator:gad16c5565b4a69f9c2a9ac2c0dbc89462\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gad44162d78100ea5e87cdd38426b8c7a1\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1\">GLFW_PLATFORM_ERROR</a>&#160;&#160;&#160;0x00010008</td></tr>\n<tr class=\"memdesc:gad44162d78100ea5e87cdd38426b8c7a1\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">A platform-specific error occurred that does not match any of the more specific categories.  <a href=\"group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1\">More...</a><br /></td></tr>\n<tr class=\"separator:gad44162d78100ea5e87cdd38426b8c7a1\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga196e125ef261d94184e2b55c05762f14\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__errors.html#ga196e125ef261d94184e2b55c05762f14\">GLFW_FORMAT_UNAVAILABLE</a>&#160;&#160;&#160;0x00010009</td></tr>\n<tr class=\"memdesc:ga196e125ef261d94184e2b55c05762f14\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">The requested format is not supported or available.  <a href=\"group__errors.html#ga196e125ef261d94184e2b55c05762f14\">More...</a><br /></td></tr>\n<tr class=\"separator:ga196e125ef261d94184e2b55c05762f14\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gacff24d2757da752ae4c80bf452356487\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__errors.html#gacff24d2757da752ae4c80bf452356487\">GLFW_NO_WINDOW_CONTEXT</a>&#160;&#160;&#160;0x0001000A</td></tr>\n<tr class=\"memdesc:gacff24d2757da752ae4c80bf452356487\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">The specified window does not have an OpenGL or OpenGL ES context.  <a href=\"group__errors.html#gacff24d2757da752ae4c80bf452356487\">More...</a><br /></td></tr>\n<tr class=\"separator:gacff24d2757da752ae4c80bf452356487\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga54ddb14825a1541a56e22afb5f832a9e\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga54ddb14825a1541a56e22afb5f832a9e\">GLFW_FOCUSED</a>&#160;&#160;&#160;0x00020001</td></tr>\n<tr class=\"memdesc:ga54ddb14825a1541a56e22afb5f832a9e\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Input focus window hint and attribute.  <a href=\"group__window.html#ga54ddb14825a1541a56e22afb5f832a9e\">More...</a><br /></td></tr>\n<tr class=\"separator:ga54ddb14825a1541a56e22afb5f832a9e\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga39d44b7c056e55e581355a92d240b58a\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga39d44b7c056e55e581355a92d240b58a\">GLFW_ICONIFIED</a>&#160;&#160;&#160;0x00020002</td></tr>\n<tr class=\"memdesc:ga39d44b7c056e55e581355a92d240b58a\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Window iconification window attribute.  <a href=\"group__window.html#ga39d44b7c056e55e581355a92d240b58a\">More...</a><br /></td></tr>\n<tr class=\"separator:ga39d44b7c056e55e581355a92d240b58a\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gadba13c7a1b3aa40831eb2beedbd5bd1d\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#gadba13c7a1b3aa40831eb2beedbd5bd1d\">GLFW_RESIZABLE</a>&#160;&#160;&#160;0x00020003</td></tr>\n<tr class=\"memdesc:gadba13c7a1b3aa40831eb2beedbd5bd1d\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Window resize-ability window hint and attribute.  <a href=\"group__window.html#gadba13c7a1b3aa40831eb2beedbd5bd1d\">More...</a><br /></td></tr>\n<tr class=\"separator:gadba13c7a1b3aa40831eb2beedbd5bd1d\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gafb3cdc45297e06d8f1eb13adc69ca6c4\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#gafb3cdc45297e06d8f1eb13adc69ca6c4\">GLFW_VISIBLE</a>&#160;&#160;&#160;0x00020004</td></tr>\n<tr class=\"memdesc:gafb3cdc45297e06d8f1eb13adc69ca6c4\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Window visibility window hint and attribute.  <a href=\"group__window.html#gafb3cdc45297e06d8f1eb13adc69ca6c4\">More...</a><br /></td></tr>\n<tr class=\"separator:gafb3cdc45297e06d8f1eb13adc69ca6c4\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga21b854d36314c94d65aed84405b2f25e\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga21b854d36314c94d65aed84405b2f25e\">GLFW_DECORATED</a>&#160;&#160;&#160;0x00020005</td></tr>\n<tr class=\"memdesc:ga21b854d36314c94d65aed84405b2f25e\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Window decoration window hint and attribute.  <a href=\"group__window.html#ga21b854d36314c94d65aed84405b2f25e\">More...</a><br /></td></tr>\n<tr class=\"separator:ga21b854d36314c94d65aed84405b2f25e\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga9d9874fc928200136a6dcdad726aa252\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga9d9874fc928200136a6dcdad726aa252\">GLFW_AUTO_ICONIFY</a>&#160;&#160;&#160;0x00020006</td></tr>\n<tr class=\"memdesc:ga9d9874fc928200136a6dcdad726aa252\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Window auto-iconification window hint and attribute.  <a href=\"group__window.html#ga9d9874fc928200136a6dcdad726aa252\">More...</a><br /></td></tr>\n<tr class=\"separator:ga9d9874fc928200136a6dcdad726aa252\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga7fb0be51407783b41adbf5bec0b09d80\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga7fb0be51407783b41adbf5bec0b09d80\">GLFW_FLOATING</a>&#160;&#160;&#160;0x00020007</td></tr>\n<tr class=\"memdesc:ga7fb0be51407783b41adbf5bec0b09d80\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Window decoration window hint and attribute.  <a href=\"group__window.html#ga7fb0be51407783b41adbf5bec0b09d80\">More...</a><br /></td></tr>\n<tr class=\"separator:ga7fb0be51407783b41adbf5bec0b09d80\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gad8ccb396253ad0b72c6d4c917eb38a03\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#gad8ccb396253ad0b72c6d4c917eb38a03\">GLFW_MAXIMIZED</a>&#160;&#160;&#160;0x00020008</td></tr>\n<tr class=\"memdesc:gad8ccb396253ad0b72c6d4c917eb38a03\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Window maximization window hint and attribute.  <a href=\"group__window.html#gad8ccb396253ad0b72c6d4c917eb38a03\">More...</a><br /></td></tr>\n<tr class=\"separator:gad8ccb396253ad0b72c6d4c917eb38a03\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga5ac0847c0aa0b3619f2855707b8a7a77\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga5ac0847c0aa0b3619f2855707b8a7a77\">GLFW_CENTER_CURSOR</a>&#160;&#160;&#160;0x00020009</td></tr>\n<tr class=\"memdesc:ga5ac0847c0aa0b3619f2855707b8a7a77\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Cursor centering window hint.  <a href=\"group__window.html#ga5ac0847c0aa0b3619f2855707b8a7a77\">More...</a><br /></td></tr>\n<tr class=\"separator:ga5ac0847c0aa0b3619f2855707b8a7a77\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga60a0578c3b9449027d683a9c6abb9f14\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga60a0578c3b9449027d683a9c6abb9f14\">GLFW_TRANSPARENT_FRAMEBUFFER</a>&#160;&#160;&#160;0x0002000A</td></tr>\n<tr class=\"memdesc:ga60a0578c3b9449027d683a9c6abb9f14\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Window framebuffer transparency hint and attribute.  <a href=\"group__window.html#ga60a0578c3b9449027d683a9c6abb9f14\">More...</a><br /></td></tr>\n<tr class=\"separator:ga60a0578c3b9449027d683a9c6abb9f14\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga8665c71c6fa3d22425c6a0e8a3f89d8a\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga8665c71c6fa3d22425c6a0e8a3f89d8a\">GLFW_HOVERED</a>&#160;&#160;&#160;0x0002000B</td></tr>\n<tr class=\"memdesc:ga8665c71c6fa3d22425c6a0e8a3f89d8a\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Mouse cursor hover window attribute.  <a href=\"group__window.html#ga8665c71c6fa3d22425c6a0e8a3f89d8a\">More...</a><br /></td></tr>\n<tr class=\"separator:ga8665c71c6fa3d22425c6a0e8a3f89d8a\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gafa94b1da34bfd6488c0d709761504dfc\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#gafa94b1da34bfd6488c0d709761504dfc\">GLFW_FOCUS_ON_SHOW</a>&#160;&#160;&#160;0x0002000C</td></tr>\n<tr class=\"memdesc:gafa94b1da34bfd6488c0d709761504dfc\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Input focus on calling show window hint and attribute.  <a href=\"group__window.html#gafa94b1da34bfd6488c0d709761504dfc\">More...</a><br /></td></tr>\n<tr class=\"separator:gafa94b1da34bfd6488c0d709761504dfc\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gaf78ed8e417dbcc1e354906cc2708c982\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#gaf78ed8e417dbcc1e354906cc2708c982\">GLFW_RED_BITS</a>&#160;&#160;&#160;0x00021001</td></tr>\n<tr class=\"memdesc:gaf78ed8e417dbcc1e354906cc2708c982\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Framebuffer bit depth hint.  <a href=\"group__window.html#gaf78ed8e417dbcc1e354906cc2708c982\">More...</a><br /></td></tr>\n<tr class=\"separator:gaf78ed8e417dbcc1e354906cc2708c982\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gafba3b72638c914e5fb8a237dd4c50d4d\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#gafba3b72638c914e5fb8a237dd4c50d4d\">GLFW_GREEN_BITS</a>&#160;&#160;&#160;0x00021002</td></tr>\n<tr class=\"memdesc:gafba3b72638c914e5fb8a237dd4c50d4d\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Framebuffer bit depth hint.  <a href=\"group__window.html#gafba3b72638c914e5fb8a237dd4c50d4d\">More...</a><br /></td></tr>\n<tr class=\"separator:gafba3b72638c914e5fb8a237dd4c50d4d\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gab292ea403db6d514537b515311bf9ae3\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#gab292ea403db6d514537b515311bf9ae3\">GLFW_BLUE_BITS</a>&#160;&#160;&#160;0x00021003</td></tr>\n<tr class=\"memdesc:gab292ea403db6d514537b515311bf9ae3\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Framebuffer bit depth hint.  <a href=\"group__window.html#gab292ea403db6d514537b515311bf9ae3\">More...</a><br /></td></tr>\n<tr class=\"separator:gab292ea403db6d514537b515311bf9ae3\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gafed79a3f468997877da86c449bd43e8c\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#gafed79a3f468997877da86c449bd43e8c\">GLFW_ALPHA_BITS</a>&#160;&#160;&#160;0x00021004</td></tr>\n<tr class=\"memdesc:gafed79a3f468997877da86c449bd43e8c\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Framebuffer bit depth hint.  <a href=\"group__window.html#gafed79a3f468997877da86c449bd43e8c\">More...</a><br /></td></tr>\n<tr class=\"separator:gafed79a3f468997877da86c449bd43e8c\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga318a55eac1fee57dfe593b6d38149d07\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga318a55eac1fee57dfe593b6d38149d07\">GLFW_DEPTH_BITS</a>&#160;&#160;&#160;0x00021005</td></tr>\n<tr class=\"memdesc:ga318a55eac1fee57dfe593b6d38149d07\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Framebuffer bit depth hint.  <a href=\"group__window.html#ga318a55eac1fee57dfe593b6d38149d07\">More...</a><br /></td></tr>\n<tr class=\"separator:ga318a55eac1fee57dfe593b6d38149d07\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga5339890a45a1fb38e93cb9fcc5fd069d\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga5339890a45a1fb38e93cb9fcc5fd069d\">GLFW_STENCIL_BITS</a>&#160;&#160;&#160;0x00021006</td></tr>\n<tr class=\"memdesc:ga5339890a45a1fb38e93cb9fcc5fd069d\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Framebuffer bit depth hint.  <a href=\"group__window.html#ga5339890a45a1fb38e93cb9fcc5fd069d\">More...</a><br /></td></tr>\n<tr class=\"separator:ga5339890a45a1fb38e93cb9fcc5fd069d\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gaead34a9a683b2bc20eecf30ba738bfc6\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#gaead34a9a683b2bc20eecf30ba738bfc6\">GLFW_ACCUM_RED_BITS</a>&#160;&#160;&#160;0x00021007</td></tr>\n<tr class=\"memdesc:gaead34a9a683b2bc20eecf30ba738bfc6\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Framebuffer bit depth hint.  <a href=\"group__window.html#gaead34a9a683b2bc20eecf30ba738bfc6\">More...</a><br /></td></tr>\n<tr class=\"separator:gaead34a9a683b2bc20eecf30ba738bfc6\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga65713cee1326f8e9d806fdf93187b471\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga65713cee1326f8e9d806fdf93187b471\">GLFW_ACCUM_GREEN_BITS</a>&#160;&#160;&#160;0x00021008</td></tr>\n<tr class=\"memdesc:ga65713cee1326f8e9d806fdf93187b471\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Framebuffer bit depth hint.  <a href=\"group__window.html#ga65713cee1326f8e9d806fdf93187b471\">More...</a><br /></td></tr>\n<tr class=\"separator:ga65713cee1326f8e9d806fdf93187b471\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga22bbe9104a8ce1f8b88fb4f186aa36ce\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga22bbe9104a8ce1f8b88fb4f186aa36ce\">GLFW_ACCUM_BLUE_BITS</a>&#160;&#160;&#160;0x00021009</td></tr>\n<tr class=\"memdesc:ga22bbe9104a8ce1f8b88fb4f186aa36ce\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Framebuffer bit depth hint.  <a href=\"group__window.html#ga22bbe9104a8ce1f8b88fb4f186aa36ce\">More...</a><br /></td></tr>\n<tr class=\"separator:ga22bbe9104a8ce1f8b88fb4f186aa36ce\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gae829b55591c18169a40ab4067a041b1f\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#gae829b55591c18169a40ab4067a041b1f\">GLFW_ACCUM_ALPHA_BITS</a>&#160;&#160;&#160;0x0002100A</td></tr>\n<tr class=\"memdesc:gae829b55591c18169a40ab4067a041b1f\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Framebuffer bit depth hint.  <a href=\"group__window.html#gae829b55591c18169a40ab4067a041b1f\">More...</a><br /></td></tr>\n<tr class=\"separator:gae829b55591c18169a40ab4067a041b1f\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gab05108c5029443b371112b031d1fa174\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#gab05108c5029443b371112b031d1fa174\">GLFW_AUX_BUFFERS</a>&#160;&#160;&#160;0x0002100B</td></tr>\n<tr class=\"memdesc:gab05108c5029443b371112b031d1fa174\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Framebuffer auxiliary buffer hint.  <a href=\"group__window.html#gab05108c5029443b371112b031d1fa174\">More...</a><br /></td></tr>\n<tr class=\"separator:gab05108c5029443b371112b031d1fa174\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga83d991efca02537e2d69969135b77b03\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga83d991efca02537e2d69969135b77b03\">GLFW_STEREO</a>&#160;&#160;&#160;0x0002100C</td></tr>\n<tr class=\"memdesc:ga83d991efca02537e2d69969135b77b03\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">OpenGL stereoscopic rendering hint.  <a href=\"group__window.html#ga83d991efca02537e2d69969135b77b03\">More...</a><br /></td></tr>\n<tr class=\"separator:ga83d991efca02537e2d69969135b77b03\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga2cdf86fdcb7722fb8829c4e201607535\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga2cdf86fdcb7722fb8829c4e201607535\">GLFW_SAMPLES</a>&#160;&#160;&#160;0x0002100D</td></tr>\n<tr class=\"memdesc:ga2cdf86fdcb7722fb8829c4e201607535\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Framebuffer MSAA samples hint.  <a href=\"group__window.html#ga2cdf86fdcb7722fb8829c4e201607535\">More...</a><br /></td></tr>\n<tr class=\"separator:ga2cdf86fdcb7722fb8829c4e201607535\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga444a8f00414a63220591f9fdb7b5642b\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga444a8f00414a63220591f9fdb7b5642b\">GLFW_SRGB_CAPABLE</a>&#160;&#160;&#160;0x0002100E</td></tr>\n<tr class=\"memdesc:ga444a8f00414a63220591f9fdb7b5642b\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Framebuffer sRGB hint.  <a href=\"group__window.html#ga444a8f00414a63220591f9fdb7b5642b\">More...</a><br /></td></tr>\n<tr class=\"separator:ga444a8f00414a63220591f9fdb7b5642b\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga0f20825e6e47ee8ba389024519682212\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga0f20825e6e47ee8ba389024519682212\">GLFW_REFRESH_RATE</a>&#160;&#160;&#160;0x0002100F</td></tr>\n<tr class=\"memdesc:ga0f20825e6e47ee8ba389024519682212\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Monitor refresh rate hint.  <a href=\"group__window.html#ga0f20825e6e47ee8ba389024519682212\">More...</a><br /></td></tr>\n<tr class=\"separator:ga0f20825e6e47ee8ba389024519682212\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga714a5d569e8a274ea58fdfa020955339\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga714a5d569e8a274ea58fdfa020955339\">GLFW_DOUBLEBUFFER</a>&#160;&#160;&#160;0x00021010</td></tr>\n<tr class=\"memdesc:ga714a5d569e8a274ea58fdfa020955339\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Framebuffer double buffering hint.  <a href=\"group__window.html#ga714a5d569e8a274ea58fdfa020955339\">More...</a><br /></td></tr>\n<tr class=\"separator:ga714a5d569e8a274ea58fdfa020955339\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga649309cf72a3d3de5b1348ca7936c95b\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga649309cf72a3d3de5b1348ca7936c95b\">GLFW_CLIENT_API</a>&#160;&#160;&#160;0x00022001</td></tr>\n<tr class=\"memdesc:ga649309cf72a3d3de5b1348ca7936c95b\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Context client API hint and attribute.  <a href=\"group__window.html#ga649309cf72a3d3de5b1348ca7936c95b\">More...</a><br /></td></tr>\n<tr class=\"separator:ga649309cf72a3d3de5b1348ca7936c95b\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gafe5e4922de1f9932d7e9849bb053b0c0\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#gafe5e4922de1f9932d7e9849bb053b0c0\">GLFW_CONTEXT_VERSION_MAJOR</a>&#160;&#160;&#160;0x00022002</td></tr>\n<tr class=\"memdesc:gafe5e4922de1f9932d7e9849bb053b0c0\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Context client API major version hint and attribute.  <a href=\"group__window.html#gafe5e4922de1f9932d7e9849bb053b0c0\">More...</a><br /></td></tr>\n<tr class=\"separator:gafe5e4922de1f9932d7e9849bb053b0c0\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga31aca791e4b538c4e4a771eb95cc2d07\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga31aca791e4b538c4e4a771eb95cc2d07\">GLFW_CONTEXT_VERSION_MINOR</a>&#160;&#160;&#160;0x00022003</td></tr>\n<tr class=\"memdesc:ga31aca791e4b538c4e4a771eb95cc2d07\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Context client API minor version hint and attribute.  <a href=\"group__window.html#ga31aca791e4b538c4e4a771eb95cc2d07\">More...</a><br /></td></tr>\n<tr class=\"separator:ga31aca791e4b538c4e4a771eb95cc2d07\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gafb9475071aa77c6fb05ca5a5c8678a08\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#gafb9475071aa77c6fb05ca5a5c8678a08\">GLFW_CONTEXT_REVISION</a>&#160;&#160;&#160;0x00022004</td></tr>\n<tr class=\"memdesc:gafb9475071aa77c6fb05ca5a5c8678a08\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Context client API revision number hint and attribute.  <a href=\"group__window.html#gafb9475071aa77c6fb05ca5a5c8678a08\">More...</a><br /></td></tr>\n<tr class=\"separator:gafb9475071aa77c6fb05ca5a5c8678a08\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gade3593916b4c507900aa2d6844810e00\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#gade3593916b4c507900aa2d6844810e00\">GLFW_CONTEXT_ROBUSTNESS</a>&#160;&#160;&#160;0x00022005</td></tr>\n<tr class=\"memdesc:gade3593916b4c507900aa2d6844810e00\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Context robustness hint and attribute.  <a href=\"group__window.html#gade3593916b4c507900aa2d6844810e00\">More...</a><br /></td></tr>\n<tr class=\"separator:gade3593916b4c507900aa2d6844810e00\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga13d24b12465da8b28985f46c8557925b\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga13d24b12465da8b28985f46c8557925b\">GLFW_OPENGL_FORWARD_COMPAT</a>&#160;&#160;&#160;0x00022006</td></tr>\n<tr class=\"memdesc:ga13d24b12465da8b28985f46c8557925b\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">OpenGL forward-compatibility hint and attribute.  <a href=\"group__window.html#ga13d24b12465da8b28985f46c8557925b\">More...</a><br /></td></tr>\n<tr class=\"separator:ga13d24b12465da8b28985f46c8557925b\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga87ec2df0b915201e950ca42d5d0831e1\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga87ec2df0b915201e950ca42d5d0831e1\">GLFW_OPENGL_DEBUG_CONTEXT</a>&#160;&#160;&#160;0x00022007</td></tr>\n<tr class=\"memdesc:ga87ec2df0b915201e950ca42d5d0831e1\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">OpenGL debug context hint and attribute.  <a href=\"group__window.html#ga87ec2df0b915201e950ca42d5d0831e1\">More...</a><br /></td></tr>\n<tr class=\"separator:ga87ec2df0b915201e950ca42d5d0831e1\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga44f3a6b4261fbe351e0b950b0f372e12\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga44f3a6b4261fbe351e0b950b0f372e12\">GLFW_OPENGL_PROFILE</a>&#160;&#160;&#160;0x00022008</td></tr>\n<tr class=\"memdesc:ga44f3a6b4261fbe351e0b950b0f372e12\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">OpenGL profile hint and attribute.  <a href=\"group__window.html#ga44f3a6b4261fbe351e0b950b0f372e12\">More...</a><br /></td></tr>\n<tr class=\"separator:ga44f3a6b4261fbe351e0b950b0f372e12\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga72b648a8378fe3310c7c7bbecc0f7be6\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga72b648a8378fe3310c7c7bbecc0f7be6\">GLFW_CONTEXT_RELEASE_BEHAVIOR</a>&#160;&#160;&#160;0x00022009</td></tr>\n<tr class=\"memdesc:ga72b648a8378fe3310c7c7bbecc0f7be6\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Context flush-on-release hint and attribute.  <a href=\"group__window.html#ga72b648a8378fe3310c7c7bbecc0f7be6\">More...</a><br /></td></tr>\n<tr class=\"separator:ga72b648a8378fe3310c7c7bbecc0f7be6\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga5a52fdfd46d8249c211f923675728082\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga5a52fdfd46d8249c211f923675728082\">GLFW_CONTEXT_NO_ERROR</a>&#160;&#160;&#160;0x0002200A</td></tr>\n<tr class=\"memdesc:ga5a52fdfd46d8249c211f923675728082\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Context error suppression hint and attribute.  <a href=\"group__window.html#ga5a52fdfd46d8249c211f923675728082\">More...</a><br /></td></tr>\n<tr class=\"separator:ga5a52fdfd46d8249c211f923675728082\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga5154cebfcd831c1cc63a4d5ac9bb4486\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga5154cebfcd831c1cc63a4d5ac9bb4486\">GLFW_CONTEXT_CREATION_API</a>&#160;&#160;&#160;0x0002200B</td></tr>\n<tr class=\"memdesc:ga5154cebfcd831c1cc63a4d5ac9bb4486\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Context creation API hint and attribute.  <a href=\"group__window.html#ga5154cebfcd831c1cc63a4d5ac9bb4486\">More...</a><br /></td></tr>\n<tr class=\"separator:ga5154cebfcd831c1cc63a4d5ac9bb4486\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga620bc4280c7eab81ac9f02204500ed47\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga620bc4280c7eab81ac9f02204500ed47\">GLFW_SCALE_TO_MONITOR</a>&#160;&#160;&#160;0x0002200C</td></tr>\n<tr class=\"memdesc:ga620bc4280c7eab81ac9f02204500ed47\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Window content area scaling window <a class=\"el\" href=\"window_guide.html#GLFW_SCALE_TO_MONITOR\">window hint</a>.  <a href=\"group__window.html#ga620bc4280c7eab81ac9f02204500ed47\">More...</a><br /></td></tr>\n<tr class=\"separator:ga620bc4280c7eab81ac9f02204500ed47\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gab6ef2d02eb55800d249ccf1af253c35e\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#gab6ef2d02eb55800d249ccf1af253c35e\">GLFW_COCOA_RETINA_FRAMEBUFFER</a>&#160;&#160;&#160;0x00023001</td></tr>\n<tr class=\"memdesc:gab6ef2d02eb55800d249ccf1af253c35e\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">macOS specific <a class=\"el\" href=\"window_guide.html#GLFW_COCOA_RETINA_FRAMEBUFFER_hint\">window hint</a>.  <a href=\"group__window.html#gab6ef2d02eb55800d249ccf1af253c35e\">More...</a><br /></td></tr>\n<tr class=\"separator:gab6ef2d02eb55800d249ccf1af253c35e\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga70fa0fbc745de6aa824df79a580e84b5\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga70fa0fbc745de6aa824df79a580e84b5\">GLFW_COCOA_FRAME_NAME</a>&#160;&#160;&#160;0x00023002</td></tr>\n<tr class=\"memdesc:ga70fa0fbc745de6aa824df79a580e84b5\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">macOS specific <a class=\"el\" href=\"window_guide.html#GLFW_COCOA_FRAME_NAME_hint\">window hint</a>.  <a href=\"group__window.html#ga70fa0fbc745de6aa824df79a580e84b5\">More...</a><br /></td></tr>\n<tr class=\"separator:ga70fa0fbc745de6aa824df79a580e84b5\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga53c84ed2ddd94e15bbd44b1f6f7feafc\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga53c84ed2ddd94e15bbd44b1f6f7feafc\">GLFW_COCOA_GRAPHICS_SWITCHING</a>&#160;&#160;&#160;0x00023003</td></tr>\n<tr class=\"memdesc:ga53c84ed2ddd94e15bbd44b1f6f7feafc\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">macOS specific <a class=\"el\" href=\"window_guide.html#GLFW_COCOA_GRAPHICS_SWITCHING_hint\">window hint</a>.  <a href=\"group__window.html#ga53c84ed2ddd94e15bbd44b1f6f7feafc\">More...</a><br /></td></tr>\n<tr class=\"separator:ga53c84ed2ddd94e15bbd44b1f6f7feafc\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gae5a9ea2fccccd92edbd343fc56461114\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#gae5a9ea2fccccd92edbd343fc56461114\">GLFW_X11_CLASS_NAME</a>&#160;&#160;&#160;0x00024001</td></tr>\n<tr class=\"memdesc:gae5a9ea2fccccd92edbd343fc56461114\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">X11 specific <a class=\"el\" href=\"window_guide.html#GLFW_X11_CLASS_NAME_hint\">window hint</a>.  <a href=\"group__window.html#gae5a9ea2fccccd92edbd343fc56461114\">More...</a><br /></td></tr>\n<tr class=\"separator:gae5a9ea2fccccd92edbd343fc56461114\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga494c3c0d911e4b860b946530a3e389e8\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga494c3c0d911e4b860b946530a3e389e8\">GLFW_X11_INSTANCE_NAME</a>&#160;&#160;&#160;0x00024002</td></tr>\n<tr class=\"memdesc:ga494c3c0d911e4b860b946530a3e389e8\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">X11 specific <a class=\"el\" href=\"window_guide.html#GLFW_X11_CLASS_NAME_hint\">window hint</a>.  <a href=\"group__window.html#ga494c3c0d911e4b860b946530a3e389e8\">More...</a><br /></td></tr>\n<tr class=\"separator:ga494c3c0d911e4b860b946530a3e389e8\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:a8f6dcdc968d214ff14779564f1389264\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"glfw3_8h.html#a8f6dcdc968d214ff14779564f1389264\">GLFW_NO_API</a>&#160;&#160;&#160;0</td></tr>\n<tr class=\"separator:a8f6dcdc968d214ff14779564f1389264\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:a01b3f66db266341425e9abee6b257db2\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"glfw3_8h.html#a01b3f66db266341425e9abee6b257db2\">GLFW_OPENGL_API</a>&#160;&#160;&#160;0x00030001</td></tr>\n<tr class=\"separator:a01b3f66db266341425e9abee6b257db2\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:a28d9b3bc6c2a522d815c8e146595051f\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"glfw3_8h.html#a28d9b3bc6c2a522d815c8e146595051f\">GLFW_OPENGL_ES_API</a>&#160;&#160;&#160;0x00030002</td></tr>\n<tr class=\"separator:a28d9b3bc6c2a522d815c8e146595051f\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:a8b306cb27f5bb0d6d67c7356a0e0fc34\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"glfw3_8h.html#a8b306cb27f5bb0d6d67c7356a0e0fc34\">GLFW_NO_ROBUSTNESS</a>&#160;&#160;&#160;0</td></tr>\n<tr class=\"separator:a8b306cb27f5bb0d6d67c7356a0e0fc34\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:aee84a679230d205005e22487ff678a85\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"glfw3_8h.html#aee84a679230d205005e22487ff678a85\">GLFW_NO_RESET_NOTIFICATION</a>&#160;&#160;&#160;0x00031001</td></tr>\n<tr class=\"separator:aee84a679230d205005e22487ff678a85\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:aec1132f245143fc915b2f0995228564c\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"glfw3_8h.html#aec1132f245143fc915b2f0995228564c\">GLFW_LOSE_CONTEXT_ON_RESET</a>&#160;&#160;&#160;0x00031002</td></tr>\n<tr class=\"separator:aec1132f245143fc915b2f0995228564c\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ad6f2335d6f21cc9bab96633b1c111d5f\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"glfw3_8h.html#ad6f2335d6f21cc9bab96633b1c111d5f\">GLFW_OPENGL_ANY_PROFILE</a>&#160;&#160;&#160;0</td></tr>\n<tr class=\"separator:ad6f2335d6f21cc9bab96633b1c111d5f\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:af094bb16da76f66ebceb19ee213b3de8\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"glfw3_8h.html#af094bb16da76f66ebceb19ee213b3de8\">GLFW_OPENGL_CORE_PROFILE</a>&#160;&#160;&#160;0x00032001</td></tr>\n<tr class=\"separator:af094bb16da76f66ebceb19ee213b3de8\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ac06b663d79c8fcf04669cc8fcc0b7670\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"glfw3_8h.html#ac06b663d79c8fcf04669cc8fcc0b7670\">GLFW_OPENGL_COMPAT_PROFILE</a>&#160;&#160;&#160;0x00032002</td></tr>\n<tr class=\"separator:ac06b663d79c8fcf04669cc8fcc0b7670\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:aade31da5b884a84a7625c6b059b9132c\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"glfw3_8h.html#aade31da5b884a84a7625c6b059b9132c\">GLFW_CURSOR</a>&#160;&#160;&#160;0x00033001</td></tr>\n<tr class=\"separator:aade31da5b884a84a7625c6b059b9132c\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ae3bbe2315b7691ab088159eb6c9110fc\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"glfw3_8h.html#ae3bbe2315b7691ab088159eb6c9110fc\">GLFW_STICKY_KEYS</a>&#160;&#160;&#160;0x00033002</td></tr>\n<tr class=\"separator:ae3bbe2315b7691ab088159eb6c9110fc\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:a4d7ce8ce71030c3b04e2b78145bc59d1\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"glfw3_8h.html#a4d7ce8ce71030c3b04e2b78145bc59d1\">GLFW_STICKY_MOUSE_BUTTONS</a>&#160;&#160;&#160;0x00033003</td></tr>\n<tr class=\"separator:a4d7ce8ce71030c3b04e2b78145bc59d1\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:a07b84de0b52143e1958f88a7d9105947\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"glfw3_8h.html#a07b84de0b52143e1958f88a7d9105947\">GLFW_LOCK_KEY_MODS</a>&#160;&#160;&#160;0x00033004</td></tr>\n<tr class=\"separator:a07b84de0b52143e1958f88a7d9105947\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:aeeda1be76a44a1fc97c1282e06281fbb\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"glfw3_8h.html#aeeda1be76a44a1fc97c1282e06281fbb\">GLFW_RAW_MOUSE_MOTION</a>&#160;&#160;&#160;0x00033005</td></tr>\n<tr class=\"separator:aeeda1be76a44a1fc97c1282e06281fbb\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ae04dd25c8577e19fa8c97368561f6c68\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"glfw3_8h.html#ae04dd25c8577e19fa8c97368561f6c68\">GLFW_CURSOR_NORMAL</a>&#160;&#160;&#160;0x00034001</td></tr>\n<tr class=\"separator:ae04dd25c8577e19fa8c97368561f6c68\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ac4d5cb9d78de8573349c58763d53bf11\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"glfw3_8h.html#ac4d5cb9d78de8573349c58763d53bf11\">GLFW_CURSOR_HIDDEN</a>&#160;&#160;&#160;0x00034002</td></tr>\n<tr class=\"separator:ac4d5cb9d78de8573349c58763d53bf11\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:a2315b99a329ce53e6a13a9d46fd5ca88\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"glfw3_8h.html#a2315b99a329ce53e6a13a9d46fd5ca88\">GLFW_CURSOR_DISABLED</a>&#160;&#160;&#160;0x00034003</td></tr>\n<tr class=\"separator:a2315b99a329ce53e6a13a9d46fd5ca88\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:a6b47d806f285efe9bfd7aeec667297ee\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"glfw3_8h.html#a6b47d806f285efe9bfd7aeec667297ee\">GLFW_ANY_RELEASE_BEHAVIOR</a>&#160;&#160;&#160;0</td></tr>\n<tr class=\"separator:a6b47d806f285efe9bfd7aeec667297ee\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:a999961d391db49cb4f949c1dece0e13b\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"glfw3_8h.html#a999961d391db49cb4f949c1dece0e13b\">GLFW_RELEASE_BEHAVIOR_FLUSH</a>&#160;&#160;&#160;0x00035001</td></tr>\n<tr class=\"separator:a999961d391db49cb4f949c1dece0e13b\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:afca09088eccacdce4b59036cfae349c5\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"glfw3_8h.html#afca09088eccacdce4b59036cfae349c5\">GLFW_RELEASE_BEHAVIOR_NONE</a>&#160;&#160;&#160;0x00035002</td></tr>\n<tr class=\"separator:afca09088eccacdce4b59036cfae349c5\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:a0494c9bfd3f584ab41e6dbeeaa0e6a19\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"glfw3_8h.html#a0494c9bfd3f584ab41e6dbeeaa0e6a19\">GLFW_NATIVE_CONTEXT_API</a>&#160;&#160;&#160;0x00036001</td></tr>\n<tr class=\"separator:a0494c9bfd3f584ab41e6dbeeaa0e6a19\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:a03cf65c9ab01fc8b872ba58842c531c9\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"glfw3_8h.html#a03cf65c9ab01fc8b872ba58842c531c9\">GLFW_EGL_CONTEXT_API</a>&#160;&#160;&#160;0x00036002</td></tr>\n<tr class=\"separator:a03cf65c9ab01fc8b872ba58842c531c9\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:afd34a473af9fa81f317910ea371b19e3\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"glfw3_8h.html#afd34a473af9fa81f317910ea371b19e3\">GLFW_OSMESA_CONTEXT_API</a>&#160;&#160;&#160;0x00036003</td></tr>\n<tr class=\"separator:afd34a473af9fa81f317910ea371b19e3\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga8ab0e717245b85506cb0eaefdea39d0a\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__shapes.html#ga8ab0e717245b85506cb0eaefdea39d0a\">GLFW_ARROW_CURSOR</a>&#160;&#160;&#160;0x00036001</td></tr>\n<tr class=\"memdesc:ga8ab0e717245b85506cb0eaefdea39d0a\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">The regular arrow cursor shape.  <a href=\"group__shapes.html#ga8ab0e717245b85506cb0eaefdea39d0a\">More...</a><br /></td></tr>\n<tr class=\"separator:ga8ab0e717245b85506cb0eaefdea39d0a\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga36185f4375eaada1b04e431244774c86\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__shapes.html#ga36185f4375eaada1b04e431244774c86\">GLFW_IBEAM_CURSOR</a>&#160;&#160;&#160;0x00036002</td></tr>\n<tr class=\"memdesc:ga36185f4375eaada1b04e431244774c86\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">The text input I-beam cursor shape.  <a href=\"group__shapes.html#ga36185f4375eaada1b04e431244774c86\">More...</a><br /></td></tr>\n<tr class=\"separator:ga36185f4375eaada1b04e431244774c86\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga8af88c0ea05ab9e8f9ac1530e8873c22\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__shapes.html#ga8af88c0ea05ab9e8f9ac1530e8873c22\">GLFW_CROSSHAIR_CURSOR</a>&#160;&#160;&#160;0x00036003</td></tr>\n<tr class=\"memdesc:ga8af88c0ea05ab9e8f9ac1530e8873c22\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">The crosshair shape.  <a href=\"group__shapes.html#ga8af88c0ea05ab9e8f9ac1530e8873c22\">More...</a><br /></td></tr>\n<tr class=\"separator:ga8af88c0ea05ab9e8f9ac1530e8873c22\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga1db35e20849e0837c82e3dc1fd797263\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__shapes.html#ga1db35e20849e0837c82e3dc1fd797263\">GLFW_HAND_CURSOR</a>&#160;&#160;&#160;0x00036004</td></tr>\n<tr class=\"memdesc:ga1db35e20849e0837c82e3dc1fd797263\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">The hand shape.  <a href=\"group__shapes.html#ga1db35e20849e0837c82e3dc1fd797263\">More...</a><br /></td></tr>\n<tr class=\"separator:ga1db35e20849e0837c82e3dc1fd797263\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gabb3eb0109f11bb808fc34659177ca962\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__shapes.html#gabb3eb0109f11bb808fc34659177ca962\">GLFW_HRESIZE_CURSOR</a>&#160;&#160;&#160;0x00036005</td></tr>\n<tr class=\"memdesc:gabb3eb0109f11bb808fc34659177ca962\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">The horizontal resize arrow shape.  <a href=\"group__shapes.html#gabb3eb0109f11bb808fc34659177ca962\">More...</a><br /></td></tr>\n<tr class=\"separator:gabb3eb0109f11bb808fc34659177ca962\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gaf024f0e1ff8366fb2b5c260509a1fce5\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__shapes.html#gaf024f0e1ff8366fb2b5c260509a1fce5\">GLFW_VRESIZE_CURSOR</a>&#160;&#160;&#160;0x00036006</td></tr>\n<tr class=\"memdesc:gaf024f0e1ff8366fb2b5c260509a1fce5\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">The vertical resize arrow shape.  <a href=\"group__shapes.html#gaf024f0e1ff8366fb2b5c260509a1fce5\">More...</a><br /></td></tr>\n<tr class=\"separator:gaf024f0e1ff8366fb2b5c260509a1fce5\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:abe11513fd1ffbee5bb9b173f06028b9e\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"glfw3_8h.html#abe11513fd1ffbee5bb9b173f06028b9e\">GLFW_CONNECTED</a>&#160;&#160;&#160;0x00040001</td></tr>\n<tr class=\"separator:abe11513fd1ffbee5bb9b173f06028b9e\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:aab64b25921ef21d89252d6f0a71bfc32\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"glfw3_8h.html#aab64b25921ef21d89252d6f0a71bfc32\">GLFW_DISCONNECTED</a>&#160;&#160;&#160;0x00040002</td></tr>\n<tr class=\"separator:aab64b25921ef21d89252d6f0a71bfc32\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gab9c0534709fda03ec8959201da3a9a18\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__init.html#gab9c0534709fda03ec8959201da3a9a18\">GLFW_JOYSTICK_HAT_BUTTONS</a>&#160;&#160;&#160;0x00050001</td></tr>\n<tr class=\"memdesc:gab9c0534709fda03ec8959201da3a9a18\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Joystick hat buttons init hint.  <a href=\"group__init.html#gab9c0534709fda03ec8959201da3a9a18\">More...</a><br /></td></tr>\n<tr class=\"separator:gab9c0534709fda03ec8959201da3a9a18\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gab937983147a3158d45f88fad7129d9f2\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__init.html#gab937983147a3158d45f88fad7129d9f2\">GLFW_COCOA_CHDIR_RESOURCES</a>&#160;&#160;&#160;0x00051001</td></tr>\n<tr class=\"memdesc:gab937983147a3158d45f88fad7129d9f2\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">macOS specific init hint.  <a href=\"group__init.html#gab937983147a3158d45f88fad7129d9f2\">More...</a><br /></td></tr>\n<tr class=\"separator:gab937983147a3158d45f88fad7129d9f2\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga71e0b4ce2f2696a84a9b8c5e12dc70cf\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__init.html#ga71e0b4ce2f2696a84a9b8c5e12dc70cf\">GLFW_COCOA_MENUBAR</a>&#160;&#160;&#160;0x00051002</td></tr>\n<tr class=\"memdesc:ga71e0b4ce2f2696a84a9b8c5e12dc70cf\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">macOS specific init hint.  <a href=\"group__init.html#ga71e0b4ce2f2696a84a9b8c5e12dc70cf\">More...</a><br /></td></tr>\n<tr class=\"separator:ga71e0b4ce2f2696a84a9b8c5e12dc70cf\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:a7a2edf2c18446833d27d07f1b7f3d571\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"glfw3_8h.html#a7a2edf2c18446833d27d07f1b7f3d571\">GLFW_DONT_CARE</a>&#160;&#160;&#160;-1</td></tr>\n<tr class=\"separator:a7a2edf2c18446833d27d07f1b7f3d571\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:aa97755eb47e4bf2727ad45d610e18206\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"glfw3_8h.html#aa97755eb47e4bf2727ad45d610e18206\">GLAPIENTRY</a>&#160;&#160;&#160;APIENTRY</td></tr>\n<tr class=\"separator:aa97755eb47e4bf2727ad45d610e18206\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr><td colspan=\"2\"><div class=\"groupHeader\">GLFW version macros</div></td></tr>\n<tr class=\"memitem:ga6337d9ea43b22fc529b2bba066b4a576\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__init.html#ga6337d9ea43b22fc529b2bba066b4a576\">GLFW_VERSION_MAJOR</a>&#160;&#160;&#160;3</td></tr>\n<tr class=\"memdesc:ga6337d9ea43b22fc529b2bba066b4a576\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">The major version number of the GLFW library.  <a href=\"group__init.html#ga6337d9ea43b22fc529b2bba066b4a576\">More...</a><br /></td></tr>\n<tr class=\"separator:ga6337d9ea43b22fc529b2bba066b4a576\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gaf80d40f0aea7088ff337606e9c48f7a3\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__init.html#gaf80d40f0aea7088ff337606e9c48f7a3\">GLFW_VERSION_MINOR</a>&#160;&#160;&#160;3</td></tr>\n<tr class=\"memdesc:gaf80d40f0aea7088ff337606e9c48f7a3\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">The minor version number of the GLFW library.  <a href=\"group__init.html#gaf80d40f0aea7088ff337606e9c48f7a3\">More...</a><br /></td></tr>\n<tr class=\"separator:gaf80d40f0aea7088ff337606e9c48f7a3\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gab72ae2e2035d9ea461abc3495eac0502\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__init.html#gab72ae2e2035d9ea461abc3495eac0502\">GLFW_VERSION_REVISION</a>&#160;&#160;&#160;2</td></tr>\n<tr class=\"memdesc:gab72ae2e2035d9ea461abc3495eac0502\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">The revision number of the GLFW library.  <a href=\"group__init.html#gab72ae2e2035d9ea461abc3495eac0502\">More...</a><br /></td></tr>\n<tr class=\"separator:gab72ae2e2035d9ea461abc3495eac0502\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr><td colspan=\"2\"><div class=\"groupHeader\">Key and button actions</div></td></tr>\n<tr class=\"memitem:gada11d965c4da13090ad336e030e4d11f\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__input.html#gada11d965c4da13090ad336e030e4d11f\">GLFW_RELEASE</a>&#160;&#160;&#160;0</td></tr>\n<tr class=\"memdesc:gada11d965c4da13090ad336e030e4d11f\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">The key or mouse button was released.  <a href=\"group__input.html#gada11d965c4da13090ad336e030e4d11f\">More...</a><br /></td></tr>\n<tr class=\"separator:gada11d965c4da13090ad336e030e4d11f\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga2485743d0b59df3791c45951c4195265\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__input.html#ga2485743d0b59df3791c45951c4195265\">GLFW_PRESS</a>&#160;&#160;&#160;1</td></tr>\n<tr class=\"memdesc:ga2485743d0b59df3791c45951c4195265\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">The key or mouse button was pressed.  <a href=\"group__input.html#ga2485743d0b59df3791c45951c4195265\">More...</a><br /></td></tr>\n<tr class=\"separator:ga2485743d0b59df3791c45951c4195265\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gac96fd3b9fc66c6f0eebaf6532595338f\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__input.html#gac96fd3b9fc66c6f0eebaf6532595338f\">GLFW_REPEAT</a>&#160;&#160;&#160;2</td></tr>\n<tr class=\"memdesc:gac96fd3b9fc66c6f0eebaf6532595338f\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">The key was held down until it repeated.  <a href=\"group__input.html#gac96fd3b9fc66c6f0eebaf6532595338f\">More...</a><br /></td></tr>\n<tr class=\"separator:gac96fd3b9fc66c6f0eebaf6532595338f\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n</table><table class=\"memberdecls\">\n<tr class=\"heading\"><td colspan=\"2\"><h2 class=\"groupheader\"><a name=\"typedef-members\"></a>\nTypedefs</h2></td></tr>\n<tr class=\"memitem:ga3d47c2d2fbe0be9c505d0e04e91a133c\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">typedef void(*&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__context.html#ga3d47c2d2fbe0be9c505d0e04e91a133c\">GLFWglproc</a>) (void)</td></tr>\n<tr class=\"memdesc:ga3d47c2d2fbe0be9c505d0e04e91a133c\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Client API function pointer type.  <a href=\"group__context.html#ga3d47c2d2fbe0be9c505d0e04e91a133c\">More...</a><br /></td></tr>\n<tr class=\"separator:ga3d47c2d2fbe0be9c505d0e04e91a133c\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga70c01918dc9d233a4fbe0681a43018af\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">typedef void(*&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__vulkan.html#ga70c01918dc9d233a4fbe0681a43018af\">GLFWvkproc</a>) (void)</td></tr>\n<tr class=\"memdesc:ga70c01918dc9d233a4fbe0681a43018af\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Vulkan API function pointer type.  <a href=\"group__vulkan.html#ga70c01918dc9d233a4fbe0681a43018af\">More...</a><br /></td></tr>\n<tr class=\"separator:ga70c01918dc9d233a4fbe0681a43018af\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga8d9efd1cde9426692c73fe40437d0ae3\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">typedef struct <a class=\"el\" href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a>&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a></td></tr>\n<tr class=\"memdesc:ga8d9efd1cde9426692c73fe40437d0ae3\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Opaque monitor object.  <a href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">More...</a><br /></td></tr>\n<tr class=\"separator:ga8d9efd1cde9426692c73fe40437d0ae3\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga3c96d80d363e67d13a41b5d1821f3242\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">typedef struct <a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a></td></tr>\n<tr class=\"memdesc:ga3c96d80d363e67d13a41b5d1821f3242\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Opaque window object.  <a href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">More...</a><br /></td></tr>\n<tr class=\"separator:ga3c96d80d363e67d13a41b5d1821f3242\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga89261ae18c75e863aaf2656ecdd238f4\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">typedef struct <a class=\"el\" href=\"group__input.html#ga89261ae18c75e863aaf2656ecdd238f4\">GLFWcursor</a>&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__input.html#ga89261ae18c75e863aaf2656ecdd238f4\">GLFWcursor</a></td></tr>\n<tr class=\"memdesc:ga89261ae18c75e863aaf2656ecdd238f4\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Opaque cursor object.  <a href=\"group__input.html#ga89261ae18c75e863aaf2656ecdd238f4\">More...</a><br /></td></tr>\n<tr class=\"separator:ga89261ae18c75e863aaf2656ecdd238f4\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga6b8a2639706d5c409fc1287e8f55e928\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">typedef void(*&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__init.html#ga6b8a2639706d5c409fc1287e8f55e928\">GLFWerrorfun</a>) (int, const char *)</td></tr>\n<tr class=\"memdesc:ga6b8a2639706d5c409fc1287e8f55e928\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">The function pointer type for error callbacks.  <a href=\"group__init.html#ga6b8a2639706d5c409fc1287e8f55e928\">More...</a><br /></td></tr>\n<tr class=\"separator:ga6b8a2639706d5c409fc1287e8f55e928\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gafd8db81fdb0e850549dc6bace5ed697a\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">typedef void(*&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#gafd8db81fdb0e850549dc6bace5ed697a\">GLFWwindowposfun</a>) (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *, int, int)</td></tr>\n<tr class=\"memdesc:gafd8db81fdb0e850549dc6bace5ed697a\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">The function pointer type for window position callbacks.  <a href=\"group__window.html#gafd8db81fdb0e850549dc6bace5ed697a\">More...</a><br /></td></tr>\n<tr class=\"separator:gafd8db81fdb0e850549dc6bace5ed697a\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gae49ee6ebc03fa2da024b89943a331355\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">typedef void(*&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#gae49ee6ebc03fa2da024b89943a331355\">GLFWwindowsizefun</a>) (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *, int, int)</td></tr>\n<tr class=\"memdesc:gae49ee6ebc03fa2da024b89943a331355\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">The function pointer type for window size callbacks.  <a href=\"group__window.html#gae49ee6ebc03fa2da024b89943a331355\">More...</a><br /></td></tr>\n<tr class=\"separator:gae49ee6ebc03fa2da024b89943a331355\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga93e7c2555bd837f4ed8b20f76cada72e\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">typedef void(*&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga93e7c2555bd837f4ed8b20f76cada72e\">GLFWwindowclosefun</a>) (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *)</td></tr>\n<tr class=\"memdesc:ga93e7c2555bd837f4ed8b20f76cada72e\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">The function pointer type for window close callbacks.  <a href=\"group__window.html#ga93e7c2555bd837f4ed8b20f76cada72e\">More...</a><br /></td></tr>\n<tr class=\"separator:ga93e7c2555bd837f4ed8b20f76cada72e\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga7a56f9e0227e2cd9470d80d919032e08\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">typedef void(*&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga7a56f9e0227e2cd9470d80d919032e08\">GLFWwindowrefreshfun</a>) (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *)</td></tr>\n<tr class=\"memdesc:ga7a56f9e0227e2cd9470d80d919032e08\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">The function pointer type for window content refresh callbacks.  <a href=\"group__window.html#ga7a56f9e0227e2cd9470d80d919032e08\">More...</a><br /></td></tr>\n<tr class=\"separator:ga7a56f9e0227e2cd9470d80d919032e08\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga58be2061828dd35080bb438405d3a7e2\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">typedef void(*&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga58be2061828dd35080bb438405d3a7e2\">GLFWwindowfocusfun</a>) (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *, int)</td></tr>\n<tr class=\"memdesc:ga58be2061828dd35080bb438405d3a7e2\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">The function pointer type for window focus callbacks.  <a href=\"group__window.html#ga58be2061828dd35080bb438405d3a7e2\">More...</a><br /></td></tr>\n<tr class=\"separator:ga58be2061828dd35080bb438405d3a7e2\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gad2d4e4c3d28b1242e742e8268b9528af\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">typedef void(*&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#gad2d4e4c3d28b1242e742e8268b9528af\">GLFWwindowiconifyfun</a>) (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *, int)</td></tr>\n<tr class=\"memdesc:gad2d4e4c3d28b1242e742e8268b9528af\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">The function pointer type for window iconify callbacks.  <a href=\"group__window.html#gad2d4e4c3d28b1242e742e8268b9528af\">More...</a><br /></td></tr>\n<tr class=\"separator:gad2d4e4c3d28b1242e742e8268b9528af\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga7269a3d1cb100c0081f95fc09afa4949\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">typedef void(*&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga7269a3d1cb100c0081f95fc09afa4949\">GLFWwindowmaximizefun</a>) (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *, int)</td></tr>\n<tr class=\"memdesc:ga7269a3d1cb100c0081f95fc09afa4949\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">The function pointer type for window maximize callbacks.  <a href=\"group__window.html#ga7269a3d1cb100c0081f95fc09afa4949\">More...</a><br /></td></tr>\n<tr class=\"separator:ga7269a3d1cb100c0081f95fc09afa4949\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga3e218ef9ff826129c55a7d5f6971a285\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">typedef void(*&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga3e218ef9ff826129c55a7d5f6971a285\">GLFWframebuffersizefun</a>) (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *, int, int)</td></tr>\n<tr class=\"memdesc:ga3e218ef9ff826129c55a7d5f6971a285\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">The function pointer type for framebuffer size callbacks.  <a href=\"group__window.html#ga3e218ef9ff826129c55a7d5f6971a285\">More...</a><br /></td></tr>\n<tr class=\"separator:ga3e218ef9ff826129c55a7d5f6971a285\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga1da46b65eafcc1a7ff0adb8f4a7b72fd\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">typedef void(*&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga1da46b65eafcc1a7ff0adb8f4a7b72fd\">GLFWwindowcontentscalefun</a>) (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *, float, float)</td></tr>\n<tr class=\"memdesc:ga1da46b65eafcc1a7ff0adb8f4a7b72fd\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">The function pointer type for window content scale callbacks.  <a href=\"group__window.html#ga1da46b65eafcc1a7ff0adb8f4a7b72fd\">More...</a><br /></td></tr>\n<tr class=\"separator:ga1da46b65eafcc1a7ff0adb8f4a7b72fd\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga39893a4a7e7c3239c98d29c9e084350c\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">typedef void(*&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__input.html#ga39893a4a7e7c3239c98d29c9e084350c\">GLFWmousebuttonfun</a>) (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *, int, int, int)</td></tr>\n<tr class=\"memdesc:ga39893a4a7e7c3239c98d29c9e084350c\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">The function pointer type for mouse button callbacks.  <a href=\"group__input.html#ga39893a4a7e7c3239c98d29c9e084350c\">More...</a><br /></td></tr>\n<tr class=\"separator:ga39893a4a7e7c3239c98d29c9e084350c\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga4cfad918fa836f09541e7b9acd36686c\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">typedef void(*&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__input.html#ga4cfad918fa836f09541e7b9acd36686c\">GLFWcursorposfun</a>) (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *, double, double)</td></tr>\n<tr class=\"memdesc:ga4cfad918fa836f09541e7b9acd36686c\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">The function pointer type for cursor position callbacks.  <a href=\"group__input.html#ga4cfad918fa836f09541e7b9acd36686c\">More...</a><br /></td></tr>\n<tr class=\"separator:ga4cfad918fa836f09541e7b9acd36686c\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga51ab436c41eeaed6db5a0c9403b1c840\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">typedef void(*&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__input.html#ga51ab436c41eeaed6db5a0c9403b1c840\">GLFWcursorenterfun</a>) (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *, int)</td></tr>\n<tr class=\"memdesc:ga51ab436c41eeaed6db5a0c9403b1c840\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">The function pointer type for cursor enter/leave callbacks.  <a href=\"group__input.html#ga51ab436c41eeaed6db5a0c9403b1c840\">More...</a><br /></td></tr>\n<tr class=\"separator:ga51ab436c41eeaed6db5a0c9403b1c840\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga4687e2199c60a18a8dd1da532e6d75c9\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">typedef void(*&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__input.html#ga4687e2199c60a18a8dd1da532e6d75c9\">GLFWscrollfun</a>) (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *, double, double)</td></tr>\n<tr class=\"memdesc:ga4687e2199c60a18a8dd1da532e6d75c9\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">The function pointer type for scroll callbacks.  <a href=\"group__input.html#ga4687e2199c60a18a8dd1da532e6d75c9\">More...</a><br /></td></tr>\n<tr class=\"separator:ga4687e2199c60a18a8dd1da532e6d75c9\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga0192a232a41e4e82948217c8ba94fdfd\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">typedef void(*&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__input.html#ga0192a232a41e4e82948217c8ba94fdfd\">GLFWkeyfun</a>) (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *, int, int, int, int)</td></tr>\n<tr class=\"memdesc:ga0192a232a41e4e82948217c8ba94fdfd\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">The function pointer type for keyboard key callbacks.  <a href=\"group__input.html#ga0192a232a41e4e82948217c8ba94fdfd\">More...</a><br /></td></tr>\n<tr class=\"separator:ga0192a232a41e4e82948217c8ba94fdfd\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gabf24451c7ceb1952bc02b17a0d5c3e5f\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">typedef void(*&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__input.html#gabf24451c7ceb1952bc02b17a0d5c3e5f\">GLFWcharfun</a>) (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *, unsigned int)</td></tr>\n<tr class=\"memdesc:gabf24451c7ceb1952bc02b17a0d5c3e5f\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">The function pointer type for Unicode character callbacks.  <a href=\"group__input.html#gabf24451c7ceb1952bc02b17a0d5c3e5f\">More...</a><br /></td></tr>\n<tr class=\"separator:gabf24451c7ceb1952bc02b17a0d5c3e5f\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gae36fb6897d2b7df9b128900c8ce9c507\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">typedef void(*&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__input.html#gae36fb6897d2b7df9b128900c8ce9c507\">GLFWcharmodsfun</a>) (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *, unsigned int, int)</td></tr>\n<tr class=\"memdesc:gae36fb6897d2b7df9b128900c8ce9c507\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">The function pointer type for Unicode character with modifiers callbacks.  <a href=\"group__input.html#gae36fb6897d2b7df9b128900c8ce9c507\">More...</a><br /></td></tr>\n<tr class=\"separator:gae36fb6897d2b7df9b128900c8ce9c507\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gafd0493dc32cd5ca5810e6148c0c026ea\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">typedef void(*&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__input.html#gafd0493dc32cd5ca5810e6148c0c026ea\">GLFWdropfun</a>) (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *, int, const char *[])</td></tr>\n<tr class=\"memdesc:gafd0493dc32cd5ca5810e6148c0c026ea\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">The function pointer type for path drop callbacks.  <a href=\"group__input.html#gafd0493dc32cd5ca5810e6148c0c026ea\">More...</a><br /></td></tr>\n<tr class=\"separator:gafd0493dc32cd5ca5810e6148c0c026ea\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga8a7ee579a66720f24d656526f3e44c63\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">typedef void(*&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__monitor.html#ga8a7ee579a66720f24d656526f3e44c63\">GLFWmonitorfun</a>) (<a class=\"el\" href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a> *, int)</td></tr>\n<tr class=\"memdesc:ga8a7ee579a66720f24d656526f3e44c63\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">The function pointer type for monitor configuration callbacks.  <a href=\"group__monitor.html#ga8a7ee579a66720f24d656526f3e44c63\">More...</a><br /></td></tr>\n<tr class=\"separator:ga8a7ee579a66720f24d656526f3e44c63\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gaa67aa597e974298c748bfe4fb17d406d\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">typedef void(*&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__input.html#gaa67aa597e974298c748bfe4fb17d406d\">GLFWjoystickfun</a>) (int, int)</td></tr>\n<tr class=\"memdesc:gaa67aa597e974298c748bfe4fb17d406d\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">The function pointer type for joystick configuration callbacks.  <a href=\"group__input.html#gaa67aa597e974298c748bfe4fb17d406d\">More...</a><br /></td></tr>\n<tr class=\"separator:gaa67aa597e974298c748bfe4fb17d406d\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gae48aadf4ea0967e6605c8f58fa5daccb\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">typedef struct <a class=\"el\" href=\"structGLFWvidmode.html\">GLFWvidmode</a>&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__monitor.html#gae48aadf4ea0967e6605c8f58fa5daccb\">GLFWvidmode</a></td></tr>\n<tr class=\"memdesc:gae48aadf4ea0967e6605c8f58fa5daccb\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Video mode type.  <a href=\"group__monitor.html#gae48aadf4ea0967e6605c8f58fa5daccb\">More...</a><br /></td></tr>\n<tr class=\"separator:gae48aadf4ea0967e6605c8f58fa5daccb\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gaec0bd37af673be8813592849f13e02f0\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">typedef struct <a class=\"el\" href=\"structGLFWgammaramp.html\">GLFWgammaramp</a>&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__monitor.html#gaec0bd37af673be8813592849f13e02f0\">GLFWgammaramp</a></td></tr>\n<tr class=\"memdesc:gaec0bd37af673be8813592849f13e02f0\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Gamma ramp.  <a href=\"group__monitor.html#gaec0bd37af673be8813592849f13e02f0\">More...</a><br /></td></tr>\n<tr class=\"separator:gaec0bd37af673be8813592849f13e02f0\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gac81c32f4437de7b3aa58ab62c3d9e5b1\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">typedef struct <a class=\"el\" href=\"structGLFWimage.html\">GLFWimage</a>&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#gac81c32f4437de7b3aa58ab62c3d9e5b1\">GLFWimage</a></td></tr>\n<tr class=\"memdesc:gac81c32f4437de7b3aa58ab62c3d9e5b1\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Image data.  <a href=\"group__window.html#gac81c32f4437de7b3aa58ab62c3d9e5b1\">More...</a><br /></td></tr>\n<tr class=\"separator:gac81c32f4437de7b3aa58ab62c3d9e5b1\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga0b86867abb735af3b959f61c44b1d029\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">typedef struct <a class=\"el\" href=\"structGLFWgamepadstate.html\">GLFWgamepadstate</a>&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__input.html#ga0b86867abb735af3b959f61c44b1d029\">GLFWgamepadstate</a></td></tr>\n<tr class=\"memdesc:ga0b86867abb735af3b959f61c44b1d029\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Gamepad input state.  <a href=\"group__input.html#ga0b86867abb735af3b959f61c44b1d029\">More...</a><br /></td></tr>\n<tr class=\"separator:ga0b86867abb735af3b959f61c44b1d029\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n</table><table class=\"memberdecls\">\n<tr class=\"heading\"><td colspan=\"2\"><h2 class=\"groupheader\"><a name=\"func-members\"></a>\nFunctions</h2></td></tr>\n<tr class=\"memitem:ga317aac130a235ab08c6db0834907d85e\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">int&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__init.html#ga317aac130a235ab08c6db0834907d85e\">glfwInit</a> (void)</td></tr>\n<tr class=\"memdesc:ga317aac130a235ab08c6db0834907d85e\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Initializes the GLFW library.  <a href=\"group__init.html#ga317aac130a235ab08c6db0834907d85e\">More...</a><br /></td></tr>\n<tr class=\"separator:ga317aac130a235ab08c6db0834907d85e\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gaaae48c0a18607ea4a4ba951d939f0901\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">void&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__init.html#gaaae48c0a18607ea4a4ba951d939f0901\">glfwTerminate</a> (void)</td></tr>\n<tr class=\"memdesc:gaaae48c0a18607ea4a4ba951d939f0901\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Terminates the GLFW library.  <a href=\"group__init.html#gaaae48c0a18607ea4a4ba951d939f0901\">More...</a><br /></td></tr>\n<tr class=\"separator:gaaae48c0a18607ea4a4ba951d939f0901\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga110fd1d3f0412822b4f1908c026f724a\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">void&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__init.html#ga110fd1d3f0412822b4f1908c026f724a\">glfwInitHint</a> (int hint, int value)</td></tr>\n<tr class=\"memdesc:ga110fd1d3f0412822b4f1908c026f724a\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Sets the specified init hint to the desired value.  <a href=\"group__init.html#ga110fd1d3f0412822b4f1908c026f724a\">More...</a><br /></td></tr>\n<tr class=\"separator:ga110fd1d3f0412822b4f1908c026f724a\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga9f8ffaacf3c269cc48eafbf8b9b71197\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">void&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__init.html#ga9f8ffaacf3c269cc48eafbf8b9b71197\">glfwGetVersion</a> (int *major, int *minor, int *rev)</td></tr>\n<tr class=\"memdesc:ga9f8ffaacf3c269cc48eafbf8b9b71197\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Retrieves the version of the GLFW library.  <a href=\"group__init.html#ga9f8ffaacf3c269cc48eafbf8b9b71197\">More...</a><br /></td></tr>\n<tr class=\"separator:ga9f8ffaacf3c269cc48eafbf8b9b71197\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga23d47dc013fce2bf58036da66079a657\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">const char *&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__init.html#ga23d47dc013fce2bf58036da66079a657\">glfwGetVersionString</a> (void)</td></tr>\n<tr class=\"memdesc:ga23d47dc013fce2bf58036da66079a657\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns a string describing the compile-time configuration.  <a href=\"group__init.html#ga23d47dc013fce2bf58036da66079a657\">More...</a><br /></td></tr>\n<tr class=\"separator:ga23d47dc013fce2bf58036da66079a657\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga944986b4ec0b928d488141f92982aa18\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">int&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__init.html#ga944986b4ec0b928d488141f92982aa18\">glfwGetError</a> (const char **description)</td></tr>\n<tr class=\"memdesc:ga944986b4ec0b928d488141f92982aa18\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns and clears the last error for the calling thread.  <a href=\"group__init.html#ga944986b4ec0b928d488141f92982aa18\">More...</a><br /></td></tr>\n<tr class=\"separator:ga944986b4ec0b928d488141f92982aa18\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gaff45816610d53f0b83656092a4034f40\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\"><a class=\"el\" href=\"group__init.html#ga6b8a2639706d5c409fc1287e8f55e928\">GLFWerrorfun</a>&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__init.html#gaff45816610d53f0b83656092a4034f40\">glfwSetErrorCallback</a> (<a class=\"el\" href=\"group__init.html#ga6b8a2639706d5c409fc1287e8f55e928\">GLFWerrorfun</a> callback)</td></tr>\n<tr class=\"memdesc:gaff45816610d53f0b83656092a4034f40\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Sets the error callback.  <a href=\"group__init.html#gaff45816610d53f0b83656092a4034f40\">More...</a><br /></td></tr>\n<tr class=\"separator:gaff45816610d53f0b83656092a4034f40\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga3fba51c8bd36491d4712aa5bd074a537\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\"><a class=\"el\" href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a> **&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__monitor.html#ga3fba51c8bd36491d4712aa5bd074a537\">glfwGetMonitors</a> (int *count)</td></tr>\n<tr class=\"memdesc:ga3fba51c8bd36491d4712aa5bd074a537\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns the currently connected monitors.  <a href=\"group__monitor.html#ga3fba51c8bd36491d4712aa5bd074a537\">More...</a><br /></td></tr>\n<tr class=\"separator:ga3fba51c8bd36491d4712aa5bd074a537\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga721867d84c6d18d6790d64d2847ca0b1\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\"><a class=\"el\" href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a> *&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__monitor.html#ga721867d84c6d18d6790d64d2847ca0b1\">glfwGetPrimaryMonitor</a> (void)</td></tr>\n<tr class=\"memdesc:ga721867d84c6d18d6790d64d2847ca0b1\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns the primary monitor.  <a href=\"group__monitor.html#ga721867d84c6d18d6790d64d2847ca0b1\">More...</a><br /></td></tr>\n<tr class=\"separator:ga721867d84c6d18d6790d64d2847ca0b1\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga102f54e7acc9149edbcf0997152df8c9\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">void&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__monitor.html#ga102f54e7acc9149edbcf0997152df8c9\">glfwGetMonitorPos</a> (<a class=\"el\" href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a> *monitor, int *xpos, int *ypos)</td></tr>\n<tr class=\"memdesc:ga102f54e7acc9149edbcf0997152df8c9\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns the position of the monitor's viewport on the virtual screen.  <a href=\"group__monitor.html#ga102f54e7acc9149edbcf0997152df8c9\">More...</a><br /></td></tr>\n<tr class=\"separator:ga102f54e7acc9149edbcf0997152df8c9\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga7387a3bdb64bfe8ebf2b9e54f5b6c9d0\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">void&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__monitor.html#ga7387a3bdb64bfe8ebf2b9e54f5b6c9d0\">glfwGetMonitorWorkarea</a> (<a class=\"el\" href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a> *monitor, int *xpos, int *ypos, int *width, int *height)</td></tr>\n<tr class=\"memdesc:ga7387a3bdb64bfe8ebf2b9e54f5b6c9d0\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Retrieves the work area of the monitor.  <a href=\"group__monitor.html#ga7387a3bdb64bfe8ebf2b9e54f5b6c9d0\">More...</a><br /></td></tr>\n<tr class=\"separator:ga7387a3bdb64bfe8ebf2b9e54f5b6c9d0\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga7d8bffc6c55539286a6bd20d32a8d7ea\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">void&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__monitor.html#ga7d8bffc6c55539286a6bd20d32a8d7ea\">glfwGetMonitorPhysicalSize</a> (<a class=\"el\" href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a> *monitor, int *widthMM, int *heightMM)</td></tr>\n<tr class=\"memdesc:ga7d8bffc6c55539286a6bd20d32a8d7ea\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns the physical size of the monitor.  <a href=\"group__monitor.html#ga7d8bffc6c55539286a6bd20d32a8d7ea\">More...</a><br /></td></tr>\n<tr class=\"separator:ga7d8bffc6c55539286a6bd20d32a8d7ea\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gad3152e84465fa620b601265ebfcdb21b\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">void&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__monitor.html#gad3152e84465fa620b601265ebfcdb21b\">glfwGetMonitorContentScale</a> (<a class=\"el\" href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a> *monitor, float *xscale, float *yscale)</td></tr>\n<tr class=\"memdesc:gad3152e84465fa620b601265ebfcdb21b\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Retrieves the content scale for the specified monitor.  <a href=\"group__monitor.html#gad3152e84465fa620b601265ebfcdb21b\">More...</a><br /></td></tr>\n<tr class=\"separator:gad3152e84465fa620b601265ebfcdb21b\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga79a34ee22ff080ca954a9663e4679daf\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">const char *&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__monitor.html#ga79a34ee22ff080ca954a9663e4679daf\">glfwGetMonitorName</a> (<a class=\"el\" href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a> *monitor)</td></tr>\n<tr class=\"memdesc:ga79a34ee22ff080ca954a9663e4679daf\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns the name of the specified monitor.  <a href=\"group__monitor.html#ga79a34ee22ff080ca954a9663e4679daf\">More...</a><br /></td></tr>\n<tr class=\"separator:ga79a34ee22ff080ca954a9663e4679daf\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga702750e24313a686d3637297b6e85fda\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">void&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__monitor.html#ga702750e24313a686d3637297b6e85fda\">glfwSetMonitorUserPointer</a> (<a class=\"el\" href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a> *monitor, void *pointer)</td></tr>\n<tr class=\"memdesc:ga702750e24313a686d3637297b6e85fda\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Sets the user pointer of the specified monitor.  <a href=\"group__monitor.html#ga702750e24313a686d3637297b6e85fda\">More...</a><br /></td></tr>\n<tr class=\"separator:ga702750e24313a686d3637297b6e85fda\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gac2d4209016b049222877f620010ed0d8\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">void *&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__monitor.html#gac2d4209016b049222877f620010ed0d8\">glfwGetMonitorUserPointer</a> (<a class=\"el\" href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a> *monitor)</td></tr>\n<tr class=\"memdesc:gac2d4209016b049222877f620010ed0d8\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns the user pointer of the specified monitor.  <a href=\"group__monitor.html#gac2d4209016b049222877f620010ed0d8\">More...</a><br /></td></tr>\n<tr class=\"separator:gac2d4209016b049222877f620010ed0d8\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gab39df645587c8518192aa746c2fb06c3\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\"><a class=\"el\" href=\"group__monitor.html#ga8a7ee579a66720f24d656526f3e44c63\">GLFWmonitorfun</a>&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__monitor.html#gab39df645587c8518192aa746c2fb06c3\">glfwSetMonitorCallback</a> (<a class=\"el\" href=\"group__monitor.html#ga8a7ee579a66720f24d656526f3e44c63\">GLFWmonitorfun</a> callback)</td></tr>\n<tr class=\"memdesc:gab39df645587c8518192aa746c2fb06c3\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Sets the monitor configuration callback.  <a href=\"group__monitor.html#gab39df645587c8518192aa746c2fb06c3\">More...</a><br /></td></tr>\n<tr class=\"separator:gab39df645587c8518192aa746c2fb06c3\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga820b0ce9a5237d645ea7cbb4bd383458\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">const <a class=\"el\" href=\"structGLFWvidmode.html\">GLFWvidmode</a> *&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__monitor.html#ga820b0ce9a5237d645ea7cbb4bd383458\">glfwGetVideoModes</a> (<a class=\"el\" href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a> *monitor, int *count)</td></tr>\n<tr class=\"memdesc:ga820b0ce9a5237d645ea7cbb4bd383458\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns the available video modes for the specified monitor.  <a href=\"group__monitor.html#ga820b0ce9a5237d645ea7cbb4bd383458\">More...</a><br /></td></tr>\n<tr class=\"separator:ga820b0ce9a5237d645ea7cbb4bd383458\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gafc1bb972a921ad5b3bd5d63a95fc2d52\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">const <a class=\"el\" href=\"structGLFWvidmode.html\">GLFWvidmode</a> *&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__monitor.html#gafc1bb972a921ad5b3bd5d63a95fc2d52\">glfwGetVideoMode</a> (<a class=\"el\" href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a> *monitor)</td></tr>\n<tr class=\"memdesc:gafc1bb972a921ad5b3bd5d63a95fc2d52\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns the current mode of the specified monitor.  <a href=\"group__monitor.html#gafc1bb972a921ad5b3bd5d63a95fc2d52\">More...</a><br /></td></tr>\n<tr class=\"separator:gafc1bb972a921ad5b3bd5d63a95fc2d52\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga6ac582625c990220785ddd34efa3169a\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">void&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__monitor.html#ga6ac582625c990220785ddd34efa3169a\">glfwSetGamma</a> (<a class=\"el\" href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a> *monitor, float gamma)</td></tr>\n<tr class=\"memdesc:ga6ac582625c990220785ddd34efa3169a\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Generates a gamma ramp and sets it for the specified monitor.  <a href=\"group__monitor.html#ga6ac582625c990220785ddd34efa3169a\">More...</a><br /></td></tr>\n<tr class=\"separator:ga6ac582625c990220785ddd34efa3169a\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gab7c41deb2219bde3e1eb756ddaa9ec80\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">const <a class=\"el\" href=\"structGLFWgammaramp.html\">GLFWgammaramp</a> *&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__monitor.html#gab7c41deb2219bde3e1eb756ddaa9ec80\">glfwGetGammaRamp</a> (<a class=\"el\" href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a> *monitor)</td></tr>\n<tr class=\"memdesc:gab7c41deb2219bde3e1eb756ddaa9ec80\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns the current gamma ramp for the specified monitor.  <a href=\"group__monitor.html#gab7c41deb2219bde3e1eb756ddaa9ec80\">More...</a><br /></td></tr>\n<tr class=\"separator:gab7c41deb2219bde3e1eb756ddaa9ec80\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga583f0ffd0d29613d8cd172b996bbf0dd\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">void&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__monitor.html#ga583f0ffd0d29613d8cd172b996bbf0dd\">glfwSetGammaRamp</a> (<a class=\"el\" href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a> *monitor, const <a class=\"el\" href=\"structGLFWgammaramp.html\">GLFWgammaramp</a> *ramp)</td></tr>\n<tr class=\"memdesc:ga583f0ffd0d29613d8cd172b996bbf0dd\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Sets the current gamma ramp for the specified monitor.  <a href=\"group__monitor.html#ga583f0ffd0d29613d8cd172b996bbf0dd\">More...</a><br /></td></tr>\n<tr class=\"separator:ga583f0ffd0d29613d8cd172b996bbf0dd\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gaa77c4898dfb83344a6b4f76aa16b9a4a\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">void&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#gaa77c4898dfb83344a6b4f76aa16b9a4a\">glfwDefaultWindowHints</a> (void)</td></tr>\n<tr class=\"memdesc:gaa77c4898dfb83344a6b4f76aa16b9a4a\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Resets all window hints to their default values.  <a href=\"group__window.html#gaa77c4898dfb83344a6b4f76aa16b9a4a\">More...</a><br /></td></tr>\n<tr class=\"separator:gaa77c4898dfb83344a6b4f76aa16b9a4a\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga7d9c8c62384b1e2821c4dc48952d2033\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">void&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga7d9c8c62384b1e2821c4dc48952d2033\">glfwWindowHint</a> (int hint, int value)</td></tr>\n<tr class=\"memdesc:ga7d9c8c62384b1e2821c4dc48952d2033\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Sets the specified window hint to the desired value.  <a href=\"group__window.html#ga7d9c8c62384b1e2821c4dc48952d2033\">More...</a><br /></td></tr>\n<tr class=\"separator:ga7d9c8c62384b1e2821c4dc48952d2033\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga8cb2782861c9d997bcf2dea97f363e5f\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">void&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga8cb2782861c9d997bcf2dea97f363e5f\">glfwWindowHintString</a> (int hint, const char *value)</td></tr>\n<tr class=\"memdesc:ga8cb2782861c9d997bcf2dea97f363e5f\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Sets the specified window hint to the desired value.  <a href=\"group__window.html#ga8cb2782861c9d997bcf2dea97f363e5f\">More...</a><br /></td></tr>\n<tr class=\"separator:ga8cb2782861c9d997bcf2dea97f363e5f\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga5c336fddf2cbb5b92f65f10fb6043344\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\"><a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga5c336fddf2cbb5b92f65f10fb6043344\">glfwCreateWindow</a> (int width, int height, const char *title, <a class=\"el\" href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a> *monitor, <a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *share)</td></tr>\n<tr class=\"memdesc:ga5c336fddf2cbb5b92f65f10fb6043344\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Creates a window and its associated context.  <a href=\"group__window.html#ga5c336fddf2cbb5b92f65f10fb6043344\">More...</a><br /></td></tr>\n<tr class=\"separator:ga5c336fddf2cbb5b92f65f10fb6043344\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gacdf43e51376051d2c091662e9fe3d7b2\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">void&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#gacdf43e51376051d2c091662e9fe3d7b2\">glfwDestroyWindow</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window)</td></tr>\n<tr class=\"memdesc:gacdf43e51376051d2c091662e9fe3d7b2\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Destroys the specified window and its context.  <a href=\"group__window.html#gacdf43e51376051d2c091662e9fe3d7b2\">More...</a><br /></td></tr>\n<tr class=\"separator:gacdf43e51376051d2c091662e9fe3d7b2\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga24e02fbfefbb81fc45320989f8140ab5\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">int&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga24e02fbfefbb81fc45320989f8140ab5\">glfwWindowShouldClose</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window)</td></tr>\n<tr class=\"memdesc:ga24e02fbfefbb81fc45320989f8140ab5\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Checks the close flag of the specified window.  <a href=\"group__window.html#ga24e02fbfefbb81fc45320989f8140ab5\">More...</a><br /></td></tr>\n<tr class=\"separator:ga24e02fbfefbb81fc45320989f8140ab5\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga49c449dde2a6f87d996f4daaa09d6708\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">void&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga49c449dde2a6f87d996f4daaa09d6708\">glfwSetWindowShouldClose</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window, int value)</td></tr>\n<tr class=\"memdesc:ga49c449dde2a6f87d996f4daaa09d6708\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Sets the close flag of the specified window.  <a href=\"group__window.html#ga49c449dde2a6f87d996f4daaa09d6708\">More...</a><br /></td></tr>\n<tr class=\"separator:ga49c449dde2a6f87d996f4daaa09d6708\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga5d877f09e968cef7a360b513306f17ff\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">void&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga5d877f09e968cef7a360b513306f17ff\">glfwSetWindowTitle</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window, const char *title)</td></tr>\n<tr class=\"memdesc:ga5d877f09e968cef7a360b513306f17ff\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Sets the title of the specified window.  <a href=\"group__window.html#ga5d877f09e968cef7a360b513306f17ff\">More...</a><br /></td></tr>\n<tr class=\"separator:ga5d877f09e968cef7a360b513306f17ff\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gadd7ccd39fe7a7d1f0904666ae5932dc5\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">void&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#gadd7ccd39fe7a7d1f0904666ae5932dc5\">glfwSetWindowIcon</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window, int count, const <a class=\"el\" href=\"structGLFWimage.html\">GLFWimage</a> *images)</td></tr>\n<tr class=\"memdesc:gadd7ccd39fe7a7d1f0904666ae5932dc5\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Sets the icon for the specified window.  <a href=\"group__window.html#gadd7ccd39fe7a7d1f0904666ae5932dc5\">More...</a><br /></td></tr>\n<tr class=\"separator:gadd7ccd39fe7a7d1f0904666ae5932dc5\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga73cb526c000876fd8ddf571570fdb634\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">void&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga73cb526c000876fd8ddf571570fdb634\">glfwGetWindowPos</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window, int *xpos, int *ypos)</td></tr>\n<tr class=\"memdesc:ga73cb526c000876fd8ddf571570fdb634\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Retrieves the position of the content area of the specified window.  <a href=\"group__window.html#ga73cb526c000876fd8ddf571570fdb634\">More...</a><br /></td></tr>\n<tr class=\"separator:ga73cb526c000876fd8ddf571570fdb634\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga1abb6d690e8c88e0c8cd1751356dbca8\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">void&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga1abb6d690e8c88e0c8cd1751356dbca8\">glfwSetWindowPos</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window, int xpos, int ypos)</td></tr>\n<tr class=\"memdesc:ga1abb6d690e8c88e0c8cd1751356dbca8\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Sets the position of the content area of the specified window.  <a href=\"group__window.html#ga1abb6d690e8c88e0c8cd1751356dbca8\">More...</a><br /></td></tr>\n<tr class=\"separator:ga1abb6d690e8c88e0c8cd1751356dbca8\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gaeea7cbc03373a41fb51cfbf9f2a5d4c6\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">void&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#gaeea7cbc03373a41fb51cfbf9f2a5d4c6\">glfwGetWindowSize</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window, int *width, int *height)</td></tr>\n<tr class=\"memdesc:gaeea7cbc03373a41fb51cfbf9f2a5d4c6\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Retrieves the size of the content area of the specified window.  <a href=\"group__window.html#gaeea7cbc03373a41fb51cfbf9f2a5d4c6\">More...</a><br /></td></tr>\n<tr class=\"separator:gaeea7cbc03373a41fb51cfbf9f2a5d4c6\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gac314fa6cec7d2d307be9963e2709cc90\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">void&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#gac314fa6cec7d2d307be9963e2709cc90\">glfwSetWindowSizeLimits</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window, int minwidth, int minheight, int maxwidth, int maxheight)</td></tr>\n<tr class=\"memdesc:gac314fa6cec7d2d307be9963e2709cc90\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Sets the size limits of the specified window.  <a href=\"group__window.html#gac314fa6cec7d2d307be9963e2709cc90\">More...</a><br /></td></tr>\n<tr class=\"separator:gac314fa6cec7d2d307be9963e2709cc90\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga72ac8cb1ee2e312a878b55153d81b937\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">void&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga72ac8cb1ee2e312a878b55153d81b937\">glfwSetWindowAspectRatio</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window, int numer, int denom)</td></tr>\n<tr class=\"memdesc:ga72ac8cb1ee2e312a878b55153d81b937\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Sets the aspect ratio of the specified window.  <a href=\"group__window.html#ga72ac8cb1ee2e312a878b55153d81b937\">More...</a><br /></td></tr>\n<tr class=\"separator:ga72ac8cb1ee2e312a878b55153d81b937\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga371911f12c74c504dd8d47d832d095cb\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">void&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga371911f12c74c504dd8d47d832d095cb\">glfwSetWindowSize</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window, int width, int height)</td></tr>\n<tr class=\"memdesc:ga371911f12c74c504dd8d47d832d095cb\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Sets the size of the content area of the specified window.  <a href=\"group__window.html#ga371911f12c74c504dd8d47d832d095cb\">More...</a><br /></td></tr>\n<tr class=\"separator:ga371911f12c74c504dd8d47d832d095cb\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga0e2637a4161afb283f5300c7f94785c9\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">void&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga0e2637a4161afb283f5300c7f94785c9\">glfwGetFramebufferSize</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window, int *width, int *height)</td></tr>\n<tr class=\"memdesc:ga0e2637a4161afb283f5300c7f94785c9\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Retrieves the size of the framebuffer of the specified window.  <a href=\"group__window.html#ga0e2637a4161afb283f5300c7f94785c9\">More...</a><br /></td></tr>\n<tr class=\"separator:ga0e2637a4161afb283f5300c7f94785c9\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga1a9fd382058c53101b21cf211898f1f1\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">void&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga1a9fd382058c53101b21cf211898f1f1\">glfwGetWindowFrameSize</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window, int *left, int *top, int *right, int *bottom)</td></tr>\n<tr class=\"memdesc:ga1a9fd382058c53101b21cf211898f1f1\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Retrieves the size of the frame of the window.  <a href=\"group__window.html#ga1a9fd382058c53101b21cf211898f1f1\">More...</a><br /></td></tr>\n<tr class=\"separator:ga1a9fd382058c53101b21cf211898f1f1\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gaf5d31de9c19c4f994facea64d2b3106c\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">void&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#gaf5d31de9c19c4f994facea64d2b3106c\">glfwGetWindowContentScale</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window, float *xscale, float *yscale)</td></tr>\n<tr class=\"memdesc:gaf5d31de9c19c4f994facea64d2b3106c\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Retrieves the content scale for the specified window.  <a href=\"group__window.html#gaf5d31de9c19c4f994facea64d2b3106c\">More...</a><br /></td></tr>\n<tr class=\"separator:gaf5d31de9c19c4f994facea64d2b3106c\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gad09f0bd7a6307c4533b7061828480a84\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">float&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#gad09f0bd7a6307c4533b7061828480a84\">glfwGetWindowOpacity</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window)</td></tr>\n<tr class=\"memdesc:gad09f0bd7a6307c4533b7061828480a84\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns the opacity of the whole window.  <a href=\"group__window.html#gad09f0bd7a6307c4533b7061828480a84\">More...</a><br /></td></tr>\n<tr class=\"separator:gad09f0bd7a6307c4533b7061828480a84\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gac31caeb3d1088831b13d2c8a156802e9\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">void&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#gac31caeb3d1088831b13d2c8a156802e9\">glfwSetWindowOpacity</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window, float opacity)</td></tr>\n<tr class=\"memdesc:gac31caeb3d1088831b13d2c8a156802e9\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Sets the opacity of the whole window.  <a href=\"group__window.html#gac31caeb3d1088831b13d2c8a156802e9\">More...</a><br /></td></tr>\n<tr class=\"separator:gac31caeb3d1088831b13d2c8a156802e9\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga1bb559c0ebaad63c5c05ad2a066779c4\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">void&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga1bb559c0ebaad63c5c05ad2a066779c4\">glfwIconifyWindow</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window)</td></tr>\n<tr class=\"memdesc:ga1bb559c0ebaad63c5c05ad2a066779c4\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Iconifies the specified window.  <a href=\"group__window.html#ga1bb559c0ebaad63c5c05ad2a066779c4\">More...</a><br /></td></tr>\n<tr class=\"separator:ga1bb559c0ebaad63c5c05ad2a066779c4\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga52527a5904b47d802b6b4bb519cdebc7\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">void&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga52527a5904b47d802b6b4bb519cdebc7\">glfwRestoreWindow</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window)</td></tr>\n<tr class=\"memdesc:ga52527a5904b47d802b6b4bb519cdebc7\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Restores the specified window.  <a href=\"group__window.html#ga52527a5904b47d802b6b4bb519cdebc7\">More...</a><br /></td></tr>\n<tr class=\"separator:ga52527a5904b47d802b6b4bb519cdebc7\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga3f541387449d911274324ae7f17ec56b\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">void&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga3f541387449d911274324ae7f17ec56b\">glfwMaximizeWindow</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window)</td></tr>\n<tr class=\"memdesc:ga3f541387449d911274324ae7f17ec56b\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Maximizes the specified window.  <a href=\"group__window.html#ga3f541387449d911274324ae7f17ec56b\">More...</a><br /></td></tr>\n<tr class=\"separator:ga3f541387449d911274324ae7f17ec56b\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga61be47917b72536a148300f46494fc66\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">void&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga61be47917b72536a148300f46494fc66\">glfwShowWindow</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window)</td></tr>\n<tr class=\"memdesc:ga61be47917b72536a148300f46494fc66\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Makes the specified window visible.  <a href=\"group__window.html#ga61be47917b72536a148300f46494fc66\">More...</a><br /></td></tr>\n<tr class=\"separator:ga61be47917b72536a148300f46494fc66\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga49401f82a1ba5f15db5590728314d47c\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">void&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga49401f82a1ba5f15db5590728314d47c\">glfwHideWindow</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window)</td></tr>\n<tr class=\"memdesc:ga49401f82a1ba5f15db5590728314d47c\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Hides the specified window.  <a href=\"group__window.html#ga49401f82a1ba5f15db5590728314d47c\">More...</a><br /></td></tr>\n<tr class=\"separator:ga49401f82a1ba5f15db5590728314d47c\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga873780357abd3f3a081d71a40aae45a1\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">void&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga873780357abd3f3a081d71a40aae45a1\">glfwFocusWindow</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window)</td></tr>\n<tr class=\"memdesc:ga873780357abd3f3a081d71a40aae45a1\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Brings the specified window to front and sets input focus.  <a href=\"group__window.html#ga873780357abd3f3a081d71a40aae45a1\">More...</a><br /></td></tr>\n<tr class=\"separator:ga873780357abd3f3a081d71a40aae45a1\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga2f8d59323fc4692c1d54ba08c863a703\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">void&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga2f8d59323fc4692c1d54ba08c863a703\">glfwRequestWindowAttention</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window)</td></tr>\n<tr class=\"memdesc:ga2f8d59323fc4692c1d54ba08c863a703\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Requests user attention to the specified window.  <a href=\"group__window.html#ga2f8d59323fc4692c1d54ba08c863a703\">More...</a><br /></td></tr>\n<tr class=\"separator:ga2f8d59323fc4692c1d54ba08c863a703\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gaeac25e64789974ccbe0811766bd91a16\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\"><a class=\"el\" href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a> *&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#gaeac25e64789974ccbe0811766bd91a16\">glfwGetWindowMonitor</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window)</td></tr>\n<tr class=\"memdesc:gaeac25e64789974ccbe0811766bd91a16\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns the monitor that the window uses for full screen mode.  <a href=\"group__window.html#gaeac25e64789974ccbe0811766bd91a16\">More...</a><br /></td></tr>\n<tr class=\"separator:gaeac25e64789974ccbe0811766bd91a16\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga81c76c418af80a1cce7055bccb0ae0a7\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">void&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga81c76c418af80a1cce7055bccb0ae0a7\">glfwSetWindowMonitor</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window, <a class=\"el\" href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a> *monitor, int xpos, int ypos, int width, int height, int refreshRate)</td></tr>\n<tr class=\"memdesc:ga81c76c418af80a1cce7055bccb0ae0a7\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Sets the mode, monitor, video mode and placement of a window.  <a href=\"group__window.html#ga81c76c418af80a1cce7055bccb0ae0a7\">More...</a><br /></td></tr>\n<tr class=\"separator:ga81c76c418af80a1cce7055bccb0ae0a7\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gacccb29947ea4b16860ebef42c2cb9337\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">int&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#gacccb29947ea4b16860ebef42c2cb9337\">glfwGetWindowAttrib</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window, int attrib)</td></tr>\n<tr class=\"memdesc:gacccb29947ea4b16860ebef42c2cb9337\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns an attribute of the specified window.  <a href=\"group__window.html#gacccb29947ea4b16860ebef42c2cb9337\">More...</a><br /></td></tr>\n<tr class=\"separator:gacccb29947ea4b16860ebef42c2cb9337\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gace2afda29b4116ec012e410a6819033e\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">void&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#gace2afda29b4116ec012e410a6819033e\">glfwSetWindowAttrib</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window, int attrib, int value)</td></tr>\n<tr class=\"memdesc:gace2afda29b4116ec012e410a6819033e\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Sets an attribute of the specified window.  <a href=\"group__window.html#gace2afda29b4116ec012e410a6819033e\">More...</a><br /></td></tr>\n<tr class=\"separator:gace2afda29b4116ec012e410a6819033e\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga3d2fc6026e690ab31a13f78bc9fd3651\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">void&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga3d2fc6026e690ab31a13f78bc9fd3651\">glfwSetWindowUserPointer</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window, void *pointer)</td></tr>\n<tr class=\"memdesc:ga3d2fc6026e690ab31a13f78bc9fd3651\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Sets the user pointer of the specified window.  <a href=\"group__window.html#ga3d2fc6026e690ab31a13f78bc9fd3651\">More...</a><br /></td></tr>\n<tr class=\"separator:ga3d2fc6026e690ab31a13f78bc9fd3651\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga17807ce0f45ac3f8bb50d6dcc59a4e06\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">void *&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga17807ce0f45ac3f8bb50d6dcc59a4e06\">glfwGetWindowUserPointer</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window)</td></tr>\n<tr class=\"memdesc:ga17807ce0f45ac3f8bb50d6dcc59a4e06\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns the user pointer of the specified window.  <a href=\"group__window.html#ga17807ce0f45ac3f8bb50d6dcc59a4e06\">More...</a><br /></td></tr>\n<tr class=\"separator:ga17807ce0f45ac3f8bb50d6dcc59a4e06\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga08bdfbba88934f9c4f92fd757979ac74\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\"><a class=\"el\" href=\"group__window.html#gafd8db81fdb0e850549dc6bace5ed697a\">GLFWwindowposfun</a>&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga08bdfbba88934f9c4f92fd757979ac74\">glfwSetWindowPosCallback</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window, <a class=\"el\" href=\"group__window.html#gafd8db81fdb0e850549dc6bace5ed697a\">GLFWwindowposfun</a> callback)</td></tr>\n<tr class=\"memdesc:ga08bdfbba88934f9c4f92fd757979ac74\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Sets the position callback for the specified window.  <a href=\"group__window.html#ga08bdfbba88934f9c4f92fd757979ac74\">More...</a><br /></td></tr>\n<tr class=\"separator:ga08bdfbba88934f9c4f92fd757979ac74\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gad91b8b047a0c4c6033c38853864c34f8\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\"><a class=\"el\" href=\"group__window.html#gae49ee6ebc03fa2da024b89943a331355\">GLFWwindowsizefun</a>&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#gad91b8b047a0c4c6033c38853864c34f8\">glfwSetWindowSizeCallback</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window, <a class=\"el\" href=\"group__window.html#gae49ee6ebc03fa2da024b89943a331355\">GLFWwindowsizefun</a> callback)</td></tr>\n<tr class=\"memdesc:gad91b8b047a0c4c6033c38853864c34f8\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Sets the size callback for the specified window.  <a href=\"group__window.html#gad91b8b047a0c4c6033c38853864c34f8\">More...</a><br /></td></tr>\n<tr class=\"separator:gad91b8b047a0c4c6033c38853864c34f8\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gada646d775a7776a95ac000cfc1885331\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\"><a class=\"el\" href=\"group__window.html#ga93e7c2555bd837f4ed8b20f76cada72e\">GLFWwindowclosefun</a>&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#gada646d775a7776a95ac000cfc1885331\">glfwSetWindowCloseCallback</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window, <a class=\"el\" href=\"group__window.html#ga93e7c2555bd837f4ed8b20f76cada72e\">GLFWwindowclosefun</a> callback)</td></tr>\n<tr class=\"memdesc:gada646d775a7776a95ac000cfc1885331\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Sets the close callback for the specified window.  <a href=\"group__window.html#gada646d775a7776a95ac000cfc1885331\">More...</a><br /></td></tr>\n<tr class=\"separator:gada646d775a7776a95ac000cfc1885331\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga1c5c7eb889c33c7f4d10dd35b327654e\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\"><a class=\"el\" href=\"group__window.html#ga7a56f9e0227e2cd9470d80d919032e08\">GLFWwindowrefreshfun</a>&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga1c5c7eb889c33c7f4d10dd35b327654e\">glfwSetWindowRefreshCallback</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window, <a class=\"el\" href=\"group__window.html#ga7a56f9e0227e2cd9470d80d919032e08\">GLFWwindowrefreshfun</a> callback)</td></tr>\n<tr class=\"memdesc:ga1c5c7eb889c33c7f4d10dd35b327654e\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Sets the refresh callback for the specified window.  <a href=\"group__window.html#ga1c5c7eb889c33c7f4d10dd35b327654e\">More...</a><br /></td></tr>\n<tr class=\"separator:ga1c5c7eb889c33c7f4d10dd35b327654e\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gac2d83c4a10f071baf841f6730528e66c\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\"><a class=\"el\" href=\"group__window.html#ga58be2061828dd35080bb438405d3a7e2\">GLFWwindowfocusfun</a>&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#gac2d83c4a10f071baf841f6730528e66c\">glfwSetWindowFocusCallback</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window, <a class=\"el\" href=\"group__window.html#ga58be2061828dd35080bb438405d3a7e2\">GLFWwindowfocusfun</a> callback)</td></tr>\n<tr class=\"memdesc:gac2d83c4a10f071baf841f6730528e66c\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Sets the focus callback for the specified window.  <a href=\"group__window.html#gac2d83c4a10f071baf841f6730528e66c\">More...</a><br /></td></tr>\n<tr class=\"separator:gac2d83c4a10f071baf841f6730528e66c\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gac793e9efd255567b5fb8b445052cfd3e\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\"><a class=\"el\" href=\"group__window.html#gad2d4e4c3d28b1242e742e8268b9528af\">GLFWwindowiconifyfun</a>&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#gac793e9efd255567b5fb8b445052cfd3e\">glfwSetWindowIconifyCallback</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window, <a class=\"el\" href=\"group__window.html#gad2d4e4c3d28b1242e742e8268b9528af\">GLFWwindowiconifyfun</a> callback)</td></tr>\n<tr class=\"memdesc:gac793e9efd255567b5fb8b445052cfd3e\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Sets the iconify callback for the specified window.  <a href=\"group__window.html#gac793e9efd255567b5fb8b445052cfd3e\">More...</a><br /></td></tr>\n<tr class=\"separator:gac793e9efd255567b5fb8b445052cfd3e\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gacbe64c339fbd94885e62145563b6dc93\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\"><a class=\"el\" href=\"group__window.html#ga7269a3d1cb100c0081f95fc09afa4949\">GLFWwindowmaximizefun</a>&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#gacbe64c339fbd94885e62145563b6dc93\">glfwSetWindowMaximizeCallback</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window, <a class=\"el\" href=\"group__window.html#ga7269a3d1cb100c0081f95fc09afa4949\">GLFWwindowmaximizefun</a> callback)</td></tr>\n<tr class=\"memdesc:gacbe64c339fbd94885e62145563b6dc93\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Sets the maximize callback for the specified window.  <a href=\"group__window.html#gacbe64c339fbd94885e62145563b6dc93\">More...</a><br /></td></tr>\n<tr class=\"separator:gacbe64c339fbd94885e62145563b6dc93\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gab3fb7c3366577daef18c0023e2a8591f\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\"><a class=\"el\" href=\"group__window.html#ga3e218ef9ff826129c55a7d5f6971a285\">GLFWframebuffersizefun</a>&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#gab3fb7c3366577daef18c0023e2a8591f\">glfwSetFramebufferSizeCallback</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window, <a class=\"el\" href=\"group__window.html#ga3e218ef9ff826129c55a7d5f6971a285\">GLFWframebuffersizefun</a> callback)</td></tr>\n<tr class=\"memdesc:gab3fb7c3366577daef18c0023e2a8591f\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Sets the framebuffer resize callback for the specified window.  <a href=\"group__window.html#gab3fb7c3366577daef18c0023e2a8591f\">More...</a><br /></td></tr>\n<tr class=\"separator:gab3fb7c3366577daef18c0023e2a8591f\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gaf2832ebb5aa6c252a2d261de002c92d6\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\"><a class=\"el\" href=\"group__window.html#ga1da46b65eafcc1a7ff0adb8f4a7b72fd\">GLFWwindowcontentscalefun</a>&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#gaf2832ebb5aa6c252a2d261de002c92d6\">glfwSetWindowContentScaleCallback</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window, <a class=\"el\" href=\"group__window.html#ga1da46b65eafcc1a7ff0adb8f4a7b72fd\">GLFWwindowcontentscalefun</a> callback)</td></tr>\n<tr class=\"memdesc:gaf2832ebb5aa6c252a2d261de002c92d6\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Sets the window content scale callback for the specified window.  <a href=\"group__window.html#gaf2832ebb5aa6c252a2d261de002c92d6\">More...</a><br /></td></tr>\n<tr class=\"separator:gaf2832ebb5aa6c252a2d261de002c92d6\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga37bd57223967b4211d60ca1a0bf3c832\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">void&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga37bd57223967b4211d60ca1a0bf3c832\">glfwPollEvents</a> (void)</td></tr>\n<tr class=\"memdesc:ga37bd57223967b4211d60ca1a0bf3c832\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Processes all pending events.  <a href=\"group__window.html#ga37bd57223967b4211d60ca1a0bf3c832\">More...</a><br /></td></tr>\n<tr class=\"separator:ga37bd57223967b4211d60ca1a0bf3c832\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga554e37d781f0a997656c26b2c56c835e\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">void&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga554e37d781f0a997656c26b2c56c835e\">glfwWaitEvents</a> (void)</td></tr>\n<tr class=\"memdesc:ga554e37d781f0a997656c26b2c56c835e\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Waits until events are queued and processes them.  <a href=\"group__window.html#ga554e37d781f0a997656c26b2c56c835e\">More...</a><br /></td></tr>\n<tr class=\"separator:ga554e37d781f0a997656c26b2c56c835e\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga605a178db92f1a7f1a925563ef3ea2cf\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">void&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga605a178db92f1a7f1a925563ef3ea2cf\">glfwWaitEventsTimeout</a> (double timeout)</td></tr>\n<tr class=\"memdesc:ga605a178db92f1a7f1a925563ef3ea2cf\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Waits with timeout until events are queued and processes them.  <a href=\"group__window.html#ga605a178db92f1a7f1a925563ef3ea2cf\">More...</a><br /></td></tr>\n<tr class=\"separator:ga605a178db92f1a7f1a925563ef3ea2cf\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gab5997a25187e9fd5c6f2ecbbc8dfd7e9\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">void&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#gab5997a25187e9fd5c6f2ecbbc8dfd7e9\">glfwPostEmptyEvent</a> (void)</td></tr>\n<tr class=\"memdesc:gab5997a25187e9fd5c6f2ecbbc8dfd7e9\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Posts an empty event to the event queue.  <a href=\"group__window.html#gab5997a25187e9fd5c6f2ecbbc8dfd7e9\">More...</a><br /></td></tr>\n<tr class=\"separator:gab5997a25187e9fd5c6f2ecbbc8dfd7e9\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gaf5b859dbe19bdf434e42695ea45cc5f4\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">int&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__input.html#gaf5b859dbe19bdf434e42695ea45cc5f4\">glfwGetInputMode</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window, int mode)</td></tr>\n<tr class=\"memdesc:gaf5b859dbe19bdf434e42695ea45cc5f4\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns the value of an input option for the specified window.  <a href=\"group__input.html#gaf5b859dbe19bdf434e42695ea45cc5f4\">More...</a><br /></td></tr>\n<tr class=\"separator:gaf5b859dbe19bdf434e42695ea45cc5f4\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gaa92336e173da9c8834558b54ee80563b\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">void&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__input.html#gaa92336e173da9c8834558b54ee80563b\">glfwSetInputMode</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window, int mode, int value)</td></tr>\n<tr class=\"memdesc:gaa92336e173da9c8834558b54ee80563b\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Sets an input option for the specified window.  <a href=\"group__input.html#gaa92336e173da9c8834558b54ee80563b\">More...</a><br /></td></tr>\n<tr class=\"separator:gaa92336e173da9c8834558b54ee80563b\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gae4ee0dbd0d256183e1ea4026d897e1c2\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">int&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__input.html#gae4ee0dbd0d256183e1ea4026d897e1c2\">glfwRawMouseMotionSupported</a> (void)</td></tr>\n<tr class=\"memdesc:gae4ee0dbd0d256183e1ea4026d897e1c2\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns whether raw mouse motion is supported.  <a href=\"group__input.html#gae4ee0dbd0d256183e1ea4026d897e1c2\">More...</a><br /></td></tr>\n<tr class=\"separator:gae4ee0dbd0d256183e1ea4026d897e1c2\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga237a182e5ec0b21ce64543f3b5e7e2be\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">const char *&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__input.html#ga237a182e5ec0b21ce64543f3b5e7e2be\">glfwGetKeyName</a> (int key, int scancode)</td></tr>\n<tr class=\"memdesc:ga237a182e5ec0b21ce64543f3b5e7e2be\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns the layout-specific name of the specified printable key.  <a href=\"group__input.html#ga237a182e5ec0b21ce64543f3b5e7e2be\">More...</a><br /></td></tr>\n<tr class=\"separator:ga237a182e5ec0b21ce64543f3b5e7e2be\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga67ddd1b7dcbbaff03e4a76c0ea67103a\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">int&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__input.html#ga67ddd1b7dcbbaff03e4a76c0ea67103a\">glfwGetKeyScancode</a> (int key)</td></tr>\n<tr class=\"memdesc:ga67ddd1b7dcbbaff03e4a76c0ea67103a\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns the platform-specific scancode of the specified key.  <a href=\"group__input.html#ga67ddd1b7dcbbaff03e4a76c0ea67103a\">More...</a><br /></td></tr>\n<tr class=\"separator:ga67ddd1b7dcbbaff03e4a76c0ea67103a\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gadd341da06bc8d418b4dc3a3518af9ad2\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">int&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__input.html#gadd341da06bc8d418b4dc3a3518af9ad2\">glfwGetKey</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window, int key)</td></tr>\n<tr class=\"memdesc:gadd341da06bc8d418b4dc3a3518af9ad2\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns the last reported state of a keyboard key for the specified window.  <a href=\"group__input.html#gadd341da06bc8d418b4dc3a3518af9ad2\">More...</a><br /></td></tr>\n<tr class=\"separator:gadd341da06bc8d418b4dc3a3518af9ad2\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gac1473feacb5996c01a7a5a33b5066704\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">int&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__input.html#gac1473feacb5996c01a7a5a33b5066704\">glfwGetMouseButton</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window, int button)</td></tr>\n<tr class=\"memdesc:gac1473feacb5996c01a7a5a33b5066704\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns the last reported state of a mouse button for the specified window.  <a href=\"group__input.html#gac1473feacb5996c01a7a5a33b5066704\">More...</a><br /></td></tr>\n<tr class=\"separator:gac1473feacb5996c01a7a5a33b5066704\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga01d37b6c40133676b9cea60ca1d7c0cc\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">void&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__input.html#ga01d37b6c40133676b9cea60ca1d7c0cc\">glfwGetCursorPos</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window, double *xpos, double *ypos)</td></tr>\n<tr class=\"memdesc:ga01d37b6c40133676b9cea60ca1d7c0cc\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Retrieves the position of the cursor relative to the content area of the window.  <a href=\"group__input.html#ga01d37b6c40133676b9cea60ca1d7c0cc\">More...</a><br /></td></tr>\n<tr class=\"separator:ga01d37b6c40133676b9cea60ca1d7c0cc\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga04b03af936d906ca123c8f4ee08b39e7\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">void&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__input.html#ga04b03af936d906ca123c8f4ee08b39e7\">glfwSetCursorPos</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window, double xpos, double ypos)</td></tr>\n<tr class=\"memdesc:ga04b03af936d906ca123c8f4ee08b39e7\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Sets the position of the cursor, relative to the content area of the window.  <a href=\"group__input.html#ga04b03af936d906ca123c8f4ee08b39e7\">More...</a><br /></td></tr>\n<tr class=\"separator:ga04b03af936d906ca123c8f4ee08b39e7\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gafca356935e10135016aa49ffa464c355\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\"><a class=\"el\" href=\"group__input.html#ga89261ae18c75e863aaf2656ecdd238f4\">GLFWcursor</a> *&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__input.html#gafca356935e10135016aa49ffa464c355\">glfwCreateCursor</a> (const <a class=\"el\" href=\"structGLFWimage.html\">GLFWimage</a> *image, int xhot, int yhot)</td></tr>\n<tr class=\"memdesc:gafca356935e10135016aa49ffa464c355\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Creates a custom cursor.  <a href=\"group__input.html#gafca356935e10135016aa49ffa464c355\">More...</a><br /></td></tr>\n<tr class=\"separator:gafca356935e10135016aa49ffa464c355\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gaa65f416d03ebbbb5b8db71a489fcb894\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\"><a class=\"el\" href=\"group__input.html#ga89261ae18c75e863aaf2656ecdd238f4\">GLFWcursor</a> *&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__input.html#gaa65f416d03ebbbb5b8db71a489fcb894\">glfwCreateStandardCursor</a> (int shape)</td></tr>\n<tr class=\"memdesc:gaa65f416d03ebbbb5b8db71a489fcb894\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Creates a cursor with a standard shape.  <a href=\"group__input.html#gaa65f416d03ebbbb5b8db71a489fcb894\">More...</a><br /></td></tr>\n<tr class=\"separator:gaa65f416d03ebbbb5b8db71a489fcb894\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga81b952cd1764274d0db7fb3c5a79ba6a\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">void&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__input.html#ga81b952cd1764274d0db7fb3c5a79ba6a\">glfwDestroyCursor</a> (<a class=\"el\" href=\"group__input.html#ga89261ae18c75e863aaf2656ecdd238f4\">GLFWcursor</a> *cursor)</td></tr>\n<tr class=\"memdesc:ga81b952cd1764274d0db7fb3c5a79ba6a\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Destroys a cursor.  <a href=\"group__input.html#ga81b952cd1764274d0db7fb3c5a79ba6a\">More...</a><br /></td></tr>\n<tr class=\"separator:ga81b952cd1764274d0db7fb3c5a79ba6a\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gad3b4f38c8d5dae036bc8fa959e18343e\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">void&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__input.html#gad3b4f38c8d5dae036bc8fa959e18343e\">glfwSetCursor</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window, <a class=\"el\" href=\"group__input.html#ga89261ae18c75e863aaf2656ecdd238f4\">GLFWcursor</a> *cursor)</td></tr>\n<tr class=\"memdesc:gad3b4f38c8d5dae036bc8fa959e18343e\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Sets the cursor for the window.  <a href=\"group__input.html#gad3b4f38c8d5dae036bc8fa959e18343e\">More...</a><br /></td></tr>\n<tr class=\"separator:gad3b4f38c8d5dae036bc8fa959e18343e\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga1caf18159767e761185e49a3be019f8d\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\"><a class=\"el\" href=\"group__input.html#ga0192a232a41e4e82948217c8ba94fdfd\">GLFWkeyfun</a>&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__input.html#ga1caf18159767e761185e49a3be019f8d\">glfwSetKeyCallback</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window, <a class=\"el\" href=\"group__input.html#ga0192a232a41e4e82948217c8ba94fdfd\">GLFWkeyfun</a> callback)</td></tr>\n<tr class=\"memdesc:ga1caf18159767e761185e49a3be019f8d\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Sets the key callback.  <a href=\"group__input.html#ga1caf18159767e761185e49a3be019f8d\">More...</a><br /></td></tr>\n<tr class=\"separator:ga1caf18159767e761185e49a3be019f8d\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gab25c4a220fd8f5717718dbc487828996\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\"><a class=\"el\" href=\"group__input.html#gabf24451c7ceb1952bc02b17a0d5c3e5f\">GLFWcharfun</a>&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__input.html#gab25c4a220fd8f5717718dbc487828996\">glfwSetCharCallback</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window, <a class=\"el\" href=\"group__input.html#gabf24451c7ceb1952bc02b17a0d5c3e5f\">GLFWcharfun</a> callback)</td></tr>\n<tr class=\"memdesc:gab25c4a220fd8f5717718dbc487828996\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Sets the Unicode character callback.  <a href=\"group__input.html#gab25c4a220fd8f5717718dbc487828996\">More...</a><br /></td></tr>\n<tr class=\"separator:gab25c4a220fd8f5717718dbc487828996\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga0b7f4ad13c2b17435ff13b6dcfb4e43c\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\"><a class=\"el\" href=\"group__input.html#gae36fb6897d2b7df9b128900c8ce9c507\">GLFWcharmodsfun</a>&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__input.html#ga0b7f4ad13c2b17435ff13b6dcfb4e43c\">glfwSetCharModsCallback</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window, <a class=\"el\" href=\"group__input.html#gae36fb6897d2b7df9b128900c8ce9c507\">GLFWcharmodsfun</a> callback)</td></tr>\n<tr class=\"memdesc:ga0b7f4ad13c2b17435ff13b6dcfb4e43c\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Sets the Unicode character with modifiers callback.  <a href=\"group__input.html#ga0b7f4ad13c2b17435ff13b6dcfb4e43c\">More...</a><br /></td></tr>\n<tr class=\"separator:ga0b7f4ad13c2b17435ff13b6dcfb4e43c\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga6ab84420974d812bee700e45284a723c\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\"><a class=\"el\" href=\"group__input.html#ga39893a4a7e7c3239c98d29c9e084350c\">GLFWmousebuttonfun</a>&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__input.html#ga6ab84420974d812bee700e45284a723c\">glfwSetMouseButtonCallback</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window, <a class=\"el\" href=\"group__input.html#ga39893a4a7e7c3239c98d29c9e084350c\">GLFWmousebuttonfun</a> callback)</td></tr>\n<tr class=\"memdesc:ga6ab84420974d812bee700e45284a723c\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Sets the mouse button callback.  <a href=\"group__input.html#ga6ab84420974d812bee700e45284a723c\">More...</a><br /></td></tr>\n<tr class=\"separator:ga6ab84420974d812bee700e45284a723c\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gac1f879ab7435d54d4d79bb469fe225d7\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\"><a class=\"el\" href=\"group__input.html#ga4cfad918fa836f09541e7b9acd36686c\">GLFWcursorposfun</a>&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__input.html#gac1f879ab7435d54d4d79bb469fe225d7\">glfwSetCursorPosCallback</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window, <a class=\"el\" href=\"group__input.html#ga4cfad918fa836f09541e7b9acd36686c\">GLFWcursorposfun</a> callback)</td></tr>\n<tr class=\"memdesc:gac1f879ab7435d54d4d79bb469fe225d7\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Sets the cursor position callback.  <a href=\"group__input.html#gac1f879ab7435d54d4d79bb469fe225d7\">More...</a><br /></td></tr>\n<tr class=\"separator:gac1f879ab7435d54d4d79bb469fe225d7\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gad27f8ad0142c038a281466c0966817d8\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\"><a class=\"el\" href=\"group__input.html#ga51ab436c41eeaed6db5a0c9403b1c840\">GLFWcursorenterfun</a>&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__input.html#gad27f8ad0142c038a281466c0966817d8\">glfwSetCursorEnterCallback</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window, <a class=\"el\" href=\"group__input.html#ga51ab436c41eeaed6db5a0c9403b1c840\">GLFWcursorenterfun</a> callback)</td></tr>\n<tr class=\"memdesc:gad27f8ad0142c038a281466c0966817d8\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Sets the cursor enter/leave callback.  <a href=\"group__input.html#gad27f8ad0142c038a281466c0966817d8\">More...</a><br /></td></tr>\n<tr class=\"separator:gad27f8ad0142c038a281466c0966817d8\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga571e45a030ae4061f746ed56cb76aede\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\"><a class=\"el\" href=\"group__input.html#ga4687e2199c60a18a8dd1da532e6d75c9\">GLFWscrollfun</a>&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__input.html#ga571e45a030ae4061f746ed56cb76aede\">glfwSetScrollCallback</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window, <a class=\"el\" href=\"group__input.html#ga4687e2199c60a18a8dd1da532e6d75c9\">GLFWscrollfun</a> callback)</td></tr>\n<tr class=\"memdesc:ga571e45a030ae4061f746ed56cb76aede\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Sets the scroll callback.  <a href=\"group__input.html#ga571e45a030ae4061f746ed56cb76aede\">More...</a><br /></td></tr>\n<tr class=\"separator:ga571e45a030ae4061f746ed56cb76aede\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gab773f0ee0a07cff77a210cea40bc1f6b\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\"><a class=\"el\" href=\"group__input.html#gafd0493dc32cd5ca5810e6148c0c026ea\">GLFWdropfun</a>&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__input.html#gab773f0ee0a07cff77a210cea40bc1f6b\">glfwSetDropCallback</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window, <a class=\"el\" href=\"group__input.html#gafd0493dc32cd5ca5810e6148c0c026ea\">GLFWdropfun</a> callback)</td></tr>\n<tr class=\"memdesc:gab773f0ee0a07cff77a210cea40bc1f6b\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Sets the path drop callback.  <a href=\"group__input.html#gab773f0ee0a07cff77a210cea40bc1f6b\">More...</a><br /></td></tr>\n<tr class=\"separator:gab773f0ee0a07cff77a210cea40bc1f6b\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gaed0966cee139d815317f9ffcba64c9f1\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">int&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__input.html#gaed0966cee139d815317f9ffcba64c9f1\">glfwJoystickPresent</a> (int jid)</td></tr>\n<tr class=\"memdesc:gaed0966cee139d815317f9ffcba64c9f1\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns whether the specified joystick is present.  <a href=\"group__input.html#gaed0966cee139d815317f9ffcba64c9f1\">More...</a><br /></td></tr>\n<tr class=\"separator:gaed0966cee139d815317f9ffcba64c9f1\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gaa8806536731e92c061bc70bcff6edbd0\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">const float *&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__input.html#gaa8806536731e92c061bc70bcff6edbd0\">glfwGetJoystickAxes</a> (int jid, int *count)</td></tr>\n<tr class=\"memdesc:gaa8806536731e92c061bc70bcff6edbd0\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns the values of all axes of the specified joystick.  <a href=\"group__input.html#gaa8806536731e92c061bc70bcff6edbd0\">More...</a><br /></td></tr>\n<tr class=\"separator:gaa8806536731e92c061bc70bcff6edbd0\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gadb3cbf44af90a1536f519659a53bddd6\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">const unsigned char *&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__input.html#gadb3cbf44af90a1536f519659a53bddd6\">glfwGetJoystickButtons</a> (int jid, int *count)</td></tr>\n<tr class=\"memdesc:gadb3cbf44af90a1536f519659a53bddd6\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns the state of all buttons of the specified joystick.  <a href=\"group__input.html#gadb3cbf44af90a1536f519659a53bddd6\">More...</a><br /></td></tr>\n<tr class=\"separator:gadb3cbf44af90a1536f519659a53bddd6\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga2d8d0634bb81c180899aeb07477a67ea\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">const unsigned char *&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__input.html#ga2d8d0634bb81c180899aeb07477a67ea\">glfwGetJoystickHats</a> (int jid, int *count)</td></tr>\n<tr class=\"memdesc:ga2d8d0634bb81c180899aeb07477a67ea\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns the state of all hats of the specified joystick.  <a href=\"group__input.html#ga2d8d0634bb81c180899aeb07477a67ea\">More...</a><br /></td></tr>\n<tr class=\"separator:ga2d8d0634bb81c180899aeb07477a67ea\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gafbe3e51f670320908cfe4e20d3e5559e\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">const char *&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__input.html#gafbe3e51f670320908cfe4e20d3e5559e\">glfwGetJoystickName</a> (int jid)</td></tr>\n<tr class=\"memdesc:gafbe3e51f670320908cfe4e20d3e5559e\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns the name of the specified joystick.  <a href=\"group__input.html#gafbe3e51f670320908cfe4e20d3e5559e\">More...</a><br /></td></tr>\n<tr class=\"separator:gafbe3e51f670320908cfe4e20d3e5559e\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gae168c2c0b8cf2a1cb67c6b3c00bdd543\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">const char *&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__input.html#gae168c2c0b8cf2a1cb67c6b3c00bdd543\">glfwGetJoystickGUID</a> (int jid)</td></tr>\n<tr class=\"memdesc:gae168c2c0b8cf2a1cb67c6b3c00bdd543\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns the SDL compatible GUID of the specified joystick.  <a href=\"group__input.html#gae168c2c0b8cf2a1cb67c6b3c00bdd543\">More...</a><br /></td></tr>\n<tr class=\"separator:gae168c2c0b8cf2a1cb67c6b3c00bdd543\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga6b2f72d64d636b48a727b437cbb7489e\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">void&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__input.html#ga6b2f72d64d636b48a727b437cbb7489e\">glfwSetJoystickUserPointer</a> (int jid, void *pointer)</td></tr>\n<tr class=\"memdesc:ga6b2f72d64d636b48a727b437cbb7489e\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Sets the user pointer of the specified joystick.  <a href=\"group__input.html#ga6b2f72d64d636b48a727b437cbb7489e\">More...</a><br /></td></tr>\n<tr class=\"separator:ga6b2f72d64d636b48a727b437cbb7489e\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga06290acb7ed23895bf26b8e981827ebd\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">void *&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__input.html#ga06290acb7ed23895bf26b8e981827ebd\">glfwGetJoystickUserPointer</a> (int jid)</td></tr>\n<tr class=\"memdesc:ga06290acb7ed23895bf26b8e981827ebd\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns the user pointer of the specified joystick.  <a href=\"group__input.html#ga06290acb7ed23895bf26b8e981827ebd\">More...</a><br /></td></tr>\n<tr class=\"separator:ga06290acb7ed23895bf26b8e981827ebd\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gad0f676860f329d80f7e47e9f06a96f00\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">int&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__input.html#gad0f676860f329d80f7e47e9f06a96f00\">glfwJoystickIsGamepad</a> (int jid)</td></tr>\n<tr class=\"memdesc:gad0f676860f329d80f7e47e9f06a96f00\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns whether the specified joystick has a gamepad mapping.  <a href=\"group__input.html#gad0f676860f329d80f7e47e9f06a96f00\">More...</a><br /></td></tr>\n<tr class=\"separator:gad0f676860f329d80f7e47e9f06a96f00\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga2f60a0e5b7bd8d1b7344dc0a7cb32b4c\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\"><a class=\"el\" href=\"group__input.html#gaa67aa597e974298c748bfe4fb17d406d\">GLFWjoystickfun</a>&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__input.html#ga2f60a0e5b7bd8d1b7344dc0a7cb32b4c\">glfwSetJoystickCallback</a> (<a class=\"el\" href=\"group__input.html#gaa67aa597e974298c748bfe4fb17d406d\">GLFWjoystickfun</a> callback)</td></tr>\n<tr class=\"memdesc:ga2f60a0e5b7bd8d1b7344dc0a7cb32b4c\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Sets the joystick configuration callback.  <a href=\"group__input.html#ga2f60a0e5b7bd8d1b7344dc0a7cb32b4c\">More...</a><br /></td></tr>\n<tr class=\"separator:ga2f60a0e5b7bd8d1b7344dc0a7cb32b4c\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gaed5104612f2fa8e66aa6e846652ad00f\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">int&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__input.html#gaed5104612f2fa8e66aa6e846652ad00f\">glfwUpdateGamepadMappings</a> (const char *string)</td></tr>\n<tr class=\"memdesc:gaed5104612f2fa8e66aa6e846652ad00f\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Adds the specified SDL_GameControllerDB gamepad mappings.  <a href=\"group__input.html#gaed5104612f2fa8e66aa6e846652ad00f\">More...</a><br /></td></tr>\n<tr class=\"separator:gaed5104612f2fa8e66aa6e846652ad00f\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga5c71e3533b2d384db9317fcd7661b210\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">const char *&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__input.html#ga5c71e3533b2d384db9317fcd7661b210\">glfwGetGamepadName</a> (int jid)</td></tr>\n<tr class=\"memdesc:ga5c71e3533b2d384db9317fcd7661b210\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns the human-readable gamepad name for the specified joystick.  <a href=\"group__input.html#ga5c71e3533b2d384db9317fcd7661b210\">More...</a><br /></td></tr>\n<tr class=\"separator:ga5c71e3533b2d384db9317fcd7661b210\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gadccddea8bce6113fa459de379ddaf051\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">int&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__input.html#gadccddea8bce6113fa459de379ddaf051\">glfwGetGamepadState</a> (int jid, <a class=\"el\" href=\"structGLFWgamepadstate.html\">GLFWgamepadstate</a> *state)</td></tr>\n<tr class=\"memdesc:gadccddea8bce6113fa459de379ddaf051\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Retrieves the state of the specified joystick remapped as a gamepad.  <a href=\"group__input.html#gadccddea8bce6113fa459de379ddaf051\">More...</a><br /></td></tr>\n<tr class=\"separator:gadccddea8bce6113fa459de379ddaf051\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gaba1f022c5eb07dfac421df34cdcd31dd\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">void&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__input.html#gaba1f022c5eb07dfac421df34cdcd31dd\">glfwSetClipboardString</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window, const char *string)</td></tr>\n<tr class=\"memdesc:gaba1f022c5eb07dfac421df34cdcd31dd\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Sets the clipboard to the specified string.  <a href=\"group__input.html#gaba1f022c5eb07dfac421df34cdcd31dd\">More...</a><br /></td></tr>\n<tr class=\"separator:gaba1f022c5eb07dfac421df34cdcd31dd\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga5aba1d704d9ab539282b1fbe9f18bb94\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">const char *&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__input.html#ga5aba1d704d9ab539282b1fbe9f18bb94\">glfwGetClipboardString</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window)</td></tr>\n<tr class=\"memdesc:ga5aba1d704d9ab539282b1fbe9f18bb94\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns the contents of the clipboard as a string.  <a href=\"group__input.html#ga5aba1d704d9ab539282b1fbe9f18bb94\">More...</a><br /></td></tr>\n<tr class=\"separator:ga5aba1d704d9ab539282b1fbe9f18bb94\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gaa6cf4e7a77158a3b8fd00328b1720a4a\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">double&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__input.html#gaa6cf4e7a77158a3b8fd00328b1720a4a\">glfwGetTime</a> (void)</td></tr>\n<tr class=\"memdesc:gaa6cf4e7a77158a3b8fd00328b1720a4a\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns the GLFW time.  <a href=\"group__input.html#gaa6cf4e7a77158a3b8fd00328b1720a4a\">More...</a><br /></td></tr>\n<tr class=\"separator:gaa6cf4e7a77158a3b8fd00328b1720a4a\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gaf59589ef6e8b8c8b5ad184b25afd4dc0\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">void&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__input.html#gaf59589ef6e8b8c8b5ad184b25afd4dc0\">glfwSetTime</a> (double time)</td></tr>\n<tr class=\"memdesc:gaf59589ef6e8b8c8b5ad184b25afd4dc0\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Sets the GLFW time.  <a href=\"group__input.html#gaf59589ef6e8b8c8b5ad184b25afd4dc0\">More...</a><br /></td></tr>\n<tr class=\"separator:gaf59589ef6e8b8c8b5ad184b25afd4dc0\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga09b2bd37d328e0b9456c7ec575cc26aa\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">uint64_t&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__input.html#ga09b2bd37d328e0b9456c7ec575cc26aa\">glfwGetTimerValue</a> (void)</td></tr>\n<tr class=\"memdesc:ga09b2bd37d328e0b9456c7ec575cc26aa\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns the current value of the raw timer.  <a href=\"group__input.html#ga09b2bd37d328e0b9456c7ec575cc26aa\">More...</a><br /></td></tr>\n<tr class=\"separator:ga09b2bd37d328e0b9456c7ec575cc26aa\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga3289ee876572f6e91f06df3a24824443\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">uint64_t&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__input.html#ga3289ee876572f6e91f06df3a24824443\">glfwGetTimerFrequency</a> (void)</td></tr>\n<tr class=\"memdesc:ga3289ee876572f6e91f06df3a24824443\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns the frequency, in Hz, of the raw timer.  <a href=\"group__input.html#ga3289ee876572f6e91f06df3a24824443\">More...</a><br /></td></tr>\n<tr class=\"separator:ga3289ee876572f6e91f06df3a24824443\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga1c04dc242268f827290fe40aa1c91157\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">void&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__context.html#ga1c04dc242268f827290fe40aa1c91157\">glfwMakeContextCurrent</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window)</td></tr>\n<tr class=\"memdesc:ga1c04dc242268f827290fe40aa1c91157\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Makes the context of the specified window current for the calling thread.  <a href=\"group__context.html#ga1c04dc242268f827290fe40aa1c91157\">More...</a><br /></td></tr>\n<tr class=\"separator:ga1c04dc242268f827290fe40aa1c91157\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gac84759b1f6c2d271a4fea8ae89ec980d\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\"><a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__context.html#gac84759b1f6c2d271a4fea8ae89ec980d\">glfwGetCurrentContext</a> (void)</td></tr>\n<tr class=\"memdesc:gac84759b1f6c2d271a4fea8ae89ec980d\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns the window whose context is current on the calling thread.  <a href=\"group__context.html#gac84759b1f6c2d271a4fea8ae89ec980d\">More...</a><br /></td></tr>\n<tr class=\"separator:gac84759b1f6c2d271a4fea8ae89ec980d\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga15a5a1ee5b3c2ca6b15ca209a12efd14\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">void&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga15a5a1ee5b3c2ca6b15ca209a12efd14\">glfwSwapBuffers</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window)</td></tr>\n<tr class=\"memdesc:ga15a5a1ee5b3c2ca6b15ca209a12efd14\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Swaps the front and back buffers of the specified window.  <a href=\"group__window.html#ga15a5a1ee5b3c2ca6b15ca209a12efd14\">More...</a><br /></td></tr>\n<tr class=\"separator:ga15a5a1ee5b3c2ca6b15ca209a12efd14\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga6d4e0cdf151b5e579bd67f13202994ed\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">void&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__context.html#ga6d4e0cdf151b5e579bd67f13202994ed\">glfwSwapInterval</a> (int interval)</td></tr>\n<tr class=\"memdesc:ga6d4e0cdf151b5e579bd67f13202994ed\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Sets the swap interval for the current context.  <a href=\"group__context.html#ga6d4e0cdf151b5e579bd67f13202994ed\">More...</a><br /></td></tr>\n<tr class=\"separator:ga6d4e0cdf151b5e579bd67f13202994ed\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga87425065c011cef1ebd6aac75e059dfa\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">int&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__context.html#ga87425065c011cef1ebd6aac75e059dfa\">glfwExtensionSupported</a> (const char *extension)</td></tr>\n<tr class=\"memdesc:ga87425065c011cef1ebd6aac75e059dfa\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns whether the specified extension is available.  <a href=\"group__context.html#ga87425065c011cef1ebd6aac75e059dfa\">More...</a><br /></td></tr>\n<tr class=\"separator:ga87425065c011cef1ebd6aac75e059dfa\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga35f1837e6f666781842483937612f163\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\"><a class=\"el\" href=\"group__context.html#ga3d47c2d2fbe0be9c505d0e04e91a133c\">GLFWglproc</a>&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__context.html#ga35f1837e6f666781842483937612f163\">glfwGetProcAddress</a> (const char *procname)</td></tr>\n<tr class=\"memdesc:ga35f1837e6f666781842483937612f163\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns the address of the specified function for the current context.  <a href=\"group__context.html#ga35f1837e6f666781842483937612f163\">More...</a><br /></td></tr>\n<tr class=\"separator:ga35f1837e6f666781842483937612f163\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga2e7f30931e02464b5bc8d0d4b6f9fe2b\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">int&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__vulkan.html#ga2e7f30931e02464b5bc8d0d4b6f9fe2b\">glfwVulkanSupported</a> (void)</td></tr>\n<tr class=\"memdesc:ga2e7f30931e02464b5bc8d0d4b6f9fe2b\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns whether the Vulkan loader and an ICD have been found.  <a href=\"group__vulkan.html#ga2e7f30931e02464b5bc8d0d4b6f9fe2b\">More...</a><br /></td></tr>\n<tr class=\"separator:ga2e7f30931e02464b5bc8d0d4b6f9fe2b\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga1abcbe61033958f22f63ef82008874b1\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">const char **&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__vulkan.html#ga1abcbe61033958f22f63ef82008874b1\">glfwGetRequiredInstanceExtensions</a> (uint32_t *count)</td></tr>\n<tr class=\"memdesc:ga1abcbe61033958f22f63ef82008874b1\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns the Vulkan instance extensions required by GLFW.  <a href=\"group__vulkan.html#ga1abcbe61033958f22f63ef82008874b1\">More...</a><br /></td></tr>\n<tr class=\"separator:ga1abcbe61033958f22f63ef82008874b1\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gadf228fac94c5fd8f12423ec9af9ff1e9\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\"><a class=\"el\" href=\"group__vulkan.html#ga70c01918dc9d233a4fbe0681a43018af\">GLFWvkproc</a>&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__vulkan.html#gadf228fac94c5fd8f12423ec9af9ff1e9\">glfwGetInstanceProcAddress</a> (VkInstance instance, const char *procname)</td></tr>\n<tr class=\"memdesc:gadf228fac94c5fd8f12423ec9af9ff1e9\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns the address of the specified Vulkan instance function.  <a href=\"group__vulkan.html#gadf228fac94c5fd8f12423ec9af9ff1e9\">More...</a><br /></td></tr>\n<tr class=\"separator:gadf228fac94c5fd8f12423ec9af9ff1e9\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gaff3823355cdd7e2f3f9f4d9ea9518d92\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">int&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__vulkan.html#gaff3823355cdd7e2f3f9f4d9ea9518d92\">glfwGetPhysicalDevicePresentationSupport</a> (VkInstance instance, VkPhysicalDevice device, uint32_t queuefamily)</td></tr>\n<tr class=\"memdesc:gaff3823355cdd7e2f3f9f4d9ea9518d92\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns whether the specified queue family can present images.  <a href=\"group__vulkan.html#gaff3823355cdd7e2f3f9f4d9ea9518d92\">More...</a><br /></td></tr>\n<tr class=\"separator:gaff3823355cdd7e2f3f9f4d9ea9518d92\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga1a24536bec3f80b08ead18e28e6ae965\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">VkResult&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__vulkan.html#ga1a24536bec3f80b08ead18e28e6ae965\">glfwCreateWindowSurface</a> (VkInstance instance, <a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window, const VkAllocationCallbacks *allocator, VkSurfaceKHR *surface)</td></tr>\n<tr class=\"memdesc:ga1a24536bec3f80b08ead18e28e6ae965\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Creates a Vulkan surface for the specified window.  <a href=\"group__vulkan.html#ga1a24536bec3f80b08ead18e28e6ae965\">More...</a><br /></td></tr>\n<tr class=\"separator:ga1a24536bec3f80b08ead18e28e6ae965\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n</table>\n<h2 class=\"groupheader\">Macro Definition Documentation</h2>\n<a id=\"a8a8538c5500308b4211844f2fb26c7b9\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#a8a8538c5500308b4211844f2fb26c7b9\">&#9670;&nbsp;</a></span>GLFW_APIENTRY_DEFINED</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_APIENTRY_DEFINED</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"a8f6dcdc968d214ff14779564f1389264\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#a8f6dcdc968d214ff14779564f1389264\">&#9670;&nbsp;</a></span>GLFW_NO_API</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_NO_API&#160;&#160;&#160;0</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"a01b3f66db266341425e9abee6b257db2\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#a01b3f66db266341425e9abee6b257db2\">&#9670;&nbsp;</a></span>GLFW_OPENGL_API</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_OPENGL_API&#160;&#160;&#160;0x00030001</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"a28d9b3bc6c2a522d815c8e146595051f\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#a28d9b3bc6c2a522d815c8e146595051f\">&#9670;&nbsp;</a></span>GLFW_OPENGL_ES_API</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_OPENGL_ES_API&#160;&#160;&#160;0x00030002</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"a8b306cb27f5bb0d6d67c7356a0e0fc34\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#a8b306cb27f5bb0d6d67c7356a0e0fc34\">&#9670;&nbsp;</a></span>GLFW_NO_ROBUSTNESS</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_NO_ROBUSTNESS&#160;&#160;&#160;0</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"aee84a679230d205005e22487ff678a85\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#aee84a679230d205005e22487ff678a85\">&#9670;&nbsp;</a></span>GLFW_NO_RESET_NOTIFICATION</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_NO_RESET_NOTIFICATION&#160;&#160;&#160;0x00031001</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"aec1132f245143fc915b2f0995228564c\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#aec1132f245143fc915b2f0995228564c\">&#9670;&nbsp;</a></span>GLFW_LOSE_CONTEXT_ON_RESET</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_LOSE_CONTEXT_ON_RESET&#160;&#160;&#160;0x00031002</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"ad6f2335d6f21cc9bab96633b1c111d5f\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ad6f2335d6f21cc9bab96633b1c111d5f\">&#9670;&nbsp;</a></span>GLFW_OPENGL_ANY_PROFILE</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_OPENGL_ANY_PROFILE&#160;&#160;&#160;0</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"af094bb16da76f66ebceb19ee213b3de8\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#af094bb16da76f66ebceb19ee213b3de8\">&#9670;&nbsp;</a></span>GLFW_OPENGL_CORE_PROFILE</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_OPENGL_CORE_PROFILE&#160;&#160;&#160;0x00032001</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"ac06b663d79c8fcf04669cc8fcc0b7670\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ac06b663d79c8fcf04669cc8fcc0b7670\">&#9670;&nbsp;</a></span>GLFW_OPENGL_COMPAT_PROFILE</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_OPENGL_COMPAT_PROFILE&#160;&#160;&#160;0x00032002</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"aade31da5b884a84a7625c6b059b9132c\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#aade31da5b884a84a7625c6b059b9132c\">&#9670;&nbsp;</a></span>GLFW_CURSOR</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_CURSOR&#160;&#160;&#160;0x00033001</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"ae3bbe2315b7691ab088159eb6c9110fc\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ae3bbe2315b7691ab088159eb6c9110fc\">&#9670;&nbsp;</a></span>GLFW_STICKY_KEYS</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_STICKY_KEYS&#160;&#160;&#160;0x00033002</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"a4d7ce8ce71030c3b04e2b78145bc59d1\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#a4d7ce8ce71030c3b04e2b78145bc59d1\">&#9670;&nbsp;</a></span>GLFW_STICKY_MOUSE_BUTTONS</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_STICKY_MOUSE_BUTTONS&#160;&#160;&#160;0x00033003</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"a07b84de0b52143e1958f88a7d9105947\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#a07b84de0b52143e1958f88a7d9105947\">&#9670;&nbsp;</a></span>GLFW_LOCK_KEY_MODS</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_LOCK_KEY_MODS&#160;&#160;&#160;0x00033004</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"aeeda1be76a44a1fc97c1282e06281fbb\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#aeeda1be76a44a1fc97c1282e06281fbb\">&#9670;&nbsp;</a></span>GLFW_RAW_MOUSE_MOTION</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_RAW_MOUSE_MOTION&#160;&#160;&#160;0x00033005</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"ae04dd25c8577e19fa8c97368561f6c68\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ae04dd25c8577e19fa8c97368561f6c68\">&#9670;&nbsp;</a></span>GLFW_CURSOR_NORMAL</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_CURSOR_NORMAL&#160;&#160;&#160;0x00034001</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"ac4d5cb9d78de8573349c58763d53bf11\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ac4d5cb9d78de8573349c58763d53bf11\">&#9670;&nbsp;</a></span>GLFW_CURSOR_HIDDEN</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_CURSOR_HIDDEN&#160;&#160;&#160;0x00034002</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"a2315b99a329ce53e6a13a9d46fd5ca88\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#a2315b99a329ce53e6a13a9d46fd5ca88\">&#9670;&nbsp;</a></span>GLFW_CURSOR_DISABLED</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_CURSOR_DISABLED&#160;&#160;&#160;0x00034003</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"a6b47d806f285efe9bfd7aeec667297ee\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#a6b47d806f285efe9bfd7aeec667297ee\">&#9670;&nbsp;</a></span>GLFW_ANY_RELEASE_BEHAVIOR</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_ANY_RELEASE_BEHAVIOR&#160;&#160;&#160;0</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"a999961d391db49cb4f949c1dece0e13b\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#a999961d391db49cb4f949c1dece0e13b\">&#9670;&nbsp;</a></span>GLFW_RELEASE_BEHAVIOR_FLUSH</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_RELEASE_BEHAVIOR_FLUSH&#160;&#160;&#160;0x00035001</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"afca09088eccacdce4b59036cfae349c5\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#afca09088eccacdce4b59036cfae349c5\">&#9670;&nbsp;</a></span>GLFW_RELEASE_BEHAVIOR_NONE</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_RELEASE_BEHAVIOR_NONE&#160;&#160;&#160;0x00035002</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"a0494c9bfd3f584ab41e6dbeeaa0e6a19\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#a0494c9bfd3f584ab41e6dbeeaa0e6a19\">&#9670;&nbsp;</a></span>GLFW_NATIVE_CONTEXT_API</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_NATIVE_CONTEXT_API&#160;&#160;&#160;0x00036001</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"a03cf65c9ab01fc8b872ba58842c531c9\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#a03cf65c9ab01fc8b872ba58842c531c9\">&#9670;&nbsp;</a></span>GLFW_EGL_CONTEXT_API</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_EGL_CONTEXT_API&#160;&#160;&#160;0x00036002</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"afd34a473af9fa81f317910ea371b19e3\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#afd34a473af9fa81f317910ea371b19e3\">&#9670;&nbsp;</a></span>GLFW_OSMESA_CONTEXT_API</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_OSMESA_CONTEXT_API&#160;&#160;&#160;0x00036003</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"abe11513fd1ffbee5bb9b173f06028b9e\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#abe11513fd1ffbee5bb9b173f06028b9e\">&#9670;&nbsp;</a></span>GLFW_CONNECTED</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_CONNECTED&#160;&#160;&#160;0x00040001</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"aab64b25921ef21d89252d6f0a71bfc32\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#aab64b25921ef21d89252d6f0a71bfc32\">&#9670;&nbsp;</a></span>GLFW_DISCONNECTED</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_DISCONNECTED&#160;&#160;&#160;0x00040002</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"a7a2edf2c18446833d27d07f1b7f3d571\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#a7a2edf2c18446833d27d07f1b7f3d571\">&#9670;&nbsp;</a></span>GLFW_DONT_CARE</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_DONT_CARE&#160;&#160;&#160;-1</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"aa97755eb47e4bf2727ad45d610e18206\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#aa97755eb47e4bf2727ad45d610e18206\">&#9670;&nbsp;</a></span>GLAPIENTRY</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLAPIENTRY&#160;&#160;&#160;APIENTRY</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n</div><!-- contents -->\n<address class=\"footer\">\n<p>\nLast update on Mon Jan 20 2020 for GLFW 3.3.2\n</p>\n</address>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/glfw3_8h_source.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta http-equiv=\"X-UA-Compatible\" content=\"IE=9\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<title>GLFW: glfw3.h Source File</title>\n<link href=\"tabs.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"jquery.js\"></script>\n<script type=\"text/javascript\" src=\"dynsections.js\"></script>\n<link href=\"search/search.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"search/searchdata.js\"></script>\n<script type=\"text/javascript\" src=\"search/search.js\"></script>\n<link href=\"doxygen.css\" rel=\"stylesheet\" type=\"text/css\" />\n<link href=\"extra.css\" rel=\"stylesheet\" type=\"text/css\"/>\n</head>\n<body>\n<div id=\"top\"><!-- do not remove this div, it is closed by doxygen! -->\n<div id=\"titlearea\">\n\t<div class=\"glfwheader\">\n\t\t<a href=\"https://www.glfw.org/\" id=\"glfwhome\">GLFW</a>\n\t\t<ul class=\"glfwnavbar\">\n\t\t\t<li><a href=\"https://www.glfw.org/documentation.html\">Documentation</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/download.html\">Download</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/community.html\">Community</a></li>\n\t\t</ul>\n\t</div>\n</div>\n<!-- end header part -->\n<!-- Generated by Doxygen 1.8.16 -->\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\nvar searchBox = new SearchBox(\"searchBox\", \"search\",false,'Search');\n/* @license-end */\n</script>\n<script type=\"text/javascript\" src=\"menudata.js\"></script>\n<script type=\"text/javascript\" src=\"menu.js\"></script>\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\n$(function() {\n  initMenu('',true,false,'search.php','Search');\n  $(document).ready(function() { init_search(); });\n});\n/* @license-end */</script>\n<div id=\"main-nav\"></div>\n<!-- window showing the filter options -->\n<div id=\"MSearchSelectWindow\"\n     onmouseover=\"return searchBox.OnSearchSelectShow()\"\n     onmouseout=\"return searchBox.OnSearchSelectHide()\"\n     onkeydown=\"return searchBox.OnSearchSelectKey(event)\">\n</div>\n\n<!-- iframe showing the search results (closed by default) -->\n<div id=\"MSearchResultsWindow\">\n<iframe src=\"javascript:void(0)\" frameborder=\"0\" \n        name=\"MSearchResults\" id=\"MSearchResults\">\n</iframe>\n</div>\n\n<div id=\"nav-path\" class=\"navpath\">\n  <ul>\n<li class=\"navelem\"><a class=\"el\" href=\"dir_bc6505cac00d7a6291dbfd9af70666b7.html\">glfw-3.3.2</a></li><li class=\"navelem\"><a class=\"el\" href=\"dir_a58ef735c5cc5a9a31d321e1abe7c42e.html\">include</a></li><li class=\"navelem\"><a class=\"el\" href=\"dir_15a5176d7c9cc5c407ed4f611edf0684.html\">GLFW</a></li>  </ul>\n</div>\n</div><!-- top -->\n<div class=\"header\">\n  <div class=\"headertitle\">\n<div class=\"title\">glfw3.h</div>  </div>\n</div><!--header-->\n<div class=\"contents\">\n<a href=\"glfw3_8h.html\">Go to the documentation of this file.</a><div class=\"fragment\"><div class=\"line\"><a name=\"l00001\"></a><span class=\"lineno\">    1</span>&#160;<span class=\"comment\">/*************************************************************************</span></div>\n<div class=\"line\"><a name=\"l00002\"></a><span class=\"lineno\">    2</span>&#160;<span class=\"comment\"> * GLFW 3.3 - www.glfw.org</span></div>\n<div class=\"line\"><a name=\"l00003\"></a><span class=\"lineno\">    3</span>&#160;<span class=\"comment\"> * A library for OpenGL, window and input</span></div>\n<div class=\"line\"><a name=\"l00004\"></a><span class=\"lineno\">    4</span>&#160;<span class=\"comment\"> *------------------------------------------------------------------------</span></div>\n<div class=\"line\"><a name=\"l00005\"></a><span class=\"lineno\">    5</span>&#160;<span class=\"comment\"> * Copyright (c) 2002-2006 Marcus Geelnard</span></div>\n<div class=\"line\"><a name=\"l00006\"></a><span class=\"lineno\">    6</span>&#160;<span class=\"comment\"> * Copyright (c) 2006-2019 Camilla Löwy &lt;elmindreda@glfw.org&gt;</span></div>\n<div class=\"line\"><a name=\"l00007\"></a><span class=\"lineno\">    7</span>&#160;<span class=\"comment\"> *</span></div>\n<div class=\"line\"><a name=\"l00008\"></a><span class=\"lineno\">    8</span>&#160;<span class=\"comment\"> * This software is provided &#39;as-is&#39;, without any express or implied</span></div>\n<div class=\"line\"><a name=\"l00009\"></a><span class=\"lineno\">    9</span>&#160;<span class=\"comment\"> * warranty. In no event will the authors be held liable for any damages</span></div>\n<div class=\"line\"><a name=\"l00010\"></a><span class=\"lineno\">   10</span>&#160;<span class=\"comment\"> * arising from the use of this software.</span></div>\n<div class=\"line\"><a name=\"l00011\"></a><span class=\"lineno\">   11</span>&#160;<span class=\"comment\"> *</span></div>\n<div class=\"line\"><a name=\"l00012\"></a><span class=\"lineno\">   12</span>&#160;<span class=\"comment\"> * Permission is granted to anyone to use this software for any purpose,</span></div>\n<div class=\"line\"><a name=\"l00013\"></a><span class=\"lineno\">   13</span>&#160;<span class=\"comment\"> * including commercial applications, and to alter it and redistribute it</span></div>\n<div class=\"line\"><a name=\"l00014\"></a><span class=\"lineno\">   14</span>&#160;<span class=\"comment\"> * freely, subject to the following restrictions:</span></div>\n<div class=\"line\"><a name=\"l00015\"></a><span class=\"lineno\">   15</span>&#160;<span class=\"comment\"> *</span></div>\n<div class=\"line\"><a name=\"l00016\"></a><span class=\"lineno\">   16</span>&#160;<span class=\"comment\"> * 1. The origin of this software must not be misrepresented; you must not</span></div>\n<div class=\"line\"><a name=\"l00017\"></a><span class=\"lineno\">   17</span>&#160;<span class=\"comment\"> *    claim that you wrote the original software. If you use this software</span></div>\n<div class=\"line\"><a name=\"l00018\"></a><span class=\"lineno\">   18</span>&#160;<span class=\"comment\"> *    in a product, an acknowledgment in the product documentation would</span></div>\n<div class=\"line\"><a name=\"l00019\"></a><span class=\"lineno\">   19</span>&#160;<span class=\"comment\"> *    be appreciated but is not required.</span></div>\n<div class=\"line\"><a name=\"l00020\"></a><span class=\"lineno\">   20</span>&#160;<span class=\"comment\"> *</span></div>\n<div class=\"line\"><a name=\"l00021\"></a><span class=\"lineno\">   21</span>&#160;<span class=\"comment\"> * 2. Altered source versions must be plainly marked as such, and must not</span></div>\n<div class=\"line\"><a name=\"l00022\"></a><span class=\"lineno\">   22</span>&#160;<span class=\"comment\"> *    be misrepresented as being the original software.</span></div>\n<div class=\"line\"><a name=\"l00023\"></a><span class=\"lineno\">   23</span>&#160;<span class=\"comment\"> *</span></div>\n<div class=\"line\"><a name=\"l00024\"></a><span class=\"lineno\">   24</span>&#160;<span class=\"comment\"> * 3. This notice may not be removed or altered from any source</span></div>\n<div class=\"line\"><a name=\"l00025\"></a><span class=\"lineno\">   25</span>&#160;<span class=\"comment\"> *    distribution.</span></div>\n<div class=\"line\"><a name=\"l00026\"></a><span class=\"lineno\">   26</span>&#160;<span class=\"comment\"> *</span></div>\n<div class=\"line\"><a name=\"l00027\"></a><span class=\"lineno\">   27</span>&#160;<span class=\"comment\"> *************************************************************************/</span></div>\n<div class=\"line\"><a name=\"l00028\"></a><span class=\"lineno\">   28</span>&#160; </div>\n<div class=\"line\"><a name=\"l00029\"></a><span class=\"lineno\">   29</span>&#160;<span class=\"preprocessor\">#ifndef _glfw3_h_</span></div>\n<div class=\"line\"><a name=\"l00030\"></a><span class=\"lineno\">   30</span>&#160;<span class=\"preprocessor\">#define _glfw3_h_</span></div>\n<div class=\"line\"><a name=\"l00031\"></a><span class=\"lineno\">   31</span>&#160; </div>\n<div class=\"line\"><a name=\"l00032\"></a><span class=\"lineno\">   32</span>&#160;<span class=\"preprocessor\">#ifdef __cplusplus</span></div>\n<div class=\"line\"><a name=\"l00033\"></a><span class=\"lineno\">   33</span>&#160;<span class=\"keyword\">extern</span> <span class=\"stringliteral\">&quot;C&quot;</span> {</div>\n<div class=\"line\"><a name=\"l00034\"></a><span class=\"lineno\">   34</span>&#160;<span class=\"preprocessor\">#endif</span></div>\n<div class=\"line\"><a name=\"l00035\"></a><span class=\"lineno\">   35</span>&#160; </div>\n<div class=\"line\"><a name=\"l00036\"></a><span class=\"lineno\">   36</span>&#160; </div>\n<div class=\"line\"><a name=\"l00037\"></a><span class=\"lineno\">   37</span>&#160;<span class=\"comment\">/*************************************************************************</span></div>\n<div class=\"line\"><a name=\"l00038\"></a><span class=\"lineno\">   38</span>&#160;<span class=\"comment\"> * Doxygen documentation</span></div>\n<div class=\"line\"><a name=\"l00039\"></a><span class=\"lineno\">   39</span>&#160;<span class=\"comment\"> *************************************************************************/</span></div>\n<div class=\"line\"><a name=\"l00040\"></a><span class=\"lineno\">   40</span>&#160; </div>\n<div class=\"line\"><a name=\"l00089\"></a><span class=\"lineno\">   89</span>&#160;<span class=\"comment\">/*************************************************************************</span></div>\n<div class=\"line\"><a name=\"l00090\"></a><span class=\"lineno\">   90</span>&#160;<span class=\"comment\"> * Compiler- and platform-specific preprocessor work</span></div>\n<div class=\"line\"><a name=\"l00091\"></a><span class=\"lineno\">   91</span>&#160;<span class=\"comment\"> *************************************************************************/</span></div>\n<div class=\"line\"><a name=\"l00092\"></a><span class=\"lineno\">   92</span>&#160; </div>\n<div class=\"line\"><a name=\"l00093\"></a><span class=\"lineno\">   93</span>&#160;<span class=\"comment\">/* If we are we on Windows, we want a single define for it.</span></div>\n<div class=\"line\"><a name=\"l00094\"></a><span class=\"lineno\">   94</span>&#160;<span class=\"comment\"> */</span></div>\n<div class=\"line\"><a name=\"l00095\"></a><span class=\"lineno\">   95</span>&#160;<span class=\"preprocessor\">#if !defined(_WIN32) &amp;&amp; (defined(__WIN32__) || defined(WIN32) || defined(__MINGW32__))</span></div>\n<div class=\"line\"><a name=\"l00096\"></a><span class=\"lineno\">   96</span>&#160;<span class=\"preprocessor\"> #define _WIN32</span></div>\n<div class=\"line\"><a name=\"l00097\"></a><span class=\"lineno\">   97</span>&#160;<span class=\"preprocessor\">#endif </span><span class=\"comment\">/* _WIN32 */</span><span class=\"preprocessor\"></span></div>\n<div class=\"line\"><a name=\"l00098\"></a><span class=\"lineno\">   98</span>&#160; </div>\n<div class=\"line\"><a name=\"l00099\"></a><span class=\"lineno\">   99</span>&#160;<span class=\"comment\">/* Include because most Windows GLU headers need wchar_t and</span></div>\n<div class=\"line\"><a name=\"l00100\"></a><span class=\"lineno\">  100</span>&#160;<span class=\"comment\"> * the macOS OpenGL header blocks the definition of ptrdiff_t by glext.h.</span></div>\n<div class=\"line\"><a name=\"l00101\"></a><span class=\"lineno\">  101</span>&#160;<span class=\"comment\"> * Include it unconditionally to avoid surprising side-effects.</span></div>\n<div class=\"line\"><a name=\"l00102\"></a><span class=\"lineno\">  102</span>&#160;<span class=\"comment\"> */</span></div>\n<div class=\"line\"><a name=\"l00103\"></a><span class=\"lineno\">  103</span>&#160;<span class=\"preprocessor\">#include &lt;stddef.h&gt;</span></div>\n<div class=\"line\"><a name=\"l00104\"></a><span class=\"lineno\">  104</span>&#160; </div>\n<div class=\"line\"><a name=\"l00105\"></a><span class=\"lineno\">  105</span>&#160;<span class=\"comment\">/* Include because it is needed by Vulkan and related functions.</span></div>\n<div class=\"line\"><a name=\"l00106\"></a><span class=\"lineno\">  106</span>&#160;<span class=\"comment\"> * Include it unconditionally to avoid surprising side-effects.</span></div>\n<div class=\"line\"><a name=\"l00107\"></a><span class=\"lineno\">  107</span>&#160;<span class=\"comment\"> */</span></div>\n<div class=\"line\"><a name=\"l00108\"></a><span class=\"lineno\">  108</span>&#160;<span class=\"preprocessor\">#include &lt;stdint.h&gt;</span></div>\n<div class=\"line\"><a name=\"l00109\"></a><span class=\"lineno\">  109</span>&#160; </div>\n<div class=\"line\"><a name=\"l00110\"></a><span class=\"lineno\">  110</span>&#160;<span class=\"preprocessor\">#if defined(GLFW_INCLUDE_VULKAN)</span></div>\n<div class=\"line\"><a name=\"l00111\"></a><span class=\"lineno\">  111</span>&#160;<span class=\"preprocessor\">  #include &lt;vulkan/vulkan.h&gt;</span></div>\n<div class=\"line\"><a name=\"l00112\"></a><span class=\"lineno\">  112</span>&#160;<span class=\"preprocessor\">#endif </span><span class=\"comment\">/* Vulkan header */</span><span class=\"preprocessor\"></span></div>\n<div class=\"line\"><a name=\"l00113\"></a><span class=\"lineno\">  113</span>&#160; </div>\n<div class=\"line\"><a name=\"l00114\"></a><span class=\"lineno\">  114</span>&#160;<span class=\"comment\">/* The Vulkan header may have indirectly included windows.h (because of</span></div>\n<div class=\"line\"><a name=\"l00115\"></a><span class=\"lineno\">  115</span>&#160;<span class=\"comment\"> * VK_USE_PLATFORM_WIN32_KHR) so we offer our replacement symbols after it.</span></div>\n<div class=\"line\"><a name=\"l00116\"></a><span class=\"lineno\">  116</span>&#160;<span class=\"comment\"> */</span></div>\n<div class=\"line\"><a name=\"l00117\"></a><span class=\"lineno\">  117</span>&#160; </div>\n<div class=\"line\"><a name=\"l00118\"></a><span class=\"lineno\">  118</span>&#160;<span class=\"comment\">/* It is customary to use APIENTRY for OpenGL function pointer declarations on</span></div>\n<div class=\"line\"><a name=\"l00119\"></a><span class=\"lineno\">  119</span>&#160;<span class=\"comment\"> * all platforms.  Additionally, the Windows OpenGL header needs APIENTRY.</span></div>\n<div class=\"line\"><a name=\"l00120\"></a><span class=\"lineno\">  120</span>&#160;<span class=\"comment\"> */</span></div>\n<div class=\"line\"><a name=\"l00121\"></a><span class=\"lineno\">  121</span>&#160;<span class=\"preprocessor\">#if !defined(APIENTRY)</span></div>\n<div class=\"line\"><a name=\"l00122\"></a><span class=\"lineno\">  122</span>&#160;<span class=\"preprocessor\"> #if defined(_WIN32)</span></div>\n<div class=\"line\"><a name=\"l00123\"></a><span class=\"lineno\">  123</span>&#160;<span class=\"preprocessor\">  #define APIENTRY __stdcall</span></div>\n<div class=\"line\"><a name=\"l00124\"></a><span class=\"lineno\"><a class=\"line\" href=\"glfw3_8h.html#a8a8538c5500308b4211844f2fb26c7b9\">  124</a></span>&#160;<span class=\"preprocessor\"> #else</span></div>\n<div class=\"line\"><a name=\"l00125\"></a><span class=\"lineno\">  125</span>&#160;<span class=\"preprocessor\">  #define APIENTRY</span></div>\n<div class=\"line\"><a name=\"l00126\"></a><span class=\"lineno\">  126</span>&#160;<span class=\"preprocessor\"> #endif</span></div>\n<div class=\"line\"><a name=\"l00127\"></a><span class=\"lineno\">  127</span>&#160;<span class=\"preprocessor\"> #define GLFW_APIENTRY_DEFINED</span></div>\n<div class=\"line\"><a name=\"l00128\"></a><span class=\"lineno\">  128</span>&#160;<span class=\"preprocessor\">#endif </span><span class=\"comment\">/* APIENTRY */</span><span class=\"preprocessor\"></span></div>\n<div class=\"line\"><a name=\"l00129\"></a><span class=\"lineno\">  129</span>&#160; </div>\n<div class=\"line\"><a name=\"l00130\"></a><span class=\"lineno\">  130</span>&#160;<span class=\"comment\">/* Some Windows OpenGL headers need this.</span></div>\n<div class=\"line\"><a name=\"l00131\"></a><span class=\"lineno\">  131</span>&#160;<span class=\"comment\"> */</span></div>\n<div class=\"line\"><a name=\"l00132\"></a><span class=\"lineno\">  132</span>&#160;<span class=\"preprocessor\">#if !defined(WINGDIAPI) &amp;&amp; defined(_WIN32)</span></div>\n<div class=\"line\"><a name=\"l00133\"></a><span class=\"lineno\">  133</span>&#160;<span class=\"preprocessor\"> #define WINGDIAPI __declspec(dllimport)</span></div>\n<div class=\"line\"><a name=\"l00134\"></a><span class=\"lineno\">  134</span>&#160;<span class=\"preprocessor\"> #define GLFW_WINGDIAPI_DEFINED</span></div>\n<div class=\"line\"><a name=\"l00135\"></a><span class=\"lineno\">  135</span>&#160;<span class=\"preprocessor\">#endif </span><span class=\"comment\">/* WINGDIAPI */</span><span class=\"preprocessor\"></span></div>\n<div class=\"line\"><a name=\"l00136\"></a><span class=\"lineno\">  136</span>&#160; </div>\n<div class=\"line\"><a name=\"l00137\"></a><span class=\"lineno\">  137</span>&#160;<span class=\"comment\">/* Some Windows GLU headers need this.</span></div>\n<div class=\"line\"><a name=\"l00138\"></a><span class=\"lineno\">  138</span>&#160;<span class=\"comment\"> */</span></div>\n<div class=\"line\"><a name=\"l00139\"></a><span class=\"lineno\">  139</span>&#160;<span class=\"preprocessor\">#if !defined(CALLBACK) &amp;&amp; defined(_WIN32)</span></div>\n<div class=\"line\"><a name=\"l00140\"></a><span class=\"lineno\">  140</span>&#160;<span class=\"preprocessor\"> #define CALLBACK __stdcall</span></div>\n<div class=\"line\"><a name=\"l00141\"></a><span class=\"lineno\">  141</span>&#160;<span class=\"preprocessor\"> #define GLFW_CALLBACK_DEFINED</span></div>\n<div class=\"line\"><a name=\"l00142\"></a><span class=\"lineno\">  142</span>&#160;<span class=\"preprocessor\">#endif </span><span class=\"comment\">/* CALLBACK */</span><span class=\"preprocessor\"></span></div>\n<div class=\"line\"><a name=\"l00143\"></a><span class=\"lineno\">  143</span>&#160; </div>\n<div class=\"line\"><a name=\"l00144\"></a><span class=\"lineno\">  144</span>&#160;<span class=\"comment\">/* Include the chosen OpenGL or OpenGL ES headers.</span></div>\n<div class=\"line\"><a name=\"l00145\"></a><span class=\"lineno\">  145</span>&#160;<span class=\"comment\"> */</span></div>\n<div class=\"line\"><a name=\"l00146\"></a><span class=\"lineno\">  146</span>&#160;<span class=\"preprocessor\">#if defined(GLFW_INCLUDE_ES1)</span></div>\n<div class=\"line\"><a name=\"l00147\"></a><span class=\"lineno\">  147</span>&#160; </div>\n<div class=\"line\"><a name=\"l00148\"></a><span class=\"lineno\">  148</span>&#160;<span class=\"preprocessor\"> #include &lt;GLES/gl.h&gt;</span></div>\n<div class=\"line\"><a name=\"l00149\"></a><span class=\"lineno\">  149</span>&#160;<span class=\"preprocessor\"> #if defined(GLFW_INCLUDE_GLEXT)</span></div>\n<div class=\"line\"><a name=\"l00150\"></a><span class=\"lineno\">  150</span>&#160;<span class=\"preprocessor\">  #include &lt;GLES/glext.h&gt;</span></div>\n<div class=\"line\"><a name=\"l00151\"></a><span class=\"lineno\">  151</span>&#160;<span class=\"preprocessor\"> #endif</span></div>\n<div class=\"line\"><a name=\"l00152\"></a><span class=\"lineno\">  152</span>&#160; </div>\n<div class=\"line\"><a name=\"l00153\"></a><span class=\"lineno\">  153</span>&#160;<span class=\"preprocessor\">#elif defined(GLFW_INCLUDE_ES2)</span></div>\n<div class=\"line\"><a name=\"l00154\"></a><span class=\"lineno\">  154</span>&#160; </div>\n<div class=\"line\"><a name=\"l00155\"></a><span class=\"lineno\">  155</span>&#160;<span class=\"preprocessor\"> #include &lt;GLES2/gl2.h&gt;</span></div>\n<div class=\"line\"><a name=\"l00156\"></a><span class=\"lineno\">  156</span>&#160;<span class=\"preprocessor\"> #if defined(GLFW_INCLUDE_GLEXT)</span></div>\n<div class=\"line\"><a name=\"l00157\"></a><span class=\"lineno\">  157</span>&#160;<span class=\"preprocessor\">  #include &lt;GLES2/gl2ext.h&gt;</span></div>\n<div class=\"line\"><a name=\"l00158\"></a><span class=\"lineno\">  158</span>&#160;<span class=\"preprocessor\"> #endif</span></div>\n<div class=\"line\"><a name=\"l00159\"></a><span class=\"lineno\">  159</span>&#160; </div>\n<div class=\"line\"><a name=\"l00160\"></a><span class=\"lineno\">  160</span>&#160;<span class=\"preprocessor\">#elif defined(GLFW_INCLUDE_ES3)</span></div>\n<div class=\"line\"><a name=\"l00161\"></a><span class=\"lineno\">  161</span>&#160; </div>\n<div class=\"line\"><a name=\"l00162\"></a><span class=\"lineno\">  162</span>&#160;<span class=\"preprocessor\"> #include &lt;GLES3/gl3.h&gt;</span></div>\n<div class=\"line\"><a name=\"l00163\"></a><span class=\"lineno\">  163</span>&#160;<span class=\"preprocessor\"> #if defined(GLFW_INCLUDE_GLEXT)</span></div>\n<div class=\"line\"><a name=\"l00164\"></a><span class=\"lineno\">  164</span>&#160;<span class=\"preprocessor\">  #include &lt;GLES2/gl2ext.h&gt;</span></div>\n<div class=\"line\"><a name=\"l00165\"></a><span class=\"lineno\">  165</span>&#160;<span class=\"preprocessor\"> #endif</span></div>\n<div class=\"line\"><a name=\"l00166\"></a><span class=\"lineno\">  166</span>&#160; </div>\n<div class=\"line\"><a name=\"l00167\"></a><span class=\"lineno\">  167</span>&#160;<span class=\"preprocessor\">#elif defined(GLFW_INCLUDE_ES31)</span></div>\n<div class=\"line\"><a name=\"l00168\"></a><span class=\"lineno\">  168</span>&#160; </div>\n<div class=\"line\"><a name=\"l00169\"></a><span class=\"lineno\">  169</span>&#160;<span class=\"preprocessor\"> #include &lt;GLES3/gl31.h&gt;</span></div>\n<div class=\"line\"><a name=\"l00170\"></a><span class=\"lineno\">  170</span>&#160;<span class=\"preprocessor\"> #if defined(GLFW_INCLUDE_GLEXT)</span></div>\n<div class=\"line\"><a name=\"l00171\"></a><span class=\"lineno\">  171</span>&#160;<span class=\"preprocessor\">  #include &lt;GLES2/gl2ext.h&gt;</span></div>\n<div class=\"line\"><a name=\"l00172\"></a><span class=\"lineno\">  172</span>&#160;<span class=\"preprocessor\"> #endif</span></div>\n<div class=\"line\"><a name=\"l00173\"></a><span class=\"lineno\">  173</span>&#160; </div>\n<div class=\"line\"><a name=\"l00174\"></a><span class=\"lineno\">  174</span>&#160;<span class=\"preprocessor\">#elif defined(GLFW_INCLUDE_ES32)</span></div>\n<div class=\"line\"><a name=\"l00175\"></a><span class=\"lineno\">  175</span>&#160; </div>\n<div class=\"line\"><a name=\"l00176\"></a><span class=\"lineno\">  176</span>&#160;<span class=\"preprocessor\"> #include &lt;GLES3/gl32.h&gt;</span></div>\n<div class=\"line\"><a name=\"l00177\"></a><span class=\"lineno\">  177</span>&#160;<span class=\"preprocessor\"> #if defined(GLFW_INCLUDE_GLEXT)</span></div>\n<div class=\"line\"><a name=\"l00178\"></a><span class=\"lineno\">  178</span>&#160;<span class=\"preprocessor\">  #include &lt;GLES2/gl2ext.h&gt;</span></div>\n<div class=\"line\"><a name=\"l00179\"></a><span class=\"lineno\">  179</span>&#160;<span class=\"preprocessor\"> #endif</span></div>\n<div class=\"line\"><a name=\"l00180\"></a><span class=\"lineno\">  180</span>&#160; </div>\n<div class=\"line\"><a name=\"l00181\"></a><span class=\"lineno\">  181</span>&#160;<span class=\"preprocessor\">#elif defined(GLFW_INCLUDE_GLCOREARB)</span></div>\n<div class=\"line\"><a name=\"l00182\"></a><span class=\"lineno\">  182</span>&#160; </div>\n<div class=\"line\"><a name=\"l00183\"></a><span class=\"lineno\">  183</span>&#160;<span class=\"preprocessor\"> #if defined(__APPLE__)</span></div>\n<div class=\"line\"><a name=\"l00184\"></a><span class=\"lineno\">  184</span>&#160; </div>\n<div class=\"line\"><a name=\"l00185\"></a><span class=\"lineno\">  185</span>&#160;<span class=\"preprocessor\">  #include &lt;OpenGL/gl3.h&gt;</span></div>\n<div class=\"line\"><a name=\"l00186\"></a><span class=\"lineno\">  186</span>&#160;<span class=\"preprocessor\">  #if defined(GLFW_INCLUDE_GLEXT)</span></div>\n<div class=\"line\"><a name=\"l00187\"></a><span class=\"lineno\">  187</span>&#160;<span class=\"preprocessor\">   #include &lt;OpenGL/gl3ext.h&gt;</span></div>\n<div class=\"line\"><a name=\"l00188\"></a><span class=\"lineno\">  188</span>&#160;<span class=\"preprocessor\">  #endif </span><span class=\"comment\">/*GLFW_INCLUDE_GLEXT*/</span><span class=\"preprocessor\"></span></div>\n<div class=\"line\"><a name=\"l00189\"></a><span class=\"lineno\">  189</span>&#160; </div>\n<div class=\"line\"><a name=\"l00190\"></a><span class=\"lineno\">  190</span>&#160;<span class=\"preprocessor\"> #else </span><span class=\"comment\">/*__APPLE__*/</span><span class=\"preprocessor\"></span></div>\n<div class=\"line\"><a name=\"l00191\"></a><span class=\"lineno\">  191</span>&#160; </div>\n<div class=\"line\"><a name=\"l00192\"></a><span class=\"lineno\">  192</span>&#160;<span class=\"preprocessor\">  #include &lt;GL/glcorearb.h&gt;</span></div>\n<div class=\"line\"><a name=\"l00193\"></a><span class=\"lineno\">  193</span>&#160; </div>\n<div class=\"line\"><a name=\"l00194\"></a><span class=\"lineno\">  194</span>&#160;<span class=\"preprocessor\"> #endif </span><span class=\"comment\">/*__APPLE__*/</span><span class=\"preprocessor\"></span></div>\n<div class=\"line\"><a name=\"l00195\"></a><span class=\"lineno\">  195</span>&#160; </div>\n<div class=\"line\"><a name=\"l00196\"></a><span class=\"lineno\">  196</span>&#160;<span class=\"preprocessor\">#elif !defined(GLFW_INCLUDE_NONE)</span></div>\n<div class=\"line\"><a name=\"l00197\"></a><span class=\"lineno\">  197</span>&#160; </div>\n<div class=\"line\"><a name=\"l00198\"></a><span class=\"lineno\">  198</span>&#160;<span class=\"preprocessor\"> #if defined(__APPLE__)</span></div>\n<div class=\"line\"><a name=\"l00199\"></a><span class=\"lineno\">  199</span>&#160; </div>\n<div class=\"line\"><a name=\"l00200\"></a><span class=\"lineno\">  200</span>&#160;<span class=\"preprocessor\">  #if !defined(GLFW_INCLUDE_GLEXT)</span></div>\n<div class=\"line\"><a name=\"l00201\"></a><span class=\"lineno\">  201</span>&#160;<span class=\"preprocessor\">   #define GL_GLEXT_LEGACY</span></div>\n<div class=\"line\"><a name=\"l00202\"></a><span class=\"lineno\">  202</span>&#160;<span class=\"preprocessor\">  #endif</span></div>\n<div class=\"line\"><a name=\"l00203\"></a><span class=\"lineno\">  203</span>&#160;<span class=\"preprocessor\">  #include &lt;OpenGL/gl.h&gt;</span></div>\n<div class=\"line\"><a name=\"l00204\"></a><span class=\"lineno\">  204</span>&#160;<span class=\"preprocessor\">  #if defined(GLFW_INCLUDE_GLU)</span></div>\n<div class=\"line\"><a name=\"l00205\"></a><span class=\"lineno\">  205</span>&#160;<span class=\"preprocessor\">   #include &lt;OpenGL/glu.h&gt;</span></div>\n<div class=\"line\"><a name=\"l00206\"></a><span class=\"lineno\">  206</span>&#160;<span class=\"preprocessor\">  #endif</span></div>\n<div class=\"line\"><a name=\"l00207\"></a><span class=\"lineno\">  207</span>&#160; </div>\n<div class=\"line\"><a name=\"l00208\"></a><span class=\"lineno\">  208</span>&#160;<span class=\"preprocessor\"> #else </span><span class=\"comment\">/*__APPLE__*/</span><span class=\"preprocessor\"></span></div>\n<div class=\"line\"><a name=\"l00209\"></a><span class=\"lineno\">  209</span>&#160; </div>\n<div class=\"line\"><a name=\"l00210\"></a><span class=\"lineno\">  210</span>&#160;<span class=\"preprocessor\">  #include &lt;GL/gl.h&gt;</span></div>\n<div class=\"line\"><a name=\"l00211\"></a><span class=\"lineno\">  211</span>&#160;<span class=\"preprocessor\">  #if defined(GLFW_INCLUDE_GLEXT)</span></div>\n<div class=\"line\"><a name=\"l00212\"></a><span class=\"lineno\">  212</span>&#160;<span class=\"preprocessor\">   #include &lt;GL/glext.h&gt;</span></div>\n<div class=\"line\"><a name=\"l00213\"></a><span class=\"lineno\">  213</span>&#160;<span class=\"preprocessor\">  #endif</span></div>\n<div class=\"line\"><a name=\"l00214\"></a><span class=\"lineno\">  214</span>&#160;<span class=\"preprocessor\">  #if defined(GLFW_INCLUDE_GLU)</span></div>\n<div class=\"line\"><a name=\"l00215\"></a><span class=\"lineno\">  215</span>&#160;<span class=\"preprocessor\">   #include &lt;GL/glu.h&gt;</span></div>\n<div class=\"line\"><a name=\"l00216\"></a><span class=\"lineno\">  216</span>&#160;<span class=\"preprocessor\">  #endif</span></div>\n<div class=\"line\"><a name=\"l00217\"></a><span class=\"lineno\">  217</span>&#160; </div>\n<div class=\"line\"><a name=\"l00218\"></a><span class=\"lineno\">  218</span>&#160;<span class=\"preprocessor\"> #endif </span><span class=\"comment\">/*__APPLE__*/</span><span class=\"preprocessor\"></span></div>\n<div class=\"line\"><a name=\"l00219\"></a><span class=\"lineno\">  219</span>&#160; </div>\n<div class=\"line\"><a name=\"l00220\"></a><span class=\"lineno\">  220</span>&#160;<span class=\"preprocessor\">#endif </span><span class=\"comment\">/* OpenGL and OpenGL ES headers */</span><span class=\"preprocessor\"></span></div>\n<div class=\"line\"><a name=\"l00221\"></a><span class=\"lineno\">  221</span>&#160; </div>\n<div class=\"line\"><a name=\"l00222\"></a><span class=\"lineno\">  222</span>&#160;<span class=\"preprocessor\">#if defined(GLFW_DLL) &amp;&amp; defined(_GLFW_BUILD_DLL)</span></div>\n<div class=\"line\"><a name=\"l00223\"></a><span class=\"lineno\">  223</span>&#160; <span class=\"comment\">/* GLFW_DLL must be defined by applications that are linking against the DLL</span></div>\n<div class=\"line\"><a name=\"l00224\"></a><span class=\"lineno\">  224</span>&#160;<span class=\"comment\">  * version of the GLFW library.  _GLFW_BUILD_DLL is defined by the GLFW</span></div>\n<div class=\"line\"><a name=\"l00225\"></a><span class=\"lineno\">  225</span>&#160;<span class=\"comment\">  * configuration header when compiling the DLL version of the library.</span></div>\n<div class=\"line\"><a name=\"l00226\"></a><span class=\"lineno\">  226</span>&#160;<span class=\"comment\">  */</span></div>\n<div class=\"line\"><a name=\"l00227\"></a><span class=\"lineno\">  227</span>&#160;<span class=\"preprocessor\"> #error &quot;You must not have both GLFW_DLL and _GLFW_BUILD_DLL defined&quot;</span></div>\n<div class=\"line\"><a name=\"l00228\"></a><span class=\"lineno\">  228</span>&#160;<span class=\"preprocessor\">#endif</span></div>\n<div class=\"line\"><a name=\"l00229\"></a><span class=\"lineno\">  229</span>&#160; </div>\n<div class=\"line\"><a name=\"l00230\"></a><span class=\"lineno\">  230</span>&#160;<span class=\"comment\">/* GLFWAPI is used to declare public API functions for export</span></div>\n<div class=\"line\"><a name=\"l00231\"></a><span class=\"lineno\">  231</span>&#160;<span class=\"comment\"> * from the DLL / shared library / dynamic library.</span></div>\n<div class=\"line\"><a name=\"l00232\"></a><span class=\"lineno\">  232</span>&#160;<span class=\"comment\"> */</span></div>\n<div class=\"line\"><a name=\"l00233\"></a><span class=\"lineno\">  233</span>&#160;<span class=\"preprocessor\">#if defined(_WIN32) &amp;&amp; defined(_GLFW_BUILD_DLL)</span></div>\n<div class=\"line\"><a name=\"l00234\"></a><span class=\"lineno\">  234</span>&#160; <span class=\"comment\">/* We are building GLFW as a Win32 DLL */</span></div>\n<div class=\"line\"><a name=\"l00235\"></a><span class=\"lineno\">  235</span>&#160;<span class=\"preprocessor\"> #define GLFWAPI __declspec(dllexport)</span></div>\n<div class=\"line\"><a name=\"l00236\"></a><span class=\"lineno\">  236</span>&#160;<span class=\"preprocessor\">#elif defined(_WIN32) &amp;&amp; defined(GLFW_DLL)</span></div>\n<div class=\"line\"><a name=\"l00237\"></a><span class=\"lineno\">  237</span>&#160; <span class=\"comment\">/* We are calling GLFW as a Win32 DLL */</span></div>\n<div class=\"line\"><a name=\"l00238\"></a><span class=\"lineno\">  238</span>&#160;<span class=\"preprocessor\"> #define GLFWAPI __declspec(dllimport)</span></div>\n<div class=\"line\"><a name=\"l00239\"></a><span class=\"lineno\">  239</span>&#160;<span class=\"preprocessor\">#elif defined(__GNUC__) &amp;&amp; defined(_GLFW_BUILD_DLL)</span></div>\n<div class=\"line\"><a name=\"l00240\"></a><span class=\"lineno\">  240</span>&#160; <span class=\"comment\">/* We are building GLFW as a shared / dynamic library */</span></div>\n<div class=\"line\"><a name=\"l00241\"></a><span class=\"lineno\">  241</span>&#160;<span class=\"preprocessor\"> #define GLFWAPI __attribute__((visibility(&quot;default&quot;)))</span></div>\n<div class=\"line\"><a name=\"l00242\"></a><span class=\"lineno\">  242</span>&#160;<span class=\"preprocessor\">#else</span></div>\n<div class=\"line\"><a name=\"l00243\"></a><span class=\"lineno\">  243</span>&#160; <span class=\"comment\">/* We are building or calling GLFW as a static library */</span></div>\n<div class=\"line\"><a name=\"l00244\"></a><span class=\"lineno\">  244</span>&#160;<span class=\"preprocessor\"> #define GLFWAPI</span></div>\n<div class=\"line\"><a name=\"l00245\"></a><span class=\"lineno\">  245</span>&#160;<span class=\"preprocessor\">#endif</span></div>\n<div class=\"line\"><a name=\"l00246\"></a><span class=\"lineno\">  246</span>&#160; </div>\n<div class=\"line\"><a name=\"l00247\"></a><span class=\"lineno\">  247</span>&#160; </div>\n<div class=\"line\"><a name=\"l00248\"></a><span class=\"lineno\">  248</span>&#160;<span class=\"comment\">/*************************************************************************</span></div>\n<div class=\"line\"><a name=\"l00249\"></a><span class=\"lineno\">  249</span>&#160;<span class=\"comment\"> * GLFW API tokens</span></div>\n<div class=\"line\"><a name=\"l00250\"></a><span class=\"lineno\">  250</span>&#160;<span class=\"comment\"> *************************************************************************/</span></div>\n<div class=\"line\"><a name=\"l00251\"></a><span class=\"lineno\">  251</span>&#160; </div>\n<div class=\"line\"><a name=\"l00259\"></a><span class=\"lineno\">  259</span>&#160;<span class=\"preprocessor\">#define GLFW_VERSION_MAJOR          3</span></div>\n<div class=\"line\"><a name=\"l00260\"></a><span class=\"lineno\">  260</span>&#160; </div>\n<div class=\"line\"><a name=\"l00266\"></a><span class=\"lineno\">  266</span>&#160;<span class=\"preprocessor\">#define GLFW_VERSION_MINOR          3</span></div>\n<div class=\"line\"><a name=\"l00267\"></a><span class=\"lineno\">  267</span>&#160; </div>\n<div class=\"line\"><a name=\"l00273\"></a><span class=\"lineno\">  273</span>&#160;<span class=\"preprocessor\">#define GLFW_VERSION_REVISION       2</span></div>\n<div class=\"line\"><a name=\"l00274\"></a><span class=\"lineno\">  274</span>&#160; </div>\n<div class=\"line\"><a name=\"l00284\"></a><span class=\"lineno\">  284</span>&#160;<span class=\"preprocessor\">#define GLFW_TRUE                   1</span></div>\n<div class=\"line\"><a name=\"l00285\"></a><span class=\"lineno\">  285</span>&#160; </div>\n<div class=\"line\"><a name=\"l00293\"></a><span class=\"lineno\">  293</span>&#160;<span class=\"preprocessor\">#define GLFW_FALSE                  0</span></div>\n<div class=\"line\"><a name=\"l00294\"></a><span class=\"lineno\">  294</span>&#160; </div>\n<div class=\"line\"><a name=\"l00303\"></a><span class=\"lineno\">  303</span>&#160;<span class=\"preprocessor\">#define GLFW_RELEASE                0</span></div>\n<div class=\"line\"><a name=\"l00304\"></a><span class=\"lineno\">  304</span>&#160; </div>\n<div class=\"line\"><a name=\"l00310\"></a><span class=\"lineno\">  310</span>&#160;<span class=\"preprocessor\">#define GLFW_PRESS                  1</span></div>\n<div class=\"line\"><a name=\"l00311\"></a><span class=\"lineno\">  311</span>&#160; </div>\n<div class=\"line\"><a name=\"l00317\"></a><span class=\"lineno\">  317</span>&#160;<span class=\"preprocessor\">#define GLFW_REPEAT                 2</span></div>\n<div class=\"line\"><a name=\"l00318\"></a><span class=\"lineno\">  318</span>&#160; </div>\n<div class=\"line\"><a name=\"l00327\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__hat__state.html#gac775f4b3154fdf5db93eb432ba546dff\">  327</a></span>&#160;<span class=\"preprocessor\">#define GLFW_HAT_CENTERED           0</span></div>\n<div class=\"line\"><a name=\"l00328\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__hat__state.html#ga94aea0ae241a8b902883536c592ee693\">  328</a></span>&#160;<span class=\"preprocessor\">#define GLFW_HAT_UP                 1</span></div>\n<div class=\"line\"><a name=\"l00329\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__hat__state.html#gad7f0e4f52fd68d734863aaeadab3a3f5\">  329</a></span>&#160;<span class=\"preprocessor\">#define GLFW_HAT_RIGHT              2</span></div>\n<div class=\"line\"><a name=\"l00330\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__hat__state.html#ga638f0e20dc5de90de21a33564e8ce129\">  330</a></span>&#160;<span class=\"preprocessor\">#define GLFW_HAT_DOWN               4</span></div>\n<div class=\"line\"><a name=\"l00331\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__hat__state.html#ga76c02baf1ea345fcbe3e8ff176a73e19\">  331</a></span>&#160;<span class=\"preprocessor\">#define GLFW_HAT_LEFT               8</span></div>\n<div class=\"line\"><a name=\"l00332\"></a><span class=\"lineno\">  332</span>&#160;<span class=\"preprocessor\">#define GLFW_HAT_RIGHT_UP           (GLFW_HAT_RIGHT | GLFW_HAT_UP)</span></div>\n<div class=\"line\"><a name=\"l00333\"></a><span class=\"lineno\">  333</span>&#160;<span class=\"preprocessor\">#define GLFW_HAT_RIGHT_DOWN         (GLFW_HAT_RIGHT | GLFW_HAT_DOWN)</span></div>\n<div class=\"line\"><a name=\"l00334\"></a><span class=\"lineno\">  334</span>&#160;<span class=\"preprocessor\">#define GLFW_HAT_LEFT_UP            (GLFW_HAT_LEFT  | GLFW_HAT_UP)</span></div>\n<div class=\"line\"><a name=\"l00335\"></a><span class=\"lineno\">  335</span>&#160;<span class=\"preprocessor\">#define GLFW_HAT_LEFT_DOWN          (GLFW_HAT_LEFT  | GLFW_HAT_DOWN)</span></div>\n<div class=\"line\"><a name=\"l00336\"></a><span class=\"lineno\">  336</span>&#160; </div>\n<div class=\"line\"><a name=\"l00362\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#gaddb2c23772b97fd7e26e8ee66f1ad014\">  362</a></span>&#160;<span class=\"comment\">/* The unknown key */</span></div>\n<div class=\"line\"><a name=\"l00363\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#ga6059b0b048ba6980b6107fffbd3b4b24\">  363</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_UNKNOWN            -1</span></div>\n<div class=\"line\"><a name=\"l00364\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#gab3d5d72e59d3055f494627b0a524926c\">  364</a></span>&#160; </div>\n<div class=\"line\"><a name=\"l00365\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#gac556b360f7f6fca4b70ba0aecf313fd4\">  365</a></span>&#160;<span class=\"comment\">/* Printable keys */</span></div>\n<div class=\"line\"><a name=\"l00366\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#ga37e296b650eab419fc474ff69033d927\">  366</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_SPACE              32</span></div>\n<div class=\"line\"><a name=\"l00367\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#gadf3d753b2d479148d711de34b83fd0db\">  367</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_APOSTROPHE         39  </span><span class=\"comment\">/* &#39; */</span><span class=\"preprocessor\"></span></div>\n<div class=\"line\"><a name=\"l00368\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#ga50391730e9d7112ad4fd42d0bd1597c1\">  368</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_COMMA              44  </span><span class=\"comment\">/* , */</span><span class=\"preprocessor\"></span></div>\n<div class=\"line\"><a name=\"l00369\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#ga05e4cae9ddb8d40cf6d82c8f11f2502f\">  369</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_MINUS              45  </span><span class=\"comment\">/* - */</span><span class=\"preprocessor\"></span></div>\n<div class=\"line\"><a name=\"l00370\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#gadc8e66b3a4c4b5c39ad1305cf852863c\">  370</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_PERIOD             46  </span><span class=\"comment\">/* . */</span><span class=\"preprocessor\"></span></div>\n<div class=\"line\"><a name=\"l00371\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#ga812f0273fe1a981e1fa002ae73e92271\">  371</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_SLASH              47  </span><span class=\"comment\">/* / */</span><span class=\"preprocessor\"></span></div>\n<div class=\"line\"><a name=\"l00372\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#ga9e14b6975a9cc8f66cdd5cb3d3861356\">  372</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_0                  48</span></div>\n<div class=\"line\"><a name=\"l00373\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#ga4d74ddaa5d4c609993b4d4a15736c924\">  373</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_1                  49</span></div>\n<div class=\"line\"><a name=\"l00374\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#ga9ea4ab80c313a227b14d0a7c6f810b5d\">  374</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_2                  50</span></div>\n<div class=\"line\"><a name=\"l00375\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#gab79b1cfae7bd630cfc4604c1f263c666\">  375</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_3                  51</span></div>\n<div class=\"line\"><a name=\"l00376\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#gadeaa109a0f9f5afc94fe4a108e686f6f\">  376</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_4                  52</span></div>\n<div class=\"line\"><a name=\"l00377\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#ga2924cb5349ebbf97c8987f3521c44f39\">  377</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_5                  53</span></div>\n<div class=\"line\"><a name=\"l00378\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#ga84233de9ee5bb3e8788a5aa07d80af7d\">  378</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_6                  54</span></div>\n<div class=\"line\"><a name=\"l00379\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#gae1a2de47240d6664423c204bdd91bd17\">  379</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_7                  55</span></div>\n<div class=\"line\"><a name=\"l00380\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#ga03e842608e1ea323370889d33b8f70ff\">  380</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_8                  56</span></div>\n<div class=\"line\"><a name=\"l00381\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#ga8e3fb647ff3aca9e8dbf14fe66332941\">  381</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_9                  57</span></div>\n<div class=\"line\"><a name=\"l00382\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#ga00ccf3475d9ee2e679480d540d554669\">  382</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_SEMICOLON          59  </span><span class=\"comment\">/* ; */</span><span class=\"preprocessor\"></span></div>\n<div class=\"line\"><a name=\"l00383\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#ga011f7cdc9a654da984a2506479606933\">  383</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_EQUAL              61  </span><span class=\"comment\">/* = */</span><span class=\"preprocessor\"></span></div>\n<div class=\"line\"><a name=\"l00384\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#gabf48fcc3afbe69349df432b470c96ef2\">  384</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_A                  65</span></div>\n<div class=\"line\"><a name=\"l00385\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#ga5df402e02aca08444240058fd9b42a55\">  385</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_B                  66</span></div>\n<div class=\"line\"><a name=\"l00386\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#gae74ecddf7cc96104ab23989b1cdab536\">  386</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_C                  67</span></div>\n<div class=\"line\"><a name=\"l00387\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#gad4cc98fc8f35f015d9e2fb94bf136076\">  387</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_D                  68</span></div>\n<div class=\"line\"><a name=\"l00388\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#ga274655c8bfe39742684ca393cf8ed093\">  388</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_E                  69</span></div>\n<div class=\"line\"><a name=\"l00389\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#ga65ff2aedb129a3149ad9cb3e4159a75f\">  389</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_F                  70</span></div>\n<div class=\"line\"><a name=\"l00390\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#ga4ae8debadf6d2a691badae0b53ea3ba0\">  390</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_G                  71</span></div>\n<div class=\"line\"><a name=\"l00391\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#gaaa8b54a13f6b1eed85ac86f82d550db2\">  391</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_H                  72</span></div>\n<div class=\"line\"><a name=\"l00392\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#ga4d7f0260c82e4ea3d6ebc7a21d6e3716\">  392</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_I                  73</span></div>\n<div class=\"line\"><a name=\"l00393\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#gae00856dfeb5d13aafebf59d44de5cdda\">  393</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_J                  74</span></div>\n<div class=\"line\"><a name=\"l00394\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#gaecbbb79130df419d58dd7f09a169efe9\">  394</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_K                  75</span></div>\n<div class=\"line\"><a name=\"l00395\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#ga8fc15819c1094fb2afa01d84546b33e1\">  395</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_L                  76</span></div>\n<div class=\"line\"><a name=\"l00396\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#gafdd01e38b120d67cf51e348bb47f3964\">  396</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_M                  77</span></div>\n<div class=\"line\"><a name=\"l00397\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#ga4ce6c70a0c98c50b3fe4ab9a728d4d36\">  397</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_N                  78</span></div>\n<div class=\"line\"><a name=\"l00398\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#ga1570e2ccaab036ea82bed66fc1dab2a9\">  398</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_O                  79</span></div>\n<div class=\"line\"><a name=\"l00399\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#ga90e0560422ec7a30e7f3f375bc9f37f9\">  399</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_P                  80</span></div>\n<div class=\"line\"><a name=\"l00400\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#gacad52f3bf7d378fc0ffa72a76769256d\">  400</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_Q                  81</span></div>\n<div class=\"line\"><a name=\"l00401\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#ga22c7763899ecf7788862e5f90eacce6b\">  401</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_R                  82</span></div>\n<div class=\"line\"><a name=\"l00402\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#gaa06a712e6202661fc03da5bdb7b6e545\">  402</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_S                  83</span></div>\n<div class=\"line\"><a name=\"l00403\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#gac1c42c0bf4192cea713c55598b06b744\">  403</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_T                  84</span></div>\n<div class=\"line\"><a name=\"l00404\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#gafd9f115a549effdf8e372a787c360313\">  404</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_U                  85</span></div>\n<div class=\"line\"><a name=\"l00405\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#gac489e208c26afda8d4938ed88718760a\">  405</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_V                  86</span></div>\n<div class=\"line\"><a name=\"l00406\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#gad1c8d9adac53925276ecb1d592511d8a\">  406</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_W                  87</span></div>\n<div class=\"line\"><a name=\"l00407\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#gab8155ea99d1ab27ff56f24f8dc73f8d1\">  407</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_X                  88</span></div>\n<div class=\"line\"><a name=\"l00408\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#ga86ef225fd6a66404caae71044cdd58d8\">  408</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_Y                  89</span></div>\n<div class=\"line\"><a name=\"l00409\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#ga7a3701fb4e2a0b136ff4b568c3c8d668\">  409</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_Z                  90</span></div>\n<div class=\"line\"><a name=\"l00410\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#gadc78dad3dab76bcd4b5c20114052577a\">  410</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_LEFT_BRACKET       91  </span><span class=\"comment\">/* [ */</span><span class=\"preprocessor\"></span></div>\n<div class=\"line\"><a name=\"l00411\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#ga20494bfebf0bb4fc9503afca18ab2c5e\">  411</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_BACKSLASH          92  </span><span class=\"comment\">/* \\ */</span><span class=\"preprocessor\"></span></div>\n<div class=\"line\"><a name=\"l00412\"></a><span class=\"lineno\">  412</span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_RIGHT_BRACKET      93  </span><span class=\"comment\">/* ] */</span><span class=\"preprocessor\"></span></div>\n<div class=\"line\"><a name=\"l00413\"></a><span class=\"lineno\">  413</span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_GRAVE_ACCENT       96  </span><span class=\"comment\">/* ` */</span><span class=\"preprocessor\"></span></div>\n<div class=\"line\"><a name=\"l00414\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#gaac6596c350b635c245113b81c2123b93\">  414</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_WORLD_1            161 </span><span class=\"comment\">/* non-US #1 */</span><span class=\"preprocessor\"></span></div>\n<div class=\"line\"><a name=\"l00415\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#ga9555a92ecbecdbc1f3435219c571d667\">  415</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_WORLD_2            162 </span><span class=\"comment\">/* non-US #2 */</span><span class=\"preprocessor\"></span></div>\n<div class=\"line\"><a name=\"l00416\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#ga6908a4bda9950a3e2b73f794bbe985df\">  416</a></span>&#160; </div>\n<div class=\"line\"><a name=\"l00417\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#ga6c0df1fe2f156bbd5a98c66d76ff3635\">  417</a></span>&#160;<span class=\"comment\">/* Function keys */</span></div>\n<div class=\"line\"><a name=\"l00418\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#ga373ac7365435d6b0eb1068f470e34f47\">  418</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_ESCAPE             256</span></div>\n<div class=\"line\"><a name=\"l00419\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#gadb111e4df74b8a715f2c05dad58d2682\">  419</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_ENTER              257</span></div>\n<div class=\"line\"><a name=\"l00420\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#ga06ba07662e8c291a4a84535379ffc7ac\">  420</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_TAB                258</span></div>\n<div class=\"line\"><a name=\"l00421\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#gae12a010d33c309a67ab9460c51eb2462\">  421</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_BACKSPACE          259</span></div>\n<div class=\"line\"><a name=\"l00422\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#gae2e3958c71595607416aa7bf082be2f9\">  422</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_INSERT             260</span></div>\n<div class=\"line\"><a name=\"l00423\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#ga2f3342b194020d3544c67e3506b6f144\">  423</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_DELETE             261</span></div>\n<div class=\"line\"><a name=\"l00424\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#ga3ab731f9622f0db280178a5f3cc6d586\">  424</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_RIGHT              262</span></div>\n<div class=\"line\"><a name=\"l00425\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#gaee0a8fa442001cc2147812f84b59041c\">  425</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_LEFT               263</span></div>\n<div class=\"line\"><a name=\"l00426\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#ga41452c7287195d481e43207318c126a7\">  426</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_DOWN               264</span></div>\n<div class=\"line\"><a name=\"l00427\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#ga86587ea1df19a65978d3e3b8439bedd9\">  427</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_UP                 265</span></div>\n<div class=\"line\"><a name=\"l00428\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#ga92c1d2c9d63485f3d70f94f688d48672\">  428</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_PAGE_UP            266</span></div>\n<div class=\"line\"><a name=\"l00429\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#gaf622b63b9537f7084c2ab649b8365630\">  429</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_PAGE_DOWN          267</span></div>\n<div class=\"line\"><a name=\"l00430\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#ga3946edc362aeff213b2be6304296cf43\">  430</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_HOME               268</span></div>\n<div class=\"line\"><a name=\"l00431\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#gaf964c2e65e97d0cf785a5636ee8df642\">  431</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_END                269</span></div>\n<div class=\"line\"><a name=\"l00432\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#ga8116b9692d87382afb5849b6d8907f18\">  432</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_CAPS_LOCK          280</span></div>\n<div class=\"line\"><a name=\"l00433\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#gafb8d66c573acf22e364049477dcbea30\">  433</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_SCROLL_LOCK        281</span></div>\n<div class=\"line\"><a name=\"l00434\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#ga0900750aff94889b940f5e428c07daee\">  434</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_NUM_LOCK           282</span></div>\n<div class=\"line\"><a name=\"l00435\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#gaed7cd729c0147a551bb8b7bb36c17015\">  435</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_PRINT_SCREEN       283</span></div>\n<div class=\"line\"><a name=\"l00436\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#ga9b61ebd0c63b44b7332fda2c9763eaa6\">  436</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_PAUSE              284</span></div>\n<div class=\"line\"><a name=\"l00437\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#gaf258dda9947daa428377938ed577c8c2\">  437</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_F1                 290</span></div>\n<div class=\"line\"><a name=\"l00438\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#ga6dc2d3f87b9d51ffbbbe2ef0299d8e1d\">  438</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_F2                 291</span></div>\n<div class=\"line\"><a name=\"l00439\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#gacca6ef8a2162c52a0ac1d881e8d9c38a\">  439</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_F3                 292</span></div>\n<div class=\"line\"><a name=\"l00440\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#gac9d39390336ae14e4a93e295de43c7e8\">  440</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_F4                 293</span></div>\n<div class=\"line\"><a name=\"l00441\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#gae40de0de1c9f21cd26c9afa3d7050851\">  441</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_F5                 294</span></div>\n<div class=\"line\"><a name=\"l00442\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#ga718d11d2f7d57471a2f6a894235995b1\">  442</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_F6                 295</span></div>\n<div class=\"line\"><a name=\"l00443\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#ga0bc04b11627e7d69339151e7306b2832\">  443</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_F7                 296</span></div>\n<div class=\"line\"><a name=\"l00444\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#gaf5908fa9b0a906ae03fc2c61ac7aa3e2\">  444</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_F8                 297</span></div>\n<div class=\"line\"><a name=\"l00445\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#gad637f4308655e1001bd6ad942bc0fd4b\">  445</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_F9                 298</span></div>\n<div class=\"line\"><a name=\"l00446\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#gaf14c66cff3396e5bd46e803c035e6c1f\">  446</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_F10                299</span></div>\n<div class=\"line\"><a name=\"l00447\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#ga7f70970db6e8be1794da8516a6d14058\">  447</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_F11                300</span></div>\n<div class=\"line\"><a name=\"l00448\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#gaa582dbb1d2ba2050aa1dca0838095b27\">  448</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_F12                301</span></div>\n<div class=\"line\"><a name=\"l00449\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#ga972ce5c365e2394b36104b0e3125c748\">  449</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_F13                302</span></div>\n<div class=\"line\"><a name=\"l00450\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#gaebf6391058d5566601e357edc5ea737c\">  450</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_F14                303</span></div>\n<div class=\"line\"><a name=\"l00451\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#gaec011d9ba044058cb54529da710e9791\">  451</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_F15                304</span></div>\n<div class=\"line\"><a name=\"l00452\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#ga82b9c721ada04cd5ca8de767da38022f\">  452</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_F16                305</span></div>\n<div class=\"line\"><a name=\"l00453\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#ga356afb14d3440ff2bb378f74f7ebc60f\">  453</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_F17                306</span></div>\n<div class=\"line\"><a name=\"l00454\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#ga90960bd2a155f2b09675324d3dff1565\">  454</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_F18                307</span></div>\n<div class=\"line\"><a name=\"l00455\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#ga43c21099aac10952d1be909a8ddee4d5\">  455</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_F19                308</span></div>\n<div class=\"line\"><a name=\"l00456\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#ga8150374677b5bed3043408732152dea2\">  456</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_F20                309</span></div>\n<div class=\"line\"><a name=\"l00457\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#gaa4bbd93ed73bb4c6ae7d83df880b7199\">  457</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_F21                310</span></div>\n<div class=\"line\"><a name=\"l00458\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#ga10515dafc55b71e7683f5b4fedd1c70d\">  458</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_F22                311</span></div>\n<div class=\"line\"><a name=\"l00459\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#gaf3a29a334402c5eaf0b3439edf5587c3\">  459</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_F23                312</span></div>\n<div class=\"line\"><a name=\"l00460\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#gaf82d5a802ab8213c72653d7480c16f13\">  460</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_F24                313</span></div>\n<div class=\"line\"><a name=\"l00461\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#ga7e25ff30d56cd512828c1d4ae8d54ef2\">  461</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_F25                314</span></div>\n<div class=\"line\"><a name=\"l00462\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#gada7ec86778b85e0b4de0beea72234aea\">  462</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_KP_0               320</span></div>\n<div class=\"line\"><a name=\"l00463\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#ga9a5be274434866c51738cafbb6d26b45\">  463</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_KP_1               321</span></div>\n<div class=\"line\"><a name=\"l00464\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#gafc141b0f8450519084c01092a3157faa\">  464</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_KP_2               322</span></div>\n<div class=\"line\"><a name=\"l00465\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#ga8882f411f05d04ec77a9563974bbfa53\">  465</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_KP_3               323</span></div>\n<div class=\"line\"><a name=\"l00466\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#gab2ea2e6a12f89d315045af520ac78cec\">  466</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_KP_4               324</span></div>\n<div class=\"line\"><a name=\"l00467\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#gafb21426b630ed4fcc084868699ba74c1\">  467</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_KP_5               325</span></div>\n<div class=\"line\"><a name=\"l00468\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#ga4e231d968796331a9ea0dbfb98d4005b\">  468</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_KP_6               326</span></div>\n<div class=\"line\"><a name=\"l00469\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#gabca1733780a273d549129ad0f250d1e5\">  469</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_KP_7               327</span></div>\n<div class=\"line\"><a name=\"l00470\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#ga9ada267eb0e78ed2ada8701dd24a56ef\">  470</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_KP_8               328</span></div>\n<div class=\"line\"><a name=\"l00471\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#gaa3dbd60782ff93d6082a124bce1fa236\">  471</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_KP_9               329</span></div>\n<div class=\"line\"><a name=\"l00472\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#gad09c7c98acc79e89aa6a0a91275becac\">  472</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_KP_DECIMAL         330</span></div>\n<div class=\"line\"><a name=\"l00473\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#ga4f728f8738f2986bd63eedd3d412e8cf\">  473</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_KP_DIVIDE          331</span></div>\n<div class=\"line\"><a name=\"l00474\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#gaebdc76d4a808191e6d21b7e4ad2acd97\">  474</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_KP_MULTIPLY        332</span></div>\n<div class=\"line\"><a name=\"l00475\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#ga8a530a28a65c44ab5d00b759b756d3f6\">  475</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_KP_SUBTRACT        333</span></div>\n<div class=\"line\"><a name=\"l00476\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#ga9f97b743e81460ac4b2deddecd10a464\">  476</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_KP_ADD             334</span></div>\n<div class=\"line\"><a name=\"l00477\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#ga7f27dabf63a7789daa31e1c96790219b\">  477</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_KP_ENTER           335</span></div>\n<div class=\"line\"><a name=\"l00478\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#gafb1207c91997fc295afd1835fbc5641a\">  478</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_KP_EQUAL           336</span></div>\n<div class=\"line\"><a name=\"l00479\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#gaffca36b99c9dce1a19cb9befbadce691\">  479</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_LEFT_SHIFT         340</span></div>\n<div class=\"line\"><a name=\"l00480\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#gad1ca2094b2694e7251d0ab1fd34f8519\">  480</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_LEFT_CONTROL       341</span></div>\n<div class=\"line\"><a name=\"l00481\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#ga687b38009131cfdd07a8d05fff8fa446\">  481</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_LEFT_ALT           342</span></div>\n<div class=\"line\"><a name=\"l00482\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#gad4547a3e8e247594acb60423fe6502db\">  482</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_LEFT_SUPER         343</span></div>\n<div class=\"line\"><a name=\"l00483\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#ga9845be48a745fc232045c9ec174d8820\">  483</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_RIGHT_SHIFT        344</span></div>\n<div class=\"line\"><a name=\"l00484\"></a><span class=\"lineno\">  484</span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_RIGHT_CONTROL      345</span></div>\n<div class=\"line\"><a name=\"l00485\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__keys.html#ga442cbaef7bfb9a4ba13594dd7fbf2789\">  485</a></span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_RIGHT_ALT          346</span></div>\n<div class=\"line\"><a name=\"l00486\"></a><span class=\"lineno\">  486</span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_RIGHT_SUPER        347</span></div>\n<div class=\"line\"><a name=\"l00487\"></a><span class=\"lineno\">  487</span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_MENU               348</span></div>\n<div class=\"line\"><a name=\"l00488\"></a><span class=\"lineno\">  488</span>&#160; </div>\n<div class=\"line\"><a name=\"l00489\"></a><span class=\"lineno\">  489</span>&#160;<span class=\"preprocessor\">#define GLFW_KEY_LAST               GLFW_KEY_MENU</span></div>\n<div class=\"line\"><a name=\"l00490\"></a><span class=\"lineno\">  490</span>&#160; </div>\n<div class=\"line\"><a name=\"l00505\"></a><span class=\"lineno\">  505</span>&#160;<span class=\"preprocessor\">#define GLFW_MOD_SHIFT           0x0001</span></div>\n<div class=\"line\"><a name=\"l00506\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__mods.html#ga6ed94871c3208eefd85713fa929d45aa\">  506</a></span>&#160; </div>\n<div class=\"line\"><a name=\"l00510\"></a><span class=\"lineno\">  510</span>&#160;<span class=\"preprocessor\">#define GLFW_MOD_CONTROL         0x0002</span></div>\n<div class=\"line\"><a name=\"l00511\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__mods.html#gad2acd5633463c29e07008687ea73c0f4\">  511</a></span>&#160; </div>\n<div class=\"line\"><a name=\"l00515\"></a><span class=\"lineno\">  515</span>&#160;<span class=\"preprocessor\">#define GLFW_MOD_ALT             0x0004</span></div>\n<div class=\"line\"><a name=\"l00516\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__mods.html#ga6b64ba10ea0227cf6f42efd0a220aba1\">  516</a></span>&#160; </div>\n<div class=\"line\"><a name=\"l00520\"></a><span class=\"lineno\">  520</span>&#160;<span class=\"preprocessor\">#define GLFW_MOD_SUPER           0x0008</span></div>\n<div class=\"line\"><a name=\"l00521\"></a><span class=\"lineno\">  521</span>&#160; </div>\n<div class=\"line\"><a name=\"l00526\"></a><span class=\"lineno\">  526</span>&#160;<span class=\"preprocessor\">#define GLFW_MOD_CAPS_LOCK       0x0010</span></div>\n<div class=\"line\"><a name=\"l00527\"></a><span class=\"lineno\">  527</span>&#160; </div>\n<div class=\"line\"><a name=\"l00532\"></a><span class=\"lineno\">  532</span>&#160;<span class=\"preprocessor\">#define GLFW_MOD_NUM_LOCK        0x0020</span></div>\n<div class=\"line\"><a name=\"l00533\"></a><span class=\"lineno\">  533</span>&#160; </div>\n<div class=\"line\"><a name=\"l00543\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__buttons.html#gaf08c4ddecb051d3d9667db1d5e417c9c\">  543</a></span>&#160;<span class=\"preprocessor\">#define GLFW_MOUSE_BUTTON_1         0</span></div>\n<div class=\"line\"><a name=\"l00544\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__buttons.html#gae8513e06aab8aa393b595f22c6d8257a\">  544</a></span>&#160;<span class=\"preprocessor\">#define GLFW_MOUSE_BUTTON_2         1</span></div>\n<div class=\"line\"><a name=\"l00545\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__buttons.html#ga8b02a1ab55dde45b3a3883d54ffd7dc7\">  545</a></span>&#160;<span class=\"preprocessor\">#define GLFW_MOUSE_BUTTON_3         2</span></div>\n<div class=\"line\"><a name=\"l00546\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__buttons.html#ga35d5c4263e0dc0d0a4731ca6c562f32c\">  546</a></span>&#160;<span class=\"preprocessor\">#define GLFW_MOUSE_BUTTON_4         3</span></div>\n<div class=\"line\"><a name=\"l00547\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__buttons.html#gab1fd86a4518a9141ec7bcde2e15a2fdf\">  547</a></span>&#160;<span class=\"preprocessor\">#define GLFW_MOUSE_BUTTON_5         4</span></div>\n<div class=\"line\"><a name=\"l00548\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__buttons.html#gaf37100431dcd5082d48f95ee8bc8cd56\">  548</a></span>&#160;<span class=\"preprocessor\">#define GLFW_MOUSE_BUTTON_6         5</span></div>\n<div class=\"line\"><a name=\"l00549\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__buttons.html#ga3e2f2cf3c4942df73cc094247d275e74\">  549</a></span>&#160;<span class=\"preprocessor\">#define GLFW_MOUSE_BUTTON_7         6</span></div>\n<div class=\"line\"><a name=\"l00550\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__buttons.html#ga34a4d2a701434f763fd93a2ff842b95a\">  550</a></span>&#160;<span class=\"preprocessor\">#define GLFW_MOUSE_BUTTON_8         7</span></div>\n<div class=\"line\"><a name=\"l00551\"></a><span class=\"lineno\">  551</span>&#160;<span class=\"preprocessor\">#define GLFW_MOUSE_BUTTON_LAST      GLFW_MOUSE_BUTTON_8</span></div>\n<div class=\"line\"><a name=\"l00552\"></a><span class=\"lineno\">  552</span>&#160;<span class=\"preprocessor\">#define GLFW_MOUSE_BUTTON_LEFT      GLFW_MOUSE_BUTTON_1</span></div>\n<div class=\"line\"><a name=\"l00553\"></a><span class=\"lineno\">  553</span>&#160;<span class=\"preprocessor\">#define GLFW_MOUSE_BUTTON_RIGHT     GLFW_MOUSE_BUTTON_2</span></div>\n<div class=\"line\"><a name=\"l00554\"></a><span class=\"lineno\">  554</span>&#160;<span class=\"preprocessor\">#define GLFW_MOUSE_BUTTON_MIDDLE    GLFW_MOUSE_BUTTON_3</span></div>\n<div class=\"line\"><a name=\"l00555\"></a><span class=\"lineno\">  555</span>&#160; </div>\n<div class=\"line\"><a name=\"l00564\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__joysticks.html#gae43281bc66d3fa5089fb50c3e7a28695\">  564</a></span>&#160;<span class=\"preprocessor\">#define GLFW_JOYSTICK_1             0</span></div>\n<div class=\"line\"><a name=\"l00565\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__joysticks.html#ga74771620aa53bd68a487186dea66fd77\">  565</a></span>&#160;<span class=\"preprocessor\">#define GLFW_JOYSTICK_2             1</span></div>\n<div class=\"line\"><a name=\"l00566\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__joysticks.html#ga20a9f4f3aaefed9ea5e66072fc588b87\">  566</a></span>&#160;<span class=\"preprocessor\">#define GLFW_JOYSTICK_3             2</span></div>\n<div class=\"line\"><a name=\"l00567\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__joysticks.html#ga21a934c940bcf25db0e4c8fe9b364bdb\">  567</a></span>&#160;<span class=\"preprocessor\">#define GLFW_JOYSTICK_4             3</span></div>\n<div class=\"line\"><a name=\"l00568\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__joysticks.html#ga87689d47df0ba6f9f5fcbbcaf7b3cecf\">  568</a></span>&#160;<span class=\"preprocessor\">#define GLFW_JOYSTICK_5             4</span></div>\n<div class=\"line\"><a name=\"l00569\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__joysticks.html#gaef55389ee605d6dfc31aef6fe98c54ec\">  569</a></span>&#160;<span class=\"preprocessor\">#define GLFW_JOYSTICK_6             5</span></div>\n<div class=\"line\"><a name=\"l00570\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__joysticks.html#gae7d26e3df447c2c14a569fcc18516af4\">  570</a></span>&#160;<span class=\"preprocessor\">#define GLFW_JOYSTICK_7             6</span></div>\n<div class=\"line\"><a name=\"l00571\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__joysticks.html#gab91bbf5b7ca6be8d3ac5c4d89ff48ac7\">  571</a></span>&#160;<span class=\"preprocessor\">#define GLFW_JOYSTICK_8             7</span></div>\n<div class=\"line\"><a name=\"l00572\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__joysticks.html#ga5c84fb4e49bf661d7d7c78eb4018c508\">  572</a></span>&#160;<span class=\"preprocessor\">#define GLFW_JOYSTICK_9             8</span></div>\n<div class=\"line\"><a name=\"l00573\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__joysticks.html#ga89540873278ae5a42b3e70d64164dc74\">  573</a></span>&#160;<span class=\"preprocessor\">#define GLFW_JOYSTICK_10            9</span></div>\n<div class=\"line\"><a name=\"l00574\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__joysticks.html#ga7b02ab70daf7a78bcc942d5d4cc1dcf9\">  574</a></span>&#160;<span class=\"preprocessor\">#define GLFW_JOYSTICK_11            10</span></div>\n<div class=\"line\"><a name=\"l00575\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__joysticks.html#ga453edeeabf350827646b6857df4f80ce\">  575</a></span>&#160;<span class=\"preprocessor\">#define GLFW_JOYSTICK_12            11</span></div>\n<div class=\"line\"><a name=\"l00576\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__joysticks.html#ga9ca13ebf24c331dd98df17d84a4b72c9\">  576</a></span>&#160;<span class=\"preprocessor\">#define GLFW_JOYSTICK_13            12</span></div>\n<div class=\"line\"><a name=\"l00577\"></a><span class=\"lineno\">  577</span>&#160;<span class=\"preprocessor\">#define GLFW_JOYSTICK_14            13</span></div>\n<div class=\"line\"><a name=\"l00578\"></a><span class=\"lineno\">  578</span>&#160;<span class=\"preprocessor\">#define GLFW_JOYSTICK_15            14</span></div>\n<div class=\"line\"><a name=\"l00579\"></a><span class=\"lineno\">  579</span>&#160;<span class=\"preprocessor\">#define GLFW_JOYSTICK_16            15</span></div>\n<div class=\"line\"><a name=\"l00580\"></a><span class=\"lineno\">  580</span>&#160;<span class=\"preprocessor\">#define GLFW_JOYSTICK_LAST          GLFW_JOYSTICK_16</span></div>\n<div class=\"line\"><a name=\"l00581\"></a><span class=\"lineno\">  581</span>&#160; </div>\n<div class=\"line\"><a name=\"l00590\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__gamepad__buttons.html#ga17d67b4f39a39d6b813bd1567a3507c3\">  590</a></span>&#160;<span class=\"preprocessor\">#define GLFW_GAMEPAD_BUTTON_A               0</span></div>\n<div class=\"line\"><a name=\"l00591\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__gamepad__buttons.html#gadfbc9ea9bf3aae896b79fa49fdc85c7f\">  591</a></span>&#160;<span class=\"preprocessor\">#define GLFW_GAMEPAD_BUTTON_B               1</span></div>\n<div class=\"line\"><a name=\"l00592\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__gamepad__buttons.html#gabc7c0264ce778835b516a472b47f6caf\">  592</a></span>&#160;<span class=\"preprocessor\">#define GLFW_GAMEPAD_BUTTON_X               2</span></div>\n<div class=\"line\"><a name=\"l00593\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__gamepad__buttons.html#ga04606949dd9139434b8a1bedf4ac1021\">  593</a></span>&#160;<span class=\"preprocessor\">#define GLFW_GAMEPAD_BUTTON_Y               3</span></div>\n<div class=\"line\"><a name=\"l00594\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__gamepad__buttons.html#ga7fa48c32e5b2f5db2f080aa0b8b573dc\">  594</a></span>&#160;<span class=\"preprocessor\">#define GLFW_GAMEPAD_BUTTON_LEFT_BUMPER     4</span></div>\n<div class=\"line\"><a name=\"l00595\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__gamepad__buttons.html#ga3e089787327454f7bfca7364d6ca206a\">  595</a></span>&#160;<span class=\"preprocessor\">#define GLFW_GAMEPAD_BUTTON_RIGHT_BUMPER    5</span></div>\n<div class=\"line\"><a name=\"l00596\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__gamepad__buttons.html#ga1c003f52b5aebb45272475b48953b21a\">  596</a></span>&#160;<span class=\"preprocessor\">#define GLFW_GAMEPAD_BUTTON_BACK            6</span></div>\n<div class=\"line\"><a name=\"l00597\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__gamepad__buttons.html#ga4f1ed6f974a47bc8930d4874a283476a\">  597</a></span>&#160;<span class=\"preprocessor\">#define GLFW_GAMEPAD_BUTTON_START           7</span></div>\n<div class=\"line\"><a name=\"l00598\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__gamepad__buttons.html#gae2a780d2a8c79e0b77c0b7b601ca57c6\">  598</a></span>&#160;<span class=\"preprocessor\">#define GLFW_GAMEPAD_BUTTON_GUIDE           8</span></div>\n<div class=\"line\"><a name=\"l00599\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__gamepad__buttons.html#ga8f2b731b97d80f90f11967a83207665c\">  599</a></span>&#160;<span class=\"preprocessor\">#define GLFW_GAMEPAD_BUTTON_LEFT_THUMB      9</span></div>\n<div class=\"line\"><a name=\"l00600\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__gamepad__buttons.html#gaf0697e0e8607b2ebe1c93b0c6befe301\">  600</a></span>&#160;<span class=\"preprocessor\">#define GLFW_GAMEPAD_BUTTON_RIGHT_THUMB     10</span></div>\n<div class=\"line\"><a name=\"l00601\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__gamepad__buttons.html#ga5cc98882f4f81dacf761639a567f61eb\">  601</a></span>&#160;<span class=\"preprocessor\">#define GLFW_GAMEPAD_BUTTON_DPAD_UP         11</span></div>\n<div class=\"line\"><a name=\"l00602\"></a><span class=\"lineno\">  602</span>&#160;<span class=\"preprocessor\">#define GLFW_GAMEPAD_BUTTON_DPAD_RIGHT      12</span></div>\n<div class=\"line\"><a name=\"l00603\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__gamepad__buttons.html#gaf08d0df26527c9305253422bd98ed63a\">  603</a></span>&#160;<span class=\"preprocessor\">#define GLFW_GAMEPAD_BUTTON_DPAD_DOWN       13</span></div>\n<div class=\"line\"><a name=\"l00604\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__gamepad__buttons.html#gaaef094b3dacbf15f272b274516839b82\">  604</a></span>&#160;<span class=\"preprocessor\">#define GLFW_GAMEPAD_BUTTON_DPAD_LEFT       14</span></div>\n<div class=\"line\"><a name=\"l00605\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__gamepad__buttons.html#gafc7821e87d77d41ed2cd3e1f726ec35f\">  605</a></span>&#160;<span class=\"preprocessor\">#define GLFW_GAMEPAD_BUTTON_LAST            GLFW_GAMEPAD_BUTTON_DPAD_LEFT</span></div>\n<div class=\"line\"><a name=\"l00606\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__gamepad__buttons.html#ga3a7ef6bcb768a08cd3bf142f7f09f802\">  606</a></span>&#160; </div>\n<div class=\"line\"><a name=\"l00607\"></a><span class=\"lineno\">  607</span>&#160;<span class=\"preprocessor\">#define GLFW_GAMEPAD_BUTTON_CROSS       GLFW_GAMEPAD_BUTTON_A</span></div>\n<div class=\"line\"><a name=\"l00608\"></a><span class=\"lineno\">  608</span>&#160;<span class=\"preprocessor\">#define GLFW_GAMEPAD_BUTTON_CIRCLE      GLFW_GAMEPAD_BUTTON_B</span></div>\n<div class=\"line\"><a name=\"l00609\"></a><span class=\"lineno\">  609</span>&#160;<span class=\"preprocessor\">#define GLFW_GAMEPAD_BUTTON_SQUARE      GLFW_GAMEPAD_BUTTON_X</span></div>\n<div class=\"line\"><a name=\"l00610\"></a><span class=\"lineno\">  610</span>&#160;<span class=\"preprocessor\">#define GLFW_GAMEPAD_BUTTON_TRIANGLE    GLFW_GAMEPAD_BUTTON_Y</span></div>\n<div class=\"line\"><a name=\"l00611\"></a><span class=\"lineno\">  611</span>&#160; </div>\n<div class=\"line\"><a name=\"l00620\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__gamepad__axes.html#ga6d79561dd8907c37354426242901b86e\">  620</a></span>&#160;<span class=\"preprocessor\">#define GLFW_GAMEPAD_AXIS_LEFT_X        0</span></div>\n<div class=\"line\"><a name=\"l00621\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__gamepad__axes.html#ga121a7d5d20589a423cd1634dd6ee6eab\">  621</a></span>&#160;<span class=\"preprocessor\">#define GLFW_GAMEPAD_AXIS_LEFT_Y        1</span></div>\n<div class=\"line\"><a name=\"l00622\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__gamepad__axes.html#ga0818fd9433e1359692b7443293e5ac86\">  622</a></span>&#160;<span class=\"preprocessor\">#define GLFW_GAMEPAD_AXIS_RIGHT_X       2</span></div>\n<div class=\"line\"><a name=\"l00623\"></a><span class=\"lineno\">  623</span>&#160;<span class=\"preprocessor\">#define GLFW_GAMEPAD_AXIS_RIGHT_Y       3</span></div>\n<div class=\"line\"><a name=\"l00624\"></a><span class=\"lineno\">  624</span>&#160;<span class=\"preprocessor\">#define GLFW_GAMEPAD_AXIS_LEFT_TRIGGER  4</span></div>\n<div class=\"line\"><a name=\"l00625\"></a><span class=\"lineno\">  625</span>&#160;<span class=\"preprocessor\">#define GLFW_GAMEPAD_AXIS_RIGHT_TRIGGER 5</span></div>\n<div class=\"line\"><a name=\"l00626\"></a><span class=\"lineno\">  626</span>&#160;<span class=\"preprocessor\">#define GLFW_GAMEPAD_AXIS_LAST          GLFW_GAMEPAD_AXIS_RIGHT_TRIGGER</span></div>\n<div class=\"line\"><a name=\"l00627\"></a><span class=\"lineno\">  627</span>&#160; </div>\n<div class=\"line\"><a name=\"l00642\"></a><span class=\"lineno\">  642</span>&#160;<span class=\"preprocessor\">#define GLFW_NO_ERROR               0</span></div>\n<div class=\"line\"><a name=\"l00643\"></a><span class=\"lineno\">  643</span>&#160; </div>\n<div class=\"line\"><a name=\"l00651\"></a><span class=\"lineno\">  651</span>&#160;<span class=\"preprocessor\">#define GLFW_NOT_INITIALIZED        0x00010001</span></div>\n<div class=\"line\"><a name=\"l00652\"></a><span class=\"lineno\">  652</span>&#160; </div>\n<div class=\"line\"><a name=\"l00661\"></a><span class=\"lineno\">  661</span>&#160;<span class=\"preprocessor\">#define GLFW_NO_CURRENT_CONTEXT     0x00010002</span></div>\n<div class=\"line\"><a name=\"l00662\"></a><span class=\"lineno\">  662</span>&#160; </div>\n<div class=\"line\"><a name=\"l00669\"></a><span class=\"lineno\">  669</span>&#160;<span class=\"preprocessor\">#define GLFW_INVALID_ENUM           0x00010003</span></div>\n<div class=\"line\"><a name=\"l00670\"></a><span class=\"lineno\">  670</span>&#160; </div>\n<div class=\"line\"><a name=\"l00680\"></a><span class=\"lineno\">  680</span>&#160;<span class=\"preprocessor\">#define GLFW_INVALID_VALUE          0x00010004</span></div>\n<div class=\"line\"><a name=\"l00681\"></a><span class=\"lineno\">  681</span>&#160; </div>\n<div class=\"line\"><a name=\"l00688\"></a><span class=\"lineno\">  688</span>&#160;<span class=\"preprocessor\">#define GLFW_OUT_OF_MEMORY          0x00010005</span></div>\n<div class=\"line\"><a name=\"l00689\"></a><span class=\"lineno\">  689</span>&#160; </div>\n<div class=\"line\"><a name=\"l00704\"></a><span class=\"lineno\">  704</span>&#160;<span class=\"preprocessor\">#define GLFW_API_UNAVAILABLE        0x00010006</span></div>\n<div class=\"line\"><a name=\"l00705\"></a><span class=\"lineno\">  705</span>&#160; </div>\n<div class=\"line\"><a name=\"l00721\"></a><span class=\"lineno\">  721</span>&#160;<span class=\"preprocessor\">#define GLFW_VERSION_UNAVAILABLE    0x00010007</span></div>\n<div class=\"line\"><a name=\"l00722\"></a><span class=\"lineno\">  722</span>&#160; </div>\n<div class=\"line\"><a name=\"l00732\"></a><span class=\"lineno\">  732</span>&#160;<span class=\"preprocessor\">#define GLFW_PLATFORM_ERROR         0x00010008</span></div>\n<div class=\"line\"><a name=\"l00733\"></a><span class=\"lineno\">  733</span>&#160; </div>\n<div class=\"line\"><a name=\"l00751\"></a><span class=\"lineno\">  751</span>&#160;<span class=\"preprocessor\">#define GLFW_FORMAT_UNAVAILABLE     0x00010009</span></div>\n<div class=\"line\"><a name=\"l00752\"></a><span class=\"lineno\">  752</span>&#160; </div>\n<div class=\"line\"><a name=\"l00759\"></a><span class=\"lineno\">  759</span>&#160;<span class=\"preprocessor\">#define GLFW_NO_WINDOW_CONTEXT      0x0001000A</span></div>\n<div class=\"line\"><a name=\"l00760\"></a><span class=\"lineno\">  760</span>&#160; </div>\n<div class=\"line\"><a name=\"l00769\"></a><span class=\"lineno\">  769</span>&#160;<span class=\"preprocessor\">#define GLFW_FOCUSED                0x00020001</span></div>\n<div class=\"line\"><a name=\"l00770\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__window.html#ga39d44b7c056e55e581355a92d240b58a\">  770</a></span>&#160; </div>\n<div class=\"line\"><a name=\"l00774\"></a><span class=\"lineno\">  774</span>&#160;<span class=\"preprocessor\">#define GLFW_ICONIFIED              0x00020002</span></div>\n<div class=\"line\"><a name=\"l00775\"></a><span class=\"lineno\">  775</span>&#160; </div>\n<div class=\"line\"><a name=\"l00780\"></a><span class=\"lineno\">  780</span>&#160;<span class=\"preprocessor\">#define GLFW_RESIZABLE              0x00020003</span></div>\n<div class=\"line\"><a name=\"l00781\"></a><span class=\"lineno\">  781</span>&#160; </div>\n<div class=\"line\"><a name=\"l00786\"></a><span class=\"lineno\">  786</span>&#160;<span class=\"preprocessor\">#define GLFW_VISIBLE                0x00020004</span></div>\n<div class=\"line\"><a name=\"l00787\"></a><span class=\"lineno\">  787</span>&#160; </div>\n<div class=\"line\"><a name=\"l00792\"></a><span class=\"lineno\">  792</span>&#160;<span class=\"preprocessor\">#define GLFW_DECORATED              0x00020005</span></div>\n<div class=\"line\"><a name=\"l00793\"></a><span class=\"lineno\">  793</span>&#160; </div>\n<div class=\"line\"><a name=\"l00798\"></a><span class=\"lineno\">  798</span>&#160;<span class=\"preprocessor\">#define GLFW_AUTO_ICONIFY           0x00020006</span></div>\n<div class=\"line\"><a name=\"l00799\"></a><span class=\"lineno\">  799</span>&#160; </div>\n<div class=\"line\"><a name=\"l00804\"></a><span class=\"lineno\">  804</span>&#160;<span class=\"preprocessor\">#define GLFW_FLOATING               0x00020007</span></div>\n<div class=\"line\"><a name=\"l00805\"></a><span class=\"lineno\">  805</span>&#160; </div>\n<div class=\"line\"><a name=\"l00810\"></a><span class=\"lineno\">  810</span>&#160;<span class=\"preprocessor\">#define GLFW_MAXIMIZED              0x00020008</span></div>\n<div class=\"line\"><a name=\"l00811\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__window.html#ga5ac0847c0aa0b3619f2855707b8a7a77\">  811</a></span>&#160; </div>\n<div class=\"line\"><a name=\"l00815\"></a><span class=\"lineno\">  815</span>&#160;<span class=\"preprocessor\">#define GLFW_CENTER_CURSOR          0x00020009</span></div>\n<div class=\"line\"><a name=\"l00816\"></a><span class=\"lineno\">  816</span>&#160; </div>\n<div class=\"line\"><a name=\"l00822\"></a><span class=\"lineno\">  822</span>&#160;<span class=\"preprocessor\">#define GLFW_TRANSPARENT_FRAMEBUFFER 0x0002000A</span></div>\n<div class=\"line\"><a name=\"l00823\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__window.html#ga8665c71c6fa3d22425c6a0e8a3f89d8a\">  823</a></span>&#160; </div>\n<div class=\"line\"><a name=\"l00827\"></a><span class=\"lineno\">  827</span>&#160;<span class=\"preprocessor\">#define GLFW_HOVERED                0x0002000B</span></div>\n<div class=\"line\"><a name=\"l00828\"></a><span class=\"lineno\">  828</span>&#160; </div>\n<div class=\"line\"><a name=\"l00833\"></a><span class=\"lineno\">  833</span>&#160;<span class=\"preprocessor\">#define GLFW_FOCUS_ON_SHOW          0x0002000C</span></div>\n<div class=\"line\"><a name=\"l00834\"></a><span class=\"lineno\">  834</span>&#160; </div>\n<div class=\"line\"><a name=\"l00839\"></a><span class=\"lineno\">  839</span>&#160;<span class=\"preprocessor\">#define GLFW_RED_BITS               0x00021001</span></div>\n<div class=\"line\"><a name=\"l00840\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__window.html#gafba3b72638c914e5fb8a237dd4c50d4d\">  840</a></span>&#160; </div>\n<div class=\"line\"><a name=\"l00844\"></a><span class=\"lineno\">  844</span>&#160;<span class=\"preprocessor\">#define GLFW_GREEN_BITS             0x00021002</span></div>\n<div class=\"line\"><a name=\"l00845\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__window.html#gab292ea403db6d514537b515311bf9ae3\">  845</a></span>&#160; </div>\n<div class=\"line\"><a name=\"l00849\"></a><span class=\"lineno\">  849</span>&#160;<span class=\"preprocessor\">#define GLFW_BLUE_BITS              0x00021003</span></div>\n<div class=\"line\"><a name=\"l00850\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__window.html#gafed79a3f468997877da86c449bd43e8c\">  850</a></span>&#160; </div>\n<div class=\"line\"><a name=\"l00854\"></a><span class=\"lineno\">  854</span>&#160;<span class=\"preprocessor\">#define GLFW_ALPHA_BITS             0x00021004</span></div>\n<div class=\"line\"><a name=\"l00855\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__window.html#ga318a55eac1fee57dfe593b6d38149d07\">  855</a></span>&#160; </div>\n<div class=\"line\"><a name=\"l00859\"></a><span class=\"lineno\">  859</span>&#160;<span class=\"preprocessor\">#define GLFW_DEPTH_BITS             0x00021005</span></div>\n<div class=\"line\"><a name=\"l00860\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__window.html#ga5339890a45a1fb38e93cb9fcc5fd069d\">  860</a></span>&#160; </div>\n<div class=\"line\"><a name=\"l00864\"></a><span class=\"lineno\">  864</span>&#160;<span class=\"preprocessor\">#define GLFW_STENCIL_BITS           0x00021006</span></div>\n<div class=\"line\"><a name=\"l00865\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__window.html#gaead34a9a683b2bc20eecf30ba738bfc6\">  865</a></span>&#160; </div>\n<div class=\"line\"><a name=\"l00869\"></a><span class=\"lineno\">  869</span>&#160;<span class=\"preprocessor\">#define GLFW_ACCUM_RED_BITS         0x00021007</span></div>\n<div class=\"line\"><a name=\"l00870\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__window.html#ga65713cee1326f8e9d806fdf93187b471\">  870</a></span>&#160; </div>\n<div class=\"line\"><a name=\"l00874\"></a><span class=\"lineno\">  874</span>&#160;<span class=\"preprocessor\">#define GLFW_ACCUM_GREEN_BITS       0x00021008</span></div>\n<div class=\"line\"><a name=\"l00875\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__window.html#ga22bbe9104a8ce1f8b88fb4f186aa36ce\">  875</a></span>&#160; </div>\n<div class=\"line\"><a name=\"l00879\"></a><span class=\"lineno\">  879</span>&#160;<span class=\"preprocessor\">#define GLFW_ACCUM_BLUE_BITS        0x00021009</span></div>\n<div class=\"line\"><a name=\"l00880\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__window.html#gae829b55591c18169a40ab4067a041b1f\">  880</a></span>&#160; </div>\n<div class=\"line\"><a name=\"l00884\"></a><span class=\"lineno\">  884</span>&#160;<span class=\"preprocessor\">#define GLFW_ACCUM_ALPHA_BITS       0x0002100A</span></div>\n<div class=\"line\"><a name=\"l00885\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__window.html#gab05108c5029443b371112b031d1fa174\">  885</a></span>&#160; </div>\n<div class=\"line\"><a name=\"l00889\"></a><span class=\"lineno\">  889</span>&#160;<span class=\"preprocessor\">#define GLFW_AUX_BUFFERS            0x0002100B</span></div>\n<div class=\"line\"><a name=\"l00890\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__window.html#ga83d991efca02537e2d69969135b77b03\">  890</a></span>&#160; </div>\n<div class=\"line\"><a name=\"l00894\"></a><span class=\"lineno\">  894</span>&#160;<span class=\"preprocessor\">#define GLFW_STEREO                 0x0002100C</span></div>\n<div class=\"line\"><a name=\"l00895\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__window.html#ga2cdf86fdcb7722fb8829c4e201607535\">  895</a></span>&#160; </div>\n<div class=\"line\"><a name=\"l00899\"></a><span class=\"lineno\">  899</span>&#160;<span class=\"preprocessor\">#define GLFW_SAMPLES                0x0002100D</span></div>\n<div class=\"line\"><a name=\"l00900\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__window.html#ga444a8f00414a63220591f9fdb7b5642b\">  900</a></span>&#160; </div>\n<div class=\"line\"><a name=\"l00904\"></a><span class=\"lineno\">  904</span>&#160;<span class=\"preprocessor\">#define GLFW_SRGB_CAPABLE           0x0002100E</span></div>\n<div class=\"line\"><a name=\"l00905\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__window.html#ga0f20825e6e47ee8ba389024519682212\">  905</a></span>&#160; </div>\n<div class=\"line\"><a name=\"l00909\"></a><span class=\"lineno\">  909</span>&#160;<span class=\"preprocessor\">#define GLFW_REFRESH_RATE           0x0002100F</span></div>\n<div class=\"line\"><a name=\"l00910\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__window.html#ga714a5d569e8a274ea58fdfa020955339\">  910</a></span>&#160; </div>\n<div class=\"line\"><a name=\"l00914\"></a><span class=\"lineno\">  914</span>&#160;<span class=\"preprocessor\">#define GLFW_DOUBLEBUFFER           0x00021010</span></div>\n<div class=\"line\"><a name=\"l00915\"></a><span class=\"lineno\">  915</span>&#160; </div>\n<div class=\"line\"><a name=\"l00921\"></a><span class=\"lineno\">  921</span>&#160;<span class=\"preprocessor\">#define GLFW_CLIENT_API             0x00022001</span></div>\n<div class=\"line\"><a name=\"l00922\"></a><span class=\"lineno\">  922</span>&#160; </div>\n<div class=\"line\"><a name=\"l00927\"></a><span class=\"lineno\">  927</span>&#160;<span class=\"preprocessor\">#define GLFW_CONTEXT_VERSION_MAJOR  0x00022002</span></div>\n<div class=\"line\"><a name=\"l00928\"></a><span class=\"lineno\">  928</span>&#160; </div>\n<div class=\"line\"><a name=\"l00933\"></a><span class=\"lineno\">  933</span>&#160;<span class=\"preprocessor\">#define GLFW_CONTEXT_VERSION_MINOR  0x00022003</span></div>\n<div class=\"line\"><a name=\"l00934\"></a><span class=\"lineno\">  934</span>&#160; </div>\n<div class=\"line\"><a name=\"l00939\"></a><span class=\"lineno\">  939</span>&#160;<span class=\"preprocessor\">#define GLFW_CONTEXT_REVISION       0x00022004</span></div>\n<div class=\"line\"><a name=\"l00940\"></a><span class=\"lineno\">  940</span>&#160; </div>\n<div class=\"line\"><a name=\"l00945\"></a><span class=\"lineno\">  945</span>&#160;<span class=\"preprocessor\">#define GLFW_CONTEXT_ROBUSTNESS     0x00022005</span></div>\n<div class=\"line\"><a name=\"l00946\"></a><span class=\"lineno\">  946</span>&#160; </div>\n<div class=\"line\"><a name=\"l00951\"></a><span class=\"lineno\">  951</span>&#160;<span class=\"preprocessor\">#define GLFW_OPENGL_FORWARD_COMPAT  0x00022006</span></div>\n<div class=\"line\"><a name=\"l00952\"></a><span class=\"lineno\">  952</span>&#160; </div>\n<div class=\"line\"><a name=\"l00957\"></a><span class=\"lineno\">  957</span>&#160;<span class=\"preprocessor\">#define GLFW_OPENGL_DEBUG_CONTEXT   0x00022007</span></div>\n<div class=\"line\"><a name=\"l00958\"></a><span class=\"lineno\">  958</span>&#160; </div>\n<div class=\"line\"><a name=\"l00963\"></a><span class=\"lineno\">  963</span>&#160;<span class=\"preprocessor\">#define GLFW_OPENGL_PROFILE         0x00022008</span></div>\n<div class=\"line\"><a name=\"l00964\"></a><span class=\"lineno\">  964</span>&#160; </div>\n<div class=\"line\"><a name=\"l00969\"></a><span class=\"lineno\">  969</span>&#160;<span class=\"preprocessor\">#define GLFW_CONTEXT_RELEASE_BEHAVIOR 0x00022009</span></div>\n<div class=\"line\"><a name=\"l00970\"></a><span class=\"lineno\">  970</span>&#160; </div>\n<div class=\"line\"><a name=\"l00975\"></a><span class=\"lineno\">  975</span>&#160;<span class=\"preprocessor\">#define GLFW_CONTEXT_NO_ERROR       0x0002200A</span></div>\n<div class=\"line\"><a name=\"l00976\"></a><span class=\"lineno\">  976</span>&#160; </div>\n<div class=\"line\"><a name=\"l00981\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__window.html#ga620bc4280c7eab81ac9f02204500ed47\">  981</a></span>&#160;<span class=\"preprocessor\">#define GLFW_CONTEXT_CREATION_API   0x0002200B</span></div>\n<div class=\"line\"><a name=\"l00982\"></a><span class=\"lineno\">  982</span>&#160; </div>\n<div class=\"line\"><a name=\"l00985\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__window.html#gab6ef2d02eb55800d249ccf1af253c35e\">  985</a></span>&#160;<span class=\"preprocessor\">#define GLFW_SCALE_TO_MONITOR       0x0002200C</span></div>\n<div class=\"line\"><a name=\"l00986\"></a><span class=\"lineno\">  986</span>&#160; </div>\n<div class=\"line\"><a name=\"l00989\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__window.html#ga70fa0fbc745de6aa824df79a580e84b5\">  989</a></span>&#160;<span class=\"preprocessor\">#define GLFW_COCOA_RETINA_FRAMEBUFFER 0x00023001</span></div>\n<div class=\"line\"><a name=\"l00990\"></a><span class=\"lineno\">  990</span>&#160; </div>\n<div class=\"line\"><a name=\"l00993\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__window.html#ga53c84ed2ddd94e15bbd44b1f6f7feafc\">  993</a></span>&#160;<span class=\"preprocessor\">#define GLFW_COCOA_FRAME_NAME         0x00023002</span></div>\n<div class=\"line\"><a name=\"l00994\"></a><span class=\"lineno\">  994</span>&#160; </div>\n<div class=\"line\"><a name=\"l00997\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__window.html#gae5a9ea2fccccd92edbd343fc56461114\">  997</a></span>&#160;<span class=\"preprocessor\">#define GLFW_COCOA_GRAPHICS_SWITCHING 0x00023003</span></div>\n<div class=\"line\"><a name=\"l00998\"></a><span class=\"lineno\">  998</span>&#160; </div>\n<div class=\"line\"><a name=\"l01001\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__window.html#ga494c3c0d911e4b860b946530a3e389e8\"> 1001</a></span>&#160;<span class=\"preprocessor\">#define GLFW_X11_CLASS_NAME         0x00024001</span></div>\n<div class=\"line\"><a name=\"l01002\"></a><span class=\"lineno\"> 1002</span>&#160; </div>\n<div class=\"line\"><a name=\"l01005\"></a><span class=\"lineno\"><a class=\"line\" href=\"glfw3_8h.html#a01b3f66db266341425e9abee6b257db2\"> 1005</a></span>&#160;<span class=\"preprocessor\">#define GLFW_X11_INSTANCE_NAME      0x00024002</span></div>\n<div class=\"line\"><a name=\"l01006\"></a><span class=\"lineno\"><a class=\"line\" href=\"glfw3_8h.html#a28d9b3bc6c2a522d815c8e146595051f\"> 1006</a></span>&#160; </div>\n<div class=\"line\"><a name=\"l01008\"></a><span class=\"lineno\"><a class=\"line\" href=\"glfw3_8h.html#a8b306cb27f5bb0d6d67c7356a0e0fc34\"> 1008</a></span>&#160;<span class=\"preprocessor\">#define GLFW_NO_API                          0</span></div>\n<div class=\"line\"><a name=\"l01009\"></a><span class=\"lineno\"><a class=\"line\" href=\"glfw3_8h.html#aee84a679230d205005e22487ff678a85\"> 1009</a></span>&#160;<span class=\"preprocessor\">#define GLFW_OPENGL_API             0x00030001</span></div>\n<div class=\"line\"><a name=\"l01010\"></a><span class=\"lineno\"><a class=\"line\" href=\"glfw3_8h.html#aec1132f245143fc915b2f0995228564c\"> 1010</a></span>&#160;<span class=\"preprocessor\">#define GLFW_OPENGL_ES_API          0x00030002</span></div>\n<div class=\"line\"><a name=\"l01011\"></a><span class=\"lineno\"> 1011</span>&#160; </div>\n<div class=\"line\"><a name=\"l01012\"></a><span class=\"lineno\"><a class=\"line\" href=\"glfw3_8h.html#ad6f2335d6f21cc9bab96633b1c111d5f\"> 1012</a></span>&#160;<span class=\"preprocessor\">#define GLFW_NO_ROBUSTNESS                   0</span></div>\n<div class=\"line\"><a name=\"l01013\"></a><span class=\"lineno\"><a class=\"line\" href=\"glfw3_8h.html#af094bb16da76f66ebceb19ee213b3de8\"> 1013</a></span>&#160;<span class=\"preprocessor\">#define GLFW_NO_RESET_NOTIFICATION  0x00031001</span></div>\n<div class=\"line\"><a name=\"l01014\"></a><span class=\"lineno\"><a class=\"line\" href=\"glfw3_8h.html#ac06b663d79c8fcf04669cc8fcc0b7670\"> 1014</a></span>&#160;<span class=\"preprocessor\">#define GLFW_LOSE_CONTEXT_ON_RESET  0x00031002</span></div>\n<div class=\"line\"><a name=\"l01015\"></a><span class=\"lineno\"> 1015</span>&#160; </div>\n<div class=\"line\"><a name=\"l01016\"></a><span class=\"lineno\"><a class=\"line\" href=\"glfw3_8h.html#aade31da5b884a84a7625c6b059b9132c\"> 1016</a></span>&#160;<span class=\"preprocessor\">#define GLFW_OPENGL_ANY_PROFILE              0</span></div>\n<div class=\"line\"><a name=\"l01017\"></a><span class=\"lineno\"><a class=\"line\" href=\"glfw3_8h.html#ae3bbe2315b7691ab088159eb6c9110fc\"> 1017</a></span>&#160;<span class=\"preprocessor\">#define GLFW_OPENGL_CORE_PROFILE    0x00032001</span></div>\n<div class=\"line\"><a name=\"l01018\"></a><span class=\"lineno\"><a class=\"line\" href=\"glfw3_8h.html#a4d7ce8ce71030c3b04e2b78145bc59d1\"> 1018</a></span>&#160;<span class=\"preprocessor\">#define GLFW_OPENGL_COMPAT_PROFILE  0x00032002</span></div>\n<div class=\"line\"><a name=\"l01019\"></a><span class=\"lineno\"><a class=\"line\" href=\"glfw3_8h.html#a07b84de0b52143e1958f88a7d9105947\"> 1019</a></span>&#160; </div>\n<div class=\"line\"><a name=\"l01020\"></a><span class=\"lineno\"><a class=\"line\" href=\"glfw3_8h.html#aeeda1be76a44a1fc97c1282e06281fbb\"> 1020</a></span>&#160;<span class=\"preprocessor\">#define GLFW_CURSOR                 0x00033001</span></div>\n<div class=\"line\"><a name=\"l01021\"></a><span class=\"lineno\"> 1021</span>&#160;<span class=\"preprocessor\">#define GLFW_STICKY_KEYS            0x00033002</span></div>\n<div class=\"line\"><a name=\"l01022\"></a><span class=\"lineno\"><a class=\"line\" href=\"glfw3_8h.html#ae04dd25c8577e19fa8c97368561f6c68\"> 1022</a></span>&#160;<span class=\"preprocessor\">#define GLFW_STICKY_MOUSE_BUTTONS   0x00033003</span></div>\n<div class=\"line\"><a name=\"l01023\"></a><span class=\"lineno\"><a class=\"line\" href=\"glfw3_8h.html#ac4d5cb9d78de8573349c58763d53bf11\"> 1023</a></span>&#160;<span class=\"preprocessor\">#define GLFW_LOCK_KEY_MODS          0x00033004</span></div>\n<div class=\"line\"><a name=\"l01024\"></a><span class=\"lineno\"><a class=\"line\" href=\"glfw3_8h.html#a2315b99a329ce53e6a13a9d46fd5ca88\"> 1024</a></span>&#160;<span class=\"preprocessor\">#define GLFW_RAW_MOUSE_MOTION       0x00033005</span></div>\n<div class=\"line\"><a name=\"l01025\"></a><span class=\"lineno\"> 1025</span>&#160; </div>\n<div class=\"line\"><a name=\"l01026\"></a><span class=\"lineno\"><a class=\"line\" href=\"glfw3_8h.html#a6b47d806f285efe9bfd7aeec667297ee\"> 1026</a></span>&#160;<span class=\"preprocessor\">#define GLFW_CURSOR_NORMAL          0x00034001</span></div>\n<div class=\"line\"><a name=\"l01027\"></a><span class=\"lineno\"><a class=\"line\" href=\"glfw3_8h.html#a999961d391db49cb4f949c1dece0e13b\"> 1027</a></span>&#160;<span class=\"preprocessor\">#define GLFW_CURSOR_HIDDEN          0x00034002</span></div>\n<div class=\"line\"><a name=\"l01028\"></a><span class=\"lineno\"><a class=\"line\" href=\"glfw3_8h.html#afca09088eccacdce4b59036cfae349c5\"> 1028</a></span>&#160;<span class=\"preprocessor\">#define GLFW_CURSOR_DISABLED        0x00034003</span></div>\n<div class=\"line\"><a name=\"l01029\"></a><span class=\"lineno\"> 1029</span>&#160; </div>\n<div class=\"line\"><a name=\"l01030\"></a><span class=\"lineno\"><a class=\"line\" href=\"glfw3_8h.html#a0494c9bfd3f584ab41e6dbeeaa0e6a19\"> 1030</a></span>&#160;<span class=\"preprocessor\">#define GLFW_ANY_RELEASE_BEHAVIOR            0</span></div>\n<div class=\"line\"><a name=\"l01031\"></a><span class=\"lineno\"><a class=\"line\" href=\"glfw3_8h.html#a03cf65c9ab01fc8b872ba58842c531c9\"> 1031</a></span>&#160;<span class=\"preprocessor\">#define GLFW_RELEASE_BEHAVIOR_FLUSH 0x00035001</span></div>\n<div class=\"line\"><a name=\"l01032\"></a><span class=\"lineno\"><a class=\"line\" href=\"glfw3_8h.html#afd34a473af9fa81f317910ea371b19e3\"> 1032</a></span>&#160;<span class=\"preprocessor\">#define GLFW_RELEASE_BEHAVIOR_NONE  0x00035002</span></div>\n<div class=\"line\"><a name=\"l01033\"></a><span class=\"lineno\"> 1033</span>&#160; </div>\n<div class=\"line\"><a name=\"l01034\"></a><span class=\"lineno\"> 1034</span>&#160;<span class=\"preprocessor\">#define GLFW_NATIVE_CONTEXT_API     0x00036001</span></div>\n<div class=\"line\"><a name=\"l01035\"></a><span class=\"lineno\"> 1035</span>&#160;<span class=\"preprocessor\">#define GLFW_EGL_CONTEXT_API        0x00036002</span></div>\n<div class=\"line\"><a name=\"l01036\"></a><span class=\"lineno\"> 1036</span>&#160;<span class=\"preprocessor\">#define GLFW_OSMESA_CONTEXT_API     0x00036003</span></div>\n<div class=\"line\"><a name=\"l01037\"></a><span class=\"lineno\"> 1037</span>&#160; </div>\n<div class=\"line\"><a name=\"l01050\"></a><span class=\"lineno\"> 1050</span>&#160;<span class=\"preprocessor\">#define GLFW_ARROW_CURSOR           0x00036001</span></div>\n<div class=\"line\"><a name=\"l01051\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__shapes.html#ga36185f4375eaada1b04e431244774c86\"> 1051</a></span>&#160; </div>\n<div class=\"line\"><a name=\"l01055\"></a><span class=\"lineno\"> 1055</span>&#160;<span class=\"preprocessor\">#define GLFW_IBEAM_CURSOR           0x00036002</span></div>\n<div class=\"line\"><a name=\"l01056\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__shapes.html#ga8af88c0ea05ab9e8f9ac1530e8873c22\"> 1056</a></span>&#160; </div>\n<div class=\"line\"><a name=\"l01060\"></a><span class=\"lineno\"> 1060</span>&#160;<span class=\"preprocessor\">#define GLFW_CROSSHAIR_CURSOR       0x00036003</span></div>\n<div class=\"line\"><a name=\"l01061\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__shapes.html#ga1db35e20849e0837c82e3dc1fd797263\"> 1061</a></span>&#160; </div>\n<div class=\"line\"><a name=\"l01065\"></a><span class=\"lineno\"> 1065</span>&#160;<span class=\"preprocessor\">#define GLFW_HAND_CURSOR            0x00036004</span></div>\n<div class=\"line\"><a name=\"l01066\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__shapes.html#gabb3eb0109f11bb808fc34659177ca962\"> 1066</a></span>&#160; </div>\n<div class=\"line\"><a name=\"l01070\"></a><span class=\"lineno\"> 1070</span>&#160;<span class=\"preprocessor\">#define GLFW_HRESIZE_CURSOR         0x00036005</span></div>\n<div class=\"line\"><a name=\"l01071\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__shapes.html#gaf024f0e1ff8366fb2b5c260509a1fce5\"> 1071</a></span>&#160; </div>\n<div class=\"line\"><a name=\"l01075\"></a><span class=\"lineno\"><a class=\"line\" href=\"glfw3_8h.html#aab64b25921ef21d89252d6f0a71bfc32\"> 1075</a></span>&#160;<span class=\"preprocessor\">#define GLFW_VRESIZE_CURSOR         0x00036006</span></div>\n<div class=\"line\"><a name=\"l01076\"></a><span class=\"lineno\"> 1076</span>&#160; </div>\n<div class=\"line\"><a name=\"l01078\"></a><span class=\"lineno\"> 1078</span>&#160;<span class=\"preprocessor\">#define GLFW_CONNECTED              0x00040001</span></div>\n<div class=\"line\"><a name=\"l01079\"></a><span class=\"lineno\"> 1079</span>&#160;<span class=\"preprocessor\">#define GLFW_DISCONNECTED           0x00040002</span></div>\n<div class=\"line\"><a name=\"l01080\"></a><span class=\"lineno\"> 1080</span>&#160; </div>\n<div class=\"line\"><a name=\"l01087\"></a><span class=\"lineno\"> 1087</span>&#160;<span class=\"preprocessor\">#define GLFW_JOYSTICK_HAT_BUTTONS   0x00050001</span></div>\n<div class=\"line\"><a name=\"l01088\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__init.html#gab937983147a3158d45f88fad7129d9f2\"> 1088</a></span>&#160; </div>\n<div class=\"line\"><a name=\"l01092\"></a><span class=\"lineno\"> 1092</span>&#160;<span class=\"preprocessor\">#define GLFW_COCOA_CHDIR_RESOURCES  0x00051001</span></div>\n<div class=\"line\"><a name=\"l01093\"></a><span class=\"lineno\"><a class=\"line\" href=\"group__init.html#ga71e0b4ce2f2696a84a9b8c5e12dc70cf\"> 1093</a></span>&#160; </div>\n<div class=\"line\"><a name=\"l01097\"></a><span class=\"lineno\"> 1097</span>&#160;<span class=\"preprocessor\">#define GLFW_COCOA_MENUBAR          0x00051002</span></div>\n<div class=\"line\"><a name=\"l01098\"></a><span class=\"lineno\"> 1098</span>&#160; </div>\n<div class=\"line\"><a name=\"l01100\"></a><span class=\"lineno\"> 1100</span>&#160;<span class=\"preprocessor\">#define GLFW_DONT_CARE              -1</span></div>\n<div class=\"line\"><a name=\"l01101\"></a><span class=\"lineno\"> 1101</span>&#160; </div>\n<div class=\"line\"><a name=\"l01102\"></a><span class=\"lineno\"> 1102</span>&#160; </div>\n<div class=\"line\"><a name=\"l01103\"></a><span class=\"lineno\"> 1103</span>&#160;<span class=\"comment\">/*************************************************************************</span></div>\n<div class=\"line\"><a name=\"l01104\"></a><span class=\"lineno\"> 1104</span>&#160;<span class=\"comment\"> * GLFW API types</span></div>\n<div class=\"line\"><a name=\"l01105\"></a><span class=\"lineno\"> 1105</span>&#160;<span class=\"comment\"> *************************************************************************/</span></div>\n<div class=\"line\"><a name=\"l01106\"></a><span class=\"lineno\"> 1106</span>&#160; </div>\n<div class=\"line\"><a name=\"l01119\"></a><span class=\"lineno\"> 1119</span>&#160;<span class=\"keyword\">typedef</span> void (*<a class=\"code\" href=\"group__context.html#ga3d47c2d2fbe0be9c505d0e04e91a133c\">GLFWglproc</a>)(void);</div>\n<div class=\"line\"><a name=\"l01120\"></a><span class=\"lineno\"> 1120</span>&#160; </div>\n<div class=\"line\"><a name=\"l01133\"></a><span class=\"lineno\"> 1133</span>&#160;<span class=\"keyword\">typedef</span> void (*<a class=\"code\" href=\"group__vulkan.html#ga70c01918dc9d233a4fbe0681a43018af\">GLFWvkproc</a>)(void);</div>\n<div class=\"line\"><a name=\"l01134\"></a><span class=\"lineno\"> 1134</span>&#160; </div>\n<div class=\"line\"><a name=\"l01145\"></a><span class=\"lineno\"> 1145</span>&#160;<span class=\"keyword\">typedef</span> <span class=\"keyword\">struct </span><a class=\"code\" href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a> <a class=\"code\" href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a>;</div>\n<div class=\"line\"><a name=\"l01146\"></a><span class=\"lineno\"> 1146</span>&#160; </div>\n<div class=\"line\"><a name=\"l01157\"></a><span class=\"lineno\"> 1157</span>&#160;<span class=\"keyword\">typedef</span> <span class=\"keyword\">struct </span><a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> <a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>;</div>\n<div class=\"line\"><a name=\"l01158\"></a><span class=\"lineno\"> 1158</span>&#160; </div>\n<div class=\"line\"><a name=\"l01169\"></a><span class=\"lineno\"> 1169</span>&#160;<span class=\"keyword\">typedef</span> <span class=\"keyword\">struct </span><a class=\"code\" href=\"group__input.html#ga89261ae18c75e863aaf2656ecdd238f4\">GLFWcursor</a> <a class=\"code\" href=\"group__input.html#ga89261ae18c75e863aaf2656ecdd238f4\">GLFWcursor</a>;</div>\n<div class=\"line\"><a name=\"l01170\"></a><span class=\"lineno\"> 1170</span>&#160; </div>\n<div class=\"line\"><a name=\"l01193\"></a><span class=\"lineno\"> 1193</span>&#160;<span class=\"keyword\">typedef</span> void (* <a class=\"code\" href=\"group__init.html#ga6b8a2639706d5c409fc1287e8f55e928\">GLFWerrorfun</a>)(int,<span class=\"keyword\">const</span> <span class=\"keywordtype\">char</span>*);</div>\n<div class=\"line\"><a name=\"l01194\"></a><span class=\"lineno\"> 1194</span>&#160; </div>\n<div class=\"line\"><a name=\"l01216\"></a><span class=\"lineno\"> 1216</span>&#160;<span class=\"keyword\">typedef</span> void (* <a class=\"code\" href=\"group__window.html#gafd8db81fdb0e850549dc6bace5ed697a\">GLFWwindowposfun</a>)(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>*,int,int);</div>\n<div class=\"line\"><a name=\"l01217\"></a><span class=\"lineno\"> 1217</span>&#160; </div>\n<div class=\"line\"><a name=\"l01238\"></a><span class=\"lineno\"> 1238</span>&#160;<span class=\"keyword\">typedef</span> void (* <a class=\"code\" href=\"group__window.html#gae49ee6ebc03fa2da024b89943a331355\">GLFWwindowsizefun</a>)(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>*,int,int);</div>\n<div class=\"line\"><a name=\"l01239\"></a><span class=\"lineno\"> 1239</span>&#160; </div>\n<div class=\"line\"><a name=\"l01258\"></a><span class=\"lineno\"> 1258</span>&#160;<span class=\"keyword\">typedef</span> void (* <a class=\"code\" href=\"group__window.html#ga93e7c2555bd837f4ed8b20f76cada72e\">GLFWwindowclosefun</a>)(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>*);</div>\n<div class=\"line\"><a name=\"l01259\"></a><span class=\"lineno\"> 1259</span>&#160; </div>\n<div class=\"line\"><a name=\"l01278\"></a><span class=\"lineno\"> 1278</span>&#160;<span class=\"keyword\">typedef</span> void (* <a class=\"code\" href=\"group__window.html#ga7a56f9e0227e2cd9470d80d919032e08\">GLFWwindowrefreshfun</a>)(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>*);</div>\n<div class=\"line\"><a name=\"l01279\"></a><span class=\"lineno\"> 1279</span>&#160; </div>\n<div class=\"line\"><a name=\"l01299\"></a><span class=\"lineno\"> 1299</span>&#160;<span class=\"keyword\">typedef</span> void (* <a class=\"code\" href=\"group__window.html#ga58be2061828dd35080bb438405d3a7e2\">GLFWwindowfocusfun</a>)(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>*,int);</div>\n<div class=\"line\"><a name=\"l01300\"></a><span class=\"lineno\"> 1300</span>&#160; </div>\n<div class=\"line\"><a name=\"l01320\"></a><span class=\"lineno\"> 1320</span>&#160;<span class=\"keyword\">typedef</span> void (* <a class=\"code\" href=\"group__window.html#gad2d4e4c3d28b1242e742e8268b9528af\">GLFWwindowiconifyfun</a>)(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>*,int);</div>\n<div class=\"line\"><a name=\"l01321\"></a><span class=\"lineno\"> 1321</span>&#160; </div>\n<div class=\"line\"><a name=\"l01341\"></a><span class=\"lineno\"> 1341</span>&#160;<span class=\"keyword\">typedef</span> void (* <a class=\"code\" href=\"group__window.html#ga7269a3d1cb100c0081f95fc09afa4949\">GLFWwindowmaximizefun</a>)(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>*,int);</div>\n<div class=\"line\"><a name=\"l01342\"></a><span class=\"lineno\"> 1342</span>&#160; </div>\n<div class=\"line\"><a name=\"l01362\"></a><span class=\"lineno\"> 1362</span>&#160;<span class=\"keyword\">typedef</span> void (* <a class=\"code\" href=\"group__window.html#ga3e218ef9ff826129c55a7d5f6971a285\">GLFWframebuffersizefun</a>)(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>*,int,int);</div>\n<div class=\"line\"><a name=\"l01363\"></a><span class=\"lineno\"> 1363</span>&#160; </div>\n<div class=\"line\"><a name=\"l01383\"></a><span class=\"lineno\"> 1383</span>&#160;<span class=\"keyword\">typedef</span> void (* <a class=\"code\" href=\"group__window.html#ga1da46b65eafcc1a7ff0adb8f4a7b72fd\">GLFWwindowcontentscalefun</a>)(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>*,float,float);</div>\n<div class=\"line\"><a name=\"l01384\"></a><span class=\"lineno\"> 1384</span>&#160; </div>\n<div class=\"line\"><a name=\"l01409\"></a><span class=\"lineno\"> 1409</span>&#160;<span class=\"keyword\">typedef</span> void (* <a class=\"code\" href=\"group__input.html#ga39893a4a7e7c3239c98d29c9e084350c\">GLFWmousebuttonfun</a>)(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>*,int,int,int);</div>\n<div class=\"line\"><a name=\"l01410\"></a><span class=\"lineno\"> 1410</span>&#160; </div>\n<div class=\"line\"><a name=\"l01432\"></a><span class=\"lineno\"> 1432</span>&#160;<span class=\"keyword\">typedef</span> void (* <a class=\"code\" href=\"group__input.html#ga4cfad918fa836f09541e7b9acd36686c\">GLFWcursorposfun</a>)(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>*,double,double);</div>\n<div class=\"line\"><a name=\"l01433\"></a><span class=\"lineno\"> 1433</span>&#160; </div>\n<div class=\"line\"><a name=\"l01453\"></a><span class=\"lineno\"> 1453</span>&#160;<span class=\"keyword\">typedef</span> void (* <a class=\"code\" href=\"group__input.html#ga51ab436c41eeaed6db5a0c9403b1c840\">GLFWcursorenterfun</a>)(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>*,int);</div>\n<div class=\"line\"><a name=\"l01454\"></a><span class=\"lineno\"> 1454</span>&#160; </div>\n<div class=\"line\"><a name=\"l01474\"></a><span class=\"lineno\"> 1474</span>&#160;<span class=\"keyword\">typedef</span> void (* <a class=\"code\" href=\"group__input.html#ga4687e2199c60a18a8dd1da532e6d75c9\">GLFWscrollfun</a>)(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>*,double,double);</div>\n<div class=\"line\"><a name=\"l01475\"></a><span class=\"lineno\"> 1475</span>&#160; </div>\n<div class=\"line\"><a name=\"l01500\"></a><span class=\"lineno\"> 1500</span>&#160;<span class=\"keyword\">typedef</span> void (* <a class=\"code\" href=\"group__input.html#ga0192a232a41e4e82948217c8ba94fdfd\">GLFWkeyfun</a>)(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>*,int,int,int,int);</div>\n<div class=\"line\"><a name=\"l01501\"></a><span class=\"lineno\"> 1501</span>&#160; </div>\n<div class=\"line\"><a name=\"l01521\"></a><span class=\"lineno\"> 1521</span>&#160;<span class=\"keyword\">typedef</span> void (* <a class=\"code\" href=\"group__input.html#gabf24451c7ceb1952bc02b17a0d5c3e5f\">GLFWcharfun</a>)(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>*,<span class=\"keywordtype\">unsigned</span> int);</div>\n<div class=\"line\"><a name=\"l01522\"></a><span class=\"lineno\"> 1522</span>&#160; </div>\n<div class=\"line\"><a name=\"l01548\"></a><span class=\"lineno\"> 1548</span>&#160;<span class=\"keyword\">typedef</span> void (* <a class=\"code\" href=\"group__input.html#gae36fb6897d2b7df9b128900c8ce9c507\">GLFWcharmodsfun</a>)(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>*,<span class=\"keywordtype\">unsigned</span> int,int);</div>\n<div class=\"line\"><a name=\"l01549\"></a><span class=\"lineno\"> 1549</span>&#160; </div>\n<div class=\"line\"><a name=\"l01572\"></a><span class=\"lineno\"> 1572</span>&#160;<span class=\"keyword\">typedef</span> void (* <a class=\"code\" href=\"group__input.html#gafd0493dc32cd5ca5810e6148c0c026ea\">GLFWdropfun</a>)(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>*,int,<span class=\"keyword\">const</span> <span class=\"keywordtype\">char</span>*[]);</div>\n<div class=\"line\"><a name=\"l01573\"></a><span class=\"lineno\"> 1573</span>&#160; </div>\n<div class=\"line\"><a name=\"l01593\"></a><span class=\"lineno\"> 1593</span>&#160;<span class=\"keyword\">typedef</span> void (* <a class=\"code\" href=\"group__monitor.html#ga8a7ee579a66720f24d656526f3e44c63\">GLFWmonitorfun</a>)(<a class=\"code\" href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a>*,int);</div>\n<div class=\"line\"><a name=\"l01594\"></a><span class=\"lineno\"> 1594</span>&#160; </div>\n<div class=\"line\"><a name=\"l01614\"></a><span class=\"lineno\"> 1614</span>&#160;<span class=\"keyword\">typedef</span> void (* <a class=\"code\" href=\"group__input.html#gaa67aa597e974298c748bfe4fb17d406d\">GLFWjoystickfun</a>)(int,int);</div>\n<div class=\"line\"><a name=\"l01615\"></a><span class=\"lineno\"> 1615</span>&#160; </div>\n<div class=\"line\"><a name=\"l01629\"></a><span class=\"lineno\"> 1629</span>&#160;<span class=\"keyword\">typedef</span> <span class=\"keyword\">struct </span><a class=\"code\" href=\"structGLFWvidmode.html\">GLFWvidmode</a></div>\n<div class=\"line\"><a name=\"l01630\"></a><span class=\"lineno\"> 1630</span>&#160;{</div>\n<div class=\"line\"><a name=\"l01633\"></a><span class=\"lineno\"> 1633</span>&#160;    <span class=\"keywordtype\">int</span> <a class=\"code\" href=\"structGLFWvidmode.html#a698dcb200562051a7249cb6ae154c71d\">width</a>;</div>\n<div class=\"line\"><a name=\"l01636\"></a><span class=\"lineno\"> 1636</span>&#160;    <span class=\"keywordtype\">int</span> <a class=\"code\" href=\"structGLFWvidmode.html#ac65942a5f6981695517437a9d571d03c\">height</a>;</div>\n<div class=\"line\"><a name=\"l01639\"></a><span class=\"lineno\"> 1639</span>&#160;    <span class=\"keywordtype\">int</span> <a class=\"code\" href=\"structGLFWvidmode.html#a6066c4ecd251098700062d3b735dba1b\">redBits</a>;</div>\n<div class=\"line\"><a name=\"l01642\"></a><span class=\"lineno\"> 1642</span>&#160;    <span class=\"keywordtype\">int</span> <a class=\"code\" href=\"structGLFWvidmode.html#a292fdd281f3485fb3ff102a5bda43faa\">greenBits</a>;</div>\n<div class=\"line\"><a name=\"l01645\"></a><span class=\"lineno\"> 1645</span>&#160;    <span class=\"keywordtype\">int</span> <a class=\"code\" href=\"structGLFWvidmode.html#af310977f58d2e3b188175b6e3d314047\">blueBits</a>;</div>\n<div class=\"line\"><a name=\"l01648\"></a><span class=\"lineno\"> 1648</span>&#160;    <span class=\"keywordtype\">int</span> <a class=\"code\" href=\"structGLFWvidmode.html#a791bdd6c7697b09f7e9c97054bf05649\">refreshRate</a>;</div>\n<div class=\"line\"><a name=\"l01649\"></a><span class=\"lineno\"> 1649</span>&#160;} <a class=\"code\" href=\"group__monitor.html#gae48aadf4ea0967e6605c8f58fa5daccb\">GLFWvidmode</a>;</div>\n<div class=\"line\"><a name=\"l01650\"></a><span class=\"lineno\"> 1650</span>&#160; </div>\n<div class=\"line\"><a name=\"l01663\"></a><span class=\"lineno\"> 1663</span>&#160;<span class=\"keyword\">typedef</span> <span class=\"keyword\">struct </span><a class=\"code\" href=\"structGLFWgammaramp.html\">GLFWgammaramp</a></div>\n<div class=\"line\"><a name=\"l01664\"></a><span class=\"lineno\"> 1664</span>&#160;{</div>\n<div class=\"line\"><a name=\"l01667\"></a><span class=\"lineno\"> 1667</span>&#160;    <span class=\"keywordtype\">unsigned</span> <span class=\"keywordtype\">short</span>* <a class=\"code\" href=\"structGLFWgammaramp.html#a2cce5d968734b685623eef913e635138\">red</a>;</div>\n<div class=\"line\"><a name=\"l01670\"></a><span class=\"lineno\"> 1670</span>&#160;    <span class=\"keywordtype\">unsigned</span> <span class=\"keywordtype\">short</span>* <a class=\"code\" href=\"structGLFWgammaramp.html#affccc6f5df47820b6562d709da3a5a3a\">green</a>;</div>\n<div class=\"line\"><a name=\"l01673\"></a><span class=\"lineno\"> 1673</span>&#160;    <span class=\"keywordtype\">unsigned</span> <span class=\"keywordtype\">short</span>* <a class=\"code\" href=\"structGLFWgammaramp.html#acf0c836d0efe29c392fe8d1a1042744b\">blue</a>;</div>\n<div class=\"line\"><a name=\"l01676\"></a><span class=\"lineno\"> 1676</span>&#160;    <span class=\"keywordtype\">unsigned</span> <span class=\"keywordtype\">int</span> <a class=\"code\" href=\"structGLFWgammaramp.html#ad620e1cffbff9a32c51bca46301b59a5\">size</a>;</div>\n<div class=\"line\"><a name=\"l01677\"></a><span class=\"lineno\"> 1677</span>&#160;} <a class=\"code\" href=\"group__monitor.html#gaec0bd37af673be8813592849f13e02f0\">GLFWgammaramp</a>;</div>\n<div class=\"line\"><a name=\"l01678\"></a><span class=\"lineno\"> 1678</span>&#160; </div>\n<div class=\"line\"><a name=\"l01692\"></a><span class=\"lineno\"> 1692</span>&#160;<span class=\"keyword\">typedef</span> <span class=\"keyword\">struct </span><a class=\"code\" href=\"structGLFWimage.html\">GLFWimage</a></div>\n<div class=\"line\"><a name=\"l01693\"></a><span class=\"lineno\"> 1693</span>&#160;{</div>\n<div class=\"line\"><a name=\"l01696\"></a><span class=\"lineno\"> 1696</span>&#160;    <span class=\"keywordtype\">int</span> <a class=\"code\" href=\"structGLFWimage.html#af6a71cc999fe6d3aea31dd7e9687d835\">width</a>;</div>\n<div class=\"line\"><a name=\"l01699\"></a><span class=\"lineno\"> 1699</span>&#160;    <span class=\"keywordtype\">int</span> <a class=\"code\" href=\"structGLFWimage.html#a0b7d95368f0c80d5e5c9875057c7dbec\">height</a>;</div>\n<div class=\"line\"><a name=\"l01702\"></a><span class=\"lineno\"> 1702</span>&#160;    <span class=\"keywordtype\">unsigned</span> <span class=\"keywordtype\">char</span>* <a class=\"code\" href=\"structGLFWimage.html#a0c532a5c2bb715555279b7817daba0fb\">pixels</a>;</div>\n<div class=\"line\"><a name=\"l01703\"></a><span class=\"lineno\"> 1703</span>&#160;} <a class=\"code\" href=\"group__window.html#gac81c32f4437de7b3aa58ab62c3d9e5b1\">GLFWimage</a>;</div>\n<div class=\"line\"><a name=\"l01704\"></a><span class=\"lineno\"> 1704</span>&#160; </div>\n<div class=\"line\"><a name=\"l01716\"></a><span class=\"lineno\"><a class=\"line\" href=\"structGLFWgamepadstate.html#a27e9896b51c65df15fba2c7139bfdb9a\"> 1716</a></span>&#160;<span class=\"keyword\">typedef</span> <span class=\"keyword\">struct </span><a class=\"code\" href=\"structGLFWgamepadstate.html\">GLFWgamepadstate</a></div>\n<div class=\"line\"><a name=\"l01717\"></a><span class=\"lineno\"> 1717</span>&#160;{</div>\n<div class=\"line\"><a name=\"l01721\"></a><span class=\"lineno\"> 1721</span>&#160;    <span class=\"keywordtype\">unsigned</span> <span class=\"keywordtype\">char</span> <a class=\"code\" href=\"structGLFWgamepadstate.html#a27e9896b51c65df15fba2c7139bfdb9a\">buttons</a>[15];</div>\n<div class=\"line\"><a name=\"l01725\"></a><span class=\"lineno\"> 1725</span>&#160;    <span class=\"keywordtype\">float</span> <a class=\"code\" href=\"structGLFWgamepadstate.html#a8b2c8939b1d31458de5359998375c189\">axes</a>[6];</div>\n<div class=\"line\"><a name=\"l01726\"></a><span class=\"lineno\"> 1726</span>&#160;} <a class=\"code\" href=\"group__input.html#ga0b86867abb735af3b959f61c44b1d029\">GLFWgamepadstate</a>;</div>\n<div class=\"line\"><a name=\"l01727\"></a><span class=\"lineno\"> 1727</span>&#160; </div>\n<div class=\"line\"><a name=\"l01728\"></a><span class=\"lineno\"> 1728</span>&#160; </div>\n<div class=\"line\"><a name=\"l01729\"></a><span class=\"lineno\"> 1729</span>&#160;<span class=\"comment\">/*************************************************************************</span></div>\n<div class=\"line\"><a name=\"l01730\"></a><span class=\"lineno\"> 1730</span>&#160;<span class=\"comment\"> * GLFW API functions</span></div>\n<div class=\"line\"><a name=\"l01731\"></a><span class=\"lineno\"> 1731</span>&#160;<span class=\"comment\"> *************************************************************************/</span></div>\n<div class=\"line\"><a name=\"l01732\"></a><span class=\"lineno\"> 1732</span>&#160; </div>\n<div class=\"line\"><a name=\"l01765\"></a><span class=\"lineno\"> 1765</span>&#160;GLFWAPI <span class=\"keywordtype\">int</span> <a class=\"code\" href=\"group__init.html#ga317aac130a235ab08c6db0834907d85e\">glfwInit</a>(<span class=\"keywordtype\">void</span>);</div>\n<div class=\"line\"><a name=\"l01766\"></a><span class=\"lineno\"> 1766</span>&#160; </div>\n<div class=\"line\"><a name=\"l01797\"></a><span class=\"lineno\"> 1797</span>&#160;GLFWAPI <span class=\"keywordtype\">void</span> <a class=\"code\" href=\"group__init.html#gaaae48c0a18607ea4a4ba951d939f0901\">glfwTerminate</a>(<span class=\"keywordtype\">void</span>);</div>\n<div class=\"line\"><a name=\"l01798\"></a><span class=\"lineno\"> 1798</span>&#160; </div>\n<div class=\"line\"><a name=\"l01829\"></a><span class=\"lineno\"> 1829</span>&#160;GLFWAPI <span class=\"keywordtype\">void</span> <a class=\"code\" href=\"group__init.html#ga110fd1d3f0412822b4f1908c026f724a\">glfwInitHint</a>(<span class=\"keywordtype\">int</span> hint, <span class=\"keywordtype\">int</span> value);</div>\n<div class=\"line\"><a name=\"l01830\"></a><span class=\"lineno\"> 1830</span>&#160; </div>\n<div class=\"line\"><a name=\"l01856\"></a><span class=\"lineno\"> 1856</span>&#160;GLFWAPI <span class=\"keywordtype\">void</span> <a class=\"code\" href=\"group__init.html#ga9f8ffaacf3c269cc48eafbf8b9b71197\">glfwGetVersion</a>(<span class=\"keywordtype\">int</span>* major, <span class=\"keywordtype\">int</span>* minor, <span class=\"keywordtype\">int</span>* rev);</div>\n<div class=\"line\"><a name=\"l01857\"></a><span class=\"lineno\"> 1857</span>&#160; </div>\n<div class=\"line\"><a name=\"l01887\"></a><span class=\"lineno\"> 1887</span>&#160;GLFWAPI <span class=\"keyword\">const</span> <span class=\"keywordtype\">char</span>* <a class=\"code\" href=\"group__init.html#ga23d47dc013fce2bf58036da66079a657\">glfwGetVersionString</a>(<span class=\"keywordtype\">void</span>);</div>\n<div class=\"line\"><a name=\"l01888\"></a><span class=\"lineno\"> 1888</span>&#160; </div>\n<div class=\"line\"><a name=\"l01918\"></a><span class=\"lineno\"> 1918</span>&#160;GLFWAPI <span class=\"keywordtype\">int</span> <a class=\"code\" href=\"group__init.html#ga944986b4ec0b928d488141f92982aa18\">glfwGetError</a>(<span class=\"keyword\">const</span> <span class=\"keywordtype\">char</span>** description);</div>\n<div class=\"line\"><a name=\"l01919\"></a><span class=\"lineno\"> 1919</span>&#160; </div>\n<div class=\"line\"><a name=\"l01964\"></a><span class=\"lineno\"> 1964</span>&#160;GLFWAPI <a class=\"code\" href=\"group__init.html#ga6b8a2639706d5c409fc1287e8f55e928\">GLFWerrorfun</a> <a class=\"code\" href=\"group__init.html#gaff45816610d53f0b83656092a4034f40\">glfwSetErrorCallback</a>(<a class=\"code\" href=\"group__init.html#ga6b8a2639706d5c409fc1287e8f55e928\">GLFWerrorfun</a> callback);</div>\n<div class=\"line\"><a name=\"l01965\"></a><span class=\"lineno\"> 1965</span>&#160; </div>\n<div class=\"line\"><a name=\"l01993\"></a><span class=\"lineno\"> 1993</span>&#160;GLFWAPI <a class=\"code\" href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a>** <a class=\"code\" href=\"group__monitor.html#ga3fba51c8bd36491d4712aa5bd074a537\">glfwGetMonitors</a>(<span class=\"keywordtype\">int</span>* count);</div>\n<div class=\"line\"><a name=\"l01994\"></a><span class=\"lineno\"> 1994</span>&#160; </div>\n<div class=\"line\"><a name=\"l02017\"></a><span class=\"lineno\"> 2017</span>&#160;GLFWAPI <a class=\"code\" href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a>* <a class=\"code\" href=\"group__monitor.html#ga721867d84c6d18d6790d64d2847ca0b1\">glfwGetPrimaryMonitor</a>(<span class=\"keywordtype\">void</span>);</div>\n<div class=\"line\"><a name=\"l02018\"></a><span class=\"lineno\"> 2018</span>&#160; </div>\n<div class=\"line\"><a name=\"l02042\"></a><span class=\"lineno\"> 2042</span>&#160;GLFWAPI <span class=\"keywordtype\">void</span> <a class=\"code\" href=\"group__monitor.html#ga102f54e7acc9149edbcf0997152df8c9\">glfwGetMonitorPos</a>(<a class=\"code\" href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a>* monitor, <span class=\"keywordtype\">int</span>* xpos, <span class=\"keywordtype\">int</span>* ypos);</div>\n<div class=\"line\"><a name=\"l02043\"></a><span class=\"lineno\"> 2043</span>&#160; </div>\n<div class=\"line\"><a name=\"l02073\"></a><span class=\"lineno\"> 2073</span>&#160;GLFWAPI <span class=\"keywordtype\">void</span> <a class=\"code\" href=\"group__monitor.html#ga7387a3bdb64bfe8ebf2b9e54f5b6c9d0\">glfwGetMonitorWorkarea</a>(<a class=\"code\" href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a>* monitor, <span class=\"keywordtype\">int</span>* xpos, <span class=\"keywordtype\">int</span>* ypos, <span class=\"keywordtype\">int</span>* width, <span class=\"keywordtype\">int</span>* height);</div>\n<div class=\"line\"><a name=\"l02074\"></a><span class=\"lineno\"> 2074</span>&#160; </div>\n<div class=\"line\"><a name=\"l02107\"></a><span class=\"lineno\"> 2107</span>&#160;GLFWAPI <span class=\"keywordtype\">void</span> <a class=\"code\" href=\"group__monitor.html#ga7d8bffc6c55539286a6bd20d32a8d7ea\">glfwGetMonitorPhysicalSize</a>(<a class=\"code\" href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a>* monitor, <span class=\"keywordtype\">int</span>* widthMM, <span class=\"keywordtype\">int</span>* heightMM);</div>\n<div class=\"line\"><a name=\"l02108\"></a><span class=\"lineno\"> 2108</span>&#160; </div>\n<div class=\"line\"><a name=\"l02139\"></a><span class=\"lineno\"> 2139</span>&#160;GLFWAPI <span class=\"keywordtype\">void</span> <a class=\"code\" href=\"group__monitor.html#gad3152e84465fa620b601265ebfcdb21b\">glfwGetMonitorContentScale</a>(<a class=\"code\" href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a>* monitor, <span class=\"keywordtype\">float</span>* xscale, <span class=\"keywordtype\">float</span>* yscale);</div>\n<div class=\"line\"><a name=\"l02140\"></a><span class=\"lineno\"> 2140</span>&#160; </div>\n<div class=\"line\"><a name=\"l02165\"></a><span class=\"lineno\"> 2165</span>&#160;GLFWAPI <span class=\"keyword\">const</span> <span class=\"keywordtype\">char</span>* <a class=\"code\" href=\"group__monitor.html#ga79a34ee22ff080ca954a9663e4679daf\">glfwGetMonitorName</a>(<a class=\"code\" href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a>* monitor);</div>\n<div class=\"line\"><a name=\"l02166\"></a><span class=\"lineno\"> 2166</span>&#160; </div>\n<div class=\"line\"><a name=\"l02191\"></a><span class=\"lineno\"> 2191</span>&#160;GLFWAPI <span class=\"keywordtype\">void</span> <a class=\"code\" href=\"group__monitor.html#ga702750e24313a686d3637297b6e85fda\">glfwSetMonitorUserPointer</a>(<a class=\"code\" href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a>* monitor, <span class=\"keywordtype\">void</span>* pointer);</div>\n<div class=\"line\"><a name=\"l02192\"></a><span class=\"lineno\"> 2192</span>&#160; </div>\n<div class=\"line\"><a name=\"l02215\"></a><span class=\"lineno\"> 2215</span>&#160;GLFWAPI <span class=\"keywordtype\">void</span>* <a class=\"code\" href=\"group__monitor.html#gac2d4209016b049222877f620010ed0d8\">glfwGetMonitorUserPointer</a>(<a class=\"code\" href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a>* monitor);</div>\n<div class=\"line\"><a name=\"l02216\"></a><span class=\"lineno\"> 2216</span>&#160; </div>\n<div class=\"line\"><a name=\"l02245\"></a><span class=\"lineno\"> 2245</span>&#160;GLFWAPI <a class=\"code\" href=\"group__monitor.html#ga8a7ee579a66720f24d656526f3e44c63\">GLFWmonitorfun</a> <a class=\"code\" href=\"group__monitor.html#gab39df645587c8518192aa746c2fb06c3\">glfwSetMonitorCallback</a>(<a class=\"code\" href=\"group__monitor.html#ga8a7ee579a66720f24d656526f3e44c63\">GLFWmonitorfun</a> callback);</div>\n<div class=\"line\"><a name=\"l02246\"></a><span class=\"lineno\"> 2246</span>&#160; </div>\n<div class=\"line\"><a name=\"l02278\"></a><span class=\"lineno\"> 2278</span>&#160;GLFWAPI <span class=\"keyword\">const</span> <a class=\"code\" href=\"structGLFWvidmode.html\">GLFWvidmode</a>* <a class=\"code\" href=\"group__monitor.html#ga820b0ce9a5237d645ea7cbb4bd383458\">glfwGetVideoModes</a>(<a class=\"code\" href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a>* monitor, <span class=\"keywordtype\">int</span>* count);</div>\n<div class=\"line\"><a name=\"l02279\"></a><span class=\"lineno\"> 2279</span>&#160; </div>\n<div class=\"line\"><a name=\"l02306\"></a><span class=\"lineno\"> 2306</span>&#160;GLFWAPI <span class=\"keyword\">const</span> <a class=\"code\" href=\"structGLFWvidmode.html\">GLFWvidmode</a>* <a class=\"code\" href=\"group__monitor.html#gafc1bb972a921ad5b3bd5d63a95fc2d52\">glfwGetVideoMode</a>(<a class=\"code\" href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a>* monitor);</div>\n<div class=\"line\"><a name=\"l02307\"></a><span class=\"lineno\"> 2307</span>&#160; </div>\n<div class=\"line\"><a name=\"l02339\"></a><span class=\"lineno\"> 2339</span>&#160;GLFWAPI <span class=\"keywordtype\">void</span> <a class=\"code\" href=\"group__monitor.html#ga6ac582625c990220785ddd34efa3169a\">glfwSetGamma</a>(<a class=\"code\" href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a>* monitor, <span class=\"keywordtype\">float</span> gamma);</div>\n<div class=\"line\"><a name=\"l02340\"></a><span class=\"lineno\"> 2340</span>&#160; </div>\n<div class=\"line\"><a name=\"l02369\"></a><span class=\"lineno\"> 2369</span>&#160;GLFWAPI <span class=\"keyword\">const</span> <a class=\"code\" href=\"structGLFWgammaramp.html\">GLFWgammaramp</a>* <a class=\"code\" href=\"group__monitor.html#gab7c41deb2219bde3e1eb756ddaa9ec80\">glfwGetGammaRamp</a>(<a class=\"code\" href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a>* monitor);</div>\n<div class=\"line\"><a name=\"l02370\"></a><span class=\"lineno\"> 2370</span>&#160; </div>\n<div class=\"line\"><a name=\"l02410\"></a><span class=\"lineno\"> 2410</span>&#160;GLFWAPI <span class=\"keywordtype\">void</span> <a class=\"code\" href=\"group__monitor.html#ga583f0ffd0d29613d8cd172b996bbf0dd\">glfwSetGammaRamp</a>(<a class=\"code\" href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a>* monitor, <span class=\"keyword\">const</span> <a class=\"code\" href=\"structGLFWgammaramp.html\">GLFWgammaramp</a>* ramp);</div>\n<div class=\"line\"><a name=\"l02411\"></a><span class=\"lineno\"> 2411</span>&#160; </div>\n<div class=\"line\"><a name=\"l02429\"></a><span class=\"lineno\"> 2429</span>&#160;GLFWAPI <span class=\"keywordtype\">void</span> <a class=\"code\" href=\"group__window.html#gaa77c4898dfb83344a6b4f76aa16b9a4a\">glfwDefaultWindowHints</a>(<span class=\"keywordtype\">void</span>);</div>\n<div class=\"line\"><a name=\"l02430\"></a><span class=\"lineno\"> 2430</span>&#160; </div>\n<div class=\"line\"><a name=\"l02464\"></a><span class=\"lineno\"> 2464</span>&#160;GLFWAPI <span class=\"keywordtype\">void</span> <a class=\"code\" href=\"group__window.html#ga7d9c8c62384b1e2821c4dc48952d2033\">glfwWindowHint</a>(<span class=\"keywordtype\">int</span> hint, <span class=\"keywordtype\">int</span> value);</div>\n<div class=\"line\"><a name=\"l02465\"></a><span class=\"lineno\"> 2465</span>&#160; </div>\n<div class=\"line\"><a name=\"l02502\"></a><span class=\"lineno\"> 2502</span>&#160;GLFWAPI <span class=\"keywordtype\">void</span> <a class=\"code\" href=\"group__window.html#ga8cb2782861c9d997bcf2dea97f363e5f\">glfwWindowHintString</a>(<span class=\"keywordtype\">int</span> hint, <span class=\"keyword\">const</span> <span class=\"keywordtype\">char</span>* value);</div>\n<div class=\"line\"><a name=\"l02503\"></a><span class=\"lineno\"> 2503</span>&#160; </div>\n<div class=\"line\"><a name=\"l02656\"></a><span class=\"lineno\"> 2656</span>&#160;GLFWAPI <a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* <a class=\"code\" href=\"group__window.html#ga5c336fddf2cbb5b92f65f10fb6043344\">glfwCreateWindow</a>(<span class=\"keywordtype\">int</span> width, <span class=\"keywordtype\">int</span> height, <span class=\"keyword\">const</span> <span class=\"keywordtype\">char</span>* title, <a class=\"code\" href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a>* monitor, <a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* share);</div>\n<div class=\"line\"><a name=\"l02657\"></a><span class=\"lineno\"> 2657</span>&#160; </div>\n<div class=\"line\"><a name=\"l02685\"></a><span class=\"lineno\"> 2685</span>&#160;GLFWAPI <span class=\"keywordtype\">void</span> <a class=\"code\" href=\"group__window.html#gacdf43e51376051d2c091662e9fe3d7b2\">glfwDestroyWindow</a>(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window);</div>\n<div class=\"line\"><a name=\"l02686\"></a><span class=\"lineno\"> 2686</span>&#160; </div>\n<div class=\"line\"><a name=\"l02705\"></a><span class=\"lineno\"> 2705</span>&#160;GLFWAPI <span class=\"keywordtype\">int</span> <a class=\"code\" href=\"group__window.html#ga24e02fbfefbb81fc45320989f8140ab5\">glfwWindowShouldClose</a>(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window);</div>\n<div class=\"line\"><a name=\"l02706\"></a><span class=\"lineno\"> 2706</span>&#160; </div>\n<div class=\"line\"><a name=\"l02727\"></a><span class=\"lineno\"> 2727</span>&#160;GLFWAPI <span class=\"keywordtype\">void</span> <a class=\"code\" href=\"group__window.html#ga49c449dde2a6f87d996f4daaa09d6708\">glfwSetWindowShouldClose</a>(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window, <span class=\"keywordtype\">int</span> value);</div>\n<div class=\"line\"><a name=\"l02728\"></a><span class=\"lineno\"> 2728</span>&#160; </div>\n<div class=\"line\"><a name=\"l02752\"></a><span class=\"lineno\"> 2752</span>&#160;GLFWAPI <span class=\"keywordtype\">void</span> <a class=\"code\" href=\"group__window.html#ga5d877f09e968cef7a360b513306f17ff\">glfwSetWindowTitle</a>(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window, <span class=\"keyword\">const</span> <span class=\"keywordtype\">char</span>* title);</div>\n<div class=\"line\"><a name=\"l02753\"></a><span class=\"lineno\"> 2753</span>&#160; </div>\n<div class=\"line\"><a name=\"l02799\"></a><span class=\"lineno\"> 2799</span>&#160;GLFWAPI <span class=\"keywordtype\">void</span> <a class=\"code\" href=\"group__window.html#gadd7ccd39fe7a7d1f0904666ae5932dc5\">glfwSetWindowIcon</a>(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window, <span class=\"keywordtype\">int</span> count, <span class=\"keyword\">const</span> <a class=\"code\" href=\"structGLFWimage.html\">GLFWimage</a>* images);</div>\n<div class=\"line\"><a name=\"l02800\"></a><span class=\"lineno\"> 2800</span>&#160; </div>\n<div class=\"line\"><a name=\"l02831\"></a><span class=\"lineno\"> 2831</span>&#160;GLFWAPI <span class=\"keywordtype\">void</span> <a class=\"code\" href=\"group__window.html#ga73cb526c000876fd8ddf571570fdb634\">glfwGetWindowPos</a>(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window, <span class=\"keywordtype\">int</span>* xpos, <span class=\"keywordtype\">int</span>* ypos);</div>\n<div class=\"line\"><a name=\"l02832\"></a><span class=\"lineno\"> 2832</span>&#160; </div>\n<div class=\"line\"><a name=\"l02866\"></a><span class=\"lineno\"> 2866</span>&#160;GLFWAPI <span class=\"keywordtype\">void</span> <a class=\"code\" href=\"group__window.html#ga1abb6d690e8c88e0c8cd1751356dbca8\">glfwSetWindowPos</a>(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window, <span class=\"keywordtype\">int</span> xpos, <span class=\"keywordtype\">int</span> ypos);</div>\n<div class=\"line\"><a name=\"l02867\"></a><span class=\"lineno\"> 2867</span>&#160; </div>\n<div class=\"line\"><a name=\"l02896\"></a><span class=\"lineno\"> 2896</span>&#160;GLFWAPI <span class=\"keywordtype\">void</span> <a class=\"code\" href=\"group__window.html#gaeea7cbc03373a41fb51cfbf9f2a5d4c6\">glfwGetWindowSize</a>(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window, <span class=\"keywordtype\">int</span>* width, <span class=\"keywordtype\">int</span>* height);</div>\n<div class=\"line\"><a name=\"l02897\"></a><span class=\"lineno\"> 2897</span>&#160; </div>\n<div class=\"line\"><a name=\"l02939\"></a><span class=\"lineno\"> 2939</span>&#160;GLFWAPI <span class=\"keywordtype\">void</span> <a class=\"code\" href=\"group__window.html#gac314fa6cec7d2d307be9963e2709cc90\">glfwSetWindowSizeLimits</a>(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window, <span class=\"keywordtype\">int</span> minwidth, <span class=\"keywordtype\">int</span> minheight, <span class=\"keywordtype\">int</span> maxwidth, <span class=\"keywordtype\">int</span> maxheight);</div>\n<div class=\"line\"><a name=\"l02940\"></a><span class=\"lineno\"> 2940</span>&#160; </div>\n<div class=\"line\"><a name=\"l02982\"></a><span class=\"lineno\"> 2982</span>&#160;GLFWAPI <span class=\"keywordtype\">void</span> <a class=\"code\" href=\"group__window.html#ga72ac8cb1ee2e312a878b55153d81b937\">glfwSetWindowAspectRatio</a>(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window, <span class=\"keywordtype\">int</span> numer, <span class=\"keywordtype\">int</span> denom);</div>\n<div class=\"line\"><a name=\"l02983\"></a><span class=\"lineno\"> 2983</span>&#160; </div>\n<div class=\"line\"><a name=\"l03023\"></a><span class=\"lineno\"> 3023</span>&#160;GLFWAPI <span class=\"keywordtype\">void</span> <a class=\"code\" href=\"group__window.html#ga371911f12c74c504dd8d47d832d095cb\">glfwSetWindowSize</a>(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window, <span class=\"keywordtype\">int</span> width, <span class=\"keywordtype\">int</span> height);</div>\n<div class=\"line\"><a name=\"l03024\"></a><span class=\"lineno\"> 3024</span>&#160; </div>\n<div class=\"line\"><a name=\"l03052\"></a><span class=\"lineno\"> 3052</span>&#160;GLFWAPI <span class=\"keywordtype\">void</span> <a class=\"code\" href=\"group__window.html#ga0e2637a4161afb283f5300c7f94785c9\">glfwGetFramebufferSize</a>(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window, <span class=\"keywordtype\">int</span>* width, <span class=\"keywordtype\">int</span>* height);</div>\n<div class=\"line\"><a name=\"l03053\"></a><span class=\"lineno\"> 3053</span>&#160; </div>\n<div class=\"line\"><a name=\"l03089\"></a><span class=\"lineno\"> 3089</span>&#160;GLFWAPI <span class=\"keywordtype\">void</span> <a class=\"code\" href=\"group__window.html#ga1a9fd382058c53101b21cf211898f1f1\">glfwGetWindowFrameSize</a>(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window, <span class=\"keywordtype\">int</span>* left, <span class=\"keywordtype\">int</span>* top, <span class=\"keywordtype\">int</span>* right, <span class=\"keywordtype\">int</span>* bottom);</div>\n<div class=\"line\"><a name=\"l03090\"></a><span class=\"lineno\"> 3090</span>&#160; </div>\n<div class=\"line\"><a name=\"l03122\"></a><span class=\"lineno\"> 3122</span>&#160;GLFWAPI <span class=\"keywordtype\">void</span> <a class=\"code\" href=\"group__window.html#gaf5d31de9c19c4f994facea64d2b3106c\">glfwGetWindowContentScale</a>(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window, <span class=\"keywordtype\">float</span>* xscale, <span class=\"keywordtype\">float</span>* yscale);</div>\n<div class=\"line\"><a name=\"l03123\"></a><span class=\"lineno\"> 3123</span>&#160; </div>\n<div class=\"line\"><a name=\"l03149\"></a><span class=\"lineno\"> 3149</span>&#160;GLFWAPI <span class=\"keywordtype\">float</span> <a class=\"code\" href=\"group__window.html#gad09f0bd7a6307c4533b7061828480a84\">glfwGetWindowOpacity</a>(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window);</div>\n<div class=\"line\"><a name=\"l03150\"></a><span class=\"lineno\"> 3150</span>&#160; </div>\n<div class=\"line\"><a name=\"l03178\"></a><span class=\"lineno\"> 3178</span>&#160;GLFWAPI <span class=\"keywordtype\">void</span> <a class=\"code\" href=\"group__window.html#gac31caeb3d1088831b13d2c8a156802e9\">glfwSetWindowOpacity</a>(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window, <span class=\"keywordtype\">float</span> opacity);</div>\n<div class=\"line\"><a name=\"l03179\"></a><span class=\"lineno\"> 3179</span>&#160; </div>\n<div class=\"line\"><a name=\"l03209\"></a><span class=\"lineno\"> 3209</span>&#160;GLFWAPI <span class=\"keywordtype\">void</span> <a class=\"code\" href=\"group__window.html#ga1bb559c0ebaad63c5c05ad2a066779c4\">glfwIconifyWindow</a>(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window);</div>\n<div class=\"line\"><a name=\"l03210\"></a><span class=\"lineno\"> 3210</span>&#160; </div>\n<div class=\"line\"><a name=\"l03236\"></a><span class=\"lineno\"> 3236</span>&#160;GLFWAPI <span class=\"keywordtype\">void</span> <a class=\"code\" href=\"group__window.html#ga52527a5904b47d802b6b4bb519cdebc7\">glfwRestoreWindow</a>(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window);</div>\n<div class=\"line\"><a name=\"l03237\"></a><span class=\"lineno\"> 3237</span>&#160; </div>\n<div class=\"line\"><a name=\"l03261\"></a><span class=\"lineno\"> 3261</span>&#160;GLFWAPI <span class=\"keywordtype\">void</span> <a class=\"code\" href=\"group__window.html#ga3f541387449d911274324ae7f17ec56b\">glfwMaximizeWindow</a>(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window);</div>\n<div class=\"line\"><a name=\"l03262\"></a><span class=\"lineno\"> 3262</span>&#160; </div>\n<div class=\"line\"><a name=\"l03288\"></a><span class=\"lineno\"> 3288</span>&#160;GLFWAPI <span class=\"keywordtype\">void</span> <a class=\"code\" href=\"group__window.html#ga61be47917b72536a148300f46494fc66\">glfwShowWindow</a>(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window);</div>\n<div class=\"line\"><a name=\"l03289\"></a><span class=\"lineno\"> 3289</span>&#160; </div>\n<div class=\"line\"><a name=\"l03310\"></a><span class=\"lineno\"> 3310</span>&#160;GLFWAPI <span class=\"keywordtype\">void</span> <a class=\"code\" href=\"group__window.html#ga49401f82a1ba5f15db5590728314d47c\">glfwHideWindow</a>(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window);</div>\n<div class=\"line\"><a name=\"l03311\"></a><span class=\"lineno\"> 3311</span>&#160; </div>\n<div class=\"line\"><a name=\"l03349\"></a><span class=\"lineno\"> 3349</span>&#160;GLFWAPI <span class=\"keywordtype\">void</span> <a class=\"code\" href=\"group__window.html#ga873780357abd3f3a081d71a40aae45a1\">glfwFocusWindow</a>(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window);</div>\n<div class=\"line\"><a name=\"l03350\"></a><span class=\"lineno\"> 3350</span>&#160; </div>\n<div class=\"line\"><a name=\"l03376\"></a><span class=\"lineno\"> 3376</span>&#160;GLFWAPI <span class=\"keywordtype\">void</span> <a class=\"code\" href=\"group__window.html#ga2f8d59323fc4692c1d54ba08c863a703\">glfwRequestWindowAttention</a>(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window);</div>\n<div class=\"line\"><a name=\"l03377\"></a><span class=\"lineno\"> 3377</span>&#160; </div>\n<div class=\"line\"><a name=\"l03398\"></a><span class=\"lineno\"> 3398</span>&#160;GLFWAPI <a class=\"code\" href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a>* <a class=\"code\" href=\"group__window.html#gaeac25e64789974ccbe0811766bd91a16\">glfwGetWindowMonitor</a>(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window);</div>\n<div class=\"line\"><a name=\"l03399\"></a><span class=\"lineno\"> 3399</span>&#160; </div>\n<div class=\"line\"><a name=\"l03457\"></a><span class=\"lineno\"> 3457</span>&#160;GLFWAPI <span class=\"keywordtype\">void</span> <a class=\"code\" href=\"group__window.html#ga81c76c418af80a1cce7055bccb0ae0a7\">glfwSetWindowMonitor</a>(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window, <a class=\"code\" href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a>* monitor, <span class=\"keywordtype\">int</span> xpos, <span class=\"keywordtype\">int</span> ypos, <span class=\"keywordtype\">int</span> width, <span class=\"keywordtype\">int</span> height, <span class=\"keywordtype\">int</span> refreshRate);</div>\n<div class=\"line\"><a name=\"l03458\"></a><span class=\"lineno\"> 3458</span>&#160; </div>\n<div class=\"line\"><a name=\"l03491\"></a><span class=\"lineno\"> 3491</span>&#160;GLFWAPI <span class=\"keywordtype\">int</span> <a class=\"code\" href=\"group__window.html#gacccb29947ea4b16860ebef42c2cb9337\">glfwGetWindowAttrib</a>(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window, <span class=\"keywordtype\">int</span> attrib);</div>\n<div class=\"line\"><a name=\"l03492\"></a><span class=\"lineno\"> 3492</span>&#160; </div>\n<div class=\"line\"><a name=\"l03528\"></a><span class=\"lineno\"> 3528</span>&#160;GLFWAPI <span class=\"keywordtype\">void</span> <a class=\"code\" href=\"group__window.html#gace2afda29b4116ec012e410a6819033e\">glfwSetWindowAttrib</a>(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window, <span class=\"keywordtype\">int</span> attrib, <span class=\"keywordtype\">int</span> value);</div>\n<div class=\"line\"><a name=\"l03529\"></a><span class=\"lineno\"> 3529</span>&#160; </div>\n<div class=\"line\"><a name=\"l03551\"></a><span class=\"lineno\"> 3551</span>&#160;GLFWAPI <span class=\"keywordtype\">void</span> <a class=\"code\" href=\"group__window.html#ga3d2fc6026e690ab31a13f78bc9fd3651\">glfwSetWindowUserPointer</a>(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window, <span class=\"keywordtype\">void</span>* pointer);</div>\n<div class=\"line\"><a name=\"l03552\"></a><span class=\"lineno\"> 3552</span>&#160; </div>\n<div class=\"line\"><a name=\"l03572\"></a><span class=\"lineno\"> 3572</span>&#160;GLFWAPI <span class=\"keywordtype\">void</span>* <a class=\"code\" href=\"group__window.html#ga17807ce0f45ac3f8bb50d6dcc59a4e06\">glfwGetWindowUserPointer</a>(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window);</div>\n<div class=\"line\"><a name=\"l03573\"></a><span class=\"lineno\"> 3573</span>&#160; </div>\n<div class=\"line\"><a name=\"l03607\"></a><span class=\"lineno\"> 3607</span>&#160;GLFWAPI <a class=\"code\" href=\"group__window.html#gafd8db81fdb0e850549dc6bace5ed697a\">GLFWwindowposfun</a> <a class=\"code\" href=\"group__window.html#ga08bdfbba88934f9c4f92fd757979ac74\">glfwSetWindowPosCallback</a>(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window, <a class=\"code\" href=\"group__window.html#gafd8db81fdb0e850549dc6bace5ed697a\">GLFWwindowposfun</a> callback);</div>\n<div class=\"line\"><a name=\"l03608\"></a><span class=\"lineno\"> 3608</span>&#160; </div>\n<div class=\"line\"><a name=\"l03639\"></a><span class=\"lineno\"> 3639</span>&#160;GLFWAPI <a class=\"code\" href=\"group__window.html#gae49ee6ebc03fa2da024b89943a331355\">GLFWwindowsizefun</a> <a class=\"code\" href=\"group__window.html#gad91b8b047a0c4c6033c38853864c34f8\">glfwSetWindowSizeCallback</a>(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window, <a class=\"code\" href=\"group__window.html#gae49ee6ebc03fa2da024b89943a331355\">GLFWwindowsizefun</a> callback);</div>\n<div class=\"line\"><a name=\"l03640\"></a><span class=\"lineno\"> 3640</span>&#160; </div>\n<div class=\"line\"><a name=\"l03679\"></a><span class=\"lineno\"> 3679</span>&#160;GLFWAPI <a class=\"code\" href=\"group__window.html#ga93e7c2555bd837f4ed8b20f76cada72e\">GLFWwindowclosefun</a> <a class=\"code\" href=\"group__window.html#gada646d775a7776a95ac000cfc1885331\">glfwSetWindowCloseCallback</a>(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window, <a class=\"code\" href=\"group__window.html#ga93e7c2555bd837f4ed8b20f76cada72e\">GLFWwindowclosefun</a> callback);</div>\n<div class=\"line\"><a name=\"l03680\"></a><span class=\"lineno\"> 3680</span>&#160; </div>\n<div class=\"line\"><a name=\"l03715\"></a><span class=\"lineno\"> 3715</span>&#160;GLFWAPI <a class=\"code\" href=\"group__window.html#ga7a56f9e0227e2cd9470d80d919032e08\">GLFWwindowrefreshfun</a> <a class=\"code\" href=\"group__window.html#ga1c5c7eb889c33c7f4d10dd35b327654e\">glfwSetWindowRefreshCallback</a>(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window, <a class=\"code\" href=\"group__window.html#ga7a56f9e0227e2cd9470d80d919032e08\">GLFWwindowrefreshfun</a> callback);</div>\n<div class=\"line\"><a name=\"l03716\"></a><span class=\"lineno\"> 3716</span>&#160; </div>\n<div class=\"line\"><a name=\"l03750\"></a><span class=\"lineno\"> 3750</span>&#160;GLFWAPI <a class=\"code\" href=\"group__window.html#ga58be2061828dd35080bb438405d3a7e2\">GLFWwindowfocusfun</a> <a class=\"code\" href=\"group__window.html#gac2d83c4a10f071baf841f6730528e66c\">glfwSetWindowFocusCallback</a>(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window, <a class=\"code\" href=\"group__window.html#ga58be2061828dd35080bb438405d3a7e2\">GLFWwindowfocusfun</a> callback);</div>\n<div class=\"line\"><a name=\"l03751\"></a><span class=\"lineno\"> 3751</span>&#160; </div>\n<div class=\"line\"><a name=\"l03783\"></a><span class=\"lineno\"> 3783</span>&#160;GLFWAPI <a class=\"code\" href=\"group__window.html#gad2d4e4c3d28b1242e742e8268b9528af\">GLFWwindowiconifyfun</a> <a class=\"code\" href=\"group__window.html#gac793e9efd255567b5fb8b445052cfd3e\">glfwSetWindowIconifyCallback</a>(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window, <a class=\"code\" href=\"group__window.html#gad2d4e4c3d28b1242e742e8268b9528af\">GLFWwindowiconifyfun</a> callback);</div>\n<div class=\"line\"><a name=\"l03784\"></a><span class=\"lineno\"> 3784</span>&#160; </div>\n<div class=\"line\"><a name=\"l03813\"></a><span class=\"lineno\"> 3813</span>&#160;GLFWAPI <a class=\"code\" href=\"group__window.html#ga7269a3d1cb100c0081f95fc09afa4949\">GLFWwindowmaximizefun</a> <a class=\"code\" href=\"group__window.html#gacbe64c339fbd94885e62145563b6dc93\">glfwSetWindowMaximizeCallback</a>(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window, <a class=\"code\" href=\"group__window.html#ga7269a3d1cb100c0081f95fc09afa4949\">GLFWwindowmaximizefun</a> callback);</div>\n<div class=\"line\"><a name=\"l03814\"></a><span class=\"lineno\"> 3814</span>&#160; </div>\n<div class=\"line\"><a name=\"l03843\"></a><span class=\"lineno\"> 3843</span>&#160;GLFWAPI <a class=\"code\" href=\"group__window.html#ga3e218ef9ff826129c55a7d5f6971a285\">GLFWframebuffersizefun</a> <a class=\"code\" href=\"group__window.html#gab3fb7c3366577daef18c0023e2a8591f\">glfwSetFramebufferSizeCallback</a>(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window, <a class=\"code\" href=\"group__window.html#ga3e218ef9ff826129c55a7d5f6971a285\">GLFWframebuffersizefun</a> callback);</div>\n<div class=\"line\"><a name=\"l03844\"></a><span class=\"lineno\"> 3844</span>&#160; </div>\n<div class=\"line\"><a name=\"l03874\"></a><span class=\"lineno\"> 3874</span>&#160;GLFWAPI <a class=\"code\" href=\"group__window.html#ga1da46b65eafcc1a7ff0adb8f4a7b72fd\">GLFWwindowcontentscalefun</a> <a class=\"code\" href=\"group__window.html#gaf2832ebb5aa6c252a2d261de002c92d6\">glfwSetWindowContentScaleCallback</a>(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window, <a class=\"code\" href=\"group__window.html#ga1da46b65eafcc1a7ff0adb8f4a7b72fd\">GLFWwindowcontentscalefun</a> callback);</div>\n<div class=\"line\"><a name=\"l03875\"></a><span class=\"lineno\"> 3875</span>&#160; </div>\n<div class=\"line\"><a name=\"l03912\"></a><span class=\"lineno\"> 3912</span>&#160;GLFWAPI <span class=\"keywordtype\">void</span> <a class=\"code\" href=\"group__window.html#ga37bd57223967b4211d60ca1a0bf3c832\">glfwPollEvents</a>(<span class=\"keywordtype\">void</span>);</div>\n<div class=\"line\"><a name=\"l03913\"></a><span class=\"lineno\"> 3913</span>&#160; </div>\n<div class=\"line\"><a name=\"l03957\"></a><span class=\"lineno\"> 3957</span>&#160;GLFWAPI <span class=\"keywordtype\">void</span> <a class=\"code\" href=\"group__window.html#ga554e37d781f0a997656c26b2c56c835e\">glfwWaitEvents</a>(<span class=\"keywordtype\">void</span>);</div>\n<div class=\"line\"><a name=\"l03958\"></a><span class=\"lineno\"> 3958</span>&#160; </div>\n<div class=\"line\"><a name=\"l04006\"></a><span class=\"lineno\"> 4006</span>&#160;GLFWAPI <span class=\"keywordtype\">void</span> <a class=\"code\" href=\"group__window.html#ga605a178db92f1a7f1a925563ef3ea2cf\">glfwWaitEventsTimeout</a>(<span class=\"keywordtype\">double</span> timeout);</div>\n<div class=\"line\"><a name=\"l04007\"></a><span class=\"lineno\"> 4007</span>&#160; </div>\n<div class=\"line\"><a name=\"l04026\"></a><span class=\"lineno\"> 4026</span>&#160;GLFWAPI <span class=\"keywordtype\">void</span> <a class=\"code\" href=\"group__window.html#gab5997a25187e9fd5c6f2ecbbc8dfd7e9\">glfwPostEmptyEvent</a>(<span class=\"keywordtype\">void</span>);</div>\n<div class=\"line\"><a name=\"l04027\"></a><span class=\"lineno\"> 4027</span>&#160; </div>\n<div class=\"line\"><a name=\"l04051\"></a><span class=\"lineno\"> 4051</span>&#160;GLFWAPI <span class=\"keywordtype\">int</span> <a class=\"code\" href=\"group__input.html#gaf5b859dbe19bdf434e42695ea45cc5f4\">glfwGetInputMode</a>(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window, <span class=\"keywordtype\">int</span> mode);</div>\n<div class=\"line\"><a name=\"l04052\"></a><span class=\"lineno\"> 4052</span>&#160; </div>\n<div class=\"line\"><a name=\"l04113\"></a><span class=\"lineno\"> 4113</span>&#160;GLFWAPI <span class=\"keywordtype\">void</span> <a class=\"code\" href=\"group__input.html#gaa92336e173da9c8834558b54ee80563b\">glfwSetInputMode</a>(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window, <span class=\"keywordtype\">int</span> mode, <span class=\"keywordtype\">int</span> value);</div>\n<div class=\"line\"><a name=\"l04114\"></a><span class=\"lineno\"> 4114</span>&#160; </div>\n<div class=\"line\"><a name=\"l04142\"></a><span class=\"lineno\"> 4142</span>&#160;GLFWAPI <span class=\"keywordtype\">int</span> <a class=\"code\" href=\"group__input.html#gae4ee0dbd0d256183e1ea4026d897e1c2\">glfwRawMouseMotionSupported</a>(<span class=\"keywordtype\">void</span>);</div>\n<div class=\"line\"><a name=\"l04143\"></a><span class=\"lineno\"> 4143</span>&#160; </div>\n<div class=\"line\"><a name=\"l04210\"></a><span class=\"lineno\"> 4210</span>&#160;GLFWAPI <span class=\"keyword\">const</span> <span class=\"keywordtype\">char</span>* <a class=\"code\" href=\"group__input.html#ga237a182e5ec0b21ce64543f3b5e7e2be\">glfwGetKeyName</a>(<span class=\"keywordtype\">int</span> key, <span class=\"keywordtype\">int</span> scancode);</div>\n<div class=\"line\"><a name=\"l04211\"></a><span class=\"lineno\"> 4211</span>&#160; </div>\n<div class=\"line\"><a name=\"l04234\"></a><span class=\"lineno\"> 4234</span>&#160;GLFWAPI <span class=\"keywordtype\">int</span> <a class=\"code\" href=\"group__input.html#ga67ddd1b7dcbbaff03e4a76c0ea67103a\">glfwGetKeyScancode</a>(<span class=\"keywordtype\">int</span> key);</div>\n<div class=\"line\"><a name=\"l04235\"></a><span class=\"lineno\"> 4235</span>&#160; </div>\n<div class=\"line\"><a name=\"l04274\"></a><span class=\"lineno\"> 4274</span>&#160;GLFWAPI <span class=\"keywordtype\">int</span> <a class=\"code\" href=\"group__input.html#gadd341da06bc8d418b4dc3a3518af9ad2\">glfwGetKey</a>(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window, <span class=\"keywordtype\">int</span> key);</div>\n<div class=\"line\"><a name=\"l04275\"></a><span class=\"lineno\"> 4275</span>&#160; </div>\n<div class=\"line\"><a name=\"l04303\"></a><span class=\"lineno\"> 4303</span>&#160;GLFWAPI <span class=\"keywordtype\">int</span> <a class=\"code\" href=\"group__input.html#gac1473feacb5996c01a7a5a33b5066704\">glfwGetMouseButton</a>(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window, <span class=\"keywordtype\">int</span> button);</div>\n<div class=\"line\"><a name=\"l04304\"></a><span class=\"lineno\"> 4304</span>&#160; </div>\n<div class=\"line\"><a name=\"l04341\"></a><span class=\"lineno\"> 4341</span>&#160;GLFWAPI <span class=\"keywordtype\">void</span> <a class=\"code\" href=\"group__input.html#ga01d37b6c40133676b9cea60ca1d7c0cc\">glfwGetCursorPos</a>(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window, <span class=\"keywordtype\">double</span>* xpos, <span class=\"keywordtype\">double</span>* ypos);</div>\n<div class=\"line\"><a name=\"l04342\"></a><span class=\"lineno\"> 4342</span>&#160; </div>\n<div class=\"line\"><a name=\"l04381\"></a><span class=\"lineno\"> 4381</span>&#160;GLFWAPI <span class=\"keywordtype\">void</span> <a class=\"code\" href=\"group__input.html#ga04b03af936d906ca123c8f4ee08b39e7\">glfwSetCursorPos</a>(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window, <span class=\"keywordtype\">double</span> xpos, <span class=\"keywordtype\">double</span> ypos);</div>\n<div class=\"line\"><a name=\"l04382\"></a><span class=\"lineno\"> 4382</span>&#160; </div>\n<div class=\"line\"><a name=\"l04419\"></a><span class=\"lineno\"> 4419</span>&#160;GLFWAPI <a class=\"code\" href=\"group__input.html#ga89261ae18c75e863aaf2656ecdd238f4\">GLFWcursor</a>* <a class=\"code\" href=\"group__input.html#gafca356935e10135016aa49ffa464c355\">glfwCreateCursor</a>(<span class=\"keyword\">const</span> <a class=\"code\" href=\"structGLFWimage.html\">GLFWimage</a>* image, <span class=\"keywordtype\">int</span> xhot, <span class=\"keywordtype\">int</span> yhot);</div>\n<div class=\"line\"><a name=\"l04420\"></a><span class=\"lineno\"> 4420</span>&#160; </div>\n<div class=\"line\"><a name=\"l04442\"></a><span class=\"lineno\"> 4442</span>&#160;GLFWAPI <a class=\"code\" href=\"group__input.html#ga89261ae18c75e863aaf2656ecdd238f4\">GLFWcursor</a>* <a class=\"code\" href=\"group__input.html#gaa65f416d03ebbbb5b8db71a489fcb894\">glfwCreateStandardCursor</a>(<span class=\"keywordtype\">int</span> shape);</div>\n<div class=\"line\"><a name=\"l04443\"></a><span class=\"lineno\"> 4443</span>&#160; </div>\n<div class=\"line\"><a name=\"l04469\"></a><span class=\"lineno\"> 4469</span>&#160;GLFWAPI <span class=\"keywordtype\">void</span> <a class=\"code\" href=\"group__input.html#ga81b952cd1764274d0db7fb3c5a79ba6a\">glfwDestroyCursor</a>(<a class=\"code\" href=\"group__input.html#ga89261ae18c75e863aaf2656ecdd238f4\">GLFWcursor</a>* cursor);</div>\n<div class=\"line\"><a name=\"l04470\"></a><span class=\"lineno\"> 4470</span>&#160; </div>\n<div class=\"line\"><a name=\"l04496\"></a><span class=\"lineno\"> 4496</span>&#160;GLFWAPI <span class=\"keywordtype\">void</span> <a class=\"code\" href=\"group__input.html#gad3b4f38c8d5dae036bc8fa959e18343e\">glfwSetCursor</a>(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window, <a class=\"code\" href=\"group__input.html#ga89261ae18c75e863aaf2656ecdd238f4\">GLFWcursor</a>* cursor);</div>\n<div class=\"line\"><a name=\"l04497\"></a><span class=\"lineno\"> 4497</span>&#160; </div>\n<div class=\"line\"><a name=\"l04546\"></a><span class=\"lineno\"> 4546</span>&#160;GLFWAPI <a class=\"code\" href=\"group__input.html#ga0192a232a41e4e82948217c8ba94fdfd\">GLFWkeyfun</a> <a class=\"code\" href=\"group__input.html#ga1caf18159767e761185e49a3be019f8d\">glfwSetKeyCallback</a>(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window, <a class=\"code\" href=\"group__input.html#ga0192a232a41e4e82948217c8ba94fdfd\">GLFWkeyfun</a> callback);</div>\n<div class=\"line\"><a name=\"l04547\"></a><span class=\"lineno\"> 4547</span>&#160; </div>\n<div class=\"line\"><a name=\"l04589\"></a><span class=\"lineno\"> 4589</span>&#160;GLFWAPI <a class=\"code\" href=\"group__input.html#gabf24451c7ceb1952bc02b17a0d5c3e5f\">GLFWcharfun</a> <a class=\"code\" href=\"group__input.html#gab25c4a220fd8f5717718dbc487828996\">glfwSetCharCallback</a>(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window, <a class=\"code\" href=\"group__input.html#gabf24451c7ceb1952bc02b17a0d5c3e5f\">GLFWcharfun</a> callback);</div>\n<div class=\"line\"><a name=\"l04590\"></a><span class=\"lineno\"> 4590</span>&#160; </div>\n<div class=\"line\"><a name=\"l04631\"></a><span class=\"lineno\"> 4631</span>&#160;GLFWAPI <a class=\"code\" href=\"group__input.html#gae36fb6897d2b7df9b128900c8ce9c507\">GLFWcharmodsfun</a> <a class=\"code\" href=\"group__input.html#ga0b7f4ad13c2b17435ff13b6dcfb4e43c\">glfwSetCharModsCallback</a>(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window, <a class=\"code\" href=\"group__input.html#gae36fb6897d2b7df9b128900c8ce9c507\">GLFWcharmodsfun</a> callback);</div>\n<div class=\"line\"><a name=\"l04632\"></a><span class=\"lineno\"> 4632</span>&#160; </div>\n<div class=\"line\"><a name=\"l04668\"></a><span class=\"lineno\"> 4668</span>&#160;GLFWAPI <a class=\"code\" href=\"group__input.html#ga39893a4a7e7c3239c98d29c9e084350c\">GLFWmousebuttonfun</a> <a class=\"code\" href=\"group__input.html#ga6ab84420974d812bee700e45284a723c\">glfwSetMouseButtonCallback</a>(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window, <a class=\"code\" href=\"group__input.html#ga39893a4a7e7c3239c98d29c9e084350c\">GLFWmousebuttonfun</a> callback);</div>\n<div class=\"line\"><a name=\"l04669\"></a><span class=\"lineno\"> 4669</span>&#160; </div>\n<div class=\"line\"><a name=\"l04700\"></a><span class=\"lineno\"> 4700</span>&#160;GLFWAPI <a class=\"code\" href=\"group__input.html#ga4cfad918fa836f09541e7b9acd36686c\">GLFWcursorposfun</a> <a class=\"code\" href=\"group__input.html#gac1f879ab7435d54d4d79bb469fe225d7\">glfwSetCursorPosCallback</a>(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window, <a class=\"code\" href=\"group__input.html#ga4cfad918fa836f09541e7b9acd36686c\">GLFWcursorposfun</a> callback);</div>\n<div class=\"line\"><a name=\"l04701\"></a><span class=\"lineno\"> 4701</span>&#160; </div>\n<div class=\"line\"><a name=\"l04731\"></a><span class=\"lineno\"> 4731</span>&#160;GLFWAPI <a class=\"code\" href=\"group__input.html#ga51ab436c41eeaed6db5a0c9403b1c840\">GLFWcursorenterfun</a> <a class=\"code\" href=\"group__input.html#gad27f8ad0142c038a281466c0966817d8\">glfwSetCursorEnterCallback</a>(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window, <a class=\"code\" href=\"group__input.html#ga51ab436c41eeaed6db5a0c9403b1c840\">GLFWcursorenterfun</a> callback);</div>\n<div class=\"line\"><a name=\"l04732\"></a><span class=\"lineno\"> 4732</span>&#160; </div>\n<div class=\"line\"><a name=\"l04765\"></a><span class=\"lineno\"> 4765</span>&#160;GLFWAPI <a class=\"code\" href=\"group__input.html#ga4687e2199c60a18a8dd1da532e6d75c9\">GLFWscrollfun</a> <a class=\"code\" href=\"group__input.html#ga571e45a030ae4061f746ed56cb76aede\">glfwSetScrollCallback</a>(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window, <a class=\"code\" href=\"group__input.html#ga4687e2199c60a18a8dd1da532e6d75c9\">GLFWscrollfun</a> callback);</div>\n<div class=\"line\"><a name=\"l04766\"></a><span class=\"lineno\"> 4766</span>&#160; </div>\n<div class=\"line\"><a name=\"l04802\"></a><span class=\"lineno\"> 4802</span>&#160;GLFWAPI <a class=\"code\" href=\"group__input.html#gafd0493dc32cd5ca5810e6148c0c026ea\">GLFWdropfun</a> <a class=\"code\" href=\"group__input.html#gab773f0ee0a07cff77a210cea40bc1f6b\">glfwSetDropCallback</a>(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window, <a class=\"code\" href=\"group__input.html#gafd0493dc32cd5ca5810e6148c0c026ea\">GLFWdropfun</a> callback);</div>\n<div class=\"line\"><a name=\"l04803\"></a><span class=\"lineno\"> 4803</span>&#160; </div>\n<div class=\"line\"><a name=\"l04826\"></a><span class=\"lineno\"> 4826</span>&#160;GLFWAPI <span class=\"keywordtype\">int</span> <a class=\"code\" href=\"group__input.html#gaed0966cee139d815317f9ffcba64c9f1\">glfwJoystickPresent</a>(<span class=\"keywordtype\">int</span> jid);</div>\n<div class=\"line\"><a name=\"l04827\"></a><span class=\"lineno\"> 4827</span>&#160; </div>\n<div class=\"line\"><a name=\"l04859\"></a><span class=\"lineno\"> 4859</span>&#160;GLFWAPI <span class=\"keyword\">const</span> <span class=\"keywordtype\">float</span>* <a class=\"code\" href=\"group__input.html#gaa8806536731e92c061bc70bcff6edbd0\">glfwGetJoystickAxes</a>(<span class=\"keywordtype\">int</span> jid, <span class=\"keywordtype\">int</span>* count);</div>\n<div class=\"line\"><a name=\"l04860\"></a><span class=\"lineno\"> 4860</span>&#160; </div>\n<div class=\"line\"><a name=\"l04900\"></a><span class=\"lineno\"> 4900</span>&#160;GLFWAPI <span class=\"keyword\">const</span> <span class=\"keywordtype\">unsigned</span> <span class=\"keywordtype\">char</span>* <a class=\"code\" href=\"group__input.html#gadb3cbf44af90a1536f519659a53bddd6\">glfwGetJoystickButtons</a>(<span class=\"keywordtype\">int</span> jid, <span class=\"keywordtype\">int</span>* count);</div>\n<div class=\"line\"><a name=\"l04901\"></a><span class=\"lineno\"> 4901</span>&#160; </div>\n<div class=\"line\"><a name=\"l04957\"></a><span class=\"lineno\"> 4957</span>&#160;GLFWAPI <span class=\"keyword\">const</span> <span class=\"keywordtype\">unsigned</span> <span class=\"keywordtype\">char</span>* <a class=\"code\" href=\"group__input.html#ga2d8d0634bb81c180899aeb07477a67ea\">glfwGetJoystickHats</a>(<span class=\"keywordtype\">int</span> jid, <span class=\"keywordtype\">int</span>* count);</div>\n<div class=\"line\"><a name=\"l04958\"></a><span class=\"lineno\"> 4958</span>&#160; </div>\n<div class=\"line\"><a name=\"l04988\"></a><span class=\"lineno\"> 4988</span>&#160;GLFWAPI <span class=\"keyword\">const</span> <span class=\"keywordtype\">char</span>* <a class=\"code\" href=\"group__input.html#gafbe3e51f670320908cfe4e20d3e5559e\">glfwGetJoystickName</a>(<span class=\"keywordtype\">int</span> jid);</div>\n<div class=\"line\"><a name=\"l04989\"></a><span class=\"lineno\"> 4989</span>&#160; </div>\n<div class=\"line\"><a name=\"l05029\"></a><span class=\"lineno\"> 5029</span>&#160;GLFWAPI <span class=\"keyword\">const</span> <span class=\"keywordtype\">char</span>* <a class=\"code\" href=\"group__input.html#gae168c2c0b8cf2a1cb67c6b3c00bdd543\">glfwGetJoystickGUID</a>(<span class=\"keywordtype\">int</span> jid);</div>\n<div class=\"line\"><a name=\"l05030\"></a><span class=\"lineno\"> 5030</span>&#160; </div>\n<div class=\"line\"><a name=\"l05055\"></a><span class=\"lineno\"> 5055</span>&#160;GLFWAPI <span class=\"keywordtype\">void</span> <a class=\"code\" href=\"group__input.html#ga6b2f72d64d636b48a727b437cbb7489e\">glfwSetJoystickUserPointer</a>(<span class=\"keywordtype\">int</span> jid, <span class=\"keywordtype\">void</span>* pointer);</div>\n<div class=\"line\"><a name=\"l05056\"></a><span class=\"lineno\"> 5056</span>&#160; </div>\n<div class=\"line\"><a name=\"l05079\"></a><span class=\"lineno\"> 5079</span>&#160;GLFWAPI <span class=\"keywordtype\">void</span>* <a class=\"code\" href=\"group__input.html#ga06290acb7ed23895bf26b8e981827ebd\">glfwGetJoystickUserPointer</a>(<span class=\"keywordtype\">int</span> jid);</div>\n<div class=\"line\"><a name=\"l05080\"></a><span class=\"lineno\"> 5080</span>&#160; </div>\n<div class=\"line\"><a name=\"l05107\"></a><span class=\"lineno\"> 5107</span>&#160;GLFWAPI <span class=\"keywordtype\">int</span> <a class=\"code\" href=\"group__input.html#gad0f676860f329d80f7e47e9f06a96f00\">glfwJoystickIsGamepad</a>(<span class=\"keywordtype\">int</span> jid);</div>\n<div class=\"line\"><a name=\"l05108\"></a><span class=\"lineno\"> 5108</span>&#160; </div>\n<div class=\"line\"><a name=\"l05143\"></a><span class=\"lineno\"> 5143</span>&#160;GLFWAPI <a class=\"code\" href=\"group__input.html#gaa67aa597e974298c748bfe4fb17d406d\">GLFWjoystickfun</a> <a class=\"code\" href=\"group__input.html#ga2f60a0e5b7bd8d1b7344dc0a7cb32b4c\">glfwSetJoystickCallback</a>(<a class=\"code\" href=\"group__input.html#gaa67aa597e974298c748bfe4fb17d406d\">GLFWjoystickfun</a> callback);</div>\n<div class=\"line\"><a name=\"l05144\"></a><span class=\"lineno\"> 5144</span>&#160; </div>\n<div class=\"line\"><a name=\"l05177\"></a><span class=\"lineno\"> 5177</span>&#160;GLFWAPI <span class=\"keywordtype\">int</span> <a class=\"code\" href=\"group__input.html#gaed5104612f2fa8e66aa6e846652ad00f\">glfwUpdateGamepadMappings</a>(<span class=\"keyword\">const</span> <span class=\"keywordtype\">char</span>* <span class=\"keywordtype\">string</span>);</div>\n<div class=\"line\"><a name=\"l05178\"></a><span class=\"lineno\"> 5178</span>&#160; </div>\n<div class=\"line\"><a name=\"l05207\"></a><span class=\"lineno\"> 5207</span>&#160;GLFWAPI <span class=\"keyword\">const</span> <span class=\"keywordtype\">char</span>* <a class=\"code\" href=\"group__input.html#ga5c71e3533b2d384db9317fcd7661b210\">glfwGetGamepadName</a>(<span class=\"keywordtype\">int</span> jid);</div>\n<div class=\"line\"><a name=\"l05208\"></a><span class=\"lineno\"> 5208</span>&#160; </div>\n<div class=\"line\"><a name=\"l05245\"></a><span class=\"lineno\"> 5245</span>&#160;GLFWAPI <span class=\"keywordtype\">int</span> <a class=\"code\" href=\"group__input.html#gadccddea8bce6113fa459de379ddaf051\">glfwGetGamepadState</a>(<span class=\"keywordtype\">int</span> jid, <a class=\"code\" href=\"structGLFWgamepadstate.html\">GLFWgamepadstate</a>* state);</div>\n<div class=\"line\"><a name=\"l05246\"></a><span class=\"lineno\"> 5246</span>&#160; </div>\n<div class=\"line\"><a name=\"l05270\"></a><span class=\"lineno\"> 5270</span>&#160;GLFWAPI <span class=\"keywordtype\">void</span> <a class=\"code\" href=\"group__input.html#gaba1f022c5eb07dfac421df34cdcd31dd\">glfwSetClipboardString</a>(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window, <span class=\"keyword\">const</span> <span class=\"keywordtype\">char</span>* <span class=\"keywordtype\">string</span>);</div>\n<div class=\"line\"><a name=\"l05271\"></a><span class=\"lineno\"> 5271</span>&#160; </div>\n<div class=\"line\"><a name=\"l05300\"></a><span class=\"lineno\"> 5300</span>&#160;GLFWAPI <span class=\"keyword\">const</span> <span class=\"keywordtype\">char</span>* <a class=\"code\" href=\"group__input.html#ga5aba1d704d9ab539282b1fbe9f18bb94\">glfwGetClipboardString</a>(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window);</div>\n<div class=\"line\"><a name=\"l05301\"></a><span class=\"lineno\"> 5301</span>&#160; </div>\n<div class=\"line\"><a name=\"l05330\"></a><span class=\"lineno\"> 5330</span>&#160;GLFWAPI <span class=\"keywordtype\">double</span> <a class=\"code\" href=\"group__input.html#gaa6cf4e7a77158a3b8fd00328b1720a4a\">glfwGetTime</a>(<span class=\"keywordtype\">void</span>);</div>\n<div class=\"line\"><a name=\"l05331\"></a><span class=\"lineno\"> 5331</span>&#160; </div>\n<div class=\"line\"><a name=\"l05360\"></a><span class=\"lineno\"> 5360</span>&#160;GLFWAPI <span class=\"keywordtype\">void</span> <a class=\"code\" href=\"group__input.html#gaf59589ef6e8b8c8b5ad184b25afd4dc0\">glfwSetTime</a>(<span class=\"keywordtype\">double</span> time);</div>\n<div class=\"line\"><a name=\"l05361\"></a><span class=\"lineno\"> 5361</span>&#160; </div>\n<div class=\"line\"><a name=\"l05382\"></a><span class=\"lineno\"> 5382</span>&#160;GLFWAPI uint64_t <a class=\"code\" href=\"group__input.html#ga09b2bd37d328e0b9456c7ec575cc26aa\">glfwGetTimerValue</a>(<span class=\"keywordtype\">void</span>);</div>\n<div class=\"line\"><a name=\"l05383\"></a><span class=\"lineno\"> 5383</span>&#160; </div>\n<div class=\"line\"><a name=\"l05402\"></a><span class=\"lineno\"> 5402</span>&#160;GLFWAPI uint64_t <a class=\"code\" href=\"group__input.html#ga3289ee876572f6e91f06df3a24824443\">glfwGetTimerFrequency</a>(<span class=\"keywordtype\">void</span>);</div>\n<div class=\"line\"><a name=\"l05403\"></a><span class=\"lineno\"> 5403</span>&#160; </div>\n<div class=\"line\"><a name=\"l05440\"></a><span class=\"lineno\"> 5440</span>&#160;GLFWAPI <span class=\"keywordtype\">void</span> <a class=\"code\" href=\"group__context.html#ga1c04dc242268f827290fe40aa1c91157\">glfwMakeContextCurrent</a>(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window);</div>\n<div class=\"line\"><a name=\"l05441\"></a><span class=\"lineno\"> 5441</span>&#160; </div>\n<div class=\"line\"><a name=\"l05461\"></a><span class=\"lineno\"> 5461</span>&#160;GLFWAPI <a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* <a class=\"code\" href=\"group__context.html#gac84759b1f6c2d271a4fea8ae89ec980d\">glfwGetCurrentContext</a>(<span class=\"keywordtype\">void</span>);</div>\n<div class=\"line\"><a name=\"l05462\"></a><span class=\"lineno\"> 5462</span>&#160; </div>\n<div class=\"line\"><a name=\"l05495\"></a><span class=\"lineno\"> 5495</span>&#160;GLFWAPI <span class=\"keywordtype\">void</span> <a class=\"code\" href=\"group__window.html#ga15a5a1ee5b3c2ca6b15ca209a12efd14\">glfwSwapBuffers</a>(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window);</div>\n<div class=\"line\"><a name=\"l05496\"></a><span class=\"lineno\"> 5496</span>&#160; </div>\n<div class=\"line\"><a name=\"l05541\"></a><span class=\"lineno\"> 5541</span>&#160;GLFWAPI <span class=\"keywordtype\">void</span> <a class=\"code\" href=\"group__context.html#ga6d4e0cdf151b5e579bd67f13202994ed\">glfwSwapInterval</a>(<span class=\"keywordtype\">int</span> interval);</div>\n<div class=\"line\"><a name=\"l05542\"></a><span class=\"lineno\"> 5542</span>&#160; </div>\n<div class=\"line\"><a name=\"l05579\"></a><span class=\"lineno\"> 5579</span>&#160;GLFWAPI <span class=\"keywordtype\">int</span> <a class=\"code\" href=\"group__context.html#ga87425065c011cef1ebd6aac75e059dfa\">glfwExtensionSupported</a>(<span class=\"keyword\">const</span> <span class=\"keywordtype\">char</span>* extension);</div>\n<div class=\"line\"><a name=\"l05580\"></a><span class=\"lineno\"> 5580</span>&#160; </div>\n<div class=\"line\"><a name=\"l05621\"></a><span class=\"lineno\"> 5621</span>&#160;GLFWAPI <a class=\"code\" href=\"group__context.html#ga3d47c2d2fbe0be9c505d0e04e91a133c\">GLFWglproc</a> <a class=\"code\" href=\"group__context.html#ga35f1837e6f666781842483937612f163\">glfwGetProcAddress</a>(<span class=\"keyword\">const</span> <span class=\"keywordtype\">char</span>* procname);</div>\n<div class=\"line\"><a name=\"l05622\"></a><span class=\"lineno\"> 5622</span>&#160; </div>\n<div class=\"line\"><a name=\"l05649\"></a><span class=\"lineno\"> 5649</span>&#160;GLFWAPI <span class=\"keywordtype\">int</span> <a class=\"code\" href=\"group__vulkan.html#ga2e7f30931e02464b5bc8d0d4b6f9fe2b\">glfwVulkanSupported</a>(<span class=\"keywordtype\">void</span>);</div>\n<div class=\"line\"><a name=\"l05650\"></a><span class=\"lineno\"> 5650</span>&#160; </div>\n<div class=\"line\"><a name=\"l05697\"></a><span class=\"lineno\"> 5697</span>&#160;GLFWAPI <span class=\"keyword\">const</span> <span class=\"keywordtype\">char</span>** <a class=\"code\" href=\"group__vulkan.html#ga1abcbe61033958f22f63ef82008874b1\">glfwGetRequiredInstanceExtensions</a>(uint32_t* count);</div>\n<div class=\"line\"><a name=\"l05698\"></a><span class=\"lineno\"> 5698</span>&#160; </div>\n<div class=\"line\"><a name=\"l05699\"></a><span class=\"lineno\"> 5699</span>&#160;<span class=\"preprocessor\">#if defined(VK_VERSION_1_0)</span></div>\n<div class=\"line\"><a name=\"l05700\"></a><span class=\"lineno\"> 5700</span>&#160; </div>\n<div class=\"line\"><a name=\"l05740\"></a><span class=\"lineno\"> 5740</span>&#160;GLFWAPI <a class=\"code\" href=\"group__vulkan.html#ga70c01918dc9d233a4fbe0681a43018af\">GLFWvkproc</a> <a class=\"code\" href=\"group__vulkan.html#gadf228fac94c5fd8f12423ec9af9ff1e9\">glfwGetInstanceProcAddress</a>(VkInstance instance, <span class=\"keyword\">const</span> <span class=\"keywordtype\">char</span>* procname);</div>\n<div class=\"line\"><a name=\"l05741\"></a><span class=\"lineno\"> 5741</span>&#160; </div>\n<div class=\"line\"><a name=\"l05777\"></a><span class=\"lineno\"> 5777</span>&#160;GLFWAPI <span class=\"keywordtype\">int</span> <a class=\"code\" href=\"group__vulkan.html#gaff3823355cdd7e2f3f9f4d9ea9518d92\">glfwGetPhysicalDevicePresentationSupport</a>(VkInstance instance, VkPhysicalDevice device, uint32_t queuefamily);</div>\n<div class=\"line\"><a name=\"l05778\"></a><span class=\"lineno\"> 5778</span>&#160; </div>\n<div class=\"line\"><a name=\"l05838\"></a><span class=\"lineno\"> 5838</span>&#160;GLFWAPI VkResult <a class=\"code\" href=\"group__vulkan.html#ga1a24536bec3f80b08ead18e28e6ae965\">glfwCreateWindowSurface</a>(VkInstance instance, <a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window, <span class=\"keyword\">const</span> VkAllocationCallbacks* allocator, VkSurfaceKHR* surface);</div>\n<div class=\"line\"><a name=\"l05839\"></a><span class=\"lineno\"> 5839</span>&#160; </div>\n<div class=\"line\"><a name=\"l05840\"></a><span class=\"lineno\"> 5840</span>&#160;<span class=\"preprocessor\">#endif </span><span class=\"comment\">/*VK_VERSION_1_0*/</span><span class=\"preprocessor\"></span></div>\n<div class=\"line\"><a name=\"l05841\"></a><span class=\"lineno\"> 5841</span>&#160; </div>\n<div class=\"line\"><a name=\"l05842\"></a><span class=\"lineno\"> 5842</span>&#160; </div>\n<div class=\"line\"><a name=\"l05843\"></a><span class=\"lineno\"> 5843</span>&#160;<span class=\"comment\">/*************************************************************************</span></div>\n<div class=\"line\"><a name=\"l05844\"></a><span class=\"lineno\"> 5844</span>&#160;<span class=\"comment\"> * Global definition cleanup</span></div>\n<div class=\"line\"><a name=\"l05845\"></a><span class=\"lineno\"> 5845</span>&#160;<span class=\"comment\"> *************************************************************************/</span></div>\n<div class=\"line\"><a name=\"l05846\"></a><span class=\"lineno\"> 5846</span>&#160; </div>\n<div class=\"line\"><a name=\"l05847\"></a><span class=\"lineno\"> 5847</span>&#160;<span class=\"comment\">/* ------------------- BEGIN SYSTEM/COMPILER SPECIFIC -------------------- */</span></div>\n<div class=\"line\"><a name=\"l05848\"></a><span class=\"lineno\"> 5848</span>&#160; </div>\n<div class=\"line\"><a name=\"l05849\"></a><span class=\"lineno\"> 5849</span>&#160;<span class=\"preprocessor\">#ifdef GLFW_WINGDIAPI_DEFINED</span></div>\n<div class=\"line\"><a name=\"l05850\"></a><span class=\"lineno\"> 5850</span>&#160;<span class=\"preprocessor\"> #undef WINGDIAPI</span></div>\n<div class=\"line\"><a name=\"l05851\"></a><span class=\"lineno\"> 5851</span>&#160;<span class=\"preprocessor\"> #undef GLFW_WINGDIAPI_DEFINED</span></div>\n<div class=\"line\"><a name=\"l05852\"></a><span class=\"lineno\"> 5852</span>&#160;<span class=\"preprocessor\">#endif</span></div>\n<div class=\"line\"><a name=\"l05853\"></a><span class=\"lineno\"> 5853</span>&#160; </div>\n<div class=\"line\"><a name=\"l05854\"></a><span class=\"lineno\"> 5854</span>&#160;<span class=\"preprocessor\">#ifdef GLFW_CALLBACK_DEFINED</span></div>\n<div class=\"line\"><a name=\"l05855\"></a><span class=\"lineno\"> 5855</span>&#160;<span class=\"preprocessor\"> #undef CALLBACK</span></div>\n<div class=\"line\"><a name=\"l05856\"></a><span class=\"lineno\"><a class=\"line\" href=\"glfw3_8h.html#aa97755eb47e4bf2727ad45d610e18206\"> 5856</a></span>&#160;<span class=\"preprocessor\"> #undef GLFW_CALLBACK_DEFINED</span></div>\n<div class=\"line\"><a name=\"l05857\"></a><span class=\"lineno\"> 5857</span>&#160;<span class=\"preprocessor\">#endif</span></div>\n<div class=\"line\"><a name=\"l05858\"></a><span class=\"lineno\"> 5858</span>&#160; </div>\n<div class=\"line\"><a name=\"l05859\"></a><span class=\"lineno\"> 5859</span>&#160;<span class=\"comment\">/* Some OpenGL related headers need GLAPIENTRY, but it is unconditionally</span></div>\n<div class=\"line\"><a name=\"l05860\"></a><span class=\"lineno\"> 5860</span>&#160;<span class=\"comment\"> * defined by some gl.h variants (OpenBSD) so define it after if needed.</span></div>\n<div class=\"line\"><a name=\"l05861\"></a><span class=\"lineno\"> 5861</span>&#160;<span class=\"comment\"> */</span></div>\n<div class=\"line\"><a name=\"l05862\"></a><span class=\"lineno\"> 5862</span>&#160;<span class=\"preprocessor\">#ifndef GLAPIENTRY</span></div>\n<div class=\"line\"><a name=\"l05863\"></a><span class=\"lineno\"> 5863</span>&#160;<span class=\"preprocessor\"> #define GLAPIENTRY APIENTRY</span></div>\n<div class=\"line\"><a name=\"l05864\"></a><span class=\"lineno\"> 5864</span>&#160;<span class=\"preprocessor\">#endif</span></div>\n<div class=\"line\"><a name=\"l05865\"></a><span class=\"lineno\"> 5865</span>&#160; </div>\n<div class=\"line\"><a name=\"l05866\"></a><span class=\"lineno\"> 5866</span>&#160;<span class=\"comment\">/* -------------------- END SYSTEM/COMPILER SPECIFIC --------------------- */</span></div>\n<div class=\"line\"><a name=\"l05867\"></a><span class=\"lineno\"> 5867</span>&#160; </div>\n<div class=\"line\"><a name=\"l05868\"></a><span class=\"lineno\"> 5868</span>&#160; </div>\n<div class=\"line\"><a name=\"l05869\"></a><span class=\"lineno\"> 5869</span>&#160;<span class=\"preprocessor\">#ifdef __cplusplus</span></div>\n<div class=\"line\"><a name=\"l05870\"></a><span class=\"lineno\"> 5870</span>&#160;}</div>\n<div class=\"line\"><a name=\"l05871\"></a><span class=\"lineno\"> 5871</span>&#160;<span class=\"preprocessor\">#endif</span></div>\n<div class=\"line\"><a name=\"l05872\"></a><span class=\"lineno\"> 5872</span>&#160; </div>\n<div class=\"line\"><a name=\"l05873\"></a><span class=\"lineno\"> 5873</span>&#160;<span class=\"preprocessor\">#endif </span><span class=\"comment\">/* _glfw3_h_ */</span><span class=\"preprocessor\"></span></div>\n<div class=\"line\"><a name=\"l05874\"></a><span class=\"lineno\"> 5874</span>&#160; </div>\n</div><!-- fragment --></div><!-- contents -->\n<div class=\"ttc\" id=\"agroup__input_html_ga06290acb7ed23895bf26b8e981827ebd\"><div class=\"ttname\"><a href=\"group__input.html#ga06290acb7ed23895bf26b8e981827ebd\">glfwGetJoystickUserPointer</a></div><div class=\"ttdeci\">void * glfwGetJoystickUserPointer(int jid)</div><div class=\"ttdoc\">Returns the user pointer of the specified joystick.</div></div>\n<div class=\"ttc\" id=\"agroup__input_html_gadccddea8bce6113fa459de379ddaf051\"><div class=\"ttname\"><a href=\"group__input.html#gadccddea8bce6113fa459de379ddaf051\">glfwGetGamepadState</a></div><div class=\"ttdeci\">int glfwGetGamepadState(int jid, GLFWgamepadstate *state)</div><div class=\"ttdoc\">Retrieves the state of the specified joystick remapped as a gamepad.</div></div>\n<div class=\"ttc\" id=\"agroup__init_html_ga944986b4ec0b928d488141f92982aa18\"><div class=\"ttname\"><a href=\"group__init.html#ga944986b4ec0b928d488141f92982aa18\">glfwGetError</a></div><div class=\"ttdeci\">int glfwGetError(const char **description)</div><div class=\"ttdoc\">Returns and clears the last error for the calling thread.</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_gab3fb7c3366577daef18c0023e2a8591f\"><div class=\"ttname\"><a href=\"group__window.html#gab3fb7c3366577daef18c0023e2a8591f\">glfwSetFramebufferSizeCallback</a></div><div class=\"ttdeci\">GLFWframebuffersizefun glfwSetFramebufferSizeCallback(GLFWwindow *window, GLFWframebuffersizefun callback)</div><div class=\"ttdoc\">Sets the framebuffer resize callback for the specified window.</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_ga371911f12c74c504dd8d47d832d095cb\"><div class=\"ttname\"><a href=\"group__window.html#ga371911f12c74c504dd8d47d832d095cb\">glfwSetWindowSize</a></div><div class=\"ttdeci\">void glfwSetWindowSize(GLFWwindow *window, int width, int height)</div><div class=\"ttdoc\">Sets the size of the content area of the specified window.</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_ga7a56f9e0227e2cd9470d80d919032e08\"><div class=\"ttname\"><a href=\"group__window.html#ga7a56f9e0227e2cd9470d80d919032e08\">GLFWwindowrefreshfun</a></div><div class=\"ttdeci\">void(* GLFWwindowrefreshfun)(GLFWwindow *)</div><div class=\"ttdoc\">The function pointer type for window content refresh callbacks.</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:1273</div></div>\n<div class=\"ttc\" id=\"agroup__input_html_ga39893a4a7e7c3239c98d29c9e084350c\"><div class=\"ttname\"><a href=\"group__input.html#ga39893a4a7e7c3239c98d29c9e084350c\">GLFWmousebuttonfun</a></div><div class=\"ttdeci\">void(* GLFWmousebuttonfun)(GLFWwindow *, int, int, int)</div><div class=\"ttdoc\">The function pointer type for mouse button callbacks.</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:1404</div></div>\n<div class=\"ttc\" id=\"agroup__monitor_html_gaec0bd37af673be8813592849f13e02f0\"><div class=\"ttname\"><a href=\"group__monitor.html#gaec0bd37af673be8813592849f13e02f0\">GLFWgammaramp</a></div><div class=\"ttdeci\">struct GLFWgammaramp GLFWgammaramp</div><div class=\"ttdoc\">Gamma ramp.</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_gac81c32f4437de7b3aa58ab62c3d9e5b1\"><div class=\"ttname\"><a href=\"group__window.html#gac81c32f4437de7b3aa58ab62c3d9e5b1\">GLFWimage</a></div><div class=\"ttdeci\">struct GLFWimage GLFWimage</div><div class=\"ttdoc\">Image data.</div></div>\n<div class=\"ttc\" id=\"agroup__input_html_gaa6cf4e7a77158a3b8fd00328b1720a4a\"><div class=\"ttname\"><a href=\"group__input.html#gaa6cf4e7a77158a3b8fd00328b1720a4a\">glfwGetTime</a></div><div class=\"ttdeci\">double glfwGetTime(void)</div><div class=\"ttdoc\">Returns the GLFW time.</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_ga1abb6d690e8c88e0c8cd1751356dbca8\"><div class=\"ttname\"><a href=\"group__window.html#ga1abb6d690e8c88e0c8cd1751356dbca8\">glfwSetWindowPos</a></div><div class=\"ttdeci\">void glfwSetWindowPos(GLFWwindow *window, int xpos, int ypos)</div><div class=\"ttdoc\">Sets the position of the content area of the specified window.</div></div>\n<div class=\"ttc\" id=\"agroup__input_html_ga04b03af936d906ca123c8f4ee08b39e7\"><div class=\"ttname\"><a href=\"group__input.html#ga04b03af936d906ca123c8f4ee08b39e7\">glfwSetCursorPos</a></div><div class=\"ttdeci\">void glfwSetCursorPos(GLFWwindow *window, double xpos, double ypos)</div><div class=\"ttdoc\">Sets the position of the cursor, relative to the content area of the window.</div></div>\n<div class=\"ttc\" id=\"agroup__input_html_gaed5104612f2fa8e66aa6e846652ad00f\"><div class=\"ttname\"><a href=\"group__input.html#gaed5104612f2fa8e66aa6e846652ad00f\">glfwUpdateGamepadMappings</a></div><div class=\"ttdeci\">int glfwUpdateGamepadMappings(const char *string)</div><div class=\"ttdoc\">Adds the specified SDL_GameControllerDB gamepad mappings.</div></div>\n<div class=\"ttc\" id=\"agroup__input_html_gafbe3e51f670320908cfe4e20d3e5559e\"><div class=\"ttname\"><a href=\"group__input.html#gafbe3e51f670320908cfe4e20d3e5559e\">glfwGetJoystickName</a></div><div class=\"ttdeci\">const char * glfwGetJoystickName(int jid)</div><div class=\"ttdoc\">Returns the name of the specified joystick.</div></div>\n<div class=\"ttc\" id=\"agroup__input_html_ga4cfad918fa836f09541e7b9acd36686c\"><div class=\"ttname\"><a href=\"group__input.html#ga4cfad918fa836f09541e7b9acd36686c\">GLFWcursorposfun</a></div><div class=\"ttdeci\">void(* GLFWcursorposfun)(GLFWwindow *, double, double)</div><div class=\"ttdoc\">The function pointer type for cursor position callbacks.</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:1427</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_gace2afda29b4116ec012e410a6819033e\"><div class=\"ttname\"><a href=\"group__window.html#gace2afda29b4116ec012e410a6819033e\">glfwSetWindowAttrib</a></div><div class=\"ttdeci\">void glfwSetWindowAttrib(GLFWwindow *window, int attrib, int value)</div><div class=\"ttdoc\">Sets an attribute of the specified window.</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_ga52527a5904b47d802b6b4bb519cdebc7\"><div class=\"ttname\"><a href=\"group__window.html#ga52527a5904b47d802b6b4bb519cdebc7\">glfwRestoreWindow</a></div><div class=\"ttdeci\">void glfwRestoreWindow(GLFWwindow *window)</div><div class=\"ttdoc\">Restores the specified window.</div></div>\n<div class=\"ttc\" id=\"agroup__input_html_gac1473feacb5996c01a7a5a33b5066704\"><div class=\"ttname\"><a href=\"group__input.html#gac1473feacb5996c01a7a5a33b5066704\">glfwGetMouseButton</a></div><div class=\"ttdeci\">int glfwGetMouseButton(GLFWwindow *window, int button)</div><div class=\"ttdoc\">Returns the last reported state of a mouse button for the specified window.</div></div>\n<div class=\"ttc\" id=\"agroup__input_html_ga67ddd1b7dcbbaff03e4a76c0ea67103a\"><div class=\"ttname\"><a href=\"group__input.html#ga67ddd1b7dcbbaff03e4a76c0ea67103a\">glfwGetKeyScancode</a></div><div class=\"ttdeci\">int glfwGetKeyScancode(int key)</div><div class=\"ttdoc\">Returns the platform-specific scancode of the specified key.</div></div>\n<div class=\"ttc\" id=\"agroup__monitor_html_gad3152e84465fa620b601265ebfcdb21b\"><div class=\"ttname\"><a href=\"group__monitor.html#gad3152e84465fa620b601265ebfcdb21b\">glfwGetMonitorContentScale</a></div><div class=\"ttdeci\">void glfwGetMonitorContentScale(GLFWmonitor *monitor, float *xscale, float *yscale)</div><div class=\"ttdoc\">Retrieves the content scale for the specified monitor.</div></div>\n<div class=\"ttc\" id=\"agroup__input_html_gae36fb6897d2b7df9b128900c8ce9c507\"><div class=\"ttname\"><a href=\"group__input.html#gae36fb6897d2b7df9b128900c8ce9c507\">GLFWcharmodsfun</a></div><div class=\"ttdeci\">void(* GLFWcharmodsfun)(GLFWwindow *, unsigned int, int)</div><div class=\"ttdoc\">The function pointer type for Unicode character with modifiers callbacks.</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:1543</div></div>\n<div class=\"ttc\" id=\"agroup__input_html_gafca356935e10135016aa49ffa464c355\"><div class=\"ttname\"><a href=\"group__input.html#gafca356935e10135016aa49ffa464c355\">glfwCreateCursor</a></div><div class=\"ttdeci\">GLFWcursor * glfwCreateCursor(const GLFWimage *image, int xhot, int yhot)</div><div class=\"ttdoc\">Creates a custom cursor.</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_gaf5d31de9c19c4f994facea64d2b3106c\"><div class=\"ttname\"><a href=\"group__window.html#gaf5d31de9c19c4f994facea64d2b3106c\">glfwGetWindowContentScale</a></div><div class=\"ttdeci\">void glfwGetWindowContentScale(GLFWwindow *window, float *xscale, float *yscale)</div><div class=\"ttdoc\">Retrieves the content scale for the specified window.</div></div>\n<div class=\"ttc\" id=\"agroup__input_html_ga237a182e5ec0b21ce64543f3b5e7e2be\"><div class=\"ttname\"><a href=\"group__input.html#ga237a182e5ec0b21ce64543f3b5e7e2be\">glfwGetKeyName</a></div><div class=\"ttdeci\">const char * glfwGetKeyName(int key, int scancode)</div><div class=\"ttdoc\">Returns the layout-specific name of the specified printable key.</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_ga1c5c7eb889c33c7f4d10dd35b327654e\"><div class=\"ttname\"><a href=\"group__window.html#ga1c5c7eb889c33c7f4d10dd35b327654e\">glfwSetWindowRefreshCallback</a></div><div class=\"ttdeci\">GLFWwindowrefreshfun glfwSetWindowRefreshCallback(GLFWwindow *window, GLFWwindowrefreshfun callback)</div><div class=\"ttdoc\">Sets the refresh callback for the specified window.</div></div>\n<div class=\"ttc\" id=\"agroup__monitor_html_gab39df645587c8518192aa746c2fb06c3\"><div class=\"ttname\"><a href=\"group__monitor.html#gab39df645587c8518192aa746c2fb06c3\">glfwSetMonitorCallback</a></div><div class=\"ttdeci\">GLFWmonitorfun glfwSetMonitorCallback(GLFWmonitorfun callback)</div><div class=\"ttdoc\">Sets the monitor configuration callback.</div></div>\n<div class=\"ttc\" id=\"astructGLFWimage_html_a0b7d95368f0c80d5e5c9875057c7dbec\"><div class=\"ttname\"><a href=\"structGLFWimage.html#a0b7d95368f0c80d5e5c9875057c7dbec\">GLFWimage::height</a></div><div class=\"ttdeci\">int height</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:1694</div></div>\n<div class=\"ttc\" id=\"astructGLFWgammaramp_html\"><div class=\"ttname\"><a href=\"structGLFWgammaramp.html\">GLFWgammaramp</a></div><div class=\"ttdoc\">Gamma ramp.</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:1658</div></div>\n<div class=\"ttc\" id=\"agroup__input_html_gaa92336e173da9c8834558b54ee80563b\"><div class=\"ttname\"><a href=\"group__input.html#gaa92336e173da9c8834558b54ee80563b\">glfwSetInputMode</a></div><div class=\"ttdeci\">void glfwSetInputMode(GLFWwindow *window, int mode, int value)</div><div class=\"ttdoc\">Sets an input option for the specified window.</div></div>\n<div class=\"ttc\" id=\"agroup__init_html_ga6b8a2639706d5c409fc1287e8f55e928\"><div class=\"ttname\"><a href=\"group__init.html#ga6b8a2639706d5c409fc1287e8f55e928\">GLFWerrorfun</a></div><div class=\"ttdeci\">void(* GLFWerrorfun)(int, const char *)</div><div class=\"ttdoc\">The function pointer type for error callbacks.</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:1188</div></div>\n<div class=\"ttc\" id=\"agroup__input_html_ga0192a232a41e4e82948217c8ba94fdfd\"><div class=\"ttname\"><a href=\"group__input.html#ga0192a232a41e4e82948217c8ba94fdfd\">GLFWkeyfun</a></div><div class=\"ttdeci\">void(* GLFWkeyfun)(GLFWwindow *, int, int, int, int)</div><div class=\"ttdoc\">The function pointer type for keyboard key callbacks.</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:1495</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_gad91b8b047a0c4c6033c38853864c34f8\"><div class=\"ttname\"><a href=\"group__window.html#gad91b8b047a0c4c6033c38853864c34f8\">glfwSetWindowSizeCallback</a></div><div class=\"ttdeci\">GLFWwindowsizefun glfwSetWindowSizeCallback(GLFWwindow *window, GLFWwindowsizefun callback)</div><div class=\"ttdoc\">Sets the size callback for the specified window.</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_ga7269a3d1cb100c0081f95fc09afa4949\"><div class=\"ttname\"><a href=\"group__window.html#ga7269a3d1cb100c0081f95fc09afa4949\">GLFWwindowmaximizefun</a></div><div class=\"ttdeci\">void(* GLFWwindowmaximizefun)(GLFWwindow *, int)</div><div class=\"ttdoc\">The function pointer type for window maximize callbacks.</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:1336</div></div>\n<div class=\"ttc\" id=\"agroup__context_html_gac84759b1f6c2d271a4fea8ae89ec980d\"><div class=\"ttname\"><a href=\"group__context.html#gac84759b1f6c2d271a4fea8ae89ec980d\">glfwGetCurrentContext</a></div><div class=\"ttdeci\">GLFWwindow * glfwGetCurrentContext(void)</div><div class=\"ttdoc\">Returns the window whose context is current on the calling thread.</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_ga81c76c418af80a1cce7055bccb0ae0a7\"><div class=\"ttname\"><a href=\"group__window.html#ga81c76c418af80a1cce7055bccb0ae0a7\">glfwSetWindowMonitor</a></div><div class=\"ttdeci\">void glfwSetWindowMonitor(GLFWwindow *window, GLFWmonitor *monitor, int xpos, int ypos, int width, int height, int refreshRate)</div><div class=\"ttdoc\">Sets the mode, monitor, video mode and placement of a window.</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_ga73cb526c000876fd8ddf571570fdb634\"><div class=\"ttname\"><a href=\"group__window.html#ga73cb526c000876fd8ddf571570fdb634\">glfwGetWindowPos</a></div><div class=\"ttdeci\">void glfwGetWindowPos(GLFWwindow *window, int *xpos, int *ypos)</div><div class=\"ttdoc\">Retrieves the position of the content area of the specified window.</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_gacbe64c339fbd94885e62145563b6dc93\"><div class=\"ttname\"><a href=\"group__window.html#gacbe64c339fbd94885e62145563b6dc93\">glfwSetWindowMaximizeCallback</a></div><div class=\"ttdeci\">GLFWwindowmaximizefun glfwSetWindowMaximizeCallback(GLFWwindow *window, GLFWwindowmaximizefun callback)</div><div class=\"ttdoc\">Sets the maximize callback for the specified window.</div></div>\n<div class=\"ttc\" id=\"agroup__input_html_ga51ab436c41eeaed6db5a0c9403b1c840\"><div class=\"ttname\"><a href=\"group__input.html#ga51ab436c41eeaed6db5a0c9403b1c840\">GLFWcursorenterfun</a></div><div class=\"ttdeci\">void(* GLFWcursorenterfun)(GLFWwindow *, int)</div><div class=\"ttdoc\">The function pointer type for cursor enter/leave callbacks.</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:1448</div></div>\n<div class=\"ttc\" id=\"agroup__vulkan_html_ga70c01918dc9d233a4fbe0681a43018af\"><div class=\"ttname\"><a href=\"group__vulkan.html#ga70c01918dc9d233a4fbe0681a43018af\">GLFWvkproc</a></div><div class=\"ttdeci\">void(* GLFWvkproc)(void)</div><div class=\"ttdoc\">Vulkan API function pointer type.</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:1128</div></div>\n<div class=\"ttc\" id=\"agroup__input_html_gaf5b859dbe19bdf434e42695ea45cc5f4\"><div class=\"ttname\"><a href=\"group__input.html#gaf5b859dbe19bdf434e42695ea45cc5f4\">glfwGetInputMode</a></div><div class=\"ttdeci\">int glfwGetInputMode(GLFWwindow *window, int mode)</div><div class=\"ttdoc\">Returns the value of an input option for the specified window.</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_ga5d877f09e968cef7a360b513306f17ff\"><div class=\"ttname\"><a href=\"group__window.html#ga5d877f09e968cef7a360b513306f17ff\">glfwSetWindowTitle</a></div><div class=\"ttdeci\">void glfwSetWindowTitle(GLFWwindow *window, const char *title)</div><div class=\"ttdoc\">Sets the title of the specified window.</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_ga3c96d80d363e67d13a41b5d1821f3242\"><div class=\"ttname\"><a href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a></div><div class=\"ttdeci\">struct GLFWwindow GLFWwindow</div><div class=\"ttdoc\">Opaque window object.</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:1152</div></div>\n<div class=\"ttc\" id=\"agroup__monitor_html_ga7387a3bdb64bfe8ebf2b9e54f5b6c9d0\"><div class=\"ttname\"><a href=\"group__monitor.html#ga7387a3bdb64bfe8ebf2b9e54f5b6c9d0\">glfwGetMonitorWorkarea</a></div><div class=\"ttdeci\">void glfwGetMonitorWorkarea(GLFWmonitor *monitor, int *xpos, int *ypos, int *width, int *height)</div><div class=\"ttdoc\">Retrieves the work area of the monitor.</div></div>\n<div class=\"ttc\" id=\"agroup__input_html_ga6b2f72d64d636b48a727b437cbb7489e\"><div class=\"ttname\"><a href=\"group__input.html#ga6b2f72d64d636b48a727b437cbb7489e\">glfwSetJoystickUserPointer</a></div><div class=\"ttdeci\">void glfwSetJoystickUserPointer(int jid, void *pointer)</div><div class=\"ttdoc\">Sets the user pointer of the specified joystick.</div></div>\n<div class=\"ttc\" id=\"agroup__init_html_gaaae48c0a18607ea4a4ba951d939f0901\"><div class=\"ttname\"><a href=\"group__init.html#gaaae48c0a18607ea4a4ba951d939f0901\">glfwTerminate</a></div><div class=\"ttdeci\">void glfwTerminate(void)</div><div class=\"ttdoc\">Terminates the GLFW library.</div></div>\n<div class=\"ttc\" id=\"agroup__context_html_ga87425065c011cef1ebd6aac75e059dfa\"><div class=\"ttname\"><a href=\"group__context.html#ga87425065c011cef1ebd6aac75e059dfa\">glfwExtensionSupported</a></div><div class=\"ttdeci\">int glfwExtensionSupported(const char *extension)</div><div class=\"ttdoc\">Returns whether the specified extension is available.</div></div>\n<div class=\"ttc\" id=\"agroup__input_html_ga6ab84420974d812bee700e45284a723c\"><div class=\"ttname\"><a href=\"group__input.html#ga6ab84420974d812bee700e45284a723c\">glfwSetMouseButtonCallback</a></div><div class=\"ttdeci\">GLFWmousebuttonfun glfwSetMouseButtonCallback(GLFWwindow *window, GLFWmousebuttonfun callback)</div><div class=\"ttdoc\">Sets the mouse button callback.</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_ga15a5a1ee5b3c2ca6b15ca209a12efd14\"><div class=\"ttname\"><a href=\"group__window.html#ga15a5a1ee5b3c2ca6b15ca209a12efd14\">glfwSwapBuffers</a></div><div class=\"ttdeci\">void glfwSwapBuffers(GLFWwindow *window)</div><div class=\"ttdoc\">Swaps the front and back buffers of the specified window.</div></div>\n<div class=\"ttc\" id=\"agroup__context_html_ga1c04dc242268f827290fe40aa1c91157\"><div class=\"ttname\"><a href=\"group__context.html#ga1c04dc242268f827290fe40aa1c91157\">glfwMakeContextCurrent</a></div><div class=\"ttdeci\">void glfwMakeContextCurrent(GLFWwindow *window)</div><div class=\"ttdoc\">Makes the context of the specified window current for the calling thread.</div></div>\n<div class=\"ttc\" id=\"agroup__context_html_ga6d4e0cdf151b5e579bd67f13202994ed\"><div class=\"ttname\"><a href=\"group__context.html#ga6d4e0cdf151b5e579bd67f13202994ed\">glfwSwapInterval</a></div><div class=\"ttdeci\">void glfwSwapInterval(int interval)</div><div class=\"ttdoc\">Sets the swap interval for the current context.</div></div>\n<div class=\"ttc\" id=\"agroup__input_html_ga2d8d0634bb81c180899aeb07477a67ea\"><div class=\"ttname\"><a href=\"group__input.html#ga2d8d0634bb81c180899aeb07477a67ea\">glfwGetJoystickHats</a></div><div class=\"ttdeci\">const unsigned char * glfwGetJoystickHats(int jid, int *count)</div><div class=\"ttdoc\">Returns the state of all hats of the specified joystick.</div></div>\n<div class=\"ttc\" id=\"astructGLFWvidmode_html_af310977f58d2e3b188175b6e3d314047\"><div class=\"ttname\"><a href=\"structGLFWvidmode.html#af310977f58d2e3b188175b6e3d314047\">GLFWvidmode::blueBits</a></div><div class=\"ttdeci\">int blueBits</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:1640</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_ga1a9fd382058c53101b21cf211898f1f1\"><div class=\"ttname\"><a href=\"group__window.html#ga1a9fd382058c53101b21cf211898f1f1\">glfwGetWindowFrameSize</a></div><div class=\"ttdeci\">void glfwGetWindowFrameSize(GLFWwindow *window, int *left, int *top, int *right, int *bottom)</div><div class=\"ttdoc\">Retrieves the size of the frame of the window.</div></div>\n<div class=\"ttc\" id=\"agroup__input_html_ga5c71e3533b2d384db9317fcd7661b210\"><div class=\"ttname\"><a href=\"group__input.html#ga5c71e3533b2d384db9317fcd7661b210\">glfwGetGamepadName</a></div><div class=\"ttdeci\">const char * glfwGetGamepadName(int jid)</div><div class=\"ttdoc\">Returns the human-readable gamepad name for the specified joystick.</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_ga24e02fbfefbb81fc45320989f8140ab5\"><div class=\"ttname\"><a href=\"group__window.html#ga24e02fbfefbb81fc45320989f8140ab5\">glfwWindowShouldClose</a></div><div class=\"ttdeci\">int glfwWindowShouldClose(GLFWwindow *window)</div><div class=\"ttdoc\">Checks the close flag of the specified window.</div></div>\n<div class=\"ttc\" id=\"agroup__input_html_gaf59589ef6e8b8c8b5ad184b25afd4dc0\"><div class=\"ttname\"><a href=\"group__input.html#gaf59589ef6e8b8c8b5ad184b25afd4dc0\">glfwSetTime</a></div><div class=\"ttdeci\">void glfwSetTime(double time)</div><div class=\"ttdoc\">Sets the GLFW time.</div></div>\n<div class=\"ttc\" id=\"agroup__monitor_html_ga583f0ffd0d29613d8cd172b996bbf0dd\"><div class=\"ttname\"><a href=\"group__monitor.html#ga583f0ffd0d29613d8cd172b996bbf0dd\">glfwSetGammaRamp</a></div><div class=\"ttdeci\">void glfwSetGammaRamp(GLFWmonitor *monitor, const GLFWgammaramp *ramp)</div><div class=\"ttdoc\">Sets the current gamma ramp for the specified monitor.</div></div>\n<div class=\"ttc\" id=\"agroup__input_html_ga01d37b6c40133676b9cea60ca1d7c0cc\"><div class=\"ttname\"><a href=\"group__input.html#ga01d37b6c40133676b9cea60ca1d7c0cc\">glfwGetCursorPos</a></div><div class=\"ttdeci\">void glfwGetCursorPos(GLFWwindow *window, double *xpos, double *ypos)</div><div class=\"ttdoc\">Retrieves the position of the cursor relative to the content area of the window.</div></div>\n<div class=\"ttc\" id=\"agroup__init_html_ga110fd1d3f0412822b4f1908c026f724a\"><div class=\"ttname\"><a href=\"group__init.html#ga110fd1d3f0412822b4f1908c026f724a\">glfwInitHint</a></div><div class=\"ttdeci\">void glfwInitHint(int hint, int value)</div><div class=\"ttdoc\">Sets the specified init hint to the desired value.</div></div>\n<div class=\"ttc\" id=\"agroup__input_html_gad0f676860f329d80f7e47e9f06a96f00\"><div class=\"ttname\"><a href=\"group__input.html#gad0f676860f329d80f7e47e9f06a96f00\">glfwJoystickIsGamepad</a></div><div class=\"ttdeci\">int glfwJoystickIsGamepad(int jid)</div><div class=\"ttdoc\">Returns whether the specified joystick has a gamepad mapping.</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_ga37bd57223967b4211d60ca1a0bf3c832\"><div class=\"ttname\"><a href=\"group__window.html#ga37bd57223967b4211d60ca1a0bf3c832\">glfwPollEvents</a></div><div class=\"ttdeci\">void glfwPollEvents(void)</div><div class=\"ttdoc\">Processes all pending events.</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_ga554e37d781f0a997656c26b2c56c835e\"><div class=\"ttname\"><a href=\"group__window.html#ga554e37d781f0a997656c26b2c56c835e\">glfwWaitEvents</a></div><div class=\"ttdeci\">void glfwWaitEvents(void)</div><div class=\"ttdoc\">Waits until events are queued and processes them.</div></div>\n<div class=\"ttc\" id=\"agroup__input_html_ga81b952cd1764274d0db7fb3c5a79ba6a\"><div class=\"ttname\"><a href=\"group__input.html#ga81b952cd1764274d0db7fb3c5a79ba6a\">glfwDestroyCursor</a></div><div class=\"ttdeci\">void glfwDestroyCursor(GLFWcursor *cursor)</div><div class=\"ttdoc\">Destroys a cursor.</div></div>\n<div class=\"ttc\" id=\"agroup__input_html_gadb3cbf44af90a1536f519659a53bddd6\"><div class=\"ttname\"><a href=\"group__input.html#gadb3cbf44af90a1536f519659a53bddd6\">glfwGetJoystickButtons</a></div><div class=\"ttdeci\">const unsigned char * glfwGetJoystickButtons(int jid, int *count)</div><div class=\"ttdoc\">Returns the state of all buttons of the specified joystick.</div></div>\n<div class=\"ttc\" id=\"agroup__input_html_ga4687e2199c60a18a8dd1da532e6d75c9\"><div class=\"ttname\"><a href=\"group__input.html#ga4687e2199c60a18a8dd1da532e6d75c9\">GLFWscrollfun</a></div><div class=\"ttdeci\">void(* GLFWscrollfun)(GLFWwindow *, double, double)</div><div class=\"ttdoc\">The function pointer type for scroll callbacks.</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:1469</div></div>\n<div class=\"ttc\" id=\"agroup__monitor_html_ga79a34ee22ff080ca954a9663e4679daf\"><div class=\"ttname\"><a href=\"group__monitor.html#ga79a34ee22ff080ca954a9663e4679daf\">glfwGetMonitorName</a></div><div class=\"ttdeci\">const char * glfwGetMonitorName(GLFWmonitor *monitor)</div><div class=\"ttdoc\">Returns the name of the specified monitor.</div></div>\n<div class=\"ttc\" id=\"agroup__input_html_gab25c4a220fd8f5717718dbc487828996\"><div class=\"ttname\"><a href=\"group__input.html#gab25c4a220fd8f5717718dbc487828996\">glfwSetCharCallback</a></div><div class=\"ttdeci\">GLFWcharfun glfwSetCharCallback(GLFWwindow *window, GLFWcharfun callback)</div><div class=\"ttdoc\">Sets the Unicode character callback.</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_gac314fa6cec7d2d307be9963e2709cc90\"><div class=\"ttname\"><a href=\"group__window.html#gac314fa6cec7d2d307be9963e2709cc90\">glfwSetWindowSizeLimits</a></div><div class=\"ttdeci\">void glfwSetWindowSizeLimits(GLFWwindow *window, int minwidth, int minheight, int maxwidth, int maxheight)</div><div class=\"ttdoc\">Sets the size limits of the specified window.</div></div>\n<div class=\"ttc\" id=\"agroup__monitor_html_ga721867d84c6d18d6790d64d2847ca0b1\"><div class=\"ttname\"><a href=\"group__monitor.html#ga721867d84c6d18d6790d64d2847ca0b1\">glfwGetPrimaryMonitor</a></div><div class=\"ttdeci\">GLFWmonitor * glfwGetPrimaryMonitor(void)</div><div class=\"ttdoc\">Returns the primary monitor.</div></div>\n<div class=\"ttc\" id=\"agroup__monitor_html_ga8a7ee579a66720f24d656526f3e44c63\"><div class=\"ttname\"><a href=\"group__monitor.html#ga8a7ee579a66720f24d656526f3e44c63\">GLFWmonitorfun</a></div><div class=\"ttdeci\">void(* GLFWmonitorfun)(GLFWmonitor *, int)</div><div class=\"ttdoc\">The function pointer type for monitor configuration callbacks.</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:1588</div></div>\n<div class=\"ttc\" id=\"agroup__input_html_gaa67aa597e974298c748bfe4fb17d406d\"><div class=\"ttname\"><a href=\"group__input.html#gaa67aa597e974298c748bfe4fb17d406d\">GLFWjoystickfun</a></div><div class=\"ttdeci\">void(* GLFWjoystickfun)(int, int)</div><div class=\"ttdoc\">The function pointer type for joystick configuration callbacks.</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:1609</div></div>\n<div class=\"ttc\" id=\"agroup__input_html_gae168c2c0b8cf2a1cb67c6b3c00bdd543\"><div class=\"ttname\"><a href=\"group__input.html#gae168c2c0b8cf2a1cb67c6b3c00bdd543\">glfwGetJoystickGUID</a></div><div class=\"ttdeci\">const char * glfwGetJoystickGUID(int jid)</div><div class=\"ttdoc\">Returns the SDL compatible GUID of the specified joystick.</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_gac2d83c4a10f071baf841f6730528e66c\"><div class=\"ttname\"><a href=\"group__window.html#gac2d83c4a10f071baf841f6730528e66c\">glfwSetWindowFocusCallback</a></div><div class=\"ttdeci\">GLFWwindowfocusfun glfwSetWindowFocusCallback(GLFWwindow *window, GLFWwindowfocusfun callback)</div><div class=\"ttdoc\">Sets the focus callback for the specified window.</div></div>\n<div class=\"ttc\" id=\"agroup__vulkan_html_ga1abcbe61033958f22f63ef82008874b1\"><div class=\"ttname\"><a href=\"group__vulkan.html#ga1abcbe61033958f22f63ef82008874b1\">glfwGetRequiredInstanceExtensions</a></div><div class=\"ttdeci\">const char ** glfwGetRequiredInstanceExtensions(uint32_t *count)</div><div class=\"ttdoc\">Returns the Vulkan instance extensions required by GLFW.</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_gada646d775a7776a95ac000cfc1885331\"><div class=\"ttname\"><a href=\"group__window.html#gada646d775a7776a95ac000cfc1885331\">glfwSetWindowCloseCallback</a></div><div class=\"ttdeci\">GLFWwindowclosefun glfwSetWindowCloseCallback(GLFWwindow *window, GLFWwindowclosefun callback)</div><div class=\"ttdoc\">Sets the close callback for the specified window.</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_ga873780357abd3f3a081d71a40aae45a1\"><div class=\"ttname\"><a href=\"group__window.html#ga873780357abd3f3a081d71a40aae45a1\">glfwFocusWindow</a></div><div class=\"ttdeci\">void glfwFocusWindow(GLFWwindow *window)</div><div class=\"ttdoc\">Brings the specified window to front and sets input focus.</div></div>\n<div class=\"ttc\" id=\"agroup__context_html_ga3d47c2d2fbe0be9c505d0e04e91a133c\"><div class=\"ttname\"><a href=\"group__context.html#ga3d47c2d2fbe0be9c505d0e04e91a133c\">GLFWglproc</a></div><div class=\"ttdeci\">void(* GLFWglproc)(void)</div><div class=\"ttdoc\">Client API function pointer type.</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:1114</div></div>\n<div class=\"ttc\" id=\"agroup__input_html_ga5aba1d704d9ab539282b1fbe9f18bb94\"><div class=\"ttname\"><a href=\"group__input.html#ga5aba1d704d9ab539282b1fbe9f18bb94\">glfwGetClipboardString</a></div><div class=\"ttdeci\">const char * glfwGetClipboardString(GLFWwindow *window)</div><div class=\"ttdoc\">Returns the contents of the clipboard as a string.</div></div>\n<div class=\"ttc\" id=\"astructGLFWvidmode_html_ac65942a5f6981695517437a9d571d03c\"><div class=\"ttname\"><a href=\"structGLFWvidmode.html#ac65942a5f6981695517437a9d571d03c\">GLFWvidmode::height</a></div><div class=\"ttdeci\">int height</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:1631</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_gaf2832ebb5aa6c252a2d261de002c92d6\"><div class=\"ttname\"><a href=\"group__window.html#gaf2832ebb5aa6c252a2d261de002c92d6\">glfwSetWindowContentScaleCallback</a></div><div class=\"ttdeci\">GLFWwindowcontentscalefun glfwSetWindowContentScaleCallback(GLFWwindow *window, GLFWwindowcontentscalefun callback)</div><div class=\"ttdoc\">Sets the window content scale callback for the specified window.</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_ga08bdfbba88934f9c4f92fd757979ac74\"><div class=\"ttname\"><a href=\"group__window.html#ga08bdfbba88934f9c4f92fd757979ac74\">glfwSetWindowPosCallback</a></div><div class=\"ttdeci\">GLFWwindowposfun glfwSetWindowPosCallback(GLFWwindow *window, GLFWwindowposfun callback)</div><div class=\"ttdoc\">Sets the position callback for the specified window.</div></div>\n<div class=\"ttc\" id=\"agroup__input_html_gad27f8ad0142c038a281466c0966817d8\"><div class=\"ttname\"><a href=\"group__input.html#gad27f8ad0142c038a281466c0966817d8\">glfwSetCursorEnterCallback</a></div><div class=\"ttdeci\">GLFWcursorenterfun glfwSetCursorEnterCallback(GLFWwindow *window, GLFWcursorenterfun callback)</div><div class=\"ttdoc\">Sets the cursor enter/leave callback.</div></div>\n<div class=\"ttc\" id=\"agroup__input_html_gad3b4f38c8d5dae036bc8fa959e18343e\"><div class=\"ttname\"><a href=\"group__input.html#gad3b4f38c8d5dae036bc8fa959e18343e\">glfwSetCursor</a></div><div class=\"ttdeci\">void glfwSetCursor(GLFWwindow *window, GLFWcursor *cursor)</div><div class=\"ttdoc\">Sets the cursor for the window.</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_ga3e218ef9ff826129c55a7d5f6971a285\"><div class=\"ttname\"><a href=\"group__window.html#ga3e218ef9ff826129c55a7d5f6971a285\">GLFWframebuffersizefun</a></div><div class=\"ttdeci\">void(* GLFWframebuffersizefun)(GLFWwindow *, int, int)</div><div class=\"ttdoc\">The function pointer type for framebuffer size callbacks.</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:1357</div></div>\n<div class=\"ttc\" id=\"agroup__monitor_html_ga3fba51c8bd36491d4712aa5bd074a537\"><div class=\"ttname\"><a href=\"group__monitor.html#ga3fba51c8bd36491d4712aa5bd074a537\">glfwGetMonitors</a></div><div class=\"ttdeci\">GLFWmonitor ** glfwGetMonitors(int *count)</div><div class=\"ttdoc\">Returns the currently connected monitors.</div></div>\n<div class=\"ttc\" id=\"agroup__input_html_gae4ee0dbd0d256183e1ea4026d897e1c2\"><div class=\"ttname\"><a href=\"group__input.html#gae4ee0dbd0d256183e1ea4026d897e1c2\">glfwRawMouseMotionSupported</a></div><div class=\"ttdeci\">int glfwRawMouseMotionSupported(void)</div><div class=\"ttdoc\">Returns whether raw mouse motion is supported.</div></div>\n<div class=\"ttc\" id=\"agroup__monitor_html_ga702750e24313a686d3637297b6e85fda\"><div class=\"ttname\"><a href=\"group__monitor.html#ga702750e24313a686d3637297b6e85fda\">glfwSetMonitorUserPointer</a></div><div class=\"ttdeci\">void glfwSetMonitorUserPointer(GLFWmonitor *monitor, void *pointer)</div><div class=\"ttdoc\">Sets the user pointer of the specified monitor.</div></div>\n<div class=\"ttc\" id=\"astructGLFWimage_html_a0c532a5c2bb715555279b7817daba0fb\"><div class=\"ttname\"><a href=\"structGLFWimage.html#a0c532a5c2bb715555279b7817daba0fb\">GLFWimage::pixels</a></div><div class=\"ttdeci\">unsigned char * pixels</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:1697</div></div>\n<div class=\"ttc\" id=\"agroup__monitor_html_ga820b0ce9a5237d645ea7cbb4bd383458\"><div class=\"ttname\"><a href=\"group__monitor.html#ga820b0ce9a5237d645ea7cbb4bd383458\">glfwGetVideoModes</a></div><div class=\"ttdeci\">const GLFWvidmode * glfwGetVideoModes(GLFWmonitor *monitor, int *count)</div><div class=\"ttdoc\">Returns the available video modes for the specified monitor.</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_ga61be47917b72536a148300f46494fc66\"><div class=\"ttname\"><a href=\"group__window.html#ga61be47917b72536a148300f46494fc66\">glfwShowWindow</a></div><div class=\"ttdeci\">void glfwShowWindow(GLFWwindow *window)</div><div class=\"ttdoc\">Makes the specified window visible.</div></div>\n<div class=\"ttc\" id=\"astructGLFWgammaramp_html_affccc6f5df47820b6562d709da3a5a3a\"><div class=\"ttname\"><a href=\"structGLFWgammaramp.html#affccc6f5df47820b6562d709da3a5a3a\">GLFWgammaramp::green</a></div><div class=\"ttdeci\">unsigned short * green</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:1665</div></div>\n<div class=\"ttc\" id=\"agroup__input_html_ga0b86867abb735af3b959f61c44b1d029\"><div class=\"ttname\"><a href=\"group__input.html#ga0b86867abb735af3b959f61c44b1d029\">GLFWgamepadstate</a></div><div class=\"ttdeci\">struct GLFWgamepadstate GLFWgamepadstate</div><div class=\"ttdoc\">Gamepad input state.</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_ga2f8d59323fc4692c1d54ba08c863a703\"><div class=\"ttname\"><a href=\"group__window.html#ga2f8d59323fc4692c1d54ba08c863a703\">glfwRequestWindowAttention</a></div><div class=\"ttdeci\">void glfwRequestWindowAttention(GLFWwindow *window)</div><div class=\"ttdoc\">Requests user attention to the specified window.</div></div>\n<div class=\"ttc\" id=\"agroup__input_html_gaed0966cee139d815317f9ffcba64c9f1\"><div class=\"ttname\"><a href=\"group__input.html#gaed0966cee139d815317f9ffcba64c9f1\">glfwJoystickPresent</a></div><div class=\"ttdeci\">int glfwJoystickPresent(int jid)</div><div class=\"ttdoc\">Returns whether the specified joystick is present.</div></div>\n<div class=\"ttc\" id=\"astructGLFWgamepadstate_html_a27e9896b51c65df15fba2c7139bfdb9a\"><div class=\"ttname\"><a href=\"structGLFWgamepadstate.html#a27e9896b51c65df15fba2c7139bfdb9a\">GLFWgamepadstate::buttons</a></div><div class=\"ttdeci\">unsigned char buttons[15]</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:1716</div></div>\n<div class=\"ttc\" id=\"agroup__vulkan_html_ga2e7f30931e02464b5bc8d0d4b6f9fe2b\"><div class=\"ttname\"><a href=\"group__vulkan.html#ga2e7f30931e02464b5bc8d0d4b6f9fe2b\">glfwVulkanSupported</a></div><div class=\"ttdeci\">int glfwVulkanSupported(void)</div><div class=\"ttdoc\">Returns whether the Vulkan loader and an ICD have been found.</div></div>\n<div class=\"ttc\" id=\"agroup__monitor_html_ga102f54e7acc9149edbcf0997152df8c9\"><div class=\"ttname\"><a href=\"group__monitor.html#ga102f54e7acc9149edbcf0997152df8c9\">glfwGetMonitorPos</a></div><div class=\"ttdeci\">void glfwGetMonitorPos(GLFWmonitor *monitor, int *xpos, int *ypos)</div><div class=\"ttdoc\">Returns the position of the monitor's viewport on the virtual screen.</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_ga49401f82a1ba5f15db5590728314d47c\"><div class=\"ttname\"><a href=\"group__window.html#ga49401f82a1ba5f15db5590728314d47c\">glfwHideWindow</a></div><div class=\"ttdeci\">void glfwHideWindow(GLFWwindow *window)</div><div class=\"ttdoc\">Hides the specified window.</div></div>\n<div class=\"ttc\" id=\"astructGLFWvidmode_html_a698dcb200562051a7249cb6ae154c71d\"><div class=\"ttname\"><a href=\"structGLFWvidmode.html#a698dcb200562051a7249cb6ae154c71d\">GLFWvidmode::width</a></div><div class=\"ttdeci\">int width</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:1628</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_ga3f541387449d911274324ae7f17ec56b\"><div class=\"ttname\"><a href=\"group__window.html#ga3f541387449d911274324ae7f17ec56b\">glfwMaximizeWindow</a></div><div class=\"ttdeci\">void glfwMaximizeWindow(GLFWwindow *window)</div><div class=\"ttdoc\">Maximizes the specified window.</div></div>\n<div class=\"ttc\" id=\"astructGLFWgammaramp_html_ad620e1cffbff9a32c51bca46301b59a5\"><div class=\"ttname\"><a href=\"structGLFWgammaramp.html#ad620e1cffbff9a32c51bca46301b59a5\">GLFWgammaramp::size</a></div><div class=\"ttdeci\">unsigned int size</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:1671</div></div>\n<div class=\"ttc\" id=\"agroup__vulkan_html_ga1a24536bec3f80b08ead18e28e6ae965\"><div class=\"ttname\"><a href=\"group__vulkan.html#ga1a24536bec3f80b08ead18e28e6ae965\">glfwCreateWindowSurface</a></div><div class=\"ttdeci\">VkResult glfwCreateWindowSurface(VkInstance instance, GLFWwindow *window, const VkAllocationCallbacks *allocator, VkSurfaceKHR *surface)</div><div class=\"ttdoc\">Creates a Vulkan surface for the specified window.</div></div>\n<div class=\"ttc\" id=\"agroup__input_html_gabf24451c7ceb1952bc02b17a0d5c3e5f\"><div class=\"ttname\"><a href=\"group__input.html#gabf24451c7ceb1952bc02b17a0d5c3e5f\">GLFWcharfun</a></div><div class=\"ttdeci\">void(* GLFWcharfun)(GLFWwindow *, unsigned int)</div><div class=\"ttdoc\">The function pointer type for Unicode character callbacks.</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:1516</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_ga1da46b65eafcc1a7ff0adb8f4a7b72fd\"><div class=\"ttname\"><a href=\"group__window.html#ga1da46b65eafcc1a7ff0adb8f4a7b72fd\">GLFWwindowcontentscalefun</a></div><div class=\"ttdeci\">void(* GLFWwindowcontentscalefun)(GLFWwindow *, float, float)</div><div class=\"ttdoc\">The function pointer type for window content scale callbacks.</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:1378</div></div>\n<div class=\"ttc\" id=\"agroup__input_html_ga09b2bd37d328e0b9456c7ec575cc26aa\"><div class=\"ttname\"><a href=\"group__input.html#ga09b2bd37d328e0b9456c7ec575cc26aa\">glfwGetTimerValue</a></div><div class=\"ttdeci\">uint64_t glfwGetTimerValue(void)</div><div class=\"ttdoc\">Returns the current value of the raw timer.</div></div>\n<div class=\"ttc\" id=\"astructGLFWgammaramp_html_a2cce5d968734b685623eef913e635138\"><div class=\"ttname\"><a href=\"structGLFWgammaramp.html#a2cce5d968734b685623eef913e635138\">GLFWgammaramp::red</a></div><div class=\"ttdeci\">unsigned short * red</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:1662</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_gaa77c4898dfb83344a6b4f76aa16b9a4a\"><div class=\"ttname\"><a href=\"group__window.html#gaa77c4898dfb83344a6b4f76aa16b9a4a\">glfwDefaultWindowHints</a></div><div class=\"ttdeci\">void glfwDefaultWindowHints(void)</div><div class=\"ttdoc\">Resets all window hints to their default values.</div></div>\n<div class=\"ttc\" id=\"agroup__input_html_gac1f879ab7435d54d4d79bb469fe225d7\"><div class=\"ttname\"><a href=\"group__input.html#gac1f879ab7435d54d4d79bb469fe225d7\">glfwSetCursorPosCallback</a></div><div class=\"ttdeci\">GLFWcursorposfun glfwSetCursorPosCallback(GLFWwindow *window, GLFWcursorposfun callback)</div><div class=\"ttdoc\">Sets the cursor position callback.</div></div>\n<div class=\"ttc\" id=\"agroup__input_html_ga3289ee876572f6e91f06df3a24824443\"><div class=\"ttname\"><a href=\"group__input.html#ga3289ee876572f6e91f06df3a24824443\">glfwGetTimerFrequency</a></div><div class=\"ttdeci\">uint64_t glfwGetTimerFrequency(void)</div><div class=\"ttdoc\">Returns the frequency, in Hz, of the raw timer.</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_gadd7ccd39fe7a7d1f0904666ae5932dc5\"><div class=\"ttname\"><a href=\"group__window.html#gadd7ccd39fe7a7d1f0904666ae5932dc5\">glfwSetWindowIcon</a></div><div class=\"ttdeci\">void glfwSetWindowIcon(GLFWwindow *window, int count, const GLFWimage *images)</div><div class=\"ttdoc\">Sets the icon for the specified window.</div></div>\n<div class=\"ttc\" id=\"astructGLFWimage_html_af6a71cc999fe6d3aea31dd7e9687d835\"><div class=\"ttname\"><a href=\"structGLFWimage.html#af6a71cc999fe6d3aea31dd7e9687d835\">GLFWimage::width</a></div><div class=\"ttdeci\">int width</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:1691</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_ga5c336fddf2cbb5b92f65f10fb6043344\"><div class=\"ttname\"><a href=\"group__window.html#ga5c336fddf2cbb5b92f65f10fb6043344\">glfwCreateWindow</a></div><div class=\"ttdeci\">GLFWwindow * glfwCreateWindow(int width, int height, const char *title, GLFWmonitor *monitor, GLFWwindow *share)</div><div class=\"ttdoc\">Creates a window and its associated context.</div></div>\n<div class=\"ttc\" id=\"agroup__input_html_ga0b7f4ad13c2b17435ff13b6dcfb4e43c\"><div class=\"ttname\"><a href=\"group__input.html#ga0b7f4ad13c2b17435ff13b6dcfb4e43c\">glfwSetCharModsCallback</a></div><div class=\"ttdeci\">GLFWcharmodsfun glfwSetCharModsCallback(GLFWwindow *window, GLFWcharmodsfun callback)</div><div class=\"ttdoc\">Sets the Unicode character with modifiers callback.</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_ga49c449dde2a6f87d996f4daaa09d6708\"><div class=\"ttname\"><a href=\"group__window.html#ga49c449dde2a6f87d996f4daaa09d6708\">glfwSetWindowShouldClose</a></div><div class=\"ttdeci\">void glfwSetWindowShouldClose(GLFWwindow *window, int value)</div><div class=\"ttdoc\">Sets the close flag of the specified window.</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_ga72ac8cb1ee2e312a878b55153d81b937\"><div class=\"ttname\"><a href=\"group__window.html#ga72ac8cb1ee2e312a878b55153d81b937\">glfwSetWindowAspectRatio</a></div><div class=\"ttdeci\">void glfwSetWindowAspectRatio(GLFWwindow *window, int numer, int denom)</div><div class=\"ttdoc\">Sets the aspect ratio of the specified window.</div></div>\n<div class=\"ttc\" id=\"agroup__monitor_html_gac2d4209016b049222877f620010ed0d8\"><div class=\"ttname\"><a href=\"group__monitor.html#gac2d4209016b049222877f620010ed0d8\">glfwGetMonitorUserPointer</a></div><div class=\"ttdeci\">void * glfwGetMonitorUserPointer(GLFWmonitor *monitor)</div><div class=\"ttdoc\">Returns the user pointer of the specified monitor.</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_ga605a178db92f1a7f1a925563ef3ea2cf\"><div class=\"ttname\"><a href=\"group__window.html#ga605a178db92f1a7f1a925563ef3ea2cf\">glfwWaitEventsTimeout</a></div><div class=\"ttdeci\">void glfwWaitEventsTimeout(double timeout)</div><div class=\"ttdoc\">Waits with timeout until events are queued and processes them.</div></div>\n<div class=\"ttc\" id=\"astructGLFWvidmode_html_a292fdd281f3485fb3ff102a5bda43faa\"><div class=\"ttname\"><a href=\"structGLFWvidmode.html#a292fdd281f3485fb3ff102a5bda43faa\">GLFWvidmode::greenBits</a></div><div class=\"ttdeci\">int greenBits</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:1637</div></div>\n<div class=\"ttc\" id=\"agroup__monitor_html_ga7d8bffc6c55539286a6bd20d32a8d7ea\"><div class=\"ttname\"><a href=\"group__monitor.html#ga7d8bffc6c55539286a6bd20d32a8d7ea\">glfwGetMonitorPhysicalSize</a></div><div class=\"ttdeci\">void glfwGetMonitorPhysicalSize(GLFWmonitor *monitor, int *widthMM, int *heightMM)</div><div class=\"ttdoc\">Returns the physical size of the monitor.</div></div>\n<div class=\"ttc\" id=\"agroup__input_html_ga2f60a0e5b7bd8d1b7344dc0a7cb32b4c\"><div class=\"ttname\"><a href=\"group__input.html#ga2f60a0e5b7bd8d1b7344dc0a7cb32b4c\">glfwSetJoystickCallback</a></div><div class=\"ttdeci\">GLFWjoystickfun glfwSetJoystickCallback(GLFWjoystickfun callback)</div><div class=\"ttdoc\">Sets the joystick configuration callback.</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_gad2d4e4c3d28b1242e742e8268b9528af\"><div class=\"ttname\"><a href=\"group__window.html#gad2d4e4c3d28b1242e742e8268b9528af\">GLFWwindowiconifyfun</a></div><div class=\"ttdeci\">void(* GLFWwindowiconifyfun)(GLFWwindow *, int)</div><div class=\"ttdoc\">The function pointer type for window iconify callbacks.</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:1315</div></div>\n<div class=\"ttc\" id=\"astructGLFWgamepadstate_html\"><div class=\"ttname\"><a href=\"structGLFWgamepadstate.html\">GLFWgamepadstate</a></div><div class=\"ttdoc\">Gamepad input state.</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:1711</div></div>\n<div class=\"ttc\" id=\"agroup__monitor_html_gae48aadf4ea0967e6605c8f58fa5daccb\"><div class=\"ttname\"><a href=\"group__monitor.html#gae48aadf4ea0967e6605c8f58fa5daccb\">GLFWvidmode</a></div><div class=\"ttdeci\">struct GLFWvidmode GLFWvidmode</div><div class=\"ttdoc\">Video mode type.</div></div>\n<div class=\"ttc\" id=\"agroup__input_html_gafd0493dc32cd5ca5810e6148c0c026ea\"><div class=\"ttname\"><a href=\"group__input.html#gafd0493dc32cd5ca5810e6148c0c026ea\">GLFWdropfun</a></div><div class=\"ttdeci\">void(* GLFWdropfun)(GLFWwindow *, int, const char *[])</div><div class=\"ttdoc\">The function pointer type for path drop callbacks.</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:1567</div></div>\n<div class=\"ttc\" id=\"agroup__input_html_ga89261ae18c75e863aaf2656ecdd238f4\"><div class=\"ttname\"><a href=\"group__input.html#ga89261ae18c75e863aaf2656ecdd238f4\">GLFWcursor</a></div><div class=\"ttdeci\">struct GLFWcursor GLFWcursor</div><div class=\"ttdoc\">Opaque cursor object.</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:1164</div></div>\n<div class=\"ttc\" id=\"agroup__input_html_gaa65f416d03ebbbb5b8db71a489fcb894\"><div class=\"ttname\"><a href=\"group__input.html#gaa65f416d03ebbbb5b8db71a489fcb894\">glfwCreateStandardCursor</a></div><div class=\"ttdeci\">GLFWcursor * glfwCreateStandardCursor(int shape)</div><div class=\"ttdoc\">Creates a cursor with a standard shape.</div></div>\n<div class=\"ttc\" id=\"agroup__init_html_ga317aac130a235ab08c6db0834907d85e\"><div class=\"ttname\"><a href=\"group__init.html#ga317aac130a235ab08c6db0834907d85e\">glfwInit</a></div><div class=\"ttdeci\">int glfwInit(void)</div><div class=\"ttdoc\">Initializes the GLFW library.</div></div>\n<div class=\"ttc\" id=\"astructGLFWgamepadstate_html_a8b2c8939b1d31458de5359998375c189\"><div class=\"ttname\"><a href=\"structGLFWgamepadstate.html#a8b2c8939b1d31458de5359998375c189\">GLFWgamepadstate::axes</a></div><div class=\"ttdeci\">float axes[6]</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:1720</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_ga8cb2782861c9d997bcf2dea97f363e5f\"><div class=\"ttname\"><a href=\"group__window.html#ga8cb2782861c9d997bcf2dea97f363e5f\">glfwWindowHintString</a></div><div class=\"ttdeci\">void glfwWindowHintString(int hint, const char *value)</div><div class=\"ttdoc\">Sets the specified window hint to the desired value.</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_gad09f0bd7a6307c4533b7061828480a84\"><div class=\"ttname\"><a href=\"group__window.html#gad09f0bd7a6307c4533b7061828480a84\">glfwGetWindowOpacity</a></div><div class=\"ttdeci\">float glfwGetWindowOpacity(GLFWwindow *window)</div><div class=\"ttdoc\">Returns the opacity of the whole window.</div></div>\n<div class=\"ttc\" id=\"astructGLFWimage_html\"><div class=\"ttname\"><a href=\"structGLFWimage.html\">GLFWimage</a></div><div class=\"ttdoc\">Image data.</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:1687</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_gac31caeb3d1088831b13d2c8a156802e9\"><div class=\"ttname\"><a href=\"group__window.html#gac31caeb3d1088831b13d2c8a156802e9\">glfwSetWindowOpacity</a></div><div class=\"ttdeci\">void glfwSetWindowOpacity(GLFWwindow *window, float opacity)</div><div class=\"ttdoc\">Sets the opacity of the whole window.</div></div>\n<div class=\"ttc\" id=\"agroup__context_html_ga35f1837e6f666781842483937612f163\"><div class=\"ttname\"><a href=\"group__context.html#ga35f1837e6f666781842483937612f163\">glfwGetProcAddress</a></div><div class=\"ttdeci\">GLFWglproc glfwGetProcAddress(const char *procname)</div><div class=\"ttdoc\">Returns the address of the specified function for the current context.</div></div>\n<div class=\"ttc\" id=\"agroup__monitor_html_gab7c41deb2219bde3e1eb756ddaa9ec80\"><div class=\"ttname\"><a href=\"group__monitor.html#gab7c41deb2219bde3e1eb756ddaa9ec80\">glfwGetGammaRamp</a></div><div class=\"ttdeci\">const GLFWgammaramp * glfwGetGammaRamp(GLFWmonitor *monitor)</div><div class=\"ttdoc\">Returns the current gamma ramp for the specified monitor.</div></div>\n<div class=\"ttc\" id=\"agroup__input_html_gab773f0ee0a07cff77a210cea40bc1f6b\"><div class=\"ttname\"><a href=\"group__input.html#gab773f0ee0a07cff77a210cea40bc1f6b\">glfwSetDropCallback</a></div><div class=\"ttdeci\">GLFWdropfun glfwSetDropCallback(GLFWwindow *window, GLFWdropfun callback)</div><div class=\"ttdoc\">Sets the path drop callback.</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_gae49ee6ebc03fa2da024b89943a331355\"><div class=\"ttname\"><a href=\"group__window.html#gae49ee6ebc03fa2da024b89943a331355\">GLFWwindowsizefun</a></div><div class=\"ttdeci\">void(* GLFWwindowsizefun)(GLFWwindow *, int, int)</div><div class=\"ttdoc\">The function pointer type for window size callbacks.</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:1233</div></div>\n<div class=\"ttc\" id=\"astructGLFWgammaramp_html_acf0c836d0efe29c392fe8d1a1042744b\"><div class=\"ttname\"><a href=\"structGLFWgammaramp.html#acf0c836d0efe29c392fe8d1a1042744b\">GLFWgammaramp::blue</a></div><div class=\"ttdeci\">unsigned short * blue</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:1668</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_gaeac25e64789974ccbe0811766bd91a16\"><div class=\"ttname\"><a href=\"group__window.html#gaeac25e64789974ccbe0811766bd91a16\">glfwGetWindowMonitor</a></div><div class=\"ttdeci\">GLFWmonitor * glfwGetWindowMonitor(GLFWwindow *window)</div><div class=\"ttdoc\">Returns the monitor that the window uses for full screen mode.</div></div>\n<div class=\"ttc\" id=\"agroup__input_html_ga1caf18159767e761185e49a3be019f8d\"><div class=\"ttname\"><a href=\"group__input.html#ga1caf18159767e761185e49a3be019f8d\">glfwSetKeyCallback</a></div><div class=\"ttdeci\">GLFWkeyfun glfwSetKeyCallback(GLFWwindow *window, GLFWkeyfun callback)</div><div class=\"ttdoc\">Sets the key callback.</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_ga1bb559c0ebaad63c5c05ad2a066779c4\"><div class=\"ttname\"><a href=\"group__window.html#ga1bb559c0ebaad63c5c05ad2a066779c4\">glfwIconifyWindow</a></div><div class=\"ttdeci\">void glfwIconifyWindow(GLFWwindow *window)</div><div class=\"ttdoc\">Iconifies the specified window.</div></div>\n<div class=\"ttc\" id=\"agroup__init_html_ga23d47dc013fce2bf58036da66079a657\"><div class=\"ttname\"><a href=\"group__init.html#ga23d47dc013fce2bf58036da66079a657\">glfwGetVersionString</a></div><div class=\"ttdeci\">const char * glfwGetVersionString(void)</div><div class=\"ttdoc\">Returns a string describing the compile-time configuration.</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_ga3d2fc6026e690ab31a13f78bc9fd3651\"><div class=\"ttname\"><a href=\"group__window.html#ga3d2fc6026e690ab31a13f78bc9fd3651\">glfwSetWindowUserPointer</a></div><div class=\"ttdeci\">void glfwSetWindowUserPointer(GLFWwindow *window, void *pointer)</div><div class=\"ttdoc\">Sets the user pointer of the specified window.</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_gab5997a25187e9fd5c6f2ecbbc8dfd7e9\"><div class=\"ttname\"><a href=\"group__window.html#gab5997a25187e9fd5c6f2ecbbc8dfd7e9\">glfwPostEmptyEvent</a></div><div class=\"ttdeci\">void glfwPostEmptyEvent(void)</div><div class=\"ttdoc\">Posts an empty event to the event queue.</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_gacccb29947ea4b16860ebef42c2cb9337\"><div class=\"ttname\"><a href=\"group__window.html#gacccb29947ea4b16860ebef42c2cb9337\">glfwGetWindowAttrib</a></div><div class=\"ttdeci\">int glfwGetWindowAttrib(GLFWwindow *window, int attrib)</div><div class=\"ttdoc\">Returns an attribute of the specified window.</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_ga58be2061828dd35080bb438405d3a7e2\"><div class=\"ttname\"><a href=\"group__window.html#ga58be2061828dd35080bb438405d3a7e2\">GLFWwindowfocusfun</a></div><div class=\"ttdeci\">void(* GLFWwindowfocusfun)(GLFWwindow *, int)</div><div class=\"ttdoc\">The function pointer type for window focus callbacks.</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:1294</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_gac793e9efd255567b5fb8b445052cfd3e\"><div class=\"ttname\"><a href=\"group__window.html#gac793e9efd255567b5fb8b445052cfd3e\">glfwSetWindowIconifyCallback</a></div><div class=\"ttdeci\">GLFWwindowiconifyfun glfwSetWindowIconifyCallback(GLFWwindow *window, GLFWwindowiconifyfun callback)</div><div class=\"ttdoc\">Sets the iconify callback for the specified window.</div></div>\n<div class=\"ttc\" id=\"agroup__input_html_ga571e45a030ae4061f746ed56cb76aede\"><div class=\"ttname\"><a href=\"group__input.html#ga571e45a030ae4061f746ed56cb76aede\">glfwSetScrollCallback</a></div><div class=\"ttdeci\">GLFWscrollfun glfwSetScrollCallback(GLFWwindow *window, GLFWscrollfun callback)</div><div class=\"ttdoc\">Sets the scroll callback.</div></div>\n<div class=\"ttc\" id=\"agroup__input_html_gadd341da06bc8d418b4dc3a3518af9ad2\"><div class=\"ttname\"><a href=\"group__input.html#gadd341da06bc8d418b4dc3a3518af9ad2\">glfwGetKey</a></div><div class=\"ttdeci\">int glfwGetKey(GLFWwindow *window, int key)</div><div class=\"ttdoc\">Returns the last reported state of a keyboard key for the specified window.</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_gaeea7cbc03373a41fb51cfbf9f2a5d4c6\"><div class=\"ttname\"><a href=\"group__window.html#gaeea7cbc03373a41fb51cfbf9f2a5d4c6\">glfwGetWindowSize</a></div><div class=\"ttdeci\">void glfwGetWindowSize(GLFWwindow *window, int *width, int *height)</div><div class=\"ttdoc\">Retrieves the size of the content area of the specified window.</div></div>\n<div class=\"ttc\" id=\"agroup__input_html_gaa8806536731e92c061bc70bcff6edbd0\"><div class=\"ttname\"><a href=\"group__input.html#gaa8806536731e92c061bc70bcff6edbd0\">glfwGetJoystickAxes</a></div><div class=\"ttdeci\">const float * glfwGetJoystickAxes(int jid, int *count)</div><div class=\"ttdoc\">Returns the values of all axes of the specified joystick.</div></div>\n<div class=\"ttc\" id=\"astructGLFWvidmode_html\"><div class=\"ttname\"><a href=\"structGLFWvidmode.html\">GLFWvidmode</a></div><div class=\"ttdoc\">Video mode type.</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:1624</div></div>\n<div class=\"ttc\" id=\"agroup__init_html_gaff45816610d53f0b83656092a4034f40\"><div class=\"ttname\"><a href=\"group__init.html#gaff45816610d53f0b83656092a4034f40\">glfwSetErrorCallback</a></div><div class=\"ttdeci\">GLFWerrorfun glfwSetErrorCallback(GLFWerrorfun callback)</div><div class=\"ttdoc\">Sets the error callback.</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_ga0e2637a4161afb283f5300c7f94785c9\"><div class=\"ttname\"><a href=\"group__window.html#ga0e2637a4161afb283f5300c7f94785c9\">glfwGetFramebufferSize</a></div><div class=\"ttdeci\">void glfwGetFramebufferSize(GLFWwindow *window, int *width, int *height)</div><div class=\"ttdoc\">Retrieves the size of the framebuffer of the specified window.</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_ga93e7c2555bd837f4ed8b20f76cada72e\"><div class=\"ttname\"><a href=\"group__window.html#ga93e7c2555bd837f4ed8b20f76cada72e\">GLFWwindowclosefun</a></div><div class=\"ttdeci\">void(* GLFWwindowclosefun)(GLFWwindow *)</div><div class=\"ttdoc\">The function pointer type for window close callbacks.</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:1253</div></div>\n<div class=\"ttc\" id=\"astructGLFWvidmode_html_a6066c4ecd251098700062d3b735dba1b\"><div class=\"ttname\"><a href=\"structGLFWvidmode.html#a6066c4ecd251098700062d3b735dba1b\">GLFWvidmode::redBits</a></div><div class=\"ttdeci\">int redBits</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:1634</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_ga7d9c8c62384b1e2821c4dc48952d2033\"><div class=\"ttname\"><a href=\"group__window.html#ga7d9c8c62384b1e2821c4dc48952d2033\">glfwWindowHint</a></div><div class=\"ttdeci\">void glfwWindowHint(int hint, int value)</div><div class=\"ttdoc\">Sets the specified window hint to the desired value.</div></div>\n<div class=\"ttc\" id=\"agroup__init_html_ga9f8ffaacf3c269cc48eafbf8b9b71197\"><div class=\"ttname\"><a href=\"group__init.html#ga9f8ffaacf3c269cc48eafbf8b9b71197\">glfwGetVersion</a></div><div class=\"ttdeci\">void glfwGetVersion(int *major, int *minor, int *rev)</div><div class=\"ttdoc\">Retrieves the version of the GLFW library.</div></div>\n<div class=\"ttc\" id=\"agroup__vulkan_html_gaff3823355cdd7e2f3f9f4d9ea9518d92\"><div class=\"ttname\"><a href=\"group__vulkan.html#gaff3823355cdd7e2f3f9f4d9ea9518d92\">glfwGetPhysicalDevicePresentationSupport</a></div><div class=\"ttdeci\">int glfwGetPhysicalDevicePresentationSupport(VkInstance instance, VkPhysicalDevice device, uint32_t queuefamily)</div><div class=\"ttdoc\">Returns whether the specified queue family can present images.</div></div>\n<div class=\"ttc\" id=\"agroup__monitor_html_ga6ac582625c990220785ddd34efa3169a\"><div class=\"ttname\"><a href=\"group__monitor.html#ga6ac582625c990220785ddd34efa3169a\">glfwSetGamma</a></div><div class=\"ttdeci\">void glfwSetGamma(GLFWmonitor *monitor, float gamma)</div><div class=\"ttdoc\">Generates a gamma ramp and sets it for the specified monitor.</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_gafd8db81fdb0e850549dc6bace5ed697a\"><div class=\"ttname\"><a href=\"group__window.html#gafd8db81fdb0e850549dc6bace5ed697a\">GLFWwindowposfun</a></div><div class=\"ttdeci\">void(* GLFWwindowposfun)(GLFWwindow *, int, int)</div><div class=\"ttdoc\">The function pointer type for window position callbacks.</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:1211</div></div>\n<div class=\"ttc\" id=\"agroup__monitor_html_gafc1bb972a921ad5b3bd5d63a95fc2d52\"><div class=\"ttname\"><a href=\"group__monitor.html#gafc1bb972a921ad5b3bd5d63a95fc2d52\">glfwGetVideoMode</a></div><div class=\"ttdeci\">const GLFWvidmode * glfwGetVideoMode(GLFWmonitor *monitor)</div><div class=\"ttdoc\">Returns the current mode of the specified monitor.</div></div>\n<div class=\"ttc\" id=\"agroup__input_html_gaba1f022c5eb07dfac421df34cdcd31dd\"><div class=\"ttname\"><a href=\"group__input.html#gaba1f022c5eb07dfac421df34cdcd31dd\">glfwSetClipboardString</a></div><div class=\"ttdeci\">void glfwSetClipboardString(GLFWwindow *window, const char *string)</div><div class=\"ttdoc\">Sets the clipboard to the specified string.</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_gacdf43e51376051d2c091662e9fe3d7b2\"><div class=\"ttname\"><a href=\"group__window.html#gacdf43e51376051d2c091662e9fe3d7b2\">glfwDestroyWindow</a></div><div class=\"ttdeci\">void glfwDestroyWindow(GLFWwindow *window)</div><div class=\"ttdoc\">Destroys the specified window and its context.</div></div>\n<div class=\"ttc\" id=\"agroup__monitor_html_ga8d9efd1cde9426692c73fe40437d0ae3\"><div class=\"ttname\"><a href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a></div><div class=\"ttdeci\">struct GLFWmonitor GLFWmonitor</div><div class=\"ttdoc\">Opaque monitor object.</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:1140</div></div>\n<div class=\"ttc\" id=\"astructGLFWvidmode_html_a791bdd6c7697b09f7e9c97054bf05649\"><div class=\"ttname\"><a href=\"structGLFWvidmode.html#a791bdd6c7697b09f7e9c97054bf05649\">GLFWvidmode::refreshRate</a></div><div class=\"ttdeci\">int refreshRate</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:1643</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_ga17807ce0f45ac3f8bb50d6dcc59a4e06\"><div class=\"ttname\"><a href=\"group__window.html#ga17807ce0f45ac3f8bb50d6dcc59a4e06\">glfwGetWindowUserPointer</a></div><div class=\"ttdeci\">void * glfwGetWindowUserPointer(GLFWwindow *window)</div><div class=\"ttdoc\">Returns the user pointer of the specified window.</div></div>\n<div class=\"ttc\" id=\"agroup__vulkan_html_gadf228fac94c5fd8f12423ec9af9ff1e9\"><div class=\"ttname\"><a href=\"group__vulkan.html#gadf228fac94c5fd8f12423ec9af9ff1e9\">glfwGetInstanceProcAddress</a></div><div class=\"ttdeci\">GLFWvkproc glfwGetInstanceProcAddress(VkInstance instance, const char *procname)</div><div class=\"ttdoc\">Returns the address of the specified Vulkan instance function.</div></div>\n<address class=\"footer\">\n<p>\nLast update on Mon Jan 20 2020 for GLFW 3.3.2\n</p>\n</address>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/glfw3native_8h.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta http-equiv=\"X-UA-Compatible\" content=\"IE=9\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<title>GLFW: glfw3native.h File Reference</title>\n<link href=\"tabs.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"jquery.js\"></script>\n<script type=\"text/javascript\" src=\"dynsections.js\"></script>\n<link href=\"search/search.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"search/searchdata.js\"></script>\n<script type=\"text/javascript\" src=\"search/search.js\"></script>\n<link href=\"doxygen.css\" rel=\"stylesheet\" type=\"text/css\" />\n<link href=\"extra.css\" rel=\"stylesheet\" type=\"text/css\"/>\n</head>\n<body>\n<div id=\"top\"><!-- do not remove this div, it is closed by doxygen! -->\n<div id=\"titlearea\">\n\t<div class=\"glfwheader\">\n\t\t<a href=\"https://www.glfw.org/\" id=\"glfwhome\">GLFW</a>\n\t\t<ul class=\"glfwnavbar\">\n\t\t\t<li><a href=\"https://www.glfw.org/documentation.html\">Documentation</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/download.html\">Download</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/community.html\">Community</a></li>\n\t\t</ul>\n\t</div>\n</div>\n<!-- end header part -->\n<!-- Generated by Doxygen 1.8.16 -->\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\nvar searchBox = new SearchBox(\"searchBox\", \"search\",false,'Search');\n/* @license-end */\n</script>\n<script type=\"text/javascript\" src=\"menudata.js\"></script>\n<script type=\"text/javascript\" src=\"menu.js\"></script>\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\n$(function() {\n  initMenu('',true,false,'search.php','Search');\n  $(document).ready(function() { init_search(); });\n});\n/* @license-end */</script>\n<div id=\"main-nav\"></div>\n<!-- window showing the filter options -->\n<div id=\"MSearchSelectWindow\"\n     onmouseover=\"return searchBox.OnSearchSelectShow()\"\n     onmouseout=\"return searchBox.OnSearchSelectHide()\"\n     onkeydown=\"return searchBox.OnSearchSelectKey(event)\">\n</div>\n\n<!-- iframe showing the search results (closed by default) -->\n<div id=\"MSearchResultsWindow\">\n<iframe src=\"javascript:void(0)\" frameborder=\"0\" \n        name=\"MSearchResults\" id=\"MSearchResults\">\n</iframe>\n</div>\n\n<div id=\"nav-path\" class=\"navpath\">\n  <ul>\n<li class=\"navelem\"><a class=\"el\" href=\"dir_bc6505cac00d7a6291dbfd9af70666b7.html\">glfw-3.3.2</a></li><li class=\"navelem\"><a class=\"el\" href=\"dir_a58ef735c5cc5a9a31d321e1abe7c42e.html\">include</a></li><li class=\"navelem\"><a class=\"el\" href=\"dir_15a5176d7c9cc5c407ed4f611edf0684.html\">GLFW</a></li>  </ul>\n</div>\n</div><!-- top -->\n<div class=\"header\">\n  <div class=\"summary\">\n<a href=\"#func-members\">Functions</a>  </div>\n  <div class=\"headertitle\">\n<div class=\"title\">glfw3native.h File Reference</div>  </div>\n</div><!--header-->\n<div class=\"contents\">\n<a name=\"details\" id=\"details\"></a><h2 class=\"groupheader\">Description</h2>\n<div class=\"textblock\"><p>This is the header file of the native access functions. See <a class=\"el\" href=\"group__native.html\">Native access</a> for more information. </p>\n</div>\n<p><a href=\"glfw3native_8h_source.html\">Go to the source code of this file.</a></p>\n<table class=\"memberdecls\">\n<tr class=\"heading\"><td colspan=\"2\"><h2 class=\"groupheader\"><a name=\"func-members\"></a>\nFunctions</h2></td></tr>\n<tr class=\"memitem:gac84f63a3f9db145b9435e5e0dbc4183d\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">const char *&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__native.html#gac84f63a3f9db145b9435e5e0dbc4183d\">glfwGetWin32Adapter</a> (<a class=\"el\" href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a> *monitor)</td></tr>\n<tr class=\"memdesc:gac84f63a3f9db145b9435e5e0dbc4183d\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns the adapter device name of the specified monitor.  <a href=\"group__native.html#gac84f63a3f9db145b9435e5e0dbc4183d\">More...</a><br /></td></tr>\n<tr class=\"separator:gac84f63a3f9db145b9435e5e0dbc4183d\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gac408b09a330749402d5d1fa1f5894dd9\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">const char *&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__native.html#gac408b09a330749402d5d1fa1f5894dd9\">glfwGetWin32Monitor</a> (<a class=\"el\" href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a> *monitor)</td></tr>\n<tr class=\"memdesc:gac408b09a330749402d5d1fa1f5894dd9\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns the display device name of the specified monitor.  <a href=\"group__native.html#gac408b09a330749402d5d1fa1f5894dd9\">More...</a><br /></td></tr>\n<tr class=\"separator:gac408b09a330749402d5d1fa1f5894dd9\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gafe5079aa79038b0079fc09d5f0a8e667\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">HWND&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__native.html#gafe5079aa79038b0079fc09d5f0a8e667\">glfwGetWin32Window</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window)</td></tr>\n<tr class=\"memdesc:gafe5079aa79038b0079fc09d5f0a8e667\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns the <code>HWND</code> of the specified window.  <a href=\"group__native.html#gafe5079aa79038b0079fc09d5f0a8e667\">More...</a><br /></td></tr>\n<tr class=\"separator:gafe5079aa79038b0079fc09d5f0a8e667\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gadc4010d91d9cc1134d040eeb1202a143\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">HGLRC&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__native.html#gadc4010d91d9cc1134d040eeb1202a143\">glfwGetWGLContext</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window)</td></tr>\n<tr class=\"memdesc:gadc4010d91d9cc1134d040eeb1202a143\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns the <code>HGLRC</code> of the specified window.  <a href=\"group__native.html#gadc4010d91d9cc1134d040eeb1202a143\">More...</a><br /></td></tr>\n<tr class=\"separator:gadc4010d91d9cc1134d040eeb1202a143\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gaf22f429aec4b1aab316142d66d9be3e6\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">CGDirectDisplayID&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__native.html#gaf22f429aec4b1aab316142d66d9be3e6\">glfwGetCocoaMonitor</a> (<a class=\"el\" href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a> *monitor)</td></tr>\n<tr class=\"memdesc:gaf22f429aec4b1aab316142d66d9be3e6\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns the <code>CGDirectDisplayID</code> of the specified monitor.  <a href=\"group__native.html#gaf22f429aec4b1aab316142d66d9be3e6\">More...</a><br /></td></tr>\n<tr class=\"separator:gaf22f429aec4b1aab316142d66d9be3e6\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gac3ed9d495d0c2bb9652de5a50c648715\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">id&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__native.html#gac3ed9d495d0c2bb9652de5a50c648715\">glfwGetCocoaWindow</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window)</td></tr>\n<tr class=\"memdesc:gac3ed9d495d0c2bb9652de5a50c648715\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns the <code>NSWindow</code> of the specified window.  <a href=\"group__native.html#gac3ed9d495d0c2bb9652de5a50c648715\">More...</a><br /></td></tr>\n<tr class=\"separator:gac3ed9d495d0c2bb9652de5a50c648715\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga559e002e3cd63c979881770cd4dc63bc\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">id&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__native.html#ga559e002e3cd63c979881770cd4dc63bc\">glfwGetNSGLContext</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window)</td></tr>\n<tr class=\"memdesc:ga559e002e3cd63c979881770cd4dc63bc\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns the <code>NSOpenGLContext</code> of the specified window.  <a href=\"group__native.html#ga559e002e3cd63c979881770cd4dc63bc\">More...</a><br /></td></tr>\n<tr class=\"separator:ga559e002e3cd63c979881770cd4dc63bc\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga8519b66594ea3ef6eeafaa2e3ee37406\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">Display *&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__native.html#ga8519b66594ea3ef6eeafaa2e3ee37406\">glfwGetX11Display</a> (void)</td></tr>\n<tr class=\"memdesc:ga8519b66594ea3ef6eeafaa2e3ee37406\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns the <code>Display</code> used by GLFW.  <a href=\"group__native.html#ga8519b66594ea3ef6eeafaa2e3ee37406\">More...</a><br /></td></tr>\n<tr class=\"separator:ga8519b66594ea3ef6eeafaa2e3ee37406\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga088fbfa80f50569402b41be71ad66e40\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">RRCrtc&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__native.html#ga088fbfa80f50569402b41be71ad66e40\">glfwGetX11Adapter</a> (<a class=\"el\" href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a> *monitor)</td></tr>\n<tr class=\"memdesc:ga088fbfa80f50569402b41be71ad66e40\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns the <code>RRCrtc</code> of the specified monitor.  <a href=\"group__native.html#ga088fbfa80f50569402b41be71ad66e40\">More...</a><br /></td></tr>\n<tr class=\"separator:ga088fbfa80f50569402b41be71ad66e40\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gab2f8cc043905e9fa9b12bfdbbcfe874c\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">RROutput&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__native.html#gab2f8cc043905e9fa9b12bfdbbcfe874c\">glfwGetX11Monitor</a> (<a class=\"el\" href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a> *monitor)</td></tr>\n<tr class=\"memdesc:gab2f8cc043905e9fa9b12bfdbbcfe874c\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns the <code>RROutput</code> of the specified monitor.  <a href=\"group__native.html#gab2f8cc043905e9fa9b12bfdbbcfe874c\">More...</a><br /></td></tr>\n<tr class=\"separator:gab2f8cc043905e9fa9b12bfdbbcfe874c\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga90ca676322740842db446999a1b1f21d\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">Window&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__native.html#ga90ca676322740842db446999a1b1f21d\">glfwGetX11Window</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window)</td></tr>\n<tr class=\"memdesc:ga90ca676322740842db446999a1b1f21d\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns the <code>Window</code> of the specified window.  <a href=\"group__native.html#ga90ca676322740842db446999a1b1f21d\">More...</a><br /></td></tr>\n<tr class=\"separator:ga90ca676322740842db446999a1b1f21d\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga55f879ab02d93367f966186b6f0133f7\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">void&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__native.html#ga55f879ab02d93367f966186b6f0133f7\">glfwSetX11SelectionString</a> (const char *string)</td></tr>\n<tr class=\"memdesc:ga55f879ab02d93367f966186b6f0133f7\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Sets the current primary selection to the specified string.  <a href=\"group__native.html#ga55f879ab02d93367f966186b6f0133f7\">More...</a><br /></td></tr>\n<tr class=\"separator:ga55f879ab02d93367f966186b6f0133f7\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga72f23e3980b83788c70aa854eca31430\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">const char *&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__native.html#ga72f23e3980b83788c70aa854eca31430\">glfwGetX11SelectionString</a> (void)</td></tr>\n<tr class=\"memdesc:ga72f23e3980b83788c70aa854eca31430\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns the contents of the current primary selection as a string.  <a href=\"group__native.html#ga72f23e3980b83788c70aa854eca31430\">More...</a><br /></td></tr>\n<tr class=\"separator:ga72f23e3980b83788c70aa854eca31430\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga62d884114b0abfcdc2930e89f20867e2\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">GLXContext&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__native.html#ga62d884114b0abfcdc2930e89f20867e2\">glfwGetGLXContext</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window)</td></tr>\n<tr class=\"memdesc:ga62d884114b0abfcdc2930e89f20867e2\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns the <code>GLXContext</code> of the specified window.  <a href=\"group__native.html#ga62d884114b0abfcdc2930e89f20867e2\">More...</a><br /></td></tr>\n<tr class=\"separator:ga62d884114b0abfcdc2930e89f20867e2\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga1ed27b8766e859a21381e8f8ce18d049\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">GLXWindow&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__native.html#ga1ed27b8766e859a21381e8f8ce18d049\">glfwGetGLXWindow</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window)</td></tr>\n<tr class=\"memdesc:ga1ed27b8766e859a21381e8f8ce18d049\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns the <code>GLXWindow</code> of the specified window.  <a href=\"group__native.html#ga1ed27b8766e859a21381e8f8ce18d049\">More...</a><br /></td></tr>\n<tr class=\"separator:ga1ed27b8766e859a21381e8f8ce18d049\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gaaf8118a3c877f3a6bc8e7a649519de5e\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">struct wl_display *&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__native.html#gaaf8118a3c877f3a6bc8e7a649519de5e\">glfwGetWaylandDisplay</a> (void)</td></tr>\n<tr class=\"memdesc:gaaf8118a3c877f3a6bc8e7a649519de5e\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns the <code>struct wl_display*</code> used by GLFW.  <a href=\"group__native.html#gaaf8118a3c877f3a6bc8e7a649519de5e\">More...</a><br /></td></tr>\n<tr class=\"separator:gaaf8118a3c877f3a6bc8e7a649519de5e\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gab10427a667b6cd91eec7709f7a906bd3\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">struct wl_output *&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__native.html#gab10427a667b6cd91eec7709f7a906bd3\">glfwGetWaylandMonitor</a> (<a class=\"el\" href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a> *monitor)</td></tr>\n<tr class=\"memdesc:gab10427a667b6cd91eec7709f7a906bd3\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns the <code>struct wl_output*</code> of the specified monitor.  <a href=\"group__native.html#gab10427a667b6cd91eec7709f7a906bd3\">More...</a><br /></td></tr>\n<tr class=\"separator:gab10427a667b6cd91eec7709f7a906bd3\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga4738d7aca4191363519a9a641c3ab64c\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">struct wl_surface *&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__native.html#ga4738d7aca4191363519a9a641c3ab64c\">glfwGetWaylandWindow</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window)</td></tr>\n<tr class=\"memdesc:ga4738d7aca4191363519a9a641c3ab64c\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns the main <code>struct wl_surface*</code> of the specified window.  <a href=\"group__native.html#ga4738d7aca4191363519a9a641c3ab64c\">More...</a><br /></td></tr>\n<tr class=\"separator:ga4738d7aca4191363519a9a641c3ab64c\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga1cd8d973f47aacb5532d368147cc3138\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">EGLDisplay&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__native.html#ga1cd8d973f47aacb5532d368147cc3138\">glfwGetEGLDisplay</a> (void)</td></tr>\n<tr class=\"memdesc:ga1cd8d973f47aacb5532d368147cc3138\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns the <code>EGLDisplay</code> used by GLFW.  <a href=\"group__native.html#ga1cd8d973f47aacb5532d368147cc3138\">More...</a><br /></td></tr>\n<tr class=\"separator:ga1cd8d973f47aacb5532d368147cc3138\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga671c5072becd085f4ab5771a9c8efcf1\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">EGLContext&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__native.html#ga671c5072becd085f4ab5771a9c8efcf1\">glfwGetEGLContext</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window)</td></tr>\n<tr class=\"memdesc:ga671c5072becd085f4ab5771a9c8efcf1\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns the <code>EGLContext</code> of the specified window.  <a href=\"group__native.html#ga671c5072becd085f4ab5771a9c8efcf1\">More...</a><br /></td></tr>\n<tr class=\"separator:ga671c5072becd085f4ab5771a9c8efcf1\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga2199b36117a6a695fec8441d8052eee6\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">EGLSurface&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__native.html#ga2199b36117a6a695fec8441d8052eee6\">glfwGetEGLSurface</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window)</td></tr>\n<tr class=\"memdesc:ga2199b36117a6a695fec8441d8052eee6\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns the <code>EGLSurface</code> of the specified window.  <a href=\"group__native.html#ga2199b36117a6a695fec8441d8052eee6\">More...</a><br /></td></tr>\n<tr class=\"separator:ga2199b36117a6a695fec8441d8052eee6\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga3b36e3e3dcf308b776427b6bd73cc132\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">int&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__native.html#ga3b36e3e3dcf308b776427b6bd73cc132\">glfwGetOSMesaColorBuffer</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window, int *width, int *height, int *format, void **buffer)</td></tr>\n<tr class=\"memdesc:ga3b36e3e3dcf308b776427b6bd73cc132\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Retrieves the color buffer associated with the specified window.  <a href=\"group__native.html#ga3b36e3e3dcf308b776427b6bd73cc132\">More...</a><br /></td></tr>\n<tr class=\"separator:ga3b36e3e3dcf308b776427b6bd73cc132\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga6b64039ffc88a7a2f57f0956c0c75d53\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">int&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__native.html#ga6b64039ffc88a7a2f57f0956c0c75d53\">glfwGetOSMesaDepthBuffer</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window, int *width, int *height, int *bytesPerValue, void **buffer)</td></tr>\n<tr class=\"memdesc:ga6b64039ffc88a7a2f57f0956c0c75d53\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Retrieves the depth buffer associated with the specified window.  <a href=\"group__native.html#ga6b64039ffc88a7a2f57f0956c0c75d53\">More...</a><br /></td></tr>\n<tr class=\"separator:ga6b64039ffc88a7a2f57f0956c0c75d53\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga9e47700080094eb569cb053afaa88773\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">OSMesaContext&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__native.html#ga9e47700080094eb569cb053afaa88773\">glfwGetOSMesaContext</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window)</td></tr>\n<tr class=\"memdesc:ga9e47700080094eb569cb053afaa88773\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns the <code>OSMesaContext</code> of the specified window.  <a href=\"group__native.html#ga9e47700080094eb569cb053afaa88773\">More...</a><br /></td></tr>\n<tr class=\"separator:ga9e47700080094eb569cb053afaa88773\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n</table>\n</div><!-- contents -->\n<address class=\"footer\">\n<p>\nLast update on Mon Jan 20 2020 for GLFW 3.3.2\n</p>\n</address>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/glfw3native_8h_source.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta http-equiv=\"X-UA-Compatible\" content=\"IE=9\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<title>GLFW: glfw3native.h Source File</title>\n<link href=\"tabs.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"jquery.js\"></script>\n<script type=\"text/javascript\" src=\"dynsections.js\"></script>\n<link href=\"search/search.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"search/searchdata.js\"></script>\n<script type=\"text/javascript\" src=\"search/search.js\"></script>\n<link href=\"doxygen.css\" rel=\"stylesheet\" type=\"text/css\" />\n<link href=\"extra.css\" rel=\"stylesheet\" type=\"text/css\"/>\n</head>\n<body>\n<div id=\"top\"><!-- do not remove this div, it is closed by doxygen! -->\n<div id=\"titlearea\">\n\t<div class=\"glfwheader\">\n\t\t<a href=\"https://www.glfw.org/\" id=\"glfwhome\">GLFW</a>\n\t\t<ul class=\"glfwnavbar\">\n\t\t\t<li><a href=\"https://www.glfw.org/documentation.html\">Documentation</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/download.html\">Download</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/community.html\">Community</a></li>\n\t\t</ul>\n\t</div>\n</div>\n<!-- end header part -->\n<!-- Generated by Doxygen 1.8.16 -->\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\nvar searchBox = new SearchBox(\"searchBox\", \"search\",false,'Search');\n/* @license-end */\n</script>\n<script type=\"text/javascript\" src=\"menudata.js\"></script>\n<script type=\"text/javascript\" src=\"menu.js\"></script>\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\n$(function() {\n  initMenu('',true,false,'search.php','Search');\n  $(document).ready(function() { init_search(); });\n});\n/* @license-end */</script>\n<div id=\"main-nav\"></div>\n<!-- window showing the filter options -->\n<div id=\"MSearchSelectWindow\"\n     onmouseover=\"return searchBox.OnSearchSelectShow()\"\n     onmouseout=\"return searchBox.OnSearchSelectHide()\"\n     onkeydown=\"return searchBox.OnSearchSelectKey(event)\">\n</div>\n\n<!-- iframe showing the search results (closed by default) -->\n<div id=\"MSearchResultsWindow\">\n<iframe src=\"javascript:void(0)\" frameborder=\"0\" \n        name=\"MSearchResults\" id=\"MSearchResults\">\n</iframe>\n</div>\n\n<div id=\"nav-path\" class=\"navpath\">\n  <ul>\n<li class=\"navelem\"><a class=\"el\" href=\"dir_bc6505cac00d7a6291dbfd9af70666b7.html\">glfw-3.3.2</a></li><li class=\"navelem\"><a class=\"el\" href=\"dir_a58ef735c5cc5a9a31d321e1abe7c42e.html\">include</a></li><li class=\"navelem\"><a class=\"el\" href=\"dir_15a5176d7c9cc5c407ed4f611edf0684.html\">GLFW</a></li>  </ul>\n</div>\n</div><!-- top -->\n<div class=\"header\">\n  <div class=\"headertitle\">\n<div class=\"title\">glfw3native.h</div>  </div>\n</div><!--header-->\n<div class=\"contents\">\n<a href=\"glfw3native_8h.html\">Go to the documentation of this file.</a><div class=\"fragment\"><div class=\"line\"><a name=\"l00001\"></a><span class=\"lineno\">    1</span>&#160;<span class=\"comment\">/*************************************************************************</span></div>\n<div class=\"line\"><a name=\"l00002\"></a><span class=\"lineno\">    2</span>&#160;<span class=\"comment\"> * GLFW 3.3 - www.glfw.org</span></div>\n<div class=\"line\"><a name=\"l00003\"></a><span class=\"lineno\">    3</span>&#160;<span class=\"comment\"> * A library for OpenGL, window and input</span></div>\n<div class=\"line\"><a name=\"l00004\"></a><span class=\"lineno\">    4</span>&#160;<span class=\"comment\"> *------------------------------------------------------------------------</span></div>\n<div class=\"line\"><a name=\"l00005\"></a><span class=\"lineno\">    5</span>&#160;<span class=\"comment\"> * Copyright (c) 2002-2006 Marcus Geelnard</span></div>\n<div class=\"line\"><a name=\"l00006\"></a><span class=\"lineno\">    6</span>&#160;<span class=\"comment\"> * Copyright (c) 2006-2018 Camilla Löwy &lt;elmindreda@glfw.org&gt;</span></div>\n<div class=\"line\"><a name=\"l00007\"></a><span class=\"lineno\">    7</span>&#160;<span class=\"comment\"> *</span></div>\n<div class=\"line\"><a name=\"l00008\"></a><span class=\"lineno\">    8</span>&#160;<span class=\"comment\"> * This software is provided &#39;as-is&#39;, without any express or implied</span></div>\n<div class=\"line\"><a name=\"l00009\"></a><span class=\"lineno\">    9</span>&#160;<span class=\"comment\"> * warranty. In no event will the authors be held liable for any damages</span></div>\n<div class=\"line\"><a name=\"l00010\"></a><span class=\"lineno\">   10</span>&#160;<span class=\"comment\"> * arising from the use of this software.</span></div>\n<div class=\"line\"><a name=\"l00011\"></a><span class=\"lineno\">   11</span>&#160;<span class=\"comment\"> *</span></div>\n<div class=\"line\"><a name=\"l00012\"></a><span class=\"lineno\">   12</span>&#160;<span class=\"comment\"> * Permission is granted to anyone to use this software for any purpose,</span></div>\n<div class=\"line\"><a name=\"l00013\"></a><span class=\"lineno\">   13</span>&#160;<span class=\"comment\"> * including commercial applications, and to alter it and redistribute it</span></div>\n<div class=\"line\"><a name=\"l00014\"></a><span class=\"lineno\">   14</span>&#160;<span class=\"comment\"> * freely, subject to the following restrictions:</span></div>\n<div class=\"line\"><a name=\"l00015\"></a><span class=\"lineno\">   15</span>&#160;<span class=\"comment\"> *</span></div>\n<div class=\"line\"><a name=\"l00016\"></a><span class=\"lineno\">   16</span>&#160;<span class=\"comment\"> * 1. The origin of this software must not be misrepresented; you must not</span></div>\n<div class=\"line\"><a name=\"l00017\"></a><span class=\"lineno\">   17</span>&#160;<span class=\"comment\"> *    claim that you wrote the original software. If you use this software</span></div>\n<div class=\"line\"><a name=\"l00018\"></a><span class=\"lineno\">   18</span>&#160;<span class=\"comment\"> *    in a product, an acknowledgment in the product documentation would</span></div>\n<div class=\"line\"><a name=\"l00019\"></a><span class=\"lineno\">   19</span>&#160;<span class=\"comment\"> *    be appreciated but is not required.</span></div>\n<div class=\"line\"><a name=\"l00020\"></a><span class=\"lineno\">   20</span>&#160;<span class=\"comment\"> *</span></div>\n<div class=\"line\"><a name=\"l00021\"></a><span class=\"lineno\">   21</span>&#160;<span class=\"comment\"> * 2. Altered source versions must be plainly marked as such, and must not</span></div>\n<div class=\"line\"><a name=\"l00022\"></a><span class=\"lineno\">   22</span>&#160;<span class=\"comment\"> *    be misrepresented as being the original software.</span></div>\n<div class=\"line\"><a name=\"l00023\"></a><span class=\"lineno\">   23</span>&#160;<span class=\"comment\"> *</span></div>\n<div class=\"line\"><a name=\"l00024\"></a><span class=\"lineno\">   24</span>&#160;<span class=\"comment\"> * 3. This notice may not be removed or altered from any source</span></div>\n<div class=\"line\"><a name=\"l00025\"></a><span class=\"lineno\">   25</span>&#160;<span class=\"comment\"> *    distribution.</span></div>\n<div class=\"line\"><a name=\"l00026\"></a><span class=\"lineno\">   26</span>&#160;<span class=\"comment\"> *</span></div>\n<div class=\"line\"><a name=\"l00027\"></a><span class=\"lineno\">   27</span>&#160;<span class=\"comment\"> *************************************************************************/</span></div>\n<div class=\"line\"><a name=\"l00028\"></a><span class=\"lineno\">   28</span>&#160; </div>\n<div class=\"line\"><a name=\"l00029\"></a><span class=\"lineno\">   29</span>&#160;<span class=\"preprocessor\">#ifndef _glfw3_native_h_</span></div>\n<div class=\"line\"><a name=\"l00030\"></a><span class=\"lineno\">   30</span>&#160;<span class=\"preprocessor\">#define _glfw3_native_h_</span></div>\n<div class=\"line\"><a name=\"l00031\"></a><span class=\"lineno\">   31</span>&#160; </div>\n<div class=\"line\"><a name=\"l00032\"></a><span class=\"lineno\">   32</span>&#160;<span class=\"preprocessor\">#ifdef __cplusplus</span></div>\n<div class=\"line\"><a name=\"l00033\"></a><span class=\"lineno\">   33</span>&#160;<span class=\"keyword\">extern</span> <span class=\"stringliteral\">&quot;C&quot;</span> {</div>\n<div class=\"line\"><a name=\"l00034\"></a><span class=\"lineno\">   34</span>&#160;<span class=\"preprocessor\">#endif</span></div>\n<div class=\"line\"><a name=\"l00035\"></a><span class=\"lineno\">   35</span>&#160; </div>\n<div class=\"line\"><a name=\"l00036\"></a><span class=\"lineno\">   36</span>&#160; </div>\n<div class=\"line\"><a name=\"l00037\"></a><span class=\"lineno\">   37</span>&#160;<span class=\"comment\">/*************************************************************************</span></div>\n<div class=\"line\"><a name=\"l00038\"></a><span class=\"lineno\">   38</span>&#160;<span class=\"comment\"> * Doxygen documentation</span></div>\n<div class=\"line\"><a name=\"l00039\"></a><span class=\"lineno\">   39</span>&#160;<span class=\"comment\"> *************************************************************************/</span></div>\n<div class=\"line\"><a name=\"l00040\"></a><span class=\"lineno\">   40</span>&#160; </div>\n<div class=\"line\"><a name=\"l00080\"></a><span class=\"lineno\">   80</span>&#160;<span class=\"comment\">/*************************************************************************</span></div>\n<div class=\"line\"><a name=\"l00081\"></a><span class=\"lineno\">   81</span>&#160;<span class=\"comment\"> * System headers and types</span></div>\n<div class=\"line\"><a name=\"l00082\"></a><span class=\"lineno\">   82</span>&#160;<span class=\"comment\"> *************************************************************************/</span></div>\n<div class=\"line\"><a name=\"l00083\"></a><span class=\"lineno\">   83</span>&#160; </div>\n<div class=\"line\"><a name=\"l00084\"></a><span class=\"lineno\">   84</span>&#160;<span class=\"preprocessor\">#if defined(GLFW_EXPOSE_NATIVE_WIN32) || defined(GLFW_EXPOSE_NATIVE_WGL)</span></div>\n<div class=\"line\"><a name=\"l00085\"></a><span class=\"lineno\">   85</span>&#160; <span class=\"comment\">// This is a workaround for the fact that glfw3.h needs to export APIENTRY (for</span></div>\n<div class=\"line\"><a name=\"l00086\"></a><span class=\"lineno\">   86</span>&#160; <span class=\"comment\">// example to allow applications to correctly declare a GL_ARB_debug_output</span></div>\n<div class=\"line\"><a name=\"l00087\"></a><span class=\"lineno\">   87</span>&#160; <span class=\"comment\">// callback) but windows.h assumes no one will define APIENTRY before it does</span></div>\n<div class=\"line\"><a name=\"l00088\"></a><span class=\"lineno\">   88</span>&#160;<span class=\"preprocessor\"> #if defined(GLFW_APIENTRY_DEFINED)</span></div>\n<div class=\"line\"><a name=\"l00089\"></a><span class=\"lineno\">   89</span>&#160;<span class=\"preprocessor\">  #undef APIENTRY</span></div>\n<div class=\"line\"><a name=\"l00090\"></a><span class=\"lineno\">   90</span>&#160;<span class=\"preprocessor\">  #undef GLFW_APIENTRY_DEFINED</span></div>\n<div class=\"line\"><a name=\"l00091\"></a><span class=\"lineno\">   91</span>&#160;<span class=\"preprocessor\"> #endif</span></div>\n<div class=\"line\"><a name=\"l00092\"></a><span class=\"lineno\">   92</span>&#160;<span class=\"preprocessor\"> #include &lt;windows.h&gt;</span></div>\n<div class=\"line\"><a name=\"l00093\"></a><span class=\"lineno\">   93</span>&#160;<span class=\"preprocessor\">#elif defined(GLFW_EXPOSE_NATIVE_COCOA) || defined(GLFW_EXPOSE_NATIVE_NSGL)</span></div>\n<div class=\"line\"><a name=\"l00094\"></a><span class=\"lineno\">   94</span>&#160;<span class=\"preprocessor\"> #if defined(__OBJC__)</span></div>\n<div class=\"line\"><a name=\"l00095\"></a><span class=\"lineno\">   95</span>&#160;<span class=\"preprocessor\">  #import &lt;Cocoa/Cocoa.h&gt;</span></div>\n<div class=\"line\"><a name=\"l00096\"></a><span class=\"lineno\">   96</span>&#160;<span class=\"preprocessor\"> #else</span></div>\n<div class=\"line\"><a name=\"l00097\"></a><span class=\"lineno\">   97</span>&#160;<span class=\"preprocessor\">  #include &lt;ApplicationServices/ApplicationServices.h&gt;</span></div>\n<div class=\"line\"><a name=\"l00098\"></a><span class=\"lineno\">   98</span>&#160;  <span class=\"keyword\">typedef</span> <span class=\"keywordtype\">void</span>* id;</div>\n<div class=\"line\"><a name=\"l00099\"></a><span class=\"lineno\">   99</span>&#160;<span class=\"preprocessor\"> #endif</span></div>\n<div class=\"line\"><a name=\"l00100\"></a><span class=\"lineno\">  100</span>&#160;<span class=\"preprocessor\">#elif defined(GLFW_EXPOSE_NATIVE_X11) || defined(GLFW_EXPOSE_NATIVE_GLX)</span></div>\n<div class=\"line\"><a name=\"l00101\"></a><span class=\"lineno\">  101</span>&#160;<span class=\"preprocessor\"> #include &lt;X11/Xlib.h&gt;</span></div>\n<div class=\"line\"><a name=\"l00102\"></a><span class=\"lineno\">  102</span>&#160;<span class=\"preprocessor\"> #include &lt;X11/extensions/Xrandr.h&gt;</span></div>\n<div class=\"line\"><a name=\"l00103\"></a><span class=\"lineno\">  103</span>&#160;<span class=\"preprocessor\">#elif defined(GLFW_EXPOSE_NATIVE_WAYLAND)</span></div>\n<div class=\"line\"><a name=\"l00104\"></a><span class=\"lineno\">  104</span>&#160;<span class=\"preprocessor\"> #include &lt;wayland-client.h&gt;</span></div>\n<div class=\"line\"><a name=\"l00105\"></a><span class=\"lineno\">  105</span>&#160;<span class=\"preprocessor\">#endif</span></div>\n<div class=\"line\"><a name=\"l00106\"></a><span class=\"lineno\">  106</span>&#160; </div>\n<div class=\"line\"><a name=\"l00107\"></a><span class=\"lineno\">  107</span>&#160;<span class=\"preprocessor\">#if defined(GLFW_EXPOSE_NATIVE_WGL)</span></div>\n<div class=\"line\"><a name=\"l00108\"></a><span class=\"lineno\">  108</span>&#160; <span class=\"comment\">/* WGL is declared by windows.h */</span></div>\n<div class=\"line\"><a name=\"l00109\"></a><span class=\"lineno\">  109</span>&#160;<span class=\"preprocessor\">#endif</span></div>\n<div class=\"line\"><a name=\"l00110\"></a><span class=\"lineno\">  110</span>&#160;<span class=\"preprocessor\">#if defined(GLFW_EXPOSE_NATIVE_NSGL)</span></div>\n<div class=\"line\"><a name=\"l00111\"></a><span class=\"lineno\">  111</span>&#160; <span class=\"comment\">/* NSGL is declared by Cocoa.h */</span></div>\n<div class=\"line\"><a name=\"l00112\"></a><span class=\"lineno\">  112</span>&#160;<span class=\"preprocessor\">#endif</span></div>\n<div class=\"line\"><a name=\"l00113\"></a><span class=\"lineno\">  113</span>&#160;<span class=\"preprocessor\">#if defined(GLFW_EXPOSE_NATIVE_GLX)</span></div>\n<div class=\"line\"><a name=\"l00114\"></a><span class=\"lineno\">  114</span>&#160;<span class=\"preprocessor\"> #include &lt;GL/glx.h&gt;</span></div>\n<div class=\"line\"><a name=\"l00115\"></a><span class=\"lineno\">  115</span>&#160;<span class=\"preprocessor\">#endif</span></div>\n<div class=\"line\"><a name=\"l00116\"></a><span class=\"lineno\">  116</span>&#160;<span class=\"preprocessor\">#if defined(GLFW_EXPOSE_NATIVE_EGL)</span></div>\n<div class=\"line\"><a name=\"l00117\"></a><span class=\"lineno\">  117</span>&#160;<span class=\"preprocessor\"> #include &lt;EGL/egl.h&gt;</span></div>\n<div class=\"line\"><a name=\"l00118\"></a><span class=\"lineno\">  118</span>&#160;<span class=\"preprocessor\">#endif</span></div>\n<div class=\"line\"><a name=\"l00119\"></a><span class=\"lineno\">  119</span>&#160;<span class=\"preprocessor\">#if defined(GLFW_EXPOSE_NATIVE_OSMESA)</span></div>\n<div class=\"line\"><a name=\"l00120\"></a><span class=\"lineno\">  120</span>&#160;<span class=\"preprocessor\"> #include &lt;GL/osmesa.h&gt;</span></div>\n<div class=\"line\"><a name=\"l00121\"></a><span class=\"lineno\">  121</span>&#160;<span class=\"preprocessor\">#endif</span></div>\n<div class=\"line\"><a name=\"l00122\"></a><span class=\"lineno\">  122</span>&#160; </div>\n<div class=\"line\"><a name=\"l00123\"></a><span class=\"lineno\">  123</span>&#160; </div>\n<div class=\"line\"><a name=\"l00124\"></a><span class=\"lineno\">  124</span>&#160;<span class=\"comment\">/*************************************************************************</span></div>\n<div class=\"line\"><a name=\"l00125\"></a><span class=\"lineno\">  125</span>&#160;<span class=\"comment\"> * Functions</span></div>\n<div class=\"line\"><a name=\"l00126\"></a><span class=\"lineno\">  126</span>&#160;<span class=\"comment\"> *************************************************************************/</span></div>\n<div class=\"line\"><a name=\"l00127\"></a><span class=\"lineno\">  127</span>&#160; </div>\n<div class=\"line\"><a name=\"l00128\"></a><span class=\"lineno\">  128</span>&#160;<span class=\"preprocessor\">#if defined(GLFW_EXPOSE_NATIVE_WIN32)</span></div>\n<div class=\"line\"><a name=\"l00129\"></a><span class=\"lineno\">  129</span>&#160; </div>\n<div class=\"line\"><a name=\"l00142\"></a><span class=\"lineno\">  142</span>&#160;GLFWAPI <span class=\"keyword\">const</span> <span class=\"keywordtype\">char</span>* <a class=\"code\" href=\"group__native.html#gac84f63a3f9db145b9435e5e0dbc4183d\">glfwGetWin32Adapter</a>(<a class=\"code\" href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a>* monitor);</div>\n<div class=\"line\"><a name=\"l00143\"></a><span class=\"lineno\">  143</span>&#160; </div>\n<div class=\"line\"><a name=\"l00157\"></a><span class=\"lineno\">  157</span>&#160;GLFWAPI <span class=\"keyword\">const</span> <span class=\"keywordtype\">char</span>* <a class=\"code\" href=\"group__native.html#gac408b09a330749402d5d1fa1f5894dd9\">glfwGetWin32Monitor</a>(<a class=\"code\" href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a>* monitor);</div>\n<div class=\"line\"><a name=\"l00158\"></a><span class=\"lineno\">  158</span>&#160; </div>\n<div class=\"line\"><a name=\"l00171\"></a><span class=\"lineno\">  171</span>&#160;GLFWAPI HWND <a class=\"code\" href=\"group__native.html#gafe5079aa79038b0079fc09d5f0a8e667\">glfwGetWin32Window</a>(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window);</div>\n<div class=\"line\"><a name=\"l00172\"></a><span class=\"lineno\">  172</span>&#160;<span class=\"preprocessor\">#endif</span></div>\n<div class=\"line\"><a name=\"l00173\"></a><span class=\"lineno\">  173</span>&#160; </div>\n<div class=\"line\"><a name=\"l00174\"></a><span class=\"lineno\">  174</span>&#160;<span class=\"preprocessor\">#if defined(GLFW_EXPOSE_NATIVE_WGL)</span></div>\n<div class=\"line\"><a name=\"l00175\"></a><span class=\"lineno\">  175</span>&#160; </div>\n<div class=\"line\"><a name=\"l00187\"></a><span class=\"lineno\">  187</span>&#160;GLFWAPI HGLRC <a class=\"code\" href=\"group__native.html#gadc4010d91d9cc1134d040eeb1202a143\">glfwGetWGLContext</a>(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window);</div>\n<div class=\"line\"><a name=\"l00188\"></a><span class=\"lineno\">  188</span>&#160;<span class=\"preprocessor\">#endif</span></div>\n<div class=\"line\"><a name=\"l00189\"></a><span class=\"lineno\">  189</span>&#160; </div>\n<div class=\"line\"><a name=\"l00190\"></a><span class=\"lineno\">  190</span>&#160;<span class=\"preprocessor\">#if defined(GLFW_EXPOSE_NATIVE_COCOA)</span></div>\n<div class=\"line\"><a name=\"l00191\"></a><span class=\"lineno\">  191</span>&#160; </div>\n<div class=\"line\"><a name=\"l00203\"></a><span class=\"lineno\">  203</span>&#160;GLFWAPI CGDirectDisplayID <a class=\"code\" href=\"group__native.html#gaf22f429aec4b1aab316142d66d9be3e6\">glfwGetCocoaMonitor</a>(<a class=\"code\" href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a>* monitor);</div>\n<div class=\"line\"><a name=\"l00204\"></a><span class=\"lineno\">  204</span>&#160; </div>\n<div class=\"line\"><a name=\"l00217\"></a><span class=\"lineno\">  217</span>&#160;GLFWAPI <span class=\"keywordtype\">id</span> <a class=\"code\" href=\"group__native.html#gac3ed9d495d0c2bb9652de5a50c648715\">glfwGetCocoaWindow</a>(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window);</div>\n<div class=\"line\"><a name=\"l00218\"></a><span class=\"lineno\">  218</span>&#160;<span class=\"preprocessor\">#endif</span></div>\n<div class=\"line\"><a name=\"l00219\"></a><span class=\"lineno\">  219</span>&#160; </div>\n<div class=\"line\"><a name=\"l00220\"></a><span class=\"lineno\">  220</span>&#160;<span class=\"preprocessor\">#if defined(GLFW_EXPOSE_NATIVE_NSGL)</span></div>\n<div class=\"line\"><a name=\"l00221\"></a><span class=\"lineno\">  221</span>&#160; </div>\n<div class=\"line\"><a name=\"l00233\"></a><span class=\"lineno\">  233</span>&#160;GLFWAPI <span class=\"keywordtype\">id</span> <a class=\"code\" href=\"group__native.html#ga559e002e3cd63c979881770cd4dc63bc\">glfwGetNSGLContext</a>(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window);</div>\n<div class=\"line\"><a name=\"l00234\"></a><span class=\"lineno\">  234</span>&#160;<span class=\"preprocessor\">#endif</span></div>\n<div class=\"line\"><a name=\"l00235\"></a><span class=\"lineno\">  235</span>&#160; </div>\n<div class=\"line\"><a name=\"l00236\"></a><span class=\"lineno\">  236</span>&#160;<span class=\"preprocessor\">#if defined(GLFW_EXPOSE_NATIVE_X11)</span></div>\n<div class=\"line\"><a name=\"l00237\"></a><span class=\"lineno\">  237</span>&#160; </div>\n<div class=\"line\"><a name=\"l00249\"></a><span class=\"lineno\">  249</span>&#160;GLFWAPI Display* <a class=\"code\" href=\"group__native.html#ga8519b66594ea3ef6eeafaa2e3ee37406\">glfwGetX11Display</a>(<span class=\"keywordtype\">void</span>);</div>\n<div class=\"line\"><a name=\"l00250\"></a><span class=\"lineno\">  250</span>&#160; </div>\n<div class=\"line\"><a name=\"l00263\"></a><span class=\"lineno\">  263</span>&#160;GLFWAPI RRCrtc <a class=\"code\" href=\"group__native.html#ga088fbfa80f50569402b41be71ad66e40\">glfwGetX11Adapter</a>(<a class=\"code\" href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a>* monitor);</div>\n<div class=\"line\"><a name=\"l00264\"></a><span class=\"lineno\">  264</span>&#160; </div>\n<div class=\"line\"><a name=\"l00277\"></a><span class=\"lineno\">  277</span>&#160;GLFWAPI RROutput <a class=\"code\" href=\"group__native.html#gab2f8cc043905e9fa9b12bfdbbcfe874c\">glfwGetX11Monitor</a>(<a class=\"code\" href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a>* monitor);</div>\n<div class=\"line\"><a name=\"l00278\"></a><span class=\"lineno\">  278</span>&#160; </div>\n<div class=\"line\"><a name=\"l00291\"></a><span class=\"lineno\">  291</span>&#160;GLFWAPI Window <a class=\"code\" href=\"group__native.html#ga90ca676322740842db446999a1b1f21d\">glfwGetX11Window</a>(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window);</div>\n<div class=\"line\"><a name=\"l00292\"></a><span class=\"lineno\">  292</span>&#160; </div>\n<div class=\"line\"><a name=\"l00313\"></a><span class=\"lineno\">  313</span>&#160;GLFWAPI <span class=\"keywordtype\">void</span> <a class=\"code\" href=\"group__native.html#ga55f879ab02d93367f966186b6f0133f7\">glfwSetX11SelectionString</a>(<span class=\"keyword\">const</span> <span class=\"keywordtype\">char</span>* <span class=\"keywordtype\">string</span>);</div>\n<div class=\"line\"><a name=\"l00314\"></a><span class=\"lineno\">  314</span>&#160; </div>\n<div class=\"line\"><a name=\"l00341\"></a><span class=\"lineno\">  341</span>&#160;GLFWAPI <span class=\"keyword\">const</span> <span class=\"keywordtype\">char</span>* <a class=\"code\" href=\"group__native.html#ga72f23e3980b83788c70aa854eca31430\">glfwGetX11SelectionString</a>(<span class=\"keywordtype\">void</span>);</div>\n<div class=\"line\"><a name=\"l00342\"></a><span class=\"lineno\">  342</span>&#160;<span class=\"preprocessor\">#endif</span></div>\n<div class=\"line\"><a name=\"l00343\"></a><span class=\"lineno\">  343</span>&#160; </div>\n<div class=\"line\"><a name=\"l00344\"></a><span class=\"lineno\">  344</span>&#160;<span class=\"preprocessor\">#if defined(GLFW_EXPOSE_NATIVE_GLX)</span></div>\n<div class=\"line\"><a name=\"l00345\"></a><span class=\"lineno\">  345</span>&#160; </div>\n<div class=\"line\"><a name=\"l00357\"></a><span class=\"lineno\">  357</span>&#160;GLFWAPI GLXContext <a class=\"code\" href=\"group__native.html#ga62d884114b0abfcdc2930e89f20867e2\">glfwGetGLXContext</a>(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window);</div>\n<div class=\"line\"><a name=\"l00358\"></a><span class=\"lineno\">  358</span>&#160; </div>\n<div class=\"line\"><a name=\"l00371\"></a><span class=\"lineno\">  371</span>&#160;GLFWAPI GLXWindow <a class=\"code\" href=\"group__native.html#ga1ed27b8766e859a21381e8f8ce18d049\">glfwGetGLXWindow</a>(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window);</div>\n<div class=\"line\"><a name=\"l00372\"></a><span class=\"lineno\">  372</span>&#160;<span class=\"preprocessor\">#endif</span></div>\n<div class=\"line\"><a name=\"l00373\"></a><span class=\"lineno\">  373</span>&#160; </div>\n<div class=\"line\"><a name=\"l00374\"></a><span class=\"lineno\">  374</span>&#160;<span class=\"preprocessor\">#if defined(GLFW_EXPOSE_NATIVE_WAYLAND)</span></div>\n<div class=\"line\"><a name=\"l00375\"></a><span class=\"lineno\">  375</span>&#160; </div>\n<div class=\"line\"><a name=\"l00387\"></a><span class=\"lineno\">  387</span>&#160;GLFWAPI <span class=\"keyword\">struct </span>wl_display* <a class=\"code\" href=\"group__native.html#gaaf8118a3c877f3a6bc8e7a649519de5e\">glfwGetWaylandDisplay</a>(<span class=\"keywordtype\">void</span>);</div>\n<div class=\"line\"><a name=\"l00388\"></a><span class=\"lineno\">  388</span>&#160; </div>\n<div class=\"line\"><a name=\"l00401\"></a><span class=\"lineno\">  401</span>&#160;GLFWAPI <span class=\"keyword\">struct </span>wl_output* <a class=\"code\" href=\"group__native.html#gab10427a667b6cd91eec7709f7a906bd3\">glfwGetWaylandMonitor</a>(<a class=\"code\" href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a>* monitor);</div>\n<div class=\"line\"><a name=\"l00402\"></a><span class=\"lineno\">  402</span>&#160; </div>\n<div class=\"line\"><a name=\"l00415\"></a><span class=\"lineno\">  415</span>&#160;GLFWAPI <span class=\"keyword\">struct </span>wl_surface* <a class=\"code\" href=\"group__native.html#ga4738d7aca4191363519a9a641c3ab64c\">glfwGetWaylandWindow</a>(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window);</div>\n<div class=\"line\"><a name=\"l00416\"></a><span class=\"lineno\">  416</span>&#160;<span class=\"preprocessor\">#endif</span></div>\n<div class=\"line\"><a name=\"l00417\"></a><span class=\"lineno\">  417</span>&#160; </div>\n<div class=\"line\"><a name=\"l00418\"></a><span class=\"lineno\">  418</span>&#160;<span class=\"preprocessor\">#if defined(GLFW_EXPOSE_NATIVE_EGL)</span></div>\n<div class=\"line\"><a name=\"l00419\"></a><span class=\"lineno\">  419</span>&#160; </div>\n<div class=\"line\"><a name=\"l00431\"></a><span class=\"lineno\">  431</span>&#160;GLFWAPI EGLDisplay <a class=\"code\" href=\"group__native.html#ga1cd8d973f47aacb5532d368147cc3138\">glfwGetEGLDisplay</a>(<span class=\"keywordtype\">void</span>);</div>\n<div class=\"line\"><a name=\"l00432\"></a><span class=\"lineno\">  432</span>&#160; </div>\n<div class=\"line\"><a name=\"l00445\"></a><span class=\"lineno\">  445</span>&#160;GLFWAPI EGLContext <a class=\"code\" href=\"group__native.html#ga671c5072becd085f4ab5771a9c8efcf1\">glfwGetEGLContext</a>(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window);</div>\n<div class=\"line\"><a name=\"l00446\"></a><span class=\"lineno\">  446</span>&#160; </div>\n<div class=\"line\"><a name=\"l00459\"></a><span class=\"lineno\">  459</span>&#160;GLFWAPI EGLSurface <a class=\"code\" href=\"group__native.html#ga2199b36117a6a695fec8441d8052eee6\">glfwGetEGLSurface</a>(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window);</div>\n<div class=\"line\"><a name=\"l00460\"></a><span class=\"lineno\">  460</span>&#160;<span class=\"preprocessor\">#endif</span></div>\n<div class=\"line\"><a name=\"l00461\"></a><span class=\"lineno\">  461</span>&#160; </div>\n<div class=\"line\"><a name=\"l00462\"></a><span class=\"lineno\">  462</span>&#160;<span class=\"preprocessor\">#if defined(GLFW_EXPOSE_NATIVE_OSMESA)</span></div>\n<div class=\"line\"><a name=\"l00463\"></a><span class=\"lineno\">  463</span>&#160; </div>\n<div class=\"line\"><a name=\"l00482\"></a><span class=\"lineno\">  482</span>&#160;GLFWAPI <span class=\"keywordtype\">int</span> <a class=\"code\" href=\"group__native.html#ga3b36e3e3dcf308b776427b6bd73cc132\">glfwGetOSMesaColorBuffer</a>(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window, <span class=\"keywordtype\">int</span>* width, <span class=\"keywordtype\">int</span>* height, <span class=\"keywordtype\">int</span>* format, <span class=\"keywordtype\">void</span>** buffer);</div>\n<div class=\"line\"><a name=\"l00483\"></a><span class=\"lineno\">  483</span>&#160; </div>\n<div class=\"line\"><a name=\"l00503\"></a><span class=\"lineno\">  503</span>&#160;GLFWAPI <span class=\"keywordtype\">int</span> <a class=\"code\" href=\"group__native.html#ga6b64039ffc88a7a2f57f0956c0c75d53\">glfwGetOSMesaDepthBuffer</a>(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window, <span class=\"keywordtype\">int</span>* width, <span class=\"keywordtype\">int</span>* height, <span class=\"keywordtype\">int</span>* bytesPerValue, <span class=\"keywordtype\">void</span>** buffer);</div>\n<div class=\"line\"><a name=\"l00504\"></a><span class=\"lineno\">  504</span>&#160; </div>\n<div class=\"line\"><a name=\"l00517\"></a><span class=\"lineno\">  517</span>&#160;GLFWAPI OSMesaContext <a class=\"code\" href=\"group__native.html#ga9e47700080094eb569cb053afaa88773\">glfwGetOSMesaContext</a>(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window);</div>\n<div class=\"line\"><a name=\"l00518\"></a><span class=\"lineno\">  518</span>&#160;<span class=\"preprocessor\">#endif</span></div>\n<div class=\"line\"><a name=\"l00519\"></a><span class=\"lineno\">  519</span>&#160; </div>\n<div class=\"line\"><a name=\"l00520\"></a><span class=\"lineno\">  520</span>&#160;<span class=\"preprocessor\">#ifdef __cplusplus</span></div>\n<div class=\"line\"><a name=\"l00521\"></a><span class=\"lineno\">  521</span>&#160;}</div>\n<div class=\"line\"><a name=\"l00522\"></a><span class=\"lineno\">  522</span>&#160;<span class=\"preprocessor\">#endif</span></div>\n<div class=\"line\"><a name=\"l00523\"></a><span class=\"lineno\">  523</span>&#160; </div>\n<div class=\"line\"><a name=\"l00524\"></a><span class=\"lineno\">  524</span>&#160;<span class=\"preprocessor\">#endif </span><span class=\"comment\">/* _glfw3_native_h_ */</span><span class=\"preprocessor\"></span></div>\n<div class=\"line\"><a name=\"l00525\"></a><span class=\"lineno\">  525</span>&#160; </div>\n</div><!-- fragment --></div><!-- contents -->\n<div class=\"ttc\" id=\"agroup__native_html_ga6b64039ffc88a7a2f57f0956c0c75d53\"><div class=\"ttname\"><a href=\"group__native.html#ga6b64039ffc88a7a2f57f0956c0c75d53\">glfwGetOSMesaDepthBuffer</a></div><div class=\"ttdeci\">int glfwGetOSMesaDepthBuffer(GLFWwindow *window, int *width, int *height, int *bytesPerValue, void **buffer)</div><div class=\"ttdoc\">Retrieves the depth buffer associated with the specified window.</div></div>\n<div class=\"ttc\" id=\"agroup__native_html_ga72f23e3980b83788c70aa854eca31430\"><div class=\"ttname\"><a href=\"group__native.html#ga72f23e3980b83788c70aa854eca31430\">glfwGetX11SelectionString</a></div><div class=\"ttdeci\">const char * glfwGetX11SelectionString(void)</div><div class=\"ttdoc\">Returns the contents of the current primary selection as a string.</div></div>\n<div class=\"ttc\" id=\"agroup__native_html_ga1ed27b8766e859a21381e8f8ce18d049\"><div class=\"ttname\"><a href=\"group__native.html#ga1ed27b8766e859a21381e8f8ce18d049\">glfwGetGLXWindow</a></div><div class=\"ttdeci\">GLXWindow glfwGetGLXWindow(GLFWwindow *window)</div><div class=\"ttdoc\">Returns the GLXWindow of the specified window.</div></div>\n<div class=\"ttc\" id=\"agroup__native_html_gaaf8118a3c877f3a6bc8e7a649519de5e\"><div class=\"ttname\"><a href=\"group__native.html#gaaf8118a3c877f3a6bc8e7a649519de5e\">glfwGetWaylandDisplay</a></div><div class=\"ttdeci\">struct wl_display * glfwGetWaylandDisplay(void)</div><div class=\"ttdoc\">Returns the struct wl_display* used by GLFW.</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_ga3c96d80d363e67d13a41b5d1821f3242\"><div class=\"ttname\"><a href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a></div><div class=\"ttdeci\">struct GLFWwindow GLFWwindow</div><div class=\"ttdoc\">Opaque window object.</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:1152</div></div>\n<div class=\"ttc\" id=\"agroup__native_html_gaf22f429aec4b1aab316142d66d9be3e6\"><div class=\"ttname\"><a href=\"group__native.html#gaf22f429aec4b1aab316142d66d9be3e6\">glfwGetCocoaMonitor</a></div><div class=\"ttdeci\">CGDirectDisplayID glfwGetCocoaMonitor(GLFWmonitor *monitor)</div><div class=\"ttdoc\">Returns the CGDirectDisplayID of the specified monitor.</div></div>\n<div class=\"ttc\" id=\"agroup__native_html_ga671c5072becd085f4ab5771a9c8efcf1\"><div class=\"ttname\"><a href=\"group__native.html#ga671c5072becd085f4ab5771a9c8efcf1\">glfwGetEGLContext</a></div><div class=\"ttdeci\">EGLContext glfwGetEGLContext(GLFWwindow *window)</div><div class=\"ttdoc\">Returns the EGLContext of the specified window.</div></div>\n<div class=\"ttc\" id=\"agroup__native_html_ga55f879ab02d93367f966186b6f0133f7\"><div class=\"ttname\"><a href=\"group__native.html#ga55f879ab02d93367f966186b6f0133f7\">glfwSetX11SelectionString</a></div><div class=\"ttdeci\">void glfwSetX11SelectionString(const char *string)</div><div class=\"ttdoc\">Sets the current primary selection to the specified string.</div></div>\n<div class=\"ttc\" id=\"agroup__native_html_gab10427a667b6cd91eec7709f7a906bd3\"><div class=\"ttname\"><a href=\"group__native.html#gab10427a667b6cd91eec7709f7a906bd3\">glfwGetWaylandMonitor</a></div><div class=\"ttdeci\">struct wl_output * glfwGetWaylandMonitor(GLFWmonitor *monitor)</div><div class=\"ttdoc\">Returns the struct wl_output* of the specified monitor.</div></div>\n<div class=\"ttc\" id=\"agroup__native_html_gadc4010d91d9cc1134d040eeb1202a143\"><div class=\"ttname\"><a href=\"group__native.html#gadc4010d91d9cc1134d040eeb1202a143\">glfwGetWGLContext</a></div><div class=\"ttdeci\">HGLRC glfwGetWGLContext(GLFWwindow *window)</div><div class=\"ttdoc\">Returns the HGLRC of the specified window.</div></div>\n<div class=\"ttc\" id=\"agroup__native_html_ga62d884114b0abfcdc2930e89f20867e2\"><div class=\"ttname\"><a href=\"group__native.html#ga62d884114b0abfcdc2930e89f20867e2\">glfwGetGLXContext</a></div><div class=\"ttdeci\">GLXContext glfwGetGLXContext(GLFWwindow *window)</div><div class=\"ttdoc\">Returns the GLXContext of the specified window.</div></div>\n<div class=\"ttc\" id=\"agroup__native_html_ga8519b66594ea3ef6eeafaa2e3ee37406\"><div class=\"ttname\"><a href=\"group__native.html#ga8519b66594ea3ef6eeafaa2e3ee37406\">glfwGetX11Display</a></div><div class=\"ttdeci\">Display * glfwGetX11Display(void)</div><div class=\"ttdoc\">Returns the Display used by GLFW.</div></div>\n<div class=\"ttc\" id=\"agroup__native_html_gac3ed9d495d0c2bb9652de5a50c648715\"><div class=\"ttname\"><a href=\"group__native.html#gac3ed9d495d0c2bb9652de5a50c648715\">glfwGetCocoaWindow</a></div><div class=\"ttdeci\">id glfwGetCocoaWindow(GLFWwindow *window)</div><div class=\"ttdoc\">Returns the NSWindow of the specified window.</div></div>\n<div class=\"ttc\" id=\"agroup__native_html_ga4738d7aca4191363519a9a641c3ab64c\"><div class=\"ttname\"><a href=\"group__native.html#ga4738d7aca4191363519a9a641c3ab64c\">glfwGetWaylandWindow</a></div><div class=\"ttdeci\">struct wl_surface * glfwGetWaylandWindow(GLFWwindow *window)</div><div class=\"ttdoc\">Returns the main struct wl_surface* of the specified window.</div></div>\n<div class=\"ttc\" id=\"agroup__native_html_gac408b09a330749402d5d1fa1f5894dd9\"><div class=\"ttname\"><a href=\"group__native.html#gac408b09a330749402d5d1fa1f5894dd9\">glfwGetWin32Monitor</a></div><div class=\"ttdeci\">const char * glfwGetWin32Monitor(GLFWmonitor *monitor)</div><div class=\"ttdoc\">Returns the display device name of the specified monitor.</div></div>\n<div class=\"ttc\" id=\"agroup__native_html_ga559e002e3cd63c979881770cd4dc63bc\"><div class=\"ttname\"><a href=\"group__native.html#ga559e002e3cd63c979881770cd4dc63bc\">glfwGetNSGLContext</a></div><div class=\"ttdeci\">id glfwGetNSGLContext(GLFWwindow *window)</div><div class=\"ttdoc\">Returns the NSOpenGLContext of the specified window.</div></div>\n<div class=\"ttc\" id=\"agroup__native_html_gac84f63a3f9db145b9435e5e0dbc4183d\"><div class=\"ttname\"><a href=\"group__native.html#gac84f63a3f9db145b9435e5e0dbc4183d\">glfwGetWin32Adapter</a></div><div class=\"ttdeci\">const char * glfwGetWin32Adapter(GLFWmonitor *monitor)</div><div class=\"ttdoc\">Returns the adapter device name of the specified monitor.</div></div>\n<div class=\"ttc\" id=\"agroup__native_html_ga9e47700080094eb569cb053afaa88773\"><div class=\"ttname\"><a href=\"group__native.html#ga9e47700080094eb569cb053afaa88773\">glfwGetOSMesaContext</a></div><div class=\"ttdeci\">OSMesaContext glfwGetOSMesaContext(GLFWwindow *window)</div><div class=\"ttdoc\">Returns the OSMesaContext of the specified window.</div></div>\n<div class=\"ttc\" id=\"agroup__native_html_ga90ca676322740842db446999a1b1f21d\"><div class=\"ttname\"><a href=\"group__native.html#ga90ca676322740842db446999a1b1f21d\">glfwGetX11Window</a></div><div class=\"ttdeci\">Window glfwGetX11Window(GLFWwindow *window)</div><div class=\"ttdoc\">Returns the Window of the specified window.</div></div>\n<div class=\"ttc\" id=\"agroup__native_html_ga2199b36117a6a695fec8441d8052eee6\"><div class=\"ttname\"><a href=\"group__native.html#ga2199b36117a6a695fec8441d8052eee6\">glfwGetEGLSurface</a></div><div class=\"ttdeci\">EGLSurface glfwGetEGLSurface(GLFWwindow *window)</div><div class=\"ttdoc\">Returns the EGLSurface of the specified window.</div></div>\n<div class=\"ttc\" id=\"agroup__native_html_ga3b36e3e3dcf308b776427b6bd73cc132\"><div class=\"ttname\"><a href=\"group__native.html#ga3b36e3e3dcf308b776427b6bd73cc132\">glfwGetOSMesaColorBuffer</a></div><div class=\"ttdeci\">int glfwGetOSMesaColorBuffer(GLFWwindow *window, int *width, int *height, int *format, void **buffer)</div><div class=\"ttdoc\">Retrieves the color buffer associated with the specified window.</div></div>\n<div class=\"ttc\" id=\"agroup__native_html_gab2f8cc043905e9fa9b12bfdbbcfe874c\"><div class=\"ttname\"><a href=\"group__native.html#gab2f8cc043905e9fa9b12bfdbbcfe874c\">glfwGetX11Monitor</a></div><div class=\"ttdeci\">RROutput glfwGetX11Monitor(GLFWmonitor *monitor)</div><div class=\"ttdoc\">Returns the RROutput of the specified monitor.</div></div>\n<div class=\"ttc\" id=\"agroup__native_html_ga088fbfa80f50569402b41be71ad66e40\"><div class=\"ttname\"><a href=\"group__native.html#ga088fbfa80f50569402b41be71ad66e40\">glfwGetX11Adapter</a></div><div class=\"ttdeci\">RRCrtc glfwGetX11Adapter(GLFWmonitor *monitor)</div><div class=\"ttdoc\">Returns the RRCrtc of the specified monitor.</div></div>\n<div class=\"ttc\" id=\"agroup__native_html_ga1cd8d973f47aacb5532d368147cc3138\"><div class=\"ttname\"><a href=\"group__native.html#ga1cd8d973f47aacb5532d368147cc3138\">glfwGetEGLDisplay</a></div><div class=\"ttdeci\">EGLDisplay glfwGetEGLDisplay(void)</div><div class=\"ttdoc\">Returns the EGLDisplay used by GLFW.</div></div>\n<div class=\"ttc\" id=\"agroup__native_html_gafe5079aa79038b0079fc09d5f0a8e667\"><div class=\"ttname\"><a href=\"group__native.html#gafe5079aa79038b0079fc09d5f0a8e667\">glfwGetWin32Window</a></div><div class=\"ttdeci\">HWND glfwGetWin32Window(GLFWwindow *window)</div><div class=\"ttdoc\">Returns the HWND of the specified window.</div></div>\n<div class=\"ttc\" id=\"agroup__monitor_html_ga8d9efd1cde9426692c73fe40437d0ae3\"><div class=\"ttname\"><a href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a></div><div class=\"ttdeci\">struct GLFWmonitor GLFWmonitor</div><div class=\"ttdoc\">Opaque monitor object.</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:1140</div></div>\n<address class=\"footer\">\n<p>\nLast update on Mon Jan 20 2020 for GLFW 3.3.2\n</p>\n</address>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/group__buttons.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta http-equiv=\"X-UA-Compatible\" content=\"IE=9\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<title>GLFW: Mouse buttons</title>\n<link href=\"tabs.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"jquery.js\"></script>\n<script type=\"text/javascript\" src=\"dynsections.js\"></script>\n<link href=\"search/search.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"search/searchdata.js\"></script>\n<script type=\"text/javascript\" src=\"search/search.js\"></script>\n<link href=\"doxygen.css\" rel=\"stylesheet\" type=\"text/css\" />\n<link href=\"extra.css\" rel=\"stylesheet\" type=\"text/css\"/>\n</head>\n<body>\n<div id=\"top\"><!-- do not remove this div, it is closed by doxygen! -->\n<div id=\"titlearea\">\n\t<div class=\"glfwheader\">\n\t\t<a href=\"https://www.glfw.org/\" id=\"glfwhome\">GLFW</a>\n\t\t<ul class=\"glfwnavbar\">\n\t\t\t<li><a href=\"https://www.glfw.org/documentation.html\">Documentation</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/download.html\">Download</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/community.html\">Community</a></li>\n\t\t</ul>\n\t</div>\n</div>\n<!-- end header part -->\n<!-- Generated by Doxygen 1.8.16 -->\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\nvar searchBox = new SearchBox(\"searchBox\", \"search\",false,'Search');\n/* @license-end */\n</script>\n<script type=\"text/javascript\" src=\"menudata.js\"></script>\n<script type=\"text/javascript\" src=\"menu.js\"></script>\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\n$(function() {\n  initMenu('',true,false,'search.php','Search');\n  $(document).ready(function() { init_search(); });\n});\n/* @license-end */</script>\n<div id=\"main-nav\"></div>\n</div><!-- top -->\n<!-- window showing the filter options -->\n<div id=\"MSearchSelectWindow\"\n     onmouseover=\"return searchBox.OnSearchSelectShow()\"\n     onmouseout=\"return searchBox.OnSearchSelectHide()\"\n     onkeydown=\"return searchBox.OnSearchSelectKey(event)\">\n</div>\n\n<!-- iframe showing the search results (closed by default) -->\n<div id=\"MSearchResultsWindow\">\n<iframe src=\"javascript:void(0)\" frameborder=\"0\" \n        name=\"MSearchResults\" id=\"MSearchResults\">\n</iframe>\n</div>\n\n<div class=\"header\">\n  <div class=\"summary\">\n<a href=\"#define-members\">Macros</a>  </div>\n  <div class=\"headertitle\">\n<div class=\"title\">Mouse buttons<div class=\"ingroups\"><a class=\"el\" href=\"group__input.html\">Input reference</a></div></div>  </div>\n</div><!--header-->\n<div class=\"contents\">\n<a name=\"details\" id=\"details\"></a><h2 class=\"groupheader\">Description</h2>\n<p>See <a class=\"el\" href=\"input_guide.html#input_mouse_button\">mouse button input</a> for how these are used. </p>\n<table class=\"memberdecls\">\n<tr class=\"heading\"><td colspan=\"2\"><h2 class=\"groupheader\"><a name=\"define-members\"></a>\nMacros</h2></td></tr>\n<tr class=\"memitem:ga181a6e875251fd8671654eff00f9112e\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__buttons.html#ga181a6e875251fd8671654eff00f9112e\">GLFW_MOUSE_BUTTON_1</a>&#160;&#160;&#160;0</td></tr>\n<tr class=\"separator:ga181a6e875251fd8671654eff00f9112e\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga604b39b92c88ce9bd332e97fc3f4156c\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__buttons.html#ga604b39b92c88ce9bd332e97fc3f4156c\">GLFW_MOUSE_BUTTON_2</a>&#160;&#160;&#160;1</td></tr>\n<tr class=\"separator:ga604b39b92c88ce9bd332e97fc3f4156c\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga0130d505563d0236a6f85545f19e1721\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__buttons.html#ga0130d505563d0236a6f85545f19e1721\">GLFW_MOUSE_BUTTON_3</a>&#160;&#160;&#160;2</td></tr>\n<tr class=\"separator:ga0130d505563d0236a6f85545f19e1721\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga53f4097bb01d5521c7d9513418c91ca9\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__buttons.html#ga53f4097bb01d5521c7d9513418c91ca9\">GLFW_MOUSE_BUTTON_4</a>&#160;&#160;&#160;3</td></tr>\n<tr class=\"separator:ga53f4097bb01d5521c7d9513418c91ca9\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gaf08c4ddecb051d3d9667db1d5e417c9c\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__buttons.html#gaf08c4ddecb051d3d9667db1d5e417c9c\">GLFW_MOUSE_BUTTON_5</a>&#160;&#160;&#160;4</td></tr>\n<tr class=\"separator:gaf08c4ddecb051d3d9667db1d5e417c9c\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gae8513e06aab8aa393b595f22c6d8257a\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__buttons.html#gae8513e06aab8aa393b595f22c6d8257a\">GLFW_MOUSE_BUTTON_6</a>&#160;&#160;&#160;5</td></tr>\n<tr class=\"separator:gae8513e06aab8aa393b595f22c6d8257a\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga8b02a1ab55dde45b3a3883d54ffd7dc7\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__buttons.html#ga8b02a1ab55dde45b3a3883d54ffd7dc7\">GLFW_MOUSE_BUTTON_7</a>&#160;&#160;&#160;6</td></tr>\n<tr class=\"separator:ga8b02a1ab55dde45b3a3883d54ffd7dc7\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga35d5c4263e0dc0d0a4731ca6c562f32c\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__buttons.html#ga35d5c4263e0dc0d0a4731ca6c562f32c\">GLFW_MOUSE_BUTTON_8</a>&#160;&#160;&#160;7</td></tr>\n<tr class=\"separator:ga35d5c4263e0dc0d0a4731ca6c562f32c\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gab1fd86a4518a9141ec7bcde2e15a2fdf\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__buttons.html#gab1fd86a4518a9141ec7bcde2e15a2fdf\">GLFW_MOUSE_BUTTON_LAST</a>&#160;&#160;&#160;<a class=\"el\" href=\"group__buttons.html#ga35d5c4263e0dc0d0a4731ca6c562f32c\">GLFW_MOUSE_BUTTON_8</a></td></tr>\n<tr class=\"separator:gab1fd86a4518a9141ec7bcde2e15a2fdf\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gaf37100431dcd5082d48f95ee8bc8cd56\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__buttons.html#gaf37100431dcd5082d48f95ee8bc8cd56\">GLFW_MOUSE_BUTTON_LEFT</a>&#160;&#160;&#160;<a class=\"el\" href=\"group__buttons.html#ga181a6e875251fd8671654eff00f9112e\">GLFW_MOUSE_BUTTON_1</a></td></tr>\n<tr class=\"separator:gaf37100431dcd5082d48f95ee8bc8cd56\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga3e2f2cf3c4942df73cc094247d275e74\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__buttons.html#ga3e2f2cf3c4942df73cc094247d275e74\">GLFW_MOUSE_BUTTON_RIGHT</a>&#160;&#160;&#160;<a class=\"el\" href=\"group__buttons.html#ga604b39b92c88ce9bd332e97fc3f4156c\">GLFW_MOUSE_BUTTON_2</a></td></tr>\n<tr class=\"separator:ga3e2f2cf3c4942df73cc094247d275e74\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga34a4d2a701434f763fd93a2ff842b95a\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__buttons.html#ga34a4d2a701434f763fd93a2ff842b95a\">GLFW_MOUSE_BUTTON_MIDDLE</a>&#160;&#160;&#160;<a class=\"el\" href=\"group__buttons.html#ga0130d505563d0236a6f85545f19e1721\">GLFW_MOUSE_BUTTON_3</a></td></tr>\n<tr class=\"separator:ga34a4d2a701434f763fd93a2ff842b95a\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n</table>\n<h2 class=\"groupheader\">Macro Definition Documentation</h2>\n<a id=\"ga181a6e875251fd8671654eff00f9112e\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga181a6e875251fd8671654eff00f9112e\">&#9670;&nbsp;</a></span>GLFW_MOUSE_BUTTON_1</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_MOUSE_BUTTON_1&#160;&#160;&#160;0</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"ga604b39b92c88ce9bd332e97fc3f4156c\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga604b39b92c88ce9bd332e97fc3f4156c\">&#9670;&nbsp;</a></span>GLFW_MOUSE_BUTTON_2</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_MOUSE_BUTTON_2&#160;&#160;&#160;1</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"ga0130d505563d0236a6f85545f19e1721\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga0130d505563d0236a6f85545f19e1721\">&#9670;&nbsp;</a></span>GLFW_MOUSE_BUTTON_3</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_MOUSE_BUTTON_3&#160;&#160;&#160;2</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"ga53f4097bb01d5521c7d9513418c91ca9\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga53f4097bb01d5521c7d9513418c91ca9\">&#9670;&nbsp;</a></span>GLFW_MOUSE_BUTTON_4</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_MOUSE_BUTTON_4&#160;&#160;&#160;3</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"gaf08c4ddecb051d3d9667db1d5e417c9c\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gaf08c4ddecb051d3d9667db1d5e417c9c\">&#9670;&nbsp;</a></span>GLFW_MOUSE_BUTTON_5</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_MOUSE_BUTTON_5&#160;&#160;&#160;4</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"gae8513e06aab8aa393b595f22c6d8257a\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gae8513e06aab8aa393b595f22c6d8257a\">&#9670;&nbsp;</a></span>GLFW_MOUSE_BUTTON_6</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_MOUSE_BUTTON_6&#160;&#160;&#160;5</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"ga8b02a1ab55dde45b3a3883d54ffd7dc7\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga8b02a1ab55dde45b3a3883d54ffd7dc7\">&#9670;&nbsp;</a></span>GLFW_MOUSE_BUTTON_7</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_MOUSE_BUTTON_7&#160;&#160;&#160;6</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"ga35d5c4263e0dc0d0a4731ca6c562f32c\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga35d5c4263e0dc0d0a4731ca6c562f32c\">&#9670;&nbsp;</a></span>GLFW_MOUSE_BUTTON_8</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_MOUSE_BUTTON_8&#160;&#160;&#160;7</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"gab1fd86a4518a9141ec7bcde2e15a2fdf\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gab1fd86a4518a9141ec7bcde2e15a2fdf\">&#9670;&nbsp;</a></span>GLFW_MOUSE_BUTTON_LAST</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_MOUSE_BUTTON_LAST&#160;&#160;&#160;<a class=\"el\" href=\"group__buttons.html#ga35d5c4263e0dc0d0a4731ca6c562f32c\">GLFW_MOUSE_BUTTON_8</a></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"gaf37100431dcd5082d48f95ee8bc8cd56\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gaf37100431dcd5082d48f95ee8bc8cd56\">&#9670;&nbsp;</a></span>GLFW_MOUSE_BUTTON_LEFT</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_MOUSE_BUTTON_LEFT&#160;&#160;&#160;<a class=\"el\" href=\"group__buttons.html#ga181a6e875251fd8671654eff00f9112e\">GLFW_MOUSE_BUTTON_1</a></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"ga3e2f2cf3c4942df73cc094247d275e74\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga3e2f2cf3c4942df73cc094247d275e74\">&#9670;&nbsp;</a></span>GLFW_MOUSE_BUTTON_RIGHT</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_MOUSE_BUTTON_RIGHT&#160;&#160;&#160;<a class=\"el\" href=\"group__buttons.html#ga604b39b92c88ce9bd332e97fc3f4156c\">GLFW_MOUSE_BUTTON_2</a></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"ga34a4d2a701434f763fd93a2ff842b95a\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga34a4d2a701434f763fd93a2ff842b95a\">&#9670;&nbsp;</a></span>GLFW_MOUSE_BUTTON_MIDDLE</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_MOUSE_BUTTON_MIDDLE&#160;&#160;&#160;<a class=\"el\" href=\"group__buttons.html#ga0130d505563d0236a6f85545f19e1721\">GLFW_MOUSE_BUTTON_3</a></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n</div><!-- contents -->\n<address class=\"footer\">\n<p>\nLast update on Mon Jan 20 2020 for GLFW 3.3.2\n</p>\n</address>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/group__context.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta http-equiv=\"X-UA-Compatible\" content=\"IE=9\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<title>GLFW: Context reference</title>\n<link href=\"tabs.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"jquery.js\"></script>\n<script type=\"text/javascript\" src=\"dynsections.js\"></script>\n<link href=\"search/search.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"search/searchdata.js\"></script>\n<script type=\"text/javascript\" src=\"search/search.js\"></script>\n<link href=\"doxygen.css\" rel=\"stylesheet\" type=\"text/css\" />\n<link href=\"extra.css\" rel=\"stylesheet\" type=\"text/css\"/>\n</head>\n<body>\n<div id=\"top\"><!-- do not remove this div, it is closed by doxygen! -->\n<div id=\"titlearea\">\n\t<div class=\"glfwheader\">\n\t\t<a href=\"https://www.glfw.org/\" id=\"glfwhome\">GLFW</a>\n\t\t<ul class=\"glfwnavbar\">\n\t\t\t<li><a href=\"https://www.glfw.org/documentation.html\">Documentation</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/download.html\">Download</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/community.html\">Community</a></li>\n\t\t</ul>\n\t</div>\n</div>\n<!-- end header part -->\n<!-- Generated by Doxygen 1.8.16 -->\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\nvar searchBox = new SearchBox(\"searchBox\", \"search\",false,'Search');\n/* @license-end */\n</script>\n<script type=\"text/javascript\" src=\"menudata.js\"></script>\n<script type=\"text/javascript\" src=\"menu.js\"></script>\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\n$(function() {\n  initMenu('',true,false,'search.php','Search');\n  $(document).ready(function() { init_search(); });\n});\n/* @license-end */</script>\n<div id=\"main-nav\"></div>\n</div><!-- top -->\n<!-- window showing the filter options -->\n<div id=\"MSearchSelectWindow\"\n     onmouseover=\"return searchBox.OnSearchSelectShow()\"\n     onmouseout=\"return searchBox.OnSearchSelectHide()\"\n     onkeydown=\"return searchBox.OnSearchSelectKey(event)\">\n</div>\n\n<!-- iframe showing the search results (closed by default) -->\n<div id=\"MSearchResultsWindow\">\n<iframe src=\"javascript:void(0)\" frameborder=\"0\" \n        name=\"MSearchResults\" id=\"MSearchResults\">\n</iframe>\n</div>\n\n<div class=\"header\">\n  <div class=\"summary\">\n<a href=\"#typedef-members\">Typedefs</a> &#124;\n<a href=\"#func-members\">Functions</a>  </div>\n  <div class=\"headertitle\">\n<div class=\"title\">Context reference</div>  </div>\n</div><!--header-->\n<div class=\"contents\">\n<a name=\"details\" id=\"details\"></a><h2 class=\"groupheader\">Description</h2>\n<p>This is the reference documentation for OpenGL and OpenGL ES context related functions. For more task-oriented information, see the <a class=\"el\" href=\"context_guide.html\">Context guide</a>. </p>\n<table class=\"memberdecls\">\n<tr class=\"heading\"><td colspan=\"2\"><h2 class=\"groupheader\"><a name=\"typedef-members\"></a>\nTypedefs</h2></td></tr>\n<tr class=\"memitem:ga3d47c2d2fbe0be9c505d0e04e91a133c\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">typedef void(*&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__context.html#ga3d47c2d2fbe0be9c505d0e04e91a133c\">GLFWglproc</a>) (void)</td></tr>\n<tr class=\"memdesc:ga3d47c2d2fbe0be9c505d0e04e91a133c\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Client API function pointer type.  <a href=\"group__context.html#ga3d47c2d2fbe0be9c505d0e04e91a133c\">More...</a><br /></td></tr>\n<tr class=\"separator:ga3d47c2d2fbe0be9c505d0e04e91a133c\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n</table><table class=\"memberdecls\">\n<tr class=\"heading\"><td colspan=\"2\"><h2 class=\"groupheader\"><a name=\"func-members\"></a>\nFunctions</h2></td></tr>\n<tr class=\"memitem:ga1c04dc242268f827290fe40aa1c91157\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">void&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__context.html#ga1c04dc242268f827290fe40aa1c91157\">glfwMakeContextCurrent</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window)</td></tr>\n<tr class=\"memdesc:ga1c04dc242268f827290fe40aa1c91157\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Makes the context of the specified window current for the calling thread.  <a href=\"group__context.html#ga1c04dc242268f827290fe40aa1c91157\">More...</a><br /></td></tr>\n<tr class=\"separator:ga1c04dc242268f827290fe40aa1c91157\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gac84759b1f6c2d271a4fea8ae89ec980d\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\"><a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__context.html#gac84759b1f6c2d271a4fea8ae89ec980d\">glfwGetCurrentContext</a> (void)</td></tr>\n<tr class=\"memdesc:gac84759b1f6c2d271a4fea8ae89ec980d\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns the window whose context is current on the calling thread.  <a href=\"group__context.html#gac84759b1f6c2d271a4fea8ae89ec980d\">More...</a><br /></td></tr>\n<tr class=\"separator:gac84759b1f6c2d271a4fea8ae89ec980d\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga6d4e0cdf151b5e579bd67f13202994ed\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">void&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__context.html#ga6d4e0cdf151b5e579bd67f13202994ed\">glfwSwapInterval</a> (int interval)</td></tr>\n<tr class=\"memdesc:ga6d4e0cdf151b5e579bd67f13202994ed\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Sets the swap interval for the current context.  <a href=\"group__context.html#ga6d4e0cdf151b5e579bd67f13202994ed\">More...</a><br /></td></tr>\n<tr class=\"separator:ga6d4e0cdf151b5e579bd67f13202994ed\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga87425065c011cef1ebd6aac75e059dfa\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">int&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__context.html#ga87425065c011cef1ebd6aac75e059dfa\">glfwExtensionSupported</a> (const char *extension)</td></tr>\n<tr class=\"memdesc:ga87425065c011cef1ebd6aac75e059dfa\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns whether the specified extension is available.  <a href=\"group__context.html#ga87425065c011cef1ebd6aac75e059dfa\">More...</a><br /></td></tr>\n<tr class=\"separator:ga87425065c011cef1ebd6aac75e059dfa\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga35f1837e6f666781842483937612f163\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\"><a class=\"el\" href=\"group__context.html#ga3d47c2d2fbe0be9c505d0e04e91a133c\">GLFWglproc</a>&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__context.html#ga35f1837e6f666781842483937612f163\">glfwGetProcAddress</a> (const char *procname)</td></tr>\n<tr class=\"memdesc:ga35f1837e6f666781842483937612f163\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns the address of the specified function for the current context.  <a href=\"group__context.html#ga35f1837e6f666781842483937612f163\">More...</a><br /></td></tr>\n<tr class=\"separator:ga35f1837e6f666781842483937612f163\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n</table>\n<h2 class=\"groupheader\">Typedef Documentation</h2>\n<a id=\"ga3d47c2d2fbe0be9c505d0e04e91a133c\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga3d47c2d2fbe0be9c505d0e04e91a133c\">&#9670;&nbsp;</a></span>GLFWglproc</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">typedef void(* GLFWglproc) (void)</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>Generic function pointer used for returning client API function pointers without forcing a cast from a regular pointer.</p>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"context_guide.html#context_glext\">OpenGL and OpenGL ES extensions</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__context.html#ga35f1837e6f666781842483937612f163\">glfwGetProcAddress</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>\n\n</div>\n</div>\n<h2 class=\"groupheader\">Function Documentation</h2>\n<a id=\"ga1c04dc242268f827290fe40aa1c91157\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga1c04dc242268f827290fe40aa1c91157\">&#9670;&nbsp;</a></span>glfwMakeContextCurrent()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">void glfwMakeContextCurrent </td>\n          <td>(</td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *&#160;</td>\n          <td class=\"paramname\"><em>window</em></td><td>)</td>\n          <td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function makes the OpenGL or OpenGL ES context of the specified window current on the calling thread. A context must only be made current on a single thread at a time and each thread can have only a single current context at a time.</p>\n<p>When moving a context between threads, you must make it non-current on the old thread before making it current on the new one.</p>\n<p>By default, making a context non-current implicitly forces a pipeline flush. On machines that support <code>GL_KHR_context_flush_control</code>, you can control whether a context performs this flush by setting the <a class=\"el\" href=\"window_guide.html#GLFW_CONTEXT_RELEASE_BEHAVIOR_hint\">GLFW_CONTEXT_RELEASE_BEHAVIOR</a> hint.</p>\n<p>The specified window must have an OpenGL or OpenGL ES context. Specifying a window without a context will generate a <a class=\"el\" href=\"group__errors.html#gacff24d2757da752ae4c80bf452356487\">GLFW_NO_WINDOW_CONTEXT</a> error.</p>\n<dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">window</td><td>The window whose context to make current, or <code>NULL</code> to detach the current context.</td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a>, <a class=\"el\" href=\"group__errors.html#gacff24d2757da752ae4c80bf452356487\">GLFW_NO_WINDOW_CONTEXT</a> and <a class=\"el\" href=\"group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1\">GLFW_PLATFORM_ERROR</a>.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function may be called from any thread.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"context_guide.html#context_current\">Current context</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__context.html#gac84759b1f6c2d271a4fea8ae89ec980d\">glfwGetCurrentContext</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>\n\n</div>\n</div>\n<a id=\"gac84759b1f6c2d271a4fea8ae89ec980d\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gac84759b1f6c2d271a4fea8ae89ec980d\">&#9670;&nbsp;</a></span>glfwGetCurrentContext()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\"><a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* glfwGetCurrentContext </td>\n          <td>(</td>\n          <td class=\"paramtype\">void&#160;</td>\n          <td class=\"paramname\"></td><td>)</td>\n          <td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function returns the window whose OpenGL or OpenGL ES context is current on the calling thread.</p>\n<dl class=\"section return\"><dt>Returns</dt><dd>The window whose context is current, or <code>NULL</code> if no window's context is current.</dd></dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a>.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function may be called from any thread.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"context_guide.html#context_current\">Current context</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__context.html#ga1c04dc242268f827290fe40aa1c91157\">glfwMakeContextCurrent</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>\n\n</div>\n</div>\n<a id=\"ga6d4e0cdf151b5e579bd67f13202994ed\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga6d4e0cdf151b5e579bd67f13202994ed\">&#9670;&nbsp;</a></span>glfwSwapInterval()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">void glfwSwapInterval </td>\n          <td>(</td>\n          <td class=\"paramtype\">int&#160;</td>\n          <td class=\"paramname\"><em>interval</em></td><td>)</td>\n          <td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function sets the swap interval for the current OpenGL or OpenGL ES context, i.e. the number of screen updates to wait from the time <a class=\"el\" href=\"group__window.html#ga15a5a1ee5b3c2ca6b15ca209a12efd14\">glfwSwapBuffers</a> was called before swapping the buffers and returning. This is sometimes called <em>vertical synchronization</em>, <em>vertical retrace synchronization</em> or just <em>vsync</em>.</p>\n<p>A context that supports either of the <code>WGL_EXT_swap_control_tear</code> and <code>GLX_EXT_swap_control_tear</code> extensions also accepts <em>negative</em> swap intervals, which allows the driver to swap immediately even if a frame arrives a little bit late. You can check for these extensions with <a class=\"el\" href=\"group__context.html#ga87425065c011cef1ebd6aac75e059dfa\">glfwExtensionSupported</a>.</p>\n<p>A context must be current on the calling thread. Calling this function without a current context will cause a <a class=\"el\" href=\"group__errors.html#gaa8290386e9528ccb9e42a3a4e16fc0d0\">GLFW_NO_CURRENT_CONTEXT</a> error.</p>\n<p>This function does not apply to Vulkan. If you are rendering with Vulkan, see the present mode of your swapchain instead.</p>\n<dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">interval</td><td>The minimum number of screen updates to wait for until the buffers are swapped by <a class=\"el\" href=\"group__window.html#ga15a5a1ee5b3c2ca6b15ca209a12efd14\">glfwSwapBuffers</a>.</td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a>, <a class=\"el\" href=\"group__errors.html#gaa8290386e9528ccb9e42a3a4e16fc0d0\">GLFW_NO_CURRENT_CONTEXT</a> and <a class=\"el\" href=\"group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1\">GLFW_PLATFORM_ERROR</a>.</dd></dl>\n<dl class=\"section remark\"><dt>Remarks</dt><dd>This function is not called during context creation, leaving the swap interval set to whatever is the default on that platform. This is done because some swap interval extensions used by GLFW do not allow the swap interval to be reset to zero once it has been set to a non-zero value.</dd>\n<dd>\nSome GPU drivers do not honor the requested swap interval, either because of a user setting that overrides the application's request or due to bugs in the driver.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function may be called from any thread.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"window_guide.html#buffer_swap\">Buffer swapping</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__window.html#ga15a5a1ee5b3c2ca6b15ca209a12efd14\">glfwSwapBuffers</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 1.0. </dd></dl>\n\n</div>\n</div>\n<a id=\"ga87425065c011cef1ebd6aac75e059dfa\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga87425065c011cef1ebd6aac75e059dfa\">&#9670;&nbsp;</a></span>glfwExtensionSupported()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">int glfwExtensionSupported </td>\n          <td>(</td>\n          <td class=\"paramtype\">const char *&#160;</td>\n          <td class=\"paramname\"><em>extension</em></td><td>)</td>\n          <td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function returns whether the specified <a class=\"el\" href=\"context_guide.html#context_glext\">API extension</a> is supported by the current OpenGL or OpenGL ES context. It searches both for client API extension and context creation API extensions.</p>\n<p>A context must be current on the calling thread. Calling this function without a current context will cause a <a class=\"el\" href=\"group__errors.html#gaa8290386e9528ccb9e42a3a4e16fc0d0\">GLFW_NO_CURRENT_CONTEXT</a> error.</p>\n<p>As this functions retrieves and searches one or more extension strings each call, it is recommended that you cache its results if it is going to be used frequently. The extension strings will not change during the lifetime of a context, so there is no danger in doing this.</p>\n<p>This function does not apply to Vulkan. If you are using Vulkan, see <a class=\"el\" href=\"group__vulkan.html#ga1abcbe61033958f22f63ef82008874b1\">glfwGetRequiredInstanceExtensions</a>, <code>vkEnumerateInstanceExtensionProperties</code> and <code>vkEnumerateDeviceExtensionProperties</code> instead.</p>\n<dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">extension</td><td>The ASCII encoded name of the extension. </td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section return\"><dt>Returns</dt><dd><code>GLFW_TRUE</code> if the extension is available, or <code>GLFW_FALSE</code> otherwise.</dd></dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a>, <a class=\"el\" href=\"group__errors.html#gaa8290386e9528ccb9e42a3a4e16fc0d0\">GLFW_NO_CURRENT_CONTEXT</a>, <a class=\"el\" href=\"group__errors.html#gaaf2ef9aa8202c2b82ac2d921e554c687\">GLFW_INVALID_VALUE</a> and <a class=\"el\" href=\"group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1\">GLFW_PLATFORM_ERROR</a>.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function may be called from any thread.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"context_guide.html#context_glext\">OpenGL and OpenGL ES extensions</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__context.html#ga35f1837e6f666781842483937612f163\">glfwGetProcAddress</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 1.0. </dd></dl>\n\n</div>\n</div>\n<a id=\"ga35f1837e6f666781842483937612f163\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga35f1837e6f666781842483937612f163\">&#9670;&nbsp;</a></span>glfwGetProcAddress()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\"><a class=\"el\" href=\"group__context.html#ga3d47c2d2fbe0be9c505d0e04e91a133c\">GLFWglproc</a> glfwGetProcAddress </td>\n          <td>(</td>\n          <td class=\"paramtype\">const char *&#160;</td>\n          <td class=\"paramname\"><em>procname</em></td><td>)</td>\n          <td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function returns the address of the specified OpenGL or OpenGL ES <a class=\"el\" href=\"context_guide.html#context_glext\">core or extension function</a>, if it is supported by the current context.</p>\n<p>A context must be current on the calling thread. Calling this function without a current context will cause a <a class=\"el\" href=\"group__errors.html#gaa8290386e9528ccb9e42a3a4e16fc0d0\">GLFW_NO_CURRENT_CONTEXT</a> error.</p>\n<p>This function does not apply to Vulkan. If you are rendering with Vulkan, see <a class=\"el\" href=\"group__vulkan.html#gadf228fac94c5fd8f12423ec9af9ff1e9\">glfwGetInstanceProcAddress</a>, <code>vkGetInstanceProcAddr</code> and <code>vkGetDeviceProcAddr</code> instead.</p>\n<dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">procname</td><td>The ASCII encoded name of the function. </td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section return\"><dt>Returns</dt><dd>The address of the function, or <code>NULL</code> if an <a class=\"el\" href=\"intro_guide.html#error_handling\">error</a> occurred.</dd></dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a>, <a class=\"el\" href=\"group__errors.html#gaa8290386e9528ccb9e42a3a4e16fc0d0\">GLFW_NO_CURRENT_CONTEXT</a> and <a class=\"el\" href=\"group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1\">GLFW_PLATFORM_ERROR</a>.</dd></dl>\n<dl class=\"section remark\"><dt>Remarks</dt><dd>The address of a given function is not guaranteed to be the same between contexts.</dd>\n<dd>\nThis function may return a non-<code>NULL</code> address despite the associated version or extension not being available. Always check the context version or extension string first.</dd></dl>\n<dl class=\"section user\"><dt>Pointer lifetime</dt><dd>The returned function pointer is valid until the context is destroyed or the library is terminated.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function may be called from any thread.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"context_guide.html#context_glext\">OpenGL and OpenGL ES extensions</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__context.html#ga87425065c011cef1ebd6aac75e059dfa\">glfwExtensionSupported</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 1.0. </dd></dl>\n\n</div>\n</div>\n</div><!-- contents -->\n<address class=\"footer\">\n<p>\nLast update on Mon Jan 20 2020 for GLFW 3.3.2\n</p>\n</address>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/group__errors.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta http-equiv=\"X-UA-Compatible\" content=\"IE=9\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<title>GLFW: Error codes</title>\n<link href=\"tabs.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"jquery.js\"></script>\n<script type=\"text/javascript\" src=\"dynsections.js\"></script>\n<link href=\"search/search.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"search/searchdata.js\"></script>\n<script type=\"text/javascript\" src=\"search/search.js\"></script>\n<link href=\"doxygen.css\" rel=\"stylesheet\" type=\"text/css\" />\n<link href=\"extra.css\" rel=\"stylesheet\" type=\"text/css\"/>\n</head>\n<body>\n<div id=\"top\"><!-- do not remove this div, it is closed by doxygen! -->\n<div id=\"titlearea\">\n\t<div class=\"glfwheader\">\n\t\t<a href=\"https://www.glfw.org/\" id=\"glfwhome\">GLFW</a>\n\t\t<ul class=\"glfwnavbar\">\n\t\t\t<li><a href=\"https://www.glfw.org/documentation.html\">Documentation</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/download.html\">Download</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/community.html\">Community</a></li>\n\t\t</ul>\n\t</div>\n</div>\n<!-- end header part -->\n<!-- Generated by Doxygen 1.8.16 -->\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\nvar searchBox = new SearchBox(\"searchBox\", \"search\",false,'Search');\n/* @license-end */\n</script>\n<script type=\"text/javascript\" src=\"menudata.js\"></script>\n<script type=\"text/javascript\" src=\"menu.js\"></script>\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\n$(function() {\n  initMenu('',true,false,'search.php','Search');\n  $(document).ready(function() { init_search(); });\n});\n/* @license-end */</script>\n<div id=\"main-nav\"></div>\n</div><!-- top -->\n<!-- window showing the filter options -->\n<div id=\"MSearchSelectWindow\"\n     onmouseover=\"return searchBox.OnSearchSelectShow()\"\n     onmouseout=\"return searchBox.OnSearchSelectHide()\"\n     onkeydown=\"return searchBox.OnSearchSelectKey(event)\">\n</div>\n\n<!-- iframe showing the search results (closed by default) -->\n<div id=\"MSearchResultsWindow\">\n<iframe src=\"javascript:void(0)\" frameborder=\"0\" \n        name=\"MSearchResults\" id=\"MSearchResults\">\n</iframe>\n</div>\n\n<div class=\"header\">\n  <div class=\"summary\">\n<a href=\"#define-members\">Macros</a>  </div>\n  <div class=\"headertitle\">\n<div class=\"title\">Error codes<div class=\"ingroups\"><a class=\"el\" href=\"group__init.html\">Initialization, version and error reference</a></div></div>  </div>\n</div><!--header-->\n<div class=\"contents\">\n<a name=\"details\" id=\"details\"></a><h2 class=\"groupheader\">Description</h2>\n<p>See <a class=\"el\" href=\"intro_guide.html#error_handling\">error handling</a> for how these are used. </p>\n<table class=\"memberdecls\">\n<tr class=\"heading\"><td colspan=\"2\"><h2 class=\"groupheader\"><a name=\"define-members\"></a>\nMacros</h2></td></tr>\n<tr class=\"memitem:gafa30deee5db4d69c4c93d116ed87dbf4\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__errors.html#gafa30deee5db4d69c4c93d116ed87dbf4\">GLFW_NO_ERROR</a>&#160;&#160;&#160;0</td></tr>\n<tr class=\"memdesc:gafa30deee5db4d69c4c93d116ed87dbf4\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">No error has occurred.  <a href=\"group__errors.html#gafa30deee5db4d69c4c93d116ed87dbf4\">More...</a><br /></td></tr>\n<tr class=\"separator:gafa30deee5db4d69c4c93d116ed87dbf4\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga2374ee02c177f12e1fa76ff3ed15e14a\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a>&#160;&#160;&#160;0x00010001</td></tr>\n<tr class=\"memdesc:ga2374ee02c177f12e1fa76ff3ed15e14a\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">GLFW has not been initialized.  <a href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">More...</a><br /></td></tr>\n<tr class=\"separator:ga2374ee02c177f12e1fa76ff3ed15e14a\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gaa8290386e9528ccb9e42a3a4e16fc0d0\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__errors.html#gaa8290386e9528ccb9e42a3a4e16fc0d0\">GLFW_NO_CURRENT_CONTEXT</a>&#160;&#160;&#160;0x00010002</td></tr>\n<tr class=\"memdesc:gaa8290386e9528ccb9e42a3a4e16fc0d0\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">No context is current for this thread.  <a href=\"group__errors.html#gaa8290386e9528ccb9e42a3a4e16fc0d0\">More...</a><br /></td></tr>\n<tr class=\"separator:gaa8290386e9528ccb9e42a3a4e16fc0d0\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga76f6bb9c4eea73db675f096b404593ce\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__errors.html#ga76f6bb9c4eea73db675f096b404593ce\">GLFW_INVALID_ENUM</a>&#160;&#160;&#160;0x00010003</td></tr>\n<tr class=\"memdesc:ga76f6bb9c4eea73db675f096b404593ce\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">One of the arguments to the function was an invalid enum value.  <a href=\"group__errors.html#ga76f6bb9c4eea73db675f096b404593ce\">More...</a><br /></td></tr>\n<tr class=\"separator:ga76f6bb9c4eea73db675f096b404593ce\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gaaf2ef9aa8202c2b82ac2d921e554c687\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__errors.html#gaaf2ef9aa8202c2b82ac2d921e554c687\">GLFW_INVALID_VALUE</a>&#160;&#160;&#160;0x00010004</td></tr>\n<tr class=\"memdesc:gaaf2ef9aa8202c2b82ac2d921e554c687\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">One of the arguments to the function was an invalid value.  <a href=\"group__errors.html#gaaf2ef9aa8202c2b82ac2d921e554c687\">More...</a><br /></td></tr>\n<tr class=\"separator:gaaf2ef9aa8202c2b82ac2d921e554c687\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga9023953a2bcb98c2906afd071d21ee7f\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__errors.html#ga9023953a2bcb98c2906afd071d21ee7f\">GLFW_OUT_OF_MEMORY</a>&#160;&#160;&#160;0x00010005</td></tr>\n<tr class=\"memdesc:ga9023953a2bcb98c2906afd071d21ee7f\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">A memory allocation failed.  <a href=\"group__errors.html#ga9023953a2bcb98c2906afd071d21ee7f\">More...</a><br /></td></tr>\n<tr class=\"separator:ga9023953a2bcb98c2906afd071d21ee7f\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga56882b290db23261cc6c053c40c2d08e\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__errors.html#ga56882b290db23261cc6c053c40c2d08e\">GLFW_API_UNAVAILABLE</a>&#160;&#160;&#160;0x00010006</td></tr>\n<tr class=\"memdesc:ga56882b290db23261cc6c053c40c2d08e\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">GLFW could not find support for the requested API on the system.  <a href=\"group__errors.html#ga56882b290db23261cc6c053c40c2d08e\">More...</a><br /></td></tr>\n<tr class=\"separator:ga56882b290db23261cc6c053c40c2d08e\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gad16c5565b4a69f9c2a9ac2c0dbc89462\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__errors.html#gad16c5565b4a69f9c2a9ac2c0dbc89462\">GLFW_VERSION_UNAVAILABLE</a>&#160;&#160;&#160;0x00010007</td></tr>\n<tr class=\"memdesc:gad16c5565b4a69f9c2a9ac2c0dbc89462\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">The requested OpenGL or OpenGL ES version is not available.  <a href=\"group__errors.html#gad16c5565b4a69f9c2a9ac2c0dbc89462\">More...</a><br /></td></tr>\n<tr class=\"separator:gad16c5565b4a69f9c2a9ac2c0dbc89462\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gad44162d78100ea5e87cdd38426b8c7a1\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1\">GLFW_PLATFORM_ERROR</a>&#160;&#160;&#160;0x00010008</td></tr>\n<tr class=\"memdesc:gad44162d78100ea5e87cdd38426b8c7a1\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">A platform-specific error occurred that does not match any of the more specific categories.  <a href=\"group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1\">More...</a><br /></td></tr>\n<tr class=\"separator:gad44162d78100ea5e87cdd38426b8c7a1\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga196e125ef261d94184e2b55c05762f14\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__errors.html#ga196e125ef261d94184e2b55c05762f14\">GLFW_FORMAT_UNAVAILABLE</a>&#160;&#160;&#160;0x00010009</td></tr>\n<tr class=\"memdesc:ga196e125ef261d94184e2b55c05762f14\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">The requested format is not supported or available.  <a href=\"group__errors.html#ga196e125ef261d94184e2b55c05762f14\">More...</a><br /></td></tr>\n<tr class=\"separator:ga196e125ef261d94184e2b55c05762f14\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gacff24d2757da752ae4c80bf452356487\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__errors.html#gacff24d2757da752ae4c80bf452356487\">GLFW_NO_WINDOW_CONTEXT</a>&#160;&#160;&#160;0x0001000A</td></tr>\n<tr class=\"memdesc:gacff24d2757da752ae4c80bf452356487\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">The specified window does not have an OpenGL or OpenGL ES context.  <a href=\"group__errors.html#gacff24d2757da752ae4c80bf452356487\">More...</a><br /></td></tr>\n<tr class=\"separator:gacff24d2757da752ae4c80bf452356487\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n</table>\n<h2 class=\"groupheader\">Macro Definition Documentation</h2>\n<a id=\"gafa30deee5db4d69c4c93d116ed87dbf4\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gafa30deee5db4d69c4c93d116ed87dbf4\">&#9670;&nbsp;</a></span>GLFW_NO_ERROR</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_NO_ERROR&#160;&#160;&#160;0</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>No error has occurred.</p>\n<dl class=\"section user\"><dt>Analysis</dt><dd>Yay. </dd></dl>\n\n</div>\n</div>\n<a id=\"ga2374ee02c177f12e1fa76ff3ed15e14a\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga2374ee02c177f12e1fa76ff3ed15e14a\">&#9670;&nbsp;</a></span>GLFW_NOT_INITIALIZED</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_NOT_INITIALIZED&#160;&#160;&#160;0x00010001</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This occurs if a GLFW function was called that must not be called unless the library is <a class=\"el\" href=\"intro_guide.html#intro_init\">initialized</a>.</p>\n<dl class=\"section user\"><dt>Analysis</dt><dd>Application programmer error. Initialize GLFW before calling any function that requires initialization. </dd></dl>\n\n</div>\n</div>\n<a id=\"gaa8290386e9528ccb9e42a3a4e16fc0d0\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gaa8290386e9528ccb9e42a3a4e16fc0d0\">&#9670;&nbsp;</a></span>GLFW_NO_CURRENT_CONTEXT</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_NO_CURRENT_CONTEXT&#160;&#160;&#160;0x00010002</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This occurs if a GLFW function was called that needs and operates on the current OpenGL or OpenGL ES context but no context is current on the calling thread. One such function is <a class=\"el\" href=\"group__context.html#ga6d4e0cdf151b5e579bd67f13202994ed\">glfwSwapInterval</a>.</p>\n<dl class=\"section user\"><dt>Analysis</dt><dd>Application programmer error. Ensure a context is current before calling functions that require a current context. </dd></dl>\n\n</div>\n</div>\n<a id=\"ga76f6bb9c4eea73db675f096b404593ce\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga76f6bb9c4eea73db675f096b404593ce\">&#9670;&nbsp;</a></span>GLFW_INVALID_ENUM</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_INVALID_ENUM&#160;&#160;&#160;0x00010003</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>One of the arguments to the function was an invalid enum value, for example requesting <a class=\"el\" href=\"window_guide.html#GLFW_RED_BITS\">GLFW_RED_BITS</a> with <a class=\"el\" href=\"group__window.html#gacccb29947ea4b16860ebef42c2cb9337\">glfwGetWindowAttrib</a>.</p>\n<dl class=\"section user\"><dt>Analysis</dt><dd>Application programmer error. Fix the offending call. </dd></dl>\n\n</div>\n</div>\n<a id=\"gaaf2ef9aa8202c2b82ac2d921e554c687\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gaaf2ef9aa8202c2b82ac2d921e554c687\">&#9670;&nbsp;</a></span>GLFW_INVALID_VALUE</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_INVALID_VALUE&#160;&#160;&#160;0x00010004</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>One of the arguments to the function was an invalid value, for example requesting a non-existent OpenGL or OpenGL ES version like 2.7.</p>\n<p>Requesting a valid but unavailable OpenGL or OpenGL ES version will instead result in a <a class=\"el\" href=\"group__errors.html#gad16c5565b4a69f9c2a9ac2c0dbc89462\">GLFW_VERSION_UNAVAILABLE</a> error.</p>\n<dl class=\"section user\"><dt>Analysis</dt><dd>Application programmer error. Fix the offending call. </dd></dl>\n\n</div>\n</div>\n<a id=\"ga9023953a2bcb98c2906afd071d21ee7f\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga9023953a2bcb98c2906afd071d21ee7f\">&#9670;&nbsp;</a></span>GLFW_OUT_OF_MEMORY</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_OUT_OF_MEMORY&#160;&#160;&#160;0x00010005</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>A memory allocation failed.</p>\n<dl class=\"section user\"><dt>Analysis</dt><dd>A bug in GLFW or the underlying operating system. Report the bug to our <a href=\"https://github.com/glfw/glfw/issues\">issue tracker</a>. </dd></dl>\n\n</div>\n</div>\n<a id=\"ga56882b290db23261cc6c053c40c2d08e\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga56882b290db23261cc6c053c40c2d08e\">&#9670;&nbsp;</a></span>GLFW_API_UNAVAILABLE</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_API_UNAVAILABLE&#160;&#160;&#160;0x00010006</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>GLFW could not find support for the requested API on the system.</p>\n<dl class=\"section user\"><dt>Analysis</dt><dd>The installed graphics driver does not support the requested API, or does not support it via the chosen context creation backend. Below are a few examples.</dd></dl>\n<dl class=\"section user\"><dt></dt><dd>Some pre-installed Windows graphics drivers do not support OpenGL. AMD only supports OpenGL ES via EGL, while Nvidia and Intel only support it via a WGL or GLX extension. macOS does not provide OpenGL ES at all. The Mesa EGL, OpenGL and OpenGL ES libraries do not interface with the Nvidia binary driver. Older graphics drivers do not support Vulkan. </dd></dl>\n\n</div>\n</div>\n<a id=\"gad16c5565b4a69f9c2a9ac2c0dbc89462\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gad16c5565b4a69f9c2a9ac2c0dbc89462\">&#9670;&nbsp;</a></span>GLFW_VERSION_UNAVAILABLE</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_VERSION_UNAVAILABLE&#160;&#160;&#160;0x00010007</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>The requested OpenGL or OpenGL ES version (including any requested context or framebuffer hints) is not available on this machine.</p>\n<dl class=\"section user\"><dt>Analysis</dt><dd>The machine does not support your requirements. If your application is sufficiently flexible, downgrade your requirements and try again. Otherwise, inform the user that their machine does not match your requirements.</dd></dl>\n<dl class=\"section user\"><dt></dt><dd>Future invalid OpenGL and OpenGL ES versions, for example OpenGL 4.8 if 5.0 comes out before the 4.x series gets that far, also fail with this error and not <a class=\"el\" href=\"group__errors.html#gaaf2ef9aa8202c2b82ac2d921e554c687\">GLFW_INVALID_VALUE</a>, because GLFW cannot know what future versions will exist. </dd></dl>\n\n</div>\n</div>\n<a id=\"gad44162d78100ea5e87cdd38426b8c7a1\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gad44162d78100ea5e87cdd38426b8c7a1\">&#9670;&nbsp;</a></span>GLFW_PLATFORM_ERROR</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_PLATFORM_ERROR&#160;&#160;&#160;0x00010008</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>A platform-specific error occurred that does not match any of the more specific categories.</p>\n<dl class=\"section user\"><dt>Analysis</dt><dd>A bug or configuration error in GLFW, the underlying operating system or its drivers, or a lack of required resources. Report the issue to our <a href=\"https://github.com/glfw/glfw/issues\">issue tracker</a>. </dd></dl>\n\n</div>\n</div>\n<a id=\"ga196e125ef261d94184e2b55c05762f14\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga196e125ef261d94184e2b55c05762f14\">&#9670;&nbsp;</a></span>GLFW_FORMAT_UNAVAILABLE</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_FORMAT_UNAVAILABLE&#160;&#160;&#160;0x00010009</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>If emitted during window creation, the requested pixel format is not supported.</p>\n<p>If emitted when querying the clipboard, the contents of the clipboard could not be converted to the requested format.</p>\n<dl class=\"section user\"><dt>Analysis</dt><dd>If emitted during window creation, one or more <a class=\"el\" href=\"window_guide.html#window_hints_hard\">hard constraints</a> did not match any of the available pixel formats. If your application is sufficiently flexible, downgrade your requirements and try again. Otherwise, inform the user that their machine does not match your requirements.</dd></dl>\n<dl class=\"section user\"><dt></dt><dd>If emitted when querying the clipboard, ignore the error or report it to the user, as appropriate. </dd></dl>\n\n</div>\n</div>\n<a id=\"gacff24d2757da752ae4c80bf452356487\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gacff24d2757da752ae4c80bf452356487\">&#9670;&nbsp;</a></span>GLFW_NO_WINDOW_CONTEXT</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_NO_WINDOW_CONTEXT&#160;&#160;&#160;0x0001000A</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>A window that does not have an OpenGL or OpenGL ES context was passed to a function that requires it to have one.</p>\n<dl class=\"section user\"><dt>Analysis</dt><dd>Application programmer error. Fix the offending call. </dd></dl>\n\n</div>\n</div>\n</div><!-- contents -->\n<address class=\"footer\">\n<p>\nLast update on Mon Jan 20 2020 for GLFW 3.3.2\n</p>\n</address>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/group__gamepad__axes.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta http-equiv=\"X-UA-Compatible\" content=\"IE=9\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<title>GLFW: Gamepad axes</title>\n<link href=\"tabs.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"jquery.js\"></script>\n<script type=\"text/javascript\" src=\"dynsections.js\"></script>\n<link href=\"search/search.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"search/searchdata.js\"></script>\n<script type=\"text/javascript\" src=\"search/search.js\"></script>\n<link href=\"doxygen.css\" rel=\"stylesheet\" type=\"text/css\" />\n<link href=\"extra.css\" rel=\"stylesheet\" type=\"text/css\"/>\n</head>\n<body>\n<div id=\"top\"><!-- do not remove this div, it is closed by doxygen! -->\n<div id=\"titlearea\">\n\t<div class=\"glfwheader\">\n\t\t<a href=\"https://www.glfw.org/\" id=\"glfwhome\">GLFW</a>\n\t\t<ul class=\"glfwnavbar\">\n\t\t\t<li><a href=\"https://www.glfw.org/documentation.html\">Documentation</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/download.html\">Download</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/community.html\">Community</a></li>\n\t\t</ul>\n\t</div>\n</div>\n<!-- end header part -->\n<!-- Generated by Doxygen 1.8.16 -->\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\nvar searchBox = new SearchBox(\"searchBox\", \"search\",false,'Search');\n/* @license-end */\n</script>\n<script type=\"text/javascript\" src=\"menudata.js\"></script>\n<script type=\"text/javascript\" src=\"menu.js\"></script>\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\n$(function() {\n  initMenu('',true,false,'search.php','Search');\n  $(document).ready(function() { init_search(); });\n});\n/* @license-end */</script>\n<div id=\"main-nav\"></div>\n</div><!-- top -->\n<!-- window showing the filter options -->\n<div id=\"MSearchSelectWindow\"\n     onmouseover=\"return searchBox.OnSearchSelectShow()\"\n     onmouseout=\"return searchBox.OnSearchSelectHide()\"\n     onkeydown=\"return searchBox.OnSearchSelectKey(event)\">\n</div>\n\n<!-- iframe showing the search results (closed by default) -->\n<div id=\"MSearchResultsWindow\">\n<iframe src=\"javascript:void(0)\" frameborder=\"0\" \n        name=\"MSearchResults\" id=\"MSearchResults\">\n</iframe>\n</div>\n\n<div class=\"header\">\n  <div class=\"summary\">\n<a href=\"#define-members\">Macros</a>  </div>\n  <div class=\"headertitle\">\n<div class=\"title\">Gamepad axes<div class=\"ingroups\"><a class=\"el\" href=\"group__input.html\">Input reference</a></div></div>  </div>\n</div><!--header-->\n<div class=\"contents\">\n<a name=\"details\" id=\"details\"></a><h2 class=\"groupheader\">Description</h2>\n<p>See <a class=\"el\" href=\"input_guide.html#gamepad\">Gamepad input</a> for how these are used. </p>\n<table class=\"memberdecls\">\n<tr class=\"heading\"><td colspan=\"2\"><h2 class=\"groupheader\"><a name=\"define-members\"></a>\nMacros</h2></td></tr>\n<tr class=\"memitem:ga544e396d092036a7d80c1e5f233f7a38\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__gamepad__axes.html#ga544e396d092036a7d80c1e5f233f7a38\">GLFW_GAMEPAD_AXIS_LEFT_X</a>&#160;&#160;&#160;0</td></tr>\n<tr class=\"separator:ga544e396d092036a7d80c1e5f233f7a38\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga64dcf2c6e9be50b7c556ff7671996dd5\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__gamepad__axes.html#ga64dcf2c6e9be50b7c556ff7671996dd5\">GLFW_GAMEPAD_AXIS_LEFT_Y</a>&#160;&#160;&#160;1</td></tr>\n<tr class=\"separator:ga64dcf2c6e9be50b7c556ff7671996dd5\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gabd6785106cd3c5a044a6e49a395ee2fc\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__gamepad__axes.html#gabd6785106cd3c5a044a6e49a395ee2fc\">GLFW_GAMEPAD_AXIS_RIGHT_X</a>&#160;&#160;&#160;2</td></tr>\n<tr class=\"separator:gabd6785106cd3c5a044a6e49a395ee2fc\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga1cc20566d44d521b7183681a8e88e2e4\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__gamepad__axes.html#ga1cc20566d44d521b7183681a8e88e2e4\">GLFW_GAMEPAD_AXIS_RIGHT_Y</a>&#160;&#160;&#160;3</td></tr>\n<tr class=\"separator:ga1cc20566d44d521b7183681a8e88e2e4\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga6d79561dd8907c37354426242901b86e\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__gamepad__axes.html#ga6d79561dd8907c37354426242901b86e\">GLFW_GAMEPAD_AXIS_LEFT_TRIGGER</a>&#160;&#160;&#160;4</td></tr>\n<tr class=\"separator:ga6d79561dd8907c37354426242901b86e\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga121a7d5d20589a423cd1634dd6ee6eab\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__gamepad__axes.html#ga121a7d5d20589a423cd1634dd6ee6eab\">GLFW_GAMEPAD_AXIS_RIGHT_TRIGGER</a>&#160;&#160;&#160;5</td></tr>\n<tr class=\"separator:ga121a7d5d20589a423cd1634dd6ee6eab\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga0818fd9433e1359692b7443293e5ac86\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__gamepad__axes.html#ga0818fd9433e1359692b7443293e5ac86\">GLFW_GAMEPAD_AXIS_LAST</a>&#160;&#160;&#160;<a class=\"el\" href=\"group__gamepad__axes.html#ga121a7d5d20589a423cd1634dd6ee6eab\">GLFW_GAMEPAD_AXIS_RIGHT_TRIGGER</a></td></tr>\n<tr class=\"separator:ga0818fd9433e1359692b7443293e5ac86\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n</table>\n<h2 class=\"groupheader\">Macro Definition Documentation</h2>\n<a id=\"ga544e396d092036a7d80c1e5f233f7a38\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga544e396d092036a7d80c1e5f233f7a38\">&#9670;&nbsp;</a></span>GLFW_GAMEPAD_AXIS_LEFT_X</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_GAMEPAD_AXIS_LEFT_X&#160;&#160;&#160;0</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"ga64dcf2c6e9be50b7c556ff7671996dd5\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga64dcf2c6e9be50b7c556ff7671996dd5\">&#9670;&nbsp;</a></span>GLFW_GAMEPAD_AXIS_LEFT_Y</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_GAMEPAD_AXIS_LEFT_Y&#160;&#160;&#160;1</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"gabd6785106cd3c5a044a6e49a395ee2fc\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gabd6785106cd3c5a044a6e49a395ee2fc\">&#9670;&nbsp;</a></span>GLFW_GAMEPAD_AXIS_RIGHT_X</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_GAMEPAD_AXIS_RIGHT_X&#160;&#160;&#160;2</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"ga1cc20566d44d521b7183681a8e88e2e4\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga1cc20566d44d521b7183681a8e88e2e4\">&#9670;&nbsp;</a></span>GLFW_GAMEPAD_AXIS_RIGHT_Y</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_GAMEPAD_AXIS_RIGHT_Y&#160;&#160;&#160;3</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"ga6d79561dd8907c37354426242901b86e\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga6d79561dd8907c37354426242901b86e\">&#9670;&nbsp;</a></span>GLFW_GAMEPAD_AXIS_LEFT_TRIGGER</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_GAMEPAD_AXIS_LEFT_TRIGGER&#160;&#160;&#160;4</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"ga121a7d5d20589a423cd1634dd6ee6eab\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga121a7d5d20589a423cd1634dd6ee6eab\">&#9670;&nbsp;</a></span>GLFW_GAMEPAD_AXIS_RIGHT_TRIGGER</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_GAMEPAD_AXIS_RIGHT_TRIGGER&#160;&#160;&#160;5</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"ga0818fd9433e1359692b7443293e5ac86\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga0818fd9433e1359692b7443293e5ac86\">&#9670;&nbsp;</a></span>GLFW_GAMEPAD_AXIS_LAST</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_GAMEPAD_AXIS_LAST&#160;&#160;&#160;<a class=\"el\" href=\"group__gamepad__axes.html#ga121a7d5d20589a423cd1634dd6ee6eab\">GLFW_GAMEPAD_AXIS_RIGHT_TRIGGER</a></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n</div><!-- contents -->\n<address class=\"footer\">\n<p>\nLast update on Mon Jan 20 2020 for GLFW 3.3.2\n</p>\n</address>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/group__gamepad__buttons.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta http-equiv=\"X-UA-Compatible\" content=\"IE=9\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<title>GLFW: Gamepad buttons</title>\n<link href=\"tabs.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"jquery.js\"></script>\n<script type=\"text/javascript\" src=\"dynsections.js\"></script>\n<link href=\"search/search.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"search/searchdata.js\"></script>\n<script type=\"text/javascript\" src=\"search/search.js\"></script>\n<link href=\"doxygen.css\" rel=\"stylesheet\" type=\"text/css\" />\n<link href=\"extra.css\" rel=\"stylesheet\" type=\"text/css\"/>\n</head>\n<body>\n<div id=\"top\"><!-- do not remove this div, it is closed by doxygen! -->\n<div id=\"titlearea\">\n\t<div class=\"glfwheader\">\n\t\t<a href=\"https://www.glfw.org/\" id=\"glfwhome\">GLFW</a>\n\t\t<ul class=\"glfwnavbar\">\n\t\t\t<li><a href=\"https://www.glfw.org/documentation.html\">Documentation</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/download.html\">Download</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/community.html\">Community</a></li>\n\t\t</ul>\n\t</div>\n</div>\n<!-- end header part -->\n<!-- Generated by Doxygen 1.8.16 -->\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\nvar searchBox = new SearchBox(\"searchBox\", \"search\",false,'Search');\n/* @license-end */\n</script>\n<script type=\"text/javascript\" src=\"menudata.js\"></script>\n<script type=\"text/javascript\" src=\"menu.js\"></script>\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\n$(function() {\n  initMenu('',true,false,'search.php','Search');\n  $(document).ready(function() { init_search(); });\n});\n/* @license-end */</script>\n<div id=\"main-nav\"></div>\n</div><!-- top -->\n<!-- window showing the filter options -->\n<div id=\"MSearchSelectWindow\"\n     onmouseover=\"return searchBox.OnSearchSelectShow()\"\n     onmouseout=\"return searchBox.OnSearchSelectHide()\"\n     onkeydown=\"return searchBox.OnSearchSelectKey(event)\">\n</div>\n\n<!-- iframe showing the search results (closed by default) -->\n<div id=\"MSearchResultsWindow\">\n<iframe src=\"javascript:void(0)\" frameborder=\"0\" \n        name=\"MSearchResults\" id=\"MSearchResults\">\n</iframe>\n</div>\n\n<div class=\"header\">\n  <div class=\"summary\">\n<a href=\"#define-members\">Macros</a>  </div>\n  <div class=\"headertitle\">\n<div class=\"title\">Gamepad buttons<div class=\"ingroups\"><a class=\"el\" href=\"group__input.html\">Input reference</a></div></div>  </div>\n</div><!--header-->\n<div class=\"contents\">\n<a name=\"details\" id=\"details\"></a><h2 class=\"groupheader\">Description</h2>\n<p>See <a class=\"el\" href=\"input_guide.html#gamepad\">Gamepad input</a> for how these are used. </p>\n<table class=\"memberdecls\">\n<tr class=\"heading\"><td colspan=\"2\"><h2 class=\"groupheader\"><a name=\"define-members\"></a>\nMacros</h2></td></tr>\n<tr class=\"memitem:gae055a12fbf4b48b5954c8e1cd129b810\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__gamepad__buttons.html#gae055a12fbf4b48b5954c8e1cd129b810\">GLFW_GAMEPAD_BUTTON_A</a>&#160;&#160;&#160;0</td></tr>\n<tr class=\"separator:gae055a12fbf4b48b5954c8e1cd129b810\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga2228a6512fd5950cdb51ba07846546fa\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__gamepad__buttons.html#ga2228a6512fd5950cdb51ba07846546fa\">GLFW_GAMEPAD_BUTTON_B</a>&#160;&#160;&#160;1</td></tr>\n<tr class=\"separator:ga2228a6512fd5950cdb51ba07846546fa\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga52cc94785cf3fe9a12e246539259887c\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__gamepad__buttons.html#ga52cc94785cf3fe9a12e246539259887c\">GLFW_GAMEPAD_BUTTON_X</a>&#160;&#160;&#160;2</td></tr>\n<tr class=\"separator:ga52cc94785cf3fe9a12e246539259887c\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gafc931248bda494b530cbe057f386a5ed\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__gamepad__buttons.html#gafc931248bda494b530cbe057f386a5ed\">GLFW_GAMEPAD_BUTTON_Y</a>&#160;&#160;&#160;3</td></tr>\n<tr class=\"separator:gafc931248bda494b530cbe057f386a5ed\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga17d67b4f39a39d6b813bd1567a3507c3\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__gamepad__buttons.html#ga17d67b4f39a39d6b813bd1567a3507c3\">GLFW_GAMEPAD_BUTTON_LEFT_BUMPER</a>&#160;&#160;&#160;4</td></tr>\n<tr class=\"separator:ga17d67b4f39a39d6b813bd1567a3507c3\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gadfbc9ea9bf3aae896b79fa49fdc85c7f\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__gamepad__buttons.html#gadfbc9ea9bf3aae896b79fa49fdc85c7f\">GLFW_GAMEPAD_BUTTON_RIGHT_BUMPER</a>&#160;&#160;&#160;5</td></tr>\n<tr class=\"separator:gadfbc9ea9bf3aae896b79fa49fdc85c7f\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gabc7c0264ce778835b516a472b47f6caf\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__gamepad__buttons.html#gabc7c0264ce778835b516a472b47f6caf\">GLFW_GAMEPAD_BUTTON_BACK</a>&#160;&#160;&#160;6</td></tr>\n<tr class=\"separator:gabc7c0264ce778835b516a472b47f6caf\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga04606949dd9139434b8a1bedf4ac1021\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__gamepad__buttons.html#ga04606949dd9139434b8a1bedf4ac1021\">GLFW_GAMEPAD_BUTTON_START</a>&#160;&#160;&#160;7</td></tr>\n<tr class=\"separator:ga04606949dd9139434b8a1bedf4ac1021\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga7fa48c32e5b2f5db2f080aa0b8b573dc\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__gamepad__buttons.html#ga7fa48c32e5b2f5db2f080aa0b8b573dc\">GLFW_GAMEPAD_BUTTON_GUIDE</a>&#160;&#160;&#160;8</td></tr>\n<tr class=\"separator:ga7fa48c32e5b2f5db2f080aa0b8b573dc\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga3e089787327454f7bfca7364d6ca206a\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__gamepad__buttons.html#ga3e089787327454f7bfca7364d6ca206a\">GLFW_GAMEPAD_BUTTON_LEFT_THUMB</a>&#160;&#160;&#160;9</td></tr>\n<tr class=\"separator:ga3e089787327454f7bfca7364d6ca206a\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga1c003f52b5aebb45272475b48953b21a\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__gamepad__buttons.html#ga1c003f52b5aebb45272475b48953b21a\">GLFW_GAMEPAD_BUTTON_RIGHT_THUMB</a>&#160;&#160;&#160;10</td></tr>\n<tr class=\"separator:ga1c003f52b5aebb45272475b48953b21a\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga4f1ed6f974a47bc8930d4874a283476a\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__gamepad__buttons.html#ga4f1ed6f974a47bc8930d4874a283476a\">GLFW_GAMEPAD_BUTTON_DPAD_UP</a>&#160;&#160;&#160;11</td></tr>\n<tr class=\"separator:ga4f1ed6f974a47bc8930d4874a283476a\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gae2a780d2a8c79e0b77c0b7b601ca57c6\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__gamepad__buttons.html#gae2a780d2a8c79e0b77c0b7b601ca57c6\">GLFW_GAMEPAD_BUTTON_DPAD_RIGHT</a>&#160;&#160;&#160;12</td></tr>\n<tr class=\"separator:gae2a780d2a8c79e0b77c0b7b601ca57c6\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga8f2b731b97d80f90f11967a83207665c\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__gamepad__buttons.html#ga8f2b731b97d80f90f11967a83207665c\">GLFW_GAMEPAD_BUTTON_DPAD_DOWN</a>&#160;&#160;&#160;13</td></tr>\n<tr class=\"separator:ga8f2b731b97d80f90f11967a83207665c\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gaf0697e0e8607b2ebe1c93b0c6befe301\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__gamepad__buttons.html#gaf0697e0e8607b2ebe1c93b0c6befe301\">GLFW_GAMEPAD_BUTTON_DPAD_LEFT</a>&#160;&#160;&#160;14</td></tr>\n<tr class=\"separator:gaf0697e0e8607b2ebe1c93b0c6befe301\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga5cc98882f4f81dacf761639a567f61eb\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__gamepad__buttons.html#ga5cc98882f4f81dacf761639a567f61eb\">GLFW_GAMEPAD_BUTTON_LAST</a>&#160;&#160;&#160;<a class=\"el\" href=\"group__gamepad__buttons.html#gaf0697e0e8607b2ebe1c93b0c6befe301\">GLFW_GAMEPAD_BUTTON_DPAD_LEFT</a></td></tr>\n<tr class=\"separator:ga5cc98882f4f81dacf761639a567f61eb\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gaf08d0df26527c9305253422bd98ed63a\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__gamepad__buttons.html#gaf08d0df26527c9305253422bd98ed63a\">GLFW_GAMEPAD_BUTTON_CROSS</a>&#160;&#160;&#160;<a class=\"el\" href=\"group__gamepad__buttons.html#gae055a12fbf4b48b5954c8e1cd129b810\">GLFW_GAMEPAD_BUTTON_A</a></td></tr>\n<tr class=\"separator:gaf08d0df26527c9305253422bd98ed63a\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gaaef094b3dacbf15f272b274516839b82\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__gamepad__buttons.html#gaaef094b3dacbf15f272b274516839b82\">GLFW_GAMEPAD_BUTTON_CIRCLE</a>&#160;&#160;&#160;<a class=\"el\" href=\"group__gamepad__buttons.html#ga2228a6512fd5950cdb51ba07846546fa\">GLFW_GAMEPAD_BUTTON_B</a></td></tr>\n<tr class=\"separator:gaaef094b3dacbf15f272b274516839b82\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gafc7821e87d77d41ed2cd3e1f726ec35f\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__gamepad__buttons.html#gafc7821e87d77d41ed2cd3e1f726ec35f\">GLFW_GAMEPAD_BUTTON_SQUARE</a>&#160;&#160;&#160;<a class=\"el\" href=\"group__gamepad__buttons.html#ga52cc94785cf3fe9a12e246539259887c\">GLFW_GAMEPAD_BUTTON_X</a></td></tr>\n<tr class=\"separator:gafc7821e87d77d41ed2cd3e1f726ec35f\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga3a7ef6bcb768a08cd3bf142f7f09f802\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__gamepad__buttons.html#ga3a7ef6bcb768a08cd3bf142f7f09f802\">GLFW_GAMEPAD_BUTTON_TRIANGLE</a>&#160;&#160;&#160;<a class=\"el\" href=\"group__gamepad__buttons.html#gafc931248bda494b530cbe057f386a5ed\">GLFW_GAMEPAD_BUTTON_Y</a></td></tr>\n<tr class=\"separator:ga3a7ef6bcb768a08cd3bf142f7f09f802\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n</table>\n<h2 class=\"groupheader\">Macro Definition Documentation</h2>\n<a id=\"gae055a12fbf4b48b5954c8e1cd129b810\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gae055a12fbf4b48b5954c8e1cd129b810\">&#9670;&nbsp;</a></span>GLFW_GAMEPAD_BUTTON_A</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_GAMEPAD_BUTTON_A&#160;&#160;&#160;0</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"ga2228a6512fd5950cdb51ba07846546fa\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga2228a6512fd5950cdb51ba07846546fa\">&#9670;&nbsp;</a></span>GLFW_GAMEPAD_BUTTON_B</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_GAMEPAD_BUTTON_B&#160;&#160;&#160;1</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"ga52cc94785cf3fe9a12e246539259887c\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga52cc94785cf3fe9a12e246539259887c\">&#9670;&nbsp;</a></span>GLFW_GAMEPAD_BUTTON_X</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_GAMEPAD_BUTTON_X&#160;&#160;&#160;2</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"gafc931248bda494b530cbe057f386a5ed\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gafc931248bda494b530cbe057f386a5ed\">&#9670;&nbsp;</a></span>GLFW_GAMEPAD_BUTTON_Y</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_GAMEPAD_BUTTON_Y&#160;&#160;&#160;3</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"ga17d67b4f39a39d6b813bd1567a3507c3\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga17d67b4f39a39d6b813bd1567a3507c3\">&#9670;&nbsp;</a></span>GLFW_GAMEPAD_BUTTON_LEFT_BUMPER</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_GAMEPAD_BUTTON_LEFT_BUMPER&#160;&#160;&#160;4</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"gadfbc9ea9bf3aae896b79fa49fdc85c7f\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gadfbc9ea9bf3aae896b79fa49fdc85c7f\">&#9670;&nbsp;</a></span>GLFW_GAMEPAD_BUTTON_RIGHT_BUMPER</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_GAMEPAD_BUTTON_RIGHT_BUMPER&#160;&#160;&#160;5</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"gabc7c0264ce778835b516a472b47f6caf\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gabc7c0264ce778835b516a472b47f6caf\">&#9670;&nbsp;</a></span>GLFW_GAMEPAD_BUTTON_BACK</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_GAMEPAD_BUTTON_BACK&#160;&#160;&#160;6</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"ga04606949dd9139434b8a1bedf4ac1021\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga04606949dd9139434b8a1bedf4ac1021\">&#9670;&nbsp;</a></span>GLFW_GAMEPAD_BUTTON_START</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_GAMEPAD_BUTTON_START&#160;&#160;&#160;7</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"ga7fa48c32e5b2f5db2f080aa0b8b573dc\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga7fa48c32e5b2f5db2f080aa0b8b573dc\">&#9670;&nbsp;</a></span>GLFW_GAMEPAD_BUTTON_GUIDE</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_GAMEPAD_BUTTON_GUIDE&#160;&#160;&#160;8</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"ga3e089787327454f7bfca7364d6ca206a\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga3e089787327454f7bfca7364d6ca206a\">&#9670;&nbsp;</a></span>GLFW_GAMEPAD_BUTTON_LEFT_THUMB</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_GAMEPAD_BUTTON_LEFT_THUMB&#160;&#160;&#160;9</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"ga1c003f52b5aebb45272475b48953b21a\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga1c003f52b5aebb45272475b48953b21a\">&#9670;&nbsp;</a></span>GLFW_GAMEPAD_BUTTON_RIGHT_THUMB</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_GAMEPAD_BUTTON_RIGHT_THUMB&#160;&#160;&#160;10</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"ga4f1ed6f974a47bc8930d4874a283476a\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga4f1ed6f974a47bc8930d4874a283476a\">&#9670;&nbsp;</a></span>GLFW_GAMEPAD_BUTTON_DPAD_UP</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_GAMEPAD_BUTTON_DPAD_UP&#160;&#160;&#160;11</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"gae2a780d2a8c79e0b77c0b7b601ca57c6\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gae2a780d2a8c79e0b77c0b7b601ca57c6\">&#9670;&nbsp;</a></span>GLFW_GAMEPAD_BUTTON_DPAD_RIGHT</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_GAMEPAD_BUTTON_DPAD_RIGHT&#160;&#160;&#160;12</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"ga8f2b731b97d80f90f11967a83207665c\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga8f2b731b97d80f90f11967a83207665c\">&#9670;&nbsp;</a></span>GLFW_GAMEPAD_BUTTON_DPAD_DOWN</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_GAMEPAD_BUTTON_DPAD_DOWN&#160;&#160;&#160;13</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"gaf0697e0e8607b2ebe1c93b0c6befe301\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gaf0697e0e8607b2ebe1c93b0c6befe301\">&#9670;&nbsp;</a></span>GLFW_GAMEPAD_BUTTON_DPAD_LEFT</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_GAMEPAD_BUTTON_DPAD_LEFT&#160;&#160;&#160;14</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"ga5cc98882f4f81dacf761639a567f61eb\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga5cc98882f4f81dacf761639a567f61eb\">&#9670;&nbsp;</a></span>GLFW_GAMEPAD_BUTTON_LAST</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_GAMEPAD_BUTTON_LAST&#160;&#160;&#160;<a class=\"el\" href=\"group__gamepad__buttons.html#gaf0697e0e8607b2ebe1c93b0c6befe301\">GLFW_GAMEPAD_BUTTON_DPAD_LEFT</a></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"gaf08d0df26527c9305253422bd98ed63a\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gaf08d0df26527c9305253422bd98ed63a\">&#9670;&nbsp;</a></span>GLFW_GAMEPAD_BUTTON_CROSS</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_GAMEPAD_BUTTON_CROSS&#160;&#160;&#160;<a class=\"el\" href=\"group__gamepad__buttons.html#gae055a12fbf4b48b5954c8e1cd129b810\">GLFW_GAMEPAD_BUTTON_A</a></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"gaaef094b3dacbf15f272b274516839b82\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gaaef094b3dacbf15f272b274516839b82\">&#9670;&nbsp;</a></span>GLFW_GAMEPAD_BUTTON_CIRCLE</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_GAMEPAD_BUTTON_CIRCLE&#160;&#160;&#160;<a class=\"el\" href=\"group__gamepad__buttons.html#ga2228a6512fd5950cdb51ba07846546fa\">GLFW_GAMEPAD_BUTTON_B</a></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"gafc7821e87d77d41ed2cd3e1f726ec35f\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gafc7821e87d77d41ed2cd3e1f726ec35f\">&#9670;&nbsp;</a></span>GLFW_GAMEPAD_BUTTON_SQUARE</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_GAMEPAD_BUTTON_SQUARE&#160;&#160;&#160;<a class=\"el\" href=\"group__gamepad__buttons.html#ga52cc94785cf3fe9a12e246539259887c\">GLFW_GAMEPAD_BUTTON_X</a></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"ga3a7ef6bcb768a08cd3bf142f7f09f802\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga3a7ef6bcb768a08cd3bf142f7f09f802\">&#9670;&nbsp;</a></span>GLFW_GAMEPAD_BUTTON_TRIANGLE</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_GAMEPAD_BUTTON_TRIANGLE&#160;&#160;&#160;<a class=\"el\" href=\"group__gamepad__buttons.html#gafc931248bda494b530cbe057f386a5ed\">GLFW_GAMEPAD_BUTTON_Y</a></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n</div><!-- contents -->\n<address class=\"footer\">\n<p>\nLast update on Mon Jan 20 2020 for GLFW 3.3.2\n</p>\n</address>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/group__hat__state.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta http-equiv=\"X-UA-Compatible\" content=\"IE=9\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<title>GLFW: Joystick hat states</title>\n<link href=\"tabs.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"jquery.js\"></script>\n<script type=\"text/javascript\" src=\"dynsections.js\"></script>\n<link href=\"search/search.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"search/searchdata.js\"></script>\n<script type=\"text/javascript\" src=\"search/search.js\"></script>\n<link href=\"doxygen.css\" rel=\"stylesheet\" type=\"text/css\" />\n<link href=\"extra.css\" rel=\"stylesheet\" type=\"text/css\"/>\n</head>\n<body>\n<div id=\"top\"><!-- do not remove this div, it is closed by doxygen! -->\n<div id=\"titlearea\">\n\t<div class=\"glfwheader\">\n\t\t<a href=\"https://www.glfw.org/\" id=\"glfwhome\">GLFW</a>\n\t\t<ul class=\"glfwnavbar\">\n\t\t\t<li><a href=\"https://www.glfw.org/documentation.html\">Documentation</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/download.html\">Download</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/community.html\">Community</a></li>\n\t\t</ul>\n\t</div>\n</div>\n<!-- end header part -->\n<!-- Generated by Doxygen 1.8.16 -->\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\nvar searchBox = new SearchBox(\"searchBox\", \"search\",false,'Search');\n/* @license-end */\n</script>\n<script type=\"text/javascript\" src=\"menudata.js\"></script>\n<script type=\"text/javascript\" src=\"menu.js\"></script>\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\n$(function() {\n  initMenu('',true,false,'search.php','Search');\n  $(document).ready(function() { init_search(); });\n});\n/* @license-end */</script>\n<div id=\"main-nav\"></div>\n</div><!-- top -->\n<!-- window showing the filter options -->\n<div id=\"MSearchSelectWindow\"\n     onmouseover=\"return searchBox.OnSearchSelectShow()\"\n     onmouseout=\"return searchBox.OnSearchSelectHide()\"\n     onkeydown=\"return searchBox.OnSearchSelectKey(event)\">\n</div>\n\n<!-- iframe showing the search results (closed by default) -->\n<div id=\"MSearchResultsWindow\">\n<iframe src=\"javascript:void(0)\" frameborder=\"0\" \n        name=\"MSearchResults\" id=\"MSearchResults\">\n</iframe>\n</div>\n\n<div class=\"header\">\n  <div class=\"summary\">\n<a href=\"#define-members\">Macros</a>  </div>\n  <div class=\"headertitle\">\n<div class=\"title\">Joystick hat states<div class=\"ingroups\"><a class=\"el\" href=\"group__input.html\">Input reference</a></div></div>  </div>\n</div><!--header-->\n<div class=\"contents\">\n<a name=\"details\" id=\"details\"></a><h2 class=\"groupheader\">Description</h2>\n<p>See <a class=\"el\" href=\"input_guide.html#joystick_hat\">joystick hat input</a> for how these are used. </p>\n<table class=\"memberdecls\">\n<tr class=\"heading\"><td colspan=\"2\"><h2 class=\"groupheader\"><a name=\"define-members\"></a>\nMacros</h2></td></tr>\n<tr class=\"memitem:gae2c0bcb7aec609e4736437554f6638fd\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__hat__state.html#gae2c0bcb7aec609e4736437554f6638fd\">GLFW_HAT_CENTERED</a>&#160;&#160;&#160;0</td></tr>\n<tr class=\"separator:gae2c0bcb7aec609e4736437554f6638fd\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga8c9720c76cd1b912738159ed74c85b36\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__hat__state.html#ga8c9720c76cd1b912738159ed74c85b36\">GLFW_HAT_UP</a>&#160;&#160;&#160;1</td></tr>\n<tr class=\"separator:ga8c9720c76cd1b912738159ed74c85b36\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga252586e3bbde75f4b0e07ad3124867f5\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__hat__state.html#ga252586e3bbde75f4b0e07ad3124867f5\">GLFW_HAT_RIGHT</a>&#160;&#160;&#160;2</td></tr>\n<tr class=\"separator:ga252586e3bbde75f4b0e07ad3124867f5\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gad60d1fd0dc85c18f2642cbae96d3deff\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__hat__state.html#gad60d1fd0dc85c18f2642cbae96d3deff\">GLFW_HAT_DOWN</a>&#160;&#160;&#160;4</td></tr>\n<tr class=\"separator:gad60d1fd0dc85c18f2642cbae96d3deff\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gac775f4b3154fdf5db93eb432ba546dff\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__hat__state.html#gac775f4b3154fdf5db93eb432ba546dff\">GLFW_HAT_LEFT</a>&#160;&#160;&#160;8</td></tr>\n<tr class=\"separator:gac775f4b3154fdf5db93eb432ba546dff\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga94aea0ae241a8b902883536c592ee693\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__hat__state.html#ga94aea0ae241a8b902883536c592ee693\">GLFW_HAT_RIGHT_UP</a>&#160;&#160;&#160;(<a class=\"el\" href=\"group__hat__state.html#ga252586e3bbde75f4b0e07ad3124867f5\">GLFW_HAT_RIGHT</a> | <a class=\"el\" href=\"group__hat__state.html#ga8c9720c76cd1b912738159ed74c85b36\">GLFW_HAT_UP</a>)</td></tr>\n<tr class=\"separator:ga94aea0ae241a8b902883536c592ee693\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gad7f0e4f52fd68d734863aaeadab3a3f5\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__hat__state.html#gad7f0e4f52fd68d734863aaeadab3a3f5\">GLFW_HAT_RIGHT_DOWN</a>&#160;&#160;&#160;(<a class=\"el\" href=\"group__hat__state.html#ga252586e3bbde75f4b0e07ad3124867f5\">GLFW_HAT_RIGHT</a> | <a class=\"el\" href=\"group__hat__state.html#gad60d1fd0dc85c18f2642cbae96d3deff\">GLFW_HAT_DOWN</a>)</td></tr>\n<tr class=\"separator:gad7f0e4f52fd68d734863aaeadab3a3f5\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga638f0e20dc5de90de21a33564e8ce129\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__hat__state.html#ga638f0e20dc5de90de21a33564e8ce129\">GLFW_HAT_LEFT_UP</a>&#160;&#160;&#160;(<a class=\"el\" href=\"group__hat__state.html#gac775f4b3154fdf5db93eb432ba546dff\">GLFW_HAT_LEFT</a>  | <a class=\"el\" href=\"group__hat__state.html#ga8c9720c76cd1b912738159ed74c85b36\">GLFW_HAT_UP</a>)</td></tr>\n<tr class=\"separator:ga638f0e20dc5de90de21a33564e8ce129\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga76c02baf1ea345fcbe3e8ff176a73e19\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__hat__state.html#ga76c02baf1ea345fcbe3e8ff176a73e19\">GLFW_HAT_LEFT_DOWN</a>&#160;&#160;&#160;(<a class=\"el\" href=\"group__hat__state.html#gac775f4b3154fdf5db93eb432ba546dff\">GLFW_HAT_LEFT</a>  | <a class=\"el\" href=\"group__hat__state.html#gad60d1fd0dc85c18f2642cbae96d3deff\">GLFW_HAT_DOWN</a>)</td></tr>\n<tr class=\"separator:ga76c02baf1ea345fcbe3e8ff176a73e19\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n</table>\n<h2 class=\"groupheader\">Macro Definition Documentation</h2>\n<a id=\"gae2c0bcb7aec609e4736437554f6638fd\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gae2c0bcb7aec609e4736437554f6638fd\">&#9670;&nbsp;</a></span>GLFW_HAT_CENTERED</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_HAT_CENTERED&#160;&#160;&#160;0</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"ga8c9720c76cd1b912738159ed74c85b36\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga8c9720c76cd1b912738159ed74c85b36\">&#9670;&nbsp;</a></span>GLFW_HAT_UP</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_HAT_UP&#160;&#160;&#160;1</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"ga252586e3bbde75f4b0e07ad3124867f5\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga252586e3bbde75f4b0e07ad3124867f5\">&#9670;&nbsp;</a></span>GLFW_HAT_RIGHT</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_HAT_RIGHT&#160;&#160;&#160;2</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"gad60d1fd0dc85c18f2642cbae96d3deff\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gad60d1fd0dc85c18f2642cbae96d3deff\">&#9670;&nbsp;</a></span>GLFW_HAT_DOWN</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_HAT_DOWN&#160;&#160;&#160;4</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"gac775f4b3154fdf5db93eb432ba546dff\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gac775f4b3154fdf5db93eb432ba546dff\">&#9670;&nbsp;</a></span>GLFW_HAT_LEFT</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_HAT_LEFT&#160;&#160;&#160;8</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"ga94aea0ae241a8b902883536c592ee693\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga94aea0ae241a8b902883536c592ee693\">&#9670;&nbsp;</a></span>GLFW_HAT_RIGHT_UP</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_HAT_RIGHT_UP&#160;&#160;&#160;(<a class=\"el\" href=\"group__hat__state.html#ga252586e3bbde75f4b0e07ad3124867f5\">GLFW_HAT_RIGHT</a> | <a class=\"el\" href=\"group__hat__state.html#ga8c9720c76cd1b912738159ed74c85b36\">GLFW_HAT_UP</a>)</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"gad7f0e4f52fd68d734863aaeadab3a3f5\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gad7f0e4f52fd68d734863aaeadab3a3f5\">&#9670;&nbsp;</a></span>GLFW_HAT_RIGHT_DOWN</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_HAT_RIGHT_DOWN&#160;&#160;&#160;(<a class=\"el\" href=\"group__hat__state.html#ga252586e3bbde75f4b0e07ad3124867f5\">GLFW_HAT_RIGHT</a> | <a class=\"el\" href=\"group__hat__state.html#gad60d1fd0dc85c18f2642cbae96d3deff\">GLFW_HAT_DOWN</a>)</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"ga638f0e20dc5de90de21a33564e8ce129\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga638f0e20dc5de90de21a33564e8ce129\">&#9670;&nbsp;</a></span>GLFW_HAT_LEFT_UP</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_HAT_LEFT_UP&#160;&#160;&#160;(<a class=\"el\" href=\"group__hat__state.html#gac775f4b3154fdf5db93eb432ba546dff\">GLFW_HAT_LEFT</a>  | <a class=\"el\" href=\"group__hat__state.html#ga8c9720c76cd1b912738159ed74c85b36\">GLFW_HAT_UP</a>)</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"ga76c02baf1ea345fcbe3e8ff176a73e19\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga76c02baf1ea345fcbe3e8ff176a73e19\">&#9670;&nbsp;</a></span>GLFW_HAT_LEFT_DOWN</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_HAT_LEFT_DOWN&#160;&#160;&#160;(<a class=\"el\" href=\"group__hat__state.html#gac775f4b3154fdf5db93eb432ba546dff\">GLFW_HAT_LEFT</a>  | <a class=\"el\" href=\"group__hat__state.html#gad60d1fd0dc85c18f2642cbae96d3deff\">GLFW_HAT_DOWN</a>)</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n</div><!-- contents -->\n<address class=\"footer\">\n<p>\nLast update on Mon Jan 20 2020 for GLFW 3.3.2\n</p>\n</address>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/group__init.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta http-equiv=\"X-UA-Compatible\" content=\"IE=9\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<title>GLFW: Initialization, version and error reference</title>\n<link href=\"tabs.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"jquery.js\"></script>\n<script type=\"text/javascript\" src=\"dynsections.js\"></script>\n<link href=\"search/search.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"search/searchdata.js\"></script>\n<script type=\"text/javascript\" src=\"search/search.js\"></script>\n<link href=\"doxygen.css\" rel=\"stylesheet\" type=\"text/css\" />\n<link href=\"extra.css\" rel=\"stylesheet\" type=\"text/css\"/>\n</head>\n<body>\n<div id=\"top\"><!-- do not remove this div, it is closed by doxygen! -->\n<div id=\"titlearea\">\n\t<div class=\"glfwheader\">\n\t\t<a href=\"https://www.glfw.org/\" id=\"glfwhome\">GLFW</a>\n\t\t<ul class=\"glfwnavbar\">\n\t\t\t<li><a href=\"https://www.glfw.org/documentation.html\">Documentation</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/download.html\">Download</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/community.html\">Community</a></li>\n\t\t</ul>\n\t</div>\n</div>\n<!-- end header part -->\n<!-- Generated by Doxygen 1.8.16 -->\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\nvar searchBox = new SearchBox(\"searchBox\", \"search\",false,'Search');\n/* @license-end */\n</script>\n<script type=\"text/javascript\" src=\"menudata.js\"></script>\n<script type=\"text/javascript\" src=\"menu.js\"></script>\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\n$(function() {\n  initMenu('',true,false,'search.php','Search');\n  $(document).ready(function() { init_search(); });\n});\n/* @license-end */</script>\n<div id=\"main-nav\"></div>\n</div><!-- top -->\n<!-- window showing the filter options -->\n<div id=\"MSearchSelectWindow\"\n     onmouseover=\"return searchBox.OnSearchSelectShow()\"\n     onmouseout=\"return searchBox.OnSearchSelectHide()\"\n     onkeydown=\"return searchBox.OnSearchSelectKey(event)\">\n</div>\n\n<!-- iframe showing the search results (closed by default) -->\n<div id=\"MSearchResultsWindow\">\n<iframe src=\"javascript:void(0)\" frameborder=\"0\" \n        name=\"MSearchResults\" id=\"MSearchResults\">\n</iframe>\n</div>\n\n<div class=\"header\">\n  <div class=\"summary\">\n<a href=\"#groups\">Modules</a> &#124;\n<a href=\"#define-members\">Macros</a> &#124;\n<a href=\"#typedef-members\">Typedefs</a> &#124;\n<a href=\"#func-members\">Functions</a>  </div>\n  <div class=\"headertitle\">\n<div class=\"title\">Initialization, version and error reference</div>  </div>\n</div><!--header-->\n<div class=\"contents\">\n<a name=\"details\" id=\"details\"></a><h2 class=\"groupheader\">Description</h2>\n<p>This is the reference documentation for initialization and termination of the library, version management and error handling. For more task-oriented information, see the <a class=\"el\" href=\"intro_guide.html\">Introduction to the API</a>. </p>\n<table class=\"memberdecls\">\n<tr class=\"heading\"><td colspan=\"2\"><h2 class=\"groupheader\"><a name=\"groups\"></a>\nModules</h2></td></tr>\n<tr class=\"memitem:group__errors\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__errors.html\">Error codes</a></td></tr>\n<tr class=\"memdesc:group__errors\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Error codes. <br /></td></tr>\n<tr class=\"separator:\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n</table><table class=\"memberdecls\">\n<tr class=\"heading\"><td colspan=\"2\"><h2 class=\"groupheader\"><a name=\"define-members\"></a>\nMacros</h2></td></tr>\n<tr class=\"memitem:ga2744fbb29b5631bb28802dbe0cf36eba\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__init.html#ga2744fbb29b5631bb28802dbe0cf36eba\">GLFW_TRUE</a>&#160;&#160;&#160;1</td></tr>\n<tr class=\"memdesc:ga2744fbb29b5631bb28802dbe0cf36eba\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">One.  <a href=\"group__init.html#ga2744fbb29b5631bb28802dbe0cf36eba\">More...</a><br /></td></tr>\n<tr class=\"separator:ga2744fbb29b5631bb28802dbe0cf36eba\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gac877fe3b627d21ef3a0a23e0a73ba8c5\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__init.html#gac877fe3b627d21ef3a0a23e0a73ba8c5\">GLFW_FALSE</a>&#160;&#160;&#160;0</td></tr>\n<tr class=\"memdesc:gac877fe3b627d21ef3a0a23e0a73ba8c5\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Zero.  <a href=\"group__init.html#gac877fe3b627d21ef3a0a23e0a73ba8c5\">More...</a><br /></td></tr>\n<tr class=\"separator:gac877fe3b627d21ef3a0a23e0a73ba8c5\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gab9c0534709fda03ec8959201da3a9a18\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__init.html#gab9c0534709fda03ec8959201da3a9a18\">GLFW_JOYSTICK_HAT_BUTTONS</a>&#160;&#160;&#160;0x00050001</td></tr>\n<tr class=\"memdesc:gab9c0534709fda03ec8959201da3a9a18\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Joystick hat buttons init hint.  <a href=\"group__init.html#gab9c0534709fda03ec8959201da3a9a18\">More...</a><br /></td></tr>\n<tr class=\"separator:gab9c0534709fda03ec8959201da3a9a18\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gab937983147a3158d45f88fad7129d9f2\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__init.html#gab937983147a3158d45f88fad7129d9f2\">GLFW_COCOA_CHDIR_RESOURCES</a>&#160;&#160;&#160;0x00051001</td></tr>\n<tr class=\"memdesc:gab937983147a3158d45f88fad7129d9f2\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">macOS specific init hint.  <a href=\"group__init.html#gab937983147a3158d45f88fad7129d9f2\">More...</a><br /></td></tr>\n<tr class=\"separator:gab937983147a3158d45f88fad7129d9f2\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga71e0b4ce2f2696a84a9b8c5e12dc70cf\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__init.html#ga71e0b4ce2f2696a84a9b8c5e12dc70cf\">GLFW_COCOA_MENUBAR</a>&#160;&#160;&#160;0x00051002</td></tr>\n<tr class=\"memdesc:ga71e0b4ce2f2696a84a9b8c5e12dc70cf\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">macOS specific init hint.  <a href=\"group__init.html#ga71e0b4ce2f2696a84a9b8c5e12dc70cf\">More...</a><br /></td></tr>\n<tr class=\"separator:ga71e0b4ce2f2696a84a9b8c5e12dc70cf\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n</table><table class=\"memberdecls\">\n<tr class=\"heading\"><td colspan=\"2\"><h2 class=\"groupheader\"><a name=\"typedef-members\"></a>\nTypedefs</h2></td></tr>\n<tr class=\"memitem:ga6b8a2639706d5c409fc1287e8f55e928\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">typedef void(*&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__init.html#ga6b8a2639706d5c409fc1287e8f55e928\">GLFWerrorfun</a>) (int, const char *)</td></tr>\n<tr class=\"memdesc:ga6b8a2639706d5c409fc1287e8f55e928\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">The function pointer type for error callbacks.  <a href=\"group__init.html#ga6b8a2639706d5c409fc1287e8f55e928\">More...</a><br /></td></tr>\n<tr class=\"separator:ga6b8a2639706d5c409fc1287e8f55e928\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n</table><table class=\"memberdecls\">\n<tr class=\"heading\"><td colspan=\"2\"><h2 class=\"groupheader\"><a name=\"func-members\"></a>\nFunctions</h2></td></tr>\n<tr class=\"memitem:ga317aac130a235ab08c6db0834907d85e\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">int&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__init.html#ga317aac130a235ab08c6db0834907d85e\">glfwInit</a> (void)</td></tr>\n<tr class=\"memdesc:ga317aac130a235ab08c6db0834907d85e\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Initializes the GLFW library.  <a href=\"group__init.html#ga317aac130a235ab08c6db0834907d85e\">More...</a><br /></td></tr>\n<tr class=\"separator:ga317aac130a235ab08c6db0834907d85e\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gaaae48c0a18607ea4a4ba951d939f0901\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">void&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__init.html#gaaae48c0a18607ea4a4ba951d939f0901\">glfwTerminate</a> (void)</td></tr>\n<tr class=\"memdesc:gaaae48c0a18607ea4a4ba951d939f0901\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Terminates the GLFW library.  <a href=\"group__init.html#gaaae48c0a18607ea4a4ba951d939f0901\">More...</a><br /></td></tr>\n<tr class=\"separator:gaaae48c0a18607ea4a4ba951d939f0901\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga110fd1d3f0412822b4f1908c026f724a\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">void&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__init.html#ga110fd1d3f0412822b4f1908c026f724a\">glfwInitHint</a> (int hint, int value)</td></tr>\n<tr class=\"memdesc:ga110fd1d3f0412822b4f1908c026f724a\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Sets the specified init hint to the desired value.  <a href=\"group__init.html#ga110fd1d3f0412822b4f1908c026f724a\">More...</a><br /></td></tr>\n<tr class=\"separator:ga110fd1d3f0412822b4f1908c026f724a\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga9f8ffaacf3c269cc48eafbf8b9b71197\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">void&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__init.html#ga9f8ffaacf3c269cc48eafbf8b9b71197\">glfwGetVersion</a> (int *major, int *minor, int *rev)</td></tr>\n<tr class=\"memdesc:ga9f8ffaacf3c269cc48eafbf8b9b71197\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Retrieves the version of the GLFW library.  <a href=\"group__init.html#ga9f8ffaacf3c269cc48eafbf8b9b71197\">More...</a><br /></td></tr>\n<tr class=\"separator:ga9f8ffaacf3c269cc48eafbf8b9b71197\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga23d47dc013fce2bf58036da66079a657\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">const char *&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__init.html#ga23d47dc013fce2bf58036da66079a657\">glfwGetVersionString</a> (void)</td></tr>\n<tr class=\"memdesc:ga23d47dc013fce2bf58036da66079a657\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns a string describing the compile-time configuration.  <a href=\"group__init.html#ga23d47dc013fce2bf58036da66079a657\">More...</a><br /></td></tr>\n<tr class=\"separator:ga23d47dc013fce2bf58036da66079a657\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga944986b4ec0b928d488141f92982aa18\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">int&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__init.html#ga944986b4ec0b928d488141f92982aa18\">glfwGetError</a> (const char **description)</td></tr>\n<tr class=\"memdesc:ga944986b4ec0b928d488141f92982aa18\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns and clears the last error for the calling thread.  <a href=\"group__init.html#ga944986b4ec0b928d488141f92982aa18\">More...</a><br /></td></tr>\n<tr class=\"separator:ga944986b4ec0b928d488141f92982aa18\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gaff45816610d53f0b83656092a4034f40\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\"><a class=\"el\" href=\"group__init.html#ga6b8a2639706d5c409fc1287e8f55e928\">GLFWerrorfun</a>&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__init.html#gaff45816610d53f0b83656092a4034f40\">glfwSetErrorCallback</a> (<a class=\"el\" href=\"group__init.html#ga6b8a2639706d5c409fc1287e8f55e928\">GLFWerrorfun</a> callback)</td></tr>\n<tr class=\"memdesc:gaff45816610d53f0b83656092a4034f40\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Sets the error callback.  <a href=\"group__init.html#gaff45816610d53f0b83656092a4034f40\">More...</a><br /></td></tr>\n<tr class=\"separator:gaff45816610d53f0b83656092a4034f40\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n</table>\n<h2 class=\"groupheader\">Macro Definition Documentation</h2>\n<a id=\"ga6337d9ea43b22fc529b2bba066b4a576\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga6337d9ea43b22fc529b2bba066b4a576\">&#9670;&nbsp;</a></span>GLFW_VERSION_MAJOR</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_VERSION_MAJOR&#160;&#160;&#160;3</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This is incremented when the API is changed in non-compatible ways. </p>\n\n</div>\n</div>\n<a id=\"gaf80d40f0aea7088ff337606e9c48f7a3\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gaf80d40f0aea7088ff337606e9c48f7a3\">&#9670;&nbsp;</a></span>GLFW_VERSION_MINOR</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_VERSION_MINOR&#160;&#160;&#160;3</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This is incremented when features are added to the API but it remains backward-compatible. </p>\n\n</div>\n</div>\n<a id=\"gab72ae2e2035d9ea461abc3495eac0502\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gab72ae2e2035d9ea461abc3495eac0502\">&#9670;&nbsp;</a></span>GLFW_VERSION_REVISION</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_VERSION_REVISION&#160;&#160;&#160;2</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This is incremented when a bug fix release is made that does not contain any API changes. </p>\n\n</div>\n</div>\n<a id=\"ga2744fbb29b5631bb28802dbe0cf36eba\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga2744fbb29b5631bb28802dbe0cf36eba\">&#9670;&nbsp;</a></span>GLFW_TRUE</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_TRUE&#160;&#160;&#160;1</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This is only semantic sugar for the number 1. You can instead use <code>1</code> or <code>true</code> or <code>_True</code> or <code>GL_TRUE</code> or <code>VK_TRUE</code> or anything else that is equal to one. </p>\n\n</div>\n</div>\n<a id=\"gac877fe3b627d21ef3a0a23e0a73ba8c5\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gac877fe3b627d21ef3a0a23e0a73ba8c5\">&#9670;&nbsp;</a></span>GLFW_FALSE</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_FALSE&#160;&#160;&#160;0</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This is only semantic sugar for the number 0. You can instead use <code>0</code> or <code>false</code> or <code>_False</code> or <code>GL_FALSE</code> or <code>VK_FALSE</code> or anything else that is equal to zero. </p>\n\n</div>\n</div>\n<a id=\"gab9c0534709fda03ec8959201da3a9a18\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gab9c0534709fda03ec8959201da3a9a18\">&#9670;&nbsp;</a></span>GLFW_JOYSTICK_HAT_BUTTONS</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_JOYSTICK_HAT_BUTTONS&#160;&#160;&#160;0x00050001</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>Joystick hat buttons <a class=\"el\" href=\"intro_guide.html#GLFW_JOYSTICK_HAT_BUTTONS\">init hint</a>. </p>\n\n</div>\n</div>\n<a id=\"gab937983147a3158d45f88fad7129d9f2\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gab937983147a3158d45f88fad7129d9f2\">&#9670;&nbsp;</a></span>GLFW_COCOA_CHDIR_RESOURCES</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_COCOA_CHDIR_RESOURCES&#160;&#160;&#160;0x00051001</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>macOS specific <a class=\"el\" href=\"intro_guide.html#GLFW_COCOA_CHDIR_RESOURCES_hint\">init hint</a>. </p>\n\n</div>\n</div>\n<a id=\"ga71e0b4ce2f2696a84a9b8c5e12dc70cf\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga71e0b4ce2f2696a84a9b8c5e12dc70cf\">&#9670;&nbsp;</a></span>GLFW_COCOA_MENUBAR</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_COCOA_MENUBAR&#160;&#160;&#160;0x00051002</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>macOS specific <a class=\"el\" href=\"intro_guide.html#GLFW_COCOA_MENUBAR_hint\">init hint</a>. </p>\n\n</div>\n</div>\n<h2 class=\"groupheader\">Typedef Documentation</h2>\n<a id=\"ga6b8a2639706d5c409fc1287e8f55e928\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga6b8a2639706d5c409fc1287e8f55e928\">&#9670;&nbsp;</a></span>GLFWerrorfun</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">typedef void(*  GLFWerrorfun) (int, const char *)</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This is the function pointer type for error callbacks. An error callback function has the following signature: </p><div class=\"fragment\"><div class=\"line\"><span class=\"keywordtype\">void</span> callback_name(<span class=\"keywordtype\">int</span> error_code, <span class=\"keyword\">const</span> <span class=\"keywordtype\">char</span>* description)</div>\n</div><!-- fragment --><dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">error_code</td><td>An <a class=\"el\" href=\"group__errors.html\">error code</a>. Future releases may add more error codes. </td></tr>\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">description</td><td>A UTF-8 encoded string describing the error.</td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section user\"><dt>Pointer lifetime</dt><dd>The error description string is valid until the callback function returns.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"intro_guide.html#error_handling\">Error handling</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__init.html#gaff45816610d53f0b83656092a4034f40\">glfwSetErrorCallback</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>\n\n</div>\n</div>\n<h2 class=\"groupheader\">Function Documentation</h2>\n<a id=\"ga317aac130a235ab08c6db0834907d85e\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga317aac130a235ab08c6db0834907d85e\">&#9670;&nbsp;</a></span>glfwInit()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">int glfwInit </td>\n          <td>(</td>\n          <td class=\"paramtype\">void&#160;</td>\n          <td class=\"paramname\"></td><td>)</td>\n          <td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function initializes the GLFW library. Before most GLFW functions can be used, GLFW must be initialized, and before an application terminates GLFW should be terminated in order to free any resources allocated during or after initialization.</p>\n<p>If this function fails, it calls <a class=\"el\" href=\"group__init.html#gaaae48c0a18607ea4a4ba951d939f0901\">glfwTerminate</a> before returning. If it succeeds, you should call <a class=\"el\" href=\"group__init.html#gaaae48c0a18607ea4a4ba951d939f0901\">glfwTerminate</a> before the application exits.</p>\n<p>Additional calls to this function after successful initialization but before termination will return <code>GLFW_TRUE</code> immediately.</p>\n<dl class=\"section return\"><dt>Returns</dt><dd><code>GLFW_TRUE</code> if successful, or <code>GLFW_FALSE</code> if an <a class=\"el\" href=\"intro_guide.html#error_handling\">error</a> occurred.</dd></dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1\">GLFW_PLATFORM_ERROR</a>.</dd></dl>\n<dl class=\"section remark\"><dt>Remarks</dt><dd><b>macOS:</b> This function will change the current directory of the application to the <code>Contents/Resources</code> subdirectory of the application's bundle, if present. This can be disabled with the <a class=\"el\" href=\"group__init.html#gab937983147a3158d45f88fad7129d9f2\">GLFW_COCOA_CHDIR_RESOURCES</a> init hint.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"intro_guide.html#intro_init\">Initialization and termination</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__init.html#gaaae48c0a18607ea4a4ba951d939f0901\">glfwTerminate</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 1.0. </dd></dl>\n\n</div>\n</div>\n<a id=\"gaaae48c0a18607ea4a4ba951d939f0901\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gaaae48c0a18607ea4a4ba951d939f0901\">&#9670;&nbsp;</a></span>glfwTerminate()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">void glfwTerminate </td>\n          <td>(</td>\n          <td class=\"paramtype\">void&#160;</td>\n          <td class=\"paramname\"></td><td>)</td>\n          <td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function destroys all remaining windows and cursors, restores any modified gamma ramps and frees any other allocated resources. Once this function is called, you must again call <a class=\"el\" href=\"group__init.html#ga317aac130a235ab08c6db0834907d85e\">glfwInit</a> successfully before you will be able to use most GLFW functions.</p>\n<p>If GLFW has been successfully initialized, this function should be called before the application exits. If initialization fails, there is no need to call this function, as it is called by <a class=\"el\" href=\"group__init.html#ga317aac130a235ab08c6db0834907d85e\">glfwInit</a> before it returns failure.</p>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1\">GLFW_PLATFORM_ERROR</a>.</dd></dl>\n<dl class=\"section remark\"><dt>Remarks</dt><dd>This function may be called before <a class=\"el\" href=\"group__init.html#ga317aac130a235ab08c6db0834907d85e\">glfwInit</a>.</dd></dl>\n<dl class=\"section warning\"><dt>Warning</dt><dd>The contexts of any remaining windows must not be current on any other thread when this function is called.</dd></dl>\n<dl class=\"section user\"><dt>Reentrancy</dt><dd>This function must not be called from a callback.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"intro_guide.html#intro_init\">Initialization and termination</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__init.html#ga317aac130a235ab08c6db0834907d85e\">glfwInit</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 1.0. </dd></dl>\n\n</div>\n</div>\n<a id=\"ga110fd1d3f0412822b4f1908c026f724a\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga110fd1d3f0412822b4f1908c026f724a\">&#9670;&nbsp;</a></span>glfwInitHint()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">void glfwInitHint </td>\n          <td>(</td>\n          <td class=\"paramtype\">int&#160;</td>\n          <td class=\"paramname\"><em>hint</em>, </td>\n        </tr>\n        <tr>\n          <td class=\"paramkey\"></td>\n          <td></td>\n          <td class=\"paramtype\">int&#160;</td>\n          <td class=\"paramname\"><em>value</em>&#160;</td>\n        </tr>\n        <tr>\n          <td></td>\n          <td>)</td>\n          <td></td><td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function sets hints for the next initialization of GLFW.</p>\n<p>The values you set hints to are never reset by GLFW, but they only take effect during initialization. Once GLFW has been initialized, any values you set will be ignored until the library is terminated and initialized again.</p>\n<p>Some hints are platform specific. These may be set on any platform but they will only affect their specific platform. Other platforms will ignore them. Setting these hints requires no platform specific headers or functions.</p>\n<dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">hint</td><td>The <a class=\"el\" href=\"intro_guide.html#init_hints\">init hint</a> to set. </td></tr>\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">value</td><td>The new value of the init hint.</td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga76f6bb9c4eea73db675f096b404593ce\">GLFW_INVALID_ENUM</a> and <a class=\"el\" href=\"group__errors.html#gaaf2ef9aa8202c2b82ac2d921e554c687\">GLFW_INVALID_VALUE</a>.</dd></dl>\n<dl class=\"section remark\"><dt>Remarks</dt><dd>This function may be called before <a class=\"el\" href=\"group__init.html#ga317aac130a235ab08c6db0834907d85e\">glfwInit</a>.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd>init_hints </dd>\n<dd>\n<a class=\"el\" href=\"group__init.html#ga317aac130a235ab08c6db0834907d85e\" title=\"Initializes the GLFW library.\">glfwInit</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.3. </dd></dl>\n\n</div>\n</div>\n<a id=\"ga9f8ffaacf3c269cc48eafbf8b9b71197\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga9f8ffaacf3c269cc48eafbf8b9b71197\">&#9670;&nbsp;</a></span>glfwGetVersion()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">void glfwGetVersion </td>\n          <td>(</td>\n          <td class=\"paramtype\">int *&#160;</td>\n          <td class=\"paramname\"><em>major</em>, </td>\n        </tr>\n        <tr>\n          <td class=\"paramkey\"></td>\n          <td></td>\n          <td class=\"paramtype\">int *&#160;</td>\n          <td class=\"paramname\"><em>minor</em>, </td>\n        </tr>\n        <tr>\n          <td class=\"paramkey\"></td>\n          <td></td>\n          <td class=\"paramtype\">int *&#160;</td>\n          <td class=\"paramname\"><em>rev</em>&#160;</td>\n        </tr>\n        <tr>\n          <td></td>\n          <td>)</td>\n          <td></td><td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function retrieves the major, minor and revision numbers of the GLFW library. It is intended for when you are using GLFW as a shared library and want to ensure that you are using the minimum required version.</p>\n<p>Any or all of the version arguments may be <code>NULL</code>.</p>\n<dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[out]</td><td class=\"paramname\">major</td><td>Where to store the major version number, or <code>NULL</code>. </td></tr>\n    <tr><td class=\"paramdir\">[out]</td><td class=\"paramname\">minor</td><td>Where to store the minor version number, or <code>NULL</code>. </td></tr>\n    <tr><td class=\"paramdir\">[out]</td><td class=\"paramname\">rev</td><td>Where to store the revision number, or <code>NULL</code>.</td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>None.</dd></dl>\n<dl class=\"section remark\"><dt>Remarks</dt><dd>This function may be called before <a class=\"el\" href=\"group__init.html#ga317aac130a235ab08c6db0834907d85e\">glfwInit</a>.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function may be called from any thread.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"intro_guide.html#intro_version\">Version management</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__init.html#ga23d47dc013fce2bf58036da66079a657\">glfwGetVersionString</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 1.0. </dd></dl>\n\n</div>\n</div>\n<a id=\"ga23d47dc013fce2bf58036da66079a657\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga23d47dc013fce2bf58036da66079a657\">&#9670;&nbsp;</a></span>glfwGetVersionString()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">const char* glfwGetVersionString </td>\n          <td>(</td>\n          <td class=\"paramtype\">void&#160;</td>\n          <td class=\"paramname\"></td><td>)</td>\n          <td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function returns the compile-time generated <a class=\"el\" href=\"intro_guide.html#intro_version_string\">version string</a> of the GLFW library binary. It describes the version, platform, compiler and any platform-specific compile-time options. It should not be confused with the OpenGL or OpenGL ES version string, queried with <code>glGetString</code>.</p>\n<p><b>Do not use the version string</b> to parse the GLFW library version. The <a class=\"el\" href=\"group__init.html#ga9f8ffaacf3c269cc48eafbf8b9b71197\">glfwGetVersion</a> function provides the version of the running library binary in numerical format.</p>\n<dl class=\"section return\"><dt>Returns</dt><dd>The ASCII encoded GLFW version string.</dd></dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>None.</dd></dl>\n<dl class=\"section remark\"><dt>Remarks</dt><dd>This function may be called before <a class=\"el\" href=\"group__init.html#ga317aac130a235ab08c6db0834907d85e\">glfwInit</a>.</dd></dl>\n<dl class=\"section user\"><dt>Pointer lifetime</dt><dd>The returned string is static and compile-time generated.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function may be called from any thread.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"intro_guide.html#intro_version\">Version management</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__init.html#ga9f8ffaacf3c269cc48eafbf8b9b71197\">glfwGetVersion</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>\n\n</div>\n</div>\n<a id=\"ga944986b4ec0b928d488141f92982aa18\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga944986b4ec0b928d488141f92982aa18\">&#9670;&nbsp;</a></span>glfwGetError()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">int glfwGetError </td>\n          <td>(</td>\n          <td class=\"paramtype\">const char **&#160;</td>\n          <td class=\"paramname\"><em>description</em></td><td>)</td>\n          <td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function returns and clears the <a class=\"el\" href=\"group__errors.html\">error code</a> of the last error that occurred on the calling thread, and optionally a UTF-8 encoded human-readable description of it. If no error has occurred since the last call, it returns <a class=\"el\" href=\"group__errors.html#gafa30deee5db4d69c4c93d116ed87dbf4\">GLFW_NO_ERROR</a> (zero) and the description pointer is set to <code>NULL</code>.</p>\n<dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">description</td><td>Where to store the error description pointer, or <code>NULL</code>. </td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section return\"><dt>Returns</dt><dd>The last error code for the calling thread, or <a class=\"el\" href=\"group__errors.html#gafa30deee5db4d69c4c93d116ed87dbf4\">GLFW_NO_ERROR</a> (zero).</dd></dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>None.</dd></dl>\n<dl class=\"section user\"><dt>Pointer lifetime</dt><dd>The returned string is allocated and freed by GLFW. You should not free it yourself. It is guaranteed to be valid only until the next error occurs or the library is terminated.</dd></dl>\n<dl class=\"section remark\"><dt>Remarks</dt><dd>This function may be called before <a class=\"el\" href=\"group__init.html#ga317aac130a235ab08c6db0834907d85e\">glfwInit</a>.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function may be called from any thread.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"intro_guide.html#error_handling\">Error handling</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__init.html#gaff45816610d53f0b83656092a4034f40\">glfwSetErrorCallback</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.3. </dd></dl>\n\n</div>\n</div>\n<a id=\"gaff45816610d53f0b83656092a4034f40\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gaff45816610d53f0b83656092a4034f40\">&#9670;&nbsp;</a></span>glfwSetErrorCallback()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\"><a class=\"el\" href=\"group__init.html#ga6b8a2639706d5c409fc1287e8f55e928\">GLFWerrorfun</a> glfwSetErrorCallback </td>\n          <td>(</td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__init.html#ga6b8a2639706d5c409fc1287e8f55e928\">GLFWerrorfun</a>&#160;</td>\n          <td class=\"paramname\"><em>callback</em></td><td>)</td>\n          <td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function sets the error callback, which is called with an error code and a human-readable description each time a GLFW error occurs.</p>\n<p>The error code is set before the callback is called. Calling <a class=\"el\" href=\"group__init.html#ga944986b4ec0b928d488141f92982aa18\">glfwGetError</a> from the error callback will return the same value as the error code argument.</p>\n<p>The error callback is called on the thread where the error occurred. If you are using GLFW from multiple threads, your error callback needs to be written accordingly.</p>\n<p>Because the description string may have been generated specifically for that error, it is not guaranteed to be valid after the callback has returned. If you wish to use it after the callback returns, you need to make a copy.</p>\n<p>Once set, the error callback remains set even after the library has been terminated.</p>\n<dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">callback</td><td>The new callback, or <code>NULL</code> to remove the currently set callback. </td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section return\"><dt>Returns</dt><dd>The previously set callback, or <code>NULL</code> if no callback was set.</dd></dl>\n<dl class=\"section user\"><dt>Callback signature</dt><dd><div class=\"fragment\"><div class=\"line\"><span class=\"keywordtype\">void</span> callback_name(<span class=\"keywordtype\">int</span> error_code, <span class=\"keyword\">const</span> <span class=\"keywordtype\">char</span>* description)</div>\n</div><!-- fragment --> For more information about the callback parameters, see the <a class=\"el\" href=\"group__init.html#ga6b8a2639706d5c409fc1287e8f55e928\">callback pointer type</a>.</dd></dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>None.</dd></dl>\n<dl class=\"section remark\"><dt>Remarks</dt><dd>This function may be called before <a class=\"el\" href=\"group__init.html#ga317aac130a235ab08c6db0834907d85e\">glfwInit</a>.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"intro_guide.html#error_handling\">Error handling</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__init.html#ga944986b4ec0b928d488141f92982aa18\">glfwGetError</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>\n\n</div>\n</div>\n</div><!-- contents -->\n<address class=\"footer\">\n<p>\nLast update on Mon Jan 20 2020 for GLFW 3.3.2\n</p>\n</address>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/group__input.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta http-equiv=\"X-UA-Compatible\" content=\"IE=9\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<title>GLFW: Input reference</title>\n<link href=\"tabs.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"jquery.js\"></script>\n<script type=\"text/javascript\" src=\"dynsections.js\"></script>\n<link href=\"search/search.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"search/searchdata.js\"></script>\n<script type=\"text/javascript\" src=\"search/search.js\"></script>\n<link href=\"doxygen.css\" rel=\"stylesheet\" type=\"text/css\" />\n<link href=\"extra.css\" rel=\"stylesheet\" type=\"text/css\"/>\n</head>\n<body>\n<div id=\"top\"><!-- do not remove this div, it is closed by doxygen! -->\n<div id=\"titlearea\">\n\t<div class=\"glfwheader\">\n\t\t<a href=\"https://www.glfw.org/\" id=\"glfwhome\">GLFW</a>\n\t\t<ul class=\"glfwnavbar\">\n\t\t\t<li><a href=\"https://www.glfw.org/documentation.html\">Documentation</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/download.html\">Download</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/community.html\">Community</a></li>\n\t\t</ul>\n\t</div>\n</div>\n<!-- end header part -->\n<!-- Generated by Doxygen 1.8.16 -->\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\nvar searchBox = new SearchBox(\"searchBox\", \"search\",false,'Search');\n/* @license-end */\n</script>\n<script type=\"text/javascript\" src=\"menudata.js\"></script>\n<script type=\"text/javascript\" src=\"menu.js\"></script>\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\n$(function() {\n  initMenu('',true,false,'search.php','Search');\n  $(document).ready(function() { init_search(); });\n});\n/* @license-end */</script>\n<div id=\"main-nav\"></div>\n</div><!-- top -->\n<!-- window showing the filter options -->\n<div id=\"MSearchSelectWindow\"\n     onmouseover=\"return searchBox.OnSearchSelectShow()\"\n     onmouseout=\"return searchBox.OnSearchSelectHide()\"\n     onkeydown=\"return searchBox.OnSearchSelectKey(event)\">\n</div>\n\n<!-- iframe showing the search results (closed by default) -->\n<div id=\"MSearchResultsWindow\">\n<iframe src=\"javascript:void(0)\" frameborder=\"0\" \n        name=\"MSearchResults\" id=\"MSearchResults\">\n</iframe>\n</div>\n\n<div class=\"header\">\n  <div class=\"summary\">\n<a href=\"#groups\">Modules</a> &#124;\n<a href=\"#typedef-members\">Typedefs</a> &#124;\n<a href=\"#func-members\">Functions</a>  </div>\n  <div class=\"headertitle\">\n<div class=\"title\">Input reference</div>  </div>\n</div><!--header-->\n<div class=\"contents\">\n<a name=\"details\" id=\"details\"></a><h2 class=\"groupheader\">Description</h2>\n<p>This is the reference documentation for input related functions and types. For more task-oriented information, see the <a class=\"el\" href=\"input_guide.html\">Input guide</a>. </p>\n<table class=\"memberdecls\">\n<tr class=\"heading\"><td colspan=\"2\"><h2 class=\"groupheader\"><a name=\"groups\"></a>\nModules</h2></td></tr>\n<tr class=\"memitem:group__gamepad__axes\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__gamepad__axes.html\">Gamepad axes</a></td></tr>\n<tr class=\"memdesc:group__gamepad__axes\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Gamepad axes. <br /></td></tr>\n<tr class=\"separator:\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:group__gamepad__buttons\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__gamepad__buttons.html\">Gamepad buttons</a></td></tr>\n<tr class=\"memdesc:group__gamepad__buttons\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Gamepad buttons. <br /></td></tr>\n<tr class=\"separator:\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:group__hat__state\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__hat__state.html\">Joystick hat states</a></td></tr>\n<tr class=\"memdesc:group__hat__state\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Joystick hat states. <br /></td></tr>\n<tr class=\"separator:\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:group__joysticks\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__joysticks.html\">Joysticks</a></td></tr>\n<tr class=\"memdesc:group__joysticks\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Joystick IDs. <br /></td></tr>\n<tr class=\"separator:\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:group__keys\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html\">Keyboard keys</a></td></tr>\n<tr class=\"memdesc:group__keys\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Keyboard key IDs. <br /></td></tr>\n<tr class=\"separator:\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:group__mods\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__mods.html\">Modifier key flags</a></td></tr>\n<tr class=\"memdesc:group__mods\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Modifier key flags. <br /></td></tr>\n<tr class=\"separator:\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:group__buttons\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__buttons.html\">Mouse buttons</a></td></tr>\n<tr class=\"memdesc:group__buttons\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Mouse button IDs. <br /></td></tr>\n<tr class=\"separator:\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:group__shapes\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__shapes.html\">Standard cursor shapes</a></td></tr>\n<tr class=\"memdesc:group__shapes\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Standard system cursor shapes. <br /></td></tr>\n<tr class=\"separator:\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n</table><table class=\"memberdecls\">\n<tr class=\"heading\"><td colspan=\"2\"><h2 class=\"groupheader\"><a name=\"typedef-members\"></a>\nTypedefs</h2></td></tr>\n<tr class=\"memitem:ga89261ae18c75e863aaf2656ecdd238f4\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">typedef struct <a class=\"el\" href=\"group__input.html#ga89261ae18c75e863aaf2656ecdd238f4\">GLFWcursor</a>&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__input.html#ga89261ae18c75e863aaf2656ecdd238f4\">GLFWcursor</a></td></tr>\n<tr class=\"memdesc:ga89261ae18c75e863aaf2656ecdd238f4\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Opaque cursor object.  <a href=\"group__input.html#ga89261ae18c75e863aaf2656ecdd238f4\">More...</a><br /></td></tr>\n<tr class=\"separator:ga89261ae18c75e863aaf2656ecdd238f4\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga39893a4a7e7c3239c98d29c9e084350c\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">typedef void(*&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__input.html#ga39893a4a7e7c3239c98d29c9e084350c\">GLFWmousebuttonfun</a>) (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *, int, int, int)</td></tr>\n<tr class=\"memdesc:ga39893a4a7e7c3239c98d29c9e084350c\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">The function pointer type for mouse button callbacks.  <a href=\"group__input.html#ga39893a4a7e7c3239c98d29c9e084350c\">More...</a><br /></td></tr>\n<tr class=\"separator:ga39893a4a7e7c3239c98d29c9e084350c\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga4cfad918fa836f09541e7b9acd36686c\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">typedef void(*&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__input.html#ga4cfad918fa836f09541e7b9acd36686c\">GLFWcursorposfun</a>) (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *, double, double)</td></tr>\n<tr class=\"memdesc:ga4cfad918fa836f09541e7b9acd36686c\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">The function pointer type for cursor position callbacks.  <a href=\"group__input.html#ga4cfad918fa836f09541e7b9acd36686c\">More...</a><br /></td></tr>\n<tr class=\"separator:ga4cfad918fa836f09541e7b9acd36686c\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga51ab436c41eeaed6db5a0c9403b1c840\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">typedef void(*&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__input.html#ga51ab436c41eeaed6db5a0c9403b1c840\">GLFWcursorenterfun</a>) (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *, int)</td></tr>\n<tr class=\"memdesc:ga51ab436c41eeaed6db5a0c9403b1c840\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">The function pointer type for cursor enter/leave callbacks.  <a href=\"group__input.html#ga51ab436c41eeaed6db5a0c9403b1c840\">More...</a><br /></td></tr>\n<tr class=\"separator:ga51ab436c41eeaed6db5a0c9403b1c840\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga4687e2199c60a18a8dd1da532e6d75c9\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">typedef void(*&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__input.html#ga4687e2199c60a18a8dd1da532e6d75c9\">GLFWscrollfun</a>) (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *, double, double)</td></tr>\n<tr class=\"memdesc:ga4687e2199c60a18a8dd1da532e6d75c9\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">The function pointer type for scroll callbacks.  <a href=\"group__input.html#ga4687e2199c60a18a8dd1da532e6d75c9\">More...</a><br /></td></tr>\n<tr class=\"separator:ga4687e2199c60a18a8dd1da532e6d75c9\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga0192a232a41e4e82948217c8ba94fdfd\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">typedef void(*&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__input.html#ga0192a232a41e4e82948217c8ba94fdfd\">GLFWkeyfun</a>) (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *, int, int, int, int)</td></tr>\n<tr class=\"memdesc:ga0192a232a41e4e82948217c8ba94fdfd\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">The function pointer type for keyboard key callbacks.  <a href=\"group__input.html#ga0192a232a41e4e82948217c8ba94fdfd\">More...</a><br /></td></tr>\n<tr class=\"separator:ga0192a232a41e4e82948217c8ba94fdfd\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gabf24451c7ceb1952bc02b17a0d5c3e5f\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">typedef void(*&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__input.html#gabf24451c7ceb1952bc02b17a0d5c3e5f\">GLFWcharfun</a>) (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *, unsigned int)</td></tr>\n<tr class=\"memdesc:gabf24451c7ceb1952bc02b17a0d5c3e5f\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">The function pointer type for Unicode character callbacks.  <a href=\"group__input.html#gabf24451c7ceb1952bc02b17a0d5c3e5f\">More...</a><br /></td></tr>\n<tr class=\"separator:gabf24451c7ceb1952bc02b17a0d5c3e5f\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gae36fb6897d2b7df9b128900c8ce9c507\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">typedef void(*&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__input.html#gae36fb6897d2b7df9b128900c8ce9c507\">GLFWcharmodsfun</a>) (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *, unsigned int, int)</td></tr>\n<tr class=\"memdesc:gae36fb6897d2b7df9b128900c8ce9c507\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">The function pointer type for Unicode character with modifiers callbacks.  <a href=\"group__input.html#gae36fb6897d2b7df9b128900c8ce9c507\">More...</a><br /></td></tr>\n<tr class=\"separator:gae36fb6897d2b7df9b128900c8ce9c507\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gafd0493dc32cd5ca5810e6148c0c026ea\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">typedef void(*&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__input.html#gafd0493dc32cd5ca5810e6148c0c026ea\">GLFWdropfun</a>) (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *, int, const char *[])</td></tr>\n<tr class=\"memdesc:gafd0493dc32cd5ca5810e6148c0c026ea\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">The function pointer type for path drop callbacks.  <a href=\"group__input.html#gafd0493dc32cd5ca5810e6148c0c026ea\">More...</a><br /></td></tr>\n<tr class=\"separator:gafd0493dc32cd5ca5810e6148c0c026ea\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gaa67aa597e974298c748bfe4fb17d406d\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">typedef void(*&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__input.html#gaa67aa597e974298c748bfe4fb17d406d\">GLFWjoystickfun</a>) (int, int)</td></tr>\n<tr class=\"memdesc:gaa67aa597e974298c748bfe4fb17d406d\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">The function pointer type for joystick configuration callbacks.  <a href=\"group__input.html#gaa67aa597e974298c748bfe4fb17d406d\">More...</a><br /></td></tr>\n<tr class=\"separator:gaa67aa597e974298c748bfe4fb17d406d\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga0b86867abb735af3b959f61c44b1d029\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">typedef struct <a class=\"el\" href=\"structGLFWgamepadstate.html\">GLFWgamepadstate</a>&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__input.html#ga0b86867abb735af3b959f61c44b1d029\">GLFWgamepadstate</a></td></tr>\n<tr class=\"memdesc:ga0b86867abb735af3b959f61c44b1d029\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Gamepad input state.  <a href=\"group__input.html#ga0b86867abb735af3b959f61c44b1d029\">More...</a><br /></td></tr>\n<tr class=\"separator:ga0b86867abb735af3b959f61c44b1d029\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n</table><table class=\"memberdecls\">\n<tr class=\"heading\"><td colspan=\"2\"><h2 class=\"groupheader\"><a name=\"func-members\"></a>\nFunctions</h2></td></tr>\n<tr class=\"memitem:gaf5b859dbe19bdf434e42695ea45cc5f4\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">int&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__input.html#gaf5b859dbe19bdf434e42695ea45cc5f4\">glfwGetInputMode</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window, int mode)</td></tr>\n<tr class=\"memdesc:gaf5b859dbe19bdf434e42695ea45cc5f4\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns the value of an input option for the specified window.  <a href=\"group__input.html#gaf5b859dbe19bdf434e42695ea45cc5f4\">More...</a><br /></td></tr>\n<tr class=\"separator:gaf5b859dbe19bdf434e42695ea45cc5f4\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gaa92336e173da9c8834558b54ee80563b\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">void&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__input.html#gaa92336e173da9c8834558b54ee80563b\">glfwSetInputMode</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window, int mode, int value)</td></tr>\n<tr class=\"memdesc:gaa92336e173da9c8834558b54ee80563b\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Sets an input option for the specified window.  <a href=\"group__input.html#gaa92336e173da9c8834558b54ee80563b\">More...</a><br /></td></tr>\n<tr class=\"separator:gaa92336e173da9c8834558b54ee80563b\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gae4ee0dbd0d256183e1ea4026d897e1c2\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">int&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__input.html#gae4ee0dbd0d256183e1ea4026d897e1c2\">glfwRawMouseMotionSupported</a> (void)</td></tr>\n<tr class=\"memdesc:gae4ee0dbd0d256183e1ea4026d897e1c2\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns whether raw mouse motion is supported.  <a href=\"group__input.html#gae4ee0dbd0d256183e1ea4026d897e1c2\">More...</a><br /></td></tr>\n<tr class=\"separator:gae4ee0dbd0d256183e1ea4026d897e1c2\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga237a182e5ec0b21ce64543f3b5e7e2be\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">const char *&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__input.html#ga237a182e5ec0b21ce64543f3b5e7e2be\">glfwGetKeyName</a> (int key, int scancode)</td></tr>\n<tr class=\"memdesc:ga237a182e5ec0b21ce64543f3b5e7e2be\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns the layout-specific name of the specified printable key.  <a href=\"group__input.html#ga237a182e5ec0b21ce64543f3b5e7e2be\">More...</a><br /></td></tr>\n<tr class=\"separator:ga237a182e5ec0b21ce64543f3b5e7e2be\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga67ddd1b7dcbbaff03e4a76c0ea67103a\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">int&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__input.html#ga67ddd1b7dcbbaff03e4a76c0ea67103a\">glfwGetKeyScancode</a> (int key)</td></tr>\n<tr class=\"memdesc:ga67ddd1b7dcbbaff03e4a76c0ea67103a\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns the platform-specific scancode of the specified key.  <a href=\"group__input.html#ga67ddd1b7dcbbaff03e4a76c0ea67103a\">More...</a><br /></td></tr>\n<tr class=\"separator:ga67ddd1b7dcbbaff03e4a76c0ea67103a\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gadd341da06bc8d418b4dc3a3518af9ad2\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">int&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__input.html#gadd341da06bc8d418b4dc3a3518af9ad2\">glfwGetKey</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window, int key)</td></tr>\n<tr class=\"memdesc:gadd341da06bc8d418b4dc3a3518af9ad2\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns the last reported state of a keyboard key for the specified window.  <a href=\"group__input.html#gadd341da06bc8d418b4dc3a3518af9ad2\">More...</a><br /></td></tr>\n<tr class=\"separator:gadd341da06bc8d418b4dc3a3518af9ad2\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gac1473feacb5996c01a7a5a33b5066704\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">int&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__input.html#gac1473feacb5996c01a7a5a33b5066704\">glfwGetMouseButton</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window, int button)</td></tr>\n<tr class=\"memdesc:gac1473feacb5996c01a7a5a33b5066704\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns the last reported state of a mouse button for the specified window.  <a href=\"group__input.html#gac1473feacb5996c01a7a5a33b5066704\">More...</a><br /></td></tr>\n<tr class=\"separator:gac1473feacb5996c01a7a5a33b5066704\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga01d37b6c40133676b9cea60ca1d7c0cc\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">void&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__input.html#ga01d37b6c40133676b9cea60ca1d7c0cc\">glfwGetCursorPos</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window, double *xpos, double *ypos)</td></tr>\n<tr class=\"memdesc:ga01d37b6c40133676b9cea60ca1d7c0cc\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Retrieves the position of the cursor relative to the content area of the window.  <a href=\"group__input.html#ga01d37b6c40133676b9cea60ca1d7c0cc\">More...</a><br /></td></tr>\n<tr class=\"separator:ga01d37b6c40133676b9cea60ca1d7c0cc\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga04b03af936d906ca123c8f4ee08b39e7\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">void&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__input.html#ga04b03af936d906ca123c8f4ee08b39e7\">glfwSetCursorPos</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window, double xpos, double ypos)</td></tr>\n<tr class=\"memdesc:ga04b03af936d906ca123c8f4ee08b39e7\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Sets the position of the cursor, relative to the content area of the window.  <a href=\"group__input.html#ga04b03af936d906ca123c8f4ee08b39e7\">More...</a><br /></td></tr>\n<tr class=\"separator:ga04b03af936d906ca123c8f4ee08b39e7\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gafca356935e10135016aa49ffa464c355\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\"><a class=\"el\" href=\"group__input.html#ga89261ae18c75e863aaf2656ecdd238f4\">GLFWcursor</a> *&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__input.html#gafca356935e10135016aa49ffa464c355\">glfwCreateCursor</a> (const <a class=\"el\" href=\"structGLFWimage.html\">GLFWimage</a> *image, int xhot, int yhot)</td></tr>\n<tr class=\"memdesc:gafca356935e10135016aa49ffa464c355\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Creates a custom cursor.  <a href=\"group__input.html#gafca356935e10135016aa49ffa464c355\">More...</a><br /></td></tr>\n<tr class=\"separator:gafca356935e10135016aa49ffa464c355\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gaa65f416d03ebbbb5b8db71a489fcb894\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\"><a class=\"el\" href=\"group__input.html#ga89261ae18c75e863aaf2656ecdd238f4\">GLFWcursor</a> *&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__input.html#gaa65f416d03ebbbb5b8db71a489fcb894\">glfwCreateStandardCursor</a> (int shape)</td></tr>\n<tr class=\"memdesc:gaa65f416d03ebbbb5b8db71a489fcb894\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Creates a cursor with a standard shape.  <a href=\"group__input.html#gaa65f416d03ebbbb5b8db71a489fcb894\">More...</a><br /></td></tr>\n<tr class=\"separator:gaa65f416d03ebbbb5b8db71a489fcb894\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga81b952cd1764274d0db7fb3c5a79ba6a\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">void&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__input.html#ga81b952cd1764274d0db7fb3c5a79ba6a\">glfwDestroyCursor</a> (<a class=\"el\" href=\"group__input.html#ga89261ae18c75e863aaf2656ecdd238f4\">GLFWcursor</a> *cursor)</td></tr>\n<tr class=\"memdesc:ga81b952cd1764274d0db7fb3c5a79ba6a\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Destroys a cursor.  <a href=\"group__input.html#ga81b952cd1764274d0db7fb3c5a79ba6a\">More...</a><br /></td></tr>\n<tr class=\"separator:ga81b952cd1764274d0db7fb3c5a79ba6a\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gad3b4f38c8d5dae036bc8fa959e18343e\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">void&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__input.html#gad3b4f38c8d5dae036bc8fa959e18343e\">glfwSetCursor</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window, <a class=\"el\" href=\"group__input.html#ga89261ae18c75e863aaf2656ecdd238f4\">GLFWcursor</a> *cursor)</td></tr>\n<tr class=\"memdesc:gad3b4f38c8d5dae036bc8fa959e18343e\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Sets the cursor for the window.  <a href=\"group__input.html#gad3b4f38c8d5dae036bc8fa959e18343e\">More...</a><br /></td></tr>\n<tr class=\"separator:gad3b4f38c8d5dae036bc8fa959e18343e\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga1caf18159767e761185e49a3be019f8d\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\"><a class=\"el\" href=\"group__input.html#ga0192a232a41e4e82948217c8ba94fdfd\">GLFWkeyfun</a>&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__input.html#ga1caf18159767e761185e49a3be019f8d\">glfwSetKeyCallback</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window, <a class=\"el\" href=\"group__input.html#ga0192a232a41e4e82948217c8ba94fdfd\">GLFWkeyfun</a> callback)</td></tr>\n<tr class=\"memdesc:ga1caf18159767e761185e49a3be019f8d\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Sets the key callback.  <a href=\"group__input.html#ga1caf18159767e761185e49a3be019f8d\">More...</a><br /></td></tr>\n<tr class=\"separator:ga1caf18159767e761185e49a3be019f8d\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gab25c4a220fd8f5717718dbc487828996\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\"><a class=\"el\" href=\"group__input.html#gabf24451c7ceb1952bc02b17a0d5c3e5f\">GLFWcharfun</a>&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__input.html#gab25c4a220fd8f5717718dbc487828996\">glfwSetCharCallback</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window, <a class=\"el\" href=\"group__input.html#gabf24451c7ceb1952bc02b17a0d5c3e5f\">GLFWcharfun</a> callback)</td></tr>\n<tr class=\"memdesc:gab25c4a220fd8f5717718dbc487828996\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Sets the Unicode character callback.  <a href=\"group__input.html#gab25c4a220fd8f5717718dbc487828996\">More...</a><br /></td></tr>\n<tr class=\"separator:gab25c4a220fd8f5717718dbc487828996\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga0b7f4ad13c2b17435ff13b6dcfb4e43c\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\"><a class=\"el\" href=\"group__input.html#gae36fb6897d2b7df9b128900c8ce9c507\">GLFWcharmodsfun</a>&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__input.html#ga0b7f4ad13c2b17435ff13b6dcfb4e43c\">glfwSetCharModsCallback</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window, <a class=\"el\" href=\"group__input.html#gae36fb6897d2b7df9b128900c8ce9c507\">GLFWcharmodsfun</a> callback)</td></tr>\n<tr class=\"memdesc:ga0b7f4ad13c2b17435ff13b6dcfb4e43c\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Sets the Unicode character with modifiers callback.  <a href=\"group__input.html#ga0b7f4ad13c2b17435ff13b6dcfb4e43c\">More...</a><br /></td></tr>\n<tr class=\"separator:ga0b7f4ad13c2b17435ff13b6dcfb4e43c\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga6ab84420974d812bee700e45284a723c\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\"><a class=\"el\" href=\"group__input.html#ga39893a4a7e7c3239c98d29c9e084350c\">GLFWmousebuttonfun</a>&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__input.html#ga6ab84420974d812bee700e45284a723c\">glfwSetMouseButtonCallback</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window, <a class=\"el\" href=\"group__input.html#ga39893a4a7e7c3239c98d29c9e084350c\">GLFWmousebuttonfun</a> callback)</td></tr>\n<tr class=\"memdesc:ga6ab84420974d812bee700e45284a723c\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Sets the mouse button callback.  <a href=\"group__input.html#ga6ab84420974d812bee700e45284a723c\">More...</a><br /></td></tr>\n<tr class=\"separator:ga6ab84420974d812bee700e45284a723c\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gac1f879ab7435d54d4d79bb469fe225d7\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\"><a class=\"el\" href=\"group__input.html#ga4cfad918fa836f09541e7b9acd36686c\">GLFWcursorposfun</a>&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__input.html#gac1f879ab7435d54d4d79bb469fe225d7\">glfwSetCursorPosCallback</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window, <a class=\"el\" href=\"group__input.html#ga4cfad918fa836f09541e7b9acd36686c\">GLFWcursorposfun</a> callback)</td></tr>\n<tr class=\"memdesc:gac1f879ab7435d54d4d79bb469fe225d7\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Sets the cursor position callback.  <a href=\"group__input.html#gac1f879ab7435d54d4d79bb469fe225d7\">More...</a><br /></td></tr>\n<tr class=\"separator:gac1f879ab7435d54d4d79bb469fe225d7\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gad27f8ad0142c038a281466c0966817d8\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\"><a class=\"el\" href=\"group__input.html#ga51ab436c41eeaed6db5a0c9403b1c840\">GLFWcursorenterfun</a>&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__input.html#gad27f8ad0142c038a281466c0966817d8\">glfwSetCursorEnterCallback</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window, <a class=\"el\" href=\"group__input.html#ga51ab436c41eeaed6db5a0c9403b1c840\">GLFWcursorenterfun</a> callback)</td></tr>\n<tr class=\"memdesc:gad27f8ad0142c038a281466c0966817d8\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Sets the cursor enter/leave callback.  <a href=\"group__input.html#gad27f8ad0142c038a281466c0966817d8\">More...</a><br /></td></tr>\n<tr class=\"separator:gad27f8ad0142c038a281466c0966817d8\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga571e45a030ae4061f746ed56cb76aede\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\"><a class=\"el\" href=\"group__input.html#ga4687e2199c60a18a8dd1da532e6d75c9\">GLFWscrollfun</a>&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__input.html#ga571e45a030ae4061f746ed56cb76aede\">glfwSetScrollCallback</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window, <a class=\"el\" href=\"group__input.html#ga4687e2199c60a18a8dd1da532e6d75c9\">GLFWscrollfun</a> callback)</td></tr>\n<tr class=\"memdesc:ga571e45a030ae4061f746ed56cb76aede\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Sets the scroll callback.  <a href=\"group__input.html#ga571e45a030ae4061f746ed56cb76aede\">More...</a><br /></td></tr>\n<tr class=\"separator:ga571e45a030ae4061f746ed56cb76aede\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gab773f0ee0a07cff77a210cea40bc1f6b\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\"><a class=\"el\" href=\"group__input.html#gafd0493dc32cd5ca5810e6148c0c026ea\">GLFWdropfun</a>&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__input.html#gab773f0ee0a07cff77a210cea40bc1f6b\">glfwSetDropCallback</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window, <a class=\"el\" href=\"group__input.html#gafd0493dc32cd5ca5810e6148c0c026ea\">GLFWdropfun</a> callback)</td></tr>\n<tr class=\"memdesc:gab773f0ee0a07cff77a210cea40bc1f6b\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Sets the path drop callback.  <a href=\"group__input.html#gab773f0ee0a07cff77a210cea40bc1f6b\">More...</a><br /></td></tr>\n<tr class=\"separator:gab773f0ee0a07cff77a210cea40bc1f6b\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gaed0966cee139d815317f9ffcba64c9f1\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">int&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__input.html#gaed0966cee139d815317f9ffcba64c9f1\">glfwJoystickPresent</a> (int jid)</td></tr>\n<tr class=\"memdesc:gaed0966cee139d815317f9ffcba64c9f1\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns whether the specified joystick is present.  <a href=\"group__input.html#gaed0966cee139d815317f9ffcba64c9f1\">More...</a><br /></td></tr>\n<tr class=\"separator:gaed0966cee139d815317f9ffcba64c9f1\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gaa8806536731e92c061bc70bcff6edbd0\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">const float *&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__input.html#gaa8806536731e92c061bc70bcff6edbd0\">glfwGetJoystickAxes</a> (int jid, int *count)</td></tr>\n<tr class=\"memdesc:gaa8806536731e92c061bc70bcff6edbd0\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns the values of all axes of the specified joystick.  <a href=\"group__input.html#gaa8806536731e92c061bc70bcff6edbd0\">More...</a><br /></td></tr>\n<tr class=\"separator:gaa8806536731e92c061bc70bcff6edbd0\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gadb3cbf44af90a1536f519659a53bddd6\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">const unsigned char *&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__input.html#gadb3cbf44af90a1536f519659a53bddd6\">glfwGetJoystickButtons</a> (int jid, int *count)</td></tr>\n<tr class=\"memdesc:gadb3cbf44af90a1536f519659a53bddd6\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns the state of all buttons of the specified joystick.  <a href=\"group__input.html#gadb3cbf44af90a1536f519659a53bddd6\">More...</a><br /></td></tr>\n<tr class=\"separator:gadb3cbf44af90a1536f519659a53bddd6\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga2d8d0634bb81c180899aeb07477a67ea\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">const unsigned char *&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__input.html#ga2d8d0634bb81c180899aeb07477a67ea\">glfwGetJoystickHats</a> (int jid, int *count)</td></tr>\n<tr class=\"memdesc:ga2d8d0634bb81c180899aeb07477a67ea\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns the state of all hats of the specified joystick.  <a href=\"group__input.html#ga2d8d0634bb81c180899aeb07477a67ea\">More...</a><br /></td></tr>\n<tr class=\"separator:ga2d8d0634bb81c180899aeb07477a67ea\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gafbe3e51f670320908cfe4e20d3e5559e\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">const char *&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__input.html#gafbe3e51f670320908cfe4e20d3e5559e\">glfwGetJoystickName</a> (int jid)</td></tr>\n<tr class=\"memdesc:gafbe3e51f670320908cfe4e20d3e5559e\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns the name of the specified joystick.  <a href=\"group__input.html#gafbe3e51f670320908cfe4e20d3e5559e\">More...</a><br /></td></tr>\n<tr class=\"separator:gafbe3e51f670320908cfe4e20d3e5559e\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gae168c2c0b8cf2a1cb67c6b3c00bdd543\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">const char *&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__input.html#gae168c2c0b8cf2a1cb67c6b3c00bdd543\">glfwGetJoystickGUID</a> (int jid)</td></tr>\n<tr class=\"memdesc:gae168c2c0b8cf2a1cb67c6b3c00bdd543\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns the SDL compatible GUID of the specified joystick.  <a href=\"group__input.html#gae168c2c0b8cf2a1cb67c6b3c00bdd543\">More...</a><br /></td></tr>\n<tr class=\"separator:gae168c2c0b8cf2a1cb67c6b3c00bdd543\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga6b2f72d64d636b48a727b437cbb7489e\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">void&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__input.html#ga6b2f72d64d636b48a727b437cbb7489e\">glfwSetJoystickUserPointer</a> (int jid, void *pointer)</td></tr>\n<tr class=\"memdesc:ga6b2f72d64d636b48a727b437cbb7489e\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Sets the user pointer of the specified joystick.  <a href=\"group__input.html#ga6b2f72d64d636b48a727b437cbb7489e\">More...</a><br /></td></tr>\n<tr class=\"separator:ga6b2f72d64d636b48a727b437cbb7489e\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga06290acb7ed23895bf26b8e981827ebd\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">void *&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__input.html#ga06290acb7ed23895bf26b8e981827ebd\">glfwGetJoystickUserPointer</a> (int jid)</td></tr>\n<tr class=\"memdesc:ga06290acb7ed23895bf26b8e981827ebd\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns the user pointer of the specified joystick.  <a href=\"group__input.html#ga06290acb7ed23895bf26b8e981827ebd\">More...</a><br /></td></tr>\n<tr class=\"separator:ga06290acb7ed23895bf26b8e981827ebd\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gad0f676860f329d80f7e47e9f06a96f00\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">int&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__input.html#gad0f676860f329d80f7e47e9f06a96f00\">glfwJoystickIsGamepad</a> (int jid)</td></tr>\n<tr class=\"memdesc:gad0f676860f329d80f7e47e9f06a96f00\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns whether the specified joystick has a gamepad mapping.  <a href=\"group__input.html#gad0f676860f329d80f7e47e9f06a96f00\">More...</a><br /></td></tr>\n<tr class=\"separator:gad0f676860f329d80f7e47e9f06a96f00\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga2f60a0e5b7bd8d1b7344dc0a7cb32b4c\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\"><a class=\"el\" href=\"group__input.html#gaa67aa597e974298c748bfe4fb17d406d\">GLFWjoystickfun</a>&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__input.html#ga2f60a0e5b7bd8d1b7344dc0a7cb32b4c\">glfwSetJoystickCallback</a> (<a class=\"el\" href=\"group__input.html#gaa67aa597e974298c748bfe4fb17d406d\">GLFWjoystickfun</a> callback)</td></tr>\n<tr class=\"memdesc:ga2f60a0e5b7bd8d1b7344dc0a7cb32b4c\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Sets the joystick configuration callback.  <a href=\"group__input.html#ga2f60a0e5b7bd8d1b7344dc0a7cb32b4c\">More...</a><br /></td></tr>\n<tr class=\"separator:ga2f60a0e5b7bd8d1b7344dc0a7cb32b4c\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gaed5104612f2fa8e66aa6e846652ad00f\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">int&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__input.html#gaed5104612f2fa8e66aa6e846652ad00f\">glfwUpdateGamepadMappings</a> (const char *string)</td></tr>\n<tr class=\"memdesc:gaed5104612f2fa8e66aa6e846652ad00f\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Adds the specified SDL_GameControllerDB gamepad mappings.  <a href=\"group__input.html#gaed5104612f2fa8e66aa6e846652ad00f\">More...</a><br /></td></tr>\n<tr class=\"separator:gaed5104612f2fa8e66aa6e846652ad00f\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga5c71e3533b2d384db9317fcd7661b210\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">const char *&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__input.html#ga5c71e3533b2d384db9317fcd7661b210\">glfwGetGamepadName</a> (int jid)</td></tr>\n<tr class=\"memdesc:ga5c71e3533b2d384db9317fcd7661b210\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns the human-readable gamepad name for the specified joystick.  <a href=\"group__input.html#ga5c71e3533b2d384db9317fcd7661b210\">More...</a><br /></td></tr>\n<tr class=\"separator:ga5c71e3533b2d384db9317fcd7661b210\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gadccddea8bce6113fa459de379ddaf051\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">int&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__input.html#gadccddea8bce6113fa459de379ddaf051\">glfwGetGamepadState</a> (int jid, <a class=\"el\" href=\"structGLFWgamepadstate.html\">GLFWgamepadstate</a> *state)</td></tr>\n<tr class=\"memdesc:gadccddea8bce6113fa459de379ddaf051\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Retrieves the state of the specified joystick remapped as a gamepad.  <a href=\"group__input.html#gadccddea8bce6113fa459de379ddaf051\">More...</a><br /></td></tr>\n<tr class=\"separator:gadccddea8bce6113fa459de379ddaf051\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gaba1f022c5eb07dfac421df34cdcd31dd\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">void&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__input.html#gaba1f022c5eb07dfac421df34cdcd31dd\">glfwSetClipboardString</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window, const char *string)</td></tr>\n<tr class=\"memdesc:gaba1f022c5eb07dfac421df34cdcd31dd\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Sets the clipboard to the specified string.  <a href=\"group__input.html#gaba1f022c5eb07dfac421df34cdcd31dd\">More...</a><br /></td></tr>\n<tr class=\"separator:gaba1f022c5eb07dfac421df34cdcd31dd\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga5aba1d704d9ab539282b1fbe9f18bb94\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">const char *&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__input.html#ga5aba1d704d9ab539282b1fbe9f18bb94\">glfwGetClipboardString</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window)</td></tr>\n<tr class=\"memdesc:ga5aba1d704d9ab539282b1fbe9f18bb94\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns the contents of the clipboard as a string.  <a href=\"group__input.html#ga5aba1d704d9ab539282b1fbe9f18bb94\">More...</a><br /></td></tr>\n<tr class=\"separator:ga5aba1d704d9ab539282b1fbe9f18bb94\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gaa6cf4e7a77158a3b8fd00328b1720a4a\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">double&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__input.html#gaa6cf4e7a77158a3b8fd00328b1720a4a\">glfwGetTime</a> (void)</td></tr>\n<tr class=\"memdesc:gaa6cf4e7a77158a3b8fd00328b1720a4a\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns the GLFW time.  <a href=\"group__input.html#gaa6cf4e7a77158a3b8fd00328b1720a4a\">More...</a><br /></td></tr>\n<tr class=\"separator:gaa6cf4e7a77158a3b8fd00328b1720a4a\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gaf59589ef6e8b8c8b5ad184b25afd4dc0\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">void&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__input.html#gaf59589ef6e8b8c8b5ad184b25afd4dc0\">glfwSetTime</a> (double time)</td></tr>\n<tr class=\"memdesc:gaf59589ef6e8b8c8b5ad184b25afd4dc0\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Sets the GLFW time.  <a href=\"group__input.html#gaf59589ef6e8b8c8b5ad184b25afd4dc0\">More...</a><br /></td></tr>\n<tr class=\"separator:gaf59589ef6e8b8c8b5ad184b25afd4dc0\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga09b2bd37d328e0b9456c7ec575cc26aa\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">uint64_t&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__input.html#ga09b2bd37d328e0b9456c7ec575cc26aa\">glfwGetTimerValue</a> (void)</td></tr>\n<tr class=\"memdesc:ga09b2bd37d328e0b9456c7ec575cc26aa\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns the current value of the raw timer.  <a href=\"group__input.html#ga09b2bd37d328e0b9456c7ec575cc26aa\">More...</a><br /></td></tr>\n<tr class=\"separator:ga09b2bd37d328e0b9456c7ec575cc26aa\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga3289ee876572f6e91f06df3a24824443\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">uint64_t&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__input.html#ga3289ee876572f6e91f06df3a24824443\">glfwGetTimerFrequency</a> (void)</td></tr>\n<tr class=\"memdesc:ga3289ee876572f6e91f06df3a24824443\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns the frequency, in Hz, of the raw timer.  <a href=\"group__input.html#ga3289ee876572f6e91f06df3a24824443\">More...</a><br /></td></tr>\n<tr class=\"separator:ga3289ee876572f6e91f06df3a24824443\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n</table>\n<h2 class=\"groupheader\">Macro Definition Documentation</h2>\n<a id=\"gada11d965c4da13090ad336e030e4d11f\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gada11d965c4da13090ad336e030e4d11f\">&#9670;&nbsp;</a></span>GLFW_RELEASE</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_RELEASE&#160;&#160;&#160;0</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>The key or mouse button was released. </p>\n\n</div>\n</div>\n<a id=\"ga2485743d0b59df3791c45951c4195265\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga2485743d0b59df3791c45951c4195265\">&#9670;&nbsp;</a></span>GLFW_PRESS</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_PRESS&#160;&#160;&#160;1</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>The key or mouse button was pressed. </p>\n\n</div>\n</div>\n<a id=\"gac96fd3b9fc66c6f0eebaf6532595338f\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gac96fd3b9fc66c6f0eebaf6532595338f\">&#9670;&nbsp;</a></span>GLFW_REPEAT</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_REPEAT&#160;&#160;&#160;2</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>The key was held down until it repeated. </p>\n\n</div>\n</div>\n<h2 class=\"groupheader\">Typedef Documentation</h2>\n<a id=\"ga89261ae18c75e863aaf2656ecdd238f4\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga89261ae18c75e863aaf2656ecdd238f4\">&#9670;&nbsp;</a></span>GLFWcursor</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">typedef struct <a class=\"el\" href=\"group__input.html#ga89261ae18c75e863aaf2656ecdd238f4\">GLFWcursor</a> <a class=\"el\" href=\"group__input.html#ga89261ae18c75e863aaf2656ecdd238f4\">GLFWcursor</a></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>Opaque cursor object.</p>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"input_guide.html#cursor_object\">Cursor objects</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.1. </dd></dl>\n\n</div>\n</div>\n<a id=\"ga39893a4a7e7c3239c98d29c9e084350c\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga39893a4a7e7c3239c98d29c9e084350c\">&#9670;&nbsp;</a></span>GLFWmousebuttonfun</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">typedef void(*  GLFWmousebuttonfun) (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *, int, int, int)</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This is the function pointer type for mouse button callback functions. A mouse button callback function has the following signature: </p><div class=\"fragment\"><div class=\"line\"><span class=\"keywordtype\">void</span> function_name(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window, <span class=\"keywordtype\">int</span> button, <span class=\"keywordtype\">int</span> action, <span class=\"keywordtype\">int</span> mods)</div>\n</div><!-- fragment --><dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">window</td><td>The window that received the event. </td></tr>\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">button</td><td>The <a class=\"el\" href=\"group__buttons.html\">mouse button</a> that was pressed or released. </td></tr>\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">action</td><td>One of <code>GLFW_PRESS</code> or <code>GLFW_RELEASE</code>. Future releases may add more actions. </td></tr>\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">mods</td><td>Bit field describing which <a class=\"el\" href=\"group__mods.html\">modifier keys</a> were held down.</td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"input_guide.html#input_mouse_button\">Mouse button input</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__input.html#ga6ab84420974d812bee700e45284a723c\">glfwSetMouseButtonCallback</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 1.0. <b>GLFW 3:</b> Added window handle and modifier mask parameters. </dd></dl>\n\n</div>\n</div>\n<a id=\"ga4cfad918fa836f09541e7b9acd36686c\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga4cfad918fa836f09541e7b9acd36686c\">&#9670;&nbsp;</a></span>GLFWcursorposfun</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">typedef void(*  GLFWcursorposfun) (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *, double, double)</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This is the function pointer type for cursor position callbacks. A cursor position callback function has the following signature: </p><div class=\"fragment\"><div class=\"line\"><span class=\"keywordtype\">void</span> function_name(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window, <span class=\"keywordtype\">double</span> xpos, <span class=\"keywordtype\">double</span> ypos);</div>\n</div><!-- fragment --><dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">window</td><td>The window that received the event. </td></tr>\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">xpos</td><td>The new cursor x-coordinate, relative to the left edge of the content area. </td></tr>\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">ypos</td><td>The new cursor y-coordinate, relative to the top edge of the content area.</td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"input_guide.html#cursor_pos\">Cursor position</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__input.html#gac1f879ab7435d54d4d79bb469fe225d7\">glfwSetCursorPosCallback</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.0. Replaces <code>GLFWmouseposfun</code>. </dd></dl>\n\n</div>\n</div>\n<a id=\"ga51ab436c41eeaed6db5a0c9403b1c840\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga51ab436c41eeaed6db5a0c9403b1c840\">&#9670;&nbsp;</a></span>GLFWcursorenterfun</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">typedef void(*  GLFWcursorenterfun) (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *, int)</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This is the function pointer type for cursor enter/leave callbacks. A cursor enter/leave callback function has the following signature: </p><div class=\"fragment\"><div class=\"line\"><span class=\"keywordtype\">void</span> function_name(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window, <span class=\"keywordtype\">int</span> entered)</div>\n</div><!-- fragment --><dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">window</td><td>The window that received the event. </td></tr>\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">entered</td><td><code>GLFW_TRUE</code> if the cursor entered the window's content area, or <code>GLFW_FALSE</code> if it left it.</td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"input_guide.html#cursor_enter\">Cursor enter/leave events</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__input.html#gad27f8ad0142c038a281466c0966817d8\">glfwSetCursorEnterCallback</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>\n\n</div>\n</div>\n<a id=\"ga4687e2199c60a18a8dd1da532e6d75c9\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga4687e2199c60a18a8dd1da532e6d75c9\">&#9670;&nbsp;</a></span>GLFWscrollfun</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">typedef void(*  GLFWscrollfun) (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *, double, double)</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This is the function pointer type for scroll callbacks. A scroll callback function has the following signature: </p><div class=\"fragment\"><div class=\"line\"><span class=\"keywordtype\">void</span> function_name(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window, <span class=\"keywordtype\">double</span> xoffset, <span class=\"keywordtype\">double</span> yoffset)</div>\n</div><!-- fragment --><dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">window</td><td>The window that received the event. </td></tr>\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">xoffset</td><td>The scroll offset along the x-axis. </td></tr>\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">yoffset</td><td>The scroll offset along the y-axis.</td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"input_guide.html#scrolling\">Scroll input</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__input.html#ga571e45a030ae4061f746ed56cb76aede\">glfwSetScrollCallback</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.0. Replaces <code>GLFWmousewheelfun</code>. </dd></dl>\n\n</div>\n</div>\n<a id=\"ga0192a232a41e4e82948217c8ba94fdfd\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga0192a232a41e4e82948217c8ba94fdfd\">&#9670;&nbsp;</a></span>GLFWkeyfun</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">typedef void(*  GLFWkeyfun) (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *, int, int, int, int)</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This is the function pointer type for keyboard key callbacks. A keyboard key callback function has the following signature: </p><div class=\"fragment\"><div class=\"line\"><span class=\"keywordtype\">void</span> function_name(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window, <span class=\"keywordtype\">int</span> key, <span class=\"keywordtype\">int</span> scancode, <span class=\"keywordtype\">int</span> action, <span class=\"keywordtype\">int</span> mods)</div>\n</div><!-- fragment --><dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">window</td><td>The window that received the event. </td></tr>\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">key</td><td>The <a class=\"el\" href=\"group__keys.html\">keyboard key</a> that was pressed or released. </td></tr>\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">scancode</td><td>The system-specific scancode of the key. </td></tr>\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">action</td><td><code>GLFW_PRESS</code>, <code>GLFW_RELEASE</code> or <code>GLFW_REPEAT</code>. Future releases may add more actions. </td></tr>\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">mods</td><td>Bit field describing which <a class=\"el\" href=\"group__mods.html\">modifier keys</a> were held down.</td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"input_guide.html#input_key\">Key input</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__input.html#ga1caf18159767e761185e49a3be019f8d\">glfwSetKeyCallback</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 1.0. <b>GLFW 3:</b> Added window handle, scancode and modifier mask parameters. </dd></dl>\n\n</div>\n</div>\n<a id=\"gabf24451c7ceb1952bc02b17a0d5c3e5f\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gabf24451c7ceb1952bc02b17a0d5c3e5f\">&#9670;&nbsp;</a></span>GLFWcharfun</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">typedef void(*  GLFWcharfun) (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *, unsigned int)</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This is the function pointer type for Unicode character callbacks. A Unicode character callback function has the following signature: </p><div class=\"fragment\"><div class=\"line\"><span class=\"keywordtype\">void</span> function_name(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window, <span class=\"keywordtype\">unsigned</span> <span class=\"keywordtype\">int</span> codepoint)</div>\n</div><!-- fragment --><dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">window</td><td>The window that received the event. </td></tr>\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">codepoint</td><td>The Unicode code point of the character.</td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"input_guide.html#input_char\">Text input</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__input.html#gab25c4a220fd8f5717718dbc487828996\">glfwSetCharCallback</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 2.4. <b>GLFW 3:</b> Added window handle parameter. </dd></dl>\n\n</div>\n</div>\n<a id=\"gae36fb6897d2b7df9b128900c8ce9c507\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gae36fb6897d2b7df9b128900c8ce9c507\">&#9670;&nbsp;</a></span>GLFWcharmodsfun</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">typedef void(*  GLFWcharmodsfun) (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *, unsigned int, int)</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This is the function pointer type for Unicode character with modifiers callbacks. It is called for each input character, regardless of what modifier keys are held down. A Unicode character with modifiers callback function has the following signature: </p><div class=\"fragment\"><div class=\"line\"><span class=\"keywordtype\">void</span> function_name(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window, <span class=\"keywordtype\">unsigned</span> <span class=\"keywordtype\">int</span> codepoint, <span class=\"keywordtype\">int</span> mods)</div>\n</div><!-- fragment --><dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">window</td><td>The window that received the event. </td></tr>\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">codepoint</td><td>The Unicode code point of the character. </td></tr>\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">mods</td><td>Bit field describing which <a class=\"el\" href=\"group__mods.html\">modifier keys</a> were held down.</td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"input_guide.html#input_char\">Text input</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__input.html#ga0b7f4ad13c2b17435ff13b6dcfb4e43c\">glfwSetCharModsCallback</a></dd></dl>\n<dl class=\"deprecated\"><dt><b><a class=\"el\" href=\"deprecated.html#_deprecated000001\">Deprecated:</a></b></dt><dd>Scheduled for removal in version 4.0.</dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.1. </dd></dl>\n\n</div>\n</div>\n<a id=\"gafd0493dc32cd5ca5810e6148c0c026ea\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gafd0493dc32cd5ca5810e6148c0c026ea\">&#9670;&nbsp;</a></span>GLFWdropfun</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">typedef void(*  GLFWdropfun) (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *, int, const char *[])</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This is the function pointer type for path drop callbacks. A path drop callback function has the following signature: </p><div class=\"fragment\"><div class=\"line\"><span class=\"keywordtype\">void</span> function_name(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window, <span class=\"keywordtype\">int</span> path_count, <span class=\"keyword\">const</span> <span class=\"keywordtype\">char</span>* paths[])</div>\n</div><!-- fragment --><dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">window</td><td>The window that received the event. </td></tr>\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">path_count</td><td>The number of dropped paths. </td></tr>\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">paths</td><td>The UTF-8 encoded file and/or directory path names.</td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section user\"><dt>Pointer lifetime</dt><dd>The path array and its strings are valid until the callback function returns.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"input_guide.html#path_drop\">Path drop input</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__input.html#gab773f0ee0a07cff77a210cea40bc1f6b\">glfwSetDropCallback</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.1. </dd></dl>\n\n</div>\n</div>\n<a id=\"gaa67aa597e974298c748bfe4fb17d406d\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gaa67aa597e974298c748bfe4fb17d406d\">&#9670;&nbsp;</a></span>GLFWjoystickfun</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">typedef void(*  GLFWjoystickfun) (int, int)</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This is the function pointer type for joystick configuration callbacks. A joystick configuration callback function has the following signature: </p><div class=\"fragment\"><div class=\"line\"><span class=\"keywordtype\">void</span> function_name(<span class=\"keywordtype\">int</span> jid, <span class=\"keywordtype\">int</span> event)</div>\n</div><!-- fragment --><dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">jid</td><td>The joystick that was connected or disconnected. </td></tr>\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">event</td><td>One of <code>GLFW_CONNECTED</code> or <code>GLFW_DISCONNECTED</code>. Future releases may add more events.</td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"input_guide.html#joystick_event\">Joystick configuration changes</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__input.html#ga2f60a0e5b7bd8d1b7344dc0a7cb32b4c\">glfwSetJoystickCallback</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.2. </dd></dl>\n\n</div>\n</div>\n<a id=\"ga0b86867abb735af3b959f61c44b1d029\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga0b86867abb735af3b959f61c44b1d029\">&#9670;&nbsp;</a></span>GLFWgamepadstate</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">typedef struct <a class=\"el\" href=\"structGLFWgamepadstate.html\">GLFWgamepadstate</a>  <a class=\"el\" href=\"structGLFWgamepadstate.html\">GLFWgamepadstate</a></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This describes the input state of a gamepad.</p>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"input_guide.html#gamepad\">Gamepad input</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__input.html#gadccddea8bce6113fa459de379ddaf051\">glfwGetGamepadState</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.3. </dd></dl>\n\n</div>\n</div>\n<h2 class=\"groupheader\">Function Documentation</h2>\n<a id=\"gaf5b859dbe19bdf434e42695ea45cc5f4\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gaf5b859dbe19bdf434e42695ea45cc5f4\">&#9670;&nbsp;</a></span>glfwGetInputMode()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">int glfwGetInputMode </td>\n          <td>(</td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *&#160;</td>\n          <td class=\"paramname\"><em>window</em>, </td>\n        </tr>\n        <tr>\n          <td class=\"paramkey\"></td>\n          <td></td>\n          <td class=\"paramtype\">int&#160;</td>\n          <td class=\"paramname\"><em>mode</em>&#160;</td>\n        </tr>\n        <tr>\n          <td></td>\n          <td>)</td>\n          <td></td><td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function returns the value of an input option for the specified window. The mode must be one of <a class=\"el\" href=\"input_guide.html#GLFW_CURSOR\">GLFW_CURSOR</a>, <a class=\"el\" href=\"input_guide.html#GLFW_STICKY_KEYS\">GLFW_STICKY_KEYS</a>, <a class=\"el\" href=\"input_guide.html#GLFW_STICKY_MOUSE_BUTTONS\">GLFW_STICKY_MOUSE_BUTTONS</a>, <a class=\"el\" href=\"input_guide.html#GLFW_LOCK_KEY_MODS\">GLFW_LOCK_KEY_MODS</a> or <a class=\"el\" href=\"input_guide.html#GLFW_RAW_MOUSE_MOTION\">GLFW_RAW_MOUSE_MOTION</a>.</p>\n<dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">window</td><td>The window to query. </td></tr>\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">mode</td><td>One of <code>GLFW_CURSOR</code>, <code>GLFW_STICKY_KEYS</code>, <code>GLFW_STICKY_MOUSE_BUTTONS</code>, <code>GLFW_LOCK_KEY_MODS</code> or <code>GLFW_RAW_MOUSE_MOTION</code>.</td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a> and <a class=\"el\" href=\"group__errors.html#ga76f6bb9c4eea73db675f096b404593ce\">GLFW_INVALID_ENUM</a>.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"group__input.html#gaa92336e173da9c8834558b54ee80563b\">glfwSetInputMode</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>\n\n</div>\n</div>\n<a id=\"gaa92336e173da9c8834558b54ee80563b\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gaa92336e173da9c8834558b54ee80563b\">&#9670;&nbsp;</a></span>glfwSetInputMode()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">void glfwSetInputMode </td>\n          <td>(</td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *&#160;</td>\n          <td class=\"paramname\"><em>window</em>, </td>\n        </tr>\n        <tr>\n          <td class=\"paramkey\"></td>\n          <td></td>\n          <td class=\"paramtype\">int&#160;</td>\n          <td class=\"paramname\"><em>mode</em>, </td>\n        </tr>\n        <tr>\n          <td class=\"paramkey\"></td>\n          <td></td>\n          <td class=\"paramtype\">int&#160;</td>\n          <td class=\"paramname\"><em>value</em>&#160;</td>\n        </tr>\n        <tr>\n          <td></td>\n          <td>)</td>\n          <td></td><td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function sets an input mode option for the specified window. The mode must be one of <a class=\"el\" href=\"input_guide.html#GLFW_CURSOR\">GLFW_CURSOR</a>, <a class=\"el\" href=\"input_guide.html#GLFW_STICKY_KEYS\">GLFW_STICKY_KEYS</a>, <a class=\"el\" href=\"input_guide.html#GLFW_STICKY_MOUSE_BUTTONS\">GLFW_STICKY_MOUSE_BUTTONS</a>, <a class=\"el\" href=\"input_guide.html#GLFW_LOCK_KEY_MODS\">GLFW_LOCK_KEY_MODS</a> or <a class=\"el\" href=\"input_guide.html#GLFW_RAW_MOUSE_MOTION\">GLFW_RAW_MOUSE_MOTION</a>.</p>\n<p>If the mode is <code>GLFW_CURSOR</code>, the value must be one of the following cursor modes:</p><ul>\n<li><code>GLFW_CURSOR_NORMAL</code> makes the cursor visible and behaving normally.</li>\n<li><code>GLFW_CURSOR_HIDDEN</code> makes the cursor invisible when it is over the content area of the window but does not restrict the cursor from leaving.</li>\n<li><code>GLFW_CURSOR_DISABLED</code> hides and grabs the cursor, providing virtual and unlimited cursor movement. This is useful for implementing for example 3D camera controls.</li>\n</ul>\n<p>If the mode is <code>GLFW_STICKY_KEYS</code>, the value must be either <code>GLFW_TRUE</code> to enable sticky keys, or <code>GLFW_FALSE</code> to disable it. If sticky keys are enabled, a key press will ensure that <a class=\"el\" href=\"group__input.html#gadd341da06bc8d418b4dc3a3518af9ad2\">glfwGetKey</a> returns <code>GLFW_PRESS</code> the next time it is called even if the key had been released before the call. This is useful when you are only interested in whether keys have been pressed but not when or in which order.</p>\n<p>If the mode is <code>GLFW_STICKY_MOUSE_BUTTONS</code>, the value must be either <code>GLFW_TRUE</code> to enable sticky mouse buttons, or <code>GLFW_FALSE</code> to disable it. If sticky mouse buttons are enabled, a mouse button press will ensure that <a class=\"el\" href=\"group__input.html#gac1473feacb5996c01a7a5a33b5066704\">glfwGetMouseButton</a> returns <code>GLFW_PRESS</code> the next time it is called even if the mouse button had been released before the call. This is useful when you are only interested in whether mouse buttons have been pressed but not when or in which order.</p>\n<p>If the mode is <code>GLFW_LOCK_KEY_MODS</code>, the value must be either <code>GLFW_TRUE</code> to enable lock key modifier bits, or <code>GLFW_FALSE</code> to disable them. If enabled, callbacks that receive modifier bits will also have the <a class=\"el\" href=\"group__mods.html#gaefeef8fcf825a6e43e241b337897200f\">GLFW_MOD_CAPS_LOCK</a> bit set when the event was generated with Caps Lock on, and the <a class=\"el\" href=\"group__mods.html#ga64e020b8a42af8376e944baf61feecbe\">GLFW_MOD_NUM_LOCK</a> bit when Num Lock was on.</p>\n<p>If the mode is <code>GLFW_RAW_MOUSE_MOTION</code>, the value must be either <code>GLFW_TRUE</code> to enable raw (unscaled and unaccelerated) mouse motion when the cursor is disabled, or <code>GLFW_FALSE</code> to disable it. If raw motion is not supported, attempting to set this will emit <a class=\"el\" href=\"group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1\">GLFW_PLATFORM_ERROR</a>. Call <a class=\"el\" href=\"group__input.html#gae4ee0dbd0d256183e1ea4026d897e1c2\">glfwRawMouseMotionSupported</a> to check for support.</p>\n<dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">window</td><td>The window whose input mode to set. </td></tr>\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">mode</td><td>One of <code>GLFW_CURSOR</code>, <code>GLFW_STICKY_KEYS</code>, <code>GLFW_STICKY_MOUSE_BUTTONS</code>, <code>GLFW_LOCK_KEY_MODS</code> or <code>GLFW_RAW_MOUSE_MOTION</code>. </td></tr>\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">value</td><td>The new value of the specified input mode.</td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a>, <a class=\"el\" href=\"group__errors.html#ga76f6bb9c4eea73db675f096b404593ce\">GLFW_INVALID_ENUM</a> and <a class=\"el\" href=\"group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1\">GLFW_PLATFORM_ERROR</a>.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"group__input.html#gaf5b859dbe19bdf434e42695ea45cc5f4\">glfwGetInputMode</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.0. Replaces <code>glfwEnable</code> and <code>glfwDisable</code>. </dd></dl>\n\n</div>\n</div>\n<a id=\"gae4ee0dbd0d256183e1ea4026d897e1c2\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gae4ee0dbd0d256183e1ea4026d897e1c2\">&#9670;&nbsp;</a></span>glfwRawMouseMotionSupported()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">int glfwRawMouseMotionSupported </td>\n          <td>(</td>\n          <td class=\"paramtype\">void&#160;</td>\n          <td class=\"paramname\"></td><td>)</td>\n          <td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function returns whether raw mouse motion is supported on the current system. This status does not change after GLFW has been initialized so you only need to check this once. If you attempt to enable raw motion on a system that does not support it, <a class=\"el\" href=\"group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1\">GLFW_PLATFORM_ERROR</a> will be emitted.</p>\n<p>Raw mouse motion is closer to the actual motion of the mouse across a surface. It is not affected by the scaling and acceleration applied to the motion of the desktop cursor. That processing is suitable for a cursor while raw motion is better for controlling for example a 3D camera. Because of this, raw mouse motion is only provided when the cursor is disabled.</p>\n<dl class=\"section return\"><dt>Returns</dt><dd><code>GLFW_TRUE</code> if raw mouse motion is supported on the current machine, or <code>GLFW_FALSE</code> otherwise.</dd></dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a>.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"input_guide.html#raw_mouse_motion\">Raw mouse motion</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__input.html#gaa92336e173da9c8834558b54ee80563b\">glfwSetInputMode</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.3. </dd></dl>\n\n</div>\n</div>\n<a id=\"ga237a182e5ec0b21ce64543f3b5e7e2be\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga237a182e5ec0b21ce64543f3b5e7e2be\">&#9670;&nbsp;</a></span>glfwGetKeyName()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">const char* glfwGetKeyName </td>\n          <td>(</td>\n          <td class=\"paramtype\">int&#160;</td>\n          <td class=\"paramname\"><em>key</em>, </td>\n        </tr>\n        <tr>\n          <td class=\"paramkey\"></td>\n          <td></td>\n          <td class=\"paramtype\">int&#160;</td>\n          <td class=\"paramname\"><em>scancode</em>&#160;</td>\n        </tr>\n        <tr>\n          <td></td>\n          <td>)</td>\n          <td></td><td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function returns the name of the specified printable key, encoded as UTF-8. This is typically the character that key would produce without any modifier keys, intended for displaying key bindings to the user. For dead keys, it is typically the diacritic it would add to a character.</p>\n<p><b>Do not use this function</b> for <a class=\"el\" href=\"input_guide.html#input_char\">text input</a>. You will break text input for many languages even if it happens to work for yours.</p>\n<p>If the key is <code>GLFW_KEY_UNKNOWN</code>, the scancode is used to identify the key, otherwise the scancode is ignored. If you specify a non-printable key, or <code>GLFW_KEY_UNKNOWN</code> and a scancode that maps to a non-printable key, this function returns <code>NULL</code> but does not emit an error.</p>\n<p>This behavior allows you to always pass in the arguments in the <a class=\"el\" href=\"input_guide.html#input_key\">key callback</a> without modification.</p>\n<p>The printable keys are:</p><ul>\n<li><code>GLFW_KEY_APOSTROPHE</code></li>\n<li><code>GLFW_KEY_COMMA</code></li>\n<li><code>GLFW_KEY_MINUS</code></li>\n<li><code>GLFW_KEY_PERIOD</code></li>\n<li><code>GLFW_KEY_SLASH</code></li>\n<li><code>GLFW_KEY_SEMICOLON</code></li>\n<li><code>GLFW_KEY_EQUAL</code></li>\n<li><code>GLFW_KEY_LEFT_BRACKET</code></li>\n<li><code>GLFW_KEY_RIGHT_BRACKET</code></li>\n<li><code>GLFW_KEY_BACKSLASH</code></li>\n<li><code>GLFW_KEY_WORLD_1</code></li>\n<li><code>GLFW_KEY_WORLD_2</code></li>\n<li><code>GLFW_KEY_0</code> to <code>GLFW_KEY_9</code></li>\n<li><code>GLFW_KEY_A</code> to <code>GLFW_KEY_Z</code></li>\n<li><code>GLFW_KEY_KP_0</code> to <code>GLFW_KEY_KP_9</code></li>\n<li><code>GLFW_KEY_KP_DECIMAL</code></li>\n<li><code>GLFW_KEY_KP_DIVIDE</code></li>\n<li><code>GLFW_KEY_KP_MULTIPLY</code></li>\n<li><code>GLFW_KEY_KP_SUBTRACT</code></li>\n<li><code>GLFW_KEY_KP_ADD</code></li>\n<li><code>GLFW_KEY_KP_EQUAL</code></li>\n</ul>\n<p>Names for printable keys depend on keyboard layout, while names for non-printable keys are the same across layouts but depend on the application language and should be localized along with other user interface text.</p>\n<dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">key</td><td>The key to query, or <code>GLFW_KEY_UNKNOWN</code>. </td></tr>\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">scancode</td><td>The scancode of the key to query. </td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section return\"><dt>Returns</dt><dd>The UTF-8 encoded, layout-specific name of the key, or <code>NULL</code>.</dd></dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a> and <a class=\"el\" href=\"group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1\">GLFW_PLATFORM_ERROR</a>.</dd></dl>\n<dl class=\"section remark\"><dt>Remarks</dt><dd>The contents of the returned string may change when a keyboard layout change event is received.</dd></dl>\n<dl class=\"section user\"><dt>Pointer lifetime</dt><dd>The returned string is allocated and freed by GLFW. You should not free it yourself. It is valid until the library is terminated.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"input_guide.html#input_key_name\">Key names</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.2. </dd></dl>\n\n</div>\n</div>\n<a id=\"ga67ddd1b7dcbbaff03e4a76c0ea67103a\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga67ddd1b7dcbbaff03e4a76c0ea67103a\">&#9670;&nbsp;</a></span>glfwGetKeyScancode()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">int glfwGetKeyScancode </td>\n          <td>(</td>\n          <td class=\"paramtype\">int&#160;</td>\n          <td class=\"paramname\"><em>key</em></td><td>)</td>\n          <td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function returns the platform-specific scancode of the specified key.</p>\n<p>If the key is <code>GLFW_KEY_UNKNOWN</code> or does not exist on the keyboard this method will return <code>-1</code>.</p>\n<dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">key</td><td>Any <a class=\"el\" href=\"group__keys.html\">named key</a>. </td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section return\"><dt>Returns</dt><dd>The platform-specific scancode for the key, or <code>-1</code> if an <a class=\"el\" href=\"intro_guide.html#error_handling\">error</a> occurred.</dd></dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a>, <a class=\"el\" href=\"group__errors.html#ga76f6bb9c4eea73db675f096b404593ce\">GLFW_INVALID_ENUM</a> and <a class=\"el\" href=\"group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1\">GLFW_PLATFORM_ERROR</a>.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function may be called from any thread.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"input_guide.html#input_key\">Key input</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.3. </dd></dl>\n\n</div>\n</div>\n<a id=\"gadd341da06bc8d418b4dc3a3518af9ad2\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gadd341da06bc8d418b4dc3a3518af9ad2\">&#9670;&nbsp;</a></span>glfwGetKey()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">int glfwGetKey </td>\n          <td>(</td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *&#160;</td>\n          <td class=\"paramname\"><em>window</em>, </td>\n        </tr>\n        <tr>\n          <td class=\"paramkey\"></td>\n          <td></td>\n          <td class=\"paramtype\">int&#160;</td>\n          <td class=\"paramname\"><em>key</em>&#160;</td>\n        </tr>\n        <tr>\n          <td></td>\n          <td>)</td>\n          <td></td><td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function returns the last state reported for the specified key to the specified window. The returned state is one of <code>GLFW_PRESS</code> or <code>GLFW_RELEASE</code>. The higher-level action <code>GLFW_REPEAT</code> is only reported to the key callback.</p>\n<p>If the <a class=\"el\" href=\"input_guide.html#GLFW_STICKY_KEYS\">GLFW_STICKY_KEYS</a> input mode is enabled, this function returns <code>GLFW_PRESS</code> the first time you call it for a key that was pressed, even if that key has already been released.</p>\n<p>The key functions deal with physical keys, with <a class=\"el\" href=\"group__keys.html\">key tokens</a> named after their use on the standard US keyboard layout. If you want to input text, use the Unicode character callback instead.</p>\n<p>The <a class=\"el\" href=\"group__mods.html\">modifier key bit masks</a> are not key tokens and cannot be used with this function.</p>\n<p><b>Do not use this function</b> to implement <a class=\"el\" href=\"input_guide.html#input_char\">text input</a>.</p>\n<dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">window</td><td>The desired window. </td></tr>\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">key</td><td>The desired <a class=\"el\" href=\"group__keys.html\">keyboard key</a>. <code>GLFW_KEY_UNKNOWN</code> is not a valid key for this function. </td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section return\"><dt>Returns</dt><dd>One of <code>GLFW_PRESS</code> or <code>GLFW_RELEASE</code>.</dd></dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a> and <a class=\"el\" href=\"group__errors.html#ga76f6bb9c4eea73db675f096b404593ce\">GLFW_INVALID_ENUM</a>.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"input_guide.html#input_key\">Key input</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 1.0. <b>GLFW 3:</b> Added window handle parameter. </dd></dl>\n\n</div>\n</div>\n<a id=\"gac1473feacb5996c01a7a5a33b5066704\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gac1473feacb5996c01a7a5a33b5066704\">&#9670;&nbsp;</a></span>glfwGetMouseButton()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">int glfwGetMouseButton </td>\n          <td>(</td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *&#160;</td>\n          <td class=\"paramname\"><em>window</em>, </td>\n        </tr>\n        <tr>\n          <td class=\"paramkey\"></td>\n          <td></td>\n          <td class=\"paramtype\">int&#160;</td>\n          <td class=\"paramname\"><em>button</em>&#160;</td>\n        </tr>\n        <tr>\n          <td></td>\n          <td>)</td>\n          <td></td><td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function returns the last state reported for the specified mouse button to the specified window. The returned state is one of <code>GLFW_PRESS</code> or <code>GLFW_RELEASE</code>.</p>\n<p>If the <a class=\"el\" href=\"input_guide.html#GLFW_STICKY_MOUSE_BUTTONS\">GLFW_STICKY_MOUSE_BUTTONS</a> input mode is enabled, this function returns <code>GLFW_PRESS</code> the first time you call it for a mouse button that was pressed, even if that mouse button has already been released.</p>\n<dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">window</td><td>The desired window. </td></tr>\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">button</td><td>The desired <a class=\"el\" href=\"group__buttons.html\">mouse button</a>. </td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section return\"><dt>Returns</dt><dd>One of <code>GLFW_PRESS</code> or <code>GLFW_RELEASE</code>.</dd></dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a> and <a class=\"el\" href=\"group__errors.html#ga76f6bb9c4eea73db675f096b404593ce\">GLFW_INVALID_ENUM</a>.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"input_guide.html#input_mouse_button\">Mouse button input</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 1.0. <b>GLFW 3:</b> Added window handle parameter. </dd></dl>\n\n</div>\n</div>\n<a id=\"ga01d37b6c40133676b9cea60ca1d7c0cc\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga01d37b6c40133676b9cea60ca1d7c0cc\">&#9670;&nbsp;</a></span>glfwGetCursorPos()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">void glfwGetCursorPos </td>\n          <td>(</td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *&#160;</td>\n          <td class=\"paramname\"><em>window</em>, </td>\n        </tr>\n        <tr>\n          <td class=\"paramkey\"></td>\n          <td></td>\n          <td class=\"paramtype\">double *&#160;</td>\n          <td class=\"paramname\"><em>xpos</em>, </td>\n        </tr>\n        <tr>\n          <td class=\"paramkey\"></td>\n          <td></td>\n          <td class=\"paramtype\">double *&#160;</td>\n          <td class=\"paramname\"><em>ypos</em>&#160;</td>\n        </tr>\n        <tr>\n          <td></td>\n          <td>)</td>\n          <td></td><td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function returns the position of the cursor, in screen coordinates, relative to the upper-left corner of the content area of the specified window.</p>\n<p>If the cursor is disabled (with <code>GLFW_CURSOR_DISABLED</code>) then the cursor position is unbounded and limited only by the minimum and maximum values of a <code>double</code>.</p>\n<p>The coordinate can be converted to their integer equivalents with the <code>floor</code> function. Casting directly to an integer type works for positive coordinates, but fails for negative ones.</p>\n<p>Any or all of the position arguments may be <code>NULL</code>. If an error occurs, all non-<code>NULL</code> position arguments will be set to zero.</p>\n<dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">window</td><td>The desired window. </td></tr>\n    <tr><td class=\"paramdir\">[out]</td><td class=\"paramname\">xpos</td><td>Where to store the cursor x-coordinate, relative to the left edge of the content area, or <code>NULL</code>. </td></tr>\n    <tr><td class=\"paramdir\">[out]</td><td class=\"paramname\">ypos</td><td>Where to store the cursor y-coordinate, relative to the to top edge of the content area, or <code>NULL</code>.</td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a> and <a class=\"el\" href=\"group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1\">GLFW_PLATFORM_ERROR</a>.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"input_guide.html#cursor_pos\">Cursor position</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__input.html#ga04b03af936d906ca123c8f4ee08b39e7\">glfwSetCursorPos</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.0. Replaces <code>glfwGetMousePos</code>. </dd></dl>\n\n</div>\n</div>\n<a id=\"ga04b03af936d906ca123c8f4ee08b39e7\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga04b03af936d906ca123c8f4ee08b39e7\">&#9670;&nbsp;</a></span>glfwSetCursorPos()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">void glfwSetCursorPos </td>\n          <td>(</td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *&#160;</td>\n          <td class=\"paramname\"><em>window</em>, </td>\n        </tr>\n        <tr>\n          <td class=\"paramkey\"></td>\n          <td></td>\n          <td class=\"paramtype\">double&#160;</td>\n          <td class=\"paramname\"><em>xpos</em>, </td>\n        </tr>\n        <tr>\n          <td class=\"paramkey\"></td>\n          <td></td>\n          <td class=\"paramtype\">double&#160;</td>\n          <td class=\"paramname\"><em>ypos</em>&#160;</td>\n        </tr>\n        <tr>\n          <td></td>\n          <td>)</td>\n          <td></td><td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function sets the position, in screen coordinates, of the cursor relative to the upper-left corner of the content area of the specified window. The window must have input focus. If the window does not have input focus when this function is called, it fails silently.</p>\n<p><b>Do not use this function</b> to implement things like camera controls. GLFW already provides the <code>GLFW_CURSOR_DISABLED</code> cursor mode that hides the cursor, transparently re-centers it and provides unconstrained cursor motion. See <a class=\"el\" href=\"group__input.html#gaa92336e173da9c8834558b54ee80563b\">glfwSetInputMode</a> for more information.</p>\n<p>If the cursor mode is <code>GLFW_CURSOR_DISABLED</code> then the cursor position is unconstrained and limited only by the minimum and maximum values of a <code>double</code>.</p>\n<dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">window</td><td>The desired window. </td></tr>\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">xpos</td><td>The desired x-coordinate, relative to the left edge of the content area. </td></tr>\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">ypos</td><td>The desired y-coordinate, relative to the top edge of the content area.</td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a> and <a class=\"el\" href=\"group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1\">GLFW_PLATFORM_ERROR</a>.</dd></dl>\n<dl class=\"section remark\"><dt>Remarks</dt><dd><b>Wayland:</b> This function will only work when the cursor mode is <code>GLFW_CURSOR_DISABLED</code>, otherwise it will do nothing.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"input_guide.html#cursor_pos\">Cursor position</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__input.html#ga01d37b6c40133676b9cea60ca1d7c0cc\">glfwGetCursorPos</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.0. Replaces <code>glfwSetMousePos</code>. </dd></dl>\n\n</div>\n</div>\n<a id=\"gafca356935e10135016aa49ffa464c355\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gafca356935e10135016aa49ffa464c355\">&#9670;&nbsp;</a></span>glfwCreateCursor()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\"><a class=\"el\" href=\"group__input.html#ga89261ae18c75e863aaf2656ecdd238f4\">GLFWcursor</a>* glfwCreateCursor </td>\n          <td>(</td>\n          <td class=\"paramtype\">const <a class=\"el\" href=\"structGLFWimage.html\">GLFWimage</a> *&#160;</td>\n          <td class=\"paramname\"><em>image</em>, </td>\n        </tr>\n        <tr>\n          <td class=\"paramkey\"></td>\n          <td></td>\n          <td class=\"paramtype\">int&#160;</td>\n          <td class=\"paramname\"><em>xhot</em>, </td>\n        </tr>\n        <tr>\n          <td class=\"paramkey\"></td>\n          <td></td>\n          <td class=\"paramtype\">int&#160;</td>\n          <td class=\"paramname\"><em>yhot</em>&#160;</td>\n        </tr>\n        <tr>\n          <td></td>\n          <td>)</td>\n          <td></td><td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>Creates a new custom cursor image that can be set for a window with <a class=\"el\" href=\"group__input.html#gad3b4f38c8d5dae036bc8fa959e18343e\">glfwSetCursor</a>. The cursor can be destroyed with <a class=\"el\" href=\"group__input.html#ga81b952cd1764274d0db7fb3c5a79ba6a\">glfwDestroyCursor</a>. Any remaining cursors are destroyed by <a class=\"el\" href=\"group__init.html#gaaae48c0a18607ea4a4ba951d939f0901\">glfwTerminate</a>.</p>\n<p>The pixels are 32-bit, little-endian, non-premultiplied RGBA, i.e. eight bits per channel with the red channel first. They are arranged canonically as packed sequential rows, starting from the top-left corner.</p>\n<p>The cursor hotspot is specified in pixels, relative to the upper-left corner of the cursor image. Like all other coordinate systems in GLFW, the X-axis points to the right and the Y-axis points down.</p>\n<dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">image</td><td>The desired cursor image. </td></tr>\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">xhot</td><td>The desired x-coordinate, in pixels, of the cursor hotspot. </td></tr>\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">yhot</td><td>The desired y-coordinate, in pixels, of the cursor hotspot. </td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section return\"><dt>Returns</dt><dd>The handle of the created cursor, or <code>NULL</code> if an <a class=\"el\" href=\"intro_guide.html#error_handling\">error</a> occurred.</dd></dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a> and <a class=\"el\" href=\"group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1\">GLFW_PLATFORM_ERROR</a>.</dd></dl>\n<dl class=\"section user\"><dt>Pointer lifetime</dt><dd>The specified image data is copied before this function returns.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"input_guide.html#cursor_object\">Cursor objects</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__input.html#ga81b952cd1764274d0db7fb3c5a79ba6a\">glfwDestroyCursor</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__input.html#gaa65f416d03ebbbb5b8db71a489fcb894\">glfwCreateStandardCursor</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.1. </dd></dl>\n\n</div>\n</div>\n<a id=\"gaa65f416d03ebbbb5b8db71a489fcb894\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gaa65f416d03ebbbb5b8db71a489fcb894\">&#9670;&nbsp;</a></span>glfwCreateStandardCursor()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\"><a class=\"el\" href=\"group__input.html#ga89261ae18c75e863aaf2656ecdd238f4\">GLFWcursor</a>* glfwCreateStandardCursor </td>\n          <td>(</td>\n          <td class=\"paramtype\">int&#160;</td>\n          <td class=\"paramname\"><em>shape</em></td><td>)</td>\n          <td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>Returns a cursor with a <a class=\"el\" href=\"group__shapes.html\">standard shape</a>, that can be set for a window with <a class=\"el\" href=\"group__input.html#gad3b4f38c8d5dae036bc8fa959e18343e\">glfwSetCursor</a>.</p>\n<dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">shape</td><td>One of the <a class=\"el\" href=\"group__shapes.html\">standard shapes</a>. </td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section return\"><dt>Returns</dt><dd>A new cursor ready to use or <code>NULL</code> if an <a class=\"el\" href=\"intro_guide.html#error_handling\">error</a> occurred.</dd></dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a>, <a class=\"el\" href=\"group__errors.html#ga76f6bb9c4eea73db675f096b404593ce\">GLFW_INVALID_ENUM</a> and <a class=\"el\" href=\"group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1\">GLFW_PLATFORM_ERROR</a>.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"input_guide.html#cursor_object\">Cursor objects</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__input.html#gafca356935e10135016aa49ffa464c355\">glfwCreateCursor</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.1. </dd></dl>\n\n</div>\n</div>\n<a id=\"ga81b952cd1764274d0db7fb3c5a79ba6a\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga81b952cd1764274d0db7fb3c5a79ba6a\">&#9670;&nbsp;</a></span>glfwDestroyCursor()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">void glfwDestroyCursor </td>\n          <td>(</td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__input.html#ga89261ae18c75e863aaf2656ecdd238f4\">GLFWcursor</a> *&#160;</td>\n          <td class=\"paramname\"><em>cursor</em></td><td>)</td>\n          <td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function destroys a cursor previously created with <a class=\"el\" href=\"group__input.html#gafca356935e10135016aa49ffa464c355\">glfwCreateCursor</a>. Any remaining cursors will be destroyed by <a class=\"el\" href=\"group__init.html#gaaae48c0a18607ea4a4ba951d939f0901\">glfwTerminate</a>.</p>\n<p>If the specified cursor is current for any window, that window will be reverted to the default cursor. This does not affect the cursor mode.</p>\n<dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">cursor</td><td>The cursor object to destroy.</td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a> and <a class=\"el\" href=\"group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1\">GLFW_PLATFORM_ERROR</a>.</dd></dl>\n<dl class=\"section user\"><dt>Reentrancy</dt><dd>This function must not be called from a callback.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"input_guide.html#cursor_object\">Cursor objects</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__input.html#gafca356935e10135016aa49ffa464c355\">glfwCreateCursor</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.1. </dd></dl>\n\n</div>\n</div>\n<a id=\"gad3b4f38c8d5dae036bc8fa959e18343e\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gad3b4f38c8d5dae036bc8fa959e18343e\">&#9670;&nbsp;</a></span>glfwSetCursor()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">void glfwSetCursor </td>\n          <td>(</td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *&#160;</td>\n          <td class=\"paramname\"><em>window</em>, </td>\n        </tr>\n        <tr>\n          <td class=\"paramkey\"></td>\n          <td></td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__input.html#ga89261ae18c75e863aaf2656ecdd238f4\">GLFWcursor</a> *&#160;</td>\n          <td class=\"paramname\"><em>cursor</em>&#160;</td>\n        </tr>\n        <tr>\n          <td></td>\n          <td>)</td>\n          <td></td><td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function sets the cursor image to be used when the cursor is over the content area of the specified window. The set cursor will only be visible when the <a class=\"el\" href=\"input_guide.html#cursor_mode\">cursor mode</a> of the window is <code>GLFW_CURSOR_NORMAL</code>.</p>\n<p>On some platforms, the set cursor may not be visible unless the window also has input focus.</p>\n<dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">window</td><td>The window to set the cursor for. </td></tr>\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">cursor</td><td>The cursor to set, or <code>NULL</code> to switch back to the default arrow cursor.</td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a> and <a class=\"el\" href=\"group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1\">GLFW_PLATFORM_ERROR</a>.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"input_guide.html#cursor_object\">Cursor objects</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.1. </dd></dl>\n\n</div>\n</div>\n<a id=\"ga1caf18159767e761185e49a3be019f8d\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga1caf18159767e761185e49a3be019f8d\">&#9670;&nbsp;</a></span>glfwSetKeyCallback()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\"><a class=\"el\" href=\"group__input.html#ga0192a232a41e4e82948217c8ba94fdfd\">GLFWkeyfun</a> glfwSetKeyCallback </td>\n          <td>(</td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *&#160;</td>\n          <td class=\"paramname\"><em>window</em>, </td>\n        </tr>\n        <tr>\n          <td class=\"paramkey\"></td>\n          <td></td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__input.html#ga0192a232a41e4e82948217c8ba94fdfd\">GLFWkeyfun</a>&#160;</td>\n          <td class=\"paramname\"><em>callback</em>&#160;</td>\n        </tr>\n        <tr>\n          <td></td>\n          <td>)</td>\n          <td></td><td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function sets the key callback of the specified window, which is called when a key is pressed, repeated or released.</p>\n<p>The key functions deal with physical keys, with layout independent <a class=\"el\" href=\"group__keys.html\">key tokens</a> named after their values in the standard US keyboard layout. If you want to input text, use the <a class=\"el\" href=\"group__input.html#gab25c4a220fd8f5717718dbc487828996\">character callback</a> instead.</p>\n<p>When a window loses input focus, it will generate synthetic key release events for all pressed keys. You can tell these events from user-generated events by the fact that the synthetic ones are generated after the focus loss event has been processed, i.e. after the <a class=\"el\" href=\"group__window.html#gac2d83c4a10f071baf841f6730528e66c\">window focus callback</a> has been called.</p>\n<p>The scancode of a key is specific to that platform or sometimes even to that machine. Scancodes are intended to allow users to bind keys that don't have a GLFW key token. Such keys have <code>key</code> set to <code>GLFW_KEY_UNKNOWN</code>, their state is not saved and so it cannot be queried with <a class=\"el\" href=\"group__input.html#gadd341da06bc8d418b4dc3a3518af9ad2\">glfwGetKey</a>.</p>\n<p>Sometimes GLFW needs to generate synthetic key events, in which case the scancode may be zero.</p>\n<dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">window</td><td>The window whose callback to set. </td></tr>\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">callback</td><td>The new key callback, or <code>NULL</code> to remove the currently set callback. </td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section return\"><dt>Returns</dt><dd>The previously set callback, or <code>NULL</code> if no callback was set or the library had not been <a class=\"el\" href=\"intro_guide.html#intro_init\">initialized</a>.</dd></dl>\n<dl class=\"section user\"><dt>Callback signature</dt><dd><div class=\"fragment\"><div class=\"line\"><span class=\"keywordtype\">void</span> function_name(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window, <span class=\"keywordtype\">int</span> key, <span class=\"keywordtype\">int</span> scancode, <span class=\"keywordtype\">int</span> action, <span class=\"keywordtype\">int</span> mods)</div>\n</div><!-- fragment --> For more information about the callback parameters, see the <a class=\"el\" href=\"group__input.html#ga0192a232a41e4e82948217c8ba94fdfd\">function pointer type</a>.</dd></dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a>.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"input_guide.html#input_key\">Key input</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 1.0. <b>GLFW 3:</b> Added window handle parameter and return value. </dd></dl>\n\n</div>\n</div>\n<a id=\"gab25c4a220fd8f5717718dbc487828996\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gab25c4a220fd8f5717718dbc487828996\">&#9670;&nbsp;</a></span>glfwSetCharCallback()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\"><a class=\"el\" href=\"group__input.html#gabf24451c7ceb1952bc02b17a0d5c3e5f\">GLFWcharfun</a> glfwSetCharCallback </td>\n          <td>(</td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *&#160;</td>\n          <td class=\"paramname\"><em>window</em>, </td>\n        </tr>\n        <tr>\n          <td class=\"paramkey\"></td>\n          <td></td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__input.html#gabf24451c7ceb1952bc02b17a0d5c3e5f\">GLFWcharfun</a>&#160;</td>\n          <td class=\"paramname\"><em>callback</em>&#160;</td>\n        </tr>\n        <tr>\n          <td></td>\n          <td>)</td>\n          <td></td><td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function sets the character callback of the specified window, which is called when a Unicode character is input.</p>\n<p>The character callback is intended for Unicode text input. As it deals with characters, it is keyboard layout dependent, whereas the <a class=\"el\" href=\"group__input.html#ga1caf18159767e761185e49a3be019f8d\">key callback</a> is not. Characters do not map 1:1 to physical keys, as a key may produce zero, one or more characters. If you want to know whether a specific physical key was pressed or released, see the key callback instead.</p>\n<p>The character callback behaves as system text input normally does and will not be called if modifier keys are held down that would prevent normal text input on that platform, for example a Super (Command) key on macOS or Alt key on Windows.</p>\n<dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">window</td><td>The window whose callback to set. </td></tr>\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">callback</td><td>The new callback, or <code>NULL</code> to remove the currently set callback. </td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section return\"><dt>Returns</dt><dd>The previously set callback, or <code>NULL</code> if no callback was set or the library had not been <a class=\"el\" href=\"intro_guide.html#intro_init\">initialized</a>.</dd></dl>\n<dl class=\"section user\"><dt>Callback signature</dt><dd><div class=\"fragment\"><div class=\"line\"><span class=\"keywordtype\">void</span> function_name(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window, <span class=\"keywordtype\">unsigned</span> <span class=\"keywordtype\">int</span> codepoint)</div>\n</div><!-- fragment --> For more information about the callback parameters, see the <a class=\"el\" href=\"group__input.html#gabf24451c7ceb1952bc02b17a0d5c3e5f\">function pointer type</a>.</dd></dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a>.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"input_guide.html#input_char\">Text input</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 2.4. <b>GLFW 3:</b> Added window handle parameter and return value. </dd></dl>\n\n</div>\n</div>\n<a id=\"ga0b7f4ad13c2b17435ff13b6dcfb4e43c\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga0b7f4ad13c2b17435ff13b6dcfb4e43c\">&#9670;&nbsp;</a></span>glfwSetCharModsCallback()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\"><a class=\"el\" href=\"group__input.html#gae36fb6897d2b7df9b128900c8ce9c507\">GLFWcharmodsfun</a> glfwSetCharModsCallback </td>\n          <td>(</td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *&#160;</td>\n          <td class=\"paramname\"><em>window</em>, </td>\n        </tr>\n        <tr>\n          <td class=\"paramkey\"></td>\n          <td></td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__input.html#gae36fb6897d2b7df9b128900c8ce9c507\">GLFWcharmodsfun</a>&#160;</td>\n          <td class=\"paramname\"><em>callback</em>&#160;</td>\n        </tr>\n        <tr>\n          <td></td>\n          <td>)</td>\n          <td></td><td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function sets the character with modifiers callback of the specified window, which is called when a Unicode character is input regardless of what modifier keys are used.</p>\n<p>The character with modifiers callback is intended for implementing custom Unicode character input. For regular Unicode text input, see the <a class=\"el\" href=\"group__input.html#gab25c4a220fd8f5717718dbc487828996\">character callback</a>. Like the character callback, the character with modifiers callback deals with characters and is keyboard layout dependent. Characters do not map 1:1 to physical keys, as a key may produce zero, one or more characters. If you want to know whether a specific physical key was pressed or released, see the <a class=\"el\" href=\"group__input.html#ga1caf18159767e761185e49a3be019f8d\">key callback</a> instead.</p>\n<dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">window</td><td>The window whose callback to set. </td></tr>\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">callback</td><td>The new callback, or <code>NULL</code> to remove the currently set callback. </td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section return\"><dt>Returns</dt><dd>The previously set callback, or <code>NULL</code> if no callback was set or an <a class=\"el\" href=\"intro_guide.html#error_handling\">error</a> occurred.</dd></dl>\n<dl class=\"section user\"><dt>Callback signature</dt><dd><div class=\"fragment\"><div class=\"line\"><span class=\"keywordtype\">void</span> function_name(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window, <span class=\"keywordtype\">unsigned</span> <span class=\"keywordtype\">int</span> codepoint, <span class=\"keywordtype\">int</span> mods)</div>\n</div><!-- fragment --> For more information about the callback parameters, see the <a class=\"el\" href=\"group__input.html#gae36fb6897d2b7df9b128900c8ce9c507\">function pointer type</a>.</dd></dl>\n<dl class=\"deprecated\"><dt><b><a class=\"el\" href=\"deprecated.html#_deprecated000002\">Deprecated:</a></b></dt><dd>Scheduled for removal in version 4.0.</dd></dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a>.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"input_guide.html#input_char\">Text input</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.1. </dd></dl>\n\n</div>\n</div>\n<a id=\"ga6ab84420974d812bee700e45284a723c\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga6ab84420974d812bee700e45284a723c\">&#9670;&nbsp;</a></span>glfwSetMouseButtonCallback()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\"><a class=\"el\" href=\"group__input.html#ga39893a4a7e7c3239c98d29c9e084350c\">GLFWmousebuttonfun</a> glfwSetMouseButtonCallback </td>\n          <td>(</td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *&#160;</td>\n          <td class=\"paramname\"><em>window</em>, </td>\n        </tr>\n        <tr>\n          <td class=\"paramkey\"></td>\n          <td></td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__input.html#ga39893a4a7e7c3239c98d29c9e084350c\">GLFWmousebuttonfun</a>&#160;</td>\n          <td class=\"paramname\"><em>callback</em>&#160;</td>\n        </tr>\n        <tr>\n          <td></td>\n          <td>)</td>\n          <td></td><td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function sets the mouse button callback of the specified window, which is called when a mouse button is pressed or released.</p>\n<p>When a window loses input focus, it will generate synthetic mouse button release events for all pressed mouse buttons. You can tell these events from user-generated events by the fact that the synthetic ones are generated after the focus loss event has been processed, i.e. after the <a class=\"el\" href=\"group__window.html#gac2d83c4a10f071baf841f6730528e66c\">window focus callback</a> has been called.</p>\n<dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">window</td><td>The window whose callback to set. </td></tr>\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">callback</td><td>The new callback, or <code>NULL</code> to remove the currently set callback. </td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section return\"><dt>Returns</dt><dd>The previously set callback, or <code>NULL</code> if no callback was set or the library had not been <a class=\"el\" href=\"intro_guide.html#intro_init\">initialized</a>.</dd></dl>\n<dl class=\"section user\"><dt>Callback signature</dt><dd><div class=\"fragment\"><div class=\"line\"><span class=\"keywordtype\">void</span> function_name(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window, <span class=\"keywordtype\">int</span> button, <span class=\"keywordtype\">int</span> action, <span class=\"keywordtype\">int</span> mods)</div>\n</div><!-- fragment --> For more information about the callback parameters, see the <a class=\"el\" href=\"group__input.html#ga39893a4a7e7c3239c98d29c9e084350c\">function pointer type</a>.</dd></dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a>.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"input_guide.html#input_mouse_button\">Mouse button input</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 1.0. <b>GLFW 3:</b> Added window handle parameter and return value. </dd></dl>\n\n</div>\n</div>\n<a id=\"gac1f879ab7435d54d4d79bb469fe225d7\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gac1f879ab7435d54d4d79bb469fe225d7\">&#9670;&nbsp;</a></span>glfwSetCursorPosCallback()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\"><a class=\"el\" href=\"group__input.html#ga4cfad918fa836f09541e7b9acd36686c\">GLFWcursorposfun</a> glfwSetCursorPosCallback </td>\n          <td>(</td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *&#160;</td>\n          <td class=\"paramname\"><em>window</em>, </td>\n        </tr>\n        <tr>\n          <td class=\"paramkey\"></td>\n          <td></td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__input.html#ga4cfad918fa836f09541e7b9acd36686c\">GLFWcursorposfun</a>&#160;</td>\n          <td class=\"paramname\"><em>callback</em>&#160;</td>\n        </tr>\n        <tr>\n          <td></td>\n          <td>)</td>\n          <td></td><td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function sets the cursor position callback of the specified window, which is called when the cursor is moved. The callback is provided with the position, in screen coordinates, relative to the upper-left corner of the content area of the window.</p>\n<dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">window</td><td>The window whose callback to set. </td></tr>\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">callback</td><td>The new callback, or <code>NULL</code> to remove the currently set callback. </td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section return\"><dt>Returns</dt><dd>The previously set callback, or <code>NULL</code> if no callback was set or the library had not been <a class=\"el\" href=\"intro_guide.html#intro_init\">initialized</a>.</dd></dl>\n<dl class=\"section user\"><dt>Callback signature</dt><dd><div class=\"fragment\"><div class=\"line\"><span class=\"keywordtype\">void</span> function_name(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window, <span class=\"keywordtype\">double</span> xpos, <span class=\"keywordtype\">double</span> ypos);</div>\n</div><!-- fragment --> For more information about the callback parameters, see the <a class=\"el\" href=\"group__input.html#ga4cfad918fa836f09541e7b9acd36686c\">function pointer type</a>.</dd></dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a>.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"input_guide.html#cursor_pos\">Cursor position</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.0. Replaces <code>glfwSetMousePosCallback</code>. </dd></dl>\n\n</div>\n</div>\n<a id=\"gad27f8ad0142c038a281466c0966817d8\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gad27f8ad0142c038a281466c0966817d8\">&#9670;&nbsp;</a></span>glfwSetCursorEnterCallback()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\"><a class=\"el\" href=\"group__input.html#ga51ab436c41eeaed6db5a0c9403b1c840\">GLFWcursorenterfun</a> glfwSetCursorEnterCallback </td>\n          <td>(</td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *&#160;</td>\n          <td class=\"paramname\"><em>window</em>, </td>\n        </tr>\n        <tr>\n          <td class=\"paramkey\"></td>\n          <td></td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__input.html#ga51ab436c41eeaed6db5a0c9403b1c840\">GLFWcursorenterfun</a>&#160;</td>\n          <td class=\"paramname\"><em>callback</em>&#160;</td>\n        </tr>\n        <tr>\n          <td></td>\n          <td>)</td>\n          <td></td><td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function sets the cursor boundary crossing callback of the specified window, which is called when the cursor enters or leaves the content area of the window.</p>\n<dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">window</td><td>The window whose callback to set. </td></tr>\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">callback</td><td>The new callback, or <code>NULL</code> to remove the currently set callback. </td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section return\"><dt>Returns</dt><dd>The previously set callback, or <code>NULL</code> if no callback was set or the library had not been <a class=\"el\" href=\"intro_guide.html#intro_init\">initialized</a>.</dd></dl>\n<dl class=\"section user\"><dt>Callback signature</dt><dd><div class=\"fragment\"><div class=\"line\"><span class=\"keywordtype\">void</span> function_name(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window, <span class=\"keywordtype\">int</span> entered)</div>\n</div><!-- fragment --> For more information about the callback parameters, see the <a class=\"el\" href=\"group__input.html#ga51ab436c41eeaed6db5a0c9403b1c840\">function pointer type</a>.</dd></dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a>.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"input_guide.html#cursor_enter\">Cursor enter/leave events</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>\n\n</div>\n</div>\n<a id=\"ga571e45a030ae4061f746ed56cb76aede\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga571e45a030ae4061f746ed56cb76aede\">&#9670;&nbsp;</a></span>glfwSetScrollCallback()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\"><a class=\"el\" href=\"group__input.html#ga4687e2199c60a18a8dd1da532e6d75c9\">GLFWscrollfun</a> glfwSetScrollCallback </td>\n          <td>(</td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *&#160;</td>\n          <td class=\"paramname\"><em>window</em>, </td>\n        </tr>\n        <tr>\n          <td class=\"paramkey\"></td>\n          <td></td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__input.html#ga4687e2199c60a18a8dd1da532e6d75c9\">GLFWscrollfun</a>&#160;</td>\n          <td class=\"paramname\"><em>callback</em>&#160;</td>\n        </tr>\n        <tr>\n          <td></td>\n          <td>)</td>\n          <td></td><td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function sets the scroll callback of the specified window, which is called when a scrolling device is used, such as a mouse wheel or scrolling area of a touchpad.</p>\n<p>The scroll callback receives all scrolling input, like that from a mouse wheel or a touchpad scrolling area.</p>\n<dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">window</td><td>The window whose callback to set. </td></tr>\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">callback</td><td>The new scroll callback, or <code>NULL</code> to remove the currently set callback. </td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section return\"><dt>Returns</dt><dd>The previously set callback, or <code>NULL</code> if no callback was set or the library had not been <a class=\"el\" href=\"intro_guide.html#intro_init\">initialized</a>.</dd></dl>\n<dl class=\"section user\"><dt>Callback signature</dt><dd><div class=\"fragment\"><div class=\"line\"><span class=\"keywordtype\">void</span> function_name(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window, <span class=\"keywordtype\">double</span> xoffset, <span class=\"keywordtype\">double</span> yoffset)</div>\n</div><!-- fragment --> For more information about the callback parameters, see the <a class=\"el\" href=\"group__input.html#ga4687e2199c60a18a8dd1da532e6d75c9\">function pointer type</a>.</dd></dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a>.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"input_guide.html#scrolling\">Scroll input</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.0. Replaces <code>glfwSetMouseWheelCallback</code>. </dd></dl>\n\n</div>\n</div>\n<a id=\"gab773f0ee0a07cff77a210cea40bc1f6b\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gab773f0ee0a07cff77a210cea40bc1f6b\">&#9670;&nbsp;</a></span>glfwSetDropCallback()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\"><a class=\"el\" href=\"group__input.html#gafd0493dc32cd5ca5810e6148c0c026ea\">GLFWdropfun</a> glfwSetDropCallback </td>\n          <td>(</td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *&#160;</td>\n          <td class=\"paramname\"><em>window</em>, </td>\n        </tr>\n        <tr>\n          <td class=\"paramkey\"></td>\n          <td></td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__input.html#gafd0493dc32cd5ca5810e6148c0c026ea\">GLFWdropfun</a>&#160;</td>\n          <td class=\"paramname\"><em>callback</em>&#160;</td>\n        </tr>\n        <tr>\n          <td></td>\n          <td>)</td>\n          <td></td><td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function sets the path drop callback of the specified window, which is called when one or more dragged paths are dropped on the window.</p>\n<p>Because the path array and its strings may have been generated specifically for that event, they are not guaranteed to be valid after the callback has returned. If you wish to use them after the callback returns, you need to make a deep copy.</p>\n<dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">window</td><td>The window whose callback to set. </td></tr>\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">callback</td><td>The new file drop callback, or <code>NULL</code> to remove the currently set callback. </td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section return\"><dt>Returns</dt><dd>The previously set callback, or <code>NULL</code> if no callback was set or the library had not been <a class=\"el\" href=\"intro_guide.html#intro_init\">initialized</a>.</dd></dl>\n<dl class=\"section user\"><dt>Callback signature</dt><dd><div class=\"fragment\"><div class=\"line\"><span class=\"keywordtype\">void</span> function_name(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window, <span class=\"keywordtype\">int</span> path_count, <span class=\"keyword\">const</span> <span class=\"keywordtype\">char</span>* paths[])</div>\n</div><!-- fragment --> For more information about the callback parameters, see the <a class=\"el\" href=\"group__input.html#gafd0493dc32cd5ca5810e6148c0c026ea\">function pointer type</a>.</dd></dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a>.</dd></dl>\n<dl class=\"section remark\"><dt>Remarks</dt><dd><b>Wayland:</b> File drop is currently unimplemented.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"input_guide.html#path_drop\">Path drop input</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.1. </dd></dl>\n\n</div>\n</div>\n<a id=\"gaed0966cee139d815317f9ffcba64c9f1\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gaed0966cee139d815317f9ffcba64c9f1\">&#9670;&nbsp;</a></span>glfwJoystickPresent()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">int glfwJoystickPresent </td>\n          <td>(</td>\n          <td class=\"paramtype\">int&#160;</td>\n          <td class=\"paramname\"><em>jid</em></td><td>)</td>\n          <td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function returns whether the specified joystick is present.</p>\n<p>There is no need to call this function before other functions that accept a joystick ID, as they all check for presence before performing any other work.</p>\n<dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">jid</td><td>The <a class=\"el\" href=\"group__joysticks.html\">joystick</a> to query. </td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section return\"><dt>Returns</dt><dd><code>GLFW_TRUE</code> if the joystick is present, or <code>GLFW_FALSE</code> otherwise.</dd></dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a>, <a class=\"el\" href=\"group__errors.html#ga76f6bb9c4eea73db675f096b404593ce\">GLFW_INVALID_ENUM</a> and <a class=\"el\" href=\"group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1\">GLFW_PLATFORM_ERROR</a>.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"input_guide.html#joystick\">Joystick input</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.0. Replaces <code>glfwGetJoystickParam</code>. </dd></dl>\n\n</div>\n</div>\n<a id=\"gaa8806536731e92c061bc70bcff6edbd0\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gaa8806536731e92c061bc70bcff6edbd0\">&#9670;&nbsp;</a></span>glfwGetJoystickAxes()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">const float* glfwGetJoystickAxes </td>\n          <td>(</td>\n          <td class=\"paramtype\">int&#160;</td>\n          <td class=\"paramname\"><em>jid</em>, </td>\n        </tr>\n        <tr>\n          <td class=\"paramkey\"></td>\n          <td></td>\n          <td class=\"paramtype\">int *&#160;</td>\n          <td class=\"paramname\"><em>count</em>&#160;</td>\n        </tr>\n        <tr>\n          <td></td>\n          <td>)</td>\n          <td></td><td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function returns the values of all axes of the specified joystick. Each element in the array is a value between -1.0 and 1.0.</p>\n<p>If the specified joystick is not present this function will return <code>NULL</code> but will not generate an error. This can be used instead of first calling <a class=\"el\" href=\"group__input.html#gaed0966cee139d815317f9ffcba64c9f1\">glfwJoystickPresent</a>.</p>\n<dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">jid</td><td>The <a class=\"el\" href=\"group__joysticks.html\">joystick</a> to query. </td></tr>\n    <tr><td class=\"paramdir\">[out]</td><td class=\"paramname\">count</td><td>Where to store the number of axis values in the returned array. This is set to zero if the joystick is not present or an error occurred. </td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section return\"><dt>Returns</dt><dd>An array of axis values, or <code>NULL</code> if the joystick is not present or an <a class=\"el\" href=\"intro_guide.html#error_handling\">error</a> occurred.</dd></dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a>, <a class=\"el\" href=\"group__errors.html#ga76f6bb9c4eea73db675f096b404593ce\">GLFW_INVALID_ENUM</a> and <a class=\"el\" href=\"group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1\">GLFW_PLATFORM_ERROR</a>.</dd></dl>\n<dl class=\"section user\"><dt>Pointer lifetime</dt><dd>The returned array is allocated and freed by GLFW. You should not free it yourself. It is valid until the specified joystick is disconnected or the library is terminated.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"input_guide.html#joystick_axis\">Joystick axis states</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.0. Replaces <code>glfwGetJoystickPos</code>. </dd></dl>\n\n</div>\n</div>\n<a id=\"gadb3cbf44af90a1536f519659a53bddd6\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gadb3cbf44af90a1536f519659a53bddd6\">&#9670;&nbsp;</a></span>glfwGetJoystickButtons()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">const unsigned char* glfwGetJoystickButtons </td>\n          <td>(</td>\n          <td class=\"paramtype\">int&#160;</td>\n          <td class=\"paramname\"><em>jid</em>, </td>\n        </tr>\n        <tr>\n          <td class=\"paramkey\"></td>\n          <td></td>\n          <td class=\"paramtype\">int *&#160;</td>\n          <td class=\"paramname\"><em>count</em>&#160;</td>\n        </tr>\n        <tr>\n          <td></td>\n          <td>)</td>\n          <td></td><td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function returns the state of all buttons of the specified joystick. Each element in the array is either <code>GLFW_PRESS</code> or <code>GLFW_RELEASE</code>.</p>\n<p>For backward compatibility with earlier versions that did not have <a class=\"el\" href=\"group__input.html#ga2d8d0634bb81c180899aeb07477a67ea\">glfwGetJoystickHats</a>, the button array also includes all hats, each represented as four buttons. The hats are in the same order as returned by <b>glfwGetJoystickHats</b> and are in the order <em>up</em>, <em>right</em>, <em>down</em> and <em>left</em>. To disable these extra buttons, set the <a class=\"el\" href=\"intro_guide.html#GLFW_JOYSTICK_HAT_BUTTONS\">GLFW_JOYSTICK_HAT_BUTTONS</a> init hint before initialization.</p>\n<p>If the specified joystick is not present this function will return <code>NULL</code> but will not generate an error. This can be used instead of first calling <a class=\"el\" href=\"group__input.html#gaed0966cee139d815317f9ffcba64c9f1\">glfwJoystickPresent</a>.</p>\n<dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">jid</td><td>The <a class=\"el\" href=\"group__joysticks.html\">joystick</a> to query. </td></tr>\n    <tr><td class=\"paramdir\">[out]</td><td class=\"paramname\">count</td><td>Where to store the number of button states in the returned array. This is set to zero if the joystick is not present or an error occurred. </td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section return\"><dt>Returns</dt><dd>An array of button states, or <code>NULL</code> if the joystick is not present or an <a class=\"el\" href=\"intro_guide.html#error_handling\">error</a> occurred.</dd></dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a>, <a class=\"el\" href=\"group__errors.html#ga76f6bb9c4eea73db675f096b404593ce\">GLFW_INVALID_ENUM</a> and <a class=\"el\" href=\"group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1\">GLFW_PLATFORM_ERROR</a>.</dd></dl>\n<dl class=\"section user\"><dt>Pointer lifetime</dt><dd>The returned array is allocated and freed by GLFW. You should not free it yourself. It is valid until the specified joystick is disconnected or the library is terminated.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"input_guide.html#joystick_button\">Joystick button states</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 2.2. <b>GLFW 3:</b> Changed to return a dynamic array. </dd></dl>\n\n</div>\n</div>\n<a id=\"ga2d8d0634bb81c180899aeb07477a67ea\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga2d8d0634bb81c180899aeb07477a67ea\">&#9670;&nbsp;</a></span>glfwGetJoystickHats()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">const unsigned char* glfwGetJoystickHats </td>\n          <td>(</td>\n          <td class=\"paramtype\">int&#160;</td>\n          <td class=\"paramname\"><em>jid</em>, </td>\n        </tr>\n        <tr>\n          <td class=\"paramkey\"></td>\n          <td></td>\n          <td class=\"paramtype\">int *&#160;</td>\n          <td class=\"paramname\"><em>count</em>&#160;</td>\n        </tr>\n        <tr>\n          <td></td>\n          <td>)</td>\n          <td></td><td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function returns the state of all hats of the specified joystick. Each element in the array is one of the following values:</p>\n<table class=\"markdownTable\">\n<tr class=\"markdownTableHead\">\n<th class=\"markdownTableHeadNone\">Name  </th><th class=\"markdownTableHeadNone\">Value   </th></tr>\n<tr class=\"markdownTableRowOdd\">\n<td class=\"markdownTableBodyNone\"><code>GLFW_HAT_CENTERED</code>  </td><td class=\"markdownTableBodyNone\">0   </td></tr>\n<tr class=\"markdownTableRowEven\">\n<td class=\"markdownTableBodyNone\"><code>GLFW_HAT_UP</code>  </td><td class=\"markdownTableBodyNone\">1   </td></tr>\n<tr class=\"markdownTableRowOdd\">\n<td class=\"markdownTableBodyNone\"><code>GLFW_HAT_RIGHT</code>  </td><td class=\"markdownTableBodyNone\">2   </td></tr>\n<tr class=\"markdownTableRowEven\">\n<td class=\"markdownTableBodyNone\"><code>GLFW_HAT_DOWN</code>  </td><td class=\"markdownTableBodyNone\">4   </td></tr>\n<tr class=\"markdownTableRowOdd\">\n<td class=\"markdownTableBodyNone\"><code>GLFW_HAT_LEFT</code>  </td><td class=\"markdownTableBodyNone\">8   </td></tr>\n<tr class=\"markdownTableRowEven\">\n<td class=\"markdownTableBodyNone\"><code>GLFW_HAT_RIGHT_UP</code>  </td><td class=\"markdownTableBodyNone\"><code>GLFW_HAT_RIGHT</code> | <code>GLFW_HAT_UP</code>   </td></tr>\n<tr class=\"markdownTableRowOdd\">\n<td class=\"markdownTableBodyNone\"><code>GLFW_HAT_RIGHT_DOWN</code>  </td><td class=\"markdownTableBodyNone\"><code>GLFW_HAT_RIGHT</code> | <code>GLFW_HAT_DOWN</code>   </td></tr>\n<tr class=\"markdownTableRowEven\">\n<td class=\"markdownTableBodyNone\"><code>GLFW_HAT_LEFT_UP</code>  </td><td class=\"markdownTableBodyNone\"><code>GLFW_HAT_LEFT</code> | <code>GLFW_HAT_UP</code>   </td></tr>\n<tr class=\"markdownTableRowOdd\">\n<td class=\"markdownTableBodyNone\"><code>GLFW_HAT_LEFT_DOWN</code>  </td><td class=\"markdownTableBodyNone\"><code>GLFW_HAT_LEFT</code> | <code>GLFW_HAT_DOWN</code>   </td></tr>\n</table>\n<p>The diagonal directions are bitwise combinations of the primary (up, right, down and left) directions and you can test for these individually by ANDing it with the corresponding direction.</p>\n<div class=\"fragment\"><div class=\"line\"><span class=\"keywordflow\">if</span> (hats[2] &amp; <a class=\"code\" href=\"group__hat__state.html#ga252586e3bbde75f4b0e07ad3124867f5\">GLFW_HAT_RIGHT</a>)</div>\n<div class=\"line\">{</div>\n<div class=\"line\">    <span class=\"comment\">// State of hat 2 could be right-up, right or right-down</span></div>\n<div class=\"line\">}</div>\n</div><!-- fragment --><p>If the specified joystick is not present this function will return <code>NULL</code> but will not generate an error. This can be used instead of first calling <a class=\"el\" href=\"group__input.html#gaed0966cee139d815317f9ffcba64c9f1\">glfwJoystickPresent</a>.</p>\n<dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">jid</td><td>The <a class=\"el\" href=\"group__joysticks.html\">joystick</a> to query. </td></tr>\n    <tr><td class=\"paramdir\">[out]</td><td class=\"paramname\">count</td><td>Where to store the number of hat states in the returned array. This is set to zero if the joystick is not present or an error occurred. </td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section return\"><dt>Returns</dt><dd>An array of hat states, or <code>NULL</code> if the joystick is not present or an <a class=\"el\" href=\"intro_guide.html#error_handling\">error</a> occurred.</dd></dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a>, <a class=\"el\" href=\"group__errors.html#ga76f6bb9c4eea73db675f096b404593ce\">GLFW_INVALID_ENUM</a> and <a class=\"el\" href=\"group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1\">GLFW_PLATFORM_ERROR</a>.</dd></dl>\n<dl class=\"section user\"><dt>Pointer lifetime</dt><dd>The returned array is allocated and freed by GLFW. You should not free it yourself. It is valid until the specified joystick is disconnected, this function is called again for that joystick or the library is terminated.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"input_guide.html#joystick_hat\">Joystick hat states</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.3. </dd></dl>\n\n</div>\n</div>\n<a id=\"gafbe3e51f670320908cfe4e20d3e5559e\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gafbe3e51f670320908cfe4e20d3e5559e\">&#9670;&nbsp;</a></span>glfwGetJoystickName()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">const char* glfwGetJoystickName </td>\n          <td>(</td>\n          <td class=\"paramtype\">int&#160;</td>\n          <td class=\"paramname\"><em>jid</em></td><td>)</td>\n          <td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function returns the name, encoded as UTF-8, of the specified joystick. The returned string is allocated and freed by GLFW. You should not free it yourself.</p>\n<p>If the specified joystick is not present this function will return <code>NULL</code> but will not generate an error. This can be used instead of first calling <a class=\"el\" href=\"group__input.html#gaed0966cee139d815317f9ffcba64c9f1\">glfwJoystickPresent</a>.</p>\n<dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">jid</td><td>The <a class=\"el\" href=\"group__joysticks.html\">joystick</a> to query. </td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section return\"><dt>Returns</dt><dd>The UTF-8 encoded name of the joystick, or <code>NULL</code> if the joystick is not present or an <a class=\"el\" href=\"intro_guide.html#error_handling\">error</a> occurred.</dd></dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a>, <a class=\"el\" href=\"group__errors.html#ga76f6bb9c4eea73db675f096b404593ce\">GLFW_INVALID_ENUM</a> and <a class=\"el\" href=\"group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1\">GLFW_PLATFORM_ERROR</a>.</dd></dl>\n<dl class=\"section user\"><dt>Pointer lifetime</dt><dd>The returned string is allocated and freed by GLFW. You should not free it yourself. It is valid until the specified joystick is disconnected or the library is terminated.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"input_guide.html#joystick_name\">Joystick name</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>\n\n</div>\n</div>\n<a id=\"gae168c2c0b8cf2a1cb67c6b3c00bdd543\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gae168c2c0b8cf2a1cb67c6b3c00bdd543\">&#9670;&nbsp;</a></span>glfwGetJoystickGUID()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">const char* glfwGetJoystickGUID </td>\n          <td>(</td>\n          <td class=\"paramtype\">int&#160;</td>\n          <td class=\"paramname\"><em>jid</em></td><td>)</td>\n          <td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function returns the SDL compatible GUID, as a UTF-8 encoded hexadecimal string, of the specified joystick. The returned string is allocated and freed by GLFW. You should not free it yourself.</p>\n<p>The GUID is what connects a joystick to a gamepad mapping. A connected joystick will always have a GUID even if there is no gamepad mapping assigned to it.</p>\n<p>If the specified joystick is not present this function will return <code>NULL</code> but will not generate an error. This can be used instead of first calling <a class=\"el\" href=\"group__input.html#gaed0966cee139d815317f9ffcba64c9f1\">glfwJoystickPresent</a>.</p>\n<p>The GUID uses the format introduced in SDL 2.0.5. This GUID tries to uniquely identify the make and model of a joystick but does not identify a specific unit, e.g. all wired Xbox 360 controllers will have the same GUID on that platform. The GUID for a unit may vary between platforms depending on what hardware information the platform specific APIs provide.</p>\n<dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">jid</td><td>The <a class=\"el\" href=\"group__joysticks.html\">joystick</a> to query. </td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section return\"><dt>Returns</dt><dd>The UTF-8 encoded GUID of the joystick, or <code>NULL</code> if the joystick is not present or an <a class=\"el\" href=\"intro_guide.html#error_handling\">error</a> occurred.</dd></dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a>, <a class=\"el\" href=\"group__errors.html#ga76f6bb9c4eea73db675f096b404593ce\">GLFW_INVALID_ENUM</a> and <a class=\"el\" href=\"group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1\">GLFW_PLATFORM_ERROR</a>.</dd></dl>\n<dl class=\"section user\"><dt>Pointer lifetime</dt><dd>The returned string is allocated and freed by GLFW. You should not free it yourself. It is valid until the specified joystick is disconnected or the library is terminated.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"input_guide.html#gamepad\">Gamepad input</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.3. </dd></dl>\n\n</div>\n</div>\n<a id=\"ga6b2f72d64d636b48a727b437cbb7489e\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga6b2f72d64d636b48a727b437cbb7489e\">&#9670;&nbsp;</a></span>glfwSetJoystickUserPointer()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">void glfwSetJoystickUserPointer </td>\n          <td>(</td>\n          <td class=\"paramtype\">int&#160;</td>\n          <td class=\"paramname\"><em>jid</em>, </td>\n        </tr>\n        <tr>\n          <td class=\"paramkey\"></td>\n          <td></td>\n          <td class=\"paramtype\">void *&#160;</td>\n          <td class=\"paramname\"><em>pointer</em>&#160;</td>\n        </tr>\n        <tr>\n          <td></td>\n          <td>)</td>\n          <td></td><td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function sets the user-defined pointer of the specified joystick. The current value is retained until the joystick is disconnected. The initial value is <code>NULL</code>.</p>\n<p>This function may be called from the joystick callback, even for a joystick that is being disconnected.</p>\n<dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">jid</td><td>The joystick whose pointer to set. </td></tr>\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">pointer</td><td>The new value.</td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a>.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function may be called from any thread. Access is not synchronized.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"input_guide.html#joystick_userptr\">Joystick user pointer</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__input.html#ga06290acb7ed23895bf26b8e981827ebd\">glfwGetJoystickUserPointer</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.3. </dd></dl>\n\n</div>\n</div>\n<a id=\"ga06290acb7ed23895bf26b8e981827ebd\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga06290acb7ed23895bf26b8e981827ebd\">&#9670;&nbsp;</a></span>glfwGetJoystickUserPointer()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">void* glfwGetJoystickUserPointer </td>\n          <td>(</td>\n          <td class=\"paramtype\">int&#160;</td>\n          <td class=\"paramname\"><em>jid</em></td><td>)</td>\n          <td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function returns the current value of the user-defined pointer of the specified joystick. The initial value is <code>NULL</code>.</p>\n<p>This function may be called from the joystick callback, even for a joystick that is being disconnected.</p>\n<dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">jid</td><td>The joystick whose pointer to return.</td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a>.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function may be called from any thread. Access is not synchronized.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"input_guide.html#joystick_userptr\">Joystick user pointer</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__input.html#ga6b2f72d64d636b48a727b437cbb7489e\">glfwSetJoystickUserPointer</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.3. </dd></dl>\n\n</div>\n</div>\n<a id=\"gad0f676860f329d80f7e47e9f06a96f00\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gad0f676860f329d80f7e47e9f06a96f00\">&#9670;&nbsp;</a></span>glfwJoystickIsGamepad()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">int glfwJoystickIsGamepad </td>\n          <td>(</td>\n          <td class=\"paramtype\">int&#160;</td>\n          <td class=\"paramname\"><em>jid</em></td><td>)</td>\n          <td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function returns whether the specified joystick is both present and has a gamepad mapping.</p>\n<p>If the specified joystick is present but does not have a gamepad mapping this function will return <code>GLFW_FALSE</code> but will not generate an error. Call <a class=\"el\" href=\"group__input.html#gaed0966cee139d815317f9ffcba64c9f1\">glfwJoystickPresent</a> to check if a joystick is present regardless of whether it has a mapping.</p>\n<dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">jid</td><td>The <a class=\"el\" href=\"group__joysticks.html\">joystick</a> to query. </td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section return\"><dt>Returns</dt><dd><code>GLFW_TRUE</code> if a joystick is both present and has a gamepad mapping, or <code>GLFW_FALSE</code> otherwise.</dd></dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a> and <a class=\"el\" href=\"group__errors.html#ga76f6bb9c4eea73db675f096b404593ce\">GLFW_INVALID_ENUM</a>.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"input_guide.html#gamepad\">Gamepad input</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__input.html#gadccddea8bce6113fa459de379ddaf051\">glfwGetGamepadState</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.3. </dd></dl>\n\n</div>\n</div>\n<a id=\"ga2f60a0e5b7bd8d1b7344dc0a7cb32b4c\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga2f60a0e5b7bd8d1b7344dc0a7cb32b4c\">&#9670;&nbsp;</a></span>glfwSetJoystickCallback()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\"><a class=\"el\" href=\"group__input.html#gaa67aa597e974298c748bfe4fb17d406d\">GLFWjoystickfun</a> glfwSetJoystickCallback </td>\n          <td>(</td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__input.html#gaa67aa597e974298c748bfe4fb17d406d\">GLFWjoystickfun</a>&#160;</td>\n          <td class=\"paramname\"><em>callback</em></td><td>)</td>\n          <td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function sets the joystick configuration callback, or removes the currently set callback. This is called when a joystick is connected to or disconnected from the system.</p>\n<p>For joystick connection and disconnection events to be delivered on all platforms, you need to call one of the <a class=\"el\" href=\"input_guide.html#events\">event processing</a> functions. Joystick disconnection may also be detected and the callback called by joystick functions. The function will then return whatever it returns if the joystick is not present.</p>\n<dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">callback</td><td>The new callback, or <code>NULL</code> to remove the currently set callback. </td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section return\"><dt>Returns</dt><dd>The previously set callback, or <code>NULL</code> if no callback was set or the library had not been <a class=\"el\" href=\"intro_guide.html#intro_init\">initialized</a>.</dd></dl>\n<dl class=\"section user\"><dt>Callback signature</dt><dd><div class=\"fragment\"><div class=\"line\"><span class=\"keywordtype\">void</span> function_name(<span class=\"keywordtype\">int</span> jid, <span class=\"keywordtype\">int</span> event)</div>\n</div><!-- fragment --> For more information about the callback parameters, see the <a class=\"el\" href=\"group__input.html#gaa67aa597e974298c748bfe4fb17d406d\">function pointer type</a>.</dd></dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a>.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"input_guide.html#joystick_event\">Joystick configuration changes</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.2. </dd></dl>\n\n</div>\n</div>\n<a id=\"gaed5104612f2fa8e66aa6e846652ad00f\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gaed5104612f2fa8e66aa6e846652ad00f\">&#9670;&nbsp;</a></span>glfwUpdateGamepadMappings()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">int glfwUpdateGamepadMappings </td>\n          <td>(</td>\n          <td class=\"paramtype\">const char *&#160;</td>\n          <td class=\"paramname\"><em>string</em></td><td>)</td>\n          <td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function parses the specified ASCII encoded string and updates the internal list with any gamepad mappings it finds. This string may contain either a single gamepad mapping or many mappings separated by newlines. The parser supports the full format of the <code>gamecontrollerdb.txt</code> source file including empty lines and comments.</p>\n<p>See <a class=\"el\" href=\"input_guide.html#gamepad_mapping\">Gamepad mappings</a> for a description of the format.</p>\n<p>If there is already a gamepad mapping for a given GUID in the internal list, it will be replaced by the one passed to this function. If the library is terminated and re-initialized the internal list will revert to the built-in default.</p>\n<dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">string</td><td>The string containing the gamepad mappings. </td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section return\"><dt>Returns</dt><dd><code>GLFW_TRUE</code> if successful, or <code>GLFW_FALSE</code> if an <a class=\"el\" href=\"intro_guide.html#error_handling\">error</a> occurred.</dd></dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a> and <a class=\"el\" href=\"group__errors.html#gaaf2ef9aa8202c2b82ac2d921e554c687\">GLFW_INVALID_VALUE</a>.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"input_guide.html#gamepad\">Gamepad input</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__input.html#gad0f676860f329d80f7e47e9f06a96f00\">glfwJoystickIsGamepad</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__input.html#ga5c71e3533b2d384db9317fcd7661b210\">glfwGetGamepadName</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.3. </dd></dl>\n\n</div>\n</div>\n<a id=\"ga5c71e3533b2d384db9317fcd7661b210\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga5c71e3533b2d384db9317fcd7661b210\">&#9670;&nbsp;</a></span>glfwGetGamepadName()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">const char* glfwGetGamepadName </td>\n          <td>(</td>\n          <td class=\"paramtype\">int&#160;</td>\n          <td class=\"paramname\"><em>jid</em></td><td>)</td>\n          <td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function returns the human-readable name of the gamepad from the gamepad mapping assigned to the specified joystick.</p>\n<p>If the specified joystick is not present or does not have a gamepad mapping this function will return <code>NULL</code> but will not generate an error. Call <a class=\"el\" href=\"group__input.html#gaed0966cee139d815317f9ffcba64c9f1\">glfwJoystickPresent</a> to check whether it is present regardless of whether it has a mapping.</p>\n<dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">jid</td><td>The <a class=\"el\" href=\"group__joysticks.html\">joystick</a> to query. </td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section return\"><dt>Returns</dt><dd>The UTF-8 encoded name of the gamepad, or <code>NULL</code> if the joystick is not present, does not have a mapping or an <a class=\"el\" href=\"intro_guide.html#error_handling\">error</a> occurred.</dd></dl>\n<dl class=\"section user\"><dt>Pointer lifetime</dt><dd>The returned string is allocated and freed by GLFW. You should not free it yourself. It is valid until the specified joystick is disconnected, the gamepad mappings are updated or the library is terminated.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"input_guide.html#gamepad\">Gamepad input</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__input.html#gad0f676860f329d80f7e47e9f06a96f00\">glfwJoystickIsGamepad</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.3. </dd></dl>\n\n</div>\n</div>\n<a id=\"gadccddea8bce6113fa459de379ddaf051\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gadccddea8bce6113fa459de379ddaf051\">&#9670;&nbsp;</a></span>glfwGetGamepadState()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">int glfwGetGamepadState </td>\n          <td>(</td>\n          <td class=\"paramtype\">int&#160;</td>\n          <td class=\"paramname\"><em>jid</em>, </td>\n        </tr>\n        <tr>\n          <td class=\"paramkey\"></td>\n          <td></td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"structGLFWgamepadstate.html\">GLFWgamepadstate</a> *&#160;</td>\n          <td class=\"paramname\"><em>state</em>&#160;</td>\n        </tr>\n        <tr>\n          <td></td>\n          <td>)</td>\n          <td></td><td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function retrieves the state of the specified joystick remapped to an Xbox-like gamepad.</p>\n<p>If the specified joystick is not present or does not have a gamepad mapping this function will return <code>GLFW_FALSE</code> but will not generate an error. Call <a class=\"el\" href=\"group__input.html#gaed0966cee139d815317f9ffcba64c9f1\">glfwJoystickPresent</a> to check whether it is present regardless of whether it has a mapping.</p>\n<p>The Guide button may not be available for input as it is often hooked by the system or the Steam client.</p>\n<p>Not all devices have all the buttons or axes provided by <a class=\"el\" href=\"structGLFWgamepadstate.html\">GLFWgamepadstate</a>. Unavailable buttons and axes will always report <code>GLFW_RELEASE</code> and 0.0 respectively.</p>\n<dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">jid</td><td>The <a class=\"el\" href=\"group__joysticks.html\">joystick</a> to query. </td></tr>\n    <tr><td class=\"paramdir\">[out]</td><td class=\"paramname\">state</td><td>The gamepad input state of the joystick. </td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section return\"><dt>Returns</dt><dd><code>GLFW_TRUE</code> if successful, or <code>GLFW_FALSE</code> if no joystick is connected, it has no gamepad mapping or an <a class=\"el\" href=\"intro_guide.html#error_handling\">error</a> occurred.</dd></dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a> and <a class=\"el\" href=\"group__errors.html#ga76f6bb9c4eea73db675f096b404593ce\">GLFW_INVALID_ENUM</a>.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"input_guide.html#gamepad\">Gamepad input</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__input.html#gaed5104612f2fa8e66aa6e846652ad00f\">glfwUpdateGamepadMappings</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__input.html#gad0f676860f329d80f7e47e9f06a96f00\">glfwJoystickIsGamepad</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.3. </dd></dl>\n\n</div>\n</div>\n<a id=\"gaba1f022c5eb07dfac421df34cdcd31dd\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gaba1f022c5eb07dfac421df34cdcd31dd\">&#9670;&nbsp;</a></span>glfwSetClipboardString()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">void glfwSetClipboardString </td>\n          <td>(</td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *&#160;</td>\n          <td class=\"paramname\"><em>window</em>, </td>\n        </tr>\n        <tr>\n          <td class=\"paramkey\"></td>\n          <td></td>\n          <td class=\"paramtype\">const char *&#160;</td>\n          <td class=\"paramname\"><em>string</em>&#160;</td>\n        </tr>\n        <tr>\n          <td></td>\n          <td>)</td>\n          <td></td><td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function sets the system clipboard to the specified, UTF-8 encoded string.</p>\n<dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">window</td><td>Deprecated. Any valid window or <code>NULL</code>. </td></tr>\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">string</td><td>A UTF-8 encoded string.</td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a> and <a class=\"el\" href=\"group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1\">GLFW_PLATFORM_ERROR</a>.</dd></dl>\n<dl class=\"section user\"><dt>Pointer lifetime</dt><dd>The specified string is copied before this function returns.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"input_guide.html#clipboard\">Clipboard input and output</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__input.html#ga5aba1d704d9ab539282b1fbe9f18bb94\">glfwGetClipboardString</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>\n\n</div>\n</div>\n<a id=\"ga5aba1d704d9ab539282b1fbe9f18bb94\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga5aba1d704d9ab539282b1fbe9f18bb94\">&#9670;&nbsp;</a></span>glfwGetClipboardString()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">const char* glfwGetClipboardString </td>\n          <td>(</td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *&#160;</td>\n          <td class=\"paramname\"><em>window</em></td><td>)</td>\n          <td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function returns the contents of the system clipboard, if it contains or is convertible to a UTF-8 encoded string. If the clipboard is empty or if its contents cannot be converted, <code>NULL</code> is returned and a <a class=\"el\" href=\"group__errors.html#ga196e125ef261d94184e2b55c05762f14\">GLFW_FORMAT_UNAVAILABLE</a> error is generated.</p>\n<dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">window</td><td>Deprecated. Any valid window or <code>NULL</code>. </td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section return\"><dt>Returns</dt><dd>The contents of the clipboard as a UTF-8 encoded string, or <code>NULL</code> if an <a class=\"el\" href=\"intro_guide.html#error_handling\">error</a> occurred.</dd></dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a> and <a class=\"el\" href=\"group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1\">GLFW_PLATFORM_ERROR</a>.</dd></dl>\n<dl class=\"section user\"><dt>Pointer lifetime</dt><dd>The returned string is allocated and freed by GLFW. You should not free it yourself. It is valid until the next call to <a class=\"el\" href=\"group__input.html#ga5aba1d704d9ab539282b1fbe9f18bb94\">glfwGetClipboardString</a> or <a class=\"el\" href=\"group__input.html#gaba1f022c5eb07dfac421df34cdcd31dd\">glfwSetClipboardString</a>, or until the library is terminated.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"input_guide.html#clipboard\">Clipboard input and output</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__input.html#gaba1f022c5eb07dfac421df34cdcd31dd\">glfwSetClipboardString</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>\n\n</div>\n</div>\n<a id=\"gaa6cf4e7a77158a3b8fd00328b1720a4a\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gaa6cf4e7a77158a3b8fd00328b1720a4a\">&#9670;&nbsp;</a></span>glfwGetTime()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">double glfwGetTime </td>\n          <td>(</td>\n          <td class=\"paramtype\">void&#160;</td>\n          <td class=\"paramname\"></td><td>)</td>\n          <td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function returns the current GLFW time, in seconds. Unless the time has been set using <a class=\"el\" href=\"group__input.html#gaf59589ef6e8b8c8b5ad184b25afd4dc0\">glfwSetTime</a> it measures time elapsed since GLFW was initialized.</p>\n<p>This function and <a class=\"el\" href=\"group__input.html#gaf59589ef6e8b8c8b5ad184b25afd4dc0\">glfwSetTime</a> are helper functions on top of <a class=\"el\" href=\"group__input.html#ga3289ee876572f6e91f06df3a24824443\">glfwGetTimerFrequency</a> and <a class=\"el\" href=\"group__input.html#ga09b2bd37d328e0b9456c7ec575cc26aa\">glfwGetTimerValue</a>.</p>\n<p>The resolution of the timer is system dependent, but is usually on the order of a few micro- or nanoseconds. It uses the highest-resolution monotonic time source on each supported platform.</p>\n<dl class=\"section return\"><dt>Returns</dt><dd>The current time, in seconds, or zero if an <a class=\"el\" href=\"intro_guide.html#error_handling\">error</a> occurred.</dd></dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a>.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function may be called from any thread. Reading and writing of the internal base time is not atomic, so it needs to be externally synchronized with calls to <a class=\"el\" href=\"group__input.html#gaf59589ef6e8b8c8b5ad184b25afd4dc0\">glfwSetTime</a>.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"input_guide.html#time\">Time input</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 1.0. </dd></dl>\n\n</div>\n</div>\n<a id=\"gaf59589ef6e8b8c8b5ad184b25afd4dc0\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gaf59589ef6e8b8c8b5ad184b25afd4dc0\">&#9670;&nbsp;</a></span>glfwSetTime()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">void glfwSetTime </td>\n          <td>(</td>\n          <td class=\"paramtype\">double&#160;</td>\n          <td class=\"paramname\"><em>time</em></td><td>)</td>\n          <td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function sets the current GLFW time, in seconds. The value must be a positive finite number less than or equal to 18446744073.0, which is approximately 584.5 years.</p>\n<p>This function and <a class=\"el\" href=\"group__input.html#gaa6cf4e7a77158a3b8fd00328b1720a4a\">glfwGetTime</a> are helper functions on top of <a class=\"el\" href=\"group__input.html#ga3289ee876572f6e91f06df3a24824443\">glfwGetTimerFrequency</a> and <a class=\"el\" href=\"group__input.html#ga09b2bd37d328e0b9456c7ec575cc26aa\">glfwGetTimerValue</a>.</p>\n<dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">time</td><td>The new value, in seconds.</td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a> and <a class=\"el\" href=\"group__errors.html#gaaf2ef9aa8202c2b82ac2d921e554c687\">GLFW_INVALID_VALUE</a>.</dd></dl>\n<dl class=\"section remark\"><dt>Remarks</dt><dd>The upper limit of GLFW time is calculated as floor((2<sup>64</sup> - 1) / 10<sup>9</sup>) and is due to implementations storing nanoseconds in 64 bits. The limit may be increased in the future.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function may be called from any thread. Reading and writing of the internal base time is not atomic, so it needs to be externally synchronized with calls to <a class=\"el\" href=\"group__input.html#gaa6cf4e7a77158a3b8fd00328b1720a4a\">glfwGetTime</a>.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"input_guide.html#time\">Time input</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 2.2. </dd></dl>\n\n</div>\n</div>\n<a id=\"ga09b2bd37d328e0b9456c7ec575cc26aa\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga09b2bd37d328e0b9456c7ec575cc26aa\">&#9670;&nbsp;</a></span>glfwGetTimerValue()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">uint64_t glfwGetTimerValue </td>\n          <td>(</td>\n          <td class=\"paramtype\">void&#160;</td>\n          <td class=\"paramname\"></td><td>)</td>\n          <td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function returns the current value of the raw timer, measured in 1&#160;/&#160;frequency seconds. To get the frequency, call <a class=\"el\" href=\"group__input.html#ga3289ee876572f6e91f06df3a24824443\">glfwGetTimerFrequency</a>.</p>\n<dl class=\"section return\"><dt>Returns</dt><dd>The value of the timer, or zero if an <a class=\"el\" href=\"intro_guide.html#error_handling\">error</a> occurred.</dd></dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a>.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function may be called from any thread.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"input_guide.html#time\">Time input</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__input.html#ga3289ee876572f6e91f06df3a24824443\">glfwGetTimerFrequency</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.2. </dd></dl>\n\n</div>\n</div>\n<a id=\"ga3289ee876572f6e91f06df3a24824443\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga3289ee876572f6e91f06df3a24824443\">&#9670;&nbsp;</a></span>glfwGetTimerFrequency()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">uint64_t glfwGetTimerFrequency </td>\n          <td>(</td>\n          <td class=\"paramtype\">void&#160;</td>\n          <td class=\"paramname\"></td><td>)</td>\n          <td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function returns the frequency, in Hz, of the raw timer.</p>\n<dl class=\"section return\"><dt>Returns</dt><dd>The frequency of the timer, in Hz, or zero if an <a class=\"el\" href=\"intro_guide.html#error_handling\">error</a> occurred.</dd></dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a>.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function may be called from any thread.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"input_guide.html#time\">Time input</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__input.html#ga09b2bd37d328e0b9456c7ec575cc26aa\">glfwGetTimerValue</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.2. </dd></dl>\n\n</div>\n</div>\n</div><!-- contents -->\n<div class=\"ttc\" id=\"agroup__window_html_ga3c96d80d363e67d13a41b5d1821f3242\"><div class=\"ttname\"><a href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a></div><div class=\"ttdeci\">struct GLFWwindow GLFWwindow</div><div class=\"ttdoc\">Opaque window object.</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:1152</div></div>\n<div class=\"ttc\" id=\"agroup__hat__state_html_ga252586e3bbde75f4b0e07ad3124867f5\"><div class=\"ttname\"><a href=\"group__hat__state.html#ga252586e3bbde75f4b0e07ad3124867f5\">GLFW_HAT_RIGHT</a></div><div class=\"ttdeci\">#define GLFW_HAT_RIGHT</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:325</div></div>\n<address class=\"footer\">\n<p>\nLast update on Mon Jan 20 2020 for GLFW 3.3.2\n</p>\n</address>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/group__joysticks.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta http-equiv=\"X-UA-Compatible\" content=\"IE=9\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<title>GLFW: Joysticks</title>\n<link href=\"tabs.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"jquery.js\"></script>\n<script type=\"text/javascript\" src=\"dynsections.js\"></script>\n<link href=\"search/search.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"search/searchdata.js\"></script>\n<script type=\"text/javascript\" src=\"search/search.js\"></script>\n<link href=\"doxygen.css\" rel=\"stylesheet\" type=\"text/css\" />\n<link href=\"extra.css\" rel=\"stylesheet\" type=\"text/css\"/>\n</head>\n<body>\n<div id=\"top\"><!-- do not remove this div, it is closed by doxygen! -->\n<div id=\"titlearea\">\n\t<div class=\"glfwheader\">\n\t\t<a href=\"https://www.glfw.org/\" id=\"glfwhome\">GLFW</a>\n\t\t<ul class=\"glfwnavbar\">\n\t\t\t<li><a href=\"https://www.glfw.org/documentation.html\">Documentation</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/download.html\">Download</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/community.html\">Community</a></li>\n\t\t</ul>\n\t</div>\n</div>\n<!-- end header part -->\n<!-- Generated by Doxygen 1.8.16 -->\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\nvar searchBox = new SearchBox(\"searchBox\", \"search\",false,'Search');\n/* @license-end */\n</script>\n<script type=\"text/javascript\" src=\"menudata.js\"></script>\n<script type=\"text/javascript\" src=\"menu.js\"></script>\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\n$(function() {\n  initMenu('',true,false,'search.php','Search');\n  $(document).ready(function() { init_search(); });\n});\n/* @license-end */</script>\n<div id=\"main-nav\"></div>\n</div><!-- top -->\n<!-- window showing the filter options -->\n<div id=\"MSearchSelectWindow\"\n     onmouseover=\"return searchBox.OnSearchSelectShow()\"\n     onmouseout=\"return searchBox.OnSearchSelectHide()\"\n     onkeydown=\"return searchBox.OnSearchSelectKey(event)\">\n</div>\n\n<!-- iframe showing the search results (closed by default) -->\n<div id=\"MSearchResultsWindow\">\n<iframe src=\"javascript:void(0)\" frameborder=\"0\" \n        name=\"MSearchResults\" id=\"MSearchResults\">\n</iframe>\n</div>\n\n<div class=\"header\">\n  <div class=\"summary\">\n<a href=\"#define-members\">Macros</a>  </div>\n  <div class=\"headertitle\">\n<div class=\"title\">Joysticks<div class=\"ingroups\"><a class=\"el\" href=\"group__input.html\">Input reference</a></div></div>  </div>\n</div><!--header-->\n<div class=\"contents\">\n<a name=\"details\" id=\"details\"></a><h2 class=\"groupheader\">Description</h2>\n<p>See <a class=\"el\" href=\"input_guide.html#joystick\">joystick input</a> for how these are used. </p>\n<table class=\"memberdecls\">\n<tr class=\"heading\"><td colspan=\"2\"><h2 class=\"groupheader\"><a name=\"define-members\"></a>\nMacros</h2></td></tr>\n<tr class=\"memitem:ga34a0443d059e9f22272cd4669073f73d\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__joysticks.html#ga34a0443d059e9f22272cd4669073f73d\">GLFW_JOYSTICK_1</a>&#160;&#160;&#160;0</td></tr>\n<tr class=\"separator:ga34a0443d059e9f22272cd4669073f73d\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga6eab65ec88e65e0850ef8413504cb50c\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__joysticks.html#ga6eab65ec88e65e0850ef8413504cb50c\">GLFW_JOYSTICK_2</a>&#160;&#160;&#160;1</td></tr>\n<tr class=\"separator:ga6eab65ec88e65e0850ef8413504cb50c\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gae6f3eedfeb42424c2f5e3161efb0b654\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__joysticks.html#gae6f3eedfeb42424c2f5e3161efb0b654\">GLFW_JOYSTICK_3</a>&#160;&#160;&#160;2</td></tr>\n<tr class=\"separator:gae6f3eedfeb42424c2f5e3161efb0b654\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga97ddbcad02b7f48d74fad4ddb08fff59\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__joysticks.html#ga97ddbcad02b7f48d74fad4ddb08fff59\">GLFW_JOYSTICK_4</a>&#160;&#160;&#160;3</td></tr>\n<tr class=\"separator:ga97ddbcad02b7f48d74fad4ddb08fff59\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gae43281bc66d3fa5089fb50c3e7a28695\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__joysticks.html#gae43281bc66d3fa5089fb50c3e7a28695\">GLFW_JOYSTICK_5</a>&#160;&#160;&#160;4</td></tr>\n<tr class=\"separator:gae43281bc66d3fa5089fb50c3e7a28695\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga74771620aa53bd68a487186dea66fd77\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__joysticks.html#ga74771620aa53bd68a487186dea66fd77\">GLFW_JOYSTICK_6</a>&#160;&#160;&#160;5</td></tr>\n<tr class=\"separator:ga74771620aa53bd68a487186dea66fd77\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga20a9f4f3aaefed9ea5e66072fc588b87\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__joysticks.html#ga20a9f4f3aaefed9ea5e66072fc588b87\">GLFW_JOYSTICK_7</a>&#160;&#160;&#160;6</td></tr>\n<tr class=\"separator:ga20a9f4f3aaefed9ea5e66072fc588b87\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga21a934c940bcf25db0e4c8fe9b364bdb\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__joysticks.html#ga21a934c940bcf25db0e4c8fe9b364bdb\">GLFW_JOYSTICK_8</a>&#160;&#160;&#160;7</td></tr>\n<tr class=\"separator:ga21a934c940bcf25db0e4c8fe9b364bdb\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga87689d47df0ba6f9f5fcbbcaf7b3cecf\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__joysticks.html#ga87689d47df0ba6f9f5fcbbcaf7b3cecf\">GLFW_JOYSTICK_9</a>&#160;&#160;&#160;8</td></tr>\n<tr class=\"separator:ga87689d47df0ba6f9f5fcbbcaf7b3cecf\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gaef55389ee605d6dfc31aef6fe98c54ec\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__joysticks.html#gaef55389ee605d6dfc31aef6fe98c54ec\">GLFW_JOYSTICK_10</a>&#160;&#160;&#160;9</td></tr>\n<tr class=\"separator:gaef55389ee605d6dfc31aef6fe98c54ec\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gae7d26e3df447c2c14a569fcc18516af4\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__joysticks.html#gae7d26e3df447c2c14a569fcc18516af4\">GLFW_JOYSTICK_11</a>&#160;&#160;&#160;10</td></tr>\n<tr class=\"separator:gae7d26e3df447c2c14a569fcc18516af4\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gab91bbf5b7ca6be8d3ac5c4d89ff48ac7\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__joysticks.html#gab91bbf5b7ca6be8d3ac5c4d89ff48ac7\">GLFW_JOYSTICK_12</a>&#160;&#160;&#160;11</td></tr>\n<tr class=\"separator:gab91bbf5b7ca6be8d3ac5c4d89ff48ac7\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga5c84fb4e49bf661d7d7c78eb4018c508\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__joysticks.html#ga5c84fb4e49bf661d7d7c78eb4018c508\">GLFW_JOYSTICK_13</a>&#160;&#160;&#160;12</td></tr>\n<tr class=\"separator:ga5c84fb4e49bf661d7d7c78eb4018c508\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga89540873278ae5a42b3e70d64164dc74\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__joysticks.html#ga89540873278ae5a42b3e70d64164dc74\">GLFW_JOYSTICK_14</a>&#160;&#160;&#160;13</td></tr>\n<tr class=\"separator:ga89540873278ae5a42b3e70d64164dc74\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga7b02ab70daf7a78bcc942d5d4cc1dcf9\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__joysticks.html#ga7b02ab70daf7a78bcc942d5d4cc1dcf9\">GLFW_JOYSTICK_15</a>&#160;&#160;&#160;14</td></tr>\n<tr class=\"separator:ga7b02ab70daf7a78bcc942d5d4cc1dcf9\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga453edeeabf350827646b6857df4f80ce\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__joysticks.html#ga453edeeabf350827646b6857df4f80ce\">GLFW_JOYSTICK_16</a>&#160;&#160;&#160;15</td></tr>\n<tr class=\"separator:ga453edeeabf350827646b6857df4f80ce\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga9ca13ebf24c331dd98df17d84a4b72c9\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__joysticks.html#ga9ca13ebf24c331dd98df17d84a4b72c9\">GLFW_JOYSTICK_LAST</a>&#160;&#160;&#160;<a class=\"el\" href=\"group__joysticks.html#ga453edeeabf350827646b6857df4f80ce\">GLFW_JOYSTICK_16</a></td></tr>\n<tr class=\"separator:ga9ca13ebf24c331dd98df17d84a4b72c9\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n</table>\n<h2 class=\"groupheader\">Macro Definition Documentation</h2>\n<a id=\"ga34a0443d059e9f22272cd4669073f73d\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga34a0443d059e9f22272cd4669073f73d\">&#9670;&nbsp;</a></span>GLFW_JOYSTICK_1</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_JOYSTICK_1&#160;&#160;&#160;0</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"ga6eab65ec88e65e0850ef8413504cb50c\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga6eab65ec88e65e0850ef8413504cb50c\">&#9670;&nbsp;</a></span>GLFW_JOYSTICK_2</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_JOYSTICK_2&#160;&#160;&#160;1</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"gae6f3eedfeb42424c2f5e3161efb0b654\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gae6f3eedfeb42424c2f5e3161efb0b654\">&#9670;&nbsp;</a></span>GLFW_JOYSTICK_3</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_JOYSTICK_3&#160;&#160;&#160;2</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"ga97ddbcad02b7f48d74fad4ddb08fff59\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga97ddbcad02b7f48d74fad4ddb08fff59\">&#9670;&nbsp;</a></span>GLFW_JOYSTICK_4</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_JOYSTICK_4&#160;&#160;&#160;3</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"gae43281bc66d3fa5089fb50c3e7a28695\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gae43281bc66d3fa5089fb50c3e7a28695\">&#9670;&nbsp;</a></span>GLFW_JOYSTICK_5</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_JOYSTICK_5&#160;&#160;&#160;4</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"ga74771620aa53bd68a487186dea66fd77\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga74771620aa53bd68a487186dea66fd77\">&#9670;&nbsp;</a></span>GLFW_JOYSTICK_6</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_JOYSTICK_6&#160;&#160;&#160;5</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"ga20a9f4f3aaefed9ea5e66072fc588b87\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga20a9f4f3aaefed9ea5e66072fc588b87\">&#9670;&nbsp;</a></span>GLFW_JOYSTICK_7</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_JOYSTICK_7&#160;&#160;&#160;6</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"ga21a934c940bcf25db0e4c8fe9b364bdb\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga21a934c940bcf25db0e4c8fe9b364bdb\">&#9670;&nbsp;</a></span>GLFW_JOYSTICK_8</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_JOYSTICK_8&#160;&#160;&#160;7</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"ga87689d47df0ba6f9f5fcbbcaf7b3cecf\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga87689d47df0ba6f9f5fcbbcaf7b3cecf\">&#9670;&nbsp;</a></span>GLFW_JOYSTICK_9</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_JOYSTICK_9&#160;&#160;&#160;8</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"gaef55389ee605d6dfc31aef6fe98c54ec\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gaef55389ee605d6dfc31aef6fe98c54ec\">&#9670;&nbsp;</a></span>GLFW_JOYSTICK_10</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_JOYSTICK_10&#160;&#160;&#160;9</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"gae7d26e3df447c2c14a569fcc18516af4\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gae7d26e3df447c2c14a569fcc18516af4\">&#9670;&nbsp;</a></span>GLFW_JOYSTICK_11</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_JOYSTICK_11&#160;&#160;&#160;10</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"gab91bbf5b7ca6be8d3ac5c4d89ff48ac7\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gab91bbf5b7ca6be8d3ac5c4d89ff48ac7\">&#9670;&nbsp;</a></span>GLFW_JOYSTICK_12</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_JOYSTICK_12&#160;&#160;&#160;11</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"ga5c84fb4e49bf661d7d7c78eb4018c508\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga5c84fb4e49bf661d7d7c78eb4018c508\">&#9670;&nbsp;</a></span>GLFW_JOYSTICK_13</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_JOYSTICK_13&#160;&#160;&#160;12</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"ga89540873278ae5a42b3e70d64164dc74\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga89540873278ae5a42b3e70d64164dc74\">&#9670;&nbsp;</a></span>GLFW_JOYSTICK_14</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_JOYSTICK_14&#160;&#160;&#160;13</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"ga7b02ab70daf7a78bcc942d5d4cc1dcf9\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga7b02ab70daf7a78bcc942d5d4cc1dcf9\">&#9670;&nbsp;</a></span>GLFW_JOYSTICK_15</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_JOYSTICK_15&#160;&#160;&#160;14</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"ga453edeeabf350827646b6857df4f80ce\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga453edeeabf350827646b6857df4f80ce\">&#9670;&nbsp;</a></span>GLFW_JOYSTICK_16</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_JOYSTICK_16&#160;&#160;&#160;15</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"ga9ca13ebf24c331dd98df17d84a4b72c9\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga9ca13ebf24c331dd98df17d84a4b72c9\">&#9670;&nbsp;</a></span>GLFW_JOYSTICK_LAST</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_JOYSTICK_LAST&#160;&#160;&#160;<a class=\"el\" href=\"group__joysticks.html#ga453edeeabf350827646b6857df4f80ce\">GLFW_JOYSTICK_16</a></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n</div><!-- contents -->\n<address class=\"footer\">\n<p>\nLast update on Mon Jan 20 2020 for GLFW 3.3.2\n</p>\n</address>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/group__keys.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta http-equiv=\"X-UA-Compatible\" content=\"IE=9\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<title>GLFW: Keyboard keys</title>\n<link href=\"tabs.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"jquery.js\"></script>\n<script type=\"text/javascript\" src=\"dynsections.js\"></script>\n<link href=\"search/search.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"search/searchdata.js\"></script>\n<script type=\"text/javascript\" src=\"search/search.js\"></script>\n<link href=\"doxygen.css\" rel=\"stylesheet\" type=\"text/css\" />\n<link href=\"extra.css\" rel=\"stylesheet\" type=\"text/css\"/>\n</head>\n<body>\n<div id=\"top\"><!-- do not remove this div, it is closed by doxygen! -->\n<div id=\"titlearea\">\n\t<div class=\"glfwheader\">\n\t\t<a href=\"https://www.glfw.org/\" id=\"glfwhome\">GLFW</a>\n\t\t<ul class=\"glfwnavbar\">\n\t\t\t<li><a href=\"https://www.glfw.org/documentation.html\">Documentation</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/download.html\">Download</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/community.html\">Community</a></li>\n\t\t</ul>\n\t</div>\n</div>\n<!-- end header part -->\n<!-- Generated by Doxygen 1.8.16 -->\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\nvar searchBox = new SearchBox(\"searchBox\", \"search\",false,'Search');\n/* @license-end */\n</script>\n<script type=\"text/javascript\" src=\"menudata.js\"></script>\n<script type=\"text/javascript\" src=\"menu.js\"></script>\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\n$(function() {\n  initMenu('',true,false,'search.php','Search');\n  $(document).ready(function() { init_search(); });\n});\n/* @license-end */</script>\n<div id=\"main-nav\"></div>\n</div><!-- top -->\n<!-- window showing the filter options -->\n<div id=\"MSearchSelectWindow\"\n     onmouseover=\"return searchBox.OnSearchSelectShow()\"\n     onmouseout=\"return searchBox.OnSearchSelectHide()\"\n     onkeydown=\"return searchBox.OnSearchSelectKey(event)\">\n</div>\n\n<!-- iframe showing the search results (closed by default) -->\n<div id=\"MSearchResultsWindow\">\n<iframe src=\"javascript:void(0)\" frameborder=\"0\" \n        name=\"MSearchResults\" id=\"MSearchResults\">\n</iframe>\n</div>\n\n<div class=\"header\">\n  <div class=\"summary\">\n<a href=\"#define-members\">Macros</a>  </div>\n  <div class=\"headertitle\">\n<div class=\"title\">Keyboard keys<div class=\"ingroups\"><a class=\"el\" href=\"group__input.html\">Input reference</a></div></div>  </div>\n</div><!--header-->\n<div class=\"contents\">\n<a name=\"details\" id=\"details\"></a><h2 class=\"groupheader\">Description</h2>\n<p>See <a class=\"el\" href=\"input_guide.html#input_key\">key input</a> for how these are used.</p>\n<p>These key codes are inspired by the <em>USB HID Usage Tables v1.12</em> (p. 53-60), but re-arranged to map to 7-bit ASCII for printable keys (function keys are put in the 256+ range).</p>\n<p>The naming of the key codes follow these rules:</p><ul>\n<li>The US keyboard layout is used</li>\n<li>Names of printable alpha-numeric characters are used (e.g. \"A\", \"R\", \"3\", etc.)</li>\n<li>For non-alphanumeric characters, Unicode:ish names are used (e.g. \"COMMA\", \"LEFT_SQUARE_BRACKET\", etc.). Note that some names do not correspond to the Unicode standard (usually for brevity)</li>\n<li>Keys that lack a clear US mapping are named \"WORLD_x\"</li>\n<li>For non-printable keys, custom names are used (e.g. \"F4\", \"BACKSPACE\", etc.) </li>\n</ul>\n<table class=\"memberdecls\">\n<tr class=\"heading\"><td colspan=\"2\"><h2 class=\"groupheader\"><a name=\"define-members\"></a>\nMacros</h2></td></tr>\n<tr class=\"memitem:ga99aacc875b6b27a072552631e13775c7\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga99aacc875b6b27a072552631e13775c7\">GLFW_KEY_UNKNOWN</a>&#160;&#160;&#160;-1</td></tr>\n<tr class=\"separator:ga99aacc875b6b27a072552631e13775c7\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gaddb2c23772b97fd7e26e8ee66f1ad014\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gaddb2c23772b97fd7e26e8ee66f1ad014\">GLFW_KEY_SPACE</a>&#160;&#160;&#160;32</td></tr>\n<tr class=\"separator:gaddb2c23772b97fd7e26e8ee66f1ad014\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga6059b0b048ba6980b6107fffbd3b4b24\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga6059b0b048ba6980b6107fffbd3b4b24\">GLFW_KEY_APOSTROPHE</a>&#160;&#160;&#160;39  /* ' */</td></tr>\n<tr class=\"separator:ga6059b0b048ba6980b6107fffbd3b4b24\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gab3d5d72e59d3055f494627b0a524926c\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gab3d5d72e59d3055f494627b0a524926c\">GLFW_KEY_COMMA</a>&#160;&#160;&#160;44  /* , */</td></tr>\n<tr class=\"separator:gab3d5d72e59d3055f494627b0a524926c\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gac556b360f7f6fca4b70ba0aecf313fd4\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gac556b360f7f6fca4b70ba0aecf313fd4\">GLFW_KEY_MINUS</a>&#160;&#160;&#160;45  /* - */</td></tr>\n<tr class=\"separator:gac556b360f7f6fca4b70ba0aecf313fd4\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga37e296b650eab419fc474ff69033d927\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga37e296b650eab419fc474ff69033d927\">GLFW_KEY_PERIOD</a>&#160;&#160;&#160;46  /* . */</td></tr>\n<tr class=\"separator:ga37e296b650eab419fc474ff69033d927\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gadf3d753b2d479148d711de34b83fd0db\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gadf3d753b2d479148d711de34b83fd0db\">GLFW_KEY_SLASH</a>&#160;&#160;&#160;47  /* / */</td></tr>\n<tr class=\"separator:gadf3d753b2d479148d711de34b83fd0db\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga50391730e9d7112ad4fd42d0bd1597c1\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga50391730e9d7112ad4fd42d0bd1597c1\">GLFW_KEY_0</a>&#160;&#160;&#160;48</td></tr>\n<tr class=\"separator:ga50391730e9d7112ad4fd42d0bd1597c1\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga05e4cae9ddb8d40cf6d82c8f11f2502f\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga05e4cae9ddb8d40cf6d82c8f11f2502f\">GLFW_KEY_1</a>&#160;&#160;&#160;49</td></tr>\n<tr class=\"separator:ga05e4cae9ddb8d40cf6d82c8f11f2502f\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gadc8e66b3a4c4b5c39ad1305cf852863c\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gadc8e66b3a4c4b5c39ad1305cf852863c\">GLFW_KEY_2</a>&#160;&#160;&#160;50</td></tr>\n<tr class=\"separator:gadc8e66b3a4c4b5c39ad1305cf852863c\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga812f0273fe1a981e1fa002ae73e92271\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga812f0273fe1a981e1fa002ae73e92271\">GLFW_KEY_3</a>&#160;&#160;&#160;51</td></tr>\n<tr class=\"separator:ga812f0273fe1a981e1fa002ae73e92271\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga9e14b6975a9cc8f66cdd5cb3d3861356\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga9e14b6975a9cc8f66cdd5cb3d3861356\">GLFW_KEY_4</a>&#160;&#160;&#160;52</td></tr>\n<tr class=\"separator:ga9e14b6975a9cc8f66cdd5cb3d3861356\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga4d74ddaa5d4c609993b4d4a15736c924\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga4d74ddaa5d4c609993b4d4a15736c924\">GLFW_KEY_5</a>&#160;&#160;&#160;53</td></tr>\n<tr class=\"separator:ga4d74ddaa5d4c609993b4d4a15736c924\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga9ea4ab80c313a227b14d0a7c6f810b5d\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga9ea4ab80c313a227b14d0a7c6f810b5d\">GLFW_KEY_6</a>&#160;&#160;&#160;54</td></tr>\n<tr class=\"separator:ga9ea4ab80c313a227b14d0a7c6f810b5d\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gab79b1cfae7bd630cfc4604c1f263c666\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gab79b1cfae7bd630cfc4604c1f263c666\">GLFW_KEY_7</a>&#160;&#160;&#160;55</td></tr>\n<tr class=\"separator:gab79b1cfae7bd630cfc4604c1f263c666\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gadeaa109a0f9f5afc94fe4a108e686f6f\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gadeaa109a0f9f5afc94fe4a108e686f6f\">GLFW_KEY_8</a>&#160;&#160;&#160;56</td></tr>\n<tr class=\"separator:gadeaa109a0f9f5afc94fe4a108e686f6f\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga2924cb5349ebbf97c8987f3521c44f39\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga2924cb5349ebbf97c8987f3521c44f39\">GLFW_KEY_9</a>&#160;&#160;&#160;57</td></tr>\n<tr class=\"separator:ga2924cb5349ebbf97c8987f3521c44f39\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga84233de9ee5bb3e8788a5aa07d80af7d\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga84233de9ee5bb3e8788a5aa07d80af7d\">GLFW_KEY_SEMICOLON</a>&#160;&#160;&#160;59  /* ; */</td></tr>\n<tr class=\"separator:ga84233de9ee5bb3e8788a5aa07d80af7d\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gae1a2de47240d6664423c204bdd91bd17\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gae1a2de47240d6664423c204bdd91bd17\">GLFW_KEY_EQUAL</a>&#160;&#160;&#160;61  /* = */</td></tr>\n<tr class=\"separator:gae1a2de47240d6664423c204bdd91bd17\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga03e842608e1ea323370889d33b8f70ff\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga03e842608e1ea323370889d33b8f70ff\">GLFW_KEY_A</a>&#160;&#160;&#160;65</td></tr>\n<tr class=\"separator:ga03e842608e1ea323370889d33b8f70ff\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga8e3fb647ff3aca9e8dbf14fe66332941\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga8e3fb647ff3aca9e8dbf14fe66332941\">GLFW_KEY_B</a>&#160;&#160;&#160;66</td></tr>\n<tr class=\"separator:ga8e3fb647ff3aca9e8dbf14fe66332941\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga00ccf3475d9ee2e679480d540d554669\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga00ccf3475d9ee2e679480d540d554669\">GLFW_KEY_C</a>&#160;&#160;&#160;67</td></tr>\n<tr class=\"separator:ga00ccf3475d9ee2e679480d540d554669\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga011f7cdc9a654da984a2506479606933\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga011f7cdc9a654da984a2506479606933\">GLFW_KEY_D</a>&#160;&#160;&#160;68</td></tr>\n<tr class=\"separator:ga011f7cdc9a654da984a2506479606933\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gabf48fcc3afbe69349df432b470c96ef2\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gabf48fcc3afbe69349df432b470c96ef2\">GLFW_KEY_E</a>&#160;&#160;&#160;69</td></tr>\n<tr class=\"separator:gabf48fcc3afbe69349df432b470c96ef2\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga5df402e02aca08444240058fd9b42a55\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga5df402e02aca08444240058fd9b42a55\">GLFW_KEY_F</a>&#160;&#160;&#160;70</td></tr>\n<tr class=\"separator:ga5df402e02aca08444240058fd9b42a55\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gae74ecddf7cc96104ab23989b1cdab536\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gae74ecddf7cc96104ab23989b1cdab536\">GLFW_KEY_G</a>&#160;&#160;&#160;71</td></tr>\n<tr class=\"separator:gae74ecddf7cc96104ab23989b1cdab536\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gad4cc98fc8f35f015d9e2fb94bf136076\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gad4cc98fc8f35f015d9e2fb94bf136076\">GLFW_KEY_H</a>&#160;&#160;&#160;72</td></tr>\n<tr class=\"separator:gad4cc98fc8f35f015d9e2fb94bf136076\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga274655c8bfe39742684ca393cf8ed093\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga274655c8bfe39742684ca393cf8ed093\">GLFW_KEY_I</a>&#160;&#160;&#160;73</td></tr>\n<tr class=\"separator:ga274655c8bfe39742684ca393cf8ed093\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga65ff2aedb129a3149ad9cb3e4159a75f\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga65ff2aedb129a3149ad9cb3e4159a75f\">GLFW_KEY_J</a>&#160;&#160;&#160;74</td></tr>\n<tr class=\"separator:ga65ff2aedb129a3149ad9cb3e4159a75f\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga4ae8debadf6d2a691badae0b53ea3ba0\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga4ae8debadf6d2a691badae0b53ea3ba0\">GLFW_KEY_K</a>&#160;&#160;&#160;75</td></tr>\n<tr class=\"separator:ga4ae8debadf6d2a691badae0b53ea3ba0\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gaaa8b54a13f6b1eed85ac86f82d550db2\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gaaa8b54a13f6b1eed85ac86f82d550db2\">GLFW_KEY_L</a>&#160;&#160;&#160;76</td></tr>\n<tr class=\"separator:gaaa8b54a13f6b1eed85ac86f82d550db2\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga4d7f0260c82e4ea3d6ebc7a21d6e3716\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga4d7f0260c82e4ea3d6ebc7a21d6e3716\">GLFW_KEY_M</a>&#160;&#160;&#160;77</td></tr>\n<tr class=\"separator:ga4d7f0260c82e4ea3d6ebc7a21d6e3716\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gae00856dfeb5d13aafebf59d44de5cdda\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gae00856dfeb5d13aafebf59d44de5cdda\">GLFW_KEY_N</a>&#160;&#160;&#160;78</td></tr>\n<tr class=\"separator:gae00856dfeb5d13aafebf59d44de5cdda\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gaecbbb79130df419d58dd7f09a169efe9\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gaecbbb79130df419d58dd7f09a169efe9\">GLFW_KEY_O</a>&#160;&#160;&#160;79</td></tr>\n<tr class=\"separator:gaecbbb79130df419d58dd7f09a169efe9\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga8fc15819c1094fb2afa01d84546b33e1\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga8fc15819c1094fb2afa01d84546b33e1\">GLFW_KEY_P</a>&#160;&#160;&#160;80</td></tr>\n<tr class=\"separator:ga8fc15819c1094fb2afa01d84546b33e1\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gafdd01e38b120d67cf51e348bb47f3964\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gafdd01e38b120d67cf51e348bb47f3964\">GLFW_KEY_Q</a>&#160;&#160;&#160;81</td></tr>\n<tr class=\"separator:gafdd01e38b120d67cf51e348bb47f3964\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga4ce6c70a0c98c50b3fe4ab9a728d4d36\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga4ce6c70a0c98c50b3fe4ab9a728d4d36\">GLFW_KEY_R</a>&#160;&#160;&#160;82</td></tr>\n<tr class=\"separator:ga4ce6c70a0c98c50b3fe4ab9a728d4d36\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga1570e2ccaab036ea82bed66fc1dab2a9\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga1570e2ccaab036ea82bed66fc1dab2a9\">GLFW_KEY_S</a>&#160;&#160;&#160;83</td></tr>\n<tr class=\"separator:ga1570e2ccaab036ea82bed66fc1dab2a9\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga90e0560422ec7a30e7f3f375bc9f37f9\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga90e0560422ec7a30e7f3f375bc9f37f9\">GLFW_KEY_T</a>&#160;&#160;&#160;84</td></tr>\n<tr class=\"separator:ga90e0560422ec7a30e7f3f375bc9f37f9\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gacad52f3bf7d378fc0ffa72a76769256d\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gacad52f3bf7d378fc0ffa72a76769256d\">GLFW_KEY_U</a>&#160;&#160;&#160;85</td></tr>\n<tr class=\"separator:gacad52f3bf7d378fc0ffa72a76769256d\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga22c7763899ecf7788862e5f90eacce6b\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga22c7763899ecf7788862e5f90eacce6b\">GLFW_KEY_V</a>&#160;&#160;&#160;86</td></tr>\n<tr class=\"separator:ga22c7763899ecf7788862e5f90eacce6b\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gaa06a712e6202661fc03da5bdb7b6e545\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gaa06a712e6202661fc03da5bdb7b6e545\">GLFW_KEY_W</a>&#160;&#160;&#160;87</td></tr>\n<tr class=\"separator:gaa06a712e6202661fc03da5bdb7b6e545\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gac1c42c0bf4192cea713c55598b06b744\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gac1c42c0bf4192cea713c55598b06b744\">GLFW_KEY_X</a>&#160;&#160;&#160;88</td></tr>\n<tr class=\"separator:gac1c42c0bf4192cea713c55598b06b744\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gafd9f115a549effdf8e372a787c360313\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gafd9f115a549effdf8e372a787c360313\">GLFW_KEY_Y</a>&#160;&#160;&#160;89</td></tr>\n<tr class=\"separator:gafd9f115a549effdf8e372a787c360313\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gac489e208c26afda8d4938ed88718760a\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gac489e208c26afda8d4938ed88718760a\">GLFW_KEY_Z</a>&#160;&#160;&#160;90</td></tr>\n<tr class=\"separator:gac489e208c26afda8d4938ed88718760a\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gad1c8d9adac53925276ecb1d592511d8a\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gad1c8d9adac53925276ecb1d592511d8a\">GLFW_KEY_LEFT_BRACKET</a>&#160;&#160;&#160;91  /* [ */</td></tr>\n<tr class=\"separator:gad1c8d9adac53925276ecb1d592511d8a\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gab8155ea99d1ab27ff56f24f8dc73f8d1\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gab8155ea99d1ab27ff56f24f8dc73f8d1\">GLFW_KEY_BACKSLASH</a>&#160;&#160;&#160;92  /* \\ */</td></tr>\n<tr class=\"separator:gab8155ea99d1ab27ff56f24f8dc73f8d1\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga86ef225fd6a66404caae71044cdd58d8\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga86ef225fd6a66404caae71044cdd58d8\">GLFW_KEY_RIGHT_BRACKET</a>&#160;&#160;&#160;93  /* ] */</td></tr>\n<tr class=\"separator:ga86ef225fd6a66404caae71044cdd58d8\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga7a3701fb4e2a0b136ff4b568c3c8d668\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga7a3701fb4e2a0b136ff4b568c3c8d668\">GLFW_KEY_GRAVE_ACCENT</a>&#160;&#160;&#160;96  /* ` */</td></tr>\n<tr class=\"separator:ga7a3701fb4e2a0b136ff4b568c3c8d668\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gadc78dad3dab76bcd4b5c20114052577a\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gadc78dad3dab76bcd4b5c20114052577a\">GLFW_KEY_WORLD_1</a>&#160;&#160;&#160;161 /* non-US #1 */</td></tr>\n<tr class=\"separator:gadc78dad3dab76bcd4b5c20114052577a\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga20494bfebf0bb4fc9503afca18ab2c5e\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga20494bfebf0bb4fc9503afca18ab2c5e\">GLFW_KEY_WORLD_2</a>&#160;&#160;&#160;162 /* non-US #2 */</td></tr>\n<tr class=\"separator:ga20494bfebf0bb4fc9503afca18ab2c5e\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gaac6596c350b635c245113b81c2123b93\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gaac6596c350b635c245113b81c2123b93\">GLFW_KEY_ESCAPE</a>&#160;&#160;&#160;256</td></tr>\n<tr class=\"separator:gaac6596c350b635c245113b81c2123b93\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga9555a92ecbecdbc1f3435219c571d667\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga9555a92ecbecdbc1f3435219c571d667\">GLFW_KEY_ENTER</a>&#160;&#160;&#160;257</td></tr>\n<tr class=\"separator:ga9555a92ecbecdbc1f3435219c571d667\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga6908a4bda9950a3e2b73f794bbe985df\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga6908a4bda9950a3e2b73f794bbe985df\">GLFW_KEY_TAB</a>&#160;&#160;&#160;258</td></tr>\n<tr class=\"separator:ga6908a4bda9950a3e2b73f794bbe985df\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga6c0df1fe2f156bbd5a98c66d76ff3635\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga6c0df1fe2f156bbd5a98c66d76ff3635\">GLFW_KEY_BACKSPACE</a>&#160;&#160;&#160;259</td></tr>\n<tr class=\"separator:ga6c0df1fe2f156bbd5a98c66d76ff3635\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga373ac7365435d6b0eb1068f470e34f47\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga373ac7365435d6b0eb1068f470e34f47\">GLFW_KEY_INSERT</a>&#160;&#160;&#160;260</td></tr>\n<tr class=\"separator:ga373ac7365435d6b0eb1068f470e34f47\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gadb111e4df74b8a715f2c05dad58d2682\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gadb111e4df74b8a715f2c05dad58d2682\">GLFW_KEY_DELETE</a>&#160;&#160;&#160;261</td></tr>\n<tr class=\"separator:gadb111e4df74b8a715f2c05dad58d2682\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga06ba07662e8c291a4a84535379ffc7ac\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga06ba07662e8c291a4a84535379ffc7ac\">GLFW_KEY_RIGHT</a>&#160;&#160;&#160;262</td></tr>\n<tr class=\"separator:ga06ba07662e8c291a4a84535379ffc7ac\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gae12a010d33c309a67ab9460c51eb2462\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gae12a010d33c309a67ab9460c51eb2462\">GLFW_KEY_LEFT</a>&#160;&#160;&#160;263</td></tr>\n<tr class=\"separator:gae12a010d33c309a67ab9460c51eb2462\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gae2e3958c71595607416aa7bf082be2f9\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gae2e3958c71595607416aa7bf082be2f9\">GLFW_KEY_DOWN</a>&#160;&#160;&#160;264</td></tr>\n<tr class=\"separator:gae2e3958c71595607416aa7bf082be2f9\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga2f3342b194020d3544c67e3506b6f144\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga2f3342b194020d3544c67e3506b6f144\">GLFW_KEY_UP</a>&#160;&#160;&#160;265</td></tr>\n<tr class=\"separator:ga2f3342b194020d3544c67e3506b6f144\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga3ab731f9622f0db280178a5f3cc6d586\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga3ab731f9622f0db280178a5f3cc6d586\">GLFW_KEY_PAGE_UP</a>&#160;&#160;&#160;266</td></tr>\n<tr class=\"separator:ga3ab731f9622f0db280178a5f3cc6d586\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gaee0a8fa442001cc2147812f84b59041c\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gaee0a8fa442001cc2147812f84b59041c\">GLFW_KEY_PAGE_DOWN</a>&#160;&#160;&#160;267</td></tr>\n<tr class=\"separator:gaee0a8fa442001cc2147812f84b59041c\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga41452c7287195d481e43207318c126a7\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga41452c7287195d481e43207318c126a7\">GLFW_KEY_HOME</a>&#160;&#160;&#160;268</td></tr>\n<tr class=\"separator:ga41452c7287195d481e43207318c126a7\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga86587ea1df19a65978d3e3b8439bedd9\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga86587ea1df19a65978d3e3b8439bedd9\">GLFW_KEY_END</a>&#160;&#160;&#160;269</td></tr>\n<tr class=\"separator:ga86587ea1df19a65978d3e3b8439bedd9\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga92c1d2c9d63485f3d70f94f688d48672\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga92c1d2c9d63485f3d70f94f688d48672\">GLFW_KEY_CAPS_LOCK</a>&#160;&#160;&#160;280</td></tr>\n<tr class=\"separator:ga92c1d2c9d63485f3d70f94f688d48672\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gaf622b63b9537f7084c2ab649b8365630\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gaf622b63b9537f7084c2ab649b8365630\">GLFW_KEY_SCROLL_LOCK</a>&#160;&#160;&#160;281</td></tr>\n<tr class=\"separator:gaf622b63b9537f7084c2ab649b8365630\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga3946edc362aeff213b2be6304296cf43\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga3946edc362aeff213b2be6304296cf43\">GLFW_KEY_NUM_LOCK</a>&#160;&#160;&#160;282</td></tr>\n<tr class=\"separator:ga3946edc362aeff213b2be6304296cf43\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gaf964c2e65e97d0cf785a5636ee8df642\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gaf964c2e65e97d0cf785a5636ee8df642\">GLFW_KEY_PRINT_SCREEN</a>&#160;&#160;&#160;283</td></tr>\n<tr class=\"separator:gaf964c2e65e97d0cf785a5636ee8df642\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga8116b9692d87382afb5849b6d8907f18\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga8116b9692d87382afb5849b6d8907f18\">GLFW_KEY_PAUSE</a>&#160;&#160;&#160;284</td></tr>\n<tr class=\"separator:ga8116b9692d87382afb5849b6d8907f18\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gafb8d66c573acf22e364049477dcbea30\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gafb8d66c573acf22e364049477dcbea30\">GLFW_KEY_F1</a>&#160;&#160;&#160;290</td></tr>\n<tr class=\"separator:gafb8d66c573acf22e364049477dcbea30\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga0900750aff94889b940f5e428c07daee\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga0900750aff94889b940f5e428c07daee\">GLFW_KEY_F2</a>&#160;&#160;&#160;291</td></tr>\n<tr class=\"separator:ga0900750aff94889b940f5e428c07daee\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gaed7cd729c0147a551bb8b7bb36c17015\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gaed7cd729c0147a551bb8b7bb36c17015\">GLFW_KEY_F3</a>&#160;&#160;&#160;292</td></tr>\n<tr class=\"separator:gaed7cd729c0147a551bb8b7bb36c17015\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga9b61ebd0c63b44b7332fda2c9763eaa6\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga9b61ebd0c63b44b7332fda2c9763eaa6\">GLFW_KEY_F4</a>&#160;&#160;&#160;293</td></tr>\n<tr class=\"separator:ga9b61ebd0c63b44b7332fda2c9763eaa6\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gaf258dda9947daa428377938ed577c8c2\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gaf258dda9947daa428377938ed577c8c2\">GLFW_KEY_F5</a>&#160;&#160;&#160;294</td></tr>\n<tr class=\"separator:gaf258dda9947daa428377938ed577c8c2\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga6dc2d3f87b9d51ffbbbe2ef0299d8e1d\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga6dc2d3f87b9d51ffbbbe2ef0299d8e1d\">GLFW_KEY_F6</a>&#160;&#160;&#160;295</td></tr>\n<tr class=\"separator:ga6dc2d3f87b9d51ffbbbe2ef0299d8e1d\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gacca6ef8a2162c52a0ac1d881e8d9c38a\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gacca6ef8a2162c52a0ac1d881e8d9c38a\">GLFW_KEY_F7</a>&#160;&#160;&#160;296</td></tr>\n<tr class=\"separator:gacca6ef8a2162c52a0ac1d881e8d9c38a\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gac9d39390336ae14e4a93e295de43c7e8\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gac9d39390336ae14e4a93e295de43c7e8\">GLFW_KEY_F8</a>&#160;&#160;&#160;297</td></tr>\n<tr class=\"separator:gac9d39390336ae14e4a93e295de43c7e8\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gae40de0de1c9f21cd26c9afa3d7050851\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gae40de0de1c9f21cd26c9afa3d7050851\">GLFW_KEY_F9</a>&#160;&#160;&#160;298</td></tr>\n<tr class=\"separator:gae40de0de1c9f21cd26c9afa3d7050851\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga718d11d2f7d57471a2f6a894235995b1\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga718d11d2f7d57471a2f6a894235995b1\">GLFW_KEY_F10</a>&#160;&#160;&#160;299</td></tr>\n<tr class=\"separator:ga718d11d2f7d57471a2f6a894235995b1\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga0bc04b11627e7d69339151e7306b2832\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga0bc04b11627e7d69339151e7306b2832\">GLFW_KEY_F11</a>&#160;&#160;&#160;300</td></tr>\n<tr class=\"separator:ga0bc04b11627e7d69339151e7306b2832\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gaf5908fa9b0a906ae03fc2c61ac7aa3e2\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gaf5908fa9b0a906ae03fc2c61ac7aa3e2\">GLFW_KEY_F12</a>&#160;&#160;&#160;301</td></tr>\n<tr class=\"separator:gaf5908fa9b0a906ae03fc2c61ac7aa3e2\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gad637f4308655e1001bd6ad942bc0fd4b\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gad637f4308655e1001bd6ad942bc0fd4b\">GLFW_KEY_F13</a>&#160;&#160;&#160;302</td></tr>\n<tr class=\"separator:gad637f4308655e1001bd6ad942bc0fd4b\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gaf14c66cff3396e5bd46e803c035e6c1f\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gaf14c66cff3396e5bd46e803c035e6c1f\">GLFW_KEY_F14</a>&#160;&#160;&#160;303</td></tr>\n<tr class=\"separator:gaf14c66cff3396e5bd46e803c035e6c1f\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga7f70970db6e8be1794da8516a6d14058\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga7f70970db6e8be1794da8516a6d14058\">GLFW_KEY_F15</a>&#160;&#160;&#160;304</td></tr>\n<tr class=\"separator:ga7f70970db6e8be1794da8516a6d14058\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gaa582dbb1d2ba2050aa1dca0838095b27\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gaa582dbb1d2ba2050aa1dca0838095b27\">GLFW_KEY_F16</a>&#160;&#160;&#160;305</td></tr>\n<tr class=\"separator:gaa582dbb1d2ba2050aa1dca0838095b27\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga972ce5c365e2394b36104b0e3125c748\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga972ce5c365e2394b36104b0e3125c748\">GLFW_KEY_F17</a>&#160;&#160;&#160;306</td></tr>\n<tr class=\"separator:ga972ce5c365e2394b36104b0e3125c748\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gaebf6391058d5566601e357edc5ea737c\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gaebf6391058d5566601e357edc5ea737c\">GLFW_KEY_F18</a>&#160;&#160;&#160;307</td></tr>\n<tr class=\"separator:gaebf6391058d5566601e357edc5ea737c\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gaec011d9ba044058cb54529da710e9791\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gaec011d9ba044058cb54529da710e9791\">GLFW_KEY_F19</a>&#160;&#160;&#160;308</td></tr>\n<tr class=\"separator:gaec011d9ba044058cb54529da710e9791\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga82b9c721ada04cd5ca8de767da38022f\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga82b9c721ada04cd5ca8de767da38022f\">GLFW_KEY_F20</a>&#160;&#160;&#160;309</td></tr>\n<tr class=\"separator:ga82b9c721ada04cd5ca8de767da38022f\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga356afb14d3440ff2bb378f74f7ebc60f\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga356afb14d3440ff2bb378f74f7ebc60f\">GLFW_KEY_F21</a>&#160;&#160;&#160;310</td></tr>\n<tr class=\"separator:ga356afb14d3440ff2bb378f74f7ebc60f\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga90960bd2a155f2b09675324d3dff1565\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga90960bd2a155f2b09675324d3dff1565\">GLFW_KEY_F22</a>&#160;&#160;&#160;311</td></tr>\n<tr class=\"separator:ga90960bd2a155f2b09675324d3dff1565\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga43c21099aac10952d1be909a8ddee4d5\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga43c21099aac10952d1be909a8ddee4d5\">GLFW_KEY_F23</a>&#160;&#160;&#160;312</td></tr>\n<tr class=\"separator:ga43c21099aac10952d1be909a8ddee4d5\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga8150374677b5bed3043408732152dea2\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga8150374677b5bed3043408732152dea2\">GLFW_KEY_F24</a>&#160;&#160;&#160;313</td></tr>\n<tr class=\"separator:ga8150374677b5bed3043408732152dea2\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gaa4bbd93ed73bb4c6ae7d83df880b7199\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gaa4bbd93ed73bb4c6ae7d83df880b7199\">GLFW_KEY_F25</a>&#160;&#160;&#160;314</td></tr>\n<tr class=\"separator:gaa4bbd93ed73bb4c6ae7d83df880b7199\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga10515dafc55b71e7683f5b4fedd1c70d\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga10515dafc55b71e7683f5b4fedd1c70d\">GLFW_KEY_KP_0</a>&#160;&#160;&#160;320</td></tr>\n<tr class=\"separator:ga10515dafc55b71e7683f5b4fedd1c70d\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gaf3a29a334402c5eaf0b3439edf5587c3\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gaf3a29a334402c5eaf0b3439edf5587c3\">GLFW_KEY_KP_1</a>&#160;&#160;&#160;321</td></tr>\n<tr class=\"separator:gaf3a29a334402c5eaf0b3439edf5587c3\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gaf82d5a802ab8213c72653d7480c16f13\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gaf82d5a802ab8213c72653d7480c16f13\">GLFW_KEY_KP_2</a>&#160;&#160;&#160;322</td></tr>\n<tr class=\"separator:gaf82d5a802ab8213c72653d7480c16f13\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga7e25ff30d56cd512828c1d4ae8d54ef2\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga7e25ff30d56cd512828c1d4ae8d54ef2\">GLFW_KEY_KP_3</a>&#160;&#160;&#160;323</td></tr>\n<tr class=\"separator:ga7e25ff30d56cd512828c1d4ae8d54ef2\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gada7ec86778b85e0b4de0beea72234aea\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gada7ec86778b85e0b4de0beea72234aea\">GLFW_KEY_KP_4</a>&#160;&#160;&#160;324</td></tr>\n<tr class=\"separator:gada7ec86778b85e0b4de0beea72234aea\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga9a5be274434866c51738cafbb6d26b45\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga9a5be274434866c51738cafbb6d26b45\">GLFW_KEY_KP_5</a>&#160;&#160;&#160;325</td></tr>\n<tr class=\"separator:ga9a5be274434866c51738cafbb6d26b45\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gafc141b0f8450519084c01092a3157faa\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gafc141b0f8450519084c01092a3157faa\">GLFW_KEY_KP_6</a>&#160;&#160;&#160;326</td></tr>\n<tr class=\"separator:gafc141b0f8450519084c01092a3157faa\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga8882f411f05d04ec77a9563974bbfa53\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga8882f411f05d04ec77a9563974bbfa53\">GLFW_KEY_KP_7</a>&#160;&#160;&#160;327</td></tr>\n<tr class=\"separator:ga8882f411f05d04ec77a9563974bbfa53\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gab2ea2e6a12f89d315045af520ac78cec\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gab2ea2e6a12f89d315045af520ac78cec\">GLFW_KEY_KP_8</a>&#160;&#160;&#160;328</td></tr>\n<tr class=\"separator:gab2ea2e6a12f89d315045af520ac78cec\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gafb21426b630ed4fcc084868699ba74c1\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gafb21426b630ed4fcc084868699ba74c1\">GLFW_KEY_KP_9</a>&#160;&#160;&#160;329</td></tr>\n<tr class=\"separator:gafb21426b630ed4fcc084868699ba74c1\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga4e231d968796331a9ea0dbfb98d4005b\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga4e231d968796331a9ea0dbfb98d4005b\">GLFW_KEY_KP_DECIMAL</a>&#160;&#160;&#160;330</td></tr>\n<tr class=\"separator:ga4e231d968796331a9ea0dbfb98d4005b\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gabca1733780a273d549129ad0f250d1e5\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gabca1733780a273d549129ad0f250d1e5\">GLFW_KEY_KP_DIVIDE</a>&#160;&#160;&#160;331</td></tr>\n<tr class=\"separator:gabca1733780a273d549129ad0f250d1e5\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga9ada267eb0e78ed2ada8701dd24a56ef\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga9ada267eb0e78ed2ada8701dd24a56ef\">GLFW_KEY_KP_MULTIPLY</a>&#160;&#160;&#160;332</td></tr>\n<tr class=\"separator:ga9ada267eb0e78ed2ada8701dd24a56ef\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gaa3dbd60782ff93d6082a124bce1fa236\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gaa3dbd60782ff93d6082a124bce1fa236\">GLFW_KEY_KP_SUBTRACT</a>&#160;&#160;&#160;333</td></tr>\n<tr class=\"separator:gaa3dbd60782ff93d6082a124bce1fa236\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gad09c7c98acc79e89aa6a0a91275becac\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gad09c7c98acc79e89aa6a0a91275becac\">GLFW_KEY_KP_ADD</a>&#160;&#160;&#160;334</td></tr>\n<tr class=\"separator:gad09c7c98acc79e89aa6a0a91275becac\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga4f728f8738f2986bd63eedd3d412e8cf\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga4f728f8738f2986bd63eedd3d412e8cf\">GLFW_KEY_KP_ENTER</a>&#160;&#160;&#160;335</td></tr>\n<tr class=\"separator:ga4f728f8738f2986bd63eedd3d412e8cf\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gaebdc76d4a808191e6d21b7e4ad2acd97\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gaebdc76d4a808191e6d21b7e4ad2acd97\">GLFW_KEY_KP_EQUAL</a>&#160;&#160;&#160;336</td></tr>\n<tr class=\"separator:gaebdc76d4a808191e6d21b7e4ad2acd97\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga8a530a28a65c44ab5d00b759b756d3f6\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga8a530a28a65c44ab5d00b759b756d3f6\">GLFW_KEY_LEFT_SHIFT</a>&#160;&#160;&#160;340</td></tr>\n<tr class=\"separator:ga8a530a28a65c44ab5d00b759b756d3f6\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga9f97b743e81460ac4b2deddecd10a464\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga9f97b743e81460ac4b2deddecd10a464\">GLFW_KEY_LEFT_CONTROL</a>&#160;&#160;&#160;341</td></tr>\n<tr class=\"separator:ga9f97b743e81460ac4b2deddecd10a464\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga7f27dabf63a7789daa31e1c96790219b\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga7f27dabf63a7789daa31e1c96790219b\">GLFW_KEY_LEFT_ALT</a>&#160;&#160;&#160;342</td></tr>\n<tr class=\"separator:ga7f27dabf63a7789daa31e1c96790219b\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gafb1207c91997fc295afd1835fbc5641a\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gafb1207c91997fc295afd1835fbc5641a\">GLFW_KEY_LEFT_SUPER</a>&#160;&#160;&#160;343</td></tr>\n<tr class=\"separator:gafb1207c91997fc295afd1835fbc5641a\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gaffca36b99c9dce1a19cb9befbadce691\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gaffca36b99c9dce1a19cb9befbadce691\">GLFW_KEY_RIGHT_SHIFT</a>&#160;&#160;&#160;344</td></tr>\n<tr class=\"separator:gaffca36b99c9dce1a19cb9befbadce691\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gad1ca2094b2694e7251d0ab1fd34f8519\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gad1ca2094b2694e7251d0ab1fd34f8519\">GLFW_KEY_RIGHT_CONTROL</a>&#160;&#160;&#160;345</td></tr>\n<tr class=\"separator:gad1ca2094b2694e7251d0ab1fd34f8519\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga687b38009131cfdd07a8d05fff8fa446\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga687b38009131cfdd07a8d05fff8fa446\">GLFW_KEY_RIGHT_ALT</a>&#160;&#160;&#160;346</td></tr>\n<tr class=\"separator:ga687b38009131cfdd07a8d05fff8fa446\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gad4547a3e8e247594acb60423fe6502db\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#gad4547a3e8e247594acb60423fe6502db\">GLFW_KEY_RIGHT_SUPER</a>&#160;&#160;&#160;347</td></tr>\n<tr class=\"separator:gad4547a3e8e247594acb60423fe6502db\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga9845be48a745fc232045c9ec174d8820\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga9845be48a745fc232045c9ec174d8820\">GLFW_KEY_MENU</a>&#160;&#160;&#160;348</td></tr>\n<tr class=\"separator:ga9845be48a745fc232045c9ec174d8820\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga442cbaef7bfb9a4ba13594dd7fbf2789\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__keys.html#ga442cbaef7bfb9a4ba13594dd7fbf2789\">GLFW_KEY_LAST</a>&#160;&#160;&#160;<a class=\"el\" href=\"group__keys.html#ga9845be48a745fc232045c9ec174d8820\">GLFW_KEY_MENU</a></td></tr>\n<tr class=\"separator:ga442cbaef7bfb9a4ba13594dd7fbf2789\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n</table>\n<h2 class=\"groupheader\">Macro Definition Documentation</h2>\n<a id=\"ga99aacc875b6b27a072552631e13775c7\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga99aacc875b6b27a072552631e13775c7\">&#9670;&nbsp;</a></span>GLFW_KEY_UNKNOWN</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_UNKNOWN&#160;&#160;&#160;-1</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"gaddb2c23772b97fd7e26e8ee66f1ad014\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gaddb2c23772b97fd7e26e8ee66f1ad014\">&#9670;&nbsp;</a></span>GLFW_KEY_SPACE</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_SPACE&#160;&#160;&#160;32</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"ga6059b0b048ba6980b6107fffbd3b4b24\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga6059b0b048ba6980b6107fffbd3b4b24\">&#9670;&nbsp;</a></span>GLFW_KEY_APOSTROPHE</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_APOSTROPHE&#160;&#160;&#160;39  /* ' */</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"gab3d5d72e59d3055f494627b0a524926c\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gab3d5d72e59d3055f494627b0a524926c\">&#9670;&nbsp;</a></span>GLFW_KEY_COMMA</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_COMMA&#160;&#160;&#160;44  /* , */</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"gac556b360f7f6fca4b70ba0aecf313fd4\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gac556b360f7f6fca4b70ba0aecf313fd4\">&#9670;&nbsp;</a></span>GLFW_KEY_MINUS</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_MINUS&#160;&#160;&#160;45  /* - */</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"ga37e296b650eab419fc474ff69033d927\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga37e296b650eab419fc474ff69033d927\">&#9670;&nbsp;</a></span>GLFW_KEY_PERIOD</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_PERIOD&#160;&#160;&#160;46  /* . */</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"gadf3d753b2d479148d711de34b83fd0db\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gadf3d753b2d479148d711de34b83fd0db\">&#9670;&nbsp;</a></span>GLFW_KEY_SLASH</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_SLASH&#160;&#160;&#160;47  /* / */</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"ga50391730e9d7112ad4fd42d0bd1597c1\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga50391730e9d7112ad4fd42d0bd1597c1\">&#9670;&nbsp;</a></span>GLFW_KEY_0</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_0&#160;&#160;&#160;48</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"ga05e4cae9ddb8d40cf6d82c8f11f2502f\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga05e4cae9ddb8d40cf6d82c8f11f2502f\">&#9670;&nbsp;</a></span>GLFW_KEY_1</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_1&#160;&#160;&#160;49</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"gadc8e66b3a4c4b5c39ad1305cf852863c\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gadc8e66b3a4c4b5c39ad1305cf852863c\">&#9670;&nbsp;</a></span>GLFW_KEY_2</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_2&#160;&#160;&#160;50</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"ga812f0273fe1a981e1fa002ae73e92271\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga812f0273fe1a981e1fa002ae73e92271\">&#9670;&nbsp;</a></span>GLFW_KEY_3</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_3&#160;&#160;&#160;51</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"ga9e14b6975a9cc8f66cdd5cb3d3861356\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga9e14b6975a9cc8f66cdd5cb3d3861356\">&#9670;&nbsp;</a></span>GLFW_KEY_4</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_4&#160;&#160;&#160;52</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"ga4d74ddaa5d4c609993b4d4a15736c924\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga4d74ddaa5d4c609993b4d4a15736c924\">&#9670;&nbsp;</a></span>GLFW_KEY_5</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_5&#160;&#160;&#160;53</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"ga9ea4ab80c313a227b14d0a7c6f810b5d\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga9ea4ab80c313a227b14d0a7c6f810b5d\">&#9670;&nbsp;</a></span>GLFW_KEY_6</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_6&#160;&#160;&#160;54</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"gab79b1cfae7bd630cfc4604c1f263c666\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gab79b1cfae7bd630cfc4604c1f263c666\">&#9670;&nbsp;</a></span>GLFW_KEY_7</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_7&#160;&#160;&#160;55</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"gadeaa109a0f9f5afc94fe4a108e686f6f\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gadeaa109a0f9f5afc94fe4a108e686f6f\">&#9670;&nbsp;</a></span>GLFW_KEY_8</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_8&#160;&#160;&#160;56</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"ga2924cb5349ebbf97c8987f3521c44f39\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga2924cb5349ebbf97c8987f3521c44f39\">&#9670;&nbsp;</a></span>GLFW_KEY_9</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_9&#160;&#160;&#160;57</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"ga84233de9ee5bb3e8788a5aa07d80af7d\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga84233de9ee5bb3e8788a5aa07d80af7d\">&#9670;&nbsp;</a></span>GLFW_KEY_SEMICOLON</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_SEMICOLON&#160;&#160;&#160;59  /* ; */</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"gae1a2de47240d6664423c204bdd91bd17\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gae1a2de47240d6664423c204bdd91bd17\">&#9670;&nbsp;</a></span>GLFW_KEY_EQUAL</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_EQUAL&#160;&#160;&#160;61  /* = */</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"ga03e842608e1ea323370889d33b8f70ff\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga03e842608e1ea323370889d33b8f70ff\">&#9670;&nbsp;</a></span>GLFW_KEY_A</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_A&#160;&#160;&#160;65</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"ga8e3fb647ff3aca9e8dbf14fe66332941\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga8e3fb647ff3aca9e8dbf14fe66332941\">&#9670;&nbsp;</a></span>GLFW_KEY_B</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_B&#160;&#160;&#160;66</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"ga00ccf3475d9ee2e679480d540d554669\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga00ccf3475d9ee2e679480d540d554669\">&#9670;&nbsp;</a></span>GLFW_KEY_C</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_C&#160;&#160;&#160;67</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"ga011f7cdc9a654da984a2506479606933\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga011f7cdc9a654da984a2506479606933\">&#9670;&nbsp;</a></span>GLFW_KEY_D</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_D&#160;&#160;&#160;68</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"gabf48fcc3afbe69349df432b470c96ef2\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gabf48fcc3afbe69349df432b470c96ef2\">&#9670;&nbsp;</a></span>GLFW_KEY_E</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_E&#160;&#160;&#160;69</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"ga5df402e02aca08444240058fd9b42a55\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga5df402e02aca08444240058fd9b42a55\">&#9670;&nbsp;</a></span>GLFW_KEY_F</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_F&#160;&#160;&#160;70</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"gae74ecddf7cc96104ab23989b1cdab536\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gae74ecddf7cc96104ab23989b1cdab536\">&#9670;&nbsp;</a></span>GLFW_KEY_G</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_G&#160;&#160;&#160;71</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"gad4cc98fc8f35f015d9e2fb94bf136076\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gad4cc98fc8f35f015d9e2fb94bf136076\">&#9670;&nbsp;</a></span>GLFW_KEY_H</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_H&#160;&#160;&#160;72</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"ga274655c8bfe39742684ca393cf8ed093\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga274655c8bfe39742684ca393cf8ed093\">&#9670;&nbsp;</a></span>GLFW_KEY_I</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_I&#160;&#160;&#160;73</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"ga65ff2aedb129a3149ad9cb3e4159a75f\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga65ff2aedb129a3149ad9cb3e4159a75f\">&#9670;&nbsp;</a></span>GLFW_KEY_J</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_J&#160;&#160;&#160;74</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"ga4ae8debadf6d2a691badae0b53ea3ba0\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga4ae8debadf6d2a691badae0b53ea3ba0\">&#9670;&nbsp;</a></span>GLFW_KEY_K</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_K&#160;&#160;&#160;75</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"gaaa8b54a13f6b1eed85ac86f82d550db2\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gaaa8b54a13f6b1eed85ac86f82d550db2\">&#9670;&nbsp;</a></span>GLFW_KEY_L</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_L&#160;&#160;&#160;76</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"ga4d7f0260c82e4ea3d6ebc7a21d6e3716\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga4d7f0260c82e4ea3d6ebc7a21d6e3716\">&#9670;&nbsp;</a></span>GLFW_KEY_M</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_M&#160;&#160;&#160;77</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"gae00856dfeb5d13aafebf59d44de5cdda\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gae00856dfeb5d13aafebf59d44de5cdda\">&#9670;&nbsp;</a></span>GLFW_KEY_N</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_N&#160;&#160;&#160;78</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"gaecbbb79130df419d58dd7f09a169efe9\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gaecbbb79130df419d58dd7f09a169efe9\">&#9670;&nbsp;</a></span>GLFW_KEY_O</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_O&#160;&#160;&#160;79</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"ga8fc15819c1094fb2afa01d84546b33e1\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga8fc15819c1094fb2afa01d84546b33e1\">&#9670;&nbsp;</a></span>GLFW_KEY_P</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_P&#160;&#160;&#160;80</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"gafdd01e38b120d67cf51e348bb47f3964\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gafdd01e38b120d67cf51e348bb47f3964\">&#9670;&nbsp;</a></span>GLFW_KEY_Q</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_Q&#160;&#160;&#160;81</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"ga4ce6c70a0c98c50b3fe4ab9a728d4d36\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga4ce6c70a0c98c50b3fe4ab9a728d4d36\">&#9670;&nbsp;</a></span>GLFW_KEY_R</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_R&#160;&#160;&#160;82</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"ga1570e2ccaab036ea82bed66fc1dab2a9\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga1570e2ccaab036ea82bed66fc1dab2a9\">&#9670;&nbsp;</a></span>GLFW_KEY_S</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_S&#160;&#160;&#160;83</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"ga90e0560422ec7a30e7f3f375bc9f37f9\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga90e0560422ec7a30e7f3f375bc9f37f9\">&#9670;&nbsp;</a></span>GLFW_KEY_T</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_T&#160;&#160;&#160;84</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"gacad52f3bf7d378fc0ffa72a76769256d\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gacad52f3bf7d378fc0ffa72a76769256d\">&#9670;&nbsp;</a></span>GLFW_KEY_U</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_U&#160;&#160;&#160;85</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"ga22c7763899ecf7788862e5f90eacce6b\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga22c7763899ecf7788862e5f90eacce6b\">&#9670;&nbsp;</a></span>GLFW_KEY_V</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_V&#160;&#160;&#160;86</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"gaa06a712e6202661fc03da5bdb7b6e545\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gaa06a712e6202661fc03da5bdb7b6e545\">&#9670;&nbsp;</a></span>GLFW_KEY_W</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_W&#160;&#160;&#160;87</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"gac1c42c0bf4192cea713c55598b06b744\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gac1c42c0bf4192cea713c55598b06b744\">&#9670;&nbsp;</a></span>GLFW_KEY_X</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_X&#160;&#160;&#160;88</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"gafd9f115a549effdf8e372a787c360313\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gafd9f115a549effdf8e372a787c360313\">&#9670;&nbsp;</a></span>GLFW_KEY_Y</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_Y&#160;&#160;&#160;89</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"gac489e208c26afda8d4938ed88718760a\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gac489e208c26afda8d4938ed88718760a\">&#9670;&nbsp;</a></span>GLFW_KEY_Z</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_Z&#160;&#160;&#160;90</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"gad1c8d9adac53925276ecb1d592511d8a\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gad1c8d9adac53925276ecb1d592511d8a\">&#9670;&nbsp;</a></span>GLFW_KEY_LEFT_BRACKET</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_LEFT_BRACKET&#160;&#160;&#160;91  /* [ */</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"gab8155ea99d1ab27ff56f24f8dc73f8d1\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gab8155ea99d1ab27ff56f24f8dc73f8d1\">&#9670;&nbsp;</a></span>GLFW_KEY_BACKSLASH</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_BACKSLASH&#160;&#160;&#160;92  /* \\ */</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"ga86ef225fd6a66404caae71044cdd58d8\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga86ef225fd6a66404caae71044cdd58d8\">&#9670;&nbsp;</a></span>GLFW_KEY_RIGHT_BRACKET</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_RIGHT_BRACKET&#160;&#160;&#160;93  /* ] */</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"ga7a3701fb4e2a0b136ff4b568c3c8d668\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga7a3701fb4e2a0b136ff4b568c3c8d668\">&#9670;&nbsp;</a></span>GLFW_KEY_GRAVE_ACCENT</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_GRAVE_ACCENT&#160;&#160;&#160;96  /* ` */</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"gadc78dad3dab76bcd4b5c20114052577a\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gadc78dad3dab76bcd4b5c20114052577a\">&#9670;&nbsp;</a></span>GLFW_KEY_WORLD_1</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_WORLD_1&#160;&#160;&#160;161 /* non-US #1 */</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"ga20494bfebf0bb4fc9503afca18ab2c5e\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga20494bfebf0bb4fc9503afca18ab2c5e\">&#9670;&nbsp;</a></span>GLFW_KEY_WORLD_2</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_WORLD_2&#160;&#160;&#160;162 /* non-US #2 */</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"gaac6596c350b635c245113b81c2123b93\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gaac6596c350b635c245113b81c2123b93\">&#9670;&nbsp;</a></span>GLFW_KEY_ESCAPE</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_ESCAPE&#160;&#160;&#160;256</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"ga9555a92ecbecdbc1f3435219c571d667\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga9555a92ecbecdbc1f3435219c571d667\">&#9670;&nbsp;</a></span>GLFW_KEY_ENTER</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_ENTER&#160;&#160;&#160;257</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"ga6908a4bda9950a3e2b73f794bbe985df\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga6908a4bda9950a3e2b73f794bbe985df\">&#9670;&nbsp;</a></span>GLFW_KEY_TAB</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_TAB&#160;&#160;&#160;258</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"ga6c0df1fe2f156bbd5a98c66d76ff3635\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga6c0df1fe2f156bbd5a98c66d76ff3635\">&#9670;&nbsp;</a></span>GLFW_KEY_BACKSPACE</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_BACKSPACE&#160;&#160;&#160;259</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"ga373ac7365435d6b0eb1068f470e34f47\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga373ac7365435d6b0eb1068f470e34f47\">&#9670;&nbsp;</a></span>GLFW_KEY_INSERT</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_INSERT&#160;&#160;&#160;260</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"gadb111e4df74b8a715f2c05dad58d2682\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gadb111e4df74b8a715f2c05dad58d2682\">&#9670;&nbsp;</a></span>GLFW_KEY_DELETE</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_DELETE&#160;&#160;&#160;261</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"ga06ba07662e8c291a4a84535379ffc7ac\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga06ba07662e8c291a4a84535379ffc7ac\">&#9670;&nbsp;</a></span>GLFW_KEY_RIGHT</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_RIGHT&#160;&#160;&#160;262</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"gae12a010d33c309a67ab9460c51eb2462\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gae12a010d33c309a67ab9460c51eb2462\">&#9670;&nbsp;</a></span>GLFW_KEY_LEFT</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_LEFT&#160;&#160;&#160;263</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"gae2e3958c71595607416aa7bf082be2f9\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gae2e3958c71595607416aa7bf082be2f9\">&#9670;&nbsp;</a></span>GLFW_KEY_DOWN</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_DOWN&#160;&#160;&#160;264</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"ga2f3342b194020d3544c67e3506b6f144\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga2f3342b194020d3544c67e3506b6f144\">&#9670;&nbsp;</a></span>GLFW_KEY_UP</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_UP&#160;&#160;&#160;265</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"ga3ab731f9622f0db280178a5f3cc6d586\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga3ab731f9622f0db280178a5f3cc6d586\">&#9670;&nbsp;</a></span>GLFW_KEY_PAGE_UP</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_PAGE_UP&#160;&#160;&#160;266</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"gaee0a8fa442001cc2147812f84b59041c\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gaee0a8fa442001cc2147812f84b59041c\">&#9670;&nbsp;</a></span>GLFW_KEY_PAGE_DOWN</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_PAGE_DOWN&#160;&#160;&#160;267</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"ga41452c7287195d481e43207318c126a7\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga41452c7287195d481e43207318c126a7\">&#9670;&nbsp;</a></span>GLFW_KEY_HOME</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_HOME&#160;&#160;&#160;268</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"ga86587ea1df19a65978d3e3b8439bedd9\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga86587ea1df19a65978d3e3b8439bedd9\">&#9670;&nbsp;</a></span>GLFW_KEY_END</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_END&#160;&#160;&#160;269</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"ga92c1d2c9d63485f3d70f94f688d48672\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga92c1d2c9d63485f3d70f94f688d48672\">&#9670;&nbsp;</a></span>GLFW_KEY_CAPS_LOCK</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_CAPS_LOCK&#160;&#160;&#160;280</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"gaf622b63b9537f7084c2ab649b8365630\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gaf622b63b9537f7084c2ab649b8365630\">&#9670;&nbsp;</a></span>GLFW_KEY_SCROLL_LOCK</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_SCROLL_LOCK&#160;&#160;&#160;281</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"ga3946edc362aeff213b2be6304296cf43\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga3946edc362aeff213b2be6304296cf43\">&#9670;&nbsp;</a></span>GLFW_KEY_NUM_LOCK</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_NUM_LOCK&#160;&#160;&#160;282</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"gaf964c2e65e97d0cf785a5636ee8df642\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gaf964c2e65e97d0cf785a5636ee8df642\">&#9670;&nbsp;</a></span>GLFW_KEY_PRINT_SCREEN</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_PRINT_SCREEN&#160;&#160;&#160;283</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"ga8116b9692d87382afb5849b6d8907f18\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga8116b9692d87382afb5849b6d8907f18\">&#9670;&nbsp;</a></span>GLFW_KEY_PAUSE</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_PAUSE&#160;&#160;&#160;284</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"gafb8d66c573acf22e364049477dcbea30\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gafb8d66c573acf22e364049477dcbea30\">&#9670;&nbsp;</a></span>GLFW_KEY_F1</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_F1&#160;&#160;&#160;290</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"ga0900750aff94889b940f5e428c07daee\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga0900750aff94889b940f5e428c07daee\">&#9670;&nbsp;</a></span>GLFW_KEY_F2</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_F2&#160;&#160;&#160;291</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"gaed7cd729c0147a551bb8b7bb36c17015\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gaed7cd729c0147a551bb8b7bb36c17015\">&#9670;&nbsp;</a></span>GLFW_KEY_F3</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_F3&#160;&#160;&#160;292</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"ga9b61ebd0c63b44b7332fda2c9763eaa6\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga9b61ebd0c63b44b7332fda2c9763eaa6\">&#9670;&nbsp;</a></span>GLFW_KEY_F4</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_F4&#160;&#160;&#160;293</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"gaf258dda9947daa428377938ed577c8c2\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gaf258dda9947daa428377938ed577c8c2\">&#9670;&nbsp;</a></span>GLFW_KEY_F5</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_F5&#160;&#160;&#160;294</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"ga6dc2d3f87b9d51ffbbbe2ef0299d8e1d\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga6dc2d3f87b9d51ffbbbe2ef0299d8e1d\">&#9670;&nbsp;</a></span>GLFW_KEY_F6</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_F6&#160;&#160;&#160;295</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"gacca6ef8a2162c52a0ac1d881e8d9c38a\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gacca6ef8a2162c52a0ac1d881e8d9c38a\">&#9670;&nbsp;</a></span>GLFW_KEY_F7</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_F7&#160;&#160;&#160;296</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"gac9d39390336ae14e4a93e295de43c7e8\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gac9d39390336ae14e4a93e295de43c7e8\">&#9670;&nbsp;</a></span>GLFW_KEY_F8</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_F8&#160;&#160;&#160;297</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"gae40de0de1c9f21cd26c9afa3d7050851\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gae40de0de1c9f21cd26c9afa3d7050851\">&#9670;&nbsp;</a></span>GLFW_KEY_F9</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_F9&#160;&#160;&#160;298</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"ga718d11d2f7d57471a2f6a894235995b1\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga718d11d2f7d57471a2f6a894235995b1\">&#9670;&nbsp;</a></span>GLFW_KEY_F10</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_F10&#160;&#160;&#160;299</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"ga0bc04b11627e7d69339151e7306b2832\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga0bc04b11627e7d69339151e7306b2832\">&#9670;&nbsp;</a></span>GLFW_KEY_F11</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_F11&#160;&#160;&#160;300</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"gaf5908fa9b0a906ae03fc2c61ac7aa3e2\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gaf5908fa9b0a906ae03fc2c61ac7aa3e2\">&#9670;&nbsp;</a></span>GLFW_KEY_F12</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_F12&#160;&#160;&#160;301</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"gad637f4308655e1001bd6ad942bc0fd4b\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gad637f4308655e1001bd6ad942bc0fd4b\">&#9670;&nbsp;</a></span>GLFW_KEY_F13</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_F13&#160;&#160;&#160;302</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"gaf14c66cff3396e5bd46e803c035e6c1f\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gaf14c66cff3396e5bd46e803c035e6c1f\">&#9670;&nbsp;</a></span>GLFW_KEY_F14</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_F14&#160;&#160;&#160;303</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"ga7f70970db6e8be1794da8516a6d14058\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga7f70970db6e8be1794da8516a6d14058\">&#9670;&nbsp;</a></span>GLFW_KEY_F15</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_F15&#160;&#160;&#160;304</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"gaa582dbb1d2ba2050aa1dca0838095b27\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gaa582dbb1d2ba2050aa1dca0838095b27\">&#9670;&nbsp;</a></span>GLFW_KEY_F16</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_F16&#160;&#160;&#160;305</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"ga972ce5c365e2394b36104b0e3125c748\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga972ce5c365e2394b36104b0e3125c748\">&#9670;&nbsp;</a></span>GLFW_KEY_F17</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_F17&#160;&#160;&#160;306</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"gaebf6391058d5566601e357edc5ea737c\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gaebf6391058d5566601e357edc5ea737c\">&#9670;&nbsp;</a></span>GLFW_KEY_F18</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_F18&#160;&#160;&#160;307</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"gaec011d9ba044058cb54529da710e9791\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gaec011d9ba044058cb54529da710e9791\">&#9670;&nbsp;</a></span>GLFW_KEY_F19</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_F19&#160;&#160;&#160;308</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"ga82b9c721ada04cd5ca8de767da38022f\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga82b9c721ada04cd5ca8de767da38022f\">&#9670;&nbsp;</a></span>GLFW_KEY_F20</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_F20&#160;&#160;&#160;309</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"ga356afb14d3440ff2bb378f74f7ebc60f\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga356afb14d3440ff2bb378f74f7ebc60f\">&#9670;&nbsp;</a></span>GLFW_KEY_F21</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_F21&#160;&#160;&#160;310</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"ga90960bd2a155f2b09675324d3dff1565\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga90960bd2a155f2b09675324d3dff1565\">&#9670;&nbsp;</a></span>GLFW_KEY_F22</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_F22&#160;&#160;&#160;311</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"ga43c21099aac10952d1be909a8ddee4d5\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga43c21099aac10952d1be909a8ddee4d5\">&#9670;&nbsp;</a></span>GLFW_KEY_F23</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_F23&#160;&#160;&#160;312</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"ga8150374677b5bed3043408732152dea2\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga8150374677b5bed3043408732152dea2\">&#9670;&nbsp;</a></span>GLFW_KEY_F24</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_F24&#160;&#160;&#160;313</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"gaa4bbd93ed73bb4c6ae7d83df880b7199\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gaa4bbd93ed73bb4c6ae7d83df880b7199\">&#9670;&nbsp;</a></span>GLFW_KEY_F25</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_F25&#160;&#160;&#160;314</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"ga10515dafc55b71e7683f5b4fedd1c70d\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga10515dafc55b71e7683f5b4fedd1c70d\">&#9670;&nbsp;</a></span>GLFW_KEY_KP_0</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_KP_0&#160;&#160;&#160;320</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"gaf3a29a334402c5eaf0b3439edf5587c3\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gaf3a29a334402c5eaf0b3439edf5587c3\">&#9670;&nbsp;</a></span>GLFW_KEY_KP_1</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_KP_1&#160;&#160;&#160;321</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"gaf82d5a802ab8213c72653d7480c16f13\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gaf82d5a802ab8213c72653d7480c16f13\">&#9670;&nbsp;</a></span>GLFW_KEY_KP_2</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_KP_2&#160;&#160;&#160;322</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"ga7e25ff30d56cd512828c1d4ae8d54ef2\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga7e25ff30d56cd512828c1d4ae8d54ef2\">&#9670;&nbsp;</a></span>GLFW_KEY_KP_3</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_KP_3&#160;&#160;&#160;323</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"gada7ec86778b85e0b4de0beea72234aea\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gada7ec86778b85e0b4de0beea72234aea\">&#9670;&nbsp;</a></span>GLFW_KEY_KP_4</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_KP_4&#160;&#160;&#160;324</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"ga9a5be274434866c51738cafbb6d26b45\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga9a5be274434866c51738cafbb6d26b45\">&#9670;&nbsp;</a></span>GLFW_KEY_KP_5</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_KP_5&#160;&#160;&#160;325</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"gafc141b0f8450519084c01092a3157faa\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gafc141b0f8450519084c01092a3157faa\">&#9670;&nbsp;</a></span>GLFW_KEY_KP_6</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_KP_6&#160;&#160;&#160;326</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"ga8882f411f05d04ec77a9563974bbfa53\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga8882f411f05d04ec77a9563974bbfa53\">&#9670;&nbsp;</a></span>GLFW_KEY_KP_7</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_KP_7&#160;&#160;&#160;327</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"gab2ea2e6a12f89d315045af520ac78cec\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gab2ea2e6a12f89d315045af520ac78cec\">&#9670;&nbsp;</a></span>GLFW_KEY_KP_8</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_KP_8&#160;&#160;&#160;328</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"gafb21426b630ed4fcc084868699ba74c1\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gafb21426b630ed4fcc084868699ba74c1\">&#9670;&nbsp;</a></span>GLFW_KEY_KP_9</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_KP_9&#160;&#160;&#160;329</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"ga4e231d968796331a9ea0dbfb98d4005b\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga4e231d968796331a9ea0dbfb98d4005b\">&#9670;&nbsp;</a></span>GLFW_KEY_KP_DECIMAL</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_KP_DECIMAL&#160;&#160;&#160;330</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"gabca1733780a273d549129ad0f250d1e5\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gabca1733780a273d549129ad0f250d1e5\">&#9670;&nbsp;</a></span>GLFW_KEY_KP_DIVIDE</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_KP_DIVIDE&#160;&#160;&#160;331</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"ga9ada267eb0e78ed2ada8701dd24a56ef\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga9ada267eb0e78ed2ada8701dd24a56ef\">&#9670;&nbsp;</a></span>GLFW_KEY_KP_MULTIPLY</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_KP_MULTIPLY&#160;&#160;&#160;332</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"gaa3dbd60782ff93d6082a124bce1fa236\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gaa3dbd60782ff93d6082a124bce1fa236\">&#9670;&nbsp;</a></span>GLFW_KEY_KP_SUBTRACT</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_KP_SUBTRACT&#160;&#160;&#160;333</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"gad09c7c98acc79e89aa6a0a91275becac\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gad09c7c98acc79e89aa6a0a91275becac\">&#9670;&nbsp;</a></span>GLFW_KEY_KP_ADD</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_KP_ADD&#160;&#160;&#160;334</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"ga4f728f8738f2986bd63eedd3d412e8cf\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga4f728f8738f2986bd63eedd3d412e8cf\">&#9670;&nbsp;</a></span>GLFW_KEY_KP_ENTER</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_KP_ENTER&#160;&#160;&#160;335</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"gaebdc76d4a808191e6d21b7e4ad2acd97\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gaebdc76d4a808191e6d21b7e4ad2acd97\">&#9670;&nbsp;</a></span>GLFW_KEY_KP_EQUAL</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_KP_EQUAL&#160;&#160;&#160;336</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"ga8a530a28a65c44ab5d00b759b756d3f6\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga8a530a28a65c44ab5d00b759b756d3f6\">&#9670;&nbsp;</a></span>GLFW_KEY_LEFT_SHIFT</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_LEFT_SHIFT&#160;&#160;&#160;340</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"ga9f97b743e81460ac4b2deddecd10a464\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga9f97b743e81460ac4b2deddecd10a464\">&#9670;&nbsp;</a></span>GLFW_KEY_LEFT_CONTROL</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_LEFT_CONTROL&#160;&#160;&#160;341</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"ga7f27dabf63a7789daa31e1c96790219b\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga7f27dabf63a7789daa31e1c96790219b\">&#9670;&nbsp;</a></span>GLFW_KEY_LEFT_ALT</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_LEFT_ALT&#160;&#160;&#160;342</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"gafb1207c91997fc295afd1835fbc5641a\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gafb1207c91997fc295afd1835fbc5641a\">&#9670;&nbsp;</a></span>GLFW_KEY_LEFT_SUPER</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_LEFT_SUPER&#160;&#160;&#160;343</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"gaffca36b99c9dce1a19cb9befbadce691\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gaffca36b99c9dce1a19cb9befbadce691\">&#9670;&nbsp;</a></span>GLFW_KEY_RIGHT_SHIFT</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_RIGHT_SHIFT&#160;&#160;&#160;344</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"gad1ca2094b2694e7251d0ab1fd34f8519\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gad1ca2094b2694e7251d0ab1fd34f8519\">&#9670;&nbsp;</a></span>GLFW_KEY_RIGHT_CONTROL</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_RIGHT_CONTROL&#160;&#160;&#160;345</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"ga687b38009131cfdd07a8d05fff8fa446\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga687b38009131cfdd07a8d05fff8fa446\">&#9670;&nbsp;</a></span>GLFW_KEY_RIGHT_ALT</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_RIGHT_ALT&#160;&#160;&#160;346</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"gad4547a3e8e247594acb60423fe6502db\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gad4547a3e8e247594acb60423fe6502db\">&#9670;&nbsp;</a></span>GLFW_KEY_RIGHT_SUPER</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_RIGHT_SUPER&#160;&#160;&#160;347</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"ga9845be48a745fc232045c9ec174d8820\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga9845be48a745fc232045c9ec174d8820\">&#9670;&nbsp;</a></span>GLFW_KEY_MENU</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_MENU&#160;&#160;&#160;348</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"ga442cbaef7bfb9a4ba13594dd7fbf2789\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga442cbaef7bfb9a4ba13594dd7fbf2789\">&#9670;&nbsp;</a></span>GLFW_KEY_LAST</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_KEY_LAST&#160;&#160;&#160;<a class=\"el\" href=\"group__keys.html#ga9845be48a745fc232045c9ec174d8820\">GLFW_KEY_MENU</a></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n</div><!-- contents -->\n<address class=\"footer\">\n<p>\nLast update on Mon Jan 20 2020 for GLFW 3.3.2\n</p>\n</address>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/group__mods.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta http-equiv=\"X-UA-Compatible\" content=\"IE=9\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<title>GLFW: Modifier key flags</title>\n<link href=\"tabs.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"jquery.js\"></script>\n<script type=\"text/javascript\" src=\"dynsections.js\"></script>\n<link href=\"search/search.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"search/searchdata.js\"></script>\n<script type=\"text/javascript\" src=\"search/search.js\"></script>\n<link href=\"doxygen.css\" rel=\"stylesheet\" type=\"text/css\" />\n<link href=\"extra.css\" rel=\"stylesheet\" type=\"text/css\"/>\n</head>\n<body>\n<div id=\"top\"><!-- do not remove this div, it is closed by doxygen! -->\n<div id=\"titlearea\">\n\t<div class=\"glfwheader\">\n\t\t<a href=\"https://www.glfw.org/\" id=\"glfwhome\">GLFW</a>\n\t\t<ul class=\"glfwnavbar\">\n\t\t\t<li><a href=\"https://www.glfw.org/documentation.html\">Documentation</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/download.html\">Download</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/community.html\">Community</a></li>\n\t\t</ul>\n\t</div>\n</div>\n<!-- end header part -->\n<!-- Generated by Doxygen 1.8.16 -->\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\nvar searchBox = new SearchBox(\"searchBox\", \"search\",false,'Search');\n/* @license-end */\n</script>\n<script type=\"text/javascript\" src=\"menudata.js\"></script>\n<script type=\"text/javascript\" src=\"menu.js\"></script>\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\n$(function() {\n  initMenu('',true,false,'search.php','Search');\n  $(document).ready(function() { init_search(); });\n});\n/* @license-end */</script>\n<div id=\"main-nav\"></div>\n</div><!-- top -->\n<!-- window showing the filter options -->\n<div id=\"MSearchSelectWindow\"\n     onmouseover=\"return searchBox.OnSearchSelectShow()\"\n     onmouseout=\"return searchBox.OnSearchSelectHide()\"\n     onkeydown=\"return searchBox.OnSearchSelectKey(event)\">\n</div>\n\n<!-- iframe showing the search results (closed by default) -->\n<div id=\"MSearchResultsWindow\">\n<iframe src=\"javascript:void(0)\" frameborder=\"0\" \n        name=\"MSearchResults\" id=\"MSearchResults\">\n</iframe>\n</div>\n\n<div class=\"header\">\n  <div class=\"summary\">\n<a href=\"#define-members\">Macros</a>  </div>\n  <div class=\"headertitle\">\n<div class=\"title\">Modifier key flags<div class=\"ingroups\"><a class=\"el\" href=\"group__input.html\">Input reference</a></div></div>  </div>\n</div><!--header-->\n<div class=\"contents\">\n<a name=\"details\" id=\"details\"></a><h2 class=\"groupheader\">Description</h2>\n<p>See <a class=\"el\" href=\"input_guide.html#input_key\">key input</a> for how these are used. </p>\n<table class=\"memberdecls\">\n<tr class=\"heading\"><td colspan=\"2\"><h2 class=\"groupheader\"><a name=\"define-members\"></a>\nMacros</h2></td></tr>\n<tr class=\"memitem:ga14994d3196c290aaa347248e51740274\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__mods.html#ga14994d3196c290aaa347248e51740274\">GLFW_MOD_SHIFT</a>&#160;&#160;&#160;0x0001</td></tr>\n<tr class=\"memdesc:ga14994d3196c290aaa347248e51740274\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">If this bit is set one or more Shift keys were held down.  <a href=\"group__mods.html#ga14994d3196c290aaa347248e51740274\">More...</a><br /></td></tr>\n<tr class=\"separator:ga14994d3196c290aaa347248e51740274\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga6ed94871c3208eefd85713fa929d45aa\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__mods.html#ga6ed94871c3208eefd85713fa929d45aa\">GLFW_MOD_CONTROL</a>&#160;&#160;&#160;0x0002</td></tr>\n<tr class=\"memdesc:ga6ed94871c3208eefd85713fa929d45aa\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">If this bit is set one or more Control keys were held down.  <a href=\"group__mods.html#ga6ed94871c3208eefd85713fa929d45aa\">More...</a><br /></td></tr>\n<tr class=\"separator:ga6ed94871c3208eefd85713fa929d45aa\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gad2acd5633463c29e07008687ea73c0f4\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__mods.html#gad2acd5633463c29e07008687ea73c0f4\">GLFW_MOD_ALT</a>&#160;&#160;&#160;0x0004</td></tr>\n<tr class=\"memdesc:gad2acd5633463c29e07008687ea73c0f4\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">If this bit is set one or more Alt keys were held down.  <a href=\"group__mods.html#gad2acd5633463c29e07008687ea73c0f4\">More...</a><br /></td></tr>\n<tr class=\"separator:gad2acd5633463c29e07008687ea73c0f4\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga6b64ba10ea0227cf6f42efd0a220aba1\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__mods.html#ga6b64ba10ea0227cf6f42efd0a220aba1\">GLFW_MOD_SUPER</a>&#160;&#160;&#160;0x0008</td></tr>\n<tr class=\"memdesc:ga6b64ba10ea0227cf6f42efd0a220aba1\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">If this bit is set one or more Super keys were held down.  <a href=\"group__mods.html#ga6b64ba10ea0227cf6f42efd0a220aba1\">More...</a><br /></td></tr>\n<tr class=\"separator:ga6b64ba10ea0227cf6f42efd0a220aba1\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gaefeef8fcf825a6e43e241b337897200f\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__mods.html#gaefeef8fcf825a6e43e241b337897200f\">GLFW_MOD_CAPS_LOCK</a>&#160;&#160;&#160;0x0010</td></tr>\n<tr class=\"memdesc:gaefeef8fcf825a6e43e241b337897200f\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">If this bit is set the Caps Lock key is enabled.  <a href=\"group__mods.html#gaefeef8fcf825a6e43e241b337897200f\">More...</a><br /></td></tr>\n<tr class=\"separator:gaefeef8fcf825a6e43e241b337897200f\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga64e020b8a42af8376e944baf61feecbe\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__mods.html#ga64e020b8a42af8376e944baf61feecbe\">GLFW_MOD_NUM_LOCK</a>&#160;&#160;&#160;0x0020</td></tr>\n<tr class=\"memdesc:ga64e020b8a42af8376e944baf61feecbe\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">If this bit is set the Num Lock key is enabled.  <a href=\"group__mods.html#ga64e020b8a42af8376e944baf61feecbe\">More...</a><br /></td></tr>\n<tr class=\"separator:ga64e020b8a42af8376e944baf61feecbe\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n</table>\n<h2 class=\"groupheader\">Macro Definition Documentation</h2>\n<a id=\"ga14994d3196c290aaa347248e51740274\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga14994d3196c290aaa347248e51740274\">&#9670;&nbsp;</a></span>GLFW_MOD_SHIFT</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_MOD_SHIFT&#160;&#160;&#160;0x0001</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>If this bit is set one or more Shift keys were held down. </p>\n\n</div>\n</div>\n<a id=\"ga6ed94871c3208eefd85713fa929d45aa\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga6ed94871c3208eefd85713fa929d45aa\">&#9670;&nbsp;</a></span>GLFW_MOD_CONTROL</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_MOD_CONTROL&#160;&#160;&#160;0x0002</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>If this bit is set one or more Control keys were held down. </p>\n\n</div>\n</div>\n<a id=\"gad2acd5633463c29e07008687ea73c0f4\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gad2acd5633463c29e07008687ea73c0f4\">&#9670;&nbsp;</a></span>GLFW_MOD_ALT</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_MOD_ALT&#160;&#160;&#160;0x0004</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>If this bit is set one or more Alt keys were held down. </p>\n\n</div>\n</div>\n<a id=\"ga6b64ba10ea0227cf6f42efd0a220aba1\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga6b64ba10ea0227cf6f42efd0a220aba1\">&#9670;&nbsp;</a></span>GLFW_MOD_SUPER</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_MOD_SUPER&#160;&#160;&#160;0x0008</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>If this bit is set one or more Super keys were held down. </p>\n\n</div>\n</div>\n<a id=\"gaefeef8fcf825a6e43e241b337897200f\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gaefeef8fcf825a6e43e241b337897200f\">&#9670;&nbsp;</a></span>GLFW_MOD_CAPS_LOCK</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_MOD_CAPS_LOCK&#160;&#160;&#160;0x0010</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>If this bit is set the Caps Lock key is enabled and the <a class=\"el\" href=\"input_guide.html#GLFW_LOCK_KEY_MODS\">GLFW_LOCK_KEY_MODS</a> input mode is set. </p>\n\n</div>\n</div>\n<a id=\"ga64e020b8a42af8376e944baf61feecbe\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga64e020b8a42af8376e944baf61feecbe\">&#9670;&nbsp;</a></span>GLFW_MOD_NUM_LOCK</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_MOD_NUM_LOCK&#160;&#160;&#160;0x0020</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>If this bit is set the Num Lock key is enabled and the <a class=\"el\" href=\"input_guide.html#GLFW_LOCK_KEY_MODS\">GLFW_LOCK_KEY_MODS</a> input mode is set. </p>\n\n</div>\n</div>\n</div><!-- contents -->\n<address class=\"footer\">\n<p>\nLast update on Mon Jan 20 2020 for GLFW 3.3.2\n</p>\n</address>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/group__monitor.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta http-equiv=\"X-UA-Compatible\" content=\"IE=9\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<title>GLFW: Monitor reference</title>\n<link href=\"tabs.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"jquery.js\"></script>\n<script type=\"text/javascript\" src=\"dynsections.js\"></script>\n<link href=\"search/search.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"search/searchdata.js\"></script>\n<script type=\"text/javascript\" src=\"search/search.js\"></script>\n<link href=\"doxygen.css\" rel=\"stylesheet\" type=\"text/css\" />\n<link href=\"extra.css\" rel=\"stylesheet\" type=\"text/css\"/>\n</head>\n<body>\n<div id=\"top\"><!-- do not remove this div, it is closed by doxygen! -->\n<div id=\"titlearea\">\n\t<div class=\"glfwheader\">\n\t\t<a href=\"https://www.glfw.org/\" id=\"glfwhome\">GLFW</a>\n\t\t<ul class=\"glfwnavbar\">\n\t\t\t<li><a href=\"https://www.glfw.org/documentation.html\">Documentation</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/download.html\">Download</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/community.html\">Community</a></li>\n\t\t</ul>\n\t</div>\n</div>\n<!-- end header part -->\n<!-- Generated by Doxygen 1.8.16 -->\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\nvar searchBox = new SearchBox(\"searchBox\", \"search\",false,'Search');\n/* @license-end */\n</script>\n<script type=\"text/javascript\" src=\"menudata.js\"></script>\n<script type=\"text/javascript\" src=\"menu.js\"></script>\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\n$(function() {\n  initMenu('',true,false,'search.php','Search');\n  $(document).ready(function() { init_search(); });\n});\n/* @license-end */</script>\n<div id=\"main-nav\"></div>\n</div><!-- top -->\n<!-- window showing the filter options -->\n<div id=\"MSearchSelectWindow\"\n     onmouseover=\"return searchBox.OnSearchSelectShow()\"\n     onmouseout=\"return searchBox.OnSearchSelectHide()\"\n     onkeydown=\"return searchBox.OnSearchSelectKey(event)\">\n</div>\n\n<!-- iframe showing the search results (closed by default) -->\n<div id=\"MSearchResultsWindow\">\n<iframe src=\"javascript:void(0)\" frameborder=\"0\" \n        name=\"MSearchResults\" id=\"MSearchResults\">\n</iframe>\n</div>\n\n<div class=\"header\">\n  <div class=\"summary\">\n<a href=\"#typedef-members\">Typedefs</a> &#124;\n<a href=\"#func-members\">Functions</a>  </div>\n  <div class=\"headertitle\">\n<div class=\"title\">Monitor reference</div>  </div>\n</div><!--header-->\n<div class=\"contents\">\n<a name=\"details\" id=\"details\"></a><h2 class=\"groupheader\">Description</h2>\n<p>This is the reference documentation for monitor related functions and types. For more task-oriented information, see the <a class=\"el\" href=\"monitor_guide.html\">Monitor guide</a>. </p>\n<table class=\"memberdecls\">\n<tr class=\"heading\"><td colspan=\"2\"><h2 class=\"groupheader\"><a name=\"typedef-members\"></a>\nTypedefs</h2></td></tr>\n<tr class=\"memitem:ga8d9efd1cde9426692c73fe40437d0ae3\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">typedef struct <a class=\"el\" href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a>&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a></td></tr>\n<tr class=\"memdesc:ga8d9efd1cde9426692c73fe40437d0ae3\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Opaque monitor object.  <a href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">More...</a><br /></td></tr>\n<tr class=\"separator:ga8d9efd1cde9426692c73fe40437d0ae3\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga8a7ee579a66720f24d656526f3e44c63\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">typedef void(*&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__monitor.html#ga8a7ee579a66720f24d656526f3e44c63\">GLFWmonitorfun</a>) (<a class=\"el\" href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a> *, int)</td></tr>\n<tr class=\"memdesc:ga8a7ee579a66720f24d656526f3e44c63\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">The function pointer type for monitor configuration callbacks.  <a href=\"group__monitor.html#ga8a7ee579a66720f24d656526f3e44c63\">More...</a><br /></td></tr>\n<tr class=\"separator:ga8a7ee579a66720f24d656526f3e44c63\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gae48aadf4ea0967e6605c8f58fa5daccb\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">typedef struct <a class=\"el\" href=\"structGLFWvidmode.html\">GLFWvidmode</a>&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__monitor.html#gae48aadf4ea0967e6605c8f58fa5daccb\">GLFWvidmode</a></td></tr>\n<tr class=\"memdesc:gae48aadf4ea0967e6605c8f58fa5daccb\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Video mode type.  <a href=\"group__monitor.html#gae48aadf4ea0967e6605c8f58fa5daccb\">More...</a><br /></td></tr>\n<tr class=\"separator:gae48aadf4ea0967e6605c8f58fa5daccb\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gaec0bd37af673be8813592849f13e02f0\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">typedef struct <a class=\"el\" href=\"structGLFWgammaramp.html\">GLFWgammaramp</a>&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__monitor.html#gaec0bd37af673be8813592849f13e02f0\">GLFWgammaramp</a></td></tr>\n<tr class=\"memdesc:gaec0bd37af673be8813592849f13e02f0\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Gamma ramp.  <a href=\"group__monitor.html#gaec0bd37af673be8813592849f13e02f0\">More...</a><br /></td></tr>\n<tr class=\"separator:gaec0bd37af673be8813592849f13e02f0\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n</table><table class=\"memberdecls\">\n<tr class=\"heading\"><td colspan=\"2\"><h2 class=\"groupheader\"><a name=\"func-members\"></a>\nFunctions</h2></td></tr>\n<tr class=\"memitem:ga3fba51c8bd36491d4712aa5bd074a537\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\"><a class=\"el\" href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a> **&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__monitor.html#ga3fba51c8bd36491d4712aa5bd074a537\">glfwGetMonitors</a> (int *count)</td></tr>\n<tr class=\"memdesc:ga3fba51c8bd36491d4712aa5bd074a537\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns the currently connected monitors.  <a href=\"group__monitor.html#ga3fba51c8bd36491d4712aa5bd074a537\">More...</a><br /></td></tr>\n<tr class=\"separator:ga3fba51c8bd36491d4712aa5bd074a537\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga721867d84c6d18d6790d64d2847ca0b1\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\"><a class=\"el\" href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a> *&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__monitor.html#ga721867d84c6d18d6790d64d2847ca0b1\">glfwGetPrimaryMonitor</a> (void)</td></tr>\n<tr class=\"memdesc:ga721867d84c6d18d6790d64d2847ca0b1\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns the primary monitor.  <a href=\"group__monitor.html#ga721867d84c6d18d6790d64d2847ca0b1\">More...</a><br /></td></tr>\n<tr class=\"separator:ga721867d84c6d18d6790d64d2847ca0b1\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga102f54e7acc9149edbcf0997152df8c9\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">void&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__monitor.html#ga102f54e7acc9149edbcf0997152df8c9\">glfwGetMonitorPos</a> (<a class=\"el\" href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a> *monitor, int *xpos, int *ypos)</td></tr>\n<tr class=\"memdesc:ga102f54e7acc9149edbcf0997152df8c9\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns the position of the monitor's viewport on the virtual screen.  <a href=\"group__monitor.html#ga102f54e7acc9149edbcf0997152df8c9\">More...</a><br /></td></tr>\n<tr class=\"separator:ga102f54e7acc9149edbcf0997152df8c9\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga7387a3bdb64bfe8ebf2b9e54f5b6c9d0\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">void&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__monitor.html#ga7387a3bdb64bfe8ebf2b9e54f5b6c9d0\">glfwGetMonitorWorkarea</a> (<a class=\"el\" href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a> *monitor, int *xpos, int *ypos, int *width, int *height)</td></tr>\n<tr class=\"memdesc:ga7387a3bdb64bfe8ebf2b9e54f5b6c9d0\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Retrieves the work area of the monitor.  <a href=\"group__monitor.html#ga7387a3bdb64bfe8ebf2b9e54f5b6c9d0\">More...</a><br /></td></tr>\n<tr class=\"separator:ga7387a3bdb64bfe8ebf2b9e54f5b6c9d0\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga7d8bffc6c55539286a6bd20d32a8d7ea\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">void&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__monitor.html#ga7d8bffc6c55539286a6bd20d32a8d7ea\">glfwGetMonitorPhysicalSize</a> (<a class=\"el\" href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a> *monitor, int *widthMM, int *heightMM)</td></tr>\n<tr class=\"memdesc:ga7d8bffc6c55539286a6bd20d32a8d7ea\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns the physical size of the monitor.  <a href=\"group__monitor.html#ga7d8bffc6c55539286a6bd20d32a8d7ea\">More...</a><br /></td></tr>\n<tr class=\"separator:ga7d8bffc6c55539286a6bd20d32a8d7ea\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gad3152e84465fa620b601265ebfcdb21b\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">void&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__monitor.html#gad3152e84465fa620b601265ebfcdb21b\">glfwGetMonitorContentScale</a> (<a class=\"el\" href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a> *monitor, float *xscale, float *yscale)</td></tr>\n<tr class=\"memdesc:gad3152e84465fa620b601265ebfcdb21b\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Retrieves the content scale for the specified monitor.  <a href=\"group__monitor.html#gad3152e84465fa620b601265ebfcdb21b\">More...</a><br /></td></tr>\n<tr class=\"separator:gad3152e84465fa620b601265ebfcdb21b\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga79a34ee22ff080ca954a9663e4679daf\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">const char *&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__monitor.html#ga79a34ee22ff080ca954a9663e4679daf\">glfwGetMonitorName</a> (<a class=\"el\" href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a> *monitor)</td></tr>\n<tr class=\"memdesc:ga79a34ee22ff080ca954a9663e4679daf\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns the name of the specified monitor.  <a href=\"group__monitor.html#ga79a34ee22ff080ca954a9663e4679daf\">More...</a><br /></td></tr>\n<tr class=\"separator:ga79a34ee22ff080ca954a9663e4679daf\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga702750e24313a686d3637297b6e85fda\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">void&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__monitor.html#ga702750e24313a686d3637297b6e85fda\">glfwSetMonitorUserPointer</a> (<a class=\"el\" href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a> *monitor, void *pointer)</td></tr>\n<tr class=\"memdesc:ga702750e24313a686d3637297b6e85fda\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Sets the user pointer of the specified monitor.  <a href=\"group__monitor.html#ga702750e24313a686d3637297b6e85fda\">More...</a><br /></td></tr>\n<tr class=\"separator:ga702750e24313a686d3637297b6e85fda\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gac2d4209016b049222877f620010ed0d8\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">void *&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__monitor.html#gac2d4209016b049222877f620010ed0d8\">glfwGetMonitorUserPointer</a> (<a class=\"el\" href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a> *monitor)</td></tr>\n<tr class=\"memdesc:gac2d4209016b049222877f620010ed0d8\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns the user pointer of the specified monitor.  <a href=\"group__monitor.html#gac2d4209016b049222877f620010ed0d8\">More...</a><br /></td></tr>\n<tr class=\"separator:gac2d4209016b049222877f620010ed0d8\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gab39df645587c8518192aa746c2fb06c3\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\"><a class=\"el\" href=\"group__monitor.html#ga8a7ee579a66720f24d656526f3e44c63\">GLFWmonitorfun</a>&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__monitor.html#gab39df645587c8518192aa746c2fb06c3\">glfwSetMonitorCallback</a> (<a class=\"el\" href=\"group__monitor.html#ga8a7ee579a66720f24d656526f3e44c63\">GLFWmonitorfun</a> callback)</td></tr>\n<tr class=\"memdesc:gab39df645587c8518192aa746c2fb06c3\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Sets the monitor configuration callback.  <a href=\"group__monitor.html#gab39df645587c8518192aa746c2fb06c3\">More...</a><br /></td></tr>\n<tr class=\"separator:gab39df645587c8518192aa746c2fb06c3\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga820b0ce9a5237d645ea7cbb4bd383458\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">const <a class=\"el\" href=\"structGLFWvidmode.html\">GLFWvidmode</a> *&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__monitor.html#ga820b0ce9a5237d645ea7cbb4bd383458\">glfwGetVideoModes</a> (<a class=\"el\" href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a> *monitor, int *count)</td></tr>\n<tr class=\"memdesc:ga820b0ce9a5237d645ea7cbb4bd383458\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns the available video modes for the specified monitor.  <a href=\"group__monitor.html#ga820b0ce9a5237d645ea7cbb4bd383458\">More...</a><br /></td></tr>\n<tr class=\"separator:ga820b0ce9a5237d645ea7cbb4bd383458\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gafc1bb972a921ad5b3bd5d63a95fc2d52\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">const <a class=\"el\" href=\"structGLFWvidmode.html\">GLFWvidmode</a> *&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__monitor.html#gafc1bb972a921ad5b3bd5d63a95fc2d52\">glfwGetVideoMode</a> (<a class=\"el\" href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a> *monitor)</td></tr>\n<tr class=\"memdesc:gafc1bb972a921ad5b3bd5d63a95fc2d52\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns the current mode of the specified monitor.  <a href=\"group__monitor.html#gafc1bb972a921ad5b3bd5d63a95fc2d52\">More...</a><br /></td></tr>\n<tr class=\"separator:gafc1bb972a921ad5b3bd5d63a95fc2d52\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga6ac582625c990220785ddd34efa3169a\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">void&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__monitor.html#ga6ac582625c990220785ddd34efa3169a\">glfwSetGamma</a> (<a class=\"el\" href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a> *monitor, float gamma)</td></tr>\n<tr class=\"memdesc:ga6ac582625c990220785ddd34efa3169a\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Generates a gamma ramp and sets it for the specified monitor.  <a href=\"group__monitor.html#ga6ac582625c990220785ddd34efa3169a\">More...</a><br /></td></tr>\n<tr class=\"separator:ga6ac582625c990220785ddd34efa3169a\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gab7c41deb2219bde3e1eb756ddaa9ec80\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">const <a class=\"el\" href=\"structGLFWgammaramp.html\">GLFWgammaramp</a> *&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__monitor.html#gab7c41deb2219bde3e1eb756ddaa9ec80\">glfwGetGammaRamp</a> (<a class=\"el\" href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a> *monitor)</td></tr>\n<tr class=\"memdesc:gab7c41deb2219bde3e1eb756ddaa9ec80\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns the current gamma ramp for the specified monitor.  <a href=\"group__monitor.html#gab7c41deb2219bde3e1eb756ddaa9ec80\">More...</a><br /></td></tr>\n<tr class=\"separator:gab7c41deb2219bde3e1eb756ddaa9ec80\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga583f0ffd0d29613d8cd172b996bbf0dd\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">void&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__monitor.html#ga583f0ffd0d29613d8cd172b996bbf0dd\">glfwSetGammaRamp</a> (<a class=\"el\" href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a> *monitor, const <a class=\"el\" href=\"structGLFWgammaramp.html\">GLFWgammaramp</a> *ramp)</td></tr>\n<tr class=\"memdesc:ga583f0ffd0d29613d8cd172b996bbf0dd\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Sets the current gamma ramp for the specified monitor.  <a href=\"group__monitor.html#ga583f0ffd0d29613d8cd172b996bbf0dd\">More...</a><br /></td></tr>\n<tr class=\"separator:ga583f0ffd0d29613d8cd172b996bbf0dd\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n</table>\n<h2 class=\"groupheader\">Typedef Documentation</h2>\n<a id=\"ga8d9efd1cde9426692c73fe40437d0ae3\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga8d9efd1cde9426692c73fe40437d0ae3\">&#9670;&nbsp;</a></span>GLFWmonitor</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">typedef struct <a class=\"el\" href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a> <a class=\"el\" href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>Opaque monitor object.</p>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"monitor_guide.html#monitor_object\">Monitor objects</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>\n\n</div>\n</div>\n<a id=\"ga8a7ee579a66720f24d656526f3e44c63\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga8a7ee579a66720f24d656526f3e44c63\">&#9670;&nbsp;</a></span>GLFWmonitorfun</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">typedef void(*  GLFWmonitorfun) (<a class=\"el\" href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a> *, int)</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This is the function pointer type for monitor configuration callbacks. A monitor callback function has the following signature: </p><div class=\"fragment\"><div class=\"line\"><span class=\"keywordtype\">void</span> function_name(<a class=\"code\" href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a>* monitor, <span class=\"keywordtype\">int</span> event)</div>\n</div><!-- fragment --><dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">monitor</td><td>The monitor that was connected or disconnected. </td></tr>\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">event</td><td>One of <code>GLFW_CONNECTED</code> or <code>GLFW_DISCONNECTED</code>. Future releases may add more events.</td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"monitor_guide.html#monitor_event\">Monitor configuration changes</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__monitor.html#gab39df645587c8518192aa746c2fb06c3\">glfwSetMonitorCallback</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>\n\n</div>\n</div>\n<a id=\"gae48aadf4ea0967e6605c8f58fa5daccb\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gae48aadf4ea0967e6605c8f58fa5daccb\">&#9670;&nbsp;</a></span>GLFWvidmode</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">typedef struct <a class=\"el\" href=\"structGLFWvidmode.html\">GLFWvidmode</a>  <a class=\"el\" href=\"structGLFWvidmode.html\">GLFWvidmode</a></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This describes a single video mode.</p>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"monitor_guide.html#monitor_modes\">Video modes</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__monitor.html#gafc1bb972a921ad5b3bd5d63a95fc2d52\">glfwGetVideoMode</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__monitor.html#ga820b0ce9a5237d645ea7cbb4bd383458\">glfwGetVideoModes</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 1.0. <b>GLFW 3:</b> Added refresh rate member. </dd></dl>\n\n</div>\n</div>\n<a id=\"gaec0bd37af673be8813592849f13e02f0\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gaec0bd37af673be8813592849f13e02f0\">&#9670;&nbsp;</a></span>GLFWgammaramp</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">typedef struct <a class=\"el\" href=\"structGLFWgammaramp.html\">GLFWgammaramp</a>  <a class=\"el\" href=\"structGLFWgammaramp.html\">GLFWgammaramp</a></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This describes the gamma ramp for a monitor.</p>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"monitor_guide.html#monitor_gamma\">Gamma ramp</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__monitor.html#gab7c41deb2219bde3e1eb756ddaa9ec80\">glfwGetGammaRamp</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__monitor.html#ga583f0ffd0d29613d8cd172b996bbf0dd\">glfwSetGammaRamp</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>\n\n</div>\n</div>\n<h2 class=\"groupheader\">Function Documentation</h2>\n<a id=\"ga3fba51c8bd36491d4712aa5bd074a537\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga3fba51c8bd36491d4712aa5bd074a537\">&#9670;&nbsp;</a></span>glfwGetMonitors()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\"><a class=\"el\" href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a>** glfwGetMonitors </td>\n          <td>(</td>\n          <td class=\"paramtype\">int *&#160;</td>\n          <td class=\"paramname\"><em>count</em></td><td>)</td>\n          <td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function returns an array of handles for all currently connected monitors. The primary monitor is always first in the returned array. If no monitors were found, this function returns <code>NULL</code>.</p>\n<dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[out]</td><td class=\"paramname\">count</td><td>Where to store the number of monitors in the returned array. This is set to zero if an error occurred. </td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section return\"><dt>Returns</dt><dd>An array of monitor handles, or <code>NULL</code> if no monitors were found or if an <a class=\"el\" href=\"intro_guide.html#error_handling\">error</a> occurred.</dd></dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a>.</dd></dl>\n<dl class=\"section user\"><dt>Pointer lifetime</dt><dd>The returned array is allocated and freed by GLFW. You should not free it yourself. It is guaranteed to be valid only until the monitor configuration changes or the library is terminated.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"monitor_guide.html#monitor_monitors\">Retrieving monitors</a> </dd>\n<dd>\n<a class=\"el\" href=\"monitor_guide.html#monitor_event\">Monitor configuration changes</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__monitor.html#ga721867d84c6d18d6790d64d2847ca0b1\">glfwGetPrimaryMonitor</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>\n\n</div>\n</div>\n<a id=\"ga721867d84c6d18d6790d64d2847ca0b1\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga721867d84c6d18d6790d64d2847ca0b1\">&#9670;&nbsp;</a></span>glfwGetPrimaryMonitor()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\"><a class=\"el\" href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a>* glfwGetPrimaryMonitor </td>\n          <td>(</td>\n          <td class=\"paramtype\">void&#160;</td>\n          <td class=\"paramname\"></td><td>)</td>\n          <td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function returns the primary monitor. This is usually the monitor where elements like the task bar or global menu bar are located.</p>\n<dl class=\"section return\"><dt>Returns</dt><dd>The primary monitor, or <code>NULL</code> if no monitors were found or if an <a class=\"el\" href=\"intro_guide.html#error_handling\">error</a> occurred.</dd></dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a>.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>\n<dl class=\"section remark\"><dt>Remarks</dt><dd>The primary monitor is always first in the array returned by <a class=\"el\" href=\"group__monitor.html#ga3fba51c8bd36491d4712aa5bd074a537\">glfwGetMonitors</a>.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"monitor_guide.html#monitor_monitors\">Retrieving monitors</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__monitor.html#ga3fba51c8bd36491d4712aa5bd074a537\">glfwGetMonitors</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>\n\n</div>\n</div>\n<a id=\"ga102f54e7acc9149edbcf0997152df8c9\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga102f54e7acc9149edbcf0997152df8c9\">&#9670;&nbsp;</a></span>glfwGetMonitorPos()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">void glfwGetMonitorPos </td>\n          <td>(</td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a> *&#160;</td>\n          <td class=\"paramname\"><em>monitor</em>, </td>\n        </tr>\n        <tr>\n          <td class=\"paramkey\"></td>\n          <td></td>\n          <td class=\"paramtype\">int *&#160;</td>\n          <td class=\"paramname\"><em>xpos</em>, </td>\n        </tr>\n        <tr>\n          <td class=\"paramkey\"></td>\n          <td></td>\n          <td class=\"paramtype\">int *&#160;</td>\n          <td class=\"paramname\"><em>ypos</em>&#160;</td>\n        </tr>\n        <tr>\n          <td></td>\n          <td>)</td>\n          <td></td><td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function returns the position, in screen coordinates, of the upper-left corner of the specified monitor.</p>\n<p>Any or all of the position arguments may be <code>NULL</code>. If an error occurs, all non-<code>NULL</code> position arguments will be set to zero.</p>\n<dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">monitor</td><td>The monitor to query. </td></tr>\n    <tr><td class=\"paramdir\">[out]</td><td class=\"paramname\">xpos</td><td>Where to store the monitor x-coordinate, or <code>NULL</code>. </td></tr>\n    <tr><td class=\"paramdir\">[out]</td><td class=\"paramname\">ypos</td><td>Where to store the monitor y-coordinate, or <code>NULL</code>.</td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a> and <a class=\"el\" href=\"group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1\">GLFW_PLATFORM_ERROR</a>.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"monitor_guide.html#monitor_properties\">Monitor properties</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>\n\n</div>\n</div>\n<a id=\"ga7387a3bdb64bfe8ebf2b9e54f5b6c9d0\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga7387a3bdb64bfe8ebf2b9e54f5b6c9d0\">&#9670;&nbsp;</a></span>glfwGetMonitorWorkarea()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">void glfwGetMonitorWorkarea </td>\n          <td>(</td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a> *&#160;</td>\n          <td class=\"paramname\"><em>monitor</em>, </td>\n        </tr>\n        <tr>\n          <td class=\"paramkey\"></td>\n          <td></td>\n          <td class=\"paramtype\">int *&#160;</td>\n          <td class=\"paramname\"><em>xpos</em>, </td>\n        </tr>\n        <tr>\n          <td class=\"paramkey\"></td>\n          <td></td>\n          <td class=\"paramtype\">int *&#160;</td>\n          <td class=\"paramname\"><em>ypos</em>, </td>\n        </tr>\n        <tr>\n          <td class=\"paramkey\"></td>\n          <td></td>\n          <td class=\"paramtype\">int *&#160;</td>\n          <td class=\"paramname\"><em>width</em>, </td>\n        </tr>\n        <tr>\n          <td class=\"paramkey\"></td>\n          <td></td>\n          <td class=\"paramtype\">int *&#160;</td>\n          <td class=\"paramname\"><em>height</em>&#160;</td>\n        </tr>\n        <tr>\n          <td></td>\n          <td>)</td>\n          <td></td><td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function returns the position, in screen coordinates, of the upper-left corner of the work area of the specified monitor along with the work area size in screen coordinates. The work area is defined as the area of the monitor not occluded by the operating system task bar where present. If no task bar exists then the work area is the monitor resolution in screen coordinates.</p>\n<p>Any or all of the position and size arguments may be <code>NULL</code>. If an error occurs, all non-<code>NULL</code> position and size arguments will be set to zero.</p>\n<dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">monitor</td><td>The monitor to query. </td></tr>\n    <tr><td class=\"paramdir\">[out]</td><td class=\"paramname\">xpos</td><td>Where to store the monitor x-coordinate, or <code>NULL</code>. </td></tr>\n    <tr><td class=\"paramdir\">[out]</td><td class=\"paramname\">ypos</td><td>Where to store the monitor y-coordinate, or <code>NULL</code>. </td></tr>\n    <tr><td class=\"paramdir\">[out]</td><td class=\"paramname\">width</td><td>Where to store the monitor width, or <code>NULL</code>. </td></tr>\n    <tr><td class=\"paramdir\">[out]</td><td class=\"paramname\">height</td><td>Where to store the monitor height, or <code>NULL</code>.</td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a> and <a class=\"el\" href=\"group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1\">GLFW_PLATFORM_ERROR</a>.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"monitor_guide.html#monitor_workarea\">Work area</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.3. </dd></dl>\n\n</div>\n</div>\n<a id=\"ga7d8bffc6c55539286a6bd20d32a8d7ea\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga7d8bffc6c55539286a6bd20d32a8d7ea\">&#9670;&nbsp;</a></span>glfwGetMonitorPhysicalSize()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">void glfwGetMonitorPhysicalSize </td>\n          <td>(</td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a> *&#160;</td>\n          <td class=\"paramname\"><em>monitor</em>, </td>\n        </tr>\n        <tr>\n          <td class=\"paramkey\"></td>\n          <td></td>\n          <td class=\"paramtype\">int *&#160;</td>\n          <td class=\"paramname\"><em>widthMM</em>, </td>\n        </tr>\n        <tr>\n          <td class=\"paramkey\"></td>\n          <td></td>\n          <td class=\"paramtype\">int *&#160;</td>\n          <td class=\"paramname\"><em>heightMM</em>&#160;</td>\n        </tr>\n        <tr>\n          <td></td>\n          <td>)</td>\n          <td></td><td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function returns the size, in millimetres, of the display area of the specified monitor.</p>\n<p>Some systems do not provide accurate monitor size information, either because the monitor <a href=\"https://en.wikipedia.org/wiki/Extended_display_identification_data\">EDID</a> data is incorrect or because the driver does not report it accurately.</p>\n<p>Any or all of the size arguments may be <code>NULL</code>. If an error occurs, all non-<code>NULL</code> size arguments will be set to zero.</p>\n<dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">monitor</td><td>The monitor to query. </td></tr>\n    <tr><td class=\"paramdir\">[out]</td><td class=\"paramname\">widthMM</td><td>Where to store the width, in millimetres, of the monitor's display area, or <code>NULL</code>. </td></tr>\n    <tr><td class=\"paramdir\">[out]</td><td class=\"paramname\">heightMM</td><td>Where to store the height, in millimetres, of the monitor's display area, or <code>NULL</code>.</td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a>.</dd></dl>\n<dl class=\"section remark\"><dt>Remarks</dt><dd><b>Windows:</b> calculates the returned physical size from the current resolution and system DPI instead of querying the monitor EDID data.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"monitor_guide.html#monitor_properties\">Monitor properties</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>\n\n</div>\n</div>\n<a id=\"gad3152e84465fa620b601265ebfcdb21b\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gad3152e84465fa620b601265ebfcdb21b\">&#9670;&nbsp;</a></span>glfwGetMonitorContentScale()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">void glfwGetMonitorContentScale </td>\n          <td>(</td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a> *&#160;</td>\n          <td class=\"paramname\"><em>monitor</em>, </td>\n        </tr>\n        <tr>\n          <td class=\"paramkey\"></td>\n          <td></td>\n          <td class=\"paramtype\">float *&#160;</td>\n          <td class=\"paramname\"><em>xscale</em>, </td>\n        </tr>\n        <tr>\n          <td class=\"paramkey\"></td>\n          <td></td>\n          <td class=\"paramtype\">float *&#160;</td>\n          <td class=\"paramname\"><em>yscale</em>&#160;</td>\n        </tr>\n        <tr>\n          <td></td>\n          <td>)</td>\n          <td></td><td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function retrieves the content scale for the specified monitor. The content scale is the ratio between the current DPI and the platform's default DPI. This is especially important for text and any UI elements. If the pixel dimensions of your UI scaled by this look appropriate on your machine then it should appear at a reasonable size on other machines regardless of their DPI and scaling settings. This relies on the system DPI and scaling settings being somewhat correct.</p>\n<p>The content scale may depend on both the monitor resolution and pixel density and on user settings. It may be very different from the raw DPI calculated from the physical size and current resolution.</p>\n<dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">monitor</td><td>The monitor to query. </td></tr>\n    <tr><td class=\"paramdir\">[out]</td><td class=\"paramname\">xscale</td><td>Where to store the x-axis content scale, or <code>NULL</code>. </td></tr>\n    <tr><td class=\"paramdir\">[out]</td><td class=\"paramname\">yscale</td><td>Where to store the y-axis content scale, or <code>NULL</code>.</td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a> and <a class=\"el\" href=\"group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1\">GLFW_PLATFORM_ERROR</a>.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"monitor_guide.html#monitor_scale\">Content scale</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__window.html#gaf5d31de9c19c4f994facea64d2b3106c\">glfwGetWindowContentScale</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.3. </dd></dl>\n\n</div>\n</div>\n<a id=\"ga79a34ee22ff080ca954a9663e4679daf\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga79a34ee22ff080ca954a9663e4679daf\">&#9670;&nbsp;</a></span>glfwGetMonitorName()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">const char* glfwGetMonitorName </td>\n          <td>(</td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a> *&#160;</td>\n          <td class=\"paramname\"><em>monitor</em></td><td>)</td>\n          <td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function returns a human-readable name, encoded as UTF-8, of the specified monitor. The name typically reflects the make and model of the monitor and is not guaranteed to be unique among the connected monitors.</p>\n<dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">monitor</td><td>The monitor to query. </td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section return\"><dt>Returns</dt><dd>The UTF-8 encoded name of the monitor, or <code>NULL</code> if an <a class=\"el\" href=\"intro_guide.html#error_handling\">error</a> occurred.</dd></dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a>.</dd></dl>\n<dl class=\"section user\"><dt>Pointer lifetime</dt><dd>The returned string is allocated and freed by GLFW. You should not free it yourself. It is valid until the specified monitor is disconnected or the library is terminated.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"monitor_guide.html#monitor_properties\">Monitor properties</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>\n\n</div>\n</div>\n<a id=\"ga702750e24313a686d3637297b6e85fda\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga702750e24313a686d3637297b6e85fda\">&#9670;&nbsp;</a></span>glfwSetMonitorUserPointer()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">void glfwSetMonitorUserPointer </td>\n          <td>(</td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a> *&#160;</td>\n          <td class=\"paramname\"><em>monitor</em>, </td>\n        </tr>\n        <tr>\n          <td class=\"paramkey\"></td>\n          <td></td>\n          <td class=\"paramtype\">void *&#160;</td>\n          <td class=\"paramname\"><em>pointer</em>&#160;</td>\n        </tr>\n        <tr>\n          <td></td>\n          <td>)</td>\n          <td></td><td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function sets the user-defined pointer of the specified monitor. The current value is retained until the monitor is disconnected. The initial value is <code>NULL</code>.</p>\n<p>This function may be called from the monitor callback, even for a monitor that is being disconnected.</p>\n<dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">monitor</td><td>The monitor whose pointer to set. </td></tr>\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">pointer</td><td>The new value.</td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a>.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function may be called from any thread. Access is not synchronized.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"monitor_guide.html#monitor_userptr\">User pointer</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__monitor.html#gac2d4209016b049222877f620010ed0d8\">glfwGetMonitorUserPointer</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.3. </dd></dl>\n\n</div>\n</div>\n<a id=\"gac2d4209016b049222877f620010ed0d8\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gac2d4209016b049222877f620010ed0d8\">&#9670;&nbsp;</a></span>glfwGetMonitorUserPointer()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">void* glfwGetMonitorUserPointer </td>\n          <td>(</td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a> *&#160;</td>\n          <td class=\"paramname\"><em>monitor</em></td><td>)</td>\n          <td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function returns the current value of the user-defined pointer of the specified monitor. The initial value is <code>NULL</code>.</p>\n<p>This function may be called from the monitor callback, even for a monitor that is being disconnected.</p>\n<dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">monitor</td><td>The monitor whose pointer to return.</td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a>.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function may be called from any thread. Access is not synchronized.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"monitor_guide.html#monitor_userptr\">User pointer</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__monitor.html#ga702750e24313a686d3637297b6e85fda\">glfwSetMonitorUserPointer</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.3. </dd></dl>\n\n</div>\n</div>\n<a id=\"gab39df645587c8518192aa746c2fb06c3\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gab39df645587c8518192aa746c2fb06c3\">&#9670;&nbsp;</a></span>glfwSetMonitorCallback()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\"><a class=\"el\" href=\"group__monitor.html#ga8a7ee579a66720f24d656526f3e44c63\">GLFWmonitorfun</a> glfwSetMonitorCallback </td>\n          <td>(</td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__monitor.html#ga8a7ee579a66720f24d656526f3e44c63\">GLFWmonitorfun</a>&#160;</td>\n          <td class=\"paramname\"><em>callback</em></td><td>)</td>\n          <td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function sets the monitor configuration callback, or removes the currently set callback. This is called when a monitor is connected to or disconnected from the system.</p>\n<dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">callback</td><td>The new callback, or <code>NULL</code> to remove the currently set callback. </td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section return\"><dt>Returns</dt><dd>The previously set callback, or <code>NULL</code> if no callback was set or the library had not been <a class=\"el\" href=\"intro_guide.html#intro_init\">initialized</a>.</dd></dl>\n<dl class=\"section user\"><dt>Callback signature</dt><dd><div class=\"fragment\"><div class=\"line\"><span class=\"keywordtype\">void</span> function_name(<a class=\"code\" href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a>* monitor, <span class=\"keywordtype\">int</span> event)</div>\n</div><!-- fragment --> For more information about the callback parameters, see the <a class=\"el\" href=\"group__monitor.html#ga8a7ee579a66720f24d656526f3e44c63\">function pointer type</a>.</dd></dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a>.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"monitor_guide.html#monitor_event\">Monitor configuration changes</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>\n\n</div>\n</div>\n<a id=\"ga820b0ce9a5237d645ea7cbb4bd383458\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga820b0ce9a5237d645ea7cbb4bd383458\">&#9670;&nbsp;</a></span>glfwGetVideoModes()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">const <a class=\"el\" href=\"structGLFWvidmode.html\">GLFWvidmode</a>* glfwGetVideoModes </td>\n          <td>(</td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a> *&#160;</td>\n          <td class=\"paramname\"><em>monitor</em>, </td>\n        </tr>\n        <tr>\n          <td class=\"paramkey\"></td>\n          <td></td>\n          <td class=\"paramtype\">int *&#160;</td>\n          <td class=\"paramname\"><em>count</em>&#160;</td>\n        </tr>\n        <tr>\n          <td></td>\n          <td>)</td>\n          <td></td><td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function returns an array of all video modes supported by the specified monitor. The returned array is sorted in ascending order, first by color bit depth (the sum of all channel depths) and then by resolution area (the product of width and height).</p>\n<dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">monitor</td><td>The monitor to query. </td></tr>\n    <tr><td class=\"paramdir\">[out]</td><td class=\"paramname\">count</td><td>Where to store the number of video modes in the returned array. This is set to zero if an error occurred. </td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section return\"><dt>Returns</dt><dd>An array of video modes, or <code>NULL</code> if an <a class=\"el\" href=\"intro_guide.html#error_handling\">error</a> occurred.</dd></dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a> and <a class=\"el\" href=\"group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1\">GLFW_PLATFORM_ERROR</a>.</dd></dl>\n<dl class=\"section user\"><dt>Pointer lifetime</dt><dd>The returned array is allocated and freed by GLFW. You should not free it yourself. It is valid until the specified monitor is disconnected, this function is called again for that monitor or the library is terminated.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"monitor_guide.html#monitor_modes\">Video modes</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__monitor.html#gafc1bb972a921ad5b3bd5d63a95fc2d52\">glfwGetVideoMode</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 1.0. <b>GLFW 3:</b> Changed to return an array of modes for a specific monitor. </dd></dl>\n\n</div>\n</div>\n<a id=\"gafc1bb972a921ad5b3bd5d63a95fc2d52\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gafc1bb972a921ad5b3bd5d63a95fc2d52\">&#9670;&nbsp;</a></span>glfwGetVideoMode()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">const <a class=\"el\" href=\"structGLFWvidmode.html\">GLFWvidmode</a>* glfwGetVideoMode </td>\n          <td>(</td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a> *&#160;</td>\n          <td class=\"paramname\"><em>monitor</em></td><td>)</td>\n          <td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function returns the current video mode of the specified monitor. If you have created a full screen window for that monitor, the return value will depend on whether that window is iconified.</p>\n<dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">monitor</td><td>The monitor to query. </td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section return\"><dt>Returns</dt><dd>The current mode of the monitor, or <code>NULL</code> if an <a class=\"el\" href=\"intro_guide.html#error_handling\">error</a> occurred.</dd></dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a> and <a class=\"el\" href=\"group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1\">GLFW_PLATFORM_ERROR</a>.</dd></dl>\n<dl class=\"section user\"><dt>Pointer lifetime</dt><dd>The returned array is allocated and freed by GLFW. You should not free it yourself. It is valid until the specified monitor is disconnected or the library is terminated.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"monitor_guide.html#monitor_modes\">Video modes</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__monitor.html#ga820b0ce9a5237d645ea7cbb4bd383458\">glfwGetVideoModes</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.0. Replaces <code>glfwGetDesktopMode</code>. </dd></dl>\n\n</div>\n</div>\n<a id=\"ga6ac582625c990220785ddd34efa3169a\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga6ac582625c990220785ddd34efa3169a\">&#9670;&nbsp;</a></span>glfwSetGamma()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">void glfwSetGamma </td>\n          <td>(</td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a> *&#160;</td>\n          <td class=\"paramname\"><em>monitor</em>, </td>\n        </tr>\n        <tr>\n          <td class=\"paramkey\"></td>\n          <td></td>\n          <td class=\"paramtype\">float&#160;</td>\n          <td class=\"paramname\"><em>gamma</em>&#160;</td>\n        </tr>\n        <tr>\n          <td></td>\n          <td>)</td>\n          <td></td><td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function generates an appropriately sized gamma ramp from the specified exponent and then calls <a class=\"el\" href=\"group__monitor.html#ga583f0ffd0d29613d8cd172b996bbf0dd\">glfwSetGammaRamp</a> with it. The value must be a finite number greater than zero.</p>\n<p>The software controlled gamma ramp is applied <em>in addition</em> to the hardware gamma correction, which today is usually an approximation of sRGB gamma. This means that setting a perfectly linear ramp, or gamma 1.0, will produce the default (usually sRGB-like) behavior.</p>\n<p>For gamma correct rendering with OpenGL or OpenGL ES, see the <a class=\"el\" href=\"window_guide.html#GLFW_SRGB_CAPABLE\">GLFW_SRGB_CAPABLE</a> hint.</p>\n<dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">monitor</td><td>The monitor whose gamma ramp to set. </td></tr>\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">gamma</td><td>The desired exponent.</td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a>, <a class=\"el\" href=\"group__errors.html#gaaf2ef9aa8202c2b82ac2d921e554c687\">GLFW_INVALID_VALUE</a> and <a class=\"el\" href=\"group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1\">GLFW_PLATFORM_ERROR</a>.</dd></dl>\n<dl class=\"section remark\"><dt>Remarks</dt><dd><b>Wayland:</b> Gamma handling is a privileged protocol, this function will thus never be implemented and emits <a class=\"el\" href=\"group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1\">GLFW_PLATFORM_ERROR</a>.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"monitor_guide.html#monitor_gamma\">Gamma ramp</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>\n\n</div>\n</div>\n<a id=\"gab7c41deb2219bde3e1eb756ddaa9ec80\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gab7c41deb2219bde3e1eb756ddaa9ec80\">&#9670;&nbsp;</a></span>glfwGetGammaRamp()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">const <a class=\"el\" href=\"structGLFWgammaramp.html\">GLFWgammaramp</a>* glfwGetGammaRamp </td>\n          <td>(</td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a> *&#160;</td>\n          <td class=\"paramname\"><em>monitor</em></td><td>)</td>\n          <td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function returns the current gamma ramp of the specified monitor.</p>\n<dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">monitor</td><td>The monitor to query. </td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section return\"><dt>Returns</dt><dd>The current gamma ramp, or <code>NULL</code> if an <a class=\"el\" href=\"intro_guide.html#error_handling\">error</a> occurred.</dd></dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a> and <a class=\"el\" href=\"group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1\">GLFW_PLATFORM_ERROR</a>.</dd></dl>\n<dl class=\"section remark\"><dt>Remarks</dt><dd><b>Wayland:</b> Gamma handling is a privileged protocol, this function will thus never be implemented and emits <a class=\"el\" href=\"group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1\">GLFW_PLATFORM_ERROR</a> while returning <code>NULL</code>.</dd></dl>\n<dl class=\"section user\"><dt>Pointer lifetime</dt><dd>The returned structure and its arrays are allocated and freed by GLFW. You should not free them yourself. They are valid until the specified monitor is disconnected, this function is called again for that monitor or the library is terminated.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"monitor_guide.html#monitor_gamma\">Gamma ramp</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>\n\n</div>\n</div>\n<a id=\"ga583f0ffd0d29613d8cd172b996bbf0dd\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga583f0ffd0d29613d8cd172b996bbf0dd\">&#9670;&nbsp;</a></span>glfwSetGammaRamp()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">void glfwSetGammaRamp </td>\n          <td>(</td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a> *&#160;</td>\n          <td class=\"paramname\"><em>monitor</em>, </td>\n        </tr>\n        <tr>\n          <td class=\"paramkey\"></td>\n          <td></td>\n          <td class=\"paramtype\">const <a class=\"el\" href=\"structGLFWgammaramp.html\">GLFWgammaramp</a> *&#160;</td>\n          <td class=\"paramname\"><em>ramp</em>&#160;</td>\n        </tr>\n        <tr>\n          <td></td>\n          <td>)</td>\n          <td></td><td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function sets the current gamma ramp for the specified monitor. The original gamma ramp for that monitor is saved by GLFW the first time this function is called and is restored by <a class=\"el\" href=\"group__init.html#gaaae48c0a18607ea4a4ba951d939f0901\">glfwTerminate</a>.</p>\n<p>The software controlled gamma ramp is applied <em>in addition</em> to the hardware gamma correction, which today is usually an approximation of sRGB gamma. This means that setting a perfectly linear ramp, or gamma 1.0, will produce the default (usually sRGB-like) behavior.</p>\n<p>For gamma correct rendering with OpenGL or OpenGL ES, see the <a class=\"el\" href=\"window_guide.html#GLFW_SRGB_CAPABLE\">GLFW_SRGB_CAPABLE</a> hint.</p>\n<dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">monitor</td><td>The monitor whose gamma ramp to set. </td></tr>\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">ramp</td><td>The gamma ramp to use.</td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a> and <a class=\"el\" href=\"group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1\">GLFW_PLATFORM_ERROR</a>.</dd></dl>\n<dl class=\"section remark\"><dt>Remarks</dt><dd>The size of the specified gamma ramp should match the size of the current ramp for that monitor.</dd>\n<dd>\n<b>Windows:</b> The gamma ramp size must be 256.</dd>\n<dd>\n<b>Wayland:</b> Gamma handling is a privileged protocol, this function will thus never be implemented and emits <a class=\"el\" href=\"group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1\">GLFW_PLATFORM_ERROR</a>.</dd></dl>\n<dl class=\"section user\"><dt>Pointer lifetime</dt><dd>The specified gamma ramp is copied before this function returns.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"monitor_guide.html#monitor_gamma\">Gamma ramp</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>\n\n</div>\n</div>\n</div><!-- contents -->\n<div class=\"ttc\" id=\"agroup__monitor_html_ga8d9efd1cde9426692c73fe40437d0ae3\"><div class=\"ttname\"><a href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a></div><div class=\"ttdeci\">struct GLFWmonitor GLFWmonitor</div><div class=\"ttdoc\">Opaque monitor object.</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:1140</div></div>\n<address class=\"footer\">\n<p>\nLast update on Mon Jan 20 2020 for GLFW 3.3.2\n</p>\n</address>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/group__native.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta http-equiv=\"X-UA-Compatible\" content=\"IE=9\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<title>GLFW: Native access</title>\n<link href=\"tabs.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"jquery.js\"></script>\n<script type=\"text/javascript\" src=\"dynsections.js\"></script>\n<link href=\"search/search.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"search/searchdata.js\"></script>\n<script type=\"text/javascript\" src=\"search/search.js\"></script>\n<link href=\"doxygen.css\" rel=\"stylesheet\" type=\"text/css\" />\n<link href=\"extra.css\" rel=\"stylesheet\" type=\"text/css\"/>\n</head>\n<body>\n<div id=\"top\"><!-- do not remove this div, it is closed by doxygen! -->\n<div id=\"titlearea\">\n\t<div class=\"glfwheader\">\n\t\t<a href=\"https://www.glfw.org/\" id=\"glfwhome\">GLFW</a>\n\t\t<ul class=\"glfwnavbar\">\n\t\t\t<li><a href=\"https://www.glfw.org/documentation.html\">Documentation</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/download.html\">Download</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/community.html\">Community</a></li>\n\t\t</ul>\n\t</div>\n</div>\n<!-- end header part -->\n<!-- Generated by Doxygen 1.8.16 -->\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\nvar searchBox = new SearchBox(\"searchBox\", \"search\",false,'Search');\n/* @license-end */\n</script>\n<script type=\"text/javascript\" src=\"menudata.js\"></script>\n<script type=\"text/javascript\" src=\"menu.js\"></script>\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\n$(function() {\n  initMenu('',true,false,'search.php','Search');\n  $(document).ready(function() { init_search(); });\n});\n/* @license-end */</script>\n<div id=\"main-nav\"></div>\n</div><!-- top -->\n<!-- window showing the filter options -->\n<div id=\"MSearchSelectWindow\"\n     onmouseover=\"return searchBox.OnSearchSelectShow()\"\n     onmouseout=\"return searchBox.OnSearchSelectHide()\"\n     onkeydown=\"return searchBox.OnSearchSelectKey(event)\">\n</div>\n\n<!-- iframe showing the search results (closed by default) -->\n<div id=\"MSearchResultsWindow\">\n<iframe src=\"javascript:void(0)\" frameborder=\"0\" \n        name=\"MSearchResults\" id=\"MSearchResults\">\n</iframe>\n</div>\n\n<div class=\"header\">\n  <div class=\"summary\">\n<a href=\"#func-members\">Functions</a>  </div>\n  <div class=\"headertitle\">\n<div class=\"title\">Native access</div>  </div>\n</div><!--header-->\n<div class=\"contents\">\n<a name=\"details\" id=\"details\"></a><h2 class=\"groupheader\">Description</h2>\n<p><b>By using the native access functions you assert that you know what you're doing and how to fix problems caused by using them. If you don't, you shouldn't be using them.</b></p>\n<p>Before the inclusion of <a class=\"el\" href=\"glfw3native_8h.html\">glfw3native.h</a>, you may define zero or more window system API macro and zero or more context creation API macros.</p>\n<p>The chosen backends must match those the library was compiled for. Failure to do this will cause a link-time error.</p>\n<p>The available window API macros are:</p><ul>\n<li><code>GLFW_EXPOSE_NATIVE_WIN32</code></li>\n<li><code>GLFW_EXPOSE_NATIVE_COCOA</code></li>\n<li><code>GLFW_EXPOSE_NATIVE_X11</code></li>\n<li><code>GLFW_EXPOSE_NATIVE_WAYLAND</code></li>\n</ul>\n<p>The available context API macros are:</p><ul>\n<li><code>GLFW_EXPOSE_NATIVE_WGL</code></li>\n<li><code>GLFW_EXPOSE_NATIVE_NSGL</code></li>\n<li><code>GLFW_EXPOSE_NATIVE_GLX</code></li>\n<li><code>GLFW_EXPOSE_NATIVE_EGL</code></li>\n<li><code>GLFW_EXPOSE_NATIVE_OSMESA</code></li>\n</ul>\n<p>These macros select which of the native access functions that are declared and which platform-specific headers to include. It is then up your (by definition platform-specific) code to handle which of these should be defined. </p>\n<table class=\"memberdecls\">\n<tr class=\"heading\"><td colspan=\"2\"><h2 class=\"groupheader\"><a name=\"func-members\"></a>\nFunctions</h2></td></tr>\n<tr class=\"memitem:gac84f63a3f9db145b9435e5e0dbc4183d\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">const char *&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__native.html#gac84f63a3f9db145b9435e5e0dbc4183d\">glfwGetWin32Adapter</a> (<a class=\"el\" href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a> *monitor)</td></tr>\n<tr class=\"memdesc:gac84f63a3f9db145b9435e5e0dbc4183d\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns the adapter device name of the specified monitor.  <a href=\"group__native.html#gac84f63a3f9db145b9435e5e0dbc4183d\">More...</a><br /></td></tr>\n<tr class=\"separator:gac84f63a3f9db145b9435e5e0dbc4183d\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gac408b09a330749402d5d1fa1f5894dd9\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">const char *&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__native.html#gac408b09a330749402d5d1fa1f5894dd9\">glfwGetWin32Monitor</a> (<a class=\"el\" href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a> *monitor)</td></tr>\n<tr class=\"memdesc:gac408b09a330749402d5d1fa1f5894dd9\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns the display device name of the specified monitor.  <a href=\"group__native.html#gac408b09a330749402d5d1fa1f5894dd9\">More...</a><br /></td></tr>\n<tr class=\"separator:gac408b09a330749402d5d1fa1f5894dd9\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gafe5079aa79038b0079fc09d5f0a8e667\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">HWND&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__native.html#gafe5079aa79038b0079fc09d5f0a8e667\">glfwGetWin32Window</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window)</td></tr>\n<tr class=\"memdesc:gafe5079aa79038b0079fc09d5f0a8e667\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns the <code>HWND</code> of the specified window.  <a href=\"group__native.html#gafe5079aa79038b0079fc09d5f0a8e667\">More...</a><br /></td></tr>\n<tr class=\"separator:gafe5079aa79038b0079fc09d5f0a8e667\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gadc4010d91d9cc1134d040eeb1202a143\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">HGLRC&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__native.html#gadc4010d91d9cc1134d040eeb1202a143\">glfwGetWGLContext</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window)</td></tr>\n<tr class=\"memdesc:gadc4010d91d9cc1134d040eeb1202a143\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns the <code>HGLRC</code> of the specified window.  <a href=\"group__native.html#gadc4010d91d9cc1134d040eeb1202a143\">More...</a><br /></td></tr>\n<tr class=\"separator:gadc4010d91d9cc1134d040eeb1202a143\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gaf22f429aec4b1aab316142d66d9be3e6\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">CGDirectDisplayID&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__native.html#gaf22f429aec4b1aab316142d66d9be3e6\">glfwGetCocoaMonitor</a> (<a class=\"el\" href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a> *monitor)</td></tr>\n<tr class=\"memdesc:gaf22f429aec4b1aab316142d66d9be3e6\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns the <code>CGDirectDisplayID</code> of the specified monitor.  <a href=\"group__native.html#gaf22f429aec4b1aab316142d66d9be3e6\">More...</a><br /></td></tr>\n<tr class=\"separator:gaf22f429aec4b1aab316142d66d9be3e6\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gac3ed9d495d0c2bb9652de5a50c648715\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">id&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__native.html#gac3ed9d495d0c2bb9652de5a50c648715\">glfwGetCocoaWindow</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window)</td></tr>\n<tr class=\"memdesc:gac3ed9d495d0c2bb9652de5a50c648715\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns the <code>NSWindow</code> of the specified window.  <a href=\"group__native.html#gac3ed9d495d0c2bb9652de5a50c648715\">More...</a><br /></td></tr>\n<tr class=\"separator:gac3ed9d495d0c2bb9652de5a50c648715\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga559e002e3cd63c979881770cd4dc63bc\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">id&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__native.html#ga559e002e3cd63c979881770cd4dc63bc\">glfwGetNSGLContext</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window)</td></tr>\n<tr class=\"memdesc:ga559e002e3cd63c979881770cd4dc63bc\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns the <code>NSOpenGLContext</code> of the specified window.  <a href=\"group__native.html#ga559e002e3cd63c979881770cd4dc63bc\">More...</a><br /></td></tr>\n<tr class=\"separator:ga559e002e3cd63c979881770cd4dc63bc\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga8519b66594ea3ef6eeafaa2e3ee37406\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">Display *&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__native.html#ga8519b66594ea3ef6eeafaa2e3ee37406\">glfwGetX11Display</a> (void)</td></tr>\n<tr class=\"memdesc:ga8519b66594ea3ef6eeafaa2e3ee37406\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns the <code>Display</code> used by GLFW.  <a href=\"group__native.html#ga8519b66594ea3ef6eeafaa2e3ee37406\">More...</a><br /></td></tr>\n<tr class=\"separator:ga8519b66594ea3ef6eeafaa2e3ee37406\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga088fbfa80f50569402b41be71ad66e40\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">RRCrtc&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__native.html#ga088fbfa80f50569402b41be71ad66e40\">glfwGetX11Adapter</a> (<a class=\"el\" href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a> *monitor)</td></tr>\n<tr class=\"memdesc:ga088fbfa80f50569402b41be71ad66e40\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns the <code>RRCrtc</code> of the specified monitor.  <a href=\"group__native.html#ga088fbfa80f50569402b41be71ad66e40\">More...</a><br /></td></tr>\n<tr class=\"separator:ga088fbfa80f50569402b41be71ad66e40\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gab2f8cc043905e9fa9b12bfdbbcfe874c\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">RROutput&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__native.html#gab2f8cc043905e9fa9b12bfdbbcfe874c\">glfwGetX11Monitor</a> (<a class=\"el\" href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a> *monitor)</td></tr>\n<tr class=\"memdesc:gab2f8cc043905e9fa9b12bfdbbcfe874c\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns the <code>RROutput</code> of the specified monitor.  <a href=\"group__native.html#gab2f8cc043905e9fa9b12bfdbbcfe874c\">More...</a><br /></td></tr>\n<tr class=\"separator:gab2f8cc043905e9fa9b12bfdbbcfe874c\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga90ca676322740842db446999a1b1f21d\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">Window&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__native.html#ga90ca676322740842db446999a1b1f21d\">glfwGetX11Window</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window)</td></tr>\n<tr class=\"memdesc:ga90ca676322740842db446999a1b1f21d\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns the <code>Window</code> of the specified window.  <a href=\"group__native.html#ga90ca676322740842db446999a1b1f21d\">More...</a><br /></td></tr>\n<tr class=\"separator:ga90ca676322740842db446999a1b1f21d\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga55f879ab02d93367f966186b6f0133f7\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">void&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__native.html#ga55f879ab02d93367f966186b6f0133f7\">glfwSetX11SelectionString</a> (const char *string)</td></tr>\n<tr class=\"memdesc:ga55f879ab02d93367f966186b6f0133f7\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Sets the current primary selection to the specified string.  <a href=\"group__native.html#ga55f879ab02d93367f966186b6f0133f7\">More...</a><br /></td></tr>\n<tr class=\"separator:ga55f879ab02d93367f966186b6f0133f7\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga72f23e3980b83788c70aa854eca31430\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">const char *&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__native.html#ga72f23e3980b83788c70aa854eca31430\">glfwGetX11SelectionString</a> (void)</td></tr>\n<tr class=\"memdesc:ga72f23e3980b83788c70aa854eca31430\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns the contents of the current primary selection as a string.  <a href=\"group__native.html#ga72f23e3980b83788c70aa854eca31430\">More...</a><br /></td></tr>\n<tr class=\"separator:ga72f23e3980b83788c70aa854eca31430\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga62d884114b0abfcdc2930e89f20867e2\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">GLXContext&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__native.html#ga62d884114b0abfcdc2930e89f20867e2\">glfwGetGLXContext</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window)</td></tr>\n<tr class=\"memdesc:ga62d884114b0abfcdc2930e89f20867e2\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns the <code>GLXContext</code> of the specified window.  <a href=\"group__native.html#ga62d884114b0abfcdc2930e89f20867e2\">More...</a><br /></td></tr>\n<tr class=\"separator:ga62d884114b0abfcdc2930e89f20867e2\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga1ed27b8766e859a21381e8f8ce18d049\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">GLXWindow&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__native.html#ga1ed27b8766e859a21381e8f8ce18d049\">glfwGetGLXWindow</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window)</td></tr>\n<tr class=\"memdesc:ga1ed27b8766e859a21381e8f8ce18d049\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns the <code>GLXWindow</code> of the specified window.  <a href=\"group__native.html#ga1ed27b8766e859a21381e8f8ce18d049\">More...</a><br /></td></tr>\n<tr class=\"separator:ga1ed27b8766e859a21381e8f8ce18d049\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gaaf8118a3c877f3a6bc8e7a649519de5e\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">struct wl_display *&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__native.html#gaaf8118a3c877f3a6bc8e7a649519de5e\">glfwGetWaylandDisplay</a> (void)</td></tr>\n<tr class=\"memdesc:gaaf8118a3c877f3a6bc8e7a649519de5e\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns the <code>struct wl_display*</code> used by GLFW.  <a href=\"group__native.html#gaaf8118a3c877f3a6bc8e7a649519de5e\">More...</a><br /></td></tr>\n<tr class=\"separator:gaaf8118a3c877f3a6bc8e7a649519de5e\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gab10427a667b6cd91eec7709f7a906bd3\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">struct wl_output *&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__native.html#gab10427a667b6cd91eec7709f7a906bd3\">glfwGetWaylandMonitor</a> (<a class=\"el\" href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a> *monitor)</td></tr>\n<tr class=\"memdesc:gab10427a667b6cd91eec7709f7a906bd3\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns the <code>struct wl_output*</code> of the specified monitor.  <a href=\"group__native.html#gab10427a667b6cd91eec7709f7a906bd3\">More...</a><br /></td></tr>\n<tr class=\"separator:gab10427a667b6cd91eec7709f7a906bd3\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga4738d7aca4191363519a9a641c3ab64c\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">struct wl_surface *&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__native.html#ga4738d7aca4191363519a9a641c3ab64c\">glfwGetWaylandWindow</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window)</td></tr>\n<tr class=\"memdesc:ga4738d7aca4191363519a9a641c3ab64c\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns the main <code>struct wl_surface*</code> of the specified window.  <a href=\"group__native.html#ga4738d7aca4191363519a9a641c3ab64c\">More...</a><br /></td></tr>\n<tr class=\"separator:ga4738d7aca4191363519a9a641c3ab64c\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga1cd8d973f47aacb5532d368147cc3138\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">EGLDisplay&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__native.html#ga1cd8d973f47aacb5532d368147cc3138\">glfwGetEGLDisplay</a> (void)</td></tr>\n<tr class=\"memdesc:ga1cd8d973f47aacb5532d368147cc3138\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns the <code>EGLDisplay</code> used by GLFW.  <a href=\"group__native.html#ga1cd8d973f47aacb5532d368147cc3138\">More...</a><br /></td></tr>\n<tr class=\"separator:ga1cd8d973f47aacb5532d368147cc3138\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga671c5072becd085f4ab5771a9c8efcf1\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">EGLContext&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__native.html#ga671c5072becd085f4ab5771a9c8efcf1\">glfwGetEGLContext</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window)</td></tr>\n<tr class=\"memdesc:ga671c5072becd085f4ab5771a9c8efcf1\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns the <code>EGLContext</code> of the specified window.  <a href=\"group__native.html#ga671c5072becd085f4ab5771a9c8efcf1\">More...</a><br /></td></tr>\n<tr class=\"separator:ga671c5072becd085f4ab5771a9c8efcf1\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga2199b36117a6a695fec8441d8052eee6\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">EGLSurface&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__native.html#ga2199b36117a6a695fec8441d8052eee6\">glfwGetEGLSurface</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window)</td></tr>\n<tr class=\"memdesc:ga2199b36117a6a695fec8441d8052eee6\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns the <code>EGLSurface</code> of the specified window.  <a href=\"group__native.html#ga2199b36117a6a695fec8441d8052eee6\">More...</a><br /></td></tr>\n<tr class=\"separator:ga2199b36117a6a695fec8441d8052eee6\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga3b36e3e3dcf308b776427b6bd73cc132\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">int&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__native.html#ga3b36e3e3dcf308b776427b6bd73cc132\">glfwGetOSMesaColorBuffer</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window, int *width, int *height, int *format, void **buffer)</td></tr>\n<tr class=\"memdesc:ga3b36e3e3dcf308b776427b6bd73cc132\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Retrieves the color buffer associated with the specified window.  <a href=\"group__native.html#ga3b36e3e3dcf308b776427b6bd73cc132\">More...</a><br /></td></tr>\n<tr class=\"separator:ga3b36e3e3dcf308b776427b6bd73cc132\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga6b64039ffc88a7a2f57f0956c0c75d53\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">int&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__native.html#ga6b64039ffc88a7a2f57f0956c0c75d53\">glfwGetOSMesaDepthBuffer</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window, int *width, int *height, int *bytesPerValue, void **buffer)</td></tr>\n<tr class=\"memdesc:ga6b64039ffc88a7a2f57f0956c0c75d53\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Retrieves the depth buffer associated with the specified window.  <a href=\"group__native.html#ga6b64039ffc88a7a2f57f0956c0c75d53\">More...</a><br /></td></tr>\n<tr class=\"separator:ga6b64039ffc88a7a2f57f0956c0c75d53\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga9e47700080094eb569cb053afaa88773\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">OSMesaContext&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__native.html#ga9e47700080094eb569cb053afaa88773\">glfwGetOSMesaContext</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window)</td></tr>\n<tr class=\"memdesc:ga9e47700080094eb569cb053afaa88773\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns the <code>OSMesaContext</code> of the specified window.  <a href=\"group__native.html#ga9e47700080094eb569cb053afaa88773\">More...</a><br /></td></tr>\n<tr class=\"separator:ga9e47700080094eb569cb053afaa88773\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n</table>\n<h2 class=\"groupheader\">Function Documentation</h2>\n<a id=\"gac84f63a3f9db145b9435e5e0dbc4183d\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gac84f63a3f9db145b9435e5e0dbc4183d\">&#9670;&nbsp;</a></span>glfwGetWin32Adapter()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">const char* glfwGetWin32Adapter </td>\n          <td>(</td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a> *&#160;</td>\n          <td class=\"paramname\"><em>monitor</em></td><td>)</td>\n          <td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<dl class=\"section return\"><dt>Returns</dt><dd>The UTF-8 encoded adapter device name (for example <code>\\\\.\\DISPLAY1</code>) of the specified monitor, or <code>NULL</code> if an <a class=\"el\" href=\"intro_guide.html#error_handling\">error</a> occurred.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function may be called from any thread. Access is not synchronized.</dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.1. </dd></dl>\n\n</div>\n</div>\n<a id=\"gac408b09a330749402d5d1fa1f5894dd9\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gac408b09a330749402d5d1fa1f5894dd9\">&#9670;&nbsp;</a></span>glfwGetWin32Monitor()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">const char* glfwGetWin32Monitor </td>\n          <td>(</td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a> *&#160;</td>\n          <td class=\"paramname\"><em>monitor</em></td><td>)</td>\n          <td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<dl class=\"section return\"><dt>Returns</dt><dd>The UTF-8 encoded display device name (for example <code>\\\\.\\DISPLAY1\\Monitor0</code>) of the specified monitor, or <code>NULL</code> if an <a class=\"el\" href=\"intro_guide.html#error_handling\">error</a> occurred.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function may be called from any thread. Access is not synchronized.</dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.1. </dd></dl>\n\n</div>\n</div>\n<a id=\"gafe5079aa79038b0079fc09d5f0a8e667\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gafe5079aa79038b0079fc09d5f0a8e667\">&#9670;&nbsp;</a></span>glfwGetWin32Window()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">HWND glfwGetWin32Window </td>\n          <td>(</td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *&#160;</td>\n          <td class=\"paramname\"><em>window</em></td><td>)</td>\n          <td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<dl class=\"section return\"><dt>Returns</dt><dd>The <code>HWND</code> of the specified window, or <code>NULL</code> if an <a class=\"el\" href=\"intro_guide.html#error_handling\">error</a> occurred.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function may be called from any thread. Access is not synchronized.</dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>\n\n</div>\n</div>\n<a id=\"gadc4010d91d9cc1134d040eeb1202a143\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gadc4010d91d9cc1134d040eeb1202a143\">&#9670;&nbsp;</a></span>glfwGetWGLContext()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">HGLRC glfwGetWGLContext </td>\n          <td>(</td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *&#160;</td>\n          <td class=\"paramname\"><em>window</em></td><td>)</td>\n          <td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<dl class=\"section return\"><dt>Returns</dt><dd>The <code>HGLRC</code> of the specified window, or <code>NULL</code> if an <a class=\"el\" href=\"intro_guide.html#error_handling\">error</a> occurred.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function may be called from any thread. Access is not synchronized.</dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>\n\n</div>\n</div>\n<a id=\"gaf22f429aec4b1aab316142d66d9be3e6\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gaf22f429aec4b1aab316142d66d9be3e6\">&#9670;&nbsp;</a></span>glfwGetCocoaMonitor()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">CGDirectDisplayID glfwGetCocoaMonitor </td>\n          <td>(</td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a> *&#160;</td>\n          <td class=\"paramname\"><em>monitor</em></td><td>)</td>\n          <td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<dl class=\"section return\"><dt>Returns</dt><dd>The <code>CGDirectDisplayID</code> of the specified monitor, or <code>kCGNullDirectDisplay</code> if an <a class=\"el\" href=\"intro_guide.html#error_handling\">error</a> occurred.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function may be called from any thread. Access is not synchronized.</dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.1. </dd></dl>\n\n</div>\n</div>\n<a id=\"gac3ed9d495d0c2bb9652de5a50c648715\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gac3ed9d495d0c2bb9652de5a50c648715\">&#9670;&nbsp;</a></span>glfwGetCocoaWindow()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">id glfwGetCocoaWindow </td>\n          <td>(</td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *&#160;</td>\n          <td class=\"paramname\"><em>window</em></td><td>)</td>\n          <td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<dl class=\"section return\"><dt>Returns</dt><dd>The <code>NSWindow</code> of the specified window, or <code>nil</code> if an <a class=\"el\" href=\"intro_guide.html#error_handling\">error</a> occurred.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function may be called from any thread. Access is not synchronized.</dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>\n\n</div>\n</div>\n<a id=\"ga559e002e3cd63c979881770cd4dc63bc\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga559e002e3cd63c979881770cd4dc63bc\">&#9670;&nbsp;</a></span>glfwGetNSGLContext()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">id glfwGetNSGLContext </td>\n          <td>(</td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *&#160;</td>\n          <td class=\"paramname\"><em>window</em></td><td>)</td>\n          <td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<dl class=\"section return\"><dt>Returns</dt><dd>The <code>NSOpenGLContext</code> of the specified window, or <code>nil</code> if an <a class=\"el\" href=\"intro_guide.html#error_handling\">error</a> occurred.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function may be called from any thread. Access is not synchronized.</dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>\n\n</div>\n</div>\n<a id=\"ga8519b66594ea3ef6eeafaa2e3ee37406\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga8519b66594ea3ef6eeafaa2e3ee37406\">&#9670;&nbsp;</a></span>glfwGetX11Display()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">Display* glfwGetX11Display </td>\n          <td>(</td>\n          <td class=\"paramtype\">void&#160;</td>\n          <td class=\"paramname\"></td><td>)</td>\n          <td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<dl class=\"section return\"><dt>Returns</dt><dd>The <code>Display</code> used by GLFW, or <code>NULL</code> if an <a class=\"el\" href=\"intro_guide.html#error_handling\">error</a> occurred.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function may be called from any thread. Access is not synchronized.</dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>\n\n</div>\n</div>\n<a id=\"ga088fbfa80f50569402b41be71ad66e40\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga088fbfa80f50569402b41be71ad66e40\">&#9670;&nbsp;</a></span>glfwGetX11Adapter()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">RRCrtc glfwGetX11Adapter </td>\n          <td>(</td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a> *&#160;</td>\n          <td class=\"paramname\"><em>monitor</em></td><td>)</td>\n          <td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<dl class=\"section return\"><dt>Returns</dt><dd>The <code>RRCrtc</code> of the specified monitor, or <code>None</code> if an <a class=\"el\" href=\"intro_guide.html#error_handling\">error</a> occurred.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function may be called from any thread. Access is not synchronized.</dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.1. </dd></dl>\n\n</div>\n</div>\n<a id=\"gab2f8cc043905e9fa9b12bfdbbcfe874c\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gab2f8cc043905e9fa9b12bfdbbcfe874c\">&#9670;&nbsp;</a></span>glfwGetX11Monitor()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">RROutput glfwGetX11Monitor </td>\n          <td>(</td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a> *&#160;</td>\n          <td class=\"paramname\"><em>monitor</em></td><td>)</td>\n          <td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<dl class=\"section return\"><dt>Returns</dt><dd>The <code>RROutput</code> of the specified monitor, or <code>None</code> if an <a class=\"el\" href=\"intro_guide.html#error_handling\">error</a> occurred.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function may be called from any thread. Access is not synchronized.</dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.1. </dd></dl>\n\n</div>\n</div>\n<a id=\"ga90ca676322740842db446999a1b1f21d\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga90ca676322740842db446999a1b1f21d\">&#9670;&nbsp;</a></span>glfwGetX11Window()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">Window glfwGetX11Window </td>\n          <td>(</td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *&#160;</td>\n          <td class=\"paramname\"><em>window</em></td><td>)</td>\n          <td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<dl class=\"section return\"><dt>Returns</dt><dd>The <code>Window</code> of the specified window, or <code>None</code> if an <a class=\"el\" href=\"intro_guide.html#error_handling\">error</a> occurred.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function may be called from any thread. Access is not synchronized.</dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>\n\n</div>\n</div>\n<a id=\"ga55f879ab02d93367f966186b6f0133f7\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga55f879ab02d93367f966186b6f0133f7\">&#9670;&nbsp;</a></span>glfwSetX11SelectionString()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">void glfwSetX11SelectionString </td>\n          <td>(</td>\n          <td class=\"paramtype\">const char *&#160;</td>\n          <td class=\"paramname\"><em>string</em></td><td>)</td>\n          <td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">string</td><td>A UTF-8 encoded string.</td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a> and <a class=\"el\" href=\"group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1\">GLFW_PLATFORM_ERROR</a>.</dd></dl>\n<dl class=\"section user\"><dt>Pointer lifetime</dt><dd>The specified string is copied before this function returns.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"input_guide.html#clipboard\">Clipboard input and output</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__native.html#ga72f23e3980b83788c70aa854eca31430\" title=\"Returns the contents of the current primary selection as a string.\">glfwGetX11SelectionString</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__input.html#gaba1f022c5eb07dfac421df34cdcd31dd\" title=\"Sets the clipboard to the specified string.\">glfwSetClipboardString</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.3. </dd></dl>\n\n</div>\n</div>\n<a id=\"ga72f23e3980b83788c70aa854eca31430\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga72f23e3980b83788c70aa854eca31430\">&#9670;&nbsp;</a></span>glfwGetX11SelectionString()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">const char* glfwGetX11SelectionString </td>\n          <td>(</td>\n          <td class=\"paramtype\">void&#160;</td>\n          <td class=\"paramname\"></td><td>)</td>\n          <td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>If the selection is empty or if its contents cannot be converted, <code>NULL</code> is returned and a <a class=\"el\" href=\"group__errors.html#ga196e125ef261d94184e2b55c05762f14\">GLFW_FORMAT_UNAVAILABLE</a> error is generated.</p>\n<dl class=\"section return\"><dt>Returns</dt><dd>The contents of the selection as a UTF-8 encoded string, or <code>NULL</code> if an <a class=\"el\" href=\"intro_guide.html#error_handling\">error</a> occurred.</dd></dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a> and <a class=\"el\" href=\"group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1\">GLFW_PLATFORM_ERROR</a>.</dd></dl>\n<dl class=\"section user\"><dt>Pointer lifetime</dt><dd>The returned string is allocated and freed by GLFW. You should not free it yourself. It is valid until the next call to <a class=\"el\" href=\"group__native.html#ga72f23e3980b83788c70aa854eca31430\">glfwGetX11SelectionString</a> or <a class=\"el\" href=\"group__native.html#ga55f879ab02d93367f966186b6f0133f7\">glfwSetX11SelectionString</a>, or until the library is terminated.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"input_guide.html#clipboard\">Clipboard input and output</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__native.html#ga55f879ab02d93367f966186b6f0133f7\" title=\"Sets the current primary selection to the specified string.\">glfwSetX11SelectionString</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__input.html#ga5aba1d704d9ab539282b1fbe9f18bb94\" title=\"Returns the contents of the clipboard as a string.\">glfwGetClipboardString</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.3. </dd></dl>\n\n</div>\n</div>\n<a id=\"ga62d884114b0abfcdc2930e89f20867e2\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga62d884114b0abfcdc2930e89f20867e2\">&#9670;&nbsp;</a></span>glfwGetGLXContext()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">GLXContext glfwGetGLXContext </td>\n          <td>(</td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *&#160;</td>\n          <td class=\"paramname\"><em>window</em></td><td>)</td>\n          <td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<dl class=\"section return\"><dt>Returns</dt><dd>The <code>GLXContext</code> of the specified window, or <code>NULL</code> if an <a class=\"el\" href=\"intro_guide.html#error_handling\">error</a> occurred.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function may be called from any thread. Access is not synchronized.</dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>\n\n</div>\n</div>\n<a id=\"ga1ed27b8766e859a21381e8f8ce18d049\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga1ed27b8766e859a21381e8f8ce18d049\">&#9670;&nbsp;</a></span>glfwGetGLXWindow()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">GLXWindow glfwGetGLXWindow </td>\n          <td>(</td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *&#160;</td>\n          <td class=\"paramname\"><em>window</em></td><td>)</td>\n          <td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<dl class=\"section return\"><dt>Returns</dt><dd>The <code>GLXWindow</code> of the specified window, or <code>None</code> if an <a class=\"el\" href=\"intro_guide.html#error_handling\">error</a> occurred.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function may be called from any thread. Access is not synchronized.</dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.2. </dd></dl>\n\n</div>\n</div>\n<a id=\"gaaf8118a3c877f3a6bc8e7a649519de5e\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gaaf8118a3c877f3a6bc8e7a649519de5e\">&#9670;&nbsp;</a></span>glfwGetWaylandDisplay()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">struct wl_display* glfwGetWaylandDisplay </td>\n          <td>(</td>\n          <td class=\"paramtype\">void&#160;</td>\n          <td class=\"paramname\"></td><td>)</td>\n          <td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<dl class=\"section return\"><dt>Returns</dt><dd>The <code>struct wl_display*</code> used by GLFW, or <code>NULL</code> if an <a class=\"el\" href=\"intro_guide.html#error_handling\">error</a> occurred.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function may be called from any thread. Access is not synchronized.</dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.2. </dd></dl>\n\n</div>\n</div>\n<a id=\"gab10427a667b6cd91eec7709f7a906bd3\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gab10427a667b6cd91eec7709f7a906bd3\">&#9670;&nbsp;</a></span>glfwGetWaylandMonitor()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">struct wl_output* glfwGetWaylandMonitor </td>\n          <td>(</td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a> *&#160;</td>\n          <td class=\"paramname\"><em>monitor</em></td><td>)</td>\n          <td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<dl class=\"section return\"><dt>Returns</dt><dd>The <code>struct wl_output*</code> of the specified monitor, or <code>NULL</code> if an <a class=\"el\" href=\"intro_guide.html#error_handling\">error</a> occurred.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function may be called from any thread. Access is not synchronized.</dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.2. </dd></dl>\n\n</div>\n</div>\n<a id=\"ga4738d7aca4191363519a9a641c3ab64c\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga4738d7aca4191363519a9a641c3ab64c\">&#9670;&nbsp;</a></span>glfwGetWaylandWindow()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">struct wl_surface* glfwGetWaylandWindow </td>\n          <td>(</td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *&#160;</td>\n          <td class=\"paramname\"><em>window</em></td><td>)</td>\n          <td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<dl class=\"section return\"><dt>Returns</dt><dd>The main <code>struct wl_surface*</code> of the specified window, or <code>NULL</code> if an <a class=\"el\" href=\"intro_guide.html#error_handling\">error</a> occurred.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function may be called from any thread. Access is not synchronized.</dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.2. </dd></dl>\n\n</div>\n</div>\n<a id=\"ga1cd8d973f47aacb5532d368147cc3138\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga1cd8d973f47aacb5532d368147cc3138\">&#9670;&nbsp;</a></span>glfwGetEGLDisplay()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">EGLDisplay glfwGetEGLDisplay </td>\n          <td>(</td>\n          <td class=\"paramtype\">void&#160;</td>\n          <td class=\"paramname\"></td><td>)</td>\n          <td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<dl class=\"section return\"><dt>Returns</dt><dd>The <code>EGLDisplay</code> used by GLFW, or <code>EGL_NO_DISPLAY</code> if an <a class=\"el\" href=\"intro_guide.html#error_handling\">error</a> occurred.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function may be called from any thread. Access is not synchronized.</dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>\n\n</div>\n</div>\n<a id=\"ga671c5072becd085f4ab5771a9c8efcf1\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga671c5072becd085f4ab5771a9c8efcf1\">&#9670;&nbsp;</a></span>glfwGetEGLContext()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">EGLContext glfwGetEGLContext </td>\n          <td>(</td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *&#160;</td>\n          <td class=\"paramname\"><em>window</em></td><td>)</td>\n          <td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<dl class=\"section return\"><dt>Returns</dt><dd>The <code>EGLContext</code> of the specified window, or <code>EGL_NO_CONTEXT</code> if an <a class=\"el\" href=\"intro_guide.html#error_handling\">error</a> occurred.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function may be called from any thread. Access is not synchronized.</dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>\n\n</div>\n</div>\n<a id=\"ga2199b36117a6a695fec8441d8052eee6\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga2199b36117a6a695fec8441d8052eee6\">&#9670;&nbsp;</a></span>glfwGetEGLSurface()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">EGLSurface glfwGetEGLSurface </td>\n          <td>(</td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *&#160;</td>\n          <td class=\"paramname\"><em>window</em></td><td>)</td>\n          <td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<dl class=\"section return\"><dt>Returns</dt><dd>The <code>EGLSurface</code> of the specified window, or <code>EGL_NO_SURFACE</code> if an <a class=\"el\" href=\"intro_guide.html#error_handling\">error</a> occurred.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function may be called from any thread. Access is not synchronized.</dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>\n\n</div>\n</div>\n<a id=\"ga3b36e3e3dcf308b776427b6bd73cc132\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga3b36e3e3dcf308b776427b6bd73cc132\">&#9670;&nbsp;</a></span>glfwGetOSMesaColorBuffer()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">int glfwGetOSMesaColorBuffer </td>\n          <td>(</td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *&#160;</td>\n          <td class=\"paramname\"><em>window</em>, </td>\n        </tr>\n        <tr>\n          <td class=\"paramkey\"></td>\n          <td></td>\n          <td class=\"paramtype\">int *&#160;</td>\n          <td class=\"paramname\"><em>width</em>, </td>\n        </tr>\n        <tr>\n          <td class=\"paramkey\"></td>\n          <td></td>\n          <td class=\"paramtype\">int *&#160;</td>\n          <td class=\"paramname\"><em>height</em>, </td>\n        </tr>\n        <tr>\n          <td class=\"paramkey\"></td>\n          <td></td>\n          <td class=\"paramtype\">int *&#160;</td>\n          <td class=\"paramname\"><em>format</em>, </td>\n        </tr>\n        <tr>\n          <td class=\"paramkey\"></td>\n          <td></td>\n          <td class=\"paramtype\">void **&#160;</td>\n          <td class=\"paramname\"><em>buffer</em>&#160;</td>\n        </tr>\n        <tr>\n          <td></td>\n          <td>)</td>\n          <td></td><td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">window</td><td>The window whose color buffer to retrieve. </td></tr>\n    <tr><td class=\"paramdir\">[out]</td><td class=\"paramname\">width</td><td>Where to store the width of the color buffer, or <code>NULL</code>. </td></tr>\n    <tr><td class=\"paramdir\">[out]</td><td class=\"paramname\">height</td><td>Where to store the height of the color buffer, or <code>NULL</code>. </td></tr>\n    <tr><td class=\"paramdir\">[out]</td><td class=\"paramname\">format</td><td>Where to store the OSMesa pixel format of the color buffer, or <code>NULL</code>. </td></tr>\n    <tr><td class=\"paramdir\">[out]</td><td class=\"paramname\">buffer</td><td>Where to store the address of the color buffer, or <code>NULL</code>. </td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section return\"><dt>Returns</dt><dd><code>GLFW_TRUE</code> if successful, or <code>GLFW_FALSE</code> if an <a class=\"el\" href=\"intro_guide.html#error_handling\">error</a> occurred.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function may be called from any thread. Access is not synchronized.</dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.3. </dd></dl>\n\n</div>\n</div>\n<a id=\"ga6b64039ffc88a7a2f57f0956c0c75d53\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga6b64039ffc88a7a2f57f0956c0c75d53\">&#9670;&nbsp;</a></span>glfwGetOSMesaDepthBuffer()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">int glfwGetOSMesaDepthBuffer </td>\n          <td>(</td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *&#160;</td>\n          <td class=\"paramname\"><em>window</em>, </td>\n        </tr>\n        <tr>\n          <td class=\"paramkey\"></td>\n          <td></td>\n          <td class=\"paramtype\">int *&#160;</td>\n          <td class=\"paramname\"><em>width</em>, </td>\n        </tr>\n        <tr>\n          <td class=\"paramkey\"></td>\n          <td></td>\n          <td class=\"paramtype\">int *&#160;</td>\n          <td class=\"paramname\"><em>height</em>, </td>\n        </tr>\n        <tr>\n          <td class=\"paramkey\"></td>\n          <td></td>\n          <td class=\"paramtype\">int *&#160;</td>\n          <td class=\"paramname\"><em>bytesPerValue</em>, </td>\n        </tr>\n        <tr>\n          <td class=\"paramkey\"></td>\n          <td></td>\n          <td class=\"paramtype\">void **&#160;</td>\n          <td class=\"paramname\"><em>buffer</em>&#160;</td>\n        </tr>\n        <tr>\n          <td></td>\n          <td>)</td>\n          <td></td><td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">window</td><td>The window whose depth buffer to retrieve. </td></tr>\n    <tr><td class=\"paramdir\">[out]</td><td class=\"paramname\">width</td><td>Where to store the width of the depth buffer, or <code>NULL</code>. </td></tr>\n    <tr><td class=\"paramdir\">[out]</td><td class=\"paramname\">height</td><td>Where to store the height of the depth buffer, or <code>NULL</code>. </td></tr>\n    <tr><td class=\"paramdir\">[out]</td><td class=\"paramname\">bytesPerValue</td><td>Where to store the number of bytes per depth buffer element, or <code>NULL</code>. </td></tr>\n    <tr><td class=\"paramdir\">[out]</td><td class=\"paramname\">buffer</td><td>Where to store the address of the depth buffer, or <code>NULL</code>. </td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section return\"><dt>Returns</dt><dd><code>GLFW_TRUE</code> if successful, or <code>GLFW_FALSE</code> if an <a class=\"el\" href=\"intro_guide.html#error_handling\">error</a> occurred.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function may be called from any thread. Access is not synchronized.</dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.3. </dd></dl>\n\n</div>\n</div>\n<a id=\"ga9e47700080094eb569cb053afaa88773\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga9e47700080094eb569cb053afaa88773\">&#9670;&nbsp;</a></span>glfwGetOSMesaContext()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">OSMesaContext glfwGetOSMesaContext </td>\n          <td>(</td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *&#160;</td>\n          <td class=\"paramname\"><em>window</em></td><td>)</td>\n          <td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<dl class=\"section return\"><dt>Returns</dt><dd>The <code>OSMesaContext</code> of the specified window, or <code>NULL</code> if an <a class=\"el\" href=\"intro_guide.html#error_handling\">error</a> occurred.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function may be called from any thread. Access is not synchronized.</dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.3. </dd></dl>\n\n</div>\n</div>\n</div><!-- contents -->\n<address class=\"footer\">\n<p>\nLast update on Mon Jan 20 2020 for GLFW 3.3.2\n</p>\n</address>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/group__shapes.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta http-equiv=\"X-UA-Compatible\" content=\"IE=9\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<title>GLFW: Standard cursor shapes</title>\n<link href=\"tabs.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"jquery.js\"></script>\n<script type=\"text/javascript\" src=\"dynsections.js\"></script>\n<link href=\"search/search.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"search/searchdata.js\"></script>\n<script type=\"text/javascript\" src=\"search/search.js\"></script>\n<link href=\"doxygen.css\" rel=\"stylesheet\" type=\"text/css\" />\n<link href=\"extra.css\" rel=\"stylesheet\" type=\"text/css\"/>\n</head>\n<body>\n<div id=\"top\"><!-- do not remove this div, it is closed by doxygen! -->\n<div id=\"titlearea\">\n\t<div class=\"glfwheader\">\n\t\t<a href=\"https://www.glfw.org/\" id=\"glfwhome\">GLFW</a>\n\t\t<ul class=\"glfwnavbar\">\n\t\t\t<li><a href=\"https://www.glfw.org/documentation.html\">Documentation</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/download.html\">Download</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/community.html\">Community</a></li>\n\t\t</ul>\n\t</div>\n</div>\n<!-- end header part -->\n<!-- Generated by Doxygen 1.8.16 -->\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\nvar searchBox = new SearchBox(\"searchBox\", \"search\",false,'Search');\n/* @license-end */\n</script>\n<script type=\"text/javascript\" src=\"menudata.js\"></script>\n<script type=\"text/javascript\" src=\"menu.js\"></script>\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\n$(function() {\n  initMenu('',true,false,'search.php','Search');\n  $(document).ready(function() { init_search(); });\n});\n/* @license-end */</script>\n<div id=\"main-nav\"></div>\n</div><!-- top -->\n<!-- window showing the filter options -->\n<div id=\"MSearchSelectWindow\"\n     onmouseover=\"return searchBox.OnSearchSelectShow()\"\n     onmouseout=\"return searchBox.OnSearchSelectHide()\"\n     onkeydown=\"return searchBox.OnSearchSelectKey(event)\">\n</div>\n\n<!-- iframe showing the search results (closed by default) -->\n<div id=\"MSearchResultsWindow\">\n<iframe src=\"javascript:void(0)\" frameborder=\"0\" \n        name=\"MSearchResults\" id=\"MSearchResults\">\n</iframe>\n</div>\n\n<div class=\"header\">\n  <div class=\"summary\">\n<a href=\"#define-members\">Macros</a>  </div>\n  <div class=\"headertitle\">\n<div class=\"title\">Standard cursor shapes<div class=\"ingroups\"><a class=\"el\" href=\"group__input.html\">Input reference</a></div></div>  </div>\n</div><!--header-->\n<div class=\"contents\">\n<a name=\"details\" id=\"details\"></a><h2 class=\"groupheader\">Description</h2>\n<p>See <a class=\"el\" href=\"input_guide.html#cursor_standard\">standard cursor creation</a> for how these are used. </p>\n<table class=\"memberdecls\">\n<tr class=\"heading\"><td colspan=\"2\"><h2 class=\"groupheader\"><a name=\"define-members\"></a>\nMacros</h2></td></tr>\n<tr class=\"memitem:ga8ab0e717245b85506cb0eaefdea39d0a\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__shapes.html#ga8ab0e717245b85506cb0eaefdea39d0a\">GLFW_ARROW_CURSOR</a>&#160;&#160;&#160;0x00036001</td></tr>\n<tr class=\"memdesc:ga8ab0e717245b85506cb0eaefdea39d0a\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">The regular arrow cursor shape.  <a href=\"group__shapes.html#ga8ab0e717245b85506cb0eaefdea39d0a\">More...</a><br /></td></tr>\n<tr class=\"separator:ga8ab0e717245b85506cb0eaefdea39d0a\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga36185f4375eaada1b04e431244774c86\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__shapes.html#ga36185f4375eaada1b04e431244774c86\">GLFW_IBEAM_CURSOR</a>&#160;&#160;&#160;0x00036002</td></tr>\n<tr class=\"memdesc:ga36185f4375eaada1b04e431244774c86\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">The text input I-beam cursor shape.  <a href=\"group__shapes.html#ga36185f4375eaada1b04e431244774c86\">More...</a><br /></td></tr>\n<tr class=\"separator:ga36185f4375eaada1b04e431244774c86\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga8af88c0ea05ab9e8f9ac1530e8873c22\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__shapes.html#ga8af88c0ea05ab9e8f9ac1530e8873c22\">GLFW_CROSSHAIR_CURSOR</a>&#160;&#160;&#160;0x00036003</td></tr>\n<tr class=\"memdesc:ga8af88c0ea05ab9e8f9ac1530e8873c22\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">The crosshair shape.  <a href=\"group__shapes.html#ga8af88c0ea05ab9e8f9ac1530e8873c22\">More...</a><br /></td></tr>\n<tr class=\"separator:ga8af88c0ea05ab9e8f9ac1530e8873c22\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga1db35e20849e0837c82e3dc1fd797263\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__shapes.html#ga1db35e20849e0837c82e3dc1fd797263\">GLFW_HAND_CURSOR</a>&#160;&#160;&#160;0x00036004</td></tr>\n<tr class=\"memdesc:ga1db35e20849e0837c82e3dc1fd797263\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">The hand shape.  <a href=\"group__shapes.html#ga1db35e20849e0837c82e3dc1fd797263\">More...</a><br /></td></tr>\n<tr class=\"separator:ga1db35e20849e0837c82e3dc1fd797263\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gabb3eb0109f11bb808fc34659177ca962\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__shapes.html#gabb3eb0109f11bb808fc34659177ca962\">GLFW_HRESIZE_CURSOR</a>&#160;&#160;&#160;0x00036005</td></tr>\n<tr class=\"memdesc:gabb3eb0109f11bb808fc34659177ca962\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">The horizontal resize arrow shape.  <a href=\"group__shapes.html#gabb3eb0109f11bb808fc34659177ca962\">More...</a><br /></td></tr>\n<tr class=\"separator:gabb3eb0109f11bb808fc34659177ca962\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gaf024f0e1ff8366fb2b5c260509a1fce5\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__shapes.html#gaf024f0e1ff8366fb2b5c260509a1fce5\">GLFW_VRESIZE_CURSOR</a>&#160;&#160;&#160;0x00036006</td></tr>\n<tr class=\"memdesc:gaf024f0e1ff8366fb2b5c260509a1fce5\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">The vertical resize arrow shape.  <a href=\"group__shapes.html#gaf024f0e1ff8366fb2b5c260509a1fce5\">More...</a><br /></td></tr>\n<tr class=\"separator:gaf024f0e1ff8366fb2b5c260509a1fce5\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n</table>\n<h2 class=\"groupheader\">Macro Definition Documentation</h2>\n<a id=\"ga8ab0e717245b85506cb0eaefdea39d0a\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga8ab0e717245b85506cb0eaefdea39d0a\">&#9670;&nbsp;</a></span>GLFW_ARROW_CURSOR</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_ARROW_CURSOR&#160;&#160;&#160;0x00036001</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>The regular arrow cursor. </p>\n\n</div>\n</div>\n<a id=\"ga36185f4375eaada1b04e431244774c86\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga36185f4375eaada1b04e431244774c86\">&#9670;&nbsp;</a></span>GLFW_IBEAM_CURSOR</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_IBEAM_CURSOR&#160;&#160;&#160;0x00036002</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>The text input I-beam cursor shape. </p>\n\n</div>\n</div>\n<a id=\"ga8af88c0ea05ab9e8f9ac1530e8873c22\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga8af88c0ea05ab9e8f9ac1530e8873c22\">&#9670;&nbsp;</a></span>GLFW_CROSSHAIR_CURSOR</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_CROSSHAIR_CURSOR&#160;&#160;&#160;0x00036003</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>The crosshair shape. </p>\n\n</div>\n</div>\n<a id=\"ga1db35e20849e0837c82e3dc1fd797263\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga1db35e20849e0837c82e3dc1fd797263\">&#9670;&nbsp;</a></span>GLFW_HAND_CURSOR</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_HAND_CURSOR&#160;&#160;&#160;0x00036004</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>The hand shape. </p>\n\n</div>\n</div>\n<a id=\"gabb3eb0109f11bb808fc34659177ca962\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gabb3eb0109f11bb808fc34659177ca962\">&#9670;&nbsp;</a></span>GLFW_HRESIZE_CURSOR</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_HRESIZE_CURSOR&#160;&#160;&#160;0x00036005</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>The horizontal resize arrow shape. </p>\n\n</div>\n</div>\n<a id=\"gaf024f0e1ff8366fb2b5c260509a1fce5\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gaf024f0e1ff8366fb2b5c260509a1fce5\">&#9670;&nbsp;</a></span>GLFW_VRESIZE_CURSOR</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_VRESIZE_CURSOR&#160;&#160;&#160;0x00036006</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>The vertical resize arrow shape. </p>\n\n</div>\n</div>\n</div><!-- contents -->\n<address class=\"footer\">\n<p>\nLast update on Mon Jan 20 2020 for GLFW 3.3.2\n</p>\n</address>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/group__vulkan.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta http-equiv=\"X-UA-Compatible\" content=\"IE=9\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<title>GLFW: Vulkan reference</title>\n<link href=\"tabs.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"jquery.js\"></script>\n<script type=\"text/javascript\" src=\"dynsections.js\"></script>\n<link href=\"search/search.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"search/searchdata.js\"></script>\n<script type=\"text/javascript\" src=\"search/search.js\"></script>\n<link href=\"doxygen.css\" rel=\"stylesheet\" type=\"text/css\" />\n<link href=\"extra.css\" rel=\"stylesheet\" type=\"text/css\"/>\n</head>\n<body>\n<div id=\"top\"><!-- do not remove this div, it is closed by doxygen! -->\n<div id=\"titlearea\">\n\t<div class=\"glfwheader\">\n\t\t<a href=\"https://www.glfw.org/\" id=\"glfwhome\">GLFW</a>\n\t\t<ul class=\"glfwnavbar\">\n\t\t\t<li><a href=\"https://www.glfw.org/documentation.html\">Documentation</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/download.html\">Download</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/community.html\">Community</a></li>\n\t\t</ul>\n\t</div>\n</div>\n<!-- end header part -->\n<!-- Generated by Doxygen 1.8.16 -->\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\nvar searchBox = new SearchBox(\"searchBox\", \"search\",false,'Search');\n/* @license-end */\n</script>\n<script type=\"text/javascript\" src=\"menudata.js\"></script>\n<script type=\"text/javascript\" src=\"menu.js\"></script>\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\n$(function() {\n  initMenu('',true,false,'search.php','Search');\n  $(document).ready(function() { init_search(); });\n});\n/* @license-end */</script>\n<div id=\"main-nav\"></div>\n</div><!-- top -->\n<!-- window showing the filter options -->\n<div id=\"MSearchSelectWindow\"\n     onmouseover=\"return searchBox.OnSearchSelectShow()\"\n     onmouseout=\"return searchBox.OnSearchSelectHide()\"\n     onkeydown=\"return searchBox.OnSearchSelectKey(event)\">\n</div>\n\n<!-- iframe showing the search results (closed by default) -->\n<div id=\"MSearchResultsWindow\">\n<iframe src=\"javascript:void(0)\" frameborder=\"0\" \n        name=\"MSearchResults\" id=\"MSearchResults\">\n</iframe>\n</div>\n\n<div class=\"header\">\n  <div class=\"summary\">\n<a href=\"#typedef-members\">Typedefs</a> &#124;\n<a href=\"#func-members\">Functions</a>  </div>\n  <div class=\"headertitle\">\n<div class=\"title\">Vulkan reference</div>  </div>\n</div><!--header-->\n<div class=\"contents\">\n<a name=\"details\" id=\"details\"></a><h2 class=\"groupheader\">Description</h2>\n<p>This is the reference documentation for Vulkan related functions and types. For more task-oriented information, see the <a class=\"el\" href=\"vulkan_guide.html\">Vulkan guide</a>. </p>\n<table class=\"memberdecls\">\n<tr class=\"heading\"><td colspan=\"2\"><h2 class=\"groupheader\"><a name=\"typedef-members\"></a>\nTypedefs</h2></td></tr>\n<tr class=\"memitem:ga70c01918dc9d233a4fbe0681a43018af\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">typedef void(*&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__vulkan.html#ga70c01918dc9d233a4fbe0681a43018af\">GLFWvkproc</a>) (void)</td></tr>\n<tr class=\"memdesc:ga70c01918dc9d233a4fbe0681a43018af\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Vulkan API function pointer type.  <a href=\"group__vulkan.html#ga70c01918dc9d233a4fbe0681a43018af\">More...</a><br /></td></tr>\n<tr class=\"separator:ga70c01918dc9d233a4fbe0681a43018af\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n</table><table class=\"memberdecls\">\n<tr class=\"heading\"><td colspan=\"2\"><h2 class=\"groupheader\"><a name=\"func-members\"></a>\nFunctions</h2></td></tr>\n<tr class=\"memitem:ga2e7f30931e02464b5bc8d0d4b6f9fe2b\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">int&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__vulkan.html#ga2e7f30931e02464b5bc8d0d4b6f9fe2b\">glfwVulkanSupported</a> (void)</td></tr>\n<tr class=\"memdesc:ga2e7f30931e02464b5bc8d0d4b6f9fe2b\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns whether the Vulkan loader and an ICD have been found.  <a href=\"group__vulkan.html#ga2e7f30931e02464b5bc8d0d4b6f9fe2b\">More...</a><br /></td></tr>\n<tr class=\"separator:ga2e7f30931e02464b5bc8d0d4b6f9fe2b\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga1abcbe61033958f22f63ef82008874b1\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">const char **&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__vulkan.html#ga1abcbe61033958f22f63ef82008874b1\">glfwGetRequiredInstanceExtensions</a> (uint32_t *count)</td></tr>\n<tr class=\"memdesc:ga1abcbe61033958f22f63ef82008874b1\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns the Vulkan instance extensions required by GLFW.  <a href=\"group__vulkan.html#ga1abcbe61033958f22f63ef82008874b1\">More...</a><br /></td></tr>\n<tr class=\"separator:ga1abcbe61033958f22f63ef82008874b1\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gadf228fac94c5fd8f12423ec9af9ff1e9\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\"><a class=\"el\" href=\"group__vulkan.html#ga70c01918dc9d233a4fbe0681a43018af\">GLFWvkproc</a>&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__vulkan.html#gadf228fac94c5fd8f12423ec9af9ff1e9\">glfwGetInstanceProcAddress</a> (VkInstance instance, const char *procname)</td></tr>\n<tr class=\"memdesc:gadf228fac94c5fd8f12423ec9af9ff1e9\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns the address of the specified Vulkan instance function.  <a href=\"group__vulkan.html#gadf228fac94c5fd8f12423ec9af9ff1e9\">More...</a><br /></td></tr>\n<tr class=\"separator:gadf228fac94c5fd8f12423ec9af9ff1e9\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gaff3823355cdd7e2f3f9f4d9ea9518d92\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">int&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__vulkan.html#gaff3823355cdd7e2f3f9f4d9ea9518d92\">glfwGetPhysicalDevicePresentationSupport</a> (VkInstance instance, VkPhysicalDevice device, uint32_t queuefamily)</td></tr>\n<tr class=\"memdesc:gaff3823355cdd7e2f3f9f4d9ea9518d92\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns whether the specified queue family can present images.  <a href=\"group__vulkan.html#gaff3823355cdd7e2f3f9f4d9ea9518d92\">More...</a><br /></td></tr>\n<tr class=\"separator:gaff3823355cdd7e2f3f9f4d9ea9518d92\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga1a24536bec3f80b08ead18e28e6ae965\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">VkResult&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__vulkan.html#ga1a24536bec3f80b08ead18e28e6ae965\">glfwCreateWindowSurface</a> (VkInstance instance, <a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window, const VkAllocationCallbacks *allocator, VkSurfaceKHR *surface)</td></tr>\n<tr class=\"memdesc:ga1a24536bec3f80b08ead18e28e6ae965\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Creates a Vulkan surface for the specified window.  <a href=\"group__vulkan.html#ga1a24536bec3f80b08ead18e28e6ae965\">More...</a><br /></td></tr>\n<tr class=\"separator:ga1a24536bec3f80b08ead18e28e6ae965\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n</table>\n<h2 class=\"groupheader\">Typedef Documentation</h2>\n<a id=\"ga70c01918dc9d233a4fbe0681a43018af\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga70c01918dc9d233a4fbe0681a43018af\">&#9670;&nbsp;</a></span>GLFWvkproc</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">typedef void(* GLFWvkproc) (void)</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>Generic function pointer used for returning Vulkan API function pointers without forcing a cast from a regular pointer.</p>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"vulkan_guide.html#vulkan_proc\">Querying Vulkan function pointers</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__vulkan.html#gadf228fac94c5fd8f12423ec9af9ff1e9\">glfwGetInstanceProcAddress</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.2. </dd></dl>\n\n</div>\n</div>\n<h2 class=\"groupheader\">Function Documentation</h2>\n<a id=\"ga2e7f30931e02464b5bc8d0d4b6f9fe2b\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga2e7f30931e02464b5bc8d0d4b6f9fe2b\">&#9670;&nbsp;</a></span>glfwVulkanSupported()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">int glfwVulkanSupported </td>\n          <td>(</td>\n          <td class=\"paramtype\">void&#160;</td>\n          <td class=\"paramname\"></td><td>)</td>\n          <td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function returns whether the Vulkan loader and any minimally functional ICD have been found.</p>\n<p>The availability of a Vulkan loader and even an ICD does not by itself guarantee that surface creation or even instance creation is possible. For example, on Fermi systems Nvidia will install an ICD that provides no actual Vulkan support. Call <a class=\"el\" href=\"group__vulkan.html#ga1abcbe61033958f22f63ef82008874b1\">glfwGetRequiredInstanceExtensions</a> to check whether the extensions necessary for Vulkan surface creation are available and <a class=\"el\" href=\"group__vulkan.html#gaff3823355cdd7e2f3f9f4d9ea9518d92\">glfwGetPhysicalDevicePresentationSupport</a> to check whether a queue family of a physical device supports image presentation.</p>\n<dl class=\"section return\"><dt>Returns</dt><dd><code>GLFW_TRUE</code> if Vulkan is minimally available, or <code>GLFW_FALSE</code> otherwise.</dd></dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a>.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function may be called from any thread.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"vulkan_guide.html#vulkan_support\">Querying for Vulkan support</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.2. </dd></dl>\n\n</div>\n</div>\n<a id=\"ga1abcbe61033958f22f63ef82008874b1\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga1abcbe61033958f22f63ef82008874b1\">&#9670;&nbsp;</a></span>glfwGetRequiredInstanceExtensions()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">const char** glfwGetRequiredInstanceExtensions </td>\n          <td>(</td>\n          <td class=\"paramtype\">uint32_t *&#160;</td>\n          <td class=\"paramname\"><em>count</em></td><td>)</td>\n          <td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function returns an array of names of Vulkan instance extensions required by GLFW for creating Vulkan surfaces for GLFW windows. If successful, the list will always contain <code>VK_KHR_surface</code>, so if you don't require any additional extensions you can pass this list directly to the <code>VkInstanceCreateInfo</code> struct.</p>\n<p>If Vulkan is not available on the machine, this function returns <code>NULL</code> and generates a <a class=\"el\" href=\"group__errors.html#ga56882b290db23261cc6c053c40c2d08e\">GLFW_API_UNAVAILABLE</a> error. Call <a class=\"el\" href=\"group__vulkan.html#ga2e7f30931e02464b5bc8d0d4b6f9fe2b\">glfwVulkanSupported</a> to check whether Vulkan is at least minimally available.</p>\n<p>If Vulkan is available but no set of extensions allowing window surface creation was found, this function returns <code>NULL</code>. You may still use Vulkan for off-screen rendering and compute work.</p>\n<dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[out]</td><td class=\"paramname\">count</td><td>Where to store the number of extensions in the returned array. This is set to zero if an error occurred. </td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section return\"><dt>Returns</dt><dd>An array of ASCII encoded extension names, or <code>NULL</code> if an <a class=\"el\" href=\"intro_guide.html#error_handling\">error</a> occurred.</dd></dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a> and <a class=\"el\" href=\"group__errors.html#ga56882b290db23261cc6c053c40c2d08e\">GLFW_API_UNAVAILABLE</a>.</dd></dl>\n<dl class=\"section remark\"><dt>Remarks</dt><dd>Additional extensions may be required by future versions of GLFW. You should check if any extensions you wish to enable are already in the returned array, as it is an error to specify an extension more than once in the <code>VkInstanceCreateInfo</code> struct.</dd>\n<dd>\n<b>macOS:</b> This function currently supports either the <code>VK_MVK_macos_surface</code> extension from MoltenVK or <code>VK_EXT_metal_surface</code> extension.</dd></dl>\n<dl class=\"section user\"><dt>Pointer lifetime</dt><dd>The returned array is allocated and freed by GLFW. You should not free it yourself. It is guaranteed to be valid only until the library is terminated.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function may be called from any thread.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"vulkan_guide.html#vulkan_ext\">Querying required Vulkan extensions</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__vulkan.html#ga1a24536bec3f80b08ead18e28e6ae965\">glfwCreateWindowSurface</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.2. </dd></dl>\n\n</div>\n</div>\n<a id=\"gadf228fac94c5fd8f12423ec9af9ff1e9\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gadf228fac94c5fd8f12423ec9af9ff1e9\">&#9670;&nbsp;</a></span>glfwGetInstanceProcAddress()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\"><a class=\"el\" href=\"group__vulkan.html#ga70c01918dc9d233a4fbe0681a43018af\">GLFWvkproc</a> glfwGetInstanceProcAddress </td>\n          <td>(</td>\n          <td class=\"paramtype\">VkInstance&#160;</td>\n          <td class=\"paramname\"><em>instance</em>, </td>\n        </tr>\n        <tr>\n          <td class=\"paramkey\"></td>\n          <td></td>\n          <td class=\"paramtype\">const char *&#160;</td>\n          <td class=\"paramname\"><em>procname</em>&#160;</td>\n        </tr>\n        <tr>\n          <td></td>\n          <td>)</td>\n          <td></td><td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function returns the address of the specified Vulkan core or extension function for the specified instance. If instance is set to <code>NULL</code> it can return any function exported from the Vulkan loader, including at least the following functions:</p>\n<ul>\n<li><code>vkEnumerateInstanceExtensionProperties</code></li>\n<li><code>vkEnumerateInstanceLayerProperties</code></li>\n<li><code>vkCreateInstance</code></li>\n<li><code>vkGetInstanceProcAddr</code></li>\n</ul>\n<p>If Vulkan is not available on the machine, this function returns <code>NULL</code> and generates a <a class=\"el\" href=\"group__errors.html#ga56882b290db23261cc6c053c40c2d08e\">GLFW_API_UNAVAILABLE</a> error. Call <a class=\"el\" href=\"group__vulkan.html#ga2e7f30931e02464b5bc8d0d4b6f9fe2b\">glfwVulkanSupported</a> to check whether Vulkan is at least minimally available.</p>\n<p>This function is equivalent to calling <code>vkGetInstanceProcAddr</code> with a platform-specific query of the Vulkan loader as a fallback.</p>\n<dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">instance</td><td>The Vulkan instance to query, or <code>NULL</code> to retrieve functions related to instance creation. </td></tr>\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">procname</td><td>The ASCII encoded name of the function. </td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section return\"><dt>Returns</dt><dd>The address of the function, or <code>NULL</code> if an <a class=\"el\" href=\"intro_guide.html#error_handling\">error</a> occurred.</dd></dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a> and <a class=\"el\" href=\"group__errors.html#ga56882b290db23261cc6c053c40c2d08e\">GLFW_API_UNAVAILABLE</a>.</dd></dl>\n<dl class=\"section user\"><dt>Pointer lifetime</dt><dd>The returned function pointer is valid until the library is terminated.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function may be called from any thread.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"vulkan_guide.html#vulkan_proc\">Querying Vulkan function pointers</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.2. </dd></dl>\n\n</div>\n</div>\n<a id=\"gaff3823355cdd7e2f3f9f4d9ea9518d92\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gaff3823355cdd7e2f3f9f4d9ea9518d92\">&#9670;&nbsp;</a></span>glfwGetPhysicalDevicePresentationSupport()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">int glfwGetPhysicalDevicePresentationSupport </td>\n          <td>(</td>\n          <td class=\"paramtype\">VkInstance&#160;</td>\n          <td class=\"paramname\"><em>instance</em>, </td>\n        </tr>\n        <tr>\n          <td class=\"paramkey\"></td>\n          <td></td>\n          <td class=\"paramtype\">VkPhysicalDevice&#160;</td>\n          <td class=\"paramname\"><em>device</em>, </td>\n        </tr>\n        <tr>\n          <td class=\"paramkey\"></td>\n          <td></td>\n          <td class=\"paramtype\">uint32_t&#160;</td>\n          <td class=\"paramname\"><em>queuefamily</em>&#160;</td>\n        </tr>\n        <tr>\n          <td></td>\n          <td>)</td>\n          <td></td><td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function returns whether the specified queue family of the specified physical device supports presentation to the platform GLFW was built for.</p>\n<p>If Vulkan or the required window surface creation instance extensions are not available on the machine, or if the specified instance was not created with the required extensions, this function returns <code>GLFW_FALSE</code> and generates a <a class=\"el\" href=\"group__errors.html#ga56882b290db23261cc6c053c40c2d08e\">GLFW_API_UNAVAILABLE</a> error. Call <a class=\"el\" href=\"group__vulkan.html#ga2e7f30931e02464b5bc8d0d4b6f9fe2b\">glfwVulkanSupported</a> to check whether Vulkan is at least minimally available and <a class=\"el\" href=\"group__vulkan.html#ga1abcbe61033958f22f63ef82008874b1\">glfwGetRequiredInstanceExtensions</a> to check what instance extensions are required.</p>\n<dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">instance</td><td>The instance that the physical device belongs to. </td></tr>\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">device</td><td>The physical device that the queue family belongs to. </td></tr>\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">queuefamily</td><td>The index of the queue family to query. </td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section return\"><dt>Returns</dt><dd><code>GLFW_TRUE</code> if the queue family supports presentation, or <code>GLFW_FALSE</code> otherwise.</dd></dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a>, <a class=\"el\" href=\"group__errors.html#ga56882b290db23261cc6c053c40c2d08e\">GLFW_API_UNAVAILABLE</a> and <a class=\"el\" href=\"group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1\">GLFW_PLATFORM_ERROR</a>.</dd></dl>\n<dl class=\"section remark\"><dt>Remarks</dt><dd><b>macOS:</b> This function currently always returns <code>GLFW_TRUE</code>, as the <code>VK_MVK_macos_surface</code> extension does not provide a <code>vkGetPhysicalDevice*PresentationSupport</code> type function.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function may be called from any thread. For synchronization details of Vulkan objects, see the Vulkan specification.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"vulkan_guide.html#vulkan_present\">Querying for Vulkan presentation support</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.2. </dd></dl>\n\n</div>\n</div>\n<a id=\"ga1a24536bec3f80b08ead18e28e6ae965\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga1a24536bec3f80b08ead18e28e6ae965\">&#9670;&nbsp;</a></span>glfwCreateWindowSurface()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">VkResult glfwCreateWindowSurface </td>\n          <td>(</td>\n          <td class=\"paramtype\">VkInstance&#160;</td>\n          <td class=\"paramname\"><em>instance</em>, </td>\n        </tr>\n        <tr>\n          <td class=\"paramkey\"></td>\n          <td></td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *&#160;</td>\n          <td class=\"paramname\"><em>window</em>, </td>\n        </tr>\n        <tr>\n          <td class=\"paramkey\"></td>\n          <td></td>\n          <td class=\"paramtype\">const VkAllocationCallbacks *&#160;</td>\n          <td class=\"paramname\"><em>allocator</em>, </td>\n        </tr>\n        <tr>\n          <td class=\"paramkey\"></td>\n          <td></td>\n          <td class=\"paramtype\">VkSurfaceKHR *&#160;</td>\n          <td class=\"paramname\"><em>surface</em>&#160;</td>\n        </tr>\n        <tr>\n          <td></td>\n          <td>)</td>\n          <td></td><td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function creates a Vulkan surface for the specified window.</p>\n<p>If the Vulkan loader or at least one minimally functional ICD were not found, this function returns <code>VK_ERROR_INITIALIZATION_FAILED</code> and generates a <a class=\"el\" href=\"group__errors.html#ga56882b290db23261cc6c053c40c2d08e\">GLFW_API_UNAVAILABLE</a> error. Call <a class=\"el\" href=\"group__vulkan.html#ga2e7f30931e02464b5bc8d0d4b6f9fe2b\">glfwVulkanSupported</a> to check whether Vulkan is at least minimally available.</p>\n<p>If the required window surface creation instance extensions are not available or if the specified instance was not created with these extensions enabled, this function returns <code>VK_ERROR_EXTENSION_NOT_PRESENT</code> and generates a <a class=\"el\" href=\"group__errors.html#ga56882b290db23261cc6c053c40c2d08e\">GLFW_API_UNAVAILABLE</a> error. Call <a class=\"el\" href=\"group__vulkan.html#ga1abcbe61033958f22f63ef82008874b1\">glfwGetRequiredInstanceExtensions</a> to check what instance extensions are required.</p>\n<p>The window surface cannot be shared with another API so the window must have been created with the <a class=\"el\" href=\"window_guide.html#GLFW_CLIENT_API_attrib\">client api hint</a> set to <code>GLFW_NO_API</code> otherwise it generates a <a class=\"el\" href=\"group__errors.html#gaaf2ef9aa8202c2b82ac2d921e554c687\">GLFW_INVALID_VALUE</a> error and returns <code>VK_ERROR_NATIVE_WINDOW_IN_USE_KHR</code>.</p>\n<p>The window surface must be destroyed before the specified Vulkan instance. It is the responsibility of the caller to destroy the window surface. GLFW does not destroy it for you. Call <code>vkDestroySurfaceKHR</code> to destroy the surface.</p>\n<dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">instance</td><td>The Vulkan instance to create the surface in. </td></tr>\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">window</td><td>The window to create the surface for. </td></tr>\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">allocator</td><td>The allocator to use, or <code>NULL</code> to use the default allocator. </td></tr>\n    <tr><td class=\"paramdir\">[out]</td><td class=\"paramname\">surface</td><td>Where to store the handle of the surface. This is set to <code>VK_NULL_HANDLE</code> if an error occurred. </td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section return\"><dt>Returns</dt><dd><code>VK_SUCCESS</code> if successful, or a Vulkan error code if an <a class=\"el\" href=\"intro_guide.html#error_handling\">error</a> occurred.</dd></dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a>, <a class=\"el\" href=\"group__errors.html#ga56882b290db23261cc6c053c40c2d08e\">GLFW_API_UNAVAILABLE</a>, <a class=\"el\" href=\"group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1\">GLFW_PLATFORM_ERROR</a> and <a class=\"el\" href=\"group__errors.html#gaaf2ef9aa8202c2b82ac2d921e554c687\">GLFW_INVALID_VALUE</a></dd></dl>\n<dl class=\"section remark\"><dt>Remarks</dt><dd>If an error occurs before the creation call is made, GLFW returns the Vulkan error code most appropriate for the error. Appropriate use of <a class=\"el\" href=\"group__vulkan.html#ga2e7f30931e02464b5bc8d0d4b6f9fe2b\">glfwVulkanSupported</a> and <a class=\"el\" href=\"group__vulkan.html#ga1abcbe61033958f22f63ef82008874b1\">glfwGetRequiredInstanceExtensions</a> should eliminate almost all occurrences of these errors.</dd>\n<dd>\n<b>macOS:</b> This function currently only supports the <code>VK_MVK_macos_surface</code> extension from MoltenVK.</dd>\n<dd>\n<b>macOS:</b> This function creates and sets a <code>CAMetalLayer</code> instance for the window content view, which is required for MoltenVK to function.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function may be called from any thread. For synchronization details of Vulkan objects, see the Vulkan specification.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"vulkan_guide.html#vulkan_surface\">Creating a Vulkan window surface</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__vulkan.html#ga1abcbe61033958f22f63ef82008874b1\">glfwGetRequiredInstanceExtensions</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.2. </dd></dl>\n\n</div>\n</div>\n</div><!-- contents -->\n<address class=\"footer\">\n<p>\nLast update on Mon Jan 20 2020 for GLFW 3.3.2\n</p>\n</address>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/group__window.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta http-equiv=\"X-UA-Compatible\" content=\"IE=9\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<title>GLFW: Window reference</title>\n<link href=\"tabs.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"jquery.js\"></script>\n<script type=\"text/javascript\" src=\"dynsections.js\"></script>\n<link href=\"search/search.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"search/searchdata.js\"></script>\n<script type=\"text/javascript\" src=\"search/search.js\"></script>\n<link href=\"doxygen.css\" rel=\"stylesheet\" type=\"text/css\" />\n<link href=\"extra.css\" rel=\"stylesheet\" type=\"text/css\"/>\n</head>\n<body>\n<div id=\"top\"><!-- do not remove this div, it is closed by doxygen! -->\n<div id=\"titlearea\">\n\t<div class=\"glfwheader\">\n\t\t<a href=\"https://www.glfw.org/\" id=\"glfwhome\">GLFW</a>\n\t\t<ul class=\"glfwnavbar\">\n\t\t\t<li><a href=\"https://www.glfw.org/documentation.html\">Documentation</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/download.html\">Download</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/community.html\">Community</a></li>\n\t\t</ul>\n\t</div>\n</div>\n<!-- end header part -->\n<!-- Generated by Doxygen 1.8.16 -->\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\nvar searchBox = new SearchBox(\"searchBox\", \"search\",false,'Search');\n/* @license-end */\n</script>\n<script type=\"text/javascript\" src=\"menudata.js\"></script>\n<script type=\"text/javascript\" src=\"menu.js\"></script>\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\n$(function() {\n  initMenu('',true,false,'search.php','Search');\n  $(document).ready(function() { init_search(); });\n});\n/* @license-end */</script>\n<div id=\"main-nav\"></div>\n</div><!-- top -->\n<!-- window showing the filter options -->\n<div id=\"MSearchSelectWindow\"\n     onmouseover=\"return searchBox.OnSearchSelectShow()\"\n     onmouseout=\"return searchBox.OnSearchSelectHide()\"\n     onkeydown=\"return searchBox.OnSearchSelectKey(event)\">\n</div>\n\n<!-- iframe showing the search results (closed by default) -->\n<div id=\"MSearchResultsWindow\">\n<iframe src=\"javascript:void(0)\" frameborder=\"0\" \n        name=\"MSearchResults\" id=\"MSearchResults\">\n</iframe>\n</div>\n\n<div class=\"header\">\n  <div class=\"summary\">\n<a href=\"#define-members\">Macros</a> &#124;\n<a href=\"#typedef-members\">Typedefs</a> &#124;\n<a href=\"#func-members\">Functions</a>  </div>\n  <div class=\"headertitle\">\n<div class=\"title\">Window reference</div>  </div>\n</div><!--header-->\n<div class=\"contents\">\n<a name=\"details\" id=\"details\"></a><h2 class=\"groupheader\">Description</h2>\n<p>This is the reference documentation for window related functions and types, including creation, deletion and event polling. For more task-oriented information, see the <a class=\"el\" href=\"window_guide.html\">Window guide</a>. </p>\n<table class=\"memberdecls\">\n<tr class=\"heading\"><td colspan=\"2\"><h2 class=\"groupheader\"><a name=\"define-members\"></a>\nMacros</h2></td></tr>\n<tr class=\"memitem:ga54ddb14825a1541a56e22afb5f832a9e\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga54ddb14825a1541a56e22afb5f832a9e\">GLFW_FOCUSED</a>&#160;&#160;&#160;0x00020001</td></tr>\n<tr class=\"memdesc:ga54ddb14825a1541a56e22afb5f832a9e\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Input focus window hint and attribute.  <a href=\"group__window.html#ga54ddb14825a1541a56e22afb5f832a9e\">More...</a><br /></td></tr>\n<tr class=\"separator:ga54ddb14825a1541a56e22afb5f832a9e\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga39d44b7c056e55e581355a92d240b58a\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga39d44b7c056e55e581355a92d240b58a\">GLFW_ICONIFIED</a>&#160;&#160;&#160;0x00020002</td></tr>\n<tr class=\"memdesc:ga39d44b7c056e55e581355a92d240b58a\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Window iconification window attribute.  <a href=\"group__window.html#ga39d44b7c056e55e581355a92d240b58a\">More...</a><br /></td></tr>\n<tr class=\"separator:ga39d44b7c056e55e581355a92d240b58a\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gadba13c7a1b3aa40831eb2beedbd5bd1d\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#gadba13c7a1b3aa40831eb2beedbd5bd1d\">GLFW_RESIZABLE</a>&#160;&#160;&#160;0x00020003</td></tr>\n<tr class=\"memdesc:gadba13c7a1b3aa40831eb2beedbd5bd1d\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Window resize-ability window hint and attribute.  <a href=\"group__window.html#gadba13c7a1b3aa40831eb2beedbd5bd1d\">More...</a><br /></td></tr>\n<tr class=\"separator:gadba13c7a1b3aa40831eb2beedbd5bd1d\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gafb3cdc45297e06d8f1eb13adc69ca6c4\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#gafb3cdc45297e06d8f1eb13adc69ca6c4\">GLFW_VISIBLE</a>&#160;&#160;&#160;0x00020004</td></tr>\n<tr class=\"memdesc:gafb3cdc45297e06d8f1eb13adc69ca6c4\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Window visibility window hint and attribute.  <a href=\"group__window.html#gafb3cdc45297e06d8f1eb13adc69ca6c4\">More...</a><br /></td></tr>\n<tr class=\"separator:gafb3cdc45297e06d8f1eb13adc69ca6c4\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga21b854d36314c94d65aed84405b2f25e\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga21b854d36314c94d65aed84405b2f25e\">GLFW_DECORATED</a>&#160;&#160;&#160;0x00020005</td></tr>\n<tr class=\"memdesc:ga21b854d36314c94d65aed84405b2f25e\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Window decoration window hint and attribute.  <a href=\"group__window.html#ga21b854d36314c94d65aed84405b2f25e\">More...</a><br /></td></tr>\n<tr class=\"separator:ga21b854d36314c94d65aed84405b2f25e\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga9d9874fc928200136a6dcdad726aa252\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga9d9874fc928200136a6dcdad726aa252\">GLFW_AUTO_ICONIFY</a>&#160;&#160;&#160;0x00020006</td></tr>\n<tr class=\"memdesc:ga9d9874fc928200136a6dcdad726aa252\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Window auto-iconification window hint and attribute.  <a href=\"group__window.html#ga9d9874fc928200136a6dcdad726aa252\">More...</a><br /></td></tr>\n<tr class=\"separator:ga9d9874fc928200136a6dcdad726aa252\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga7fb0be51407783b41adbf5bec0b09d80\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga7fb0be51407783b41adbf5bec0b09d80\">GLFW_FLOATING</a>&#160;&#160;&#160;0x00020007</td></tr>\n<tr class=\"memdesc:ga7fb0be51407783b41adbf5bec0b09d80\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Window decoration window hint and attribute.  <a href=\"group__window.html#ga7fb0be51407783b41adbf5bec0b09d80\">More...</a><br /></td></tr>\n<tr class=\"separator:ga7fb0be51407783b41adbf5bec0b09d80\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gad8ccb396253ad0b72c6d4c917eb38a03\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#gad8ccb396253ad0b72c6d4c917eb38a03\">GLFW_MAXIMIZED</a>&#160;&#160;&#160;0x00020008</td></tr>\n<tr class=\"memdesc:gad8ccb396253ad0b72c6d4c917eb38a03\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Window maximization window hint and attribute.  <a href=\"group__window.html#gad8ccb396253ad0b72c6d4c917eb38a03\">More...</a><br /></td></tr>\n<tr class=\"separator:gad8ccb396253ad0b72c6d4c917eb38a03\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga5ac0847c0aa0b3619f2855707b8a7a77\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga5ac0847c0aa0b3619f2855707b8a7a77\">GLFW_CENTER_CURSOR</a>&#160;&#160;&#160;0x00020009</td></tr>\n<tr class=\"memdesc:ga5ac0847c0aa0b3619f2855707b8a7a77\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Cursor centering window hint.  <a href=\"group__window.html#ga5ac0847c0aa0b3619f2855707b8a7a77\">More...</a><br /></td></tr>\n<tr class=\"separator:ga5ac0847c0aa0b3619f2855707b8a7a77\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga60a0578c3b9449027d683a9c6abb9f14\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga60a0578c3b9449027d683a9c6abb9f14\">GLFW_TRANSPARENT_FRAMEBUFFER</a>&#160;&#160;&#160;0x0002000A</td></tr>\n<tr class=\"memdesc:ga60a0578c3b9449027d683a9c6abb9f14\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Window framebuffer transparency hint and attribute.  <a href=\"group__window.html#ga60a0578c3b9449027d683a9c6abb9f14\">More...</a><br /></td></tr>\n<tr class=\"separator:ga60a0578c3b9449027d683a9c6abb9f14\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga8665c71c6fa3d22425c6a0e8a3f89d8a\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga8665c71c6fa3d22425c6a0e8a3f89d8a\">GLFW_HOVERED</a>&#160;&#160;&#160;0x0002000B</td></tr>\n<tr class=\"memdesc:ga8665c71c6fa3d22425c6a0e8a3f89d8a\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Mouse cursor hover window attribute.  <a href=\"group__window.html#ga8665c71c6fa3d22425c6a0e8a3f89d8a\">More...</a><br /></td></tr>\n<tr class=\"separator:ga8665c71c6fa3d22425c6a0e8a3f89d8a\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gafa94b1da34bfd6488c0d709761504dfc\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#gafa94b1da34bfd6488c0d709761504dfc\">GLFW_FOCUS_ON_SHOW</a>&#160;&#160;&#160;0x0002000C</td></tr>\n<tr class=\"memdesc:gafa94b1da34bfd6488c0d709761504dfc\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Input focus on calling show window hint and attribute.  <a href=\"group__window.html#gafa94b1da34bfd6488c0d709761504dfc\">More...</a><br /></td></tr>\n<tr class=\"separator:gafa94b1da34bfd6488c0d709761504dfc\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gaf78ed8e417dbcc1e354906cc2708c982\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#gaf78ed8e417dbcc1e354906cc2708c982\">GLFW_RED_BITS</a>&#160;&#160;&#160;0x00021001</td></tr>\n<tr class=\"memdesc:gaf78ed8e417dbcc1e354906cc2708c982\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Framebuffer bit depth hint.  <a href=\"group__window.html#gaf78ed8e417dbcc1e354906cc2708c982\">More...</a><br /></td></tr>\n<tr class=\"separator:gaf78ed8e417dbcc1e354906cc2708c982\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gafba3b72638c914e5fb8a237dd4c50d4d\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#gafba3b72638c914e5fb8a237dd4c50d4d\">GLFW_GREEN_BITS</a>&#160;&#160;&#160;0x00021002</td></tr>\n<tr class=\"memdesc:gafba3b72638c914e5fb8a237dd4c50d4d\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Framebuffer bit depth hint.  <a href=\"group__window.html#gafba3b72638c914e5fb8a237dd4c50d4d\">More...</a><br /></td></tr>\n<tr class=\"separator:gafba3b72638c914e5fb8a237dd4c50d4d\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gab292ea403db6d514537b515311bf9ae3\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#gab292ea403db6d514537b515311bf9ae3\">GLFW_BLUE_BITS</a>&#160;&#160;&#160;0x00021003</td></tr>\n<tr class=\"memdesc:gab292ea403db6d514537b515311bf9ae3\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Framebuffer bit depth hint.  <a href=\"group__window.html#gab292ea403db6d514537b515311bf9ae3\">More...</a><br /></td></tr>\n<tr class=\"separator:gab292ea403db6d514537b515311bf9ae3\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gafed79a3f468997877da86c449bd43e8c\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#gafed79a3f468997877da86c449bd43e8c\">GLFW_ALPHA_BITS</a>&#160;&#160;&#160;0x00021004</td></tr>\n<tr class=\"memdesc:gafed79a3f468997877da86c449bd43e8c\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Framebuffer bit depth hint.  <a href=\"group__window.html#gafed79a3f468997877da86c449bd43e8c\">More...</a><br /></td></tr>\n<tr class=\"separator:gafed79a3f468997877da86c449bd43e8c\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga318a55eac1fee57dfe593b6d38149d07\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga318a55eac1fee57dfe593b6d38149d07\">GLFW_DEPTH_BITS</a>&#160;&#160;&#160;0x00021005</td></tr>\n<tr class=\"memdesc:ga318a55eac1fee57dfe593b6d38149d07\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Framebuffer bit depth hint.  <a href=\"group__window.html#ga318a55eac1fee57dfe593b6d38149d07\">More...</a><br /></td></tr>\n<tr class=\"separator:ga318a55eac1fee57dfe593b6d38149d07\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga5339890a45a1fb38e93cb9fcc5fd069d\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga5339890a45a1fb38e93cb9fcc5fd069d\">GLFW_STENCIL_BITS</a>&#160;&#160;&#160;0x00021006</td></tr>\n<tr class=\"memdesc:ga5339890a45a1fb38e93cb9fcc5fd069d\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Framebuffer bit depth hint.  <a href=\"group__window.html#ga5339890a45a1fb38e93cb9fcc5fd069d\">More...</a><br /></td></tr>\n<tr class=\"separator:ga5339890a45a1fb38e93cb9fcc5fd069d\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gaead34a9a683b2bc20eecf30ba738bfc6\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#gaead34a9a683b2bc20eecf30ba738bfc6\">GLFW_ACCUM_RED_BITS</a>&#160;&#160;&#160;0x00021007</td></tr>\n<tr class=\"memdesc:gaead34a9a683b2bc20eecf30ba738bfc6\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Framebuffer bit depth hint.  <a href=\"group__window.html#gaead34a9a683b2bc20eecf30ba738bfc6\">More...</a><br /></td></tr>\n<tr class=\"separator:gaead34a9a683b2bc20eecf30ba738bfc6\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga65713cee1326f8e9d806fdf93187b471\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga65713cee1326f8e9d806fdf93187b471\">GLFW_ACCUM_GREEN_BITS</a>&#160;&#160;&#160;0x00021008</td></tr>\n<tr class=\"memdesc:ga65713cee1326f8e9d806fdf93187b471\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Framebuffer bit depth hint.  <a href=\"group__window.html#ga65713cee1326f8e9d806fdf93187b471\">More...</a><br /></td></tr>\n<tr class=\"separator:ga65713cee1326f8e9d806fdf93187b471\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga22bbe9104a8ce1f8b88fb4f186aa36ce\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga22bbe9104a8ce1f8b88fb4f186aa36ce\">GLFW_ACCUM_BLUE_BITS</a>&#160;&#160;&#160;0x00021009</td></tr>\n<tr class=\"memdesc:ga22bbe9104a8ce1f8b88fb4f186aa36ce\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Framebuffer bit depth hint.  <a href=\"group__window.html#ga22bbe9104a8ce1f8b88fb4f186aa36ce\">More...</a><br /></td></tr>\n<tr class=\"separator:ga22bbe9104a8ce1f8b88fb4f186aa36ce\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gae829b55591c18169a40ab4067a041b1f\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#gae829b55591c18169a40ab4067a041b1f\">GLFW_ACCUM_ALPHA_BITS</a>&#160;&#160;&#160;0x0002100A</td></tr>\n<tr class=\"memdesc:gae829b55591c18169a40ab4067a041b1f\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Framebuffer bit depth hint.  <a href=\"group__window.html#gae829b55591c18169a40ab4067a041b1f\">More...</a><br /></td></tr>\n<tr class=\"separator:gae829b55591c18169a40ab4067a041b1f\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gab05108c5029443b371112b031d1fa174\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#gab05108c5029443b371112b031d1fa174\">GLFW_AUX_BUFFERS</a>&#160;&#160;&#160;0x0002100B</td></tr>\n<tr class=\"memdesc:gab05108c5029443b371112b031d1fa174\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Framebuffer auxiliary buffer hint.  <a href=\"group__window.html#gab05108c5029443b371112b031d1fa174\">More...</a><br /></td></tr>\n<tr class=\"separator:gab05108c5029443b371112b031d1fa174\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga83d991efca02537e2d69969135b77b03\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga83d991efca02537e2d69969135b77b03\">GLFW_STEREO</a>&#160;&#160;&#160;0x0002100C</td></tr>\n<tr class=\"memdesc:ga83d991efca02537e2d69969135b77b03\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">OpenGL stereoscopic rendering hint.  <a href=\"group__window.html#ga83d991efca02537e2d69969135b77b03\">More...</a><br /></td></tr>\n<tr class=\"separator:ga83d991efca02537e2d69969135b77b03\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga2cdf86fdcb7722fb8829c4e201607535\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga2cdf86fdcb7722fb8829c4e201607535\">GLFW_SAMPLES</a>&#160;&#160;&#160;0x0002100D</td></tr>\n<tr class=\"memdesc:ga2cdf86fdcb7722fb8829c4e201607535\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Framebuffer MSAA samples hint.  <a href=\"group__window.html#ga2cdf86fdcb7722fb8829c4e201607535\">More...</a><br /></td></tr>\n<tr class=\"separator:ga2cdf86fdcb7722fb8829c4e201607535\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga444a8f00414a63220591f9fdb7b5642b\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga444a8f00414a63220591f9fdb7b5642b\">GLFW_SRGB_CAPABLE</a>&#160;&#160;&#160;0x0002100E</td></tr>\n<tr class=\"memdesc:ga444a8f00414a63220591f9fdb7b5642b\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Framebuffer sRGB hint.  <a href=\"group__window.html#ga444a8f00414a63220591f9fdb7b5642b\">More...</a><br /></td></tr>\n<tr class=\"separator:ga444a8f00414a63220591f9fdb7b5642b\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga0f20825e6e47ee8ba389024519682212\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga0f20825e6e47ee8ba389024519682212\">GLFW_REFRESH_RATE</a>&#160;&#160;&#160;0x0002100F</td></tr>\n<tr class=\"memdesc:ga0f20825e6e47ee8ba389024519682212\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Monitor refresh rate hint.  <a href=\"group__window.html#ga0f20825e6e47ee8ba389024519682212\">More...</a><br /></td></tr>\n<tr class=\"separator:ga0f20825e6e47ee8ba389024519682212\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga714a5d569e8a274ea58fdfa020955339\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga714a5d569e8a274ea58fdfa020955339\">GLFW_DOUBLEBUFFER</a>&#160;&#160;&#160;0x00021010</td></tr>\n<tr class=\"memdesc:ga714a5d569e8a274ea58fdfa020955339\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Framebuffer double buffering hint.  <a href=\"group__window.html#ga714a5d569e8a274ea58fdfa020955339\">More...</a><br /></td></tr>\n<tr class=\"separator:ga714a5d569e8a274ea58fdfa020955339\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga649309cf72a3d3de5b1348ca7936c95b\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga649309cf72a3d3de5b1348ca7936c95b\">GLFW_CLIENT_API</a>&#160;&#160;&#160;0x00022001</td></tr>\n<tr class=\"memdesc:ga649309cf72a3d3de5b1348ca7936c95b\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Context client API hint and attribute.  <a href=\"group__window.html#ga649309cf72a3d3de5b1348ca7936c95b\">More...</a><br /></td></tr>\n<tr class=\"separator:ga649309cf72a3d3de5b1348ca7936c95b\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gafe5e4922de1f9932d7e9849bb053b0c0\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#gafe5e4922de1f9932d7e9849bb053b0c0\">GLFW_CONTEXT_VERSION_MAJOR</a>&#160;&#160;&#160;0x00022002</td></tr>\n<tr class=\"memdesc:gafe5e4922de1f9932d7e9849bb053b0c0\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Context client API major version hint and attribute.  <a href=\"group__window.html#gafe5e4922de1f9932d7e9849bb053b0c0\">More...</a><br /></td></tr>\n<tr class=\"separator:gafe5e4922de1f9932d7e9849bb053b0c0\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga31aca791e4b538c4e4a771eb95cc2d07\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga31aca791e4b538c4e4a771eb95cc2d07\">GLFW_CONTEXT_VERSION_MINOR</a>&#160;&#160;&#160;0x00022003</td></tr>\n<tr class=\"memdesc:ga31aca791e4b538c4e4a771eb95cc2d07\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Context client API minor version hint and attribute.  <a href=\"group__window.html#ga31aca791e4b538c4e4a771eb95cc2d07\">More...</a><br /></td></tr>\n<tr class=\"separator:ga31aca791e4b538c4e4a771eb95cc2d07\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gafb9475071aa77c6fb05ca5a5c8678a08\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#gafb9475071aa77c6fb05ca5a5c8678a08\">GLFW_CONTEXT_REVISION</a>&#160;&#160;&#160;0x00022004</td></tr>\n<tr class=\"memdesc:gafb9475071aa77c6fb05ca5a5c8678a08\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Context client API revision number hint and attribute.  <a href=\"group__window.html#gafb9475071aa77c6fb05ca5a5c8678a08\">More...</a><br /></td></tr>\n<tr class=\"separator:gafb9475071aa77c6fb05ca5a5c8678a08\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gade3593916b4c507900aa2d6844810e00\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#gade3593916b4c507900aa2d6844810e00\">GLFW_CONTEXT_ROBUSTNESS</a>&#160;&#160;&#160;0x00022005</td></tr>\n<tr class=\"memdesc:gade3593916b4c507900aa2d6844810e00\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Context robustness hint and attribute.  <a href=\"group__window.html#gade3593916b4c507900aa2d6844810e00\">More...</a><br /></td></tr>\n<tr class=\"separator:gade3593916b4c507900aa2d6844810e00\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga13d24b12465da8b28985f46c8557925b\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga13d24b12465da8b28985f46c8557925b\">GLFW_OPENGL_FORWARD_COMPAT</a>&#160;&#160;&#160;0x00022006</td></tr>\n<tr class=\"memdesc:ga13d24b12465da8b28985f46c8557925b\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">OpenGL forward-compatibility hint and attribute.  <a href=\"group__window.html#ga13d24b12465da8b28985f46c8557925b\">More...</a><br /></td></tr>\n<tr class=\"separator:ga13d24b12465da8b28985f46c8557925b\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga87ec2df0b915201e950ca42d5d0831e1\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga87ec2df0b915201e950ca42d5d0831e1\">GLFW_OPENGL_DEBUG_CONTEXT</a>&#160;&#160;&#160;0x00022007</td></tr>\n<tr class=\"memdesc:ga87ec2df0b915201e950ca42d5d0831e1\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">OpenGL debug context hint and attribute.  <a href=\"group__window.html#ga87ec2df0b915201e950ca42d5d0831e1\">More...</a><br /></td></tr>\n<tr class=\"separator:ga87ec2df0b915201e950ca42d5d0831e1\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga44f3a6b4261fbe351e0b950b0f372e12\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga44f3a6b4261fbe351e0b950b0f372e12\">GLFW_OPENGL_PROFILE</a>&#160;&#160;&#160;0x00022008</td></tr>\n<tr class=\"memdesc:ga44f3a6b4261fbe351e0b950b0f372e12\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">OpenGL profile hint and attribute.  <a href=\"group__window.html#ga44f3a6b4261fbe351e0b950b0f372e12\">More...</a><br /></td></tr>\n<tr class=\"separator:ga44f3a6b4261fbe351e0b950b0f372e12\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga72b648a8378fe3310c7c7bbecc0f7be6\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga72b648a8378fe3310c7c7bbecc0f7be6\">GLFW_CONTEXT_RELEASE_BEHAVIOR</a>&#160;&#160;&#160;0x00022009</td></tr>\n<tr class=\"memdesc:ga72b648a8378fe3310c7c7bbecc0f7be6\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Context flush-on-release hint and attribute.  <a href=\"group__window.html#ga72b648a8378fe3310c7c7bbecc0f7be6\">More...</a><br /></td></tr>\n<tr class=\"separator:ga72b648a8378fe3310c7c7bbecc0f7be6\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga5a52fdfd46d8249c211f923675728082\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga5a52fdfd46d8249c211f923675728082\">GLFW_CONTEXT_NO_ERROR</a>&#160;&#160;&#160;0x0002200A</td></tr>\n<tr class=\"memdesc:ga5a52fdfd46d8249c211f923675728082\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Context error suppression hint and attribute.  <a href=\"group__window.html#ga5a52fdfd46d8249c211f923675728082\">More...</a><br /></td></tr>\n<tr class=\"separator:ga5a52fdfd46d8249c211f923675728082\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga5154cebfcd831c1cc63a4d5ac9bb4486\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga5154cebfcd831c1cc63a4d5ac9bb4486\">GLFW_CONTEXT_CREATION_API</a>&#160;&#160;&#160;0x0002200B</td></tr>\n<tr class=\"memdesc:ga5154cebfcd831c1cc63a4d5ac9bb4486\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Context creation API hint and attribute.  <a href=\"group__window.html#ga5154cebfcd831c1cc63a4d5ac9bb4486\">More...</a><br /></td></tr>\n<tr class=\"separator:ga5154cebfcd831c1cc63a4d5ac9bb4486\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga620bc4280c7eab81ac9f02204500ed47\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga620bc4280c7eab81ac9f02204500ed47\">GLFW_SCALE_TO_MONITOR</a>&#160;&#160;&#160;0x0002200C</td></tr>\n<tr class=\"memdesc:ga620bc4280c7eab81ac9f02204500ed47\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Window content area scaling window <a class=\"el\" href=\"window_guide.html#GLFW_SCALE_TO_MONITOR\">window hint</a>.  <a href=\"group__window.html#ga620bc4280c7eab81ac9f02204500ed47\">More...</a><br /></td></tr>\n<tr class=\"separator:ga620bc4280c7eab81ac9f02204500ed47\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gab6ef2d02eb55800d249ccf1af253c35e\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#gab6ef2d02eb55800d249ccf1af253c35e\">GLFW_COCOA_RETINA_FRAMEBUFFER</a>&#160;&#160;&#160;0x00023001</td></tr>\n<tr class=\"memdesc:gab6ef2d02eb55800d249ccf1af253c35e\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">macOS specific <a class=\"el\" href=\"window_guide.html#GLFW_COCOA_RETINA_FRAMEBUFFER_hint\">window hint</a>.  <a href=\"group__window.html#gab6ef2d02eb55800d249ccf1af253c35e\">More...</a><br /></td></tr>\n<tr class=\"separator:gab6ef2d02eb55800d249ccf1af253c35e\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga70fa0fbc745de6aa824df79a580e84b5\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga70fa0fbc745de6aa824df79a580e84b5\">GLFW_COCOA_FRAME_NAME</a>&#160;&#160;&#160;0x00023002</td></tr>\n<tr class=\"memdesc:ga70fa0fbc745de6aa824df79a580e84b5\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">macOS specific <a class=\"el\" href=\"window_guide.html#GLFW_COCOA_FRAME_NAME_hint\">window hint</a>.  <a href=\"group__window.html#ga70fa0fbc745de6aa824df79a580e84b5\">More...</a><br /></td></tr>\n<tr class=\"separator:ga70fa0fbc745de6aa824df79a580e84b5\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga53c84ed2ddd94e15bbd44b1f6f7feafc\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga53c84ed2ddd94e15bbd44b1f6f7feafc\">GLFW_COCOA_GRAPHICS_SWITCHING</a>&#160;&#160;&#160;0x00023003</td></tr>\n<tr class=\"memdesc:ga53c84ed2ddd94e15bbd44b1f6f7feafc\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">macOS specific <a class=\"el\" href=\"window_guide.html#GLFW_COCOA_GRAPHICS_SWITCHING_hint\">window hint</a>.  <a href=\"group__window.html#ga53c84ed2ddd94e15bbd44b1f6f7feafc\">More...</a><br /></td></tr>\n<tr class=\"separator:ga53c84ed2ddd94e15bbd44b1f6f7feafc\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gae5a9ea2fccccd92edbd343fc56461114\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#gae5a9ea2fccccd92edbd343fc56461114\">GLFW_X11_CLASS_NAME</a>&#160;&#160;&#160;0x00024001</td></tr>\n<tr class=\"memdesc:gae5a9ea2fccccd92edbd343fc56461114\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">X11 specific <a class=\"el\" href=\"window_guide.html#GLFW_X11_CLASS_NAME_hint\">window hint</a>.  <a href=\"group__window.html#gae5a9ea2fccccd92edbd343fc56461114\">More...</a><br /></td></tr>\n<tr class=\"separator:gae5a9ea2fccccd92edbd343fc56461114\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga494c3c0d911e4b860b946530a3e389e8\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">#define&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga494c3c0d911e4b860b946530a3e389e8\">GLFW_X11_INSTANCE_NAME</a>&#160;&#160;&#160;0x00024002</td></tr>\n<tr class=\"memdesc:ga494c3c0d911e4b860b946530a3e389e8\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">X11 specific <a class=\"el\" href=\"window_guide.html#GLFW_X11_CLASS_NAME_hint\">window hint</a>.  <a href=\"group__window.html#ga494c3c0d911e4b860b946530a3e389e8\">More...</a><br /></td></tr>\n<tr class=\"separator:ga494c3c0d911e4b860b946530a3e389e8\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n</table><table class=\"memberdecls\">\n<tr class=\"heading\"><td colspan=\"2\"><h2 class=\"groupheader\"><a name=\"typedef-members\"></a>\nTypedefs</h2></td></tr>\n<tr class=\"memitem:ga3c96d80d363e67d13a41b5d1821f3242\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">typedef struct <a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a></td></tr>\n<tr class=\"memdesc:ga3c96d80d363e67d13a41b5d1821f3242\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Opaque window object.  <a href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">More...</a><br /></td></tr>\n<tr class=\"separator:ga3c96d80d363e67d13a41b5d1821f3242\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gafd8db81fdb0e850549dc6bace5ed697a\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">typedef void(*&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#gafd8db81fdb0e850549dc6bace5ed697a\">GLFWwindowposfun</a>) (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *, int, int)</td></tr>\n<tr class=\"memdesc:gafd8db81fdb0e850549dc6bace5ed697a\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">The function pointer type for window position callbacks.  <a href=\"group__window.html#gafd8db81fdb0e850549dc6bace5ed697a\">More...</a><br /></td></tr>\n<tr class=\"separator:gafd8db81fdb0e850549dc6bace5ed697a\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gae49ee6ebc03fa2da024b89943a331355\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">typedef void(*&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#gae49ee6ebc03fa2da024b89943a331355\">GLFWwindowsizefun</a>) (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *, int, int)</td></tr>\n<tr class=\"memdesc:gae49ee6ebc03fa2da024b89943a331355\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">The function pointer type for window size callbacks.  <a href=\"group__window.html#gae49ee6ebc03fa2da024b89943a331355\">More...</a><br /></td></tr>\n<tr class=\"separator:gae49ee6ebc03fa2da024b89943a331355\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga93e7c2555bd837f4ed8b20f76cada72e\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">typedef void(*&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga93e7c2555bd837f4ed8b20f76cada72e\">GLFWwindowclosefun</a>) (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *)</td></tr>\n<tr class=\"memdesc:ga93e7c2555bd837f4ed8b20f76cada72e\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">The function pointer type for window close callbacks.  <a href=\"group__window.html#ga93e7c2555bd837f4ed8b20f76cada72e\">More...</a><br /></td></tr>\n<tr class=\"separator:ga93e7c2555bd837f4ed8b20f76cada72e\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga7a56f9e0227e2cd9470d80d919032e08\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">typedef void(*&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga7a56f9e0227e2cd9470d80d919032e08\">GLFWwindowrefreshfun</a>) (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *)</td></tr>\n<tr class=\"memdesc:ga7a56f9e0227e2cd9470d80d919032e08\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">The function pointer type for window content refresh callbacks.  <a href=\"group__window.html#ga7a56f9e0227e2cd9470d80d919032e08\">More...</a><br /></td></tr>\n<tr class=\"separator:ga7a56f9e0227e2cd9470d80d919032e08\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga58be2061828dd35080bb438405d3a7e2\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">typedef void(*&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga58be2061828dd35080bb438405d3a7e2\">GLFWwindowfocusfun</a>) (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *, int)</td></tr>\n<tr class=\"memdesc:ga58be2061828dd35080bb438405d3a7e2\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">The function pointer type for window focus callbacks.  <a href=\"group__window.html#ga58be2061828dd35080bb438405d3a7e2\">More...</a><br /></td></tr>\n<tr class=\"separator:ga58be2061828dd35080bb438405d3a7e2\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gad2d4e4c3d28b1242e742e8268b9528af\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">typedef void(*&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#gad2d4e4c3d28b1242e742e8268b9528af\">GLFWwindowiconifyfun</a>) (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *, int)</td></tr>\n<tr class=\"memdesc:gad2d4e4c3d28b1242e742e8268b9528af\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">The function pointer type for window iconify callbacks.  <a href=\"group__window.html#gad2d4e4c3d28b1242e742e8268b9528af\">More...</a><br /></td></tr>\n<tr class=\"separator:gad2d4e4c3d28b1242e742e8268b9528af\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga7269a3d1cb100c0081f95fc09afa4949\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">typedef void(*&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga7269a3d1cb100c0081f95fc09afa4949\">GLFWwindowmaximizefun</a>) (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *, int)</td></tr>\n<tr class=\"memdesc:ga7269a3d1cb100c0081f95fc09afa4949\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">The function pointer type for window maximize callbacks.  <a href=\"group__window.html#ga7269a3d1cb100c0081f95fc09afa4949\">More...</a><br /></td></tr>\n<tr class=\"separator:ga7269a3d1cb100c0081f95fc09afa4949\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga3e218ef9ff826129c55a7d5f6971a285\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">typedef void(*&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga3e218ef9ff826129c55a7d5f6971a285\">GLFWframebuffersizefun</a>) (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *, int, int)</td></tr>\n<tr class=\"memdesc:ga3e218ef9ff826129c55a7d5f6971a285\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">The function pointer type for framebuffer size callbacks.  <a href=\"group__window.html#ga3e218ef9ff826129c55a7d5f6971a285\">More...</a><br /></td></tr>\n<tr class=\"separator:ga3e218ef9ff826129c55a7d5f6971a285\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga1da46b65eafcc1a7ff0adb8f4a7b72fd\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">typedef void(*&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga1da46b65eafcc1a7ff0adb8f4a7b72fd\">GLFWwindowcontentscalefun</a>) (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *, float, float)</td></tr>\n<tr class=\"memdesc:ga1da46b65eafcc1a7ff0adb8f4a7b72fd\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">The function pointer type for window content scale callbacks.  <a href=\"group__window.html#ga1da46b65eafcc1a7ff0adb8f4a7b72fd\">More...</a><br /></td></tr>\n<tr class=\"separator:ga1da46b65eafcc1a7ff0adb8f4a7b72fd\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gac81c32f4437de7b3aa58ab62c3d9e5b1\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">typedef struct <a class=\"el\" href=\"structGLFWimage.html\">GLFWimage</a>&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#gac81c32f4437de7b3aa58ab62c3d9e5b1\">GLFWimage</a></td></tr>\n<tr class=\"memdesc:gac81c32f4437de7b3aa58ab62c3d9e5b1\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Image data.  <a href=\"group__window.html#gac81c32f4437de7b3aa58ab62c3d9e5b1\">More...</a><br /></td></tr>\n<tr class=\"separator:gac81c32f4437de7b3aa58ab62c3d9e5b1\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n</table><table class=\"memberdecls\">\n<tr class=\"heading\"><td colspan=\"2\"><h2 class=\"groupheader\"><a name=\"func-members\"></a>\nFunctions</h2></td></tr>\n<tr class=\"memitem:gaa77c4898dfb83344a6b4f76aa16b9a4a\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">void&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#gaa77c4898dfb83344a6b4f76aa16b9a4a\">glfwDefaultWindowHints</a> (void)</td></tr>\n<tr class=\"memdesc:gaa77c4898dfb83344a6b4f76aa16b9a4a\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Resets all window hints to their default values.  <a href=\"group__window.html#gaa77c4898dfb83344a6b4f76aa16b9a4a\">More...</a><br /></td></tr>\n<tr class=\"separator:gaa77c4898dfb83344a6b4f76aa16b9a4a\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga7d9c8c62384b1e2821c4dc48952d2033\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">void&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga7d9c8c62384b1e2821c4dc48952d2033\">glfwWindowHint</a> (int hint, int value)</td></tr>\n<tr class=\"memdesc:ga7d9c8c62384b1e2821c4dc48952d2033\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Sets the specified window hint to the desired value.  <a href=\"group__window.html#ga7d9c8c62384b1e2821c4dc48952d2033\">More...</a><br /></td></tr>\n<tr class=\"separator:ga7d9c8c62384b1e2821c4dc48952d2033\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga8cb2782861c9d997bcf2dea97f363e5f\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">void&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga8cb2782861c9d997bcf2dea97f363e5f\">glfwWindowHintString</a> (int hint, const char *value)</td></tr>\n<tr class=\"memdesc:ga8cb2782861c9d997bcf2dea97f363e5f\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Sets the specified window hint to the desired value.  <a href=\"group__window.html#ga8cb2782861c9d997bcf2dea97f363e5f\">More...</a><br /></td></tr>\n<tr class=\"separator:ga8cb2782861c9d997bcf2dea97f363e5f\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga5c336fddf2cbb5b92f65f10fb6043344\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\"><a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga5c336fddf2cbb5b92f65f10fb6043344\">glfwCreateWindow</a> (int width, int height, const char *title, <a class=\"el\" href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a> *monitor, <a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *share)</td></tr>\n<tr class=\"memdesc:ga5c336fddf2cbb5b92f65f10fb6043344\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Creates a window and its associated context.  <a href=\"group__window.html#ga5c336fddf2cbb5b92f65f10fb6043344\">More...</a><br /></td></tr>\n<tr class=\"separator:ga5c336fddf2cbb5b92f65f10fb6043344\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gacdf43e51376051d2c091662e9fe3d7b2\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">void&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#gacdf43e51376051d2c091662e9fe3d7b2\">glfwDestroyWindow</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window)</td></tr>\n<tr class=\"memdesc:gacdf43e51376051d2c091662e9fe3d7b2\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Destroys the specified window and its context.  <a href=\"group__window.html#gacdf43e51376051d2c091662e9fe3d7b2\">More...</a><br /></td></tr>\n<tr class=\"separator:gacdf43e51376051d2c091662e9fe3d7b2\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga24e02fbfefbb81fc45320989f8140ab5\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">int&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga24e02fbfefbb81fc45320989f8140ab5\">glfwWindowShouldClose</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window)</td></tr>\n<tr class=\"memdesc:ga24e02fbfefbb81fc45320989f8140ab5\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Checks the close flag of the specified window.  <a href=\"group__window.html#ga24e02fbfefbb81fc45320989f8140ab5\">More...</a><br /></td></tr>\n<tr class=\"separator:ga24e02fbfefbb81fc45320989f8140ab5\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga49c449dde2a6f87d996f4daaa09d6708\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">void&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga49c449dde2a6f87d996f4daaa09d6708\">glfwSetWindowShouldClose</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window, int value)</td></tr>\n<tr class=\"memdesc:ga49c449dde2a6f87d996f4daaa09d6708\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Sets the close flag of the specified window.  <a href=\"group__window.html#ga49c449dde2a6f87d996f4daaa09d6708\">More...</a><br /></td></tr>\n<tr class=\"separator:ga49c449dde2a6f87d996f4daaa09d6708\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga5d877f09e968cef7a360b513306f17ff\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">void&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga5d877f09e968cef7a360b513306f17ff\">glfwSetWindowTitle</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window, const char *title)</td></tr>\n<tr class=\"memdesc:ga5d877f09e968cef7a360b513306f17ff\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Sets the title of the specified window.  <a href=\"group__window.html#ga5d877f09e968cef7a360b513306f17ff\">More...</a><br /></td></tr>\n<tr class=\"separator:ga5d877f09e968cef7a360b513306f17ff\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gadd7ccd39fe7a7d1f0904666ae5932dc5\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">void&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#gadd7ccd39fe7a7d1f0904666ae5932dc5\">glfwSetWindowIcon</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window, int count, const <a class=\"el\" href=\"structGLFWimage.html\">GLFWimage</a> *images)</td></tr>\n<tr class=\"memdesc:gadd7ccd39fe7a7d1f0904666ae5932dc5\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Sets the icon for the specified window.  <a href=\"group__window.html#gadd7ccd39fe7a7d1f0904666ae5932dc5\">More...</a><br /></td></tr>\n<tr class=\"separator:gadd7ccd39fe7a7d1f0904666ae5932dc5\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga73cb526c000876fd8ddf571570fdb634\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">void&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga73cb526c000876fd8ddf571570fdb634\">glfwGetWindowPos</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window, int *xpos, int *ypos)</td></tr>\n<tr class=\"memdesc:ga73cb526c000876fd8ddf571570fdb634\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Retrieves the position of the content area of the specified window.  <a href=\"group__window.html#ga73cb526c000876fd8ddf571570fdb634\">More...</a><br /></td></tr>\n<tr class=\"separator:ga73cb526c000876fd8ddf571570fdb634\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga1abb6d690e8c88e0c8cd1751356dbca8\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">void&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga1abb6d690e8c88e0c8cd1751356dbca8\">glfwSetWindowPos</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window, int xpos, int ypos)</td></tr>\n<tr class=\"memdesc:ga1abb6d690e8c88e0c8cd1751356dbca8\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Sets the position of the content area of the specified window.  <a href=\"group__window.html#ga1abb6d690e8c88e0c8cd1751356dbca8\">More...</a><br /></td></tr>\n<tr class=\"separator:ga1abb6d690e8c88e0c8cd1751356dbca8\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gaeea7cbc03373a41fb51cfbf9f2a5d4c6\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">void&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#gaeea7cbc03373a41fb51cfbf9f2a5d4c6\">glfwGetWindowSize</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window, int *width, int *height)</td></tr>\n<tr class=\"memdesc:gaeea7cbc03373a41fb51cfbf9f2a5d4c6\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Retrieves the size of the content area of the specified window.  <a href=\"group__window.html#gaeea7cbc03373a41fb51cfbf9f2a5d4c6\">More...</a><br /></td></tr>\n<tr class=\"separator:gaeea7cbc03373a41fb51cfbf9f2a5d4c6\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gac314fa6cec7d2d307be9963e2709cc90\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">void&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#gac314fa6cec7d2d307be9963e2709cc90\">glfwSetWindowSizeLimits</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window, int minwidth, int minheight, int maxwidth, int maxheight)</td></tr>\n<tr class=\"memdesc:gac314fa6cec7d2d307be9963e2709cc90\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Sets the size limits of the specified window.  <a href=\"group__window.html#gac314fa6cec7d2d307be9963e2709cc90\">More...</a><br /></td></tr>\n<tr class=\"separator:gac314fa6cec7d2d307be9963e2709cc90\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga72ac8cb1ee2e312a878b55153d81b937\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">void&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga72ac8cb1ee2e312a878b55153d81b937\">glfwSetWindowAspectRatio</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window, int numer, int denom)</td></tr>\n<tr class=\"memdesc:ga72ac8cb1ee2e312a878b55153d81b937\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Sets the aspect ratio of the specified window.  <a href=\"group__window.html#ga72ac8cb1ee2e312a878b55153d81b937\">More...</a><br /></td></tr>\n<tr class=\"separator:ga72ac8cb1ee2e312a878b55153d81b937\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga371911f12c74c504dd8d47d832d095cb\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">void&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga371911f12c74c504dd8d47d832d095cb\">glfwSetWindowSize</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window, int width, int height)</td></tr>\n<tr class=\"memdesc:ga371911f12c74c504dd8d47d832d095cb\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Sets the size of the content area of the specified window.  <a href=\"group__window.html#ga371911f12c74c504dd8d47d832d095cb\">More...</a><br /></td></tr>\n<tr class=\"separator:ga371911f12c74c504dd8d47d832d095cb\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga0e2637a4161afb283f5300c7f94785c9\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">void&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga0e2637a4161afb283f5300c7f94785c9\">glfwGetFramebufferSize</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window, int *width, int *height)</td></tr>\n<tr class=\"memdesc:ga0e2637a4161afb283f5300c7f94785c9\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Retrieves the size of the framebuffer of the specified window.  <a href=\"group__window.html#ga0e2637a4161afb283f5300c7f94785c9\">More...</a><br /></td></tr>\n<tr class=\"separator:ga0e2637a4161afb283f5300c7f94785c9\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga1a9fd382058c53101b21cf211898f1f1\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">void&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga1a9fd382058c53101b21cf211898f1f1\">glfwGetWindowFrameSize</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window, int *left, int *top, int *right, int *bottom)</td></tr>\n<tr class=\"memdesc:ga1a9fd382058c53101b21cf211898f1f1\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Retrieves the size of the frame of the window.  <a href=\"group__window.html#ga1a9fd382058c53101b21cf211898f1f1\">More...</a><br /></td></tr>\n<tr class=\"separator:ga1a9fd382058c53101b21cf211898f1f1\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gaf5d31de9c19c4f994facea64d2b3106c\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">void&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#gaf5d31de9c19c4f994facea64d2b3106c\">glfwGetWindowContentScale</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window, float *xscale, float *yscale)</td></tr>\n<tr class=\"memdesc:gaf5d31de9c19c4f994facea64d2b3106c\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Retrieves the content scale for the specified window.  <a href=\"group__window.html#gaf5d31de9c19c4f994facea64d2b3106c\">More...</a><br /></td></tr>\n<tr class=\"separator:gaf5d31de9c19c4f994facea64d2b3106c\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gad09f0bd7a6307c4533b7061828480a84\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">float&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#gad09f0bd7a6307c4533b7061828480a84\">glfwGetWindowOpacity</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window)</td></tr>\n<tr class=\"memdesc:gad09f0bd7a6307c4533b7061828480a84\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns the opacity of the whole window.  <a href=\"group__window.html#gad09f0bd7a6307c4533b7061828480a84\">More...</a><br /></td></tr>\n<tr class=\"separator:gad09f0bd7a6307c4533b7061828480a84\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gac31caeb3d1088831b13d2c8a156802e9\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">void&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#gac31caeb3d1088831b13d2c8a156802e9\">glfwSetWindowOpacity</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window, float opacity)</td></tr>\n<tr class=\"memdesc:gac31caeb3d1088831b13d2c8a156802e9\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Sets the opacity of the whole window.  <a href=\"group__window.html#gac31caeb3d1088831b13d2c8a156802e9\">More...</a><br /></td></tr>\n<tr class=\"separator:gac31caeb3d1088831b13d2c8a156802e9\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga1bb559c0ebaad63c5c05ad2a066779c4\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">void&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga1bb559c0ebaad63c5c05ad2a066779c4\">glfwIconifyWindow</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window)</td></tr>\n<tr class=\"memdesc:ga1bb559c0ebaad63c5c05ad2a066779c4\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Iconifies the specified window.  <a href=\"group__window.html#ga1bb559c0ebaad63c5c05ad2a066779c4\">More...</a><br /></td></tr>\n<tr class=\"separator:ga1bb559c0ebaad63c5c05ad2a066779c4\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga52527a5904b47d802b6b4bb519cdebc7\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">void&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga52527a5904b47d802b6b4bb519cdebc7\">glfwRestoreWindow</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window)</td></tr>\n<tr class=\"memdesc:ga52527a5904b47d802b6b4bb519cdebc7\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Restores the specified window.  <a href=\"group__window.html#ga52527a5904b47d802b6b4bb519cdebc7\">More...</a><br /></td></tr>\n<tr class=\"separator:ga52527a5904b47d802b6b4bb519cdebc7\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga3f541387449d911274324ae7f17ec56b\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">void&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga3f541387449d911274324ae7f17ec56b\">glfwMaximizeWindow</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window)</td></tr>\n<tr class=\"memdesc:ga3f541387449d911274324ae7f17ec56b\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Maximizes the specified window.  <a href=\"group__window.html#ga3f541387449d911274324ae7f17ec56b\">More...</a><br /></td></tr>\n<tr class=\"separator:ga3f541387449d911274324ae7f17ec56b\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga61be47917b72536a148300f46494fc66\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">void&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga61be47917b72536a148300f46494fc66\">glfwShowWindow</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window)</td></tr>\n<tr class=\"memdesc:ga61be47917b72536a148300f46494fc66\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Makes the specified window visible.  <a href=\"group__window.html#ga61be47917b72536a148300f46494fc66\">More...</a><br /></td></tr>\n<tr class=\"separator:ga61be47917b72536a148300f46494fc66\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga49401f82a1ba5f15db5590728314d47c\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">void&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga49401f82a1ba5f15db5590728314d47c\">glfwHideWindow</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window)</td></tr>\n<tr class=\"memdesc:ga49401f82a1ba5f15db5590728314d47c\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Hides the specified window.  <a href=\"group__window.html#ga49401f82a1ba5f15db5590728314d47c\">More...</a><br /></td></tr>\n<tr class=\"separator:ga49401f82a1ba5f15db5590728314d47c\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga873780357abd3f3a081d71a40aae45a1\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">void&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga873780357abd3f3a081d71a40aae45a1\">glfwFocusWindow</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window)</td></tr>\n<tr class=\"memdesc:ga873780357abd3f3a081d71a40aae45a1\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Brings the specified window to front and sets input focus.  <a href=\"group__window.html#ga873780357abd3f3a081d71a40aae45a1\">More...</a><br /></td></tr>\n<tr class=\"separator:ga873780357abd3f3a081d71a40aae45a1\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga2f8d59323fc4692c1d54ba08c863a703\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">void&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga2f8d59323fc4692c1d54ba08c863a703\">glfwRequestWindowAttention</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window)</td></tr>\n<tr class=\"memdesc:ga2f8d59323fc4692c1d54ba08c863a703\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Requests user attention to the specified window.  <a href=\"group__window.html#ga2f8d59323fc4692c1d54ba08c863a703\">More...</a><br /></td></tr>\n<tr class=\"separator:ga2f8d59323fc4692c1d54ba08c863a703\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gaeac25e64789974ccbe0811766bd91a16\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\"><a class=\"el\" href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a> *&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#gaeac25e64789974ccbe0811766bd91a16\">glfwGetWindowMonitor</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window)</td></tr>\n<tr class=\"memdesc:gaeac25e64789974ccbe0811766bd91a16\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns the monitor that the window uses for full screen mode.  <a href=\"group__window.html#gaeac25e64789974ccbe0811766bd91a16\">More...</a><br /></td></tr>\n<tr class=\"separator:gaeac25e64789974ccbe0811766bd91a16\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga81c76c418af80a1cce7055bccb0ae0a7\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">void&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga81c76c418af80a1cce7055bccb0ae0a7\">glfwSetWindowMonitor</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window, <a class=\"el\" href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a> *monitor, int xpos, int ypos, int width, int height, int refreshRate)</td></tr>\n<tr class=\"memdesc:ga81c76c418af80a1cce7055bccb0ae0a7\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Sets the mode, monitor, video mode and placement of a window.  <a href=\"group__window.html#ga81c76c418af80a1cce7055bccb0ae0a7\">More...</a><br /></td></tr>\n<tr class=\"separator:ga81c76c418af80a1cce7055bccb0ae0a7\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gacccb29947ea4b16860ebef42c2cb9337\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">int&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#gacccb29947ea4b16860ebef42c2cb9337\">glfwGetWindowAttrib</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window, int attrib)</td></tr>\n<tr class=\"memdesc:gacccb29947ea4b16860ebef42c2cb9337\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns an attribute of the specified window.  <a href=\"group__window.html#gacccb29947ea4b16860ebef42c2cb9337\">More...</a><br /></td></tr>\n<tr class=\"separator:gacccb29947ea4b16860ebef42c2cb9337\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gace2afda29b4116ec012e410a6819033e\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">void&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#gace2afda29b4116ec012e410a6819033e\">glfwSetWindowAttrib</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window, int attrib, int value)</td></tr>\n<tr class=\"memdesc:gace2afda29b4116ec012e410a6819033e\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Sets an attribute of the specified window.  <a href=\"group__window.html#gace2afda29b4116ec012e410a6819033e\">More...</a><br /></td></tr>\n<tr class=\"separator:gace2afda29b4116ec012e410a6819033e\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga3d2fc6026e690ab31a13f78bc9fd3651\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">void&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga3d2fc6026e690ab31a13f78bc9fd3651\">glfwSetWindowUserPointer</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window, void *pointer)</td></tr>\n<tr class=\"memdesc:ga3d2fc6026e690ab31a13f78bc9fd3651\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Sets the user pointer of the specified window.  <a href=\"group__window.html#ga3d2fc6026e690ab31a13f78bc9fd3651\">More...</a><br /></td></tr>\n<tr class=\"separator:ga3d2fc6026e690ab31a13f78bc9fd3651\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga17807ce0f45ac3f8bb50d6dcc59a4e06\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">void *&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga17807ce0f45ac3f8bb50d6dcc59a4e06\">glfwGetWindowUserPointer</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window)</td></tr>\n<tr class=\"memdesc:ga17807ce0f45ac3f8bb50d6dcc59a4e06\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Returns the user pointer of the specified window.  <a href=\"group__window.html#ga17807ce0f45ac3f8bb50d6dcc59a4e06\">More...</a><br /></td></tr>\n<tr class=\"separator:ga17807ce0f45ac3f8bb50d6dcc59a4e06\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga08bdfbba88934f9c4f92fd757979ac74\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\"><a class=\"el\" href=\"group__window.html#gafd8db81fdb0e850549dc6bace5ed697a\">GLFWwindowposfun</a>&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga08bdfbba88934f9c4f92fd757979ac74\">glfwSetWindowPosCallback</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window, <a class=\"el\" href=\"group__window.html#gafd8db81fdb0e850549dc6bace5ed697a\">GLFWwindowposfun</a> callback)</td></tr>\n<tr class=\"memdesc:ga08bdfbba88934f9c4f92fd757979ac74\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Sets the position callback for the specified window.  <a href=\"group__window.html#ga08bdfbba88934f9c4f92fd757979ac74\">More...</a><br /></td></tr>\n<tr class=\"separator:ga08bdfbba88934f9c4f92fd757979ac74\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gad91b8b047a0c4c6033c38853864c34f8\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\"><a class=\"el\" href=\"group__window.html#gae49ee6ebc03fa2da024b89943a331355\">GLFWwindowsizefun</a>&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#gad91b8b047a0c4c6033c38853864c34f8\">glfwSetWindowSizeCallback</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window, <a class=\"el\" href=\"group__window.html#gae49ee6ebc03fa2da024b89943a331355\">GLFWwindowsizefun</a> callback)</td></tr>\n<tr class=\"memdesc:gad91b8b047a0c4c6033c38853864c34f8\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Sets the size callback for the specified window.  <a href=\"group__window.html#gad91b8b047a0c4c6033c38853864c34f8\">More...</a><br /></td></tr>\n<tr class=\"separator:gad91b8b047a0c4c6033c38853864c34f8\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gada646d775a7776a95ac000cfc1885331\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\"><a class=\"el\" href=\"group__window.html#ga93e7c2555bd837f4ed8b20f76cada72e\">GLFWwindowclosefun</a>&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#gada646d775a7776a95ac000cfc1885331\">glfwSetWindowCloseCallback</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window, <a class=\"el\" href=\"group__window.html#ga93e7c2555bd837f4ed8b20f76cada72e\">GLFWwindowclosefun</a> callback)</td></tr>\n<tr class=\"memdesc:gada646d775a7776a95ac000cfc1885331\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Sets the close callback for the specified window.  <a href=\"group__window.html#gada646d775a7776a95ac000cfc1885331\">More...</a><br /></td></tr>\n<tr class=\"separator:gada646d775a7776a95ac000cfc1885331\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga1c5c7eb889c33c7f4d10dd35b327654e\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\"><a class=\"el\" href=\"group__window.html#ga7a56f9e0227e2cd9470d80d919032e08\">GLFWwindowrefreshfun</a>&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga1c5c7eb889c33c7f4d10dd35b327654e\">glfwSetWindowRefreshCallback</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window, <a class=\"el\" href=\"group__window.html#ga7a56f9e0227e2cd9470d80d919032e08\">GLFWwindowrefreshfun</a> callback)</td></tr>\n<tr class=\"memdesc:ga1c5c7eb889c33c7f4d10dd35b327654e\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Sets the refresh callback for the specified window.  <a href=\"group__window.html#ga1c5c7eb889c33c7f4d10dd35b327654e\">More...</a><br /></td></tr>\n<tr class=\"separator:ga1c5c7eb889c33c7f4d10dd35b327654e\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gac2d83c4a10f071baf841f6730528e66c\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\"><a class=\"el\" href=\"group__window.html#ga58be2061828dd35080bb438405d3a7e2\">GLFWwindowfocusfun</a>&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#gac2d83c4a10f071baf841f6730528e66c\">glfwSetWindowFocusCallback</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window, <a class=\"el\" href=\"group__window.html#ga58be2061828dd35080bb438405d3a7e2\">GLFWwindowfocusfun</a> callback)</td></tr>\n<tr class=\"memdesc:gac2d83c4a10f071baf841f6730528e66c\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Sets the focus callback for the specified window.  <a href=\"group__window.html#gac2d83c4a10f071baf841f6730528e66c\">More...</a><br /></td></tr>\n<tr class=\"separator:gac2d83c4a10f071baf841f6730528e66c\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gac793e9efd255567b5fb8b445052cfd3e\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\"><a class=\"el\" href=\"group__window.html#gad2d4e4c3d28b1242e742e8268b9528af\">GLFWwindowiconifyfun</a>&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#gac793e9efd255567b5fb8b445052cfd3e\">glfwSetWindowIconifyCallback</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window, <a class=\"el\" href=\"group__window.html#gad2d4e4c3d28b1242e742e8268b9528af\">GLFWwindowiconifyfun</a> callback)</td></tr>\n<tr class=\"memdesc:gac793e9efd255567b5fb8b445052cfd3e\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Sets the iconify callback for the specified window.  <a href=\"group__window.html#gac793e9efd255567b5fb8b445052cfd3e\">More...</a><br /></td></tr>\n<tr class=\"separator:gac793e9efd255567b5fb8b445052cfd3e\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gacbe64c339fbd94885e62145563b6dc93\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\"><a class=\"el\" href=\"group__window.html#ga7269a3d1cb100c0081f95fc09afa4949\">GLFWwindowmaximizefun</a>&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#gacbe64c339fbd94885e62145563b6dc93\">glfwSetWindowMaximizeCallback</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window, <a class=\"el\" href=\"group__window.html#ga7269a3d1cb100c0081f95fc09afa4949\">GLFWwindowmaximizefun</a> callback)</td></tr>\n<tr class=\"memdesc:gacbe64c339fbd94885e62145563b6dc93\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Sets the maximize callback for the specified window.  <a href=\"group__window.html#gacbe64c339fbd94885e62145563b6dc93\">More...</a><br /></td></tr>\n<tr class=\"separator:gacbe64c339fbd94885e62145563b6dc93\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gab3fb7c3366577daef18c0023e2a8591f\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\"><a class=\"el\" href=\"group__window.html#ga3e218ef9ff826129c55a7d5f6971a285\">GLFWframebuffersizefun</a>&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#gab3fb7c3366577daef18c0023e2a8591f\">glfwSetFramebufferSizeCallback</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window, <a class=\"el\" href=\"group__window.html#ga3e218ef9ff826129c55a7d5f6971a285\">GLFWframebuffersizefun</a> callback)</td></tr>\n<tr class=\"memdesc:gab3fb7c3366577daef18c0023e2a8591f\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Sets the framebuffer resize callback for the specified window.  <a href=\"group__window.html#gab3fb7c3366577daef18c0023e2a8591f\">More...</a><br /></td></tr>\n<tr class=\"separator:gab3fb7c3366577daef18c0023e2a8591f\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gaf2832ebb5aa6c252a2d261de002c92d6\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\"><a class=\"el\" href=\"group__window.html#ga1da46b65eafcc1a7ff0adb8f4a7b72fd\">GLFWwindowcontentscalefun</a>&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#gaf2832ebb5aa6c252a2d261de002c92d6\">glfwSetWindowContentScaleCallback</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window, <a class=\"el\" href=\"group__window.html#ga1da46b65eafcc1a7ff0adb8f4a7b72fd\">GLFWwindowcontentscalefun</a> callback)</td></tr>\n<tr class=\"memdesc:gaf2832ebb5aa6c252a2d261de002c92d6\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Sets the window content scale callback for the specified window.  <a href=\"group__window.html#gaf2832ebb5aa6c252a2d261de002c92d6\">More...</a><br /></td></tr>\n<tr class=\"separator:gaf2832ebb5aa6c252a2d261de002c92d6\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga37bd57223967b4211d60ca1a0bf3c832\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">void&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga37bd57223967b4211d60ca1a0bf3c832\">glfwPollEvents</a> (void)</td></tr>\n<tr class=\"memdesc:ga37bd57223967b4211d60ca1a0bf3c832\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Processes all pending events.  <a href=\"group__window.html#ga37bd57223967b4211d60ca1a0bf3c832\">More...</a><br /></td></tr>\n<tr class=\"separator:ga37bd57223967b4211d60ca1a0bf3c832\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga554e37d781f0a997656c26b2c56c835e\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">void&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga554e37d781f0a997656c26b2c56c835e\">glfwWaitEvents</a> (void)</td></tr>\n<tr class=\"memdesc:ga554e37d781f0a997656c26b2c56c835e\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Waits until events are queued and processes them.  <a href=\"group__window.html#ga554e37d781f0a997656c26b2c56c835e\">More...</a><br /></td></tr>\n<tr class=\"separator:ga554e37d781f0a997656c26b2c56c835e\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga605a178db92f1a7f1a925563ef3ea2cf\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">void&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga605a178db92f1a7f1a925563ef3ea2cf\">glfwWaitEventsTimeout</a> (double timeout)</td></tr>\n<tr class=\"memdesc:ga605a178db92f1a7f1a925563ef3ea2cf\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Waits with timeout until events are queued and processes them.  <a href=\"group__window.html#ga605a178db92f1a7f1a925563ef3ea2cf\">More...</a><br /></td></tr>\n<tr class=\"separator:ga605a178db92f1a7f1a925563ef3ea2cf\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:gab5997a25187e9fd5c6f2ecbbc8dfd7e9\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">void&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#gab5997a25187e9fd5c6f2ecbbc8dfd7e9\">glfwPostEmptyEvent</a> (void)</td></tr>\n<tr class=\"memdesc:gab5997a25187e9fd5c6f2ecbbc8dfd7e9\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Posts an empty event to the event queue.  <a href=\"group__window.html#gab5997a25187e9fd5c6f2ecbbc8dfd7e9\">More...</a><br /></td></tr>\n<tr class=\"separator:gab5997a25187e9fd5c6f2ecbbc8dfd7e9\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ga15a5a1ee5b3c2ca6b15ca209a12efd14\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">void&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"group__window.html#ga15a5a1ee5b3c2ca6b15ca209a12efd14\">glfwSwapBuffers</a> (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *window)</td></tr>\n<tr class=\"memdesc:ga15a5a1ee5b3c2ca6b15ca209a12efd14\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">Swaps the front and back buffers of the specified window.  <a href=\"group__window.html#ga15a5a1ee5b3c2ca6b15ca209a12efd14\">More...</a><br /></td></tr>\n<tr class=\"separator:ga15a5a1ee5b3c2ca6b15ca209a12efd14\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n</table>\n<h2 class=\"groupheader\">Macro Definition Documentation</h2>\n<a id=\"ga54ddb14825a1541a56e22afb5f832a9e\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga54ddb14825a1541a56e22afb5f832a9e\">&#9670;&nbsp;</a></span>GLFW_FOCUSED</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_FOCUSED&#160;&#160;&#160;0x00020001</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>Input focus <a class=\"el\" href=\"window_guide.html#GLFW_FOCUSED_hint\">window hint</a> or <a class=\"el\" href=\"window_guide.html#GLFW_FOCUSED_attrib\">window attribute</a>. </p>\n\n</div>\n</div>\n<a id=\"ga39d44b7c056e55e581355a92d240b58a\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga39d44b7c056e55e581355a92d240b58a\">&#9670;&nbsp;</a></span>GLFW_ICONIFIED</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_ICONIFIED&#160;&#160;&#160;0x00020002</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>Window iconification <a class=\"el\" href=\"window_guide.html#GLFW_ICONIFIED_attrib\">window attribute</a>. </p>\n\n</div>\n</div>\n<a id=\"gadba13c7a1b3aa40831eb2beedbd5bd1d\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gadba13c7a1b3aa40831eb2beedbd5bd1d\">&#9670;&nbsp;</a></span>GLFW_RESIZABLE</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_RESIZABLE&#160;&#160;&#160;0x00020003</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>Window resize-ability <a class=\"el\" href=\"window_guide.html#GLFW_RESIZABLE_hint\">window hint</a> and <a class=\"el\" href=\"window_guide.html#GLFW_RESIZABLE_attrib\">window attribute</a>. </p>\n\n</div>\n</div>\n<a id=\"gafb3cdc45297e06d8f1eb13adc69ca6c4\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gafb3cdc45297e06d8f1eb13adc69ca6c4\">&#9670;&nbsp;</a></span>GLFW_VISIBLE</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_VISIBLE&#160;&#160;&#160;0x00020004</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>Window visibility <a class=\"el\" href=\"window_guide.html#GLFW_VISIBLE_hint\">window hint</a> and <a class=\"el\" href=\"window_guide.html#GLFW_VISIBLE_attrib\">window attribute</a>. </p>\n\n</div>\n</div>\n<a id=\"ga21b854d36314c94d65aed84405b2f25e\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga21b854d36314c94d65aed84405b2f25e\">&#9670;&nbsp;</a></span>GLFW_DECORATED</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_DECORATED&#160;&#160;&#160;0x00020005</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>Window decoration <a class=\"el\" href=\"window_guide.html#GLFW_DECORATED_hint\">window hint</a> and <a class=\"el\" href=\"window_guide.html#GLFW_DECORATED_attrib\">window attribute</a>. </p>\n\n</div>\n</div>\n<a id=\"ga9d9874fc928200136a6dcdad726aa252\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga9d9874fc928200136a6dcdad726aa252\">&#9670;&nbsp;</a></span>GLFW_AUTO_ICONIFY</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_AUTO_ICONIFY&#160;&#160;&#160;0x00020006</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>Window auto-iconification <a class=\"el\" href=\"window_guide.html#GLFW_AUTO_ICONIFY_hint\">window hint</a> and <a class=\"el\" href=\"window_guide.html#GLFW_AUTO_ICONIFY_attrib\">window attribute</a>. </p>\n\n</div>\n</div>\n<a id=\"ga7fb0be51407783b41adbf5bec0b09d80\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga7fb0be51407783b41adbf5bec0b09d80\">&#9670;&nbsp;</a></span>GLFW_FLOATING</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_FLOATING&#160;&#160;&#160;0x00020007</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>Window decoration <a class=\"el\" href=\"window_guide.html#GLFW_FLOATING_hint\">window hint</a> and <a class=\"el\" href=\"window_guide.html#GLFW_FLOATING_attrib\">window attribute</a>. </p>\n\n</div>\n</div>\n<a id=\"gad8ccb396253ad0b72c6d4c917eb38a03\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gad8ccb396253ad0b72c6d4c917eb38a03\">&#9670;&nbsp;</a></span>GLFW_MAXIMIZED</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_MAXIMIZED&#160;&#160;&#160;0x00020008</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>Window maximization <a class=\"el\" href=\"window_guide.html#GLFW_MAXIMIZED_hint\">window hint</a> and <a class=\"el\" href=\"window_guide.html#GLFW_MAXIMIZED_attrib\">window attribute</a>. </p>\n\n</div>\n</div>\n<a id=\"ga5ac0847c0aa0b3619f2855707b8a7a77\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga5ac0847c0aa0b3619f2855707b8a7a77\">&#9670;&nbsp;</a></span>GLFW_CENTER_CURSOR</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_CENTER_CURSOR&#160;&#160;&#160;0x00020009</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>Cursor centering <a class=\"el\" href=\"window_guide.html#GLFW_CENTER_CURSOR_hint\">window hint</a>. </p>\n\n</div>\n</div>\n<a id=\"ga60a0578c3b9449027d683a9c6abb9f14\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga60a0578c3b9449027d683a9c6abb9f14\">&#9670;&nbsp;</a></span>GLFW_TRANSPARENT_FRAMEBUFFER</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_TRANSPARENT_FRAMEBUFFER&#160;&#160;&#160;0x0002000A</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>Window framebuffer transparency <a class=\"el\" href=\"window_guide.html#GLFW_TRANSPARENT_FRAMEBUFFER_hint\">window hint</a> and <a class=\"el\" href=\"window_guide.html#GLFW_TRANSPARENT_FRAMEBUFFER_attrib\">window attribute</a>. </p>\n\n</div>\n</div>\n<a id=\"ga8665c71c6fa3d22425c6a0e8a3f89d8a\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga8665c71c6fa3d22425c6a0e8a3f89d8a\">&#9670;&nbsp;</a></span>GLFW_HOVERED</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_HOVERED&#160;&#160;&#160;0x0002000B</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>Mouse cursor hover <a class=\"el\" href=\"window_guide.html#GLFW_HOVERED_attrib\">window attribute</a>. </p>\n\n</div>\n</div>\n<a id=\"gafa94b1da34bfd6488c0d709761504dfc\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gafa94b1da34bfd6488c0d709761504dfc\">&#9670;&nbsp;</a></span>GLFW_FOCUS_ON_SHOW</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_FOCUS_ON_SHOW&#160;&#160;&#160;0x0002000C</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>Input focus <a class=\"el\" href=\"window_guide.html#GLFW_FOCUS_ON_SHOW_hint\">window hint</a> or <a class=\"el\" href=\"window_guide.html#GLFW_FOCUS_ON_SHOW_attrib\">window attribute</a>. </p>\n\n</div>\n</div>\n<a id=\"gaf78ed8e417dbcc1e354906cc2708c982\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gaf78ed8e417dbcc1e354906cc2708c982\">&#9670;&nbsp;</a></span>GLFW_RED_BITS</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_RED_BITS&#160;&#160;&#160;0x00021001</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>Framebuffer bit depth <a class=\"el\" href=\"window_guide.html#GLFW_RED_BITS\">hint</a>. </p>\n\n</div>\n</div>\n<a id=\"gafba3b72638c914e5fb8a237dd4c50d4d\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gafba3b72638c914e5fb8a237dd4c50d4d\">&#9670;&nbsp;</a></span>GLFW_GREEN_BITS</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_GREEN_BITS&#160;&#160;&#160;0x00021002</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>Framebuffer bit depth <a class=\"el\" href=\"window_guide.html#GLFW_GREEN_BITS\">hint</a>. </p>\n\n</div>\n</div>\n<a id=\"gab292ea403db6d514537b515311bf9ae3\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gab292ea403db6d514537b515311bf9ae3\">&#9670;&nbsp;</a></span>GLFW_BLUE_BITS</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_BLUE_BITS&#160;&#160;&#160;0x00021003</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>Framebuffer bit depth <a class=\"el\" href=\"window_guide.html#GLFW_BLUE_BITS\">hint</a>. </p>\n\n</div>\n</div>\n<a id=\"gafed79a3f468997877da86c449bd43e8c\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gafed79a3f468997877da86c449bd43e8c\">&#9670;&nbsp;</a></span>GLFW_ALPHA_BITS</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_ALPHA_BITS&#160;&#160;&#160;0x00021004</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>Framebuffer bit depth <a class=\"el\" href=\"window_guide.html#GLFW_ALPHA_BITS\">hint</a>. </p>\n\n</div>\n</div>\n<a id=\"ga318a55eac1fee57dfe593b6d38149d07\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga318a55eac1fee57dfe593b6d38149d07\">&#9670;&nbsp;</a></span>GLFW_DEPTH_BITS</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_DEPTH_BITS&#160;&#160;&#160;0x00021005</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>Framebuffer bit depth <a class=\"el\" href=\"window_guide.html#GLFW_DEPTH_BITS\">hint</a>. </p>\n\n</div>\n</div>\n<a id=\"ga5339890a45a1fb38e93cb9fcc5fd069d\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga5339890a45a1fb38e93cb9fcc5fd069d\">&#9670;&nbsp;</a></span>GLFW_STENCIL_BITS</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_STENCIL_BITS&#160;&#160;&#160;0x00021006</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>Framebuffer bit depth <a class=\"el\" href=\"window_guide.html#GLFW_STENCIL_BITS\">hint</a>. </p>\n\n</div>\n</div>\n<a id=\"gaead34a9a683b2bc20eecf30ba738bfc6\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gaead34a9a683b2bc20eecf30ba738bfc6\">&#9670;&nbsp;</a></span>GLFW_ACCUM_RED_BITS</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_ACCUM_RED_BITS&#160;&#160;&#160;0x00021007</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>Framebuffer bit depth <a class=\"el\" href=\"window_guide.html#GLFW_ACCUM_RED_BITS\">hint</a>. </p>\n\n</div>\n</div>\n<a id=\"ga65713cee1326f8e9d806fdf93187b471\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga65713cee1326f8e9d806fdf93187b471\">&#9670;&nbsp;</a></span>GLFW_ACCUM_GREEN_BITS</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_ACCUM_GREEN_BITS&#160;&#160;&#160;0x00021008</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>Framebuffer bit depth <a class=\"el\" href=\"window_guide.html#GLFW_ACCUM_GREEN_BITS\">hint</a>. </p>\n\n</div>\n</div>\n<a id=\"ga22bbe9104a8ce1f8b88fb4f186aa36ce\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga22bbe9104a8ce1f8b88fb4f186aa36ce\">&#9670;&nbsp;</a></span>GLFW_ACCUM_BLUE_BITS</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_ACCUM_BLUE_BITS&#160;&#160;&#160;0x00021009</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>Framebuffer bit depth <a class=\"el\" href=\"window_guide.html#GLFW_ACCUM_BLUE_BITS\">hint</a>. </p>\n\n</div>\n</div>\n<a id=\"gae829b55591c18169a40ab4067a041b1f\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gae829b55591c18169a40ab4067a041b1f\">&#9670;&nbsp;</a></span>GLFW_ACCUM_ALPHA_BITS</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_ACCUM_ALPHA_BITS&#160;&#160;&#160;0x0002100A</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>Framebuffer bit depth <a class=\"el\" href=\"window_guide.html#GLFW_ACCUM_ALPHA_BITS\">hint</a>. </p>\n\n</div>\n</div>\n<a id=\"gab05108c5029443b371112b031d1fa174\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gab05108c5029443b371112b031d1fa174\">&#9670;&nbsp;</a></span>GLFW_AUX_BUFFERS</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_AUX_BUFFERS&#160;&#160;&#160;0x0002100B</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>Framebuffer auxiliary buffer <a class=\"el\" href=\"window_guide.html#GLFW_AUX_BUFFERS\">hint</a>. </p>\n\n</div>\n</div>\n<a id=\"ga83d991efca02537e2d69969135b77b03\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga83d991efca02537e2d69969135b77b03\">&#9670;&nbsp;</a></span>GLFW_STEREO</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_STEREO&#160;&#160;&#160;0x0002100C</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>OpenGL stereoscopic rendering <a class=\"el\" href=\"window_guide.html#GLFW_STEREO\">hint</a>. </p>\n\n</div>\n</div>\n<a id=\"ga2cdf86fdcb7722fb8829c4e201607535\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga2cdf86fdcb7722fb8829c4e201607535\">&#9670;&nbsp;</a></span>GLFW_SAMPLES</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_SAMPLES&#160;&#160;&#160;0x0002100D</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>Framebuffer MSAA samples <a class=\"el\" href=\"window_guide.html#GLFW_SAMPLES\">hint</a>. </p>\n\n</div>\n</div>\n<a id=\"ga444a8f00414a63220591f9fdb7b5642b\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga444a8f00414a63220591f9fdb7b5642b\">&#9670;&nbsp;</a></span>GLFW_SRGB_CAPABLE</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_SRGB_CAPABLE&#160;&#160;&#160;0x0002100E</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>Framebuffer sRGB <a class=\"el\" href=\"window_guide.html#GLFW_SRGB_CAPABLE\">hint</a>. </p>\n\n</div>\n</div>\n<a id=\"ga0f20825e6e47ee8ba389024519682212\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga0f20825e6e47ee8ba389024519682212\">&#9670;&nbsp;</a></span>GLFW_REFRESH_RATE</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_REFRESH_RATE&#160;&#160;&#160;0x0002100F</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>Monitor refresh rate <a class=\"el\" href=\"window_guide.html#GLFW_REFRESH_RATE\">hint</a>. </p>\n\n</div>\n</div>\n<a id=\"ga714a5d569e8a274ea58fdfa020955339\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga714a5d569e8a274ea58fdfa020955339\">&#9670;&nbsp;</a></span>GLFW_DOUBLEBUFFER</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_DOUBLEBUFFER&#160;&#160;&#160;0x00021010</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>Framebuffer double buffering <a class=\"el\" href=\"window_guide.html#GLFW_DOUBLEBUFFER\">hint</a>. </p>\n\n</div>\n</div>\n<a id=\"ga649309cf72a3d3de5b1348ca7936c95b\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga649309cf72a3d3de5b1348ca7936c95b\">&#9670;&nbsp;</a></span>GLFW_CLIENT_API</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_CLIENT_API&#160;&#160;&#160;0x00022001</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>Context client API <a class=\"el\" href=\"window_guide.html#GLFW_CLIENT_API_hint\">hint</a> and <a class=\"el\" href=\"window_guide.html#GLFW_CLIENT_API_attrib\">attribute</a>. </p>\n\n</div>\n</div>\n<a id=\"gafe5e4922de1f9932d7e9849bb053b0c0\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gafe5e4922de1f9932d7e9849bb053b0c0\">&#9670;&nbsp;</a></span>GLFW_CONTEXT_VERSION_MAJOR</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_CONTEXT_VERSION_MAJOR&#160;&#160;&#160;0x00022002</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>Context client API major version <a class=\"el\" href=\"window_guide.html#GLFW_CONTEXT_VERSION_MAJOR_hint\">hint</a> and <a class=\"el\" href=\"window_guide.html#GLFW_CONTEXT_VERSION_MAJOR_attrib\">attribute</a>. </p>\n\n</div>\n</div>\n<a id=\"ga31aca791e4b538c4e4a771eb95cc2d07\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga31aca791e4b538c4e4a771eb95cc2d07\">&#9670;&nbsp;</a></span>GLFW_CONTEXT_VERSION_MINOR</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_CONTEXT_VERSION_MINOR&#160;&#160;&#160;0x00022003</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>Context client API minor version <a class=\"el\" href=\"window_guide.html#GLFW_CONTEXT_VERSION_MINOR_hint\">hint</a> and <a class=\"el\" href=\"window_guide.html#GLFW_CONTEXT_VERSION_MINOR_attrib\">attribute</a>. </p>\n\n</div>\n</div>\n<a id=\"gafb9475071aa77c6fb05ca5a5c8678a08\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gafb9475071aa77c6fb05ca5a5c8678a08\">&#9670;&nbsp;</a></span>GLFW_CONTEXT_REVISION</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_CONTEXT_REVISION&#160;&#160;&#160;0x00022004</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>Context client API revision number <a class=\"el\" href=\"window_guide.html#GLFW_CONTEXT_REVISION_attrib\">attribute</a>. </p>\n\n</div>\n</div>\n<a id=\"gade3593916b4c507900aa2d6844810e00\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gade3593916b4c507900aa2d6844810e00\">&#9670;&nbsp;</a></span>GLFW_CONTEXT_ROBUSTNESS</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_CONTEXT_ROBUSTNESS&#160;&#160;&#160;0x00022005</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>Context client API revision number <a class=\"el\" href=\"window_guide.html#GLFW_CONTEXT_ROBUSTNESS_hint\">hint</a> and <a class=\"el\" href=\"window_guide.html#GLFW_CONTEXT_ROBUSTNESS_attrib\">attribute</a>. </p>\n\n</div>\n</div>\n<a id=\"ga13d24b12465da8b28985f46c8557925b\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga13d24b12465da8b28985f46c8557925b\">&#9670;&nbsp;</a></span>GLFW_OPENGL_FORWARD_COMPAT</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_OPENGL_FORWARD_COMPAT&#160;&#160;&#160;0x00022006</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>OpenGL forward-compatibility <a class=\"el\" href=\"window_guide.html#GLFW_OPENGL_FORWARD_COMPAT_hint\">hint</a> and <a class=\"el\" href=\"window_guide.html#GLFW_OPENGL_FORWARD_COMPAT_attrib\">attribute</a>. </p>\n\n</div>\n</div>\n<a id=\"ga87ec2df0b915201e950ca42d5d0831e1\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga87ec2df0b915201e950ca42d5d0831e1\">&#9670;&nbsp;</a></span>GLFW_OPENGL_DEBUG_CONTEXT</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_OPENGL_DEBUG_CONTEXT&#160;&#160;&#160;0x00022007</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>OpenGL debug context <a class=\"el\" href=\"window_guide.html#GLFW_OPENGL_DEBUG_CONTEXT_hint\">hint</a> and <a class=\"el\" href=\"window_guide.html#GLFW_OPENGL_DEBUG_CONTEXT_attrib\">attribute</a>. </p>\n\n</div>\n</div>\n<a id=\"ga44f3a6b4261fbe351e0b950b0f372e12\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga44f3a6b4261fbe351e0b950b0f372e12\">&#9670;&nbsp;</a></span>GLFW_OPENGL_PROFILE</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_OPENGL_PROFILE&#160;&#160;&#160;0x00022008</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>OpenGL profile <a class=\"el\" href=\"window_guide.html#GLFW_OPENGL_PROFILE_hint\">hint</a> and <a class=\"el\" href=\"window_guide.html#GLFW_OPENGL_PROFILE_attrib\">attribute</a>. </p>\n\n</div>\n</div>\n<a id=\"ga72b648a8378fe3310c7c7bbecc0f7be6\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga72b648a8378fe3310c7c7bbecc0f7be6\">&#9670;&nbsp;</a></span>GLFW_CONTEXT_RELEASE_BEHAVIOR</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_CONTEXT_RELEASE_BEHAVIOR&#160;&#160;&#160;0x00022009</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>Context flush-on-release <a class=\"el\" href=\"window_guide.html#GLFW_CONTEXT_RELEASE_BEHAVIOR_hint\">hint</a> and <a class=\"el\" href=\"window_guide.html#GLFW_CONTEXT_RELEASE_BEHAVIOR_attrib\">attribute</a>. </p>\n\n</div>\n</div>\n<a id=\"ga5a52fdfd46d8249c211f923675728082\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga5a52fdfd46d8249c211f923675728082\">&#9670;&nbsp;</a></span>GLFW_CONTEXT_NO_ERROR</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_CONTEXT_NO_ERROR&#160;&#160;&#160;0x0002200A</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>Context error suppression <a class=\"el\" href=\"window_guide.html#GLFW_CONTEXT_NO_ERROR_hint\">hint</a> and <a class=\"el\" href=\"window_guide.html#GLFW_CONTEXT_NO_ERROR_attrib\">attribute</a>. </p>\n\n</div>\n</div>\n<a id=\"ga5154cebfcd831c1cc63a4d5ac9bb4486\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga5154cebfcd831c1cc63a4d5ac9bb4486\">&#9670;&nbsp;</a></span>GLFW_CONTEXT_CREATION_API</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_CONTEXT_CREATION_API&#160;&#160;&#160;0x0002200B</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>Context creation API <a class=\"el\" href=\"window_guide.html#GLFW_CONTEXT_CREATION_API_hint\">hint</a> and <a class=\"el\" href=\"window_guide.html#GLFW_CONTEXT_CREATION_API_attrib\">attribute</a>. </p>\n\n</div>\n</div>\n<a id=\"ga620bc4280c7eab81ac9f02204500ed47\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga620bc4280c7eab81ac9f02204500ed47\">&#9670;&nbsp;</a></span>GLFW_SCALE_TO_MONITOR</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_SCALE_TO_MONITOR&#160;&#160;&#160;0x0002200C</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"gab6ef2d02eb55800d249ccf1af253c35e\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gab6ef2d02eb55800d249ccf1af253c35e\">&#9670;&nbsp;</a></span>GLFW_COCOA_RETINA_FRAMEBUFFER</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_COCOA_RETINA_FRAMEBUFFER&#160;&#160;&#160;0x00023001</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"ga70fa0fbc745de6aa824df79a580e84b5\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga70fa0fbc745de6aa824df79a580e84b5\">&#9670;&nbsp;</a></span>GLFW_COCOA_FRAME_NAME</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_COCOA_FRAME_NAME&#160;&#160;&#160;0x00023002</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"ga53c84ed2ddd94e15bbd44b1f6f7feafc\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga53c84ed2ddd94e15bbd44b1f6f7feafc\">&#9670;&nbsp;</a></span>GLFW_COCOA_GRAPHICS_SWITCHING</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_COCOA_GRAPHICS_SWITCHING&#160;&#160;&#160;0x00023003</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"gae5a9ea2fccccd92edbd343fc56461114\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gae5a9ea2fccccd92edbd343fc56461114\">&#9670;&nbsp;</a></span>GLFW_X11_CLASS_NAME</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_X11_CLASS_NAME&#160;&#160;&#160;0x00024001</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<a id=\"ga494c3c0d911e4b860b946530a3e389e8\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga494c3c0d911e4b860b946530a3e389e8\">&#9670;&nbsp;</a></span>GLFW_X11_INSTANCE_NAME</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">#define GLFW_X11_INSTANCE_NAME&#160;&#160;&#160;0x00024002</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n\n</div>\n</div>\n<h2 class=\"groupheader\">Typedef Documentation</h2>\n<a id=\"ga3c96d80d363e67d13a41b5d1821f3242\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga3c96d80d363e67d13a41b5d1821f3242\">&#9670;&nbsp;</a></span>GLFWwindow</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">typedef struct <a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> <a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>Opaque window object.</p>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"window_guide.html#window_object\">Window objects</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>\n\n</div>\n</div>\n<a id=\"gafd8db81fdb0e850549dc6bace5ed697a\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gafd8db81fdb0e850549dc6bace5ed697a\">&#9670;&nbsp;</a></span>GLFWwindowposfun</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">typedef void(*  GLFWwindowposfun) (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *, int, int)</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This is the function pointer type for window position callbacks. A window position callback function has the following signature: </p><div class=\"fragment\"><div class=\"line\"><span class=\"keywordtype\">void</span> callback_name(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window, <span class=\"keywordtype\">int</span> xpos, <span class=\"keywordtype\">int</span> ypos)</div>\n</div><!-- fragment --><dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">window</td><td>The window that was moved. </td></tr>\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">xpos</td><td>The new x-coordinate, in screen coordinates, of the upper-left corner of the content area of the window. </td></tr>\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">ypos</td><td>The new y-coordinate, in screen coordinates, of the upper-left corner of the content area of the window.</td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"window_guide.html#window_pos\">Window position</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__window.html#ga08bdfbba88934f9c4f92fd757979ac74\">glfwSetWindowPosCallback</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>\n\n</div>\n</div>\n<a id=\"gae49ee6ebc03fa2da024b89943a331355\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gae49ee6ebc03fa2da024b89943a331355\">&#9670;&nbsp;</a></span>GLFWwindowsizefun</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">typedef void(*  GLFWwindowsizefun) (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *, int, int)</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This is the function pointer type for window size callbacks. A window size callback function has the following signature: </p><div class=\"fragment\"><div class=\"line\"><span class=\"keywordtype\">void</span> callback_name(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window, <span class=\"keywordtype\">int</span> width, <span class=\"keywordtype\">int</span> height)</div>\n</div><!-- fragment --><dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">window</td><td>The window that was resized. </td></tr>\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">width</td><td>The new width, in screen coordinates, of the window. </td></tr>\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">height</td><td>The new height, in screen coordinates, of the window.</td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"window_guide.html#window_size\">Window size</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__window.html#gad91b8b047a0c4c6033c38853864c34f8\">glfwSetWindowSizeCallback</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 1.0. <b>GLFW 3:</b> Added window handle parameter. </dd></dl>\n\n</div>\n</div>\n<a id=\"ga93e7c2555bd837f4ed8b20f76cada72e\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga93e7c2555bd837f4ed8b20f76cada72e\">&#9670;&nbsp;</a></span>GLFWwindowclosefun</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">typedef void(*  GLFWwindowclosefun) (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *)</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This is the function pointer type for window close callbacks. A window close callback function has the following signature: </p><div class=\"fragment\"><div class=\"line\"><span class=\"keywordtype\">void</span> function_name(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window)</div>\n</div><!-- fragment --><dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">window</td><td>The window that the user attempted to close.</td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"window_guide.html#window_close\">Window closing and close flag</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__window.html#gada646d775a7776a95ac000cfc1885331\">glfwSetWindowCloseCallback</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 2.5. <b>GLFW 3:</b> Added window handle parameter. </dd></dl>\n\n</div>\n</div>\n<a id=\"ga7a56f9e0227e2cd9470d80d919032e08\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga7a56f9e0227e2cd9470d80d919032e08\">&#9670;&nbsp;</a></span>GLFWwindowrefreshfun</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">typedef void(*  GLFWwindowrefreshfun) (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *)</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This is the function pointer type for window content refresh callbacks. A window content refresh callback function has the following signature: </p><div class=\"fragment\"><div class=\"line\"><span class=\"keywordtype\">void</span> function_name(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window);</div>\n</div><!-- fragment --><dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">window</td><td>The window whose content needs to be refreshed.</td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"window_guide.html#window_refresh\">Window damage and refresh</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__window.html#ga1c5c7eb889c33c7f4d10dd35b327654e\">glfwSetWindowRefreshCallback</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 2.5. <b>GLFW 3:</b> Added window handle parameter. </dd></dl>\n\n</div>\n</div>\n<a id=\"ga58be2061828dd35080bb438405d3a7e2\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga58be2061828dd35080bb438405d3a7e2\">&#9670;&nbsp;</a></span>GLFWwindowfocusfun</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">typedef void(*  GLFWwindowfocusfun) (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *, int)</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This is the function pointer type for window focus callbacks. A window focus callback function has the following signature: </p><div class=\"fragment\"><div class=\"line\"><span class=\"keywordtype\">void</span> function_name(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window, <span class=\"keywordtype\">int</span> focused)</div>\n</div><!-- fragment --><dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">window</td><td>The window that gained or lost input focus. </td></tr>\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">focused</td><td><code>GLFW_TRUE</code> if the window was given input focus, or <code>GLFW_FALSE</code> if it lost it.</td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"window_guide.html#window_focus\">Window input focus</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__window.html#gac2d83c4a10f071baf841f6730528e66c\">glfwSetWindowFocusCallback</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>\n\n</div>\n</div>\n<a id=\"gad2d4e4c3d28b1242e742e8268b9528af\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gad2d4e4c3d28b1242e742e8268b9528af\">&#9670;&nbsp;</a></span>GLFWwindowiconifyfun</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">typedef void(*  GLFWwindowiconifyfun) (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *, int)</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This is the function pointer type for window iconify callbacks. A window iconify callback function has the following signature: </p><div class=\"fragment\"><div class=\"line\"><span class=\"keywordtype\">void</span> function_name(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window, <span class=\"keywordtype\">int</span> iconified)</div>\n</div><!-- fragment --><dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">window</td><td>The window that was iconified or restored. </td></tr>\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">iconified</td><td><code>GLFW_TRUE</code> if the window was iconified, or <code>GLFW_FALSE</code> if it was restored.</td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"window_guide.html#window_iconify\">Window iconification</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__window.html#gac793e9efd255567b5fb8b445052cfd3e\">glfwSetWindowIconifyCallback</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>\n\n</div>\n</div>\n<a id=\"ga7269a3d1cb100c0081f95fc09afa4949\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga7269a3d1cb100c0081f95fc09afa4949\">&#9670;&nbsp;</a></span>GLFWwindowmaximizefun</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">typedef void(*  GLFWwindowmaximizefun) (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *, int)</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This is the function pointer type for window maximize callbacks. A window maximize callback function has the following signature: </p><div class=\"fragment\"><div class=\"line\"><span class=\"keywordtype\">void</span> function_name(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window, <span class=\"keywordtype\">int</span> maximized)</div>\n</div><!-- fragment --><dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">window</td><td>The window that was maximized or restored. </td></tr>\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">iconified</td><td><code>GLFW_TRUE</code> if the window was maximized, or <code>GLFW_FALSE</code> if it was restored.</td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"window_guide.html#window_maximize\">Window maximization</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__window.html#gacbe64c339fbd94885e62145563b6dc93\" title=\"Sets the maximize callback for the specified window.\">glfwSetWindowMaximizeCallback</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.3. </dd></dl>\n\n</div>\n</div>\n<a id=\"ga3e218ef9ff826129c55a7d5f6971a285\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga3e218ef9ff826129c55a7d5f6971a285\">&#9670;&nbsp;</a></span>GLFWframebuffersizefun</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">typedef void(*  GLFWframebuffersizefun) (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *, int, int)</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This is the function pointer type for framebuffer size callbacks. A framebuffer size callback function has the following signature: </p><div class=\"fragment\"><div class=\"line\"><span class=\"keywordtype\">void</span> function_name(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window, <span class=\"keywordtype\">int</span> width, <span class=\"keywordtype\">int</span> height)</div>\n</div><!-- fragment --><dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">window</td><td>The window whose framebuffer was resized. </td></tr>\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">width</td><td>The new width, in pixels, of the framebuffer. </td></tr>\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">height</td><td>The new height, in pixels, of the framebuffer.</td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"window_guide.html#window_fbsize\">Framebuffer size</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__window.html#gab3fb7c3366577daef18c0023e2a8591f\">glfwSetFramebufferSizeCallback</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>\n\n</div>\n</div>\n<a id=\"ga1da46b65eafcc1a7ff0adb8f4a7b72fd\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga1da46b65eafcc1a7ff0adb8f4a7b72fd\">&#9670;&nbsp;</a></span>GLFWwindowcontentscalefun</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">typedef void(*  GLFWwindowcontentscalefun) (<a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *, float, float)</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This is the function pointer type for window content scale callbacks. A window content scale callback function has the following signature: </p><div class=\"fragment\"><div class=\"line\"><span class=\"keywordtype\">void</span> function_name(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window, <span class=\"keywordtype\">float</span> xscale, <span class=\"keywordtype\">float</span> yscale)</div>\n</div><!-- fragment --><dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">window</td><td>The window whose content scale changed. </td></tr>\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">xscale</td><td>The new x-axis content scale of the window. </td></tr>\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">yscale</td><td>The new y-axis content scale of the window.</td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"window_guide.html#window_scale\">Window content scale</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__window.html#gaf2832ebb5aa6c252a2d261de002c92d6\">glfwSetWindowContentScaleCallback</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.3. </dd></dl>\n\n</div>\n</div>\n<a id=\"gac81c32f4437de7b3aa58ab62c3d9e5b1\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gac81c32f4437de7b3aa58ab62c3d9e5b1\">&#9670;&nbsp;</a></span>GLFWimage</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">typedef struct <a class=\"el\" href=\"structGLFWimage.html\">GLFWimage</a>  <a class=\"el\" href=\"structGLFWimage.html\">GLFWimage</a></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This describes a single 2D image. See the documentation for each related function what the expected pixel format is.</p>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"input_guide.html#cursor_custom\">Custom cursor creation</a> </dd>\n<dd>\n<a class=\"el\" href=\"window_guide.html#window_icon\">Window icon</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 2.1. <b>GLFW 3:</b> Removed format and bytes-per-pixel members. </dd></dl>\n\n</div>\n</div>\n<h2 class=\"groupheader\">Function Documentation</h2>\n<a id=\"gaa77c4898dfb83344a6b4f76aa16b9a4a\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gaa77c4898dfb83344a6b4f76aa16b9a4a\">&#9670;&nbsp;</a></span>glfwDefaultWindowHints()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">void glfwDefaultWindowHints </td>\n          <td>(</td>\n          <td class=\"paramtype\">void&#160;</td>\n          <td class=\"paramname\"></td><td>)</td>\n          <td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function resets all window hints to their <a class=\"el\" href=\"window_guide.html#window_hints_values\">default values</a>.</p>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a>.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"window_guide.html#window_hints\">Window creation hints</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__window.html#ga7d9c8c62384b1e2821c4dc48952d2033\">glfwWindowHint</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__window.html#ga8cb2782861c9d997bcf2dea97f363e5f\">glfwWindowHintString</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>\n\n</div>\n</div>\n<a id=\"ga7d9c8c62384b1e2821c4dc48952d2033\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga7d9c8c62384b1e2821c4dc48952d2033\">&#9670;&nbsp;</a></span>glfwWindowHint()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">void glfwWindowHint </td>\n          <td>(</td>\n          <td class=\"paramtype\">int&#160;</td>\n          <td class=\"paramname\"><em>hint</em>, </td>\n        </tr>\n        <tr>\n          <td class=\"paramkey\"></td>\n          <td></td>\n          <td class=\"paramtype\">int&#160;</td>\n          <td class=\"paramname\"><em>value</em>&#160;</td>\n        </tr>\n        <tr>\n          <td></td>\n          <td>)</td>\n          <td></td><td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function sets hints for the next call to <a class=\"el\" href=\"group__window.html#ga5c336fddf2cbb5b92f65f10fb6043344\">glfwCreateWindow</a>. The hints, once set, retain their values until changed by a call to this function or <a class=\"el\" href=\"group__window.html#gaa77c4898dfb83344a6b4f76aa16b9a4a\">glfwDefaultWindowHints</a>, or until the library is terminated.</p>\n<p>Only integer value hints can be set with this function. String value hints are set with <a class=\"el\" href=\"group__window.html#ga8cb2782861c9d997bcf2dea97f363e5f\">glfwWindowHintString</a>.</p>\n<p>This function does not check whether the specified hint values are valid. If you set hints to invalid values this will instead be reported by the next call to <a class=\"el\" href=\"group__window.html#ga5c336fddf2cbb5b92f65f10fb6043344\">glfwCreateWindow</a>.</p>\n<p>Some hints are platform specific. These may be set on any platform but they will only affect their specific platform. Other platforms will ignore them. Setting these hints requires no platform specific headers or functions.</p>\n<dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">hint</td><td>The <a class=\"el\" href=\"window_guide.html#window_hints\">window hint</a> to set. </td></tr>\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">value</td><td>The new value of the window hint.</td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a> and <a class=\"el\" href=\"group__errors.html#ga76f6bb9c4eea73db675f096b404593ce\">GLFW_INVALID_ENUM</a>.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"window_guide.html#window_hints\">Window creation hints</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__window.html#ga8cb2782861c9d997bcf2dea97f363e5f\">glfwWindowHintString</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__window.html#gaa77c4898dfb83344a6b4f76aa16b9a4a\">glfwDefaultWindowHints</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.0. Replaces <code>glfwOpenWindowHint</code>. </dd></dl>\n\n</div>\n</div>\n<a id=\"ga8cb2782861c9d997bcf2dea97f363e5f\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga8cb2782861c9d997bcf2dea97f363e5f\">&#9670;&nbsp;</a></span>glfwWindowHintString()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">void glfwWindowHintString </td>\n          <td>(</td>\n          <td class=\"paramtype\">int&#160;</td>\n          <td class=\"paramname\"><em>hint</em>, </td>\n        </tr>\n        <tr>\n          <td class=\"paramkey\"></td>\n          <td></td>\n          <td class=\"paramtype\">const char *&#160;</td>\n          <td class=\"paramname\"><em>value</em>&#160;</td>\n        </tr>\n        <tr>\n          <td></td>\n          <td>)</td>\n          <td></td><td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function sets hints for the next call to <a class=\"el\" href=\"group__window.html#ga5c336fddf2cbb5b92f65f10fb6043344\">glfwCreateWindow</a>. The hints, once set, retain their values until changed by a call to this function or <a class=\"el\" href=\"group__window.html#gaa77c4898dfb83344a6b4f76aa16b9a4a\">glfwDefaultWindowHints</a>, or until the library is terminated.</p>\n<p>Only string type hints can be set with this function. Integer value hints are set with <a class=\"el\" href=\"group__window.html#ga7d9c8c62384b1e2821c4dc48952d2033\">glfwWindowHint</a>.</p>\n<p>This function does not check whether the specified hint values are valid. If you set hints to invalid values this will instead be reported by the next call to <a class=\"el\" href=\"group__window.html#ga5c336fddf2cbb5b92f65f10fb6043344\">glfwCreateWindow</a>.</p>\n<p>Some hints are platform specific. These may be set on any platform but they will only affect their specific platform. Other platforms will ignore them. Setting these hints requires no platform specific headers or functions.</p>\n<dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">hint</td><td>The <a class=\"el\" href=\"window_guide.html#window_hints\">window hint</a> to set. </td></tr>\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">value</td><td>The new value of the window hint.</td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a> and <a class=\"el\" href=\"group__errors.html#ga76f6bb9c4eea73db675f096b404593ce\">GLFW_INVALID_ENUM</a>.</dd></dl>\n<dl class=\"section user\"><dt>Pointer lifetime</dt><dd>The specified string is copied before this function returns.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"window_guide.html#window_hints\">Window creation hints</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__window.html#ga7d9c8c62384b1e2821c4dc48952d2033\">glfwWindowHint</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__window.html#gaa77c4898dfb83344a6b4f76aa16b9a4a\">glfwDefaultWindowHints</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.3. </dd></dl>\n\n</div>\n</div>\n<a id=\"ga5c336fddf2cbb5b92f65f10fb6043344\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga5c336fddf2cbb5b92f65f10fb6043344\">&#9670;&nbsp;</a></span>glfwCreateWindow()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\"><a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* glfwCreateWindow </td>\n          <td>(</td>\n          <td class=\"paramtype\">int&#160;</td>\n          <td class=\"paramname\"><em>width</em>, </td>\n        </tr>\n        <tr>\n          <td class=\"paramkey\"></td>\n          <td></td>\n          <td class=\"paramtype\">int&#160;</td>\n          <td class=\"paramname\"><em>height</em>, </td>\n        </tr>\n        <tr>\n          <td class=\"paramkey\"></td>\n          <td></td>\n          <td class=\"paramtype\">const char *&#160;</td>\n          <td class=\"paramname\"><em>title</em>, </td>\n        </tr>\n        <tr>\n          <td class=\"paramkey\"></td>\n          <td></td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a> *&#160;</td>\n          <td class=\"paramname\"><em>monitor</em>, </td>\n        </tr>\n        <tr>\n          <td class=\"paramkey\"></td>\n          <td></td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *&#160;</td>\n          <td class=\"paramname\"><em>share</em>&#160;</td>\n        </tr>\n        <tr>\n          <td></td>\n          <td>)</td>\n          <td></td><td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function creates a window and its associated OpenGL or OpenGL ES context. Most of the options controlling how the window and its context should be created are specified with <a class=\"el\" href=\"window_guide.html#window_hints\">window hints</a>.</p>\n<p>Successful creation does not change which context is current. Before you can use the newly created context, you need to <a class=\"el\" href=\"context_guide.html#context_current\">make it current</a>. For information about the <code>share</code> parameter, see <a class=\"el\" href=\"context_guide.html#context_sharing\">Context object sharing</a>.</p>\n<p>The created window, framebuffer and context may differ from what you requested, as not all parameters and hints are <a class=\"el\" href=\"window_guide.html#window_hints_hard\">hard constraints</a>. This includes the size of the window, especially for full screen windows. To query the actual attributes of the created window, framebuffer and context, see <a class=\"el\" href=\"group__window.html#gacccb29947ea4b16860ebef42c2cb9337\">glfwGetWindowAttrib</a>, <a class=\"el\" href=\"group__window.html#gaeea7cbc03373a41fb51cfbf9f2a5d4c6\">glfwGetWindowSize</a> and <a class=\"el\" href=\"group__window.html#ga0e2637a4161afb283f5300c7f94785c9\">glfwGetFramebufferSize</a>.</p>\n<p>To create a full screen window, you need to specify the monitor the window will cover. If no monitor is specified, the window will be windowed mode. Unless you have a way for the user to choose a specific monitor, it is recommended that you pick the primary monitor. For more information on how to query connected monitors, see <a class=\"el\" href=\"monitor_guide.html#monitor_monitors\">Retrieving monitors</a>.</p>\n<p>For full screen windows, the specified size becomes the resolution of the window's <em>desired video mode</em>. As long as a full screen window is not iconified, the supported video mode most closely matching the desired video mode is set for the specified monitor. For more information about full screen windows, including the creation of so called <em>windowed full screen</em> or <em>borderless full screen</em> windows, see <a class=\"el\" href=\"window_guide.html#window_windowed_full_screen\">\"Windowed full screen\" windows</a>.</p>\n<p>Once you have created the window, you can switch it between windowed and full screen mode with <a class=\"el\" href=\"group__window.html#ga81c76c418af80a1cce7055bccb0ae0a7\">glfwSetWindowMonitor</a>. This will not affect its OpenGL or OpenGL ES context.</p>\n<p>By default, newly created windows use the placement recommended by the window system. To create the window at a specific position, make it initially invisible using the <a class=\"el\" href=\"window_guide.html#GLFW_VISIBLE_hint\">GLFW_VISIBLE</a> window hint, set its <a class=\"el\" href=\"window_guide.html#window_pos\">position</a> and then <a class=\"el\" href=\"window_guide.html#window_hide\">show</a> it.</p>\n<p>As long as at least one full screen window is not iconified, the screensaver is prohibited from starting.</p>\n<p>Window systems put limits on window sizes. Very large or very small window dimensions may be overridden by the window system on creation. Check the actual <a class=\"el\" href=\"window_guide.html#window_size\">size</a> after creation.</p>\n<p>The <a class=\"el\" href=\"window_guide.html#buffer_swap\">swap interval</a> is not set during window creation and the initial value may vary depending on driver settings and defaults.</p>\n<dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">width</td><td>The desired width, in screen coordinates, of the window. This must be greater than zero. </td></tr>\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">height</td><td>The desired height, in screen coordinates, of the window. This must be greater than zero. </td></tr>\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">title</td><td>The initial, UTF-8 encoded window title. </td></tr>\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">monitor</td><td>The monitor to use for full screen mode, or <code>NULL</code> for windowed mode. </td></tr>\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">share</td><td>The window whose context to share resources with, or <code>NULL</code> to not share resources. </td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section return\"><dt>Returns</dt><dd>The handle of the created window, or <code>NULL</code> if an <a class=\"el\" href=\"intro_guide.html#error_handling\">error</a> occurred.</dd></dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a>, <a class=\"el\" href=\"group__errors.html#ga76f6bb9c4eea73db675f096b404593ce\">GLFW_INVALID_ENUM</a>, <a class=\"el\" href=\"group__errors.html#gaaf2ef9aa8202c2b82ac2d921e554c687\">GLFW_INVALID_VALUE</a>, <a class=\"el\" href=\"group__errors.html#ga56882b290db23261cc6c053c40c2d08e\">GLFW_API_UNAVAILABLE</a>, <a class=\"el\" href=\"group__errors.html#gad16c5565b4a69f9c2a9ac2c0dbc89462\">GLFW_VERSION_UNAVAILABLE</a>, <a class=\"el\" href=\"group__errors.html#ga196e125ef261d94184e2b55c05762f14\">GLFW_FORMAT_UNAVAILABLE</a> and <a class=\"el\" href=\"group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1\">GLFW_PLATFORM_ERROR</a>.</dd></dl>\n<dl class=\"section remark\"><dt>Remarks</dt><dd><b>Windows:</b> Window creation will fail if the Microsoft GDI software OpenGL implementation is the only one available.</dd>\n<dd>\n<b>Windows:</b> If the executable has an icon resource named <code>GLFW_ICON,</code> it will be set as the initial icon for the window. If no such icon is present, the <code>IDI_APPLICATION</code> icon will be used instead. To set a different icon, see <a class=\"el\" href=\"group__window.html#gadd7ccd39fe7a7d1f0904666ae5932dc5\">glfwSetWindowIcon</a>.</dd>\n<dd>\n<b>Windows:</b> The context to share resources with must not be current on any other thread.</dd>\n<dd>\n<b>macOS:</b> The OS only supports forward-compatible core profile contexts for OpenGL versions 3.2 and later. Before creating an OpenGL context of version 3.2 or later you must set the <a class=\"el\" href=\"window_guide.html#GLFW_OPENGL_FORWARD_COMPAT_hint\">GLFW_OPENGL_FORWARD_COMPAT</a> and <a class=\"el\" href=\"window_guide.html#GLFW_OPENGL_PROFILE_hint\">GLFW_OPENGL_PROFILE</a> hints accordingly. OpenGL 3.0 and 3.1 contexts are not supported at all on macOS.</dd>\n<dd>\n<b>macOS:</b> The GLFW window has no icon, as it is not a document window, but the dock icon will be the same as the application bundle's icon. For more information on bundles, see the <a href=\"https://developer.apple.com/library/mac/documentation/CoreFoundation/Conceptual/CFBundles/\">Bundle Programming Guide</a> in the Mac Developer Library.</dd>\n<dd>\n<b>macOS:</b> The first time a window is created the menu bar is created. If GLFW finds a <code>MainMenu.nib</code> it is loaded and assumed to contain a menu bar. Otherwise a minimal menu bar is created manually with common commands like Hide, Quit and About. The About entry opens a minimal about dialog with information from the application's bundle. Menu bar creation can be disabled entirely with the <a class=\"el\" href=\"group__init.html#ga71e0b4ce2f2696a84a9b8c5e12dc70cf\">GLFW_COCOA_MENUBAR</a> init hint.</dd>\n<dd>\n<b>macOS:</b> On OS X 10.10 and later the window frame will not be rendered at full resolution on Retina displays unless the <a class=\"el\" href=\"window_guide.html#GLFW_COCOA_RETINA_FRAMEBUFFER_hint\">GLFW_COCOA_RETINA_FRAMEBUFFER</a> hint is <code>GLFW_TRUE</code> and the <code>NSHighResolutionCapable</code> key is enabled in the application bundle's <code>Info.plist</code>. For more information, see <a href=\"https://developer.apple.com/library/mac/documentation/GraphicsAnimation/Conceptual/HighResolutionOSX/Explained/Explained.html\">High Resolution Guidelines for OS X</a> in the Mac Developer Library. The GLFW test and example programs use a custom <code>Info.plist</code> template for this, which can be found as <code>CMake/MacOSXBundleInfo.plist.in</code> in the source tree.</dd>\n<dd>\n<b>macOS:</b> When activating frame autosaving with <a class=\"el\" href=\"window_guide.html#GLFW_COCOA_FRAME_NAME_hint\">GLFW_COCOA_FRAME_NAME</a>, the specified window size and position may be overridden by previously saved values.</dd>\n<dd>\n<b>X11:</b> Some window managers will not respect the placement of initially hidden windows.</dd>\n<dd>\n<b>X11:</b> Due to the asynchronous nature of X11, it may take a moment for a window to reach its requested state. This means you may not be able to query the final size, position or other attributes directly after window creation.</dd>\n<dd>\n<b>X11:</b> The class part of the <code>WM_CLASS</code> window property will by default be set to the window title passed to this function. The instance part will use the contents of the <code>RESOURCE_NAME</code> environment variable, if present and not empty, or fall back to the window title. Set the <a class=\"el\" href=\"window_guide.html#GLFW_X11_CLASS_NAME_hint\">GLFW_X11_CLASS_NAME</a> and <a class=\"el\" href=\"window_guide.html#GLFW_X11_INSTANCE_NAME_hint\">GLFW_X11_INSTANCE_NAME</a> window hints to override this.</dd>\n<dd>\n<b>Wayland:</b> Compositors should implement the xdg-decoration protocol for GLFW to decorate the window properly. If this protocol isn't supported, or if the compositor prefers client-side decorations, a very simple fallback frame will be drawn using the wp_viewporter protocol. A compositor can still emit close, maximize or fullscreen events, using for instance a keybind mechanism. If neither of these protocols is supported, the window won't be decorated.</dd>\n<dd>\n<b>Wayland:</b> A full screen window will not attempt to change the mode, no matter what the requested size or refresh rate.</dd>\n<dd>\n<b>Wayland:</b> Screensaver inhibition requires the idle-inhibit protocol to be implemented in the user's compositor.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"window_guide.html#window_creation\">Window creation</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__window.html#gacdf43e51376051d2c091662e9fe3d7b2\">glfwDestroyWindow</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.0. Replaces <code>glfwOpenWindow</code>. </dd></dl>\n\n</div>\n</div>\n<a id=\"gacdf43e51376051d2c091662e9fe3d7b2\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gacdf43e51376051d2c091662e9fe3d7b2\">&#9670;&nbsp;</a></span>glfwDestroyWindow()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">void glfwDestroyWindow </td>\n          <td>(</td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *&#160;</td>\n          <td class=\"paramname\"><em>window</em></td><td>)</td>\n          <td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function destroys the specified window and its context. On calling this function, no further callbacks will be called for that window.</p>\n<p>If the context of the specified window is current on the main thread, it is detached before being destroyed.</p>\n<dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">window</td><td>The window to destroy.</td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a> and <a class=\"el\" href=\"group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1\">GLFW_PLATFORM_ERROR</a>.</dd></dl>\n<dl class=\"section note\"><dt>Note</dt><dd>The context of the specified window must not be current on any other thread when this function is called.</dd></dl>\n<dl class=\"section user\"><dt>Reentrancy</dt><dd>This function must not be called from a callback.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"window_guide.html#window_creation\">Window creation</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__window.html#ga5c336fddf2cbb5b92f65f10fb6043344\">glfwCreateWindow</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.0. Replaces <code>glfwCloseWindow</code>. </dd></dl>\n\n</div>\n</div>\n<a id=\"ga24e02fbfefbb81fc45320989f8140ab5\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga24e02fbfefbb81fc45320989f8140ab5\">&#9670;&nbsp;</a></span>glfwWindowShouldClose()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">int glfwWindowShouldClose </td>\n          <td>(</td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *&#160;</td>\n          <td class=\"paramname\"><em>window</em></td><td>)</td>\n          <td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function returns the value of the close flag of the specified window.</p>\n<dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">window</td><td>The window to query. </td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section return\"><dt>Returns</dt><dd>The value of the close flag.</dd></dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a>.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function may be called from any thread. Access is not synchronized.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"window_guide.html#window_close\">Window closing and close flag</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>\n\n</div>\n</div>\n<a id=\"ga49c449dde2a6f87d996f4daaa09d6708\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga49c449dde2a6f87d996f4daaa09d6708\">&#9670;&nbsp;</a></span>glfwSetWindowShouldClose()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">void glfwSetWindowShouldClose </td>\n          <td>(</td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *&#160;</td>\n          <td class=\"paramname\"><em>window</em>, </td>\n        </tr>\n        <tr>\n          <td class=\"paramkey\"></td>\n          <td></td>\n          <td class=\"paramtype\">int&#160;</td>\n          <td class=\"paramname\"><em>value</em>&#160;</td>\n        </tr>\n        <tr>\n          <td></td>\n          <td>)</td>\n          <td></td><td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function sets the value of the close flag of the specified window. This can be used to override the user's attempt to close the window, or to signal that it should be closed.</p>\n<dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">window</td><td>The window whose flag to change. </td></tr>\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">value</td><td>The new value.</td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a>.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function may be called from any thread. Access is not synchronized.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"window_guide.html#window_close\">Window closing and close flag</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>\n\n</div>\n</div>\n<a id=\"ga5d877f09e968cef7a360b513306f17ff\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga5d877f09e968cef7a360b513306f17ff\">&#9670;&nbsp;</a></span>glfwSetWindowTitle()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">void glfwSetWindowTitle </td>\n          <td>(</td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *&#160;</td>\n          <td class=\"paramname\"><em>window</em>, </td>\n        </tr>\n        <tr>\n          <td class=\"paramkey\"></td>\n          <td></td>\n          <td class=\"paramtype\">const char *&#160;</td>\n          <td class=\"paramname\"><em>title</em>&#160;</td>\n        </tr>\n        <tr>\n          <td></td>\n          <td>)</td>\n          <td></td><td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function sets the window title, encoded as UTF-8, of the specified window.</p>\n<dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">window</td><td>The window whose title to change. </td></tr>\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">title</td><td>The UTF-8 encoded window title.</td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a> and <a class=\"el\" href=\"group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1\">GLFW_PLATFORM_ERROR</a>.</dd></dl>\n<dl class=\"section remark\"><dt>Remarks</dt><dd><b>macOS:</b> The window title will not be updated until the next time you process events.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"window_guide.html#window_title\">Window title</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 1.0. <b>GLFW 3:</b> Added window handle parameter. </dd></dl>\n\n</div>\n</div>\n<a id=\"gadd7ccd39fe7a7d1f0904666ae5932dc5\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gadd7ccd39fe7a7d1f0904666ae5932dc5\">&#9670;&nbsp;</a></span>glfwSetWindowIcon()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">void glfwSetWindowIcon </td>\n          <td>(</td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *&#160;</td>\n          <td class=\"paramname\"><em>window</em>, </td>\n        </tr>\n        <tr>\n          <td class=\"paramkey\"></td>\n          <td></td>\n          <td class=\"paramtype\">int&#160;</td>\n          <td class=\"paramname\"><em>count</em>, </td>\n        </tr>\n        <tr>\n          <td class=\"paramkey\"></td>\n          <td></td>\n          <td class=\"paramtype\">const <a class=\"el\" href=\"structGLFWimage.html\">GLFWimage</a> *&#160;</td>\n          <td class=\"paramname\"><em>images</em>&#160;</td>\n        </tr>\n        <tr>\n          <td></td>\n          <td>)</td>\n          <td></td><td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function sets the icon of the specified window. If passed an array of candidate images, those of or closest to the sizes desired by the system are selected. If no images are specified, the window reverts to its default icon.</p>\n<p>The pixels are 32-bit, little-endian, non-premultiplied RGBA, i.e. eight bits per channel with the red channel first. They are arranged canonically as packed sequential rows, starting from the top-left corner.</p>\n<p>The desired image sizes varies depending on platform and system settings. The selected images will be rescaled as needed. Good sizes include 16x16, 32x32 and 48x48.</p>\n<dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">window</td><td>The window whose icon to set. </td></tr>\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">count</td><td>The number of images in the specified array, or zero to revert to the default window icon. </td></tr>\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">images</td><td>The images to create the icon from. This is ignored if count is zero.</td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a> and <a class=\"el\" href=\"group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1\">GLFW_PLATFORM_ERROR</a>.</dd></dl>\n<dl class=\"section user\"><dt>Pointer lifetime</dt><dd>The specified image data is copied before this function returns.</dd></dl>\n<dl class=\"section remark\"><dt>Remarks</dt><dd><b>macOS:</b> The GLFW window has no icon, as it is not a document window, so this function does nothing. The dock icon will be the same as the application bundle's icon. For more information on bundles, see the <a href=\"https://developer.apple.com/library/mac/documentation/CoreFoundation/Conceptual/CFBundles/\">Bundle Programming Guide</a> in the Mac Developer Library.</dd>\n<dd>\n<b>Wayland:</b> There is no existing protocol to change an icon, the window will thus inherit the one defined in the application's desktop file. This function always emits <a class=\"el\" href=\"group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1\">GLFW_PLATFORM_ERROR</a>.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"window_guide.html#window_icon\">Window icon</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.2. </dd></dl>\n\n</div>\n</div>\n<a id=\"ga73cb526c000876fd8ddf571570fdb634\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga73cb526c000876fd8ddf571570fdb634\">&#9670;&nbsp;</a></span>glfwGetWindowPos()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">void glfwGetWindowPos </td>\n          <td>(</td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *&#160;</td>\n          <td class=\"paramname\"><em>window</em>, </td>\n        </tr>\n        <tr>\n          <td class=\"paramkey\"></td>\n          <td></td>\n          <td class=\"paramtype\">int *&#160;</td>\n          <td class=\"paramname\"><em>xpos</em>, </td>\n        </tr>\n        <tr>\n          <td class=\"paramkey\"></td>\n          <td></td>\n          <td class=\"paramtype\">int *&#160;</td>\n          <td class=\"paramname\"><em>ypos</em>&#160;</td>\n        </tr>\n        <tr>\n          <td></td>\n          <td>)</td>\n          <td></td><td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function retrieves the position, in screen coordinates, of the upper-left corner of the content area of the specified window.</p>\n<p>Any or all of the position arguments may be <code>NULL</code>. If an error occurs, all non-<code>NULL</code> position arguments will be set to zero.</p>\n<dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">window</td><td>The window to query. </td></tr>\n    <tr><td class=\"paramdir\">[out]</td><td class=\"paramname\">xpos</td><td>Where to store the x-coordinate of the upper-left corner of the content area, or <code>NULL</code>. </td></tr>\n    <tr><td class=\"paramdir\">[out]</td><td class=\"paramname\">ypos</td><td>Where to store the y-coordinate of the upper-left corner of the content area, or <code>NULL</code>.</td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a> and <a class=\"el\" href=\"group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1\">GLFW_PLATFORM_ERROR</a>.</dd></dl>\n<dl class=\"section remark\"><dt>Remarks</dt><dd><b>Wayland:</b> There is no way for an application to retrieve the global position of its windows, this function will always emit <a class=\"el\" href=\"group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1\">GLFW_PLATFORM_ERROR</a>.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"window_guide.html#window_pos\">Window position</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__window.html#ga1abb6d690e8c88e0c8cd1751356dbca8\">glfwSetWindowPos</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>\n\n</div>\n</div>\n<a id=\"ga1abb6d690e8c88e0c8cd1751356dbca8\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga1abb6d690e8c88e0c8cd1751356dbca8\">&#9670;&nbsp;</a></span>glfwSetWindowPos()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">void glfwSetWindowPos </td>\n          <td>(</td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *&#160;</td>\n          <td class=\"paramname\"><em>window</em>, </td>\n        </tr>\n        <tr>\n          <td class=\"paramkey\"></td>\n          <td></td>\n          <td class=\"paramtype\">int&#160;</td>\n          <td class=\"paramname\"><em>xpos</em>, </td>\n        </tr>\n        <tr>\n          <td class=\"paramkey\"></td>\n          <td></td>\n          <td class=\"paramtype\">int&#160;</td>\n          <td class=\"paramname\"><em>ypos</em>&#160;</td>\n        </tr>\n        <tr>\n          <td></td>\n          <td>)</td>\n          <td></td><td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function sets the position, in screen coordinates, of the upper-left corner of the content area of the specified windowed mode window. If the window is a full screen window, this function does nothing.</p>\n<p><b>Do not use this function</b> to move an already visible window unless you have very good reasons for doing so, as it will confuse and annoy the user.</p>\n<p>The window manager may put limits on what positions are allowed. GLFW cannot and should not override these limits.</p>\n<dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">window</td><td>The window to query. </td></tr>\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">xpos</td><td>The x-coordinate of the upper-left corner of the content area. </td></tr>\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">ypos</td><td>The y-coordinate of the upper-left corner of the content area.</td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a> and <a class=\"el\" href=\"group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1\">GLFW_PLATFORM_ERROR</a>.</dd></dl>\n<dl class=\"section remark\"><dt>Remarks</dt><dd><b>Wayland:</b> There is no way for an application to set the global position of its windows, this function will always emit <a class=\"el\" href=\"group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1\">GLFW_PLATFORM_ERROR</a>.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"window_guide.html#window_pos\">Window position</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__window.html#ga73cb526c000876fd8ddf571570fdb634\">glfwGetWindowPos</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 1.0. <b>GLFW 3:</b> Added window handle parameter. </dd></dl>\n\n</div>\n</div>\n<a id=\"gaeea7cbc03373a41fb51cfbf9f2a5d4c6\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gaeea7cbc03373a41fb51cfbf9f2a5d4c6\">&#9670;&nbsp;</a></span>glfwGetWindowSize()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">void glfwGetWindowSize </td>\n          <td>(</td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *&#160;</td>\n          <td class=\"paramname\"><em>window</em>, </td>\n        </tr>\n        <tr>\n          <td class=\"paramkey\"></td>\n          <td></td>\n          <td class=\"paramtype\">int *&#160;</td>\n          <td class=\"paramname\"><em>width</em>, </td>\n        </tr>\n        <tr>\n          <td class=\"paramkey\"></td>\n          <td></td>\n          <td class=\"paramtype\">int *&#160;</td>\n          <td class=\"paramname\"><em>height</em>&#160;</td>\n        </tr>\n        <tr>\n          <td></td>\n          <td>)</td>\n          <td></td><td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function retrieves the size, in screen coordinates, of the content area of the specified window. If you wish to retrieve the size of the framebuffer of the window in pixels, see <a class=\"el\" href=\"group__window.html#ga0e2637a4161afb283f5300c7f94785c9\">glfwGetFramebufferSize</a>.</p>\n<p>Any or all of the size arguments may be <code>NULL</code>. If an error occurs, all non-<code>NULL</code> size arguments will be set to zero.</p>\n<dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">window</td><td>The window whose size to retrieve. </td></tr>\n    <tr><td class=\"paramdir\">[out]</td><td class=\"paramname\">width</td><td>Where to store the width, in screen coordinates, of the content area, or <code>NULL</code>. </td></tr>\n    <tr><td class=\"paramdir\">[out]</td><td class=\"paramname\">height</td><td>Where to store the height, in screen coordinates, of the content area, or <code>NULL</code>.</td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a> and <a class=\"el\" href=\"group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1\">GLFW_PLATFORM_ERROR</a>.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"window_guide.html#window_size\">Window size</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__window.html#ga371911f12c74c504dd8d47d832d095cb\">glfwSetWindowSize</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 1.0. <b>GLFW 3:</b> Added window handle parameter. </dd></dl>\n\n</div>\n</div>\n<a id=\"gac314fa6cec7d2d307be9963e2709cc90\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gac314fa6cec7d2d307be9963e2709cc90\">&#9670;&nbsp;</a></span>glfwSetWindowSizeLimits()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">void glfwSetWindowSizeLimits </td>\n          <td>(</td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *&#160;</td>\n          <td class=\"paramname\"><em>window</em>, </td>\n        </tr>\n        <tr>\n          <td class=\"paramkey\"></td>\n          <td></td>\n          <td class=\"paramtype\">int&#160;</td>\n          <td class=\"paramname\"><em>minwidth</em>, </td>\n        </tr>\n        <tr>\n          <td class=\"paramkey\"></td>\n          <td></td>\n          <td class=\"paramtype\">int&#160;</td>\n          <td class=\"paramname\"><em>minheight</em>, </td>\n        </tr>\n        <tr>\n          <td class=\"paramkey\"></td>\n          <td></td>\n          <td class=\"paramtype\">int&#160;</td>\n          <td class=\"paramname\"><em>maxwidth</em>, </td>\n        </tr>\n        <tr>\n          <td class=\"paramkey\"></td>\n          <td></td>\n          <td class=\"paramtype\">int&#160;</td>\n          <td class=\"paramname\"><em>maxheight</em>&#160;</td>\n        </tr>\n        <tr>\n          <td></td>\n          <td>)</td>\n          <td></td><td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function sets the size limits of the content area of the specified window. If the window is full screen, the size limits only take effect once it is made windowed. If the window is not resizable, this function does nothing.</p>\n<p>The size limits are applied immediately to a windowed mode window and may cause it to be resized.</p>\n<p>The maximum dimensions must be greater than or equal to the minimum dimensions and all must be greater than or equal to zero.</p>\n<dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">window</td><td>The window to set limits for. </td></tr>\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">minwidth</td><td>The minimum width, in screen coordinates, of the content area, or <code>GLFW_DONT_CARE</code>. </td></tr>\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">minheight</td><td>The minimum height, in screen coordinates, of the content area, or <code>GLFW_DONT_CARE</code>. </td></tr>\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">maxwidth</td><td>The maximum width, in screen coordinates, of the content area, or <code>GLFW_DONT_CARE</code>. </td></tr>\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">maxheight</td><td>The maximum height, in screen coordinates, of the content area, or <code>GLFW_DONT_CARE</code>.</td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a>, <a class=\"el\" href=\"group__errors.html#gaaf2ef9aa8202c2b82ac2d921e554c687\">GLFW_INVALID_VALUE</a> and <a class=\"el\" href=\"group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1\">GLFW_PLATFORM_ERROR</a>.</dd></dl>\n<dl class=\"section remark\"><dt>Remarks</dt><dd>If you set size limits and an aspect ratio that conflict, the results are undefined.</dd>\n<dd>\n<b>Wayland:</b> The size limits will not be applied until the window is actually resized, either by the user or by the compositor.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"window_guide.html#window_sizelimits\">Window size limits</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__window.html#ga72ac8cb1ee2e312a878b55153d81b937\">glfwSetWindowAspectRatio</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.2. </dd></dl>\n\n</div>\n</div>\n<a id=\"ga72ac8cb1ee2e312a878b55153d81b937\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga72ac8cb1ee2e312a878b55153d81b937\">&#9670;&nbsp;</a></span>glfwSetWindowAspectRatio()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">void glfwSetWindowAspectRatio </td>\n          <td>(</td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *&#160;</td>\n          <td class=\"paramname\"><em>window</em>, </td>\n        </tr>\n        <tr>\n          <td class=\"paramkey\"></td>\n          <td></td>\n          <td class=\"paramtype\">int&#160;</td>\n          <td class=\"paramname\"><em>numer</em>, </td>\n        </tr>\n        <tr>\n          <td class=\"paramkey\"></td>\n          <td></td>\n          <td class=\"paramtype\">int&#160;</td>\n          <td class=\"paramname\"><em>denom</em>&#160;</td>\n        </tr>\n        <tr>\n          <td></td>\n          <td>)</td>\n          <td></td><td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function sets the required aspect ratio of the content area of the specified window. If the window is full screen, the aspect ratio only takes effect once it is made windowed. If the window is not resizable, this function does nothing.</p>\n<p>The aspect ratio is specified as a numerator and a denominator and both values must be greater than zero. For example, the common 16:9 aspect ratio is specified as 16 and 9, respectively.</p>\n<p>If the numerator and denominator is set to <code>GLFW_DONT_CARE</code> then the aspect ratio limit is disabled.</p>\n<p>The aspect ratio is applied immediately to a windowed mode window and may cause it to be resized.</p>\n<dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">window</td><td>The window to set limits for. </td></tr>\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">numer</td><td>The numerator of the desired aspect ratio, or <code>GLFW_DONT_CARE</code>. </td></tr>\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">denom</td><td>The denominator of the desired aspect ratio, or <code>GLFW_DONT_CARE</code>.</td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a>, <a class=\"el\" href=\"group__errors.html#gaaf2ef9aa8202c2b82ac2d921e554c687\">GLFW_INVALID_VALUE</a> and <a class=\"el\" href=\"group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1\">GLFW_PLATFORM_ERROR</a>.</dd></dl>\n<dl class=\"section remark\"><dt>Remarks</dt><dd>If you set size limits and an aspect ratio that conflict, the results are undefined.</dd>\n<dd>\n<b>Wayland:</b> The aspect ratio will not be applied until the window is actually resized, either by the user or by the compositor.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"window_guide.html#window_sizelimits\">Window size limits</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__window.html#gac314fa6cec7d2d307be9963e2709cc90\">glfwSetWindowSizeLimits</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.2. </dd></dl>\n\n</div>\n</div>\n<a id=\"ga371911f12c74c504dd8d47d832d095cb\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga371911f12c74c504dd8d47d832d095cb\">&#9670;&nbsp;</a></span>glfwSetWindowSize()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">void glfwSetWindowSize </td>\n          <td>(</td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *&#160;</td>\n          <td class=\"paramname\"><em>window</em>, </td>\n        </tr>\n        <tr>\n          <td class=\"paramkey\"></td>\n          <td></td>\n          <td class=\"paramtype\">int&#160;</td>\n          <td class=\"paramname\"><em>width</em>, </td>\n        </tr>\n        <tr>\n          <td class=\"paramkey\"></td>\n          <td></td>\n          <td class=\"paramtype\">int&#160;</td>\n          <td class=\"paramname\"><em>height</em>&#160;</td>\n        </tr>\n        <tr>\n          <td></td>\n          <td>)</td>\n          <td></td><td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function sets the size, in screen coordinates, of the content area of the specified window.</p>\n<p>For full screen windows, this function updates the resolution of its desired video mode and switches to the video mode closest to it, without affecting the window's context. As the context is unaffected, the bit depths of the framebuffer remain unchanged.</p>\n<p>If you wish to update the refresh rate of the desired video mode in addition to its resolution, see <a class=\"el\" href=\"group__window.html#ga81c76c418af80a1cce7055bccb0ae0a7\">glfwSetWindowMonitor</a>.</p>\n<p>The window manager may put limits on what sizes are allowed. GLFW cannot and should not override these limits.</p>\n<dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">window</td><td>The window to resize. </td></tr>\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">width</td><td>The desired width, in screen coordinates, of the window content area. </td></tr>\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">height</td><td>The desired height, in screen coordinates, of the window content area.</td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a> and <a class=\"el\" href=\"group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1\">GLFW_PLATFORM_ERROR</a>.</dd></dl>\n<dl class=\"section remark\"><dt>Remarks</dt><dd><b>Wayland:</b> A full screen window will not attempt to change the mode, no matter what the requested size.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"window_guide.html#window_size\">Window size</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__window.html#gaeea7cbc03373a41fb51cfbf9f2a5d4c6\">glfwGetWindowSize</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__window.html#ga81c76c418af80a1cce7055bccb0ae0a7\">glfwSetWindowMonitor</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 1.0. <b>GLFW 3:</b> Added window handle parameter. </dd></dl>\n\n</div>\n</div>\n<a id=\"ga0e2637a4161afb283f5300c7f94785c9\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga0e2637a4161afb283f5300c7f94785c9\">&#9670;&nbsp;</a></span>glfwGetFramebufferSize()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">void glfwGetFramebufferSize </td>\n          <td>(</td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *&#160;</td>\n          <td class=\"paramname\"><em>window</em>, </td>\n        </tr>\n        <tr>\n          <td class=\"paramkey\"></td>\n          <td></td>\n          <td class=\"paramtype\">int *&#160;</td>\n          <td class=\"paramname\"><em>width</em>, </td>\n        </tr>\n        <tr>\n          <td class=\"paramkey\"></td>\n          <td></td>\n          <td class=\"paramtype\">int *&#160;</td>\n          <td class=\"paramname\"><em>height</em>&#160;</td>\n        </tr>\n        <tr>\n          <td></td>\n          <td>)</td>\n          <td></td><td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function retrieves the size, in pixels, of the framebuffer of the specified window. If you wish to retrieve the size of the window in screen coordinates, see <a class=\"el\" href=\"group__window.html#gaeea7cbc03373a41fb51cfbf9f2a5d4c6\">glfwGetWindowSize</a>.</p>\n<p>Any or all of the size arguments may be <code>NULL</code>. If an error occurs, all non-<code>NULL</code> size arguments will be set to zero.</p>\n<dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">window</td><td>The window whose framebuffer to query. </td></tr>\n    <tr><td class=\"paramdir\">[out]</td><td class=\"paramname\">width</td><td>Where to store the width, in pixels, of the framebuffer, or <code>NULL</code>. </td></tr>\n    <tr><td class=\"paramdir\">[out]</td><td class=\"paramname\">height</td><td>Where to store the height, in pixels, of the framebuffer, or <code>NULL</code>.</td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a> and <a class=\"el\" href=\"group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1\">GLFW_PLATFORM_ERROR</a>.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"window_guide.html#window_fbsize\">Framebuffer size</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__window.html#gab3fb7c3366577daef18c0023e2a8591f\">glfwSetFramebufferSizeCallback</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>\n\n</div>\n</div>\n<a id=\"ga1a9fd382058c53101b21cf211898f1f1\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga1a9fd382058c53101b21cf211898f1f1\">&#9670;&nbsp;</a></span>glfwGetWindowFrameSize()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">void glfwGetWindowFrameSize </td>\n          <td>(</td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *&#160;</td>\n          <td class=\"paramname\"><em>window</em>, </td>\n        </tr>\n        <tr>\n          <td class=\"paramkey\"></td>\n          <td></td>\n          <td class=\"paramtype\">int *&#160;</td>\n          <td class=\"paramname\"><em>left</em>, </td>\n        </tr>\n        <tr>\n          <td class=\"paramkey\"></td>\n          <td></td>\n          <td class=\"paramtype\">int *&#160;</td>\n          <td class=\"paramname\"><em>top</em>, </td>\n        </tr>\n        <tr>\n          <td class=\"paramkey\"></td>\n          <td></td>\n          <td class=\"paramtype\">int *&#160;</td>\n          <td class=\"paramname\"><em>right</em>, </td>\n        </tr>\n        <tr>\n          <td class=\"paramkey\"></td>\n          <td></td>\n          <td class=\"paramtype\">int *&#160;</td>\n          <td class=\"paramname\"><em>bottom</em>&#160;</td>\n        </tr>\n        <tr>\n          <td></td>\n          <td>)</td>\n          <td></td><td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function retrieves the size, in screen coordinates, of each edge of the frame of the specified window. This size includes the title bar, if the window has one. The size of the frame may vary depending on the <a class=\"el\" href=\"window_guide.html#window_hints_wnd\">window-related hints</a> used to create it.</p>\n<p>Because this function retrieves the size of each window frame edge and not the offset along a particular coordinate axis, the retrieved values will always be zero or positive.</p>\n<p>Any or all of the size arguments may be <code>NULL</code>. If an error occurs, all non-<code>NULL</code> size arguments will be set to zero.</p>\n<dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">window</td><td>The window whose frame size to query. </td></tr>\n    <tr><td class=\"paramdir\">[out]</td><td class=\"paramname\">left</td><td>Where to store the size, in screen coordinates, of the left edge of the window frame, or <code>NULL</code>. </td></tr>\n    <tr><td class=\"paramdir\">[out]</td><td class=\"paramname\">top</td><td>Where to store the size, in screen coordinates, of the top edge of the window frame, or <code>NULL</code>. </td></tr>\n    <tr><td class=\"paramdir\">[out]</td><td class=\"paramname\">right</td><td>Where to store the size, in screen coordinates, of the right edge of the window frame, or <code>NULL</code>. </td></tr>\n    <tr><td class=\"paramdir\">[out]</td><td class=\"paramname\">bottom</td><td>Where to store the size, in screen coordinates, of the bottom edge of the window frame, or <code>NULL</code>.</td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a> and <a class=\"el\" href=\"group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1\">GLFW_PLATFORM_ERROR</a>.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"window_guide.html#window_size\">Window size</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.1. </dd></dl>\n\n</div>\n</div>\n<a id=\"gaf5d31de9c19c4f994facea64d2b3106c\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gaf5d31de9c19c4f994facea64d2b3106c\">&#9670;&nbsp;</a></span>glfwGetWindowContentScale()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">void glfwGetWindowContentScale </td>\n          <td>(</td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *&#160;</td>\n          <td class=\"paramname\"><em>window</em>, </td>\n        </tr>\n        <tr>\n          <td class=\"paramkey\"></td>\n          <td></td>\n          <td class=\"paramtype\">float *&#160;</td>\n          <td class=\"paramname\"><em>xscale</em>, </td>\n        </tr>\n        <tr>\n          <td class=\"paramkey\"></td>\n          <td></td>\n          <td class=\"paramtype\">float *&#160;</td>\n          <td class=\"paramname\"><em>yscale</em>&#160;</td>\n        </tr>\n        <tr>\n          <td></td>\n          <td>)</td>\n          <td></td><td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function retrieves the content scale for the specified window. The content scale is the ratio between the current DPI and the platform's default DPI. This is especially important for text and any UI elements. If the pixel dimensions of your UI scaled by this look appropriate on your machine then it should appear at a reasonable size on other machines regardless of their DPI and scaling settings. This relies on the system DPI and scaling settings being somewhat correct.</p>\n<p>On systems where each monitors can have its own content scale, the window content scale will depend on which monitor the system considers the window to be on.</p>\n<dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">window</td><td>The window to query. </td></tr>\n    <tr><td class=\"paramdir\">[out]</td><td class=\"paramname\">xscale</td><td>Where to store the x-axis content scale, or <code>NULL</code>. </td></tr>\n    <tr><td class=\"paramdir\">[out]</td><td class=\"paramname\">yscale</td><td>Where to store the y-axis content scale, or <code>NULL</code>.</td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a> and <a class=\"el\" href=\"group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1\">GLFW_PLATFORM_ERROR</a>.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"window_guide.html#window_scale\">Window content scale</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__window.html#gaf2832ebb5aa6c252a2d261de002c92d6\">glfwSetWindowContentScaleCallback</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__monitor.html#gad3152e84465fa620b601265ebfcdb21b\">glfwGetMonitorContentScale</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.3. </dd></dl>\n\n</div>\n</div>\n<a id=\"gad09f0bd7a6307c4533b7061828480a84\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gad09f0bd7a6307c4533b7061828480a84\">&#9670;&nbsp;</a></span>glfwGetWindowOpacity()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">float glfwGetWindowOpacity </td>\n          <td>(</td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *&#160;</td>\n          <td class=\"paramname\"><em>window</em></td><td>)</td>\n          <td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function returns the opacity of the window, including any decorations.</p>\n<p>The opacity (or alpha) value is a positive finite number between zero and one, where zero is fully transparent and one is fully opaque. If the system does not support whole window transparency, this function always returns one.</p>\n<p>The initial opacity value for newly created windows is one.</p>\n<dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">window</td><td>The window to query. </td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section return\"><dt>Returns</dt><dd>The opacity value of the specified window.</dd></dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a> and <a class=\"el\" href=\"group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1\">GLFW_PLATFORM_ERROR</a>.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"window_guide.html#window_transparency\">Window transparency</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__window.html#gac31caeb3d1088831b13d2c8a156802e9\">glfwSetWindowOpacity</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.3. </dd></dl>\n\n</div>\n</div>\n<a id=\"gac31caeb3d1088831b13d2c8a156802e9\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gac31caeb3d1088831b13d2c8a156802e9\">&#9670;&nbsp;</a></span>glfwSetWindowOpacity()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">void glfwSetWindowOpacity </td>\n          <td>(</td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *&#160;</td>\n          <td class=\"paramname\"><em>window</em>, </td>\n        </tr>\n        <tr>\n          <td class=\"paramkey\"></td>\n          <td></td>\n          <td class=\"paramtype\">float&#160;</td>\n          <td class=\"paramname\"><em>opacity</em>&#160;</td>\n        </tr>\n        <tr>\n          <td></td>\n          <td>)</td>\n          <td></td><td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function sets the opacity of the window, including any decorations.</p>\n<p>The opacity (or alpha) value is a positive finite number between zero and one, where zero is fully transparent and one is fully opaque.</p>\n<p>The initial opacity value for newly created windows is one.</p>\n<p>A window created with framebuffer transparency may not use whole window transparency. The results of doing this are undefined.</p>\n<dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">window</td><td>The window to set the opacity for. </td></tr>\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">opacity</td><td>The desired opacity of the specified window.</td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a> and <a class=\"el\" href=\"group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1\">GLFW_PLATFORM_ERROR</a>.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"window_guide.html#window_transparency\">Window transparency</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__window.html#gad09f0bd7a6307c4533b7061828480a84\">glfwGetWindowOpacity</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.3. </dd></dl>\n\n</div>\n</div>\n<a id=\"ga1bb559c0ebaad63c5c05ad2a066779c4\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga1bb559c0ebaad63c5c05ad2a066779c4\">&#9670;&nbsp;</a></span>glfwIconifyWindow()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">void glfwIconifyWindow </td>\n          <td>(</td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *&#160;</td>\n          <td class=\"paramname\"><em>window</em></td><td>)</td>\n          <td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function iconifies (minimizes) the specified window if it was previously restored. If the window is already iconified, this function does nothing.</p>\n<p>If the specified window is a full screen window, the original monitor resolution is restored until the window is restored.</p>\n<dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">window</td><td>The window to iconify.</td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a> and <a class=\"el\" href=\"group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1\">GLFW_PLATFORM_ERROR</a>.</dd></dl>\n<dl class=\"section remark\"><dt>Remarks</dt><dd><b>Wayland:</b> There is no concept of iconification in wl_shell, this function will emit <a class=\"el\" href=\"group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1\">GLFW_PLATFORM_ERROR</a> when using this deprecated protocol.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"window_guide.html#window_iconify\">Window iconification</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__window.html#ga52527a5904b47d802b6b4bb519cdebc7\">glfwRestoreWindow</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__window.html#ga3f541387449d911274324ae7f17ec56b\">glfwMaximizeWindow</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 2.1. <b>GLFW 3:</b> Added window handle parameter. </dd></dl>\n\n</div>\n</div>\n<a id=\"ga52527a5904b47d802b6b4bb519cdebc7\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga52527a5904b47d802b6b4bb519cdebc7\">&#9670;&nbsp;</a></span>glfwRestoreWindow()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">void glfwRestoreWindow </td>\n          <td>(</td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *&#160;</td>\n          <td class=\"paramname\"><em>window</em></td><td>)</td>\n          <td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function restores the specified window if it was previously iconified (minimized) or maximized. If the window is already restored, this function does nothing.</p>\n<p>If the specified window is a full screen window, the resolution chosen for the window is restored on the selected monitor.</p>\n<dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">window</td><td>The window to restore.</td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a> and <a class=\"el\" href=\"group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1\">GLFW_PLATFORM_ERROR</a>.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"window_guide.html#window_iconify\">Window iconification</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__window.html#ga1bb559c0ebaad63c5c05ad2a066779c4\">glfwIconifyWindow</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__window.html#ga3f541387449d911274324ae7f17ec56b\">glfwMaximizeWindow</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 2.1. <b>GLFW 3:</b> Added window handle parameter. </dd></dl>\n\n</div>\n</div>\n<a id=\"ga3f541387449d911274324ae7f17ec56b\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga3f541387449d911274324ae7f17ec56b\">&#9670;&nbsp;</a></span>glfwMaximizeWindow()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">void glfwMaximizeWindow </td>\n          <td>(</td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *&#160;</td>\n          <td class=\"paramname\"><em>window</em></td><td>)</td>\n          <td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function maximizes the specified window if it was previously not maximized. If the window is already maximized, this function does nothing.</p>\n<p>If the specified window is a full screen window, this function does nothing.</p>\n<dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">window</td><td>The window to maximize.</td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a> and <a class=\"el\" href=\"group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1\">GLFW_PLATFORM_ERROR</a>.</dd></dl>\n<dl class=\"section user\"><dt>Thread Safety</dt><dd>This function may only be called from the main thread.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"window_guide.html#window_iconify\">Window iconification</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__window.html#ga1bb559c0ebaad63c5c05ad2a066779c4\">glfwIconifyWindow</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__window.html#ga52527a5904b47d802b6b4bb519cdebc7\">glfwRestoreWindow</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in GLFW 3.2. </dd></dl>\n\n</div>\n</div>\n<a id=\"ga61be47917b72536a148300f46494fc66\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga61be47917b72536a148300f46494fc66\">&#9670;&nbsp;</a></span>glfwShowWindow()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">void glfwShowWindow </td>\n          <td>(</td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *&#160;</td>\n          <td class=\"paramname\"><em>window</em></td><td>)</td>\n          <td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function makes the specified window visible if it was previously hidden. If the window is already visible or is in full screen mode, this function does nothing.</p>\n<p>By default, windowed mode windows are focused when shown Set the <a class=\"el\" href=\"window_guide.html#GLFW_FOCUS_ON_SHOW_hint\">GLFW_FOCUS_ON_SHOW</a> window hint to change this behavior for all newly created windows, or change the behavior for an existing window with <a class=\"el\" href=\"group__window.html#gace2afda29b4116ec012e410a6819033e\">glfwSetWindowAttrib</a>.</p>\n<dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">window</td><td>The window to make visible.</td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a> and <a class=\"el\" href=\"group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1\">GLFW_PLATFORM_ERROR</a>.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"window_guide.html#window_hide\">Window visibility</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__window.html#ga49401f82a1ba5f15db5590728314d47c\">glfwHideWindow</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>\n\n</div>\n</div>\n<a id=\"ga49401f82a1ba5f15db5590728314d47c\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga49401f82a1ba5f15db5590728314d47c\">&#9670;&nbsp;</a></span>glfwHideWindow()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">void glfwHideWindow </td>\n          <td>(</td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *&#160;</td>\n          <td class=\"paramname\"><em>window</em></td><td>)</td>\n          <td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function hides the specified window if it was previously visible. If the window is already hidden or is in full screen mode, this function does nothing.</p>\n<dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">window</td><td>The window to hide.</td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a> and <a class=\"el\" href=\"group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1\">GLFW_PLATFORM_ERROR</a>.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"window_guide.html#window_hide\">Window visibility</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__window.html#ga61be47917b72536a148300f46494fc66\">glfwShowWindow</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>\n\n</div>\n</div>\n<a id=\"ga873780357abd3f3a081d71a40aae45a1\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga873780357abd3f3a081d71a40aae45a1\">&#9670;&nbsp;</a></span>glfwFocusWindow()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">void glfwFocusWindow </td>\n          <td>(</td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *&#160;</td>\n          <td class=\"paramname\"><em>window</em></td><td>)</td>\n          <td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function brings the specified window to front and sets input focus. The window should already be visible and not iconified.</p>\n<p>By default, both windowed and full screen mode windows are focused when initially created. Set the <a class=\"el\" href=\"window_guide.html#GLFW_FOCUSED_hint\">GLFW_FOCUSED</a> to disable this behavior.</p>\n<p>Also by default, windowed mode windows are focused when shown with <a class=\"el\" href=\"group__window.html#ga61be47917b72536a148300f46494fc66\">glfwShowWindow</a>. Set the <a class=\"el\" href=\"window_guide.html#GLFW_FOCUS_ON_SHOW_hint\">GLFW_FOCUS_ON_SHOW</a> to disable this behavior.</p>\n<p><b>Do not use this function</b> to steal focus from other applications unless you are certain that is what the user wants. Focus stealing can be extremely disruptive.</p>\n<p>For a less disruptive way of getting the user's attention, see <a class=\"el\" href=\"window_guide.html#window_attention\">attention requests</a>.</p>\n<dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">window</td><td>The window to give input focus.</td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a> and <a class=\"el\" href=\"group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1\">GLFW_PLATFORM_ERROR</a>.</dd></dl>\n<dl class=\"section remark\"><dt>Remarks</dt><dd><b>Wayland:</b> It is not possible for an application to bring its windows to front, this function will always emit <a class=\"el\" href=\"group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1\">GLFW_PLATFORM_ERROR</a>.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"window_guide.html#window_focus\">Window input focus</a> </dd>\n<dd>\n<a class=\"el\" href=\"window_guide.html#window_attention\">Window attention request</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.2. </dd></dl>\n\n</div>\n</div>\n<a id=\"ga2f8d59323fc4692c1d54ba08c863a703\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga2f8d59323fc4692c1d54ba08c863a703\">&#9670;&nbsp;</a></span>glfwRequestWindowAttention()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">void glfwRequestWindowAttention </td>\n          <td>(</td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *&#160;</td>\n          <td class=\"paramname\"><em>window</em></td><td>)</td>\n          <td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function requests user attention to the specified window. On platforms where this is not supported, attention is requested to the application as a whole.</p>\n<p>Once the user has given attention, usually by focusing the window or application, the system will end the request automatically.</p>\n<dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">window</td><td>The window to request attention to.</td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a> and <a class=\"el\" href=\"group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1\">GLFW_PLATFORM_ERROR</a>.</dd></dl>\n<dl class=\"section remark\"><dt>Remarks</dt><dd><b>macOS:</b> Attention is requested to the application as a whole, not the specific window.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"window_guide.html#window_attention\">Window attention request</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.3. </dd></dl>\n\n</div>\n</div>\n<a id=\"gaeac25e64789974ccbe0811766bd91a16\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gaeac25e64789974ccbe0811766bd91a16\">&#9670;&nbsp;</a></span>glfwGetWindowMonitor()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\"><a class=\"el\" href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a>* glfwGetWindowMonitor </td>\n          <td>(</td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *&#160;</td>\n          <td class=\"paramname\"><em>window</em></td><td>)</td>\n          <td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function returns the handle of the monitor that the specified window is in full screen on.</p>\n<dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">window</td><td>The window to query. </td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section return\"><dt>Returns</dt><dd>The monitor, or <code>NULL</code> if the window is in windowed mode or an <a class=\"el\" href=\"intro_guide.html#error_handling\">error</a> occurred.</dd></dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a>.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"window_guide.html#window_monitor\">Window monitor</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__window.html#ga81c76c418af80a1cce7055bccb0ae0a7\">glfwSetWindowMonitor</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>\n\n</div>\n</div>\n<a id=\"ga81c76c418af80a1cce7055bccb0ae0a7\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga81c76c418af80a1cce7055bccb0ae0a7\">&#9670;&nbsp;</a></span>glfwSetWindowMonitor()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">void glfwSetWindowMonitor </td>\n          <td>(</td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *&#160;</td>\n          <td class=\"paramname\"><em>window</em>, </td>\n        </tr>\n        <tr>\n          <td class=\"paramkey\"></td>\n          <td></td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a> *&#160;</td>\n          <td class=\"paramname\"><em>monitor</em>, </td>\n        </tr>\n        <tr>\n          <td class=\"paramkey\"></td>\n          <td></td>\n          <td class=\"paramtype\">int&#160;</td>\n          <td class=\"paramname\"><em>xpos</em>, </td>\n        </tr>\n        <tr>\n          <td class=\"paramkey\"></td>\n          <td></td>\n          <td class=\"paramtype\">int&#160;</td>\n          <td class=\"paramname\"><em>ypos</em>, </td>\n        </tr>\n        <tr>\n          <td class=\"paramkey\"></td>\n          <td></td>\n          <td class=\"paramtype\">int&#160;</td>\n          <td class=\"paramname\"><em>width</em>, </td>\n        </tr>\n        <tr>\n          <td class=\"paramkey\"></td>\n          <td></td>\n          <td class=\"paramtype\">int&#160;</td>\n          <td class=\"paramname\"><em>height</em>, </td>\n        </tr>\n        <tr>\n          <td class=\"paramkey\"></td>\n          <td></td>\n          <td class=\"paramtype\">int&#160;</td>\n          <td class=\"paramname\"><em>refreshRate</em>&#160;</td>\n        </tr>\n        <tr>\n          <td></td>\n          <td>)</td>\n          <td></td><td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function sets the monitor that the window uses for full screen mode or, if the monitor is <code>NULL</code>, makes it windowed mode.</p>\n<p>When setting a monitor, this function updates the width, height and refresh rate of the desired video mode and switches to the video mode closest to it. The window position is ignored when setting a monitor.</p>\n<p>When the monitor is <code>NULL</code>, the position, width and height are used to place the window content area. The refresh rate is ignored when no monitor is specified.</p>\n<p>If you only wish to update the resolution of a full screen window or the size of a windowed mode window, see <a class=\"el\" href=\"group__window.html#ga371911f12c74c504dd8d47d832d095cb\">glfwSetWindowSize</a>.</p>\n<p>When a window transitions from full screen to windowed mode, this function restores any previous window settings such as whether it is decorated, floating, resizable, has size or aspect ratio limits, etc.</p>\n<dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">window</td><td>The window whose monitor, size or video mode to set. </td></tr>\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">monitor</td><td>The desired monitor, or <code>NULL</code> to set windowed mode. </td></tr>\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">xpos</td><td>The desired x-coordinate of the upper-left corner of the content area. </td></tr>\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">ypos</td><td>The desired y-coordinate of the upper-left corner of the content area. </td></tr>\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">width</td><td>The desired with, in screen coordinates, of the content area or video mode. </td></tr>\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">height</td><td>The desired height, in screen coordinates, of the content area or video mode. </td></tr>\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">refreshRate</td><td>The desired refresh rate, in Hz, of the video mode, or <code>GLFW_DONT_CARE</code>.</td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a> and <a class=\"el\" href=\"group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1\">GLFW_PLATFORM_ERROR</a>.</dd></dl>\n<dl class=\"section remark\"><dt>Remarks</dt><dd>The OpenGL or OpenGL ES context will not be destroyed or otherwise affected by any resizing or mode switching, although you may need to update your viewport if the framebuffer size has changed.</dd>\n<dd>\n<b>Wayland:</b> The desired window position is ignored, as there is no way for an application to set this property.</dd>\n<dd>\n<b>Wayland:</b> Setting the window to full screen will not attempt to change the mode, no matter what the requested size or refresh rate.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"window_guide.html#window_monitor\">Window monitor</a> </dd>\n<dd>\n<a class=\"el\" href=\"window_guide.html#window_full_screen\">Full screen windows</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__window.html#gaeac25e64789974ccbe0811766bd91a16\">glfwGetWindowMonitor</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__window.html#ga371911f12c74c504dd8d47d832d095cb\">glfwSetWindowSize</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.2. </dd></dl>\n\n</div>\n</div>\n<a id=\"gacccb29947ea4b16860ebef42c2cb9337\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gacccb29947ea4b16860ebef42c2cb9337\">&#9670;&nbsp;</a></span>glfwGetWindowAttrib()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">int glfwGetWindowAttrib </td>\n          <td>(</td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *&#160;</td>\n          <td class=\"paramname\"><em>window</em>, </td>\n        </tr>\n        <tr>\n          <td class=\"paramkey\"></td>\n          <td></td>\n          <td class=\"paramtype\">int&#160;</td>\n          <td class=\"paramname\"><em>attrib</em>&#160;</td>\n        </tr>\n        <tr>\n          <td></td>\n          <td>)</td>\n          <td></td><td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function returns the value of an attribute of the specified window or its OpenGL or OpenGL ES context.</p>\n<dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">window</td><td>The window to query. </td></tr>\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">attrib</td><td>The <a class=\"el\" href=\"window_guide.html#window_attribs\">window attribute</a> whose value to return. </td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section return\"><dt>Returns</dt><dd>The value of the attribute, or zero if an <a class=\"el\" href=\"intro_guide.html#error_handling\">error</a> occurred.</dd></dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a>, <a class=\"el\" href=\"group__errors.html#ga76f6bb9c4eea73db675f096b404593ce\">GLFW_INVALID_ENUM</a> and <a class=\"el\" href=\"group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1\">GLFW_PLATFORM_ERROR</a>.</dd></dl>\n<dl class=\"section remark\"><dt>Remarks</dt><dd>Framebuffer related hints are not window attributes. See <a class=\"el\" href=\"window_guide.html#window_attribs_fb\">Framebuffer related attributes</a> for more information.</dd>\n<dd>\nZero is a valid value for many window and context related attributes so you cannot use a return value of zero as an indication of errors. However, this function should not fail as long as it is passed valid arguments and the library has been <a class=\"el\" href=\"intro_guide.html#intro_init\">initialized</a>.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"window_guide.html#window_attribs\">Window attributes</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__window.html#gace2afda29b4116ec012e410a6819033e\">glfwSetWindowAttrib</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.0. Replaces <code>glfwGetWindowParam</code> and <code>glfwGetGLVersion</code>. </dd></dl>\n\n</div>\n</div>\n<a id=\"gace2afda29b4116ec012e410a6819033e\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gace2afda29b4116ec012e410a6819033e\">&#9670;&nbsp;</a></span>glfwSetWindowAttrib()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">void glfwSetWindowAttrib </td>\n          <td>(</td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *&#160;</td>\n          <td class=\"paramname\"><em>window</em>, </td>\n        </tr>\n        <tr>\n          <td class=\"paramkey\"></td>\n          <td></td>\n          <td class=\"paramtype\">int&#160;</td>\n          <td class=\"paramname\"><em>attrib</em>, </td>\n        </tr>\n        <tr>\n          <td class=\"paramkey\"></td>\n          <td></td>\n          <td class=\"paramtype\">int&#160;</td>\n          <td class=\"paramname\"><em>value</em>&#160;</td>\n        </tr>\n        <tr>\n          <td></td>\n          <td>)</td>\n          <td></td><td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function sets the value of an attribute of the specified window.</p>\n<p>The supported attributes are <a class=\"el\" href=\"window_guide.html#GLFW_DECORATED_attrib\">GLFW_DECORATED</a>, <a class=\"el\" href=\"window_guide.html#GLFW_RESIZABLE_attrib\">GLFW_RESIZABLE</a>, <a class=\"el\" href=\"window_guide.html#GLFW_FLOATING_attrib\">GLFW_FLOATING</a>, <a class=\"el\" href=\"window_guide.html#GLFW_AUTO_ICONIFY_attrib\">GLFW_AUTO_ICONIFY</a> and <a class=\"el\" href=\"window_guide.html#GLFW_FOCUS_ON_SHOW_attrib\">GLFW_FOCUS_ON_SHOW</a>.</p>\n<p>Some of these attributes are ignored for full screen windows. The new value will take effect if the window is later made windowed.</p>\n<p>Some of these attributes are ignored for windowed mode windows. The new value will take effect if the window is later made full screen.</p>\n<dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">window</td><td>The window to set the attribute for. </td></tr>\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">attrib</td><td>A supported window attribute. </td></tr>\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">value</td><td><code>GLFW_TRUE</code> or <code>GLFW_FALSE</code>.</td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a>, <a class=\"el\" href=\"group__errors.html#ga76f6bb9c4eea73db675f096b404593ce\">GLFW_INVALID_ENUM</a>, <a class=\"el\" href=\"group__errors.html#gaaf2ef9aa8202c2b82ac2d921e554c687\">GLFW_INVALID_VALUE</a> and <a class=\"el\" href=\"group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1\">GLFW_PLATFORM_ERROR</a>.</dd></dl>\n<dl class=\"section remark\"><dt>Remarks</dt><dd>Calling <a class=\"el\" href=\"group__window.html#gacccb29947ea4b16860ebef42c2cb9337\">glfwGetWindowAttrib</a> will always return the latest value, even if that value is ignored by the current mode of the window.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"window_guide.html#window_attribs\">Window attributes</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__window.html#gacccb29947ea4b16860ebef42c2cb9337\">glfwGetWindowAttrib</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.3. </dd></dl>\n\n</div>\n</div>\n<a id=\"ga3d2fc6026e690ab31a13f78bc9fd3651\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga3d2fc6026e690ab31a13f78bc9fd3651\">&#9670;&nbsp;</a></span>glfwSetWindowUserPointer()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">void glfwSetWindowUserPointer </td>\n          <td>(</td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *&#160;</td>\n          <td class=\"paramname\"><em>window</em>, </td>\n        </tr>\n        <tr>\n          <td class=\"paramkey\"></td>\n          <td></td>\n          <td class=\"paramtype\">void *&#160;</td>\n          <td class=\"paramname\"><em>pointer</em>&#160;</td>\n        </tr>\n        <tr>\n          <td></td>\n          <td>)</td>\n          <td></td><td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function sets the user-defined pointer of the specified window. The current value is retained until the window is destroyed. The initial value is <code>NULL</code>.</p>\n<dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">window</td><td>The window whose pointer to set. </td></tr>\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">pointer</td><td>The new value.</td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a>.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function may be called from any thread. Access is not synchronized.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"window_guide.html#window_userptr\">User pointer</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__window.html#ga17807ce0f45ac3f8bb50d6dcc59a4e06\">glfwGetWindowUserPointer</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>\n\n</div>\n</div>\n<a id=\"ga17807ce0f45ac3f8bb50d6dcc59a4e06\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga17807ce0f45ac3f8bb50d6dcc59a4e06\">&#9670;&nbsp;</a></span>glfwGetWindowUserPointer()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">void* glfwGetWindowUserPointer </td>\n          <td>(</td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *&#160;</td>\n          <td class=\"paramname\"><em>window</em></td><td>)</td>\n          <td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function returns the current value of the user-defined pointer of the specified window. The initial value is <code>NULL</code>.</p>\n<dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">window</td><td>The window whose pointer to return.</td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a>.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function may be called from any thread. Access is not synchronized.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"window_guide.html#window_userptr\">User pointer</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__window.html#ga3d2fc6026e690ab31a13f78bc9fd3651\">glfwSetWindowUserPointer</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>\n\n</div>\n</div>\n<a id=\"ga08bdfbba88934f9c4f92fd757979ac74\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga08bdfbba88934f9c4f92fd757979ac74\">&#9670;&nbsp;</a></span>glfwSetWindowPosCallback()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\"><a class=\"el\" href=\"group__window.html#gafd8db81fdb0e850549dc6bace5ed697a\">GLFWwindowposfun</a> glfwSetWindowPosCallback </td>\n          <td>(</td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *&#160;</td>\n          <td class=\"paramname\"><em>window</em>, </td>\n        </tr>\n        <tr>\n          <td class=\"paramkey\"></td>\n          <td></td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__window.html#gafd8db81fdb0e850549dc6bace5ed697a\">GLFWwindowposfun</a>&#160;</td>\n          <td class=\"paramname\"><em>callback</em>&#160;</td>\n        </tr>\n        <tr>\n          <td></td>\n          <td>)</td>\n          <td></td><td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function sets the position callback of the specified window, which is called when the window is moved. The callback is provided with the position, in screen coordinates, of the upper-left corner of the content area of the window.</p>\n<dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">window</td><td>The window whose callback to set. </td></tr>\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">callback</td><td>The new callback, or <code>NULL</code> to remove the currently set callback. </td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section return\"><dt>Returns</dt><dd>The previously set callback, or <code>NULL</code> if no callback was set or the library had not been <a class=\"el\" href=\"intro_guide.html#intro_init\">initialized</a>.</dd></dl>\n<dl class=\"section user\"><dt>Callback signature</dt><dd><div class=\"fragment\"><div class=\"line\"><span class=\"keywordtype\">void</span> function_name(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window, <span class=\"keywordtype\">int</span> xpos, <span class=\"keywordtype\">int</span> ypos)</div>\n</div><!-- fragment --> For more information about the callback parameters, see the <a class=\"el\" href=\"group__window.html#gafd8db81fdb0e850549dc6bace5ed697a\">function pointer type</a>.</dd></dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a>.</dd></dl>\n<dl class=\"section remark\"><dt>Remarks</dt><dd><b>Wayland:</b> This callback will never be called, as there is no way for an application to know its global position.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"window_guide.html#window_pos\">Window position</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>\n\n</div>\n</div>\n<a id=\"gad91b8b047a0c4c6033c38853864c34f8\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gad91b8b047a0c4c6033c38853864c34f8\">&#9670;&nbsp;</a></span>glfwSetWindowSizeCallback()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\"><a class=\"el\" href=\"group__window.html#gae49ee6ebc03fa2da024b89943a331355\">GLFWwindowsizefun</a> glfwSetWindowSizeCallback </td>\n          <td>(</td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *&#160;</td>\n          <td class=\"paramname\"><em>window</em>, </td>\n        </tr>\n        <tr>\n          <td class=\"paramkey\"></td>\n          <td></td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__window.html#gae49ee6ebc03fa2da024b89943a331355\">GLFWwindowsizefun</a>&#160;</td>\n          <td class=\"paramname\"><em>callback</em>&#160;</td>\n        </tr>\n        <tr>\n          <td></td>\n          <td>)</td>\n          <td></td><td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function sets the size callback of the specified window, which is called when the window is resized. The callback is provided with the size, in screen coordinates, of the content area of the window.</p>\n<dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">window</td><td>The window whose callback to set. </td></tr>\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">callback</td><td>The new callback, or <code>NULL</code> to remove the currently set callback. </td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section return\"><dt>Returns</dt><dd>The previously set callback, or <code>NULL</code> if no callback was set or the library had not been <a class=\"el\" href=\"intro_guide.html#intro_init\">initialized</a>.</dd></dl>\n<dl class=\"section user\"><dt>Callback signature</dt><dd><div class=\"fragment\"><div class=\"line\"><span class=\"keywordtype\">void</span> function_name(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window, <span class=\"keywordtype\">int</span> width, <span class=\"keywordtype\">int</span> height)</div>\n</div><!-- fragment --> For more information about the callback parameters, see the <a class=\"el\" href=\"group__window.html#gae49ee6ebc03fa2da024b89943a331355\">function pointer type</a>.</dd></dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a>.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"window_guide.html#window_size\">Window size</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 1.0. <b>GLFW 3:</b> Added window handle parameter and return value. </dd></dl>\n\n</div>\n</div>\n<a id=\"gada646d775a7776a95ac000cfc1885331\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gada646d775a7776a95ac000cfc1885331\">&#9670;&nbsp;</a></span>glfwSetWindowCloseCallback()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\"><a class=\"el\" href=\"group__window.html#ga93e7c2555bd837f4ed8b20f76cada72e\">GLFWwindowclosefun</a> glfwSetWindowCloseCallback </td>\n          <td>(</td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *&#160;</td>\n          <td class=\"paramname\"><em>window</em>, </td>\n        </tr>\n        <tr>\n          <td class=\"paramkey\"></td>\n          <td></td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__window.html#ga93e7c2555bd837f4ed8b20f76cada72e\">GLFWwindowclosefun</a>&#160;</td>\n          <td class=\"paramname\"><em>callback</em>&#160;</td>\n        </tr>\n        <tr>\n          <td></td>\n          <td>)</td>\n          <td></td><td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function sets the close callback of the specified window, which is called when the user attempts to close the window, for example by clicking the close widget in the title bar.</p>\n<p>The close flag is set before this callback is called, but you can modify it at any time with <a class=\"el\" href=\"group__window.html#ga49c449dde2a6f87d996f4daaa09d6708\">glfwSetWindowShouldClose</a>.</p>\n<p>The close callback is not triggered by <a class=\"el\" href=\"group__window.html#gacdf43e51376051d2c091662e9fe3d7b2\">glfwDestroyWindow</a>.</p>\n<dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">window</td><td>The window whose callback to set. </td></tr>\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">callback</td><td>The new callback, or <code>NULL</code> to remove the currently set callback. </td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section return\"><dt>Returns</dt><dd>The previously set callback, or <code>NULL</code> if no callback was set or the library had not been <a class=\"el\" href=\"intro_guide.html#intro_init\">initialized</a>.</dd></dl>\n<dl class=\"section user\"><dt>Callback signature</dt><dd><div class=\"fragment\"><div class=\"line\"><span class=\"keywordtype\">void</span> function_name(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window)</div>\n</div><!-- fragment --> For more information about the callback parameters, see the <a class=\"el\" href=\"group__window.html#ga93e7c2555bd837f4ed8b20f76cada72e\">function pointer type</a>.</dd></dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a>.</dd></dl>\n<dl class=\"section remark\"><dt>Remarks</dt><dd><b>macOS:</b> Selecting Quit from the application menu will trigger the close callback for all windows.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"window_guide.html#window_close\">Window closing and close flag</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 2.5. <b>GLFW 3:</b> Added window handle parameter and return value. </dd></dl>\n\n</div>\n</div>\n<a id=\"ga1c5c7eb889c33c7f4d10dd35b327654e\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga1c5c7eb889c33c7f4d10dd35b327654e\">&#9670;&nbsp;</a></span>glfwSetWindowRefreshCallback()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\"><a class=\"el\" href=\"group__window.html#ga7a56f9e0227e2cd9470d80d919032e08\">GLFWwindowrefreshfun</a> glfwSetWindowRefreshCallback </td>\n          <td>(</td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *&#160;</td>\n          <td class=\"paramname\"><em>window</em>, </td>\n        </tr>\n        <tr>\n          <td class=\"paramkey\"></td>\n          <td></td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__window.html#ga7a56f9e0227e2cd9470d80d919032e08\">GLFWwindowrefreshfun</a>&#160;</td>\n          <td class=\"paramname\"><em>callback</em>&#160;</td>\n        </tr>\n        <tr>\n          <td></td>\n          <td>)</td>\n          <td></td><td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function sets the refresh callback of the specified window, which is called when the content area of the window needs to be redrawn, for example if the window has been exposed after having been covered by another window.</p>\n<p>On compositing window systems such as Aero, Compiz, Aqua or Wayland, where the window contents are saved off-screen, this callback may be called only very infrequently or never at all.</p>\n<dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">window</td><td>The window whose callback to set. </td></tr>\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">callback</td><td>The new callback, or <code>NULL</code> to remove the currently set callback. </td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section return\"><dt>Returns</dt><dd>The previously set callback, or <code>NULL</code> if no callback was set or the library had not been <a class=\"el\" href=\"intro_guide.html#intro_init\">initialized</a>.</dd></dl>\n<dl class=\"section user\"><dt>Callback signature</dt><dd><div class=\"fragment\"><div class=\"line\"><span class=\"keywordtype\">void</span> function_name(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window);</div>\n</div><!-- fragment --> For more information about the callback parameters, see the <a class=\"el\" href=\"group__window.html#ga7a56f9e0227e2cd9470d80d919032e08\">function pointer type</a>.</dd></dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a>.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"window_guide.html#window_refresh\">Window damage and refresh</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 2.5. <b>GLFW 3:</b> Added window handle parameter and return value. </dd></dl>\n\n</div>\n</div>\n<a id=\"gac2d83c4a10f071baf841f6730528e66c\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gac2d83c4a10f071baf841f6730528e66c\">&#9670;&nbsp;</a></span>glfwSetWindowFocusCallback()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\"><a class=\"el\" href=\"group__window.html#ga58be2061828dd35080bb438405d3a7e2\">GLFWwindowfocusfun</a> glfwSetWindowFocusCallback </td>\n          <td>(</td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *&#160;</td>\n          <td class=\"paramname\"><em>window</em>, </td>\n        </tr>\n        <tr>\n          <td class=\"paramkey\"></td>\n          <td></td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__window.html#ga58be2061828dd35080bb438405d3a7e2\">GLFWwindowfocusfun</a>&#160;</td>\n          <td class=\"paramname\"><em>callback</em>&#160;</td>\n        </tr>\n        <tr>\n          <td></td>\n          <td>)</td>\n          <td></td><td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function sets the focus callback of the specified window, which is called when the window gains or loses input focus.</p>\n<p>After the focus callback is called for a window that lost input focus, synthetic key and mouse button release events will be generated for all such that had been pressed. For more information, see <a class=\"el\" href=\"group__input.html#ga1caf18159767e761185e49a3be019f8d\">glfwSetKeyCallback</a> and <a class=\"el\" href=\"group__input.html#ga6ab84420974d812bee700e45284a723c\">glfwSetMouseButtonCallback</a>.</p>\n<dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">window</td><td>The window whose callback to set. </td></tr>\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">callback</td><td>The new callback, or <code>NULL</code> to remove the currently set callback. </td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section return\"><dt>Returns</dt><dd>The previously set callback, or <code>NULL</code> if no callback was set or the library had not been <a class=\"el\" href=\"intro_guide.html#intro_init\">initialized</a>.</dd></dl>\n<dl class=\"section user\"><dt>Callback signature</dt><dd><div class=\"fragment\"><div class=\"line\"><span class=\"keywordtype\">void</span> function_name(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window, <span class=\"keywordtype\">int</span> focused)</div>\n</div><!-- fragment --> For more information about the callback parameters, see the <a class=\"el\" href=\"group__window.html#ga58be2061828dd35080bb438405d3a7e2\">function pointer type</a>.</dd></dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a>.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"window_guide.html#window_focus\">Window input focus</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>\n\n</div>\n</div>\n<a id=\"gac793e9efd255567b5fb8b445052cfd3e\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gac793e9efd255567b5fb8b445052cfd3e\">&#9670;&nbsp;</a></span>glfwSetWindowIconifyCallback()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\"><a class=\"el\" href=\"group__window.html#gad2d4e4c3d28b1242e742e8268b9528af\">GLFWwindowiconifyfun</a> glfwSetWindowIconifyCallback </td>\n          <td>(</td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *&#160;</td>\n          <td class=\"paramname\"><em>window</em>, </td>\n        </tr>\n        <tr>\n          <td class=\"paramkey\"></td>\n          <td></td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__window.html#gad2d4e4c3d28b1242e742e8268b9528af\">GLFWwindowiconifyfun</a>&#160;</td>\n          <td class=\"paramname\"><em>callback</em>&#160;</td>\n        </tr>\n        <tr>\n          <td></td>\n          <td>)</td>\n          <td></td><td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function sets the iconification callback of the specified window, which is called when the window is iconified or restored.</p>\n<dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">window</td><td>The window whose callback to set. </td></tr>\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">callback</td><td>The new callback, or <code>NULL</code> to remove the currently set callback. </td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section return\"><dt>Returns</dt><dd>The previously set callback, or <code>NULL</code> if no callback was set or the library had not been <a class=\"el\" href=\"intro_guide.html#intro_init\">initialized</a>.</dd></dl>\n<dl class=\"section user\"><dt>Callback signature</dt><dd><div class=\"fragment\"><div class=\"line\"><span class=\"keywordtype\">void</span> function_name(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window, <span class=\"keywordtype\">int</span> iconified)</div>\n</div><!-- fragment --> For more information about the callback parameters, see the <a class=\"el\" href=\"group__window.html#gad2d4e4c3d28b1242e742e8268b9528af\">function pointer type</a>.</dd></dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a>.</dd></dl>\n<dl class=\"section remark\"><dt>Remarks</dt><dd><b>Wayland:</b> The wl_shell protocol has no concept of iconification, this callback will never be called when using this deprecated protocol.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"window_guide.html#window_iconify\">Window iconification</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>\n\n</div>\n</div>\n<a id=\"gacbe64c339fbd94885e62145563b6dc93\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gacbe64c339fbd94885e62145563b6dc93\">&#9670;&nbsp;</a></span>glfwSetWindowMaximizeCallback()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\"><a class=\"el\" href=\"group__window.html#ga7269a3d1cb100c0081f95fc09afa4949\">GLFWwindowmaximizefun</a> glfwSetWindowMaximizeCallback </td>\n          <td>(</td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *&#160;</td>\n          <td class=\"paramname\"><em>window</em>, </td>\n        </tr>\n        <tr>\n          <td class=\"paramkey\"></td>\n          <td></td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__window.html#ga7269a3d1cb100c0081f95fc09afa4949\">GLFWwindowmaximizefun</a>&#160;</td>\n          <td class=\"paramname\"><em>callback</em>&#160;</td>\n        </tr>\n        <tr>\n          <td></td>\n          <td>)</td>\n          <td></td><td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function sets the maximization callback of the specified window, which is called when the window is maximized or restored.</p>\n<dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">window</td><td>The window whose callback to set. </td></tr>\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">callback</td><td>The new callback, or <code>NULL</code> to remove the currently set callback. </td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section return\"><dt>Returns</dt><dd>The previously set callback, or <code>NULL</code> if no callback was set or the library had not been <a class=\"el\" href=\"intro_guide.html#intro_init\">initialized</a>.</dd></dl>\n<dl class=\"section user\"><dt>Callback signature</dt><dd><div class=\"fragment\"><div class=\"line\"><span class=\"keywordtype\">void</span> function_name(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window, <span class=\"keywordtype\">int</span> maximized)</div>\n</div><!-- fragment --> For more information about the callback parameters, see the <a class=\"el\" href=\"group__window.html#ga7269a3d1cb100c0081f95fc09afa4949\">function pointer type</a>.</dd></dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a>.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"window_guide.html#window_maximize\">Window maximization</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.3. </dd></dl>\n\n</div>\n</div>\n<a id=\"gab3fb7c3366577daef18c0023e2a8591f\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gab3fb7c3366577daef18c0023e2a8591f\">&#9670;&nbsp;</a></span>glfwSetFramebufferSizeCallback()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\"><a class=\"el\" href=\"group__window.html#ga3e218ef9ff826129c55a7d5f6971a285\">GLFWframebuffersizefun</a> glfwSetFramebufferSizeCallback </td>\n          <td>(</td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *&#160;</td>\n          <td class=\"paramname\"><em>window</em>, </td>\n        </tr>\n        <tr>\n          <td class=\"paramkey\"></td>\n          <td></td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__window.html#ga3e218ef9ff826129c55a7d5f6971a285\">GLFWframebuffersizefun</a>&#160;</td>\n          <td class=\"paramname\"><em>callback</em>&#160;</td>\n        </tr>\n        <tr>\n          <td></td>\n          <td>)</td>\n          <td></td><td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function sets the framebuffer resize callback of the specified window, which is called when the framebuffer of the specified window is resized.</p>\n<dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">window</td><td>The window whose callback to set. </td></tr>\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">callback</td><td>The new callback, or <code>NULL</code> to remove the currently set callback. </td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section return\"><dt>Returns</dt><dd>The previously set callback, or <code>NULL</code> if no callback was set or the library had not been <a class=\"el\" href=\"intro_guide.html#intro_init\">initialized</a>.</dd></dl>\n<dl class=\"section user\"><dt>Callback signature</dt><dd><div class=\"fragment\"><div class=\"line\"><span class=\"keywordtype\">void</span> function_name(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window, <span class=\"keywordtype\">int</span> width, <span class=\"keywordtype\">int</span> height)</div>\n</div><!-- fragment --> For more information about the callback parameters, see the <a class=\"el\" href=\"group__window.html#ga3e218ef9ff826129c55a7d5f6971a285\">function pointer type</a>.</dd></dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a>.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"window_guide.html#window_fbsize\">Framebuffer size</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>\n\n</div>\n</div>\n<a id=\"gaf2832ebb5aa6c252a2d261de002c92d6\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gaf2832ebb5aa6c252a2d261de002c92d6\">&#9670;&nbsp;</a></span>glfwSetWindowContentScaleCallback()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\"><a class=\"el\" href=\"group__window.html#ga1da46b65eafcc1a7ff0adb8f4a7b72fd\">GLFWwindowcontentscalefun</a> glfwSetWindowContentScaleCallback </td>\n          <td>(</td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *&#160;</td>\n          <td class=\"paramname\"><em>window</em>, </td>\n        </tr>\n        <tr>\n          <td class=\"paramkey\"></td>\n          <td></td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__window.html#ga1da46b65eafcc1a7ff0adb8f4a7b72fd\">GLFWwindowcontentscalefun</a>&#160;</td>\n          <td class=\"paramname\"><em>callback</em>&#160;</td>\n        </tr>\n        <tr>\n          <td></td>\n          <td>)</td>\n          <td></td><td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function sets the window content scale callback of the specified window, which is called when the content scale of the specified window changes.</p>\n<dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">window</td><td>The window whose callback to set. </td></tr>\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">callback</td><td>The new callback, or <code>NULL</code> to remove the currently set callback. </td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section return\"><dt>Returns</dt><dd>The previously set callback, or <code>NULL</code> if no callback was set or the library had not been <a class=\"el\" href=\"intro_guide.html#intro_init\">initialized</a>.</dd></dl>\n<dl class=\"section user\"><dt>Callback signature</dt><dd><div class=\"fragment\"><div class=\"line\"><span class=\"keywordtype\">void</span> function_name(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window, <span class=\"keywordtype\">float</span> xscale, <span class=\"keywordtype\">float</span> yscale)</div>\n</div><!-- fragment --> For more information about the callback parameters, see the <a class=\"el\" href=\"group__window.html#ga1da46b65eafcc1a7ff0adb8f4a7b72fd\">function pointer type</a>.</dd></dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a>.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"window_guide.html#window_scale\">Window content scale</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__window.html#gaf5d31de9c19c4f994facea64d2b3106c\">glfwGetWindowContentScale</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.3. </dd></dl>\n\n</div>\n</div>\n<a id=\"ga37bd57223967b4211d60ca1a0bf3c832\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga37bd57223967b4211d60ca1a0bf3c832\">&#9670;&nbsp;</a></span>glfwPollEvents()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">void glfwPollEvents </td>\n          <td>(</td>\n          <td class=\"paramtype\">void&#160;</td>\n          <td class=\"paramname\"></td><td>)</td>\n          <td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function processes only those events that are already in the event queue and then returns immediately. Processing events will cause the window and input callbacks associated with those events to be called.</p>\n<p>On some platforms, a window move, resize or menu operation will cause event processing to block. This is due to how event processing is designed on those platforms. You can use the <a class=\"el\" href=\"window_guide.html#window_refresh\">window refresh callback</a> to redraw the contents of your window when necessary during such operations.</p>\n<p>Do not assume that callbacks you set will <em>only</em> be called in response to event processing functions like this one. While it is necessary to poll for events, window systems that require GLFW to register callbacks of its own can pass events to GLFW in response to many window system function calls. GLFW will pass those events on to the application callbacks before returning.</p>\n<p>Event processing is not required for joystick input to work.</p>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a> and <a class=\"el\" href=\"group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1\">GLFW_PLATFORM_ERROR</a>.</dd></dl>\n<dl class=\"section user\"><dt>Reentrancy</dt><dd>This function must not be called from a callback.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"input_guide.html#events\">Event processing</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__window.html#ga554e37d781f0a997656c26b2c56c835e\">glfwWaitEvents</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__window.html#ga605a178db92f1a7f1a925563ef3ea2cf\">glfwWaitEventsTimeout</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 1.0. </dd></dl>\n\n</div>\n</div>\n<a id=\"ga554e37d781f0a997656c26b2c56c835e\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga554e37d781f0a997656c26b2c56c835e\">&#9670;&nbsp;</a></span>glfwWaitEvents()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">void glfwWaitEvents </td>\n          <td>(</td>\n          <td class=\"paramtype\">void&#160;</td>\n          <td class=\"paramname\"></td><td>)</td>\n          <td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function puts the calling thread to sleep until at least one event is available in the event queue. Once one or more events are available, it behaves exactly like <a class=\"el\" href=\"group__window.html#ga37bd57223967b4211d60ca1a0bf3c832\">glfwPollEvents</a>, i.e. the events in the queue are processed and the function then returns immediately. Processing events will cause the window and input callbacks associated with those events to be called.</p>\n<p>Since not all events are associated with callbacks, this function may return without a callback having been called even if you are monitoring all callbacks.</p>\n<p>On some platforms, a window move, resize or menu operation will cause event processing to block. This is due to how event processing is designed on those platforms. You can use the <a class=\"el\" href=\"window_guide.html#window_refresh\">window refresh callback</a> to redraw the contents of your window when necessary during such operations.</p>\n<p>Do not assume that callbacks you set will <em>only</em> be called in response to event processing functions like this one. While it is necessary to poll for events, window systems that require GLFW to register callbacks of its own can pass events to GLFW in response to many window system function calls. GLFW will pass those events on to the application callbacks before returning.</p>\n<p>Event processing is not required for joystick input to work.</p>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a> and <a class=\"el\" href=\"group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1\">GLFW_PLATFORM_ERROR</a>.</dd></dl>\n<dl class=\"section user\"><dt>Reentrancy</dt><dd>This function must not be called from a callback.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"input_guide.html#events\">Event processing</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__window.html#ga37bd57223967b4211d60ca1a0bf3c832\">glfwPollEvents</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__window.html#ga605a178db92f1a7f1a925563ef3ea2cf\">glfwWaitEventsTimeout</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 2.5. </dd></dl>\n\n</div>\n</div>\n<a id=\"ga605a178db92f1a7f1a925563ef3ea2cf\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga605a178db92f1a7f1a925563ef3ea2cf\">&#9670;&nbsp;</a></span>glfwWaitEventsTimeout()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">void glfwWaitEventsTimeout </td>\n          <td>(</td>\n          <td class=\"paramtype\">double&#160;</td>\n          <td class=\"paramname\"><em>timeout</em></td><td>)</td>\n          <td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function puts the calling thread to sleep until at least one event is available in the event queue, or until the specified timeout is reached. If one or more events are available, it behaves exactly like <a class=\"el\" href=\"group__window.html#ga37bd57223967b4211d60ca1a0bf3c832\">glfwPollEvents</a>, i.e. the events in the queue are processed and the function then returns immediately. Processing events will cause the window and input callbacks associated with those events to be called.</p>\n<p>The timeout value must be a positive finite number.</p>\n<p>Since not all events are associated with callbacks, this function may return without a callback having been called even if you are monitoring all callbacks.</p>\n<p>On some platforms, a window move, resize or menu operation will cause event processing to block. This is due to how event processing is designed on those platforms. You can use the <a class=\"el\" href=\"window_guide.html#window_refresh\">window refresh callback</a> to redraw the contents of your window when necessary during such operations.</p>\n<p>Do not assume that callbacks you set will <em>only</em> be called in response to event processing functions like this one. While it is necessary to poll for events, window systems that require GLFW to register callbacks of its own can pass events to GLFW in response to many window system function calls. GLFW will pass those events on to the application callbacks before returning.</p>\n<p>Event processing is not required for joystick input to work.</p>\n<dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">timeout</td><td>The maximum amount of time, in seconds, to wait.</td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a>, <a class=\"el\" href=\"group__errors.html#gaaf2ef9aa8202c2b82ac2d921e554c687\">GLFW_INVALID_VALUE</a> and <a class=\"el\" href=\"group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1\">GLFW_PLATFORM_ERROR</a>.</dd></dl>\n<dl class=\"section user\"><dt>Reentrancy</dt><dd>This function must not be called from a callback.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"input_guide.html#events\">Event processing</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__window.html#ga37bd57223967b4211d60ca1a0bf3c832\">glfwPollEvents</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__window.html#ga554e37d781f0a997656c26b2c56c835e\">glfwWaitEvents</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.2. </dd></dl>\n\n</div>\n</div>\n<a id=\"gab5997a25187e9fd5c6f2ecbbc8dfd7e9\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#gab5997a25187e9fd5c6f2ecbbc8dfd7e9\">&#9670;&nbsp;</a></span>glfwPostEmptyEvent()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">void glfwPostEmptyEvent </td>\n          <td>(</td>\n          <td class=\"paramtype\">void&#160;</td>\n          <td class=\"paramname\"></td><td>)</td>\n          <td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function posts an empty event from the current thread to the event queue, causing <a class=\"el\" href=\"group__window.html#ga554e37d781f0a997656c26b2c56c835e\">glfwWaitEvents</a> or <a class=\"el\" href=\"group__window.html#ga605a178db92f1a7f1a925563ef3ea2cf\">glfwWaitEventsTimeout</a> to return.</p>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a> and <a class=\"el\" href=\"group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1\">GLFW_PLATFORM_ERROR</a>.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function may be called from any thread.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"input_guide.html#events\">Event processing</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__window.html#ga554e37d781f0a997656c26b2c56c835e\">glfwWaitEvents</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__window.html#ga605a178db92f1a7f1a925563ef3ea2cf\">glfwWaitEventsTimeout</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.1. </dd></dl>\n\n</div>\n</div>\n<a id=\"ga15a5a1ee5b3c2ca6b15ca209a12efd14\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ga15a5a1ee5b3c2ca6b15ca209a12efd14\">&#9670;&nbsp;</a></span>glfwSwapBuffers()</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">void glfwSwapBuffers </td>\n          <td>(</td>\n          <td class=\"paramtype\"><a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> *&#160;</td>\n          <td class=\"paramname\"><em>window</em></td><td>)</td>\n          <td></td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>This function swaps the front and back buffers of the specified window when rendering with OpenGL or OpenGL ES. If the swap interval is greater than zero, the GPU driver waits the specified number of screen updates before swapping the buffers.</p>\n<p>The specified window must have an OpenGL or OpenGL ES context. Specifying a window without a context will generate a <a class=\"el\" href=\"group__errors.html#gacff24d2757da752ae4c80bf452356487\">GLFW_NO_WINDOW_CONTEXT</a> error.</p>\n<p>This function does not apply to Vulkan. If you are rendering with Vulkan, see <code>vkQueuePresentKHR</code> instead.</p>\n<dl class=\"params\"><dt>Parameters</dt><dd>\n  <table class=\"params\">\n    <tr><td class=\"paramdir\">[in]</td><td class=\"paramname\">window</td><td>The window whose buffers to swap.</td></tr>\n  </table>\n  </dd>\n</dl>\n<dl class=\"section user\"><dt>Errors</dt><dd>Possible errors include <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a>, <a class=\"el\" href=\"group__errors.html#gacff24d2757da752ae4c80bf452356487\">GLFW_NO_WINDOW_CONTEXT</a> and <a class=\"el\" href=\"group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1\">GLFW_PLATFORM_ERROR</a>.</dd></dl>\n<dl class=\"section remark\"><dt>Remarks</dt><dd><b>EGL:</b> The context of the specified window must be current on the calling thread.</dd></dl>\n<dl class=\"section user\"><dt>Thread safety</dt><dd>This function may be called from any thread.</dd></dl>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"window_guide.html#buffer_swap\">Buffer swapping</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__context.html#ga6d4e0cdf151b5e579bd67f13202994ed\">glfwSwapInterval</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 1.0. <b>GLFW 3:</b> Added window handle parameter. </dd></dl>\n\n</div>\n</div>\n</div><!-- contents -->\n<div class=\"ttc\" id=\"agroup__window_html_ga3c96d80d363e67d13a41b5d1821f3242\"><div class=\"ttname\"><a href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a></div><div class=\"ttdeci\">struct GLFWwindow GLFWwindow</div><div class=\"ttdoc\">Opaque window object.</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:1152</div></div>\n<address class=\"footer\">\n<p>\nLast update on Mon Jan 20 2020 for GLFW 3.3.2\n</p>\n</address>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/index.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta http-equiv=\"X-UA-Compatible\" content=\"IE=9\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<title>GLFW: Main Page</title>\n<link href=\"tabs.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"jquery.js\"></script>\n<script type=\"text/javascript\" src=\"dynsections.js\"></script>\n<link href=\"search/search.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"search/searchdata.js\"></script>\n<script type=\"text/javascript\" src=\"search/search.js\"></script>\n<link href=\"doxygen.css\" rel=\"stylesheet\" type=\"text/css\" />\n<link href=\"extra.css\" rel=\"stylesheet\" type=\"text/css\"/>\n</head>\n<body>\n<div id=\"top\"><!-- do not remove this div, it is closed by doxygen! -->\n<div id=\"titlearea\">\n\t<div class=\"glfwheader\">\n\t\t<a href=\"https://www.glfw.org/\" id=\"glfwhome\">GLFW</a>\n\t\t<ul class=\"glfwnavbar\">\n\t\t\t<li><a href=\"https://www.glfw.org/documentation.html\">Documentation</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/download.html\">Download</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/community.html\">Community</a></li>\n\t\t</ul>\n\t</div>\n</div>\n<!-- end header part -->\n<!-- Generated by Doxygen 1.8.16 -->\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\nvar searchBox = new SearchBox(\"searchBox\", \"search\",false,'Search');\n/* @license-end */\n</script>\n<script type=\"text/javascript\" src=\"menudata.js\"></script>\n<script type=\"text/javascript\" src=\"menu.js\"></script>\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\n$(function() {\n  initMenu('',true,false,'search.php','Search');\n  $(document).ready(function() { init_search(); });\n});\n/* @license-end */</script>\n<div id=\"main-nav\"></div>\n</div><!-- top -->\n<!-- window showing the filter options -->\n<div id=\"MSearchSelectWindow\"\n     onmouseover=\"return searchBox.OnSearchSelectShow()\"\n     onmouseout=\"return searchBox.OnSearchSelectHide()\"\n     onkeydown=\"return searchBox.OnSearchSelectKey(event)\">\n</div>\n\n<!-- iframe showing the search results (closed by default) -->\n<div id=\"MSearchResultsWindow\">\n<iframe src=\"javascript:void(0)\" frameborder=\"0\" \n        name=\"MSearchResults\" id=\"MSearchResults\">\n</iframe>\n</div>\n\n<div class=\"PageDoc\"><div class=\"contents\">\n<div class=\"textblock\"><h1><a class=\"anchor\" id=\"main_intro\"></a>\nIntroduction</h1>\n<p>GLFW is a free, Open Source, multi-platform library for OpenGL, OpenGL ES and Vulkan application development. It provides a simple, platform-independent API for creating windows, contexts and surfaces, reading input, handling events, etc.</p>\n<p><a class=\"el\" href=\"news.html#news_33\">Release notes for version 3.3</a> list new features, caveats and deprecations.</p>\n<p><a class=\"el\" href=\"quick_guide.html\">Getting started</a> is a guide for users new to GLFW. It takes you through how to write a small but complete program.</p>\n<p>There are guides for each section of the API:</p>\n<ul>\n<li><a class=\"el\" href=\"intro_guide.html\">Introduction to the API</a> – initialization, error handling and high-level design</li>\n<li><a class=\"el\" href=\"window_guide.html\">Window guide</a> – creating and working with windows and framebuffers</li>\n<li><a class=\"el\" href=\"context_guide.html\">Context guide</a> – working with OpenGL and OpenGL ES contexts</li>\n<li><a class=\"el\" href=\"vulkan_guide.html\">Vulkan guide</a> - working with Vulkan objects and extensions</li>\n<li><a class=\"el\" href=\"monitor_guide.html\">Monitor guide</a> – enumerating and working with monitors and video modes</li>\n<li><a class=\"el\" href=\"input_guide.html\">Input guide</a> – receiving events, polling and processing input</li>\n</ul>\n<p>Once you have written a program, see <a class=\"el\" href=\"compile_guide.html\">Compiling GLFW</a> and <a class=\"el\" href=\"build_guide.html\">Building applications</a>.</p>\n<p>The <a href=\"modules.html\">reference documentation</a> provides more detailed information about specific functions.</p>\n<p><a class=\"el\" href=\"moving_guide.html\">Moving from GLFW 2 to 3</a> explains what has changed and how to update existing code to use the new API.</p>\n<p>There is a section on <a class=\"el\" href=\"intro_guide.html#guarantees_limitations\">Guarantees and limitations</a> for pointer lifetimes, reentrancy, thread safety, event order and backward and forward compatibility.</p>\n<p>The <a href=\"https://www.glfw.org/faq.html\">FAQ</a> answers many common questions about the design, implementation and use of GLFW.</p>\n<p>Finally, <a class=\"el\" href=\"compat_guide.html\">Standards conformance</a> explains what APIs, standards and protocols GLFW uses and what happens when they are not present on a given machine.</p>\n<p>This documentation was generated with Doxygen. The sources for it are available in both the <a href=\"https://www.glfw.org/download.html\">source distribution</a> and <a href=\"https://github.com/glfw/glfw\">GitHub repository</a>. </p>\n</div></div><!-- PageDoc -->\n</div><!-- contents -->\n<address class=\"footer\">\n<p>\nLast update on Mon Jan 20 2020 for GLFW 3.3.2\n</p>\n</address>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/input_8dox.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta http-equiv=\"X-UA-Compatible\" content=\"IE=9\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<title>GLFW: input.dox File Reference</title>\n<link href=\"tabs.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"jquery.js\"></script>\n<script type=\"text/javascript\" src=\"dynsections.js\"></script>\n<link href=\"search/search.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"search/searchdata.js\"></script>\n<script type=\"text/javascript\" src=\"search/search.js\"></script>\n<link href=\"doxygen.css\" rel=\"stylesheet\" type=\"text/css\" />\n<link href=\"extra.css\" rel=\"stylesheet\" type=\"text/css\"/>\n</head>\n<body>\n<div id=\"top\"><!-- do not remove this div, it is closed by doxygen! -->\n<div id=\"titlearea\">\n\t<div class=\"glfwheader\">\n\t\t<a href=\"https://www.glfw.org/\" id=\"glfwhome\">GLFW</a>\n\t\t<ul class=\"glfwnavbar\">\n\t\t\t<li><a href=\"https://www.glfw.org/documentation.html\">Documentation</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/download.html\">Download</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/community.html\">Community</a></li>\n\t\t</ul>\n\t</div>\n</div>\n<!-- end header part -->\n<!-- Generated by Doxygen 1.8.16 -->\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\nvar searchBox = new SearchBox(\"searchBox\", \"search\",false,'Search');\n/* @license-end */\n</script>\n<script type=\"text/javascript\" src=\"menudata.js\"></script>\n<script type=\"text/javascript\" src=\"menu.js\"></script>\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\n$(function() {\n  initMenu('',true,false,'search.php','Search');\n  $(document).ready(function() { init_search(); });\n});\n/* @license-end */</script>\n<div id=\"main-nav\"></div>\n<!-- window showing the filter options -->\n<div id=\"MSearchSelectWindow\"\n     onmouseover=\"return searchBox.OnSearchSelectShow()\"\n     onmouseout=\"return searchBox.OnSearchSelectHide()\"\n     onkeydown=\"return searchBox.OnSearchSelectKey(event)\">\n</div>\n\n<!-- iframe showing the search results (closed by default) -->\n<div id=\"MSearchResultsWindow\">\n<iframe src=\"javascript:void(0)\" frameborder=\"0\" \n        name=\"MSearchResults\" id=\"MSearchResults\">\n</iframe>\n</div>\n\n</div><!-- top -->\n<div class=\"header\">\n  <div class=\"headertitle\">\n<div class=\"title\">input.dox File Reference</div>  </div>\n</div><!--header-->\n<div class=\"contents\">\n</div><!-- contents -->\n<address class=\"footer\">\n<p>\nLast update on Mon Jan 20 2020 for GLFW 3.3.2\n</p>\n</address>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/input_guide.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta http-equiv=\"X-UA-Compatible\" content=\"IE=9\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<title>GLFW: Input guide</title>\n<link href=\"tabs.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"jquery.js\"></script>\n<script type=\"text/javascript\" src=\"dynsections.js\"></script>\n<link href=\"search/search.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"search/searchdata.js\"></script>\n<script type=\"text/javascript\" src=\"search/search.js\"></script>\n<link href=\"doxygen.css\" rel=\"stylesheet\" type=\"text/css\" />\n<link href=\"extra.css\" rel=\"stylesheet\" type=\"text/css\"/>\n</head>\n<body>\n<div id=\"top\"><!-- do not remove this div, it is closed by doxygen! -->\n<div id=\"titlearea\">\n\t<div class=\"glfwheader\">\n\t\t<a href=\"https://www.glfw.org/\" id=\"glfwhome\">GLFW</a>\n\t\t<ul class=\"glfwnavbar\">\n\t\t\t<li><a href=\"https://www.glfw.org/documentation.html\">Documentation</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/download.html\">Download</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/community.html\">Community</a></li>\n\t\t</ul>\n\t</div>\n</div>\n<!-- end header part -->\n<!-- Generated by Doxygen 1.8.16 -->\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\nvar searchBox = new SearchBox(\"searchBox\", \"search\",false,'Search');\n/* @license-end */\n</script>\n<script type=\"text/javascript\" src=\"menudata.js\"></script>\n<script type=\"text/javascript\" src=\"menu.js\"></script>\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\n$(function() {\n  initMenu('',true,false,'search.php','Search');\n  $(document).ready(function() { init_search(); });\n});\n/* @license-end */</script>\n<div id=\"main-nav\"></div>\n<!-- window showing the filter options -->\n<div id=\"MSearchSelectWindow\"\n     onmouseover=\"return searchBox.OnSearchSelectShow()\"\n     onmouseout=\"return searchBox.OnSearchSelectHide()\"\n     onkeydown=\"return searchBox.OnSearchSelectKey(event)\">\n</div>\n\n<!-- iframe showing the search results (closed by default) -->\n<div id=\"MSearchResultsWindow\">\n<iframe src=\"javascript:void(0)\" frameborder=\"0\" \n        name=\"MSearchResults\" id=\"MSearchResults\">\n</iframe>\n</div>\n\n</div><!-- top -->\n<div class=\"PageDoc\"><div class=\"header\">\n  <div class=\"headertitle\">\n<div class=\"title\">Input guide </div>  </div>\n</div><!--header-->\n<div class=\"contents\">\n<div class=\"toc\"><h3>Table of Contents</h3>\n<ul><li class=\"level1\"><a href=\"#events\">Event processing</a></li>\n<li class=\"level1\"><a href=\"#input_keyboard\">Keyboard input</a><ul><li class=\"level2\"><a href=\"#input_key\">Key input</a></li>\n<li class=\"level2\"><a href=\"#input_char\">Text input</a></li>\n<li class=\"level2\"><a href=\"#input_key_name\">Key names</a></li>\n</ul>\n</li>\n<li class=\"level1\"><a href=\"#input_mouse\">Mouse input</a><ul><li class=\"level2\"><a href=\"#cursor_pos\">Cursor position</a></li>\n<li class=\"level2\"><a href=\"#cursor_mode\">Cursor mode</a></li>\n<li class=\"level2\"><a href=\"#raw_mouse_motion\">Raw mouse motion</a></li>\n<li class=\"level2\"><a href=\"#cursor_object\">Cursor objects</a><ul><li class=\"level3\"><a href=\"#cursor_custom\">Custom cursor creation</a></li>\n<li class=\"level3\"><a href=\"#cursor_standard\">Standard cursor creation</a></li>\n<li class=\"level3\"><a href=\"#cursor_destruction\">Cursor destruction</a></li>\n<li class=\"level3\"><a href=\"#cursor_set\">Cursor setting</a></li>\n</ul>\n</li>\n<li class=\"level2\"><a href=\"#cursor_enter\">Cursor enter/leave events</a></li>\n<li class=\"level2\"><a href=\"#input_mouse_button\">Mouse button input</a></li>\n<li class=\"level2\"><a href=\"#scrolling\">Scroll input</a></li>\n</ul>\n</li>\n<li class=\"level1\"><a href=\"#joystick\">Joystick input</a><ul><li class=\"level2\"><a href=\"#joystick_axis\">Joystick axis states</a></li>\n<li class=\"level2\"><a href=\"#joystick_button\">Joystick button states</a></li>\n<li class=\"level2\"><a href=\"#joystick_hat\">Joystick hat states</a></li>\n<li class=\"level2\"><a href=\"#joystick_name\">Joystick name</a></li>\n<li class=\"level2\"><a href=\"#joystick_userptr\">Joystick user pointer</a></li>\n<li class=\"level2\"><a href=\"#joystick_event\">Joystick configuration changes</a></li>\n<li class=\"level2\"><a href=\"#gamepad\">Gamepad input</a></li>\n<li class=\"level2\"><a href=\"#gamepad_mapping\">Gamepad mappings</a></li>\n</ul>\n</li>\n<li class=\"level1\"><a href=\"#time\">Time input</a></li>\n<li class=\"level1\"><a href=\"#clipboard\">Clipboard input and output</a></li>\n<li class=\"level1\"><a href=\"#path_drop\">Path drop input</a></li>\n</ul>\n</div>\n<div class=\"textblock\"><p>This guide introduces the input related functions of GLFW. For details on a specific function in this category, see the <a class=\"el\" href=\"group__input.html\">Input reference</a>. There are also guides for the other areas of GLFW.</p>\n<ul>\n<li><a class=\"el\" href=\"intro_guide.html\">Introduction to the API</a></li>\n<li><a class=\"el\" href=\"window_guide.html\">Window guide</a></li>\n<li><a class=\"el\" href=\"context_guide.html\">Context guide</a></li>\n<li><a class=\"el\" href=\"vulkan_guide.html\">Vulkan guide</a></li>\n<li><a class=\"el\" href=\"monitor_guide.html\">Monitor guide</a></li>\n</ul>\n<p>GLFW provides many kinds of input. While some can only be polled, like time, or only received via callbacks, like scrolling, many provide both callbacks and polling. Callbacks are more work to use than polling but is less CPU intensive and guarantees that you do not miss state changes.</p>\n<p>All input callbacks receive a window handle. By using the <a class=\"el\" href=\"window_guide.html#window_userptr\">window user pointer</a>, you can access non-global structures or objects from your callbacks.</p>\n<p>To get a better feel for how the various events callbacks behave, run the <code>events</code> test program. It register every callback supported by GLFW and prints out all arguments provided for every event, along with time and sequence information.</p>\n<h1><a class=\"anchor\" id=\"events\"></a>\nEvent processing</h1>\n<p>GLFW needs to poll the window system for events both to provide input to the application and to prove to the window system that the application hasn't locked up. Event processing is normally done each frame after <a class=\"el\" href=\"window_guide.html#buffer_swap\">buffer swapping</a>. Even when you have no windows, event polling needs to be done in order to receive monitor and joystick connection events.</p>\n<p>There are three functions for processing pending events. <a class=\"el\" href=\"group__window.html#ga37bd57223967b4211d60ca1a0bf3c832\">glfwPollEvents</a>, processes only those events that have already been received and then returns immediately.</p>\n<div class=\"fragment\"><div class=\"line\"><a class=\"code\" href=\"group__window.html#ga37bd57223967b4211d60ca1a0bf3c832\">glfwPollEvents</a>();</div>\n</div><!-- fragment --><p>This is the best choice when rendering continuously, like most games do.</p>\n<p>If you only need to update the contents of the window when you receive new input, <a class=\"el\" href=\"group__window.html#ga554e37d781f0a997656c26b2c56c835e\">glfwWaitEvents</a> is a better choice.</p>\n<div class=\"fragment\"><div class=\"line\"><a class=\"code\" href=\"group__window.html#ga554e37d781f0a997656c26b2c56c835e\">glfwWaitEvents</a>();</div>\n</div><!-- fragment --><p>It puts the thread to sleep until at least one event has been received and then processes all received events. This saves a great deal of CPU cycles and is useful for, for example, editing tools.</p>\n<p>If you want to wait for events but have UI elements or other tasks that need periodic updates, <a class=\"el\" href=\"group__window.html#ga605a178db92f1a7f1a925563ef3ea2cf\">glfwWaitEventsTimeout</a> lets you specify a timeout.</p>\n<div class=\"fragment\"><div class=\"line\"><a class=\"code\" href=\"group__window.html#ga605a178db92f1a7f1a925563ef3ea2cf\">glfwWaitEventsTimeout</a>(0.7);</div>\n</div><!-- fragment --><p>It puts the thread to sleep until at least one event has been received, or until the specified number of seconds have elapsed. It then processes any received events.</p>\n<p>If the main thread is sleeping in <a class=\"el\" href=\"group__window.html#ga554e37d781f0a997656c26b2c56c835e\">glfwWaitEvents</a>, you can wake it from another thread by posting an empty event to the event queue with <a class=\"el\" href=\"group__window.html#gab5997a25187e9fd5c6f2ecbbc8dfd7e9\">glfwPostEmptyEvent</a>.</p>\n<div class=\"fragment\"><div class=\"line\"><a class=\"code\" href=\"group__window.html#gab5997a25187e9fd5c6f2ecbbc8dfd7e9\">glfwPostEmptyEvent</a>();</div>\n</div><!-- fragment --><p>Do not assume that callbacks will <em>only</em> be called in response to the above functions. While it is necessary to process events in one or more of the ways above, window systems that require GLFW to register callbacks of its own can pass events to GLFW in response to many window system function calls. GLFW will pass those events on to the application callbacks before returning.</p>\n<p>For example, on Windows the system function that <a class=\"el\" href=\"group__window.html#ga371911f12c74c504dd8d47d832d095cb\">glfwSetWindowSize</a> is implemented with will send window size events directly to the event callback that every window has and that GLFW implements for its windows. If you have set a <a class=\"el\" href=\"window_guide.html#window_size\">window size callback</a> GLFW will call it in turn with the new size before everything returns back out of the <a class=\"el\" href=\"group__window.html#ga371911f12c74c504dd8d47d832d095cb\">glfwSetWindowSize</a> call.</p>\n<h1><a class=\"anchor\" id=\"input_keyboard\"></a>\nKeyboard input</h1>\n<p>GLFW divides keyboard input into two categories; key events and character events. Key events relate to actual physical keyboard keys, whereas character events relate to the Unicode code points generated by pressing some of them.</p>\n<p>Keys and characters do not map 1:1. A single key press may produce several characters, and a single character may require several keys to produce. This may not be the case on your machine, but your users are likely not all using the same keyboard layout, input method or even operating system as you.</p>\n<h2><a class=\"anchor\" id=\"input_key\"></a>\nKey input</h2>\n<p>If you wish to be notified when a physical key is pressed or released or when it repeats, set a key callback.</p>\n<div class=\"fragment\"><div class=\"line\"><a class=\"code\" href=\"group__input.html#ga1caf18159767e761185e49a3be019f8d\">glfwSetKeyCallback</a>(window, key_callback);</div>\n</div><!-- fragment --><p>The callback function receives the <a class=\"el\" href=\"group__keys.html\">keyboard key</a>, platform-specific scancode, key action and <a class=\"el\" href=\"group__mods.html\">modifier bits</a>.</p>\n<div class=\"fragment\"><div class=\"line\"><span class=\"keywordtype\">void</span> key_callback(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window, <span class=\"keywordtype\">int</span> key, <span class=\"keywordtype\">int</span> scancode, <span class=\"keywordtype\">int</span> action, <span class=\"keywordtype\">int</span> mods)</div>\n<div class=\"line\">{</div>\n<div class=\"line\">    <span class=\"keywordflow\">if</span> (key == <a class=\"code\" href=\"group__keys.html#gabf48fcc3afbe69349df432b470c96ef2\">GLFW_KEY_E</a> &amp;&amp; action == <a class=\"code\" href=\"group__input.html#ga2485743d0b59df3791c45951c4195265\">GLFW_PRESS</a>)</div>\n<div class=\"line\">        activate_airship();</div>\n<div class=\"line\">}</div>\n</div><!-- fragment --><p>The action is one of <code>GLFW_PRESS</code>, <code>GLFW_REPEAT</code> or <code>GLFW_RELEASE</code>. The key will be <code>GLFW_KEY_UNKNOWN</code> if GLFW lacks a key token for it, for example <em>E-mail</em> and <em>Play</em> keys.</p>\n<p>The scancode is unique for every key, regardless of whether it has a key token. Scancodes are platform-specific but consistent over time, so keys will have different scancodes depending on the platform but they are safe to save to disk. You can query the scancode for any <a class=\"el\" href=\"group__keys.html\">named key</a> on the current platform with <a class=\"el\" href=\"group__input.html#ga67ddd1b7dcbbaff03e4a76c0ea67103a\">glfwGetKeyScancode</a>.</p>\n<div class=\"fragment\"><div class=\"line\"><span class=\"keyword\">const</span> <span class=\"keywordtype\">int</span> scancode = <a class=\"code\" href=\"group__input.html#ga67ddd1b7dcbbaff03e4a76c0ea67103a\">glfwGetKeyScancode</a>(<a class=\"code\" href=\"group__keys.html#gac1c42c0bf4192cea713c55598b06b744\">GLFW_KEY_X</a>);</div>\n<div class=\"line\">set_key_mapping(scancode, swap_weapons);</div>\n</div><!-- fragment --><p>The last reported state for every <a class=\"el\" href=\"group__keys.html\">named key</a> is also saved in per-window state arrays that can be polled with <a class=\"el\" href=\"group__input.html#gadd341da06bc8d418b4dc3a3518af9ad2\">glfwGetKey</a>.</p>\n<div class=\"fragment\"><div class=\"line\"><span class=\"keywordtype\">int</span> state = <a class=\"code\" href=\"group__input.html#gadd341da06bc8d418b4dc3a3518af9ad2\">glfwGetKey</a>(window, <a class=\"code\" href=\"group__keys.html#gabf48fcc3afbe69349df432b470c96ef2\">GLFW_KEY_E</a>);</div>\n<div class=\"line\"><span class=\"keywordflow\">if</span> (state == <a class=\"code\" href=\"group__input.html#ga2485743d0b59df3791c45951c4195265\">GLFW_PRESS</a>)</div>\n<div class=\"line\">{</div>\n<div class=\"line\">    activate_airship();</div>\n<div class=\"line\">}</div>\n</div><!-- fragment --><p>The returned state is one of <code>GLFW_PRESS</code> or <code>GLFW_RELEASE</code>.</p>\n<p>This function only returns cached key event state. It does not poll the system for the current physical state of the key.</p>\n<p><a class=\"anchor\" id=\"GLFW_STICKY_KEYS\"></a>Whenever you poll state, you risk missing the state change you are looking for. If a pressed key is released again before you poll its state, you will have missed the key press. The recommended solution for this is to use a key callback, but there is also the <code>GLFW_STICKY_KEYS</code> input mode.</p>\n<div class=\"fragment\"><div class=\"line\"><a class=\"code\" href=\"group__input.html#gaa92336e173da9c8834558b54ee80563b\">glfwSetInputMode</a>(window, <a class=\"code\" href=\"glfw3_8h.html#ae3bbe2315b7691ab088159eb6c9110fc\">GLFW_STICKY_KEYS</a>, <a class=\"code\" href=\"group__init.html#ga2744fbb29b5631bb28802dbe0cf36eba\">GLFW_TRUE</a>);</div>\n</div><!-- fragment --><p>When sticky keys mode is enabled, the pollable state of a key will remain <code>GLFW_PRESS</code> until the state of that key is polled with <a class=\"el\" href=\"group__input.html#gadd341da06bc8d418b4dc3a3518af9ad2\">glfwGetKey</a>. Once it has been polled, if a key release event had been processed in the meantime, the state will reset to <code>GLFW_RELEASE</code>, otherwise it will remain <code>GLFW_PRESS</code>.</p>\n<p><a class=\"anchor\" id=\"GLFW_LOCK_KEY_MODS\"></a>If you wish to know what the state of the Caps Lock and Num Lock keys was when input events were generated, set the <code>GLFW_LOCK_KEY_MODS</code> input mode.</p>\n<div class=\"fragment\"><div class=\"line\"><a class=\"code\" href=\"group__input.html#gaa92336e173da9c8834558b54ee80563b\">glfwSetInputMode</a>(window, <a class=\"code\" href=\"glfw3_8h.html#a07b84de0b52143e1958f88a7d9105947\">GLFW_LOCK_KEY_MODS</a>, <a class=\"code\" href=\"group__init.html#ga2744fbb29b5631bb28802dbe0cf36eba\">GLFW_TRUE</a>);</div>\n</div><!-- fragment --><p>When this input mode is enabled, any callback that receives <a class=\"el\" href=\"group__mods.html\">modifier bits</a> will have the <a class=\"el\" href=\"group__mods.html#gaefeef8fcf825a6e43e241b337897200f\">GLFW_MOD_CAPS_LOCK</a> bit set if Caps Lock was on when the event occurred and the <a class=\"el\" href=\"group__mods.html#ga64e020b8a42af8376e944baf61feecbe\">GLFW_MOD_NUM_LOCK</a> bit set if Num Lock was on.</p>\n<p>The <code>GLFW_KEY_LAST</code> constant holds the highest value of any <a class=\"el\" href=\"group__keys.html\">named key</a>.</p>\n<h2><a class=\"anchor\" id=\"input_char\"></a>\nText input</h2>\n<p>GLFW supports text input in the form of a stream of <a href=\"https://en.wikipedia.org/wiki/Unicode\">Unicode code points</a>, as produced by the operating system text input system. Unlike key input, text input obeys keyboard layouts and modifier keys and supports composing characters using <a href=\"https://en.wikipedia.org/wiki/Dead_key\">dead keys</a>. Once received, you can encode the code points into UTF-8 or any other encoding you prefer.</p>\n<p>Because an <code>unsigned int</code> is 32 bits long on all platforms supported by GLFW, you can treat the code point argument as native endian UTF-32.</p>\n<p>If you wish to offer regular text input, set a character callback.</p>\n<div class=\"fragment\"><div class=\"line\"><a class=\"code\" href=\"group__input.html#gab25c4a220fd8f5717718dbc487828996\">glfwSetCharCallback</a>(window, character_callback);</div>\n</div><!-- fragment --><p>The callback function receives Unicode code points for key events that would have led to regular text input and generally behaves as a standard text field on that platform.</p>\n<div class=\"fragment\"><div class=\"line\"><span class=\"keywordtype\">void</span> character_callback(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window, <span class=\"keywordtype\">unsigned</span> <span class=\"keywordtype\">int</span> codepoint)</div>\n<div class=\"line\">{</div>\n<div class=\"line\">}</div>\n</div><!-- fragment --><h2><a class=\"anchor\" id=\"input_key_name\"></a>\nKey names</h2>\n<p>If you wish to refer to keys by name, you can query the keyboard layout dependent name of printable keys with <a class=\"el\" href=\"group__input.html#ga237a182e5ec0b21ce64543f3b5e7e2be\">glfwGetKeyName</a>.</p>\n<div class=\"fragment\"><div class=\"line\"><span class=\"keyword\">const</span> <span class=\"keywordtype\">char</span>* key_name = <a class=\"code\" href=\"group__input.html#ga237a182e5ec0b21ce64543f3b5e7e2be\">glfwGetKeyName</a>(<a class=\"code\" href=\"group__keys.html#gaa06a712e6202661fc03da5bdb7b6e545\">GLFW_KEY_W</a>, 0);</div>\n<div class=\"line\">show_tutorial_hint(<span class=\"stringliteral\">&quot;Press %s to move forward&quot;</span>, key_name);</div>\n</div><!-- fragment --><p>This function can handle both <a class=\"el\" href=\"input_guide.html#input_key\">keys and scancodes</a>. If the specified key is <code>GLFW_KEY_UNKNOWN</code> then the scancode is used, otherwise it is ignored. This matches the behavior of the key callback, meaning the callback arguments can always be passed unmodified to this function.</p>\n<h1><a class=\"anchor\" id=\"input_mouse\"></a>\nMouse input</h1>\n<p>Mouse input comes in many forms, including mouse motion, button presses and scrolling offsets. The cursor appearance can also be changed, either to a custom image or a standard cursor shape from the system theme.</p>\n<h2><a class=\"anchor\" id=\"cursor_pos\"></a>\nCursor position</h2>\n<p>If you wish to be notified when the cursor moves over the window, set a cursor position callback.</p>\n<div class=\"fragment\"><div class=\"line\"><a class=\"code\" href=\"group__input.html#gac1f879ab7435d54d4d79bb469fe225d7\">glfwSetCursorPosCallback</a>(window, cursor_position_callback);</div>\n</div><!-- fragment --><p>The callback functions receives the cursor position, measured in screen coordinates but relative to the top-left corner of the window content area. On platforms that provide it, the full sub-pixel cursor position is passed on.</p>\n<div class=\"fragment\"><div class=\"line\"><span class=\"keyword\">static</span> <span class=\"keywordtype\">void</span> cursor_position_callback(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window, <span class=\"keywordtype\">double</span> xpos, <span class=\"keywordtype\">double</span> ypos)</div>\n<div class=\"line\">{</div>\n<div class=\"line\">}</div>\n</div><!-- fragment --><p>The cursor position is also saved per-window and can be polled with <a class=\"el\" href=\"group__input.html#ga01d37b6c40133676b9cea60ca1d7c0cc\">glfwGetCursorPos</a>.</p>\n<div class=\"fragment\"><div class=\"line\"><span class=\"keywordtype\">double</span> xpos, ypos;</div>\n<div class=\"line\"><a class=\"code\" href=\"group__input.html#ga01d37b6c40133676b9cea60ca1d7c0cc\">glfwGetCursorPos</a>(window, &amp;xpos, &amp;ypos);</div>\n</div><!-- fragment --><h2><a class=\"anchor\" id=\"cursor_mode\"></a>\nCursor mode</h2>\n<p><a class=\"anchor\" id=\"GLFW_CURSOR\"></a>The <code>GLFW_CURSOR</code> input mode provides several cursor modes for special forms of mouse motion input. By default, the cursor mode is <code>GLFW_CURSOR_NORMAL</code>, meaning the regular arrow cursor (or another cursor set with <a class=\"el\" href=\"group__input.html#gad3b4f38c8d5dae036bc8fa959e18343e\">glfwSetCursor</a>) is used and cursor motion is not limited.</p>\n<p>If you wish to implement mouse motion based camera controls or other input schemes that require unlimited mouse movement, set the cursor mode to <code>GLFW_CURSOR_DISABLED</code>.</p>\n<div class=\"fragment\"><div class=\"line\"><a class=\"code\" href=\"group__input.html#gaa92336e173da9c8834558b54ee80563b\">glfwSetInputMode</a>(window, <a class=\"code\" href=\"glfw3_8h.html#aade31da5b884a84a7625c6b059b9132c\">GLFW_CURSOR</a>, <a class=\"code\" href=\"glfw3_8h.html#a2315b99a329ce53e6a13a9d46fd5ca88\">GLFW_CURSOR_DISABLED</a>);</div>\n</div><!-- fragment --><p>This will hide the cursor and lock it to the specified window. GLFW will then take care of all the details of cursor re-centering and offset calculation and providing the application with a virtual cursor position. This virtual position is provided normally via both the cursor position callback and through polling.</p>\n<dl class=\"section note\"><dt>Note</dt><dd>You should not implement your own version of this functionality using other features of GLFW. It is not supported and will not work as robustly as <code>GLFW_CURSOR_DISABLED</code>.</dd></dl>\n<p>If you only wish the cursor to become hidden when it is over a window but still want it to behave normally, set the cursor mode to <code>GLFW_CURSOR_HIDDEN</code>.</p>\n<div class=\"fragment\"><div class=\"line\"><a class=\"code\" href=\"group__input.html#gaa92336e173da9c8834558b54ee80563b\">glfwSetInputMode</a>(window, <a class=\"code\" href=\"glfw3_8h.html#aade31da5b884a84a7625c6b059b9132c\">GLFW_CURSOR</a>, <a class=\"code\" href=\"glfw3_8h.html#ac4d5cb9d78de8573349c58763d53bf11\">GLFW_CURSOR_HIDDEN</a>);</div>\n</div><!-- fragment --><p>This mode puts no limit on the motion of the cursor.</p>\n<p>To exit out of either of these special modes, restore the <code>GLFW_CURSOR_NORMAL</code> cursor mode.</p>\n<div class=\"fragment\"><div class=\"line\"><a class=\"code\" href=\"group__input.html#gaa92336e173da9c8834558b54ee80563b\">glfwSetInputMode</a>(window, <a class=\"code\" href=\"glfw3_8h.html#aade31da5b884a84a7625c6b059b9132c\">GLFW_CURSOR</a>, <a class=\"code\" href=\"glfw3_8h.html#ae04dd25c8577e19fa8c97368561f6c68\">GLFW_CURSOR_NORMAL</a>);</div>\n</div><!-- fragment --><p><a class=\"anchor\" id=\"GLFW_RAW_MOUSE_MOTION\"></a></p>\n<h2><a class=\"anchor\" id=\"raw_mouse_motion\"></a>\nRaw mouse motion</h2>\n<p>When the cursor is disabled, raw (unscaled and unaccelerated) mouse motion can be enabled if available.</p>\n<p>Raw mouse motion is closer to the actual motion of the mouse across a surface. It is not affected by the scaling and acceleration applied to the motion of the desktop cursor. That processing is suitable for a cursor while raw motion is better for controlling for example a 3D camera. Because of this, raw mouse motion is only provided when the cursor is disabled.</p>\n<p>Call <a class=\"el\" href=\"group__input.html#gae4ee0dbd0d256183e1ea4026d897e1c2\">glfwRawMouseMotionSupported</a> to check if the current machine provides raw motion and set the <code>GLFW_RAW_MOUSE_MOTION</code> input mode to enable it. It is disabled by default.</p>\n<div class=\"fragment\"><div class=\"line\"><span class=\"keywordflow\">if</span> (<a class=\"code\" href=\"group__input.html#gae4ee0dbd0d256183e1ea4026d897e1c2\">glfwRawMouseMotionSupported</a>())</div>\n<div class=\"line\">    <a class=\"code\" href=\"group__input.html#gaa92336e173da9c8834558b54ee80563b\">glfwSetInputMode</a>(window, <a class=\"code\" href=\"glfw3_8h.html#aeeda1be76a44a1fc97c1282e06281fbb\">GLFW_RAW_MOUSE_MOTION</a>, <a class=\"code\" href=\"group__init.html#ga2744fbb29b5631bb28802dbe0cf36eba\">GLFW_TRUE</a>);</div>\n</div><!-- fragment --><p>If supported, raw mouse motion can be enabled or disabled per-window and at any time but it will only be provided when the cursor is disabled.</p>\n<h2><a class=\"anchor\" id=\"cursor_object\"></a>\nCursor objects</h2>\n<p>GLFW supports creating both custom and system theme cursor images, encapsulated as <a class=\"el\" href=\"group__input.html#ga89261ae18c75e863aaf2656ecdd238f4\">GLFWcursor</a> objects. They are created with <a class=\"el\" href=\"group__input.html#gafca356935e10135016aa49ffa464c355\">glfwCreateCursor</a> or <a class=\"el\" href=\"group__input.html#gaa65f416d03ebbbb5b8db71a489fcb894\">glfwCreateStandardCursor</a> and destroyed with <a class=\"el\" href=\"group__input.html#ga81b952cd1764274d0db7fb3c5a79ba6a\">glfwDestroyCursor</a>, or <a class=\"el\" href=\"group__init.html#gaaae48c0a18607ea4a4ba951d939f0901\">glfwTerminate</a>, if any remain.</p>\n<h3><a class=\"anchor\" id=\"cursor_custom\"></a>\nCustom cursor creation</h3>\n<p>A custom cursor is created with <a class=\"el\" href=\"group__input.html#gafca356935e10135016aa49ffa464c355\">glfwCreateCursor</a>, which returns a handle to the created cursor object. For example, this creates a 16x16 white square cursor with the hot-spot in the upper-left corner:</p>\n<div class=\"fragment\"><div class=\"line\"><span class=\"keywordtype\">unsigned</span> <span class=\"keywordtype\">char</span> pixels[16 * 16 * 4];</div>\n<div class=\"line\">memset(pixels, 0xff, <span class=\"keyword\">sizeof</span>(pixels));</div>\n<div class=\"line\"> </div>\n<div class=\"line\"><a class=\"code\" href=\"structGLFWimage.html\">GLFWimage</a> image;</div>\n<div class=\"line\">image.<a class=\"code\" href=\"structGLFWimage.html#af6a71cc999fe6d3aea31dd7e9687d835\">width</a> = 16;</div>\n<div class=\"line\">image.<a class=\"code\" href=\"structGLFWimage.html#a0b7d95368f0c80d5e5c9875057c7dbec\">height</a> = 16;</div>\n<div class=\"line\">image.<a class=\"code\" href=\"structGLFWimage.html#a0c532a5c2bb715555279b7817daba0fb\">pixels</a> = pixels;</div>\n<div class=\"line\"> </div>\n<div class=\"line\"><a class=\"code\" href=\"group__input.html#ga89261ae18c75e863aaf2656ecdd238f4\">GLFWcursor</a>* cursor = <a class=\"code\" href=\"group__input.html#gafca356935e10135016aa49ffa464c355\">glfwCreateCursor</a>(&amp;image, 0, 0);</div>\n</div><!-- fragment --><p>If cursor creation fails, <code>NULL</code> will be returned, so it is necessary to check the return value.</p>\n<p>The image data is 32-bit, little-endian, non-premultiplied RGBA, i.e. eight bits per channel with the red channel first. The pixels are arranged canonically as sequential rows, starting from the top-left corner.</p>\n<h3><a class=\"anchor\" id=\"cursor_standard\"></a>\nStandard cursor creation</h3>\n<p>A cursor with a <a class=\"el\" href=\"group__shapes.html\">standard shape</a> from the current system cursor theme can be can be created with <a class=\"el\" href=\"group__input.html#gaa65f416d03ebbbb5b8db71a489fcb894\">glfwCreateStandardCursor</a>.</p>\n<div class=\"fragment\"><div class=\"line\"><a class=\"code\" href=\"group__input.html#ga89261ae18c75e863aaf2656ecdd238f4\">GLFWcursor</a>* cursor = <a class=\"code\" href=\"group__input.html#gaa65f416d03ebbbb5b8db71a489fcb894\">glfwCreateStandardCursor</a>(<a class=\"code\" href=\"group__shapes.html#gabb3eb0109f11bb808fc34659177ca962\">GLFW_HRESIZE_CURSOR</a>);</div>\n</div><!-- fragment --><p>These cursor objects behave in the exact same way as those created with <a class=\"el\" href=\"group__input.html#gafca356935e10135016aa49ffa464c355\">glfwCreateCursor</a> except that the system cursor theme provides the actual image.</p>\n<h3><a class=\"anchor\" id=\"cursor_destruction\"></a>\nCursor destruction</h3>\n<p>When a cursor is no longer needed, destroy it with <a class=\"el\" href=\"group__input.html#ga81b952cd1764274d0db7fb3c5a79ba6a\">glfwDestroyCursor</a>.</p>\n<div class=\"fragment\"><div class=\"line\"><a class=\"code\" href=\"group__input.html#ga81b952cd1764274d0db7fb3c5a79ba6a\">glfwDestroyCursor</a>(cursor);</div>\n</div><!-- fragment --><p>Cursor destruction always succeeds. If the cursor is current for any window, that window will revert to the default cursor. This does not affect the cursor mode. All remaining cursors are destroyed when <a class=\"el\" href=\"group__init.html#gaaae48c0a18607ea4a4ba951d939f0901\">glfwTerminate</a> is called.</p>\n<h3><a class=\"anchor\" id=\"cursor_set\"></a>\nCursor setting</h3>\n<p>A cursor can be set as current for a window with <a class=\"el\" href=\"group__input.html#gad3b4f38c8d5dae036bc8fa959e18343e\">glfwSetCursor</a>.</p>\n<div class=\"fragment\"><div class=\"line\"><a class=\"code\" href=\"group__input.html#gad3b4f38c8d5dae036bc8fa959e18343e\">glfwSetCursor</a>(window, cursor);</div>\n</div><!-- fragment --><p>Once set, the cursor image will be used as long as the system cursor is over the content area of the window and the <a class=\"el\" href=\"input_guide.html#cursor_mode\">cursor mode</a> is set to <code>GLFW_CURSOR_NORMAL</code>.</p>\n<p>A single cursor may be set for any number of windows.</p>\n<p>To revert to the default cursor, set the cursor of that window to <code>NULL</code>.</p>\n<div class=\"fragment\"><div class=\"line\"><a class=\"code\" href=\"group__input.html#gad3b4f38c8d5dae036bc8fa959e18343e\">glfwSetCursor</a>(window, NULL);</div>\n</div><!-- fragment --><p>When a cursor is destroyed, any window that has it set will revert to the default cursor. This does not affect the cursor mode.</p>\n<h2><a class=\"anchor\" id=\"cursor_enter\"></a>\nCursor enter/leave events</h2>\n<p>If you wish to be notified when the cursor enters or leaves the content area of a window, set a cursor enter/leave callback.</p>\n<div class=\"fragment\"><div class=\"line\"><a class=\"code\" href=\"group__input.html#gad27f8ad0142c038a281466c0966817d8\">glfwSetCursorEnterCallback</a>(window, cursor_enter_callback);</div>\n</div><!-- fragment --><p>The callback function receives the new classification of the cursor.</p>\n<div class=\"fragment\"><div class=\"line\"><span class=\"keywordtype\">void</span> cursor_enter_callback(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window, <span class=\"keywordtype\">int</span> entered)</div>\n<div class=\"line\">{</div>\n<div class=\"line\">    <span class=\"keywordflow\">if</span> (entered)</div>\n<div class=\"line\">    {</div>\n<div class=\"line\">        <span class=\"comment\">// The cursor entered the content area of the window</span></div>\n<div class=\"line\">    }</div>\n<div class=\"line\">    <span class=\"keywordflow\">else</span></div>\n<div class=\"line\">    {</div>\n<div class=\"line\">        <span class=\"comment\">// The cursor left the content area of the window</span></div>\n<div class=\"line\">    }</div>\n<div class=\"line\">}</div>\n</div><!-- fragment --><p>You can query whether the cursor is currently inside the content area of the window with the <a class=\"el\" href=\"window_guide.html#GLFW_HOVERED_attrib\">GLFW_HOVERED</a> window attribute.</p>\n<div class=\"fragment\"><div class=\"line\"><span class=\"keywordflow\">if</span> (<a class=\"code\" href=\"group__window.html#gacccb29947ea4b16860ebef42c2cb9337\">glfwGetWindowAttrib</a>(window, <a class=\"code\" href=\"group__window.html#ga8665c71c6fa3d22425c6a0e8a3f89d8a\">GLFW_HOVERED</a>))</div>\n<div class=\"line\">{</div>\n<div class=\"line\">    highlight_interface();</div>\n<div class=\"line\">}</div>\n</div><!-- fragment --><h2><a class=\"anchor\" id=\"input_mouse_button\"></a>\nMouse button input</h2>\n<p>If you wish to be notified when a mouse button is pressed or released, set a mouse button callback.</p>\n<div class=\"fragment\"><div class=\"line\"><a class=\"code\" href=\"group__input.html#ga6ab84420974d812bee700e45284a723c\">glfwSetMouseButtonCallback</a>(window, mouse_button_callback);</div>\n</div><!-- fragment --><p>The callback function receives the <a class=\"el\" href=\"group__buttons.html\">mouse button</a>, button action and <a class=\"el\" href=\"group__mods.html\">modifier bits</a>.</p>\n<div class=\"fragment\"><div class=\"line\"><span class=\"keywordtype\">void</span> mouse_button_callback(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window, <span class=\"keywordtype\">int</span> button, <span class=\"keywordtype\">int</span> action, <span class=\"keywordtype\">int</span> mods)</div>\n<div class=\"line\">{</div>\n<div class=\"line\">    <span class=\"keywordflow\">if</span> (button == <a class=\"code\" href=\"group__buttons.html#ga3e2f2cf3c4942df73cc094247d275e74\">GLFW_MOUSE_BUTTON_RIGHT</a> &amp;&amp; action == <a class=\"code\" href=\"group__input.html#ga2485743d0b59df3791c45951c4195265\">GLFW_PRESS</a>)</div>\n<div class=\"line\">        popup_menu();</div>\n<div class=\"line\">}</div>\n</div><!-- fragment --><p>The action is one of <code>GLFW_PRESS</code> or <code>GLFW_RELEASE</code>.</p>\n<p>Mouse button states for <a class=\"el\" href=\"group__buttons.html\">named buttons</a> are also saved in per-window state arrays that can be polled with <a class=\"el\" href=\"group__input.html#gac1473feacb5996c01a7a5a33b5066704\">glfwGetMouseButton</a>.</p>\n<div class=\"fragment\"><div class=\"line\"><span class=\"keywordtype\">int</span> state = <a class=\"code\" href=\"group__input.html#gac1473feacb5996c01a7a5a33b5066704\">glfwGetMouseButton</a>(window, <a class=\"code\" href=\"group__buttons.html#gaf37100431dcd5082d48f95ee8bc8cd56\">GLFW_MOUSE_BUTTON_LEFT</a>);</div>\n<div class=\"line\"><span class=\"keywordflow\">if</span> (state == <a class=\"code\" href=\"group__input.html#ga2485743d0b59df3791c45951c4195265\">GLFW_PRESS</a>)</div>\n<div class=\"line\">{</div>\n<div class=\"line\">    upgrade_cow();</div>\n<div class=\"line\">}</div>\n</div><!-- fragment --><p>The returned state is one of <code>GLFW_PRESS</code> or <code>GLFW_RELEASE</code>.</p>\n<p>This function only returns cached mouse button event state. It does not poll the system for the current state of the mouse button.</p>\n<p><a class=\"anchor\" id=\"GLFW_STICKY_MOUSE_BUTTONS\"></a>Whenever you poll state, you risk missing the state change you are looking for. If a pressed mouse button is released again before you poll its state, you will have missed the button press. The recommended solution for this is to use a mouse button callback, but there is also the <code>GLFW_STICKY_MOUSE_BUTTONS</code> input mode.</p>\n<div class=\"fragment\"><div class=\"line\"><a class=\"code\" href=\"group__input.html#gaa92336e173da9c8834558b54ee80563b\">glfwSetInputMode</a>(window, <a class=\"code\" href=\"glfw3_8h.html#a4d7ce8ce71030c3b04e2b78145bc59d1\">GLFW_STICKY_MOUSE_BUTTONS</a>, <a class=\"code\" href=\"group__init.html#ga2744fbb29b5631bb28802dbe0cf36eba\">GLFW_TRUE</a>);</div>\n</div><!-- fragment --><p>When sticky mouse buttons mode is enabled, the pollable state of a mouse button will remain <code>GLFW_PRESS</code> until the state of that button is polled with <a class=\"el\" href=\"group__input.html#gac1473feacb5996c01a7a5a33b5066704\">glfwGetMouseButton</a>. Once it has been polled, if a mouse button release event had been processed in the meantime, the state will reset to <code>GLFW_RELEASE</code>, otherwise it will remain <code>GLFW_PRESS</code>.</p>\n<p>The <code>GLFW_MOUSE_BUTTON_LAST</code> constant holds the highest value of any <a class=\"el\" href=\"group__buttons.html\">named button</a>.</p>\n<h2><a class=\"anchor\" id=\"scrolling\"></a>\nScroll input</h2>\n<p>If you wish to be notified when the user scrolls, whether with a mouse wheel or touchpad gesture, set a scroll callback.</p>\n<div class=\"fragment\"><div class=\"line\"><a class=\"code\" href=\"group__input.html#ga571e45a030ae4061f746ed56cb76aede\">glfwSetScrollCallback</a>(window, scroll_callback);</div>\n</div><!-- fragment --><p>The callback function receives two-dimensional scroll offsets.</p>\n<div class=\"fragment\"><div class=\"line\"><span class=\"keywordtype\">void</span> scroll_callback(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window, <span class=\"keywordtype\">double</span> xoffset, <span class=\"keywordtype\">double</span> yoffset)</div>\n<div class=\"line\">{</div>\n<div class=\"line\">}</div>\n</div><!-- fragment --><p>A normal mouse wheel, being vertical, provides offsets along the Y-axis.</p>\n<h1><a class=\"anchor\" id=\"joystick\"></a>\nJoystick input</h1>\n<p>The joystick functions expose connected joysticks and controllers, with both referred to as joysticks. It supports up to sixteen joysticks, ranging from <code>GLFW_JOYSTICK_1</code>, <code>GLFW_JOYSTICK_2</code> up to and including <code>GLFW_JOYSTICK_16</code> or <code>GLFW_JOYSTICK_LAST</code>. You can test whether a <a class=\"el\" href=\"group__joysticks.html\">joystick</a> is present with <a class=\"el\" href=\"group__input.html#gaed0966cee139d815317f9ffcba64c9f1\">glfwJoystickPresent</a>.</p>\n<div class=\"fragment\"><div class=\"line\"><span class=\"keywordtype\">int</span> present = <a class=\"code\" href=\"group__input.html#gaed0966cee139d815317f9ffcba64c9f1\">glfwJoystickPresent</a>(<a class=\"code\" href=\"group__joysticks.html#ga34a0443d059e9f22272cd4669073f73d\">GLFW_JOYSTICK_1</a>);</div>\n</div><!-- fragment --><p>Each joystick has zero or more axes, zero or more buttons, zero or more hats, a human-readable name, a user pointer and an SDL compatible GUID.</p>\n<p>When GLFW is initialized, detected joysticks are added to the beginning of the array. Once a joystick is detected, it keeps its assigned ID until it is disconnected or the library is terminated, so as joysticks are connected and disconnected, there may appear gaps in the IDs.</p>\n<p>Joystick axis, button and hat state is updated when polled and does not require a window to be created or events to be processed. However, if you want joystick connection and disconnection events reliably delivered to the <a class=\"el\" href=\"input_guide.html#joystick_event\">joystick callback</a> then you must <a class=\"el\" href=\"input_guide.html#events\">process events</a>.</p>\n<p>To see all the properties of all connected joysticks in real-time, run the <code>joysticks</code> test program.</p>\n<h2><a class=\"anchor\" id=\"joystick_axis\"></a>\nJoystick axis states</h2>\n<p>The positions of all axes of a joystick are returned by <a class=\"el\" href=\"group__input.html#gaa8806536731e92c061bc70bcff6edbd0\">glfwGetJoystickAxes</a>. See the reference documentation for the lifetime of the returned array.</p>\n<div class=\"fragment\"><div class=\"line\"><span class=\"keywordtype\">int</span> count;</div>\n<div class=\"line\"><span class=\"keyword\">const</span> <span class=\"keywordtype\">float</span>* axes = <a class=\"code\" href=\"group__input.html#gaa8806536731e92c061bc70bcff6edbd0\">glfwGetJoystickAxes</a>(<a class=\"code\" href=\"group__joysticks.html#gae43281bc66d3fa5089fb50c3e7a28695\">GLFW_JOYSTICK_5</a>, &amp;count);</div>\n</div><!-- fragment --><p>Each element in the returned array is a value between -1.0 and 1.0.</p>\n<h2><a class=\"anchor\" id=\"joystick_button\"></a>\nJoystick button states</h2>\n<p>The states of all buttons of a joystick are returned by <a class=\"el\" href=\"group__input.html#gadb3cbf44af90a1536f519659a53bddd6\">glfwGetJoystickButtons</a>. See the reference documentation for the lifetime of the returned array.</p>\n<div class=\"fragment\"><div class=\"line\"><span class=\"keywordtype\">int</span> count;</div>\n<div class=\"line\"><span class=\"keyword\">const</span> <span class=\"keywordtype\">unsigned</span> <span class=\"keywordtype\">char</span>* buttons = <a class=\"code\" href=\"group__input.html#gadb3cbf44af90a1536f519659a53bddd6\">glfwGetJoystickButtons</a>(<a class=\"code\" href=\"group__joysticks.html#gae6f3eedfeb42424c2f5e3161efb0b654\">GLFW_JOYSTICK_3</a>, &amp;count);</div>\n</div><!-- fragment --><p>Each element in the returned array is either <code>GLFW_PRESS</code> or <code>GLFW_RELEASE</code>.</p>\n<p>For backward compatibility with earlier versions that did not have <a class=\"el\" href=\"group__input.html#ga2d8d0634bb81c180899aeb07477a67ea\">glfwGetJoystickHats</a>, the button array by default also includes all hats. See the reference documentation for <a class=\"el\" href=\"group__input.html#gadb3cbf44af90a1536f519659a53bddd6\">glfwGetJoystickButtons</a> for details.</p>\n<h2><a class=\"anchor\" id=\"joystick_hat\"></a>\nJoystick hat states</h2>\n<p>The states of all hats are returned by <a class=\"el\" href=\"group__input.html#ga2d8d0634bb81c180899aeb07477a67ea\">glfwGetJoystickHats</a>. See the reference documentation for the lifetime of the returned array.</p>\n<div class=\"fragment\"><div class=\"line\"><span class=\"keywordtype\">int</span> count;</div>\n<div class=\"line\"><span class=\"keyword\">const</span> <span class=\"keywordtype\">unsigned</span> <span class=\"keywordtype\">char</span>* hats = <a class=\"code\" href=\"group__input.html#ga2d8d0634bb81c180899aeb07477a67ea\">glfwGetJoystickHats</a>(<a class=\"code\" href=\"group__joysticks.html#ga20a9f4f3aaefed9ea5e66072fc588b87\">GLFW_JOYSTICK_7</a>, &amp;count);</div>\n</div><!-- fragment --><p>Each element in the returned array is one of the following:</p>\n<table class=\"markdownTable\">\n<tr class=\"markdownTableHead\">\n<th class=\"markdownTableHeadNone\">Name  </th><th class=\"markdownTableHeadNone\">Value   </th></tr>\n<tr class=\"markdownTableRowOdd\">\n<td class=\"markdownTableBodyNone\"><code>GLFW_HAT_CENTERED</code>  </td><td class=\"markdownTableBodyNone\">0   </td></tr>\n<tr class=\"markdownTableRowEven\">\n<td class=\"markdownTableBodyNone\"><code>GLFW_HAT_UP</code>  </td><td class=\"markdownTableBodyNone\">1   </td></tr>\n<tr class=\"markdownTableRowOdd\">\n<td class=\"markdownTableBodyNone\"><code>GLFW_HAT_RIGHT</code>  </td><td class=\"markdownTableBodyNone\">2   </td></tr>\n<tr class=\"markdownTableRowEven\">\n<td class=\"markdownTableBodyNone\"><code>GLFW_HAT_DOWN</code>  </td><td class=\"markdownTableBodyNone\">4   </td></tr>\n<tr class=\"markdownTableRowOdd\">\n<td class=\"markdownTableBodyNone\"><code>GLFW_HAT_LEFT</code>  </td><td class=\"markdownTableBodyNone\">8   </td></tr>\n<tr class=\"markdownTableRowEven\">\n<td class=\"markdownTableBodyNone\"><code>GLFW_HAT_RIGHT_UP</code>  </td><td class=\"markdownTableBodyNone\"><code>GLFW_HAT_RIGHT</code> | <code>GLFW_HAT_UP</code>   </td></tr>\n<tr class=\"markdownTableRowOdd\">\n<td class=\"markdownTableBodyNone\"><code>GLFW_HAT_RIGHT_DOWN</code>  </td><td class=\"markdownTableBodyNone\"><code>GLFW_HAT_RIGHT</code> | <code>GLFW_HAT_DOWN</code>   </td></tr>\n<tr class=\"markdownTableRowEven\">\n<td class=\"markdownTableBodyNone\"><code>GLFW_HAT_LEFT_UP</code>  </td><td class=\"markdownTableBodyNone\"><code>GLFW_HAT_LEFT</code> | <code>GLFW_HAT_UP</code>   </td></tr>\n<tr class=\"markdownTableRowOdd\">\n<td class=\"markdownTableBodyNone\"><code>GLFW_HAT_LEFT_DOWN</code>  </td><td class=\"markdownTableBodyNone\"><code>GLFW_HAT_LEFT</code> | <code>GLFW_HAT_DOWN</code>   </td></tr>\n</table>\n<p>The diagonal directions are bitwise combinations of the primary (up, right, down and left) directions and you can test for these individually by ANDing it with the corresponding direction.</p>\n<div class=\"fragment\"><div class=\"line\"><span class=\"keywordflow\">if</span> (hats[2] &amp; <a class=\"code\" href=\"group__hat__state.html#ga252586e3bbde75f4b0e07ad3124867f5\">GLFW_HAT_RIGHT</a>)</div>\n<div class=\"line\">{</div>\n<div class=\"line\">    <span class=\"comment\">// State of hat 2 could be right-up, right or right-down</span></div>\n<div class=\"line\">}</div>\n</div><!-- fragment --><p>For backward compatibility with earlier versions that did not have <a class=\"el\" href=\"group__input.html#ga2d8d0634bb81c180899aeb07477a67ea\">glfwGetJoystickHats</a>, all hats are by default also included in the button array. See the reference documentation for <a class=\"el\" href=\"group__input.html#gadb3cbf44af90a1536f519659a53bddd6\">glfwGetJoystickButtons</a> for details.</p>\n<h2><a class=\"anchor\" id=\"joystick_name\"></a>\nJoystick name</h2>\n<p>The human-readable, UTF-8 encoded name of a joystick is returned by <a class=\"el\" href=\"group__input.html#gafbe3e51f670320908cfe4e20d3e5559e\">glfwGetJoystickName</a>. See the reference documentation for the lifetime of the returned string.</p>\n<div class=\"fragment\"><div class=\"line\"><span class=\"keyword\">const</span> <span class=\"keywordtype\">char</span>* name = <a class=\"code\" href=\"group__input.html#gafbe3e51f670320908cfe4e20d3e5559e\">glfwGetJoystickName</a>(<a class=\"code\" href=\"group__joysticks.html#ga97ddbcad02b7f48d74fad4ddb08fff59\">GLFW_JOYSTICK_4</a>);</div>\n</div><!-- fragment --><p>Joystick names are not guaranteed to be unique. Two joysticks of the same model and make may have the same name. Only the <a class=\"el\" href=\"group__joysticks.html\">joystick token</a> is guaranteed to be unique, and only until that joystick is disconnected.</p>\n<h2><a class=\"anchor\" id=\"joystick_userptr\"></a>\nJoystick user pointer</h2>\n<p>Each joystick has a user pointer that can be set with <a class=\"el\" href=\"group__input.html#ga6b2f72d64d636b48a727b437cbb7489e\">glfwSetJoystickUserPointer</a> and queried with <a class=\"el\" href=\"group__input.html#ga06290acb7ed23895bf26b8e981827ebd\">glfwGetJoystickUserPointer</a>. This can be used for any purpose you need and will not be modified by GLFW. The value will be kept until the joystick is disconnected or until the library is terminated.</p>\n<p>The initial value of the pointer is <code>NULL</code>.</p>\n<h2><a class=\"anchor\" id=\"joystick_event\"></a>\nJoystick configuration changes</h2>\n<p>If you wish to be notified when a joystick is connected or disconnected, set a joystick callback.</p>\n<div class=\"fragment\"><div class=\"line\"><a class=\"code\" href=\"group__input.html#ga2f60a0e5b7bd8d1b7344dc0a7cb32b4c\">glfwSetJoystickCallback</a>(joystick_callback);</div>\n</div><!-- fragment --><p>The callback function receives the ID of the joystick that has been connected and disconnected and the event that occurred.</p>\n<div class=\"fragment\"><div class=\"line\"><span class=\"keywordtype\">void</span> joystick_callback(<span class=\"keywordtype\">int</span> jid, <span class=\"keywordtype\">int</span> event)</div>\n<div class=\"line\">{</div>\n<div class=\"line\">    <span class=\"keywordflow\">if</span> (event == <a class=\"code\" href=\"glfw3_8h.html#abe11513fd1ffbee5bb9b173f06028b9e\">GLFW_CONNECTED</a>)</div>\n<div class=\"line\">    {</div>\n<div class=\"line\">        <span class=\"comment\">// The joystick was connected</span></div>\n<div class=\"line\">    }</div>\n<div class=\"line\">    <span class=\"keywordflow\">else</span> <span class=\"keywordflow\">if</span> (event == <a class=\"code\" href=\"glfw3_8h.html#aab64b25921ef21d89252d6f0a71bfc32\">GLFW_DISCONNECTED</a>)</div>\n<div class=\"line\">    {</div>\n<div class=\"line\">        <span class=\"comment\">// The joystick was disconnected</span></div>\n<div class=\"line\">    }</div>\n<div class=\"line\">}</div>\n</div><!-- fragment --><p>For joystick connection and disconnection events to be delivered on all platforms, you need to call one of the <a class=\"el\" href=\"input_guide.html#events\">event processing</a> functions. Joystick disconnection may also be detected and the callback called by joystick functions. The function will then return whatever it returns for a disconnected joystick.</p>\n<p>Only <a class=\"el\" href=\"group__input.html#gafbe3e51f670320908cfe4e20d3e5559e\">glfwGetJoystickName</a> and <a class=\"el\" href=\"group__input.html#ga06290acb7ed23895bf26b8e981827ebd\">glfwGetJoystickUserPointer</a> will return useful values for a disconnected joystick and only before the monitor callback returns.</p>\n<h2><a class=\"anchor\" id=\"gamepad\"></a>\nGamepad input</h2>\n<p>The joystick functions provide unlabeled axes, buttons and hats, with no indication of where they are located on the device. Their order may also vary between platforms even with the same device.</p>\n<p>To solve this problem the SDL community crowdsourced the <a href=\"https://github.com/gabomdq/SDL_GameControllerDB\">SDL_GameControllerDB</a> project, a database of mappings from many different devices to an Xbox-like gamepad.</p>\n<p>GLFW supports this mapping format and contains a copy of the mappings available at the time of release. See <a class=\"el\" href=\"input_guide.html#gamepad_mapping\">Gamepad mappings</a> for how to update this at runtime. Mappings will be assigned to joysticks automatically any time a joystick is connected or the mappings are updated.</p>\n<p>You can check whether a joystick is both present and has a gamepad mapping with <a class=\"el\" href=\"group__input.html#gad0f676860f329d80f7e47e9f06a96f00\">glfwJoystickIsGamepad</a>.</p>\n<div class=\"fragment\"><div class=\"line\"><span class=\"keywordflow\">if</span> (<a class=\"code\" href=\"group__input.html#gad0f676860f329d80f7e47e9f06a96f00\">glfwJoystickIsGamepad</a>(<a class=\"code\" href=\"group__joysticks.html#ga6eab65ec88e65e0850ef8413504cb50c\">GLFW_JOYSTICK_2</a>))</div>\n<div class=\"line\">{</div>\n<div class=\"line\">    <span class=\"comment\">// Use as gamepad</span></div>\n<div class=\"line\">}</div>\n</div><!-- fragment --><p>If you are only interested in gamepad input you can use this function instead of <a class=\"el\" href=\"group__input.html#gaed0966cee139d815317f9ffcba64c9f1\">glfwJoystickPresent</a>.</p>\n<p>You can query the human-readable name provided by the gamepad mapping with <a class=\"el\" href=\"group__input.html#ga5c71e3533b2d384db9317fcd7661b210\">glfwGetGamepadName</a>. This may or may not be the same as the <a class=\"el\" href=\"input_guide.html#joystick_name\">joystick name</a>.</p>\n<div class=\"fragment\"><div class=\"line\"><span class=\"keyword\">const</span> <span class=\"keywordtype\">char</span>* name = <a class=\"code\" href=\"group__input.html#ga5c71e3533b2d384db9317fcd7661b210\">glfwGetGamepadName</a>(<a class=\"code\" href=\"group__joysticks.html#ga20a9f4f3aaefed9ea5e66072fc588b87\">GLFW_JOYSTICK_7</a>);</div>\n</div><!-- fragment --><p>To retrieve the gamepad state of a joystick, call <a class=\"el\" href=\"group__input.html#gadccddea8bce6113fa459de379ddaf051\">glfwGetGamepadState</a>.</p>\n<div class=\"fragment\"><div class=\"line\"><a class=\"code\" href=\"structGLFWgamepadstate.html\">GLFWgamepadstate</a> state;</div>\n<div class=\"line\"> </div>\n<div class=\"line\"><span class=\"keywordflow\">if</span> (<a class=\"code\" href=\"group__input.html#gadccddea8bce6113fa459de379ddaf051\">glfwGetGamepadState</a>(<a class=\"code\" href=\"group__joysticks.html#gae6f3eedfeb42424c2f5e3161efb0b654\">GLFW_JOYSTICK_3</a>, &amp;state))</div>\n<div class=\"line\">{</div>\n<div class=\"line\">    <span class=\"keywordflow\">if</span> (state.<a class=\"code\" href=\"structGLFWgamepadstate.html#a27e9896b51c65df15fba2c7139bfdb9a\">buttons</a>[<a class=\"code\" href=\"group__gamepad__buttons.html#gae055a12fbf4b48b5954c8e1cd129b810\">GLFW_GAMEPAD_BUTTON_A</a>])</div>\n<div class=\"line\">    {</div>\n<div class=\"line\">        input_jump();</div>\n<div class=\"line\">    }</div>\n<div class=\"line\"> </div>\n<div class=\"line\">    input_speed(state.<a class=\"code\" href=\"structGLFWgamepadstate.html#a8b2c8939b1d31458de5359998375c189\">axes</a>[<a class=\"code\" href=\"group__gamepad__axes.html#ga121a7d5d20589a423cd1634dd6ee6eab\">GLFW_GAMEPAD_AXIS_RIGHT_TRIGGER</a>]);</div>\n<div class=\"line\">}</div>\n</div><!-- fragment --><p>The <a class=\"el\" href=\"structGLFWgamepadstate.html\">GLFWgamepadstate</a> struct has two arrays; one for button states and one for axis states. The values for each button and axis are the same as for the <a class=\"el\" href=\"group__input.html#gadb3cbf44af90a1536f519659a53bddd6\">glfwGetJoystickButtons</a> and <a class=\"el\" href=\"group__input.html#gaa8806536731e92c061bc70bcff6edbd0\">glfwGetJoystickAxes</a> functions, i.e. <code>GLFW_PRESS</code> or <code>GLFW_RELEASE</code> for buttons and -1.0 to 1.0 inclusive for axes.</p>\n<p>The sizes of the arrays and the positions within each array are fixed.</p>\n<p>The <a class=\"el\" href=\"group__gamepad__buttons.html\">button indices</a> are <code>GLFW_GAMEPAD_BUTTON_A</code>, <code>GLFW_GAMEPAD_BUTTON_B</code>, <code>GLFW_GAMEPAD_BUTTON_X</code>, <code>GLFW_GAMEPAD_BUTTON_Y</code>, <code>GLFW_GAMEPAD_BUTTON_LEFT_BUMPER</code>, <code>GLFW_GAMEPAD_BUTTON_RIGHT_BUMPER</code>, <code>GLFW_GAMEPAD_BUTTON_BACK</code>, <code>GLFW_GAMEPAD_BUTTON_START</code>, <code>GLFW_GAMEPAD_BUTTON_GUIDE</code>, <code>GLFW_GAMEPAD_BUTTON_LEFT_THUMB</code>, <code>GLFW_GAMEPAD_BUTTON_RIGHT_THUMB</code>, <code>GLFW_GAMEPAD_BUTTON_DPAD_UP</code>, <code>GLFW_GAMEPAD_BUTTON_DPAD_RIGHT</code>, <code>GLFW_GAMEPAD_BUTTON_DPAD_DOWN</code> and <code>GLFW_GAMEPAD_BUTTON_DPAD_LEFT</code>.</p>\n<p>For those who prefer, there are also the <code>GLFW_GAMEPAD_BUTTON_CROSS</code>, <code>GLFW_GAMEPAD_BUTTON_CIRCLE</code>, <code>GLFW_GAMEPAD_BUTTON_SQUARE</code> and <code>GLFW_GAMEPAD_BUTTON_TRIANGLE</code> aliases for the A, B, X and Y button indices.</p>\n<p>The <a class=\"el\" href=\"group__gamepad__axes.html\">axis indices</a> are <code>GLFW_GAMEPAD_AXIS_LEFT_X</code>, <code>GLFW_GAMEPAD_AXIS_LEFT_Y</code>, <code>GLFW_GAMEPAD_AXIS_RIGHT_X</code>, <code>GLFW_GAMEPAD_AXIS_RIGHT_Y</code>, <code>GLFW_GAMEPAD_AXIS_LEFT_TRIGGER</code> and <code>GLFW_GAMEPAD_AXIS_RIGHT_TRIGGER</code>.</p>\n<p>The <code>GLFW_GAMEPAD_BUTTON_LAST</code> and <code>GLFW_GAMEPAD_AXIS_LAST</code> constants equal the largest available index for each array.</p>\n<h2><a class=\"anchor\" id=\"gamepad_mapping\"></a>\nGamepad mappings</h2>\n<p>GLFW contains a copy of the mappings available in <a href=\"https://github.com/gabomdq/SDL_GameControllerDB\">SDL_GameControllerDB</a> at the time of release. Newer ones can be added at runtime with <a class=\"el\" href=\"group__input.html#gaed5104612f2fa8e66aa6e846652ad00f\">glfwUpdateGamepadMappings</a>.</p>\n<div class=\"fragment\"><div class=\"line\"><span class=\"keyword\">const</span> <span class=\"keywordtype\">char</span>* mappings = load_file_contents(<span class=\"stringliteral\">&quot;game/data/gamecontrollerdb.txt&quot;</span>);</div>\n<div class=\"line\"> </div>\n<div class=\"line\"><a class=\"code\" href=\"group__input.html#gaed5104612f2fa8e66aa6e846652ad00f\">glfwUpdateGamepadMappings</a>(mappings);</div>\n</div><!-- fragment --><p>This function supports everything from single lines up to and including the unmodified contents of the whole <code>gamecontrollerdb.txt</code> file.</p>\n<p>Below is a description of the mapping format. Please keep in mind that <b>this description is not authoritative</b>. The format is defined by the SDL and SDL_GameControllerDB projects and their documentation and code takes precedence.</p>\n<p>Each mapping is a single line of comma-separated values describing the GUID, name and layout of the gamepad. Lines that do not begin with a hexadecimal digit are ignored.</p>\n<p>The first value is always the gamepad GUID, a 32 character long hexadecimal string that typically identifies its make, model, revision and the type of connection to the computer. When this information is not available, the GUID is generated using the gamepad name. GLFW uses the SDL 2.0.5+ GUID format but can convert from the older formats.</p>\n<p>The second value is always the human-readable name of the gamepad.</p>\n<p>All subsequent values are in the form <code>&lt;field&gt;:&lt;value&gt;</code> and describe the layout of the mapping. These fields may not all be present and may occur in any order.</p>\n<p>The button fields are <code>a</code>, <code>b</code>, <code>c</code>, <code>d</code>, <code>back</code>, <code>start</code>, <code>guide</code>, <code>dpup</code>, <code>dpright</code>, <code>dpdown</code>, <code>dpleft</code>, <code>leftshoulder</code>, <code>rightshoulder</code>, <code>leftstick</code> and <code>rightstick</code>.</p>\n<p>The axis fields are <code>leftx</code>, <code>lefty</code>, <code>rightx</code>, <code>righty</code>, <code>lefttrigger</code> and <code>righttrigger</code>.</p>\n<p>The value of an axis or button field can be a joystick button, a joystick axis, a hat bitmask or empty. Joystick buttons are specified as <code>bN</code>, for example <code>b2</code> for the third button. Joystick axes are specified as <code>aN</code>, for example <code>a7</code> for the eighth button. Joystick hat bit masks are specified as <code>hN.N</code>, for example <code>h0.8</code> for left on the first hat. More than one bit may be set in the mask.</p>\n<p>Before an axis there may be a <code>+</code> or <code>-</code> range modifier, for example <code>+a3</code> for the positive half of the fourth axis. This restricts input to only the positive or negative halves of the joystick axis. After an axis or half-axis there may be the <code>~</code> inversion modifier, for example <code>a2~</code> or <code>-a7~</code>. This negates the values of the gamepad axis.</p>\n<p>The hat bit mask match the <a class=\"el\" href=\"group__hat__state.html\">hat states</a> in the joystick functions.</p>\n<p>There is also the special <code>platform</code> field that specifies which platform the mapping is valid for. Possible values are <code>Windows</code>, <code>Mac OS X</code> and <code>Linux</code>.</p>\n<p>Below is an example of what a gamepad mapping might look like. It is the one built into GLFW for Xbox controllers accessed via the XInput API on Windows. This example has been broken into several lines to fit on the page, but real gamepad mappings must be a single line.</p>\n<div class=\"fragment\"><div class=\"line\">78696e70757401000000000000000000,XInput Gamepad (GLFW),platform:Windows,a:b0,</div>\n<div class=\"line\">b:b1,x:b2,y:b3,leftshoulder:b4,rightshoulder:b5,back:b6,start:b7,leftstick:b8,</div>\n<div class=\"line\">rightstick:b9,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:a4,</div>\n<div class=\"line\">righttrigger:a5,dpup:h0.1,dpright:h0.2,dpdown:h0.4,dpleft:h0.8,</div>\n</div><!-- fragment --><dl class=\"section note\"><dt>Note</dt><dd>GLFW does not yet support the output range and modifiers <code>+</code> and <code>-</code> that were recently added to SDL. The input modifiers <code>+</code>, <code>-</code> and <code>~</code> are supported and described above.</dd></dl>\n<h1><a class=\"anchor\" id=\"time\"></a>\nTime input</h1>\n<p>GLFW provides high-resolution time input, in seconds, with <a class=\"el\" href=\"group__input.html#gaa6cf4e7a77158a3b8fd00328b1720a4a\">glfwGetTime</a>.</p>\n<div class=\"fragment\"><div class=\"line\"><span class=\"keywordtype\">double</span> seconds = <a class=\"code\" href=\"group__input.html#gaa6cf4e7a77158a3b8fd00328b1720a4a\">glfwGetTime</a>();</div>\n</div><!-- fragment --><p>It returns the number of seconds since the library was initialized with <a class=\"el\" href=\"group__init.html#ga317aac130a235ab08c6db0834907d85e\">glfwInit</a>. The platform-specific time sources used typically have micro- or nanosecond resolution.</p>\n<p>You can modify the base time with <a class=\"el\" href=\"group__input.html#gaf59589ef6e8b8c8b5ad184b25afd4dc0\">glfwSetTime</a>.</p>\n<div class=\"fragment\"><div class=\"line\"><a class=\"code\" href=\"group__input.html#gaf59589ef6e8b8c8b5ad184b25afd4dc0\">glfwSetTime</a>(4.0);</div>\n</div><!-- fragment --><p>This sets the time to the specified time, in seconds, and it continues to count from there.</p>\n<p>You can also access the raw timer used to implement the functions above, with <a class=\"el\" href=\"group__input.html#ga09b2bd37d328e0b9456c7ec575cc26aa\">glfwGetTimerValue</a>.</p>\n<div class=\"fragment\"><div class=\"line\">uint64_t value = <a class=\"code\" href=\"group__input.html#ga09b2bd37d328e0b9456c7ec575cc26aa\">glfwGetTimerValue</a>();</div>\n</div><!-- fragment --><p>This value is in 1&#160;/&#160;frequency seconds. The frequency of the raw timer varies depending on the operating system and hardware. You can query the frequency, in Hz, with <a class=\"el\" href=\"group__input.html#ga3289ee876572f6e91f06df3a24824443\">glfwGetTimerFrequency</a>.</p>\n<div class=\"fragment\"><div class=\"line\">uint64_t frequency = <a class=\"code\" href=\"group__input.html#ga3289ee876572f6e91f06df3a24824443\">glfwGetTimerFrequency</a>();</div>\n</div><!-- fragment --><h1><a class=\"anchor\" id=\"clipboard\"></a>\nClipboard input and output</h1>\n<p>If the system clipboard contains a UTF-8 encoded string or if it can be converted to one, you can retrieve it with <a class=\"el\" href=\"group__input.html#ga5aba1d704d9ab539282b1fbe9f18bb94\">glfwGetClipboardString</a>. See the reference documentation for the lifetime of the returned string.</p>\n<div class=\"fragment\"><div class=\"line\"><span class=\"keyword\">const</span> <span class=\"keywordtype\">char</span>* text = <a class=\"code\" href=\"group__input.html#ga5aba1d704d9ab539282b1fbe9f18bb94\">glfwGetClipboardString</a>(NULL);</div>\n<div class=\"line\"><span class=\"keywordflow\">if</span> (text)</div>\n<div class=\"line\">{</div>\n<div class=\"line\">    insert_text(text);</div>\n<div class=\"line\">}</div>\n</div><!-- fragment --><p>If the clipboard is empty or if its contents could not be converted, <code>NULL</code> is returned.</p>\n<p>The contents of the system clipboard can be set to a UTF-8 encoded string with <a class=\"el\" href=\"group__input.html#gaba1f022c5eb07dfac421df34cdcd31dd\">glfwSetClipboardString</a>.</p>\n<div class=\"fragment\"><div class=\"line\"><a class=\"code\" href=\"group__input.html#gaba1f022c5eb07dfac421df34cdcd31dd\">glfwSetClipboardString</a>(NULL, <span class=\"stringliteral\">&quot;A string with words in it&quot;</span>);</div>\n</div><!-- fragment --><h1><a class=\"anchor\" id=\"path_drop\"></a>\nPath drop input</h1>\n<p>If you wish to receive the paths of files and/or directories dropped on a window, set a file drop callback.</p>\n<div class=\"fragment\"><div class=\"line\"><a class=\"code\" href=\"group__input.html#gab773f0ee0a07cff77a210cea40bc1f6b\">glfwSetDropCallback</a>(window, drop_callback);</div>\n</div><!-- fragment --><p>The callback function receives an array of paths encoded as UTF-8.</p>\n<div class=\"fragment\"><div class=\"line\"><span class=\"keywordtype\">void</span> drop_callback(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window, <span class=\"keywordtype\">int</span> count, <span class=\"keyword\">const</span> <span class=\"keywordtype\">char</span>** paths)</div>\n<div class=\"line\">{</div>\n<div class=\"line\">    <span class=\"keywordtype\">int</span> i;</div>\n<div class=\"line\">    <span class=\"keywordflow\">for</span> (i = 0;  i &lt; count;  i++)</div>\n<div class=\"line\">        handle_dropped_file(paths[i]);</div>\n<div class=\"line\">}</div>\n</div><!-- fragment --><p>The path array and its strings are only valid until the file drop callback returns, as they may have been generated specifically for that event. You need to make a deep copy of the array if you want to keep the paths. </p>\n</div></div><!-- contents -->\n</div><!-- PageDoc -->\n<div class=\"ttc\" id=\"agroup__joysticks_html_ga20a9f4f3aaefed9ea5e66072fc588b87\"><div class=\"ttname\"><a href=\"group__joysticks.html#ga20a9f4f3aaefed9ea5e66072fc588b87\">GLFW_JOYSTICK_7</a></div><div class=\"ttdeci\">#define GLFW_JOYSTICK_7</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:566</div></div>\n<div class=\"ttc\" id=\"agroup__input_html_gadccddea8bce6113fa459de379ddaf051\"><div class=\"ttname\"><a href=\"group__input.html#gadccddea8bce6113fa459de379ddaf051\">glfwGetGamepadState</a></div><div class=\"ttdeci\">int glfwGetGamepadState(int jid, GLFWgamepadstate *state)</div><div class=\"ttdoc\">Retrieves the state of the specified joystick remapped as a gamepad.</div></div>\n<div class=\"ttc\" id=\"aglfw3_8h_html_a2315b99a329ce53e6a13a9d46fd5ca88\"><div class=\"ttname\"><a href=\"glfw3_8h.html#a2315b99a329ce53e6a13a9d46fd5ca88\">GLFW_CURSOR_DISABLED</a></div><div class=\"ttdeci\">#define GLFW_CURSOR_DISABLED</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:1024</div></div>\n<div class=\"ttc\" id=\"aglfw3_8h_html_ae04dd25c8577e19fa8c97368561f6c68\"><div class=\"ttname\"><a href=\"glfw3_8h.html#ae04dd25c8577e19fa8c97368561f6c68\">GLFW_CURSOR_NORMAL</a></div><div class=\"ttdeci\">#define GLFW_CURSOR_NORMAL</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:1022</div></div>\n<div class=\"ttc\" id=\"aglfw3_8h_html_aade31da5b884a84a7625c6b059b9132c\"><div class=\"ttname\"><a href=\"glfw3_8h.html#aade31da5b884a84a7625c6b059b9132c\">GLFW_CURSOR</a></div><div class=\"ttdeci\">#define GLFW_CURSOR</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:1016</div></div>\n<div class=\"ttc\" id=\"aglfw3_8h_html_ac4d5cb9d78de8573349c58763d53bf11\"><div class=\"ttname\"><a href=\"glfw3_8h.html#ac4d5cb9d78de8573349c58763d53bf11\">GLFW_CURSOR_HIDDEN</a></div><div class=\"ttdeci\">#define GLFW_CURSOR_HIDDEN</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:1023</div></div>\n<div class=\"ttc\" id=\"aglfw3_8h_html_ae3bbe2315b7691ab088159eb6c9110fc\"><div class=\"ttname\"><a href=\"glfw3_8h.html#ae3bbe2315b7691ab088159eb6c9110fc\">GLFW_STICKY_KEYS</a></div><div class=\"ttdeci\">#define GLFW_STICKY_KEYS</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:1017</div></div>\n<div class=\"ttc\" id=\"agroup__joysticks_html_gae43281bc66d3fa5089fb50c3e7a28695\"><div class=\"ttname\"><a href=\"group__joysticks.html#gae43281bc66d3fa5089fb50c3e7a28695\">GLFW_JOYSTICK_5</a></div><div class=\"ttdeci\">#define GLFW_JOYSTICK_5</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:564</div></div>\n<div class=\"ttc\" id=\"agroup__input_html_gaa6cf4e7a77158a3b8fd00328b1720a4a\"><div class=\"ttname\"><a href=\"group__input.html#gaa6cf4e7a77158a3b8fd00328b1720a4a\">glfwGetTime</a></div><div class=\"ttdeci\">double glfwGetTime(void)</div><div class=\"ttdoc\">Returns the GLFW time.</div></div>\n<div class=\"ttc\" id=\"agroup__input_html_gaed5104612f2fa8e66aa6e846652ad00f\"><div class=\"ttname\"><a href=\"group__input.html#gaed5104612f2fa8e66aa6e846652ad00f\">glfwUpdateGamepadMappings</a></div><div class=\"ttdeci\">int glfwUpdateGamepadMappings(const char *string)</div><div class=\"ttdoc\">Adds the specified SDL_GameControllerDB gamepad mappings.</div></div>\n<div class=\"ttc\" id=\"agroup__input_html_gafbe3e51f670320908cfe4e20d3e5559e\"><div class=\"ttname\"><a href=\"group__input.html#gafbe3e51f670320908cfe4e20d3e5559e\">glfwGetJoystickName</a></div><div class=\"ttdeci\">const char * glfwGetJoystickName(int jid)</div><div class=\"ttdoc\">Returns the name of the specified joystick.</div></div>\n<div class=\"ttc\" id=\"agroup__input_html_gac1473feacb5996c01a7a5a33b5066704\"><div class=\"ttname\"><a href=\"group__input.html#gac1473feacb5996c01a7a5a33b5066704\">glfwGetMouseButton</a></div><div class=\"ttdeci\">int glfwGetMouseButton(GLFWwindow *window, int button)</div><div class=\"ttdoc\">Returns the last reported state of a mouse button for the specified window.</div></div>\n<div class=\"ttc\" id=\"agroup__input_html_ga67ddd1b7dcbbaff03e4a76c0ea67103a\"><div class=\"ttname\"><a href=\"group__input.html#ga67ddd1b7dcbbaff03e4a76c0ea67103a\">glfwGetKeyScancode</a></div><div class=\"ttdeci\">int glfwGetKeyScancode(int key)</div><div class=\"ttdoc\">Returns the platform-specific scancode of the specified key.</div></div>\n<div class=\"ttc\" id=\"agroup__input_html_gafca356935e10135016aa49ffa464c355\"><div class=\"ttname\"><a href=\"group__input.html#gafca356935e10135016aa49ffa464c355\">glfwCreateCursor</a></div><div class=\"ttdeci\">GLFWcursor * glfwCreateCursor(const GLFWimage *image, int xhot, int yhot)</div><div class=\"ttdoc\">Creates a custom cursor.</div></div>\n<div class=\"ttc\" id=\"agroup__input_html_ga2485743d0b59df3791c45951c4195265\"><div class=\"ttname\"><a href=\"group__input.html#ga2485743d0b59df3791c45951c4195265\">GLFW_PRESS</a></div><div class=\"ttdeci\">#define GLFW_PRESS</div><div class=\"ttdoc\">The key or mouse button was pressed.</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:306</div></div>\n<div class=\"ttc\" id=\"agroup__input_html_ga237a182e5ec0b21ce64543f3b5e7e2be\"><div class=\"ttname\"><a href=\"group__input.html#ga237a182e5ec0b21ce64543f3b5e7e2be\">glfwGetKeyName</a></div><div class=\"ttdeci\">const char * glfwGetKeyName(int key, int scancode)</div><div class=\"ttdoc\">Returns the layout-specific name of the specified printable key.</div></div>\n<div class=\"ttc\" id=\"astructGLFWimage_html_a0b7d95368f0c80d5e5c9875057c7dbec\"><div class=\"ttname\"><a href=\"structGLFWimage.html#a0b7d95368f0c80d5e5c9875057c7dbec\">GLFWimage::height</a></div><div class=\"ttdeci\">int height</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:1694</div></div>\n<div class=\"ttc\" id=\"agroup__input_html_gaa92336e173da9c8834558b54ee80563b\"><div class=\"ttname\"><a href=\"group__input.html#gaa92336e173da9c8834558b54ee80563b\">glfwSetInputMode</a></div><div class=\"ttdeci\">void glfwSetInputMode(GLFWwindow *window, int mode, int value)</div><div class=\"ttdoc\">Sets an input option for the specified window.</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_ga8665c71c6fa3d22425c6a0e8a3f89d8a\"><div class=\"ttname\"><a href=\"group__window.html#ga8665c71c6fa3d22425c6a0e8a3f89d8a\">GLFW_HOVERED</a></div><div class=\"ttdeci\">#define GLFW_HOVERED</div><div class=\"ttdoc\">Mouse cursor hover window attribute.</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:823</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_ga3c96d80d363e67d13a41b5d1821f3242\"><div class=\"ttname\"><a href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a></div><div class=\"ttdeci\">struct GLFWwindow GLFWwindow</div><div class=\"ttdoc\">Opaque window object.</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:1152</div></div>\n<div class=\"ttc\" id=\"agroup__keys_html_gaa06a712e6202661fc03da5bdb7b6e545\"><div class=\"ttname\"><a href=\"group__keys.html#gaa06a712e6202661fc03da5bdb7b6e545\">GLFW_KEY_W</a></div><div class=\"ttdeci\">#define GLFW_KEY_W</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:402</div></div>\n<div class=\"ttc\" id=\"agroup__keys_html_gabf48fcc3afbe69349df432b470c96ef2\"><div class=\"ttname\"><a href=\"group__keys.html#gabf48fcc3afbe69349df432b470c96ef2\">GLFW_KEY_E</a></div><div class=\"ttdeci\">#define GLFW_KEY_E</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:384</div></div>\n<div class=\"ttc\" id=\"agroup__input_html_ga6ab84420974d812bee700e45284a723c\"><div class=\"ttname\"><a href=\"group__input.html#ga6ab84420974d812bee700e45284a723c\">glfwSetMouseButtonCallback</a></div><div class=\"ttdeci\">GLFWmousebuttonfun glfwSetMouseButtonCallback(GLFWwindow *window, GLFWmousebuttonfun callback)</div><div class=\"ttdoc\">Sets the mouse button callback.</div></div>\n<div class=\"ttc\" id=\"agroup__input_html_ga2d8d0634bb81c180899aeb07477a67ea\"><div class=\"ttname\"><a href=\"group__input.html#ga2d8d0634bb81c180899aeb07477a67ea\">glfwGetJoystickHats</a></div><div class=\"ttdeci\">const unsigned char * glfwGetJoystickHats(int jid, int *count)</div><div class=\"ttdoc\">Returns the state of all hats of the specified joystick.</div></div>\n<div class=\"ttc\" id=\"agroup__input_html_ga5c71e3533b2d384db9317fcd7661b210\"><div class=\"ttname\"><a href=\"group__input.html#ga5c71e3533b2d384db9317fcd7661b210\">glfwGetGamepadName</a></div><div class=\"ttdeci\">const char * glfwGetGamepadName(int jid)</div><div class=\"ttdoc\">Returns the human-readable gamepad name for the specified joystick.</div></div>\n<div class=\"ttc\" id=\"agroup__joysticks_html_ga34a0443d059e9f22272cd4669073f73d\"><div class=\"ttname\"><a href=\"group__joysticks.html#ga34a0443d059e9f22272cd4669073f73d\">GLFW_JOYSTICK_1</a></div><div class=\"ttdeci\">#define GLFW_JOYSTICK_1</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:560</div></div>\n<div class=\"ttc\" id=\"agroup__input_html_gaf59589ef6e8b8c8b5ad184b25afd4dc0\"><div class=\"ttname\"><a href=\"group__input.html#gaf59589ef6e8b8c8b5ad184b25afd4dc0\">glfwSetTime</a></div><div class=\"ttdeci\">void glfwSetTime(double time)</div><div class=\"ttdoc\">Sets the GLFW time.</div></div>\n<div class=\"ttc\" id=\"agroup__input_html_ga01d37b6c40133676b9cea60ca1d7c0cc\"><div class=\"ttname\"><a href=\"group__input.html#ga01d37b6c40133676b9cea60ca1d7c0cc\">glfwGetCursorPos</a></div><div class=\"ttdeci\">void glfwGetCursorPos(GLFWwindow *window, double *xpos, double *ypos)</div><div class=\"ttdoc\">Retrieves the position of the cursor relative to the content area of the window.</div></div>\n<div class=\"ttc\" id=\"agroup__input_html_gad0f676860f329d80f7e47e9f06a96f00\"><div class=\"ttname\"><a href=\"group__input.html#gad0f676860f329d80f7e47e9f06a96f00\">glfwJoystickIsGamepad</a></div><div class=\"ttdeci\">int glfwJoystickIsGamepad(int jid)</div><div class=\"ttdoc\">Returns whether the specified joystick has a gamepad mapping.</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_ga37bd57223967b4211d60ca1a0bf3c832\"><div class=\"ttname\"><a href=\"group__window.html#ga37bd57223967b4211d60ca1a0bf3c832\">glfwPollEvents</a></div><div class=\"ttdeci\">void glfwPollEvents(void)</div><div class=\"ttdoc\">Processes all pending events.</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_ga554e37d781f0a997656c26b2c56c835e\"><div class=\"ttname\"><a href=\"group__window.html#ga554e37d781f0a997656c26b2c56c835e\">glfwWaitEvents</a></div><div class=\"ttdeci\">void glfwWaitEvents(void)</div><div class=\"ttdoc\">Waits until events are queued and processes them.</div></div>\n<div class=\"ttc\" id=\"agroup__input_html_ga81b952cd1764274d0db7fb3c5a79ba6a\"><div class=\"ttname\"><a href=\"group__input.html#ga81b952cd1764274d0db7fb3c5a79ba6a\">glfwDestroyCursor</a></div><div class=\"ttdeci\">void glfwDestroyCursor(GLFWcursor *cursor)</div><div class=\"ttdoc\">Destroys a cursor.</div></div>\n<div class=\"ttc\" id=\"agroup__input_html_gadb3cbf44af90a1536f519659a53bddd6\"><div class=\"ttname\"><a href=\"group__input.html#gadb3cbf44af90a1536f519659a53bddd6\">glfwGetJoystickButtons</a></div><div class=\"ttdeci\">const unsigned char * glfwGetJoystickButtons(int jid, int *count)</div><div class=\"ttdoc\">Returns the state of all buttons of the specified joystick.</div></div>\n<div class=\"ttc\" id=\"aglfw3_8h_html_a4d7ce8ce71030c3b04e2b78145bc59d1\"><div class=\"ttname\"><a href=\"glfw3_8h.html#a4d7ce8ce71030c3b04e2b78145bc59d1\">GLFW_STICKY_MOUSE_BUTTONS</a></div><div class=\"ttdeci\">#define GLFW_STICKY_MOUSE_BUTTONS</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:1018</div></div>\n<div class=\"ttc\" id=\"agroup__input_html_gab25c4a220fd8f5717718dbc487828996\"><div class=\"ttname\"><a href=\"group__input.html#gab25c4a220fd8f5717718dbc487828996\">glfwSetCharCallback</a></div><div class=\"ttdeci\">GLFWcharfun glfwSetCharCallback(GLFWwindow *window, GLFWcharfun callback)</div><div class=\"ttdoc\">Sets the Unicode character callback.</div></div>\n<div class=\"ttc\" id=\"agroup__input_html_ga5aba1d704d9ab539282b1fbe9f18bb94\"><div class=\"ttname\"><a href=\"group__input.html#ga5aba1d704d9ab539282b1fbe9f18bb94\">glfwGetClipboardString</a></div><div class=\"ttdeci\">const char * glfwGetClipboardString(GLFWwindow *window)</div><div class=\"ttdoc\">Returns the contents of the clipboard as a string.</div></div>\n<div class=\"ttc\" id=\"agroup__input_html_gad27f8ad0142c038a281466c0966817d8\"><div class=\"ttname\"><a href=\"group__input.html#gad27f8ad0142c038a281466c0966817d8\">glfwSetCursorEnterCallback</a></div><div class=\"ttdeci\">GLFWcursorenterfun glfwSetCursorEnterCallback(GLFWwindow *window, GLFWcursorenterfun callback)</div><div class=\"ttdoc\">Sets the cursor enter/leave callback.</div></div>\n<div class=\"ttc\" id=\"agroup__input_html_gad3b4f38c8d5dae036bc8fa959e18343e\"><div class=\"ttname\"><a href=\"group__input.html#gad3b4f38c8d5dae036bc8fa959e18343e\">glfwSetCursor</a></div><div class=\"ttdeci\">void glfwSetCursor(GLFWwindow *window, GLFWcursor *cursor)</div><div class=\"ttdoc\">Sets the cursor for the window.</div></div>\n<div class=\"ttc\" id=\"agroup__input_html_gae4ee0dbd0d256183e1ea4026d897e1c2\"><div class=\"ttname\"><a href=\"group__input.html#gae4ee0dbd0d256183e1ea4026d897e1c2\">glfwRawMouseMotionSupported</a></div><div class=\"ttdeci\">int glfwRawMouseMotionSupported(void)</div><div class=\"ttdoc\">Returns whether raw mouse motion is supported.</div></div>\n<div class=\"ttc\" id=\"astructGLFWimage_html_a0c532a5c2bb715555279b7817daba0fb\"><div class=\"ttname\"><a href=\"structGLFWimage.html#a0c532a5c2bb715555279b7817daba0fb\">GLFWimage::pixels</a></div><div class=\"ttdeci\">unsigned char * pixels</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:1697</div></div>\n<div class=\"ttc\" id=\"agroup__gamepad__axes_html_ga121a7d5d20589a423cd1634dd6ee6eab\"><div class=\"ttname\"><a href=\"group__gamepad__axes.html#ga121a7d5d20589a423cd1634dd6ee6eab\">GLFW_GAMEPAD_AXIS_RIGHT_TRIGGER</a></div><div class=\"ttdeci\">#define GLFW_GAMEPAD_AXIS_RIGHT_TRIGGER</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:621</div></div>\n<div class=\"ttc\" id=\"agroup__joysticks_html_ga97ddbcad02b7f48d74fad4ddb08fff59\"><div class=\"ttname\"><a href=\"group__joysticks.html#ga97ddbcad02b7f48d74fad4ddb08fff59\">GLFW_JOYSTICK_4</a></div><div class=\"ttdeci\">#define GLFW_JOYSTICK_4</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:563</div></div>\n<div class=\"ttc\" id=\"agroup__init_html_ga2744fbb29b5631bb28802dbe0cf36eba\"><div class=\"ttname\"><a href=\"group__init.html#ga2744fbb29b5631bb28802dbe0cf36eba\">GLFW_TRUE</a></div><div class=\"ttdeci\">#define GLFW_TRUE</div><div class=\"ttdoc\">One.</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:280</div></div>\n<div class=\"ttc\" id=\"agroup__input_html_gaed0966cee139d815317f9ffcba64c9f1\"><div class=\"ttname\"><a href=\"group__input.html#gaed0966cee139d815317f9ffcba64c9f1\">glfwJoystickPresent</a></div><div class=\"ttdeci\">int glfwJoystickPresent(int jid)</div><div class=\"ttdoc\">Returns whether the specified joystick is present.</div></div>\n<div class=\"ttc\" id=\"astructGLFWgamepadstate_html_a27e9896b51c65df15fba2c7139bfdb9a\"><div class=\"ttname\"><a href=\"structGLFWgamepadstate.html#a27e9896b51c65df15fba2c7139bfdb9a\">GLFWgamepadstate::buttons</a></div><div class=\"ttdeci\">unsigned char buttons[15]</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:1716</div></div>\n<div class=\"ttc\" id=\"aglfw3_8h_html_aab64b25921ef21d89252d6f0a71bfc32\"><div class=\"ttname\"><a href=\"glfw3_8h.html#aab64b25921ef21d89252d6f0a71bfc32\">GLFW_DISCONNECTED</a></div><div class=\"ttdeci\">#define GLFW_DISCONNECTED</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:1075</div></div>\n<div class=\"ttc\" id=\"agroup__gamepad__buttons_html_gae055a12fbf4b48b5954c8e1cd129b810\"><div class=\"ttname\"><a href=\"group__gamepad__buttons.html#gae055a12fbf4b48b5954c8e1cd129b810\">GLFW_GAMEPAD_BUTTON_A</a></div><div class=\"ttdeci\">#define GLFW_GAMEPAD_BUTTON_A</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:586</div></div>\n<div class=\"ttc\" id=\"agroup__input_html_ga09b2bd37d328e0b9456c7ec575cc26aa\"><div class=\"ttname\"><a href=\"group__input.html#ga09b2bd37d328e0b9456c7ec575cc26aa\">glfwGetTimerValue</a></div><div class=\"ttdeci\">uint64_t glfwGetTimerValue(void)</div><div class=\"ttdoc\">Returns the current value of the raw timer.</div></div>\n<div class=\"ttc\" id=\"agroup__input_html_gac1f879ab7435d54d4d79bb469fe225d7\"><div class=\"ttname\"><a href=\"group__input.html#gac1f879ab7435d54d4d79bb469fe225d7\">glfwSetCursorPosCallback</a></div><div class=\"ttdeci\">GLFWcursorposfun glfwSetCursorPosCallback(GLFWwindow *window, GLFWcursorposfun callback)</div><div class=\"ttdoc\">Sets the cursor position callback.</div></div>\n<div class=\"ttc\" id=\"agroup__input_html_ga3289ee876572f6e91f06df3a24824443\"><div class=\"ttname\"><a href=\"group__input.html#ga3289ee876572f6e91f06df3a24824443\">glfwGetTimerFrequency</a></div><div class=\"ttdeci\">uint64_t glfwGetTimerFrequency(void)</div><div class=\"ttdoc\">Returns the frequency, in Hz, of the raw timer.</div></div>\n<div class=\"ttc\" id=\"agroup__buttons_html_gaf37100431dcd5082d48f95ee8bc8cd56\"><div class=\"ttname\"><a href=\"group__buttons.html#gaf37100431dcd5082d48f95ee8bc8cd56\">GLFW_MOUSE_BUTTON_LEFT</a></div><div class=\"ttdeci\">#define GLFW_MOUSE_BUTTON_LEFT</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:548</div></div>\n<div class=\"ttc\" id=\"astructGLFWimage_html_af6a71cc999fe6d3aea31dd7e9687d835\"><div class=\"ttname\"><a href=\"structGLFWimage.html#af6a71cc999fe6d3aea31dd7e9687d835\">GLFWimage::width</a></div><div class=\"ttdeci\">int width</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:1691</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_ga605a178db92f1a7f1a925563ef3ea2cf\"><div class=\"ttname\"><a href=\"group__window.html#ga605a178db92f1a7f1a925563ef3ea2cf\">glfwWaitEventsTimeout</a></div><div class=\"ttdeci\">void glfwWaitEventsTimeout(double timeout)</div><div class=\"ttdoc\">Waits with timeout until events are queued and processes them.</div></div>\n<div class=\"ttc\" id=\"agroup__input_html_ga2f60a0e5b7bd8d1b7344dc0a7cb32b4c\"><div class=\"ttname\"><a href=\"group__input.html#ga2f60a0e5b7bd8d1b7344dc0a7cb32b4c\">glfwSetJoystickCallback</a></div><div class=\"ttdeci\">GLFWjoystickfun glfwSetJoystickCallback(GLFWjoystickfun callback)</div><div class=\"ttdoc\">Sets the joystick configuration callback.</div></div>\n<div class=\"ttc\" id=\"astructGLFWgamepadstate_html\"><div class=\"ttname\"><a href=\"structGLFWgamepadstate.html\">GLFWgamepadstate</a></div><div class=\"ttdoc\">Gamepad input state.</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:1711</div></div>\n<div class=\"ttc\" id=\"agroup__joysticks_html_gae6f3eedfeb42424c2f5e3161efb0b654\"><div class=\"ttname\"><a href=\"group__joysticks.html#gae6f3eedfeb42424c2f5e3161efb0b654\">GLFW_JOYSTICK_3</a></div><div class=\"ttdeci\">#define GLFW_JOYSTICK_3</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:562</div></div>\n<div class=\"ttc\" id=\"agroup__input_html_ga89261ae18c75e863aaf2656ecdd238f4\"><div class=\"ttname\"><a href=\"group__input.html#ga89261ae18c75e863aaf2656ecdd238f4\">GLFWcursor</a></div><div class=\"ttdeci\">struct GLFWcursor GLFWcursor</div><div class=\"ttdoc\">Opaque cursor object.</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:1164</div></div>\n<div class=\"ttc\" id=\"aglfw3_8h_html_aeeda1be76a44a1fc97c1282e06281fbb\"><div class=\"ttname\"><a href=\"glfw3_8h.html#aeeda1be76a44a1fc97c1282e06281fbb\">GLFW_RAW_MOUSE_MOTION</a></div><div class=\"ttdeci\">#define GLFW_RAW_MOUSE_MOTION</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:1020</div></div>\n<div class=\"ttc\" id=\"agroup__input_html_gaa65f416d03ebbbb5b8db71a489fcb894\"><div class=\"ttname\"><a href=\"group__input.html#gaa65f416d03ebbbb5b8db71a489fcb894\">glfwCreateStandardCursor</a></div><div class=\"ttdeci\">GLFWcursor * glfwCreateStandardCursor(int shape)</div><div class=\"ttdoc\">Creates a cursor with a standard shape.</div></div>\n<div class=\"ttc\" id=\"astructGLFWgamepadstate_html_a8b2c8939b1d31458de5359998375c189\"><div class=\"ttname\"><a href=\"structGLFWgamepadstate.html#a8b2c8939b1d31458de5359998375c189\">GLFWgamepadstate::axes</a></div><div class=\"ttdeci\">float axes[6]</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:1720</div></div>\n<div class=\"ttc\" id=\"astructGLFWimage_html\"><div class=\"ttname\"><a href=\"structGLFWimage.html\">GLFWimage</a></div><div class=\"ttdoc\">Image data.</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:1687</div></div>\n<div class=\"ttc\" id=\"agroup__shapes_html_gabb3eb0109f11bb808fc34659177ca962\"><div class=\"ttname\"><a href=\"group__shapes.html#gabb3eb0109f11bb808fc34659177ca962\">GLFW_HRESIZE_CURSOR</a></div><div class=\"ttdeci\">#define GLFW_HRESIZE_CURSOR</div><div class=\"ttdoc\">The horizontal resize arrow shape.</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:1066</div></div>\n<div class=\"ttc\" id=\"aglfw3_8h_html_abe11513fd1ffbee5bb9b173f06028b9e\"><div class=\"ttname\"><a href=\"glfw3_8h.html#abe11513fd1ffbee5bb9b173f06028b9e\">GLFW_CONNECTED</a></div><div class=\"ttdeci\">#define GLFW_CONNECTED</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:1074</div></div>\n<div class=\"ttc\" id=\"agroup__input_html_gab773f0ee0a07cff77a210cea40bc1f6b\"><div class=\"ttname\"><a href=\"group__input.html#gab773f0ee0a07cff77a210cea40bc1f6b\">glfwSetDropCallback</a></div><div class=\"ttdeci\">GLFWdropfun glfwSetDropCallback(GLFWwindow *window, GLFWdropfun callback)</div><div class=\"ttdoc\">Sets the path drop callback.</div></div>\n<div class=\"ttc\" id=\"agroup__input_html_ga1caf18159767e761185e49a3be019f8d\"><div class=\"ttname\"><a href=\"group__input.html#ga1caf18159767e761185e49a3be019f8d\">glfwSetKeyCallback</a></div><div class=\"ttdeci\">GLFWkeyfun glfwSetKeyCallback(GLFWwindow *window, GLFWkeyfun callback)</div><div class=\"ttdoc\">Sets the key callback.</div></div>\n<div class=\"ttc\" id=\"agroup__hat__state_html_ga252586e3bbde75f4b0e07ad3124867f5\"><div class=\"ttname\"><a href=\"group__hat__state.html#ga252586e3bbde75f4b0e07ad3124867f5\">GLFW_HAT_RIGHT</a></div><div class=\"ttdeci\">#define GLFW_HAT_RIGHT</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:325</div></div>\n<div class=\"ttc\" id=\"agroup__joysticks_html_ga6eab65ec88e65e0850ef8413504cb50c\"><div class=\"ttname\"><a href=\"group__joysticks.html#ga6eab65ec88e65e0850ef8413504cb50c\">GLFW_JOYSTICK_2</a></div><div class=\"ttdeci\">#define GLFW_JOYSTICK_2</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:561</div></div>\n<div class=\"ttc\" id=\"agroup__buttons_html_ga3e2f2cf3c4942df73cc094247d275e74\"><div class=\"ttname\"><a href=\"group__buttons.html#ga3e2f2cf3c4942df73cc094247d275e74\">GLFW_MOUSE_BUTTON_RIGHT</a></div><div class=\"ttdeci\">#define GLFW_MOUSE_BUTTON_RIGHT</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:549</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_gab5997a25187e9fd5c6f2ecbbc8dfd7e9\"><div class=\"ttname\"><a href=\"group__window.html#gab5997a25187e9fd5c6f2ecbbc8dfd7e9\">glfwPostEmptyEvent</a></div><div class=\"ttdeci\">void glfwPostEmptyEvent(void)</div><div class=\"ttdoc\">Posts an empty event to the event queue.</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_gacccb29947ea4b16860ebef42c2cb9337\"><div class=\"ttname\"><a href=\"group__window.html#gacccb29947ea4b16860ebef42c2cb9337\">glfwGetWindowAttrib</a></div><div class=\"ttdeci\">int glfwGetWindowAttrib(GLFWwindow *window, int attrib)</div><div class=\"ttdoc\">Returns an attribute of the specified window.</div></div>\n<div class=\"ttc\" id=\"agroup__input_html_ga571e45a030ae4061f746ed56cb76aede\"><div class=\"ttname\"><a href=\"group__input.html#ga571e45a030ae4061f746ed56cb76aede\">glfwSetScrollCallback</a></div><div class=\"ttdeci\">GLFWscrollfun glfwSetScrollCallback(GLFWwindow *window, GLFWscrollfun callback)</div><div class=\"ttdoc\">Sets the scroll callback.</div></div>\n<div class=\"ttc\" id=\"agroup__input_html_gadd341da06bc8d418b4dc3a3518af9ad2\"><div class=\"ttname\"><a href=\"group__input.html#gadd341da06bc8d418b4dc3a3518af9ad2\">glfwGetKey</a></div><div class=\"ttdeci\">int glfwGetKey(GLFWwindow *window, int key)</div><div class=\"ttdoc\">Returns the last reported state of a keyboard key for the specified window.</div></div>\n<div class=\"ttc\" id=\"agroup__input_html_gaa8806536731e92c061bc70bcff6edbd0\"><div class=\"ttname\"><a href=\"group__input.html#gaa8806536731e92c061bc70bcff6edbd0\">glfwGetJoystickAxes</a></div><div class=\"ttdeci\">const float * glfwGetJoystickAxes(int jid, int *count)</div><div class=\"ttdoc\">Returns the values of all axes of the specified joystick.</div></div>\n<div class=\"ttc\" id=\"agroup__input_html_gaba1f022c5eb07dfac421df34cdcd31dd\"><div class=\"ttname\"><a href=\"group__input.html#gaba1f022c5eb07dfac421df34cdcd31dd\">glfwSetClipboardString</a></div><div class=\"ttdeci\">void glfwSetClipboardString(GLFWwindow *window, const char *string)</div><div class=\"ttdoc\">Sets the clipboard to the specified string.</div></div>\n<div class=\"ttc\" id=\"agroup__keys_html_gac1c42c0bf4192cea713c55598b06b744\"><div class=\"ttname\"><a href=\"group__keys.html#gac1c42c0bf4192cea713c55598b06b744\">GLFW_KEY_X</a></div><div class=\"ttdeci\">#define GLFW_KEY_X</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:403</div></div>\n<div class=\"ttc\" id=\"aglfw3_8h_html_a07b84de0b52143e1958f88a7d9105947\"><div class=\"ttname\"><a href=\"glfw3_8h.html#a07b84de0b52143e1958f88a7d9105947\">GLFW_LOCK_KEY_MODS</a></div><div class=\"ttdeci\">#define GLFW_LOCK_KEY_MODS</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:1019</div></div>\n<address class=\"footer\">\n<p>\nLast update on Mon Jan 20 2020 for GLFW 3.3.2\n</p>\n</address>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/internal_8dox.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta http-equiv=\"X-UA-Compatible\" content=\"IE=9\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<title>GLFW: internal.dox File Reference</title>\n<link href=\"tabs.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"jquery.js\"></script>\n<script type=\"text/javascript\" src=\"dynsections.js\"></script>\n<link href=\"search/search.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"search/searchdata.js\"></script>\n<script type=\"text/javascript\" src=\"search/search.js\"></script>\n<link href=\"doxygen.css\" rel=\"stylesheet\" type=\"text/css\" />\n<link href=\"extra.css\" rel=\"stylesheet\" type=\"text/css\"/>\n</head>\n<body>\n<div id=\"top\"><!-- do not remove this div, it is closed by doxygen! -->\n<div id=\"titlearea\">\n\t<div class=\"glfwheader\">\n\t\t<a href=\"https://www.glfw.org/\" id=\"glfwhome\">GLFW</a>\n\t\t<ul class=\"glfwnavbar\">\n\t\t\t<li><a href=\"https://www.glfw.org/documentation.html\">Documentation</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/download.html\">Download</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/community.html\">Community</a></li>\n\t\t</ul>\n\t</div>\n</div>\n<!-- end header part -->\n<!-- Generated by Doxygen 1.8.16 -->\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\nvar searchBox = new SearchBox(\"searchBox\", \"search\",false,'Search');\n/* @license-end */\n</script>\n<script type=\"text/javascript\" src=\"menudata.js\"></script>\n<script type=\"text/javascript\" src=\"menu.js\"></script>\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\n$(function() {\n  initMenu('',true,false,'search.php','Search');\n  $(document).ready(function() { init_search(); });\n});\n/* @license-end */</script>\n<div id=\"main-nav\"></div>\n<!-- window showing the filter options -->\n<div id=\"MSearchSelectWindow\"\n     onmouseover=\"return searchBox.OnSearchSelectShow()\"\n     onmouseout=\"return searchBox.OnSearchSelectHide()\"\n     onkeydown=\"return searchBox.OnSearchSelectKey(event)\">\n</div>\n\n<!-- iframe showing the search results (closed by default) -->\n<div id=\"MSearchResultsWindow\">\n<iframe src=\"javascript:void(0)\" frameborder=\"0\" \n        name=\"MSearchResults\" id=\"MSearchResults\">\n</iframe>\n</div>\n\n</div><!-- top -->\n<div class=\"header\">\n  <div class=\"headertitle\">\n<div class=\"title\">internal.dox File Reference</div>  </div>\n</div><!--header-->\n<div class=\"contents\">\n</div><!-- contents -->\n<address class=\"footer\">\n<p>\nLast update on Mon Jan 20 2020 for GLFW 3.3.2\n</p>\n</address>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/internals_guide.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta http-equiv=\"X-UA-Compatible\" content=\"IE=9\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<title>GLFW: Internal structure</title>\n<link href=\"tabs.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"jquery.js\"></script>\n<script type=\"text/javascript\" src=\"dynsections.js\"></script>\n<link href=\"search/search.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"search/searchdata.js\"></script>\n<script type=\"text/javascript\" src=\"search/search.js\"></script>\n<link href=\"doxygen.css\" rel=\"stylesheet\" type=\"text/css\" />\n<link href=\"extra.css\" rel=\"stylesheet\" type=\"text/css\"/>\n</head>\n<body>\n<div id=\"top\"><!-- do not remove this div, it is closed by doxygen! -->\n<div id=\"titlearea\">\n\t<div class=\"glfwheader\">\n\t\t<a href=\"https://www.glfw.org/\" id=\"glfwhome\">GLFW</a>\n\t\t<ul class=\"glfwnavbar\">\n\t\t\t<li><a href=\"https://www.glfw.org/documentation.html\">Documentation</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/download.html\">Download</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/community.html\">Community</a></li>\n\t\t</ul>\n\t</div>\n</div>\n<!-- end header part -->\n<!-- Generated by Doxygen 1.8.16 -->\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\nvar searchBox = new SearchBox(\"searchBox\", \"search\",false,'Search');\n/* @license-end */\n</script>\n<script type=\"text/javascript\" src=\"menudata.js\"></script>\n<script type=\"text/javascript\" src=\"menu.js\"></script>\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\n$(function() {\n  initMenu('',true,false,'search.php','Search');\n  $(document).ready(function() { init_search(); });\n});\n/* @license-end */</script>\n<div id=\"main-nav\"></div>\n<!-- window showing the filter options -->\n<div id=\"MSearchSelectWindow\"\n     onmouseover=\"return searchBox.OnSearchSelectShow()\"\n     onmouseout=\"return searchBox.OnSearchSelectHide()\"\n     onkeydown=\"return searchBox.OnSearchSelectKey(event)\">\n</div>\n\n<!-- iframe showing the search results (closed by default) -->\n<div id=\"MSearchResultsWindow\">\n<iframe src=\"javascript:void(0)\" frameborder=\"0\" \n        name=\"MSearchResults\" id=\"MSearchResults\">\n</iframe>\n</div>\n\n</div><!-- top -->\n<div class=\"PageDoc\"><div class=\"header\">\n  <div class=\"headertitle\">\n<div class=\"title\">Internal structure </div>  </div>\n</div><!--header-->\n<div class=\"contents\">\n<div class=\"toc\"><h3>Table of Contents</h3>\n<ul><li class=\"level1\"><a href=\"#internals_public\">Public interface</a></li>\n<li class=\"level1\"><a href=\"#internals_native\">Native interface</a></li>\n<li class=\"level1\"><a href=\"#internals_internal\">Internal interface</a></li>\n<li class=\"level1\"><a href=\"#internals_platform\">Platform interface</a></li>\n<li class=\"level1\"><a href=\"#internals_event\">Event interface</a></li>\n<li class=\"level1\"><a href=\"#internals_static\">Static functions</a></li>\n<li class=\"level1\"><a href=\"#internals_config\">Configuration macros</a></li>\n</ul>\n</div>\n<div class=\"textblock\"><p>There are several interfaces inside GLFW. Each interface has its own area of responsibility and its own naming conventions.</p>\n<h1><a class=\"anchor\" id=\"internals_public\"></a>\nPublic interface</h1>\n<p>The most well-known is the public interface, described in the <a class=\"el\" href=\"glfw3_8h.html\" title=\"The header of the GLFW 3 API.\">glfw3.h</a> header file. This is implemented in source files shared by all platforms and these files contain no platform-specific code. This code usually ends up calling the platform and internal interfaces to do the actual work.</p>\n<p>The public interface uses the OpenGL naming conventions except with GLFW and glfw instead of GL and gl. For struct members, where OpenGL sets no precedent, it use headless camel case.</p>\n<p>Examples: <code>glfwCreateWindow</code>, <code>GLFWwindow</code>, <code>GLFW_RED_BITS</code></p>\n<h1><a class=\"anchor\" id=\"internals_native\"></a>\nNative interface</h1>\n<p>The <a class=\"el\" href=\"group__native.html\">native interface</a> is a small set of publicly available but platform-specific functions, described in the <a class=\"el\" href=\"glfw3native_8h.html\" title=\"The header of the native access functions.\">glfw3native.h</a> header file and used to gain access to the underlying window, context and (on some platforms) display handles used by the platform interface.</p>\n<p>The function names of the native interface are similar to those of the public interface, but embeds the name of the interface that the returned handle is from.</p>\n<p>Examples: <code>glfwGetX11Window</code>, <code>glfwGetWGLContext</code></p>\n<h1><a class=\"anchor\" id=\"internals_internal\"></a>\nInternal interface</h1>\n<p>The internal interface consists of utility functions used by all other interfaces. It is shared code implemented in the same shared source files as the public and event interfaces. The internal interface is described in the internal.h header file.</p>\n<p>The internal interface is in charge of GLFW's global data, which it stores in a <code>_GLFWlibrary</code> struct named <code>_glfw</code>.</p>\n<p>The internal interface uses the same style as the public interface, except all global names have a leading underscore.</p>\n<p>Examples: <code>_glfwIsValidContextConfig</code>, <code>_GLFWwindow</code>, <code>_glfw.monitorCount</code></p>\n<h1><a class=\"anchor\" id=\"internals_platform\"></a>\nPlatform interface</h1>\n<p>The platform interface implements all platform-specific operations as a service to the public interface. This includes event processing. The platform interface is never directly called by application code and never directly calls application-provided callbacks. It is also prohibited from modifying the platform-independent part of the internal structs. Instead, it calls the event interface when events interesting to GLFW are received.</p>\n<p>The platform interface mirrors those parts of the public interface that needs to perform platform-specific operations on some or all platforms. The are also named the same except that the glfw function prefix is replaced by _glfwPlatform.</p>\n<p>Examples: <code>_glfwPlatformCreateWindow</code></p>\n<p>The platform interface also defines structs that contain platform-specific global and per-object state. Their names mirror those of the internal interface, except that an interface-specific suffix is added.</p>\n<p>Examples: <code>_GLFWwindowX11</code>, <code>_GLFWcontextWGL</code></p>\n<p>These structs are incorporated as members into the internal interface structs using special macros that name them after the specific interface used. This prevents shared code from accidentally using these members.</p>\n<p>Examples: <code>window-&gt;win32.handle</code>, <code>_glfw.x11.display</code></p>\n<h1><a class=\"anchor\" id=\"internals_event\"></a>\nEvent interface</h1>\n<p>The event interface is implemented in the same shared source files as the public interface and is responsible for delivering the events it receives to the application, either via callbacks, via window state changes or both.</p>\n<p>The function names of the event interface use a <code>_glfwInput</code> prefix and the ObjectEvent pattern.</p>\n<p>Examples: <code>_glfwInputWindowFocus</code>, <code>_glfwInputCursorPos</code></p>\n<h1><a class=\"anchor\" id=\"internals_static\"></a>\nStatic functions</h1>\n<p>Static functions may be used by any interface and have no prefixes or suffixes. These use headless camel case.</p>\n<p>Examples: <code>isValidElementForJoystick</code></p>\n<h1><a class=\"anchor\" id=\"internals_config\"></a>\nConfiguration macros</h1>\n<p>GLFW uses a number of configuration macros to select at compile time which interfaces and code paths to use. They are defined in the glfw_config.h header file, which is generated from the <code>glfw_config.h.in</code> file by CMake.</p>\n<p>Configuration macros the same style as tokens in the public interface, except with a leading underscore.</p>\n<p>Examples: <code>_GLFW_WIN32</code>, <code>_GLFW_BUILD_DLL</code> </p>\n</div></div><!-- contents -->\n</div><!-- PageDoc -->\n<address class=\"footer\">\n<p>\nLast update on Mon Jan 20 2020 for GLFW 3.3.2\n</p>\n</address>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/intro_8dox.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta http-equiv=\"X-UA-Compatible\" content=\"IE=9\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<title>GLFW: intro.dox File Reference</title>\n<link href=\"tabs.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"jquery.js\"></script>\n<script type=\"text/javascript\" src=\"dynsections.js\"></script>\n<link href=\"search/search.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"search/searchdata.js\"></script>\n<script type=\"text/javascript\" src=\"search/search.js\"></script>\n<link href=\"doxygen.css\" rel=\"stylesheet\" type=\"text/css\" />\n<link href=\"extra.css\" rel=\"stylesheet\" type=\"text/css\"/>\n</head>\n<body>\n<div id=\"top\"><!-- do not remove this div, it is closed by doxygen! -->\n<div id=\"titlearea\">\n\t<div class=\"glfwheader\">\n\t\t<a href=\"https://www.glfw.org/\" id=\"glfwhome\">GLFW</a>\n\t\t<ul class=\"glfwnavbar\">\n\t\t\t<li><a href=\"https://www.glfw.org/documentation.html\">Documentation</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/download.html\">Download</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/community.html\">Community</a></li>\n\t\t</ul>\n\t</div>\n</div>\n<!-- end header part -->\n<!-- Generated by Doxygen 1.8.16 -->\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\nvar searchBox = new SearchBox(\"searchBox\", \"search\",false,'Search');\n/* @license-end */\n</script>\n<script type=\"text/javascript\" src=\"menudata.js\"></script>\n<script type=\"text/javascript\" src=\"menu.js\"></script>\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\n$(function() {\n  initMenu('',true,false,'search.php','Search');\n  $(document).ready(function() { init_search(); });\n});\n/* @license-end */</script>\n<div id=\"main-nav\"></div>\n<!-- window showing the filter options -->\n<div id=\"MSearchSelectWindow\"\n     onmouseover=\"return searchBox.OnSearchSelectShow()\"\n     onmouseout=\"return searchBox.OnSearchSelectHide()\"\n     onkeydown=\"return searchBox.OnSearchSelectKey(event)\">\n</div>\n\n<!-- iframe showing the search results (closed by default) -->\n<div id=\"MSearchResultsWindow\">\n<iframe src=\"javascript:void(0)\" frameborder=\"0\" \n        name=\"MSearchResults\" id=\"MSearchResults\">\n</iframe>\n</div>\n\n</div><!-- top -->\n<div class=\"header\">\n  <div class=\"headertitle\">\n<div class=\"title\">intro.dox File Reference</div>  </div>\n</div><!--header-->\n<div class=\"contents\">\n</div><!-- contents -->\n<address class=\"footer\">\n<p>\nLast update on Mon Jan 20 2020 for GLFW 3.3.2\n</p>\n</address>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/intro_guide.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta http-equiv=\"X-UA-Compatible\" content=\"IE=9\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<title>GLFW: Introduction to the API</title>\n<link href=\"tabs.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"jquery.js\"></script>\n<script type=\"text/javascript\" src=\"dynsections.js\"></script>\n<link href=\"search/search.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"search/searchdata.js\"></script>\n<script type=\"text/javascript\" src=\"search/search.js\"></script>\n<link href=\"doxygen.css\" rel=\"stylesheet\" type=\"text/css\" />\n<link href=\"extra.css\" rel=\"stylesheet\" type=\"text/css\"/>\n</head>\n<body>\n<div id=\"top\"><!-- do not remove this div, it is closed by doxygen! -->\n<div id=\"titlearea\">\n\t<div class=\"glfwheader\">\n\t\t<a href=\"https://www.glfw.org/\" id=\"glfwhome\">GLFW</a>\n\t\t<ul class=\"glfwnavbar\">\n\t\t\t<li><a href=\"https://www.glfw.org/documentation.html\">Documentation</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/download.html\">Download</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/community.html\">Community</a></li>\n\t\t</ul>\n\t</div>\n</div>\n<!-- end header part -->\n<!-- Generated by Doxygen 1.8.16 -->\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\nvar searchBox = new SearchBox(\"searchBox\", \"search\",false,'Search');\n/* @license-end */\n</script>\n<script type=\"text/javascript\" src=\"menudata.js\"></script>\n<script type=\"text/javascript\" src=\"menu.js\"></script>\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\n$(function() {\n  initMenu('',true,false,'search.php','Search');\n  $(document).ready(function() { init_search(); });\n});\n/* @license-end */</script>\n<div id=\"main-nav\"></div>\n<!-- window showing the filter options -->\n<div id=\"MSearchSelectWindow\"\n     onmouseover=\"return searchBox.OnSearchSelectShow()\"\n     onmouseout=\"return searchBox.OnSearchSelectHide()\"\n     onkeydown=\"return searchBox.OnSearchSelectKey(event)\">\n</div>\n\n<!-- iframe showing the search results (closed by default) -->\n<div id=\"MSearchResultsWindow\">\n<iframe src=\"javascript:void(0)\" frameborder=\"0\" \n        name=\"MSearchResults\" id=\"MSearchResults\">\n</iframe>\n</div>\n\n</div><!-- top -->\n<div class=\"PageDoc\"><div class=\"header\">\n  <div class=\"headertitle\">\n<div class=\"title\">Introduction to the API </div>  </div>\n</div><!--header-->\n<div class=\"contents\">\n<div class=\"toc\"><h3>Table of Contents</h3>\n<ul><li class=\"level1\"><a href=\"#intro_init\">Initialization and termination</a><ul><li class=\"level2\"><a href=\"#intro_init_init\">Initializing GLFW</a></li>\n<li class=\"level2\"><a href=\"#init_hints\">Initialization hints</a><ul><li class=\"level3\"><a href=\"#init_hints_shared\">Shared init hints</a></li>\n<li class=\"level3\"><a href=\"#init_hints_osx\">macOS specific init hints</a></li>\n<li class=\"level3\"><a href=\"#init_hints_values\">Supported and default values</a></li>\n</ul>\n</li>\n<li class=\"level2\"><a href=\"#intro_init_terminate\">Terminating GLFW</a></li>\n</ul>\n</li>\n<li class=\"level1\"><a href=\"#error_handling\">Error handling</a></li>\n<li class=\"level1\"><a href=\"#coordinate_systems\">Coordinate systems</a></li>\n<li class=\"level1\"><a href=\"#guarantees_limitations\">Guarantees and limitations</a><ul><li class=\"level2\"><a href=\"#lifetime\">Pointer lifetimes</a></li>\n<li class=\"level2\"><a href=\"#reentrancy\">Reentrancy</a></li>\n<li class=\"level2\"><a href=\"#thread_safety\">Thread safety</a></li>\n<li class=\"level2\"><a href=\"#compatibility\">Version compatibility</a></li>\n<li class=\"level2\"><a href=\"#event_order\">Event order</a></li>\n</ul>\n</li>\n<li class=\"level1\"><a href=\"#intro_version\">Version management</a><ul><li class=\"level2\"><a href=\"#intro_version_compile\">Compile-time version</a></li>\n<li class=\"level2\"><a href=\"#intro_version_runtime\">Run-time version</a></li>\n<li class=\"level2\"><a href=\"#intro_version_string\">Version string</a></li>\n</ul>\n</li>\n</ul>\n</div>\n<div class=\"textblock\"><p>This guide introduces the basic concepts of GLFW and describes initialization, error handling and API guarantees and limitations. For a broad but shallow tutorial, see <a class=\"el\" href=\"quick_guide.html\">Getting started</a> instead. For details on a specific function in this category, see the <a class=\"el\" href=\"group__init.html\">Initialization, version and error reference</a>.</p>\n<p>There are also guides for the other areas of GLFW.</p>\n<ul>\n<li><a class=\"el\" href=\"window_guide.html\">Window guide</a></li>\n<li><a class=\"el\" href=\"context_guide.html\">Context guide</a></li>\n<li><a class=\"el\" href=\"vulkan_guide.html\">Vulkan guide</a></li>\n<li><a class=\"el\" href=\"monitor_guide.html\">Monitor guide</a></li>\n<li><a class=\"el\" href=\"input_guide.html\">Input guide</a></li>\n</ul>\n<h1><a class=\"anchor\" id=\"intro_init\"></a>\nInitialization and termination</h1>\n<p>Before most GLFW functions may be called, the library must be initialized. This initialization checks what features are available on the machine, enumerates monitors and joysticks, initializes the timer and performs any required platform-specific initialization.</p>\n<p>Only the following functions may be called before the library has been successfully initialized, and only from the main thread.</p>\n<ul>\n<li><a class=\"el\" href=\"group__init.html#ga9f8ffaacf3c269cc48eafbf8b9b71197\">glfwGetVersion</a></li>\n<li><a class=\"el\" href=\"group__init.html#ga23d47dc013fce2bf58036da66079a657\">glfwGetVersionString</a></li>\n<li><a class=\"el\" href=\"group__init.html#ga944986b4ec0b928d488141f92982aa18\">glfwGetError</a></li>\n<li><a class=\"el\" href=\"group__init.html#gaff45816610d53f0b83656092a4034f40\">glfwSetErrorCallback</a></li>\n<li><a class=\"el\" href=\"group__init.html#ga110fd1d3f0412822b4f1908c026f724a\">glfwInitHint</a></li>\n<li><a class=\"el\" href=\"group__init.html#ga317aac130a235ab08c6db0834907d85e\">glfwInit</a></li>\n<li><a class=\"el\" href=\"group__init.html#gaaae48c0a18607ea4a4ba951d939f0901\">glfwTerminate</a></li>\n</ul>\n<p>Calling any other function before successful initialization will cause a <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a> error.</p>\n<h2><a class=\"anchor\" id=\"intro_init_init\"></a>\nInitializing GLFW</h2>\n<p>The library is initialized with <a class=\"el\" href=\"group__init.html#ga317aac130a235ab08c6db0834907d85e\">glfwInit</a>, which returns <code>GLFW_FALSE</code> if an error occurred.</p>\n<div class=\"fragment\"><div class=\"line\"><span class=\"keywordflow\">if</span> (!<a class=\"code\" href=\"group__init.html#ga317aac130a235ab08c6db0834907d85e\">glfwInit</a>())</div>\n<div class=\"line\">{</div>\n<div class=\"line\">    <span class=\"comment\">// Handle initialization failure</span></div>\n<div class=\"line\">}</div>\n</div><!-- fragment --><p>If any part of initialization fails, any parts that succeeded are terminated as if <a class=\"el\" href=\"group__init.html#gaaae48c0a18607ea4a4ba951d939f0901\">glfwTerminate</a> had been called. The library only needs to be initialized once and additional calls to an already initialized library will return <code>GLFW_TRUE</code> immediately.</p>\n<p>Once the library has been successfully initialized, it should be terminated before the application exits. Modern systems are very good at freeing resources allocated by programs that exit, but GLFW sometimes has to change global system settings and these might not be restored without termination.</p>\n<h2><a class=\"anchor\" id=\"init_hints\"></a>\nInitialization hints</h2>\n<p>Initialization hints are set before <a class=\"el\" href=\"group__init.html#ga317aac130a235ab08c6db0834907d85e\">glfwInit</a> and affect how the library behaves until termination. Hints are set with <a class=\"el\" href=\"group__init.html#ga110fd1d3f0412822b4f1908c026f724a\">glfwInitHint</a>.</p>\n<div class=\"fragment\"><div class=\"line\"><a class=\"code\" href=\"group__init.html#ga110fd1d3f0412822b4f1908c026f724a\">glfwInitHint</a>(<a class=\"code\" href=\"group__init.html#gab9c0534709fda03ec8959201da3a9a18\">GLFW_JOYSTICK_HAT_BUTTONS</a>, <a class=\"code\" href=\"group__init.html#gac877fe3b627d21ef3a0a23e0a73ba8c5\">GLFW_FALSE</a>);</div>\n</div><!-- fragment --><p>The values you set hints to are never reset by GLFW, but they only take effect during initialization. Once GLFW has been initialized, any values you set will be ignored until the library is terminated and initialized again.</p>\n<p>Some hints are platform specific. These may be set on any platform but they will only affect their specific platform. Other platforms will ignore them. Setting these hints requires no platform specific headers or functions.</p>\n<h3><a class=\"anchor\" id=\"init_hints_shared\"></a>\nShared init hints</h3>\n<p><a class=\"anchor\" id=\"GLFW_JOYSTICK_HAT_BUTTONS\"></a><b>GLFW_JOYSTICK_HAT_BUTTONS</b> specifies whether to also expose joystick hats as buttons, for compatibility with earlier versions of GLFW that did not have <a class=\"el\" href=\"group__input.html#ga2d8d0634bb81c180899aeb07477a67ea\">glfwGetJoystickHats</a>. Set this with <a class=\"el\" href=\"group__init.html#ga110fd1d3f0412822b4f1908c026f724a\">glfwInitHint</a>.</p>\n<h3><a class=\"anchor\" id=\"init_hints_osx\"></a>\nmacOS specific init hints</h3>\n<p><a class=\"anchor\" id=\"GLFW_COCOA_CHDIR_RESOURCES_hint\"></a><b>GLFW_COCOA_CHDIR_RESOURCES</b> specifies whether to set the current directory to the application to the <code>Contents/Resources</code> subdirectory of the application's bundle, if present. Set this with <a class=\"el\" href=\"group__init.html#ga110fd1d3f0412822b4f1908c026f724a\">glfwInitHint</a>.</p>\n<p><a class=\"anchor\" id=\"GLFW_COCOA_MENUBAR_hint\"></a><b>GLFW_COCOA_MENUBAR</b> specifies whether to create a basic menu bar, either from a nib or manually, when the first window is created, which is when AppKit is initialized. Set this with <a class=\"el\" href=\"group__init.html#ga110fd1d3f0412822b4f1908c026f724a\">glfwInitHint</a>.</p>\n<h3><a class=\"anchor\" id=\"init_hints_values\"></a>\nSupported and default values</h3>\n<table class=\"markdownTable\">\n<tr class=\"markdownTableHead\">\n<th class=\"markdownTableHeadNone\">Initialization hint  </th><th class=\"markdownTableHeadNone\">Default value  </th><th class=\"markdownTableHeadNone\">Supported values   </th></tr>\n<tr class=\"markdownTableRowOdd\">\n<td class=\"markdownTableBodyNone\"><a class=\"el\" href=\"intro_guide.html#GLFW_JOYSTICK_HAT_BUTTONS\">GLFW_JOYSTICK_HAT_BUTTONS</a>  </td><td class=\"markdownTableBodyNone\"><code>GLFW_TRUE</code>  </td><td class=\"markdownTableBodyNone\"><code>GLFW_TRUE</code> or <code>GLFW_FALSE</code>   </td></tr>\n<tr class=\"markdownTableRowEven\">\n<td class=\"markdownTableBodyNone\"><a class=\"el\" href=\"group__init.html#gab937983147a3158d45f88fad7129d9f2\">GLFW_COCOA_CHDIR_RESOURCES</a>  </td><td class=\"markdownTableBodyNone\"><code>GLFW_TRUE</code>  </td><td class=\"markdownTableBodyNone\"><code>GLFW_TRUE</code> or <code>GLFW_FALSE</code>   </td></tr>\n<tr class=\"markdownTableRowOdd\">\n<td class=\"markdownTableBodyNone\"><a class=\"el\" href=\"group__init.html#ga71e0b4ce2f2696a84a9b8c5e12dc70cf\">GLFW_COCOA_MENUBAR</a>  </td><td class=\"markdownTableBodyNone\"><code>GLFW_TRUE</code>  </td><td class=\"markdownTableBodyNone\"><code>GLFW_TRUE</code> or <code>GLFW_FALSE</code>   </td></tr>\n</table>\n<h2><a class=\"anchor\" id=\"intro_init_terminate\"></a>\nTerminating GLFW</h2>\n<p>Before your application exits, you should terminate the GLFW library if it has been initialized. This is done with <a class=\"el\" href=\"group__init.html#gaaae48c0a18607ea4a4ba951d939f0901\">glfwTerminate</a>.</p>\n<div class=\"fragment\"><div class=\"line\"><a class=\"code\" href=\"group__init.html#gaaae48c0a18607ea4a4ba951d939f0901\">glfwTerminate</a>();</div>\n</div><!-- fragment --><p>This will destroy any remaining window, monitor and cursor objects, restore any modified gamma ramps, re-enable the screensaver if it had been disabled and free any other resources allocated by GLFW.</p>\n<p>Once the library is terminated, it is as if it had never been initialized and you will need to initialize it again before being able to use GLFW. If the library was not initialized or had already been terminated, it return immediately.</p>\n<h1><a class=\"anchor\" id=\"error_handling\"></a>\nError handling</h1>\n<p>Some GLFW functions have return values that indicate an error, but this is often not very helpful when trying to figure out what happened or why it occurred. Other functions have no return value reserved for errors, so error notification needs a separate channel. Finally, far from all GLFW functions have return values.</p>\n<p>The last <a class=\"el\" href=\"group__errors.html\">error code</a> for the calling thread can be queried at any time with <a class=\"el\" href=\"group__init.html#ga944986b4ec0b928d488141f92982aa18\">glfwGetError</a>.</p>\n<div class=\"fragment\"><div class=\"line\"><span class=\"keywordtype\">int</span> code = <a class=\"code\" href=\"group__init.html#ga944986b4ec0b928d488141f92982aa18\">glfwGetError</a>(NULL);</div>\n<div class=\"line\"> </div>\n<div class=\"line\"><span class=\"keywordflow\">if</span> (code != <a class=\"code\" href=\"group__errors.html#gafa30deee5db4d69c4c93d116ed87dbf4\">GLFW_NO_ERROR</a>)</div>\n<div class=\"line\">    handle_error(code);</div>\n</div><!-- fragment --><p>If no error has occurred since the last call, <a class=\"el\" href=\"group__errors.html#gafa30deee5db4d69c4c93d116ed87dbf4\">GLFW_NO_ERROR</a> (zero) is returned. The error is cleared before the function returns.</p>\n<p>The error code indicates the general category of the error. Some error codes, such as <a class=\"el\" href=\"group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a\">GLFW_NOT_INITIALIZED</a> has only a single meaning, whereas others like <a class=\"el\" href=\"group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1\">GLFW_PLATFORM_ERROR</a> are used for many different errors.</p>\n<p>GLFW often has more information about an error than its general category. You can retrieve a UTF-8 encoded human-readable description along with the error code. If no error has occurred since the last call, the description is set to <code>NULL</code>.</p>\n<div class=\"fragment\"><div class=\"line\"><span class=\"keyword\">const</span> <span class=\"keywordtype\">char</span>* description;</div>\n<div class=\"line\"><span class=\"keywordtype\">int</span> code = <a class=\"code\" href=\"group__init.html#ga944986b4ec0b928d488141f92982aa18\">glfwGetError</a>(&amp;description);</div>\n<div class=\"line\"> </div>\n<div class=\"line\"><span class=\"keywordflow\">if</span> (description)</div>\n<div class=\"line\">    display_error_message(code, description);</div>\n</div><!-- fragment --><p>The retrieved description string is only valid until the next error occurs. This means you must make a copy of it if you want to keep it.</p>\n<p>You can also set an error callback, which will be called each time an error occurs. It is set with <a class=\"el\" href=\"group__init.html#gaff45816610d53f0b83656092a4034f40\">glfwSetErrorCallback</a>.</p>\n<div class=\"fragment\"><div class=\"line\"><a class=\"code\" href=\"group__init.html#gaff45816610d53f0b83656092a4034f40\">glfwSetErrorCallback</a>(error_callback);</div>\n</div><!-- fragment --><p>The error callback receives the same error code and human-readable description returned by <a class=\"el\" href=\"group__init.html#ga944986b4ec0b928d488141f92982aa18\">glfwGetError</a>.</p>\n<div class=\"fragment\"><div class=\"line\"><span class=\"keywordtype\">void</span> error_callback(<span class=\"keywordtype\">int</span> code, <span class=\"keyword\">const</span> <span class=\"keywordtype\">char</span>* description)</div>\n<div class=\"line\">{</div>\n<div class=\"line\">    display_error_message(code, description);</div>\n<div class=\"line\">}</div>\n</div><!-- fragment --><p>The error callback is called after the error is stored, so calling <a class=\"el\" href=\"group__init.html#ga944986b4ec0b928d488141f92982aa18\">glfwGetError</a> from within the error callback returns the same values as the callback argument.</p>\n<p>The description string passed to the callback is only valid until the error callback returns. This means you must make a copy of it if you want to keep it.</p>\n<p><b>Reported errors are never fatal.</b> As long as GLFW was successfully initialized, it will remain initialized and in a safe state until terminated regardless of how many errors occur. If an error occurs during initialization that causes <a class=\"el\" href=\"group__init.html#ga317aac130a235ab08c6db0834907d85e\">glfwInit</a> to fail, any part of the library that was initialized will be safely terminated.</p>\n<p>Do not rely on a currently invalid call to generate a specific error, as in the future that same call may generate a different error or become valid.</p>\n<h1><a class=\"anchor\" id=\"coordinate_systems\"></a>\nCoordinate systems</h1>\n<p>GLFW has two primary coordinate systems: the <em>virtual screen</em> and the window <em>content area</em> or <em>content area</em>. Both use the same unit: <em>virtual screen coordinates</em>, or just <em>screen coordinates</em>, which don't necessarily correspond to pixels.</p>\n<p><img src=\"spaces.svg\" alt=\"\" width=\"90%\" class=\"inline\"/></p>\n<p>Both the virtual screen and the content area coordinate systems have the X-axis pointing to the right and the Y-axis pointing down.</p>\n<p>Window and monitor positions are specified as the position of the upper-left corners of their content areas relative to the virtual screen, while cursor positions are specified relative to a window's content area.</p>\n<p>Because the origin of the window's content area coordinate system is also the point from which the window position is specified, you can translate content area coordinates to the virtual screen by adding the window position. The window frame, when present, extends out from the content area but does not affect the window position.</p>\n<p>Almost all positions and sizes in GLFW are measured in screen coordinates relative to one of the two origins above. This includes cursor positions, window positions and sizes, window frame sizes, monitor positions and video mode resolutions.</p>\n<p>Two exceptions are the <a class=\"el\" href=\"monitor_guide.html#monitor_size\">monitor physical size</a>, which is measured in millimetres, and <a class=\"el\" href=\"window_guide.html#window_fbsize\">framebuffer size</a>, which is measured in pixels.</p>\n<p>Pixels and screen coordinates may map 1:1 on your machine, but they won't on every other machine, for example on a Mac with a Retina display. The ratio between screen coordinates and pixels may also change at run-time depending on which monitor the window is currently considered to be on.</p>\n<h1><a class=\"anchor\" id=\"guarantees_limitations\"></a>\nGuarantees and limitations</h1>\n<p>This section describes the conditions under which GLFW can be expected to function, barring bugs in the operating system or drivers. Use of GLFW outside of these limits may work on some platforms, or on some machines, or some of the time, or on some versions of GLFW, but it may break at any time and this will not be considered a bug.</p>\n<h2><a class=\"anchor\" id=\"lifetime\"></a>\nPointer lifetimes</h2>\n<p>GLFW will never free any pointer you provide to it and you must never free any pointer it provides to you.</p>\n<p>Many GLFW functions return pointers to dynamically allocated structures, strings or arrays, and some callbacks are provided with strings or arrays. These are always managed by GLFW and should never be freed by the application. The lifetime of these pointers is documented for each GLFW function and callback. If you need to keep this data, you must copy it before its lifetime expires.</p>\n<p>Many GLFW functions accept pointers to structures or strings allocated by the application. These are never freed by GLFW and are always the responsibility of the application. If GLFW needs to keep the data in these structures or strings, it is copied before the function returns.</p>\n<p>Pointer lifetimes are guaranteed not to be shortened in future minor or patch releases.</p>\n<h2><a class=\"anchor\" id=\"reentrancy\"></a>\nReentrancy</h2>\n<p>GLFW event processing and object destruction are not reentrant. This means that the following functions must not be called from any callback function:</p>\n<ul>\n<li><a class=\"el\" href=\"group__window.html#gacdf43e51376051d2c091662e9fe3d7b2\">glfwDestroyWindow</a></li>\n<li><a class=\"el\" href=\"group__input.html#ga81b952cd1764274d0db7fb3c5a79ba6a\">glfwDestroyCursor</a></li>\n<li><a class=\"el\" href=\"group__window.html#ga37bd57223967b4211d60ca1a0bf3c832\">glfwPollEvents</a></li>\n<li><a class=\"el\" href=\"group__window.html#ga554e37d781f0a997656c26b2c56c835e\">glfwWaitEvents</a></li>\n<li><a class=\"el\" href=\"group__window.html#ga605a178db92f1a7f1a925563ef3ea2cf\">glfwWaitEventsTimeout</a></li>\n<li><a class=\"el\" href=\"group__init.html#gaaae48c0a18607ea4a4ba951d939f0901\">glfwTerminate</a></li>\n</ul>\n<p>These functions may be made reentrant in future minor or patch releases, but functions not on this list will not be made non-reentrant.</p>\n<h2><a class=\"anchor\" id=\"thread_safety\"></a>\nThread safety</h2>\n<p>Most GLFW functions must only be called from the main thread (the thread that calls main), but some may be called from any thread once the library has been initialized. Before initialization the whole library is thread-unsafe.</p>\n<p>The reference documentation for every GLFW function states whether it is limited to the main thread.</p>\n<p>Initialization, termination, event processing and the creation and destruction of windows, cursors and OpenGL and OpenGL ES contexts are all restricted to the main thread due to limitations of one or several platforms.</p>\n<p>Because event processing must be performed on the main thread, all callbacks except for the error callback will only be called on that thread. The error callback may be called on any thread, as any GLFW function may generate errors.</p>\n<p>The error code and description may be queried from any thread.</p>\n<ul>\n<li><a class=\"el\" href=\"group__init.html#ga944986b4ec0b928d488141f92982aa18\">glfwGetError</a></li>\n</ul>\n<p>Empty events may be posted from any thread.</p>\n<ul>\n<li><a class=\"el\" href=\"group__window.html#gab5997a25187e9fd5c6f2ecbbc8dfd7e9\">glfwPostEmptyEvent</a></li>\n</ul>\n<p>The window user pointer and close flag may be read and written from any thread, but this is not synchronized by GLFW.</p>\n<ul>\n<li><a class=\"el\" href=\"group__window.html#ga17807ce0f45ac3f8bb50d6dcc59a4e06\">glfwGetWindowUserPointer</a></li>\n<li><a class=\"el\" href=\"group__window.html#ga3d2fc6026e690ab31a13f78bc9fd3651\">glfwSetWindowUserPointer</a></li>\n<li><a class=\"el\" href=\"group__window.html#ga24e02fbfefbb81fc45320989f8140ab5\">glfwWindowShouldClose</a></li>\n<li><a class=\"el\" href=\"group__window.html#ga49c449dde2a6f87d996f4daaa09d6708\">glfwSetWindowShouldClose</a></li>\n</ul>\n<p>These functions for working with OpenGL and OpenGL ES contexts may be called from any thread, but the window object is not synchronized by GLFW.</p>\n<ul>\n<li><a class=\"el\" href=\"group__context.html#ga1c04dc242268f827290fe40aa1c91157\">glfwMakeContextCurrent</a></li>\n<li><a class=\"el\" href=\"group__context.html#gac84759b1f6c2d271a4fea8ae89ec980d\">glfwGetCurrentContext</a></li>\n<li><a class=\"el\" href=\"group__window.html#ga15a5a1ee5b3c2ca6b15ca209a12efd14\">glfwSwapBuffers</a></li>\n<li><a class=\"el\" href=\"group__context.html#ga6d4e0cdf151b5e579bd67f13202994ed\">glfwSwapInterval</a></li>\n<li><a class=\"el\" href=\"group__context.html#ga87425065c011cef1ebd6aac75e059dfa\">glfwExtensionSupported</a></li>\n<li><a class=\"el\" href=\"group__context.html#ga35f1837e6f666781842483937612f163\">glfwGetProcAddress</a></li>\n</ul>\n<p>The raw timer functions may be called from any thread.</p>\n<ul>\n<li><a class=\"el\" href=\"group__input.html#ga3289ee876572f6e91f06df3a24824443\">glfwGetTimerFrequency</a></li>\n<li><a class=\"el\" href=\"group__input.html#ga09b2bd37d328e0b9456c7ec575cc26aa\">glfwGetTimerValue</a></li>\n</ul>\n<p>The regular timer may be used from any thread, but reading and writing the timer offset is not synchronized by GLFW.</p>\n<ul>\n<li><a class=\"el\" href=\"group__input.html#gaa6cf4e7a77158a3b8fd00328b1720a4a\">glfwGetTime</a></li>\n<li><a class=\"el\" href=\"group__input.html#gaf59589ef6e8b8c8b5ad184b25afd4dc0\">glfwSetTime</a></li>\n</ul>\n<p>Library version information may be queried from any thread.</p>\n<ul>\n<li><a class=\"el\" href=\"group__init.html#ga9f8ffaacf3c269cc48eafbf8b9b71197\">glfwGetVersion</a></li>\n<li><a class=\"el\" href=\"group__init.html#ga23d47dc013fce2bf58036da66079a657\">glfwGetVersionString</a></li>\n</ul>\n<p>All Vulkan related functions may be called from any thread.</p>\n<ul>\n<li><a class=\"el\" href=\"group__vulkan.html#ga2e7f30931e02464b5bc8d0d4b6f9fe2b\">glfwVulkanSupported</a></li>\n<li><a class=\"el\" href=\"group__vulkan.html#ga1abcbe61033958f22f63ef82008874b1\">glfwGetRequiredInstanceExtensions</a></li>\n<li><a class=\"el\" href=\"group__vulkan.html#gadf228fac94c5fd8f12423ec9af9ff1e9\">glfwGetInstanceProcAddress</a></li>\n<li><a class=\"el\" href=\"group__vulkan.html#gaff3823355cdd7e2f3f9f4d9ea9518d92\">glfwGetPhysicalDevicePresentationSupport</a></li>\n<li><a class=\"el\" href=\"group__vulkan.html#ga1a24536bec3f80b08ead18e28e6ae965\">glfwCreateWindowSurface</a></li>\n</ul>\n<p>GLFW uses synchronization objects internally only to manage the per-thread context and error states. Additional synchronization is left to the application.</p>\n<p>Functions that may currently be called from any thread will always remain so, but functions that are currently limited to the main thread may be updated to allow calls from any thread in future releases.</p>\n<h2><a class=\"anchor\" id=\"compatibility\"></a>\nVersion compatibility</h2>\n<p>GLFW uses <a href=\"https://semver.org/\">Semantic Versioning</a>. This guarantees source and binary backward compatibility with earlier minor versions of the API. This means that you can drop in a newer version of the library and existing programs will continue to compile and existing binaries will continue to run.</p>\n<p>Once a function or constant has been added, the signature of that function or value of that constant will remain unchanged until the next major version of GLFW. No compatibility of any kind is guaranteed between major versions.</p>\n<p>Undocumented behavior, i.e. behavior that is not described in the documentation, may change at any time until it is documented.</p>\n<p>If the reference documentation and the implementation differ, the reference documentation will almost always take precedence and the implementation will be fixed in the next release. The reference documentation will also take precedence over anything stated in a guide.</p>\n<h2><a class=\"anchor\" id=\"event_order\"></a>\nEvent order</h2>\n<p>The order of arrival of related events is not guaranteed to be consistent across platforms. The exception is synthetic key and mouse button release events, which are always delivered after the window defocus event.</p>\n<h1><a class=\"anchor\" id=\"intro_version\"></a>\nVersion management</h1>\n<p>GLFW provides mechanisms for identifying what version of GLFW your application was compiled against as well as what version it is currently running against. If you are loading GLFW dynamically (not just linking dynamically), you can use this to verify that the library binary is compatible with your application.</p>\n<h2><a class=\"anchor\" id=\"intro_version_compile\"></a>\nCompile-time version</h2>\n<p>The compile-time version of GLFW is provided by the GLFW header with the <code>GLFW_VERSION_MAJOR</code>, <code>GLFW_VERSION_MINOR</code> and <code>GLFW_VERSION_REVISION</code> macros.</p>\n<div class=\"fragment\"><div class=\"line\">printf(<span class=\"stringliteral\">&quot;Compiled against GLFW %i.%i.%i\\n&quot;</span>,</div>\n<div class=\"line\">       <a class=\"code\" href=\"group__init.html#ga6337d9ea43b22fc529b2bba066b4a576\">GLFW_VERSION_MAJOR</a>,</div>\n<div class=\"line\">       <a class=\"code\" href=\"group__init.html#gaf80d40f0aea7088ff337606e9c48f7a3\">GLFW_VERSION_MINOR</a>,</div>\n<div class=\"line\">       <a class=\"code\" href=\"group__init.html#gab72ae2e2035d9ea461abc3495eac0502\">GLFW_VERSION_REVISION</a>);</div>\n</div><!-- fragment --><h2><a class=\"anchor\" id=\"intro_version_runtime\"></a>\nRun-time version</h2>\n<p>The run-time version can be retrieved with <a class=\"el\" href=\"group__init.html#ga9f8ffaacf3c269cc48eafbf8b9b71197\">glfwGetVersion</a>, a function that may be called regardless of whether GLFW is initialized.</p>\n<div class=\"fragment\"><div class=\"line\"><span class=\"keywordtype\">int</span> major, minor, revision;</div>\n<div class=\"line\"><a class=\"code\" href=\"group__init.html#ga9f8ffaacf3c269cc48eafbf8b9b71197\">glfwGetVersion</a>(&amp;major, &amp;minor, &amp;revision);</div>\n<div class=\"line\"> </div>\n<div class=\"line\">printf(<span class=\"stringliteral\">&quot;Running against GLFW %i.%i.%i\\n&quot;</span>, major, minor, revision);</div>\n</div><!-- fragment --><h2><a class=\"anchor\" id=\"intro_version_string\"></a>\nVersion string</h2>\n<p>GLFW 3 also provides a compile-time generated version string that describes the version, platform, compiler and any platform-specific compile-time options. This is primarily intended for submitting bug reports, to allow developers to see which code paths are enabled in a binary.</p>\n<p>The version string is returned by <a class=\"el\" href=\"group__init.html#ga23d47dc013fce2bf58036da66079a657\">glfwGetVersionString</a>, a function that may be called regardless of whether GLFW is initialized.</p>\n<p><b>Do not use the version string</b> to parse the GLFW library version. The <a class=\"el\" href=\"group__init.html#ga9f8ffaacf3c269cc48eafbf8b9b71197\">glfwGetVersion</a> function already provides the version of the running library binary.</p>\n<p>The format of the string is as follows:</p><ul>\n<li>The version of GLFW</li>\n<li>The name of the window system API</li>\n<li>The name of the context creation API</li>\n<li>Any additional options or APIs</li>\n</ul>\n<p>For example, when compiling GLFW 3.0 with MinGW using the Win32 and WGL back ends, the version string may look something like this:</p>\n<div class=\"fragment\"><div class=\"line\">3.0.0 Win32 WGL MinGW</div>\n</div><!-- fragment --> </div></div><!-- contents -->\n</div><!-- PageDoc -->\n<div class=\"ttc\" id=\"agroup__init_html_ga944986b4ec0b928d488141f92982aa18\"><div class=\"ttname\"><a href=\"group__init.html#ga944986b4ec0b928d488141f92982aa18\">glfwGetError</a></div><div class=\"ttdeci\">int glfwGetError(const char **description)</div><div class=\"ttdoc\">Returns and clears the last error for the calling thread.</div></div>\n<div class=\"ttc\" id=\"agroup__init_html_gaaae48c0a18607ea4a4ba951d939f0901\"><div class=\"ttname\"><a href=\"group__init.html#gaaae48c0a18607ea4a4ba951d939f0901\">glfwTerminate</a></div><div class=\"ttdeci\">void glfwTerminate(void)</div><div class=\"ttdoc\">Terminates the GLFW library.</div></div>\n<div class=\"ttc\" id=\"agroup__init_html_ga110fd1d3f0412822b4f1908c026f724a\"><div class=\"ttname\"><a href=\"group__init.html#ga110fd1d3f0412822b4f1908c026f724a\">glfwInitHint</a></div><div class=\"ttdeci\">void glfwInitHint(int hint, int value)</div><div class=\"ttdoc\">Sets the specified init hint to the desired value.</div></div>\n<div class=\"ttc\" id=\"agroup__init_html_gac877fe3b627d21ef3a0a23e0a73ba8c5\"><div class=\"ttname\"><a href=\"group__init.html#gac877fe3b627d21ef3a0a23e0a73ba8c5\">GLFW_FALSE</a></div><div class=\"ttdeci\">#define GLFW_FALSE</div><div class=\"ttdoc\">Zero.</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:289</div></div>\n<div class=\"ttc\" id=\"agroup__init_html_gaf80d40f0aea7088ff337606e9c48f7a3\"><div class=\"ttname\"><a href=\"group__init.html#gaf80d40f0aea7088ff337606e9c48f7a3\">GLFW_VERSION_MINOR</a></div><div class=\"ttdeci\">#define GLFW_VERSION_MINOR</div><div class=\"ttdoc\">The minor version number of the GLFW library.</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:262</div></div>\n<div class=\"ttc\" id=\"agroup__init_html_gab72ae2e2035d9ea461abc3495eac0502\"><div class=\"ttname\"><a href=\"group__init.html#gab72ae2e2035d9ea461abc3495eac0502\">GLFW_VERSION_REVISION</a></div><div class=\"ttdeci\">#define GLFW_VERSION_REVISION</div><div class=\"ttdoc\">The revision number of the GLFW library.</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:269</div></div>\n<div class=\"ttc\" id=\"agroup__init_html_gab9c0534709fda03ec8959201da3a9a18\"><div class=\"ttname\"><a href=\"group__init.html#gab9c0534709fda03ec8959201da3a9a18\">GLFW_JOYSTICK_HAT_BUTTONS</a></div><div class=\"ttdeci\">#define GLFW_JOYSTICK_HAT_BUTTONS</div><div class=\"ttdoc\">Joystick hat buttons init hint.</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:1083</div></div>\n<div class=\"ttc\" id=\"agroup__init_html_ga317aac130a235ab08c6db0834907d85e\"><div class=\"ttname\"><a href=\"group__init.html#ga317aac130a235ab08c6db0834907d85e\">glfwInit</a></div><div class=\"ttdeci\">int glfwInit(void)</div><div class=\"ttdoc\">Initializes the GLFW library.</div></div>\n<div class=\"ttc\" id=\"agroup__init_html_ga6337d9ea43b22fc529b2bba066b4a576\"><div class=\"ttname\"><a href=\"group__init.html#ga6337d9ea43b22fc529b2bba066b4a576\">GLFW_VERSION_MAJOR</a></div><div class=\"ttdeci\">#define GLFW_VERSION_MAJOR</div><div class=\"ttdoc\">The major version number of the GLFW library.</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:255</div></div>\n<div class=\"ttc\" id=\"agroup__init_html_gaff45816610d53f0b83656092a4034f40\"><div class=\"ttname\"><a href=\"group__init.html#gaff45816610d53f0b83656092a4034f40\">glfwSetErrorCallback</a></div><div class=\"ttdeci\">GLFWerrorfun glfwSetErrorCallback(GLFWerrorfun callback)</div><div class=\"ttdoc\">Sets the error callback.</div></div>\n<div class=\"ttc\" id=\"agroup__init_html_ga9f8ffaacf3c269cc48eafbf8b9b71197\"><div class=\"ttname\"><a href=\"group__init.html#ga9f8ffaacf3c269cc48eafbf8b9b71197\">glfwGetVersion</a></div><div class=\"ttdeci\">void glfwGetVersion(int *major, int *minor, int *rev)</div><div class=\"ttdoc\">Retrieves the version of the GLFW library.</div></div>\n<div class=\"ttc\" id=\"agroup__errors_html_gafa30deee5db4d69c4c93d116ed87dbf4\"><div class=\"ttname\"><a href=\"group__errors.html#gafa30deee5db4d69c4c93d116ed87dbf4\">GLFW_NO_ERROR</a></div><div class=\"ttdeci\">#define GLFW_NO_ERROR</div><div class=\"ttdoc\">No error has occurred.</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:638</div></div>\n<address class=\"footer\">\n<p>\nLast update on Mon Jan 20 2020 for GLFW 3.3.2\n</p>\n</address>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/jquery.js",
    "content": "/*! jQuery v3.4.1 | (c) JS Foundation and other contributors | jquery.org/license */\n!function(e,t){\"use strict\";\"object\"==typeof module&&\"object\"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error(\"jQuery requires a window with a document\");return t(e)}:t(e)}(\"undefined\"!=typeof window?window:this,function(C,e){\"use strict\";var t=[],E=C.document,r=Object.getPrototypeOf,s=t.slice,g=t.concat,u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return\"function\"==typeof e&&\"number\"!=typeof e.nodeType},x=function(e){return null!=e&&e===e.window},c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement(\"script\");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+\"\":\"object\"==typeof e||\"function\"==typeof e?n[o.call(e)]||\"object\":typeof e}var f=\"3.4.1\",k=function(e,t){return new k.fn.init(e,t)},p=/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g;function d(e){var t=!!e&&\"length\"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&(\"array\"===n||0===t||\"number\"==typeof t&&0<t&&t-1 in e)}k.fn=k.prototype={jquery:f,constructor:k,length:0,toArray:function(){return s.call(this)},get:function(e){return null==e?s.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=k.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return k.each(this,e)},map:function(n){return this.pushStack(k.map(this,function(e,t){return n.call(e,t,e)}))},slice:function(){return this.pushStack(s.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(0<=n&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:u,sort:t.sort,splice:t.splice},k.extend=k.fn.extend=function(){var e,t,n,r,i,o,a=arguments[0]||{},s=1,u=arguments.length,l=!1;for(\"boolean\"==typeof a&&(l=a,a=arguments[s]||{},s++),\"object\"==typeof a||m(a)||(a={}),s===u&&(a=this,s--);s<u;s++)if(null!=(e=arguments[s]))for(t in e)r=e[t],\"__proto__\"!==t&&a!==r&&(l&&r&&(k.isPlainObject(r)||(i=Array.isArray(r)))?(n=a[t],o=i&&!Array.isArray(n)?[]:i||k.isPlainObject(n)?n:{},i=!1,a[t]=k.extend(l,o,r)):void 0!==r&&(a[t]=r));return a},k.extend({expando:\"jQuery\"+(f+Math.random()).replace(/\\D/g,\"\"),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||\"[object Object]\"!==o.call(e))&&(!(t=r(e))||\"function\"==typeof(n=v.call(t,\"constructor\")&&t.constructor)&&a.call(n)===l)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t){b(e,{nonce:t&&t.nonce})},each:function(e,t){var n,r=0;if(d(e)){for(n=e.length;r<n;r++)if(!1===t.call(e[r],r,e[r]))break}else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},trim:function(e){return null==e?\"\":(e+\"\").replace(p,\"\")},makeArray:function(e,t){var n=t||[];return null!=e&&(d(Object(e))?k.merge(n,\"string\"==typeof e?[e]:e):u.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:i.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r=[],i=0,o=e.length,a=!n;i<o;i++)!t(e[i],i)!==a&&r.push(e[i]);return r},map:function(e,t,n){var r,i,o=0,a=[];if(d(e))for(r=e.length;o<r;o++)null!=(i=t(e[o],o,n))&&a.push(i);else for(o in e)null!=(i=t(e[o],o,n))&&a.push(i);return g.apply([],a)},guid:1,support:y}),\"function\"==typeof Symbol&&(k.fn[Symbol.iterator]=t[Symbol.iterator]),k.each(\"Boolean Number String Function Array Date RegExp Object Error Symbol\".split(\" \"),function(e,t){n[\"[object \"+t+\"]\"]=t.toLowerCase()});var h=function(n){var e,d,b,o,i,h,f,g,w,u,l,T,C,a,E,v,s,c,y,k=\"sizzle\"+1*new Date,m=n.document,S=0,r=0,p=ue(),x=ue(),N=ue(),A=ue(),D=function(e,t){return e===t&&(l=!0),0},j={}.hasOwnProperty,t=[],q=t.pop,L=t.push,H=t.push,O=t.slice,P=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},R=\"checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped\",M=\"[\\\\x20\\\\t\\\\r\\\\n\\\\f]\",I=\"(?:\\\\\\\\.|[\\\\w-]|[^\\0-\\\\xa0])+\",W=\"\\\\[\"+M+\"*(\"+I+\")(?:\"+M+\"*([*^$|!~]?=)\"+M+\"*(?:'((?:\\\\\\\\.|[^\\\\\\\\'])*)'|\\\"((?:\\\\\\\\.|[^\\\\\\\\\\\"])*)\\\"|(\"+I+\"))|)\"+M+\"*\\\\]\",$=\":(\"+I+\")(?:\\\\((('((?:\\\\\\\\.|[^\\\\\\\\'])*)'|\\\"((?:\\\\\\\\.|[^\\\\\\\\\\\"])*)\\\")|((?:\\\\\\\\.|[^\\\\\\\\()[\\\\]]|\"+W+\")*)|.*)\\\\)|)\",F=new RegExp(M+\"+\",\"g\"),B=new RegExp(\"^\"+M+\"+|((?:^|[^\\\\\\\\])(?:\\\\\\\\.)*)\"+M+\"+$\",\"g\"),_=new RegExp(\"^\"+M+\"*,\"+M+\"*\"),z=new RegExp(\"^\"+M+\"*([>+~]|\"+M+\")\"+M+\"*\"),U=new RegExp(M+\"|>\"),X=new RegExp($),V=new RegExp(\"^\"+I+\"$\"),G={ID:new RegExp(\"^#(\"+I+\")\"),CLASS:new RegExp(\"^\\\\.(\"+I+\")\"),TAG:new RegExp(\"^(\"+I+\"|[*])\"),ATTR:new RegExp(\"^\"+W),PSEUDO:new RegExp(\"^\"+$),CHILD:new RegExp(\"^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\\\(\"+M+\"*(even|odd|(([+-]|)(\\\\d*)n|)\"+M+\"*(?:([+-]|)\"+M+\"*(\\\\d+)|))\"+M+\"*\\\\)|)\",\"i\"),bool:new RegExp(\"^(?:\"+R+\")$\",\"i\"),needsContext:new RegExp(\"^\"+M+\"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\\\(\"+M+\"*((?:-\\\\d)?\\\\d*)\"+M+\"*\\\\)|)(?=[^-]|$)\",\"i\")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\\d$/i,K=/^[^{]+\\{\\s*\\[native \\w/,Z=/^(?:#([\\w-]+)|(\\w+)|\\.([\\w-]+))$/,ee=/[+~]/,te=new RegExp(\"\\\\\\\\([\\\\da-f]{1,6}\"+M+\"?|(\"+M+\")|.)\",\"ig\"),ne=function(e,t,n){var r=\"0x\"+t-65536;return r!=r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},re=/([\\0-\\x1f\\x7f]|^-?\\d)|^-$|[^\\0-\\x1f\\x7f-\\uFFFF\\w-]/g,ie=function(e,t){return t?\"\\0\"===e?\"\\ufffd\":e.slice(0,-1)+\"\\\\\"+e.charCodeAt(e.length-1).toString(16)+\" \":\"\\\\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&\"fieldset\"===e.nodeName.toLowerCase()},{dir:\"parentNode\",next:\"legend\"});try{H.apply(t=O.call(m.childNodes),m.childNodes),t[m.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],\"string\"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&((e?e.ownerDocument||e:m)!==C&&T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!A[t+\" \"]&&(!v||!v.test(t))&&(1!==p||\"object\"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&U.test(t)){(s=e.getAttribute(\"id\"))?s=s.replace(re,ie):e.setAttribute(\"id\",s=k),o=(l=h(t)).length;while(o--)l[o]=\"#\"+s+\" \"+xe(l[o]);c=l.join(\",\"),f=ee.test(t)&&ye(e.parentNode)||e}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){A(t,!0)}finally{s===k&&e.removeAttribute(\"id\")}}}return g(t.replace(B,\"$1\"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+\" \")>b.cacheLength&&delete e[r.shift()],e[t+\" \"]=n}}function le(e){return e[k]=!0,e}function ce(e){var t=C.createElement(\"fieldset\");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split(\"|\"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return\"input\"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return(\"input\"===t||\"button\"===t)&&e.type===n}}function ge(t){return function(e){return\"form\"in e?e.parentNode&&!1===e.disabled?\"label\"in e?\"label\"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:\"label\"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&\"undefined\"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||\"HTML\")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:m;return r!==C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),m!==C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener(\"unload\",oe,!1):n.attachEvent&&n.attachEvent(\"onunload\",oe)),d.attributes=ce(function(e){return e.className=\"i\",!e.getAttribute(\"className\")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment(\"\")),!e.getElementsByTagName(\"*\").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=k,!C.getElementsByName||!C.getElementsByName(k).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute(\"id\")===t}},b.find.ID=function(e,t){if(\"undefined\"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t=\"undefined\"!=typeof e.getAttributeNode&&e.getAttributeNode(\"id\");return t&&t.value===n}},b.find.ID=function(e,t){if(\"undefined\"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode(\"id\"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode(\"id\"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return\"undefined\"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if(\"*\"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if(\"undefined\"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){a.appendChild(e).innerHTML=\"<a id='\"+k+\"'></a><select id='\"+k+\"-\\r\\\\' msallowcapture=''><option selected=''></option></select>\",e.querySelectorAll(\"[msallowcapture^='']\").length&&v.push(\"[*^$]=\"+M+\"*(?:''|\\\"\\\")\"),e.querySelectorAll(\"[selected]\").length||v.push(\"\\\\[\"+M+\"*(?:value|\"+R+\")\"),e.querySelectorAll(\"[id~=\"+k+\"-]\").length||v.push(\"~=\"),e.querySelectorAll(\":checked\").length||v.push(\":checked\"),e.querySelectorAll(\"a#\"+k+\"+*\").length||v.push(\".#.+[+~]\")}),ce(function(e){e.innerHTML=\"<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>\";var t=C.createElement(\"input\");t.setAttribute(\"type\",\"hidden\"),e.appendChild(t).setAttribute(\"name\",\"D\"),e.querySelectorAll(\"[name=d]\").length&&v.push(\"name\"+M+\"*[*^$|!~]?=\"),2!==e.querySelectorAll(\":enabled\").length&&v.push(\":enabled\",\":disabled\"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(\":disabled\").length&&v.push(\":enabled\",\":disabled\"),e.querySelectorAll(\"*,:x\"),v.push(\",.*:\")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,\"*\"),c.call(e,\"[s!='']:x\"),s.push(\"!=\",$)}),v=v.length&&new RegExp(v.join(\"|\")),s=s.length&&new RegExp(s.join(\"|\")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},D=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e===C||e.ownerDocument===m&&y(m,e)?-1:t===C||t.ownerDocument===m&&y(m,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e===C?-1:t===C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]===m?-1:s[r]===m?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if((e.ownerDocument||e)!==C&&T(e),d.matchesSelector&&E&&!A[t+\" \"]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){A(t,!0)}return 0<se(t,C,null,[e]).length},se.contains=function(e,t){return(e.ownerDocument||e)!==C&&T(e),y(e,t)},se.attr=function(e,t){(e.ownerDocument||e)!==C&&T(e);var n=b.attrHandle[t.toLowerCase()],r=n&&j.call(b.attrHandle,t.toLowerCase())?n(e,t,!E):void 0;return void 0!==r?r:d.attributes||!E?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},se.escape=function(e){return(e+\"\").replace(re,ie)},se.error=function(e){throw new Error(\"Syntax error, unrecognized expression: \"+e)},se.uniqueSort=function(e){var t,n=[],r=0,i=0;if(l=!d.detectDuplicates,u=!d.sortStable&&e.slice(0),e.sort(D),l){while(t=e[i++])t===e[i]&&(r=n.push(i));while(r--)e.splice(n[r],1)}return u=null,e},o=se.getText=function(e){var t,n=\"\",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if(\"string\"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=o(e)}else if(3===i||4===i)return e.nodeValue}else while(t=e[r++])n+=o(t);return n},(b=se.selectors={cacheLength:50,createPseudo:le,match:G,attrHandle:{},find:{},relative:{\">\":{dir:\"parentNode\",first:!0},\" \":{dir:\"parentNode\"},\"+\":{dir:\"previousSibling\",first:!0},\"~\":{dir:\"previousSibling\"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||\"\").replace(te,ne),\"~=\"===e[2]&&(e[3]=\" \"+e[3]+\" \"),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),\"nth\"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*(\"even\"===e[3]||\"odd\"===e[3])),e[5]=+(e[7]+e[8]||\"odd\"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||\"\":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(\")\",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return\"*\"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=p[e+\" \"];return t||(t=new RegExp(\"(^|\"+M+\")\"+e+\"(\"+M+\"|$)\"))&&p(e,function(e){return t.test(\"string\"==typeof e.className&&e.className||\"undefined\"!=typeof e.getAttribute&&e.getAttribute(\"class\")||\"\")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?\"!=\"===r:!r||(t+=\"\",\"=\"===r?t===i:\"!=\"===r?t!==i:\"^=\"===r?i&&0===t.indexOf(i):\"*=\"===r?i&&-1<t.indexOf(i):\"$=\"===r?i&&t.slice(-i.length)===i:\"~=\"===r?-1<(\" \"+t.replace(F,\" \")+\" \").indexOf(i):\"|=\"===r&&(t===i||t.slice(0,i.length+1)===i+\"-\"))}},CHILD:function(h,e,t,g,v){var y=\"nth\"!==h.slice(0,3),m=\"last\"!==h.slice(-4),x=\"of-type\"===e;return 1===g&&0===v?function(e){return!!e.parentNode}:function(e,t,n){var r,i,o,a,s,u,l=y!==m?\"nextSibling\":\"previousSibling\",c=e.parentNode,f=x&&e.nodeName.toLowerCase(),p=!n&&!x,d=!1;if(c){if(y){while(l){a=e;while(a=a[l])if(x?a.nodeName.toLowerCase()===f:1===a.nodeType)return!1;u=l=\"only\"===h&&!u&&\"nextSibling\"}return!0}if(u=[m?c.firstChild:c.lastChild],m&&p){d=(s=(r=(i=(o=(a=c)[k]||(a[k]={}))[a.uniqueID]||(o[a.uniqueID]={}))[h]||[])[0]===S&&r[1])&&r[2],a=s&&c.childNodes[s];while(a=++s&&a&&a[l]||(d=s=0)||u.pop())if(1===a.nodeType&&++d&&a===e){i[h]=[S,s,d];break}}else if(p&&(d=s=(r=(i=(o=(a=e)[k]||(a[k]={}))[a.uniqueID]||(o[a.uniqueID]={}))[h]||[])[0]===S&&r[1]),!1===d)while(a=++s&&a&&a[l]||(d=s=0)||u.pop())if((x?a.nodeName.toLowerCase()===f:1===a.nodeType)&&++d&&(p&&((i=(o=a[k]||(a[k]={}))[a.uniqueID]||(o[a.uniqueID]={}))[h]=[S,d]),a===e))break;return(d-=v)===g||d%g==0&&0<=d/g}}},PSEUDO:function(e,o){var t,a=b.pseudos[e]||b.setFilters[e.toLowerCase()]||se.error(\"unsupported pseudo: \"+e);return a[k]?a(o):1<a.length?(t=[e,e,\"\",o],b.setFilters.hasOwnProperty(e.toLowerCase())?le(function(e,t){var n,r=a(e,o),i=r.length;while(i--)e[n=P(e,r[i])]=!(t[n]=r[i])}):function(e){return a(e,0,t)}):a}},pseudos:{not:le(function(e){var r=[],i=[],s=f(e.replace(B,\"$1\"));return s[k]?le(function(e,t,n,r){var i,o=s(e,null,r,[]),a=e.length;while(a--)(i=o[a])&&(e[a]=!(t[a]=i))}):function(e,t,n){return r[0]=e,s(r,null,n,i),r[0]=null,!i.pop()}}),has:le(function(t){return function(e){return 0<se(t,e).length}}),contains:le(function(t){return t=t.replace(te,ne),function(e){return-1<(e.textContent||o(e)).indexOf(t)}}),lang:le(function(n){return V.test(n||\"\")||se.error(\"unsupported lang: \"+n),n=n.replace(te,ne).toLowerCase(),function(e){var t;do{if(t=E?e.lang:e.getAttribute(\"xml:lang\")||e.getAttribute(\"lang\"))return(t=t.toLowerCase())===n||0===t.indexOf(n+\"-\")}while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var t=n.location&&n.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===a},focus:function(e){return e===C.activeElement&&(!C.hasFocus||C.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:ge(!1),disabled:ge(!0),checked:function(e){var t=e.nodeName.toLowerCase();return\"input\"===t&&!!e.checked||\"option\"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!b.pseudos.empty(e)},header:function(e){return J.test(e.nodeName)},input:function(e){return Q.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return\"input\"===t&&\"button\"===e.type||\"button\"===t},text:function(e){var t;return\"input\"===e.nodeName.toLowerCase()&&\"text\"===e.type&&(null==(t=e.getAttribute(\"type\"))||\"text\"===t.toLowerCase())},first:ve(function(){return[0]}),last:ve(function(e,t){return[t-1]}),eq:ve(function(e,t,n){return[n<0?n+t:n]}),even:ve(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:ve(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:ve(function(e,t,n){for(var r=n<0?n+t:t<n?t:n;0<=--r;)e.push(r);return e}),gt:ve(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}}).pseudos.nth=b.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})b.pseudos[e]=de(e);for(e in{submit:!0,reset:!0})b.pseudos[e]=he(e);function me(){}function xe(e){for(var t=0,n=e.length,r=\"\";t<n;t++)r+=e[t].value;return r}function be(s,e,t){var u=e.dir,l=e.next,c=l||u,f=t&&\"parentNode\"===c,p=r++;return e.first?function(e,t,n){while(e=e[u])if(1===e.nodeType||f)return s(e,t,n);return!1}:function(e,t,n){var r,i,o,a=[S,p];if(n){while(e=e[u])if((1===e.nodeType||f)&&s(e,t,n))return!0}else while(e=e[u])if(1===e.nodeType||f)if(i=(o=e[k]||(e[k]={}))[e.uniqueID]||(o[e.uniqueID]={}),l&&l===e.nodeName.toLowerCase())e=e[u]||e;else{if((r=i[c])&&r[0]===S&&r[1]===p)return a[2]=r[2];if((i[c]=a)[2]=s(e,t,n))return!0}return!1}}function we(i){return 1<i.length?function(e,t,n){var r=i.length;while(r--)if(!i[r](e,t,n))return!1;return!0}:i[0]}function Te(e,t,n,r,i){for(var o,a=[],s=0,u=e.length,l=null!=t;s<u;s++)(o=e[s])&&(n&&!n(o,r,i)||(a.push(o),l&&t.push(s)));return a}function Ce(d,h,g,v,y,e){return v&&!v[k]&&(v=Ce(v)),y&&!y[k]&&(y=Ce(y,e)),le(function(e,t,n,r){var i,o,a,s=[],u=[],l=t.length,c=e||function(e,t,n){for(var r=0,i=t.length;r<i;r++)se(e,t[r],n);return n}(h||\"*\",n.nodeType?[n]:n,[]),f=!d||!e&&h?c:Te(c,s,d,n,r),p=g?y||(e?d:l||v)?[]:t:f;if(g&&g(f,p,n,r),v){i=Te(p,u),v(i,[],n,r),o=i.length;while(o--)(a=i[o])&&(p[u[o]]=!(f[u[o]]=a))}if(e){if(y||d){if(y){i=[],o=p.length;while(o--)(a=p[o])&&i.push(f[o]=a);y(null,p=[],i,r)}o=p.length;while(o--)(a=p[o])&&-1<(i=y?P(e,a):s[o])&&(e[i]=!(t[i]=a))}}else p=Te(p===t?p.splice(l,p.length):p),y?y(null,t,p,r):H.apply(t,p)})}function Ee(e){for(var i,t,n,r=e.length,o=b.relative[e[0].type],a=o||b.relative[\" \"],s=o?1:0,u=be(function(e){return e===i},a,!0),l=be(function(e){return-1<P(i,e)},a,!0),c=[function(e,t,n){var r=!o&&(n||t!==w)||((i=t).nodeType?u(e,t,n):l(e,t,n));return i=null,r}];s<r;s++)if(t=b.relative[e[s].type])c=[be(we(c),t)];else{if((t=b.filter[e[s].type].apply(null,e[s].matches))[k]){for(n=++s;n<r;n++)if(b.relative[e[n].type])break;return Ce(1<s&&we(c),1<s&&xe(e.slice(0,s-1).concat({value:\" \"===e[s-2].type?\"*\":\"\"})).replace(B,\"$1\"),t,s<n&&Ee(e.slice(s,n)),n<r&&Ee(e=e.slice(n)),n<r&&xe(e))}c.push(t)}return we(c)}return me.prototype=b.filters=b.pseudos,b.setFilters=new me,h=se.tokenize=function(e,t){var n,r,i,o,a,s,u,l=x[e+\" \"];if(l)return t?0:l.slice(0);a=e,s=[],u=b.preFilter;while(a){for(o in n&&!(r=_.exec(a))||(r&&(a=a.slice(r[0].length)||a),s.push(i=[])),n=!1,(r=z.exec(a))&&(n=r.shift(),i.push({value:n,type:r[0].replace(B,\" \")}),a=a.slice(n.length)),b.filter)!(r=G[o].exec(a))||u[o]&&!(r=u[o](r))||(n=r.shift(),i.push({value:n,type:o,matches:r}),a=a.slice(n.length));if(!n)break}return t?a.length:a?se.error(e):x(e,s).slice(0)},f=se.compile=function(e,t){var n,v,y,m,x,r,i=[],o=[],a=N[e+\" \"];if(!a){t||(t=h(e)),n=t.length;while(n--)(a=Ee(t[n]))[k]?i.push(a):o.push(a);(a=N(e,(v=o,m=0<(y=i).length,x=0<v.length,r=function(e,t,n,r,i){var o,a,s,u=0,l=\"0\",c=e&&[],f=[],p=w,d=e||x&&b.find.TAG(\"*\",i),h=S+=null==p?1:Math.random()||.1,g=d.length;for(i&&(w=t===C||t||i);l!==g&&null!=(o=d[l]);l++){if(x&&o){a=0,t||o.ownerDocument===C||(T(o),n=!E);while(s=v[a++])if(s(o,t||C,n)){r.push(o);break}i&&(S=h)}m&&((o=!s&&o)&&u--,e&&c.push(o))}if(u+=l,m&&l!==u){a=0;while(s=y[a++])s(c,f,t,n);if(e){if(0<u)while(l--)c[l]||f[l]||(f[l]=q.call(r));f=Te(f)}H.apply(r,f),i&&!e&&0<f.length&&1<u+y.length&&se.uniqueSort(r)}return i&&(S=h,w=p),c},m?le(r):r))).selector=e}return a},g=se.select=function(e,t,n,r){var i,o,a,s,u,l=\"function\"==typeof e&&e,c=!r&&h(e=l.selector||e);if(n=n||[],1===c.length){if(2<(o=c[0]=c[0].slice(0)).length&&\"ID\"===(a=o[0]).type&&9===t.nodeType&&E&&b.relative[o[1].type]){if(!(t=(b.find.ID(a.matches[0].replace(te,ne),t)||[])[0]))return n;l&&(t=t.parentNode),e=e.slice(o.shift().value.length)}i=G.needsContext.test(e)?0:o.length;while(i--){if(a=o[i],b.relative[s=a.type])break;if((u=b.find[s])&&(r=u(a.matches[0].replace(te,ne),ee.test(o[0].type)&&ye(t.parentNode)||t))){if(o.splice(i,1),!(e=r.length&&xe(o)))return H.apply(n,r),n;break}}}return(l||f(e,c))(r,t,!E,n,!t||ee.test(e)&&ye(t.parentNode)||t),n},d.sortStable=k.split(\"\").sort(D).join(\"\")===k,d.detectDuplicates=!!l,T(),d.sortDetached=ce(function(e){return 1&e.compareDocumentPosition(C.createElement(\"fieldset\"))}),ce(function(e){return e.innerHTML=\"<a href='#'></a>\",\"#\"===e.firstChild.getAttribute(\"href\")})||fe(\"type|href|height|width\",function(e,t,n){if(!n)return e.getAttribute(t,\"type\"===t.toLowerCase()?1:2)}),d.attributes&&ce(function(e){return e.innerHTML=\"<input/>\",e.firstChild.setAttribute(\"value\",\"\"),\"\"===e.firstChild.getAttribute(\"value\")})||fe(\"value\",function(e,t,n){if(!n&&\"input\"===e.nodeName.toLowerCase())return e.defaultValue}),ce(function(e){return null==e.getAttribute(\"disabled\")})||fe(R,function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),se}(C);k.find=h,k.expr=h.selectors,k.expr[\":\"]=k.expr.pseudos,k.uniqueSort=k.unique=h.uniqueSort,k.text=h.getText,k.isXMLDoc=h.isXML,k.contains=h.contains,k.escapeSelector=h.escape;var T=function(e,t,n){var r=[],i=void 0!==n;while((e=e[t])&&9!==e.nodeType)if(1===e.nodeType){if(i&&k(e).is(n))break;r.push(e)}return r},S=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},N=k.expr.match.needsContext;function A(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var D=/^<([a-z][^\\/\\0>:\\x20\\t\\r\\n\\f]*)[\\x20\\t\\r\\n\\f]*\\/?>(?:<\\/\\1>|)$/i;function j(e,n,r){return m(n)?k.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?k.grep(e,function(e){return e===n!==r}):\"string\"!=typeof n?k.grep(e,function(e){return-1<i.call(n,e)!==r}):k.filter(n,e,r)}k.filter=function(e,t,n){var r=t[0];return n&&(e=\":not(\"+e+\")\"),1===t.length&&1===r.nodeType?k.find.matchesSelector(r,e)?[r]:[]:k.find.matches(e,k.grep(t,function(e){return 1===e.nodeType}))},k.fn.extend({find:function(e){var t,n,r=this.length,i=this;if(\"string\"!=typeof e)return this.pushStack(k(e).filter(function(){for(t=0;t<r;t++)if(k.contains(i[t],this))return!0}));for(n=this.pushStack([]),t=0;t<r;t++)k.find(e,i[t],n);return 1<r?k.uniqueSort(n):n},filter:function(e){return this.pushStack(j(this,e||[],!1))},not:function(e){return this.pushStack(j(this,e||[],!0))},is:function(e){return!!j(this,\"string\"==typeof e&&N.test(e)?k(e):e||[],!1).length}});var q,L=/^(?:\\s*(<[\\w\\W]+>)[^>]*|#([\\w-]+))$/;(k.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||q,\"string\"==typeof e){if(!(r=\"<\"===e[0]&&\">\"===e[e.length-1]&&3<=e.length?[null,e,null]:L.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof k?t[0]:t,k.merge(this,k.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),D.test(r[1])&&k.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(k):k.makeArray(e,this)}).prototype=k.fn,q=k(E);var H=/^(?:parents|prev(?:Until|All))/,O={children:!0,contents:!0,next:!0,prev:!0};function P(e,t){while((e=e[t])&&1!==e.nodeType);return e}k.fn.extend({has:function(e){var t=k(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(k.contains(this,t[e]))return!0})},closest:function(e,t){var n,r=0,i=this.length,o=[],a=\"string\"!=typeof e&&k(e);if(!N.test(e))for(;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?-1<a.index(n):1===n.nodeType&&k.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(1<o.length?k.uniqueSort(o):o)},index:function(e){return e?\"string\"==typeof e?i.call(k(e),this[0]):i.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(k.uniqueSort(k.merge(this.get(),k(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),k.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return T(e,\"parentNode\")},parentsUntil:function(e,t,n){return T(e,\"parentNode\",n)},next:function(e){return P(e,\"nextSibling\")},prev:function(e){return P(e,\"previousSibling\")},nextAll:function(e){return T(e,\"nextSibling\")},prevAll:function(e){return T(e,\"previousSibling\")},nextUntil:function(e,t,n){return T(e,\"nextSibling\",n)},prevUntil:function(e,t,n){return T(e,\"previousSibling\",n)},siblings:function(e){return S((e.parentNode||{}).firstChild,e)},children:function(e){return S(e.firstChild)},contents:function(e){return\"undefined\"!=typeof e.contentDocument?e.contentDocument:(A(e,\"template\")&&(e=e.content||e),k.merge([],e.childNodes))}},function(r,i){k.fn[r]=function(e,t){var n=k.map(this,i,e);return\"Until\"!==r.slice(-5)&&(t=e),t&&\"string\"==typeof t&&(n=k.filter(t,n)),1<this.length&&(O[r]||k.uniqueSort(n),H.test(r)&&n.reverse()),this.pushStack(n)}});var R=/[^\\x20\\t\\r\\n\\f]+/g;function M(e){return e}function I(e){throw e}function W(e,t,n,r){var i;try{e&&m(i=e.promise)?i.call(e).done(t).fail(n):e&&m(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}k.Callbacks=function(r){var e,n;r=\"string\"==typeof r?(e=r,n={},k.each(e.match(R)||[],function(e,t){n[t]=!0}),n):k.extend({},r);var i,t,o,a,s=[],u=[],l=-1,c=function(){for(a=a||r.once,o=i=!0;u.length;l=-1){t=u.shift();while(++l<s.length)!1===s[l].apply(t[0],t[1])&&r.stopOnFalse&&(l=s.length,t=!1)}r.memory||(t=!1),i=!1,a&&(s=t?[]:\"\")},f={add:function(){return s&&(t&&!i&&(l=s.length-1,u.push(t)),function n(e){k.each(e,function(e,t){m(t)?r.unique&&f.has(t)||s.push(t):t&&t.length&&\"string\"!==w(t)&&n(t)})}(arguments),t&&!i&&c()),this},remove:function(){return k.each(arguments,function(e,t){var n;while(-1<(n=k.inArray(t,s,n)))s.splice(n,1),n<=l&&l--}),this},has:function(e){return e?-1<k.inArray(e,s):0<s.length},empty:function(){return s&&(s=[]),this},disable:function(){return a=u=[],s=t=\"\",this},disabled:function(){return!s},lock:function(){return a=u=[],t||i||(s=t=\"\"),this},locked:function(){return!!a},fireWith:function(e,t){return a||(t=[e,(t=t||[]).slice?t.slice():t],u.push(t),i||c()),this},fire:function(){return f.fireWith(this,arguments),this},fired:function(){return!!o}};return f},k.extend({Deferred:function(e){var o=[[\"notify\",\"progress\",k.Callbacks(\"memory\"),k.Callbacks(\"memory\"),2],[\"resolve\",\"done\",k.Callbacks(\"once memory\"),k.Callbacks(\"once memory\"),0,\"resolved\"],[\"reject\",\"fail\",k.Callbacks(\"once memory\"),k.Callbacks(\"once memory\"),1,\"rejected\"]],i=\"pending\",a={state:function(){return i},always:function(){return s.done(arguments).fail(arguments),this},\"catch\":function(e){return a.then(null,e)},pipe:function(){var i=arguments;return k.Deferred(function(r){k.each(o,function(e,t){var n=m(i[t[4]])&&i[t[4]];s[t[1]](function(){var e=n&&n.apply(this,arguments);e&&m(e.promise)?e.promise().progress(r.notify).done(r.resolve).fail(r.reject):r[t[0]+\"With\"](this,n?[e]:arguments)})}),i=null}).promise()},then:function(t,n,r){var u=0;function l(i,o,a,s){return function(){var n=this,r=arguments,e=function(){var e,t;if(!(i<u)){if((e=a.apply(n,r))===o.promise())throw new TypeError(\"Thenable self-resolution\");t=e&&(\"object\"==typeof e||\"function\"==typeof e)&&e.then,m(t)?s?t.call(e,l(u,o,M,s),l(u,o,I,s)):(u++,t.call(e,l(u,o,M,s),l(u,o,I,s),l(u,o,M,o.notifyWith))):(a!==M&&(n=void 0,r=[e]),(s||o.resolveWith)(n,r))}},t=s?e:function(){try{e()}catch(e){k.Deferred.exceptionHook&&k.Deferred.exceptionHook(e,t.stackTrace),u<=i+1&&(a!==I&&(n=void 0,r=[e]),o.rejectWith(n,r))}};i?t():(k.Deferred.getStackHook&&(t.stackTrace=k.Deferred.getStackHook()),C.setTimeout(t))}}return k.Deferred(function(e){o[0][3].add(l(0,e,m(r)?r:M,e.notifyWith)),o[1][3].add(l(0,e,m(t)?t:M)),o[2][3].add(l(0,e,m(n)?n:I))}).promise()},promise:function(e){return null!=e?k.extend(e,a):a}},s={};return k.each(o,function(e,t){var n=t[2],r=t[5];a[t[1]]=n.add,r&&n.add(function(){i=r},o[3-e][2].disable,o[3-e][3].disable,o[0][2].lock,o[0][3].lock),n.add(t[3].fire),s[t[0]]=function(){return s[t[0]+\"With\"](this===s?void 0:this,arguments),this},s[t[0]+\"With\"]=n.fireWith}),a.promise(s),e&&e.call(s,s),s},when:function(e){var n=arguments.length,t=n,r=Array(t),i=s.call(arguments),o=k.Deferred(),a=function(t){return function(e){r[t]=this,i[t]=1<arguments.length?s.call(arguments):e,--n||o.resolveWith(r,i)}};if(n<=1&&(W(e,o.done(a(t)).resolve,o.reject,!n),\"pending\"===o.state()||m(i[t]&&i[t].then)))return o.then();while(t--)W(i[t],a(t),o.reject);return o.promise()}});var $=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;k.Deferred.exceptionHook=function(e,t){C.console&&C.console.warn&&e&&$.test(e.name)&&C.console.warn(\"jQuery.Deferred exception: \"+e.message,e.stack,t)},k.readyException=function(e){C.setTimeout(function(){throw e})};var F=k.Deferred();function B(){E.removeEventListener(\"DOMContentLoaded\",B),C.removeEventListener(\"load\",B),k.ready()}k.fn.ready=function(e){return F.then(e)[\"catch\"](function(e){k.readyException(e)}),this},k.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--k.readyWait:k.isReady)||(k.isReady=!0)!==e&&0<--k.readyWait||F.resolveWith(E,[k])}}),k.ready.then=F.then,\"complete\"===E.readyState||\"loading\"!==E.readyState&&!E.documentElement.doScroll?C.setTimeout(k.ready):(E.addEventListener(\"DOMContentLoaded\",B),C.addEventListener(\"load\",B));var _=function(e,t,n,r,i,o,a){var s=0,u=e.length,l=null==n;if(\"object\"===w(n))for(s in i=!0,n)_(e,t,s,n[s],!0,o,a);else if(void 0!==r&&(i=!0,m(r)||(a=!0),l&&(a?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(k(e),n)})),t))for(;s<u;s++)t(e[s],n,a?r:r.call(e[s],s,t(e[s],n)));return i?e:l?t.call(e):u?t(e[0],n):o},z=/^-ms-/,U=/-([a-z])/g;function X(e,t){return t.toUpperCase()}function V(e){return e.replace(z,\"ms-\").replace(U,X)}var G=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function Y(){this.expando=k.expando+Y.uid++}Y.uid=1,Y.prototype={cache:function(e){var t=e[this.expando];return t||(t={},G(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,i=this.cache(e);if(\"string\"==typeof t)i[V(t)]=n;else for(r in t)i[V(r)]=t[r];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][V(t)]},access:function(e,t,n){return void 0===t||t&&\"string\"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r=e[this.expando];if(void 0!==r){if(void 0!==t){n=(t=Array.isArray(t)?t.map(V):(t=V(t))in r?[t]:t.match(R)||[]).length;while(n--)delete r[t[n]]}(void 0===t||k.isEmptyObject(r))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!k.isEmptyObject(t)}};var Q=new Y,J=new Y,K=/^(?:\\{[\\w\\W]*\\}|\\[[\\w\\W]*\\])$/,Z=/[A-Z]/g;function ee(e,t,n){var r,i;if(void 0===n&&1===e.nodeType)if(r=\"data-\"+t.replace(Z,\"-$&\").toLowerCase(),\"string\"==typeof(n=e.getAttribute(r))){try{n=\"true\"===(i=n)||\"false\"!==i&&(\"null\"===i?null:i===+i+\"\"?+i:K.test(i)?JSON.parse(i):i)}catch(e){}J.set(e,t,n)}else n=void 0;return n}k.extend({hasData:function(e){return J.hasData(e)||Q.hasData(e)},data:function(e,t,n){return J.access(e,t,n)},removeData:function(e,t){J.remove(e,t)},_data:function(e,t,n){return Q.access(e,t,n)},_removeData:function(e,t){Q.remove(e,t)}}),k.fn.extend({data:function(n,e){var t,r,i,o=this[0],a=o&&o.attributes;if(void 0===n){if(this.length&&(i=J.get(o),1===o.nodeType&&!Q.get(o,\"hasDataAttrs\"))){t=a.length;while(t--)a[t]&&0===(r=a[t].name).indexOf(\"data-\")&&(r=V(r.slice(5)),ee(o,r,i[r]));Q.set(o,\"hasDataAttrs\",!0)}return i}return\"object\"==typeof n?this.each(function(){J.set(this,n)}):_(this,function(e){var t;if(o&&void 0===e)return void 0!==(t=J.get(o,n))?t:void 0!==(t=ee(o,n))?t:void 0;this.each(function(){J.set(this,n,e)})},null,e,1<arguments.length,null,!0)},removeData:function(e){return this.each(function(){J.remove(this,e)})}}),k.extend({queue:function(e,t,n){var r;if(e)return t=(t||\"fx\")+\"queue\",r=Q.get(e,t),n&&(!r||Array.isArray(n)?r=Q.access(e,t,k.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||\"fx\";var n=k.queue(e,t),r=n.length,i=n.shift(),o=k._queueHooks(e,t);\"inprogress\"===i&&(i=n.shift(),r--),i&&(\"fx\"===t&&n.unshift(\"inprogress\"),delete o.stop,i.call(e,function(){k.dequeue(e,t)},o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+\"queueHooks\";return Q.get(e,n)||Q.access(e,n,{empty:k.Callbacks(\"once memory\").add(function(){Q.remove(e,[t+\"queue\",n])})})}}),k.fn.extend({queue:function(t,n){var e=2;return\"string\"!=typeof t&&(n=t,t=\"fx\",e--),arguments.length<e?k.queue(this[0],t):void 0===n?this:this.each(function(){var e=k.queue(this,t,n);k._queueHooks(this,t),\"fx\"===t&&\"inprogress\"!==e[0]&&k.dequeue(this,t)})},dequeue:function(e){return this.each(function(){k.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||\"fx\",[])},promise:function(e,t){var n,r=1,i=k.Deferred(),o=this,a=this.length,s=function(){--r||i.resolveWith(o,[o])};\"string\"!=typeof e&&(t=e,e=void 0),e=e||\"fx\";while(a--)(n=Q.get(o[a],e+\"queueHooks\"))&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(t)}});var te=/[+-]?(?:\\d*\\.|)\\d+(?:[eE][+-]?\\d+|)/.source,ne=new RegExp(\"^(?:([+-])=|)(\"+te+\")([a-z%]*)$\",\"i\"),re=[\"Top\",\"Right\",\"Bottom\",\"Left\"],ie=E.documentElement,oe=function(e){return k.contains(e.ownerDocument,e)},ae={composed:!0};ie.getRootNode&&(oe=function(e){return k.contains(e.ownerDocument,e)||e.getRootNode(ae)===e.ownerDocument});var se=function(e,t){return\"none\"===(e=t||e).style.display||\"\"===e.style.display&&oe(e)&&\"none\"===k.css(e,\"display\")},ue=function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];for(o in i=n.apply(e,r||[]),t)e.style[o]=a[o];return i};function le(e,t,n,r){var i,o,a=20,s=r?function(){return r.cur()}:function(){return k.css(e,t,\"\")},u=s(),l=n&&n[3]||(k.cssNumber[t]?\"\":\"px\"),c=e.nodeType&&(k.cssNumber[t]||\"px\"!==l&&+u)&&ne.exec(k.css(e,t));if(c&&c[3]!==l){u/=2,l=l||c[3],c=+u||1;while(a--)k.style(e,t,c+l),(1-o)*(1-(o=s()/u||.5))<=0&&(a=0),c/=o;c*=2,k.style(e,t,c+l),n=n||[]}return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}var ce={};function fe(e,t){for(var n,r,i,o,a,s,u,l=[],c=0,f=e.length;c<f;c++)(r=e[c]).style&&(n=r.style.display,t?(\"none\"===n&&(l[c]=Q.get(r,\"display\")||null,l[c]||(r.style.display=\"\")),\"\"===r.style.display&&se(r)&&(l[c]=(u=a=o=void 0,a=(i=r).ownerDocument,s=i.nodeName,(u=ce[s])||(o=a.body.appendChild(a.createElement(s)),u=k.css(o,\"display\"),o.parentNode.removeChild(o),\"none\"===u&&(u=\"block\"),ce[s]=u)))):\"none\"!==n&&(l[c]=\"none\",Q.set(r,\"display\",n)));for(c=0;c<f;c++)null!=l[c]&&(e[c].style.display=l[c]);return e}k.fn.extend({show:function(){return fe(this,!0)},hide:function(){return fe(this)},toggle:function(e){return\"boolean\"==typeof e?e?this.show():this.hide():this.each(function(){se(this)?k(this).show():k(this).hide()})}});var pe=/^(?:checkbox|radio)$/i,de=/<([a-z][^\\/\\0>\\x20\\t\\r\\n\\f]*)/i,he=/^$|^module$|\\/(?:java|ecma)script/i,ge={option:[1,\"<select multiple='multiple'>\",\"</select>\"],thead:[1,\"<table>\",\"</table>\"],col:[2,\"<table><colgroup>\",\"</colgroup></table>\"],tr:[2,\"<table><tbody>\",\"</tbody></table>\"],td:[3,\"<table><tbody><tr>\",\"</tr></tbody></table>\"],_default:[0,\"\",\"\"]};function ve(e,t){var n;return n=\"undefined\"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||\"*\"):\"undefined\"!=typeof e.querySelectorAll?e.querySelectorAll(t||\"*\"):[],void 0===t||t&&A(e,t)?k.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n<r;n++)Q.set(e[n],\"globalEval\",!t||Q.get(t[n],\"globalEval\"))}ge.optgroup=ge.option,ge.tbody=ge.tfoot=ge.colgroup=ge.caption=ge.thead,ge.th=ge.td;var me,xe,be=/<|&#?\\w+;/;function we(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d<h;d++)if((o=e[d])||0===o)if(\"object\"===w(o))k.merge(p,o.nodeType?[o]:o);else if(be.test(o)){a=a||f.appendChild(t.createElement(\"div\")),s=(de.exec(o)||[\"\",\"\"])[1].toLowerCase(),u=ge[s]||ge._default,a.innerHTML=u[1]+k.htmlPrefilter(o)+u[2],c=u[0];while(c--)a=a.lastChild;k.merge(p,a.childNodes),(a=f.firstChild).textContent=\"\"}else p.push(t.createTextNode(o));f.textContent=\"\",d=0;while(o=p[d++])if(r&&-1<k.inArray(o,r))i&&i.push(o);else if(l=oe(o),a=ve(f.appendChild(o),\"script\"),l&&ye(a),n){c=0;while(o=a[c++])he.test(o.type||\"\")&&n.push(o)}return f}me=E.createDocumentFragment().appendChild(E.createElement(\"div\")),(xe=E.createElement(\"input\")).setAttribute(\"type\",\"radio\"),xe.setAttribute(\"checked\",\"checked\"),xe.setAttribute(\"name\",\"t\"),me.appendChild(xe),y.checkClone=me.cloneNode(!0).cloneNode(!0).lastChild.checked,me.innerHTML=\"<textarea>x</textarea>\",y.noCloneChecked=!!me.cloneNode(!0).lastChild.defaultValue;var Te=/^key/,Ce=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Ee=/^([^.]*)(?:\\.(.+)|)/;function ke(){return!0}function Se(){return!1}function Ne(e,t){return e===function(){try{return E.activeElement}catch(e){}}()==(\"focus\"===t)}function Ae(e,t,n,r,i,o){var a,s;if(\"object\"==typeof t){for(s in\"string\"!=typeof n&&(r=r||n,n=void 0),t)Ae(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&(\"string\"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=Se;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return k().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=k.guid++)),e.each(function(){k.event.add(this,t,i,r,n)})}function De(e,i,o){o?(Q.set(e,i,!1),k.event.add(e,i,{namespace:!1,handler:function(e){var t,n,r=Q.get(this,i);if(1&e.isTrigger&&this[i]){if(r.length)(k.event.special[i]||{}).delegateType&&e.stopPropagation();else if(r=s.call(arguments),Q.set(this,i,r),t=o(this,i),this[i](),r!==(n=Q.get(this,i))||t?Q.set(this,i,!1):n={},r!==n)return e.stopImmediatePropagation(),e.preventDefault(),n.value}else r.length&&(Q.set(this,i,{value:k.event.trigger(k.extend(r[0],k.Event.prototype),r.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===Q.get(e,i)&&k.event.add(e,i,ke)}k.event={global:{},add:function(t,e,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Q.get(t);if(v){n.handler&&(n=(o=n).handler,i=o.selector),i&&k.find.matchesSelector(ie,i),n.guid||(n.guid=k.guid++),(u=v.events)||(u=v.events={}),(a=v.handle)||(a=v.handle=function(e){return\"undefined\"!=typeof k&&k.event.triggered!==e.type?k.event.dispatch.apply(t,arguments):void 0}),l=(e=(e||\"\").match(R)||[\"\"]).length;while(l--)d=g=(s=Ee.exec(e[l])||[])[1],h=(s[2]||\"\").split(\".\").sort(),d&&(f=k.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=k.event.special[d]||{},c=k.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&k.expr.match.needsContext.test(i),namespace:h.join(\".\")},o),(p=u[d])||((p=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(t,r,h,a)||t.addEventListener&&t.addEventListener(d,a)),f.add&&(f.add.call(t,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),k.event.global[d]=!0)}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Q.hasData(e)&&Q.get(e);if(v&&(u=v.events)){l=(t=(t||\"\").match(R)||[\"\"]).length;while(l--)if(d=g=(s=Ee.exec(t[l])||[])[1],h=(s[2]||\"\").split(\".\").sort(),d){f=k.event.special[d]||{},p=u[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&new RegExp(\"(^|\\\\.)\"+h.join(\"\\\\.(?:.*\\\\.|)\")+\"(\\\\.|$)\"),a=o=p.length;while(o--)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&(\"**\"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));a&&!p.length&&(f.teardown&&!1!==f.teardown.call(e,h,v.handle)||k.removeEvent(e,d,v.handle),delete u[d])}else for(d in u)k.event.remove(e,d+t[l],n,r,!0);k.isEmptyObject(u)&&Q.remove(e,\"handle events\")}},dispatch:function(e){var t,n,r,i,o,a,s=k.event.fix(e),u=new Array(arguments.length),l=(Q.get(this,\"events\")||{})[s.type]||[],c=k.event.special[s.type]||{};for(u[0]=s,t=1;t<arguments.length;t++)u[t]=arguments[t];if(s.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,s)){a=k.event.handlers.call(this,s,l),t=0;while((i=a[t++])&&!s.isPropagationStopped()){s.currentTarget=i.elem,n=0;while((o=i.handlers[n++])&&!s.isImmediatePropagationStopped())s.rnamespace&&!1!==o.namespace&&!s.rnamespace.test(o.namespace)||(s.handleObj=o,s.data=o.data,void 0!==(r=((k.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,u))&&!1===(s.result=r)&&(s.preventDefault(),s.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,s),s.result}},handlers:function(e,t){var n,r,i,o,a,s=[],u=t.delegateCount,l=e.target;if(u&&l.nodeType&&!(\"click\"===e.type&&1<=e.button))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&(\"click\"!==e.type||!0!==l.disabled)){for(o=[],a={},n=0;n<u;n++)void 0===a[i=(r=t[n]).selector+\" \"]&&(a[i]=r.needsContext?-1<k(i,this).index(l):k.find(i,this,null,[l]).length),a[i]&&o.push(r);o.length&&s.push({elem:l,handlers:o})}return l=this,u<t.length&&s.push({elem:l,handlers:t.slice(u)}),s},addProp:function(t,e){Object.defineProperty(k.Event.prototype,t,{enumerable:!0,configurable:!0,get:m(e)?function(){if(this.originalEvent)return e(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[t]},set:function(e){Object.defineProperty(this,t,{enumerable:!0,configurable:!0,writable:!0,value:e})}})},fix:function(e){return e[k.expando]?e:new k.Event(e)},special:{load:{noBubble:!0},click:{setup:function(e){var t=this||e;return pe.test(t.type)&&t.click&&A(t,\"input\")&&De(t,\"click\",ke),!1},trigger:function(e){var t=this||e;return pe.test(t.type)&&t.click&&A(t,\"input\")&&De(t,\"click\"),!0},_default:function(e){var t=e.target;return pe.test(t.type)&&t.click&&A(t,\"input\")&&Q.get(t,\"click\")||A(t,\"a\")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},k.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},k.Event=function(e,t){if(!(this instanceof k.Event))return new k.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?ke:Se,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&k.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[k.expando]=!0},k.Event.prototype={constructor:k.Event,isDefaultPrevented:Se,isPropagationStopped:Se,isImmediatePropagationStopped:Se,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=ke,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=ke,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=ke,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},k.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,\"char\":!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(e){var t=e.button;return null==e.which&&Te.test(e.type)?null!=e.charCode?e.charCode:e.keyCode:!e.which&&void 0!==t&&Ce.test(e.type)?1&t?1:2&t?3:4&t?2:0:e.which}},k.event.addProp),k.each({focus:\"focusin\",blur:\"focusout\"},function(e,t){k.event.special[e]={setup:function(){return De(this,e,Ne),!1},trigger:function(){return De(this,e),!0},delegateType:t}}),k.each({mouseenter:\"mouseover\",mouseleave:\"mouseout\",pointerenter:\"pointerover\",pointerleave:\"pointerout\"},function(e,i){k.event.special[e]={delegateType:i,bindType:i,handle:function(e){var t,n=e.relatedTarget,r=e.handleObj;return n&&(n===this||k.contains(this,n))||(e.type=r.origType,t=r.handler.apply(this,arguments),e.type=i),t}}}),k.fn.extend({on:function(e,t,n,r){return Ae(this,e,t,n,r)},one:function(e,t,n,r){return Ae(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,k(e.delegateTarget).off(r.namespace?r.origType+\".\"+r.namespace:r.origType,r.selector,r.handler),this;if(\"object\"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return!1!==t&&\"function\"!=typeof t||(n=t,t=void 0),!1===n&&(n=Se),this.each(function(){k.event.remove(this,e,n,t)})}});var je=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\\/\\0>\\x20\\t\\r\\n\\f]*)[^>]*)\\/>/gi,qe=/<script|<style|<link/i,Le=/checked\\s*(?:[^=]|=\\s*.checked.)/i,He=/^\\s*<!(?:\\[CDATA\\[|--)|(?:\\]\\]|--)>\\s*$/g;function Oe(e,t){return A(e,\"table\")&&A(11!==t.nodeType?t:t.firstChild,\"tr\")&&k(e).children(\"tbody\")[0]||e}function Pe(e){return e.type=(null!==e.getAttribute(\"type\"))+\"/\"+e.type,e}function Re(e){return\"true/\"===(e.type||\"\").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute(\"type\"),e}function Me(e,t){var n,r,i,o,a,s,u,l;if(1===t.nodeType){if(Q.hasData(e)&&(o=Q.access(e),a=Q.set(t,o),l=o.events))for(i in delete a.handle,a.events={},l)for(n=0,r=l[i].length;n<r;n++)k.event.add(t,i,l[i][n]);J.hasData(e)&&(s=J.access(e),u=k.extend({},s),J.set(t,u))}}function Ie(n,r,i,o){r=g.apply([],r);var e,t,a,s,u,l,c=0,f=n.length,p=f-1,d=r[0],h=m(d);if(h||1<f&&\"string\"==typeof d&&!y.checkClone&&Le.test(d))return n.each(function(e){var t=n.eq(e);h&&(r[0]=d.call(this,e,t.html())),Ie(t,r,i,o)});if(f&&(t=(e=we(r,n[0].ownerDocument,!1,n,o)).firstChild,1===e.childNodes.length&&(e=t),t||o)){for(s=(a=k.map(ve(e,\"script\"),Pe)).length;c<f;c++)u=e,c!==p&&(u=k.clone(u,!0,!0),s&&k.merge(a,ve(u,\"script\"))),i.call(n[c],u,c);if(s)for(l=a[a.length-1].ownerDocument,k.map(a,Re),c=0;c<s;c++)u=a[c],he.test(u.type||\"\")&&!Q.access(u,\"globalEval\")&&k.contains(l,u)&&(u.src&&\"module\"!==(u.type||\"\").toLowerCase()?k._evalUrl&&!u.noModule&&k._evalUrl(u.src,{nonce:u.nonce||u.getAttribute(\"nonce\")}):b(u.textContent.replace(He,\"\"),u,l))}return n}function We(e,t,n){for(var r,i=t?k.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||k.cleanData(ve(r)),r.parentNode&&(n&&oe(r)&&ye(ve(r,\"script\")),r.parentNode.removeChild(r));return e}k.extend({htmlPrefilter:function(e){return e.replace(je,\"<$1></$2>\")},clone:function(e,t,n){var r,i,o,a,s,u,l,c=e.cloneNode(!0),f=oe(e);if(!(y.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||k.isXMLDoc(e)))for(a=ve(c),r=0,i=(o=ve(e)).length;r<i;r++)s=o[r],u=a[r],void 0,\"input\"===(l=u.nodeName.toLowerCase())&&pe.test(s.type)?u.checked=s.checked:\"input\"!==l&&\"textarea\"!==l||(u.defaultValue=s.defaultValue);if(t)if(n)for(o=o||ve(e),a=a||ve(c),r=0,i=o.length;r<i;r++)Me(o[r],a[r]);else Me(e,c);return 0<(a=ve(c,\"script\")).length&&ye(a,!f&&ve(e,\"script\")),c},cleanData:function(e){for(var t,n,r,i=k.event.special,o=0;void 0!==(n=e[o]);o++)if(G(n)){if(t=n[Q.expando]){if(t.events)for(r in t.events)i[r]?k.event.remove(n,r):k.removeEvent(n,r,t.handle);n[Q.expando]=void 0}n[J.expando]&&(n[J.expando]=void 0)}}}),k.fn.extend({detach:function(e){return We(this,e,!0)},remove:function(e){return We(this,e)},text:function(e){return _(this,function(e){return void 0===e?k.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return Ie(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Oe(this,e).appendChild(e)})},prepend:function(){return Ie(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Oe(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return Ie(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return Ie(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(k.cleanData(ve(e,!1)),e.textContent=\"\");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return k.clone(this,e,t)})},html:function(e){return _(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if(\"string\"==typeof e&&!qe.test(e)&&!ge[(de.exec(e)||[\"\",\"\"])[1].toLowerCase()]){e=k.htmlPrefilter(e);try{for(;n<r;n++)1===(t=this[n]||{}).nodeType&&(k.cleanData(ve(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var n=[];return Ie(this,arguments,function(e){var t=this.parentNode;k.inArray(this,n)<0&&(k.cleanData(ve(this)),t&&t.replaceChild(e,this))},n)}}),k.each({appendTo:\"append\",prependTo:\"prepend\",insertBefore:\"before\",insertAfter:\"after\",replaceAll:\"replaceWith\"},function(e,a){k.fn[e]=function(e){for(var t,n=[],r=k(e),i=r.length-1,o=0;o<=i;o++)t=o===i?this:this.clone(!0),k(r[o])[a](t),u.apply(n,t.get());return this.pushStack(n)}});var $e=new RegExp(\"^(\"+te+\")(?!px)[a-z%]+$\",\"i\"),Fe=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=C),t.getComputedStyle(e)},Be=new RegExp(re.join(\"|\"),\"i\");function _e(e,t,n){var r,i,o,a,s=e.style;return(n=n||Fe(e))&&(\"\"!==(a=n.getPropertyValue(t)||n[t])||oe(e)||(a=k.style(e,t)),!y.pixelBoxStyles()&&$e.test(a)&&Be.test(t)&&(r=s.width,i=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=r,s.minWidth=i,s.maxWidth=o)),void 0!==a?a+\"\":a}function ze(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}!function(){function e(){if(u){s.style.cssText=\"position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0\",u.style.cssText=\"position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%\",ie.appendChild(s).appendChild(u);var e=C.getComputedStyle(u);n=\"1%\"!==e.top,a=12===t(e.marginLeft),u.style.right=\"60%\",o=36===t(e.right),r=36===t(e.width),u.style.position=\"absolute\",i=12===t(u.offsetWidth/3),ie.removeChild(s),u=null}}function t(e){return Math.round(parseFloat(e))}var n,r,i,o,a,s=E.createElement(\"div\"),u=E.createElement(\"div\");u.style&&(u.style.backgroundClip=\"content-box\",u.cloneNode(!0).style.backgroundClip=\"\",y.clearCloneStyle=\"content-box\"===u.style.backgroundClip,k.extend(y,{boxSizingReliable:function(){return e(),r},pixelBoxStyles:function(){return e(),o},pixelPosition:function(){return e(),n},reliableMarginLeft:function(){return e(),a},scrollboxSize:function(){return e(),i}}))}();var Ue=[\"Webkit\",\"Moz\",\"ms\"],Xe=E.createElement(\"div\").style,Ve={};function Ge(e){var t=k.cssProps[e]||Ve[e];return t||(e in Xe?e:Ve[e]=function(e){var t=e[0].toUpperCase()+e.slice(1),n=Ue.length;while(n--)if((e=Ue[n]+t)in Xe)return e}(e)||e)}var Ye=/^(none|table(?!-c[ea]).+)/,Qe=/^--/,Je={position:\"absolute\",visibility:\"hidden\",display:\"block\"},Ke={letterSpacing:\"0\",fontWeight:\"400\"};function Ze(e,t,n){var r=ne.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||\"px\"):t}function et(e,t,n,r,i,o){var a=\"width\"===t?1:0,s=0,u=0;if(n===(r?\"border\":\"content\"))return 0;for(;a<4;a+=2)\"margin\"===n&&(u+=k.css(e,n+re[a],!0,i)),r?(\"content\"===n&&(u-=k.css(e,\"padding\"+re[a],!0,i)),\"margin\"!==n&&(u-=k.css(e,\"border\"+re[a]+\"Width\",!0,i))):(u+=k.css(e,\"padding\"+re[a],!0,i),\"padding\"!==n?u+=k.css(e,\"border\"+re[a]+\"Width\",!0,i):s+=k.css(e,\"border\"+re[a]+\"Width\",!0,i));return!r&&0<=o&&(u+=Math.max(0,Math.ceil(e[\"offset\"+t[0].toUpperCase()+t.slice(1)]-o-u-s-.5))||0),u}function tt(e,t,n){var r=Fe(e),i=(!y.boxSizingReliable()||n)&&\"border-box\"===k.css(e,\"boxSizing\",!1,r),o=i,a=_e(e,t,r),s=\"offset\"+t[0].toUpperCase()+t.slice(1);if($e.test(a)){if(!n)return a;a=\"auto\"}return(!y.boxSizingReliable()&&i||\"auto\"===a||!parseFloat(a)&&\"inline\"===k.css(e,\"display\",!1,r))&&e.getClientRects().length&&(i=\"border-box\"===k.css(e,\"boxSizing\",!1,r),(o=s in e)&&(a=e[s])),(a=parseFloat(a)||0)+et(e,t,n||(i?\"border\":\"content\"),o,r,a)+\"px\"}function nt(e,t,n,r,i){return new nt.prototype.init(e,t,n,r,i)}k.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=_e(e,\"opacity\");return\"\"===n?\"1\":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=V(t),u=Qe.test(t),l=e.style;if(u||(t=Ge(s)),a=k.cssHooks[t]||k.cssHooks[s],void 0===n)return a&&\"get\"in a&&void 0!==(i=a.get(e,!1,r))?i:l[t];\"string\"===(o=typeof n)&&(i=ne.exec(n))&&i[1]&&(n=le(e,t,i),o=\"number\"),null!=n&&n==n&&(\"number\"!==o||u||(n+=i&&i[3]||(k.cssNumber[s]?\"\":\"px\")),y.clearCloneStyle||\"\"!==n||0!==t.indexOf(\"background\")||(l[t]=\"inherit\"),a&&\"set\"in a&&void 0===(n=a.set(e,n,r))||(u?l.setProperty(t,n):l[t]=n))}},css:function(e,t,n,r){var i,o,a,s=V(t);return Qe.test(t)||(t=Ge(s)),(a=k.cssHooks[t]||k.cssHooks[s])&&\"get\"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=_e(e,t,r)),\"normal\"===i&&t in Ke&&(i=Ke[t]),\"\"===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),k.each([\"height\",\"width\"],function(e,u){k.cssHooks[u]={get:function(e,t,n){if(t)return!Ye.test(k.css(e,\"display\"))||e.getClientRects().length&&e.getBoundingClientRect().width?tt(e,u,n):ue(e,Je,function(){return tt(e,u,n)})},set:function(e,t,n){var r,i=Fe(e),o=!y.scrollboxSize()&&\"absolute\"===i.position,a=(o||n)&&\"border-box\"===k.css(e,\"boxSizing\",!1,i),s=n?et(e,u,n,a,i):0;return a&&o&&(s-=Math.ceil(e[\"offset\"+u[0].toUpperCase()+u.slice(1)]-parseFloat(i[u])-et(e,u,\"border\",!1,i)-.5)),s&&(r=ne.exec(t))&&\"px\"!==(r[3]||\"px\")&&(e.style[u]=t,t=k.css(e,u)),Ze(0,t,s)}}}),k.cssHooks.marginLeft=ze(y.reliableMarginLeft,function(e,t){if(t)return(parseFloat(_e(e,\"marginLeft\"))||e.getBoundingClientRect().left-ue(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+\"px\"}),k.each({margin:\"\",padding:\"\",border:\"Width\"},function(i,o){k.cssHooks[i+o]={expand:function(e){for(var t=0,n={},r=\"string\"==typeof e?e.split(\" \"):[e];t<4;t++)n[i+re[t]+o]=r[t]||r[t-2]||r[0];return n}},\"margin\"!==i&&(k.cssHooks[i+o].set=Ze)}),k.fn.extend({css:function(e,t){return _(this,function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=Fe(e),i=t.length;a<i;a++)o[t[a]]=k.css(e,t[a],!1,r);return o}return void 0!==n?k.style(e,t,n):k.css(e,t)},e,t,1<arguments.length)}}),((k.Tween=nt).prototype={constructor:nt,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||k.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(k.cssNumber[n]?\"\":\"px\")},cur:function(){var e=nt.propHooks[this.prop];return e&&e.get?e.get(this):nt.propHooks._default.get(this)},run:function(e){var t,n=nt.propHooks[this.prop];return this.options.duration?this.pos=t=k.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):nt.propHooks._default.set(this),this}}).init.prototype=nt.prototype,(nt.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=k.css(e.elem,e.prop,\"\"))&&\"auto\"!==t?t:0},set:function(e){k.fx.step[e.prop]?k.fx.step[e.prop](e):1!==e.elem.nodeType||!k.cssHooks[e.prop]&&null==e.elem.style[Ge(e.prop)]?e.elem[e.prop]=e.now:k.style(e.elem,e.prop,e.now+e.unit)}}}).scrollTop=nt.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},k.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:\"swing\"},k.fx=nt.prototype.init,k.fx.step={};var rt,it,ot,at,st=/^(?:toggle|show|hide)$/,ut=/queueHooks$/;function lt(){it&&(!1===E.hidden&&C.requestAnimationFrame?C.requestAnimationFrame(lt):C.setTimeout(lt,k.fx.interval),k.fx.tick())}function ct(){return C.setTimeout(function(){rt=void 0}),rt=Date.now()}function ft(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i[\"margin\"+(n=re[r])]=i[\"padding\"+n]=e;return t&&(i.opacity=i.width=e),i}function pt(e,t,n){for(var r,i=(dt.tweeners[t]||[]).concat(dt.tweeners[\"*\"]),o=0,a=i.length;o<a;o++)if(r=i[o].call(n,t,e))return r}function dt(o,e,t){var n,a,r=0,i=dt.prefilters.length,s=k.Deferred().always(function(){delete u.elem}),u=function(){if(a)return!1;for(var e=rt||ct(),t=Math.max(0,l.startTime+l.duration-e),n=1-(t/l.duration||0),r=0,i=l.tweens.length;r<i;r++)l.tweens[r].run(n);return s.notifyWith(o,[l,n,t]),n<1&&i?t:(i||s.notifyWith(o,[l,1,0]),s.resolveWith(o,[l]),!1)},l=s.promise({elem:o,props:k.extend({},e),opts:k.extend(!0,{specialEasing:{},easing:k.easing._default},t),originalProperties:e,originalOptions:t,startTime:rt||ct(),duration:t.duration,tweens:[],createTween:function(e,t){var n=k.Tween(o,l.opts,e,t,l.opts.specialEasing[e]||l.opts.easing);return l.tweens.push(n),n},stop:function(e){var t=0,n=e?l.tweens.length:0;if(a)return this;for(a=!0;t<n;t++)l.tweens[t].run(1);return e?(s.notifyWith(o,[l,1,0]),s.resolveWith(o,[l,e])):s.rejectWith(o,[l,e]),this}}),c=l.props;for(!function(e,t){var n,r,i,o,a;for(n in e)if(i=t[r=V(n)],o=e[n],Array.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),(a=k.cssHooks[r])&&\"expand\"in a)for(n in o=a.expand(o),delete e[r],o)n in e||(e[n]=o[n],t[n]=i);else t[r]=i}(c,l.opts.specialEasing);r<i;r++)if(n=dt.prefilters[r].call(l,o,c,l.opts))return m(n.stop)&&(k._queueHooks(l.elem,l.opts.queue).stop=n.stop.bind(n)),n;return k.map(c,pt,l),m(l.opts.start)&&l.opts.start.call(o,l),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always),k.fx.timer(k.extend(u,{elem:o,anim:l,queue:l.opts.queue})),l}k.Animation=k.extend(dt,{tweeners:{\"*\":[function(e,t){var n=this.createTween(e,t);return le(n.elem,e,ne.exec(t),n),n}]},tweener:function(e,t){m(e)?(t=e,e=[\"*\"]):e=e.match(R);for(var n,r=0,i=e.length;r<i;r++)n=e[r],dt.tweeners[n]=dt.tweeners[n]||[],dt.tweeners[n].unshift(t)},prefilters:[function(e,t,n){var r,i,o,a,s,u,l,c,f=\"width\"in t||\"height\"in t,p=this,d={},h=e.style,g=e.nodeType&&se(e),v=Q.get(e,\"fxshow\");for(r in n.queue||(null==(a=k._queueHooks(e,\"fx\")).unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,p.always(function(){p.always(function(){a.unqueued--,k.queue(e,\"fx\").length||a.empty.fire()})})),t)if(i=t[r],st.test(i)){if(delete t[r],o=o||\"toggle\"===i,i===(g?\"hide\":\"show\")){if(\"show\"!==i||!v||void 0===v[r])continue;g=!0}d[r]=v&&v[r]||k.style(e,r)}if((u=!k.isEmptyObject(t))||!k.isEmptyObject(d))for(r in f&&1===e.nodeType&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],null==(l=v&&v.display)&&(l=Q.get(e,\"display\")),\"none\"===(c=k.css(e,\"display\"))&&(l?c=l:(fe([e],!0),l=e.style.display||l,c=k.css(e,\"display\"),fe([e]))),(\"inline\"===c||\"inline-block\"===c&&null!=l)&&\"none\"===k.css(e,\"float\")&&(u||(p.done(function(){h.display=l}),null==l&&(c=h.display,l=\"none\"===c?\"\":c)),h.display=\"inline-block\")),n.overflow&&(h.overflow=\"hidden\",p.always(function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]})),u=!1,d)u||(v?\"hidden\"in v&&(g=v.hidden):v=Q.access(e,\"fxshow\",{display:l}),o&&(v.hidden=!g),g&&fe([e],!0),p.done(function(){for(r in g||fe([e]),Q.remove(e,\"fxshow\"),d)k.style(e,r,d[r])})),u=pt(g?v[r]:0,r,p),r in v||(v[r]=u.start,g&&(u.end=u.start,u.start=0))}],prefilter:function(e,t){t?dt.prefilters.unshift(e):dt.prefilters.push(e)}}),k.speed=function(e,t,n){var r=e&&\"object\"==typeof e?k.extend({},e):{complete:n||!n&&t||m(e)&&e,duration:e,easing:n&&t||t&&!m(t)&&t};return k.fx.off?r.duration=0:\"number\"!=typeof r.duration&&(r.duration in k.fx.speeds?r.duration=k.fx.speeds[r.duration]:r.duration=k.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue=\"fx\"),r.old=r.complete,r.complete=function(){m(r.old)&&r.old.call(this),r.queue&&k.dequeue(this,r.queue)},r},k.fn.extend({fadeTo:function(e,t,n,r){return this.filter(se).css(\"opacity\",0).show().end().animate({opacity:t},e,n,r)},animate:function(t,e,n,r){var i=k.isEmptyObject(t),o=k.speed(e,n,r),a=function(){var e=dt(this,k.extend({},t),o);(i||Q.get(this,\"finish\"))&&e.stop(!0)};return a.finish=a,i||!1===o.queue?this.each(a):this.queue(o.queue,a)},stop:function(i,e,o){var a=function(e){var t=e.stop;delete e.stop,t(o)};return\"string\"!=typeof i&&(o=e,e=i,i=void 0),e&&!1!==i&&this.queue(i||\"fx\",[]),this.each(function(){var e=!0,t=null!=i&&i+\"queueHooks\",n=k.timers,r=Q.get(this);if(t)r[t]&&r[t].stop&&a(r[t]);else for(t in r)r[t]&&r[t].stop&&ut.test(t)&&a(r[t]);for(t=n.length;t--;)n[t].elem!==this||null!=i&&n[t].queue!==i||(n[t].anim.stop(o),e=!1,n.splice(t,1));!e&&o||k.dequeue(this,i)})},finish:function(a){return!1!==a&&(a=a||\"fx\"),this.each(function(){var e,t=Q.get(this),n=t[a+\"queue\"],r=t[a+\"queueHooks\"],i=k.timers,o=n?n.length:0;for(t.finish=!0,k.queue(this,a,[]),r&&r.stop&&r.stop.call(this,!0),e=i.length;e--;)i[e].elem===this&&i[e].queue===a&&(i[e].anim.stop(!0),i.splice(e,1));for(e=0;e<o;e++)n[e]&&n[e].finish&&n[e].finish.call(this);delete t.finish})}}),k.each([\"toggle\",\"show\",\"hide\"],function(e,r){var i=k.fn[r];k.fn[r]=function(e,t,n){return null==e||\"boolean\"==typeof e?i.apply(this,arguments):this.animate(ft(r,!0),e,t,n)}}),k.each({slideDown:ft(\"show\"),slideUp:ft(\"hide\"),slideToggle:ft(\"toggle\"),fadeIn:{opacity:\"show\"},fadeOut:{opacity:\"hide\"},fadeToggle:{opacity:\"toggle\"}},function(e,r){k.fn[e]=function(e,t,n){return this.animate(r,e,t,n)}}),k.timers=[],k.fx.tick=function(){var e,t=0,n=k.timers;for(rt=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||k.fx.stop(),rt=void 0},k.fx.timer=function(e){k.timers.push(e),k.fx.start()},k.fx.interval=13,k.fx.start=function(){it||(it=!0,lt())},k.fx.stop=function(){it=null},k.fx.speeds={slow:600,fast:200,_default:400},k.fn.delay=function(r,e){return r=k.fx&&k.fx.speeds[r]||r,e=e||\"fx\",this.queue(e,function(e,t){var n=C.setTimeout(e,r);t.stop=function(){C.clearTimeout(n)}})},ot=E.createElement(\"input\"),at=E.createElement(\"select\").appendChild(E.createElement(\"option\")),ot.type=\"checkbox\",y.checkOn=\"\"!==ot.value,y.optSelected=at.selected,(ot=E.createElement(\"input\")).value=\"t\",ot.type=\"radio\",y.radioValue=\"t\"===ot.value;var ht,gt=k.expr.attrHandle;k.fn.extend({attr:function(e,t){return _(this,k.attr,e,t,1<arguments.length)},removeAttr:function(e){return this.each(function(){k.removeAttr(this,e)})}}),k.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return\"undefined\"==typeof e.getAttribute?k.prop(e,t,n):(1===o&&k.isXMLDoc(e)||(i=k.attrHooks[t.toLowerCase()]||(k.expr.match.bool.test(t)?ht:void 0)),void 0!==n?null===n?void k.removeAttr(e,t):i&&\"set\"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+\"\"),n):i&&\"get\"in i&&null!==(r=i.get(e,t))?r:null==(r=k.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!y.radioValue&&\"radio\"===t&&A(e,\"input\")){var n=e.value;return e.setAttribute(\"type\",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(R);if(i&&1===e.nodeType)while(n=i[r++])e.removeAttribute(n)}}),ht={set:function(e,t,n){return!1===t?k.removeAttr(e,n):e.setAttribute(n,n),n}},k.each(k.expr.match.bool.source.match(/\\w+/g),function(e,t){var a=gt[t]||k.find.attr;gt[t]=function(e,t,n){var r,i,o=t.toLowerCase();return n||(i=gt[o],gt[o]=r,r=null!=a(e,t,n)?o:null,gt[o]=i),r}});var vt=/^(?:input|select|textarea|button)$/i,yt=/^(?:a|area)$/i;function mt(e){return(e.match(R)||[]).join(\" \")}function xt(e){return e.getAttribute&&e.getAttribute(\"class\")||\"\"}function bt(e){return Array.isArray(e)?e:\"string\"==typeof e&&e.match(R)||[]}k.fn.extend({prop:function(e,t){return _(this,k.prop,e,t,1<arguments.length)},removeProp:function(e){return this.each(function(){delete this[k.propFix[e]||e]})}}),k.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&k.isXMLDoc(e)||(t=k.propFix[t]||t,i=k.propHooks[t]),void 0!==n?i&&\"set\"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&\"get\"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=k.find.attr(e,\"tabindex\");return t?parseInt(t,10):vt.test(e.nodeName)||yt.test(e.nodeName)&&e.href?0:-1}}},propFix:{\"for\":\"htmlFor\",\"class\":\"className\"}}),y.optSelected||(k.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),k.each([\"tabIndex\",\"readOnly\",\"maxLength\",\"cellSpacing\",\"cellPadding\",\"rowSpan\",\"colSpan\",\"useMap\",\"frameBorder\",\"contentEditable\"],function(){k.propFix[this.toLowerCase()]=this}),k.fn.extend({addClass:function(t){var e,n,r,i,o,a,s,u=0;if(m(t))return this.each(function(e){k(this).addClass(t.call(this,e,xt(this)))});if((e=bt(t)).length)while(n=this[u++])if(i=xt(n),r=1===n.nodeType&&\" \"+mt(i)+\" \"){a=0;while(o=e[a++])r.indexOf(\" \"+o+\" \")<0&&(r+=o+\" \");i!==(s=mt(r))&&n.setAttribute(\"class\",s)}return this},removeClass:function(t){var e,n,r,i,o,a,s,u=0;if(m(t))return this.each(function(e){k(this).removeClass(t.call(this,e,xt(this)))});if(!arguments.length)return this.attr(\"class\",\"\");if((e=bt(t)).length)while(n=this[u++])if(i=xt(n),r=1===n.nodeType&&\" \"+mt(i)+\" \"){a=0;while(o=e[a++])while(-1<r.indexOf(\" \"+o+\" \"))r=r.replace(\" \"+o+\" \",\" \");i!==(s=mt(r))&&n.setAttribute(\"class\",s)}return this},toggleClass:function(i,t){var o=typeof i,a=\"string\"===o||Array.isArray(i);return\"boolean\"==typeof t&&a?t?this.addClass(i):this.removeClass(i):m(i)?this.each(function(e){k(this).toggleClass(i.call(this,e,xt(this),t),t)}):this.each(function(){var e,t,n,r;if(a){t=0,n=k(this),r=bt(i);while(e=r[t++])n.hasClass(e)?n.removeClass(e):n.addClass(e)}else void 0!==i&&\"boolean\"!==o||((e=xt(this))&&Q.set(this,\"__className__\",e),this.setAttribute&&this.setAttribute(\"class\",e||!1===i?\"\":Q.get(this,\"__className__\")||\"\"))})},hasClass:function(e){var t,n,r=0;t=\" \"+e+\" \";while(n=this[r++])if(1===n.nodeType&&-1<(\" \"+mt(xt(n))+\" \").indexOf(t))return!0;return!1}});var wt=/\\r/g;k.fn.extend({val:function(n){var r,e,i,t=this[0];return arguments.length?(i=m(n),this.each(function(e){var t;1===this.nodeType&&(null==(t=i?n.call(this,e,k(this).val()):n)?t=\"\":\"number\"==typeof t?t+=\"\":Array.isArray(t)&&(t=k.map(t,function(e){return null==e?\"\":e+\"\"})),(r=k.valHooks[this.type]||k.valHooks[this.nodeName.toLowerCase()])&&\"set\"in r&&void 0!==r.set(this,t,\"value\")||(this.value=t))})):t?(r=k.valHooks[t.type]||k.valHooks[t.nodeName.toLowerCase()])&&\"get\"in r&&void 0!==(e=r.get(t,\"value\"))?e:\"string\"==typeof(e=t.value)?e.replace(wt,\"\"):null==e?\"\":e:void 0}}),k.extend({valHooks:{option:{get:function(e){var t=k.find.attr(e,\"value\");return null!=t?t:mt(k.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,a=\"select-one\"===e.type,s=a?null:[],u=a?o+1:i.length;for(r=o<0?u:a?o:0;r<u;r++)if(((n=i[r]).selected||r===o)&&!n.disabled&&(!n.parentNode.disabled||!A(n.parentNode,\"optgroup\"))){if(t=k(n).val(),a)return t;s.push(t)}return s},set:function(e,t){var n,r,i=e.options,o=k.makeArray(t),a=i.length;while(a--)((r=i[a]).selected=-1<k.inArray(k.valHooks.option.get(r),o))&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),k.each([\"radio\",\"checkbox\"],function(){k.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=-1<k.inArray(k(e).val(),t)}},y.checkOn||(k.valHooks[this].get=function(e){return null===e.getAttribute(\"value\")?\"on\":e.value})}),y.focusin=\"onfocusin\"in C;var Tt=/^(?:focusinfocus|focusoutblur)$/,Ct=function(e){e.stopPropagation()};k.extend(k.event,{trigger:function(e,t,n,r){var i,o,a,s,u,l,c,f,p=[n||E],d=v.call(e,\"type\")?e.type:e,h=v.call(e,\"namespace\")?e.namespace.split(\".\"):[];if(o=f=a=n=n||E,3!==n.nodeType&&8!==n.nodeType&&!Tt.test(d+k.event.triggered)&&(-1<d.indexOf(\".\")&&(d=(h=d.split(\".\")).shift(),h.sort()),u=d.indexOf(\":\")<0&&\"on\"+d,(e=e[k.expando]?e:new k.Event(d,\"object\"==typeof e&&e)).isTrigger=r?2:3,e.namespace=h.join(\".\"),e.rnamespace=e.namespace?new RegExp(\"(^|\\\\.)\"+h.join(\"\\\\.(?:.*\\\\.|)\")+\"(\\\\.|$)\"):null,e.result=void 0,e.target||(e.target=n),t=null==t?[e]:k.makeArray(t,[e]),c=k.event.special[d]||{},r||!c.trigger||!1!==c.trigger.apply(n,t))){if(!r&&!c.noBubble&&!x(n)){for(s=c.delegateType||d,Tt.test(s+d)||(o=o.parentNode);o;o=o.parentNode)p.push(o),a=o;a===(n.ownerDocument||E)&&p.push(a.defaultView||a.parentWindow||C)}i=0;while((o=p[i++])&&!e.isPropagationStopped())f=o,e.type=1<i?s:c.bindType||d,(l=(Q.get(o,\"events\")||{})[e.type]&&Q.get(o,\"handle\"))&&l.apply(o,t),(l=u&&o[u])&&l.apply&&G(o)&&(e.result=l.apply(o,t),!1===e.result&&e.preventDefault());return e.type=d,r||e.isDefaultPrevented()||c._default&&!1!==c._default.apply(p.pop(),t)||!G(n)||u&&m(n[d])&&!x(n)&&((a=n[u])&&(n[u]=null),k.event.triggered=d,e.isPropagationStopped()&&f.addEventListener(d,Ct),n[d](),e.isPropagationStopped()&&f.removeEventListener(d,Ct),k.event.triggered=void 0,a&&(n[u]=a)),e.result}},simulate:function(e,t,n){var r=k.extend(new k.Event,n,{type:e,isSimulated:!0});k.event.trigger(r,null,t)}}),k.fn.extend({trigger:function(e,t){return this.each(function(){k.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return k.event.trigger(e,t,n,!0)}}),y.focusin||k.each({focus:\"focusin\",blur:\"focusout\"},function(n,r){var i=function(e){k.event.simulate(r,e.target,k.event.fix(e))};k.event.special[r]={setup:function(){var e=this.ownerDocument||this,t=Q.access(e,r);t||e.addEventListener(n,i,!0),Q.access(e,r,(t||0)+1)},teardown:function(){var e=this.ownerDocument||this,t=Q.access(e,r)-1;t?Q.access(e,r,t):(e.removeEventListener(n,i,!0),Q.remove(e,r))}}});var Et=C.location,kt=Date.now(),St=/\\?/;k.parseXML=function(e){var t;if(!e||\"string\"!=typeof e)return null;try{t=(new C.DOMParser).parseFromString(e,\"text/xml\")}catch(e){t=void 0}return t&&!t.getElementsByTagName(\"parsererror\").length||k.error(\"Invalid XML: \"+e),t};var Nt=/\\[\\]$/,At=/\\r?\\n/g,Dt=/^(?:submit|button|image|reset|file)$/i,jt=/^(?:input|select|textarea|keygen)/i;function qt(n,e,r,i){var t;if(Array.isArray(e))k.each(e,function(e,t){r||Nt.test(n)?i(n,t):qt(n+\"[\"+(\"object\"==typeof t&&null!=t?e:\"\")+\"]\",t,r,i)});else if(r||\"object\"!==w(e))i(n,e);else for(t in e)qt(n+\"[\"+t+\"]\",e[t],r,i)}k.param=function(e,t){var n,r=[],i=function(e,t){var n=m(t)?t():t;r[r.length]=encodeURIComponent(e)+\"=\"+encodeURIComponent(null==n?\"\":n)};if(null==e)return\"\";if(Array.isArray(e)||e.jquery&&!k.isPlainObject(e))k.each(e,function(){i(this.name,this.value)});else for(n in e)qt(n,e[n],t,i);return r.join(\"&\")},k.fn.extend({serialize:function(){return k.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=k.prop(this,\"elements\");return e?k.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!k(this).is(\":disabled\")&&jt.test(this.nodeName)&&!Dt.test(e)&&(this.checked||!pe.test(e))}).map(function(e,t){var n=k(this).val();return null==n?null:Array.isArray(n)?k.map(n,function(e){return{name:t.name,value:e.replace(At,\"\\r\\n\")}}):{name:t.name,value:n.replace(At,\"\\r\\n\")}}).get()}});var Lt=/%20/g,Ht=/#.*$/,Ot=/([?&])_=[^&]*/,Pt=/^(.*?):[ \\t]*([^\\r\\n]*)$/gm,Rt=/^(?:GET|HEAD)$/,Mt=/^\\/\\//,It={},Wt={},$t=\"*/\".concat(\"*\"),Ft=E.createElement(\"a\");function Bt(o){return function(e,t){\"string\"!=typeof e&&(t=e,e=\"*\");var n,r=0,i=e.toLowerCase().match(R)||[];if(m(t))while(n=i[r++])\"+\"===n[0]?(n=n.slice(1)||\"*\",(o[n]=o[n]||[]).unshift(t)):(o[n]=o[n]||[]).push(t)}}function _t(t,i,o,a){var s={},u=t===Wt;function l(e){var r;return s[e]=!0,k.each(t[e]||[],function(e,t){var n=t(i,o,a);return\"string\"!=typeof n||u||s[n]?u?!(r=n):void 0:(i.dataTypes.unshift(n),l(n),!1)}),r}return l(i.dataTypes[0])||!s[\"*\"]&&l(\"*\")}function zt(e,t){var n,r,i=k.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&k.extend(!0,e,r),e}Ft.href=Et.href,k.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Et.href,type:\"GET\",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Et.protocol),global:!0,processData:!0,async:!0,contentType:\"application/x-www-form-urlencoded; charset=UTF-8\",accepts:{\"*\":$t,text:\"text/plain\",html:\"text/html\",xml:\"application/xml, text/xml\",json:\"application/json, text/javascript\"},contents:{xml:/\\bxml\\b/,html:/\\bhtml/,json:/\\bjson\\b/},responseFields:{xml:\"responseXML\",text:\"responseText\",json:\"responseJSON\"},converters:{\"* text\":String,\"text html\":!0,\"text json\":JSON.parse,\"text xml\":k.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?zt(zt(e,k.ajaxSettings),t):zt(k.ajaxSettings,e)},ajaxPrefilter:Bt(It),ajaxTransport:Bt(Wt),ajax:function(e,t){\"object\"==typeof e&&(t=e,e=void 0),t=t||{};var c,f,p,n,d,r,h,g,i,o,v=k.ajaxSetup({},t),y=v.context||v,m=v.context&&(y.nodeType||y.jquery)?k(y):k.event,x=k.Deferred(),b=k.Callbacks(\"once memory\"),w=v.statusCode||{},a={},s={},u=\"canceled\",T={readyState:0,getResponseHeader:function(e){var t;if(h){if(!n){n={};while(t=Pt.exec(p))n[t[1].toLowerCase()+\" \"]=(n[t[1].toLowerCase()+\" \"]||[]).concat(t[2])}t=n[e.toLowerCase()+\" \"]}return null==t?null:t.join(\", \")},getAllResponseHeaders:function(){return h?p:null},setRequestHeader:function(e,t){return null==h&&(e=s[e.toLowerCase()]=s[e.toLowerCase()]||e,a[e]=t),this},overrideMimeType:function(e){return null==h&&(v.mimeType=e),this},statusCode:function(e){var t;if(e)if(h)T.always(e[T.status]);else for(t in e)w[t]=[w[t],e[t]];return this},abort:function(e){var t=e||u;return c&&c.abort(t),l(0,t),this}};if(x.promise(T),v.url=((e||v.url||Et.href)+\"\").replace(Mt,Et.protocol+\"//\"),v.type=t.method||t.type||v.method||v.type,v.dataTypes=(v.dataType||\"*\").toLowerCase().match(R)||[\"\"],null==v.crossDomain){r=E.createElement(\"a\");try{r.href=v.url,r.href=r.href,v.crossDomain=Ft.protocol+\"//\"+Ft.host!=r.protocol+\"//\"+r.host}catch(e){v.crossDomain=!0}}if(v.data&&v.processData&&\"string\"!=typeof v.data&&(v.data=k.param(v.data,v.traditional)),_t(It,v,t,T),h)return T;for(i in(g=k.event&&v.global)&&0==k.active++&&k.event.trigger(\"ajaxStart\"),v.type=v.type.toUpperCase(),v.hasContent=!Rt.test(v.type),f=v.url.replace(Ht,\"\"),v.hasContent?v.data&&v.processData&&0===(v.contentType||\"\").indexOf(\"application/x-www-form-urlencoded\")&&(v.data=v.data.replace(Lt,\"+\")):(o=v.url.slice(f.length),v.data&&(v.processData||\"string\"==typeof v.data)&&(f+=(St.test(f)?\"&\":\"?\")+v.data,delete v.data),!1===v.cache&&(f=f.replace(Ot,\"$1\"),o=(St.test(f)?\"&\":\"?\")+\"_=\"+kt+++o),v.url=f+o),v.ifModified&&(k.lastModified[f]&&T.setRequestHeader(\"If-Modified-Since\",k.lastModified[f]),k.etag[f]&&T.setRequestHeader(\"If-None-Match\",k.etag[f])),(v.data&&v.hasContent&&!1!==v.contentType||t.contentType)&&T.setRequestHeader(\"Content-Type\",v.contentType),T.setRequestHeader(\"Accept\",v.dataTypes[0]&&v.accepts[v.dataTypes[0]]?v.accepts[v.dataTypes[0]]+(\"*\"!==v.dataTypes[0]?\", \"+$t+\"; q=0.01\":\"\"):v.accepts[\"*\"]),v.headers)T.setRequestHeader(i,v.headers[i]);if(v.beforeSend&&(!1===v.beforeSend.call(y,T,v)||h))return T.abort();if(u=\"abort\",b.add(v.complete),T.done(v.success),T.fail(v.error),c=_t(Wt,v,t,T)){if(T.readyState=1,g&&m.trigger(\"ajaxSend\",[T,v]),h)return T;v.async&&0<v.timeout&&(d=C.setTimeout(function(){T.abort(\"timeout\")},v.timeout));try{h=!1,c.send(a,l)}catch(e){if(h)throw e;l(-1,e)}}else l(-1,\"No Transport\");function l(e,t,n,r){var i,o,a,s,u,l=t;h||(h=!0,d&&C.clearTimeout(d),c=void 0,p=r||\"\",T.readyState=0<e?4:0,i=200<=e&&e<300||304===e,n&&(s=function(e,t,n){var r,i,o,a,s=e.contents,u=e.dataTypes;while(\"*\"===u[0])u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader(\"Content-Type\"));if(r)for(i in s)if(s[i]&&s[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+\" \"+u[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==u[0]&&u.unshift(o),n[o]}(v,T,n)),s=function(e,t,n,r){var i,o,a,s,u,l={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)l[a.toLowerCase()]=e.converters[a];o=c.shift();while(o)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=c.shift())if(\"*\"===o)o=u;else if(\"*\"!==u&&u!==o){if(!(a=l[u+\" \"+o]||l[\"* \"+o]))for(i in l)if((s=i.split(\" \"))[1]===o&&(a=l[u+\" \"+s[0]]||l[\"* \"+s[0]])){!0===a?a=l[i]:!0!==l[i]&&(o=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&e[\"throws\"])t=a(t);else try{t=a(t)}catch(e){return{state:\"parsererror\",error:a?e:\"No conversion from \"+u+\" to \"+o}}}return{state:\"success\",data:t}}(v,s,T,i),i?(v.ifModified&&((u=T.getResponseHeader(\"Last-Modified\"))&&(k.lastModified[f]=u),(u=T.getResponseHeader(\"etag\"))&&(k.etag[f]=u)),204===e||\"HEAD\"===v.type?l=\"nocontent\":304===e?l=\"notmodified\":(l=s.state,o=s.data,i=!(a=s.error))):(a=l,!e&&l||(l=\"error\",e<0&&(e=0))),T.status=e,T.statusText=(t||l)+\"\",i?x.resolveWith(y,[o,l,T]):x.rejectWith(y,[T,l,a]),T.statusCode(w),w=void 0,g&&m.trigger(i?\"ajaxSuccess\":\"ajaxError\",[T,v,i?o:a]),b.fireWith(y,[T,l]),g&&(m.trigger(\"ajaxComplete\",[T,v]),--k.active||k.event.trigger(\"ajaxStop\")))}return T},getJSON:function(e,t,n){return k.get(e,t,n,\"json\")},getScript:function(e,t){return k.get(e,void 0,t,\"script\")}}),k.each([\"get\",\"post\"],function(e,i){k[i]=function(e,t,n,r){return m(t)&&(r=r||n,n=t,t=void 0),k.ajax(k.extend({url:e,type:i,dataType:r,data:t,success:n},k.isPlainObject(e)&&e))}}),k._evalUrl=function(e,t){return k.ajax({url:e,type:\"GET\",dataType:\"script\",cache:!0,async:!1,global:!1,converters:{\"text script\":function(){}},dataFilter:function(e){k.globalEval(e,t)}})},k.fn.extend({wrapAll:function(e){var t;return this[0]&&(m(e)&&(e=e.call(this[0])),t=k(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstElementChild)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(n){return m(n)?this.each(function(e){k(this).wrapInner(n.call(this,e))}):this.each(function(){var e=k(this),t=e.contents();t.length?t.wrapAll(n):e.append(n)})},wrap:function(t){var n=m(t);return this.each(function(e){k(this).wrapAll(n?t.call(this,e):t)})},unwrap:function(e){return this.parent(e).not(\"body\").each(function(){k(this).replaceWith(this.childNodes)}),this}}),k.expr.pseudos.hidden=function(e){return!k.expr.pseudos.visible(e)},k.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},k.ajaxSettings.xhr=function(){try{return new C.XMLHttpRequest}catch(e){}};var Ut={0:200,1223:204},Xt=k.ajaxSettings.xhr();y.cors=!!Xt&&\"withCredentials\"in Xt,y.ajax=Xt=!!Xt,k.ajaxTransport(function(i){var o,a;if(y.cors||Xt&&!i.crossDomain)return{send:function(e,t){var n,r=i.xhr();if(r.open(i.type,i.url,i.async,i.username,i.password),i.xhrFields)for(n in i.xhrFields)r[n]=i.xhrFields[n];for(n in i.mimeType&&r.overrideMimeType&&r.overrideMimeType(i.mimeType),i.crossDomain||e[\"X-Requested-With\"]||(e[\"X-Requested-With\"]=\"XMLHttpRequest\"),e)r.setRequestHeader(n,e[n]);o=function(e){return function(){o&&(o=a=r.onload=r.onerror=r.onabort=r.ontimeout=r.onreadystatechange=null,\"abort\"===e?r.abort():\"error\"===e?\"number\"!=typeof r.status?t(0,\"error\"):t(r.status,r.statusText):t(Ut[r.status]||r.status,r.statusText,\"text\"!==(r.responseType||\"text\")||\"string\"!=typeof r.responseText?{binary:r.response}:{text:r.responseText},r.getAllResponseHeaders()))}},r.onload=o(),a=r.onerror=r.ontimeout=o(\"error\"),void 0!==r.onabort?r.onabort=a:r.onreadystatechange=function(){4===r.readyState&&C.setTimeout(function(){o&&a()})},o=o(\"abort\");try{r.send(i.hasContent&&i.data||null)}catch(e){if(o)throw e}},abort:function(){o&&o()}}}),k.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),k.ajaxSetup({accepts:{script:\"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript\"},contents:{script:/\\b(?:java|ecma)script\\b/},converters:{\"text script\":function(e){return k.globalEval(e),e}}}),k.ajaxPrefilter(\"script\",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type=\"GET\")}),k.ajaxTransport(\"script\",function(n){var r,i;if(n.crossDomain||n.scriptAttrs)return{send:function(e,t){r=k(\"<script>\").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on(\"load error\",i=function(e){r.remove(),i=null,e&&t(\"error\"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var Vt,Gt=[],Yt=/(=)\\?(?=&|$)|\\?\\?/;k.ajaxSetup({jsonp:\"callback\",jsonpCallback:function(){var e=Gt.pop()||k.expando+\"_\"+kt++;return this[e]=!0,e}}),k.ajaxPrefilter(\"json jsonp\",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Yt.test(e.url)?\"url\":\"string\"==typeof e.data&&0===(e.contentType||\"\").indexOf(\"application/x-www-form-urlencoded\")&&Yt.test(e.data)&&\"data\");if(a||\"jsonp\"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Yt,\"$1\"+r):!1!==e.jsonp&&(e.url+=(St.test(e.url)?\"&\":\"?\")+e.jsonp+\"=\"+r),e.converters[\"script json\"]=function(){return o||k.error(r+\" was not called\"),o[0]},e.dataTypes[0]=\"json\",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?k(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Gt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),\"script\"}),y.createHTMLDocument=((Vt=E.implementation.createHTMLDocument(\"\").body).innerHTML=\"<form></form><form></form>\",2===Vt.childNodes.length),k.parseHTML=function(e,t,n){return\"string\"!=typeof e?[]:(\"boolean\"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument(\"\")).createElement(\"base\")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=D.exec(e))?[t.createElement(i[1])]:(i=we([e],t,o),o&&o.length&&k(o).remove(),k.merge([],i.childNodes)));var r,i,o},k.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(\" \");return-1<s&&(r=mt(e.slice(s)),e=e.slice(0,s)),m(t)?(n=t,t=void 0):t&&\"object\"==typeof t&&(i=\"POST\"),0<a.length&&k.ajax({url:e,type:i||\"GET\",dataType:\"html\",data:t}).done(function(e){o=arguments,a.html(r?k(\"<div>\").append(k.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},k.each([\"ajaxStart\",\"ajaxStop\",\"ajaxComplete\",\"ajaxError\",\"ajaxSuccess\",\"ajaxSend\"],function(e,t){k.fn[t]=function(e){return this.on(t,e)}}),k.expr.pseudos.animated=function(t){return k.grep(k.timers,function(e){return t===e.elem}).length},k.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=k.css(e,\"position\"),c=k(e),f={};\"static\"===l&&(e.style.position=\"relative\"),s=c.offset(),o=k.css(e,\"top\"),u=k.css(e,\"left\"),(\"absolute\"===l||\"fixed\"===l)&&-1<(o+u).indexOf(\"auto\")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,k.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),\"using\"in t?t.using.call(e,f):c.css(f)}},k.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){k.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if(\"fixed\"===k.css(r,\"position\"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&\"static\"===k.css(e,\"position\"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=k(e).offset()).top+=k.css(e,\"borderTopWidth\",!0),i.left+=k.css(e,\"borderLeftWidth\",!0))}return{top:t.top-i.top-k.css(r,\"marginTop\",!0),left:t.left-i.left-k.css(r,\"marginLeft\",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&\"static\"===k.css(e,\"position\"))e=e.offsetParent;return e||ie})}}),k.each({scrollLeft:\"pageXOffset\",scrollTop:\"pageYOffset\"},function(t,i){var o=\"pageYOffset\"===i;k.fn[t]=function(e){return _(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),k.each([\"top\",\"left\"],function(e,n){k.cssHooks[n]=ze(y.pixelPosition,function(e,t){if(t)return t=_e(e,n),$e.test(t)?k(e).position()[n]+\"px\":t})}),k.each({Height:\"height\",Width:\"width\"},function(a,s){k.each({padding:\"inner\"+a,content:s,\"\":\"outer\"+a},function(r,o){k.fn[o]=function(e,t){var n=arguments.length&&(r||\"boolean\"!=typeof e),i=r||(!0===e||!0===t?\"margin\":\"border\");return _(this,function(e,t,n){var r;return x(e)?0===o.indexOf(\"outer\")?e[\"inner\"+a]:e.document.documentElement[\"client\"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body[\"scroll\"+a],r[\"scroll\"+a],e.body[\"offset\"+a],r[\"offset\"+a],r[\"client\"+a])):void 0===n?k.css(e,t,i):k.style(e,t,n,i)},s,n?e:void 0,n)}})}),k.each(\"blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu\".split(\" \"),function(e,n){k.fn[n]=function(e,t){return 0<arguments.length?this.on(n,null,e,t):this.trigger(n)}}),k.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),k.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,\"**\"):this.off(t,e||\"**\",n)}}),k.proxy=function(e,t){var n,r,i;if(\"string\"==typeof t&&(n=e[t],t=e,e=n),m(e))return r=s.call(arguments,2),(i=function(){return e.apply(t||this,r.concat(s.call(arguments)))}).guid=e.guid=e.guid||k.guid++,i},k.holdReady=function(e){e?k.readyWait++:k.ready(!0)},k.isArray=Array.isArray,k.parseJSON=JSON.parse,k.nodeName=A,k.isFunction=m,k.isWindow=x,k.camelCase=V,k.type=w,k.now=Date.now,k.isNumeric=function(e){var t=k.type(e);return(\"number\"===t||\"string\"===t)&&!isNaN(e-parseFloat(e))},\"function\"==typeof define&&define.amd&&define(\"jquery\",[],function(){return k});var Qt=C.jQuery,Jt=C.$;return k.noConflict=function(e){return C.$===k&&(C.$=Jt),e&&C.jQuery===k&&(C.jQuery=Qt),k},e||(C.jQuery=C.$=k),k});\n/*! jQuery UI - v1.12.1 - 2019-01-27\n* http://jqueryui.com\n* Includes: widget.js, position.js, data.js, disable-selection.js, focusable.js, form-reset-mixin.js, jquery-1-7.js, keycode.js, labels.js, scroll-parent.js, tabbable.js, unique-id.js, widgets/resizable.js, widgets/mouse.js\n* Copyright jQuery Foundation and other contributors; Licensed MIT */\n\n(function(t){\"function\"==typeof define&&define.amd?define([\"jquery\"],t):t(jQuery)})(function(t){function e(t){for(var e=t.css(\"visibility\");\"inherit\"===e;)t=t.parent(),e=t.css(\"visibility\");return\"hidden\"!==e}t.ui=t.ui||{},t.ui.version=\"1.12.1\";var i=0,s=Array.prototype.slice;t.cleanData=function(e){return function(i){var s,n,o;for(o=0;null!=(n=i[o]);o++)try{s=t._data(n,\"events\"),s&&s.remove&&t(n).triggerHandler(\"remove\")}catch(a){}e(i)}}(t.cleanData),t.widget=function(e,i,s){var n,o,a,r={},h=e.split(\".\")[0];e=e.split(\".\")[1];var l=h+\"-\"+e;return s||(s=i,i=t.Widget),t.isArray(s)&&(s=t.extend.apply(null,[{}].concat(s))),t.expr[\":\"][l.toLowerCase()]=function(e){return!!t.data(e,l)},t[h]=t[h]||{},n=t[h][e],o=t[h][e]=function(t,e){return this._createWidget?(arguments.length&&this._createWidget(t,e),void 0):new o(t,e)},t.extend(o,n,{version:s.version,_proto:t.extend({},s),_childConstructors:[]}),a=new i,a.options=t.widget.extend({},a.options),t.each(s,function(e,s){return t.isFunction(s)?(r[e]=function(){function t(){return i.prototype[e].apply(this,arguments)}function n(t){return i.prototype[e].apply(this,t)}return function(){var e,i=this._super,o=this._superApply;return this._super=t,this._superApply=n,e=s.apply(this,arguments),this._super=i,this._superApply=o,e}}(),void 0):(r[e]=s,void 0)}),o.prototype=t.widget.extend(a,{widgetEventPrefix:n?a.widgetEventPrefix||e:e},r,{constructor:o,namespace:h,widgetName:e,widgetFullName:l}),n?(t.each(n._childConstructors,function(e,i){var s=i.prototype;t.widget(s.namespace+\".\"+s.widgetName,o,i._proto)}),delete n._childConstructors):i._childConstructors.push(o),t.widget.bridge(e,o),o},t.widget.extend=function(e){for(var i,n,o=s.call(arguments,1),a=0,r=o.length;r>a;a++)for(i in o[a])n=o[a][i],o[a].hasOwnProperty(i)&&void 0!==n&&(e[i]=t.isPlainObject(n)?t.isPlainObject(e[i])?t.widget.extend({},e[i],n):t.widget.extend({},n):n);return e},t.widget.bridge=function(e,i){var n=i.prototype.widgetFullName||e;t.fn[e]=function(o){var a=\"string\"==typeof o,r=s.call(arguments,1),h=this;return a?this.length||\"instance\"!==o?this.each(function(){var i,s=t.data(this,n);return\"instance\"===o?(h=s,!1):s?t.isFunction(s[o])&&\"_\"!==o.charAt(0)?(i=s[o].apply(s,r),i!==s&&void 0!==i?(h=i&&i.jquery?h.pushStack(i.get()):i,!1):void 0):t.error(\"no such method '\"+o+\"' for \"+e+\" widget instance\"):t.error(\"cannot call methods on \"+e+\" prior to initialization; \"+\"attempted to call method '\"+o+\"'\")}):h=void 0:(r.length&&(o=t.widget.extend.apply(null,[o].concat(r))),this.each(function(){var e=t.data(this,n);e?(e.option(o||{}),e._init&&e._init()):t.data(this,n,new i(o,this))})),h}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:\"widget\",widgetEventPrefix:\"\",defaultElement:\"<div>\",options:{classes:{},disabled:!1,create:null},_createWidget:function(e,s){s=t(s||this.defaultElement||this)[0],this.element=t(s),this.uuid=i++,this.eventNamespace=\".\"+this.widgetName+this.uuid,this.bindings=t(),this.hoverable=t(),this.focusable=t(),this.classesElementLookup={},s!==this&&(t.data(s,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===s&&this.destroy()}}),this.document=t(s.style?s.ownerDocument:s.document||s),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this.options=t.widget.extend({},this.options,this._getCreateOptions(),e),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger(\"create\",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){var e=this;this._destroy(),t.each(this.classesElementLookup,function(t,i){e._removeClass(i,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr(\"aria-disabled\"),this.bindings.off(this.eventNamespace)},_destroy:t.noop,widget:function(){return this.element},option:function(e,i){var s,n,o,a=e;if(0===arguments.length)return t.widget.extend({},this.options);if(\"string\"==typeof e)if(a={},s=e.split(\".\"),e=s.shift(),s.length){for(n=a[e]=t.widget.extend({},this.options[e]),o=0;s.length-1>o;o++)n[s[o]]=n[s[o]]||{},n=n[s[o]];if(e=s.pop(),1===arguments.length)return void 0===n[e]?null:n[e];n[e]=i}else{if(1===arguments.length)return void 0===this.options[e]?null:this.options[e];a[e]=i}return this._setOptions(a),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return\"classes\"===t&&this._setOptionClasses(e),this.options[t]=e,\"disabled\"===t&&this._setOptionDisabled(e),this},_setOptionClasses:function(e){var i,s,n;for(i in e)n=this.classesElementLookup[i],e[i]!==this.options.classes[i]&&n&&n.length&&(s=t(n.get()),this._removeClass(n,i),s.addClass(this._classes({element:s,keys:i,classes:e,add:!0})))},_setOptionDisabled:function(t){this._toggleClass(this.widget(),this.widgetFullName+\"-disabled\",null,!!t),t&&(this._removeClass(this.hoverable,null,\"ui-state-hover\"),this._removeClass(this.focusable,null,\"ui-state-focus\"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(e){function i(i,o){var a,r;for(r=0;i.length>r;r++)a=n.classesElementLookup[i[r]]||t(),a=e.add?t(t.unique(a.get().concat(e.element.get()))):t(a.not(e.element).get()),n.classesElementLookup[i[r]]=a,s.push(i[r]),o&&e.classes[i[r]]&&s.push(e.classes[i[r]])}var s=[],n=this;return e=t.extend({element:this.element,classes:this.options.classes||{}},e),this._on(e.element,{remove:\"_untrackClassesElement\"}),e.keys&&i(e.keys.match(/\\S+/g)||[],!0),e.extra&&i(e.extra.match(/\\S+/g)||[]),s.join(\" \")},_untrackClassesElement:function(e){var i=this;t.each(i.classesElementLookup,function(s,n){-1!==t.inArray(e.target,n)&&(i.classesElementLookup[s]=t(n.not(e.target).get()))})},_removeClass:function(t,e,i){return this._toggleClass(t,e,i,!1)},_addClass:function(t,e,i){return this._toggleClass(t,e,i,!0)},_toggleClass:function(t,e,i,s){s=\"boolean\"==typeof s?s:i;var n=\"string\"==typeof t||null===t,o={extra:n?e:i,keys:n?t:e,element:n?this.element:t,add:s};return o.element.toggleClass(this._classes(o),s),this},_on:function(e,i,s){var n,o=this;\"boolean\"!=typeof e&&(s=i,i=e,e=!1),s?(i=n=t(i),this.bindings=this.bindings.add(i)):(s=i,i=this.element,n=this.widget()),t.each(s,function(s,a){function r(){return e||o.options.disabled!==!0&&!t(this).hasClass(\"ui-state-disabled\")?(\"string\"==typeof a?o[a]:a).apply(o,arguments):void 0}\"string\"!=typeof a&&(r.guid=a.guid=a.guid||r.guid||t.guid++);var h=s.match(/^([\\w:-]*)\\s*(.*)$/),l=h[1]+o.eventNamespace,c=h[2];c?n.on(l,c,r):i.on(l,r)})},_off:function(e,i){i=(i||\"\").split(\" \").join(this.eventNamespace+\" \")+this.eventNamespace,e.off(i).off(i),this.bindings=t(this.bindings.not(e).get()),this.focusable=t(this.focusable.not(e).get()),this.hoverable=t(this.hoverable.not(e).get())},_delay:function(t,e){function i(){return(\"string\"==typeof t?s[t]:t).apply(s,arguments)}var s=this;return setTimeout(i,e||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){this._addClass(t(e.currentTarget),null,\"ui-state-hover\")},mouseleave:function(e){this._removeClass(t(e.currentTarget),null,\"ui-state-hover\")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){this._addClass(t(e.currentTarget),null,\"ui-state-focus\")},focusout:function(e){this._removeClass(t(e.currentTarget),null,\"ui-state-focus\")}})},_trigger:function(e,i,s){var n,o,a=this.options[e];if(s=s||{},i=t.Event(i),i.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),i.target=this.element[0],o=i.originalEvent)for(n in o)n in i||(i[n]=o[n]);return this.element.trigger(i,s),!(t.isFunction(a)&&a.apply(this.element[0],[i].concat(s))===!1||i.isDefaultPrevented())}},t.each({show:\"fadeIn\",hide:\"fadeOut\"},function(e,i){t.Widget.prototype[\"_\"+e]=function(s,n,o){\"string\"==typeof n&&(n={effect:n});var a,r=n?n===!0||\"number\"==typeof n?i:n.effect||i:e;n=n||{},\"number\"==typeof n&&(n={duration:n}),a=!t.isEmptyObject(n),n.complete=o,n.delay&&s.delay(n.delay),a&&t.effects&&t.effects.effect[r]?s[e](n):r!==e&&s[r]?s[r](n.duration,n.easing,o):s.queue(function(i){t(this)[e](),o&&o.call(s[0]),i()})}}),t.widget,function(){function e(t,e,i){return[parseFloat(t[0])*(u.test(t[0])?e/100:1),parseFloat(t[1])*(u.test(t[1])?i/100:1)]}function i(e,i){return parseInt(t.css(e,i),10)||0}function s(e){var i=e[0];return 9===i.nodeType?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:t.isWindow(i)?{width:e.width(),height:e.height(),offset:{top:e.scrollTop(),left:e.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()}}var n,o=Math.max,a=Math.abs,r=/left|center|right/,h=/top|center|bottom/,l=/[\\+\\-]\\d+(\\.[\\d]+)?%?/,c=/^\\w+/,u=/%$/,d=t.fn.position;t.position={scrollbarWidth:function(){if(void 0!==n)return n;var e,i,s=t(\"<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>\"),o=s.children()[0];return t(\"body\").append(s),e=o.offsetWidth,s.css(\"overflow\",\"scroll\"),i=o.offsetWidth,e===i&&(i=s[0].clientWidth),s.remove(),n=e-i},getScrollInfo:function(e){var i=e.isWindow||e.isDocument?\"\":e.element.css(\"overflow-x\"),s=e.isWindow||e.isDocument?\"\":e.element.css(\"overflow-y\"),n=\"scroll\"===i||\"auto\"===i&&e.width<e.element[0].scrollWidth,o=\"scroll\"===s||\"auto\"===s&&e.height<e.element[0].scrollHeight;return{width:o?t.position.scrollbarWidth():0,height:n?t.position.scrollbarWidth():0}},getWithinInfo:function(e){var i=t(e||window),s=t.isWindow(i[0]),n=!!i[0]&&9===i[0].nodeType,o=!s&&!n;return{element:i,isWindow:s,isDocument:n,offset:o?t(e).offset():{left:0,top:0},scrollLeft:i.scrollLeft(),scrollTop:i.scrollTop(),width:i.outerWidth(),height:i.outerHeight()}}},t.fn.position=function(n){if(!n||!n.of)return d.apply(this,arguments);n=t.extend({},n);var u,p,f,m,g,_,v=t(n.of),b=t.position.getWithinInfo(n.within),y=t.position.getScrollInfo(b),w=(n.collision||\"flip\").split(\" \"),x={};return _=s(v),v[0].preventDefault&&(n.at=\"left top\"),p=_.width,f=_.height,m=_.offset,g=t.extend({},m),t.each([\"my\",\"at\"],function(){var t,e,i=(n[this]||\"\").split(\" \");1===i.length&&(i=r.test(i[0])?i.concat([\"center\"]):h.test(i[0])?[\"center\"].concat(i):[\"center\",\"center\"]),i[0]=r.test(i[0])?i[0]:\"center\",i[1]=h.test(i[1])?i[1]:\"center\",t=l.exec(i[0]),e=l.exec(i[1]),x[this]=[t?t[0]:0,e?e[0]:0],n[this]=[c.exec(i[0])[0],c.exec(i[1])[0]]}),1===w.length&&(w[1]=w[0]),\"right\"===n.at[0]?g.left+=p:\"center\"===n.at[0]&&(g.left+=p/2),\"bottom\"===n.at[1]?g.top+=f:\"center\"===n.at[1]&&(g.top+=f/2),u=e(x.at,p,f),g.left+=u[0],g.top+=u[1],this.each(function(){var s,r,h=t(this),l=h.outerWidth(),c=h.outerHeight(),d=i(this,\"marginLeft\"),_=i(this,\"marginTop\"),k=l+d+i(this,\"marginRight\")+y.width,C=c+_+i(this,\"marginBottom\")+y.height,D=t.extend({},g),T=e(x.my,h.outerWidth(),h.outerHeight());\"right\"===n.my[0]?D.left-=l:\"center\"===n.my[0]&&(D.left-=l/2),\"bottom\"===n.my[1]?D.top-=c:\"center\"===n.my[1]&&(D.top-=c/2),D.left+=T[0],D.top+=T[1],s={marginLeft:d,marginTop:_},t.each([\"left\",\"top\"],function(e,i){t.ui.position[w[e]]&&t.ui.position[w[e]][i](D,{targetWidth:p,targetHeight:f,elemWidth:l,elemHeight:c,collisionPosition:s,collisionWidth:k,collisionHeight:C,offset:[u[0]+T[0],u[1]+T[1]],my:n.my,at:n.at,within:b,elem:h})}),n.using&&(r=function(t){var e=m.left-D.left,i=e+p-l,s=m.top-D.top,r=s+f-c,u={target:{element:v,left:m.left,top:m.top,width:p,height:f},element:{element:h,left:D.left,top:D.top,width:l,height:c},horizontal:0>i?\"left\":e>0?\"right\":\"center\",vertical:0>r?\"top\":s>0?\"bottom\":\"middle\"};l>p&&p>a(e+i)&&(u.horizontal=\"center\"),c>f&&f>a(s+r)&&(u.vertical=\"middle\"),u.important=o(a(e),a(i))>o(a(s),a(r))?\"horizontal\":\"vertical\",n.using.call(this,t,u)}),h.offset(t.extend(D,{using:r}))})},t.ui.position={fit:{left:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollLeft:s.offset.left,a=s.width,r=t.left-e.collisionPosition.marginLeft,h=n-r,l=r+e.collisionWidth-a-n;e.collisionWidth>a?h>0&&0>=l?(i=t.left+h+e.collisionWidth-a-n,t.left+=h-i):t.left=l>0&&0>=h?n:h>l?n+a-e.collisionWidth:n:h>0?t.left+=h:l>0?t.left-=l:t.left=o(t.left-r,t.left)},top:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollTop:s.offset.top,a=e.within.height,r=t.top-e.collisionPosition.marginTop,h=n-r,l=r+e.collisionHeight-a-n;e.collisionHeight>a?h>0&&0>=l?(i=t.top+h+e.collisionHeight-a-n,t.top+=h-i):t.top=l>0&&0>=h?n:h>l?n+a-e.collisionHeight:n:h>0?t.top+=h:l>0?t.top-=l:t.top=o(t.top-r,t.top)}},flip:{left:function(t,e){var i,s,n=e.within,o=n.offset.left+n.scrollLeft,r=n.width,h=n.isWindow?n.scrollLeft:n.offset.left,l=t.left-e.collisionPosition.marginLeft,c=l-h,u=l+e.collisionWidth-r-h,d=\"left\"===e.my[0]?-e.elemWidth:\"right\"===e.my[0]?e.elemWidth:0,p=\"left\"===e.at[0]?e.targetWidth:\"right\"===e.at[0]?-e.targetWidth:0,f=-2*e.offset[0];0>c?(i=t.left+d+p+f+e.collisionWidth-r-o,(0>i||a(c)>i)&&(t.left+=d+p+f)):u>0&&(s=t.left-e.collisionPosition.marginLeft+d+p+f-h,(s>0||u>a(s))&&(t.left+=d+p+f))},top:function(t,e){var i,s,n=e.within,o=n.offset.top+n.scrollTop,r=n.height,h=n.isWindow?n.scrollTop:n.offset.top,l=t.top-e.collisionPosition.marginTop,c=l-h,u=l+e.collisionHeight-r-h,d=\"top\"===e.my[1],p=d?-e.elemHeight:\"bottom\"===e.my[1]?e.elemHeight:0,f=\"top\"===e.at[1]?e.targetHeight:\"bottom\"===e.at[1]?-e.targetHeight:0,m=-2*e.offset[1];0>c?(s=t.top+p+f+m+e.collisionHeight-r-o,(0>s||a(c)>s)&&(t.top+=p+f+m)):u>0&&(i=t.top-e.collisionPosition.marginTop+p+f+m-h,(i>0||u>a(i))&&(t.top+=p+f+m))}},flipfit:{left:function(){t.ui.position.flip.left.apply(this,arguments),t.ui.position.fit.left.apply(this,arguments)},top:function(){t.ui.position.flip.top.apply(this,arguments),t.ui.position.fit.top.apply(this,arguments)}}}}(),t.ui.position,t.extend(t.expr[\":\"],{data:t.expr.createPseudo?t.expr.createPseudo(function(e){return function(i){return!!t.data(i,e)}}):function(e,i,s){return!!t.data(e,s[3])}}),t.fn.extend({disableSelection:function(){var t=\"onselectstart\"in document.createElement(\"div\")?\"selectstart\":\"mousedown\";return function(){return this.on(t+\".ui-disableSelection\",function(t){t.preventDefault()})}}(),enableSelection:function(){return this.off(\".ui-disableSelection\")}}),t.ui.focusable=function(i,s){var n,o,a,r,h,l=i.nodeName.toLowerCase();return\"area\"===l?(n=i.parentNode,o=n.name,i.href&&o&&\"map\"===n.nodeName.toLowerCase()?(a=t(\"img[usemap='#\"+o+\"']\"),a.length>0&&a.is(\":visible\")):!1):(/^(input|select|textarea|button|object)$/.test(l)?(r=!i.disabled,r&&(h=t(i).closest(\"fieldset\")[0],h&&(r=!h.disabled))):r=\"a\"===l?i.href||s:s,r&&t(i).is(\":visible\")&&e(t(i)))},t.extend(t.expr[\":\"],{focusable:function(e){return t.ui.focusable(e,null!=t.attr(e,\"tabindex\"))}}),t.ui.focusable,t.fn.form=function(){return\"string\"==typeof this[0].form?this.closest(\"form\"):t(this[0].form)},t.ui.formResetMixin={_formResetHandler:function(){var e=t(this);setTimeout(function(){var i=e.data(\"ui-form-reset-instances\");t.each(i,function(){this.refresh()})})},_bindFormResetHandler:function(){if(this.form=this.element.form(),this.form.length){var t=this.form.data(\"ui-form-reset-instances\")||[];t.length||this.form.on(\"reset.ui-form-reset\",this._formResetHandler),t.push(this),this.form.data(\"ui-form-reset-instances\",t)}},_unbindFormResetHandler:function(){if(this.form.length){var e=this.form.data(\"ui-form-reset-instances\");e.splice(t.inArray(this,e),1),e.length?this.form.data(\"ui-form-reset-instances\",e):this.form.removeData(\"ui-form-reset-instances\").off(\"reset.ui-form-reset\")}}},\"1.7\"===t.fn.jquery.substring(0,3)&&(t.each([\"Width\",\"Height\"],function(e,i){function s(e,i,s,o){return t.each(n,function(){i-=parseFloat(t.css(e,\"padding\"+this))||0,s&&(i-=parseFloat(t.css(e,\"border\"+this+\"Width\"))||0),o&&(i-=parseFloat(t.css(e,\"margin\"+this))||0)}),i}var n=\"Width\"===i?[\"Left\",\"Right\"]:[\"Top\",\"Bottom\"],o=i.toLowerCase(),a={innerWidth:t.fn.innerWidth,innerHeight:t.fn.innerHeight,outerWidth:t.fn.outerWidth,outerHeight:t.fn.outerHeight};t.fn[\"inner\"+i]=function(e){return void 0===e?a[\"inner\"+i].call(this):this.each(function(){t(this).css(o,s(this,e)+\"px\")})},t.fn[\"outer\"+i]=function(e,n){return\"number\"!=typeof e?a[\"outer\"+i].call(this,e):this.each(function(){t(this).css(o,s(this,e,!0,n)+\"px\")})}}),t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},t.ui.escapeSelector=function(){var t=/([!\"#$%&'()*+,./:;<=>?@[\\]^`{|}~])/g;return function(e){return e.replace(t,\"\\\\$1\")}}(),t.fn.labels=function(){var e,i,s,n,o;return this[0].labels&&this[0].labels.length?this.pushStack(this[0].labels):(n=this.eq(0).parents(\"label\"),s=this.attr(\"id\"),s&&(e=this.eq(0).parents().last(),o=e.add(e.length?e.siblings():this.siblings()),i=\"label[for='\"+t.ui.escapeSelector(s)+\"']\",n=n.add(o.find(i).addBack(i))),this.pushStack(n))},t.fn.scrollParent=function(e){var i=this.css(\"position\"),s=\"absolute\"===i,n=e?/(auto|scroll|hidden)/:/(auto|scroll)/,o=this.parents().filter(function(){var e=t(this);return s&&\"static\"===e.css(\"position\")?!1:n.test(e.css(\"overflow\")+e.css(\"overflow-y\")+e.css(\"overflow-x\"))}).eq(0);return\"fixed\"!==i&&o.length?o:t(this[0].ownerDocument||document)},t.extend(t.expr[\":\"],{tabbable:function(e){var i=t.attr(e,\"tabindex\"),s=null!=i;return(!s||i>=0)&&t.ui.focusable(e,s)}}),t.fn.extend({uniqueId:function(){var t=0;return function(){return this.each(function(){this.id||(this.id=\"ui-id-\"+ ++t)})}}(),removeUniqueId:function(){return this.each(function(){/^ui-id-\\d+$/.test(this.id)&&t(this).removeAttr(\"id\")})}}),t.ui.ie=!!/msie [\\w.]+/.exec(navigator.userAgent.toLowerCase());var n=!1;t(document).on(\"mouseup\",function(){n=!1}),t.widget(\"ui.mouse\",{version:\"1.12.1\",options:{cancel:\"input, textarea, button, select, option\",distance:1,delay:0},_mouseInit:function(){var e=this;this.element.on(\"mousedown.\"+this.widgetName,function(t){return e._mouseDown(t)}).on(\"click.\"+this.widgetName,function(i){return!0===t.data(i.target,e.widgetName+\".preventClickEvent\")?(t.removeData(i.target,e.widgetName+\".preventClickEvent\"),i.stopImmediatePropagation(),!1):void 0}),this.started=!1},_mouseDestroy:function(){this.element.off(\".\"+this.widgetName),this._mouseMoveDelegate&&this.document.off(\"mousemove.\"+this.widgetName,this._mouseMoveDelegate).off(\"mouseup.\"+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(e){if(!n){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(e),this._mouseDownEvent=e;var i=this,s=1===e.which,o=\"string\"==typeof this.options.cancel&&e.target.nodeName?t(e.target).closest(this.options.cancel).length:!1;return s&&!o&&this._mouseCapture(e)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){i.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(e)!==!1,!this._mouseStarted)?(e.preventDefault(),!0):(!0===t.data(e.target,this.widgetName+\".preventClickEvent\")&&t.removeData(e.target,this.widgetName+\".preventClickEvent\"),this._mouseMoveDelegate=function(t){return i._mouseMove(t)},this._mouseUpDelegate=function(t){return i._mouseUp(t)},this.document.on(\"mousemove.\"+this.widgetName,this._mouseMoveDelegate).on(\"mouseup.\"+this.widgetName,this._mouseUpDelegate),e.preventDefault(),n=!0,!0)):!0}},_mouseMove:function(e){if(this._mouseMoved){if(t.ui.ie&&(!document.documentMode||9>document.documentMode)&&!e.button)return this._mouseUp(e);if(!e.which)if(e.originalEvent.altKey||e.originalEvent.ctrlKey||e.originalEvent.metaKey||e.originalEvent.shiftKey)this.ignoreMissingWhich=!0;else if(!this.ignoreMissingWhich)return this._mouseUp(e)}return(e.which||e.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,e)!==!1,this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted)},_mouseUp:function(e){this.document.off(\"mousemove.\"+this.widgetName,this._mouseMoveDelegate).off(\"mouseup.\"+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,e.target===this._mouseDownEvent.target&&t.data(e.target,this.widgetName+\".preventClickEvent\",!0),this._mouseStop(e)),this._mouseDelayTimer&&(clearTimeout(this._mouseDelayTimer),delete this._mouseDelayTimer),this.ignoreMissingWhich=!1,n=!1,e.preventDefault()},_mouseDistanceMet:function(t){return Math.max(Math.abs(this._mouseDownEvent.pageX-t.pageX),Math.abs(this._mouseDownEvent.pageY-t.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}}),t.ui.plugin={add:function(e,i,s){var n,o=t.ui[e].prototype;for(n in s)o.plugins[n]=o.plugins[n]||[],o.plugins[n].push([i,s[n]])},call:function(t,e,i,s){var n,o=t.plugins[e];if(o&&(s||t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType))for(n=0;o.length>n;n++)t.options[o[n][0]]&&o[n][1].apply(t.element,i)}},t.widget(\"ui.resizable\",t.ui.mouse,{version:\"1.12.1\",widgetEventPrefix:\"resize\",options:{alsoResize:!1,animate:!1,animateDuration:\"slow\",animateEasing:\"swing\",aspectRatio:!1,autoHide:!1,classes:{\"ui-resizable-se\":\"ui-icon ui-icon-gripsmall-diagonal-se\"},containment:!1,ghost:!1,grid:!1,handles:\"e,s,se\",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_num:function(t){return parseFloat(t)||0},_isNumber:function(t){return!isNaN(parseFloat(t))},_hasScroll:function(e,i){if(\"hidden\"===t(e).css(\"overflow\"))return!1;var s=i&&\"left\"===i?\"scrollLeft\":\"scrollTop\",n=!1;return e[s]>0?!0:(e[s]=1,n=e[s]>0,e[s]=0,n)},_create:function(){var e,i=this.options,s=this;this._addClass(\"ui-resizable\"),t.extend(this,{_aspectRatio:!!i.aspectRatio,aspectRatio:i.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:i.helper||i.ghost||i.animate?i.helper||\"ui-resizable-helper\":null}),this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)&&(this.element.wrap(t(\"<div class='ui-wrapper' style='overflow: hidden;'></div>\").css({position:this.element.css(\"position\"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css(\"top\"),left:this.element.css(\"left\")})),this.element=this.element.parent().data(\"ui-resizable\",this.element.resizable(\"instance\")),this.elementIsWrapper=!0,e={marginTop:this.originalElement.css(\"marginTop\"),marginRight:this.originalElement.css(\"marginRight\"),marginBottom:this.originalElement.css(\"marginBottom\"),marginLeft:this.originalElement.css(\"marginLeft\")},this.element.css(e),this.originalElement.css(\"margin\",0),this.originalResizeStyle=this.originalElement.css(\"resize\"),this.originalElement.css(\"resize\",\"none\"),this._proportionallyResizeElements.push(this.originalElement.css({position:\"static\",zoom:1,display:\"block\"})),this.originalElement.css(e),this._proportionallyResize()),this._setupHandles(),i.autoHide&&t(this.element).on(\"mouseenter\",function(){i.disabled||(s._removeClass(\"ui-resizable-autohide\"),s._handles.show())}).on(\"mouseleave\",function(){i.disabled||s.resizing||(s._addClass(\"ui-resizable-autohide\"),s._handles.hide())}),this._mouseInit()},_destroy:function(){this._mouseDestroy();var e,i=function(e){t(e).removeData(\"resizable\").removeData(\"ui-resizable\").off(\".resizable\").find(\".ui-resizable-handle\").remove()};return this.elementIsWrapper&&(i(this.element),e=this.element,this.originalElement.css({position:e.css(\"position\"),width:e.outerWidth(),height:e.outerHeight(),top:e.css(\"top\"),left:e.css(\"left\")}).insertAfter(e),e.remove()),this.originalElement.css(\"resize\",this.originalResizeStyle),i(this.originalElement),this},_setOption:function(t,e){switch(this._super(t,e),t){case\"handles\":this._removeHandles(),this._setupHandles();break;default:}},_setupHandles:function(){var e,i,s,n,o,a=this.options,r=this;if(this.handles=a.handles||(t(\".ui-resizable-handle\",this.element).length?{n:\".ui-resizable-n\",e:\".ui-resizable-e\",s:\".ui-resizable-s\",w:\".ui-resizable-w\",se:\".ui-resizable-se\",sw:\".ui-resizable-sw\",ne:\".ui-resizable-ne\",nw:\".ui-resizable-nw\"}:\"e,s,se\"),this._handles=t(),this.handles.constructor===String)for(\"all\"===this.handles&&(this.handles=\"n,e,s,w,se,sw,ne,nw\"),s=this.handles.split(\",\"),this.handles={},i=0;s.length>i;i++)e=t.trim(s[i]),n=\"ui-resizable-\"+e,o=t(\"<div>\"),this._addClass(o,\"ui-resizable-handle \"+n),o.css({zIndex:a.zIndex}),this.handles[e]=\".ui-resizable-\"+e,this.element.append(o);this._renderAxis=function(e){var i,s,n,o;e=e||this.element;for(i in this.handles)this.handles[i].constructor===String?this.handles[i]=this.element.children(this.handles[i]).first().show():(this.handles[i].jquery||this.handles[i].nodeType)&&(this.handles[i]=t(this.handles[i]),this._on(this.handles[i],{mousedown:r._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(s=t(this.handles[i],this.element),o=/sw|ne|nw|se|n|s/.test(i)?s.outerHeight():s.outerWidth(),n=[\"padding\",/ne|nw|n/.test(i)?\"Top\":/se|sw|s/.test(i)?\"Bottom\":/^e$/.test(i)?\"Right\":\"Left\"].join(\"\"),e.css(n,o),this._proportionallyResize()),this._handles=this._handles.add(this.handles[i])},this._renderAxis(this.element),this._handles=this._handles.add(this.element.find(\".ui-resizable-handle\")),this._handles.disableSelection(),this._handles.on(\"mouseover\",function(){r.resizing||(this.className&&(o=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),r.axis=o&&o[1]?o[1]:\"se\")}),a.autoHide&&(this._handles.hide(),this._addClass(\"ui-resizable-autohide\"))},_removeHandles:function(){this._handles.remove()},_mouseCapture:function(e){var i,s,n=!1;for(i in this.handles)s=t(this.handles[i])[0],(s===e.target||t.contains(s,e.target))&&(n=!0);return!this.options.disabled&&n},_mouseStart:function(e){var i,s,n,o=this.options,a=this.element;return this.resizing=!0,this._renderProxy(),i=this._num(this.helper.css(\"left\")),s=this._num(this.helper.css(\"top\")),o.containment&&(i+=t(o.containment).scrollLeft()||0,s+=t(o.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:i,top:s},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:a.width(),height:a.height()},this.originalSize=this._helper?{width:a.outerWidth(),height:a.outerHeight()}:{width:a.width(),height:a.height()},this.sizeDiff={width:a.outerWidth()-a.width(),height:a.outerHeight()-a.height()},this.originalPosition={left:i,top:s},this.originalMousePosition={left:e.pageX,top:e.pageY},this.aspectRatio=\"number\"==typeof o.aspectRatio?o.aspectRatio:this.originalSize.width/this.originalSize.height||1,n=t(\".ui-resizable-\"+this.axis).css(\"cursor\"),t(\"body\").css(\"cursor\",\"auto\"===n?this.axis+\"-resize\":n),this._addClass(\"ui-resizable-resizing\"),this._propagate(\"start\",e),!0},_mouseDrag:function(e){var i,s,n=this.originalMousePosition,o=this.axis,a=e.pageX-n.left||0,r=e.pageY-n.top||0,h=this._change[o];return this._updatePrevProperties(),h?(i=h.apply(this,[e,a,r]),this._updateVirtualBoundaries(e.shiftKey),(this._aspectRatio||e.shiftKey)&&(i=this._updateRatio(i,e)),i=this._respectSize(i,e),this._updateCache(i),this._propagate(\"resize\",e),s=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),t.isEmptyObject(s)||(this._updatePrevProperties(),this._trigger(\"resize\",e,this.ui()),this._applyChanges()),!1):!1},_mouseStop:function(e){this.resizing=!1;var i,s,n,o,a,r,h,l=this.options,c=this;return this._helper&&(i=this._proportionallyResizeElements,s=i.length&&/textarea/i.test(i[0].nodeName),n=s&&this._hasScroll(i[0],\"left\")?0:c.sizeDiff.height,o=s?0:c.sizeDiff.width,a={width:c.helper.width()-o,height:c.helper.height()-n},r=parseFloat(c.element.css(\"left\"))+(c.position.left-c.originalPosition.left)||null,h=parseFloat(c.element.css(\"top\"))+(c.position.top-c.originalPosition.top)||null,l.animate||this.element.css(t.extend(a,{top:h,left:r})),c.helper.height(c.size.height),c.helper.width(c.size.width),this._helper&&!l.animate&&this._proportionallyResize()),t(\"body\").css(\"cursor\",\"auto\"),this._removeClass(\"ui-resizable-resizing\"),this._propagate(\"stop\",e),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var t={};return this.position.top!==this.prevPosition.top&&(t.top=this.position.top+\"px\"),this.position.left!==this.prevPosition.left&&(t.left=this.position.left+\"px\"),this.size.width!==this.prevSize.width&&(t.width=this.size.width+\"px\"),this.size.height!==this.prevSize.height&&(t.height=this.size.height+\"px\"),this.helper.css(t),t},_updateVirtualBoundaries:function(t){var e,i,s,n,o,a=this.options;o={minWidth:this._isNumber(a.minWidth)?a.minWidth:0,maxWidth:this._isNumber(a.maxWidth)?a.maxWidth:1/0,minHeight:this._isNumber(a.minHeight)?a.minHeight:0,maxHeight:this._isNumber(a.maxHeight)?a.maxHeight:1/0},(this._aspectRatio||t)&&(e=o.minHeight*this.aspectRatio,s=o.minWidth/this.aspectRatio,i=o.maxHeight*this.aspectRatio,n=o.maxWidth/this.aspectRatio,e>o.minWidth&&(o.minWidth=e),s>o.minHeight&&(o.minHeight=s),o.maxWidth>i&&(o.maxWidth=i),o.maxHeight>n&&(o.maxHeight=n)),this._vBoundaries=o},_updateCache:function(t){this.offset=this.helper.offset(),this._isNumber(t.left)&&(this.position.left=t.left),this._isNumber(t.top)&&(this.position.top=t.top),this._isNumber(t.height)&&(this.size.height=t.height),this._isNumber(t.width)&&(this.size.width=t.width)},_updateRatio:function(t){var e=this.position,i=this.size,s=this.axis;return this._isNumber(t.height)?t.width=t.height*this.aspectRatio:this._isNumber(t.width)&&(t.height=t.width/this.aspectRatio),\"sw\"===s&&(t.left=e.left+(i.width-t.width),t.top=null),\"nw\"===s&&(t.top=e.top+(i.height-t.height),t.left=e.left+(i.width-t.width)),t},_respectSize:function(t){var e=this._vBoundaries,i=this.axis,s=this._isNumber(t.width)&&e.maxWidth&&e.maxWidth<t.width,n=this._isNumber(t.height)&&e.maxHeight&&e.maxHeight<t.height,o=this._isNumber(t.width)&&e.minWidth&&e.minWidth>t.width,a=this._isNumber(t.height)&&e.minHeight&&e.minHeight>t.height,r=this.originalPosition.left+this.originalSize.width,h=this.originalPosition.top+this.originalSize.height,l=/sw|nw|w/.test(i),c=/nw|ne|n/.test(i);return o&&(t.width=e.minWidth),a&&(t.height=e.minHeight),s&&(t.width=e.maxWidth),n&&(t.height=e.maxHeight),o&&l&&(t.left=r-e.minWidth),s&&l&&(t.left=r-e.maxWidth),a&&c&&(t.top=h-e.minHeight),n&&c&&(t.top=h-e.maxHeight),t.width||t.height||t.left||!t.top?t.width||t.height||t.top||!t.left||(t.left=null):t.top=null,t},_getPaddingPlusBorderDimensions:function(t){for(var e=0,i=[],s=[t.css(\"borderTopWidth\"),t.css(\"borderRightWidth\"),t.css(\"borderBottomWidth\"),t.css(\"borderLeftWidth\")],n=[t.css(\"paddingTop\"),t.css(\"paddingRight\"),t.css(\"paddingBottom\"),t.css(\"paddingLeft\")];4>e;e++)i[e]=parseFloat(s[e])||0,i[e]+=parseFloat(n[e])||0;return{height:i[0]+i[2],width:i[1]+i[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var t,e=0,i=this.helper||this.element;this._proportionallyResizeElements.length>e;e++)t=this._proportionallyResizeElements[e],this.outerDimensions||(this.outerDimensions=this._getPaddingPlusBorderDimensions(t)),t.css({height:i.height()-this.outerDimensions.height||0,width:i.width()-this.outerDimensions.width||0})},_renderProxy:function(){var e=this.element,i=this.options;this.elementOffset=e.offset(),this._helper?(this.helper=this.helper||t(\"<div style='overflow:hidden;'></div>\"),this._addClass(this.helper,this._helper),this.helper.css({width:this.element.outerWidth(),height:this.element.outerHeight(),position:\"absolute\",left:this.elementOffset.left+\"px\",top:this.elementOffset.top+\"px\",zIndex:++i.zIndex}),this.helper.appendTo(\"body\").disableSelection()):this.helper=this.element\n},_change:{e:function(t,e){return{width:this.originalSize.width+e}},w:function(t,e){var i=this.originalSize,s=this.originalPosition;return{left:s.left+e,width:i.width-e}},n:function(t,e,i){var s=this.originalSize,n=this.originalPosition;return{top:n.top+i,height:s.height-i}},s:function(t,e,i){return{height:this.originalSize.height+i}},se:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},sw:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[e,i,s]))},ne:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},nw:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[e,i,s]))}},_propagate:function(e,i){t.ui.plugin.call(this,e,[i,this.ui()]),\"resize\"!==e&&this._trigger(e,i,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),t.ui.plugin.add(\"resizable\",\"animate\",{stop:function(e){var i=t(this).resizable(\"instance\"),s=i.options,n=i._proportionallyResizeElements,o=n.length&&/textarea/i.test(n[0].nodeName),a=o&&i._hasScroll(n[0],\"left\")?0:i.sizeDiff.height,r=o?0:i.sizeDiff.width,h={width:i.size.width-r,height:i.size.height-a},l=parseFloat(i.element.css(\"left\"))+(i.position.left-i.originalPosition.left)||null,c=parseFloat(i.element.css(\"top\"))+(i.position.top-i.originalPosition.top)||null;i.element.animate(t.extend(h,c&&l?{top:c,left:l}:{}),{duration:s.animateDuration,easing:s.animateEasing,step:function(){var s={width:parseFloat(i.element.css(\"width\")),height:parseFloat(i.element.css(\"height\")),top:parseFloat(i.element.css(\"top\")),left:parseFloat(i.element.css(\"left\"))};n&&n.length&&t(n[0]).css({width:s.width,height:s.height}),i._updateCache(s),i._propagate(\"resize\",e)}})}}),t.ui.plugin.add(\"resizable\",\"containment\",{start:function(){var e,i,s,n,o,a,r,h=t(this).resizable(\"instance\"),l=h.options,c=h.element,u=l.containment,d=u instanceof t?u.get(0):/parent/.test(u)?c.parent().get(0):u;d&&(h.containerElement=t(d),/document/.test(u)||u===document?(h.containerOffset={left:0,top:0},h.containerPosition={left:0,top:0},h.parentData={element:t(document),left:0,top:0,width:t(document).width(),height:t(document).height()||document.body.parentNode.scrollHeight}):(e=t(d),i=[],t([\"Top\",\"Right\",\"Left\",\"Bottom\"]).each(function(t,s){i[t]=h._num(e.css(\"padding\"+s))}),h.containerOffset=e.offset(),h.containerPosition=e.position(),h.containerSize={height:e.innerHeight()-i[3],width:e.innerWidth()-i[1]},s=h.containerOffset,n=h.containerSize.height,o=h.containerSize.width,a=h._hasScroll(d,\"left\")?d.scrollWidth:o,r=h._hasScroll(d)?d.scrollHeight:n,h.parentData={element:d,left:s.left,top:s.top,width:a,height:r}))},resize:function(e){var i,s,n,o,a=t(this).resizable(\"instance\"),r=a.options,h=a.containerOffset,l=a.position,c=a._aspectRatio||e.shiftKey,u={top:0,left:0},d=a.containerElement,p=!0;d[0]!==document&&/static/.test(d.css(\"position\"))&&(u=h),l.left<(a._helper?h.left:0)&&(a.size.width=a.size.width+(a._helper?a.position.left-h.left:a.position.left-u.left),c&&(a.size.height=a.size.width/a.aspectRatio,p=!1),a.position.left=r.helper?h.left:0),l.top<(a._helper?h.top:0)&&(a.size.height=a.size.height+(a._helper?a.position.top-h.top:a.position.top),c&&(a.size.width=a.size.height*a.aspectRatio,p=!1),a.position.top=a._helper?h.top:0),n=a.containerElement.get(0)===a.element.parent().get(0),o=/relative|absolute/.test(a.containerElement.css(\"position\")),n&&o?(a.offset.left=a.parentData.left+a.position.left,a.offset.top=a.parentData.top+a.position.top):(a.offset.left=a.element.offset().left,a.offset.top=a.element.offset().top),i=Math.abs(a.sizeDiff.width+(a._helper?a.offset.left-u.left:a.offset.left-h.left)),s=Math.abs(a.sizeDiff.height+(a._helper?a.offset.top-u.top:a.offset.top-h.top)),i+a.size.width>=a.parentData.width&&(a.size.width=a.parentData.width-i,c&&(a.size.height=a.size.width/a.aspectRatio,p=!1)),s+a.size.height>=a.parentData.height&&(a.size.height=a.parentData.height-s,c&&(a.size.width=a.size.height*a.aspectRatio,p=!1)),p||(a.position.left=a.prevPosition.left,a.position.top=a.prevPosition.top,a.size.width=a.prevSize.width,a.size.height=a.prevSize.height)},stop:function(){var e=t(this).resizable(\"instance\"),i=e.options,s=e.containerOffset,n=e.containerPosition,o=e.containerElement,a=t(e.helper),r=a.offset(),h=a.outerWidth()-e.sizeDiff.width,l=a.outerHeight()-e.sizeDiff.height;e._helper&&!i.animate&&/relative/.test(o.css(\"position\"))&&t(this).css({left:r.left-n.left-s.left,width:h,height:l}),e._helper&&!i.animate&&/static/.test(o.css(\"position\"))&&t(this).css({left:r.left-n.left-s.left,width:h,height:l})}}),t.ui.plugin.add(\"resizable\",\"alsoResize\",{start:function(){var e=t(this).resizable(\"instance\"),i=e.options;t(i.alsoResize).each(function(){var e=t(this);e.data(\"ui-resizable-alsoresize\",{width:parseFloat(e.width()),height:parseFloat(e.height()),left:parseFloat(e.css(\"left\")),top:parseFloat(e.css(\"top\"))})})},resize:function(e,i){var s=t(this).resizable(\"instance\"),n=s.options,o=s.originalSize,a=s.originalPosition,r={height:s.size.height-o.height||0,width:s.size.width-o.width||0,top:s.position.top-a.top||0,left:s.position.left-a.left||0};t(n.alsoResize).each(function(){var e=t(this),s=t(this).data(\"ui-resizable-alsoresize\"),n={},o=e.parents(i.originalElement[0]).length?[\"width\",\"height\"]:[\"width\",\"height\",\"top\",\"left\"];t.each(o,function(t,e){var i=(s[e]||0)+(r[e]||0);i&&i>=0&&(n[e]=i||null)}),e.css(n)})},stop:function(){t(this).removeData(\"ui-resizable-alsoresize\")}}),t.ui.plugin.add(\"resizable\",\"ghost\",{start:function(){var e=t(this).resizable(\"instance\"),i=e.size;e.ghost=e.originalElement.clone(),e.ghost.css({opacity:.25,display:\"block\",position:\"relative\",height:i.height,width:i.width,margin:0,left:0,top:0}),e._addClass(e.ghost,\"ui-resizable-ghost\"),t.uiBackCompat!==!1&&\"string\"==typeof e.options.ghost&&e.ghost.addClass(this.options.ghost),e.ghost.appendTo(e.helper)},resize:function(){var e=t(this).resizable(\"instance\");e.ghost&&e.ghost.css({position:\"relative\",height:e.size.height,width:e.size.width})},stop:function(){var e=t(this).resizable(\"instance\");e.ghost&&e.helper&&e.helper.get(0).removeChild(e.ghost.get(0))}}),t.ui.plugin.add(\"resizable\",\"grid\",{resize:function(){var e,i=t(this).resizable(\"instance\"),s=i.options,n=i.size,o=i.originalSize,a=i.originalPosition,r=i.axis,h=\"number\"==typeof s.grid?[s.grid,s.grid]:s.grid,l=h[0]||1,c=h[1]||1,u=Math.round((n.width-o.width)/l)*l,d=Math.round((n.height-o.height)/c)*c,p=o.width+u,f=o.height+d,m=s.maxWidth&&p>s.maxWidth,g=s.maxHeight&&f>s.maxHeight,_=s.minWidth&&s.minWidth>p,v=s.minHeight&&s.minHeight>f;s.grid=h,_&&(p+=l),v&&(f+=c),m&&(p-=l),g&&(f-=c),/^(se|s|e)$/.test(r)?(i.size.width=p,i.size.height=f):/^(ne)$/.test(r)?(i.size.width=p,i.size.height=f,i.position.top=a.top-d):/^(sw)$/.test(r)?(i.size.width=p,i.size.height=f,i.position.left=a.left-u):((0>=f-c||0>=p-l)&&(e=i._getPaddingPlusBorderDimensions(this)),f-c>0?(i.size.height=f,i.position.top=a.top-d):(f=c-e.height,i.size.height=f,i.position.top=a.top+o.height-f),p-l>0?(i.size.width=p,i.position.left=a.left-u):(p=l-e.width,i.size.width=p,i.position.left=a.left+o.width-p))}}),t.ui.resizable});/**\n * Copyright (c) 2007 Ariel Flesler - aflesler ○ gmail • com | https://github.com/flesler\n * Licensed under MIT\n * @author Ariel Flesler\n * @version 2.1.2\n */\n;(function(f){\"use strict\";\"function\"===typeof define&&define.amd?define([\"jquery\"],f):\"undefined\"!==typeof module&&module.exports?module.exports=f(require(\"jquery\")):f(jQuery)})(function($){\"use strict\";function n(a){return!a.nodeName||-1!==$.inArray(a.nodeName.toLowerCase(),[\"iframe\",\"#document\",\"html\",\"body\"])}function h(a){return $.isFunction(a)||$.isPlainObject(a)?a:{top:a,left:a}}var p=$.scrollTo=function(a,d,b){return $(window).scrollTo(a,d,b)};p.defaults={axis:\"xy\",duration:0,limit:!0};$.fn.scrollTo=function(a,d,b){\"object\"=== typeof d&&(b=d,d=0);\"function\"===typeof b&&(b={onAfter:b});\"max\"===a&&(a=9E9);b=$.extend({},p.defaults,b);d=d||b.duration;var u=b.queue&&1<b.axis.length;u&&(d/=2);b.offset=h(b.offset);b.over=h(b.over);return this.each(function(){function k(a){var k=$.extend({},b,{queue:!0,duration:d,complete:a&&function(){a.call(q,e,b)}});r.animate(f,k)}if(null!==a){var l=n(this),q=l?this.contentWindow||window:this,r=$(q),e=a,f={},t;switch(typeof e){case \"number\":case \"string\":if(/^([+-]=?)?\\d+(\\.\\d+)?(px|%)?$/.test(e)){e= h(e);break}e=l?$(e):$(e,q);case \"object\":if(e.length===0)return;if(e.is||e.style)t=(e=$(e)).offset()}var v=$.isFunction(b.offset)&&b.offset(q,e)||b.offset;$.each(b.axis.split(\"\"),function(a,c){var d=\"x\"===c?\"Left\":\"Top\",m=d.toLowerCase(),g=\"scroll\"+d,h=r[g](),n=p.max(q,c);t?(f[g]=t[m]+(l?0:h-r.offset()[m]),b.margin&&(f[g]-=parseInt(e.css(\"margin\"+d),10)||0,f[g]-=parseInt(e.css(\"border\"+d+\"Width\"),10)||0),f[g]+=v[m]||0,b.over[m]&&(f[g]+=e[\"x\"===c?\"width\":\"height\"]()*b.over[m])):(d=e[m],f[g]=d.slice&& \"%\"===d.slice(-1)?parseFloat(d)/100*n:d);b.limit&&/^\\d+$/.test(f[g])&&(f[g]=0>=f[g]?0:Math.min(f[g],n));!a&&1<b.axis.length&&(h===f[g]?f={}:u&&(k(b.onAfterFirst),f={}))});k(b.onAfter)}})};p.max=function(a,d){var b=\"x\"===d?\"Width\":\"Height\",h=\"scroll\"+b;if(!n(a))return a[h]-$(a)[b.toLowerCase()]();var b=\"client\"+b,k=a.ownerDocument||a.document,l=k.documentElement,k=k.body;return Math.max(l[h],k[h])-Math.min(l[b],k[b])};$.Tween.propHooks.scrollLeft=$.Tween.propHooks.scrollTop={get:function(a){return $(a.elem)[a.prop]()}, set:function(a){var d=this.get(a);if(a.options.interrupt&&a._last&&a._last!==d)return $(a.elem).stop();var b=Math.round(a.now);d!==b&&($(a.elem)[a.prop](b),a._last=this.get(a))}};return p});\n/*!\n PowerTip v1.3.1 (2018-04-15)\n https://stevenbenner.github.io/jquery-powertip/\n Copyright (c) 2018 Steven Benner (http://stevenbenner.com/).\n Released under MIT license.\n https://raw.github.com/stevenbenner/jquery-powertip/master/LICENSE.txt\n*/\n(function(root,factory){if(typeof define===\"function\"&&define.amd){define([\"jquery\"],factory)}else if(typeof module===\"object\"&&module.exports){module.exports=factory(require(\"jquery\"))}else{factory(root.jQuery)}})(this,function($){var $document=$(document),$window=$(window),$body=$(\"body\");var DATA_DISPLAYCONTROLLER=\"displayController\",DATA_HASACTIVEHOVER=\"hasActiveHover\",DATA_FORCEDOPEN=\"forcedOpen\",DATA_HASMOUSEMOVE=\"hasMouseMove\",DATA_MOUSEONTOTIP=\"mouseOnToPopup\",DATA_ORIGINALTITLE=\"originalTitle\",DATA_POWERTIP=\"powertip\",DATA_POWERTIPJQ=\"powertipjq\",DATA_POWERTIPTARGET=\"powertiptarget\",EVENT_NAMESPACE=\".powertip\",RAD2DEG=180/Math.PI,MOUSE_EVENTS=[\"click\",\"dblclick\",\"mousedown\",\"mouseup\",\"mousemove\",\"mouseover\",\"mouseout\",\"mouseenter\",\"mouseleave\",\"contextmenu\"];var session={tooltips:null,isTipOpen:false,isFixedTipOpen:false,isClosing:false,tipOpenImminent:false,activeHover:null,currentX:0,currentY:0,previousX:0,previousY:0,desyncTimeout:null,closeDelayTimeout:null,mouseTrackingActive:false,delayInProgress:false,windowWidth:0,windowHeight:0,scrollTop:0,scrollLeft:0};var Collision={none:0,top:1,bottom:2,left:4,right:8};$.fn.powerTip=function(opts,arg){var targetElements=this,options,tipController;if(!targetElements.length){return targetElements}if($.type(opts)===\"string\"&&$.powerTip[opts]){return $.powerTip[opts].call(targetElements,targetElements,arg)}options=$.extend({},$.fn.powerTip.defaults,opts);tipController=new TooltipController(options);initTracking();targetElements.each(function elementSetup(){var $this=$(this),dataPowertip=$this.data(DATA_POWERTIP),dataElem=$this.data(DATA_POWERTIPJQ),dataTarget=$this.data(DATA_POWERTIPTARGET),title=$this.attr(\"title\");if(!dataPowertip&&!dataTarget&&!dataElem&&title){$this.data(DATA_POWERTIP,title);$this.data(DATA_ORIGINALTITLE,title);$this.removeAttr(\"title\")}$this.data(DATA_DISPLAYCONTROLLER,new DisplayController($this,options,tipController))});if(!options.manual){$.each(options.openEvents,function(idx,evt){if($.inArray(evt,options.closeEvents)>-1){targetElements.on(evt+EVENT_NAMESPACE,function elementToggle(event){$.powerTip.toggle(this,event)})}else{targetElements.on(evt+EVENT_NAMESPACE,function elementOpen(event){$.powerTip.show(this,event)})}});$.each(options.closeEvents,function(idx,evt){if($.inArray(evt,options.openEvents)<0){targetElements.on(evt+EVENT_NAMESPACE,function elementClose(event){$.powerTip.hide(this,!isMouseEvent(event))})}});targetElements.on(\"keydown\"+EVENT_NAMESPACE,function elementKeyDown(event){if(event.keyCode===27){$.powerTip.hide(this,true)}})}return targetElements};$.fn.powerTip.defaults={fadeInTime:200,fadeOutTime:100,followMouse:false,popupId:\"powerTip\",popupClass:null,intentSensitivity:7,intentPollInterval:100,closeDelay:100,placement:\"n\",smartPlacement:false,offset:10,mouseOnToPopup:false,manual:false,openEvents:[\"mouseenter\",\"focus\"],closeEvents:[\"mouseleave\",\"blur\"]};$.fn.powerTip.smartPlacementLists={n:[\"n\",\"ne\",\"nw\",\"s\"],e:[\"e\",\"ne\",\"se\",\"w\",\"nw\",\"sw\",\"n\",\"s\",\"e\"],s:[\"s\",\"se\",\"sw\",\"n\"],w:[\"w\",\"nw\",\"sw\",\"e\",\"ne\",\"se\",\"n\",\"s\",\"w\"],nw:[\"nw\",\"w\",\"sw\",\"n\",\"s\",\"se\",\"nw\"],ne:[\"ne\",\"e\",\"se\",\"n\",\"s\",\"sw\",\"ne\"],sw:[\"sw\",\"w\",\"nw\",\"s\",\"n\",\"ne\",\"sw\"],se:[\"se\",\"e\",\"ne\",\"s\",\"n\",\"nw\",\"se\"],\"nw-alt\":[\"nw-alt\",\"n\",\"ne-alt\",\"sw-alt\",\"s\",\"se-alt\",\"w\",\"e\"],\"ne-alt\":[\"ne-alt\",\"n\",\"nw-alt\",\"se-alt\",\"s\",\"sw-alt\",\"e\",\"w\"],\"sw-alt\":[\"sw-alt\",\"s\",\"se-alt\",\"nw-alt\",\"n\",\"ne-alt\",\"w\",\"e\"],\"se-alt\":[\"se-alt\",\"s\",\"sw-alt\",\"ne-alt\",\"n\",\"nw-alt\",\"e\",\"w\"]};$.powerTip={show:function apiShowTip(element,event){if(isMouseEvent(event)){trackMouse(event);session.previousX=event.pageX;session.previousY=event.pageY;$(element).data(DATA_DISPLAYCONTROLLER).show()}else{$(element).first().data(DATA_DISPLAYCONTROLLER).show(true,true)}return element},reposition:function apiResetPosition(element){$(element).first().data(DATA_DISPLAYCONTROLLER).resetPosition();return element},hide:function apiCloseTip(element,immediate){var displayController;immediate=element?immediate:true;if(element){displayController=$(element).first().data(DATA_DISPLAYCONTROLLER)}else if(session.activeHover){displayController=session.activeHover.data(DATA_DISPLAYCONTROLLER)}if(displayController){displayController.hide(immediate)}return element},toggle:function apiToggle(element,event){if(session.activeHover&&session.activeHover.is(element)){$.powerTip.hide(element,!isMouseEvent(event))}else{$.powerTip.show(element,event)}return element}};$.powerTip.showTip=$.powerTip.show;$.powerTip.closeTip=$.powerTip.hide;function CSSCoordinates(){var me=this;me.top=\"auto\";me.left=\"auto\";me.right=\"auto\";me.bottom=\"auto\";me.set=function(property,value){if($.isNumeric(value)){me[property]=Math.round(value)}}}function DisplayController(element,options,tipController){var hoverTimer=null,myCloseDelay=null;function openTooltip(immediate,forceOpen){cancelTimer();if(!element.data(DATA_HASACTIVEHOVER)){if(!immediate){session.tipOpenImminent=true;hoverTimer=setTimeout(function intentDelay(){hoverTimer=null;checkForIntent()},options.intentPollInterval)}else{if(forceOpen){element.data(DATA_FORCEDOPEN,true)}closeAnyDelayed();tipController.showTip(element)}}else{cancelClose()}}function closeTooltip(disableDelay){if(myCloseDelay){myCloseDelay=session.closeDelayTimeout=clearTimeout(myCloseDelay);session.delayInProgress=false}cancelTimer();session.tipOpenImminent=false;if(element.data(DATA_HASACTIVEHOVER)){element.data(DATA_FORCEDOPEN,false);if(!disableDelay){session.delayInProgress=true;session.closeDelayTimeout=setTimeout(function closeDelay(){session.closeDelayTimeout=null;tipController.hideTip(element);session.delayInProgress=false;myCloseDelay=null},options.closeDelay);myCloseDelay=session.closeDelayTimeout}else{tipController.hideTip(element)}}}function checkForIntent(){var xDifference=Math.abs(session.previousX-session.currentX),yDifference=Math.abs(session.previousY-session.currentY),totalDifference=xDifference+yDifference;if(totalDifference<options.intentSensitivity){cancelClose();closeAnyDelayed();tipController.showTip(element)}else{session.previousX=session.currentX;session.previousY=session.currentY;openTooltip()}}function cancelTimer(stopClose){hoverTimer=clearTimeout(hoverTimer);if(session.closeDelayTimeout&&myCloseDelay===session.closeDelayTimeout||stopClose){cancelClose()}}function cancelClose(){session.closeDelayTimeout=clearTimeout(session.closeDelayTimeout);session.delayInProgress=false}function closeAnyDelayed(){if(session.delayInProgress&&session.activeHover&&!session.activeHover.is(element)){session.activeHover.data(DATA_DISPLAYCONTROLLER).hide(true)}}function repositionTooltip(){tipController.resetPosition(element)}this.show=openTooltip;this.hide=closeTooltip;this.cancel=cancelTimer;this.resetPosition=repositionTooltip}function PlacementCalculator(){function computePlacementCoords(element,placement,tipWidth,tipHeight,offset){var placementBase=placement.split(\"-\")[0],coords=new CSSCoordinates,position;if(isSvgElement(element)){position=getSvgPlacement(element,placementBase)}else{position=getHtmlPlacement(element,placementBase)}switch(placement){case\"n\":coords.set(\"left\",position.left-tipWidth/2);coords.set(\"bottom\",session.windowHeight-position.top+offset);break;case\"e\":coords.set(\"left\",position.left+offset);coords.set(\"top\",position.top-tipHeight/2);break;case\"s\":coords.set(\"left\",position.left-tipWidth/2);coords.set(\"top\",position.top+offset);break;case\"w\":coords.set(\"top\",position.top-tipHeight/2);coords.set(\"right\",session.windowWidth-position.left+offset);break;case\"nw\":coords.set(\"bottom\",session.windowHeight-position.top+offset);coords.set(\"right\",session.windowWidth-position.left-20);break;case\"nw-alt\":coords.set(\"left\",position.left);coords.set(\"bottom\",session.windowHeight-position.top+offset);break;case\"ne\":coords.set(\"left\",position.left-20);coords.set(\"bottom\",session.windowHeight-position.top+offset);break;case\"ne-alt\":coords.set(\"bottom\",session.windowHeight-position.top+offset);coords.set(\"right\",session.windowWidth-position.left);break;case\"sw\":coords.set(\"top\",position.top+offset);coords.set(\"right\",session.windowWidth-position.left-20);break;case\"sw-alt\":coords.set(\"left\",position.left);coords.set(\"top\",position.top+offset);break;case\"se\":coords.set(\"left\",position.left-20);coords.set(\"top\",position.top+offset);break;case\"se-alt\":coords.set(\"top\",position.top+offset);coords.set(\"right\",session.windowWidth-position.left);break}return coords}function getHtmlPlacement(element,placement){var objectOffset=element.offset(),objectWidth=element.outerWidth(),objectHeight=element.outerHeight(),left,top;switch(placement){case\"n\":left=objectOffset.left+objectWidth/2;top=objectOffset.top;break;case\"e\":left=objectOffset.left+objectWidth;top=objectOffset.top+objectHeight/2;break;case\"s\":left=objectOffset.left+objectWidth/2;top=objectOffset.top+objectHeight;break;case\"w\":left=objectOffset.left;top=objectOffset.top+objectHeight/2;break;case\"nw\":left=objectOffset.left;top=objectOffset.top;break;case\"ne\":left=objectOffset.left+objectWidth;top=objectOffset.top;break;case\"sw\":left=objectOffset.left;top=objectOffset.top+objectHeight;break;case\"se\":left=objectOffset.left+objectWidth;top=objectOffset.top+objectHeight;break}return{top:top,left:left}}function getSvgPlacement(element,placement){var svgElement=element.closest(\"svg\")[0],domElement=element[0],point=svgElement.createSVGPoint(),boundingBox=domElement.getBBox(),matrix=domElement.getScreenCTM(),halfWidth=boundingBox.width/2,halfHeight=boundingBox.height/2,placements=[],placementKeys=[\"nw\",\"n\",\"ne\",\"e\",\"se\",\"s\",\"sw\",\"w\"],coords,rotation,steps,x;function pushPlacement(){placements.push(point.matrixTransform(matrix))}point.x=boundingBox.x;point.y=boundingBox.y;pushPlacement();point.x+=halfWidth;pushPlacement();point.x+=halfWidth;pushPlacement();point.y+=halfHeight;pushPlacement();point.y+=halfHeight;pushPlacement();point.x-=halfWidth;pushPlacement();point.x-=halfWidth;pushPlacement();point.y-=halfHeight;pushPlacement();if(placements[0].y!==placements[1].y||placements[0].x!==placements[7].x){rotation=Math.atan2(matrix.b,matrix.a)*RAD2DEG;steps=Math.ceil((rotation%360-22.5)/45);if(steps<1){steps+=8}while(steps--){placementKeys.push(placementKeys.shift())}}for(x=0;x<placements.length;x++){if(placementKeys[x]===placement){coords=placements[x];break}}return{top:coords.y+session.scrollTop,left:coords.x+session.scrollLeft}}this.compute=computePlacementCoords}function TooltipController(options){var placementCalculator=new PlacementCalculator,tipElement=$(\"#\"+options.popupId);if(tipElement.length===0){tipElement=$(\"<div/>\",{id:options.popupId});if($body.length===0){$body=$(\"body\")}$body.append(tipElement);session.tooltips=session.tooltips?session.tooltips.add(tipElement):tipElement}if(options.followMouse){if(!tipElement.data(DATA_HASMOUSEMOVE)){$document.on(\"mousemove\"+EVENT_NAMESPACE,positionTipOnCursor);$window.on(\"scroll\"+EVENT_NAMESPACE,positionTipOnCursor);tipElement.data(DATA_HASMOUSEMOVE,true)}}function beginShowTip(element){element.data(DATA_HASACTIVEHOVER,true);tipElement.queue(function queueTipInit(next){showTip(element);next()})}function showTip(element){var tipContent;if(!element.data(DATA_HASACTIVEHOVER)){return}if(session.isTipOpen){if(!session.isClosing){hideTip(session.activeHover)}tipElement.delay(100).queue(function queueTipAgain(next){showTip(element);next()});return}element.trigger(\"powerTipPreRender\");tipContent=getTooltipContent(element);if(tipContent){tipElement.empty().append(tipContent)}else{return}element.trigger(\"powerTipRender\");session.activeHover=element;session.isTipOpen=true;tipElement.data(DATA_MOUSEONTOTIP,options.mouseOnToPopup);tipElement.addClass(options.popupClass);if(!options.followMouse||element.data(DATA_FORCEDOPEN)){positionTipOnElement(element);session.isFixedTipOpen=true}else{positionTipOnCursor()}if(!element.data(DATA_FORCEDOPEN)&&!options.followMouse){$document.on(\"click\"+EVENT_NAMESPACE,function documentClick(event){var target=event.target;if(target!==element[0]){if(options.mouseOnToPopup){if(target!==tipElement[0]&&!$.contains(tipElement[0],target)){$.powerTip.hide()}}else{$.powerTip.hide()}}})}if(options.mouseOnToPopup&&!options.manual){tipElement.on(\"mouseenter\"+EVENT_NAMESPACE,function tipMouseEnter(){if(session.activeHover){session.activeHover.data(DATA_DISPLAYCONTROLLER).cancel()}});tipElement.on(\"mouseleave\"+EVENT_NAMESPACE,function tipMouseLeave(){if(session.activeHover){session.activeHover.data(DATA_DISPLAYCONTROLLER).hide()}})}tipElement.fadeIn(options.fadeInTime,function fadeInCallback(){if(!session.desyncTimeout){session.desyncTimeout=setInterval(closeDesyncedTip,500)}element.trigger(\"powerTipOpen\")})}function hideTip(element){session.isClosing=true;session.isTipOpen=false;session.desyncTimeout=clearInterval(session.desyncTimeout);element.data(DATA_HASACTIVEHOVER,false);element.data(DATA_FORCEDOPEN,false);$document.off(\"click\"+EVENT_NAMESPACE);tipElement.off(EVENT_NAMESPACE);tipElement.fadeOut(options.fadeOutTime,function fadeOutCallback(){var coords=new CSSCoordinates;session.activeHover=null;session.isClosing=false;session.isFixedTipOpen=false;tipElement.removeClass();coords.set(\"top\",session.currentY+options.offset);coords.set(\"left\",session.currentX+options.offset);tipElement.css(coords);element.trigger(\"powerTipClose\")})}function positionTipOnCursor(){var tipWidth,tipHeight,coords,collisions,collisionCount;if(!session.isFixedTipOpen&&(session.isTipOpen||session.tipOpenImminent&&tipElement.data(DATA_HASMOUSEMOVE))){tipWidth=tipElement.outerWidth();tipHeight=tipElement.outerHeight();coords=new CSSCoordinates;coords.set(\"top\",session.currentY+options.offset);coords.set(\"left\",session.currentX+options.offset);collisions=getViewportCollisions(coords,tipWidth,tipHeight);if(collisions!==Collision.none){collisionCount=countFlags(collisions);if(collisionCount===1){if(collisions===Collision.right){coords.set(\"left\",session.scrollLeft+session.windowWidth-tipWidth)}else if(collisions===Collision.bottom){coords.set(\"top\",session.scrollTop+session.windowHeight-tipHeight)}}else{coords.set(\"left\",session.currentX-tipWidth-options.offset);coords.set(\"top\",session.currentY-tipHeight-options.offset)}}tipElement.css(coords)}}function positionTipOnElement(element){var priorityList,finalPlacement;if(options.smartPlacement||options.followMouse&&element.data(DATA_FORCEDOPEN)){priorityList=$.fn.powerTip.smartPlacementLists[options.placement];$.each(priorityList,function(idx,pos){var collisions=getViewportCollisions(placeTooltip(element,pos),tipElement.outerWidth(),tipElement.outerHeight());finalPlacement=pos;return collisions!==Collision.none})}else{placeTooltip(element,options.placement);finalPlacement=options.placement}tipElement.removeClass(\"w nw sw e ne se n s w se-alt sw-alt ne-alt nw-alt\");tipElement.addClass(finalPlacement)}function placeTooltip(element,placement){var iterationCount=0,tipWidth,tipHeight,coords=new CSSCoordinates;coords.set(\"top\",0);coords.set(\"left\",0);tipElement.css(coords);do{tipWidth=tipElement.outerWidth();tipHeight=tipElement.outerHeight();coords=placementCalculator.compute(element,placement,tipWidth,tipHeight,options.offset);tipElement.css(coords)}while(++iterationCount<=5&&(tipWidth!==tipElement.outerWidth()||tipHeight!==tipElement.outerHeight()));return coords}function closeDesyncedTip(){var isDesynced=false,hasDesyncableCloseEvent=$.grep([\"mouseleave\",\"mouseout\",\"blur\",\"focusout\"],function(eventType){return $.inArray(eventType,options.closeEvents)!==-1}).length>0;if(session.isTipOpen&&!session.isClosing&&!session.delayInProgress&&hasDesyncableCloseEvent){if(session.activeHover.data(DATA_HASACTIVEHOVER)===false||session.activeHover.is(\":disabled\")){isDesynced=true}else if(!isMouseOver(session.activeHover)&&!session.activeHover.is(\":focus\")&&!session.activeHover.data(DATA_FORCEDOPEN)){if(tipElement.data(DATA_MOUSEONTOTIP)){if(!isMouseOver(tipElement)){isDesynced=true}}else{isDesynced=true}}if(isDesynced){hideTip(session.activeHover)}}}this.showTip=beginShowTip;this.hideTip=hideTip;this.resetPosition=positionTipOnElement}function isSvgElement(element){return Boolean(window.SVGElement&&element[0]instanceof SVGElement)}function isMouseEvent(event){return Boolean(event&&$.inArray(event.type,MOUSE_EVENTS)>-1&&typeof event.pageX===\"number\")}function initTracking(){if(!session.mouseTrackingActive){session.mouseTrackingActive=true;getViewportDimensions();$(getViewportDimensions);$document.on(\"mousemove\"+EVENT_NAMESPACE,trackMouse);$window.on(\"resize\"+EVENT_NAMESPACE,trackResize);$window.on(\"scroll\"+EVENT_NAMESPACE,trackScroll)}}function getViewportDimensions(){session.scrollLeft=$window.scrollLeft();session.scrollTop=$window.scrollTop();session.windowWidth=$window.width();session.windowHeight=$window.height()}function trackResize(){session.windowWidth=$window.width();session.windowHeight=$window.height()}function trackScroll(){var x=$window.scrollLeft(),y=$window.scrollTop();if(x!==session.scrollLeft){session.currentX+=x-session.scrollLeft;session.scrollLeft=x}if(y!==session.scrollTop){session.currentY+=y-session.scrollTop;session.scrollTop=y}}function trackMouse(event){session.currentX=event.pageX;session.currentY=event.pageY}function isMouseOver(element){var elementPosition=element.offset(),elementBox=element[0].getBoundingClientRect(),elementWidth=elementBox.right-elementBox.left,elementHeight=elementBox.bottom-elementBox.top;return session.currentX>=elementPosition.left&&session.currentX<=elementPosition.left+elementWidth&&session.currentY>=elementPosition.top&&session.currentY<=elementPosition.top+elementHeight}function getTooltipContent(element){var tipText=element.data(DATA_POWERTIP),tipObject=element.data(DATA_POWERTIPJQ),tipTarget=element.data(DATA_POWERTIPTARGET),targetElement,content;if(tipText){if($.isFunction(tipText)){tipText=tipText.call(element[0])}content=tipText}else if(tipObject){if($.isFunction(tipObject)){tipObject=tipObject.call(element[0])}if(tipObject.length>0){content=tipObject.clone(true,true)}}else if(tipTarget){targetElement=$(\"#\"+tipTarget);if(targetElement.length>0){content=targetElement.html()}}return content}function getViewportCollisions(coords,elementWidth,elementHeight){var viewportTop=session.scrollTop,viewportLeft=session.scrollLeft,viewportBottom=viewportTop+session.windowHeight,viewportRight=viewportLeft+session.windowWidth,collisions=Collision.none;if(coords.top<viewportTop||Math.abs(coords.bottom-session.windowHeight)-elementHeight<viewportTop){collisions|=Collision.top}if(coords.top+elementHeight>viewportBottom||Math.abs(coords.bottom-session.windowHeight)>viewportBottom){collisions|=Collision.bottom}if(coords.left<viewportLeft||coords.right+elementWidth>viewportRight){collisions|=Collision.left}if(coords.left+elementWidth>viewportRight||coords.right<viewportLeft){collisions|=Collision.right}return collisions}function countFlags(value){var count=0;while(value){value&=value-1;count++}return count}return $.powerTip});/*!\n * jQuery UI Touch Punch 0.2.3\n *\n * Copyright 2011–2014, Dave Furfero\n * Dual licensed under the MIT or GPL Version 2 licenses.\n *\n * Depends:\n *  jquery.ui.widget.js\n *  jquery.ui.mouse.js\n */\n!function(a){function f(a,b){if(!(a.originalEvent.touches.length>1)){a.preventDefault();var c=a.originalEvent.changedTouches[0],d=document.createEvent(\"MouseEvents\");d.initMouseEvent(b,!0,!0,window,1,c.screenX,c.screenY,c.clientX,c.clientY,!1,!1,!1,!1,0,null),a.target.dispatchEvent(d)}}if(a.support.touch=\"ontouchend\"in document,a.support.touch){var e,b=a.ui.mouse.prototype,c=b._mouseInit,d=b._mouseDestroy;b._touchStart=function(a){var b=this;!e&&b._mouseCapture(a.originalEvent.changedTouches[0])&&(e=!0,b._touchMoved=!1,f(a,\"mouseover\"),f(a,\"mousemove\"),f(a,\"mousedown\"))},b._touchMove=function(a){e&&(this._touchMoved=!0,f(a,\"mousemove\"))},b._touchEnd=function(a){e&&(f(a,\"mouseup\"),f(a,\"mouseout\"),this._touchMoved||f(a,\"click\"),e=!1)},b._mouseInit=function(){var b=this;b.element.bind({touchstart:a.proxy(b,\"_touchStart\"),touchmove:a.proxy(b,\"_touchMove\"),touchend:a.proxy(b,\"_touchEnd\")}),c.call(b)},b._mouseDestroy=function(){var b=this;b.element.unbind({touchstart:a.proxy(b,\"_touchStart\"),touchmove:a.proxy(b,\"_touchMove\"),touchend:a.proxy(b,\"_touchEnd\")}),d.call(b)}}}(jQuery);/*! SmartMenus jQuery Plugin - v1.1.0 - September 17, 2017\n * http://www.smartmenus.org/\n * Copyright Vasil Dinkov, Vadikom Web Ltd. http://vadikom.com; Licensed MIT */(function(t){\"function\"==typeof define&&define.amd?define([\"jquery\"],t):\"object\"==typeof module&&\"object\"==typeof module.exports?module.exports=t(require(\"jquery\")):t(jQuery)})(function($){function initMouseDetection(t){var e=\".smartmenus_mouse\";if(mouseDetectionEnabled||t)mouseDetectionEnabled&&t&&($(document).off(e),mouseDetectionEnabled=!1);else{var i=!0,s=null,o={mousemove:function(t){var e={x:t.pageX,y:t.pageY,timeStamp:(new Date).getTime()};if(s){var o=Math.abs(s.x-e.x),a=Math.abs(s.y-e.y);if((o>0||a>0)&&2>=o&&2>=a&&300>=e.timeStamp-s.timeStamp&&(mouse=!0,i)){var n=$(t.target).closest(\"a\");n.is(\"a\")&&$.each(menuTrees,function(){return $.contains(this.$root[0],n[0])?(this.itemEnter({currentTarget:n[0]}),!1):void 0}),i=!1}}s=e}};o[touchEvents?\"touchstart\":\"pointerover pointermove pointerout MSPointerOver MSPointerMove MSPointerOut\"]=function(t){isTouchEvent(t.originalEvent)&&(mouse=!1)},$(document).on(getEventsNS(o,e)),mouseDetectionEnabled=!0}}function isTouchEvent(t){return!/^(4|mouse)$/.test(t.pointerType)}function getEventsNS(t,e){e||(e=\"\");var i={};for(var s in t)i[s.split(\" \").join(e+\" \")+e]=t[s];return i}var menuTrees=[],mouse=!1,touchEvents=\"ontouchstart\"in window,mouseDetectionEnabled=!1,requestAnimationFrame=window.requestAnimationFrame||function(t){return setTimeout(t,1e3/60)},cancelAnimationFrame=window.cancelAnimationFrame||function(t){clearTimeout(t)},canAnimate=!!$.fn.animate;return $.SmartMenus=function(t,e){this.$root=$(t),this.opts=e,this.rootId=\"\",this.accessIdPrefix=\"\",this.$subArrow=null,this.activatedItems=[],this.visibleSubMenus=[],this.showTimeout=0,this.hideTimeout=0,this.scrollTimeout=0,this.clickActivated=!1,this.focusActivated=!1,this.zIndexInc=0,this.idInc=0,this.$firstLink=null,this.$firstSub=null,this.disabled=!1,this.$disableOverlay=null,this.$touchScrollingSub=null,this.cssTransforms3d=\"perspective\"in t.style||\"webkitPerspective\"in t.style,this.wasCollapsible=!1,this.init()},$.extend($.SmartMenus,{hideAll:function(){$.each(menuTrees,function(){this.menuHideAll()})},destroy:function(){for(;menuTrees.length;)menuTrees[0].destroy();initMouseDetection(!0)},prototype:{init:function(t){var e=this;if(!t){menuTrees.push(this),this.rootId=((new Date).getTime()+Math.random()+\"\").replace(/\\D/g,\"\"),this.accessIdPrefix=\"sm-\"+this.rootId+\"-\",this.$root.hasClass(\"sm-rtl\")&&(this.opts.rightToLeftSubMenus=!0);var i=\".smartmenus\";this.$root.data(\"smartmenus\",this).attr(\"data-smartmenus-id\",this.rootId).dataSM(\"level\",1).on(getEventsNS({\"mouseover focusin\":$.proxy(this.rootOver,this),\"mouseout focusout\":$.proxy(this.rootOut,this),keydown:$.proxy(this.rootKeyDown,this)},i)).on(getEventsNS({mouseenter:$.proxy(this.itemEnter,this),mouseleave:$.proxy(this.itemLeave,this),mousedown:$.proxy(this.itemDown,this),focus:$.proxy(this.itemFocus,this),blur:$.proxy(this.itemBlur,this),click:$.proxy(this.itemClick,this)},i),\"a\"),i+=this.rootId,this.opts.hideOnClick&&$(document).on(getEventsNS({touchstart:$.proxy(this.docTouchStart,this),touchmove:$.proxy(this.docTouchMove,this),touchend:$.proxy(this.docTouchEnd,this),click:$.proxy(this.docClick,this)},i)),$(window).on(getEventsNS({\"resize orientationchange\":$.proxy(this.winResize,this)},i)),this.opts.subIndicators&&(this.$subArrow=$(\"<span/>\").addClass(\"sub-arrow\"),this.opts.subIndicatorsText&&this.$subArrow.html(this.opts.subIndicatorsText)),initMouseDetection()}if(this.$firstSub=this.$root.find(\"ul\").each(function(){e.menuInit($(this))}).eq(0),this.$firstLink=this.$root.find(\"a\").eq(0),this.opts.markCurrentItem){var s=/(index|default)\\.[^#\\?\\/]*/i,o=/#.*/,a=window.location.href.replace(s,\"\"),n=a.replace(o,\"\");this.$root.find(\"a\").each(function(){var t=this.href.replace(s,\"\"),i=$(this);(t==a||t==n)&&(i.addClass(\"current\"),e.opts.markCurrentTree&&i.parentsUntil(\"[data-smartmenus-id]\",\"ul\").each(function(){$(this).dataSM(\"parent-a\").addClass(\"current\")}))})}this.wasCollapsible=this.isCollapsible()},destroy:function(t){if(!t){var e=\".smartmenus\";this.$root.removeData(\"smartmenus\").removeAttr(\"data-smartmenus-id\").removeDataSM(\"level\").off(e),e+=this.rootId,$(document).off(e),$(window).off(e),this.opts.subIndicators&&(this.$subArrow=null)}this.menuHideAll();var i=this;this.$root.find(\"ul\").each(function(){var t=$(this);t.dataSM(\"scroll-arrows\")&&t.dataSM(\"scroll-arrows\").remove(),t.dataSM(\"shown-before\")&&((i.opts.subMenusMinWidth||i.opts.subMenusMaxWidth)&&t.css({width:\"\",minWidth:\"\",maxWidth:\"\"}).removeClass(\"sm-nowrap\"),t.dataSM(\"scroll-arrows\")&&t.dataSM(\"scroll-arrows\").remove(),t.css({zIndex:\"\",top:\"\",left:\"\",marginLeft:\"\",marginTop:\"\",display:\"\"})),0==(t.attr(\"id\")||\"\").indexOf(i.accessIdPrefix)&&t.removeAttr(\"id\")}).removeDataSM(\"in-mega\").removeDataSM(\"shown-before\").removeDataSM(\"scroll-arrows\").removeDataSM(\"parent-a\").removeDataSM(\"level\").removeDataSM(\"beforefirstshowfired\").removeAttr(\"role\").removeAttr(\"aria-hidden\").removeAttr(\"aria-labelledby\").removeAttr(\"aria-expanded\"),this.$root.find(\"a.has-submenu\").each(function(){var t=$(this);0==t.attr(\"id\").indexOf(i.accessIdPrefix)&&t.removeAttr(\"id\")}).removeClass(\"has-submenu\").removeDataSM(\"sub\").removeAttr(\"aria-haspopup\").removeAttr(\"aria-controls\").removeAttr(\"aria-expanded\").closest(\"li\").removeDataSM(\"sub\"),this.opts.subIndicators&&this.$root.find(\"span.sub-arrow\").remove(),this.opts.markCurrentItem&&this.$root.find(\"a.current\").removeClass(\"current\"),t||(this.$root=null,this.$firstLink=null,this.$firstSub=null,this.$disableOverlay&&(this.$disableOverlay.remove(),this.$disableOverlay=null),menuTrees.splice($.inArray(this,menuTrees),1))},disable:function(t){if(!this.disabled){if(this.menuHideAll(),!t&&!this.opts.isPopup&&this.$root.is(\":visible\")){var e=this.$root.offset();this.$disableOverlay=$('<div class=\"sm-jquery-disable-overlay\"/>').css({position:\"absolute\",top:e.top,left:e.left,width:this.$root.outerWidth(),height:this.$root.outerHeight(),zIndex:this.getStartZIndex(!0),opacity:0}).appendTo(document.body)}this.disabled=!0}},docClick:function(t){return this.$touchScrollingSub?(this.$touchScrollingSub=null,void 0):((this.visibleSubMenus.length&&!$.contains(this.$root[0],t.target)||$(t.target).closest(\"a\").length)&&this.menuHideAll(),void 0)},docTouchEnd:function(){if(this.lastTouch){if(!(!this.visibleSubMenus.length||void 0!==this.lastTouch.x2&&this.lastTouch.x1!=this.lastTouch.x2||void 0!==this.lastTouch.y2&&this.lastTouch.y1!=this.lastTouch.y2||this.lastTouch.target&&$.contains(this.$root[0],this.lastTouch.target))){this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0);var t=this;this.hideTimeout=setTimeout(function(){t.menuHideAll()},350)}this.lastTouch=null}},docTouchMove:function(t){if(this.lastTouch){var e=t.originalEvent.touches[0];this.lastTouch.x2=e.pageX,this.lastTouch.y2=e.pageY}},docTouchStart:function(t){var e=t.originalEvent.touches[0];this.lastTouch={x1:e.pageX,y1:e.pageY,target:e.target}},enable:function(){this.disabled&&(this.$disableOverlay&&(this.$disableOverlay.remove(),this.$disableOverlay=null),this.disabled=!1)},getClosestMenu:function(t){for(var e=$(t).closest(\"ul\");e.dataSM(\"in-mega\");)e=e.parent().closest(\"ul\");return e[0]||null},getHeight:function(t){return this.getOffset(t,!0)},getOffset:function(t,e){var i;\"none\"==t.css(\"display\")&&(i={position:t[0].style.position,visibility:t[0].style.visibility},t.css({position:\"absolute\",visibility:\"hidden\"}).show());var s=t[0].getBoundingClientRect&&t[0].getBoundingClientRect(),o=s&&(e?s.height||s.bottom-s.top:s.width||s.right-s.left);return o||0===o||(o=e?t[0].offsetHeight:t[0].offsetWidth),i&&t.hide().css(i),o},getStartZIndex:function(t){var e=parseInt(this[t?\"$root\":\"$firstSub\"].css(\"z-index\"));return!t&&isNaN(e)&&(e=parseInt(this.$root.css(\"z-index\"))),isNaN(e)?1:e},getTouchPoint:function(t){return t.touches&&t.touches[0]||t.changedTouches&&t.changedTouches[0]||t},getViewport:function(t){var e=t?\"Height\":\"Width\",i=document.documentElement[\"client\"+e],s=window[\"inner\"+e];return s&&(i=Math.min(i,s)),i},getViewportHeight:function(){return this.getViewport(!0)},getViewportWidth:function(){return this.getViewport()},getWidth:function(t){return this.getOffset(t)},handleEvents:function(){return!this.disabled&&this.isCSSOn()},handleItemEvents:function(t){return this.handleEvents()&&!this.isLinkInMegaMenu(t)},isCollapsible:function(){return\"static\"==this.$firstSub.css(\"position\")},isCSSOn:function(){return\"inline\"!=this.$firstLink.css(\"display\")},isFixed:function(){var t=\"fixed\"==this.$root.css(\"position\");return t||this.$root.parentsUntil(\"body\").each(function(){return\"fixed\"==$(this).css(\"position\")?(t=!0,!1):void 0}),t},isLinkInMegaMenu:function(t){return $(this.getClosestMenu(t[0])).hasClass(\"mega-menu\")},isTouchMode:function(){return!mouse||this.opts.noMouseOver||this.isCollapsible()},itemActivate:function(t,e){var i=t.closest(\"ul\"),s=i.dataSM(\"level\");if(s>1&&(!this.activatedItems[s-2]||this.activatedItems[s-2][0]!=i.dataSM(\"parent-a\")[0])){var o=this;$(i.parentsUntil(\"[data-smartmenus-id]\",\"ul\").get().reverse()).add(i).each(function(){o.itemActivate($(this).dataSM(\"parent-a\"))})}if((!this.isCollapsible()||e)&&this.menuHideSubMenus(this.activatedItems[s-1]&&this.activatedItems[s-1][0]==t[0]?s:s-1),this.activatedItems[s-1]=t,this.$root.triggerHandler(\"activate.smapi\",t[0])!==!1){var a=t.dataSM(\"sub\");a&&(this.isTouchMode()||!this.opts.showOnClick||this.clickActivated)&&this.menuShow(a)}},itemBlur:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&this.$root.triggerHandler(\"blur.smapi\",e[0])},itemClick:function(t){var e=$(t.currentTarget);if(this.handleItemEvents(e)){if(this.$touchScrollingSub&&this.$touchScrollingSub[0]==e.closest(\"ul\")[0])return this.$touchScrollingSub=null,t.stopPropagation(),!1;if(this.$root.triggerHandler(\"click.smapi\",e[0])===!1)return!1;var i=$(t.target).is(\".sub-arrow\"),s=e.dataSM(\"sub\"),o=s?2==s.dataSM(\"level\"):!1,a=this.isCollapsible(),n=/toggle$/.test(this.opts.collapsibleBehavior),r=/link$/.test(this.opts.collapsibleBehavior),h=/^accordion/.test(this.opts.collapsibleBehavior);if(s&&!s.is(\":visible\")){if((!r||!a||i)&&(this.opts.showOnClick&&o&&(this.clickActivated=!0),this.itemActivate(e,h),s.is(\":visible\")))return this.focusActivated=!0,!1}else if(a&&(n||i))return this.itemActivate(e,h),this.menuHide(s),n&&(this.focusActivated=!1),!1;return this.opts.showOnClick&&o||e.hasClass(\"disabled\")||this.$root.triggerHandler(\"select.smapi\",e[0])===!1?!1:void 0}},itemDown:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&e.dataSM(\"mousedown\",!0)},itemEnter:function(t){var e=$(t.currentTarget);if(this.handleItemEvents(e)){if(!this.isTouchMode()){this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=0);var i=this;this.showTimeout=setTimeout(function(){i.itemActivate(e)},this.opts.showOnClick&&1==e.closest(\"ul\").dataSM(\"level\")?1:this.opts.showTimeout)}this.$root.triggerHandler(\"mouseenter.smapi\",e[0])}},itemFocus:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&(!this.focusActivated||this.isTouchMode()&&e.dataSM(\"mousedown\")||this.activatedItems.length&&this.activatedItems[this.activatedItems.length-1][0]==e[0]||this.itemActivate(e,!0),this.$root.triggerHandler(\"focus.smapi\",e[0]))},itemLeave:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&(this.isTouchMode()||(e[0].blur(),this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=0)),e.removeDataSM(\"mousedown\"),this.$root.triggerHandler(\"mouseleave.smapi\",e[0]))},menuHide:function(t){if(this.$root.triggerHandler(\"beforehide.smapi\",t[0])!==!1&&(canAnimate&&t.stop(!0,!0),\"none\"!=t.css(\"display\"))){var e=function(){t.css(\"z-index\",\"\")};this.isCollapsible()?canAnimate&&this.opts.collapsibleHideFunction?this.opts.collapsibleHideFunction.call(this,t,e):t.hide(this.opts.collapsibleHideDuration,e):canAnimate&&this.opts.hideFunction?this.opts.hideFunction.call(this,t,e):t.hide(this.opts.hideDuration,e),t.dataSM(\"scroll\")&&(this.menuScrollStop(t),t.css({\"touch-action\":\"\",\"-ms-touch-action\":\"\",\"-webkit-transform\":\"\",transform:\"\"}).off(\".smartmenus_scroll\").removeDataSM(\"scroll\").dataSM(\"scroll-arrows\").hide()),t.dataSM(\"parent-a\").removeClass(\"highlighted\").attr(\"aria-expanded\",\"false\"),t.attr({\"aria-expanded\":\"false\",\"aria-hidden\":\"true\"});var i=t.dataSM(\"level\");this.activatedItems.splice(i-1,1),this.visibleSubMenus.splice($.inArray(t,this.visibleSubMenus),1),this.$root.triggerHandler(\"hide.smapi\",t[0])}},menuHideAll:function(){this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=0);for(var t=this.opts.isPopup?1:0,e=this.visibleSubMenus.length-1;e>=t;e--)this.menuHide(this.visibleSubMenus[e]);this.opts.isPopup&&(canAnimate&&this.$root.stop(!0,!0),this.$root.is(\":visible\")&&(canAnimate&&this.opts.hideFunction?this.opts.hideFunction.call(this,this.$root):this.$root.hide(this.opts.hideDuration))),this.activatedItems=[],this.visibleSubMenus=[],this.clickActivated=!1,this.focusActivated=!1,this.zIndexInc=0,this.$root.triggerHandler(\"hideAll.smapi\")},menuHideSubMenus:function(t){for(var e=this.activatedItems.length-1;e>=t;e--){var i=this.activatedItems[e].dataSM(\"sub\");i&&this.menuHide(i)}},menuInit:function(t){if(!t.dataSM(\"in-mega\")){t.hasClass(\"mega-menu\")&&t.find(\"ul\").dataSM(\"in-mega\",!0);for(var e=2,i=t[0];(i=i.parentNode.parentNode)!=this.$root[0];)e++;var s=t.prevAll(\"a\").eq(-1);s.length||(s=t.prevAll().find(\"a\").eq(-1)),s.addClass(\"has-submenu\").dataSM(\"sub\",t),t.dataSM(\"parent-a\",s).dataSM(\"level\",e).parent().dataSM(\"sub\",t);var o=s.attr(\"id\")||this.accessIdPrefix+ ++this.idInc,a=t.attr(\"id\")||this.accessIdPrefix+ ++this.idInc;s.attr({id:o,\"aria-haspopup\":\"true\",\"aria-controls\":a,\"aria-expanded\":\"false\"}),t.attr({id:a,role:\"group\",\"aria-hidden\":\"true\",\"aria-labelledby\":o,\"aria-expanded\":\"false\"}),this.opts.subIndicators&&s[this.opts.subIndicatorsPos](this.$subArrow.clone())}},menuPosition:function(t){var e,i,s=t.dataSM(\"parent-a\"),o=s.closest(\"li\"),a=o.parent(),n=t.dataSM(\"level\"),r=this.getWidth(t),h=this.getHeight(t),u=s.offset(),l=u.left,c=u.top,d=this.getWidth(s),m=this.getHeight(s),p=$(window),f=p.scrollLeft(),v=p.scrollTop(),b=this.getViewportWidth(),S=this.getViewportHeight(),g=a.parent().is(\"[data-sm-horizontal-sub]\")||2==n&&!a.hasClass(\"sm-vertical\"),M=this.opts.rightToLeftSubMenus&&!o.is(\"[data-sm-reverse]\")||!this.opts.rightToLeftSubMenus&&o.is(\"[data-sm-reverse]\"),w=2==n?this.opts.mainMenuSubOffsetX:this.opts.subMenusSubOffsetX,T=2==n?this.opts.mainMenuSubOffsetY:this.opts.subMenusSubOffsetY;if(g?(e=M?d-r-w:w,i=this.opts.bottomToTopSubMenus?-h-T:m+T):(e=M?w-r:d-w,i=this.opts.bottomToTopSubMenus?m-T-h:T),this.opts.keepInViewport){var y=l+e,I=c+i;if(M&&f>y?e=g?f-y+e:d-w:!M&&y+r>f+b&&(e=g?f+b-r-y+e:w-r),g||(S>h&&I+h>v+S?i+=v+S-h-I:(h>=S||v>I)&&(i+=v-I)),g&&(I+h>v+S+.49||v>I)||!g&&h>S+.49){var x=this;t.dataSM(\"scroll-arrows\")||t.dataSM(\"scroll-arrows\",$([$('<span class=\"scroll-up\"><span class=\"scroll-up-arrow\"></span></span>')[0],$('<span class=\"scroll-down\"><span class=\"scroll-down-arrow\"></span></span>')[0]]).on({mouseenter:function(){t.dataSM(\"scroll\").up=$(this).hasClass(\"scroll-up\"),x.menuScroll(t)},mouseleave:function(e){x.menuScrollStop(t),x.menuScrollOut(t,e)},\"mousewheel DOMMouseScroll\":function(t){t.preventDefault()}}).insertAfter(t));var A=\".smartmenus_scroll\";if(t.dataSM(\"scroll\",{y:this.cssTransforms3d?0:i-m,step:1,itemH:m,subH:h,arrowDownH:this.getHeight(t.dataSM(\"scroll-arrows\").eq(1))}).on(getEventsNS({mouseover:function(e){x.menuScrollOver(t,e)},mouseout:function(e){x.menuScrollOut(t,e)},\"mousewheel DOMMouseScroll\":function(e){x.menuScrollMousewheel(t,e)}},A)).dataSM(\"scroll-arrows\").css({top:\"auto\",left:\"0\",marginLeft:e+(parseInt(t.css(\"border-left-width\"))||0),width:r-(parseInt(t.css(\"border-left-width\"))||0)-(parseInt(t.css(\"border-right-width\"))||0),zIndex:t.css(\"z-index\")}).eq(g&&this.opts.bottomToTopSubMenus?0:1).show(),this.isFixed()){var C={};C[touchEvents?\"touchstart touchmove touchend\":\"pointerdown pointermove pointerup MSPointerDown MSPointerMove MSPointerUp\"]=function(e){x.menuScrollTouch(t,e)},t.css({\"touch-action\":\"none\",\"-ms-touch-action\":\"none\"}).on(getEventsNS(C,A))}}}t.css({top:\"auto\",left:\"0\",marginLeft:e,marginTop:i-m})},menuScroll:function(t,e,i){var s,o=t.dataSM(\"scroll\"),a=t.dataSM(\"scroll-arrows\"),n=o.up?o.upEnd:o.downEnd;if(!e&&o.momentum){if(o.momentum*=.92,s=o.momentum,.5>s)return this.menuScrollStop(t),void 0}else s=i||(e||!this.opts.scrollAccelerate?this.opts.scrollStep:Math.floor(o.step));var r=t.dataSM(\"level\");if(this.activatedItems[r-1]&&this.activatedItems[r-1].dataSM(\"sub\")&&this.activatedItems[r-1].dataSM(\"sub\").is(\":visible\")&&this.menuHideSubMenus(r-1),o.y=o.up&&o.y>=n||!o.up&&n>=o.y?o.y:Math.abs(n-o.y)>s?o.y+(o.up?s:-s):n,t.css(this.cssTransforms3d?{\"-webkit-transform\":\"translate3d(0, \"+o.y+\"px, 0)\",transform:\"translate3d(0, \"+o.y+\"px, 0)\"}:{marginTop:o.y}),mouse&&(o.up&&o.y>o.downEnd||!o.up&&o.y<o.upEnd)&&a.eq(o.up?1:0).show(),o.y==n)mouse&&a.eq(o.up?0:1).hide(),this.menuScrollStop(t);else if(!e){this.opts.scrollAccelerate&&o.step<this.opts.scrollStep&&(o.step+=.2);var h=this;this.scrollTimeout=requestAnimationFrame(function(){h.menuScroll(t)})}},menuScrollMousewheel:function(t,e){if(this.getClosestMenu(e.target)==t[0]){e=e.originalEvent;var i=(e.wheelDelta||-e.detail)>0;t.dataSM(\"scroll-arrows\").eq(i?0:1).is(\":visible\")&&(t.dataSM(\"scroll\").up=i,this.menuScroll(t,!0))}e.preventDefault()},menuScrollOut:function(t,e){mouse&&(/^scroll-(up|down)/.test((e.relatedTarget||\"\").className)||(t[0]==e.relatedTarget||$.contains(t[0],e.relatedTarget))&&this.getClosestMenu(e.relatedTarget)==t[0]||t.dataSM(\"scroll-arrows\").css(\"visibility\",\"hidden\"))},menuScrollOver:function(t,e){if(mouse&&!/^scroll-(up|down)/.test(e.target.className)&&this.getClosestMenu(e.target)==t[0]){this.menuScrollRefreshData(t);var i=t.dataSM(\"scroll\"),s=$(window).scrollTop()-t.dataSM(\"parent-a\").offset().top-i.itemH;t.dataSM(\"scroll-arrows\").eq(0).css(\"margin-top\",s).end().eq(1).css(\"margin-top\",s+this.getViewportHeight()-i.arrowDownH).end().css(\"visibility\",\"visible\")}},menuScrollRefreshData:function(t){var e=t.dataSM(\"scroll\"),i=$(window).scrollTop()-t.dataSM(\"parent-a\").offset().top-e.itemH;this.cssTransforms3d&&(i=-(parseFloat(t.css(\"margin-top\"))-i)),$.extend(e,{upEnd:i,downEnd:i+this.getViewportHeight()-e.subH})},menuScrollStop:function(t){return this.scrollTimeout?(cancelAnimationFrame(this.scrollTimeout),this.scrollTimeout=0,t.dataSM(\"scroll\").step=1,!0):void 0},menuScrollTouch:function(t,e){if(e=e.originalEvent,isTouchEvent(e)){var i=this.getTouchPoint(e);if(this.getClosestMenu(i.target)==t[0]){var s=t.dataSM(\"scroll\");if(/(start|down)$/i.test(e.type))this.menuScrollStop(t)?(e.preventDefault(),this.$touchScrollingSub=t):this.$touchScrollingSub=null,this.menuScrollRefreshData(t),$.extend(s,{touchStartY:i.pageY,touchStartTime:e.timeStamp});else if(/move$/i.test(e.type)){var o=void 0!==s.touchY?s.touchY:s.touchStartY;if(void 0!==o&&o!=i.pageY){this.$touchScrollingSub=t;var a=i.pageY>o;void 0!==s.up&&s.up!=a&&$.extend(s,{touchStartY:i.pageY,touchStartTime:e.timeStamp}),$.extend(s,{up:a,touchY:i.pageY}),this.menuScroll(t,!0,Math.abs(i.pageY-o))}e.preventDefault()}else void 0!==s.touchY&&((s.momentum=15*Math.pow(Math.abs(i.pageY-s.touchStartY)/(e.timeStamp-s.touchStartTime),2))&&(this.menuScrollStop(t),this.menuScroll(t),e.preventDefault()),delete s.touchY)}}},menuShow:function(t){if((t.dataSM(\"beforefirstshowfired\")||(t.dataSM(\"beforefirstshowfired\",!0),this.$root.triggerHandler(\"beforefirstshow.smapi\",t[0])!==!1))&&this.$root.triggerHandler(\"beforeshow.smapi\",t[0])!==!1&&(t.dataSM(\"shown-before\",!0),canAnimate&&t.stop(!0,!0),!t.is(\":visible\"))){var e=t.dataSM(\"parent-a\"),i=this.isCollapsible();if((this.opts.keepHighlighted||i)&&e.addClass(\"highlighted\"),i)t.removeClass(\"sm-nowrap\").css({zIndex:\"\",width:\"auto\",minWidth:\"\",maxWidth:\"\",top:\"\",left:\"\",marginLeft:\"\",marginTop:\"\"});else{if(t.css(\"z-index\",this.zIndexInc=(this.zIndexInc||this.getStartZIndex())+1),(this.opts.subMenusMinWidth||this.opts.subMenusMaxWidth)&&(t.css({width:\"auto\",minWidth:\"\",maxWidth:\"\"}).addClass(\"sm-nowrap\"),this.opts.subMenusMinWidth&&t.css(\"min-width\",this.opts.subMenusMinWidth),this.opts.subMenusMaxWidth)){var s=this.getWidth(t);t.css(\"max-width\",this.opts.subMenusMaxWidth),s>this.getWidth(t)&&t.removeClass(\"sm-nowrap\").css(\"width\",this.opts.subMenusMaxWidth)}this.menuPosition(t)}var o=function(){t.css(\"overflow\",\"\")};i?canAnimate&&this.opts.collapsibleShowFunction?this.opts.collapsibleShowFunction.call(this,t,o):t.show(this.opts.collapsibleShowDuration,o):canAnimate&&this.opts.showFunction?this.opts.showFunction.call(this,t,o):t.show(this.opts.showDuration,o),e.attr(\"aria-expanded\",\"true\"),t.attr({\"aria-expanded\":\"true\",\"aria-hidden\":\"false\"}),this.visibleSubMenus.push(t),this.$root.triggerHandler(\"show.smapi\",t[0])}},popupHide:function(t){this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0);var e=this;this.hideTimeout=setTimeout(function(){e.menuHideAll()},t?1:this.opts.hideTimeout)},popupShow:function(t,e){if(!this.opts.isPopup)return alert('SmartMenus jQuery Error:\\n\\nIf you want to show this menu via the \"popupShow\" method, set the isPopup:true option.'),void 0;if(this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0),this.$root.dataSM(\"shown-before\",!0),canAnimate&&this.$root.stop(!0,!0),!this.$root.is(\":visible\")){this.$root.css({left:t,top:e});var i=this,s=function(){i.$root.css(\"overflow\",\"\")};canAnimate&&this.opts.showFunction?this.opts.showFunction.call(this,this.$root,s):this.$root.show(this.opts.showDuration,s),this.visibleSubMenus[0]=this.$root}},refresh:function(){this.destroy(!0),this.init(!0)},rootKeyDown:function(t){if(this.handleEvents())switch(t.keyCode){case 27:var e=this.activatedItems[0];if(e){this.menuHideAll(),e[0].focus();var i=e.dataSM(\"sub\");i&&this.menuHide(i)}break;case 32:var s=$(t.target);if(s.is(\"a\")&&this.handleItemEvents(s)){var i=s.dataSM(\"sub\");i&&!i.is(\":visible\")&&(this.itemClick({currentTarget:t.target}),t.preventDefault())}}},rootOut:function(t){if(this.handleEvents()&&!this.isTouchMode()&&t.target!=this.$root[0]&&(this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0),!this.opts.showOnClick||!this.opts.hideOnClick)){var e=this;this.hideTimeout=setTimeout(function(){e.menuHideAll()},this.opts.hideTimeout)}},rootOver:function(t){this.handleEvents()&&!this.isTouchMode()&&t.target!=this.$root[0]&&this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0)},winResize:function(t){if(this.handleEvents()){if(!(\"onorientationchange\"in window)||\"orientationchange\"==t.type){var e=this.isCollapsible();this.wasCollapsible&&e||(this.activatedItems.length&&this.activatedItems[this.activatedItems.length-1][0].blur(),this.menuHideAll()),this.wasCollapsible=e}}else if(this.$disableOverlay){var i=this.$root.offset();this.$disableOverlay.css({top:i.top,left:i.left,width:this.$root.outerWidth(),height:this.$root.outerHeight()})}}}}),$.fn.dataSM=function(t,e){return e?this.data(t+\"_smartmenus\",e):this.data(t+\"_smartmenus\")},$.fn.removeDataSM=function(t){return this.removeData(t+\"_smartmenus\")},$.fn.smartmenus=function(options){if(\"string\"==typeof options){var args=arguments,method=options;return Array.prototype.shift.call(args),this.each(function(){var t=$(this).data(\"smartmenus\");t&&t[method]&&t[method].apply(t,args)})}return this.each(function(){var dataOpts=$(this).data(\"sm-options\")||null;if(dataOpts)try{dataOpts=eval(\"(\"+dataOpts+\")\")}catch(e){dataOpts=null,alert('ERROR\\n\\nSmartMenus jQuery init:\\nInvalid \"data-sm-options\" attribute value syntax.')}new $.SmartMenus(this,$.extend({},$.fn.smartmenus.defaults,options,dataOpts))})},$.fn.smartmenus.defaults={isPopup:!1,mainMenuSubOffsetX:0,mainMenuSubOffsetY:0,subMenusSubOffsetX:0,subMenusSubOffsetY:0,subMenusMinWidth:\"10em\",subMenusMaxWidth:\"20em\",subIndicators:!0,subIndicatorsPos:\"append\",subIndicatorsText:\"\",scrollStep:30,scrollAccelerate:!0,showTimeout:250,hideTimeout:500,showDuration:0,showFunction:null,hideDuration:0,hideFunction:function(t,e){t.fadeOut(200,e)},collapsibleShowDuration:0,collapsibleShowFunction:function(t,e){t.slideDown(200,e)},collapsibleHideDuration:0,collapsibleHideFunction:function(t,e){t.slideUp(200,e)},showOnClick:!1,hideOnClick:!0,noMouseOver:!1,keepInViewport:!0,keepHighlighted:!0,markCurrentItem:!1,markCurrentTree:!0,rightToLeftSubMenus:!1,bottomToTopSubMenus:!1,collapsibleBehavior:\"default\"},$});"
  },
  {
    "path": "thirdparty/glfw/docs/html/main_8dox.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta http-equiv=\"X-UA-Compatible\" content=\"IE=9\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<title>GLFW: main.dox File Reference</title>\n<link href=\"tabs.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"jquery.js\"></script>\n<script type=\"text/javascript\" src=\"dynsections.js\"></script>\n<link href=\"search/search.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"search/searchdata.js\"></script>\n<script type=\"text/javascript\" src=\"search/search.js\"></script>\n<link href=\"doxygen.css\" rel=\"stylesheet\" type=\"text/css\" />\n<link href=\"extra.css\" rel=\"stylesheet\" type=\"text/css\"/>\n</head>\n<body>\n<div id=\"top\"><!-- do not remove this div, it is closed by doxygen! -->\n<div id=\"titlearea\">\n\t<div class=\"glfwheader\">\n\t\t<a href=\"https://www.glfw.org/\" id=\"glfwhome\">GLFW</a>\n\t\t<ul class=\"glfwnavbar\">\n\t\t\t<li><a href=\"https://www.glfw.org/documentation.html\">Documentation</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/download.html\">Download</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/community.html\">Community</a></li>\n\t\t</ul>\n\t</div>\n</div>\n<!-- end header part -->\n<!-- Generated by Doxygen 1.8.16 -->\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\nvar searchBox = new SearchBox(\"searchBox\", \"search\",false,'Search');\n/* @license-end */\n</script>\n<script type=\"text/javascript\" src=\"menudata.js\"></script>\n<script type=\"text/javascript\" src=\"menu.js\"></script>\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\n$(function() {\n  initMenu('',true,false,'search.php','Search');\n  $(document).ready(function() { init_search(); });\n});\n/* @license-end */</script>\n<div id=\"main-nav\"></div>\n<!-- window showing the filter options -->\n<div id=\"MSearchSelectWindow\"\n     onmouseover=\"return searchBox.OnSearchSelectShow()\"\n     onmouseout=\"return searchBox.OnSearchSelectHide()\"\n     onkeydown=\"return searchBox.OnSearchSelectKey(event)\">\n</div>\n\n<!-- iframe showing the search results (closed by default) -->\n<div id=\"MSearchResultsWindow\">\n<iframe src=\"javascript:void(0)\" frameborder=\"0\" \n        name=\"MSearchResults\" id=\"MSearchResults\">\n</iframe>\n</div>\n\n</div><!-- top -->\n<div class=\"header\">\n  <div class=\"headertitle\">\n<div class=\"title\">main.dox File Reference</div>  </div>\n</div><!--header-->\n<div class=\"contents\">\n</div><!-- contents -->\n<address class=\"footer\">\n<p>\nLast update on Mon Jan 20 2020 for GLFW 3.3.2\n</p>\n</address>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/menu.js",
    "content": "/*\n @licstart  The following is the entire license notice for the\n JavaScript code in this file.\n\n Copyright (C) 1997-2017 by Dimitri van Heesch\n\n This program is free software; you can redistribute it and/or modify\n it under the terms of the GNU General Public License as published by\n the Free Software Foundation; either version 2 of the License, or\n (at your option) any later version.\n\n This program is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n GNU General Public License for more details.\n\n You should have received a copy of the GNU General Public License along\n with this program; if not, write to the Free Software Foundation, Inc.,\n 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.\n\n @licend  The above is the entire license notice\n for the JavaScript code in this file\n */\nfunction initMenu(relPath,searchEnabled,serverSide,searchPage,search) {\n  function makeTree(data,relPath) {\n    var result='';\n    if ('children' in data) {\n      result+='<ul>';\n      for (var i in data.children) {\n        result+='<li><a href=\"'+relPath+data.children[i].url+'\">'+\n                                data.children[i].text+'</a>'+\n                                makeTree(data.children[i],relPath)+'</li>';\n      }\n      result+='</ul>';\n    }\n    return result;\n  }\n\n  $('#main-nav').append(makeTree(menudata,relPath));\n  $('#main-nav').children(':first').addClass('sm sm-dox').attr('id','main-menu');\n  if (searchEnabled) {\n    if (serverSide) {\n      $('#main-menu').append('<li style=\"float:right\"><div id=\"MSearchBox\" class=\"MSearchBoxInactive\"><div class=\"left\"><form id=\"FSearchBox\" action=\"'+relPath+searchPage+'\" method=\"get\"><img id=\"MSearchSelect\" src=\"'+relPath+'search/mag.png\" alt=\"\"/><input type=\"text\" id=\"MSearchField\" name=\"query\" value=\"'+search+'\" size=\"20\" accesskey=\"S\" onfocus=\"searchBox.OnSearchFieldFocus(true)\" onblur=\"searchBox.OnSearchFieldFocus(false)\"></form></div><div class=\"right\"></div></div></li>');\n    } else {\n      $('#main-menu').append('<li style=\"float:right\"><div id=\"MSearchBox\" class=\"MSearchBoxInactive\"><span class=\"left\"><img id=\"MSearchSelect\" src=\"'+relPath+'search/mag_sel.png\" onmouseover=\"return searchBox.OnSearchSelectShow()\" onmouseout=\"return searchBox.OnSearchSelectHide()\" alt=\"\"/><input type=\"text\" id=\"MSearchField\" value=\"'+search+'\" accesskey=\"S\" onfocus=\"searchBox.OnSearchFieldFocus(true)\" onblur=\"searchBox.OnSearchFieldFocus(false)\" onkeyup=\"searchBox.OnSearchFieldChange(event)\"/></span><span class=\"right\"><a id=\"MSearchClose\" href=\"javascript:searchBox.CloseResultsWindow()\"><img id=\"MSearchCloseImg\" border=\"0\" src=\"'+relPath+'search/close.png\" alt=\"\"/></a></span></div></li>');\n    }\n  }\n  $('#main-menu').smartmenus();\n}\n/* @license-end */\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/menudata.js",
    "content": "/*\n@licstart  The following is the entire license notice for the\nJavaScript code in this file.\n\nCopyright (C) 1997-2019 by Dimitri van Heesch\n\nThis program is free software; you can redistribute it and/or modify\nit under the terms of version 2 of the GNU General Public License as published by\nthe Free Software Foundation\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License along\nwith this program; if not, write to the Free Software Foundation, Inc.,\n51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.\n\n@licend  The above is the entire license notice\nfor the JavaScript code in this file\n*/\nvar menudata={children:[\n{text:\"Introduction\",url:\"index.html\"},\n{text:\"Tutorial\",url:\"quick_guide.html\"},\n{text:\"Guides\",url:\"pages.html\"},\n{text:\"Reference\",url:\"modules.html\"},\n{text:\"Files\",url:\"files.html\"}]}\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/modules.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta http-equiv=\"X-UA-Compatible\" content=\"IE=9\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<title>GLFW: Reference</title>\n<link href=\"tabs.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"jquery.js\"></script>\n<script type=\"text/javascript\" src=\"dynsections.js\"></script>\n<link href=\"search/search.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"search/searchdata.js\"></script>\n<script type=\"text/javascript\" src=\"search/search.js\"></script>\n<link href=\"doxygen.css\" rel=\"stylesheet\" type=\"text/css\" />\n<link href=\"extra.css\" rel=\"stylesheet\" type=\"text/css\"/>\n</head>\n<body>\n<div id=\"top\"><!-- do not remove this div, it is closed by doxygen! -->\n<div id=\"titlearea\">\n\t<div class=\"glfwheader\">\n\t\t<a href=\"https://www.glfw.org/\" id=\"glfwhome\">GLFW</a>\n\t\t<ul class=\"glfwnavbar\">\n\t\t\t<li><a href=\"https://www.glfw.org/documentation.html\">Documentation</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/download.html\">Download</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/community.html\">Community</a></li>\n\t\t</ul>\n\t</div>\n</div>\n<!-- end header part -->\n<!-- Generated by Doxygen 1.8.16 -->\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\nvar searchBox = new SearchBox(\"searchBox\", \"search\",false,'Search');\n/* @license-end */\n</script>\n<script type=\"text/javascript\" src=\"menudata.js\"></script>\n<script type=\"text/javascript\" src=\"menu.js\"></script>\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\n$(function() {\n  initMenu('',true,false,'search.php','Search');\n  $(document).ready(function() { init_search(); });\n});\n/* @license-end */</script>\n<div id=\"main-nav\"></div>\n</div><!-- top -->\n<!-- window showing the filter options -->\n<div id=\"MSearchSelectWindow\"\n     onmouseover=\"return searchBox.OnSearchSelectShow()\"\n     onmouseout=\"return searchBox.OnSearchSelectHide()\"\n     onkeydown=\"return searchBox.OnSearchSelectKey(event)\">\n</div>\n\n<!-- iframe showing the search results (closed by default) -->\n<div id=\"MSearchResultsWindow\">\n<iframe src=\"javascript:void(0)\" frameborder=\"0\" \n        name=\"MSearchResults\" id=\"MSearchResults\">\n</iframe>\n</div>\n\n<div class=\"header\">\n  <div class=\"headertitle\">\n<div class=\"title\">Reference</div>  </div>\n</div><!--header-->\n<div class=\"contents\">\n<div class=\"textblock\">Here is a list of all modules:</div><div class=\"directory\">\n<div class=\"levels\">[detail level <span onclick=\"javascript:toggleLevel(1);\">1</span><span onclick=\"javascript:toggleLevel(2);\">2</span>]</div><table class=\"directory\">\n<tr id=\"row_0_\" class=\"even\"><td class=\"entry\"><span style=\"width:16px;display:inline-block;\">&#160;</span><a class=\"el\" href=\"group__context.html\" target=\"_self\">Context reference</a></td><td class=\"desc\">Functions and types related to OpenGL and OpenGL ES contexts </td></tr>\n<tr id=\"row_1_\"><td class=\"entry\"><span style=\"width:0px;display:inline-block;\">&#160;</span><span id=\"arr_1_\" class=\"arrow\" onclick=\"toggleFolder('1_')\">&#9660;</span><a class=\"el\" href=\"group__init.html\" target=\"_self\">Initialization, version and error reference</a></td><td class=\"desc\">Functions and types related to initialization and error handling </td></tr>\n<tr id=\"row_1_0_\" class=\"even\"><td class=\"entry\"><span style=\"width:32px;display:inline-block;\">&#160;</span><a class=\"el\" href=\"group__errors.html\" target=\"_self\">Error codes</a></td><td class=\"desc\">Error codes </td></tr>\n<tr id=\"row_2_\"><td class=\"entry\"><span style=\"width:0px;display:inline-block;\">&#160;</span><span id=\"arr_2_\" class=\"arrow\" onclick=\"toggleFolder('2_')\">&#9660;</span><a class=\"el\" href=\"group__input.html\" target=\"_self\">Input reference</a></td><td class=\"desc\">Functions and types related to input handling </td></tr>\n<tr id=\"row_2_0_\" class=\"even\"><td class=\"entry\"><span style=\"width:32px;display:inline-block;\">&#160;</span><a class=\"el\" href=\"group__gamepad__axes.html\" target=\"_self\">Gamepad axes</a></td><td class=\"desc\">Gamepad axes </td></tr>\n<tr id=\"row_2_1_\"><td class=\"entry\"><span style=\"width:32px;display:inline-block;\">&#160;</span><a class=\"el\" href=\"group__gamepad__buttons.html\" target=\"_self\">Gamepad buttons</a></td><td class=\"desc\">Gamepad buttons </td></tr>\n<tr id=\"row_2_2_\" class=\"even\"><td class=\"entry\"><span style=\"width:32px;display:inline-block;\">&#160;</span><a class=\"el\" href=\"group__hat__state.html\" target=\"_self\">Joystick hat states</a></td><td class=\"desc\">Joystick hat states </td></tr>\n<tr id=\"row_2_3_\"><td class=\"entry\"><span style=\"width:32px;display:inline-block;\">&#160;</span><a class=\"el\" href=\"group__joysticks.html\" target=\"_self\">Joysticks</a></td><td class=\"desc\">Joystick IDs </td></tr>\n<tr id=\"row_2_4_\" class=\"even\"><td class=\"entry\"><span style=\"width:32px;display:inline-block;\">&#160;</span><a class=\"el\" href=\"group__keys.html\" target=\"_self\">Keyboard keys</a></td><td class=\"desc\">Keyboard key IDs </td></tr>\n<tr id=\"row_2_5_\"><td class=\"entry\"><span style=\"width:32px;display:inline-block;\">&#160;</span><a class=\"el\" href=\"group__mods.html\" target=\"_self\">Modifier key flags</a></td><td class=\"desc\">Modifier key flags </td></tr>\n<tr id=\"row_2_6_\" class=\"even\"><td class=\"entry\"><span style=\"width:32px;display:inline-block;\">&#160;</span><a class=\"el\" href=\"group__buttons.html\" target=\"_self\">Mouse buttons</a></td><td class=\"desc\">Mouse button IDs </td></tr>\n<tr id=\"row_2_7_\"><td class=\"entry\"><span style=\"width:32px;display:inline-block;\">&#160;</span><a class=\"el\" href=\"group__shapes.html\" target=\"_self\">Standard cursor shapes</a></td><td class=\"desc\">Standard system cursor shapes </td></tr>\n<tr id=\"row_3_\" class=\"even\"><td class=\"entry\"><span style=\"width:16px;display:inline-block;\">&#160;</span><a class=\"el\" href=\"group__monitor.html\" target=\"_self\">Monitor reference</a></td><td class=\"desc\">Functions and types related to monitors </td></tr>\n<tr id=\"row_4_\"><td class=\"entry\"><span style=\"width:16px;display:inline-block;\">&#160;</span><a class=\"el\" href=\"group__native.html\" target=\"_self\">Native access</a></td><td class=\"desc\">Functions related to accessing native handles </td></tr>\n<tr id=\"row_5_\" class=\"even\"><td class=\"entry\"><span style=\"width:16px;display:inline-block;\">&#160;</span><a class=\"el\" href=\"group__vulkan.html\" target=\"_self\">Vulkan reference</a></td><td class=\"desc\">Functions and types related to Vulkan </td></tr>\n<tr id=\"row_6_\"><td class=\"entry\"><span style=\"width:16px;display:inline-block;\">&#160;</span><a class=\"el\" href=\"group__window.html\" target=\"_self\">Window reference</a></td><td class=\"desc\">Functions and types related to windows </td></tr>\n</table>\n</div><!-- directory -->\n</div><!-- contents -->\n<address class=\"footer\">\n<p>\nLast update on Mon Jan 20 2020 for GLFW 3.3.2\n</p>\n</address>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/monitor_8dox.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta http-equiv=\"X-UA-Compatible\" content=\"IE=9\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<title>GLFW: monitor.dox File Reference</title>\n<link href=\"tabs.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"jquery.js\"></script>\n<script type=\"text/javascript\" src=\"dynsections.js\"></script>\n<link href=\"search/search.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"search/searchdata.js\"></script>\n<script type=\"text/javascript\" src=\"search/search.js\"></script>\n<link href=\"doxygen.css\" rel=\"stylesheet\" type=\"text/css\" />\n<link href=\"extra.css\" rel=\"stylesheet\" type=\"text/css\"/>\n</head>\n<body>\n<div id=\"top\"><!-- do not remove this div, it is closed by doxygen! -->\n<div id=\"titlearea\">\n\t<div class=\"glfwheader\">\n\t\t<a href=\"https://www.glfw.org/\" id=\"glfwhome\">GLFW</a>\n\t\t<ul class=\"glfwnavbar\">\n\t\t\t<li><a href=\"https://www.glfw.org/documentation.html\">Documentation</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/download.html\">Download</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/community.html\">Community</a></li>\n\t\t</ul>\n\t</div>\n</div>\n<!-- end header part -->\n<!-- Generated by Doxygen 1.8.16 -->\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\nvar searchBox = new SearchBox(\"searchBox\", \"search\",false,'Search');\n/* @license-end */\n</script>\n<script type=\"text/javascript\" src=\"menudata.js\"></script>\n<script type=\"text/javascript\" src=\"menu.js\"></script>\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\n$(function() {\n  initMenu('',true,false,'search.php','Search');\n  $(document).ready(function() { init_search(); });\n});\n/* @license-end */</script>\n<div id=\"main-nav\"></div>\n<!-- window showing the filter options -->\n<div id=\"MSearchSelectWindow\"\n     onmouseover=\"return searchBox.OnSearchSelectShow()\"\n     onmouseout=\"return searchBox.OnSearchSelectHide()\"\n     onkeydown=\"return searchBox.OnSearchSelectKey(event)\">\n</div>\n\n<!-- iframe showing the search results (closed by default) -->\n<div id=\"MSearchResultsWindow\">\n<iframe src=\"javascript:void(0)\" frameborder=\"0\" \n        name=\"MSearchResults\" id=\"MSearchResults\">\n</iframe>\n</div>\n\n</div><!-- top -->\n<div class=\"header\">\n  <div class=\"headertitle\">\n<div class=\"title\">monitor.dox File Reference</div>  </div>\n</div><!--header-->\n<div class=\"contents\">\n</div><!-- contents -->\n<address class=\"footer\">\n<p>\nLast update on Mon Jan 20 2020 for GLFW 3.3.2\n</p>\n</address>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/monitor_guide.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta http-equiv=\"X-UA-Compatible\" content=\"IE=9\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<title>GLFW: Monitor guide</title>\n<link href=\"tabs.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"jquery.js\"></script>\n<script type=\"text/javascript\" src=\"dynsections.js\"></script>\n<link href=\"search/search.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"search/searchdata.js\"></script>\n<script type=\"text/javascript\" src=\"search/search.js\"></script>\n<link href=\"doxygen.css\" rel=\"stylesheet\" type=\"text/css\" />\n<link href=\"extra.css\" rel=\"stylesheet\" type=\"text/css\"/>\n</head>\n<body>\n<div id=\"top\"><!-- do not remove this div, it is closed by doxygen! -->\n<div id=\"titlearea\">\n\t<div class=\"glfwheader\">\n\t\t<a href=\"https://www.glfw.org/\" id=\"glfwhome\">GLFW</a>\n\t\t<ul class=\"glfwnavbar\">\n\t\t\t<li><a href=\"https://www.glfw.org/documentation.html\">Documentation</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/download.html\">Download</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/community.html\">Community</a></li>\n\t\t</ul>\n\t</div>\n</div>\n<!-- end header part -->\n<!-- Generated by Doxygen 1.8.16 -->\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\nvar searchBox = new SearchBox(\"searchBox\", \"search\",false,'Search');\n/* @license-end */\n</script>\n<script type=\"text/javascript\" src=\"menudata.js\"></script>\n<script type=\"text/javascript\" src=\"menu.js\"></script>\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\n$(function() {\n  initMenu('',true,false,'search.php','Search');\n  $(document).ready(function() { init_search(); });\n});\n/* @license-end */</script>\n<div id=\"main-nav\"></div>\n<!-- window showing the filter options -->\n<div id=\"MSearchSelectWindow\"\n     onmouseover=\"return searchBox.OnSearchSelectShow()\"\n     onmouseout=\"return searchBox.OnSearchSelectHide()\"\n     onkeydown=\"return searchBox.OnSearchSelectKey(event)\">\n</div>\n\n<!-- iframe showing the search results (closed by default) -->\n<div id=\"MSearchResultsWindow\">\n<iframe src=\"javascript:void(0)\" frameborder=\"0\" \n        name=\"MSearchResults\" id=\"MSearchResults\">\n</iframe>\n</div>\n\n</div><!-- top -->\n<div class=\"PageDoc\"><div class=\"header\">\n  <div class=\"headertitle\">\n<div class=\"title\">Monitor guide </div>  </div>\n</div><!--header-->\n<div class=\"contents\">\n<div class=\"toc\"><h3>Table of Contents</h3>\n<ul><li class=\"level1\"><a href=\"#monitor_object\">Monitor objects</a><ul><li class=\"level2\"><a href=\"#monitor_monitors\">Retrieving monitors</a></li>\n<li class=\"level2\"><a href=\"#monitor_event\">Monitor configuration changes</a></li>\n</ul>\n</li>\n<li class=\"level1\"><a href=\"#monitor_properties\">Monitor properties</a><ul><li class=\"level2\"><a href=\"#monitor_modes\">Video modes</a></li>\n<li class=\"level2\"><a href=\"#monitor_size\">Physical size</a></li>\n<li class=\"level2\"><a href=\"#monitor_scale\">Content scale</a></li>\n<li class=\"level2\"><a href=\"#monitor_pos\">Virtual position</a></li>\n<li class=\"level2\"><a href=\"#monitor_workarea\">Work area</a></li>\n<li class=\"level2\"><a href=\"#monitor_name\">Human-readable name</a></li>\n<li class=\"level2\"><a href=\"#monitor_userptr\">User pointer</a></li>\n<li class=\"level2\"><a href=\"#monitor_gamma\">Gamma ramp</a></li>\n</ul>\n</li>\n</ul>\n</div>\n<div class=\"textblock\"><p>This guide introduces the monitor related functions of GLFW. For details on a specific function in this category, see the <a class=\"el\" href=\"group__monitor.html\">Monitor reference</a>. There are also guides for the other areas of GLFW.</p>\n<ul>\n<li><a class=\"el\" href=\"intro_guide.html\">Introduction to the API</a></li>\n<li><a class=\"el\" href=\"window_guide.html\">Window guide</a></li>\n<li><a class=\"el\" href=\"context_guide.html\">Context guide</a></li>\n<li><a class=\"el\" href=\"vulkan_guide.html\">Vulkan guide</a></li>\n<li><a class=\"el\" href=\"input_guide.html\">Input guide</a></li>\n</ul>\n<h1><a class=\"anchor\" id=\"monitor_object\"></a>\nMonitor objects</h1>\n<p>A monitor object represents a currently connected monitor and is represented as a pointer to the <a href=\"https://en.wikipedia.org/wiki/Opaque_data_type\">opaque</a> type <a class=\"el\" href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a>. Monitor objects cannot be created or destroyed by the application and retain their addresses until the monitors they represent are disconnected or until the library is <a class=\"el\" href=\"intro_guide.html#intro_init_terminate\">terminated</a>.</p>\n<p>Each monitor has a current video mode, a list of supported video modes, a virtual position, a human-readable name, an estimated physical size and a gamma ramp. One of the monitors is the primary monitor.</p>\n<p>The virtual position of a monitor is in <a class=\"el\" href=\"intro_guide.html#coordinate_systems\">screen coordinates</a> and, together with the current video mode, describes the viewports that the connected monitors provide into the virtual desktop that spans them.</p>\n<p>To see how GLFW views your monitor setup and its available video modes, run the <code>monitors</code> test program.</p>\n<h2><a class=\"anchor\" id=\"monitor_monitors\"></a>\nRetrieving monitors</h2>\n<p>The primary monitor is returned by <a class=\"el\" href=\"group__monitor.html#ga721867d84c6d18d6790d64d2847ca0b1\">glfwGetPrimaryMonitor</a>. It is the user's preferred monitor and is usually the one with global UI elements like task bar or menu bar.</p>\n<div class=\"fragment\"><div class=\"line\"><a class=\"code\" href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a>* primary = <a class=\"code\" href=\"group__monitor.html#ga721867d84c6d18d6790d64d2847ca0b1\">glfwGetPrimaryMonitor</a>();</div>\n</div><!-- fragment --><p>You can retrieve all currently connected monitors with <a class=\"el\" href=\"group__monitor.html#ga3fba51c8bd36491d4712aa5bd074a537\">glfwGetMonitors</a>. See the reference documentation for the lifetime of the returned array.</p>\n<div class=\"fragment\"><div class=\"line\"><span class=\"keywordtype\">int</span> count;</div>\n<div class=\"line\"><a class=\"code\" href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a>** monitors = <a class=\"code\" href=\"group__monitor.html#ga3fba51c8bd36491d4712aa5bd074a537\">glfwGetMonitors</a>(&amp;count);</div>\n</div><!-- fragment --><p>The primary monitor is always the first monitor in the returned array, but other monitors may be moved to a different index when a monitor is connected or disconnected.</p>\n<h2><a class=\"anchor\" id=\"monitor_event\"></a>\nMonitor configuration changes</h2>\n<p>If you wish to be notified when a monitor is connected or disconnected, set a monitor callback.</p>\n<div class=\"fragment\"><div class=\"line\"><a class=\"code\" href=\"group__monitor.html#gab39df645587c8518192aa746c2fb06c3\">glfwSetMonitorCallback</a>(monitor_callback);</div>\n</div><!-- fragment --><p>The callback function receives the handle for the monitor that has been connected or disconnected and the event that occurred.</p>\n<div class=\"fragment\"><div class=\"line\"><span class=\"keywordtype\">void</span> monitor_callback(<a class=\"code\" href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a>* monitor, <span class=\"keywordtype\">int</span> event)</div>\n<div class=\"line\">{</div>\n<div class=\"line\">    <span class=\"keywordflow\">if</span> (event == <a class=\"code\" href=\"glfw3_8h.html#abe11513fd1ffbee5bb9b173f06028b9e\">GLFW_CONNECTED</a>)</div>\n<div class=\"line\">    {</div>\n<div class=\"line\">        <span class=\"comment\">// The monitor was connected</span></div>\n<div class=\"line\">    }</div>\n<div class=\"line\">    <span class=\"keywordflow\">else</span> <span class=\"keywordflow\">if</span> (event == <a class=\"code\" href=\"glfw3_8h.html#aab64b25921ef21d89252d6f0a71bfc32\">GLFW_DISCONNECTED</a>)</div>\n<div class=\"line\">    {</div>\n<div class=\"line\">        <span class=\"comment\">// The monitor was disconnected</span></div>\n<div class=\"line\">    }</div>\n<div class=\"line\">}</div>\n</div><!-- fragment --><p>If a monitor is disconnected, all windows that are full screen on it will be switched to windowed mode before the callback is called. Only <a class=\"el\" href=\"group__monitor.html#ga79a34ee22ff080ca954a9663e4679daf\">glfwGetMonitorName</a> and <a class=\"el\" href=\"group__monitor.html#gac2d4209016b049222877f620010ed0d8\">glfwGetMonitorUserPointer</a> will return useful values for a disconnected monitor and only before the monitor callback returns.</p>\n<h1><a class=\"anchor\" id=\"monitor_properties\"></a>\nMonitor properties</h1>\n<p>Each monitor has a current video mode, a list of supported video modes, a virtual position, a content scale, a human-readable name, a user pointer, an estimated physical size and a gamma ramp.</p>\n<h2><a class=\"anchor\" id=\"monitor_modes\"></a>\nVideo modes</h2>\n<p>GLFW generally does a good job selecting a suitable video mode when you create a full screen window, change its video mode or make a windowed one full screen, but it is sometimes useful to know exactly which video modes are supported.</p>\n<p>Video modes are represented as <a class=\"el\" href=\"structGLFWvidmode.html\">GLFWvidmode</a> structures. You can get an array of the video modes supported by a monitor with <a class=\"el\" href=\"group__monitor.html#ga820b0ce9a5237d645ea7cbb4bd383458\">glfwGetVideoModes</a>. See the reference documentation for the lifetime of the returned array.</p>\n<div class=\"fragment\"><div class=\"line\"><span class=\"keywordtype\">int</span> count;</div>\n<div class=\"line\"><a class=\"code\" href=\"structGLFWvidmode.html\">GLFWvidmode</a>* modes = <a class=\"code\" href=\"group__monitor.html#ga820b0ce9a5237d645ea7cbb4bd383458\">glfwGetVideoModes</a>(monitor, &amp;count);</div>\n</div><!-- fragment --><p>To get the current video mode of a monitor call <a class=\"el\" href=\"group__monitor.html#gafc1bb972a921ad5b3bd5d63a95fc2d52\">glfwGetVideoMode</a>. See the reference documentation for the lifetime of the returned pointer.</p>\n<div class=\"fragment\"><div class=\"line\"><span class=\"keyword\">const</span> <a class=\"code\" href=\"structGLFWvidmode.html\">GLFWvidmode</a>* mode = <a class=\"code\" href=\"group__monitor.html#gafc1bb972a921ad5b3bd5d63a95fc2d52\">glfwGetVideoMode</a>(monitor);</div>\n</div><!-- fragment --><p>The resolution of a video mode is specified in <a class=\"el\" href=\"intro_guide.html#coordinate_systems\">screen coordinates</a>, not pixels.</p>\n<h2><a class=\"anchor\" id=\"monitor_size\"></a>\nPhysical size</h2>\n<p>The physical size of a monitor in millimetres, or an estimation of it, can be retrieved with <a class=\"el\" href=\"group__monitor.html#ga7d8bffc6c55539286a6bd20d32a8d7ea\">glfwGetMonitorPhysicalSize</a>. This has no relation to its current <em>resolution</em>, i.e. the width and height of its current <a class=\"el\" href=\"monitor_guide.html#monitor_modes\">video mode</a>.</p>\n<div class=\"fragment\"><div class=\"line\"><span class=\"keywordtype\">int</span> width_mm, height_mm;</div>\n<div class=\"line\"><a class=\"code\" href=\"group__monitor.html#ga7d8bffc6c55539286a6bd20d32a8d7ea\">glfwGetMonitorPhysicalSize</a>(monitor, &amp;width_mm, &amp;height_mm);</div>\n</div><!-- fragment --><p>While this can be used to calculate the raw DPI of a monitor, this is often not useful. Instead use the <a class=\"el\" href=\"monitor_guide.html#monitor_scale\">monitor content scale</a> and <a class=\"el\" href=\"window_guide.html#window_scale\">window content scale</a> to scale your content.</p>\n<h2><a class=\"anchor\" id=\"monitor_scale\"></a>\nContent scale</h2>\n<p>The content scale for a monitor can be retrieved with <a class=\"el\" href=\"group__monitor.html#gad3152e84465fa620b601265ebfcdb21b\">glfwGetMonitorContentScale</a>.</p>\n<div class=\"fragment\"><div class=\"line\"><span class=\"keywordtype\">float</span> xscale, yscale;</div>\n<div class=\"line\"><a class=\"code\" href=\"group__monitor.html#gad3152e84465fa620b601265ebfcdb21b\">glfwGetMonitorContentScale</a>(monitor, &amp;xscale, &amp;yscale);</div>\n</div><!-- fragment --><p>The content scale is the ratio between the current DPI and the platform's default DPI. This is especially important for text and any UI elements. If the pixel dimensions of your UI scaled by this look appropriate on your machine then it should appear at a reasonable size on other machines regardless of their DPI and scaling settings. This relies on the system DPI and scaling settings being somewhat correct.</p>\n<p>The content scale may depend on both the monitor resolution and pixel density and on user settings. It may be very different from the raw DPI calculated from the physical size and current resolution.</p>\n<h2><a class=\"anchor\" id=\"monitor_pos\"></a>\nVirtual position</h2>\n<p>The position of the monitor on the virtual desktop, in <a class=\"el\" href=\"intro_guide.html#coordinate_systems\">screen coordinates</a>, can be retrieved with <a class=\"el\" href=\"group__monitor.html#ga102f54e7acc9149edbcf0997152df8c9\">glfwGetMonitorPos</a>.</p>\n<div class=\"fragment\"><div class=\"line\"><span class=\"keywordtype\">int</span> xpos, ypos;</div>\n<div class=\"line\"><a class=\"code\" href=\"group__monitor.html#ga102f54e7acc9149edbcf0997152df8c9\">glfwGetMonitorPos</a>(monitor, &amp;xpos, &amp;ypos);</div>\n</div><!-- fragment --><h2><a class=\"anchor\" id=\"monitor_workarea\"></a>\nWork area</h2>\n<p>The area of a monitor not occupied by global task bars or menu bars is the work area. This is specified in <a class=\"el\" href=\"intro_guide.html#coordinate_systems\">screen coordinates</a> and can be retrieved with <a class=\"el\" href=\"group__monitor.html#ga7387a3bdb64bfe8ebf2b9e54f5b6c9d0\">glfwGetMonitorWorkarea</a>.</p>\n<div class=\"fragment\"><div class=\"line\"><span class=\"keywordtype\">int</span> xpos, ypos, width, height;</div>\n<div class=\"line\"><a class=\"code\" href=\"group__monitor.html#ga7387a3bdb64bfe8ebf2b9e54f5b6c9d0\">glfwGetMonitorWorkarea</a>(monitor, &amp;xpos, &amp;ypos, &amp;width, &amp;height);</div>\n</div><!-- fragment --><h2><a class=\"anchor\" id=\"monitor_name\"></a>\nHuman-readable name</h2>\n<p>The human-readable, UTF-8 encoded name of a monitor is returned by <a class=\"el\" href=\"group__monitor.html#ga79a34ee22ff080ca954a9663e4679daf\">glfwGetMonitorName</a>. See the reference documentation for the lifetime of the returned string.</p>\n<div class=\"fragment\"><div class=\"line\"><span class=\"keyword\">const</span> <span class=\"keywordtype\">char</span>* name = <a class=\"code\" href=\"group__monitor.html#ga79a34ee22ff080ca954a9663e4679daf\">glfwGetMonitorName</a>(monitor);</div>\n</div><!-- fragment --><p>Monitor names are not guaranteed to be unique. Two monitors of the same model and make may have the same name. Only the monitor handle is guaranteed to be unique, and only until that monitor is disconnected.</p>\n<h2><a class=\"anchor\" id=\"monitor_userptr\"></a>\nUser pointer</h2>\n<p>Each monitor has a user pointer that can be set with <a class=\"el\" href=\"group__monitor.html#ga702750e24313a686d3637297b6e85fda\">glfwSetMonitorUserPointer</a> and queried with <a class=\"el\" href=\"group__monitor.html#gac2d4209016b049222877f620010ed0d8\">glfwGetMonitorUserPointer</a>. This can be used for any purpose you need and will not be modified by GLFW. The value will be kept until the monitor is disconnected or until the library is terminated.</p>\n<p>The initial value of the pointer is <code>NULL</code>.</p>\n<h2><a class=\"anchor\" id=\"monitor_gamma\"></a>\nGamma ramp</h2>\n<p>The gamma ramp of a monitor can be set with <a class=\"el\" href=\"group__monitor.html#ga583f0ffd0d29613d8cd172b996bbf0dd\">glfwSetGammaRamp</a>, which accepts a monitor handle and a pointer to a <a class=\"el\" href=\"structGLFWgammaramp.html\">GLFWgammaramp</a> structure.</p>\n<div class=\"fragment\"><div class=\"line\"><a class=\"code\" href=\"structGLFWgammaramp.html\">GLFWgammaramp</a> ramp;</div>\n<div class=\"line\"><span class=\"keywordtype\">unsigned</span> <span class=\"keywordtype\">short</span> red[256], green[256], blue[256];</div>\n<div class=\"line\"> </div>\n<div class=\"line\">ramp.<a class=\"code\" href=\"structGLFWgammaramp.html#ad620e1cffbff9a32c51bca46301b59a5\">size</a> = 256;</div>\n<div class=\"line\">ramp.<a class=\"code\" href=\"structGLFWgammaramp.html#a2cce5d968734b685623eef913e635138\">red</a> = red;</div>\n<div class=\"line\">ramp.<a class=\"code\" href=\"structGLFWgammaramp.html#affccc6f5df47820b6562d709da3a5a3a\">green</a> = green;</div>\n<div class=\"line\">ramp.<a class=\"code\" href=\"structGLFWgammaramp.html#acf0c836d0efe29c392fe8d1a1042744b\">blue</a> = blue;</div>\n<div class=\"line\"> </div>\n<div class=\"line\"><span class=\"keywordflow\">for</span> (i = 0;  i &lt; ramp.<a class=\"code\" href=\"structGLFWgammaramp.html#ad620e1cffbff9a32c51bca46301b59a5\">size</a>;  i++)</div>\n<div class=\"line\">{</div>\n<div class=\"line\">    <span class=\"comment\">// Fill out gamma ramp arrays as desired</span></div>\n<div class=\"line\">}</div>\n<div class=\"line\"> </div>\n<div class=\"line\"><a class=\"code\" href=\"group__monitor.html#ga583f0ffd0d29613d8cd172b996bbf0dd\">glfwSetGammaRamp</a>(monitor, &amp;ramp);</div>\n</div><!-- fragment --><p>The gamma ramp data is copied before the function returns, so there is no need to keep it around once the ramp has been set.</p>\n<p>It is recommended that your gamma ramp have the same size as the current gamma ramp for that monitor.</p>\n<p>The current gamma ramp for a monitor is returned by <a class=\"el\" href=\"group__monitor.html#gab7c41deb2219bde3e1eb756ddaa9ec80\">glfwGetGammaRamp</a>. See the reference documentation for the lifetime of the returned structure.</p>\n<div class=\"fragment\"><div class=\"line\"><span class=\"keyword\">const</span> <a class=\"code\" href=\"structGLFWgammaramp.html\">GLFWgammaramp</a>* ramp = <a class=\"code\" href=\"group__monitor.html#gab7c41deb2219bde3e1eb756ddaa9ec80\">glfwGetGammaRamp</a>(monitor);</div>\n</div><!-- fragment --><p>If you wish to set a regular gamma ramp, you can have GLFW calculate it for you from the desired exponent with <a class=\"el\" href=\"group__monitor.html#ga6ac582625c990220785ddd34efa3169a\">glfwSetGamma</a>, which in turn calls <a class=\"el\" href=\"group__monitor.html#ga583f0ffd0d29613d8cd172b996bbf0dd\">glfwSetGammaRamp</a> with the resulting ramp.</p>\n<div class=\"fragment\"><div class=\"line\"><a class=\"code\" href=\"group__monitor.html#ga6ac582625c990220785ddd34efa3169a\">glfwSetGamma</a>(monitor, 1.0);</div>\n</div><!-- fragment --><p>To experiment with gamma correction via the <a class=\"el\" href=\"group__monitor.html#ga6ac582625c990220785ddd34efa3169a\">glfwSetGamma</a> function, run the <code>gamma</code> test program.</p>\n<dl class=\"section note\"><dt>Note</dt><dd>The software controlled gamma ramp is applied <em>in addition</em> to the hardware gamma correction, which today is usually an approximation of sRGB gamma. This means that setting a perfectly linear ramp, or gamma 1.0, will produce the default (usually sRGB-like) behavior. </dd></dl>\n</div></div><!-- contents -->\n</div><!-- PageDoc -->\n<div class=\"ttc\" id=\"agroup__monitor_html_gad3152e84465fa620b601265ebfcdb21b\"><div class=\"ttname\"><a href=\"group__monitor.html#gad3152e84465fa620b601265ebfcdb21b\">glfwGetMonitorContentScale</a></div><div class=\"ttdeci\">void glfwGetMonitorContentScale(GLFWmonitor *monitor, float *xscale, float *yscale)</div><div class=\"ttdoc\">Retrieves the content scale for the specified monitor.</div></div>\n<div class=\"ttc\" id=\"agroup__monitor_html_gab39df645587c8518192aa746c2fb06c3\"><div class=\"ttname\"><a href=\"group__monitor.html#gab39df645587c8518192aa746c2fb06c3\">glfwSetMonitorCallback</a></div><div class=\"ttdeci\">GLFWmonitorfun glfwSetMonitorCallback(GLFWmonitorfun callback)</div><div class=\"ttdoc\">Sets the monitor configuration callback.</div></div>\n<div class=\"ttc\" id=\"astructGLFWgammaramp_html\"><div class=\"ttname\"><a href=\"structGLFWgammaramp.html\">GLFWgammaramp</a></div><div class=\"ttdoc\">Gamma ramp.</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:1658</div></div>\n<div class=\"ttc\" id=\"agroup__monitor_html_ga7387a3bdb64bfe8ebf2b9e54f5b6c9d0\"><div class=\"ttname\"><a href=\"group__monitor.html#ga7387a3bdb64bfe8ebf2b9e54f5b6c9d0\">glfwGetMonitorWorkarea</a></div><div class=\"ttdeci\">void glfwGetMonitorWorkarea(GLFWmonitor *monitor, int *xpos, int *ypos, int *width, int *height)</div><div class=\"ttdoc\">Retrieves the work area of the monitor.</div></div>\n<div class=\"ttc\" id=\"agroup__monitor_html_ga583f0ffd0d29613d8cd172b996bbf0dd\"><div class=\"ttname\"><a href=\"group__monitor.html#ga583f0ffd0d29613d8cd172b996bbf0dd\">glfwSetGammaRamp</a></div><div class=\"ttdeci\">void glfwSetGammaRamp(GLFWmonitor *monitor, const GLFWgammaramp *ramp)</div><div class=\"ttdoc\">Sets the current gamma ramp for the specified monitor.</div></div>\n<div class=\"ttc\" id=\"agroup__monitor_html_ga79a34ee22ff080ca954a9663e4679daf\"><div class=\"ttname\"><a href=\"group__monitor.html#ga79a34ee22ff080ca954a9663e4679daf\">glfwGetMonitorName</a></div><div class=\"ttdeci\">const char * glfwGetMonitorName(GLFWmonitor *monitor)</div><div class=\"ttdoc\">Returns the name of the specified monitor.</div></div>\n<div class=\"ttc\" id=\"agroup__monitor_html_ga721867d84c6d18d6790d64d2847ca0b1\"><div class=\"ttname\"><a href=\"group__monitor.html#ga721867d84c6d18d6790d64d2847ca0b1\">glfwGetPrimaryMonitor</a></div><div class=\"ttdeci\">GLFWmonitor * glfwGetPrimaryMonitor(void)</div><div class=\"ttdoc\">Returns the primary monitor.</div></div>\n<div class=\"ttc\" id=\"agroup__monitor_html_ga3fba51c8bd36491d4712aa5bd074a537\"><div class=\"ttname\"><a href=\"group__monitor.html#ga3fba51c8bd36491d4712aa5bd074a537\">glfwGetMonitors</a></div><div class=\"ttdeci\">GLFWmonitor ** glfwGetMonitors(int *count)</div><div class=\"ttdoc\">Returns the currently connected monitors.</div></div>\n<div class=\"ttc\" id=\"agroup__monitor_html_ga820b0ce9a5237d645ea7cbb4bd383458\"><div class=\"ttname\"><a href=\"group__monitor.html#ga820b0ce9a5237d645ea7cbb4bd383458\">glfwGetVideoModes</a></div><div class=\"ttdeci\">const GLFWvidmode * glfwGetVideoModes(GLFWmonitor *monitor, int *count)</div><div class=\"ttdoc\">Returns the available video modes for the specified monitor.</div></div>\n<div class=\"ttc\" id=\"astructGLFWgammaramp_html_affccc6f5df47820b6562d709da3a5a3a\"><div class=\"ttname\"><a href=\"structGLFWgammaramp.html#affccc6f5df47820b6562d709da3a5a3a\">GLFWgammaramp::green</a></div><div class=\"ttdeci\">unsigned short * green</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:1665</div></div>\n<div class=\"ttc\" id=\"aglfw3_8h_html_aab64b25921ef21d89252d6f0a71bfc32\"><div class=\"ttname\"><a href=\"glfw3_8h.html#aab64b25921ef21d89252d6f0a71bfc32\">GLFW_DISCONNECTED</a></div><div class=\"ttdeci\">#define GLFW_DISCONNECTED</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:1075</div></div>\n<div class=\"ttc\" id=\"agroup__monitor_html_ga102f54e7acc9149edbcf0997152df8c9\"><div class=\"ttname\"><a href=\"group__monitor.html#ga102f54e7acc9149edbcf0997152df8c9\">glfwGetMonitorPos</a></div><div class=\"ttdeci\">void glfwGetMonitorPos(GLFWmonitor *monitor, int *xpos, int *ypos)</div><div class=\"ttdoc\">Returns the position of the monitor's viewport on the virtual screen.</div></div>\n<div class=\"ttc\" id=\"astructGLFWgammaramp_html_ad620e1cffbff9a32c51bca46301b59a5\"><div class=\"ttname\"><a href=\"structGLFWgammaramp.html#ad620e1cffbff9a32c51bca46301b59a5\">GLFWgammaramp::size</a></div><div class=\"ttdeci\">unsigned int size</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:1671</div></div>\n<div class=\"ttc\" id=\"astructGLFWgammaramp_html_a2cce5d968734b685623eef913e635138\"><div class=\"ttname\"><a href=\"structGLFWgammaramp.html#a2cce5d968734b685623eef913e635138\">GLFWgammaramp::red</a></div><div class=\"ttdeci\">unsigned short * red</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:1662</div></div>\n<div class=\"ttc\" id=\"agroup__monitor_html_ga7d8bffc6c55539286a6bd20d32a8d7ea\"><div class=\"ttname\"><a href=\"group__monitor.html#ga7d8bffc6c55539286a6bd20d32a8d7ea\">glfwGetMonitorPhysicalSize</a></div><div class=\"ttdeci\">void glfwGetMonitorPhysicalSize(GLFWmonitor *monitor, int *widthMM, int *heightMM)</div><div class=\"ttdoc\">Returns the physical size of the monitor.</div></div>\n<div class=\"ttc\" id=\"agroup__monitor_html_gab7c41deb2219bde3e1eb756ddaa9ec80\"><div class=\"ttname\"><a href=\"group__monitor.html#gab7c41deb2219bde3e1eb756ddaa9ec80\">glfwGetGammaRamp</a></div><div class=\"ttdeci\">const GLFWgammaramp * glfwGetGammaRamp(GLFWmonitor *monitor)</div><div class=\"ttdoc\">Returns the current gamma ramp for the specified monitor.</div></div>\n<div class=\"ttc\" id=\"aglfw3_8h_html_abe11513fd1ffbee5bb9b173f06028b9e\"><div class=\"ttname\"><a href=\"glfw3_8h.html#abe11513fd1ffbee5bb9b173f06028b9e\">GLFW_CONNECTED</a></div><div class=\"ttdeci\">#define GLFW_CONNECTED</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:1074</div></div>\n<div class=\"ttc\" id=\"astructGLFWgammaramp_html_acf0c836d0efe29c392fe8d1a1042744b\"><div class=\"ttname\"><a href=\"structGLFWgammaramp.html#acf0c836d0efe29c392fe8d1a1042744b\">GLFWgammaramp::blue</a></div><div class=\"ttdeci\">unsigned short * blue</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:1668</div></div>\n<div class=\"ttc\" id=\"astructGLFWvidmode_html\"><div class=\"ttname\"><a href=\"structGLFWvidmode.html\">GLFWvidmode</a></div><div class=\"ttdoc\">Video mode type.</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:1624</div></div>\n<div class=\"ttc\" id=\"agroup__monitor_html_ga6ac582625c990220785ddd34efa3169a\"><div class=\"ttname\"><a href=\"group__monitor.html#ga6ac582625c990220785ddd34efa3169a\">glfwSetGamma</a></div><div class=\"ttdeci\">void glfwSetGamma(GLFWmonitor *monitor, float gamma)</div><div class=\"ttdoc\">Generates a gamma ramp and sets it for the specified monitor.</div></div>\n<div class=\"ttc\" id=\"agroup__monitor_html_gafc1bb972a921ad5b3bd5d63a95fc2d52\"><div class=\"ttname\"><a href=\"group__monitor.html#gafc1bb972a921ad5b3bd5d63a95fc2d52\">glfwGetVideoMode</a></div><div class=\"ttdeci\">const GLFWvidmode * glfwGetVideoMode(GLFWmonitor *monitor)</div><div class=\"ttdoc\">Returns the current mode of the specified monitor.</div></div>\n<div class=\"ttc\" id=\"agroup__monitor_html_ga8d9efd1cde9426692c73fe40437d0ae3\"><div class=\"ttname\"><a href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a></div><div class=\"ttdeci\">struct GLFWmonitor GLFWmonitor</div><div class=\"ttdoc\">Opaque monitor object.</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:1140</div></div>\n<address class=\"footer\">\n<p>\nLast update on Mon Jan 20 2020 for GLFW 3.3.2\n</p>\n</address>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/moving_8dox.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta http-equiv=\"X-UA-Compatible\" content=\"IE=9\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<title>GLFW: moving.dox File Reference</title>\n<link href=\"tabs.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"jquery.js\"></script>\n<script type=\"text/javascript\" src=\"dynsections.js\"></script>\n<link href=\"search/search.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"search/searchdata.js\"></script>\n<script type=\"text/javascript\" src=\"search/search.js\"></script>\n<link href=\"doxygen.css\" rel=\"stylesheet\" type=\"text/css\" />\n<link href=\"extra.css\" rel=\"stylesheet\" type=\"text/css\"/>\n</head>\n<body>\n<div id=\"top\"><!-- do not remove this div, it is closed by doxygen! -->\n<div id=\"titlearea\">\n\t<div class=\"glfwheader\">\n\t\t<a href=\"https://www.glfw.org/\" id=\"glfwhome\">GLFW</a>\n\t\t<ul class=\"glfwnavbar\">\n\t\t\t<li><a href=\"https://www.glfw.org/documentation.html\">Documentation</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/download.html\">Download</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/community.html\">Community</a></li>\n\t\t</ul>\n\t</div>\n</div>\n<!-- end header part -->\n<!-- Generated by Doxygen 1.8.16 -->\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\nvar searchBox = new SearchBox(\"searchBox\", \"search\",false,'Search');\n/* @license-end */\n</script>\n<script type=\"text/javascript\" src=\"menudata.js\"></script>\n<script type=\"text/javascript\" src=\"menu.js\"></script>\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\n$(function() {\n  initMenu('',true,false,'search.php','Search');\n  $(document).ready(function() { init_search(); });\n});\n/* @license-end */</script>\n<div id=\"main-nav\"></div>\n<!-- window showing the filter options -->\n<div id=\"MSearchSelectWindow\"\n     onmouseover=\"return searchBox.OnSearchSelectShow()\"\n     onmouseout=\"return searchBox.OnSearchSelectHide()\"\n     onkeydown=\"return searchBox.OnSearchSelectKey(event)\">\n</div>\n\n<!-- iframe showing the search results (closed by default) -->\n<div id=\"MSearchResultsWindow\">\n<iframe src=\"javascript:void(0)\" frameborder=\"0\" \n        name=\"MSearchResults\" id=\"MSearchResults\">\n</iframe>\n</div>\n\n</div><!-- top -->\n<div class=\"header\">\n  <div class=\"headertitle\">\n<div class=\"title\">moving.dox File Reference</div>  </div>\n</div><!--header-->\n<div class=\"contents\">\n</div><!-- contents -->\n<address class=\"footer\">\n<p>\nLast update on Mon Jan 20 2020 for GLFW 3.3.2\n</p>\n</address>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/moving_guide.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta http-equiv=\"X-UA-Compatible\" content=\"IE=9\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<title>GLFW: Moving from GLFW 2 to 3</title>\n<link href=\"tabs.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"jquery.js\"></script>\n<script type=\"text/javascript\" src=\"dynsections.js\"></script>\n<link href=\"search/search.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"search/searchdata.js\"></script>\n<script type=\"text/javascript\" src=\"search/search.js\"></script>\n<link href=\"doxygen.css\" rel=\"stylesheet\" type=\"text/css\" />\n<link href=\"extra.css\" rel=\"stylesheet\" type=\"text/css\"/>\n</head>\n<body>\n<div id=\"top\"><!-- do not remove this div, it is closed by doxygen! -->\n<div id=\"titlearea\">\n\t<div class=\"glfwheader\">\n\t\t<a href=\"https://www.glfw.org/\" id=\"glfwhome\">GLFW</a>\n\t\t<ul class=\"glfwnavbar\">\n\t\t\t<li><a href=\"https://www.glfw.org/documentation.html\">Documentation</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/download.html\">Download</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/community.html\">Community</a></li>\n\t\t</ul>\n\t</div>\n</div>\n<!-- end header part -->\n<!-- Generated by Doxygen 1.8.16 -->\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\nvar searchBox = new SearchBox(\"searchBox\", \"search\",false,'Search');\n/* @license-end */\n</script>\n<script type=\"text/javascript\" src=\"menudata.js\"></script>\n<script type=\"text/javascript\" src=\"menu.js\"></script>\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\n$(function() {\n  initMenu('',true,false,'search.php','Search');\n  $(document).ready(function() { init_search(); });\n});\n/* @license-end */</script>\n<div id=\"main-nav\"></div>\n<!-- window showing the filter options -->\n<div id=\"MSearchSelectWindow\"\n     onmouseover=\"return searchBox.OnSearchSelectShow()\"\n     onmouseout=\"return searchBox.OnSearchSelectHide()\"\n     onkeydown=\"return searchBox.OnSearchSelectKey(event)\">\n</div>\n\n<!-- iframe showing the search results (closed by default) -->\n<div id=\"MSearchResultsWindow\">\n<iframe src=\"javascript:void(0)\" frameborder=\"0\" \n        name=\"MSearchResults\" id=\"MSearchResults\">\n</iframe>\n</div>\n\n</div><!-- top -->\n<div class=\"PageDoc\"><div class=\"header\">\n  <div class=\"headertitle\">\n<div class=\"title\">Moving from GLFW 2 to 3 </div>  </div>\n</div><!--header-->\n<div class=\"contents\">\n<div class=\"toc\"><h3>Table of Contents</h3>\n<ul><li class=\"level1\"><a href=\"#moving_removed\">Changed and removed features</a><ul><li class=\"level2\"><a href=\"#moving_renamed_files\">Renamed library and header file</a></li>\n<li class=\"level2\"><a href=\"#moving_threads\">Removal of threading functions</a></li>\n<li class=\"level2\"><a href=\"#moving_image\">Removal of image and texture loading</a></li>\n<li class=\"level2\"><a href=\"#moving_stdcall\">Removal of GLFWCALL macro</a></li>\n<li class=\"level2\"><a href=\"#moving_window_handles\">Window handle parameters</a></li>\n<li class=\"level2\"><a href=\"#moving_monitor\">Explicit monitor selection</a></li>\n<li class=\"level2\"><a href=\"#moving_autopoll\">Removal of automatic event polling</a></li>\n<li class=\"level2\"><a href=\"#moving_context\">Explicit context management</a></li>\n<li class=\"level2\"><a href=\"#moving_hidpi\">Separation of window and framebuffer sizes</a></li>\n<li class=\"level2\"><a href=\"#moving_window_close\">Window closing changes</a></li>\n<li class=\"level2\"><a href=\"#moving_hints\">Persistent window hints</a></li>\n<li class=\"level2\"><a href=\"#moving_video_modes\">Video mode enumeration</a></li>\n<li class=\"level2\"><a href=\"#moving_char_up\">Removal of character actions</a></li>\n<li class=\"level2\"><a href=\"#moving_cursorpos\">Cursor position changes</a></li>\n<li class=\"level2\"><a href=\"#moving_wheel\">Wheel position replaced by scroll offsets</a></li>\n<li class=\"level2\"><a href=\"#moving_repeat\">Key repeat action</a></li>\n<li class=\"level2\"><a href=\"#moving_keys\">Physical key input</a></li>\n<li class=\"level2\"><a href=\"#moving_joystick\">Joystick function changes</a></li>\n<li class=\"level2\"><a href=\"#moving_mbcs\">Win32 MBCS support</a></li>\n<li class=\"level2\"><a href=\"#moving_windows\">Support for versions of Windows older than XP</a></li>\n<li class=\"level2\"><a href=\"#moving_syskeys\">Capture of system-wide hotkeys</a></li>\n<li class=\"level2\"><a href=\"#moving_terminate\">Automatic termination</a></li>\n<li class=\"level2\"><a href=\"#moving_glu\">GLU header inclusion</a></li>\n</ul>\n</li>\n<li class=\"level1\"><a href=\"#moving_tables\">Name change tables</a><ul><li class=\"level2\"><a href=\"#moving_renamed_functions\">Renamed functions</a></li>\n<li class=\"level2\"><a href=\"#moving_renamed_types\">Renamed types</a></li>\n<li class=\"level2\"><a href=\"#moving_renamed_tokens\">Renamed tokens</a></li>\n</ul>\n</li>\n</ul>\n</div>\n<div class=\"textblock\"><p>This is a transition guide for moving from GLFW 2 to 3. It describes what has changed or been removed, but does <em>not</em> include <a class=\"el\" href=\"news.html\">new features</a> unless they are required when moving an existing code base onto the new API. For example, the new multi-monitor functions are required to create full screen windows with GLFW 3.</p>\n<h1><a class=\"anchor\" id=\"moving_removed\"></a>\nChanged and removed features</h1>\n<h2><a class=\"anchor\" id=\"moving_renamed_files\"></a>\nRenamed library and header file</h2>\n<p>The GLFW 3 header is named <a class=\"el\" href=\"glfw3_8h.html\">glfw3.h</a> and moved to the <code>GLFW</code> directory, to avoid collisions with the headers of other major versions. Similarly, the GLFW 3 library is named <code>glfw3,</code> except when it's installed as a shared library on Unix-like systems, where it uses the <a href=\"https://en.wikipedia.org/wiki/soname\">soname</a> <code>libglfw.so.3</code>.</p>\n<dl class=\"section user\"><dt>Old syntax</dt><dd><div class=\"fragment\"><div class=\"line\"><span class=\"preprocessor\">#include &lt;GL/glfw.h&gt;</span></div>\n</div><!-- fragment --></dd></dl>\n<dl class=\"section user\"><dt>New syntax</dt><dd><div class=\"fragment\"><div class=\"line\"><span class=\"preprocessor\">#include &lt;<a class=\"code\" href=\"glfw3_8h.html\">GLFW/glfw3.h</a>&gt;</span></div>\n</div><!-- fragment --></dd></dl>\n<h2><a class=\"anchor\" id=\"moving_threads\"></a>\nRemoval of threading functions</h2>\n<p>The threading functions have been removed, including the per-thread sleep function. They were fairly primitive, under-used, poorly integrated and took time away from the focus of GLFW (i.e. context, input and window). There are better threading libraries available and native threading support is available in both <a href=\"https://en.cppreference.com/w/cpp/thread\">C++11</a> and <a href=\"https://en.cppreference.com/w/c/thread\">C11</a>, both of which are gaining traction.</p>\n<p>If you wish to use the C++11 or C11 facilities but your compiler doesn't yet support them, see the <a href=\"https://gitorious.org/tinythread/tinythreadpp\">TinyThread++</a> and <a href=\"https://github.com/tinycthread/tinycthread\">TinyCThread</a> projects created by the original author of GLFW. These libraries implement a usable subset of the threading APIs in C++11 and C11, and in fact some GLFW 3 test programs use TinyCThread.</p>\n<p>However, GLFW 3 has better support for <em>use from multiple threads</em> than GLFW 2 had. Contexts can be made current on any thread, although only a single thread at a time, and the documentation explicitly states which functions may be used from any thread and which must only be used from the main thread.</p>\n<dl class=\"section user\"><dt>Removed functions</dt><dd><code>glfwSleep</code>, <code>glfwCreateThread</code>, <code>glfwDestroyThread</code>, <code>glfwWaitThread</code>, <code>glfwGetThreadID</code>, <code>glfwCreateMutex</code>, <code>glfwDestroyMutex</code>, <code>glfwLockMutex</code>, <code>glfwUnlockMutex</code>, <code>glfwCreateCond</code>, <code>glfwDestroyCond</code>, <code>glfwWaitCond</code>, <code>glfwSignalCond</code>, <code>glfwBroadcastCond</code> and <code>glfwGetNumberOfProcessors</code>.</dd></dl>\n<dl class=\"section user\"><dt>Removed types</dt><dd><code>GLFWthreadfun</code></dd></dl>\n<h2><a class=\"anchor\" id=\"moving_image\"></a>\nRemoval of image and texture loading</h2>\n<p>The image and texture loading functions have been removed. They only supported the Targa image format, making them mostly useful for beginner level examples. To become of sufficiently high quality to warrant keeping them in GLFW 3, they would need not only to support other formats, but also modern extensions to OpenGL texturing. This would either add a number of external dependencies (libjpeg, libpng, etc.), or force GLFW to ship with inline versions of these libraries.</p>\n<p>As there already are libraries doing this, it is unnecessary both to duplicate the work and to tie the duplicate to GLFW. The resulting library would also be platform-independent, as both OpenGL and stdio are available wherever GLFW is.</p>\n<dl class=\"section user\"><dt>Removed functions</dt><dd><code>glfwReadImage</code>, <code>glfwReadMemoryImage</code>, <code>glfwFreeImage</code>, <code>glfwLoadTexture2D</code>, <code>glfwLoadMemoryTexture2D</code> and <code>glfwLoadTextureImage2D</code>.</dd></dl>\n<h2><a class=\"anchor\" id=\"moving_stdcall\"></a>\nRemoval of GLFWCALL macro</h2>\n<p>The <code>GLFWCALL</code> macro, which made callback functions use <a href=\"https://msdn.microsoft.com/en-us/library/zxk0tw93.aspx\">__stdcall</a> on Windows, has been removed. GLFW is written in C, not Pascal. Removing this macro means there's one less thing for application programmers to remember, i.e. the requirement to mark all callback functions with <code>GLFWCALL</code>. It also simplifies the creation of DLLs and DLL link libraries, as there's no need to explicitly disable <code>@n</code> entry point suffixes.</p>\n<dl class=\"section user\"><dt>Old syntax</dt><dd><div class=\"fragment\"><div class=\"line\"><span class=\"keywordtype\">void</span> GLFWCALL callback_function(...);</div>\n</div><!-- fragment --></dd></dl>\n<dl class=\"section user\"><dt>New syntax</dt><dd><div class=\"fragment\"><div class=\"line\"><span class=\"keywordtype\">void</span> callback_function(...);</div>\n</div><!-- fragment --></dd></dl>\n<h2><a class=\"anchor\" id=\"moving_window_handles\"></a>\nWindow handle parameters</h2>\n<p>Because GLFW 3 supports multiple windows, window handle parameters have been added to all window-related GLFW functions and callbacks. The handle of a newly created window is returned by <a class=\"el\" href=\"group__window.html#ga5c336fddf2cbb5b92f65f10fb6043344\">glfwCreateWindow</a> (formerly <code>glfwOpenWindow</code>). Window handles are pointers to the <a href=\"https://en.wikipedia.org/wiki/Opaque_data_type\">opaque</a> type <a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>.</p>\n<dl class=\"section user\"><dt>Old syntax</dt><dd><div class=\"fragment\"><div class=\"line\"><a class=\"code\" href=\"group__window.html#ga5d877f09e968cef7a360b513306f17ff\">glfwSetWindowTitle</a>(<span class=\"stringliteral\">&quot;New Window Title&quot;</span>);</div>\n</div><!-- fragment --></dd></dl>\n<dl class=\"section user\"><dt>New syntax</dt><dd><div class=\"fragment\"><div class=\"line\"><a class=\"code\" href=\"group__window.html#ga5d877f09e968cef7a360b513306f17ff\">glfwSetWindowTitle</a>(window, <span class=\"stringliteral\">&quot;New Window Title&quot;</span>);</div>\n</div><!-- fragment --></dd></dl>\n<h2><a class=\"anchor\" id=\"moving_monitor\"></a>\nExplicit monitor selection</h2>\n<p>GLFW 3 provides support for multiple monitors. To request a full screen mode window, instead of passing <code>GLFW_FULLSCREEN</code> you specify which monitor you wish the window to use. The <a class=\"el\" href=\"group__monitor.html#ga721867d84c6d18d6790d64d2847ca0b1\">glfwGetPrimaryMonitor</a> function returns the monitor that GLFW 2 would have selected, but there are many other <a class=\"el\" href=\"monitor_guide.html\">monitor functions</a>. Monitor handles are pointers to the <a href=\"https://en.wikipedia.org/wiki/Opaque_data_type\">opaque</a> type <a class=\"el\" href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a>.</p>\n<dl class=\"section user\"><dt>Old basic full screen</dt><dd><div class=\"fragment\"><div class=\"line\">glfwOpenWindow(640, 480, 8, 8, 8, 0, 24, 0, GLFW_FULLSCREEN);</div>\n</div><!-- fragment --></dd></dl>\n<dl class=\"section user\"><dt>New basic full screen</dt><dd><div class=\"fragment\"><div class=\"line\">window = <a class=\"code\" href=\"group__window.html#ga5c336fddf2cbb5b92f65f10fb6043344\">glfwCreateWindow</a>(640, 480, <span class=\"stringliteral\">&quot;My Window&quot;</span>, <a class=\"code\" href=\"group__monitor.html#ga721867d84c6d18d6790d64d2847ca0b1\">glfwGetPrimaryMonitor</a>(), NULL);</div>\n</div><!-- fragment --></dd></dl>\n<dl class=\"section note\"><dt>Note</dt><dd>The framebuffer bit depth parameters of <code>glfwOpenWindow</code> have been turned into <a class=\"el\" href=\"window_guide.html#window_hints\">window hints</a>, but as they have been given <a class=\"el\" href=\"window_guide.html#window_hints_values\">sane defaults</a> you rarely need to set these hints.</dd></dl>\n<h2><a class=\"anchor\" id=\"moving_autopoll\"></a>\nRemoval of automatic event polling</h2>\n<p>GLFW 3 does not automatically poll for events in <a class=\"el\" href=\"group__window.html#ga15a5a1ee5b3c2ca6b15ca209a12efd14\">glfwSwapBuffers</a>, meaning you need to call <a class=\"el\" href=\"group__window.html#ga37bd57223967b4211d60ca1a0bf3c832\">glfwPollEvents</a> or <a class=\"el\" href=\"group__window.html#ga554e37d781f0a997656c26b2c56c835e\">glfwWaitEvents</a> yourself. Unlike buffer swap, which acts on a single window, the event processing functions act on all windows at once.</p>\n<dl class=\"section user\"><dt>Old basic main loop</dt><dd><div class=\"fragment\"><div class=\"line\"><span class=\"keywordflow\">while</span> (...)</div>\n<div class=\"line\">{</div>\n<div class=\"line\">    <span class=\"comment\">// Process input</span></div>\n<div class=\"line\">    <span class=\"comment\">// Render output</span></div>\n<div class=\"line\">    <a class=\"code\" href=\"group__window.html#ga15a5a1ee5b3c2ca6b15ca209a12efd14\">glfwSwapBuffers</a>();</div>\n<div class=\"line\">}</div>\n</div><!-- fragment --></dd></dl>\n<dl class=\"section user\"><dt>New basic main loop</dt><dd><div class=\"fragment\"><div class=\"line\"><span class=\"keywordflow\">while</span> (...)</div>\n<div class=\"line\">{</div>\n<div class=\"line\">    <span class=\"comment\">// Process input</span></div>\n<div class=\"line\">    <span class=\"comment\">// Render output</span></div>\n<div class=\"line\">    <a class=\"code\" href=\"group__window.html#ga15a5a1ee5b3c2ca6b15ca209a12efd14\">glfwSwapBuffers</a>(window);</div>\n<div class=\"line\">    <a class=\"code\" href=\"group__window.html#ga37bd57223967b4211d60ca1a0bf3c832\">glfwPollEvents</a>();</div>\n<div class=\"line\">}</div>\n</div><!-- fragment --></dd></dl>\n<h2><a class=\"anchor\" id=\"moving_context\"></a>\nExplicit context management</h2>\n<p>Each GLFW 3 window has its own OpenGL context and only you, the application programmer, can know which context should be current on which thread at any given time. Therefore, GLFW 3 leaves that decision to you.</p>\n<p>This means that you need to call <a class=\"el\" href=\"group__context.html#ga1c04dc242268f827290fe40aa1c91157\">glfwMakeContextCurrent</a> after creating a window before you can call any OpenGL functions.</p>\n<h2><a class=\"anchor\" id=\"moving_hidpi\"></a>\nSeparation of window and framebuffer sizes</h2>\n<p>Window positions and sizes now use screen coordinates, which may not be the same as pixels on machines with high-DPI monitors. This is important as OpenGL uses pixels, not screen coordinates. For example, the rectangle specified with <code>glViewport</code> needs to use pixels. Therefore, framebuffer size functions have been added. You can retrieve the size of the framebuffer of a window with <a class=\"el\" href=\"group__window.html#ga0e2637a4161afb283f5300c7f94785c9\">glfwGetFramebufferSize</a> function. A framebuffer size callback has also been added, which can be set with <a class=\"el\" href=\"group__window.html#gab3fb7c3366577daef18c0023e2a8591f\">glfwSetFramebufferSizeCallback</a>.</p>\n<dl class=\"section user\"><dt>Old basic viewport setup</dt><dd><div class=\"fragment\"><div class=\"line\"><a class=\"code\" href=\"group__window.html#gaeea7cbc03373a41fb51cfbf9f2a5d4c6\">glfwGetWindowSize</a>(&amp;width, &amp;height);</div>\n<div class=\"line\">glViewport(0, 0, width, height);</div>\n</div><!-- fragment --></dd></dl>\n<dl class=\"section user\"><dt>New basic viewport setup</dt><dd><div class=\"fragment\"><div class=\"line\"><a class=\"code\" href=\"group__window.html#ga0e2637a4161afb283f5300c7f94785c9\">glfwGetFramebufferSize</a>(window, &amp;width, &amp;height);</div>\n<div class=\"line\">glViewport(0, 0, width, height);</div>\n</div><!-- fragment --></dd></dl>\n<h2><a class=\"anchor\" id=\"moving_window_close\"></a>\nWindow closing changes</h2>\n<p>The <code>GLFW_OPENED</code> window parameter has been removed. As long as the window has not been destroyed, whether through <a class=\"el\" href=\"group__window.html#gacdf43e51376051d2c091662e9fe3d7b2\">glfwDestroyWindow</a> or <a class=\"el\" href=\"group__init.html#gaaae48c0a18607ea4a4ba951d939f0901\">glfwTerminate</a>, the window is \"open\".</p>\n<p>A user attempting to close a window is now just an event like any other. Unlike GLFW 2, windows and contexts created with GLFW 3 will never be destroyed unless you choose them to be. Each window now has a close flag that is set to <code>GLFW_TRUE</code> when the user attempts to close that window. By default, nothing else happens and the window stays visible. It is then up to you to either destroy the window, take some other action or ignore the request.</p>\n<p>You can query the close flag at any time with <a class=\"el\" href=\"group__window.html#ga24e02fbfefbb81fc45320989f8140ab5\">glfwWindowShouldClose</a> and set it at any time with <a class=\"el\" href=\"group__window.html#ga49c449dde2a6f87d996f4daaa09d6708\">glfwSetWindowShouldClose</a>.</p>\n<dl class=\"section user\"><dt>Old basic main loop</dt><dd><div class=\"fragment\"><div class=\"line\"><span class=\"keywordflow\">while</span> (glfwGetWindowParam(GLFW_OPENED))</div>\n<div class=\"line\">{</div>\n<div class=\"line\">    ...</div>\n<div class=\"line\">}</div>\n</div><!-- fragment --></dd></dl>\n<dl class=\"section user\"><dt>New basic main loop</dt><dd><div class=\"fragment\"><div class=\"line\"><span class=\"keywordflow\">while</span> (!<a class=\"code\" href=\"group__window.html#ga24e02fbfefbb81fc45320989f8140ab5\">glfwWindowShouldClose</a>(window))</div>\n<div class=\"line\">{</div>\n<div class=\"line\">    ...</div>\n<div class=\"line\">}</div>\n</div><!-- fragment --></dd></dl>\n<p>The close callback no longer returns a value. Instead, it is called after the close flag has been set so it can override its value, if it chooses to, before event processing completes. You may however not call <a class=\"el\" href=\"group__window.html#gacdf43e51376051d2c091662e9fe3d7b2\">glfwDestroyWindow</a> from the close callback (or any other window related callback).</p>\n<dl class=\"section user\"><dt>Old syntax</dt><dd><div class=\"fragment\"><div class=\"line\"><span class=\"keywordtype\">int</span> GLFWCALL window_close_callback(<span class=\"keywordtype\">void</span>);</div>\n</div><!-- fragment --></dd></dl>\n<dl class=\"section user\"><dt>New syntax</dt><dd><div class=\"fragment\"><div class=\"line\"><span class=\"keywordtype\">void</span> window_close_callback(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window);</div>\n</div><!-- fragment --></dd></dl>\n<dl class=\"section note\"><dt>Note</dt><dd>GLFW never clears the close flag to <code>GLFW_FALSE</code>, meaning you can use it for other reasons to close the window as well, for example the user choosing Quit from an in-game menu.</dd></dl>\n<h2><a class=\"anchor\" id=\"moving_hints\"></a>\nPersistent window hints</h2>\n<p>The <code>glfwOpenWindowHint</code> function has been renamed to <a class=\"el\" href=\"group__window.html#ga7d9c8c62384b1e2821c4dc48952d2033\">glfwWindowHint</a>.</p>\n<p>Window hints are no longer reset to their default values on window creation, but instead retain their values until modified by <a class=\"el\" href=\"group__window.html#ga7d9c8c62384b1e2821c4dc48952d2033\">glfwWindowHint</a> or <a class=\"el\" href=\"group__window.html#gaa77c4898dfb83344a6b4f76aa16b9a4a\">glfwDefaultWindowHints</a>, or until the library is terminated and re-initialized.</p>\n<h2><a class=\"anchor\" id=\"moving_video_modes\"></a>\nVideo mode enumeration</h2>\n<p>Video mode enumeration is now per-monitor. The <a class=\"el\" href=\"group__monitor.html#ga820b0ce9a5237d645ea7cbb4bd383458\">glfwGetVideoModes</a> function now returns all available modes for a specific monitor instead of requiring you to guess how large an array you need. The <code>glfwGetDesktopMode</code> function, which had poorly defined behavior, has been replaced by <a class=\"el\" href=\"group__monitor.html#gafc1bb972a921ad5b3bd5d63a95fc2d52\">glfwGetVideoMode</a>, which returns the current mode of a monitor.</p>\n<h2><a class=\"anchor\" id=\"moving_char_up\"></a>\nRemoval of character actions</h2>\n<p>The action parameter of the <a class=\"el\" href=\"group__input.html#gabf24451c7ceb1952bc02b17a0d5c3e5f\">character callback</a> has been removed. This was an artefact of the origin of GLFW, i.e. being developed in English by a Swede. However, many keyboard layouts require more than one key to produce characters with diacritical marks. Even the Swedish keyboard layout requires this for uncommon cases like ü.</p>\n<dl class=\"section user\"><dt>Old syntax</dt><dd><div class=\"fragment\"><div class=\"line\"><span class=\"keywordtype\">void</span> GLFWCALL character_callback(<span class=\"keywordtype\">int</span> character, <span class=\"keywordtype\">int</span> action);</div>\n</div><!-- fragment --></dd></dl>\n<dl class=\"section user\"><dt>New syntax</dt><dd><div class=\"fragment\"><div class=\"line\"><span class=\"keywordtype\">void</span> character_callback(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window, <span class=\"keywordtype\">int</span> character);</div>\n</div><!-- fragment --></dd></dl>\n<h2><a class=\"anchor\" id=\"moving_cursorpos\"></a>\nCursor position changes</h2>\n<p>The <code>glfwGetMousePos</code> function has been renamed to <a class=\"el\" href=\"group__input.html#ga01d37b6c40133676b9cea60ca1d7c0cc\">glfwGetCursorPos</a>, <code>glfwSetMousePos</code> to <a class=\"el\" href=\"group__input.html#ga04b03af936d906ca123c8f4ee08b39e7\">glfwSetCursorPos</a> and <code>glfwSetMousePosCallback</code> to <a class=\"el\" href=\"group__input.html#gac1f879ab7435d54d4d79bb469fe225d7\">glfwSetCursorPosCallback</a>.</p>\n<p>The cursor position is now <code>double</code> instead of <code>int</code>, both for the direct functions and for the callback. Some platforms can provide sub-pixel cursor movement and this data is now passed on to the application where available. On platforms where this is not provided, the decimal part is zero.</p>\n<p>GLFW 3 only allows you to position the cursor within a window using <a class=\"el\" href=\"group__input.html#ga04b03af936d906ca123c8f4ee08b39e7\">glfwSetCursorPos</a> (formerly <code>glfwSetMousePos</code>) when that window is active. Unless the window is active, the function fails silently.</p>\n<h2><a class=\"anchor\" id=\"moving_wheel\"></a>\nWheel position replaced by scroll offsets</h2>\n<p>The <code>glfwGetMouseWheel</code> function has been removed. Scrolling is the input of offsets and has no absolute position. The mouse wheel callback has been replaced by a <a class=\"el\" href=\"group__input.html#ga4687e2199c60a18a8dd1da532e6d75c9\">scroll callback</a> that receives two-dimensional floating point scroll offsets. This allows you to receive precise scroll data from for example modern touchpads.</p>\n<dl class=\"section user\"><dt>Old syntax</dt><dd><div class=\"fragment\"><div class=\"line\"><span class=\"keywordtype\">void</span> GLFWCALL mouse_wheel_callback(<span class=\"keywordtype\">int</span> position);</div>\n</div><!-- fragment --></dd></dl>\n<dl class=\"section user\"><dt>New syntax</dt><dd><div class=\"fragment\"><div class=\"line\"><span class=\"keywordtype\">void</span> scroll_callback(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window, <span class=\"keywordtype\">double</span> xoffset, <span class=\"keywordtype\">double</span> yoffset);</div>\n</div><!-- fragment --></dd></dl>\n<dl class=\"section user\"><dt>Removed functions</dt><dd><code>glfwGetMouseWheel</code></dd></dl>\n<h2><a class=\"anchor\" id=\"moving_repeat\"></a>\nKey repeat action</h2>\n<p>The <code>GLFW_KEY_REPEAT</code> enable has been removed and key repeat is always enabled for both keys and characters. A new key action, <code>GLFW_REPEAT</code>, has been added to allow the <a class=\"el\" href=\"group__input.html#ga0192a232a41e4e82948217c8ba94fdfd\">key callback</a> to distinguish an initial key press from a repeat. Note that <a class=\"el\" href=\"group__input.html#gadd341da06bc8d418b4dc3a3518af9ad2\">glfwGetKey</a> still returns only <code>GLFW_PRESS</code> or <code>GLFW_RELEASE</code>.</p>\n<h2><a class=\"anchor\" id=\"moving_keys\"></a>\nPhysical key input</h2>\n<p>GLFW 3 key tokens map to physical keys, unlike in GLFW 2 where they mapped to the values generated by the current keyboard layout. The tokens are named according to the values they would have using the standard US layout, but this is only a convenience, as most programmers are assumed to know that layout. This means that (for example) <code>GLFW_KEY_LEFT_BRACKET</code> is always a single key and is the same key in the same place regardless of what keyboard layouts the users of your program has.</p>\n<p>The key input facility was never meant for text input, although using it that way worked slightly better in GLFW 2. If you were using it to input text, you should be using the character callback instead, on both GLFW 2 and 3. This will give you the characters being input, as opposed to the keys being pressed.</p>\n<p>GLFW 3 has key tokens for all keys on a standard 105 key keyboard, so instead of having to remember whether to check for &lsquo;'a&rsquo;<code>or</code>'A'<code>, you now check for </code>GLFW_KEY_A`.</p>\n<h2><a class=\"anchor\" id=\"moving_joystick\"></a>\nJoystick function changes</h2>\n<p>The <code>glfwGetJoystickPos</code> function has been renamed to <a class=\"el\" href=\"group__input.html#gaa8806536731e92c061bc70bcff6edbd0\">glfwGetJoystickAxes</a>.</p>\n<p>The <code>glfwGetJoystickParam</code> function and the <code>GLFW_PRESENT</code>, <code>GLFW_AXES</code> and <code>GLFW_BUTTONS</code> tokens have been replaced by the <a class=\"el\" href=\"group__input.html#gaed0966cee139d815317f9ffcba64c9f1\">glfwJoystickPresent</a> function as well as axis and button counts returned by the <a class=\"el\" href=\"group__input.html#gaa8806536731e92c061bc70bcff6edbd0\">glfwGetJoystickAxes</a> and <a class=\"el\" href=\"group__input.html#gadb3cbf44af90a1536f519659a53bddd6\">glfwGetJoystickButtons</a> functions.</p>\n<h2><a class=\"anchor\" id=\"moving_mbcs\"></a>\nWin32 MBCS support</h2>\n<p>The Win32 port of GLFW 3 will not compile in <a href=\"https://msdn.microsoft.com/en-us/library/5z097dxa.aspx\">MBCS mode</a>. However, because the use of the Unicode version of the Win32 API doesn't affect the process as a whole, but only those windows created using it, it's perfectly possible to call MBCS functions from other parts of the same application. Therefore, even if an application using GLFW has MBCS mode code, there's no need for GLFW itself to support it.</p>\n<h2><a class=\"anchor\" id=\"moving_windows\"></a>\nSupport for versions of Windows older than XP</h2>\n<p>All explicit support for version of Windows older than XP has been removed. There is no code that actively prevents GLFW 3 from running on these earlier versions, but it uses Win32 functions that those versions lack.</p>\n<p>Windows XP was released in 2001, and by now (January 2015) it has not only replaced almost all earlier versions of Windows, but is itself rapidly being replaced by Windows 7 and 8. The MSDN library doesn't even provide documentation for version older than Windows 2000, making it difficult to maintain compatibility with these versions even if it was deemed worth the effort.</p>\n<p>The Win32 API has also not stood still, and GLFW 3 uses many functions only present on Windows XP or later. Even supporting an OS as new as XP (new from the perspective of GLFW 2, which still supports Windows 95) requires runtime checking for a number of functions that are present only on modern version of Windows.</p>\n<h2><a class=\"anchor\" id=\"moving_syskeys\"></a>\nCapture of system-wide hotkeys</h2>\n<p>The ability to disable and capture system-wide hotkeys like Alt+Tab has been removed. Modern applications, whether they're games, scientific visualisations or something else, are nowadays expected to be good desktop citizens and allow these hotkeys to function even when running in full screen mode.</p>\n<h2><a class=\"anchor\" id=\"moving_terminate\"></a>\nAutomatic termination</h2>\n<p>GLFW 3 does not register <a class=\"el\" href=\"group__init.html#gaaae48c0a18607ea4a4ba951d939f0901\">glfwTerminate</a> with <code>atexit</code> at initialization, because <code>exit</code> calls registered functions from the calling thread and while it is permitted to call <code>exit</code> from any thread, <a class=\"el\" href=\"group__init.html#gaaae48c0a18607ea4a4ba951d939f0901\">glfwTerminate</a> must only be called from the main thread.</p>\n<p>To release all resources allocated by GLFW, you should call <a class=\"el\" href=\"group__init.html#gaaae48c0a18607ea4a4ba951d939f0901\">glfwTerminate</a> yourself, from the main thread, before the program terminates. Note that this destroys all windows not already destroyed with <a class=\"el\" href=\"group__window.html#gacdf43e51376051d2c091662e9fe3d7b2\">glfwDestroyWindow</a>, invalidating any window handles you may still have.</p>\n<h2><a class=\"anchor\" id=\"moving_glu\"></a>\nGLU header inclusion</h2>\n<p>GLFW 3 does not by default include the GLU header and GLU itself has been deprecated by <a href=\"https://en.wikipedia.org/wiki/Khronos_Group\">Khronos</a>. <b>New projects should not use GLU</b>, but if you need it for legacy code that has been moved to GLFW 3, you can request that the GLFW header includes it by defining <a class=\"el\" href=\"build_guide.html#GLFW_INCLUDE_GLU\">GLFW_INCLUDE_GLU</a> before the inclusion of the GLFW header.</p>\n<dl class=\"section user\"><dt>Old syntax</dt><dd><div class=\"fragment\"><div class=\"line\"><span class=\"preprocessor\">#include &lt;GL/glfw.h&gt;</span></div>\n</div><!-- fragment --></dd></dl>\n<dl class=\"section user\"><dt>New syntax</dt><dd><div class=\"fragment\"><div class=\"line\"><span class=\"preprocessor\">#define GLFW_INCLUDE_GLU</span></div>\n<div class=\"line\"><span class=\"preprocessor\">#include &lt;GLFW/glfw3.h&gt;</span></div>\n</div><!-- fragment --></dd></dl>\n<p>There are many libraries that offer replacements for the functionality offered by GLU. For the matrix helper functions, see math libraries like <a href=\"https://github.com/g-truc/glm\">GLM</a> (for C++), <a href=\"https://github.com/datenwolf/linmath.h\">linmath.h</a> (for C) and others. For the tessellation functions, see for example <a href=\"https://github.com/memononen/libtess2\">libtess2</a>.</p>\n<h1><a class=\"anchor\" id=\"moving_tables\"></a>\nName change tables</h1>\n<h2><a class=\"anchor\" id=\"moving_renamed_functions\"></a>\nRenamed functions</h2>\n<table class=\"markdownTable\">\n<tr class=\"markdownTableHead\">\n<th class=\"markdownTableHeadNone\">GLFW 2  </th><th class=\"markdownTableHeadNone\">GLFW 3  </th><th class=\"markdownTableHeadNone\">Notes   </th></tr>\n<tr class=\"markdownTableRowOdd\">\n<td class=\"markdownTableBodyNone\"><code>glfwOpenWindow</code>  </td><td class=\"markdownTableBodyNone\"><a class=\"el\" href=\"group__window.html#ga5c336fddf2cbb5b92f65f10fb6043344\">glfwCreateWindow</a>  </td><td class=\"markdownTableBodyNone\">All channel bit depths are now hints   </td></tr>\n<tr class=\"markdownTableRowEven\">\n<td class=\"markdownTableBodyNone\"><code>glfwCloseWindow</code>  </td><td class=\"markdownTableBodyNone\"><a class=\"el\" href=\"group__window.html#gacdf43e51376051d2c091662e9fe3d7b2\">glfwDestroyWindow</a>  </td><td class=\"markdownTableBodyNone\"></td></tr>\n<tr class=\"markdownTableRowOdd\">\n<td class=\"markdownTableBodyNone\"><code>glfwOpenWindowHint</code>  </td><td class=\"markdownTableBodyNone\"><a class=\"el\" href=\"group__window.html#ga7d9c8c62384b1e2821c4dc48952d2033\">glfwWindowHint</a>  </td><td class=\"markdownTableBodyNone\">Now accepts all <code>GLFW_*_BITS</code> tokens   </td></tr>\n<tr class=\"markdownTableRowEven\">\n<td class=\"markdownTableBodyNone\"><code>glfwEnable</code>  </td><td class=\"markdownTableBodyNone\"><a class=\"el\" href=\"group__input.html#gaa92336e173da9c8834558b54ee80563b\">glfwSetInputMode</a>  </td><td class=\"markdownTableBodyNone\"></td></tr>\n<tr class=\"markdownTableRowOdd\">\n<td class=\"markdownTableBodyNone\"><code>glfwDisable</code>  </td><td class=\"markdownTableBodyNone\"><a class=\"el\" href=\"group__input.html#gaa92336e173da9c8834558b54ee80563b\">glfwSetInputMode</a>  </td><td class=\"markdownTableBodyNone\"></td></tr>\n<tr class=\"markdownTableRowEven\">\n<td class=\"markdownTableBodyNone\"><code>glfwGetMousePos</code>  </td><td class=\"markdownTableBodyNone\"><a class=\"el\" href=\"group__input.html#ga01d37b6c40133676b9cea60ca1d7c0cc\">glfwGetCursorPos</a>  </td><td class=\"markdownTableBodyNone\"></td></tr>\n<tr class=\"markdownTableRowOdd\">\n<td class=\"markdownTableBodyNone\"><code>glfwSetMousePos</code>  </td><td class=\"markdownTableBodyNone\"><a class=\"el\" href=\"group__input.html#ga04b03af936d906ca123c8f4ee08b39e7\">glfwSetCursorPos</a>  </td><td class=\"markdownTableBodyNone\"></td></tr>\n<tr class=\"markdownTableRowEven\">\n<td class=\"markdownTableBodyNone\"><code>glfwSetMousePosCallback</code>  </td><td class=\"markdownTableBodyNone\"><a class=\"el\" href=\"group__input.html#gac1f879ab7435d54d4d79bb469fe225d7\">glfwSetCursorPosCallback</a>  </td><td class=\"markdownTableBodyNone\"></td></tr>\n<tr class=\"markdownTableRowOdd\">\n<td class=\"markdownTableBodyNone\"><code>glfwSetMouseWheelCallback</code>  </td><td class=\"markdownTableBodyNone\"><a class=\"el\" href=\"group__input.html#ga571e45a030ae4061f746ed56cb76aede\">glfwSetScrollCallback</a>  </td><td class=\"markdownTableBodyNone\">Accepts two-dimensional scroll offsets as doubles   </td></tr>\n<tr class=\"markdownTableRowEven\">\n<td class=\"markdownTableBodyNone\"><code>glfwGetJoystickPos</code>  </td><td class=\"markdownTableBodyNone\"><a class=\"el\" href=\"group__input.html#gaa8806536731e92c061bc70bcff6edbd0\">glfwGetJoystickAxes</a>  </td><td class=\"markdownTableBodyNone\"></td></tr>\n<tr class=\"markdownTableRowOdd\">\n<td class=\"markdownTableBodyNone\"><code>glfwGetWindowParam</code>  </td><td class=\"markdownTableBodyNone\"><a class=\"el\" href=\"group__window.html#gacccb29947ea4b16860ebef42c2cb9337\">glfwGetWindowAttrib</a>  </td><td class=\"markdownTableBodyNone\"></td></tr>\n<tr class=\"markdownTableRowEven\">\n<td class=\"markdownTableBodyNone\"><code>glfwGetGLVersion</code>  </td><td class=\"markdownTableBodyNone\"><a class=\"el\" href=\"group__window.html#gacccb29947ea4b16860ebef42c2cb9337\">glfwGetWindowAttrib</a>  </td><td class=\"markdownTableBodyNone\">Use <code>GLFW_CONTEXT_VERSION_MAJOR</code>, <code>GLFW_CONTEXT_VERSION_MINOR</code> and <code>GLFW_CONTEXT_REVISION</code>   </td></tr>\n<tr class=\"markdownTableRowOdd\">\n<td class=\"markdownTableBodyNone\"><code>glfwGetDesktopMode</code>  </td><td class=\"markdownTableBodyNone\"><a class=\"el\" href=\"group__monitor.html#gafc1bb972a921ad5b3bd5d63a95fc2d52\">glfwGetVideoMode</a>  </td><td class=\"markdownTableBodyNone\">Returns the current mode of a monitor   </td></tr>\n<tr class=\"markdownTableRowEven\">\n<td class=\"markdownTableBodyNone\"><code>glfwGetJoystickParam</code>  </td><td class=\"markdownTableBodyNone\"><a class=\"el\" href=\"group__input.html#gaed0966cee139d815317f9ffcba64c9f1\">glfwJoystickPresent</a>  </td><td class=\"markdownTableBodyNone\">The axis and button counts are provided by <a class=\"el\" href=\"group__input.html#gaa8806536731e92c061bc70bcff6edbd0\">glfwGetJoystickAxes</a> and <a class=\"el\" href=\"group__input.html#gadb3cbf44af90a1536f519659a53bddd6\">glfwGetJoystickButtons</a>   </td></tr>\n</table>\n<h2><a class=\"anchor\" id=\"moving_renamed_types\"></a>\nRenamed types</h2>\n<table class=\"markdownTable\">\n<tr class=\"markdownTableHead\">\n<th class=\"markdownTableHeadNone\">GLFW 2  </th><th class=\"markdownTableHeadNone\">GLFW 3  </th><th class=\"markdownTableHeadNone\">Notes   </th></tr>\n<tr class=\"markdownTableRowOdd\">\n<td class=\"markdownTableBodyNone\"><code>GLFWmousewheelfun</code>  </td><td class=\"markdownTableBodyNone\"><a class=\"el\" href=\"group__input.html#ga4687e2199c60a18a8dd1da532e6d75c9\">GLFWscrollfun</a>  </td><td class=\"markdownTableBodyNone\"></td></tr>\n<tr class=\"markdownTableRowEven\">\n<td class=\"markdownTableBodyNone\"><code>GLFWmouseposfun</code>  </td><td class=\"markdownTableBodyNone\"><a class=\"el\" href=\"group__input.html#ga4cfad918fa836f09541e7b9acd36686c\">GLFWcursorposfun</a>  </td><td class=\"markdownTableBodyNone\"></td></tr>\n</table>\n<h2><a class=\"anchor\" id=\"moving_renamed_tokens\"></a>\nRenamed tokens</h2>\n<table class=\"markdownTable\">\n<tr class=\"markdownTableHead\">\n<th class=\"markdownTableHeadNone\">GLFW 2  </th><th class=\"markdownTableHeadNone\">GLFW 3  </th><th class=\"markdownTableHeadNone\">Notes   </th></tr>\n<tr class=\"markdownTableRowOdd\">\n<td class=\"markdownTableBodyNone\"><code>GLFW_OPENGL_VERSION_MAJOR</code>  </td><td class=\"markdownTableBodyNone\"><code>GLFW_CONTEXT_VERSION_MAJOR</code>  </td><td class=\"markdownTableBodyNone\">Renamed as it applies to OpenGL ES as well   </td></tr>\n<tr class=\"markdownTableRowEven\">\n<td class=\"markdownTableBodyNone\"><code>GLFW_OPENGL_VERSION_MINOR</code>  </td><td class=\"markdownTableBodyNone\"><code>GLFW_CONTEXT_VERSION_MINOR</code>  </td><td class=\"markdownTableBodyNone\">Renamed as it applies to OpenGL ES as well   </td></tr>\n<tr class=\"markdownTableRowOdd\">\n<td class=\"markdownTableBodyNone\"><code>GLFW_FSAA_SAMPLES</code>  </td><td class=\"markdownTableBodyNone\"><code>GLFW_SAMPLES</code>  </td><td class=\"markdownTableBodyNone\">Renamed to match the OpenGL API   </td></tr>\n<tr class=\"markdownTableRowEven\">\n<td class=\"markdownTableBodyNone\"><code>GLFW_ACTIVE</code>  </td><td class=\"markdownTableBodyNone\"><code>GLFW_FOCUSED</code>  </td><td class=\"markdownTableBodyNone\">Renamed to match the window focus callback   </td></tr>\n<tr class=\"markdownTableRowOdd\">\n<td class=\"markdownTableBodyNone\"><code>GLFW_WINDOW_NO_RESIZE</code>  </td><td class=\"markdownTableBodyNone\"><code>GLFW_RESIZABLE</code>  </td><td class=\"markdownTableBodyNone\">The default has been inverted   </td></tr>\n<tr class=\"markdownTableRowEven\">\n<td class=\"markdownTableBodyNone\"><code>GLFW_MOUSE_CURSOR</code>  </td><td class=\"markdownTableBodyNone\"><code>GLFW_CURSOR</code>  </td><td class=\"markdownTableBodyNone\">Used with <a class=\"el\" href=\"group__input.html#gaa92336e173da9c8834558b54ee80563b\">glfwSetInputMode</a>   </td></tr>\n<tr class=\"markdownTableRowOdd\">\n<td class=\"markdownTableBodyNone\"><code>GLFW_KEY_ESC</code>  </td><td class=\"markdownTableBodyNone\"><code>GLFW_KEY_ESCAPE</code>  </td><td class=\"markdownTableBodyNone\"></td></tr>\n<tr class=\"markdownTableRowEven\">\n<td class=\"markdownTableBodyNone\"><code>GLFW_KEY_DEL</code>  </td><td class=\"markdownTableBodyNone\"><code>GLFW_KEY_DELETE</code>  </td><td class=\"markdownTableBodyNone\"></td></tr>\n<tr class=\"markdownTableRowOdd\">\n<td class=\"markdownTableBodyNone\"><code>GLFW_KEY_PAGEUP</code>  </td><td class=\"markdownTableBodyNone\"><code>GLFW_KEY_PAGE_UP</code>  </td><td class=\"markdownTableBodyNone\"></td></tr>\n<tr class=\"markdownTableRowEven\">\n<td class=\"markdownTableBodyNone\"><code>GLFW_KEY_PAGEDOWN</code>  </td><td class=\"markdownTableBodyNone\"><code>GLFW_KEY_PAGE_DOWN</code>  </td><td class=\"markdownTableBodyNone\"></td></tr>\n<tr class=\"markdownTableRowOdd\">\n<td class=\"markdownTableBodyNone\"><code>GLFW_KEY_KP_NUM_LOCK</code>  </td><td class=\"markdownTableBodyNone\"><code>GLFW_KEY_NUM_LOCK</code>  </td><td class=\"markdownTableBodyNone\"></td></tr>\n<tr class=\"markdownTableRowEven\">\n<td class=\"markdownTableBodyNone\"><code>GLFW_KEY_LCTRL</code>  </td><td class=\"markdownTableBodyNone\"><code>GLFW_KEY_LEFT_CONTROL</code>  </td><td class=\"markdownTableBodyNone\"></td></tr>\n<tr class=\"markdownTableRowOdd\">\n<td class=\"markdownTableBodyNone\"><code>GLFW_KEY_LSHIFT</code>  </td><td class=\"markdownTableBodyNone\"><code>GLFW_KEY_LEFT_SHIFT</code>  </td><td class=\"markdownTableBodyNone\"></td></tr>\n<tr class=\"markdownTableRowEven\">\n<td class=\"markdownTableBodyNone\"><code>GLFW_KEY_LALT</code>  </td><td class=\"markdownTableBodyNone\"><code>GLFW_KEY_LEFT_ALT</code>  </td><td class=\"markdownTableBodyNone\"></td></tr>\n<tr class=\"markdownTableRowOdd\">\n<td class=\"markdownTableBodyNone\"><code>GLFW_KEY_LSUPER</code>  </td><td class=\"markdownTableBodyNone\"><code>GLFW_KEY_LEFT_SUPER</code>  </td><td class=\"markdownTableBodyNone\"></td></tr>\n<tr class=\"markdownTableRowEven\">\n<td class=\"markdownTableBodyNone\"><code>GLFW_KEY_RCTRL</code>  </td><td class=\"markdownTableBodyNone\"><code>GLFW_KEY_RIGHT_CONTROL</code>  </td><td class=\"markdownTableBodyNone\"></td></tr>\n<tr class=\"markdownTableRowOdd\">\n<td class=\"markdownTableBodyNone\"><code>GLFW_KEY_RSHIFT</code>  </td><td class=\"markdownTableBodyNone\"><code>GLFW_KEY_RIGHT_SHIFT</code>  </td><td class=\"markdownTableBodyNone\"></td></tr>\n<tr class=\"markdownTableRowEven\">\n<td class=\"markdownTableBodyNone\"><code>GLFW_KEY_RALT</code>  </td><td class=\"markdownTableBodyNone\"><code>GLFW_KEY_RIGHT_ALT</code>  </td><td class=\"markdownTableBodyNone\"></td></tr>\n<tr class=\"markdownTableRowOdd\">\n<td class=\"markdownTableBodyNone\"><code>GLFW_KEY_RSUPER</code>  </td><td class=\"markdownTableBodyNone\"><code>GLFW_KEY_RIGHT_SUPER</code>  </td><td class=\"markdownTableBodyNone\"></td></tr>\n</table>\n</div></div><!-- contents -->\n</div><!-- PageDoc -->\n<div class=\"ttc\" id=\"aglfw3_8h_html\"><div class=\"ttname\"><a href=\"glfw3_8h.html\">glfw3.h</a></div><div class=\"ttdoc\">The header of the GLFW 3 API.</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_ga5d877f09e968cef7a360b513306f17ff\"><div class=\"ttname\"><a href=\"group__window.html#ga5d877f09e968cef7a360b513306f17ff\">glfwSetWindowTitle</a></div><div class=\"ttdeci\">void glfwSetWindowTitle(GLFWwindow *window, const char *title)</div><div class=\"ttdoc\">Sets the title of the specified window.</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_ga3c96d80d363e67d13a41b5d1821f3242\"><div class=\"ttname\"><a href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a></div><div class=\"ttdeci\">struct GLFWwindow GLFWwindow</div><div class=\"ttdoc\">Opaque window object.</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:1152</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_ga15a5a1ee5b3c2ca6b15ca209a12efd14\"><div class=\"ttname\"><a href=\"group__window.html#ga15a5a1ee5b3c2ca6b15ca209a12efd14\">glfwSwapBuffers</a></div><div class=\"ttdeci\">void glfwSwapBuffers(GLFWwindow *window)</div><div class=\"ttdoc\">Swaps the front and back buffers of the specified window.</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_ga24e02fbfefbb81fc45320989f8140ab5\"><div class=\"ttname\"><a href=\"group__window.html#ga24e02fbfefbb81fc45320989f8140ab5\">glfwWindowShouldClose</a></div><div class=\"ttdeci\">int glfwWindowShouldClose(GLFWwindow *window)</div><div class=\"ttdoc\">Checks the close flag of the specified window.</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_ga37bd57223967b4211d60ca1a0bf3c832\"><div class=\"ttname\"><a href=\"group__window.html#ga37bd57223967b4211d60ca1a0bf3c832\">glfwPollEvents</a></div><div class=\"ttdeci\">void glfwPollEvents(void)</div><div class=\"ttdoc\">Processes all pending events.</div></div>\n<div class=\"ttc\" id=\"agroup__monitor_html_ga721867d84c6d18d6790d64d2847ca0b1\"><div class=\"ttname\"><a href=\"group__monitor.html#ga721867d84c6d18d6790d64d2847ca0b1\">glfwGetPrimaryMonitor</a></div><div class=\"ttdeci\">GLFWmonitor * glfwGetPrimaryMonitor(void)</div><div class=\"ttdoc\">Returns the primary monitor.</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_ga5c336fddf2cbb5b92f65f10fb6043344\"><div class=\"ttname\"><a href=\"group__window.html#ga5c336fddf2cbb5b92f65f10fb6043344\">glfwCreateWindow</a></div><div class=\"ttdeci\">GLFWwindow * glfwCreateWindow(int width, int height, const char *title, GLFWmonitor *monitor, GLFWwindow *share)</div><div class=\"ttdoc\">Creates a window and its associated context.</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_gaeea7cbc03373a41fb51cfbf9f2a5d4c6\"><div class=\"ttname\"><a href=\"group__window.html#gaeea7cbc03373a41fb51cfbf9f2a5d4c6\">glfwGetWindowSize</a></div><div class=\"ttdeci\">void glfwGetWindowSize(GLFWwindow *window, int *width, int *height)</div><div class=\"ttdoc\">Retrieves the size of the content area of the specified window.</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_ga0e2637a4161afb283f5300c7f94785c9\"><div class=\"ttname\"><a href=\"group__window.html#ga0e2637a4161afb283f5300c7f94785c9\">glfwGetFramebufferSize</a></div><div class=\"ttdeci\">void glfwGetFramebufferSize(GLFWwindow *window, int *width, int *height)</div><div class=\"ttdoc\">Retrieves the size of the framebuffer of the specified window.</div></div>\n<address class=\"footer\">\n<p>\nLast update on Mon Jan 20 2020 for GLFW 3.3.2\n</p>\n</address>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/news.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta http-equiv=\"X-UA-Compatible\" content=\"IE=9\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<title>GLFW: Release notes</title>\n<link href=\"tabs.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"jquery.js\"></script>\n<script type=\"text/javascript\" src=\"dynsections.js\"></script>\n<link href=\"search/search.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"search/searchdata.js\"></script>\n<script type=\"text/javascript\" src=\"search/search.js\"></script>\n<link href=\"doxygen.css\" rel=\"stylesheet\" type=\"text/css\" />\n<link href=\"extra.css\" rel=\"stylesheet\" type=\"text/css\"/>\n</head>\n<body>\n<div id=\"top\"><!-- do not remove this div, it is closed by doxygen! -->\n<div id=\"titlearea\">\n\t<div class=\"glfwheader\">\n\t\t<a href=\"https://www.glfw.org/\" id=\"glfwhome\">GLFW</a>\n\t\t<ul class=\"glfwnavbar\">\n\t\t\t<li><a href=\"https://www.glfw.org/documentation.html\">Documentation</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/download.html\">Download</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/community.html\">Community</a></li>\n\t\t</ul>\n\t</div>\n</div>\n<!-- end header part -->\n<!-- Generated by Doxygen 1.8.16 -->\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\nvar searchBox = new SearchBox(\"searchBox\", \"search\",false,'Search');\n/* @license-end */\n</script>\n<script type=\"text/javascript\" src=\"menudata.js\"></script>\n<script type=\"text/javascript\" src=\"menu.js\"></script>\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\n$(function() {\n  initMenu('',true,false,'search.php','Search');\n  $(document).ready(function() { init_search(); });\n});\n/* @license-end */</script>\n<div id=\"main-nav\"></div>\n<!-- window showing the filter options -->\n<div id=\"MSearchSelectWindow\"\n     onmouseover=\"return searchBox.OnSearchSelectShow()\"\n     onmouseout=\"return searchBox.OnSearchSelectHide()\"\n     onkeydown=\"return searchBox.OnSearchSelectKey(event)\">\n</div>\n\n<!-- iframe showing the search results (closed by default) -->\n<div id=\"MSearchResultsWindow\">\n<iframe src=\"javascript:void(0)\" frameborder=\"0\" \n        name=\"MSearchResults\" id=\"MSearchResults\">\n</iframe>\n</div>\n\n</div><!-- top -->\n<div class=\"PageDoc\"><div class=\"header\">\n  <div class=\"headertitle\">\n<div class=\"title\">Release notes </div>  </div>\n</div><!--header-->\n<div class=\"contents\">\n<div class=\"toc\"><h3>Table of Contents</h3>\n<ul><li class=\"level1\"><a href=\"#news_33\">Release notes for version 3.3</a><ul><li class=\"level2\"><a href=\"#features_33\">New features in version 3.3</a><ul><li class=\"level3\"><a href=\"#gamepad_33\">Gamepad input via SDL_GameControllerDB</a></li>\n<li class=\"level3\"><a href=\"#moltenvk_33\">Support for Vulkan on macOS via MoltenVK</a></li>\n<li class=\"level3\"><a href=\"#content_scale_33\">Content scale queries for DPI-aware rendering</a></li>\n<li class=\"level3\"><a href=\"#setwindowattrib_33\">Support for updating window attributes</a></li>\n<li class=\"level3\"><a href=\"#raw_motion_33\">Support for raw mouse motion</a></li>\n<li class=\"level3\"><a href=\"#joysticks_33\">Joystick hats</a></li>\n<li class=\"level3\"><a href=\"#geterror_33\">Error query</a></li>\n<li class=\"level3\"><a href=\"#init_hints_33\">Support for initialization hints</a></li>\n<li class=\"level3\"><a href=\"#attention_33\">User attention request</a></li>\n<li class=\"level3\"><a href=\"#maximize_33\">Window maximization callback</a></li>\n<li class=\"level3\"><a href=\"#workarea_33\">Query for the monitor work area</a></li>\n<li class=\"level3\"><a href=\"#transparency_33\">Transparent windows and framebuffers</a></li>\n<li class=\"level3\"><a href=\"#key_scancode_33\">Query for the scancode of a key</a></li>\n<li class=\"level3\"><a href=\"#center_cursor_33\">Cursor centering window hint</a></li>\n<li class=\"level3\"><a href=\"#cursor_hover_33\">Mouse cursor hover window attribute</a></li>\n<li class=\"level3\"><a href=\"#focusonshow_33\">Window hint and attribute for input focus on show</a></li>\n<li class=\"level3\"><a href=\"#device_userptr_33\">Monitor and joystick user pointers</a></li>\n<li class=\"level3\"><a href=\"#macos_nib_33\">macOS menu bar from nib file</a></li>\n<li class=\"level3\"><a href=\"#glext_33\">Support for more context creation extensions</a></li>\n<li class=\"level3\"><a href=\"#osmesa_33\">OSMesa off-screen context creation support</a></li>\n</ul>\n</li>\n<li class=\"level2\"><a href=\"#caveats_33\">Caveats for version 3.3</a><ul><li class=\"level3\"><a href=\"#joystick_layout_33\">Layout of joysticks have changed</a></li>\n<li class=\"level3\"><a href=\"#wait_events_33\">No window required to wait for events</a></li>\n<li class=\"level3\"><a href=\"#gamma_ramp_size_33\">Gamma ramp size of 256 may be rejected</a></li>\n<li class=\"level3\"><a href=\"#xinput_deadzone_33\">Windows XInput deadzone removed</a></li>\n<li class=\"level3\"><a href=\"#x11_clipboard_33\">X11 clipboard transfer limits</a></li>\n<li class=\"level3\"><a href=\"#x11_linking_33\">X11 extension libraries are loaded dynamically</a></li>\n<li class=\"level3\"><a href=\"#cmake_version_33\">CMake 3.0 or later is required</a></li>\n</ul>\n</li>\n<li class=\"level2\"><a href=\"#deprecations_33\">Deprecations in version 3.3</a><ul><li class=\"level3\"><a href=\"#charmods_callback_33\">Character with modifiers callback</a></li>\n<li class=\"level3\"><a href=\"#clipboard_window_33\">Window parameter to clipboard functions</a></li>\n</ul>\n</li>\n<li class=\"level2\"><a href=\"#removals_33\">Removals in 3.3</a><ul><li class=\"level3\"><a href=\"#macos_options_33\">macOS specific CMake options and macros</a></li>\n<li class=\"level3\"><a href=\"#vulkan_sdk_33\">LunarG Vulkan SDK dependency</a></li>\n<li class=\"level3\"><a href=\"#lib_suffix_33\">CMake option LIB_SUFFIX</a></li>\n<li class=\"level3\"><a href=\"#mir_removed_33\">Mir support</a></li>\n</ul>\n</li>\n<li class=\"level2\"><a href=\"#symbols_33\">New symbols in version 3.3</a><ul><li class=\"level3\"><a href=\"#functions_33\">New functions in version 3.3</a></li>\n<li class=\"level3\"><a href=\"#types_33\">New types in version 3.3</a></li>\n<li class=\"level3\"><a href=\"#constants_33\">New constants in version 3.3</a></li>\n</ul>\n</li>\n</ul>\n</li>\n<li class=\"level1\"><a href=\"#news_32\">Release notes for 3.2</a><ul><li class=\"level2\"><a href=\"#features_32\">New features in version 3.2</a><ul><li class=\"level3\"><a href=\"#news_32_vulkan\">Support for Vulkan</a></li>\n<li class=\"level3\"><a href=\"#news_32_setwindowmonitor\">Window mode switching</a></li>\n<li class=\"level3\"><a href=\"#news_32_maximize\">Window maxmimization support</a></li>\n<li class=\"level3\"><a href=\"#news_32_focus\">Window input focus control</a></li>\n<li class=\"level3\"><a href=\"#news_32_sizelimits\">Window size limit support</a></li>\n<li class=\"level3\"><a href=\"#news_32_keyname\">Localized key names</a></li>\n<li class=\"level3\"><a href=\"#news_32_waittimeout\">Wait for events with timeout</a></li>\n<li class=\"level3\"><a href=\"#news_32_icon\">Window icon support</a></li>\n<li class=\"level3\"><a href=\"#news_32_timer\">Raw timer access</a></li>\n<li class=\"level3\"><a href=\"#news_32_joystick\">Joystick connection callback</a></li>\n<li class=\"level3\"><a href=\"#news_32_noapi\">Context-less windows</a></li>\n<li class=\"level3\"><a href=\"#news_32_contextapi\">Run-time context creation API selection</a></li>\n<li class=\"level3\"><a href=\"#news_32_noerror\">Error-free context creation</a></li>\n<li class=\"level3\"><a href=\"#news_32_cmake\">CMake config-file package support</a></li>\n</ul>\n</li>\n</ul>\n</li>\n<li class=\"level1\"><a href=\"#news_31\">Release notes for 3.1</a><ul><li class=\"level2\"><a href=\"#features_31\">New features in version 3.1</a><ul><li class=\"level3\"><a href=\"#news_31_cursor\">Custom mouse cursor images</a></li>\n<li class=\"level3\"><a href=\"#news_31_drop\">Path drop event</a></li>\n<li class=\"level3\"><a href=\"#news_31_emptyevent\">Main thread wake-up</a></li>\n<li class=\"level3\"><a href=\"#news_31_framesize\">Window frame size query</a></li>\n<li class=\"level3\"><a href=\"#news_31_autoiconify\">Simultaneous multi-monitor rendering</a></li>\n<li class=\"level3\"><a href=\"#news_31_floating\">Floating windows</a></li>\n<li class=\"level3\"><a href=\"#news_31_focused\">Initially unfocused windows</a></li>\n<li class=\"level3\"><a href=\"#news_31_direct\">Direct access for window attributes and cursor position</a></li>\n<li class=\"level3\"><a href=\"#news_31_charmods\">Character with modifiers callback</a></li>\n<li class=\"level3\"><a href=\"#news_31_single\">Single buffered framebuffers</a></li>\n<li class=\"level3\"><a href=\"#news_31_glext\">Macro for including extension header</a></li>\n<li class=\"level3\"><a href=\"#news_31_release\">Context release behaviors</a></li>\n<li class=\"level3\"><a href=\"#news_31_wayland\">(Experimental) Wayland support</a></li>\n<li class=\"level3\"><a href=\"#news_31_mir\">(Experimental) Mir support</a></li>\n</ul>\n</li>\n</ul>\n</li>\n<li class=\"level1\"><a href=\"#news_30\">Release notes for 3.0</a><ul><li class=\"level2\"><a href=\"#features_30\">New features in version 3.0</a><ul><li class=\"level3\"><a href=\"#news_30_cmake\">CMake build system</a></li>\n<li class=\"level3\"><a href=\"#news_30_multiwnd\">Multi-window support</a></li>\n<li class=\"level3\"><a href=\"#news_30_multimon\">Multi-monitor support</a></li>\n<li class=\"level3\"><a href=\"#news_30_unicode\">Unicode support</a></li>\n<li class=\"level3\"><a href=\"#news_30_clipboard\">Clipboard text I/O</a></li>\n<li class=\"level3\"><a href=\"#news_30_gamma\">Gamma ramp support</a></li>\n<li class=\"level3\"><a href=\"#news_30_gles\">OpenGL ES support</a></li>\n<li class=\"level3\"><a href=\"#news_30_egl\">(Experimental) EGL support</a></li>\n<li class=\"level3\"><a href=\"#news_30_hidpi\">High-DPI support</a></li>\n<li class=\"level3\"><a href=\"#news_30_error\">Error callback</a></li>\n<li class=\"level3\"><a href=\"#news_30_wndptr\">Per-window user pointer</a></li>\n<li class=\"level3\"><a href=\"#news_30_iconifyfun\">Window iconification callback</a></li>\n<li class=\"level3\"><a href=\"#news_30_wndposfun\">Window position callback</a></li>\n<li class=\"level3\"><a href=\"#news_30_wndpos\">Window position query</a></li>\n<li class=\"level3\"><a href=\"#news_30_focusfun\">Window focus callback</a></li>\n<li class=\"level3\"><a href=\"#news_30_enterleave\">Cursor enter/leave callback</a></li>\n<li class=\"level3\"><a href=\"#news_30_wndtitle\">Initial window title</a></li>\n<li class=\"level3\"><a href=\"#news_30_hidden\">Hidden windows</a></li>\n<li class=\"level3\"><a href=\"#news_30_undecorated\">Undecorated windows</a></li>\n<li class=\"level3\"><a href=\"#news_30_keymods\">Modifier key bit masks</a></li>\n<li class=\"level3\"><a href=\"#news_30_scancode\">Platform-specific scancodes</a></li>\n<li class=\"level3\"><a href=\"#news_30_jsname\">Joystick names</a></li>\n<li class=\"level3\"><a href=\"#news_30_doxygen\">Doxygen documentation</a></li>\n</ul>\n</li>\n</ul>\n</li>\n</ul>\n</div>\n<div class=\"textblock\"><h1><a class=\"anchor\" id=\"news_33\"></a>\nRelease notes for version 3.3</h1>\n<p>These are the release notes for version 3.3. For a more detailed view including all fixed bugs see the <a href=\"https://www.glfw.org/changelog.html\">version history</a>.</p>\n<p>Please review the caveats, deprecations and removals if your project was written against an earlier version of GLFW 3.</p>\n<h2><a class=\"anchor\" id=\"features_33\"></a>\nNew features in version 3.3</h2>\n<h3><a class=\"anchor\" id=\"gamepad_33\"></a>\nGamepad input via SDL_GameControllerDB</h3>\n<p>GLFW can now remap game controllers to a standard Xbox-like layout using a built-in copy of SDL_GameControllerDB. Call <a class=\"el\" href=\"group__input.html#gad0f676860f329d80f7e47e9f06a96f00\">glfwJoystickIsGamepad</a> to check if a joystick has a mapping, <a class=\"el\" href=\"group__input.html#gadccddea8bce6113fa459de379ddaf051\">glfwGetGamepadState</a> to retrieve its input state, <a class=\"el\" href=\"group__input.html#gaed5104612f2fa8e66aa6e846652ad00f\">glfwUpdateGamepadMappings</a> to add newer mappings and <a class=\"el\" href=\"group__input.html#ga5c71e3533b2d384db9317fcd7661b210\">glfwGetGamepadName</a> and <a class=\"el\" href=\"group__input.html#gae168c2c0b8cf2a1cb67c6b3c00bdd543\">glfwGetJoystickGUID</a> for mapping related information.</p>\n<p>For more information see <a class=\"el\" href=\"input_guide.html#gamepad\">Gamepad input</a>.</p>\n<h3><a class=\"anchor\" id=\"moltenvk_33\"></a>\nSupport for Vulkan on macOS via MoltenVK</h3>\n<p>GLFW now supports <a href=\"https://moltengl.com/moltenvk/\">MoltenVK</a>, a Vulkan implementation on top of the Metal API, and its <code>VK_MVK_macos_surface</code> window surface creation extension. MoltenVK is included in the <a href=\"https://vulkan.lunarg.com/\">macOS Vulkan SDK</a>.</p>\n<p>For more information see <a class=\"el\" href=\"vulkan_guide.html\">Vulkan guide</a>.</p>\n<h3><a class=\"anchor\" id=\"content_scale_33\"></a>\nContent scale queries for DPI-aware rendering</h3>\n<p>GLFW now provides content scales for windows and monitors, i.e. the ratio between their current DPI and the platform's default DPI, with <a class=\"el\" href=\"group__window.html#gaf5d31de9c19c4f994facea64d2b3106c\">glfwGetWindowContentScale</a> and <a class=\"el\" href=\"group__monitor.html#gad3152e84465fa620b601265ebfcdb21b\">glfwGetMonitorContentScale</a>.</p>\n<p>Changes of the content scale of a window can be received with the window content scale callback, set with <a class=\"el\" href=\"group__window.html#gaf2832ebb5aa6c252a2d261de002c92d6\">glfwSetWindowContentScaleCallback</a>.</p>\n<p>The <a class=\"el\" href=\"window_guide.html#GLFW_SCALE_TO_MONITOR\">GLFW_SCALE_TO_MONITOR</a> window hint enables automatic resizing of a window by the content scale of the monitor it is placed, on platforms like Windows where this is necessary. This takes effect both on creation and when the window is moved between monitors. It is related to but different from <a class=\"el\" href=\"window_guide.html#GLFW_COCOA_RETINA_FRAMEBUFFER_hint\">GLFW_COCOA_RETINA_FRAMEBUFFER</a>.</p>\n<p>For more information see <a class=\"el\" href=\"window_guide.html#window_scale\">Window content scale</a>.</p>\n<h3><a class=\"anchor\" id=\"setwindowattrib_33\"></a>\nSupport for updating window attributes</h3>\n<p>GLFW now supports changing the <a class=\"el\" href=\"window_guide.html#GLFW_DECORATED_attrib\">GLFW_DECORATED</a>, <a class=\"el\" href=\"window_guide.html#GLFW_RESIZABLE_attrib\">GLFW_RESIZABLE</a>, <a class=\"el\" href=\"window_guide.html#GLFW_FLOATING_attrib\">GLFW_FLOATING</a>, <a class=\"el\" href=\"window_guide.html#GLFW_AUTO_ICONIFY_attrib\">GLFW_AUTO_ICONIFY</a> and <a class=\"el\" href=\"window_guide.html#GLFW_FOCUS_ON_SHOW_attrib\">GLFW_FOCUS_ON_SHOW</a> attributes for existing windows with <a class=\"el\" href=\"group__window.html#gace2afda29b4116ec012e410a6819033e\">glfwSetWindowAttrib</a>.</p>\n<p>For more information see <a class=\"el\" href=\"window_guide.html#window_attribs\">Window attributes</a>.</p>\n<h3><a class=\"anchor\" id=\"raw_motion_33\"></a>\nSupport for raw mouse motion</h3>\n<p>GLFW now supports raw (unscaled and unaccelerated) mouse motion in disabled cursor mode with the <a class=\"el\" href=\"input_guide.html#GLFW_RAW_MOUSE_MOTION\">GLFW_RAW_MOUSE_MOTION</a> input mode. Raw mouse motion input is not yet implemented on macOS. Call <a class=\"el\" href=\"group__input.html#gae4ee0dbd0d256183e1ea4026d897e1c2\">glfwRawMouseMotionSupported</a> to check if GLFW can provide raw mouse motion on the current system.</p>\n<p>For more information see <a class=\"el\" href=\"input_guide.html#raw_mouse_motion\">Raw mouse motion</a>.</p>\n<h3><a class=\"anchor\" id=\"joysticks_33\"></a>\nJoystick hats</h3>\n<p>GLFW can now return the state of hats (i.e. POVs or D-pads) of a joystick with <a class=\"el\" href=\"group__input.html#ga2d8d0634bb81c180899aeb07477a67ea\">glfwGetJoystickHats</a>. For compatibility, hats are also exposed as buttons. This can be disabled with the <a class=\"el\" href=\"intro_guide.html#GLFW_JOYSTICK_HAT_BUTTONS\">GLFW_JOYSTICK_HAT_BUTTONS</a> initialization hint.</p>\n<p>For more information see <a class=\"el\" href=\"input_guide.html#joystick_hat\">Joystick hat states</a>.</p>\n<h3><a class=\"anchor\" id=\"geterror_33\"></a>\nError query</h3>\n<p>GLFW now supports querying the last error code for the calling thread and its human-readable description with <a class=\"el\" href=\"group__init.html#ga944986b4ec0b928d488141f92982aa18\">glfwGetError</a>. This can be used instead of or together with the error callback.</p>\n<p>For more information see <a class=\"el\" href=\"intro_guide.html#error_handling\">Error handling</a>.</p>\n<h3><a class=\"anchor\" id=\"init_hints_33\"></a>\nSupport for initialization hints</h3>\n<p>GLFW now supports setting library initialization hints with <a class=\"el\" href=\"group__init.html#ga110fd1d3f0412822b4f1908c026f724a\">glfwInitHint</a>. These must be set before initialization to take effect. Some of these hints are platform specific but are safe to set on any platform.</p>\n<p>For more information see <a class=\"el\" href=\"intro_guide.html#init_hints\">Initialization hints</a>.</p>\n<h3><a class=\"anchor\" id=\"attention_33\"></a>\nUser attention request</h3>\n<p>GLFW now supports requesting user attention with <a class=\"el\" href=\"group__window.html#ga2f8d59323fc4692c1d54ba08c863a703\">glfwRequestWindowAttention</a>. Where possible this calls attention to the specified window. On platforms like macOS it calls attention to the whole application.</p>\n<p>For more information see <a class=\"el\" href=\"window_guide.html#window_attention\">Window attention request</a>.</p>\n<h3><a class=\"anchor\" id=\"maximize_33\"></a>\nWindow maximization callback</h3>\n<p>GLFW now supports notifying the application that the window has been maximized <a class=\"el\" href=\"group__window.html#gacbe64c339fbd94885e62145563b6dc93\">glfwSetWindowMaximizeCallback</a>. This is called both when the window was maximized by the user and when it was done with <a class=\"el\" href=\"group__window.html#ga3f541387449d911274324ae7f17ec56b\">glfwMaximizeWindow</a>.</p>\n<p>For more information see <a class=\"el\" href=\"window_guide.html#window_maximize\">Window maximization</a>.</p>\n<h3><a class=\"anchor\" id=\"workarea_33\"></a>\nQuery for the monitor work area</h3>\n<p>GLFW now supports querying the work area of a monitor, i.e. the area not occupied by task bars or global menu bars, with <a class=\"el\" href=\"group__monitor.html#ga7387a3bdb64bfe8ebf2b9e54f5b6c9d0\">glfwGetMonitorWorkarea</a>. On platforms that lack this concept, the whole area of the monitor is returned.</p>\n<p>For more information see <a class=\"el\" href=\"monitor_guide.html#monitor_workarea\">Work area</a>.</p>\n<h3><a class=\"anchor\" id=\"transparency_33\"></a>\nTransparent windows and framebuffers</h3>\n<p>GLFW now supports the creation of windows with transparent framebuffers on systems with desktop compositing enabled with the <a class=\"el\" href=\"group__window.html#ga60a0578c3b9449027d683a9c6abb9f14\">GLFW_TRANSPARENT_FRAMEBUFFER</a> window hint and attribute. This hint must be set before window creation and leaves any window decorations opaque.</p>\n<p>GLFW now also supports whole window transparency with <a class=\"el\" href=\"group__window.html#gad09f0bd7a6307c4533b7061828480a84\">glfwGetWindowOpacity</a> and <a class=\"el\" href=\"group__window.html#gac31caeb3d1088831b13d2c8a156802e9\">glfwSetWindowOpacity</a>. This value controls the opacity of the whole window including decorations and unlike framebuffer transparency can be changed at any time after window creation.</p>\n<p>For more information see <a class=\"el\" href=\"window_guide.html#window_transparency\">Window transparency</a>.</p>\n<h3><a class=\"anchor\" id=\"key_scancode_33\"></a>\nQuery for the scancode of a key</h3>\n<p>GLFW now supports querying the platform dependent scancode of any physical key with <a class=\"el\" href=\"group__input.html#ga67ddd1b7dcbbaff03e4a76c0ea67103a\">glfwGetKeyScancode</a>.</p>\n<p>For more information see <a class=\"el\" href=\"input_guide.html#input_key\">Key input</a>.</p>\n<h3><a class=\"anchor\" id=\"center_cursor_33\"></a>\nCursor centering window hint</h3>\n<p>GLFW now supports controlling whether the cursor is centered over newly created full screen windows with the <a class=\"el\" href=\"window_guide.html#GLFW_CENTER_CURSOR_hint\">GLFW_CENTER_CURSOR</a> window hint. It is enabled by default.</p>\n<h3><a class=\"anchor\" id=\"cursor_hover_33\"></a>\nMouse cursor hover window attribute</h3>\n<p>GLFW now supports polling whether the cursor is hovering over the window content area with the <a class=\"el\" href=\"window_guide.html#GLFW_HOVERED_attrib\">GLFW_HOVERED</a> window attribute. This attribute corresponds to the <a class=\"el\" href=\"input_guide.html#cursor_enter\">cursor enter/leave</a> event.</p>\n<h3><a class=\"anchor\" id=\"focusonshow_33\"></a>\nWindow hint and attribute for input focus on show</h3>\n<p>GLFW now has the <a class=\"el\" href=\"window_guide.html#GLFW_DECORATED_hint\">GLFW_FOCUS_ON_SHOW</a> window hint and attribute for controlling whether a window gets input focus when shown. It is enabled by default. It applies both when creating an visible window with <a class=\"el\" href=\"group__window.html#ga5c336fddf2cbb5b92f65f10fb6043344\">glfwCreateWindow</a> and when showing it with <a class=\"el\" href=\"group__window.html#ga61be47917b72536a148300f46494fc66\">glfwShowWindow</a>.</p>\n<p>This is a workaround for GLFW 3.0 lacking <a class=\"el\" href=\"group__window.html#ga873780357abd3f3a081d71a40aae45a1\">glfwFocusWindow</a> and will be corrected in the next major version.</p>\n<p>For more information see <a class=\"el\" href=\"window_guide.html#window_hide\">Window visibility</a>.</p>\n<h3><a class=\"anchor\" id=\"device_userptr_33\"></a>\nMonitor and joystick user pointers</h3>\n<p>GLFW now supports setting and querying user pointers for connected monitors and joysticks with <a class=\"el\" href=\"group__monitor.html#ga702750e24313a686d3637297b6e85fda\">glfwSetMonitorUserPointer</a>, <a class=\"el\" href=\"group__monitor.html#gac2d4209016b049222877f620010ed0d8\">glfwGetMonitorUserPointer</a>, <a class=\"el\" href=\"group__input.html#ga6b2f72d64d636b48a727b437cbb7489e\">glfwSetJoystickUserPointer</a> and <a class=\"el\" href=\"group__input.html#ga06290acb7ed23895bf26b8e981827ebd\">glfwGetJoystickUserPointer</a>.</p>\n<p>For more information see <a class=\"el\" href=\"monitor_guide.html#monitor_userptr\">User pointer</a> and <a class=\"el\" href=\"input_guide.html#joystick_userptr\">Joystick user pointer</a>.</p>\n<h3><a class=\"anchor\" id=\"macos_nib_33\"></a>\nmacOS menu bar from nib file</h3>\n<p>GLFW will now load a <code>MainMenu.nib</code> file if found in the <code>Contents/Resources</code> directory of the application bundle, as a way to replace the GLFW menu bar without recompiling GLFW. This behavior can be disabled with the <a class=\"el\" href=\"intro_guide.html#GLFW_COCOA_MENUBAR_hint\">GLFW_COCOA_MENUBAR</a> initialization hint.</p>\n<h3><a class=\"anchor\" id=\"glext_33\"></a>\nSupport for more context creation extensions</h3>\n<p>The context hint <a class=\"el\" href=\"window_guide.html#GLFW_SRGB_CAPABLE\">GLFW_SRGB_CAPABLE</a> now supports OpenGL ES via <code>WGL_EXT_colorspace</code>, the context hint <a class=\"el\" href=\"group__window.html#ga5a52fdfd46d8249c211f923675728082\">GLFW_CONTEXT_NO_ERROR</a> now supports <code>WGL_ARB_create_context_no_error</code> and <code>GLX_ARB_create_context_no_error</code>, the context hint <a class=\"el\" href=\"group__window.html#ga72b648a8378fe3310c7c7bbecc0f7be6\">GLFW_CONTEXT_RELEASE_BEHAVIOR</a> now supports <code>EGL_KHR_context_flush_control</code> and <a class=\"el\" href=\"group__context.html#ga35f1837e6f666781842483937612f163\">glfwGetProcAddress</a> now supports <code>EGL_KHR_get_all_proc_addresses</code>.</p>\n<h3><a class=\"anchor\" id=\"osmesa_33\"></a>\nOSMesa off-screen context creation support</h3>\n<p>GLFW now supports creating off-screen OpenGL contexts using <a href=\"https://www.mesa3d.org/osmesa.html\">OSMesa</a> by setting <a class=\"el\" href=\"window_guide.html#GLFW_CONTEXT_CREATION_API_hint\">GLFW_CONTEXT_CREATION_API</a> to <code>GLFW_OSMESA_CONTEXT_API</code>. Native access function have been added to retrieve the OSMesa color and depth buffers.</p>\n<p>There is also a new null backend that uses OSMesa as its native context creation API, intended for automated testing. This backend does not provide input.</p>\n<h2><a class=\"anchor\" id=\"caveats_33\"></a>\nCaveats for version 3.3</h2>\n<h3><a class=\"anchor\" id=\"joystick_layout_33\"></a>\nLayout of joysticks have changed</h3>\n<p>The way joystick elements are arranged have changed to match SDL2 in order to support SDL_GameControllerDB mappings. The layout of joysticks may change again if required for compatibility with SDL2. If you need a known and stable layout for game controllers, see if you can switch to <a class=\"el\" href=\"input_guide.html#gamepad\">Gamepad input</a>.</p>\n<p>Existing code that depends on a specific joystick layout will likely have to be updated.</p>\n<h3><a class=\"anchor\" id=\"wait_events_33\"></a>\nNo window required to wait for events</h3>\n<p>The <a class=\"el\" href=\"group__window.html#ga554e37d781f0a997656c26b2c56c835e\">glfwWaitEvents</a> and <a class=\"el\" href=\"group__window.html#ga605a178db92f1a7f1a925563ef3ea2cf\">glfwWaitEventsTimeout</a> functions no longer need a window to be created to wait for events. Before version 3.3 these functions would return immediately if there were no user-created windows. On platforms where only windows can receive events, an internal helper window is used.</p>\n<p>Existing code that depends on the earlier behavior will likely have to be updated.</p>\n<h3><a class=\"anchor\" id=\"gamma_ramp_size_33\"></a>\nGamma ramp size of 256 may be rejected</h3>\n<p>The documentation for versions before 3.3 stated that a gamma ramp size of 256 would always be accepted. This was never the case on X11 and could lead to artifacts on macOS. The <a class=\"el\" href=\"group__monitor.html#ga6ac582625c990220785ddd34efa3169a\">glfwSetGamma</a> function has been updated to always generate a ramp of the correct size.</p>\n<p>Existing code that hardcodes a size of 256 should be updated to use the size of the current ramp of a monitor when setting a new ramp for that monitor.</p>\n<h3><a class=\"anchor\" id=\"xinput_deadzone_33\"></a>\nWindows XInput deadzone removed</h3>\n<p>GLFW no longer applies any deadzone to the input state received from the XInput API. This was never done for any other platform joystick API so this change makes the behavior more consistent but you will need to apply your own deadzone if desired.</p>\n<h3><a class=\"anchor\" id=\"x11_clipboard_33\"></a>\nX11 clipboard transfer limits</h3>\n<p>GLFW now supports reading clipboard text via the <code>INCR</code> method, which removes the limit on how much text can be read with <a class=\"el\" href=\"group__input.html#ga5aba1d704d9ab539282b1fbe9f18bb94\">glfwGetClipboardString</a>. However, writing via this method is not yet supported, so you may not be able to write a very large string with <a class=\"el\" href=\"group__input.html#gaba1f022c5eb07dfac421df34cdcd31dd\">glfwSetClipboardString</a> even if you read it from the clipboard earlier.</p>\n<p>The exact size limit for writing to the clipboard is negotiated with each receiving application but is at least several tens of kilobytes. Note that only the read limit has changed. Any string that could be written before still can be.</p>\n<h3><a class=\"anchor\" id=\"x11_linking_33\"></a>\nX11 extension libraries are loaded dynamically</h3>\n<p>GLFW now loads all X11 extension libraries at initialization. The only X11 library you need to link against is <code>libX11</code>. The header files for the extension libraries are still required for compilation.</p>\n<p>Existing projects and makefiles that link GLFW directly against the extension libraries should still build correctly but will add these libraries as load-time dependencies.</p>\n<h3><a class=\"anchor\" id=\"cmake_version_33\"></a>\nCMake 3.0 or later is required</h3>\n<p>The minimum CMake version has been raised from 2.8.12 to 3.0. This is only a requirement of the GLFW CMake files. The GLFW source files do not depend on CMake.</p>\n<h2><a class=\"anchor\" id=\"deprecations_33\"></a>\nDeprecations in version 3.3</h2>\n<h3><a class=\"anchor\" id=\"charmods_callback_33\"></a>\nCharacter with modifiers callback</h3>\n<p>The character with modifiers callback set with <a class=\"el\" href=\"group__input.html#ga0b7f4ad13c2b17435ff13b6dcfb4e43c\">glfwSetCharModsCallback</a> has been deprecated and should if possible not be used.</p>\n<p>Existing code should still work but further bug fixes will likely not be made. The callback will be removed in the next major version.</p>\n<h3><a class=\"anchor\" id=\"clipboard_window_33\"></a>\nWindow parameter to clipboard functions</h3>\n<p>The window parameter of the clipboard functions <a class=\"el\" href=\"group__input.html#ga5aba1d704d9ab539282b1fbe9f18bb94\">glfwGetClipboardString</a> and <a class=\"el\" href=\"group__input.html#gaba1f022c5eb07dfac421df34cdcd31dd\">glfwSetClipboardString</a> has been deprecated and is no longer used on any platform. On platforms where the clipboard must be owned by a specific window, an internal helper window is used.</p>\n<p>Existing code should still work unless it depends on a specific window owning the clipboard. New code may pass <code>NULL</code> as the window argument. The parameter will be removed in a future release.</p>\n<h2><a class=\"anchor\" id=\"removals_33\"></a>\nRemovals in 3.3</h2>\n<h3><a class=\"anchor\" id=\"macos_options_33\"></a>\nmacOS specific CMake options and macros</h3>\n<p>The <code>GLFW_USE_RETINA</code>, <code>GLFW_USE_CHDIR</code> and <code>GLFW_USE_MENUBAR</code> CMake options and the <code>_GLFW_USE_RETINA</code>, <code>_GLFW_USE_CHDIR</code> and <code>_GLFW_USE_MENUBAR</code> compile-time macros have been removed.</p>\n<p>These options and macros are replaced by the window hint <a class=\"el\" href=\"window_guide.html#GLFW_COCOA_RETINA_FRAMEBUFFER_hint\">GLFW_COCOA_RETINA_FRAMEBUFFER</a> and the init hints <a class=\"el\" href=\"intro_guide.html#GLFW_COCOA_CHDIR_RESOURCES_hint\">GLFW_COCOA_CHDIR_RESOURCES</a> and <a class=\"el\" href=\"intro_guide.html#GLFW_COCOA_MENUBAR_hint\">GLFW_COCOA_MENUBAR</a>.</p>\n<p>Existing projects and makefiles that set these options or define these macros during compilation of GLFW will still build but it will have no effect and the default behaviors will be used.</p>\n<h3><a class=\"anchor\" id=\"vulkan_sdk_33\"></a>\nLunarG Vulkan SDK dependency</h3>\n<p>The GLFW test programs that previously depended on the LunarG Vulkan SDK now instead uses a Vulkan loader generated by <a href=\"https://github.com/Dav1dde/glad\">glad2</a>. This means the GLFW CMake files no longer look for the Vulkan SDK.</p>\n<p>Existing CMake projects that depended on the Vulkan SDK cache variables from GLFW will need to call <code>find_package(Vulkan)</code> themselves. CMake 3.7 and later already comes with a <a href=\"https://cmake.org/cmake/help/latest/module/FindVulkan.html\">Vulkan find module</a> similar to the one GLFW previously included.</p>\n<h3><a class=\"anchor\" id=\"lib_suffix_33\"></a>\nCMake option LIB_SUFFIX</h3>\n<p>The <code>LIB_SUFFIX</code> CMake option has been removed. GLFW now uses the GNUInstallDirs CMake package to handle platform specific details like the library directory suffix and the <code>LIB_SUFFIX</code> CMake option has been removed.</p>\n<p>Existing projects and makefiles that set the <code>LIB_SUFFIX</code> option will use the suffix chosen by the GNUInstallDirs package and the option will be ignored.</p>\n<h3><a class=\"anchor\" id=\"mir_removed_33\"></a>\nMir support</h3>\n<p>The experimental Mir support has been completely removed as the Mir project has implemented support for the Wayland protocol and is recommending that applications use that instead.</p>\n<p>Existing projects and makefiles that select Mir when compiling GLFW will fail. Use Wayland or X11 instead.</p>\n<h2><a class=\"anchor\" id=\"symbols_33\"></a>\nNew symbols in version 3.3</h2>\n<h3><a class=\"anchor\" id=\"functions_33\"></a>\nNew functions in version 3.3</h3>\n<ul>\n<li><a class=\"el\" href=\"group__init.html#ga110fd1d3f0412822b4f1908c026f724a\">glfwInitHint</a></li>\n<li><a class=\"el\" href=\"group__init.html#ga944986b4ec0b928d488141f92982aa18\">glfwGetError</a></li>\n<li><a class=\"el\" href=\"group__monitor.html#ga7387a3bdb64bfe8ebf2b9e54f5b6c9d0\">glfwGetMonitorWorkarea</a></li>\n<li><a class=\"el\" href=\"group__monitor.html#gad3152e84465fa620b601265ebfcdb21b\">glfwGetMonitorContentScale</a></li>\n<li><a class=\"el\" href=\"group__monitor.html#gac2d4209016b049222877f620010ed0d8\">glfwGetMonitorUserPointer</a></li>\n<li><a class=\"el\" href=\"group__monitor.html#ga702750e24313a686d3637297b6e85fda\">glfwSetMonitorUserPointer</a></li>\n<li><a class=\"el\" href=\"group__window.html#ga8cb2782861c9d997bcf2dea97f363e5f\">glfwWindowHintString</a></li>\n<li><a class=\"el\" href=\"group__window.html#gaf5d31de9c19c4f994facea64d2b3106c\">glfwGetWindowContentScale</a></li>\n<li><a class=\"el\" href=\"group__window.html#gad09f0bd7a6307c4533b7061828480a84\">glfwGetWindowOpacity</a></li>\n<li><a class=\"el\" href=\"group__window.html#gac31caeb3d1088831b13d2c8a156802e9\">glfwSetWindowOpacity</a></li>\n<li><a class=\"el\" href=\"group__window.html#ga2f8d59323fc4692c1d54ba08c863a703\">glfwRequestWindowAttention</a></li>\n<li><a class=\"el\" href=\"group__window.html#gace2afda29b4116ec012e410a6819033e\">glfwSetWindowAttrib</a></li>\n<li><a class=\"el\" href=\"group__window.html#gacbe64c339fbd94885e62145563b6dc93\">glfwSetWindowMaximizeCallback</a></li>\n<li><a class=\"el\" href=\"group__window.html#gaf2832ebb5aa6c252a2d261de002c92d6\">glfwSetWindowContentScaleCallback</a></li>\n<li><a class=\"el\" href=\"group__input.html#gae4ee0dbd0d256183e1ea4026d897e1c2\">glfwRawMouseMotionSupported</a></li>\n<li><a class=\"el\" href=\"group__input.html#ga67ddd1b7dcbbaff03e4a76c0ea67103a\">glfwGetKeyScancode</a></li>\n<li><a class=\"el\" href=\"group__input.html#ga2d8d0634bb81c180899aeb07477a67ea\">glfwGetJoystickHats</a></li>\n<li><a class=\"el\" href=\"group__input.html#gae168c2c0b8cf2a1cb67c6b3c00bdd543\">glfwGetJoystickGUID</a></li>\n<li><a class=\"el\" href=\"group__input.html#ga06290acb7ed23895bf26b8e981827ebd\">glfwGetJoystickUserPointer</a></li>\n<li><a class=\"el\" href=\"group__input.html#ga6b2f72d64d636b48a727b437cbb7489e\">glfwSetJoystickUserPointer</a></li>\n<li><a class=\"el\" href=\"group__input.html#gad0f676860f329d80f7e47e9f06a96f00\">glfwJoystickIsGamepad</a></li>\n<li><a class=\"el\" href=\"group__input.html#gaed5104612f2fa8e66aa6e846652ad00f\">glfwUpdateGamepadMappings</a></li>\n<li><a class=\"el\" href=\"group__input.html#ga5c71e3533b2d384db9317fcd7661b210\">glfwGetGamepadName</a></li>\n<li><a class=\"el\" href=\"group__input.html#gadccddea8bce6113fa459de379ddaf051\">glfwGetGamepadState</a></li>\n</ul>\n<h3><a class=\"anchor\" id=\"types_33\"></a>\nNew types in version 3.3</h3>\n<ul>\n<li><a class=\"el\" href=\"group__window.html#ga7269a3d1cb100c0081f95fc09afa4949\">GLFWwindowmaximizefun</a></li>\n<li><a class=\"el\" href=\"group__window.html#ga1da46b65eafcc1a7ff0adb8f4a7b72fd\">GLFWwindowcontentscalefun</a></li>\n<li><a class=\"el\" href=\"structGLFWgamepadstate.html\">GLFWgamepadstate</a></li>\n</ul>\n<h3><a class=\"anchor\" id=\"constants_33\"></a>\nNew constants in version 3.3</h3>\n<ul>\n<li><a class=\"el\" href=\"group__errors.html#gafa30deee5db4d69c4c93d116ed87dbf4\">GLFW_NO_ERROR</a></li>\n<li><a class=\"el\" href=\"intro_guide.html#GLFW_JOYSTICK_HAT_BUTTONS\">GLFW_JOYSTICK_HAT_BUTTONS</a></li>\n<li><a class=\"el\" href=\"group__init.html#gab937983147a3158d45f88fad7129d9f2\">GLFW_COCOA_CHDIR_RESOURCES</a></li>\n<li><a class=\"el\" href=\"group__init.html#ga71e0b4ce2f2696a84a9b8c5e12dc70cf\">GLFW_COCOA_MENUBAR</a></li>\n<li><a class=\"el\" href=\"group__window.html#ga5ac0847c0aa0b3619f2855707b8a7a77\">GLFW_CENTER_CURSOR</a></li>\n<li><a class=\"el\" href=\"group__window.html#ga60a0578c3b9449027d683a9c6abb9f14\">GLFW_TRANSPARENT_FRAMEBUFFER</a></li>\n<li><a class=\"el\" href=\"group__window.html#ga8665c71c6fa3d22425c6a0e8a3f89d8a\">GLFW_HOVERED</a></li>\n<li><a class=\"el\" href=\"group__window.html#gafa94b1da34bfd6488c0d709761504dfc\">GLFW_FOCUS_ON_SHOW</a></li>\n<li><a class=\"el\" href=\"window_guide.html#GLFW_SCALE_TO_MONITOR\">GLFW_SCALE_TO_MONITOR</a></li>\n<li><a class=\"el\" href=\"group__window.html#gab6ef2d02eb55800d249ccf1af253c35e\">GLFW_COCOA_RETINA_FRAMEBUFFER</a></li>\n<li><a class=\"el\" href=\"group__window.html#ga70fa0fbc745de6aa824df79a580e84b5\">GLFW_COCOA_FRAME_NAME</a></li>\n<li><a class=\"el\" href=\"group__window.html#ga53c84ed2ddd94e15bbd44b1f6f7feafc\">GLFW_COCOA_GRAPHICS_SWITCHING</a></li>\n<li><a class=\"el\" href=\"group__window.html#gae5a9ea2fccccd92edbd343fc56461114\">GLFW_X11_CLASS_NAME</a></li>\n<li><a class=\"el\" href=\"group__window.html#ga494c3c0d911e4b860b946530a3e389e8\">GLFW_X11_INSTANCE_NAME</a></li>\n<li><a class=\"el\" href=\"glfw3_8h.html#afd34a473af9fa81f317910ea371b19e3\">GLFW_OSMESA_CONTEXT_API</a></li>\n<li><a class=\"el\" href=\"group__hat__state.html#gae2c0bcb7aec609e4736437554f6638fd\">GLFW_HAT_CENTERED</a></li>\n<li><a class=\"el\" href=\"group__hat__state.html#ga8c9720c76cd1b912738159ed74c85b36\">GLFW_HAT_UP</a></li>\n<li><a class=\"el\" href=\"group__hat__state.html#ga252586e3bbde75f4b0e07ad3124867f5\">GLFW_HAT_RIGHT</a></li>\n<li><a class=\"el\" href=\"group__hat__state.html#gad60d1fd0dc85c18f2642cbae96d3deff\">GLFW_HAT_DOWN</a></li>\n<li><a class=\"el\" href=\"group__hat__state.html#gac775f4b3154fdf5db93eb432ba546dff\">GLFW_HAT_LEFT</a></li>\n<li><a class=\"el\" href=\"group__hat__state.html#ga94aea0ae241a8b902883536c592ee693\">GLFW_HAT_RIGHT_UP</a></li>\n<li><a class=\"el\" href=\"group__hat__state.html#gad7f0e4f52fd68d734863aaeadab3a3f5\">GLFW_HAT_RIGHT_DOWN</a></li>\n<li><a class=\"el\" href=\"group__hat__state.html#ga638f0e20dc5de90de21a33564e8ce129\">GLFW_HAT_LEFT_UP</a></li>\n<li><a class=\"el\" href=\"group__hat__state.html#ga76c02baf1ea345fcbe3e8ff176a73e19\">GLFW_HAT_LEFT_DOWN</a></li>\n<li><a class=\"el\" href=\"group__mods.html#gaefeef8fcf825a6e43e241b337897200f\">GLFW_MOD_CAPS_LOCK</a></li>\n<li><a class=\"el\" href=\"group__mods.html#ga64e020b8a42af8376e944baf61feecbe\">GLFW_MOD_NUM_LOCK</a></li>\n<li><a class=\"el\" href=\"input_guide.html#GLFW_LOCK_KEY_MODS\">GLFW_LOCK_KEY_MODS</a></li>\n<li><a class=\"el\" href=\"input_guide.html#GLFW_RAW_MOUSE_MOTION\">GLFW_RAW_MOUSE_MOTION</a></li>\n<li><a class=\"el\" href=\"group__gamepad__buttons.html#gae055a12fbf4b48b5954c8e1cd129b810\">GLFW_GAMEPAD_BUTTON_A</a></li>\n<li><a class=\"el\" href=\"group__gamepad__buttons.html#ga2228a6512fd5950cdb51ba07846546fa\">GLFW_GAMEPAD_BUTTON_B</a></li>\n<li><a class=\"el\" href=\"group__gamepad__buttons.html#ga52cc94785cf3fe9a12e246539259887c\">GLFW_GAMEPAD_BUTTON_X</a></li>\n<li><a class=\"el\" href=\"group__gamepad__buttons.html#gafc931248bda494b530cbe057f386a5ed\">GLFW_GAMEPAD_BUTTON_Y</a></li>\n<li><a class=\"el\" href=\"group__gamepad__buttons.html#ga17d67b4f39a39d6b813bd1567a3507c3\">GLFW_GAMEPAD_BUTTON_LEFT_BUMPER</a></li>\n<li><a class=\"el\" href=\"group__gamepad__buttons.html#gadfbc9ea9bf3aae896b79fa49fdc85c7f\">GLFW_GAMEPAD_BUTTON_RIGHT_BUMPER</a></li>\n<li><a class=\"el\" href=\"group__gamepad__buttons.html#gabc7c0264ce778835b516a472b47f6caf\">GLFW_GAMEPAD_BUTTON_BACK</a></li>\n<li><a class=\"el\" href=\"group__gamepad__buttons.html#ga04606949dd9139434b8a1bedf4ac1021\">GLFW_GAMEPAD_BUTTON_START</a></li>\n<li><a class=\"el\" href=\"group__gamepad__buttons.html#ga7fa48c32e5b2f5db2f080aa0b8b573dc\">GLFW_GAMEPAD_BUTTON_GUIDE</a></li>\n<li><a class=\"el\" href=\"group__gamepad__buttons.html#ga3e089787327454f7bfca7364d6ca206a\">GLFW_GAMEPAD_BUTTON_LEFT_THUMB</a></li>\n<li><a class=\"el\" href=\"group__gamepad__buttons.html#ga1c003f52b5aebb45272475b48953b21a\">GLFW_GAMEPAD_BUTTON_RIGHT_THUMB</a></li>\n<li><a class=\"el\" href=\"group__gamepad__buttons.html#ga4f1ed6f974a47bc8930d4874a283476a\">GLFW_GAMEPAD_BUTTON_DPAD_UP</a></li>\n<li><a class=\"el\" href=\"group__gamepad__buttons.html#gae2a780d2a8c79e0b77c0b7b601ca57c6\">GLFW_GAMEPAD_BUTTON_DPAD_RIGHT</a></li>\n<li><a class=\"el\" href=\"group__gamepad__buttons.html#ga8f2b731b97d80f90f11967a83207665c\">GLFW_GAMEPAD_BUTTON_DPAD_DOWN</a></li>\n<li><a class=\"el\" href=\"group__gamepad__buttons.html#gaf0697e0e8607b2ebe1c93b0c6befe301\">GLFW_GAMEPAD_BUTTON_DPAD_LEFT</a></li>\n<li><a class=\"el\" href=\"group__gamepad__buttons.html#ga5cc98882f4f81dacf761639a567f61eb\">GLFW_GAMEPAD_BUTTON_LAST</a></li>\n<li><a class=\"el\" href=\"group__gamepad__buttons.html#gaf08d0df26527c9305253422bd98ed63a\">GLFW_GAMEPAD_BUTTON_CROSS</a></li>\n<li><a class=\"el\" href=\"group__gamepad__buttons.html#gaaef094b3dacbf15f272b274516839b82\">GLFW_GAMEPAD_BUTTON_CIRCLE</a></li>\n<li><a class=\"el\" href=\"group__gamepad__buttons.html#gafc7821e87d77d41ed2cd3e1f726ec35f\">GLFW_GAMEPAD_BUTTON_SQUARE</a></li>\n<li><a class=\"el\" href=\"group__gamepad__buttons.html#ga3a7ef6bcb768a08cd3bf142f7f09f802\">GLFW_GAMEPAD_BUTTON_TRIANGLE</a></li>\n<li><a class=\"el\" href=\"group__gamepad__axes.html#ga544e396d092036a7d80c1e5f233f7a38\">GLFW_GAMEPAD_AXIS_LEFT_X</a></li>\n<li><a class=\"el\" href=\"group__gamepad__axes.html#ga64dcf2c6e9be50b7c556ff7671996dd5\">GLFW_GAMEPAD_AXIS_LEFT_Y</a></li>\n<li><a class=\"el\" href=\"group__gamepad__axes.html#gabd6785106cd3c5a044a6e49a395ee2fc\">GLFW_GAMEPAD_AXIS_RIGHT_X</a></li>\n<li><a class=\"el\" href=\"group__gamepad__axes.html#ga1cc20566d44d521b7183681a8e88e2e4\">GLFW_GAMEPAD_AXIS_RIGHT_Y</a></li>\n<li><a class=\"el\" href=\"group__gamepad__axes.html#ga6d79561dd8907c37354426242901b86e\">GLFW_GAMEPAD_AXIS_LEFT_TRIGGER</a></li>\n<li><a class=\"el\" href=\"group__gamepad__axes.html#ga121a7d5d20589a423cd1634dd6ee6eab\">GLFW_GAMEPAD_AXIS_RIGHT_TRIGGER</a></li>\n<li><a class=\"el\" href=\"group__gamepad__axes.html#ga0818fd9433e1359692b7443293e5ac86\">GLFW_GAMEPAD_AXIS_LAST</a></li>\n</ul>\n<h1><a class=\"anchor\" id=\"news_32\"></a>\nRelease notes for 3.2</h1>\n<p>These are the release notes for version 3.2. For a more detailed view including all fixed bugs see the <a href=\"https://www.glfw.org/changelog.html\">version history</a>.</p>\n<h2><a class=\"anchor\" id=\"features_32\"></a>\nNew features in version 3.2</h2>\n<h3><a class=\"anchor\" id=\"news_32_vulkan\"></a>\nSupport for Vulkan</h3>\n<p>GLFW now supports basic integration with Vulkan with <a class=\"el\" href=\"group__vulkan.html#ga2e7f30931e02464b5bc8d0d4b6f9fe2b\">glfwVulkanSupported</a>, <a class=\"el\" href=\"group__vulkan.html#ga1abcbe61033958f22f63ef82008874b1\">glfwGetRequiredInstanceExtensions</a>, <a class=\"el\" href=\"group__vulkan.html#gadf228fac94c5fd8f12423ec9af9ff1e9\">glfwGetInstanceProcAddress</a>, <a class=\"el\" href=\"group__vulkan.html#gaff3823355cdd7e2f3f9f4d9ea9518d92\">glfwGetPhysicalDevicePresentationSupport</a> and <a class=\"el\" href=\"group__vulkan.html#ga1a24536bec3f80b08ead18e28e6ae965\">glfwCreateWindowSurface</a>. Vulkan header inclusion can be selected with <a class=\"el\" href=\"build_guide.html#GLFW_INCLUDE_VULKAN\">GLFW_INCLUDE_VULKAN</a>.</p>\n<h3><a class=\"anchor\" id=\"news_32_setwindowmonitor\"></a>\nWindow mode switching</h3>\n<p>GLFW now supports switching between windowed and full screen modes and updating the monitor and desired resolution and refresh rate of full screen windows with <a class=\"el\" href=\"group__window.html#ga81c76c418af80a1cce7055bccb0ae0a7\">glfwSetWindowMonitor</a>.</p>\n<h3><a class=\"anchor\" id=\"news_32_maximize\"></a>\nWindow maxmimization support</h3>\n<p>GLFW now supports window maximization with <a class=\"el\" href=\"group__window.html#ga3f541387449d911274324ae7f17ec56b\">glfwMaximizeWindow</a> and the <a class=\"el\" href=\"group__window.html#gad8ccb396253ad0b72c6d4c917eb38a03\">GLFW_MAXIMIZED</a> window hint and attribute.</p>\n<h3><a class=\"anchor\" id=\"news_32_focus\"></a>\nWindow input focus control</h3>\n<p>GLFW now supports giving windows input focus with <a class=\"el\" href=\"group__window.html#ga873780357abd3f3a081d71a40aae45a1\">glfwFocusWindow</a>.</p>\n<h3><a class=\"anchor\" id=\"news_32_sizelimits\"></a>\nWindow size limit support</h3>\n<p>GLFW now supports setting both absolute and relative window size limits with <a class=\"el\" href=\"group__window.html#gac314fa6cec7d2d307be9963e2709cc90\">glfwSetWindowSizeLimits</a> and <a class=\"el\" href=\"group__window.html#ga72ac8cb1ee2e312a878b55153d81b937\">glfwSetWindowAspectRatio</a>.</p>\n<h3><a class=\"anchor\" id=\"news_32_keyname\"></a>\nLocalized key names</h3>\n<p>GLFW now supports querying the localized name of printable keys with <a class=\"el\" href=\"group__input.html#ga237a182e5ec0b21ce64543f3b5e7e2be\">glfwGetKeyName</a>, either by key token or by scancode.</p>\n<h3><a class=\"anchor\" id=\"news_32_waittimeout\"></a>\nWait for events with timeout</h3>\n<p>GLFW now supports waiting for events for a set amount of time with <a class=\"el\" href=\"group__window.html#ga605a178db92f1a7f1a925563ef3ea2cf\">glfwWaitEventsTimeout</a>.</p>\n<h3><a class=\"anchor\" id=\"news_32_icon\"></a>\nWindow icon support</h3>\n<p>GLFW now supports setting the icon of windows with <a class=\"el\" href=\"group__window.html#gadd7ccd39fe7a7d1f0904666ae5932dc5\">glfwSetWindowIcon</a>.</p>\n<h3><a class=\"anchor\" id=\"news_32_timer\"></a>\nRaw timer access</h3>\n<p>GLFW now supports raw timer values with <a class=\"el\" href=\"group__input.html#ga09b2bd37d328e0b9456c7ec575cc26aa\">glfwGetTimerValue</a> and <a class=\"el\" href=\"group__input.html#ga3289ee876572f6e91f06df3a24824443\">glfwGetTimerFrequency</a>.</p>\n<h3><a class=\"anchor\" id=\"news_32_joystick\"></a>\nJoystick connection callback</h3>\n<p>GLFW now supports notifying when a joystick has been connected or disconnected with <a class=\"el\" href=\"group__input.html#ga2f60a0e5b7bd8d1b7344dc0a7cb32b4c\">glfwSetJoystickCallback</a>.</p>\n<h3><a class=\"anchor\" id=\"news_32_noapi\"></a>\nContext-less windows</h3>\n<p>GLFW now supports creating windows without a OpenGL or OpenGL ES context by setting the <a class=\"el\" href=\"window_guide.html#GLFW_CLIENT_API_hint\">GLFW_CLIENT_API</a> hint to <code>GLFW_NO_API</code>.</p>\n<h3><a class=\"anchor\" id=\"news_32_contextapi\"></a>\nRun-time context creation API selection</h3>\n<p>GLFW now supports selecting and querying the context creation API at run-time with the <a class=\"el\" href=\"group__window.html#ga5154cebfcd831c1cc63a4d5ac9bb4486\">GLFW_CONTEXT_CREATION_API</a> hint and attribute.</p>\n<h3><a class=\"anchor\" id=\"news_32_noerror\"></a>\nError-free context creation</h3>\n<p>GLFW now supports creating and querying OpenGL and OpenGL ES contexts that do not emit errors with the <a class=\"el\" href=\"group__window.html#ga5a52fdfd46d8249c211f923675728082\">GLFW_CONTEXT_NO_ERROR</a> hint, provided the machine supports the <code>GL_KHR_no_error</code> extension.</p>\n<h3><a class=\"anchor\" id=\"news_32_cmake\"></a>\nCMake config-file package support</h3>\n<p>GLFW now supports being used as a <a class=\"el\" href=\"build_guide.html#build_link_cmake_package\">config-file package</a> from other projects for easy linking with the library and its dependencies.</p>\n<h1><a class=\"anchor\" id=\"news_31\"></a>\nRelease notes for 3.1</h1>\n<p>These are the release notes for version 3.1. For a more detailed view including all fixed bugs see the <a href=\"https://www.glfw.org/changelog.html\">version history</a>.</p>\n<h2><a class=\"anchor\" id=\"features_31\"></a>\nNew features in version 3.1</h2>\n<h3><a class=\"anchor\" id=\"news_31_cursor\"></a>\nCustom mouse cursor images</h3>\n<p>GLFW now supports creating and setting both custom cursor images and standard cursor shapes. They are created with <a class=\"el\" href=\"group__input.html#gafca356935e10135016aa49ffa464c355\">glfwCreateCursor</a> or <a class=\"el\" href=\"group__input.html#gaa65f416d03ebbbb5b8db71a489fcb894\">glfwCreateStandardCursor</a>, set with <a class=\"el\" href=\"group__input.html#gad3b4f38c8d5dae036bc8fa959e18343e\">glfwSetCursor</a> and destroyed with <a class=\"el\" href=\"group__input.html#ga81b952cd1764274d0db7fb3c5a79ba6a\">glfwDestroyCursor</a>.</p>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"input_guide.html#cursor_object\">Cursor objects</a></dd></dl>\n<h3><a class=\"anchor\" id=\"news_31_drop\"></a>\nPath drop event</h3>\n<p>GLFW now provides a callback for receiving the paths of files and directories dropped onto GLFW windows. The callback is set with <a class=\"el\" href=\"group__input.html#gab773f0ee0a07cff77a210cea40bc1f6b\">glfwSetDropCallback</a>.</p>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"input_guide.html#path_drop\">Path drop input</a></dd></dl>\n<h3><a class=\"anchor\" id=\"news_31_emptyevent\"></a>\nMain thread wake-up</h3>\n<p>GLFW now provides the <a class=\"el\" href=\"group__window.html#gab5997a25187e9fd5c6f2ecbbc8dfd7e9\">glfwPostEmptyEvent</a> function for posting an empty event from another thread to the main thread event queue, causing <a class=\"el\" href=\"group__window.html#ga554e37d781f0a997656c26b2c56c835e\">glfwWaitEvents</a> to return.</p>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"input_guide.html#events\">Event processing</a></dd></dl>\n<h3><a class=\"anchor\" id=\"news_31_framesize\"></a>\nWindow frame size query</h3>\n<p>GLFW now supports querying the size, on each side, of the frame around the content area of a window, with <a class=\"el\" href=\"group__window.html#ga1a9fd382058c53101b21cf211898f1f1\">glfwGetWindowFrameSize</a>.</p>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"window_guide.html#window_size\">Window size</a></dd></dl>\n<h3><a class=\"anchor\" id=\"news_31_autoiconify\"></a>\nSimultaneous multi-monitor rendering</h3>\n<p>GLFW now supports disabling auto-iconification of full screen windows with the <a class=\"el\" href=\"window_guide.html#GLFW_AUTO_ICONIFY_hint\">GLFW_AUTO_ICONIFY</a> window hint. This is intended for people building multi-monitor installations, where you need windows to stay in full screen despite losing input focus.</p>\n<h3><a class=\"anchor\" id=\"news_31_floating\"></a>\nFloating windows</h3>\n<p>GLFW now supports floating windows, also called topmost or always on top, for easier debugging with the <a class=\"el\" href=\"group__window.html#ga7fb0be51407783b41adbf5bec0b09d80\">GLFW_FLOATING</a> window hint and attribute.</p>\n<h3><a class=\"anchor\" id=\"news_31_focused\"></a>\nInitially unfocused windows</h3>\n<p>GLFW now supports preventing a windowed mode window from gaining input focus on creation, with the <a class=\"el\" href=\"window_guide.html#GLFW_FOCUSED_hint\">GLFW_FOCUSED</a> window hint.</p>\n<h3><a class=\"anchor\" id=\"news_31_direct\"></a>\nDirect access for window attributes and cursor position</h3>\n<p>GLFW now queries the window input focus, visibility and iconification attributes and the cursor position directly instead of returning cached data.</p>\n<h3><a class=\"anchor\" id=\"news_31_charmods\"></a>\nCharacter with modifiers callback</h3>\n<p>GLFW now provides a callback for character events with modifier key bits. The callback is set with <a class=\"el\" href=\"group__input.html#ga0b7f4ad13c2b17435ff13b6dcfb4e43c\">glfwSetCharModsCallback</a>. Unlike the regular character callback, this will report character events that will not result in a character being input, for example if the Control key is held down.</p>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"input_guide.html#input_char\">Text input</a></dd></dl>\n<h3><a class=\"anchor\" id=\"news_31_single\"></a>\nSingle buffered framebuffers</h3>\n<p>GLFW now supports the creation of single buffered windows, with the <a class=\"el\" href=\"window_guide.html#GLFW_DOUBLEBUFFER\">GLFW_DOUBLEBUFFER</a> hint.</p>\n<h3><a class=\"anchor\" id=\"news_31_glext\"></a>\nMacro for including extension header</h3>\n<p>GLFW now includes the extension header appropriate for the chosen OpenGL or OpenGL ES header when <a class=\"el\" href=\"build_guide.html#GLFW_INCLUDE_GLEXT\">GLFW_INCLUDE_GLEXT</a> is defined. GLFW does not provide these headers. They must be provided by your development environment or your OpenGL or OpenGL ES SDK.</p>\n<h3><a class=\"anchor\" id=\"news_31_release\"></a>\nContext release behaviors</h3>\n<p>GLFW now supports controlling and querying whether the pipeline is flushed when a context is made non-current, with the <a class=\"el\" href=\"group__window.html#ga72b648a8378fe3310c7c7bbecc0f7be6\">GLFW_CONTEXT_RELEASE_BEHAVIOR</a> hint and attribute, provided the machine supports the <code>GL_KHR_context_flush_control</code> extension.</p>\n<h3><a class=\"anchor\" id=\"news_31_wayland\"></a>\n(Experimental) Wayland support</h3>\n<p>GLFW now has an <em>experimental</em> Wayland display protocol backend that can be selected on Linux with a CMake option.</p>\n<h3><a class=\"anchor\" id=\"news_31_mir\"></a>\n(Experimental) Mir support</h3>\n<p>GLFW now has an <em>experimental</em> Mir display server backend that can be selected on Linux with a CMake option.</p>\n<h1><a class=\"anchor\" id=\"news_30\"></a>\nRelease notes for 3.0</h1>\n<p>These are the release notes for version 3.0. For a more detailed view including all fixed bugs see the <a href=\"https://www.glfw.org/changelog.html\">version history</a>.</p>\n<h2><a class=\"anchor\" id=\"features_30\"></a>\nNew features in version 3.0</h2>\n<h3><a class=\"anchor\" id=\"news_30_cmake\"></a>\nCMake build system</h3>\n<p>GLFW now uses the CMake build system instead of the various makefiles and project files used by earlier versions. CMake is available for all platforms supported by GLFW, is present in most package systems and can generate makefiles and/or project files for most popular development environments.</p>\n<p>For more information on how to use CMake, see the <a href=\"https://cmake.org/cmake/help/documentation.html\">CMake manual</a>.</p>\n<h3><a class=\"anchor\" id=\"news_30_multiwnd\"></a>\nMulti-window support</h3>\n<p>GLFW now supports the creation of multiple windows, each with their own OpenGL or OpenGL ES context, and all window functions now take a window handle. Event callbacks are now per-window and are provided with the handle of the window that received the event. The <a class=\"el\" href=\"group__context.html#ga1c04dc242268f827290fe40aa1c91157\">glfwMakeContextCurrent</a> function has been added to select which context is current on a given thread.</p>\n<h3><a class=\"anchor\" id=\"news_30_multimon\"></a>\nMulti-monitor support</h3>\n<p>GLFW now explicitly supports multiple monitors. They can be enumerated with <a class=\"el\" href=\"group__monitor.html#ga3fba51c8bd36491d4712aa5bd074a537\">glfwGetMonitors</a>, queried with <a class=\"el\" href=\"group__monitor.html#ga820b0ce9a5237d645ea7cbb4bd383458\">glfwGetVideoModes</a>, <a class=\"el\" href=\"group__monitor.html#ga102f54e7acc9149edbcf0997152df8c9\">glfwGetMonitorPos</a>, <a class=\"el\" href=\"group__monitor.html#ga79a34ee22ff080ca954a9663e4679daf\">glfwGetMonitorName</a> and <a class=\"el\" href=\"group__monitor.html#ga7d8bffc6c55539286a6bd20d32a8d7ea\">glfwGetMonitorPhysicalSize</a>, and specified at window creation to make the newly created window full screen on that specific monitor.</p>\n<h3><a class=\"anchor\" id=\"news_30_unicode\"></a>\nUnicode support</h3>\n<p>All string arguments to GLFW functions and all strings returned by GLFW now use the UTF-8 encoding. This includes the window title, error string, clipboard text, monitor and joystick names as well as the extension function arguments (as ASCII is a subset of UTF-8).</p>\n<h3><a class=\"anchor\" id=\"news_30_clipboard\"></a>\nClipboard text I/O</h3>\n<p>GLFW now supports reading and writing plain text to and from the system clipboard, with the <a class=\"el\" href=\"group__input.html#ga5aba1d704d9ab539282b1fbe9f18bb94\">glfwGetClipboardString</a> and <a class=\"el\" href=\"group__input.html#gaba1f022c5eb07dfac421df34cdcd31dd\">glfwSetClipboardString</a> functions.</p>\n<h3><a class=\"anchor\" id=\"news_30_gamma\"></a>\nGamma ramp support</h3>\n<p>GLFW now supports setting and reading back the gamma ramp of monitors, with the <a class=\"el\" href=\"group__monitor.html#gab7c41deb2219bde3e1eb756ddaa9ec80\">glfwGetGammaRamp</a> and <a class=\"el\" href=\"group__monitor.html#ga583f0ffd0d29613d8cd172b996bbf0dd\">glfwSetGammaRamp</a> functions. There is also <a class=\"el\" href=\"group__monitor.html#ga6ac582625c990220785ddd34efa3169a\">glfwSetGamma</a>, which generates a ramp from a gamma value and then sets it.</p>\n<h3><a class=\"anchor\" id=\"news_30_gles\"></a>\nOpenGL ES support</h3>\n<p>GLFW now supports the creation of OpenGL ES contexts, by setting the <a class=\"el\" href=\"window_guide.html#GLFW_CLIENT_API_hint\">GLFW_CLIENT_API</a> hint to <code>GLFW_OPENGL_ES_API</code>, where creation of such contexts are supported. Note that GLFW <em>does not implement</em> OpenGL ES, so your driver must provide support in a way usable by GLFW. Modern Nvidia and Intel drivers support creation of OpenGL ES context using the GLX and WGL APIs, while AMD provides an EGL implementation instead.</p>\n<h3><a class=\"anchor\" id=\"news_30_egl\"></a>\n(Experimental) EGL support</h3>\n<p>GLFW now has an experimental EGL context creation back end that can be selected through CMake options.</p>\n<h3><a class=\"anchor\" id=\"news_30_hidpi\"></a>\nHigh-DPI support</h3>\n<p>GLFW now supports high-DPI monitors on both Windows and macOS, giving windows full resolution framebuffers where other UI elements are scaled up. To achieve this, <a class=\"el\" href=\"group__window.html#ga0e2637a4161afb283f5300c7f94785c9\">glfwGetFramebufferSize</a> and <a class=\"el\" href=\"group__window.html#gab3fb7c3366577daef18c0023e2a8591f\">glfwSetFramebufferSizeCallback</a> have been added. These work with pixels, while the rest of the GLFW API works with screen coordinates. This is important as OpenGL uses pixels, not screen coordinates.</p>\n<h3><a class=\"anchor\" id=\"news_30_error\"></a>\nError callback</h3>\n<p>GLFW now has an error callback, which can provide your application with much more detailed diagnostics than was previously possible. The callback is passed an error code and a description string.</p>\n<h3><a class=\"anchor\" id=\"news_30_wndptr\"></a>\nPer-window user pointer</h3>\n<p>Each window now has a user-defined pointer, retrieved with <a class=\"el\" href=\"group__window.html#ga17807ce0f45ac3f8bb50d6dcc59a4e06\">glfwGetWindowUserPointer</a> and set with <a class=\"el\" href=\"group__window.html#ga3d2fc6026e690ab31a13f78bc9fd3651\">glfwSetWindowUserPointer</a>, to make it easier to integrate GLFW into C++ code.</p>\n<h3><a class=\"anchor\" id=\"news_30_iconifyfun\"></a>\nWindow iconification callback</h3>\n<p>Each window now has a callback for iconification and restoration events, which is set with <a class=\"el\" href=\"group__window.html#gac793e9efd255567b5fb8b445052cfd3e\">glfwSetWindowIconifyCallback</a>.</p>\n<h3><a class=\"anchor\" id=\"news_30_wndposfun\"></a>\nWindow position callback</h3>\n<p>Each window now has a callback for position events, which is set with <a class=\"el\" href=\"group__window.html#ga08bdfbba88934f9c4f92fd757979ac74\">glfwSetWindowPosCallback</a>.</p>\n<h3><a class=\"anchor\" id=\"news_30_wndpos\"></a>\nWindow position query</h3>\n<p>The position of a window can now be retrieved using <a class=\"el\" href=\"group__window.html#ga73cb526c000876fd8ddf571570fdb634\">glfwGetWindowPos</a>.</p>\n<h3><a class=\"anchor\" id=\"news_30_focusfun\"></a>\nWindow focus callback</h3>\n<p>Each windows now has a callback for focus events, which is set with <a class=\"el\" href=\"group__window.html#gac2d83c4a10f071baf841f6730528e66c\">glfwSetWindowFocusCallback</a>.</p>\n<h3><a class=\"anchor\" id=\"news_30_enterleave\"></a>\nCursor enter/leave callback</h3>\n<p>Each window now has a callback for when the mouse cursor enters or leaves its content area, which is set with <a class=\"el\" href=\"group__input.html#gad27f8ad0142c038a281466c0966817d8\">glfwSetCursorEnterCallback</a>.</p>\n<h3><a class=\"anchor\" id=\"news_30_wndtitle\"></a>\nInitial window title</h3>\n<p>The title of a window is now specified at creation time, as one of the arguments to <a class=\"el\" href=\"group__window.html#ga5c336fddf2cbb5b92f65f10fb6043344\">glfwCreateWindow</a>.</p>\n<h3><a class=\"anchor\" id=\"news_30_hidden\"></a>\nHidden windows</h3>\n<p>Windows can now be hidden with <a class=\"el\" href=\"group__window.html#ga49401f82a1ba5f15db5590728314d47c\">glfwHideWindow</a>, shown using <a class=\"el\" href=\"group__window.html#ga61be47917b72536a148300f46494fc66\">glfwShowWindow</a> and created initially hidden with the <a class=\"el\" href=\"group__window.html#gafb3cdc45297e06d8f1eb13adc69ca6c4\">GLFW_VISIBLE</a> window hint and attribute. This allows for off-screen rendering in a way compatible with most drivers, as well as moving a window to a specific position before showing it.</p>\n<h3><a class=\"anchor\" id=\"news_30_undecorated\"></a>\nUndecorated windows</h3>\n<p>Windowed mode windows can now be created without decorations, e.g. things like a frame, a title bar, with the <a class=\"el\" href=\"group__window.html#ga21b854d36314c94d65aed84405b2f25e\">GLFW_DECORATED</a> window hint and attribute. This allows for the creation of things like splash screens.</p>\n<h3><a class=\"anchor\" id=\"news_30_keymods\"></a>\nModifier key bit masks</h3>\n<p><a class=\"el\" href=\"group__mods.html\">Modifier key bit mask</a> parameters have been added to the <a class=\"el\" href=\"group__input.html#ga39893a4a7e7c3239c98d29c9e084350c\">mouse button</a> and <a class=\"el\" href=\"group__input.html#ga0192a232a41e4e82948217c8ba94fdfd\">key</a> callbacks.</p>\n<h3><a class=\"anchor\" id=\"news_30_scancode\"></a>\nPlatform-specific scancodes</h3>\n<p>A scancode parameter has been added to the <a class=\"el\" href=\"group__input.html#ga0192a232a41e4e82948217c8ba94fdfd\">key callback</a>. Keys that don't have a <a class=\"el\" href=\"group__keys.html\">key token</a> still get passed on with the key parameter set to <code>GLFW_KEY_UNKNOWN</code>. These scancodes will vary between machines and are intended to be used for key bindings.</p>\n<h3><a class=\"anchor\" id=\"news_30_jsname\"></a>\nJoystick names</h3>\n<p>The name of a joystick can now be retrieved using <a class=\"el\" href=\"group__input.html#gafbe3e51f670320908cfe4e20d3e5559e\">glfwGetJoystickName</a>.</p>\n<h3><a class=\"anchor\" id=\"news_30_doxygen\"></a>\nDoxygen documentation</h3>\n<p>You are reading it. </p>\n</div></div><!-- contents -->\n</div><!-- PageDoc -->\n<address class=\"footer\">\n<p>\nLast update on Mon Jan 20 2020 for GLFW 3.3.2\n</p>\n</address>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/news_8dox.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta http-equiv=\"X-UA-Compatible\" content=\"IE=9\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<title>GLFW: news.dox File Reference</title>\n<link href=\"tabs.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"jquery.js\"></script>\n<script type=\"text/javascript\" src=\"dynsections.js\"></script>\n<link href=\"search/search.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"search/searchdata.js\"></script>\n<script type=\"text/javascript\" src=\"search/search.js\"></script>\n<link href=\"doxygen.css\" rel=\"stylesheet\" type=\"text/css\" />\n<link href=\"extra.css\" rel=\"stylesheet\" type=\"text/css\"/>\n</head>\n<body>\n<div id=\"top\"><!-- do not remove this div, it is closed by doxygen! -->\n<div id=\"titlearea\">\n\t<div class=\"glfwheader\">\n\t\t<a href=\"https://www.glfw.org/\" id=\"glfwhome\">GLFW</a>\n\t\t<ul class=\"glfwnavbar\">\n\t\t\t<li><a href=\"https://www.glfw.org/documentation.html\">Documentation</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/download.html\">Download</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/community.html\">Community</a></li>\n\t\t</ul>\n\t</div>\n</div>\n<!-- end header part -->\n<!-- Generated by Doxygen 1.8.16 -->\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\nvar searchBox = new SearchBox(\"searchBox\", \"search\",false,'Search');\n/* @license-end */\n</script>\n<script type=\"text/javascript\" src=\"menudata.js\"></script>\n<script type=\"text/javascript\" src=\"menu.js\"></script>\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\n$(function() {\n  initMenu('',true,false,'search.php','Search');\n  $(document).ready(function() { init_search(); });\n});\n/* @license-end */</script>\n<div id=\"main-nav\"></div>\n<!-- window showing the filter options -->\n<div id=\"MSearchSelectWindow\"\n     onmouseover=\"return searchBox.OnSearchSelectShow()\"\n     onmouseout=\"return searchBox.OnSearchSelectHide()\"\n     onkeydown=\"return searchBox.OnSearchSelectKey(event)\">\n</div>\n\n<!-- iframe showing the search results (closed by default) -->\n<div id=\"MSearchResultsWindow\">\n<iframe src=\"javascript:void(0)\" frameborder=\"0\" \n        name=\"MSearchResults\" id=\"MSearchResults\">\n</iframe>\n</div>\n\n</div><!-- top -->\n<div class=\"header\">\n  <div class=\"headertitle\">\n<div class=\"title\">news.dox File Reference</div>  </div>\n</div><!--header-->\n<div class=\"contents\">\n</div><!-- contents -->\n<address class=\"footer\">\n<p>\nLast update on Mon Jan 20 2020 for GLFW 3.3.2\n</p>\n</address>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/pages.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta http-equiv=\"X-UA-Compatible\" content=\"IE=9\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<title>GLFW: Guides</title>\n<link href=\"tabs.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"jquery.js\"></script>\n<script type=\"text/javascript\" src=\"dynsections.js\"></script>\n<link href=\"search/search.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"search/searchdata.js\"></script>\n<script type=\"text/javascript\" src=\"search/search.js\"></script>\n<link href=\"doxygen.css\" rel=\"stylesheet\" type=\"text/css\" />\n<link href=\"extra.css\" rel=\"stylesheet\" type=\"text/css\"/>\n</head>\n<body>\n<div id=\"top\"><!-- do not remove this div, it is closed by doxygen! -->\n<div id=\"titlearea\">\n\t<div class=\"glfwheader\">\n\t\t<a href=\"https://www.glfw.org/\" id=\"glfwhome\">GLFW</a>\n\t\t<ul class=\"glfwnavbar\">\n\t\t\t<li><a href=\"https://www.glfw.org/documentation.html\">Documentation</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/download.html\">Download</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/community.html\">Community</a></li>\n\t\t</ul>\n\t</div>\n</div>\n<!-- end header part -->\n<!-- Generated by Doxygen 1.8.16 -->\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\nvar searchBox = new SearchBox(\"searchBox\", \"search\",false,'Search');\n/* @license-end */\n</script>\n<script type=\"text/javascript\" src=\"menudata.js\"></script>\n<script type=\"text/javascript\" src=\"menu.js\"></script>\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\n$(function() {\n  initMenu('',true,false,'search.php','Search');\n  $(document).ready(function() { init_search(); });\n});\n/* @license-end */</script>\n<div id=\"main-nav\"></div>\n</div><!-- top -->\n<!-- window showing the filter options -->\n<div id=\"MSearchSelectWindow\"\n     onmouseover=\"return searchBox.OnSearchSelectShow()\"\n     onmouseout=\"return searchBox.OnSearchSelectHide()\"\n     onkeydown=\"return searchBox.OnSearchSelectKey(event)\">\n</div>\n\n<!-- iframe showing the search results (closed by default) -->\n<div id=\"MSearchResultsWindow\">\n<iframe src=\"javascript:void(0)\" frameborder=\"0\" \n        name=\"MSearchResults\" id=\"MSearchResults\">\n</iframe>\n</div>\n\n<div class=\"header\">\n  <div class=\"headertitle\">\n<div class=\"title\">Guides</div>  </div>\n</div><!--header-->\n<div class=\"contents\">\n<div class=\"textblock\">Here is a list of all related documentation pages:</div><div class=\"directory\">\n<table class=\"directory\">\n<tr id=\"row_0_\" class=\"even\"><td class=\"entry\"><span style=\"width:16px;display:inline-block;\">&#160;</span><a class=\"el\" href=\"news.html\" target=\"_self\">Release notes</a></td><td class=\"desc\"></td></tr>\n<tr id=\"row_1_\"><td class=\"entry\"><span style=\"width:16px;display:inline-block;\">&#160;</span><a class=\"el\" href=\"quick_guide.html\" target=\"_self\">Getting started</a></td><td class=\"desc\"></td></tr>\n<tr id=\"row_2_\" class=\"even\"><td class=\"entry\"><span style=\"width:16px;display:inline-block;\">&#160;</span><a class=\"el\" href=\"moving_guide.html\" target=\"_self\">Moving from GLFW 2 to 3</a></td><td class=\"desc\"></td></tr>\n<tr id=\"row_3_\"><td class=\"entry\"><span style=\"width:16px;display:inline-block;\">&#160;</span><a class=\"el\" href=\"compile_guide.html\" target=\"_self\">Compiling GLFW</a></td><td class=\"desc\"></td></tr>\n<tr id=\"row_4_\" class=\"even\"><td class=\"entry\"><span style=\"width:16px;display:inline-block;\">&#160;</span><a class=\"el\" href=\"build_guide.html\" target=\"_self\">Building applications</a></td><td class=\"desc\"></td></tr>\n<tr id=\"row_5_\"><td class=\"entry\"><span style=\"width:16px;display:inline-block;\">&#160;</span><a class=\"el\" href=\"intro_guide.html\" target=\"_self\">Introduction to the API</a></td><td class=\"desc\"></td></tr>\n<tr id=\"row_6_\" class=\"even\"><td class=\"entry\"><span style=\"width:16px;display:inline-block;\">&#160;</span><a class=\"el\" href=\"context_guide.html\" target=\"_self\">Context guide</a></td><td class=\"desc\"></td></tr>\n<tr id=\"row_7_\"><td class=\"entry\"><span style=\"width:16px;display:inline-block;\">&#160;</span><a class=\"el\" href=\"monitor_guide.html\" target=\"_self\">Monitor guide</a></td><td class=\"desc\"></td></tr>\n<tr id=\"row_8_\" class=\"even\"><td class=\"entry\"><span style=\"width:16px;display:inline-block;\">&#160;</span><a class=\"el\" href=\"window_guide.html\" target=\"_self\">Window guide</a></td><td class=\"desc\"></td></tr>\n<tr id=\"row_9_\"><td class=\"entry\"><span style=\"width:16px;display:inline-block;\">&#160;</span><a class=\"el\" href=\"input_guide.html\" target=\"_self\">Input guide</a></td><td class=\"desc\"></td></tr>\n<tr id=\"row_10_\" class=\"even\"><td class=\"entry\"><span style=\"width:16px;display:inline-block;\">&#160;</span><a class=\"el\" href=\"vulkan_guide.html\" target=\"_self\">Vulkan guide</a></td><td class=\"desc\"></td></tr>\n<tr id=\"row_11_\"><td class=\"entry\"><span style=\"width:16px;display:inline-block;\">&#160;</span><a class=\"el\" href=\"compat_guide.html\" target=\"_self\">Standards conformance</a></td><td class=\"desc\"></td></tr>\n<tr id=\"row_12_\" class=\"even\"><td class=\"entry\"><span style=\"width:16px;display:inline-block;\">&#160;</span><a class=\"el\" href=\"internals_guide.html\" target=\"_self\">Internal structure</a></td><td class=\"desc\"></td></tr>\n<tr id=\"row_13_\"><td class=\"entry\"><span style=\"width:16px;display:inline-block;\">&#160;</span><a class=\"el\" href=\"deprecated.html\" target=\"_self\">Deprecated List</a></td><td class=\"desc\"></td></tr>\n<tr id=\"row_14_\" class=\"even\"><td class=\"entry\"><span style=\"width:16px;display:inline-block;\">&#160;</span><a class=\"el\" href=\"bug.html\" target=\"_self\">Bug List</a></td><td class=\"desc\"></td></tr>\n</table>\n</div><!-- directory -->\n</div><!-- contents -->\n<address class=\"footer\">\n<p>\nLast update on Mon Jan 20 2020 for GLFW 3.3.2\n</p>\n</address>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/quick_8dox.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta http-equiv=\"X-UA-Compatible\" content=\"IE=9\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<title>GLFW: quick.dox File Reference</title>\n<link href=\"tabs.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"jquery.js\"></script>\n<script type=\"text/javascript\" src=\"dynsections.js\"></script>\n<link href=\"search/search.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"search/searchdata.js\"></script>\n<script type=\"text/javascript\" src=\"search/search.js\"></script>\n<link href=\"doxygen.css\" rel=\"stylesheet\" type=\"text/css\" />\n<link href=\"extra.css\" rel=\"stylesheet\" type=\"text/css\"/>\n</head>\n<body>\n<div id=\"top\"><!-- do not remove this div, it is closed by doxygen! -->\n<div id=\"titlearea\">\n\t<div class=\"glfwheader\">\n\t\t<a href=\"https://www.glfw.org/\" id=\"glfwhome\">GLFW</a>\n\t\t<ul class=\"glfwnavbar\">\n\t\t\t<li><a href=\"https://www.glfw.org/documentation.html\">Documentation</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/download.html\">Download</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/community.html\">Community</a></li>\n\t\t</ul>\n\t</div>\n</div>\n<!-- end header part -->\n<!-- Generated by Doxygen 1.8.16 -->\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\nvar searchBox = new SearchBox(\"searchBox\", \"search\",false,'Search');\n/* @license-end */\n</script>\n<script type=\"text/javascript\" src=\"menudata.js\"></script>\n<script type=\"text/javascript\" src=\"menu.js\"></script>\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\n$(function() {\n  initMenu('',true,false,'search.php','Search');\n  $(document).ready(function() { init_search(); });\n});\n/* @license-end */</script>\n<div id=\"main-nav\"></div>\n<!-- window showing the filter options -->\n<div id=\"MSearchSelectWindow\"\n     onmouseover=\"return searchBox.OnSearchSelectShow()\"\n     onmouseout=\"return searchBox.OnSearchSelectHide()\"\n     onkeydown=\"return searchBox.OnSearchSelectKey(event)\">\n</div>\n\n<!-- iframe showing the search results (closed by default) -->\n<div id=\"MSearchResultsWindow\">\n<iframe src=\"javascript:void(0)\" frameborder=\"0\" \n        name=\"MSearchResults\" id=\"MSearchResults\">\n</iframe>\n</div>\n\n</div><!-- top -->\n<div class=\"header\">\n  <div class=\"headertitle\">\n<div class=\"title\">quick.dox File Reference</div>  </div>\n</div><!--header-->\n<div class=\"contents\">\n</div><!-- contents -->\n<address class=\"footer\">\n<p>\nLast update on Mon Jan 20 2020 for GLFW 3.3.2\n</p>\n</address>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/quick_guide.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta http-equiv=\"X-UA-Compatible\" content=\"IE=9\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<title>GLFW: Getting started</title>\n<link href=\"tabs.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"jquery.js\"></script>\n<script type=\"text/javascript\" src=\"dynsections.js\"></script>\n<link href=\"search/search.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"search/searchdata.js\"></script>\n<script type=\"text/javascript\" src=\"search/search.js\"></script>\n<link href=\"doxygen.css\" rel=\"stylesheet\" type=\"text/css\" />\n<link href=\"extra.css\" rel=\"stylesheet\" type=\"text/css\"/>\n</head>\n<body>\n<div id=\"top\"><!-- do not remove this div, it is closed by doxygen! -->\n<div id=\"titlearea\">\n\t<div class=\"glfwheader\">\n\t\t<a href=\"https://www.glfw.org/\" id=\"glfwhome\">GLFW</a>\n\t\t<ul class=\"glfwnavbar\">\n\t\t\t<li><a href=\"https://www.glfw.org/documentation.html\">Documentation</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/download.html\">Download</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/community.html\">Community</a></li>\n\t\t</ul>\n\t</div>\n</div>\n<!-- end header part -->\n<!-- Generated by Doxygen 1.8.16 -->\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\nvar searchBox = new SearchBox(\"searchBox\", \"search\",false,'Search');\n/* @license-end */\n</script>\n<script type=\"text/javascript\" src=\"menudata.js\"></script>\n<script type=\"text/javascript\" src=\"menu.js\"></script>\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\n$(function() {\n  initMenu('',true,false,'search.php','Search');\n  $(document).ready(function() { init_search(); });\n});\n/* @license-end */</script>\n<div id=\"main-nav\"></div>\n<!-- window showing the filter options -->\n<div id=\"MSearchSelectWindow\"\n     onmouseover=\"return searchBox.OnSearchSelectShow()\"\n     onmouseout=\"return searchBox.OnSearchSelectHide()\"\n     onkeydown=\"return searchBox.OnSearchSelectKey(event)\">\n</div>\n\n<!-- iframe showing the search results (closed by default) -->\n<div id=\"MSearchResultsWindow\">\n<iframe src=\"javascript:void(0)\" frameborder=\"0\" \n        name=\"MSearchResults\" id=\"MSearchResults\">\n</iframe>\n</div>\n\n</div><!-- top -->\n<div class=\"PageDoc\"><div class=\"header\">\n  <div class=\"headertitle\">\n<div class=\"title\">Getting started </div>  </div>\n</div><!--header-->\n<div class=\"contents\">\n<div class=\"toc\"><h3>Table of Contents</h3>\n<ul><li class=\"level1\"><a href=\"#quick_steps\">Step by step</a><ul><li class=\"level2\"><a href=\"#quick_include\">Including the GLFW header</a></li>\n<li class=\"level2\"><a href=\"#quick_init_term\">Initializing and terminating GLFW</a></li>\n<li class=\"level2\"><a href=\"#quick_capture_error\">Setting an error callback</a></li>\n<li class=\"level2\"><a href=\"#quick_create_window\">Creating a window and context</a></li>\n<li class=\"level2\"><a href=\"#quick_context_current\">Making the OpenGL context current</a></li>\n<li class=\"level2\"><a href=\"#quick_window_close\">Checking the window close flag</a></li>\n<li class=\"level2\"><a href=\"#quick_key_input\">Receiving input events</a></li>\n<li class=\"level2\"><a href=\"#quick_render\">Rendering with OpenGL</a></li>\n<li class=\"level2\"><a href=\"#quick_timer\">Reading the timer</a></li>\n<li class=\"level2\"><a href=\"#quick_swap_buffers\">Swapping buffers</a></li>\n<li class=\"level2\"><a href=\"#quick_process_events\">Processing events</a></li>\n</ul>\n</li>\n<li class=\"level1\"><a href=\"#quick_example\">Putting it together</a></li>\n</ul>\n</div>\n<div class=\"textblock\"><p>This guide takes you through writing a simple application using GLFW 3. The application will create a window and OpenGL context, render a rotating triangle and exit when the user closes the window or presses <em>Escape</em>. This guide will introduce a few of the most commonly used functions, but there are many more.</p>\n<p>This guide assumes no experience with earlier versions of GLFW. If you have used GLFW 2 in the past, read <a class=\"el\" href=\"moving_guide.html\">Moving from GLFW 2 to 3</a>, as some functions behave differently in GLFW 3.</p>\n<h1><a class=\"anchor\" id=\"quick_steps\"></a>\nStep by step</h1>\n<h2><a class=\"anchor\" id=\"quick_include\"></a>\nIncluding the GLFW header</h2>\n<p>In the source files of your application where you use OpenGL or GLFW, you need to include the GLFW 3 header file.</p>\n<div class=\"fragment\"><div class=\"line\"><span class=\"preprocessor\">#include &lt;<a class=\"code\" href=\"glfw3_8h.html\">GLFW/glfw3.h</a>&gt;</span></div>\n</div><!-- fragment --><p>This defines all the constants, types and function prototypes of the GLFW API. It also includes the OpenGL header from your development environment and defines all the constants and types necessary for it to work on your platform without including any platform-specific headers.</p>\n<p>In other words:</p>\n<ul>\n<li>Do <em>not</em> include the OpenGL header yourself, as GLFW does this for you in a platform-independent way</li>\n<li>Do <em>not</em> include <code>windows.h</code> or other platform-specific headers unless you plan on using those APIs yourself</li>\n<li>If you <em>do</em> need to include such headers, include them <em>before</em> the GLFW header and it will detect this</li>\n</ul>\n<p>On some platforms supported by GLFW the OpenGL header and link library only expose older versions of OpenGL. The most extreme case is Windows, which only exposes OpenGL 1.2. The easiest way to work around this is to use an <a class=\"el\" href=\"context_guide.html#context_glext_auto\">extension loader library</a>.</p>\n<p>If you are using such a library then you should include its header <em>before</em> the GLFW header. This lets it replace the OpenGL header included by GLFW without conflicts. This example uses <a href=\"https://github.com/Dav1dde/glad\">glad2</a>, but the same rule applies to all such libraries.</p>\n<div class=\"fragment\"><div class=\"line\"><span class=\"preprocessor\">#include &lt;glad/gl.h&gt;</span></div>\n<div class=\"line\"><span class=\"preprocessor\">#include &lt;<a class=\"code\" href=\"glfw3_8h.html\">GLFW/glfw3.h</a>&gt;</span></div>\n</div><!-- fragment --><h2><a class=\"anchor\" id=\"quick_init_term\"></a>\nInitializing and terminating GLFW</h2>\n<p>Before you can use most GLFW functions, the library must be initialized. On successful initialization, <code>GLFW_TRUE</code> is returned. If an error occurred, <code>GLFW_FALSE</code> is returned.</p>\n<div class=\"fragment\"><div class=\"line\"><span class=\"keywordflow\">if</span> (!<a class=\"code\" href=\"group__init.html#ga317aac130a235ab08c6db0834907d85e\">glfwInit</a>())</div>\n<div class=\"line\">{</div>\n<div class=\"line\">    <span class=\"comment\">// Initialization failed</span></div>\n<div class=\"line\">}</div>\n</div><!-- fragment --><p>Note that <code>GLFW_TRUE</code> and <code>GLFW_FALSE</code> are and will always be one and zero.</p>\n<p>When you are done using GLFW, typically just before the application exits, you need to terminate GLFW.</p>\n<div class=\"fragment\"><div class=\"line\"><a class=\"code\" href=\"group__init.html#gaaae48c0a18607ea4a4ba951d939f0901\">glfwTerminate</a>();</div>\n</div><!-- fragment --><p>This destroys any remaining windows and releases any other resources allocated by GLFW. After this call, you must initialize GLFW again before using any GLFW functions that require it.</p>\n<h2><a class=\"anchor\" id=\"quick_capture_error\"></a>\nSetting an error callback</h2>\n<p>Most events are reported through callbacks, whether it's a key being pressed, a GLFW window being moved, or an error occurring. Callbacks are C functions (or C++ static methods) that are called by GLFW with arguments describing the event.</p>\n<p>In case a GLFW function fails, an error is reported to the GLFW error callback. You can receive these reports with an error callback. This function must have the signature below but may do anything permitted in other callbacks.</p>\n<div class=\"fragment\"><div class=\"line\"><span class=\"keywordtype\">void</span> error_callback(<span class=\"keywordtype\">int</span> error, <span class=\"keyword\">const</span> <span class=\"keywordtype\">char</span>* description)</div>\n<div class=\"line\">{</div>\n<div class=\"line\">    fprintf(stderr, <span class=\"stringliteral\">&quot;Error: %s\\n&quot;</span>, description);</div>\n<div class=\"line\">}</div>\n</div><!-- fragment --><p>Callback functions must be set, so GLFW knows to call them. The function to set the error callback is one of the few GLFW functions that may be called before initialization, which lets you be notified of errors both during and after initialization.</p>\n<div class=\"fragment\"><div class=\"line\"><a class=\"code\" href=\"group__init.html#gaff45816610d53f0b83656092a4034f40\">glfwSetErrorCallback</a>(error_callback);</div>\n</div><!-- fragment --><h2><a class=\"anchor\" id=\"quick_create_window\"></a>\nCreating a window and context</h2>\n<p>The window and its OpenGL context are created with a single call to <a class=\"el\" href=\"group__window.html#ga5c336fddf2cbb5b92f65f10fb6043344\">glfwCreateWindow</a>, which returns a handle to the created combined window and context object</p>\n<div class=\"fragment\"><div class=\"line\"><a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window = <a class=\"code\" href=\"group__window.html#ga5c336fddf2cbb5b92f65f10fb6043344\">glfwCreateWindow</a>(640, 480, <span class=\"stringliteral\">&quot;My Title&quot;</span>, NULL, NULL);</div>\n<div class=\"line\"><span class=\"keywordflow\">if</span> (!window)</div>\n<div class=\"line\">{</div>\n<div class=\"line\">    <span class=\"comment\">// Window or OpenGL context creation failed</span></div>\n<div class=\"line\">}</div>\n</div><!-- fragment --><p>This creates a 640 by 480 windowed mode window with an OpenGL context. If window or OpenGL context creation fails, <code>NULL</code> will be returned. You should always check the return value. While window creation rarely fails, context creation depends on properly installed drivers and may fail even on machines with the necessary hardware.</p>\n<p>By default, the OpenGL context GLFW creates may have any version. You can require a minimum OpenGL version by setting the <code>GLFW_CONTEXT_VERSION_MAJOR</code> and <code>GLFW_CONTEXT_VERSION_MINOR</code> hints <em>before</em> creation. If the required minimum version is not supported on the machine, context (and window) creation fails.</p>\n<div class=\"fragment\"><div class=\"line\"><a class=\"code\" href=\"group__window.html#ga7d9c8c62384b1e2821c4dc48952d2033\">glfwWindowHint</a>(<a class=\"code\" href=\"group__window.html#gafe5e4922de1f9932d7e9849bb053b0c0\">GLFW_CONTEXT_VERSION_MAJOR</a>, 2);</div>\n<div class=\"line\"><a class=\"code\" href=\"group__window.html#ga7d9c8c62384b1e2821c4dc48952d2033\">glfwWindowHint</a>(<a class=\"code\" href=\"group__window.html#ga31aca791e4b538c4e4a771eb95cc2d07\">GLFW_CONTEXT_VERSION_MINOR</a>, 0);</div>\n<div class=\"line\"><a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window = <a class=\"code\" href=\"group__window.html#ga5c336fddf2cbb5b92f65f10fb6043344\">glfwCreateWindow</a>(640, 480, <span class=\"stringliteral\">&quot;My Title&quot;</span>, NULL, NULL);</div>\n<div class=\"line\"><span class=\"keywordflow\">if</span> (!window)</div>\n<div class=\"line\">{</div>\n<div class=\"line\">    <span class=\"comment\">// Window or context creation failed</span></div>\n<div class=\"line\">}</div>\n</div><!-- fragment --><p>The window handle is passed to all window related functions and is provided to along to all window related callbacks, so they can tell which window received the event.</p>\n<p>When a window and context is no longer needed, destroy it.</p>\n<div class=\"fragment\"><div class=\"line\"><a class=\"code\" href=\"group__window.html#gacdf43e51376051d2c091662e9fe3d7b2\">glfwDestroyWindow</a>(window);</div>\n</div><!-- fragment --><p>Once this function is called, no more events will be delivered for that window and its handle becomes invalid.</p>\n<h2><a class=\"anchor\" id=\"quick_context_current\"></a>\nMaking the OpenGL context current</h2>\n<p>Before you can use the OpenGL API, you must have a current OpenGL context.</p>\n<div class=\"fragment\"><div class=\"line\"><a class=\"code\" href=\"group__context.html#ga1c04dc242268f827290fe40aa1c91157\">glfwMakeContextCurrent</a>(window);</div>\n</div><!-- fragment --><p>The context will remain current until you make another context current or until the window owning the current context is destroyed.</p>\n<p>If you are using an <a class=\"el\" href=\"context_guide.html#context_glext_auto\">extension loader library</a> to access modern OpenGL then this is when to initialize it, as the loader needs a current context to load from. This example uses <a href=\"https://github.com/Dav1dde/glad\">glad</a>, but the same rule applies to all such libraries.</p>\n<div class=\"fragment\"><div class=\"line\">gladLoadGL(<a class=\"code\" href=\"group__context.html#ga35f1837e6f666781842483937612f163\">glfwGetProcAddress</a>);</div>\n</div><!-- fragment --><h2><a class=\"anchor\" id=\"quick_window_close\"></a>\nChecking the window close flag</h2>\n<p>Each window has a flag indicating whether the window should be closed.</p>\n<p>When the user attempts to close the window, either by pressing the close widget in the title bar or using a key combination like Alt+F4, this flag is set to 1. Note that <b>the window isn't actually closed</b>, so you are expected to monitor this flag and either destroy the window or give some kind of feedback to the user.</p>\n<div class=\"fragment\"><div class=\"line\"><span class=\"keywordflow\">while</span> (!<a class=\"code\" href=\"group__window.html#ga24e02fbfefbb81fc45320989f8140ab5\">glfwWindowShouldClose</a>(window))</div>\n<div class=\"line\">{</div>\n<div class=\"line\">    <span class=\"comment\">// Keep running</span></div>\n<div class=\"line\">}</div>\n</div><!-- fragment --><p>You can be notified when the user is attempting to close the window by setting a close callback with <a class=\"el\" href=\"group__window.html#gada646d775a7776a95ac000cfc1885331\">glfwSetWindowCloseCallback</a>. The callback will be called immediately after the close flag has been set.</p>\n<p>You can also set it yourself with <a class=\"el\" href=\"group__window.html#ga49c449dde2a6f87d996f4daaa09d6708\">glfwSetWindowShouldClose</a>. This can be useful if you want to interpret other kinds of input as closing the window, like for example pressing the <em>Escape</em> key.</p>\n<h2><a class=\"anchor\" id=\"quick_key_input\"></a>\nReceiving input events</h2>\n<p>Each window has a large number of callbacks that can be set to receive all the various kinds of events. To receive key press and release events, create a key callback function.</p>\n<div class=\"fragment\"><div class=\"line\"><span class=\"keyword\">static</span> <span class=\"keywordtype\">void</span> key_callback(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window, <span class=\"keywordtype\">int</span> key, <span class=\"keywordtype\">int</span> scancode, <span class=\"keywordtype\">int</span> action, <span class=\"keywordtype\">int</span> mods)</div>\n<div class=\"line\">{</div>\n<div class=\"line\">    <span class=\"keywordflow\">if</span> (key == <a class=\"code\" href=\"group__keys.html#gaac6596c350b635c245113b81c2123b93\">GLFW_KEY_ESCAPE</a> &amp;&amp; action == <a class=\"code\" href=\"group__input.html#ga2485743d0b59df3791c45951c4195265\">GLFW_PRESS</a>)</div>\n<div class=\"line\">        <a class=\"code\" href=\"group__window.html#ga49c449dde2a6f87d996f4daaa09d6708\">glfwSetWindowShouldClose</a>(window, <a class=\"code\" href=\"group__init.html#ga2744fbb29b5631bb28802dbe0cf36eba\">GLFW_TRUE</a>);</div>\n<div class=\"line\">}</div>\n</div><!-- fragment --><p>The key callback, like other window related callbacks, are set per-window.</p>\n<div class=\"fragment\"><div class=\"line\"><a class=\"code\" href=\"group__input.html#ga1caf18159767e761185e49a3be019f8d\">glfwSetKeyCallback</a>(window, key_callback);</div>\n</div><!-- fragment --><p>In order for event callbacks to be called when events occur, you need to process events as described below.</p>\n<h2><a class=\"anchor\" id=\"quick_render\"></a>\nRendering with OpenGL</h2>\n<p>Once you have a current OpenGL context, you can use OpenGL normally. In this tutorial, a multi-colored rotating triangle will be rendered. The framebuffer size needs to be retrieved for <code>glViewport</code>.</p>\n<div class=\"fragment\"><div class=\"line\"><span class=\"keywordtype\">int</span> width, height;</div>\n<div class=\"line\"><a class=\"code\" href=\"group__window.html#ga0e2637a4161afb283f5300c7f94785c9\">glfwGetFramebufferSize</a>(window, &amp;width, &amp;height);</div>\n<div class=\"line\">glViewport(0, 0, width, height);</div>\n</div><!-- fragment --><p>You can also set a framebuffer size callback using <a class=\"el\" href=\"group__window.html#gab3fb7c3366577daef18c0023e2a8591f\">glfwSetFramebufferSizeCallback</a> and be notified when the size changes.</p>\n<p>Actual rendering with OpenGL is outside the scope of this tutorial, but there are <a href=\"https://open.gl/\">many</a> <a href=\"https://learnopengl.com/\">excellent</a> <a href=\"http://openglbook.com/\">tutorial</a> <a href=\"http://ogldev.atspace.co.uk/\">sites</a> that teach modern OpenGL. Some of them use GLFW to create the context and window while others use GLUT or SDL, but remember that OpenGL itself always works the same.</p>\n<h2><a class=\"anchor\" id=\"quick_timer\"></a>\nReading the timer</h2>\n<p>To create smooth animation, a time source is needed. GLFW provides a timer that returns the number of seconds since initialization. The time source used is the most accurate on each platform and generally has micro- or nanosecond resolution.</p>\n<div class=\"fragment\"><div class=\"line\"><span class=\"keywordtype\">double</span> time = <a class=\"code\" href=\"group__input.html#gaa6cf4e7a77158a3b8fd00328b1720a4a\">glfwGetTime</a>();</div>\n</div><!-- fragment --><h2><a class=\"anchor\" id=\"quick_swap_buffers\"></a>\nSwapping buffers</h2>\n<p>GLFW windows by default use double buffering. That means that each window has two rendering buffers; a front buffer and a back buffer. The front buffer is the one being displayed and the back buffer the one you render to.</p>\n<p>When the entire frame has been rendered, the buffers need to be swapped with one another, so the back buffer becomes the front buffer and vice versa.</p>\n<div class=\"fragment\"><div class=\"line\"><a class=\"code\" href=\"group__window.html#ga15a5a1ee5b3c2ca6b15ca209a12efd14\">glfwSwapBuffers</a>(window);</div>\n</div><!-- fragment --><p>The swap interval indicates how many frames to wait until swapping the buffers, commonly known as <em>vsync</em>. By default, the swap interval is zero, meaning buffer swapping will occur immediately. On fast machines, many of those frames will never be seen, as the screen is still only updated typically 60-75 times per second, so this wastes a lot of CPU and GPU cycles.</p>\n<p>Also, because the buffers will be swapped in the middle the screen update, leading to <a href=\"https://en.wikipedia.org/wiki/Screen_tearing\">screen tearing</a>.</p>\n<p>For these reasons, applications will typically want to set the swap interval to one. It can be set to higher values, but this is usually not recommended, because of the input latency it leads to.</p>\n<div class=\"fragment\"><div class=\"line\"><a class=\"code\" href=\"group__context.html#ga6d4e0cdf151b5e579bd67f13202994ed\">glfwSwapInterval</a>(1);</div>\n</div><!-- fragment --><p>This function acts on the current context and will fail unless a context is current.</p>\n<h2><a class=\"anchor\" id=\"quick_process_events\"></a>\nProcessing events</h2>\n<p>GLFW needs to communicate regularly with the window system both in order to receive events and to show that the application hasn't locked up. Event processing must be done regularly while you have visible windows and is normally done each frame after buffer swapping.</p>\n<p>There are two methods for processing pending events; polling and waiting. This example will use event polling, which processes only those events that have already been received and then returns immediately.</p>\n<div class=\"fragment\"><div class=\"line\"><a class=\"code\" href=\"group__window.html#ga37bd57223967b4211d60ca1a0bf3c832\">glfwPollEvents</a>();</div>\n</div><!-- fragment --><p>This is the best choice when rendering continually, like most games do. If instead you only need to update your rendering once you have received new input, <a class=\"el\" href=\"group__window.html#ga554e37d781f0a997656c26b2c56c835e\">glfwWaitEvents</a> is a better choice. It waits until at least one event has been received, putting the thread to sleep in the meantime, and then processes all received events. This saves a great deal of CPU cycles and is useful for, for example, many kinds of editing tools.</p>\n<h1><a class=\"anchor\" id=\"quick_example\"></a>\nPutting it together</h1>\n<p>Now that you know how to initialize GLFW, create a window and poll for keyboard input, it's possible to create a simple program.</p>\n<p>This program creates a 640 by 480 windowed mode window and starts a loop that clears the screen, renders a triangle and processes events until the user either presses <em>Escape</em> or closes the window.</p>\n<div class=\"fragment\"><div class=\"line\"> </div>\n<div class=\"line\"><span class=\"preprocessor\">#include &lt;glad/gl.h&gt;</span></div>\n<div class=\"line\"><span class=\"preprocessor\">#define GLFW_INCLUDE_NONE</span></div>\n<div class=\"line\"><span class=\"preprocessor\">#include &lt;<a class=\"code\" href=\"glfw3_8h.html\">GLFW/glfw3.h</a>&gt;</span></div>\n<div class=\"line\"> </div>\n<div class=\"line\"><span class=\"preprocessor\">#include &quot;linmath.h&quot;</span></div>\n<div class=\"line\"> </div>\n<div class=\"line\"><span class=\"preprocessor\">#include &lt;stdlib.h&gt;</span></div>\n<div class=\"line\"><span class=\"preprocessor\">#include &lt;stdio.h&gt;</span></div>\n<div class=\"line\"> </div>\n<div class=\"line\"><span class=\"keyword\">static</span> <span class=\"keyword\">const</span> <span class=\"keyword\">struct</span></div>\n<div class=\"line\">{</div>\n<div class=\"line\">    <span class=\"keywordtype\">float</span> x, y;</div>\n<div class=\"line\">    <span class=\"keywordtype\">float</span> r, g, b;</div>\n<div class=\"line\">} vertices[3] =</div>\n<div class=\"line\">{</div>\n<div class=\"line\">    { -0.6f, -0.4f, 1.f, 0.f, 0.f },</div>\n<div class=\"line\">    {  0.6f, -0.4f, 0.f, 1.f, 0.f },</div>\n<div class=\"line\">    {   0.f,  0.6f, 0.f, 0.f, 1.f }</div>\n<div class=\"line\">};</div>\n<div class=\"line\"> </div>\n<div class=\"line\"><span class=\"keyword\">static</span> <span class=\"keyword\">const</span> <span class=\"keywordtype\">char</span>* vertex_shader_text =</div>\n<div class=\"line\"><span class=\"stringliteral\">&quot;#version 110\\n&quot;</span></div>\n<div class=\"line\"><span class=\"stringliteral\">&quot;uniform mat4 MVP;\\n&quot;</span></div>\n<div class=\"line\"><span class=\"stringliteral\">&quot;attribute vec3 vCol;\\n&quot;</span></div>\n<div class=\"line\"><span class=\"stringliteral\">&quot;attribute vec2 vPos;\\n&quot;</span></div>\n<div class=\"line\"><span class=\"stringliteral\">&quot;varying vec3 color;\\n&quot;</span></div>\n<div class=\"line\"><span class=\"stringliteral\">&quot;void main()\\n&quot;</span></div>\n<div class=\"line\"><span class=\"stringliteral\">&quot;{\\n&quot;</span></div>\n<div class=\"line\"><span class=\"stringliteral\">&quot;    gl_Position = MVP * vec4(vPos, 0.0, 1.0);\\n&quot;</span></div>\n<div class=\"line\"><span class=\"stringliteral\">&quot;    color = vCol;\\n&quot;</span></div>\n<div class=\"line\"><span class=\"stringliteral\">&quot;}\\n&quot;</span>;</div>\n<div class=\"line\"> </div>\n<div class=\"line\"><span class=\"keyword\">static</span> <span class=\"keyword\">const</span> <span class=\"keywordtype\">char</span>* fragment_shader_text =</div>\n<div class=\"line\"><span class=\"stringliteral\">&quot;#version 110\\n&quot;</span></div>\n<div class=\"line\"><span class=\"stringliteral\">&quot;varying vec3 color;\\n&quot;</span></div>\n<div class=\"line\"><span class=\"stringliteral\">&quot;void main()\\n&quot;</span></div>\n<div class=\"line\"><span class=\"stringliteral\">&quot;{\\n&quot;</span></div>\n<div class=\"line\"><span class=\"stringliteral\">&quot;    gl_FragColor = vec4(color, 1.0);\\n&quot;</span></div>\n<div class=\"line\"><span class=\"stringliteral\">&quot;}\\n&quot;</span>;</div>\n<div class=\"line\"> </div>\n<div class=\"line\"><span class=\"keyword\">static</span> <span class=\"keywordtype\">void</span> error_callback(<span class=\"keywordtype\">int</span> error, <span class=\"keyword\">const</span> <span class=\"keywordtype\">char</span>* description)</div>\n<div class=\"line\">{</div>\n<div class=\"line\">    fprintf(stderr, <span class=\"stringliteral\">&quot;Error: %s\\n&quot;</span>, description);</div>\n<div class=\"line\">}</div>\n<div class=\"line\"> </div>\n<div class=\"line\"><span class=\"keyword\">static</span> <span class=\"keywordtype\">void</span> key_callback(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window, <span class=\"keywordtype\">int</span> key, <span class=\"keywordtype\">int</span> scancode, <span class=\"keywordtype\">int</span> action, <span class=\"keywordtype\">int</span> mods)</div>\n<div class=\"line\">{</div>\n<div class=\"line\">    <span class=\"keywordflow\">if</span> (key == <a class=\"code\" href=\"group__keys.html#gaac6596c350b635c245113b81c2123b93\">GLFW_KEY_ESCAPE</a> &amp;&amp; action == <a class=\"code\" href=\"group__input.html#ga2485743d0b59df3791c45951c4195265\">GLFW_PRESS</a>)</div>\n<div class=\"line\">        <a class=\"code\" href=\"group__window.html#ga49c449dde2a6f87d996f4daaa09d6708\">glfwSetWindowShouldClose</a>(window, <a class=\"code\" href=\"group__init.html#ga2744fbb29b5631bb28802dbe0cf36eba\">GLFW_TRUE</a>);</div>\n<div class=\"line\">}</div>\n<div class=\"line\"> </div>\n<div class=\"line\"><span class=\"keywordtype\">int</span> main(<span class=\"keywordtype\">void</span>)</div>\n<div class=\"line\">{</div>\n<div class=\"line\">    <a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window;</div>\n<div class=\"line\">    GLuint vertex_buffer, vertex_shader, fragment_shader, program;</div>\n<div class=\"line\">    GLint mvp_location, vpos_location, vcol_location;</div>\n<div class=\"line\"> </div>\n<div class=\"line\">    <a class=\"code\" href=\"group__init.html#gaff45816610d53f0b83656092a4034f40\">glfwSetErrorCallback</a>(error_callback);</div>\n<div class=\"line\"> </div>\n<div class=\"line\">    <span class=\"keywordflow\">if</span> (!<a class=\"code\" href=\"group__init.html#ga317aac130a235ab08c6db0834907d85e\">glfwInit</a>())</div>\n<div class=\"line\">        exit(EXIT_FAILURE);</div>\n<div class=\"line\"> </div>\n<div class=\"line\">    <a class=\"code\" href=\"group__window.html#ga7d9c8c62384b1e2821c4dc48952d2033\">glfwWindowHint</a>(<a class=\"code\" href=\"group__window.html#gafe5e4922de1f9932d7e9849bb053b0c0\">GLFW_CONTEXT_VERSION_MAJOR</a>, 2);</div>\n<div class=\"line\">    <a class=\"code\" href=\"group__window.html#ga7d9c8c62384b1e2821c4dc48952d2033\">glfwWindowHint</a>(<a class=\"code\" href=\"group__window.html#ga31aca791e4b538c4e4a771eb95cc2d07\">GLFW_CONTEXT_VERSION_MINOR</a>, 0);</div>\n<div class=\"line\"> </div>\n<div class=\"line\">    window = <a class=\"code\" href=\"group__window.html#ga5c336fddf2cbb5b92f65f10fb6043344\">glfwCreateWindow</a>(640, 480, <span class=\"stringliteral\">&quot;Simple example&quot;</span>, NULL, NULL);</div>\n<div class=\"line\">    <span class=\"keywordflow\">if</span> (!window)</div>\n<div class=\"line\">    {</div>\n<div class=\"line\">        <a class=\"code\" href=\"group__init.html#gaaae48c0a18607ea4a4ba951d939f0901\">glfwTerminate</a>();</div>\n<div class=\"line\">        exit(EXIT_FAILURE);</div>\n<div class=\"line\">    }</div>\n<div class=\"line\"> </div>\n<div class=\"line\">    <a class=\"code\" href=\"group__input.html#ga1caf18159767e761185e49a3be019f8d\">glfwSetKeyCallback</a>(window, key_callback);</div>\n<div class=\"line\"> </div>\n<div class=\"line\">    <a class=\"code\" href=\"group__context.html#ga1c04dc242268f827290fe40aa1c91157\">glfwMakeContextCurrent</a>(window);</div>\n<div class=\"line\">    gladLoadGL(<a class=\"code\" href=\"group__context.html#ga35f1837e6f666781842483937612f163\">glfwGetProcAddress</a>);</div>\n<div class=\"line\">    <a class=\"code\" href=\"group__context.html#ga6d4e0cdf151b5e579bd67f13202994ed\">glfwSwapInterval</a>(1);</div>\n<div class=\"line\"> </div>\n<div class=\"line\">    <span class=\"comment\">// NOTE: OpenGL error checks have been omitted for brevity</span></div>\n<div class=\"line\"> </div>\n<div class=\"line\">    glGenBuffers(1, &amp;vertex_buffer);</div>\n<div class=\"line\">    glBindBuffer(GL_ARRAY_BUFFER, vertex_buffer);</div>\n<div class=\"line\">    glBufferData(GL_ARRAY_BUFFER, <span class=\"keyword\">sizeof</span>(vertices), vertices, GL_STATIC_DRAW);</div>\n<div class=\"line\"> </div>\n<div class=\"line\">    vertex_shader = glCreateShader(GL_VERTEX_SHADER);</div>\n<div class=\"line\">    glShaderSource(vertex_shader, 1, &amp;vertex_shader_text, NULL);</div>\n<div class=\"line\">    glCompileShader(vertex_shader);</div>\n<div class=\"line\"> </div>\n<div class=\"line\">    fragment_shader = glCreateShader(GL_FRAGMENT_SHADER);</div>\n<div class=\"line\">    glShaderSource(fragment_shader, 1, &amp;fragment_shader_text, NULL);</div>\n<div class=\"line\">    glCompileShader(fragment_shader);</div>\n<div class=\"line\"> </div>\n<div class=\"line\">    program = glCreateProgram();</div>\n<div class=\"line\">    glAttachShader(program, vertex_shader);</div>\n<div class=\"line\">    glAttachShader(program, fragment_shader);</div>\n<div class=\"line\">    glLinkProgram(program);</div>\n<div class=\"line\"> </div>\n<div class=\"line\">    mvp_location = glGetUniformLocation(program, <span class=\"stringliteral\">&quot;MVP&quot;</span>);</div>\n<div class=\"line\">    vpos_location = glGetAttribLocation(program, <span class=\"stringliteral\">&quot;vPos&quot;</span>);</div>\n<div class=\"line\">    vcol_location = glGetAttribLocation(program, <span class=\"stringliteral\">&quot;vCol&quot;</span>);</div>\n<div class=\"line\"> </div>\n<div class=\"line\">    glEnableVertexAttribArray(vpos_location);</div>\n<div class=\"line\">    glVertexAttribPointer(vpos_location, 2, GL_FLOAT, GL_FALSE,</div>\n<div class=\"line\">                          <span class=\"keyword\">sizeof</span>(vertices[0]), (<span class=\"keywordtype\">void</span>*) 0);</div>\n<div class=\"line\">    glEnableVertexAttribArray(vcol_location);</div>\n<div class=\"line\">    glVertexAttribPointer(vcol_location, 3, GL_FLOAT, GL_FALSE,</div>\n<div class=\"line\">                          <span class=\"keyword\">sizeof</span>(vertices[0]), (<span class=\"keywordtype\">void</span>*) (<span class=\"keyword\">sizeof</span>(<span class=\"keywordtype\">float</span>) * 2));</div>\n<div class=\"line\"> </div>\n<div class=\"line\">    <span class=\"keywordflow\">while</span> (!<a class=\"code\" href=\"group__window.html#ga24e02fbfefbb81fc45320989f8140ab5\">glfwWindowShouldClose</a>(window))</div>\n<div class=\"line\">    {</div>\n<div class=\"line\">        <span class=\"keywordtype\">float</span> ratio;</div>\n<div class=\"line\">        <span class=\"keywordtype\">int</span> width, height;</div>\n<div class=\"line\">        mat4x4 m, p, mvp;</div>\n<div class=\"line\"> </div>\n<div class=\"line\">        <a class=\"code\" href=\"group__window.html#ga0e2637a4161afb283f5300c7f94785c9\">glfwGetFramebufferSize</a>(window, &amp;width, &amp;height);</div>\n<div class=\"line\">        ratio = width / (float) height;</div>\n<div class=\"line\"> </div>\n<div class=\"line\">        glViewport(0, 0, width, height);</div>\n<div class=\"line\">        glClear(GL_COLOR_BUFFER_BIT);</div>\n<div class=\"line\"> </div>\n<div class=\"line\">        mat4x4_identity(m);</div>\n<div class=\"line\">        mat4x4_rotate_Z(m, m, (<span class=\"keywordtype\">float</span>) <a class=\"code\" href=\"group__input.html#gaa6cf4e7a77158a3b8fd00328b1720a4a\">glfwGetTime</a>());</div>\n<div class=\"line\">        mat4x4_ortho(p, -ratio, ratio, -1.f, 1.f, 1.f, -1.f);</div>\n<div class=\"line\">        mat4x4_mul(mvp, p, m);</div>\n<div class=\"line\"> </div>\n<div class=\"line\">        glUseProgram(program);</div>\n<div class=\"line\">        glUniformMatrix4fv(mvp_location, 1, GL_FALSE, (<span class=\"keyword\">const</span> GLfloat*) mvp);</div>\n<div class=\"line\">        glDrawArrays(GL_TRIANGLES, 0, 3);</div>\n<div class=\"line\"> </div>\n<div class=\"line\">        <a class=\"code\" href=\"group__window.html#ga15a5a1ee5b3c2ca6b15ca209a12efd14\">glfwSwapBuffers</a>(window);</div>\n<div class=\"line\">        <a class=\"code\" href=\"group__window.html#ga37bd57223967b4211d60ca1a0bf3c832\">glfwPollEvents</a>();</div>\n<div class=\"line\">    }</div>\n<div class=\"line\"> </div>\n<div class=\"line\">    <a class=\"code\" href=\"group__window.html#gacdf43e51376051d2c091662e9fe3d7b2\">glfwDestroyWindow</a>(window);</div>\n<div class=\"line\"> </div>\n<div class=\"line\">    <a class=\"code\" href=\"group__init.html#gaaae48c0a18607ea4a4ba951d939f0901\">glfwTerminate</a>();</div>\n<div class=\"line\">    exit(EXIT_SUCCESS);</div>\n<div class=\"line\">}</div>\n<div class=\"line\"> </div>\n</div><!-- fragment --><p> The program above can be found in the <a href=\"https://www.glfw.org/download.html\">source package</a> as <code>examples/simple.c</code> and is compiled along with all other examples when you build GLFW. If you built GLFW from the source package then you already have this as <code>simple.exe</code> on Windows, <code>simple</code> on Linux or <code>simple.app</code> on macOS.</p>\n<p>This tutorial used only a few of the many functions GLFW provides. There are guides for each of the areas covered by GLFW. Each guide will introduce all the functions for that category.</p>\n<ul>\n<li><a class=\"el\" href=\"intro_guide.html\">Introduction to the API</a></li>\n<li><a class=\"el\" href=\"window_guide.html\">Window guide</a></li>\n<li><a class=\"el\" href=\"context_guide.html\">Context guide</a></li>\n<li><a class=\"el\" href=\"monitor_guide.html\">Monitor guide</a></li>\n<li><a class=\"el\" href=\"input_guide.html\">Input guide</a></li>\n</ul>\n<p>You can access reference documentation for any GLFW function by clicking it and the reference for each function links to related functions and guide sections.</p>\n<p>The tutorial ends here. Once you have written a program that uses GLFW, you will need to compile and link it. How to do that depends on the development environment you are using and is best explained by the documentation for that environment. To learn about the details that are specific to GLFW, see <a class=\"el\" href=\"build_guide.html\">Building applications</a>. </p>\n</div></div><!-- contents -->\n</div><!-- PageDoc -->\n<div class=\"ttc\" id=\"agroup__input_html_gaa6cf4e7a77158a3b8fd00328b1720a4a\"><div class=\"ttname\"><a href=\"group__input.html#gaa6cf4e7a77158a3b8fd00328b1720a4a\">glfwGetTime</a></div><div class=\"ttdeci\">double glfwGetTime(void)</div><div class=\"ttdoc\">Returns the GLFW time.</div></div>\n<div class=\"ttc\" id=\"agroup__input_html_ga2485743d0b59df3791c45951c4195265\"><div class=\"ttname\"><a href=\"group__input.html#ga2485743d0b59df3791c45951c4195265\">GLFW_PRESS</a></div><div class=\"ttdeci\">#define GLFW_PRESS</div><div class=\"ttdoc\">The key or mouse button was pressed.</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:306</div></div>\n<div class=\"ttc\" id=\"aglfw3_8h_html\"><div class=\"ttname\"><a href=\"glfw3_8h.html\">glfw3.h</a></div><div class=\"ttdoc\">The header of the GLFW 3 API.</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_ga31aca791e4b538c4e4a771eb95cc2d07\"><div class=\"ttname\"><a href=\"group__window.html#ga31aca791e4b538c4e4a771eb95cc2d07\">GLFW_CONTEXT_VERSION_MINOR</a></div><div class=\"ttdeci\">#define GLFW_CONTEXT_VERSION_MINOR</div><div class=\"ttdoc\">Context client API minor version hint and attribute.</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:929</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_ga3c96d80d363e67d13a41b5d1821f3242\"><div class=\"ttname\"><a href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a></div><div class=\"ttdeci\">struct GLFWwindow GLFWwindow</div><div class=\"ttdoc\">Opaque window object.</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:1152</div></div>\n<div class=\"ttc\" id=\"agroup__init_html_gaaae48c0a18607ea4a4ba951d939f0901\"><div class=\"ttname\"><a href=\"group__init.html#gaaae48c0a18607ea4a4ba951d939f0901\">glfwTerminate</a></div><div class=\"ttdeci\">void glfwTerminate(void)</div><div class=\"ttdoc\">Terminates the GLFW library.</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_ga15a5a1ee5b3c2ca6b15ca209a12efd14\"><div class=\"ttname\"><a href=\"group__window.html#ga15a5a1ee5b3c2ca6b15ca209a12efd14\">glfwSwapBuffers</a></div><div class=\"ttdeci\">void glfwSwapBuffers(GLFWwindow *window)</div><div class=\"ttdoc\">Swaps the front and back buffers of the specified window.</div></div>\n<div class=\"ttc\" id=\"agroup__context_html_ga1c04dc242268f827290fe40aa1c91157\"><div class=\"ttname\"><a href=\"group__context.html#ga1c04dc242268f827290fe40aa1c91157\">glfwMakeContextCurrent</a></div><div class=\"ttdeci\">void glfwMakeContextCurrent(GLFWwindow *window)</div><div class=\"ttdoc\">Makes the context of the specified window current for the calling thread.</div></div>\n<div class=\"ttc\" id=\"agroup__context_html_ga6d4e0cdf151b5e579bd67f13202994ed\"><div class=\"ttname\"><a href=\"group__context.html#ga6d4e0cdf151b5e579bd67f13202994ed\">glfwSwapInterval</a></div><div class=\"ttdeci\">void glfwSwapInterval(int interval)</div><div class=\"ttdoc\">Sets the swap interval for the current context.</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_ga24e02fbfefbb81fc45320989f8140ab5\"><div class=\"ttname\"><a href=\"group__window.html#ga24e02fbfefbb81fc45320989f8140ab5\">glfwWindowShouldClose</a></div><div class=\"ttdeci\">int glfwWindowShouldClose(GLFWwindow *window)</div><div class=\"ttdoc\">Checks the close flag of the specified window.</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_ga37bd57223967b4211d60ca1a0bf3c832\"><div class=\"ttname\"><a href=\"group__window.html#ga37bd57223967b4211d60ca1a0bf3c832\">glfwPollEvents</a></div><div class=\"ttdeci\">void glfwPollEvents(void)</div><div class=\"ttdoc\">Processes all pending events.</div></div>\n<div class=\"ttc\" id=\"agroup__init_html_ga2744fbb29b5631bb28802dbe0cf36eba\"><div class=\"ttname\"><a href=\"group__init.html#ga2744fbb29b5631bb28802dbe0cf36eba\">GLFW_TRUE</a></div><div class=\"ttdeci\">#define GLFW_TRUE</div><div class=\"ttdoc\">One.</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:280</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_gafe5e4922de1f9932d7e9849bb053b0c0\"><div class=\"ttname\"><a href=\"group__window.html#gafe5e4922de1f9932d7e9849bb053b0c0\">GLFW_CONTEXT_VERSION_MAJOR</a></div><div class=\"ttdeci\">#define GLFW_CONTEXT_VERSION_MAJOR</div><div class=\"ttdoc\">Context client API major version hint and attribute.</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:923</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_ga5c336fddf2cbb5b92f65f10fb6043344\"><div class=\"ttname\"><a href=\"group__window.html#ga5c336fddf2cbb5b92f65f10fb6043344\">glfwCreateWindow</a></div><div class=\"ttdeci\">GLFWwindow * glfwCreateWindow(int width, int height, const char *title, GLFWmonitor *monitor, GLFWwindow *share)</div><div class=\"ttdoc\">Creates a window and its associated context.</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_ga49c449dde2a6f87d996f4daaa09d6708\"><div class=\"ttname\"><a href=\"group__window.html#ga49c449dde2a6f87d996f4daaa09d6708\">glfwSetWindowShouldClose</a></div><div class=\"ttdeci\">void glfwSetWindowShouldClose(GLFWwindow *window, int value)</div><div class=\"ttdoc\">Sets the close flag of the specified window.</div></div>\n<div class=\"ttc\" id=\"agroup__keys_html_gaac6596c350b635c245113b81c2123b93\"><div class=\"ttname\"><a href=\"group__keys.html#gaac6596c350b635c245113b81c2123b93\">GLFW_KEY_ESCAPE</a></div><div class=\"ttdeci\">#define GLFW_KEY_ESCAPE</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:414</div></div>\n<div class=\"ttc\" id=\"agroup__init_html_ga317aac130a235ab08c6db0834907d85e\"><div class=\"ttname\"><a href=\"group__init.html#ga317aac130a235ab08c6db0834907d85e\">glfwInit</a></div><div class=\"ttdeci\">int glfwInit(void)</div><div class=\"ttdoc\">Initializes the GLFW library.</div></div>\n<div class=\"ttc\" id=\"agroup__context_html_ga35f1837e6f666781842483937612f163\"><div class=\"ttname\"><a href=\"group__context.html#ga35f1837e6f666781842483937612f163\">glfwGetProcAddress</a></div><div class=\"ttdeci\">GLFWglproc glfwGetProcAddress(const char *procname)</div><div class=\"ttdoc\">Returns the address of the specified function for the current context.</div></div>\n<div class=\"ttc\" id=\"agroup__input_html_ga1caf18159767e761185e49a3be019f8d\"><div class=\"ttname\"><a href=\"group__input.html#ga1caf18159767e761185e49a3be019f8d\">glfwSetKeyCallback</a></div><div class=\"ttdeci\">GLFWkeyfun glfwSetKeyCallback(GLFWwindow *window, GLFWkeyfun callback)</div><div class=\"ttdoc\">Sets the key callback.</div></div>\n<div class=\"ttc\" id=\"agroup__init_html_gaff45816610d53f0b83656092a4034f40\"><div class=\"ttname\"><a href=\"group__init.html#gaff45816610d53f0b83656092a4034f40\">glfwSetErrorCallback</a></div><div class=\"ttdeci\">GLFWerrorfun glfwSetErrorCallback(GLFWerrorfun callback)</div><div class=\"ttdoc\">Sets the error callback.</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_ga0e2637a4161afb283f5300c7f94785c9\"><div class=\"ttname\"><a href=\"group__window.html#ga0e2637a4161afb283f5300c7f94785c9\">glfwGetFramebufferSize</a></div><div class=\"ttdeci\">void glfwGetFramebufferSize(GLFWwindow *window, int *width, int *height)</div><div class=\"ttdoc\">Retrieves the size of the framebuffer of the specified window.</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_ga7d9c8c62384b1e2821c4dc48952d2033\"><div class=\"ttname\"><a href=\"group__window.html#ga7d9c8c62384b1e2821c4dc48952d2033\">glfwWindowHint</a></div><div class=\"ttdeci\">void glfwWindowHint(int hint, int value)</div><div class=\"ttdoc\">Sets the specified window hint to the desired value.</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_gacdf43e51376051d2c091662e9fe3d7b2\"><div class=\"ttname\"><a href=\"group__window.html#gacdf43e51376051d2c091662e9fe3d7b2\">glfwDestroyWindow</a></div><div class=\"ttdeci\">void glfwDestroyWindow(GLFWwindow *window)</div><div class=\"ttdoc\">Destroys the specified window and its context.</div></div>\n<address class=\"footer\">\n<p>\nLast update on Mon Jan 20 2020 for GLFW 3.3.2\n</p>\n</address>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/all_0.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html><head><title></title>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<link rel=\"stylesheet\" type=\"text/css\" href=\"search.css\"/>\n<script type=\"text/javascript\" src=\"all_0.js\"></script>\n<script type=\"text/javascript\" src=\"search.js\"></script>\n</head>\n<body class=\"SRPage\">\n<div id=\"SRIndex\">\n<div class=\"SRStatus\" id=\"Loading\">Loading...</div>\n<div id=\"SRResults\"></div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ncreateResults();\n/* @license-end */\n--></script>\n<div class=\"SRStatus\" id=\"Searching\">Searching...</div>\n<div class=\"SRStatus\" id=\"NoMatches\">No Matches</div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ndocument.getElementById(\"Loading\").style.display=\"none\";\ndocument.getElementById(\"NoMatches\").style.display=\"none\";\nvar searchResults = new SearchResults(\"searchResults\");\nsearchResults.Search();\n/* @license-end */\n--></script>\n</div>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/all_0.js",
    "content": "var searchData=\n[\n  ['axes_0',['axes',['../structGLFWgamepadstate.html#a8b2c8939b1d31458de5359998375c189',1,'GLFWgamepadstate']]]\n];\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/all_1.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html><head><title></title>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<link rel=\"stylesheet\" type=\"text/css\" href=\"search.css\"/>\n<script type=\"text/javascript\" src=\"all_1.js\"></script>\n<script type=\"text/javascript\" src=\"search.js\"></script>\n</head>\n<body class=\"SRPage\">\n<div id=\"SRIndex\">\n<div class=\"SRStatus\" id=\"Loading\">Loading...</div>\n<div id=\"SRResults\"></div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ncreateResults();\n/* @license-end */\n--></script>\n<div class=\"SRStatus\" id=\"Searching\">Searching...</div>\n<div class=\"SRStatus\" id=\"NoMatches\">No Matches</div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ndocument.getElementById(\"Loading\").style.display=\"none\";\ndocument.getElementById(\"NoMatches\").style.display=\"none\";\nvar searchResults = new SearchResults(\"searchResults\");\nsearchResults.Search();\n/* @license-end */\n--></script>\n</div>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/all_1.js",
    "content": "var searchData=\n[\n  ['blue_1',['blue',['../structGLFWgammaramp.html#acf0c836d0efe29c392fe8d1a1042744b',1,'GLFWgammaramp']]],\n  ['bluebits_2',['blueBits',['../structGLFWvidmode.html#af310977f58d2e3b188175b6e3d314047',1,'GLFWvidmode']]],\n  ['bug_20list_3',['Bug List',['../bug.html',1,'']]],\n  ['build_2edox_4',['build.dox',['../build_8dox.html',1,'']]],\n  ['building_20applications_5',['Building applications',['../build_guide.html',1,'']]],\n  ['buttons_6',['buttons',['../structGLFWgamepadstate.html#a27e9896b51c65df15fba2c7139bfdb9a',1,'GLFWgamepadstate']]]\n];\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/all_10.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html><head><title></title>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<link rel=\"stylesheet\" type=\"text/css\" href=\"search.css\"/>\n<script type=\"text/javascript\" src=\"all_10.js\"></script>\n<script type=\"text/javascript\" src=\"search.js\"></script>\n</head>\n<body class=\"SRPage\">\n<div id=\"SRIndex\">\n<div class=\"SRStatus\" id=\"Loading\">Loading...</div>\n<div id=\"SRResults\"></div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ncreateResults();\n/* @license-end */\n--></script>\n<div class=\"SRStatus\" id=\"Searching\">Searching...</div>\n<div class=\"SRStatus\" id=\"NoMatches\">No Matches</div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ndocument.getElementById(\"Loading\").style.display=\"none\";\ndocument.getElementById(\"NoMatches\").style.display=\"none\";\nvar searchResults = new SearchResults(\"searchResults\");\nsearchResults.Search();\n/* @license-end */\n--></script>\n</div>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/all_10.js",
    "content": "var searchData=\n[\n  ['vulkan_20reference_520',['Vulkan reference',['../group__vulkan.html',1,'']]],\n  ['vulkan_2edox_521',['vulkan.dox',['../vulkan_8dox.html',1,'']]],\n  ['vulkan_20guide_522',['Vulkan guide',['../vulkan_guide.html',1,'']]]\n];\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/all_11.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html><head><title></title>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<link rel=\"stylesheet\" type=\"text/css\" href=\"search.css\"/>\n<script type=\"text/javascript\" src=\"all_11.js\"></script>\n<script type=\"text/javascript\" src=\"search.js\"></script>\n</head>\n<body class=\"SRPage\">\n<div id=\"SRIndex\">\n<div class=\"SRStatus\" id=\"Loading\">Loading...</div>\n<div id=\"SRResults\"></div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ncreateResults();\n/* @license-end */\n--></script>\n<div class=\"SRStatus\" id=\"Searching\">Searching...</div>\n<div class=\"SRStatus\" id=\"NoMatches\">No Matches</div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ndocument.getElementById(\"Loading\").style.display=\"none\";\ndocument.getElementById(\"NoMatches\").style.display=\"none\";\nvar searchResults = new SearchResults(\"searchResults\");\nsearchResults.Search();\n/* @license-end */\n--></script>\n</div>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/all_11.js",
    "content": "var searchData=\n[\n  ['width_523',['width',['../structGLFWvidmode.html#a698dcb200562051a7249cb6ae154c71d',1,'GLFWvidmode::width()'],['../structGLFWimage.html#af6a71cc999fe6d3aea31dd7e9687d835',1,'GLFWimage::width()']]],\n  ['window_20reference_524',['Window reference',['../group__window.html',1,'']]],\n  ['window_2edox_525',['window.dox',['../window_8dox.html',1,'']]],\n  ['window_20guide_526',['Window guide',['../window_guide.html',1,'']]]\n];\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/all_2.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html><head><title></title>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<link rel=\"stylesheet\" type=\"text/css\" href=\"search.css\"/>\n<script type=\"text/javascript\" src=\"all_2.js\"></script>\n<script type=\"text/javascript\" src=\"search.js\"></script>\n</head>\n<body class=\"SRPage\">\n<div id=\"SRIndex\">\n<div class=\"SRStatus\" id=\"Loading\">Loading...</div>\n<div id=\"SRResults\"></div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ncreateResults();\n/* @license-end */\n--></script>\n<div class=\"SRStatus\" id=\"Searching\">Searching...</div>\n<div class=\"SRStatus\" id=\"NoMatches\">No Matches</div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ndocument.getElementById(\"Loading\").style.display=\"none\";\ndocument.getElementById(\"NoMatches\").style.display=\"none\";\nvar searchResults = new SearchResults(\"searchResults\");\nsearchResults.Search();\n/* @license-end */\n--></script>\n</div>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/all_2.js",
    "content": "var searchData=\n[\n  ['compat_2edox_7',['compat.dox',['../compat_8dox.html',1,'']]],\n  ['compile_2edox_8',['compile.dox',['../compile_8dox.html',1,'']]],\n  ['compiling_20glfw_9',['Compiling GLFW',['../compile_guide.html',1,'']]],\n  ['context_20reference_10',['Context reference',['../group__context.html',1,'']]],\n  ['context_2edox_11',['context.dox',['../context_8dox.html',1,'']]],\n  ['context_20guide_12',['Context guide',['../context_guide.html',1,'']]]\n];\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/all_3.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html><head><title></title>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<link rel=\"stylesheet\" type=\"text/css\" href=\"search.css\"/>\n<script type=\"text/javascript\" src=\"all_3.js\"></script>\n<script type=\"text/javascript\" src=\"search.js\"></script>\n</head>\n<body class=\"SRPage\">\n<div id=\"SRIndex\">\n<div class=\"SRStatus\" id=\"Loading\">Loading...</div>\n<div id=\"SRResults\"></div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ncreateResults();\n/* @license-end */\n--></script>\n<div class=\"SRStatus\" id=\"Searching\">Searching...</div>\n<div class=\"SRStatus\" id=\"NoMatches\">No Matches</div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ndocument.getElementById(\"Loading\").style.display=\"none\";\ndocument.getElementById(\"NoMatches\").style.display=\"none\";\nvar searchResults = new SearchResults(\"searchResults\");\nsearchResults.Search();\n/* @license-end */\n--></script>\n</div>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/all_3.js",
    "content": "var searchData=\n[\n  ['deprecated_20list_13',['Deprecated List',['../deprecated.html',1,'']]]\n];\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/all_4.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html><head><title></title>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<link rel=\"stylesheet\" type=\"text/css\" href=\"search.css\"/>\n<script type=\"text/javascript\" src=\"all_4.js\"></script>\n<script type=\"text/javascript\" src=\"search.js\"></script>\n</head>\n<body class=\"SRPage\">\n<div id=\"SRIndex\">\n<div class=\"SRStatus\" id=\"Loading\">Loading...</div>\n<div id=\"SRResults\"></div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ncreateResults();\n/* @license-end */\n--></script>\n<div class=\"SRStatus\" id=\"Searching\">Searching...</div>\n<div class=\"SRStatus\" id=\"NoMatches\">No Matches</div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ndocument.getElementById(\"Loading\").style.display=\"none\";\ndocument.getElementById(\"NoMatches\").style.display=\"none\";\nvar searchResults = new SearchResults(\"searchResults\");\nsearchResults.Search();\n/* @license-end */\n--></script>\n</div>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/all_4.js",
    "content": "var searchData=\n[\n  ['error_20codes_14',['Error codes',['../group__errors.html',1,'']]]\n];\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/all_5.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html><head><title></title>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<link rel=\"stylesheet\" type=\"text/css\" href=\"search.css\"/>\n<script type=\"text/javascript\" src=\"all_5.js\"></script>\n<script type=\"text/javascript\" src=\"search.js\"></script>\n</head>\n<body class=\"SRPage\">\n<div id=\"SRIndex\">\n<div class=\"SRStatus\" id=\"Loading\">Loading...</div>\n<div id=\"SRResults\"></div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ncreateResults();\n/* @license-end */\n--></script>\n<div class=\"SRStatus\" id=\"Searching\">Searching...</div>\n<div class=\"SRStatus\" id=\"NoMatches\">No Matches</div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ndocument.getElementById(\"Loading\").style.display=\"none\";\ndocument.getElementById(\"NoMatches\").style.display=\"none\";\nvar searchResults = new SearchResults(\"searchResults\");\nsearchResults.Search();\n/* @license-end */\n--></script>\n</div>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/all_5.js",
    "content": "var searchData=\n[\n  ['gamepad_20axes_15',['Gamepad axes',['../group__gamepad__axes.html',1,'']]],\n  ['gamepad_20buttons_16',['Gamepad buttons',['../group__gamepad__buttons.html',1,'']]],\n  ['glapientry_17',['GLAPIENTRY',['../glfw3_8h.html#aa97755eb47e4bf2727ad45d610e18206',1,'glfw3.h']]],\n  ['glfw3_2eh_18',['glfw3.h',['../glfw3_8h.html',1,'']]],\n  ['glfw3native_2eh_19',['glfw3native.h',['../glfw3native_8h.html',1,'']]],\n  ['glfw_5faccum_5falpha_5fbits_20',['GLFW_ACCUM_ALPHA_BITS',['../group__window.html#gae829b55591c18169a40ab4067a041b1f',1,'glfw3.h']]],\n  ['glfw_5faccum_5fblue_5fbits_21',['GLFW_ACCUM_BLUE_BITS',['../group__window.html#ga22bbe9104a8ce1f8b88fb4f186aa36ce',1,'glfw3.h']]],\n  ['glfw_5faccum_5fgreen_5fbits_22',['GLFW_ACCUM_GREEN_BITS',['../group__window.html#ga65713cee1326f8e9d806fdf93187b471',1,'glfw3.h']]],\n  ['glfw_5faccum_5fred_5fbits_23',['GLFW_ACCUM_RED_BITS',['../group__window.html#gaead34a9a683b2bc20eecf30ba738bfc6',1,'glfw3.h']]],\n  ['glfw_5falpha_5fbits_24',['GLFW_ALPHA_BITS',['../group__window.html#gafed79a3f468997877da86c449bd43e8c',1,'glfw3.h']]],\n  ['glfw_5fany_5frelease_5fbehavior_25',['GLFW_ANY_RELEASE_BEHAVIOR',['../glfw3_8h.html#a6b47d806f285efe9bfd7aeec667297ee',1,'glfw3.h']]],\n  ['glfw_5fapi_5funavailable_26',['GLFW_API_UNAVAILABLE',['../group__errors.html#ga56882b290db23261cc6c053c40c2d08e',1,'glfw3.h']]],\n  ['glfw_5fapientry_5fdefined_27',['GLFW_APIENTRY_DEFINED',['../glfw3_8h.html#a8a8538c5500308b4211844f2fb26c7b9',1,'glfw3.h']]],\n  ['glfw_5farrow_5fcursor_28',['GLFW_ARROW_CURSOR',['../group__shapes.html#ga8ab0e717245b85506cb0eaefdea39d0a',1,'glfw3.h']]],\n  ['glfw_5fauto_5ficonify_29',['GLFW_AUTO_ICONIFY',['../group__window.html#ga9d9874fc928200136a6dcdad726aa252',1,'glfw3.h']]],\n  ['glfw_5faux_5fbuffers_30',['GLFW_AUX_BUFFERS',['../group__window.html#gab05108c5029443b371112b031d1fa174',1,'glfw3.h']]],\n  ['glfw_5fblue_5fbits_31',['GLFW_BLUE_BITS',['../group__window.html#gab292ea403db6d514537b515311bf9ae3',1,'glfw3.h']]],\n  ['glfw_5fcenter_5fcursor_32',['GLFW_CENTER_CURSOR',['../group__window.html#ga5ac0847c0aa0b3619f2855707b8a7a77',1,'glfw3.h']]],\n  ['glfw_5fclient_5fapi_33',['GLFW_CLIENT_API',['../group__window.html#ga649309cf72a3d3de5b1348ca7936c95b',1,'glfw3.h']]],\n  ['glfw_5fcocoa_5fchdir_5fresources_34',['GLFW_COCOA_CHDIR_RESOURCES',['../group__init.html#gab937983147a3158d45f88fad7129d9f2',1,'glfw3.h']]],\n  ['glfw_5fcocoa_5fframe_5fname_35',['GLFW_COCOA_FRAME_NAME',['../group__window.html#ga70fa0fbc745de6aa824df79a580e84b5',1,'glfw3.h']]],\n  ['glfw_5fcocoa_5fgraphics_5fswitching_36',['GLFW_COCOA_GRAPHICS_SWITCHING',['../group__window.html#ga53c84ed2ddd94e15bbd44b1f6f7feafc',1,'glfw3.h']]],\n  ['glfw_5fcocoa_5fmenubar_37',['GLFW_COCOA_MENUBAR',['../group__init.html#ga71e0b4ce2f2696a84a9b8c5e12dc70cf',1,'glfw3.h']]],\n  ['glfw_5fcocoa_5fretina_5fframebuffer_38',['GLFW_COCOA_RETINA_FRAMEBUFFER',['../group__window.html#gab6ef2d02eb55800d249ccf1af253c35e',1,'glfw3.h']]],\n  ['glfw_5fconnected_39',['GLFW_CONNECTED',['../glfw3_8h.html#abe11513fd1ffbee5bb9b173f06028b9e',1,'glfw3.h']]],\n  ['glfw_5fcontext_5fcreation_5fapi_40',['GLFW_CONTEXT_CREATION_API',['../group__window.html#ga5154cebfcd831c1cc63a4d5ac9bb4486',1,'glfw3.h']]],\n  ['glfw_5fcontext_5fno_5ferror_41',['GLFW_CONTEXT_NO_ERROR',['../group__window.html#ga5a52fdfd46d8249c211f923675728082',1,'glfw3.h']]],\n  ['glfw_5fcontext_5frelease_5fbehavior_42',['GLFW_CONTEXT_RELEASE_BEHAVIOR',['../group__window.html#ga72b648a8378fe3310c7c7bbecc0f7be6',1,'glfw3.h']]],\n  ['glfw_5fcontext_5frevision_43',['GLFW_CONTEXT_REVISION',['../group__window.html#gafb9475071aa77c6fb05ca5a5c8678a08',1,'glfw3.h']]],\n  ['glfw_5fcontext_5frobustness_44',['GLFW_CONTEXT_ROBUSTNESS',['../group__window.html#gade3593916b4c507900aa2d6844810e00',1,'glfw3.h']]],\n  ['glfw_5fcontext_5fversion_5fmajor_45',['GLFW_CONTEXT_VERSION_MAJOR',['../group__window.html#gafe5e4922de1f9932d7e9849bb053b0c0',1,'glfw3.h']]],\n  ['glfw_5fcontext_5fversion_5fminor_46',['GLFW_CONTEXT_VERSION_MINOR',['../group__window.html#ga31aca791e4b538c4e4a771eb95cc2d07',1,'glfw3.h']]],\n  ['glfw_5fcrosshair_5fcursor_47',['GLFW_CROSSHAIR_CURSOR',['../group__shapes.html#ga8af88c0ea05ab9e8f9ac1530e8873c22',1,'glfw3.h']]],\n  ['glfw_5fcursor_48',['GLFW_CURSOR',['../glfw3_8h.html#aade31da5b884a84a7625c6b059b9132c',1,'glfw3.h']]],\n  ['glfw_5fcursor_5fdisabled_49',['GLFW_CURSOR_DISABLED',['../glfw3_8h.html#a2315b99a329ce53e6a13a9d46fd5ca88',1,'glfw3.h']]],\n  ['glfw_5fcursor_5fhidden_50',['GLFW_CURSOR_HIDDEN',['../glfw3_8h.html#ac4d5cb9d78de8573349c58763d53bf11',1,'glfw3.h']]],\n  ['glfw_5fcursor_5fnormal_51',['GLFW_CURSOR_NORMAL',['../glfw3_8h.html#ae04dd25c8577e19fa8c97368561f6c68',1,'glfw3.h']]],\n  ['glfw_5fdecorated_52',['GLFW_DECORATED',['../group__window.html#ga21b854d36314c94d65aed84405b2f25e',1,'glfw3.h']]],\n  ['glfw_5fdepth_5fbits_53',['GLFW_DEPTH_BITS',['../group__window.html#ga318a55eac1fee57dfe593b6d38149d07',1,'glfw3.h']]],\n  ['glfw_5fdisconnected_54',['GLFW_DISCONNECTED',['../glfw3_8h.html#aab64b25921ef21d89252d6f0a71bfc32',1,'glfw3.h']]],\n  ['glfw_5fdont_5fcare_55',['GLFW_DONT_CARE',['../glfw3_8h.html#a7a2edf2c18446833d27d07f1b7f3d571',1,'glfw3.h']]],\n  ['glfw_5fdoublebuffer_56',['GLFW_DOUBLEBUFFER',['../group__window.html#ga714a5d569e8a274ea58fdfa020955339',1,'glfw3.h']]],\n  ['glfw_5fegl_5fcontext_5fapi_57',['GLFW_EGL_CONTEXT_API',['../glfw3_8h.html#a03cf65c9ab01fc8b872ba58842c531c9',1,'glfw3.h']]],\n  ['glfw_5ffalse_58',['GLFW_FALSE',['../group__init.html#gac877fe3b627d21ef3a0a23e0a73ba8c5',1,'glfw3.h']]],\n  ['glfw_5ffloating_59',['GLFW_FLOATING',['../group__window.html#ga7fb0be51407783b41adbf5bec0b09d80',1,'glfw3.h']]],\n  ['glfw_5ffocus_5fon_5fshow_60',['GLFW_FOCUS_ON_SHOW',['../group__window.html#gafa94b1da34bfd6488c0d709761504dfc',1,'glfw3.h']]],\n  ['glfw_5ffocused_61',['GLFW_FOCUSED',['../group__window.html#ga54ddb14825a1541a56e22afb5f832a9e',1,'glfw3.h']]],\n  ['glfw_5fformat_5funavailable_62',['GLFW_FORMAT_UNAVAILABLE',['../group__errors.html#ga196e125ef261d94184e2b55c05762f14',1,'glfw3.h']]],\n  ['glfw_5fgamepad_5faxis_5flast_63',['GLFW_GAMEPAD_AXIS_LAST',['../group__gamepad__axes.html#ga0818fd9433e1359692b7443293e5ac86',1,'glfw3.h']]],\n  ['glfw_5fgamepad_5faxis_5fleft_5ftrigger_64',['GLFW_GAMEPAD_AXIS_LEFT_TRIGGER',['../group__gamepad__axes.html#ga6d79561dd8907c37354426242901b86e',1,'glfw3.h']]],\n  ['glfw_5fgamepad_5faxis_5fleft_5fx_65',['GLFW_GAMEPAD_AXIS_LEFT_X',['../group__gamepad__axes.html#ga544e396d092036a7d80c1e5f233f7a38',1,'glfw3.h']]],\n  ['glfw_5fgamepad_5faxis_5fleft_5fy_66',['GLFW_GAMEPAD_AXIS_LEFT_Y',['../group__gamepad__axes.html#ga64dcf2c6e9be50b7c556ff7671996dd5',1,'glfw3.h']]],\n  ['glfw_5fgamepad_5faxis_5fright_5ftrigger_67',['GLFW_GAMEPAD_AXIS_RIGHT_TRIGGER',['../group__gamepad__axes.html#ga121a7d5d20589a423cd1634dd6ee6eab',1,'glfw3.h']]],\n  ['glfw_5fgamepad_5faxis_5fright_5fx_68',['GLFW_GAMEPAD_AXIS_RIGHT_X',['../group__gamepad__axes.html#gabd6785106cd3c5a044a6e49a395ee2fc',1,'glfw3.h']]],\n  ['glfw_5fgamepad_5faxis_5fright_5fy_69',['GLFW_GAMEPAD_AXIS_RIGHT_Y',['../group__gamepad__axes.html#ga1cc20566d44d521b7183681a8e88e2e4',1,'glfw3.h']]],\n  ['glfw_5fgamepad_5fbutton_5fa_70',['GLFW_GAMEPAD_BUTTON_A',['../group__gamepad__buttons.html#gae055a12fbf4b48b5954c8e1cd129b810',1,'glfw3.h']]],\n  ['glfw_5fgamepad_5fbutton_5fb_71',['GLFW_GAMEPAD_BUTTON_B',['../group__gamepad__buttons.html#ga2228a6512fd5950cdb51ba07846546fa',1,'glfw3.h']]],\n  ['glfw_5fgamepad_5fbutton_5fback_72',['GLFW_GAMEPAD_BUTTON_BACK',['../group__gamepad__buttons.html#gabc7c0264ce778835b516a472b47f6caf',1,'glfw3.h']]],\n  ['glfw_5fgamepad_5fbutton_5fcircle_73',['GLFW_GAMEPAD_BUTTON_CIRCLE',['../group__gamepad__buttons.html#gaaef094b3dacbf15f272b274516839b82',1,'glfw3.h']]],\n  ['glfw_5fgamepad_5fbutton_5fcross_74',['GLFW_GAMEPAD_BUTTON_CROSS',['../group__gamepad__buttons.html#gaf08d0df26527c9305253422bd98ed63a',1,'glfw3.h']]],\n  ['glfw_5fgamepad_5fbutton_5fdpad_5fdown_75',['GLFW_GAMEPAD_BUTTON_DPAD_DOWN',['../group__gamepad__buttons.html#ga8f2b731b97d80f90f11967a83207665c',1,'glfw3.h']]],\n  ['glfw_5fgamepad_5fbutton_5fdpad_5fleft_76',['GLFW_GAMEPAD_BUTTON_DPAD_LEFT',['../group__gamepad__buttons.html#gaf0697e0e8607b2ebe1c93b0c6befe301',1,'glfw3.h']]],\n  ['glfw_5fgamepad_5fbutton_5fdpad_5fright_77',['GLFW_GAMEPAD_BUTTON_DPAD_RIGHT',['../group__gamepad__buttons.html#gae2a780d2a8c79e0b77c0b7b601ca57c6',1,'glfw3.h']]],\n  ['glfw_5fgamepad_5fbutton_5fdpad_5fup_78',['GLFW_GAMEPAD_BUTTON_DPAD_UP',['../group__gamepad__buttons.html#ga4f1ed6f974a47bc8930d4874a283476a',1,'glfw3.h']]],\n  ['glfw_5fgamepad_5fbutton_5fguide_79',['GLFW_GAMEPAD_BUTTON_GUIDE',['../group__gamepad__buttons.html#ga7fa48c32e5b2f5db2f080aa0b8b573dc',1,'glfw3.h']]],\n  ['glfw_5fgamepad_5fbutton_5flast_80',['GLFW_GAMEPAD_BUTTON_LAST',['../group__gamepad__buttons.html#ga5cc98882f4f81dacf761639a567f61eb',1,'glfw3.h']]],\n  ['glfw_5fgamepad_5fbutton_5fleft_5fbumper_81',['GLFW_GAMEPAD_BUTTON_LEFT_BUMPER',['../group__gamepad__buttons.html#ga17d67b4f39a39d6b813bd1567a3507c3',1,'glfw3.h']]],\n  ['glfw_5fgamepad_5fbutton_5fleft_5fthumb_82',['GLFW_GAMEPAD_BUTTON_LEFT_THUMB',['../group__gamepad__buttons.html#ga3e089787327454f7bfca7364d6ca206a',1,'glfw3.h']]],\n  ['glfw_5fgamepad_5fbutton_5fright_5fbumper_83',['GLFW_GAMEPAD_BUTTON_RIGHT_BUMPER',['../group__gamepad__buttons.html#gadfbc9ea9bf3aae896b79fa49fdc85c7f',1,'glfw3.h']]],\n  ['glfw_5fgamepad_5fbutton_5fright_5fthumb_84',['GLFW_GAMEPAD_BUTTON_RIGHT_THUMB',['../group__gamepad__buttons.html#ga1c003f52b5aebb45272475b48953b21a',1,'glfw3.h']]],\n  ['glfw_5fgamepad_5fbutton_5fsquare_85',['GLFW_GAMEPAD_BUTTON_SQUARE',['../group__gamepad__buttons.html#gafc7821e87d77d41ed2cd3e1f726ec35f',1,'glfw3.h']]],\n  ['glfw_5fgamepad_5fbutton_5fstart_86',['GLFW_GAMEPAD_BUTTON_START',['../group__gamepad__buttons.html#ga04606949dd9139434b8a1bedf4ac1021',1,'glfw3.h']]],\n  ['glfw_5fgamepad_5fbutton_5ftriangle_87',['GLFW_GAMEPAD_BUTTON_TRIANGLE',['../group__gamepad__buttons.html#ga3a7ef6bcb768a08cd3bf142f7f09f802',1,'glfw3.h']]],\n  ['glfw_5fgamepad_5fbutton_5fx_88',['GLFW_GAMEPAD_BUTTON_X',['../group__gamepad__buttons.html#ga52cc94785cf3fe9a12e246539259887c',1,'glfw3.h']]],\n  ['glfw_5fgamepad_5fbutton_5fy_89',['GLFW_GAMEPAD_BUTTON_Y',['../group__gamepad__buttons.html#gafc931248bda494b530cbe057f386a5ed',1,'glfw3.h']]],\n  ['glfw_5fgreen_5fbits_90',['GLFW_GREEN_BITS',['../group__window.html#gafba3b72638c914e5fb8a237dd4c50d4d',1,'glfw3.h']]],\n  ['glfw_5fhand_5fcursor_91',['GLFW_HAND_CURSOR',['../group__shapes.html#ga1db35e20849e0837c82e3dc1fd797263',1,'glfw3.h']]],\n  ['glfw_5fhat_5fcentered_92',['GLFW_HAT_CENTERED',['../group__hat__state.html#gae2c0bcb7aec609e4736437554f6638fd',1,'glfw3.h']]],\n  ['glfw_5fhat_5fdown_93',['GLFW_HAT_DOWN',['../group__hat__state.html#gad60d1fd0dc85c18f2642cbae96d3deff',1,'glfw3.h']]],\n  ['glfw_5fhat_5fleft_94',['GLFW_HAT_LEFT',['../group__hat__state.html#gac775f4b3154fdf5db93eb432ba546dff',1,'glfw3.h']]],\n  ['glfw_5fhat_5fleft_5fdown_95',['GLFW_HAT_LEFT_DOWN',['../group__hat__state.html#ga76c02baf1ea345fcbe3e8ff176a73e19',1,'glfw3.h']]],\n  ['glfw_5fhat_5fleft_5fup_96',['GLFW_HAT_LEFT_UP',['../group__hat__state.html#ga638f0e20dc5de90de21a33564e8ce129',1,'glfw3.h']]],\n  ['glfw_5fhat_5fright_97',['GLFW_HAT_RIGHT',['../group__hat__state.html#ga252586e3bbde75f4b0e07ad3124867f5',1,'glfw3.h']]],\n  ['glfw_5fhat_5fright_5fdown_98',['GLFW_HAT_RIGHT_DOWN',['../group__hat__state.html#gad7f0e4f52fd68d734863aaeadab3a3f5',1,'glfw3.h']]],\n  ['glfw_5fhat_5fright_5fup_99',['GLFW_HAT_RIGHT_UP',['../group__hat__state.html#ga94aea0ae241a8b902883536c592ee693',1,'glfw3.h']]],\n  ['glfw_5fhat_5fup_100',['GLFW_HAT_UP',['../group__hat__state.html#ga8c9720c76cd1b912738159ed74c85b36',1,'glfw3.h']]],\n  ['glfw_5fhovered_101',['GLFW_HOVERED',['../group__window.html#ga8665c71c6fa3d22425c6a0e8a3f89d8a',1,'glfw3.h']]],\n  ['glfw_5fhresize_5fcursor_102',['GLFW_HRESIZE_CURSOR',['../group__shapes.html#gabb3eb0109f11bb808fc34659177ca962',1,'glfw3.h']]],\n  ['glfw_5fibeam_5fcursor_103',['GLFW_IBEAM_CURSOR',['../group__shapes.html#ga36185f4375eaada1b04e431244774c86',1,'glfw3.h']]],\n  ['glfw_5ficonified_104',['GLFW_ICONIFIED',['../group__window.html#ga39d44b7c056e55e581355a92d240b58a',1,'glfw3.h']]],\n  ['glfw_5finvalid_5fenum_105',['GLFW_INVALID_ENUM',['../group__errors.html#ga76f6bb9c4eea73db675f096b404593ce',1,'glfw3.h']]],\n  ['glfw_5finvalid_5fvalue_106',['GLFW_INVALID_VALUE',['../group__errors.html#gaaf2ef9aa8202c2b82ac2d921e554c687',1,'glfw3.h']]],\n  ['glfw_5fjoystick_5f1_107',['GLFW_JOYSTICK_1',['../group__joysticks.html#ga34a0443d059e9f22272cd4669073f73d',1,'glfw3.h']]],\n  ['glfw_5fjoystick_5f10_108',['GLFW_JOYSTICK_10',['../group__joysticks.html#gaef55389ee605d6dfc31aef6fe98c54ec',1,'glfw3.h']]],\n  ['glfw_5fjoystick_5f11_109',['GLFW_JOYSTICK_11',['../group__joysticks.html#gae7d26e3df447c2c14a569fcc18516af4',1,'glfw3.h']]],\n  ['glfw_5fjoystick_5f12_110',['GLFW_JOYSTICK_12',['../group__joysticks.html#gab91bbf5b7ca6be8d3ac5c4d89ff48ac7',1,'glfw3.h']]],\n  ['glfw_5fjoystick_5f13_111',['GLFW_JOYSTICK_13',['../group__joysticks.html#ga5c84fb4e49bf661d7d7c78eb4018c508',1,'glfw3.h']]],\n  ['glfw_5fjoystick_5f14_112',['GLFW_JOYSTICK_14',['../group__joysticks.html#ga89540873278ae5a42b3e70d64164dc74',1,'glfw3.h']]],\n  ['glfw_5fjoystick_5f15_113',['GLFW_JOYSTICK_15',['../group__joysticks.html#ga7b02ab70daf7a78bcc942d5d4cc1dcf9',1,'glfw3.h']]],\n  ['glfw_5fjoystick_5f16_114',['GLFW_JOYSTICK_16',['../group__joysticks.html#ga453edeeabf350827646b6857df4f80ce',1,'glfw3.h']]],\n  ['glfw_5fjoystick_5f2_115',['GLFW_JOYSTICK_2',['../group__joysticks.html#ga6eab65ec88e65e0850ef8413504cb50c',1,'glfw3.h']]],\n  ['glfw_5fjoystick_5f3_116',['GLFW_JOYSTICK_3',['../group__joysticks.html#gae6f3eedfeb42424c2f5e3161efb0b654',1,'glfw3.h']]],\n  ['glfw_5fjoystick_5f4_117',['GLFW_JOYSTICK_4',['../group__joysticks.html#ga97ddbcad02b7f48d74fad4ddb08fff59',1,'glfw3.h']]],\n  ['glfw_5fjoystick_5f5_118',['GLFW_JOYSTICK_5',['../group__joysticks.html#gae43281bc66d3fa5089fb50c3e7a28695',1,'glfw3.h']]],\n  ['glfw_5fjoystick_5f6_119',['GLFW_JOYSTICK_6',['../group__joysticks.html#ga74771620aa53bd68a487186dea66fd77',1,'glfw3.h']]],\n  ['glfw_5fjoystick_5f7_120',['GLFW_JOYSTICK_7',['../group__joysticks.html#ga20a9f4f3aaefed9ea5e66072fc588b87',1,'glfw3.h']]],\n  ['glfw_5fjoystick_5f8_121',['GLFW_JOYSTICK_8',['../group__joysticks.html#ga21a934c940bcf25db0e4c8fe9b364bdb',1,'glfw3.h']]],\n  ['glfw_5fjoystick_5f9_122',['GLFW_JOYSTICK_9',['../group__joysticks.html#ga87689d47df0ba6f9f5fcbbcaf7b3cecf',1,'glfw3.h']]],\n  ['glfw_5fjoystick_5fhat_5fbuttons_123',['GLFW_JOYSTICK_HAT_BUTTONS',['../group__init.html#gab9c0534709fda03ec8959201da3a9a18',1,'glfw3.h']]],\n  ['glfw_5fjoystick_5flast_124',['GLFW_JOYSTICK_LAST',['../group__joysticks.html#ga9ca13ebf24c331dd98df17d84a4b72c9',1,'glfw3.h']]],\n  ['glfw_5fkey_5f0_125',['GLFW_KEY_0',['../group__keys.html#ga50391730e9d7112ad4fd42d0bd1597c1',1,'glfw3.h']]],\n  ['glfw_5fkey_5f1_126',['GLFW_KEY_1',['../group__keys.html#ga05e4cae9ddb8d40cf6d82c8f11f2502f',1,'glfw3.h']]],\n  ['glfw_5fkey_5f2_127',['GLFW_KEY_2',['../group__keys.html#gadc8e66b3a4c4b5c39ad1305cf852863c',1,'glfw3.h']]],\n  ['glfw_5fkey_5f3_128',['GLFW_KEY_3',['../group__keys.html#ga812f0273fe1a981e1fa002ae73e92271',1,'glfw3.h']]],\n  ['glfw_5fkey_5f4_129',['GLFW_KEY_4',['../group__keys.html#ga9e14b6975a9cc8f66cdd5cb3d3861356',1,'glfw3.h']]],\n  ['glfw_5fkey_5f5_130',['GLFW_KEY_5',['../group__keys.html#ga4d74ddaa5d4c609993b4d4a15736c924',1,'glfw3.h']]],\n  ['glfw_5fkey_5f6_131',['GLFW_KEY_6',['../group__keys.html#ga9ea4ab80c313a227b14d0a7c6f810b5d',1,'glfw3.h']]],\n  ['glfw_5fkey_5f7_132',['GLFW_KEY_7',['../group__keys.html#gab79b1cfae7bd630cfc4604c1f263c666',1,'glfw3.h']]],\n  ['glfw_5fkey_5f8_133',['GLFW_KEY_8',['../group__keys.html#gadeaa109a0f9f5afc94fe4a108e686f6f',1,'glfw3.h']]],\n  ['glfw_5fkey_5f9_134',['GLFW_KEY_9',['../group__keys.html#ga2924cb5349ebbf97c8987f3521c44f39',1,'glfw3.h']]],\n  ['glfw_5fkey_5fa_135',['GLFW_KEY_A',['../group__keys.html#ga03e842608e1ea323370889d33b8f70ff',1,'glfw3.h']]],\n  ['glfw_5fkey_5fapostrophe_136',['GLFW_KEY_APOSTROPHE',['../group__keys.html#ga6059b0b048ba6980b6107fffbd3b4b24',1,'glfw3.h']]],\n  ['glfw_5fkey_5fb_137',['GLFW_KEY_B',['../group__keys.html#ga8e3fb647ff3aca9e8dbf14fe66332941',1,'glfw3.h']]],\n  ['glfw_5fkey_5fbackslash_138',['GLFW_KEY_BACKSLASH',['../group__keys.html#gab8155ea99d1ab27ff56f24f8dc73f8d1',1,'glfw3.h']]],\n  ['glfw_5fkey_5fbackspace_139',['GLFW_KEY_BACKSPACE',['../group__keys.html#ga6c0df1fe2f156bbd5a98c66d76ff3635',1,'glfw3.h']]],\n  ['glfw_5fkey_5fc_140',['GLFW_KEY_C',['../group__keys.html#ga00ccf3475d9ee2e679480d540d554669',1,'glfw3.h']]],\n  ['glfw_5fkey_5fcaps_5flock_141',['GLFW_KEY_CAPS_LOCK',['../group__keys.html#ga92c1d2c9d63485f3d70f94f688d48672',1,'glfw3.h']]],\n  ['glfw_5fkey_5fcomma_142',['GLFW_KEY_COMMA',['../group__keys.html#gab3d5d72e59d3055f494627b0a524926c',1,'glfw3.h']]],\n  ['glfw_5fkey_5fd_143',['GLFW_KEY_D',['../group__keys.html#ga011f7cdc9a654da984a2506479606933',1,'glfw3.h']]],\n  ['glfw_5fkey_5fdelete_144',['GLFW_KEY_DELETE',['../group__keys.html#gadb111e4df74b8a715f2c05dad58d2682',1,'glfw3.h']]],\n  ['glfw_5fkey_5fdown_145',['GLFW_KEY_DOWN',['../group__keys.html#gae2e3958c71595607416aa7bf082be2f9',1,'glfw3.h']]],\n  ['glfw_5fkey_5fe_146',['GLFW_KEY_E',['../group__keys.html#gabf48fcc3afbe69349df432b470c96ef2',1,'glfw3.h']]],\n  ['glfw_5fkey_5fend_147',['GLFW_KEY_END',['../group__keys.html#ga86587ea1df19a65978d3e3b8439bedd9',1,'glfw3.h']]],\n  ['glfw_5fkey_5fenter_148',['GLFW_KEY_ENTER',['../group__keys.html#ga9555a92ecbecdbc1f3435219c571d667',1,'glfw3.h']]],\n  ['glfw_5fkey_5fequal_149',['GLFW_KEY_EQUAL',['../group__keys.html#gae1a2de47240d6664423c204bdd91bd17',1,'glfw3.h']]],\n  ['glfw_5fkey_5fescape_150',['GLFW_KEY_ESCAPE',['../group__keys.html#gaac6596c350b635c245113b81c2123b93',1,'glfw3.h']]],\n  ['glfw_5fkey_5ff_151',['GLFW_KEY_F',['../group__keys.html#ga5df402e02aca08444240058fd9b42a55',1,'glfw3.h']]],\n  ['glfw_5fkey_5ff1_152',['GLFW_KEY_F1',['../group__keys.html#gafb8d66c573acf22e364049477dcbea30',1,'glfw3.h']]],\n  ['glfw_5fkey_5ff10_153',['GLFW_KEY_F10',['../group__keys.html#ga718d11d2f7d57471a2f6a894235995b1',1,'glfw3.h']]],\n  ['glfw_5fkey_5ff11_154',['GLFW_KEY_F11',['../group__keys.html#ga0bc04b11627e7d69339151e7306b2832',1,'glfw3.h']]],\n  ['glfw_5fkey_5ff12_155',['GLFW_KEY_F12',['../group__keys.html#gaf5908fa9b0a906ae03fc2c61ac7aa3e2',1,'glfw3.h']]],\n  ['glfw_5fkey_5ff13_156',['GLFW_KEY_F13',['../group__keys.html#gad637f4308655e1001bd6ad942bc0fd4b',1,'glfw3.h']]],\n  ['glfw_5fkey_5ff14_157',['GLFW_KEY_F14',['../group__keys.html#gaf14c66cff3396e5bd46e803c035e6c1f',1,'glfw3.h']]],\n  ['glfw_5fkey_5ff15_158',['GLFW_KEY_F15',['../group__keys.html#ga7f70970db6e8be1794da8516a6d14058',1,'glfw3.h']]],\n  ['glfw_5fkey_5ff16_159',['GLFW_KEY_F16',['../group__keys.html#gaa582dbb1d2ba2050aa1dca0838095b27',1,'glfw3.h']]],\n  ['glfw_5fkey_5ff17_160',['GLFW_KEY_F17',['../group__keys.html#ga972ce5c365e2394b36104b0e3125c748',1,'glfw3.h']]],\n  ['glfw_5fkey_5ff18_161',['GLFW_KEY_F18',['../group__keys.html#gaebf6391058d5566601e357edc5ea737c',1,'glfw3.h']]],\n  ['glfw_5fkey_5ff19_162',['GLFW_KEY_F19',['../group__keys.html#gaec011d9ba044058cb54529da710e9791',1,'glfw3.h']]],\n  ['glfw_5fkey_5ff2_163',['GLFW_KEY_F2',['../group__keys.html#ga0900750aff94889b940f5e428c07daee',1,'glfw3.h']]],\n  ['glfw_5fkey_5ff20_164',['GLFW_KEY_F20',['../group__keys.html#ga82b9c721ada04cd5ca8de767da38022f',1,'glfw3.h']]],\n  ['glfw_5fkey_5ff21_165',['GLFW_KEY_F21',['../group__keys.html#ga356afb14d3440ff2bb378f74f7ebc60f',1,'glfw3.h']]],\n  ['glfw_5fkey_5ff22_166',['GLFW_KEY_F22',['../group__keys.html#ga90960bd2a155f2b09675324d3dff1565',1,'glfw3.h']]],\n  ['glfw_5fkey_5ff23_167',['GLFW_KEY_F23',['../group__keys.html#ga43c21099aac10952d1be909a8ddee4d5',1,'glfw3.h']]],\n  ['glfw_5fkey_5ff24_168',['GLFW_KEY_F24',['../group__keys.html#ga8150374677b5bed3043408732152dea2',1,'glfw3.h']]],\n  ['glfw_5fkey_5ff25_169',['GLFW_KEY_F25',['../group__keys.html#gaa4bbd93ed73bb4c6ae7d83df880b7199',1,'glfw3.h']]],\n  ['glfw_5fkey_5ff3_170',['GLFW_KEY_F3',['../group__keys.html#gaed7cd729c0147a551bb8b7bb36c17015',1,'glfw3.h']]],\n  ['glfw_5fkey_5ff4_171',['GLFW_KEY_F4',['../group__keys.html#ga9b61ebd0c63b44b7332fda2c9763eaa6',1,'glfw3.h']]],\n  ['glfw_5fkey_5ff5_172',['GLFW_KEY_F5',['../group__keys.html#gaf258dda9947daa428377938ed577c8c2',1,'glfw3.h']]],\n  ['glfw_5fkey_5ff6_173',['GLFW_KEY_F6',['../group__keys.html#ga6dc2d3f87b9d51ffbbbe2ef0299d8e1d',1,'glfw3.h']]],\n  ['glfw_5fkey_5ff7_174',['GLFW_KEY_F7',['../group__keys.html#gacca6ef8a2162c52a0ac1d881e8d9c38a',1,'glfw3.h']]],\n  ['glfw_5fkey_5ff8_175',['GLFW_KEY_F8',['../group__keys.html#gac9d39390336ae14e4a93e295de43c7e8',1,'glfw3.h']]],\n  ['glfw_5fkey_5ff9_176',['GLFW_KEY_F9',['../group__keys.html#gae40de0de1c9f21cd26c9afa3d7050851',1,'glfw3.h']]],\n  ['glfw_5fkey_5fg_177',['GLFW_KEY_G',['../group__keys.html#gae74ecddf7cc96104ab23989b1cdab536',1,'glfw3.h']]],\n  ['glfw_5fkey_5fgrave_5faccent_178',['GLFW_KEY_GRAVE_ACCENT',['../group__keys.html#ga7a3701fb4e2a0b136ff4b568c3c8d668',1,'glfw3.h']]],\n  ['glfw_5fkey_5fh_179',['GLFW_KEY_H',['../group__keys.html#gad4cc98fc8f35f015d9e2fb94bf136076',1,'glfw3.h']]],\n  ['glfw_5fkey_5fhome_180',['GLFW_KEY_HOME',['../group__keys.html#ga41452c7287195d481e43207318c126a7',1,'glfw3.h']]],\n  ['glfw_5fkey_5fi_181',['GLFW_KEY_I',['../group__keys.html#ga274655c8bfe39742684ca393cf8ed093',1,'glfw3.h']]],\n  ['glfw_5fkey_5finsert_182',['GLFW_KEY_INSERT',['../group__keys.html#ga373ac7365435d6b0eb1068f470e34f47',1,'glfw3.h']]],\n  ['glfw_5fkey_5fj_183',['GLFW_KEY_J',['../group__keys.html#ga65ff2aedb129a3149ad9cb3e4159a75f',1,'glfw3.h']]],\n  ['glfw_5fkey_5fk_184',['GLFW_KEY_K',['../group__keys.html#ga4ae8debadf6d2a691badae0b53ea3ba0',1,'glfw3.h']]],\n  ['glfw_5fkey_5fkp_5f0_185',['GLFW_KEY_KP_0',['../group__keys.html#ga10515dafc55b71e7683f5b4fedd1c70d',1,'glfw3.h']]],\n  ['glfw_5fkey_5fkp_5f1_186',['GLFW_KEY_KP_1',['../group__keys.html#gaf3a29a334402c5eaf0b3439edf5587c3',1,'glfw3.h']]],\n  ['glfw_5fkey_5fkp_5f2_187',['GLFW_KEY_KP_2',['../group__keys.html#gaf82d5a802ab8213c72653d7480c16f13',1,'glfw3.h']]],\n  ['glfw_5fkey_5fkp_5f3_188',['GLFW_KEY_KP_3',['../group__keys.html#ga7e25ff30d56cd512828c1d4ae8d54ef2',1,'glfw3.h']]],\n  ['glfw_5fkey_5fkp_5f4_189',['GLFW_KEY_KP_4',['../group__keys.html#gada7ec86778b85e0b4de0beea72234aea',1,'glfw3.h']]],\n  ['glfw_5fkey_5fkp_5f5_190',['GLFW_KEY_KP_5',['../group__keys.html#ga9a5be274434866c51738cafbb6d26b45',1,'glfw3.h']]],\n  ['glfw_5fkey_5fkp_5f6_191',['GLFW_KEY_KP_6',['../group__keys.html#gafc141b0f8450519084c01092a3157faa',1,'glfw3.h']]],\n  ['glfw_5fkey_5fkp_5f7_192',['GLFW_KEY_KP_7',['../group__keys.html#ga8882f411f05d04ec77a9563974bbfa53',1,'glfw3.h']]],\n  ['glfw_5fkey_5fkp_5f8_193',['GLFW_KEY_KP_8',['../group__keys.html#gab2ea2e6a12f89d315045af520ac78cec',1,'glfw3.h']]],\n  ['glfw_5fkey_5fkp_5f9_194',['GLFW_KEY_KP_9',['../group__keys.html#gafb21426b630ed4fcc084868699ba74c1',1,'glfw3.h']]],\n  ['glfw_5fkey_5fkp_5fadd_195',['GLFW_KEY_KP_ADD',['../group__keys.html#gad09c7c98acc79e89aa6a0a91275becac',1,'glfw3.h']]],\n  ['glfw_5fkey_5fkp_5fdecimal_196',['GLFW_KEY_KP_DECIMAL',['../group__keys.html#ga4e231d968796331a9ea0dbfb98d4005b',1,'glfw3.h']]],\n  ['glfw_5fkey_5fkp_5fdivide_197',['GLFW_KEY_KP_DIVIDE',['../group__keys.html#gabca1733780a273d549129ad0f250d1e5',1,'glfw3.h']]],\n  ['glfw_5fkey_5fkp_5fenter_198',['GLFW_KEY_KP_ENTER',['../group__keys.html#ga4f728f8738f2986bd63eedd3d412e8cf',1,'glfw3.h']]],\n  ['glfw_5fkey_5fkp_5fequal_199',['GLFW_KEY_KP_EQUAL',['../group__keys.html#gaebdc76d4a808191e6d21b7e4ad2acd97',1,'glfw3.h']]],\n  ['glfw_5fkey_5fkp_5fmultiply_200',['GLFW_KEY_KP_MULTIPLY',['../group__keys.html#ga9ada267eb0e78ed2ada8701dd24a56ef',1,'glfw3.h']]],\n  ['glfw_5fkey_5fkp_5fsubtract_201',['GLFW_KEY_KP_SUBTRACT',['../group__keys.html#gaa3dbd60782ff93d6082a124bce1fa236',1,'glfw3.h']]],\n  ['glfw_5fkey_5fl_202',['GLFW_KEY_L',['../group__keys.html#gaaa8b54a13f6b1eed85ac86f82d550db2',1,'glfw3.h']]],\n  ['glfw_5fkey_5flast_203',['GLFW_KEY_LAST',['../group__keys.html#ga442cbaef7bfb9a4ba13594dd7fbf2789',1,'glfw3.h']]],\n  ['glfw_5fkey_5fleft_204',['GLFW_KEY_LEFT',['../group__keys.html#gae12a010d33c309a67ab9460c51eb2462',1,'glfw3.h']]],\n  ['glfw_5fkey_5fleft_5falt_205',['GLFW_KEY_LEFT_ALT',['../group__keys.html#ga7f27dabf63a7789daa31e1c96790219b',1,'glfw3.h']]],\n  ['glfw_5fkey_5fleft_5fbracket_206',['GLFW_KEY_LEFT_BRACKET',['../group__keys.html#gad1c8d9adac53925276ecb1d592511d8a',1,'glfw3.h']]],\n  ['glfw_5fkey_5fleft_5fcontrol_207',['GLFW_KEY_LEFT_CONTROL',['../group__keys.html#ga9f97b743e81460ac4b2deddecd10a464',1,'glfw3.h']]],\n  ['glfw_5fkey_5fleft_5fshift_208',['GLFW_KEY_LEFT_SHIFT',['../group__keys.html#ga8a530a28a65c44ab5d00b759b756d3f6',1,'glfw3.h']]],\n  ['glfw_5fkey_5fleft_5fsuper_209',['GLFW_KEY_LEFT_SUPER',['../group__keys.html#gafb1207c91997fc295afd1835fbc5641a',1,'glfw3.h']]],\n  ['glfw_5fkey_5fm_210',['GLFW_KEY_M',['../group__keys.html#ga4d7f0260c82e4ea3d6ebc7a21d6e3716',1,'glfw3.h']]],\n  ['glfw_5fkey_5fmenu_211',['GLFW_KEY_MENU',['../group__keys.html#ga9845be48a745fc232045c9ec174d8820',1,'glfw3.h']]],\n  ['glfw_5fkey_5fminus_212',['GLFW_KEY_MINUS',['../group__keys.html#gac556b360f7f6fca4b70ba0aecf313fd4',1,'glfw3.h']]],\n  ['glfw_5fkey_5fn_213',['GLFW_KEY_N',['../group__keys.html#gae00856dfeb5d13aafebf59d44de5cdda',1,'glfw3.h']]],\n  ['glfw_5fkey_5fnum_5flock_214',['GLFW_KEY_NUM_LOCK',['../group__keys.html#ga3946edc362aeff213b2be6304296cf43',1,'glfw3.h']]],\n  ['glfw_5fkey_5fo_215',['GLFW_KEY_O',['../group__keys.html#gaecbbb79130df419d58dd7f09a169efe9',1,'glfw3.h']]],\n  ['glfw_5fkey_5fp_216',['GLFW_KEY_P',['../group__keys.html#ga8fc15819c1094fb2afa01d84546b33e1',1,'glfw3.h']]],\n  ['glfw_5fkey_5fpage_5fdown_217',['GLFW_KEY_PAGE_DOWN',['../group__keys.html#gaee0a8fa442001cc2147812f84b59041c',1,'glfw3.h']]],\n  ['glfw_5fkey_5fpage_5fup_218',['GLFW_KEY_PAGE_UP',['../group__keys.html#ga3ab731f9622f0db280178a5f3cc6d586',1,'glfw3.h']]],\n  ['glfw_5fkey_5fpause_219',['GLFW_KEY_PAUSE',['../group__keys.html#ga8116b9692d87382afb5849b6d8907f18',1,'glfw3.h']]],\n  ['glfw_5fkey_5fperiod_220',['GLFW_KEY_PERIOD',['../group__keys.html#ga37e296b650eab419fc474ff69033d927',1,'glfw3.h']]],\n  ['glfw_5fkey_5fprint_5fscreen_221',['GLFW_KEY_PRINT_SCREEN',['../group__keys.html#gaf964c2e65e97d0cf785a5636ee8df642',1,'glfw3.h']]],\n  ['glfw_5fkey_5fq_222',['GLFW_KEY_Q',['../group__keys.html#gafdd01e38b120d67cf51e348bb47f3964',1,'glfw3.h']]],\n  ['glfw_5fkey_5fr_223',['GLFW_KEY_R',['../group__keys.html#ga4ce6c70a0c98c50b3fe4ab9a728d4d36',1,'glfw3.h']]],\n  ['glfw_5fkey_5fright_224',['GLFW_KEY_RIGHT',['../group__keys.html#ga06ba07662e8c291a4a84535379ffc7ac',1,'glfw3.h']]],\n  ['glfw_5fkey_5fright_5falt_225',['GLFW_KEY_RIGHT_ALT',['../group__keys.html#ga687b38009131cfdd07a8d05fff8fa446',1,'glfw3.h']]],\n  ['glfw_5fkey_5fright_5fbracket_226',['GLFW_KEY_RIGHT_BRACKET',['../group__keys.html#ga86ef225fd6a66404caae71044cdd58d8',1,'glfw3.h']]],\n  ['glfw_5fkey_5fright_5fcontrol_227',['GLFW_KEY_RIGHT_CONTROL',['../group__keys.html#gad1ca2094b2694e7251d0ab1fd34f8519',1,'glfw3.h']]],\n  ['glfw_5fkey_5fright_5fshift_228',['GLFW_KEY_RIGHT_SHIFT',['../group__keys.html#gaffca36b99c9dce1a19cb9befbadce691',1,'glfw3.h']]],\n  ['glfw_5fkey_5fright_5fsuper_229',['GLFW_KEY_RIGHT_SUPER',['../group__keys.html#gad4547a3e8e247594acb60423fe6502db',1,'glfw3.h']]],\n  ['glfw_5fkey_5fs_230',['GLFW_KEY_S',['../group__keys.html#ga1570e2ccaab036ea82bed66fc1dab2a9',1,'glfw3.h']]],\n  ['glfw_5fkey_5fscroll_5flock_231',['GLFW_KEY_SCROLL_LOCK',['../group__keys.html#gaf622b63b9537f7084c2ab649b8365630',1,'glfw3.h']]],\n  ['glfw_5fkey_5fsemicolon_232',['GLFW_KEY_SEMICOLON',['../group__keys.html#ga84233de9ee5bb3e8788a5aa07d80af7d',1,'glfw3.h']]],\n  ['glfw_5fkey_5fslash_233',['GLFW_KEY_SLASH',['../group__keys.html#gadf3d753b2d479148d711de34b83fd0db',1,'glfw3.h']]],\n  ['glfw_5fkey_5fspace_234',['GLFW_KEY_SPACE',['../group__keys.html#gaddb2c23772b97fd7e26e8ee66f1ad014',1,'glfw3.h']]],\n  ['glfw_5fkey_5ft_235',['GLFW_KEY_T',['../group__keys.html#ga90e0560422ec7a30e7f3f375bc9f37f9',1,'glfw3.h']]],\n  ['glfw_5fkey_5ftab_236',['GLFW_KEY_TAB',['../group__keys.html#ga6908a4bda9950a3e2b73f794bbe985df',1,'glfw3.h']]],\n  ['glfw_5fkey_5fu_237',['GLFW_KEY_U',['../group__keys.html#gacad52f3bf7d378fc0ffa72a76769256d',1,'glfw3.h']]],\n  ['glfw_5fkey_5funknown_238',['GLFW_KEY_UNKNOWN',['../group__keys.html#ga99aacc875b6b27a072552631e13775c7',1,'glfw3.h']]],\n  ['glfw_5fkey_5fup_239',['GLFW_KEY_UP',['../group__keys.html#ga2f3342b194020d3544c67e3506b6f144',1,'glfw3.h']]],\n  ['glfw_5fkey_5fv_240',['GLFW_KEY_V',['../group__keys.html#ga22c7763899ecf7788862e5f90eacce6b',1,'glfw3.h']]],\n  ['glfw_5fkey_5fw_241',['GLFW_KEY_W',['../group__keys.html#gaa06a712e6202661fc03da5bdb7b6e545',1,'glfw3.h']]],\n  ['glfw_5fkey_5fworld_5f1_242',['GLFW_KEY_WORLD_1',['../group__keys.html#gadc78dad3dab76bcd4b5c20114052577a',1,'glfw3.h']]],\n  ['glfw_5fkey_5fworld_5f2_243',['GLFW_KEY_WORLD_2',['../group__keys.html#ga20494bfebf0bb4fc9503afca18ab2c5e',1,'glfw3.h']]],\n  ['glfw_5fkey_5fx_244',['GLFW_KEY_X',['../group__keys.html#gac1c42c0bf4192cea713c55598b06b744',1,'glfw3.h']]],\n  ['glfw_5fkey_5fy_245',['GLFW_KEY_Y',['../group__keys.html#gafd9f115a549effdf8e372a787c360313',1,'glfw3.h']]],\n  ['glfw_5fkey_5fz_246',['GLFW_KEY_Z',['../group__keys.html#gac489e208c26afda8d4938ed88718760a',1,'glfw3.h']]],\n  ['glfw_5flock_5fkey_5fmods_247',['GLFW_LOCK_KEY_MODS',['../glfw3_8h.html#a07b84de0b52143e1958f88a7d9105947',1,'glfw3.h']]],\n  ['glfw_5flose_5fcontext_5fon_5freset_248',['GLFW_LOSE_CONTEXT_ON_RESET',['../glfw3_8h.html#aec1132f245143fc915b2f0995228564c',1,'glfw3.h']]],\n  ['glfw_5fmaximized_249',['GLFW_MAXIMIZED',['../group__window.html#gad8ccb396253ad0b72c6d4c917eb38a03',1,'glfw3.h']]],\n  ['glfw_5fmod_5falt_250',['GLFW_MOD_ALT',['../group__mods.html#gad2acd5633463c29e07008687ea73c0f4',1,'glfw3.h']]],\n  ['glfw_5fmod_5fcaps_5flock_251',['GLFW_MOD_CAPS_LOCK',['../group__mods.html#gaefeef8fcf825a6e43e241b337897200f',1,'glfw3.h']]],\n  ['glfw_5fmod_5fcontrol_252',['GLFW_MOD_CONTROL',['../group__mods.html#ga6ed94871c3208eefd85713fa929d45aa',1,'glfw3.h']]],\n  ['glfw_5fmod_5fnum_5flock_253',['GLFW_MOD_NUM_LOCK',['../group__mods.html#ga64e020b8a42af8376e944baf61feecbe',1,'glfw3.h']]],\n  ['glfw_5fmod_5fshift_254',['GLFW_MOD_SHIFT',['../group__mods.html#ga14994d3196c290aaa347248e51740274',1,'glfw3.h']]],\n  ['glfw_5fmod_5fsuper_255',['GLFW_MOD_SUPER',['../group__mods.html#ga6b64ba10ea0227cf6f42efd0a220aba1',1,'glfw3.h']]],\n  ['glfw_5fmouse_5fbutton_5f1_256',['GLFW_MOUSE_BUTTON_1',['../group__buttons.html#ga181a6e875251fd8671654eff00f9112e',1,'glfw3.h']]],\n  ['glfw_5fmouse_5fbutton_5f2_257',['GLFW_MOUSE_BUTTON_2',['../group__buttons.html#ga604b39b92c88ce9bd332e97fc3f4156c',1,'glfw3.h']]],\n  ['glfw_5fmouse_5fbutton_5f3_258',['GLFW_MOUSE_BUTTON_3',['../group__buttons.html#ga0130d505563d0236a6f85545f19e1721',1,'glfw3.h']]],\n  ['glfw_5fmouse_5fbutton_5f4_259',['GLFW_MOUSE_BUTTON_4',['../group__buttons.html#ga53f4097bb01d5521c7d9513418c91ca9',1,'glfw3.h']]],\n  ['glfw_5fmouse_5fbutton_5f5_260',['GLFW_MOUSE_BUTTON_5',['../group__buttons.html#gaf08c4ddecb051d3d9667db1d5e417c9c',1,'glfw3.h']]],\n  ['glfw_5fmouse_5fbutton_5f6_261',['GLFW_MOUSE_BUTTON_6',['../group__buttons.html#gae8513e06aab8aa393b595f22c6d8257a',1,'glfw3.h']]],\n  ['glfw_5fmouse_5fbutton_5f7_262',['GLFW_MOUSE_BUTTON_7',['../group__buttons.html#ga8b02a1ab55dde45b3a3883d54ffd7dc7',1,'glfw3.h']]],\n  ['glfw_5fmouse_5fbutton_5f8_263',['GLFW_MOUSE_BUTTON_8',['../group__buttons.html#ga35d5c4263e0dc0d0a4731ca6c562f32c',1,'glfw3.h']]],\n  ['glfw_5fmouse_5fbutton_5flast_264',['GLFW_MOUSE_BUTTON_LAST',['../group__buttons.html#gab1fd86a4518a9141ec7bcde2e15a2fdf',1,'glfw3.h']]],\n  ['glfw_5fmouse_5fbutton_5fleft_265',['GLFW_MOUSE_BUTTON_LEFT',['../group__buttons.html#gaf37100431dcd5082d48f95ee8bc8cd56',1,'glfw3.h']]],\n  ['glfw_5fmouse_5fbutton_5fmiddle_266',['GLFW_MOUSE_BUTTON_MIDDLE',['../group__buttons.html#ga34a4d2a701434f763fd93a2ff842b95a',1,'glfw3.h']]],\n  ['glfw_5fmouse_5fbutton_5fright_267',['GLFW_MOUSE_BUTTON_RIGHT',['../group__buttons.html#ga3e2f2cf3c4942df73cc094247d275e74',1,'glfw3.h']]],\n  ['glfw_5fnative_5fcontext_5fapi_268',['GLFW_NATIVE_CONTEXT_API',['../glfw3_8h.html#a0494c9bfd3f584ab41e6dbeeaa0e6a19',1,'glfw3.h']]],\n  ['glfw_5fno_5fapi_269',['GLFW_NO_API',['../glfw3_8h.html#a8f6dcdc968d214ff14779564f1389264',1,'glfw3.h']]],\n  ['glfw_5fno_5fcurrent_5fcontext_270',['GLFW_NO_CURRENT_CONTEXT',['../group__errors.html#gaa8290386e9528ccb9e42a3a4e16fc0d0',1,'glfw3.h']]],\n  ['glfw_5fno_5ferror_271',['GLFW_NO_ERROR',['../group__errors.html#gafa30deee5db4d69c4c93d116ed87dbf4',1,'glfw3.h']]],\n  ['glfw_5fno_5freset_5fnotification_272',['GLFW_NO_RESET_NOTIFICATION',['../glfw3_8h.html#aee84a679230d205005e22487ff678a85',1,'glfw3.h']]],\n  ['glfw_5fno_5frobustness_273',['GLFW_NO_ROBUSTNESS',['../glfw3_8h.html#a8b306cb27f5bb0d6d67c7356a0e0fc34',1,'glfw3.h']]],\n  ['glfw_5fno_5fwindow_5fcontext_274',['GLFW_NO_WINDOW_CONTEXT',['../group__errors.html#gacff24d2757da752ae4c80bf452356487',1,'glfw3.h']]],\n  ['glfw_5fnot_5finitialized_275',['GLFW_NOT_INITIALIZED',['../group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a',1,'glfw3.h']]],\n  ['glfw_5fopengl_5fany_5fprofile_276',['GLFW_OPENGL_ANY_PROFILE',['../glfw3_8h.html#ad6f2335d6f21cc9bab96633b1c111d5f',1,'glfw3.h']]],\n  ['glfw_5fopengl_5fapi_277',['GLFW_OPENGL_API',['../glfw3_8h.html#a01b3f66db266341425e9abee6b257db2',1,'glfw3.h']]],\n  ['glfw_5fopengl_5fcompat_5fprofile_278',['GLFW_OPENGL_COMPAT_PROFILE',['../glfw3_8h.html#ac06b663d79c8fcf04669cc8fcc0b7670',1,'glfw3.h']]],\n  ['glfw_5fopengl_5fcore_5fprofile_279',['GLFW_OPENGL_CORE_PROFILE',['../glfw3_8h.html#af094bb16da76f66ebceb19ee213b3de8',1,'glfw3.h']]],\n  ['glfw_5fopengl_5fdebug_5fcontext_280',['GLFW_OPENGL_DEBUG_CONTEXT',['../group__window.html#ga87ec2df0b915201e950ca42d5d0831e1',1,'glfw3.h']]],\n  ['glfw_5fopengl_5fes_5fapi_281',['GLFW_OPENGL_ES_API',['../glfw3_8h.html#a28d9b3bc6c2a522d815c8e146595051f',1,'glfw3.h']]],\n  ['glfw_5fopengl_5fforward_5fcompat_282',['GLFW_OPENGL_FORWARD_COMPAT',['../group__window.html#ga13d24b12465da8b28985f46c8557925b',1,'glfw3.h']]],\n  ['glfw_5fopengl_5fprofile_283',['GLFW_OPENGL_PROFILE',['../group__window.html#ga44f3a6b4261fbe351e0b950b0f372e12',1,'glfw3.h']]],\n  ['glfw_5fosmesa_5fcontext_5fapi_284',['GLFW_OSMESA_CONTEXT_API',['../glfw3_8h.html#afd34a473af9fa81f317910ea371b19e3',1,'glfw3.h']]],\n  ['glfw_5fout_5fof_5fmemory_285',['GLFW_OUT_OF_MEMORY',['../group__errors.html#ga9023953a2bcb98c2906afd071d21ee7f',1,'glfw3.h']]],\n  ['glfw_5fplatform_5ferror_286',['GLFW_PLATFORM_ERROR',['../group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1',1,'glfw3.h']]],\n  ['glfw_5fpress_287',['GLFW_PRESS',['../group__input.html#ga2485743d0b59df3791c45951c4195265',1,'glfw3.h']]],\n  ['glfw_5fraw_5fmouse_5fmotion_288',['GLFW_RAW_MOUSE_MOTION',['../glfw3_8h.html#aeeda1be76a44a1fc97c1282e06281fbb',1,'glfw3.h']]],\n  ['glfw_5fred_5fbits_289',['GLFW_RED_BITS',['../group__window.html#gaf78ed8e417dbcc1e354906cc2708c982',1,'glfw3.h']]],\n  ['glfw_5frefresh_5frate_290',['GLFW_REFRESH_RATE',['../group__window.html#ga0f20825e6e47ee8ba389024519682212',1,'glfw3.h']]],\n  ['glfw_5frelease_291',['GLFW_RELEASE',['../group__input.html#gada11d965c4da13090ad336e030e4d11f',1,'glfw3.h']]],\n  ['glfw_5frelease_5fbehavior_5fflush_292',['GLFW_RELEASE_BEHAVIOR_FLUSH',['../glfw3_8h.html#a999961d391db49cb4f949c1dece0e13b',1,'glfw3.h']]],\n  ['glfw_5frelease_5fbehavior_5fnone_293',['GLFW_RELEASE_BEHAVIOR_NONE',['../glfw3_8h.html#afca09088eccacdce4b59036cfae349c5',1,'glfw3.h']]],\n  ['glfw_5frepeat_294',['GLFW_REPEAT',['../group__input.html#gac96fd3b9fc66c6f0eebaf6532595338f',1,'glfw3.h']]],\n  ['glfw_5fresizable_295',['GLFW_RESIZABLE',['../group__window.html#gadba13c7a1b3aa40831eb2beedbd5bd1d',1,'glfw3.h']]],\n  ['glfw_5fsamples_296',['GLFW_SAMPLES',['../group__window.html#ga2cdf86fdcb7722fb8829c4e201607535',1,'glfw3.h']]],\n  ['glfw_5fscale_5fto_5fmonitor_297',['GLFW_SCALE_TO_MONITOR',['../group__window.html#ga620bc4280c7eab81ac9f02204500ed47',1,'glfw3.h']]],\n  ['glfw_5fsrgb_5fcapable_298',['GLFW_SRGB_CAPABLE',['../group__window.html#ga444a8f00414a63220591f9fdb7b5642b',1,'glfw3.h']]],\n  ['glfw_5fstencil_5fbits_299',['GLFW_STENCIL_BITS',['../group__window.html#ga5339890a45a1fb38e93cb9fcc5fd069d',1,'glfw3.h']]],\n  ['glfw_5fstereo_300',['GLFW_STEREO',['../group__window.html#ga83d991efca02537e2d69969135b77b03',1,'glfw3.h']]],\n  ['glfw_5fsticky_5fkeys_301',['GLFW_STICKY_KEYS',['../glfw3_8h.html#ae3bbe2315b7691ab088159eb6c9110fc',1,'glfw3.h']]],\n  ['glfw_5fsticky_5fmouse_5fbuttons_302',['GLFW_STICKY_MOUSE_BUTTONS',['../glfw3_8h.html#a4d7ce8ce71030c3b04e2b78145bc59d1',1,'glfw3.h']]],\n  ['glfw_5ftransparent_5fframebuffer_303',['GLFW_TRANSPARENT_FRAMEBUFFER',['../group__window.html#ga60a0578c3b9449027d683a9c6abb9f14',1,'glfw3.h']]],\n  ['glfw_5ftrue_304',['GLFW_TRUE',['../group__init.html#ga2744fbb29b5631bb28802dbe0cf36eba',1,'glfw3.h']]],\n  ['glfw_5fversion_5fmajor_305',['GLFW_VERSION_MAJOR',['../group__init.html#ga6337d9ea43b22fc529b2bba066b4a576',1,'glfw3.h']]],\n  ['glfw_5fversion_5fminor_306',['GLFW_VERSION_MINOR',['../group__init.html#gaf80d40f0aea7088ff337606e9c48f7a3',1,'glfw3.h']]],\n  ['glfw_5fversion_5frevision_307',['GLFW_VERSION_REVISION',['../group__init.html#gab72ae2e2035d9ea461abc3495eac0502',1,'glfw3.h']]],\n  ['glfw_5fversion_5funavailable_308',['GLFW_VERSION_UNAVAILABLE',['../group__errors.html#gad16c5565b4a69f9c2a9ac2c0dbc89462',1,'glfw3.h']]],\n  ['glfw_5fvisible_309',['GLFW_VISIBLE',['../group__window.html#gafb3cdc45297e06d8f1eb13adc69ca6c4',1,'glfw3.h']]],\n  ['glfw_5fvresize_5fcursor_310',['GLFW_VRESIZE_CURSOR',['../group__shapes.html#gaf024f0e1ff8366fb2b5c260509a1fce5',1,'glfw3.h']]],\n  ['glfw_5fx11_5fclass_5fname_311',['GLFW_X11_CLASS_NAME',['../group__window.html#gae5a9ea2fccccd92edbd343fc56461114',1,'glfw3.h']]],\n  ['glfw_5fx11_5finstance_5fname_312',['GLFW_X11_INSTANCE_NAME',['../group__window.html#ga494c3c0d911e4b860b946530a3e389e8',1,'glfw3.h']]],\n  ['glfwcharfun_313',['GLFWcharfun',['../group__input.html#gabf24451c7ceb1952bc02b17a0d5c3e5f',1,'glfw3.h']]],\n  ['glfwcharmodsfun_314',['GLFWcharmodsfun',['../group__input.html#gae36fb6897d2b7df9b128900c8ce9c507',1,'glfw3.h']]],\n  ['glfwcreatecursor_315',['glfwCreateCursor',['../group__input.html#gafca356935e10135016aa49ffa464c355',1,'glfw3.h']]],\n  ['glfwcreatestandardcursor_316',['glfwCreateStandardCursor',['../group__input.html#gaa65f416d03ebbbb5b8db71a489fcb894',1,'glfw3.h']]],\n  ['glfwcreatewindow_317',['glfwCreateWindow',['../group__window.html#ga5c336fddf2cbb5b92f65f10fb6043344',1,'glfw3.h']]],\n  ['glfwcreatewindowsurface_318',['glfwCreateWindowSurface',['../group__vulkan.html#ga1a24536bec3f80b08ead18e28e6ae965',1,'glfw3.h']]],\n  ['glfwcursor_319',['GLFWcursor',['../group__input.html#ga89261ae18c75e863aaf2656ecdd238f4',1,'glfw3.h']]],\n  ['glfwcursorenterfun_320',['GLFWcursorenterfun',['../group__input.html#ga51ab436c41eeaed6db5a0c9403b1c840',1,'glfw3.h']]],\n  ['glfwcursorposfun_321',['GLFWcursorposfun',['../group__input.html#ga4cfad918fa836f09541e7b9acd36686c',1,'glfw3.h']]],\n  ['glfwdefaultwindowhints_322',['glfwDefaultWindowHints',['../group__window.html#gaa77c4898dfb83344a6b4f76aa16b9a4a',1,'glfw3.h']]],\n  ['glfwdestroycursor_323',['glfwDestroyCursor',['../group__input.html#ga81b952cd1764274d0db7fb3c5a79ba6a',1,'glfw3.h']]],\n  ['glfwdestroywindow_324',['glfwDestroyWindow',['../group__window.html#gacdf43e51376051d2c091662e9fe3d7b2',1,'glfw3.h']]],\n  ['glfwdropfun_325',['GLFWdropfun',['../group__input.html#gafd0493dc32cd5ca5810e6148c0c026ea',1,'glfw3.h']]],\n  ['glfwerrorfun_326',['GLFWerrorfun',['../group__init.html#ga6b8a2639706d5c409fc1287e8f55e928',1,'glfw3.h']]],\n  ['glfwextensionsupported_327',['glfwExtensionSupported',['../group__context.html#ga87425065c011cef1ebd6aac75e059dfa',1,'glfw3.h']]],\n  ['glfwfocuswindow_328',['glfwFocusWindow',['../group__window.html#ga873780357abd3f3a081d71a40aae45a1',1,'glfw3.h']]],\n  ['glfwframebuffersizefun_329',['GLFWframebuffersizefun',['../group__window.html#ga3e218ef9ff826129c55a7d5f6971a285',1,'glfw3.h']]],\n  ['glfwgamepadstate_330',['GLFWgamepadstate',['../structGLFWgamepadstate.html',1,'GLFWgamepadstate'],['../group__input.html#ga0b86867abb735af3b959f61c44b1d029',1,'GLFWgamepadstate():&#160;glfw3.h']]],\n  ['glfwgammaramp_331',['GLFWgammaramp',['../structGLFWgammaramp.html',1,'GLFWgammaramp'],['../group__monitor.html#gaec0bd37af673be8813592849f13e02f0',1,'GLFWgammaramp():&#160;glfw3.h']]],\n  ['glfwgetclipboardstring_332',['glfwGetClipboardString',['../group__input.html#ga5aba1d704d9ab539282b1fbe9f18bb94',1,'glfw3.h']]],\n  ['glfwgetcocoamonitor_333',['glfwGetCocoaMonitor',['../group__native.html#gaf22f429aec4b1aab316142d66d9be3e6',1,'glfw3native.h']]],\n  ['glfwgetcocoawindow_334',['glfwGetCocoaWindow',['../group__native.html#gac3ed9d495d0c2bb9652de5a50c648715',1,'glfw3native.h']]],\n  ['glfwgetcurrentcontext_335',['glfwGetCurrentContext',['../group__context.html#gac84759b1f6c2d271a4fea8ae89ec980d',1,'glfw3.h']]],\n  ['glfwgetcursorpos_336',['glfwGetCursorPos',['../group__input.html#ga01d37b6c40133676b9cea60ca1d7c0cc',1,'glfw3.h']]],\n  ['glfwgeteglcontext_337',['glfwGetEGLContext',['../group__native.html#ga671c5072becd085f4ab5771a9c8efcf1',1,'glfw3native.h']]],\n  ['glfwgetegldisplay_338',['glfwGetEGLDisplay',['../group__native.html#ga1cd8d973f47aacb5532d368147cc3138',1,'glfw3native.h']]],\n  ['glfwgeteglsurface_339',['glfwGetEGLSurface',['../group__native.html#ga2199b36117a6a695fec8441d8052eee6',1,'glfw3native.h']]],\n  ['glfwgeterror_340',['glfwGetError',['../group__init.html#ga944986b4ec0b928d488141f92982aa18',1,'glfw3.h']]],\n  ['glfwgetframebuffersize_341',['glfwGetFramebufferSize',['../group__window.html#ga0e2637a4161afb283f5300c7f94785c9',1,'glfw3.h']]],\n  ['glfwgetgamepadname_342',['glfwGetGamepadName',['../group__input.html#ga5c71e3533b2d384db9317fcd7661b210',1,'glfw3.h']]],\n  ['glfwgetgamepadstate_343',['glfwGetGamepadState',['../group__input.html#gadccddea8bce6113fa459de379ddaf051',1,'glfw3.h']]],\n  ['glfwgetgammaramp_344',['glfwGetGammaRamp',['../group__monitor.html#gab7c41deb2219bde3e1eb756ddaa9ec80',1,'glfw3.h']]],\n  ['glfwgetglxcontext_345',['glfwGetGLXContext',['../group__native.html#ga62d884114b0abfcdc2930e89f20867e2',1,'glfw3native.h']]],\n  ['glfwgetglxwindow_346',['glfwGetGLXWindow',['../group__native.html#ga1ed27b8766e859a21381e8f8ce18d049',1,'glfw3native.h']]],\n  ['glfwgetinputmode_347',['glfwGetInputMode',['../group__input.html#gaf5b859dbe19bdf434e42695ea45cc5f4',1,'glfw3.h']]],\n  ['glfwgetinstanceprocaddress_348',['glfwGetInstanceProcAddress',['../group__vulkan.html#gadf228fac94c5fd8f12423ec9af9ff1e9',1,'glfw3.h']]],\n  ['glfwgetjoystickaxes_349',['glfwGetJoystickAxes',['../group__input.html#gaa8806536731e92c061bc70bcff6edbd0',1,'glfw3.h']]],\n  ['glfwgetjoystickbuttons_350',['glfwGetJoystickButtons',['../group__input.html#gadb3cbf44af90a1536f519659a53bddd6',1,'glfw3.h']]],\n  ['glfwgetjoystickguid_351',['glfwGetJoystickGUID',['../group__input.html#gae168c2c0b8cf2a1cb67c6b3c00bdd543',1,'glfw3.h']]],\n  ['glfwgetjoystickhats_352',['glfwGetJoystickHats',['../group__input.html#ga2d8d0634bb81c180899aeb07477a67ea',1,'glfw3.h']]],\n  ['glfwgetjoystickname_353',['glfwGetJoystickName',['../group__input.html#gafbe3e51f670320908cfe4e20d3e5559e',1,'glfw3.h']]],\n  ['glfwgetjoystickuserpointer_354',['glfwGetJoystickUserPointer',['../group__input.html#ga06290acb7ed23895bf26b8e981827ebd',1,'glfw3.h']]],\n  ['glfwgetkey_355',['glfwGetKey',['../group__input.html#gadd341da06bc8d418b4dc3a3518af9ad2',1,'glfw3.h']]],\n  ['glfwgetkeyname_356',['glfwGetKeyName',['../group__input.html#ga237a182e5ec0b21ce64543f3b5e7e2be',1,'glfw3.h']]],\n  ['glfwgetkeyscancode_357',['glfwGetKeyScancode',['../group__input.html#ga67ddd1b7dcbbaff03e4a76c0ea67103a',1,'glfw3.h']]],\n  ['glfwgetmonitorcontentscale_358',['glfwGetMonitorContentScale',['../group__monitor.html#gad3152e84465fa620b601265ebfcdb21b',1,'glfw3.h']]],\n  ['glfwgetmonitorname_359',['glfwGetMonitorName',['../group__monitor.html#ga79a34ee22ff080ca954a9663e4679daf',1,'glfw3.h']]],\n  ['glfwgetmonitorphysicalsize_360',['glfwGetMonitorPhysicalSize',['../group__monitor.html#ga7d8bffc6c55539286a6bd20d32a8d7ea',1,'glfw3.h']]],\n  ['glfwgetmonitorpos_361',['glfwGetMonitorPos',['../group__monitor.html#ga102f54e7acc9149edbcf0997152df8c9',1,'glfw3.h']]],\n  ['glfwgetmonitors_362',['glfwGetMonitors',['../group__monitor.html#ga3fba51c8bd36491d4712aa5bd074a537',1,'glfw3.h']]],\n  ['glfwgetmonitoruserpointer_363',['glfwGetMonitorUserPointer',['../group__monitor.html#gac2d4209016b049222877f620010ed0d8',1,'glfw3.h']]],\n  ['glfwgetmonitorworkarea_364',['glfwGetMonitorWorkarea',['../group__monitor.html#ga7387a3bdb64bfe8ebf2b9e54f5b6c9d0',1,'glfw3.h']]],\n  ['glfwgetmousebutton_365',['glfwGetMouseButton',['../group__input.html#gac1473feacb5996c01a7a5a33b5066704',1,'glfw3.h']]],\n  ['glfwgetnsglcontext_366',['glfwGetNSGLContext',['../group__native.html#ga559e002e3cd63c979881770cd4dc63bc',1,'glfw3native.h']]],\n  ['glfwgetosmesacolorbuffer_367',['glfwGetOSMesaColorBuffer',['../group__native.html#ga3b36e3e3dcf308b776427b6bd73cc132',1,'glfw3native.h']]],\n  ['glfwgetosmesacontext_368',['glfwGetOSMesaContext',['../group__native.html#ga9e47700080094eb569cb053afaa88773',1,'glfw3native.h']]],\n  ['glfwgetosmesadepthbuffer_369',['glfwGetOSMesaDepthBuffer',['../group__native.html#ga6b64039ffc88a7a2f57f0956c0c75d53',1,'glfw3native.h']]],\n  ['glfwgetphysicaldevicepresentationsupport_370',['glfwGetPhysicalDevicePresentationSupport',['../group__vulkan.html#gaff3823355cdd7e2f3f9f4d9ea9518d92',1,'glfw3.h']]],\n  ['glfwgetprimarymonitor_371',['glfwGetPrimaryMonitor',['../group__monitor.html#ga721867d84c6d18d6790d64d2847ca0b1',1,'glfw3.h']]],\n  ['glfwgetprocaddress_372',['glfwGetProcAddress',['../group__context.html#ga35f1837e6f666781842483937612f163',1,'glfw3.h']]],\n  ['glfwgetrequiredinstanceextensions_373',['glfwGetRequiredInstanceExtensions',['../group__vulkan.html#ga1abcbe61033958f22f63ef82008874b1',1,'glfw3.h']]],\n  ['glfwgettime_374',['glfwGetTime',['../group__input.html#gaa6cf4e7a77158a3b8fd00328b1720a4a',1,'glfw3.h']]],\n  ['glfwgettimerfrequency_375',['glfwGetTimerFrequency',['../group__input.html#ga3289ee876572f6e91f06df3a24824443',1,'glfw3.h']]],\n  ['glfwgettimervalue_376',['glfwGetTimerValue',['../group__input.html#ga09b2bd37d328e0b9456c7ec575cc26aa',1,'glfw3.h']]],\n  ['glfwgetversion_377',['glfwGetVersion',['../group__init.html#ga9f8ffaacf3c269cc48eafbf8b9b71197',1,'glfw3.h']]],\n  ['glfwgetversionstring_378',['glfwGetVersionString',['../group__init.html#ga23d47dc013fce2bf58036da66079a657',1,'glfw3.h']]],\n  ['glfwgetvideomode_379',['glfwGetVideoMode',['../group__monitor.html#gafc1bb972a921ad5b3bd5d63a95fc2d52',1,'glfw3.h']]],\n  ['glfwgetvideomodes_380',['glfwGetVideoModes',['../group__monitor.html#ga820b0ce9a5237d645ea7cbb4bd383458',1,'glfw3.h']]],\n  ['glfwgetwaylanddisplay_381',['glfwGetWaylandDisplay',['../group__native.html#gaaf8118a3c877f3a6bc8e7a649519de5e',1,'glfw3native.h']]],\n  ['glfwgetwaylandmonitor_382',['glfwGetWaylandMonitor',['../group__native.html#gab10427a667b6cd91eec7709f7a906bd3',1,'glfw3native.h']]],\n  ['glfwgetwaylandwindow_383',['glfwGetWaylandWindow',['../group__native.html#ga4738d7aca4191363519a9a641c3ab64c',1,'glfw3native.h']]],\n  ['glfwgetwglcontext_384',['glfwGetWGLContext',['../group__native.html#gadc4010d91d9cc1134d040eeb1202a143',1,'glfw3native.h']]],\n  ['glfwgetwin32adapter_385',['glfwGetWin32Adapter',['../group__native.html#gac84f63a3f9db145b9435e5e0dbc4183d',1,'glfw3native.h']]],\n  ['glfwgetwin32monitor_386',['glfwGetWin32Monitor',['../group__native.html#gac408b09a330749402d5d1fa1f5894dd9',1,'glfw3native.h']]],\n  ['glfwgetwin32window_387',['glfwGetWin32Window',['../group__native.html#gafe5079aa79038b0079fc09d5f0a8e667',1,'glfw3native.h']]],\n  ['glfwgetwindowattrib_388',['glfwGetWindowAttrib',['../group__window.html#gacccb29947ea4b16860ebef42c2cb9337',1,'glfw3.h']]],\n  ['glfwgetwindowcontentscale_389',['glfwGetWindowContentScale',['../group__window.html#gaf5d31de9c19c4f994facea64d2b3106c',1,'glfw3.h']]],\n  ['glfwgetwindowframesize_390',['glfwGetWindowFrameSize',['../group__window.html#ga1a9fd382058c53101b21cf211898f1f1',1,'glfw3.h']]],\n  ['glfwgetwindowmonitor_391',['glfwGetWindowMonitor',['../group__window.html#gaeac25e64789974ccbe0811766bd91a16',1,'glfw3.h']]],\n  ['glfwgetwindowopacity_392',['glfwGetWindowOpacity',['../group__window.html#gad09f0bd7a6307c4533b7061828480a84',1,'glfw3.h']]],\n  ['glfwgetwindowpos_393',['glfwGetWindowPos',['../group__window.html#ga73cb526c000876fd8ddf571570fdb634',1,'glfw3.h']]],\n  ['glfwgetwindowsize_394',['glfwGetWindowSize',['../group__window.html#gaeea7cbc03373a41fb51cfbf9f2a5d4c6',1,'glfw3.h']]],\n  ['glfwgetwindowuserpointer_395',['glfwGetWindowUserPointer',['../group__window.html#ga17807ce0f45ac3f8bb50d6dcc59a4e06',1,'glfw3.h']]],\n  ['glfwgetx11adapter_396',['glfwGetX11Adapter',['../group__native.html#ga088fbfa80f50569402b41be71ad66e40',1,'glfw3native.h']]],\n  ['glfwgetx11display_397',['glfwGetX11Display',['../group__native.html#ga8519b66594ea3ef6eeafaa2e3ee37406',1,'glfw3native.h']]],\n  ['glfwgetx11monitor_398',['glfwGetX11Monitor',['../group__native.html#gab2f8cc043905e9fa9b12bfdbbcfe874c',1,'glfw3native.h']]],\n  ['glfwgetx11selectionstring_399',['glfwGetX11SelectionString',['../group__native.html#ga72f23e3980b83788c70aa854eca31430',1,'glfw3native.h']]],\n  ['glfwgetx11window_400',['glfwGetX11Window',['../group__native.html#ga90ca676322740842db446999a1b1f21d',1,'glfw3native.h']]],\n  ['glfwglproc_401',['GLFWglproc',['../group__context.html#ga3d47c2d2fbe0be9c505d0e04e91a133c',1,'glfw3.h']]],\n  ['glfwhidewindow_402',['glfwHideWindow',['../group__window.html#ga49401f82a1ba5f15db5590728314d47c',1,'glfw3.h']]],\n  ['glfwiconifywindow_403',['glfwIconifyWindow',['../group__window.html#ga1bb559c0ebaad63c5c05ad2a066779c4',1,'glfw3.h']]],\n  ['glfwimage_404',['GLFWimage',['../structGLFWimage.html',1,'GLFWimage'],['../group__window.html#gac81c32f4437de7b3aa58ab62c3d9e5b1',1,'GLFWimage():&#160;glfw3.h']]],\n  ['glfwinit_405',['glfwInit',['../group__init.html#ga317aac130a235ab08c6db0834907d85e',1,'glfw3.h']]],\n  ['glfwinithint_406',['glfwInitHint',['../group__init.html#ga110fd1d3f0412822b4f1908c026f724a',1,'glfw3.h']]],\n  ['glfwjoystickfun_407',['GLFWjoystickfun',['../group__input.html#gaa67aa597e974298c748bfe4fb17d406d',1,'glfw3.h']]],\n  ['glfwjoystickisgamepad_408',['glfwJoystickIsGamepad',['../group__input.html#gad0f676860f329d80f7e47e9f06a96f00',1,'glfw3.h']]],\n  ['glfwjoystickpresent_409',['glfwJoystickPresent',['../group__input.html#gaed0966cee139d815317f9ffcba64c9f1',1,'glfw3.h']]],\n  ['glfwkeyfun_410',['GLFWkeyfun',['../group__input.html#ga0192a232a41e4e82948217c8ba94fdfd',1,'glfw3.h']]],\n  ['glfwmakecontextcurrent_411',['glfwMakeContextCurrent',['../group__context.html#ga1c04dc242268f827290fe40aa1c91157',1,'glfw3.h']]],\n  ['glfwmaximizewindow_412',['glfwMaximizeWindow',['../group__window.html#ga3f541387449d911274324ae7f17ec56b',1,'glfw3.h']]],\n  ['glfwmonitor_413',['GLFWmonitor',['../group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3',1,'glfw3.h']]],\n  ['glfwmonitorfun_414',['GLFWmonitorfun',['../group__monitor.html#ga8a7ee579a66720f24d656526f3e44c63',1,'glfw3.h']]],\n  ['glfwmousebuttonfun_415',['GLFWmousebuttonfun',['../group__input.html#ga39893a4a7e7c3239c98d29c9e084350c',1,'glfw3.h']]],\n  ['glfwpollevents_416',['glfwPollEvents',['../group__window.html#ga37bd57223967b4211d60ca1a0bf3c832',1,'glfw3.h']]],\n  ['glfwpostemptyevent_417',['glfwPostEmptyEvent',['../group__window.html#gab5997a25187e9fd5c6f2ecbbc8dfd7e9',1,'glfw3.h']]],\n  ['glfwrawmousemotionsupported_418',['glfwRawMouseMotionSupported',['../group__input.html#gae4ee0dbd0d256183e1ea4026d897e1c2',1,'glfw3.h']]],\n  ['glfwrequestwindowattention_419',['glfwRequestWindowAttention',['../group__window.html#ga2f8d59323fc4692c1d54ba08c863a703',1,'glfw3.h']]],\n  ['glfwrestorewindow_420',['glfwRestoreWindow',['../group__window.html#ga52527a5904b47d802b6b4bb519cdebc7',1,'glfw3.h']]],\n  ['glfwscrollfun_421',['GLFWscrollfun',['../group__input.html#ga4687e2199c60a18a8dd1da532e6d75c9',1,'glfw3.h']]],\n  ['glfwsetcharcallback_422',['glfwSetCharCallback',['../group__input.html#gab25c4a220fd8f5717718dbc487828996',1,'glfw3.h']]],\n  ['glfwsetcharmodscallback_423',['glfwSetCharModsCallback',['../group__input.html#ga0b7f4ad13c2b17435ff13b6dcfb4e43c',1,'glfw3.h']]],\n  ['glfwsetclipboardstring_424',['glfwSetClipboardString',['../group__input.html#gaba1f022c5eb07dfac421df34cdcd31dd',1,'glfw3.h']]],\n  ['glfwsetcursor_425',['glfwSetCursor',['../group__input.html#gad3b4f38c8d5dae036bc8fa959e18343e',1,'glfw3.h']]],\n  ['glfwsetcursorentercallback_426',['glfwSetCursorEnterCallback',['../group__input.html#gad27f8ad0142c038a281466c0966817d8',1,'glfw3.h']]],\n  ['glfwsetcursorpos_427',['glfwSetCursorPos',['../group__input.html#ga04b03af936d906ca123c8f4ee08b39e7',1,'glfw3.h']]],\n  ['glfwsetcursorposcallback_428',['glfwSetCursorPosCallback',['../group__input.html#gac1f879ab7435d54d4d79bb469fe225d7',1,'glfw3.h']]],\n  ['glfwsetdropcallback_429',['glfwSetDropCallback',['../group__input.html#gab773f0ee0a07cff77a210cea40bc1f6b',1,'glfw3.h']]],\n  ['glfwseterrorcallback_430',['glfwSetErrorCallback',['../group__init.html#gaff45816610d53f0b83656092a4034f40',1,'glfw3.h']]],\n  ['glfwsetframebuffersizecallback_431',['glfwSetFramebufferSizeCallback',['../group__window.html#gab3fb7c3366577daef18c0023e2a8591f',1,'glfw3.h']]],\n  ['glfwsetgamma_432',['glfwSetGamma',['../group__monitor.html#ga6ac582625c990220785ddd34efa3169a',1,'glfw3.h']]],\n  ['glfwsetgammaramp_433',['glfwSetGammaRamp',['../group__monitor.html#ga583f0ffd0d29613d8cd172b996bbf0dd',1,'glfw3.h']]],\n  ['glfwsetinputmode_434',['glfwSetInputMode',['../group__input.html#gaa92336e173da9c8834558b54ee80563b',1,'glfw3.h']]],\n  ['glfwsetjoystickcallback_435',['glfwSetJoystickCallback',['../group__input.html#ga2f60a0e5b7bd8d1b7344dc0a7cb32b4c',1,'glfw3.h']]],\n  ['glfwsetjoystickuserpointer_436',['glfwSetJoystickUserPointer',['../group__input.html#ga6b2f72d64d636b48a727b437cbb7489e',1,'glfw3.h']]],\n  ['glfwsetkeycallback_437',['glfwSetKeyCallback',['../group__input.html#ga1caf18159767e761185e49a3be019f8d',1,'glfw3.h']]],\n  ['glfwsetmonitorcallback_438',['glfwSetMonitorCallback',['../group__monitor.html#gab39df645587c8518192aa746c2fb06c3',1,'glfw3.h']]],\n  ['glfwsetmonitoruserpointer_439',['glfwSetMonitorUserPointer',['../group__monitor.html#ga702750e24313a686d3637297b6e85fda',1,'glfw3.h']]],\n  ['glfwsetmousebuttoncallback_440',['glfwSetMouseButtonCallback',['../group__input.html#ga6ab84420974d812bee700e45284a723c',1,'glfw3.h']]],\n  ['glfwsetscrollcallback_441',['glfwSetScrollCallback',['../group__input.html#ga571e45a030ae4061f746ed56cb76aede',1,'glfw3.h']]],\n  ['glfwsettime_442',['glfwSetTime',['../group__input.html#gaf59589ef6e8b8c8b5ad184b25afd4dc0',1,'glfw3.h']]],\n  ['glfwsetwindowaspectratio_443',['glfwSetWindowAspectRatio',['../group__window.html#ga72ac8cb1ee2e312a878b55153d81b937',1,'glfw3.h']]],\n  ['glfwsetwindowattrib_444',['glfwSetWindowAttrib',['../group__window.html#gace2afda29b4116ec012e410a6819033e',1,'glfw3.h']]],\n  ['glfwsetwindowclosecallback_445',['glfwSetWindowCloseCallback',['../group__window.html#gada646d775a7776a95ac000cfc1885331',1,'glfw3.h']]],\n  ['glfwsetwindowcontentscalecallback_446',['glfwSetWindowContentScaleCallback',['../group__window.html#gaf2832ebb5aa6c252a2d261de002c92d6',1,'glfw3.h']]],\n  ['glfwsetwindowfocuscallback_447',['glfwSetWindowFocusCallback',['../group__window.html#gac2d83c4a10f071baf841f6730528e66c',1,'glfw3.h']]],\n  ['glfwsetwindowicon_448',['glfwSetWindowIcon',['../group__window.html#gadd7ccd39fe7a7d1f0904666ae5932dc5',1,'glfw3.h']]],\n  ['glfwsetwindowiconifycallback_449',['glfwSetWindowIconifyCallback',['../group__window.html#gac793e9efd255567b5fb8b445052cfd3e',1,'glfw3.h']]],\n  ['glfwsetwindowmaximizecallback_450',['glfwSetWindowMaximizeCallback',['../group__window.html#gacbe64c339fbd94885e62145563b6dc93',1,'glfw3.h']]],\n  ['glfwsetwindowmonitor_451',['glfwSetWindowMonitor',['../group__window.html#ga81c76c418af80a1cce7055bccb0ae0a7',1,'glfw3.h']]],\n  ['glfwsetwindowopacity_452',['glfwSetWindowOpacity',['../group__window.html#gac31caeb3d1088831b13d2c8a156802e9',1,'glfw3.h']]],\n  ['glfwsetwindowpos_453',['glfwSetWindowPos',['../group__window.html#ga1abb6d690e8c88e0c8cd1751356dbca8',1,'glfw3.h']]],\n  ['glfwsetwindowposcallback_454',['glfwSetWindowPosCallback',['../group__window.html#ga08bdfbba88934f9c4f92fd757979ac74',1,'glfw3.h']]],\n  ['glfwsetwindowrefreshcallback_455',['glfwSetWindowRefreshCallback',['../group__window.html#ga1c5c7eb889c33c7f4d10dd35b327654e',1,'glfw3.h']]],\n  ['glfwsetwindowshouldclose_456',['glfwSetWindowShouldClose',['../group__window.html#ga49c449dde2a6f87d996f4daaa09d6708',1,'glfw3.h']]],\n  ['glfwsetwindowsize_457',['glfwSetWindowSize',['../group__window.html#ga371911f12c74c504dd8d47d832d095cb',1,'glfw3.h']]],\n  ['glfwsetwindowsizecallback_458',['glfwSetWindowSizeCallback',['../group__window.html#gad91b8b047a0c4c6033c38853864c34f8',1,'glfw3.h']]],\n  ['glfwsetwindowsizelimits_459',['glfwSetWindowSizeLimits',['../group__window.html#gac314fa6cec7d2d307be9963e2709cc90',1,'glfw3.h']]],\n  ['glfwsetwindowtitle_460',['glfwSetWindowTitle',['../group__window.html#ga5d877f09e968cef7a360b513306f17ff',1,'glfw3.h']]],\n  ['glfwsetwindowuserpointer_461',['glfwSetWindowUserPointer',['../group__window.html#ga3d2fc6026e690ab31a13f78bc9fd3651',1,'glfw3.h']]],\n  ['glfwsetx11selectionstring_462',['glfwSetX11SelectionString',['../group__native.html#ga55f879ab02d93367f966186b6f0133f7',1,'glfw3native.h']]],\n  ['glfwshowwindow_463',['glfwShowWindow',['../group__window.html#ga61be47917b72536a148300f46494fc66',1,'glfw3.h']]],\n  ['glfwswapbuffers_464',['glfwSwapBuffers',['../group__window.html#ga15a5a1ee5b3c2ca6b15ca209a12efd14',1,'glfw3.h']]],\n  ['glfwswapinterval_465',['glfwSwapInterval',['../group__context.html#ga6d4e0cdf151b5e579bd67f13202994ed',1,'glfw3.h']]],\n  ['glfwterminate_466',['glfwTerminate',['../group__init.html#gaaae48c0a18607ea4a4ba951d939f0901',1,'glfw3.h']]],\n  ['glfwupdategamepadmappings_467',['glfwUpdateGamepadMappings',['../group__input.html#gaed5104612f2fa8e66aa6e846652ad00f',1,'glfw3.h']]],\n  ['glfwvidmode_468',['GLFWvidmode',['../structGLFWvidmode.html',1,'GLFWvidmode'],['../group__monitor.html#gae48aadf4ea0967e6605c8f58fa5daccb',1,'GLFWvidmode():&#160;glfw3.h']]],\n  ['glfwvkproc_469',['GLFWvkproc',['../group__vulkan.html#ga70c01918dc9d233a4fbe0681a43018af',1,'glfw3.h']]],\n  ['glfwvulkansupported_470',['glfwVulkanSupported',['../group__vulkan.html#ga2e7f30931e02464b5bc8d0d4b6f9fe2b',1,'glfw3.h']]],\n  ['glfwwaitevents_471',['glfwWaitEvents',['../group__window.html#ga554e37d781f0a997656c26b2c56c835e',1,'glfw3.h']]],\n  ['glfwwaiteventstimeout_472',['glfwWaitEventsTimeout',['../group__window.html#ga605a178db92f1a7f1a925563ef3ea2cf',1,'glfw3.h']]],\n  ['glfwwindow_473',['GLFWwindow',['../group__window.html#ga3c96d80d363e67d13a41b5d1821f3242',1,'glfw3.h']]],\n  ['glfwwindowclosefun_474',['GLFWwindowclosefun',['../group__window.html#ga93e7c2555bd837f4ed8b20f76cada72e',1,'glfw3.h']]],\n  ['glfwwindowcontentscalefun_475',['GLFWwindowcontentscalefun',['../group__window.html#ga1da46b65eafcc1a7ff0adb8f4a7b72fd',1,'glfw3.h']]],\n  ['glfwwindowfocusfun_476',['GLFWwindowfocusfun',['../group__window.html#ga58be2061828dd35080bb438405d3a7e2',1,'glfw3.h']]],\n  ['glfwwindowhint_477',['glfwWindowHint',['../group__window.html#ga7d9c8c62384b1e2821c4dc48952d2033',1,'glfw3.h']]],\n  ['glfwwindowhintstring_478',['glfwWindowHintString',['../group__window.html#ga8cb2782861c9d997bcf2dea97f363e5f',1,'glfw3.h']]],\n  ['glfwwindowiconifyfun_479',['GLFWwindowiconifyfun',['../group__window.html#gad2d4e4c3d28b1242e742e8268b9528af',1,'glfw3.h']]],\n  ['glfwwindowmaximizefun_480',['GLFWwindowmaximizefun',['../group__window.html#ga7269a3d1cb100c0081f95fc09afa4949',1,'glfw3.h']]],\n  ['glfwwindowposfun_481',['GLFWwindowposfun',['../group__window.html#gafd8db81fdb0e850549dc6bace5ed697a',1,'glfw3.h']]],\n  ['glfwwindowrefreshfun_482',['GLFWwindowrefreshfun',['../group__window.html#ga7a56f9e0227e2cd9470d80d919032e08',1,'glfw3.h']]],\n  ['glfwwindowshouldclose_483',['glfwWindowShouldClose',['../group__window.html#ga24e02fbfefbb81fc45320989f8140ab5',1,'glfw3.h']]],\n  ['glfwwindowsizefun_484',['GLFWwindowsizefun',['../group__window.html#gae49ee6ebc03fa2da024b89943a331355',1,'glfw3.h']]],\n  ['green_485',['green',['../structGLFWgammaramp.html#affccc6f5df47820b6562d709da3a5a3a',1,'GLFWgammaramp']]],\n  ['greenbits_486',['greenBits',['../structGLFWvidmode.html#a292fdd281f3485fb3ff102a5bda43faa',1,'GLFWvidmode']]],\n  ['getting_20started_487',['Getting started',['../quick_guide.html',1,'']]]\n];\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/all_6.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html><head><title></title>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<link rel=\"stylesheet\" type=\"text/css\" href=\"search.css\"/>\n<script type=\"text/javascript\" src=\"all_6.js\"></script>\n<script type=\"text/javascript\" src=\"search.js\"></script>\n</head>\n<body class=\"SRPage\">\n<div id=\"SRIndex\">\n<div class=\"SRStatus\" id=\"Loading\">Loading...</div>\n<div id=\"SRResults\"></div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ncreateResults();\n/* @license-end */\n--></script>\n<div class=\"SRStatus\" id=\"Searching\">Searching...</div>\n<div class=\"SRStatus\" id=\"NoMatches\">No Matches</div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ndocument.getElementById(\"Loading\").style.display=\"none\";\ndocument.getElementById(\"NoMatches\").style.display=\"none\";\nvar searchResults = new SearchResults(\"searchResults\");\nsearchResults.Search();\n/* @license-end */\n--></script>\n</div>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/all_6.js",
    "content": "var searchData=\n[\n  ['height_488',['height',['../structGLFWvidmode.html#ac65942a5f6981695517437a9d571d03c',1,'GLFWvidmode::height()'],['../structGLFWimage.html#a0b7d95368f0c80d5e5c9875057c7dbec',1,'GLFWimage::height()']]]\n];\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/all_7.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html><head><title></title>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<link rel=\"stylesheet\" type=\"text/css\" href=\"search.css\"/>\n<script type=\"text/javascript\" src=\"all_7.js\"></script>\n<script type=\"text/javascript\" src=\"search.js\"></script>\n</head>\n<body class=\"SRPage\">\n<div id=\"SRIndex\">\n<div class=\"SRStatus\" id=\"Loading\">Loading...</div>\n<div id=\"SRResults\"></div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ncreateResults();\n/* @license-end */\n--></script>\n<div class=\"SRStatus\" id=\"Searching\">Searching...</div>\n<div class=\"SRStatus\" id=\"NoMatches\">No Matches</div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ndocument.getElementById(\"Loading\").style.display=\"none\";\ndocument.getElementById(\"NoMatches\").style.display=\"none\";\nvar searchResults = new SearchResults(\"searchResults\");\nsearchResults.Search();\n/* @license-end */\n--></script>\n</div>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/all_7.js",
    "content": "var searchData=\n[\n  ['initialization_2c_20version_20and_20error_20reference_489',['Initialization, version and error reference',['../group__init.html',1,'']]],\n  ['input_20reference_490',['Input reference',['../group__input.html',1,'']]],\n  ['input_2edox_491',['input.dox',['../input_8dox.html',1,'']]],\n  ['input_20guide_492',['Input guide',['../input_guide.html',1,'']]],\n  ['internal_2edox_493',['internal.dox',['../internal_8dox.html',1,'']]],\n  ['internal_20structure_494',['Internal structure',['../internals_guide.html',1,'']]],\n  ['intro_2edox_495',['intro.dox',['../intro_8dox.html',1,'']]],\n  ['introduction_20to_20the_20api_496',['Introduction to the API',['../intro_guide.html',1,'']]]\n];\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/all_8.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html><head><title></title>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<link rel=\"stylesheet\" type=\"text/css\" href=\"search.css\"/>\n<script type=\"text/javascript\" src=\"all_8.js\"></script>\n<script type=\"text/javascript\" src=\"search.js\"></script>\n</head>\n<body class=\"SRPage\">\n<div id=\"SRIndex\">\n<div class=\"SRStatus\" id=\"Loading\">Loading...</div>\n<div id=\"SRResults\"></div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ncreateResults();\n/* @license-end */\n--></script>\n<div class=\"SRStatus\" id=\"Searching\">Searching...</div>\n<div class=\"SRStatus\" id=\"NoMatches\">No Matches</div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ndocument.getElementById(\"Loading\").style.display=\"none\";\ndocument.getElementById(\"NoMatches\").style.display=\"none\";\nvar searchResults = new SearchResults(\"searchResults\");\nsearchResults.Search();\n/* @license-end */\n--></script>\n</div>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/all_8.js",
    "content": "var searchData=\n[\n  ['joystick_20hat_20states_497',['Joystick hat states',['../group__hat__state.html',1,'']]],\n  ['joysticks_498',['Joysticks',['../group__joysticks.html',1,'']]]\n];\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/all_9.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html><head><title></title>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<link rel=\"stylesheet\" type=\"text/css\" href=\"search.css\"/>\n<script type=\"text/javascript\" src=\"all_9.js\"></script>\n<script type=\"text/javascript\" src=\"search.js\"></script>\n</head>\n<body class=\"SRPage\">\n<div id=\"SRIndex\">\n<div class=\"SRStatus\" id=\"Loading\">Loading...</div>\n<div id=\"SRResults\"></div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ncreateResults();\n/* @license-end */\n--></script>\n<div class=\"SRStatus\" id=\"Searching\">Searching...</div>\n<div class=\"SRStatus\" id=\"NoMatches\">No Matches</div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ndocument.getElementById(\"Loading\").style.display=\"none\";\ndocument.getElementById(\"NoMatches\").style.display=\"none\";\nvar searchResults = new SearchResults(\"searchResults\");\nsearchResults.Search();\n/* @license-end */\n--></script>\n</div>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/all_9.js",
    "content": "var searchData=\n[\n  ['keyboard_20keys_499',['Keyboard keys',['../group__keys.html',1,'']]]\n];\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/all_a.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html><head><title></title>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<link rel=\"stylesheet\" type=\"text/css\" href=\"search.css\"/>\n<script type=\"text/javascript\" src=\"all_a.js\"></script>\n<script type=\"text/javascript\" src=\"search.js\"></script>\n</head>\n<body class=\"SRPage\">\n<div id=\"SRIndex\">\n<div class=\"SRStatus\" id=\"Loading\">Loading...</div>\n<div id=\"SRResults\"></div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ncreateResults();\n/* @license-end */\n--></script>\n<div class=\"SRStatus\" id=\"Searching\">Searching...</div>\n<div class=\"SRStatus\" id=\"NoMatches\">No Matches</div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ndocument.getElementById(\"Loading\").style.display=\"none\";\ndocument.getElementById(\"NoMatches\").style.display=\"none\";\nvar searchResults = new SearchResults(\"searchResults\");\nsearchResults.Search();\n/* @license-end */\n--></script>\n</div>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/all_a.js",
    "content": "var searchData=\n[\n  ['mouse_20buttons_500',['Mouse buttons',['../group__buttons.html',1,'']]],\n  ['main_2edox_501',['main.dox',['../main_8dox.html',1,'']]],\n  ['modifier_20key_20flags_502',['Modifier key flags',['../group__mods.html',1,'']]],\n  ['monitor_20reference_503',['Monitor reference',['../group__monitor.html',1,'']]],\n  ['monitor_2edox_504',['monitor.dox',['../monitor_8dox.html',1,'']]],\n  ['monitor_20guide_505',['Monitor guide',['../monitor_guide.html',1,'']]],\n  ['moving_2edox_506',['moving.dox',['../moving_8dox.html',1,'']]],\n  ['moving_20from_20glfw_202_20to_203_507',['Moving from GLFW 2 to 3',['../moving_guide.html',1,'']]]\n];\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/all_b.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html><head><title></title>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<link rel=\"stylesheet\" type=\"text/css\" href=\"search.css\"/>\n<script type=\"text/javascript\" src=\"all_b.js\"></script>\n<script type=\"text/javascript\" src=\"search.js\"></script>\n</head>\n<body class=\"SRPage\">\n<div id=\"SRIndex\">\n<div class=\"SRStatus\" id=\"Loading\">Loading...</div>\n<div id=\"SRResults\"></div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ncreateResults();\n/* @license-end */\n--></script>\n<div class=\"SRStatus\" id=\"Searching\">Searching...</div>\n<div class=\"SRStatus\" id=\"NoMatches\">No Matches</div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ndocument.getElementById(\"Loading\").style.display=\"none\";\ndocument.getElementById(\"NoMatches\").style.display=\"none\";\nvar searchResults = new SearchResults(\"searchResults\");\nsearchResults.Search();\n/* @license-end */\n--></script>\n</div>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/all_b.js",
    "content": "var searchData=\n[\n  ['notitle_508',['notitle',['../index.html',1,'']]],\n  ['native_20access_509',['Native access',['../group__native.html',1,'']]],\n  ['news_2edox_510',['news.dox',['../news_8dox.html',1,'']]]\n];\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/all_c.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html><head><title></title>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<link rel=\"stylesheet\" type=\"text/css\" href=\"search.css\"/>\n<script type=\"text/javascript\" src=\"all_c.js\"></script>\n<script type=\"text/javascript\" src=\"search.js\"></script>\n</head>\n<body class=\"SRPage\">\n<div id=\"SRIndex\">\n<div class=\"SRStatus\" id=\"Loading\">Loading...</div>\n<div id=\"SRResults\"></div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ncreateResults();\n/* @license-end */\n--></script>\n<div class=\"SRStatus\" id=\"Searching\">Searching...</div>\n<div class=\"SRStatus\" id=\"NoMatches\">No Matches</div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ndocument.getElementById(\"Loading\").style.display=\"none\";\ndocument.getElementById(\"NoMatches\").style.display=\"none\";\nvar searchResults = new SearchResults(\"searchResults\");\nsearchResults.Search();\n/* @license-end */\n--></script>\n</div>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/all_c.js",
    "content": "var searchData=\n[\n  ['pixels_511',['pixels',['../structGLFWimage.html#a0c532a5c2bb715555279b7817daba0fb',1,'GLFWimage']]]\n];\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/all_d.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html><head><title></title>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<link rel=\"stylesheet\" type=\"text/css\" href=\"search.css\"/>\n<script type=\"text/javascript\" src=\"all_d.js\"></script>\n<script type=\"text/javascript\" src=\"search.js\"></script>\n</head>\n<body class=\"SRPage\">\n<div id=\"SRIndex\">\n<div class=\"SRStatus\" id=\"Loading\">Loading...</div>\n<div id=\"SRResults\"></div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ncreateResults();\n/* @license-end */\n--></script>\n<div class=\"SRStatus\" id=\"Searching\">Searching...</div>\n<div class=\"SRStatus\" id=\"NoMatches\">No Matches</div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ndocument.getElementById(\"Loading\").style.display=\"none\";\ndocument.getElementById(\"NoMatches\").style.display=\"none\";\nvar searchResults = new SearchResults(\"searchResults\");\nsearchResults.Search();\n/* @license-end */\n--></script>\n</div>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/all_d.js",
    "content": "var searchData=\n[\n  ['quick_2edox_512',['quick.dox',['../quick_8dox.html',1,'']]]\n];\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/all_e.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html><head><title></title>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<link rel=\"stylesheet\" type=\"text/css\" href=\"search.css\"/>\n<script type=\"text/javascript\" src=\"all_e.js\"></script>\n<script type=\"text/javascript\" src=\"search.js\"></script>\n</head>\n<body class=\"SRPage\">\n<div id=\"SRIndex\">\n<div class=\"SRStatus\" id=\"Loading\">Loading...</div>\n<div id=\"SRResults\"></div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ncreateResults();\n/* @license-end */\n--></script>\n<div class=\"SRStatus\" id=\"Searching\">Searching...</div>\n<div class=\"SRStatus\" id=\"NoMatches\">No Matches</div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ndocument.getElementById(\"Loading\").style.display=\"none\";\ndocument.getElementById(\"NoMatches\").style.display=\"none\";\nvar searchResults = new SearchResults(\"searchResults\");\nsearchResults.Search();\n/* @license-end */\n--></script>\n</div>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/all_e.js",
    "content": "var searchData=\n[\n  ['release_20notes_513',['Release notes',['../news.html',1,'']]],\n  ['red_514',['red',['../structGLFWgammaramp.html#a2cce5d968734b685623eef913e635138',1,'GLFWgammaramp']]],\n  ['redbits_515',['redBits',['../structGLFWvidmode.html#a6066c4ecd251098700062d3b735dba1b',1,'GLFWvidmode']]],\n  ['refreshrate_516',['refreshRate',['../structGLFWvidmode.html#a791bdd6c7697b09f7e9c97054bf05649',1,'GLFWvidmode']]]\n];\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/all_f.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html><head><title></title>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<link rel=\"stylesheet\" type=\"text/css\" href=\"search.css\"/>\n<script type=\"text/javascript\" src=\"all_f.js\"></script>\n<script type=\"text/javascript\" src=\"search.js\"></script>\n</head>\n<body class=\"SRPage\">\n<div id=\"SRIndex\">\n<div class=\"SRStatus\" id=\"Loading\">Loading...</div>\n<div id=\"SRResults\"></div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ncreateResults();\n/* @license-end */\n--></script>\n<div class=\"SRStatus\" id=\"Searching\">Searching...</div>\n<div class=\"SRStatus\" id=\"NoMatches\">No Matches</div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ndocument.getElementById(\"Loading\").style.display=\"none\";\ndocument.getElementById(\"NoMatches\").style.display=\"none\";\nvar searchResults = new SearchResults(\"searchResults\");\nsearchResults.Search();\n/* @license-end */\n--></script>\n</div>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/all_f.js",
    "content": "var searchData=\n[\n  ['standards_20conformance_517',['Standards conformance',['../compat_guide.html',1,'']]],\n  ['standard_20cursor_20shapes_518',['Standard cursor shapes',['../group__shapes.html',1,'']]],\n  ['size_519',['size',['../structGLFWgammaramp.html#ad620e1cffbff9a32c51bca46301b59a5',1,'GLFWgammaramp']]]\n];\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/classes_0.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html><head><title></title>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<link rel=\"stylesheet\" type=\"text/css\" href=\"search.css\"/>\n<script type=\"text/javascript\" src=\"classes_0.js\"></script>\n<script type=\"text/javascript\" src=\"search.js\"></script>\n</head>\n<body class=\"SRPage\">\n<div id=\"SRIndex\">\n<div class=\"SRStatus\" id=\"Loading\">Loading...</div>\n<div id=\"SRResults\"></div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ncreateResults();\n/* @license-end */\n--></script>\n<div class=\"SRStatus\" id=\"Searching\">Searching...</div>\n<div class=\"SRStatus\" id=\"NoMatches\">No Matches</div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ndocument.getElementById(\"Loading\").style.display=\"none\";\ndocument.getElementById(\"NoMatches\").style.display=\"none\";\nvar searchResults = new SearchResults(\"searchResults\");\nsearchResults.Search();\n/* @license-end */\n--></script>\n</div>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/classes_0.js",
    "content": "var searchData=\n[\n  ['glfwgamepadstate_527',['GLFWgamepadstate',['../structGLFWgamepadstate.html',1,'']]],\n  ['glfwgammaramp_528',['GLFWgammaramp',['../structGLFWgammaramp.html',1,'']]],\n  ['glfwimage_529',['GLFWimage',['../structGLFWimage.html',1,'']]],\n  ['glfwvidmode_530',['GLFWvidmode',['../structGLFWvidmode.html',1,'']]]\n];\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/defines_0.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html><head><title></title>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<link rel=\"stylesheet\" type=\"text/css\" href=\"search.css\"/>\n<script type=\"text/javascript\" src=\"defines_0.js\"></script>\n<script type=\"text/javascript\" src=\"search.js\"></script>\n</head>\n<body class=\"SRPage\">\n<div id=\"SRIndex\">\n<div class=\"SRStatus\" id=\"Loading\">Loading...</div>\n<div id=\"SRResults\"></div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ncreateResults();\n/* @license-end */\n--></script>\n<div class=\"SRStatus\" id=\"Searching\">Searching...</div>\n<div class=\"SRStatus\" id=\"NoMatches\">No Matches</div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ndocument.getElementById(\"Loading\").style.display=\"none\";\ndocument.getElementById(\"NoMatches\").style.display=\"none\";\nvar searchResults = new SearchResults(\"searchResults\");\nsearchResults.Search();\n/* @license-end */\n--></script>\n</div>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/defines_0.js",
    "content": "var searchData=\n[\n  ['glapientry_732',['GLAPIENTRY',['../glfw3_8h.html#aa97755eb47e4bf2727ad45d610e18206',1,'glfw3.h']]],\n  ['glfw_5fany_5frelease_5fbehavior_733',['GLFW_ANY_RELEASE_BEHAVIOR',['../glfw3_8h.html#a6b47d806f285efe9bfd7aeec667297ee',1,'glfw3.h']]],\n  ['glfw_5fapientry_5fdefined_734',['GLFW_APIENTRY_DEFINED',['../glfw3_8h.html#a8a8538c5500308b4211844f2fb26c7b9',1,'glfw3.h']]],\n  ['glfw_5fconnected_735',['GLFW_CONNECTED',['../glfw3_8h.html#abe11513fd1ffbee5bb9b173f06028b9e',1,'glfw3.h']]],\n  ['glfw_5fcursor_736',['GLFW_CURSOR',['../glfw3_8h.html#aade31da5b884a84a7625c6b059b9132c',1,'glfw3.h']]],\n  ['glfw_5fcursor_5fdisabled_737',['GLFW_CURSOR_DISABLED',['../glfw3_8h.html#a2315b99a329ce53e6a13a9d46fd5ca88',1,'glfw3.h']]],\n  ['glfw_5fcursor_5fhidden_738',['GLFW_CURSOR_HIDDEN',['../glfw3_8h.html#ac4d5cb9d78de8573349c58763d53bf11',1,'glfw3.h']]],\n  ['glfw_5fcursor_5fnormal_739',['GLFW_CURSOR_NORMAL',['../glfw3_8h.html#ae04dd25c8577e19fa8c97368561f6c68',1,'glfw3.h']]],\n  ['glfw_5fdisconnected_740',['GLFW_DISCONNECTED',['../glfw3_8h.html#aab64b25921ef21d89252d6f0a71bfc32',1,'glfw3.h']]],\n  ['glfw_5fdont_5fcare_741',['GLFW_DONT_CARE',['../glfw3_8h.html#a7a2edf2c18446833d27d07f1b7f3d571',1,'glfw3.h']]],\n  ['glfw_5fegl_5fcontext_5fapi_742',['GLFW_EGL_CONTEXT_API',['../glfw3_8h.html#a03cf65c9ab01fc8b872ba58842c531c9',1,'glfw3.h']]],\n  ['glfw_5flock_5fkey_5fmods_743',['GLFW_LOCK_KEY_MODS',['../glfw3_8h.html#a07b84de0b52143e1958f88a7d9105947',1,'glfw3.h']]],\n  ['glfw_5flose_5fcontext_5fon_5freset_744',['GLFW_LOSE_CONTEXT_ON_RESET',['../glfw3_8h.html#aec1132f245143fc915b2f0995228564c',1,'glfw3.h']]],\n  ['glfw_5fnative_5fcontext_5fapi_745',['GLFW_NATIVE_CONTEXT_API',['../glfw3_8h.html#a0494c9bfd3f584ab41e6dbeeaa0e6a19',1,'glfw3.h']]],\n  ['glfw_5fno_5fapi_746',['GLFW_NO_API',['../glfw3_8h.html#a8f6dcdc968d214ff14779564f1389264',1,'glfw3.h']]],\n  ['glfw_5fno_5freset_5fnotification_747',['GLFW_NO_RESET_NOTIFICATION',['../glfw3_8h.html#aee84a679230d205005e22487ff678a85',1,'glfw3.h']]],\n  ['glfw_5fno_5frobustness_748',['GLFW_NO_ROBUSTNESS',['../glfw3_8h.html#a8b306cb27f5bb0d6d67c7356a0e0fc34',1,'glfw3.h']]],\n  ['glfw_5fopengl_5fany_5fprofile_749',['GLFW_OPENGL_ANY_PROFILE',['../glfw3_8h.html#ad6f2335d6f21cc9bab96633b1c111d5f',1,'glfw3.h']]],\n  ['glfw_5fopengl_5fapi_750',['GLFW_OPENGL_API',['../glfw3_8h.html#a01b3f66db266341425e9abee6b257db2',1,'glfw3.h']]],\n  ['glfw_5fopengl_5fcompat_5fprofile_751',['GLFW_OPENGL_COMPAT_PROFILE',['../glfw3_8h.html#ac06b663d79c8fcf04669cc8fcc0b7670',1,'glfw3.h']]],\n  ['glfw_5fopengl_5fcore_5fprofile_752',['GLFW_OPENGL_CORE_PROFILE',['../glfw3_8h.html#af094bb16da76f66ebceb19ee213b3de8',1,'glfw3.h']]],\n  ['glfw_5fopengl_5fes_5fapi_753',['GLFW_OPENGL_ES_API',['../glfw3_8h.html#a28d9b3bc6c2a522d815c8e146595051f',1,'glfw3.h']]],\n  ['glfw_5fosmesa_5fcontext_5fapi_754',['GLFW_OSMESA_CONTEXT_API',['../glfw3_8h.html#afd34a473af9fa81f317910ea371b19e3',1,'glfw3.h']]],\n  ['glfw_5fraw_5fmouse_5fmotion_755',['GLFW_RAW_MOUSE_MOTION',['../glfw3_8h.html#aeeda1be76a44a1fc97c1282e06281fbb',1,'glfw3.h']]],\n  ['glfw_5frelease_5fbehavior_5fflush_756',['GLFW_RELEASE_BEHAVIOR_FLUSH',['../glfw3_8h.html#a999961d391db49cb4f949c1dece0e13b',1,'glfw3.h']]],\n  ['glfw_5frelease_5fbehavior_5fnone_757',['GLFW_RELEASE_BEHAVIOR_NONE',['../glfw3_8h.html#afca09088eccacdce4b59036cfae349c5',1,'glfw3.h']]],\n  ['glfw_5fsticky_5fkeys_758',['GLFW_STICKY_KEYS',['../glfw3_8h.html#ae3bbe2315b7691ab088159eb6c9110fc',1,'glfw3.h']]],\n  ['glfw_5fsticky_5fmouse_5fbuttons_759',['GLFW_STICKY_MOUSE_BUTTONS',['../glfw3_8h.html#a4d7ce8ce71030c3b04e2b78145bc59d1',1,'glfw3.h']]]\n];\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/files_0.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html><head><title></title>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<link rel=\"stylesheet\" type=\"text/css\" href=\"search.css\"/>\n<script type=\"text/javascript\" src=\"files_0.js\"></script>\n<script type=\"text/javascript\" src=\"search.js\"></script>\n</head>\n<body class=\"SRPage\">\n<div id=\"SRIndex\">\n<div class=\"SRStatus\" id=\"Loading\">Loading...</div>\n<div id=\"SRResults\"></div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ncreateResults();\n/* @license-end */\n--></script>\n<div class=\"SRStatus\" id=\"Searching\">Searching...</div>\n<div class=\"SRStatus\" id=\"NoMatches\">No Matches</div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ndocument.getElementById(\"Loading\").style.display=\"none\";\ndocument.getElementById(\"NoMatches\").style.display=\"none\";\nvar searchResults = new SearchResults(\"searchResults\");\nsearchResults.Search();\n/* @license-end */\n--></script>\n</div>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/files_0.js",
    "content": "var searchData=\n[\n  ['build_2edox_531',['build.dox',['../build_8dox.html',1,'']]]\n];\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/files_1.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html><head><title></title>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<link rel=\"stylesheet\" type=\"text/css\" href=\"search.css\"/>\n<script type=\"text/javascript\" src=\"files_1.js\"></script>\n<script type=\"text/javascript\" src=\"search.js\"></script>\n</head>\n<body class=\"SRPage\">\n<div id=\"SRIndex\">\n<div class=\"SRStatus\" id=\"Loading\">Loading...</div>\n<div id=\"SRResults\"></div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ncreateResults();\n/* @license-end */\n--></script>\n<div class=\"SRStatus\" id=\"Searching\">Searching...</div>\n<div class=\"SRStatus\" id=\"NoMatches\">No Matches</div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ndocument.getElementById(\"Loading\").style.display=\"none\";\ndocument.getElementById(\"NoMatches\").style.display=\"none\";\nvar searchResults = new SearchResults(\"searchResults\");\nsearchResults.Search();\n/* @license-end */\n--></script>\n</div>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/files_1.js",
    "content": "var searchData=\n[\n  ['compat_2edox_532',['compat.dox',['../compat_8dox.html',1,'']]],\n  ['compile_2edox_533',['compile.dox',['../compile_8dox.html',1,'']]],\n  ['context_2edox_534',['context.dox',['../context_8dox.html',1,'']]]\n];\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/files_2.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html><head><title></title>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<link rel=\"stylesheet\" type=\"text/css\" href=\"search.css\"/>\n<script type=\"text/javascript\" src=\"files_2.js\"></script>\n<script type=\"text/javascript\" src=\"search.js\"></script>\n</head>\n<body class=\"SRPage\">\n<div id=\"SRIndex\">\n<div class=\"SRStatus\" id=\"Loading\">Loading...</div>\n<div id=\"SRResults\"></div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ncreateResults();\n/* @license-end */\n--></script>\n<div class=\"SRStatus\" id=\"Searching\">Searching...</div>\n<div class=\"SRStatus\" id=\"NoMatches\">No Matches</div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ndocument.getElementById(\"Loading\").style.display=\"none\";\ndocument.getElementById(\"NoMatches\").style.display=\"none\";\nvar searchResults = new SearchResults(\"searchResults\");\nsearchResults.Search();\n/* @license-end */\n--></script>\n</div>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/files_2.js",
    "content": "var searchData=\n[\n  ['glfw3_2eh_535',['glfw3.h',['../glfw3_8h.html',1,'']]],\n  ['glfw3native_2eh_536',['glfw3native.h',['../glfw3native_8h.html',1,'']]]\n];\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/files_3.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html><head><title></title>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<link rel=\"stylesheet\" type=\"text/css\" href=\"search.css\"/>\n<script type=\"text/javascript\" src=\"files_3.js\"></script>\n<script type=\"text/javascript\" src=\"search.js\"></script>\n</head>\n<body class=\"SRPage\">\n<div id=\"SRIndex\">\n<div class=\"SRStatus\" id=\"Loading\">Loading...</div>\n<div id=\"SRResults\"></div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ncreateResults();\n/* @license-end */\n--></script>\n<div class=\"SRStatus\" id=\"Searching\">Searching...</div>\n<div class=\"SRStatus\" id=\"NoMatches\">No Matches</div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ndocument.getElementById(\"Loading\").style.display=\"none\";\ndocument.getElementById(\"NoMatches\").style.display=\"none\";\nvar searchResults = new SearchResults(\"searchResults\");\nsearchResults.Search();\n/* @license-end */\n--></script>\n</div>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/files_3.js",
    "content": "var searchData=\n[\n  ['input_2edox_537',['input.dox',['../input_8dox.html',1,'']]],\n  ['internal_2edox_538',['internal.dox',['../internal_8dox.html',1,'']]],\n  ['intro_2edox_539',['intro.dox',['../intro_8dox.html',1,'']]]\n];\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/files_4.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html><head><title></title>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<link rel=\"stylesheet\" type=\"text/css\" href=\"search.css\"/>\n<script type=\"text/javascript\" src=\"files_4.js\"></script>\n<script type=\"text/javascript\" src=\"search.js\"></script>\n</head>\n<body class=\"SRPage\">\n<div id=\"SRIndex\">\n<div class=\"SRStatus\" id=\"Loading\">Loading...</div>\n<div id=\"SRResults\"></div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ncreateResults();\n/* @license-end */\n--></script>\n<div class=\"SRStatus\" id=\"Searching\">Searching...</div>\n<div class=\"SRStatus\" id=\"NoMatches\">No Matches</div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ndocument.getElementById(\"Loading\").style.display=\"none\";\ndocument.getElementById(\"NoMatches\").style.display=\"none\";\nvar searchResults = new SearchResults(\"searchResults\");\nsearchResults.Search();\n/* @license-end */\n--></script>\n</div>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/files_4.js",
    "content": "var searchData=\n[\n  ['main_2edox_540',['main.dox',['../main_8dox.html',1,'']]],\n  ['monitor_2edox_541',['monitor.dox',['../monitor_8dox.html',1,'']]],\n  ['moving_2edox_542',['moving.dox',['../moving_8dox.html',1,'']]]\n];\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/files_5.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html><head><title></title>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<link rel=\"stylesheet\" type=\"text/css\" href=\"search.css\"/>\n<script type=\"text/javascript\" src=\"files_5.js\"></script>\n<script type=\"text/javascript\" src=\"search.js\"></script>\n</head>\n<body class=\"SRPage\">\n<div id=\"SRIndex\">\n<div class=\"SRStatus\" id=\"Loading\">Loading...</div>\n<div id=\"SRResults\"></div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ncreateResults();\n/* @license-end */\n--></script>\n<div class=\"SRStatus\" id=\"Searching\">Searching...</div>\n<div class=\"SRStatus\" id=\"NoMatches\">No Matches</div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ndocument.getElementById(\"Loading\").style.display=\"none\";\ndocument.getElementById(\"NoMatches\").style.display=\"none\";\nvar searchResults = new SearchResults(\"searchResults\");\nsearchResults.Search();\n/* @license-end */\n--></script>\n</div>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/files_5.js",
    "content": "var searchData=\n[\n  ['news_2edox_543',['news.dox',['../news_8dox.html',1,'']]]\n];\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/files_6.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html><head><title></title>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<link rel=\"stylesheet\" type=\"text/css\" href=\"search.css\"/>\n<script type=\"text/javascript\" src=\"files_6.js\"></script>\n<script type=\"text/javascript\" src=\"search.js\"></script>\n</head>\n<body class=\"SRPage\">\n<div id=\"SRIndex\">\n<div class=\"SRStatus\" id=\"Loading\">Loading...</div>\n<div id=\"SRResults\"></div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ncreateResults();\n/* @license-end */\n--></script>\n<div class=\"SRStatus\" id=\"Searching\">Searching...</div>\n<div class=\"SRStatus\" id=\"NoMatches\">No Matches</div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ndocument.getElementById(\"Loading\").style.display=\"none\";\ndocument.getElementById(\"NoMatches\").style.display=\"none\";\nvar searchResults = new SearchResults(\"searchResults\");\nsearchResults.Search();\n/* @license-end */\n--></script>\n</div>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/files_6.js",
    "content": "var searchData=\n[\n  ['quick_2edox_544',['quick.dox',['../quick_8dox.html',1,'']]]\n];\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/files_7.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html><head><title></title>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<link rel=\"stylesheet\" type=\"text/css\" href=\"search.css\"/>\n<script type=\"text/javascript\" src=\"files_7.js\"></script>\n<script type=\"text/javascript\" src=\"search.js\"></script>\n</head>\n<body class=\"SRPage\">\n<div id=\"SRIndex\">\n<div class=\"SRStatus\" id=\"Loading\">Loading...</div>\n<div id=\"SRResults\"></div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ncreateResults();\n/* @license-end */\n--></script>\n<div class=\"SRStatus\" id=\"Searching\">Searching...</div>\n<div class=\"SRStatus\" id=\"NoMatches\">No Matches</div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ndocument.getElementById(\"Loading\").style.display=\"none\";\ndocument.getElementById(\"NoMatches\").style.display=\"none\";\nvar searchResults = new SearchResults(\"searchResults\");\nsearchResults.Search();\n/* @license-end */\n--></script>\n</div>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/files_7.js",
    "content": "var searchData=\n[\n  ['vulkan_2edox_545',['vulkan.dox',['../vulkan_8dox.html',1,'']]]\n];\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/files_8.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html><head><title></title>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<link rel=\"stylesheet\" type=\"text/css\" href=\"search.css\"/>\n<script type=\"text/javascript\" src=\"files_8.js\"></script>\n<script type=\"text/javascript\" src=\"search.js\"></script>\n</head>\n<body class=\"SRPage\">\n<div id=\"SRIndex\">\n<div class=\"SRStatus\" id=\"Loading\">Loading...</div>\n<div id=\"SRResults\"></div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ncreateResults();\n/* @license-end */\n--></script>\n<div class=\"SRStatus\" id=\"Searching\">Searching...</div>\n<div class=\"SRStatus\" id=\"NoMatches\">No Matches</div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ndocument.getElementById(\"Loading\").style.display=\"none\";\ndocument.getElementById(\"NoMatches\").style.display=\"none\";\nvar searchResults = new SearchResults(\"searchResults\");\nsearchResults.Search();\n/* @license-end */\n--></script>\n</div>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/files_8.js",
    "content": "var searchData=\n[\n  ['window_2edox_546',['window.dox',['../window_8dox.html',1,'']]]\n];\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/functions_0.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html><head><title></title>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<link rel=\"stylesheet\" type=\"text/css\" href=\"search.css\"/>\n<script type=\"text/javascript\" src=\"functions_0.js\"></script>\n<script type=\"text/javascript\" src=\"search.js\"></script>\n</head>\n<body class=\"SRPage\">\n<div id=\"SRIndex\">\n<div class=\"SRStatus\" id=\"Loading\">Loading...</div>\n<div id=\"SRResults\"></div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ncreateResults();\n/* @license-end */\n--></script>\n<div class=\"SRStatus\" id=\"Searching\">Searching...</div>\n<div class=\"SRStatus\" id=\"NoMatches\">No Matches</div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ndocument.getElementById(\"Loading\").style.display=\"none\";\ndocument.getElementById(\"NoMatches\").style.display=\"none\";\nvar searchResults = new SearchResults(\"searchResults\");\nsearchResults.Search();\n/* @license-end */\n--></script>\n</div>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/functions_0.js",
    "content": "var searchData=\n[\n  ['glfwcreatecursor_547',['glfwCreateCursor',['../group__input.html#gafca356935e10135016aa49ffa464c355',1,'glfw3.h']]],\n  ['glfwcreatestandardcursor_548',['glfwCreateStandardCursor',['../group__input.html#gaa65f416d03ebbbb5b8db71a489fcb894',1,'glfw3.h']]],\n  ['glfwcreatewindow_549',['glfwCreateWindow',['../group__window.html#ga5c336fddf2cbb5b92f65f10fb6043344',1,'glfw3.h']]],\n  ['glfwcreatewindowsurface_550',['glfwCreateWindowSurface',['../group__vulkan.html#ga1a24536bec3f80b08ead18e28e6ae965',1,'glfw3.h']]],\n  ['glfwdefaultwindowhints_551',['glfwDefaultWindowHints',['../group__window.html#gaa77c4898dfb83344a6b4f76aa16b9a4a',1,'glfw3.h']]],\n  ['glfwdestroycursor_552',['glfwDestroyCursor',['../group__input.html#ga81b952cd1764274d0db7fb3c5a79ba6a',1,'glfw3.h']]],\n  ['glfwdestroywindow_553',['glfwDestroyWindow',['../group__window.html#gacdf43e51376051d2c091662e9fe3d7b2',1,'glfw3.h']]],\n  ['glfwextensionsupported_554',['glfwExtensionSupported',['../group__context.html#ga87425065c011cef1ebd6aac75e059dfa',1,'glfw3.h']]],\n  ['glfwfocuswindow_555',['glfwFocusWindow',['../group__window.html#ga873780357abd3f3a081d71a40aae45a1',1,'glfw3.h']]],\n  ['glfwgetclipboardstring_556',['glfwGetClipboardString',['../group__input.html#ga5aba1d704d9ab539282b1fbe9f18bb94',1,'glfw3.h']]],\n  ['glfwgetcocoamonitor_557',['glfwGetCocoaMonitor',['../group__native.html#gaf22f429aec4b1aab316142d66d9be3e6',1,'glfw3native.h']]],\n  ['glfwgetcocoawindow_558',['glfwGetCocoaWindow',['../group__native.html#gac3ed9d495d0c2bb9652de5a50c648715',1,'glfw3native.h']]],\n  ['glfwgetcurrentcontext_559',['glfwGetCurrentContext',['../group__context.html#gac84759b1f6c2d271a4fea8ae89ec980d',1,'glfw3.h']]],\n  ['glfwgetcursorpos_560',['glfwGetCursorPos',['../group__input.html#ga01d37b6c40133676b9cea60ca1d7c0cc',1,'glfw3.h']]],\n  ['glfwgeteglcontext_561',['glfwGetEGLContext',['../group__native.html#ga671c5072becd085f4ab5771a9c8efcf1',1,'glfw3native.h']]],\n  ['glfwgetegldisplay_562',['glfwGetEGLDisplay',['../group__native.html#ga1cd8d973f47aacb5532d368147cc3138',1,'glfw3native.h']]],\n  ['glfwgeteglsurface_563',['glfwGetEGLSurface',['../group__native.html#ga2199b36117a6a695fec8441d8052eee6',1,'glfw3native.h']]],\n  ['glfwgeterror_564',['glfwGetError',['../group__init.html#ga944986b4ec0b928d488141f92982aa18',1,'glfw3.h']]],\n  ['glfwgetframebuffersize_565',['glfwGetFramebufferSize',['../group__window.html#ga0e2637a4161afb283f5300c7f94785c9',1,'glfw3.h']]],\n  ['glfwgetgamepadname_566',['glfwGetGamepadName',['../group__input.html#ga5c71e3533b2d384db9317fcd7661b210',1,'glfw3.h']]],\n  ['glfwgetgamepadstate_567',['glfwGetGamepadState',['../group__input.html#gadccddea8bce6113fa459de379ddaf051',1,'glfw3.h']]],\n  ['glfwgetgammaramp_568',['glfwGetGammaRamp',['../group__monitor.html#gab7c41deb2219bde3e1eb756ddaa9ec80',1,'glfw3.h']]],\n  ['glfwgetglxcontext_569',['glfwGetGLXContext',['../group__native.html#ga62d884114b0abfcdc2930e89f20867e2',1,'glfw3native.h']]],\n  ['glfwgetglxwindow_570',['glfwGetGLXWindow',['../group__native.html#ga1ed27b8766e859a21381e8f8ce18d049',1,'glfw3native.h']]],\n  ['glfwgetinputmode_571',['glfwGetInputMode',['../group__input.html#gaf5b859dbe19bdf434e42695ea45cc5f4',1,'glfw3.h']]],\n  ['glfwgetinstanceprocaddress_572',['glfwGetInstanceProcAddress',['../group__vulkan.html#gadf228fac94c5fd8f12423ec9af9ff1e9',1,'glfw3.h']]],\n  ['glfwgetjoystickaxes_573',['glfwGetJoystickAxes',['../group__input.html#gaa8806536731e92c061bc70bcff6edbd0',1,'glfw3.h']]],\n  ['glfwgetjoystickbuttons_574',['glfwGetJoystickButtons',['../group__input.html#gadb3cbf44af90a1536f519659a53bddd6',1,'glfw3.h']]],\n  ['glfwgetjoystickguid_575',['glfwGetJoystickGUID',['../group__input.html#gae168c2c0b8cf2a1cb67c6b3c00bdd543',1,'glfw3.h']]],\n  ['glfwgetjoystickhats_576',['glfwGetJoystickHats',['../group__input.html#ga2d8d0634bb81c180899aeb07477a67ea',1,'glfw3.h']]],\n  ['glfwgetjoystickname_577',['glfwGetJoystickName',['../group__input.html#gafbe3e51f670320908cfe4e20d3e5559e',1,'glfw3.h']]],\n  ['glfwgetjoystickuserpointer_578',['glfwGetJoystickUserPointer',['../group__input.html#ga06290acb7ed23895bf26b8e981827ebd',1,'glfw3.h']]],\n  ['glfwgetkey_579',['glfwGetKey',['../group__input.html#gadd341da06bc8d418b4dc3a3518af9ad2',1,'glfw3.h']]],\n  ['glfwgetkeyname_580',['glfwGetKeyName',['../group__input.html#ga237a182e5ec0b21ce64543f3b5e7e2be',1,'glfw3.h']]],\n  ['glfwgetkeyscancode_581',['glfwGetKeyScancode',['../group__input.html#ga67ddd1b7dcbbaff03e4a76c0ea67103a',1,'glfw3.h']]],\n  ['glfwgetmonitorcontentscale_582',['glfwGetMonitorContentScale',['../group__monitor.html#gad3152e84465fa620b601265ebfcdb21b',1,'glfw3.h']]],\n  ['glfwgetmonitorname_583',['glfwGetMonitorName',['../group__monitor.html#ga79a34ee22ff080ca954a9663e4679daf',1,'glfw3.h']]],\n  ['glfwgetmonitorphysicalsize_584',['glfwGetMonitorPhysicalSize',['../group__monitor.html#ga7d8bffc6c55539286a6bd20d32a8d7ea',1,'glfw3.h']]],\n  ['glfwgetmonitorpos_585',['glfwGetMonitorPos',['../group__monitor.html#ga102f54e7acc9149edbcf0997152df8c9',1,'glfw3.h']]],\n  ['glfwgetmonitors_586',['glfwGetMonitors',['../group__monitor.html#ga3fba51c8bd36491d4712aa5bd074a537',1,'glfw3.h']]],\n  ['glfwgetmonitoruserpointer_587',['glfwGetMonitorUserPointer',['../group__monitor.html#gac2d4209016b049222877f620010ed0d8',1,'glfw3.h']]],\n  ['glfwgetmonitorworkarea_588',['glfwGetMonitorWorkarea',['../group__monitor.html#ga7387a3bdb64bfe8ebf2b9e54f5b6c9d0',1,'glfw3.h']]],\n  ['glfwgetmousebutton_589',['glfwGetMouseButton',['../group__input.html#gac1473feacb5996c01a7a5a33b5066704',1,'glfw3.h']]],\n  ['glfwgetnsglcontext_590',['glfwGetNSGLContext',['../group__native.html#ga559e002e3cd63c979881770cd4dc63bc',1,'glfw3native.h']]],\n  ['glfwgetosmesacolorbuffer_591',['glfwGetOSMesaColorBuffer',['../group__native.html#ga3b36e3e3dcf308b776427b6bd73cc132',1,'glfw3native.h']]],\n  ['glfwgetosmesacontext_592',['glfwGetOSMesaContext',['../group__native.html#ga9e47700080094eb569cb053afaa88773',1,'glfw3native.h']]],\n  ['glfwgetosmesadepthbuffer_593',['glfwGetOSMesaDepthBuffer',['../group__native.html#ga6b64039ffc88a7a2f57f0956c0c75d53',1,'glfw3native.h']]],\n  ['glfwgetphysicaldevicepresentationsupport_594',['glfwGetPhysicalDevicePresentationSupport',['../group__vulkan.html#gaff3823355cdd7e2f3f9f4d9ea9518d92',1,'glfw3.h']]],\n  ['glfwgetprimarymonitor_595',['glfwGetPrimaryMonitor',['../group__monitor.html#ga721867d84c6d18d6790d64d2847ca0b1',1,'glfw3.h']]],\n  ['glfwgetprocaddress_596',['glfwGetProcAddress',['../group__context.html#ga35f1837e6f666781842483937612f163',1,'glfw3.h']]],\n  ['glfwgetrequiredinstanceextensions_597',['glfwGetRequiredInstanceExtensions',['../group__vulkan.html#ga1abcbe61033958f22f63ef82008874b1',1,'glfw3.h']]],\n  ['glfwgettime_598',['glfwGetTime',['../group__input.html#gaa6cf4e7a77158a3b8fd00328b1720a4a',1,'glfw3.h']]],\n  ['glfwgettimerfrequency_599',['glfwGetTimerFrequency',['../group__input.html#ga3289ee876572f6e91f06df3a24824443',1,'glfw3.h']]],\n  ['glfwgettimervalue_600',['glfwGetTimerValue',['../group__input.html#ga09b2bd37d328e0b9456c7ec575cc26aa',1,'glfw3.h']]],\n  ['glfwgetversion_601',['glfwGetVersion',['../group__init.html#ga9f8ffaacf3c269cc48eafbf8b9b71197',1,'glfw3.h']]],\n  ['glfwgetversionstring_602',['glfwGetVersionString',['../group__init.html#ga23d47dc013fce2bf58036da66079a657',1,'glfw3.h']]],\n  ['glfwgetvideomode_603',['glfwGetVideoMode',['../group__monitor.html#gafc1bb972a921ad5b3bd5d63a95fc2d52',1,'glfw3.h']]],\n  ['glfwgetvideomodes_604',['glfwGetVideoModes',['../group__monitor.html#ga820b0ce9a5237d645ea7cbb4bd383458',1,'glfw3.h']]],\n  ['glfwgetwaylanddisplay_605',['glfwGetWaylandDisplay',['../group__native.html#gaaf8118a3c877f3a6bc8e7a649519de5e',1,'glfw3native.h']]],\n  ['glfwgetwaylandmonitor_606',['glfwGetWaylandMonitor',['../group__native.html#gab10427a667b6cd91eec7709f7a906bd3',1,'glfw3native.h']]],\n  ['glfwgetwaylandwindow_607',['glfwGetWaylandWindow',['../group__native.html#ga4738d7aca4191363519a9a641c3ab64c',1,'glfw3native.h']]],\n  ['glfwgetwglcontext_608',['glfwGetWGLContext',['../group__native.html#gadc4010d91d9cc1134d040eeb1202a143',1,'glfw3native.h']]],\n  ['glfwgetwin32adapter_609',['glfwGetWin32Adapter',['../group__native.html#gac84f63a3f9db145b9435e5e0dbc4183d',1,'glfw3native.h']]],\n  ['glfwgetwin32monitor_610',['glfwGetWin32Monitor',['../group__native.html#gac408b09a330749402d5d1fa1f5894dd9',1,'glfw3native.h']]],\n  ['glfwgetwin32window_611',['glfwGetWin32Window',['../group__native.html#gafe5079aa79038b0079fc09d5f0a8e667',1,'glfw3native.h']]],\n  ['glfwgetwindowattrib_612',['glfwGetWindowAttrib',['../group__window.html#gacccb29947ea4b16860ebef42c2cb9337',1,'glfw3.h']]],\n  ['glfwgetwindowcontentscale_613',['glfwGetWindowContentScale',['../group__window.html#gaf5d31de9c19c4f994facea64d2b3106c',1,'glfw3.h']]],\n  ['glfwgetwindowframesize_614',['glfwGetWindowFrameSize',['../group__window.html#ga1a9fd382058c53101b21cf211898f1f1',1,'glfw3.h']]],\n  ['glfwgetwindowmonitor_615',['glfwGetWindowMonitor',['../group__window.html#gaeac25e64789974ccbe0811766bd91a16',1,'glfw3.h']]],\n  ['glfwgetwindowopacity_616',['glfwGetWindowOpacity',['../group__window.html#gad09f0bd7a6307c4533b7061828480a84',1,'glfw3.h']]],\n  ['glfwgetwindowpos_617',['glfwGetWindowPos',['../group__window.html#ga73cb526c000876fd8ddf571570fdb634',1,'glfw3.h']]],\n  ['glfwgetwindowsize_618',['glfwGetWindowSize',['../group__window.html#gaeea7cbc03373a41fb51cfbf9f2a5d4c6',1,'glfw3.h']]],\n  ['glfwgetwindowuserpointer_619',['glfwGetWindowUserPointer',['../group__window.html#ga17807ce0f45ac3f8bb50d6dcc59a4e06',1,'glfw3.h']]],\n  ['glfwgetx11adapter_620',['glfwGetX11Adapter',['../group__native.html#ga088fbfa80f50569402b41be71ad66e40',1,'glfw3native.h']]],\n  ['glfwgetx11display_621',['glfwGetX11Display',['../group__native.html#ga8519b66594ea3ef6eeafaa2e3ee37406',1,'glfw3native.h']]],\n  ['glfwgetx11monitor_622',['glfwGetX11Monitor',['../group__native.html#gab2f8cc043905e9fa9b12bfdbbcfe874c',1,'glfw3native.h']]],\n  ['glfwgetx11selectionstring_623',['glfwGetX11SelectionString',['../group__native.html#ga72f23e3980b83788c70aa854eca31430',1,'glfw3native.h']]],\n  ['glfwgetx11window_624',['glfwGetX11Window',['../group__native.html#ga90ca676322740842db446999a1b1f21d',1,'glfw3native.h']]],\n  ['glfwhidewindow_625',['glfwHideWindow',['../group__window.html#ga49401f82a1ba5f15db5590728314d47c',1,'glfw3.h']]],\n  ['glfwiconifywindow_626',['glfwIconifyWindow',['../group__window.html#ga1bb559c0ebaad63c5c05ad2a066779c4',1,'glfw3.h']]],\n  ['glfwinit_627',['glfwInit',['../group__init.html#ga317aac130a235ab08c6db0834907d85e',1,'glfw3.h']]],\n  ['glfwinithint_628',['glfwInitHint',['../group__init.html#ga110fd1d3f0412822b4f1908c026f724a',1,'glfw3.h']]],\n  ['glfwjoystickisgamepad_629',['glfwJoystickIsGamepad',['../group__input.html#gad0f676860f329d80f7e47e9f06a96f00',1,'glfw3.h']]],\n  ['glfwjoystickpresent_630',['glfwJoystickPresent',['../group__input.html#gaed0966cee139d815317f9ffcba64c9f1',1,'glfw3.h']]],\n  ['glfwmakecontextcurrent_631',['glfwMakeContextCurrent',['../group__context.html#ga1c04dc242268f827290fe40aa1c91157',1,'glfw3.h']]],\n  ['glfwmaximizewindow_632',['glfwMaximizeWindow',['../group__window.html#ga3f541387449d911274324ae7f17ec56b',1,'glfw3.h']]],\n  ['glfwpollevents_633',['glfwPollEvents',['../group__window.html#ga37bd57223967b4211d60ca1a0bf3c832',1,'glfw3.h']]],\n  ['glfwpostemptyevent_634',['glfwPostEmptyEvent',['../group__window.html#gab5997a25187e9fd5c6f2ecbbc8dfd7e9',1,'glfw3.h']]],\n  ['glfwrawmousemotionsupported_635',['glfwRawMouseMotionSupported',['../group__input.html#gae4ee0dbd0d256183e1ea4026d897e1c2',1,'glfw3.h']]],\n  ['glfwrequestwindowattention_636',['glfwRequestWindowAttention',['../group__window.html#ga2f8d59323fc4692c1d54ba08c863a703',1,'glfw3.h']]],\n  ['glfwrestorewindow_637',['glfwRestoreWindow',['../group__window.html#ga52527a5904b47d802b6b4bb519cdebc7',1,'glfw3.h']]],\n  ['glfwsetcharcallback_638',['glfwSetCharCallback',['../group__input.html#gab25c4a220fd8f5717718dbc487828996',1,'glfw3.h']]],\n  ['glfwsetcharmodscallback_639',['glfwSetCharModsCallback',['../group__input.html#ga0b7f4ad13c2b17435ff13b6dcfb4e43c',1,'glfw3.h']]],\n  ['glfwsetclipboardstring_640',['glfwSetClipboardString',['../group__input.html#gaba1f022c5eb07dfac421df34cdcd31dd',1,'glfw3.h']]],\n  ['glfwsetcursor_641',['glfwSetCursor',['../group__input.html#gad3b4f38c8d5dae036bc8fa959e18343e',1,'glfw3.h']]],\n  ['glfwsetcursorentercallback_642',['glfwSetCursorEnterCallback',['../group__input.html#gad27f8ad0142c038a281466c0966817d8',1,'glfw3.h']]],\n  ['glfwsetcursorpos_643',['glfwSetCursorPos',['../group__input.html#ga04b03af936d906ca123c8f4ee08b39e7',1,'glfw3.h']]],\n  ['glfwsetcursorposcallback_644',['glfwSetCursorPosCallback',['../group__input.html#gac1f879ab7435d54d4d79bb469fe225d7',1,'glfw3.h']]],\n  ['glfwsetdropcallback_645',['glfwSetDropCallback',['../group__input.html#gab773f0ee0a07cff77a210cea40bc1f6b',1,'glfw3.h']]],\n  ['glfwseterrorcallback_646',['glfwSetErrorCallback',['../group__init.html#gaff45816610d53f0b83656092a4034f40',1,'glfw3.h']]],\n  ['glfwsetframebuffersizecallback_647',['glfwSetFramebufferSizeCallback',['../group__window.html#gab3fb7c3366577daef18c0023e2a8591f',1,'glfw3.h']]],\n  ['glfwsetgamma_648',['glfwSetGamma',['../group__monitor.html#ga6ac582625c990220785ddd34efa3169a',1,'glfw3.h']]],\n  ['glfwsetgammaramp_649',['glfwSetGammaRamp',['../group__monitor.html#ga583f0ffd0d29613d8cd172b996bbf0dd',1,'glfw3.h']]],\n  ['glfwsetinputmode_650',['glfwSetInputMode',['../group__input.html#gaa92336e173da9c8834558b54ee80563b',1,'glfw3.h']]],\n  ['glfwsetjoystickcallback_651',['glfwSetJoystickCallback',['../group__input.html#ga2f60a0e5b7bd8d1b7344dc0a7cb32b4c',1,'glfw3.h']]],\n  ['glfwsetjoystickuserpointer_652',['glfwSetJoystickUserPointer',['../group__input.html#ga6b2f72d64d636b48a727b437cbb7489e',1,'glfw3.h']]],\n  ['glfwsetkeycallback_653',['glfwSetKeyCallback',['../group__input.html#ga1caf18159767e761185e49a3be019f8d',1,'glfw3.h']]],\n  ['glfwsetmonitorcallback_654',['glfwSetMonitorCallback',['../group__monitor.html#gab39df645587c8518192aa746c2fb06c3',1,'glfw3.h']]],\n  ['glfwsetmonitoruserpointer_655',['glfwSetMonitorUserPointer',['../group__monitor.html#ga702750e24313a686d3637297b6e85fda',1,'glfw3.h']]],\n  ['glfwsetmousebuttoncallback_656',['glfwSetMouseButtonCallback',['../group__input.html#ga6ab84420974d812bee700e45284a723c',1,'glfw3.h']]],\n  ['glfwsetscrollcallback_657',['glfwSetScrollCallback',['../group__input.html#ga571e45a030ae4061f746ed56cb76aede',1,'glfw3.h']]],\n  ['glfwsettime_658',['glfwSetTime',['../group__input.html#gaf59589ef6e8b8c8b5ad184b25afd4dc0',1,'glfw3.h']]],\n  ['glfwsetwindowaspectratio_659',['glfwSetWindowAspectRatio',['../group__window.html#ga72ac8cb1ee2e312a878b55153d81b937',1,'glfw3.h']]],\n  ['glfwsetwindowattrib_660',['glfwSetWindowAttrib',['../group__window.html#gace2afda29b4116ec012e410a6819033e',1,'glfw3.h']]],\n  ['glfwsetwindowclosecallback_661',['glfwSetWindowCloseCallback',['../group__window.html#gada646d775a7776a95ac000cfc1885331',1,'glfw3.h']]],\n  ['glfwsetwindowcontentscalecallback_662',['glfwSetWindowContentScaleCallback',['../group__window.html#gaf2832ebb5aa6c252a2d261de002c92d6',1,'glfw3.h']]],\n  ['glfwsetwindowfocuscallback_663',['glfwSetWindowFocusCallback',['../group__window.html#gac2d83c4a10f071baf841f6730528e66c',1,'glfw3.h']]],\n  ['glfwsetwindowicon_664',['glfwSetWindowIcon',['../group__window.html#gadd7ccd39fe7a7d1f0904666ae5932dc5',1,'glfw3.h']]],\n  ['glfwsetwindowiconifycallback_665',['glfwSetWindowIconifyCallback',['../group__window.html#gac793e9efd255567b5fb8b445052cfd3e',1,'glfw3.h']]],\n  ['glfwsetwindowmaximizecallback_666',['glfwSetWindowMaximizeCallback',['../group__window.html#gacbe64c339fbd94885e62145563b6dc93',1,'glfw3.h']]],\n  ['glfwsetwindowmonitor_667',['glfwSetWindowMonitor',['../group__window.html#ga81c76c418af80a1cce7055bccb0ae0a7',1,'glfw3.h']]],\n  ['glfwsetwindowopacity_668',['glfwSetWindowOpacity',['../group__window.html#gac31caeb3d1088831b13d2c8a156802e9',1,'glfw3.h']]],\n  ['glfwsetwindowpos_669',['glfwSetWindowPos',['../group__window.html#ga1abb6d690e8c88e0c8cd1751356dbca8',1,'glfw3.h']]],\n  ['glfwsetwindowposcallback_670',['glfwSetWindowPosCallback',['../group__window.html#ga08bdfbba88934f9c4f92fd757979ac74',1,'glfw3.h']]],\n  ['glfwsetwindowrefreshcallback_671',['glfwSetWindowRefreshCallback',['../group__window.html#ga1c5c7eb889c33c7f4d10dd35b327654e',1,'glfw3.h']]],\n  ['glfwsetwindowshouldclose_672',['glfwSetWindowShouldClose',['../group__window.html#ga49c449dde2a6f87d996f4daaa09d6708',1,'glfw3.h']]],\n  ['glfwsetwindowsize_673',['glfwSetWindowSize',['../group__window.html#ga371911f12c74c504dd8d47d832d095cb',1,'glfw3.h']]],\n  ['glfwsetwindowsizecallback_674',['glfwSetWindowSizeCallback',['../group__window.html#gad91b8b047a0c4c6033c38853864c34f8',1,'glfw3.h']]],\n  ['glfwsetwindowsizelimits_675',['glfwSetWindowSizeLimits',['../group__window.html#gac314fa6cec7d2d307be9963e2709cc90',1,'glfw3.h']]],\n  ['glfwsetwindowtitle_676',['glfwSetWindowTitle',['../group__window.html#ga5d877f09e968cef7a360b513306f17ff',1,'glfw3.h']]],\n  ['glfwsetwindowuserpointer_677',['glfwSetWindowUserPointer',['../group__window.html#ga3d2fc6026e690ab31a13f78bc9fd3651',1,'glfw3.h']]],\n  ['glfwsetx11selectionstring_678',['glfwSetX11SelectionString',['../group__native.html#ga55f879ab02d93367f966186b6f0133f7',1,'glfw3native.h']]],\n  ['glfwshowwindow_679',['glfwShowWindow',['../group__window.html#ga61be47917b72536a148300f46494fc66',1,'glfw3.h']]],\n  ['glfwswapbuffers_680',['glfwSwapBuffers',['../group__window.html#ga15a5a1ee5b3c2ca6b15ca209a12efd14',1,'glfw3.h']]],\n  ['glfwswapinterval_681',['glfwSwapInterval',['../group__context.html#ga6d4e0cdf151b5e579bd67f13202994ed',1,'glfw3.h']]],\n  ['glfwterminate_682',['glfwTerminate',['../group__init.html#gaaae48c0a18607ea4a4ba951d939f0901',1,'glfw3.h']]],\n  ['glfwupdategamepadmappings_683',['glfwUpdateGamepadMappings',['../group__input.html#gaed5104612f2fa8e66aa6e846652ad00f',1,'glfw3.h']]],\n  ['glfwvulkansupported_684',['glfwVulkanSupported',['../group__vulkan.html#ga2e7f30931e02464b5bc8d0d4b6f9fe2b',1,'glfw3.h']]],\n  ['glfwwaitevents_685',['glfwWaitEvents',['../group__window.html#ga554e37d781f0a997656c26b2c56c835e',1,'glfw3.h']]],\n  ['glfwwaiteventstimeout_686',['glfwWaitEventsTimeout',['../group__window.html#ga605a178db92f1a7f1a925563ef3ea2cf',1,'glfw3.h']]],\n  ['glfwwindowhint_687',['glfwWindowHint',['../group__window.html#ga7d9c8c62384b1e2821c4dc48952d2033',1,'glfw3.h']]],\n  ['glfwwindowhintstring_688',['glfwWindowHintString',['../group__window.html#ga8cb2782861c9d997bcf2dea97f363e5f',1,'glfw3.h']]],\n  ['glfwwindowshouldclose_689',['glfwWindowShouldClose',['../group__window.html#ga24e02fbfefbb81fc45320989f8140ab5',1,'glfw3.h']]]\n];\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/groups_0.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html><head><title></title>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<link rel=\"stylesheet\" type=\"text/css\" href=\"search.css\"/>\n<script type=\"text/javascript\" src=\"groups_0.js\"></script>\n<script type=\"text/javascript\" src=\"search.js\"></script>\n</head>\n<body class=\"SRPage\">\n<div id=\"SRIndex\">\n<div class=\"SRStatus\" id=\"Loading\">Loading...</div>\n<div id=\"SRResults\"></div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ncreateResults();\n/* @license-end */\n--></script>\n<div class=\"SRStatus\" id=\"Searching\">Searching...</div>\n<div class=\"SRStatus\" id=\"NoMatches\">No Matches</div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ndocument.getElementById(\"Loading\").style.display=\"none\";\ndocument.getElementById(\"NoMatches\").style.display=\"none\";\nvar searchResults = new SearchResults(\"searchResults\");\nsearchResults.Search();\n/* @license-end */\n--></script>\n</div>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/groups_0.js",
    "content": "var searchData=\n[\n  ['context_20reference_760',['Context reference',['../group__context.html',1,'']]]\n];\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/groups_1.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html><head><title></title>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<link rel=\"stylesheet\" type=\"text/css\" href=\"search.css\"/>\n<script type=\"text/javascript\" src=\"groups_1.js\"></script>\n<script type=\"text/javascript\" src=\"search.js\"></script>\n</head>\n<body class=\"SRPage\">\n<div id=\"SRIndex\">\n<div class=\"SRStatus\" id=\"Loading\">Loading...</div>\n<div id=\"SRResults\"></div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ncreateResults();\n/* @license-end */\n--></script>\n<div class=\"SRStatus\" id=\"Searching\">Searching...</div>\n<div class=\"SRStatus\" id=\"NoMatches\">No Matches</div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ndocument.getElementById(\"Loading\").style.display=\"none\";\ndocument.getElementById(\"NoMatches\").style.display=\"none\";\nvar searchResults = new SearchResults(\"searchResults\");\nsearchResults.Search();\n/* @license-end */\n--></script>\n</div>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/groups_1.js",
    "content": "var searchData=\n[\n  ['error_20codes_761',['Error codes',['../group__errors.html',1,'']]]\n];\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/groups_2.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html><head><title></title>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<link rel=\"stylesheet\" type=\"text/css\" href=\"search.css\"/>\n<script type=\"text/javascript\" src=\"groups_2.js\"></script>\n<script type=\"text/javascript\" src=\"search.js\"></script>\n</head>\n<body class=\"SRPage\">\n<div id=\"SRIndex\">\n<div class=\"SRStatus\" id=\"Loading\">Loading...</div>\n<div id=\"SRResults\"></div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ncreateResults();\n/* @license-end */\n--></script>\n<div class=\"SRStatus\" id=\"Searching\">Searching...</div>\n<div class=\"SRStatus\" id=\"NoMatches\">No Matches</div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ndocument.getElementById(\"Loading\").style.display=\"none\";\ndocument.getElementById(\"NoMatches\").style.display=\"none\";\nvar searchResults = new SearchResults(\"searchResults\");\nsearchResults.Search();\n/* @license-end */\n--></script>\n</div>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/groups_2.js",
    "content": "var searchData=\n[\n  ['gamepad_20axes_762',['Gamepad axes',['../group__gamepad__axes.html',1,'']]],\n  ['gamepad_20buttons_763',['Gamepad buttons',['../group__gamepad__buttons.html',1,'']]]\n];\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/groups_3.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html><head><title></title>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<link rel=\"stylesheet\" type=\"text/css\" href=\"search.css\"/>\n<script type=\"text/javascript\" src=\"groups_3.js\"></script>\n<script type=\"text/javascript\" src=\"search.js\"></script>\n</head>\n<body class=\"SRPage\">\n<div id=\"SRIndex\">\n<div class=\"SRStatus\" id=\"Loading\">Loading...</div>\n<div id=\"SRResults\"></div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ncreateResults();\n/* @license-end */\n--></script>\n<div class=\"SRStatus\" id=\"Searching\">Searching...</div>\n<div class=\"SRStatus\" id=\"NoMatches\">No Matches</div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ndocument.getElementById(\"Loading\").style.display=\"none\";\ndocument.getElementById(\"NoMatches\").style.display=\"none\";\nvar searchResults = new SearchResults(\"searchResults\");\nsearchResults.Search();\n/* @license-end */\n--></script>\n</div>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/groups_3.js",
    "content": "var searchData=\n[\n  ['initialization_2c_20version_20and_20error_20reference_764',['Initialization, version and error reference',['../group__init.html',1,'']]],\n  ['input_20reference_765',['Input reference',['../group__input.html',1,'']]]\n];\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/groups_4.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html><head><title></title>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<link rel=\"stylesheet\" type=\"text/css\" href=\"search.css\"/>\n<script type=\"text/javascript\" src=\"groups_4.js\"></script>\n<script type=\"text/javascript\" src=\"search.js\"></script>\n</head>\n<body class=\"SRPage\">\n<div id=\"SRIndex\">\n<div class=\"SRStatus\" id=\"Loading\">Loading...</div>\n<div id=\"SRResults\"></div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ncreateResults();\n/* @license-end */\n--></script>\n<div class=\"SRStatus\" id=\"Searching\">Searching...</div>\n<div class=\"SRStatus\" id=\"NoMatches\">No Matches</div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ndocument.getElementById(\"Loading\").style.display=\"none\";\ndocument.getElementById(\"NoMatches\").style.display=\"none\";\nvar searchResults = new SearchResults(\"searchResults\");\nsearchResults.Search();\n/* @license-end */\n--></script>\n</div>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/groups_4.js",
    "content": "var searchData=\n[\n  ['joystick_20hat_20states_766',['Joystick hat states',['../group__hat__state.html',1,'']]],\n  ['joysticks_767',['Joysticks',['../group__joysticks.html',1,'']]]\n];\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/groups_5.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html><head><title></title>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<link rel=\"stylesheet\" type=\"text/css\" href=\"search.css\"/>\n<script type=\"text/javascript\" src=\"groups_5.js\"></script>\n<script type=\"text/javascript\" src=\"search.js\"></script>\n</head>\n<body class=\"SRPage\">\n<div id=\"SRIndex\">\n<div class=\"SRStatus\" id=\"Loading\">Loading...</div>\n<div id=\"SRResults\"></div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ncreateResults();\n/* @license-end */\n--></script>\n<div class=\"SRStatus\" id=\"Searching\">Searching...</div>\n<div class=\"SRStatus\" id=\"NoMatches\">No Matches</div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ndocument.getElementById(\"Loading\").style.display=\"none\";\ndocument.getElementById(\"NoMatches\").style.display=\"none\";\nvar searchResults = new SearchResults(\"searchResults\");\nsearchResults.Search();\n/* @license-end */\n--></script>\n</div>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/groups_5.js",
    "content": "var searchData=\n[\n  ['keyboard_20keys_768',['Keyboard keys',['../group__keys.html',1,'']]]\n];\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/groups_6.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html><head><title></title>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<link rel=\"stylesheet\" type=\"text/css\" href=\"search.css\"/>\n<script type=\"text/javascript\" src=\"groups_6.js\"></script>\n<script type=\"text/javascript\" src=\"search.js\"></script>\n</head>\n<body class=\"SRPage\">\n<div id=\"SRIndex\">\n<div class=\"SRStatus\" id=\"Loading\">Loading...</div>\n<div id=\"SRResults\"></div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ncreateResults();\n/* @license-end */\n--></script>\n<div class=\"SRStatus\" id=\"Searching\">Searching...</div>\n<div class=\"SRStatus\" id=\"NoMatches\">No Matches</div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ndocument.getElementById(\"Loading\").style.display=\"none\";\ndocument.getElementById(\"NoMatches\").style.display=\"none\";\nvar searchResults = new SearchResults(\"searchResults\");\nsearchResults.Search();\n/* @license-end */\n--></script>\n</div>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/groups_6.js",
    "content": "var searchData=\n[\n  ['mouse_20buttons_769',['Mouse buttons',['../group__buttons.html',1,'']]],\n  ['modifier_20key_20flags_770',['Modifier key flags',['../group__mods.html',1,'']]],\n  ['monitor_20reference_771',['Monitor reference',['../group__monitor.html',1,'']]]\n];\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/groups_7.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html><head><title></title>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<link rel=\"stylesheet\" type=\"text/css\" href=\"search.css\"/>\n<script type=\"text/javascript\" src=\"groups_7.js\"></script>\n<script type=\"text/javascript\" src=\"search.js\"></script>\n</head>\n<body class=\"SRPage\">\n<div id=\"SRIndex\">\n<div class=\"SRStatus\" id=\"Loading\">Loading...</div>\n<div id=\"SRResults\"></div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ncreateResults();\n/* @license-end */\n--></script>\n<div class=\"SRStatus\" id=\"Searching\">Searching...</div>\n<div class=\"SRStatus\" id=\"NoMatches\">No Matches</div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ndocument.getElementById(\"Loading\").style.display=\"none\";\ndocument.getElementById(\"NoMatches\").style.display=\"none\";\nvar searchResults = new SearchResults(\"searchResults\");\nsearchResults.Search();\n/* @license-end */\n--></script>\n</div>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/groups_7.js",
    "content": "var searchData=\n[\n  ['native_20access_772',['Native access',['../group__native.html',1,'']]]\n];\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/groups_8.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html><head><title></title>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<link rel=\"stylesheet\" type=\"text/css\" href=\"search.css\"/>\n<script type=\"text/javascript\" src=\"groups_8.js\"></script>\n<script type=\"text/javascript\" src=\"search.js\"></script>\n</head>\n<body class=\"SRPage\">\n<div id=\"SRIndex\">\n<div class=\"SRStatus\" id=\"Loading\">Loading...</div>\n<div id=\"SRResults\"></div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ncreateResults();\n/* @license-end */\n--></script>\n<div class=\"SRStatus\" id=\"Searching\">Searching...</div>\n<div class=\"SRStatus\" id=\"NoMatches\">No Matches</div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ndocument.getElementById(\"Loading\").style.display=\"none\";\ndocument.getElementById(\"NoMatches\").style.display=\"none\";\nvar searchResults = new SearchResults(\"searchResults\");\nsearchResults.Search();\n/* @license-end */\n--></script>\n</div>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/groups_8.js",
    "content": "var searchData=\n[\n  ['standard_20cursor_20shapes_773',['Standard cursor shapes',['../group__shapes.html',1,'']]]\n];\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/groups_9.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html><head><title></title>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<link rel=\"stylesheet\" type=\"text/css\" href=\"search.css\"/>\n<script type=\"text/javascript\" src=\"groups_9.js\"></script>\n<script type=\"text/javascript\" src=\"search.js\"></script>\n</head>\n<body class=\"SRPage\">\n<div id=\"SRIndex\">\n<div class=\"SRStatus\" id=\"Loading\">Loading...</div>\n<div id=\"SRResults\"></div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ncreateResults();\n/* @license-end */\n--></script>\n<div class=\"SRStatus\" id=\"Searching\">Searching...</div>\n<div class=\"SRStatus\" id=\"NoMatches\">No Matches</div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ndocument.getElementById(\"Loading\").style.display=\"none\";\ndocument.getElementById(\"NoMatches\").style.display=\"none\";\nvar searchResults = new SearchResults(\"searchResults\");\nsearchResults.Search();\n/* @license-end */\n--></script>\n</div>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/groups_9.js",
    "content": "var searchData=\n[\n  ['vulkan_20reference_774',['Vulkan reference',['../group__vulkan.html',1,'']]]\n];\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/groups_a.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html><head><title></title>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<link rel=\"stylesheet\" type=\"text/css\" href=\"search.css\"/>\n<script type=\"text/javascript\" src=\"groups_a.js\"></script>\n<script type=\"text/javascript\" src=\"search.js\"></script>\n</head>\n<body class=\"SRPage\">\n<div id=\"SRIndex\">\n<div class=\"SRStatus\" id=\"Loading\">Loading...</div>\n<div id=\"SRResults\"></div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ncreateResults();\n/* @license-end */\n--></script>\n<div class=\"SRStatus\" id=\"Searching\">Searching...</div>\n<div class=\"SRStatus\" id=\"NoMatches\">No Matches</div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ndocument.getElementById(\"Loading\").style.display=\"none\";\ndocument.getElementById(\"NoMatches\").style.display=\"none\";\nvar searchResults = new SearchResults(\"searchResults\");\nsearchResults.Search();\n/* @license-end */\n--></script>\n</div>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/groups_a.js",
    "content": "var searchData=\n[\n  ['window_20reference_775',['Window reference',['../group__window.html',1,'']]]\n];\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/nomatches.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html><head><title></title>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<link rel=\"stylesheet\" type=\"text/css\" href=\"search.css\"/>\n<script type=\"text/javascript\" src=\"search.js\"></script>\n</head>\n<body class=\"SRPage\">\n<div id=\"SRIndex\">\n<div class=\"SRStatus\" id=\"NoMatches\">No Matches</div>\n</div>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/pages_0.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html><head><title></title>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<link rel=\"stylesheet\" type=\"text/css\" href=\"search.css\"/>\n<script type=\"text/javascript\" src=\"pages_0.js\"></script>\n<script type=\"text/javascript\" src=\"search.js\"></script>\n</head>\n<body class=\"SRPage\">\n<div id=\"SRIndex\">\n<div class=\"SRStatus\" id=\"Loading\">Loading...</div>\n<div id=\"SRResults\"></div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ncreateResults();\n/* @license-end */\n--></script>\n<div class=\"SRStatus\" id=\"Searching\">Searching...</div>\n<div class=\"SRStatus\" id=\"NoMatches\">No Matches</div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ndocument.getElementById(\"Loading\").style.display=\"none\";\ndocument.getElementById(\"NoMatches\").style.display=\"none\";\nvar searchResults = new SearchResults(\"searchResults\");\nsearchResults.Search();\n/* @license-end */\n--></script>\n</div>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/pages_0.js",
    "content": "var searchData=\n[\n  ['bug_20list_776',['Bug List',['../bug.html',1,'']]],\n  ['building_20applications_777',['Building applications',['../build_guide.html',1,'']]]\n];\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/pages_1.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html><head><title></title>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<link rel=\"stylesheet\" type=\"text/css\" href=\"search.css\"/>\n<script type=\"text/javascript\" src=\"pages_1.js\"></script>\n<script type=\"text/javascript\" src=\"search.js\"></script>\n</head>\n<body class=\"SRPage\">\n<div id=\"SRIndex\">\n<div class=\"SRStatus\" id=\"Loading\">Loading...</div>\n<div id=\"SRResults\"></div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ncreateResults();\n/* @license-end */\n--></script>\n<div class=\"SRStatus\" id=\"Searching\">Searching...</div>\n<div class=\"SRStatus\" id=\"NoMatches\">No Matches</div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ndocument.getElementById(\"Loading\").style.display=\"none\";\ndocument.getElementById(\"NoMatches\").style.display=\"none\";\nvar searchResults = new SearchResults(\"searchResults\");\nsearchResults.Search();\n/* @license-end */\n--></script>\n</div>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/pages_1.js",
    "content": "var searchData=\n[\n  ['compiling_20glfw_778',['Compiling GLFW',['../compile_guide.html',1,'']]],\n  ['context_20guide_779',['Context guide',['../context_guide.html',1,'']]]\n];\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/pages_2.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html><head><title></title>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<link rel=\"stylesheet\" type=\"text/css\" href=\"search.css\"/>\n<script type=\"text/javascript\" src=\"pages_2.js\"></script>\n<script type=\"text/javascript\" src=\"search.js\"></script>\n</head>\n<body class=\"SRPage\">\n<div id=\"SRIndex\">\n<div class=\"SRStatus\" id=\"Loading\">Loading...</div>\n<div id=\"SRResults\"></div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ncreateResults();\n/* @license-end */\n--></script>\n<div class=\"SRStatus\" id=\"Searching\">Searching...</div>\n<div class=\"SRStatus\" id=\"NoMatches\">No Matches</div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ndocument.getElementById(\"Loading\").style.display=\"none\";\ndocument.getElementById(\"NoMatches\").style.display=\"none\";\nvar searchResults = new SearchResults(\"searchResults\");\nsearchResults.Search();\n/* @license-end */\n--></script>\n</div>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/pages_2.js",
    "content": "var searchData=\n[\n  ['deprecated_20list_780',['Deprecated List',['../deprecated.html',1,'']]]\n];\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/pages_3.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html><head><title></title>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<link rel=\"stylesheet\" type=\"text/css\" href=\"search.css\"/>\n<script type=\"text/javascript\" src=\"pages_3.js\"></script>\n<script type=\"text/javascript\" src=\"search.js\"></script>\n</head>\n<body class=\"SRPage\">\n<div id=\"SRIndex\">\n<div class=\"SRStatus\" id=\"Loading\">Loading...</div>\n<div id=\"SRResults\"></div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ncreateResults();\n/* @license-end */\n--></script>\n<div class=\"SRStatus\" id=\"Searching\">Searching...</div>\n<div class=\"SRStatus\" id=\"NoMatches\">No Matches</div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ndocument.getElementById(\"Loading\").style.display=\"none\";\ndocument.getElementById(\"NoMatches\").style.display=\"none\";\nvar searchResults = new SearchResults(\"searchResults\");\nsearchResults.Search();\n/* @license-end */\n--></script>\n</div>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/pages_3.js",
    "content": "var searchData=\n[\n  ['getting_20started_781',['Getting started',['../quick_guide.html',1,'']]]\n];\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/pages_4.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html><head><title></title>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<link rel=\"stylesheet\" type=\"text/css\" href=\"search.css\"/>\n<script type=\"text/javascript\" src=\"pages_4.js\"></script>\n<script type=\"text/javascript\" src=\"search.js\"></script>\n</head>\n<body class=\"SRPage\">\n<div id=\"SRIndex\">\n<div class=\"SRStatus\" id=\"Loading\">Loading...</div>\n<div id=\"SRResults\"></div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ncreateResults();\n/* @license-end */\n--></script>\n<div class=\"SRStatus\" id=\"Searching\">Searching...</div>\n<div class=\"SRStatus\" id=\"NoMatches\">No Matches</div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ndocument.getElementById(\"Loading\").style.display=\"none\";\ndocument.getElementById(\"NoMatches\").style.display=\"none\";\nvar searchResults = new SearchResults(\"searchResults\");\nsearchResults.Search();\n/* @license-end */\n--></script>\n</div>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/pages_4.js",
    "content": "var searchData=\n[\n  ['input_20guide_782',['Input guide',['../input_guide.html',1,'']]],\n  ['internal_20structure_783',['Internal structure',['../internals_guide.html',1,'']]],\n  ['introduction_20to_20the_20api_784',['Introduction to the API',['../intro_guide.html',1,'']]]\n];\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/pages_5.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html><head><title></title>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<link rel=\"stylesheet\" type=\"text/css\" href=\"search.css\"/>\n<script type=\"text/javascript\" src=\"pages_5.js\"></script>\n<script type=\"text/javascript\" src=\"search.js\"></script>\n</head>\n<body class=\"SRPage\">\n<div id=\"SRIndex\">\n<div class=\"SRStatus\" id=\"Loading\">Loading...</div>\n<div id=\"SRResults\"></div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ncreateResults();\n/* @license-end */\n--></script>\n<div class=\"SRStatus\" id=\"Searching\">Searching...</div>\n<div class=\"SRStatus\" id=\"NoMatches\">No Matches</div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ndocument.getElementById(\"Loading\").style.display=\"none\";\ndocument.getElementById(\"NoMatches\").style.display=\"none\";\nvar searchResults = new SearchResults(\"searchResults\");\nsearchResults.Search();\n/* @license-end */\n--></script>\n</div>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/pages_5.js",
    "content": "var searchData=\n[\n  ['monitor_20guide_785',['Monitor guide',['../monitor_guide.html',1,'']]],\n  ['moving_20from_20glfw_202_20to_203_786',['Moving from GLFW 2 to 3',['../moving_guide.html',1,'']]]\n];\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/pages_6.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html><head><title></title>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<link rel=\"stylesheet\" type=\"text/css\" href=\"search.css\"/>\n<script type=\"text/javascript\" src=\"pages_6.js\"></script>\n<script type=\"text/javascript\" src=\"search.js\"></script>\n</head>\n<body class=\"SRPage\">\n<div id=\"SRIndex\">\n<div class=\"SRStatus\" id=\"Loading\">Loading...</div>\n<div id=\"SRResults\"></div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ncreateResults();\n/* @license-end */\n--></script>\n<div class=\"SRStatus\" id=\"Searching\">Searching...</div>\n<div class=\"SRStatus\" id=\"NoMatches\">No Matches</div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ndocument.getElementById(\"Loading\").style.display=\"none\";\ndocument.getElementById(\"NoMatches\").style.display=\"none\";\nvar searchResults = new SearchResults(\"searchResults\");\nsearchResults.Search();\n/* @license-end */\n--></script>\n</div>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/pages_6.js",
    "content": "var searchData=\n[\n  ['notitle_787',['notitle',['../index.html',1,'']]]\n];\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/pages_7.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html><head><title></title>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<link rel=\"stylesheet\" type=\"text/css\" href=\"search.css\"/>\n<script type=\"text/javascript\" src=\"pages_7.js\"></script>\n<script type=\"text/javascript\" src=\"search.js\"></script>\n</head>\n<body class=\"SRPage\">\n<div id=\"SRIndex\">\n<div class=\"SRStatus\" id=\"Loading\">Loading...</div>\n<div id=\"SRResults\"></div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ncreateResults();\n/* @license-end */\n--></script>\n<div class=\"SRStatus\" id=\"Searching\">Searching...</div>\n<div class=\"SRStatus\" id=\"NoMatches\">No Matches</div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ndocument.getElementById(\"Loading\").style.display=\"none\";\ndocument.getElementById(\"NoMatches\").style.display=\"none\";\nvar searchResults = new SearchResults(\"searchResults\");\nsearchResults.Search();\n/* @license-end */\n--></script>\n</div>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/pages_7.js",
    "content": "var searchData=\n[\n  ['release_20notes_788',['Release notes',['../news.html',1,'']]]\n];\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/pages_8.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html><head><title></title>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<link rel=\"stylesheet\" type=\"text/css\" href=\"search.css\"/>\n<script type=\"text/javascript\" src=\"pages_8.js\"></script>\n<script type=\"text/javascript\" src=\"search.js\"></script>\n</head>\n<body class=\"SRPage\">\n<div id=\"SRIndex\">\n<div class=\"SRStatus\" id=\"Loading\">Loading...</div>\n<div id=\"SRResults\"></div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ncreateResults();\n/* @license-end */\n--></script>\n<div class=\"SRStatus\" id=\"Searching\">Searching...</div>\n<div class=\"SRStatus\" id=\"NoMatches\">No Matches</div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ndocument.getElementById(\"Loading\").style.display=\"none\";\ndocument.getElementById(\"NoMatches\").style.display=\"none\";\nvar searchResults = new SearchResults(\"searchResults\");\nsearchResults.Search();\n/* @license-end */\n--></script>\n</div>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/pages_8.js",
    "content": "var searchData=\n[\n  ['standards_20conformance_789',['Standards conformance',['../compat_guide.html',1,'']]]\n];\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/pages_9.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html><head><title></title>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<link rel=\"stylesheet\" type=\"text/css\" href=\"search.css\"/>\n<script type=\"text/javascript\" src=\"pages_9.js\"></script>\n<script type=\"text/javascript\" src=\"search.js\"></script>\n</head>\n<body class=\"SRPage\">\n<div id=\"SRIndex\">\n<div class=\"SRStatus\" id=\"Loading\">Loading...</div>\n<div id=\"SRResults\"></div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ncreateResults();\n/* @license-end */\n--></script>\n<div class=\"SRStatus\" id=\"Searching\">Searching...</div>\n<div class=\"SRStatus\" id=\"NoMatches\">No Matches</div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ndocument.getElementById(\"Loading\").style.display=\"none\";\ndocument.getElementById(\"NoMatches\").style.display=\"none\";\nvar searchResults = new SearchResults(\"searchResults\");\nsearchResults.Search();\n/* @license-end */\n--></script>\n</div>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/pages_9.js",
    "content": "var searchData=\n[\n  ['vulkan_20guide_790',['Vulkan guide',['../vulkan_guide.html',1,'']]]\n];\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/pages_a.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html><head><title></title>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<link rel=\"stylesheet\" type=\"text/css\" href=\"search.css\"/>\n<script type=\"text/javascript\" src=\"pages_a.js\"></script>\n<script type=\"text/javascript\" src=\"search.js\"></script>\n</head>\n<body class=\"SRPage\">\n<div id=\"SRIndex\">\n<div class=\"SRStatus\" id=\"Loading\">Loading...</div>\n<div id=\"SRResults\"></div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ncreateResults();\n/* @license-end */\n--></script>\n<div class=\"SRStatus\" id=\"Searching\">Searching...</div>\n<div class=\"SRStatus\" id=\"NoMatches\">No Matches</div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ndocument.getElementById(\"Loading\").style.display=\"none\";\ndocument.getElementById(\"NoMatches\").style.display=\"none\";\nvar searchResults = new SearchResults(\"searchResults\");\nsearchResults.Search();\n/* @license-end */\n--></script>\n</div>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/pages_a.js",
    "content": "var searchData=\n[\n  ['window_20guide_791',['Window guide',['../window_guide.html',1,'']]]\n];\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/search.css",
    "content": "/*---------------- Search Box */\n\n#FSearchBox {\n    float: left;\n}\n\n#MSearchBox {\n    white-space : nowrap;\n    float: none;\n    margin-top: 8px;\n    right: 0px;\n    width: 170px;\n    height: 24px;\n    z-index: 102;\n}\n\n#MSearchBox .left\n{\n    display:block;\n    position:absolute;\n    left:10px;\n    width:20px;\n    height:19px;\n    background:url('search_l.png') no-repeat;\n    background-position:right;\n}\n\n#MSearchSelect {\n    display:block;\n    position:absolute;\n    width:20px;\n    height:19px;\n}\n\n.left #MSearchSelect {\n    left:4px;\n}\n\n.right #MSearchSelect {\n    right:5px;\n}\n\n#MSearchField {\n    display:block;\n    position:absolute;\n    height:19px;\n    background:url('search_m.png') repeat-x;\n    border:none;\n    width:115px;\n    margin-left:20px;\n    padding-left:4px;\n    color: #909090;\n    outline: none;\n    font: 9pt Arial, Verdana, sans-serif;\n    -webkit-border-radius: 0px;\n}\n\n#FSearchBox #MSearchField {\n    margin-left:15px;\n}\n\n#MSearchBox .right {\n    display:block;\n    position:absolute;\n    right:10px;\n    top:8px;\n    width:20px;\n    height:19px;\n    background:url('search_r.png') no-repeat;\n    background-position:left;\n}\n\n#MSearchClose {\n    display: none;\n    position: absolute;\n    top: 4px;\n    background : none;\n    border: none;\n    margin: 0px 4px 0px 0px;\n    padding: 0px 0px;\n    outline: none;\n}\n\n.left #MSearchClose {\n    left: 6px;\n}\n\n.right #MSearchClose {\n    right: 2px;\n}\n\n.MSearchBoxActive #MSearchField {\n    color: #000000;\n}\n\n/*---------------- Search filter selection */\n\n#MSearchSelectWindow {\n    display: none;\n    position: absolute;\n    left: 0; top: 0;\n    border: 1px solid #90A5CE;\n    background-color: #F9FAFC;\n    z-index: 10001;\n    padding-top: 4px;\n    padding-bottom: 4px;\n    -moz-border-radius: 4px;\n    -webkit-border-top-left-radius: 4px;\n    -webkit-border-top-right-radius: 4px;\n    -webkit-border-bottom-left-radius: 4px;\n    -webkit-border-bottom-right-radius: 4px;\n    -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);\n}\n\n.SelectItem {\n    font: 8pt Arial, Verdana, sans-serif;\n    padding-left:  2px;\n    padding-right: 12px;\n    border: 0px;\n}\n\nspan.SelectionMark {\n    margin-right: 4px;\n    font-family: monospace;\n    outline-style: none;\n    text-decoration: none;\n}\n\na.SelectItem {\n    display: block;\n    outline-style: none;\n    color: #000000; \n    text-decoration: none;\n    padding-left:   6px;\n    padding-right: 12px;\n}\n\na.SelectItem:focus,\na.SelectItem:active {\n    color: #000000; \n    outline-style: none;\n    text-decoration: none;\n}\n\na.SelectItem:hover {\n    color: #FFFFFF;\n    background-color: #3D578C;\n    outline-style: none;\n    text-decoration: none;\n    cursor: pointer;\n    display: block;\n}\n\n/*---------------- Search results window */\n\niframe#MSearchResults {\n    width: 60ex;\n    height: 15em;\n}\n\n#MSearchResultsWindow {\n    display: none;\n    position: absolute;\n    left: 0; top: 0;\n    border: 1px solid #000;\n    background-color: #EEF1F7;\n    z-index:10000;\n}\n\n/* ----------------------------------- */\n\n\n#SRIndex {\n    clear:both; \n    padding-bottom: 15px;\n}\n\n.SREntry {\n    font-size: 10pt;\n    padding-left: 1ex;\n}\n\n.SRPage .SREntry {\n    font-size: 8pt;\n    padding: 1px 5px;\n}\n\nbody.SRPage {\n    margin: 5px 2px;\n}\n\n.SRChildren {\n    padding-left: 3ex; padding-bottom: .5em \n}\n\n.SRPage .SRChildren {\n    display: none;\n}\n\n.SRSymbol {\n    font-weight: bold; \n    color: #425E97;\n    font-family: Arial, Verdana, sans-serif;\n    text-decoration: none;\n    outline: none;\n}\n\na.SRScope {\n    display: block;\n    color: #425E97; \n    font-family: Arial, Verdana, sans-serif;\n    text-decoration: none;\n    outline: none;\n}\n\na.SRSymbol:focus, a.SRSymbol:active,\na.SRScope:focus, a.SRScope:active {\n    text-decoration: underline;\n}\n\nspan.SRScope {\n    padding-left: 4px;\n}\n\n.SRPage .SRStatus {\n    padding: 2px 5px;\n    font-size: 8pt;\n    font-style: italic;\n}\n\n.SRResult {\n    display: none;\n}\n\nDIV.searchresults {\n    margin-left: 10px;\n    margin-right: 10px;\n}\n\n/*---------------- External search page results */\n\n.searchresult {\n    background-color: #F0F3F8;\n}\n\n.pages b {\n   color: white;\n   padding: 5px 5px 3px 5px;\n   background-image: url(\"../tab_a.png\");\n   background-repeat: repeat-x;\n   text-shadow: 0 1px 1px #000000;\n}\n\n.pages {\n    line-height: 17px;\n    margin-left: 4px;\n    text-decoration: none;\n}\n\n.hl {\n    font-weight: bold;\n}\n\n#searchresults {\n    margin-bottom: 20px;\n}\n\n.searchpages {\n    margin-top: 10px;\n}\n\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/search.js",
    "content": "/*\n @licstart  The following is the entire license notice for the\n JavaScript code in this file.\n\n Copyright (C) 1997-2017 by Dimitri van Heesch\n\n This program is free software; you can redistribute it and/or modify\n it under the terms of the GNU General Public License as published by\n the Free Software Foundation; either version 2 of the License, or\n (at your option) any later version.\n\n This program is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n GNU General Public License for more details.\n\n You should have received a copy of the GNU General Public License along\n with this program; if not, write to the Free Software Foundation, Inc.,\n 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.\n\n @licend  The above is the entire license notice\n for the JavaScript code in this file\n */\nfunction convertToId(search)\n{\n  var result = '';\n  for (i=0;i<search.length;i++)\n  {\n    var c = search.charAt(i);\n    var cn = c.charCodeAt(0);\n    if (c.match(/[a-z0-9\\u0080-\\uFFFF]/))\n    {\n      result+=c;\n    }\n    else if (cn<16)\n    {\n      result+=\"_0\"+cn.toString(16);\n    }\n    else\n    {\n      result+=\"_\"+cn.toString(16);\n    }\n  }\n  return result;\n}\n\nfunction getXPos(item)\n{\n  var x = 0;\n  if (item.offsetWidth)\n  {\n    while (item && item!=document.body)\n    {\n      x   += item.offsetLeft;\n      item = item.offsetParent;\n    }\n  }\n  return x;\n}\n\nfunction getYPos(item)\n{\n  var y = 0;\n  if (item.offsetWidth)\n  {\n     while (item && item!=document.body)\n     {\n       y   += item.offsetTop;\n       item = item.offsetParent;\n     }\n  }\n  return y;\n}\n\n/* A class handling everything associated with the search panel.\n\n   Parameters:\n   name - The name of the global variable that will be\n          storing this instance.  Is needed to be able to set timeouts.\n   resultPath - path to use for external files\n*/\nfunction SearchBox(name, resultsPath, inFrame, label)\n{\n  if (!name || !resultsPath) {  alert(\"Missing parameters to SearchBox.\"); }\n\n  // ---------- Instance variables\n  this.name                  = name;\n  this.resultsPath           = resultsPath;\n  this.keyTimeout            = 0;\n  this.keyTimeoutLength      = 500;\n  this.closeSelectionTimeout = 300;\n  this.lastSearchValue       = \"\";\n  this.lastResultsPage       = \"\";\n  this.hideTimeout           = 0;\n  this.searchIndex           = 0;\n  this.searchActive          = false;\n  this.insideFrame           = inFrame;\n  this.searchLabel           = label;\n\n  // ----------- DOM Elements\n\n  this.DOMSearchField = function()\n  {  return document.getElementById(\"MSearchField\");  }\n\n  this.DOMSearchSelect = function()\n  {  return document.getElementById(\"MSearchSelect\");  }\n\n  this.DOMSearchSelectWindow = function()\n  {  return document.getElementById(\"MSearchSelectWindow\");  }\n\n  this.DOMPopupSearchResults = function()\n  {  return document.getElementById(\"MSearchResults\");  }\n\n  this.DOMPopupSearchResultsWindow = function()\n  {  return document.getElementById(\"MSearchResultsWindow\");  }\n\n  this.DOMSearchClose = function()\n  {  return document.getElementById(\"MSearchClose\"); }\n\n  this.DOMSearchBox = function()\n  {  return document.getElementById(\"MSearchBox\");  }\n\n  // ------------ Event Handlers\n\n  // Called when focus is added or removed from the search field.\n  this.OnSearchFieldFocus = function(isActive)\n  {\n    this.Activate(isActive);\n  }\n\n  this.OnSearchSelectShow = function()\n  {\n    var searchSelectWindow = this.DOMSearchSelectWindow();\n    var searchField        = this.DOMSearchSelect();\n\n    if (this.insideFrame)\n    {\n      var left = getXPos(searchField);\n      var top  = getYPos(searchField);\n      left += searchField.offsetWidth + 6;\n      top += searchField.offsetHeight;\n\n      // show search selection popup\n      searchSelectWindow.style.display='block';\n      left -= searchSelectWindow.offsetWidth;\n      searchSelectWindow.style.left =  left + 'px';\n      searchSelectWindow.style.top  =  top  + 'px';\n    }\n    else\n    {\n      var left = getXPos(searchField);\n      var top  = getYPos(searchField);\n      top += searchField.offsetHeight;\n\n      // show search selection popup\n      searchSelectWindow.style.display='block';\n      searchSelectWindow.style.left =  left + 'px';\n      searchSelectWindow.style.top  =  top  + 'px';\n    }\n\n    // stop selection hide timer\n    if (this.hideTimeout)\n    {\n      clearTimeout(this.hideTimeout);\n      this.hideTimeout=0;\n    }\n    return false; // to avoid \"image drag\" default event\n  }\n\n  this.OnSearchSelectHide = function()\n  {\n    this.hideTimeout = setTimeout(this.name +\".CloseSelectionWindow()\",\n                                  this.closeSelectionTimeout);\n  }\n\n  // Called when the content of the search field is changed.\n  this.OnSearchFieldChange = function(evt)\n  {\n    if (this.keyTimeout) // kill running timer\n    {\n      clearTimeout(this.keyTimeout);\n      this.keyTimeout = 0;\n    }\n\n    var e  = (evt) ? evt : window.event; // for IE\n    if (e.keyCode==40 || e.keyCode==13)\n    {\n      if (e.shiftKey==1)\n      {\n        this.OnSearchSelectShow();\n        var win=this.DOMSearchSelectWindow();\n        for (i=0;i<win.childNodes.length;i++)\n        {\n          var child = win.childNodes[i]; // get span within a\n          if (child.className=='SelectItem')\n          {\n            child.focus();\n            return;\n          }\n        }\n        return;\n      }\n      else if (window.frames.MSearchResults.searchResults)\n      {\n        var elem = window.frames.MSearchResults.searchResults.NavNext(0);\n        if (elem) elem.focus();\n      }\n    }\n    else if (e.keyCode==27) // Escape out of the search field\n    {\n      this.DOMSearchField().blur();\n      this.DOMPopupSearchResultsWindow().style.display = 'none';\n      this.DOMSearchClose().style.display = 'none';\n      this.lastSearchValue = '';\n      this.Activate(false);\n      return;\n    }\n\n    // strip whitespaces\n    var searchValue = this.DOMSearchField().value.replace(/ +/g, \"\");\n\n    if (searchValue != this.lastSearchValue) // search value has changed\n    {\n      if (searchValue != \"\") // non-empty search\n      {\n        // set timer for search update\n        this.keyTimeout = setTimeout(this.name + '.Search()',\n                                     this.keyTimeoutLength);\n      }\n      else // empty search field\n      {\n        this.DOMPopupSearchResultsWindow().style.display = 'none';\n        this.DOMSearchClose().style.display = 'none';\n        this.lastSearchValue = '';\n      }\n    }\n  }\n\n  this.SelectItemCount = function(id)\n  {\n    var count=0;\n    var win=this.DOMSearchSelectWindow();\n    for (i=0;i<win.childNodes.length;i++)\n    {\n      var child = win.childNodes[i]; // get span within a\n      if (child.className=='SelectItem')\n      {\n        count++;\n      }\n    }\n    return count;\n  }\n\n  this.SelectItemSet = function(id)\n  {\n    var i,j=0;\n    var win=this.DOMSearchSelectWindow();\n    for (i=0;i<win.childNodes.length;i++)\n    {\n      var child = win.childNodes[i]; // get span within a\n      if (child.className=='SelectItem')\n      {\n        var node = child.firstChild;\n        if (j==id)\n        {\n          node.innerHTML='&#8226;';\n        }\n        else\n        {\n          node.innerHTML='&#160;';\n        }\n        j++;\n      }\n    }\n  }\n\n  // Called when an search filter selection is made.\n  // set item with index id as the active item\n  this.OnSelectItem = function(id)\n  {\n    this.searchIndex = id;\n    this.SelectItemSet(id);\n    var searchValue = this.DOMSearchField().value.replace(/ +/g, \"\");\n    if (searchValue!=\"\" && this.searchActive) // something was found -> do a search\n    {\n      this.Search();\n    }\n  }\n\n  this.OnSearchSelectKey = function(evt)\n  {\n    var e = (evt) ? evt : window.event; // for IE\n    if (e.keyCode==40 && this.searchIndex<this.SelectItemCount()) // Down\n    {\n      this.searchIndex++;\n      this.OnSelectItem(this.searchIndex);\n    }\n    else if (e.keyCode==38 && this.searchIndex>0) // Up\n    {\n      this.searchIndex--;\n      this.OnSelectItem(this.searchIndex);\n    }\n    else if (e.keyCode==13 || e.keyCode==27)\n    {\n      this.OnSelectItem(this.searchIndex);\n      this.CloseSelectionWindow();\n      this.DOMSearchField().focus();\n    }\n    return false;\n  }\n\n  // --------- Actions\n\n  // Closes the results window.\n  this.CloseResultsWindow = function()\n  {\n    this.DOMPopupSearchResultsWindow().style.display = 'none';\n    this.DOMSearchClose().style.display = 'none';\n    this.Activate(false);\n  }\n\n  this.CloseSelectionWindow = function()\n  {\n    this.DOMSearchSelectWindow().style.display = 'none';\n  }\n\n  // Performs a search.\n  this.Search = function()\n  {\n    this.keyTimeout = 0;\n\n    // strip leading whitespace\n    var searchValue = this.DOMSearchField().value.replace(/^ +/, \"\");\n\n    var code = searchValue.toLowerCase().charCodeAt(0);\n    var idxChar = searchValue.substr(0, 1).toLowerCase();\n    if ( 0xD800 <= code && code <= 0xDBFF && searchValue > 1) // surrogate pair\n    {\n      idxChar = searchValue.substr(0, 2);\n    }\n\n    var resultsPage;\n    var resultsPageWithSearch;\n    var hasResultsPage;\n\n    var idx = indexSectionsWithContent[this.searchIndex].indexOf(idxChar);\n    if (idx!=-1)\n    {\n       var hexCode=idx.toString(16);\n       resultsPage = this.resultsPath + '/' + indexSectionNames[this.searchIndex] + '_' + hexCode + '.html';\n       resultsPageWithSearch = resultsPage+'?'+escape(searchValue);\n       hasResultsPage = true;\n    }\n    else // nothing available for this search term\n    {\n       resultsPage = this.resultsPath + '/nomatches.html';\n       resultsPageWithSearch = resultsPage;\n       hasResultsPage = false;\n    }\n\n    window.frames.MSearchResults.location = resultsPageWithSearch;\n    var domPopupSearchResultsWindow = this.DOMPopupSearchResultsWindow();\n\n    if (domPopupSearchResultsWindow.style.display!='block')\n    {\n       var domSearchBox = this.DOMSearchBox();\n       this.DOMSearchClose().style.display = 'inline';\n       if (this.insideFrame)\n       {\n         var domPopupSearchResults = this.DOMPopupSearchResults();\n         domPopupSearchResultsWindow.style.position = 'relative';\n         domPopupSearchResultsWindow.style.display  = 'block';\n         var width = document.body.clientWidth - 8; // the -8 is for IE :-(\n         domPopupSearchResultsWindow.style.width    = width + 'px';\n         domPopupSearchResults.style.width          = width + 'px';\n       }\n       else\n       {\n         var domPopupSearchResults = this.DOMPopupSearchResults();\n         var left = getXPos(domSearchBox) + 150; // domSearchBox.offsetWidth;\n         var top  = getYPos(domSearchBox) + 20;  // domSearchBox.offsetHeight + 1;\n         domPopupSearchResultsWindow.style.display = 'block';\n         left -= domPopupSearchResults.offsetWidth;\n         domPopupSearchResultsWindow.style.top     = top  + 'px';\n         domPopupSearchResultsWindow.style.left    = left + 'px';\n       }\n    }\n\n    this.lastSearchValue = searchValue;\n    this.lastResultsPage = resultsPage;\n  }\n\n  // -------- Activation Functions\n\n  // Activates or deactivates the search panel, resetting things to\n  // their default values if necessary.\n  this.Activate = function(isActive)\n  {\n    if (isActive || // open it\n        this.DOMPopupSearchResultsWindow().style.display == 'block'\n       )\n    {\n      this.DOMSearchBox().className = 'MSearchBoxActive';\n\n      var searchField = this.DOMSearchField();\n\n      if (searchField.value == this.searchLabel) // clear \"Search\" term upon entry\n      {\n        searchField.value = '';\n        this.searchActive = true;\n      }\n    }\n    else if (!isActive) // directly remove the panel\n    {\n      this.DOMSearchBox().className = 'MSearchBoxInactive';\n      this.DOMSearchField().value   = this.searchLabel;\n      this.searchActive             = false;\n      this.lastSearchValue          = ''\n      this.lastResultsPage          = '';\n    }\n  }\n}\n\n// -----------------------------------------------------------------------\n\n// The class that handles everything on the search results page.\nfunction SearchResults(name)\n{\n    // The number of matches from the last run of <Search()>.\n    this.lastMatchCount = 0;\n    this.lastKey = 0;\n    this.repeatOn = false;\n\n    // Toggles the visibility of the passed element ID.\n    this.FindChildElement = function(id)\n    {\n      var parentElement = document.getElementById(id);\n      var element = parentElement.firstChild;\n\n      while (element && element!=parentElement)\n      {\n        if (element.nodeName == 'DIV' && element.className == 'SRChildren')\n        {\n          return element;\n        }\n\n        if (element.nodeName == 'DIV' && element.hasChildNodes())\n        {\n           element = element.firstChild;\n        }\n        else if (element.nextSibling)\n        {\n           element = element.nextSibling;\n        }\n        else\n        {\n          do\n          {\n            element = element.parentNode;\n          }\n          while (element && element!=parentElement && !element.nextSibling);\n\n          if (element && element!=parentElement)\n          {\n            element = element.nextSibling;\n          }\n        }\n      }\n    }\n\n    this.Toggle = function(id)\n    {\n      var element = this.FindChildElement(id);\n      if (element)\n      {\n        if (element.style.display == 'block')\n        {\n          element.style.display = 'none';\n        }\n        else\n        {\n          element.style.display = 'block';\n        }\n      }\n    }\n\n    // Searches for the passed string.  If there is no parameter,\n    // it takes it from the URL query.\n    //\n    // Always returns true, since other documents may try to call it\n    // and that may or may not be possible.\n    this.Search = function(search)\n    {\n      if (!search) // get search word from URL\n      {\n        search = window.location.search;\n        search = search.substring(1);  // Remove the leading '?'\n        search = unescape(search);\n      }\n\n      search = search.replace(/^ +/, \"\"); // strip leading spaces\n      search = search.replace(/ +$/, \"\"); // strip trailing spaces\n      search = search.toLowerCase();\n      search = convertToId(search);\n\n      var resultRows = document.getElementsByTagName(\"div\");\n      var matches = 0;\n\n      var i = 0;\n      while (i < resultRows.length)\n      {\n        var row = resultRows.item(i);\n        if (row.className == \"SRResult\")\n        {\n          var rowMatchName = row.id.toLowerCase();\n          rowMatchName = rowMatchName.replace(/^sr\\d*_/, ''); // strip 'sr123_'\n\n          if (search.length<=rowMatchName.length &&\n             rowMatchName.substr(0, search.length)==search)\n          {\n            row.style.display = 'block';\n            matches++;\n          }\n          else\n          {\n            row.style.display = 'none';\n          }\n        }\n        i++;\n      }\n      document.getElementById(\"Searching\").style.display='none';\n      if (matches == 0) // no results\n      {\n        document.getElementById(\"NoMatches\").style.display='block';\n      }\n      else // at least one result\n      {\n        document.getElementById(\"NoMatches\").style.display='none';\n      }\n      this.lastMatchCount = matches;\n      return true;\n    }\n\n    // return the first item with index index or higher that is visible\n    this.NavNext = function(index)\n    {\n      var focusItem;\n      while (1)\n      {\n        var focusName = 'Item'+index;\n        focusItem = document.getElementById(focusName);\n        if (focusItem && focusItem.parentNode.parentNode.style.display=='block')\n        {\n          break;\n        }\n        else if (!focusItem) // last element\n        {\n          break;\n        }\n        focusItem=null;\n        index++;\n      }\n      return focusItem;\n    }\n\n    this.NavPrev = function(index)\n    {\n      var focusItem;\n      while (1)\n      {\n        var focusName = 'Item'+index;\n        focusItem = document.getElementById(focusName);\n        if (focusItem && focusItem.parentNode.parentNode.style.display=='block')\n        {\n          break;\n        }\n        else if (!focusItem) // last element\n        {\n          break;\n        }\n        focusItem=null;\n        index--;\n      }\n      return focusItem;\n    }\n\n    this.ProcessKeys = function(e)\n    {\n      if (e.type == \"keydown\")\n      {\n        this.repeatOn = false;\n        this.lastKey = e.keyCode;\n      }\n      else if (e.type == \"keypress\")\n      {\n        if (!this.repeatOn)\n        {\n          if (this.lastKey) this.repeatOn = true;\n          return false; // ignore first keypress after keydown\n        }\n      }\n      else if (e.type == \"keyup\")\n      {\n        this.lastKey = 0;\n        this.repeatOn = false;\n      }\n      return this.lastKey!=0;\n    }\n\n    this.Nav = function(evt,itemIndex)\n    {\n      var e  = (evt) ? evt : window.event; // for IE\n      if (e.keyCode==13) return true;\n      if (!this.ProcessKeys(e)) return false;\n\n      if (this.lastKey==38) // Up\n      {\n        var newIndex = itemIndex-1;\n        var focusItem = this.NavPrev(newIndex);\n        if (focusItem)\n        {\n          var child = this.FindChildElement(focusItem.parentNode.parentNode.id);\n          if (child && child.style.display == 'block') // children visible\n          {\n            var n=0;\n            var tmpElem;\n            while (1) // search for last child\n            {\n              tmpElem = document.getElementById('Item'+newIndex+'_c'+n);\n              if (tmpElem)\n              {\n                focusItem = tmpElem;\n              }\n              else // found it!\n              {\n                break;\n              }\n              n++;\n            }\n          }\n        }\n        if (focusItem)\n        {\n          focusItem.focus();\n        }\n        else // return focus to search field\n        {\n           parent.document.getElementById(\"MSearchField\").focus();\n        }\n      }\n      else if (this.lastKey==40) // Down\n      {\n        var newIndex = itemIndex+1;\n        var focusItem;\n        var item = document.getElementById('Item'+itemIndex);\n        var elem = this.FindChildElement(item.parentNode.parentNode.id);\n        if (elem && elem.style.display == 'block') // children visible\n        {\n          focusItem = document.getElementById('Item'+itemIndex+'_c0');\n        }\n        if (!focusItem) focusItem = this.NavNext(newIndex);\n        if (focusItem)  focusItem.focus();\n      }\n      else if (this.lastKey==39) // Right\n      {\n        var item = document.getElementById('Item'+itemIndex);\n        var elem = this.FindChildElement(item.parentNode.parentNode.id);\n        if (elem) elem.style.display = 'block';\n      }\n      else if (this.lastKey==37) // Left\n      {\n        var item = document.getElementById('Item'+itemIndex);\n        var elem = this.FindChildElement(item.parentNode.parentNode.id);\n        if (elem) elem.style.display = 'none';\n      }\n      else if (this.lastKey==27) // Escape\n      {\n        parent.searchBox.CloseResultsWindow();\n        parent.document.getElementById(\"MSearchField\").focus();\n      }\n      else if (this.lastKey==13) // Enter\n      {\n        return true;\n      }\n      return false;\n    }\n\n    this.NavChild = function(evt,itemIndex,childIndex)\n    {\n      var e  = (evt) ? evt : window.event; // for IE\n      if (e.keyCode==13) return true;\n      if (!this.ProcessKeys(e)) return false;\n\n      if (this.lastKey==38) // Up\n      {\n        if (childIndex>0)\n        {\n          var newIndex = childIndex-1;\n          document.getElementById('Item'+itemIndex+'_c'+newIndex).focus();\n        }\n        else // already at first child, jump to parent\n        {\n          document.getElementById('Item'+itemIndex).focus();\n        }\n      }\n      else if (this.lastKey==40) // Down\n      {\n        var newIndex = childIndex+1;\n        var elem = document.getElementById('Item'+itemIndex+'_c'+newIndex);\n        if (!elem) // last child, jump to parent next parent\n        {\n          elem = this.NavNext(itemIndex+1);\n        }\n        if (elem)\n        {\n          elem.focus();\n        }\n      }\n      else if (this.lastKey==27) // Escape\n      {\n        parent.searchBox.CloseResultsWindow();\n        parent.document.getElementById(\"MSearchField\").focus();\n      }\n      else if (this.lastKey==13) // Enter\n      {\n        return true;\n      }\n      return false;\n    }\n}\n\nfunction setKeyActions(elem,action)\n{\n  elem.setAttribute('onkeydown',action);\n  elem.setAttribute('onkeypress',action);\n  elem.setAttribute('onkeyup',action);\n}\n\nfunction setClassAttr(elem,attr)\n{\n  elem.setAttribute('class',attr);\n  elem.setAttribute('className',attr);\n}\n\nfunction createResults()\n{\n  var results = document.getElementById(\"SRResults\");\n  for (var e=0; e<searchData.length; e++)\n  {\n    var id = searchData[e][0];\n    var srResult = document.createElement('div');\n    srResult.setAttribute('id','SR_'+id);\n    setClassAttr(srResult,'SRResult');\n    var srEntry = document.createElement('div');\n    setClassAttr(srEntry,'SREntry');\n    var srLink = document.createElement('a');\n    srLink.setAttribute('id','Item'+e);\n    setKeyActions(srLink,'return searchResults.Nav(event,'+e+')');\n    setClassAttr(srLink,'SRSymbol');\n    srLink.innerHTML = searchData[e][1][0];\n    srEntry.appendChild(srLink);\n    if (searchData[e][1].length==2) // single result\n    {\n      srLink.setAttribute('href',searchData[e][1][1][0]);\n      if (searchData[e][1][1][1])\n      {\n       srLink.setAttribute('target','_parent');\n      }\n      var srScope = document.createElement('span');\n      setClassAttr(srScope,'SRScope');\n      srScope.innerHTML = searchData[e][1][1][2];\n      srEntry.appendChild(srScope);\n    }\n    else // multiple results\n    {\n      srLink.setAttribute('href','javascript:searchResults.Toggle(\"SR_'+id+'\")');\n      var srChildren = document.createElement('div');\n      setClassAttr(srChildren,'SRChildren');\n      for (var c=0; c<searchData[e][1].length-1; c++)\n      {\n        var srChild = document.createElement('a');\n        srChild.setAttribute('id','Item'+e+'_c'+c);\n        setKeyActions(srChild,'return searchResults.NavChild(event,'+e+','+c+')');\n        setClassAttr(srChild,'SRScope');\n        srChild.setAttribute('href',searchData[e][1][c+1][0]);\n        if (searchData[e][1][c+1][1])\n        {\n         srChild.setAttribute('target','_parent');\n        }\n        srChild.innerHTML = searchData[e][1][c+1][2];\n        srChildren.appendChild(srChild);\n      }\n      srEntry.appendChild(srChildren);\n    }\n    srResult.appendChild(srEntry);\n    results.appendChild(srResult);\n  }\n}\n\nfunction init_search()\n{\n  var results = document.getElementById(\"MSearchSelectWindow\");\n  for (var key in indexSectionLabels)\n  {\n    var link = document.createElement('a');\n    link.setAttribute('class','SelectItem');\n    link.setAttribute('onclick','searchBox.OnSelectItem('+key+')');\n    link.href='javascript:void(0)';\n    link.innerHTML='<span class=\"SelectionMark\">&#160;</span>'+indexSectionLabels[key];\n    results.appendChild(link);\n  }\n  searchBox.OnSelectItem(0);\n}\n/* @license-end */\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/searchdata.js",
    "content": "var indexSectionsWithContent =\n{\n  0: \"abcdeghijkmnpqrsvw\",\n  1: \"g\",\n  2: \"bcgimnqvw\",\n  3: \"g\",\n  4: \"abghprsw\",\n  5: \"g\",\n  6: \"g\",\n  7: \"cegijkmnsvw\",\n  8: \"bcdgimnrsvw\"\n};\n\nvar indexSectionNames =\n{\n  0: \"all\",\n  1: \"classes\",\n  2: \"files\",\n  3: \"functions\",\n  4: \"variables\",\n  5: \"typedefs\",\n  6: \"defines\",\n  7: \"groups\",\n  8: \"pages\"\n};\n\nvar indexSectionLabels =\n{\n  0: \"All\",\n  1: \"Data Structures\",\n  2: \"Files\",\n  3: \"Functions\",\n  4: \"Variables\",\n  5: \"Typedefs\",\n  6: \"Macros\",\n  7: \"Modules\",\n  8: \"Pages\"\n};\n\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/typedefs_0.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html><head><title></title>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<link rel=\"stylesheet\" type=\"text/css\" href=\"search.css\"/>\n<script type=\"text/javascript\" src=\"typedefs_0.js\"></script>\n<script type=\"text/javascript\" src=\"search.js\"></script>\n</head>\n<body class=\"SRPage\">\n<div id=\"SRIndex\">\n<div class=\"SRStatus\" id=\"Loading\">Loading...</div>\n<div id=\"SRResults\"></div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ncreateResults();\n/* @license-end */\n--></script>\n<div class=\"SRStatus\" id=\"Searching\">Searching...</div>\n<div class=\"SRStatus\" id=\"NoMatches\">No Matches</div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ndocument.getElementById(\"Loading\").style.display=\"none\";\ndocument.getElementById(\"NoMatches\").style.display=\"none\";\nvar searchResults = new SearchResults(\"searchResults\");\nsearchResults.Search();\n/* @license-end */\n--></script>\n</div>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/typedefs_0.js",
    "content": "var searchData=\n[\n  ['glfwcharfun_703',['GLFWcharfun',['../group__input.html#gabf24451c7ceb1952bc02b17a0d5c3e5f',1,'glfw3.h']]],\n  ['glfwcharmodsfun_704',['GLFWcharmodsfun',['../group__input.html#gae36fb6897d2b7df9b128900c8ce9c507',1,'glfw3.h']]],\n  ['glfwcursor_705',['GLFWcursor',['../group__input.html#ga89261ae18c75e863aaf2656ecdd238f4',1,'glfw3.h']]],\n  ['glfwcursorenterfun_706',['GLFWcursorenterfun',['../group__input.html#ga51ab436c41eeaed6db5a0c9403b1c840',1,'glfw3.h']]],\n  ['glfwcursorposfun_707',['GLFWcursorposfun',['../group__input.html#ga4cfad918fa836f09541e7b9acd36686c',1,'glfw3.h']]],\n  ['glfwdropfun_708',['GLFWdropfun',['../group__input.html#gafd0493dc32cd5ca5810e6148c0c026ea',1,'glfw3.h']]],\n  ['glfwerrorfun_709',['GLFWerrorfun',['../group__init.html#ga6b8a2639706d5c409fc1287e8f55e928',1,'glfw3.h']]],\n  ['glfwframebuffersizefun_710',['GLFWframebuffersizefun',['../group__window.html#ga3e218ef9ff826129c55a7d5f6971a285',1,'glfw3.h']]],\n  ['glfwgamepadstate_711',['GLFWgamepadstate',['../group__input.html#ga0b86867abb735af3b959f61c44b1d029',1,'glfw3.h']]],\n  ['glfwgammaramp_712',['GLFWgammaramp',['../group__monitor.html#gaec0bd37af673be8813592849f13e02f0',1,'glfw3.h']]],\n  ['glfwglproc_713',['GLFWglproc',['../group__context.html#ga3d47c2d2fbe0be9c505d0e04e91a133c',1,'glfw3.h']]],\n  ['glfwimage_714',['GLFWimage',['../group__window.html#gac81c32f4437de7b3aa58ab62c3d9e5b1',1,'glfw3.h']]],\n  ['glfwjoystickfun_715',['GLFWjoystickfun',['../group__input.html#gaa67aa597e974298c748bfe4fb17d406d',1,'glfw3.h']]],\n  ['glfwkeyfun_716',['GLFWkeyfun',['../group__input.html#ga0192a232a41e4e82948217c8ba94fdfd',1,'glfw3.h']]],\n  ['glfwmonitor_717',['GLFWmonitor',['../group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3',1,'glfw3.h']]],\n  ['glfwmonitorfun_718',['GLFWmonitorfun',['../group__monitor.html#ga8a7ee579a66720f24d656526f3e44c63',1,'glfw3.h']]],\n  ['glfwmousebuttonfun_719',['GLFWmousebuttonfun',['../group__input.html#ga39893a4a7e7c3239c98d29c9e084350c',1,'glfw3.h']]],\n  ['glfwscrollfun_720',['GLFWscrollfun',['../group__input.html#ga4687e2199c60a18a8dd1da532e6d75c9',1,'glfw3.h']]],\n  ['glfwvidmode_721',['GLFWvidmode',['../group__monitor.html#gae48aadf4ea0967e6605c8f58fa5daccb',1,'glfw3.h']]],\n  ['glfwvkproc_722',['GLFWvkproc',['../group__vulkan.html#ga70c01918dc9d233a4fbe0681a43018af',1,'glfw3.h']]],\n  ['glfwwindow_723',['GLFWwindow',['../group__window.html#ga3c96d80d363e67d13a41b5d1821f3242',1,'glfw3.h']]],\n  ['glfwwindowclosefun_724',['GLFWwindowclosefun',['../group__window.html#ga93e7c2555bd837f4ed8b20f76cada72e',1,'glfw3.h']]],\n  ['glfwwindowcontentscalefun_725',['GLFWwindowcontentscalefun',['../group__window.html#ga1da46b65eafcc1a7ff0adb8f4a7b72fd',1,'glfw3.h']]],\n  ['glfwwindowfocusfun_726',['GLFWwindowfocusfun',['../group__window.html#ga58be2061828dd35080bb438405d3a7e2',1,'glfw3.h']]],\n  ['glfwwindowiconifyfun_727',['GLFWwindowiconifyfun',['../group__window.html#gad2d4e4c3d28b1242e742e8268b9528af',1,'glfw3.h']]],\n  ['glfwwindowmaximizefun_728',['GLFWwindowmaximizefun',['../group__window.html#ga7269a3d1cb100c0081f95fc09afa4949',1,'glfw3.h']]],\n  ['glfwwindowposfun_729',['GLFWwindowposfun',['../group__window.html#gafd8db81fdb0e850549dc6bace5ed697a',1,'glfw3.h']]],\n  ['glfwwindowrefreshfun_730',['GLFWwindowrefreshfun',['../group__window.html#ga7a56f9e0227e2cd9470d80d919032e08',1,'glfw3.h']]],\n  ['glfwwindowsizefun_731',['GLFWwindowsizefun',['../group__window.html#gae49ee6ebc03fa2da024b89943a331355',1,'glfw3.h']]]\n];\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/variables_0.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html><head><title></title>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<link rel=\"stylesheet\" type=\"text/css\" href=\"search.css\"/>\n<script type=\"text/javascript\" src=\"variables_0.js\"></script>\n<script type=\"text/javascript\" src=\"search.js\"></script>\n</head>\n<body class=\"SRPage\">\n<div id=\"SRIndex\">\n<div class=\"SRStatus\" id=\"Loading\">Loading...</div>\n<div id=\"SRResults\"></div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ncreateResults();\n/* @license-end */\n--></script>\n<div class=\"SRStatus\" id=\"Searching\">Searching...</div>\n<div class=\"SRStatus\" id=\"NoMatches\">No Matches</div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ndocument.getElementById(\"Loading\").style.display=\"none\";\ndocument.getElementById(\"NoMatches\").style.display=\"none\";\nvar searchResults = new SearchResults(\"searchResults\");\nsearchResults.Search();\n/* @license-end */\n--></script>\n</div>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/variables_0.js",
    "content": "var searchData=\n[\n  ['axes_690',['axes',['../structGLFWgamepadstate.html#a8b2c8939b1d31458de5359998375c189',1,'GLFWgamepadstate']]]\n];\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/variables_1.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html><head><title></title>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<link rel=\"stylesheet\" type=\"text/css\" href=\"search.css\"/>\n<script type=\"text/javascript\" src=\"variables_1.js\"></script>\n<script type=\"text/javascript\" src=\"search.js\"></script>\n</head>\n<body class=\"SRPage\">\n<div id=\"SRIndex\">\n<div class=\"SRStatus\" id=\"Loading\">Loading...</div>\n<div id=\"SRResults\"></div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ncreateResults();\n/* @license-end */\n--></script>\n<div class=\"SRStatus\" id=\"Searching\">Searching...</div>\n<div class=\"SRStatus\" id=\"NoMatches\">No Matches</div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ndocument.getElementById(\"Loading\").style.display=\"none\";\ndocument.getElementById(\"NoMatches\").style.display=\"none\";\nvar searchResults = new SearchResults(\"searchResults\");\nsearchResults.Search();\n/* @license-end */\n--></script>\n</div>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/variables_1.js",
    "content": "var searchData=\n[\n  ['blue_691',['blue',['../structGLFWgammaramp.html#acf0c836d0efe29c392fe8d1a1042744b',1,'GLFWgammaramp']]],\n  ['bluebits_692',['blueBits',['../structGLFWvidmode.html#af310977f58d2e3b188175b6e3d314047',1,'GLFWvidmode']]],\n  ['buttons_693',['buttons',['../structGLFWgamepadstate.html#a27e9896b51c65df15fba2c7139bfdb9a',1,'GLFWgamepadstate']]]\n];\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/variables_2.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html><head><title></title>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<link rel=\"stylesheet\" type=\"text/css\" href=\"search.css\"/>\n<script type=\"text/javascript\" src=\"variables_2.js\"></script>\n<script type=\"text/javascript\" src=\"search.js\"></script>\n</head>\n<body class=\"SRPage\">\n<div id=\"SRIndex\">\n<div class=\"SRStatus\" id=\"Loading\">Loading...</div>\n<div id=\"SRResults\"></div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ncreateResults();\n/* @license-end */\n--></script>\n<div class=\"SRStatus\" id=\"Searching\">Searching...</div>\n<div class=\"SRStatus\" id=\"NoMatches\">No Matches</div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ndocument.getElementById(\"Loading\").style.display=\"none\";\ndocument.getElementById(\"NoMatches\").style.display=\"none\";\nvar searchResults = new SearchResults(\"searchResults\");\nsearchResults.Search();\n/* @license-end */\n--></script>\n</div>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/variables_2.js",
    "content": "var searchData=\n[\n  ['green_694',['green',['../structGLFWgammaramp.html#affccc6f5df47820b6562d709da3a5a3a',1,'GLFWgammaramp']]],\n  ['greenbits_695',['greenBits',['../structGLFWvidmode.html#a292fdd281f3485fb3ff102a5bda43faa',1,'GLFWvidmode']]]\n];\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/variables_3.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html><head><title></title>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<link rel=\"stylesheet\" type=\"text/css\" href=\"search.css\"/>\n<script type=\"text/javascript\" src=\"variables_3.js\"></script>\n<script type=\"text/javascript\" src=\"search.js\"></script>\n</head>\n<body class=\"SRPage\">\n<div id=\"SRIndex\">\n<div class=\"SRStatus\" id=\"Loading\">Loading...</div>\n<div id=\"SRResults\"></div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ncreateResults();\n/* @license-end */\n--></script>\n<div class=\"SRStatus\" id=\"Searching\">Searching...</div>\n<div class=\"SRStatus\" id=\"NoMatches\">No Matches</div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ndocument.getElementById(\"Loading\").style.display=\"none\";\ndocument.getElementById(\"NoMatches\").style.display=\"none\";\nvar searchResults = new SearchResults(\"searchResults\");\nsearchResults.Search();\n/* @license-end */\n--></script>\n</div>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/variables_3.js",
    "content": "var searchData=\n[\n  ['height_696',['height',['../structGLFWvidmode.html#ac65942a5f6981695517437a9d571d03c',1,'GLFWvidmode::height()'],['../structGLFWimage.html#a0b7d95368f0c80d5e5c9875057c7dbec',1,'GLFWimage::height()']]]\n];\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/variables_4.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html><head><title></title>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<link rel=\"stylesheet\" type=\"text/css\" href=\"search.css\"/>\n<script type=\"text/javascript\" src=\"variables_4.js\"></script>\n<script type=\"text/javascript\" src=\"search.js\"></script>\n</head>\n<body class=\"SRPage\">\n<div id=\"SRIndex\">\n<div class=\"SRStatus\" id=\"Loading\">Loading...</div>\n<div id=\"SRResults\"></div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ncreateResults();\n/* @license-end */\n--></script>\n<div class=\"SRStatus\" id=\"Searching\">Searching...</div>\n<div class=\"SRStatus\" id=\"NoMatches\">No Matches</div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ndocument.getElementById(\"Loading\").style.display=\"none\";\ndocument.getElementById(\"NoMatches\").style.display=\"none\";\nvar searchResults = new SearchResults(\"searchResults\");\nsearchResults.Search();\n/* @license-end */\n--></script>\n</div>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/variables_4.js",
    "content": "var searchData=\n[\n  ['pixels_697',['pixels',['../structGLFWimage.html#a0c532a5c2bb715555279b7817daba0fb',1,'GLFWimage']]]\n];\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/variables_5.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html><head><title></title>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<link rel=\"stylesheet\" type=\"text/css\" href=\"search.css\"/>\n<script type=\"text/javascript\" src=\"variables_5.js\"></script>\n<script type=\"text/javascript\" src=\"search.js\"></script>\n</head>\n<body class=\"SRPage\">\n<div id=\"SRIndex\">\n<div class=\"SRStatus\" id=\"Loading\">Loading...</div>\n<div id=\"SRResults\"></div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ncreateResults();\n/* @license-end */\n--></script>\n<div class=\"SRStatus\" id=\"Searching\">Searching...</div>\n<div class=\"SRStatus\" id=\"NoMatches\">No Matches</div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ndocument.getElementById(\"Loading\").style.display=\"none\";\ndocument.getElementById(\"NoMatches\").style.display=\"none\";\nvar searchResults = new SearchResults(\"searchResults\");\nsearchResults.Search();\n/* @license-end */\n--></script>\n</div>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/variables_5.js",
    "content": "var searchData=\n[\n  ['red_698',['red',['../structGLFWgammaramp.html#a2cce5d968734b685623eef913e635138',1,'GLFWgammaramp']]],\n  ['redbits_699',['redBits',['../structGLFWvidmode.html#a6066c4ecd251098700062d3b735dba1b',1,'GLFWvidmode']]],\n  ['refreshrate_700',['refreshRate',['../structGLFWvidmode.html#a791bdd6c7697b09f7e9c97054bf05649',1,'GLFWvidmode']]]\n];\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/variables_6.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html><head><title></title>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<link rel=\"stylesheet\" type=\"text/css\" href=\"search.css\"/>\n<script type=\"text/javascript\" src=\"variables_6.js\"></script>\n<script type=\"text/javascript\" src=\"search.js\"></script>\n</head>\n<body class=\"SRPage\">\n<div id=\"SRIndex\">\n<div class=\"SRStatus\" id=\"Loading\">Loading...</div>\n<div id=\"SRResults\"></div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ncreateResults();\n/* @license-end */\n--></script>\n<div class=\"SRStatus\" id=\"Searching\">Searching...</div>\n<div class=\"SRStatus\" id=\"NoMatches\">No Matches</div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ndocument.getElementById(\"Loading\").style.display=\"none\";\ndocument.getElementById(\"NoMatches\").style.display=\"none\";\nvar searchResults = new SearchResults(\"searchResults\");\nsearchResults.Search();\n/* @license-end */\n--></script>\n</div>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/variables_6.js",
    "content": "var searchData=\n[\n  ['size_701',['size',['../structGLFWgammaramp.html#ad620e1cffbff9a32c51bca46301b59a5',1,'GLFWgammaramp']]]\n];\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/variables_7.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html><head><title></title>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<link rel=\"stylesheet\" type=\"text/css\" href=\"search.css\"/>\n<script type=\"text/javascript\" src=\"variables_7.js\"></script>\n<script type=\"text/javascript\" src=\"search.js\"></script>\n</head>\n<body class=\"SRPage\">\n<div id=\"SRIndex\">\n<div class=\"SRStatus\" id=\"Loading\">Loading...</div>\n<div id=\"SRResults\"></div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ncreateResults();\n/* @license-end */\n--></script>\n<div class=\"SRStatus\" id=\"Searching\">Searching...</div>\n<div class=\"SRStatus\" id=\"NoMatches\">No Matches</div>\n<script type=\"text/javascript\"><!--\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\ndocument.getElementById(\"Loading\").style.display=\"none\";\ndocument.getElementById(\"NoMatches\").style.display=\"none\";\nvar searchResults = new SearchResults(\"searchResults\");\nsearchResults.Search();\n/* @license-end */\n--></script>\n</div>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/search/variables_7.js",
    "content": "var searchData=\n[\n  ['width_702',['width',['../structGLFWvidmode.html#a698dcb200562051a7249cb6ae154c71d',1,'GLFWvidmode::width()'],['../structGLFWimage.html#af6a71cc999fe6d3aea31dd7e9687d835',1,'GLFWimage::width()']]]\n];\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/structGLFWgamepadstate.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta http-equiv=\"X-UA-Compatible\" content=\"IE=9\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<title>GLFW: GLFWgamepadstate Struct Reference</title>\n<link href=\"tabs.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"jquery.js\"></script>\n<script type=\"text/javascript\" src=\"dynsections.js\"></script>\n<link href=\"search/search.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"search/searchdata.js\"></script>\n<script type=\"text/javascript\" src=\"search/search.js\"></script>\n<link href=\"doxygen.css\" rel=\"stylesheet\" type=\"text/css\" />\n<link href=\"extra.css\" rel=\"stylesheet\" type=\"text/css\"/>\n</head>\n<body>\n<div id=\"top\"><!-- do not remove this div, it is closed by doxygen! -->\n<div id=\"titlearea\">\n\t<div class=\"glfwheader\">\n\t\t<a href=\"https://www.glfw.org/\" id=\"glfwhome\">GLFW</a>\n\t\t<ul class=\"glfwnavbar\">\n\t\t\t<li><a href=\"https://www.glfw.org/documentation.html\">Documentation</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/download.html\">Download</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/community.html\">Community</a></li>\n\t\t</ul>\n\t</div>\n</div>\n<!-- end header part -->\n<!-- Generated by Doxygen 1.8.16 -->\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\nvar searchBox = new SearchBox(\"searchBox\", \"search\",false,'Search');\n/* @license-end */\n</script>\n<script type=\"text/javascript\" src=\"menudata.js\"></script>\n<script type=\"text/javascript\" src=\"menu.js\"></script>\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\n$(function() {\n  initMenu('',true,false,'search.php','Search');\n  $(document).ready(function() { init_search(); });\n});\n/* @license-end */</script>\n<div id=\"main-nav\"></div>\n<!-- window showing the filter options -->\n<div id=\"MSearchSelectWindow\"\n     onmouseover=\"return searchBox.OnSearchSelectShow()\"\n     onmouseout=\"return searchBox.OnSearchSelectHide()\"\n     onkeydown=\"return searchBox.OnSearchSelectKey(event)\">\n</div>\n\n<!-- iframe showing the search results (closed by default) -->\n<div id=\"MSearchResultsWindow\">\n<iframe src=\"javascript:void(0)\" frameborder=\"0\" \n        name=\"MSearchResults\" id=\"MSearchResults\">\n</iframe>\n</div>\n\n</div><!-- top -->\n<div class=\"header\">\n  <div class=\"summary\">\n<a href=\"#pub-attribs\">Data Fields</a>  </div>\n  <div class=\"headertitle\">\n<div class=\"title\">GLFWgamepadstate Struct Reference<div class=\"ingroups\"><a class=\"el\" href=\"group__input.html\">Input reference</a></div></div>  </div>\n</div><!--header-->\n<div class=\"contents\">\n\n<p>Gamepad input state.  \n <a href=\"structGLFWgamepadstate.html#details\">More...</a></p>\n<table class=\"memberdecls\">\n<tr class=\"heading\"><td colspan=\"2\"><h2 class=\"groupheader\"><a name=\"pub-attribs\"></a>\nData Fields</h2></td></tr>\n<tr class=\"memitem:a27e9896b51c65df15fba2c7139bfdb9a\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">unsigned char&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"structGLFWgamepadstate.html#a27e9896b51c65df15fba2c7139bfdb9a\">buttons</a> [15]</td></tr>\n<tr class=\"separator:a27e9896b51c65df15fba2c7139bfdb9a\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:a8b2c8939b1d31458de5359998375c189\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">float&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"structGLFWgamepadstate.html#a8b2c8939b1d31458de5359998375c189\">axes</a> [6]</td></tr>\n<tr class=\"separator:a8b2c8939b1d31458de5359998375c189\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n</table>\n<a name=\"details\" id=\"details\"></a><h2 class=\"groupheader\">Detailed Description</h2>\n<div class=\"textblock\"><p>This describes the input state of a gamepad.</p>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"input_guide.html#gamepad\">Gamepad input</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__input.html#gadccddea8bce6113fa459de379ddaf051\">glfwGetGamepadState</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.3. </dd></dl>\n</div><h2 class=\"groupheader\">Field Documentation</h2>\n<a id=\"a27e9896b51c65df15fba2c7139bfdb9a\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#a27e9896b51c65df15fba2c7139bfdb9a\">&#9670;&nbsp;</a></span>buttons</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">unsigned char GLFWgamepadstate::buttons[15]</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>The states of each <a class=\"el\" href=\"group__gamepad__buttons.html\">gamepad button</a>, <code>GLFW_PRESS</code> or <code>GLFW_RELEASE</code>. </p>\n\n</div>\n</div>\n<a id=\"a8b2c8939b1d31458de5359998375c189\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#a8b2c8939b1d31458de5359998375c189\">&#9670;&nbsp;</a></span>axes</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">float GLFWgamepadstate::axes[6]</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>The states of each <a class=\"el\" href=\"group__gamepad__axes.html\">gamepad axis</a>, in the range -1.0 to 1.0 inclusive. </p>\n\n</div>\n</div>\n<hr/>The documentation for this struct was generated from the following file:<ul>\n<li><a class=\"el\" href=\"glfw3_8h_source.html\">glfw3.h</a></li>\n</ul>\n</div><!-- contents -->\n<address class=\"footer\">\n<p>\nLast update on Mon Jan 20 2020 for GLFW 3.3.2\n</p>\n</address>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/structGLFWgammaramp.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta http-equiv=\"X-UA-Compatible\" content=\"IE=9\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<title>GLFW: GLFWgammaramp Struct Reference</title>\n<link href=\"tabs.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"jquery.js\"></script>\n<script type=\"text/javascript\" src=\"dynsections.js\"></script>\n<link href=\"search/search.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"search/searchdata.js\"></script>\n<script type=\"text/javascript\" src=\"search/search.js\"></script>\n<link href=\"doxygen.css\" rel=\"stylesheet\" type=\"text/css\" />\n<link href=\"extra.css\" rel=\"stylesheet\" type=\"text/css\"/>\n</head>\n<body>\n<div id=\"top\"><!-- do not remove this div, it is closed by doxygen! -->\n<div id=\"titlearea\">\n\t<div class=\"glfwheader\">\n\t\t<a href=\"https://www.glfw.org/\" id=\"glfwhome\">GLFW</a>\n\t\t<ul class=\"glfwnavbar\">\n\t\t\t<li><a href=\"https://www.glfw.org/documentation.html\">Documentation</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/download.html\">Download</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/community.html\">Community</a></li>\n\t\t</ul>\n\t</div>\n</div>\n<!-- end header part -->\n<!-- Generated by Doxygen 1.8.16 -->\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\nvar searchBox = new SearchBox(\"searchBox\", \"search\",false,'Search');\n/* @license-end */\n</script>\n<script type=\"text/javascript\" src=\"menudata.js\"></script>\n<script type=\"text/javascript\" src=\"menu.js\"></script>\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\n$(function() {\n  initMenu('',true,false,'search.php','Search');\n  $(document).ready(function() { init_search(); });\n});\n/* @license-end */</script>\n<div id=\"main-nav\"></div>\n<!-- window showing the filter options -->\n<div id=\"MSearchSelectWindow\"\n     onmouseover=\"return searchBox.OnSearchSelectShow()\"\n     onmouseout=\"return searchBox.OnSearchSelectHide()\"\n     onkeydown=\"return searchBox.OnSearchSelectKey(event)\">\n</div>\n\n<!-- iframe showing the search results (closed by default) -->\n<div id=\"MSearchResultsWindow\">\n<iframe src=\"javascript:void(0)\" frameborder=\"0\" \n        name=\"MSearchResults\" id=\"MSearchResults\">\n</iframe>\n</div>\n\n</div><!-- top -->\n<div class=\"header\">\n  <div class=\"summary\">\n<a href=\"#pub-attribs\">Data Fields</a>  </div>\n  <div class=\"headertitle\">\n<div class=\"title\">GLFWgammaramp Struct Reference<div class=\"ingroups\"><a class=\"el\" href=\"group__monitor.html\">Monitor reference</a></div></div>  </div>\n</div><!--header-->\n<div class=\"contents\">\n\n<p>Gamma ramp.  \n <a href=\"structGLFWgammaramp.html#details\">More...</a></p>\n<table class=\"memberdecls\">\n<tr class=\"heading\"><td colspan=\"2\"><h2 class=\"groupheader\"><a name=\"pub-attribs\"></a>\nData Fields</h2></td></tr>\n<tr class=\"memitem:a2cce5d968734b685623eef913e635138\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">unsigned short *&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"structGLFWgammaramp.html#a2cce5d968734b685623eef913e635138\">red</a></td></tr>\n<tr class=\"separator:a2cce5d968734b685623eef913e635138\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:affccc6f5df47820b6562d709da3a5a3a\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">unsigned short *&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"structGLFWgammaramp.html#affccc6f5df47820b6562d709da3a5a3a\">green</a></td></tr>\n<tr class=\"separator:affccc6f5df47820b6562d709da3a5a3a\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:acf0c836d0efe29c392fe8d1a1042744b\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">unsigned short *&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"structGLFWgammaramp.html#acf0c836d0efe29c392fe8d1a1042744b\">blue</a></td></tr>\n<tr class=\"separator:acf0c836d0efe29c392fe8d1a1042744b\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ad620e1cffbff9a32c51bca46301b59a5\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">unsigned int&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"structGLFWgammaramp.html#ad620e1cffbff9a32c51bca46301b59a5\">size</a></td></tr>\n<tr class=\"separator:ad620e1cffbff9a32c51bca46301b59a5\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n</table>\n<a name=\"details\" id=\"details\"></a><h2 class=\"groupheader\">Detailed Description</h2>\n<div class=\"textblock\"><p>This describes the gamma ramp for a monitor.</p>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"monitor_guide.html#monitor_gamma\">Gamma ramp</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__monitor.html#gab7c41deb2219bde3e1eb756ddaa9ec80\">glfwGetGammaRamp</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__monitor.html#ga583f0ffd0d29613d8cd172b996bbf0dd\">glfwSetGammaRamp</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>\n</div><h2 class=\"groupheader\">Field Documentation</h2>\n<a id=\"a2cce5d968734b685623eef913e635138\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#a2cce5d968734b685623eef913e635138\">&#9670;&nbsp;</a></span>red</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">unsigned short* GLFWgammaramp::red</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>An array of value describing the response of the red channel. </p>\n\n</div>\n</div>\n<a id=\"affccc6f5df47820b6562d709da3a5a3a\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#affccc6f5df47820b6562d709da3a5a3a\">&#9670;&nbsp;</a></span>green</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">unsigned short* GLFWgammaramp::green</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>An array of value describing the response of the green channel. </p>\n\n</div>\n</div>\n<a id=\"acf0c836d0efe29c392fe8d1a1042744b\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#acf0c836d0efe29c392fe8d1a1042744b\">&#9670;&nbsp;</a></span>blue</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">unsigned short* GLFWgammaramp::blue</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>An array of value describing the response of the blue channel. </p>\n\n</div>\n</div>\n<a id=\"ad620e1cffbff9a32c51bca46301b59a5\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ad620e1cffbff9a32c51bca46301b59a5\">&#9670;&nbsp;</a></span>size</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">unsigned int GLFWgammaramp::size</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>The number of elements in each array. </p>\n\n</div>\n</div>\n<hr/>The documentation for this struct was generated from the following file:<ul>\n<li><a class=\"el\" href=\"glfw3_8h_source.html\">glfw3.h</a></li>\n</ul>\n</div><!-- contents -->\n<address class=\"footer\">\n<p>\nLast update on Mon Jan 20 2020 for GLFW 3.3.2\n</p>\n</address>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/structGLFWimage.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta http-equiv=\"X-UA-Compatible\" content=\"IE=9\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<title>GLFW: GLFWimage Struct Reference</title>\n<link href=\"tabs.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"jquery.js\"></script>\n<script type=\"text/javascript\" src=\"dynsections.js\"></script>\n<link href=\"search/search.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"search/searchdata.js\"></script>\n<script type=\"text/javascript\" src=\"search/search.js\"></script>\n<link href=\"doxygen.css\" rel=\"stylesheet\" type=\"text/css\" />\n<link href=\"extra.css\" rel=\"stylesheet\" type=\"text/css\"/>\n</head>\n<body>\n<div id=\"top\"><!-- do not remove this div, it is closed by doxygen! -->\n<div id=\"titlearea\">\n\t<div class=\"glfwheader\">\n\t\t<a href=\"https://www.glfw.org/\" id=\"glfwhome\">GLFW</a>\n\t\t<ul class=\"glfwnavbar\">\n\t\t\t<li><a href=\"https://www.glfw.org/documentation.html\">Documentation</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/download.html\">Download</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/community.html\">Community</a></li>\n\t\t</ul>\n\t</div>\n</div>\n<!-- end header part -->\n<!-- Generated by Doxygen 1.8.16 -->\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\nvar searchBox = new SearchBox(\"searchBox\", \"search\",false,'Search');\n/* @license-end */\n</script>\n<script type=\"text/javascript\" src=\"menudata.js\"></script>\n<script type=\"text/javascript\" src=\"menu.js\"></script>\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\n$(function() {\n  initMenu('',true,false,'search.php','Search');\n  $(document).ready(function() { init_search(); });\n});\n/* @license-end */</script>\n<div id=\"main-nav\"></div>\n<!-- window showing the filter options -->\n<div id=\"MSearchSelectWindow\"\n     onmouseover=\"return searchBox.OnSearchSelectShow()\"\n     onmouseout=\"return searchBox.OnSearchSelectHide()\"\n     onkeydown=\"return searchBox.OnSearchSelectKey(event)\">\n</div>\n\n<!-- iframe showing the search results (closed by default) -->\n<div id=\"MSearchResultsWindow\">\n<iframe src=\"javascript:void(0)\" frameborder=\"0\" \n        name=\"MSearchResults\" id=\"MSearchResults\">\n</iframe>\n</div>\n\n</div><!-- top -->\n<div class=\"header\">\n  <div class=\"summary\">\n<a href=\"#pub-attribs\">Data Fields</a>  </div>\n  <div class=\"headertitle\">\n<div class=\"title\">GLFWimage Struct Reference<div class=\"ingroups\"><a class=\"el\" href=\"group__window.html\">Window reference</a></div></div>  </div>\n</div><!--header-->\n<div class=\"contents\">\n\n<p>Image data.  \n <a href=\"structGLFWimage.html#details\">More...</a></p>\n<table class=\"memberdecls\">\n<tr class=\"heading\"><td colspan=\"2\"><h2 class=\"groupheader\"><a name=\"pub-attribs\"></a>\nData Fields</h2></td></tr>\n<tr class=\"memitem:af6a71cc999fe6d3aea31dd7e9687d835\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">int&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"structGLFWimage.html#af6a71cc999fe6d3aea31dd7e9687d835\">width</a></td></tr>\n<tr class=\"separator:af6a71cc999fe6d3aea31dd7e9687d835\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:a0b7d95368f0c80d5e5c9875057c7dbec\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">int&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"structGLFWimage.html#a0b7d95368f0c80d5e5c9875057c7dbec\">height</a></td></tr>\n<tr class=\"separator:a0b7d95368f0c80d5e5c9875057c7dbec\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:a0c532a5c2bb715555279b7817daba0fb\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">unsigned char *&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"structGLFWimage.html#a0c532a5c2bb715555279b7817daba0fb\">pixels</a></td></tr>\n<tr class=\"separator:a0c532a5c2bb715555279b7817daba0fb\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n</table>\n<a name=\"details\" id=\"details\"></a><h2 class=\"groupheader\">Detailed Description</h2>\n<div class=\"textblock\"><p>This describes a single 2D image. See the documentation for each related function what the expected pixel format is.</p>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"input_guide.html#cursor_custom\">Custom cursor creation</a> </dd>\n<dd>\n<a class=\"el\" href=\"window_guide.html#window_icon\">Window icon</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 2.1. <b>GLFW 3:</b> Removed format and bytes-per-pixel members. </dd></dl>\n</div><h2 class=\"groupheader\">Field Documentation</h2>\n<a id=\"af6a71cc999fe6d3aea31dd7e9687d835\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#af6a71cc999fe6d3aea31dd7e9687d835\">&#9670;&nbsp;</a></span>width</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">int GLFWimage::width</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>The width, in pixels, of this image. </p>\n\n</div>\n</div>\n<a id=\"a0b7d95368f0c80d5e5c9875057c7dbec\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#a0b7d95368f0c80d5e5c9875057c7dbec\">&#9670;&nbsp;</a></span>height</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">int GLFWimage::height</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>The height, in pixels, of this image. </p>\n\n</div>\n</div>\n<a id=\"a0c532a5c2bb715555279b7817daba0fb\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#a0c532a5c2bb715555279b7817daba0fb\">&#9670;&nbsp;</a></span>pixels</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">unsigned char* GLFWimage::pixels</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>The pixel data of this image, arranged left-to-right, top-to-bottom. </p>\n\n</div>\n</div>\n<hr/>The documentation for this struct was generated from the following file:<ul>\n<li><a class=\"el\" href=\"glfw3_8h_source.html\">glfw3.h</a></li>\n</ul>\n</div><!-- contents -->\n<address class=\"footer\">\n<p>\nLast update on Mon Jan 20 2020 for GLFW 3.3.2\n</p>\n</address>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/structGLFWvidmode.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta http-equiv=\"X-UA-Compatible\" content=\"IE=9\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<title>GLFW: GLFWvidmode Struct Reference</title>\n<link href=\"tabs.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"jquery.js\"></script>\n<script type=\"text/javascript\" src=\"dynsections.js\"></script>\n<link href=\"search/search.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"search/searchdata.js\"></script>\n<script type=\"text/javascript\" src=\"search/search.js\"></script>\n<link href=\"doxygen.css\" rel=\"stylesheet\" type=\"text/css\" />\n<link href=\"extra.css\" rel=\"stylesheet\" type=\"text/css\"/>\n</head>\n<body>\n<div id=\"top\"><!-- do not remove this div, it is closed by doxygen! -->\n<div id=\"titlearea\">\n\t<div class=\"glfwheader\">\n\t\t<a href=\"https://www.glfw.org/\" id=\"glfwhome\">GLFW</a>\n\t\t<ul class=\"glfwnavbar\">\n\t\t\t<li><a href=\"https://www.glfw.org/documentation.html\">Documentation</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/download.html\">Download</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/community.html\">Community</a></li>\n\t\t</ul>\n\t</div>\n</div>\n<!-- end header part -->\n<!-- Generated by Doxygen 1.8.16 -->\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\nvar searchBox = new SearchBox(\"searchBox\", \"search\",false,'Search');\n/* @license-end */\n</script>\n<script type=\"text/javascript\" src=\"menudata.js\"></script>\n<script type=\"text/javascript\" src=\"menu.js\"></script>\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\n$(function() {\n  initMenu('',true,false,'search.php','Search');\n  $(document).ready(function() { init_search(); });\n});\n/* @license-end */</script>\n<div id=\"main-nav\"></div>\n<!-- window showing the filter options -->\n<div id=\"MSearchSelectWindow\"\n     onmouseover=\"return searchBox.OnSearchSelectShow()\"\n     onmouseout=\"return searchBox.OnSearchSelectHide()\"\n     onkeydown=\"return searchBox.OnSearchSelectKey(event)\">\n</div>\n\n<!-- iframe showing the search results (closed by default) -->\n<div id=\"MSearchResultsWindow\">\n<iframe src=\"javascript:void(0)\" frameborder=\"0\" \n        name=\"MSearchResults\" id=\"MSearchResults\">\n</iframe>\n</div>\n\n</div><!-- top -->\n<div class=\"header\">\n  <div class=\"summary\">\n<a href=\"#pub-attribs\">Data Fields</a>  </div>\n  <div class=\"headertitle\">\n<div class=\"title\">GLFWvidmode Struct Reference<div class=\"ingroups\"><a class=\"el\" href=\"group__monitor.html\">Monitor reference</a></div></div>  </div>\n</div><!--header-->\n<div class=\"contents\">\n\n<p>Video mode type.  \n <a href=\"structGLFWvidmode.html#details\">More...</a></p>\n<table class=\"memberdecls\">\n<tr class=\"heading\"><td colspan=\"2\"><h2 class=\"groupheader\"><a name=\"pub-attribs\"></a>\nData Fields</h2></td></tr>\n<tr class=\"memitem:a698dcb200562051a7249cb6ae154c71d\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">int&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"structGLFWvidmode.html#a698dcb200562051a7249cb6ae154c71d\">width</a></td></tr>\n<tr class=\"separator:a698dcb200562051a7249cb6ae154c71d\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:ac65942a5f6981695517437a9d571d03c\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">int&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"structGLFWvidmode.html#ac65942a5f6981695517437a9d571d03c\">height</a></td></tr>\n<tr class=\"separator:ac65942a5f6981695517437a9d571d03c\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:a6066c4ecd251098700062d3b735dba1b\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">int&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"structGLFWvidmode.html#a6066c4ecd251098700062d3b735dba1b\">redBits</a></td></tr>\n<tr class=\"separator:a6066c4ecd251098700062d3b735dba1b\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:a292fdd281f3485fb3ff102a5bda43faa\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">int&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"structGLFWvidmode.html#a292fdd281f3485fb3ff102a5bda43faa\">greenBits</a></td></tr>\n<tr class=\"separator:a292fdd281f3485fb3ff102a5bda43faa\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:af310977f58d2e3b188175b6e3d314047\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">int&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"structGLFWvidmode.html#af310977f58d2e3b188175b6e3d314047\">blueBits</a></td></tr>\n<tr class=\"separator:af310977f58d2e3b188175b6e3d314047\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n<tr class=\"memitem:a791bdd6c7697b09f7e9c97054bf05649\"><td class=\"memItemLeft\" align=\"right\" valign=\"top\">int&#160;</td><td class=\"memItemRight\" valign=\"bottom\"><a class=\"el\" href=\"structGLFWvidmode.html#a791bdd6c7697b09f7e9c97054bf05649\">refreshRate</a></td></tr>\n<tr class=\"separator:a791bdd6c7697b09f7e9c97054bf05649\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n</table>\n<a name=\"details\" id=\"details\"></a><h2 class=\"groupheader\">Detailed Description</h2>\n<div class=\"textblock\"><p>This describes a single video mode.</p>\n<dl class=\"section see\"><dt>See also</dt><dd><a class=\"el\" href=\"monitor_guide.html#monitor_modes\">Video modes</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__monitor.html#gafc1bb972a921ad5b3bd5d63a95fc2d52\">glfwGetVideoMode</a> </dd>\n<dd>\n<a class=\"el\" href=\"group__monitor.html#ga820b0ce9a5237d645ea7cbb4bd383458\">glfwGetVideoModes</a></dd></dl>\n<dl class=\"section since\"><dt>Since</dt><dd>Added in version 1.0. <b>GLFW 3:</b> Added refresh rate member. </dd></dl>\n</div><h2 class=\"groupheader\">Field Documentation</h2>\n<a id=\"a698dcb200562051a7249cb6ae154c71d\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#a698dcb200562051a7249cb6ae154c71d\">&#9670;&nbsp;</a></span>width</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">int GLFWvidmode::width</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>The width, in screen coordinates, of the video mode. </p>\n\n</div>\n</div>\n<a id=\"ac65942a5f6981695517437a9d571d03c\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#ac65942a5f6981695517437a9d571d03c\">&#9670;&nbsp;</a></span>height</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">int GLFWvidmode::height</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>The height, in screen coordinates, of the video mode. </p>\n\n</div>\n</div>\n<a id=\"a6066c4ecd251098700062d3b735dba1b\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#a6066c4ecd251098700062d3b735dba1b\">&#9670;&nbsp;</a></span>redBits</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">int GLFWvidmode::redBits</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>The bit depth of the red channel of the video mode. </p>\n\n</div>\n</div>\n<a id=\"a292fdd281f3485fb3ff102a5bda43faa\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#a292fdd281f3485fb3ff102a5bda43faa\">&#9670;&nbsp;</a></span>greenBits</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">int GLFWvidmode::greenBits</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>The bit depth of the green channel of the video mode. </p>\n\n</div>\n</div>\n<a id=\"af310977f58d2e3b188175b6e3d314047\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#af310977f58d2e3b188175b6e3d314047\">&#9670;&nbsp;</a></span>blueBits</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">int GLFWvidmode::blueBits</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>The bit depth of the blue channel of the video mode. </p>\n\n</div>\n</div>\n<a id=\"a791bdd6c7697b09f7e9c97054bf05649\"></a>\n<h2 class=\"memtitle\"><span class=\"permalink\"><a href=\"#a791bdd6c7697b09f7e9c97054bf05649\">&#9670;&nbsp;</a></span>refreshRate</h2>\n\n<div class=\"memitem\">\n<div class=\"memproto\">\n      <table class=\"memname\">\n        <tr>\n          <td class=\"memname\">int GLFWvidmode::refreshRate</td>\n        </tr>\n      </table>\n</div><div class=\"memdoc\">\n<p>The refresh rate, in Hz, of the video mode. </p>\n\n</div>\n</div>\n<hr/>The documentation for this struct was generated from the following file:<ul>\n<li><a class=\"el\" href=\"glfw3_8h_source.html\">glfw3.h</a></li>\n</ul>\n</div><!-- contents -->\n<address class=\"footer\">\n<p>\nLast update on Mon Jan 20 2020 for GLFW 3.3.2\n</p>\n</address>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/tabs.css",
    "content": ".sm{position:relative;z-index:9999}.sm,.sm ul,.sm li{display:block;list-style:none;margin:0;padding:0;line-height:normal;direction:ltr;text-align:left;-webkit-tap-highlight-color:rgba(0,0,0,0)}.sm-rtl,.sm-rtl ul,.sm-rtl li{direction:rtl;text-align:right}.sm>li>h1,.sm>li>h2,.sm>li>h3,.sm>li>h4,.sm>li>h5,.sm>li>h6{margin:0;padding:0}.sm ul{display:none}.sm li,.sm a{position:relative}.sm a{display:block}.sm a.disabled{cursor:not-allowed}.sm:after{content:\"\\00a0\";display:block;height:0;font:0/0 serif;clear:both;visibility:hidden;overflow:hidden}.sm,.sm *,.sm *:before,.sm *:after{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.sm-dox{background-image:url(\"tab_b.png\")}.sm-dox a,.sm-dox a:focus,.sm-dox a:hover,.sm-dox a:active{padding:0 12px;padding-right:43px;font-family:\"Lucida Grande\",\"Geneva\",\"Helvetica\",Arial,sans-serif;font-size:13px;font-weight:bold;line-height:36px;text-decoration:none;text-shadow:0 1px 1px rgba(255,255,255,0.9);color:#283a5d;outline:0}.sm-dox a:hover{background-image:url(\"tab_a.png\");background-repeat:repeat-x;color:white;text-shadow:0 1px 1px black}.sm-dox a.current{color:#d23600}.sm-dox a.disabled{color:#bbb}.sm-dox a span.sub-arrow{position:absolute;top:50%;margin-top:-14px;left:auto;right:3px;width:28px;height:28px;overflow:hidden;font:bold 12px/28px monospace!important;text-align:center;text-shadow:none;background:rgba(255,255,255,0.5);-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px}.sm-dox a.highlighted span.sub-arrow:before{display:block;content:'-'}.sm-dox>li:first-child>a,.sm-dox>li:first-child>:not(ul) a{-moz-border-radius:5px 5px 0 0;-webkit-border-radius:5px;border-radius:5px 5px 0 0}.sm-dox>li:last-child>a,.sm-dox>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul{-moz-border-radius:0 0 5px 5px;-webkit-border-radius:0;border-radius:0 0 5px 5px}.sm-dox>li:last-child>a.highlighted,.sm-dox>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0}.sm-dox ul{background:rgba(162,162,162,0.1)}.sm-dox ul a,.sm-dox ul a:focus,.sm-dox ul a:hover,.sm-dox ul a:active{font-size:12px;border-left:8px solid transparent;line-height:36px;text-shadow:none;background-color:white;background-image:none}.sm-dox ul a:hover{background-image:url(\"tab_a.png\");background-repeat:repeat-x;color:white;text-shadow:0 1px 1px black}.sm-dox ul ul a,.sm-dox ul ul a:hover,.sm-dox ul ul a:focus,.sm-dox ul ul a:active{border-left:16px solid transparent}.sm-dox ul ul ul a,.sm-dox ul ul ul a:hover,.sm-dox ul ul ul a:focus,.sm-dox ul ul ul a:active{border-left:24px solid transparent}.sm-dox ul ul ul ul a,.sm-dox ul ul ul ul a:hover,.sm-dox ul ul ul ul a:focus,.sm-dox ul ul ul ul a:active{border-left:32px solid transparent}.sm-dox ul ul ul ul ul a,.sm-dox ul ul ul ul ul a:hover,.sm-dox ul ul ul ul ul a:focus,.sm-dox ul ul ul ul ul a:active{border-left:40px solid transparent}@media(min-width:768px){.sm-dox ul{position:absolute;width:12em}.sm-dox li{float:left}.sm-dox.sm-rtl li{float:right}.sm-dox ul li,.sm-dox.sm-rtl ul li,.sm-dox.sm-vertical li{float:none}.sm-dox a{white-space:nowrap}.sm-dox ul a,.sm-dox.sm-vertical a{white-space:normal}.sm-dox .sm-nowrap>li>a,.sm-dox .sm-nowrap>li>:not(ul) a{white-space:nowrap}.sm-dox{padding:0 10px;background-image:url(\"tab_b.png\");line-height:36px}.sm-dox a span.sub-arrow{top:50%;margin-top:-2px;right:12px;width:0;height:0;border-width:4px;border-style:solid dashed dashed dashed;border-color:#283a5d transparent transparent transparent;background:transparent;-moz-border-radius:0;-webkit-border-radius:0;border-radius:0}.sm-dox a,.sm-dox a:focus,.sm-dox a:active,.sm-dox a:hover,.sm-dox a.highlighted{padding:0 12px;background-image:url(\"tab_s.png\");background-repeat:no-repeat;background-position:right;-moz-border-radius:0!important;-webkit-border-radius:0;border-radius:0!important}.sm-dox a:hover{background-image:url(\"tab_a.png\");background-repeat:repeat-x;color:white;text-shadow:0 1px 1px black}.sm-dox a:hover span.sub-arrow{border-color:white transparent transparent transparent}.sm-dox a.has-submenu{padding-right:24px}.sm-dox li{border-top:0}.sm-dox>li>ul:before,.sm-dox>li>ul:after{content:'';position:absolute;top:-18px;left:30px;width:0;height:0;overflow:hidden;border-width:9px;border-style:dashed dashed solid dashed;border-color:transparent transparent #bbb transparent}.sm-dox>li>ul:after{top:-16px;left:31px;border-width:8px;border-color:transparent transparent #fff transparent}.sm-dox ul{border:1px solid #bbb;padding:5px 0;background:#fff;-moz-border-radius:5px!important;-webkit-border-radius:5px;border-radius:5px!important;-moz-box-shadow:0 5px 9px rgba(0,0,0,0.2);-webkit-box-shadow:0 5px 9px rgba(0,0,0,0.2);box-shadow:0 5px 9px rgba(0,0,0,0.2)}.sm-dox ul a span.sub-arrow{right:8px;top:50%;margin-top:-5px;border-width:5px;border-color:transparent transparent transparent #555;border-style:dashed dashed dashed solid}.sm-dox ul a,.sm-dox ul a:hover,.sm-dox ul a:focus,.sm-dox ul a:active,.sm-dox ul a.highlighted{color:#555;background-image:none;border:0!important;color:#555;background-image:none}.sm-dox ul a:hover{background-image:url(\"tab_a.png\");background-repeat:repeat-x;color:white;text-shadow:0 1px 1px black}.sm-dox ul a:hover span.sub-arrow{border-color:transparent transparent transparent white}.sm-dox span.scroll-up,.sm-dox span.scroll-down{position:absolute;display:none;visibility:hidden;overflow:hidden;background:#fff;height:36px}.sm-dox span.scroll-up:hover,.sm-dox span.scroll-down:hover{background:#eee}.sm-dox span.scroll-up:hover span.scroll-up-arrow,.sm-dox span.scroll-up:hover span.scroll-down-arrow{border-color:transparent transparent #d23600 transparent}.sm-dox span.scroll-down:hover span.scroll-down-arrow{border-color:#d23600 transparent transparent transparent}.sm-dox span.scroll-up-arrow,.sm-dox span.scroll-down-arrow{position:absolute;top:0;left:50%;margin-left:-6px;width:0;height:0;overflow:hidden;border-width:6px;border-style:dashed dashed solid dashed;border-color:transparent transparent #555 transparent}.sm-dox span.scroll-down-arrow{top:8px;border-style:solid dashed dashed dashed;border-color:#555 transparent transparent transparent}.sm-dox.sm-rtl a.has-submenu{padding-right:12px;padding-left:24px}.sm-dox.sm-rtl a span.sub-arrow{right:auto;left:12px}.sm-dox.sm-rtl.sm-vertical a.has-submenu{padding:10px 20px}.sm-dox.sm-rtl.sm-vertical a span.sub-arrow{right:auto;left:8px;border-style:dashed solid dashed dashed;border-color:transparent #555 transparent transparent}.sm-dox.sm-rtl>li>ul:before{left:auto;right:30px}.sm-dox.sm-rtl>li>ul:after{left:auto;right:31px}.sm-dox.sm-rtl ul a.has-submenu{padding:10px 20px!important}.sm-dox.sm-rtl ul a span.sub-arrow{right:auto;left:8px;border-style:dashed solid dashed dashed;border-color:transparent #555 transparent transparent}.sm-dox.sm-vertical{padding:10px 0;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px}.sm-dox.sm-vertical a{padding:10px 20px}.sm-dox.sm-vertical a:hover,.sm-dox.sm-vertical a:focus,.sm-dox.sm-vertical a:active,.sm-dox.sm-vertical a.highlighted{background:#fff}.sm-dox.sm-vertical a.disabled{background-image:url(\"tab_b.png\")}.sm-dox.sm-vertical a span.sub-arrow{right:8px;top:50%;margin-top:-5px;border-width:5px;border-style:dashed dashed dashed solid;border-color:transparent transparent transparent #555}.sm-dox.sm-vertical>li>ul:before,.sm-dox.sm-vertical>li>ul:after{display:none}.sm-dox.sm-vertical ul a{padding:10px 20px}.sm-dox.sm-vertical ul a:hover,.sm-dox.sm-vertical ul a:focus,.sm-dox.sm-vertical ul a:active,.sm-dox.sm-vertical ul a.highlighted{background:#eee}.sm-dox.sm-vertical ul a.disabled{background:#fff}}"
  },
  {
    "path": "thirdparty/glfw/docs/html/vulkan_8dox.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta http-equiv=\"X-UA-Compatible\" content=\"IE=9\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<title>GLFW: vulkan.dox File Reference</title>\n<link href=\"tabs.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"jquery.js\"></script>\n<script type=\"text/javascript\" src=\"dynsections.js\"></script>\n<link href=\"search/search.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"search/searchdata.js\"></script>\n<script type=\"text/javascript\" src=\"search/search.js\"></script>\n<link href=\"doxygen.css\" rel=\"stylesheet\" type=\"text/css\" />\n<link href=\"extra.css\" rel=\"stylesheet\" type=\"text/css\"/>\n</head>\n<body>\n<div id=\"top\"><!-- do not remove this div, it is closed by doxygen! -->\n<div id=\"titlearea\">\n\t<div class=\"glfwheader\">\n\t\t<a href=\"https://www.glfw.org/\" id=\"glfwhome\">GLFW</a>\n\t\t<ul class=\"glfwnavbar\">\n\t\t\t<li><a href=\"https://www.glfw.org/documentation.html\">Documentation</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/download.html\">Download</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/community.html\">Community</a></li>\n\t\t</ul>\n\t</div>\n</div>\n<!-- end header part -->\n<!-- Generated by Doxygen 1.8.16 -->\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\nvar searchBox = new SearchBox(\"searchBox\", \"search\",false,'Search');\n/* @license-end */\n</script>\n<script type=\"text/javascript\" src=\"menudata.js\"></script>\n<script type=\"text/javascript\" src=\"menu.js\"></script>\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\n$(function() {\n  initMenu('',true,false,'search.php','Search');\n  $(document).ready(function() { init_search(); });\n});\n/* @license-end */</script>\n<div id=\"main-nav\"></div>\n<!-- window showing the filter options -->\n<div id=\"MSearchSelectWindow\"\n     onmouseover=\"return searchBox.OnSearchSelectShow()\"\n     onmouseout=\"return searchBox.OnSearchSelectHide()\"\n     onkeydown=\"return searchBox.OnSearchSelectKey(event)\">\n</div>\n\n<!-- iframe showing the search results (closed by default) -->\n<div id=\"MSearchResultsWindow\">\n<iframe src=\"javascript:void(0)\" frameborder=\"0\" \n        name=\"MSearchResults\" id=\"MSearchResults\">\n</iframe>\n</div>\n\n</div><!-- top -->\n<div class=\"header\">\n  <div class=\"headertitle\">\n<div class=\"title\">vulkan.dox File Reference</div>  </div>\n</div><!--header-->\n<div class=\"contents\">\n</div><!-- contents -->\n<address class=\"footer\">\n<p>\nLast update on Mon Jan 20 2020 for GLFW 3.3.2\n</p>\n</address>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/vulkan_guide.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta http-equiv=\"X-UA-Compatible\" content=\"IE=9\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<title>GLFW: Vulkan guide</title>\n<link href=\"tabs.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"jquery.js\"></script>\n<script type=\"text/javascript\" src=\"dynsections.js\"></script>\n<link href=\"search/search.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"search/searchdata.js\"></script>\n<script type=\"text/javascript\" src=\"search/search.js\"></script>\n<link href=\"doxygen.css\" rel=\"stylesheet\" type=\"text/css\" />\n<link href=\"extra.css\" rel=\"stylesheet\" type=\"text/css\"/>\n</head>\n<body>\n<div id=\"top\"><!-- do not remove this div, it is closed by doxygen! -->\n<div id=\"titlearea\">\n\t<div class=\"glfwheader\">\n\t\t<a href=\"https://www.glfw.org/\" id=\"glfwhome\">GLFW</a>\n\t\t<ul class=\"glfwnavbar\">\n\t\t\t<li><a href=\"https://www.glfw.org/documentation.html\">Documentation</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/download.html\">Download</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/community.html\">Community</a></li>\n\t\t</ul>\n\t</div>\n</div>\n<!-- end header part -->\n<!-- Generated by Doxygen 1.8.16 -->\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\nvar searchBox = new SearchBox(\"searchBox\", \"search\",false,'Search');\n/* @license-end */\n</script>\n<script type=\"text/javascript\" src=\"menudata.js\"></script>\n<script type=\"text/javascript\" src=\"menu.js\"></script>\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\n$(function() {\n  initMenu('',true,false,'search.php','Search');\n  $(document).ready(function() { init_search(); });\n});\n/* @license-end */</script>\n<div id=\"main-nav\"></div>\n<!-- window showing the filter options -->\n<div id=\"MSearchSelectWindow\"\n     onmouseover=\"return searchBox.OnSearchSelectShow()\"\n     onmouseout=\"return searchBox.OnSearchSelectHide()\"\n     onkeydown=\"return searchBox.OnSearchSelectKey(event)\">\n</div>\n\n<!-- iframe showing the search results (closed by default) -->\n<div id=\"MSearchResultsWindow\">\n<iframe src=\"javascript:void(0)\" frameborder=\"0\" \n        name=\"MSearchResults\" id=\"MSearchResults\">\n</iframe>\n</div>\n\n</div><!-- top -->\n<div class=\"PageDoc\"><div class=\"header\">\n  <div class=\"headertitle\">\n<div class=\"title\">Vulkan guide </div>  </div>\n</div><!--header-->\n<div class=\"contents\">\n<div class=\"toc\"><h3>Table of Contents</h3>\n<ul><li class=\"level1\"><a href=\"#vulkan_loader\">Linking against the Vulkan loader</a></li>\n<li class=\"level1\"><a href=\"#vulkan_include\">Including the Vulkan and GLFW header files</a></li>\n<li class=\"level1\"><a href=\"#vulkan_support\">Querying for Vulkan support</a><ul><li class=\"level2\"><a href=\"#vulkan_proc\">Querying Vulkan function pointers</a></li>\n</ul>\n</li>\n<li class=\"level1\"><a href=\"#vulkan_ext\">Querying required Vulkan extensions</a></li>\n<li class=\"level1\"><a href=\"#vulkan_present\">Querying for Vulkan presentation support</a></li>\n<li class=\"level1\"><a href=\"#vulkan_window\">Creating the window</a></li>\n<li class=\"level1\"><a href=\"#vulkan_surface\">Creating a Vulkan window surface</a></li>\n</ul>\n</div>\n<div class=\"textblock\"><p>This guide is intended to fill the gaps between the <a href=\"https://www.khronos.org/vulkan/\">Vulkan documentation</a> and the rest of the GLFW documentation and is not a replacement for either. It assumes some familiarity with Vulkan concepts like loaders, devices, queues and surfaces and leaves it to the Vulkan documentation to explain the details of Vulkan functions.</p>\n<p>To develop for Vulkan you should download the <a href=\"https://vulkan.lunarg.com/\">LunarG Vulkan SDK</a> for your platform. Apart from headers and link libraries, they also provide the validation layers necessary for development.</p>\n<p>For details on a specific function in this category, see the <a class=\"el\" href=\"group__vulkan.html\">Vulkan reference</a>. There are also guides for the other areas of the GLFW API.</p>\n<ul>\n<li><a class=\"el\" href=\"intro_guide.html\">Introduction to the API</a></li>\n<li><a class=\"el\" href=\"window_guide.html\">Window guide</a></li>\n<li><a class=\"el\" href=\"context_guide.html\">Context guide</a></li>\n<li><a class=\"el\" href=\"monitor_guide.html\">Monitor guide</a></li>\n<li><a class=\"el\" href=\"input_guide.html\">Input guide</a></li>\n</ul>\n<h1><a class=\"anchor\" id=\"vulkan_loader\"></a>\nLinking against the Vulkan loader</h1>\n<p>By default, GLFW will look for the Vulkan loader on demand at runtime via its standard name (<code>vulkan-1.dll</code> on Windows, <code>libvulkan.so.1</code> on Linux and other Unix-like systems and <code>libvulkan.1.dylib</code> on macOS). This means that GLFW does not need to be linked against the loader. However, it also means that if you are using the static library form of the Vulkan loader GLFW will either fail to find it or (worse) use the wrong one.</p>\n<p>The <a class=\"el\" href=\"compile_guide.html#GLFW_VULKAN_STATIC\">GLFW_VULKAN_STATIC</a> CMake option makes GLFW call the Vulkan loader directly instead of dynamically loading it at runtime. Not linking against the Vulkan loader will then be a compile-time error.</p>\n<p><b>macOS:</b> Because the Vulkan loader and ICD are not installed globally on macOS, you need to set up the application bundle according to the LunarG SDK documentation. This is explained in more detail in the <a href=\"https://vulkan.lunarg.com/doc/sdk/latest/mac/getting_started.html\">SDK documentation for macOS</a>.</p>\n<h1><a class=\"anchor\" id=\"vulkan_include\"></a>\nIncluding the Vulkan and GLFW header files</h1>\n<p>To include the Vulkan header, define <a class=\"el\" href=\"build_guide.html#GLFW_INCLUDE_VULKAN\">GLFW_INCLUDE_VULKAN</a> before including the GLFW header.</p>\n<div class=\"fragment\"><div class=\"line\"><span class=\"preprocessor\">#define GLFW_INCLUDE_VULKAN</span></div>\n<div class=\"line\"><span class=\"preprocessor\">#include &lt;GLFW/glfw3.h&gt;</span></div>\n</div><!-- fragment --><p>If you instead want to include the Vulkan header from a custom location or use your own custom Vulkan header then do this before the GLFW header.</p>\n<div class=\"fragment\"><div class=\"line\"><span class=\"preprocessor\">#include &lt;path/to/vulkan.h&gt;</span></div>\n<div class=\"line\"><span class=\"preprocessor\">#include &lt;<a class=\"code\" href=\"glfw3_8h.html\">GLFW/glfw3.h</a>&gt;</span></div>\n</div><!-- fragment --><p>Unless a Vulkan header is included, either by the GLFW header or above it, any GLFW functions that take or return Vulkan types will not be declared.</p>\n<p>The <code>VK_USE_PLATFORM_*_KHR</code> macros do not need to be defined for the Vulkan part of GLFW to work. Define them only if you are using these extensions directly.</p>\n<h1><a class=\"anchor\" id=\"vulkan_support\"></a>\nQuerying for Vulkan support</h1>\n<p>If you are linking directly against the Vulkan loader then you can skip this section. The canonical desktop loader library exports all Vulkan core and Khronos extension functions, allowing them to be called directly.</p>\n<p>If you are loading the Vulkan loader dynamically instead of linking directly against it, you can check for the availability of a loader and ICD with <a class=\"el\" href=\"group__vulkan.html#ga2e7f30931e02464b5bc8d0d4b6f9fe2b\">glfwVulkanSupported</a>.</p>\n<div class=\"fragment\"><div class=\"line\"><span class=\"keywordflow\">if</span> (<a class=\"code\" href=\"group__vulkan.html#ga2e7f30931e02464b5bc8d0d4b6f9fe2b\">glfwVulkanSupported</a>())</div>\n<div class=\"line\">{</div>\n<div class=\"line\">    <span class=\"comment\">// Vulkan is available, at least for compute</span></div>\n<div class=\"line\">}</div>\n</div><!-- fragment --><p>This function returns <code>GLFW_TRUE</code> if the Vulkan loader and any minimally functional ICD was found.</p>\n<p>If if one or both were not found, calling any other Vulkan related GLFW function will generate a <a class=\"el\" href=\"group__errors.html#ga56882b290db23261cc6c053c40c2d08e\">GLFW_API_UNAVAILABLE</a> error.</p>\n<h2><a class=\"anchor\" id=\"vulkan_proc\"></a>\nQuerying Vulkan function pointers</h2>\n<p>To load any Vulkan core or extension function from the found loader, call <a class=\"el\" href=\"group__vulkan.html#gadf228fac94c5fd8f12423ec9af9ff1e9\">glfwGetInstanceProcAddress</a>. To load functions needed for instance creation, pass <code>NULL</code> as the instance.</p>\n<div class=\"fragment\"><div class=\"line\">PFN_vkCreateInstance pfnCreateInstance = (PFN_vkCreateInstance)</div>\n<div class=\"line\">    <a class=\"code\" href=\"group__vulkan.html#gadf228fac94c5fd8f12423ec9af9ff1e9\">glfwGetInstanceProcAddress</a>(NULL, <span class=\"stringliteral\">&quot;vkCreateInstance&quot;</span>);</div>\n</div><!-- fragment --><p>Once you have created an instance, you can load from it all other Vulkan core functions and functions from any instance extensions you enabled.</p>\n<div class=\"fragment\"><div class=\"line\">PFN_vkCreateDevice pfnCreateDevice = (PFN_vkCreateDevice)</div>\n<div class=\"line\">    <a class=\"code\" href=\"group__vulkan.html#gadf228fac94c5fd8f12423ec9af9ff1e9\">glfwGetInstanceProcAddress</a>(instance, <span class=\"stringliteral\">&quot;vkCreateDevice&quot;</span>);</div>\n</div><!-- fragment --><p>This function in turn calls <code>vkGetInstanceProcAddr</code>. If that fails, the function falls back to a platform-specific query of the Vulkan loader (i.e. <code>dlsym</code> or <code>GetProcAddress</code>). If that also fails, the function returns <code>NULL</code>. For more information about <code>vkGetInstanceProcAddr</code>, see the Vulkan documentation.</p>\n<p>Vulkan also provides <code>vkGetDeviceProcAddr</code> for loading device-specific versions of Vulkan function. This function can be retrieved from an instance with <a class=\"el\" href=\"group__vulkan.html#gadf228fac94c5fd8f12423ec9af9ff1e9\">glfwGetInstanceProcAddress</a>.</p>\n<div class=\"fragment\"><div class=\"line\">PFN_vkGetDeviceProcAddr pfnGetDeviceProcAddr = (PFN_vkGetDeviceProcAddr)</div>\n<div class=\"line\">    <a class=\"code\" href=\"group__vulkan.html#gadf228fac94c5fd8f12423ec9af9ff1e9\">glfwGetInstanceProcAddress</a>(instance, <span class=\"stringliteral\">&quot;vkGetDeviceProcAddr&quot;</span>);</div>\n</div><!-- fragment --><p>Device-specific functions may execute a little bit faster, due to not having to dispatch internally based on the device passed to them. For more information about <code>vkGetDeviceProcAddr</code>, see the Vulkan documentation.</p>\n<h1><a class=\"anchor\" id=\"vulkan_ext\"></a>\nQuerying required Vulkan extensions</h1>\n<p>To do anything useful with Vulkan you need to create an instance. If you want to use Vulkan to render to a window, you must enable the instance extensions GLFW requires to create Vulkan surfaces.</p>\n<p>To query the instance extensions required, call <a class=\"el\" href=\"group__vulkan.html#ga1abcbe61033958f22f63ef82008874b1\">glfwGetRequiredInstanceExtensions</a>.</p>\n<div class=\"fragment\"><div class=\"line\">uint32_t count;</div>\n<div class=\"line\"><span class=\"keyword\">const</span> <span class=\"keywordtype\">char</span>** extensions = <a class=\"code\" href=\"group__vulkan.html#ga1abcbe61033958f22f63ef82008874b1\">glfwGetRequiredInstanceExtensions</a>(&amp;count);</div>\n</div><!-- fragment --><p>These extensions must all be enabled when creating instances that are going to be passed to <a class=\"el\" href=\"group__vulkan.html#gaff3823355cdd7e2f3f9f4d9ea9518d92\">glfwGetPhysicalDevicePresentationSupport</a> and <a class=\"el\" href=\"group__vulkan.html#ga1a24536bec3f80b08ead18e28e6ae965\">glfwCreateWindowSurface</a>. The set of extensions will vary depending on platform and may also vary depending on graphics drivers and other factors.</p>\n<p>If it fails it will return <code>NULL</code> and GLFW will not be able to create Vulkan window surfaces. You can still use Vulkan for off-screen rendering and compute work.</p>\n<p>If successful the returned array will always include <code>VK_KHR_surface</code>, so if you don't require any additional extensions you can pass this list directly to the <code>VkInstanceCreateInfo</code> struct.</p>\n<div class=\"fragment\"><div class=\"line\">VkInstanceCreateInfo ici;</div>\n<div class=\"line\"> </div>\n<div class=\"line\">memset(&amp;ici, 0, <span class=\"keyword\">sizeof</span>(ici));</div>\n<div class=\"line\">ici.enabledExtensionCount = count;</div>\n<div class=\"line\">ici.ppEnabledExtensionNames = extensions;</div>\n<div class=\"line\">...</div>\n</div><!-- fragment --><p>Additional extensions may be required by future versions of GLFW. You should check whether any extensions you wish to enable are already in the returned array, as it is an error to specify an extension more than once in the <code>VkInstanceCreateInfo</code> struct.</p>\n<h1><a class=\"anchor\" id=\"vulkan_present\"></a>\nQuerying for Vulkan presentation support</h1>\n<p>Not every queue family of every Vulkan device can present images to surfaces. To check whether a specific queue family of a physical device supports image presentation without first having to create a window and surface, call <a class=\"el\" href=\"group__vulkan.html#gaff3823355cdd7e2f3f9f4d9ea9518d92\">glfwGetPhysicalDevicePresentationSupport</a>.</p>\n<div class=\"fragment\"><div class=\"line\"><span class=\"keywordflow\">if</span> (<a class=\"code\" href=\"group__vulkan.html#gaff3823355cdd7e2f3f9f4d9ea9518d92\">glfwGetPhysicalDevicePresentationSupport</a>(instance, physical_device, queue_family_index))</div>\n<div class=\"line\">{</div>\n<div class=\"line\">    <span class=\"comment\">// Queue family supports image presentation</span></div>\n<div class=\"line\">}</div>\n</div><!-- fragment --><p>The <code>VK_KHR_surface</code> extension additionally provides the <code>vkGetPhysicalDeviceSurfaceSupportKHR</code> function, which performs the same test on an existing Vulkan surface.</p>\n<h1><a class=\"anchor\" id=\"vulkan_window\"></a>\nCreating the window</h1>\n<p>Unless you will be using OpenGL or OpenGL ES with the same window as Vulkan, there is no need to create a context. You can disable context creation with the <a class=\"el\" href=\"window_guide.html#GLFW_CLIENT_API_hint\">GLFW_CLIENT_API</a> hint.</p>\n<div class=\"fragment\"><div class=\"line\"><a class=\"code\" href=\"group__window.html#ga7d9c8c62384b1e2821c4dc48952d2033\">glfwWindowHint</a>(<a class=\"code\" href=\"group__window.html#ga649309cf72a3d3de5b1348ca7936c95b\">GLFW_CLIENT_API</a>, <a class=\"code\" href=\"glfw3_8h.html#a8f6dcdc968d214ff14779564f1389264\">GLFW_NO_API</a>);</div>\n<div class=\"line\"><a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window = <a class=\"code\" href=\"group__window.html#ga5c336fddf2cbb5b92f65f10fb6043344\">glfwCreateWindow</a>(640, 480, <span class=\"stringliteral\">&quot;Window Title&quot;</span>, NULL, NULL);</div>\n</div><!-- fragment --><p>See <a class=\"el\" href=\"context_guide.html#context_less\">Windows without contexts</a> for more information.</p>\n<h1><a class=\"anchor\" id=\"vulkan_surface\"></a>\nCreating a Vulkan window surface</h1>\n<p>You can create a Vulkan surface (as defined by the <code>VK_KHR_surface</code> extension) for a GLFW window with <a class=\"el\" href=\"group__vulkan.html#ga1a24536bec3f80b08ead18e28e6ae965\">glfwCreateWindowSurface</a>.</p>\n<div class=\"fragment\"><div class=\"line\">VkSurfaceKHR surface;</div>\n<div class=\"line\">VkResult err = <a class=\"code\" href=\"group__vulkan.html#ga1a24536bec3f80b08ead18e28e6ae965\">glfwCreateWindowSurface</a>(instance, window, NULL, &amp;surface);</div>\n<div class=\"line\"><span class=\"keywordflow\">if</span> (err)</div>\n<div class=\"line\">{</div>\n<div class=\"line\">    <span class=\"comment\">// Window surface creation failed</span></div>\n<div class=\"line\">}</div>\n</div><!-- fragment --><p>If an OpenGL or OpenGL ES context was created on the window, the context has ownership of the presentation on the window and a Vulkan surface cannot be created.</p>\n<p>It is your responsibility to destroy the surface. GLFW does not destroy it for you. Call <code>vkDestroySurfaceKHR</code> function from the same extension to destroy it. </p>\n</div></div><!-- contents -->\n</div><!-- PageDoc -->\n<div class=\"ttc\" id=\"aglfw3_8h_html\"><div class=\"ttname\"><a href=\"glfw3_8h.html\">glfw3.h</a></div><div class=\"ttdoc\">The header of the GLFW 3 API.</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_ga3c96d80d363e67d13a41b5d1821f3242\"><div class=\"ttname\"><a href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a></div><div class=\"ttdeci\">struct GLFWwindow GLFWwindow</div><div class=\"ttdoc\">Opaque window object.</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:1152</div></div>\n<div class=\"ttc\" id=\"agroup__vulkan_html_ga1abcbe61033958f22f63ef82008874b1\"><div class=\"ttname\"><a href=\"group__vulkan.html#ga1abcbe61033958f22f63ef82008874b1\">glfwGetRequiredInstanceExtensions</a></div><div class=\"ttdeci\">const char ** glfwGetRequiredInstanceExtensions(uint32_t *count)</div><div class=\"ttdoc\">Returns the Vulkan instance extensions required by GLFW.</div></div>\n<div class=\"ttc\" id=\"agroup__vulkan_html_ga2e7f30931e02464b5bc8d0d4b6f9fe2b\"><div class=\"ttname\"><a href=\"group__vulkan.html#ga2e7f30931e02464b5bc8d0d4b6f9fe2b\">glfwVulkanSupported</a></div><div class=\"ttdeci\">int glfwVulkanSupported(void)</div><div class=\"ttdoc\">Returns whether the Vulkan loader and an ICD have been found.</div></div>\n<div class=\"ttc\" id=\"agroup__vulkan_html_ga1a24536bec3f80b08ead18e28e6ae965\"><div class=\"ttname\"><a href=\"group__vulkan.html#ga1a24536bec3f80b08ead18e28e6ae965\">glfwCreateWindowSurface</a></div><div class=\"ttdeci\">VkResult glfwCreateWindowSurface(VkInstance instance, GLFWwindow *window, const VkAllocationCallbacks *allocator, VkSurfaceKHR *surface)</div><div class=\"ttdoc\">Creates a Vulkan surface for the specified window.</div></div>\n<div class=\"ttc\" id=\"aglfw3_8h_html_a8f6dcdc968d214ff14779564f1389264\"><div class=\"ttname\"><a href=\"glfw3_8h.html#a8f6dcdc968d214ff14779564f1389264\">GLFW_NO_API</a></div><div class=\"ttdeci\">#define GLFW_NO_API</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:1004</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_ga649309cf72a3d3de5b1348ca7936c95b\"><div class=\"ttname\"><a href=\"group__window.html#ga649309cf72a3d3de5b1348ca7936c95b\">GLFW_CLIENT_API</a></div><div class=\"ttdeci\">#define GLFW_CLIENT_API</div><div class=\"ttdoc\">Context client API hint and attribute.</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:917</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_ga5c336fddf2cbb5b92f65f10fb6043344\"><div class=\"ttname\"><a href=\"group__window.html#ga5c336fddf2cbb5b92f65f10fb6043344\">glfwCreateWindow</a></div><div class=\"ttdeci\">GLFWwindow * glfwCreateWindow(int width, int height, const char *title, GLFWmonitor *monitor, GLFWwindow *share)</div><div class=\"ttdoc\">Creates a window and its associated context.</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_ga7d9c8c62384b1e2821c4dc48952d2033\"><div class=\"ttname\"><a href=\"group__window.html#ga7d9c8c62384b1e2821c4dc48952d2033\">glfwWindowHint</a></div><div class=\"ttdeci\">void glfwWindowHint(int hint, int value)</div><div class=\"ttdoc\">Sets the specified window hint to the desired value.</div></div>\n<div class=\"ttc\" id=\"agroup__vulkan_html_gaff3823355cdd7e2f3f9f4d9ea9518d92\"><div class=\"ttname\"><a href=\"group__vulkan.html#gaff3823355cdd7e2f3f9f4d9ea9518d92\">glfwGetPhysicalDevicePresentationSupport</a></div><div class=\"ttdeci\">int glfwGetPhysicalDevicePresentationSupport(VkInstance instance, VkPhysicalDevice device, uint32_t queuefamily)</div><div class=\"ttdoc\">Returns whether the specified queue family can present images.</div></div>\n<div class=\"ttc\" id=\"agroup__vulkan_html_gadf228fac94c5fd8f12423ec9af9ff1e9\"><div class=\"ttname\"><a href=\"group__vulkan.html#gadf228fac94c5fd8f12423ec9af9ff1e9\">glfwGetInstanceProcAddress</a></div><div class=\"ttdeci\">GLFWvkproc glfwGetInstanceProcAddress(VkInstance instance, const char *procname)</div><div class=\"ttdoc\">Returns the address of the specified Vulkan instance function.</div></div>\n<address class=\"footer\">\n<p>\nLast update on Mon Jan 20 2020 for GLFW 3.3.2\n</p>\n</address>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/window_8dox.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta http-equiv=\"X-UA-Compatible\" content=\"IE=9\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<title>GLFW: window.dox File Reference</title>\n<link href=\"tabs.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"jquery.js\"></script>\n<script type=\"text/javascript\" src=\"dynsections.js\"></script>\n<link href=\"search/search.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"search/searchdata.js\"></script>\n<script type=\"text/javascript\" src=\"search/search.js\"></script>\n<link href=\"doxygen.css\" rel=\"stylesheet\" type=\"text/css\" />\n<link href=\"extra.css\" rel=\"stylesheet\" type=\"text/css\"/>\n</head>\n<body>\n<div id=\"top\"><!-- do not remove this div, it is closed by doxygen! -->\n<div id=\"titlearea\">\n\t<div class=\"glfwheader\">\n\t\t<a href=\"https://www.glfw.org/\" id=\"glfwhome\">GLFW</a>\n\t\t<ul class=\"glfwnavbar\">\n\t\t\t<li><a href=\"https://www.glfw.org/documentation.html\">Documentation</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/download.html\">Download</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/community.html\">Community</a></li>\n\t\t</ul>\n\t</div>\n</div>\n<!-- end header part -->\n<!-- Generated by Doxygen 1.8.16 -->\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\nvar searchBox = new SearchBox(\"searchBox\", \"search\",false,'Search');\n/* @license-end */\n</script>\n<script type=\"text/javascript\" src=\"menudata.js\"></script>\n<script type=\"text/javascript\" src=\"menu.js\"></script>\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\n$(function() {\n  initMenu('',true,false,'search.php','Search');\n  $(document).ready(function() { init_search(); });\n});\n/* @license-end */</script>\n<div id=\"main-nav\"></div>\n<!-- window showing the filter options -->\n<div id=\"MSearchSelectWindow\"\n     onmouseover=\"return searchBox.OnSearchSelectShow()\"\n     onmouseout=\"return searchBox.OnSearchSelectHide()\"\n     onkeydown=\"return searchBox.OnSearchSelectKey(event)\">\n</div>\n\n<!-- iframe showing the search results (closed by default) -->\n<div id=\"MSearchResultsWindow\">\n<iframe src=\"javascript:void(0)\" frameborder=\"0\" \n        name=\"MSearchResults\" id=\"MSearchResults\">\n</iframe>\n</div>\n\n</div><!-- top -->\n<div class=\"header\">\n  <div class=\"headertitle\">\n<div class=\"title\">window.dox File Reference</div>  </div>\n</div><!--header-->\n<div class=\"contents\">\n</div><!-- contents -->\n<address class=\"footer\">\n<p>\nLast update on Mon Jan 20 2020 for GLFW 3.3.2\n</p>\n</address>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/html/window_guide.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n<meta http-equiv=\"X-UA-Compatible\" content=\"IE=9\"/>\n<meta name=\"generator\" content=\"Doxygen 1.8.16\"/>\n<title>GLFW: Window guide</title>\n<link href=\"tabs.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"jquery.js\"></script>\n<script type=\"text/javascript\" src=\"dynsections.js\"></script>\n<link href=\"search/search.css\" rel=\"stylesheet\" type=\"text/css\"/>\n<script type=\"text/javascript\" src=\"search/searchdata.js\"></script>\n<script type=\"text/javascript\" src=\"search/search.js\"></script>\n<link href=\"doxygen.css\" rel=\"stylesheet\" type=\"text/css\" />\n<link href=\"extra.css\" rel=\"stylesheet\" type=\"text/css\"/>\n</head>\n<body>\n<div id=\"top\"><!-- do not remove this div, it is closed by doxygen! -->\n<div id=\"titlearea\">\n\t<div class=\"glfwheader\">\n\t\t<a href=\"https://www.glfw.org/\" id=\"glfwhome\">GLFW</a>\n\t\t<ul class=\"glfwnavbar\">\n\t\t\t<li><a href=\"https://www.glfw.org/documentation.html\">Documentation</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/download.html\">Download</a></li>\n\t\t\t<li><a href=\"https://www.glfw.org/community.html\">Community</a></li>\n\t\t</ul>\n\t</div>\n</div>\n<!-- end header part -->\n<!-- Generated by Doxygen 1.8.16 -->\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\nvar searchBox = new SearchBox(\"searchBox\", \"search\",false,'Search');\n/* @license-end */\n</script>\n<script type=\"text/javascript\" src=\"menudata.js\"></script>\n<script type=\"text/javascript\" src=\"menu.js\"></script>\n<script type=\"text/javascript\">\n/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\n$(function() {\n  initMenu('',true,false,'search.php','Search');\n  $(document).ready(function() { init_search(); });\n});\n/* @license-end */</script>\n<div id=\"main-nav\"></div>\n<!-- window showing the filter options -->\n<div id=\"MSearchSelectWindow\"\n     onmouseover=\"return searchBox.OnSearchSelectShow()\"\n     onmouseout=\"return searchBox.OnSearchSelectHide()\"\n     onkeydown=\"return searchBox.OnSearchSelectKey(event)\">\n</div>\n\n<!-- iframe showing the search results (closed by default) -->\n<div id=\"MSearchResultsWindow\">\n<iframe src=\"javascript:void(0)\" frameborder=\"0\" \n        name=\"MSearchResults\" id=\"MSearchResults\">\n</iframe>\n</div>\n\n</div><!-- top -->\n<div class=\"PageDoc\"><div class=\"header\">\n  <div class=\"headertitle\">\n<div class=\"title\">Window guide </div>  </div>\n</div><!--header-->\n<div class=\"contents\">\n<div class=\"toc\"><h3>Table of Contents</h3>\n<ul><li class=\"level1\"><a href=\"#window_object\">Window objects</a><ul><li class=\"level2\"><a href=\"#window_creation\">Window creation</a><ul><li class=\"level3\"><a href=\"#window_full_screen\">Full screen windows</a></li>\n<li class=\"level3\"><a href=\"#window_windowed_full_screen\">&quot;Windowed full screen&quot; windows</a></li>\n</ul>\n</li>\n<li class=\"level2\"><a href=\"#window_destruction\">Window destruction</a></li>\n<li class=\"level2\"><a href=\"#window_hints\">Window creation hints</a><ul><li class=\"level3\"><a href=\"#window_hints_hard\">Hard and soft constraints</a></li>\n<li class=\"level3\"><a href=\"#window_hints_wnd\">Window related hints</a></li>\n<li class=\"level3\"><a href=\"#window_hints_fb\">Framebuffer related hints</a></li>\n<li class=\"level3\"><a href=\"#window_hints_mtr\">Monitor related hints</a></li>\n<li class=\"level3\"><a href=\"#window_hints_ctx\">Context related hints</a></li>\n<li class=\"level3\"><a href=\"#window_hints_osx\">macOS specific window hints</a></li>\n<li class=\"level3\"><a href=\"#window_hints_x11\">X11 specific window hints</a></li>\n<li class=\"level3\"><a href=\"#window_hints_values\">Supported and default values</a></li>\n</ul>\n</li>\n</ul>\n</li>\n<li class=\"level1\"><a href=\"#window_events\">Window event processing</a></li>\n<li class=\"level1\"><a href=\"#window_properties\">Window properties and events</a><ul><li class=\"level2\"><a href=\"#window_userptr\">User pointer</a></li>\n<li class=\"level2\"><a href=\"#window_close\">Window closing and close flag</a></li>\n<li class=\"level2\"><a href=\"#window_size\">Window size</a></li>\n<li class=\"level2\"><a href=\"#window_fbsize\">Framebuffer size</a></li>\n<li class=\"level2\"><a href=\"#window_scale\">Window content scale</a></li>\n<li class=\"level2\"><a href=\"#window_sizelimits\">Window size limits</a></li>\n<li class=\"level2\"><a href=\"#window_pos\">Window position</a></li>\n<li class=\"level2\"><a href=\"#window_title\">Window title</a></li>\n<li class=\"level2\"><a href=\"#window_icon\">Window icon</a></li>\n<li class=\"level2\"><a href=\"#window_monitor\">Window monitor</a></li>\n<li class=\"level2\"><a href=\"#window_iconify\">Window iconification</a></li>\n<li class=\"level2\"><a href=\"#window_maximize\">Window maximization</a></li>\n<li class=\"level2\"><a href=\"#window_hide\">Window visibility</a></li>\n<li class=\"level2\"><a href=\"#window_focus\">Window input focus</a></li>\n<li class=\"level2\"><a href=\"#window_attention\">Window attention request</a></li>\n<li class=\"level2\"><a href=\"#window_refresh\">Window damage and refresh</a></li>\n<li class=\"level2\"><a href=\"#window_transparency\">Window transparency</a></li>\n<li class=\"level2\"><a href=\"#window_attribs\">Window attributes</a><ul><li class=\"level3\"><a href=\"#window_attribs_wnd\">Window related attributes</a></li>\n<li class=\"level3\"><a href=\"#window_attribs_ctx\">Context related attributes</a></li>\n<li class=\"level3\"><a href=\"#window_attribs_fb\">Framebuffer related attributes</a></li>\n</ul>\n</li>\n</ul>\n</li>\n<li class=\"level1\"><a href=\"#buffer_swap\">Buffer swapping</a></li>\n</ul>\n</div>\n<div class=\"textblock\"><p>This guide introduces the window related functions of GLFW. For details on a specific function in this category, see the <a class=\"el\" href=\"group__window.html\">Window reference</a>. There are also guides for the other areas of GLFW.</p>\n<ul>\n<li><a class=\"el\" href=\"intro_guide.html\">Introduction to the API</a></li>\n<li><a class=\"el\" href=\"context_guide.html\">Context guide</a></li>\n<li><a class=\"el\" href=\"vulkan_guide.html\">Vulkan guide</a></li>\n<li><a class=\"el\" href=\"monitor_guide.html\">Monitor guide</a></li>\n<li><a class=\"el\" href=\"input_guide.html\">Input guide</a></li>\n</ul>\n<h1><a class=\"anchor\" id=\"window_object\"></a>\nWindow objects</h1>\n<p>The <a class=\"el\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a> object encapsulates both a window and a context. They are created with <a class=\"el\" href=\"group__window.html#ga5c336fddf2cbb5b92f65f10fb6043344\">glfwCreateWindow</a> and destroyed with <a class=\"el\" href=\"group__window.html#gacdf43e51376051d2c091662e9fe3d7b2\">glfwDestroyWindow</a>, or <a class=\"el\" href=\"group__init.html#gaaae48c0a18607ea4a4ba951d939f0901\">glfwTerminate</a>, if any remain. As the window and context are inseparably linked, the object pointer is used as both a context and window handle.</p>\n<p>To see the event stream provided to the various window related callbacks, run the <code>events</code> test program.</p>\n<h2><a class=\"anchor\" id=\"window_creation\"></a>\nWindow creation</h2>\n<p>A window and its OpenGL or OpenGL ES context are created with <a class=\"el\" href=\"group__window.html#ga5c336fddf2cbb5b92f65f10fb6043344\">glfwCreateWindow</a>, which returns a handle to the created window object. For example, this creates a 640 by 480 windowed mode window:</p>\n<div class=\"fragment\"><div class=\"line\"><a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window = <a class=\"code\" href=\"group__window.html#ga5c336fddf2cbb5b92f65f10fb6043344\">glfwCreateWindow</a>(640, 480, <span class=\"stringliteral\">&quot;My Title&quot;</span>, NULL, NULL);</div>\n</div><!-- fragment --><p>If window creation fails, <code>NULL</code> will be returned, so it is necessary to check the return value.</p>\n<p>The window handle is passed to all window related functions and is provided to along with all input events, so event handlers can tell which window received the event.</p>\n<h3><a class=\"anchor\" id=\"window_full_screen\"></a>\nFull screen windows</h3>\n<p>To create a full screen window, you need to specify which monitor the window should use. In most cases, the user's primary monitor is a good choice. For more information about retrieving monitors, see <a class=\"el\" href=\"monitor_guide.html#monitor_monitors\">Retrieving monitors</a>.</p>\n<div class=\"fragment\"><div class=\"line\"><a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window = <a class=\"code\" href=\"group__window.html#ga5c336fddf2cbb5b92f65f10fb6043344\">glfwCreateWindow</a>(640, 480, <span class=\"stringliteral\">&quot;My Title&quot;</span>, <a class=\"code\" href=\"group__monitor.html#ga721867d84c6d18d6790d64d2847ca0b1\">glfwGetPrimaryMonitor</a>(), NULL);</div>\n</div><!-- fragment --><p>Full screen windows cover the entire display area of a monitor, have no border or decorations.</p>\n<p>Windowed mode windows can be made full screen by setting a monitor with <a class=\"el\" href=\"group__window.html#ga81c76c418af80a1cce7055bccb0ae0a7\">glfwSetWindowMonitor</a>, and full screen ones can be made windowed by unsetting it with the same function.</p>\n<p>Each field of the <a class=\"el\" href=\"structGLFWvidmode.html\">GLFWvidmode</a> structure corresponds to a function parameter or window hint and combine to form the <em>desired video mode</em> for that window. The supported video mode most closely matching the desired video mode will be set for the chosen monitor as long as the window has input focus. For more information about retrieving video modes, see <a class=\"el\" href=\"monitor_guide.html#monitor_modes\">Video modes</a>.</p>\n<table class=\"markdownTable\">\n<tr class=\"markdownTableHead\">\n<th class=\"markdownTableHeadNone\">Video mode field  </th><th class=\"markdownTableHeadNone\">Corresponds to   </th></tr>\n<tr class=\"markdownTableRowOdd\">\n<td class=\"markdownTableBodyNone\"><a class=\"el\" href=\"structGLFWvidmode.html#a698dcb200562051a7249cb6ae154c71d\">GLFWvidmode.width</a>  </td><td class=\"markdownTableBodyNone\"><code>width</code> parameter of <a class=\"el\" href=\"group__window.html#ga5c336fddf2cbb5b92f65f10fb6043344\">glfwCreateWindow</a>   </td></tr>\n<tr class=\"markdownTableRowEven\">\n<td class=\"markdownTableBodyNone\"><a class=\"el\" href=\"structGLFWvidmode.html#ac65942a5f6981695517437a9d571d03c\">GLFWvidmode.height</a>  </td><td class=\"markdownTableBodyNone\"><code>height</code> parameter of <a class=\"el\" href=\"group__window.html#ga5c336fddf2cbb5b92f65f10fb6043344\">glfwCreateWindow</a>   </td></tr>\n<tr class=\"markdownTableRowOdd\">\n<td class=\"markdownTableBodyNone\"><a class=\"el\" href=\"structGLFWvidmode.html#a6066c4ecd251098700062d3b735dba1b\">GLFWvidmode.redBits</a>  </td><td class=\"markdownTableBodyNone\"><a class=\"el\" href=\"window_guide.html#GLFW_RED_BITS\">GLFW_RED_BITS</a> hint   </td></tr>\n<tr class=\"markdownTableRowEven\">\n<td class=\"markdownTableBodyNone\"><a class=\"el\" href=\"structGLFWvidmode.html#a292fdd281f3485fb3ff102a5bda43faa\">GLFWvidmode.greenBits</a>  </td><td class=\"markdownTableBodyNone\"><a class=\"el\" href=\"window_guide.html#GLFW_GREEN_BITS\">GLFW_GREEN_BITS</a> hint   </td></tr>\n<tr class=\"markdownTableRowOdd\">\n<td class=\"markdownTableBodyNone\"><a class=\"el\" href=\"structGLFWvidmode.html#af310977f58d2e3b188175b6e3d314047\">GLFWvidmode.blueBits</a>  </td><td class=\"markdownTableBodyNone\"><a class=\"el\" href=\"window_guide.html#GLFW_BLUE_BITS\">GLFW_BLUE_BITS</a> hint   </td></tr>\n<tr class=\"markdownTableRowEven\">\n<td class=\"markdownTableBodyNone\"><a class=\"el\" href=\"structGLFWvidmode.html#a791bdd6c7697b09f7e9c97054bf05649\">GLFWvidmode.refreshRate</a>  </td><td class=\"markdownTableBodyNone\"><a class=\"el\" href=\"window_guide.html#GLFW_REFRESH_RATE\">GLFW_REFRESH_RATE</a> hint   </td></tr>\n</table>\n<p>Once you have a full screen window, you can change its resolution, refresh rate and monitor with <a class=\"el\" href=\"group__window.html#ga81c76c418af80a1cce7055bccb0ae0a7\">glfwSetWindowMonitor</a>. If you only need change its resolution you can also call <a class=\"el\" href=\"group__window.html#ga371911f12c74c504dd8d47d832d095cb\">glfwSetWindowSize</a>. In all cases, the new video mode will be selected the same way as the video mode chosen by <a class=\"el\" href=\"group__window.html#ga5c336fddf2cbb5b92f65f10fb6043344\">glfwCreateWindow</a>. If the window has an OpenGL or OpenGL ES context, it will be unaffected.</p>\n<p>By default, the original video mode of the monitor will be restored and the window iconified if it loses input focus, to allow the user to switch back to the desktop. This behavior can be disabled with the <a class=\"el\" href=\"window_guide.html#GLFW_AUTO_ICONIFY_hint\">GLFW_AUTO_ICONIFY</a> window hint, for example if you wish to simultaneously cover multiple monitors with full screen windows.</p>\n<p>If a monitor is disconnected, all windows that are full screen on that monitor will be switched to windowed mode. See <a class=\"el\" href=\"monitor_guide.html#monitor_event\">Monitor configuration changes</a> for more information.</p>\n<h3><a class=\"anchor\" id=\"window_windowed_full_screen\"></a>\n\"Windowed full screen\" windows</h3>\n<p>If the closest match for the desired video mode is the current one, the video mode will not be changed, making window creation faster and application switching much smoother. This is sometimes called <em>windowed full screen</em> or <em>borderless full screen</em> window and counts as a full screen window. To create such a window, request the current video mode.</p>\n<div class=\"fragment\"><div class=\"line\"><span class=\"keyword\">const</span> <a class=\"code\" href=\"structGLFWvidmode.html\">GLFWvidmode</a>* mode = <a class=\"code\" href=\"group__monitor.html#gafc1bb972a921ad5b3bd5d63a95fc2d52\">glfwGetVideoMode</a>(monitor);</div>\n<div class=\"line\"> </div>\n<div class=\"line\"><a class=\"code\" href=\"group__window.html#ga7d9c8c62384b1e2821c4dc48952d2033\">glfwWindowHint</a>(<a class=\"code\" href=\"group__window.html#gaf78ed8e417dbcc1e354906cc2708c982\">GLFW_RED_BITS</a>, mode-&gt;<a class=\"code\" href=\"structGLFWvidmode.html#a6066c4ecd251098700062d3b735dba1b\">redBits</a>);</div>\n<div class=\"line\"><a class=\"code\" href=\"group__window.html#ga7d9c8c62384b1e2821c4dc48952d2033\">glfwWindowHint</a>(<a class=\"code\" href=\"group__window.html#gafba3b72638c914e5fb8a237dd4c50d4d\">GLFW_GREEN_BITS</a>, mode-&gt;<a class=\"code\" href=\"structGLFWvidmode.html#a292fdd281f3485fb3ff102a5bda43faa\">greenBits</a>);</div>\n<div class=\"line\"><a class=\"code\" href=\"group__window.html#ga7d9c8c62384b1e2821c4dc48952d2033\">glfwWindowHint</a>(<a class=\"code\" href=\"group__window.html#gab292ea403db6d514537b515311bf9ae3\">GLFW_BLUE_BITS</a>, mode-&gt;<a class=\"code\" href=\"structGLFWvidmode.html#af310977f58d2e3b188175b6e3d314047\">blueBits</a>);</div>\n<div class=\"line\"><a class=\"code\" href=\"group__window.html#ga7d9c8c62384b1e2821c4dc48952d2033\">glfwWindowHint</a>(<a class=\"code\" href=\"group__window.html#ga0f20825e6e47ee8ba389024519682212\">GLFW_REFRESH_RATE</a>, mode-&gt;<a class=\"code\" href=\"structGLFWvidmode.html#a791bdd6c7697b09f7e9c97054bf05649\">refreshRate</a>);</div>\n<div class=\"line\"> </div>\n<div class=\"line\"><a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window = <a class=\"code\" href=\"group__window.html#ga5c336fddf2cbb5b92f65f10fb6043344\">glfwCreateWindow</a>(mode-&gt;<a class=\"code\" href=\"structGLFWvidmode.html#a698dcb200562051a7249cb6ae154c71d\">width</a>, mode-&gt;<a class=\"code\" href=\"structGLFWvidmode.html#ac65942a5f6981695517437a9d571d03c\">height</a>, <span class=\"stringliteral\">&quot;My Title&quot;</span>, monitor, NULL);</div>\n</div><!-- fragment --><p>This also works for windowed mode windows that are made full screen.</p>\n<div class=\"fragment\"><div class=\"line\"><span class=\"keyword\">const</span> <a class=\"code\" href=\"structGLFWvidmode.html\">GLFWvidmode</a>* mode = <a class=\"code\" href=\"group__monitor.html#gafc1bb972a921ad5b3bd5d63a95fc2d52\">glfwGetVideoMode</a>(monitor);</div>\n<div class=\"line\"> </div>\n<div class=\"line\"><a class=\"code\" href=\"group__window.html#ga81c76c418af80a1cce7055bccb0ae0a7\">glfwSetWindowMonitor</a>(window, monitor, 0, 0, mode-&gt;<a class=\"code\" href=\"structGLFWvidmode.html#a698dcb200562051a7249cb6ae154c71d\">width</a>, mode-&gt;<a class=\"code\" href=\"structGLFWvidmode.html#ac65942a5f6981695517437a9d571d03c\">height</a>, mode-&gt;<a class=\"code\" href=\"structGLFWvidmode.html#a791bdd6c7697b09f7e9c97054bf05649\">refreshRate</a>);</div>\n</div><!-- fragment --><p>Note that <a class=\"el\" href=\"group__monitor.html#gafc1bb972a921ad5b3bd5d63a95fc2d52\">glfwGetVideoMode</a> returns the <em>current</em> video mode of a monitor, so if you already have a full screen window on that monitor that you want to make windowed full screen, you need to have saved the desktop resolution before.</p>\n<h2><a class=\"anchor\" id=\"window_destruction\"></a>\nWindow destruction</h2>\n<p>When a window is no longer needed, destroy it with <a class=\"el\" href=\"group__window.html#gacdf43e51376051d2c091662e9fe3d7b2\">glfwDestroyWindow</a>.</p>\n<div class=\"fragment\"><div class=\"line\"><a class=\"code\" href=\"group__window.html#gacdf43e51376051d2c091662e9fe3d7b2\">glfwDestroyWindow</a>(window);</div>\n</div><!-- fragment --><p>Window destruction always succeeds. Before the actual destruction, all callbacks are removed so no further events will be delivered for the window. All windows remaining when <a class=\"el\" href=\"group__init.html#gaaae48c0a18607ea4a4ba951d939f0901\">glfwTerminate</a> is called are destroyed as well.</p>\n<p>When a full screen window is destroyed, the original video mode of its monitor is restored, but the gamma ramp is left untouched.</p>\n<h2><a class=\"anchor\" id=\"window_hints\"></a>\nWindow creation hints</h2>\n<p>There are a number of hints that can be set before the creation of a window and context. Some affect the window itself, others affect the framebuffer or context. These hints are set to their default values each time the library is initialized with <a class=\"el\" href=\"group__init.html#ga317aac130a235ab08c6db0834907d85e\">glfwInit</a>. Integer value hints can be set individually with <a class=\"el\" href=\"group__window.html#ga7d9c8c62384b1e2821c4dc48952d2033\">glfwWindowHint</a> and string value hints with <a class=\"el\" href=\"group__window.html#ga8cb2782861c9d997bcf2dea97f363e5f\">glfwWindowHintString</a>. You can reset all at once to their defaults with <a class=\"el\" href=\"group__window.html#gaa77c4898dfb83344a6b4f76aa16b9a4a\">glfwDefaultWindowHints</a>.</p>\n<p>Some hints are platform specific. These are always valid to set on any platform but they will only affect their specific platform. Other platforms will ignore them. Setting these hints requires no platform specific headers or calls.</p>\n<dl class=\"section note\"><dt>Note</dt><dd>Window hints need to be set before the creation of the window and context you wish to have the specified attributes. They function as additional arguments to <a class=\"el\" href=\"group__window.html#ga5c336fddf2cbb5b92f65f10fb6043344\">glfwCreateWindow</a>.</dd></dl>\n<h3><a class=\"anchor\" id=\"window_hints_hard\"></a>\nHard and soft constraints</h3>\n<p>Some window hints are hard constraints. These must match the available capabilities <em>exactly</em> for window and context creation to succeed. Hints that are not hard constraints are matched as closely as possible, but the resulting context and framebuffer may differ from what these hints requested.</p>\n<p>The following hints are always hard constraints:</p><ul>\n<li><a class=\"el\" href=\"window_guide.html#GLFW_STEREO\">GLFW_STEREO</a></li>\n<li><a class=\"el\" href=\"window_guide.html#GLFW_DOUBLEBUFFER\">GLFW_DOUBLEBUFFER</a></li>\n<li><a class=\"el\" href=\"window_guide.html#GLFW_CLIENT_API_hint\">GLFW_CLIENT_API</a></li>\n<li><a class=\"el\" href=\"window_guide.html#GLFW_CONTEXT_CREATION_API_hint\">GLFW_CONTEXT_CREATION_API</a></li>\n</ul>\n<p>The following additional hints are hard constraints when requesting an OpenGL context, but are ignored when requesting an OpenGL ES context:</p><ul>\n<li><a class=\"el\" href=\"window_guide.html#GLFW_OPENGL_FORWARD_COMPAT_hint\">GLFW_OPENGL_FORWARD_COMPAT</a></li>\n<li><a class=\"el\" href=\"window_guide.html#GLFW_OPENGL_PROFILE_hint\">GLFW_OPENGL_PROFILE</a></li>\n</ul>\n<h3><a class=\"anchor\" id=\"window_hints_wnd\"></a>\nWindow related hints</h3>\n<p><a class=\"anchor\" id=\"GLFW_RESIZABLE_hint\"></a><b>GLFW_RESIZABLE</b> specifies whether the windowed mode window will be resizable <em>by the user</em>. The window will still be resizable using the <a class=\"el\" href=\"group__window.html#ga371911f12c74c504dd8d47d832d095cb\">glfwSetWindowSize</a> function. Possible values are <code>GLFW_TRUE</code> and <code>GLFW_FALSE</code>. This hint is ignored for full screen and undecorated windows.</p>\n<p><a class=\"anchor\" id=\"GLFW_VISIBLE_hint\"></a><b>GLFW_VISIBLE</b> specifies whether the windowed mode window will be initially visible. Possible values are <code>GLFW_TRUE</code> and <code>GLFW_FALSE</code>. This hint is ignored for full screen windows.</p>\n<p><a class=\"anchor\" id=\"GLFW_DECORATED_hint\"></a><b>GLFW_DECORATED</b> specifies whether the windowed mode window will have window decorations such as a border, a close widget, etc. An undecorated window will not be resizable by the user but will still allow the user to generate close events on some platforms. Possible values are <code>GLFW_TRUE</code> and <code>GLFW_FALSE</code>. This hint is ignored for full screen windows.</p>\n<p><a class=\"anchor\" id=\"GLFW_FOCUSED_hint\"></a><b>GLFW_FOCUSED</b> specifies whether the windowed mode window will be given input focus when created. Possible values are <code>GLFW_TRUE</code> and <code>GLFW_FALSE</code>. This hint is ignored for full screen and initially hidden windows.</p>\n<p><a class=\"anchor\" id=\"GLFW_AUTO_ICONIFY_hint\"></a><b>GLFW_AUTO_ICONIFY</b> specifies whether the full screen window will automatically iconify and restore the previous video mode on input focus loss. Possible values are <code>GLFW_TRUE</code> and <code>GLFW_FALSE</code>. This hint is ignored for windowed mode windows.</p>\n<p><a class=\"anchor\" id=\"GLFW_FLOATING_hint\"></a><b>GLFW_FLOATING</b> specifies whether the windowed mode window will be floating above other regular windows, also called topmost or always-on-top. This is intended primarily for debugging purposes and cannot be used to implement proper full screen windows. Possible values are <code>GLFW_TRUE</code> and <code>GLFW_FALSE</code>. This hint is ignored for full screen windows.</p>\n<p><a class=\"anchor\" id=\"GLFW_MAXIMIZED_hint\"></a><b>GLFW_MAXIMIZED</b> specifies whether the windowed mode window will be maximized when created. Possible values are <code>GLFW_TRUE</code> and <code>GLFW_FALSE</code>. This hint is ignored for full screen windows.</p>\n<p><a class=\"anchor\" id=\"GLFW_CENTER_CURSOR_hint\"></a><b>GLFW_CENTER_CURSOR</b> specifies whether the cursor should be centered over newly created full screen windows. Possible values are <code>GLFW_TRUE</code> and <code>GLFW_FALSE</code>. This hint is ignored for windowed mode windows.</p>\n<p><a class=\"anchor\" id=\"GLFW_TRANSPARENT_FRAMEBUFFER_hint\"></a><b>GLFW_TRANSPARENT_FRAMEBUFFER</b> specifies whether the window framebuffer will be transparent. If enabled and supported by the system, the window framebuffer alpha channel will be used to combine the framebuffer with the background. This does not affect window decorations. Possible values are <code>GLFW_TRUE</code> and <code>GLFW_FALSE</code>.</p>\n<dl class=\"section user\"><dt></dt><dd><b>Windows:</b> GLFW sets a color key for the window to work around repainting issues with a transparent framebuffer. The chosen color value is RGB 255,0,255 (magenta). This will make pixels with that exact color fully transparent regardless of their alpha values. If this is a problem, make these pixels any other color before buffer swap.</dd></dl>\n<p><a class=\"anchor\" id=\"GLFW_FOCUS_ON_SHOW_hint\"></a><b>GLFW_FOCUS_ON_SHOW</b> specifies whether the window will be given input focus when <a class=\"el\" href=\"group__window.html#ga61be47917b72536a148300f46494fc66\">glfwShowWindow</a> is called. Possible values are <code>GLFW_TRUE</code> and <code>GLFW_FALSE</code>.</p>\n<p><a class=\"anchor\" id=\"GLFW_SCALE_TO_MONITOR\"></a><b>GLFW_SCALE_TO_MONITOR</b> specified whether the window content area should be resized based on the <a class=\"el\" href=\"monitor_guide.html#monitor_scale\">monitor content scale</a> of any monitor it is placed on. This includes the initial placement when the window is created. Possible values are <code>GLFW_TRUE</code> and <code>GLFW_FALSE</code>.</p>\n<p>This hint only has an effect on platforms where screen coordinates and pixels always map 1:1 such as Windows and X11. On platforms like macOS the resolution of the framebuffer is changed independently of the window size.</p>\n<h3><a class=\"anchor\" id=\"window_hints_fb\"></a>\nFramebuffer related hints</h3>\n<p><a class=\"anchor\" id=\"GLFW_RED_BITS\"></a><a class=\"anchor\" id=\"GLFW_GREEN_BITS\"></a><a class=\"anchor\" id=\"GLFW_BLUE_BITS\"></a><a class=\"anchor\" id=\"GLFW_ALPHA_BITS\"></a><a class=\"anchor\" id=\"GLFW_DEPTH_BITS\"></a><a class=\"anchor\" id=\"GLFW_STENCIL_BITS\"></a><b>GLFW_RED_BITS</b>, <b>GLFW_GREEN_BITS</b>, <b>GLFW_BLUE_BITS</b>, <b>GLFW_ALPHA_BITS</b>, <b>GLFW_DEPTH_BITS</b> and <b>GLFW_STENCIL_BITS</b> specify the desired bit depths of the various components of the default framebuffer. A value of <code>GLFW_DONT_CARE</code> means the application has no preference.</p>\n<p><a class=\"anchor\" id=\"GLFW_ACCUM_RED_BITS\"></a><a class=\"anchor\" id=\"GLFW_ACCUM_GREEN_BITS\"></a><a class=\"anchor\" id=\"GLFW_ACCUM_BLUE_BITS\"></a><a class=\"anchor\" id=\"GLFW_ACCUM_ALPHA_BITS\"></a><b>GLFW_ACCUM_RED_BITS</b>, <b>GLFW_ACCUM_GREEN_BITS</b>, <b>GLFW_ACCUM_BLUE_BITS</b> and <b>GLFW_ACCUM_ALPHA_BITS</b> specify the desired bit depths of the various components of the accumulation buffer. A value of <code>GLFW_DONT_CARE</code> means the application has no preference.</p>\n<dl class=\"section user\"><dt></dt><dd>Accumulation buffers are a legacy OpenGL feature and should not be used in new code.</dd></dl>\n<p><a class=\"anchor\" id=\"GLFW_AUX_BUFFERS\"></a><b>GLFW_AUX_BUFFERS</b> specifies the desired number of auxiliary buffers. A value of <code>GLFW_DONT_CARE</code> means the application has no preference.</p>\n<dl class=\"section user\"><dt></dt><dd>Auxiliary buffers are a legacy OpenGL feature and should not be used in new code.</dd></dl>\n<p><a class=\"anchor\" id=\"GLFW_STEREO\"></a><b>GLFW_STEREO</b> specifies whether to use OpenGL stereoscopic rendering. Possible values are <code>GLFW_TRUE</code> and <code>GLFW_FALSE</code>. This is a hard constraint.</p>\n<p><a class=\"anchor\" id=\"GLFW_SAMPLES\"></a><b>GLFW_SAMPLES</b> specifies the desired number of samples to use for multisampling. Zero disables multisampling. A value of <code>GLFW_DONT_CARE</code> means the application has no preference.</p>\n<p><a class=\"anchor\" id=\"GLFW_SRGB_CAPABLE\"></a><b>GLFW_SRGB_CAPABLE</b> specifies whether the framebuffer should be sRGB capable. Possible values are <code>GLFW_TRUE</code> and <code>GLFW_FALSE</code>.</p>\n<dl class=\"section user\"><dt></dt><dd><b>OpenGL:</b> If enabled and supported by the system, the <code>GL_FRAMEBUFFER_SRGB</code> enable will control sRGB rendering. By default, sRGB rendering will be disabled.</dd></dl>\n<dl class=\"section user\"><dt></dt><dd><b>OpenGL ES:</b> If enabled and supported by the system, the context will always have sRGB rendering enabled.</dd></dl>\n<p><a class=\"anchor\" id=\"GLFW_DOUBLEBUFFER\"></a><b>GLFW_DOUBLEBUFFER</b> specifies whether the framebuffer should be double buffered. You nearly always want to use double buffering. This is a hard constraint. Possible values are <code>GLFW_TRUE</code> and <code>GLFW_FALSE</code>.</p>\n<h3><a class=\"anchor\" id=\"window_hints_mtr\"></a>\nMonitor related hints</h3>\n<p><a class=\"anchor\" id=\"GLFW_REFRESH_RATE\"></a><b>GLFW_REFRESH_RATE</b> specifies the desired refresh rate for full screen windows. A value of <code>GLFW_DONT_CARE</code> means the highest available refresh rate will be used. This hint is ignored for windowed mode windows.</p>\n<h3><a class=\"anchor\" id=\"window_hints_ctx\"></a>\nContext related hints</h3>\n<p><a class=\"anchor\" id=\"GLFW_CLIENT_API_hint\"></a><b>GLFW_CLIENT_API</b> specifies which client API to create the context for. Possible values are <code>GLFW_OPENGL_API</code>, <code>GLFW_OPENGL_ES_API</code> and <code>GLFW_NO_API</code>. This is a hard constraint.</p>\n<p><a class=\"anchor\" id=\"GLFW_CONTEXT_CREATION_API_hint\"></a><b>GLFW_CONTEXT_CREATION_API</b> specifies which context creation API to use to create the context. Possible values are <code>GLFW_NATIVE_CONTEXT_API</code>, <code>GLFW_EGL_CONTEXT_API</code> and <code>GLFW_OSMESA_CONTEXT_API</code>. This is a hard constraint. If no client API is requested, this hint is ignored.</p>\n<dl class=\"section user\"><dt></dt><dd><b>macOS:</b> The EGL API is not available on this platform and requests to use it will fail.</dd></dl>\n<dl class=\"section user\"><dt></dt><dd><b>Wayland:</b> The EGL API <em>is</em> the native context creation API, so this hint will have no effect.</dd></dl>\n<dl class=\"section user\"><dt></dt><dd><b>OSMesa:</b> As its name implies, an OpenGL context created with OSMesa does not update the window contents when its buffers are swapped. Use OpenGL functions or the OSMesa native access functions <a class=\"el\" href=\"group__native.html#ga3b36e3e3dcf308b776427b6bd73cc132\">glfwGetOSMesaColorBuffer</a> and <a class=\"el\" href=\"group__native.html#ga6b64039ffc88a7a2f57f0956c0c75d53\">glfwGetOSMesaDepthBuffer</a> to retrieve the framebuffer contents.</dd></dl>\n<dl class=\"section note\"><dt>Note</dt><dd>An OpenGL extension loader library that assumes it knows which context creation API is used on a given platform may fail if you change this hint. This can be resolved by having it load via <a class=\"el\" href=\"group__context.html#ga35f1837e6f666781842483937612f163\">glfwGetProcAddress</a>, which always uses the selected API.</dd></dl>\n<dl class=\"bug\"><dt><b><a class=\"el\" href=\"bug.html#_bug000001\">Bug:</a></b></dt><dd>On some Linux systems, creating contexts via both the native and EGL APIs in a single process will cause the application to segfault. Stick to one API or the other on Linux for now.</dd></dl>\n<p><a class=\"anchor\" id=\"GLFW_CONTEXT_VERSION_MAJOR_hint\"></a><a class=\"anchor\" id=\"GLFW_CONTEXT_VERSION_MINOR_hint\"></a><b>GLFW_CONTEXT_VERSION_MAJOR</b> and <b>GLFW_CONTEXT_VERSION_MINOR</b> specify the client API version that the created context must be compatible with. The exact behavior of these hints depend on the requested client API.</p>\n<dl class=\"section note\"><dt>Note</dt><dd>Do not confuse these hints with <code>GLFW_VERSION_MAJOR</code> and <code>GLFW_VERSION_MINOR</code>, which provide the API version of the GLFW header.</dd></dl>\n<dl class=\"section user\"><dt></dt><dd><b>OpenGL:</b> These hints are not hard constraints, but creation will fail if the OpenGL version of the created context is less than the one requested. It is therefore perfectly safe to use the default of version 1.0 for legacy code and you will still get backwards-compatible contexts of version 3.0 and above when available.</dd></dl>\n<dl class=\"section user\"><dt></dt><dd>While there is no way to ask the driver for a context of the highest supported version, GLFW will attempt to provide this when you ask for a version 1.0 context, which is the default for these hints.</dd></dl>\n<dl class=\"section user\"><dt></dt><dd><b>OpenGL ES:</b> These hints are not hard constraints, but creation will fail if the OpenGL ES version of the created context is less than the one requested. Additionally, OpenGL ES 1.x cannot be returned if 2.0 or later was requested, and vice versa. This is because OpenGL ES 3.x is backward compatible with 2.0, but OpenGL ES 2.0 is not backward compatible with 1.x.</dd></dl>\n<dl class=\"section note\"><dt>Note</dt><dd><b>macOS:</b> The OS only supports forward-compatible core profile contexts for OpenGL versions 3.2 and later. Before creating an OpenGL context of version 3.2 or later you must set the <a class=\"el\" href=\"window_guide.html#GLFW_OPENGL_FORWARD_COMPAT_hint\">GLFW_OPENGL_FORWARD_COMPAT</a> and <a class=\"el\" href=\"window_guide.html#GLFW_OPENGL_PROFILE_hint\">GLFW_OPENGL_PROFILE</a> hints accordingly. OpenGL 3.0 and 3.1 contexts are not supported at all on macOS.</dd></dl>\n<p><a class=\"anchor\" id=\"GLFW_OPENGL_FORWARD_COMPAT_hint\"></a><b>GLFW_OPENGL_FORWARD_COMPAT</b> specifies whether the OpenGL context should be forward-compatible, i.e. one where all functionality deprecated in the requested version of OpenGL is removed. This must only be used if the requested OpenGL version is 3.0 or above. If OpenGL ES is requested, this hint is ignored.</p>\n<dl class=\"section user\"><dt></dt><dd>Forward-compatibility is described in detail in the <a href=\"https://www.opengl.org/registry/\">OpenGL Reference Manual</a>.</dd></dl>\n<p><a class=\"anchor\" id=\"GLFW_OPENGL_DEBUG_CONTEXT_hint\"></a><b>GLFW_OPENGL_DEBUG_CONTEXT</b> specifies whether to create a debug OpenGL context, which may have additional error and performance issue reporting functionality. Possible values are <code>GLFW_TRUE</code> and <code>GLFW_FALSE</code>. If OpenGL ES is requested, this hint is ignored.</p>\n<p><a class=\"anchor\" id=\"GLFW_OPENGL_PROFILE_hint\"></a><b>GLFW_OPENGL_PROFILE</b> specifies which OpenGL profile to create the context for. Possible values are one of <code>GLFW_OPENGL_CORE_PROFILE</code> or <code>GLFW_OPENGL_COMPAT_PROFILE</code>, or <code>GLFW_OPENGL_ANY_PROFILE</code> to not request a specific profile. If requesting an OpenGL version below 3.2, <code>GLFW_OPENGL_ANY_PROFILE</code> must be used. If OpenGL ES is requested, this hint is ignored.</p>\n<dl class=\"section user\"><dt></dt><dd>OpenGL profiles are described in detail in the <a href=\"https://www.opengl.org/registry/\">OpenGL Reference Manual</a>.</dd></dl>\n<p><a class=\"anchor\" id=\"GLFW_CONTEXT_ROBUSTNESS_hint\"></a><b>GLFW_CONTEXT_ROBUSTNESS</b> specifies the robustness strategy to be used by the context. This can be one of <code>GLFW_NO_RESET_NOTIFICATION</code> or <code>GLFW_LOSE_CONTEXT_ON_RESET</code>, or <code>GLFW_NO_ROBUSTNESS</code> to not request a robustness strategy.</p>\n<p><a class=\"anchor\" id=\"GLFW_CONTEXT_RELEASE_BEHAVIOR_hint\"></a><b>GLFW_CONTEXT_RELEASE_BEHAVIOR</b> specifies the release behavior to be used by the context. Possible values are one of <code>GLFW_ANY_RELEASE_BEHAVIOR</code>, <code>GLFW_RELEASE_BEHAVIOR_FLUSH</code> or <code>GLFW_RELEASE_BEHAVIOR_NONE</code>. If the behavior is <code>GLFW_ANY_RELEASE_BEHAVIOR</code>, the default behavior of the context creation API will be used. If the behavior is <code>GLFW_RELEASE_BEHAVIOR_FLUSH</code>, the pipeline will be flushed whenever the context is released from being the current one. If the behavior is <code>GLFW_RELEASE_BEHAVIOR_NONE</code>, the pipeline will not be flushed on release.</p>\n<dl class=\"section user\"><dt></dt><dd>Context release behaviors are described in detail by the <a href=\"https://www.opengl.org/registry/specs/KHR/context_flush_control.txt\">GL_KHR_context_flush_control</a> extension.</dd></dl>\n<p><a class=\"anchor\" id=\"GLFW_CONTEXT_NO_ERROR_hint\"></a><b>GLFW_CONTEXT_NO_ERROR</b> specifies whether errors should be generated by the context. Possible values are <code>GLFW_TRUE</code> and <code>GLFW_FALSE</code>. If enabled, situations that would have generated errors instead cause undefined behavior.</p>\n<dl class=\"section user\"><dt></dt><dd>The no error mode for OpenGL and OpenGL ES is described in detail by the <a href=\"https://www.opengl.org/registry/specs/KHR/no_error.txt\">GL_KHR_no_error</a> extension.</dd></dl>\n<h3><a class=\"anchor\" id=\"window_hints_osx\"></a>\nmacOS specific window hints</h3>\n<p><a class=\"anchor\" id=\"GLFW_COCOA_RETINA_FRAMEBUFFER_hint\"></a><b>GLFW_COCOA_RETINA_FRAMEBUFFER</b> specifies whether to use full resolution framebuffers on Retina displays. Possible values are <code>GLFW_TRUE</code> and <code>GLFW_FALSE</code>. This is ignored on other platforms.</p>\n<p><a class=\"anchor\" id=\"GLFW_COCOA_FRAME_NAME_hint\"></a><b>GLFW_COCOA_FRAME_NAME</b> specifies the UTF-8 encoded name to use for autosaving the window frame, or if empty disables frame autosaving for the window. This is ignored on other platforms. This is set with <a class=\"el\" href=\"group__window.html#ga8cb2782861c9d997bcf2dea97f363e5f\">glfwWindowHintString</a>.</p>\n<p><a class=\"anchor\" id=\"GLFW_COCOA_GRAPHICS_SWITCHING_hint\"></a><b>GLFW_COCOA_GRAPHICS_SWITCHING</b> specifies whether to in Automatic Graphics Switching, i.e. to allow the system to choose the integrated GPU for the OpenGL context and move it between GPUs if necessary or whether to force it to always run on the discrete GPU. This only affects systems with both integrated and discrete GPUs. Possible values are <code>GLFW_TRUE</code> and <code>GLFW_FALSE</code>. This is ignored on other platforms.</p>\n<dl class=\"section user\"><dt></dt><dd>Simpler programs and tools may want to enable this to save power, while games and other applications performing advanced rendering will want to leave it disabled.</dd></dl>\n<dl class=\"section user\"><dt></dt><dd>A bundled application that wishes to participate in Automatic Graphics Switching should also declare this in its <code>Info.plist</code> by setting the <code>NSSupportsAutomaticGraphicsSwitching</code> key to <code>true</code>.</dd></dl>\n<h3><a class=\"anchor\" id=\"window_hints_x11\"></a>\nX11 specific window hints</h3>\n<p><a class=\"anchor\" id=\"GLFW_X11_CLASS_NAME_hint\"></a><a class=\"anchor\" id=\"GLFW_X11_INSTANCE_NAME_hint\"></a><b>GLFW_X11_CLASS_NAME</b> and <b>GLFW_X11_INSTANCE_NAME</b> specifies the desired ASCII encoded class and instance parts of the ICCCM <code>WM_CLASS</code> window property. These are set with <a class=\"el\" href=\"group__window.html#ga8cb2782861c9d997bcf2dea97f363e5f\">glfwWindowHintString</a>.</p>\n<h3><a class=\"anchor\" id=\"window_hints_values\"></a>\nSupported and default values</h3>\n<table class=\"markdownTable\">\n<tr class=\"markdownTableHead\">\n<th class=\"markdownTableHeadNone\">Window hint  </th><th class=\"markdownTableHeadNone\">Default value  </th><th class=\"markdownTableHeadNone\">Supported values   </th></tr>\n<tr class=\"markdownTableRowOdd\">\n<td class=\"markdownTableBodyNone\">GLFW_RESIZABLE  </td><td class=\"markdownTableBodyNone\"><code>GLFW_TRUE</code>  </td><td class=\"markdownTableBodyNone\"><code>GLFW_TRUE</code> or <code>GLFW_FALSE</code>   </td></tr>\n<tr class=\"markdownTableRowEven\">\n<td class=\"markdownTableBodyNone\">GLFW_VISIBLE  </td><td class=\"markdownTableBodyNone\"><code>GLFW_TRUE</code>  </td><td class=\"markdownTableBodyNone\"><code>GLFW_TRUE</code> or <code>GLFW_FALSE</code>   </td></tr>\n<tr class=\"markdownTableRowOdd\">\n<td class=\"markdownTableBodyNone\">GLFW_DECORATED  </td><td class=\"markdownTableBodyNone\"><code>GLFW_TRUE</code>  </td><td class=\"markdownTableBodyNone\"><code>GLFW_TRUE</code> or <code>GLFW_FALSE</code>   </td></tr>\n<tr class=\"markdownTableRowEven\">\n<td class=\"markdownTableBodyNone\">GLFW_FOCUSED  </td><td class=\"markdownTableBodyNone\"><code>GLFW_TRUE</code>  </td><td class=\"markdownTableBodyNone\"><code>GLFW_TRUE</code> or <code>GLFW_FALSE</code>   </td></tr>\n<tr class=\"markdownTableRowOdd\">\n<td class=\"markdownTableBodyNone\">GLFW_AUTO_ICONIFY  </td><td class=\"markdownTableBodyNone\"><code>GLFW_TRUE</code>  </td><td class=\"markdownTableBodyNone\"><code>GLFW_TRUE</code> or <code>GLFW_FALSE</code>   </td></tr>\n<tr class=\"markdownTableRowEven\">\n<td class=\"markdownTableBodyNone\">GLFW_FLOATING  </td><td class=\"markdownTableBodyNone\"><code>GLFW_FALSE</code>  </td><td class=\"markdownTableBodyNone\"><code>GLFW_TRUE</code> or <code>GLFW_FALSE</code>   </td></tr>\n<tr class=\"markdownTableRowOdd\">\n<td class=\"markdownTableBodyNone\">GLFW_MAXIMIZED  </td><td class=\"markdownTableBodyNone\"><code>GLFW_FALSE</code>  </td><td class=\"markdownTableBodyNone\"><code>GLFW_TRUE</code> or <code>GLFW_FALSE</code>   </td></tr>\n<tr class=\"markdownTableRowEven\">\n<td class=\"markdownTableBodyNone\">GLFW_CENTER_CURSOR  </td><td class=\"markdownTableBodyNone\"><code>GLFW_TRUE</code>  </td><td class=\"markdownTableBodyNone\"><code>GLFW_TRUE</code> or <code>GLFW_FALSE</code>   </td></tr>\n<tr class=\"markdownTableRowOdd\">\n<td class=\"markdownTableBodyNone\">GLFW_TRANSPARENT_FRAMEBUFFER  </td><td class=\"markdownTableBodyNone\"><code>GLFW_FALSE</code>  </td><td class=\"markdownTableBodyNone\"><code>GLFW_TRUE</code> or <code>GLFW_FALSE</code>   </td></tr>\n<tr class=\"markdownTableRowEven\">\n<td class=\"markdownTableBodyNone\">GLFW_FOCUS_ON_SHOW  </td><td class=\"markdownTableBodyNone\"><code>GLFW_TRUE</code>  </td><td class=\"markdownTableBodyNone\"><code>GLFW_TRUE</code> or <code>GLFW_FALSE</code>   </td></tr>\n<tr class=\"markdownTableRowOdd\">\n<td class=\"markdownTableBodyNone\">GLFW_SCALE_TO_MONITOR  </td><td class=\"markdownTableBodyNone\"><code>GLFW_FALSE</code>  </td><td class=\"markdownTableBodyNone\"><code>GLFW_TRUE</code> or <code>GLFW_FALSE</code>   </td></tr>\n<tr class=\"markdownTableRowEven\">\n<td class=\"markdownTableBodyNone\">GLFW_RED_BITS  </td><td class=\"markdownTableBodyNone\">8  </td><td class=\"markdownTableBodyNone\">0 to <code>INT_MAX</code> or <code>GLFW_DONT_CARE</code>   </td></tr>\n<tr class=\"markdownTableRowOdd\">\n<td class=\"markdownTableBodyNone\">GLFW_GREEN_BITS  </td><td class=\"markdownTableBodyNone\">8  </td><td class=\"markdownTableBodyNone\">0 to <code>INT_MAX</code> or <code>GLFW_DONT_CARE</code>   </td></tr>\n<tr class=\"markdownTableRowEven\">\n<td class=\"markdownTableBodyNone\">GLFW_BLUE_BITS  </td><td class=\"markdownTableBodyNone\">8  </td><td class=\"markdownTableBodyNone\">0 to <code>INT_MAX</code> or <code>GLFW_DONT_CARE</code>   </td></tr>\n<tr class=\"markdownTableRowOdd\">\n<td class=\"markdownTableBodyNone\">GLFW_ALPHA_BITS  </td><td class=\"markdownTableBodyNone\">8  </td><td class=\"markdownTableBodyNone\">0 to <code>INT_MAX</code> or <code>GLFW_DONT_CARE</code>   </td></tr>\n<tr class=\"markdownTableRowEven\">\n<td class=\"markdownTableBodyNone\">GLFW_DEPTH_BITS  </td><td class=\"markdownTableBodyNone\">24  </td><td class=\"markdownTableBodyNone\">0 to <code>INT_MAX</code> or <code>GLFW_DONT_CARE</code>   </td></tr>\n<tr class=\"markdownTableRowOdd\">\n<td class=\"markdownTableBodyNone\">GLFW_STENCIL_BITS  </td><td class=\"markdownTableBodyNone\">8  </td><td class=\"markdownTableBodyNone\">0 to <code>INT_MAX</code> or <code>GLFW_DONT_CARE</code>   </td></tr>\n<tr class=\"markdownTableRowEven\">\n<td class=\"markdownTableBodyNone\">GLFW_ACCUM_RED_BITS  </td><td class=\"markdownTableBodyNone\">0  </td><td class=\"markdownTableBodyNone\">0 to <code>INT_MAX</code> or <code>GLFW_DONT_CARE</code>   </td></tr>\n<tr class=\"markdownTableRowOdd\">\n<td class=\"markdownTableBodyNone\">GLFW_ACCUM_GREEN_BITS  </td><td class=\"markdownTableBodyNone\">0  </td><td class=\"markdownTableBodyNone\">0 to <code>INT_MAX</code> or <code>GLFW_DONT_CARE</code>   </td></tr>\n<tr class=\"markdownTableRowEven\">\n<td class=\"markdownTableBodyNone\">GLFW_ACCUM_BLUE_BITS  </td><td class=\"markdownTableBodyNone\">0  </td><td class=\"markdownTableBodyNone\">0 to <code>INT_MAX</code> or <code>GLFW_DONT_CARE</code>   </td></tr>\n<tr class=\"markdownTableRowOdd\">\n<td class=\"markdownTableBodyNone\">GLFW_ACCUM_ALPHA_BITS  </td><td class=\"markdownTableBodyNone\">0  </td><td class=\"markdownTableBodyNone\">0 to <code>INT_MAX</code> or <code>GLFW_DONT_CARE</code>   </td></tr>\n<tr class=\"markdownTableRowEven\">\n<td class=\"markdownTableBodyNone\">GLFW_AUX_BUFFERS  </td><td class=\"markdownTableBodyNone\">0  </td><td class=\"markdownTableBodyNone\">0 to <code>INT_MAX</code> or <code>GLFW_DONT_CARE</code>   </td></tr>\n<tr class=\"markdownTableRowOdd\">\n<td class=\"markdownTableBodyNone\">GLFW_SAMPLES  </td><td class=\"markdownTableBodyNone\">0  </td><td class=\"markdownTableBodyNone\">0 to <code>INT_MAX</code> or <code>GLFW_DONT_CARE</code>   </td></tr>\n<tr class=\"markdownTableRowEven\">\n<td class=\"markdownTableBodyNone\">GLFW_REFRESH_RATE  </td><td class=\"markdownTableBodyNone\"><code>GLFW_DONT_CARE</code>  </td><td class=\"markdownTableBodyNone\">0 to <code>INT_MAX</code> or <code>GLFW_DONT_CARE</code>   </td></tr>\n<tr class=\"markdownTableRowOdd\">\n<td class=\"markdownTableBodyNone\">GLFW_STEREO  </td><td class=\"markdownTableBodyNone\"><code>GLFW_FALSE</code>  </td><td class=\"markdownTableBodyNone\"><code>GLFW_TRUE</code> or <code>GLFW_FALSE</code>   </td></tr>\n<tr class=\"markdownTableRowEven\">\n<td class=\"markdownTableBodyNone\">GLFW_SRGB_CAPABLE  </td><td class=\"markdownTableBodyNone\"><code>GLFW_FALSE</code>  </td><td class=\"markdownTableBodyNone\"><code>GLFW_TRUE</code> or <code>GLFW_FALSE</code>   </td></tr>\n<tr class=\"markdownTableRowOdd\">\n<td class=\"markdownTableBodyNone\">GLFW_DOUBLEBUFFER  </td><td class=\"markdownTableBodyNone\"><code>GLFW_TRUE</code>  </td><td class=\"markdownTableBodyNone\"><code>GLFW_TRUE</code> or <code>GLFW_FALSE</code>   </td></tr>\n<tr class=\"markdownTableRowEven\">\n<td class=\"markdownTableBodyNone\">GLFW_CLIENT_API  </td><td class=\"markdownTableBodyNone\"><code>GLFW_OPENGL_API</code>  </td><td class=\"markdownTableBodyNone\"><code>GLFW_OPENGL_API</code>, <code>GLFW_OPENGL_ES_API</code> or <code>GLFW_NO_API</code>   </td></tr>\n<tr class=\"markdownTableRowOdd\">\n<td class=\"markdownTableBodyNone\">GLFW_CONTEXT_CREATION_API  </td><td class=\"markdownTableBodyNone\"><code>GLFW_NATIVE_CONTEXT_API</code>  </td><td class=\"markdownTableBodyNone\"><code>GLFW_NATIVE_CONTEXT_API</code>, <code>GLFW_EGL_CONTEXT_API</code> or <code>GLFW_OSMESA_CONTEXT_API</code>   </td></tr>\n<tr class=\"markdownTableRowEven\">\n<td class=\"markdownTableBodyNone\">GLFW_CONTEXT_VERSION_MAJOR  </td><td class=\"markdownTableBodyNone\">1  </td><td class=\"markdownTableBodyNone\">Any valid major version number of the chosen client API   </td></tr>\n<tr class=\"markdownTableRowOdd\">\n<td class=\"markdownTableBodyNone\">GLFW_CONTEXT_VERSION_MINOR  </td><td class=\"markdownTableBodyNone\">0  </td><td class=\"markdownTableBodyNone\">Any valid minor version number of the chosen client API   </td></tr>\n<tr class=\"markdownTableRowEven\">\n<td class=\"markdownTableBodyNone\">GLFW_CONTEXT_ROBUSTNESS  </td><td class=\"markdownTableBodyNone\"><code>GLFW_NO_ROBUSTNESS</code>  </td><td class=\"markdownTableBodyNone\"><code>GLFW_NO_ROBUSTNESS</code>, <code>GLFW_NO_RESET_NOTIFICATION</code> or <code>GLFW_LOSE_CONTEXT_ON_RESET</code>   </td></tr>\n<tr class=\"markdownTableRowOdd\">\n<td class=\"markdownTableBodyNone\">GLFW_CONTEXT_RELEASE_BEHAVIOR  </td><td class=\"markdownTableBodyNone\"><code>GLFW_ANY_RELEASE_BEHAVIOR</code>  </td><td class=\"markdownTableBodyNone\"><code>GLFW_ANY_RELEASE_BEHAVIOR</code>, <code>GLFW_RELEASE_BEHAVIOR_FLUSH</code> or <code>GLFW_RELEASE_BEHAVIOR_NONE</code>   </td></tr>\n<tr class=\"markdownTableRowEven\">\n<td class=\"markdownTableBodyNone\">GLFW_OPENGL_FORWARD_COMPAT  </td><td class=\"markdownTableBodyNone\"><code>GLFW_FALSE</code>  </td><td class=\"markdownTableBodyNone\"><code>GLFW_TRUE</code> or <code>GLFW_FALSE</code>   </td></tr>\n<tr class=\"markdownTableRowOdd\">\n<td class=\"markdownTableBodyNone\">GLFW_OPENGL_DEBUG_CONTEXT  </td><td class=\"markdownTableBodyNone\"><code>GLFW_FALSE</code>  </td><td class=\"markdownTableBodyNone\"><code>GLFW_TRUE</code> or <code>GLFW_FALSE</code>   </td></tr>\n<tr class=\"markdownTableRowEven\">\n<td class=\"markdownTableBodyNone\">GLFW_OPENGL_PROFILE  </td><td class=\"markdownTableBodyNone\"><code>GLFW_OPENGL_ANY_PROFILE</code>  </td><td class=\"markdownTableBodyNone\"><code>GLFW_OPENGL_ANY_PROFILE</code>, <code>GLFW_OPENGL_COMPAT_PROFILE</code> or <code>GLFW_OPENGL_CORE_PROFILE</code>   </td></tr>\n<tr class=\"markdownTableRowOdd\">\n<td class=\"markdownTableBodyNone\">GLFW_COCOA_RETINA_FRAMEBUFFER  </td><td class=\"markdownTableBodyNone\"><code>GLFW_TRUE</code>  </td><td class=\"markdownTableBodyNone\"><code>GLFW_TRUE</code> or <code>GLFW_FALSE</code>   </td></tr>\n<tr class=\"markdownTableRowEven\">\n<td class=\"markdownTableBodyNone\">GLFW_COCOA_FRAME_NAME  </td><td class=\"markdownTableBodyNone\"><code>\"\"</code>  </td><td class=\"markdownTableBodyNone\">A UTF-8 encoded frame autosave name   </td></tr>\n<tr class=\"markdownTableRowOdd\">\n<td class=\"markdownTableBodyNone\">GLFW_COCOA_GRAPHICS_SWITCHING  </td><td class=\"markdownTableBodyNone\"><code>GLFW_FALSE</code>  </td><td class=\"markdownTableBodyNone\"><code>GLFW_TRUE</code> or <code>GLFW_FALSE</code>   </td></tr>\n<tr class=\"markdownTableRowEven\">\n<td class=\"markdownTableBodyNone\">GLFW_X11_CLASS_NAME  </td><td class=\"markdownTableBodyNone\"><code>\"\"</code>  </td><td class=\"markdownTableBodyNone\">An ASCII encoded <code>WM_CLASS</code> class name   </td></tr>\n<tr class=\"markdownTableRowOdd\">\n<td class=\"markdownTableBodyNone\">GLFW_X11_INSTANCE_NAME  </td><td class=\"markdownTableBodyNone\"><code>\"\"</code>  </td><td class=\"markdownTableBodyNone\">An ASCII encoded <code>WM_CLASS</code> instance name   </td></tr>\n</table>\n<h1><a class=\"anchor\" id=\"window_events\"></a>\nWindow event processing</h1>\n<p>See <a class=\"el\" href=\"input_guide.html#events\">Event processing</a>.</p>\n<h1><a class=\"anchor\" id=\"window_properties\"></a>\nWindow properties and events</h1>\n<h2><a class=\"anchor\" id=\"window_userptr\"></a>\nUser pointer</h2>\n<p>Each window has a user pointer that can be set with <a class=\"el\" href=\"group__window.html#ga3d2fc6026e690ab31a13f78bc9fd3651\">glfwSetWindowUserPointer</a> and queried with <a class=\"el\" href=\"group__window.html#ga17807ce0f45ac3f8bb50d6dcc59a4e06\">glfwGetWindowUserPointer</a>. This can be used for any purpose you need and will not be modified by GLFW throughout the life-time of the window.</p>\n<p>The initial value of the pointer is <code>NULL</code>.</p>\n<h2><a class=\"anchor\" id=\"window_close\"></a>\nWindow closing and close flag</h2>\n<p>When the user attempts to close the window, for example by clicking the close widget or using a key chord like Alt+F4, the <em>close flag</em> of the window is set. The window is however not actually destroyed and, unless you watch for this state change, nothing further happens.</p>\n<p>The current state of the close flag is returned by <a class=\"el\" href=\"group__window.html#ga24e02fbfefbb81fc45320989f8140ab5\">glfwWindowShouldClose</a> and can be set or cleared directly with <a class=\"el\" href=\"group__window.html#ga49c449dde2a6f87d996f4daaa09d6708\">glfwSetWindowShouldClose</a>. A common pattern is to use the close flag as a main loop condition.</p>\n<div class=\"fragment\"><div class=\"line\"><span class=\"keywordflow\">while</span> (!<a class=\"code\" href=\"group__window.html#ga24e02fbfefbb81fc45320989f8140ab5\">glfwWindowShouldClose</a>(window))</div>\n<div class=\"line\">{</div>\n<div class=\"line\">    render(window);</div>\n<div class=\"line\"> </div>\n<div class=\"line\">    <a class=\"code\" href=\"group__window.html#ga15a5a1ee5b3c2ca6b15ca209a12efd14\">glfwSwapBuffers</a>(window);</div>\n<div class=\"line\">    <a class=\"code\" href=\"group__window.html#ga37bd57223967b4211d60ca1a0bf3c832\">glfwPollEvents</a>();</div>\n<div class=\"line\">}</div>\n</div><!-- fragment --><p>If you wish to be notified when the user attempts to close a window, set a close callback.</p>\n<div class=\"fragment\"><div class=\"line\"><a class=\"code\" href=\"group__window.html#gada646d775a7776a95ac000cfc1885331\">glfwSetWindowCloseCallback</a>(window, window_close_callback);</div>\n</div><!-- fragment --><p>The callback function is called directly <em>after</em> the close flag has been set. It can be used for example to filter close requests and clear the close flag again unless certain conditions are met.</p>\n<div class=\"fragment\"><div class=\"line\"><span class=\"keywordtype\">void</span> window_close_callback(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window)</div>\n<div class=\"line\">{</div>\n<div class=\"line\">    <span class=\"keywordflow\">if</span> (!time_to_close)</div>\n<div class=\"line\">        <a class=\"code\" href=\"group__window.html#ga49c449dde2a6f87d996f4daaa09d6708\">glfwSetWindowShouldClose</a>(window, <a class=\"code\" href=\"group__init.html#gac877fe3b627d21ef3a0a23e0a73ba8c5\">GLFW_FALSE</a>);</div>\n<div class=\"line\">}</div>\n</div><!-- fragment --><h2><a class=\"anchor\" id=\"window_size\"></a>\nWindow size</h2>\n<p>The size of a window can be changed with <a class=\"el\" href=\"group__window.html#ga371911f12c74c504dd8d47d832d095cb\">glfwSetWindowSize</a>. For windowed mode windows, this sets the size, in <a class=\"el\" href=\"intro_guide.html#coordinate_systems\">screen coordinates</a> of the <em>content area</em> or <em>content area</em> of the window. The window system may impose limits on window size.</p>\n<div class=\"fragment\"><div class=\"line\"><a class=\"code\" href=\"group__window.html#ga371911f12c74c504dd8d47d832d095cb\">glfwSetWindowSize</a>(window, 640, 480);</div>\n</div><!-- fragment --><p>For full screen windows, the specified size becomes the new resolution of the window's desired video mode. The video mode most closely matching the new desired video mode is set immediately. The window is resized to fit the resolution of the set video mode.</p>\n<p>If you wish to be notified when a window is resized, whether by the user, the system or your own code, set a size callback.</p>\n<div class=\"fragment\"><div class=\"line\"><a class=\"code\" href=\"group__window.html#gad91b8b047a0c4c6033c38853864c34f8\">glfwSetWindowSizeCallback</a>(window, window_size_callback);</div>\n</div><!-- fragment --><p>The callback function receives the new size, in screen coordinates, of the content area of the window when the window is resized.</p>\n<div class=\"fragment\"><div class=\"line\"><span class=\"keywordtype\">void</span> window_size_callback(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window, <span class=\"keywordtype\">int</span> width, <span class=\"keywordtype\">int</span> height)</div>\n<div class=\"line\">{</div>\n<div class=\"line\">}</div>\n</div><!-- fragment --><p>There is also <a class=\"el\" href=\"group__window.html#gaeea7cbc03373a41fb51cfbf9f2a5d4c6\">glfwGetWindowSize</a> for directly retrieving the current size of a window.</p>\n<div class=\"fragment\"><div class=\"line\"><span class=\"keywordtype\">int</span> width, height;</div>\n<div class=\"line\"><a class=\"code\" href=\"group__window.html#gaeea7cbc03373a41fb51cfbf9f2a5d4c6\">glfwGetWindowSize</a>(window, &amp;width, &amp;height);</div>\n</div><!-- fragment --><dl class=\"section note\"><dt>Note</dt><dd>Do not pass the window size to <code>glViewport</code> or other pixel-based OpenGL calls. The window size is in screen coordinates, not pixels. Use the <a class=\"el\" href=\"window_guide.html#window_fbsize\">framebuffer size</a>, which is in pixels, for pixel-based calls.</dd></dl>\n<p>The above functions work with the size of the content area, but decorated windows typically have title bars and window frames around this rectangle. You can retrieve the extents of these with <a class=\"el\" href=\"group__window.html#ga1a9fd382058c53101b21cf211898f1f1\">glfwGetWindowFrameSize</a>.</p>\n<div class=\"fragment\"><div class=\"line\"><span class=\"keywordtype\">int</span> left, top, right, bottom;</div>\n<div class=\"line\"><a class=\"code\" href=\"group__window.html#ga1a9fd382058c53101b21cf211898f1f1\">glfwGetWindowFrameSize</a>(window, &amp;left, &amp;top, &amp;right, &amp;bottom);</div>\n</div><!-- fragment --><p>The returned values are the distances, in screen coordinates, from the edges of the content area to the corresponding edges of the full window. As they are distances and not coordinates, they are always zero or positive.</p>\n<h2><a class=\"anchor\" id=\"window_fbsize\"></a>\nFramebuffer size</h2>\n<p>While the size of a window is measured in screen coordinates, OpenGL works with pixels. The size you pass into <code>glViewport</code>, for example, should be in pixels. On some machines screen coordinates and pixels are the same, but on others they will not be. There is a second set of functions to retrieve the size, in pixels, of the framebuffer of a window.</p>\n<p>If you wish to be notified when the framebuffer of a window is resized, whether by the user or the system, set a size callback.</p>\n<div class=\"fragment\"><div class=\"line\"><a class=\"code\" href=\"group__window.html#gab3fb7c3366577daef18c0023e2a8591f\">glfwSetFramebufferSizeCallback</a>(window, framebuffer_size_callback);</div>\n</div><!-- fragment --><p>The callback function receives the new size of the framebuffer when it is resized, which can for example be used to update the OpenGL viewport.</p>\n<div class=\"fragment\"><div class=\"line\"><span class=\"keywordtype\">void</span> framebuffer_size_callback(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window, <span class=\"keywordtype\">int</span> width, <span class=\"keywordtype\">int</span> height)</div>\n<div class=\"line\">{</div>\n<div class=\"line\">    glViewport(0, 0, width, height);</div>\n<div class=\"line\">}</div>\n</div><!-- fragment --><p>There is also <a class=\"el\" href=\"group__window.html#ga0e2637a4161afb283f5300c7f94785c9\">glfwGetFramebufferSize</a> for directly retrieving the current size of the framebuffer of a window.</p>\n<div class=\"fragment\"><div class=\"line\"><span class=\"keywordtype\">int</span> width, height;</div>\n<div class=\"line\"><a class=\"code\" href=\"group__window.html#ga0e2637a4161afb283f5300c7f94785c9\">glfwGetFramebufferSize</a>(window, &amp;width, &amp;height);</div>\n<div class=\"line\">glViewport(0, 0, width, height);</div>\n</div><!-- fragment --><p>The size of a framebuffer may change independently of the size of a window, for example if the window is dragged between a regular monitor and a high-DPI one.</p>\n<h2><a class=\"anchor\" id=\"window_scale\"></a>\nWindow content scale</h2>\n<p>The content scale for a window can be retrieved with <a class=\"el\" href=\"group__window.html#gaf5d31de9c19c4f994facea64d2b3106c\">glfwGetWindowContentScale</a>.</p>\n<div class=\"fragment\"><div class=\"line\"><span class=\"keywordtype\">float</span> xscale, yscale;</div>\n<div class=\"line\"><a class=\"code\" href=\"group__window.html#gaf5d31de9c19c4f994facea64d2b3106c\">glfwGetWindowContentScale</a>(window, &amp;xscale, &amp;yscale);</div>\n</div><!-- fragment --><p>The content scale is the ratio between the current DPI and the platform's default DPI. This is especially important for text and any UI elements. If the pixel dimensions of your UI scaled by this look appropriate on your machine then it should appear at a reasonable size on other machines regardless of their DPI and scaling settings. This relies on the system DPI and scaling settings being somewhat correct.</p>\n<p>On systems where each monitors can have its own content scale, the window content scale will depend on which monitor the system considers the window to be on.</p>\n<p>If you wish to be notified when the content scale of a window changes, whether because of a system setting change or because it was moved to a monitor with a different scale, set a content scale callback.</p>\n<div class=\"fragment\"><div class=\"line\"><a class=\"code\" href=\"group__window.html#gaf2832ebb5aa6c252a2d261de002c92d6\">glfwSetWindowContentScaleCallback</a>(window, window_content_scale_callback);</div>\n</div><!-- fragment --><p>The callback function receives the new content scale of the window.</p>\n<div class=\"fragment\"><div class=\"line\"><span class=\"keywordtype\">void</span> window_content_scale_callback(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window, <span class=\"keywordtype\">float</span> xscale, <span class=\"keywordtype\">float</span> yscale)</div>\n<div class=\"line\">{</div>\n<div class=\"line\">    set_interface_scale(xscale, yscale);</div>\n<div class=\"line\">}</div>\n</div><!-- fragment --><p>On platforms where pixels and screen coordinates always map 1:1, the window will need to be resized to appear the same size when it is moved to a monitor with a different content scale. To have this done automatically both when the window is created and when its content scale later changes, set the <a class=\"el\" href=\"window_guide.html#GLFW_SCALE_TO_MONITOR\">GLFW_SCALE_TO_MONITOR</a> window hint.</p>\n<h2><a class=\"anchor\" id=\"window_sizelimits\"></a>\nWindow size limits</h2>\n<p>The minimum and maximum size of the content area of a windowed mode window can be enforced with <a class=\"el\" href=\"group__window.html#gac314fa6cec7d2d307be9963e2709cc90\">glfwSetWindowSizeLimits</a>. The user may resize the window to any size and aspect ratio within the specified limits, unless the aspect ratio is also set.</p>\n<div class=\"fragment\"><div class=\"line\"><a class=\"code\" href=\"group__window.html#gac314fa6cec7d2d307be9963e2709cc90\">glfwSetWindowSizeLimits</a>(window, 200, 200, 400, 400);</div>\n</div><!-- fragment --><p>To specify only a minimum size or only a maximum one, set the other pair to <code>GLFW_DONT_CARE</code>.</p>\n<div class=\"fragment\"><div class=\"line\"><a class=\"code\" href=\"group__window.html#gac314fa6cec7d2d307be9963e2709cc90\">glfwSetWindowSizeLimits</a>(window, 640, 480, <a class=\"code\" href=\"glfw3_8h.html#a7a2edf2c18446833d27d07f1b7f3d571\">GLFW_DONT_CARE</a>, <a class=\"code\" href=\"glfw3_8h.html#a7a2edf2c18446833d27d07f1b7f3d571\">GLFW_DONT_CARE</a>);</div>\n</div><!-- fragment --><p>To disable size limits for a window, set them all to <code>GLFW_DONT_CARE</code>.</p>\n<p>The aspect ratio of the content area of a windowed mode window can be enforced with <a class=\"el\" href=\"group__window.html#ga72ac8cb1ee2e312a878b55153d81b937\">glfwSetWindowAspectRatio</a>. The user may resize the window freely unless size limits are also set, but the size will be constrained to maintain the aspect ratio.</p>\n<div class=\"fragment\"><div class=\"line\"><a class=\"code\" href=\"group__window.html#ga72ac8cb1ee2e312a878b55153d81b937\">glfwSetWindowAspectRatio</a>(window, 16, 9);</div>\n</div><!-- fragment --><p>The aspect ratio is specified as a numerator and denominator, corresponding to the width and height, respectively. If you want a window to maintain its current aspect ratio, use its current size as the ratio.</p>\n<div class=\"fragment\"><div class=\"line\"><span class=\"keywordtype\">int</span> width, height;</div>\n<div class=\"line\"><a class=\"code\" href=\"group__window.html#gaeea7cbc03373a41fb51cfbf9f2a5d4c6\">glfwGetWindowSize</a>(window, &amp;width, &amp;height);</div>\n<div class=\"line\"><a class=\"code\" href=\"group__window.html#ga72ac8cb1ee2e312a878b55153d81b937\">glfwSetWindowAspectRatio</a>(window, width, height);</div>\n</div><!-- fragment --><p>To disable the aspect ratio limit for a window, set both terms to <code>GLFW_DONT_CARE</code>.</p>\n<p>You can have both size limits and aspect ratio set for a window, but the results are undefined if they conflict.</p>\n<h2><a class=\"anchor\" id=\"window_pos\"></a>\nWindow position</h2>\n<p>The position of a windowed-mode window can be changed with <a class=\"el\" href=\"group__window.html#ga1abb6d690e8c88e0c8cd1751356dbca8\">glfwSetWindowPos</a>. This moves the window so that the upper-left corner of its content area has the specified <a class=\"el\" href=\"intro_guide.html#coordinate_systems\">screen coordinates</a>. The window system may put limitations on window placement.</p>\n<div class=\"fragment\"><div class=\"line\"><a class=\"code\" href=\"group__window.html#ga1abb6d690e8c88e0c8cd1751356dbca8\">glfwSetWindowPos</a>(window, 100, 100);</div>\n</div><!-- fragment --><p>If you wish to be notified when a window is moved, whether by the user, the system or your own code, set a position callback.</p>\n<div class=\"fragment\"><div class=\"line\"><a class=\"code\" href=\"group__window.html#ga08bdfbba88934f9c4f92fd757979ac74\">glfwSetWindowPosCallback</a>(window, window_pos_callback);</div>\n</div><!-- fragment --><p>The callback function receives the new position, in screen coordinates, of the upper-left corner of the content area when the window is moved.</p>\n<div class=\"fragment\"><div class=\"line\"><span class=\"keywordtype\">void</span> window_pos_callback(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window, <span class=\"keywordtype\">int</span> xpos, <span class=\"keywordtype\">int</span> ypos)</div>\n<div class=\"line\">{</div>\n<div class=\"line\">}</div>\n</div><!-- fragment --><p>There is also <a class=\"el\" href=\"group__window.html#ga73cb526c000876fd8ddf571570fdb634\">glfwGetWindowPos</a> for directly retrieving the current position of the content area of the window.</p>\n<div class=\"fragment\"><div class=\"line\"><span class=\"keywordtype\">int</span> xpos, ypos;</div>\n<div class=\"line\"><a class=\"code\" href=\"group__window.html#ga73cb526c000876fd8ddf571570fdb634\">glfwGetWindowPos</a>(window, &amp;xpos, &amp;ypos);</div>\n</div><!-- fragment --><h2><a class=\"anchor\" id=\"window_title\"></a>\nWindow title</h2>\n<p>All GLFW windows have a title, although undecorated or full screen windows may not display it or only display it in a task bar or similar interface. You can set a UTF-8 encoded window title with <a class=\"el\" href=\"group__window.html#ga5d877f09e968cef7a360b513306f17ff\">glfwSetWindowTitle</a>.</p>\n<div class=\"fragment\"><div class=\"line\"><a class=\"code\" href=\"group__window.html#ga5d877f09e968cef7a360b513306f17ff\">glfwSetWindowTitle</a>(window, <span class=\"stringliteral\">&quot;My Window&quot;</span>);</div>\n</div><!-- fragment --><p>The specified string is copied before the function returns, so there is no need to keep it around.</p>\n<p>As long as your source file is encoded as UTF-8, you can use any Unicode characters directly in the source.</p>\n<div class=\"fragment\"><div class=\"line\"><a class=\"code\" href=\"group__window.html#ga5d877f09e968cef7a360b513306f17ff\">glfwSetWindowTitle</a>(window, <span class=\"stringliteral\">&quot;ラストエグザイル&quot;</span>);</div>\n</div><!-- fragment --><p>If you are using C++11 or C11, you can use a UTF-8 string literal.</p>\n<div class=\"fragment\"><div class=\"line\"><a class=\"code\" href=\"group__window.html#ga5d877f09e968cef7a360b513306f17ff\">glfwSetWindowTitle</a>(window, u8<span class=\"stringliteral\">&quot;This is always a UTF-8 string&quot;</span>);</div>\n</div><!-- fragment --><h2><a class=\"anchor\" id=\"window_icon\"></a>\nWindow icon</h2>\n<p>Decorated windows have icons on some platforms. You can set this icon by specifying a list of candidate images with <a class=\"el\" href=\"group__window.html#gadd7ccd39fe7a7d1f0904666ae5932dc5\">glfwSetWindowIcon</a>.</p>\n<div class=\"fragment\"><div class=\"line\"><a class=\"code\" href=\"structGLFWimage.html\">GLFWimage</a> images[2];</div>\n<div class=\"line\">images[0] = load_icon(<span class=\"stringliteral\">&quot;my_icon.png&quot;</span>);</div>\n<div class=\"line\">images[1] = load_icon(<span class=\"stringliteral\">&quot;my_icon_small.png&quot;</span>);</div>\n<div class=\"line\"> </div>\n<div class=\"line\"><a class=\"code\" href=\"group__window.html#gadd7ccd39fe7a7d1f0904666ae5932dc5\">glfwSetWindowIcon</a>(window, 2, images);</div>\n</div><!-- fragment --><p>The image data is 32-bit, little-endian, non-premultiplied RGBA, i.e. eight bits per channel with the red channel first. The pixels are arranged canonically as sequential rows, starting from the top-left corner.</p>\n<p>To revert to the default window icon, pass in an empty image array.</p>\n<div class=\"fragment\"><div class=\"line\"><a class=\"code\" href=\"group__window.html#gadd7ccd39fe7a7d1f0904666ae5932dc5\">glfwSetWindowIcon</a>(window, 0, NULL);</div>\n</div><!-- fragment --><h2><a class=\"anchor\" id=\"window_monitor\"></a>\nWindow monitor</h2>\n<p>Full screen windows are associated with a specific monitor. You can get the handle for this monitor with <a class=\"el\" href=\"group__window.html#gaeac25e64789974ccbe0811766bd91a16\">glfwGetWindowMonitor</a>.</p>\n<div class=\"fragment\"><div class=\"line\"><a class=\"code\" href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a>* monitor = <a class=\"code\" href=\"group__window.html#gaeac25e64789974ccbe0811766bd91a16\">glfwGetWindowMonitor</a>(window);</div>\n</div><!-- fragment --><p>This monitor handle is one of those returned by <a class=\"el\" href=\"group__monitor.html#ga3fba51c8bd36491d4712aa5bd074a537\">glfwGetMonitors</a>.</p>\n<p>For windowed mode windows, this function returns <code>NULL</code>. This is how to tell full screen windows from windowed mode windows.</p>\n<p>You can move windows between monitors or between full screen and windowed mode with <a class=\"el\" href=\"group__window.html#ga81c76c418af80a1cce7055bccb0ae0a7\">glfwSetWindowMonitor</a>. When making a window full screen on the same or on a different monitor, specify the desired monitor, resolution and refresh rate. The position arguments are ignored.</p>\n<div class=\"fragment\"><div class=\"line\"><span class=\"keyword\">const</span> <a class=\"code\" href=\"structGLFWvidmode.html\">GLFWvidmode</a>* mode = <a class=\"code\" href=\"group__monitor.html#gafc1bb972a921ad5b3bd5d63a95fc2d52\">glfwGetVideoMode</a>(monitor);</div>\n<div class=\"line\"> </div>\n<div class=\"line\"><a class=\"code\" href=\"group__window.html#ga81c76c418af80a1cce7055bccb0ae0a7\">glfwSetWindowMonitor</a>(window, monitor, 0, 0, mode-&gt;<a class=\"code\" href=\"structGLFWvidmode.html#a698dcb200562051a7249cb6ae154c71d\">width</a>, mode-&gt;<a class=\"code\" href=\"structGLFWvidmode.html#ac65942a5f6981695517437a9d571d03c\">height</a>, mode-&gt;<a class=\"code\" href=\"structGLFWvidmode.html#a791bdd6c7697b09f7e9c97054bf05649\">refreshRate</a>);</div>\n</div><!-- fragment --><p>When making the window windowed, specify the desired position and size. The refresh rate argument is ignored.</p>\n<div class=\"fragment\"><div class=\"line\"><a class=\"code\" href=\"group__window.html#ga81c76c418af80a1cce7055bccb0ae0a7\">glfwSetWindowMonitor</a>(window, NULL, xpos, ypos, width, height, 0);</div>\n</div><!-- fragment --><p>This restores any previous window settings such as whether it is decorated, floating, resizable, has size or aspect ratio limits, etc.. To restore a window that was originally windowed to its original size and position, save these before making it full screen and then pass them in as above.</p>\n<h2><a class=\"anchor\" id=\"window_iconify\"></a>\nWindow iconification</h2>\n<p>Windows can be iconified (i.e. minimized) with <a class=\"el\" href=\"group__window.html#ga1bb559c0ebaad63c5c05ad2a066779c4\">glfwIconifyWindow</a>.</p>\n<div class=\"fragment\"><div class=\"line\"><a class=\"code\" href=\"group__window.html#ga1bb559c0ebaad63c5c05ad2a066779c4\">glfwIconifyWindow</a>(window);</div>\n</div><!-- fragment --><p>When a full screen window is iconified, the original video mode of its monitor is restored until the user or application restores the window.</p>\n<p>Iconified windows can be restored with <a class=\"el\" href=\"group__window.html#ga52527a5904b47d802b6b4bb519cdebc7\">glfwRestoreWindow</a>. This function also restores windows from maximization.</p>\n<div class=\"fragment\"><div class=\"line\"><a class=\"code\" href=\"group__window.html#ga52527a5904b47d802b6b4bb519cdebc7\">glfwRestoreWindow</a>(window);</div>\n</div><!-- fragment --><p>When a full screen window is restored, the desired video mode is restored to its monitor as well.</p>\n<p>If you wish to be notified when a window is iconified or restored, whether by the user, system or your own code, set an iconify callback.</p>\n<div class=\"fragment\"><div class=\"line\"><a class=\"code\" href=\"group__window.html#gac793e9efd255567b5fb8b445052cfd3e\">glfwSetWindowIconifyCallback</a>(window, window_iconify_callback);</div>\n</div><!-- fragment --><p>The callback function receives changes in the iconification state of the window.</p>\n<div class=\"fragment\"><div class=\"line\"><span class=\"keywordtype\">void</span> window_iconify_callback(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window, <span class=\"keywordtype\">int</span> iconified)</div>\n<div class=\"line\">{</div>\n<div class=\"line\">    <span class=\"keywordflow\">if</span> (iconified)</div>\n<div class=\"line\">    {</div>\n<div class=\"line\">        <span class=\"comment\">// The window was iconified</span></div>\n<div class=\"line\">    }</div>\n<div class=\"line\">    <span class=\"keywordflow\">else</span></div>\n<div class=\"line\">    {</div>\n<div class=\"line\">        <span class=\"comment\">// The window was restored</span></div>\n<div class=\"line\">    }</div>\n<div class=\"line\">}</div>\n</div><!-- fragment --><p>You can also get the current iconification state with <a class=\"el\" href=\"group__window.html#gacccb29947ea4b16860ebef42c2cb9337\">glfwGetWindowAttrib</a>.</p>\n<div class=\"fragment\"><div class=\"line\"><span class=\"keywordtype\">int</span> iconified = <a class=\"code\" href=\"group__window.html#gacccb29947ea4b16860ebef42c2cb9337\">glfwGetWindowAttrib</a>(window, <a class=\"code\" href=\"group__window.html#ga39d44b7c056e55e581355a92d240b58a\">GLFW_ICONIFIED</a>);</div>\n</div><!-- fragment --><h2><a class=\"anchor\" id=\"window_maximize\"></a>\nWindow maximization</h2>\n<p>Windows can be maximized (i.e. zoomed) with <a class=\"el\" href=\"group__window.html#ga3f541387449d911274324ae7f17ec56b\">glfwMaximizeWindow</a>.</p>\n<div class=\"fragment\"><div class=\"line\"><a class=\"code\" href=\"group__window.html#ga3f541387449d911274324ae7f17ec56b\">glfwMaximizeWindow</a>(window);</div>\n</div><!-- fragment --><p>Full screen windows cannot be maximized and passing a full screen window to this function does nothing.</p>\n<p>Maximized windows can be restored with <a class=\"el\" href=\"group__window.html#ga52527a5904b47d802b6b4bb519cdebc7\">glfwRestoreWindow</a>. This function also restores windows from iconification.</p>\n<div class=\"fragment\"><div class=\"line\"><a class=\"code\" href=\"group__window.html#ga52527a5904b47d802b6b4bb519cdebc7\">glfwRestoreWindow</a>(window);</div>\n</div><!-- fragment --><p>If you wish to be notified when a window is maximized or restored, whether by the user, system or your own code, set a maximize callback.</p>\n<div class=\"fragment\"><div class=\"line\"><a class=\"code\" href=\"group__window.html#gacbe64c339fbd94885e62145563b6dc93\">glfwSetWindowMaximizeCallback</a>(window, window_maximize_callback);</div>\n</div><!-- fragment --><p>The callback function receives changes in the maximization state of the window.</p>\n<div class=\"fragment\"><div class=\"line\"><span class=\"keywordtype\">void</span> window_maximize_callback(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window, <span class=\"keywordtype\">int</span> maximized)</div>\n<div class=\"line\">{</div>\n<div class=\"line\">    <span class=\"keywordflow\">if</span> (maximized)</div>\n<div class=\"line\">    {</div>\n<div class=\"line\">        <span class=\"comment\">// The window was maximized</span></div>\n<div class=\"line\">    }</div>\n<div class=\"line\">    <span class=\"keywordflow\">else</span></div>\n<div class=\"line\">    {</div>\n<div class=\"line\">        <span class=\"comment\">// The window was restored</span></div>\n<div class=\"line\">    }</div>\n<div class=\"line\">}</div>\n</div><!-- fragment --><p>You can also get the current maximization state with <a class=\"el\" href=\"group__window.html#gacccb29947ea4b16860ebef42c2cb9337\">glfwGetWindowAttrib</a>.</p>\n<div class=\"fragment\"><div class=\"line\"><span class=\"keywordtype\">int</span> maximized = <a class=\"code\" href=\"group__window.html#gacccb29947ea4b16860ebef42c2cb9337\">glfwGetWindowAttrib</a>(window, <a class=\"code\" href=\"group__window.html#gad8ccb396253ad0b72c6d4c917eb38a03\">GLFW_MAXIMIZED</a>);</div>\n</div><!-- fragment --><p>By default, newly created windows are not maximized. You can change this behavior by setting the <a class=\"el\" href=\"window_guide.html#GLFW_MAXIMIZED_hint\">GLFW_MAXIMIZED</a> window hint before creating the window.</p>\n<div class=\"fragment\"><div class=\"line\"><a class=\"code\" href=\"group__window.html#ga7d9c8c62384b1e2821c4dc48952d2033\">glfwWindowHint</a>(<a class=\"code\" href=\"group__window.html#gad8ccb396253ad0b72c6d4c917eb38a03\">GLFW_MAXIMIZED</a>, <a class=\"code\" href=\"group__init.html#ga2744fbb29b5631bb28802dbe0cf36eba\">GLFW_TRUE</a>);</div>\n</div><!-- fragment --><h2><a class=\"anchor\" id=\"window_hide\"></a>\nWindow visibility</h2>\n<p>Windowed mode windows can be hidden with <a class=\"el\" href=\"group__window.html#ga49401f82a1ba5f15db5590728314d47c\">glfwHideWindow</a>.</p>\n<div class=\"fragment\"><div class=\"line\"><a class=\"code\" href=\"group__window.html#ga49401f82a1ba5f15db5590728314d47c\">glfwHideWindow</a>(window);</div>\n</div><!-- fragment --><p>This makes the window completely invisible to the user, including removing it from the task bar, dock or window list. Full screen windows cannot be hidden and calling <a class=\"el\" href=\"group__window.html#ga49401f82a1ba5f15db5590728314d47c\">glfwHideWindow</a> on a full screen window does nothing.</p>\n<p>Hidden windows can be shown with <a class=\"el\" href=\"group__window.html#ga61be47917b72536a148300f46494fc66\">glfwShowWindow</a>.</p>\n<div class=\"fragment\"><div class=\"line\"><a class=\"code\" href=\"group__window.html#ga61be47917b72536a148300f46494fc66\">glfwShowWindow</a>(window);</div>\n</div><!-- fragment --><p>By default, this function will also set the input focus to that window. Set the <a class=\"el\" href=\"window_guide.html#GLFW_FOCUS_ON_SHOW_hint\">GLFW_FOCUS_ON_SHOW</a> window hint to change this behavior for all newly created windows, or change the behavior for an existing window with <a class=\"el\" href=\"group__window.html#gace2afda29b4116ec012e410a6819033e\">glfwSetWindowAttrib</a>.</p>\n<p>You can also get the current visibility state with <a class=\"el\" href=\"group__window.html#gacccb29947ea4b16860ebef42c2cb9337\">glfwGetWindowAttrib</a>.</p>\n<div class=\"fragment\"><div class=\"line\"><span class=\"keywordtype\">int</span> visible = <a class=\"code\" href=\"group__window.html#gacccb29947ea4b16860ebef42c2cb9337\">glfwGetWindowAttrib</a>(window, <a class=\"code\" href=\"group__window.html#gafb3cdc45297e06d8f1eb13adc69ca6c4\">GLFW_VISIBLE</a>);</div>\n</div><!-- fragment --><p>By default, newly created windows are visible. You can change this behavior by setting the <a class=\"el\" href=\"window_guide.html#GLFW_VISIBLE_hint\">GLFW_VISIBLE</a> window hint before creating the window.</p>\n<div class=\"fragment\"><div class=\"line\"><a class=\"code\" href=\"group__window.html#ga7d9c8c62384b1e2821c4dc48952d2033\">glfwWindowHint</a>(<a class=\"code\" href=\"group__window.html#gafb3cdc45297e06d8f1eb13adc69ca6c4\">GLFW_VISIBLE</a>, <a class=\"code\" href=\"group__init.html#gac877fe3b627d21ef3a0a23e0a73ba8c5\">GLFW_FALSE</a>);</div>\n</div><!-- fragment --><p>Windows created hidden are completely invisible to the user until shown. This can be useful if you need to set up your window further before showing it, for example moving it to a specific location.</p>\n<h2><a class=\"anchor\" id=\"window_focus\"></a>\nWindow input focus</h2>\n<p>Windows can be given input focus and brought to the front with <a class=\"el\" href=\"group__window.html#ga873780357abd3f3a081d71a40aae45a1\">glfwFocusWindow</a>.</p>\n<div class=\"fragment\"><div class=\"line\"><a class=\"code\" href=\"group__window.html#ga873780357abd3f3a081d71a40aae45a1\">glfwFocusWindow</a>(window);</div>\n</div><!-- fragment --><p>Keep in mind that it can be very disruptive to the user when a window is forced to the top. For a less disruptive way of getting the user's attention, see <a class=\"el\" href=\"window_guide.html#window_attention\">attention requests</a>.</p>\n<p>If you wish to be notified when a window gains or loses input focus, whether by the user, system or your own code, set a focus callback.</p>\n<div class=\"fragment\"><div class=\"line\"><a class=\"code\" href=\"group__window.html#gac2d83c4a10f071baf841f6730528e66c\">glfwSetWindowFocusCallback</a>(window, window_focus_callback);</div>\n</div><!-- fragment --><p>The callback function receives changes in the input focus state of the window.</p>\n<div class=\"fragment\"><div class=\"line\"><span class=\"keywordtype\">void</span> window_focus_callback(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window, <span class=\"keywordtype\">int</span> focused)</div>\n<div class=\"line\">{</div>\n<div class=\"line\">    <span class=\"keywordflow\">if</span> (focused)</div>\n<div class=\"line\">    {</div>\n<div class=\"line\">        <span class=\"comment\">// The window gained input focus</span></div>\n<div class=\"line\">    }</div>\n<div class=\"line\">    <span class=\"keywordflow\">else</span></div>\n<div class=\"line\">    {</div>\n<div class=\"line\">        <span class=\"comment\">// The window lost input focus</span></div>\n<div class=\"line\">    }</div>\n<div class=\"line\">}</div>\n</div><!-- fragment --><p>You can also get the current input focus state with <a class=\"el\" href=\"group__window.html#gacccb29947ea4b16860ebef42c2cb9337\">glfwGetWindowAttrib</a>.</p>\n<div class=\"fragment\"><div class=\"line\"><span class=\"keywordtype\">int</span> focused = <a class=\"code\" href=\"group__window.html#gacccb29947ea4b16860ebef42c2cb9337\">glfwGetWindowAttrib</a>(window, <a class=\"code\" href=\"group__window.html#ga54ddb14825a1541a56e22afb5f832a9e\">GLFW_FOCUSED</a>);</div>\n</div><!-- fragment --><p>By default, newly created windows are given input focus. You can change this behavior by setting the <a class=\"el\" href=\"window_guide.html#GLFW_FOCUSED_hint\">GLFW_FOCUSED</a> window hint before creating the window.</p>\n<div class=\"fragment\"><div class=\"line\"><a class=\"code\" href=\"group__window.html#ga7d9c8c62384b1e2821c4dc48952d2033\">glfwWindowHint</a>(<a class=\"code\" href=\"group__window.html#ga54ddb14825a1541a56e22afb5f832a9e\">GLFW_FOCUSED</a>, <a class=\"code\" href=\"group__init.html#gac877fe3b627d21ef3a0a23e0a73ba8c5\">GLFW_FALSE</a>);</div>\n</div><!-- fragment --><h2><a class=\"anchor\" id=\"window_attention\"></a>\nWindow attention request</h2>\n<p>If you wish to notify the user of an event without interrupting, you can request attention with <a class=\"el\" href=\"group__window.html#ga2f8d59323fc4692c1d54ba08c863a703\">glfwRequestWindowAttention</a>.</p>\n<div class=\"fragment\"><div class=\"line\"><a class=\"code\" href=\"group__window.html#ga2f8d59323fc4692c1d54ba08c863a703\">glfwRequestWindowAttention</a>(window);</div>\n</div><!-- fragment --><p>The system will highlight the specified window, or on platforms where this is not supported, the application as a whole. Once the user has given it attention, the system will automatically end the request.</p>\n<h2><a class=\"anchor\" id=\"window_refresh\"></a>\nWindow damage and refresh</h2>\n<p>If you wish to be notified when the contents of a window is damaged and needs to be refreshed, set a window refresh callback.</p>\n<div class=\"fragment\"><div class=\"line\"><a class=\"code\" href=\"group__window.html#ga1c5c7eb889c33c7f4d10dd35b327654e\">glfwSetWindowRefreshCallback</a>(m_handle, window_refresh_callback);</div>\n</div><!-- fragment --><p>The callback function is called when the contents of the window needs to be refreshed.</p>\n<div class=\"fragment\"><div class=\"line\"><span class=\"keywordtype\">void</span> window_refresh_callback(<a class=\"code\" href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a>* window)</div>\n<div class=\"line\">{</div>\n<div class=\"line\">    draw_editor_ui(window);</div>\n<div class=\"line\">    <a class=\"code\" href=\"group__window.html#ga15a5a1ee5b3c2ca6b15ca209a12efd14\">glfwSwapBuffers</a>(window);</div>\n<div class=\"line\">}</div>\n</div><!-- fragment --><dl class=\"section note\"><dt>Note</dt><dd>On compositing window systems such as Aero, Compiz or Aqua, where the window contents are saved off-screen, this callback might only be called when the window or framebuffer is resized.</dd></dl>\n<h2><a class=\"anchor\" id=\"window_transparency\"></a>\nWindow transparency</h2>\n<p>GLFW supports two kinds of transparency for windows; framebuffer transparency and whole window transparency. A single window may not use both methods. The results of doing this are undefined.</p>\n<p>Both methods require the platform to support it and not every version of every platform GLFW supports does this, so there are mechanisms to check whether the window really is transparent.</p>\n<p>Window framebuffers can be made transparent on a per-pixel per-frame basis with the <a class=\"el\" href=\"window_guide.html#GLFW_TRANSPARENT_FRAMEBUFFER_hint\">GLFW_TRANSPARENT_FRAMEBUFFER</a> window hint.</p>\n<div class=\"fragment\"><div class=\"line\"><a class=\"code\" href=\"group__window.html#ga7d9c8c62384b1e2821c4dc48952d2033\">glfwWindowHint</a>(<a class=\"code\" href=\"group__window.html#ga60a0578c3b9449027d683a9c6abb9f14\">GLFW_TRANSPARENT_FRAMEBUFFER</a>, <a class=\"code\" href=\"group__init.html#ga2744fbb29b5631bb28802dbe0cf36eba\">GLFW_TRUE</a>);</div>\n</div><!-- fragment --><p>If supported by the system, the window content area will be composited with the background using the framebuffer per-pixel alpha channel. This requires desktop compositing to be enabled on the system. It does not affect window decorations.</p>\n<p>You can check whether the window framebuffer was successfully made transparent with the <a class=\"el\" href=\"window_guide.html#GLFW_TRANSPARENT_FRAMEBUFFER_attrib\">GLFW_TRANSPARENT_FRAMEBUFFER</a> window attribute.</p>\n<div class=\"fragment\"><div class=\"line\"><span class=\"keywordflow\">if</span> (<a class=\"code\" href=\"group__window.html#gacccb29947ea4b16860ebef42c2cb9337\">glfwGetWindowAttrib</a>(window, <a class=\"code\" href=\"group__window.html#ga60a0578c3b9449027d683a9c6abb9f14\">GLFW_TRANSPARENT_FRAMEBUFFER</a>))</div>\n<div class=\"line\">{</div>\n<div class=\"line\">    <span class=\"comment\">// window framebuffer is currently transparent</span></div>\n<div class=\"line\">}</div>\n</div><!-- fragment --><p>GLFW comes with an example that enabled framebuffer transparency called <code>gears</code>.</p>\n<p>The opacity of the whole window, including any decorations, can be set with <a class=\"el\" href=\"group__window.html#gac31caeb3d1088831b13d2c8a156802e9\">glfwSetWindowOpacity</a>.</p>\n<div class=\"fragment\"><div class=\"line\"><a class=\"code\" href=\"group__window.html#gac31caeb3d1088831b13d2c8a156802e9\">glfwSetWindowOpacity</a>(window, 0.5f);</div>\n</div><!-- fragment --><p>The opacity (or alpha) value is a positive finite number between zero and one, where 0 (zero) is fully transparent and 1 (one) is fully opaque. The initial opacity value for newly created windows is 1.</p>\n<p>The current opacity of a window can be queried with <a class=\"el\" href=\"group__window.html#gad09f0bd7a6307c4533b7061828480a84\">glfwGetWindowOpacity</a>.</p>\n<div class=\"fragment\"><div class=\"line\"><span class=\"keywordtype\">float</span> opacity = <a class=\"code\" href=\"group__window.html#gad09f0bd7a6307c4533b7061828480a84\">glfwGetWindowOpacity</a>(window);</div>\n</div><!-- fragment --><p>If the system does not support whole window transparency, this function always returns one.</p>\n<p>GLFW comes with a test program that lets you control whole window transparency at run-time called <code>opacity</code>.</p>\n<h2><a class=\"anchor\" id=\"window_attribs\"></a>\nWindow attributes</h2>\n<p>Windows have a number of attributes that can be returned using <a class=\"el\" href=\"group__window.html#gacccb29947ea4b16860ebef42c2cb9337\">glfwGetWindowAttrib</a>. Some reflect state that may change as a result of user interaction, (e.g. whether it has input focus), while others reflect inherent properties of the window (e.g. what kind of border it has). Some are related to the window and others to its OpenGL or OpenGL ES context.</p>\n<div class=\"fragment\"><div class=\"line\"><span class=\"keywordflow\">if</span> (<a class=\"code\" href=\"group__window.html#gacccb29947ea4b16860ebef42c2cb9337\">glfwGetWindowAttrib</a>(window, <a class=\"code\" href=\"group__window.html#ga54ddb14825a1541a56e22afb5f832a9e\">GLFW_FOCUSED</a>))</div>\n<div class=\"line\">{</div>\n<div class=\"line\">    <span class=\"comment\">// window has input focus</span></div>\n<div class=\"line\">}</div>\n</div><!-- fragment --><p>The <a class=\"el\" href=\"window_guide.html#GLFW_DECORATED_attrib\">GLFW_DECORATED</a>, <a class=\"el\" href=\"window_guide.html#GLFW_RESIZABLE_attrib\">GLFW_RESIZABLE</a>, <a class=\"el\" href=\"window_guide.html#GLFW_FLOATING_attrib\">GLFW_FLOATING</a>, <a class=\"el\" href=\"window_guide.html#GLFW_AUTO_ICONIFY_attrib\">GLFW_AUTO_ICONIFY</a> and <a class=\"el\" href=\"window_guide.html#GLFW_FOCUS_ON_SHOW_attrib\">GLFW_FOCUS_ON_SHOW</a> window attributes can be changed with <a class=\"el\" href=\"group__window.html#gace2afda29b4116ec012e410a6819033e\">glfwSetWindowAttrib</a>.</p>\n<div class=\"fragment\"><div class=\"line\"><a class=\"code\" href=\"group__window.html#gace2afda29b4116ec012e410a6819033e\">glfwSetWindowAttrib</a>(window, <a class=\"code\" href=\"group__window.html#gadba13c7a1b3aa40831eb2beedbd5bd1d\">GLFW_RESIZABLE</a>, <a class=\"code\" href=\"group__init.html#gac877fe3b627d21ef3a0a23e0a73ba8c5\">GLFW_FALSE</a>);</div>\n</div><!-- fragment --><h3><a class=\"anchor\" id=\"window_attribs_wnd\"></a>\nWindow related attributes</h3>\n<p><a class=\"anchor\" id=\"GLFW_FOCUSED_attrib\"></a><b>GLFW_FOCUSED</b> indicates whether the specified window has input focus. See <a class=\"el\" href=\"window_guide.html#window_focus\">Window input focus</a> for details.</p>\n<p><a class=\"anchor\" id=\"GLFW_ICONIFIED_attrib\"></a><b>GLFW_ICONIFIED</b> indicates whether the specified window is iconified. See <a class=\"el\" href=\"window_guide.html#window_iconify\">Window iconification</a> for details.</p>\n<p><a class=\"anchor\" id=\"GLFW_MAXIMIZED_attrib\"></a><b>GLFW_MAXIMIZED</b> indicates whether the specified window is maximized. See <a class=\"el\" href=\"window_guide.html#window_maximize\">Window maximization</a> for details.</p>\n<p><a class=\"anchor\" id=\"GLFW_HOVERED_attrib\"></a><b>GLFW_HOVERED</b> indicates whether the cursor is currently directly over the content area of the window, with no other windows between. See <a class=\"el\" href=\"input_guide.html#cursor_enter\">Cursor enter/leave events</a> for details.</p>\n<p><a class=\"anchor\" id=\"GLFW_VISIBLE_attrib\"></a><b>GLFW_VISIBLE</b> indicates whether the specified window is visible. See <a class=\"el\" href=\"window_guide.html#window_hide\">Window visibility</a> for details.</p>\n<p><a class=\"anchor\" id=\"GLFW_RESIZABLE_attrib\"></a><b>GLFW_RESIZABLE</b> indicates whether the specified window is resizable <em>by the user</em>. This can be set before creation with the <a class=\"el\" href=\"window_guide.html#GLFW_RESIZABLE_hint\">GLFW_RESIZABLE</a> window hint or after with <a class=\"el\" href=\"group__window.html#gace2afda29b4116ec012e410a6819033e\">glfwSetWindowAttrib</a>.</p>\n<p><a class=\"anchor\" id=\"GLFW_DECORATED_attrib\"></a><b>GLFW_DECORATED</b> indicates whether the specified window has decorations such as a border, a close widget, etc. This can be set before creation with the <a class=\"el\" href=\"window_guide.html#GLFW_DECORATED_hint\">GLFW_DECORATED</a> window hint or after with <a class=\"el\" href=\"group__window.html#gace2afda29b4116ec012e410a6819033e\">glfwSetWindowAttrib</a>.</p>\n<p><a class=\"anchor\" id=\"GLFW_AUTO_ICONIFY_attrib\"></a><b>GLFW_AUTO_ICONIFY</b> indicates whether the specified full screen window is iconified on focus loss, a close widget, etc. This can be set before creation with the <a class=\"el\" href=\"window_guide.html#GLFW_AUTO_ICONIFY_hint\">GLFW_AUTO_ICONIFY</a> window hint or after with <a class=\"el\" href=\"group__window.html#gace2afda29b4116ec012e410a6819033e\">glfwSetWindowAttrib</a>.</p>\n<p><a class=\"anchor\" id=\"GLFW_FLOATING_attrib\"></a><b>GLFW_FLOATING</b> indicates whether the specified window is floating, also called topmost or always-on-top. This can be set before creation with the <a class=\"el\" href=\"window_guide.html#GLFW_FLOATING_hint\">GLFW_FLOATING</a> window hint or after with <a class=\"el\" href=\"group__window.html#gace2afda29b4116ec012e410a6819033e\">glfwSetWindowAttrib</a>.</p>\n<p><a class=\"anchor\" id=\"GLFW_TRANSPARENT_FRAMEBUFFER_attrib\"></a><b>GLFW_TRANSPARENT_FRAMEBUFFER</b> indicates whether the specified window has a transparent framebuffer, i.e. the window contents is composited with the background using the window framebuffer alpha channel. See <a class=\"el\" href=\"window_guide.html#window_transparency\">Window transparency</a> for details.</p>\n<p><a class=\"anchor\" id=\"GLFW_FOCUS_ON_SHOW_attrib\"></a><b>GLFW_FOCUS_ON_SHOW</b> specifies whether the window will be given input focus when <a class=\"el\" href=\"group__window.html#ga61be47917b72536a148300f46494fc66\">glfwShowWindow</a> is called. This can be set before creation with the <a class=\"el\" href=\"window_guide.html#GLFW_FOCUS_ON_SHOW_hint\">GLFW_FOCUS_ON_SHOW</a> window hint or after with <a class=\"el\" href=\"group__window.html#gace2afda29b4116ec012e410a6819033e\">glfwSetWindowAttrib</a>.</p>\n<h3><a class=\"anchor\" id=\"window_attribs_ctx\"></a>\nContext related attributes</h3>\n<p><a class=\"anchor\" id=\"GLFW_CLIENT_API_attrib\"></a><b>GLFW_CLIENT_API</b> indicates the client API provided by the window's context; either <code>GLFW_OPENGL_API</code>, <code>GLFW_OPENGL_ES_API</code> or <code>GLFW_NO_API</code>.</p>\n<p><a class=\"anchor\" id=\"GLFW_CONTEXT_CREATION_API_attrib\"></a><b>GLFW_CONTEXT_CREATION_API</b> indicates the context creation API used to create the window's context; either <code>GLFW_NATIVE_CONTEXT_API</code>, <code>GLFW_EGL_CONTEXT_API</code> or <code>GLFW_OSMESA_CONTEXT_API</code>.</p>\n<p><a class=\"anchor\" id=\"GLFW_CONTEXT_VERSION_MAJOR_attrib\"></a><a class=\"anchor\" id=\"GLFW_CONTEXT_VERSION_MINOR_attrib\"></a><a class=\"anchor\" id=\"GLFW_CONTEXT_REVISION_attrib\"></a><b>GLFW_CONTEXT_VERSION_MAJOR</b>, <b>GLFW_CONTEXT_VERSION_MINOR</b> and <b>GLFW_CONTEXT_REVISION</b> indicate the client API version of the window's context.</p>\n<dl class=\"section note\"><dt>Note</dt><dd>Do not confuse these attributes with <code>GLFW_VERSION_MAJOR</code>, <code>GLFW_VERSION_MINOR</code> and <code>GLFW_VERSION_REVISION</code> which provide the API version of the GLFW header.</dd></dl>\n<p><a class=\"anchor\" id=\"GLFW_OPENGL_FORWARD_COMPAT_attrib\"></a><b>GLFW_OPENGL_FORWARD_COMPAT</b> is <code>GLFW_TRUE</code> if the window's context is an OpenGL forward-compatible one, or <code>GLFW_FALSE</code> otherwise.</p>\n<p><a class=\"anchor\" id=\"GLFW_OPENGL_DEBUG_CONTEXT_attrib\"></a><b>GLFW_OPENGL_DEBUG_CONTEXT</b> is <code>GLFW_TRUE</code> if the window's context is an OpenGL debug context, or <code>GLFW_FALSE</code> otherwise.</p>\n<p><a class=\"anchor\" id=\"GLFW_OPENGL_PROFILE_attrib\"></a><b>GLFW_OPENGL_PROFILE</b> indicates the OpenGL profile used by the context. This is <code>GLFW_OPENGL_CORE_PROFILE</code> or <code>GLFW_OPENGL_COMPAT_PROFILE</code> if the context uses a known profile, or <code>GLFW_OPENGL_ANY_PROFILE</code> if the OpenGL profile is unknown or the context is an OpenGL ES context. Note that the returned profile may not match the profile bits of the context flags, as GLFW will try other means of detecting the profile when no bits are set.</p>\n<p><a class=\"anchor\" id=\"GLFW_CONTEXT_RELEASE_BEHAVIOR_attrib\"></a><b>GLFW_CONTEXT_RELEASE_BEHAVIOR</b> indicates the release used by the context. Possible values are one of <code>GLFW_ANY_RELEASE_BEHAVIOR</code>, <code>GLFW_RELEASE_BEHAVIOR_FLUSH</code> or <code>GLFW_RELEASE_BEHAVIOR_NONE</code>. If the behavior is <code>GLFW_ANY_RELEASE_BEHAVIOR</code>, the default behavior of the context creation API will be used. If the behavior is <code>GLFW_RELEASE_BEHAVIOR_FLUSH</code>, the pipeline will be flushed whenever the context is released from being the current one. If the behavior is <code>GLFW_RELEASE_BEHAVIOR_NONE</code>, the pipeline will not be flushed on release.</p>\n<p><a class=\"anchor\" id=\"GLFW_CONTEXT_NO_ERROR_attrib\"></a><b>GLFW_CONTEXT_NO_ERROR</b> indicates whether errors are generated by the context. Possible values are <code>GLFW_TRUE</code> and <code>GLFW_FALSE</code>. If enabled, situations that would have generated errors instead cause undefined behavior.</p>\n<p><a class=\"anchor\" id=\"GLFW_CONTEXT_ROBUSTNESS_attrib\"></a><b>GLFW_CONTEXT_ROBUSTNESS</b> indicates the robustness strategy used by the context. This is <code>GLFW_LOSE_CONTEXT_ON_RESET</code> or <code>GLFW_NO_RESET_NOTIFICATION</code> if the window's context supports robustness, or <code>GLFW_NO_ROBUSTNESS</code> otherwise.</p>\n<h3><a class=\"anchor\" id=\"window_attribs_fb\"></a>\nFramebuffer related attributes</h3>\n<p>GLFW does not expose attributes of the default framebuffer (i.e. the framebuffer attached to the window) as these can be queried directly with either OpenGL, OpenGL ES or Vulkan.</p>\n<p>If you are using version 3.0 or later of OpenGL or OpenGL ES, the <code>glGetFramebufferAttachmentParameteriv</code> function can be used to retrieve the number of bits for the red, green, blue, alpha, depth and stencil buffer channels. Otherwise, the <code>glGetIntegerv</code> function can be used.</p>\n<p>The number of MSAA samples are always retrieved with <code>glGetIntegerv</code>. For contexts supporting framebuffer objects, the number of samples of the currently bound framebuffer is returned.</p>\n<table class=\"markdownTable\">\n<tr class=\"markdownTableHead\">\n<th class=\"markdownTableHeadNone\">Attribute  </th><th class=\"markdownTableHeadNone\">glGetIntegerv  </th><th class=\"markdownTableHeadNone\">glGetFramebufferAttachmentParameteriv   </th></tr>\n<tr class=\"markdownTableRowOdd\">\n<td class=\"markdownTableBodyNone\">Red bits  </td><td class=\"markdownTableBodyNone\"><code>GL_RED_BITS</code>  </td><td class=\"markdownTableBodyNone\"><code>GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE</code>   </td></tr>\n<tr class=\"markdownTableRowEven\">\n<td class=\"markdownTableBodyNone\">Green bits  </td><td class=\"markdownTableBodyNone\"><code>GL_GREEN_BITS</code>  </td><td class=\"markdownTableBodyNone\"><code>GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE</code>   </td></tr>\n<tr class=\"markdownTableRowOdd\">\n<td class=\"markdownTableBodyNone\">Blue bits  </td><td class=\"markdownTableBodyNone\"><code>GL_BLUE_BITS</code>  </td><td class=\"markdownTableBodyNone\"><code>GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE</code>   </td></tr>\n<tr class=\"markdownTableRowEven\">\n<td class=\"markdownTableBodyNone\">Alpha bits  </td><td class=\"markdownTableBodyNone\"><code>GL_ALPHA_BITS</code>  </td><td class=\"markdownTableBodyNone\"><code>GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE</code>   </td></tr>\n<tr class=\"markdownTableRowOdd\">\n<td class=\"markdownTableBodyNone\">Depth bits  </td><td class=\"markdownTableBodyNone\"><code>GL_DEPTH_BITS</code>  </td><td class=\"markdownTableBodyNone\"><code>GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE</code>   </td></tr>\n<tr class=\"markdownTableRowEven\">\n<td class=\"markdownTableBodyNone\">Stencil bits  </td><td class=\"markdownTableBodyNone\"><code>GL_STENCIL_BITS</code>  </td><td class=\"markdownTableBodyNone\"><code>GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE</code>   </td></tr>\n<tr class=\"markdownTableRowOdd\">\n<td class=\"markdownTableBodyNone\">MSAA samples  </td><td class=\"markdownTableBodyNone\"><code>GL_SAMPLES</code>  </td><td class=\"markdownTableBodyNone\"><em>Not provided by this function</em>   </td></tr>\n</table>\n<p>When calling <code>glGetFramebufferAttachmentParameteriv</code>, the red, green, blue and alpha sizes are queried from the <code>GL_BACK_LEFT</code>, while the depth and stencil sizes are queried from the <code>GL_DEPTH</code> and <code>GL_STENCIL</code> attachments, respectively.</p>\n<h1><a class=\"anchor\" id=\"buffer_swap\"></a>\nBuffer swapping</h1>\n<p>GLFW windows are by default double buffered. That means that you have two rendering buffers; a front buffer and a back buffer. The front buffer is the one being displayed and the back buffer the one you render to.</p>\n<p>When the entire frame has been rendered, it is time to swap the back and the front buffers in order to display what has been rendered and begin rendering a new frame. This is done with <a class=\"el\" href=\"group__window.html#ga15a5a1ee5b3c2ca6b15ca209a12efd14\">glfwSwapBuffers</a>.</p>\n<div class=\"fragment\"><div class=\"line\"><a class=\"code\" href=\"group__window.html#ga15a5a1ee5b3c2ca6b15ca209a12efd14\">glfwSwapBuffers</a>(window);</div>\n</div><!-- fragment --><p>Sometimes it can be useful to select when the buffer swap will occur. With the function <a class=\"el\" href=\"group__context.html#ga6d4e0cdf151b5e579bd67f13202994ed\">glfwSwapInterval</a> it is possible to select the minimum number of monitor refreshes the driver should wait from the time <a class=\"el\" href=\"group__window.html#ga15a5a1ee5b3c2ca6b15ca209a12efd14\">glfwSwapBuffers</a> was called before swapping the buffers:</p>\n<div class=\"fragment\"><div class=\"line\"><a class=\"code\" href=\"group__context.html#ga6d4e0cdf151b5e579bd67f13202994ed\">glfwSwapInterval</a>(1);</div>\n</div><!-- fragment --><p>If the interval is zero, the swap will take place immediately when <a class=\"el\" href=\"group__window.html#ga15a5a1ee5b3c2ca6b15ca209a12efd14\">glfwSwapBuffers</a> is called without waiting for a refresh. Otherwise at least interval retraces will pass between each buffer swap. Using a swap interval of zero can be useful for benchmarking purposes, when it is not desirable to measure the time it takes to wait for the vertical retrace. However, a swap interval of one lets you avoid tearing.</p>\n<p>Note that this may not work on all machines, as some drivers have user-controlled settings that override any swap interval the application requests.</p>\n<p>A context that supports either the <code>WGL_EXT_swap_control_tear</code> or the <code>GLX_EXT_swap_control_tear</code> extension also accepts <em>negative</em> swap intervals, which allows the driver to swap immediately even if a frame arrives a little bit late. This trades the risk of visible tears for greater framerate stability. You can check for these extensions with <a class=\"el\" href=\"group__context.html#ga87425065c011cef1ebd6aac75e059dfa\">glfwExtensionSupported</a>. </p>\n</div></div><!-- contents -->\n</div><!-- PageDoc -->\n<div class=\"ttc\" id=\"agroup__window_html_ga60a0578c3b9449027d683a9c6abb9f14\"><div class=\"ttname\"><a href=\"group__window.html#ga60a0578c3b9449027d683a9c6abb9f14\">GLFW_TRANSPARENT_FRAMEBUFFER</a></div><div class=\"ttdeci\">#define GLFW_TRANSPARENT_FRAMEBUFFER</div><div class=\"ttdoc\">Window framebuffer transparency hint and attribute.</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:818</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_gab3fb7c3366577daef18c0023e2a8591f\"><div class=\"ttname\"><a href=\"group__window.html#gab3fb7c3366577daef18c0023e2a8591f\">glfwSetFramebufferSizeCallback</a></div><div class=\"ttdeci\">GLFWframebuffersizefun glfwSetFramebufferSizeCallback(GLFWwindow *window, GLFWframebuffersizefun callback)</div><div class=\"ttdoc\">Sets the framebuffer resize callback for the specified window.</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_ga371911f12c74c504dd8d47d832d095cb\"><div class=\"ttname\"><a href=\"group__window.html#ga371911f12c74c504dd8d47d832d095cb\">glfwSetWindowSize</a></div><div class=\"ttdeci\">void glfwSetWindowSize(GLFWwindow *window, int width, int height)</div><div class=\"ttdoc\">Sets the size of the content area of the specified window.</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_gaf78ed8e417dbcc1e354906cc2708c982\"><div class=\"ttname\"><a href=\"group__window.html#gaf78ed8e417dbcc1e354906cc2708c982\">GLFW_RED_BITS</a></div><div class=\"ttdeci\">#define GLFW_RED_BITS</div><div class=\"ttdoc\">Framebuffer bit depth hint.</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:835</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_ga1abb6d690e8c88e0c8cd1751356dbca8\"><div class=\"ttname\"><a href=\"group__window.html#ga1abb6d690e8c88e0c8cd1751356dbca8\">glfwSetWindowPos</a></div><div class=\"ttdeci\">void glfwSetWindowPos(GLFWwindow *window, int xpos, int ypos)</div><div class=\"ttdoc\">Sets the position of the content area of the specified window.</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_gace2afda29b4116ec012e410a6819033e\"><div class=\"ttname\"><a href=\"group__window.html#gace2afda29b4116ec012e410a6819033e\">glfwSetWindowAttrib</a></div><div class=\"ttdeci\">void glfwSetWindowAttrib(GLFWwindow *window, int attrib, int value)</div><div class=\"ttdoc\">Sets an attribute of the specified window.</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_ga52527a5904b47d802b6b4bb519cdebc7\"><div class=\"ttname\"><a href=\"group__window.html#ga52527a5904b47d802b6b4bb519cdebc7\">glfwRestoreWindow</a></div><div class=\"ttdeci\">void glfwRestoreWindow(GLFWwindow *window)</div><div class=\"ttdoc\">Restores the specified window.</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_gaf5d31de9c19c4f994facea64d2b3106c\"><div class=\"ttname\"><a href=\"group__window.html#gaf5d31de9c19c4f994facea64d2b3106c\">glfwGetWindowContentScale</a></div><div class=\"ttdeci\">void glfwGetWindowContentScale(GLFWwindow *window, float *xscale, float *yscale)</div><div class=\"ttdoc\">Retrieves the content scale for the specified window.</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_ga1c5c7eb889c33c7f4d10dd35b327654e\"><div class=\"ttname\"><a href=\"group__window.html#ga1c5c7eb889c33c7f4d10dd35b327654e\">glfwSetWindowRefreshCallback</a></div><div class=\"ttdeci\">GLFWwindowrefreshfun glfwSetWindowRefreshCallback(GLFWwindow *window, GLFWwindowrefreshfun callback)</div><div class=\"ttdoc\">Sets the refresh callback for the specified window.</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_gad91b8b047a0c4c6033c38853864c34f8\"><div class=\"ttname\"><a href=\"group__window.html#gad91b8b047a0c4c6033c38853864c34f8\">glfwSetWindowSizeCallback</a></div><div class=\"ttdeci\">GLFWwindowsizefun glfwSetWindowSizeCallback(GLFWwindow *window, GLFWwindowsizefun callback)</div><div class=\"ttdoc\">Sets the size callback for the specified window.</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_ga81c76c418af80a1cce7055bccb0ae0a7\"><div class=\"ttname\"><a href=\"group__window.html#ga81c76c418af80a1cce7055bccb0ae0a7\">glfwSetWindowMonitor</a></div><div class=\"ttdeci\">void glfwSetWindowMonitor(GLFWwindow *window, GLFWmonitor *monitor, int xpos, int ypos, int width, int height, int refreshRate)</div><div class=\"ttdoc\">Sets the mode, monitor, video mode and placement of a window.</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_ga73cb526c000876fd8ddf571570fdb634\"><div class=\"ttname\"><a href=\"group__window.html#ga73cb526c000876fd8ddf571570fdb634\">glfwGetWindowPos</a></div><div class=\"ttdeci\">void glfwGetWindowPos(GLFWwindow *window, int *xpos, int *ypos)</div><div class=\"ttdoc\">Retrieves the position of the content area of the specified window.</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_gacbe64c339fbd94885e62145563b6dc93\"><div class=\"ttname\"><a href=\"group__window.html#gacbe64c339fbd94885e62145563b6dc93\">glfwSetWindowMaximizeCallback</a></div><div class=\"ttdeci\">GLFWwindowmaximizefun glfwSetWindowMaximizeCallback(GLFWwindow *window, GLFWwindowmaximizefun callback)</div><div class=\"ttdoc\">Sets the maximize callback for the specified window.</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_ga5d877f09e968cef7a360b513306f17ff\"><div class=\"ttname\"><a href=\"group__window.html#ga5d877f09e968cef7a360b513306f17ff\">glfwSetWindowTitle</a></div><div class=\"ttdeci\">void glfwSetWindowTitle(GLFWwindow *window, const char *title)</div><div class=\"ttdoc\">Sets the title of the specified window.</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_ga3c96d80d363e67d13a41b5d1821f3242\"><div class=\"ttname\"><a href=\"group__window.html#ga3c96d80d363e67d13a41b5d1821f3242\">GLFWwindow</a></div><div class=\"ttdeci\">struct GLFWwindow GLFWwindow</div><div class=\"ttdoc\">Opaque window object.</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:1152</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_ga15a5a1ee5b3c2ca6b15ca209a12efd14\"><div class=\"ttname\"><a href=\"group__window.html#ga15a5a1ee5b3c2ca6b15ca209a12efd14\">glfwSwapBuffers</a></div><div class=\"ttdeci\">void glfwSwapBuffers(GLFWwindow *window)</div><div class=\"ttdoc\">Swaps the front and back buffers of the specified window.</div></div>\n<div class=\"ttc\" id=\"agroup__context_html_ga6d4e0cdf151b5e579bd67f13202994ed\"><div class=\"ttname\"><a href=\"group__context.html#ga6d4e0cdf151b5e579bd67f13202994ed\">glfwSwapInterval</a></div><div class=\"ttdeci\">void glfwSwapInterval(int interval)</div><div class=\"ttdoc\">Sets the swap interval for the current context.</div></div>\n<div class=\"ttc\" id=\"astructGLFWvidmode_html_af310977f58d2e3b188175b6e3d314047\"><div class=\"ttname\"><a href=\"structGLFWvidmode.html#af310977f58d2e3b188175b6e3d314047\">GLFWvidmode::blueBits</a></div><div class=\"ttdeci\">int blueBits</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:1640</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_ga1a9fd382058c53101b21cf211898f1f1\"><div class=\"ttname\"><a href=\"group__window.html#ga1a9fd382058c53101b21cf211898f1f1\">glfwGetWindowFrameSize</a></div><div class=\"ttdeci\">void glfwGetWindowFrameSize(GLFWwindow *window, int *left, int *top, int *right, int *bottom)</div><div class=\"ttdoc\">Retrieves the size of the frame of the window.</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_gafba3b72638c914e5fb8a237dd4c50d4d\"><div class=\"ttname\"><a href=\"group__window.html#gafba3b72638c914e5fb8a237dd4c50d4d\">GLFW_GREEN_BITS</a></div><div class=\"ttdeci\">#define GLFW_GREEN_BITS</div><div class=\"ttdoc\">Framebuffer bit depth hint.</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:840</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_ga24e02fbfefbb81fc45320989f8140ab5\"><div class=\"ttname\"><a href=\"group__window.html#ga24e02fbfefbb81fc45320989f8140ab5\">glfwWindowShouldClose</a></div><div class=\"ttdeci\">int glfwWindowShouldClose(GLFWwindow *window)</div><div class=\"ttdoc\">Checks the close flag of the specified window.</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_ga37bd57223967b4211d60ca1a0bf3c832\"><div class=\"ttname\"><a href=\"group__window.html#ga37bd57223967b4211d60ca1a0bf3c832\">glfwPollEvents</a></div><div class=\"ttdeci\">void glfwPollEvents(void)</div><div class=\"ttdoc\">Processes all pending events.</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_gac314fa6cec7d2d307be9963e2709cc90\"><div class=\"ttname\"><a href=\"group__window.html#gac314fa6cec7d2d307be9963e2709cc90\">glfwSetWindowSizeLimits</a></div><div class=\"ttdeci\">void glfwSetWindowSizeLimits(GLFWwindow *window, int minwidth, int minheight, int maxwidth, int maxheight)</div><div class=\"ttdoc\">Sets the size limits of the specified window.</div></div>\n<div class=\"ttc\" id=\"agroup__monitor_html_ga721867d84c6d18d6790d64d2847ca0b1\"><div class=\"ttname\"><a href=\"group__monitor.html#ga721867d84c6d18d6790d64d2847ca0b1\">glfwGetPrimaryMonitor</a></div><div class=\"ttdeci\">GLFWmonitor * glfwGetPrimaryMonitor(void)</div><div class=\"ttdoc\">Returns the primary monitor.</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_gac2d83c4a10f071baf841f6730528e66c\"><div class=\"ttname\"><a href=\"group__window.html#gac2d83c4a10f071baf841f6730528e66c\">glfwSetWindowFocusCallback</a></div><div class=\"ttdeci\">GLFWwindowfocusfun glfwSetWindowFocusCallback(GLFWwindow *window, GLFWwindowfocusfun callback)</div><div class=\"ttdoc\">Sets the focus callback for the specified window.</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_gada646d775a7776a95ac000cfc1885331\"><div class=\"ttname\"><a href=\"group__window.html#gada646d775a7776a95ac000cfc1885331\">glfwSetWindowCloseCallback</a></div><div class=\"ttdeci\">GLFWwindowclosefun glfwSetWindowCloseCallback(GLFWwindow *window, GLFWwindowclosefun callback)</div><div class=\"ttdoc\">Sets the close callback for the specified window.</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_ga873780357abd3f3a081d71a40aae45a1\"><div class=\"ttname\"><a href=\"group__window.html#ga873780357abd3f3a081d71a40aae45a1\">glfwFocusWindow</a></div><div class=\"ttdeci\">void glfwFocusWindow(GLFWwindow *window)</div><div class=\"ttdoc\">Brings the specified window to front and sets input focus.</div></div>\n<div class=\"ttc\" id=\"astructGLFWvidmode_html_ac65942a5f6981695517437a9d571d03c\"><div class=\"ttname\"><a href=\"structGLFWvidmode.html#ac65942a5f6981695517437a9d571d03c\">GLFWvidmode::height</a></div><div class=\"ttdeci\">int height</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:1631</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_gaf2832ebb5aa6c252a2d261de002c92d6\"><div class=\"ttname\"><a href=\"group__window.html#gaf2832ebb5aa6c252a2d261de002c92d6\">glfwSetWindowContentScaleCallback</a></div><div class=\"ttdeci\">GLFWwindowcontentscalefun glfwSetWindowContentScaleCallback(GLFWwindow *window, GLFWwindowcontentscalefun callback)</div><div class=\"ttdoc\">Sets the window content scale callback for the specified window.</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_ga08bdfbba88934f9c4f92fd757979ac74\"><div class=\"ttname\"><a href=\"group__window.html#ga08bdfbba88934f9c4f92fd757979ac74\">glfwSetWindowPosCallback</a></div><div class=\"ttdeci\">GLFWwindowposfun glfwSetWindowPosCallback(GLFWwindow *window, GLFWwindowposfun callback)</div><div class=\"ttdoc\">Sets the position callback for the specified window.</div></div>\n<div class=\"ttc\" id=\"agroup__init_html_gac877fe3b627d21ef3a0a23e0a73ba8c5\"><div class=\"ttname\"><a href=\"group__init.html#gac877fe3b627d21ef3a0a23e0a73ba8c5\">GLFW_FALSE</a></div><div class=\"ttdeci\">#define GLFW_FALSE</div><div class=\"ttdoc\">Zero.</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:289</div></div>\n<div class=\"ttc\" id=\"aglfw3_8h_html_a7a2edf2c18446833d27d07f1b7f3d571\"><div class=\"ttname\"><a href=\"glfw3_8h.html#a7a2edf2c18446833d27d07f1b7f3d571\">GLFW_DONT_CARE</a></div><div class=\"ttdeci\">#define GLFW_DONT_CARE</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:1096</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_ga61be47917b72536a148300f46494fc66\"><div class=\"ttname\"><a href=\"group__window.html#ga61be47917b72536a148300f46494fc66\">glfwShowWindow</a></div><div class=\"ttdeci\">void glfwShowWindow(GLFWwindow *window)</div><div class=\"ttdoc\">Makes the specified window visible.</div></div>\n<div class=\"ttc\" id=\"agroup__init_html_ga2744fbb29b5631bb28802dbe0cf36eba\"><div class=\"ttname\"><a href=\"group__init.html#ga2744fbb29b5631bb28802dbe0cf36eba\">GLFW_TRUE</a></div><div class=\"ttdeci\">#define GLFW_TRUE</div><div class=\"ttdoc\">One.</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:280</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_ga39d44b7c056e55e581355a92d240b58a\"><div class=\"ttname\"><a href=\"group__window.html#ga39d44b7c056e55e581355a92d240b58a\">GLFW_ICONIFIED</a></div><div class=\"ttdeci\">#define GLFW_ICONIFIED</div><div class=\"ttdoc\">Window iconification window attribute.</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:770</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_ga2f8d59323fc4692c1d54ba08c863a703\"><div class=\"ttname\"><a href=\"group__window.html#ga2f8d59323fc4692c1d54ba08c863a703\">glfwRequestWindowAttention</a></div><div class=\"ttdeci\">void glfwRequestWindowAttention(GLFWwindow *window)</div><div class=\"ttdoc\">Requests user attention to the specified window.</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_gadba13c7a1b3aa40831eb2beedbd5bd1d\"><div class=\"ttname\"><a href=\"group__window.html#gadba13c7a1b3aa40831eb2beedbd5bd1d\">GLFW_RESIZABLE</a></div><div class=\"ttdeci\">#define GLFW_RESIZABLE</div><div class=\"ttdoc\">Window resize-ability window hint and attribute.</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:776</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_ga54ddb14825a1541a56e22afb5f832a9e\"><div class=\"ttname\"><a href=\"group__window.html#ga54ddb14825a1541a56e22afb5f832a9e\">GLFW_FOCUSED</a></div><div class=\"ttdeci\">#define GLFW_FOCUSED</div><div class=\"ttdoc\">Input focus window hint and attribute.</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:765</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_gab292ea403db6d514537b515311bf9ae3\"><div class=\"ttname\"><a href=\"group__window.html#gab292ea403db6d514537b515311bf9ae3\">GLFW_BLUE_BITS</a></div><div class=\"ttdeci\">#define GLFW_BLUE_BITS</div><div class=\"ttdoc\">Framebuffer bit depth hint.</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:845</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_ga49401f82a1ba5f15db5590728314d47c\"><div class=\"ttname\"><a href=\"group__window.html#ga49401f82a1ba5f15db5590728314d47c\">glfwHideWindow</a></div><div class=\"ttdeci\">void glfwHideWindow(GLFWwindow *window)</div><div class=\"ttdoc\">Hides the specified window.</div></div>\n<div class=\"ttc\" id=\"astructGLFWvidmode_html_a698dcb200562051a7249cb6ae154c71d\"><div class=\"ttname\"><a href=\"structGLFWvidmode.html#a698dcb200562051a7249cb6ae154c71d\">GLFWvidmode::width</a></div><div class=\"ttdeci\">int width</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:1628</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_ga3f541387449d911274324ae7f17ec56b\"><div class=\"ttname\"><a href=\"group__window.html#ga3f541387449d911274324ae7f17ec56b\">glfwMaximizeWindow</a></div><div class=\"ttdeci\">void glfwMaximizeWindow(GLFWwindow *window)</div><div class=\"ttdoc\">Maximizes the specified window.</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_gadd7ccd39fe7a7d1f0904666ae5932dc5\"><div class=\"ttname\"><a href=\"group__window.html#gadd7ccd39fe7a7d1f0904666ae5932dc5\">glfwSetWindowIcon</a></div><div class=\"ttdeci\">void glfwSetWindowIcon(GLFWwindow *window, int count, const GLFWimage *images)</div><div class=\"ttdoc\">Sets the icon for the specified window.</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_ga5c336fddf2cbb5b92f65f10fb6043344\"><div class=\"ttname\"><a href=\"group__window.html#ga5c336fddf2cbb5b92f65f10fb6043344\">glfwCreateWindow</a></div><div class=\"ttdeci\">GLFWwindow * glfwCreateWindow(int width, int height, const char *title, GLFWmonitor *monitor, GLFWwindow *share)</div><div class=\"ttdoc\">Creates a window and its associated context.</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_ga49c449dde2a6f87d996f4daaa09d6708\"><div class=\"ttname\"><a href=\"group__window.html#ga49c449dde2a6f87d996f4daaa09d6708\">glfwSetWindowShouldClose</a></div><div class=\"ttdeci\">void glfwSetWindowShouldClose(GLFWwindow *window, int value)</div><div class=\"ttdoc\">Sets the close flag of the specified window.</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_ga72ac8cb1ee2e312a878b55153d81b937\"><div class=\"ttname\"><a href=\"group__window.html#ga72ac8cb1ee2e312a878b55153d81b937\">glfwSetWindowAspectRatio</a></div><div class=\"ttdeci\">void glfwSetWindowAspectRatio(GLFWwindow *window, int numer, int denom)</div><div class=\"ttdoc\">Sets the aspect ratio of the specified window.</div></div>\n<div class=\"ttc\" id=\"astructGLFWvidmode_html_a292fdd281f3485fb3ff102a5bda43faa\"><div class=\"ttname\"><a href=\"structGLFWvidmode.html#a292fdd281f3485fb3ff102a5bda43faa\">GLFWvidmode::greenBits</a></div><div class=\"ttdeci\">int greenBits</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:1637</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_gad09f0bd7a6307c4533b7061828480a84\"><div class=\"ttname\"><a href=\"group__window.html#gad09f0bd7a6307c4533b7061828480a84\">glfwGetWindowOpacity</a></div><div class=\"ttdeci\">float glfwGetWindowOpacity(GLFWwindow *window)</div><div class=\"ttdoc\">Returns the opacity of the whole window.</div></div>\n<div class=\"ttc\" id=\"astructGLFWimage_html\"><div class=\"ttname\"><a href=\"structGLFWimage.html\">GLFWimage</a></div><div class=\"ttdoc\">Image data.</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:1687</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_gac31caeb3d1088831b13d2c8a156802e9\"><div class=\"ttname\"><a href=\"group__window.html#gac31caeb3d1088831b13d2c8a156802e9\">glfwSetWindowOpacity</a></div><div class=\"ttdeci\">void glfwSetWindowOpacity(GLFWwindow *window, float opacity)</div><div class=\"ttdoc\">Sets the opacity of the whole window.</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_gaeac25e64789974ccbe0811766bd91a16\"><div class=\"ttname\"><a href=\"group__window.html#gaeac25e64789974ccbe0811766bd91a16\">glfwGetWindowMonitor</a></div><div class=\"ttdeci\">GLFWmonitor * glfwGetWindowMonitor(GLFWwindow *window)</div><div class=\"ttdoc\">Returns the monitor that the window uses for full screen mode.</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_ga1bb559c0ebaad63c5c05ad2a066779c4\"><div class=\"ttname\"><a href=\"group__window.html#ga1bb559c0ebaad63c5c05ad2a066779c4\">glfwIconifyWindow</a></div><div class=\"ttdeci\">void glfwIconifyWindow(GLFWwindow *window)</div><div class=\"ttdoc\">Iconifies the specified window.</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_gad8ccb396253ad0b72c6d4c917eb38a03\"><div class=\"ttname\"><a href=\"group__window.html#gad8ccb396253ad0b72c6d4c917eb38a03\">GLFW_MAXIMIZED</a></div><div class=\"ttdeci\">#define GLFW_MAXIMIZED</div><div class=\"ttdoc\">Window maximization window hint and attribute.</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:806</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_gacccb29947ea4b16860ebef42c2cb9337\"><div class=\"ttname\"><a href=\"group__window.html#gacccb29947ea4b16860ebef42c2cb9337\">glfwGetWindowAttrib</a></div><div class=\"ttdeci\">int glfwGetWindowAttrib(GLFWwindow *window, int attrib)</div><div class=\"ttdoc\">Returns an attribute of the specified window.</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_gac793e9efd255567b5fb8b445052cfd3e\"><div class=\"ttname\"><a href=\"group__window.html#gac793e9efd255567b5fb8b445052cfd3e\">glfwSetWindowIconifyCallback</a></div><div class=\"ttdeci\">GLFWwindowiconifyfun glfwSetWindowIconifyCallback(GLFWwindow *window, GLFWwindowiconifyfun callback)</div><div class=\"ttdoc\">Sets the iconify callback for the specified window.</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_gaeea7cbc03373a41fb51cfbf9f2a5d4c6\"><div class=\"ttname\"><a href=\"group__window.html#gaeea7cbc03373a41fb51cfbf9f2a5d4c6\">glfwGetWindowSize</a></div><div class=\"ttdeci\">void glfwGetWindowSize(GLFWwindow *window, int *width, int *height)</div><div class=\"ttdoc\">Retrieves the size of the content area of the specified window.</div></div>\n<div class=\"ttc\" id=\"astructGLFWvidmode_html\"><div class=\"ttname\"><a href=\"structGLFWvidmode.html\">GLFWvidmode</a></div><div class=\"ttdoc\">Video mode type.</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:1624</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_ga0e2637a4161afb283f5300c7f94785c9\"><div class=\"ttname\"><a href=\"group__window.html#ga0e2637a4161afb283f5300c7f94785c9\">glfwGetFramebufferSize</a></div><div class=\"ttdeci\">void glfwGetFramebufferSize(GLFWwindow *window, int *width, int *height)</div><div class=\"ttdoc\">Retrieves the size of the framebuffer of the specified window.</div></div>\n<div class=\"ttc\" id=\"astructGLFWvidmode_html_a6066c4ecd251098700062d3b735dba1b\"><div class=\"ttname\"><a href=\"structGLFWvidmode.html#a6066c4ecd251098700062d3b735dba1b\">GLFWvidmode::redBits</a></div><div class=\"ttdeci\">int redBits</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:1634</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_ga0f20825e6e47ee8ba389024519682212\"><div class=\"ttname\"><a href=\"group__window.html#ga0f20825e6e47ee8ba389024519682212\">GLFW_REFRESH_RATE</a></div><div class=\"ttdeci\">#define GLFW_REFRESH_RATE</div><div class=\"ttdoc\">Monitor refresh rate hint.</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:905</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_ga7d9c8c62384b1e2821c4dc48952d2033\"><div class=\"ttname\"><a href=\"group__window.html#ga7d9c8c62384b1e2821c4dc48952d2033\">glfwWindowHint</a></div><div class=\"ttdeci\">void glfwWindowHint(int hint, int value)</div><div class=\"ttdoc\">Sets the specified window hint to the desired value.</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_gafb3cdc45297e06d8f1eb13adc69ca6c4\"><div class=\"ttname\"><a href=\"group__window.html#gafb3cdc45297e06d8f1eb13adc69ca6c4\">GLFW_VISIBLE</a></div><div class=\"ttdeci\">#define GLFW_VISIBLE</div><div class=\"ttdoc\">Window visibility window hint and attribute.</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:782</div></div>\n<div class=\"ttc\" id=\"agroup__monitor_html_gafc1bb972a921ad5b3bd5d63a95fc2d52\"><div class=\"ttname\"><a href=\"group__monitor.html#gafc1bb972a921ad5b3bd5d63a95fc2d52\">glfwGetVideoMode</a></div><div class=\"ttdeci\">const GLFWvidmode * glfwGetVideoMode(GLFWmonitor *monitor)</div><div class=\"ttdoc\">Returns the current mode of the specified monitor.</div></div>\n<div class=\"ttc\" id=\"agroup__window_html_gacdf43e51376051d2c091662e9fe3d7b2\"><div class=\"ttname\"><a href=\"group__window.html#gacdf43e51376051d2c091662e9fe3d7b2\">glfwDestroyWindow</a></div><div class=\"ttdeci\">void glfwDestroyWindow(GLFWwindow *window)</div><div class=\"ttdoc\">Destroys the specified window and its context.</div></div>\n<div class=\"ttc\" id=\"agroup__monitor_html_ga8d9efd1cde9426692c73fe40437d0ae3\"><div class=\"ttname\"><a href=\"group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3\">GLFWmonitor</a></div><div class=\"ttdeci\">struct GLFWmonitor GLFWmonitor</div><div class=\"ttdoc\">Opaque monitor object.</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:1140</div></div>\n<div class=\"ttc\" id=\"astructGLFWvidmode_html_a791bdd6c7697b09f7e9c97054bf05649\"><div class=\"ttname\"><a href=\"structGLFWvidmode.html#a791bdd6c7697b09f7e9c97054bf05649\">GLFWvidmode::refreshRate</a></div><div class=\"ttdeci\">int refreshRate</div><div class=\"ttdef\"><b>Definition:</b> glfw3.h:1643</div></div>\n<address class=\"footer\">\n<p>\nLast update on Mon Jan 20 2020 for GLFW 3.3.2\n</p>\n</address>\n</body>\n</html>\n"
  },
  {
    "path": "thirdparty/glfw/docs/input.dox",
    "content": "/*!\n\n@page input_guide Input guide\n\n@tableofcontents\n\nThis guide introduces the input related functions of GLFW.  For details on\na specific function in this category, see the @ref input.  There are also guides\nfor the other areas of GLFW.\n\n - @ref intro_guide\n - @ref window_guide\n - @ref context_guide\n - @ref vulkan_guide\n - @ref monitor_guide\n\nGLFW provides many kinds of input.  While some can only be polled, like time, or\nonly received via callbacks, like scrolling, many provide both callbacks and\npolling.  Callbacks are more work to use than polling but is less CPU intensive\nand guarantees that you do not miss state changes.\n\nAll input callbacks receive a window handle.  By using the\n[window user pointer](@ref window_userptr), you can access non-global structures\nor objects from your callbacks.\n\nTo get a better feel for how the various events callbacks behave, run the\n`events` test program.  It register every callback supported by GLFW and prints\nout all arguments provided for every event, along with time and sequence\ninformation.\n\n\n@section events Event processing\n\nGLFW needs to poll the window system for events both to provide input to the\napplication and to prove to the window system that the application hasn't locked\nup.  Event processing is normally done each frame after\n[buffer swapping](@ref buffer_swap).  Even when you have no windows, event\npolling needs to be done in order to receive monitor and joystick connection\nevents.\n\nThere are three functions for processing pending events.  @ref glfwPollEvents,\nprocesses only those events that have already been received and then returns\nimmediately.\n\n@code\nglfwPollEvents();\n@endcode\n\nThis is the best choice when rendering continuously, like most games do.\n\nIf you only need to update the contents of the window when you receive new\ninput, @ref glfwWaitEvents is a better choice.\n\n@code\nglfwWaitEvents();\n@endcode\n\nIt puts the thread to sleep until at least one event has been received and then\nprocesses all received events.  This saves a great deal of CPU cycles and is\nuseful for, for example, editing tools.\n\nIf you want to wait for events but have UI elements or other tasks that need\nperiodic updates, @ref glfwWaitEventsTimeout lets you specify a timeout.\n\n@code\nglfwWaitEventsTimeout(0.7);\n@endcode\n\nIt puts the thread to sleep until at least one event has been received, or until\nthe specified number of seconds have elapsed.  It then processes any received\nevents.\n\nIf the main thread is sleeping in @ref glfwWaitEvents, you can wake it from\nanother thread by posting an empty event to the event queue with @ref\nglfwPostEmptyEvent.\n\n@code\nglfwPostEmptyEvent();\n@endcode\n\nDo not assume that callbacks will _only_ be called in response to the above\nfunctions.  While it is necessary to process events in one or more of the ways\nabove, window systems that require GLFW to register callbacks of its own can\npass events to GLFW in response to many window system function calls.  GLFW will\npass those events on to the application callbacks before returning.\n\nFor example, on Windows the system function that @ref glfwSetWindowSize is\nimplemented with will send window size events directly to the event callback\nthat every window has and that GLFW implements for its windows.  If you have set\na [window size callback](@ref window_size) GLFW will call it in turn with the\nnew size before everything returns back out of the @ref glfwSetWindowSize call.\n\n\n@section input_keyboard Keyboard input\n\nGLFW divides keyboard input into two categories; key events and character\nevents.  Key events relate to actual physical keyboard keys, whereas character\nevents relate to the Unicode code points generated by pressing some of them.\n\nKeys and characters do not map 1:1.  A single key press may produce several\ncharacters, and a single character may require several keys to produce.  This\nmay not be the case on your machine, but your users are likely not all using the\nsame keyboard layout, input method or even operating system as you.\n\n\n@subsection input_key Key input\n\nIf you wish to be notified when a physical key is pressed or released or when it\nrepeats, set a key callback.\n\n@code\nglfwSetKeyCallback(window, key_callback);\n@endcode\n\nThe callback function receives the [keyboard key](@ref keys), platform-specific\nscancode, key action and [modifier bits](@ref mods).\n\n@code\nvoid key_callback(GLFWwindow* window, int key, int scancode, int action, int mods)\n{\n    if (key == GLFW_KEY_E && action == GLFW_PRESS)\n        activate_airship();\n}\n@endcode\n\nThe action is one of `GLFW_PRESS`, `GLFW_REPEAT` or `GLFW_RELEASE`.  The key\nwill be `GLFW_KEY_UNKNOWN` if GLFW lacks a key token for it, for example\n_E-mail_ and _Play_ keys.\n\nThe scancode is unique for every key, regardless of whether it has a key token.\nScancodes are platform-specific but consistent over time, so keys will have\ndifferent scancodes depending on the platform but they are safe to save to disk.\nYou can query the scancode for any [named key](@ref keys) on the current\nplatform with @ref glfwGetKeyScancode.\n\n@code\nconst int scancode = glfwGetKeyScancode(GLFW_KEY_X);\nset_key_mapping(scancode, swap_weapons);\n@endcode\n\nThe last reported state for every [named key](@ref keys) is also saved in\nper-window state arrays that can be polled with @ref glfwGetKey.\n\n@code\nint state = glfwGetKey(window, GLFW_KEY_E);\nif (state == GLFW_PRESS)\n{\n    activate_airship();\n}\n@endcode\n\nThe returned state is one of `GLFW_PRESS` or `GLFW_RELEASE`.\n\nThis function only returns cached key event state.  It does not poll the\nsystem for the current physical state of the key.\n\n@anchor GLFW_STICKY_KEYS\nWhenever you poll state, you risk missing the state change you are looking for.\nIf a pressed key is released again before you poll its state, you will have\nmissed the key press.  The recommended solution for this is to use a\nkey callback, but there is also the `GLFW_STICKY_KEYS` input mode.\n\n@code\nglfwSetInputMode(window, GLFW_STICKY_KEYS, GLFW_TRUE);\n@endcode\n\nWhen sticky keys mode is enabled, the pollable state of a key will remain\n`GLFW_PRESS` until the state of that key is polled with @ref glfwGetKey.  Once\nit has been polled, if a key release event had been processed in the meantime,\nthe state will reset to `GLFW_RELEASE`, otherwise it will remain `GLFW_PRESS`.\n\n@anchor GLFW_LOCK_KEY_MODS\nIf you wish to know what the state of the Caps Lock and Num Lock keys was when\ninput events were generated, set the `GLFW_LOCK_KEY_MODS` input mode.\n\n@code\nglfwSetInputMode(window, GLFW_LOCK_KEY_MODS, GLFW_TRUE);\n@endcode\n\nWhen this input mode is enabled, any callback that receives\n[modifier bits](@ref mods) will have the @ref GLFW_MOD_CAPS_LOCK bit set if Caps\nLock was on when the event occurred and the @ref GLFW_MOD_NUM_LOCK bit set if\nNum Lock was on.\n\nThe `GLFW_KEY_LAST` constant holds the highest value of any\n[named key](@ref keys).\n\n\n@subsection input_char Text input\n\nGLFW supports text input in the form of a stream of\n[Unicode code points](https://en.wikipedia.org/wiki/Unicode), as produced by the\noperating system text input system.  Unlike key input, text input obeys keyboard\nlayouts and modifier keys and supports composing characters using\n[dead keys](https://en.wikipedia.org/wiki/Dead_key).  Once received, you can\nencode the code points into UTF-8 or any other encoding you prefer.\n\nBecause an `unsigned int` is 32 bits long on all platforms supported by GLFW,\nyou can treat the code point argument as native endian UTF-32.\n\nIf you wish to offer regular text input, set a character callback.\n\n@code\nglfwSetCharCallback(window, character_callback);\n@endcode\n\nThe callback function receives Unicode code points for key events that would\nhave led to regular text input and generally behaves as a standard text field on\nthat platform.\n\n@code\nvoid character_callback(GLFWwindow* window, unsigned int codepoint)\n{\n}\n@endcode\n\n\n@subsection input_key_name Key names\n\nIf you wish to refer to keys by name, you can query the keyboard layout\ndependent name of printable keys with @ref glfwGetKeyName.\n\n@code\nconst char* key_name = glfwGetKeyName(GLFW_KEY_W, 0);\nshow_tutorial_hint(\"Press %s to move forward\", key_name);\n@endcode\n\nThis function can handle both [keys and scancodes](@ref input_key).  If the\nspecified key is `GLFW_KEY_UNKNOWN` then the scancode is used, otherwise it is\nignored.  This matches the behavior of the key callback, meaning the callback\narguments can always be passed unmodified to this function.\n\n\n@section input_mouse Mouse input\n\nMouse input comes in many forms, including mouse motion, button presses and\nscrolling offsets.  The cursor appearance can also be changed, either to\na custom image or a standard cursor shape from the system theme.\n\n\n@subsection cursor_pos Cursor position\n\nIf you wish to be notified when the cursor moves over the window, set a cursor\nposition callback.\n\n@code\nglfwSetCursorPosCallback(window, cursor_position_callback);\n@endcode\n\nThe callback functions receives the cursor position, measured in screen\ncoordinates but relative to the top-left corner of the window content area.  On\nplatforms that provide it, the full sub-pixel cursor position is passed on.\n\n@code\nstatic void cursor_position_callback(GLFWwindow* window, double xpos, double ypos)\n{\n}\n@endcode\n\nThe cursor position is also saved per-window and can be polled with @ref\nglfwGetCursorPos.\n\n@code\ndouble xpos, ypos;\nglfwGetCursorPos(window, &xpos, &ypos);\n@endcode\n\n\n@subsection cursor_mode Cursor mode\n\n@anchor GLFW_CURSOR\nThe `GLFW_CURSOR` input mode provides several cursor modes for special forms of\nmouse motion input.  By default, the cursor mode is `GLFW_CURSOR_NORMAL`,\nmeaning the regular arrow cursor (or another cursor set with @ref glfwSetCursor)\nis used and cursor motion is not limited.\n\nIf you wish to implement mouse motion based camera controls or other input\nschemes that require unlimited mouse movement, set the cursor mode to\n`GLFW_CURSOR_DISABLED`.\n\n@code\nglfwSetInputMode(window, GLFW_CURSOR, GLFW_CURSOR_DISABLED);\n@endcode\n\nThis will hide the cursor and lock it to the specified window.  GLFW will then\ntake care of all the details of cursor re-centering and offset calculation and\nproviding the application with a virtual cursor position.  This virtual position\nis provided normally via both the cursor position callback and through polling.\n\n@note You should not implement your own version of this functionality using\nother features of GLFW.  It is not supported and will not work as robustly as\n`GLFW_CURSOR_DISABLED`.\n\nIf you only wish the cursor to become hidden when it is over a window but still\nwant it to behave normally, set the cursor mode to `GLFW_CURSOR_HIDDEN`.\n\n@code\nglfwSetInputMode(window, GLFW_CURSOR, GLFW_CURSOR_HIDDEN);\n@endcode\n\nThis mode puts no limit on the motion of the cursor.\n\nTo exit out of either of these special modes, restore the `GLFW_CURSOR_NORMAL`\ncursor mode.\n\n@code\nglfwSetInputMode(window, GLFW_CURSOR, GLFW_CURSOR_NORMAL);\n@endcode\n\n\n@anchor GLFW_RAW_MOUSE_MOTION\n@subsection raw_mouse_motion Raw mouse motion\n\nWhen the cursor is disabled, raw (unscaled and unaccelerated) mouse motion can\nbe enabled if available.\n\nRaw mouse motion is closer to the actual motion of the mouse across a surface.\nIt is not affected by the scaling and acceleration applied to the motion of the\ndesktop cursor.  That processing is suitable for a cursor while raw motion is\nbetter for controlling for example a 3D camera.  Because of this, raw mouse\nmotion is only provided when the cursor is disabled.\n\nCall @ref glfwRawMouseMotionSupported to check if the current machine provides\nraw motion and set the `GLFW_RAW_MOUSE_MOTION` input mode to enable it.  It is\ndisabled by default.\n\n@code\nif (glfwRawMouseMotionSupported())\n    glfwSetInputMode(window, GLFW_RAW_MOUSE_MOTION, GLFW_TRUE);\n@endcode\n\nIf supported, raw mouse motion can be enabled or disabled per-window and at any\ntime but it will only be provided when the cursor is disabled.\n\n\n@subsection cursor_object Cursor objects\n\nGLFW supports creating both custom and system theme cursor images, encapsulated\nas @ref GLFWcursor objects.  They are created with @ref glfwCreateCursor or @ref\nglfwCreateStandardCursor and destroyed with @ref glfwDestroyCursor, or @ref\nglfwTerminate, if any remain.\n\n\n@subsubsection cursor_custom Custom cursor creation\n\nA custom cursor is created with @ref glfwCreateCursor, which returns a handle to\nthe created cursor object.  For example, this creates a 16x16 white square\ncursor with the hot-spot in the upper-left corner:\n\n@code\nunsigned char pixels[16 * 16 * 4];\nmemset(pixels, 0xff, sizeof(pixels));\n\nGLFWimage image;\nimage.width = 16;\nimage.height = 16;\nimage.pixels = pixels;\n\nGLFWcursor* cursor = glfwCreateCursor(&image, 0, 0);\n@endcode\n\nIf cursor creation fails, `NULL` will be returned, so it is necessary to check\nthe return value.\n\nThe image data is 32-bit, little-endian, non-premultiplied RGBA, i.e. eight bits\nper channel with the red channel first.  The pixels are arranged canonically as\nsequential rows, starting from the top-left corner.\n\n\n@subsubsection cursor_standard Standard cursor creation\n\nA cursor with a [standard shape](@ref shapes) from the current system cursor\ntheme can be can be created with @ref glfwCreateStandardCursor.\n\n@code\nGLFWcursor* cursor = glfwCreateStandardCursor(GLFW_HRESIZE_CURSOR);\n@endcode\n\nThese cursor objects behave in the exact same way as those created with @ref\nglfwCreateCursor except that the system cursor theme provides the actual image.\n\n\n@subsubsection cursor_destruction Cursor destruction\n\nWhen a cursor is no longer needed, destroy it with @ref glfwDestroyCursor.\n\n@code\nglfwDestroyCursor(cursor);\n@endcode\n\nCursor destruction always succeeds.  If the cursor is current for any window,\nthat window will revert to the default cursor.  This does not affect the cursor\nmode.  All remaining cursors are destroyed when @ref glfwTerminate is called.\n\n\n@subsubsection cursor_set Cursor setting\n\nA cursor can be set as current for a window with @ref glfwSetCursor.\n\n@code\nglfwSetCursor(window, cursor);\n@endcode\n\nOnce set, the cursor image will be used as long as the system cursor is over the\ncontent area of the window and the [cursor mode](@ref cursor_mode) is set\nto `GLFW_CURSOR_NORMAL`.\n\nA single cursor may be set for any number of windows.\n\nTo revert to the default cursor, set the cursor of that window to `NULL`.\n\n@code\nglfwSetCursor(window, NULL);\n@endcode\n\nWhen a cursor is destroyed, any window that has it set will revert to the\ndefault cursor.  This does not affect the cursor mode.\n\n\n@subsection cursor_enter Cursor enter/leave events\n\nIf you wish to be notified when the cursor enters or leaves the content area of\na window, set a cursor enter/leave callback.\n\n@code\nglfwSetCursorEnterCallback(window, cursor_enter_callback);\n@endcode\n\nThe callback function receives the new classification of the cursor.\n\n@code\nvoid cursor_enter_callback(GLFWwindow* window, int entered)\n{\n    if (entered)\n    {\n        // The cursor entered the content area of the window\n    }\n    else\n    {\n        // The cursor left the content area of the window\n    }\n}\n@endcode\n\nYou can query whether the cursor is currently inside the content area of the\nwindow with the [GLFW_HOVERED](@ref GLFW_HOVERED_attrib) window attribute.\n\n@code\nif (glfwGetWindowAttrib(window, GLFW_HOVERED))\n{\n    highlight_interface();\n}\n@endcode\n\n\n@subsection input_mouse_button Mouse button input\n\nIf you wish to be notified when a mouse button is pressed or released, set\na mouse button callback.\n\n@code\nglfwSetMouseButtonCallback(window, mouse_button_callback);\n@endcode\n\nThe callback function receives the [mouse button](@ref buttons), button action\nand [modifier bits](@ref mods).\n\n@code\nvoid mouse_button_callback(GLFWwindow* window, int button, int action, int mods)\n{\n    if (button == GLFW_MOUSE_BUTTON_RIGHT && action == GLFW_PRESS)\n        popup_menu();\n}\n@endcode\n\nThe action is one of `GLFW_PRESS` or `GLFW_RELEASE`.\n\nMouse button states for [named buttons](@ref buttons) are also saved in\nper-window state arrays that can be polled with @ref glfwGetMouseButton.\n\n@code\nint state = glfwGetMouseButton(window, GLFW_MOUSE_BUTTON_LEFT);\nif (state == GLFW_PRESS)\n{\n    upgrade_cow();\n}\n@endcode\n\nThe returned state is one of `GLFW_PRESS` or `GLFW_RELEASE`.\n\nThis function only returns cached mouse button event state.  It does not poll\nthe system for the current state of the mouse button.\n\n@anchor GLFW_STICKY_MOUSE_BUTTONS\nWhenever you poll state, you risk missing the state change you are looking for.\nIf a pressed mouse button is released again before you poll its state, you will have\nmissed the button press.  The recommended solution for this is to use a\nmouse button callback, but there is also the `GLFW_STICKY_MOUSE_BUTTONS`\ninput mode.\n\n@code\nglfwSetInputMode(window, GLFW_STICKY_MOUSE_BUTTONS, GLFW_TRUE);\n@endcode\n\nWhen sticky mouse buttons mode is enabled, the pollable state of a mouse button\nwill remain `GLFW_PRESS` until the state of that button is polled with @ref\nglfwGetMouseButton.  Once it has been polled, if a mouse button release event\nhad been processed in the meantime, the state will reset to `GLFW_RELEASE`,\notherwise it will remain `GLFW_PRESS`.\n\nThe `GLFW_MOUSE_BUTTON_LAST` constant holds the highest value of any\n[named button](@ref buttons).\n\n\n@subsection scrolling Scroll input\n\nIf you wish to be notified when the user scrolls, whether with a mouse wheel or\ntouchpad gesture, set a scroll callback.\n\n@code\nglfwSetScrollCallback(window, scroll_callback);\n@endcode\n\nThe callback function receives two-dimensional scroll offsets.\n\n@code\nvoid scroll_callback(GLFWwindow* window, double xoffset, double yoffset)\n{\n}\n@endcode\n\nA normal mouse wheel, being vertical, provides offsets along the Y-axis.\n\n\n@section joystick Joystick input\n\nThe joystick functions expose connected joysticks and controllers, with both\nreferred to as joysticks.  It supports up to sixteen joysticks, ranging from\n`GLFW_JOYSTICK_1`, `GLFW_JOYSTICK_2` up to and including `GLFW_JOYSTICK_16` or\n`GLFW_JOYSTICK_LAST`.  You can test whether a [joystick](@ref joysticks) is\npresent with @ref glfwJoystickPresent.\n\n@code\nint present = glfwJoystickPresent(GLFW_JOYSTICK_1);\n@endcode\n\nEach joystick has zero or more axes, zero or more buttons, zero or more hats,\na human-readable name, a user pointer and an SDL compatible GUID.\n\nWhen GLFW is initialized, detected joysticks are added to the beginning of\nthe array.  Once a joystick is detected, it keeps its assigned ID until it is\ndisconnected or the library is terminated, so as joysticks are connected and\ndisconnected, there may appear gaps in the IDs.\n\nJoystick axis, button and hat state is updated when polled and does not require\na window to be created or events to be processed.  However, if you want joystick\nconnection and disconnection events reliably delivered to the\n[joystick callback](@ref joystick_event) then you must\n[process events](@ref events).\n\nTo see all the properties of all connected joysticks in real-time, run the\n`joysticks` test program.\n\n\n@subsection joystick_axis Joystick axis states\n\nThe positions of all axes of a joystick are returned by @ref\nglfwGetJoystickAxes.  See the reference documentation for the lifetime of the\nreturned array.\n\n@code\nint count;\nconst float* axes = glfwGetJoystickAxes(GLFW_JOYSTICK_5, &count);\n@endcode\n\nEach element in the returned array is a value between -1.0 and 1.0.\n\n\n@subsection joystick_button Joystick button states\n\nThe states of all buttons of a joystick are returned by @ref\nglfwGetJoystickButtons.  See the reference documentation for the lifetime of the\nreturned array.\n\n@code\nint count;\nconst unsigned char* buttons = glfwGetJoystickButtons(GLFW_JOYSTICK_3, &count);\n@endcode\n\nEach element in the returned array is either `GLFW_PRESS` or `GLFW_RELEASE`.\n\nFor backward compatibility with earlier versions that did not have @ref\nglfwGetJoystickHats, the button array by default also includes all hats.  See\nthe reference documentation for @ref glfwGetJoystickButtons for details.\n\n\n@subsection joystick_hat Joystick hat states\n\nThe states of all hats are returned by @ref glfwGetJoystickHats.  See the\nreference documentation for the lifetime of the returned array.\n\n@code\nint count;\nconst unsigned char* hats = glfwGetJoystickHats(GLFW_JOYSTICK_7, &count);\n@endcode\n\nEach element in the returned array is one of the following:\n\nName                  | Value\n----                  | -----\n`GLFW_HAT_CENTERED`   | 0\n`GLFW_HAT_UP`         | 1\n`GLFW_HAT_RIGHT`      | 2\n`GLFW_HAT_DOWN`       | 4\n`GLFW_HAT_LEFT`       | 8\n`GLFW_HAT_RIGHT_UP`   | `GLFW_HAT_RIGHT` \\| `GLFW_HAT_UP`\n`GLFW_HAT_RIGHT_DOWN` | `GLFW_HAT_RIGHT` \\| `GLFW_HAT_DOWN`\n`GLFW_HAT_LEFT_UP`    | `GLFW_HAT_LEFT` \\| `GLFW_HAT_UP`\n`GLFW_HAT_LEFT_DOWN`  | `GLFW_HAT_LEFT` \\| `GLFW_HAT_DOWN`\n\nThe diagonal directions are bitwise combinations of the primary (up, right, down\nand left) directions and you can test for these individually by ANDing it with\nthe corresponding direction.\n\n@code\nif (hats[2] & GLFW_HAT_RIGHT)\n{\n    // State of hat 2 could be right-up, right or right-down\n}\n@endcode\n\nFor backward compatibility with earlier versions that did not have @ref\nglfwGetJoystickHats, all hats are by default also included in the button array.\nSee the reference documentation for @ref glfwGetJoystickButtons for details.\n\n\n@subsection joystick_name Joystick name\n\nThe human-readable, UTF-8 encoded name of a joystick is returned by @ref\nglfwGetJoystickName.  See the reference documentation for the lifetime of the\nreturned string.\n\n@code\nconst char* name = glfwGetJoystickName(GLFW_JOYSTICK_4);\n@endcode\n\nJoystick names are not guaranteed to be unique.  Two joysticks of the same model\nand make may have the same name.  Only the [joystick token](@ref joysticks) is\nguaranteed to be unique, and only until that joystick is disconnected.\n\n\n@subsection joystick_userptr Joystick user pointer\n\nEach joystick has a user pointer that can be set with @ref\nglfwSetJoystickUserPointer and queried with @ref glfwGetJoystickUserPointer.\nThis can be used for any purpose you need and will not be modified by GLFW.  The\nvalue will be kept until the joystick is disconnected or until the library is\nterminated.\n\nThe initial value of the pointer is `NULL`.\n\n\n@subsection joystick_event Joystick configuration changes\n\nIf you wish to be notified when a joystick is connected or disconnected, set\na joystick callback.\n\n@code\nglfwSetJoystickCallback(joystick_callback);\n@endcode\n\nThe callback function receives the ID of the joystick that has been connected\nand disconnected and the event that occurred.\n\n@code\nvoid joystick_callback(int jid, int event)\n{\n    if (event == GLFW_CONNECTED)\n    {\n        // The joystick was connected\n    }\n    else if (event == GLFW_DISCONNECTED)\n    {\n        // The joystick was disconnected\n    }\n}\n@endcode\n\nFor joystick connection and disconnection events to be delivered on all\nplatforms, you need to call one of the [event processing](@ref events)\nfunctions.  Joystick disconnection may also be detected and the callback\ncalled by joystick functions.  The function will then return whatever it\nreturns for a disconnected joystick.\n\nOnly @ref glfwGetJoystickName and @ref glfwGetJoystickUserPointer will return\nuseful values for a disconnected joystick and only before the monitor callback\nreturns.\n\n\n@subsection gamepad Gamepad input\n\nThe joystick functions provide unlabeled axes, buttons and hats, with no\nindication of where they are located on the device.  Their order may also vary\nbetween platforms even with the same device.\n\nTo solve this problem the SDL community crowdsourced the\n[SDL_GameControllerDB](https://github.com/gabomdq/SDL_GameControllerDB) project,\na database of mappings from many different devices to an Xbox-like gamepad.\n\nGLFW supports this mapping format and contains a copy of the mappings\navailable at the time of release.  See @ref gamepad_mapping for how to update\nthis at runtime.  Mappings will be assigned to joysticks automatically any time\na joystick is connected or the mappings are updated.\n\nYou can check whether a joystick is both present and has a gamepad mapping with\n@ref glfwJoystickIsGamepad.\n\n@code\nif (glfwJoystickIsGamepad(GLFW_JOYSTICK_2))\n{\n    // Use as gamepad\n}\n@endcode\n\nIf you are only interested in gamepad input you can use this function instead of\n@ref glfwJoystickPresent.\n\nYou can query the human-readable name provided by the gamepad mapping with @ref\nglfwGetGamepadName.  This may or may not be the same as the\n[joystick name](@ref joystick_name).\n\n@code\nconst char* name = glfwGetGamepadName(GLFW_JOYSTICK_7);\n@endcode\n\nTo retrieve the gamepad state of a joystick, call @ref glfwGetGamepadState.\n\n@code\nGLFWgamepadstate state;\n\nif (glfwGetGamepadState(GLFW_JOYSTICK_3, &state))\n{\n    if (state.buttons[GLFW_GAMEPAD_BUTTON_A])\n    {\n        input_jump();\n    }\n\n    input_speed(state.axes[GLFW_GAMEPAD_AXIS_RIGHT_TRIGGER]);\n}\n@endcode\n\nThe @ref GLFWgamepadstate struct has two arrays; one for button states and one\nfor axis states.  The values for each button and axis are the same as for the\n@ref glfwGetJoystickButtons and @ref glfwGetJoystickAxes functions, i.e.\n`GLFW_PRESS` or `GLFW_RELEASE` for buttons and -1.0 to 1.0 inclusive for axes.\n\nThe sizes of the arrays and the positions within each array are fixed.\n\nThe [button indices](@ref gamepad_buttons) are `GLFW_GAMEPAD_BUTTON_A`,\n`GLFW_GAMEPAD_BUTTON_B`, `GLFW_GAMEPAD_BUTTON_X`, `GLFW_GAMEPAD_BUTTON_Y`,\n`GLFW_GAMEPAD_BUTTON_LEFT_BUMPER`, `GLFW_GAMEPAD_BUTTON_RIGHT_BUMPER`,\n`GLFW_GAMEPAD_BUTTON_BACK`, `GLFW_GAMEPAD_BUTTON_START`,\n`GLFW_GAMEPAD_BUTTON_GUIDE`, `GLFW_GAMEPAD_BUTTON_LEFT_THUMB`,\n`GLFW_GAMEPAD_BUTTON_RIGHT_THUMB`, `GLFW_GAMEPAD_BUTTON_DPAD_UP`,\n`GLFW_GAMEPAD_BUTTON_DPAD_RIGHT`, `GLFW_GAMEPAD_BUTTON_DPAD_DOWN` and\n`GLFW_GAMEPAD_BUTTON_DPAD_LEFT`.\n\nFor those who prefer, there are also the `GLFW_GAMEPAD_BUTTON_CROSS`,\n`GLFW_GAMEPAD_BUTTON_CIRCLE`, `GLFW_GAMEPAD_BUTTON_SQUARE` and\n`GLFW_GAMEPAD_BUTTON_TRIANGLE` aliases for the A, B, X and Y button indices.\n\nThe [axis indices](@ref gamepad_axes) are `GLFW_GAMEPAD_AXIS_LEFT_X`,\n`GLFW_GAMEPAD_AXIS_LEFT_Y`, `GLFW_GAMEPAD_AXIS_RIGHT_X`,\n`GLFW_GAMEPAD_AXIS_RIGHT_Y`, `GLFW_GAMEPAD_AXIS_LEFT_TRIGGER` and\n`GLFW_GAMEPAD_AXIS_RIGHT_TRIGGER`.\n\nThe `GLFW_GAMEPAD_BUTTON_LAST` and `GLFW_GAMEPAD_AXIS_LAST` constants equal\nthe largest available index for each array.\n\n\n@subsection gamepad_mapping Gamepad mappings\n\nGLFW contains a copy of the mappings available in\n[SDL_GameControllerDB](https://github.com/gabomdq/SDL_GameControllerDB) at the\ntime of release.  Newer ones can be added at runtime with @ref\nglfwUpdateGamepadMappings.\n\n@code\nconst char* mappings = load_file_contents(\"game/data/gamecontrollerdb.txt\");\n\nglfwUpdateGamepadMappings(mappings);\n@endcode\n\nThis function supports everything from single lines up to and including the\nunmodified contents of the whole `gamecontrollerdb.txt` file.\n\nBelow is a description of the mapping format.  Please keep in mind that __this\ndescription is not authoritative__.  The format is defined by the SDL and\nSDL_GameControllerDB projects and their documentation and code takes precedence.\n\nEach mapping is a single line of comma-separated values describing the GUID,\nname and layout of the gamepad.  Lines that do not begin with a hexadecimal\ndigit are ignored.\n\nThe first value is always the gamepad GUID, a 32 character long hexadecimal\nstring that typically identifies its make, model, revision and the type of\nconnection to the computer.  When this information is not available, the GUID is\ngenerated using the gamepad name.  GLFW uses the SDL 2.0.5+ GUID format but can\nconvert from the older formats.\n\nThe second value is always the human-readable name of the gamepad.\n\nAll subsequent values are in the form `<field>:<value>` and describe the layout\nof the mapping.  These fields may not all be present and may occur in any order.\n\nThe button fields are `a`, `b`, `c`, `d`, `back`, `start`, `guide`, `dpup`,\n`dpright`, `dpdown`, `dpleft`, `leftshoulder`, `rightshoulder`, `leftstick` and\n`rightstick`.\n\nThe axis fields are `leftx`, `lefty`, `rightx`, `righty`, `lefttrigger` and\n`righttrigger`.\n\nThe value of an axis or button field can be a joystick button, a joystick axis,\na hat bitmask or empty.  Joystick buttons are specified as `bN`, for example\n`b2` for the third button.  Joystick axes are specified as `aN`, for example\n`a7` for the eighth button.  Joystick hat bit masks are specified as `hN.N`, for\nexample `h0.8` for left on the first hat.  More than one bit may be set in the\nmask.\n\nBefore an axis there may be a `+` or `-` range modifier, for example `+a3` for\nthe positive half of the fourth axis.  This restricts input to only the positive\nor negative halves of the joystick axis.  After an axis or half-axis there may\nbe the `~` inversion modifier, for example `a2~` or `-a7~`.  This negates the\nvalues of the gamepad axis.\n\nThe hat bit mask match the [hat states](@ref hat_state) in the joystick\nfunctions.\n\nThere is also the special `platform` field that specifies which platform the\nmapping is valid for.  Possible values are `Windows`, `Mac OS X` and `Linux`.\n\nBelow is an example of what a gamepad mapping might look like.  It is the\none built into GLFW for Xbox controllers accessed via the XInput API on Windows.\nThis example has been broken into several lines to fit on the page, but real\ngamepad mappings must be a single line.\n\n@code{.unparsed}\n78696e70757401000000000000000000,XInput Gamepad (GLFW),platform:Windows,a:b0,\nb:b1,x:b2,y:b3,leftshoulder:b4,rightshoulder:b5,back:b6,start:b7,leftstick:b8,\nrightstick:b9,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:a4,\nrighttrigger:a5,dpup:h0.1,dpright:h0.2,dpdown:h0.4,dpleft:h0.8,\n@endcode\n\n@note GLFW does not yet support the output range and modifiers `+` and `-` that\nwere recently added to SDL.  The input modifiers `+`, `-` and `~` are supported\nand described above.\n\n\n@section time Time input\n\nGLFW provides high-resolution time input, in seconds, with @ref glfwGetTime.\n\n@code\ndouble seconds = glfwGetTime();\n@endcode\n\nIt returns the number of seconds since the library was initialized with @ref\nglfwInit.  The platform-specific time sources used typically have micro- or\nnanosecond resolution.\n\nYou can modify the base time with @ref glfwSetTime.\n\n@code\nglfwSetTime(4.0);\n@endcode\n\nThis sets the time to the specified time, in seconds, and it continues to count\nfrom there.\n\nYou can also access the raw timer used to implement the functions above,\nwith @ref glfwGetTimerValue.\n\n@code\nuint64_t value = glfwGetTimerValue();\n@endcode\n\nThis value is in 1&nbsp;/&nbsp;frequency seconds.  The frequency of the raw\ntimer varies depending on the operating system and hardware.  You can query the\nfrequency, in Hz, with @ref glfwGetTimerFrequency.\n\n@code\nuint64_t frequency = glfwGetTimerFrequency();\n@endcode\n\n\n@section clipboard Clipboard input and output\n\nIf the system clipboard contains a UTF-8 encoded string or if it can be\nconverted to one, you can retrieve it with @ref glfwGetClipboardString.  See the\nreference documentation for the lifetime of the returned string.\n\n@code\nconst char* text = glfwGetClipboardString(NULL);\nif (text)\n{\n    insert_text(text);\n}\n@endcode\n\nIf the clipboard is empty or if its contents could not be converted, `NULL` is\nreturned.\n\nThe contents of the system clipboard can be set to a UTF-8 encoded string with\n@ref glfwSetClipboardString.\n\n@code\nglfwSetClipboardString(NULL, \"A string with words in it\");\n@endcode\n\n\n@section path_drop Path drop input\n\nIf you wish to receive the paths of files and/or directories dropped on\na window, set a file drop callback.\n\n@code\nglfwSetDropCallback(window, drop_callback);\n@endcode\n\nThe callback function receives an array of paths encoded as UTF-8.\n\n@code\nvoid drop_callback(GLFWwindow* window, int count, const char** paths)\n{\n    int i;\n    for (i = 0;  i < count;  i++)\n        handle_dropped_file(paths[i]);\n}\n@endcode\n\nThe path array and its strings are only valid until the file drop callback\nreturns, as they may have been generated specifically for that event.  You need\nto make a deep copy of the array if you want to keep the paths.\n\n*/\n"
  },
  {
    "path": "thirdparty/glfw/docs/internal.dox",
    "content": "/*!\n\n@page internals_guide Internal structure\n\n@tableofcontents\n\nThere are several interfaces inside GLFW.  Each interface has its own area of\nresponsibility and its own naming conventions.\n\n\n@section internals_public Public interface\n\nThe most well-known is the public interface, described in the glfw3.h header\nfile.  This is implemented in source files shared by all platforms and these\nfiles contain no platform-specific code.  This code usually ends up calling the\nplatform and internal interfaces to do the actual work.\n\nThe public interface uses the OpenGL naming conventions except with GLFW and\nglfw instead of GL and gl.  For struct members, where OpenGL sets no precedent,\nit use headless camel case.\n\nExamples: `glfwCreateWindow`, `GLFWwindow`, `GLFW_RED_BITS`\n\n\n@section internals_native Native interface\n\nThe [native interface](@ref native) is a small set of publicly available\nbut platform-specific functions, described in the glfw3native.h header file and\nused to gain access to the underlying window, context and (on some platforms)\ndisplay handles used by the platform interface.\n\nThe function names of the native interface are similar to those of the public\ninterface, but embeds the name of the interface that the returned handle is\nfrom.\n\nExamples: `glfwGetX11Window`, `glfwGetWGLContext`\n\n\n@section internals_internal Internal interface\n\nThe internal interface consists of utility functions used by all other\ninterfaces.  It is shared code implemented in the same shared source files as\nthe public and event interfaces.  The internal interface is described in the\ninternal.h header file.\n\nThe internal interface is in charge of GLFW's global data, which it stores in\na `_GLFWlibrary` struct named `_glfw`.\n\nThe internal interface uses the same style as the public interface, except all\nglobal names have a leading underscore.\n\nExamples: `_glfwIsValidContextConfig`, `_GLFWwindow`, `_glfw.monitorCount`\n\n\n@section internals_platform Platform interface\n\nThe platform interface implements all platform-specific operations as a service\nto the public interface.  This includes event processing.  The platform\ninterface is never directly called by application code and never directly calls\napplication-provided callbacks.  It is also prohibited from modifying the\nplatform-independent part of the internal structs.  Instead, it calls the event\ninterface when events interesting to GLFW are received.\n\nThe platform interface mirrors those parts of the public interface that needs to\nperform platform-specific operations on some or all platforms.  The are also\nnamed the same except that the glfw function prefix is replaced by\n_glfwPlatform.\n\nExamples: `_glfwPlatformCreateWindow`\n\nThe platform interface also defines structs that contain platform-specific\nglobal and per-object state.  Their names mirror those of the internal\ninterface, except that an interface-specific suffix is added.\n\nExamples: `_GLFWwindowX11`, `_GLFWcontextWGL`\n\nThese structs are incorporated as members into the internal interface structs\nusing special macros that name them after the specific interface used.  This\nprevents shared code from accidentally using these members.\n\nExamples: `window->win32.handle`, `_glfw.x11.display`\n\n\n@section internals_event Event interface\n\nThe event interface is implemented in the same shared source files as the public\ninterface and is responsible for delivering the events it receives to the\napplication, either via callbacks, via window state changes or both.\n\nThe function names of the event interface use a `_glfwInput` prefix and the\nObjectEvent pattern.\n\nExamples: `_glfwInputWindowFocus`, `_glfwInputCursorPos`\n\n\n@section internals_static Static functions\n\nStatic functions may be used by any interface and have no prefixes or suffixes.\nThese use headless camel case.\n\nExamples: `isValidElementForJoystick`\n\n\n@section internals_config Configuration macros\n\nGLFW uses a number of configuration macros to select at compile time which\ninterfaces and code paths to use.  They are defined in the glfw_config.h header file,\nwhich is generated from the `glfw_config.h.in` file by CMake.\n\nConfiguration macros the same style as tokens in the public interface, except\nwith a leading underscore.\n\nExamples: `_GLFW_WIN32`, `_GLFW_BUILD_DLL`\n\n*/\n"
  },
  {
    "path": "thirdparty/glfw/docs/intro.dox",
    "content": "/*!\n\n@page intro_guide Introduction to the API\n\n@tableofcontents\n\nThis guide introduces the basic concepts of GLFW and describes initialization,\nerror handling and API guarantees and limitations.  For a broad but shallow\ntutorial, see @ref quick_guide instead.  For details on a specific function in\nthis category, see the @ref init.\n\nThere are also guides for the other areas of GLFW.\n\n - @ref window_guide\n - @ref context_guide\n - @ref vulkan_guide\n - @ref monitor_guide\n - @ref input_guide\n\n\n@section intro_init Initialization and termination\n\nBefore most GLFW functions may be called, the library must be initialized.\nThis initialization checks what features are available on the machine,\nenumerates monitors and joysticks, initializes the timer and performs any\nrequired platform-specific initialization.\n\nOnly the following functions may be called before the library has been\nsuccessfully initialized, and only from the main thread.\n\n - @ref glfwGetVersion\n - @ref glfwGetVersionString\n - @ref glfwGetError\n - @ref glfwSetErrorCallback\n - @ref glfwInitHint\n - @ref glfwInit\n - @ref glfwTerminate\n\nCalling any other function before successful initialization will cause a @ref\nGLFW_NOT_INITIALIZED error.\n\n\n@subsection intro_init_init Initializing GLFW\n\nThe library is initialized with @ref glfwInit, which returns `GLFW_FALSE` if an\nerror occurred.\n\n@code\nif (!glfwInit())\n{\n    // Handle initialization failure\n}\n@endcode\n\nIf any part of initialization fails, any parts that succeeded are terminated as\nif @ref glfwTerminate had been called.  The library only needs to be initialized\nonce and additional calls to an already initialized library will return\n`GLFW_TRUE` immediately.\n\nOnce the library has been successfully initialized, it should be terminated\nbefore the application exits.  Modern systems are very good at freeing resources\nallocated by programs that exit, but GLFW sometimes has to change global system\nsettings and these might not be restored without termination.\n\n\n@subsection init_hints Initialization hints\n\nInitialization hints are set before @ref glfwInit and affect how the library\nbehaves until termination.  Hints are set with @ref glfwInitHint.\n\n@code\nglfwInitHint(GLFW_JOYSTICK_HAT_BUTTONS, GLFW_FALSE);\n@endcode\n\nThe values you set hints to are never reset by GLFW, but they only take effect\nduring initialization.  Once GLFW has been initialized, any values you set will\nbe ignored until the library is terminated and initialized again.\n\nSome hints are platform specific.  These may be set on any platform but they\nwill only affect their specific platform.  Other platforms will ignore them.\nSetting these hints requires no platform specific headers or functions.\n\n\n@subsubsection init_hints_shared Shared init hints\n\n@anchor GLFW_JOYSTICK_HAT_BUTTONS\n__GLFW_JOYSTICK_HAT_BUTTONS__ specifies whether to also expose joystick hats as\nbuttons, for compatibility with earlier versions of GLFW that did not have @ref\nglfwGetJoystickHats.  Set this with @ref glfwInitHint.\n\n\n@subsubsection init_hints_osx macOS specific init hints\n\n@anchor GLFW_COCOA_CHDIR_RESOURCES_hint\n__GLFW_COCOA_CHDIR_RESOURCES__ specifies whether to set the current directory to\nthe application to the `Contents/Resources` subdirectory of the application's\nbundle, if present.  Set this with @ref glfwInitHint.\n\n@anchor GLFW_COCOA_MENUBAR_hint\n__GLFW_COCOA_MENUBAR__ specifies whether to create a basic menu bar, either from\na nib or manually, when the first window is created, which is when AppKit is\ninitialized.  Set this with @ref glfwInitHint.\n\n\n@subsubsection init_hints_values Supported and default values\n\nInitialization hint             | Default value | Supported values\n------------------------------- | ------------- | ----------------\n@ref GLFW_JOYSTICK_HAT_BUTTONS  | `GLFW_TRUE`   | `GLFW_TRUE` or `GLFW_FALSE`\n@ref GLFW_COCOA_CHDIR_RESOURCES | `GLFW_TRUE`   | `GLFW_TRUE` or `GLFW_FALSE`\n@ref GLFW_COCOA_MENUBAR         | `GLFW_TRUE`   | `GLFW_TRUE` or `GLFW_FALSE`\n\n\n@subsection intro_init_terminate Terminating GLFW\n\nBefore your application exits, you should terminate the GLFW library if it has\nbeen initialized.  This is done with @ref glfwTerminate.\n\n@code\nglfwTerminate();\n@endcode\n\nThis will destroy any remaining window, monitor and cursor objects, restore any\nmodified gamma ramps, re-enable the screensaver if it had been disabled and free\nany other resources allocated by GLFW.\n\nOnce the library is terminated, it is as if it had never been initialized and\nyou will need to initialize it again before being able to use GLFW.  If the\nlibrary was not initialized or had already been terminated, it return\nimmediately.\n\n\n@section error_handling Error handling\n\nSome GLFW functions have return values that indicate an error, but this is often\nnot very helpful when trying to figure out what happened or why it occurred.\nOther functions have no return value reserved for errors, so error notification\nneeds a separate channel.  Finally, far from all GLFW functions have return\nvalues.\n\nThe last [error code](@ref errors) for the calling thread can be queried at any\ntime with @ref glfwGetError.\n\n@code\nint code = glfwGetError(NULL);\n\nif (code != GLFW_NO_ERROR)\n    handle_error(code);\n@endcode\n\nIf no error has occurred since the last call, @ref GLFW_NO_ERROR (zero) is\nreturned.  The error is cleared before the function returns.\n\nThe error code indicates the general category of the error.  Some error codes,\nsuch as @ref GLFW_NOT_INITIALIZED has only a single meaning, whereas others like\n@ref GLFW_PLATFORM_ERROR are used for many different errors.\n\nGLFW often has more information about an error than its general category.  You\ncan retrieve a UTF-8 encoded human-readable description along with the error\ncode.  If no error has occurred since the last call, the description is set to\n`NULL`.\n\n@code\nconst char* description;\nint code = glfwGetError(&description);\n\nif (description)\n    display_error_message(code, description);\n@endcode\n\nThe retrieved description string is only valid until the next error occurs.\nThis means you must make a copy of it if you want to keep it.\n\nYou can also set an error callback, which will be called each time an error\noccurs.  It is set with @ref glfwSetErrorCallback.\n\n@code\nglfwSetErrorCallback(error_callback);\n@endcode\n\nThe error callback receives the same error code and human-readable description\nreturned by @ref glfwGetError.\n\n@code\nvoid error_callback(int code, const char* description)\n{\n    display_error_message(code, description);\n}\n@endcode\n\nThe error callback is called after the error is stored, so calling @ref\nglfwGetError from within the error callback returns the same values as the\ncallback argument.\n\nThe description string passed to the callback is only valid until the error\ncallback returns.  This means you must make a copy of it if you want to keep it.\n\n__Reported errors are never fatal.__  As long as GLFW was successfully\ninitialized, it will remain initialized and in a safe state until terminated\nregardless of how many errors occur.  If an error occurs during initialization\nthat causes @ref glfwInit to fail, any part of the library that was initialized\nwill be safely terminated.\n\nDo not rely on a currently invalid call to generate a specific error, as in the\nfuture that same call may generate a different error or become valid.\n\n\n@section coordinate_systems Coordinate systems\n\nGLFW has two primary coordinate systems: the _virtual screen_ and the window\n_content area_ or _content area_.  Both use the same unit: _virtual screen\ncoordinates_, or just _screen coordinates_, which don't necessarily correspond\nto pixels.\n\n<img src=\"spaces.svg\" width=\"90%\" />\n\nBoth the virtual screen and the content area coordinate systems have the X-axis\npointing to the right and the Y-axis pointing down.\n\nWindow and monitor positions are specified as the position of the upper-left\ncorners of their content areas relative to the virtual screen, while cursor\npositions are specified relative to a window's content area.\n\nBecause the origin of the window's content area coordinate system is also the\npoint from which the window position is specified, you can translate content\narea coordinates to the virtual screen by adding the window position.  The\nwindow frame, when present, extends out from the content area but does not\naffect the window position.\n\nAlmost all positions and sizes in GLFW are measured in screen coordinates\nrelative to one of the two origins above.  This includes cursor positions,\nwindow positions and sizes, window frame sizes, monitor positions and video mode\nresolutions.\n\nTwo exceptions are the [monitor physical size](@ref monitor_size), which is\nmeasured in millimetres, and [framebuffer size](@ref window_fbsize), which is\nmeasured in pixels.\n\nPixels and screen coordinates may map 1:1 on your machine, but they won't on\nevery other machine, for example on a Mac with a Retina display.  The ratio\nbetween screen coordinates and pixels may also change at run-time depending on\nwhich monitor the window is currently considered to be on.\n\n\n@section guarantees_limitations Guarantees and limitations\n\nThis section describes the conditions under which GLFW can be expected to\nfunction, barring bugs in the operating system or drivers.  Use of GLFW outside\nof these limits may work on some platforms, or on some machines, or some of the\ntime, or on some versions of GLFW, but it may break at any time and this will\nnot be considered a bug.\n\n\n@subsection lifetime Pointer lifetimes\n\nGLFW will never free any pointer you provide to it and you must never free any\npointer it provides to you.\n\nMany GLFW functions return pointers to dynamically allocated structures, strings\nor arrays, and some callbacks are provided with strings or arrays.  These are\nalways managed by GLFW and should never be freed by the application.  The\nlifetime of these pointers is documented for each GLFW function and callback.\nIf you need to keep this data, you must copy it before its lifetime expires.\n\nMany GLFW functions accept pointers to structures or strings allocated by the\napplication.  These are never freed by GLFW and are always the responsibility of\nthe application.  If GLFW needs to keep the data in these structures or strings,\nit is copied before the function returns.\n\nPointer lifetimes are guaranteed not to be shortened in future minor or patch\nreleases.\n\n\n@subsection reentrancy Reentrancy\n\nGLFW event processing and object destruction are not reentrant.  This means that\nthe following functions must not be called from any callback function:\n\n - @ref glfwDestroyWindow\n - @ref glfwDestroyCursor\n - @ref glfwPollEvents\n - @ref glfwWaitEvents\n - @ref glfwWaitEventsTimeout\n - @ref glfwTerminate\n\nThese functions may be made reentrant in future minor or patch releases, but\nfunctions not on this list will not be made non-reentrant.\n\n\n@subsection thread_safety Thread safety\n\nMost GLFW functions must only be called from the main thread (the thread that\ncalls main), but some may be called from any thread once the library has been\ninitialized.  Before initialization the whole library is thread-unsafe.\n\nThe reference documentation for every GLFW function states whether it is limited\nto the main thread.\n\nInitialization, termination, event processing and the creation and\ndestruction of windows, cursors and OpenGL and OpenGL ES contexts are all\nrestricted to the main thread due to limitations of one or several platforms.\n\nBecause event processing must be performed on the main thread, all callbacks\nexcept for the error callback will only be called on that thread.  The error\ncallback may be called on any thread, as any GLFW function may generate errors.\n\nThe error code and description may be queried from any thread.\n\n - @ref glfwGetError\n\nEmpty events may be posted from any thread.\n\n - @ref glfwPostEmptyEvent\n\nThe window user pointer and close flag may be read and written from any thread,\nbut this is not synchronized by GLFW.\n\n - @ref glfwGetWindowUserPointer\n - @ref glfwSetWindowUserPointer\n - @ref glfwWindowShouldClose\n - @ref glfwSetWindowShouldClose\n\nThese functions for working with OpenGL and OpenGL ES contexts may be called\nfrom any thread, but the window object is not synchronized by GLFW.\n\n - @ref glfwMakeContextCurrent\n - @ref glfwGetCurrentContext\n - @ref glfwSwapBuffers\n - @ref glfwSwapInterval\n - @ref glfwExtensionSupported\n - @ref glfwGetProcAddress\n\nThe raw timer functions may be called from any thread.\n\n - @ref glfwGetTimerFrequency\n - @ref glfwGetTimerValue\n\nThe regular timer may be used from any thread, but reading and writing the timer\noffset is not synchronized by GLFW.\n\n - @ref glfwGetTime\n - @ref glfwSetTime\n\nLibrary version information may be queried from any thread.\n\n - @ref glfwGetVersion\n - @ref glfwGetVersionString\n\nAll Vulkan related functions may be called from any thread.\n\n - @ref glfwVulkanSupported\n - @ref glfwGetRequiredInstanceExtensions\n - @ref glfwGetInstanceProcAddress\n - @ref glfwGetPhysicalDevicePresentationSupport\n - @ref glfwCreateWindowSurface\n\nGLFW uses synchronization objects internally only to manage the per-thread\ncontext and error states.  Additional synchronization is left to the\napplication.\n\nFunctions that may currently be called from any thread will always remain so,\nbut functions that are currently limited to the main thread may be updated to\nallow calls from any thread in future releases.\n\n\n@subsection compatibility Version compatibility\n\nGLFW uses [Semantic Versioning](https://semver.org/).  This guarantees source\nand binary backward compatibility with earlier minor versions of the API.  This\nmeans that you can drop in a newer version of the library and existing programs\nwill continue to compile and existing binaries will continue to run.\n\nOnce a function or constant has been added, the signature of that function or\nvalue of that constant will remain unchanged until the next major version of\nGLFW.  No compatibility of any kind is guaranteed between major versions.\n\nUndocumented behavior, i.e. behavior that is not described in the documentation,\nmay change at any time until it is documented.\n\nIf the reference documentation and the implementation differ, the reference\ndocumentation will almost always take precedence and the implementation will be\nfixed in the next release.  The reference documentation will also take\nprecedence over anything stated in a guide.\n\n\n@subsection event_order Event order\n\nThe order of arrival of related events is not guaranteed to be consistent\nacross platforms.  The exception is synthetic key and mouse button release\nevents, which are always delivered after the window defocus event.\n\n\n@section intro_version Version management\n\nGLFW provides mechanisms for identifying what version of GLFW your application\nwas compiled against as well as what version it is currently running against.\nIf you are loading GLFW dynamically (not just linking dynamically), you can use\nthis to verify that the library binary is compatible with your application.\n\n\n@subsection intro_version_compile Compile-time version\n\nThe compile-time version of GLFW is provided by the GLFW header with the\n`GLFW_VERSION_MAJOR`, `GLFW_VERSION_MINOR` and `GLFW_VERSION_REVISION` macros.\n\n@code\nprintf(\"Compiled against GLFW %i.%i.%i\\n\",\n       GLFW_VERSION_MAJOR,\n       GLFW_VERSION_MINOR,\n       GLFW_VERSION_REVISION);\n@endcode\n\n\n@subsection intro_version_runtime Run-time version\n\nThe run-time version can be retrieved with @ref glfwGetVersion, a function that\nmay be called regardless of whether GLFW is initialized.\n\n@code\nint major, minor, revision;\nglfwGetVersion(&major, &minor, &revision);\n\nprintf(\"Running against GLFW %i.%i.%i\\n\", major, minor, revision);\n@endcode\n\n\n@subsection intro_version_string Version string\n\nGLFW 3 also provides a compile-time generated version string that describes the\nversion, platform, compiler and any platform-specific compile-time options.\nThis is primarily intended for submitting bug reports, to allow developers to\nsee which code paths are enabled in a binary.\n\nThe version string is returned by @ref glfwGetVersionString, a function that may\nbe called regardless of whether GLFW is initialized.\n\n__Do not use the version string__ to parse the GLFW library version.  The @ref\nglfwGetVersion function already provides the version of the running library\nbinary.\n\nThe format of the string is as follows:\n - The version of GLFW\n - The name of the window system API\n - The name of the context creation API\n - Any additional options or APIs\n\nFor example, when compiling GLFW 3.0 with MinGW using the Win32 and WGL\nback ends, the version string may look something like this:\n\n@code\n3.0.0 Win32 WGL MinGW\n@endcode\n\n*/\n"
  },
  {
    "path": "thirdparty/glfw/docs/main.dox",
    "content": "/*!\n\n@mainpage notitle\n\n@section main_intro Introduction\n\nGLFW is a free, Open Source, multi-platform library for OpenGL, OpenGL ES and\nVulkan application development.  It provides a simple, platform-independent API\nfor creating windows, contexts and surfaces, reading input, handling events, etc.\n\n@ref news_33 list new features, caveats and deprecations.\n\n@ref quick_guide is a guide for users new to GLFW.  It takes you through how to\nwrite a small but complete program.\n\nThere are guides for each section of the API:\n\n - @ref intro_guide – initialization, error handling and high-level design\n - @ref window_guide – creating and working with windows and framebuffers\n - @ref context_guide – working with OpenGL and OpenGL ES contexts\n - @ref vulkan_guide - working with Vulkan objects and extensions\n - @ref monitor_guide – enumerating and working with monitors and video modes\n - @ref input_guide – receiving events, polling and processing input\n\nOnce you have written a program, see @ref compile_guide and @ref build_guide.\n\nThe [reference documentation](modules.html) provides more detailed information\nabout specific functions.\n\n@ref moving_guide explains what has changed and how to update existing code to\nuse the new API.\n\nThere is a section on @ref guarantees_limitations for pointer lifetimes,\nreentrancy, thread safety, event order and backward and forward compatibility.\n\nThe [FAQ](https://www.glfw.org/faq.html) answers many common questions about the\ndesign, implementation and use of GLFW.\n\nFinally, @ref compat_guide explains what APIs, standards and protocols GLFW uses\nand what happens when they are not present on a given machine.\n\nThis documentation was generated with Doxygen.  The sources for it are available\nin both the [source distribution](https://www.glfw.org/download.html) and\n[GitHub repository](https://github.com/glfw/glfw).\n\n*/\n"
  },
  {
    "path": "thirdparty/glfw/docs/monitor.dox",
    "content": "/*!\n\n@page monitor_guide Monitor guide\n\n@tableofcontents\n\nThis guide introduces the monitor related functions of GLFW.  For details on\na specific function in this category, see the @ref monitor.  There are also\nguides for the other areas of GLFW.\n\n - @ref intro_guide\n - @ref window_guide\n - @ref context_guide\n - @ref vulkan_guide\n - @ref input_guide\n\n\n@section monitor_object Monitor objects\n\nA monitor object represents a currently connected monitor and is represented as\na pointer to the [opaque](https://en.wikipedia.org/wiki/Opaque_data_type) type\n@ref GLFWmonitor.  Monitor objects cannot be created or destroyed by the\napplication and retain their addresses until the monitors they represent are\ndisconnected or until the library is [terminated](@ref intro_init_terminate).\n\nEach monitor has a current video mode, a list of supported video modes,\na virtual position, a human-readable name, an estimated physical size and\na gamma ramp.  One of the monitors is the primary monitor.\n\nThe virtual position of a monitor is in\n[screen coordinates](@ref coordinate_systems) and, together with the current\nvideo mode, describes the viewports that the connected monitors provide into the\nvirtual desktop that spans them.\n\nTo see how GLFW views your monitor setup and its available video modes, run the\n`monitors` test program.\n\n\n@subsection monitor_monitors Retrieving monitors\n\nThe primary monitor is returned by @ref glfwGetPrimaryMonitor.  It is the user's\npreferred monitor and is usually the one with global UI elements like task bar\nor menu bar.\n\n@code\nGLFWmonitor* primary = glfwGetPrimaryMonitor();\n@endcode\n\nYou can retrieve all currently connected monitors with @ref glfwGetMonitors.\nSee the reference documentation for the lifetime of the returned array.\n\n@code\nint count;\nGLFWmonitor** monitors = glfwGetMonitors(&count);\n@endcode\n\nThe primary monitor is always the first monitor in the returned array, but other\nmonitors may be moved to a different index when a monitor is connected or\ndisconnected.\n\n\n@subsection monitor_event Monitor configuration changes\n\nIf you wish to be notified when a monitor is connected or disconnected, set\na monitor callback.\n\n@code\nglfwSetMonitorCallback(monitor_callback);\n@endcode\n\nThe callback function receives the handle for the monitor that has been\nconnected or disconnected and the event that occurred.\n\n@code\nvoid monitor_callback(GLFWmonitor* monitor, int event)\n{\n    if (event == GLFW_CONNECTED)\n    {\n        // The monitor was connected\n    }\n    else if (event == GLFW_DISCONNECTED)\n    {\n        // The monitor was disconnected\n    }\n}\n@endcode\n\nIf a monitor is disconnected, all windows that are full screen on it will be\nswitched to windowed mode before the callback is called.  Only @ref\nglfwGetMonitorName and @ref glfwGetMonitorUserPointer will return useful values\nfor a disconnected monitor and only before the monitor callback returns.\n\n\n@section monitor_properties Monitor properties\n\nEach monitor has a current video mode, a list of supported video modes,\na virtual position, a content scale, a human-readable name, a user pointer, an\nestimated physical size and a gamma ramp.\n\n\n@subsection monitor_modes Video modes\n\nGLFW generally does a good job selecting a suitable video mode when you create\na full screen window, change its video mode or make a windowed one full\nscreen, but it is sometimes useful to know exactly which video modes are\nsupported.\n\nVideo modes are represented as @ref GLFWvidmode structures.  You can get an\narray of the video modes supported by a monitor with @ref glfwGetVideoModes.\nSee the reference documentation for the lifetime of the returned array.\n\n@code\nint count;\nGLFWvidmode* modes = glfwGetVideoModes(monitor, &count);\n@endcode\n\nTo get the current video mode of a monitor call @ref glfwGetVideoMode.  See the\nreference documentation for the lifetime of the returned pointer.\n\n@code\nconst GLFWvidmode* mode = glfwGetVideoMode(monitor);\n@endcode\n\nThe resolution of a video mode is specified in\n[screen coordinates](@ref coordinate_systems), not pixels.\n\n\n@subsection monitor_size Physical size\n\nThe physical size of a monitor in millimetres, or an estimation of it, can be\nretrieved with @ref glfwGetMonitorPhysicalSize.  This has no relation to its\ncurrent _resolution_, i.e. the width and height of its current\n[video mode](@ref monitor_modes).\n\n@code\nint width_mm, height_mm;\nglfwGetMonitorPhysicalSize(monitor, &width_mm, &height_mm);\n@endcode\n\nWhile this can be used to calculate the raw DPI of a monitor, this is often not\nuseful.  Instead use the [monitor content scale](@ref monitor_scale) and\n[window content scale](@ref window_scale) to scale your content.\n\n\n@subsection monitor_scale Content scale\n\nThe content scale for a monitor can be retrieved with @ref\nglfwGetMonitorContentScale.\n\n@code\nfloat xscale, yscale;\nglfwGetMonitorContentScale(monitor, &xscale, &yscale);\n@endcode\n\nThe content scale is the ratio between the current DPI and the platform's\ndefault DPI.  This is especially important for text and any UI elements.  If the\npixel dimensions of your UI scaled by this look appropriate on your machine then\nit should appear at a reasonable size on other machines regardless of their DPI\nand scaling settings.  This relies on the system DPI and scaling settings being\nsomewhat correct.\n\nThe content scale may depend on both the monitor resolution and pixel density\nand on user settings.  It may be very different from the raw DPI calculated from\nthe physical size and current resolution.\n\n\n@subsection monitor_pos Virtual position\n\nThe position of the monitor on the virtual desktop, in\n[screen coordinates](@ref coordinate_systems), can be retrieved with @ref\nglfwGetMonitorPos.\n\n@code\nint xpos, ypos;\nglfwGetMonitorPos(monitor, &xpos, &ypos);\n@endcode\n\n\n@subsection monitor_workarea Work area\n\nThe area of a monitor not occupied by global task bars or menu bars is the work\narea.  This is specified in [screen coordinates](@ref coordinate_systems) and\ncan be retrieved with @ref glfwGetMonitorWorkarea.\n\n@code\nint xpos, ypos, width, height;\nglfwGetMonitorWorkarea(monitor, &xpos, &ypos, &width, &height);\n@endcode\n\n\n@subsection monitor_name Human-readable name\n\nThe human-readable, UTF-8 encoded name of a monitor is returned by @ref\nglfwGetMonitorName.  See the reference documentation for the lifetime of the\nreturned string.\n\n@code\nconst char* name = glfwGetMonitorName(monitor);\n@endcode\n\nMonitor names are not guaranteed to be unique.  Two monitors of the same model\nand make may have the same name.  Only the monitor handle is guaranteed to be\nunique, and only until that monitor is disconnected.\n\n\n@subsection monitor_userptr User pointer\n\nEach monitor has a user pointer that can be set with @ref\nglfwSetMonitorUserPointer and queried with @ref glfwGetMonitorUserPointer.  This\ncan be used for any purpose you need and will not be modified by GLFW.  The\nvalue will be kept until the monitor is disconnected or until the library is\nterminated.\n\nThe initial value of the pointer is `NULL`.\n\n\n@subsection monitor_gamma Gamma ramp\n\nThe gamma ramp of a monitor can be set with @ref glfwSetGammaRamp, which accepts\na monitor handle and a pointer to a @ref GLFWgammaramp structure.\n\n@code\nGLFWgammaramp ramp;\nunsigned short red[256], green[256], blue[256];\n\nramp.size = 256;\nramp.red = red;\nramp.green = green;\nramp.blue = blue;\n\nfor (i = 0;  i < ramp.size;  i++)\n{\n    // Fill out gamma ramp arrays as desired\n}\n\nglfwSetGammaRamp(monitor, &ramp);\n@endcode\n\nThe gamma ramp data is copied before the function returns, so there is no need\nto keep it around once the ramp has been set.\n\nIt is recommended that your gamma ramp have the same size as the current gamma\nramp for that monitor.\n\nThe current gamma ramp for a monitor is returned by @ref glfwGetGammaRamp.  See\nthe reference documentation for the lifetime of the returned structure.\n\n@code\nconst GLFWgammaramp* ramp = glfwGetGammaRamp(monitor);\n@endcode\n\nIf you wish to set a regular gamma ramp, you can have GLFW calculate it for you\nfrom the desired exponent with @ref glfwSetGamma, which in turn calls @ref\nglfwSetGammaRamp with the resulting ramp.\n\n@code\nglfwSetGamma(monitor, 1.0);\n@endcode\n\nTo experiment with gamma correction via the @ref glfwSetGamma function, run the\n`gamma` test program.\n\n@note The software controlled gamma ramp is applied _in addition_ to the\nhardware gamma correction, which today is usually an approximation of sRGB\ngamma.  This means that setting a perfectly linear ramp, or gamma 1.0, will\nproduce the default (usually sRGB-like) behavior.\n\n*/\n"
  },
  {
    "path": "thirdparty/glfw/docs/moving.dox",
    "content": "/*!\n\n@page moving_guide Moving from GLFW 2 to 3\n\n@tableofcontents\n\nThis is a transition guide for moving from GLFW 2 to 3.  It describes what has\nchanged or been removed, but does _not_ include\n[new features](@ref news) unless they are required when moving an existing code\nbase onto the new API.  For example, the new multi-monitor functions are\nrequired to create full screen windows with GLFW 3.\n\n\n@section moving_removed Changed and removed features\n\n@subsection moving_renamed_files Renamed library and header file\n\nThe GLFW 3 header is named @ref glfw3.h and moved to the `GLFW` directory, to\navoid collisions with the headers of other major versions.  Similarly, the GLFW\n3 library is named `glfw3,` except when it's installed as a shared library on\nUnix-like systems, where it uses the\n[soname](https://en.wikipedia.org/wiki/soname) `libglfw.so.3`.\n\n@par Old syntax\n@code\n#include <GL/glfw.h>\n@endcode\n\n@par New syntax\n@code\n#include <GLFW/glfw3.h>\n@endcode\n\n\n@subsection moving_threads Removal of threading functions\n\nThe threading functions have been removed, including the per-thread sleep\nfunction.  They were fairly primitive, under-used, poorly integrated and took\ntime away from the focus of GLFW (i.e.  context, input and window).  There are\nbetter threading libraries available and native threading support is available\nin both [C++11](https://en.cppreference.com/w/cpp/thread) and\n[C11](https://en.cppreference.com/w/c/thread), both of which are gaining\ntraction.\n\nIf you wish to use the C++11 or C11 facilities but your compiler doesn't yet\nsupport them, see the\n[TinyThread++](https://gitorious.org/tinythread/tinythreadpp) and\n[TinyCThread](https://github.com/tinycthread/tinycthread) projects created by\nthe original author of GLFW.  These libraries implement a usable subset of the\nthreading APIs in C++11 and C11, and in fact some GLFW 3 test programs use\nTinyCThread.\n\nHowever, GLFW 3 has better support for _use from multiple threads_ than GLFW\n2 had.  Contexts can be made current on any thread, although only a single\nthread at a time, and the documentation explicitly states which functions may be\nused from any thread and which must only be used from the main thread.\n\n@par Removed functions\n`glfwSleep`, `glfwCreateThread`, `glfwDestroyThread`, `glfwWaitThread`,\n`glfwGetThreadID`, `glfwCreateMutex`, `glfwDestroyMutex`, `glfwLockMutex`,\n`glfwUnlockMutex`, `glfwCreateCond`, `glfwDestroyCond`, `glfwWaitCond`,\n`glfwSignalCond`, `glfwBroadcastCond` and `glfwGetNumberOfProcessors`.\n\n@par Removed types\n`GLFWthreadfun`\n\n\n@subsection moving_image Removal of image and texture loading\n\nThe image and texture loading functions have been removed.  They only supported\nthe Targa image format, making them mostly useful for beginner level examples.\nTo become of sufficiently high quality to warrant keeping them in GLFW 3, they\nwould need not only to support other formats, but also modern extensions to\nOpenGL texturing.  This would either add a number of external\ndependencies (libjpeg, libpng, etc.), or force GLFW to ship with inline versions\nof these libraries.\n\nAs there already are libraries doing this, it is unnecessary both to duplicate\nthe work and to tie the duplicate to GLFW.  The resulting library would also be\nplatform-independent, as both OpenGL and stdio are available wherever GLFW is.\n\n@par Removed functions\n`glfwReadImage`, `glfwReadMemoryImage`, `glfwFreeImage`, `glfwLoadTexture2D`,\n`glfwLoadMemoryTexture2D` and `glfwLoadTextureImage2D`.\n\n\n@subsection moving_stdcall Removal of GLFWCALL macro\n\nThe `GLFWCALL` macro, which made callback functions use\n[__stdcall](https://msdn.microsoft.com/en-us/library/zxk0tw93.aspx) on Windows,\nhas been removed.  GLFW is written in C, not Pascal.  Removing this macro means\nthere's one less thing for application programmers to remember, i.e. the\nrequirement to mark all callback functions with `GLFWCALL`.  It also simplifies\nthe creation of DLLs and DLL link libraries, as there's no need to explicitly\ndisable `@n` entry point suffixes.\n\n@par Old syntax\n@code\nvoid GLFWCALL callback_function(...);\n@endcode\n\n@par New syntax\n@code\nvoid callback_function(...);\n@endcode\n\n\n@subsection moving_window_handles Window handle parameters\n\nBecause GLFW 3 supports multiple windows, window handle parameters have been\nadded to all window-related GLFW functions and callbacks.  The handle of\na newly created window is returned by @ref glfwCreateWindow (formerly\n`glfwOpenWindow`).  Window handles are pointers to the\n[opaque](https://en.wikipedia.org/wiki/Opaque_data_type) type @ref GLFWwindow.\n\n@par Old syntax\n@code\nglfwSetWindowTitle(\"New Window Title\");\n@endcode\n\n@par New syntax\n@code\nglfwSetWindowTitle(window, \"New Window Title\");\n@endcode\n\n\n@subsection moving_monitor Explicit monitor selection\n\nGLFW 3 provides support for multiple monitors.  To request a full screen mode window,\ninstead of passing `GLFW_FULLSCREEN` you specify which monitor you wish the\nwindow to use.  The @ref glfwGetPrimaryMonitor function returns the monitor that\nGLFW 2 would have selected, but there are many other\n[monitor functions](@ref monitor_guide).  Monitor handles are pointers to the\n[opaque](https://en.wikipedia.org/wiki/Opaque_data_type) type @ref GLFWmonitor.\n\n@par Old basic full screen\n@code\nglfwOpenWindow(640, 480, 8, 8, 8, 0, 24, 0, GLFW_FULLSCREEN);\n@endcode\n\n@par New basic full screen\n@code\nwindow = glfwCreateWindow(640, 480, \"My Window\", glfwGetPrimaryMonitor(), NULL);\n@endcode\n\n@note The framebuffer bit depth parameters of `glfwOpenWindow` have been turned\ninto [window hints](@ref window_hints), but as they have been given\n[sane defaults](@ref window_hints_values) you rarely need to set these hints.\n\n\n@subsection moving_autopoll Removal of automatic event polling\n\nGLFW 3 does not automatically poll for events in @ref glfwSwapBuffers, meaning\nyou need to call @ref glfwPollEvents or @ref glfwWaitEvents yourself.  Unlike\nbuffer swap, which acts on a single window, the event processing functions act\non all windows at once.\n\n@par Old basic main loop\n@code\nwhile (...)\n{\n    // Process input\n    // Render output\n    glfwSwapBuffers();\n}\n@endcode\n\n@par New basic main loop\n@code\nwhile (...)\n{\n    // Process input\n    // Render output\n    glfwSwapBuffers(window);\n    glfwPollEvents();\n}\n@endcode\n\n\n@subsection moving_context Explicit context management\n\nEach GLFW 3 window has its own OpenGL context and only you, the application\nprogrammer, can know which context should be current on which thread at any\ngiven time.  Therefore, GLFW 3 leaves that decision to you.\n\nThis means that you need to call @ref glfwMakeContextCurrent after creating\na window before you can call any OpenGL functions.\n\n\n@subsection moving_hidpi Separation of window and framebuffer sizes\n\nWindow positions and sizes now use screen coordinates, which may not be the same\nas pixels on machines with high-DPI monitors.  This is important as OpenGL uses\npixels, not screen coordinates.  For example, the rectangle specified with\n`glViewport` needs to use pixels.  Therefore, framebuffer size functions have\nbeen added.  You can retrieve the size of the framebuffer of a window with @ref\nglfwGetFramebufferSize function.  A framebuffer size callback has also been\nadded, which can be set with @ref glfwSetFramebufferSizeCallback.\n\n@par Old basic viewport setup\n@code\nglfwGetWindowSize(&width, &height);\nglViewport(0, 0, width, height);\n@endcode\n\n@par New basic viewport setup\n@code\nglfwGetFramebufferSize(window, &width, &height);\nglViewport(0, 0, width, height);\n@endcode\n\n\n@subsection moving_window_close Window closing changes\n\nThe `GLFW_OPENED` window parameter has been removed.  As long as the window has\nnot been destroyed, whether through @ref glfwDestroyWindow or @ref\nglfwTerminate, the window is \"open\".\n\nA user attempting to close a window is now just an event like any other.  Unlike\nGLFW 2, windows and contexts created with GLFW 3 will never be destroyed unless\nyou choose them to be.  Each window now has a close flag that is set to\n`GLFW_TRUE` when the user attempts to close that window.  By default, nothing else\nhappens and the window stays visible.  It is then up to you to either destroy\nthe window, take some other action or ignore the request.\n\nYou can query the close flag at any time with @ref glfwWindowShouldClose and set\nit at any time with @ref glfwSetWindowShouldClose.\n\n@par Old basic main loop\n@code\nwhile (glfwGetWindowParam(GLFW_OPENED))\n{\n    ...\n}\n@endcode\n\n@par New basic main loop\n@code\nwhile (!glfwWindowShouldClose(window))\n{\n    ...\n}\n@endcode\n\nThe close callback no longer returns a value.  Instead, it is called after the\nclose flag has been set so it can override its value, if it chooses to, before\nevent processing completes.  You may however not call @ref glfwDestroyWindow\nfrom the close callback (or any other window related callback).\n\n@par Old syntax\n@code\nint GLFWCALL window_close_callback(void);\n@endcode\n\n@par New syntax\n@code\nvoid window_close_callback(GLFWwindow* window);\n@endcode\n\n@note GLFW never clears the close flag to `GLFW_FALSE`, meaning you can use it\nfor other reasons to close the window as well, for example the user choosing\nQuit from an in-game menu.\n\n\n@subsection moving_hints Persistent window hints\n\nThe `glfwOpenWindowHint` function has been renamed to @ref glfwWindowHint.\n\nWindow hints are no longer reset to their default values on window creation, but\ninstead retain their values until modified by @ref glfwWindowHint or @ref\nglfwDefaultWindowHints, or until the library is terminated and re-initialized.\n\n\n@subsection moving_video_modes Video mode enumeration\n\nVideo mode enumeration is now per-monitor.  The @ref glfwGetVideoModes function\nnow returns all available modes for a specific monitor instead of requiring you\nto guess how large an array you need.  The `glfwGetDesktopMode` function, which\nhad poorly defined behavior, has been replaced by @ref glfwGetVideoMode, which\nreturns the current mode of a monitor.\n\n\n@subsection moving_char_up Removal of character actions\n\nThe action parameter of the [character callback](@ref GLFWcharfun) has been\nremoved.  This was an artefact of the origin of GLFW, i.e. being developed in\nEnglish by a Swede.  However, many keyboard layouts require more than one key to\nproduce characters with diacritical marks. Even the Swedish keyboard layout\nrequires this for uncommon cases like ü.\n\n@par Old syntax\n@code\nvoid GLFWCALL character_callback(int character, int action);\n@endcode\n\n@par New syntax\n@code\nvoid character_callback(GLFWwindow* window, int character);\n@endcode\n\n\n@subsection moving_cursorpos Cursor position changes\n\nThe `glfwGetMousePos` function has been renamed to @ref glfwGetCursorPos,\n`glfwSetMousePos` to @ref glfwSetCursorPos and `glfwSetMousePosCallback` to @ref\nglfwSetCursorPosCallback.\n\nThe cursor position is now `double` instead of `int`, both for the direct\nfunctions and for the callback.  Some platforms can provide sub-pixel cursor\nmovement and this data is now passed on to the application where available.  On\nplatforms where this is not provided, the decimal part is zero.\n\nGLFW 3 only allows you to position the cursor within a window using @ref\nglfwSetCursorPos (formerly `glfwSetMousePos`) when that window is active.\nUnless the window is active, the function fails silently.\n\n\n@subsection moving_wheel Wheel position replaced by scroll offsets\n\nThe `glfwGetMouseWheel` function has been removed.  Scrolling is the input of\noffsets and has no absolute position.  The mouse wheel callback has been\nreplaced by a [scroll callback](@ref GLFWscrollfun) that receives\ntwo-dimensional floating point scroll offsets.  This allows you to receive\nprecise scroll data from for example modern touchpads.\n\n@par Old syntax\n@code\nvoid GLFWCALL mouse_wheel_callback(int position);\n@endcode\n\n@par New syntax\n@code\nvoid scroll_callback(GLFWwindow* window, double xoffset, double yoffset);\n@endcode\n\n@par Removed functions\n`glfwGetMouseWheel`\n\n\n@subsection moving_repeat Key repeat action\n\nThe `GLFW_KEY_REPEAT` enable has been removed and key repeat is always enabled\nfor both keys and characters.  A new key action, `GLFW_REPEAT`, has been added\nto allow the [key callback](@ref GLFWkeyfun) to distinguish an initial key press\nfrom a repeat.  Note that @ref glfwGetKey still returns only `GLFW_PRESS` or\n`GLFW_RELEASE`.\n\n\n@subsection moving_keys Physical key input\n\nGLFW 3 key tokens map to physical keys, unlike in GLFW 2 where they mapped to\nthe values generated by the current keyboard layout.  The tokens are named\naccording to the values they would have using the standard US layout, but this\nis only a convenience, as most programmers are assumed to know that layout.\nThis means that (for example) `GLFW_KEY_LEFT_BRACKET` is always a single key and\nis the same key in the same place regardless of what keyboard layouts the users\nof your program has.\n\nThe key input facility was never meant for text input, although using it that\nway worked slightly better in GLFW 2.  If you were using it to input text, you\nshould be using the character callback instead, on both GLFW 2 and 3.  This will\ngive you the characters being input, as opposed to the keys being pressed.\n\nGLFW 3 has key tokens for all keys on a standard 105 key keyboard, so instead of\nhaving to remember whether to check for `'a'` or `'A'`, you now check for\n`GLFW_KEY_A`.\n\n\n@subsection moving_joystick Joystick function changes\n\nThe `glfwGetJoystickPos` function has been renamed to @ref glfwGetJoystickAxes.\n\nThe `glfwGetJoystickParam` function and the `GLFW_PRESENT`, `GLFW_AXES` and\n`GLFW_BUTTONS` tokens have been replaced by the @ref glfwJoystickPresent\nfunction as well as axis and button counts returned by the @ref\nglfwGetJoystickAxes and @ref glfwGetJoystickButtons functions.\n\n\n@subsection moving_mbcs Win32 MBCS support\n\nThe Win32 port of GLFW 3 will not compile in\n[MBCS mode](https://msdn.microsoft.com/en-us/library/5z097dxa.aspx).\nHowever, because the use of the Unicode version of the Win32 API doesn't affect\nthe process as a whole, but only those windows created using it, it's perfectly\npossible to call MBCS functions from other parts of the same application.\nTherefore, even if an application using GLFW has MBCS mode code, there's no need\nfor GLFW itself to support it.\n\n\n@subsection moving_windows Support for versions of Windows older than XP\n\nAll explicit support for version of Windows older than XP has been removed.\nThere is no code that actively prevents GLFW 3 from running on these earlier\nversions, but it uses Win32 functions that those versions lack.\n\nWindows XP was released in 2001, and by now (January 2015) it has not only\nreplaced almost all earlier versions of Windows, but is itself rapidly being\nreplaced by Windows 7 and 8.  The MSDN library doesn't even provide\ndocumentation for version older than Windows 2000, making it difficult to\nmaintain compatibility with these versions even if it was deemed worth the\neffort.\n\nThe Win32 API has also not stood still, and GLFW 3 uses many functions only\npresent on Windows XP or later.  Even supporting an OS as new as XP (new\nfrom the perspective of GLFW 2, which still supports Windows 95) requires\nruntime checking for a number of functions that are present only on modern\nversion of Windows.\n\n\n@subsection moving_syskeys Capture of system-wide hotkeys\n\nThe ability to disable and capture system-wide hotkeys like Alt+Tab has been\nremoved.  Modern applications, whether they're games, scientific visualisations\nor something else, are nowadays expected to be good desktop citizens and allow\nthese hotkeys to function even when running in full screen mode.\n\n\n@subsection moving_terminate Automatic termination\n\nGLFW 3 does not register @ref glfwTerminate with `atexit` at initialization,\nbecause `exit` calls registered functions from the calling thread and while it\nis permitted to call `exit` from any thread, @ref glfwTerminate must only be\ncalled from the main thread.\n\nTo release all resources allocated by GLFW, you should call @ref glfwTerminate\nyourself, from the main thread, before the program terminates.  Note that this\ndestroys all windows not already destroyed with @ref glfwDestroyWindow,\ninvalidating any window handles you may still have.\n\n\n@subsection moving_glu GLU header inclusion\n\nGLFW 3 does not by default include the GLU header and GLU itself has been\ndeprecated by [Khronos](https://en.wikipedia.org/wiki/Khronos_Group).  __New\nprojects should not use GLU__, but if you need it for legacy code that\nhas been moved to GLFW 3, you can request that the GLFW header includes it by\ndefining @ref GLFW_INCLUDE_GLU before the inclusion of the GLFW header.\n\n@par Old syntax\n@code\n#include <GL/glfw.h>\n@endcode\n\n@par New syntax\n@code\n#define GLFW_INCLUDE_GLU\n#include <GLFW/glfw3.h>\n@endcode\n\nThere are many libraries that offer replacements for the functionality offered\nby GLU.  For the matrix helper functions, see math libraries like\n[GLM](https://github.com/g-truc/glm) (for C++),\n[linmath.h](https://github.com/datenwolf/linmath.h) (for C) and others.  For the\ntessellation functions, see for example\n[libtess2](https://github.com/memononen/libtess2).\n\n\n@section moving_tables Name change tables\n\n\n@subsection moving_renamed_functions Renamed functions\n\n| GLFW 2                      | GLFW 3                        | Notes |\n| --------------------------- | ----------------------------- | ----- |\n| `glfwOpenWindow`            | @ref glfwCreateWindow         | All channel bit depths are now hints\n| `glfwCloseWindow`           | @ref glfwDestroyWindow        |       |\n| `glfwOpenWindowHint`        | @ref glfwWindowHint           | Now accepts all `GLFW_*_BITS` tokens |\n| `glfwEnable`                | @ref glfwSetInputMode         |       |\n| `glfwDisable`               | @ref glfwSetInputMode         |       |\n| `glfwGetMousePos`           | @ref glfwGetCursorPos         |       |\n| `glfwSetMousePos`           | @ref glfwSetCursorPos         |       |\n| `glfwSetMousePosCallback`   | @ref glfwSetCursorPosCallback |       |\n| `glfwSetMouseWheelCallback` | @ref glfwSetScrollCallback    | Accepts two-dimensional scroll offsets as doubles |\n| `glfwGetJoystickPos`        | @ref glfwGetJoystickAxes      |       |\n| `glfwGetWindowParam`        | @ref glfwGetWindowAttrib      |       |\n| `glfwGetGLVersion`          | @ref glfwGetWindowAttrib      | Use `GLFW_CONTEXT_VERSION_MAJOR`, `GLFW_CONTEXT_VERSION_MINOR` and `GLFW_CONTEXT_REVISION` |\n| `glfwGetDesktopMode`        | @ref glfwGetVideoMode         | Returns the current mode of a monitor |\n| `glfwGetJoystickParam`      | @ref glfwJoystickPresent      | The axis and button counts are provided by @ref glfwGetJoystickAxes and @ref glfwGetJoystickButtons |\n\n\n@subsection moving_renamed_types Renamed types\n\n| GLFW 2              | GLFW 3                | Notes |\n| ------------------- | --------------------- |       |\n| `GLFWmousewheelfun` | @ref GLFWscrollfun    |       |\n| `GLFWmouseposfun`   | @ref GLFWcursorposfun |       |\n\n\n@subsection moving_renamed_tokens Renamed tokens\n\n| GLFW 2                      | GLFW 3                       | Notes |\n| --------------------------- | ---------------------------- | ----- |\n| `GLFW_OPENGL_VERSION_MAJOR` | `GLFW_CONTEXT_VERSION_MAJOR` | Renamed as it applies to OpenGL ES as well |\n| `GLFW_OPENGL_VERSION_MINOR` | `GLFW_CONTEXT_VERSION_MINOR` | Renamed as it applies to OpenGL ES as well |\n| `GLFW_FSAA_SAMPLES`         | `GLFW_SAMPLES`               | Renamed to match the OpenGL API |\n| `GLFW_ACTIVE`               | `GLFW_FOCUSED`               | Renamed to match the window focus callback |\n| `GLFW_WINDOW_NO_RESIZE`     | `GLFW_RESIZABLE`             | The default has been inverted |\n| `GLFW_MOUSE_CURSOR`         | `GLFW_CURSOR`                | Used with @ref glfwSetInputMode |\n| `GLFW_KEY_ESC`              | `GLFW_KEY_ESCAPE`            |       |\n| `GLFW_KEY_DEL`              | `GLFW_KEY_DELETE`            |       |\n| `GLFW_KEY_PAGEUP`           | `GLFW_KEY_PAGE_UP`           |       |\n| `GLFW_KEY_PAGEDOWN`         | `GLFW_KEY_PAGE_DOWN`         |       |\n| `GLFW_KEY_KP_NUM_LOCK`      | `GLFW_KEY_NUM_LOCK`          |       |\n| `GLFW_KEY_LCTRL`            | `GLFW_KEY_LEFT_CONTROL`      |       |\n| `GLFW_KEY_LSHIFT`           | `GLFW_KEY_LEFT_SHIFT`        |       |\n| `GLFW_KEY_LALT`             | `GLFW_KEY_LEFT_ALT`          |       |\n| `GLFW_KEY_LSUPER`           | `GLFW_KEY_LEFT_SUPER`        |       |\n| `GLFW_KEY_RCTRL`            | `GLFW_KEY_RIGHT_CONTROL`     |       |\n| `GLFW_KEY_RSHIFT`           | `GLFW_KEY_RIGHT_SHIFT`       |       |\n| `GLFW_KEY_RALT`             | `GLFW_KEY_RIGHT_ALT`         |       |\n| `GLFW_KEY_RSUPER`           | `GLFW_KEY_RIGHT_SUPER`       |       |\n\n*/\n"
  },
  {
    "path": "thirdparty/glfw/docs/news.dox",
    "content": "/*!\n\n@page news Release notes\n\n@tableofcontents\n\n\n@section news_33 Release notes for version 3.3\n\nThese are the release notes for version 3.3.  For a more detailed view including\nall fixed bugs see the [version history](https://www.glfw.org/changelog.html).\n\nPlease review the caveats, deprecations and removals if your project was written\nagainst an earlier version of GLFW 3.\n\n\n@subsection features_33 New features in version 3.3\n\n@subsubsection gamepad_33 Gamepad input via SDL_GameControllerDB\n\nGLFW can now remap game controllers to a standard Xbox-like layout using\na built-in copy of SDL_GameControllerDB.  Call @ref glfwJoystickIsGamepad to\ncheck if a joystick has a mapping, @ref glfwGetGamepadState to retrieve its\ninput state, @ref glfwUpdateGamepadMappings to add newer mappings and @ref\nglfwGetGamepadName and @ref glfwGetJoystickGUID for mapping related information.\n\nFor more information see @ref gamepad.\n\n\n@subsubsection moltenvk_33 Support for Vulkan on macOS via MoltenVK\n\nGLFW now supports [MoltenVK](https://moltengl.com/moltenvk/), a Vulkan\nimplementation on top of the Metal API, and its `VK_MVK_macos_surface` window\nsurface creation extension.  MoltenVK is included in the [macOS Vulkan\nSDK](https://vulkan.lunarg.com/).\n\nFor more information see @ref vulkan_guide.\n\n\n@subsubsection content_scale_33 Content scale queries for DPI-aware rendering\n\nGLFW now provides content scales for windows and monitors, i.e. the ratio\nbetween their current DPI and the platform's default DPI, with @ref\nglfwGetWindowContentScale and @ref glfwGetMonitorContentScale.\n\nChanges of the content scale of a window can be received with the window content\nscale callback, set with @ref glfwSetWindowContentScaleCallback.\n\nThe @ref GLFW_SCALE_TO_MONITOR window hint enables automatic resizing of a\nwindow by the content scale of the monitor it is placed, on platforms like\nWindows where this is necessary.  This takes effect both on creation and when\nthe window is moved between monitors.  It is related to but different from\n[GLFW_COCOA_RETINA_FRAMEBUFFER](@ref GLFW_COCOA_RETINA_FRAMEBUFFER_hint).\n\nFor more information see @ref window_scale.\n\n\n@subsubsection setwindowattrib_33 Support for updating window attributes\n\nGLFW now supports changing the [GLFW_DECORATED](@ref GLFW_DECORATED_attrib),\n[GLFW_RESIZABLE](@ref GLFW_RESIZABLE_attrib),\n[GLFW_FLOATING](@ref GLFW_FLOATING_attrib),\n[GLFW_AUTO_ICONIFY](@ref GLFW_AUTO_ICONIFY_attrib) and\n[GLFW_FOCUS_ON_SHOW](@ref GLFW_FOCUS_ON_SHOW_attrib) attributes for existing\nwindows with @ref glfwSetWindowAttrib.\n\nFor more information see @ref window_attribs.\n\n\n@subsubsection raw_motion_33 Support for raw mouse motion\n\nGLFW now supports raw (unscaled and unaccelerated) mouse motion in disabled\ncursor mode with the [GLFW_RAW_MOUSE_MOTION](@ref GLFW_RAW_MOUSE_MOTION) input\nmode.  Raw mouse motion input is not yet implemented on macOS.  Call @ref\nglfwRawMouseMotionSupported to check if GLFW can provide raw mouse motion on the\ncurrent system.\n\nFor more information see @ref raw_mouse_motion.\n\n\n@subsubsection joysticks_33 Joystick hats\n\nGLFW can now return the state of hats (i.e. POVs or D-pads) of a joystick with\n@ref glfwGetJoystickHats.  For compatibility, hats are also exposed as buttons.\nThis can be disabled with the @ref GLFW_JOYSTICK_HAT_BUTTONS initialization\nhint.\n\nFor more information see @ref joystick_hat.\n\n\n@subsubsection geterror_33 Error query\n\nGLFW now supports querying the last error code for the calling thread and its\nhuman-readable description with @ref glfwGetError.  This can be used instead of\nor together with the error callback.\n\nFor more information see @ref error_handling.\n\n\n@subsubsection init_hints_33 Support for initialization hints\n\nGLFW now supports setting library initialization hints with @ref glfwInitHint.\nThese must be set before initialization to take effect.  Some of these hints are\nplatform specific but are safe to set on any platform.\n\nFor more information see @ref init_hints.\n\n\n@subsubsection attention_33 User attention request\n\nGLFW now supports requesting user attention with @ref\nglfwRequestWindowAttention.  Where possible this calls attention to the\nspecified window.  On platforms like macOS it calls attention to the whole\napplication.\n\nFor more information see @ref window_attention.\n\n\n@subsubsection maximize_33 Window maximization callback\n\nGLFW now supports notifying the application that the window has been maximized\n@ref glfwSetWindowMaximizeCallback.  This is called both when the window was\nmaximized by the user and when it was done with @ref glfwMaximizeWindow.\n\nFor more information see @ref window_maximize.\n\n\n@subsubsection workarea_33 Query for the monitor work area\n\nGLFW now supports querying the work area of a monitor, i.e. the area not\noccupied by task bars or global menu bars, with @ref glfwGetMonitorWorkarea.  On\nplatforms that lack this concept, the whole area of the monitor is returned.\n\nFor more information see @ref monitor_workarea.\n\n\n@subsubsection transparency_33 Transparent windows and framebuffers\n\nGLFW now supports the creation of windows with transparent framebuffers on\nsystems with desktop compositing enabled with the @ref\nGLFW_TRANSPARENT_FRAMEBUFFER window hint and attribute.  This hint must be set\nbefore window creation and leaves any window decorations opaque.\n\nGLFW now also supports whole window transparency with @ref glfwGetWindowOpacity\nand @ref glfwSetWindowOpacity.  This value controls the opacity of the whole\nwindow including decorations and unlike framebuffer transparency can be changed\nat any time after window creation.\n\nFor more information see @ref window_transparency.\n\n\n@subsubsection key_scancode_33 Query for the scancode of a key\n\nGLFW now supports querying the platform dependent scancode of any physical key\nwith @ref glfwGetKeyScancode.\n\nFor more information see @ref input_key.\n\n\n@subsubsection center_cursor_33 Cursor centering window hint\n\nGLFW now supports controlling whether the cursor is centered over newly created\nfull screen windows with the [GLFW_CENTER_CURSOR](@ref GLFW_CENTER_CURSOR_hint)\nwindow hint.  It is enabled by default.\n\n\n@subsubsection cursor_hover_33 Mouse cursor hover window attribute\n\nGLFW now supports polling whether the cursor is hovering over the window content\narea with the [GLFW_HOVERED](@ref GLFW_HOVERED_attrib) window attribute.  This\nattribute corresponds to the [cursor enter/leave](@ref cursor_enter) event.\n\n\n@subsubsection focusonshow_33 Window hint and attribute for input focus on show\n\nGLFW now has the [GLFW_FOCUS_ON_SHOW](@ref GLFW_DECORATED_hint) window hint and\nattribute for controlling whether a window gets input focus when shown.  It is\nenabled by default.  It applies both when creating an visible window with @ref\nglfwCreateWindow and when showing it with @ref glfwShowWindow.\n\nThis is a workaround for GLFW 3.0 lacking @ref glfwFocusWindow and will be\ncorrected in the next major version.\n\nFor more information see @ref window_hide.\n\n\n@subsubsection device_userptr_33 Monitor and joystick user pointers\n\nGLFW now supports setting and querying user pointers for connected monitors and\njoysticks with @ref glfwSetMonitorUserPointer, @ref glfwGetMonitorUserPointer,\n@ref glfwSetJoystickUserPointer and @ref glfwGetJoystickUserPointer.\n\nFor more information see @ref monitor_userptr and @ref joystick_userptr.\n\n\n@subsubsection macos_nib_33 macOS menu bar from nib file\n\nGLFW will now load a `MainMenu.nib` file if found in the `Contents/Resources`\ndirectory of the application bundle, as a way to replace the GLFW menu bar\nwithout recompiling GLFW.  This behavior can be disabled with the\n[GLFW_COCOA_MENUBAR](@ref GLFW_COCOA_MENUBAR_hint) initialization hint.\n\n\n@subsubsection glext_33 Support for more context creation extensions\n\nThe context hint @ref GLFW_SRGB_CAPABLE now supports OpenGL ES via\n`WGL_EXT_colorspace`, the context hint @ref GLFW_CONTEXT_NO_ERROR now supports\n`WGL_ARB_create_context_no_error` and `GLX_ARB_create_context_no_error`, the\ncontext hint @ref GLFW_CONTEXT_RELEASE_BEHAVIOR now supports\n`EGL_KHR_context_flush_control` and @ref glfwGetProcAddress now supports\n`EGL_KHR_get_all_proc_addresses`.\n\n\n@subsubsection osmesa_33 OSMesa off-screen context creation support\n\nGLFW now supports creating off-screen OpenGL contexts using\n[OSMesa](https://www.mesa3d.org/osmesa.html) by setting\n[GLFW_CONTEXT_CREATION_API](@ref GLFW_CONTEXT_CREATION_API_hint) to\n`GLFW_OSMESA_CONTEXT_API`.  Native access function have been added to retrieve\nthe OSMesa color and depth buffers.\n\nThere is also a new null backend that uses OSMesa as its native context\ncreation API, intended for automated testing.  This backend does not provide\ninput.\n\n\n@subsection caveats_33 Caveats for version 3.3\n\n@subsubsection joystick_layout_33 Layout of joysticks have changed\n\nThe way joystick elements are arranged have changed to match SDL2 in order to\nsupport SDL_GameControllerDB mappings.  The layout of joysticks may\nchange again if required for compatibility with SDL2.  If you need a known and\nstable layout for game controllers, see if you can switch to @ref gamepad.\n\nExisting code that depends on a specific joystick layout will likely have to be\nupdated.\n\n\n@subsubsection wait_events_33 No window required to wait for events\n\nThe @ref glfwWaitEvents and @ref glfwWaitEventsTimeout functions no longer need\na window to be created to wait for events.  Before version 3.3 these functions\nwould return immediately if there were no user-created windows.  On platforms\nwhere only windows can receive events, an internal helper window is used.\n\nExisting code that depends on the earlier behavior will likely have to be\nupdated.\n\n\n@subsubsection gamma_ramp_size_33 Gamma ramp size of 256 may be rejected\n\nThe documentation for versions before 3.3 stated that a gamma ramp size of 256\nwould always be accepted.  This was never the case on X11 and could lead to\nartifacts on macOS.  The @ref glfwSetGamma function has been updated to always\ngenerate a ramp of the correct size.\n\nExisting code that hardcodes a size of 256 should be updated to use the size of\nthe current ramp of a monitor when setting a new ramp for that monitor.\n\n\n@subsubsection xinput_deadzone_33 Windows XInput deadzone removed\n\nGLFW no longer applies any deadzone to the input state received from the XInput\nAPI.  This was never done for any other platform joystick API so this change\nmakes the behavior more consistent but you will need to apply your own deadzone\nif desired.\n\n\n@subsubsection x11_clipboard_33 X11 clipboard transfer limits\n\nGLFW now supports reading clipboard text via the `INCR` method, which removes\nthe limit on how much text can be read with @ref glfwGetClipboardString.\nHowever, writing via this method is not yet supported, so you may not be able to\nwrite a very large string with @ref glfwSetClipboardString even if you read it\nfrom the clipboard earlier.\n\nThe exact size limit for writing to the clipboard is negotiated with each\nreceiving application but is at least several tens of kilobytes.  Note that only\nthe read limit has changed.  Any string that could be written before still can\nbe.\n\n\n@subsubsection x11_linking_33 X11 extension libraries are loaded dynamically\n\nGLFW now loads all X11 extension libraries at initialization.  The only X11\nlibrary you need to link against is `libX11`.  The header files for the\nextension libraries are still required for compilation.\n\nExisting projects and makefiles that link GLFW directly against the extension\nlibraries should still build correctly but will add these libraries as load-time\ndependencies.\n\n\n@subsubsection cmake_version_33 CMake 3.0 or later is required\n\nThe minimum CMake version has been raised from 2.8.12 to 3.0.  This is only\na requirement of the GLFW CMake files.  The GLFW source files do not depend on\nCMake.\n\n\n@subsection deprecations_33 Deprecations in version 3.3\n\n@subsubsection charmods_callback_33 Character with modifiers callback\n\nThe character with modifiers callback set with @ref glfwSetCharModsCallback has\nbeen deprecated and should if possible not be used.\n\nExisting code should still work but further bug fixes will likely not be made.\nThe callback will be removed in the next major version.\n\n\n@subsubsection clipboard_window_33 Window parameter to clipboard functions\n\nThe window parameter of the clipboard functions @ref glfwGetClipboardString and\n@ref glfwSetClipboardString has been deprecated and is no longer used on any\nplatform.  On platforms where the clipboard must be owned by a specific window,\nan internal helper window is used.\n\nExisting code should still work unless it depends on a specific window owning\nthe clipboard.  New code may pass `NULL` as the window argument.  The parameter\nwill be removed in a future release.\n\n\n@subsection removals_33 Removals in 3.3\n\n@subsubsection macos_options_33 macOS specific CMake options and macros\n\nThe `GLFW_USE_RETINA`, `GLFW_USE_CHDIR` and `GLFW_USE_MENUBAR` CMake options and\nthe `_GLFW_USE_RETINA`, `_GLFW_USE_CHDIR` and `_GLFW_USE_MENUBAR` compile-time\nmacros have been removed.\n\nThese options and macros are replaced by the window hint\n[GLFW_COCOA_RETINA_FRAMEBUFFER](@ref GLFW_COCOA_RETINA_FRAMEBUFFER_hint)\nand the init hints\n[GLFW_COCOA_CHDIR_RESOURCES](@ref GLFW_COCOA_CHDIR_RESOURCES_hint) and\n[GLFW_COCOA_MENUBAR](@ref GLFW_COCOA_MENUBAR_hint).\n\nExisting projects and makefiles that set these options or define these macros\nduring compilation of GLFW will still build but it will have no effect and the\ndefault behaviors will be used.\n\n\n@subsubsection vulkan_sdk_33 LunarG Vulkan SDK dependency\n\nThe GLFW test programs that previously depended on the LunarG Vulkan SDK now\ninstead uses a Vulkan loader generated by\n[glad2](https://github.com/Dav1dde/glad).  This means the GLFW CMake files no\nlonger look for the Vulkan SDK.\n\nExisting CMake projects that depended on the Vulkan SDK cache variables from\nGLFW will need to call `find_package(Vulkan)` themselves.  CMake 3.7 and later\nalready comes with a\n[Vulkan find module](https://cmake.org/cmake/help/latest/module/FindVulkan.html)\nsimilar to the one GLFW previously included.\n\n\n@subsubsection lib_suffix_33 CMake option LIB_SUFFIX\n\nThe `LIB_SUFFIX` CMake option has been removed.  GLFW now uses the\nGNUInstallDirs CMake package to handle platform specific details like the\nlibrary directory suffix and the `LIB_SUFFIX` CMake option has been removed.\n\nExisting projects and makefiles that set the `LIB_SUFFIX` option will use the\nsuffix chosen by the GNUInstallDirs package and the option will be ignored.\n\n\n@subsubsection mir_removed_33 Mir support\n\nThe experimental Mir support has been completely removed as the Mir project has\nimplemented support for the Wayland protocol and is recommending that\napplications use that instead.\n\nExisting projects and makefiles that select Mir when compiling GLFW will fail.\nUse Wayland or X11 instead.\n\n\n@subsection symbols_33 New symbols in version 3.3\n\n@subsubsection functions_33 New functions in version 3.3\n\n - @ref glfwInitHint\n - @ref glfwGetError\n - @ref glfwGetMonitorWorkarea\n - @ref glfwGetMonitorContentScale\n - @ref glfwGetMonitorUserPointer\n - @ref glfwSetMonitorUserPointer\n - @ref glfwWindowHintString\n - @ref glfwGetWindowContentScale\n - @ref glfwGetWindowOpacity\n - @ref glfwSetWindowOpacity\n - @ref glfwRequestWindowAttention\n - @ref glfwSetWindowAttrib\n - @ref glfwSetWindowMaximizeCallback\n - @ref glfwSetWindowContentScaleCallback\n - @ref glfwRawMouseMotionSupported\n - @ref glfwGetKeyScancode\n - @ref glfwGetJoystickHats\n - @ref glfwGetJoystickGUID\n - @ref glfwGetJoystickUserPointer\n - @ref glfwSetJoystickUserPointer\n - @ref glfwJoystickIsGamepad\n - @ref glfwUpdateGamepadMappings\n - @ref glfwGetGamepadName\n - @ref glfwGetGamepadState\n\n\n@subsubsection types_33 New types in version 3.3\n\n - @ref GLFWwindowmaximizefun\n - @ref GLFWwindowcontentscalefun\n - @ref GLFWgamepadstate\n\n\n@subsubsection constants_33 New constants in version 3.3\n\n - @ref GLFW_NO_ERROR\n - @ref GLFW_JOYSTICK_HAT_BUTTONS\n - @ref GLFW_COCOA_CHDIR_RESOURCES\n - @ref GLFW_COCOA_MENUBAR\n - @ref GLFW_CENTER_CURSOR\n - @ref GLFW_TRANSPARENT_FRAMEBUFFER\n - @ref GLFW_HOVERED\n - @ref GLFW_FOCUS_ON_SHOW\n - @ref GLFW_SCALE_TO_MONITOR\n - @ref GLFW_COCOA_RETINA_FRAMEBUFFER\n - @ref GLFW_COCOA_FRAME_NAME\n - @ref GLFW_COCOA_GRAPHICS_SWITCHING\n - @ref GLFW_X11_CLASS_NAME\n - @ref GLFW_X11_INSTANCE_NAME\n - @ref GLFW_OSMESA_CONTEXT_API\n - @ref GLFW_HAT_CENTERED\n - @ref GLFW_HAT_UP\n - @ref GLFW_HAT_RIGHT\n - @ref GLFW_HAT_DOWN\n - @ref GLFW_HAT_LEFT\n - @ref GLFW_HAT_RIGHT_UP\n - @ref GLFW_HAT_RIGHT_DOWN\n - @ref GLFW_HAT_LEFT_UP\n - @ref GLFW_HAT_LEFT_DOWN\n - @ref GLFW_MOD_CAPS_LOCK\n - @ref GLFW_MOD_NUM_LOCK\n - @ref GLFW_LOCK_KEY_MODS\n - @ref GLFW_RAW_MOUSE_MOTION\n - @ref GLFW_GAMEPAD_BUTTON_A\n - @ref GLFW_GAMEPAD_BUTTON_B\n - @ref GLFW_GAMEPAD_BUTTON_X\n - @ref GLFW_GAMEPAD_BUTTON_Y\n - @ref GLFW_GAMEPAD_BUTTON_LEFT_BUMPER\n - @ref GLFW_GAMEPAD_BUTTON_RIGHT_BUMPER\n - @ref GLFW_GAMEPAD_BUTTON_BACK\n - @ref GLFW_GAMEPAD_BUTTON_START\n - @ref GLFW_GAMEPAD_BUTTON_GUIDE\n - @ref GLFW_GAMEPAD_BUTTON_LEFT_THUMB\n - @ref GLFW_GAMEPAD_BUTTON_RIGHT_THUMB\n - @ref GLFW_GAMEPAD_BUTTON_DPAD_UP\n - @ref GLFW_GAMEPAD_BUTTON_DPAD_RIGHT\n - @ref GLFW_GAMEPAD_BUTTON_DPAD_DOWN\n - @ref GLFW_GAMEPAD_BUTTON_DPAD_LEFT\n - @ref GLFW_GAMEPAD_BUTTON_LAST\n - @ref GLFW_GAMEPAD_BUTTON_CROSS\n - @ref GLFW_GAMEPAD_BUTTON_CIRCLE\n - @ref GLFW_GAMEPAD_BUTTON_SQUARE\n - @ref GLFW_GAMEPAD_BUTTON_TRIANGLE\n - @ref GLFW_GAMEPAD_AXIS_LEFT_X\n - @ref GLFW_GAMEPAD_AXIS_LEFT_Y\n - @ref GLFW_GAMEPAD_AXIS_RIGHT_X\n - @ref GLFW_GAMEPAD_AXIS_RIGHT_Y\n - @ref GLFW_GAMEPAD_AXIS_LEFT_TRIGGER\n - @ref GLFW_GAMEPAD_AXIS_RIGHT_TRIGGER\n - @ref GLFW_GAMEPAD_AXIS_LAST\n\n\n@section news_32 Release notes for 3.2\n\nThese are the release notes for version 3.2.  For a more detailed view including\nall fixed bugs see the [version history](https://www.glfw.org/changelog.html).\n\n\n@subsection features_32 New features in version 3.2\n\n@subsubsection news_32_vulkan Support for Vulkan\n\nGLFW now supports basic integration with Vulkan with @ref glfwVulkanSupported,\n@ref glfwGetRequiredInstanceExtensions, @ref glfwGetInstanceProcAddress, @ref\nglfwGetPhysicalDevicePresentationSupport and @ref glfwCreateWindowSurface.\nVulkan header inclusion can be selected with\n@ref GLFW_INCLUDE_VULKAN.\n\n\n@subsubsection news_32_setwindowmonitor Window mode switching\n\nGLFW now supports switching between windowed and full screen modes and updating\nthe monitor and desired resolution and refresh rate of full screen windows with\n@ref glfwSetWindowMonitor.\n\n\n@subsubsection news_32_maximize Window maxmimization support\n\nGLFW now supports window maximization with @ref glfwMaximizeWindow and the\n@ref GLFW_MAXIMIZED window hint and attribute.\n\n\n@subsubsection news_32_focus Window input focus control\n\nGLFW now supports giving windows input focus with @ref glfwFocusWindow.\n\n\n@subsubsection news_32_sizelimits Window size limit support\n\nGLFW now supports setting both absolute and relative window size limits with\n@ref glfwSetWindowSizeLimits and @ref glfwSetWindowAspectRatio.\n\n\n@subsubsection news_32_keyname Localized key names\n\nGLFW now supports querying the localized name of printable keys with @ref\nglfwGetKeyName, either by key token or by scancode.\n\n\n@subsubsection news_32_waittimeout Wait for events with timeout\n\nGLFW now supports waiting for events for a set amount of time with @ref\nglfwWaitEventsTimeout.\n\n\n@subsubsection news_32_icon Window icon support\n\nGLFW now supports setting the icon of windows with @ref glfwSetWindowIcon.\n\n\n@subsubsection news_32_timer Raw timer access\n\nGLFW now supports raw timer values with @ref glfwGetTimerValue and @ref\nglfwGetTimerFrequency.\n\n\n@subsubsection news_32_joystick Joystick connection callback\n\nGLFW now supports notifying when a joystick has been connected or disconnected\nwith @ref glfwSetJoystickCallback.\n\n\n@subsubsection news_32_noapi Context-less windows\n\nGLFW now supports creating windows without a OpenGL or OpenGL ES context by\nsetting the [GLFW_CLIENT_API](@ref GLFW_CLIENT_API_hint) hint to `GLFW_NO_API`.\n\n\n@subsubsection news_32_contextapi Run-time context creation API selection\n\nGLFW now supports selecting and querying the context creation API at run-time\nwith the @ref GLFW_CONTEXT_CREATION_API hint and attribute.\n\n\n@subsubsection news_32_noerror Error-free context creation\n\nGLFW now supports creating and querying OpenGL and OpenGL ES contexts that do\nnot emit errors with the @ref GLFW_CONTEXT_NO_ERROR hint, provided the machine\nsupports the `GL_KHR_no_error` extension.\n\n\n@subsubsection news_32_cmake CMake config-file package support\n\nGLFW now supports being used as a\n[config-file package](@ref build_link_cmake_package) from other projects for\neasy linking with the library and its dependencies.\n\n\n@section news_31 Release notes for 3.1\n\nThese are the release notes for version 3.1.  For a more detailed view including\nall fixed bugs see the [version history](https://www.glfw.org/changelog.html).\n\n\n@subsection features_31 New features in version 3.1\n\n@subsubsection news_31_cursor Custom mouse cursor images\n\nGLFW now supports creating and setting both custom cursor images and standard\ncursor shapes.  They are created with @ref glfwCreateCursor or @ref\nglfwCreateStandardCursor, set with @ref glfwSetCursor and destroyed with @ref\nglfwDestroyCursor.\n\n@see @ref cursor_object\n\n\n@subsubsection news_31_drop Path drop event\n\nGLFW now provides a callback for receiving the paths of files and directories\ndropped onto GLFW windows.  The callback is set with @ref glfwSetDropCallback.\n\n@see @ref path_drop\n\n\n@subsubsection news_31_emptyevent Main thread wake-up\n\nGLFW now provides the @ref glfwPostEmptyEvent function for posting an empty\nevent from another thread to the main thread event queue, causing @ref\nglfwWaitEvents to return.\n\n@see @ref events\n\n\n@subsubsection news_31_framesize Window frame size query\n\nGLFW now supports querying the size, on each side, of the frame around the\ncontent area of a window, with @ref glfwGetWindowFrameSize.\n\n@see [Window size](@ref window_size)\n\n\n@subsubsection news_31_autoiconify Simultaneous multi-monitor rendering\n\nGLFW now supports disabling auto-iconification of full screen windows with\nthe [GLFW_AUTO_ICONIFY](@ref GLFW_AUTO_ICONIFY_hint) window hint.  This is\nintended for people building multi-monitor installations, where you need windows\nto stay in full screen despite losing input focus.\n\n\n@subsubsection news_31_floating Floating windows\n\nGLFW now supports floating windows, also called topmost or always on top, for\neasier debugging with the @ref GLFW_FLOATING window hint and attribute.\n\n\n@subsubsection news_31_focused Initially unfocused windows\n\nGLFW now supports preventing a windowed mode window from gaining input focus on\ncreation, with the [GLFW_FOCUSED](@ref GLFW_FOCUSED_hint) window hint.\n\n\n@subsubsection news_31_direct Direct access for window attributes and cursor position\n\nGLFW now queries the window input focus, visibility and iconification attributes\nand the cursor position directly instead of returning cached data.\n\n\n@subsubsection news_31_charmods Character with modifiers callback\n\nGLFW now provides a callback for character events with modifier key bits.  The\ncallback is set with @ref glfwSetCharModsCallback.  Unlike the regular character\ncallback, this will report character events that will not result in a character\nbeing input, for example if the Control key is held down.\n\n@see @ref input_char\n\n\n@subsubsection news_31_single Single buffered framebuffers\n\nGLFW now supports the creation of single buffered windows, with the @ref\nGLFW_DOUBLEBUFFER hint.\n\n\n@subsubsection news_31_glext Macro for including extension header\n\nGLFW now includes the extension header appropriate for the chosen OpenGL or\nOpenGL ES header when @ref GLFW_INCLUDE_GLEXT is defined.  GLFW does not provide\nthese headers.  They must be provided by your development environment or your\nOpenGL or OpenGL ES SDK.\n\n\n@subsubsection news_31_release Context release behaviors\n\nGLFW now supports controlling and querying whether the pipeline is flushed when\na context is made non-current, with the @ref GLFW_CONTEXT_RELEASE_BEHAVIOR hint\nand attribute, provided the machine supports the `GL_KHR_context_flush_control`\nextension.\n\n\n@subsubsection news_31_wayland (Experimental) Wayland support\n\nGLFW now has an _experimental_ Wayland display protocol backend that can be\nselected on Linux with a CMake option.\n\n\n@subsubsection news_31_mir (Experimental) Mir support\n\nGLFW now has an _experimental_ Mir display server backend that can be selected\non Linux with a CMake option.\n\n\n@section news_30 Release notes for 3.0\n\nThese are the release notes for version 3.0.  For a more detailed view including\nall fixed bugs see the [version history](https://www.glfw.org/changelog.html).\n\n\n@subsection features_30 New features in version 3.0\n\n@subsubsection news_30_cmake CMake build system\n\nGLFW now uses the CMake build system instead of the various makefiles and\nproject files used by earlier versions.  CMake is available for all platforms\nsupported by GLFW, is present in most package systems and can generate\nmakefiles and/or project files for most popular development environments.\n\nFor more information on how to use CMake, see the\n[CMake manual](https://cmake.org/cmake/help/documentation.html).\n\n\n@subsubsection news_30_multiwnd Multi-window support\n\nGLFW now supports the creation of multiple windows, each with their own OpenGL\nor OpenGL ES context, and all window functions now take a window handle.  Event\ncallbacks are now per-window and are provided with the handle of the window that\nreceived the event.  The @ref glfwMakeContextCurrent function has been added to\nselect which context is current on a given thread.\n\n\n@subsubsection news_30_multimon Multi-monitor support\n\nGLFW now explicitly supports multiple monitors.  They can be enumerated with\n@ref glfwGetMonitors, queried with @ref glfwGetVideoModes, @ref\nglfwGetMonitorPos, @ref glfwGetMonitorName and @ref glfwGetMonitorPhysicalSize,\nand specified at window creation to make the newly created window full screen on\nthat specific monitor.\n\n\n@subsubsection news_30_unicode Unicode support\n\nAll string arguments to GLFW functions and all strings returned by GLFW now use\nthe UTF-8 encoding.  This includes the window title, error string, clipboard\ntext, monitor and joystick names as well as the extension function arguments (as\nASCII is a subset of UTF-8).\n\n\n@subsubsection news_30_clipboard Clipboard text I/O\n\nGLFW now supports reading and writing plain text to and from the system\nclipboard, with the @ref glfwGetClipboardString and @ref glfwSetClipboardString\nfunctions.\n\n\n@subsubsection news_30_gamma Gamma ramp support\n\nGLFW now supports setting and reading back the gamma ramp of monitors, with the\n@ref glfwGetGammaRamp and @ref glfwSetGammaRamp functions.  There is also @ref\nglfwSetGamma, which generates a ramp from a gamma value and then sets it.\n\n\n@subsubsection news_30_gles OpenGL ES support\n\nGLFW now supports the creation of OpenGL ES contexts, by setting the\n[GLFW_CLIENT_API](@ref GLFW_CLIENT_API_hint) hint to `GLFW_OPENGL_ES_API`, where\ncreation of such contexts are supported.  Note that GLFW _does not implement_\nOpenGL ES, so your driver must provide support in a way usable by GLFW.  Modern\nNvidia and Intel drivers support creation of OpenGL ES context using the GLX and\nWGL APIs, while AMD provides an EGL implementation instead.\n\n\n@subsubsection news_30_egl (Experimental) EGL support\n\nGLFW now has an experimental EGL context creation back end that can be selected\nthrough CMake options.\n\n\n@subsubsection news_30_hidpi High-DPI support\n\nGLFW now supports high-DPI monitors on both Windows and macOS, giving windows\nfull resolution framebuffers where other UI elements are scaled up.  To achieve\nthis, @ref glfwGetFramebufferSize and @ref glfwSetFramebufferSizeCallback have\nbeen added.  These work with pixels, while the rest of the GLFW API works with\nscreen coordinates.  This is important as OpenGL uses pixels, not screen\ncoordinates.\n\n\n@subsubsection news_30_error Error callback\n\nGLFW now has an error callback, which can provide your application with much\nmore detailed diagnostics than was previously possible.  The callback is passed\nan error code and a description string.\n\n\n@subsubsection news_30_wndptr Per-window user pointer\n\nEach window now has a user-defined pointer, retrieved with @ref\nglfwGetWindowUserPointer and set with @ref glfwSetWindowUserPointer, to make it\neasier to integrate GLFW into C++ code.\n\n\n@subsubsection news_30_iconifyfun Window iconification callback\n\nEach window now has a callback for iconification and restoration events,\nwhich is set with @ref glfwSetWindowIconifyCallback.\n\n\n@subsubsection news_30_wndposfun Window position callback\n\nEach window now has a callback for position events, which is set with @ref\nglfwSetWindowPosCallback.\n\n\n@subsubsection news_30_wndpos Window position query\n\nThe position of a window can now be retrieved using @ref glfwGetWindowPos.\n\n\n@subsubsection news_30_focusfun Window focus callback\n\nEach windows now has a callback for focus events, which is set with @ref\nglfwSetWindowFocusCallback.\n\n\n@subsubsection news_30_enterleave Cursor enter/leave callback\n\nEach window now has a callback for when the mouse cursor enters or leaves its\ncontent area, which is set with @ref glfwSetCursorEnterCallback.\n\n\n@subsubsection news_30_wndtitle Initial window title\n\nThe title of a window is now specified at creation time, as one of the arguments\nto @ref glfwCreateWindow.\n\n\n@subsubsection news_30_hidden Hidden windows\n\nWindows can now be hidden with @ref glfwHideWindow, shown using @ref\nglfwShowWindow and created initially hidden with the @ref GLFW_VISIBLE window\nhint and attribute.  This allows for off-screen rendering in a way compatible\nwith most drivers, as well as moving a window to a specific position before\nshowing it.\n\n\n@subsubsection news_30_undecorated Undecorated windows\n\nWindowed mode windows can now be created without decorations, e.g. things like\na frame, a title bar, with the @ref GLFW_DECORATED window hint and attribute.\nThis allows for the creation of things like splash screens.\n\n\n@subsubsection news_30_keymods Modifier key bit masks\n\n[Modifier key bit mask](@ref mods) parameters have been added to the\n[mouse button](@ref GLFWmousebuttonfun) and [key](@ref GLFWkeyfun) callbacks.\n\n\n@subsubsection news_30_scancode Platform-specific scancodes\n\nA scancode parameter has been added to the [key callback](@ref GLFWkeyfun). Keys\nthat don't have a [key token](@ref keys) still get passed on with the key\nparameter set to `GLFW_KEY_UNKNOWN`.  These scancodes will vary between machines\nand are intended to be used for key bindings.\n\n\n@subsubsection news_30_jsname Joystick names\n\nThe name of a joystick can now be retrieved using @ref glfwGetJoystickName.\n\n\n@subsubsection news_30_doxygen Doxygen documentation\n\nYou are reading it.\n\n*/\n"
  },
  {
    "path": "thirdparty/glfw/docs/quick.dox",
    "content": "/*!\n\n@page quick_guide Getting started\n\n@tableofcontents\n\nThis guide takes you through writing a simple application using GLFW 3.  The\napplication will create a window and OpenGL context, render a rotating triangle\nand exit when the user closes the window or presses _Escape_.  This guide will\nintroduce a few of the most commonly used functions, but there are many more.\n\nThis guide assumes no experience with earlier versions of GLFW.  If you\nhave used GLFW 2 in the past, read @ref moving_guide, as some functions\nbehave differently in GLFW 3.\n\n\n@section quick_steps Step by step\n\n@subsection quick_include Including the GLFW header\n\nIn the source files of your application where you use OpenGL or GLFW, you need\nto include the GLFW 3 header file.\n\n@code\n#include <GLFW/glfw3.h>\n@endcode\n\nThis defines all the constants, types and function prototypes of the GLFW API.\nIt also includes the OpenGL header from your development environment and\ndefines all the constants and types necessary for it to work on your platform\nwithout including any platform-specific headers.\n\nIn other words:\n\n- Do _not_ include the OpenGL header yourself, as GLFW does this for you in\n  a platform-independent way\n- Do _not_ include `windows.h` or other platform-specific headers unless\n  you plan on using those APIs yourself\n- If you _do_ need to include such headers, include them _before_ the GLFW\n  header and it will detect this\n\nOn some platforms supported by GLFW the OpenGL header and link library only\nexpose older versions of OpenGL.  The most extreme case is Windows, which only\nexposes OpenGL 1.2.  The easiest way to work around this is to use an\n[extension loader library](@ref context_glext_auto).\n\nIf you are using such a library then you should include its header _before_ the\nGLFW header.  This lets it replace the OpenGL header included by GLFW without\nconflicts.  This example uses\n[glad2](https://github.com/Dav1dde/glad), but the same rule applies to all such\nlibraries.\n\n@code\n#include <glad/gl.h>\n#include <GLFW/glfw3.h>\n@endcode\n\n\n@subsection quick_init_term Initializing and terminating GLFW\n\nBefore you can use most GLFW functions, the library must be initialized.  On\nsuccessful initialization, `GLFW_TRUE` is returned.  If an error occurred,\n`GLFW_FALSE` is returned.\n\n@code\nif (!glfwInit())\n{\n    // Initialization failed\n}\n@endcode\n\nNote that `GLFW_TRUE` and `GLFW_FALSE` are and will always be one and zero.\n\nWhen you are done using GLFW, typically just before the application exits, you\nneed to terminate GLFW.\n\n@code\nglfwTerminate();\n@endcode\n\nThis destroys any remaining windows and releases any other resources allocated by\nGLFW.  After this call, you must initialize GLFW again before using any GLFW\nfunctions that require it.\n\n\n@subsection quick_capture_error Setting an error callback\n\nMost events are reported through callbacks, whether it's a key being pressed,\na GLFW window being moved, or an error occurring.  Callbacks are C functions (or\nC++ static methods) that are called by GLFW with arguments describing the event.\n\nIn case a GLFW function fails, an error is reported to the GLFW error callback.\nYou can receive these reports with an error callback.  This function must have\nthe signature below but may do anything permitted in other callbacks.\n\n@code\nvoid error_callback(int error, const char* description)\n{\n    fprintf(stderr, \"Error: %s\\n\", description);\n}\n@endcode\n\nCallback functions must be set, so GLFW knows to call them.  The function to set\nthe error callback is one of the few GLFW functions that may be called before\ninitialization, which lets you be notified of errors both during and after\ninitialization.\n\n@code\nglfwSetErrorCallback(error_callback);\n@endcode\n\n\n@subsection quick_create_window Creating a window and context\n\nThe window and its OpenGL context are created with a single call to @ref\nglfwCreateWindow, which returns a handle to the created combined window and\ncontext object\n\n@code\nGLFWwindow* window = glfwCreateWindow(640, 480, \"My Title\", NULL, NULL);\nif (!window)\n{\n    // Window or OpenGL context creation failed\n}\n@endcode\n\nThis creates a 640 by 480 windowed mode window with an OpenGL context.  If\nwindow or OpenGL context creation fails, `NULL` will be returned.  You should\nalways check the return value.  While window creation rarely fails, context\ncreation depends on properly installed drivers and may fail even on machines\nwith the necessary hardware.\n\nBy default, the OpenGL context GLFW creates may have any version.  You can\nrequire a minimum OpenGL version by setting the `GLFW_CONTEXT_VERSION_MAJOR` and\n`GLFW_CONTEXT_VERSION_MINOR` hints _before_ creation.  If the required minimum\nversion is not supported on the machine, context (and window) creation fails.\n\n@code\nglfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 2);\nglfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 0);\nGLFWwindow* window = glfwCreateWindow(640, 480, \"My Title\", NULL, NULL);\nif (!window)\n{\n    // Window or context creation failed\n}\n@endcode\n\nThe window handle is passed to all window related functions and is provided to\nalong to all window related callbacks, so they can tell which window received\nthe event.\n\nWhen a window and context is no longer needed, destroy it.\n\n@code\nglfwDestroyWindow(window);\n@endcode\n\nOnce this function is called, no more events will be delivered for that window\nand its handle becomes invalid.\n\n\n@subsection quick_context_current Making the OpenGL context current\n\nBefore you can use the OpenGL API, you must have a current OpenGL context.\n\n@code\nglfwMakeContextCurrent(window);\n@endcode\n\nThe context will remain current until you make another context current or until\nthe window owning the current context is destroyed.\n\nIf you are using an [extension loader library](@ref context_glext_auto) to\naccess modern OpenGL then this is when to initialize it, as the loader needs\na current context to load from.  This example uses\n[glad](https://github.com/Dav1dde/glad), but the same rule applies to all such\nlibraries.\n\n@code\ngladLoadGL(glfwGetProcAddress);\n@endcode\n\n\n@subsection quick_window_close Checking the window close flag\n\nEach window has a flag indicating whether the window should be closed.\n\nWhen the user attempts to close the window, either by pressing the close widget\nin the title bar or using a key combination like Alt+F4, this flag is set to 1.\nNote that __the window isn't actually closed__, so you are expected to monitor\nthis flag and either destroy the window or give some kind of feedback to the\nuser.\n\n@code\nwhile (!glfwWindowShouldClose(window))\n{\n    // Keep running\n}\n@endcode\n\nYou can be notified when the user is attempting to close the window by setting\na close callback with @ref glfwSetWindowCloseCallback.  The callback will be\ncalled immediately after the close flag has been set.\n\nYou can also set it yourself with @ref glfwSetWindowShouldClose.  This can be\nuseful if you want to interpret other kinds of input as closing the window, like\nfor example pressing the _Escape_ key.\n\n\n@subsection quick_key_input Receiving input events\n\nEach window has a large number of callbacks that can be set to receive all the\nvarious kinds of events.  To receive key press and release events, create a key\ncallback function.\n\n@code\nstatic void key_callback(GLFWwindow* window, int key, int scancode, int action, int mods)\n{\n    if (key == GLFW_KEY_ESCAPE && action == GLFW_PRESS)\n        glfwSetWindowShouldClose(window, GLFW_TRUE);\n}\n@endcode\n\nThe key callback, like other window related callbacks, are set per-window.\n\n@code\nglfwSetKeyCallback(window, key_callback);\n@endcode\n\nIn order for event callbacks to be called when events occur, you need to process\nevents as described below.\n\n\n@subsection quick_render Rendering with OpenGL\n\nOnce you have a current OpenGL context, you can use OpenGL normally.  In this\ntutorial, a multi-colored rotating triangle will be rendered.  The framebuffer\nsize needs to be retrieved for `glViewport`.\n\n@code\nint width, height;\nglfwGetFramebufferSize(window, &width, &height);\nglViewport(0, 0, width, height);\n@endcode\n\nYou can also set a framebuffer size callback using @ref\nglfwSetFramebufferSizeCallback and be notified when the size changes.\n\nActual rendering with OpenGL is outside the scope of this tutorial, but there\nare [many](https://open.gl/) [excellent](https://learnopengl.com/)\n[tutorial](http://openglbook.com/) [sites](http://ogldev.atspace.co.uk/) that\nteach modern OpenGL.  Some of them use GLFW to create the context and window\nwhile others use GLUT or SDL, but remember that OpenGL itself always works the\nsame.\n\n\n@subsection quick_timer Reading the timer\n\nTo create smooth animation, a time source is needed.  GLFW provides a timer that\nreturns the number of seconds since initialization.  The time source used is the\nmost accurate on each platform and generally has micro- or nanosecond\nresolution.\n\n@code\ndouble time = glfwGetTime();\n@endcode\n\n\n@subsection quick_swap_buffers Swapping buffers\n\nGLFW windows by default use double buffering.  That means that each window has\ntwo rendering buffers; a front buffer and a back buffer.  The front buffer is\nthe one being displayed and the back buffer the one you render to.\n\nWhen the entire frame has been rendered, the buffers need to be swapped with one\nanother, so the back buffer becomes the front buffer and vice versa.\n\n@code\nglfwSwapBuffers(window);\n@endcode\n\nThe swap interval indicates how many frames to wait until swapping the buffers,\ncommonly known as _vsync_.  By default, the swap interval is zero, meaning\nbuffer swapping will occur immediately.  On fast machines, many of those frames\nwill never be seen, as the screen is still only updated typically 60-75 times\nper second, so this wastes a lot of CPU and GPU cycles.\n\nAlso, because the buffers will be swapped in the middle the screen update,\nleading to [screen tearing](https://en.wikipedia.org/wiki/Screen_tearing).\n\nFor these reasons, applications will typically want to set the swap interval to\none.  It can be set to higher values, but this is usually not recommended,\nbecause of the input latency it leads to.\n\n@code\nglfwSwapInterval(1);\n@endcode\n\nThis function acts on the current context and will fail unless a context is\ncurrent.\n\n\n@subsection quick_process_events Processing events\n\nGLFW needs to communicate regularly with the window system both in order to\nreceive events and to show that the application hasn't locked up.  Event\nprocessing must be done regularly while you have visible windows and is normally\ndone each frame after buffer swapping.\n\nThere are two methods for processing pending events; polling and waiting.  This\nexample will use event polling, which processes only those events that have\nalready been received and then returns immediately.\n\n@code\nglfwPollEvents();\n@endcode\n\nThis is the best choice when rendering continually, like most games do.  If\ninstead you only need to update your rendering once you have received new input,\n@ref glfwWaitEvents is a better choice.  It waits until at least one event has\nbeen received, putting the thread to sleep in the meantime, and then processes\nall received events.  This saves a great deal of CPU cycles and is useful for,\nfor example, many kinds of editing tools.\n\n\n@section quick_example Putting it together\n\nNow that you know how to initialize GLFW, create a window and poll for\nkeyboard input, it's possible to create a simple program.\n\nThis program creates a 640 by 480 windowed mode window and starts a loop that\nclears the screen, renders a triangle and processes events until the user either\npresses _Escape_ or closes the window.\n\n@snippet simple.c code\n\nThe program above can be found in the\n[source package](https://www.glfw.org/download.html) as `examples/simple.c`\nand is compiled along with all other examples when you build GLFW.  If you\nbuilt GLFW from the source package then you already have this as `simple.exe` on\nWindows, `simple` on Linux or `simple.app` on macOS.\n\nThis tutorial used only a few of the many functions GLFW provides.  There are\nguides for each of the areas covered by GLFW.  Each guide will introduce all the\nfunctions for that category.\n\n - @ref intro_guide\n - @ref window_guide\n - @ref context_guide\n - @ref monitor_guide\n - @ref input_guide\n\nYou can access reference documentation for any GLFW function by clicking it and\nthe reference for each function links to related functions and guide sections.\n\nThe tutorial ends here.  Once you have written a program that uses GLFW, you\nwill need to compile and link it.  How to do that depends on the development\nenvironment you are using and is best explained by the documentation for that\nenvironment.  To learn about the details that are specific to GLFW, see\n@ref build_guide.\n\n*/\n"
  },
  {
    "path": "thirdparty/glfw/docs/vulkan.dox",
    "content": "/*!\n\n@page vulkan_guide Vulkan guide\n\n@tableofcontents\n\nThis guide is intended to fill the gaps between the [Vulkan\ndocumentation](https://www.khronos.org/vulkan/) and the rest of the GLFW\ndocumentation and is not a replacement for either.  It assumes some familiarity\nwith Vulkan concepts like loaders, devices, queues and surfaces and leaves it to\nthe Vulkan documentation to explain the details of Vulkan functions.\n\nTo develop for Vulkan you should download the [LunarG Vulkan\nSDK](https://vulkan.lunarg.com/) for your platform.  Apart from headers and link\nlibraries, they also provide the validation layers necessary for development.\n\nFor details on a specific function in this category, see the @ref vulkan.  There\nare also guides for the other areas of the GLFW API.\n\n - @ref intro_guide\n - @ref window_guide\n - @ref context_guide\n - @ref monitor_guide\n - @ref input_guide\n\n\n@section vulkan_loader Linking against the Vulkan loader\n\nBy default, GLFW will look for the Vulkan loader on demand at runtime via its\nstandard name (`vulkan-1.dll` on Windows, `libvulkan.so.1` on Linux and other\nUnix-like systems and `libvulkan.1.dylib` on macOS).  This means that GLFW does\nnot need to be linked against the loader.  However, it also means that if you\nare using the static library form of the Vulkan loader GLFW will either fail to\nfind it or (worse) use the wrong one.\n\nThe @ref GLFW_VULKAN_STATIC CMake option makes GLFW call the Vulkan loader\ndirectly instead of dynamically loading it at runtime.  Not linking against the\nVulkan loader will then be a compile-time error.\n\n@macos Because the Vulkan loader and ICD are not installed globally on macOS,\nyou need to set up the application bundle according to the LunarG SDK\ndocumentation.  This is explained in more detail in the\n[SDK documentation for macOS](https://vulkan.lunarg.com/doc/sdk/latest/mac/getting_started.html).\n\n\n@section vulkan_include Including the Vulkan and GLFW header files\n\nTo include the Vulkan header, define @ref GLFW_INCLUDE_VULKAN before including\nthe GLFW header.\n\n@code\n#define GLFW_INCLUDE_VULKAN\n#include <GLFW/glfw3.h>\n@endcode\n\nIf you instead want to include the Vulkan header from a custom location or use\nyour own custom Vulkan header then do this before the GLFW header.\n\n@code\n#include <path/to/vulkan.h>\n#include <GLFW/glfw3.h>\n@endcode\n\nUnless a Vulkan header is included, either by the GLFW header or above it, any\nGLFW functions that take or return Vulkan types will not be declared.\n\nThe `VK_USE_PLATFORM_*_KHR` macros do not need to be defined for the Vulkan part\nof GLFW to work.  Define them only if you are using these extensions directly.\n\n\n@section vulkan_support Querying for Vulkan support\n\nIf you are linking directly against the Vulkan loader then you can skip this\nsection.  The canonical desktop loader library exports all Vulkan core and\nKhronos extension functions, allowing them to be called directly.\n\nIf you are loading the Vulkan loader dynamically instead of linking directly\nagainst it, you can check for the availability of a loader and ICD with @ref\nglfwVulkanSupported.\n\n@code\nif (glfwVulkanSupported())\n{\n    // Vulkan is available, at least for compute\n}\n@endcode\n\nThis function returns `GLFW_TRUE` if the Vulkan loader and any minimally\nfunctional ICD was found.\n\nIf if one or both were not found, calling any other Vulkan related GLFW function\nwill generate a @ref GLFW_API_UNAVAILABLE error.\n\n\n@subsection vulkan_proc Querying Vulkan function pointers\n\nTo load any Vulkan core or extension function from the found loader, call @ref\nglfwGetInstanceProcAddress.  To load functions needed for instance creation,\npass `NULL` as the instance.\n\n@code\nPFN_vkCreateInstance pfnCreateInstance = (PFN_vkCreateInstance)\n    glfwGetInstanceProcAddress(NULL, \"vkCreateInstance\");\n@endcode\n\nOnce you have created an instance, you can load from it all other Vulkan core\nfunctions and functions from any instance extensions you enabled.\n\n@code\nPFN_vkCreateDevice pfnCreateDevice = (PFN_vkCreateDevice)\n    glfwGetInstanceProcAddress(instance, \"vkCreateDevice\");\n@endcode\n\nThis function in turn calls `vkGetInstanceProcAddr`.  If that fails, the\nfunction falls back to a platform-specific query of the Vulkan loader (i.e.\n`dlsym` or `GetProcAddress`).  If that also fails, the function returns `NULL`.\nFor more information about `vkGetInstanceProcAddr`, see the Vulkan\ndocumentation.\n\nVulkan also provides `vkGetDeviceProcAddr` for loading device-specific versions\nof Vulkan function.  This function can be retrieved from an instance with @ref\nglfwGetInstanceProcAddress.\n\n@code\nPFN_vkGetDeviceProcAddr pfnGetDeviceProcAddr = (PFN_vkGetDeviceProcAddr)\n    glfwGetInstanceProcAddress(instance, \"vkGetDeviceProcAddr\");\n@endcode\n\nDevice-specific functions may execute a little bit faster, due to not having to\ndispatch internally based on the device passed to them.  For more information\nabout `vkGetDeviceProcAddr`, see the Vulkan documentation.\n\n\n@section vulkan_ext Querying required Vulkan extensions\n\nTo do anything useful with Vulkan you need to create an instance.  If you want\nto use Vulkan to render to a window, you must enable the instance extensions\nGLFW requires to create Vulkan surfaces.\n\nTo query the instance extensions required, call @ref\nglfwGetRequiredInstanceExtensions.\n\n@code\nuint32_t count;\nconst char** extensions = glfwGetRequiredInstanceExtensions(&count);\n@endcode\n\nThese extensions must all be enabled when creating instances that are going to\nbe passed to @ref glfwGetPhysicalDevicePresentationSupport and @ref\nglfwCreateWindowSurface.  The set of extensions will vary depending on platform\nand may also vary depending on graphics drivers and other factors.\n\nIf it fails it will return `NULL` and GLFW will not be able to create Vulkan\nwindow surfaces.  You can still use Vulkan for off-screen rendering and compute\nwork.\n\nIf successful the returned array will always include `VK_KHR_surface`, so if\nyou don't require any additional extensions you can pass this list directly to\nthe `VkInstanceCreateInfo` struct.\n\n@code\nVkInstanceCreateInfo ici;\n\nmemset(&ici, 0, sizeof(ici));\nici.enabledExtensionCount = count;\nici.ppEnabledExtensionNames = extensions;\n...\n@endcode\n\nAdditional extensions may be required by future versions of GLFW.  You should\ncheck whether any extensions you wish to enable are already in the returned\narray, as it is an error to specify an extension more than once in the\n`VkInstanceCreateInfo` struct.\n\n\n@section vulkan_present Querying for Vulkan presentation support\n\nNot every queue family of every Vulkan device can present images to surfaces.\nTo check whether a specific queue family of a physical device supports image\npresentation without first having to create a window and surface, call @ref\nglfwGetPhysicalDevicePresentationSupport.\n\n@code\nif (glfwGetPhysicalDevicePresentationSupport(instance, physical_device, queue_family_index))\n{\n    // Queue family supports image presentation\n}\n@endcode\n\nThe `VK_KHR_surface` extension additionally provides the\n`vkGetPhysicalDeviceSurfaceSupportKHR` function, which performs the same test on\nan existing Vulkan surface.\n\n\n@section vulkan_window Creating the window\n\nUnless you will be using OpenGL or OpenGL ES with the same window as Vulkan,\nthere is no need to create a context.  You can disable context creation with the\n[GLFW_CLIENT_API](@ref GLFW_CLIENT_API_hint) hint.\n\n@code\nglfwWindowHint(GLFW_CLIENT_API, GLFW_NO_API);\nGLFWwindow* window = glfwCreateWindow(640, 480, \"Window Title\", NULL, NULL);\n@endcode\n\nSee @ref context_less for more information.\n\n\n@section vulkan_surface Creating a Vulkan window surface\n\nYou can create a Vulkan surface (as defined by the `VK_KHR_surface` extension)\nfor a GLFW window with @ref glfwCreateWindowSurface.\n\n@code\nVkSurfaceKHR surface;\nVkResult err = glfwCreateWindowSurface(instance, window, NULL, &surface);\nif (err)\n{\n    // Window surface creation failed\n}\n@endcode\n\nIf an OpenGL or OpenGL ES context was created on the window, the context has\nownership of the presentation on the window and a Vulkan surface cannot be\ncreated.\n\nIt is your responsibility to destroy the surface.  GLFW does not destroy it for\nyou.  Call `vkDestroySurfaceKHR` function from the same extension to destroy it.\n\n*/\n"
  },
  {
    "path": "thirdparty/glfw/docs/window.dox",
    "content": "/*!\n\n@page window_guide Window guide\n\n@tableofcontents\n\nThis guide introduces the window related functions of GLFW.  For details on\na specific function in this category, see the @ref window.  There are also\nguides for the other areas of GLFW.\n\n - @ref intro_guide\n - @ref context_guide\n - @ref vulkan_guide\n - @ref monitor_guide\n - @ref input_guide\n\n\n@section window_object Window objects\n\nThe @ref GLFWwindow object encapsulates both a window and a context.  They are\ncreated with @ref glfwCreateWindow and destroyed with @ref glfwDestroyWindow, or\n@ref glfwTerminate, if any remain.  As the window and context are inseparably\nlinked, the object pointer is used as both a context and window handle.\n\nTo see the event stream provided to the various window related callbacks, run\nthe `events` test program.\n\n\n@subsection window_creation Window creation\n\nA window and its OpenGL or OpenGL ES context are created with @ref\nglfwCreateWindow, which returns a handle to the created window object.  For\nexample, this creates a 640 by 480 windowed mode window:\n\n@code\nGLFWwindow* window = glfwCreateWindow(640, 480, \"My Title\", NULL, NULL);\n@endcode\n\nIf window creation fails, `NULL` will be returned, so it is necessary to check\nthe return value.\n\nThe window handle is passed to all window related functions and is provided to\nalong with all input events, so event handlers can tell which window received\nthe event.\n\n\n@subsubsection window_full_screen Full screen windows\n\nTo create a full screen window, you need to specify which monitor the window\nshould use.  In most cases, the user's primary monitor is a good choice.\nFor more information about retrieving monitors, see @ref monitor_monitors.\n\n@code\nGLFWwindow* window = glfwCreateWindow(640, 480, \"My Title\", glfwGetPrimaryMonitor(), NULL);\n@endcode\n\nFull screen windows cover the entire display area of a monitor, have no border\nor decorations.\n\nWindowed mode windows can be made full screen by setting a monitor with @ref\nglfwSetWindowMonitor, and full screen ones can be made windowed by unsetting it\nwith the same function.\n\nEach field of the @ref GLFWvidmode structure corresponds to a function parameter\nor window hint and combine to form the _desired video mode_ for that window.\nThe supported video mode most closely matching the desired video mode will be\nset for the chosen monitor as long as the window has input focus.  For more\ninformation about retrieving video modes, see @ref monitor_modes.\n\nVideo mode field        | Corresponds to\n----------------        | --------------\nGLFWvidmode.width       | `width` parameter of @ref glfwCreateWindow\nGLFWvidmode.height      | `height` parameter of @ref glfwCreateWindow\nGLFWvidmode.redBits     | @ref GLFW_RED_BITS hint\nGLFWvidmode.greenBits   | @ref GLFW_GREEN_BITS hint\nGLFWvidmode.blueBits    | @ref GLFW_BLUE_BITS hint\nGLFWvidmode.refreshRate | @ref GLFW_REFRESH_RATE hint\n\nOnce you have a full screen window, you can change its resolution, refresh rate\nand monitor with @ref glfwSetWindowMonitor.  If you only need change its\nresolution you can also call @ref glfwSetWindowSize.  In all cases, the new\nvideo mode will be selected the same way as the video mode chosen by @ref\nglfwCreateWindow.  If the window has an OpenGL or OpenGL ES context, it will be\nunaffected.\n\nBy default, the original video mode of the monitor will be restored and the\nwindow iconified if it loses input focus, to allow the user to switch back to\nthe desktop.  This behavior can be disabled with the\n[GLFW_AUTO_ICONIFY](@ref GLFW_AUTO_ICONIFY_hint) window hint, for example if you\nwish to simultaneously cover multiple monitors with full screen windows.\n\nIf a monitor is disconnected, all windows that are full screen on that monitor\nwill be switched to windowed mode.  See @ref monitor_event for more information.\n\n\n@subsubsection window_windowed_full_screen \"Windowed full screen\" windows\n\nIf the closest match for the desired video mode is the current one, the video\nmode will not be changed, making window creation faster and application\nswitching much smoother.  This is sometimes called _windowed full screen_ or\n_borderless full screen_ window and counts as a full screen window.  To create\nsuch a window, request the current video mode.\n\n@code\nconst GLFWvidmode* mode = glfwGetVideoMode(monitor);\n\nglfwWindowHint(GLFW_RED_BITS, mode->redBits);\nglfwWindowHint(GLFW_GREEN_BITS, mode->greenBits);\nglfwWindowHint(GLFW_BLUE_BITS, mode->blueBits);\nglfwWindowHint(GLFW_REFRESH_RATE, mode->refreshRate);\n\nGLFWwindow* window = glfwCreateWindow(mode->width, mode->height, \"My Title\", monitor, NULL);\n@endcode\n\nThis also works for windowed mode windows that are made full screen.\n\n@code\nconst GLFWvidmode* mode = glfwGetVideoMode(monitor);\n\nglfwSetWindowMonitor(window, monitor, 0, 0, mode->width, mode->height, mode->refreshRate);\n@endcode\n\nNote that @ref glfwGetVideoMode returns the _current_ video mode of a monitor,\nso if you already have a full screen window on that monitor that you want to\nmake windowed full screen, you need to have saved the desktop resolution before.\n\n\n@subsection window_destruction Window destruction\n\nWhen a window is no longer needed, destroy it with @ref glfwDestroyWindow.\n\n@code\nglfwDestroyWindow(window);\n@endcode\n\nWindow destruction always succeeds.  Before the actual destruction, all\ncallbacks are removed so no further events will be delivered for the window.\nAll windows remaining when @ref glfwTerminate is called are destroyed as well.\n\nWhen a full screen window is destroyed, the original video mode of its monitor\nis restored, but the gamma ramp is left untouched.\n\n\n@subsection window_hints Window creation hints\n\nThere are a number of hints that can be set before the creation of a window and\ncontext.  Some affect the window itself, others affect the framebuffer or\ncontext.  These hints are set to their default values each time the library is\ninitialized with @ref glfwInit.  Integer value hints can be set individually\nwith @ref glfwWindowHint and string value hints with @ref glfwWindowHintString.\nYou can reset all at once to their defaults with @ref glfwDefaultWindowHints.\n\nSome hints are platform specific.  These are always valid to set on any\nplatform but they will only affect their specific platform.  Other platforms\nwill ignore them.  Setting these hints requires no platform specific headers or\ncalls.\n\n@note Window hints need to be set before the creation of the window and context\nyou wish to have the specified attributes.  They function as additional\narguments to @ref glfwCreateWindow.\n\n\n@subsubsection window_hints_hard Hard and soft constraints\n\nSome window hints are hard constraints.  These must match the available\ncapabilities _exactly_ for window and context creation to succeed.  Hints\nthat are not hard constraints are matched as closely as possible, but the\nresulting context and framebuffer may differ from what these hints requested.\n\nThe following hints are always hard constraints:\n- @ref GLFW_STEREO\n- @ref GLFW_DOUBLEBUFFER\n- [GLFW_CLIENT_API](@ref GLFW_CLIENT_API_hint)\n- [GLFW_CONTEXT_CREATION_API](@ref GLFW_CONTEXT_CREATION_API_hint)\n\nThe following additional hints are hard constraints when requesting an OpenGL\ncontext, but are ignored when requesting an OpenGL ES context:\n- [GLFW_OPENGL_FORWARD_COMPAT](@ref GLFW_OPENGL_FORWARD_COMPAT_hint)\n- [GLFW_OPENGL_PROFILE](@ref GLFW_OPENGL_PROFILE_hint)\n\n\n@subsubsection window_hints_wnd Window related hints\n\n@anchor GLFW_RESIZABLE_hint\n__GLFW_RESIZABLE__ specifies whether the windowed mode window will be resizable\n_by the user_.  The window will still be resizable using the @ref\nglfwSetWindowSize function.  Possible values are `GLFW_TRUE` and `GLFW_FALSE`.\nThis hint is ignored for full screen and undecorated windows.\n\n@anchor GLFW_VISIBLE_hint\n__GLFW_VISIBLE__ specifies whether the windowed mode window will be initially\nvisible.  Possible values are `GLFW_TRUE` and `GLFW_FALSE`.  This hint is\nignored for full screen windows.\n\n@anchor GLFW_DECORATED_hint\n__GLFW_DECORATED__ specifies whether the windowed mode window will have window\ndecorations such as a border, a close widget, etc.  An undecorated window will\nnot be resizable by the user but will still allow the user to generate close\nevents on some platforms.  Possible values are `GLFW_TRUE` and `GLFW_FALSE`.\nThis hint is ignored for full screen windows.\n\n@anchor GLFW_FOCUSED_hint\n__GLFW_FOCUSED__ specifies whether the windowed mode window will be given input\nfocus when created.  Possible values are `GLFW_TRUE` and `GLFW_FALSE`.  This\nhint is ignored for full screen and initially hidden windows.\n\n@anchor GLFW_AUTO_ICONIFY_hint\n__GLFW_AUTO_ICONIFY__ specifies whether the full screen window will\nautomatically iconify and restore the previous video mode on input focus loss.\nPossible values are `GLFW_TRUE` and `GLFW_FALSE`.  This hint is ignored for\nwindowed mode windows.\n\n@anchor GLFW_FLOATING_hint\n__GLFW_FLOATING__ specifies whether the windowed mode window will be floating\nabove other regular windows, also called topmost or always-on-top.  This is\nintended primarily for debugging purposes and cannot be used to implement proper\nfull screen windows.  Possible values are `GLFW_TRUE` and `GLFW_FALSE`.  This\nhint is ignored for full screen windows.\n\n@anchor GLFW_MAXIMIZED_hint\n__GLFW_MAXIMIZED__ specifies whether the windowed mode window will be maximized\nwhen created.  Possible values are `GLFW_TRUE` and `GLFW_FALSE`.  This hint is\nignored for full screen windows.\n\n@anchor GLFW_CENTER_CURSOR_hint\n__GLFW_CENTER_CURSOR__ specifies whether the cursor should be centered over\nnewly created full screen windows.  Possible values are `GLFW_TRUE` and\n`GLFW_FALSE`.  This hint is ignored for windowed mode windows.\n\n@anchor GLFW_TRANSPARENT_FRAMEBUFFER_hint\n__GLFW_TRANSPARENT_FRAMEBUFFER__ specifies whether the window framebuffer will\nbe transparent.  If enabled and supported by the system, the window framebuffer\nalpha channel will be used to combine the framebuffer with the background.  This\ndoes not affect window decorations.  Possible values are `GLFW_TRUE` and\n`GLFW_FALSE`.\n\n@par\n@win32 GLFW sets a color key for the window to work around repainting issues\nwith a transparent framebuffer.  The chosen color value is RGB 255,0,255\n(magenta).  This will make pixels with that exact color fully transparent\nregardless of their alpha values.  If this is a problem, make these pixels any\nother color before buffer swap.\n\n@anchor GLFW_FOCUS_ON_SHOW_hint\n__GLFW_FOCUS_ON_SHOW__ specifies whether the window will be given input\nfocus when @ref glfwShowWindow is called. Possible values are `GLFW_TRUE` and `GLFW_FALSE`.\n\n@anchor GLFW_SCALE_TO_MONITOR\n__GLFW_SCALE_TO_MONITOR__ specified whether the window content area should be\nresized based on the [monitor content scale](@ref monitor_scale) of any monitor\nit is placed on.  This includes the initial placement when the window is\ncreated.  Possible values are `GLFW_TRUE` and `GLFW_FALSE`.\n\nThis hint only has an effect on platforms where screen coordinates and pixels\nalways map 1:1 such as Windows and X11.  On platforms like macOS the resolution\nof the framebuffer is changed independently of the window size.\n\n\n@subsubsection window_hints_fb Framebuffer related hints\n\n@anchor GLFW_RED_BITS\n@anchor GLFW_GREEN_BITS\n@anchor GLFW_BLUE_BITS\n@anchor GLFW_ALPHA_BITS\n@anchor GLFW_DEPTH_BITS\n@anchor GLFW_STENCIL_BITS\n__GLFW_RED_BITS__, __GLFW_GREEN_BITS__, __GLFW_BLUE_BITS__, __GLFW_ALPHA_BITS__,\n__GLFW_DEPTH_BITS__ and __GLFW_STENCIL_BITS__ specify the desired bit depths of\nthe various components of the default framebuffer.  A value of `GLFW_DONT_CARE`\nmeans the application has no preference.\n\n@anchor GLFW_ACCUM_RED_BITS\n@anchor GLFW_ACCUM_GREEN_BITS\n@anchor GLFW_ACCUM_BLUE_BITS\n@anchor GLFW_ACCUM_ALPHA_BITS\n__GLFW_ACCUM_RED_BITS__, __GLFW_ACCUM_GREEN_BITS__, __GLFW_ACCUM_BLUE_BITS__ and\n__GLFW_ACCUM_ALPHA_BITS__ specify the desired bit depths of the various\ncomponents of the accumulation buffer.  A value of `GLFW_DONT_CARE` means the\napplication has no preference.\n\n@par\nAccumulation buffers are a legacy OpenGL feature and should not be used in new\ncode.\n\n@anchor GLFW_AUX_BUFFERS\n__GLFW_AUX_BUFFERS__ specifies the desired number of auxiliary buffers.  A value\nof `GLFW_DONT_CARE` means the application has no preference.\n\n@par\nAuxiliary buffers are a legacy OpenGL feature and should not be used in new\ncode.\n\n@anchor GLFW_STEREO\n__GLFW_STEREO__ specifies whether to use OpenGL stereoscopic rendering.\nPossible values are `GLFW_TRUE` and `GLFW_FALSE`.  This is a hard constraint.\n\n@anchor GLFW_SAMPLES\n__GLFW_SAMPLES__ specifies the desired number of samples to use for\nmultisampling.  Zero disables multisampling.  A value of `GLFW_DONT_CARE` means\nthe application has no preference.\n\n@anchor GLFW_SRGB_CAPABLE\n__GLFW_SRGB_CAPABLE__ specifies whether the framebuffer should be sRGB capable.\nPossible values are `GLFW_TRUE` and `GLFW_FALSE`.\n\n@par\n__OpenGL:__ If enabled and supported by the system, the `GL_FRAMEBUFFER_SRGB`\nenable will control sRGB rendering.  By default, sRGB rendering will be\ndisabled.\n\n@par\n__OpenGL ES:__ If enabled and supported by the system, the context will always\nhave sRGB rendering enabled.\n\n@anchor GLFW_DOUBLEBUFFER\n__GLFW_DOUBLEBUFFER__ specifies whether the framebuffer should be double\nbuffered.  You nearly always want to use double buffering.  This is a hard\nconstraint.  Possible values are `GLFW_TRUE` and `GLFW_FALSE`.\n\n\n@subsubsection window_hints_mtr Monitor related hints\n\n@anchor GLFW_REFRESH_RATE\n__GLFW_REFRESH_RATE__ specifies the desired refresh rate for full screen\nwindows.  A value of `GLFW_DONT_CARE` means the highest available refresh rate\nwill be used.  This hint is ignored for windowed mode windows.\n\n\n@subsubsection window_hints_ctx Context related hints\n\n@anchor GLFW_CLIENT_API_hint\n__GLFW_CLIENT_API__ specifies which client API to create the context for.\nPossible values are `GLFW_OPENGL_API`, `GLFW_OPENGL_ES_API` and `GLFW_NO_API`.\nThis is a hard constraint.\n\n@anchor GLFW_CONTEXT_CREATION_API_hint\n__GLFW_CONTEXT_CREATION_API__ specifies which context creation API to use to\ncreate the context.  Possible values are `GLFW_NATIVE_CONTEXT_API`,\n`GLFW_EGL_CONTEXT_API` and `GLFW_OSMESA_CONTEXT_API`.  This is a hard\nconstraint.  If no client API is requested, this hint is ignored.\n\n@par\n@macos The EGL API is not available on this platform and requests to use it\nwill fail.\n\n@par\n__Wayland:__ The EGL API _is_ the native context creation API, so this hint\nwill have no effect.\n\n@par\n__OSMesa:__ As its name implies, an OpenGL context created with OSMesa does not\nupdate the window contents when its buffers are swapped.  Use OpenGL functions\nor the OSMesa native access functions @ref glfwGetOSMesaColorBuffer and @ref\nglfwGetOSMesaDepthBuffer to retrieve the framebuffer contents.\n\n@note An OpenGL extension loader library that assumes it knows which context\ncreation API is used on a given platform may fail if you change this hint.  This\ncan be resolved by having it load via @ref glfwGetProcAddress, which always uses\nthe selected API.\n\n@bug On some Linux systems, creating contexts via both the native and EGL APIs\nin a single process will cause the application to segfault.  Stick to one API or\nthe other on Linux for now.\n\n@anchor GLFW_CONTEXT_VERSION_MAJOR_hint\n@anchor GLFW_CONTEXT_VERSION_MINOR_hint\n__GLFW_CONTEXT_VERSION_MAJOR__ and __GLFW_CONTEXT_VERSION_MINOR__ specify the\nclient API version that the created context must be compatible with.  The exact\nbehavior of these hints depend on the requested client API.\n\n@note Do not confuse these hints with `GLFW_VERSION_MAJOR` and\n`GLFW_VERSION_MINOR`, which provide the API version of the GLFW header.\n\n@par\n__OpenGL:__ These hints are not hard constraints, but creation will fail if the\nOpenGL version of the created context is less than the one requested.  It is\ntherefore perfectly safe to use the default of version 1.0 for legacy code and\nyou will still get backwards-compatible contexts of version 3.0 and above when\navailable.\n\n@par\nWhile there is no way to ask the driver for a context of the highest supported\nversion, GLFW will attempt to provide this when you ask for a version 1.0\ncontext, which is the default for these hints.\n\n@par\n__OpenGL ES:__ These hints are not hard constraints, but creation will fail if\nthe OpenGL ES version of the created context is less than the one requested.\nAdditionally, OpenGL ES 1.x cannot be returned if 2.0 or later was requested,\nand vice versa.  This is because OpenGL ES 3.x is backward compatible with 2.0,\nbut OpenGL ES 2.0 is not backward compatible with 1.x.\n\n@note @macos The OS only supports forward-compatible core profile contexts for\nOpenGL versions 3.2 and later.  Before creating an OpenGL context of version\n3.2 or later you must set the\n[GLFW_OPENGL_FORWARD_COMPAT](@ref GLFW_OPENGL_FORWARD_COMPAT_hint) and\n[GLFW_OPENGL_PROFILE](@ref GLFW_OPENGL_PROFILE_hint) hints accordingly.  OpenGL\n3.0 and 3.1 contexts are not supported at all on macOS.\n\n@anchor GLFW_OPENGL_FORWARD_COMPAT_hint\n__GLFW_OPENGL_FORWARD_COMPAT__ specifies whether the OpenGL context should be\nforward-compatible, i.e. one where all functionality deprecated in the requested\nversion of OpenGL is removed.  This must only be used if the requested OpenGL\nversion is 3.0 or above.  If OpenGL ES is requested, this hint is ignored.\n\n@par\nForward-compatibility is described in detail in the\n[OpenGL Reference Manual](https://www.opengl.org/registry/).\n\n@anchor GLFW_OPENGL_DEBUG_CONTEXT_hint\n__GLFW_OPENGL_DEBUG_CONTEXT__ specifies whether to create a debug OpenGL\ncontext, which may have additional error and performance issue reporting\nfunctionality.  Possible values are `GLFW_TRUE` and `GLFW_FALSE`.  If OpenGL ES\nis requested, this hint is ignored.\n\n@anchor GLFW_OPENGL_PROFILE_hint\n__GLFW_OPENGL_PROFILE__ specifies which OpenGL profile to create the context\nfor.  Possible values are one of `GLFW_OPENGL_CORE_PROFILE` or\n`GLFW_OPENGL_COMPAT_PROFILE`, or `GLFW_OPENGL_ANY_PROFILE` to not request\na specific profile.  If requesting an OpenGL version below 3.2,\n`GLFW_OPENGL_ANY_PROFILE` must be used.  If OpenGL ES is requested, this hint\nis ignored.\n\n@par\nOpenGL profiles are described in detail in the\n[OpenGL Reference Manual](https://www.opengl.org/registry/).\n\n@anchor GLFW_CONTEXT_ROBUSTNESS_hint\n__GLFW_CONTEXT_ROBUSTNESS__ specifies the robustness strategy to be used by the\ncontext.  This can be one of `GLFW_NO_RESET_NOTIFICATION` or\n`GLFW_LOSE_CONTEXT_ON_RESET`, or `GLFW_NO_ROBUSTNESS` to not request\na robustness strategy.\n\n@anchor GLFW_CONTEXT_RELEASE_BEHAVIOR_hint\n__GLFW_CONTEXT_RELEASE_BEHAVIOR__ specifies the release behavior to be\nused by the context.  Possible values are one of `GLFW_ANY_RELEASE_BEHAVIOR`,\n`GLFW_RELEASE_BEHAVIOR_FLUSH` or `GLFW_RELEASE_BEHAVIOR_NONE`.  If the\nbehavior is `GLFW_ANY_RELEASE_BEHAVIOR`, the default behavior of the context\ncreation API will be used.  If the behavior is `GLFW_RELEASE_BEHAVIOR_FLUSH`,\nthe pipeline will be flushed whenever the context is released from being the\ncurrent one.  If the behavior is `GLFW_RELEASE_BEHAVIOR_NONE`, the pipeline will\nnot be flushed on release.\n\n@par\nContext release behaviors are described in detail by the\n[GL_KHR_context_flush_control](https://www.opengl.org/registry/specs/KHR/context_flush_control.txt)\nextension.\n\n@anchor GLFW_CONTEXT_NO_ERROR_hint\n__GLFW_CONTEXT_NO_ERROR__ specifies whether errors should be generated by the\ncontext.  Possible values are `GLFW_TRUE` and `GLFW_FALSE`.  If enabled,\nsituations that would have generated errors instead cause undefined behavior.\n\n@par\nThe no error mode for OpenGL and OpenGL ES is described in detail by the\n[GL_KHR_no_error](https://www.opengl.org/registry/specs/KHR/no_error.txt)\nextension.\n\n\n@subsubsection window_hints_osx macOS specific window hints\n\n@anchor GLFW_COCOA_RETINA_FRAMEBUFFER_hint\n__GLFW_COCOA_RETINA_FRAMEBUFFER__ specifies whether to use full resolution\nframebuffers on Retina displays.  Possible values are `GLFW_TRUE` and\n`GLFW_FALSE`.  This is ignored on other platforms.\n\n@anchor GLFW_COCOA_FRAME_NAME_hint\n__GLFW_COCOA_FRAME_NAME__ specifies the UTF-8 encoded name to use for autosaving\nthe window frame, or if empty disables frame autosaving for the window.  This is\nignored on other platforms.  This is set with @ref glfwWindowHintString.\n\n@anchor GLFW_COCOA_GRAPHICS_SWITCHING_hint\n__GLFW_COCOA_GRAPHICS_SWITCHING__ specifies whether to in Automatic Graphics\nSwitching, i.e. to allow the system to choose the integrated GPU for the OpenGL\ncontext and move it between GPUs if necessary or whether to force it to always\nrun on the discrete GPU.  This only affects systems with both integrated and\ndiscrete GPUs.  Possible values are `GLFW_TRUE` and `GLFW_FALSE`.  This is\nignored on other platforms.\n\n@par\nSimpler programs and tools may want to enable this to save power, while games\nand other applications performing advanced rendering will want to leave it\ndisabled.\n\n@par\nA bundled application that wishes to participate in Automatic Graphics Switching\nshould also declare this in its `Info.plist` by setting the\n`NSSupportsAutomaticGraphicsSwitching` key to `true`.\n\n\n@subsubsection window_hints_x11 X11 specific window hints\n\n@anchor GLFW_X11_CLASS_NAME_hint\n@anchor GLFW_X11_INSTANCE_NAME_hint\n__GLFW_X11_CLASS_NAME__ and __GLFW_X11_INSTANCE_NAME__ specifies the desired\nASCII encoded class and instance parts of the ICCCM `WM_CLASS` window property.\nThese are set with @ref glfwWindowHintString.\n\n\n@subsubsection window_hints_values Supported and default values\n\nWindow hint                   | Default value               | Supported values\n----------------------------- | --------------------------- | ----------------\nGLFW_RESIZABLE                | `GLFW_TRUE`                 | `GLFW_TRUE` or `GLFW_FALSE`\nGLFW_VISIBLE                  | `GLFW_TRUE`                 | `GLFW_TRUE` or `GLFW_FALSE`\nGLFW_DECORATED                | `GLFW_TRUE`                 | `GLFW_TRUE` or `GLFW_FALSE`\nGLFW_FOCUSED                  | `GLFW_TRUE`                 | `GLFW_TRUE` or `GLFW_FALSE`\nGLFW_AUTO_ICONIFY             | `GLFW_TRUE`                 | `GLFW_TRUE` or `GLFW_FALSE`\nGLFW_FLOATING                 | `GLFW_FALSE`                | `GLFW_TRUE` or `GLFW_FALSE`\nGLFW_MAXIMIZED                | `GLFW_FALSE`                | `GLFW_TRUE` or `GLFW_FALSE`\nGLFW_CENTER_CURSOR            | `GLFW_TRUE`                 | `GLFW_TRUE` or `GLFW_FALSE`\nGLFW_TRANSPARENT_FRAMEBUFFER  | `GLFW_FALSE`                | `GLFW_TRUE` or `GLFW_FALSE`\nGLFW_FOCUS_ON_SHOW            | `GLFW_TRUE`                 | `GLFW_TRUE` or `GLFW_FALSE`\nGLFW_SCALE_TO_MONITOR         | `GLFW_FALSE`                | `GLFW_TRUE` or `GLFW_FALSE`\nGLFW_RED_BITS                 | 8                           | 0 to `INT_MAX` or `GLFW_DONT_CARE`\nGLFW_GREEN_BITS               | 8                           | 0 to `INT_MAX` or `GLFW_DONT_CARE`\nGLFW_BLUE_BITS                | 8                           | 0 to `INT_MAX` or `GLFW_DONT_CARE`\nGLFW_ALPHA_BITS               | 8                           | 0 to `INT_MAX` or `GLFW_DONT_CARE`\nGLFW_DEPTH_BITS               | 24                          | 0 to `INT_MAX` or `GLFW_DONT_CARE`\nGLFW_STENCIL_BITS             | 8                           | 0 to `INT_MAX` or `GLFW_DONT_CARE`\nGLFW_ACCUM_RED_BITS           | 0                           | 0 to `INT_MAX` or `GLFW_DONT_CARE`\nGLFW_ACCUM_GREEN_BITS         | 0                           | 0 to `INT_MAX` or `GLFW_DONT_CARE`\nGLFW_ACCUM_BLUE_BITS          | 0                           | 0 to `INT_MAX` or `GLFW_DONT_CARE`\nGLFW_ACCUM_ALPHA_BITS         | 0                           | 0 to `INT_MAX` or `GLFW_DONT_CARE`\nGLFW_AUX_BUFFERS              | 0                           | 0 to `INT_MAX` or `GLFW_DONT_CARE`\nGLFW_SAMPLES                  | 0                           | 0 to `INT_MAX` or `GLFW_DONT_CARE`\nGLFW_REFRESH_RATE             | `GLFW_DONT_CARE`            | 0 to `INT_MAX` or `GLFW_DONT_CARE`\nGLFW_STEREO                   | `GLFW_FALSE`                | `GLFW_TRUE` or `GLFW_FALSE`\nGLFW_SRGB_CAPABLE             | `GLFW_FALSE`                | `GLFW_TRUE` or `GLFW_FALSE`\nGLFW_DOUBLEBUFFER             | `GLFW_TRUE`                 | `GLFW_TRUE` or `GLFW_FALSE`\nGLFW_CLIENT_API               | `GLFW_OPENGL_API`           | `GLFW_OPENGL_API`, `GLFW_OPENGL_ES_API` or `GLFW_NO_API`\nGLFW_CONTEXT_CREATION_API     | `GLFW_NATIVE_CONTEXT_API`   | `GLFW_NATIVE_CONTEXT_API`, `GLFW_EGL_CONTEXT_API` or `GLFW_OSMESA_CONTEXT_API`\nGLFW_CONTEXT_VERSION_MAJOR    | 1                           | Any valid major version number of the chosen client API\nGLFW_CONTEXT_VERSION_MINOR    | 0                           | Any valid minor version number of the chosen client API\nGLFW_CONTEXT_ROBUSTNESS       | `GLFW_NO_ROBUSTNESS`        | `GLFW_NO_ROBUSTNESS`, `GLFW_NO_RESET_NOTIFICATION` or `GLFW_LOSE_CONTEXT_ON_RESET`\nGLFW_CONTEXT_RELEASE_BEHAVIOR | `GLFW_ANY_RELEASE_BEHAVIOR` | `GLFW_ANY_RELEASE_BEHAVIOR`, `GLFW_RELEASE_BEHAVIOR_FLUSH` or `GLFW_RELEASE_BEHAVIOR_NONE`\nGLFW_OPENGL_FORWARD_COMPAT    | `GLFW_FALSE`                | `GLFW_TRUE` or `GLFW_FALSE`\nGLFW_OPENGL_DEBUG_CONTEXT     | `GLFW_FALSE`                | `GLFW_TRUE` or `GLFW_FALSE`\nGLFW_OPENGL_PROFILE           | `GLFW_OPENGL_ANY_PROFILE`   | `GLFW_OPENGL_ANY_PROFILE`, `GLFW_OPENGL_COMPAT_PROFILE` or `GLFW_OPENGL_CORE_PROFILE`\nGLFW_COCOA_RETINA_FRAMEBUFFER | `GLFW_TRUE`                 | `GLFW_TRUE` or `GLFW_FALSE`\nGLFW_COCOA_FRAME_NAME         | `\"\"`                        | A UTF-8 encoded frame autosave name\nGLFW_COCOA_GRAPHICS_SWITCHING | `GLFW_FALSE`                | `GLFW_TRUE` or `GLFW_FALSE`\nGLFW_X11_CLASS_NAME           | `\"\"`                        | An ASCII encoded `WM_CLASS` class name\nGLFW_X11_INSTANCE_NAME        | `\"\"`                        | An ASCII encoded `WM_CLASS` instance name\n\n\n@section window_events Window event processing\n\nSee @ref events.\n\n\n@section window_properties Window properties and events\n\n@subsection window_userptr User pointer\n\nEach window has a user pointer that can be set with @ref\nglfwSetWindowUserPointer and queried with @ref glfwGetWindowUserPointer.  This\ncan be used for any purpose you need and will not be modified by GLFW throughout\nthe life-time of the window.\n\nThe initial value of the pointer is `NULL`.\n\n\n@subsection window_close Window closing and close flag\n\nWhen the user attempts to close the window, for example by clicking the close\nwidget or using a key chord like Alt+F4, the _close flag_ of the window is set.\nThe window is however not actually destroyed and, unless you watch for this\nstate change, nothing further happens.\n\nThe current state of the close flag is returned by @ref glfwWindowShouldClose\nand can be set or cleared directly with @ref glfwSetWindowShouldClose.  A common\npattern is to use the close flag as a main loop condition.\n\n@code\nwhile (!glfwWindowShouldClose(window))\n{\n    render(window);\n\n    glfwSwapBuffers(window);\n    glfwPollEvents();\n}\n@endcode\n\nIf you wish to be notified when the user attempts to close a window, set a close\ncallback.\n\n@code\nglfwSetWindowCloseCallback(window, window_close_callback);\n@endcode\n\nThe callback function is called directly _after_ the close flag has been set.\nIt can be used for example to filter close requests and clear the close flag\nagain unless certain conditions are met.\n\n@code\nvoid window_close_callback(GLFWwindow* window)\n{\n    if (!time_to_close)\n        glfwSetWindowShouldClose(window, GLFW_FALSE);\n}\n@endcode\n\n\n@subsection window_size Window size\n\nThe size of a window can be changed with @ref glfwSetWindowSize.  For windowed\nmode windows, this sets the size, in\n[screen coordinates](@ref coordinate_systems) of the _content area_ or _content\narea_ of the window.  The window system may impose limits on window size.\n\n@code\nglfwSetWindowSize(window, 640, 480);\n@endcode\n\nFor full screen windows, the specified size becomes the new resolution of the\nwindow's desired video mode.  The video mode most closely matching the new\ndesired video mode is set immediately.  The window is resized to fit the\nresolution of the set video mode.\n\nIf you wish to be notified when a window is resized, whether by the user, the\nsystem or your own code, set a size callback.\n\n@code\nglfwSetWindowSizeCallback(window, window_size_callback);\n@endcode\n\nThe callback function receives the new size, in screen coordinates, of the\ncontent area of the window when the window is resized.\n\n@code\nvoid window_size_callback(GLFWwindow* window, int width, int height)\n{\n}\n@endcode\n\nThere is also @ref glfwGetWindowSize for directly retrieving the current size of\na window.\n\n@code\nint width, height;\nglfwGetWindowSize(window, &width, &height);\n@endcode\n\n@note Do not pass the window size to `glViewport` or other pixel-based OpenGL\ncalls.  The window size is in screen coordinates, not pixels.  Use the\n[framebuffer size](@ref window_fbsize), which is in pixels, for pixel-based\ncalls.\n\nThe above functions work with the size of the content area, but decorated\nwindows typically have title bars and window frames around this rectangle.  You\ncan retrieve the extents of these with @ref glfwGetWindowFrameSize.\n\n@code\nint left, top, right, bottom;\nglfwGetWindowFrameSize(window, &left, &top, &right, &bottom);\n@endcode\n\nThe returned values are the distances, in screen coordinates, from the edges of\nthe content area to the corresponding edges of the full window.  As they are\ndistances and not coordinates, they are always zero or positive.\n\n\n@subsection window_fbsize Framebuffer size\n\nWhile the size of a window is measured in screen coordinates, OpenGL works with\npixels.  The size you pass into `glViewport`, for example, should be in pixels.\nOn some machines screen coordinates and pixels are the same, but on others they\nwill not be.  There is a second set of functions to retrieve the size, in\npixels, of the framebuffer of a window.\n\nIf you wish to be notified when the framebuffer of a window is resized, whether\nby the user or the system, set a size callback.\n\n@code\nglfwSetFramebufferSizeCallback(window, framebuffer_size_callback);\n@endcode\n\nThe callback function receives the new size of the framebuffer when it is\nresized, which can for example be used to update the OpenGL viewport.\n\n@code\nvoid framebuffer_size_callback(GLFWwindow* window, int width, int height)\n{\n    glViewport(0, 0, width, height);\n}\n@endcode\n\nThere is also @ref glfwGetFramebufferSize for directly retrieving the current\nsize of the framebuffer of a window.\n\n@code\nint width, height;\nglfwGetFramebufferSize(window, &width, &height);\nglViewport(0, 0, width, height);\n@endcode\n\nThe size of a framebuffer may change independently of the size of a window, for\nexample if the window is dragged between a regular monitor and a high-DPI one.\n\n\n@subsection window_scale Window content scale\n\nThe content scale for a window can be retrieved with @ref\nglfwGetWindowContentScale.\n\n@code\nfloat xscale, yscale;\nglfwGetWindowContentScale(window, &xscale, &yscale);\n@endcode\n\nThe content scale is the ratio between the current DPI and the platform's\ndefault DPI.  This is especially important for text and any UI elements.  If the\npixel dimensions of your UI scaled by this look appropriate on your machine then\nit should appear at a reasonable size on other machines regardless of their DPI\nand scaling settings.  This relies on the system DPI and scaling settings being\nsomewhat correct.\n\nOn systems where each monitors can have its own content scale, the window\ncontent scale will depend on which monitor the system considers the window to be\non.\n\nIf you wish to be notified when the content scale of a window changes, whether\nbecause of a system setting change or because it was moved to a monitor with\na different scale, set a content scale callback.\n\n@code\nglfwSetWindowContentScaleCallback(window, window_content_scale_callback);\n@endcode\n\nThe callback function receives the new content scale of the window.\n\n@code\nvoid window_content_scale_callback(GLFWwindow* window, float xscale, float yscale)\n{\n    set_interface_scale(xscale, yscale);\n}\n@endcode\n\nOn platforms where pixels and screen coordinates always map 1:1, the window\nwill need to be resized to appear the same size when it is moved to a monitor\nwith a different content scale.  To have this done automatically both when the\nwindow is created and when its content scale later changes, set the @ref\nGLFW_SCALE_TO_MONITOR window hint.\n\n\n@subsection window_sizelimits Window size limits\n\nThe minimum and maximum size of the content area of a windowed mode window can\nbe enforced with @ref glfwSetWindowSizeLimits.  The user may resize the window\nto any size and aspect ratio within the specified limits, unless the aspect\nratio is also set.\n\n@code\nglfwSetWindowSizeLimits(window, 200, 200, 400, 400);\n@endcode\n\nTo specify only a minimum size or only a maximum one, set the other pair to\n`GLFW_DONT_CARE`.\n\n@code\nglfwSetWindowSizeLimits(window, 640, 480, GLFW_DONT_CARE, GLFW_DONT_CARE);\n@endcode\n\nTo disable size limits for a window, set them all to `GLFW_DONT_CARE`.\n\nThe aspect ratio of the content area of a windowed mode window can be enforced\nwith @ref glfwSetWindowAspectRatio.  The user may resize the window freely\nunless size limits are also set, but the size will be constrained to maintain\nthe aspect ratio.\n\n@code\nglfwSetWindowAspectRatio(window, 16, 9);\n@endcode\n\nThe aspect ratio is specified as a numerator and denominator, corresponding to\nthe width and height, respectively.  If you want a window to maintain its\ncurrent aspect ratio, use its current size as the ratio.\n\n@code\nint width, height;\nglfwGetWindowSize(window, &width, &height);\nglfwSetWindowAspectRatio(window, width, height);\n@endcode\n\nTo disable the aspect ratio limit for a window, set both terms to\n`GLFW_DONT_CARE`.\n\nYou can have both size limits and aspect ratio set for a window, but the results\nare undefined if they conflict.\n\n\n@subsection window_pos Window position\n\nThe position of a windowed-mode window can be changed with @ref\nglfwSetWindowPos.  This moves the window so that the upper-left corner of its\ncontent area has the specified [screen coordinates](@ref coordinate_systems).\nThe window system may put limitations on window placement.\n\n@code\nglfwSetWindowPos(window, 100, 100);\n@endcode\n\nIf you wish to be notified when a window is moved, whether by the user, the\nsystem or your own code, set a position callback.\n\n@code\nglfwSetWindowPosCallback(window, window_pos_callback);\n@endcode\n\nThe callback function receives the new position, in screen coordinates, of the\nupper-left corner of the content area when the window is moved.\n\n@code\nvoid window_pos_callback(GLFWwindow* window, int xpos, int ypos)\n{\n}\n@endcode\n\nThere is also @ref glfwGetWindowPos for directly retrieving the current position\nof the content area of the window.\n\n@code\nint xpos, ypos;\nglfwGetWindowPos(window, &xpos, &ypos);\n@endcode\n\n\n@subsection window_title Window title\n\nAll GLFW windows have a title, although undecorated or full screen windows may\nnot display it or only display it in a task bar or similar interface.  You can\nset a UTF-8 encoded window title with @ref glfwSetWindowTitle.\n\n@code\nglfwSetWindowTitle(window, \"My Window\");\n@endcode\n\nThe specified string is copied before the function returns, so there is no need\nto keep it around.\n\nAs long as your source file is encoded as UTF-8, you can use any Unicode\ncharacters directly in the source.\n\n@code\nglfwSetWindowTitle(window, \"ラストエグザイル\");\n@endcode\n\nIf you are using C++11 or C11, you can use a UTF-8 string literal.\n\n@code\nglfwSetWindowTitle(window, u8\"This is always a UTF-8 string\");\n@endcode\n\n\n@subsection window_icon Window icon\n\nDecorated windows have icons on some platforms.  You can set this icon by\nspecifying a list of candidate images with @ref glfwSetWindowIcon.\n\n@code\nGLFWimage images[2];\nimages[0] = load_icon(\"my_icon.png\");\nimages[1] = load_icon(\"my_icon_small.png\");\n\nglfwSetWindowIcon(window, 2, images);\n@endcode\n\nThe image data is 32-bit, little-endian, non-premultiplied RGBA, i.e. eight bits\nper channel with the red channel first.  The pixels are arranged canonically as\nsequential rows, starting from the top-left corner.\n\nTo revert to the default window icon, pass in an empty image array.\n\n@code\nglfwSetWindowIcon(window, 0, NULL);\n@endcode\n\n\n@subsection window_monitor Window monitor\n\nFull screen windows are associated with a specific monitor.  You can get the\nhandle for this monitor with @ref glfwGetWindowMonitor.\n\n@code\nGLFWmonitor* monitor = glfwGetWindowMonitor(window);\n@endcode\n\nThis monitor handle is one of those returned by @ref glfwGetMonitors.\n\nFor windowed mode windows, this function returns `NULL`.  This is how to tell\nfull screen windows from windowed mode windows.\n\nYou can move windows between monitors or between full screen and windowed mode\nwith @ref glfwSetWindowMonitor.  When making a window full screen on the same or\non a different monitor, specify the desired monitor, resolution and refresh\nrate.  The position arguments are ignored.\n\n@code\nconst GLFWvidmode* mode = glfwGetVideoMode(monitor);\n\nglfwSetWindowMonitor(window, monitor, 0, 0, mode->width, mode->height, mode->refreshRate);\n@endcode\n\nWhen making the window windowed, specify the desired position and size.  The\nrefresh rate argument is ignored.\n\n@code\nglfwSetWindowMonitor(window, NULL, xpos, ypos, width, height, 0);\n@endcode\n\nThis restores any previous window settings such as whether it is decorated,\nfloating, resizable, has size or aspect ratio limits, etc..  To restore a window\nthat was originally windowed to its original size and position, save these\nbefore making it full screen and then pass them in as above.\n\n\n@subsection window_iconify Window iconification\n\nWindows can be iconified (i.e. minimized) with @ref glfwIconifyWindow.\n\n@code\nglfwIconifyWindow(window);\n@endcode\n\nWhen a full screen window is iconified, the original video mode of its monitor\nis restored until the user or application restores the window.\n\nIconified windows can be restored with @ref glfwRestoreWindow.  This function\nalso restores windows from maximization.\n\n@code\nglfwRestoreWindow(window);\n@endcode\n\nWhen a full screen window is restored, the desired video mode is restored to its\nmonitor as well.\n\nIf you wish to be notified when a window is iconified or restored, whether by\nthe user, system or your own code, set an iconify callback.\n\n@code\nglfwSetWindowIconifyCallback(window, window_iconify_callback);\n@endcode\n\nThe callback function receives changes in the iconification state of the window.\n\n@code\nvoid window_iconify_callback(GLFWwindow* window, int iconified)\n{\n    if (iconified)\n    {\n        // The window was iconified\n    }\n    else\n    {\n        // The window was restored\n    }\n}\n@endcode\n\nYou can also get the current iconification state with @ref glfwGetWindowAttrib.\n\n@code\nint iconified = glfwGetWindowAttrib(window, GLFW_ICONIFIED);\n@endcode\n\n\n@subsection window_maximize Window maximization\n\nWindows can be maximized (i.e. zoomed) with @ref glfwMaximizeWindow.\n\n@code\nglfwMaximizeWindow(window);\n@endcode\n\nFull screen windows cannot be maximized and passing a full screen window to this\nfunction does nothing.\n\nMaximized windows can be restored with @ref glfwRestoreWindow.  This function\nalso restores windows from iconification.\n\n@code\nglfwRestoreWindow(window);\n@endcode\n\nIf you wish to be notified when a window is maximized or restored, whether by\nthe user, system or your own code, set a maximize callback.\n\n@code\nglfwSetWindowMaximizeCallback(window, window_maximize_callback);\n@endcode\n\nThe callback function receives changes in the maximization state of the window.\n\n@code\nvoid window_maximize_callback(GLFWwindow* window, int maximized)\n{\n    if (maximized)\n    {\n        // The window was maximized\n    }\n    else\n    {\n        // The window was restored\n    }\n}\n@endcode\n\nYou can also get the current maximization state with @ref glfwGetWindowAttrib.\n\n@code\nint maximized = glfwGetWindowAttrib(window, GLFW_MAXIMIZED);\n@endcode\n\nBy default, newly created windows are not maximized.  You can change this\nbehavior by setting the [GLFW_MAXIMIZED](@ref GLFW_MAXIMIZED_hint) window hint\nbefore creating the window.\n\n@code\nglfwWindowHint(GLFW_MAXIMIZED, GLFW_TRUE);\n@endcode\n\n\n@subsection window_hide Window visibility\n\nWindowed mode windows can be hidden with @ref glfwHideWindow.\n\n@code\nglfwHideWindow(window);\n@endcode\n\nThis makes the window completely invisible to the user, including removing it\nfrom the task bar, dock or window list.  Full screen windows cannot be hidden\nand calling @ref glfwHideWindow on a full screen window does nothing.\n\nHidden windows can be shown with @ref glfwShowWindow.\n\n@code\nglfwShowWindow(window);\n@endcode\n\nBy default, this function will also set the input focus to that window. Set\nthe [GLFW_FOCUS_ON_SHOW](@ref GLFW_FOCUS_ON_SHOW_hint) window hint to change\nthis behavior for all newly created windows, or change the behavior for an\nexisting window with @ref glfwSetWindowAttrib.\n\nYou can also get the current visibility state with @ref glfwGetWindowAttrib.\n\n@code\nint visible = glfwGetWindowAttrib(window, GLFW_VISIBLE);\n@endcode\n\nBy default, newly created windows are visible.  You can change this behavior by\nsetting the [GLFW_VISIBLE](@ref GLFW_VISIBLE_hint) window hint before creating\nthe window.\n\n@code\nglfwWindowHint(GLFW_VISIBLE, GLFW_FALSE);\n@endcode\n\nWindows created hidden are completely invisible to the user until shown.  This\ncan be useful if you need to set up your window further before showing it, for\nexample moving it to a specific location.\n\n\n@subsection window_focus Window input focus\n\nWindows can be given input focus and brought to the front with @ref\nglfwFocusWindow.\n\n@code\nglfwFocusWindow(window);\n@endcode\n\nKeep in mind that it can be very disruptive to the user when a window is forced\nto the top.  For a less disruptive way of getting the user's attention, see\n[attention requests](@ref window_attention).\n\nIf you wish to be notified when a window gains or loses input focus, whether by\nthe user, system or your own code, set a focus callback.\n\n@code\nglfwSetWindowFocusCallback(window, window_focus_callback);\n@endcode\n\nThe callback function receives changes in the input focus state of the window.\n\n@code\nvoid window_focus_callback(GLFWwindow* window, int focused)\n{\n    if (focused)\n    {\n        // The window gained input focus\n    }\n    else\n    {\n        // The window lost input focus\n    }\n}\n@endcode\n\nYou can also get the current input focus state with @ref glfwGetWindowAttrib.\n\n@code\nint focused = glfwGetWindowAttrib(window, GLFW_FOCUSED);\n@endcode\n\nBy default, newly created windows are given input focus.  You can change this\nbehavior by setting the [GLFW_FOCUSED](@ref GLFW_FOCUSED_hint) window hint\nbefore creating the window.\n\n@code\nglfwWindowHint(GLFW_FOCUSED, GLFW_FALSE);\n@endcode\n\n\n@subsection window_attention Window attention request\n\nIf you wish to notify the user of an event without interrupting, you can request\nattention with @ref glfwRequestWindowAttention.\n\n@code\nglfwRequestWindowAttention(window);\n@endcode\n\nThe system will highlight the specified window, or on platforms where this is\nnot supported, the application as a whole.  Once the user has given it\nattention, the system will automatically end the request.\n\n\n@subsection window_refresh Window damage and refresh\n\nIf you wish to be notified when the contents of a window is damaged and needs\nto be refreshed, set a window refresh callback.\n\n@code\nglfwSetWindowRefreshCallback(m_handle, window_refresh_callback);\n@endcode\n\nThe callback function is called when the contents of the window needs to be\nrefreshed.\n\n@code\nvoid window_refresh_callback(GLFWwindow* window)\n{\n    draw_editor_ui(window);\n    glfwSwapBuffers(window);\n}\n@endcode\n\n@note On compositing window systems such as Aero, Compiz or Aqua, where the\nwindow contents are saved off-screen, this callback might only be called when\nthe window or framebuffer is resized.\n\n\n@subsection window_transparency Window transparency\n\nGLFW supports two kinds of transparency for windows; framebuffer transparency\nand whole window transparency.  A single window may not use both methods.  The\nresults of doing this are undefined.\n\nBoth methods require the platform to support it and not every version of every\nplatform GLFW supports does this, so there are mechanisms to check whether the\nwindow really is transparent.\n\nWindow framebuffers can be made transparent on a per-pixel per-frame basis with\nthe [GLFW_TRANSPARENT_FRAMEBUFFER](@ref GLFW_TRANSPARENT_FRAMEBUFFER_hint)\nwindow hint.\n\n@code\nglfwWindowHint(GLFW_TRANSPARENT_FRAMEBUFFER, GLFW_TRUE);\n@endcode\n\nIf supported by the system, the window content area will be composited with the\nbackground using the framebuffer per-pixel alpha channel.  This requires desktop\ncompositing to be enabled on the system.  It does not affect window decorations.\n\nYou can check whether the window framebuffer was successfully made transparent\nwith the\n[GLFW_TRANSPARENT_FRAMEBUFFER](@ref GLFW_TRANSPARENT_FRAMEBUFFER_attrib)\nwindow attribute.\n\n@code\nif (glfwGetWindowAttrib(window, GLFW_TRANSPARENT_FRAMEBUFFER))\n{\n    // window framebuffer is currently transparent\n}\n@endcode\n\nGLFW comes with an example that enabled framebuffer transparency called `gears`.\n\nThe opacity of the whole window, including any decorations, can be set with @ref\nglfwSetWindowOpacity.\n\n@code\nglfwSetWindowOpacity(window, 0.5f);\n@endcode\n\nThe opacity (or alpha) value is a positive finite number between zero and one,\nwhere 0 (zero) is fully transparent and 1 (one) is fully opaque.  The initial\nopacity value for newly created windows is 1.\n\nThe current opacity of a window can be queried with @ref glfwGetWindowOpacity.\n\n@code\nfloat opacity = glfwGetWindowOpacity(window);\n@endcode\n\nIf the system does not support whole window transparency, this function always\nreturns one.\n\nGLFW comes with a test program that lets you control whole window transparency\nat run-time called `opacity`.\n\n\n@subsection window_attribs Window attributes\n\nWindows have a number of attributes that can be returned using @ref\nglfwGetWindowAttrib.  Some reflect state that may change as a result of user\ninteraction, (e.g. whether it has input focus), while others reflect inherent\nproperties of the window (e.g. what kind of border it has).  Some are related to\nthe window and others to its OpenGL or OpenGL ES context.\n\n@code\nif (glfwGetWindowAttrib(window, GLFW_FOCUSED))\n{\n    // window has input focus\n}\n@endcode\n\nThe [GLFW_DECORATED](@ref GLFW_DECORATED_attrib),\n[GLFW_RESIZABLE](@ref GLFW_RESIZABLE_attrib),\n[GLFW_FLOATING](@ref GLFW_FLOATING_attrib),\n[GLFW_AUTO_ICONIFY](@ref GLFW_AUTO_ICONIFY_attrib) and\n[GLFW_FOCUS_ON_SHOW](@ref GLFW_FOCUS_ON_SHOW_attrib) window attributes can be\nchanged with @ref glfwSetWindowAttrib.\n\n@code\nglfwSetWindowAttrib(window, GLFW_RESIZABLE, GLFW_FALSE);\n@endcode\n\n\n\n@subsubsection window_attribs_wnd Window related attributes\n\n@anchor GLFW_FOCUSED_attrib\n__GLFW_FOCUSED__ indicates whether the specified window has input focus.  See\n@ref window_focus for details.\n\n@anchor GLFW_ICONIFIED_attrib\n__GLFW_ICONIFIED__ indicates whether the specified window is iconified.\nSee @ref window_iconify for details.\n\n@anchor GLFW_MAXIMIZED_attrib\n__GLFW_MAXIMIZED__ indicates whether the specified window is maximized.  See\n@ref window_maximize for details.\n\n@anchor GLFW_HOVERED_attrib\n__GLFW_HOVERED__ indicates whether the cursor is currently directly over the\ncontent area of the window, with no other windows between.  See @ref\ncursor_enter for details.\n\n@anchor GLFW_VISIBLE_attrib\n__GLFW_VISIBLE__ indicates whether the specified window is visible.  See @ref\nwindow_hide for details.\n\n@anchor GLFW_RESIZABLE_attrib\n__GLFW_RESIZABLE__ indicates whether the specified window is resizable _by the\nuser_.  This can be set before creation with the\n[GLFW_RESIZABLE](@ref GLFW_RESIZABLE_hint) window hint or after with @ref\nglfwSetWindowAttrib.\n\n@anchor GLFW_DECORATED_attrib\n__GLFW_DECORATED__ indicates whether the specified window has decorations such\nas a border, a close widget, etc.  This can be set before creation with the\n[GLFW_DECORATED](@ref GLFW_DECORATED_hint) window hint or after with @ref\nglfwSetWindowAttrib.\n\n@anchor GLFW_AUTO_ICONIFY_attrib\n__GLFW_AUTO_ICONIFY__ indicates whether the specified full screen window is\niconified on focus loss, a close widget, etc.  This can be set before creation\nwith the [GLFW_AUTO_ICONIFY](@ref GLFW_AUTO_ICONIFY_hint) window hint or after\nwith @ref glfwSetWindowAttrib.\n\n@anchor GLFW_FLOATING_attrib\n__GLFW_FLOATING__ indicates whether the specified window is floating, also\ncalled topmost or always-on-top.  This can be set before creation with the\n[GLFW_FLOATING](@ref GLFW_FLOATING_hint) window hint or after with @ref\nglfwSetWindowAttrib.\n\n@anchor GLFW_TRANSPARENT_FRAMEBUFFER_attrib\n__GLFW_TRANSPARENT_FRAMEBUFFER__ indicates whether the specified window has\na transparent framebuffer, i.e. the window contents is composited with the\nbackground using the window framebuffer alpha channel.  See @ref\nwindow_transparency for details.\n\n@anchor GLFW_FOCUS_ON_SHOW_attrib\n__GLFW_FOCUS_ON_SHOW__ specifies whether the window will be given input\nfocus when @ref glfwShowWindow is called. This can be set before creation\nwith the [GLFW_FOCUS_ON_SHOW](@ref GLFW_FOCUS_ON_SHOW_hint) window hint or\nafter with @ref glfwSetWindowAttrib.\n\n@subsubsection window_attribs_ctx Context related attributes\n\n@anchor GLFW_CLIENT_API_attrib\n__GLFW_CLIENT_API__ indicates the client API provided by the window's context;\neither `GLFW_OPENGL_API`, `GLFW_OPENGL_ES_API` or `GLFW_NO_API`.\n\n@anchor GLFW_CONTEXT_CREATION_API_attrib\n__GLFW_CONTEXT_CREATION_API__ indicates the context creation API used to create\nthe window's context; either `GLFW_NATIVE_CONTEXT_API`, `GLFW_EGL_CONTEXT_API`\nor `GLFW_OSMESA_CONTEXT_API`.\n\n@anchor GLFW_CONTEXT_VERSION_MAJOR_attrib\n@anchor GLFW_CONTEXT_VERSION_MINOR_attrib\n@anchor GLFW_CONTEXT_REVISION_attrib\n__GLFW_CONTEXT_VERSION_MAJOR__, __GLFW_CONTEXT_VERSION_MINOR__ and\n__GLFW_CONTEXT_REVISION__ indicate the client API version of the window's\ncontext.\n\n@note Do not confuse these attributes with `GLFW_VERSION_MAJOR`,\n`GLFW_VERSION_MINOR` and `GLFW_VERSION_REVISION` which provide the API version\nof the GLFW header.\n\n@anchor GLFW_OPENGL_FORWARD_COMPAT_attrib\n__GLFW_OPENGL_FORWARD_COMPAT__ is `GLFW_TRUE` if the window's context is an\nOpenGL forward-compatible one, or `GLFW_FALSE` otherwise.\n\n@anchor GLFW_OPENGL_DEBUG_CONTEXT_attrib\n__GLFW_OPENGL_DEBUG_CONTEXT__ is `GLFW_TRUE` if the window's context is an\nOpenGL debug context, or `GLFW_FALSE` otherwise.\n\n@anchor GLFW_OPENGL_PROFILE_attrib\n__GLFW_OPENGL_PROFILE__ indicates the OpenGL profile used by the context.  This\nis `GLFW_OPENGL_CORE_PROFILE` or `GLFW_OPENGL_COMPAT_PROFILE` if the context\nuses a known profile, or `GLFW_OPENGL_ANY_PROFILE` if the OpenGL profile is\nunknown or the context is an OpenGL ES context.  Note that the returned profile\nmay not match the profile bits of the context flags, as GLFW will try other\nmeans of detecting the profile when no bits are set.\n\n@anchor GLFW_CONTEXT_RELEASE_BEHAVIOR_attrib\n__GLFW_CONTEXT_RELEASE_BEHAVIOR__ indicates the release used by the context.\nPossible values are one of `GLFW_ANY_RELEASE_BEHAVIOR`,\n`GLFW_RELEASE_BEHAVIOR_FLUSH` or `GLFW_RELEASE_BEHAVIOR_NONE`.  If the\nbehavior is `GLFW_ANY_RELEASE_BEHAVIOR`, the default behavior of the context\ncreation API will be used.  If the behavior is `GLFW_RELEASE_BEHAVIOR_FLUSH`,\nthe pipeline will be flushed whenever the context is released from being the\ncurrent one.  If the behavior is `GLFW_RELEASE_BEHAVIOR_NONE`, the pipeline will\nnot be flushed on release.\n\n@anchor GLFW_CONTEXT_NO_ERROR_attrib\n__GLFW_CONTEXT_NO_ERROR__ indicates whether errors are generated by the context.\nPossible values are `GLFW_TRUE` and `GLFW_FALSE`.  If enabled, situations that\nwould have generated errors instead cause undefined behavior.\n\n@anchor GLFW_CONTEXT_ROBUSTNESS_attrib\n__GLFW_CONTEXT_ROBUSTNESS__ indicates the robustness strategy used by the\ncontext.  This is `GLFW_LOSE_CONTEXT_ON_RESET` or `GLFW_NO_RESET_NOTIFICATION`\nif the window's context supports robustness, or `GLFW_NO_ROBUSTNESS` otherwise.\n\n\n@subsubsection window_attribs_fb Framebuffer related attributes\n\nGLFW does not expose attributes of the default framebuffer (i.e. the framebuffer\nattached to the window) as these can be queried directly with either OpenGL,\nOpenGL ES or Vulkan.\n\nIf you are using version 3.0 or later of OpenGL or OpenGL ES, the\n`glGetFramebufferAttachmentParameteriv` function can be used to retrieve the\nnumber of bits for the red, green, blue, alpha, depth and stencil buffer\nchannels.  Otherwise, the `glGetIntegerv` function can be used.\n\nThe number of MSAA samples are always retrieved with `glGetIntegerv`.  For\ncontexts supporting framebuffer objects, the number of samples of the currently\nbound framebuffer is returned.\n\nAttribute    | glGetIntegerv     | glGetFramebufferAttachmentParameteriv\n------------ | ----------------- | -------------------------------------\nRed bits     | `GL_RED_BITS`     | `GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE`\nGreen bits   | `GL_GREEN_BITS`   | `GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE`\nBlue bits    | `GL_BLUE_BITS`    | `GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE`\nAlpha bits   | `GL_ALPHA_BITS`   | `GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE`\nDepth bits   | `GL_DEPTH_BITS`   | `GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE`\nStencil bits | `GL_STENCIL_BITS` | `GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE`\nMSAA samples | `GL_SAMPLES`      | _Not provided by this function_\n\nWhen calling `glGetFramebufferAttachmentParameteriv`, the red, green, blue and\nalpha sizes are queried from the `GL_BACK_LEFT`, while the depth and stencil\nsizes are queried from the `GL_DEPTH` and `GL_STENCIL` attachments,\nrespectively.\n\n\n@section buffer_swap Buffer swapping\n\nGLFW windows are by default double buffered.  That means that you have two\nrendering buffers; a front buffer and a back buffer.  The front buffer is\nthe one being displayed and the back buffer the one you render to.\n\nWhen the entire frame has been rendered, it is time to swap the back and the\nfront buffers in order to display what has been rendered and begin rendering\na new frame.  This is done with @ref glfwSwapBuffers.\n\n@code\nglfwSwapBuffers(window);\n@endcode\n\nSometimes it can be useful to select when the buffer swap will occur.  With the\nfunction @ref glfwSwapInterval it is possible to select the minimum number of\nmonitor refreshes the driver should wait from the time @ref glfwSwapBuffers was\ncalled before swapping the buffers:\n\n@code\nglfwSwapInterval(1);\n@endcode\n\nIf the interval is zero, the swap will take place immediately when @ref\nglfwSwapBuffers is called without waiting for a refresh.  Otherwise at least\ninterval retraces will pass between each buffer swap.  Using a swap interval of\nzero can be useful for benchmarking purposes, when it is not desirable to\nmeasure the time it takes to wait for the vertical retrace.  However, a swap\ninterval of one lets you avoid tearing.\n\nNote that this may not work on all machines, as some drivers have\nuser-controlled settings that override any swap interval the application\nrequests.\n\nA context that supports either the `WGL_EXT_swap_control_tear` or the\n`GLX_EXT_swap_control_tear` extension also accepts _negative_ swap intervals,\nwhich allows the driver to swap immediately even if a frame arrives a little bit\nlate.  This trades the risk of visible tears for greater framerate stability.\nYou can check for these extensions with @ref glfwExtensionSupported.\n\n*/\n"
  },
  {
    "path": "thirdparty/glfw/examples/CMakeLists.txt",
    "content": "\nlink_libraries(glfw)\n\ninclude_directories(\"${GLFW_SOURCE_DIR}/deps\")\n\nif (MATH_LIBRARY)\n    link_libraries(\"${MATH_LIBRARY}\")\nendif()\n\nif (MSVC)\n    add_definitions(-D_CRT_SECURE_NO_WARNINGS)\nendif()\n\nif (WIN32)\n    set(ICON glfw.rc)\nelseif (APPLE)\n    set(ICON glfw.icns)\nendif()\n\nif (${CMAKE_VERSION} VERSION_EQUAL \"3.1.0\" OR\n    ${CMAKE_VERSION} VERSION_GREATER \"3.1.0\")\n    set(CMAKE_C_STANDARD 99)\nelse()\n    # Remove this fallback when removing support for CMake version less than 3.1\n    add_compile_options(\"$<$<C_COMPILER_ID:AppleClang>:-std=c99>\"\n                        \"$<$<C_COMPILER_ID:Clang>:-std=c99>\"\n                        \"$<$<C_COMPILER_ID:GNU>:-std=c99>\")\n\nendif()\n\nset(GLAD_GL \"${GLFW_SOURCE_DIR}/deps/glad/gl.h\"\n            \"${GLFW_SOURCE_DIR}/deps/glad_gl.c\")\nset(GETOPT \"${GLFW_SOURCE_DIR}/deps/getopt.h\"\n           \"${GLFW_SOURCE_DIR}/deps/getopt.c\")\nset(TINYCTHREAD \"${GLFW_SOURCE_DIR}/deps/tinycthread.h\"\n                \"${GLFW_SOURCE_DIR}/deps/tinycthread.c\")\n\nadd_executable(boing WIN32 MACOSX_BUNDLE boing.c ${ICON} ${GLAD_GL})\nadd_executable(gears WIN32 MACOSX_BUNDLE gears.c ${ICON} ${GLAD_GL})\nadd_executable(heightmap WIN32 MACOSX_BUNDLE heightmap.c ${ICON} ${GLAD_GL})\nadd_executable(offscreen offscreen.c ${ICON} ${GLAD_GL})\nadd_executable(particles WIN32 MACOSX_BUNDLE particles.c ${ICON} ${TINYCTHREAD} ${GETOPT} ${GLAD_GL})\nadd_executable(sharing WIN32 MACOSX_BUNDLE sharing.c ${ICON} ${GLAD_GL})\nadd_executable(simple WIN32 MACOSX_BUNDLE simple.c ${ICON} ${GLAD_GL})\nadd_executable(splitview WIN32 MACOSX_BUNDLE splitview.c ${ICON} ${GLAD_GL})\nadd_executable(wave WIN32 MACOSX_BUNDLE wave.c ${ICON} ${GLAD_GL})\n\ntarget_link_libraries(particles \"${CMAKE_THREAD_LIBS_INIT}\")\nif (RT_LIBRARY)\n    target_link_libraries(particles \"${RT_LIBRARY}\")\nendif()\n\nset(GUI_ONLY_BINARIES boing gears heightmap particles sharing simple splitview\n    wave)\nset(CONSOLE_BINARIES offscreen)\n\nset_target_properties(${GUI_ONLY_BINARIES} ${CONSOLE_BINARIES} PROPERTIES\n                      FOLDER \"GLFW3/Examples\")\n\nif (GLFW_USE_OSMESA)\n    target_compile_definitions(offscreen PRIVATE USE_NATIVE_OSMESA)\nendif()\n\nif (MSVC)\n    # Tell MSVC to use main instead of WinMain for Windows subsystem executables\n    set_target_properties(${GUI_ONLY_BINARIES} PROPERTIES\n                          LINK_FLAGS \"/ENTRY:mainCRTStartup\")\nendif()\n\nif (APPLE)\n    set_target_properties(boing PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME \"Boing\")\n    set_target_properties(gears PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME \"Gears\")\n    set_target_properties(heightmap PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME \"Heightmap\")\n    set_target_properties(particles PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME \"Particles\")\n    set_target_properties(sharing PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME \"Sharing\")\n    set_target_properties(simple PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME \"Simple\")\n    set_target_properties(splitview PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME \"SplitView\")\n    set_target_properties(wave PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME \"Wave\")\n\n    set_source_files_properties(glfw.icns PROPERTIES\n                                MACOSX_PACKAGE_LOCATION \"Resources\")\n    set_target_properties(${GUI_ONLY_BINARIES} PROPERTIES\n                          MACOSX_BUNDLE_SHORT_VERSION_STRING ${GLFW_VERSION}\n                          MACOSX_BUNDLE_LONG_VERSION_STRING ${GLFW_VERSION}\n                          MACOSX_BUNDLE_ICON_FILE glfw.icns\n                          MACOSX_BUNDLE_INFO_PLIST \"${GLFW_SOURCE_DIR}/CMake/MacOSXBundleInfo.plist.in\")\nendif()\n\n"
  },
  {
    "path": "thirdparty/glfw/examples/boing.c",
    "content": "/*****************************************************************************\n * Title:   GLBoing\n * Desc:    Tribute to Amiga Boing.\n * Author:  Jim Brooks  <gfx@jimbrooks.org>\n *          Original Amiga authors were R.J. Mical and Dale Luck.\n *          GLFW conversion by Marcus Geelnard\n * Notes:   - 360' = 2*PI [radian]\n *\n *          - Distances between objects are created by doing a relative\n *            Z translations.\n *\n *          - Although OpenGL enticingly supports alpha-blending,\n *            the shadow of the original Boing didn't affect the color\n *            of the grid.\n *\n *          - [Marcus] Changed timing scheme from interval driven to frame-\n *            time based animation steps (which results in much smoother\n *            movement)\n *\n * History of Amiga Boing:\n *\n * Boing was demonstrated on the prototype Amiga (codenamed \"Lorraine\") in\n * 1985. According to legend, it was written ad-hoc in one night by\n * R. J. Mical and Dale Luck. Because the bouncing ball animation was so fast\n * and smooth, attendees did not believe the Amiga prototype was really doing\n * the rendering. Suspecting a trick, they began looking around the booth for\n * a hidden computer or VCR.\n *****************************************************************************/\n\n#if defined(_MSC_VER)\n // Make MS math.h define M_PI\n #define _USE_MATH_DEFINES\n#endif\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <math.h>\n\n#include <glad/gl.h>\n#define GLFW_INCLUDE_NONE\n#include <GLFW/glfw3.h>\n\n#include <linmath.h>\n\n\n/*****************************************************************************\n * Various declarations and macros\n *****************************************************************************/\n\n/* Prototypes */\nvoid init( void );\nvoid display( void );\nvoid reshape( GLFWwindow* window, int w, int h );\nvoid key_callback( GLFWwindow* window, int key, int scancode, int action, int mods );\nvoid mouse_button_callback( GLFWwindow* window, int button, int action, int mods );\nvoid cursor_position_callback( GLFWwindow* window, double x, double y );\nvoid DrawBoingBall( void );\nvoid BounceBall( double dt );\nvoid DrawBoingBallBand( GLfloat long_lo, GLfloat long_hi );\nvoid DrawGrid( void );\n\n#define RADIUS           70.f\n#define STEP_LONGITUDE   22.5f                   /* 22.5 makes 8 bands like original Boing */\n#define STEP_LATITUDE    22.5f\n\n#define DIST_BALL       (RADIUS * 2.f + RADIUS * 0.1f)\n\n#define VIEW_SCENE_DIST (DIST_BALL * 3.f + 200.f)/* distance from viewer to middle of boing area */\n#define GRID_SIZE       (RADIUS * 4.5f)          /* length (width) of grid */\n#define BOUNCE_HEIGHT   (RADIUS * 2.1f)\n#define BOUNCE_WIDTH    (RADIUS * 2.1f)\n\n#define SHADOW_OFFSET_X -20.f\n#define SHADOW_OFFSET_Y  10.f\n#define SHADOW_OFFSET_Z   0.f\n\n#define WALL_L_OFFSET   0.f\n#define WALL_R_OFFSET   5.f\n\n/* Animation speed (50.0 mimics the original GLUT demo speed) */\n#define ANIMATION_SPEED 50.f\n\n/* Maximum allowed delta time per physics iteration */\n#define MAX_DELTA_T 0.02f\n\n/* Draw ball, or its shadow */\ntypedef enum { DRAW_BALL, DRAW_BALL_SHADOW } DRAW_BALL_ENUM;\n\n/* Vertex type */\ntypedef struct {float x; float y; float z;} vertex_t;\n\n/* Global vars */\nint windowed_xpos, windowed_ypos, windowed_width, windowed_height;\nint width, height;\nGLfloat deg_rot_y       = 0.f;\nGLfloat deg_rot_y_inc   = 2.f;\nint override_pos        = GLFW_FALSE;\nGLfloat cursor_x        = 0.f;\nGLfloat cursor_y        = 0.f;\nGLfloat ball_x          = -RADIUS;\nGLfloat ball_y          = -RADIUS;\nGLfloat ball_x_inc      = 1.f;\nGLfloat ball_y_inc      = 2.f;\nDRAW_BALL_ENUM drawBallHow;\ndouble  t;\ndouble  t_old = 0.f;\ndouble  dt;\n\n/* Random number generator */\n#ifndef RAND_MAX\n #define RAND_MAX 4095\n#endif\n\n\n/*****************************************************************************\n * Truncate a degree.\n *****************************************************************************/\nGLfloat TruncateDeg( GLfloat deg )\n{\n   if ( deg >= 360.f )\n      return (deg - 360.f);\n   else\n      return deg;\n}\n\n/*****************************************************************************\n * Convert a degree (360-based) into a radian.\n * 360' = 2 * PI\n *****************************************************************************/\ndouble deg2rad( double deg )\n{\n   return deg / 360 * (2 * M_PI);\n}\n\n/*****************************************************************************\n * 360' sin().\n *****************************************************************************/\ndouble sin_deg( double deg )\n{\n   return sin( deg2rad( deg ) );\n}\n\n/*****************************************************************************\n * 360' cos().\n *****************************************************************************/\ndouble cos_deg( double deg )\n{\n   return cos( deg2rad( deg ) );\n}\n\n/*****************************************************************************\n * Compute a cross product (for a normal vector).\n *\n * c = a x b\n *****************************************************************************/\nvoid CrossProduct( vertex_t a, vertex_t b, vertex_t c, vertex_t *n )\n{\n   GLfloat u1, u2, u3;\n   GLfloat v1, v2, v3;\n\n   u1 = b.x - a.x;\n   u2 = b.y - a.y;\n   u3 = b.y - a.z;\n\n   v1 = c.x - a.x;\n   v2 = c.y - a.y;\n   v3 = c.z - a.z;\n\n   n->x = u2 * v3 - v2 * u3;\n   n->y = u3 * v1 - v3 * u1;\n   n->z = u1 * v2 - v1 * u2;\n}\n\n\n#define BOING_DEBUG 0\n\n\n/*****************************************************************************\n * init()\n *****************************************************************************/\nvoid init( void )\n{\n   /*\n    * Clear background.\n    */\n   glClearColor( 0.55f, 0.55f, 0.55f, 0.f );\n\n   glShadeModel( GL_FLAT );\n}\n\n\n/*****************************************************************************\n * display()\n *****************************************************************************/\nvoid display(void)\n{\n   glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );\n   glPushMatrix();\n\n   drawBallHow = DRAW_BALL_SHADOW;\n   DrawBoingBall();\n\n   DrawGrid();\n\n   drawBallHow = DRAW_BALL;\n   DrawBoingBall();\n\n   glPopMatrix();\n   glFlush();\n}\n\n\n/*****************************************************************************\n * reshape()\n *****************************************************************************/\nvoid reshape( GLFWwindow* window, int w, int h )\n{\n   mat4x4 projection, view;\n\n   glViewport( 0, 0, (GLsizei)w, (GLsizei)h );\n\n   glMatrixMode( GL_PROJECTION );\n   mat4x4_perspective( projection,\n                       2.f * (float) atan2( RADIUS, 200.f ),\n                       (float)w / (float)h,\n                       1.f, VIEW_SCENE_DIST );\n   glLoadMatrixf((const GLfloat*) projection);\n\n   glMatrixMode( GL_MODELVIEW );\n   {\n      vec3 eye = { 0.f, 0.f, VIEW_SCENE_DIST };\n      vec3 center = { 0.f, 0.f, 0.f };\n      vec3 up = { 0.f, -1.f, 0.f };\n      mat4x4_look_at( view, eye, center, up );\n   }\n   glLoadMatrixf((const GLfloat*) view);\n}\n\nvoid key_callback( GLFWwindow* window, int key, int scancode, int action, int mods )\n{\n    if (action != GLFW_PRESS)\n        return;\n\n    if (key == GLFW_KEY_ESCAPE && mods == 0)\n        glfwSetWindowShouldClose(window, GLFW_TRUE);\n    if ((key == GLFW_KEY_ENTER && mods == GLFW_MOD_ALT) ||\n        (key == GLFW_KEY_F11 && mods == GLFW_MOD_ALT))\n    {\n        if (glfwGetWindowMonitor(window))\n        {\n            glfwSetWindowMonitor(window, NULL,\n                                 windowed_xpos, windowed_ypos,\n                                 windowed_width, windowed_height, 0);\n        }\n        else\n        {\n            GLFWmonitor* monitor = glfwGetPrimaryMonitor();\n            if (monitor)\n            {\n                const GLFWvidmode* mode = glfwGetVideoMode(monitor);\n                glfwGetWindowPos(window, &windowed_xpos, &windowed_ypos);\n                glfwGetWindowSize(window, &windowed_width, &windowed_height);\n                glfwSetWindowMonitor(window, monitor, 0, 0, mode->width, mode->height, mode->refreshRate);\n            }\n        }\n    }\n}\n\nstatic void set_ball_pos ( GLfloat x, GLfloat y )\n{\n   ball_x = (width / 2) - x;\n   ball_y = y - (height / 2);\n}\n\nvoid mouse_button_callback( GLFWwindow* window, int button, int action, int mods )\n{\n   if (button != GLFW_MOUSE_BUTTON_LEFT)\n      return;\n\n   if (action == GLFW_PRESS)\n   {\n      override_pos = GLFW_TRUE;\n      set_ball_pos(cursor_x, cursor_y);\n   }\n   else\n   {\n      override_pos = GLFW_FALSE;\n   }\n}\n\nvoid cursor_position_callback( GLFWwindow* window, double x, double y )\n{\n   cursor_x = (float) x;\n   cursor_y = (float) y;\n\n   if ( override_pos )\n      set_ball_pos(cursor_x, cursor_y);\n}\n\n/*****************************************************************************\n * Draw the Boing ball.\n *\n * The Boing ball is sphere in which each facet is a rectangle.\n * Facet colors alternate between red and white.\n * The ball is built by stacking latitudinal circles.  Each circle is composed\n * of a widely-separated set of points, so that each facet is noticeably large.\n *****************************************************************************/\nvoid DrawBoingBall( void )\n{\n   GLfloat lon_deg;     /* degree of longitude */\n   double dt_total, dt2;\n\n   glPushMatrix();\n   glMatrixMode( GL_MODELVIEW );\n\n  /*\n   * Another relative Z translation to separate objects.\n   */\n   glTranslatef( 0.0, 0.0, DIST_BALL );\n\n   /* Update ball position and rotation (iterate if necessary) */\n   dt_total = dt;\n   while( dt_total > 0.0 )\n   {\n       dt2 = dt_total > MAX_DELTA_T ? MAX_DELTA_T : dt_total;\n       dt_total -= dt2;\n       BounceBall( dt2 );\n       deg_rot_y = TruncateDeg( deg_rot_y + deg_rot_y_inc*((float)dt2*ANIMATION_SPEED) );\n   }\n\n   /* Set ball position */\n   glTranslatef( ball_x, ball_y, 0.0 );\n\n  /*\n   * Offset the shadow.\n   */\n   if ( drawBallHow == DRAW_BALL_SHADOW )\n   {\n      glTranslatef( SHADOW_OFFSET_X,\n                    SHADOW_OFFSET_Y,\n                    SHADOW_OFFSET_Z );\n   }\n\n  /*\n   * Tilt the ball.\n   */\n   glRotatef( -20.0, 0.0, 0.0, 1.0 );\n\n  /*\n   * Continually rotate ball around Y axis.\n   */\n   glRotatef( deg_rot_y, 0.0, 1.0, 0.0 );\n\n  /*\n   * Set OpenGL state for Boing ball.\n   */\n   glCullFace( GL_FRONT );\n   glEnable( GL_CULL_FACE );\n   glEnable( GL_NORMALIZE );\n\n  /*\n   * Build a faceted latitude slice of the Boing ball,\n   * stepping same-sized vertical bands of the sphere.\n   */\n   for ( lon_deg = 0;\n         lon_deg < 180;\n         lon_deg += STEP_LONGITUDE )\n   {\n     /*\n      * Draw a latitude circle at this longitude.\n      */\n      DrawBoingBallBand( lon_deg,\n                         lon_deg + STEP_LONGITUDE );\n   }\n\n   glPopMatrix();\n\n   return;\n}\n\n\n/*****************************************************************************\n * Bounce the ball.\n *****************************************************************************/\nvoid BounceBall( double delta_t )\n{\n   GLfloat sign;\n   GLfloat deg;\n\n   if ( override_pos )\n     return;\n\n   /* Bounce on walls */\n   if ( ball_x >  (BOUNCE_WIDTH/2 + WALL_R_OFFSET ) )\n   {\n      ball_x_inc = -0.5f - 0.75f * (GLfloat)rand() / (GLfloat)RAND_MAX;\n      deg_rot_y_inc = -deg_rot_y_inc;\n   }\n   if ( ball_x < -(BOUNCE_HEIGHT/2 + WALL_L_OFFSET) )\n   {\n      ball_x_inc =  0.5f + 0.75f * (GLfloat)rand() / (GLfloat)RAND_MAX;\n      deg_rot_y_inc = -deg_rot_y_inc;\n   }\n\n   /* Bounce on floor / roof */\n   if ( ball_y >  BOUNCE_HEIGHT/2      )\n   {\n      ball_y_inc = -0.75f - 1.f * (GLfloat)rand() / (GLfloat)RAND_MAX;\n   }\n   if ( ball_y < -BOUNCE_HEIGHT/2*0.85 )\n   {\n      ball_y_inc =  0.75f + 1.f * (GLfloat)rand() / (GLfloat)RAND_MAX;\n   }\n\n   /* Update ball position */\n   ball_x += ball_x_inc * ((float)delta_t*ANIMATION_SPEED);\n   ball_y += ball_y_inc * ((float)delta_t*ANIMATION_SPEED);\n\n  /*\n   * Simulate the effects of gravity on Y movement.\n   */\n   if ( ball_y_inc < 0 ) sign = -1.0; else sign = 1.0;\n\n   deg = (ball_y + BOUNCE_HEIGHT/2) * 90 / BOUNCE_HEIGHT;\n   if ( deg > 80 ) deg = 80;\n   if ( deg < 10 ) deg = 10;\n\n   ball_y_inc = sign * 4.f * (float) sin_deg( deg );\n}\n\n\n/*****************************************************************************\n * Draw a faceted latitude band of the Boing ball.\n *\n * Parms:   long_lo, long_hi\n *          Low and high longitudes of slice, resp.\n *****************************************************************************/\nvoid DrawBoingBallBand( GLfloat long_lo,\n                        GLfloat long_hi )\n{\n   vertex_t vert_ne;            /* \"ne\" means south-east, so on */\n   vertex_t vert_nw;\n   vertex_t vert_sw;\n   vertex_t vert_se;\n   vertex_t vert_norm;\n   GLfloat  lat_deg;\n   static int colorToggle = 0;\n\n  /*\n   * Iterate through the points of a latitude circle.\n   * A latitude circle is a 2D set of X,Z points.\n   */\n   for ( lat_deg = 0;\n         lat_deg <= (360 - STEP_LATITUDE);\n         lat_deg += STEP_LATITUDE )\n   {\n     /*\n      * Color this polygon with red or white.\n      */\n      if ( colorToggle )\n         glColor3f( 0.8f, 0.1f, 0.1f );\n      else\n         glColor3f( 0.95f, 0.95f, 0.95f );\n#if 0\n      if ( lat_deg >= 180 )\n         if ( colorToggle )\n            glColor3f( 0.1f, 0.8f, 0.1f );\n         else\n            glColor3f( 0.5f, 0.5f, 0.95f );\n#endif\n      colorToggle = ! colorToggle;\n\n     /*\n      * Change color if drawing shadow.\n      */\n      if ( drawBallHow == DRAW_BALL_SHADOW )\n         glColor3f( 0.35f, 0.35f, 0.35f );\n\n     /*\n      * Assign each Y.\n      */\n      vert_ne.y = vert_nw.y = (float) cos_deg(long_hi) * RADIUS;\n      vert_sw.y = vert_se.y = (float) cos_deg(long_lo) * RADIUS;\n\n     /*\n      * Assign each X,Z with sin,cos values scaled by latitude radius indexed by longitude.\n      * Eg, long=0 and long=180 are at the poles, so zero scale is sin(longitude),\n      * while long=90 (sin(90)=1) is at equator.\n      */\n      vert_ne.x = (float) cos_deg( lat_deg                 ) * (RADIUS * (float) sin_deg( long_lo + STEP_LONGITUDE ));\n      vert_se.x = (float) cos_deg( lat_deg                 ) * (RADIUS * (float) sin_deg( long_lo                  ));\n      vert_nw.x = (float) cos_deg( lat_deg + STEP_LATITUDE ) * (RADIUS * (float) sin_deg( long_lo + STEP_LONGITUDE ));\n      vert_sw.x = (float) cos_deg( lat_deg + STEP_LATITUDE ) * (RADIUS * (float) sin_deg( long_lo                  ));\n\n      vert_ne.z = (float) sin_deg( lat_deg                 ) * (RADIUS * (float) sin_deg( long_lo + STEP_LONGITUDE ));\n      vert_se.z = (float) sin_deg( lat_deg                 ) * (RADIUS * (float) sin_deg( long_lo                  ));\n      vert_nw.z = (float) sin_deg( lat_deg + STEP_LATITUDE ) * (RADIUS * (float) sin_deg( long_lo + STEP_LONGITUDE ));\n      vert_sw.z = (float) sin_deg( lat_deg + STEP_LATITUDE ) * (RADIUS * (float) sin_deg( long_lo                  ));\n\n     /*\n      * Draw the facet.\n      */\n      glBegin( GL_POLYGON );\n\n      CrossProduct( vert_ne, vert_nw, vert_sw, &vert_norm );\n      glNormal3f( vert_norm.x, vert_norm.y, vert_norm.z );\n\n      glVertex3f( vert_ne.x, vert_ne.y, vert_ne.z );\n      glVertex3f( vert_nw.x, vert_nw.y, vert_nw.z );\n      glVertex3f( vert_sw.x, vert_sw.y, vert_sw.z );\n      glVertex3f( vert_se.x, vert_se.y, vert_se.z );\n\n      glEnd();\n\n#if BOING_DEBUG\n      printf( \"----------------------------------------------------------- \\n\" );\n      printf( \"lat = %f  long_lo = %f  long_hi = %f \\n\", lat_deg, long_lo, long_hi );\n      printf( \"vert_ne  x = %.8f  y = %.8f  z = %.8f \\n\", vert_ne.x, vert_ne.y, vert_ne.z );\n      printf( \"vert_nw  x = %.8f  y = %.8f  z = %.8f \\n\", vert_nw.x, vert_nw.y, vert_nw.z );\n      printf( \"vert_se  x = %.8f  y = %.8f  z = %.8f \\n\", vert_se.x, vert_se.y, vert_se.z );\n      printf( \"vert_sw  x = %.8f  y = %.8f  z = %.8f \\n\", vert_sw.x, vert_sw.y, vert_sw.z );\n#endif\n\n   }\n\n  /*\n   * Toggle color so that next band will opposite red/white colors than this one.\n   */\n   colorToggle = ! colorToggle;\n\n  /*\n   * This circular band is done.\n   */\n   return;\n}\n\n\n/*****************************************************************************\n * Draw the purple grid of lines, behind the Boing ball.\n * When the Workbench is dropped to the bottom, Boing shows 12 rows.\n *****************************************************************************/\nvoid DrawGrid( void )\n{\n   int              row, col;\n   const int        rowTotal    = 12;                   /* must be divisible by 2 */\n   const int        colTotal    = rowTotal;             /* must be same as rowTotal */\n   const GLfloat    widthLine   = 2.0;                  /* should be divisible by 2 */\n   const GLfloat    sizeCell    = GRID_SIZE / rowTotal;\n   const GLfloat    z_offset    = -40.0;\n   GLfloat          xl, xr;\n   GLfloat          yt, yb;\n\n   glPushMatrix();\n   glDisable( GL_CULL_FACE );\n\n  /*\n   * Another relative Z translation to separate objects.\n   */\n   glTranslatef( 0.0, 0.0, DIST_BALL );\n\n  /*\n   * Draw vertical lines (as skinny 3D rectangles).\n   */\n   for ( col = 0; col <= colTotal; col++ )\n   {\n     /*\n      * Compute co-ords of line.\n      */\n      xl = -GRID_SIZE / 2 + col * sizeCell;\n      xr = xl + widthLine;\n\n      yt =  GRID_SIZE / 2;\n      yb = -GRID_SIZE / 2 - widthLine;\n\n      glBegin( GL_POLYGON );\n\n      glColor3f( 0.6f, 0.1f, 0.6f );               /* purple */\n\n      glVertex3f( xr, yt, z_offset );       /* NE */\n      glVertex3f( xl, yt, z_offset );       /* NW */\n      glVertex3f( xl, yb, z_offset );       /* SW */\n      glVertex3f( xr, yb, z_offset );       /* SE */\n\n      glEnd();\n   }\n\n  /*\n   * Draw horizontal lines (as skinny 3D rectangles).\n   */\n   for ( row = 0; row <= rowTotal; row++ )\n   {\n     /*\n      * Compute co-ords of line.\n      */\n      yt = GRID_SIZE / 2 - row * sizeCell;\n      yb = yt - widthLine;\n\n      xl = -GRID_SIZE / 2;\n      xr =  GRID_SIZE / 2 + widthLine;\n\n      glBegin( GL_POLYGON );\n\n      glColor3f( 0.6f, 0.1f, 0.6f );               /* purple */\n\n      glVertex3f( xr, yt, z_offset );       /* NE */\n      glVertex3f( xl, yt, z_offset );       /* NW */\n      glVertex3f( xl, yb, z_offset );       /* SW */\n      glVertex3f( xr, yb, z_offset );       /* SE */\n\n      glEnd();\n   }\n\n   glPopMatrix();\n\n   return;\n}\n\n\n/*======================================================================*\n * main()\n *======================================================================*/\n\nint main( void )\n{\n   GLFWwindow* window;\n\n   /* Init GLFW */\n   if( !glfwInit() )\n      exit( EXIT_FAILURE );\n\n   window = glfwCreateWindow( 400, 400, \"Boing (classic Amiga demo)\", NULL, NULL );\n   if (!window)\n   {\n       glfwTerminate();\n       exit( EXIT_FAILURE );\n   }\n\n   glfwSetWindowAspectRatio(window, 1, 1);\n\n   glfwSetFramebufferSizeCallback(window, reshape);\n   glfwSetKeyCallback(window, key_callback);\n   glfwSetMouseButtonCallback(window, mouse_button_callback);\n   glfwSetCursorPosCallback(window, cursor_position_callback);\n\n   glfwMakeContextCurrent(window);\n   gladLoadGL(glfwGetProcAddress);\n   glfwSwapInterval( 1 );\n\n   glfwGetFramebufferSize(window, &width, &height);\n   reshape(window, width, height);\n\n   glfwSetTime( 0.0 );\n\n   init();\n\n   /* Main loop */\n   for (;;)\n   {\n       /* Timing */\n       t = glfwGetTime();\n       dt = t - t_old;\n       t_old = t;\n\n       /* Draw one frame */\n       display();\n\n       /* Swap buffers */\n       glfwSwapBuffers(window);\n       glfwPollEvents();\n\n       /* Check if we are still running */\n       if (glfwWindowShouldClose(window))\n           break;\n   }\n\n   glfwTerminate();\n   exit( EXIT_SUCCESS );\n}\n\n"
  },
  {
    "path": "thirdparty/glfw/examples/gears.c",
    "content": "/*\n * 3-D gear wheels.  This program is in the public domain.\n *\n * Command line options:\n *    -info      print GL implementation information\n *    -exit      automatically exit after 30 seconds\n *\n *\n * Brian Paul\n *\n *\n * Marcus Geelnard:\n *   - Conversion to GLFW\n *   - Time based rendering (frame rate independent)\n *   - Slightly modified camera that should work better for stereo viewing\n *\n *\n * Camilla Löwy:\n *   - Removed FPS counter (this is not a benchmark)\n *   - Added a few comments\n *   - Enabled vsync\n */\n\n#if defined(_MSC_VER)\n // Make MS math.h define M_PI\n #define _USE_MATH_DEFINES\n#endif\n\n#include <math.h>\n#include <stdlib.h>\n#include <stdio.h>\n#include <string.h>\n\n#include <glad/gl.h>\n#define GLFW_INCLUDE_NONE\n#include <GLFW/glfw3.h>\n\n/**\n\n  Draw a gear wheel.  You'll probably want to call this function when\n  building a display list since we do a lot of trig here.\n\n  Input:  inner_radius - radius of hole at center\n          outer_radius - radius at center of teeth\n          width - width of gear teeth - number of teeth\n          tooth_depth - depth of tooth\n\n **/\n\nstatic void\ngear(GLfloat inner_radius, GLfloat outer_radius, GLfloat width,\n  GLint teeth, GLfloat tooth_depth)\n{\n  GLint i;\n  GLfloat r0, r1, r2;\n  GLfloat angle, da;\n  GLfloat u, v, len;\n\n  r0 = inner_radius;\n  r1 = outer_radius - tooth_depth / 2.f;\n  r2 = outer_radius + tooth_depth / 2.f;\n\n  da = 2.f * (float) M_PI / teeth / 4.f;\n\n  glShadeModel(GL_FLAT);\n\n  glNormal3f(0.f, 0.f, 1.f);\n\n  /* draw front face */\n  glBegin(GL_QUAD_STRIP);\n  for (i = 0; i <= teeth; i++) {\n    angle = i * 2.f * (float) M_PI / teeth;\n    glVertex3f(r0 * (float) cos(angle), r0 * (float) sin(angle), width * 0.5f);\n    glVertex3f(r1 * (float) cos(angle), r1 * (float) sin(angle), width * 0.5f);\n    if (i < teeth) {\n      glVertex3f(r0 * (float) cos(angle), r0 * (float) sin(angle), width * 0.5f);\n      glVertex3f(r1 * (float) cos(angle + 3 * da), r1 * (float) sin(angle + 3 * da), width * 0.5f);\n    }\n  }\n  glEnd();\n\n  /* draw front sides of teeth */\n  glBegin(GL_QUADS);\n  da = 2.f * (float) M_PI / teeth / 4.f;\n  for (i = 0; i < teeth; i++) {\n    angle = i * 2.f * (float) M_PI / teeth;\n\n    glVertex3f(r1 * (float) cos(angle), r1 * (float) sin(angle), width * 0.5f);\n    glVertex3f(r2 * (float) cos(angle + da), r2 * (float) sin(angle + da), width * 0.5f);\n    glVertex3f(r2 * (float) cos(angle + 2 * da), r2 * (float) sin(angle + 2 * da), width * 0.5f);\n    glVertex3f(r1 * (float) cos(angle + 3 * da), r1 * (float) sin(angle + 3 * da), width * 0.5f);\n  }\n  glEnd();\n\n  glNormal3f(0.0, 0.0, -1.0);\n\n  /* draw back face */\n  glBegin(GL_QUAD_STRIP);\n  for (i = 0; i <= teeth; i++) {\n    angle = i * 2.f * (float) M_PI / teeth;\n    glVertex3f(r1 * (float) cos(angle), r1 * (float) sin(angle), -width * 0.5f);\n    glVertex3f(r0 * (float) cos(angle), r0 * (float) sin(angle), -width * 0.5f);\n    if (i < teeth) {\n      glVertex3f(r1 * (float) cos(angle + 3 * da), r1 * (float) sin(angle + 3 * da), -width * 0.5f);\n      glVertex3f(r0 * (float) cos(angle), r0 * (float) sin(angle), -width * 0.5f);\n    }\n  }\n  glEnd();\n\n  /* draw back sides of teeth */\n  glBegin(GL_QUADS);\n  da = 2.f * (float) M_PI / teeth / 4.f;\n  for (i = 0; i < teeth; i++) {\n    angle = i * 2.f * (float) M_PI / teeth;\n\n    glVertex3f(r1 * (float) cos(angle + 3 * da), r1 * (float) sin(angle + 3 * da), -width * 0.5f);\n    glVertex3f(r2 * (float) cos(angle + 2 * da), r2 * (float) sin(angle + 2 * da), -width * 0.5f);\n    glVertex3f(r2 * (float) cos(angle + da), r2 * (float) sin(angle + da), -width * 0.5f);\n    glVertex3f(r1 * (float) cos(angle), r1 * (float) sin(angle), -width * 0.5f);\n  }\n  glEnd();\n\n  /* draw outward faces of teeth */\n  glBegin(GL_QUAD_STRIP);\n  for (i = 0; i < teeth; i++) {\n    angle = i * 2.f * (float) M_PI / teeth;\n\n    glVertex3f(r1 * (float) cos(angle), r1 * (float) sin(angle), width * 0.5f);\n    glVertex3f(r1 * (float) cos(angle), r1 * (float) sin(angle), -width * 0.5f);\n    u = r2 * (float) cos(angle + da) - r1 * (float) cos(angle);\n    v = r2 * (float) sin(angle + da) - r1 * (float) sin(angle);\n    len = (float) sqrt(u * u + v * v);\n    u /= len;\n    v /= len;\n    glNormal3f(v, -u, 0.0);\n    glVertex3f(r2 * (float) cos(angle + da), r2 * (float) sin(angle + da), width * 0.5f);\n    glVertex3f(r2 * (float) cos(angle + da), r2 * (float) sin(angle + da), -width * 0.5f);\n    glNormal3f((float) cos(angle), (float) sin(angle), 0.f);\n    glVertex3f(r2 * (float) cos(angle + 2 * da), r2 * (float) sin(angle + 2 * da), width * 0.5f);\n    glVertex3f(r2 * (float) cos(angle + 2 * da), r2 * (float) sin(angle + 2 * da), -width * 0.5f);\n    u = r1 * (float) cos(angle + 3 * da) - r2 * (float) cos(angle + 2 * da);\n    v = r1 * (float) sin(angle + 3 * da) - r2 * (float) sin(angle + 2 * da);\n    glNormal3f(v, -u, 0.f);\n    glVertex3f(r1 * (float) cos(angle + 3 * da), r1 * (float) sin(angle + 3 * da), width * 0.5f);\n    glVertex3f(r1 * (float) cos(angle + 3 * da), r1 * (float) sin(angle + 3 * da), -width * 0.5f);\n    glNormal3f((float) cos(angle), (float) sin(angle), 0.f);\n  }\n\n  glVertex3f(r1 * (float) cos(0), r1 * (float) sin(0), width * 0.5f);\n  glVertex3f(r1 * (float) cos(0), r1 * (float) sin(0), -width * 0.5f);\n\n  glEnd();\n\n  glShadeModel(GL_SMOOTH);\n\n  /* draw inside radius cylinder */\n  glBegin(GL_QUAD_STRIP);\n  for (i = 0; i <= teeth; i++) {\n    angle = i * 2.f * (float) M_PI / teeth;\n    glNormal3f(-(float) cos(angle), -(float) sin(angle), 0.f);\n    glVertex3f(r0 * (float) cos(angle), r0 * (float) sin(angle), -width * 0.5f);\n    glVertex3f(r0 * (float) cos(angle), r0 * (float) sin(angle), width * 0.5f);\n  }\n  glEnd();\n\n}\n\n\nstatic GLfloat view_rotx = 20.f, view_roty = 30.f, view_rotz = 0.f;\nstatic GLint gear1, gear2, gear3;\nstatic GLfloat angle = 0.f;\n\n/* OpenGL draw function & timing */\nstatic void draw(void)\n{\n  glClearColor(0.0, 0.0, 0.0, 0.0);\n  glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);\n\n  glPushMatrix();\n    glRotatef(view_rotx, 1.0, 0.0, 0.0);\n    glRotatef(view_roty, 0.0, 1.0, 0.0);\n    glRotatef(view_rotz, 0.0, 0.0, 1.0);\n\n    glPushMatrix();\n      glTranslatef(-3.0, -2.0, 0.0);\n      glRotatef(angle, 0.0, 0.0, 1.0);\n      glCallList(gear1);\n    glPopMatrix();\n\n    glPushMatrix();\n      glTranslatef(3.1f, -2.f, 0.f);\n      glRotatef(-2.f * angle - 9.f, 0.f, 0.f, 1.f);\n      glCallList(gear2);\n    glPopMatrix();\n\n    glPushMatrix();\n      glTranslatef(-3.1f, 4.2f, 0.f);\n      glRotatef(-2.f * angle - 25.f, 0.f, 0.f, 1.f);\n      glCallList(gear3);\n    glPopMatrix();\n\n  glPopMatrix();\n}\n\n\n/* update animation parameters */\nstatic void animate(void)\n{\n  angle = 100.f * (float) glfwGetTime();\n}\n\n\n/* change view angle, exit upon ESC */\nvoid key( GLFWwindow* window, int k, int s, int action, int mods )\n{\n  if( action != GLFW_PRESS ) return;\n\n  switch (k) {\n  case GLFW_KEY_Z:\n    if( mods & GLFW_MOD_SHIFT )\n      view_rotz -= 5.0;\n    else\n      view_rotz += 5.0;\n    break;\n  case GLFW_KEY_ESCAPE:\n    glfwSetWindowShouldClose(window, GLFW_TRUE);\n    break;\n  case GLFW_KEY_UP:\n    view_rotx += 5.0;\n    break;\n  case GLFW_KEY_DOWN:\n    view_rotx -= 5.0;\n    break;\n  case GLFW_KEY_LEFT:\n    view_roty += 5.0;\n    break;\n  case GLFW_KEY_RIGHT:\n    view_roty -= 5.0;\n    break;\n  default:\n    return;\n  }\n}\n\n\n/* new window size */\nvoid reshape( GLFWwindow* window, int width, int height )\n{\n  GLfloat h = (GLfloat) height / (GLfloat) width;\n  GLfloat xmax, znear, zfar;\n\n  znear = 5.0f;\n  zfar  = 30.0f;\n  xmax  = znear * 0.5f;\n\n  glViewport( 0, 0, (GLint) width, (GLint) height );\n  glMatrixMode( GL_PROJECTION );\n  glLoadIdentity();\n  glFrustum( -xmax, xmax, -xmax*h, xmax*h, znear, zfar );\n  glMatrixMode( GL_MODELVIEW );\n  glLoadIdentity();\n  glTranslatef( 0.0, 0.0, -20.0 );\n}\n\n\n/* program & OpenGL initialization */\nstatic void init(void)\n{\n  static GLfloat pos[4] = {5.f, 5.f, 10.f, 0.f};\n  static GLfloat red[4] = {0.8f, 0.1f, 0.f, 1.f};\n  static GLfloat green[4] = {0.f, 0.8f, 0.2f, 1.f};\n  static GLfloat blue[4] = {0.2f, 0.2f, 1.f, 1.f};\n\n  glLightfv(GL_LIGHT0, GL_POSITION, pos);\n  glEnable(GL_CULL_FACE);\n  glEnable(GL_LIGHTING);\n  glEnable(GL_LIGHT0);\n  glEnable(GL_DEPTH_TEST);\n\n  /* make the gears */\n  gear1 = glGenLists(1);\n  glNewList(gear1, GL_COMPILE);\n  glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, red);\n  gear(1.f, 4.f, 1.f, 20, 0.7f);\n  glEndList();\n\n  gear2 = glGenLists(1);\n  glNewList(gear2, GL_COMPILE);\n  glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, green);\n  gear(0.5f, 2.f, 2.f, 10, 0.7f);\n  glEndList();\n\n  gear3 = glGenLists(1);\n  glNewList(gear3, GL_COMPILE);\n  glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, blue);\n  gear(1.3f, 2.f, 0.5f, 10, 0.7f);\n  glEndList();\n\n  glEnable(GL_NORMALIZE);\n}\n\n\n/* program entry */\nint main(int argc, char *argv[])\n{\n    GLFWwindow* window;\n    int width, height;\n\n    if( !glfwInit() )\n    {\n        fprintf( stderr, \"Failed to initialize GLFW\\n\" );\n        exit( EXIT_FAILURE );\n    }\n\n    glfwWindowHint(GLFW_DEPTH_BITS, 16);\n    glfwWindowHint(GLFW_TRANSPARENT_FRAMEBUFFER, GLFW_TRUE);\n\n    window = glfwCreateWindow( 300, 300, \"Gears\", NULL, NULL );\n    if (!window)\n    {\n        fprintf( stderr, \"Failed to open GLFW window\\n\" );\n        glfwTerminate();\n        exit( EXIT_FAILURE );\n    }\n\n    // Set callback functions\n    glfwSetFramebufferSizeCallback(window, reshape);\n    glfwSetKeyCallback(window, key);\n\n    glfwMakeContextCurrent(window);\n    gladLoadGL(glfwGetProcAddress);\n    glfwSwapInterval( 1 );\n\n    glfwGetFramebufferSize(window, &width, &height);\n    reshape(window, width, height);\n\n    // Parse command-line options\n    init();\n\n    // Main loop\n    while( !glfwWindowShouldClose(window) )\n    {\n        // Draw gears\n        draw();\n\n        // Update animation\n        animate();\n\n        // Swap buffers\n        glfwSwapBuffers(window);\n        glfwPollEvents();\n    }\n\n    // Terminate GLFW\n    glfwTerminate();\n\n    // Exit program\n    exit( EXIT_SUCCESS );\n}\n\n"
  },
  {
    "path": "thirdparty/glfw/examples/glfw.rc",
    "content": "\nGLFW_ICON               ICON            \"glfw.ico\"\n\n"
  },
  {
    "path": "thirdparty/glfw/examples/heightmap.c",
    "content": "//========================================================================\n// Heightmap example program using OpenGL 3 core profile\n// Copyright (c) 2010 Olivier Delannoy\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//    claim that you wrote the original software. If you use this software\n//    in a product, an acknowledgment in the product documentation would\n//    be appreciated but is not required.\n//\n// 2. Altered source versions must be plainly marked as such, and must not\n//    be misrepresented as being the original software.\n//\n// 3. This notice may not be removed or altered from any source\n//    distribution.\n//\n//========================================================================\n\n#include <stdlib.h>\n#include <stdio.h>\n#include <math.h>\n#include <assert.h>\n#include <stddef.h>\n\n#include <glad/gl.h>\n#define GLFW_INCLUDE_NONE\n#include <GLFW/glfw3.h>\n\n/* Map height updates */\n#define MAX_CIRCLE_SIZE (5.0f)\n#define MAX_DISPLACEMENT (1.0f)\n#define DISPLACEMENT_SIGN_LIMIT (0.3f)\n#define MAX_ITER (200)\n#define NUM_ITER_AT_A_TIME (1)\n\n/* Map general information */\n#define MAP_SIZE (10.0f)\n#define MAP_NUM_VERTICES (80)\n#define MAP_NUM_TOTAL_VERTICES (MAP_NUM_VERTICES*MAP_NUM_VERTICES)\n#define MAP_NUM_LINES (3* (MAP_NUM_VERTICES - 1) * (MAP_NUM_VERTICES - 1) + \\\n               2 * (MAP_NUM_VERTICES - 1))\n\n\n/**********************************************************************\n * Default shader programs\n *********************************************************************/\n\nstatic const char* vertex_shader_text =\n\"#version 150\\n\"\n\"uniform mat4 project;\\n\"\n\"uniform mat4 modelview;\\n\"\n\"in float x;\\n\"\n\"in float y;\\n\"\n\"in float z;\\n\"\n\"\\n\"\n\"void main()\\n\"\n\"{\\n\"\n\"   gl_Position = project * modelview * vec4(x, y, z, 1.0);\\n\"\n\"}\\n\";\n\nstatic const char* fragment_shader_text =\n\"#version 150\\n\"\n\"out vec4 color;\\n\"\n\"void main()\\n\"\n\"{\\n\"\n\"    color = vec4(0.2, 1.0, 0.2, 1.0); \\n\"\n\"}\\n\";\n\n/**********************************************************************\n * Values for shader uniforms\n *********************************************************************/\n\n/* Frustum configuration */\nstatic GLfloat view_angle = 45.0f;\nstatic GLfloat aspect_ratio = 4.0f/3.0f;\nstatic GLfloat z_near = 1.0f;\nstatic GLfloat z_far = 100.f;\n\n/* Projection matrix */\nstatic GLfloat projection_matrix[16] = {\n    1.0f, 0.0f, 0.0f, 0.0f,\n    0.0f, 1.0f, 0.0f, 0.0f,\n    0.0f, 0.0f, 1.0f, 0.0f,\n    0.0f, 0.0f, 0.0f, 1.0f\n};\n\n/* Model view matrix */\nstatic GLfloat modelview_matrix[16] = {\n    1.0f, 0.0f, 0.0f, 0.0f,\n    0.0f, 1.0f, 0.0f, 0.0f,\n    0.0f, 0.0f, 1.0f, 0.0f,\n    0.0f, 0.0f, 0.0f, 1.0f\n};\n\n/**********************************************************************\n * Heightmap vertex and index data\n *********************************************************************/\n\nstatic GLfloat map_vertices[3][MAP_NUM_TOTAL_VERTICES];\nstatic GLuint  map_line_indices[2*MAP_NUM_LINES];\n\n/* Store uniform location for the shaders\n * Those values are setup as part of the process of creating\n * the shader program. They should not be used before creating\n * the program.\n */\nstatic GLuint mesh;\nstatic GLuint mesh_vbo[4];\n\n/**********************************************************************\n * OpenGL helper functions\n *********************************************************************/\n\n/* Creates a shader object of the specified type using the specified text\n */\nstatic GLuint make_shader(GLenum type, const char* text)\n{\n    GLuint shader;\n    GLint shader_ok;\n    GLsizei log_length;\n    char info_log[8192];\n\n    shader = glCreateShader(type);\n    if (shader != 0)\n    {\n        glShaderSource(shader, 1, (const GLchar**)&text, NULL);\n        glCompileShader(shader);\n        glGetShaderiv(shader, GL_COMPILE_STATUS, &shader_ok);\n        if (shader_ok != GL_TRUE)\n        {\n            fprintf(stderr, \"ERROR: Failed to compile %s shader\\n\", (type == GL_FRAGMENT_SHADER) ? \"fragment\" : \"vertex\" );\n            glGetShaderInfoLog(shader, 8192, &log_length,info_log);\n            fprintf(stderr, \"ERROR: \\n%s\\n\\n\", info_log);\n            glDeleteShader(shader);\n            shader = 0;\n        }\n    }\n    return shader;\n}\n\n/* Creates a program object using the specified vertex and fragment text\n */\nstatic GLuint make_shader_program(const char* vs_text, const char* fs_text)\n{\n    GLuint program = 0u;\n    GLint program_ok;\n    GLuint vertex_shader = 0u;\n    GLuint fragment_shader = 0u;\n    GLsizei log_length;\n    char info_log[8192];\n\n    vertex_shader = make_shader(GL_VERTEX_SHADER, vs_text);\n    if (vertex_shader != 0u)\n    {\n        fragment_shader = make_shader(GL_FRAGMENT_SHADER, fs_text);\n        if (fragment_shader != 0u)\n        {\n            /* make the program that connect the two shader and link it */\n            program = glCreateProgram();\n            if (program != 0u)\n            {\n                /* attach both shader and link */\n                glAttachShader(program, vertex_shader);\n                glAttachShader(program, fragment_shader);\n                glLinkProgram(program);\n                glGetProgramiv(program, GL_LINK_STATUS, &program_ok);\n\n                if (program_ok != GL_TRUE)\n                {\n                    fprintf(stderr, \"ERROR, failed to link shader program\\n\");\n                    glGetProgramInfoLog(program, 8192, &log_length, info_log);\n                    fprintf(stderr, \"ERROR: \\n%s\\n\\n\", info_log);\n                    glDeleteProgram(program);\n                    glDeleteShader(fragment_shader);\n                    glDeleteShader(vertex_shader);\n                    program = 0u;\n                }\n            }\n        }\n        else\n        {\n            fprintf(stderr, \"ERROR: Unable to load fragment shader\\n\");\n            glDeleteShader(vertex_shader);\n        }\n    }\n    else\n    {\n        fprintf(stderr, \"ERROR: Unable to load vertex shader\\n\");\n    }\n    return program;\n}\n\n/**********************************************************************\n * Geometry creation functions\n *********************************************************************/\n\n/* Generate vertices and indices for the heightmap\n */\nstatic void init_map(void)\n{\n    int i;\n    int j;\n    int k;\n    GLfloat step = MAP_SIZE / (MAP_NUM_VERTICES - 1);\n    GLfloat x = 0.0f;\n    GLfloat z = 0.0f;\n    /* Create a flat grid */\n    k = 0;\n    for (i = 0 ; i < MAP_NUM_VERTICES ; ++i)\n    {\n        for (j = 0 ; j < MAP_NUM_VERTICES ; ++j)\n        {\n            map_vertices[0][k] = x;\n            map_vertices[1][k] = 0.0f;\n            map_vertices[2][k] = z;\n            z += step;\n            ++k;\n        }\n        x += step;\n        z = 0.0f;\n    }\n#if DEBUG_ENABLED\n    for (i = 0 ; i < MAP_NUM_TOTAL_VERTICES ; ++i)\n    {\n        printf (\"Vertice %d (%f, %f, %f)\\n\",\n                i, map_vertices[0][i], map_vertices[1][i], map_vertices[2][i]);\n\n    }\n#endif\n    /* create indices */\n    /* line fan based on i\n     * i+1\n     * |  / i + n + 1\n     * | /\n     * |/\n     * i --- i + n\n     */\n\n    /* close the top of the square */\n    k = 0;\n    for (i = 0 ; i < MAP_NUM_VERTICES  -1 ; ++i)\n    {\n        map_line_indices[k++] = (i + 1) * MAP_NUM_VERTICES -1;\n        map_line_indices[k++] = (i + 2) * MAP_NUM_VERTICES -1;\n    }\n    /* close the right of the square */\n    for (i = 0 ; i < MAP_NUM_VERTICES -1 ; ++i)\n    {\n        map_line_indices[k++] = (MAP_NUM_VERTICES - 1) * MAP_NUM_VERTICES + i;\n        map_line_indices[k++] = (MAP_NUM_VERTICES - 1) * MAP_NUM_VERTICES + i + 1;\n    }\n\n    for (i = 0 ; i < (MAP_NUM_VERTICES - 1) ; ++i)\n    {\n        for (j = 0 ; j < (MAP_NUM_VERTICES - 1) ; ++j)\n        {\n            int ref = i * (MAP_NUM_VERTICES) + j;\n            map_line_indices[k++] = ref;\n            map_line_indices[k++] = ref + 1;\n\n            map_line_indices[k++] = ref;\n            map_line_indices[k++] = ref + MAP_NUM_VERTICES;\n\n            map_line_indices[k++] = ref;\n            map_line_indices[k++] = ref + MAP_NUM_VERTICES + 1;\n        }\n    }\n\n#ifdef DEBUG_ENABLED\n    for (k = 0 ; k < 2 * MAP_NUM_LINES ; k += 2)\n    {\n        int beg, end;\n        beg = map_line_indices[k];\n        end = map_line_indices[k+1];\n        printf (\"Line %d: %d -> %d (%f, %f, %f) -> (%f, %f, %f)\\n\",\n                k / 2, beg, end,\n                map_vertices[0][beg], map_vertices[1][beg], map_vertices[2][beg],\n                map_vertices[0][end], map_vertices[1][end], map_vertices[2][end]);\n    }\n#endif\n}\n\nstatic void generate_heightmap__circle(float* center_x, float* center_y,\n        float* size, float* displacement)\n{\n    float sign;\n    /* random value for element in between [0-1.0] */\n    *center_x = (MAP_SIZE * rand()) / (1.0f * RAND_MAX);\n    *center_y = (MAP_SIZE * rand()) / (1.0f * RAND_MAX);\n    *size = (MAX_CIRCLE_SIZE * rand()) / (1.0f * RAND_MAX);\n    sign = (1.0f * rand()) / (1.0f * RAND_MAX);\n    sign = (sign < DISPLACEMENT_SIGN_LIMIT) ? -1.0f : 1.0f;\n    *displacement = (sign * (MAX_DISPLACEMENT * rand())) / (1.0f * RAND_MAX);\n}\n\n/* Run the specified number of iterations of the generation process for the\n * heightmap\n */\nstatic void update_map(int num_iter)\n{\n    assert(num_iter > 0);\n    while(num_iter)\n    {\n        /* center of the circle */\n        float center_x;\n        float center_z;\n        float circle_size;\n        float disp;\n        size_t ii;\n        generate_heightmap__circle(&center_x, &center_z, &circle_size, &disp);\n        disp = disp / 2.0f;\n        for (ii = 0u ; ii < MAP_NUM_TOTAL_VERTICES ; ++ii)\n        {\n            GLfloat dx = center_x - map_vertices[0][ii];\n            GLfloat dz = center_z - map_vertices[2][ii];\n            GLfloat pd = (2.0f * (float) sqrt((dx * dx) + (dz * dz))) / circle_size;\n            if (fabs(pd) <= 1.0f)\n            {\n                /* tx,tz is within the circle */\n                GLfloat new_height = disp + (float) (cos(pd*3.14f)*disp);\n                map_vertices[1][ii] += new_height;\n            }\n        }\n        --num_iter;\n    }\n}\n\n/**********************************************************************\n * OpenGL helper functions\n *********************************************************************/\n\n/* Create VBO, IBO and VAO objects for the heightmap geometry and bind them to\n * the specified program object\n */\nstatic void make_mesh(GLuint program)\n{\n    GLuint attrloc;\n\n    glGenVertexArrays(1, &mesh);\n    glGenBuffers(4, mesh_vbo);\n    glBindVertexArray(mesh);\n    /* Prepare the data for drawing through a buffer inidices */\n    glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, mesh_vbo[3]);\n    glBufferData(GL_ELEMENT_ARRAY_BUFFER, sizeof(GLuint)* MAP_NUM_LINES * 2, map_line_indices, GL_STATIC_DRAW);\n\n    /* Prepare the attributes for rendering */\n    attrloc = glGetAttribLocation(program, \"x\");\n    glBindBuffer(GL_ARRAY_BUFFER, mesh_vbo[0]);\n    glBufferData(GL_ARRAY_BUFFER, sizeof(GLfloat) * MAP_NUM_TOTAL_VERTICES, &map_vertices[0][0], GL_STATIC_DRAW);\n    glEnableVertexAttribArray(attrloc);\n    glVertexAttribPointer(attrloc, 1, GL_FLOAT, GL_FALSE, 0, 0);\n\n    attrloc = glGetAttribLocation(program, \"z\");\n    glBindBuffer(GL_ARRAY_BUFFER, mesh_vbo[2]);\n    glBufferData(GL_ARRAY_BUFFER, sizeof(GLfloat) * MAP_NUM_TOTAL_VERTICES, &map_vertices[2][0], GL_STATIC_DRAW);\n    glEnableVertexAttribArray(attrloc);\n    glVertexAttribPointer(attrloc, 1, GL_FLOAT, GL_FALSE, 0, 0);\n\n    attrloc = glGetAttribLocation(program, \"y\");\n    glBindBuffer(GL_ARRAY_BUFFER, mesh_vbo[1]);\n    glBufferData(GL_ARRAY_BUFFER, sizeof(GLfloat) * MAP_NUM_TOTAL_VERTICES, &map_vertices[1][0], GL_DYNAMIC_DRAW);\n    glEnableVertexAttribArray(attrloc);\n    glVertexAttribPointer(attrloc, 1, GL_FLOAT, GL_FALSE, 0, 0);\n}\n\n/* Update VBO vertices from source data\n */\nstatic void update_mesh(void)\n{\n    glBufferSubData(GL_ARRAY_BUFFER, 0, sizeof(GLfloat) * MAP_NUM_TOTAL_VERTICES, &map_vertices[1][0]);\n}\n\n/**********************************************************************\n * GLFW callback functions\n *********************************************************************/\n\nstatic void key_callback(GLFWwindow* window, int key, int scancode, int action, int mods)\n{\n    switch(key)\n    {\n        case GLFW_KEY_ESCAPE:\n            /* Exit program on Escape */\n            glfwSetWindowShouldClose(window, GLFW_TRUE);\n            break;\n    }\n}\n\nstatic void error_callback(int error, const char* description)\n{\n    fprintf(stderr, \"Error: %s\\n\", description);\n}\n\nint main(int argc, char** argv)\n{\n    GLFWwindow* window;\n    int iter;\n    double dt;\n    double last_update_time;\n    int frame;\n    float f;\n    GLint uloc_modelview;\n    GLint uloc_project;\n    int width, height;\n\n    GLuint shader_program;\n\n    glfwSetErrorCallback(error_callback);\n\n    if (!glfwInit())\n        exit(EXIT_FAILURE);\n\n    glfwWindowHint(GLFW_RESIZABLE, GLFW_FALSE);\n    glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);\n    glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 2);\n    glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);\n    glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GLFW_TRUE);\n\n    window = glfwCreateWindow(800, 600, \"GLFW OpenGL3 Heightmap demo\", NULL, NULL);\n    if (! window )\n    {\n        glfwTerminate();\n        exit(EXIT_FAILURE);\n    }\n\n    /* Register events callback */\n    glfwSetKeyCallback(window, key_callback);\n\n    glfwMakeContextCurrent(window);\n    gladLoadGL(glfwGetProcAddress);\n\n    /* Prepare opengl resources for rendering */\n    shader_program = make_shader_program(vertex_shader_text, fragment_shader_text);\n\n    if (shader_program == 0u)\n    {\n        glfwTerminate();\n        exit(EXIT_FAILURE);\n    }\n\n    glUseProgram(shader_program);\n    uloc_project   = glGetUniformLocation(shader_program, \"project\");\n    uloc_modelview = glGetUniformLocation(shader_program, \"modelview\");\n\n    /* Compute the projection matrix */\n    f = 1.0f / tanf(view_angle / 2.0f);\n    projection_matrix[0]  = f / aspect_ratio;\n    projection_matrix[5]  = f;\n    projection_matrix[10] = (z_far + z_near)/ (z_near - z_far);\n    projection_matrix[11] = -1.0f;\n    projection_matrix[14] = 2.0f * (z_far * z_near) / (z_near - z_far);\n    glUniformMatrix4fv(uloc_project, 1, GL_FALSE, projection_matrix);\n\n    /* Set the camera position */\n    modelview_matrix[12]  = -5.0f;\n    modelview_matrix[13]  = -5.0f;\n    modelview_matrix[14]  = -20.0f;\n    glUniformMatrix4fv(uloc_modelview, 1, GL_FALSE, modelview_matrix);\n\n    /* Create mesh data */\n    init_map();\n    make_mesh(shader_program);\n\n    /* Create vao + vbo to store the mesh */\n    /* Create the vbo to store all the information for the grid and the height */\n\n    /* setup the scene ready for rendering */\n    glfwGetFramebufferSize(window, &width, &height);\n    glViewport(0, 0, width, height);\n    glClearColor(0.0f, 0.0f, 0.0f, 0.0f);\n\n    /* main loop */\n    frame = 0;\n    iter = 0;\n    last_update_time = glfwGetTime();\n\n    while (!glfwWindowShouldClose(window))\n    {\n        ++frame;\n        /* render the next frame */\n        glClear(GL_COLOR_BUFFER_BIT);\n        glDrawElements(GL_LINES, 2* MAP_NUM_LINES , GL_UNSIGNED_INT, 0);\n\n        /* display and process events through callbacks */\n        glfwSwapBuffers(window);\n        glfwPollEvents();\n        /* Check the frame rate and update the heightmap if needed */\n        dt = glfwGetTime();\n        if ((dt - last_update_time) > 0.2)\n        {\n            /* generate the next iteration of the heightmap */\n            if (iter < MAX_ITER)\n            {\n                update_map(NUM_ITER_AT_A_TIME);\n                update_mesh();\n                iter += NUM_ITER_AT_A_TIME;\n            }\n            last_update_time = dt;\n            frame = 0;\n        }\n    }\n\n    glfwTerminate();\n    exit(EXIT_SUCCESS);\n}\n\n"
  },
  {
    "path": "thirdparty/glfw/examples/offscreen.c",
    "content": "//========================================================================\n// Offscreen rendering example\n// Copyright (c) Camilla Löwy <elmindreda@glfw.org>\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//    claim that you wrote the original software. If you use this software\n//    in a product, an acknowledgment in the product documentation would\n//    be appreciated but is not required.\n//\n// 2. Altered source versions must be plainly marked as such, and must not\n//    be misrepresented as being the original software.\n//\n// 3. This notice may not be removed or altered from any source\n//    distribution.\n//\n//========================================================================\n\n#include <glad/gl.h>\n#define GLFW_INCLUDE_NONE\n#include <GLFW/glfw3.h>\n\n#if USE_NATIVE_OSMESA\n #define GLFW_EXPOSE_NATIVE_OSMESA\n #include <GLFW/glfw3native.h>\n#endif\n\n#include \"linmath.h\"\n\n#include <stdlib.h>\n#include <stdio.h>\n\n#define STB_IMAGE_WRITE_IMPLEMENTATION\n#include <stb_image_write.h>\n\nstatic const struct\n{\n    float x, y;\n    float r, g, b;\n} vertices[3] =\n{\n    { -0.6f, -0.4f, 1.f, 0.f, 0.f },\n    {  0.6f, -0.4f, 0.f, 1.f, 0.f },\n    {   0.f,  0.6f, 0.f, 0.f, 1.f }\n};\n\nstatic const char* vertex_shader_text =\n\"#version 110\\n\"\n\"uniform mat4 MVP;\\n\"\n\"attribute vec3 vCol;\\n\"\n\"attribute vec2 vPos;\\n\"\n\"varying vec3 color;\\n\"\n\"void main()\\n\"\n\"{\\n\"\n\"    gl_Position = MVP * vec4(vPos, 0.0, 1.0);\\n\"\n\"    color = vCol;\\n\"\n\"}\\n\";\n\nstatic const char* fragment_shader_text =\n\"#version 110\\n\"\n\"varying vec3 color;\\n\"\n\"void main()\\n\"\n\"{\\n\"\n\"    gl_FragColor = vec4(color, 1.0);\\n\"\n\"}\\n\";\n\nstatic void error_callback(int error, const char* description)\n{\n    fprintf(stderr, \"Error: %s\\n\", description);\n}\n\nint main(void)\n{\n    GLFWwindow* window;\n    GLuint vertex_buffer, vertex_shader, fragment_shader, program;\n    GLint mvp_location, vpos_location, vcol_location;\n    float ratio;\n    int width, height;\n    mat4x4 mvp;\n    char* buffer;\n\n    glfwSetErrorCallback(error_callback);\n\n    glfwInitHint(GLFW_COCOA_MENUBAR, GLFW_FALSE);\n\n    if (!glfwInit())\n        exit(EXIT_FAILURE);\n\n    glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 2);\n    glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 0);\n    glfwWindowHint(GLFW_VISIBLE, GLFW_FALSE);\n\n    window = glfwCreateWindow(640, 480, \"Simple example\", NULL, NULL);\n    if (!window)\n    {\n        glfwTerminate();\n        exit(EXIT_FAILURE);\n    }\n\n    glfwMakeContextCurrent(window);\n    gladLoadGL(glfwGetProcAddress);\n\n    // NOTE: OpenGL error checks have been omitted for brevity\n\n    glGenBuffers(1, &vertex_buffer);\n    glBindBuffer(GL_ARRAY_BUFFER, vertex_buffer);\n    glBufferData(GL_ARRAY_BUFFER, sizeof(vertices), vertices, GL_STATIC_DRAW);\n\n    vertex_shader = glCreateShader(GL_VERTEX_SHADER);\n    glShaderSource(vertex_shader, 1, &vertex_shader_text, NULL);\n    glCompileShader(vertex_shader);\n\n    fragment_shader = glCreateShader(GL_FRAGMENT_SHADER);\n    glShaderSource(fragment_shader, 1, &fragment_shader_text, NULL);\n    glCompileShader(fragment_shader);\n\n    program = glCreateProgram();\n    glAttachShader(program, vertex_shader);\n    glAttachShader(program, fragment_shader);\n    glLinkProgram(program);\n\n    mvp_location = glGetUniformLocation(program, \"MVP\");\n    vpos_location = glGetAttribLocation(program, \"vPos\");\n    vcol_location = glGetAttribLocation(program, \"vCol\");\n\n    glEnableVertexAttribArray(vpos_location);\n    glVertexAttribPointer(vpos_location, 2, GL_FLOAT, GL_FALSE,\n                          sizeof(vertices[0]), (void*) 0);\n    glEnableVertexAttribArray(vcol_location);\n    glVertexAttribPointer(vcol_location, 3, GL_FLOAT, GL_FALSE,\n                          sizeof(vertices[0]), (void*) (sizeof(float) * 2));\n\n    glfwGetFramebufferSize(window, &width, &height);\n    ratio = width / (float) height;\n\n    glViewport(0, 0, width, height);\n    glClear(GL_COLOR_BUFFER_BIT);\n\n    mat4x4_ortho(mvp, -ratio, ratio, -1.f, 1.f, 1.f, -1.f);\n\n    glUseProgram(program);\n    glUniformMatrix4fv(mvp_location, 1, GL_FALSE, (const GLfloat*) mvp);\n    glDrawArrays(GL_TRIANGLES, 0, 3);\n\n#if USE_NATIVE_OSMESA\n    glfwGetOSMesaColorBuffer(window, &width, &height, NULL, (void**) &buffer);\n#else\n    buffer = calloc(4, width * height);\n    glReadPixels(0, 0, width, height, GL_RGBA, GL_UNSIGNED_BYTE, buffer);\n#endif\n\n    // Write image Y-flipped because OpenGL\n    stbi_write_png(\"offscreen.png\",\n                   width, height, 4,\n                   buffer + (width * 4 * (height - 1)),\n                   -width * 4);\n\n#if USE_NATIVE_OSMESA\n    // Here is where there's nothing\n#else\n    free(buffer);\n#endif\n\n    glfwDestroyWindow(window);\n\n    glfwTerminate();\n    exit(EXIT_SUCCESS);\n}\n\n"
  },
  {
    "path": "thirdparty/glfw/examples/particles.c",
    "content": "//========================================================================\n// A simple particle engine with threaded physics\n// Copyright (c) Marcus Geelnard\n// Copyright (c) Camilla Löwy <elmindreda@glfw.org>\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//    claim that you wrote the original software. If you use this software\n//    in a product, an acknowledgment in the product documentation would\n//    be appreciated but is not required.\n//\n// 2. Altered source versions must be plainly marked as such, and must not\n//    be misrepresented as being the original software.\n//\n// 3. This notice may not be removed or altered from any source\n//    distribution.\n//\n//========================================================================\n\n#if defined(_MSC_VER)\n // Make MS math.h define M_PI\n #define _USE_MATH_DEFINES\n#endif\n\n#include <stdlib.h>\n#include <stdio.h>\n#include <string.h>\n#include <math.h>\n#include <time.h>\n\n#include <tinycthread.h>\n#include <getopt.h>\n#include <linmath.h>\n\n#include <glad/gl.h>\n#define GLFW_INCLUDE_NONE\n#include <GLFW/glfw3.h>\n\n// Define tokens for GL_EXT_separate_specular_color if not already defined\n#ifndef GL_EXT_separate_specular_color\n#define GL_LIGHT_MODEL_COLOR_CONTROL_EXT  0x81F8\n#define GL_SINGLE_COLOR_EXT               0x81F9\n#define GL_SEPARATE_SPECULAR_COLOR_EXT    0x81FA\n#endif // GL_EXT_separate_specular_color\n\n\n//========================================================================\n// Type definitions\n//========================================================================\n\ntypedef struct\n{\n    float x, y, z;\n} Vec3;\n\n// This structure is used for interleaved vertex arrays (see the\n// draw_particles function)\n//\n// NOTE: This structure SHOULD be packed on most systems. It uses 32-bit fields\n// on 32-bit boundaries, and is a multiple of 64 bits in total (6x32=3x64). If\n// it does not work, try using pragmas or whatever to force the structure to be\n// packed.\ntypedef struct\n{\n    GLfloat s, t;         // Texture coordinates\n    GLuint  rgba;         // Color (four ubytes packed into an uint)\n    GLfloat x, y, z;      // Vertex coordinates\n} Vertex;\n\n\n//========================================================================\n// Program control global variables\n//========================================================================\n\n// Window dimensions\nfloat aspect_ratio;\n\n// \"wireframe\" flag (true if we use wireframe view)\nint wireframe;\n\n// Thread synchronization\nstruct {\n    double    t;         // Time (s)\n    float     dt;        // Time since last frame (s)\n    int       p_frame;   // Particle physics frame number\n    int       d_frame;   // Particle draw frame number\n    cnd_t     p_done;    // Condition: particle physics done\n    cnd_t     d_done;    // Condition: particle draw done\n    mtx_t     particles_lock; // Particles data sharing mutex\n} thread_sync;\n\n\n//========================================================================\n// Texture declarations (we hard-code them into the source code, since\n// they are so simple)\n//========================================================================\n\n#define P_TEX_WIDTH  8    // Particle texture dimensions\n#define P_TEX_HEIGHT 8\n#define F_TEX_WIDTH  16   // Floor texture dimensions\n#define F_TEX_HEIGHT 16\n\n// Texture object IDs\nGLuint particle_tex_id, floor_tex_id;\n\n// Particle texture (a simple spot)\nconst unsigned char particle_texture[ P_TEX_WIDTH * P_TEX_HEIGHT ] = {\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n    0x00, 0x00, 0x11, 0x22, 0x22, 0x11, 0x00, 0x00,\n    0x00, 0x11, 0x33, 0x88, 0x77, 0x33, 0x11, 0x00,\n    0x00, 0x22, 0x88, 0xff, 0xee, 0x77, 0x22, 0x00,\n    0x00, 0x22, 0x77, 0xee, 0xff, 0x88, 0x22, 0x00,\n    0x00, 0x11, 0x33, 0x77, 0x88, 0x33, 0x11, 0x00,\n    0x00, 0x00, 0x11, 0x33, 0x22, 0x11, 0x00, 0x00,\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00\n};\n\n// Floor texture (your basic checkered floor)\nconst unsigned char floor_texture[ F_TEX_WIDTH * F_TEX_HEIGHT ] = {\n    0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30,\n    0xff, 0xf0, 0xcc, 0xf0, 0xf0, 0xf0, 0xff, 0xf0, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30,\n    0xf0, 0xcc, 0xee, 0xff, 0xf0, 0xf0, 0xf0, 0xf0, 0x30, 0x66, 0x30, 0x30, 0x30, 0x20, 0x30, 0x30,\n    0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xee, 0xf0, 0xf0, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30,\n    0xf0, 0xf0, 0xf0, 0xf0, 0xcc, 0xf0, 0xf0, 0xf0, 0x30, 0x30, 0x55, 0x30, 0x30, 0x44, 0x30, 0x30,\n    0xf0, 0xdd, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0x33, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30,\n    0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xff, 0xf0, 0xf0, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x60, 0x30,\n    0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0x33, 0x33, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30,\n    0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x33, 0x30, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0,\n    0x30, 0x30, 0x30, 0x30, 0x30, 0x20, 0x30, 0x30, 0xf0, 0xff, 0xf0, 0xf0, 0xdd, 0xf0, 0xf0, 0xff,\n    0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x55, 0x33, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xff, 0xf0, 0xf0,\n    0x30, 0x44, 0x66, 0x30, 0x30, 0x30, 0x30, 0x30, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0,\n    0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0xf0, 0xf0, 0xf0, 0xaa, 0xf0, 0xf0, 0xcc, 0xf0,\n    0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0xff, 0xf0, 0xf0, 0xf0, 0xff, 0xf0, 0xdd, 0xf0,\n    0x30, 0x30, 0x30, 0x77, 0x30, 0x30, 0x30, 0x30, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0,\n    0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0,\n};\n\n\n//========================================================================\n// These are fixed constants that control the particle engine. In a\n// modular world, these values should be variables...\n//========================================================================\n\n// Maximum number of particles\n#define MAX_PARTICLES   3000\n\n// Life span of a particle (in seconds)\n#define LIFE_SPAN       8.f\n\n// A new particle is born every [BIRTH_INTERVAL] second\n#define BIRTH_INTERVAL (LIFE_SPAN/(float)MAX_PARTICLES)\n\n// Particle size (meters)\n#define PARTICLE_SIZE   0.7f\n\n// Gravitational constant (m/s^2)\n#define GRAVITY         9.8f\n\n// Base initial velocity (m/s)\n#define VELOCITY        8.f\n\n// Bounce friction (1.0 = no friction, 0.0 = maximum friction)\n#define FRICTION        0.75f\n\n// \"Fountain\" height (m)\n#define FOUNTAIN_HEIGHT 3.f\n\n// Fountain radius (m)\n#define FOUNTAIN_RADIUS 1.6f\n\n// Minimum delta-time for particle phisics (s)\n#define MIN_DELTA_T     (BIRTH_INTERVAL * 0.5f)\n\n\n//========================================================================\n// Particle system global variables\n//========================================================================\n\n// This structure holds all state for a single particle\ntypedef struct {\n    float x,y,z;     // Position in space\n    float vx,vy,vz;  // Velocity vector\n    float r,g,b;     // Color of particle\n    float life;      // Life of particle (1.0 = newborn, < 0.0 = dead)\n    int   active;    // Tells if this particle is active\n} PARTICLE;\n\n// Global vectors holding all particles. We use two vectors for double\n// buffering.\nstatic PARTICLE particles[MAX_PARTICLES];\n\n// Global variable holding the age of the youngest particle\nstatic float min_age;\n\n// Color of latest born particle (used for fountain lighting)\nstatic float glow_color[4];\n\n// Position of latest born particle (used for fountain lighting)\nstatic float glow_pos[4];\n\n\n//========================================================================\n// Object material and fog configuration constants\n//========================================================================\n\nconst GLfloat fountain_diffuse[4]  = { 0.7f, 1.f,  1.f,  1.f };\nconst GLfloat fountain_specular[4] = {  1.f, 1.f,  1.f,  1.f };\nconst GLfloat fountain_shininess   = 12.f;\nconst GLfloat floor_diffuse[4]     = { 1.f,  0.6f, 0.6f, 1.f };\nconst GLfloat floor_specular[4]    = { 0.6f, 0.6f, 0.6f, 1.f };\nconst GLfloat floor_shininess      = 18.f;\nconst GLfloat fog_color[4]         = { 0.1f, 0.1f, 0.1f, 1.f };\n\n\n//========================================================================\n// Print usage information\n//========================================================================\n\nstatic void usage(void)\n{\n    printf(\"Usage: particles [-bfhs]\\n\");\n    printf(\"Options:\\n\");\n    printf(\" -f   Run in full screen\\n\");\n    printf(\" -h   Display this help\\n\");\n    printf(\" -s   Run program as single thread (default is to use two threads)\\n\");\n    printf(\"\\n\");\n    printf(\"Program runtime controls:\\n\");\n    printf(\" W    Toggle wireframe mode\\n\");\n    printf(\" Esc  Exit program\\n\");\n}\n\n\n//========================================================================\n// Initialize a new particle\n//========================================================================\n\nstatic void init_particle(PARTICLE *p, double t)\n{\n    float xy_angle, velocity;\n\n    // Start position of particle is at the fountain blow-out\n    p->x = 0.f;\n    p->y = 0.f;\n    p->z = FOUNTAIN_HEIGHT;\n\n    // Start velocity is up (Z)...\n    p->vz = 0.7f + (0.3f / 4096.f) * (float) (rand() & 4095);\n\n    // ...and a randomly chosen X/Y direction\n    xy_angle = (2.f * (float) M_PI / 4096.f) * (float) (rand() & 4095);\n    p->vx = 0.4f * (float) cos(xy_angle);\n    p->vy = 0.4f * (float) sin(xy_angle);\n\n    // Scale velocity vector according to a time-varying velocity\n    velocity = VELOCITY * (0.8f + 0.1f * (float) (sin(0.5 * t) + sin(1.31 * t)));\n    p->vx *= velocity;\n    p->vy *= velocity;\n    p->vz *= velocity;\n\n    // Color is time-varying\n    p->r = 0.7f + 0.3f * (float) sin(0.34 * t + 0.1);\n    p->g = 0.6f + 0.4f * (float) sin(0.63 * t + 1.1);\n    p->b = 0.6f + 0.4f * (float) sin(0.91 * t + 2.1);\n\n    // Store settings for fountain glow lighting\n    glow_pos[0] = 0.4f * (float) sin(1.34 * t);\n    glow_pos[1] = 0.4f * (float) sin(3.11 * t);\n    glow_pos[2] = FOUNTAIN_HEIGHT + 1.f;\n    glow_pos[3] = 1.f;\n    glow_color[0] = p->r;\n    glow_color[1] = p->g;\n    glow_color[2] = p->b;\n    glow_color[3] = 1.f;\n\n    // The particle is new-born and active\n    p->life = 1.f;\n    p->active = 1;\n}\n\n\n//========================================================================\n// Update a particle\n//========================================================================\n\n#define FOUNTAIN_R2 (FOUNTAIN_RADIUS+PARTICLE_SIZE/2)*(FOUNTAIN_RADIUS+PARTICLE_SIZE/2)\n\nstatic void update_particle(PARTICLE *p, float dt)\n{\n    // If the particle is not active, we need not do anything\n    if (!p->active)\n        return;\n\n    // The particle is getting older...\n    p->life -= dt * (1.f / LIFE_SPAN);\n\n    // Did the particle die?\n    if (p->life <= 0.f)\n    {\n        p->active = 0;\n        return;\n    }\n\n    // Apply gravity\n    p->vz = p->vz - GRAVITY * dt;\n\n    // Update particle position\n    p->x = p->x + p->vx * dt;\n    p->y = p->y + p->vy * dt;\n    p->z = p->z + p->vz * dt;\n\n    // Simple collision detection + response\n    if (p->vz < 0.f)\n    {\n        // Particles should bounce on the fountain (with friction)\n        if ((p->x * p->x + p->y * p->y) < FOUNTAIN_R2 &&\n            p->z < (FOUNTAIN_HEIGHT + PARTICLE_SIZE / 2))\n        {\n            p->vz = -FRICTION * p->vz;\n            p->z  = FOUNTAIN_HEIGHT + PARTICLE_SIZE / 2 +\n                    FRICTION * (FOUNTAIN_HEIGHT +\n                    PARTICLE_SIZE / 2 - p->z);\n        }\n\n        // Particles should bounce on the floor (with friction)\n        else if (p->z < PARTICLE_SIZE / 2)\n        {\n            p->vz = -FRICTION * p->vz;\n            p->z  = PARTICLE_SIZE / 2 +\n                    FRICTION * (PARTICLE_SIZE / 2 - p->z);\n        }\n    }\n}\n\n\n//========================================================================\n// The main frame for the particle engine. Called once per frame.\n//========================================================================\n\nstatic void particle_engine(double t, float dt)\n{\n    int i;\n    float dt2;\n\n    // Update particles (iterated several times per frame if dt is too large)\n    while (dt > 0.f)\n    {\n        // Calculate delta time for this iteration\n        dt2 = dt < MIN_DELTA_T ? dt : MIN_DELTA_T;\n\n        for (i = 0;  i < MAX_PARTICLES;  i++)\n            update_particle(&particles[i], dt2);\n\n        min_age += dt2;\n\n        // Should we create any new particle(s)?\n        while (min_age >= BIRTH_INTERVAL)\n        {\n            min_age -= BIRTH_INTERVAL;\n\n            // Find a dead particle to replace with a new one\n            for (i = 0;  i < MAX_PARTICLES;  i++)\n            {\n                if (!particles[i].active)\n                {\n                    init_particle(&particles[i], t + min_age);\n                    update_particle(&particles[i], min_age);\n                    break;\n                }\n            }\n        }\n\n        dt -= dt2;\n    }\n}\n\n\n//========================================================================\n// Draw all active particles. We use OpenGL 1.1 vertex\n// arrays for this in order to accelerate the drawing.\n//========================================================================\n\n#define BATCH_PARTICLES 70  // Number of particles to draw in each batch\n                            // (70 corresponds to 7.5 KB = will not blow\n                            // the L1 data cache on most CPUs)\n#define PARTICLE_VERTS  4   // Number of vertices per particle\n\nstatic void draw_particles(GLFWwindow* window, double t, float dt)\n{\n    int i, particle_count;\n    Vertex vertex_array[BATCH_PARTICLES * PARTICLE_VERTS];\n    Vertex* vptr;\n    float alpha;\n    GLuint rgba;\n    Vec3 quad_lower_left, quad_lower_right;\n    GLfloat mat[16];\n    PARTICLE* pptr;\n\n    // Here comes the real trick with flat single primitive objects (s.c.\n    // \"billboards\"): We must rotate the textured primitive so that it\n    // always faces the viewer (is coplanar with the view-plane).\n    // We:\n    //   1) Create the primitive around origo (0,0,0)\n    //   2) Rotate it so that it is coplanar with the view plane\n    //   3) Translate it according to the particle position\n    // Note that 1) and 2) is the same for all particles (done only once).\n\n    // Get modelview matrix. We will only use the upper left 3x3 part of\n    // the matrix, which represents the rotation.\n    glGetFloatv(GL_MODELVIEW_MATRIX, mat);\n\n    // 1) & 2) We do it in one swift step:\n    // Although not obvious, the following six lines represent two matrix/\n    // vector multiplications. The matrix is the inverse 3x3 rotation\n    // matrix (i.e. the transpose of the same matrix), and the two vectors\n    // represent the lower left corner of the quad, PARTICLE_SIZE/2 *\n    // (-1,-1,0), and the lower right corner, PARTICLE_SIZE/2 * (1,-1,0).\n    // The upper left/right corners of the quad is always the negative of\n    // the opposite corners (regardless of rotation).\n    quad_lower_left.x = (-PARTICLE_SIZE / 2) * (mat[0] + mat[1]);\n    quad_lower_left.y = (-PARTICLE_SIZE / 2) * (mat[4] + mat[5]);\n    quad_lower_left.z = (-PARTICLE_SIZE / 2) * (mat[8] + mat[9]);\n    quad_lower_right.x = (PARTICLE_SIZE / 2) * (mat[0] - mat[1]);\n    quad_lower_right.y = (PARTICLE_SIZE / 2) * (mat[4] - mat[5]);\n    quad_lower_right.z = (PARTICLE_SIZE / 2) * (mat[8] - mat[9]);\n\n    // Don't update z-buffer, since all particles are transparent!\n    glDepthMask(GL_FALSE);\n\n    glEnable(GL_BLEND);\n    glBlendFunc(GL_SRC_ALPHA, GL_ONE);\n\n    // Select particle texture\n    if (!wireframe)\n    {\n        glEnable(GL_TEXTURE_2D);\n        glBindTexture(GL_TEXTURE_2D, particle_tex_id);\n    }\n\n    // Set up vertex arrays. We use interleaved arrays, which is easier to\n    // handle (in most situations) and it gives a linear memory access\n    // access pattern (which may give better performance in some\n    // situations). GL_T2F_C4UB_V3F means: 2 floats for texture coords,\n    // 4 ubytes for color and 3 floats for vertex coord (in that order).\n    // Most OpenGL cards / drivers are optimized for this format.\n    glInterleavedArrays(GL_T2F_C4UB_V3F, 0, vertex_array);\n\n    // Wait for particle physics thread to be done\n    mtx_lock(&thread_sync.particles_lock);\n    while (!glfwWindowShouldClose(window) &&\n            thread_sync.p_frame <= thread_sync.d_frame)\n    {\n        struct timespec ts;\n        clock_gettime(CLOCK_REALTIME, &ts);\n        ts.tv_nsec += 100 * 1000 * 1000;\n        ts.tv_sec += ts.tv_nsec / (1000 * 1000 * 1000);\n        ts.tv_nsec %= 1000 * 1000 * 1000;\n        cnd_timedwait(&thread_sync.p_done, &thread_sync.particles_lock, &ts);\n    }\n\n    // Store the frame time and delta time for the physics thread\n    thread_sync.t = t;\n    thread_sync.dt = dt;\n\n    // Update frame counter\n    thread_sync.d_frame++;\n\n    // Loop through all particles and build vertex arrays.\n    particle_count = 0;\n    vptr = vertex_array;\n    pptr = particles;\n\n    for (i = 0;  i < MAX_PARTICLES;  i++)\n    {\n        if (pptr->active)\n        {\n            // Calculate particle intensity (we set it to max during 75%\n            // of its life, then it fades out)\n            alpha =  4.f * pptr->life;\n            if (alpha > 1.f)\n                alpha = 1.f;\n\n            // Convert color from float to 8-bit (store it in a 32-bit\n            // integer using endian independent type casting)\n            ((GLubyte*) &rgba)[0] = (GLubyte)(pptr->r * 255.f);\n            ((GLubyte*) &rgba)[1] = (GLubyte)(pptr->g * 255.f);\n            ((GLubyte*) &rgba)[2] = (GLubyte)(pptr->b * 255.f);\n            ((GLubyte*) &rgba)[3] = (GLubyte)(alpha * 255.f);\n\n            // 3) Translate the quad to the correct position in modelview\n            // space and store its parameters in vertex arrays (we also\n            // store texture coord and color information for each vertex).\n\n            // Lower left corner\n            vptr->s    = 0.f;\n            vptr->t    = 0.f;\n            vptr->rgba = rgba;\n            vptr->x    = pptr->x + quad_lower_left.x;\n            vptr->y    = pptr->y + quad_lower_left.y;\n            vptr->z    = pptr->z + quad_lower_left.z;\n            vptr ++;\n\n            // Lower right corner\n            vptr->s    = 1.f;\n            vptr->t    = 0.f;\n            vptr->rgba = rgba;\n            vptr->x    = pptr->x + quad_lower_right.x;\n            vptr->y    = pptr->y + quad_lower_right.y;\n            vptr->z    = pptr->z + quad_lower_right.z;\n            vptr ++;\n\n            // Upper right corner\n            vptr->s    = 1.f;\n            vptr->t    = 1.f;\n            vptr->rgba = rgba;\n            vptr->x    = pptr->x - quad_lower_left.x;\n            vptr->y    = pptr->y - quad_lower_left.y;\n            vptr->z    = pptr->z - quad_lower_left.z;\n            vptr ++;\n\n            // Upper left corner\n            vptr->s    = 0.f;\n            vptr->t    = 1.f;\n            vptr->rgba = rgba;\n            vptr->x    = pptr->x - quad_lower_right.x;\n            vptr->y    = pptr->y - quad_lower_right.y;\n            vptr->z    = pptr->z - quad_lower_right.z;\n            vptr ++;\n\n            // Increase count of drawable particles\n            particle_count ++;\n        }\n\n        // If we have filled up one batch of particles, draw it as a set\n        // of quads using glDrawArrays.\n        if (particle_count >= BATCH_PARTICLES)\n        {\n            // The first argument tells which primitive type we use (QUAD)\n            // The second argument tells the index of the first vertex (0)\n            // The last argument is the vertex count\n            glDrawArrays(GL_QUADS, 0, PARTICLE_VERTS * particle_count);\n            particle_count = 0;\n            vptr = vertex_array;\n        }\n\n        // Next particle\n        pptr++;\n    }\n\n    // We are done with the particle data\n    mtx_unlock(&thread_sync.particles_lock);\n    cnd_signal(&thread_sync.d_done);\n\n    // Draw final batch of particles (if any)\n    glDrawArrays(GL_QUADS, 0, PARTICLE_VERTS * particle_count);\n\n    // Disable vertex arrays (Note: glInterleavedArrays implicitly called\n    // glEnableClientState for vertex, texture coord and color arrays)\n    glDisableClientState(GL_VERTEX_ARRAY);\n    glDisableClientState(GL_TEXTURE_COORD_ARRAY);\n    glDisableClientState(GL_COLOR_ARRAY);\n\n    glDisable(GL_TEXTURE_2D);\n    glDisable(GL_BLEND);\n\n    glDepthMask(GL_TRUE);\n}\n\n\n//========================================================================\n// Fountain geometry specification\n//========================================================================\n\n#define FOUNTAIN_SIDE_POINTS 14\n#define FOUNTAIN_SWEEP_STEPS 32\n\nstatic const float fountain_side[FOUNTAIN_SIDE_POINTS * 2] =\n{\n    1.2f, 0.f,  1.f, 0.2f,  0.41f, 0.3f, 0.4f, 0.35f,\n    0.4f, 1.95f, 0.41f, 2.f, 0.8f, 2.2f,  1.2f, 2.4f,\n    1.5f, 2.7f,  1.55f,2.95f, 1.6f, 3.f,  1.f, 3.f,\n    0.5f, 3.f,  0.f, 3.f\n};\n\nstatic const float fountain_normal[FOUNTAIN_SIDE_POINTS * 2] =\n{\n    1.0000f, 0.0000f,  0.6428f, 0.7660f,  0.3420f, 0.9397f,  1.0000f, 0.0000f,\n    1.0000f, 0.0000f,  0.3420f,-0.9397f,  0.4226f,-0.9063f,  0.5000f,-0.8660f,\n    0.7660f,-0.6428f,  0.9063f,-0.4226f,  0.0000f,1.00000f,  0.0000f,1.00000f,\n    0.0000f,1.00000f,  0.0000f,1.00000f\n};\n\n\n//========================================================================\n// Draw a fountain\n//========================================================================\n\nstatic void draw_fountain(void)\n{\n    static GLuint fountain_list = 0;\n    double angle;\n    float  x, y;\n    int m, n;\n\n    // The first time, we build the fountain display list\n    if (!fountain_list)\n    {\n        fountain_list = glGenLists(1);\n        glNewList(fountain_list, GL_COMPILE_AND_EXECUTE);\n\n        glMaterialfv(GL_FRONT, GL_DIFFUSE, fountain_diffuse);\n        glMaterialfv(GL_FRONT, GL_SPECULAR, fountain_specular);\n        glMaterialf(GL_FRONT, GL_SHININESS, fountain_shininess);\n\n        // Build fountain using triangle strips\n        for (n = 0;  n < FOUNTAIN_SIDE_POINTS - 1;  n++)\n        {\n            glBegin(GL_TRIANGLE_STRIP);\n            for (m = 0;  m <= FOUNTAIN_SWEEP_STEPS;  m++)\n            {\n                angle = (double) m * (2.0 * M_PI / (double) FOUNTAIN_SWEEP_STEPS);\n                x = (float) cos(angle);\n                y = (float) sin(angle);\n\n                // Draw triangle strip\n                glNormal3f(x * fountain_normal[n * 2 + 2],\n                           y * fountain_normal[n * 2 + 2],\n                           fountain_normal[n * 2 + 3]);\n                glVertex3f(x * fountain_side[n * 2 + 2],\n                           y * fountain_side[n * 2 + 2],\n                           fountain_side[n * 2 +3 ]);\n                glNormal3f(x * fountain_normal[n * 2],\n                           y * fountain_normal[n * 2],\n                           fountain_normal[n * 2 + 1]);\n                glVertex3f(x * fountain_side[n * 2],\n                           y * fountain_side[n * 2],\n                           fountain_side[n * 2 + 1]);\n            }\n\n            glEnd();\n        }\n\n        glEndList();\n    }\n    else\n        glCallList(fountain_list);\n}\n\n\n//========================================================================\n// Recursive function for building variable tessellated floor\n//========================================================================\n\nstatic void tessellate_floor(float x1, float y1, float x2, float y2, int depth)\n{\n    float delta, x, y;\n\n    // Last recursion?\n    if (depth >= 5)\n        delta = 999999.f;\n    else\n    {\n        x = (float) (fabs(x1) < fabs(x2) ? fabs(x1) : fabs(x2));\n        y = (float) (fabs(y1) < fabs(y2) ? fabs(y1) : fabs(y2));\n        delta = x*x + y*y;\n    }\n\n    // Recurse further?\n    if (delta < 0.1f)\n    {\n        x = (x1 + x2) * 0.5f;\n        y = (y1 + y2) * 0.5f;\n        tessellate_floor(x1, y1,  x,  y, depth + 1);\n        tessellate_floor(x, y1, x2,  y, depth + 1);\n        tessellate_floor(x1,  y,  x, y2, depth + 1);\n        tessellate_floor(x,  y, x2, y2, depth + 1);\n    }\n    else\n    {\n        glTexCoord2f(x1 * 30.f, y1 * 30.f);\n        glVertex3f(  x1 * 80.f, y1 * 80.f, 0.f);\n        glTexCoord2f(x2 * 30.f, y1 * 30.f);\n        glVertex3f(  x2 * 80.f, y1 * 80.f, 0.f);\n        glTexCoord2f(x2 * 30.f, y2 * 30.f);\n        glVertex3f(  x2 * 80.f, y2 * 80.f, 0.f);\n        glTexCoord2f(x1 * 30.f, y2 * 30.f);\n        glVertex3f(  x1 * 80.f, y2 * 80.f, 0.f);\n    }\n}\n\n\n//========================================================================\n// Draw floor. We build the floor recursively and let the tessellation in the\n// center (near x,y=0,0) be high, while the tessellation around the edges be\n// low.\n//========================================================================\n\nstatic void draw_floor(void)\n{\n    static GLuint floor_list = 0;\n\n    if (!wireframe)\n    {\n        glEnable(GL_TEXTURE_2D);\n        glBindTexture(GL_TEXTURE_2D, floor_tex_id);\n    }\n\n    // The first time, we build the floor display list\n    if (!floor_list)\n    {\n        floor_list = glGenLists(1);\n        glNewList(floor_list, GL_COMPILE_AND_EXECUTE);\n\n        glMaterialfv(GL_FRONT, GL_DIFFUSE, floor_diffuse);\n        glMaterialfv(GL_FRONT, GL_SPECULAR, floor_specular);\n        glMaterialf(GL_FRONT, GL_SHININESS, floor_shininess);\n\n        // Draw floor as a bunch of triangle strips (high tessellation\n        // improves lighting)\n        glNormal3f(0.f, 0.f, 1.f);\n        glBegin(GL_QUADS);\n        tessellate_floor(-1.f, -1.f, 0.f, 0.f, 0);\n        tessellate_floor( 0.f, -1.f, 1.f, 0.f, 0);\n        tessellate_floor( 0.f,  0.f, 1.f, 1.f, 0);\n        tessellate_floor(-1.f,  0.f, 0.f, 1.f, 0);\n        glEnd();\n\n        glEndList();\n    }\n    else\n        glCallList(floor_list);\n\n    glDisable(GL_TEXTURE_2D);\n\n}\n\n\n//========================================================================\n// Position and configure light sources\n//========================================================================\n\nstatic void setup_lights(void)\n{\n    float l1pos[4], l1amb[4], l1dif[4], l1spec[4];\n    float l2pos[4], l2amb[4], l2dif[4], l2spec[4];\n\n    // Set light source 1 parameters\n    l1pos[0] =  0.f;  l1pos[1] = -9.f; l1pos[2] =   8.f;  l1pos[3] = 1.f;\n    l1amb[0] = 0.2f;  l1amb[1] = 0.2f;  l1amb[2] = 0.2f;  l1amb[3] = 1.f;\n    l1dif[0] = 0.8f;  l1dif[1] = 0.4f;  l1dif[2] = 0.2f;  l1dif[3] = 1.f;\n    l1spec[0] = 1.f; l1spec[1] = 0.6f; l1spec[2] = 0.2f; l1spec[3] = 0.f;\n\n    // Set light source 2 parameters\n    l2pos[0] =  -15.f; l2pos[1] =  12.f; l2pos[2] = 1.5f; l2pos[3] =  1.f;\n    l2amb[0] =    0.f; l2amb[1] =   0.f; l2amb[2] =  0.f; l2amb[3] =  1.f;\n    l2dif[0] =   0.2f; l2dif[1] =  0.4f; l2dif[2] = 0.8f; l2dif[3] =  1.f;\n    l2spec[0] =  0.2f; l2spec[1] = 0.6f; l2spec[2] = 1.f; l2spec[3] = 0.f;\n\n    glLightfv(GL_LIGHT1, GL_POSITION, l1pos);\n    glLightfv(GL_LIGHT1, GL_AMBIENT, l1amb);\n    glLightfv(GL_LIGHT1, GL_DIFFUSE, l1dif);\n    glLightfv(GL_LIGHT1, GL_SPECULAR, l1spec);\n    glLightfv(GL_LIGHT2, GL_POSITION, l2pos);\n    glLightfv(GL_LIGHT2, GL_AMBIENT, l2amb);\n    glLightfv(GL_LIGHT2, GL_DIFFUSE, l2dif);\n    glLightfv(GL_LIGHT2, GL_SPECULAR, l2spec);\n    glLightfv(GL_LIGHT3, GL_POSITION, glow_pos);\n    glLightfv(GL_LIGHT3, GL_DIFFUSE, glow_color);\n    glLightfv(GL_LIGHT3, GL_SPECULAR, glow_color);\n\n    glEnable(GL_LIGHT1);\n    glEnable(GL_LIGHT2);\n    glEnable(GL_LIGHT3);\n}\n\n\n//========================================================================\n// Main rendering function\n//========================================================================\n\nstatic void draw_scene(GLFWwindow* window, double t)\n{\n    double xpos, ypos, zpos, angle_x, angle_y, angle_z;\n    static double t_old = 0.0;\n    float dt;\n    mat4x4 projection;\n\n    // Calculate frame-to-frame delta time\n    dt = (float) (t - t_old);\n    t_old = t;\n\n    mat4x4_perspective(projection,\n                       65.f * (float) M_PI / 180.f,\n                       aspect_ratio,\n                       1.0, 60.0);\n\n    glClearColor(0.1f, 0.1f, 0.1f, 1.f);\n    glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);\n\n    glMatrixMode(GL_PROJECTION);\n    glLoadMatrixf((const GLfloat*) projection);\n\n    // Setup camera\n    glMatrixMode(GL_MODELVIEW);\n    glLoadIdentity();\n\n    // Rotate camera\n    angle_x = 90.0 - 10.0;\n    angle_y = 10.0 * sin(0.3 * t);\n    angle_z = 10.0 * t;\n    glRotated(-angle_x, 1.0, 0.0, 0.0);\n    glRotated(-angle_y, 0.0, 1.0, 0.0);\n    glRotated(-angle_z, 0.0, 0.0, 1.0);\n\n    // Translate camera\n    xpos =  15.0 * sin((M_PI / 180.0) * angle_z) +\n             2.0 * sin((M_PI / 180.0) * 3.1 * t);\n    ypos = -15.0 * cos((M_PI / 180.0) * angle_z) +\n             2.0 * cos((M_PI / 180.0) * 2.9 * t);\n    zpos = 4.0 + 2.0 * cos((M_PI / 180.0) * 4.9 * t);\n    glTranslated(-xpos, -ypos, -zpos);\n\n    glFrontFace(GL_CCW);\n    glCullFace(GL_BACK);\n    glEnable(GL_CULL_FACE);\n\n    setup_lights();\n    glEnable(GL_LIGHTING);\n\n    glEnable(GL_FOG);\n    glFogi(GL_FOG_MODE, GL_EXP);\n    glFogf(GL_FOG_DENSITY, 0.05f);\n    glFogfv(GL_FOG_COLOR, fog_color);\n\n    draw_floor();\n\n    glEnable(GL_DEPTH_TEST);\n    glDepthFunc(GL_LEQUAL);\n    glDepthMask(GL_TRUE);\n\n    draw_fountain();\n\n    glDisable(GL_LIGHTING);\n    glDisable(GL_FOG);\n\n    // Particles must be drawn after all solid objects have been drawn\n    draw_particles(window, t, dt);\n\n    // Z-buffer not needed anymore\n    glDisable(GL_DEPTH_TEST);\n}\n\n\n//========================================================================\n// Window resize callback function\n//========================================================================\n\nstatic void resize_callback(GLFWwindow* window, int width, int height)\n{\n    glViewport(0, 0, width, height);\n    aspect_ratio = height ? width / (float) height : 1.f;\n}\n\n\n//========================================================================\n// Key callback functions\n//========================================================================\n\nstatic void key_callback(GLFWwindow* window, int key, int scancode, int action, int mods)\n{\n    if (action == GLFW_PRESS)\n    {\n        switch (key)\n        {\n            case GLFW_KEY_ESCAPE:\n                glfwSetWindowShouldClose(window, GLFW_TRUE);\n                break;\n            case GLFW_KEY_W:\n                wireframe = !wireframe;\n                glPolygonMode(GL_FRONT_AND_BACK,\n                              wireframe ? GL_LINE : GL_FILL);\n                break;\n            default:\n                break;\n        }\n    }\n}\n\n\n//========================================================================\n// Thread for updating particle physics\n//========================================================================\n\nstatic int physics_thread_main(void* arg)\n{\n    GLFWwindow* window = arg;\n\n    for (;;)\n    {\n        mtx_lock(&thread_sync.particles_lock);\n\n        // Wait for particle drawing to be done\n        while (!glfwWindowShouldClose(window) &&\n               thread_sync.p_frame > thread_sync.d_frame)\n        {\n            struct timespec ts;\n            clock_gettime(CLOCK_REALTIME, &ts);\n            ts.tv_nsec += 100 * 1000 * 1000;\n            ts.tv_sec += ts.tv_nsec / (1000 * 1000 * 1000);\n            ts.tv_nsec %= 1000 * 1000 * 1000;\n            cnd_timedwait(&thread_sync.d_done, &thread_sync.particles_lock, &ts);\n        }\n\n        if (glfwWindowShouldClose(window))\n            break;\n\n        // Update particles\n        particle_engine(thread_sync.t, thread_sync.dt);\n\n        // Update frame counter\n        thread_sync.p_frame++;\n\n        // Unlock mutex and signal drawing thread\n        mtx_unlock(&thread_sync.particles_lock);\n        cnd_signal(&thread_sync.p_done);\n    }\n\n    return 0;\n}\n\n\n//========================================================================\n// main\n//========================================================================\n\nint main(int argc, char** argv)\n{\n    int ch, width, height;\n    thrd_t physics_thread = 0;\n    GLFWwindow* window;\n    GLFWmonitor* monitor = NULL;\n\n    if (!glfwInit())\n    {\n        fprintf(stderr, \"Failed to initialize GLFW\\n\");\n        exit(EXIT_FAILURE);\n    }\n\n    while ((ch = getopt(argc, argv, \"fh\")) != -1)\n    {\n        switch (ch)\n        {\n            case 'f':\n                monitor = glfwGetPrimaryMonitor();\n                break;\n            case 'h':\n                usage();\n                exit(EXIT_SUCCESS);\n        }\n    }\n\n    if (monitor)\n    {\n        const GLFWvidmode* mode = glfwGetVideoMode(monitor);\n\n        glfwWindowHint(GLFW_RED_BITS, mode->redBits);\n        glfwWindowHint(GLFW_GREEN_BITS, mode->greenBits);\n        glfwWindowHint(GLFW_BLUE_BITS, mode->blueBits);\n        glfwWindowHint(GLFW_REFRESH_RATE, mode->refreshRate);\n\n        width  = mode->width;\n        height = mode->height;\n    }\n    else\n    {\n        width  = 640;\n        height = 480;\n    }\n\n    window = glfwCreateWindow(width, height, \"Particle Engine\", monitor, NULL);\n    if (!window)\n    {\n        fprintf(stderr, \"Failed to create GLFW window\\n\");\n        glfwTerminate();\n        exit(EXIT_FAILURE);\n    }\n\n    if (monitor)\n        glfwSetInputMode(window, GLFW_CURSOR, GLFW_CURSOR_DISABLED);\n\n    glfwMakeContextCurrent(window);\n    gladLoadGL(glfwGetProcAddress);\n    glfwSwapInterval(1);\n\n    glfwSetFramebufferSizeCallback(window, resize_callback);\n    glfwSetKeyCallback(window, key_callback);\n\n    // Set initial aspect ratio\n    glfwGetFramebufferSize(window, &width, &height);\n    resize_callback(window, width, height);\n\n    // Upload particle texture\n    glGenTextures(1, &particle_tex_id);\n    glBindTexture(GL_TEXTURE_2D, particle_tex_id);\n    glPixelStorei(GL_UNPACK_ALIGNMENT, 1);\n    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP);\n    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP);\n    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);\n    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);\n    glTexImage2D(GL_TEXTURE_2D, 0, GL_LUMINANCE, P_TEX_WIDTH, P_TEX_HEIGHT,\n                 0, GL_LUMINANCE, GL_UNSIGNED_BYTE, particle_texture);\n\n    // Upload floor texture\n    glGenTextures(1, &floor_tex_id);\n    glBindTexture(GL_TEXTURE_2D, floor_tex_id);\n    glPixelStorei(GL_UNPACK_ALIGNMENT, 1);\n    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);\n    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);\n    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);\n    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);\n    glTexImage2D(GL_TEXTURE_2D, 0, GL_LUMINANCE, F_TEX_WIDTH, F_TEX_HEIGHT,\n                 0, GL_LUMINANCE, GL_UNSIGNED_BYTE, floor_texture);\n\n    if (glfwExtensionSupported(\"GL_EXT_separate_specular_color\"))\n    {\n        glLightModeli(GL_LIGHT_MODEL_COLOR_CONTROL_EXT,\n                      GL_SEPARATE_SPECULAR_COLOR_EXT);\n    }\n\n    // Set filled polygon mode as default (not wireframe)\n    glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);\n    wireframe = 0;\n\n    // Set initial times\n    thread_sync.t  = 0.0;\n    thread_sync.dt = 0.001f;\n    thread_sync.p_frame = 0;\n    thread_sync.d_frame = 0;\n\n    mtx_init(&thread_sync.particles_lock, mtx_timed);\n    cnd_init(&thread_sync.p_done);\n    cnd_init(&thread_sync.d_done);\n\n    if (thrd_create(&physics_thread, physics_thread_main, window) != thrd_success)\n    {\n        glfwTerminate();\n        exit(EXIT_FAILURE);\n    }\n\n    glfwSetTime(0.0);\n\n    while (!glfwWindowShouldClose(window))\n    {\n        draw_scene(window, glfwGetTime());\n\n        glfwSwapBuffers(window);\n        glfwPollEvents();\n    }\n\n    thrd_join(physics_thread, NULL);\n\n    glfwDestroyWindow(window);\n    glfwTerminate();\n\n    exit(EXIT_SUCCESS);\n}\n\n"
  },
  {
    "path": "thirdparty/glfw/examples/sharing.c",
    "content": "//========================================================================\n// Context sharing example\n// Copyright (c) Camilla Löwy <elmindreda@glfw.org>\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//    claim that you wrote the original software. If you use this software\n//    in a product, an acknowledgment in the product documentation would\n//    be appreciated but is not required.\n//\n// 2. Altered source versions must be plainly marked as such, and must not\n//    be misrepresented as being the original software.\n//\n// 3. This notice may not be removed or altered from any source\n//    distribution.\n//\n//========================================================================\n\n#include <glad/gl.h>\n#define GLFW_INCLUDE_NONE\n#include <GLFW/glfw3.h>\n\n#include <stdio.h>\n#include <stdlib.h>\n\n#include \"getopt.h\"\n#include \"linmath.h\"\n\nstatic const char* vertex_shader_text =\n\"#version 110\\n\"\n\"uniform mat4 MVP;\\n\"\n\"attribute vec2 vPos;\\n\"\n\"varying vec2 texcoord;\\n\"\n\"void main()\\n\"\n\"{\\n\"\n\"    gl_Position = MVP * vec4(vPos, 0.0, 1.0);\\n\"\n\"    texcoord = vPos;\\n\"\n\"}\\n\";\n\nstatic const char* fragment_shader_text =\n\"#version 110\\n\"\n\"uniform sampler2D texture;\\n\"\n\"uniform vec3 color;\\n\"\n\"varying vec2 texcoord;\\n\"\n\"void main()\\n\"\n\"{\\n\"\n\"    gl_FragColor = vec4(color * texture2D(texture, texcoord).rgb, 1.0);\\n\"\n\"}\\n\";\n\nstatic const vec2 vertices[4] =\n{\n    { 0.f, 0.f },\n    { 1.f, 0.f },\n    { 1.f, 1.f },\n    { 0.f, 1.f }\n};\n\nstatic void error_callback(int error, const char* description)\n{\n    fprintf(stderr, \"Error: %s\\n\", description);\n}\n\nstatic void key_callback(GLFWwindow* window, int key, int scancode, int action, int mods)\n{\n    if (action == GLFW_PRESS && key == GLFW_KEY_ESCAPE)\n        glfwSetWindowShouldClose(window, GLFW_TRUE);\n}\n\nint main(int argc, char** argv)\n{\n    GLFWwindow* windows[2];\n    GLuint texture, program, vertex_buffer;\n    GLint mvp_location, vpos_location, color_location, texture_location;\n\n    glfwSetErrorCallback(error_callback);\n\n    if (!glfwInit())\n        exit(EXIT_FAILURE);\n\n    glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 2);\n    glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 0);\n\n    windows[0] = glfwCreateWindow(400, 400, \"First\", NULL, NULL);\n    if (!windows[0])\n    {\n        glfwTerminate();\n        exit(EXIT_FAILURE);\n    }\n\n    glfwSetKeyCallback(windows[0], key_callback);\n\n    glfwMakeContextCurrent(windows[0]);\n\n    // Only enable vsync for the first of the windows to be swapped to\n    // avoid waiting out the interval for each window\n    glfwSwapInterval(1);\n\n    // The contexts are created with the same APIs so the function\n    // pointers should be re-usable between them\n    gladLoadGL(glfwGetProcAddress);\n\n    // Create the OpenGL objects inside the first context, created above\n    // All objects will be shared with the second context, created below\n    {\n        int x, y;\n        char pixels[16 * 16];\n        GLuint vertex_shader, fragment_shader;\n\n        glGenTextures(1, &texture);\n        glBindTexture(GL_TEXTURE_2D, texture);\n\n        srand((unsigned int) glfwGetTimerValue());\n\n        for (y = 0;  y < 16;  y++)\n        {\n            for (x = 0;  x < 16;  x++)\n                pixels[y * 16 + x] = rand() % 256;\n        }\n\n        glTexImage2D(GL_TEXTURE_2D, 0, GL_LUMINANCE, 16, 16, 0, GL_LUMINANCE, GL_UNSIGNED_BYTE, pixels);\n        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);\n        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);\n\n        vertex_shader = glCreateShader(GL_VERTEX_SHADER);\n        glShaderSource(vertex_shader, 1, &vertex_shader_text, NULL);\n        glCompileShader(vertex_shader);\n\n        fragment_shader = glCreateShader(GL_FRAGMENT_SHADER);\n        glShaderSource(fragment_shader, 1, &fragment_shader_text, NULL);\n        glCompileShader(fragment_shader);\n\n        program = glCreateProgram();\n        glAttachShader(program, vertex_shader);\n        glAttachShader(program, fragment_shader);\n        glLinkProgram(program);\n\n        mvp_location = glGetUniformLocation(program, \"MVP\");\n        color_location = glGetUniformLocation(program, \"color\");\n        texture_location = glGetUniformLocation(program, \"texture\");\n        vpos_location = glGetAttribLocation(program, \"vPos\");\n\n        glGenBuffers(1, &vertex_buffer);\n        glBindBuffer(GL_ARRAY_BUFFER, vertex_buffer);\n        glBufferData(GL_ARRAY_BUFFER, sizeof(vertices), vertices, GL_STATIC_DRAW);\n    }\n\n    glUseProgram(program);\n    glUniform1i(texture_location, 0);\n\n    glEnable(GL_TEXTURE_2D);\n    glBindTexture(GL_TEXTURE_2D, texture);\n\n    glBindBuffer(GL_ARRAY_BUFFER, vertex_buffer);\n    glEnableVertexAttribArray(vpos_location);\n    glVertexAttribPointer(vpos_location, 2, GL_FLOAT, GL_FALSE,\n                          sizeof(vertices[0]), (void*) 0);\n\n    windows[1] = glfwCreateWindow(400, 400, \"Second\", NULL, windows[0]);\n    if (!windows[1])\n    {\n        glfwTerminate();\n        exit(EXIT_FAILURE);\n    }\n\n    // Place the second window to the right of the first\n    {\n        int xpos, ypos, left, right, width;\n\n        glfwGetWindowSize(windows[0], &width, NULL);\n        glfwGetWindowFrameSize(windows[0], &left, NULL, &right, NULL);\n        glfwGetWindowPos(windows[0], &xpos, &ypos);\n\n        glfwSetWindowPos(windows[1], xpos + width + left + right, ypos);\n    }\n\n    glfwSetKeyCallback(windows[1], key_callback);\n\n    glfwMakeContextCurrent(windows[1]);\n\n    // While objects are shared, the global context state is not and will\n    // need to be set up for each context\n\n    glUseProgram(program);\n\n    glEnable(GL_TEXTURE_2D);\n    glBindTexture(GL_TEXTURE_2D, texture);\n\n    glBindBuffer(GL_ARRAY_BUFFER, vertex_buffer);\n    glEnableVertexAttribArray(vpos_location);\n    glVertexAttribPointer(vpos_location, 2, GL_FLOAT, GL_FALSE,\n                          sizeof(vertices[0]), (void*) 0);\n\n    while (!glfwWindowShouldClose(windows[0]) &&\n           !glfwWindowShouldClose(windows[1]))\n    {\n        int i;\n        const vec3 colors[2] =\n        {\n            { 0.8f, 0.4f, 1.f },\n            { 0.3f, 0.4f, 1.f }\n        };\n\n        for (i = 0;  i < 2;  i++)\n        {\n            int width, height;\n            mat4x4 mvp;\n\n            glfwGetFramebufferSize(windows[i], &width, &height);\n            glfwMakeContextCurrent(windows[i]);\n\n            glViewport(0, 0, width, height);\n\n            mat4x4_ortho(mvp, 0.f, 1.f, 0.f, 1.f, 0.f, 1.f);\n            glUniformMatrix4fv(mvp_location, 1, GL_FALSE, (const GLfloat*) mvp);\n            glUniform3fv(color_location, 1, colors[i]);\n            glDrawArrays(GL_TRIANGLE_FAN, 0, 4);\n\n            glfwSwapBuffers(windows[i]);\n        }\n\n        glfwWaitEvents();\n    }\n\n    glfwTerminate();\n    exit(EXIT_SUCCESS);\n}\n\n"
  },
  {
    "path": "thirdparty/glfw/examples/simple.c",
    "content": "//========================================================================\n// Simple GLFW example\n// Copyright (c) Camilla Löwy <elmindreda@glfw.org>\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//    claim that you wrote the original software. If you use this software\n//    in a product, an acknowledgment in the product documentation would\n//    be appreciated but is not required.\n//\n// 2. Altered source versions must be plainly marked as such, and must not\n//    be misrepresented as being the original software.\n//\n// 3. This notice may not be removed or altered from any source\n//    distribution.\n//\n//========================================================================\n//! [code]\n\n#include <glad/gl.h>\n#define GLFW_INCLUDE_NONE\n#include <GLFW/glfw3.h>\n\n#include \"linmath.h\"\n\n#include <stdlib.h>\n#include <stdio.h>\n\nstatic const struct\n{\n    float x, y;\n    float r, g, b;\n} vertices[3] =\n{\n    { -0.6f, -0.4f, 1.f, 0.f, 0.f },\n    {  0.6f, -0.4f, 0.f, 1.f, 0.f },\n    {   0.f,  0.6f, 0.f, 0.f, 1.f }\n};\n\nstatic const char* vertex_shader_text =\n\"#version 110\\n\"\n\"uniform mat4 MVP;\\n\"\n\"attribute vec3 vCol;\\n\"\n\"attribute vec2 vPos;\\n\"\n\"varying vec3 color;\\n\"\n\"void main()\\n\"\n\"{\\n\"\n\"    gl_Position = MVP * vec4(vPos, 0.0, 1.0);\\n\"\n\"    color = vCol;\\n\"\n\"}\\n\";\n\nstatic const char* fragment_shader_text =\n\"#version 110\\n\"\n\"varying vec3 color;\\n\"\n\"void main()\\n\"\n\"{\\n\"\n\"    gl_FragColor = vec4(color, 1.0);\\n\"\n\"}\\n\";\n\nstatic void error_callback(int error, const char* description)\n{\n    fprintf(stderr, \"Error: %s\\n\", description);\n}\n\nstatic void key_callback(GLFWwindow* window, int key, int scancode, int action, int mods)\n{\n    if (key == GLFW_KEY_ESCAPE && action == GLFW_PRESS)\n        glfwSetWindowShouldClose(window, GLFW_TRUE);\n}\n\nint main(void)\n{\n    GLFWwindow* window;\n    GLuint vertex_buffer, vertex_shader, fragment_shader, program;\n    GLint mvp_location, vpos_location, vcol_location;\n\n    glfwSetErrorCallback(error_callback);\n\n    if (!glfwInit())\n        exit(EXIT_FAILURE);\n\n    glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 2);\n    glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 0);\n\n    window = glfwCreateWindow(640, 480, \"Simple example\", NULL, NULL);\n    if (!window)\n    {\n        glfwTerminate();\n        exit(EXIT_FAILURE);\n    }\n\n    glfwSetKeyCallback(window, key_callback);\n\n    glfwMakeContextCurrent(window);\n    gladLoadGL(glfwGetProcAddress);\n    glfwSwapInterval(1);\n\n    // NOTE: OpenGL error checks have been omitted for brevity\n\n    glGenBuffers(1, &vertex_buffer);\n    glBindBuffer(GL_ARRAY_BUFFER, vertex_buffer);\n    glBufferData(GL_ARRAY_BUFFER, sizeof(vertices), vertices, GL_STATIC_DRAW);\n\n    vertex_shader = glCreateShader(GL_VERTEX_SHADER);\n    glShaderSource(vertex_shader, 1, &vertex_shader_text, NULL);\n    glCompileShader(vertex_shader);\n\n    fragment_shader = glCreateShader(GL_FRAGMENT_SHADER);\n    glShaderSource(fragment_shader, 1, &fragment_shader_text, NULL);\n    glCompileShader(fragment_shader);\n\n    program = glCreateProgram();\n    glAttachShader(program, vertex_shader);\n    glAttachShader(program, fragment_shader);\n    glLinkProgram(program);\n\n    mvp_location = glGetUniformLocation(program, \"MVP\");\n    vpos_location = glGetAttribLocation(program, \"vPos\");\n    vcol_location = glGetAttribLocation(program, \"vCol\");\n\n    glEnableVertexAttribArray(vpos_location);\n    glVertexAttribPointer(vpos_location, 2, GL_FLOAT, GL_FALSE,\n                          sizeof(vertices[0]), (void*) 0);\n    glEnableVertexAttribArray(vcol_location);\n    glVertexAttribPointer(vcol_location, 3, GL_FLOAT, GL_FALSE,\n                          sizeof(vertices[0]), (void*) (sizeof(float) * 2));\n\n    while (!glfwWindowShouldClose(window))\n    {\n        float ratio;\n        int width, height;\n        mat4x4 m, p, mvp;\n\n        glfwGetFramebufferSize(window, &width, &height);\n        ratio = width / (float) height;\n\n        glViewport(0, 0, width, height);\n        glClear(GL_COLOR_BUFFER_BIT);\n\n        mat4x4_identity(m);\n        mat4x4_rotate_Z(m, m, (float) glfwGetTime());\n        mat4x4_ortho(p, -ratio, ratio, -1.f, 1.f, 1.f, -1.f);\n        mat4x4_mul(mvp, p, m);\n\n        glUseProgram(program);\n        glUniformMatrix4fv(mvp_location, 1, GL_FALSE, (const GLfloat*) mvp);\n        glDrawArrays(GL_TRIANGLES, 0, 3);\n\n        glfwSwapBuffers(window);\n        glfwPollEvents();\n    }\n\n    glfwDestroyWindow(window);\n\n    glfwTerminate();\n    exit(EXIT_SUCCESS);\n}\n\n//! [code]\n"
  },
  {
    "path": "thirdparty/glfw/examples/splitview.c",
    "content": "//========================================================================\n// This is an example program for the GLFW library\n//\n// The program uses a \"split window\" view, rendering four views of the\n// same scene in one window (e.g. uesful for 3D modelling software). This\n// demo uses scissors to separate the four different rendering areas from\n// each other.\n//\n// (If the code seems a little bit strange here and there, it may be\n//  because I am not a friend of orthogonal projections)\n//========================================================================\n\n#include <glad/gl.h>\n#define GLFW_INCLUDE_NONE\n#include <GLFW/glfw3.h>\n\n#if defined(_MSC_VER)\n // Make MS math.h define M_PI\n #define _USE_MATH_DEFINES\n#endif\n\n#include <math.h>\n#include <stdio.h>\n#include <stdlib.h>\n\n#include <linmath.h>\n\n\n//========================================================================\n// Global variables\n//========================================================================\n\n// Mouse position\nstatic double xpos = 0, ypos = 0;\n\n// Window size\nstatic int width, height;\n\n// Active view: 0 = none, 1 = upper left, 2 = upper right, 3 = lower left,\n// 4 = lower right\nstatic int active_view = 0;\n\n// Rotation around each axis\nstatic int rot_x = 0, rot_y = 0, rot_z = 0;\n\n// Do redraw?\nstatic int do_redraw = 1;\n\n\n//========================================================================\n// Draw a solid torus (use a display list for the model)\n//========================================================================\n\n#define TORUS_MAJOR     1.5\n#define TORUS_MINOR     0.5\n#define TORUS_MAJOR_RES 32\n#define TORUS_MINOR_RES 32\n\nstatic void drawTorus(void)\n{\n    static GLuint torus_list = 0;\n    int    i, j, k;\n    double s, t, x, y, z, nx, ny, nz, scale, twopi;\n\n    if (!torus_list)\n    {\n        // Start recording displaylist\n        torus_list = glGenLists(1);\n        glNewList(torus_list, GL_COMPILE_AND_EXECUTE);\n\n        // Draw torus\n        twopi = 2.0 * M_PI;\n        for (i = 0;  i < TORUS_MINOR_RES;  i++)\n        {\n            glBegin(GL_QUAD_STRIP);\n            for (j = 0;  j <= TORUS_MAJOR_RES;  j++)\n            {\n                for (k = 1;  k >= 0;  k--)\n                {\n                    s = (i + k) % TORUS_MINOR_RES + 0.5;\n                    t = j % TORUS_MAJOR_RES;\n\n                    // Calculate point on surface\n                    x = (TORUS_MAJOR + TORUS_MINOR * cos(s * twopi / TORUS_MINOR_RES)) * cos(t * twopi / TORUS_MAJOR_RES);\n                    y = TORUS_MINOR * sin(s * twopi / TORUS_MINOR_RES);\n                    z = (TORUS_MAJOR + TORUS_MINOR * cos(s * twopi / TORUS_MINOR_RES)) * sin(t * twopi / TORUS_MAJOR_RES);\n\n                    // Calculate surface normal\n                    nx = x - TORUS_MAJOR * cos(t * twopi / TORUS_MAJOR_RES);\n                    ny = y;\n                    nz = z - TORUS_MAJOR * sin(t * twopi / TORUS_MAJOR_RES);\n                    scale = 1.0 / sqrt(nx*nx + ny*ny + nz*nz);\n                    nx *= scale;\n                    ny *= scale;\n                    nz *= scale;\n\n                    glNormal3f((float) nx, (float) ny, (float) nz);\n                    glVertex3f((float) x, (float) y, (float) z);\n                }\n            }\n\n            glEnd();\n        }\n\n        // Stop recording displaylist\n        glEndList();\n    }\n    else\n    {\n        // Playback displaylist\n        glCallList(torus_list);\n    }\n}\n\n\n//========================================================================\n// Draw the scene (a rotating torus)\n//========================================================================\n\nstatic void drawScene(void)\n{\n    const GLfloat model_diffuse[4]  = {1.0f, 0.8f, 0.8f, 1.0f};\n    const GLfloat model_specular[4] = {0.6f, 0.6f, 0.6f, 1.0f};\n    const GLfloat model_shininess   = 20.0f;\n\n    glPushMatrix();\n\n    // Rotate the object\n    glRotatef((GLfloat) rot_x * 0.5f, 1.0f, 0.0f, 0.0f);\n    glRotatef((GLfloat) rot_y * 0.5f, 0.0f, 1.0f, 0.0f);\n    glRotatef((GLfloat) rot_z * 0.5f, 0.0f, 0.0f, 1.0f);\n\n    // Set model color (used for orthogonal views, lighting disabled)\n    glColor4fv(model_diffuse);\n\n    // Set model material (used for perspective view, lighting enabled)\n    glMaterialfv(GL_FRONT, GL_DIFFUSE, model_diffuse);\n    glMaterialfv(GL_FRONT, GL_SPECULAR, model_specular);\n    glMaterialf(GL_FRONT, GL_SHININESS, model_shininess);\n\n    // Draw torus\n    drawTorus();\n\n    glPopMatrix();\n}\n\n\n//========================================================================\n// Draw a 2D grid (used for orthogonal views)\n//========================================================================\n\nstatic void drawGrid(float scale, int steps)\n{\n    int i;\n    float x, y;\n    mat4x4 view;\n\n    glPushMatrix();\n\n    // Set background to some dark bluish grey\n    glClearColor(0.05f, 0.05f, 0.2f, 0.0f);\n    glClear(GL_COLOR_BUFFER_BIT);\n\n    // Setup modelview matrix (flat XY view)\n    {\n        vec3 eye = { 0.f, 0.f, 1.f };\n        vec3 center = { 0.f, 0.f, 0.f };\n        vec3 up = { 0.f, 1.f, 0.f };\n        mat4x4_look_at(view, eye, center, up);\n    }\n    glLoadMatrixf((const GLfloat*) view);\n\n    // We don't want to update the Z-buffer\n    glDepthMask(GL_FALSE);\n\n    // Set grid color\n    glColor3f(0.0f, 0.5f, 0.5f);\n\n    glBegin(GL_LINES);\n\n    // Horizontal lines\n    x = scale * 0.5f * (float) (steps - 1);\n    y = -scale * 0.5f * (float) (steps - 1);\n    for (i = 0;  i < steps;  i++)\n    {\n        glVertex3f(-x, y, 0.0f);\n        glVertex3f(x, y, 0.0f);\n        y += scale;\n    }\n\n    // Vertical lines\n    x = -scale * 0.5f * (float) (steps - 1);\n    y = scale * 0.5f * (float) (steps - 1);\n    for (i = 0;  i < steps;  i++)\n    {\n        glVertex3f(x, -y, 0.0f);\n        glVertex3f(x, y, 0.0f);\n        x += scale;\n    }\n\n    glEnd();\n\n    // Enable Z-buffer writing again\n    glDepthMask(GL_TRUE);\n\n    glPopMatrix();\n}\n\n\n//========================================================================\n// Draw all views\n//========================================================================\n\nstatic void drawAllViews(void)\n{\n    const GLfloat light_position[4] = {0.0f, 8.0f, 8.0f, 1.0f};\n    const GLfloat light_diffuse[4]  = {1.0f, 1.0f, 1.0f, 1.0f};\n    const GLfloat light_specular[4] = {1.0f, 1.0f, 1.0f, 1.0f};\n    const GLfloat light_ambient[4]  = {0.2f, 0.2f, 0.3f, 1.0f};\n    float aspect;\n    mat4x4 view, projection;\n\n    // Calculate aspect of window\n    if (height > 0)\n        aspect = (float) width / (float) height;\n    else\n        aspect = 1.f;\n\n    // Clear screen\n    glClearColor(0.0f, 0.0f, 0.0f, 0.0f);\n    glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);\n\n    // Enable scissor test\n    glEnable(GL_SCISSOR_TEST);\n\n    // Enable depth test\n    glEnable(GL_DEPTH_TEST);\n    glDepthFunc(GL_LEQUAL);\n\n    // ** ORTHOGONAL VIEWS **\n\n    // For orthogonal views, use wireframe rendering\n    glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);\n\n    // Enable line anti-aliasing\n    glEnable(GL_LINE_SMOOTH);\n    glEnable(GL_BLEND);\n    glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);\n\n    // Setup orthogonal projection matrix\n    glMatrixMode(GL_PROJECTION);\n    glLoadIdentity();\n    glOrtho(-3.0 * aspect, 3.0 * aspect, -3.0, 3.0, 1.0, 50.0);\n\n    // Upper left view (TOP VIEW)\n    glViewport(0, height / 2, width / 2, height / 2);\n    glScissor(0, height / 2, width / 2, height / 2);\n    glMatrixMode(GL_MODELVIEW);\n    {\n        vec3 eye = { 0.f, 10.f, 1e-3f };\n        vec3 center = { 0.f, 0.f, 0.f };\n        vec3 up = { 0.f, 1.f, 0.f };\n        mat4x4_look_at( view, eye, center, up );\n    }\n    glLoadMatrixf((const GLfloat*) view);\n    drawGrid(0.5, 12);\n    drawScene();\n\n    // Lower left view (FRONT VIEW)\n    glViewport(0, 0, width / 2, height / 2);\n    glScissor(0, 0, width / 2, height / 2);\n    glMatrixMode(GL_MODELVIEW);\n    {\n        vec3 eye = { 0.f, 0.f, 10.f };\n        vec3 center = { 0.f, 0.f, 0.f };\n        vec3 up = { 0.f, 1.f, 0.f };\n        mat4x4_look_at( view, eye, center, up );\n    }\n    glLoadMatrixf((const GLfloat*) view);\n    drawGrid(0.5, 12);\n    drawScene();\n\n    // Lower right view (SIDE VIEW)\n    glViewport(width / 2, 0, width / 2, height / 2);\n    glScissor(width / 2, 0, width / 2, height / 2);\n    glMatrixMode(GL_MODELVIEW);\n    {\n        vec3 eye = { 10.f, 0.f, 0.f };\n        vec3 center = { 0.f, 0.f, 0.f };\n        vec3 up = { 0.f, 1.f, 0.f };\n        mat4x4_look_at( view, eye, center, up );\n    }\n    glLoadMatrixf((const GLfloat*) view);\n    drawGrid(0.5, 12);\n    drawScene();\n\n    // Disable line anti-aliasing\n    glDisable(GL_LINE_SMOOTH);\n    glDisable(GL_BLEND);\n\n    // ** PERSPECTIVE VIEW **\n\n    // For perspective view, use solid rendering\n    glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);\n\n    // Enable face culling (faster rendering)\n    glEnable(GL_CULL_FACE);\n    glCullFace(GL_BACK);\n    glFrontFace(GL_CW);\n\n    // Setup perspective projection matrix\n    glMatrixMode(GL_PROJECTION);\n    mat4x4_perspective(projection,\n                       65.f * (float) M_PI / 180.f,\n                       aspect,\n                       1.f, 50.f);\n    glLoadMatrixf((const GLfloat*) projection);\n\n    // Upper right view (PERSPECTIVE VIEW)\n    glViewport(width / 2, height / 2, width / 2, height / 2);\n    glScissor(width / 2, height / 2, width / 2, height / 2);\n    glMatrixMode(GL_MODELVIEW);\n    {\n        vec3 eye = { 3.f, 1.5f, 3.f };\n        vec3 center = { 0.f, 0.f, 0.f };\n        vec3 up = { 0.f, 1.f, 0.f };\n        mat4x4_look_at( view, eye, center, up );\n    }\n    glLoadMatrixf((const GLfloat*) view);\n\n    // Configure and enable light source 1\n    glLightfv(GL_LIGHT1, GL_POSITION, light_position);\n    glLightfv(GL_LIGHT1, GL_AMBIENT, light_ambient);\n    glLightfv(GL_LIGHT1, GL_DIFFUSE, light_diffuse);\n    glLightfv(GL_LIGHT1, GL_SPECULAR, light_specular);\n    glEnable(GL_LIGHT1);\n    glEnable(GL_LIGHTING);\n\n    // Draw scene\n    drawScene();\n\n    // Disable lighting\n    glDisable(GL_LIGHTING);\n\n    // Disable face culling\n    glDisable(GL_CULL_FACE);\n\n    // Disable depth test\n    glDisable(GL_DEPTH_TEST);\n\n    // Disable scissor test\n    glDisable(GL_SCISSOR_TEST);\n\n    // Draw a border around the active view\n    if (active_view > 0 && active_view != 2)\n    {\n        glViewport(0, 0, width, height);\n\n        glMatrixMode(GL_PROJECTION);\n        glLoadIdentity();\n        glOrtho(0.0, 2.0, 0.0, 2.0, 0.0, 1.0);\n\n        glMatrixMode(GL_MODELVIEW);\n        glLoadIdentity();\n        glTranslatef((GLfloat) ((active_view - 1) & 1), (GLfloat) (1 - (active_view - 1) / 2), 0.0f);\n\n        glColor3f(1.0f, 1.0f, 0.6f);\n\n        glBegin(GL_LINE_STRIP);\n        glVertex2i(0, 0);\n        glVertex2i(1, 0);\n        glVertex2i(1, 1);\n        glVertex2i(0, 1);\n        glVertex2i(0, 0);\n        glEnd();\n    }\n}\n\n\n//========================================================================\n// Framebuffer size callback function\n//========================================================================\n\nstatic void framebufferSizeFun(GLFWwindow* window, int w, int h)\n{\n    width  = w;\n    height = h > 0 ? h : 1;\n    do_redraw = 1;\n}\n\n\n//========================================================================\n// Window refresh callback function\n//========================================================================\n\nstatic void windowRefreshFun(GLFWwindow* window)\n{\n    drawAllViews();\n    glfwSwapBuffers(window);\n    do_redraw = 0;\n}\n\n\n//========================================================================\n// Mouse position callback function\n//========================================================================\n\nstatic void cursorPosFun(GLFWwindow* window, double x, double y)\n{\n    int wnd_width, wnd_height, fb_width, fb_height;\n    double scale;\n\n    glfwGetWindowSize(window, &wnd_width, &wnd_height);\n    glfwGetFramebufferSize(window, &fb_width, &fb_height);\n\n    scale = (double) fb_width / (double) wnd_width;\n\n    x *= scale;\n    y *= scale;\n\n    // Depending on which view was selected, rotate around different axes\n    switch (active_view)\n    {\n        case 1:\n            rot_x += (int) (y - ypos);\n            rot_z += (int) (x - xpos);\n            do_redraw = 1;\n            break;\n        case 3:\n            rot_x += (int) (y - ypos);\n            rot_y += (int) (x - xpos);\n            do_redraw = 1;\n            break;\n        case 4:\n            rot_y += (int) (x - xpos);\n            rot_z += (int) (y - ypos);\n            do_redraw = 1;\n            break;\n        default:\n            // Do nothing for perspective view, or if no view is selected\n            break;\n    }\n\n    // Remember cursor position\n    xpos = x;\n    ypos = y;\n}\n\n\n//========================================================================\n// Mouse button callback function\n//========================================================================\n\nstatic void mouseButtonFun(GLFWwindow* window, int button, int action, int mods)\n{\n    if ((button == GLFW_MOUSE_BUTTON_LEFT) && action == GLFW_PRESS)\n    {\n        // Detect which of the four views was clicked\n        active_view = 1;\n        if (xpos >= width / 2)\n            active_view += 1;\n        if (ypos >= height / 2)\n            active_view += 2;\n    }\n    else if (button == GLFW_MOUSE_BUTTON_LEFT)\n    {\n        // Deselect any previously selected view\n        active_view = 0;\n    }\n\n    do_redraw = 1;\n}\n\nstatic void key_callback(GLFWwindow* window, int key, int scancode, int action, int mods)\n{\n    if (key == GLFW_KEY_ESCAPE && action == GLFW_PRESS)\n        glfwSetWindowShouldClose(window, GLFW_TRUE);\n}\n\n\n//========================================================================\n// main\n//========================================================================\n\nint main(void)\n{\n    GLFWwindow* window;\n\n    // Initialise GLFW\n    if (!glfwInit())\n    {\n        fprintf(stderr, \"Failed to initialize GLFW\\n\");\n        exit(EXIT_FAILURE);\n    }\n\n    glfwWindowHint(GLFW_SAMPLES, 4);\n\n    // Open OpenGL window\n    window = glfwCreateWindow(500, 500, \"Split view demo\", NULL, NULL);\n    if (!window)\n    {\n        fprintf(stderr, \"Failed to open GLFW window\\n\");\n\n        glfwTerminate();\n        exit(EXIT_FAILURE);\n    }\n\n    // Set callback functions\n    glfwSetFramebufferSizeCallback(window, framebufferSizeFun);\n    glfwSetWindowRefreshCallback(window, windowRefreshFun);\n    glfwSetCursorPosCallback(window, cursorPosFun);\n    glfwSetMouseButtonCallback(window, mouseButtonFun);\n    glfwSetKeyCallback(window, key_callback);\n\n    // Enable vsync\n    glfwMakeContextCurrent(window);\n    gladLoadGL(glfwGetProcAddress);\n    glfwSwapInterval(1);\n\n    if (GLAD_GL_ARB_multisample || GLAD_GL_VERSION_1_3)\n        glEnable(GL_MULTISAMPLE_ARB);\n\n    glfwGetFramebufferSize(window, &width, &height);\n    framebufferSizeFun(window, width, height);\n\n    // Main loop\n    for (;;)\n    {\n        // Only redraw if we need to\n        if (do_redraw)\n            windowRefreshFun(window);\n\n        // Wait for new events\n        glfwWaitEvents();\n\n        // Check if the window should be closed\n        if (glfwWindowShouldClose(window))\n            break;\n    }\n\n    // Close OpenGL window and terminate GLFW\n    glfwTerminate();\n\n    exit(EXIT_SUCCESS);\n}\n\n"
  },
  {
    "path": "thirdparty/glfw/examples/wave.c",
    "content": "/*****************************************************************************\n * Wave Simulation in OpenGL\n * (C) 2002 Jakob Thomsen\n * http://home.in.tum.de/~thomsen\n * Modified for GLFW by Sylvain Hellegouarch - sh@programmationworld.com\n * Modified for variable frame rate by Marcus Geelnard\n * 2003-Jan-31: Minor cleanups and speedups / MG\n * 2010-10-24: Formatting and cleanup - Camilla Löwy\n *****************************************************************************/\n\n#if defined(_MSC_VER)\n // Make MS math.h define M_PI\n #define _USE_MATH_DEFINES\n#endif\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <math.h>\n\n#include <glad/gl.h>\n#define GLFW_INCLUDE_NONE\n#include <GLFW/glfw3.h>\n\n#include <linmath.h>\n\n// Maximum delta T to allow for differential calculations\n#define MAX_DELTA_T 0.01\n\n// Animation speed (10.0 looks good)\n#define ANIMATION_SPEED 10.0\n\nGLfloat alpha = 210.f, beta = -70.f;\nGLfloat zoom = 2.f;\n\ndouble cursorX;\ndouble cursorY;\n\nstruct Vertex\n{\n    GLfloat x, y, z;\n    GLfloat r, g, b;\n};\n\n#define GRIDW 50\n#define GRIDH 50\n#define VERTEXNUM (GRIDW*GRIDH)\n\n#define QUADW (GRIDW - 1)\n#define QUADH (GRIDH - 1)\n#define QUADNUM (QUADW*QUADH)\n\nGLuint quad[4 * QUADNUM];\nstruct Vertex vertex[VERTEXNUM];\n\n/* The grid will look like this:\n *\n *      3   4   5\n *      *---*---*\n *      |   |   |\n *      | 0 | 1 |\n *      |   |   |\n *      *---*---*\n *      0   1   2\n */\n\n//========================================================================\n// Initialize grid geometry\n//========================================================================\n\nvoid init_vertices(void)\n{\n    int x, y, p;\n\n    // Place the vertices in a grid\n    for (y = 0;  y < GRIDH;  y++)\n    {\n        for (x = 0;  x < GRIDW;  x++)\n        {\n            p = y * GRIDW + x;\n\n            vertex[p].x = (GLfloat) (x - GRIDW / 2) / (GLfloat) (GRIDW / 2);\n            vertex[p].y = (GLfloat) (y - GRIDH / 2) / (GLfloat) (GRIDH / 2);\n            vertex[p].z = 0;\n\n            if ((x % 4 < 2) ^ (y % 4 < 2))\n                vertex[p].r = 0.0;\n            else\n                vertex[p].r = 1.0;\n\n            vertex[p].g = (GLfloat) y / (GLfloat) GRIDH;\n            vertex[p].b = 1.f - ((GLfloat) x / (GLfloat) GRIDW + (GLfloat) y / (GLfloat) GRIDH) / 2.f;\n        }\n    }\n\n    for (y = 0;  y < QUADH;  y++)\n    {\n        for (x = 0;  x < QUADW;  x++)\n        {\n            p = 4 * (y * QUADW + x);\n\n            quad[p + 0] = y       * GRIDW + x;     // Some point\n            quad[p + 1] = y       * GRIDW + x + 1; // Neighbor at the right side\n            quad[p + 2] = (y + 1) * GRIDW + x + 1; // Upper right neighbor\n            quad[p + 3] = (y + 1) * GRIDW + x;     // Upper neighbor\n        }\n    }\n}\n\ndouble dt;\ndouble p[GRIDW][GRIDH];\ndouble vx[GRIDW][GRIDH], vy[GRIDW][GRIDH];\ndouble ax[GRIDW][GRIDH], ay[GRIDW][GRIDH];\n\n//========================================================================\n// Initialize grid\n//========================================================================\n\nvoid init_grid(void)\n{\n    int x, y;\n    double dx, dy, d;\n\n    for (y = 0; y < GRIDH;  y++)\n    {\n        for (x = 0; x < GRIDW;  x++)\n        {\n            dx = (double) (x - GRIDW / 2);\n            dy = (double) (y - GRIDH / 2);\n            d = sqrt(dx * dx + dy * dy);\n            if (d < 0.1 * (double) (GRIDW / 2))\n            {\n                d = d * 10.0;\n                p[x][y] = -cos(d * (M_PI / (double)(GRIDW * 4))) * 100.0;\n            }\n            else\n                p[x][y] = 0.0;\n\n            vx[x][y] = 0.0;\n            vy[x][y] = 0.0;\n        }\n    }\n}\n\n\n//========================================================================\n// Draw scene\n//========================================================================\n\nvoid draw_scene(GLFWwindow* window)\n{\n    // Clear the color and depth buffers\n    glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);\n\n    // We don't want to modify the projection matrix\n    glMatrixMode(GL_MODELVIEW);\n    glLoadIdentity();\n\n    // Move back\n    glTranslatef(0.0, 0.0, -zoom);\n    // Rotate the view\n    glRotatef(beta, 1.0, 0.0, 0.0);\n    glRotatef(alpha, 0.0, 0.0, 1.0);\n\n    glDrawElements(GL_QUADS, 4 * QUADNUM, GL_UNSIGNED_INT, quad);\n\n    glfwSwapBuffers(window);\n}\n\n\n//========================================================================\n// Initialize Miscellaneous OpenGL state\n//========================================================================\n\nvoid init_opengl(void)\n{\n    // Use Gouraud (smooth) shading\n    glShadeModel(GL_SMOOTH);\n\n    // Switch on the z-buffer\n    glEnable(GL_DEPTH_TEST);\n\n    glEnableClientState(GL_VERTEX_ARRAY);\n    glEnableClientState(GL_COLOR_ARRAY);\n    glVertexPointer(3, GL_FLOAT, sizeof(struct Vertex), vertex);\n    glColorPointer(3, GL_FLOAT, sizeof(struct Vertex), &vertex[0].r); // Pointer to the first color\n\n    glPointSize(2.0);\n\n    // Background color is black\n    glClearColor(0, 0, 0, 0);\n}\n\n\n//========================================================================\n// Modify the height of each vertex according to the pressure\n//========================================================================\n\nvoid adjust_grid(void)\n{\n    int pos;\n    int x, y;\n\n    for (y = 0; y < GRIDH;  y++)\n    {\n        for (x = 0;  x < GRIDW;  x++)\n        {\n            pos = y * GRIDW + x;\n            vertex[pos].z = (float) (p[x][y] * (1.0 / 50.0));\n        }\n    }\n}\n\n\n//========================================================================\n// Calculate wave propagation\n//========================================================================\n\nvoid calc_grid(void)\n{\n    int x, y, x2, y2;\n    double time_step = dt * ANIMATION_SPEED;\n\n    // Compute accelerations\n    for (x = 0;  x < GRIDW;  x++)\n    {\n        x2 = (x + 1) % GRIDW;\n        for(y = 0; y < GRIDH; y++)\n            ax[x][y] = p[x][y] - p[x2][y];\n    }\n\n    for (y = 0;  y < GRIDH;  y++)\n    {\n        y2 = (y + 1) % GRIDH;\n        for(x = 0; x < GRIDW; x++)\n            ay[x][y] = p[x][y] - p[x][y2];\n    }\n\n    // Compute speeds\n    for (x = 0;  x < GRIDW;  x++)\n    {\n        for (y = 0;  y < GRIDH;  y++)\n        {\n            vx[x][y] = vx[x][y] + ax[x][y] * time_step;\n            vy[x][y] = vy[x][y] + ay[x][y] * time_step;\n        }\n    }\n\n    // Compute pressure\n    for (x = 1;  x < GRIDW;  x++)\n    {\n        x2 = x - 1;\n        for (y = 1;  y < GRIDH;  y++)\n        {\n            y2 = y - 1;\n            p[x][y] = p[x][y] + (vx[x2][y] - vx[x][y] + vy[x][y2] - vy[x][y]) * time_step;\n        }\n    }\n}\n\n\n//========================================================================\n// Print errors\n//========================================================================\n\nstatic void error_callback(int error, const char* description)\n{\n    fprintf(stderr, \"Error: %s\\n\", description);\n}\n\n\n//========================================================================\n// Handle key strokes\n//========================================================================\n\nvoid key_callback(GLFWwindow* window, int key, int scancode, int action, int mods)\n{\n    if (action != GLFW_PRESS)\n        return;\n\n    switch (key)\n    {\n        case GLFW_KEY_ESCAPE:\n            glfwSetWindowShouldClose(window, GLFW_TRUE);\n            break;\n        case GLFW_KEY_SPACE:\n            init_grid();\n            break;\n        case GLFW_KEY_LEFT:\n            alpha += 5;\n            break;\n        case GLFW_KEY_RIGHT:\n            alpha -= 5;\n            break;\n        case GLFW_KEY_UP:\n            beta -= 5;\n            break;\n        case GLFW_KEY_DOWN:\n            beta += 5;\n            break;\n        case GLFW_KEY_PAGE_UP:\n            zoom -= 0.25f;\n            if (zoom < 0.f)\n                zoom = 0.f;\n            break;\n        case GLFW_KEY_PAGE_DOWN:\n            zoom += 0.25f;\n            break;\n        default:\n            break;\n    }\n}\n\n\n//========================================================================\n// Callback function for mouse button events\n//========================================================================\n\nvoid mouse_button_callback(GLFWwindow* window, int button, int action, int mods)\n{\n    if (button != GLFW_MOUSE_BUTTON_LEFT)\n        return;\n\n    if (action == GLFW_PRESS)\n    {\n        glfwSetInputMode(window, GLFW_CURSOR, GLFW_CURSOR_DISABLED);\n        glfwGetCursorPos(window, &cursorX, &cursorY);\n    }\n    else\n        glfwSetInputMode(window, GLFW_CURSOR, GLFW_CURSOR_NORMAL);\n}\n\n\n//========================================================================\n// Callback function for cursor motion events\n//========================================================================\n\nvoid cursor_position_callback(GLFWwindow* window, double x, double y)\n{\n    if (glfwGetInputMode(window, GLFW_CURSOR) == GLFW_CURSOR_DISABLED)\n    {\n        alpha += (GLfloat) (x - cursorX) / 10.f;\n        beta += (GLfloat) (y - cursorY) / 10.f;\n\n        cursorX = x;\n        cursorY = y;\n    }\n}\n\n\n//========================================================================\n// Callback function for scroll events\n//========================================================================\n\nvoid scroll_callback(GLFWwindow* window, double x, double y)\n{\n    zoom += (float) y / 4.f;\n    if (zoom < 0)\n        zoom = 0;\n}\n\n\n//========================================================================\n// Callback function for framebuffer resize events\n//========================================================================\n\nvoid framebuffer_size_callback(GLFWwindow* window, int width, int height)\n{\n    float ratio = 1.f;\n    mat4x4 projection;\n\n    if (height > 0)\n        ratio = (float) width / (float) height;\n\n    // Setup viewport\n    glViewport(0, 0, width, height);\n\n    // Change to the projection matrix and set our viewing volume\n    glMatrixMode(GL_PROJECTION);\n    mat4x4_perspective(projection,\n                       60.f * (float) M_PI / 180.f,\n                       ratio,\n                       1.f, 1024.f);\n    glLoadMatrixf((const GLfloat*) projection);\n}\n\n\n//========================================================================\n// main\n//========================================================================\n\nint main(int argc, char* argv[])\n{\n    GLFWwindow* window;\n    double t, dt_total, t_old;\n    int width, height;\n\n    glfwSetErrorCallback(error_callback);\n\n    if (!glfwInit())\n        exit(EXIT_FAILURE);\n\n    window = glfwCreateWindow(640, 480, \"Wave Simulation\", NULL, NULL);\n    if (!window)\n    {\n        glfwTerminate();\n        exit(EXIT_FAILURE);\n    }\n\n    glfwSetKeyCallback(window, key_callback);\n    glfwSetFramebufferSizeCallback(window, framebuffer_size_callback);\n    glfwSetMouseButtonCallback(window, mouse_button_callback);\n    glfwSetCursorPosCallback(window, cursor_position_callback);\n    glfwSetScrollCallback(window, scroll_callback);\n\n    glfwMakeContextCurrent(window);\n    gladLoadGL(glfwGetProcAddress);\n    glfwSwapInterval(1);\n\n    glfwGetFramebufferSize(window, &width, &height);\n    framebuffer_size_callback(window, width, height);\n\n    // Initialize OpenGL\n    init_opengl();\n\n    // Initialize simulation\n    init_vertices();\n    init_grid();\n    adjust_grid();\n\n    // Initialize timer\n    t_old = glfwGetTime() - 0.01;\n\n    while (!glfwWindowShouldClose(window))\n    {\n        t = glfwGetTime();\n        dt_total = t - t_old;\n        t_old = t;\n\n        // Safety - iterate if dt_total is too large\n        while (dt_total > 0.f)\n        {\n            // Select iteration time step\n            dt = dt_total > MAX_DELTA_T ? MAX_DELTA_T : dt_total;\n            dt_total -= dt;\n\n            // Calculate wave propagation\n            calc_grid();\n        }\n\n        // Compute height of each vertex\n        adjust_grid();\n\n        // Draw wave grid to OpenGL display\n        draw_scene(window);\n\n        glfwPollEvents();\n    }\n\n    glfwTerminate();\n    exit(EXIT_SUCCESS);\n}\n\n"
  },
  {
    "path": "thirdparty/glfw/include/GLFW/glfw3.h",
    "content": "/*************************************************************************\n * GLFW 3.3 - www.glfw.org\n * A library for OpenGL, window and input\n *------------------------------------------------------------------------\n * Copyright (c) 2002-2006 Marcus Geelnard\n * Copyright (c) 2006-2019 Camilla Löwy <elmindreda@glfw.org>\n *\n * This software is provided 'as-is', without any express or implied\n * warranty. In no event will the authors be held liable for any damages\n * arising from the use of this software.\n *\n * Permission is granted to anyone to use this software for any purpose,\n * including commercial applications, and to alter it and redistribute it\n * freely, subject to the following restrictions:\n *\n * 1. The origin of this software must not be misrepresented; you must not\n *    claim that you wrote the original software. If you use this software\n *    in a product, an acknowledgment in the product documentation would\n *    be appreciated but is not required.\n *\n * 2. Altered source versions must be plainly marked as such, and must not\n *    be misrepresented as being the original software.\n *\n * 3. This notice may not be removed or altered from any source\n *    distribution.\n *\n *************************************************************************/\n\n#ifndef _glfw3_h_\n#define _glfw3_h_\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n\n/*************************************************************************\n * Doxygen documentation\n *************************************************************************/\n\n/*! @file glfw3.h\n *  @brief The header of the GLFW 3 API.\n *\n *  This is the header file of the GLFW 3 API.  It defines all its types and\n *  declares all its functions.\n *\n *  For more information about how to use this file, see @ref build_include.\n */\n/*! @defgroup context Context reference\n *  @brief Functions and types related to OpenGL and OpenGL ES contexts.\n *\n *  This is the reference documentation for OpenGL and OpenGL ES context related\n *  functions.  For more task-oriented information, see the @ref context_guide.\n */\n/*! @defgroup vulkan Vulkan reference\n *  @brief Functions and types related to Vulkan.\n *\n *  This is the reference documentation for Vulkan related functions and types.\n *  For more task-oriented information, see the @ref vulkan_guide.\n */\n/*! @defgroup init Initialization, version and error reference\n *  @brief Functions and types related to initialization and error handling.\n *\n *  This is the reference documentation for initialization and termination of\n *  the library, version management and error handling.  For more task-oriented\n *  information, see the @ref intro_guide.\n */\n/*! @defgroup input Input reference\n *  @brief Functions and types related to input handling.\n *\n *  This is the reference documentation for input related functions and types.\n *  For more task-oriented information, see the @ref input_guide.\n */\n/*! @defgroup monitor Monitor reference\n *  @brief Functions and types related to monitors.\n *\n *  This is the reference documentation for monitor related functions and types.\n *  For more task-oriented information, see the @ref monitor_guide.\n */\n/*! @defgroup window Window reference\n *  @brief Functions and types related to windows.\n *\n *  This is the reference documentation for window related functions and types,\n *  including creation, deletion and event polling.  For more task-oriented\n *  information, see the @ref window_guide.\n */\n\n\n/*************************************************************************\n * Compiler- and platform-specific preprocessor work\n *************************************************************************/\n\n/* If we are we on Windows, we want a single define for it.\n */\n#if !defined(_WIN32) && (defined(__WIN32__) || defined(WIN32) || defined(__MINGW32__))\n #define _WIN32\n#endif /* _WIN32 */\n\n/* Include because most Windows GLU headers need wchar_t and\n * the macOS OpenGL header blocks the definition of ptrdiff_t by glext.h.\n * Include it unconditionally to avoid surprising side-effects.\n */\n#include <stddef.h>\n\n/* Include because it is needed by Vulkan and related functions.\n * Include it unconditionally to avoid surprising side-effects.\n */\n#include <stdint.h>\n\n#if defined(GLFW_INCLUDE_VULKAN)\n  #include <vulkan/vulkan.h>\n#endif /* Vulkan header */\n\n/* The Vulkan header may have indirectly included windows.h (because of\n * VK_USE_PLATFORM_WIN32_KHR) so we offer our replacement symbols after it.\n */\n\n/* It is customary to use APIENTRY for OpenGL function pointer declarations on\n * all platforms.  Additionally, the Windows OpenGL header needs APIENTRY.\n */\n#if !defined(APIENTRY)\n #if defined(_WIN32)\n  #define APIENTRY __stdcall\n #else\n  #define APIENTRY\n #endif\n #define GLFW_APIENTRY_DEFINED\n#endif /* APIENTRY */\n\n/* Some Windows OpenGL headers need this.\n */\n#if !defined(WINGDIAPI) && defined(_WIN32)\n #define WINGDIAPI __declspec(dllimport)\n #define GLFW_WINGDIAPI_DEFINED\n#endif /* WINGDIAPI */\n\n/* Some Windows GLU headers need this.\n */\n#if !defined(CALLBACK) && defined(_WIN32)\n #define CALLBACK __stdcall\n #define GLFW_CALLBACK_DEFINED\n#endif /* CALLBACK */\n\n/* Include the chosen OpenGL or OpenGL ES headers.\n */\n#if defined(GLFW_INCLUDE_ES1)\n\n #include <GLES/gl.h>\n #if defined(GLFW_INCLUDE_GLEXT)\n  #include <GLES/glext.h>\n #endif\n\n#elif defined(GLFW_INCLUDE_ES2)\n\n #include <GLES2/gl2.h>\n #if defined(GLFW_INCLUDE_GLEXT)\n  #include <GLES2/gl2ext.h>\n #endif\n\n#elif defined(GLFW_INCLUDE_ES3)\n\n #include <GLES3/gl3.h>\n #if defined(GLFW_INCLUDE_GLEXT)\n  #include <GLES2/gl2ext.h>\n #endif\n\n#elif defined(GLFW_INCLUDE_ES31)\n\n #include <GLES3/gl31.h>\n #if defined(GLFW_INCLUDE_GLEXT)\n  #include <GLES2/gl2ext.h>\n #endif\n\n#elif defined(GLFW_INCLUDE_ES32)\n\n #include <GLES3/gl32.h>\n #if defined(GLFW_INCLUDE_GLEXT)\n  #include <GLES2/gl2ext.h>\n #endif\n\n#elif defined(GLFW_INCLUDE_GLCOREARB)\n\n #if defined(__APPLE__)\n\n  #include <OpenGL/gl3.h>\n  #if defined(GLFW_INCLUDE_GLEXT)\n   #include <OpenGL/gl3ext.h>\n  #endif /*GLFW_INCLUDE_GLEXT*/\n\n #else /*__APPLE__*/\n\n  #include <GL/glcorearb.h>\n\n #endif /*__APPLE__*/\n\n#elif !defined(GLFW_INCLUDE_NONE)\n\n #if defined(__APPLE__)\n\n  #if !defined(GLFW_INCLUDE_GLEXT)\n   #define GL_GLEXT_LEGACY\n  #endif\n  #include <OpenGL/gl.h>\n  #if defined(GLFW_INCLUDE_GLU)\n   #include <OpenGL/glu.h>\n  #endif\n\n #else /*__APPLE__*/\n\n  #include <GL/gl.h>\n  #if defined(GLFW_INCLUDE_GLEXT)\n   #include <GL/glext.h>\n  #endif\n  #if defined(GLFW_INCLUDE_GLU)\n   #include <GL/glu.h>\n  #endif\n\n #endif /*__APPLE__*/\n\n#endif /* OpenGL and OpenGL ES headers */\n\n#if defined(GLFW_DLL) && defined(_GLFW_BUILD_DLL)\n /* GLFW_DLL must be defined by applications that are linking against the DLL\n  * version of the GLFW library.  _GLFW_BUILD_DLL is defined by the GLFW\n  * configuration header when compiling the DLL version of the library.\n  */\n #error \"You must not have both GLFW_DLL and _GLFW_BUILD_DLL defined\"\n#endif\n\n/* GLFWAPI is used to declare public API functions for export\n * from the DLL / shared library / dynamic library.\n */\n#if defined(_WIN32) && defined(_GLFW_BUILD_DLL)\n /* We are building GLFW as a Win32 DLL */\n #define GLFWAPI __declspec(dllexport)\n#elif defined(_WIN32) && defined(GLFW_DLL)\n /* We are calling GLFW as a Win32 DLL */\n #define GLFWAPI __declspec(dllimport)\n#elif defined(__GNUC__) && defined(_GLFW_BUILD_DLL)\n /* We are building GLFW as a shared / dynamic library */\n #define GLFWAPI __attribute__((visibility(\"default\")))\n#else\n /* We are building or calling GLFW as a static library */\n #define GLFWAPI\n#endif\n\n\n/*************************************************************************\n * GLFW API tokens\n *************************************************************************/\n\n/*! @name GLFW version macros\n *  @{ */\n/*! @brief The major version number of the GLFW library.\n *\n *  This is incremented when the API is changed in non-compatible ways.\n *  @ingroup init\n */\n#define GLFW_VERSION_MAJOR          3\n/*! @brief The minor version number of the GLFW library.\n *\n *  This is incremented when features are added to the API but it remains\n *  backward-compatible.\n *  @ingroup init\n */\n#define GLFW_VERSION_MINOR          3\n/*! @brief The revision number of the GLFW library.\n *\n *  This is incremented when a bug fix release is made that does not contain any\n *  API changes.\n *  @ingroup init\n */\n#define GLFW_VERSION_REVISION       2\n/*! @} */\n\n/*! @brief One.\n *\n *  This is only semantic sugar for the number 1.  You can instead use `1` or\n *  `true` or `_True` or `GL_TRUE` or `VK_TRUE` or anything else that is equal\n *  to one.\n *\n *  @ingroup init\n */\n#define GLFW_TRUE                   1\n/*! @brief Zero.\n *\n *  This is only semantic sugar for the number 0.  You can instead use `0` or\n *  `false` or `_False` or `GL_FALSE` or `VK_FALSE` or anything else that is\n *  equal to zero.\n *\n *  @ingroup init\n */\n#define GLFW_FALSE                  0\n\n/*! @name Key and button actions\n *  @{ */\n/*! @brief The key or mouse button was released.\n *\n *  The key or mouse button was released.\n *\n *  @ingroup input\n */\n#define GLFW_RELEASE                0\n/*! @brief The key or mouse button was pressed.\n *\n *  The key or mouse button was pressed.\n *\n *  @ingroup input\n */\n#define GLFW_PRESS                  1\n/*! @brief The key was held down until it repeated.\n *\n *  The key was held down until it repeated.\n *\n *  @ingroup input\n */\n#define GLFW_REPEAT                 2\n/*! @} */\n\n/*! @defgroup hat_state Joystick hat states\n *  @brief Joystick hat states.\n *\n *  See [joystick hat input](@ref joystick_hat) for how these are used.\n *\n *  @ingroup input\n *  @{ */\n#define GLFW_HAT_CENTERED           0\n#define GLFW_HAT_UP                 1\n#define GLFW_HAT_RIGHT              2\n#define GLFW_HAT_DOWN               4\n#define GLFW_HAT_LEFT               8\n#define GLFW_HAT_RIGHT_UP           (GLFW_HAT_RIGHT | GLFW_HAT_UP)\n#define GLFW_HAT_RIGHT_DOWN         (GLFW_HAT_RIGHT | GLFW_HAT_DOWN)\n#define GLFW_HAT_LEFT_UP            (GLFW_HAT_LEFT  | GLFW_HAT_UP)\n#define GLFW_HAT_LEFT_DOWN          (GLFW_HAT_LEFT  | GLFW_HAT_DOWN)\n/*! @} */\n\n/*! @defgroup keys Keyboard keys\n *  @brief Keyboard key IDs.\n *\n *  See [key input](@ref input_key) for how these are used.\n *\n *  These key codes are inspired by the _USB HID Usage Tables v1.12_ (p. 53-60),\n *  but re-arranged to map to 7-bit ASCII for printable keys (function keys are\n *  put in the 256+ range).\n *\n *  The naming of the key codes follow these rules:\n *   - The US keyboard layout is used\n *   - Names of printable alpha-numeric characters are used (e.g. \"A\", \"R\",\n *     \"3\", etc.)\n *   - For non-alphanumeric characters, Unicode:ish names are used (e.g.\n *     \"COMMA\", \"LEFT_SQUARE_BRACKET\", etc.). Note that some names do not\n *     correspond to the Unicode standard (usually for brevity)\n *   - Keys that lack a clear US mapping are named \"WORLD_x\"\n *   - For non-printable keys, custom names are used (e.g. \"F4\",\n *     \"BACKSPACE\", etc.)\n *\n *  @ingroup input\n *  @{\n */\n\n/* The unknown key */\n#define GLFW_KEY_UNKNOWN            -1\n\n/* Printable keys */\n#define GLFW_KEY_SPACE              32\n#define GLFW_KEY_APOSTROPHE         39  /* ' */\n#define GLFW_KEY_COMMA              44  /* , */\n#define GLFW_KEY_MINUS              45  /* - */\n#define GLFW_KEY_PERIOD             46  /* . */\n#define GLFW_KEY_SLASH              47  /* / */\n#define GLFW_KEY_0                  48\n#define GLFW_KEY_1                  49\n#define GLFW_KEY_2                  50\n#define GLFW_KEY_3                  51\n#define GLFW_KEY_4                  52\n#define GLFW_KEY_5                  53\n#define GLFW_KEY_6                  54\n#define GLFW_KEY_7                  55\n#define GLFW_KEY_8                  56\n#define GLFW_KEY_9                  57\n#define GLFW_KEY_SEMICOLON          59  /* ; */\n#define GLFW_KEY_EQUAL              61  /* = */\n#define GLFW_KEY_A                  65\n#define GLFW_KEY_B                  66\n#define GLFW_KEY_C                  67\n#define GLFW_KEY_D                  68\n#define GLFW_KEY_E                  69\n#define GLFW_KEY_F                  70\n#define GLFW_KEY_G                  71\n#define GLFW_KEY_H                  72\n#define GLFW_KEY_I                  73\n#define GLFW_KEY_J                  74\n#define GLFW_KEY_K                  75\n#define GLFW_KEY_L                  76\n#define GLFW_KEY_M                  77\n#define GLFW_KEY_N                  78\n#define GLFW_KEY_O                  79\n#define GLFW_KEY_P                  80\n#define GLFW_KEY_Q                  81\n#define GLFW_KEY_R                  82\n#define GLFW_KEY_S                  83\n#define GLFW_KEY_T                  84\n#define GLFW_KEY_U                  85\n#define GLFW_KEY_V                  86\n#define GLFW_KEY_W                  87\n#define GLFW_KEY_X                  88\n#define GLFW_KEY_Y                  89\n#define GLFW_KEY_Z                  90\n#define GLFW_KEY_LEFT_BRACKET       91  /* [ */\n#define GLFW_KEY_BACKSLASH          92  /* \\ */\n#define GLFW_KEY_RIGHT_BRACKET      93  /* ] */\n#define GLFW_KEY_GRAVE_ACCENT       96  /* ` */\n#define GLFW_KEY_WORLD_1            161 /* non-US #1 */\n#define GLFW_KEY_WORLD_2            162 /* non-US #2 */\n\n/* Function keys */\n#define GLFW_KEY_ESCAPE             256\n#define GLFW_KEY_ENTER              257\n#define GLFW_KEY_TAB                258\n#define GLFW_KEY_BACKSPACE          259\n#define GLFW_KEY_INSERT             260\n#define GLFW_KEY_DELETE             261\n#define GLFW_KEY_RIGHT              262\n#define GLFW_KEY_LEFT               263\n#define GLFW_KEY_DOWN               264\n#define GLFW_KEY_UP                 265\n#define GLFW_KEY_PAGE_UP            266\n#define GLFW_KEY_PAGE_DOWN          267\n#define GLFW_KEY_HOME               268\n#define GLFW_KEY_END                269\n#define GLFW_KEY_CAPS_LOCK          280\n#define GLFW_KEY_SCROLL_LOCK        281\n#define GLFW_KEY_NUM_LOCK           282\n#define GLFW_KEY_PRINT_SCREEN       283\n#define GLFW_KEY_PAUSE              284\n#define GLFW_KEY_F1                 290\n#define GLFW_KEY_F2                 291\n#define GLFW_KEY_F3                 292\n#define GLFW_KEY_F4                 293\n#define GLFW_KEY_F5                 294\n#define GLFW_KEY_F6                 295\n#define GLFW_KEY_F7                 296\n#define GLFW_KEY_F8                 297\n#define GLFW_KEY_F9                 298\n#define GLFW_KEY_F10                299\n#define GLFW_KEY_F11                300\n#define GLFW_KEY_F12                301\n#define GLFW_KEY_F13                302\n#define GLFW_KEY_F14                303\n#define GLFW_KEY_F15                304\n#define GLFW_KEY_F16                305\n#define GLFW_KEY_F17                306\n#define GLFW_KEY_F18                307\n#define GLFW_KEY_F19                308\n#define GLFW_KEY_F20                309\n#define GLFW_KEY_F21                310\n#define GLFW_KEY_F22                311\n#define GLFW_KEY_F23                312\n#define GLFW_KEY_F24                313\n#define GLFW_KEY_F25                314\n#define GLFW_KEY_KP_0               320\n#define GLFW_KEY_KP_1               321\n#define GLFW_KEY_KP_2               322\n#define GLFW_KEY_KP_3               323\n#define GLFW_KEY_KP_4               324\n#define GLFW_KEY_KP_5               325\n#define GLFW_KEY_KP_6               326\n#define GLFW_KEY_KP_7               327\n#define GLFW_KEY_KP_8               328\n#define GLFW_KEY_KP_9               329\n#define GLFW_KEY_KP_DECIMAL         330\n#define GLFW_KEY_KP_DIVIDE          331\n#define GLFW_KEY_KP_MULTIPLY        332\n#define GLFW_KEY_KP_SUBTRACT        333\n#define GLFW_KEY_KP_ADD             334\n#define GLFW_KEY_KP_ENTER           335\n#define GLFW_KEY_KP_EQUAL           336\n#define GLFW_KEY_LEFT_SHIFT         340\n#define GLFW_KEY_LEFT_CONTROL       341\n#define GLFW_KEY_LEFT_ALT           342\n#define GLFW_KEY_LEFT_SUPER         343\n#define GLFW_KEY_RIGHT_SHIFT        344\n#define GLFW_KEY_RIGHT_CONTROL      345\n#define GLFW_KEY_RIGHT_ALT          346\n#define GLFW_KEY_RIGHT_SUPER        347\n#define GLFW_KEY_MENU               348\n\n#define GLFW_KEY_LAST               GLFW_KEY_MENU\n\n/*! @} */\n\n/*! @defgroup mods Modifier key flags\n *  @brief Modifier key flags.\n *\n *  See [key input](@ref input_key) for how these are used.\n *\n *  @ingroup input\n *  @{ */\n\n/*! @brief If this bit is set one or more Shift keys were held down.\n *\n *  If this bit is set one or more Shift keys were held down.\n */\n#define GLFW_MOD_SHIFT           0x0001\n/*! @brief If this bit is set one or more Control keys were held down.\n *\n *  If this bit is set one or more Control keys were held down.\n */\n#define GLFW_MOD_CONTROL         0x0002\n/*! @brief If this bit is set one or more Alt keys were held down.\n *\n *  If this bit is set one or more Alt keys were held down.\n */\n#define GLFW_MOD_ALT             0x0004\n/*! @brief If this bit is set one or more Super keys were held down.\n *\n *  If this bit is set one or more Super keys were held down.\n */\n#define GLFW_MOD_SUPER           0x0008\n/*! @brief If this bit is set the Caps Lock key is enabled.\n *\n *  If this bit is set the Caps Lock key is enabled and the @ref\n *  GLFW_LOCK_KEY_MODS input mode is set.\n */\n#define GLFW_MOD_CAPS_LOCK       0x0010\n/*! @brief If this bit is set the Num Lock key is enabled.\n *\n *  If this bit is set the Num Lock key is enabled and the @ref\n *  GLFW_LOCK_KEY_MODS input mode is set.\n */\n#define GLFW_MOD_NUM_LOCK        0x0020\n\n/*! @} */\n\n/*! @defgroup buttons Mouse buttons\n *  @brief Mouse button IDs.\n *\n *  See [mouse button input](@ref input_mouse_button) for how these are used.\n *\n *  @ingroup input\n *  @{ */\n#define GLFW_MOUSE_BUTTON_1         0\n#define GLFW_MOUSE_BUTTON_2         1\n#define GLFW_MOUSE_BUTTON_3         2\n#define GLFW_MOUSE_BUTTON_4         3\n#define GLFW_MOUSE_BUTTON_5         4\n#define GLFW_MOUSE_BUTTON_6         5\n#define GLFW_MOUSE_BUTTON_7         6\n#define GLFW_MOUSE_BUTTON_8         7\n#define GLFW_MOUSE_BUTTON_LAST      GLFW_MOUSE_BUTTON_8\n#define GLFW_MOUSE_BUTTON_LEFT      GLFW_MOUSE_BUTTON_1\n#define GLFW_MOUSE_BUTTON_RIGHT     GLFW_MOUSE_BUTTON_2\n#define GLFW_MOUSE_BUTTON_MIDDLE    GLFW_MOUSE_BUTTON_3\n/*! @} */\n\n/*! @defgroup joysticks Joysticks\n *  @brief Joystick IDs.\n *\n *  See [joystick input](@ref joystick) for how these are used.\n *\n *  @ingroup input\n *  @{ */\n#define GLFW_JOYSTICK_1             0\n#define GLFW_JOYSTICK_2             1\n#define GLFW_JOYSTICK_3             2\n#define GLFW_JOYSTICK_4             3\n#define GLFW_JOYSTICK_5             4\n#define GLFW_JOYSTICK_6             5\n#define GLFW_JOYSTICK_7             6\n#define GLFW_JOYSTICK_8             7\n#define GLFW_JOYSTICK_9             8\n#define GLFW_JOYSTICK_10            9\n#define GLFW_JOYSTICK_11            10\n#define GLFW_JOYSTICK_12            11\n#define GLFW_JOYSTICK_13            12\n#define GLFW_JOYSTICK_14            13\n#define GLFW_JOYSTICK_15            14\n#define GLFW_JOYSTICK_16            15\n#define GLFW_JOYSTICK_LAST          GLFW_JOYSTICK_16\n/*! @} */\n\n/*! @defgroup gamepad_buttons Gamepad buttons\n *  @brief Gamepad buttons.\n *\n *  See @ref gamepad for how these are used.\n *\n *  @ingroup input\n *  @{ */\n#define GLFW_GAMEPAD_BUTTON_A               0\n#define GLFW_GAMEPAD_BUTTON_B               1\n#define GLFW_GAMEPAD_BUTTON_X               2\n#define GLFW_GAMEPAD_BUTTON_Y               3\n#define GLFW_GAMEPAD_BUTTON_LEFT_BUMPER     4\n#define GLFW_GAMEPAD_BUTTON_RIGHT_BUMPER    5\n#define GLFW_GAMEPAD_BUTTON_BACK            6\n#define GLFW_GAMEPAD_BUTTON_START           7\n#define GLFW_GAMEPAD_BUTTON_GUIDE           8\n#define GLFW_GAMEPAD_BUTTON_LEFT_THUMB      9\n#define GLFW_GAMEPAD_BUTTON_RIGHT_THUMB     10\n#define GLFW_GAMEPAD_BUTTON_DPAD_UP         11\n#define GLFW_GAMEPAD_BUTTON_DPAD_RIGHT      12\n#define GLFW_GAMEPAD_BUTTON_DPAD_DOWN       13\n#define GLFW_GAMEPAD_BUTTON_DPAD_LEFT       14\n#define GLFW_GAMEPAD_BUTTON_LAST            GLFW_GAMEPAD_BUTTON_DPAD_LEFT\n\n#define GLFW_GAMEPAD_BUTTON_CROSS       GLFW_GAMEPAD_BUTTON_A\n#define GLFW_GAMEPAD_BUTTON_CIRCLE      GLFW_GAMEPAD_BUTTON_B\n#define GLFW_GAMEPAD_BUTTON_SQUARE      GLFW_GAMEPAD_BUTTON_X\n#define GLFW_GAMEPAD_BUTTON_TRIANGLE    GLFW_GAMEPAD_BUTTON_Y\n/*! @} */\n\n/*! @defgroup gamepad_axes Gamepad axes\n *  @brief Gamepad axes.\n *\n *  See @ref gamepad for how these are used.\n *\n *  @ingroup input\n *  @{ */\n#define GLFW_GAMEPAD_AXIS_LEFT_X        0\n#define GLFW_GAMEPAD_AXIS_LEFT_Y        1\n#define GLFW_GAMEPAD_AXIS_RIGHT_X       2\n#define GLFW_GAMEPAD_AXIS_RIGHT_Y       3\n#define GLFW_GAMEPAD_AXIS_LEFT_TRIGGER  4\n#define GLFW_GAMEPAD_AXIS_RIGHT_TRIGGER 5\n#define GLFW_GAMEPAD_AXIS_LAST          GLFW_GAMEPAD_AXIS_RIGHT_TRIGGER\n/*! @} */\n\n/*! @defgroup errors Error codes\n *  @brief Error codes.\n *\n *  See [error handling](@ref error_handling) for how these are used.\n *\n *  @ingroup init\n *  @{ */\n/*! @brief No error has occurred.\n *\n *  No error has occurred.\n *\n *  @analysis Yay.\n */\n#define GLFW_NO_ERROR               0\n/*! @brief GLFW has not been initialized.\n *\n *  This occurs if a GLFW function was called that must not be called unless the\n *  library is [initialized](@ref intro_init).\n *\n *  @analysis Application programmer error.  Initialize GLFW before calling any\n *  function that requires initialization.\n */\n#define GLFW_NOT_INITIALIZED        0x00010001\n/*! @brief No context is current for this thread.\n *\n *  This occurs if a GLFW function was called that needs and operates on the\n *  current OpenGL or OpenGL ES context but no context is current on the calling\n *  thread.  One such function is @ref glfwSwapInterval.\n *\n *  @analysis Application programmer error.  Ensure a context is current before\n *  calling functions that require a current context.\n */\n#define GLFW_NO_CURRENT_CONTEXT     0x00010002\n/*! @brief One of the arguments to the function was an invalid enum value.\n *\n *  One of the arguments to the function was an invalid enum value, for example\n *  requesting @ref GLFW_RED_BITS with @ref glfwGetWindowAttrib.\n *\n *  @analysis Application programmer error.  Fix the offending call.\n */\n#define GLFW_INVALID_ENUM           0x00010003\n/*! @brief One of the arguments to the function was an invalid value.\n *\n *  One of the arguments to the function was an invalid value, for example\n *  requesting a non-existent OpenGL or OpenGL ES version like 2.7.\n *\n *  Requesting a valid but unavailable OpenGL or OpenGL ES version will instead\n *  result in a @ref GLFW_VERSION_UNAVAILABLE error.\n *\n *  @analysis Application programmer error.  Fix the offending call.\n */\n#define GLFW_INVALID_VALUE          0x00010004\n/*! @brief A memory allocation failed.\n *\n *  A memory allocation failed.\n *\n *  @analysis A bug in GLFW or the underlying operating system.  Report the bug\n *  to our [issue tracker](https://github.com/glfw/glfw/issues).\n */\n#define GLFW_OUT_OF_MEMORY          0x00010005\n/*! @brief GLFW could not find support for the requested API on the system.\n *\n *  GLFW could not find support for the requested API on the system.\n *\n *  @analysis The installed graphics driver does not support the requested\n *  API, or does not support it via the chosen context creation backend.\n *  Below are a few examples.\n *\n *  @par\n *  Some pre-installed Windows graphics drivers do not support OpenGL.  AMD only\n *  supports OpenGL ES via EGL, while Nvidia and Intel only support it via\n *  a WGL or GLX extension.  macOS does not provide OpenGL ES at all.  The Mesa\n *  EGL, OpenGL and OpenGL ES libraries do not interface with the Nvidia binary\n *  driver.  Older graphics drivers do not support Vulkan.\n */\n#define GLFW_API_UNAVAILABLE        0x00010006\n/*! @brief The requested OpenGL or OpenGL ES version is not available.\n *\n *  The requested OpenGL or OpenGL ES version (including any requested context\n *  or framebuffer hints) is not available on this machine.\n *\n *  @analysis The machine does not support your requirements.  If your\n *  application is sufficiently flexible, downgrade your requirements and try\n *  again.  Otherwise, inform the user that their machine does not match your\n *  requirements.\n *\n *  @par\n *  Future invalid OpenGL and OpenGL ES versions, for example OpenGL 4.8 if 5.0\n *  comes out before the 4.x series gets that far, also fail with this error and\n *  not @ref GLFW_INVALID_VALUE, because GLFW cannot know what future versions\n *  will exist.\n */\n#define GLFW_VERSION_UNAVAILABLE    0x00010007\n/*! @brief A platform-specific error occurred that does not match any of the\n *  more specific categories.\n *\n *  A platform-specific error occurred that does not match any of the more\n *  specific categories.\n *\n *  @analysis A bug or configuration error in GLFW, the underlying operating\n *  system or its drivers, or a lack of required resources.  Report the issue to\n *  our [issue tracker](https://github.com/glfw/glfw/issues).\n */\n#define GLFW_PLATFORM_ERROR         0x00010008\n/*! @brief The requested format is not supported or available.\n *\n *  If emitted during window creation, the requested pixel format is not\n *  supported.\n *\n *  If emitted when querying the clipboard, the contents of the clipboard could\n *  not be converted to the requested format.\n *\n *  @analysis If emitted during window creation, one or more\n *  [hard constraints](@ref window_hints_hard) did not match any of the\n *  available pixel formats.  If your application is sufficiently flexible,\n *  downgrade your requirements and try again.  Otherwise, inform the user that\n *  their machine does not match your requirements.\n *\n *  @par\n *  If emitted when querying the clipboard, ignore the error or report it to\n *  the user, as appropriate.\n */\n#define GLFW_FORMAT_UNAVAILABLE     0x00010009\n/*! @brief The specified window does not have an OpenGL or OpenGL ES context.\n *\n *  A window that does not have an OpenGL or OpenGL ES context was passed to\n *  a function that requires it to have one.\n *\n *  @analysis Application programmer error.  Fix the offending call.\n */\n#define GLFW_NO_WINDOW_CONTEXT      0x0001000A\n/*! @} */\n\n/*! @addtogroup window\n *  @{ */\n/*! @brief Input focus window hint and attribute\n *\n *  Input focus [window hint](@ref GLFW_FOCUSED_hint) or\n *  [window attribute](@ref GLFW_FOCUSED_attrib).\n */\n#define GLFW_FOCUSED                0x00020001\n/*! @brief Window iconification window attribute\n *\n *  Window iconification [window attribute](@ref GLFW_ICONIFIED_attrib).\n */\n#define GLFW_ICONIFIED              0x00020002\n/*! @brief Window resize-ability window hint and attribute\n *\n *  Window resize-ability [window hint](@ref GLFW_RESIZABLE_hint) and\n *  [window attribute](@ref GLFW_RESIZABLE_attrib).\n */\n#define GLFW_RESIZABLE              0x00020003\n/*! @brief Window visibility window hint and attribute\n *\n *  Window visibility [window hint](@ref GLFW_VISIBLE_hint) and\n *  [window attribute](@ref GLFW_VISIBLE_attrib).\n */\n#define GLFW_VISIBLE                0x00020004\n/*! @brief Window decoration window hint and attribute\n *\n *  Window decoration [window hint](@ref GLFW_DECORATED_hint) and\n *  [window attribute](@ref GLFW_DECORATED_attrib).\n */\n#define GLFW_DECORATED              0x00020005\n/*! @brief Window auto-iconification window hint and attribute\n *\n *  Window auto-iconification [window hint](@ref GLFW_AUTO_ICONIFY_hint) and\n *  [window attribute](@ref GLFW_AUTO_ICONIFY_attrib).\n */\n#define GLFW_AUTO_ICONIFY           0x00020006\n/*! @brief Window decoration window hint and attribute\n *\n *  Window decoration [window hint](@ref GLFW_FLOATING_hint) and\n *  [window attribute](@ref GLFW_FLOATING_attrib).\n */\n#define GLFW_FLOATING               0x00020007\n/*! @brief Window maximization window hint and attribute\n *\n *  Window maximization [window hint](@ref GLFW_MAXIMIZED_hint) and\n *  [window attribute](@ref GLFW_MAXIMIZED_attrib).\n */\n#define GLFW_MAXIMIZED              0x00020008\n/*! @brief Cursor centering window hint\n *\n *  Cursor centering [window hint](@ref GLFW_CENTER_CURSOR_hint).\n */\n#define GLFW_CENTER_CURSOR          0x00020009\n/*! @brief Window framebuffer transparency hint and attribute\n *\n *  Window framebuffer transparency\n *  [window hint](@ref GLFW_TRANSPARENT_FRAMEBUFFER_hint) and\n *  [window attribute](@ref GLFW_TRANSPARENT_FRAMEBUFFER_attrib).\n */\n#define GLFW_TRANSPARENT_FRAMEBUFFER 0x0002000A\n/*! @brief Mouse cursor hover window attribute.\n *\n *  Mouse cursor hover [window attribute](@ref GLFW_HOVERED_attrib).\n */\n#define GLFW_HOVERED                0x0002000B\n/*! @brief Input focus on calling show window hint and attribute\n *\n *  Input focus [window hint](@ref GLFW_FOCUS_ON_SHOW_hint) or\n *  [window attribute](@ref GLFW_FOCUS_ON_SHOW_attrib).\n */\n#define GLFW_FOCUS_ON_SHOW          0x0002000C\n\n/*! @brief Framebuffer bit depth hint.\n *\n *  Framebuffer bit depth [hint](@ref GLFW_RED_BITS).\n */\n#define GLFW_RED_BITS               0x00021001\n/*! @brief Framebuffer bit depth hint.\n *\n *  Framebuffer bit depth [hint](@ref GLFW_GREEN_BITS).\n */\n#define GLFW_GREEN_BITS             0x00021002\n/*! @brief Framebuffer bit depth hint.\n *\n *  Framebuffer bit depth [hint](@ref GLFW_BLUE_BITS).\n */\n#define GLFW_BLUE_BITS              0x00021003\n/*! @brief Framebuffer bit depth hint.\n *\n *  Framebuffer bit depth [hint](@ref GLFW_ALPHA_BITS).\n */\n#define GLFW_ALPHA_BITS             0x00021004\n/*! @brief Framebuffer bit depth hint.\n *\n *  Framebuffer bit depth [hint](@ref GLFW_DEPTH_BITS).\n */\n#define GLFW_DEPTH_BITS             0x00021005\n/*! @brief Framebuffer bit depth hint.\n *\n *  Framebuffer bit depth [hint](@ref GLFW_STENCIL_BITS).\n */\n#define GLFW_STENCIL_BITS           0x00021006\n/*! @brief Framebuffer bit depth hint.\n *\n *  Framebuffer bit depth [hint](@ref GLFW_ACCUM_RED_BITS).\n */\n#define GLFW_ACCUM_RED_BITS         0x00021007\n/*! @brief Framebuffer bit depth hint.\n *\n *  Framebuffer bit depth [hint](@ref GLFW_ACCUM_GREEN_BITS).\n */\n#define GLFW_ACCUM_GREEN_BITS       0x00021008\n/*! @brief Framebuffer bit depth hint.\n *\n *  Framebuffer bit depth [hint](@ref GLFW_ACCUM_BLUE_BITS).\n */\n#define GLFW_ACCUM_BLUE_BITS        0x00021009\n/*! @brief Framebuffer bit depth hint.\n *\n *  Framebuffer bit depth [hint](@ref GLFW_ACCUM_ALPHA_BITS).\n */\n#define GLFW_ACCUM_ALPHA_BITS       0x0002100A\n/*! @brief Framebuffer auxiliary buffer hint.\n *\n *  Framebuffer auxiliary buffer [hint](@ref GLFW_AUX_BUFFERS).\n */\n#define GLFW_AUX_BUFFERS            0x0002100B\n/*! @brief OpenGL stereoscopic rendering hint.\n *\n *  OpenGL stereoscopic rendering [hint](@ref GLFW_STEREO).\n */\n#define GLFW_STEREO                 0x0002100C\n/*! @brief Framebuffer MSAA samples hint.\n *\n *  Framebuffer MSAA samples [hint](@ref GLFW_SAMPLES).\n */\n#define GLFW_SAMPLES                0x0002100D\n/*! @brief Framebuffer sRGB hint.\n *\n *  Framebuffer sRGB [hint](@ref GLFW_SRGB_CAPABLE).\n */\n#define GLFW_SRGB_CAPABLE           0x0002100E\n/*! @brief Monitor refresh rate hint.\n *\n *  Monitor refresh rate [hint](@ref GLFW_REFRESH_RATE).\n */\n#define GLFW_REFRESH_RATE           0x0002100F\n/*! @brief Framebuffer double buffering hint.\n *\n *  Framebuffer double buffering [hint](@ref GLFW_DOUBLEBUFFER).\n */\n#define GLFW_DOUBLEBUFFER           0x00021010\n\n/*! @brief Context client API hint and attribute.\n *\n *  Context client API [hint](@ref GLFW_CLIENT_API_hint) and\n *  [attribute](@ref GLFW_CLIENT_API_attrib).\n */\n#define GLFW_CLIENT_API             0x00022001\n/*! @brief Context client API major version hint and attribute.\n *\n *  Context client API major version [hint](@ref GLFW_CONTEXT_VERSION_MAJOR_hint)\n *  and [attribute](@ref GLFW_CONTEXT_VERSION_MAJOR_attrib).\n */\n#define GLFW_CONTEXT_VERSION_MAJOR  0x00022002\n/*! @brief Context client API minor version hint and attribute.\n *\n *  Context client API minor version [hint](@ref GLFW_CONTEXT_VERSION_MINOR_hint)\n *  and [attribute](@ref GLFW_CONTEXT_VERSION_MINOR_attrib).\n */\n#define GLFW_CONTEXT_VERSION_MINOR  0x00022003\n/*! @brief Context client API revision number hint and attribute.\n *\n *  Context client API revision number\n *  [attribute](@ref GLFW_CONTEXT_REVISION_attrib).\n */\n#define GLFW_CONTEXT_REVISION       0x00022004\n/*! @brief Context robustness hint and attribute.\n *\n *  Context client API revision number [hint](@ref GLFW_CONTEXT_ROBUSTNESS_hint)\n *  and [attribute](@ref GLFW_CONTEXT_ROBUSTNESS_attrib).\n */\n#define GLFW_CONTEXT_ROBUSTNESS     0x00022005\n/*! @brief OpenGL forward-compatibility hint and attribute.\n *\n *  OpenGL forward-compatibility [hint](@ref GLFW_OPENGL_FORWARD_COMPAT_hint)\n *  and [attribute](@ref GLFW_OPENGL_FORWARD_COMPAT_attrib).\n */\n#define GLFW_OPENGL_FORWARD_COMPAT  0x00022006\n/*! @brief OpenGL debug context hint and attribute.\n *\n *  OpenGL debug context [hint](@ref GLFW_OPENGL_DEBUG_CONTEXT_hint) and\n *  [attribute](@ref GLFW_OPENGL_DEBUG_CONTEXT_attrib).\n */\n#define GLFW_OPENGL_DEBUG_CONTEXT   0x00022007\n/*! @brief OpenGL profile hint and attribute.\n *\n *  OpenGL profile [hint](@ref GLFW_OPENGL_PROFILE_hint) and\n *  [attribute](@ref GLFW_OPENGL_PROFILE_attrib).\n */\n#define GLFW_OPENGL_PROFILE         0x00022008\n/*! @brief Context flush-on-release hint and attribute.\n *\n *  Context flush-on-release [hint](@ref GLFW_CONTEXT_RELEASE_BEHAVIOR_hint) and\n *  [attribute](@ref GLFW_CONTEXT_RELEASE_BEHAVIOR_attrib).\n */\n#define GLFW_CONTEXT_RELEASE_BEHAVIOR 0x00022009\n/*! @brief Context error suppression hint and attribute.\n *\n *  Context error suppression [hint](@ref GLFW_CONTEXT_NO_ERROR_hint) and\n *  [attribute](@ref GLFW_CONTEXT_NO_ERROR_attrib).\n */\n#define GLFW_CONTEXT_NO_ERROR       0x0002200A\n/*! @brief Context creation API hint and attribute.\n *\n *  Context creation API [hint](@ref GLFW_CONTEXT_CREATION_API_hint) and\n *  [attribute](@ref GLFW_CONTEXT_CREATION_API_attrib).\n */\n#define GLFW_CONTEXT_CREATION_API   0x0002200B\n/*! @brief Window content area scaling window\n *  [window hint](@ref GLFW_SCALE_TO_MONITOR).\n */\n#define GLFW_SCALE_TO_MONITOR       0x0002200C\n/*! @brief macOS specific\n *  [window hint](@ref GLFW_COCOA_RETINA_FRAMEBUFFER_hint).\n */\n#define GLFW_COCOA_RETINA_FRAMEBUFFER 0x00023001\n/*! @brief macOS specific\n *  [window hint](@ref GLFW_COCOA_FRAME_NAME_hint).\n */\n#define GLFW_COCOA_FRAME_NAME         0x00023002\n/*! @brief macOS specific\n *  [window hint](@ref GLFW_COCOA_GRAPHICS_SWITCHING_hint).\n */\n#define GLFW_COCOA_GRAPHICS_SWITCHING 0x00023003\n/*! @brief X11 specific\n *  [window hint](@ref GLFW_X11_CLASS_NAME_hint).\n */\n#define GLFW_X11_CLASS_NAME         0x00024001\n/*! @brief X11 specific\n *  [window hint](@ref GLFW_X11_CLASS_NAME_hint).\n */\n#define GLFW_X11_INSTANCE_NAME      0x00024002\n/*! @} */\n\n#define GLFW_NO_API                          0\n#define GLFW_OPENGL_API             0x00030001\n#define GLFW_OPENGL_ES_API          0x00030002\n\n#define GLFW_NO_ROBUSTNESS                   0\n#define GLFW_NO_RESET_NOTIFICATION  0x00031001\n#define GLFW_LOSE_CONTEXT_ON_RESET  0x00031002\n\n#define GLFW_OPENGL_ANY_PROFILE              0\n#define GLFW_OPENGL_CORE_PROFILE    0x00032001\n#define GLFW_OPENGL_COMPAT_PROFILE  0x00032002\n\n#define GLFW_CURSOR                 0x00033001\n#define GLFW_STICKY_KEYS            0x00033002\n#define GLFW_STICKY_MOUSE_BUTTONS   0x00033003\n#define GLFW_LOCK_KEY_MODS          0x00033004\n#define GLFW_RAW_MOUSE_MOTION       0x00033005\n\n#define GLFW_CURSOR_NORMAL          0x00034001\n#define GLFW_CURSOR_HIDDEN          0x00034002\n#define GLFW_CURSOR_DISABLED        0x00034003\n\n#define GLFW_ANY_RELEASE_BEHAVIOR            0\n#define GLFW_RELEASE_BEHAVIOR_FLUSH 0x00035001\n#define GLFW_RELEASE_BEHAVIOR_NONE  0x00035002\n\n#define GLFW_NATIVE_CONTEXT_API     0x00036001\n#define GLFW_EGL_CONTEXT_API        0x00036002\n#define GLFW_OSMESA_CONTEXT_API     0x00036003\n\n/*! @defgroup shapes Standard cursor shapes\n *  @brief Standard system cursor shapes.\n *\n *  See [standard cursor creation](@ref cursor_standard) for how these are used.\n *\n *  @ingroup input\n *  @{ */\n\n/*! @brief The regular arrow cursor shape.\n *\n *  The regular arrow cursor.\n */\n#define GLFW_ARROW_CURSOR           0x00036001\n/*! @brief The text input I-beam cursor shape.\n *\n *  The text input I-beam cursor shape.\n */\n#define GLFW_IBEAM_CURSOR           0x00036002\n/*! @brief The crosshair shape.\n *\n *  The crosshair shape.\n */\n#define GLFW_CROSSHAIR_CURSOR       0x00036003\n/*! @brief The hand shape.\n *\n *  The hand shape.\n */\n#define GLFW_HAND_CURSOR            0x00036004\n/*! @brief The horizontal resize arrow shape.\n *\n *  The horizontal resize arrow shape.\n */\n#define GLFW_HRESIZE_CURSOR         0x00036005\n/*! @brief The vertical resize arrow shape.\n *\n *  The vertical resize arrow shape.\n */\n#define GLFW_VRESIZE_CURSOR         0x00036006\n/*! @} */\n\n#define GLFW_CONNECTED              0x00040001\n#define GLFW_DISCONNECTED           0x00040002\n\n/*! @addtogroup init\n *  @{ */\n/*! @brief Joystick hat buttons init hint.\n *\n *  Joystick hat buttons [init hint](@ref GLFW_JOYSTICK_HAT_BUTTONS).\n */\n#define GLFW_JOYSTICK_HAT_BUTTONS   0x00050001\n/*! @brief macOS specific init hint.\n *\n *  macOS specific [init hint](@ref GLFW_COCOA_CHDIR_RESOURCES_hint).\n */\n#define GLFW_COCOA_CHDIR_RESOURCES  0x00051001\n/*! @brief macOS specific init hint.\n *\n *  macOS specific [init hint](@ref GLFW_COCOA_MENUBAR_hint).\n */\n#define GLFW_COCOA_MENUBAR          0x00051002\n/*! @} */\n\n#define GLFW_DONT_CARE              -1\n\n\n/*************************************************************************\n * GLFW API types\n *************************************************************************/\n\n/*! @brief Client API function pointer type.\n *\n *  Generic function pointer used for returning client API function pointers\n *  without forcing a cast from a regular pointer.\n *\n *  @sa @ref context_glext\n *  @sa @ref glfwGetProcAddress\n *\n *  @since Added in version 3.0.\n *\n *  @ingroup context\n */\ntypedef void (*GLFWglproc)(void);\n\n/*! @brief Vulkan API function pointer type.\n *\n *  Generic function pointer used for returning Vulkan API function pointers\n *  without forcing a cast from a regular pointer.\n *\n *  @sa @ref vulkan_proc\n *  @sa @ref glfwGetInstanceProcAddress\n *\n *  @since Added in version 3.2.\n *\n *  @ingroup vulkan\n */\ntypedef void (*GLFWvkproc)(void);\n\n/*! @brief Opaque monitor object.\n *\n *  Opaque monitor object.\n *\n *  @see @ref monitor_object\n *\n *  @since Added in version 3.0.\n *\n *  @ingroup monitor\n */\ntypedef struct GLFWmonitor GLFWmonitor;\n\n/*! @brief Opaque window object.\n *\n *  Opaque window object.\n *\n *  @see @ref window_object\n *\n *  @since Added in version 3.0.\n *\n *  @ingroup window\n */\ntypedef struct GLFWwindow GLFWwindow;\n\n/*! @brief Opaque cursor object.\n *\n *  Opaque cursor object.\n *\n *  @see @ref cursor_object\n *\n *  @since Added in version 3.1.\n *\n *  @ingroup input\n */\ntypedef struct GLFWcursor GLFWcursor;\n\n/*! @brief The function pointer type for error callbacks.\n *\n *  This is the function pointer type for error callbacks.  An error callback\n *  function has the following signature:\n *  @code\n *  void callback_name(int error_code, const char* description)\n *  @endcode\n *\n *  @param[in] error_code An [error code](@ref errors).  Future releases may add\n *  more error codes.\n *  @param[in] description A UTF-8 encoded string describing the error.\n *\n *  @pointer_lifetime The error description string is valid until the callback\n *  function returns.\n *\n *  @sa @ref error_handling\n *  @sa @ref glfwSetErrorCallback\n *\n *  @since Added in version 3.0.\n *\n *  @ingroup init\n */\ntypedef void (* GLFWerrorfun)(int,const char*);\n\n/*! @brief The function pointer type for window position callbacks.\n *\n *  This is the function pointer type for window position callbacks.  A window\n *  position callback function has the following signature:\n *  @code\n *  void callback_name(GLFWwindow* window, int xpos, int ypos)\n *  @endcode\n *\n *  @param[in] window The window that was moved.\n *  @param[in] xpos The new x-coordinate, in screen coordinates, of the\n *  upper-left corner of the content area of the window.\n *  @param[in] ypos The new y-coordinate, in screen coordinates, of the\n *  upper-left corner of the content area of the window.\n *\n *  @sa @ref window_pos\n *  @sa @ref glfwSetWindowPosCallback\n *\n *  @since Added in version 3.0.\n *\n *  @ingroup window\n */\ntypedef void (* GLFWwindowposfun)(GLFWwindow*,int,int);\n\n/*! @brief The function pointer type for window size callbacks.\n *\n *  This is the function pointer type for window size callbacks.  A window size\n *  callback function has the following signature:\n *  @code\n *  void callback_name(GLFWwindow* window, int width, int height)\n *  @endcode\n *\n *  @param[in] window The window that was resized.\n *  @param[in] width The new width, in screen coordinates, of the window.\n *  @param[in] height The new height, in screen coordinates, of the window.\n *\n *  @sa @ref window_size\n *  @sa @ref glfwSetWindowSizeCallback\n *\n *  @since Added in version 1.0.\n *  @glfw3 Added window handle parameter.\n *\n *  @ingroup window\n */\ntypedef void (* GLFWwindowsizefun)(GLFWwindow*,int,int);\n\n/*! @brief The function pointer type for window close callbacks.\n *\n *  This is the function pointer type for window close callbacks.  A window\n *  close callback function has the following signature:\n *  @code\n *  void function_name(GLFWwindow* window)\n *  @endcode\n *\n *  @param[in] window The window that the user attempted to close.\n *\n *  @sa @ref window_close\n *  @sa @ref glfwSetWindowCloseCallback\n *\n *  @since Added in version 2.5.\n *  @glfw3 Added window handle parameter.\n *\n *  @ingroup window\n */\ntypedef void (* GLFWwindowclosefun)(GLFWwindow*);\n\n/*! @brief The function pointer type for window content refresh callbacks.\n *\n *  This is the function pointer type for window content refresh callbacks.\n *  A window content refresh callback function has the following signature:\n *  @code\n *  void function_name(GLFWwindow* window);\n *  @endcode\n *\n *  @param[in] window The window whose content needs to be refreshed.\n *\n *  @sa @ref window_refresh\n *  @sa @ref glfwSetWindowRefreshCallback\n *\n *  @since Added in version 2.5.\n *  @glfw3 Added window handle parameter.\n *\n *  @ingroup window\n */\ntypedef void (* GLFWwindowrefreshfun)(GLFWwindow*);\n\n/*! @brief The function pointer type for window focus callbacks.\n *\n *  This is the function pointer type for window focus callbacks.  A window\n *  focus callback function has the following signature:\n *  @code\n *  void function_name(GLFWwindow* window, int focused)\n *  @endcode\n *\n *  @param[in] window The window that gained or lost input focus.\n *  @param[in] focused `GLFW_TRUE` if the window was given input focus, or\n *  `GLFW_FALSE` if it lost it.\n *\n *  @sa @ref window_focus\n *  @sa @ref glfwSetWindowFocusCallback\n *\n *  @since Added in version 3.0.\n *\n *  @ingroup window\n */\ntypedef void (* GLFWwindowfocusfun)(GLFWwindow*,int);\n\n/*! @brief The function pointer type for window iconify callbacks.\n *\n *  This is the function pointer type for window iconify callbacks.  A window\n *  iconify callback function has the following signature:\n *  @code\n *  void function_name(GLFWwindow* window, int iconified)\n *  @endcode\n *\n *  @param[in] window The window that was iconified or restored.\n *  @param[in] iconified `GLFW_TRUE` if the window was iconified, or\n *  `GLFW_FALSE` if it was restored.\n *\n *  @sa @ref window_iconify\n *  @sa @ref glfwSetWindowIconifyCallback\n *\n *  @since Added in version 3.0.\n *\n *  @ingroup window\n */\ntypedef void (* GLFWwindowiconifyfun)(GLFWwindow*,int);\n\n/*! @brief The function pointer type for window maximize callbacks.\n *\n *  This is the function pointer type for window maximize callbacks.  A window\n *  maximize callback function has the following signature:\n *  @code\n *  void function_name(GLFWwindow* window, int maximized)\n *  @endcode\n *\n *  @param[in] window The window that was maximized or restored.\n *  @param[in] iconified `GLFW_TRUE` if the window was maximized, or\n *  `GLFW_FALSE` if it was restored.\n *\n *  @sa @ref window_maximize\n *  @sa glfwSetWindowMaximizeCallback\n *\n *  @since Added in version 3.3.\n *\n *  @ingroup window\n */\ntypedef void (* GLFWwindowmaximizefun)(GLFWwindow*,int);\n\n/*! @brief The function pointer type for framebuffer size callbacks.\n *\n *  This is the function pointer type for framebuffer size callbacks.\n *  A framebuffer size callback function has the following signature:\n *  @code\n *  void function_name(GLFWwindow* window, int width, int height)\n *  @endcode\n *\n *  @param[in] window The window whose framebuffer was resized.\n *  @param[in] width The new width, in pixels, of the framebuffer.\n *  @param[in] height The new height, in pixels, of the framebuffer.\n *\n *  @sa @ref window_fbsize\n *  @sa @ref glfwSetFramebufferSizeCallback\n *\n *  @since Added in version 3.0.\n *\n *  @ingroup window\n */\ntypedef void (* GLFWframebuffersizefun)(GLFWwindow*,int,int);\n\n/*! @brief The function pointer type for window content scale callbacks.\n *\n *  This is the function pointer type for window content scale callbacks.\n *  A window content scale callback function has the following signature:\n *  @code\n *  void function_name(GLFWwindow* window, float xscale, float yscale)\n *  @endcode\n *\n *  @param[in] window The window whose content scale changed.\n *  @param[in] xscale The new x-axis content scale of the window.\n *  @param[in] yscale The new y-axis content scale of the window.\n *\n *  @sa @ref window_scale\n *  @sa @ref glfwSetWindowContentScaleCallback\n *\n *  @since Added in version 3.3.\n *\n *  @ingroup window\n */\ntypedef void (* GLFWwindowcontentscalefun)(GLFWwindow*,float,float);\n\n/*! @brief The function pointer type for mouse button callbacks.\n *\n *  This is the function pointer type for mouse button callback functions.\n *  A mouse button callback function has the following signature:\n *  @code\n *  void function_name(GLFWwindow* window, int button, int action, int mods)\n *  @endcode\n *\n *  @param[in] window The window that received the event.\n *  @param[in] button The [mouse button](@ref buttons) that was pressed or\n *  released.\n *  @param[in] action One of `GLFW_PRESS` or `GLFW_RELEASE`.  Future releases\n *  may add more actions.\n *  @param[in] mods Bit field describing which [modifier keys](@ref mods) were\n *  held down.\n *\n *  @sa @ref input_mouse_button\n *  @sa @ref glfwSetMouseButtonCallback\n *\n *  @since Added in version 1.0.\n *  @glfw3 Added window handle and modifier mask parameters.\n *\n *  @ingroup input\n */\ntypedef void (* GLFWmousebuttonfun)(GLFWwindow*,int,int,int);\n\n/*! @brief The function pointer type for cursor position callbacks.\n *\n *  This is the function pointer type for cursor position callbacks.  A cursor\n *  position callback function has the following signature:\n *  @code\n *  void function_name(GLFWwindow* window, double xpos, double ypos);\n *  @endcode\n *\n *  @param[in] window The window that received the event.\n *  @param[in] xpos The new cursor x-coordinate, relative to the left edge of\n *  the content area.\n *  @param[in] ypos The new cursor y-coordinate, relative to the top edge of the\n *  content area.\n *\n *  @sa @ref cursor_pos\n *  @sa @ref glfwSetCursorPosCallback\n *\n *  @since Added in version 3.0.  Replaces `GLFWmouseposfun`.\n *\n *  @ingroup input\n */\ntypedef void (* GLFWcursorposfun)(GLFWwindow*,double,double);\n\n/*! @brief The function pointer type for cursor enter/leave callbacks.\n *\n *  This is the function pointer type for cursor enter/leave callbacks.\n *  A cursor enter/leave callback function has the following signature:\n *  @code\n *  void function_name(GLFWwindow* window, int entered)\n *  @endcode\n *\n *  @param[in] window The window that received the event.\n *  @param[in] entered `GLFW_TRUE` if the cursor entered the window's content\n *  area, or `GLFW_FALSE` if it left it.\n *\n *  @sa @ref cursor_enter\n *  @sa @ref glfwSetCursorEnterCallback\n *\n *  @since Added in version 3.0.\n *\n *  @ingroup input\n */\ntypedef void (* GLFWcursorenterfun)(GLFWwindow*,int);\n\n/*! @brief The function pointer type for scroll callbacks.\n *\n *  This is the function pointer type for scroll callbacks.  A scroll callback\n *  function has the following signature:\n *  @code\n *  void function_name(GLFWwindow* window, double xoffset, double yoffset)\n *  @endcode\n *\n *  @param[in] window The window that received the event.\n *  @param[in] xoffset The scroll offset along the x-axis.\n *  @param[in] yoffset The scroll offset along the y-axis.\n *\n *  @sa @ref scrolling\n *  @sa @ref glfwSetScrollCallback\n *\n *  @since Added in version 3.0.  Replaces `GLFWmousewheelfun`.\n *\n *  @ingroup input\n */\ntypedef void (* GLFWscrollfun)(GLFWwindow*,double,double);\n\n/*! @brief The function pointer type for keyboard key callbacks.\n *\n *  This is the function pointer type for keyboard key callbacks.  A keyboard\n *  key callback function has the following signature:\n *  @code\n *  void function_name(GLFWwindow* window, int key, int scancode, int action, int mods)\n *  @endcode\n *\n *  @param[in] window The window that received the event.\n *  @param[in] key The [keyboard key](@ref keys) that was pressed or released.\n *  @param[in] scancode The system-specific scancode of the key.\n *  @param[in] action `GLFW_PRESS`, `GLFW_RELEASE` or `GLFW_REPEAT`.  Future\n *  releases may add more actions.\n *  @param[in] mods Bit field describing which [modifier keys](@ref mods) were\n *  held down.\n *\n *  @sa @ref input_key\n *  @sa @ref glfwSetKeyCallback\n *\n *  @since Added in version 1.0.\n *  @glfw3 Added window handle, scancode and modifier mask parameters.\n *\n *  @ingroup input\n */\ntypedef void (* GLFWkeyfun)(GLFWwindow*,int,int,int,int);\n\n/*! @brief The function pointer type for Unicode character callbacks.\n *\n *  This is the function pointer type for Unicode character callbacks.\n *  A Unicode character callback function has the following signature:\n *  @code\n *  void function_name(GLFWwindow* window, unsigned int codepoint)\n *  @endcode\n *\n *  @param[in] window The window that received the event.\n *  @param[in] codepoint The Unicode code point of the character.\n *\n *  @sa @ref input_char\n *  @sa @ref glfwSetCharCallback\n *\n *  @since Added in version 2.4.\n *  @glfw3 Added window handle parameter.\n *\n *  @ingroup input\n */\ntypedef void (* GLFWcharfun)(GLFWwindow*,unsigned int);\n\n/*! @brief The function pointer type for Unicode character with modifiers\n *  callbacks.\n *\n *  This is the function pointer type for Unicode character with modifiers\n *  callbacks.  It is called for each input character, regardless of what\n *  modifier keys are held down.  A Unicode character with modifiers callback\n *  function has the following signature:\n *  @code\n *  void function_name(GLFWwindow* window, unsigned int codepoint, int mods)\n *  @endcode\n *\n *  @param[in] window The window that received the event.\n *  @param[in] codepoint The Unicode code point of the character.\n *  @param[in] mods Bit field describing which [modifier keys](@ref mods) were\n *  held down.\n *\n *  @sa @ref input_char\n *  @sa @ref glfwSetCharModsCallback\n *\n *  @deprecated Scheduled for removal in version 4.0.\n *\n *  @since Added in version 3.1.\n *\n *  @ingroup input\n */\ntypedef void (* GLFWcharmodsfun)(GLFWwindow*,unsigned int,int);\n\n/*! @brief The function pointer type for path drop callbacks.\n *\n *  This is the function pointer type for path drop callbacks.  A path drop\n *  callback function has the following signature:\n *  @code\n *  void function_name(GLFWwindow* window, int path_count, const char* paths[])\n *  @endcode\n *\n *  @param[in] window The window that received the event.\n *  @param[in] path_count The number of dropped paths.\n *  @param[in] paths The UTF-8 encoded file and/or directory path names.\n *\n *  @pointer_lifetime The path array and its strings are valid until the\n *  callback function returns.\n *\n *  @sa @ref path_drop\n *  @sa @ref glfwSetDropCallback\n *\n *  @since Added in version 3.1.\n *\n *  @ingroup input\n */\ntypedef void (* GLFWdropfun)(GLFWwindow*,int,const char*[]);\n\n/*! @brief The function pointer type for monitor configuration callbacks.\n *\n *  This is the function pointer type for monitor configuration callbacks.\n *  A monitor callback function has the following signature:\n *  @code\n *  void function_name(GLFWmonitor* monitor, int event)\n *  @endcode\n *\n *  @param[in] monitor The monitor that was connected or disconnected.\n *  @param[in] event One of `GLFW_CONNECTED` or `GLFW_DISCONNECTED`.  Future\n *  releases may add more events.\n *\n *  @sa @ref monitor_event\n *  @sa @ref glfwSetMonitorCallback\n *\n *  @since Added in version 3.0.\n *\n *  @ingroup monitor\n */\ntypedef void (* GLFWmonitorfun)(GLFWmonitor*,int);\n\n/*! @brief The function pointer type for joystick configuration callbacks.\n *\n *  This is the function pointer type for joystick configuration callbacks.\n *  A joystick configuration callback function has the following signature:\n *  @code\n *  void function_name(int jid, int event)\n *  @endcode\n *\n *  @param[in] jid The joystick that was connected or disconnected.\n *  @param[in] event One of `GLFW_CONNECTED` or `GLFW_DISCONNECTED`.  Future\n *  releases may add more events.\n *\n *  @sa @ref joystick_event\n *  @sa @ref glfwSetJoystickCallback\n *\n *  @since Added in version 3.2.\n *\n *  @ingroup input\n */\ntypedef void (* GLFWjoystickfun)(int,int);\n\n/*! @brief Video mode type.\n *\n *  This describes a single video mode.\n *\n *  @sa @ref monitor_modes\n *  @sa @ref glfwGetVideoMode\n *  @sa @ref glfwGetVideoModes\n *\n *  @since Added in version 1.0.\n *  @glfw3 Added refresh rate member.\n *\n *  @ingroup monitor\n */\ntypedef struct GLFWvidmode\n{\n    /*! The width, in screen coordinates, of the video mode.\n     */\n    int width;\n    /*! The height, in screen coordinates, of the video mode.\n     */\n    int height;\n    /*! The bit depth of the red channel of the video mode.\n     */\n    int redBits;\n    /*! The bit depth of the green channel of the video mode.\n     */\n    int greenBits;\n    /*! The bit depth of the blue channel of the video mode.\n     */\n    int blueBits;\n    /*! The refresh rate, in Hz, of the video mode.\n     */\n    int refreshRate;\n} GLFWvidmode;\n\n/*! @brief Gamma ramp.\n *\n *  This describes the gamma ramp for a monitor.\n *\n *  @sa @ref monitor_gamma\n *  @sa @ref glfwGetGammaRamp\n *  @sa @ref glfwSetGammaRamp\n *\n *  @since Added in version 3.0.\n *\n *  @ingroup monitor\n */\ntypedef struct GLFWgammaramp\n{\n    /*! An array of value describing the response of the red channel.\n     */\n    unsigned short* red;\n    /*! An array of value describing the response of the green channel.\n     */\n    unsigned short* green;\n    /*! An array of value describing the response of the blue channel.\n     */\n    unsigned short* blue;\n    /*! The number of elements in each array.\n     */\n    unsigned int size;\n} GLFWgammaramp;\n\n/*! @brief Image data.\n *\n *  This describes a single 2D image.  See the documentation for each related\n *  function what the expected pixel format is.\n *\n *  @sa @ref cursor_custom\n *  @sa @ref window_icon\n *\n *  @since Added in version 2.1.\n *  @glfw3 Removed format and bytes-per-pixel members.\n *\n *  @ingroup window\n */\ntypedef struct GLFWimage\n{\n    /*! The width, in pixels, of this image.\n     */\n    int width;\n    /*! The height, in pixels, of this image.\n     */\n    int height;\n    /*! The pixel data of this image, arranged left-to-right, top-to-bottom.\n     */\n    unsigned char* pixels;\n} GLFWimage;\n\n/*! @brief Gamepad input state\n *\n *  This describes the input state of a gamepad.\n *\n *  @sa @ref gamepad\n *  @sa @ref glfwGetGamepadState\n *\n *  @since Added in version 3.3.\n *\n *  @ingroup input\n */\ntypedef struct GLFWgamepadstate\n{\n    /*! The states of each [gamepad button](@ref gamepad_buttons), `GLFW_PRESS`\n     *  or `GLFW_RELEASE`.\n     */\n    unsigned char buttons[15];\n    /*! The states of each [gamepad axis](@ref gamepad_axes), in the range -1.0\n     *  to 1.0 inclusive.\n     */\n    float axes[6];\n} GLFWgamepadstate;\n\n\n/*************************************************************************\n * GLFW API functions\n *************************************************************************/\n\n/*! @brief Initializes the GLFW library.\n *\n *  This function initializes the GLFW library.  Before most GLFW functions can\n *  be used, GLFW must be initialized, and before an application terminates GLFW\n *  should be terminated in order to free any resources allocated during or\n *  after initialization.\n *\n *  If this function fails, it calls @ref glfwTerminate before returning.  If it\n *  succeeds, you should call @ref glfwTerminate before the application exits.\n *\n *  Additional calls to this function after successful initialization but before\n *  termination will return `GLFW_TRUE` immediately.\n *\n *  @return `GLFW_TRUE` if successful, or `GLFW_FALSE` if an\n *  [error](@ref error_handling) occurred.\n *\n *  @errors Possible errors include @ref GLFW_PLATFORM_ERROR.\n *\n *  @remark @macos This function will change the current directory of the\n *  application to the `Contents/Resources` subdirectory of the application's\n *  bundle, if present.  This can be disabled with the @ref\n *  GLFW_COCOA_CHDIR_RESOURCES init hint.\n *\n *  @thread_safety This function must only be called from the main thread.\n *\n *  @sa @ref intro_init\n *  @sa @ref glfwTerminate\n *\n *  @since Added in version 1.0.\n *\n *  @ingroup init\n */\nGLFWAPI int glfwInit(void);\n\n/*! @brief Terminates the GLFW library.\n *\n *  This function destroys all remaining windows and cursors, restores any\n *  modified gamma ramps and frees any other allocated resources.  Once this\n *  function is called, you must again call @ref glfwInit successfully before\n *  you will be able to use most GLFW functions.\n *\n *  If GLFW has been successfully initialized, this function should be called\n *  before the application exits.  If initialization fails, there is no need to\n *  call this function, as it is called by @ref glfwInit before it returns\n *  failure.\n *\n *  @errors Possible errors include @ref GLFW_PLATFORM_ERROR.\n *\n *  @remark This function may be called before @ref glfwInit.\n *\n *  @warning The contexts of any remaining windows must not be current on any\n *  other thread when this function is called.\n *\n *  @reentrancy This function must not be called from a callback.\n *\n *  @thread_safety This function must only be called from the main thread.\n *\n *  @sa @ref intro_init\n *  @sa @ref glfwInit\n *\n *  @since Added in version 1.0.\n *\n *  @ingroup init\n */\nGLFWAPI void glfwTerminate(void);\n\n/*! @brief Sets the specified init hint to the desired value.\n *\n *  This function sets hints for the next initialization of GLFW.\n *\n *  The values you set hints to are never reset by GLFW, but they only take\n *  effect during initialization.  Once GLFW has been initialized, any values\n *  you set will be ignored until the library is terminated and initialized\n *  again.\n *\n *  Some hints are platform specific.  These may be set on any platform but they\n *  will only affect their specific platform.  Other platforms will ignore them.\n *  Setting these hints requires no platform specific headers or functions.\n *\n *  @param[in] hint The [init hint](@ref init_hints) to set.\n *  @param[in] value The new value of the init hint.\n *\n *  @errors Possible errors include @ref GLFW_INVALID_ENUM and @ref\n *  GLFW_INVALID_VALUE.\n *\n *  @remarks This function may be called before @ref glfwInit.\n *\n *  @thread_safety This function must only be called from the main thread.\n *\n *  @sa init_hints\n *  @sa glfwInit\n *\n *  @since Added in version 3.3.\n *\n *  @ingroup init\n */\nGLFWAPI void glfwInitHint(int hint, int value);\n\n/*! @brief Retrieves the version of the GLFW library.\n *\n *  This function retrieves the major, minor and revision numbers of the GLFW\n *  library.  It is intended for when you are using GLFW as a shared library and\n *  want to ensure that you are using the minimum required version.\n *\n *  Any or all of the version arguments may be `NULL`.\n *\n *  @param[out] major Where to store the major version number, or `NULL`.\n *  @param[out] minor Where to store the minor version number, or `NULL`.\n *  @param[out] rev Where to store the revision number, or `NULL`.\n *\n *  @errors None.\n *\n *  @remark This function may be called before @ref glfwInit.\n *\n *  @thread_safety This function may be called from any thread.\n *\n *  @sa @ref intro_version\n *  @sa @ref glfwGetVersionString\n *\n *  @since Added in version 1.0.\n *\n *  @ingroup init\n */\nGLFWAPI void glfwGetVersion(int* major, int* minor, int* rev);\n\n/*! @brief Returns a string describing the compile-time configuration.\n *\n *  This function returns the compile-time generated\n *  [version string](@ref intro_version_string) of the GLFW library binary.  It\n *  describes the version, platform, compiler and any platform-specific\n *  compile-time options.  It should not be confused with the OpenGL or OpenGL\n *  ES version string, queried with `glGetString`.\n *\n *  __Do not use the version string__ to parse the GLFW library version.  The\n *  @ref glfwGetVersion function provides the version of the running library\n *  binary in numerical format.\n *\n *  @return The ASCII encoded GLFW version string.\n *\n *  @errors None.\n *\n *  @remark This function may be called before @ref glfwInit.\n *\n *  @pointer_lifetime The returned string is static and compile-time generated.\n *\n *  @thread_safety This function may be called from any thread.\n *\n *  @sa @ref intro_version\n *  @sa @ref glfwGetVersion\n *\n *  @since Added in version 3.0.\n *\n *  @ingroup init\n */\nGLFWAPI const char* glfwGetVersionString(void);\n\n/*! @brief Returns and clears the last error for the calling thread.\n *\n *  This function returns and clears the [error code](@ref errors) of the last\n *  error that occurred on the calling thread, and optionally a UTF-8 encoded\n *  human-readable description of it.  If no error has occurred since the last\n *  call, it returns @ref GLFW_NO_ERROR (zero) and the description pointer is\n *  set to `NULL`.\n *\n *  @param[in] description Where to store the error description pointer, or `NULL`.\n *  @return The last error code for the calling thread, or @ref GLFW_NO_ERROR\n *  (zero).\n *\n *  @errors None.\n *\n *  @pointer_lifetime The returned string is allocated and freed by GLFW.  You\n *  should not free it yourself.  It is guaranteed to be valid only until the\n *  next error occurs or the library is terminated.\n *\n *  @remark This function may be called before @ref glfwInit.\n *\n *  @thread_safety This function may be called from any thread.\n *\n *  @sa @ref error_handling\n *  @sa @ref glfwSetErrorCallback\n *\n *  @since Added in version 3.3.\n *\n *  @ingroup init\n */\nGLFWAPI int glfwGetError(const char** description);\n\n/*! @brief Sets the error callback.\n *\n *  This function sets the error callback, which is called with an error code\n *  and a human-readable description each time a GLFW error occurs.\n *\n *  The error code is set before the callback is called.  Calling @ref\n *  glfwGetError from the error callback will return the same value as the error\n *  code argument.\n *\n *  The error callback is called on the thread where the error occurred.  If you\n *  are using GLFW from multiple threads, your error callback needs to be\n *  written accordingly.\n *\n *  Because the description string may have been generated specifically for that\n *  error, it is not guaranteed to be valid after the callback has returned.  If\n *  you wish to use it after the callback returns, you need to make a copy.\n *\n *  Once set, the error callback remains set even after the library has been\n *  terminated.\n *\n *  @param[in] callback The new callback, or `NULL` to remove the currently set\n *  callback.\n *  @return The previously set callback, or `NULL` if no callback was set.\n *\n *  @callback_signature\n *  @code\n *  void callback_name(int error_code, const char* description)\n *  @endcode\n *  For more information about the callback parameters, see the\n *  [callback pointer type](@ref GLFWerrorfun).\n *\n *  @errors None.\n *\n *  @remark This function may be called before @ref glfwInit.\n *\n *  @thread_safety This function must only be called from the main thread.\n *\n *  @sa @ref error_handling\n *  @sa @ref glfwGetError\n *\n *  @since Added in version 3.0.\n *\n *  @ingroup init\n */\nGLFWAPI GLFWerrorfun glfwSetErrorCallback(GLFWerrorfun callback);\n\n/*! @brief Returns the currently connected monitors.\n *\n *  This function returns an array of handles for all currently connected\n *  monitors.  The primary monitor is always first in the returned array.  If no\n *  monitors were found, this function returns `NULL`.\n *\n *  @param[out] count Where to store the number of monitors in the returned\n *  array.  This is set to zero if an error occurred.\n *  @return An array of monitor handles, or `NULL` if no monitors were found or\n *  if an [error](@ref error_handling) occurred.\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED.\n *\n *  @pointer_lifetime The returned array is allocated and freed by GLFW.  You\n *  should not free it yourself.  It is guaranteed to be valid only until the\n *  monitor configuration changes or the library is terminated.\n *\n *  @thread_safety This function must only be called from the main thread.\n *\n *  @sa @ref monitor_monitors\n *  @sa @ref monitor_event\n *  @sa @ref glfwGetPrimaryMonitor\n *\n *  @since Added in version 3.0.\n *\n *  @ingroup monitor\n */\nGLFWAPI GLFWmonitor** glfwGetMonitors(int* count);\n\n/*! @brief Returns the primary monitor.\n *\n *  This function returns the primary monitor.  This is usually the monitor\n *  where elements like the task bar or global menu bar are located.\n *\n *  @return The primary monitor, or `NULL` if no monitors were found or if an\n *  [error](@ref error_handling) occurred.\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED.\n *\n *  @thread_safety This function must only be called from the main thread.\n *\n *  @remark The primary monitor is always first in the array returned by @ref\n *  glfwGetMonitors.\n *\n *  @sa @ref monitor_monitors\n *  @sa @ref glfwGetMonitors\n *\n *  @since Added in version 3.0.\n *\n *  @ingroup monitor\n */\nGLFWAPI GLFWmonitor* glfwGetPrimaryMonitor(void);\n\n/*! @brief Returns the position of the monitor's viewport on the virtual screen.\n *\n *  This function returns the position, in screen coordinates, of the upper-left\n *  corner of the specified monitor.\n *\n *  Any or all of the position arguments may be `NULL`.  If an error occurs, all\n *  non-`NULL` position arguments will be set to zero.\n *\n *  @param[in] monitor The monitor to query.\n *  @param[out] xpos Where to store the monitor x-coordinate, or `NULL`.\n *  @param[out] ypos Where to store the monitor y-coordinate, or `NULL`.\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref\n *  GLFW_PLATFORM_ERROR.\n *\n *  @thread_safety This function must only be called from the main thread.\n *\n *  @sa @ref monitor_properties\n *\n *  @since Added in version 3.0.\n *\n *  @ingroup monitor\n */\nGLFWAPI void glfwGetMonitorPos(GLFWmonitor* monitor, int* xpos, int* ypos);\n\n/*! @brief Retrieves the work area of the monitor.\n *\n *  This function returns the position, in screen coordinates, of the upper-left\n *  corner of the work area of the specified monitor along with the work area\n *  size in screen coordinates. The work area is defined as the area of the\n *  monitor not occluded by the operating system task bar where present. If no\n *  task bar exists then the work area is the monitor resolution in screen\n *  coordinates.\n *\n *  Any or all of the position and size arguments may be `NULL`.  If an error\n *  occurs, all non-`NULL` position and size arguments will be set to zero.\n *\n *  @param[in] monitor The monitor to query.\n *  @param[out] xpos Where to store the monitor x-coordinate, or `NULL`.\n *  @param[out] ypos Where to store the monitor y-coordinate, or `NULL`.\n *  @param[out] width Where to store the monitor width, or `NULL`.\n *  @param[out] height Where to store the monitor height, or `NULL`.\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref\n *  GLFW_PLATFORM_ERROR.\n *\n *  @thread_safety This function must only be called from the main thread.\n *\n *  @sa @ref monitor_workarea\n *\n *  @since Added in version 3.3.\n *\n *  @ingroup monitor\n */\nGLFWAPI void glfwGetMonitorWorkarea(GLFWmonitor* monitor, int* xpos, int* ypos, int* width, int* height);\n\n/*! @brief Returns the physical size of the monitor.\n *\n *  This function returns the size, in millimetres, of the display area of the\n *  specified monitor.\n *\n *  Some systems do not provide accurate monitor size information, either\n *  because the monitor\n *  [EDID](https://en.wikipedia.org/wiki/Extended_display_identification_data)\n *  data is incorrect or because the driver does not report it accurately.\n *\n *  Any or all of the size arguments may be `NULL`.  If an error occurs, all\n *  non-`NULL` size arguments will be set to zero.\n *\n *  @param[in] monitor The monitor to query.\n *  @param[out] widthMM Where to store the width, in millimetres, of the\n *  monitor's display area, or `NULL`.\n *  @param[out] heightMM Where to store the height, in millimetres, of the\n *  monitor's display area, or `NULL`.\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED.\n *\n *  @remark @win32 calculates the returned physical size from the\n *  current resolution and system DPI instead of querying the monitor EDID data.\n *\n *  @thread_safety This function must only be called from the main thread.\n *\n *  @sa @ref monitor_properties\n *\n *  @since Added in version 3.0.\n *\n *  @ingroup monitor\n */\nGLFWAPI void glfwGetMonitorPhysicalSize(GLFWmonitor* monitor, int* widthMM, int* heightMM);\n\n/*! @brief Retrieves the content scale for the specified monitor.\n *\n *  This function retrieves the content scale for the specified monitor.  The\n *  content scale is the ratio between the current DPI and the platform's\n *  default DPI.  This is especially important for text and any UI elements.  If\n *  the pixel dimensions of your UI scaled by this look appropriate on your\n *  machine then it should appear at a reasonable size on other machines\n *  regardless of their DPI and scaling settings.  This relies on the system DPI\n *  and scaling settings being somewhat correct.\n *\n *  The content scale may depend on both the monitor resolution and pixel\n *  density and on user settings.  It may be very different from the raw DPI\n *  calculated from the physical size and current resolution.\n *\n *  @param[in] monitor The monitor to query.\n *  @param[out] xscale Where to store the x-axis content scale, or `NULL`.\n *  @param[out] yscale Where to store the y-axis content scale, or `NULL`.\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref\n *  GLFW_PLATFORM_ERROR.\n *\n *  @thread_safety This function must only be called from the main thread.\n *\n *  @sa @ref monitor_scale\n *  @sa @ref glfwGetWindowContentScale\n *\n *  @since Added in version 3.3.\n *\n *  @ingroup monitor\n */\nGLFWAPI void glfwGetMonitorContentScale(GLFWmonitor* monitor, float* xscale, float* yscale);\n\n/*! @brief Returns the name of the specified monitor.\n *\n *  This function returns a human-readable name, encoded as UTF-8, of the\n *  specified monitor.  The name typically reflects the make and model of the\n *  monitor and is not guaranteed to be unique among the connected monitors.\n *\n *  @param[in] monitor The monitor to query.\n *  @return The UTF-8 encoded name of the monitor, or `NULL` if an\n *  [error](@ref error_handling) occurred.\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED.\n *\n *  @pointer_lifetime The returned string is allocated and freed by GLFW.  You\n *  should not free it yourself.  It is valid until the specified monitor is\n *  disconnected or the library is terminated.\n *\n *  @thread_safety This function must only be called from the main thread.\n *\n *  @sa @ref monitor_properties\n *\n *  @since Added in version 3.0.\n *\n *  @ingroup monitor\n */\nGLFWAPI const char* glfwGetMonitorName(GLFWmonitor* monitor);\n\n/*! @brief Sets the user pointer of the specified monitor.\n *\n *  This function sets the user-defined pointer of the specified monitor.  The\n *  current value is retained until the monitor is disconnected.  The initial\n *  value is `NULL`.\n *\n *  This function may be called from the monitor callback, even for a monitor\n *  that is being disconnected.\n *\n *  @param[in] monitor The monitor whose pointer to set.\n *  @param[in] pointer The new value.\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED.\n *\n *  @thread_safety This function may be called from any thread.  Access is not\n *  synchronized.\n *\n *  @sa @ref monitor_userptr\n *  @sa @ref glfwGetMonitorUserPointer\n *\n *  @since Added in version 3.3.\n *\n *  @ingroup monitor\n */\nGLFWAPI void glfwSetMonitorUserPointer(GLFWmonitor* monitor, void* pointer);\n\n/*! @brief Returns the user pointer of the specified monitor.\n *\n *  This function returns the current value of the user-defined pointer of the\n *  specified monitor.  The initial value is `NULL`.\n *\n *  This function may be called from the monitor callback, even for a monitor\n *  that is being disconnected.\n *\n *  @param[in] monitor The monitor whose pointer to return.\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED.\n *\n *  @thread_safety This function may be called from any thread.  Access is not\n *  synchronized.\n *\n *  @sa @ref monitor_userptr\n *  @sa @ref glfwSetMonitorUserPointer\n *\n *  @since Added in version 3.3.\n *\n *  @ingroup monitor\n */\nGLFWAPI void* glfwGetMonitorUserPointer(GLFWmonitor* monitor);\n\n/*! @brief Sets the monitor configuration callback.\n *\n *  This function sets the monitor configuration callback, or removes the\n *  currently set callback.  This is called when a monitor is connected to or\n *  disconnected from the system.\n *\n *  @param[in] callback The new callback, or `NULL` to remove the currently set\n *  callback.\n *  @return The previously set callback, or `NULL` if no callback was set or the\n *  library had not been [initialized](@ref intro_init).\n *\n *  @callback_signature\n *  @code\n *  void function_name(GLFWmonitor* monitor, int event)\n *  @endcode\n *  For more information about the callback parameters, see the\n *  [function pointer type](@ref GLFWmonitorfun).\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED.\n *\n *  @thread_safety This function must only be called from the main thread.\n *\n *  @sa @ref monitor_event\n *\n *  @since Added in version 3.0.\n *\n *  @ingroup monitor\n */\nGLFWAPI GLFWmonitorfun glfwSetMonitorCallback(GLFWmonitorfun callback);\n\n/*! @brief Returns the available video modes for the specified monitor.\n *\n *  This function returns an array of all video modes supported by the specified\n *  monitor.  The returned array is sorted in ascending order, first by color\n *  bit depth (the sum of all channel depths) and then by resolution area (the\n *  product of width and height).\n *\n *  @param[in] monitor The monitor to query.\n *  @param[out] count Where to store the number of video modes in the returned\n *  array.  This is set to zero if an error occurred.\n *  @return An array of video modes, or `NULL` if an\n *  [error](@ref error_handling) occurred.\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref\n *  GLFW_PLATFORM_ERROR.\n *\n *  @pointer_lifetime The returned array is allocated and freed by GLFW.  You\n *  should not free it yourself.  It is valid until the specified monitor is\n *  disconnected, this function is called again for that monitor or the library\n *  is terminated.\n *\n *  @thread_safety This function must only be called from the main thread.\n *\n *  @sa @ref monitor_modes\n *  @sa @ref glfwGetVideoMode\n *\n *  @since Added in version 1.0.\n *  @glfw3 Changed to return an array of modes for a specific monitor.\n *\n *  @ingroup monitor\n */\nGLFWAPI const GLFWvidmode* glfwGetVideoModes(GLFWmonitor* monitor, int* count);\n\n/*! @brief Returns the current mode of the specified monitor.\n *\n *  This function returns the current video mode of the specified monitor.  If\n *  you have created a full screen window for that monitor, the return value\n *  will depend on whether that window is iconified.\n *\n *  @param[in] monitor The monitor to query.\n *  @return The current mode of the monitor, or `NULL` if an\n *  [error](@ref error_handling) occurred.\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref\n *  GLFW_PLATFORM_ERROR.\n *\n *  @pointer_lifetime The returned array is allocated and freed by GLFW.  You\n *  should not free it yourself.  It is valid until the specified monitor is\n *  disconnected or the library is terminated.\n *\n *  @thread_safety This function must only be called from the main thread.\n *\n *  @sa @ref monitor_modes\n *  @sa @ref glfwGetVideoModes\n *\n *  @since Added in version 3.0.  Replaces `glfwGetDesktopMode`.\n *\n *  @ingroup monitor\n */\nGLFWAPI const GLFWvidmode* glfwGetVideoMode(GLFWmonitor* monitor);\n\n/*! @brief Generates a gamma ramp and sets it for the specified monitor.\n *\n *  This function generates an appropriately sized gamma ramp from the specified\n *  exponent and then calls @ref glfwSetGammaRamp with it.  The value must be\n *  a finite number greater than zero.\n *\n *  The software controlled gamma ramp is applied _in addition_ to the hardware\n *  gamma correction, which today is usually an approximation of sRGB gamma.\n *  This means that setting a perfectly linear ramp, or gamma 1.0, will produce\n *  the default (usually sRGB-like) behavior.\n *\n *  For gamma correct rendering with OpenGL or OpenGL ES, see the @ref\n *  GLFW_SRGB_CAPABLE hint.\n *\n *  @param[in] monitor The monitor whose gamma ramp to set.\n *  @param[in] gamma The desired exponent.\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref\n *  GLFW_INVALID_VALUE and @ref GLFW_PLATFORM_ERROR.\n *\n *  @remark @wayland Gamma handling is a privileged protocol, this function\n *  will thus never be implemented and emits @ref GLFW_PLATFORM_ERROR.\n *\n *  @thread_safety This function must only be called from the main thread.\n *\n *  @sa @ref monitor_gamma\n *\n *  @since Added in version 3.0.\n *\n *  @ingroup monitor\n */\nGLFWAPI void glfwSetGamma(GLFWmonitor* monitor, float gamma);\n\n/*! @brief Returns the current gamma ramp for the specified monitor.\n *\n *  This function returns the current gamma ramp of the specified monitor.\n *\n *  @param[in] monitor The monitor to query.\n *  @return The current gamma ramp, or `NULL` if an\n *  [error](@ref error_handling) occurred.\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref\n *  GLFW_PLATFORM_ERROR.\n *\n *  @remark @wayland Gamma handling is a privileged protocol, this function\n *  will thus never be implemented and emits @ref GLFW_PLATFORM_ERROR while\n *  returning `NULL`.\n *\n *  @pointer_lifetime The returned structure and its arrays are allocated and\n *  freed by GLFW.  You should not free them yourself.  They are valid until the\n *  specified monitor is disconnected, this function is called again for that\n *  monitor or the library is terminated.\n *\n *  @thread_safety This function must only be called from the main thread.\n *\n *  @sa @ref monitor_gamma\n *\n *  @since Added in version 3.0.\n *\n *  @ingroup monitor\n */\nGLFWAPI const GLFWgammaramp* glfwGetGammaRamp(GLFWmonitor* monitor);\n\n/*! @brief Sets the current gamma ramp for the specified monitor.\n *\n *  This function sets the current gamma ramp for the specified monitor.  The\n *  original gamma ramp for that monitor is saved by GLFW the first time this\n *  function is called and is restored by @ref glfwTerminate.\n *\n *  The software controlled gamma ramp is applied _in addition_ to the hardware\n *  gamma correction, which today is usually an approximation of sRGB gamma.\n *  This means that setting a perfectly linear ramp, or gamma 1.0, will produce\n *  the default (usually sRGB-like) behavior.\n *\n *  For gamma correct rendering with OpenGL or OpenGL ES, see the @ref\n *  GLFW_SRGB_CAPABLE hint.\n *\n *  @param[in] monitor The monitor whose gamma ramp to set.\n *  @param[in] ramp The gamma ramp to use.\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref\n *  GLFW_PLATFORM_ERROR.\n *\n *  @remark The size of the specified gamma ramp should match the size of the\n *  current ramp for that monitor.\n *\n *  @remark @win32 The gamma ramp size must be 256.\n *\n *  @remark @wayland Gamma handling is a privileged protocol, this function\n *  will thus never be implemented and emits @ref GLFW_PLATFORM_ERROR.\n *\n *  @pointer_lifetime The specified gamma ramp is copied before this function\n *  returns.\n *\n *  @thread_safety This function must only be called from the main thread.\n *\n *  @sa @ref monitor_gamma\n *\n *  @since Added in version 3.0.\n *\n *  @ingroup monitor\n */\nGLFWAPI void glfwSetGammaRamp(GLFWmonitor* monitor, const GLFWgammaramp* ramp);\n\n/*! @brief Resets all window hints to their default values.\n *\n *  This function resets all window hints to their\n *  [default values](@ref window_hints_values).\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED.\n *\n *  @thread_safety This function must only be called from the main thread.\n *\n *  @sa @ref window_hints\n *  @sa @ref glfwWindowHint\n *  @sa @ref glfwWindowHintString\n *\n *  @since Added in version 3.0.\n *\n *  @ingroup window\n */\nGLFWAPI void glfwDefaultWindowHints(void);\n\n/*! @brief Sets the specified window hint to the desired value.\n *\n *  This function sets hints for the next call to @ref glfwCreateWindow.  The\n *  hints, once set, retain their values until changed by a call to this\n *  function or @ref glfwDefaultWindowHints, or until the library is terminated.\n *\n *  Only integer value hints can be set with this function.  String value hints\n *  are set with @ref glfwWindowHintString.\n *\n *  This function does not check whether the specified hint values are valid.\n *  If you set hints to invalid values this will instead be reported by the next\n *  call to @ref glfwCreateWindow.\n *\n *  Some hints are platform specific.  These may be set on any platform but they\n *  will only affect their specific platform.  Other platforms will ignore them.\n *  Setting these hints requires no platform specific headers or functions.\n *\n *  @param[in] hint The [window hint](@ref window_hints) to set.\n *  @param[in] value The new value of the window hint.\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref\n *  GLFW_INVALID_ENUM.\n *\n *  @thread_safety This function must only be called from the main thread.\n *\n *  @sa @ref window_hints\n *  @sa @ref glfwWindowHintString\n *  @sa @ref glfwDefaultWindowHints\n *\n *  @since Added in version 3.0.  Replaces `glfwOpenWindowHint`.\n *\n *  @ingroup window\n */\nGLFWAPI void glfwWindowHint(int hint, int value);\n\n/*! @brief Sets the specified window hint to the desired value.\n *\n *  This function sets hints for the next call to @ref glfwCreateWindow.  The\n *  hints, once set, retain their values until changed by a call to this\n *  function or @ref glfwDefaultWindowHints, or until the library is terminated.\n *\n *  Only string type hints can be set with this function.  Integer value hints\n *  are set with @ref glfwWindowHint.\n *\n *  This function does not check whether the specified hint values are valid.\n *  If you set hints to invalid values this will instead be reported by the next\n *  call to @ref glfwCreateWindow.\n *\n *  Some hints are platform specific.  These may be set on any platform but they\n *  will only affect their specific platform.  Other platforms will ignore them.\n *  Setting these hints requires no platform specific headers or functions.\n *\n *  @param[in] hint The [window hint](@ref window_hints) to set.\n *  @param[in] value The new value of the window hint.\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref\n *  GLFW_INVALID_ENUM.\n *\n *  @pointer_lifetime The specified string is copied before this function\n *  returns.\n *\n *  @thread_safety This function must only be called from the main thread.\n *\n *  @sa @ref window_hints\n *  @sa @ref glfwWindowHint\n *  @sa @ref glfwDefaultWindowHints\n *\n *  @since Added in version 3.3.\n *\n *  @ingroup window\n */\nGLFWAPI void glfwWindowHintString(int hint, const char* value);\n\n/*! @brief Creates a window and its associated context.\n *\n *  This function creates a window and its associated OpenGL or OpenGL ES\n *  context.  Most of the options controlling how the window and its context\n *  should be created are specified with [window hints](@ref window_hints).\n *\n *  Successful creation does not change which context is current.  Before you\n *  can use the newly created context, you need to\n *  [make it current](@ref context_current).  For information about the `share`\n *  parameter, see @ref context_sharing.\n *\n *  The created window, framebuffer and context may differ from what you\n *  requested, as not all parameters and hints are\n *  [hard constraints](@ref window_hints_hard).  This includes the size of the\n *  window, especially for full screen windows.  To query the actual attributes\n *  of the created window, framebuffer and context, see @ref\n *  glfwGetWindowAttrib, @ref glfwGetWindowSize and @ref glfwGetFramebufferSize.\n *\n *  To create a full screen window, you need to specify the monitor the window\n *  will cover.  If no monitor is specified, the window will be windowed mode.\n *  Unless you have a way for the user to choose a specific monitor, it is\n *  recommended that you pick the primary monitor.  For more information on how\n *  to query connected monitors, see @ref monitor_monitors.\n *\n *  For full screen windows, the specified size becomes the resolution of the\n *  window's _desired video mode_.  As long as a full screen window is not\n *  iconified, the supported video mode most closely matching the desired video\n *  mode is set for the specified monitor.  For more information about full\n *  screen windows, including the creation of so called _windowed full screen_\n *  or _borderless full screen_ windows, see @ref window_windowed_full_screen.\n *\n *  Once you have created the window, you can switch it between windowed and\n *  full screen mode with @ref glfwSetWindowMonitor.  This will not affect its\n *  OpenGL or OpenGL ES context.\n *\n *  By default, newly created windows use the placement recommended by the\n *  window system.  To create the window at a specific position, make it\n *  initially invisible using the [GLFW_VISIBLE](@ref GLFW_VISIBLE_hint) window\n *  hint, set its [position](@ref window_pos) and then [show](@ref window_hide)\n *  it.\n *\n *  As long as at least one full screen window is not iconified, the screensaver\n *  is prohibited from starting.\n *\n *  Window systems put limits on window sizes.  Very large or very small window\n *  dimensions may be overridden by the window system on creation.  Check the\n *  actual [size](@ref window_size) after creation.\n *\n *  The [swap interval](@ref buffer_swap) is not set during window creation and\n *  the initial value may vary depending on driver settings and defaults.\n *\n *  @param[in] width The desired width, in screen coordinates, of the window.\n *  This must be greater than zero.\n *  @param[in] height The desired height, in screen coordinates, of the window.\n *  This must be greater than zero.\n *  @param[in] title The initial, UTF-8 encoded window title.\n *  @param[in] monitor The monitor to use for full screen mode, or `NULL` for\n *  windowed mode.\n *  @param[in] share The window whose context to share resources with, or `NULL`\n *  to not share resources.\n *  @return The handle of the created window, or `NULL` if an\n *  [error](@ref error_handling) occurred.\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref\n *  GLFW_INVALID_ENUM, @ref GLFW_INVALID_VALUE, @ref GLFW_API_UNAVAILABLE, @ref\n *  GLFW_VERSION_UNAVAILABLE, @ref GLFW_FORMAT_UNAVAILABLE and @ref\n *  GLFW_PLATFORM_ERROR.\n *\n *  @remark @win32 Window creation will fail if the Microsoft GDI software\n *  OpenGL implementation is the only one available.\n *\n *  @remark @win32 If the executable has an icon resource named `GLFW_ICON,` it\n *  will be set as the initial icon for the window.  If no such icon is present,\n *  the `IDI_APPLICATION` icon will be used instead.  To set a different icon,\n *  see @ref glfwSetWindowIcon.\n *\n *  @remark @win32 The context to share resources with must not be current on\n *  any other thread.\n *\n *  @remark @macos The OS only supports forward-compatible core profile contexts\n *  for OpenGL versions 3.2 and later.  Before creating an OpenGL context of\n *  version 3.2 or later you must set the\n *  [GLFW_OPENGL_FORWARD_COMPAT](@ref GLFW_OPENGL_FORWARD_COMPAT_hint) and\n *  [GLFW_OPENGL_PROFILE](@ref GLFW_OPENGL_PROFILE_hint) hints accordingly.\n *  OpenGL 3.0 and 3.1 contexts are not supported at all on macOS.\n *\n *  @remark @macos The GLFW window has no icon, as it is not a document\n *  window, but the dock icon will be the same as the application bundle's icon.\n *  For more information on bundles, see the\n *  [Bundle Programming Guide](https://developer.apple.com/library/mac/documentation/CoreFoundation/Conceptual/CFBundles/)\n *  in the Mac Developer Library.\n *\n *  @remark @macos The first time a window is created the menu bar is created.\n *  If GLFW finds a `MainMenu.nib` it is loaded and assumed to contain a menu\n *  bar.  Otherwise a minimal menu bar is created manually with common commands\n *  like Hide, Quit and About.  The About entry opens a minimal about dialog\n *  with information from the application's bundle.  Menu bar creation can be\n *  disabled entirely with the @ref GLFW_COCOA_MENUBAR init hint.\n *\n *  @remark @macos On OS X 10.10 and later the window frame will not be rendered\n *  at full resolution on Retina displays unless the\n *  [GLFW_COCOA_RETINA_FRAMEBUFFER](@ref GLFW_COCOA_RETINA_FRAMEBUFFER_hint)\n *  hint is `GLFW_TRUE` and the `NSHighResolutionCapable` key is enabled in the\n *  application bundle's `Info.plist`.  For more information, see\n *  [High Resolution Guidelines for OS X](https://developer.apple.com/library/mac/documentation/GraphicsAnimation/Conceptual/HighResolutionOSX/Explained/Explained.html)\n *  in the Mac Developer Library.  The GLFW test and example programs use\n *  a custom `Info.plist` template for this, which can be found as\n *  `CMake/MacOSXBundleInfo.plist.in` in the source tree.\n *\n *  @remark @macos When activating frame autosaving with\n *  [GLFW_COCOA_FRAME_NAME](@ref GLFW_COCOA_FRAME_NAME_hint), the specified\n *  window size and position may be overridden by previously saved values.\n *\n *  @remark @x11 Some window managers will not respect the placement of\n *  initially hidden windows.\n *\n *  @remark @x11 Due to the asynchronous nature of X11, it may take a moment for\n *  a window to reach its requested state.  This means you may not be able to\n *  query the final size, position or other attributes directly after window\n *  creation.\n *\n *  @remark @x11 The class part of the `WM_CLASS` window property will by\n *  default be set to the window title passed to this function.  The instance\n *  part will use the contents of the `RESOURCE_NAME` environment variable, if\n *  present and not empty, or fall back to the window title.  Set the\n *  [GLFW_X11_CLASS_NAME](@ref GLFW_X11_CLASS_NAME_hint) and\n *  [GLFW_X11_INSTANCE_NAME](@ref GLFW_X11_INSTANCE_NAME_hint) window hints to\n *  override this.\n *\n *  @remark @wayland Compositors should implement the xdg-decoration protocol\n *  for GLFW to decorate the window properly.  If this protocol isn't\n *  supported, or if the compositor prefers client-side decorations, a very\n *  simple fallback frame will be drawn using the wp_viewporter protocol.  A\n *  compositor can still emit close, maximize or fullscreen events, using for\n *  instance a keybind mechanism.  If neither of these protocols is supported,\n *  the window won't be decorated.\n *\n *  @remark @wayland A full screen window will not attempt to change the mode,\n *  no matter what the requested size or refresh rate.\n *\n *  @remark @wayland Screensaver inhibition requires the idle-inhibit protocol\n *  to be implemented in the user's compositor.\n *\n *  @thread_safety This function must only be called from the main thread.\n *\n *  @sa @ref window_creation\n *  @sa @ref glfwDestroyWindow\n *\n *  @since Added in version 3.0.  Replaces `glfwOpenWindow`.\n *\n *  @ingroup window\n */\nGLFWAPI GLFWwindow* glfwCreateWindow(int width, int height, const char* title, GLFWmonitor* monitor, GLFWwindow* share);\n\n/*! @brief Destroys the specified window and its context.\n *\n *  This function destroys the specified window and its context.  On calling\n *  this function, no further callbacks will be called for that window.\n *\n *  If the context of the specified window is current on the main thread, it is\n *  detached before being destroyed.\n *\n *  @param[in] window The window to destroy.\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref\n *  GLFW_PLATFORM_ERROR.\n *\n *  @note The context of the specified window must not be current on any other\n *  thread when this function is called.\n *\n *  @reentrancy This function must not be called from a callback.\n *\n *  @thread_safety This function must only be called from the main thread.\n *\n *  @sa @ref window_creation\n *  @sa @ref glfwCreateWindow\n *\n *  @since Added in version 3.0.  Replaces `glfwCloseWindow`.\n *\n *  @ingroup window\n */\nGLFWAPI void glfwDestroyWindow(GLFWwindow* window);\n\n/*! @brief Checks the close flag of the specified window.\n *\n *  This function returns the value of the close flag of the specified window.\n *\n *  @param[in] window The window to query.\n *  @return The value of the close flag.\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED.\n *\n *  @thread_safety This function may be called from any thread.  Access is not\n *  synchronized.\n *\n *  @sa @ref window_close\n *\n *  @since Added in version 3.0.\n *\n *  @ingroup window\n */\nGLFWAPI int glfwWindowShouldClose(GLFWwindow* window);\n\n/*! @brief Sets the close flag of the specified window.\n *\n *  This function sets the value of the close flag of the specified window.\n *  This can be used to override the user's attempt to close the window, or\n *  to signal that it should be closed.\n *\n *  @param[in] window The window whose flag to change.\n *  @param[in] value The new value.\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED.\n *\n *  @thread_safety This function may be called from any thread.  Access is not\n *  synchronized.\n *\n *  @sa @ref window_close\n *\n *  @since Added in version 3.0.\n *\n *  @ingroup window\n */\nGLFWAPI void glfwSetWindowShouldClose(GLFWwindow* window, int value);\n\n/*! @brief Sets the title of the specified window.\n *\n *  This function sets the window title, encoded as UTF-8, of the specified\n *  window.\n *\n *  @param[in] window The window whose title to change.\n *  @param[in] title The UTF-8 encoded window title.\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref\n *  GLFW_PLATFORM_ERROR.\n *\n *  @remark @macos The window title will not be updated until the next time you\n *  process events.\n *\n *  @thread_safety This function must only be called from the main thread.\n *\n *  @sa @ref window_title\n *\n *  @since Added in version 1.0.\n *  @glfw3 Added window handle parameter.\n *\n *  @ingroup window\n */\nGLFWAPI void glfwSetWindowTitle(GLFWwindow* window, const char* title);\n\n/*! @brief Sets the icon for the specified window.\n *\n *  This function sets the icon of the specified window.  If passed an array of\n *  candidate images, those of or closest to the sizes desired by the system are\n *  selected.  If no images are specified, the window reverts to its default\n *  icon.\n *\n *  The pixels are 32-bit, little-endian, non-premultiplied RGBA, i.e. eight\n *  bits per channel with the red channel first.  They are arranged canonically\n *  as packed sequential rows, starting from the top-left corner.\n *\n *  The desired image sizes varies depending on platform and system settings.\n *  The selected images will be rescaled as needed.  Good sizes include 16x16,\n *  32x32 and 48x48.\n *\n *  @param[in] window The window whose icon to set.\n *  @param[in] count The number of images in the specified array, or zero to\n *  revert to the default window icon.\n *  @param[in] images The images to create the icon from.  This is ignored if\n *  count is zero.\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref\n *  GLFW_PLATFORM_ERROR.\n *\n *  @pointer_lifetime The specified image data is copied before this function\n *  returns.\n *\n *  @remark @macos The GLFW window has no icon, as it is not a document\n *  window, so this function does nothing.  The dock icon will be the same as\n *  the application bundle's icon.  For more information on bundles, see the\n *  [Bundle Programming Guide](https://developer.apple.com/library/mac/documentation/CoreFoundation/Conceptual/CFBundles/)\n *  in the Mac Developer Library.\n *\n *  @remark @wayland There is no existing protocol to change an icon, the\n *  window will thus inherit the one defined in the application's desktop file.\n *  This function always emits @ref GLFW_PLATFORM_ERROR.\n *\n *  @thread_safety This function must only be called from the main thread.\n *\n *  @sa @ref window_icon\n *\n *  @since Added in version 3.2.\n *\n *  @ingroup window\n */\nGLFWAPI void glfwSetWindowIcon(GLFWwindow* window, int count, const GLFWimage* images);\n\n/*! @brief Retrieves the position of the content area of the specified window.\n *\n *  This function retrieves the position, in screen coordinates, of the\n *  upper-left corner of the content area of the specified window.\n *\n *  Any or all of the position arguments may be `NULL`.  If an error occurs, all\n *  non-`NULL` position arguments will be set to zero.\n *\n *  @param[in] window The window to query.\n *  @param[out] xpos Where to store the x-coordinate of the upper-left corner of\n *  the content area, or `NULL`.\n *  @param[out] ypos Where to store the y-coordinate of the upper-left corner of\n *  the content area, or `NULL`.\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref\n *  GLFW_PLATFORM_ERROR.\n *\n *  @remark @wayland There is no way for an application to retrieve the global\n *  position of its windows, this function will always emit @ref\n *  GLFW_PLATFORM_ERROR.\n *\n *  @thread_safety This function must only be called from the main thread.\n *\n *  @sa @ref window_pos\n *  @sa @ref glfwSetWindowPos\n *\n *  @since Added in version 3.0.\n *\n *  @ingroup window\n */\nGLFWAPI void glfwGetWindowPos(GLFWwindow* window, int* xpos, int* ypos);\n\n/*! @brief Sets the position of the content area of the specified window.\n *\n *  This function sets the position, in screen coordinates, of the upper-left\n *  corner of the content area of the specified windowed mode window.  If the\n *  window is a full screen window, this function does nothing.\n *\n *  __Do not use this function__ to move an already visible window unless you\n *  have very good reasons for doing so, as it will confuse and annoy the user.\n *\n *  The window manager may put limits on what positions are allowed.  GLFW\n *  cannot and should not override these limits.\n *\n *  @param[in] window The window to query.\n *  @param[in] xpos The x-coordinate of the upper-left corner of the content area.\n *  @param[in] ypos The y-coordinate of the upper-left corner of the content area.\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref\n *  GLFW_PLATFORM_ERROR.\n *\n *  @remark @wayland There is no way for an application to set the global\n *  position of its windows, this function will always emit @ref\n *  GLFW_PLATFORM_ERROR.\n *\n *  @thread_safety This function must only be called from the main thread.\n *\n *  @sa @ref window_pos\n *  @sa @ref glfwGetWindowPos\n *\n *  @since Added in version 1.0.\n *  @glfw3 Added window handle parameter.\n *\n *  @ingroup window\n */\nGLFWAPI void glfwSetWindowPos(GLFWwindow* window, int xpos, int ypos);\n\n/*! @brief Retrieves the size of the content area of the specified window.\n *\n *  This function retrieves the size, in screen coordinates, of the content area\n *  of the specified window.  If you wish to retrieve the size of the\n *  framebuffer of the window in pixels, see @ref glfwGetFramebufferSize.\n *\n *  Any or all of the size arguments may be `NULL`.  If an error occurs, all\n *  non-`NULL` size arguments will be set to zero.\n *\n *  @param[in] window The window whose size to retrieve.\n *  @param[out] width Where to store the width, in screen coordinates, of the\n *  content area, or `NULL`.\n *  @param[out] height Where to store the height, in screen coordinates, of the\n *  content area, or `NULL`.\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref\n *  GLFW_PLATFORM_ERROR.\n *\n *  @thread_safety This function must only be called from the main thread.\n *\n *  @sa @ref window_size\n *  @sa @ref glfwSetWindowSize\n *\n *  @since Added in version 1.0.\n *  @glfw3 Added window handle parameter.\n *\n *  @ingroup window\n */\nGLFWAPI void glfwGetWindowSize(GLFWwindow* window, int* width, int* height);\n\n/*! @brief Sets the size limits of the specified window.\n *\n *  This function sets the size limits of the content area of the specified\n *  window.  If the window is full screen, the size limits only take effect\n *  once it is made windowed.  If the window is not resizable, this function\n *  does nothing.\n *\n *  The size limits are applied immediately to a windowed mode window and may\n *  cause it to be resized.\n *\n *  The maximum dimensions must be greater than or equal to the minimum\n *  dimensions and all must be greater than or equal to zero.\n *\n *  @param[in] window The window to set limits for.\n *  @param[in] minwidth The minimum width, in screen coordinates, of the content\n *  area, or `GLFW_DONT_CARE`.\n *  @param[in] minheight The minimum height, in screen coordinates, of the\n *  content area, or `GLFW_DONT_CARE`.\n *  @param[in] maxwidth The maximum width, in screen coordinates, of the content\n *  area, or `GLFW_DONT_CARE`.\n *  @param[in] maxheight The maximum height, in screen coordinates, of the\n *  content area, or `GLFW_DONT_CARE`.\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref\n *  GLFW_INVALID_VALUE and @ref GLFW_PLATFORM_ERROR.\n *\n *  @remark If you set size limits and an aspect ratio that conflict, the\n *  results are undefined.\n *\n *  @remark @wayland The size limits will not be applied until the window is\n *  actually resized, either by the user or by the compositor.\n *\n *  @thread_safety This function must only be called from the main thread.\n *\n *  @sa @ref window_sizelimits\n *  @sa @ref glfwSetWindowAspectRatio\n *\n *  @since Added in version 3.2.\n *\n *  @ingroup window\n */\nGLFWAPI void glfwSetWindowSizeLimits(GLFWwindow* window, int minwidth, int minheight, int maxwidth, int maxheight);\n\n/*! @brief Sets the aspect ratio of the specified window.\n *\n *  This function sets the required aspect ratio of the content area of the\n *  specified window.  If the window is full screen, the aspect ratio only takes\n *  effect once it is made windowed.  If the window is not resizable, this\n *  function does nothing.\n *\n *  The aspect ratio is specified as a numerator and a denominator and both\n *  values must be greater than zero.  For example, the common 16:9 aspect ratio\n *  is specified as 16 and 9, respectively.\n *\n *  If the numerator and denominator is set to `GLFW_DONT_CARE` then the aspect\n *  ratio limit is disabled.\n *\n *  The aspect ratio is applied immediately to a windowed mode window and may\n *  cause it to be resized.\n *\n *  @param[in] window The window to set limits for.\n *  @param[in] numer The numerator of the desired aspect ratio, or\n *  `GLFW_DONT_CARE`.\n *  @param[in] denom The denominator of the desired aspect ratio, or\n *  `GLFW_DONT_CARE`.\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref\n *  GLFW_INVALID_VALUE and @ref GLFW_PLATFORM_ERROR.\n *\n *  @remark If you set size limits and an aspect ratio that conflict, the\n *  results are undefined.\n *\n *  @remark @wayland The aspect ratio will not be applied until the window is\n *  actually resized, either by the user or by the compositor.\n *\n *  @thread_safety This function must only be called from the main thread.\n *\n *  @sa @ref window_sizelimits\n *  @sa @ref glfwSetWindowSizeLimits\n *\n *  @since Added in version 3.2.\n *\n *  @ingroup window\n */\nGLFWAPI void glfwSetWindowAspectRatio(GLFWwindow* window, int numer, int denom);\n\n/*! @brief Sets the size of the content area of the specified window.\n *\n *  This function sets the size, in screen coordinates, of the content area of\n *  the specified window.\n *\n *  For full screen windows, this function updates the resolution of its desired\n *  video mode and switches to the video mode closest to it, without affecting\n *  the window's context.  As the context is unaffected, the bit depths of the\n *  framebuffer remain unchanged.\n *\n *  If you wish to update the refresh rate of the desired video mode in addition\n *  to its resolution, see @ref glfwSetWindowMonitor.\n *\n *  The window manager may put limits on what sizes are allowed.  GLFW cannot\n *  and should not override these limits.\n *\n *  @param[in] window The window to resize.\n *  @param[in] width The desired width, in screen coordinates, of the window\n *  content area.\n *  @param[in] height The desired height, in screen coordinates, of the window\n *  content area.\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref\n *  GLFW_PLATFORM_ERROR.\n *\n *  @remark @wayland A full screen window will not attempt to change the mode,\n *  no matter what the requested size.\n *\n *  @thread_safety This function must only be called from the main thread.\n *\n *  @sa @ref window_size\n *  @sa @ref glfwGetWindowSize\n *  @sa @ref glfwSetWindowMonitor\n *\n *  @since Added in version 1.0.\n *  @glfw3 Added window handle parameter.\n *\n *  @ingroup window\n */\nGLFWAPI void glfwSetWindowSize(GLFWwindow* window, int width, int height);\n\n/*! @brief Retrieves the size of the framebuffer of the specified window.\n *\n *  This function retrieves the size, in pixels, of the framebuffer of the\n *  specified window.  If you wish to retrieve the size of the window in screen\n *  coordinates, see @ref glfwGetWindowSize.\n *\n *  Any or all of the size arguments may be `NULL`.  If an error occurs, all\n *  non-`NULL` size arguments will be set to zero.\n *\n *  @param[in] window The window whose framebuffer to query.\n *  @param[out] width Where to store the width, in pixels, of the framebuffer,\n *  or `NULL`.\n *  @param[out] height Where to store the height, in pixels, of the framebuffer,\n *  or `NULL`.\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref\n *  GLFW_PLATFORM_ERROR.\n *\n *  @thread_safety This function must only be called from the main thread.\n *\n *  @sa @ref window_fbsize\n *  @sa @ref glfwSetFramebufferSizeCallback\n *\n *  @since Added in version 3.0.\n *\n *  @ingroup window\n */\nGLFWAPI void glfwGetFramebufferSize(GLFWwindow* window, int* width, int* height);\n\n/*! @brief Retrieves the size of the frame of the window.\n *\n *  This function retrieves the size, in screen coordinates, of each edge of the\n *  frame of the specified window.  This size includes the title bar, if the\n *  window has one.  The size of the frame may vary depending on the\n *  [window-related hints](@ref window_hints_wnd) used to create it.\n *\n *  Because this function retrieves the size of each window frame edge and not\n *  the offset along a particular coordinate axis, the retrieved values will\n *  always be zero or positive.\n *\n *  Any or all of the size arguments may be `NULL`.  If an error occurs, all\n *  non-`NULL` size arguments will be set to zero.\n *\n *  @param[in] window The window whose frame size to query.\n *  @param[out] left Where to store the size, in screen coordinates, of the left\n *  edge of the window frame, or `NULL`.\n *  @param[out] top Where to store the size, in screen coordinates, of the top\n *  edge of the window frame, or `NULL`.\n *  @param[out] right Where to store the size, in screen coordinates, of the\n *  right edge of the window frame, or `NULL`.\n *  @param[out] bottom Where to store the size, in screen coordinates, of the\n *  bottom edge of the window frame, or `NULL`.\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref\n *  GLFW_PLATFORM_ERROR.\n *\n *  @thread_safety This function must only be called from the main thread.\n *\n *  @sa @ref window_size\n *\n *  @since Added in version 3.1.\n *\n *  @ingroup window\n */\nGLFWAPI void glfwGetWindowFrameSize(GLFWwindow* window, int* left, int* top, int* right, int* bottom);\n\n/*! @brief Retrieves the content scale for the specified window.\n *\n *  This function retrieves the content scale for the specified window.  The\n *  content scale is the ratio between the current DPI and the platform's\n *  default DPI.  This is especially important for text and any UI elements.  If\n *  the pixel dimensions of your UI scaled by this look appropriate on your\n *  machine then it should appear at a reasonable size on other machines\n *  regardless of their DPI and scaling settings.  This relies on the system DPI\n *  and scaling settings being somewhat correct.\n *\n *  On systems where each monitors can have its own content scale, the window\n *  content scale will depend on which monitor the system considers the window\n *  to be on.\n *\n *  @param[in] window The window to query.\n *  @param[out] xscale Where to store the x-axis content scale, or `NULL`.\n *  @param[out] yscale Where to store the y-axis content scale, or `NULL`.\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref\n *  GLFW_PLATFORM_ERROR.\n *\n *  @thread_safety This function must only be called from the main thread.\n *\n *  @sa @ref window_scale\n *  @sa @ref glfwSetWindowContentScaleCallback\n *  @sa @ref glfwGetMonitorContentScale\n *\n *  @since Added in version 3.3.\n *\n *  @ingroup window\n */\nGLFWAPI void glfwGetWindowContentScale(GLFWwindow* window, float* xscale, float* yscale);\n\n/*! @brief Returns the opacity of the whole window.\n *\n *  This function returns the opacity of the window, including any decorations.\n *\n *  The opacity (or alpha) value is a positive finite number between zero and\n *  one, where zero is fully transparent and one is fully opaque.  If the system\n *  does not support whole window transparency, this function always returns one.\n *\n *  The initial opacity value for newly created windows is one.\n *\n *  @param[in] window The window to query.\n *  @return The opacity value of the specified window.\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref\n *  GLFW_PLATFORM_ERROR.\n *\n *  @thread_safety This function must only be called from the main thread.\n *\n *  @sa @ref window_transparency\n *  @sa @ref glfwSetWindowOpacity\n *\n *  @since Added in version 3.3.\n *\n *  @ingroup window\n */\nGLFWAPI float glfwGetWindowOpacity(GLFWwindow* window);\n\n/*! @brief Sets the opacity of the whole window.\n *\n *  This function sets the opacity of the window, including any decorations.\n *\n *  The opacity (or alpha) value is a positive finite number between zero and\n *  one, where zero is fully transparent and one is fully opaque.\n *\n *  The initial opacity value for newly created windows is one.\n *\n *  A window created with framebuffer transparency may not use whole window\n *  transparency.  The results of doing this are undefined.\n *\n *  @param[in] window The window to set the opacity for.\n *  @param[in] opacity The desired opacity of the specified window.\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref\n *  GLFW_PLATFORM_ERROR.\n *\n *  @thread_safety This function must only be called from the main thread.\n *\n *  @sa @ref window_transparency\n *  @sa @ref glfwGetWindowOpacity\n *\n *  @since Added in version 3.3.\n *\n *  @ingroup window\n */\nGLFWAPI void glfwSetWindowOpacity(GLFWwindow* window, float opacity);\n\n/*! @brief Iconifies the specified window.\n *\n *  This function iconifies (minimizes) the specified window if it was\n *  previously restored.  If the window is already iconified, this function does\n *  nothing.\n *\n *  If the specified window is a full screen window, the original monitor\n *  resolution is restored until the window is restored.\n *\n *  @param[in] window The window to iconify.\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref\n *  GLFW_PLATFORM_ERROR.\n *\n *  @remark @wayland There is no concept of iconification in wl_shell, this\n *  function will emit @ref GLFW_PLATFORM_ERROR when using this deprecated\n *  protocol.\n *\n *  @thread_safety This function must only be called from the main thread.\n *\n *  @sa @ref window_iconify\n *  @sa @ref glfwRestoreWindow\n *  @sa @ref glfwMaximizeWindow\n *\n *  @since Added in version 2.1.\n *  @glfw3 Added window handle parameter.\n *\n *  @ingroup window\n */\nGLFWAPI void glfwIconifyWindow(GLFWwindow* window);\n\n/*! @brief Restores the specified window.\n *\n *  This function restores the specified window if it was previously iconified\n *  (minimized) or maximized.  If the window is already restored, this function\n *  does nothing.\n *\n *  If the specified window is a full screen window, the resolution chosen for\n *  the window is restored on the selected monitor.\n *\n *  @param[in] window The window to restore.\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref\n *  GLFW_PLATFORM_ERROR.\n *\n *  @thread_safety This function must only be called from the main thread.\n *\n *  @sa @ref window_iconify\n *  @sa @ref glfwIconifyWindow\n *  @sa @ref glfwMaximizeWindow\n *\n *  @since Added in version 2.1.\n *  @glfw3 Added window handle parameter.\n *\n *  @ingroup window\n */\nGLFWAPI void glfwRestoreWindow(GLFWwindow* window);\n\n/*! @brief Maximizes the specified window.\n *\n *  This function maximizes the specified window if it was previously not\n *  maximized.  If the window is already maximized, this function does nothing.\n *\n *  If the specified window is a full screen window, this function does nothing.\n *\n *  @param[in] window The window to maximize.\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref\n *  GLFW_PLATFORM_ERROR.\n *\n *  @par Thread Safety\n *  This function may only be called from the main thread.\n *\n *  @sa @ref window_iconify\n *  @sa @ref glfwIconifyWindow\n *  @sa @ref glfwRestoreWindow\n *\n *  @since Added in GLFW 3.2.\n *\n *  @ingroup window\n */\nGLFWAPI void glfwMaximizeWindow(GLFWwindow* window);\n\n/*! @brief Makes the specified window visible.\n *\n *  This function makes the specified window visible if it was previously\n *  hidden.  If the window is already visible or is in full screen mode, this\n *  function does nothing.\n *\n *  By default, windowed mode windows are focused when shown\n *  Set the [GLFW_FOCUS_ON_SHOW](@ref GLFW_FOCUS_ON_SHOW_hint) window hint\n *  to change this behavior for all newly created windows, or change the\n *  behavior for an existing window with @ref glfwSetWindowAttrib.\n *\n *  @param[in] window The window to make visible.\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref\n *  GLFW_PLATFORM_ERROR.\n *\n *  @thread_safety This function must only be called from the main thread.\n *\n *  @sa @ref window_hide\n *  @sa @ref glfwHideWindow\n *\n *  @since Added in version 3.0.\n *\n *  @ingroup window\n */\nGLFWAPI void glfwShowWindow(GLFWwindow* window);\n\n/*! @brief Hides the specified window.\n *\n *  This function hides the specified window if it was previously visible.  If\n *  the window is already hidden or is in full screen mode, this function does\n *  nothing.\n *\n *  @param[in] window The window to hide.\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref\n *  GLFW_PLATFORM_ERROR.\n *\n *  @thread_safety This function must only be called from the main thread.\n *\n *  @sa @ref window_hide\n *  @sa @ref glfwShowWindow\n *\n *  @since Added in version 3.0.\n *\n *  @ingroup window\n */\nGLFWAPI void glfwHideWindow(GLFWwindow* window);\n\n/*! @brief Brings the specified window to front and sets input focus.\n *\n *  This function brings the specified window to front and sets input focus.\n *  The window should already be visible and not iconified.\n *\n *  By default, both windowed and full screen mode windows are focused when\n *  initially created.  Set the [GLFW_FOCUSED](@ref GLFW_FOCUSED_hint) to\n *  disable this behavior.\n *\n *  Also by default, windowed mode windows are focused when shown\n *  with @ref glfwShowWindow. Set the\n *  [GLFW_FOCUS_ON_SHOW](@ref GLFW_FOCUS_ON_SHOW_hint) to disable this behavior.\n *\n *  __Do not use this function__ to steal focus from other applications unless\n *  you are certain that is what the user wants.  Focus stealing can be\n *  extremely disruptive.\n *\n *  For a less disruptive way of getting the user's attention, see\n *  [attention requests](@ref window_attention).\n *\n *  @param[in] window The window to give input focus.\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref\n *  GLFW_PLATFORM_ERROR.\n *\n *  @remark @wayland It is not possible for an application to bring its windows\n *  to front, this function will always emit @ref GLFW_PLATFORM_ERROR.\n *\n *  @thread_safety This function must only be called from the main thread.\n *\n *  @sa @ref window_focus\n *  @sa @ref window_attention\n *\n *  @since Added in version 3.2.\n *\n *  @ingroup window\n */\nGLFWAPI void glfwFocusWindow(GLFWwindow* window);\n\n/*! @brief Requests user attention to the specified window.\n *\n *  This function requests user attention to the specified window.  On\n *  platforms where this is not supported, attention is requested to the\n *  application as a whole.\n *\n *  Once the user has given attention, usually by focusing the window or\n *  application, the system will end the request automatically.\n *\n *  @param[in] window The window to request attention to.\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref\n *  GLFW_PLATFORM_ERROR.\n *\n *  @remark @macos Attention is requested to the application as a whole, not the\n *  specific window.\n *\n *  @thread_safety This function must only be called from the main thread.\n *\n *  @sa @ref window_attention\n *\n *  @since Added in version 3.3.\n *\n *  @ingroup window\n */\nGLFWAPI void glfwRequestWindowAttention(GLFWwindow* window);\n\n/*! @brief Returns the monitor that the window uses for full screen mode.\n *\n *  This function returns the handle of the monitor that the specified window is\n *  in full screen on.\n *\n *  @param[in] window The window to query.\n *  @return The monitor, or `NULL` if the window is in windowed mode or an\n *  [error](@ref error_handling) occurred.\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED.\n *\n *  @thread_safety This function must only be called from the main thread.\n *\n *  @sa @ref window_monitor\n *  @sa @ref glfwSetWindowMonitor\n *\n *  @since Added in version 3.0.\n *\n *  @ingroup window\n */\nGLFWAPI GLFWmonitor* glfwGetWindowMonitor(GLFWwindow* window);\n\n/*! @brief Sets the mode, monitor, video mode and placement of a window.\n *\n *  This function sets the monitor that the window uses for full screen mode or,\n *  if the monitor is `NULL`, makes it windowed mode.\n *\n *  When setting a monitor, this function updates the width, height and refresh\n *  rate of the desired video mode and switches to the video mode closest to it.\n *  The window position is ignored when setting a monitor.\n *\n *  When the monitor is `NULL`, the position, width and height are used to\n *  place the window content area.  The refresh rate is ignored when no monitor\n *  is specified.\n *\n *  If you only wish to update the resolution of a full screen window or the\n *  size of a windowed mode window, see @ref glfwSetWindowSize.\n *\n *  When a window transitions from full screen to windowed mode, this function\n *  restores any previous window settings such as whether it is decorated,\n *  floating, resizable, has size or aspect ratio limits, etc.\n *\n *  @param[in] window The window whose monitor, size or video mode to set.\n *  @param[in] monitor The desired monitor, or `NULL` to set windowed mode.\n *  @param[in] xpos The desired x-coordinate of the upper-left corner of the\n *  content area.\n *  @param[in] ypos The desired y-coordinate of the upper-left corner of the\n *  content area.\n *  @param[in] width The desired with, in screen coordinates, of the content\n *  area or video mode.\n *  @param[in] height The desired height, in screen coordinates, of the content\n *  area or video mode.\n *  @param[in] refreshRate The desired refresh rate, in Hz, of the video mode,\n *  or `GLFW_DONT_CARE`.\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref\n *  GLFW_PLATFORM_ERROR.\n *\n *  @remark The OpenGL or OpenGL ES context will not be destroyed or otherwise\n *  affected by any resizing or mode switching, although you may need to update\n *  your viewport if the framebuffer size has changed.\n *\n *  @remark @wayland The desired window position is ignored, as there is no way\n *  for an application to set this property.\n *\n *  @remark @wayland Setting the window to full screen will not attempt to\n *  change the mode, no matter what the requested size or refresh rate.\n *\n *  @thread_safety This function must only be called from the main thread.\n *\n *  @sa @ref window_monitor\n *  @sa @ref window_full_screen\n *  @sa @ref glfwGetWindowMonitor\n *  @sa @ref glfwSetWindowSize\n *\n *  @since Added in version 3.2.\n *\n *  @ingroup window\n */\nGLFWAPI void glfwSetWindowMonitor(GLFWwindow* window, GLFWmonitor* monitor, int xpos, int ypos, int width, int height, int refreshRate);\n\n/*! @brief Returns an attribute of the specified window.\n *\n *  This function returns the value of an attribute of the specified window or\n *  its OpenGL or OpenGL ES context.\n *\n *  @param[in] window The window to query.\n *  @param[in] attrib The [window attribute](@ref window_attribs) whose value to\n *  return.\n *  @return The value of the attribute, or zero if an\n *  [error](@ref error_handling) occurred.\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref\n *  GLFW_INVALID_ENUM and @ref GLFW_PLATFORM_ERROR.\n *\n *  @remark Framebuffer related hints are not window attributes.  See @ref\n *  window_attribs_fb for more information.\n *\n *  @remark Zero is a valid value for many window and context related\n *  attributes so you cannot use a return value of zero as an indication of\n *  errors.  However, this function should not fail as long as it is passed\n *  valid arguments and the library has been [initialized](@ref intro_init).\n *\n *  @thread_safety This function must only be called from the main thread.\n *\n *  @sa @ref window_attribs\n *  @sa @ref glfwSetWindowAttrib\n *\n *  @since Added in version 3.0.  Replaces `glfwGetWindowParam` and\n *  `glfwGetGLVersion`.\n *\n *  @ingroup window\n */\nGLFWAPI int glfwGetWindowAttrib(GLFWwindow* window, int attrib);\n\n/*! @brief Sets an attribute of the specified window.\n *\n *  This function sets the value of an attribute of the specified window.\n *\n *  The supported attributes are [GLFW_DECORATED](@ref GLFW_DECORATED_attrib),\n *  [GLFW_RESIZABLE](@ref GLFW_RESIZABLE_attrib),\n *  [GLFW_FLOATING](@ref GLFW_FLOATING_attrib),\n *  [GLFW_AUTO_ICONIFY](@ref GLFW_AUTO_ICONIFY_attrib) and\n *  [GLFW_FOCUS_ON_SHOW](@ref GLFW_FOCUS_ON_SHOW_attrib).\n *\n *  Some of these attributes are ignored for full screen windows.  The new\n *  value will take effect if the window is later made windowed.\n *\n *  Some of these attributes are ignored for windowed mode windows.  The new\n *  value will take effect if the window is later made full screen.\n *\n *  @param[in] window The window to set the attribute for.\n *  @param[in] attrib A supported window attribute.\n *  @param[in] value `GLFW_TRUE` or `GLFW_FALSE`.\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref\n *  GLFW_INVALID_ENUM, @ref GLFW_INVALID_VALUE and @ref GLFW_PLATFORM_ERROR.\n *\n *  @remark Calling @ref glfwGetWindowAttrib will always return the latest\n *  value, even if that value is ignored by the current mode of the window.\n *\n *  @thread_safety This function must only be called from the main thread.\n *\n *  @sa @ref window_attribs\n *  @sa @ref glfwGetWindowAttrib\n *\n *  @since Added in version 3.3.\n *\n *  @ingroup window\n */\nGLFWAPI void glfwSetWindowAttrib(GLFWwindow* window, int attrib, int value);\n\n/*! @brief Sets the user pointer of the specified window.\n *\n *  This function sets the user-defined pointer of the specified window.  The\n *  current value is retained until the window is destroyed.  The initial value\n *  is `NULL`.\n *\n *  @param[in] window The window whose pointer to set.\n *  @param[in] pointer The new value.\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED.\n *\n *  @thread_safety This function may be called from any thread.  Access is not\n *  synchronized.\n *\n *  @sa @ref window_userptr\n *  @sa @ref glfwGetWindowUserPointer\n *\n *  @since Added in version 3.0.\n *\n *  @ingroup window\n */\nGLFWAPI void glfwSetWindowUserPointer(GLFWwindow* window, void* pointer);\n\n/*! @brief Returns the user pointer of the specified window.\n *\n *  This function returns the current value of the user-defined pointer of the\n *  specified window.  The initial value is `NULL`.\n *\n *  @param[in] window The window whose pointer to return.\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED.\n *\n *  @thread_safety This function may be called from any thread.  Access is not\n *  synchronized.\n *\n *  @sa @ref window_userptr\n *  @sa @ref glfwSetWindowUserPointer\n *\n *  @since Added in version 3.0.\n *\n *  @ingroup window\n */\nGLFWAPI void* glfwGetWindowUserPointer(GLFWwindow* window);\n\n/*! @brief Sets the position callback for the specified window.\n *\n *  This function sets the position callback of the specified window, which is\n *  called when the window is moved.  The callback is provided with the\n *  position, in screen coordinates, of the upper-left corner of the content\n *  area of the window.\n *\n *  @param[in] window The window whose callback to set.\n *  @param[in] callback The new callback, or `NULL` to remove the currently set\n *  callback.\n *  @return The previously set callback, or `NULL` if no callback was set or the\n *  library had not been [initialized](@ref intro_init).\n *\n *  @callback_signature\n *  @code\n *  void function_name(GLFWwindow* window, int xpos, int ypos)\n *  @endcode\n *  For more information about the callback parameters, see the\n *  [function pointer type](@ref GLFWwindowposfun).\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED.\n *\n *  @remark @wayland This callback will never be called, as there is no way for\n *  an application to know its global position.\n *\n *  @thread_safety This function must only be called from the main thread.\n *\n *  @sa @ref window_pos\n *\n *  @since Added in version 3.0.\n *\n *  @ingroup window\n */\nGLFWAPI GLFWwindowposfun glfwSetWindowPosCallback(GLFWwindow* window, GLFWwindowposfun callback);\n\n/*! @brief Sets the size callback for the specified window.\n *\n *  This function sets the size callback of the specified window, which is\n *  called when the window is resized.  The callback is provided with the size,\n *  in screen coordinates, of the content area of the window.\n *\n *  @param[in] window The window whose callback to set.\n *  @param[in] callback The new callback, or `NULL` to remove the currently set\n *  callback.\n *  @return The previously set callback, or `NULL` if no callback was set or the\n *  library had not been [initialized](@ref intro_init).\n *\n *  @callback_signature\n *  @code\n *  void function_name(GLFWwindow* window, int width, int height)\n *  @endcode\n *  For more information about the callback parameters, see the\n *  [function pointer type](@ref GLFWwindowsizefun).\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED.\n *\n *  @thread_safety This function must only be called from the main thread.\n *\n *  @sa @ref window_size\n *\n *  @since Added in version 1.0.\n *  @glfw3 Added window handle parameter and return value.\n *\n *  @ingroup window\n */\nGLFWAPI GLFWwindowsizefun glfwSetWindowSizeCallback(GLFWwindow* window, GLFWwindowsizefun callback);\n\n/*! @brief Sets the close callback for the specified window.\n *\n *  This function sets the close callback of the specified window, which is\n *  called when the user attempts to close the window, for example by clicking\n *  the close widget in the title bar.\n *\n *  The close flag is set before this callback is called, but you can modify it\n *  at any time with @ref glfwSetWindowShouldClose.\n *\n *  The close callback is not triggered by @ref glfwDestroyWindow.\n *\n *  @param[in] window The window whose callback to set.\n *  @param[in] callback The new callback, or `NULL` to remove the currently set\n *  callback.\n *  @return The previously set callback, or `NULL` if no callback was set or the\n *  library had not been [initialized](@ref intro_init).\n *\n *  @callback_signature\n *  @code\n *  void function_name(GLFWwindow* window)\n *  @endcode\n *  For more information about the callback parameters, see the\n *  [function pointer type](@ref GLFWwindowclosefun).\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED.\n *\n *  @remark @macos Selecting Quit from the application menu will trigger the\n *  close callback for all windows.\n *\n *  @thread_safety This function must only be called from the main thread.\n *\n *  @sa @ref window_close\n *\n *  @since Added in version 2.5.\n *  @glfw3 Added window handle parameter and return value.\n *\n *  @ingroup window\n */\nGLFWAPI GLFWwindowclosefun glfwSetWindowCloseCallback(GLFWwindow* window, GLFWwindowclosefun callback);\n\n/*! @brief Sets the refresh callback for the specified window.\n *\n *  This function sets the refresh callback of the specified window, which is\n *  called when the content area of the window needs to be redrawn, for example\n *  if the window has been exposed after having been covered by another window.\n *\n *  On compositing window systems such as Aero, Compiz, Aqua or Wayland, where\n *  the window contents are saved off-screen, this callback may be called only\n *  very infrequently or never at all.\n *\n *  @param[in] window The window whose callback to set.\n *  @param[in] callback The new callback, or `NULL` to remove the currently set\n *  callback.\n *  @return The previously set callback, or `NULL` if no callback was set or the\n *  library had not been [initialized](@ref intro_init).\n *\n *  @callback_signature\n *  @code\n *  void function_name(GLFWwindow* window);\n *  @endcode\n *  For more information about the callback parameters, see the\n *  [function pointer type](@ref GLFWwindowrefreshfun).\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED.\n *\n *  @thread_safety This function must only be called from the main thread.\n *\n *  @sa @ref window_refresh\n *\n *  @since Added in version 2.5.\n *  @glfw3 Added window handle parameter and return value.\n *\n *  @ingroup window\n */\nGLFWAPI GLFWwindowrefreshfun glfwSetWindowRefreshCallback(GLFWwindow* window, GLFWwindowrefreshfun callback);\n\n/*! @brief Sets the focus callback for the specified window.\n *\n *  This function sets the focus callback of the specified window, which is\n *  called when the window gains or loses input focus.\n *\n *  After the focus callback is called for a window that lost input focus,\n *  synthetic key and mouse button release events will be generated for all such\n *  that had been pressed.  For more information, see @ref glfwSetKeyCallback\n *  and @ref glfwSetMouseButtonCallback.\n *\n *  @param[in] window The window whose callback to set.\n *  @param[in] callback The new callback, or `NULL` to remove the currently set\n *  callback.\n *  @return The previously set callback, or `NULL` if no callback was set or the\n *  library had not been [initialized](@ref intro_init).\n *\n *  @callback_signature\n *  @code\n *  void function_name(GLFWwindow* window, int focused)\n *  @endcode\n *  For more information about the callback parameters, see the\n *  [function pointer type](@ref GLFWwindowfocusfun).\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED.\n *\n *  @thread_safety This function must only be called from the main thread.\n *\n *  @sa @ref window_focus\n *\n *  @since Added in version 3.0.\n *\n *  @ingroup window\n */\nGLFWAPI GLFWwindowfocusfun glfwSetWindowFocusCallback(GLFWwindow* window, GLFWwindowfocusfun callback);\n\n/*! @brief Sets the iconify callback for the specified window.\n *\n *  This function sets the iconification callback of the specified window, which\n *  is called when the window is iconified or restored.\n *\n *  @param[in] window The window whose callback to set.\n *  @param[in] callback The new callback, or `NULL` to remove the currently set\n *  callback.\n *  @return The previously set callback, or `NULL` if no callback was set or the\n *  library had not been [initialized](@ref intro_init).\n *\n *  @callback_signature\n *  @code\n *  void function_name(GLFWwindow* window, int iconified)\n *  @endcode\n *  For more information about the callback parameters, see the\n *  [function pointer type](@ref GLFWwindowiconifyfun).\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED.\n *\n *  @remark @wayland The wl_shell protocol has no concept of iconification,\n *  this callback will never be called when using this deprecated protocol.\n *\n *  @thread_safety This function must only be called from the main thread.\n *\n *  @sa @ref window_iconify\n *\n *  @since Added in version 3.0.\n *\n *  @ingroup window\n */\nGLFWAPI GLFWwindowiconifyfun glfwSetWindowIconifyCallback(GLFWwindow* window, GLFWwindowiconifyfun callback);\n\n/*! @brief Sets the maximize callback for the specified window.\n *\n *  This function sets the maximization callback of the specified window, which\n *  is called when the window is maximized or restored.\n *\n *  @param[in] window The window whose callback to set.\n *  @param[in] callback The new callback, or `NULL` to remove the currently set\n *  callback.\n *  @return The previously set callback, or `NULL` if no callback was set or the\n *  library had not been [initialized](@ref intro_init).\n *\n *  @callback_signature\n *  @code\n *  void function_name(GLFWwindow* window, int maximized)\n *  @endcode\n *  For more information about the callback parameters, see the\n *  [function pointer type](@ref GLFWwindowmaximizefun).\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED.\n *\n *  @thread_safety This function must only be called from the main thread.\n *\n *  @sa @ref window_maximize\n *\n *  @since Added in version 3.3.\n *\n *  @ingroup window\n */\nGLFWAPI GLFWwindowmaximizefun glfwSetWindowMaximizeCallback(GLFWwindow* window, GLFWwindowmaximizefun callback);\n\n/*! @brief Sets the framebuffer resize callback for the specified window.\n *\n *  This function sets the framebuffer resize callback of the specified window,\n *  which is called when the framebuffer of the specified window is resized.\n *\n *  @param[in] window The window whose callback to set.\n *  @param[in] callback The new callback, or `NULL` to remove the currently set\n *  callback.\n *  @return The previously set callback, or `NULL` if no callback was set or the\n *  library had not been [initialized](@ref intro_init).\n *\n *  @callback_signature\n *  @code\n *  void function_name(GLFWwindow* window, int width, int height)\n *  @endcode\n *  For more information about the callback parameters, see the\n *  [function pointer type](@ref GLFWframebuffersizefun).\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED.\n *\n *  @thread_safety This function must only be called from the main thread.\n *\n *  @sa @ref window_fbsize\n *\n *  @since Added in version 3.0.\n *\n *  @ingroup window\n */\nGLFWAPI GLFWframebuffersizefun glfwSetFramebufferSizeCallback(GLFWwindow* window, GLFWframebuffersizefun callback);\n\n/*! @brief Sets the window content scale callback for the specified window.\n *\n *  This function sets the window content scale callback of the specified window,\n *  which is called when the content scale of the specified window changes.\n *\n *  @param[in] window The window whose callback to set.\n *  @param[in] callback The new callback, or `NULL` to remove the currently set\n *  callback.\n *  @return The previously set callback, or `NULL` if no callback was set or the\n *  library had not been [initialized](@ref intro_init).\n *\n *  @callback_signature\n *  @code\n *  void function_name(GLFWwindow* window, float xscale, float yscale)\n *  @endcode\n *  For more information about the callback parameters, see the\n *  [function pointer type](@ref GLFWwindowcontentscalefun).\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED.\n *\n *  @thread_safety This function must only be called from the main thread.\n *\n *  @sa @ref window_scale\n *  @sa @ref glfwGetWindowContentScale\n *\n *  @since Added in version 3.3.\n *\n *  @ingroup window\n */\nGLFWAPI GLFWwindowcontentscalefun glfwSetWindowContentScaleCallback(GLFWwindow* window, GLFWwindowcontentscalefun callback);\n\n/*! @brief Processes all pending events.\n *\n *  This function processes only those events that are already in the event\n *  queue and then returns immediately.  Processing events will cause the window\n *  and input callbacks associated with those events to be called.\n *\n *  On some platforms, a window move, resize or menu operation will cause event\n *  processing to block.  This is due to how event processing is designed on\n *  those platforms.  You can use the\n *  [window refresh callback](@ref window_refresh) to redraw the contents of\n *  your window when necessary during such operations.\n *\n *  Do not assume that callbacks you set will _only_ be called in response to\n *  event processing functions like this one.  While it is necessary to poll for\n *  events, window systems that require GLFW to register callbacks of its own\n *  can pass events to GLFW in response to many window system function calls.\n *  GLFW will pass those events on to the application callbacks before\n *  returning.\n *\n *  Event processing is not required for joystick input to work.\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref\n *  GLFW_PLATFORM_ERROR.\n *\n *  @reentrancy This function must not be called from a callback.\n *\n *  @thread_safety This function must only be called from the main thread.\n *\n *  @sa @ref events\n *  @sa @ref glfwWaitEvents\n *  @sa @ref glfwWaitEventsTimeout\n *\n *  @since Added in version 1.0.\n *\n *  @ingroup window\n */\nGLFWAPI void glfwPollEvents(void);\n\n/*! @brief Waits until events are queued and processes them.\n *\n *  This function puts the calling thread to sleep until at least one event is\n *  available in the event queue.  Once one or more events are available,\n *  it behaves exactly like @ref glfwPollEvents, i.e. the events in the queue\n *  are processed and the function then returns immediately.  Processing events\n *  will cause the window and input callbacks associated with those events to be\n *  called.\n *\n *  Since not all events are associated with callbacks, this function may return\n *  without a callback having been called even if you are monitoring all\n *  callbacks.\n *\n *  On some platforms, a window move, resize or menu operation will cause event\n *  processing to block.  This is due to how event processing is designed on\n *  those platforms.  You can use the\n *  [window refresh callback](@ref window_refresh) to redraw the contents of\n *  your window when necessary during such operations.\n *\n *  Do not assume that callbacks you set will _only_ be called in response to\n *  event processing functions like this one.  While it is necessary to poll for\n *  events, window systems that require GLFW to register callbacks of its own\n *  can pass events to GLFW in response to many window system function calls.\n *  GLFW will pass those events on to the application callbacks before\n *  returning.\n *\n *  Event processing is not required for joystick input to work.\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref\n *  GLFW_PLATFORM_ERROR.\n *\n *  @reentrancy This function must not be called from a callback.\n *\n *  @thread_safety This function must only be called from the main thread.\n *\n *  @sa @ref events\n *  @sa @ref glfwPollEvents\n *  @sa @ref glfwWaitEventsTimeout\n *\n *  @since Added in version 2.5.\n *\n *  @ingroup window\n */\nGLFWAPI void glfwWaitEvents(void);\n\n/*! @brief Waits with timeout until events are queued and processes them.\n *\n *  This function puts the calling thread to sleep until at least one event is\n *  available in the event queue, or until the specified timeout is reached.  If\n *  one or more events are available, it behaves exactly like @ref\n *  glfwPollEvents, i.e. the events in the queue are processed and the function\n *  then returns immediately.  Processing events will cause the window and input\n *  callbacks associated with those events to be called.\n *\n *  The timeout value must be a positive finite number.\n *\n *  Since not all events are associated with callbacks, this function may return\n *  without a callback having been called even if you are monitoring all\n *  callbacks.\n *\n *  On some platforms, a window move, resize or menu operation will cause event\n *  processing to block.  This is due to how event processing is designed on\n *  those platforms.  You can use the\n *  [window refresh callback](@ref window_refresh) to redraw the contents of\n *  your window when necessary during such operations.\n *\n *  Do not assume that callbacks you set will _only_ be called in response to\n *  event processing functions like this one.  While it is necessary to poll for\n *  events, window systems that require GLFW to register callbacks of its own\n *  can pass events to GLFW in response to many window system function calls.\n *  GLFW will pass those events on to the application callbacks before\n *  returning.\n *\n *  Event processing is not required for joystick input to work.\n *\n *  @param[in] timeout The maximum amount of time, in seconds, to wait.\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref\n *  GLFW_INVALID_VALUE and @ref GLFW_PLATFORM_ERROR.\n *\n *  @reentrancy This function must not be called from a callback.\n *\n *  @thread_safety This function must only be called from the main thread.\n *\n *  @sa @ref events\n *  @sa @ref glfwPollEvents\n *  @sa @ref glfwWaitEvents\n *\n *  @since Added in version 3.2.\n *\n *  @ingroup window\n */\nGLFWAPI void glfwWaitEventsTimeout(double timeout);\n\n/*! @brief Posts an empty event to the event queue.\n *\n *  This function posts an empty event from the current thread to the event\n *  queue, causing @ref glfwWaitEvents or @ref glfwWaitEventsTimeout to return.\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref\n *  GLFW_PLATFORM_ERROR.\n *\n *  @thread_safety This function may be called from any thread.\n *\n *  @sa @ref events\n *  @sa @ref glfwWaitEvents\n *  @sa @ref glfwWaitEventsTimeout\n *\n *  @since Added in version 3.1.\n *\n *  @ingroup window\n */\nGLFWAPI void glfwPostEmptyEvent(void);\n\n/*! @brief Returns the value of an input option for the specified window.\n *\n *  This function returns the value of an input option for the specified window.\n *  The mode must be one of @ref GLFW_CURSOR, @ref GLFW_STICKY_KEYS,\n *  @ref GLFW_STICKY_MOUSE_BUTTONS, @ref GLFW_LOCK_KEY_MODS or\n *  @ref GLFW_RAW_MOUSE_MOTION.\n *\n *  @param[in] window The window to query.\n *  @param[in] mode One of `GLFW_CURSOR`, `GLFW_STICKY_KEYS`,\n *  `GLFW_STICKY_MOUSE_BUTTONS`, `GLFW_LOCK_KEY_MODS` or\n *  `GLFW_RAW_MOUSE_MOTION`.\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref\n *  GLFW_INVALID_ENUM.\n *\n *  @thread_safety This function must only be called from the main thread.\n *\n *  @sa @ref glfwSetInputMode\n *\n *  @since Added in version 3.0.\n *\n *  @ingroup input\n */\nGLFWAPI int glfwGetInputMode(GLFWwindow* window, int mode);\n\n/*! @brief Sets an input option for the specified window.\n *\n *  This function sets an input mode option for the specified window.  The mode\n *  must be one of @ref GLFW_CURSOR, @ref GLFW_STICKY_KEYS,\n *  @ref GLFW_STICKY_MOUSE_BUTTONS, @ref GLFW_LOCK_KEY_MODS or\n *  @ref GLFW_RAW_MOUSE_MOTION.\n *\n *  If the mode is `GLFW_CURSOR`, the value must be one of the following cursor\n *  modes:\n *  - `GLFW_CURSOR_NORMAL` makes the cursor visible and behaving normally.\n *  - `GLFW_CURSOR_HIDDEN` makes the cursor invisible when it is over the\n *    content area of the window but does not restrict the cursor from leaving.\n *  - `GLFW_CURSOR_DISABLED` hides and grabs the cursor, providing virtual\n *    and unlimited cursor movement.  This is useful for implementing for\n *    example 3D camera controls.\n *\n *  If the mode is `GLFW_STICKY_KEYS`, the value must be either `GLFW_TRUE` to\n *  enable sticky keys, or `GLFW_FALSE` to disable it.  If sticky keys are\n *  enabled, a key press will ensure that @ref glfwGetKey returns `GLFW_PRESS`\n *  the next time it is called even if the key had been released before the\n *  call.  This is useful when you are only interested in whether keys have been\n *  pressed but not when or in which order.\n *\n *  If the mode is `GLFW_STICKY_MOUSE_BUTTONS`, the value must be either\n *  `GLFW_TRUE` to enable sticky mouse buttons, or `GLFW_FALSE` to disable it.\n *  If sticky mouse buttons are enabled, a mouse button press will ensure that\n *  @ref glfwGetMouseButton returns `GLFW_PRESS` the next time it is called even\n *  if the mouse button had been released before the call.  This is useful when\n *  you are only interested in whether mouse buttons have been pressed but not\n *  when or in which order.\n *\n *  If the mode is `GLFW_LOCK_KEY_MODS`, the value must be either `GLFW_TRUE` to\n *  enable lock key modifier bits, or `GLFW_FALSE` to disable them.  If enabled,\n *  callbacks that receive modifier bits will also have the @ref\n *  GLFW_MOD_CAPS_LOCK bit set when the event was generated with Caps Lock on,\n *  and the @ref GLFW_MOD_NUM_LOCK bit when Num Lock was on.\n *\n *  If the mode is `GLFW_RAW_MOUSE_MOTION`, the value must be either `GLFW_TRUE`\n *  to enable raw (unscaled and unaccelerated) mouse motion when the cursor is\n *  disabled, or `GLFW_FALSE` to disable it.  If raw motion is not supported,\n *  attempting to set this will emit @ref GLFW_PLATFORM_ERROR.  Call @ref\n *  glfwRawMouseMotionSupported to check for support.\n *\n *  @param[in] window The window whose input mode to set.\n *  @param[in] mode One of `GLFW_CURSOR`, `GLFW_STICKY_KEYS`,\n *  `GLFW_STICKY_MOUSE_BUTTONS`, `GLFW_LOCK_KEY_MODS` or\n *  `GLFW_RAW_MOUSE_MOTION`.\n *  @param[in] value The new value of the specified input mode.\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref\n *  GLFW_INVALID_ENUM and @ref GLFW_PLATFORM_ERROR.\n *\n *  @thread_safety This function must only be called from the main thread.\n *\n *  @sa @ref glfwGetInputMode\n *\n *  @since Added in version 3.0.  Replaces `glfwEnable` and `glfwDisable`.\n *\n *  @ingroup input\n */\nGLFWAPI void glfwSetInputMode(GLFWwindow* window, int mode, int value);\n\n/*! @brief Returns whether raw mouse motion is supported.\n *\n *  This function returns whether raw mouse motion is supported on the current\n *  system.  This status does not change after GLFW has been initialized so you\n *  only need to check this once.  If you attempt to enable raw motion on\n *  a system that does not support it, @ref GLFW_PLATFORM_ERROR will be emitted.\n *\n *  Raw mouse motion is closer to the actual motion of the mouse across\n *  a surface.  It is not affected by the scaling and acceleration applied to\n *  the motion of the desktop cursor.  That processing is suitable for a cursor\n *  while raw motion is better for controlling for example a 3D camera.  Because\n *  of this, raw mouse motion is only provided when the cursor is disabled.\n *\n *  @return `GLFW_TRUE` if raw mouse motion is supported on the current machine,\n *  or `GLFW_FALSE` otherwise.\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED.\n *\n *  @thread_safety This function must only be called from the main thread.\n *\n *  @sa @ref raw_mouse_motion\n *  @sa @ref glfwSetInputMode\n *\n *  @since Added in version 3.3.\n *\n *  @ingroup input\n */\nGLFWAPI int glfwRawMouseMotionSupported(void);\n\n/*! @brief Returns the layout-specific name of the specified printable key.\n *\n *  This function returns the name of the specified printable key, encoded as\n *  UTF-8.  This is typically the character that key would produce without any\n *  modifier keys, intended for displaying key bindings to the user.  For dead\n *  keys, it is typically the diacritic it would add to a character.\n *\n *  __Do not use this function__ for [text input](@ref input_char).  You will\n *  break text input for many languages even if it happens to work for yours.\n *\n *  If the key is `GLFW_KEY_UNKNOWN`, the scancode is used to identify the key,\n *  otherwise the scancode is ignored.  If you specify a non-printable key, or\n *  `GLFW_KEY_UNKNOWN` and a scancode that maps to a non-printable key, this\n *  function returns `NULL` but does not emit an error.\n *\n *  This behavior allows you to always pass in the arguments in the\n *  [key callback](@ref input_key) without modification.\n *\n *  The printable keys are:\n *  - `GLFW_KEY_APOSTROPHE`\n *  - `GLFW_KEY_COMMA`\n *  - `GLFW_KEY_MINUS`\n *  - `GLFW_KEY_PERIOD`\n *  - `GLFW_KEY_SLASH`\n *  - `GLFW_KEY_SEMICOLON`\n *  - `GLFW_KEY_EQUAL`\n *  - `GLFW_KEY_LEFT_BRACKET`\n *  - `GLFW_KEY_RIGHT_BRACKET`\n *  - `GLFW_KEY_BACKSLASH`\n *  - `GLFW_KEY_WORLD_1`\n *  - `GLFW_KEY_WORLD_2`\n *  - `GLFW_KEY_0` to `GLFW_KEY_9`\n *  - `GLFW_KEY_A` to `GLFW_KEY_Z`\n *  - `GLFW_KEY_KP_0` to `GLFW_KEY_KP_9`\n *  - `GLFW_KEY_KP_DECIMAL`\n *  - `GLFW_KEY_KP_DIVIDE`\n *  - `GLFW_KEY_KP_MULTIPLY`\n *  - `GLFW_KEY_KP_SUBTRACT`\n *  - `GLFW_KEY_KP_ADD`\n *  - `GLFW_KEY_KP_EQUAL`\n *\n *  Names for printable keys depend on keyboard layout, while names for\n *  non-printable keys are the same across layouts but depend on the application\n *  language and should be localized along with other user interface text.\n *\n *  @param[in] key The key to query, or `GLFW_KEY_UNKNOWN`.\n *  @param[in] scancode The scancode of the key to query.\n *  @return The UTF-8 encoded, layout-specific name of the key, or `NULL`.\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref\n *  GLFW_PLATFORM_ERROR.\n *\n *  @remark The contents of the returned string may change when a keyboard\n *  layout change event is received.\n *\n *  @pointer_lifetime The returned string is allocated and freed by GLFW.  You\n *  should not free it yourself.  It is valid until the library is terminated.\n *\n *  @thread_safety This function must only be called from the main thread.\n *\n *  @sa @ref input_key_name\n *\n *  @since Added in version 3.2.\n *\n *  @ingroup input\n */\nGLFWAPI const char* glfwGetKeyName(int key, int scancode);\n\n/*! @brief Returns the platform-specific scancode of the specified key.\n *\n *  This function returns the platform-specific scancode of the specified key.\n *\n *  If the key is `GLFW_KEY_UNKNOWN` or does not exist on the keyboard this\n *  method will return `-1`.\n *\n *  @param[in] key Any [named key](@ref keys).\n *  @return The platform-specific scancode for the key, or `-1` if an\n *  [error](@ref error_handling) occurred.\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref\n *  GLFW_INVALID_ENUM and @ref GLFW_PLATFORM_ERROR.\n *\n *  @thread_safety This function may be called from any thread.\n *\n *  @sa @ref input_key\n *\n *  @since Added in version 3.3.\n *\n *  @ingroup input\n */\nGLFWAPI int glfwGetKeyScancode(int key);\n\n/*! @brief Returns the last reported state of a keyboard key for the specified\n *  window.\n *\n *  This function returns the last state reported for the specified key to the\n *  specified window.  The returned state is one of `GLFW_PRESS` or\n *  `GLFW_RELEASE`.  The higher-level action `GLFW_REPEAT` is only reported to\n *  the key callback.\n *\n *  If the @ref GLFW_STICKY_KEYS input mode is enabled, this function returns\n *  `GLFW_PRESS` the first time you call it for a key that was pressed, even if\n *  that key has already been released.\n *\n *  The key functions deal with physical keys, with [key tokens](@ref keys)\n *  named after their use on the standard US keyboard layout.  If you want to\n *  input text, use the Unicode character callback instead.\n *\n *  The [modifier key bit masks](@ref mods) are not key tokens and cannot be\n *  used with this function.\n *\n *  __Do not use this function__ to implement [text input](@ref input_char).\n *\n *  @param[in] window The desired window.\n *  @param[in] key The desired [keyboard key](@ref keys).  `GLFW_KEY_UNKNOWN` is\n *  not a valid key for this function.\n *  @return One of `GLFW_PRESS` or `GLFW_RELEASE`.\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref\n *  GLFW_INVALID_ENUM.\n *\n *  @thread_safety This function must only be called from the main thread.\n *\n *  @sa @ref input_key\n *\n *  @since Added in version 1.0.\n *  @glfw3 Added window handle parameter.\n *\n *  @ingroup input\n */\nGLFWAPI int glfwGetKey(GLFWwindow* window, int key);\n\n/*! @brief Returns the last reported state of a mouse button for the specified\n *  window.\n *\n *  This function returns the last state reported for the specified mouse button\n *  to the specified window.  The returned state is one of `GLFW_PRESS` or\n *  `GLFW_RELEASE`.\n *\n *  If the @ref GLFW_STICKY_MOUSE_BUTTONS input mode is enabled, this function\n *  returns `GLFW_PRESS` the first time you call it for a mouse button that was\n *  pressed, even if that mouse button has already been released.\n *\n *  @param[in] window The desired window.\n *  @param[in] button The desired [mouse button](@ref buttons).\n *  @return One of `GLFW_PRESS` or `GLFW_RELEASE`.\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref\n *  GLFW_INVALID_ENUM.\n *\n *  @thread_safety This function must only be called from the main thread.\n *\n *  @sa @ref input_mouse_button\n *\n *  @since Added in version 1.0.\n *  @glfw3 Added window handle parameter.\n *\n *  @ingroup input\n */\nGLFWAPI int glfwGetMouseButton(GLFWwindow* window, int button);\n\n/*! @brief Retrieves the position of the cursor relative to the content area of\n *  the window.\n *\n *  This function returns the position of the cursor, in screen coordinates,\n *  relative to the upper-left corner of the content area of the specified\n *  window.\n *\n *  If the cursor is disabled (with `GLFW_CURSOR_DISABLED`) then the cursor\n *  position is unbounded and limited only by the minimum and maximum values of\n *  a `double`.\n *\n *  The coordinate can be converted to their integer equivalents with the\n *  `floor` function.  Casting directly to an integer type works for positive\n *  coordinates, but fails for negative ones.\n *\n *  Any or all of the position arguments may be `NULL`.  If an error occurs, all\n *  non-`NULL` position arguments will be set to zero.\n *\n *  @param[in] window The desired window.\n *  @param[out] xpos Where to store the cursor x-coordinate, relative to the\n *  left edge of the content area, or `NULL`.\n *  @param[out] ypos Where to store the cursor y-coordinate, relative to the to\n *  top edge of the content area, or `NULL`.\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref\n *  GLFW_PLATFORM_ERROR.\n *\n *  @thread_safety This function must only be called from the main thread.\n *\n *  @sa @ref cursor_pos\n *  @sa @ref glfwSetCursorPos\n *\n *  @since Added in version 3.0.  Replaces `glfwGetMousePos`.\n *\n *  @ingroup input\n */\nGLFWAPI void glfwGetCursorPos(GLFWwindow* window, double* xpos, double* ypos);\n\n/*! @brief Sets the position of the cursor, relative to the content area of the\n *  window.\n *\n *  This function sets the position, in screen coordinates, of the cursor\n *  relative to the upper-left corner of the content area of the specified\n *  window.  The window must have input focus.  If the window does not have\n *  input focus when this function is called, it fails silently.\n *\n *  __Do not use this function__ to implement things like camera controls.  GLFW\n *  already provides the `GLFW_CURSOR_DISABLED` cursor mode that hides the\n *  cursor, transparently re-centers it and provides unconstrained cursor\n *  motion.  See @ref glfwSetInputMode for more information.\n *\n *  If the cursor mode is `GLFW_CURSOR_DISABLED` then the cursor position is\n *  unconstrained and limited only by the minimum and maximum values of\n *  a `double`.\n *\n *  @param[in] window The desired window.\n *  @param[in] xpos The desired x-coordinate, relative to the left edge of the\n *  content area.\n *  @param[in] ypos The desired y-coordinate, relative to the top edge of the\n *  content area.\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref\n *  GLFW_PLATFORM_ERROR.\n *\n *  @remark @wayland This function will only work when the cursor mode is\n *  `GLFW_CURSOR_DISABLED`, otherwise it will do nothing.\n *\n *  @thread_safety This function must only be called from the main thread.\n *\n *  @sa @ref cursor_pos\n *  @sa @ref glfwGetCursorPos\n *\n *  @since Added in version 3.0.  Replaces `glfwSetMousePos`.\n *\n *  @ingroup input\n */\nGLFWAPI void glfwSetCursorPos(GLFWwindow* window, double xpos, double ypos);\n\n/*! @brief Creates a custom cursor.\n *\n *  Creates a new custom cursor image that can be set for a window with @ref\n *  glfwSetCursor.  The cursor can be destroyed with @ref glfwDestroyCursor.\n *  Any remaining cursors are destroyed by @ref glfwTerminate.\n *\n *  The pixels are 32-bit, little-endian, non-premultiplied RGBA, i.e. eight\n *  bits per channel with the red channel first.  They are arranged canonically\n *  as packed sequential rows, starting from the top-left corner.\n *\n *  The cursor hotspot is specified in pixels, relative to the upper-left corner\n *  of the cursor image.  Like all other coordinate systems in GLFW, the X-axis\n *  points to the right and the Y-axis points down.\n *\n *  @param[in] image The desired cursor image.\n *  @param[in] xhot The desired x-coordinate, in pixels, of the cursor hotspot.\n *  @param[in] yhot The desired y-coordinate, in pixels, of the cursor hotspot.\n *  @return The handle of the created cursor, or `NULL` if an\n *  [error](@ref error_handling) occurred.\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref\n *  GLFW_PLATFORM_ERROR.\n *\n *  @pointer_lifetime The specified image data is copied before this function\n *  returns.\n *\n *  @thread_safety This function must only be called from the main thread.\n *\n *  @sa @ref cursor_object\n *  @sa @ref glfwDestroyCursor\n *  @sa @ref glfwCreateStandardCursor\n *\n *  @since Added in version 3.1.\n *\n *  @ingroup input\n */\nGLFWAPI GLFWcursor* glfwCreateCursor(const GLFWimage* image, int xhot, int yhot);\n\n/*! @brief Creates a cursor with a standard shape.\n *\n *  Returns a cursor with a [standard shape](@ref shapes), that can be set for\n *  a window with @ref glfwSetCursor.\n *\n *  @param[in] shape One of the [standard shapes](@ref shapes).\n *  @return A new cursor ready to use or `NULL` if an\n *  [error](@ref error_handling) occurred.\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref\n *  GLFW_INVALID_ENUM and @ref GLFW_PLATFORM_ERROR.\n *\n *  @thread_safety This function must only be called from the main thread.\n *\n *  @sa @ref cursor_object\n *  @sa @ref glfwCreateCursor\n *\n *  @since Added in version 3.1.\n *\n *  @ingroup input\n */\nGLFWAPI GLFWcursor* glfwCreateStandardCursor(int shape);\n\n/*! @brief Destroys a cursor.\n *\n *  This function destroys a cursor previously created with @ref\n *  glfwCreateCursor.  Any remaining cursors will be destroyed by @ref\n *  glfwTerminate.\n *\n *  If the specified cursor is current for any window, that window will be\n *  reverted to the default cursor.  This does not affect the cursor mode.\n *\n *  @param[in] cursor The cursor object to destroy.\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref\n *  GLFW_PLATFORM_ERROR.\n *\n *  @reentrancy This function must not be called from a callback.\n *\n *  @thread_safety This function must only be called from the main thread.\n *\n *  @sa @ref cursor_object\n *  @sa @ref glfwCreateCursor\n *\n *  @since Added in version 3.1.\n *\n *  @ingroup input\n */\nGLFWAPI void glfwDestroyCursor(GLFWcursor* cursor);\n\n/*! @brief Sets the cursor for the window.\n *\n *  This function sets the cursor image to be used when the cursor is over the\n *  content area of the specified window.  The set cursor will only be visible\n *  when the [cursor mode](@ref cursor_mode) of the window is\n *  `GLFW_CURSOR_NORMAL`.\n *\n *  On some platforms, the set cursor may not be visible unless the window also\n *  has input focus.\n *\n *  @param[in] window The window to set the cursor for.\n *  @param[in] cursor The cursor to set, or `NULL` to switch back to the default\n *  arrow cursor.\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref\n *  GLFW_PLATFORM_ERROR.\n *\n *  @thread_safety This function must only be called from the main thread.\n *\n *  @sa @ref cursor_object\n *\n *  @since Added in version 3.1.\n *\n *  @ingroup input\n */\nGLFWAPI void glfwSetCursor(GLFWwindow* window, GLFWcursor* cursor);\n\n/*! @brief Sets the key callback.\n *\n *  This function sets the key callback of the specified window, which is called\n *  when a key is pressed, repeated or released.\n *\n *  The key functions deal with physical keys, with layout independent\n *  [key tokens](@ref keys) named after their values in the standard US keyboard\n *  layout.  If you want to input text, use the\n *  [character callback](@ref glfwSetCharCallback) instead.\n *\n *  When a window loses input focus, it will generate synthetic key release\n *  events for all pressed keys.  You can tell these events from user-generated\n *  events by the fact that the synthetic ones are generated after the focus\n *  loss event has been processed, i.e. after the\n *  [window focus callback](@ref glfwSetWindowFocusCallback) has been called.\n *\n *  The scancode of a key is specific to that platform or sometimes even to that\n *  machine.  Scancodes are intended to allow users to bind keys that don't have\n *  a GLFW key token.  Such keys have `key` set to `GLFW_KEY_UNKNOWN`, their\n *  state is not saved and so it cannot be queried with @ref glfwGetKey.\n *\n *  Sometimes GLFW needs to generate synthetic key events, in which case the\n *  scancode may be zero.\n *\n *  @param[in] window The window whose callback to set.\n *  @param[in] callback The new key callback, or `NULL` to remove the currently\n *  set callback.\n *  @return The previously set callback, or `NULL` if no callback was set or the\n *  library had not been [initialized](@ref intro_init).\n *\n *  @callback_signature\n *  @code\n *  void function_name(GLFWwindow* window, int key, int scancode, int action, int mods)\n *  @endcode\n *  For more information about the callback parameters, see the\n *  [function pointer type](@ref GLFWkeyfun).\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED.\n *\n *  @thread_safety This function must only be called from the main thread.\n *\n *  @sa @ref input_key\n *\n *  @since Added in version 1.0.\n *  @glfw3 Added window handle parameter and return value.\n *\n *  @ingroup input\n */\nGLFWAPI GLFWkeyfun glfwSetKeyCallback(GLFWwindow* window, GLFWkeyfun callback);\n\n/*! @brief Sets the Unicode character callback.\n *\n *  This function sets the character callback of the specified window, which is\n *  called when a Unicode character is input.\n *\n *  The character callback is intended for Unicode text input.  As it deals with\n *  characters, it is keyboard layout dependent, whereas the\n *  [key callback](@ref glfwSetKeyCallback) is not.  Characters do not map 1:1\n *  to physical keys, as a key may produce zero, one or more characters.  If you\n *  want to know whether a specific physical key was pressed or released, see\n *  the key callback instead.\n *\n *  The character callback behaves as system text input normally does and will\n *  not be called if modifier keys are held down that would prevent normal text\n *  input on that platform, for example a Super (Command) key on macOS or Alt key\n *  on Windows.\n *\n *  @param[in] window The window whose callback to set.\n *  @param[in] callback The new callback, or `NULL` to remove the currently set\n *  callback.\n *  @return The previously set callback, or `NULL` if no callback was set or the\n *  library had not been [initialized](@ref intro_init).\n *\n *  @callback_signature\n *  @code\n *  void function_name(GLFWwindow* window, unsigned int codepoint)\n *  @endcode\n *  For more information about the callback parameters, see the\n *  [function pointer type](@ref GLFWcharfun).\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED.\n *\n *  @thread_safety This function must only be called from the main thread.\n *\n *  @sa @ref input_char\n *\n *  @since Added in version 2.4.\n *  @glfw3 Added window handle parameter and return value.\n *\n *  @ingroup input\n */\nGLFWAPI GLFWcharfun glfwSetCharCallback(GLFWwindow* window, GLFWcharfun callback);\n\n/*! @brief Sets the Unicode character with modifiers callback.\n *\n *  This function sets the character with modifiers callback of the specified\n *  window, which is called when a Unicode character is input regardless of what\n *  modifier keys are used.\n *\n *  The character with modifiers callback is intended for implementing custom\n *  Unicode character input.  For regular Unicode text input, see the\n *  [character callback](@ref glfwSetCharCallback).  Like the character\n *  callback, the character with modifiers callback deals with characters and is\n *  keyboard layout dependent.  Characters do not map 1:1 to physical keys, as\n *  a key may produce zero, one or more characters.  If you want to know whether\n *  a specific physical key was pressed or released, see the\n *  [key callback](@ref glfwSetKeyCallback) instead.\n *\n *  @param[in] window The window whose callback to set.\n *  @param[in] callback The new callback, or `NULL` to remove the currently set\n *  callback.\n *  @return The previously set callback, or `NULL` if no callback was set or an\n *  [error](@ref error_handling) occurred.\n *\n *  @callback_signature\n *  @code\n *  void function_name(GLFWwindow* window, unsigned int codepoint, int mods)\n *  @endcode\n *  For more information about the callback parameters, see the\n *  [function pointer type](@ref GLFWcharmodsfun).\n *\n *  @deprecated Scheduled for removal in version 4.0.\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED.\n *\n *  @thread_safety This function must only be called from the main thread.\n *\n *  @sa @ref input_char\n *\n *  @since Added in version 3.1.\n *\n *  @ingroup input\n */\nGLFWAPI GLFWcharmodsfun glfwSetCharModsCallback(GLFWwindow* window, GLFWcharmodsfun callback);\n\n/*! @brief Sets the mouse button callback.\n *\n *  This function sets the mouse button callback of the specified window, which\n *  is called when a mouse button is pressed or released.\n *\n *  When a window loses input focus, it will generate synthetic mouse button\n *  release events for all pressed mouse buttons.  You can tell these events\n *  from user-generated events by the fact that the synthetic ones are generated\n *  after the focus loss event has been processed, i.e. after the\n *  [window focus callback](@ref glfwSetWindowFocusCallback) has been called.\n *\n *  @param[in] window The window whose callback to set.\n *  @param[in] callback The new callback, or `NULL` to remove the currently set\n *  callback.\n *  @return The previously set callback, or `NULL` if no callback was set or the\n *  library had not been [initialized](@ref intro_init).\n *\n *  @callback_signature\n *  @code\n *  void function_name(GLFWwindow* window, int button, int action, int mods)\n *  @endcode\n *  For more information about the callback parameters, see the\n *  [function pointer type](@ref GLFWmousebuttonfun).\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED.\n *\n *  @thread_safety This function must only be called from the main thread.\n *\n *  @sa @ref input_mouse_button\n *\n *  @since Added in version 1.0.\n *  @glfw3 Added window handle parameter and return value.\n *\n *  @ingroup input\n */\nGLFWAPI GLFWmousebuttonfun glfwSetMouseButtonCallback(GLFWwindow* window, GLFWmousebuttonfun callback);\n\n/*! @brief Sets the cursor position callback.\n *\n *  This function sets the cursor position callback of the specified window,\n *  which is called when the cursor is moved.  The callback is provided with the\n *  position, in screen coordinates, relative to the upper-left corner of the\n *  content area of the window.\n *\n *  @param[in] window The window whose callback to set.\n *  @param[in] callback The new callback, or `NULL` to remove the currently set\n *  callback.\n *  @return The previously set callback, or `NULL` if no callback was set or the\n *  library had not been [initialized](@ref intro_init).\n *\n *  @callback_signature\n *  @code\n *  void function_name(GLFWwindow* window, double xpos, double ypos);\n *  @endcode\n *  For more information about the callback parameters, see the\n *  [function pointer type](@ref GLFWcursorposfun).\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED.\n *\n *  @thread_safety This function must only be called from the main thread.\n *\n *  @sa @ref cursor_pos\n *\n *  @since Added in version 3.0.  Replaces `glfwSetMousePosCallback`.\n *\n *  @ingroup input\n */\nGLFWAPI GLFWcursorposfun glfwSetCursorPosCallback(GLFWwindow* window, GLFWcursorposfun callback);\n\n/*! @brief Sets the cursor enter/leave callback.\n *\n *  This function sets the cursor boundary crossing callback of the specified\n *  window, which is called when the cursor enters or leaves the content area of\n *  the window.\n *\n *  @param[in] window The window whose callback to set.\n *  @param[in] callback The new callback, or `NULL` to remove the currently set\n *  callback.\n *  @return The previously set callback, or `NULL` if no callback was set or the\n *  library had not been [initialized](@ref intro_init).\n *\n *  @callback_signature\n *  @code\n *  void function_name(GLFWwindow* window, int entered)\n *  @endcode\n *  For more information about the callback parameters, see the\n *  [function pointer type](@ref GLFWcursorenterfun).\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED.\n *\n *  @thread_safety This function must only be called from the main thread.\n *\n *  @sa @ref cursor_enter\n *\n *  @since Added in version 3.0.\n *\n *  @ingroup input\n */\nGLFWAPI GLFWcursorenterfun glfwSetCursorEnterCallback(GLFWwindow* window, GLFWcursorenterfun callback);\n\n/*! @brief Sets the scroll callback.\n *\n *  This function sets the scroll callback of the specified window, which is\n *  called when a scrolling device is used, such as a mouse wheel or scrolling\n *  area of a touchpad.\n *\n *  The scroll callback receives all scrolling input, like that from a mouse\n *  wheel or a touchpad scrolling area.\n *\n *  @param[in] window The window whose callback to set.\n *  @param[in] callback The new scroll callback, or `NULL` to remove the\n *  currently set callback.\n *  @return The previously set callback, or `NULL` if no callback was set or the\n *  library had not been [initialized](@ref intro_init).\n *\n *  @callback_signature\n *  @code\n *  void function_name(GLFWwindow* window, double xoffset, double yoffset)\n *  @endcode\n *  For more information about the callback parameters, see the\n *  [function pointer type](@ref GLFWscrollfun).\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED.\n *\n *  @thread_safety This function must only be called from the main thread.\n *\n *  @sa @ref scrolling\n *\n *  @since Added in version 3.0.  Replaces `glfwSetMouseWheelCallback`.\n *\n *  @ingroup input\n */\nGLFWAPI GLFWscrollfun glfwSetScrollCallback(GLFWwindow* window, GLFWscrollfun callback);\n\n/*! @brief Sets the path drop callback.\n *\n *  This function sets the path drop callback of the specified window, which is\n *  called when one or more dragged paths are dropped on the window.\n *\n *  Because the path array and its strings may have been generated specifically\n *  for that event, they are not guaranteed to be valid after the callback has\n *  returned.  If you wish to use them after the callback returns, you need to\n *  make a deep copy.\n *\n *  @param[in] window The window whose callback to set.\n *  @param[in] callback The new file drop callback, or `NULL` to remove the\n *  currently set callback.\n *  @return The previously set callback, or `NULL` if no callback was set or the\n *  library had not been [initialized](@ref intro_init).\n *\n *  @callback_signature\n *  @code\n *  void function_name(GLFWwindow* window, int path_count, const char* paths[])\n *  @endcode\n *  For more information about the callback parameters, see the\n *  [function pointer type](@ref GLFWdropfun).\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED.\n *\n *  @remark @wayland File drop is currently unimplemented.\n *\n *  @thread_safety This function must only be called from the main thread.\n *\n *  @sa @ref path_drop\n *\n *  @since Added in version 3.1.\n *\n *  @ingroup input\n */\nGLFWAPI GLFWdropfun glfwSetDropCallback(GLFWwindow* window, GLFWdropfun callback);\n\n/*! @brief Returns whether the specified joystick is present.\n *\n *  This function returns whether the specified joystick is present.\n *\n *  There is no need to call this function before other functions that accept\n *  a joystick ID, as they all check for presence before performing any other\n *  work.\n *\n *  @param[in] jid The [joystick](@ref joysticks) to query.\n *  @return `GLFW_TRUE` if the joystick is present, or `GLFW_FALSE` otherwise.\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref\n *  GLFW_INVALID_ENUM and @ref GLFW_PLATFORM_ERROR.\n *\n *  @thread_safety This function must only be called from the main thread.\n *\n *  @sa @ref joystick\n *\n *  @since Added in version 3.0.  Replaces `glfwGetJoystickParam`.\n *\n *  @ingroup input\n */\nGLFWAPI int glfwJoystickPresent(int jid);\n\n/*! @brief Returns the values of all axes of the specified joystick.\n *\n *  This function returns the values of all axes of the specified joystick.\n *  Each element in the array is a value between -1.0 and 1.0.\n *\n *  If the specified joystick is not present this function will return `NULL`\n *  but will not generate an error.  This can be used instead of first calling\n *  @ref glfwJoystickPresent.\n *\n *  @param[in] jid The [joystick](@ref joysticks) to query.\n *  @param[out] count Where to store the number of axis values in the returned\n *  array.  This is set to zero if the joystick is not present or an error\n *  occurred.\n *  @return An array of axis values, or `NULL` if the joystick is not present or\n *  an [error](@ref error_handling) occurred.\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref\n *  GLFW_INVALID_ENUM and @ref GLFW_PLATFORM_ERROR.\n *\n *  @pointer_lifetime The returned array is allocated and freed by GLFW.  You\n *  should not free it yourself.  It is valid until the specified joystick is\n *  disconnected or the library is terminated.\n *\n *  @thread_safety This function must only be called from the main thread.\n *\n *  @sa @ref joystick_axis\n *\n *  @since Added in version 3.0.  Replaces `glfwGetJoystickPos`.\n *\n *  @ingroup input\n */\nGLFWAPI const float* glfwGetJoystickAxes(int jid, int* count);\n\n/*! @brief Returns the state of all buttons of the specified joystick.\n *\n *  This function returns the state of all buttons of the specified joystick.\n *  Each element in the array is either `GLFW_PRESS` or `GLFW_RELEASE`.\n *\n *  For backward compatibility with earlier versions that did not have @ref\n *  glfwGetJoystickHats, the button array also includes all hats, each\n *  represented as four buttons.  The hats are in the same order as returned by\n *  __glfwGetJoystickHats__ and are in the order _up_, _right_, _down_ and\n *  _left_.  To disable these extra buttons, set the @ref\n *  GLFW_JOYSTICK_HAT_BUTTONS init hint before initialization.\n *\n *  If the specified joystick is not present this function will return `NULL`\n *  but will not generate an error.  This can be used instead of first calling\n *  @ref glfwJoystickPresent.\n *\n *  @param[in] jid The [joystick](@ref joysticks) to query.\n *  @param[out] count Where to store the number of button states in the returned\n *  array.  This is set to zero if the joystick is not present or an error\n *  occurred.\n *  @return An array of button states, or `NULL` if the joystick is not present\n *  or an [error](@ref error_handling) occurred.\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref\n *  GLFW_INVALID_ENUM and @ref GLFW_PLATFORM_ERROR.\n *\n *  @pointer_lifetime The returned array is allocated and freed by GLFW.  You\n *  should not free it yourself.  It is valid until the specified joystick is\n *  disconnected or the library is terminated.\n *\n *  @thread_safety This function must only be called from the main thread.\n *\n *  @sa @ref joystick_button\n *\n *  @since Added in version 2.2.\n *  @glfw3 Changed to return a dynamic array.\n *\n *  @ingroup input\n */\nGLFWAPI const unsigned char* glfwGetJoystickButtons(int jid, int* count);\n\n/*! @brief Returns the state of all hats of the specified joystick.\n *\n *  This function returns the state of all hats of the specified joystick.\n *  Each element in the array is one of the following values:\n *\n *  Name                  | Value\n *  ----                  | -----\n *  `GLFW_HAT_CENTERED`   | 0\n *  `GLFW_HAT_UP`         | 1\n *  `GLFW_HAT_RIGHT`      | 2\n *  `GLFW_HAT_DOWN`       | 4\n *  `GLFW_HAT_LEFT`       | 8\n *  `GLFW_HAT_RIGHT_UP`   | `GLFW_HAT_RIGHT` \\| `GLFW_HAT_UP`\n *  `GLFW_HAT_RIGHT_DOWN` | `GLFW_HAT_RIGHT` \\| `GLFW_HAT_DOWN`\n *  `GLFW_HAT_LEFT_UP`    | `GLFW_HAT_LEFT` \\| `GLFW_HAT_UP`\n *  `GLFW_HAT_LEFT_DOWN`  | `GLFW_HAT_LEFT` \\| `GLFW_HAT_DOWN`\n *\n *  The diagonal directions are bitwise combinations of the primary (up, right,\n *  down and left) directions and you can test for these individually by ANDing\n *  it with the corresponding direction.\n *\n *  @code\n *  if (hats[2] & GLFW_HAT_RIGHT)\n *  {\n *      // State of hat 2 could be right-up, right or right-down\n *  }\n *  @endcode\n *\n *  If the specified joystick is not present this function will return `NULL`\n *  but will not generate an error.  This can be used instead of first calling\n *  @ref glfwJoystickPresent.\n *\n *  @param[in] jid The [joystick](@ref joysticks) to query.\n *  @param[out] count Where to store the number of hat states in the returned\n *  array.  This is set to zero if the joystick is not present or an error\n *  occurred.\n *  @return An array of hat states, or `NULL` if the joystick is not present\n *  or an [error](@ref error_handling) occurred.\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref\n *  GLFW_INVALID_ENUM and @ref GLFW_PLATFORM_ERROR.\n *\n *  @pointer_lifetime The returned array is allocated and freed by GLFW.  You\n *  should not free it yourself.  It is valid until the specified joystick is\n *  disconnected, this function is called again for that joystick or the library\n *  is terminated.\n *\n *  @thread_safety This function must only be called from the main thread.\n *\n *  @sa @ref joystick_hat\n *\n *  @since Added in version 3.3.\n *\n *  @ingroup input\n */\nGLFWAPI const unsigned char* glfwGetJoystickHats(int jid, int* count);\n\n/*! @brief Returns the name of the specified joystick.\n *\n *  This function returns the name, encoded as UTF-8, of the specified joystick.\n *  The returned string is allocated and freed by GLFW.  You should not free it\n *  yourself.\n *\n *  If the specified joystick is not present this function will return `NULL`\n *  but will not generate an error.  This can be used instead of first calling\n *  @ref glfwJoystickPresent.\n *\n *  @param[in] jid The [joystick](@ref joysticks) to query.\n *  @return The UTF-8 encoded name of the joystick, or `NULL` if the joystick\n *  is not present or an [error](@ref error_handling) occurred.\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref\n *  GLFW_INVALID_ENUM and @ref GLFW_PLATFORM_ERROR.\n *\n *  @pointer_lifetime The returned string is allocated and freed by GLFW.  You\n *  should not free it yourself.  It is valid until the specified joystick is\n *  disconnected or the library is terminated.\n *\n *  @thread_safety This function must only be called from the main thread.\n *\n *  @sa @ref joystick_name\n *\n *  @since Added in version 3.0.\n *\n *  @ingroup input\n */\nGLFWAPI const char* glfwGetJoystickName(int jid);\n\n/*! @brief Returns the SDL compatible GUID of the specified joystick.\n *\n *  This function returns the SDL compatible GUID, as a UTF-8 encoded\n *  hexadecimal string, of the specified joystick.  The returned string is\n *  allocated and freed by GLFW.  You should not free it yourself.\n *\n *  The GUID is what connects a joystick to a gamepad mapping.  A connected\n *  joystick will always have a GUID even if there is no gamepad mapping\n *  assigned to it.\n *\n *  If the specified joystick is not present this function will return `NULL`\n *  but will not generate an error.  This can be used instead of first calling\n *  @ref glfwJoystickPresent.\n *\n *  The GUID uses the format introduced in SDL 2.0.5.  This GUID tries to\n *  uniquely identify the make and model of a joystick but does not identify\n *  a specific unit, e.g. all wired Xbox 360 controllers will have the same\n *  GUID on that platform.  The GUID for a unit may vary between platforms\n *  depending on what hardware information the platform specific APIs provide.\n *\n *  @param[in] jid The [joystick](@ref joysticks) to query.\n *  @return The UTF-8 encoded GUID of the joystick, or `NULL` if the joystick\n *  is not present or an [error](@ref error_handling) occurred.\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref\n *  GLFW_INVALID_ENUM and @ref GLFW_PLATFORM_ERROR.\n *\n *  @pointer_lifetime The returned string is allocated and freed by GLFW.  You\n *  should not free it yourself.  It is valid until the specified joystick is\n *  disconnected or the library is terminated.\n *\n *  @thread_safety This function must only be called from the main thread.\n *\n *  @sa @ref gamepad\n *\n *  @since Added in version 3.3.\n *\n *  @ingroup input\n */\nGLFWAPI const char* glfwGetJoystickGUID(int jid);\n\n/*! @brief Sets the user pointer of the specified joystick.\n *\n *  This function sets the user-defined pointer of the specified joystick.  The\n *  current value is retained until the joystick is disconnected.  The initial\n *  value is `NULL`.\n *\n *  This function may be called from the joystick callback, even for a joystick\n *  that is being disconnected.\n *\n *  @param[in] jid The joystick whose pointer to set.\n *  @param[in] pointer The new value.\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED.\n *\n *  @thread_safety This function may be called from any thread.  Access is not\n *  synchronized.\n *\n *  @sa @ref joystick_userptr\n *  @sa @ref glfwGetJoystickUserPointer\n *\n *  @since Added in version 3.3.\n *\n *  @ingroup input\n */\nGLFWAPI void glfwSetJoystickUserPointer(int jid, void* pointer);\n\n/*! @brief Returns the user pointer of the specified joystick.\n *\n *  This function returns the current value of the user-defined pointer of the\n *  specified joystick.  The initial value is `NULL`.\n *\n *  This function may be called from the joystick callback, even for a joystick\n *  that is being disconnected.\n *\n *  @param[in] jid The joystick whose pointer to return.\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED.\n *\n *  @thread_safety This function may be called from any thread.  Access is not\n *  synchronized.\n *\n *  @sa @ref joystick_userptr\n *  @sa @ref glfwSetJoystickUserPointer\n *\n *  @since Added in version 3.3.\n *\n *  @ingroup input\n */\nGLFWAPI void* glfwGetJoystickUserPointer(int jid);\n\n/*! @brief Returns whether the specified joystick has a gamepad mapping.\n *\n *  This function returns whether the specified joystick is both present and has\n *  a gamepad mapping.\n *\n *  If the specified joystick is present but does not have a gamepad mapping\n *  this function will return `GLFW_FALSE` but will not generate an error.  Call\n *  @ref glfwJoystickPresent to check if a joystick is present regardless of\n *  whether it has a mapping.\n *\n *  @param[in] jid The [joystick](@ref joysticks) to query.\n *  @return `GLFW_TRUE` if a joystick is both present and has a gamepad mapping,\n *  or `GLFW_FALSE` otherwise.\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref\n *  GLFW_INVALID_ENUM.\n *\n *  @thread_safety This function must only be called from the main thread.\n *\n *  @sa @ref gamepad\n *  @sa @ref glfwGetGamepadState\n *\n *  @since Added in version 3.3.\n *\n *  @ingroup input\n */\nGLFWAPI int glfwJoystickIsGamepad(int jid);\n\n/*! @brief Sets the joystick configuration callback.\n *\n *  This function sets the joystick configuration callback, or removes the\n *  currently set callback.  This is called when a joystick is connected to or\n *  disconnected from the system.\n *\n *  For joystick connection and disconnection events to be delivered on all\n *  platforms, you need to call one of the [event processing](@ref events)\n *  functions.  Joystick disconnection may also be detected and the callback\n *  called by joystick functions.  The function will then return whatever it\n *  returns if the joystick is not present.\n *\n *  @param[in] callback The new callback, or `NULL` to remove the currently set\n *  callback.\n *  @return The previously set callback, or `NULL` if no callback was set or the\n *  library had not been [initialized](@ref intro_init).\n *\n *  @callback_signature\n *  @code\n *  void function_name(int jid, int event)\n *  @endcode\n *  For more information about the callback parameters, see the\n *  [function pointer type](@ref GLFWjoystickfun).\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED.\n *\n *  @thread_safety This function must only be called from the main thread.\n *\n *  @sa @ref joystick_event\n *\n *  @since Added in version 3.2.\n *\n *  @ingroup input\n */\nGLFWAPI GLFWjoystickfun glfwSetJoystickCallback(GLFWjoystickfun callback);\n\n/*! @brief Adds the specified SDL_GameControllerDB gamepad mappings.\n *\n *  This function parses the specified ASCII encoded string and updates the\n *  internal list with any gamepad mappings it finds.  This string may\n *  contain either a single gamepad mapping or many mappings separated by\n *  newlines.  The parser supports the full format of the `gamecontrollerdb.txt`\n *  source file including empty lines and comments.\n *\n *  See @ref gamepad_mapping for a description of the format.\n *\n *  If there is already a gamepad mapping for a given GUID in the internal list,\n *  it will be replaced by the one passed to this function.  If the library is\n *  terminated and re-initialized the internal list will revert to the built-in\n *  default.\n *\n *  @param[in] string The string containing the gamepad mappings.\n *  @return `GLFW_TRUE` if successful, or `GLFW_FALSE` if an\n *  [error](@ref error_handling) occurred.\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref\n *  GLFW_INVALID_VALUE.\n *\n *  @thread_safety This function must only be called from the main thread.\n *\n *  @sa @ref gamepad\n *  @sa @ref glfwJoystickIsGamepad\n *  @sa @ref glfwGetGamepadName\n *\n *  @since Added in version 3.3.\n *\n *  @ingroup input\n */\nGLFWAPI int glfwUpdateGamepadMappings(const char* string);\n\n/*! @brief Returns the human-readable gamepad name for the specified joystick.\n *\n *  This function returns the human-readable name of the gamepad from the\n *  gamepad mapping assigned to the specified joystick.\n *\n *  If the specified joystick is not present or does not have a gamepad mapping\n *  this function will return `NULL` but will not generate an error.  Call\n *  @ref glfwJoystickPresent to check whether it is present regardless of\n *  whether it has a mapping.\n *\n *  @param[in] jid The [joystick](@ref joysticks) to query.\n *  @return The UTF-8 encoded name of the gamepad, or `NULL` if the\n *  joystick is not present, does not have a mapping or an\n *  [error](@ref error_handling) occurred.\n *\n *  @pointer_lifetime The returned string is allocated and freed by GLFW.  You\n *  should not free it yourself.  It is valid until the specified joystick is\n *  disconnected, the gamepad mappings are updated or the library is terminated.\n *\n *  @thread_safety This function must only be called from the main thread.\n *\n *  @sa @ref gamepad\n *  @sa @ref glfwJoystickIsGamepad\n *\n *  @since Added in version 3.3.\n *\n *  @ingroup input\n */\nGLFWAPI const char* glfwGetGamepadName(int jid);\n\n/*! @brief Retrieves the state of the specified joystick remapped as a gamepad.\n *\n *  This function retrieves the state of the specified joystick remapped to\n *  an Xbox-like gamepad.\n *\n *  If the specified joystick is not present or does not have a gamepad mapping\n *  this function will return `GLFW_FALSE` but will not generate an error.  Call\n *  @ref glfwJoystickPresent to check whether it is present regardless of\n *  whether it has a mapping.\n *\n *  The Guide button may not be available for input as it is often hooked by the\n *  system or the Steam client.\n *\n *  Not all devices have all the buttons or axes provided by @ref\n *  GLFWgamepadstate.  Unavailable buttons and axes will always report\n *  `GLFW_RELEASE` and 0.0 respectively.\n *\n *  @param[in] jid The [joystick](@ref joysticks) to query.\n *  @param[out] state The gamepad input state of the joystick.\n *  @return `GLFW_TRUE` if successful, or `GLFW_FALSE` if no joystick is\n *  connected, it has no gamepad mapping or an [error](@ref error_handling)\n *  occurred.\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref\n *  GLFW_INVALID_ENUM.\n *\n *  @thread_safety This function must only be called from the main thread.\n *\n *  @sa @ref gamepad\n *  @sa @ref glfwUpdateGamepadMappings\n *  @sa @ref glfwJoystickIsGamepad\n *\n *  @since Added in version 3.3.\n *\n *  @ingroup input\n */\nGLFWAPI int glfwGetGamepadState(int jid, GLFWgamepadstate* state);\n\n/*! @brief Sets the clipboard to the specified string.\n *\n *  This function sets the system clipboard to the specified, UTF-8 encoded\n *  string.\n *\n *  @param[in] window Deprecated.  Any valid window or `NULL`.\n *  @param[in] string A UTF-8 encoded string.\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref\n *  GLFW_PLATFORM_ERROR.\n *\n *  @pointer_lifetime The specified string is copied before this function\n *  returns.\n *\n *  @thread_safety This function must only be called from the main thread.\n *\n *  @sa @ref clipboard\n *  @sa @ref glfwGetClipboardString\n *\n *  @since Added in version 3.0.\n *\n *  @ingroup input\n */\nGLFWAPI void glfwSetClipboardString(GLFWwindow* window, const char* string);\n\n/*! @brief Returns the contents of the clipboard as a string.\n *\n *  This function returns the contents of the system clipboard, if it contains\n *  or is convertible to a UTF-8 encoded string.  If the clipboard is empty or\n *  if its contents cannot be converted, `NULL` is returned and a @ref\n *  GLFW_FORMAT_UNAVAILABLE error is generated.\n *\n *  @param[in] window Deprecated.  Any valid window or `NULL`.\n *  @return The contents of the clipboard as a UTF-8 encoded string, or `NULL`\n *  if an [error](@ref error_handling) occurred.\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref\n *  GLFW_PLATFORM_ERROR.\n *\n *  @pointer_lifetime The returned string is allocated and freed by GLFW.  You\n *  should not free it yourself.  It is valid until the next call to @ref\n *  glfwGetClipboardString or @ref glfwSetClipboardString, or until the library\n *  is terminated.\n *\n *  @thread_safety This function must only be called from the main thread.\n *\n *  @sa @ref clipboard\n *  @sa @ref glfwSetClipboardString\n *\n *  @since Added in version 3.0.\n *\n *  @ingroup input\n */\nGLFWAPI const char* glfwGetClipboardString(GLFWwindow* window);\n\n/*! @brief Returns the GLFW time.\n *\n *  This function returns the current GLFW time, in seconds.  Unless the time\n *  has been set using @ref glfwSetTime it measures time elapsed since GLFW was\n *  initialized.\n *\n *  This function and @ref glfwSetTime are helper functions on top of @ref\n *  glfwGetTimerFrequency and @ref glfwGetTimerValue.\n *\n *  The resolution of the timer is system dependent, but is usually on the order\n *  of a few micro- or nanoseconds.  It uses the highest-resolution monotonic\n *  time source on each supported platform.\n *\n *  @return The current time, in seconds, or zero if an\n *  [error](@ref error_handling) occurred.\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED.\n *\n *  @thread_safety This function may be called from any thread.  Reading and\n *  writing of the internal base time is not atomic, so it needs to be\n *  externally synchronized with calls to @ref glfwSetTime.\n *\n *  @sa @ref time\n *\n *  @since Added in version 1.0.\n *\n *  @ingroup input\n */\nGLFWAPI double glfwGetTime(void);\n\n/*! @brief Sets the GLFW time.\n *\n *  This function sets the current GLFW time, in seconds.  The value must be\n *  a positive finite number less than or equal to 18446744073.0, which is\n *  approximately 584.5 years.\n *\n *  This function and @ref glfwGetTime are helper functions on top of @ref\n *  glfwGetTimerFrequency and @ref glfwGetTimerValue.\n *\n *  @param[in] time The new value, in seconds.\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref\n *  GLFW_INVALID_VALUE.\n *\n *  @remark The upper limit of GLFW time is calculated as\n *  floor((2<sup>64</sup> - 1) / 10<sup>9</sup>) and is due to implementations\n *  storing nanoseconds in 64 bits.  The limit may be increased in the future.\n *\n *  @thread_safety This function may be called from any thread.  Reading and\n *  writing of the internal base time is not atomic, so it needs to be\n *  externally synchronized with calls to @ref glfwGetTime.\n *\n *  @sa @ref time\n *\n *  @since Added in version 2.2.\n *\n *  @ingroup input\n */\nGLFWAPI void glfwSetTime(double time);\n\n/*! @brief Returns the current value of the raw timer.\n *\n *  This function returns the current value of the raw timer, measured in\n *  1&nbsp;/&nbsp;frequency seconds.  To get the frequency, call @ref\n *  glfwGetTimerFrequency.\n *\n *  @return The value of the timer, or zero if an\n *  [error](@ref error_handling) occurred.\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED.\n *\n *  @thread_safety This function may be called from any thread.\n *\n *  @sa @ref time\n *  @sa @ref glfwGetTimerFrequency\n *\n *  @since Added in version 3.2.\n *\n *  @ingroup input\n */\nGLFWAPI uint64_t glfwGetTimerValue(void);\n\n/*! @brief Returns the frequency, in Hz, of the raw timer.\n *\n *  This function returns the frequency, in Hz, of the raw timer.\n *\n *  @return The frequency of the timer, in Hz, or zero if an\n *  [error](@ref error_handling) occurred.\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED.\n *\n *  @thread_safety This function may be called from any thread.\n *\n *  @sa @ref time\n *  @sa @ref glfwGetTimerValue\n *\n *  @since Added in version 3.2.\n *\n *  @ingroup input\n */\nGLFWAPI uint64_t glfwGetTimerFrequency(void);\n\n/*! @brief Makes the context of the specified window current for the calling\n *  thread.\n *\n *  This function makes the OpenGL or OpenGL ES context of the specified window\n *  current on the calling thread.  A context must only be made current on\n *  a single thread at a time and each thread can have only a single current\n *  context at a time.\n *\n *  When moving a context between threads, you must make it non-current on the\n *  old thread before making it current on the new one.\n *\n *  By default, making a context non-current implicitly forces a pipeline flush.\n *  On machines that support `GL_KHR_context_flush_control`, you can control\n *  whether a context performs this flush by setting the\n *  [GLFW_CONTEXT_RELEASE_BEHAVIOR](@ref GLFW_CONTEXT_RELEASE_BEHAVIOR_hint)\n *  hint.\n *\n *  The specified window must have an OpenGL or OpenGL ES context.  Specifying\n *  a window without a context will generate a @ref GLFW_NO_WINDOW_CONTEXT\n *  error.\n *\n *  @param[in] window The window whose context to make current, or `NULL` to\n *  detach the current context.\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref\n *  GLFW_NO_WINDOW_CONTEXT and @ref GLFW_PLATFORM_ERROR.\n *\n *  @thread_safety This function may be called from any thread.\n *\n *  @sa @ref context_current\n *  @sa @ref glfwGetCurrentContext\n *\n *  @since Added in version 3.0.\n *\n *  @ingroup context\n */\nGLFWAPI void glfwMakeContextCurrent(GLFWwindow* window);\n\n/*! @brief Returns the window whose context is current on the calling thread.\n *\n *  This function returns the window whose OpenGL or OpenGL ES context is\n *  current on the calling thread.\n *\n *  @return The window whose context is current, or `NULL` if no window's\n *  context is current.\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED.\n *\n *  @thread_safety This function may be called from any thread.\n *\n *  @sa @ref context_current\n *  @sa @ref glfwMakeContextCurrent\n *\n *  @since Added in version 3.0.\n *\n *  @ingroup context\n */\nGLFWAPI GLFWwindow* glfwGetCurrentContext(void);\n\n/*! @brief Swaps the front and back buffers of the specified window.\n *\n *  This function swaps the front and back buffers of the specified window when\n *  rendering with OpenGL or OpenGL ES.  If the swap interval is greater than\n *  zero, the GPU driver waits the specified number of screen updates before\n *  swapping the buffers.\n *\n *  The specified window must have an OpenGL or OpenGL ES context.  Specifying\n *  a window without a context will generate a @ref GLFW_NO_WINDOW_CONTEXT\n *  error.\n *\n *  This function does not apply to Vulkan.  If you are rendering with Vulkan,\n *  see `vkQueuePresentKHR` instead.\n *\n *  @param[in] window The window whose buffers to swap.\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref\n *  GLFW_NO_WINDOW_CONTEXT and @ref GLFW_PLATFORM_ERROR.\n *\n *  @remark __EGL:__ The context of the specified window must be current on the\n *  calling thread.\n *\n *  @thread_safety This function may be called from any thread.\n *\n *  @sa @ref buffer_swap\n *  @sa @ref glfwSwapInterval\n *\n *  @since Added in version 1.0.\n *  @glfw3 Added window handle parameter.\n *\n *  @ingroup window\n */\nGLFWAPI void glfwSwapBuffers(GLFWwindow* window);\n\n/*! @brief Sets the swap interval for the current context.\n *\n *  This function sets the swap interval for the current OpenGL or OpenGL ES\n *  context, i.e. the number of screen updates to wait from the time @ref\n *  glfwSwapBuffers was called before swapping the buffers and returning.  This\n *  is sometimes called _vertical synchronization_, _vertical retrace\n *  synchronization_ or just _vsync_.\n *\n *  A context that supports either of the `WGL_EXT_swap_control_tear` and\n *  `GLX_EXT_swap_control_tear` extensions also accepts _negative_ swap\n *  intervals, which allows the driver to swap immediately even if a frame\n *  arrives a little bit late.  You can check for these extensions with @ref\n *  glfwExtensionSupported.\n *\n *  A context must be current on the calling thread.  Calling this function\n *  without a current context will cause a @ref GLFW_NO_CURRENT_CONTEXT error.\n *\n *  This function does not apply to Vulkan.  If you are rendering with Vulkan,\n *  see the present mode of your swapchain instead.\n *\n *  @param[in] interval The minimum number of screen updates to wait for\n *  until the buffers are swapped by @ref glfwSwapBuffers.\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref\n *  GLFW_NO_CURRENT_CONTEXT and @ref GLFW_PLATFORM_ERROR.\n *\n *  @remark This function is not called during context creation, leaving the\n *  swap interval set to whatever is the default on that platform.  This is done\n *  because some swap interval extensions used by GLFW do not allow the swap\n *  interval to be reset to zero once it has been set to a non-zero value.\n *\n *  @remark Some GPU drivers do not honor the requested swap interval, either\n *  because of a user setting that overrides the application's request or due to\n *  bugs in the driver.\n *\n *  @thread_safety This function may be called from any thread.\n *\n *  @sa @ref buffer_swap\n *  @sa @ref glfwSwapBuffers\n *\n *  @since Added in version 1.0.\n *\n *  @ingroup context\n */\nGLFWAPI void glfwSwapInterval(int interval);\n\n/*! @brief Returns whether the specified extension is available.\n *\n *  This function returns whether the specified\n *  [API extension](@ref context_glext) is supported by the current OpenGL or\n *  OpenGL ES context.  It searches both for client API extension and context\n *  creation API extensions.\n *\n *  A context must be current on the calling thread.  Calling this function\n *  without a current context will cause a @ref GLFW_NO_CURRENT_CONTEXT error.\n *\n *  As this functions retrieves and searches one or more extension strings each\n *  call, it is recommended that you cache its results if it is going to be used\n *  frequently.  The extension strings will not change during the lifetime of\n *  a context, so there is no danger in doing this.\n *\n *  This function does not apply to Vulkan.  If you are using Vulkan, see @ref\n *  glfwGetRequiredInstanceExtensions, `vkEnumerateInstanceExtensionProperties`\n *  and `vkEnumerateDeviceExtensionProperties` instead.\n *\n *  @param[in] extension The ASCII encoded name of the extension.\n *  @return `GLFW_TRUE` if the extension is available, or `GLFW_FALSE`\n *  otherwise.\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref\n *  GLFW_NO_CURRENT_CONTEXT, @ref GLFW_INVALID_VALUE and @ref\n *  GLFW_PLATFORM_ERROR.\n *\n *  @thread_safety This function may be called from any thread.\n *\n *  @sa @ref context_glext\n *  @sa @ref glfwGetProcAddress\n *\n *  @since Added in version 1.0.\n *\n *  @ingroup context\n */\nGLFWAPI int glfwExtensionSupported(const char* extension);\n\n/*! @brief Returns the address of the specified function for the current\n *  context.\n *\n *  This function returns the address of the specified OpenGL or OpenGL ES\n *  [core or extension function](@ref context_glext), if it is supported\n *  by the current context.\n *\n *  A context must be current on the calling thread.  Calling this function\n *  without a current context will cause a @ref GLFW_NO_CURRENT_CONTEXT error.\n *\n *  This function does not apply to Vulkan.  If you are rendering with Vulkan,\n *  see @ref glfwGetInstanceProcAddress, `vkGetInstanceProcAddr` and\n *  `vkGetDeviceProcAddr` instead.\n *\n *  @param[in] procname The ASCII encoded name of the function.\n *  @return The address of the function, or `NULL` if an\n *  [error](@ref error_handling) occurred.\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref\n *  GLFW_NO_CURRENT_CONTEXT and @ref GLFW_PLATFORM_ERROR.\n *\n *  @remark The address of a given function is not guaranteed to be the same\n *  between contexts.\n *\n *  @remark This function may return a non-`NULL` address despite the\n *  associated version or extension not being available.  Always check the\n *  context version or extension string first.\n *\n *  @pointer_lifetime The returned function pointer is valid until the context\n *  is destroyed or the library is terminated.\n *\n *  @thread_safety This function may be called from any thread.\n *\n *  @sa @ref context_glext\n *  @sa @ref glfwExtensionSupported\n *\n *  @since Added in version 1.0.\n *\n *  @ingroup context\n */\nGLFWAPI GLFWglproc glfwGetProcAddress(const char* procname);\n\n/*! @brief Returns whether the Vulkan loader and an ICD have been found.\n *\n *  This function returns whether the Vulkan loader and any minimally functional\n *  ICD have been found.\n *\n *  The availability of a Vulkan loader and even an ICD does not by itself\n *  guarantee that surface creation or even instance creation is possible.\n *  For example, on Fermi systems Nvidia will install an ICD that provides no\n *  actual Vulkan support.  Call @ref glfwGetRequiredInstanceExtensions to check\n *  whether the extensions necessary for Vulkan surface creation are available\n *  and @ref glfwGetPhysicalDevicePresentationSupport to check whether a queue\n *  family of a physical device supports image presentation.\n *\n *  @return `GLFW_TRUE` if Vulkan is minimally available, or `GLFW_FALSE`\n *  otherwise.\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED.\n *\n *  @thread_safety This function may be called from any thread.\n *\n *  @sa @ref vulkan_support\n *\n *  @since Added in version 3.2.\n *\n *  @ingroup vulkan\n */\nGLFWAPI int glfwVulkanSupported(void);\n\n/*! @brief Returns the Vulkan instance extensions required by GLFW.\n *\n *  This function returns an array of names of Vulkan instance extensions required\n *  by GLFW for creating Vulkan surfaces for GLFW windows.  If successful, the\n *  list will always contain `VK_KHR_surface`, so if you don't require any\n *  additional extensions you can pass this list directly to the\n *  `VkInstanceCreateInfo` struct.\n *\n *  If Vulkan is not available on the machine, this function returns `NULL` and\n *  generates a @ref GLFW_API_UNAVAILABLE error.  Call @ref glfwVulkanSupported\n *  to check whether Vulkan is at least minimally available.\n *\n *  If Vulkan is available but no set of extensions allowing window surface\n *  creation was found, this function returns `NULL`.  You may still use Vulkan\n *  for off-screen rendering and compute work.\n *\n *  @param[out] count Where to store the number of extensions in the returned\n *  array.  This is set to zero if an error occurred.\n *  @return An array of ASCII encoded extension names, or `NULL` if an\n *  [error](@ref error_handling) occurred.\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref\n *  GLFW_API_UNAVAILABLE.\n *\n *  @remark Additional extensions may be required by future versions of GLFW.\n *  You should check if any extensions you wish to enable are already in the\n *  returned array, as it is an error to specify an extension more than once in\n *  the `VkInstanceCreateInfo` struct.\n *\n *  @remark @macos This function currently supports either the\n *  `VK_MVK_macos_surface` extension from MoltenVK or `VK_EXT_metal_surface`\n *  extension.\n *\n *  @pointer_lifetime The returned array is allocated and freed by GLFW.  You\n *  should not free it yourself.  It is guaranteed to be valid only until the\n *  library is terminated.\n *\n *  @thread_safety This function may be called from any thread.\n *\n *  @sa @ref vulkan_ext\n *  @sa @ref glfwCreateWindowSurface\n *\n *  @since Added in version 3.2.\n *\n *  @ingroup vulkan\n */\nGLFWAPI const char** glfwGetRequiredInstanceExtensions(uint32_t* count);\n\n#if defined(VK_VERSION_1_0)\n\n/*! @brief Returns the address of the specified Vulkan instance function.\n *\n *  This function returns the address of the specified Vulkan core or extension\n *  function for the specified instance.  If instance is set to `NULL` it can\n *  return any function exported from the Vulkan loader, including at least the\n *  following functions:\n *\n *  - `vkEnumerateInstanceExtensionProperties`\n *  - `vkEnumerateInstanceLayerProperties`\n *  - `vkCreateInstance`\n *  - `vkGetInstanceProcAddr`\n *\n *  If Vulkan is not available on the machine, this function returns `NULL` and\n *  generates a @ref GLFW_API_UNAVAILABLE error.  Call @ref glfwVulkanSupported\n *  to check whether Vulkan is at least minimally available.\n *\n *  This function is equivalent to calling `vkGetInstanceProcAddr` with\n *  a platform-specific query of the Vulkan loader as a fallback.\n *\n *  @param[in] instance The Vulkan instance to query, or `NULL` to retrieve\n *  functions related to instance creation.\n *  @param[in] procname The ASCII encoded name of the function.\n *  @return The address of the function, or `NULL` if an\n *  [error](@ref error_handling) occurred.\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref\n *  GLFW_API_UNAVAILABLE.\n *\n *  @pointer_lifetime The returned function pointer is valid until the library\n *  is terminated.\n *\n *  @thread_safety This function may be called from any thread.\n *\n *  @sa @ref vulkan_proc\n *\n *  @since Added in version 3.2.\n *\n *  @ingroup vulkan\n */\nGLFWAPI GLFWvkproc glfwGetInstanceProcAddress(VkInstance instance, const char* procname);\n\n/*! @brief Returns whether the specified queue family can present images.\n *\n *  This function returns whether the specified queue family of the specified\n *  physical device supports presentation to the platform GLFW was built for.\n *\n *  If Vulkan or the required window surface creation instance extensions are\n *  not available on the machine, or if the specified instance was not created\n *  with the required extensions, this function returns `GLFW_FALSE` and\n *  generates a @ref GLFW_API_UNAVAILABLE error.  Call @ref glfwVulkanSupported\n *  to check whether Vulkan is at least minimally available and @ref\n *  glfwGetRequiredInstanceExtensions to check what instance extensions are\n *  required.\n *\n *  @param[in] instance The instance that the physical device belongs to.\n *  @param[in] device The physical device that the queue family belongs to.\n *  @param[in] queuefamily The index of the queue family to query.\n *  @return `GLFW_TRUE` if the queue family supports presentation, or\n *  `GLFW_FALSE` otherwise.\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref\n *  GLFW_API_UNAVAILABLE and @ref GLFW_PLATFORM_ERROR.\n *\n *  @remark @macos This function currently always returns `GLFW_TRUE`, as the\n *  `VK_MVK_macos_surface` extension does not provide\n *  a `vkGetPhysicalDevice*PresentationSupport` type function.\n *\n *  @thread_safety This function may be called from any thread.  For\n *  synchronization details of Vulkan objects, see the Vulkan specification.\n *\n *  @sa @ref vulkan_present\n *\n *  @since Added in version 3.2.\n *\n *  @ingroup vulkan\n */\nGLFWAPI int glfwGetPhysicalDevicePresentationSupport(VkInstance instance, VkPhysicalDevice device, uint32_t queuefamily);\n\n/*! @brief Creates a Vulkan surface for the specified window.\n *\n *  This function creates a Vulkan surface for the specified window.\n *\n *  If the Vulkan loader or at least one minimally functional ICD were not found,\n *  this function returns `VK_ERROR_INITIALIZATION_FAILED` and generates a @ref\n *  GLFW_API_UNAVAILABLE error.  Call @ref glfwVulkanSupported to check whether\n *  Vulkan is at least minimally available.\n *\n *  If the required window surface creation instance extensions are not\n *  available or if the specified instance was not created with these extensions\n *  enabled, this function returns `VK_ERROR_EXTENSION_NOT_PRESENT` and\n *  generates a @ref GLFW_API_UNAVAILABLE error.  Call @ref\n *  glfwGetRequiredInstanceExtensions to check what instance extensions are\n *  required.\n *\n *  The window surface cannot be shared with another API so the window must\n *  have been created with the [client api hint](@ref GLFW_CLIENT_API_attrib)\n *  set to `GLFW_NO_API` otherwise it generates a @ref GLFW_INVALID_VALUE error\n *  and returns `VK_ERROR_NATIVE_WINDOW_IN_USE_KHR`.\n *\n *  The window surface must be destroyed before the specified Vulkan instance.\n *  It is the responsibility of the caller to destroy the window surface.  GLFW\n *  does not destroy it for you.  Call `vkDestroySurfaceKHR` to destroy the\n *  surface.\n *\n *  @param[in] instance The Vulkan instance to create the surface in.\n *  @param[in] window The window to create the surface for.\n *  @param[in] allocator The allocator to use, or `NULL` to use the default\n *  allocator.\n *  @param[out] surface Where to store the handle of the surface.  This is set\n *  to `VK_NULL_HANDLE` if an error occurred.\n *  @return `VK_SUCCESS` if successful, or a Vulkan error code if an\n *  [error](@ref error_handling) occurred.\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref\n *  GLFW_API_UNAVAILABLE, @ref GLFW_PLATFORM_ERROR and @ref GLFW_INVALID_VALUE\n *\n *  @remark If an error occurs before the creation call is made, GLFW returns\n *  the Vulkan error code most appropriate for the error.  Appropriate use of\n *  @ref glfwVulkanSupported and @ref glfwGetRequiredInstanceExtensions should\n *  eliminate almost all occurrences of these errors.\n *\n *  @remark @macos This function currently only supports the\n *  `VK_MVK_macos_surface` extension from MoltenVK.\n *\n *  @remark @macos This function creates and sets a `CAMetalLayer` instance for\n *  the window content view, which is required for MoltenVK to function.\n *\n *  @thread_safety This function may be called from any thread.  For\n *  synchronization details of Vulkan objects, see the Vulkan specification.\n *\n *  @sa @ref vulkan_surface\n *  @sa @ref glfwGetRequiredInstanceExtensions\n *\n *  @since Added in version 3.2.\n *\n *  @ingroup vulkan\n */\nGLFWAPI VkResult glfwCreateWindowSurface(VkInstance instance, GLFWwindow* window, const VkAllocationCallbacks* allocator, VkSurfaceKHR* surface);\n\n#endif /*VK_VERSION_1_0*/\n\n\n/*************************************************************************\n * Global definition cleanup\n *************************************************************************/\n\n/* ------------------- BEGIN SYSTEM/COMPILER SPECIFIC -------------------- */\n\n#ifdef GLFW_WINGDIAPI_DEFINED\n #undef WINGDIAPI\n #undef GLFW_WINGDIAPI_DEFINED\n#endif\n\n#ifdef GLFW_CALLBACK_DEFINED\n #undef CALLBACK\n #undef GLFW_CALLBACK_DEFINED\n#endif\n\n/* Some OpenGL related headers need GLAPIENTRY, but it is unconditionally\n * defined by some gl.h variants (OpenBSD) so define it after if needed.\n */\n#ifndef GLAPIENTRY\n #define GLAPIENTRY APIENTRY\n#endif\n\n/* -------------------- END SYSTEM/COMPILER SPECIFIC --------------------- */\n\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif /* _glfw3_h_ */\n\n"
  },
  {
    "path": "thirdparty/glfw/include/GLFW/glfw3native.h",
    "content": "/*************************************************************************\n * GLFW 3.3 - www.glfw.org\n * A library for OpenGL, window and input\n *------------------------------------------------------------------------\n * Copyright (c) 2002-2006 Marcus Geelnard\n * Copyright (c) 2006-2018 Camilla Löwy <elmindreda@glfw.org>\n *\n * This software is provided 'as-is', without any express or implied\n * warranty. In no event will the authors be held liable for any damages\n * arising from the use of this software.\n *\n * Permission is granted to anyone to use this software for any purpose,\n * including commercial applications, and to alter it and redistribute it\n * freely, subject to the following restrictions:\n *\n * 1. The origin of this software must not be misrepresented; you must not\n *    claim that you wrote the original software. If you use this software\n *    in a product, an acknowledgment in the product documentation would\n *    be appreciated but is not required.\n *\n * 2. Altered source versions must be plainly marked as such, and must not\n *    be misrepresented as being the original software.\n *\n * 3. This notice may not be removed or altered from any source\n *    distribution.\n *\n *************************************************************************/\n\n#ifndef _glfw3_native_h_\n#define _glfw3_native_h_\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n\n/*************************************************************************\n * Doxygen documentation\n *************************************************************************/\n\n/*! @file glfw3native.h\n *  @brief The header of the native access functions.\n *\n *  This is the header file of the native access functions.  See @ref native for\n *  more information.\n */\n/*! @defgroup native Native access\n *  @brief Functions related to accessing native handles.\n *\n *  **By using the native access functions you assert that you know what you're\n *  doing and how to fix problems caused by using them.  If you don't, you\n *  shouldn't be using them.**\n *\n *  Before the inclusion of @ref glfw3native.h, you may define zero or more\n *  window system API macro and zero or more context creation API macros.\n *\n *  The chosen backends must match those the library was compiled for.  Failure\n *  to do this will cause a link-time error.\n *\n *  The available window API macros are:\n *  * `GLFW_EXPOSE_NATIVE_WIN32`\n *  * `GLFW_EXPOSE_NATIVE_COCOA`\n *  * `GLFW_EXPOSE_NATIVE_X11`\n *  * `GLFW_EXPOSE_NATIVE_WAYLAND`\n *\n *  The available context API macros are:\n *  * `GLFW_EXPOSE_NATIVE_WGL`\n *  * `GLFW_EXPOSE_NATIVE_NSGL`\n *  * `GLFW_EXPOSE_NATIVE_GLX`\n *  * `GLFW_EXPOSE_NATIVE_EGL`\n *  * `GLFW_EXPOSE_NATIVE_OSMESA`\n *\n *  These macros select which of the native access functions that are declared\n *  and which platform-specific headers to include.  It is then up your (by\n *  definition platform-specific) code to handle which of these should be\n *  defined.\n */\n\n\n/*************************************************************************\n * System headers and types\n *************************************************************************/\n\n#if defined(GLFW_EXPOSE_NATIVE_WIN32) || defined(GLFW_EXPOSE_NATIVE_WGL)\n // This is a workaround for the fact that glfw3.h needs to export APIENTRY (for\n // example to allow applications to correctly declare a GL_ARB_debug_output\n // callback) but windows.h assumes no one will define APIENTRY before it does\n #if defined(GLFW_APIENTRY_DEFINED)\n  #undef APIENTRY\n  #undef GLFW_APIENTRY_DEFINED\n #endif\n #include <windows.h>\n#elif defined(GLFW_EXPOSE_NATIVE_COCOA) || defined(GLFW_EXPOSE_NATIVE_NSGL)\n #if defined(__OBJC__)\n  #import <Cocoa/Cocoa.h>\n #else\n  #include <ApplicationServices/ApplicationServices.h>\n  typedef void* id;\n #endif\n#elif defined(GLFW_EXPOSE_NATIVE_X11) || defined(GLFW_EXPOSE_NATIVE_GLX)\n #include <X11/Xlib.h>\n #include <X11/extensions/Xrandr.h>\n#elif defined(GLFW_EXPOSE_NATIVE_WAYLAND)\n #include <wayland-client.h>\n#endif\n\n#if defined(GLFW_EXPOSE_NATIVE_WGL)\n /* WGL is declared by windows.h */\n#endif\n#if defined(GLFW_EXPOSE_NATIVE_NSGL)\n /* NSGL is declared by Cocoa.h */\n#endif\n#if defined(GLFW_EXPOSE_NATIVE_GLX)\n #include <GL/glx.h>\n#endif\n#if defined(GLFW_EXPOSE_NATIVE_EGL)\n #include <EGL/egl.h>\n#endif\n#if defined(GLFW_EXPOSE_NATIVE_OSMESA)\n #include <GL/osmesa.h>\n#endif\n\n\n/*************************************************************************\n * Functions\n *************************************************************************/\n\n#if defined(GLFW_EXPOSE_NATIVE_WIN32)\n/*! @brief Returns the adapter device name of the specified monitor.\n *\n *  @return The UTF-8 encoded adapter device name (for example `\\\\.\\DISPLAY1`)\n *  of the specified monitor, or `NULL` if an [error](@ref error_handling)\n *  occurred.\n *\n *  @thread_safety This function may be called from any thread.  Access is not\n *  synchronized.\n *\n *  @since Added in version 3.1.\n *\n *  @ingroup native\n */\nGLFWAPI const char* glfwGetWin32Adapter(GLFWmonitor* monitor);\n\n/*! @brief Returns the display device name of the specified monitor.\n *\n *  @return The UTF-8 encoded display device name (for example\n *  `\\\\.\\DISPLAY1\\Monitor0`) of the specified monitor, or `NULL` if an\n *  [error](@ref error_handling) occurred.\n *\n *  @thread_safety This function may be called from any thread.  Access is not\n *  synchronized.\n *\n *  @since Added in version 3.1.\n *\n *  @ingroup native\n */\nGLFWAPI const char* glfwGetWin32Monitor(GLFWmonitor* monitor);\n\n/*! @brief Returns the `HWND` of the specified window.\n *\n *  @return The `HWND` of the specified window, or `NULL` if an\n *  [error](@ref error_handling) occurred.\n *\n *  @thread_safety This function may be called from any thread.  Access is not\n *  synchronized.\n *\n *  @since Added in version 3.0.\n *\n *  @ingroup native\n */\nGLFWAPI HWND glfwGetWin32Window(GLFWwindow* window);\n#endif\n\n#if defined(GLFW_EXPOSE_NATIVE_WGL)\n/*! @brief Returns the `HGLRC` of the specified window.\n *\n *  @return The `HGLRC` of the specified window, or `NULL` if an\n *  [error](@ref error_handling) occurred.\n *\n *  @thread_safety This function may be called from any thread.  Access is not\n *  synchronized.\n *\n *  @since Added in version 3.0.\n *\n *  @ingroup native\n */\nGLFWAPI HGLRC glfwGetWGLContext(GLFWwindow* window);\n#endif\n\n#if defined(GLFW_EXPOSE_NATIVE_COCOA)\n/*! @brief Returns the `CGDirectDisplayID` of the specified monitor.\n *\n *  @return The `CGDirectDisplayID` of the specified monitor, or\n *  `kCGNullDirectDisplay` if an [error](@ref error_handling) occurred.\n *\n *  @thread_safety This function may be called from any thread.  Access is not\n *  synchronized.\n *\n *  @since Added in version 3.1.\n *\n *  @ingroup native\n */\nGLFWAPI CGDirectDisplayID glfwGetCocoaMonitor(GLFWmonitor* monitor);\n\n/*! @brief Returns the `NSWindow` of the specified window.\n *\n *  @return The `NSWindow` of the specified window, or `nil` if an\n *  [error](@ref error_handling) occurred.\n *\n *  @thread_safety This function may be called from any thread.  Access is not\n *  synchronized.\n *\n *  @since Added in version 3.0.\n *\n *  @ingroup native\n */\nGLFWAPI id glfwGetCocoaWindow(GLFWwindow* window);\n#endif\n\n#if defined(GLFW_EXPOSE_NATIVE_NSGL)\n/*! @brief Returns the `NSOpenGLContext` of the specified window.\n *\n *  @return The `NSOpenGLContext` of the specified window, or `nil` if an\n *  [error](@ref error_handling) occurred.\n *\n *  @thread_safety This function may be called from any thread.  Access is not\n *  synchronized.\n *\n *  @since Added in version 3.0.\n *\n *  @ingroup native\n */\nGLFWAPI id glfwGetNSGLContext(GLFWwindow* window);\n#endif\n\n#if defined(GLFW_EXPOSE_NATIVE_X11)\n/*! @brief Returns the `Display` used by GLFW.\n *\n *  @return The `Display` used by GLFW, or `NULL` if an\n *  [error](@ref error_handling) occurred.\n *\n *  @thread_safety This function may be called from any thread.  Access is not\n *  synchronized.\n *\n *  @since Added in version 3.0.\n *\n *  @ingroup native\n */\nGLFWAPI Display* glfwGetX11Display(void);\n\n/*! @brief Returns the `RRCrtc` of the specified monitor.\n *\n *  @return The `RRCrtc` of the specified monitor, or `None` if an\n *  [error](@ref error_handling) occurred.\n *\n *  @thread_safety This function may be called from any thread.  Access is not\n *  synchronized.\n *\n *  @since Added in version 3.1.\n *\n *  @ingroup native\n */\nGLFWAPI RRCrtc glfwGetX11Adapter(GLFWmonitor* monitor);\n\n/*! @brief Returns the `RROutput` of the specified monitor.\n *\n *  @return The `RROutput` of the specified monitor, or `None` if an\n *  [error](@ref error_handling) occurred.\n *\n *  @thread_safety This function may be called from any thread.  Access is not\n *  synchronized.\n *\n *  @since Added in version 3.1.\n *\n *  @ingroup native\n */\nGLFWAPI RROutput glfwGetX11Monitor(GLFWmonitor* monitor);\n\n/*! @brief Returns the `Window` of the specified window.\n *\n *  @return The `Window` of the specified window, or `None` if an\n *  [error](@ref error_handling) occurred.\n *\n *  @thread_safety This function may be called from any thread.  Access is not\n *  synchronized.\n *\n *  @since Added in version 3.0.\n *\n *  @ingroup native\n */\nGLFWAPI Window glfwGetX11Window(GLFWwindow* window);\n\n/*! @brief Sets the current primary selection to the specified string.\n *\n *  @param[in] string A UTF-8 encoded string.\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref\n *  GLFW_PLATFORM_ERROR.\n *\n *  @pointer_lifetime The specified string is copied before this function\n *  returns.\n *\n *  @thread_safety This function must only be called from the main thread.\n *\n *  @sa @ref clipboard\n *  @sa glfwGetX11SelectionString\n *  @sa glfwSetClipboardString\n *\n *  @since Added in version 3.3.\n *\n *  @ingroup native\n */\nGLFWAPI void glfwSetX11SelectionString(const char* string);\n\n/*! @brief Returns the contents of the current primary selection as a string.\n *\n *  If the selection is empty or if its contents cannot be converted, `NULL`\n *  is returned and a @ref GLFW_FORMAT_UNAVAILABLE error is generated.\n *\n *  @return The contents of the selection as a UTF-8 encoded string, or `NULL`\n *  if an [error](@ref error_handling) occurred.\n *\n *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref\n *  GLFW_PLATFORM_ERROR.\n *\n *  @pointer_lifetime The returned string is allocated and freed by GLFW. You\n *  should not free it yourself. It is valid until the next call to @ref\n *  glfwGetX11SelectionString or @ref glfwSetX11SelectionString, or until the\n *  library is terminated.\n *\n *  @thread_safety This function must only be called from the main thread.\n *\n *  @sa @ref clipboard\n *  @sa glfwSetX11SelectionString\n *  @sa glfwGetClipboardString\n *\n *  @since Added in version 3.3.\n *\n *  @ingroup native\n */\nGLFWAPI const char* glfwGetX11SelectionString(void);\n#endif\n\n#if defined(GLFW_EXPOSE_NATIVE_GLX)\n/*! @brief Returns the `GLXContext` of the specified window.\n *\n *  @return The `GLXContext` of the specified window, or `NULL` if an\n *  [error](@ref error_handling) occurred.\n *\n *  @thread_safety This function may be called from any thread.  Access is not\n *  synchronized.\n *\n *  @since Added in version 3.0.\n *\n *  @ingroup native\n */\nGLFWAPI GLXContext glfwGetGLXContext(GLFWwindow* window);\n\n/*! @brief Returns the `GLXWindow` of the specified window.\n *\n *  @return The `GLXWindow` of the specified window, or `None` if an\n *  [error](@ref error_handling) occurred.\n *\n *  @thread_safety This function may be called from any thread.  Access is not\n *  synchronized.\n *\n *  @since Added in version 3.2.\n *\n *  @ingroup native\n */\nGLFWAPI GLXWindow glfwGetGLXWindow(GLFWwindow* window);\n#endif\n\n#if defined(GLFW_EXPOSE_NATIVE_WAYLAND)\n/*! @brief Returns the `struct wl_display*` used by GLFW.\n *\n *  @return The `struct wl_display*` used by GLFW, or `NULL` if an\n *  [error](@ref error_handling) occurred.\n *\n *  @thread_safety This function may be called from any thread.  Access is not\n *  synchronized.\n *\n *  @since Added in version 3.2.\n *\n *  @ingroup native\n */\nGLFWAPI struct wl_display* glfwGetWaylandDisplay(void);\n\n/*! @brief Returns the `struct wl_output*` of the specified monitor.\n *\n *  @return The `struct wl_output*` of the specified monitor, or `NULL` if an\n *  [error](@ref error_handling) occurred.\n *\n *  @thread_safety This function may be called from any thread.  Access is not\n *  synchronized.\n *\n *  @since Added in version 3.2.\n *\n *  @ingroup native\n */\nGLFWAPI struct wl_output* glfwGetWaylandMonitor(GLFWmonitor* monitor);\n\n/*! @brief Returns the main `struct wl_surface*` of the specified window.\n *\n *  @return The main `struct wl_surface*` of the specified window, or `NULL` if\n *  an [error](@ref error_handling) occurred.\n *\n *  @thread_safety This function may be called from any thread.  Access is not\n *  synchronized.\n *\n *  @since Added in version 3.2.\n *\n *  @ingroup native\n */\nGLFWAPI struct wl_surface* glfwGetWaylandWindow(GLFWwindow* window);\n#endif\n\n#if defined(GLFW_EXPOSE_NATIVE_EGL)\n/*! @brief Returns the `EGLDisplay` used by GLFW.\n *\n *  @return The `EGLDisplay` used by GLFW, or `EGL_NO_DISPLAY` if an\n *  [error](@ref error_handling) occurred.\n *\n *  @thread_safety This function may be called from any thread.  Access is not\n *  synchronized.\n *\n *  @since Added in version 3.0.\n *\n *  @ingroup native\n */\nGLFWAPI EGLDisplay glfwGetEGLDisplay(void);\n\n/*! @brief Returns the `EGLContext` of the specified window.\n *\n *  @return The `EGLContext` of the specified window, or `EGL_NO_CONTEXT` if an\n *  [error](@ref error_handling) occurred.\n *\n *  @thread_safety This function may be called from any thread.  Access is not\n *  synchronized.\n *\n *  @since Added in version 3.0.\n *\n *  @ingroup native\n */\nGLFWAPI EGLContext glfwGetEGLContext(GLFWwindow* window);\n\n/*! @brief Returns the `EGLSurface` of the specified window.\n *\n *  @return The `EGLSurface` of the specified window, or `EGL_NO_SURFACE` if an\n *  [error](@ref error_handling) occurred.\n *\n *  @thread_safety This function may be called from any thread.  Access is not\n *  synchronized.\n *\n *  @since Added in version 3.0.\n *\n *  @ingroup native\n */\nGLFWAPI EGLSurface glfwGetEGLSurface(GLFWwindow* window);\n#endif\n\n#if defined(GLFW_EXPOSE_NATIVE_OSMESA)\n/*! @brief Retrieves the color buffer associated with the specified window.\n *\n *  @param[in] window The window whose color buffer to retrieve.\n *  @param[out] width Where to store the width of the color buffer, or `NULL`.\n *  @param[out] height Where to store the height of the color buffer, or `NULL`.\n *  @param[out] format Where to store the OSMesa pixel format of the color\n *  buffer, or `NULL`.\n *  @param[out] buffer Where to store the address of the color buffer, or\n *  `NULL`.\n *  @return `GLFW_TRUE` if successful, or `GLFW_FALSE` if an\n *  [error](@ref error_handling) occurred.\n *\n *  @thread_safety This function may be called from any thread.  Access is not\n *  synchronized.\n *\n *  @since Added in version 3.3.\n *\n *  @ingroup native\n */\nGLFWAPI int glfwGetOSMesaColorBuffer(GLFWwindow* window, int* width, int* height, int* format, void** buffer);\n\n/*! @brief Retrieves the depth buffer associated with the specified window.\n *\n *  @param[in] window The window whose depth buffer to retrieve.\n *  @param[out] width Where to store the width of the depth buffer, or `NULL`.\n *  @param[out] height Where to store the height of the depth buffer, or `NULL`.\n *  @param[out] bytesPerValue Where to store the number of bytes per depth\n *  buffer element, or `NULL`.\n *  @param[out] buffer Where to store the address of the depth buffer, or\n *  `NULL`.\n *  @return `GLFW_TRUE` if successful, or `GLFW_FALSE` if an\n *  [error](@ref error_handling) occurred.\n *\n *  @thread_safety This function may be called from any thread.  Access is not\n *  synchronized.\n *\n *  @since Added in version 3.3.\n *\n *  @ingroup native\n */\nGLFWAPI int glfwGetOSMesaDepthBuffer(GLFWwindow* window, int* width, int* height, int* bytesPerValue, void** buffer);\n\n/*! @brief Returns the `OSMesaContext` of the specified window.\n *\n *  @return The `OSMesaContext` of the specified window, or `NULL` if an\n *  [error](@ref error_handling) occurred.\n *\n *  @thread_safety This function may be called from any thread.  Access is not\n *  synchronized.\n *\n *  @since Added in version 3.3.\n *\n *  @ingroup native\n */\nGLFWAPI OSMesaContext glfwGetOSMesaContext(GLFWwindow* window);\n#endif\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif /* _glfw3_native_h_ */\n\n"
  },
  {
    "path": "thirdparty/glfw/src/CMakeLists.txt",
    "content": "\nset(common_HEADERS internal.h mappings.h\n                   \"${GLFW_BINARY_DIR}/src/glfw_config.h\"\n                   \"${GLFW_SOURCE_DIR}/include/GLFW/glfw3.h\"\n                   \"${GLFW_SOURCE_DIR}/include/GLFW/glfw3native.h\")\nset(common_SOURCES context.c init.c input.c monitor.c vulkan.c window.c)\n\nif (_GLFW_COCOA)\n    set(glfw_HEADERS ${common_HEADERS} cocoa_platform.h cocoa_joystick.h\n                     posix_thread.h nsgl_context.h egl_context.h osmesa_context.h)\n    set(glfw_SOURCES ${common_SOURCES} cocoa_init.m cocoa_joystick.m\n                     cocoa_monitor.m cocoa_window.m cocoa_time.c posix_thread.c\n                     nsgl_context.m egl_context.c osmesa_context.c)\nelseif (_GLFW_WIN32)\n    set(glfw_HEADERS ${common_HEADERS} win32_platform.h win32_joystick.h\n                     wgl_context.h egl_context.h osmesa_context.h)\n    set(glfw_SOURCES ${common_SOURCES} win32_init.c win32_joystick.c\n                     win32_monitor.c win32_time.c win32_thread.c win32_window.c\n                     wgl_context.c egl_context.c osmesa_context.c)\nelseif (_GLFW_X11)\n    set(glfw_HEADERS ${common_HEADERS} x11_platform.h xkb_unicode.h posix_time.h\n                     posix_thread.h glx_context.h egl_context.h osmesa_context.h)\n    set(glfw_SOURCES ${common_SOURCES} x11_init.c x11_monitor.c x11_window.c\n                     xkb_unicode.c posix_time.c posix_thread.c glx_context.c\n                     egl_context.c osmesa_context.c)\nelseif (_GLFW_WAYLAND)\n    set(glfw_HEADERS ${common_HEADERS} wl_platform.h\n                     posix_time.h posix_thread.h xkb_unicode.h egl_context.h\n                     osmesa_context.h)\n    set(glfw_SOURCES ${common_SOURCES} wl_init.c wl_monitor.c wl_window.c\n                     posix_time.c posix_thread.c xkb_unicode.c\n                     egl_context.c osmesa_context.c)\n\n    ecm_add_wayland_client_protocol(glfw_SOURCES\n        PROTOCOL\n        \"${WAYLAND_PROTOCOLS_PKGDATADIR}/stable/xdg-shell/xdg-shell.xml\"\n        BASENAME xdg-shell)\n    ecm_add_wayland_client_protocol(glfw_SOURCES\n        PROTOCOL\n        \"${WAYLAND_PROTOCOLS_PKGDATADIR}/unstable/xdg-decoration/xdg-decoration-unstable-v1.xml\"\n        BASENAME xdg-decoration)\n    ecm_add_wayland_client_protocol(glfw_SOURCES\n        PROTOCOL\n        \"${WAYLAND_PROTOCOLS_PKGDATADIR}/stable/viewporter/viewporter.xml\"\n        BASENAME viewporter)\n    ecm_add_wayland_client_protocol(glfw_SOURCES\n        PROTOCOL\n        \"${WAYLAND_PROTOCOLS_PKGDATADIR}/unstable/relative-pointer/relative-pointer-unstable-v1.xml\"\n        BASENAME relative-pointer-unstable-v1)\n    ecm_add_wayland_client_protocol(glfw_SOURCES\n        PROTOCOL\n        \"${WAYLAND_PROTOCOLS_PKGDATADIR}/unstable/pointer-constraints/pointer-constraints-unstable-v1.xml\"\n        BASENAME pointer-constraints-unstable-v1)\n    ecm_add_wayland_client_protocol(glfw_SOURCES\n        PROTOCOL\n        \"${WAYLAND_PROTOCOLS_PKGDATADIR}/unstable/idle-inhibit/idle-inhibit-unstable-v1.xml\"\n        BASENAME idle-inhibit-unstable-v1)\nelseif (_GLFW_OSMESA)\n    set(glfw_HEADERS ${common_HEADERS} null_platform.h null_joystick.h\n                     posix_time.h posix_thread.h osmesa_context.h)\n    set(glfw_SOURCES ${common_SOURCES} null_init.c null_monitor.c null_window.c\n                     null_joystick.c posix_time.c posix_thread.c osmesa_context.c)\nendif()\n\nif (_GLFW_X11 OR _GLFW_WAYLAND)\n    if (\"${CMAKE_SYSTEM_NAME}\" STREQUAL \"Linux\")\n        set(glfw_HEADERS ${glfw_HEADERS} linux_joystick.h)\n        set(glfw_SOURCES ${glfw_SOURCES} linux_joystick.c)\n    else()\n        set(glfw_HEADERS ${glfw_HEADERS} null_joystick.h)\n        set(glfw_SOURCES ${glfw_SOURCES} null_joystick.c)\n    endif()\nendif()\n\nif (APPLE)\n    # For some reason CMake didn't know about .m until version 3.16\n    set_source_files_properties(cocoa_init.m cocoa_joystick.m cocoa_monitor.m\n                                cocoa_window.m nsgl_context.m PROPERTIES\n                                LANGUAGE C)\nendif()\n\nadd_library(glfw ${glfw_SOURCES} ${glfw_HEADERS})\nset_target_properties(glfw PROPERTIES\n                      OUTPUT_NAME ${GLFW_LIB_NAME}\n                      VERSION ${GLFW_VERSION_MAJOR}.${GLFW_VERSION_MINOR}\n                      SOVERSION ${GLFW_VERSION_MAJOR}\n                      POSITION_INDEPENDENT_CODE ON\n                      FOLDER \"GLFW3\")\n\nif (${CMAKE_VERSION} VERSION_EQUAL \"3.1.0\" OR\n    ${CMAKE_VERSION} VERSION_GREATER \"3.1.0\")\n\n    set_target_properties(glfw PROPERTIES C_STANDARD 99)\nelse()\n    # Remove this fallback when removing support for CMake version less than 3.1\n    target_compile_options(glfw PRIVATE\n                           \"$<$<C_COMPILER_ID:AppleClang>:-std=c99>\"\n                           \"$<$<C_COMPILER_ID:Clang>:-std=c99>\"\n                           \"$<$<C_COMPILER_ID:GNU>:-std=c99>\")\nendif()\n\ntarget_compile_definitions(glfw PRIVATE _GLFW_USE_CONFIG_H)\ntarget_include_directories(glfw PUBLIC\n                           \"$<BUILD_INTERFACE:${GLFW_SOURCE_DIR}/include>\"\n                           \"$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>\")\ntarget_include_directories(glfw PRIVATE\n                           \"${GLFW_SOURCE_DIR}/src\"\n                           \"${GLFW_BINARY_DIR}/src\"\n                           ${glfw_INCLUDE_DIRS})\ntarget_link_libraries(glfw PRIVATE ${glfw_LIBRARIES})\n\nif (\"${CMAKE_C_COMPILER_ID}\" STREQUAL \"GNU\" OR\n    \"${CMAKE_C_COMPILER_ID}\" STREQUAL \"Clang\" OR\n    \"${CMAKE_C_COMPILER_ID}\" STREQUAL \"AppleClang\")\n\n    # Make GCC and Clang warn about declarations that VS 2010 and 2012 won't\n    # accept for all source files that VS will build\n    set_source_files_properties(context.c init.c input.c monitor.c vulkan.c\n                                window.c win32_init.c win32_joystick.c\n                                win32_monitor.c win32_time.c win32_thread.c\n                                win32_window.c wgl_context.c egl_context.c\n                                osmesa_context.c PROPERTIES\n                                COMPILE_FLAGS -Wdeclaration-after-statement)\n\n    # Enable a reasonable set of warnings (no, -Wextra is not reasonable)\n    target_compile_options(glfw PRIVATE \"-Wall\")\nendif()\n\nif (WIN32)\n    target_compile_definitions(glfw PRIVATE _UNICODE)\nendif()\n\n# HACK: When building on MinGW, WINVER and UNICODE need to be defined before\n# the inclusion of stddef.h (by glfw3.h), which is itself included before\n# win32_platform.h.  We define them here until a saner solution can be found\n# NOTE: MinGW-w64 and Visual C++ do /not/ need this hack.\nif (MINGW)\n    target_compile_definitions(glfw PRIVATE UNICODE WINVER=0x0501)\nendif()\n\nif (BUILD_SHARED_LIBS)\n    if (WIN32)\n        if (MINGW)\n            # Remove the dependency on the shared version of libgcc\n            # NOTE: MinGW-w64 has the correct default but MinGW needs this\n            target_link_libraries(glfw PRIVATE \"-static-libgcc\")\n\n            # Remove the lib prefix on the DLL (but not the import library)\n            set_target_properties(glfw PROPERTIES PREFIX \"\")\n\n            # Add a suffix to the import library to avoid naming conflicts\n            set_target_properties(glfw PROPERTIES IMPORT_SUFFIX \"dll.a\")\n        else()\n            # Add a suffix to the import library to avoid naming conflicts\n            set_target_properties(glfw PROPERTIES IMPORT_SUFFIX \"dll.lib\")\n        endif()\n\n        target_compile_definitions(glfw INTERFACE GLFW_DLL)\n    elseif (APPLE)\n        # Add -fno-common to work around a bug in Apple's GCC\n        target_compile_options(glfw PRIVATE \"-fno-common\")\n\n        set_target_properties(glfw PROPERTIES\n                              INSTALL_NAME_DIR \"${CMAKE_INSTALL_LIBDIR}\")\n    endif()\n\n    if (UNIX)\n        # Hide symbols not explicitly tagged for export from the shared library\n        target_compile_options(glfw PRIVATE \"-fvisibility=hidden\")\n    endif()\nendif()\n\nif (MSVC)\n    target_compile_definitions(glfw PRIVATE _CRT_SECURE_NO_WARNINGS)\nendif()\n\nif (GLFW_INSTALL)\n    install(TARGETS glfw\n            EXPORT glfwTargets\n            RUNTIME DESTINATION \"bin\"\n            ARCHIVE DESTINATION \"${CMAKE_INSTALL_LIBDIR}\"\n            LIBRARY DESTINATION \"${CMAKE_INSTALL_LIBDIR}\")\nendif()\n\n"
  },
  {
    "path": "thirdparty/glfw/src/cocoa_init.m",
    "content": "//========================================================================\n// GLFW 3.3 macOS - www.glfw.org\n//------------------------------------------------------------------------\n// Copyright (c) 2009-2019 Camilla Löwy <elmindreda@glfw.org>\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//    claim that you wrote the original software. If you use this software\n//    in a product, an acknowledgment in the product documentation would\n//    be appreciated but is not required.\n//\n// 2. Altered source versions must be plainly marked as such, and must not\n//    be misrepresented as being the original software.\n//\n// 3. This notice may not be removed or altered from any source\n//    distribution.\n//\n//========================================================================\n// It is fine to use C99 in this file because it will not be built with VS\n//========================================================================\n\n#include \"internal.h\"\n#include <sys/param.h> // For MAXPATHLEN\n\n// Needed for _NSGetProgname\n#include <crt_externs.h>\n\n// Change to our application bundle's resources directory, if present\n//\nstatic void changeToResourcesDirectory(void)\n{\n    char resourcesPath[MAXPATHLEN];\n\n    CFBundleRef bundle = CFBundleGetMainBundle();\n    if (!bundle)\n        return;\n\n    CFURLRef resourcesURL = CFBundleCopyResourcesDirectoryURL(bundle);\n\n    CFStringRef last = CFURLCopyLastPathComponent(resourcesURL);\n    if (CFStringCompare(CFSTR(\"Resources\"), last, 0) != kCFCompareEqualTo)\n    {\n        CFRelease(last);\n        CFRelease(resourcesURL);\n        return;\n    }\n\n    CFRelease(last);\n\n    if (!CFURLGetFileSystemRepresentation(resourcesURL,\n                                          true,\n                                          (UInt8*) resourcesPath,\n                                          MAXPATHLEN))\n    {\n        CFRelease(resourcesURL);\n        return;\n    }\n\n    CFRelease(resourcesURL);\n\n    chdir(resourcesPath);\n}\n\n// Set up the menu bar (manually)\n// This is nasty, nasty stuff -- calls to undocumented semi-private APIs that\n// could go away at any moment, lots of stuff that really should be\n// localize(d|able), etc.  Add a nib to save us this horror.\n//\nstatic void createMenuBar(void)\n{\n    size_t i;\n    NSString* appName = nil;\n    NSDictionary* bundleInfo = [[NSBundle mainBundle] infoDictionary];\n    NSString* nameKeys[] =\n    {\n        @\"CFBundleDisplayName\",\n        @\"CFBundleName\",\n        @\"CFBundleExecutable\",\n    };\n\n    // Try to figure out what the calling application is called\n\n    for (i = 0;  i < sizeof(nameKeys) / sizeof(nameKeys[0]);  i++)\n    {\n        id name = bundleInfo[nameKeys[i]];\n        if (name &&\n            [name isKindOfClass:[NSString class]] &&\n            ![name isEqualToString:@\"\"])\n        {\n            appName = name;\n            break;\n        }\n    }\n\n    if (!appName)\n    {\n        char** progname = _NSGetProgname();\n        if (progname && *progname)\n            appName = @(*progname);\n        else\n            appName = @\"GLFW Application\";\n    }\n\n    NSMenu* bar = [[NSMenu alloc] init];\n    [NSApp setMainMenu:bar];\n\n    NSMenuItem* appMenuItem =\n        [bar addItemWithTitle:@\"\" action:NULL keyEquivalent:@\"\"];\n    NSMenu* appMenu = [[NSMenu alloc] init];\n    [appMenuItem setSubmenu:appMenu];\n\n    [appMenu addItemWithTitle:[NSString stringWithFormat:@\"About %@\", appName]\n                       action:@selector(orderFrontStandardAboutPanel:)\n                keyEquivalent:@\"\"];\n    [appMenu addItem:[NSMenuItem separatorItem]];\n    NSMenu* servicesMenu = [[NSMenu alloc] init];\n    [NSApp setServicesMenu:servicesMenu];\n    [[appMenu addItemWithTitle:@\"Services\"\n                       action:NULL\n                keyEquivalent:@\"\"] setSubmenu:servicesMenu];\n    [servicesMenu release];\n    [appMenu addItem:[NSMenuItem separatorItem]];\n    [appMenu addItemWithTitle:[NSString stringWithFormat:@\"Hide %@\", appName]\n                       action:@selector(hide:)\n                keyEquivalent:@\"h\"];\n    [[appMenu addItemWithTitle:@\"Hide Others\"\n                       action:@selector(hideOtherApplications:)\n                keyEquivalent:@\"h\"]\n        setKeyEquivalentModifierMask:NSEventModifierFlagOption | NSEventModifierFlagCommand];\n    [appMenu addItemWithTitle:@\"Show All\"\n                       action:@selector(unhideAllApplications:)\n                keyEquivalent:@\"\"];\n    [appMenu addItem:[NSMenuItem separatorItem]];\n    [appMenu addItemWithTitle:[NSString stringWithFormat:@\"Quit %@\", appName]\n                       action:@selector(terminate:)\n                keyEquivalent:@\"q\"];\n\n    NSMenuItem* windowMenuItem =\n        [bar addItemWithTitle:@\"\" action:NULL keyEquivalent:@\"\"];\n    [bar release];\n    NSMenu* windowMenu = [[NSMenu alloc] initWithTitle:@\"Window\"];\n    [NSApp setWindowsMenu:windowMenu];\n    [windowMenuItem setSubmenu:windowMenu];\n\n    [windowMenu addItemWithTitle:@\"Minimize\"\n                          action:@selector(performMiniaturize:)\n                   keyEquivalent:@\"m\"];\n    [windowMenu addItemWithTitle:@\"Zoom\"\n                          action:@selector(performZoom:)\n                   keyEquivalent:@\"\"];\n    [windowMenu addItem:[NSMenuItem separatorItem]];\n    [windowMenu addItemWithTitle:@\"Bring All to Front\"\n                          action:@selector(arrangeInFront:)\n                   keyEquivalent:@\"\"];\n\n    // TODO: Make this appear at the bottom of the menu (for consistency)\n    [windowMenu addItem:[NSMenuItem separatorItem]];\n    [[windowMenu addItemWithTitle:@\"Enter Full Screen\"\n                           action:@selector(toggleFullScreen:)\n                    keyEquivalent:@\"f\"]\n     setKeyEquivalentModifierMask:NSEventModifierFlagControl | NSEventModifierFlagCommand];\n\n    // Prior to Snow Leopard, we need to use this oddly-named semi-private API\n    // to get the application menu working properly.\n    SEL setAppleMenuSelector = NSSelectorFromString(@\"setAppleMenu:\");\n    [NSApp performSelector:setAppleMenuSelector withObject:appMenu];\n}\n\n// Create key code translation tables\n//\nstatic void createKeyTables(void)\n{\n    int scancode;\n\n    memset(_glfw.ns.keycodes, -1, sizeof(_glfw.ns.keycodes));\n    memset(_glfw.ns.scancodes, -1, sizeof(_glfw.ns.scancodes));\n\n    _glfw.ns.keycodes[0x1D] = GLFW_KEY_0;\n    _glfw.ns.keycodes[0x12] = GLFW_KEY_1;\n    _glfw.ns.keycodes[0x13] = GLFW_KEY_2;\n    _glfw.ns.keycodes[0x14] = GLFW_KEY_3;\n    _glfw.ns.keycodes[0x15] = GLFW_KEY_4;\n    _glfw.ns.keycodes[0x17] = GLFW_KEY_5;\n    _glfw.ns.keycodes[0x16] = GLFW_KEY_6;\n    _glfw.ns.keycodes[0x1A] = GLFW_KEY_7;\n    _glfw.ns.keycodes[0x1C] = GLFW_KEY_8;\n    _glfw.ns.keycodes[0x19] = GLFW_KEY_9;\n    _glfw.ns.keycodes[0x00] = GLFW_KEY_A;\n    _glfw.ns.keycodes[0x0B] = GLFW_KEY_B;\n    _glfw.ns.keycodes[0x08] = GLFW_KEY_C;\n    _glfw.ns.keycodes[0x02] = GLFW_KEY_D;\n    _glfw.ns.keycodes[0x0E] = GLFW_KEY_E;\n    _glfw.ns.keycodes[0x03] = GLFW_KEY_F;\n    _glfw.ns.keycodes[0x05] = GLFW_KEY_G;\n    _glfw.ns.keycodes[0x04] = GLFW_KEY_H;\n    _glfw.ns.keycodes[0x22] = GLFW_KEY_I;\n    _glfw.ns.keycodes[0x26] = GLFW_KEY_J;\n    _glfw.ns.keycodes[0x28] = GLFW_KEY_K;\n    _glfw.ns.keycodes[0x25] = GLFW_KEY_L;\n    _glfw.ns.keycodes[0x2E] = GLFW_KEY_M;\n    _glfw.ns.keycodes[0x2D] = GLFW_KEY_N;\n    _glfw.ns.keycodes[0x1F] = GLFW_KEY_O;\n    _glfw.ns.keycodes[0x23] = GLFW_KEY_P;\n    _glfw.ns.keycodes[0x0C] = GLFW_KEY_Q;\n    _glfw.ns.keycodes[0x0F] = GLFW_KEY_R;\n    _glfw.ns.keycodes[0x01] = GLFW_KEY_S;\n    _glfw.ns.keycodes[0x11] = GLFW_KEY_T;\n    _glfw.ns.keycodes[0x20] = GLFW_KEY_U;\n    _glfw.ns.keycodes[0x09] = GLFW_KEY_V;\n    _glfw.ns.keycodes[0x0D] = GLFW_KEY_W;\n    _glfw.ns.keycodes[0x07] = GLFW_KEY_X;\n    _glfw.ns.keycodes[0x10] = GLFW_KEY_Y;\n    _glfw.ns.keycodes[0x06] = GLFW_KEY_Z;\n\n    _glfw.ns.keycodes[0x27] = GLFW_KEY_APOSTROPHE;\n    _glfw.ns.keycodes[0x2A] = GLFW_KEY_BACKSLASH;\n    _glfw.ns.keycodes[0x2B] = GLFW_KEY_COMMA;\n    _glfw.ns.keycodes[0x18] = GLFW_KEY_EQUAL;\n    _glfw.ns.keycodes[0x32] = GLFW_KEY_GRAVE_ACCENT;\n    _glfw.ns.keycodes[0x21] = GLFW_KEY_LEFT_BRACKET;\n    _glfw.ns.keycodes[0x1B] = GLFW_KEY_MINUS;\n    _glfw.ns.keycodes[0x2F] = GLFW_KEY_PERIOD;\n    _glfw.ns.keycodes[0x1E] = GLFW_KEY_RIGHT_BRACKET;\n    _glfw.ns.keycodes[0x29] = GLFW_KEY_SEMICOLON;\n    _glfw.ns.keycodes[0x2C] = GLFW_KEY_SLASH;\n    _glfw.ns.keycodes[0x0A] = GLFW_KEY_WORLD_1;\n\n    _glfw.ns.keycodes[0x33] = GLFW_KEY_BACKSPACE;\n    _glfw.ns.keycodes[0x39] = GLFW_KEY_CAPS_LOCK;\n    _glfw.ns.keycodes[0x75] = GLFW_KEY_DELETE;\n    _glfw.ns.keycodes[0x7D] = GLFW_KEY_DOWN;\n    _glfw.ns.keycodes[0x77] = GLFW_KEY_END;\n    _glfw.ns.keycodes[0x24] = GLFW_KEY_ENTER;\n    _glfw.ns.keycodes[0x35] = GLFW_KEY_ESCAPE;\n    _glfw.ns.keycodes[0x7A] = GLFW_KEY_F1;\n    _glfw.ns.keycodes[0x78] = GLFW_KEY_F2;\n    _glfw.ns.keycodes[0x63] = GLFW_KEY_F3;\n    _glfw.ns.keycodes[0x76] = GLFW_KEY_F4;\n    _glfw.ns.keycodes[0x60] = GLFW_KEY_F5;\n    _glfw.ns.keycodes[0x61] = GLFW_KEY_F6;\n    _glfw.ns.keycodes[0x62] = GLFW_KEY_F7;\n    _glfw.ns.keycodes[0x64] = GLFW_KEY_F8;\n    _glfw.ns.keycodes[0x65] = GLFW_KEY_F9;\n    _glfw.ns.keycodes[0x6D] = GLFW_KEY_F10;\n    _glfw.ns.keycodes[0x67] = GLFW_KEY_F11;\n    _glfw.ns.keycodes[0x6F] = GLFW_KEY_F12;\n    _glfw.ns.keycodes[0x69] = GLFW_KEY_F13;\n    _glfw.ns.keycodes[0x6B] = GLFW_KEY_F14;\n    _glfw.ns.keycodes[0x71] = GLFW_KEY_F15;\n    _glfw.ns.keycodes[0x6A] = GLFW_KEY_F16;\n    _glfw.ns.keycodes[0x40] = GLFW_KEY_F17;\n    _glfw.ns.keycodes[0x4F] = GLFW_KEY_F18;\n    _glfw.ns.keycodes[0x50] = GLFW_KEY_F19;\n    _glfw.ns.keycodes[0x5A] = GLFW_KEY_F20;\n    _glfw.ns.keycodes[0x73] = GLFW_KEY_HOME;\n    _glfw.ns.keycodes[0x72] = GLFW_KEY_INSERT;\n    _glfw.ns.keycodes[0x7B] = GLFW_KEY_LEFT;\n    _glfw.ns.keycodes[0x3A] = GLFW_KEY_LEFT_ALT;\n    _glfw.ns.keycodes[0x3B] = GLFW_KEY_LEFT_CONTROL;\n    _glfw.ns.keycodes[0x38] = GLFW_KEY_LEFT_SHIFT;\n    _glfw.ns.keycodes[0x37] = GLFW_KEY_LEFT_SUPER;\n    _glfw.ns.keycodes[0x6E] = GLFW_KEY_MENU;\n    _glfw.ns.keycodes[0x47] = GLFW_KEY_NUM_LOCK;\n    _glfw.ns.keycodes[0x79] = GLFW_KEY_PAGE_DOWN;\n    _glfw.ns.keycodes[0x74] = GLFW_KEY_PAGE_UP;\n    _glfw.ns.keycodes[0x7C] = GLFW_KEY_RIGHT;\n    _glfw.ns.keycodes[0x3D] = GLFW_KEY_RIGHT_ALT;\n    _glfw.ns.keycodes[0x3E] = GLFW_KEY_RIGHT_CONTROL;\n    _glfw.ns.keycodes[0x3C] = GLFW_KEY_RIGHT_SHIFT;\n    _glfw.ns.keycodes[0x36] = GLFW_KEY_RIGHT_SUPER;\n    _glfw.ns.keycodes[0x31] = GLFW_KEY_SPACE;\n    _glfw.ns.keycodes[0x30] = GLFW_KEY_TAB;\n    _glfw.ns.keycodes[0x7E] = GLFW_KEY_UP;\n\n    _glfw.ns.keycodes[0x52] = GLFW_KEY_KP_0;\n    _glfw.ns.keycodes[0x53] = GLFW_KEY_KP_1;\n    _glfw.ns.keycodes[0x54] = GLFW_KEY_KP_2;\n    _glfw.ns.keycodes[0x55] = GLFW_KEY_KP_3;\n    _glfw.ns.keycodes[0x56] = GLFW_KEY_KP_4;\n    _glfw.ns.keycodes[0x57] = GLFW_KEY_KP_5;\n    _glfw.ns.keycodes[0x58] = GLFW_KEY_KP_6;\n    _glfw.ns.keycodes[0x59] = GLFW_KEY_KP_7;\n    _glfw.ns.keycodes[0x5B] = GLFW_KEY_KP_8;\n    _glfw.ns.keycodes[0x5C] = GLFW_KEY_KP_9;\n    _glfw.ns.keycodes[0x45] = GLFW_KEY_KP_ADD;\n    _glfw.ns.keycodes[0x41] = GLFW_KEY_KP_DECIMAL;\n    _glfw.ns.keycodes[0x4B] = GLFW_KEY_KP_DIVIDE;\n    _glfw.ns.keycodes[0x4C] = GLFW_KEY_KP_ENTER;\n    _glfw.ns.keycodes[0x51] = GLFW_KEY_KP_EQUAL;\n    _glfw.ns.keycodes[0x43] = GLFW_KEY_KP_MULTIPLY;\n    _glfw.ns.keycodes[0x4E] = GLFW_KEY_KP_SUBTRACT;\n\n    for (scancode = 0;  scancode < 256;  scancode++)\n    {\n        // Store the reverse translation for faster key name lookup\n        if (_glfw.ns.keycodes[scancode] >= 0)\n            _glfw.ns.scancodes[_glfw.ns.keycodes[scancode]] = scancode;\n    }\n}\n\n// Retrieve Unicode data for the current keyboard layout\n//\nstatic GLFWbool updateUnicodeDataNS(void)\n{\n    if (_glfw.ns.inputSource)\n    {\n        CFRelease(_glfw.ns.inputSource);\n        _glfw.ns.inputSource = NULL;\n        _glfw.ns.unicodeData = nil;\n    }\n\n    _glfw.ns.inputSource = TISCopyCurrentKeyboardLayoutInputSource();\n    if (!_glfw.ns.inputSource)\n    {\n        _glfwInputError(GLFW_PLATFORM_ERROR,\n                        \"Cocoa: Failed to retrieve keyboard layout input source\");\n        return GLFW_FALSE;\n    }\n\n    _glfw.ns.unicodeData =\n        TISGetInputSourceProperty(_glfw.ns.inputSource,\n                                  kTISPropertyUnicodeKeyLayoutData);\n    if (!_glfw.ns.unicodeData)\n    {\n        _glfwInputError(GLFW_PLATFORM_ERROR,\n                        \"Cocoa: Failed to retrieve keyboard layout Unicode data\");\n        return GLFW_FALSE;\n    }\n\n    return GLFW_TRUE;\n}\n\n// Load HIToolbox.framework and the TIS symbols we need from it\n//\nstatic GLFWbool initializeTIS(void)\n{\n    // This works only because Cocoa has already loaded it properly\n    _glfw.ns.tis.bundle =\n        CFBundleGetBundleWithIdentifier(CFSTR(\"com.apple.HIToolbox\"));\n    if (!_glfw.ns.tis.bundle)\n    {\n        _glfwInputError(GLFW_PLATFORM_ERROR,\n                        \"Cocoa: Failed to load HIToolbox.framework\");\n        return GLFW_FALSE;\n    }\n\n    CFStringRef* kPropertyUnicodeKeyLayoutData =\n        CFBundleGetDataPointerForName(_glfw.ns.tis.bundle,\n                                      CFSTR(\"kTISPropertyUnicodeKeyLayoutData\"));\n    _glfw.ns.tis.CopyCurrentKeyboardLayoutInputSource =\n        CFBundleGetFunctionPointerForName(_glfw.ns.tis.bundle,\n                                          CFSTR(\"TISCopyCurrentKeyboardLayoutInputSource\"));\n    _glfw.ns.tis.GetInputSourceProperty =\n        CFBundleGetFunctionPointerForName(_glfw.ns.tis.bundle,\n                                          CFSTR(\"TISGetInputSourceProperty\"));\n    _glfw.ns.tis.GetKbdType =\n        CFBundleGetFunctionPointerForName(_glfw.ns.tis.bundle,\n                                          CFSTR(\"LMGetKbdType\"));\n\n    if (!kPropertyUnicodeKeyLayoutData ||\n        !TISCopyCurrentKeyboardLayoutInputSource ||\n        !TISGetInputSourceProperty ||\n        !LMGetKbdType)\n    {\n        _glfwInputError(GLFW_PLATFORM_ERROR,\n                        \"Cocoa: Failed to load TIS API symbols\");\n        return GLFW_FALSE;\n    }\n\n    _glfw.ns.tis.kPropertyUnicodeKeyLayoutData =\n        *kPropertyUnicodeKeyLayoutData;\n\n    return updateUnicodeDataNS();\n}\n\n@interface GLFWHelper : NSObject\n@end\n\n@implementation GLFWHelper\n\n- (void)selectedKeyboardInputSourceChanged:(NSObject* )object\n{\n    updateUnicodeDataNS();\n}\n\n- (void)doNothing:(id)object\n{\n}\n\n@end // GLFWHelper\n\n@interface GLFWApplicationDelegate : NSObject <NSApplicationDelegate>\n@end\n\n@implementation GLFWApplicationDelegate\n\n- (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sender\n{\n    _GLFWwindow* window;\n\n    for (window = _glfw.windowListHead;  window;  window = window->next)\n        _glfwInputWindowCloseRequest(window);\n\n    return NSTerminateCancel;\n}\n\n- (void)applicationDidChangeScreenParameters:(NSNotification *) notification\n{\n    _GLFWwindow* window;\n\n    for (window = _glfw.windowListHead;  window;  window = window->next)\n    {\n        if (window->context.client != GLFW_NO_API)\n            [window->context.nsgl.object update];\n    }\n\n    _glfwPollMonitorsNS();\n}\n\n- (void)applicationWillFinishLaunching:(NSNotification *)notification\n{\n    if (_glfw.hints.init.ns.menubar)\n    {\n        // In case we are unbundled, make us a proper UI application\n        [NSApp setActivationPolicy:NSApplicationActivationPolicyRegular];\n\n        // Menu bar setup must go between sharedApplication and finishLaunching\n        // in order to properly emulate the behavior of NSApplicationMain\n\n        if ([[NSBundle mainBundle] pathForResource:@\"MainMenu\" ofType:@\"nib\"])\n        {\n            [[NSBundle mainBundle] loadNibNamed:@\"MainMenu\"\n                                          owner:NSApp\n                                topLevelObjects:&_glfw.ns.nibObjects];\n        }\n        else\n            createMenuBar();\n    }\n}\n\n- (void)applicationDidFinishLaunching:(NSNotification *)notification\n{\n    _glfw.ns.finishedLaunching = GLFW_TRUE;\n    _glfwPlatformPostEmptyEvent();\n    [NSApp stop:nil];\n}\n\n- (void)applicationDidHide:(NSNotification *)notification\n{\n    int i;\n\n    for (i = 0;  i < _glfw.monitorCount;  i++)\n        _glfwRestoreVideoModeNS(_glfw.monitors[i]);\n}\n\n@end // GLFWApplicationDelegate\n\n\n//////////////////////////////////////////////////////////////////////////\n//////                       GLFW internal API                      //////\n//////////////////////////////////////////////////////////////////////////\n\nvoid* _glfwLoadLocalVulkanLoaderNS(void)\n{\n    CFBundleRef bundle = CFBundleGetMainBundle();\n    if (!bundle)\n        return NULL;\n\n    CFURLRef url =\n        CFBundleCopyAuxiliaryExecutableURL(bundle, CFSTR(\"libvulkan.1.dylib\"));\n    if (!url)\n        return NULL;\n\n    char path[PATH_MAX];\n    void* handle = NULL;\n\n    if (CFURLGetFileSystemRepresentation(url, true, (UInt8*) path, sizeof(path) - 1))\n        handle = _glfw_dlopen(path);\n\n    CFRelease(url);\n    return handle;\n}\n\n\n//////////////////////////////////////////////////////////////////////////\n//////                       GLFW platform API                      //////\n//////////////////////////////////////////////////////////////////////////\n\nint _glfwPlatformInit(void)\n{\n    @autoreleasepool {\n\n    _glfw.ns.helper = [[GLFWHelper alloc] init];\n\n    [NSThread detachNewThreadSelector:@selector(doNothing:)\n                             toTarget:_glfw.ns.helper\n                           withObject:nil];\n\n    if (NSApp)\n        _glfw.ns.finishedLaunching = GLFW_TRUE;\n\n    [NSApplication sharedApplication];\n\n    _glfw.ns.delegate = [[GLFWApplicationDelegate alloc] init];\n    if (_glfw.ns.delegate == nil)\n    {\n        _glfwInputError(GLFW_PLATFORM_ERROR,\n                        \"Cocoa: Failed to create application delegate\");\n        return GLFW_FALSE;\n    }\n\n    [NSApp setDelegate:_glfw.ns.delegate];\n\n    NSEvent* (^block)(NSEvent*) = ^ NSEvent* (NSEvent* event)\n    {\n        if ([event modifierFlags] & NSEventModifierFlagCommand)\n            [[NSApp keyWindow] sendEvent:event];\n\n        return event;\n    };\n\n    _glfw.ns.keyUpMonitor =\n        [NSEvent addLocalMonitorForEventsMatchingMask:NSEventMaskKeyUp\n                                              handler:block];\n\n    if (_glfw.hints.init.ns.chdir)\n        changeToResourcesDirectory();\n\n    // Press and Hold prevents some keys from emitting repeated characters\n    NSDictionary* defaults = @{@\"ApplePressAndHoldEnabled\":@NO};\n    [[NSUserDefaults standardUserDefaults] registerDefaults:defaults];\n\n    [[NSNotificationCenter defaultCenter]\n        addObserver:_glfw.ns.helper\n           selector:@selector(selectedKeyboardInputSourceChanged:)\n               name:NSTextInputContextKeyboardSelectionDidChangeNotification\n             object:nil];\n\n    createKeyTables();\n\n    _glfw.ns.eventSource = CGEventSourceCreate(kCGEventSourceStateHIDSystemState);\n    if (!_glfw.ns.eventSource)\n        return GLFW_FALSE;\n\n    CGEventSourceSetLocalEventsSuppressionInterval(_glfw.ns.eventSource, 0.0);\n\n    if (!initializeTIS())\n        return GLFW_FALSE;\n\n    _glfwInitTimerNS();\n    _glfwInitJoysticksNS();\n\n    _glfwPollMonitorsNS();\n    return GLFW_TRUE;\n\n    } // autoreleasepool\n}\n\nvoid _glfwPlatformTerminate(void)\n{\n    @autoreleasepool {\n\n    if (_glfw.ns.inputSource)\n    {\n        CFRelease(_glfw.ns.inputSource);\n        _glfw.ns.inputSource = NULL;\n        _glfw.ns.unicodeData = nil;\n    }\n\n    if (_glfw.ns.eventSource)\n    {\n        CFRelease(_glfw.ns.eventSource);\n        _glfw.ns.eventSource = NULL;\n    }\n\n    if (_glfw.ns.delegate)\n    {\n        [NSApp setDelegate:nil];\n        [_glfw.ns.delegate release];\n        _glfw.ns.delegate = nil;\n    }\n\n    if (_glfw.ns.helper)\n    {\n        [[NSNotificationCenter defaultCenter]\n            removeObserver:_glfw.ns.helper\n                      name:NSTextInputContextKeyboardSelectionDidChangeNotification\n                    object:nil];\n        [[NSNotificationCenter defaultCenter]\n            removeObserver:_glfw.ns.helper];\n        [_glfw.ns.helper release];\n        _glfw.ns.helper = nil;\n    }\n\n    if (_glfw.ns.keyUpMonitor)\n        [NSEvent removeMonitor:_glfw.ns.keyUpMonitor];\n\n    free(_glfw.ns.clipboardString);\n\n    _glfwTerminateNSGL();\n    _glfwTerminateJoysticksNS();\n\n    } // autoreleasepool\n}\n\nconst char* _glfwPlatformGetVersionString(void)\n{\n    return _GLFW_VERSION_NUMBER \" Cocoa NSGL EGL OSMesa\"\n#if defined(_GLFW_BUILD_DLL)\n        \" dynamic\"\n#endif\n        ;\n}\n\n"
  },
  {
    "path": "thirdparty/glfw/src/cocoa_joystick.h",
    "content": "//========================================================================\n// GLFW 3.3 Cocoa - www.glfw.org\n//------------------------------------------------------------------------\n// Copyright (c) 2006-2017 Camilla Löwy <elmindreda@glfw.org>\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//    claim that you wrote the original software. If you use this software\n//    in a product, an acknowledgment in the product documentation would\n//    be appreciated but is not required.\n//\n// 2. Altered source versions must be plainly marked as such, and must not\n//    be misrepresented as being the original software.\n//\n// 3. This notice may not be removed or altered from any source\n//    distribution.\n//\n//========================================================================\n\n#include <IOKit/IOKitLib.h>\n#include <IOKit/IOCFPlugIn.h>\n#include <IOKit/hid/IOHIDLib.h>\n#include <IOKit/hid/IOHIDKeys.h>\n\n#define _GLFW_PLATFORM_JOYSTICK_STATE         _GLFWjoystickNS ns\n#define _GLFW_PLATFORM_LIBRARY_JOYSTICK_STATE struct { int dummyJoystick; }\n\n#define _GLFW_PLATFORM_MAPPING_NAME \"Mac OS X\"\n\n// Cocoa-specific per-joystick data\n//\ntypedef struct _GLFWjoystickNS\n{\n    IOHIDDeviceRef      device;\n    CFMutableArrayRef   axes;\n    CFMutableArrayRef   buttons;\n    CFMutableArrayRef   hats;\n} _GLFWjoystickNS;\n\n\nvoid _glfwInitJoysticksNS(void);\nvoid _glfwTerminateJoysticksNS(void);\n\n"
  },
  {
    "path": "thirdparty/glfw/src/cocoa_joystick.m",
    "content": "//========================================================================\n// GLFW 3.3 Cocoa - www.glfw.org\n//------------------------------------------------------------------------\n// Copyright (c) 2009-2019 Camilla Löwy <elmindreda@glfw.org>\n// Copyright (c) 2012 Torsten Walluhn <tw@mad-cad.net>\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//    claim that you wrote the original software. If you use this software\n//    in a product, an acknowledgment in the product documentation would\n//    be appreciated but is not required.\n//\n// 2. Altered source versions must be plainly marked as such, and must not\n//    be misrepresented as being the original software.\n//\n// 3. This notice may not be removed or altered from any source\n//    distribution.\n//\n//========================================================================\n// It is fine to use C99 in this file because it will not be built with VS\n//========================================================================\n\n#include \"internal.h\"\n\n#include <unistd.h>\n#include <ctype.h>\n#include <string.h>\n\n#include <mach/mach.h>\n#include <mach/mach_error.h>\n\n#include <CoreFoundation/CoreFoundation.h>\n#include <Kernel/IOKit/hidsystem/IOHIDUsageTables.h>\n\n\n// Joystick element information\n//\ntypedef struct _GLFWjoyelementNS\n{\n    IOHIDElementRef native;\n    uint32_t        usage;\n    int             index;\n    long            minimum;\n    long            maximum;\n\n} _GLFWjoyelementNS;\n\n\n// Returns the value of the specified element of the specified joystick\n//\nstatic long getElementValue(_GLFWjoystick* js, _GLFWjoyelementNS* element)\n{\n    IOHIDValueRef valueRef;\n    long value = 0;\n\n    if (js->ns.device)\n    {\n        if (IOHIDDeviceGetValue(js->ns.device,\n                                element->native,\n                                &valueRef) == kIOReturnSuccess)\n        {\n            value = IOHIDValueGetIntegerValue(valueRef);\n        }\n    }\n\n    return value;\n}\n\n// Comparison function for matching the SDL element order\n//\nstatic CFComparisonResult compareElements(const void* fp,\n                                          const void* sp,\n                                          void* user)\n{\n    const _GLFWjoyelementNS* fe = fp;\n    const _GLFWjoyelementNS* se = sp;\n    if (fe->usage < se->usage)\n        return kCFCompareLessThan;\n    if (fe->usage > se->usage)\n        return kCFCompareGreaterThan;\n    if (fe->index < se->index)\n        return kCFCompareLessThan;\n    if (fe->index > se->index)\n        return kCFCompareGreaterThan;\n    return kCFCompareEqualTo;\n}\n\n// Removes the specified joystick\n//\nstatic void closeJoystick(_GLFWjoystick* js)\n{\n    int i;\n\n    if (!js->present)\n        return;\n\n    for (i = 0;  i < CFArrayGetCount(js->ns.axes);  i++)\n        free((void*) CFArrayGetValueAtIndex(js->ns.axes, i));\n    CFRelease(js->ns.axes);\n\n    for (i = 0;  i < CFArrayGetCount(js->ns.buttons);  i++)\n        free((void*) CFArrayGetValueAtIndex(js->ns.buttons, i));\n    CFRelease(js->ns.buttons);\n\n    for (i = 0;  i < CFArrayGetCount(js->ns.hats);  i++)\n        free((void*) CFArrayGetValueAtIndex(js->ns.hats, i));\n    CFRelease(js->ns.hats);\n\n    _glfwFreeJoystick(js);\n    _glfwInputJoystick(js, GLFW_DISCONNECTED);\n}\n\n// Callback for user-initiated joystick addition\n//\nstatic void matchCallback(void* context,\n                          IOReturn result,\n                          void* sender,\n                          IOHIDDeviceRef device)\n{\n    int jid;\n    char name[256];\n    char guid[33];\n    CFIndex i;\n    CFTypeRef property;\n    uint32_t vendor = 0, product = 0, version = 0;\n    _GLFWjoystick* js;\n    CFMutableArrayRef axes, buttons, hats;\n\n    for (jid = 0;  jid <= GLFW_JOYSTICK_LAST;  jid++)\n    {\n        if (_glfw.joysticks[jid].ns.device == device)\n            return;\n    }\n\n    axes    = CFArrayCreateMutable(NULL, 0, NULL);\n    buttons = CFArrayCreateMutable(NULL, 0, NULL);\n    hats    = CFArrayCreateMutable(NULL, 0, NULL);\n\n    property = IOHIDDeviceGetProperty(device, CFSTR(kIOHIDProductKey));\n    if (property)\n    {\n        CFStringGetCString(property,\n                           name,\n                           sizeof(name),\n                           kCFStringEncodingUTF8);\n    }\n    else\n        strncpy(name, \"Unknown\", sizeof(name));\n\n    property = IOHIDDeviceGetProperty(device, CFSTR(kIOHIDVendorIDKey));\n    if (property)\n        CFNumberGetValue(property, kCFNumberSInt32Type, &vendor);\n\n    property = IOHIDDeviceGetProperty(device, CFSTR(kIOHIDProductIDKey));\n    if (property)\n        CFNumberGetValue(property, kCFNumberSInt32Type, &product);\n\n    property = IOHIDDeviceGetProperty(device, CFSTR(kIOHIDVersionNumberKey));\n    if (property)\n        CFNumberGetValue(property, kCFNumberSInt32Type, &version);\n\n    // Generate a joystick GUID that matches the SDL 2.0.5+ one\n    if (vendor && product)\n    {\n        sprintf(guid, \"03000000%02x%02x0000%02x%02x0000%02x%02x0000\",\n                (uint8_t) vendor, (uint8_t) (vendor >> 8),\n                (uint8_t) product, (uint8_t) (product >> 8),\n                (uint8_t) version, (uint8_t) (version >> 8));\n    }\n    else\n    {\n        sprintf(guid, \"05000000%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x00\",\n                name[0], name[1], name[2], name[3],\n                name[4], name[5], name[6], name[7],\n                name[8], name[9], name[10]);\n    }\n\n    CFArrayRef elements =\n        IOHIDDeviceCopyMatchingElements(device, NULL, kIOHIDOptionsTypeNone);\n\n    for (i = 0;  i < CFArrayGetCount(elements);  i++)\n    {\n        IOHIDElementRef native = (IOHIDElementRef)\n            CFArrayGetValueAtIndex(elements, i);\n        if (CFGetTypeID(native) != IOHIDElementGetTypeID())\n            continue;\n\n        const IOHIDElementType type = IOHIDElementGetType(native);\n        if ((type != kIOHIDElementTypeInput_Axis) &&\n            (type != kIOHIDElementTypeInput_Button) &&\n            (type != kIOHIDElementTypeInput_Misc))\n        {\n            continue;\n        }\n\n        CFMutableArrayRef target = NULL;\n\n        const uint32_t usage = IOHIDElementGetUsage(native);\n        const uint32_t page = IOHIDElementGetUsagePage(native);\n        if (page == kHIDPage_GenericDesktop)\n        {\n            switch (usage)\n            {\n                case kHIDUsage_GD_X:\n                case kHIDUsage_GD_Y:\n                case kHIDUsage_GD_Z:\n                case kHIDUsage_GD_Rx:\n                case kHIDUsage_GD_Ry:\n                case kHIDUsage_GD_Rz:\n                case kHIDUsage_GD_Slider:\n                case kHIDUsage_GD_Dial:\n                case kHIDUsage_GD_Wheel:\n                    target = axes;\n                    break;\n                case kHIDUsage_GD_Hatswitch:\n                    target = hats;\n                    break;\n                case kHIDUsage_GD_DPadUp:\n                case kHIDUsage_GD_DPadRight:\n                case kHIDUsage_GD_DPadDown:\n                case kHIDUsage_GD_DPadLeft:\n                case kHIDUsage_GD_SystemMainMenu:\n                case kHIDUsage_GD_Select:\n                case kHIDUsage_GD_Start:\n                    target = buttons;\n                    break;\n            }\n        }\n        else if (page == kHIDPage_Simulation)\n        {\n            switch (usage)\n            {\n                case kHIDUsage_Sim_Accelerator:\n                case kHIDUsage_Sim_Brake:\n                case kHIDUsage_Sim_Throttle:\n                case kHIDUsage_Sim_Rudder:\n                case kHIDUsage_Sim_Steering:\n                    target = axes;\n                    break;\n            }\n        }\n        else if (page == kHIDPage_Button || page == kHIDPage_Consumer)\n            target = buttons;\n\n        if (target)\n        {\n            _GLFWjoyelementNS* element = calloc(1, sizeof(_GLFWjoyelementNS));\n            element->native  = native;\n            element->usage   = usage;\n            element->index   = (int) CFArrayGetCount(target);\n            element->minimum = IOHIDElementGetLogicalMin(native);\n            element->maximum = IOHIDElementGetLogicalMax(native);\n            CFArrayAppendValue(target, element);\n        }\n    }\n\n    CFRelease(elements);\n\n    CFArraySortValues(axes, CFRangeMake(0, CFArrayGetCount(axes)),\n                      compareElements, NULL);\n    CFArraySortValues(buttons, CFRangeMake(0, CFArrayGetCount(buttons)),\n                      compareElements, NULL);\n    CFArraySortValues(hats, CFRangeMake(0, CFArrayGetCount(hats)),\n                      compareElements, NULL);\n\n    js = _glfwAllocJoystick(name, guid,\n                            (int) CFArrayGetCount(axes),\n                            (int) CFArrayGetCount(buttons),\n                            (int) CFArrayGetCount(hats));\n\n    js->ns.device  = device;\n    js->ns.axes    = axes;\n    js->ns.buttons = buttons;\n    js->ns.hats    = hats;\n\n    _glfwInputJoystick(js, GLFW_CONNECTED);\n}\n\n// Callback for user-initiated joystick removal\n//\nstatic void removeCallback(void* context,\n                           IOReturn result,\n                           void* sender,\n                           IOHIDDeviceRef device)\n{\n    int jid;\n\n    for (jid = 0;  jid <= GLFW_JOYSTICK_LAST;  jid++)\n    {\n        if (_glfw.joysticks[jid].ns.device == device)\n        {\n            closeJoystick(_glfw.joysticks + jid);\n            break;\n        }\n    }\n}\n\n\n//////////////////////////////////////////////////////////////////////////\n//////                       GLFW internal API                      //////\n//////////////////////////////////////////////////////////////////////////\n\n// Initialize joystick interface\n//\nvoid _glfwInitJoysticksNS(void)\n{\n    CFMutableArrayRef matching;\n    const long usages[] =\n    {\n        kHIDUsage_GD_Joystick,\n        kHIDUsage_GD_GamePad,\n        kHIDUsage_GD_MultiAxisController\n    };\n\n    _glfw.ns.hidManager = IOHIDManagerCreate(kCFAllocatorDefault,\n                                             kIOHIDOptionsTypeNone);\n\n    matching = CFArrayCreateMutable(kCFAllocatorDefault,\n                                    0,\n                                    &kCFTypeArrayCallBacks);\n    if (!matching)\n    {\n        _glfwInputError(GLFW_PLATFORM_ERROR, \"Cocoa: Failed to create array\");\n        return;\n    }\n\n    for (size_t i = 0;  i < sizeof(usages) / sizeof(long);  i++)\n    {\n        const long page = kHIDPage_GenericDesktop;\n\n        CFMutableDictionaryRef dict =\n            CFDictionaryCreateMutable(kCFAllocatorDefault,\n                                      0,\n                                      &kCFTypeDictionaryKeyCallBacks,\n                                      &kCFTypeDictionaryValueCallBacks);\n        if (!dict)\n            continue;\n\n        CFNumberRef pageRef = CFNumberCreate(kCFAllocatorDefault,\n                                             kCFNumberLongType,\n                                             &page);\n        CFNumberRef usageRef = CFNumberCreate(kCFAllocatorDefault,\n                                              kCFNumberLongType,\n                                              &usages[i]);\n        if (pageRef && usageRef)\n        {\n            CFDictionarySetValue(dict,\n                                 CFSTR(kIOHIDDeviceUsagePageKey),\n                                 pageRef);\n            CFDictionarySetValue(dict,\n                                 CFSTR(kIOHIDDeviceUsageKey),\n                                 usageRef);\n            CFArrayAppendValue(matching, dict);\n        }\n\n        if (pageRef)\n            CFRelease(pageRef);\n        if (usageRef)\n            CFRelease(usageRef);\n\n        CFRelease(dict);\n    }\n\n    IOHIDManagerSetDeviceMatchingMultiple(_glfw.ns.hidManager, matching);\n    CFRelease(matching);\n\n    IOHIDManagerRegisterDeviceMatchingCallback(_glfw.ns.hidManager,\n                                               &matchCallback, NULL);\n    IOHIDManagerRegisterDeviceRemovalCallback(_glfw.ns.hidManager,\n                                              &removeCallback, NULL);\n    IOHIDManagerScheduleWithRunLoop(_glfw.ns.hidManager,\n                                    CFRunLoopGetMain(),\n                                    kCFRunLoopDefaultMode);\n    IOHIDManagerOpen(_glfw.ns.hidManager, kIOHIDOptionsTypeNone);\n\n    // Execute the run loop once in order to register any initially-attached\n    // joysticks\n    CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0, false);\n}\n\n// Close all opened joystick handles\n//\nvoid _glfwTerminateJoysticksNS(void)\n{\n    int jid;\n\n    for (jid = 0;  jid <= GLFW_JOYSTICK_LAST;  jid++)\n        closeJoystick(_glfw.joysticks + jid);\n\n    CFRelease(_glfw.ns.hidManager);\n    _glfw.ns.hidManager = NULL;\n}\n\n\n//////////////////////////////////////////////////////////////////////////\n//////                       GLFW platform API                      //////\n//////////////////////////////////////////////////////////////////////////\n\nint _glfwPlatformPollJoystick(_GLFWjoystick* js, int mode)\n{\n    if (mode & _GLFW_POLL_AXES)\n    {\n        CFIndex i;\n\n        for (i = 0;  i < CFArrayGetCount(js->ns.axes);  i++)\n        {\n            _GLFWjoyelementNS* axis = (_GLFWjoyelementNS*)\n                CFArrayGetValueAtIndex(js->ns.axes, i);\n\n            const long raw = getElementValue(js, axis);\n            // Perform auto calibration\n            if (raw < axis->minimum)\n                axis->minimum = raw;\n            if (raw > axis->maximum)\n                axis->maximum = raw;\n\n            const long size = axis->maximum - axis->minimum;\n            if (size == 0)\n                _glfwInputJoystickAxis(js, (int) i, 0.f);\n            else\n            {\n                const float value = (2.f * (raw - axis->minimum) / size) - 1.f;\n                _glfwInputJoystickAxis(js, (int) i, value);\n            }\n        }\n    }\n\n    if (mode & _GLFW_POLL_BUTTONS)\n    {\n        CFIndex i;\n\n        for (i = 0;  i < CFArrayGetCount(js->ns.buttons);  i++)\n        {\n            _GLFWjoyelementNS* button = (_GLFWjoyelementNS*)\n                CFArrayGetValueAtIndex(js->ns.buttons, i);\n            const char value = getElementValue(js, button) - button->minimum;\n            const int state = (value > 0) ? GLFW_PRESS : GLFW_RELEASE;\n            _glfwInputJoystickButton(js, (int) i, state);\n        }\n\n        for (i = 0;  i < CFArrayGetCount(js->ns.hats);  i++)\n        {\n            const int states[9] =\n            {\n                GLFW_HAT_UP,\n                GLFW_HAT_RIGHT_UP,\n                GLFW_HAT_RIGHT,\n                GLFW_HAT_RIGHT_DOWN,\n                GLFW_HAT_DOWN,\n                GLFW_HAT_LEFT_DOWN,\n                GLFW_HAT_LEFT,\n                GLFW_HAT_LEFT_UP,\n                GLFW_HAT_CENTERED\n            };\n\n            _GLFWjoyelementNS* hat = (_GLFWjoyelementNS*)\n                CFArrayGetValueAtIndex(js->ns.hats, i);\n            long state = getElementValue(js, hat) - hat->minimum;\n            if (state < 0 || state > 8)\n                state = 8;\n\n            _glfwInputJoystickHat(js, (int) i, states[state]);\n        }\n    }\n\n    return js->present;\n}\n\nvoid _glfwPlatformUpdateGamepadGUID(char* guid)\n{\n    if ((strncmp(guid + 4, \"000000000000\", 12) == 0) &&\n        (strncmp(guid + 20, \"000000000000\", 12) == 0))\n    {\n        char original[33];\n        strncpy(original, guid, sizeof(original) - 1);\n        sprintf(guid, \"03000000%.4s0000%.4s000000000000\",\n                original, original + 16);\n    }\n}\n\n"
  },
  {
    "path": "thirdparty/glfw/src/cocoa_monitor.m",
    "content": "//========================================================================\n// GLFW 3.3 macOS - www.glfw.org\n//------------------------------------------------------------------------\n// Copyright (c) 2002-2006 Marcus Geelnard\n// Copyright (c) 2006-2019 Camilla Löwy <elmindreda@glfw.org>\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//    claim that you wrote the original software. If you use this software\n//    in a product, an acknowledgment in the product documentation would\n//    be appreciated but is not required.\n//\n// 2. Altered source versions must be plainly marked as such, and must not\n//    be misrepresented as being the original software.\n//\n// 3. This notice may not be removed or altered from any source\n//    distribution.\n//\n//========================================================================\n// It is fine to use C99 in this file because it will not be built with VS\n//========================================================================\n\n#include \"internal.h\"\n\n#include <stdlib.h>\n#include <limits.h>\n#include <math.h>\n\n#include <IOKit/graphics/IOGraphicsLib.h>\n#include <ApplicationServices/ApplicationServices.h>\n\n\n// Get the name of the specified display, or NULL\n//\nstatic char* getDisplayName(CGDirectDisplayID displayID)\n{\n    io_iterator_t it;\n    io_service_t service;\n    CFDictionaryRef info;\n\n    if (IOServiceGetMatchingServices(kIOMasterPortDefault,\n                                     IOServiceMatching(\"IODisplayConnect\"),\n                                     &it) != 0)\n    {\n        // This may happen if a desktop Mac is running headless\n        return NULL;\n    }\n\n    while ((service = IOIteratorNext(it)) != 0)\n    {\n        info = IODisplayCreateInfoDictionary(service,\n                                             kIODisplayOnlyPreferredName);\n\n        CFNumberRef vendorIDRef =\n            CFDictionaryGetValue(info, CFSTR(kDisplayVendorID));\n        CFNumberRef productIDRef =\n            CFDictionaryGetValue(info, CFSTR(kDisplayProductID));\n        if (!vendorIDRef || !productIDRef)\n        {\n            CFRelease(info);\n            continue;\n        }\n\n        unsigned int vendorID, productID;\n        CFNumberGetValue(vendorIDRef, kCFNumberIntType, &vendorID);\n        CFNumberGetValue(productIDRef, kCFNumberIntType, &productID);\n\n        if (CGDisplayVendorNumber(displayID) == vendorID &&\n            CGDisplayModelNumber(displayID) == productID)\n        {\n            // Info dictionary is used and freed below\n            break;\n        }\n\n        CFRelease(info);\n    }\n\n    IOObjectRelease(it);\n\n    if (!service)\n    {\n        _glfwInputError(GLFW_PLATFORM_ERROR,\n                        \"Cocoa: Failed to find service port for display\");\n        return NULL;\n    }\n\n    CFDictionaryRef names =\n        CFDictionaryGetValue(info, CFSTR(kDisplayProductName));\n\n    CFStringRef nameRef;\n\n    if (!names || !CFDictionaryGetValueIfPresent(names, CFSTR(\"en_US\"),\n                                                 (const void**) &nameRef))\n    {\n        // This may happen if a desktop Mac is running headless\n        CFRelease(info);\n        return NULL;\n    }\n\n    const CFIndex size =\n        CFStringGetMaximumSizeForEncoding(CFStringGetLength(nameRef),\n                                          kCFStringEncodingUTF8);\n    char* name = calloc(size + 1, 1);\n    CFStringGetCString(nameRef, name, size, kCFStringEncodingUTF8);\n\n    CFRelease(info);\n    return name;\n}\n\n// Check whether the display mode should be included in enumeration\n//\nstatic GLFWbool modeIsGood(CGDisplayModeRef mode)\n{\n    uint32_t flags = CGDisplayModeGetIOFlags(mode);\n\n    if (!(flags & kDisplayModeValidFlag) || !(flags & kDisplayModeSafeFlag))\n        return GLFW_FALSE;\n    if (flags & kDisplayModeInterlacedFlag)\n        return GLFW_FALSE;\n    if (flags & kDisplayModeStretchedFlag)\n        return GLFW_FALSE;\n\n#if MAC_OS_X_VERSION_MAX_ALLOWED <= 101100\n    CFStringRef format = CGDisplayModeCopyPixelEncoding(mode);\n    if (CFStringCompare(format, CFSTR(IO16BitDirectPixels), 0) &&\n        CFStringCompare(format, CFSTR(IO32BitDirectPixels), 0))\n    {\n        CFRelease(format);\n        return GLFW_FALSE;\n    }\n\n    CFRelease(format);\n#endif /* MAC_OS_X_VERSION_MAX_ALLOWED */\n    return GLFW_TRUE;\n}\n\n// Convert Core Graphics display mode to GLFW video mode\n//\nstatic GLFWvidmode vidmodeFromCGDisplayMode(CGDisplayModeRef mode,\n                                            double fallbackRefreshRate)\n{\n    GLFWvidmode result;\n    result.width = (int) CGDisplayModeGetWidth(mode);\n    result.height = (int) CGDisplayModeGetHeight(mode);\n    result.refreshRate = (int) round(CGDisplayModeGetRefreshRate(mode));\n\n    if (result.refreshRate == 0)\n        result.refreshRate = (int) round(fallbackRefreshRate);\n\n#if MAC_OS_X_VERSION_MAX_ALLOWED <= 101100\n    CFStringRef format = CGDisplayModeCopyPixelEncoding(mode);\n    if (CFStringCompare(format, CFSTR(IO16BitDirectPixels), 0) == 0)\n    {\n        result.redBits = 5;\n        result.greenBits = 5;\n        result.blueBits = 5;\n    }\n    else\n#endif /* MAC_OS_X_VERSION_MAX_ALLOWED */\n    {\n        result.redBits = 8;\n        result.greenBits = 8;\n        result.blueBits = 8;\n    }\n\n#if MAC_OS_X_VERSION_MAX_ALLOWED <= 101100\n    CFRelease(format);\n#endif /* MAC_OS_X_VERSION_MAX_ALLOWED */\n    return result;\n}\n\n// Starts reservation for display fading\n//\nstatic CGDisplayFadeReservationToken beginFadeReservation(void)\n{\n    CGDisplayFadeReservationToken token = kCGDisplayFadeReservationInvalidToken;\n\n    if (CGAcquireDisplayFadeReservation(5, &token) == kCGErrorSuccess)\n    {\n        CGDisplayFade(token, 0.3,\n                      kCGDisplayBlendNormal,\n                      kCGDisplayBlendSolidColor,\n                      0.0, 0.0, 0.0,\n                      TRUE);\n    }\n\n    return token;\n}\n\n// Ends reservation for display fading\n//\nstatic void endFadeReservation(CGDisplayFadeReservationToken token)\n{\n    if (token != kCGDisplayFadeReservationInvalidToken)\n    {\n        CGDisplayFade(token, 0.5,\n                      kCGDisplayBlendSolidColor,\n                      kCGDisplayBlendNormal,\n                      0.0, 0.0, 0.0,\n                      FALSE);\n        CGReleaseDisplayFadeReservation(token);\n    }\n}\n\n// Finds and caches the NSScreen corresponding to the specified monitor\n//\nstatic GLFWbool refreshMonitorScreen(_GLFWmonitor* monitor)\n{\n    if (monitor->ns.screen)\n        return GLFW_TRUE;\n\n    for (NSScreen* screen in [NSScreen screens])\n    {\n        NSNumber* displayID = [screen deviceDescription][@\"NSScreenNumber\"];\n\n        // HACK: Compare unit numbers instead of display IDs to work around\n        //       display replacement on machines with automatic graphics\n        //       switching\n        if (monitor->ns.unitNumber == CGDisplayUnitNumber([displayID unsignedIntValue]))\n        {\n            monitor->ns.screen = screen;\n            return GLFW_TRUE;\n        }\n    }\n\n    _glfwInputError(GLFW_PLATFORM_ERROR, \"Cocoa: Failed to find a screen for monitor\");\n    return GLFW_FALSE;\n}\n\n// Returns the display refresh rate queried from the I/O registry\n//\nstatic double getFallbackRefreshRate(CGDirectDisplayID displayID)\n{\n    double refreshRate = 60.0;\n\n    io_iterator_t it;\n    io_service_t service;\n\n    if (IOServiceGetMatchingServices(kIOMasterPortDefault,\n                                     IOServiceMatching(\"IOFramebuffer\"),\n                                     &it) != 0)\n    {\n        return refreshRate;\n    }\n\n    while ((service = IOIteratorNext(it)) != 0)\n    {\n        const CFNumberRef indexRef =\n            IORegistryEntryCreateCFProperty(service,\n                                            CFSTR(\"IOFramebufferOpenGLIndex\"),\n                                            kCFAllocatorDefault,\n                                            kNilOptions);\n        if (!indexRef)\n            continue;\n\n        uint32_t index = 0;\n        CFNumberGetValue(indexRef, kCFNumberIntType, &index);\n        CFRelease(indexRef);\n\n        if (CGOpenGLDisplayMaskToDisplayID(1 << index) != displayID)\n            continue;\n\n        const CFNumberRef clockRef =\n            IORegistryEntryCreateCFProperty(service,\n                                            CFSTR(\"IOFBCurrentPixelClock\"),\n                                            kCFAllocatorDefault,\n                                            kNilOptions);\n        const CFNumberRef countRef =\n            IORegistryEntryCreateCFProperty(service,\n                                            CFSTR(\"IOFBCurrentPixelCount\"),\n                                            kCFAllocatorDefault,\n                                            kNilOptions);\n        if (!clockRef || !countRef)\n            break;\n\n        uint32_t clock = 0, count = 0;\n        CFNumberGetValue(clockRef, kCFNumberIntType, &clock);\n        CFNumberGetValue(countRef, kCFNumberIntType, &count);\n        CFRelease(clockRef);\n        CFRelease(countRef);\n\n        if (clock > 0 && count > 0)\n            refreshRate = clock / (double) count;\n\n        break;\n    }\n\n    IOObjectRelease(it);\n    return refreshRate;\n}\n\n\n//////////////////////////////////////////////////////////////////////////\n//////                       GLFW internal API                      //////\n//////////////////////////////////////////////////////////////////////////\n\n// Poll for changes in the set of connected monitors\n//\nvoid _glfwPollMonitorsNS(void)\n{\n    uint32_t displayCount;\n    CGGetOnlineDisplayList(0, NULL, &displayCount);\n    CGDirectDisplayID* displays = calloc(displayCount, sizeof(CGDirectDisplayID));\n    CGGetOnlineDisplayList(displayCount, displays, &displayCount);\n\n    for (int i = 0;  i < _glfw.monitorCount;  i++)\n        _glfw.monitors[i]->ns.screen = nil;\n\n    _GLFWmonitor** disconnected = NULL;\n    uint32_t disconnectedCount = _glfw.monitorCount;\n    if (disconnectedCount)\n    {\n        disconnected = calloc(_glfw.monitorCount, sizeof(_GLFWmonitor*));\n        memcpy(disconnected,\n               _glfw.monitors,\n               _glfw.monitorCount * sizeof(_GLFWmonitor*));\n    }\n\n    for (uint32_t i = 0;  i < displayCount;  i++)\n    {\n        if (CGDisplayIsAsleep(displays[i]))\n            continue;\n\n        // HACK: Compare unit numbers instead of display IDs to work around\n        //       display replacement on machines with automatic graphics\n        //       switching\n        const uint32_t unitNumber = CGDisplayUnitNumber(displays[i]);\n        for (uint32_t j = 0;  j < disconnectedCount;  j++)\n        {\n            if (disconnected[j] && disconnected[j]->ns.unitNumber == unitNumber)\n            {\n                disconnected[j] = NULL;\n                break;\n            }\n        }\n\n        const CGSize size = CGDisplayScreenSize(displays[i]);\n        char* name = getDisplayName(displays[i]);\n        if (!name)\n            name = _glfw_strdup(\"Unknown\");\n\n        _GLFWmonitor* monitor = _glfwAllocMonitor(name, size.width, size.height);\n        monitor->ns.displayID  = displays[i];\n        monitor->ns.unitNumber = unitNumber;\n\n        free(name);\n\n        CGDisplayModeRef mode = CGDisplayCopyDisplayMode(displays[i]);\n        if (CGDisplayModeGetRefreshRate(mode) == 0.0)\n            monitor->ns.fallbackRefreshRate = getFallbackRefreshRate(displays[i]);\n        CGDisplayModeRelease(mode);\n\n        _glfwInputMonitor(monitor, GLFW_CONNECTED, _GLFW_INSERT_LAST);\n    }\n\n    for (uint32_t i = 0;  i < disconnectedCount;  i++)\n    {\n        if (disconnected[i])\n            _glfwInputMonitor(disconnected[i], GLFW_DISCONNECTED, 0);\n    }\n\n    free(disconnected);\n    free(displays);\n}\n\n// Change the current video mode\n//\nvoid _glfwSetVideoModeNS(_GLFWmonitor* monitor, const GLFWvidmode* desired)\n{\n    GLFWvidmode current;\n    _glfwPlatformGetVideoMode(monitor, &current);\n\n    const GLFWvidmode* best = _glfwChooseVideoMode(monitor, desired);\n    if (_glfwCompareVideoModes(&current, best) == 0)\n        return;\n\n    CFArrayRef modes = CGDisplayCopyAllDisplayModes(monitor->ns.displayID, NULL);\n    const CFIndex count = CFArrayGetCount(modes);\n    CGDisplayModeRef native = NULL;\n\n    for (CFIndex i = 0;  i < count;  i++)\n    {\n        CGDisplayModeRef dm = (CGDisplayModeRef) CFArrayGetValueAtIndex(modes, i);\n        if (!modeIsGood(dm))\n            continue;\n\n        const GLFWvidmode mode =\n            vidmodeFromCGDisplayMode(dm, monitor->ns.fallbackRefreshRate);\n        if (_glfwCompareVideoModes(best, &mode) == 0)\n        {\n            native = dm;\n            break;\n        }\n    }\n\n    if (native)\n    {\n        if (monitor->ns.previousMode == NULL)\n            monitor->ns.previousMode = CGDisplayCopyDisplayMode(monitor->ns.displayID);\n\n        CGDisplayFadeReservationToken token = beginFadeReservation();\n        CGDisplaySetDisplayMode(monitor->ns.displayID, native, NULL);\n        endFadeReservation(token);\n    }\n\n    CFRelease(modes);\n}\n\n// Restore the previously saved (original) video mode\n//\nvoid _glfwRestoreVideoModeNS(_GLFWmonitor* monitor)\n{\n    if (monitor->ns.previousMode)\n    {\n        CGDisplayFadeReservationToken token = beginFadeReservation();\n        CGDisplaySetDisplayMode(monitor->ns.displayID,\n                                monitor->ns.previousMode, NULL);\n        endFadeReservation(token);\n\n        CGDisplayModeRelease(monitor->ns.previousMode);\n        monitor->ns.previousMode = NULL;\n    }\n}\n\n\n//////////////////////////////////////////////////////////////////////////\n//////                       GLFW platform API                      //////\n//////////////////////////////////////////////////////////////////////////\n\nvoid _glfwPlatformFreeMonitor(_GLFWmonitor* monitor)\n{\n}\n\nvoid _glfwPlatformGetMonitorPos(_GLFWmonitor* monitor, int* xpos, int* ypos)\n{\n    @autoreleasepool {\n\n    const CGRect bounds = CGDisplayBounds(monitor->ns.displayID);\n\n    if (xpos)\n        *xpos = (int) bounds.origin.x;\n    if (ypos)\n        *ypos = (int) bounds.origin.y;\n\n    } // autoreleasepool\n}\n\nvoid _glfwPlatformGetMonitorContentScale(_GLFWmonitor* monitor,\n                                         float* xscale, float* yscale)\n{\n    @autoreleasepool {\n\n    if (!refreshMonitorScreen(monitor))\n        return;\n\n    const NSRect points = [monitor->ns.screen frame];\n    const NSRect pixels = [monitor->ns.screen convertRectToBacking:points];\n\n    if (xscale)\n        *xscale = (float) (pixels.size.width / points.size.width);\n    if (yscale)\n        *yscale = (float) (pixels.size.height / points.size.height);\n\n    } // autoreleasepool\n}\n\nvoid _glfwPlatformGetMonitorWorkarea(_GLFWmonitor* monitor,\n                                     int* xpos, int* ypos,\n                                     int* width, int* height)\n{\n    @autoreleasepool {\n\n    if (!refreshMonitorScreen(monitor))\n        return;\n\n    const NSRect frameRect = [monitor->ns.screen visibleFrame];\n\n    if (xpos)\n        *xpos = frameRect.origin.x;\n    if (ypos)\n        *ypos = _glfwTransformYNS(frameRect.origin.y + frameRect.size.height - 1);\n    if (width)\n        *width = frameRect.size.width;\n    if (height)\n        *height = frameRect.size.height;\n\n    } // autoreleasepool\n}\n\nGLFWvidmode* _glfwPlatformGetVideoModes(_GLFWmonitor* monitor, int* count)\n{\n    @autoreleasepool {\n\n    *count = 0;\n\n    CFArrayRef modes = CGDisplayCopyAllDisplayModes(monitor->ns.displayID, NULL);\n    const CFIndex found = CFArrayGetCount(modes);\n    GLFWvidmode* result = calloc(found, sizeof(GLFWvidmode));\n\n    for (CFIndex i = 0;  i < found;  i++)\n    {\n        CGDisplayModeRef dm = (CGDisplayModeRef) CFArrayGetValueAtIndex(modes, i);\n        if (!modeIsGood(dm))\n            continue;\n\n        const GLFWvidmode mode =\n            vidmodeFromCGDisplayMode(dm, monitor->ns.fallbackRefreshRate);\n        CFIndex j;\n\n        for (j = 0;  j < *count;  j++)\n        {\n            if (_glfwCompareVideoModes(result + j, &mode) == 0)\n                break;\n        }\n\n        // Skip duplicate modes\n        if (i < *count)\n            continue;\n\n        (*count)++;\n        result[*count - 1] = mode;\n    }\n\n    CFRelease(modes);\n    return result;\n\n    } // autoreleasepool\n}\n\nvoid _glfwPlatformGetVideoMode(_GLFWmonitor* monitor, GLFWvidmode *mode)\n{\n    @autoreleasepool {\n\n    CGDisplayModeRef native = CGDisplayCopyDisplayMode(monitor->ns.displayID);\n    *mode = vidmodeFromCGDisplayMode(native, monitor->ns.fallbackRefreshRate);\n    CGDisplayModeRelease(native);\n\n    } // autoreleasepool\n}\n\nGLFWbool _glfwPlatformGetGammaRamp(_GLFWmonitor* monitor, GLFWgammaramp* ramp)\n{\n    @autoreleasepool {\n\n    uint32_t size = CGDisplayGammaTableCapacity(monitor->ns.displayID);\n    CGGammaValue* values = calloc(size * 3, sizeof(CGGammaValue));\n\n    CGGetDisplayTransferByTable(monitor->ns.displayID,\n                                size,\n                                values,\n                                values + size,\n                                values + size * 2,\n                                &size);\n\n    _glfwAllocGammaArrays(ramp, size);\n\n    for (uint32_t i = 0; i < size; i++)\n    {\n        ramp->red[i]   = (unsigned short) (values[i] * 65535);\n        ramp->green[i] = (unsigned short) (values[i + size] * 65535);\n        ramp->blue[i]  = (unsigned short) (values[i + size * 2] * 65535);\n    }\n\n    free(values);\n    return GLFW_TRUE;\n\n    } // autoreleasepool\n}\n\nvoid _glfwPlatformSetGammaRamp(_GLFWmonitor* monitor, const GLFWgammaramp* ramp)\n{\n    @autoreleasepool {\n\n    CGGammaValue* values = calloc(ramp->size * 3, sizeof(CGGammaValue));\n\n    for (unsigned int i = 0;  i < ramp->size;  i++)\n    {\n        values[i]                  = ramp->red[i] / 65535.f;\n        values[i + ramp->size]     = ramp->green[i] / 65535.f;\n        values[i + ramp->size * 2] = ramp->blue[i] / 65535.f;\n    }\n\n    CGSetDisplayTransferByTable(monitor->ns.displayID,\n                                ramp->size,\n                                values,\n                                values + ramp->size,\n                                values + ramp->size * 2);\n\n    free(values);\n\n    } // autoreleasepool\n}\n\n\n//////////////////////////////////////////////////////////////////////////\n//////                        GLFW native API                       //////\n//////////////////////////////////////////////////////////////////////////\n\nGLFWAPI CGDirectDisplayID glfwGetCocoaMonitor(GLFWmonitor* handle)\n{\n    _GLFWmonitor* monitor = (_GLFWmonitor*) handle;\n    _GLFW_REQUIRE_INIT_OR_RETURN(kCGNullDirectDisplay);\n    return monitor->ns.displayID;\n}\n\n"
  },
  {
    "path": "thirdparty/glfw/src/cocoa_platform.h",
    "content": "//========================================================================\n// GLFW 3.3 macOS - www.glfw.org\n//------------------------------------------------------------------------\n// Copyright (c) 2009-2019 Camilla Löwy <elmindreda@glfw.org>\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//    claim that you wrote the original software. If you use this software\n//    in a product, an acknowledgment in the product documentation would\n//    be appreciated but is not required.\n//\n// 2. Altered source versions must be plainly marked as such, and must not\n//    be misrepresented as being the original software.\n//\n// 3. This notice may not be removed or altered from any source\n//    distribution.\n//\n//========================================================================\n\n#include <stdint.h>\n#include <dlfcn.h>\n\n#include <Carbon/Carbon.h>\n\n// NOTE: All of NSGL was deprecated in the 10.14 SDK\n//       This disables the pointless warnings for every symbol we use\n#define GL_SILENCE_DEPRECATION\n\n#if defined(__OBJC__)\n#import <Cocoa/Cocoa.h>\n#else\ntypedef void* id;\n#endif\n\n// NOTE: Many Cocoa enum values have been renamed and we need to build across\n//       SDK versions where one is unavailable or the other deprecated\n//       We use the newer names in code and these macros to handle compatibility\n#if MAC_OS_X_VERSION_MAX_ALLOWED < 101200\n #define NSBitmapFormatAlphaNonpremultiplied NSAlphaNonpremultipliedBitmapFormat\n #define NSEventMaskAny NSAnyEventMask\n #define NSEventMaskKeyUp NSKeyUpMask\n #define NSEventModifierFlagCapsLock NSAlphaShiftKeyMask\n #define NSEventModifierFlagCommand NSCommandKeyMask\n #define NSEventModifierFlagControl NSControlKeyMask\n #define NSEventModifierFlagDeviceIndependentFlagsMask NSDeviceIndependentModifierFlagsMask\n #define NSEventModifierFlagOption NSAlternateKeyMask\n #define NSEventModifierFlagShift NSShiftKeyMask\n #define NSEventTypeApplicationDefined NSApplicationDefined\n #define NSWindowStyleMaskBorderless NSBorderlessWindowMask\n #define NSWindowStyleMaskClosable NSClosableWindowMask\n #define NSWindowStyleMaskMiniaturizable NSMiniaturizableWindowMask\n #define NSWindowStyleMaskResizable NSResizableWindowMask\n #define NSWindowStyleMaskTitled NSTitledWindowMask\n#endif\n\ntypedef VkFlags VkMacOSSurfaceCreateFlagsMVK;\ntypedef VkFlags VkMetalSurfaceCreateFlagsEXT;\n\ntypedef struct VkMacOSSurfaceCreateInfoMVK\n{\n    VkStructureType                 sType;\n    const void*                     pNext;\n    VkMacOSSurfaceCreateFlagsMVK    flags;\n    const void*                     pView;\n} VkMacOSSurfaceCreateInfoMVK;\n\ntypedef struct VkMetalSurfaceCreateInfoEXT\n{\n    VkStructureType                 sType;\n    const void*                     pNext;\n    VkMetalSurfaceCreateFlagsEXT    flags;\n    const void*                     pLayer;\n} VkMetalSurfaceCreateInfoEXT;\n\ntypedef VkResult (APIENTRY *PFN_vkCreateMacOSSurfaceMVK)(VkInstance,const VkMacOSSurfaceCreateInfoMVK*,const VkAllocationCallbacks*,VkSurfaceKHR*);\ntypedef VkResult (APIENTRY *PFN_vkCreateMetalSurfaceEXT)(VkInstance,const VkMetalSurfaceCreateInfoEXT*,const VkAllocationCallbacks*,VkSurfaceKHR*);\n\n#include \"posix_thread.h\"\n#include \"cocoa_joystick.h\"\n#include \"nsgl_context.h\"\n#include \"egl_context.h\"\n#include \"osmesa_context.h\"\n\n#define _glfw_dlopen(name) dlopen(name, RTLD_LAZY | RTLD_LOCAL)\n#define _glfw_dlclose(handle) dlclose(handle)\n#define _glfw_dlsym(handle, name) dlsym(handle, name)\n\n#define _GLFW_EGL_NATIVE_WINDOW  ((EGLNativeWindowType) window->ns.view)\n#define _GLFW_EGL_NATIVE_DISPLAY EGL_DEFAULT_DISPLAY\n\n#define _GLFW_PLATFORM_WINDOW_STATE         _GLFWwindowNS  ns\n#define _GLFW_PLATFORM_LIBRARY_WINDOW_STATE _GLFWlibraryNS ns\n#define _GLFW_PLATFORM_LIBRARY_TIMER_STATE  _GLFWtimerNS   ns\n#define _GLFW_PLATFORM_MONITOR_STATE        _GLFWmonitorNS ns\n#define _GLFW_PLATFORM_CURSOR_STATE         _GLFWcursorNS  ns\n\n// HIToolbox.framework pointer typedefs\n#define kTISPropertyUnicodeKeyLayoutData _glfw.ns.tis.kPropertyUnicodeKeyLayoutData\ntypedef TISInputSourceRef (*PFN_TISCopyCurrentKeyboardLayoutInputSource)(void);\n#define TISCopyCurrentKeyboardLayoutInputSource _glfw.ns.tis.CopyCurrentKeyboardLayoutInputSource\ntypedef void* (*PFN_TISGetInputSourceProperty)(TISInputSourceRef,CFStringRef);\n#define TISGetInputSourceProperty _glfw.ns.tis.GetInputSourceProperty\ntypedef UInt8 (*PFN_LMGetKbdType)(void);\n#define LMGetKbdType _glfw.ns.tis.GetKbdType\n\n\n// Cocoa-specific per-window data\n//\ntypedef struct _GLFWwindowNS\n{\n    id              object;\n    id              delegate;\n    id              view;\n    id              layer;\n\n    GLFWbool        maximized;\n    GLFWbool        retina;\n\n    // Cached window properties to filter out duplicate events\n    int             width, height;\n    int             fbWidth, fbHeight;\n    float           xscale, yscale;\n\n    // The total sum of the distances the cursor has been warped\n    // since the last cursor motion event was processed\n    // This is kept to counteract Cocoa doing the same internally\n    double          cursorWarpDeltaX, cursorWarpDeltaY;\n\n} _GLFWwindowNS;\n\n// Cocoa-specific global data\n//\ntypedef struct _GLFWlibraryNS\n{\n    CGEventSourceRef    eventSource;\n    id                  delegate;\n    GLFWbool            finishedLaunching;\n    GLFWbool            cursorHidden;\n    TISInputSourceRef   inputSource;\n    IOHIDManagerRef     hidManager;\n    id                  unicodeData;\n    id                  helper;\n    id                  keyUpMonitor;\n    id                  nibObjects;\n\n    char                keynames[GLFW_KEY_LAST + 1][17];\n    short int           keycodes[256];\n    short int           scancodes[GLFW_KEY_LAST + 1];\n    char*               clipboardString;\n    CGPoint             cascadePoint;\n    // Where to place the cursor when re-enabled\n    double              restoreCursorPosX, restoreCursorPosY;\n    // The window whose disabled cursor mode is active\n    _GLFWwindow*        disabledCursorWindow;\n\n    struct {\n        CFBundleRef     bundle;\n        PFN_TISCopyCurrentKeyboardLayoutInputSource CopyCurrentKeyboardLayoutInputSource;\n        PFN_TISGetInputSourceProperty GetInputSourceProperty;\n        PFN_LMGetKbdType GetKbdType;\n        CFStringRef     kPropertyUnicodeKeyLayoutData;\n    } tis;\n\n} _GLFWlibraryNS;\n\n// Cocoa-specific per-monitor data\n//\ntypedef struct _GLFWmonitorNS\n{\n    CGDirectDisplayID   displayID;\n    CGDisplayModeRef    previousMode;\n    uint32_t            unitNumber;\n    id                  screen;\n    double              fallbackRefreshRate;\n\n} _GLFWmonitorNS;\n\n// Cocoa-specific per-cursor data\n//\ntypedef struct _GLFWcursorNS\n{\n    id              object;\n\n} _GLFWcursorNS;\n\n// Cocoa-specific global timer data\n//\ntypedef struct _GLFWtimerNS\n{\n    uint64_t        frequency;\n\n} _GLFWtimerNS;\n\n\nvoid _glfwInitTimerNS(void);\n\nvoid _glfwPollMonitorsNS(void);\nvoid _glfwSetVideoModeNS(_GLFWmonitor* monitor, const GLFWvidmode* desired);\nvoid _glfwRestoreVideoModeNS(_GLFWmonitor* monitor);\n\nfloat _glfwTransformYNS(float y);\n\nvoid* _glfwLoadLocalVulkanLoaderNS(void);\n\n"
  },
  {
    "path": "thirdparty/glfw/src/cocoa_time.c",
    "content": "//========================================================================\n// GLFW 3.3 macOS - www.glfw.org\n//------------------------------------------------------------------------\n// Copyright (c) 2009-2016 Camilla Löwy <elmindreda@glfw.org>\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//    claim that you wrote the original software. If you use this software\n//    in a product, an acknowledgment in the product documentation would\n//    be appreciated but is not required.\n//\n// 2. Altered source versions must be plainly marked as such, and must not\n//    be misrepresented as being the original software.\n//\n// 3. This notice may not be removed or altered from any source\n//    distribution.\n//\n//========================================================================\n// It is fine to use C99 in this file because it will not be built with VS\n//========================================================================\n\n#include \"internal.h\"\n\n#include <mach/mach_time.h>\n\n\n//////////////////////////////////////////////////////////////////////////\n//////                       GLFW internal API                      //////\n//////////////////////////////////////////////////////////////////////////\n\n// Initialise timer\n//\nvoid _glfwInitTimerNS(void)\n{\n    mach_timebase_info_data_t info;\n    mach_timebase_info(&info);\n\n    _glfw.timer.ns.frequency = (info.denom * 1e9) / info.numer;\n}\n\n\n//////////////////////////////////////////////////////////////////////////\n//////                       GLFW platform API                      //////\n//////////////////////////////////////////////////////////////////////////\n\nuint64_t _glfwPlatformGetTimerValue(void)\n{\n    return mach_absolute_time();\n}\n\nuint64_t _glfwPlatformGetTimerFrequency(void)\n{\n    return _glfw.timer.ns.frequency;\n}\n\n"
  },
  {
    "path": "thirdparty/glfw/src/cocoa_window.m",
    "content": "//========================================================================\n// GLFW 3.3 macOS - www.glfw.org\n//------------------------------------------------------------------------\n// Copyright (c) 2009-2019 Camilla Löwy <elmindreda@glfw.org>\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//    claim that you wrote the original software. If you use this software\n//    in a product, an acknowledgment in the product documentation would\n//    be appreciated but is not required.\n//\n// 2. Altered source versions must be plainly marked as such, and must not\n//    be misrepresented as being the original software.\n//\n// 3. This notice may not be removed or altered from any source\n//    distribution.\n//\n//========================================================================\n// It is fine to use C99 in this file because it will not be built with VS\n//========================================================================\n\n#include \"internal.h\"\n\n#include <float.h>\n#include <string.h>\n\n// Returns the style mask corresponding to the window settings\n//\nstatic NSUInteger getStyleMask(_GLFWwindow* window)\n{\n    NSUInteger styleMask = NSWindowStyleMaskMiniaturizable;\n\n    if (window->monitor || !window->decorated)\n        styleMask |= NSWindowStyleMaskBorderless;\n    else\n    {\n        styleMask |= NSWindowStyleMaskTitled |\n                     NSWindowStyleMaskClosable;\n\n        if (window->resizable)\n            styleMask |= NSWindowStyleMaskResizable;\n    }\n\n    return styleMask;\n}\n\n// Returns whether the cursor is in the content area of the specified window\n//\nstatic GLFWbool cursorInContentArea(_GLFWwindow* window)\n{\n    const NSPoint pos = [window->ns.object mouseLocationOutsideOfEventStream];\n    return [window->ns.view mouse:pos inRect:[window->ns.view frame]];\n}\n\n// Hides the cursor if not already hidden\n//\nstatic void hideCursor(_GLFWwindow* window)\n{\n    if (!_glfw.ns.cursorHidden)\n    {\n        [NSCursor hide];\n        _glfw.ns.cursorHidden = GLFW_TRUE;\n    }\n}\n\n// Shows the cursor if not already shown\n//\nstatic void showCursor(_GLFWwindow* window)\n{\n    if (_glfw.ns.cursorHidden)\n    {\n        [NSCursor unhide];\n        _glfw.ns.cursorHidden = GLFW_FALSE;\n    }\n}\n\n// Updates the cursor image according to its cursor mode\n//\nstatic void updateCursorImage(_GLFWwindow* window)\n{\n    if (window->cursorMode == GLFW_CURSOR_NORMAL)\n    {\n        showCursor(window);\n\n        if (window->cursor)\n            [(NSCursor*) window->cursor->ns.object set];\n        else\n            [[NSCursor arrowCursor] set];\n    }\n    else\n        hideCursor(window);\n}\n\n// Apply chosen cursor mode to a focused window\n//\nstatic void updateCursorMode(_GLFWwindow* window)\n{\n    if (window->cursorMode == GLFW_CURSOR_DISABLED)\n    {\n        _glfw.ns.disabledCursorWindow = window;\n        _glfwPlatformGetCursorPos(window,\n                                  &_glfw.ns.restoreCursorPosX,\n                                  &_glfw.ns.restoreCursorPosY);\n        _glfwCenterCursorInContentArea(window);\n        CGAssociateMouseAndMouseCursorPosition(false);\n    }\n    else if (_glfw.ns.disabledCursorWindow == window)\n    {\n        _glfw.ns.disabledCursorWindow = NULL;\n        CGAssociateMouseAndMouseCursorPosition(true);\n        _glfwPlatformSetCursorPos(window,\n                                  _glfw.ns.restoreCursorPosX,\n                                  _glfw.ns.restoreCursorPosY);\n    }\n\n    if (cursorInContentArea(window))\n        updateCursorImage(window);\n}\n\n// Make the specified window and its video mode active on its monitor\n//\nstatic void acquireMonitor(_GLFWwindow* window)\n{\n    _glfwSetVideoModeNS(window->monitor, &window->videoMode);\n    const CGRect bounds = CGDisplayBounds(window->monitor->ns.displayID);\n    const NSRect frame = NSMakeRect(bounds.origin.x,\n                                    _glfwTransformYNS(bounds.origin.y + bounds.size.height - 1),\n                                    bounds.size.width,\n                                    bounds.size.height);\n\n    [window->ns.object setFrame:frame display:YES];\n\n    _glfwInputMonitorWindow(window->monitor, window);\n}\n\n// Remove the window and restore the original video mode\n//\nstatic void releaseMonitor(_GLFWwindow* window)\n{\n    if (window->monitor->window != window)\n        return;\n\n    _glfwInputMonitorWindow(window->monitor, NULL);\n    _glfwRestoreVideoModeNS(window->monitor);\n}\n\n// Translates macOS key modifiers into GLFW ones\n//\nstatic int translateFlags(NSUInteger flags)\n{\n    int mods = 0;\n\n    if (flags & NSEventModifierFlagShift)\n        mods |= GLFW_MOD_SHIFT;\n    if (flags & NSEventModifierFlagControl)\n        mods |= GLFW_MOD_CONTROL;\n    if (flags & NSEventModifierFlagOption)\n        mods |= GLFW_MOD_ALT;\n    if (flags & NSEventModifierFlagCommand)\n        mods |= GLFW_MOD_SUPER;\n    if (flags & NSEventModifierFlagCapsLock)\n        mods |= GLFW_MOD_CAPS_LOCK;\n\n    return mods;\n}\n\n// Translates a macOS keycode to a GLFW keycode\n//\nstatic int translateKey(unsigned int key)\n{\n    if (key >= sizeof(_glfw.ns.keycodes) / sizeof(_glfw.ns.keycodes[0]))\n        return GLFW_KEY_UNKNOWN;\n\n    return _glfw.ns.keycodes[key];\n}\n\n// Translate a GLFW keycode to a Cocoa modifier flag\n//\nstatic NSUInteger translateKeyToModifierFlag(int key)\n{\n    switch (key)\n    {\n        case GLFW_KEY_LEFT_SHIFT:\n        case GLFW_KEY_RIGHT_SHIFT:\n            return NSEventModifierFlagShift;\n        case GLFW_KEY_LEFT_CONTROL:\n        case GLFW_KEY_RIGHT_CONTROL:\n            return NSEventModifierFlagControl;\n        case GLFW_KEY_LEFT_ALT:\n        case GLFW_KEY_RIGHT_ALT:\n            return NSEventModifierFlagOption;\n        case GLFW_KEY_LEFT_SUPER:\n        case GLFW_KEY_RIGHT_SUPER:\n            return NSEventModifierFlagCommand;\n        case GLFW_KEY_CAPS_LOCK:\n            return NSEventModifierFlagCapsLock;\n    }\n\n    return 0;\n}\n\n// Defines a constant for empty ranges in NSTextInputClient\n//\nstatic const NSRange kEmptyRange = { NSNotFound, 0 };\n\n\n//------------------------------------------------------------------------\n// Delegate for window related notifications\n//------------------------------------------------------------------------\n\n@interface GLFWWindowDelegate : NSObject\n{\n    _GLFWwindow* window;\n}\n\n- (instancetype)initWithGlfwWindow:(_GLFWwindow *)initWindow;\n\n@end\n\n@implementation GLFWWindowDelegate\n\n- (instancetype)initWithGlfwWindow:(_GLFWwindow *)initWindow\n{\n    self = [super init];\n    if (self != nil)\n        window = initWindow;\n\n    return self;\n}\n\n- (BOOL)windowShouldClose:(id)sender\n{\n    _glfwInputWindowCloseRequest(window);\n    return NO;\n}\n\n- (void)windowDidResize:(NSNotification *)notification\n{\n    if (window->context.client != GLFW_NO_API)\n        [window->context.nsgl.object update];\n\n    if (_glfw.ns.disabledCursorWindow == window)\n        _glfwCenterCursorInContentArea(window);\n\n    const int maximized = [window->ns.object isZoomed];\n    if (window->ns.maximized != maximized)\n    {\n        window->ns.maximized = maximized;\n        _glfwInputWindowMaximize(window, maximized);\n    }\n\n    const NSRect contentRect = [window->ns.view frame];\n    const NSRect fbRect = [window->ns.view convertRectToBacking:contentRect];\n\n    if (fbRect.size.width != window->ns.fbWidth ||\n        fbRect.size.height != window->ns.fbHeight)\n    {\n        window->ns.fbWidth  = fbRect.size.width;\n        window->ns.fbHeight = fbRect.size.height;\n        _glfwInputFramebufferSize(window, fbRect.size.width, fbRect.size.height);\n    }\n\n    if (contentRect.size.width != window->ns.width ||\n        contentRect.size.height != window->ns.height)\n    {\n        window->ns.width  = contentRect.size.width;\n        window->ns.height = contentRect.size.height;\n        _glfwInputWindowSize(window, contentRect.size.width, contentRect.size.height);\n    }\n}\n\n- (void)windowDidMove:(NSNotification *)notification\n{\n    if (window->context.client != GLFW_NO_API)\n        [window->context.nsgl.object update];\n\n    if (_glfw.ns.disabledCursorWindow == window)\n        _glfwCenterCursorInContentArea(window);\n\n    int x, y;\n    _glfwPlatformGetWindowPos(window, &x, &y);\n    _glfwInputWindowPos(window, x, y);\n}\n\n- (void)windowDidMiniaturize:(NSNotification *)notification\n{\n    if (window->monitor)\n        releaseMonitor(window);\n\n    _glfwInputWindowIconify(window, GLFW_TRUE);\n}\n\n- (void)windowDidDeminiaturize:(NSNotification *)notification\n{\n    if (window->monitor)\n        acquireMonitor(window);\n\n    _glfwInputWindowIconify(window, GLFW_FALSE);\n}\n\n- (void)windowDidBecomeKey:(NSNotification *)notification\n{\n    if (_glfw.ns.disabledCursorWindow == window)\n        _glfwCenterCursorInContentArea(window);\n\n    _glfwInputWindowFocus(window, GLFW_TRUE);\n    updateCursorMode(window);\n}\n\n- (void)windowDidResignKey:(NSNotification *)notification\n{\n    if (window->monitor && window->autoIconify)\n        _glfwPlatformIconifyWindow(window);\n\n    _glfwInputWindowFocus(window, GLFW_FALSE);\n}\n\n@end\n\n\n//------------------------------------------------------------------------\n// Content view class for the GLFW window\n//------------------------------------------------------------------------\n\n@interface GLFWContentView : NSView <NSTextInputClient>\n{\n    _GLFWwindow* window;\n    NSTrackingArea* trackingArea;\n    NSMutableAttributedString* markedText;\n}\n\n- (instancetype)initWithGlfwWindow:(_GLFWwindow *)initWindow;\n\n@end\n\n@implementation GLFWContentView\n\n- (instancetype)initWithGlfwWindow:(_GLFWwindow *)initWindow\n{\n    self = [super init];\n    if (self != nil)\n    {\n        window = initWindow;\n        trackingArea = nil;\n        markedText = [[NSMutableAttributedString alloc] init];\n\n        [self updateTrackingAreas];\n        // NOTE: kUTTypeURL corresponds to NSPasteboardTypeURL but is available\n        //       on 10.7 without having been deprecated yet\n        [self registerForDraggedTypes:@[(__bridge NSString*) kUTTypeURL]];\n    }\n\n    return self;\n}\n\n- (void)dealloc\n{\n    [trackingArea release];\n    [markedText release];\n    [super dealloc];\n}\n\n- (BOOL)isOpaque\n{\n    return [window->ns.object isOpaque];\n}\n\n- (BOOL)canBecomeKeyView\n{\n    return YES;\n}\n\n- (BOOL)acceptsFirstResponder\n{\n    return YES;\n}\n\n- (BOOL)wantsUpdateLayer\n{\n    return YES;\n}\n\n- (void)updateLayer\n{\n    if (window->context.client != GLFW_NO_API)\n        [window->context.nsgl.object update];\n\n    _glfwInputWindowDamage(window);\n}\n\n- (void)cursorUpdate:(NSEvent *)event\n{\n    updateCursorImage(window);\n}\n\n- (BOOL)acceptsFirstMouse:(NSEvent *)event\n{\n    return YES;\n}\n\n- (void)mouseDown:(NSEvent *)event\n{\n    _glfwInputMouseClick(window,\n                         GLFW_MOUSE_BUTTON_LEFT,\n                         GLFW_PRESS,\n                         translateFlags([event modifierFlags]));\n}\n\n- (void)mouseDragged:(NSEvent *)event\n{\n    [self mouseMoved:event];\n}\n\n- (void)mouseUp:(NSEvent *)event\n{\n    _glfwInputMouseClick(window,\n                         GLFW_MOUSE_BUTTON_LEFT,\n                         GLFW_RELEASE,\n                         translateFlags([event modifierFlags]));\n}\n\n- (void)mouseMoved:(NSEvent *)event\n{\n    if (window->cursorMode == GLFW_CURSOR_DISABLED)\n    {\n        const double dx = [event deltaX] - window->ns.cursorWarpDeltaX;\n        const double dy = [event deltaY] - window->ns.cursorWarpDeltaY;\n\n        _glfwInputCursorPos(window,\n                            window->virtualCursorPosX + dx,\n                            window->virtualCursorPosY + dy);\n    }\n    else\n    {\n        const NSRect contentRect = [window->ns.view frame];\n        // NOTE: The returned location uses base 0,1 not 0,0\n        const NSPoint pos = [event locationInWindow];\n\n        _glfwInputCursorPos(window, pos.x, contentRect.size.height - pos.y);\n    }\n\n    window->ns.cursorWarpDeltaX = 0;\n    window->ns.cursorWarpDeltaY = 0;\n}\n\n- (void)rightMouseDown:(NSEvent *)event\n{\n    _glfwInputMouseClick(window,\n                         GLFW_MOUSE_BUTTON_RIGHT,\n                         GLFW_PRESS,\n                         translateFlags([event modifierFlags]));\n}\n\n- (void)rightMouseDragged:(NSEvent *)event\n{\n    [self mouseMoved:event];\n}\n\n- (void)rightMouseUp:(NSEvent *)event\n{\n    _glfwInputMouseClick(window,\n                         GLFW_MOUSE_BUTTON_RIGHT,\n                         GLFW_RELEASE,\n                         translateFlags([event modifierFlags]));\n}\n\n- (void)otherMouseDown:(NSEvent *)event\n{\n    _glfwInputMouseClick(window,\n                         (int) [event buttonNumber],\n                         GLFW_PRESS,\n                         translateFlags([event modifierFlags]));\n}\n\n- (void)otherMouseDragged:(NSEvent *)event\n{\n    [self mouseMoved:event];\n}\n\n- (void)otherMouseUp:(NSEvent *)event\n{\n    _glfwInputMouseClick(window,\n                         (int) [event buttonNumber],\n                         GLFW_RELEASE,\n                         translateFlags([event modifierFlags]));\n}\n\n- (void)mouseExited:(NSEvent *)event\n{\n    if (window->cursorMode == GLFW_CURSOR_HIDDEN)\n        showCursor(window);\n\n    _glfwInputCursorEnter(window, GLFW_FALSE);\n}\n\n- (void)mouseEntered:(NSEvent *)event\n{\n    if (window->cursorMode == GLFW_CURSOR_HIDDEN)\n        hideCursor(window);\n\n    _glfwInputCursorEnter(window, GLFW_TRUE);\n}\n\n- (void)viewDidChangeBackingProperties\n{\n    const NSRect contentRect = [window->ns.view frame];\n    const NSRect fbRect = [window->ns.view convertRectToBacking:contentRect];\n\n    if (fbRect.size.width != window->ns.fbWidth ||\n        fbRect.size.height != window->ns.fbHeight)\n    {\n        window->ns.fbWidth  = fbRect.size.width;\n        window->ns.fbHeight = fbRect.size.height;\n        _glfwInputFramebufferSize(window, fbRect.size.width, fbRect.size.height);\n    }\n\n    const float xscale = fbRect.size.width / contentRect.size.width;\n    const float yscale = fbRect.size.height / contentRect.size.height;\n\n    if (xscale != window->ns.xscale || yscale != window->ns.yscale)\n    {\n        window->ns.xscale = xscale;\n        window->ns.yscale = yscale;\n        _glfwInputWindowContentScale(window, xscale, yscale);\n\n        if (window->ns.retina && window->ns.layer)\n            [window->ns.layer setContentsScale:[window->ns.object backingScaleFactor]];\n    }\n}\n\n- (void)drawRect:(NSRect)rect\n{\n    _glfwInputWindowDamage(window);\n}\n\n- (void)updateTrackingAreas\n{\n    if (trackingArea != nil)\n    {\n        [self removeTrackingArea:trackingArea];\n        [trackingArea release];\n    }\n\n    const NSTrackingAreaOptions options = NSTrackingMouseEnteredAndExited |\n                                          NSTrackingActiveInKeyWindow |\n                                          NSTrackingEnabledDuringMouseDrag |\n                                          NSTrackingCursorUpdate |\n                                          NSTrackingInVisibleRect |\n                                          NSTrackingAssumeInside;\n\n    trackingArea = [[NSTrackingArea alloc] initWithRect:[self bounds]\n                                                options:options\n                                                  owner:self\n                                               userInfo:nil];\n\n    [self addTrackingArea:trackingArea];\n    [super updateTrackingAreas];\n}\n\n- (void)keyDown:(NSEvent *)event\n{\n    const int key = translateKey([event keyCode]);\n    const int mods = translateFlags([event modifierFlags]);\n\n    _glfwInputKey(window, key, [event keyCode], GLFW_PRESS, mods);\n\n    [self interpretKeyEvents:@[event]];\n}\n\n- (void)flagsChanged:(NSEvent *)event\n{\n    int action;\n    const unsigned int modifierFlags =\n        [event modifierFlags] & NSEventModifierFlagDeviceIndependentFlagsMask;\n    const int key = translateKey([event keyCode]);\n    const int mods = translateFlags(modifierFlags);\n    const NSUInteger keyFlag = translateKeyToModifierFlag(key);\n\n    if (keyFlag & modifierFlags)\n    {\n        if (window->keys[key] == GLFW_PRESS)\n            action = GLFW_RELEASE;\n        else\n            action = GLFW_PRESS;\n    }\n    else\n        action = GLFW_RELEASE;\n\n    _glfwInputKey(window, key, [event keyCode], action, mods);\n}\n\n- (void)keyUp:(NSEvent *)event\n{\n    const int key = translateKey([event keyCode]);\n    const int mods = translateFlags([event modifierFlags]);\n    _glfwInputKey(window, key, [event keyCode], GLFW_RELEASE, mods);\n}\n\n- (void)scrollWheel:(NSEvent *)event\n{\n    double deltaX = [event scrollingDeltaX];\n    double deltaY = [event scrollingDeltaY];\n\n    if ([event hasPreciseScrollingDeltas])\n    {\n        deltaX *= 0.1;\n        deltaY *= 0.1;\n    }\n\n    if (fabs(deltaX) > 0.0 || fabs(deltaY) > 0.0)\n        _glfwInputScroll(window, deltaX, deltaY);\n}\n\n- (NSDragOperation)draggingEntered:(id <NSDraggingInfo>)sender\n{\n    // HACK: We don't know what to say here because we don't know what the\n    //       application wants to do with the paths\n    return NSDragOperationGeneric;\n}\n\n- (BOOL)performDragOperation:(id <NSDraggingInfo>)sender\n{\n    const NSRect contentRect = [window->ns.view frame];\n    // NOTE: The returned location uses base 0,1 not 0,0\n    const NSPoint pos = [sender draggingLocation];\n    _glfwInputCursorPos(window, pos.x, contentRect.size.height - pos.y);\n\n    NSPasteboard* pasteboard = [sender draggingPasteboard];\n    NSDictionary* options = @{NSPasteboardURLReadingFileURLsOnlyKey:@YES};\n    NSArray* urls = [pasteboard readObjectsForClasses:@[[NSURL class]]\n                                              options:options];\n    const NSUInteger count = [urls count];\n    if (count)\n    {\n        char** paths = calloc(count, sizeof(char*));\n\n        for (NSUInteger i = 0;  i < count;  i++)\n            paths[i] = _glfw_strdup([urls[i] fileSystemRepresentation]);\n\n        _glfwInputDrop(window, (int) count, (const char**) paths);\n\n        for (NSUInteger i = 0;  i < count;  i++)\n            free(paths[i]);\n        free(paths);\n    }\n\n    return YES;\n}\n\n- (BOOL)hasMarkedText\n{\n    return [markedText length] > 0;\n}\n\n- (NSRange)markedRange\n{\n    if ([markedText length] > 0)\n        return NSMakeRange(0, [markedText length] - 1);\n    else\n        return kEmptyRange;\n}\n\n- (NSRange)selectedRange\n{\n    return kEmptyRange;\n}\n\n- (void)setMarkedText:(id)string\n        selectedRange:(NSRange)selectedRange\n     replacementRange:(NSRange)replacementRange\n{\n    [markedText release];\n    if ([string isKindOfClass:[NSAttributedString class]])\n        markedText = [[NSMutableAttributedString alloc] initWithAttributedString:string];\n    else\n        markedText = [[NSMutableAttributedString alloc] initWithString:string];\n}\n\n- (void)unmarkText\n{\n    [[markedText mutableString] setString:@\"\"];\n}\n\n- (NSArray*)validAttributesForMarkedText\n{\n    return [NSArray array];\n}\n\n- (NSAttributedString*)attributedSubstringForProposedRange:(NSRange)range\n                                               actualRange:(NSRangePointer)actualRange\n{\n    return nil;\n}\n\n- (NSUInteger)characterIndexForPoint:(NSPoint)point\n{\n    return 0;\n}\n\n- (NSRect)firstRectForCharacterRange:(NSRange)range\n                         actualRange:(NSRangePointer)actualRange\n{\n    const NSRect frame = [window->ns.view frame];\n    return NSMakeRect(frame.origin.x, frame.origin.y, 0.0, 0.0);\n}\n\n- (void)insertText:(id)string replacementRange:(NSRange)replacementRange\n{\n    NSString* characters;\n    NSEvent* event = [NSApp currentEvent];\n    const int mods = translateFlags([event modifierFlags]);\n    const int plain = !(mods & GLFW_MOD_SUPER);\n\n    if ([string isKindOfClass:[NSAttributedString class]])\n        characters = [string string];\n    else\n        characters = (NSString*) string;\n\n    const NSUInteger length = [characters length];\n    for (NSUInteger i = 0;  i < length;  i++)\n    {\n        const unichar codepoint = [characters characterAtIndex:i];\n        if ((codepoint & 0xff00) == 0xf700)\n            continue;\n\n        _glfwInputChar(window, codepoint, mods, plain);\n    }\n}\n\n- (void)doCommandBySelector:(SEL)selector\n{\n}\n\n@end\n\n\n//------------------------------------------------------------------------\n// GLFW window class\n//------------------------------------------------------------------------\n\n@interface GLFWWindow : NSWindow {}\n@end\n\n@implementation GLFWWindow\n\n- (BOOL)canBecomeKeyWindow\n{\n    // Required for NSWindowStyleMaskBorderless windows\n    return YES;\n}\n\n- (BOOL)canBecomeMainWindow\n{\n    return YES;\n}\n\n@end\n\n\n// Create the Cocoa window\n//\nstatic GLFWbool createNativeWindow(_GLFWwindow* window,\n                                   const _GLFWwndconfig* wndconfig,\n                                   const _GLFWfbconfig* fbconfig)\n{\n    window->ns.delegate = [[GLFWWindowDelegate alloc] initWithGlfwWindow:window];\n    if (window->ns.delegate == nil)\n    {\n        _glfwInputError(GLFW_PLATFORM_ERROR,\n                        \"Cocoa: Failed to create window delegate\");\n        return GLFW_FALSE;\n    }\n\n    NSRect contentRect;\n\n    if (window->monitor)\n    {\n        GLFWvidmode mode;\n        int xpos, ypos;\n\n        _glfwPlatformGetVideoMode(window->monitor, &mode);\n        _glfwPlatformGetMonitorPos(window->monitor, &xpos, &ypos);\n\n        contentRect = NSMakeRect(xpos, ypos, mode.width, mode.height);\n    }\n    else\n        contentRect = NSMakeRect(0, 0, wndconfig->width, wndconfig->height);\n\n    window->ns.object = [[GLFWWindow alloc]\n        initWithContentRect:contentRect\n                  styleMask:getStyleMask(window)\n                    backing:NSBackingStoreBuffered\n                      defer:NO];\n\n    if (window->ns.object == nil)\n    {\n        _glfwInputError(GLFW_PLATFORM_ERROR, \"Cocoa: Failed to create window\");\n        return GLFW_FALSE;\n    }\n\n    if (window->monitor)\n        [window->ns.object setLevel:NSMainMenuWindowLevel + 1];\n    else\n    {\n        [(NSWindow*) window->ns.object center];\n        _glfw.ns.cascadePoint =\n            NSPointToCGPoint([window->ns.object cascadeTopLeftFromPoint:\n                              NSPointFromCGPoint(_glfw.ns.cascadePoint)]);\n\n        if (wndconfig->resizable)\n        {\n            const NSWindowCollectionBehavior behavior =\n                NSWindowCollectionBehaviorFullScreenPrimary |\n                NSWindowCollectionBehaviorManaged;\n            [window->ns.object setCollectionBehavior:behavior];\n        }\n\n        if (wndconfig->floating)\n            [window->ns.object setLevel:NSFloatingWindowLevel];\n\n        if (wndconfig->maximized)\n            [window->ns.object zoom:nil];\n    }\n\n    if (strlen(wndconfig->ns.frameName))\n        [window->ns.object setFrameAutosaveName:@(wndconfig->ns.frameName)];\n\n    window->ns.view = [[GLFWContentView alloc] initWithGlfwWindow:window];\n    window->ns.retina = wndconfig->ns.retina;\n\n    if (fbconfig->transparent)\n    {\n        [window->ns.object setOpaque:NO];\n        [window->ns.object setHasShadow:NO];\n        [window->ns.object setBackgroundColor:[NSColor clearColor]];\n    }\n\n    [window->ns.object setContentView:window->ns.view];\n    [window->ns.object makeFirstResponder:window->ns.view];\n    [window->ns.object setTitle:@(wndconfig->title)];\n    [window->ns.object setDelegate:window->ns.delegate];\n    [window->ns.object setAcceptsMouseMovedEvents:YES];\n    [window->ns.object setRestorable:NO];\n\n#if MAC_OS_X_VERSION_MAX_ALLOWED >= 101200\n    if ([window->ns.object respondsToSelector:@selector(setTabbingMode:)])\n        [window->ns.object setTabbingMode:NSWindowTabbingModeDisallowed];\n#endif\n\n    _glfwPlatformGetWindowSize(window, &window->ns.width, &window->ns.height);\n    _glfwPlatformGetFramebufferSize(window, &window->ns.fbWidth, &window->ns.fbHeight);\n\n    return GLFW_TRUE;\n}\n\n\n//////////////////////////////////////////////////////////////////////////\n//////                       GLFW internal API                      //////\n//////////////////////////////////////////////////////////////////////////\n\n// Transforms a y-coordinate between the CG display and NS screen spaces\n//\nfloat _glfwTransformYNS(float y)\n{\n    return CGDisplayBounds(CGMainDisplayID()).size.height - y - 1;\n}\n\n\n//////////////////////////////////////////////////////////////////////////\n//////                       GLFW platform API                      //////\n//////////////////////////////////////////////////////////////////////////\n\nint _glfwPlatformCreateWindow(_GLFWwindow* window,\n                              const _GLFWwndconfig* wndconfig,\n                              const _GLFWctxconfig* ctxconfig,\n                              const _GLFWfbconfig* fbconfig)\n{\n    @autoreleasepool {\n\n    if (!_glfw.ns.finishedLaunching)\n        [NSApp run];\n\n    if (!createNativeWindow(window, wndconfig, fbconfig))\n        return GLFW_FALSE;\n\n    if (ctxconfig->client != GLFW_NO_API)\n    {\n        if (ctxconfig->source == GLFW_NATIVE_CONTEXT_API)\n        {\n            if (!_glfwInitNSGL())\n                return GLFW_FALSE;\n            if (!_glfwCreateContextNSGL(window, ctxconfig, fbconfig))\n                return GLFW_FALSE;\n        }\n        else if (ctxconfig->source == GLFW_EGL_CONTEXT_API)\n        {\n            if (!_glfwInitEGL())\n                return GLFW_FALSE;\n            if (!_glfwCreateContextEGL(window, ctxconfig, fbconfig))\n                return GLFW_FALSE;\n        }\n        else if (ctxconfig->source == GLFW_OSMESA_CONTEXT_API)\n        {\n            if (!_glfwInitOSMesa())\n                return GLFW_FALSE;\n            if (!_glfwCreateContextOSMesa(window, ctxconfig, fbconfig))\n                return GLFW_FALSE;\n        }\n    }\n\n    if (window->monitor)\n    {\n        _glfwPlatformShowWindow(window);\n        _glfwPlatformFocusWindow(window);\n        acquireMonitor(window);\n    }\n\n    return GLFW_TRUE;\n\n    } // autoreleasepool\n}\n\nvoid _glfwPlatformDestroyWindow(_GLFWwindow* window)\n{\n    @autoreleasepool {\n\n    if (_glfw.ns.disabledCursorWindow == window)\n        _glfw.ns.disabledCursorWindow = NULL;\n\n    [window->ns.object orderOut:nil];\n\n    if (window->monitor)\n        releaseMonitor(window);\n\n    if (window->context.destroy)\n        window->context.destroy(window);\n\n    [window->ns.object setDelegate:nil];\n    [window->ns.delegate release];\n    window->ns.delegate = nil;\n\n    [window->ns.view release];\n    window->ns.view = nil;\n\n    [window->ns.object close];\n    window->ns.object = nil;\n\n    // HACK: Allow Cocoa to catch up before returning\n    _glfwPlatformPollEvents();\n\n    } // autoreleasepool\n}\n\nvoid _glfwPlatformSetWindowTitle(_GLFWwindow* window, const char* title)\n{\n    @autoreleasepool {\n    NSString* string = @(title);\n    [window->ns.object setTitle:string];\n    // HACK: Set the miniwindow title explicitly as setTitle: doesn't update it\n    //       if the window lacks NSWindowStyleMaskTitled\n    [window->ns.object setMiniwindowTitle:string];\n    } // autoreleasepool\n}\n\nvoid _glfwPlatformSetWindowIcon(_GLFWwindow* window,\n                                int count, const GLFWimage* images)\n{\n    // Regular windows do not have icons\n}\n\nvoid _glfwPlatformGetWindowPos(_GLFWwindow* window, int* xpos, int* ypos)\n{\n    @autoreleasepool {\n\n    const NSRect contentRect =\n        [window->ns.object contentRectForFrameRect:[window->ns.object frame]];\n\n    if (xpos)\n        *xpos = contentRect.origin.x;\n    if (ypos)\n        *ypos = _glfwTransformYNS(contentRect.origin.y + contentRect.size.height - 1);\n\n    } // autoreleasepool\n}\n\nvoid _glfwPlatformSetWindowPos(_GLFWwindow* window, int x, int y)\n{\n    @autoreleasepool {\n\n    const NSRect contentRect = [window->ns.view frame];\n    const NSRect dummyRect = NSMakeRect(x, _glfwTransformYNS(y + contentRect.size.height - 1), 0, 0);\n    const NSRect frameRect = [window->ns.object frameRectForContentRect:dummyRect];\n    [window->ns.object setFrameOrigin:frameRect.origin];\n\n    } // autoreleasepool\n}\n\nvoid _glfwPlatformGetWindowSize(_GLFWwindow* window, int* width, int* height)\n{\n    @autoreleasepool {\n\n    const NSRect contentRect = [window->ns.view frame];\n\n    if (width)\n        *width = contentRect.size.width;\n    if (height)\n        *height = contentRect.size.height;\n\n    } // autoreleasepool\n}\n\nvoid _glfwPlatformSetWindowSize(_GLFWwindow* window, int width, int height)\n{\n    @autoreleasepool {\n\n    if (window->monitor)\n    {\n        if (window->monitor->window == window)\n            acquireMonitor(window);\n    }\n    else\n    {\n        NSRect contentRect =\n            [window->ns.object contentRectForFrameRect:[window->ns.object frame]];\n        contentRect.origin.y += contentRect.size.height - height;\n        contentRect.size = NSMakeSize(width, height);\n        [window->ns.object setFrame:[window->ns.object frameRectForContentRect:contentRect]\n                            display:YES];\n    }\n\n    } // autoreleasepool\n}\n\nvoid _glfwPlatformSetWindowSizeLimits(_GLFWwindow* window,\n                                      int minwidth, int minheight,\n                                      int maxwidth, int maxheight)\n{\n    @autoreleasepool {\n\n    if (minwidth == GLFW_DONT_CARE || minheight == GLFW_DONT_CARE)\n        [window->ns.object setContentMinSize:NSMakeSize(0, 0)];\n    else\n        [window->ns.object setContentMinSize:NSMakeSize(minwidth, minheight)];\n\n    if (maxwidth == GLFW_DONT_CARE || maxheight == GLFW_DONT_CARE)\n        [window->ns.object setContentMaxSize:NSMakeSize(DBL_MAX, DBL_MAX)];\n    else\n        [window->ns.object setContentMaxSize:NSMakeSize(maxwidth, maxheight)];\n\n    } // autoreleasepool\n}\n\nvoid _glfwPlatformSetWindowAspectRatio(_GLFWwindow* window, int numer, int denom)\n{\n    @autoreleasepool {\n    if (numer == GLFW_DONT_CARE || denom == GLFW_DONT_CARE)\n        [window->ns.object setResizeIncrements:NSMakeSize(1.0, 1.0)];\n    else\n        [window->ns.object setContentAspectRatio:NSMakeSize(numer, denom)];\n    } // autoreleasepool\n}\n\nvoid _glfwPlatformGetFramebufferSize(_GLFWwindow* window, int* width, int* height)\n{\n    @autoreleasepool {\n\n    const NSRect contentRect = [window->ns.view frame];\n    const NSRect fbRect = [window->ns.view convertRectToBacking:contentRect];\n\n    if (width)\n        *width = (int) fbRect.size.width;\n    if (height)\n        *height = (int) fbRect.size.height;\n\n    } // autoreleasepool\n}\n\nvoid _glfwPlatformGetWindowFrameSize(_GLFWwindow* window,\n                                     int* left, int* top,\n                                     int* right, int* bottom)\n{\n    @autoreleasepool {\n\n    const NSRect contentRect = [window->ns.view frame];\n    const NSRect frameRect = [window->ns.object frameRectForContentRect:contentRect];\n\n    if (left)\n        *left = contentRect.origin.x - frameRect.origin.x;\n    if (top)\n        *top = frameRect.origin.y + frameRect.size.height -\n               contentRect.origin.y - contentRect.size.height;\n    if (right)\n        *right = frameRect.origin.x + frameRect.size.width -\n                 contentRect.origin.x - contentRect.size.width;\n    if (bottom)\n        *bottom = contentRect.origin.y - frameRect.origin.y;\n\n    } // autoreleasepool\n}\n\nvoid _glfwPlatformGetWindowContentScale(_GLFWwindow* window,\n                                        float* xscale, float* yscale)\n{\n    @autoreleasepool {\n\n    const NSRect points = [window->ns.view frame];\n    const NSRect pixels = [window->ns.view convertRectToBacking:points];\n\n    if (xscale)\n        *xscale = (float) (pixels.size.width / points.size.width);\n    if (yscale)\n        *yscale = (float) (pixels.size.height / points.size.height);\n\n    } // autoreleasepool\n}\n\nvoid _glfwPlatformIconifyWindow(_GLFWwindow* window)\n{\n    @autoreleasepool {\n    [window->ns.object miniaturize:nil];\n    } // autoreleasepool\n}\n\nvoid _glfwPlatformRestoreWindow(_GLFWwindow* window)\n{\n    @autoreleasepool {\n    if ([window->ns.object isMiniaturized])\n        [window->ns.object deminiaturize:nil];\n    else if ([window->ns.object isZoomed])\n        [window->ns.object zoom:nil];\n    } // autoreleasepool\n}\n\nvoid _glfwPlatformMaximizeWindow(_GLFWwindow* window)\n{\n    @autoreleasepool {\n    if (![window->ns.object isZoomed])\n        [window->ns.object zoom:nil];\n    } // autoreleasepool\n}\n\nvoid _glfwPlatformShowWindow(_GLFWwindow* window)\n{\n    @autoreleasepool {\n    [window->ns.object orderFront:nil];\n    } // autoreleasepool\n}\n\nvoid _glfwPlatformHideWindow(_GLFWwindow* window)\n{\n    @autoreleasepool {\n    [window->ns.object orderOut:nil];\n    } // autoreleasepool\n}\n\nvoid _glfwPlatformRequestWindowAttention(_GLFWwindow* window)\n{\n    @autoreleasepool {\n    [NSApp requestUserAttention:NSInformationalRequest];\n    } // autoreleasepool\n}\n\nvoid _glfwPlatformFocusWindow(_GLFWwindow* window)\n{\n    @autoreleasepool {\n    // Make us the active application\n    // HACK: This is here to prevent applications using only hidden windows from\n    //       being activated, but should probably not be done every time any\n    //       window is shown\n    [NSApp activateIgnoringOtherApps:YES];\n    [window->ns.object makeKeyAndOrderFront:nil];\n    } // autoreleasepool\n}\n\nvoid _glfwPlatformSetWindowMonitor(_GLFWwindow* window,\n                                   _GLFWmonitor* monitor,\n                                   int xpos, int ypos,\n                                   int width, int height,\n                                   int refreshRate)\n{\n    @autoreleasepool {\n\n    if (window->monitor == monitor)\n    {\n        if (monitor)\n        {\n            if (monitor->window == window)\n                acquireMonitor(window);\n        }\n        else\n        {\n            const NSRect contentRect =\n                NSMakeRect(xpos, _glfwTransformYNS(ypos + height - 1), width, height);\n            const NSRect frameRect =\n                [window->ns.object frameRectForContentRect:contentRect\n                                                 styleMask:getStyleMask(window)];\n\n            [window->ns.object setFrame:frameRect display:YES];\n        }\n\n        return;\n    }\n\n    if (window->monitor)\n        releaseMonitor(window);\n\n    _glfwInputWindowMonitor(window, monitor);\n\n    // HACK: Allow the state cached in Cocoa to catch up to reality\n    // TODO: Solve this in a less terrible way\n    _glfwPlatformPollEvents();\n\n    const NSUInteger styleMask = getStyleMask(window);\n    [window->ns.object setStyleMask:styleMask];\n    // HACK: Changing the style mask can cause the first responder to be cleared\n    [window->ns.object makeFirstResponder:window->ns.view];\n\n    if (window->monitor)\n    {\n        [window->ns.object setLevel:NSMainMenuWindowLevel + 1];\n        [window->ns.object setHasShadow:NO];\n\n        acquireMonitor(window);\n    }\n    else\n    {\n        NSRect contentRect = NSMakeRect(xpos, _glfwTransformYNS(ypos + height - 1),\n                                        width, height);\n        NSRect frameRect = [window->ns.object frameRectForContentRect:contentRect\n                                                            styleMask:styleMask];\n        [window->ns.object setFrame:frameRect display:YES];\n\n        if (window->numer != GLFW_DONT_CARE &&\n            window->denom != GLFW_DONT_CARE)\n        {\n            [window->ns.object setContentAspectRatio:NSMakeSize(window->numer,\n                                                                window->denom)];\n        }\n\n        if (window->minwidth != GLFW_DONT_CARE &&\n            window->minheight != GLFW_DONT_CARE)\n        {\n            [window->ns.object setContentMinSize:NSMakeSize(window->minwidth,\n                                                            window->minheight)];\n        }\n\n        if (window->maxwidth != GLFW_DONT_CARE &&\n            window->maxheight != GLFW_DONT_CARE)\n        {\n            [window->ns.object setContentMaxSize:NSMakeSize(window->maxwidth,\n                                                            window->maxheight)];\n        }\n\n        if (window->floating)\n            [window->ns.object setLevel:NSFloatingWindowLevel];\n        else\n            [window->ns.object setLevel:NSNormalWindowLevel];\n\n        [window->ns.object setHasShadow:YES];\n        // HACK: Clearing NSWindowStyleMaskTitled resets and disables the window\n        //       title property but the miniwindow title property is unaffected\n        [window->ns.object setTitle:[window->ns.object miniwindowTitle]];\n    }\n\n    } // autoreleasepool\n}\n\nint _glfwPlatformWindowFocused(_GLFWwindow* window)\n{\n    @autoreleasepool {\n    return [window->ns.object isKeyWindow];\n    } // autoreleasepool\n}\n\nint _glfwPlatformWindowIconified(_GLFWwindow* window)\n{\n    @autoreleasepool {\n    return [window->ns.object isMiniaturized];\n    } // autoreleasepool\n}\n\nint _glfwPlatformWindowVisible(_GLFWwindow* window)\n{\n    @autoreleasepool {\n    return [window->ns.object isVisible];\n    } // autoreleasepool\n}\n\nint _glfwPlatformWindowMaximized(_GLFWwindow* window)\n{\n    @autoreleasepool {\n    return [window->ns.object isZoomed];\n    } // autoreleasepool\n}\n\nint _glfwPlatformWindowHovered(_GLFWwindow* window)\n{\n    @autoreleasepool {\n\n    const NSPoint point = [NSEvent mouseLocation];\n\n    if ([NSWindow windowNumberAtPoint:point belowWindowWithWindowNumber:0] !=\n        [window->ns.object windowNumber])\n    {\n        return GLFW_FALSE;\n    }\n\n    return NSMouseInRect(point,\n        [window->ns.object convertRectToScreen:[window->ns.view frame]], NO);\n\n    } // autoreleasepool\n}\n\nint _glfwPlatformFramebufferTransparent(_GLFWwindow* window)\n{\n    @autoreleasepool {\n    return ![window->ns.object isOpaque] && ![window->ns.view isOpaque];\n    } // autoreleasepool\n}\n\nvoid _glfwPlatformSetWindowResizable(_GLFWwindow* window, GLFWbool enabled)\n{\n    @autoreleasepool {\n    [window->ns.object setStyleMask:getStyleMask(window)];\n    } // autoreleasepool\n}\n\nvoid _glfwPlatformSetWindowDecorated(_GLFWwindow* window, GLFWbool enabled)\n{\n    @autoreleasepool {\n    [window->ns.object setStyleMask:getStyleMask(window)];\n    [window->ns.object makeFirstResponder:window->ns.view];\n    } // autoreleasepool\n}\n\nvoid _glfwPlatformSetWindowFloating(_GLFWwindow* window, GLFWbool enabled)\n{\n    @autoreleasepool {\n    if (enabled)\n        [window->ns.object setLevel:NSFloatingWindowLevel];\n    else\n        [window->ns.object setLevel:NSNormalWindowLevel];\n    } // autoreleasepool\n}\n\nfloat _glfwPlatformGetWindowOpacity(_GLFWwindow* window)\n{\n    @autoreleasepool {\n    return (float) [window->ns.object alphaValue];\n    } // autoreleasepool\n}\n\nvoid _glfwPlatformSetWindowOpacity(_GLFWwindow* window, float opacity)\n{\n    @autoreleasepool {\n    [window->ns.object setAlphaValue:opacity];\n    } // autoreleasepool\n}\n\nvoid _glfwPlatformSetRawMouseMotion(_GLFWwindow *window, GLFWbool enabled)\n{\n}\n\nGLFWbool _glfwPlatformRawMouseMotionSupported(void)\n{\n    return GLFW_FALSE;\n}\n\nvoid _glfwPlatformPollEvents(void)\n{\n    @autoreleasepool {\n\n    if (!_glfw.ns.finishedLaunching)\n        [NSApp run];\n\n    for (;;)\n    {\n        NSEvent* event = [NSApp nextEventMatchingMask:NSEventMaskAny\n                                            untilDate:[NSDate distantPast]\n                                               inMode:NSDefaultRunLoopMode\n                                              dequeue:YES];\n        if (event == nil)\n            break;\n\n        [NSApp sendEvent:event];\n    }\n\n    } // autoreleasepool\n}\n\nvoid _glfwPlatformWaitEvents(void)\n{\n    @autoreleasepool {\n\n    if (!_glfw.ns.finishedLaunching)\n        [NSApp run];\n\n    // I wanted to pass NO to dequeue:, and rely on PollEvents to\n    // dequeue and send.  For reasons not at all clear to me, passing\n    // NO to dequeue: causes this method never to return.\n    NSEvent *event = [NSApp nextEventMatchingMask:NSEventMaskAny\n                                        untilDate:[NSDate distantFuture]\n                                           inMode:NSDefaultRunLoopMode\n                                          dequeue:YES];\n    [NSApp sendEvent:event];\n\n    _glfwPlatformPollEvents();\n\n    } // autoreleasepool\n}\n\nvoid _glfwPlatformWaitEventsTimeout(double timeout)\n{\n    @autoreleasepool {\n\n    if (!_glfw.ns.finishedLaunching)\n        [NSApp run];\n\n    NSDate* date = [NSDate dateWithTimeIntervalSinceNow:timeout];\n    NSEvent* event = [NSApp nextEventMatchingMask:NSEventMaskAny\n                                        untilDate:date\n                                           inMode:NSDefaultRunLoopMode\n                                          dequeue:YES];\n    if (event)\n        [NSApp sendEvent:event];\n\n    _glfwPlatformPollEvents();\n\n    } // autoreleasepool\n}\n\nvoid _glfwPlatformPostEmptyEvent(void)\n{\n    @autoreleasepool {\n\n    if (!_glfw.ns.finishedLaunching)\n        [NSApp run];\n\n    NSEvent* event = [NSEvent otherEventWithType:NSEventTypeApplicationDefined\n                                        location:NSMakePoint(0, 0)\n                                   modifierFlags:0\n                                       timestamp:0\n                                    windowNumber:0\n                                         context:nil\n                                         subtype:0\n                                           data1:0\n                                           data2:0];\n    [NSApp postEvent:event atStart:YES];\n\n    } // autoreleasepool\n}\n\nvoid _glfwPlatformGetCursorPos(_GLFWwindow* window, double* xpos, double* ypos)\n{\n    @autoreleasepool {\n\n    const NSRect contentRect = [window->ns.view frame];\n    // NOTE: The returned location uses base 0,1 not 0,0\n    const NSPoint pos = [window->ns.object mouseLocationOutsideOfEventStream];\n\n    if (xpos)\n        *xpos = pos.x;\n    if (ypos)\n        *ypos = contentRect.size.height - pos.y;\n\n    } // autoreleasepool\n}\n\nvoid _glfwPlatformSetCursorPos(_GLFWwindow* window, double x, double y)\n{\n    @autoreleasepool {\n\n    updateCursorImage(window);\n\n    const NSRect contentRect = [window->ns.view frame];\n    // NOTE: The returned location uses base 0,1 not 0,0\n    const NSPoint pos = [window->ns.object mouseLocationOutsideOfEventStream];\n\n    window->ns.cursorWarpDeltaX += x - pos.x;\n    window->ns.cursorWarpDeltaY += y - contentRect.size.height + pos.y;\n\n    if (window->monitor)\n    {\n        CGDisplayMoveCursorToPoint(window->monitor->ns.displayID,\n                                   CGPointMake(x, y));\n    }\n    else\n    {\n        const NSRect localRect = NSMakeRect(x, contentRect.size.height - y - 1, 0, 0);\n        const NSRect globalRect = [window->ns.object convertRectToScreen:localRect];\n        const NSPoint globalPoint = globalRect.origin;\n\n        CGWarpMouseCursorPosition(CGPointMake(globalPoint.x,\n                                              _glfwTransformYNS(globalPoint.y)));\n    }\n\n    } // autoreleasepool\n}\n\nvoid _glfwPlatformSetCursorMode(_GLFWwindow* window, int mode)\n{\n    @autoreleasepool {\n    if (_glfwPlatformWindowFocused(window))\n        updateCursorMode(window);\n    } // autoreleasepool\n}\n\nconst char* _glfwPlatformGetScancodeName(int scancode)\n{\n    @autoreleasepool {\n\n    if (scancode < 0 || scancode > 0xff ||\n        _glfw.ns.keycodes[scancode] == GLFW_KEY_UNKNOWN)\n    {\n        _glfwInputError(GLFW_INVALID_VALUE, \"Invalid scancode\");\n        return NULL;\n    }\n\n    const int key = _glfw.ns.keycodes[scancode];\n\n    UInt32 deadKeyState = 0;\n    UniChar characters[4];\n    UniCharCount characterCount = 0;\n\n    if (UCKeyTranslate([(NSData*) _glfw.ns.unicodeData bytes],\n                       scancode,\n                       kUCKeyActionDisplay,\n                       0,\n                       LMGetKbdType(),\n                       kUCKeyTranslateNoDeadKeysBit,\n                       &deadKeyState,\n                       sizeof(characters) / sizeof(characters[0]),\n                       &characterCount,\n                       characters) != noErr)\n    {\n        return NULL;\n    }\n\n    if (!characterCount)\n        return NULL;\n\n    CFStringRef string = CFStringCreateWithCharactersNoCopy(kCFAllocatorDefault,\n                                                            characters,\n                                                            characterCount,\n                                                            kCFAllocatorNull);\n    CFStringGetCString(string,\n                       _glfw.ns.keynames[key],\n                       sizeof(_glfw.ns.keynames[key]),\n                       kCFStringEncodingUTF8);\n    CFRelease(string);\n\n    return _glfw.ns.keynames[key];\n\n    } // autoreleasepool\n}\n\nint _glfwPlatformGetKeyScancode(int key)\n{\n    return _glfw.ns.scancodes[key];\n}\n\nint _glfwPlatformCreateCursor(_GLFWcursor* cursor,\n                              const GLFWimage* image,\n                              int xhot, int yhot)\n{\n    @autoreleasepool {\n\n    NSImage* native;\n    NSBitmapImageRep* rep;\n\n    rep = [[NSBitmapImageRep alloc]\n        initWithBitmapDataPlanes:NULL\n                      pixelsWide:image->width\n                      pixelsHigh:image->height\n                   bitsPerSample:8\n                 samplesPerPixel:4\n                        hasAlpha:YES\n                        isPlanar:NO\n                  colorSpaceName:NSCalibratedRGBColorSpace\n                    bitmapFormat:NSBitmapFormatAlphaNonpremultiplied\n                     bytesPerRow:image->width * 4\n                    bitsPerPixel:32];\n\n    if (rep == nil)\n        return GLFW_FALSE;\n\n    memcpy([rep bitmapData], image->pixels, image->width * image->height * 4);\n\n    native = [[NSImage alloc] initWithSize:NSMakeSize(image->width, image->height)];\n    [native addRepresentation:rep];\n\n    cursor->ns.object = [[NSCursor alloc] initWithImage:native\n                                                hotSpot:NSMakePoint(xhot, yhot)];\n\n    [native release];\n    [rep release];\n\n    if (cursor->ns.object == nil)\n        return GLFW_FALSE;\n\n    return GLFW_TRUE;\n\n    } // autoreleasepool\n}\n\nint _glfwPlatformCreateStandardCursor(_GLFWcursor* cursor, int shape)\n{\n    @autoreleasepool {\n\n    if (shape == GLFW_ARROW_CURSOR)\n        cursor->ns.object = [NSCursor arrowCursor];\n    else if (shape == GLFW_IBEAM_CURSOR)\n        cursor->ns.object = [NSCursor IBeamCursor];\n    else if (shape == GLFW_CROSSHAIR_CURSOR)\n        cursor->ns.object = [NSCursor crosshairCursor];\n    else if (shape == GLFW_HAND_CURSOR)\n        cursor->ns.object = [NSCursor pointingHandCursor];\n    else if (shape == GLFW_HRESIZE_CURSOR)\n        cursor->ns.object = [NSCursor resizeLeftRightCursor];\n    else if (shape == GLFW_VRESIZE_CURSOR)\n        cursor->ns.object = [NSCursor resizeUpDownCursor];\n\n    if (!cursor->ns.object)\n    {\n        _glfwInputError(GLFW_PLATFORM_ERROR,\n                        \"Cocoa: Failed to retrieve standard cursor\");\n        return GLFW_FALSE;\n    }\n\n    [cursor->ns.object retain];\n    return GLFW_TRUE;\n\n    } // autoreleasepool\n}\n\nvoid _glfwPlatformDestroyCursor(_GLFWcursor* cursor)\n{\n    @autoreleasepool {\n    if (cursor->ns.object)\n        [(NSCursor*) cursor->ns.object release];\n    } // autoreleasepool\n}\n\nvoid _glfwPlatformSetCursor(_GLFWwindow* window, _GLFWcursor* cursor)\n{\n    @autoreleasepool {\n    if (cursorInContentArea(window))\n        updateCursorImage(window);\n    } // autoreleasepool\n}\n\nvoid _glfwPlatformSetClipboardString(const char* string)\n{\n    @autoreleasepool {\n    NSPasteboard* pasteboard = [NSPasteboard generalPasteboard];\n    [pasteboard declareTypes:@[NSPasteboardTypeString] owner:nil];\n    [pasteboard setString:@(string) forType:NSPasteboardTypeString];\n    } // autoreleasepool\n}\n\nconst char* _glfwPlatformGetClipboardString(void)\n{\n    @autoreleasepool {\n\n    NSPasteboard* pasteboard = [NSPasteboard generalPasteboard];\n\n    if (![[pasteboard types] containsObject:NSPasteboardTypeString])\n    {\n        _glfwInputError(GLFW_FORMAT_UNAVAILABLE,\n                        \"Cocoa: Failed to retrieve string from pasteboard\");\n        return NULL;\n    }\n\n    NSString* object = [pasteboard stringForType:NSPasteboardTypeString];\n    if (!object)\n    {\n        _glfwInputError(GLFW_PLATFORM_ERROR,\n                        \"Cocoa: Failed to retrieve object from pasteboard\");\n        return NULL;\n    }\n\n    free(_glfw.ns.clipboardString);\n    _glfw.ns.clipboardString = _glfw_strdup([object UTF8String]);\n\n    return _glfw.ns.clipboardString;\n\n    } // autoreleasepool\n}\n\nvoid _glfwPlatformGetRequiredInstanceExtensions(char** extensions)\n{\n    if (_glfw.vk.KHR_surface && _glfw.vk.EXT_metal_surface)\n    {\n        extensions[0] = \"VK_KHR_surface\";\n        extensions[1] = \"VK_EXT_metal_surface\";\n    }\n    else if (_glfw.vk.KHR_surface && _glfw.vk.MVK_macos_surface)\n    {\n        extensions[0] = \"VK_KHR_surface\";\n        extensions[1] = \"VK_MVK_macos_surface\";\n    }\n}\n\nint _glfwPlatformGetPhysicalDevicePresentationSupport(VkInstance instance,\n                                                      VkPhysicalDevice device,\n                                                      uint32_t queuefamily)\n{\n    return GLFW_TRUE;\n}\n\nVkResult _glfwPlatformCreateWindowSurface(VkInstance instance,\n                                          _GLFWwindow* window,\n                                          const VkAllocationCallbacks* allocator,\n                                          VkSurfaceKHR* surface)\n{\n    @autoreleasepool {\n\n#if MAC_OS_X_VERSION_MAX_ALLOWED >= 101100\n    // HACK: Dynamically load Core Animation to avoid adding an extra\n    //       dependency for the majority who don't use MoltenVK\n    NSBundle* bundle = [NSBundle bundleWithPath:@\"/System/Library/Frameworks/QuartzCore.framework\"];\n    if (!bundle)\n    {\n        _glfwInputError(GLFW_PLATFORM_ERROR,\n                        \"Cocoa: Failed to find QuartzCore.framework\");\n        return VK_ERROR_EXTENSION_NOT_PRESENT;\n    }\n\n    // NOTE: Create the layer here as makeBackingLayer should not return nil\n    window->ns.layer = [[bundle classNamed:@\"CAMetalLayer\"] layer];\n    if (!window->ns.layer)\n    {\n        _glfwInputError(GLFW_PLATFORM_ERROR,\n                        \"Cocoa: Failed to create layer for view\");\n        return VK_ERROR_EXTENSION_NOT_PRESENT;\n    }\n\n    if (window->ns.retina)\n        [window->ns.layer setContentsScale:[window->ns.object backingScaleFactor]];\n\n    [window->ns.view setLayer:window->ns.layer];\n    [window->ns.view setWantsLayer:YES];\n\n    VkResult err;\n\n    if (_glfw.vk.EXT_metal_surface)\n    {\n        VkMetalSurfaceCreateInfoEXT sci;\n\n        PFN_vkCreateMetalSurfaceEXT vkCreateMetalSurfaceEXT;\n        vkCreateMetalSurfaceEXT = (PFN_vkCreateMetalSurfaceEXT)\n            vkGetInstanceProcAddr(instance, \"vkCreateMetalSurfaceEXT\");\n        if (!vkCreateMetalSurfaceEXT)\n        {\n            _glfwInputError(GLFW_API_UNAVAILABLE,\n                            \"Cocoa: Vulkan instance missing VK_EXT_metal_surface extension\");\n            return VK_ERROR_EXTENSION_NOT_PRESENT;\n        }\n\n        memset(&sci, 0, sizeof(sci));\n        sci.sType = VK_STRUCTURE_TYPE_METAL_SURFACE_CREATE_INFO_EXT;\n        sci.pLayer = window->ns.layer;\n\n        err = vkCreateMetalSurfaceEXT(instance, &sci, allocator, surface);\n    }\n    else\n    {\n        VkMacOSSurfaceCreateInfoMVK sci;\n\n        PFN_vkCreateMacOSSurfaceMVK vkCreateMacOSSurfaceMVK;\n        vkCreateMacOSSurfaceMVK = (PFN_vkCreateMacOSSurfaceMVK)\n            vkGetInstanceProcAddr(instance, \"vkCreateMacOSSurfaceMVK\");\n        if (!vkCreateMacOSSurfaceMVK)\n        {\n            _glfwInputError(GLFW_API_UNAVAILABLE,\n                            \"Cocoa: Vulkan instance missing VK_MVK_macos_surface extension\");\n            return VK_ERROR_EXTENSION_NOT_PRESENT;\n        }\n\n        memset(&sci, 0, sizeof(sci));\n        sci.sType = VK_STRUCTURE_TYPE_MACOS_SURFACE_CREATE_INFO_MVK;\n        sci.pView = window->ns.view;\n\n        err = vkCreateMacOSSurfaceMVK(instance, &sci, allocator, surface);\n    }\n\n    if (err)\n    {\n        _glfwInputError(GLFW_PLATFORM_ERROR,\n                        \"Cocoa: Failed to create Vulkan surface: %s\",\n                        _glfwGetVulkanResultString(err));\n    }\n\n    return err;\n#else\n    return VK_ERROR_EXTENSION_NOT_PRESENT;\n#endif\n\n    } // autoreleasepool\n}\n\n\n//////////////////////////////////////////////////////////////////////////\n//////                        GLFW native API                       //////\n//////////////////////////////////////////////////////////////////////////\n\nGLFWAPI id glfwGetCocoaWindow(GLFWwindow* handle)\n{\n    _GLFWwindow* window = (_GLFWwindow*) handle;\n    _GLFW_REQUIRE_INIT_OR_RETURN(nil);\n    return window->ns.object;\n}\n\n"
  },
  {
    "path": "thirdparty/glfw/src/context.c",
    "content": "//========================================================================\n// GLFW 3.3 - www.glfw.org\n//------------------------------------------------------------------------\n// Copyright (c) 2002-2006 Marcus Geelnard\n// Copyright (c) 2006-2016 Camilla Löwy <elmindreda@glfw.org>\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//    claim that you wrote the original software. If you use this software\n//    in a product, an acknowledgment in the product documentation would\n//    be appreciated but is not required.\n//\n// 2. Altered source versions must be plainly marked as such, and must not\n//    be misrepresented as being the original software.\n//\n// 3. This notice may not be removed or altered from any source\n//    distribution.\n//\n//========================================================================\n// Please use C89 style variable declarations in this file because VS 2010\n//========================================================================\n\n#include \"internal.h\"\n\n#include <assert.h>\n#include <stdio.h>\n#include <string.h>\n#include <limits.h>\n#include <stdio.h>\n\n\n//////////////////////////////////////////////////////////////////////////\n//////                       GLFW internal API                      //////\n//////////////////////////////////////////////////////////////////////////\n\n// Checks whether the desired context attributes are valid\n//\n// This function checks things like whether the specified client API version\n// exists and whether all relevant options have supported and non-conflicting\n// values\n//\nGLFWbool _glfwIsValidContextConfig(const _GLFWctxconfig* ctxconfig)\n{\n    if (ctxconfig->share)\n    {\n        if (ctxconfig->client == GLFW_NO_API ||\n            ctxconfig->share->context.client == GLFW_NO_API)\n        {\n            _glfwInputError(GLFW_NO_WINDOW_CONTEXT, NULL);\n            return GLFW_FALSE;\n        }\n    }\n\n    if (ctxconfig->source != GLFW_NATIVE_CONTEXT_API &&\n        ctxconfig->source != GLFW_EGL_CONTEXT_API &&\n        ctxconfig->source != GLFW_OSMESA_CONTEXT_API)\n    {\n        _glfwInputError(GLFW_INVALID_ENUM,\n                        \"Invalid context creation API 0x%08X\",\n                        ctxconfig->source);\n        return GLFW_FALSE;\n    }\n\n    if (ctxconfig->client != GLFW_NO_API &&\n        ctxconfig->client != GLFW_OPENGL_API &&\n        ctxconfig->client != GLFW_OPENGL_ES_API)\n    {\n        _glfwInputError(GLFW_INVALID_ENUM,\n                        \"Invalid client API 0x%08X\",\n                        ctxconfig->client);\n        return GLFW_FALSE;\n    }\n\n    if (ctxconfig->client == GLFW_OPENGL_API)\n    {\n        if ((ctxconfig->major < 1 || ctxconfig->minor < 0) ||\n            (ctxconfig->major == 1 && ctxconfig->minor > 5) ||\n            (ctxconfig->major == 2 && ctxconfig->minor > 1) ||\n            (ctxconfig->major == 3 && ctxconfig->minor > 3))\n        {\n            // OpenGL 1.0 is the smallest valid version\n            // OpenGL 1.x series ended with version 1.5\n            // OpenGL 2.x series ended with version 2.1\n            // OpenGL 3.x series ended with version 3.3\n            // For now, let everything else through\n\n            _glfwInputError(GLFW_INVALID_VALUE,\n                            \"Invalid OpenGL version %i.%i\",\n                            ctxconfig->major, ctxconfig->minor);\n            return GLFW_FALSE;\n        }\n\n        if (ctxconfig->profile)\n        {\n            if (ctxconfig->profile != GLFW_OPENGL_CORE_PROFILE &&\n                ctxconfig->profile != GLFW_OPENGL_COMPAT_PROFILE)\n            {\n                _glfwInputError(GLFW_INVALID_ENUM,\n                                \"Invalid OpenGL profile 0x%08X\",\n                                ctxconfig->profile);\n                return GLFW_FALSE;\n            }\n\n            if (ctxconfig->major <= 2 ||\n                (ctxconfig->major == 3 && ctxconfig->minor < 2))\n            {\n                // Desktop OpenGL context profiles are only defined for version 3.2\n                // and above\n\n                _glfwInputError(GLFW_INVALID_VALUE,\n                                \"Context profiles are only defined for OpenGL version 3.2 and above\");\n                return GLFW_FALSE;\n            }\n        }\n\n        if (ctxconfig->forward && ctxconfig->major <= 2)\n        {\n            // Forward-compatible contexts are only defined for OpenGL version 3.0 and above\n            _glfwInputError(GLFW_INVALID_VALUE,\n                            \"Forward-compatibility is only defined for OpenGL version 3.0 and above\");\n            return GLFW_FALSE;\n        }\n    }\n    else if (ctxconfig->client == GLFW_OPENGL_ES_API)\n    {\n        if (ctxconfig->major < 1 || ctxconfig->minor < 0 ||\n            (ctxconfig->major == 1 && ctxconfig->minor > 1) ||\n            (ctxconfig->major == 2 && ctxconfig->minor > 0))\n        {\n            // OpenGL ES 1.0 is the smallest valid version\n            // OpenGL ES 1.x series ended with version 1.1\n            // OpenGL ES 2.x series ended with version 2.0\n            // For now, let everything else through\n\n            _glfwInputError(GLFW_INVALID_VALUE,\n                            \"Invalid OpenGL ES version %i.%i\",\n                            ctxconfig->major, ctxconfig->minor);\n            return GLFW_FALSE;\n        }\n    }\n\n    if (ctxconfig->robustness)\n    {\n        if (ctxconfig->robustness != GLFW_NO_RESET_NOTIFICATION &&\n            ctxconfig->robustness != GLFW_LOSE_CONTEXT_ON_RESET)\n        {\n            _glfwInputError(GLFW_INVALID_ENUM,\n                            \"Invalid context robustness mode 0x%08X\",\n                            ctxconfig->robustness);\n            return GLFW_FALSE;\n        }\n    }\n\n    if (ctxconfig->release)\n    {\n        if (ctxconfig->release != GLFW_RELEASE_BEHAVIOR_NONE &&\n            ctxconfig->release != GLFW_RELEASE_BEHAVIOR_FLUSH)\n        {\n            _glfwInputError(GLFW_INVALID_ENUM,\n                            \"Invalid context release behavior 0x%08X\",\n                            ctxconfig->release);\n            return GLFW_FALSE;\n        }\n    }\n\n    return GLFW_TRUE;\n}\n\n// Chooses the framebuffer config that best matches the desired one\n//\nconst _GLFWfbconfig* _glfwChooseFBConfig(const _GLFWfbconfig* desired,\n                                         const _GLFWfbconfig* alternatives,\n                                         unsigned int count)\n{\n    unsigned int i;\n    unsigned int missing, leastMissing = UINT_MAX;\n    unsigned int colorDiff, leastColorDiff = UINT_MAX;\n    unsigned int extraDiff, leastExtraDiff = UINT_MAX;\n    const _GLFWfbconfig* current;\n    const _GLFWfbconfig* closest = NULL;\n\n    for (i = 0;  i < count;  i++)\n    {\n        current = alternatives + i;\n\n        if (desired->stereo > 0 && current->stereo == 0)\n        {\n            // Stereo is a hard constraint\n            continue;\n        }\n\n        if (desired->doublebuffer != current->doublebuffer)\n        {\n            // Double buffering is a hard constraint\n            continue;\n        }\n\n        // Count number of missing buffers\n        {\n            missing = 0;\n\n            if (desired->alphaBits > 0 && current->alphaBits == 0)\n                missing++;\n\n            if (desired->depthBits > 0 && current->depthBits == 0)\n                missing++;\n\n            if (desired->stencilBits > 0 && current->stencilBits == 0)\n                missing++;\n\n            if (desired->auxBuffers > 0 &&\n                current->auxBuffers < desired->auxBuffers)\n            {\n                missing += desired->auxBuffers - current->auxBuffers;\n            }\n\n            if (desired->samples > 0 && current->samples == 0)\n            {\n                // Technically, several multisampling buffers could be\n                // involved, but that's a lower level implementation detail and\n                // not important to us here, so we count them as one\n                missing++;\n            }\n\n            if (desired->transparent != current->transparent)\n                missing++;\n        }\n\n        // These polynomials make many small channel size differences matter\n        // less than one large channel size difference\n\n        // Calculate color channel size difference value\n        {\n            colorDiff = 0;\n\n            if (desired->redBits != GLFW_DONT_CARE)\n            {\n                colorDiff += (desired->redBits - current->redBits) *\n                             (desired->redBits - current->redBits);\n            }\n\n            if (desired->greenBits != GLFW_DONT_CARE)\n            {\n                colorDiff += (desired->greenBits - current->greenBits) *\n                             (desired->greenBits - current->greenBits);\n            }\n\n            if (desired->blueBits != GLFW_DONT_CARE)\n            {\n                colorDiff += (desired->blueBits - current->blueBits) *\n                             (desired->blueBits - current->blueBits);\n            }\n        }\n\n        // Calculate non-color channel size difference value\n        {\n            extraDiff = 0;\n\n            if (desired->alphaBits != GLFW_DONT_CARE)\n            {\n                extraDiff += (desired->alphaBits - current->alphaBits) *\n                             (desired->alphaBits - current->alphaBits);\n            }\n\n            if (desired->depthBits != GLFW_DONT_CARE)\n            {\n                extraDiff += (desired->depthBits - current->depthBits) *\n                             (desired->depthBits - current->depthBits);\n            }\n\n            if (desired->stencilBits != GLFW_DONT_CARE)\n            {\n                extraDiff += (desired->stencilBits - current->stencilBits) *\n                             (desired->stencilBits - current->stencilBits);\n            }\n\n            if (desired->accumRedBits != GLFW_DONT_CARE)\n            {\n                extraDiff += (desired->accumRedBits - current->accumRedBits) *\n                             (desired->accumRedBits - current->accumRedBits);\n            }\n\n            if (desired->accumGreenBits != GLFW_DONT_CARE)\n            {\n                extraDiff += (desired->accumGreenBits - current->accumGreenBits) *\n                             (desired->accumGreenBits - current->accumGreenBits);\n            }\n\n            if (desired->accumBlueBits != GLFW_DONT_CARE)\n            {\n                extraDiff += (desired->accumBlueBits - current->accumBlueBits) *\n                             (desired->accumBlueBits - current->accumBlueBits);\n            }\n\n            if (desired->accumAlphaBits != GLFW_DONT_CARE)\n            {\n                extraDiff += (desired->accumAlphaBits - current->accumAlphaBits) *\n                             (desired->accumAlphaBits - current->accumAlphaBits);\n            }\n\n            if (desired->samples != GLFW_DONT_CARE)\n            {\n                extraDiff += (desired->samples - current->samples) *\n                             (desired->samples - current->samples);\n            }\n\n            if (desired->sRGB && !current->sRGB)\n                extraDiff++;\n        }\n\n        // Figure out if the current one is better than the best one found so far\n        // Least number of missing buffers is the most important heuristic,\n        // then color buffer size match and lastly size match for other buffers\n\n        if (missing < leastMissing)\n            closest = current;\n        else if (missing == leastMissing)\n        {\n            if ((colorDiff < leastColorDiff) ||\n                (colorDiff == leastColorDiff && extraDiff < leastExtraDiff))\n            {\n                closest = current;\n            }\n        }\n\n        if (current == closest)\n        {\n            leastMissing = missing;\n            leastColorDiff = colorDiff;\n            leastExtraDiff = extraDiff;\n        }\n    }\n\n    return closest;\n}\n\n// Retrieves the attributes of the current context\n//\nGLFWbool _glfwRefreshContextAttribs(_GLFWwindow* window,\n                                    const _GLFWctxconfig* ctxconfig)\n{\n    int i;\n    _GLFWwindow* previous;\n    const char* version;\n    const char* prefixes[] =\n    {\n        \"OpenGL ES-CM \",\n        \"OpenGL ES-CL \",\n        \"OpenGL ES \",\n        NULL\n    };\n\n    window->context.source = ctxconfig->source;\n    window->context.client = GLFW_OPENGL_API;\n\n    previous = _glfwPlatformGetTls(&_glfw.contextSlot);\n    glfwMakeContextCurrent((GLFWwindow*) window);\n\n    window->context.GetIntegerv = (PFNGLGETINTEGERVPROC)\n        window->context.getProcAddress(\"glGetIntegerv\");\n    window->context.GetString = (PFNGLGETSTRINGPROC)\n        window->context.getProcAddress(\"glGetString\");\n    if (!window->context.GetIntegerv || !window->context.GetString)\n    {\n        _glfwInputError(GLFW_PLATFORM_ERROR, \"Entry point retrieval is broken\");\n        glfwMakeContextCurrent((GLFWwindow*) previous);\n        return GLFW_FALSE;\n    }\n\n    version = (const char*) window->context.GetString(GL_VERSION);\n    if (!version)\n    {\n        if (ctxconfig->client == GLFW_OPENGL_API)\n        {\n            _glfwInputError(GLFW_PLATFORM_ERROR,\n                            \"OpenGL version string retrieval is broken\");\n        }\n        else\n        {\n            _glfwInputError(GLFW_PLATFORM_ERROR,\n                            \"OpenGL ES version string retrieval is broken\");\n        }\n\n        glfwMakeContextCurrent((GLFWwindow*) previous);\n        return GLFW_FALSE;\n    }\n\n    for (i = 0;  prefixes[i];  i++)\n    {\n        const size_t length = strlen(prefixes[i]);\n\n        if (strncmp(version, prefixes[i], length) == 0)\n        {\n            version += length;\n            window->context.client = GLFW_OPENGL_ES_API;\n            break;\n        }\n    }\n\n    if (!sscanf(version, \"%d.%d.%d\",\n                &window->context.major,\n                &window->context.minor,\n                &window->context.revision))\n    {\n        if (window->context.client == GLFW_OPENGL_API)\n        {\n            _glfwInputError(GLFW_PLATFORM_ERROR,\n                            \"No version found in OpenGL version string\");\n        }\n        else\n        {\n            _glfwInputError(GLFW_PLATFORM_ERROR,\n                            \"No version found in OpenGL ES version string\");\n        }\n\n        glfwMakeContextCurrent((GLFWwindow*) previous);\n        return GLFW_FALSE;\n    }\n\n    if (window->context.major < ctxconfig->major ||\n        (window->context.major == ctxconfig->major &&\n         window->context.minor < ctxconfig->minor))\n    {\n        // The desired OpenGL version is greater than the actual version\n        // This only happens if the machine lacks {GLX|WGL}_ARB_create_context\n        // /and/ the user has requested an OpenGL version greater than 1.0\n\n        // For API consistency, we emulate the behavior of the\n        // {GLX|WGL}_ARB_create_context extension and fail here\n\n        if (window->context.client == GLFW_OPENGL_API)\n        {\n            _glfwInputError(GLFW_VERSION_UNAVAILABLE,\n                            \"Requested OpenGL version %i.%i, got version %i.%i\",\n                            ctxconfig->major, ctxconfig->minor,\n                            window->context.major, window->context.minor);\n        }\n        else\n        {\n            _glfwInputError(GLFW_VERSION_UNAVAILABLE,\n                            \"Requested OpenGL ES version %i.%i, got version %i.%i\",\n                            ctxconfig->major, ctxconfig->minor,\n                            window->context.major, window->context.minor);\n        }\n\n        glfwMakeContextCurrent((GLFWwindow*) previous);\n        return GLFW_FALSE;\n    }\n\n    if (window->context.major >= 3)\n    {\n        // OpenGL 3.0+ uses a different function for extension string retrieval\n        // We cache it here instead of in glfwExtensionSupported mostly to alert\n        // users as early as possible that their build may be broken\n\n        window->context.GetStringi = (PFNGLGETSTRINGIPROC)\n            window->context.getProcAddress(\"glGetStringi\");\n        if (!window->context.GetStringi)\n        {\n            _glfwInputError(GLFW_PLATFORM_ERROR,\n                            \"Entry point retrieval is broken\");\n            glfwMakeContextCurrent((GLFWwindow*) previous);\n            return GLFW_FALSE;\n        }\n    }\n\n    if (window->context.client == GLFW_OPENGL_API)\n    {\n        // Read back context flags (OpenGL 3.0 and above)\n        if (window->context.major >= 3)\n        {\n            GLint flags;\n            window->context.GetIntegerv(GL_CONTEXT_FLAGS, &flags);\n\n            if (flags & GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT)\n                window->context.forward = GLFW_TRUE;\n\n            if (flags & GL_CONTEXT_FLAG_DEBUG_BIT)\n                window->context.debug = GLFW_TRUE;\n            else if (glfwExtensionSupported(\"GL_ARB_debug_output\") &&\n                     ctxconfig->debug)\n            {\n                // HACK: This is a workaround for older drivers (pre KHR_debug)\n                //       not setting the debug bit in the context flags for\n                //       debug contexts\n                window->context.debug = GLFW_TRUE;\n            }\n\n            if (flags & GL_CONTEXT_FLAG_NO_ERROR_BIT_KHR)\n                window->context.noerror = GLFW_TRUE;\n        }\n\n        // Read back OpenGL context profile (OpenGL 3.2 and above)\n        if (window->context.major >= 4 ||\n            (window->context.major == 3 && window->context.minor >= 2))\n        {\n            GLint mask;\n            window->context.GetIntegerv(GL_CONTEXT_PROFILE_MASK, &mask);\n\n            if (mask & GL_CONTEXT_COMPATIBILITY_PROFILE_BIT)\n                window->context.profile = GLFW_OPENGL_COMPAT_PROFILE;\n            else if (mask & GL_CONTEXT_CORE_PROFILE_BIT)\n                window->context.profile = GLFW_OPENGL_CORE_PROFILE;\n            else if (glfwExtensionSupported(\"GL_ARB_compatibility\"))\n            {\n                // HACK: This is a workaround for the compatibility profile bit\n                //       not being set in the context flags if an OpenGL 3.2+\n                //       context was created without having requested a specific\n                //       version\n                window->context.profile = GLFW_OPENGL_COMPAT_PROFILE;\n            }\n        }\n\n        // Read back robustness strategy\n        if (glfwExtensionSupported(\"GL_ARB_robustness\"))\n        {\n            // NOTE: We avoid using the context flags for detection, as they are\n            //       only present from 3.0 while the extension applies from 1.1\n\n            GLint strategy;\n            window->context.GetIntegerv(GL_RESET_NOTIFICATION_STRATEGY_ARB,\n                                        &strategy);\n\n            if (strategy == GL_LOSE_CONTEXT_ON_RESET_ARB)\n                window->context.robustness = GLFW_LOSE_CONTEXT_ON_RESET;\n            else if (strategy == GL_NO_RESET_NOTIFICATION_ARB)\n                window->context.robustness = GLFW_NO_RESET_NOTIFICATION;\n        }\n    }\n    else\n    {\n        // Read back robustness strategy\n        if (glfwExtensionSupported(\"GL_EXT_robustness\"))\n        {\n            // NOTE: The values of these constants match those of the OpenGL ARB\n            //       one, so we can reuse them here\n\n            GLint strategy;\n            window->context.GetIntegerv(GL_RESET_NOTIFICATION_STRATEGY_ARB,\n                                        &strategy);\n\n            if (strategy == GL_LOSE_CONTEXT_ON_RESET_ARB)\n                window->context.robustness = GLFW_LOSE_CONTEXT_ON_RESET;\n            else if (strategy == GL_NO_RESET_NOTIFICATION_ARB)\n                window->context.robustness = GLFW_NO_RESET_NOTIFICATION;\n        }\n    }\n\n    if (glfwExtensionSupported(\"GL_KHR_context_flush_control\"))\n    {\n        GLint behavior;\n        window->context.GetIntegerv(GL_CONTEXT_RELEASE_BEHAVIOR, &behavior);\n\n        if (behavior == GL_NONE)\n            window->context.release = GLFW_RELEASE_BEHAVIOR_NONE;\n        else if (behavior == GL_CONTEXT_RELEASE_BEHAVIOR_FLUSH)\n            window->context.release = GLFW_RELEASE_BEHAVIOR_FLUSH;\n    }\n\n    // Clearing the front buffer to black to avoid garbage pixels left over from\n    // previous uses of our bit of VRAM\n    {\n        PFNGLCLEARPROC glClear = (PFNGLCLEARPROC)\n            window->context.getProcAddress(\"glClear\");\n        glClear(GL_COLOR_BUFFER_BIT);\n        window->context.swapBuffers(window);\n    }\n\n    glfwMakeContextCurrent((GLFWwindow*) previous);\n    return GLFW_TRUE;\n}\n\n// Searches an extension string for the specified extension\n//\nGLFWbool _glfwStringInExtensionString(const char* string, const char* extensions)\n{\n    const char* start = extensions;\n\n    for (;;)\n    {\n        const char* where;\n        const char* terminator;\n\n        where = strstr(start, string);\n        if (!where)\n            return GLFW_FALSE;\n\n        terminator = where + strlen(string);\n        if (where == start || *(where - 1) == ' ')\n        {\n            if (*terminator == ' ' || *terminator == '\\0')\n                break;\n        }\n\n        start = terminator;\n    }\n\n    return GLFW_TRUE;\n}\n\n\n//////////////////////////////////////////////////////////////////////////\n//////                        GLFW public API                       //////\n//////////////////////////////////////////////////////////////////////////\n\nGLFWAPI void glfwMakeContextCurrent(GLFWwindow* handle)\n{\n    _GLFWwindow* window = (_GLFWwindow*) handle;\n    _GLFWwindow* previous = _glfwPlatformGetTls(&_glfw.contextSlot);\n\n    _GLFW_REQUIRE_INIT();\n\n    if (window && window->context.client == GLFW_NO_API)\n    {\n        _glfwInputError(GLFW_NO_WINDOW_CONTEXT,\n                        \"Cannot make current with a window that has no OpenGL or OpenGL ES context\");\n        return;\n    }\n\n    if (previous)\n    {\n        if (!window || window->context.source != previous->context.source)\n            previous->context.makeCurrent(NULL);\n    }\n\n    if (window)\n        window->context.makeCurrent(window);\n}\n\nGLFWAPI GLFWwindow* glfwGetCurrentContext(void)\n{\n    _GLFW_REQUIRE_INIT_OR_RETURN(NULL);\n    return _glfwPlatformGetTls(&_glfw.contextSlot);\n}\n\nGLFWAPI void glfwSwapBuffers(GLFWwindow* handle)\n{\n    _GLFWwindow* window = (_GLFWwindow*) handle;\n    assert(window != NULL);\n\n    _GLFW_REQUIRE_INIT();\n\n    if (window->context.client == GLFW_NO_API)\n    {\n        _glfwInputError(GLFW_NO_WINDOW_CONTEXT,\n                        \"Cannot swap buffers of a window that has no OpenGL or OpenGL ES context\");\n        return;\n    }\n\n    window->context.swapBuffers(window);\n}\n\nGLFWAPI void glfwSwapInterval(int interval)\n{\n    _GLFWwindow* window;\n\n    _GLFW_REQUIRE_INIT();\n\n    window = _glfwPlatformGetTls(&_glfw.contextSlot);\n    if (!window)\n    {\n        _glfwInputError(GLFW_NO_CURRENT_CONTEXT,\n                        \"Cannot set swap interval without a current OpenGL or OpenGL ES context\");\n        return;\n    }\n\n    window->context.swapInterval(interval);\n}\n\nGLFWAPI int glfwExtensionSupported(const char* extension)\n{\n    _GLFWwindow* window;\n    assert(extension != NULL);\n\n    _GLFW_REQUIRE_INIT_OR_RETURN(GLFW_FALSE);\n\n    window = _glfwPlatformGetTls(&_glfw.contextSlot);\n    if (!window)\n    {\n        _glfwInputError(GLFW_NO_CURRENT_CONTEXT,\n                        \"Cannot query extension without a current OpenGL or OpenGL ES context\");\n        return GLFW_FALSE;\n    }\n\n    if (*extension == '\\0')\n    {\n        _glfwInputError(GLFW_INVALID_VALUE, \"Extension name cannot be an empty string\");\n        return GLFW_FALSE;\n    }\n\n    if (window->context.major >= 3)\n    {\n        int i;\n        GLint count;\n\n        // Check if extension is in the modern OpenGL extensions string list\n\n        window->context.GetIntegerv(GL_NUM_EXTENSIONS, &count);\n\n        for (i = 0;  i < count;  i++)\n        {\n            const char* en = (const char*)\n                window->context.GetStringi(GL_EXTENSIONS, i);\n            if (!en)\n            {\n                _glfwInputError(GLFW_PLATFORM_ERROR,\n                                \"Extension string retrieval is broken\");\n                return GLFW_FALSE;\n            }\n\n            if (strcmp(en, extension) == 0)\n                return GLFW_TRUE;\n        }\n    }\n    else\n    {\n        // Check if extension is in the old style OpenGL extensions string\n\n        const char* extensions = (const char*)\n            window->context.GetString(GL_EXTENSIONS);\n        if (!extensions)\n        {\n            _glfwInputError(GLFW_PLATFORM_ERROR,\n                            \"Extension string retrieval is broken\");\n            return GLFW_FALSE;\n        }\n\n        if (_glfwStringInExtensionString(extension, extensions))\n            return GLFW_TRUE;\n    }\n\n    // Check if extension is in the platform-specific string\n    return window->context.extensionSupported(extension);\n}\n\nGLFWAPI GLFWglproc glfwGetProcAddress(const char* procname)\n{\n    _GLFWwindow* window;\n    assert(procname != NULL);\n\n    _GLFW_REQUIRE_INIT_OR_RETURN(NULL);\n\n    window = _glfwPlatformGetTls(&_glfw.contextSlot);\n    if (!window)\n    {\n        _glfwInputError(GLFW_NO_CURRENT_CONTEXT,\n                        \"Cannot query entry point without a current OpenGL or OpenGL ES context\");\n        return NULL;\n    }\n\n    return window->context.getProcAddress(procname);\n}\n\n"
  },
  {
    "path": "thirdparty/glfw/src/egl_context.c",
    "content": "//========================================================================\n// GLFW 3.3 EGL - www.glfw.org\n//------------------------------------------------------------------------\n// Copyright (c) 2002-2006 Marcus Geelnard\n// Copyright (c) 2006-2019 Camilla Löwy <elmindreda@glfw.org>\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//    claim that you wrote the original software. If you use this software\n//    in a product, an acknowledgment in the product documentation would\n//    be appreciated but is not required.\n//\n// 2. Altered source versions must be plainly marked as such, and must not\n//    be misrepresented as being the original software.\n//\n// 3. This notice may not be removed or altered from any source\n//    distribution.\n//\n//========================================================================\n// Please use C89 style variable declarations in this file because VS 2010\n//========================================================================\n\n#include \"internal.h\"\n\n#include <stdio.h>\n#include <string.h>\n#include <stdlib.h>\n#include <assert.h>\n\n\n// Return a description of the specified EGL error\n//\nstatic const char* getEGLErrorString(EGLint error)\n{\n    switch (error)\n    {\n        case EGL_SUCCESS:\n            return \"Success\";\n        case EGL_NOT_INITIALIZED:\n            return \"EGL is not or could not be initialized\";\n        case EGL_BAD_ACCESS:\n            return \"EGL cannot access a requested resource\";\n        case EGL_BAD_ALLOC:\n            return \"EGL failed to allocate resources for the requested operation\";\n        case EGL_BAD_ATTRIBUTE:\n            return \"An unrecognized attribute or attribute value was passed in the attribute list\";\n        case EGL_BAD_CONTEXT:\n            return \"An EGLContext argument does not name a valid EGL rendering context\";\n        case EGL_BAD_CONFIG:\n            return \"An EGLConfig argument does not name a valid EGL frame buffer configuration\";\n        case EGL_BAD_CURRENT_SURFACE:\n            return \"The current surface of the calling thread is a window, pixel buffer or pixmap that is no longer valid\";\n        case EGL_BAD_DISPLAY:\n            return \"An EGLDisplay argument does not name a valid EGL display connection\";\n        case EGL_BAD_SURFACE:\n            return \"An EGLSurface argument does not name a valid surface configured for GL rendering\";\n        case EGL_BAD_MATCH:\n            return \"Arguments are inconsistent\";\n        case EGL_BAD_PARAMETER:\n            return \"One or more argument values are invalid\";\n        case EGL_BAD_NATIVE_PIXMAP:\n            return \"A NativePixmapType argument does not refer to a valid native pixmap\";\n        case EGL_BAD_NATIVE_WINDOW:\n            return \"A NativeWindowType argument does not refer to a valid native window\";\n        case EGL_CONTEXT_LOST:\n            return \"The application must destroy all contexts and reinitialise\";\n        default:\n            return \"ERROR: UNKNOWN EGL ERROR\";\n    }\n}\n\n// Returns the specified attribute of the specified EGLConfig\n//\nstatic int getEGLConfigAttrib(EGLConfig config, int attrib)\n{\n    int value;\n    eglGetConfigAttrib(_glfw.egl.display, config, attrib, &value);\n    return value;\n}\n\n// Return the EGLConfig most closely matching the specified hints\n//\nstatic GLFWbool chooseEGLConfig(const _GLFWctxconfig* ctxconfig,\n                                const _GLFWfbconfig* desired,\n                                EGLConfig* result)\n{\n    EGLConfig* nativeConfigs;\n    _GLFWfbconfig* usableConfigs;\n    const _GLFWfbconfig* closest;\n    int i, nativeCount, usableCount;\n\n    eglGetConfigs(_glfw.egl.display, NULL, 0, &nativeCount);\n    if (!nativeCount)\n    {\n        _glfwInputError(GLFW_API_UNAVAILABLE, \"EGL: No EGLConfigs returned\");\n        return GLFW_FALSE;\n    }\n\n    nativeConfigs = calloc(nativeCount, sizeof(EGLConfig));\n    eglGetConfigs(_glfw.egl.display, nativeConfigs, nativeCount, &nativeCount);\n\n    usableConfigs = calloc(nativeCount, sizeof(_GLFWfbconfig));\n    usableCount = 0;\n\n    for (i = 0;  i < nativeCount;  i++)\n    {\n        const EGLConfig n = nativeConfigs[i];\n        _GLFWfbconfig* u = usableConfigs + usableCount;\n\n        // Only consider RGB(A) EGLConfigs\n        if (getEGLConfigAttrib(n, EGL_COLOR_BUFFER_TYPE) != EGL_RGB_BUFFER)\n            continue;\n\n        // Only consider window EGLConfigs\n        if (!(getEGLConfigAttrib(n, EGL_SURFACE_TYPE) & EGL_WINDOW_BIT))\n            continue;\n\n#if defined(_GLFW_X11)\n        {\n            XVisualInfo vi = {0};\n\n            // Only consider EGLConfigs with associated Visuals\n            vi.visualid = getEGLConfigAttrib(n, EGL_NATIVE_VISUAL_ID);\n            if (!vi.visualid)\n                continue;\n\n            if (desired->transparent)\n            {\n                int count;\n                XVisualInfo* vis =\n                    XGetVisualInfo(_glfw.x11.display, VisualIDMask, &vi, &count);\n                if (vis)\n                {\n                    u->transparent = _glfwIsVisualTransparentX11(vis[0].visual);\n                    XFree(vis);\n                }\n            }\n        }\n#endif // _GLFW_X11\n\n        if (ctxconfig->client == GLFW_OPENGL_ES_API)\n        {\n            if (ctxconfig->major == 1)\n            {\n                if (!(getEGLConfigAttrib(n, EGL_RENDERABLE_TYPE) & EGL_OPENGL_ES_BIT))\n                    continue;\n            }\n            else\n            {\n                if (!(getEGLConfigAttrib(n, EGL_RENDERABLE_TYPE) & EGL_OPENGL_ES2_BIT))\n                    continue;\n            }\n        }\n        else if (ctxconfig->client == GLFW_OPENGL_API)\n        {\n            if (!(getEGLConfigAttrib(n, EGL_RENDERABLE_TYPE) & EGL_OPENGL_BIT))\n                continue;\n        }\n\n        u->redBits = getEGLConfigAttrib(n, EGL_RED_SIZE);\n        u->greenBits = getEGLConfigAttrib(n, EGL_GREEN_SIZE);\n        u->blueBits = getEGLConfigAttrib(n, EGL_BLUE_SIZE);\n\n        u->alphaBits = getEGLConfigAttrib(n, EGL_ALPHA_SIZE);\n        u->depthBits = getEGLConfigAttrib(n, EGL_DEPTH_SIZE);\n        u->stencilBits = getEGLConfigAttrib(n, EGL_STENCIL_SIZE);\n\n        u->samples = getEGLConfigAttrib(n, EGL_SAMPLES);\n        u->doublebuffer = GLFW_TRUE;\n\n        u->handle = (uintptr_t) n;\n        usableCount++;\n    }\n\n    closest = _glfwChooseFBConfig(desired, usableConfigs, usableCount);\n    if (closest)\n        *result = (EGLConfig) closest->handle;\n\n    free(nativeConfigs);\n    free(usableConfigs);\n\n    return closest != NULL;\n}\n\nstatic void makeContextCurrentEGL(_GLFWwindow* window)\n{\n    if (window)\n    {\n        if (!eglMakeCurrent(_glfw.egl.display,\n                            window->context.egl.surface,\n                            window->context.egl.surface,\n                            window->context.egl.handle))\n        {\n            _glfwInputError(GLFW_PLATFORM_ERROR,\n                            \"EGL: Failed to make context current: %s\",\n                            getEGLErrorString(eglGetError()));\n            return;\n        }\n    }\n    else\n    {\n        if (!eglMakeCurrent(_glfw.egl.display,\n                            EGL_NO_SURFACE,\n                            EGL_NO_SURFACE,\n                            EGL_NO_CONTEXT))\n        {\n            _glfwInputError(GLFW_PLATFORM_ERROR,\n                            \"EGL: Failed to clear current context: %s\",\n                            getEGLErrorString(eglGetError()));\n            return;\n        }\n    }\n\n    _glfwPlatformSetTls(&_glfw.contextSlot, window);\n}\n\nstatic void swapBuffersEGL(_GLFWwindow* window)\n{\n    if (window != _glfwPlatformGetTls(&_glfw.contextSlot))\n    {\n        _glfwInputError(GLFW_PLATFORM_ERROR,\n                        \"EGL: The context must be current on the calling thread when swapping buffers\");\n        return;\n    }\n\n    eglSwapBuffers(_glfw.egl.display, window->context.egl.surface);\n}\n\nstatic void swapIntervalEGL(int interval)\n{\n    eglSwapInterval(_glfw.egl.display, interval);\n}\n\nstatic int extensionSupportedEGL(const char* extension)\n{\n    const char* extensions = eglQueryString(_glfw.egl.display, EGL_EXTENSIONS);\n    if (extensions)\n    {\n        if (_glfwStringInExtensionString(extension, extensions))\n            return GLFW_TRUE;\n    }\n\n    return GLFW_FALSE;\n}\n\nstatic GLFWglproc getProcAddressEGL(const char* procname)\n{\n    _GLFWwindow* window = _glfwPlatformGetTls(&_glfw.contextSlot);\n\n    if (window->context.egl.client)\n    {\n        GLFWglproc proc = (GLFWglproc) _glfw_dlsym(window->context.egl.client,\n                                                   procname);\n        if (proc)\n            return proc;\n    }\n\n    return eglGetProcAddress(procname);\n}\n\nstatic void destroyContextEGL(_GLFWwindow* window)\n{\n#if defined(_GLFW_X11)\n    // NOTE: Do not unload libGL.so.1 while the X11 display is still open,\n    //       as it will make XCloseDisplay segfault\n    if (window->context.client != GLFW_OPENGL_API)\n#endif // _GLFW_X11\n    {\n        if (window->context.egl.client)\n        {\n            _glfw_dlclose(window->context.egl.client);\n            window->context.egl.client = NULL;\n        }\n    }\n\n    if (window->context.egl.surface)\n    {\n        eglDestroySurface(_glfw.egl.display, window->context.egl.surface);\n        window->context.egl.surface = EGL_NO_SURFACE;\n    }\n\n    if (window->context.egl.handle)\n    {\n        eglDestroyContext(_glfw.egl.display, window->context.egl.handle);\n        window->context.egl.handle = EGL_NO_CONTEXT;\n    }\n}\n\n\n//////////////////////////////////////////////////////////////////////////\n//////                       GLFW internal API                      //////\n//////////////////////////////////////////////////////////////////////////\n\n// Initialize EGL\n//\nGLFWbool _glfwInitEGL(void)\n{\n    int i;\n    const char* sonames[] =\n    {\n#if defined(_GLFW_EGL_LIBRARY)\n        _GLFW_EGL_LIBRARY,\n#elif defined(_GLFW_WIN32)\n        \"libEGL.dll\",\n        \"EGL.dll\",\n#elif defined(_GLFW_COCOA)\n        \"libEGL.dylib\",\n#elif defined(__CYGWIN__)\n        \"libEGL-1.so\",\n#else\n        \"libEGL.so.1\",\n#endif\n        NULL\n    };\n\n    if (_glfw.egl.handle)\n        return GLFW_TRUE;\n\n    for (i = 0;  sonames[i];  i++)\n    {\n        _glfw.egl.handle = _glfw_dlopen(sonames[i]);\n        if (_glfw.egl.handle)\n            break;\n    }\n\n    if (!_glfw.egl.handle)\n    {\n        _glfwInputError(GLFW_API_UNAVAILABLE, \"EGL: Library not found\");\n        return GLFW_FALSE;\n    }\n\n    _glfw.egl.prefix = (strncmp(sonames[i], \"lib\", 3) == 0);\n\n    _glfw.egl.GetConfigAttrib = (PFN_eglGetConfigAttrib)\n        _glfw_dlsym(_glfw.egl.handle, \"eglGetConfigAttrib\");\n    _glfw.egl.GetConfigs = (PFN_eglGetConfigs)\n        _glfw_dlsym(_glfw.egl.handle, \"eglGetConfigs\");\n    _glfw.egl.GetDisplay = (PFN_eglGetDisplay)\n        _glfw_dlsym(_glfw.egl.handle, \"eglGetDisplay\");\n    _glfw.egl.GetError = (PFN_eglGetError)\n        _glfw_dlsym(_glfw.egl.handle, \"eglGetError\");\n    _glfw.egl.Initialize = (PFN_eglInitialize)\n        _glfw_dlsym(_glfw.egl.handle, \"eglInitialize\");\n    _glfw.egl.Terminate = (PFN_eglTerminate)\n        _glfw_dlsym(_glfw.egl.handle, \"eglTerminate\");\n    _glfw.egl.BindAPI = (PFN_eglBindAPI)\n        _glfw_dlsym(_glfw.egl.handle, \"eglBindAPI\");\n    _glfw.egl.CreateContext = (PFN_eglCreateContext)\n        _glfw_dlsym(_glfw.egl.handle, \"eglCreateContext\");\n    _glfw.egl.DestroySurface = (PFN_eglDestroySurface)\n        _glfw_dlsym(_glfw.egl.handle, \"eglDestroySurface\");\n    _glfw.egl.DestroyContext = (PFN_eglDestroyContext)\n        _glfw_dlsym(_glfw.egl.handle, \"eglDestroyContext\");\n    _glfw.egl.CreateWindowSurface = (PFN_eglCreateWindowSurface)\n        _glfw_dlsym(_glfw.egl.handle, \"eglCreateWindowSurface\");\n    _glfw.egl.MakeCurrent = (PFN_eglMakeCurrent)\n        _glfw_dlsym(_glfw.egl.handle, \"eglMakeCurrent\");\n    _glfw.egl.SwapBuffers = (PFN_eglSwapBuffers)\n        _glfw_dlsym(_glfw.egl.handle, \"eglSwapBuffers\");\n    _glfw.egl.SwapInterval = (PFN_eglSwapInterval)\n        _glfw_dlsym(_glfw.egl.handle, \"eglSwapInterval\");\n    _glfw.egl.QueryString = (PFN_eglQueryString)\n        _glfw_dlsym(_glfw.egl.handle, \"eglQueryString\");\n    _glfw.egl.GetProcAddress = (PFN_eglGetProcAddress)\n        _glfw_dlsym(_glfw.egl.handle, \"eglGetProcAddress\");\n\n    if (!_glfw.egl.GetConfigAttrib ||\n        !_glfw.egl.GetConfigs ||\n        !_glfw.egl.GetDisplay ||\n        !_glfw.egl.GetError ||\n        !_glfw.egl.Initialize ||\n        !_glfw.egl.Terminate ||\n        !_glfw.egl.BindAPI ||\n        !_glfw.egl.CreateContext ||\n        !_glfw.egl.DestroySurface ||\n        !_glfw.egl.DestroyContext ||\n        !_glfw.egl.CreateWindowSurface ||\n        !_glfw.egl.MakeCurrent ||\n        !_glfw.egl.SwapBuffers ||\n        !_glfw.egl.SwapInterval ||\n        !_glfw.egl.QueryString ||\n        !_glfw.egl.GetProcAddress)\n    {\n        _glfwInputError(GLFW_PLATFORM_ERROR,\n                        \"EGL: Failed to load required entry points\");\n\n        _glfwTerminateEGL();\n        return GLFW_FALSE;\n    }\n\n    _glfw.egl.display = eglGetDisplay(_GLFW_EGL_NATIVE_DISPLAY);\n    if (_glfw.egl.display == EGL_NO_DISPLAY)\n    {\n        _glfwInputError(GLFW_API_UNAVAILABLE,\n                        \"EGL: Failed to get EGL display: %s\",\n                        getEGLErrorString(eglGetError()));\n\n        _glfwTerminateEGL();\n        return GLFW_FALSE;\n    }\n\n    if (!eglInitialize(_glfw.egl.display, &_glfw.egl.major, &_glfw.egl.minor))\n    {\n        _glfwInputError(GLFW_API_UNAVAILABLE,\n                        \"EGL: Failed to initialize EGL: %s\",\n                        getEGLErrorString(eglGetError()));\n\n        _glfwTerminateEGL();\n        return GLFW_FALSE;\n    }\n\n    _glfw.egl.KHR_create_context =\n        extensionSupportedEGL(\"EGL_KHR_create_context\");\n    _glfw.egl.KHR_create_context_no_error =\n        extensionSupportedEGL(\"EGL_KHR_create_context_no_error\");\n    _glfw.egl.KHR_gl_colorspace =\n        extensionSupportedEGL(\"EGL_KHR_gl_colorspace\");\n    _glfw.egl.KHR_get_all_proc_addresses =\n        extensionSupportedEGL(\"EGL_KHR_get_all_proc_addresses\");\n    _glfw.egl.KHR_context_flush_control =\n        extensionSupportedEGL(\"EGL_KHR_context_flush_control\");\n\n    return GLFW_TRUE;\n}\n\n// Terminate EGL\n//\nvoid _glfwTerminateEGL(void)\n{\n    if (_glfw.egl.display)\n    {\n        eglTerminate(_glfw.egl.display);\n        _glfw.egl.display = EGL_NO_DISPLAY;\n    }\n\n    if (_glfw.egl.handle)\n    {\n        _glfw_dlclose(_glfw.egl.handle);\n        _glfw.egl.handle = NULL;\n    }\n}\n\n#define setAttrib(a, v) \\\n{ \\\n    assert(((size_t) index + 1) < sizeof(attribs) / sizeof(attribs[0])); \\\n    attribs[index++] = a; \\\n    attribs[index++] = v; \\\n}\n\n// Create the OpenGL or OpenGL ES context\n//\nGLFWbool _glfwCreateContextEGL(_GLFWwindow* window,\n                               const _GLFWctxconfig* ctxconfig,\n                               const _GLFWfbconfig* fbconfig)\n{\n    EGLint attribs[40];\n    EGLConfig config;\n    EGLContext share = NULL;\n    int index = 0;\n\n    if (!_glfw.egl.display)\n    {\n        _glfwInputError(GLFW_API_UNAVAILABLE, \"EGL: API not available\");\n        return GLFW_FALSE;\n    }\n\n    if (ctxconfig->share)\n        share = ctxconfig->share->context.egl.handle;\n\n    if (!chooseEGLConfig(ctxconfig, fbconfig, &config))\n    {\n        _glfwInputError(GLFW_FORMAT_UNAVAILABLE,\n                        \"EGL: Failed to find a suitable EGLConfig\");\n        return GLFW_FALSE;\n    }\n\n    if (ctxconfig->client == GLFW_OPENGL_ES_API)\n    {\n        if (!eglBindAPI(EGL_OPENGL_ES_API))\n        {\n            _glfwInputError(GLFW_API_UNAVAILABLE,\n                            \"EGL: Failed to bind OpenGL ES: %s\",\n                            getEGLErrorString(eglGetError()));\n            return GLFW_FALSE;\n        }\n    }\n    else\n    {\n        if (!eglBindAPI(EGL_OPENGL_API))\n        {\n            _glfwInputError(GLFW_API_UNAVAILABLE,\n                            \"EGL: Failed to bind OpenGL: %s\",\n                            getEGLErrorString(eglGetError()));\n            return GLFW_FALSE;\n        }\n    }\n\n    if (_glfw.egl.KHR_create_context)\n    {\n        int mask = 0, flags = 0;\n\n        if (ctxconfig->client == GLFW_OPENGL_API)\n        {\n            if (ctxconfig->forward)\n                flags |= EGL_CONTEXT_OPENGL_FORWARD_COMPATIBLE_BIT_KHR;\n\n            if (ctxconfig->profile == GLFW_OPENGL_CORE_PROFILE)\n                mask |= EGL_CONTEXT_OPENGL_CORE_PROFILE_BIT_KHR;\n            else if (ctxconfig->profile == GLFW_OPENGL_COMPAT_PROFILE)\n                mask |= EGL_CONTEXT_OPENGL_COMPATIBILITY_PROFILE_BIT_KHR;\n        }\n\n        if (ctxconfig->debug)\n            flags |= EGL_CONTEXT_OPENGL_DEBUG_BIT_KHR;\n\n        if (ctxconfig->robustness)\n        {\n            if (ctxconfig->robustness == GLFW_NO_RESET_NOTIFICATION)\n            {\n                setAttrib(EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_KHR,\n                          EGL_NO_RESET_NOTIFICATION_KHR);\n            }\n            else if (ctxconfig->robustness == GLFW_LOSE_CONTEXT_ON_RESET)\n            {\n                setAttrib(EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_KHR,\n                          EGL_LOSE_CONTEXT_ON_RESET_KHR);\n            }\n\n            flags |= EGL_CONTEXT_OPENGL_ROBUST_ACCESS_BIT_KHR;\n        }\n\n        if (ctxconfig->noerror)\n        {\n            if (_glfw.egl.KHR_create_context_no_error)\n                setAttrib(EGL_CONTEXT_OPENGL_NO_ERROR_KHR, GLFW_TRUE);\n        }\n\n        if (ctxconfig->major != 1 || ctxconfig->minor != 0)\n        {\n            setAttrib(EGL_CONTEXT_MAJOR_VERSION_KHR, ctxconfig->major);\n            setAttrib(EGL_CONTEXT_MINOR_VERSION_KHR, ctxconfig->minor);\n        }\n\n        if (mask)\n            setAttrib(EGL_CONTEXT_OPENGL_PROFILE_MASK_KHR, mask);\n\n        if (flags)\n            setAttrib(EGL_CONTEXT_FLAGS_KHR, flags);\n    }\n    else\n    {\n        if (ctxconfig->client == GLFW_OPENGL_ES_API)\n            setAttrib(EGL_CONTEXT_CLIENT_VERSION, ctxconfig->major);\n    }\n\n    if (_glfw.egl.KHR_context_flush_control)\n    {\n        if (ctxconfig->release == GLFW_RELEASE_BEHAVIOR_NONE)\n        {\n            setAttrib(EGL_CONTEXT_RELEASE_BEHAVIOR_KHR,\n                      EGL_CONTEXT_RELEASE_BEHAVIOR_NONE_KHR);\n        }\n        else if (ctxconfig->release == GLFW_RELEASE_BEHAVIOR_FLUSH)\n        {\n            setAttrib(EGL_CONTEXT_RELEASE_BEHAVIOR_KHR,\n                      EGL_CONTEXT_RELEASE_BEHAVIOR_FLUSH_KHR);\n        }\n    }\n\n    setAttrib(EGL_NONE, EGL_NONE);\n\n    window->context.egl.handle = eglCreateContext(_glfw.egl.display,\n                                                  config, share, attribs);\n\n    if (window->context.egl.handle == EGL_NO_CONTEXT)\n    {\n        _glfwInputError(GLFW_VERSION_UNAVAILABLE,\n                        \"EGL: Failed to create context: %s\",\n                        getEGLErrorString(eglGetError()));\n        return GLFW_FALSE;\n    }\n\n    // Set up attributes for surface creation\n    {\n        int index = 0;\n\n        if (fbconfig->sRGB)\n        {\n            if (_glfw.egl.KHR_gl_colorspace)\n                setAttrib(EGL_GL_COLORSPACE_KHR, EGL_GL_COLORSPACE_SRGB_KHR);\n        }\n\n        setAttrib(EGL_NONE, EGL_NONE);\n    }\n\n    window->context.egl.surface =\n        eglCreateWindowSurface(_glfw.egl.display,\n                               config,\n                               _GLFW_EGL_NATIVE_WINDOW,\n                               attribs);\n    if (window->context.egl.surface == EGL_NO_SURFACE)\n    {\n        _glfwInputError(GLFW_PLATFORM_ERROR,\n                        \"EGL: Failed to create window surface: %s\",\n                        getEGLErrorString(eglGetError()));\n        return GLFW_FALSE;\n    }\n\n    window->context.egl.config = config;\n\n    // Load the appropriate client library\n    if (!_glfw.egl.KHR_get_all_proc_addresses)\n    {\n        int i;\n        const char** sonames;\n        const char* es1sonames[] =\n        {\n#if defined(_GLFW_GLESV1_LIBRARY)\n            _GLFW_GLESV1_LIBRARY,\n#elif defined(_GLFW_WIN32)\n            \"GLESv1_CM.dll\",\n            \"libGLES_CM.dll\",\n#elif defined(_GLFW_COCOA)\n            \"libGLESv1_CM.dylib\",\n#else\n            \"libGLESv1_CM.so.1\",\n            \"libGLES_CM.so.1\",\n#endif\n            NULL\n        };\n        const char* es2sonames[] =\n        {\n#if defined(_GLFW_GLESV2_LIBRARY)\n            _GLFW_GLESV2_LIBRARY,\n#elif defined(_GLFW_WIN32)\n            \"GLESv2.dll\",\n            \"libGLESv2.dll\",\n#elif defined(_GLFW_COCOA)\n            \"libGLESv2.dylib\",\n#elif defined(__CYGWIN__)\n            \"libGLESv2-2.so\",\n#else\n            \"libGLESv2.so.2\",\n#endif\n            NULL\n        };\n        const char* glsonames[] =\n        {\n#if defined(_GLFW_OPENGL_LIBRARY)\n            _GLFW_OPENGL_LIBRARY,\n#elif defined(_GLFW_WIN32)\n#elif defined(_GLFW_COCOA)\n#else\n            \"libGL.so.1\",\n#endif\n            NULL\n        };\n\n        if (ctxconfig->client == GLFW_OPENGL_ES_API)\n        {\n            if (ctxconfig->major == 1)\n                sonames = es1sonames;\n            else\n                sonames = es2sonames;\n        }\n        else\n            sonames = glsonames;\n\n        for (i = 0;  sonames[i];  i++)\n        {\n            // HACK: Match presence of lib prefix to increase chance of finding\n            //       a matching pair in the jungle that is Win32 EGL/GLES\n            if (_glfw.egl.prefix != (strncmp(sonames[i], \"lib\", 3) == 0))\n                continue;\n\n            window->context.egl.client = _glfw_dlopen(sonames[i]);\n            if (window->context.egl.client)\n                break;\n        }\n\n        if (!window->context.egl.client)\n        {\n            _glfwInputError(GLFW_API_UNAVAILABLE,\n                            \"EGL: Failed to load client library\");\n            return GLFW_FALSE;\n        }\n    }\n\n    window->context.makeCurrent = makeContextCurrentEGL;\n    window->context.swapBuffers = swapBuffersEGL;\n    window->context.swapInterval = swapIntervalEGL;\n    window->context.extensionSupported = extensionSupportedEGL;\n    window->context.getProcAddress = getProcAddressEGL;\n    window->context.destroy = destroyContextEGL;\n\n    return GLFW_TRUE;\n}\n\n#undef setAttrib\n\n// Returns the Visual and depth of the chosen EGLConfig\n//\n#if defined(_GLFW_X11)\nGLFWbool _glfwChooseVisualEGL(const _GLFWwndconfig* wndconfig,\n                              const _GLFWctxconfig* ctxconfig,\n                              const _GLFWfbconfig* fbconfig,\n                              Visual** visual, int* depth)\n{\n    XVisualInfo* result;\n    XVisualInfo desired;\n    EGLConfig native;\n    EGLint visualID = 0, count = 0;\n    const long vimask = VisualScreenMask | VisualIDMask;\n\n    if (!chooseEGLConfig(ctxconfig, fbconfig, &native))\n    {\n        _glfwInputError(GLFW_FORMAT_UNAVAILABLE,\n                        \"EGL: Failed to find a suitable EGLConfig\");\n        return GLFW_FALSE;\n    }\n\n    eglGetConfigAttrib(_glfw.egl.display, native,\n                       EGL_NATIVE_VISUAL_ID, &visualID);\n\n    desired.screen = _glfw.x11.screen;\n    desired.visualid = visualID;\n\n    result = XGetVisualInfo(_glfw.x11.display, vimask, &desired, &count);\n    if (!result)\n    {\n        _glfwInputError(GLFW_PLATFORM_ERROR,\n                        \"EGL: Failed to retrieve Visual for EGLConfig\");\n        return GLFW_FALSE;\n    }\n\n    *visual = result->visual;\n    *depth = result->depth;\n\n    XFree(result);\n    return GLFW_TRUE;\n}\n#endif // _GLFW_X11\n\n\n//////////////////////////////////////////////////////////////////////////\n//////                        GLFW native API                       //////\n//////////////////////////////////////////////////////////////////////////\n\nGLFWAPI EGLDisplay glfwGetEGLDisplay(void)\n{\n    _GLFW_REQUIRE_INIT_OR_RETURN(EGL_NO_DISPLAY);\n    return _glfw.egl.display;\n}\n\nGLFWAPI EGLContext glfwGetEGLContext(GLFWwindow* handle)\n{\n    _GLFWwindow* window = (_GLFWwindow*) handle;\n    _GLFW_REQUIRE_INIT_OR_RETURN(EGL_NO_CONTEXT);\n\n    if (window->context.client == GLFW_NO_API)\n    {\n        _glfwInputError(GLFW_NO_WINDOW_CONTEXT, NULL);\n        return EGL_NO_CONTEXT;\n    }\n\n    return window->context.egl.handle;\n}\n\nGLFWAPI EGLSurface glfwGetEGLSurface(GLFWwindow* handle)\n{\n    _GLFWwindow* window = (_GLFWwindow*) handle;\n    _GLFW_REQUIRE_INIT_OR_RETURN(EGL_NO_SURFACE);\n\n    if (window->context.client == GLFW_NO_API)\n    {\n        _glfwInputError(GLFW_NO_WINDOW_CONTEXT, NULL);\n        return EGL_NO_SURFACE;\n    }\n\n    return window->context.egl.surface;\n}\n\n"
  },
  {
    "path": "thirdparty/glfw/src/egl_context.h",
    "content": "//========================================================================\n// GLFW 3.3 EGL - www.glfw.org\n//------------------------------------------------------------------------\n// Copyright (c) 2002-2006 Marcus Geelnard\n// Copyright (c) 2006-2017 Camilla Löwy <elmindreda@glfw.org>\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//    claim that you wrote the original software. If you use this software\n//    in a product, an acknowledgment in the product documentation would\n//    be appreciated but is not required.\n//\n// 2. Altered source versions must be plainly marked as such, and must not\n//    be misrepresented as being the original software.\n//\n// 3. This notice may not be removed or altered from any source\n//    distribution.\n//\n//========================================================================\n\n#if defined(_GLFW_USE_EGLPLATFORM_H)\n #include <EGL/eglplatform.h>\n#elif defined(_GLFW_WIN32)\n #define EGLAPIENTRY __stdcall\ntypedef HDC EGLNativeDisplayType;\ntypedef HWND EGLNativeWindowType;\n#elif defined(_GLFW_COCOA)\n #define EGLAPIENTRY\ntypedef void* EGLNativeDisplayType;\ntypedef id EGLNativeWindowType;\n#elif defined(_GLFW_X11)\n #define EGLAPIENTRY\ntypedef Display* EGLNativeDisplayType;\ntypedef Window EGLNativeWindowType;\n#elif defined(_GLFW_WAYLAND)\n #define EGLAPIENTRY\ntypedef struct wl_display* EGLNativeDisplayType;\ntypedef struct wl_egl_window* EGLNativeWindowType;\n#else\n #error \"No supported EGL platform selected\"\n#endif\n\n#define EGL_SUCCESS 0x3000\n#define EGL_NOT_INITIALIZED 0x3001\n#define EGL_BAD_ACCESS 0x3002\n#define EGL_BAD_ALLOC 0x3003\n#define EGL_BAD_ATTRIBUTE 0x3004\n#define EGL_BAD_CONFIG 0x3005\n#define EGL_BAD_CONTEXT 0x3006\n#define EGL_BAD_CURRENT_SURFACE 0x3007\n#define EGL_BAD_DISPLAY 0x3008\n#define EGL_BAD_MATCH 0x3009\n#define EGL_BAD_NATIVE_PIXMAP 0x300a\n#define EGL_BAD_NATIVE_WINDOW 0x300b\n#define EGL_BAD_PARAMETER 0x300c\n#define EGL_BAD_SURFACE 0x300d\n#define EGL_CONTEXT_LOST 0x300e\n#define EGL_COLOR_BUFFER_TYPE 0x303f\n#define EGL_RGB_BUFFER 0x308e\n#define EGL_SURFACE_TYPE 0x3033\n#define EGL_WINDOW_BIT 0x0004\n#define EGL_RENDERABLE_TYPE 0x3040\n#define EGL_OPENGL_ES_BIT 0x0001\n#define EGL_OPENGL_ES2_BIT 0x0004\n#define EGL_OPENGL_BIT 0x0008\n#define EGL_ALPHA_SIZE 0x3021\n#define EGL_BLUE_SIZE 0x3022\n#define EGL_GREEN_SIZE 0x3023\n#define EGL_RED_SIZE 0x3024\n#define EGL_DEPTH_SIZE 0x3025\n#define EGL_STENCIL_SIZE 0x3026\n#define EGL_SAMPLES 0x3031\n#define EGL_OPENGL_ES_API 0x30a0\n#define EGL_OPENGL_API 0x30a2\n#define EGL_NONE 0x3038\n#define EGL_EXTENSIONS 0x3055\n#define EGL_CONTEXT_CLIENT_VERSION 0x3098\n#define EGL_NATIVE_VISUAL_ID 0x302e\n#define EGL_NO_SURFACE ((EGLSurface) 0)\n#define EGL_NO_DISPLAY ((EGLDisplay) 0)\n#define EGL_NO_CONTEXT ((EGLContext) 0)\n#define EGL_DEFAULT_DISPLAY ((EGLNativeDisplayType) 0)\n\n#define EGL_CONTEXT_OPENGL_FORWARD_COMPATIBLE_BIT_KHR 0x00000002\n#define EGL_CONTEXT_OPENGL_CORE_PROFILE_BIT_KHR 0x00000001\n#define EGL_CONTEXT_OPENGL_COMPATIBILITY_PROFILE_BIT_KHR 0x00000002\n#define EGL_CONTEXT_OPENGL_DEBUG_BIT_KHR 0x00000001\n#define EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_KHR 0x31bd\n#define EGL_NO_RESET_NOTIFICATION_KHR 0x31be\n#define EGL_LOSE_CONTEXT_ON_RESET_KHR 0x31bf\n#define EGL_CONTEXT_OPENGL_ROBUST_ACCESS_BIT_KHR 0x00000004\n#define EGL_CONTEXT_MAJOR_VERSION_KHR 0x3098\n#define EGL_CONTEXT_MINOR_VERSION_KHR 0x30fb\n#define EGL_CONTEXT_OPENGL_PROFILE_MASK_KHR 0x30fd\n#define EGL_CONTEXT_FLAGS_KHR 0x30fc\n#define EGL_CONTEXT_OPENGL_NO_ERROR_KHR 0x31b3\n#define EGL_GL_COLORSPACE_KHR 0x309d\n#define EGL_GL_COLORSPACE_SRGB_KHR 0x3089\n#define EGL_CONTEXT_RELEASE_BEHAVIOR_KHR 0x2097\n#define EGL_CONTEXT_RELEASE_BEHAVIOR_NONE_KHR 0\n#define EGL_CONTEXT_RELEASE_BEHAVIOR_FLUSH_KHR 0x2098\n\ntypedef int EGLint;\ntypedef unsigned int EGLBoolean;\ntypedef unsigned int EGLenum;\ntypedef void* EGLConfig;\ntypedef void* EGLContext;\ntypedef void* EGLDisplay;\ntypedef void* EGLSurface;\n\n// EGL function pointer typedefs\ntypedef EGLBoolean (EGLAPIENTRY * PFN_eglGetConfigAttrib)(EGLDisplay,EGLConfig,EGLint,EGLint*);\ntypedef EGLBoolean (EGLAPIENTRY * PFN_eglGetConfigs)(EGLDisplay,EGLConfig*,EGLint,EGLint*);\ntypedef EGLDisplay (EGLAPIENTRY * PFN_eglGetDisplay)(EGLNativeDisplayType);\ntypedef EGLint (EGLAPIENTRY * PFN_eglGetError)(void);\ntypedef EGLBoolean (EGLAPIENTRY * PFN_eglInitialize)(EGLDisplay,EGLint*,EGLint*);\ntypedef EGLBoolean (EGLAPIENTRY * PFN_eglTerminate)(EGLDisplay);\ntypedef EGLBoolean (EGLAPIENTRY * PFN_eglBindAPI)(EGLenum);\ntypedef EGLContext (EGLAPIENTRY * PFN_eglCreateContext)(EGLDisplay,EGLConfig,EGLContext,const EGLint*);\ntypedef EGLBoolean (EGLAPIENTRY * PFN_eglDestroySurface)(EGLDisplay,EGLSurface);\ntypedef EGLBoolean (EGLAPIENTRY * PFN_eglDestroyContext)(EGLDisplay,EGLContext);\ntypedef EGLSurface (EGLAPIENTRY * PFN_eglCreateWindowSurface)(EGLDisplay,EGLConfig,EGLNativeWindowType,const EGLint*);\ntypedef EGLBoolean (EGLAPIENTRY * PFN_eglMakeCurrent)(EGLDisplay,EGLSurface,EGLSurface,EGLContext);\ntypedef EGLBoolean (EGLAPIENTRY * PFN_eglSwapBuffers)(EGLDisplay,EGLSurface);\ntypedef EGLBoolean (EGLAPIENTRY * PFN_eglSwapInterval)(EGLDisplay,EGLint);\ntypedef const char* (EGLAPIENTRY * PFN_eglQueryString)(EGLDisplay,EGLint);\ntypedef GLFWglproc (EGLAPIENTRY * PFN_eglGetProcAddress)(const char*);\n#define eglGetConfigAttrib _glfw.egl.GetConfigAttrib\n#define eglGetConfigs _glfw.egl.GetConfigs\n#define eglGetDisplay _glfw.egl.GetDisplay\n#define eglGetError _glfw.egl.GetError\n#define eglInitialize _glfw.egl.Initialize\n#define eglTerminate _glfw.egl.Terminate\n#define eglBindAPI _glfw.egl.BindAPI\n#define eglCreateContext _glfw.egl.CreateContext\n#define eglDestroySurface _glfw.egl.DestroySurface\n#define eglDestroyContext _glfw.egl.DestroyContext\n#define eglCreateWindowSurface _glfw.egl.CreateWindowSurface\n#define eglMakeCurrent _glfw.egl.MakeCurrent\n#define eglSwapBuffers _glfw.egl.SwapBuffers\n#define eglSwapInterval _glfw.egl.SwapInterval\n#define eglQueryString _glfw.egl.QueryString\n#define eglGetProcAddress _glfw.egl.GetProcAddress\n\n#define _GLFW_EGL_CONTEXT_STATE            _GLFWcontextEGL egl\n#define _GLFW_EGL_LIBRARY_CONTEXT_STATE    _GLFWlibraryEGL egl\n\n\n// EGL-specific per-context data\n//\ntypedef struct _GLFWcontextEGL\n{\n   EGLConfig        config;\n   EGLContext       handle;\n   EGLSurface       surface;\n\n   void*            client;\n\n} _GLFWcontextEGL;\n\n// EGL-specific global data\n//\ntypedef struct _GLFWlibraryEGL\n{\n    EGLDisplay      display;\n    EGLint          major, minor;\n    GLFWbool        prefix;\n\n    GLFWbool        KHR_create_context;\n    GLFWbool        KHR_create_context_no_error;\n    GLFWbool        KHR_gl_colorspace;\n    GLFWbool        KHR_get_all_proc_addresses;\n    GLFWbool        KHR_context_flush_control;\n\n    void*           handle;\n\n    PFN_eglGetConfigAttrib      GetConfigAttrib;\n    PFN_eglGetConfigs           GetConfigs;\n    PFN_eglGetDisplay           GetDisplay;\n    PFN_eglGetError             GetError;\n    PFN_eglInitialize           Initialize;\n    PFN_eglTerminate            Terminate;\n    PFN_eglBindAPI              BindAPI;\n    PFN_eglCreateContext        CreateContext;\n    PFN_eglDestroySurface       DestroySurface;\n    PFN_eglDestroyContext       DestroyContext;\n    PFN_eglCreateWindowSurface  CreateWindowSurface;\n    PFN_eglMakeCurrent          MakeCurrent;\n    PFN_eglSwapBuffers          SwapBuffers;\n    PFN_eglSwapInterval         SwapInterval;\n    PFN_eglQueryString          QueryString;\n    PFN_eglGetProcAddress       GetProcAddress;\n\n} _GLFWlibraryEGL;\n\n\nGLFWbool _glfwInitEGL(void);\nvoid _glfwTerminateEGL(void);\nGLFWbool _glfwCreateContextEGL(_GLFWwindow* window,\n                               const _GLFWctxconfig* ctxconfig,\n                               const _GLFWfbconfig* fbconfig);\n#if defined(_GLFW_X11)\nGLFWbool _glfwChooseVisualEGL(const _GLFWwndconfig* wndconfig,\n                              const _GLFWctxconfig* ctxconfig,\n                              const _GLFWfbconfig* fbconfig,\n                              Visual** visual, int* depth);\n#endif /*_GLFW_X11*/\n\n"
  },
  {
    "path": "thirdparty/glfw/src/glfw3.pc.in",
    "content": "prefix=@CMAKE_INSTALL_PREFIX@\nexec_prefix=${prefix}\nincludedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@\nlibdir=@CMAKE_INSTALL_FULL_LIBDIR@\n\nName: GLFW\nDescription: A multi-platform library for OpenGL, window and input\nVersion: @GLFW_VERSION@\nURL: https://www.glfw.org/\nRequires.private: @GLFW_PKG_DEPS@\nLibs: -L${libdir} -l@GLFW_LIB_NAME@\nLibs.private: @GLFW_PKG_LIBS@\nCflags: -I${includedir}\n"
  },
  {
    "path": "thirdparty/glfw/src/glfw3Config.cmake.in",
    "content": "include(\"${CMAKE_CURRENT_LIST_DIR}/glfw3Targets.cmake\")\n"
  },
  {
    "path": "thirdparty/glfw/src/glfw_config.h.in",
    "content": "//========================================================================\n// GLFW 3.3 - www.glfw.org\n//------------------------------------------------------------------------\n// Copyright (c) 2010-2016 Camilla Löwy <elmindreda@glfw.org>\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//    claim that you wrote the original software. If you use this software\n//    in a product, an acknowledgment in the product documentation would\n//    be appreciated but is not required.\n//\n// 2. Altered source versions must be plainly marked as such, and must not\n//    be misrepresented as being the original software.\n//\n// 3. This notice may not be removed or altered from any source\n//    distribution.\n//\n//========================================================================\n// As glfw_config.h.in, this file is used by CMake to produce the\n// glfw_config.h configuration header file.  If you are adding a feature\n// requiring conditional compilation, this is where to add the macro.\n//========================================================================\n// As glfw_config.h, this file defines compile-time option macros for a\n// specific platform and development environment.  If you are using the\n// GLFW CMake files, modify glfw_config.h.in instead of this file.  If you\n// are using your own build system, make this file define the appropriate\n// macros in whatever way is suitable.\n//========================================================================\n\n// Define this to 1 if building GLFW for X11\n#cmakedefine _GLFW_X11\n// Define this to 1 if building GLFW for Win32\n#cmakedefine _GLFW_WIN32\n// Define this to 1 if building GLFW for Cocoa\n#cmakedefine _GLFW_COCOA\n// Define this to 1 if building GLFW for Wayland\n#cmakedefine _GLFW_WAYLAND\n// Define this to 1 if building GLFW for OSMesa\n#cmakedefine _GLFW_OSMESA\n\n// Define this to 1 if building as a shared library / dynamic library / DLL\n#cmakedefine _GLFW_BUILD_DLL\n// Define this to 1 to use Vulkan loader linked statically into application\n#cmakedefine _GLFW_VULKAN_STATIC\n\n// Define this to 1 to force use of high-performance GPU on hybrid systems\n#cmakedefine _GLFW_USE_HYBRID_HPG\n\n// Define this to 1 if xkbcommon supports the compose key\n#cmakedefine HAVE_XKBCOMMON_COMPOSE_H\n// Define this to 1 if the libc supports memfd_create()\n#cmakedefine HAVE_MEMFD_CREATE\n\n"
  },
  {
    "path": "thirdparty/glfw/src/glx_context.c",
    "content": "//========================================================================\n// GLFW 3.3 GLX - www.glfw.org\n//------------------------------------------------------------------------\n// Copyright (c) 2002-2006 Marcus Geelnard\n// Copyright (c) 2006-2019 Camilla Löwy <elmindreda@glfw.org>\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//    claim that you wrote the original software. If you use this software\n//    in a product, an acknowledgment in the product documentation would\n//    be appreciated but is not required.\n//\n// 2. Altered source versions must be plainly marked as such, and must not\n//    be misrepresented as being the original software.\n//\n// 3. This notice may not be removed or altered from any source\n//    distribution.\n//\n//========================================================================\n// It is fine to use C99 in this file because it will not be built with VS\n//========================================================================\n\n#include \"internal.h\"\n\n#include <string.h>\n#include <stdlib.h>\n#include <assert.h>\n\n#ifndef GLXBadProfileARB\n #define GLXBadProfileARB 13\n#endif\n\n\n// Returns the specified attribute of the specified GLXFBConfig\n//\nstatic int getGLXFBConfigAttrib(GLXFBConfig fbconfig, int attrib)\n{\n    int value;\n    glXGetFBConfigAttrib(_glfw.x11.display, fbconfig, attrib, &value);\n    return value;\n}\n\n// Return the GLXFBConfig most closely matching the specified hints\n//\nstatic GLFWbool chooseGLXFBConfig(const _GLFWfbconfig* desired,\n                                  GLXFBConfig* result)\n{\n    GLXFBConfig* nativeConfigs;\n    _GLFWfbconfig* usableConfigs;\n    const _GLFWfbconfig* closest;\n    int i, nativeCount, usableCount;\n    const char* vendor;\n    GLFWbool trustWindowBit = GLFW_TRUE;\n\n    // HACK: This is a (hopefully temporary) workaround for Chromium\n    //       (VirtualBox GL) not setting the window bit on any GLXFBConfigs\n    vendor = glXGetClientString(_glfw.x11.display, GLX_VENDOR);\n    if (vendor && strcmp(vendor, \"Chromium\") == 0)\n        trustWindowBit = GLFW_FALSE;\n\n    nativeConfigs =\n        glXGetFBConfigs(_glfw.x11.display, _glfw.x11.screen, &nativeCount);\n    if (!nativeConfigs || !nativeCount)\n    {\n        _glfwInputError(GLFW_API_UNAVAILABLE, \"GLX: No GLXFBConfigs returned\");\n        return GLFW_FALSE;\n    }\n\n    usableConfigs = calloc(nativeCount, sizeof(_GLFWfbconfig));\n    usableCount = 0;\n\n    for (i = 0;  i < nativeCount;  i++)\n    {\n        const GLXFBConfig n = nativeConfigs[i];\n        _GLFWfbconfig* u = usableConfigs + usableCount;\n\n        // Only consider RGBA GLXFBConfigs\n        if (!(getGLXFBConfigAttrib(n, GLX_RENDER_TYPE) & GLX_RGBA_BIT))\n            continue;\n\n        // Only consider window GLXFBConfigs\n        if (!(getGLXFBConfigAttrib(n, GLX_DRAWABLE_TYPE) & GLX_WINDOW_BIT))\n        {\n            if (trustWindowBit)\n                continue;\n        }\n\n        if (desired->transparent)\n        {\n            XVisualInfo* vi = glXGetVisualFromFBConfig(_glfw.x11.display, n);\n            if (vi)\n            {\n                u->transparent = _glfwIsVisualTransparentX11(vi->visual);\n                XFree(vi);\n            }\n        }\n\n        u->redBits = getGLXFBConfigAttrib(n, GLX_RED_SIZE);\n        u->greenBits = getGLXFBConfigAttrib(n, GLX_GREEN_SIZE);\n        u->blueBits = getGLXFBConfigAttrib(n, GLX_BLUE_SIZE);\n\n        u->alphaBits = getGLXFBConfigAttrib(n, GLX_ALPHA_SIZE);\n        u->depthBits = getGLXFBConfigAttrib(n, GLX_DEPTH_SIZE);\n        u->stencilBits = getGLXFBConfigAttrib(n, GLX_STENCIL_SIZE);\n\n        u->accumRedBits = getGLXFBConfigAttrib(n, GLX_ACCUM_RED_SIZE);\n        u->accumGreenBits = getGLXFBConfigAttrib(n, GLX_ACCUM_GREEN_SIZE);\n        u->accumBlueBits = getGLXFBConfigAttrib(n, GLX_ACCUM_BLUE_SIZE);\n        u->accumAlphaBits = getGLXFBConfigAttrib(n, GLX_ACCUM_ALPHA_SIZE);\n\n        u->auxBuffers = getGLXFBConfigAttrib(n, GLX_AUX_BUFFERS);\n\n        if (getGLXFBConfigAttrib(n, GLX_STEREO))\n            u->stereo = GLFW_TRUE;\n        if (getGLXFBConfigAttrib(n, GLX_DOUBLEBUFFER))\n            u->doublebuffer = GLFW_TRUE;\n\n        if (_glfw.glx.ARB_multisample)\n            u->samples = getGLXFBConfigAttrib(n, GLX_SAMPLES);\n\n        if (_glfw.glx.ARB_framebuffer_sRGB || _glfw.glx.EXT_framebuffer_sRGB)\n            u->sRGB = getGLXFBConfigAttrib(n, GLX_FRAMEBUFFER_SRGB_CAPABLE_ARB);\n\n        u->handle = (uintptr_t) n;\n        usableCount++;\n    }\n\n    closest = _glfwChooseFBConfig(desired, usableConfigs, usableCount);\n    if (closest)\n        *result = (GLXFBConfig) closest->handle;\n\n    XFree(nativeConfigs);\n    free(usableConfigs);\n\n    return closest != NULL;\n}\n\n// Create the OpenGL context using legacy API\n//\nstatic GLXContext createLegacyContextGLX(_GLFWwindow* window,\n                                         GLXFBConfig fbconfig,\n                                         GLXContext share)\n{\n    return glXCreateNewContext(_glfw.x11.display,\n                               fbconfig,\n                               GLX_RGBA_TYPE,\n                               share,\n                               True);\n}\n\nstatic void makeContextCurrentGLX(_GLFWwindow* window)\n{\n    if (window)\n    {\n        if (!glXMakeCurrent(_glfw.x11.display,\n                            window->context.glx.window,\n                            window->context.glx.handle))\n        {\n            _glfwInputError(GLFW_PLATFORM_ERROR,\n                            \"GLX: Failed to make context current\");\n            return;\n        }\n    }\n    else\n    {\n        if (!glXMakeCurrent(_glfw.x11.display, None, NULL))\n        {\n            _glfwInputError(GLFW_PLATFORM_ERROR,\n                            \"GLX: Failed to clear current context\");\n            return;\n        }\n    }\n\n    _glfwPlatformSetTls(&_glfw.contextSlot, window);\n}\n\nstatic void swapBuffersGLX(_GLFWwindow* window)\n{\n    glXSwapBuffers(_glfw.x11.display, window->context.glx.window);\n}\n\nstatic void swapIntervalGLX(int interval)\n{\n    _GLFWwindow* window = _glfwPlatformGetTls(&_glfw.contextSlot);\n\n    if (_glfw.glx.EXT_swap_control)\n    {\n        _glfw.glx.SwapIntervalEXT(_glfw.x11.display,\n                                  window->context.glx.window,\n                                  interval);\n    }\n    else if (_glfw.glx.MESA_swap_control)\n        _glfw.glx.SwapIntervalMESA(interval);\n    else if (_glfw.glx.SGI_swap_control)\n    {\n        if (interval > 0)\n            _glfw.glx.SwapIntervalSGI(interval);\n    }\n}\n\nstatic int extensionSupportedGLX(const char* extension)\n{\n    const char* extensions =\n        glXQueryExtensionsString(_glfw.x11.display, _glfw.x11.screen);\n    if (extensions)\n    {\n        if (_glfwStringInExtensionString(extension, extensions))\n            return GLFW_TRUE;\n    }\n\n    return GLFW_FALSE;\n}\n\nstatic GLFWglproc getProcAddressGLX(const char* procname)\n{\n    if (_glfw.glx.GetProcAddress)\n        return _glfw.glx.GetProcAddress((const GLubyte*) procname);\n    else if (_glfw.glx.GetProcAddressARB)\n        return _glfw.glx.GetProcAddressARB((const GLubyte*) procname);\n    else\n        return _glfw_dlsym(_glfw.glx.handle, procname);\n}\n\nstatic void destroyContextGLX(_GLFWwindow* window)\n{\n    if (window->context.glx.window)\n    {\n        glXDestroyWindow(_glfw.x11.display, window->context.glx.window);\n        window->context.glx.window = None;\n    }\n\n    if (window->context.glx.handle)\n    {\n        glXDestroyContext(_glfw.x11.display, window->context.glx.handle);\n        window->context.glx.handle = NULL;\n    }\n}\n\n\n//////////////////////////////////////////////////////////////////////////\n//////                       GLFW internal API                      //////\n//////////////////////////////////////////////////////////////////////////\n\n// Initialize GLX\n//\nGLFWbool _glfwInitGLX(void)\n{\n    int i;\n    const char* sonames[] =\n    {\n#if defined(_GLFW_GLX_LIBRARY)\n        _GLFW_GLX_LIBRARY,\n#elif defined(__CYGWIN__)\n        \"libGL-1.so\",\n#else\n        \"libGL.so.1\",\n        \"libGL.so\",\n#endif\n        NULL\n    };\n\n    if (_glfw.glx.handle)\n        return GLFW_TRUE;\n\n    for (i = 0;  sonames[i];  i++)\n    {\n        _glfw.glx.handle = _glfw_dlopen(sonames[i]);\n        if (_glfw.glx.handle)\n            break;\n    }\n\n    if (!_glfw.glx.handle)\n    {\n        _glfwInputError(GLFW_API_UNAVAILABLE, \"GLX: Failed to load GLX\");\n        return GLFW_FALSE;\n    }\n\n    _glfw.glx.GetFBConfigs =\n        _glfw_dlsym(_glfw.glx.handle, \"glXGetFBConfigs\");\n    _glfw.glx.GetFBConfigAttrib =\n        _glfw_dlsym(_glfw.glx.handle, \"glXGetFBConfigAttrib\");\n    _glfw.glx.GetClientString =\n        _glfw_dlsym(_glfw.glx.handle, \"glXGetClientString\");\n    _glfw.glx.QueryExtension =\n        _glfw_dlsym(_glfw.glx.handle, \"glXQueryExtension\");\n    _glfw.glx.QueryVersion =\n        _glfw_dlsym(_glfw.glx.handle, \"glXQueryVersion\");\n    _glfw.glx.DestroyContext =\n        _glfw_dlsym(_glfw.glx.handle, \"glXDestroyContext\");\n    _glfw.glx.MakeCurrent =\n        _glfw_dlsym(_glfw.glx.handle, \"glXMakeCurrent\");\n    _glfw.glx.SwapBuffers =\n        _glfw_dlsym(_glfw.glx.handle, \"glXSwapBuffers\");\n    _glfw.glx.QueryExtensionsString =\n        _glfw_dlsym(_glfw.glx.handle, \"glXQueryExtensionsString\");\n    _glfw.glx.CreateNewContext =\n        _glfw_dlsym(_glfw.glx.handle, \"glXCreateNewContext\");\n    _glfw.glx.CreateWindow =\n        _glfw_dlsym(_glfw.glx.handle, \"glXCreateWindow\");\n    _glfw.glx.DestroyWindow =\n        _glfw_dlsym(_glfw.glx.handle, \"glXDestroyWindow\");\n    _glfw.glx.GetProcAddress =\n        _glfw_dlsym(_glfw.glx.handle, \"glXGetProcAddress\");\n    _glfw.glx.GetProcAddressARB =\n        _glfw_dlsym(_glfw.glx.handle, \"glXGetProcAddressARB\");\n    _glfw.glx.GetVisualFromFBConfig =\n        _glfw_dlsym(_glfw.glx.handle, \"glXGetVisualFromFBConfig\");\n\n    if (!_glfw.glx.GetFBConfigs ||\n        !_glfw.glx.GetFBConfigAttrib ||\n        !_glfw.glx.GetClientString ||\n        !_glfw.glx.QueryExtension ||\n        !_glfw.glx.QueryVersion ||\n        !_glfw.glx.DestroyContext ||\n        !_glfw.glx.MakeCurrent ||\n        !_glfw.glx.SwapBuffers ||\n        !_glfw.glx.QueryExtensionsString ||\n        !_glfw.glx.CreateNewContext ||\n        !_glfw.glx.CreateWindow ||\n        !_glfw.glx.DestroyWindow ||\n        !_glfw.glx.GetProcAddress ||\n        !_glfw.glx.GetProcAddressARB ||\n        !_glfw.glx.GetVisualFromFBConfig)\n    {\n        _glfwInputError(GLFW_PLATFORM_ERROR,\n                        \"GLX: Failed to load required entry points\");\n        return GLFW_FALSE;\n    }\n\n    if (!glXQueryExtension(_glfw.x11.display,\n                           &_glfw.glx.errorBase,\n                           &_glfw.glx.eventBase))\n    {\n        _glfwInputError(GLFW_API_UNAVAILABLE, \"GLX: GLX extension not found\");\n        return GLFW_FALSE;\n    }\n\n    if (!glXQueryVersion(_glfw.x11.display, &_glfw.glx.major, &_glfw.glx.minor))\n    {\n        _glfwInputError(GLFW_API_UNAVAILABLE,\n                        \"GLX: Failed to query GLX version\");\n        return GLFW_FALSE;\n    }\n\n    if (_glfw.glx.major == 1 && _glfw.glx.minor < 3)\n    {\n        _glfwInputError(GLFW_API_UNAVAILABLE,\n                        \"GLX: GLX version 1.3 is required\");\n        return GLFW_FALSE;\n    }\n\n    if (extensionSupportedGLX(\"GLX_EXT_swap_control\"))\n    {\n        _glfw.glx.SwapIntervalEXT = (PFNGLXSWAPINTERVALEXTPROC)\n            getProcAddressGLX(\"glXSwapIntervalEXT\");\n\n        if (_glfw.glx.SwapIntervalEXT)\n            _glfw.glx.EXT_swap_control = GLFW_TRUE;\n    }\n\n    if (extensionSupportedGLX(\"GLX_SGI_swap_control\"))\n    {\n        _glfw.glx.SwapIntervalSGI = (PFNGLXSWAPINTERVALSGIPROC)\n            getProcAddressGLX(\"glXSwapIntervalSGI\");\n\n        if (_glfw.glx.SwapIntervalSGI)\n            _glfw.glx.SGI_swap_control = GLFW_TRUE;\n    }\n\n    if (extensionSupportedGLX(\"GLX_MESA_swap_control\"))\n    {\n        _glfw.glx.SwapIntervalMESA = (PFNGLXSWAPINTERVALMESAPROC)\n            getProcAddressGLX(\"glXSwapIntervalMESA\");\n\n        if (_glfw.glx.SwapIntervalMESA)\n            _glfw.glx.MESA_swap_control = GLFW_TRUE;\n    }\n\n    if (extensionSupportedGLX(\"GLX_ARB_multisample\"))\n        _glfw.glx.ARB_multisample = GLFW_TRUE;\n\n    if (extensionSupportedGLX(\"GLX_ARB_framebuffer_sRGB\"))\n        _glfw.glx.ARB_framebuffer_sRGB = GLFW_TRUE;\n\n    if (extensionSupportedGLX(\"GLX_EXT_framebuffer_sRGB\"))\n        _glfw.glx.EXT_framebuffer_sRGB = GLFW_TRUE;\n\n    if (extensionSupportedGLX(\"GLX_ARB_create_context\"))\n    {\n        _glfw.glx.CreateContextAttribsARB = (PFNGLXCREATECONTEXTATTRIBSARBPROC)\n            getProcAddressGLX(\"glXCreateContextAttribsARB\");\n\n        if (_glfw.glx.CreateContextAttribsARB)\n            _glfw.glx.ARB_create_context = GLFW_TRUE;\n    }\n\n    if (extensionSupportedGLX(\"GLX_ARB_create_context_robustness\"))\n        _glfw.glx.ARB_create_context_robustness = GLFW_TRUE;\n\n    if (extensionSupportedGLX(\"GLX_ARB_create_context_profile\"))\n        _glfw.glx.ARB_create_context_profile = GLFW_TRUE;\n\n    if (extensionSupportedGLX(\"GLX_EXT_create_context_es2_profile\"))\n        _glfw.glx.EXT_create_context_es2_profile = GLFW_TRUE;\n\n    if (extensionSupportedGLX(\"GLX_ARB_create_context_no_error\"))\n        _glfw.glx.ARB_create_context_no_error = GLFW_TRUE;\n\n    if (extensionSupportedGLX(\"GLX_ARB_context_flush_control\"))\n        _glfw.glx.ARB_context_flush_control = GLFW_TRUE;\n\n    return GLFW_TRUE;\n}\n\n// Terminate GLX\n//\nvoid _glfwTerminateGLX(void)\n{\n    // NOTE: This function must not call any X11 functions, as it is called\n    //       after XCloseDisplay (see _glfwPlatformTerminate for details)\n\n    if (_glfw.glx.handle)\n    {\n        _glfw_dlclose(_glfw.glx.handle);\n        _glfw.glx.handle = NULL;\n    }\n}\n\n#define setAttrib(a, v) \\\n{ \\\n    assert(((size_t) index + 1) < sizeof(attribs) / sizeof(attribs[0])); \\\n    attribs[index++] = a; \\\n    attribs[index++] = v; \\\n}\n\n// Create the OpenGL or OpenGL ES context\n//\nGLFWbool _glfwCreateContextGLX(_GLFWwindow* window,\n                               const _GLFWctxconfig* ctxconfig,\n                               const _GLFWfbconfig* fbconfig)\n{\n    int attribs[40];\n    GLXFBConfig native = NULL;\n    GLXContext share = NULL;\n\n    if (ctxconfig->share)\n        share = ctxconfig->share->context.glx.handle;\n\n    if (!chooseGLXFBConfig(fbconfig, &native))\n    {\n        _glfwInputError(GLFW_FORMAT_UNAVAILABLE,\n                        \"GLX: Failed to find a suitable GLXFBConfig\");\n        return GLFW_FALSE;\n    }\n\n    if (ctxconfig->client == GLFW_OPENGL_ES_API)\n    {\n        if (!_glfw.glx.ARB_create_context ||\n            !_glfw.glx.ARB_create_context_profile ||\n            !_glfw.glx.EXT_create_context_es2_profile)\n        {\n            _glfwInputError(GLFW_API_UNAVAILABLE,\n                            \"GLX: OpenGL ES requested but GLX_EXT_create_context_es2_profile is unavailable\");\n            return GLFW_FALSE;\n        }\n    }\n\n    if (ctxconfig->forward)\n    {\n        if (!_glfw.glx.ARB_create_context)\n        {\n            _glfwInputError(GLFW_VERSION_UNAVAILABLE,\n                            \"GLX: Forward compatibility requested but GLX_ARB_create_context_profile is unavailable\");\n            return GLFW_FALSE;\n        }\n    }\n\n    if (ctxconfig->profile)\n    {\n        if (!_glfw.glx.ARB_create_context ||\n            !_glfw.glx.ARB_create_context_profile)\n        {\n            _glfwInputError(GLFW_VERSION_UNAVAILABLE,\n                            \"GLX: An OpenGL profile requested but GLX_ARB_create_context_profile is unavailable\");\n            return GLFW_FALSE;\n        }\n    }\n\n    _glfwGrabErrorHandlerX11();\n\n    if (_glfw.glx.ARB_create_context)\n    {\n        int index = 0, mask = 0, flags = 0;\n\n        if (ctxconfig->client == GLFW_OPENGL_API)\n        {\n            if (ctxconfig->forward)\n                flags |= GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB;\n\n            if (ctxconfig->profile == GLFW_OPENGL_CORE_PROFILE)\n                mask |= GLX_CONTEXT_CORE_PROFILE_BIT_ARB;\n            else if (ctxconfig->profile == GLFW_OPENGL_COMPAT_PROFILE)\n                mask |= GLX_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB;\n        }\n        else\n            mask |= GLX_CONTEXT_ES2_PROFILE_BIT_EXT;\n\n        if (ctxconfig->debug)\n            flags |= GLX_CONTEXT_DEBUG_BIT_ARB;\n\n        if (ctxconfig->robustness)\n        {\n            if (_glfw.glx.ARB_create_context_robustness)\n            {\n                if (ctxconfig->robustness == GLFW_NO_RESET_NOTIFICATION)\n                {\n                    setAttrib(GLX_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB,\n                              GLX_NO_RESET_NOTIFICATION_ARB);\n                }\n                else if (ctxconfig->robustness == GLFW_LOSE_CONTEXT_ON_RESET)\n                {\n                    setAttrib(GLX_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB,\n                              GLX_LOSE_CONTEXT_ON_RESET_ARB);\n                }\n\n                flags |= GLX_CONTEXT_ROBUST_ACCESS_BIT_ARB;\n            }\n        }\n\n        if (ctxconfig->release)\n        {\n            if (_glfw.glx.ARB_context_flush_control)\n            {\n                if (ctxconfig->release == GLFW_RELEASE_BEHAVIOR_NONE)\n                {\n                    setAttrib(GLX_CONTEXT_RELEASE_BEHAVIOR_ARB,\n                              GLX_CONTEXT_RELEASE_BEHAVIOR_NONE_ARB);\n                }\n                else if (ctxconfig->release == GLFW_RELEASE_BEHAVIOR_FLUSH)\n                {\n                    setAttrib(GLX_CONTEXT_RELEASE_BEHAVIOR_ARB,\n                              GLX_CONTEXT_RELEASE_BEHAVIOR_FLUSH_ARB);\n                }\n            }\n        }\n\n        if (ctxconfig->noerror)\n        {\n            if (_glfw.glx.ARB_create_context_no_error)\n                setAttrib(GLX_CONTEXT_OPENGL_NO_ERROR_ARB, GLFW_TRUE);\n        }\n\n        // NOTE: Only request an explicitly versioned context when necessary, as\n        //       explicitly requesting version 1.0 does not always return the\n        //       highest version supported by the driver\n        if (ctxconfig->major != 1 || ctxconfig->minor != 0)\n        {\n            setAttrib(GLX_CONTEXT_MAJOR_VERSION_ARB, ctxconfig->major);\n            setAttrib(GLX_CONTEXT_MINOR_VERSION_ARB, ctxconfig->minor);\n        }\n\n        if (mask)\n            setAttrib(GLX_CONTEXT_PROFILE_MASK_ARB, mask);\n\n        if (flags)\n            setAttrib(GLX_CONTEXT_FLAGS_ARB, flags);\n\n        setAttrib(None, None);\n\n        window->context.glx.handle =\n            _glfw.glx.CreateContextAttribsARB(_glfw.x11.display,\n                                              native,\n                                              share,\n                                              True,\n                                              attribs);\n\n        // HACK: This is a fallback for broken versions of the Mesa\n        //       implementation of GLX_ARB_create_context_profile that fail\n        //       default 1.0 context creation with a GLXBadProfileARB error in\n        //       violation of the extension spec\n        if (!window->context.glx.handle)\n        {\n            if (_glfw.x11.errorCode == _glfw.glx.errorBase + GLXBadProfileARB &&\n                ctxconfig->client == GLFW_OPENGL_API &&\n                ctxconfig->profile == GLFW_OPENGL_ANY_PROFILE &&\n                ctxconfig->forward == GLFW_FALSE)\n            {\n                window->context.glx.handle =\n                    createLegacyContextGLX(window, native, share);\n            }\n        }\n    }\n    else\n    {\n        window->context.glx.handle =\n            createLegacyContextGLX(window, native, share);\n    }\n\n    _glfwReleaseErrorHandlerX11();\n\n    if (!window->context.glx.handle)\n    {\n        _glfwInputErrorX11(GLFW_VERSION_UNAVAILABLE, \"GLX: Failed to create context\");\n        return GLFW_FALSE;\n    }\n\n    window->context.glx.window =\n        glXCreateWindow(_glfw.x11.display, native, window->x11.handle, NULL);\n    if (!window->context.glx.window)\n    {\n        _glfwInputError(GLFW_PLATFORM_ERROR, \"GLX: Failed to create window\");\n        return GLFW_FALSE;\n    }\n\n    window->context.makeCurrent = makeContextCurrentGLX;\n    window->context.swapBuffers = swapBuffersGLX;\n    window->context.swapInterval = swapIntervalGLX;\n    window->context.extensionSupported = extensionSupportedGLX;\n    window->context.getProcAddress = getProcAddressGLX;\n    window->context.destroy = destroyContextGLX;\n\n    return GLFW_TRUE;\n}\n\n#undef setAttrib\n\n// Returns the Visual and depth of the chosen GLXFBConfig\n//\nGLFWbool _glfwChooseVisualGLX(const _GLFWwndconfig* wndconfig,\n                              const _GLFWctxconfig* ctxconfig,\n                              const _GLFWfbconfig* fbconfig,\n                              Visual** visual, int* depth)\n{\n    GLXFBConfig native;\n    XVisualInfo* result;\n\n    if (!chooseGLXFBConfig(fbconfig, &native))\n    {\n        _glfwInputError(GLFW_FORMAT_UNAVAILABLE,\n                        \"GLX: Failed to find a suitable GLXFBConfig\");\n        return GLFW_FALSE;\n    }\n\n    result = glXGetVisualFromFBConfig(_glfw.x11.display, native);\n    if (!result)\n    {\n        _glfwInputError(GLFW_PLATFORM_ERROR,\n                        \"GLX: Failed to retrieve Visual for GLXFBConfig\");\n        return GLFW_FALSE;\n    }\n\n    *visual = result->visual;\n    *depth  = result->depth;\n\n    XFree(result);\n    return GLFW_TRUE;\n}\n\n\n//////////////////////////////////////////////////////////////////////////\n//////                        GLFW native API                       //////\n//////////////////////////////////////////////////////////////////////////\n\nGLFWAPI GLXContext glfwGetGLXContext(GLFWwindow* handle)\n{\n    _GLFWwindow* window = (_GLFWwindow*) handle;\n    _GLFW_REQUIRE_INIT_OR_RETURN(NULL);\n\n    if (window->context.client == GLFW_NO_API)\n    {\n        _glfwInputError(GLFW_NO_WINDOW_CONTEXT, NULL);\n        return NULL;\n    }\n\n    return window->context.glx.handle;\n}\n\nGLFWAPI GLXWindow glfwGetGLXWindow(GLFWwindow* handle)\n{\n    _GLFWwindow* window = (_GLFWwindow*) handle;\n    _GLFW_REQUIRE_INIT_OR_RETURN(None);\n\n    if (window->context.client == GLFW_NO_API)\n    {\n        _glfwInputError(GLFW_NO_WINDOW_CONTEXT, NULL);\n        return None;\n    }\n\n    return window->context.glx.window;\n}\n\n"
  },
  {
    "path": "thirdparty/glfw/src/glx_context.h",
    "content": "//========================================================================\n// GLFW 3.3 GLX - www.glfw.org\n//------------------------------------------------------------------------\n// Copyright (c) 2002-2006 Marcus Geelnard\n// Copyright (c) 2006-2017 Camilla Löwy <elmindreda@glfw.org>\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//    claim that you wrote the original software. If you use this software\n//    in a product, an acknowledgment in the product documentation would\n//    be appreciated but is not required.\n//\n// 2. Altered source versions must be plainly marked as such, and must not\n//    be misrepresented as being the original software.\n//\n// 3. This notice may not be removed or altered from any source\n//    distribution.\n//\n//========================================================================\n\n#define GLX_VENDOR 1\n#define GLX_RGBA_BIT 0x00000001\n#define GLX_WINDOW_BIT 0x00000001\n#define GLX_DRAWABLE_TYPE 0x8010\n#define GLX_RENDER_TYPE 0x8011\n#define GLX_RGBA_TYPE 0x8014\n#define GLX_DOUBLEBUFFER 5\n#define GLX_STEREO 6\n#define GLX_AUX_BUFFERS 7\n#define GLX_RED_SIZE 8\n#define GLX_GREEN_SIZE 9\n#define GLX_BLUE_SIZE 10\n#define GLX_ALPHA_SIZE 11\n#define GLX_DEPTH_SIZE 12\n#define GLX_STENCIL_SIZE 13\n#define GLX_ACCUM_RED_SIZE 14\n#define GLX_ACCUM_GREEN_SIZE 15\n#define GLX_ACCUM_BLUE_SIZE 16\n#define GLX_ACCUM_ALPHA_SIZE 17\n#define GLX_SAMPLES 0x186a1\n#define GLX_VISUAL_ID 0x800b\n\n#define GLX_FRAMEBUFFER_SRGB_CAPABLE_ARB 0x20b2\n#define GLX_CONTEXT_DEBUG_BIT_ARB 0x00000001\n#define GLX_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB 0x00000002\n#define GLX_CONTEXT_CORE_PROFILE_BIT_ARB 0x00000001\n#define GLX_CONTEXT_PROFILE_MASK_ARB 0x9126\n#define GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB 0x00000002\n#define GLX_CONTEXT_MAJOR_VERSION_ARB 0x2091\n#define GLX_CONTEXT_MINOR_VERSION_ARB 0x2092\n#define GLX_CONTEXT_FLAGS_ARB 0x2094\n#define GLX_CONTEXT_ES2_PROFILE_BIT_EXT 0x00000004\n#define GLX_CONTEXT_ROBUST_ACCESS_BIT_ARB 0x00000004\n#define GLX_LOSE_CONTEXT_ON_RESET_ARB 0x8252\n#define GLX_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB 0x8256\n#define GLX_NO_RESET_NOTIFICATION_ARB 0x8261\n#define GLX_CONTEXT_RELEASE_BEHAVIOR_ARB 0x2097\n#define GLX_CONTEXT_RELEASE_BEHAVIOR_NONE_ARB 0\n#define GLX_CONTEXT_RELEASE_BEHAVIOR_FLUSH_ARB 0x2098\n#define GLX_CONTEXT_OPENGL_NO_ERROR_ARB 0x31b3\n\ntypedef XID GLXWindow;\ntypedef XID GLXDrawable;\ntypedef struct __GLXFBConfig* GLXFBConfig;\ntypedef struct __GLXcontext* GLXContext;\ntypedef void (*__GLXextproc)(void);\n\ntypedef int (*PFNGLXGETFBCONFIGATTRIBPROC)(Display*,GLXFBConfig,int,int*);\ntypedef const char* (*PFNGLXGETCLIENTSTRINGPROC)(Display*,int);\ntypedef Bool (*PFNGLXQUERYEXTENSIONPROC)(Display*,int*,int*);\ntypedef Bool (*PFNGLXQUERYVERSIONPROC)(Display*,int*,int*);\ntypedef void (*PFNGLXDESTROYCONTEXTPROC)(Display*,GLXContext);\ntypedef Bool (*PFNGLXMAKECURRENTPROC)(Display*,GLXDrawable,GLXContext);\ntypedef void (*PFNGLXSWAPBUFFERSPROC)(Display*,GLXDrawable);\ntypedef const char* (*PFNGLXQUERYEXTENSIONSSTRINGPROC)(Display*,int);\ntypedef GLXFBConfig* (*PFNGLXGETFBCONFIGSPROC)(Display*,int,int*);\ntypedef GLXContext (*PFNGLXCREATENEWCONTEXTPROC)(Display*,GLXFBConfig,int,GLXContext,Bool);\ntypedef __GLXextproc (* PFNGLXGETPROCADDRESSPROC)(const GLubyte *procName);\ntypedef void (*PFNGLXSWAPINTERVALEXTPROC)(Display*,GLXDrawable,int);\ntypedef XVisualInfo* (*PFNGLXGETVISUALFROMFBCONFIGPROC)(Display*,GLXFBConfig);\ntypedef GLXWindow (*PFNGLXCREATEWINDOWPROC)(Display*,GLXFBConfig,Window,const int*);\ntypedef void (*PFNGLXDESTROYWINDOWPROC)(Display*,GLXWindow);\n\ntypedef int (*PFNGLXSWAPINTERVALMESAPROC)(int);\ntypedef int (*PFNGLXSWAPINTERVALSGIPROC)(int);\ntypedef GLXContext (*PFNGLXCREATECONTEXTATTRIBSARBPROC)(Display*,GLXFBConfig,GLXContext,Bool,const int*);\n\n// libGL.so function pointer typedefs\n#define glXGetFBConfigs _glfw.glx.GetFBConfigs\n#define glXGetFBConfigAttrib _glfw.glx.GetFBConfigAttrib\n#define glXGetClientString _glfw.glx.GetClientString\n#define glXQueryExtension _glfw.glx.QueryExtension\n#define glXQueryVersion _glfw.glx.QueryVersion\n#define glXDestroyContext _glfw.glx.DestroyContext\n#define glXMakeCurrent _glfw.glx.MakeCurrent\n#define glXSwapBuffers _glfw.glx.SwapBuffers\n#define glXQueryExtensionsString _glfw.glx.QueryExtensionsString\n#define glXCreateNewContext _glfw.glx.CreateNewContext\n#define glXGetVisualFromFBConfig _glfw.glx.GetVisualFromFBConfig\n#define glXCreateWindow _glfw.glx.CreateWindow\n#define glXDestroyWindow _glfw.glx.DestroyWindow\n\n#define _GLFW_PLATFORM_CONTEXT_STATE            _GLFWcontextGLX glx\n#define _GLFW_PLATFORM_LIBRARY_CONTEXT_STATE    _GLFWlibraryGLX glx\n\n\n// GLX-specific per-context data\n//\ntypedef struct _GLFWcontextGLX\n{\n    GLXContext      handle;\n    GLXWindow       window;\n\n} _GLFWcontextGLX;\n\n// GLX-specific global data\n//\ntypedef struct _GLFWlibraryGLX\n{\n    int             major, minor;\n    int             eventBase;\n    int             errorBase;\n\n    // dlopen handle for libGL.so.1\n    void*           handle;\n\n    // GLX 1.3 functions\n    PFNGLXGETFBCONFIGSPROC              GetFBConfigs;\n    PFNGLXGETFBCONFIGATTRIBPROC         GetFBConfigAttrib;\n    PFNGLXGETCLIENTSTRINGPROC           GetClientString;\n    PFNGLXQUERYEXTENSIONPROC            QueryExtension;\n    PFNGLXQUERYVERSIONPROC              QueryVersion;\n    PFNGLXDESTROYCONTEXTPROC            DestroyContext;\n    PFNGLXMAKECURRENTPROC               MakeCurrent;\n    PFNGLXSWAPBUFFERSPROC               SwapBuffers;\n    PFNGLXQUERYEXTENSIONSSTRINGPROC     QueryExtensionsString;\n    PFNGLXCREATENEWCONTEXTPROC          CreateNewContext;\n    PFNGLXGETVISUALFROMFBCONFIGPROC     GetVisualFromFBConfig;\n    PFNGLXCREATEWINDOWPROC              CreateWindow;\n    PFNGLXDESTROYWINDOWPROC             DestroyWindow;\n\n    // GLX 1.4 and extension functions\n    PFNGLXGETPROCADDRESSPROC            GetProcAddress;\n    PFNGLXGETPROCADDRESSPROC            GetProcAddressARB;\n    PFNGLXSWAPINTERVALSGIPROC           SwapIntervalSGI;\n    PFNGLXSWAPINTERVALEXTPROC           SwapIntervalEXT;\n    PFNGLXSWAPINTERVALMESAPROC          SwapIntervalMESA;\n    PFNGLXCREATECONTEXTATTRIBSARBPROC   CreateContextAttribsARB;\n    GLFWbool        SGI_swap_control;\n    GLFWbool        EXT_swap_control;\n    GLFWbool        MESA_swap_control;\n    GLFWbool        ARB_multisample;\n    GLFWbool        ARB_framebuffer_sRGB;\n    GLFWbool        EXT_framebuffer_sRGB;\n    GLFWbool        ARB_create_context;\n    GLFWbool        ARB_create_context_profile;\n    GLFWbool        ARB_create_context_robustness;\n    GLFWbool        EXT_create_context_es2_profile;\n    GLFWbool        ARB_create_context_no_error;\n    GLFWbool        ARB_context_flush_control;\n\n} _GLFWlibraryGLX;\n\nGLFWbool _glfwInitGLX(void);\nvoid _glfwTerminateGLX(void);\nGLFWbool _glfwCreateContextGLX(_GLFWwindow* window,\n                               const _GLFWctxconfig* ctxconfig,\n                               const _GLFWfbconfig* fbconfig);\nvoid _glfwDestroyContextGLX(_GLFWwindow* window);\nGLFWbool _glfwChooseVisualGLX(const _GLFWwndconfig* wndconfig,\n                              const _GLFWctxconfig* ctxconfig,\n                              const _GLFWfbconfig* fbconfig,\n                              Visual** visual, int* depth);\n\n"
  },
  {
    "path": "thirdparty/glfw/src/init.c",
    "content": "//========================================================================\n// GLFW 3.3 - www.glfw.org\n//------------------------------------------------------------------------\n// Copyright (c) 2002-2006 Marcus Geelnard\n// Copyright (c) 2006-2018 Camilla Löwy <elmindreda@glfw.org>\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//    claim that you wrote the original software. If you use this software\n//    in a product, an acknowledgment in the product documentation would\n//    be appreciated but is not required.\n//\n// 2. Altered source versions must be plainly marked as such, and must not\n//    be misrepresented as being the original software.\n//\n// 3. This notice may not be removed or altered from any source\n//    distribution.\n//\n//========================================================================\n// Please use C89 style variable declarations in this file because VS 2010\n//========================================================================\n\n#include \"internal.h\"\n#include \"mappings.h\"\n\n#include <string.h>\n#include <stdlib.h>\n#include <stdio.h>\n#include <stdarg.h>\n#include <assert.h>\n\n\n// The global variables below comprise all mutable global data in GLFW\n//\n// Any other global variable is a bug\n\n// Global state shared between compilation units of GLFW\n//\n_GLFWlibrary _glfw = { GLFW_FALSE };\n\n// These are outside of _glfw so they can be used before initialization and\n// after termination\n//\nstatic _GLFWerror _glfwMainThreadError;\nstatic GLFWerrorfun _glfwErrorCallback;\nstatic _GLFWinitconfig _glfwInitHints =\n{\n    GLFW_TRUE,      // hat buttons\n    {\n        GLFW_TRUE,  // macOS menu bar\n        GLFW_TRUE   // macOS bundle chdir\n    }\n};\n\n// Terminate the library\n//\nstatic void terminate(void)\n{\n    int i;\n\n    memset(&_glfw.callbacks, 0, sizeof(_glfw.callbacks));\n\n    while (_glfw.windowListHead)\n        glfwDestroyWindow((GLFWwindow*) _glfw.windowListHead);\n\n    while (_glfw.cursorListHead)\n        glfwDestroyCursor((GLFWcursor*) _glfw.cursorListHead);\n\n    for (i = 0;  i < _glfw.monitorCount;  i++)\n    {\n        _GLFWmonitor* monitor = _glfw.monitors[i];\n        if (monitor->originalRamp.size)\n            _glfwPlatformSetGammaRamp(monitor, &monitor->originalRamp);\n        _glfwFreeMonitor(monitor);\n    }\n\n    free(_glfw.monitors);\n    _glfw.monitors = NULL;\n    _glfw.monitorCount = 0;\n\n    free(_glfw.mappings);\n    _glfw.mappings = NULL;\n    _glfw.mappingCount = 0;\n\n    _glfwTerminateVulkan();\n    _glfwPlatformTerminate();\n\n    _glfw.initialized = GLFW_FALSE;\n\n    while (_glfw.errorListHead)\n    {\n        _GLFWerror* error = _glfw.errorListHead;\n        _glfw.errorListHead = error->next;\n        free(error);\n    }\n\n    _glfwPlatformDestroyTls(&_glfw.contextSlot);\n    _glfwPlatformDestroyTls(&_glfw.errorSlot);\n    _glfwPlatformDestroyMutex(&_glfw.errorLock);\n\n    memset(&_glfw, 0, sizeof(_glfw));\n}\n\n\n//////////////////////////////////////////////////////////////////////////\n//////                       GLFW internal API                      //////\n//////////////////////////////////////////////////////////////////////////\n\nchar* _glfw_strdup(const char* source)\n{\n    const size_t length = strlen(source);\n    char* result = calloc(length + 1, 1);\n    strcpy(result, source);\n    return result;\n}\n\nfloat _glfw_fminf(float a, float b)\n{\n    if (a != a)\n        return b;\n    else if (b != b)\n        return a;\n    else if (a < b)\n        return a;\n    else\n        return b;\n}\n\nfloat _glfw_fmaxf(float a, float b)\n{\n    if (a != a)\n        return b;\n    else if (b != b)\n        return a;\n    else if (a > b)\n        return a;\n    else\n        return b;\n}\n\n\n//////////////////////////////////////////////////////////////////////////\n//////                         GLFW event API                       //////\n//////////////////////////////////////////////////////////////////////////\n\n// Notifies shared code of an error\n//\nvoid _glfwInputError(int code, const char* format, ...)\n{\n    _GLFWerror* error;\n    char description[_GLFW_MESSAGE_SIZE];\n\n    if (format)\n    {\n        va_list vl;\n\n        va_start(vl, format);\n        vsnprintf(description, sizeof(description), format, vl);\n        va_end(vl);\n\n        description[sizeof(description) - 1] = '\\0';\n    }\n    else\n    {\n        if (code == GLFW_NOT_INITIALIZED)\n            strcpy(description, \"The GLFW library is not initialized\");\n        else if (code == GLFW_NO_CURRENT_CONTEXT)\n            strcpy(description, \"There is no current context\");\n        else if (code == GLFW_INVALID_ENUM)\n            strcpy(description, \"Invalid argument for enum parameter\");\n        else if (code == GLFW_INVALID_VALUE)\n            strcpy(description, \"Invalid value for parameter\");\n        else if (code == GLFW_OUT_OF_MEMORY)\n            strcpy(description, \"Out of memory\");\n        else if (code == GLFW_API_UNAVAILABLE)\n            strcpy(description, \"The requested API is unavailable\");\n        else if (code == GLFW_VERSION_UNAVAILABLE)\n            strcpy(description, \"The requested API version is unavailable\");\n        else if (code == GLFW_PLATFORM_ERROR)\n            strcpy(description, \"A platform-specific error occurred\");\n        else if (code == GLFW_FORMAT_UNAVAILABLE)\n            strcpy(description, \"The requested format is unavailable\");\n        else if (code == GLFW_NO_WINDOW_CONTEXT)\n            strcpy(description, \"The specified window has no context\");\n        else\n            strcpy(description, \"ERROR: UNKNOWN GLFW ERROR\");\n    }\n\n    if (_glfw.initialized)\n    {\n        error = _glfwPlatformGetTls(&_glfw.errorSlot);\n        if (!error)\n        {\n            error = calloc(1, sizeof(_GLFWerror));\n            _glfwPlatformSetTls(&_glfw.errorSlot, error);\n            _glfwPlatformLockMutex(&_glfw.errorLock);\n            error->next = _glfw.errorListHead;\n            _glfw.errorListHead = error;\n            _glfwPlatformUnlockMutex(&_glfw.errorLock);\n        }\n    }\n    else\n        error = &_glfwMainThreadError;\n\n    error->code = code;\n    strcpy(error->description, description);\n\n    if (_glfwErrorCallback)\n        _glfwErrorCallback(code, description);\n}\n\n\n//////////////////////////////////////////////////////////////////////////\n//////                        GLFW public API                       //////\n//////////////////////////////////////////////////////////////////////////\n\nGLFWAPI int glfwInit(void)\n{\n    if (_glfw.initialized)\n        return GLFW_TRUE;\n\n    memset(&_glfw, 0, sizeof(_glfw));\n    _glfw.hints.init = _glfwInitHints;\n\n    if (!_glfwPlatformInit())\n    {\n        terminate();\n        return GLFW_FALSE;\n    }\n\n    if (!_glfwPlatformCreateMutex(&_glfw.errorLock) ||\n        !_glfwPlatformCreateTls(&_glfw.errorSlot) ||\n        !_glfwPlatformCreateTls(&_glfw.contextSlot))\n    {\n        terminate();\n        return GLFW_FALSE;\n    }\n\n    _glfwPlatformSetTls(&_glfw.errorSlot, &_glfwMainThreadError);\n\n    _glfw.initialized = GLFW_TRUE;\n    _glfw.timer.offset = _glfwPlatformGetTimerValue();\n\n    glfwDefaultWindowHints();\n\n    {\n        int i;\n\n        for (i = 0;  _glfwDefaultMappings[i];  i++)\n        {\n            if (!glfwUpdateGamepadMappings(_glfwDefaultMappings[i]))\n            {\n                terminate();\n                return GLFW_FALSE;\n            }\n        }\n    }\n\n    return GLFW_TRUE;\n}\n\nGLFWAPI void glfwTerminate(void)\n{\n    if (!_glfw.initialized)\n        return;\n\n    terminate();\n}\n\nGLFWAPI void glfwInitHint(int hint, int value)\n{\n    switch (hint)\n    {\n        case GLFW_JOYSTICK_HAT_BUTTONS:\n            _glfwInitHints.hatButtons = value;\n            return;\n        case GLFW_COCOA_CHDIR_RESOURCES:\n            _glfwInitHints.ns.chdir = value;\n            return;\n        case GLFW_COCOA_MENUBAR:\n            _glfwInitHints.ns.menubar = value;\n            return;\n    }\n\n    _glfwInputError(GLFW_INVALID_ENUM,\n                    \"Invalid init hint 0x%08X\", hint);\n}\n\nGLFWAPI void glfwGetVersion(int* major, int* minor, int* rev)\n{\n    if (major != NULL)\n        *major = GLFW_VERSION_MAJOR;\n    if (minor != NULL)\n        *minor = GLFW_VERSION_MINOR;\n    if (rev != NULL)\n        *rev = GLFW_VERSION_REVISION;\n}\n\nGLFWAPI const char* glfwGetVersionString(void)\n{\n    return _glfwPlatformGetVersionString();\n}\n\nGLFWAPI int glfwGetError(const char** description)\n{\n    _GLFWerror* error;\n    int code = GLFW_NO_ERROR;\n\n    if (description)\n        *description = NULL;\n\n    if (_glfw.initialized)\n        error = _glfwPlatformGetTls(&_glfw.errorSlot);\n    else\n        error = &_glfwMainThreadError;\n\n    if (error)\n    {\n        code = error->code;\n        error->code = GLFW_NO_ERROR;\n        if (description && code)\n            *description = error->description;\n    }\n\n    return code;\n}\n\nGLFWAPI GLFWerrorfun glfwSetErrorCallback(GLFWerrorfun cbfun)\n{\n    _GLFW_SWAP_POINTERS(_glfwErrorCallback, cbfun);\n    return cbfun;\n}\n\n"
  },
  {
    "path": "thirdparty/glfw/src/input.c",
    "content": "//========================================================================\n// GLFW 3.3 - www.glfw.org\n//------------------------------------------------------------------------\n// Copyright (c) 2002-2006 Marcus Geelnard\n// Copyright (c) 2006-2019 Camilla Löwy <elmindreda@glfw.org>\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//    claim that you wrote the original software. If you use this software\n//    in a product, an acknowledgment in the product documentation would\n//    be appreciated but is not required.\n//\n// 2. Altered source versions must be plainly marked as such, and must not\n//    be misrepresented as being the original software.\n//\n// 3. This notice may not be removed or altered from any source\n//    distribution.\n//\n//========================================================================\n// Please use C89 style variable declarations in this file because VS 2010\n//========================================================================\n\n#include \"internal.h\"\n\n#include <assert.h>\n#include <float.h>\n#include <math.h>\n#include <stdlib.h>\n#include <string.h>\n\n// Internal key state used for sticky keys\n#define _GLFW_STICK 3\n\n// Internal constants for gamepad mapping source types\n#define _GLFW_JOYSTICK_AXIS     1\n#define _GLFW_JOYSTICK_BUTTON   2\n#define _GLFW_JOYSTICK_HATBIT   3\n\n// Finds a mapping based on joystick GUID\n//\nstatic _GLFWmapping* findMapping(const char* guid)\n{\n    int i;\n\n    for (i = 0;  i < _glfw.mappingCount;  i++)\n    {\n        if (strcmp(_glfw.mappings[i].guid, guid) == 0)\n            return _glfw.mappings + i;\n    }\n\n    return NULL;\n}\n\n// Checks whether a gamepad mapping element is present in the hardware\n//\nstatic GLFWbool isValidElementForJoystick(const _GLFWmapelement* e,\n                                          const _GLFWjoystick* js)\n{\n    if (e->type == _GLFW_JOYSTICK_HATBIT && (e->index >> 4) >= js->hatCount)\n        return GLFW_FALSE;\n    else if (e->type == _GLFW_JOYSTICK_BUTTON && e->index >= js->buttonCount)\n        return GLFW_FALSE;\n    else if (e->type == _GLFW_JOYSTICK_AXIS && e->index >= js->axisCount)\n        return GLFW_FALSE;\n\n    return GLFW_TRUE;\n}\n\n// Finds a mapping based on joystick GUID and verifies element indices\n//\nstatic _GLFWmapping* findValidMapping(const _GLFWjoystick* js)\n{\n    _GLFWmapping* mapping = findMapping(js->guid);\n    if (mapping)\n    {\n        int i;\n\n        for (i = 0;  i <= GLFW_GAMEPAD_BUTTON_LAST;  i++)\n        {\n            if (!isValidElementForJoystick(mapping->buttons + i, js))\n            {\n                _glfwInputError(GLFW_INVALID_VALUE,\n                                \"Invalid button in gamepad mapping %s (%s)\",\n                                mapping->guid,\n                                mapping->name);\n                return NULL;\n            }\n        }\n\n        for (i = 0;  i <= GLFW_GAMEPAD_AXIS_LAST;  i++)\n        {\n            if (!isValidElementForJoystick(mapping->axes + i, js))\n            {\n                _glfwInputError(GLFW_INVALID_VALUE,\n                                \"Invalid axis in gamepad mapping %s (%s)\",\n                                mapping->guid,\n                                mapping->name);\n                return NULL;\n            }\n        }\n    }\n\n    return mapping;\n}\n\n// Parses an SDL_GameControllerDB line and adds it to the mapping list\n//\nstatic GLFWbool parseMapping(_GLFWmapping* mapping, const char* string)\n{\n    const char* c = string;\n    size_t i, length;\n    struct\n    {\n        const char* name;\n        _GLFWmapelement* element;\n    } fields[] =\n    {\n        { \"platform\",      NULL },\n        { \"a\",             mapping->buttons + GLFW_GAMEPAD_BUTTON_A },\n        { \"b\",             mapping->buttons + GLFW_GAMEPAD_BUTTON_B },\n        { \"x\",             mapping->buttons + GLFW_GAMEPAD_BUTTON_X },\n        { \"y\",             mapping->buttons + GLFW_GAMEPAD_BUTTON_Y },\n        { \"back\",          mapping->buttons + GLFW_GAMEPAD_BUTTON_BACK },\n        { \"start\",         mapping->buttons + GLFW_GAMEPAD_BUTTON_START },\n        { \"guide\",         mapping->buttons + GLFW_GAMEPAD_BUTTON_GUIDE },\n        { \"leftshoulder\",  mapping->buttons + GLFW_GAMEPAD_BUTTON_LEFT_BUMPER },\n        { \"rightshoulder\", mapping->buttons + GLFW_GAMEPAD_BUTTON_RIGHT_BUMPER },\n        { \"leftstick\",     mapping->buttons + GLFW_GAMEPAD_BUTTON_LEFT_THUMB },\n        { \"rightstick\",    mapping->buttons + GLFW_GAMEPAD_BUTTON_RIGHT_THUMB },\n        { \"dpup\",          mapping->buttons + GLFW_GAMEPAD_BUTTON_DPAD_UP },\n        { \"dpright\",       mapping->buttons + GLFW_GAMEPAD_BUTTON_DPAD_RIGHT },\n        { \"dpdown\",        mapping->buttons + GLFW_GAMEPAD_BUTTON_DPAD_DOWN },\n        { \"dpleft\",        mapping->buttons + GLFW_GAMEPAD_BUTTON_DPAD_LEFT },\n        { \"lefttrigger\",   mapping->axes + GLFW_GAMEPAD_AXIS_LEFT_TRIGGER },\n        { \"righttrigger\",  mapping->axes + GLFW_GAMEPAD_AXIS_RIGHT_TRIGGER },\n        { \"leftx\",         mapping->axes + GLFW_GAMEPAD_AXIS_LEFT_X },\n        { \"lefty\",         mapping->axes + GLFW_GAMEPAD_AXIS_LEFT_Y },\n        { \"rightx\",        mapping->axes + GLFW_GAMEPAD_AXIS_RIGHT_X },\n        { \"righty\",        mapping->axes + GLFW_GAMEPAD_AXIS_RIGHT_Y }\n    };\n\n    length = strcspn(c, \",\");\n    if (length != 32 || c[length] != ',')\n    {\n        _glfwInputError(GLFW_INVALID_VALUE, NULL);\n        return GLFW_FALSE;\n    }\n\n    memcpy(mapping->guid, c, length);\n    c += length + 1;\n\n    length = strcspn(c, \",\");\n    if (length >= sizeof(mapping->name) || c[length] != ',')\n    {\n        _glfwInputError(GLFW_INVALID_VALUE, NULL);\n        return GLFW_FALSE;\n    }\n\n    memcpy(mapping->name, c, length);\n    c += length + 1;\n\n    while (*c)\n    {\n        // TODO: Implement output modifiers\n        if (*c == '+' || *c == '-')\n            return GLFW_FALSE;\n\n        for (i = 0;  i < sizeof(fields) / sizeof(fields[0]);  i++)\n        {\n            length = strlen(fields[i].name);\n            if (strncmp(c, fields[i].name, length) != 0 || c[length] != ':')\n                continue;\n\n            c += length + 1;\n\n            if (fields[i].element)\n            {\n                _GLFWmapelement* e = fields[i].element;\n                int8_t minimum = -1;\n                int8_t maximum = 1;\n\n                if (*c == '+')\n                {\n                    minimum = 0;\n                    c += 1;\n                }\n                else if (*c == '-')\n                {\n                    maximum = 0;\n                    c += 1;\n                }\n\n                if (*c == 'a')\n                    e->type = _GLFW_JOYSTICK_AXIS;\n                else if (*c == 'b')\n                    e->type = _GLFW_JOYSTICK_BUTTON;\n                else if (*c == 'h')\n                    e->type = _GLFW_JOYSTICK_HATBIT;\n                else\n                    break;\n\n                if (e->type == _GLFW_JOYSTICK_HATBIT)\n                {\n                    const unsigned long hat = strtoul(c + 1, (char**) &c, 10);\n                    const unsigned long bit = strtoul(c + 1, (char**) &c, 10);\n                    e->index = (uint8_t) ((hat << 4) | bit);\n                }\n                else\n                    e->index = (uint8_t) strtoul(c + 1, (char**) &c, 10);\n\n                if (e->type == _GLFW_JOYSTICK_AXIS)\n                {\n                    e->axisScale = 2 / (maximum - minimum);\n                    e->axisOffset = -(maximum + minimum);\n\n                    if (*c == '~')\n                    {\n                        e->axisScale = -e->axisScale;\n                        e->axisOffset = -e->axisOffset;\n                    }\n                }\n            }\n            else\n            {\n                length = strlen(_GLFW_PLATFORM_MAPPING_NAME);\n                if (strncmp(c, _GLFW_PLATFORM_MAPPING_NAME, length) != 0)\n                    return GLFW_FALSE;\n            }\n\n            break;\n        }\n\n        c += strcspn(c, \",\");\n        c += strspn(c, \",\");\n    }\n\n    for (i = 0;  i < 32;  i++)\n    {\n        if (mapping->guid[i] >= 'A' && mapping->guid[i] <= 'F')\n            mapping->guid[i] += 'a' - 'A';\n    }\n\n    _glfwPlatformUpdateGamepadGUID(mapping->guid);\n    return GLFW_TRUE;\n}\n\n\n//////////////////////////////////////////////////////////////////////////\n//////                         GLFW event API                       //////\n//////////////////////////////////////////////////////////////////////////\n\n// Notifies shared code of a physical key event\n//\nvoid _glfwInputKey(_GLFWwindow* window, int key, int scancode, int action, int mods)\n{\n    if (key >= 0 && key <= GLFW_KEY_LAST)\n    {\n        GLFWbool repeated = GLFW_FALSE;\n\n        if (action == GLFW_RELEASE && window->keys[key] == GLFW_RELEASE)\n            return;\n\n        if (action == GLFW_PRESS && window->keys[key] == GLFW_PRESS)\n            repeated = GLFW_TRUE;\n\n        if (action == GLFW_RELEASE && window->stickyKeys)\n            window->keys[key] = _GLFW_STICK;\n        else\n            window->keys[key] = (char) action;\n\n        if (repeated)\n            action = GLFW_REPEAT;\n    }\n\n    if (!window->lockKeyMods)\n        mods &= ~(GLFW_MOD_CAPS_LOCK | GLFW_MOD_NUM_LOCK);\n\n    if (window->callbacks.key)\n        window->callbacks.key((GLFWwindow*) window, key, scancode, action, mods);\n}\n\n// Notifies shared code of a Unicode codepoint input event\n// The 'plain' parameter determines whether to emit a regular character event\n//\nvoid _glfwInputChar(_GLFWwindow* window, unsigned int codepoint, int mods, GLFWbool plain)\n{\n    if (codepoint < 32 || (codepoint > 126 && codepoint < 160))\n        return;\n\n    if (!window->lockKeyMods)\n        mods &= ~(GLFW_MOD_CAPS_LOCK | GLFW_MOD_NUM_LOCK);\n\n    if (window->callbacks.charmods)\n        window->callbacks.charmods((GLFWwindow*) window, codepoint, mods);\n\n    if (plain)\n    {\n        if (window->callbacks.character)\n            window->callbacks.character((GLFWwindow*) window, codepoint);\n    }\n}\n\n// Notifies shared code of a scroll event\n//\nvoid _glfwInputScroll(_GLFWwindow* window, double xoffset, double yoffset)\n{\n    if (window->callbacks.scroll)\n        window->callbacks.scroll((GLFWwindow*) window, xoffset, yoffset);\n}\n\n// Notifies shared code of a mouse button click event\n//\nvoid _glfwInputMouseClick(_GLFWwindow* window, int button, int action, int mods)\n{\n    if (button < 0 || button > GLFW_MOUSE_BUTTON_LAST)\n        return;\n\n    if (!window->lockKeyMods)\n        mods &= ~(GLFW_MOD_CAPS_LOCK | GLFW_MOD_NUM_LOCK);\n\n    if (action == GLFW_RELEASE && window->stickyMouseButtons)\n        window->mouseButtons[button] = _GLFW_STICK;\n    else\n        window->mouseButtons[button] = (char) action;\n\n    if (window->callbacks.mouseButton)\n        window->callbacks.mouseButton((GLFWwindow*) window, button, action, mods);\n}\n\n// Notifies shared code of a cursor motion event\n// The position is specified in content area relative screen coordinates\n//\nvoid _glfwInputCursorPos(_GLFWwindow* window, double xpos, double ypos)\n{\n    if (window->virtualCursorPosX == xpos && window->virtualCursorPosY == ypos)\n        return;\n\n    window->virtualCursorPosX = xpos;\n    window->virtualCursorPosY = ypos;\n\n    if (window->callbacks.cursorPos)\n        window->callbacks.cursorPos((GLFWwindow*) window, xpos, ypos);\n}\n\n// Notifies shared code of a cursor enter/leave event\n//\nvoid _glfwInputCursorEnter(_GLFWwindow* window, GLFWbool entered)\n{\n    if (window->callbacks.cursorEnter)\n        window->callbacks.cursorEnter((GLFWwindow*) window, entered);\n}\n\n// Notifies shared code of files or directories dropped on a window\n//\nvoid _glfwInputDrop(_GLFWwindow* window, int count, const char** paths)\n{\n    if (window->callbacks.drop)\n        window->callbacks.drop((GLFWwindow*) window, count, paths);\n}\n\n// Notifies shared code of a joystick connection or disconnection\n//\nvoid _glfwInputJoystick(_GLFWjoystick* js, int event)\n{\n    const int jid = (int) (js - _glfw.joysticks);\n\n    if (_glfw.callbacks.joystick)\n        _glfw.callbacks.joystick(jid, event);\n}\n\n// Notifies shared code of the new value of a joystick axis\n//\nvoid _glfwInputJoystickAxis(_GLFWjoystick* js, int axis, float value)\n{\n    js->axes[axis] = value;\n}\n\n// Notifies shared code of the new value of a joystick button\n//\nvoid _glfwInputJoystickButton(_GLFWjoystick* js, int button, char value)\n{\n    js->buttons[button] = value;\n}\n\n// Notifies shared code of the new value of a joystick hat\n//\nvoid _glfwInputJoystickHat(_GLFWjoystick* js, int hat, char value)\n{\n    const int base = js->buttonCount + hat * 4;\n\n    js->buttons[base + 0] = (value & 0x01) ? GLFW_PRESS : GLFW_RELEASE;\n    js->buttons[base + 1] = (value & 0x02) ? GLFW_PRESS : GLFW_RELEASE;\n    js->buttons[base + 2] = (value & 0x04) ? GLFW_PRESS : GLFW_RELEASE;\n    js->buttons[base + 3] = (value & 0x08) ? GLFW_PRESS : GLFW_RELEASE;\n\n    js->hats[hat] = value;\n}\n\n\n//////////////////////////////////////////////////////////////////////////\n//////                       GLFW internal API                      //////\n//////////////////////////////////////////////////////////////////////////\n\n// Returns an available joystick object with arrays and name allocated\n//\n_GLFWjoystick* _glfwAllocJoystick(const char* name,\n                                  const char* guid,\n                                  int axisCount,\n                                  int buttonCount,\n                                  int hatCount)\n{\n    int jid;\n    _GLFWjoystick* js;\n\n    for (jid = 0;  jid <= GLFW_JOYSTICK_LAST;  jid++)\n    {\n        if (!_glfw.joysticks[jid].present)\n            break;\n    }\n\n    if (jid > GLFW_JOYSTICK_LAST)\n        return NULL;\n\n    js = _glfw.joysticks + jid;\n    js->present     = GLFW_TRUE;\n    js->name        = _glfw_strdup(name);\n    js->axes        = calloc(axisCount, sizeof(float));\n    js->buttons     = calloc(buttonCount + (size_t) hatCount * 4, 1);\n    js->hats        = calloc(hatCount, 1);\n    js->axisCount   = axisCount;\n    js->buttonCount = buttonCount;\n    js->hatCount    = hatCount;\n\n    strncpy(js->guid, guid, sizeof(js->guid) - 1);\n    js->mapping = findValidMapping(js);\n\n    return js;\n}\n\n// Frees arrays and name and flags the joystick object as unused\n//\nvoid _glfwFreeJoystick(_GLFWjoystick* js)\n{\n    free(js->name);\n    free(js->axes);\n    free(js->buttons);\n    free(js->hats);\n    memset(js, 0, sizeof(_GLFWjoystick));\n}\n\n// Center the cursor in the content area of the specified window\n//\nvoid _glfwCenterCursorInContentArea(_GLFWwindow* window)\n{\n    int width, height;\n\n    _glfwPlatformGetWindowSize(window, &width, &height);\n    _glfwPlatformSetCursorPos(window, width / 2.0, height / 2.0);\n}\n\n\n//////////////////////////////////////////////////////////////////////////\n//////                        GLFW public API                       //////\n//////////////////////////////////////////////////////////////////////////\n\nGLFWAPI int glfwGetInputMode(GLFWwindow* handle, int mode)\n{\n    _GLFWwindow* window = (_GLFWwindow*) handle;\n    assert(window != NULL);\n\n    _GLFW_REQUIRE_INIT_OR_RETURN(0);\n\n    switch (mode)\n    {\n        case GLFW_CURSOR:\n            return window->cursorMode;\n        case GLFW_STICKY_KEYS:\n            return window->stickyKeys;\n        case GLFW_STICKY_MOUSE_BUTTONS:\n            return window->stickyMouseButtons;\n        case GLFW_LOCK_KEY_MODS:\n            return window->lockKeyMods;\n        case GLFW_RAW_MOUSE_MOTION:\n            return window->rawMouseMotion;\n    }\n\n    _glfwInputError(GLFW_INVALID_ENUM, \"Invalid input mode 0x%08X\", mode);\n    return 0;\n}\n\nGLFWAPI void glfwSetInputMode(GLFWwindow* handle, int mode, int value)\n{\n    _GLFWwindow* window = (_GLFWwindow*) handle;\n    assert(window != NULL);\n\n    _GLFW_REQUIRE_INIT();\n\n    if (mode == GLFW_CURSOR)\n    {\n        if (value != GLFW_CURSOR_NORMAL &&\n            value != GLFW_CURSOR_HIDDEN &&\n            value != GLFW_CURSOR_DISABLED)\n        {\n            _glfwInputError(GLFW_INVALID_ENUM,\n                            \"Invalid cursor mode 0x%08X\",\n                            value);\n            return;\n        }\n\n        if (window->cursorMode == value)\n            return;\n\n        window->cursorMode = value;\n\n        _glfwPlatformGetCursorPos(window,\n                                  &window->virtualCursorPosX,\n                                  &window->virtualCursorPosY);\n        _glfwPlatformSetCursorMode(window, value);\n    }\n    else if (mode == GLFW_STICKY_KEYS)\n    {\n        value = value ? GLFW_TRUE : GLFW_FALSE;\n        if (window->stickyKeys == value)\n            return;\n\n        if (!value)\n        {\n            int i;\n\n            // Release all sticky keys\n            for (i = 0;  i <= GLFW_KEY_LAST;  i++)\n            {\n                if (window->keys[i] == _GLFW_STICK)\n                    window->keys[i] = GLFW_RELEASE;\n            }\n        }\n\n        window->stickyKeys = value;\n    }\n    else if (mode == GLFW_STICKY_MOUSE_BUTTONS)\n    {\n        value = value ? GLFW_TRUE : GLFW_FALSE;\n        if (window->stickyMouseButtons == value)\n            return;\n\n        if (!value)\n        {\n            int i;\n\n            // Release all sticky mouse buttons\n            for (i = 0;  i <= GLFW_MOUSE_BUTTON_LAST;  i++)\n            {\n                if (window->mouseButtons[i] == _GLFW_STICK)\n                    window->mouseButtons[i] = GLFW_RELEASE;\n            }\n        }\n\n        window->stickyMouseButtons = value;\n    }\n    else if (mode == GLFW_LOCK_KEY_MODS)\n    {\n        window->lockKeyMods = value ? GLFW_TRUE : GLFW_FALSE;\n    }\n    else if (mode == GLFW_RAW_MOUSE_MOTION)\n    {\n        if (!_glfwPlatformRawMouseMotionSupported())\n        {\n            _glfwInputError(GLFW_PLATFORM_ERROR,\n                            \"Raw mouse motion is not supported on this system\");\n            return;\n        }\n\n        value = value ? GLFW_TRUE : GLFW_FALSE;\n        if (window->rawMouseMotion == value)\n            return;\n\n        window->rawMouseMotion = value;\n        _glfwPlatformSetRawMouseMotion(window, value);\n    }\n    else\n        _glfwInputError(GLFW_INVALID_ENUM, \"Invalid input mode 0x%08X\", mode);\n}\n\nGLFWAPI int glfwRawMouseMotionSupported(void)\n{\n    _GLFW_REQUIRE_INIT_OR_RETURN(GLFW_FALSE);\n    return _glfwPlatformRawMouseMotionSupported();\n}\n\nGLFWAPI const char* glfwGetKeyName(int key, int scancode)\n{\n    _GLFW_REQUIRE_INIT_OR_RETURN(NULL);\n\n    if (key != GLFW_KEY_UNKNOWN)\n    {\n        if (key != GLFW_KEY_KP_EQUAL &&\n            (key < GLFW_KEY_KP_0 || key > GLFW_KEY_KP_ADD) &&\n            (key < GLFW_KEY_APOSTROPHE || key > GLFW_KEY_WORLD_2))\n        {\n            return NULL;\n        }\n\n        scancode = _glfwPlatformGetKeyScancode(key);\n    }\n\n    return _glfwPlatformGetScancodeName(scancode);\n}\n\nGLFWAPI int glfwGetKeyScancode(int key)\n{\n    _GLFW_REQUIRE_INIT_OR_RETURN(-1);\n\n    if (key < GLFW_KEY_SPACE || key > GLFW_KEY_LAST)\n    {\n        _glfwInputError(GLFW_INVALID_ENUM, \"Invalid key %i\", key);\n        return GLFW_RELEASE;\n    }\n\n    return _glfwPlatformGetKeyScancode(key);\n}\n\nGLFWAPI int glfwGetKey(GLFWwindow* handle, int key)\n{\n    _GLFWwindow* window = (_GLFWwindow*) handle;\n    assert(window != NULL);\n\n    _GLFW_REQUIRE_INIT_OR_RETURN(GLFW_RELEASE);\n\n    if (key < GLFW_KEY_SPACE || key > GLFW_KEY_LAST)\n    {\n        _glfwInputError(GLFW_INVALID_ENUM, \"Invalid key %i\", key);\n        return GLFW_RELEASE;\n    }\n\n    if (window->keys[key] == _GLFW_STICK)\n    {\n        // Sticky mode: release key now\n        window->keys[key] = GLFW_RELEASE;\n        return GLFW_PRESS;\n    }\n\n    return (int) window->keys[key];\n}\n\nGLFWAPI int glfwGetMouseButton(GLFWwindow* handle, int button)\n{\n    _GLFWwindow* window = (_GLFWwindow*) handle;\n    assert(window != NULL);\n\n    _GLFW_REQUIRE_INIT_OR_RETURN(GLFW_RELEASE);\n\n    if (button < GLFW_MOUSE_BUTTON_1 || button > GLFW_MOUSE_BUTTON_LAST)\n    {\n        _glfwInputError(GLFW_INVALID_ENUM, \"Invalid mouse button %i\", button);\n        return GLFW_RELEASE;\n    }\n\n    if (window->mouseButtons[button] == _GLFW_STICK)\n    {\n        // Sticky mode: release mouse button now\n        window->mouseButtons[button] = GLFW_RELEASE;\n        return GLFW_PRESS;\n    }\n\n    return (int) window->mouseButtons[button];\n}\n\nGLFWAPI void glfwGetCursorPos(GLFWwindow* handle, double* xpos, double* ypos)\n{\n    _GLFWwindow* window = (_GLFWwindow*) handle;\n    assert(window != NULL);\n\n    if (xpos)\n        *xpos = 0;\n    if (ypos)\n        *ypos = 0;\n\n    _GLFW_REQUIRE_INIT();\n\n    if (window->cursorMode == GLFW_CURSOR_DISABLED)\n    {\n        if (xpos)\n            *xpos = window->virtualCursorPosX;\n        if (ypos)\n            *ypos = window->virtualCursorPosY;\n    }\n    else\n        _glfwPlatformGetCursorPos(window, xpos, ypos);\n}\n\nGLFWAPI void glfwSetCursorPos(GLFWwindow* handle, double xpos, double ypos)\n{\n    _GLFWwindow* window = (_GLFWwindow*) handle;\n    assert(window != NULL);\n\n    _GLFW_REQUIRE_INIT();\n\n    if (xpos != xpos || xpos < -DBL_MAX || xpos > DBL_MAX ||\n        ypos != ypos || ypos < -DBL_MAX || ypos > DBL_MAX)\n    {\n        _glfwInputError(GLFW_INVALID_VALUE,\n                        \"Invalid cursor position %f %f\",\n                        xpos, ypos);\n        return;\n    }\n\n    if (!_glfwPlatformWindowFocused(window))\n        return;\n\n    if (window->cursorMode == GLFW_CURSOR_DISABLED)\n    {\n        // Only update the accumulated position if the cursor is disabled\n        window->virtualCursorPosX = xpos;\n        window->virtualCursorPosY = ypos;\n    }\n    else\n    {\n        // Update system cursor position\n        _glfwPlatformSetCursorPos(window, xpos, ypos);\n    }\n}\n\nGLFWAPI GLFWcursor* glfwCreateCursor(const GLFWimage* image, int xhot, int yhot)\n{\n    _GLFWcursor* cursor;\n\n    assert(image != NULL);\n\n    _GLFW_REQUIRE_INIT_OR_RETURN(NULL);\n\n    cursor = calloc(1, sizeof(_GLFWcursor));\n    cursor->next = _glfw.cursorListHead;\n    _glfw.cursorListHead = cursor;\n\n    if (!_glfwPlatformCreateCursor(cursor, image, xhot, yhot))\n    {\n        glfwDestroyCursor((GLFWcursor*) cursor);\n        return NULL;\n    }\n\n    return (GLFWcursor*) cursor;\n}\n\nGLFWAPI GLFWcursor* glfwCreateStandardCursor(int shape)\n{\n    _GLFWcursor* cursor;\n\n    _GLFW_REQUIRE_INIT_OR_RETURN(NULL);\n\n    if (shape != GLFW_ARROW_CURSOR &&\n        shape != GLFW_IBEAM_CURSOR &&\n        shape != GLFW_CROSSHAIR_CURSOR &&\n        shape != GLFW_HAND_CURSOR &&\n        shape != GLFW_HRESIZE_CURSOR &&\n        shape != GLFW_VRESIZE_CURSOR)\n    {\n        _glfwInputError(GLFW_INVALID_ENUM, \"Invalid standard cursor 0x%08X\", shape);\n        return NULL;\n    }\n\n    cursor = calloc(1, sizeof(_GLFWcursor));\n    cursor->next = _glfw.cursorListHead;\n    _glfw.cursorListHead = cursor;\n\n    if (!_glfwPlatformCreateStandardCursor(cursor, shape))\n    {\n        glfwDestroyCursor((GLFWcursor*) cursor);\n        return NULL;\n    }\n\n    return (GLFWcursor*) cursor;\n}\n\nGLFWAPI void glfwDestroyCursor(GLFWcursor* handle)\n{\n    _GLFWcursor* cursor = (_GLFWcursor*) handle;\n\n    _GLFW_REQUIRE_INIT();\n\n    if (cursor == NULL)\n        return;\n\n    // Make sure the cursor is not being used by any window\n    {\n        _GLFWwindow* window;\n\n        for (window = _glfw.windowListHead;  window;  window = window->next)\n        {\n            if (window->cursor == cursor)\n                glfwSetCursor((GLFWwindow*) window, NULL);\n        }\n    }\n\n    _glfwPlatformDestroyCursor(cursor);\n\n    // Unlink cursor from global linked list\n    {\n        _GLFWcursor** prev = &_glfw.cursorListHead;\n\n        while (*prev != cursor)\n            prev = &((*prev)->next);\n\n        *prev = cursor->next;\n    }\n\n    free(cursor);\n}\n\nGLFWAPI void glfwSetCursor(GLFWwindow* windowHandle, GLFWcursor* cursorHandle)\n{\n    _GLFWwindow* window = (_GLFWwindow*) windowHandle;\n    _GLFWcursor* cursor = (_GLFWcursor*) cursorHandle;\n    assert(window != NULL);\n\n    _GLFW_REQUIRE_INIT();\n\n    window->cursor = cursor;\n\n    _glfwPlatformSetCursor(window, cursor);\n}\n\nGLFWAPI GLFWkeyfun glfwSetKeyCallback(GLFWwindow* handle, GLFWkeyfun cbfun)\n{\n    _GLFWwindow* window = (_GLFWwindow*) handle;\n    assert(window != NULL);\n\n    _GLFW_REQUIRE_INIT_OR_RETURN(NULL);\n    _GLFW_SWAP_POINTERS(window->callbacks.key, cbfun);\n    return cbfun;\n}\n\nGLFWAPI GLFWcharfun glfwSetCharCallback(GLFWwindow* handle, GLFWcharfun cbfun)\n{\n    _GLFWwindow* window = (_GLFWwindow*) handle;\n    assert(window != NULL);\n\n    _GLFW_REQUIRE_INIT_OR_RETURN(NULL);\n    _GLFW_SWAP_POINTERS(window->callbacks.character, cbfun);\n    return cbfun;\n}\n\nGLFWAPI GLFWcharmodsfun glfwSetCharModsCallback(GLFWwindow* handle, GLFWcharmodsfun cbfun)\n{\n    _GLFWwindow* window = (_GLFWwindow*) handle;\n    assert(window != NULL);\n\n    _GLFW_REQUIRE_INIT_OR_RETURN(NULL);\n    _GLFW_SWAP_POINTERS(window->callbacks.charmods, cbfun);\n    return cbfun;\n}\n\nGLFWAPI GLFWmousebuttonfun glfwSetMouseButtonCallback(GLFWwindow* handle,\n                                                      GLFWmousebuttonfun cbfun)\n{\n    _GLFWwindow* window = (_GLFWwindow*) handle;\n    assert(window != NULL);\n\n    _GLFW_REQUIRE_INIT_OR_RETURN(NULL);\n    _GLFW_SWAP_POINTERS(window->callbacks.mouseButton, cbfun);\n    return cbfun;\n}\n\nGLFWAPI GLFWcursorposfun glfwSetCursorPosCallback(GLFWwindow* handle,\n                                                  GLFWcursorposfun cbfun)\n{\n    _GLFWwindow* window = (_GLFWwindow*) handle;\n    assert(window != NULL);\n\n    _GLFW_REQUIRE_INIT_OR_RETURN(NULL);\n    _GLFW_SWAP_POINTERS(window->callbacks.cursorPos, cbfun);\n    return cbfun;\n}\n\nGLFWAPI GLFWcursorenterfun glfwSetCursorEnterCallback(GLFWwindow* handle,\n                                                      GLFWcursorenterfun cbfun)\n{\n    _GLFWwindow* window = (_GLFWwindow*) handle;\n    assert(window != NULL);\n\n    _GLFW_REQUIRE_INIT_OR_RETURN(NULL);\n    _GLFW_SWAP_POINTERS(window->callbacks.cursorEnter, cbfun);\n    return cbfun;\n}\n\nGLFWAPI GLFWscrollfun glfwSetScrollCallback(GLFWwindow* handle,\n                                            GLFWscrollfun cbfun)\n{\n    _GLFWwindow* window = (_GLFWwindow*) handle;\n    assert(window != NULL);\n\n    _GLFW_REQUIRE_INIT_OR_RETURN(NULL);\n    _GLFW_SWAP_POINTERS(window->callbacks.scroll, cbfun);\n    return cbfun;\n}\n\nGLFWAPI GLFWdropfun glfwSetDropCallback(GLFWwindow* handle, GLFWdropfun cbfun)\n{\n    _GLFWwindow* window = (_GLFWwindow*) handle;\n    assert(window != NULL);\n\n    _GLFW_REQUIRE_INIT_OR_RETURN(NULL);\n    _GLFW_SWAP_POINTERS(window->callbacks.drop, cbfun);\n    return cbfun;\n}\n\nGLFWAPI int glfwJoystickPresent(int jid)\n{\n    _GLFWjoystick* js;\n\n    assert(jid >= GLFW_JOYSTICK_1);\n    assert(jid <= GLFW_JOYSTICK_LAST);\n\n    _GLFW_REQUIRE_INIT_OR_RETURN(GLFW_FALSE);\n\n    if (jid < 0 || jid > GLFW_JOYSTICK_LAST)\n    {\n        _glfwInputError(GLFW_INVALID_ENUM, \"Invalid joystick ID %i\", jid);\n        return GLFW_FALSE;\n    }\n\n    js = _glfw.joysticks + jid;\n    if (!js->present)\n        return GLFW_FALSE;\n\n    return _glfwPlatformPollJoystick(js, _GLFW_POLL_PRESENCE);\n}\n\nGLFWAPI const float* glfwGetJoystickAxes(int jid, int* count)\n{\n    _GLFWjoystick* js;\n\n    assert(jid >= GLFW_JOYSTICK_1);\n    assert(jid <= GLFW_JOYSTICK_LAST);\n    assert(count != NULL);\n\n    *count = 0;\n\n    _GLFW_REQUIRE_INIT_OR_RETURN(NULL);\n\n    if (jid < 0 || jid > GLFW_JOYSTICK_LAST)\n    {\n        _glfwInputError(GLFW_INVALID_ENUM, \"Invalid joystick ID %i\", jid);\n        return NULL;\n    }\n\n    js = _glfw.joysticks + jid;\n    if (!js->present)\n        return NULL;\n\n    if (!_glfwPlatformPollJoystick(js, _GLFW_POLL_AXES))\n        return NULL;\n\n    *count = js->axisCount;\n    return js->axes;\n}\n\nGLFWAPI const unsigned char* glfwGetJoystickButtons(int jid, int* count)\n{\n    _GLFWjoystick* js;\n\n    assert(jid >= GLFW_JOYSTICK_1);\n    assert(jid <= GLFW_JOYSTICK_LAST);\n    assert(count != NULL);\n\n    *count = 0;\n\n    _GLFW_REQUIRE_INIT_OR_RETURN(NULL);\n\n    if (jid < 0 || jid > GLFW_JOYSTICK_LAST)\n    {\n        _glfwInputError(GLFW_INVALID_ENUM, \"Invalid joystick ID %i\", jid);\n        return NULL;\n    }\n\n    js = _glfw.joysticks + jid;\n    if (!js->present)\n        return NULL;\n\n    if (!_glfwPlatformPollJoystick(js, _GLFW_POLL_BUTTONS))\n        return NULL;\n\n    if (_glfw.hints.init.hatButtons)\n        *count = js->buttonCount + js->hatCount * 4;\n    else\n        *count = js->buttonCount;\n\n    return js->buttons;\n}\n\nGLFWAPI const unsigned char* glfwGetJoystickHats(int jid, int* count)\n{\n    _GLFWjoystick* js;\n\n    assert(jid >= GLFW_JOYSTICK_1);\n    assert(jid <= GLFW_JOYSTICK_LAST);\n    assert(count != NULL);\n\n    *count = 0;\n\n    _GLFW_REQUIRE_INIT_OR_RETURN(NULL);\n\n    if (jid < 0 || jid > GLFW_JOYSTICK_LAST)\n    {\n        _glfwInputError(GLFW_INVALID_ENUM, \"Invalid joystick ID %i\", jid);\n        return NULL;\n    }\n\n    js = _glfw.joysticks + jid;\n    if (!js->present)\n        return NULL;\n\n    if (!_glfwPlatformPollJoystick(js, _GLFW_POLL_BUTTONS))\n        return NULL;\n\n    *count = js->hatCount;\n    return js->hats;\n}\n\nGLFWAPI const char* glfwGetJoystickName(int jid)\n{\n    _GLFWjoystick* js;\n\n    assert(jid >= GLFW_JOYSTICK_1);\n    assert(jid <= GLFW_JOYSTICK_LAST);\n\n    _GLFW_REQUIRE_INIT_OR_RETURN(NULL);\n\n    if (jid < 0 || jid > GLFW_JOYSTICK_LAST)\n    {\n        _glfwInputError(GLFW_INVALID_ENUM, \"Invalid joystick ID %i\", jid);\n        return NULL;\n    }\n\n    js = _glfw.joysticks + jid;\n    if (!js->present)\n        return NULL;\n\n    if (!_glfwPlatformPollJoystick(js, _GLFW_POLL_PRESENCE))\n        return NULL;\n\n    return js->name;\n}\n\nGLFWAPI const char* glfwGetJoystickGUID(int jid)\n{\n    _GLFWjoystick* js;\n\n    assert(jid >= GLFW_JOYSTICK_1);\n    assert(jid <= GLFW_JOYSTICK_LAST);\n\n    _GLFW_REQUIRE_INIT_OR_RETURN(NULL);\n\n    if (jid < 0 || jid > GLFW_JOYSTICK_LAST)\n    {\n        _glfwInputError(GLFW_INVALID_ENUM, \"Invalid joystick ID %i\", jid);\n        return NULL;\n    }\n\n    js = _glfw.joysticks + jid;\n    if (!js->present)\n        return NULL;\n\n    if (!_glfwPlatformPollJoystick(js, _GLFW_POLL_PRESENCE))\n        return NULL;\n\n    return js->guid;\n}\n\nGLFWAPI void glfwSetJoystickUserPointer(int jid, void* pointer)\n{\n    _GLFWjoystick* js;\n\n    assert(jid >= GLFW_JOYSTICK_1);\n    assert(jid <= GLFW_JOYSTICK_LAST);\n\n    _GLFW_REQUIRE_INIT();\n\n    js = _glfw.joysticks + jid;\n    if (!js->present)\n        return;\n\n    js->userPointer = pointer;\n}\n\nGLFWAPI void* glfwGetJoystickUserPointer(int jid)\n{\n    _GLFWjoystick* js;\n\n    assert(jid >= GLFW_JOYSTICK_1);\n    assert(jid <= GLFW_JOYSTICK_LAST);\n\n    _GLFW_REQUIRE_INIT_OR_RETURN(NULL);\n\n    js = _glfw.joysticks + jid;\n    if (!js->present)\n        return NULL;\n\n    return js->userPointer;\n}\n\nGLFWAPI GLFWjoystickfun glfwSetJoystickCallback(GLFWjoystickfun cbfun)\n{\n    _GLFW_REQUIRE_INIT_OR_RETURN(NULL);\n    _GLFW_SWAP_POINTERS(_glfw.callbacks.joystick, cbfun);\n    return cbfun;\n}\n\nGLFWAPI int glfwUpdateGamepadMappings(const char* string)\n{\n    int jid;\n    const char* c = string;\n\n    assert(string != NULL);\n\n    _GLFW_REQUIRE_INIT_OR_RETURN(GLFW_FALSE);\n\n    while (*c)\n    {\n        if ((*c >= '0' && *c <= '9') ||\n            (*c >= 'a' && *c <= 'f') ||\n            (*c >= 'A' && *c <= 'F'))\n        {\n            char line[1024];\n\n            const size_t length = strcspn(c, \"\\r\\n\");\n            if (length < sizeof(line))\n            {\n                _GLFWmapping mapping = {{0}};\n\n                memcpy(line, c, length);\n                line[length] = '\\0';\n\n                if (parseMapping(&mapping, line))\n                {\n                    _GLFWmapping* previous = findMapping(mapping.guid);\n                    if (previous)\n                        *previous = mapping;\n                    else\n                    {\n                        _glfw.mappingCount++;\n                        _glfw.mappings =\n                            realloc(_glfw.mappings,\n                                    sizeof(_GLFWmapping) * _glfw.mappingCount);\n                        _glfw.mappings[_glfw.mappingCount - 1] = mapping;\n                    }\n                }\n            }\n\n            c += length;\n        }\n        else\n        {\n            c += strcspn(c, \"\\r\\n\");\n            c += strspn(c, \"\\r\\n\");\n        }\n    }\n\n    for (jid = 0;  jid <= GLFW_JOYSTICK_LAST;  jid++)\n    {\n        _GLFWjoystick* js = _glfw.joysticks + jid;\n        if (js->present)\n            js->mapping = findValidMapping(js);\n    }\n\n    return GLFW_TRUE;\n}\n\nGLFWAPI int glfwJoystickIsGamepad(int jid)\n{\n    _GLFWjoystick* js;\n\n    assert(jid >= GLFW_JOYSTICK_1);\n    assert(jid <= GLFW_JOYSTICK_LAST);\n\n    _GLFW_REQUIRE_INIT_OR_RETURN(GLFW_FALSE);\n\n    if (jid < 0 || jid > GLFW_JOYSTICK_LAST)\n    {\n        _glfwInputError(GLFW_INVALID_ENUM, \"Invalid joystick ID %i\", jid);\n        return GLFW_FALSE;\n    }\n\n    js = _glfw.joysticks + jid;\n    if (!js->present)\n        return GLFW_FALSE;\n\n    if (!_glfwPlatformPollJoystick(js, _GLFW_POLL_PRESENCE))\n        return GLFW_FALSE;\n\n    return js->mapping != NULL;\n}\n\nGLFWAPI const char* glfwGetGamepadName(int jid)\n{\n    _GLFWjoystick* js;\n\n    assert(jid >= GLFW_JOYSTICK_1);\n    assert(jid <= GLFW_JOYSTICK_LAST);\n\n    _GLFW_REQUIRE_INIT_OR_RETURN(NULL);\n\n    if (jid < 0 || jid > GLFW_JOYSTICK_LAST)\n    {\n        _glfwInputError(GLFW_INVALID_ENUM, \"Invalid joystick ID %i\", jid);\n        return NULL;\n    }\n\n    js = _glfw.joysticks + jid;\n    if (!js->present)\n        return NULL;\n\n    if (!_glfwPlatformPollJoystick(js, _GLFW_POLL_PRESENCE))\n        return NULL;\n\n    if (!js->mapping)\n        return NULL;\n\n    return js->mapping->name;\n}\n\nGLFWAPI int glfwGetGamepadState(int jid, GLFWgamepadstate* state)\n{\n    int i;\n    _GLFWjoystick* js;\n\n    assert(jid >= GLFW_JOYSTICK_1);\n    assert(jid <= GLFW_JOYSTICK_LAST);\n    assert(state != NULL);\n\n    memset(state, 0, sizeof(GLFWgamepadstate));\n\n    _GLFW_REQUIRE_INIT_OR_RETURN(GLFW_FALSE);\n\n    if (jid < 0 || jid > GLFW_JOYSTICK_LAST)\n    {\n        _glfwInputError(GLFW_INVALID_ENUM, \"Invalid joystick ID %i\", jid);\n        return GLFW_FALSE;\n    }\n\n    js = _glfw.joysticks + jid;\n    if (!js->present)\n        return GLFW_FALSE;\n\n    if (!_glfwPlatformPollJoystick(js, _GLFW_POLL_ALL))\n        return GLFW_FALSE;\n\n    if (!js->mapping)\n        return GLFW_FALSE;\n\n    for (i = 0;  i <= GLFW_GAMEPAD_BUTTON_LAST;  i++)\n    {\n        const _GLFWmapelement* e = js->mapping->buttons + i;\n        if (e->type == _GLFW_JOYSTICK_AXIS)\n        {\n            const float value = js->axes[e->index] * e->axisScale + e->axisOffset;\n            // HACK: This should be baked into the value transform\n            // TODO: Bake into transform when implementing output modifiers\n            if (e->axisOffset < 0 || (e->axisOffset == 0 && e->axisScale > 0))\n            {\n                if (value >= 0.f)\n                    state->buttons[i] = GLFW_PRESS;\n            }\n            else\n            {\n                if (value <= 0.f)\n                    state->buttons[i] = GLFW_PRESS;\n            }\n        }\n        else if (e->type == _GLFW_JOYSTICK_HATBIT)\n        {\n            const unsigned int hat = e->index >> 4;\n            const unsigned int bit = e->index & 0xf;\n            if (js->hats[hat] & bit)\n                state->buttons[i] = GLFW_PRESS;\n        }\n        else if (e->type == _GLFW_JOYSTICK_BUTTON)\n            state->buttons[i] = js->buttons[e->index];\n    }\n\n    for (i = 0;  i <= GLFW_GAMEPAD_AXIS_LAST;  i++)\n    {\n        const _GLFWmapelement* e = js->mapping->axes + i;\n        if (e->type == _GLFW_JOYSTICK_AXIS)\n        {\n            const float value = js->axes[e->index] * e->axisScale + e->axisOffset;\n            state->axes[i] = _glfw_fminf(_glfw_fmaxf(value, -1.f), 1.f);\n        }\n        else if (e->type == _GLFW_JOYSTICK_HATBIT)\n        {\n            const unsigned int hat = e->index >> 4;\n            const unsigned int bit = e->index & 0xf;\n            if (js->hats[hat] & bit)\n                state->axes[i] = 1.f;\n            else\n                state->axes[i] = -1.f;\n        }\n        else if (e->type == _GLFW_JOYSTICK_BUTTON)\n            state->axes[i] = js->buttons[e->index] * 2.f - 1.f;\n    }\n\n    return GLFW_TRUE;\n}\n\nGLFWAPI void glfwSetClipboardString(GLFWwindow* handle, const char* string)\n{\n    assert(string != NULL);\n\n    _GLFW_REQUIRE_INIT();\n    _glfwPlatformSetClipboardString(string);\n}\n\nGLFWAPI const char* glfwGetClipboardString(GLFWwindow* handle)\n{\n    _GLFW_REQUIRE_INIT_OR_RETURN(NULL);\n    return _glfwPlatformGetClipboardString();\n}\n\nGLFWAPI double glfwGetTime(void)\n{\n    _GLFW_REQUIRE_INIT_OR_RETURN(0.0);\n    return (double) (_glfwPlatformGetTimerValue() - _glfw.timer.offset) /\n        _glfwPlatformGetTimerFrequency();\n}\n\nGLFWAPI void glfwSetTime(double time)\n{\n    _GLFW_REQUIRE_INIT();\n\n    if (time != time || time < 0.0 || time > 18446744073.0)\n    {\n        _glfwInputError(GLFW_INVALID_VALUE, \"Invalid time %f\", time);\n        return;\n    }\n\n    _glfw.timer.offset = _glfwPlatformGetTimerValue() -\n        (uint64_t) (time * _glfwPlatformGetTimerFrequency());\n}\n\nGLFWAPI uint64_t glfwGetTimerValue(void)\n{\n    _GLFW_REQUIRE_INIT_OR_RETURN(0);\n    return _glfwPlatformGetTimerValue();\n}\n\nGLFWAPI uint64_t glfwGetTimerFrequency(void)\n{\n    _GLFW_REQUIRE_INIT_OR_RETURN(0);\n    return _glfwPlatformGetTimerFrequency();\n}\n"
  },
  {
    "path": "thirdparty/glfw/src/internal.h",
    "content": "//========================================================================\n// GLFW 3.3 - www.glfw.org\n//------------------------------------------------------------------------\n// Copyright (c) 2002-2006 Marcus Geelnard\n// Copyright (c) 2006-2019 Camilla Löwy <elmindreda@glfw.org>\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//    claim that you wrote the original software. If you use this software\n//    in a product, an acknowledgment in the product documentation would\n//    be appreciated but is not required.\n//\n// 2. Altered source versions must be plainly marked as such, and must not\n//    be misrepresented as being the original software.\n//\n// 3. This notice may not be removed or altered from any source\n//    distribution.\n//\n//========================================================================\n\n#pragma once\n\n#if defined(_GLFW_USE_CONFIG_H)\n #include \"glfw_config.h\"\n#endif\n\n#if defined(GLFW_INCLUDE_GLCOREARB) || \\\n    defined(GLFW_INCLUDE_ES1)       || \\\n    defined(GLFW_INCLUDE_ES2)       || \\\n    defined(GLFW_INCLUDE_ES3)       || \\\n    defined(GLFW_INCLUDE_ES31)      || \\\n    defined(GLFW_INCLUDE_ES32)      || \\\n    defined(GLFW_INCLUDE_NONE)      || \\\n    defined(GLFW_INCLUDE_GLEXT)     || \\\n    defined(GLFW_INCLUDE_GLU)       || \\\n    defined(GLFW_INCLUDE_VULKAN)    || \\\n    defined(GLFW_DLL)\n #error \"You must not define any header option macros when compiling GLFW\"\n#endif\n\n#define GLFW_INCLUDE_NONE\n#include \"../include/GLFW/glfw3.h\"\n\n#define _GLFW_INSERT_FIRST      0\n#define _GLFW_INSERT_LAST       1\n\n#define _GLFW_POLL_PRESENCE     0\n#define _GLFW_POLL_AXES         1\n#define _GLFW_POLL_BUTTONS      2\n#define _GLFW_POLL_ALL          (_GLFW_POLL_AXES | _GLFW_POLL_BUTTONS)\n\n#define _GLFW_MESSAGE_SIZE      1024\n\ntypedef int GLFWbool;\n\ntypedef struct _GLFWerror       _GLFWerror;\ntypedef struct _GLFWinitconfig  _GLFWinitconfig;\ntypedef struct _GLFWwndconfig   _GLFWwndconfig;\ntypedef struct _GLFWctxconfig   _GLFWctxconfig;\ntypedef struct _GLFWfbconfig    _GLFWfbconfig;\ntypedef struct _GLFWcontext     _GLFWcontext;\ntypedef struct _GLFWwindow      _GLFWwindow;\ntypedef struct _GLFWlibrary     _GLFWlibrary;\ntypedef struct _GLFWmonitor     _GLFWmonitor;\ntypedef struct _GLFWcursor      _GLFWcursor;\ntypedef struct _GLFWmapelement  _GLFWmapelement;\ntypedef struct _GLFWmapping     _GLFWmapping;\ntypedef struct _GLFWjoystick    _GLFWjoystick;\ntypedef struct _GLFWtls         _GLFWtls;\ntypedef struct _GLFWmutex       _GLFWmutex;\n\ntypedef void (* _GLFWmakecontextcurrentfun)(_GLFWwindow*);\ntypedef void (* _GLFWswapbuffersfun)(_GLFWwindow*);\ntypedef void (* _GLFWswapintervalfun)(int);\ntypedef int (* _GLFWextensionsupportedfun)(const char*);\ntypedef GLFWglproc (* _GLFWgetprocaddressfun)(const char*);\ntypedef void (* _GLFWdestroycontextfun)(_GLFWwindow*);\n\n#define GL_VERSION 0x1f02\n#define GL_NONE 0\n#define GL_COLOR_BUFFER_BIT 0x00004000\n#define GL_UNSIGNED_BYTE 0x1401\n#define GL_EXTENSIONS 0x1f03\n#define GL_NUM_EXTENSIONS 0x821d\n#define GL_CONTEXT_FLAGS 0x821e\n#define GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT 0x00000001\n#define GL_CONTEXT_FLAG_DEBUG_BIT 0x00000002\n#define GL_CONTEXT_PROFILE_MASK 0x9126\n#define GL_CONTEXT_COMPATIBILITY_PROFILE_BIT 0x00000002\n#define GL_CONTEXT_CORE_PROFILE_BIT 0x00000001\n#define GL_RESET_NOTIFICATION_STRATEGY_ARB 0x8256\n#define GL_LOSE_CONTEXT_ON_RESET_ARB 0x8252\n#define GL_NO_RESET_NOTIFICATION_ARB 0x8261\n#define GL_CONTEXT_RELEASE_BEHAVIOR 0x82fb\n#define GL_CONTEXT_RELEASE_BEHAVIOR_FLUSH 0x82fc\n#define GL_CONTEXT_FLAG_NO_ERROR_BIT_KHR 0x00000008\n\ntypedef int GLint;\ntypedef unsigned int GLuint;\ntypedef unsigned int GLenum;\ntypedef unsigned int GLbitfield;\ntypedef unsigned char GLubyte;\n\ntypedef void (APIENTRY * PFNGLCLEARPROC)(GLbitfield);\ntypedef const GLubyte* (APIENTRY * PFNGLGETSTRINGPROC)(GLenum);\ntypedef void (APIENTRY * PFNGLGETINTEGERVPROC)(GLenum,GLint*);\ntypedef const GLubyte* (APIENTRY * PFNGLGETSTRINGIPROC)(GLenum,GLuint);\n\n#define VK_NULL_HANDLE 0\n\ntypedef void* VkInstance;\ntypedef void* VkPhysicalDevice;\ntypedef uint64_t VkSurfaceKHR;\ntypedef uint32_t VkFlags;\ntypedef uint32_t VkBool32;\n\ntypedef enum VkStructureType\n{\n    VK_STRUCTURE_TYPE_XLIB_SURFACE_CREATE_INFO_KHR = 1000004000,\n    VK_STRUCTURE_TYPE_XCB_SURFACE_CREATE_INFO_KHR = 1000005000,\n    VK_STRUCTURE_TYPE_WAYLAND_SURFACE_CREATE_INFO_KHR = 1000006000,\n    VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR = 1000009000,\n    VK_STRUCTURE_TYPE_MACOS_SURFACE_CREATE_INFO_MVK = 1000123000,\n    VK_STRUCTURE_TYPE_METAL_SURFACE_CREATE_INFO_EXT = 1000217000,\n    VK_STRUCTURE_TYPE_MAX_ENUM = 0x7FFFFFFF\n} VkStructureType;\n\ntypedef enum VkResult\n{\n    VK_SUCCESS = 0,\n    VK_NOT_READY = 1,\n    VK_TIMEOUT = 2,\n    VK_EVENT_SET = 3,\n    VK_EVENT_RESET = 4,\n    VK_INCOMPLETE = 5,\n    VK_ERROR_OUT_OF_HOST_MEMORY = -1,\n    VK_ERROR_OUT_OF_DEVICE_MEMORY = -2,\n    VK_ERROR_INITIALIZATION_FAILED = -3,\n    VK_ERROR_DEVICE_LOST = -4,\n    VK_ERROR_MEMORY_MAP_FAILED = -5,\n    VK_ERROR_LAYER_NOT_PRESENT = -6,\n    VK_ERROR_EXTENSION_NOT_PRESENT = -7,\n    VK_ERROR_FEATURE_NOT_PRESENT = -8,\n    VK_ERROR_INCOMPATIBLE_DRIVER = -9,\n    VK_ERROR_TOO_MANY_OBJECTS = -10,\n    VK_ERROR_FORMAT_NOT_SUPPORTED = -11,\n    VK_ERROR_SURFACE_LOST_KHR = -1000000000,\n    VK_SUBOPTIMAL_KHR = 1000001003,\n    VK_ERROR_OUT_OF_DATE_KHR = -1000001004,\n    VK_ERROR_INCOMPATIBLE_DISPLAY_KHR = -1000003001,\n    VK_ERROR_NATIVE_WINDOW_IN_USE_KHR = -1000000001,\n    VK_ERROR_VALIDATION_FAILED_EXT = -1000011001,\n    VK_RESULT_MAX_ENUM = 0x7FFFFFFF\n} VkResult;\n\ntypedef struct VkAllocationCallbacks VkAllocationCallbacks;\n\ntypedef struct VkExtensionProperties\n{\n    char            extensionName[256];\n    uint32_t        specVersion;\n} VkExtensionProperties;\n\ntypedef void (APIENTRY * PFN_vkVoidFunction)(void);\n\n#if defined(_GLFW_VULKAN_STATIC)\n  PFN_vkVoidFunction vkGetInstanceProcAddr(VkInstance,const char*);\n  VkResult vkEnumerateInstanceExtensionProperties(const char*,uint32_t*,VkExtensionProperties*);\n#else\n  typedef PFN_vkVoidFunction (APIENTRY * PFN_vkGetInstanceProcAddr)(VkInstance,const char*);\n  typedef VkResult (APIENTRY * PFN_vkEnumerateInstanceExtensionProperties)(const char*,uint32_t*,VkExtensionProperties*);\n  #define vkEnumerateInstanceExtensionProperties _glfw.vk.EnumerateInstanceExtensionProperties\n  #define vkGetInstanceProcAddr _glfw.vk.GetInstanceProcAddr\n#endif\n\n#if defined(_GLFW_COCOA)\n #include \"cocoa_platform.h\"\n#elif defined(_GLFW_WIN32)\n #include \"win32_platform.h\"\n#elif defined(_GLFW_X11)\n #include \"x11_platform.h\"\n#elif defined(_GLFW_WAYLAND)\n #include \"wl_platform.h\"\n#elif defined(_GLFW_OSMESA)\n #include \"null_platform.h\"\n#else\n #error \"No supported window creation API selected\"\n#endif\n\n// Constructs a version number string from the public header macros\n#define _GLFW_CONCAT_VERSION(m, n, r) #m \".\" #n \".\" #r\n#define _GLFW_MAKE_VERSION(m, n, r) _GLFW_CONCAT_VERSION(m, n, r)\n#define _GLFW_VERSION_NUMBER _GLFW_MAKE_VERSION(GLFW_VERSION_MAJOR, \\\n                                                GLFW_VERSION_MINOR, \\\n                                                GLFW_VERSION_REVISION)\n\n// Checks for whether the library has been initialized\n#define _GLFW_REQUIRE_INIT()                         \\\n    if (!_glfw.initialized)                          \\\n    {                                                \\\n        _glfwInputError(GLFW_NOT_INITIALIZED, NULL); \\\n        return;                                      \\\n    }\n#define _GLFW_REQUIRE_INIT_OR_RETURN(x)              \\\n    if (!_glfw.initialized)                          \\\n    {                                                \\\n        _glfwInputError(GLFW_NOT_INITIALIZED, NULL); \\\n        return x;                                    \\\n    }\n\n// Swaps the provided pointers\n#define _GLFW_SWAP_POINTERS(x, y) \\\n    {                             \\\n        void* t;                  \\\n        t = x;                    \\\n        x = y;                    \\\n        y = t;                    \\\n    }\n\n// Per-thread error structure\n//\nstruct _GLFWerror\n{\n    _GLFWerror*     next;\n    int             code;\n    char            description[_GLFW_MESSAGE_SIZE];\n};\n\n// Initialization configuration\n//\n// Parameters relating to the initialization of the library\n//\nstruct _GLFWinitconfig\n{\n    GLFWbool      hatButtons;\n    struct {\n        GLFWbool  menubar;\n        GLFWbool  chdir;\n    } ns;\n};\n\n// Window configuration\n//\n// Parameters relating to the creation of the window but not directly related\n// to the framebuffer.  This is used to pass window creation parameters from\n// shared code to the platform API.\n//\nstruct _GLFWwndconfig\n{\n    int           width;\n    int           height;\n    const char*   title;\n    GLFWbool      resizable;\n    GLFWbool      visible;\n    GLFWbool      decorated;\n    GLFWbool      focused;\n    GLFWbool      autoIconify;\n    GLFWbool      floating;\n    GLFWbool      maximized;\n    GLFWbool      centerCursor;\n    GLFWbool      focusOnShow;\n    GLFWbool      scaleToMonitor;\n    struct {\n        GLFWbool  retina;\n        char      frameName[256];\n    } ns;\n    struct {\n        char      className[256];\n        char      instanceName[256];\n    } x11;\n};\n\n// Context configuration\n//\n// Parameters relating to the creation of the context but not directly related\n// to the framebuffer.  This is used to pass context creation parameters from\n// shared code to the platform API.\n//\nstruct _GLFWctxconfig\n{\n    int           client;\n    int           source;\n    int           major;\n    int           minor;\n    GLFWbool      forward;\n    GLFWbool      debug;\n    GLFWbool      noerror;\n    int           profile;\n    int           robustness;\n    int           release;\n    _GLFWwindow*  share;\n    struct {\n        GLFWbool  offline;\n    } nsgl;\n};\n\n// Framebuffer configuration\n//\n// This describes buffers and their sizes.  It also contains\n// a platform-specific ID used to map back to the backend API object.\n//\n// It is used to pass framebuffer parameters from shared code to the platform\n// API and also to enumerate and select available framebuffer configs.\n//\nstruct _GLFWfbconfig\n{\n    int         redBits;\n    int         greenBits;\n    int         blueBits;\n    int         alphaBits;\n    int         depthBits;\n    int         stencilBits;\n    int         accumRedBits;\n    int         accumGreenBits;\n    int         accumBlueBits;\n    int         accumAlphaBits;\n    int         auxBuffers;\n    GLFWbool    stereo;\n    int         samples;\n    GLFWbool    sRGB;\n    GLFWbool    doublebuffer;\n    GLFWbool    transparent;\n    uintptr_t   handle;\n};\n\n// Context structure\n//\nstruct _GLFWcontext\n{\n    int                 client;\n    int                 source;\n    int                 major, minor, revision;\n    GLFWbool            forward, debug, noerror;\n    int                 profile;\n    int                 robustness;\n    int                 release;\n\n    PFNGLGETSTRINGIPROC GetStringi;\n    PFNGLGETINTEGERVPROC GetIntegerv;\n    PFNGLGETSTRINGPROC  GetString;\n\n    _GLFWmakecontextcurrentfun  makeCurrent;\n    _GLFWswapbuffersfun         swapBuffers;\n    _GLFWswapintervalfun        swapInterval;\n    _GLFWextensionsupportedfun  extensionSupported;\n    _GLFWgetprocaddressfun      getProcAddress;\n    _GLFWdestroycontextfun      destroy;\n\n    // This is defined in the context API's context.h\n    _GLFW_PLATFORM_CONTEXT_STATE;\n    // This is defined in egl_context.h\n    _GLFW_EGL_CONTEXT_STATE;\n    // This is defined in osmesa_context.h\n    _GLFW_OSMESA_CONTEXT_STATE;\n};\n\n// Window and context structure\n//\nstruct _GLFWwindow\n{\n    struct _GLFWwindow* next;\n\n    // Window settings and state\n    GLFWbool            resizable;\n    GLFWbool            decorated;\n    GLFWbool            autoIconify;\n    GLFWbool            floating;\n    GLFWbool            focusOnShow;\n    GLFWbool            shouldClose;\n    void*               userPointer;\n    GLFWvidmode         videoMode;\n    _GLFWmonitor*       monitor;\n    _GLFWcursor*        cursor;\n\n    int                 minwidth, minheight;\n    int                 maxwidth, maxheight;\n    int                 numer, denom;\n\n    GLFWbool            stickyKeys;\n    GLFWbool            stickyMouseButtons;\n    GLFWbool            lockKeyMods;\n    int                 cursorMode;\n    char                mouseButtons[GLFW_MOUSE_BUTTON_LAST + 1];\n    char                keys[GLFW_KEY_LAST + 1];\n    // Virtual cursor position when cursor is disabled\n    double              virtualCursorPosX, virtualCursorPosY;\n    GLFWbool            rawMouseMotion;\n\n    _GLFWcontext        context;\n\n    struct {\n        GLFWwindowposfun        pos;\n        GLFWwindowsizefun       size;\n        GLFWwindowclosefun      close;\n        GLFWwindowrefreshfun    refresh;\n        GLFWwindowfocusfun      focus;\n        GLFWwindowiconifyfun    iconify;\n        GLFWwindowmaximizefun   maximize;\n        GLFWframebuffersizefun  fbsize;\n        GLFWwindowcontentscalefun scale;\n        GLFWmousebuttonfun      mouseButton;\n        GLFWcursorposfun        cursorPos;\n        GLFWcursorenterfun      cursorEnter;\n        GLFWscrollfun           scroll;\n        GLFWkeyfun              key;\n        GLFWcharfun             character;\n        GLFWcharmodsfun         charmods;\n        GLFWdropfun             drop;\n    } callbacks;\n\n    // This is defined in the window API's platform.h\n    _GLFW_PLATFORM_WINDOW_STATE;\n};\n\n// Monitor structure\n//\nstruct _GLFWmonitor\n{\n    char*           name;\n    void*           userPointer;\n\n    // Physical dimensions in millimeters.\n    int             widthMM, heightMM;\n\n    // The window whose video mode is current on this monitor\n    _GLFWwindow*    window;\n\n    GLFWvidmode*    modes;\n    int             modeCount;\n    GLFWvidmode     currentMode;\n\n    GLFWgammaramp   originalRamp;\n    GLFWgammaramp   currentRamp;\n\n    // This is defined in the window API's platform.h\n    _GLFW_PLATFORM_MONITOR_STATE;\n};\n\n// Cursor structure\n//\nstruct _GLFWcursor\n{\n    _GLFWcursor*    next;\n\n    // This is defined in the window API's platform.h\n    _GLFW_PLATFORM_CURSOR_STATE;\n};\n\n// Gamepad mapping element structure\n//\nstruct _GLFWmapelement\n{\n    uint8_t         type;\n    uint8_t         index;\n    int8_t          axisScale;\n    int8_t          axisOffset;\n};\n\n// Gamepad mapping structure\n//\nstruct _GLFWmapping\n{\n    char            name[128];\n    char            guid[33];\n    _GLFWmapelement buttons[15];\n    _GLFWmapelement axes[6];\n};\n\n// Joystick structure\n//\nstruct _GLFWjoystick\n{\n    GLFWbool        present;\n    float*          axes;\n    int             axisCount;\n    unsigned char*  buttons;\n    int             buttonCount;\n    unsigned char*  hats;\n    int             hatCount;\n    char*           name;\n    void*           userPointer;\n    char            guid[33];\n    _GLFWmapping*   mapping;\n\n    // This is defined in the joystick API's joystick.h\n    _GLFW_PLATFORM_JOYSTICK_STATE;\n};\n\n// Thread local storage structure\n//\nstruct _GLFWtls\n{\n    // This is defined in the platform's thread.h\n    _GLFW_PLATFORM_TLS_STATE;\n};\n\n// Mutex structure\n//\nstruct _GLFWmutex\n{\n    // This is defined in the platform's thread.h\n    _GLFW_PLATFORM_MUTEX_STATE;\n};\n\n// Library global data\n//\nstruct _GLFWlibrary\n{\n    GLFWbool            initialized;\n\n    struct {\n        _GLFWinitconfig init;\n        _GLFWfbconfig   framebuffer;\n        _GLFWwndconfig  window;\n        _GLFWctxconfig  context;\n        int             refreshRate;\n    } hints;\n\n    _GLFWerror*         errorListHead;\n    _GLFWcursor*        cursorListHead;\n    _GLFWwindow*        windowListHead;\n\n    _GLFWmonitor**      monitors;\n    int                 monitorCount;\n\n    _GLFWjoystick       joysticks[GLFW_JOYSTICK_LAST + 1];\n    _GLFWmapping*       mappings;\n    int                 mappingCount;\n\n    _GLFWtls            errorSlot;\n    _GLFWtls            contextSlot;\n    _GLFWmutex          errorLock;\n\n    struct {\n        uint64_t        offset;\n        // This is defined in the platform's time.h\n        _GLFW_PLATFORM_LIBRARY_TIMER_STATE;\n    } timer;\n\n    struct {\n        GLFWbool        available;\n        void*           handle;\n        char*           extensions[2];\n#if !defined(_GLFW_VULKAN_STATIC)\n        PFN_vkEnumerateInstanceExtensionProperties EnumerateInstanceExtensionProperties;\n        PFN_vkGetInstanceProcAddr GetInstanceProcAddr;\n#endif\n        GLFWbool        KHR_surface;\n#if defined(_GLFW_WIN32)\n        GLFWbool        KHR_win32_surface;\n#elif defined(_GLFW_COCOA)\n        GLFWbool        MVK_macos_surface;\n        GLFWbool        EXT_metal_surface;\n#elif defined(_GLFW_X11)\n        GLFWbool        KHR_xlib_surface;\n        GLFWbool        KHR_xcb_surface;\n#elif defined(_GLFW_WAYLAND)\n        GLFWbool        KHR_wayland_surface;\n#endif\n    } vk;\n\n    struct {\n        GLFWmonitorfun  monitor;\n        GLFWjoystickfun joystick;\n    } callbacks;\n\n    // This is defined in the window API's platform.h\n    _GLFW_PLATFORM_LIBRARY_WINDOW_STATE;\n    // This is defined in the context API's context.h\n    _GLFW_PLATFORM_LIBRARY_CONTEXT_STATE;\n    // This is defined in the platform's joystick.h\n    _GLFW_PLATFORM_LIBRARY_JOYSTICK_STATE;\n    // This is defined in egl_context.h\n    _GLFW_EGL_LIBRARY_CONTEXT_STATE;\n    // This is defined in osmesa_context.h\n    _GLFW_OSMESA_LIBRARY_CONTEXT_STATE;\n};\n\n// Global state shared between compilation units of GLFW\n//\nextern _GLFWlibrary _glfw;\n\n\n//////////////////////////////////////////////////////////////////////////\n//////                       GLFW platform API                      //////\n//////////////////////////////////////////////////////////////////////////\n\nint _glfwPlatformInit(void);\nvoid _glfwPlatformTerminate(void);\nconst char* _glfwPlatformGetVersionString(void);\n\nvoid _glfwPlatformGetCursorPos(_GLFWwindow* window, double* xpos, double* ypos);\nvoid _glfwPlatformSetCursorPos(_GLFWwindow* window, double xpos, double ypos);\nvoid _glfwPlatformSetCursorMode(_GLFWwindow* window, int mode);\nvoid _glfwPlatformSetRawMouseMotion(_GLFWwindow *window, GLFWbool enabled);\nGLFWbool _glfwPlatformRawMouseMotionSupported(void);\nint _glfwPlatformCreateCursor(_GLFWcursor* cursor,\n                              const GLFWimage* image, int xhot, int yhot);\nint _glfwPlatformCreateStandardCursor(_GLFWcursor* cursor, int shape);\nvoid _glfwPlatformDestroyCursor(_GLFWcursor* cursor);\nvoid _glfwPlatformSetCursor(_GLFWwindow* window, _GLFWcursor* cursor);\n\nconst char* _glfwPlatformGetScancodeName(int scancode);\nint _glfwPlatformGetKeyScancode(int key);\n\nvoid _glfwPlatformFreeMonitor(_GLFWmonitor* monitor);\nvoid _glfwPlatformGetMonitorPos(_GLFWmonitor* monitor, int* xpos, int* ypos);\nvoid _glfwPlatformGetMonitorContentScale(_GLFWmonitor* monitor,\n                                         float* xscale, float* yscale);\nvoid _glfwPlatformGetMonitorWorkarea(_GLFWmonitor* monitor, int* xpos, int* ypos, int *width, int *height);\nGLFWvidmode* _glfwPlatformGetVideoModes(_GLFWmonitor* monitor, int* count);\nvoid _glfwPlatformGetVideoMode(_GLFWmonitor* monitor, GLFWvidmode* mode);\nGLFWbool _glfwPlatformGetGammaRamp(_GLFWmonitor* monitor, GLFWgammaramp* ramp);\nvoid _glfwPlatformSetGammaRamp(_GLFWmonitor* monitor, const GLFWgammaramp* ramp);\n\nvoid _glfwPlatformSetClipboardString(const char* string);\nconst char* _glfwPlatformGetClipboardString(void);\n\nint _glfwPlatformPollJoystick(_GLFWjoystick* js, int mode);\nvoid _glfwPlatformUpdateGamepadGUID(char* guid);\n\nuint64_t _glfwPlatformGetTimerValue(void);\nuint64_t _glfwPlatformGetTimerFrequency(void);\n\nint _glfwPlatformCreateWindow(_GLFWwindow* window,\n                              const _GLFWwndconfig* wndconfig,\n                              const _GLFWctxconfig* ctxconfig,\n                              const _GLFWfbconfig* fbconfig);\nvoid _glfwPlatformDestroyWindow(_GLFWwindow* window);\nvoid _glfwPlatformSetWindowTitle(_GLFWwindow* window, const char* title);\nvoid _glfwPlatformSetWindowIcon(_GLFWwindow* window,\n                                int count, const GLFWimage* images);\nvoid _glfwPlatformGetWindowPos(_GLFWwindow* window, int* xpos, int* ypos);\nvoid _glfwPlatformSetWindowPos(_GLFWwindow* window, int xpos, int ypos);\nvoid _glfwPlatformGetWindowSize(_GLFWwindow* window, int* width, int* height);\nvoid _glfwPlatformSetWindowSize(_GLFWwindow* window, int width, int height);\nvoid _glfwPlatformSetWindowSizeLimits(_GLFWwindow* window,\n                                      int minwidth, int minheight,\n                                      int maxwidth, int maxheight);\nvoid _glfwPlatformSetWindowAspectRatio(_GLFWwindow* window, int numer, int denom);\nvoid _glfwPlatformGetFramebufferSize(_GLFWwindow* window, int* width, int* height);\nvoid _glfwPlatformGetWindowFrameSize(_GLFWwindow* window,\n                                     int* left, int* top,\n                                     int* right, int* bottom);\nvoid _glfwPlatformGetWindowContentScale(_GLFWwindow* window,\n                                        float* xscale, float* yscale);\nvoid _glfwPlatformIconifyWindow(_GLFWwindow* window);\nvoid _glfwPlatformRestoreWindow(_GLFWwindow* window);\nvoid _glfwPlatformMaximizeWindow(_GLFWwindow* window);\nvoid _glfwPlatformShowWindow(_GLFWwindow* window);\nvoid _glfwPlatformHideWindow(_GLFWwindow* window);\nvoid _glfwPlatformRequestWindowAttention(_GLFWwindow* window);\nvoid _glfwPlatformFocusWindow(_GLFWwindow* window);\nvoid _glfwPlatformSetWindowMonitor(_GLFWwindow* window, _GLFWmonitor* monitor,\n                                   int xpos, int ypos, int width, int height,\n                                   int refreshRate);\nint _glfwPlatformWindowFocused(_GLFWwindow* window);\nint _glfwPlatformWindowIconified(_GLFWwindow* window);\nint _glfwPlatformWindowVisible(_GLFWwindow* window);\nint _glfwPlatformWindowMaximized(_GLFWwindow* window);\nint _glfwPlatformWindowHovered(_GLFWwindow* window);\nint _glfwPlatformFramebufferTransparent(_GLFWwindow* window);\nfloat _glfwPlatformGetWindowOpacity(_GLFWwindow* window);\nvoid _glfwPlatformSetWindowResizable(_GLFWwindow* window, GLFWbool enabled);\nvoid _glfwPlatformSetWindowDecorated(_GLFWwindow* window, GLFWbool enabled);\nvoid _glfwPlatformSetWindowFloating(_GLFWwindow* window, GLFWbool enabled);\nvoid _glfwPlatformSetWindowOpacity(_GLFWwindow* window, float opacity);\n\nvoid _glfwPlatformPollEvents(void);\nvoid _glfwPlatformWaitEvents(void);\nvoid _glfwPlatformWaitEventsTimeout(double timeout);\nvoid _glfwPlatformPostEmptyEvent(void);\n\nvoid _glfwPlatformGetRequiredInstanceExtensions(char** extensions);\nint _glfwPlatformGetPhysicalDevicePresentationSupport(VkInstance instance,\n                                                      VkPhysicalDevice device,\n                                                      uint32_t queuefamily);\nVkResult _glfwPlatformCreateWindowSurface(VkInstance instance,\n                                          _GLFWwindow* window,\n                                          const VkAllocationCallbacks* allocator,\n                                          VkSurfaceKHR* surface);\n\nGLFWbool _glfwPlatformCreateTls(_GLFWtls* tls);\nvoid _glfwPlatformDestroyTls(_GLFWtls* tls);\nvoid* _glfwPlatformGetTls(_GLFWtls* tls);\nvoid _glfwPlatformSetTls(_GLFWtls* tls, void* value);\n\nGLFWbool _glfwPlatformCreateMutex(_GLFWmutex* mutex);\nvoid _glfwPlatformDestroyMutex(_GLFWmutex* mutex);\nvoid _glfwPlatformLockMutex(_GLFWmutex* mutex);\nvoid _glfwPlatformUnlockMutex(_GLFWmutex* mutex);\n\n\n//////////////////////////////////////////////////////////////////////////\n//////                         GLFW event API                       //////\n//////////////////////////////////////////////////////////////////////////\n\nvoid _glfwInputWindowFocus(_GLFWwindow* window, GLFWbool focused);\nvoid _glfwInputWindowPos(_GLFWwindow* window, int xpos, int ypos);\nvoid _glfwInputWindowSize(_GLFWwindow* window, int width, int height);\nvoid _glfwInputFramebufferSize(_GLFWwindow* window, int width, int height);\nvoid _glfwInputWindowContentScale(_GLFWwindow* window,\n                                  float xscale, float yscale);\nvoid _glfwInputWindowIconify(_GLFWwindow* window, GLFWbool iconified);\nvoid _glfwInputWindowMaximize(_GLFWwindow* window, GLFWbool maximized);\nvoid _glfwInputWindowDamage(_GLFWwindow* window);\nvoid _glfwInputWindowCloseRequest(_GLFWwindow* window);\nvoid _glfwInputWindowMonitor(_GLFWwindow* window, _GLFWmonitor* monitor);\n\nvoid _glfwInputKey(_GLFWwindow* window,\n                   int key, int scancode, int action, int mods);\nvoid _glfwInputChar(_GLFWwindow* window,\n                    unsigned int codepoint, int mods, GLFWbool plain);\nvoid _glfwInputScroll(_GLFWwindow* window, double xoffset, double yoffset);\nvoid _glfwInputMouseClick(_GLFWwindow* window, int button, int action, int mods);\nvoid _glfwInputCursorPos(_GLFWwindow* window, double xpos, double ypos);\nvoid _glfwInputCursorEnter(_GLFWwindow* window, GLFWbool entered);\nvoid _glfwInputDrop(_GLFWwindow* window, int count, const char** names);\nvoid _glfwInputJoystick(_GLFWjoystick* js, int event);\nvoid _glfwInputJoystickAxis(_GLFWjoystick* js, int axis, float value);\nvoid _glfwInputJoystickButton(_GLFWjoystick* js, int button, char value);\nvoid _glfwInputJoystickHat(_GLFWjoystick* js, int hat, char value);\n\nvoid _glfwInputMonitor(_GLFWmonitor* monitor, int action, int placement);\nvoid _glfwInputMonitorWindow(_GLFWmonitor* monitor, _GLFWwindow* window);\n\n#if defined(__GNUC__)\nvoid _glfwInputError(int code, const char* format, ...)\n    __attribute__((format(printf, 2, 3)));\n#else\nvoid _glfwInputError(int code, const char* format, ...);\n#endif\n\n\n//////////////////////////////////////////////////////////////////////////\n//////                       GLFW internal API                      //////\n//////////////////////////////////////////////////////////////////////////\n\nGLFWbool _glfwStringInExtensionString(const char* string, const char* extensions);\nconst _GLFWfbconfig* _glfwChooseFBConfig(const _GLFWfbconfig* desired,\n                                         const _GLFWfbconfig* alternatives,\n                                         unsigned int count);\nGLFWbool _glfwRefreshContextAttribs(_GLFWwindow* window,\n                                    const _GLFWctxconfig* ctxconfig);\nGLFWbool _glfwIsValidContextConfig(const _GLFWctxconfig* ctxconfig);\n\nconst GLFWvidmode* _glfwChooseVideoMode(_GLFWmonitor* monitor,\n                                        const GLFWvidmode* desired);\nint _glfwCompareVideoModes(const GLFWvidmode* first, const GLFWvidmode* second);\n_GLFWmonitor* _glfwAllocMonitor(const char* name, int widthMM, int heightMM);\nvoid _glfwFreeMonitor(_GLFWmonitor* monitor);\nvoid _glfwAllocGammaArrays(GLFWgammaramp* ramp, unsigned int size);\nvoid _glfwFreeGammaArrays(GLFWgammaramp* ramp);\nvoid _glfwSplitBPP(int bpp, int* red, int* green, int* blue);\n\n_GLFWjoystick* _glfwAllocJoystick(const char* name,\n                                  const char* guid,\n                                  int axisCount,\n                                  int buttonCount,\n                                  int hatCount);\nvoid _glfwFreeJoystick(_GLFWjoystick* js);\nvoid _glfwCenterCursorInContentArea(_GLFWwindow* window);\n\nGLFWbool _glfwInitVulkan(int mode);\nvoid _glfwTerminateVulkan(void);\nconst char* _glfwGetVulkanResultString(VkResult result);\n\nchar* _glfw_strdup(const char* source);\nfloat _glfw_fminf(float a, float b);\nfloat _glfw_fmaxf(float a, float b);\n\n"
  },
  {
    "path": "thirdparty/glfw/src/linux_joystick.c",
    "content": "//========================================================================\n// GLFW 3.3 Linux - www.glfw.org\n//------------------------------------------------------------------------\n// Copyright (c) 2002-2006 Marcus Geelnard\n// Copyright (c) 2006-2017 Camilla Löwy <elmindreda@glfw.org>\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//    claim that you wrote the original software. If you use this software\n//    in a product, an acknowledgment in the product documentation would\n//    be appreciated but is not required.\n//\n// 2. Altered source versions must be plainly marked as such, and must not\n//    be misrepresented as being the original software.\n//\n// 3. This notice may not be removed or altered from any source\n//    distribution.\n//\n//========================================================================\n// It is fine to use C99 in this file because it will not be built with VS\n//========================================================================\n\n#include \"internal.h\"\n\n#include <sys/types.h>\n#include <sys/stat.h>\n#include <sys/inotify.h>\n#include <fcntl.h>\n#include <errno.h>\n#include <dirent.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <unistd.h>\n\n#ifndef SYN_DROPPED // < v2.6.39 kernel headers\n// Workaround for CentOS-6, which is supported till 2020-11-30, but still on v2.6.32\n#define SYN_DROPPED 3\n#endif\n\n// Apply an EV_KEY event to the specified joystick\n//\nstatic void handleKeyEvent(_GLFWjoystick* js, int code, int value)\n{\n    _glfwInputJoystickButton(js,\n                             js->linjs.keyMap[code - BTN_MISC],\n                             value ? GLFW_PRESS : GLFW_RELEASE);\n}\n\n// Apply an EV_ABS event to the specified joystick\n//\nstatic void handleAbsEvent(_GLFWjoystick* js, int code, int value)\n{\n    const int index = js->linjs.absMap[code];\n\n    if (code >= ABS_HAT0X && code <= ABS_HAT3Y)\n    {\n        static const char stateMap[3][3] =\n        {\n            { GLFW_HAT_CENTERED, GLFW_HAT_UP,       GLFW_HAT_DOWN },\n            { GLFW_HAT_LEFT,     GLFW_HAT_LEFT_UP,  GLFW_HAT_LEFT_DOWN },\n            { GLFW_HAT_RIGHT,    GLFW_HAT_RIGHT_UP, GLFW_HAT_RIGHT_DOWN },\n        };\n\n        const int hat = (code - ABS_HAT0X) / 2;\n        const int axis = (code - ABS_HAT0X) % 2;\n        int* state = js->linjs.hats[hat];\n\n        // NOTE: Looking at several input drivers, it seems all hat events use\n        //       -1 for left / up, 0 for centered and 1 for right / down\n        if (value == 0)\n            state[axis] = 0;\n        else if (value < 0)\n            state[axis] = 1;\n        else if (value > 0)\n            state[axis] = 2;\n\n        _glfwInputJoystickHat(js, index, stateMap[state[0]][state[1]]);\n    }\n    else\n    {\n        const struct input_absinfo* info = &js->linjs.absInfo[code];\n        float normalized = value;\n\n        const int range = info->maximum - info->minimum;\n        if (range)\n        {\n            // Normalize to 0.0 -> 1.0\n            normalized = (normalized - info->minimum) / range;\n            // Normalize to -1.0 -> 1.0\n            normalized = normalized * 2.0f - 1.0f;\n        }\n\n        _glfwInputJoystickAxis(js, index, normalized);\n    }\n}\n\n// Poll state of absolute axes\n//\nstatic void pollAbsState(_GLFWjoystick* js)\n{\n    for (int code = 0;  code < ABS_CNT;  code++)\n    {\n        if (js->linjs.absMap[code] < 0)\n            continue;\n\n        struct input_absinfo* info = &js->linjs.absInfo[code];\n\n        if (ioctl(js->linjs.fd, EVIOCGABS(code), info) < 0)\n            continue;\n\n        handleAbsEvent(js, code, info->value);\n    }\n}\n\n#define isBitSet(bit, arr) (arr[(bit) / 8] & (1 << ((bit) % 8)))\n\n// Attempt to open the specified joystick device\n//\nstatic GLFWbool openJoystickDevice(const char* path)\n{\n    for (int jid = 0;  jid <= GLFW_JOYSTICK_LAST;  jid++)\n    {\n        if (!_glfw.joysticks[jid].present)\n            continue;\n        if (strcmp(_glfw.joysticks[jid].linjs.path, path) == 0)\n            return GLFW_FALSE;\n    }\n\n    _GLFWjoystickLinux linjs = {0};\n    linjs.fd = open(path, O_RDONLY | O_NONBLOCK);\n    if (linjs.fd == -1)\n        return GLFW_FALSE;\n\n    char evBits[(EV_CNT + 7) / 8] = {0};\n    char keyBits[(KEY_CNT + 7) / 8] = {0};\n    char absBits[(ABS_CNT + 7) / 8] = {0};\n    struct input_id id;\n\n    if (ioctl(linjs.fd, EVIOCGBIT(0, sizeof(evBits)), evBits) < 0 ||\n        ioctl(linjs.fd, EVIOCGBIT(EV_KEY, sizeof(keyBits)), keyBits) < 0 ||\n        ioctl(linjs.fd, EVIOCGBIT(EV_ABS, sizeof(absBits)), absBits) < 0 ||\n        ioctl(linjs.fd, EVIOCGID, &id) < 0)\n    {\n        _glfwInputError(GLFW_PLATFORM_ERROR,\n                        \"Linux: Failed to query input device: %s\",\n                        strerror(errno));\n        close(linjs.fd);\n        return GLFW_FALSE;\n    }\n\n    // Ensure this device supports the events expected of a joystick\n    if (!isBitSet(EV_KEY, evBits) || !isBitSet(EV_ABS, evBits))\n    {\n        close(linjs.fd);\n        return GLFW_FALSE;\n    }\n\n    char name[256] = \"\";\n\n    if (ioctl(linjs.fd, EVIOCGNAME(sizeof(name)), name) < 0)\n        strncpy(name, \"Unknown\", sizeof(name));\n\n    char guid[33] = \"\";\n\n    // Generate a joystick GUID that matches the SDL 2.0.5+ one\n    if (id.vendor && id.product && id.version)\n    {\n        sprintf(guid, \"%02x%02x0000%02x%02x0000%02x%02x0000%02x%02x0000\",\n                id.bustype & 0xff, id.bustype >> 8,\n                id.vendor & 0xff,  id.vendor >> 8,\n                id.product & 0xff, id.product >> 8,\n                id.version & 0xff, id.version >> 8);\n    }\n    else\n    {\n        sprintf(guid, \"%02x%02x0000%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x00\",\n                id.bustype & 0xff, id.bustype >> 8,\n                name[0], name[1], name[2], name[3],\n                name[4], name[5], name[6], name[7],\n                name[8], name[9], name[10]);\n    }\n\n    int axisCount = 0, buttonCount = 0, hatCount = 0;\n\n    for (int code = BTN_MISC;  code < KEY_CNT;  code++)\n    {\n        if (!isBitSet(code, keyBits))\n            continue;\n\n        linjs.keyMap[code - BTN_MISC] = buttonCount;\n        buttonCount++;\n    }\n\n    for (int code = 0;  code < ABS_CNT;  code++)\n    {\n        linjs.absMap[code] = -1;\n        if (!isBitSet(code, absBits))\n            continue;\n\n        if (code >= ABS_HAT0X && code <= ABS_HAT3Y)\n        {\n            linjs.absMap[code] = hatCount;\n            hatCount++;\n            // Skip the Y axis\n            code++;\n        }\n        else\n        {\n            if (ioctl(linjs.fd, EVIOCGABS(code), &linjs.absInfo[code]) < 0)\n                continue;\n\n            linjs.absMap[code] = axisCount;\n            axisCount++;\n        }\n    }\n\n    _GLFWjoystick* js =\n        _glfwAllocJoystick(name, guid, axisCount, buttonCount, hatCount);\n    if (!js)\n    {\n        close(linjs.fd);\n        return GLFW_FALSE;\n    }\n\n    strncpy(linjs.path, path, sizeof(linjs.path) - 1);\n    memcpy(&js->linjs, &linjs, sizeof(linjs));\n\n    pollAbsState(js);\n\n    _glfwInputJoystick(js, GLFW_CONNECTED);\n    return GLFW_TRUE;\n}\n\n#undef isBitSet\n\n// Frees all resources associated with the specified joystick\n//\nstatic void closeJoystick(_GLFWjoystick* js)\n{\n    close(js->linjs.fd);\n    _glfwFreeJoystick(js);\n    _glfwInputJoystick(js, GLFW_DISCONNECTED);\n}\n\n// Lexically compare joysticks by name; used by qsort\n//\nstatic int compareJoysticks(const void* fp, const void* sp)\n{\n    const _GLFWjoystick* fj = fp;\n    const _GLFWjoystick* sj = sp;\n    return strcmp(fj->linjs.path, sj->linjs.path);\n}\n\n\n//////////////////////////////////////////////////////////////////////////\n//////                       GLFW internal API                      //////\n//////////////////////////////////////////////////////////////////////////\n\n// Initialize joystick interface\n//\nGLFWbool _glfwInitJoysticksLinux(void)\n{\n    const char* dirname = \"/dev/input\";\n\n    _glfw.linjs.inotify = inotify_init1(IN_NONBLOCK | IN_CLOEXEC);\n    if (_glfw.linjs.inotify > 0)\n    {\n        // HACK: Register for IN_ATTRIB to get notified when udev is done\n        //       This works well in practice but the true way is libudev\n\n        _glfw.linjs.watch = inotify_add_watch(_glfw.linjs.inotify,\n                                              dirname,\n                                              IN_CREATE | IN_ATTRIB | IN_DELETE);\n    }\n\n    // Continue without device connection notifications if inotify fails\n\n    if (regcomp(&_glfw.linjs.regex, \"^event[0-9]\\\\+$\", 0) != 0)\n    {\n        _glfwInputError(GLFW_PLATFORM_ERROR, \"Linux: Failed to compile regex\");\n        return GLFW_FALSE;\n    }\n\n    int count = 0;\n\n    DIR* dir = opendir(dirname);\n    if (dir)\n    {\n        struct dirent* entry;\n\n        while ((entry = readdir(dir)))\n        {\n            regmatch_t match;\n\n            if (regexec(&_glfw.linjs.regex, entry->d_name, 1, &match, 0) != 0)\n                continue;\n\n            char path[PATH_MAX];\n\n            snprintf(path, sizeof(path), \"%s/%s\", dirname, entry->d_name);\n\n            if (openJoystickDevice(path))\n                count++;\n        }\n\n        closedir(dir);\n    }\n\n    // Continue with no joysticks if enumeration fails\n\n    qsort(_glfw.joysticks, count, sizeof(_GLFWjoystick), compareJoysticks);\n    return GLFW_TRUE;\n}\n\n// Close all opened joystick handles\n//\nvoid _glfwTerminateJoysticksLinux(void)\n{\n    int jid;\n\n    for (jid = 0;  jid <= GLFW_JOYSTICK_LAST;  jid++)\n    {\n        _GLFWjoystick* js = _glfw.joysticks + jid;\n        if (js->present)\n            closeJoystick(js);\n    }\n\n    regfree(&_glfw.linjs.regex);\n\n    if (_glfw.linjs.inotify > 0)\n    {\n        if (_glfw.linjs.watch > 0)\n            inotify_rm_watch(_glfw.linjs.inotify, _glfw.linjs.watch);\n\n        close(_glfw.linjs.inotify);\n    }\n}\n\nvoid _glfwDetectJoystickConnectionLinux(void)\n{\n    if (_glfw.linjs.inotify <= 0)\n        return;\n\n    ssize_t offset = 0;\n    char buffer[16384];\n    const ssize_t size = read(_glfw.linjs.inotify, buffer, sizeof(buffer));\n\n    while (size > offset)\n    {\n        regmatch_t match;\n        const struct inotify_event* e = (struct inotify_event*) (buffer + offset);\n\n        offset += sizeof(struct inotify_event) + e->len;\n\n        if (regexec(&_glfw.linjs.regex, e->name, 1, &match, 0) != 0)\n            continue;\n\n        char path[PATH_MAX];\n        snprintf(path, sizeof(path), \"/dev/input/%s\", e->name);\n\n        if (e->mask & (IN_CREATE | IN_ATTRIB))\n            openJoystickDevice(path);\n        else if (e->mask & IN_DELETE)\n        {\n            for (int jid = 0;  jid <= GLFW_JOYSTICK_LAST;  jid++)\n            {\n                if (strcmp(_glfw.joysticks[jid].linjs.path, path) == 0)\n                {\n                    closeJoystick(_glfw.joysticks + jid);\n                    break;\n                }\n            }\n        }\n    }\n}\n\n\n//////////////////////////////////////////////////////////////////////////\n//////                       GLFW platform API                      //////\n//////////////////////////////////////////////////////////////////////////\n\nint _glfwPlatformPollJoystick(_GLFWjoystick* js, int mode)\n{\n    // Read all queued events (non-blocking)\n    for (;;)\n    {\n        struct input_event e;\n\n        errno = 0;\n        if (read(js->linjs.fd, &e, sizeof(e)) < 0)\n        {\n            // Reset the joystick slot if the device was disconnected\n            if (errno == ENODEV)\n                closeJoystick(js);\n\n            break;\n        }\n\n        if (e.type == EV_SYN)\n        {\n            if (e.code == SYN_DROPPED)\n                _glfw.linjs.dropped = GLFW_TRUE;\n            else if (e.code == SYN_REPORT)\n            {\n                _glfw.linjs.dropped = GLFW_FALSE;\n                pollAbsState(js);\n            }\n        }\n\n        if (_glfw.linjs.dropped)\n            continue;\n\n        if (e.type == EV_KEY)\n            handleKeyEvent(js, e.code, e.value);\n        else if (e.type == EV_ABS)\n            handleAbsEvent(js, e.code, e.value);\n    }\n\n    return js->present;\n}\n\nvoid _glfwPlatformUpdateGamepadGUID(char* guid)\n{\n}\n\n"
  },
  {
    "path": "thirdparty/glfw/src/linux_joystick.h",
    "content": "//========================================================================\n// GLFW 3.3 Linux - www.glfw.org\n//------------------------------------------------------------------------\n// Copyright (c) 2014 Jonas Ådahl <jadahl@gmail.com>\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//    claim that you wrote the original software. If you use this software\n//    in a product, an acknowledgment in the product documentation would\n//    be appreciated but is not required.\n//\n// 2. Altered source versions must be plainly marked as such, and must not\n//    be misrepresented as being the original software.\n//\n// 3. This notice may not be removed or altered from any source\n//    distribution.\n//\n//========================================================================\n\n#include <linux/input.h>\n#include <linux/limits.h>\n#include <regex.h>\n\n#define _GLFW_PLATFORM_JOYSTICK_STATE         _GLFWjoystickLinux linjs\n#define _GLFW_PLATFORM_LIBRARY_JOYSTICK_STATE _GLFWlibraryLinux  linjs\n\n#define _GLFW_PLATFORM_MAPPING_NAME \"Linux\"\n\n// Linux-specific joystick data\n//\ntypedef struct _GLFWjoystickLinux\n{\n    int                     fd;\n    char                    path[PATH_MAX];\n    int                     keyMap[KEY_CNT - BTN_MISC];\n    int                     absMap[ABS_CNT];\n    struct input_absinfo    absInfo[ABS_CNT];\n    int                     hats[4][2];\n} _GLFWjoystickLinux;\n\n// Linux-specific joystick API data\n//\ntypedef struct _GLFWlibraryLinux\n{\n    int                     inotify;\n    int                     watch;\n    regex_t                 regex;\n    GLFWbool                dropped;\n} _GLFWlibraryLinux;\n\n\nGLFWbool _glfwInitJoysticksLinux(void);\nvoid _glfwTerminateJoysticksLinux(void);\nvoid _glfwDetectJoystickConnectionLinux(void);\n\n"
  },
  {
    "path": "thirdparty/glfw/src/mappings.h",
    "content": "//========================================================================\n// GLFW 3.3 - www.glfw.org\n//------------------------------------------------------------------------\n// Copyright (c) 2006-2018 Camilla Löwy <elmindreda@glfw.org>\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//    claim that you wrote the original software. If you use this software\n//    in a product, an acknowledgment in the product documentation would\n//    be appreciated but is not required.\n//\n// 2. Altered source versions must be plainly marked as such, and must not\n//    be misrepresented as being the original software.\n//\n// 3. This notice may not be removed or altered from any source\n//    distribution.\n//\n//========================================================================\n// As mappings.h.in, this file is used by CMake to produce the mappings.h\n// header file.  If you are adding a GLFW specific gamepad mapping, this is\n// where to put it.\n//========================================================================\n// As mappings.h, this provides all pre-defined gamepad mappings, including\n// all available in SDL_GameControllerDB.  Do not edit this file.  Any gamepad\n// mappings not specific to GLFW should be submitted to SDL_GameControllerDB.\n// This file can be re-generated from mappings.h.in and the upstream\n// gamecontrollerdb.txt with the GenerateMappings.cmake script.\n//========================================================================\n\n// All gamepad mappings not labeled GLFW are copied from the\n// SDL_GameControllerDB project under the following license:\n//\n// Simple DirectMedia Layer\n// Copyright (C) 1997-2013 Sam Lantinga <slouken@libsdl.org>\n//\n// This software is provided 'as-is', without any express or implied warranty.\n// In no event will the authors be held liable for any damages arising from the\n// use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//    claim that you wrote the original software. If you use this software\n//    in a product, an acknowledgment in the product documentation would\n//    be appreciated but is not required.\n//\n// 2. Altered source versions must be plainly marked as such, and must not be\n//    misrepresented as being the original software.\n//\n// 3. This notice may not be removed or altered from any source distribution.\n\nconst char* _glfwDefaultMappings[] =\n{\n\"03000000fa2d00000100000000000000,3DRUDDER,leftx:a0,lefty:a1,rightx:a5,righty:a2,platform:Windows,\",\n\"03000000022000000090000000000000,8Bitdo NES30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b4,y:b3,platform:Windows,\",\n\"03000000203800000900000000000000,8Bitdo NES30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b4,y:b3,platform:Windows,\",\n\"03000000102800000900000000000000,8Bitdo SFC30 GamePad,a:b1,b:b0,back:b10,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b11,x:b4,y:b3,platform:Windows,\",\n\"03000000a00500003232000000000000,8Bitdo Zero GamePad,a:b0,b:b1,back:b10,dpdown:+a2,dpleft:-a0,dpright:+a0,dpup:-a2,leftshoulder:b6,rightshoulder:b7,start:b11,x:b3,y:b4,platform:Windows,\",\n\"030000008f0e00001200000000000000,Acme,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a3,righty:a2,start:b9,x:b2,y:b3,platform:Windows,\",\n\"03000000341a00003608000000000000,Afterglow PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,\",\n\"03000000c01100001352000000000000,Battalife Joystick,a:b6,b:b7,back:b2,leftshoulder:b0,leftx:a0,lefty:a1,rightshoulder:b1,start:b3,x:b4,y:b5,platform:Windows,\",\n\"030000006b1400000055000000000000,bigben ps3padstreetnew,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Windows,\",\n\"0300000066f700000500000000000000,BrutalLegendTest,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a3,righty:a2,start:b9,x:b0,y:b3,platform:Windows,\",\n\"03000000d81d00000b00000000000000,BUFFALO BSGP1601 Series ,a:b5,b:b3,back:b12,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b8,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b9,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b13,x:b4,y:b2,platform:Windows,\",\n\"03000000e82000006058000000000000,Cideko AK08b,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows,\",\n\"030000005e0400008e02000000000000,Controller (XBOX 360 For Windows),a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a2,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,\",\n\"03000000260900008888000000000000,Cyber Gadget GameCube Controller,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b6,righttrigger:a4,rightx:a2,righty:a3~,start:b7,x:b2,y:b3,platform:Windows,\",\n\"03000000a306000022f6000000000000,Cyborg V.3 Rumble Pad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:+a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:-a3,rightx:a2,righty:a4,start:b9,x:b0,y:b3,platform:Windows,\",\n\"03000000791d00000103000000000000,Dual Box WII,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b6,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b5,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows,\",\n\"030000004f04000023b3000000000000,Dual Trigger 3-in-1,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,\",\n\"03000000341a00000108000000000000,EXEQ RF USB Gamepad 8206,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Windows,\",\n\"030000000d0f00008500000000000000,Fighting Commander 2016 PS3,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,\",\n\"030000000d0f00008400000000000000,Fighting Commander 5,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,\",\n\"030000000d0f00008800000000000000,Fighting Stick mini 4,a:b1,b:b2,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b8,x:b0,y:b3,platform:Windows,\",\n\"030000000d0f00008700000000000000,Fighting Stick mini 4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Windows,\",\n\"030000000d0f00002700000000000000,FIGHTING STICK V3,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Windows,\",\n\"78696e70757403000000000000000000,Fightstick TES,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,lefttrigger:a2,rightshoulder:b5,righttrigger:a5,start:b7,x:b2,y:b3,platform:Windows,\",\n\"03000000260900002625000000000000,Gamecube Controller,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b6,lefttrigger:a4,leftx:a0,lefty:a1,righttrigger:a5,rightx:a2,righty:a3,start:b7,x:b2,y:b3,platform:Windows,\",\n\"030000008f0e00000d31000000000000,GAMEPAD 3 TURBO,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,\",\n\"03000000280400000140000000000000,GamePad Pro USB,a:b1,b:b2,back:b8,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Windows,\",\n\"03000000ffff00000000000000000000,GameStop Gamepad,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Windows,\",\n\"03000000451300000010000000000000,Generic USB Joystick,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Windows,\",\n\"03000000341a00000302000000000000,Hama Scorpad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,\",\n\"030000000d0f00004900000000000000,Hatsune Miku Sho Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,\",\n\"03000000d81400000862000000000000,HitBox Edition Cthulhu+,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b5,lefttrigger:b4,rightshoulder:b7,righttrigger:b6,start:b9,x:b0,y:b3,platform:Windows,\",\n\"030000000d0f00005f00000000000000,Hori Fighting Commander 4 (PS3),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,\",\n\"030000000d0f00005e00000000000000,Hori Fighting Commander 4 (PS4),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,\",\n\"030000000d0f00004000000000000000,Hori Fighting Stick Mini 3,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b5,lefttrigger:b4,rightshoulder:b7,righttrigger:b6,start:b9,x:b0,y:b3,platform:Windows,\",\n\"030000000d0f00006e00000000000000,HORIPAD 4 (PS3),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,\",\n\"030000000d0f00006600000000000000,HORIPAD 4 (PS4),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,\",\n\"030000000d0f0000ee00000000000000,HORIPAD mini4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,\",\n\"030000000d0f00004d00000000000000,HORIPAD3 A,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,\",\n\"03000000250900000017000000000000,HRAP2 on PS/SS/N64 Joypad to USB BOX,a:b2,b:b1,back:b9,leftshoulder:b5,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b6,start:b8,x:b3,y:b0,platform:Windows,\",\n\"030000008f0e00001330000000000000,HuiJia SNES Controller,a:b2,b:b1,back:b8,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,rightshoulder:b7,start:b9,x:b3,y:b0,platform:Windows,\",\n\"03000000d81d00000f00000000000000,iBUFFALO BSGP1204 Series,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows,\",\n\"03000000d81d00001000000000000000,iBUFFALO BSGP1204P Series,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows,\",\n\"03000000830500006020000000000000,iBuffalo SNES Controller,a:b1,b:b0,back:b6,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,rightshoulder:b5,start:b7,x:b3,y:b2,platform:Windows,\",\n\"03000000b50700001403000000000000,IMPACT BLACK,a:b2,b:b3,back:b8,leftshoulder:b4,leftstick:b10,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a3,righty:a2,start:b9,x:b0,y:b1,platform:Windows,\",\n\"030000006f0e00002401000000000000,INJUSTICE FightStick for PS3,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Windows,\",\n\"03000000491900000204000000000000,Ipega PG-9023,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b3,y:b4,platform:Windows,\",\n\"030000006d04000011c2000000000000,Logitech Cordless Wingman,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,leftstick:b5,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b2,righttrigger:b7,rightx:a3,righty:a4,x:b4,platform:Windows,\",\n\"030000006d04000016c2000000000000,Logitech Dual Action,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,\",\n\"030000006d04000018c2000000000000,Logitech F510 Gamepad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,\",\n\"030000006d04000019c2000000000000,Logitech F710 Gamepad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,\",\n\"03000000380700005032000000000000,Mad Catz FightPad PRO (PS3),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,\",\n\"03000000380700005082000000000000,Mad Catz FightPad PRO (PS4),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,\",\n\"03000000380700008433000000000000,Mad Catz FightStick TE S+ PS3,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Windows,\",\n\"03000000380700008483000000000000,Mad Catz FightStick TE S+ PS4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b6,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,\",\n\"03000000380700008134000000000000,Mad Catz FightStick TE2+ PS3,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b7,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b4,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,\",\n\"03000000380700008184000000000000,Mad Catz FightStick TE2+ PS4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b5,leftstick:b10,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b4,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,\",\n\"03000000380700008034000000000000,Mad Catz TE2 PS3 Fightstick,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,\",\n\"03000000380700008084000000000000,Mad Catz TE2 PS4 Fightstick,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,\",\n\"03000000380700008532000000000000,Madcatz Arcade Fightstick TE S PS3,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,\",\n\"03000000380700003888000000000000,Madcatz Arcade Fightstick TE S+ PS3,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,\",\n\"03000000380700001888000000000000,MadCatz SFIV FightStick PS3,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b5,lefttrigger:b7,leftx:a0,lefty:a1,rightshoulder:b4,righttrigger:b6,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Windows,\",\n\"03000000380700008081000000000000,MADCATZ SFV Arcade FightStick Alpha PS4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,\",\n\"030000008305000031b0000000000000,MaxfireBlaze3,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Windows,\",\n\"03000000250900000128000000000000,Mayflash Arcade Stick,a:b1,b:b2,back:b8,leftshoulder:b0,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b3,righttrigger:b7,start:b9,x:b5,y:b6,platform:Windows,\",\n\"03000000790000004418000000000000,Mayflash GameCube Controller,a:b1,b:b2,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:a4,rightx:a5,righty:a2,start:b9,x:b0,y:b3,platform:Windows,\",\n\"03000000790000004318000000000000,Mayflash GameCube Controller Adapter,a:b1,b:b2,back:b0,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b0,leftshoulder:b4,leftstick:b0,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b0,righttrigger:a4,rightx:a5,righty:a2,start:b9,x:b0,y:b3,platform:Windows,\",\n\"030000008f0e00001030000000000000,Mayflash USB Adapter for original Sega Saturn controller,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,lefttrigger:b5,rightshoulder:b2,righttrigger:b7,start:b9,x:b3,y:b4,platform:Windows,\",\n\"0300000025090000e803000000000000,Mayflash Wii Classic Controller,a:b1,b:b0,back:b8,dpdown:b13,dpleft:b12,dpright:b14,dpup:b11,guide:b10,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b2,platform:Windows,\",\n\"03000000790000000018000000000000,Mayflash WiiU Pro Game Controller Adapter (DInput),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,\",\n\"030000001008000001e5000000000000,NEXT SNES Controller,a:b2,b:b1,back:b8,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,rightshoulder:b6,start:b9,x:b3,y:b0,platform:Windows,\",\n\"03000000bd12000015d0000000000000,Nintendo Retrolink USB Super SNES Classic Controller,a:b2,b:b1,back:b8,leftshoulder:b4,leftx:a0,lefty:a1,rightshoulder:b5,start:b9,x:b3,y:b0,platform:Windows,\",\n\"030000007e0500000920000000000000,Nintendo Switch Pro Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Windows,\",\n\"030000004b120000014d000000000000,NYKO AIRFLO,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:a3,leftstick:a0,lefttrigger:b6,leftx:h0.6,lefty:h0.12,rightshoulder:b5,rightstick:a2,righttrigger:b7,rightx:h0.9,righty:h0.4,start:b9,x:b2,y:b3,platform:Windows,\",\n\"03000000362800000100000000000000,OUYA Game Controller,a:b0,b:b3,dpdown:b9,dpleft:b10,dpright:b11,dpup:b8,guide:b14,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:b13,rightx:a3,righty:a4,x:b1,y:b2,platform:Windows,\",\n\"03000000120c0000f60e000000000000,P4 Wired Gamepad,a:b1,b:b2,back:b12,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b5,lefttrigger:b7,rightshoulder:b4,righttrigger:b6,start:b9,x:b0,y:b3,platform:Windows,\",\n\"030000008f0e00000300000000000000,Piranha xtreme,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a3,righty:a2,start:b9,x:b3,y:b0,platform:Windows,\",\n\"03000000d62000006dca000000000000,PowerA Pro Ex,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,\",\n\"030000008f0e00007530000000000000,PS (R) Gamepad,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b1,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,\",\n\"03000000e30500009605000000000000,PS to USB convert cable,a:b2,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a2,righty:a3,start:b8,x:b3,y:b0,platform:Windows,\",\n\"03000000100800000100000000000000,PS1 USB,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a3,righty:a2,start:b9,x:b3,y:b0,platform:Windows,\",\n\"03000000100800000300000000000000,PS2 USB,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a4,righty:a2,start:b9,x:b3,y:b0,platform:Windows,\",\n\"03000000888800000803000000000000,PS3 Controller,a:b2,b:b1,back:b8,dpdown:h0.8,dpleft:h0.4,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b9,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:b7,rightx:a3,righty:a4,start:b11,x:b0,y:b3,platform:Windows,\",\n\"030000004c0500006802000000000000,PS3 Controller,a:b14,b:b13,back:b0,dpdown:b6,dpleft:b7,dpright:b5,dpup:b4,guide:b16,leftshoulder:b10,leftstick:b1,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b11,rightstick:b2,righttrigger:b9,rightx:a2,righty:a3,start:b3,x:b15,y:b12,platform:Windows,\",\n\"03000000250900000500000000000000,PS3 DualShock,a:b2,b:b1,back:b9,dpdown:h0.8,dpleft:h0.4,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a2,righty:a3,start:b8,x:b0,y:b3,platform:Windows,\",\n\"03000000100000008200000000000000,PS360+ v1.66,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,leftx:h0.4,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Windows,\",\n\"030000004c050000a00b000000000000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,\",\n\"030000004c050000c405000000000000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,\",\n\"030000004c050000cc09000000000000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,\",\n\"03000000300f00000011000000000000,QanBa Arcade JoyStick 1008,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,start:b10,x:b0,y:b3,platform:Windows,\",\n\"03000000300f00001611000000000000,QanBa Arcade JoyStick 4018,a:b1,b:b2,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b9,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b8,x:b0,y:b3,platform:Windows,\",\n\"03000000222c00000020000000000000,QANBA DRONE ARCADE JOYSTICK,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:a3,rightshoulder:b5,righttrigger:a4,start:b9,x:b0,y:b3,platform:Windows,\",\n\"03000000300f00001210000000000000,QanBa Joystick Plus,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,rightshoulder:b5,start:b9,x:b2,y:b3,platform:Windows,\",\n\"03000000341a00000104000000000000,QanBa Joystick Q4RAF,a:b5,b:b6,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b0,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b3,righttrigger:b7,start:b9,x:b1,y:b2,platform:Windows,\",\n\"03000000222c00000223000000000000,Qanba Obsidian Arcade Joystick PS3 Mode,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,\",\n\"03000000222c00000023000000000000,Qanba Obsidian Arcade Joystick PS4 Mode,a:b1,b:b2,back:b13,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,\",\n\"03000000321500000003000000000000,Razer Hydra,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a2,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,\",\n\"030000000d0f00001100000000000000,REAL ARCADE PRO.3,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,rightshoulder:b5,rightstick:b11,righttrigger:b7,start:b9,x:b0,y:b3,platform:Windows,\",\n\"030000000d0f00008b00000000000000,Real Arcade Pro.4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,\",\n\"030000000d0f00008a00000000000000,Real Arcade Pro.4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,\",\n\"030000000d0f00006b00000000000000,Real Arcade Pro.4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,\",\n\"030000000d0f00006a00000000000000,Real Arcade Pro.4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,\",\n\"030000000d0f00007000000000000000,REAL ARCADE PRO.4 VLX,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,rightshoulder:b5,rightstick:b11,righttrigger:b7,start:b9,x:b0,y:b3,platform:Windows,\",\n\"030000000d0f00002200000000000000,REAL ARCADE Pro.V3,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,\",\n\"030000000d0f00005c00000000000000,Real Arcade Pro.V4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,\",\n\"030000000d0f00005b00000000000000,Real Arcade Pro.V4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,\",\n\"03000000790000001100000000000000,Retrolink SNES Controller,a:b2,b:b1,back:b8,dpdown:+a4,dpleft:-a3,dpright:+a3,dpup:-a4,leftshoulder:b4,rightshoulder:b5,start:b9,x:b3,y:b0,platform:Windows,\",\n\"0300000000f000000300000000000000,RetroUSB.com RetroPad,a:b1,b:b5,back:b2,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b3,x:b0,y:b4,platform:Windows,\",\n\"0300000000f00000f100000000000000,RetroUSB.com Super RetroPort,a:b1,b:b5,back:b2,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b3,x:b0,y:b4,platform:Windows,\",\n\"030000006b140000010d000000000000,Revolution Pro Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,\",\n\"030000006f0e00001e01000000000000,Rock Candy Gamepad for PS3,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,\",\n\"030000004f04000003d0000000000000,run'n'drive,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b7,leftshoulder:a3,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:a4,rightstick:b11,righttrigger:b5,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,\",\n\"03000000a30600001af5000000000000,Saitek Cyborg,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a3,righty:a4,start:b9,x:b0,y:b3,platform:Windows,\",\n\"03000000a306000023f6000000000000,Saitek Cyborg V.1 Game pad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a4,start:b9,x:b0,y:b3,platform:Windows,\",\n\"03000000300f00001201000000000000,Saitek Dual Analog Pad,a:b2,b:b3,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a3,righty:a2,start:b9,x:b0,y:b1,platform:Windows,\",\n\"03000000a30600000cff000000000000,Saitek P2500 Force Rumble Pad,a:b2,b:b3,back:b11,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b8,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b7,rightx:a2,righty:a3,x:b0,y:b1,platform:Windows,\",\n\"03000000a30600000c04000000000000,Saitek P2900,a:b1,b:b2,back:b12,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a3,righty:a2,start:b9,x:b0,y:b3,platform:Windows,\",\n\"03000000300f00001001000000000000,Saitek P480 Rumble Pad,a:b2,b:b3,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a3,righty:a2,start:b9,x:b0,y:b1,platform:Windows,\",\n\"03000000a30600000b04000000000000,Saitek P990,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a3,righty:a2,start:b9,x:b0,y:b3,platform:Windows,\",\n\"03000000a30600000b04000000010000,Saitek P990 Dual Analog Pad,a:b1,b:b2,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a3,righty:a2,start:b8,x:b0,y:b3,platform:Windows,\",\n\"03000000300f00001101000000000000,saitek rumble pad,a:b2,b:b3,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b10,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a3,righty:a2,start:b9,x:b0,y:b1,platform:Windows,\",\n\"0300000000050000289b000000000000,Saturn_Adapter_2.0,a:b1,b:b2,leftshoulder:b6,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b5,start:b9,x:b0,y:b3,platform:Windows,\",\n\"030000009b2800000500000000000000,Saturn_Adapter_2.0,a:b1,b:b2,leftshoulder:b6,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b5,start:b9,x:b0,y:b3,platform:Windows,\",\n\"03000000341a00000208000000000000,SL-6555-SBK,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:-a4,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a4,rightx:a3,righty:a2,start:b7,x:b2,y:b3,platform:Windows,\",\n\"030000008f0e00000800000000000000,SpeedLink Strike FX Wireless,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows,\",\n\"03000000ff1100003133000000000000,SVEN X-PAD,a:b2,b:b3,back:b4,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b9,rightx:a2,righty:a4,start:b5,x:b0,y:b1,platform:Windows,\",\n\"03000000fa1900000706000000000000,Team 5,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows,\",\n\"03000000b50700001203000000000000,Techmobility X6-38V,a:b2,b:b3,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a3,righty:a2,start:b9,x:b0,y:b1,platform:Windows,\",\n\"030000004f04000015b3000000000000,Thrustmaster Dual Analog 2,a:b0,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b1,y:b3,platform:Windows,\",\n\"030000004f04000000b3000000000000,Thrustmaster Firestorm Dual Power,a:b0,b:b2,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b11,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b12,righttrigger:b7,rightx:a2,righty:a3,start:b10,x:b1,y:b3,platform:Windows,\",\n\"030000004f04000004b3000000000000,Thrustmaster Firestorm Dual Power 3,a:b0,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b1,y:b3,platform:Windows,\",\n\"03000000666600000488000000000000,TigerGame PS/PS2 Game Controller Adapter,a:b2,b:b1,back:b9,dpdown:b14,dpleft:b15,dpright:b13,dpup:b12,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a2,righty:a3,start:b8,x:b3,y:b0,platform:Windows,\",\n\"03000000d90400000200000000000000,TwinShock PS2,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a3,righty:a2,start:b9,x:b3,y:b0,platform:Windows,\",\n\"03000000380700006652000000000000,UnKnown,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a3,righty:a4,start:b9,x:b0,y:b3,platform:Windows,\",\n\"03000000632500002305000000000000,USB Vibration Joystick (BM),a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows,\",\n\"03000000790000001b18000000000000,Venom Arcade Joystick,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Windows,\",\n\"03000000450c00002043000000000000,XEOX Gamepad SL-6556-BK,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Windows,\",\n\"03000000172700004431000000000000,XiaoMi Game Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b20,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a7,rightx:a2,righty:a5,start:b11,x:b3,y:b4,platform:Windows,\",\n\"03000000786901006e70000000000000,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,\",\n\"03000000203800000900000000010000,8Bitdo NES30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Mac OS X,\",\n\"03000000022000000090000001000000,8Bitdo NES30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Mac OS X,\",\n\"03000000102800000900000000000000,8Bitdo SFC30 GamePad Joystick,a:b1,b:b0,back:b10,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b11,x:b4,y:b3,platform:Mac OS X,\",\n\"03000000a00500003232000008010000,8Bitdo Zero GamePad,a:b0,b:b1,back:b10,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,rightshoulder:b7,start:b11,x:b3,y:b4,platform:Mac OS X,\",\n\"030000008305000031b0000000000000,Cideko AK08b,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Mac OS X,\",\n\"03000000260900008888000088020000,Cyber Gadget GameCube Controller,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b6,righttrigger:a5,rightx:a2,righty:a3~,start:b7,x:b2,y:b3,platform:Mac OS X,\",\n\"03000000a306000022f6000001030000,Cyborg V.3 Rumble Pad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:+a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:-a3,rightx:a2,righty:a4,start:b9,x:b0,y:b3,platform:Mac OS X,\",\n\"03000000ad1b000001f9000000000000,Gamestop BB-070 X360 Controller,a:b0,b:b1,back:b9,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b10,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b8,x:b2,y:b3,platform:Mac OS X,\",\n\"0500000047532047616d657061640000,GameStop Gamepad,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Mac OS X,\",\n\"030000000d0f00005f00000000010000,Hori Fighting Commander 4 (PS3),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Mac OS X,\",\n\"030000000d0f00005e00000000010000,Hori Fighting Commander 4 (PS4),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X,\",\n\"030000000d0f00005f00000000000000,HORI Fighting Commander 4 PS3,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Mac OS X,\",\n\"030000000d0f00005e00000000000000,HORI Fighting Commander 4 PS4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Mac OS X,\",\n\"030000000d0f00004d00000000000000,HORI Gem Pad 3,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Mac OS X,\",\n\"030000000d0f00006e00000000010000,HORIPAD 4 (PS3),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Mac OS X,\",\n\"030000000d0f00006600000000010000,HORIPAD 4 (PS4),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X,\",\n\"030000000d0f00006600000000000000,HORIPAD FPS PLUS 4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X,\",\n\"030000008f0e00001330000011010000,HuiJia SNES Controller,a:b4,b:b2,back:b16,dpdown:+a2,dpleft:-a0,dpright:+a0,dpup:-a2,leftshoulder:b12,rightshoulder:b14,start:b18,x:b6,y:b0,platform:Mac OS X,\",\n\"03000000830500006020000000010000,iBuffalo SNES Controller,a:b1,b:b0,back:b6,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,rightshoulder:b5,start:b7,x:b3,y:b2,platform:Mac OS X,\",\n\"03000000830500006020000000000000,iBuffalo USB 2-axis 8-button Gamepad,a:b1,b:b0,back:b6,leftshoulder:b4,leftx:a0,lefty:a1,rightshoulder:b5,start:b7,x:b3,y:b2,platform:Mac OS X,\",\n\"030000006d04000016c2000000020000,Logitech Dual Action,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Mac OS X,\",\n\"030000006d04000016c2000000030000,Logitech Dual Action,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Mac OS X,\",\n\"030000006d04000016c2000014040000,Logitech Dual Action,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Mac OS X,\",\n\"030000006d04000016c2000000000000,Logitech F310 Gamepad (DInput),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Mac OS X,\",\n\"030000006d04000018c2000000000000,Logitech F510 Gamepad (DInput),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Mac OS X,\",\n\"030000006d0400001fc2000000000000,Logitech F710 Gamepad (XInput),a:b0,b:b1,back:b9,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b10,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b8,x:b2,y:b3,platform:Mac OS X,\",\n\"030000006d04000019c2000000000000,Logitech Wireless Gamepad (DInput),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Mac OS X,\",\n\"03000000380700005032000000010000,Mad Catz FightPad PRO (PS3),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Mac OS X,\",\n\"03000000380700005082000000010000,Mad Catz FightPad PRO (PS4),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X,\",\n\"03000000790000004418000000010000,Mayflash GameCube Controller,a:b1,b:b2,dpdown:b14,dpleft:b15,dpright:b13,dpup:b12,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:a4,rightx:a5,righty:a2,start:b9,x:b0,y:b3,platform:Mac OS X,\",\n\"0300000025090000e803000000000000,Mayflash Wii Classic Controller,a:b1,b:b0,back:b8,dpdown:b13,dpleft:b12,dpright:b14,dpup:b11,guide:b10,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b2,platform:Mac OS X,\",\n\"03000000790000000018000000000000,Mayflash WiiU Pro Game Controller Adapter (DInput),a:b4,b:b8,back:b32,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b16,leftstick:b40,lefttrigger:b24,leftx:a0,lefty:a4,rightshoulder:b20,rightstick:b44,righttrigger:b28,rightx:a8,righty:a12,start:b36,x:b0,y:b12,platform:Mac OS X,\",\n\"03000000d8140000cecf000000000000,MC Cthulhu,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Mac OS X,\",\n\"030000001008000001e5000006010000,NEXT SNES Controller,a:b2,b:b1,back:b8,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,rightshoulder:b6,start:b9,x:b3,y:b0,platform:Mac OS X,\",\n\"030000007e0500000920000000000000,Nintendo Switch Pro Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Mac OS X,\",\n\"030000008f0e00000300000000000000,Piranha xtreme,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a3,righty:a2,start:b9,x:b3,y:b0,platform:Mac OS X,\",\n\"030000004c0500006802000000010000,PS3 Controller,a:b14,b:b13,back:b0,dpdown:b6,dpleft:b7,dpright:b5,dpup:b4,guide:b16,leftshoulder:b10,leftstick:b1,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b11,rightstick:b2,righttrigger:b9,rightx:a2,righty:a3,start:b3,x:b15,y:b12,platform:Mac OS X,\",\n\"030000004c0500006802000000000000,PS3 Controller,a:b14,b:b13,back:b0,dpdown:b6,dpleft:b7,dpright:b5,dpup:b4,guide:b16,leftshoulder:b10,leftstick:b1,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b11,rightstick:b2,righttrigger:b9,rightx:a2,righty:a3,start:b3,x:b15,y:b12,platform:Mac OS X,\",\n\"030000004c050000a00b000000010000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X,\",\n\"030000004c050000cc09000000010000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X,\",\n\"030000004c050000c405000000000000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X,\",\n\"030000004c050000c405000000010000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X,\",\n\"030000008916000000fd000000000000,Razer Onza TE,a:b0,b:b1,back:b9,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b10,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b8,x:b2,y:b3,platform:Mac OS X,\",\n\"03000000321500000010000000010000,Razer RAIJU,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X,\",\n\"0300000032150000030a000000000000,Razer Wildcat,a:b0,b:b1,back:b9,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b10,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b8,x:b2,y:b3,platform:Mac OS X,\",\n\"03000000790000001100000000000000,Retrolink Classic Controller,a:b2,b:b1,back:b8,leftshoulder:b4,leftx:a3,lefty:a4,rightshoulder:b5,start:b9,x:b3,y:b0,platform:Mac OS X,\",\n\"03000000790000001100000006010000,Retrolink SNES Controller,a:b2,b:b1,back:b8,dpdown:+a4,dpleft:-a3,dpright:+a3,dpup:-a4,leftshoulder:b4,rightshoulder:b5,start:b9,x:b3,y:b0,platform:Mac OS X,\",\n\"030000006b140000010d000000010000,Revolution Pro Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X,\",\n\"03000000811700007e05000000000000,Sega Saturn,a:b2,b:b4,dpdown:b16,dpleft:b15,dpright:b14,dpup:b17,leftshoulder:b8,lefttrigger:a5,leftx:a0,lefty:a2,rightshoulder:b9,righttrigger:a4,start:b13,x:b0,y:b6,platform:Mac OS X,\",\n\"03000000b40400000a01000000000000,Sega Saturn USB Gamepad,a:b0,b:b1,back:b5,guide:b2,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b8,x:b3,y:b4,platform:Mac OS X,\",\n\"030000003512000021ab000000000000,SFC30 Joystick,a:b1,b:b0,back:b10,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b11,x:b4,y:b3,platform:Mac OS X,\",\n\"030000004c050000cc09000000000000,Sony DualShock 4 V2,a:b1,b:b2,back:b13,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X,\",\n\"030000004c050000a00b000000000000,Sony DualShock 4 Wireless Adaptor,a:b1,b:b2,back:b13,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X,\",\n\"030000005e0400008e02000001000000,Steam Virtual GamePad,a:b0,b:b1,back:b9,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b8,x:b2,y:b3,platform:Mac OS X,\",\n\"03000000110100002014000000000000,SteelSeries Nimbus,a:b0,b:b1,dpdown:b9,dpleft:b11,dpright:b10,dpup:b8,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a3,start:b12,x:b2,y:b3,platform:Mac OS X,\",\n\"03000000110100002014000001000000,SteelSeries Nimbus,a:b0,b:b1,dpdown:b9,dpleft:b11,dpright:b10,dpup:b8,guide:b12,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1~,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a3~,x:b2,y:b3,platform:Mac OS X,\",\n\"03000000381000002014000001000000,SteelSeries Nimbus,a:b0,b:b1,dpdown:b9,dpleft:b11,dpright:b10,dpup:b8,guide:b12,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1~,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a3~,x:b2,y:b3,platform:Mac OS X,\",\n\"03000000110100001714000000000000,SteelSeries Stratus XL,a:b0,b:b1,dpdown:b9,dpleft:b11,dpright:b10,dpup:b8,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1~,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a3~,start:b12,x:b2,y:b3,platform:Mac OS X,\",\n\"03000000110100001714000020010000,SteelSeries Stratus XL,a:b0,b:b1,dpdown:b9,dpleft:b11,dpright:b10,dpup:b8,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1~,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a3~,start:b12,x:b2,y:b3,platform:Mac OS X,\",\n\"030000004f04000015b3000000000000,Thrustmaster Dual Analog 3.2,a:b0,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b1,y:b3,platform:Mac OS X,\",\n\"030000004f04000000b3000000000000,Thrustmaster Firestorm Dual Power,a:b0,b:b2,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b11,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,righttrigger:b7,rightx:a2,righty:a3,start:b10,x:b1,y:b3,platform:Mac OS X,\",\n\"03000000bd12000015d0000000010000,Tomee SNES USB Controller,a:b2,b:b1,back:b8,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,rightshoulder:b5,start:b9,x:b3,y:b0,platform:Mac OS X,\",\n\"03000000bd12000015d0000000000000,Tomee SNES USB Controller,a:b2,b:b1,back:b8,leftshoulder:b4,leftx:a0,lefty:a1,rightshoulder:b5,start:b9,x:b3,y:b0,platform:Mac OS X,\",\n\"03000000100800000100000000000000,Twin USB Joystick,a:b4,b:b2,back:b16,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b12,leftstick:b20,lefttrigger:b8,leftx:a0,lefty:a2,rightshoulder:b14,rightstick:b22,righttrigger:b10,rightx:a6,righty:a4,start:b18,x:b6,y:b0,platform:Mac OS X,\",\n\"050000005769696d6f74652028303000,Wii Remote,a:b4,b:b5,back:b7,dpdown:b3,dpleft:b0,dpright:b1,dpup:b2,guide:b8,leftshoulder:b11,lefttrigger:b12,leftx:a0,lefty:a1,start:b6,x:b10,y:b9,platform:Mac OS X,\",\n\"050000005769696d6f74652028313800,Wii U Pro Controller,a:b16,b:b15,back:b7,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b8,leftshoulder:b19,leftstick:b23,lefttrigger:b21,leftx:a0,lefty:a1,rightshoulder:b20,rightstick:b24,righttrigger:b22,rightx:a2,righty:a3,start:b6,x:b18,y:b17,platform:Mac OS X,\",\n\"030000005e0400008e02000000000000,X360 Controller,a:b0,b:b1,back:b9,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b10,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b8,x:b2,y:b3,platform:Mac OS X,\",\n\"03000000c6240000045d000000000000,Xbox 360 Wired Controller,a:b0,b:b1,back:b9,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b10,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b8,x:b2,y:b3,platform:Mac OS X,\",\n\"030000005e040000e302000000000000,Xbox One Wired Controller,a:b0,b:b1,back:b9,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b10,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b8,x:b2,y:b3,platform:Mac OS X,\",\n\"030000005e040000d102000000000000,Xbox One Wired Controller,a:b0,b:b1,back:b9,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b10,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b8,x:b2,y:b3,platform:Mac OS X,\",\n\"030000005e040000dd02000000000000,Xbox One Wired Controller,a:b0,b:b1,back:b9,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b10,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b8,x:b2,y:b3,platform:Mac OS X,\",\n\"030000005e040000e002000000000000,Xbox Wireless Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Mac OS X,\",\n\"030000005e040000fd02000003090000,Xbox Wireless Controller,a:b0,b:b1,back:b16,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b15,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Mac OS X,\",\n\"030000005e040000ea02000000000000,Xbox Wireless Controller,a:b0,b:b1,back:b9,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b10,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b8,x:b2,y:b3,platform:Mac OS X,\",\n\"030000005e040000e002000003090000,Xbox Wireless Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Mac OS X,\",\n\"03000000172700004431000029010000,XiaoMi Game Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b15,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a6,rightx:a2,righty:a5,start:b11,x:b3,y:b4,platform:Mac OS X,\",\n\"03000000120c0000100e000000010000,ZEROPLUS P4 Gamepad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X,\",\n\"05000000203800000900000000010000,8Bitdo NES30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux,\",\n\"03000000022000000090000011010000,8Bitdo NES30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux,\",\n\"05000000c82d00002038000000010000,8Bitdo NES30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux,\",\n\"03000000c82d00000190000011010000,8Bitdo NES30 Pro 8Bitdo NES30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a5,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux,\",\n\"05000000c82d00003028000000010000,8Bitdo SFC30 GamePad,a:b1,b:b0,back:b10,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b11,x:b4,y:b3,platform:Linux,\",\n\"05000000102800000900000000010000,8Bitdo SFC30 GamePad,a:b1,b:b0,back:b10,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b11,x:b4,y:b3,platform:Linux,\",\n\"05000000a00500003232000008010000,8Bitdo Zero GamePad,a:b0,b:b1,back:b10,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,rightshoulder:b7,start:b11,x:b3,y:b4,platform:Linux,\",\n\"05000000a00500003232000001000000,8Bitdo Zero GamePad,a:b0,b:b1,back:b10,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b11,x:b3,y:b4,platform:Linux,\",\n\"030000006f0e00003901000020060000,Afterglow Wired Controller for Xbox One,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,\",\n\"03000000100000008200000011010000,Akishop Customs PS360+ v1.66,a:b1,b:b2,back:b12,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Linux,\",\n\"05000000050b00000045000031000000,ASUS Gamepad,a:b0,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b6,leftshoulder:b4,leftstick:b7,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b8,righttrigger:a4,rightx:a2,righty:a3,start:b10,x:b2,y:b3,platform:Linux,\",\n\"03000000666600006706000000010000,boom PSX to PC Converter,a:b2,b:b1,back:b8,dpdown:b14,dpleft:b15,dpright:b13,dpup:b12,leftshoulder:b6,leftstick:b9,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b10,righttrigger:b5,rightx:a2,righty:a3,start:b11,x:b3,y:b0,platform:Linux,\",\n\"03000000e82000006058000001010000,Cideko AK08b,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Linux,\",\n\"03000000260900008888000000010000,Cyber Gadget GameCube Controller,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b6,righttrigger:a5,rightx:a2,righty:a3~,start:b7,x:b2,y:b3,platform:Linux,\",\n\"03000000a306000022f6000011010000,Cyborg V.3 Rumble Pad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:+a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:-a3,rightx:a2,righty:a4,start:b9,x:b0,y:b3,platform:Linux,\",\n\"03000000b40400000a01000000010000,CYPRESS USB Gamepad,a:b0,b:b1,back:b5,guide:b2,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b8,x:b3,y:b4,platform:Linux,\",\n\"03000000790000000600000010010000,DragonRise Inc. Generic USB Joystick,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a3,righty:a4,start:b9,x:b3,y:b0,platform:Linux,\",\n\"030000006f0e00003001000001010000,EA Sports PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,\",\n\"03000000341a000005f7000010010000,GameCube {HuiJia USB box},a:b1,b:b2,dpdown:b14,dpleft:b15,dpright:b13,dpup:b12,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:a4,rightx:a5,righty:a2,start:b9,x:b0,y:b3,platform:Linux,\",\n\"0500000047532047616d657061640000,GameStop Gamepad,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Linux,\",\n\"030000006f0e00000104000000010000,Gamestop Logic3 Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,\",\n\"030000006f0e00001304000000010000,Generic X-Box pad,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:a0,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:a3,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,\",\n\"030000006f0e00001f01000000010000,Generic X-Box pad,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,\",\n\"03000000f0250000c183000010010000,Goodbetterbest Ltd USB Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,\",\n\"03000000280400000140000000010000,Gravis GamePad Pro USB ,a:b1,b:b2,back:b8,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Linux,\",\n\"030000008f0e00000610000000010000,GreenAsia Electronics 4Axes 12Keys GamePad ,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b9,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b10,righttrigger:b5,rightx:a3,righty:a2,start:b11,x:b3,y:b0,platform:Linux,\",\n\"030000008f0e00001200000010010000,GreenAsia Inc. USB Joystick,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a3,righty:a2,start:b9,x:b2,y:b3,platform:Linux,\",\n\"030000008f0e00000300000010010000,GreenAsia Inc. USB Joystick,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a3,righty:a2,start:b9,x:b3,y:b0,platform:Linux,\",\n\"0500000047532067616d657061640000,GS gamepad,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Linux,\",\n\"06000000adde0000efbe000002010000,Hidromancer Game Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,\",\n\"03000000d81400000862000011010000,HitBox (PS3/PC) Analog Mode,a:b1,b:b2,back:b8,guide:b9,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,start:b12,x:b0,y:b3,platform:Linux,\",\n\"03000000c9110000f055000011010000,HJC Game GAMEPAD,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Linux,\",\n\"030000000d0f00000d00000000010000,hori,a:b0,b:b6,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b3,leftx:b4,lefty:b5,rightshoulder:b7,start:b9,x:b1,y:b2,platform:Linux,\",\n\"030000000d0f00001000000011010000,HORI CO. LTD. FIGHTING STICK 3,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Linux,\",\n\"030000000d0f00006a00000011010000,HORI CO. LTD. Real Arcade Pro.4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux,\",\n\"030000000d0f00006b00000011010000,HORI CO. LTD. Real Arcade Pro.4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,\",\n\"030000000d0f00002200000011010000,HORI CO. LTD. REAL ARCADE Pro.V3,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Linux,\",\n\"030000000d0f00005f00000011010000,Hori Fighting Commander 4 (PS3),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,\",\n\"030000000d0f00005e00000011010000,Hori Fighting Commander 4 (PS4),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux,\",\n\"03000000ad1b000001f5000033050000,Hori Pad EX Turbo 2,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,\",\n\"030000000d0f00006e00000011010000,HORIPAD 4 (PS3),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,\",\n\"030000000d0f00006600000011010000,HORIPAD 4 (PS4),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux,\",\n\"030000000d0f00006700000001010000,HORIPAD ONE,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,\",\n\"030000008f0e00001330000010010000,HuiJia SNES Controller,a:b2,b:b1,back:b8,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,rightshoulder:b7,start:b9,x:b3,y:b0,platform:Linux,\",\n\"03000000830500006020000010010000,iBuffalo SNES Controller,a:b1,b:b0,back:b6,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,rightshoulder:b5,start:b7,x:b3,y:b2,platform:Linux,\",\n\"050000006964726f69643a636f6e0000,idroid:con,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,\",\n\"03000000b50700001503000010010000,impact,a:b2,b:b3,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a3,righty:a2,start:b9,x:b0,y:b1,platform:Linux,\",\n\"03000000fd0500000030000000010000,InterAct GoPad I-73000 (Fighting Game Layout),a:b3,b:b4,back:b6,leftx:a0,lefty:a1,rightshoulder:b2,righttrigger:b5,start:b7,x:b0,y:b1,platform:Linux,\",\n\"030000006e0500000320000010010000,JC-U3613M - DirectInput Mode,a:b2,b:b3,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b8,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b7,rightx:a2,righty:a3,start:b11,x:b0,y:b1,platform:Linux,\",\n\"03000000300f00001001000010010000,Jess Tech Dual Analog Rumble Pad,a:b2,b:b3,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a3,righty:a2,start:b9,x:b0,y:b1,platform:Linux,\",\n\"03000000ba2200002010000001010000,Jess Technology USB Game Controller,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,rightx:a3,righty:a2,start:b9,x:b3,y:b0,platform:Linux,\",\n\"030000006f0e00000103000000020000,Logic3 Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,\",\n\"030000006d04000019c2000010010000,Logitech Cordless RumblePad 2,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,\",\n\"030000006d04000016c2000011010000,Logitech Dual Action,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,\",\n\"030000006d04000016c2000010010000,Logitech Dual Action,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,\",\n\"030000006d0400001dc2000014400000,Logitech F310 Gamepad (XInput),a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,\",\n\"030000006d0400001ec2000020200000,Logitech F510 Gamepad (XInput),a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,\",\n\"030000006d04000019c2000011010000,Logitech F710 Gamepad (DInput),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,\",\n\"030000006d0400001fc2000005030000,Logitech F710 Gamepad (XInput),a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,\",\n\"030000006d04000015c2000010010000,Logitech Logitech Extreme 3D,a:b0,b:b4,back:b6,guide:b8,leftshoulder:b9,leftstick:h0.8,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:h0.2,start:b7,x:b2,y:b5,platform:Linux,\",\n\"030000006d04000018c2000010010000,Logitech RumblePad 2,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,\",\n\"030000006d04000011c2000010010000,Logitech WingMan Cordless RumblePad,a:b0,b:b1,back:b2,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b5,leftshoulder:b6,lefttrigger:b9,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b10,rightx:a3,righty:a4,start:b8,x:b3,y:b4,platform:Linux,\",\n\"05000000380700006652000025010000,Mad Catz C.T.R.L.R ,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,\",\n\"03000000380700005032000011010000,Mad Catz FightPad PRO (PS3),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,\",\n\"03000000380700005082000011010000,Mad Catz FightPad PRO (PS4),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux,\",\n\"03000000ad1b00002ef0000090040000,Mad Catz Fightpad SFxT,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,lefttrigger:a2,rightshoulder:b5,righttrigger:a5,start:b7,x:b2,y:b3,platform:Linux,\",\n\"03000000380700008034000011010000,Mad Catz fightstick (PS3),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,\",\n\"03000000380700008084000011010000,Mad Catz fightstick (PS4),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux,\",\n\"03000000380700008433000011010000,Mad Catz FightStick TE S+ PS3,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,\",\n\"03000000380700008483000011010000,Mad Catz FightStick TE S+ PS4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux,\",\n\"03000000380700001647000010040000,Mad Catz Wired Xbox 360 Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,\",\n\"03000000380700003847000090040000,Mad Catz Wired Xbox 360 Controller (SFIV),a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Linux,\",\n\"03000000ad1b000016f0000090040000,Mad Catz Xbox 360 Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,\",\n\"03000000380700001888000010010000,MadCatz PC USB Wired Stick 8818,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,\",\n\"03000000380700003888000010010000,MadCatz PC USB Wired Stick 8838,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:a0,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,\",\n\"03000000790000004418000010010000,Mayflash GameCube Controller,a:b1,b:b2,dpdown:b14,dpleft:b15,dpright:b13,dpup:b12,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:a4,rightx:a5,righty:a2,start:b9,x:b0,y:b3,platform:Linux,\",\n\"03000000780000000600000010010000,Microntek USB Joystick,a:b2,b:b1,back:b8,leftshoulder:b6,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b5,start:b9,x:b3,y:b0,platform:Linux,\",\n\"030000005e0400008e02000004010000,Microsoft X-Box 360 pad,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,\",\n\"030000005e0400008e02000062230000,Microsoft X-Box 360 pad,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,\",\n\"030000005e040000d102000001010000,Microsoft X-Box One pad,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,\",\n\"030000005e040000d102000003020000,Microsoft X-Box One pad v2,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,\",\n\"030000005e0400008502000000010000,Microsoft X-Box pad (Japan),a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b5,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b2,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b3,y:b4,platform:Linux,\",\n\"030000005e0400008902000021010000,Microsoft X-Box pad v2 (US),a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b5,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b2,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b3,y:b4,platform:Linux,\",\n\"05000000d6200000ad0d000001000000,Moga Pro,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b7,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b8,righttrigger:a4,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Linux,\",\n\"030000001008000001e5000010010000,NEXT SNES Controller,a:b2,b:b1,back:b8,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,rightshoulder:b6,start:b9,x:b3,y:b0,platform:Linux,\",\n\"050000007e0500000920000001000000,Nintendo Switch Pro Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Linux,\",\n\"050000007e0500003003000001000000,Nintendo Wii Remote Pro Controller,a:b0,b:b1,back:b8,dpdown:b14,dpleft:b15,dpright:b16,dpup:b13,guide:b10,leftshoulder:b4,leftstick:b11,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b12,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b2,platform:Linux,\",\n\"05000000010000000100000003000000,Nintendo Wiimote,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b11,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b12,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Linux,\",\n\"030000000d0500000308000010010000,Nostromo n45 Dual Analog Gamepad,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b9,leftshoulder:b4,leftstick:b12,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a3,righty:a2,start:b10,x:b2,y:b3,platform:Linux,\",\n\"03000000550900001072000011010000,NVIDIA Controller,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b13,leftshoulder:b4,leftstick:b8,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a4,rightx:a2,righty:a3,start:b7,x:b2,y:b3,platform:Linux,\",\n\"03000000451300000830000010010000,NYKO CORE,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux,\",\n\"030000005e0400000202000000010000,Old Xbox pad,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b5,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b2,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b3,y:b4,platform:Linux,\",\n\"05000000362800000100000002010000,OUYA Game Controller,a:b0,b:b3,dpdown:b9,dpleft:b10,dpright:b11,dpup:b8,guide:b14,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,x:b1,y:b2,platform:Linux,\",\n\"05000000362800000100000003010000,OUYA Game Controller,a:b0,b:b3,dpdown:b9,dpleft:b10,dpright:b11,dpup:b8,guide:b14,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,x:b1,y:b2,platform:Linux,\",\n\"03000000ff1100003133000010010000,PC Game Controller,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Linux,\",\n\"030000006f0e00006401000001010000,PDP Battlefield One,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,\",\n\"03000000ff1100004133000010010000,PS2 Controller,a:b2,b:b1,back:b8,leftshoulder:b6,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b5,start:b9,x:b3,y:b0,platform:Linux,\",\n\"030000004c0500006802000010010000,PS3 Controller,a:b14,b:b13,back:b0,dpdown:b6,dpleft:b7,dpright:b5,dpup:b4,guide:b16,leftshoulder:b10,leftstick:b1,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b11,rightstick:b2,righttrigger:b9,rightx:a2,righty:a3,start:b3,x:b15,y:b12,platform:Linux,\",\n\"050000004c0500006802000000810000,PS3 Controller,a:b0,b:b1,back:b8,dpdown:b14,dpleft:b15,dpright:b16,dpup:b13,guide:b10,leftshoulder:b4,leftstick:b11,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b12,righttrigger:a5,rightx:a3,righty:a4,start:b9,x:b3,y:b2,platform:Linux,\",\n\"03000000341a00003608000011010000,PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,\",\n\"030000004c0500006802000011810000,PS3 Controller,a:b0,b:b1,back:b8,dpdown:b14,dpleft:b15,dpright:b16,dpup:b13,guide:b10,leftshoulder:b4,leftstick:b11,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b12,righttrigger:a5,rightx:a3,righty:a4,start:b9,x:b3,y:b2,platform:Linux,\",\n\"050000004c0500006802000000010000,PS3 Controller,a:b14,b:b13,back:b0,dpdown:b6,dpleft:b7,dpright:b5,dpup:b4,guide:b16,leftshoulder:b10,leftstick:b1,lefttrigger:a12,leftx:a0,lefty:a1,rightshoulder:b11,rightstick:b2,righttrigger:a13,rightx:a2,righty:a3,start:b3,x:b15,y:b12,platform:Linux,\",\n\"030000004c0500006802000010810000,PS3 Controller,a:b0,b:b1,back:b8,dpdown:b14,dpleft:b15,dpright:b16,dpup:b13,guide:b10,leftshoulder:b4,leftstick:b11,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b12,righttrigger:a5,rightx:a3,righty:a4,start:b9,x:b3,y:b2,platform:Linux,\",\n\"030000004c0500006802000011010000,PS3 Controller,a:b14,b:b13,back:b0,dpdown:b6,dpleft:b7,dpright:b5,dpup:b4,guide:b16,leftshoulder:b10,leftstick:b1,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b11,rightstick:b2,righttrigger:b9,rightx:a2,righty:a3,start:b3,x:b15,y:b12,platform:Linux,\",\n\"060000004c0500006802000000010000,PS3 Controller (Bluetooth),a:b14,b:b13,back:b0,dpdown:b6,dpleft:b7,dpright:b5,dpup:b4,guide:b16,leftshoulder:b10,leftstick:b1,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b11,rightstick:b2,righttrigger:b9,rightx:a2,righty:a3,start:b3,x:b15,y:b12,platform:Linux,\",\n\"05000000504c415953544154494f4e00,PS3 Controller (Bluetooth),a:b14,b:b13,back:b0,dpdown:b6,dpleft:b7,dpright:b5,dpup:b4,guide:b16,leftshoulder:b10,leftstick:b1,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b11,rightstick:b2,righttrigger:b9,rightx:a2,righty:a3,start:b3,x:b15,y:b12,platform:Linux,\",\n\"050000004c050000c405000000010000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux,\",\n\"030000004c050000a00b000011010000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux,\",\n\"050000004c050000cc09000000810000,PS4 Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b11,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b12,righttrigger:a5,rightx:a3,righty:a4,start:b9,x:b3,y:b2,platform:Linux,\",\n\"050000004c050000c405000000810000,PS4 Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b11,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b12,righttrigger:a5,rightx:a3,righty:a4,start:b9,x:b3,y:b2,platform:Linux,\",\n\"030000004c050000c405000011810000,PS4 Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b11,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b12,righttrigger:a5,rightx:a3,righty:a4,start:b9,x:b3,y:b2,platform:Linux,\",\n\"050000004c050000cc09000000010000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux,\",\n\"030000004c050000cc09000011010000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux,\",\n\"030000004c050000a00b000011810000,PS4 Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b11,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b12,righttrigger:a5,rightx:a3,righty:a4,start:b9,x:b3,y:b2,platform:Linux,\",\n\"030000004c050000cc09000011810000,PS4 Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b11,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b12,righttrigger:a5,rightx:a3,righty:a4,start:b9,x:b3,y:b2,platform:Linux,\",\n\"030000004c050000c405000011010000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux,\",\n\"03000000300f00001211000011010000,QanBa Arcade JoyStick,a:b2,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b5,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b6,start:b9,x:b1,y:b3,platform:Linux,\",\n\"030000009b2800000300000001010000,raphnet.net 4nes4snes v1.5,a:b0,b:b4,back:b2,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b3,x:b1,y:b5,platform:Linux,\",\n\"030000008916000001fd000024010000,Razer Onza Classic Edition,a:b0,b:b1,back:b6,dpdown:b14,dpleft:b11,dpright:b12,dpup:b13,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,\",\n\"030000008916000000fd000024010000,Razer Onza Tournament,a:b0,b:b1,back:b6,dpdown:b14,dpleft:b11,dpright:b12,dpup:b13,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,\",\n\"03000000321500000010000011010000,Razer RAIJU,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux,\",\n\"03000000c6240000045d000025010000,Razer Sabertooth,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,\",\n\"03000000321500000009000011010000,Razer Serval,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a4,rightx:a2,righty:a3,start:b7,x:b2,y:b3,platform:Linux,\",\n\"050000003215000000090000163a0000,Razer Serval,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a4,rightx:a2,righty:a3,start:b7,x:b2,y:b3,platform:Linux,\",\n\"0300000032150000030a000001010000,Razer Wildcat,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,\",\n\"03000000790000001100000010010000,Retrolink SNES Controller,a:b2,b:b1,back:b8,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,rightshoulder:b5,start:b9,x:b3,y:b0,platform:Linux,\",\n\"0300000000f000000300000000010000,RetroUSB.com RetroPad,a:b1,b:b5,back:b2,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b3,x:b0,y:b4,platform:Linux,\",\n\"0300000000f00000f100000000010000,RetroUSB.com Super RetroPort,a:b1,b:b5,back:b2,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b3,x:b0,y:b4,platform:Linux,\",\n\"030000006b140000010d000011010000,Revolution Pro Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux,\",\n\"030000006f0e00001e01000011010000,Rock Candy Gamepad for PS3,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,\",\n\"030000006f0e00004601000001010000,Rock Candy Wired Controller for Xbox One,a:b0,b:b1,back:b6,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,\",\n\"03000000a306000023f6000011010000,Saitek Cyborg V.1 Game Pad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a4,start:b9,x:b0,y:b3,platform:Linux,\",\n\"03000000a30600000cff000010010000,Saitek P2500 Force Rumble Pad,a:b2,b:b3,back:b11,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b8,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b7,rightx:a3,righty:a2,x:b0,y:b1,platform:Linux,\",\n\"03000000a30600000c04000011010000,Saitek P2900 Wireless Pad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b9,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a3,righty:a2,start:b12,x:b0,y:b3,platform:Linux,\",\n\"03000000a30600000901000000010000,Saitek P880,a:b2,b:b3,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b7,rightx:a3,righty:a2,x:b0,y:b1,platform:Linux,\",\n\"03000000a30600000b04000000010000,Saitek P990 Dual Analog Pad,a:b1,b:b2,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a3,righty:a2,start:b8,x:b0,y:b3,platform:Linux,\",\n\"03000000a306000018f5000010010000,Saitek PLC Saitek P3200 Rumble Pad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a3,righty:a4,start:b9,x:b0,y:b3,platform:Linux,\",\n\"03000000c01600008704000011010000,Serial/Keyboard/Mouse/Joystick,a:b12,b:b10,back:b4,dpdown:b2,dpleft:b3,dpright:b1,dpup:b0,leftshoulder:b9,leftstick:b14,lefttrigger:b6,leftx:a1,lefty:a0,rightshoulder:b8,rightstick:b15,righttrigger:b7,rightx:a2,righty:a3,start:b5,x:b13,y:b11,platform:Linux,\",\n\"03000000f025000021c1000010010000,ShanWan Gioteck PS3 Wired Controller,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Linux,\",\n\"03000000250900000500000000010000,Sony PS2 pad with SmartJoy adapter,a:b2,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a2,righty:a3,start:b8,x:b3,y:b0,platform:Linux,\",\n\"030000005e0400008e02000073050000,Speedlink TORID Wireless Gamepad,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,\",\n\"030000005e0400008e02000020200000,SpeedLink XEOX Pro Analog Gamepad pad,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,\",\n\"03000000de2800000211000001000000,Steam Controller,a:b0,b:b1,back:b6,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:a3,start:b7,x:b2,y:b3,platform:Linux,\",\n\"05000000de2800000511000001000000,Steam Controller,a:b0,b:b1,back:b6,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:a3,start:b7,x:b2,y:b3,platform:Linux,\",\n\"03000000de2800000112000001000000,Steam Controller,a:b0,b:b1,back:b6,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:a3,start:b7,x:b2,y:b3,platform:Linux,\",\n\"05000000de2800000212000001000000,Steam Controller,a:b0,b:b1,back:b6,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:a3,start:b7,x:b2,y:b3,platform:Linux,\",\n\"03000000de280000fc11000001000000,Steam Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,\",\n\"03000000de2800004211000001000000,Steam Controller,a:b0,b:b1,back:b6,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:a3,start:b7,x:b2,y:b3,platform:Linux,\",\n\"03000000de280000ff11000001000000,Steam Virtual Gamepad,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,\",\n\"03000000666600000488000000010000,Super Joy Box 5 Pro,a:b2,b:b1,back:b9,dpdown:b14,dpleft:b15,dpright:b13,dpup:b12,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a2,righty:a3,start:b8,x:b3,y:b0,platform:Linux,\",\n\"030000004f04000020b3000010010000,Thrustmaster 2 in 1 DT,a:b0,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b1,y:b3,platform:Linux,\",\n\"030000004f04000015b3000010010000,Thrustmaster Dual Analog 4,a:b0,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b1,y:b3,platform:Linux,\",\n\"030000004f04000023b3000000010000,Thrustmaster Dual Trigger 3-in-1,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux,\",\n\"030000004f04000000b3000010010000,Thrustmaster Firestorm Dual Power,a:b0,b:b2,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b11,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b12,righttrigger:b7,rightx:a2,righty:a3,start:b10,x:b1,y:b3,platform:Linux,\",\n\"030000004f04000008d0000000010000,Thrustmaster Run N Drive Wireless,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux,\",\n\"030000004f04000009d0000000010000,Thrustmaster Run N Drive Wireless PS3,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,\",\n\"03000000bd12000015d0000010010000,Tomee SNES USB Controller,a:b2,b:b1,back:b8,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,rightshoulder:b5,start:b9,x:b3,y:b0,platform:Linux,\",\n\"03000000d814000007cd000011010000,Toodles 2008 Chimp PC/PS3,a:b0,b:b1,back:b8,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,start:b9,x:b3,y:b2,platform:Linux,\",\n\"03000000100800000100000010010000,Twin USB PS2 Adapter,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a3,righty:a2,start:b9,x:b3,y:b0,platform:Linux,\",\n\"03000000100800000300000010010000,USB Gamepad,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a3,righty:a2,start:b9,x:b3,y:b0,platform:Linux,\",\n\"03000000790000001100000000010000,USB Gamepad1,a:b2,b:b1,back:b8,dpdown:a0,dpleft:a1,dpright:a2,dpup:a4,start:b9,platform:Linux,\",\n\"05000000ac0500003232000001000000,VR-BOX,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a3,righty:a2,start:b9,x:b2,y:b3,platform:Linux,\",\n\"030000005e0400008e02000014010000,X360 Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,\",\n\"030000005e0400008e02000010010000,X360 Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,\",\n\"030000005e0400001907000000010000,X360 Wireless Controller,a:b0,b:b1,back:b6,dpdown:b14,dpleft:b11,dpright:b12,dpup:b13,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,\",\n\"030000005e0400009102000007010000,X360 Wireless Controller,a:b0,b:b1,back:b6,dpdown:b14,dpleft:b11,dpright:b12,dpup:b13,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,\",\n\"030000005e040000a102000007010000,X360 Wireless Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,\",\n\"030000005e040000a102000000010000,X360 Wireless Controller,a:b0,b:b1,back:b6,dpdown:b14,dpleft:b11,dpright:b12,dpup:b13,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,\",\n\"0000000058626f782033363020576900,Xbox 360 Wireless Controller,a:b0,b:b1,back:b14,dpdown:b11,dpleft:b12,dpright:b13,dpup:b10,guide:b7,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b6,x:b2,y:b3,platform:Linux,\",\n\"0000000058626f782047616d65706100,Xbox Gamepad (userspace driver),a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a4,rightx:a2,righty:a3,start:b7,x:b2,y:b3,platform:Linux,\",\n\"050000005e040000e002000003090000,Xbox One Wireless Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,\",\n\"050000005e040000fd02000003090000,Xbox One Wireless Controller,a:b0,b:b1,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b16,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,\",\n\"03000000450c00002043000010010000,XEOX Gamepad SL-6556-BK,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Linux,\",\n\"05000000172700004431000029010000,XiaoMi Game Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b20,leftshoulder:b6,leftstick:b13,lefttrigger:a7,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a6,rightx:a2,righty:a5,start:b11,x:b3,y:b4,platform:Linux,\",\n\"03000000c0160000e105000001010000,Xin-Mo Xin-Mo Dual Arcade,a:b4,b:b3,back:b6,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b9,leftshoulder:b2,leftx:a0,lefty:a1,rightshoulder:b5,start:b7,x:b1,y:b0,platform:Linux,\",\n\"03000000120c0000100e000011010000,ZEROPLUS P4 Gamepad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux,\",\n\"64633436313965656664373634323364,Microsoft X-Box 360 pad,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,x:b2,y:b3,platform:Android,\",\n\"61363931656135336130663561616264,NVIDIA Controller,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android,\",\n\"4e564944494120436f72706f72617469,NVIDIA Controller,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android,\",\n\"37336435666338653565313731303834,NVIDIA Controller,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android,\",\n\"35643031303033326130316330353564,PS4 Controller,a:b1,b:b17,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b5,leftshoulder:b3,leftstick:b4,lefttrigger:+a3,leftx:a0,lefty:a1,rightshoulder:b18,rightstick:b6,righttrigger:+a4,rightx:a2,righty:a5,start:b16,x:b0,y:b2,platform:Android,\",\n\"05000000de2800000511000001000000,Steam Controller,a:b0,b:b1,back:b6,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:a3,start:b7,x:b2,y:b3,platform:Android,\",\n\"5477696e20555342204a6f7973746963,Twin USB Joystick,a:b22,b:b21,back:b28,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b26,leftstick:b30,lefttrigger:b24,leftx:a0,lefty:a1,rightshoulder:b27,rightstick:b31,righttrigger:b25,rightx:a3,righty:a2,start:b29,x:b23,y:b20,platform:Android,\",\n\"34356136633366613530316338376136,Xbox Wireless Controller,a:b0,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b3,leftstick:b15,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b18,rightstick:b16,righttrigger:a5,rightx:a3,righty:a4,x:b17,y:b2,platform:Android,\",\n\"4d466947616d65706164010000000000,MFi Extended Gamepad,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:a5,rightx:a3,righty:a4,start:b6,x:b2,y:b3,platform:iOS,\",\n\"4d466947616d65706164020000000000,MFi Gamepad,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,rightshoulder:b5,start:b6,x:b2,y:b3,platform:iOS,\",\n\"05000000de2800000511000001000000,Steam Controller,a:b0,b:b1,back:b6,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:a3,start:b7,x:b2,y:b3,platform:iOS,\",\n\n\"78696e70757401000000000000000000,XInput Gamepad (GLFW),platform:Windows,a:b0,b:b1,x:b2,y:b3,leftshoulder:b4,rightshoulder:b5,back:b6,start:b7,leftstick:b8,rightstick:b9,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:a4,righttrigger:a5,dpup:h0.1,dpright:h0.2,dpdown:h0.4,dpleft:h0.8,\",\n\"78696e70757402000000000000000000,XInput Wheel (GLFW),platform:Windows,a:b0,b:b1,x:b2,y:b3,leftshoulder:b4,rightshoulder:b5,back:b6,start:b7,leftstick:b8,rightstick:b9,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:a4,righttrigger:a5,dpup:h0.1,dpright:h0.2,dpdown:h0.4,dpleft:h0.8,\",\n\"78696e70757403000000000000000000,XInput Arcade Stick (GLFW),platform:Windows,a:b0,b:b1,x:b2,y:b3,leftshoulder:b4,rightshoulder:b5,back:b6,start:b7,leftstick:b8,rightstick:b9,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:a4,righttrigger:a5,dpup:h0.1,dpright:h0.2,dpdown:h0.4,dpleft:h0.8,\",\n\"78696e70757404000000000000000000,XInput Flight Stick (GLFW),platform:Windows,a:b0,b:b1,x:b2,y:b3,leftshoulder:b4,rightshoulder:b5,back:b6,start:b7,leftstick:b8,rightstick:b9,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:a4,righttrigger:a5,dpup:h0.1,dpright:h0.2,dpdown:h0.4,dpleft:h0.8,\",\n\"78696e70757405000000000000000000,XInput Dance Pad (GLFW),platform:Windows,a:b0,b:b1,x:b2,y:b3,leftshoulder:b4,rightshoulder:b5,back:b6,start:b7,leftstick:b8,rightstick:b9,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:a4,righttrigger:a5,dpup:h0.1,dpright:h0.2,dpdown:h0.4,dpleft:h0.8,\",\n\"78696e70757406000000000000000000,XInput Guitar (GLFW),platform:Windows,a:b0,b:b1,x:b2,y:b3,leftshoulder:b4,rightshoulder:b5,back:b6,start:b7,leftstick:b8,rightstick:b9,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:a4,righttrigger:a5,dpup:h0.1,dpright:h0.2,dpdown:h0.4,dpleft:h0.8,\",\n\"78696e70757408000000000000000000,XInput Drum Kit (GLFW),platform:Windows,a:b0,b:b1,x:b2,y:b3,leftshoulder:b4,rightshoulder:b5,back:b6,start:b7,leftstick:b8,rightstick:b9,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:a4,righttrigger:a5,dpup:h0.1,dpright:h0.2,dpdown:h0.4,dpleft:h0.8,\",\nNULL\n};\n\n"
  },
  {
    "path": "thirdparty/glfw/src/mappings.h.in",
    "content": "//========================================================================\n// GLFW 3.3 - www.glfw.org\n//------------------------------------------------------------------------\n// Copyright (c) 2006-2018 Camilla Löwy <elmindreda@glfw.org>\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//    claim that you wrote the original software. If you use this software\n//    in a product, an acknowledgment in the product documentation would\n//    be appreciated but is not required.\n//\n// 2. Altered source versions must be plainly marked as such, and must not\n//    be misrepresented as being the original software.\n//\n// 3. This notice may not be removed or altered from any source\n//    distribution.\n//\n//========================================================================\n// As mappings.h.in, this file is used by CMake to produce the mappings.h\n// header file.  If you are adding a GLFW specific gamepad mapping, this is\n// where to put it.\n//========================================================================\n// As mappings.h, this provides all pre-defined gamepad mappings, including\n// all available in SDL_GameControllerDB.  Do not edit this file.  Any gamepad\n// mappings not specific to GLFW should be submitted to SDL_GameControllerDB.\n// This file can be re-generated from mappings.h.in and the upstream\n// gamecontrollerdb.txt with the GenerateMappings.cmake script.\n//========================================================================\n\n// All gamepad mappings not labeled GLFW are copied from the\n// SDL_GameControllerDB project under the following license:\n//\n// Simple DirectMedia Layer\n// Copyright (C) 1997-2013 Sam Lantinga <slouken@libsdl.org>\n//\n// This software is provided 'as-is', without any express or implied warranty.\n// In no event will the authors be held liable for any damages arising from the\n// use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//    claim that you wrote the original software. If you use this software\n//    in a product, an acknowledgment in the product documentation would\n//    be appreciated but is not required.\n//\n// 2. Altered source versions must be plainly marked as such, and must not be\n//    misrepresented as being the original software.\n//\n// 3. This notice may not be removed or altered from any source distribution.\n\nconst char* _glfwDefaultMappings[] =\n{\n@GLFW_GAMEPAD_MAPPINGS@\n\"78696e70757401000000000000000000,XInput Gamepad (GLFW),platform:Windows,a:b0,b:b1,x:b2,y:b3,leftshoulder:b4,rightshoulder:b5,back:b6,start:b7,leftstick:b8,rightstick:b9,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:a4,righttrigger:a5,dpup:h0.1,dpright:h0.2,dpdown:h0.4,dpleft:h0.8,\",\n\"78696e70757402000000000000000000,XInput Wheel (GLFW),platform:Windows,a:b0,b:b1,x:b2,y:b3,leftshoulder:b4,rightshoulder:b5,back:b6,start:b7,leftstick:b8,rightstick:b9,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:a4,righttrigger:a5,dpup:h0.1,dpright:h0.2,dpdown:h0.4,dpleft:h0.8,\",\n\"78696e70757403000000000000000000,XInput Arcade Stick (GLFW),platform:Windows,a:b0,b:b1,x:b2,y:b3,leftshoulder:b4,rightshoulder:b5,back:b6,start:b7,leftstick:b8,rightstick:b9,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:a4,righttrigger:a5,dpup:h0.1,dpright:h0.2,dpdown:h0.4,dpleft:h0.8,\",\n\"78696e70757404000000000000000000,XInput Flight Stick (GLFW),platform:Windows,a:b0,b:b1,x:b2,y:b3,leftshoulder:b4,rightshoulder:b5,back:b6,start:b7,leftstick:b8,rightstick:b9,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:a4,righttrigger:a5,dpup:h0.1,dpright:h0.2,dpdown:h0.4,dpleft:h0.8,\",\n\"78696e70757405000000000000000000,XInput Dance Pad (GLFW),platform:Windows,a:b0,b:b1,x:b2,y:b3,leftshoulder:b4,rightshoulder:b5,back:b6,start:b7,leftstick:b8,rightstick:b9,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:a4,righttrigger:a5,dpup:h0.1,dpright:h0.2,dpdown:h0.4,dpleft:h0.8,\",\n\"78696e70757406000000000000000000,XInput Guitar (GLFW),platform:Windows,a:b0,b:b1,x:b2,y:b3,leftshoulder:b4,rightshoulder:b5,back:b6,start:b7,leftstick:b8,rightstick:b9,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:a4,righttrigger:a5,dpup:h0.1,dpright:h0.2,dpdown:h0.4,dpleft:h0.8,\",\n\"78696e70757408000000000000000000,XInput Drum Kit (GLFW),platform:Windows,a:b0,b:b1,x:b2,y:b3,leftshoulder:b4,rightshoulder:b5,back:b6,start:b7,leftstick:b8,rightstick:b9,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:a4,righttrigger:a5,dpup:h0.1,dpright:h0.2,dpdown:h0.4,dpleft:h0.8,\",\nNULL\n};\n\n"
  },
  {
    "path": "thirdparty/glfw/src/monitor.c",
    "content": "//========================================================================\n// GLFW 3.3 - www.glfw.org\n//------------------------------------------------------------------------\n// Copyright (c) 2002-2006 Marcus Geelnard\n// Copyright (c) 2006-2019 Camilla Löwy <elmindreda@glfw.org>\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//    claim that you wrote the original software. If you use this software\n//    in a product, an acknowledgment in the product documentation would\n//    be appreciated but is not required.\n//\n// 2. Altered source versions must be plainly marked as such, and must not\n//    be misrepresented as being the original software.\n//\n// 3. This notice may not be removed or altered from any source\n//    distribution.\n//\n//========================================================================\n// Please use C89 style variable declarations in this file because VS 2010\n//========================================================================\n\n#include \"internal.h\"\n\n#include <assert.h>\n#include <math.h>\n#include <float.h>\n#include <string.h>\n#include <stdlib.h>\n#include <limits.h>\n\n\n// Lexically compare video modes, used by qsort\n//\nstatic int compareVideoModes(const void* fp, const void* sp)\n{\n    const GLFWvidmode* fm = fp;\n    const GLFWvidmode* sm = sp;\n    const int fbpp = fm->redBits + fm->greenBits + fm->blueBits;\n    const int sbpp = sm->redBits + sm->greenBits + sm->blueBits;\n    const int farea = fm->width * fm->height;\n    const int sarea = sm->width * sm->height;\n\n    // First sort on color bits per pixel\n    if (fbpp != sbpp)\n        return fbpp - sbpp;\n\n    // Then sort on screen area\n    if (farea != sarea)\n        return farea - sarea;\n\n    // Then sort on width\n    if (fm->width != sm->width)\n        return fm->width - sm->width;\n\n    // Lastly sort on refresh rate\n    return fm->refreshRate - sm->refreshRate;\n}\n\n// Retrieves the available modes for the specified monitor\n//\nstatic GLFWbool refreshVideoModes(_GLFWmonitor* monitor)\n{\n    int modeCount;\n    GLFWvidmode* modes;\n\n    if (monitor->modes)\n        return GLFW_TRUE;\n\n    modes = _glfwPlatformGetVideoModes(monitor, &modeCount);\n    if (!modes)\n        return GLFW_FALSE;\n\n    qsort(modes, modeCount, sizeof(GLFWvidmode), compareVideoModes);\n\n    free(monitor->modes);\n    monitor->modes = modes;\n    monitor->modeCount = modeCount;\n\n    return GLFW_TRUE;\n}\n\n\n//////////////////////////////////////////////////////////////////////////\n//////                         GLFW event API                       //////\n//////////////////////////////////////////////////////////////////////////\n\n// Notifies shared code of a monitor connection or disconnection\n//\nvoid _glfwInputMonitor(_GLFWmonitor* monitor, int action, int placement)\n{\n    if (action == GLFW_CONNECTED)\n    {\n        _glfw.monitorCount++;\n        _glfw.monitors =\n            realloc(_glfw.monitors, sizeof(_GLFWmonitor*) * _glfw.monitorCount);\n\n        if (placement == _GLFW_INSERT_FIRST)\n        {\n            memmove(_glfw.monitors + 1,\n                    _glfw.monitors,\n                    ((size_t) _glfw.monitorCount - 1) * sizeof(_GLFWmonitor*));\n            _glfw.monitors[0] = monitor;\n        }\n        else\n            _glfw.monitors[_glfw.monitorCount - 1] = monitor;\n    }\n    else if (action == GLFW_DISCONNECTED)\n    {\n        int i;\n        _GLFWwindow* window;\n\n        for (window = _glfw.windowListHead;  window;  window = window->next)\n        {\n            if (window->monitor == monitor)\n            {\n                int width, height, xoff, yoff;\n                _glfwPlatformGetWindowSize(window, &width, &height);\n                _glfwPlatformSetWindowMonitor(window, NULL, 0, 0, width, height, 0);\n                _glfwPlatformGetWindowFrameSize(window, &xoff, &yoff, NULL, NULL);\n                _glfwPlatformSetWindowPos(window, xoff, yoff);\n            }\n        }\n\n        for (i = 0;  i < _glfw.monitorCount;  i++)\n        {\n            if (_glfw.monitors[i] == monitor)\n            {\n                _glfw.monitorCount--;\n                memmove(_glfw.monitors + i,\n                        _glfw.monitors + i + 1,\n                        ((size_t) _glfw.monitorCount - i) * sizeof(_GLFWmonitor*));\n                break;\n            }\n        }\n    }\n\n    if (_glfw.callbacks.monitor)\n        _glfw.callbacks.monitor((GLFWmonitor*) monitor, action);\n\n    if (action == GLFW_DISCONNECTED)\n        _glfwFreeMonitor(monitor);\n}\n\n// Notifies shared code that a full screen window has acquired or released\n// a monitor\n//\nvoid _glfwInputMonitorWindow(_GLFWmonitor* monitor, _GLFWwindow* window)\n{\n    monitor->window = window;\n}\n\n\n//////////////////////////////////////////////////////////////////////////\n//////                       GLFW internal API                      //////\n//////////////////////////////////////////////////////////////////////////\n\n// Allocates and returns a monitor object with the specified name and dimensions\n//\n_GLFWmonitor* _glfwAllocMonitor(const char* name, int widthMM, int heightMM)\n{\n    _GLFWmonitor* monitor = calloc(1, sizeof(_GLFWmonitor));\n    monitor->widthMM = widthMM;\n    monitor->heightMM = heightMM;\n\n    if (name)\n        monitor->name = _glfw_strdup(name);\n\n    return monitor;\n}\n\n// Frees a monitor object and any data associated with it\n//\nvoid _glfwFreeMonitor(_GLFWmonitor* monitor)\n{\n    if (monitor == NULL)\n        return;\n\n    _glfwPlatformFreeMonitor(monitor);\n\n    _glfwFreeGammaArrays(&monitor->originalRamp);\n    _glfwFreeGammaArrays(&monitor->currentRamp);\n\n    free(monitor->modes);\n    free(monitor->name);\n    free(monitor);\n}\n\n// Allocates red, green and blue value arrays of the specified size\n//\nvoid _glfwAllocGammaArrays(GLFWgammaramp* ramp, unsigned int size)\n{\n    ramp->red = calloc(size, sizeof(unsigned short));\n    ramp->green = calloc(size, sizeof(unsigned short));\n    ramp->blue = calloc(size, sizeof(unsigned short));\n    ramp->size = size;\n}\n\n// Frees the red, green and blue value arrays and clears the struct\n//\nvoid _glfwFreeGammaArrays(GLFWgammaramp* ramp)\n{\n    free(ramp->red);\n    free(ramp->green);\n    free(ramp->blue);\n\n    memset(ramp, 0, sizeof(GLFWgammaramp));\n}\n\n// Chooses the video mode most closely matching the desired one\n//\nconst GLFWvidmode* _glfwChooseVideoMode(_GLFWmonitor* monitor,\n                                        const GLFWvidmode* desired)\n{\n    int i;\n    unsigned int sizeDiff, leastSizeDiff = UINT_MAX;\n    unsigned int rateDiff, leastRateDiff = UINT_MAX;\n    unsigned int colorDiff, leastColorDiff = UINT_MAX;\n    const GLFWvidmode* current;\n    const GLFWvidmode* closest = NULL;\n\n    if (!refreshVideoModes(monitor))\n        return NULL;\n\n    for (i = 0;  i < monitor->modeCount;  i++)\n    {\n        current = monitor->modes + i;\n\n        colorDiff = 0;\n\n        if (desired->redBits != GLFW_DONT_CARE)\n            colorDiff += abs(current->redBits - desired->redBits);\n        if (desired->greenBits != GLFW_DONT_CARE)\n            colorDiff += abs(current->greenBits - desired->greenBits);\n        if (desired->blueBits != GLFW_DONT_CARE)\n            colorDiff += abs(current->blueBits - desired->blueBits);\n\n        sizeDiff = abs((current->width - desired->width) *\n                       (current->width - desired->width) +\n                       (current->height - desired->height) *\n                       (current->height - desired->height));\n\n        if (desired->refreshRate != GLFW_DONT_CARE)\n            rateDiff = abs(current->refreshRate - desired->refreshRate);\n        else\n            rateDiff = UINT_MAX - current->refreshRate;\n\n        if ((colorDiff < leastColorDiff) ||\n            (colorDiff == leastColorDiff && sizeDiff < leastSizeDiff) ||\n            (colorDiff == leastColorDiff && sizeDiff == leastSizeDiff && rateDiff < leastRateDiff))\n        {\n            closest = current;\n            leastSizeDiff = sizeDiff;\n            leastRateDiff = rateDiff;\n            leastColorDiff = colorDiff;\n        }\n    }\n\n    return closest;\n}\n\n// Performs lexical comparison between two @ref GLFWvidmode structures\n//\nint _glfwCompareVideoModes(const GLFWvidmode* fm, const GLFWvidmode* sm)\n{\n    return compareVideoModes(fm, sm);\n}\n\n// Splits a color depth into red, green and blue bit depths\n//\nvoid _glfwSplitBPP(int bpp, int* red, int* green, int* blue)\n{\n    int delta;\n\n    // We assume that by 32 the user really meant 24\n    if (bpp == 32)\n        bpp = 24;\n\n    // Convert \"bits per pixel\" to red, green & blue sizes\n\n    *red = *green = *blue = bpp / 3;\n    delta = bpp - (*red * 3);\n    if (delta >= 1)\n        *green = *green + 1;\n\n    if (delta == 2)\n        *red = *red + 1;\n}\n\n\n//////////////////////////////////////////////////////////////////////////\n//////                        GLFW public API                       //////\n//////////////////////////////////////////////////////////////////////////\n\nGLFWAPI GLFWmonitor** glfwGetMonitors(int* count)\n{\n    assert(count != NULL);\n\n    *count = 0;\n\n    _GLFW_REQUIRE_INIT_OR_RETURN(NULL);\n\n    *count = _glfw.monitorCount;\n    return (GLFWmonitor**) _glfw.monitors;\n}\n\nGLFWAPI GLFWmonitor* glfwGetPrimaryMonitor(void)\n{\n    _GLFW_REQUIRE_INIT_OR_RETURN(NULL);\n\n    if (!_glfw.monitorCount)\n        return NULL;\n\n    return (GLFWmonitor*) _glfw.monitors[0];\n}\n\nGLFWAPI void glfwGetMonitorPos(GLFWmonitor* handle, int* xpos, int* ypos)\n{\n    _GLFWmonitor* monitor = (_GLFWmonitor*) handle;\n    assert(monitor != NULL);\n\n    if (xpos)\n        *xpos = 0;\n    if (ypos)\n        *ypos = 0;\n\n    _GLFW_REQUIRE_INIT();\n\n    _glfwPlatformGetMonitorPos(monitor, xpos, ypos);\n}\n\nGLFWAPI void glfwGetMonitorWorkarea(GLFWmonitor* handle,\n                                    int* xpos, int* ypos,\n                                    int* width, int* height)\n{\n    _GLFWmonitor* monitor = (_GLFWmonitor*) handle;\n    assert(monitor != NULL);\n\n    if (xpos)\n        *xpos = 0;\n    if (ypos)\n        *ypos = 0;\n    if (width)\n        *width = 0;\n    if (height)\n        *height = 0;\n\n    _GLFW_REQUIRE_INIT();\n\n    _glfwPlatformGetMonitorWorkarea(monitor, xpos, ypos, width, height);\n}\n\nGLFWAPI void glfwGetMonitorPhysicalSize(GLFWmonitor* handle, int* widthMM, int* heightMM)\n{\n    _GLFWmonitor* monitor = (_GLFWmonitor*) handle;\n    assert(monitor != NULL);\n\n    if (widthMM)\n        *widthMM = 0;\n    if (heightMM)\n        *heightMM = 0;\n\n    _GLFW_REQUIRE_INIT();\n\n    if (widthMM)\n        *widthMM = monitor->widthMM;\n    if (heightMM)\n        *heightMM = monitor->heightMM;\n}\n\nGLFWAPI void glfwGetMonitorContentScale(GLFWmonitor* handle,\n                                        float* xscale, float* yscale)\n{\n    _GLFWmonitor* monitor = (_GLFWmonitor*) handle;\n    assert(monitor != NULL);\n\n    if (xscale)\n        *xscale = 0.f;\n    if (yscale)\n        *yscale = 0.f;\n\n    _GLFW_REQUIRE_INIT();\n    _glfwPlatformGetMonitorContentScale(monitor, xscale, yscale);\n}\n\nGLFWAPI const char* glfwGetMonitorName(GLFWmonitor* handle)\n{\n    _GLFWmonitor* monitor = (_GLFWmonitor*) handle;\n    assert(monitor != NULL);\n\n    _GLFW_REQUIRE_INIT_OR_RETURN(NULL);\n    return monitor->name;\n}\n\nGLFWAPI void glfwSetMonitorUserPointer(GLFWmonitor* handle, void* pointer)\n{\n    _GLFWmonitor* monitor = (_GLFWmonitor*) handle;\n    assert(monitor != NULL);\n\n    _GLFW_REQUIRE_INIT();\n    monitor->userPointer = pointer;\n}\n\nGLFWAPI void* glfwGetMonitorUserPointer(GLFWmonitor* handle)\n{\n    _GLFWmonitor* monitor = (_GLFWmonitor*) handle;\n    assert(monitor != NULL);\n\n    _GLFW_REQUIRE_INIT_OR_RETURN(NULL);\n    return monitor->userPointer;\n}\n\nGLFWAPI GLFWmonitorfun glfwSetMonitorCallback(GLFWmonitorfun cbfun)\n{\n    _GLFW_REQUIRE_INIT_OR_RETURN(NULL);\n    _GLFW_SWAP_POINTERS(_glfw.callbacks.monitor, cbfun);\n    return cbfun;\n}\n\nGLFWAPI const GLFWvidmode* glfwGetVideoModes(GLFWmonitor* handle, int* count)\n{\n    _GLFWmonitor* monitor = (_GLFWmonitor*) handle;\n    assert(monitor != NULL);\n    assert(count != NULL);\n\n    *count = 0;\n\n    _GLFW_REQUIRE_INIT_OR_RETURN(NULL);\n\n    if (!refreshVideoModes(monitor))\n        return NULL;\n\n    *count = monitor->modeCount;\n    return monitor->modes;\n}\n\nGLFWAPI const GLFWvidmode* glfwGetVideoMode(GLFWmonitor* handle)\n{\n    _GLFWmonitor* monitor = (_GLFWmonitor*) handle;\n    assert(monitor != NULL);\n\n    _GLFW_REQUIRE_INIT_OR_RETURN(NULL);\n\n    _glfwPlatformGetVideoMode(monitor, &monitor->currentMode);\n    return &monitor->currentMode;\n}\n\nGLFWAPI void glfwSetGamma(GLFWmonitor* handle, float gamma)\n{\n    unsigned int i;\n    unsigned short* values;\n    GLFWgammaramp ramp;\n    const GLFWgammaramp* original;\n    assert(handle != NULL);\n    assert(gamma > 0.f);\n    assert(gamma <= FLT_MAX);\n\n    _GLFW_REQUIRE_INIT();\n\n    if (gamma != gamma || gamma <= 0.f || gamma > FLT_MAX)\n    {\n        _glfwInputError(GLFW_INVALID_VALUE, \"Invalid gamma value %f\", gamma);\n        return;\n    }\n\n    original = glfwGetGammaRamp(handle);\n    if (!original)\n        return;\n\n    values = calloc(original->size, sizeof(unsigned short));\n\n    for (i = 0;  i < original->size;  i++)\n    {\n        float value;\n\n        // Calculate intensity\n        value = i / (float) (original->size - 1);\n        // Apply gamma curve\n        value = powf(value, 1.f / gamma) * 65535.f + 0.5f;\n        // Clamp to value range\n        value = _glfw_fminf(value, 65535.f);\n\n        values[i] = (unsigned short) value;\n    }\n\n    ramp.red = values;\n    ramp.green = values;\n    ramp.blue = values;\n    ramp.size = original->size;\n\n    glfwSetGammaRamp(handle, &ramp);\n    free(values);\n}\n\nGLFWAPI const GLFWgammaramp* glfwGetGammaRamp(GLFWmonitor* handle)\n{\n    _GLFWmonitor* monitor = (_GLFWmonitor*) handle;\n    assert(monitor != NULL);\n\n    _GLFW_REQUIRE_INIT_OR_RETURN(NULL);\n\n    _glfwFreeGammaArrays(&monitor->currentRamp);\n    if (!_glfwPlatformGetGammaRamp(monitor, &monitor->currentRamp))\n        return NULL;\n\n    return &monitor->currentRamp;\n}\n\nGLFWAPI void glfwSetGammaRamp(GLFWmonitor* handle, const GLFWgammaramp* ramp)\n{\n    _GLFWmonitor* monitor = (_GLFWmonitor*) handle;\n    assert(monitor != NULL);\n    assert(ramp != NULL);\n    assert(ramp->size > 0);\n    assert(ramp->red != NULL);\n    assert(ramp->green != NULL);\n    assert(ramp->blue != NULL);\n\n    if (ramp->size <= 0)\n    {\n        _glfwInputError(GLFW_INVALID_VALUE,\n                        \"Invalid gamma ramp size %i\",\n                        ramp->size);\n        return;\n    }\n\n    _GLFW_REQUIRE_INIT();\n\n    if (!monitor->originalRamp.size)\n    {\n        if (!_glfwPlatformGetGammaRamp(monitor, &monitor->originalRamp))\n            return;\n    }\n\n    _glfwPlatformSetGammaRamp(monitor, ramp);\n}\n\n"
  },
  {
    "path": "thirdparty/glfw/src/nsgl_context.h",
    "content": "//========================================================================\n// GLFW 3.3 macOS - www.glfw.org\n//------------------------------------------------------------------------\n// Copyright (c) 2009-2019 Camilla Löwy <elmindreda@glfw.org>\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//    claim that you wrote the original software. If you use this software\n//    in a product, an acknowledgment in the product documentation would\n//    be appreciated but is not required.\n//\n// 2. Altered source versions must be plainly marked as such, and must not\n//    be misrepresented as being the original software.\n//\n// 3. This notice may not be removed or altered from any source\n//    distribution.\n//\n//========================================================================\n\n// NOTE: Many Cocoa enum values have been renamed and we need to build across\n//       SDK versions where one is unavailable or the other deprecated\n//       We use the newer names in code and these macros to handle compatibility\n#if MAC_OS_X_VERSION_MAX_ALLOWED < 101400\n #define NSOpenGLContextParameterSwapInterval NSOpenGLCPSwapInterval\n #define NSOpenGLContextParameterSurfaceOpacity NSOpenGLCPSurfaceOpacity\n#endif\n\n#define _GLFW_PLATFORM_CONTEXT_STATE            _GLFWcontextNSGL nsgl\n#define _GLFW_PLATFORM_LIBRARY_CONTEXT_STATE    _GLFWlibraryNSGL nsgl\n\n#include <stdatomic.h>\n\n\n// NSGL-specific per-context data\n//\ntypedef struct _GLFWcontextNSGL\n{\n    id                pixelFormat;\n    id                object;\n\n} _GLFWcontextNSGL;\n\n// NSGL-specific global data\n//\ntypedef struct _GLFWlibraryNSGL\n{\n    // dlopen handle for OpenGL.framework (for glfwGetProcAddress)\n    CFBundleRef     framework;\n\n} _GLFWlibraryNSGL;\n\n\nGLFWbool _glfwInitNSGL(void);\nvoid _glfwTerminateNSGL(void);\nGLFWbool _glfwCreateContextNSGL(_GLFWwindow* window,\n                                const _GLFWctxconfig* ctxconfig,\n                                const _GLFWfbconfig* fbconfig);\nvoid _glfwDestroyContextNSGL(_GLFWwindow* window);\n\n"
  },
  {
    "path": "thirdparty/glfw/src/nsgl_context.m",
    "content": "//========================================================================\n// GLFW 3.3 macOS - www.glfw.org\n//------------------------------------------------------------------------\n// Copyright (c) 2009-2019 Camilla Löwy <elmindreda@glfw.org>\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//    claim that you wrote the original software. If you use this software\n//    in a product, an acknowledgment in the product documentation would\n//    be appreciated but is not required.\n//\n// 2. Altered source versions must be plainly marked as such, and must not\n//    be misrepresented as being the original software.\n//\n// 3. This notice may not be removed or altered from any source\n//    distribution.\n//\n//========================================================================\n// It is fine to use C99 in this file because it will not be built with VS\n//========================================================================\n\n#include \"internal.h\"\n\n#include <unistd.h>\n#include <math.h>\n\nstatic void makeContextCurrentNSGL(_GLFWwindow* window)\n{\n    @autoreleasepool {\n\n    if (window)\n        [window->context.nsgl.object makeCurrentContext];\n    else\n        [NSOpenGLContext clearCurrentContext];\n\n    _glfwPlatformSetTls(&_glfw.contextSlot, window);\n\n    } // autoreleasepool\n}\n\nstatic void swapBuffersNSGL(_GLFWwindow* window)\n{\n    @autoreleasepool {\n\n    // HACK: Simulate vsync with usleep as NSGL swap interval does not apply to\n    //       windows with a non-visible occlusion state\n    if (!([window->ns.object occlusionState] & NSWindowOcclusionStateVisible))\n    {\n        int interval = 0;\n        [window->context.nsgl.object getValues:&interval\n                                  forParameter:NSOpenGLContextParameterSwapInterval];\n\n        if (interval > 0)\n        {\n            const double framerate = 60.0;\n            const uint64_t frequency = _glfwPlatformGetTimerFrequency();\n            const uint64_t value = _glfwPlatformGetTimerValue();\n\n            const double elapsed = value / (double) frequency;\n            const double period = 1.0 / framerate;\n            const double delay = period - fmod(elapsed, period);\n\n            usleep(floorl(delay * 1e6));\n        }\n    }\n\n    [window->context.nsgl.object flushBuffer];\n\n    } // autoreleasepool\n}\n\nstatic void swapIntervalNSGL(int interval)\n{\n    @autoreleasepool {\n\n    _GLFWwindow* window = _glfwPlatformGetTls(&_glfw.contextSlot);\n    if (window)\n    {\n        [window->context.nsgl.object setValues:&interval\n                                  forParameter:NSOpenGLContextParameterSwapInterval];\n    }\n\n    } // autoreleasepool\n}\n\nstatic int extensionSupportedNSGL(const char* extension)\n{\n    // There are no NSGL extensions\n    return GLFW_FALSE;\n}\n\nstatic GLFWglproc getProcAddressNSGL(const char* procname)\n{\n    CFStringRef symbolName = CFStringCreateWithCString(kCFAllocatorDefault,\n                                                       procname,\n                                                       kCFStringEncodingASCII);\n\n    GLFWglproc symbol = CFBundleGetFunctionPointerForName(_glfw.nsgl.framework,\n                                                          symbolName);\n\n    CFRelease(symbolName);\n\n    return symbol;\n}\n\nstatic void destroyContextNSGL(_GLFWwindow* window)\n{\n    @autoreleasepool {\n\n    [window->context.nsgl.pixelFormat release];\n    window->context.nsgl.pixelFormat = nil;\n\n    [window->context.nsgl.object release];\n    window->context.nsgl.object = nil;\n\n    } // autoreleasepool\n}\n\n\n//////////////////////////////////////////////////////////////////////////\n//////                       GLFW internal API                      //////\n//////////////////////////////////////////////////////////////////////////\n\n// Initialize OpenGL support\n//\nGLFWbool _glfwInitNSGL(void)\n{\n    if (_glfw.nsgl.framework)\n        return GLFW_TRUE;\n\n    _glfw.nsgl.framework =\n        CFBundleGetBundleWithIdentifier(CFSTR(\"com.apple.opengl\"));\n    if (_glfw.nsgl.framework == NULL)\n    {\n        _glfwInputError(GLFW_API_UNAVAILABLE,\n                        \"NSGL: Failed to locate OpenGL framework\");\n        return GLFW_FALSE;\n    }\n\n    return GLFW_TRUE;\n}\n\n// Terminate OpenGL support\n//\nvoid _glfwTerminateNSGL(void)\n{\n}\n\n// Create the OpenGL context\n//\nGLFWbool _glfwCreateContextNSGL(_GLFWwindow* window,\n                                const _GLFWctxconfig* ctxconfig,\n                                const _GLFWfbconfig* fbconfig)\n{\n    if (ctxconfig->client == GLFW_OPENGL_ES_API)\n    {\n        _glfwInputError(GLFW_API_UNAVAILABLE,\n                        \"NSGL: OpenGL ES is not available on macOS\");\n        return GLFW_FALSE;\n    }\n\n    if (ctxconfig->major > 2)\n    {\n        if (ctxconfig->major == 3 && ctxconfig->minor < 2)\n        {\n            _glfwInputError(GLFW_VERSION_UNAVAILABLE,\n                            \"NSGL: The targeted version of macOS does not support OpenGL 3.0 or 3.1 but may support 3.2 and above\");\n            return GLFW_FALSE;\n        }\n\n        if (!ctxconfig->forward || ctxconfig->profile != GLFW_OPENGL_CORE_PROFILE)\n        {\n            _glfwInputError(GLFW_VERSION_UNAVAILABLE,\n                            \"NSGL: The targeted version of macOS only supports forward-compatible core profile contexts for OpenGL 3.2 and above\");\n            return GLFW_FALSE;\n        }\n    }\n\n    // Context robustness modes (GL_KHR_robustness) are not yet supported by\n    // macOS but are not a hard constraint, so ignore and continue\n\n    // Context release behaviors (GL_KHR_context_flush_control) are not yet\n    // supported by macOS but are not a hard constraint, so ignore and continue\n\n    // Debug contexts (GL_KHR_debug) are not yet supported by macOS but are not\n    // a hard constraint, so ignore and continue\n\n    // No-error contexts (GL_KHR_no_error) are not yet supported by macOS but\n    // are not a hard constraint, so ignore and continue\n\n#define addAttrib(a) \\\n{ \\\n    assert((size_t) index < sizeof(attribs) / sizeof(attribs[0])); \\\n    attribs[index++] = a; \\\n}\n#define setAttrib(a, v) { addAttrib(a); addAttrib(v); }\n\n    NSOpenGLPixelFormatAttribute attribs[40];\n    int index = 0;\n\n    addAttrib(NSOpenGLPFAAccelerated);\n    addAttrib(NSOpenGLPFAClosestPolicy);\n\n    if (ctxconfig->nsgl.offline)\n    {\n        addAttrib(NSOpenGLPFAAllowOfflineRenderers);\n        // NOTE: This replaces the NSSupportsAutomaticGraphicsSwitching key in\n        //       Info.plist for unbundled applications\n        // HACK: This assumes that NSOpenGLPixelFormat will remain\n        //       a straightforward wrapper of its CGL counterpart\n        addAttrib(kCGLPFASupportsAutomaticGraphicsSwitching);\n    }\n\n#if MAC_OS_X_VERSION_MAX_ALLOWED >= 101000\n    if (ctxconfig->major >= 4)\n    {\n        setAttrib(NSOpenGLPFAOpenGLProfile, NSOpenGLProfileVersion4_1Core);\n    }\n    else\n#endif /*MAC_OS_X_VERSION_MAX_ALLOWED*/\n    if (ctxconfig->major >= 3)\n    {\n        setAttrib(NSOpenGLPFAOpenGLProfile, NSOpenGLProfileVersion3_2Core);\n    }\n\n    if (ctxconfig->major <= 2)\n    {\n        if (fbconfig->auxBuffers != GLFW_DONT_CARE)\n            setAttrib(NSOpenGLPFAAuxBuffers, fbconfig->auxBuffers);\n\n        if (fbconfig->accumRedBits != GLFW_DONT_CARE &&\n            fbconfig->accumGreenBits != GLFW_DONT_CARE &&\n            fbconfig->accumBlueBits != GLFW_DONT_CARE &&\n            fbconfig->accumAlphaBits != GLFW_DONT_CARE)\n        {\n            const int accumBits = fbconfig->accumRedBits +\n                                  fbconfig->accumGreenBits +\n                                  fbconfig->accumBlueBits +\n                                  fbconfig->accumAlphaBits;\n\n            setAttrib(NSOpenGLPFAAccumSize, accumBits);\n        }\n    }\n\n    if (fbconfig->redBits != GLFW_DONT_CARE &&\n        fbconfig->greenBits != GLFW_DONT_CARE &&\n        fbconfig->blueBits != GLFW_DONT_CARE)\n    {\n        int colorBits = fbconfig->redBits +\n                        fbconfig->greenBits +\n                        fbconfig->blueBits;\n\n        // macOS needs non-zero color size, so set reasonable values\n        if (colorBits == 0)\n            colorBits = 24;\n        else if (colorBits < 15)\n            colorBits = 15;\n\n        setAttrib(NSOpenGLPFAColorSize, colorBits);\n    }\n\n    if (fbconfig->alphaBits != GLFW_DONT_CARE)\n        setAttrib(NSOpenGLPFAAlphaSize, fbconfig->alphaBits);\n\n    if (fbconfig->depthBits != GLFW_DONT_CARE)\n        setAttrib(NSOpenGLPFADepthSize, fbconfig->depthBits);\n\n    if (fbconfig->stencilBits != GLFW_DONT_CARE)\n        setAttrib(NSOpenGLPFAStencilSize, fbconfig->stencilBits);\n\n    if (fbconfig->stereo)\n    {\n#if MAC_OS_X_VERSION_MAX_ALLOWED >= 101200\n        _glfwInputError(GLFW_FORMAT_UNAVAILABLE,\n                        \"NSGL: Stereo rendering is deprecated\");\n        return GLFW_FALSE;\n#else\n        addAttrib(NSOpenGLPFAStereo);\n#endif\n    }\n\n    if (fbconfig->doublebuffer)\n        addAttrib(NSOpenGLPFADoubleBuffer);\n\n    if (fbconfig->samples != GLFW_DONT_CARE)\n    {\n        if (fbconfig->samples == 0)\n        {\n            setAttrib(NSOpenGLPFASampleBuffers, 0);\n        }\n        else\n        {\n            setAttrib(NSOpenGLPFASampleBuffers, 1);\n            setAttrib(NSOpenGLPFASamples, fbconfig->samples);\n        }\n    }\n\n    // NOTE: All NSOpenGLPixelFormats on the relevant cards support sRGB\n    //       framebuffer, so there's no need (and no way) to request it\n\n    addAttrib(0);\n\n#undef addAttrib\n#undef setAttrib\n\n    window->context.nsgl.pixelFormat =\n        [[NSOpenGLPixelFormat alloc] initWithAttributes:attribs];\n    if (window->context.nsgl.pixelFormat == nil)\n    {\n        _glfwInputError(GLFW_FORMAT_UNAVAILABLE,\n                        \"NSGL: Failed to find a suitable pixel format\");\n        return GLFW_FALSE;\n    }\n\n    NSOpenGLContext* share = nil;\n\n    if (ctxconfig->share)\n        share = ctxconfig->share->context.nsgl.object;\n\n    window->context.nsgl.object =\n        [[NSOpenGLContext alloc] initWithFormat:window->context.nsgl.pixelFormat\n                                   shareContext:share];\n    if (window->context.nsgl.object == nil)\n    {\n        _glfwInputError(GLFW_VERSION_UNAVAILABLE,\n                        \"NSGL: Failed to create OpenGL context\");\n        return GLFW_FALSE;\n    }\n\n    if (fbconfig->transparent)\n    {\n        GLint opaque = 0;\n        [window->context.nsgl.object setValues:&opaque\n                                  forParameter:NSOpenGLContextParameterSurfaceOpacity];\n    }\n\n    [window->ns.view setWantsBestResolutionOpenGLSurface:window->ns.retina];\n\n    [window->context.nsgl.object setView:window->ns.view];\n\n    window->context.makeCurrent = makeContextCurrentNSGL;\n    window->context.swapBuffers = swapBuffersNSGL;\n    window->context.swapInterval = swapIntervalNSGL;\n    window->context.extensionSupported = extensionSupportedNSGL;\n    window->context.getProcAddress = getProcAddressNSGL;\n    window->context.destroy = destroyContextNSGL;\n\n    return GLFW_TRUE;\n}\n\n\n//////////////////////////////////////////////////////////////////////////\n//////                        GLFW native API                       //////\n//////////////////////////////////////////////////////////////////////////\n\nGLFWAPI id glfwGetNSGLContext(GLFWwindow* handle)\n{\n    _GLFWwindow* window = (_GLFWwindow*) handle;\n    _GLFW_REQUIRE_INIT_OR_RETURN(nil);\n\n    if (window->context.client == GLFW_NO_API)\n    {\n        _glfwInputError(GLFW_NO_WINDOW_CONTEXT, NULL);\n        return nil;\n    }\n\n    return window->context.nsgl.object;\n}\n\n"
  },
  {
    "path": "thirdparty/glfw/src/null_init.c",
    "content": "//========================================================================\n// GLFW 3.3 - www.glfw.org\n//------------------------------------------------------------------------\n// Copyright (c) 2016 Google Inc.\n// Copyright (c) 2016-2017 Camilla Löwy <elmindreda@glfw.org>\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//    claim that you wrote the original software. If you use this software\n//    in a product, an acknowledgment in the product documentation would\n//    be appreciated but is not required.\n//\n// 2. Altered source versions must be plainly marked as such, and must not\n//    be misrepresented as being the original software.\n//\n// 3. This notice may not be removed or altered from any source\n//    distribution.\n//\n//========================================================================\n// It is fine to use C99 in this file because it will not be built with VS\n//========================================================================\n\n#include \"internal.h\"\n\n\n//////////////////////////////////////////////////////////////////////////\n//////                       GLFW platform API                      //////\n//////////////////////////////////////////////////////////////////////////\n\nint _glfwPlatformInit(void)\n{\n    _glfwInitTimerPOSIX();\n    return GLFW_TRUE;\n}\n\nvoid _glfwPlatformTerminate(void)\n{\n    _glfwTerminateOSMesa();\n}\n\nconst char* _glfwPlatformGetVersionString(void)\n{\n    return _GLFW_VERSION_NUMBER \" null OSMesa\";\n}\n\n"
  },
  {
    "path": "thirdparty/glfw/src/null_joystick.c",
    "content": "//========================================================================\n// GLFW 3.3 - www.glfw.org\n//------------------------------------------------------------------------\n// Copyright (c) 2016-2017 Camilla Löwy <elmindreda@glfw.org>\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//    claim that you wrote the original software. If you use this software\n//    in a product, an acknowledgment in the product documentation would\n//    be appreciated but is not required.\n//\n// 2. Altered source versions must be plainly marked as such, and must not\n//    be misrepresented as being the original software.\n//\n// 3. This notice may not be removed or altered from any source\n//    distribution.\n//\n//========================================================================\n// It is fine to use C99 in this file because it will not be built with VS\n//========================================================================\n\n#include \"internal.h\"\n\n\n//////////////////////////////////////////////////////////////////////////\n//////                       GLFW platform API                      //////\n//////////////////////////////////////////////////////////////////////////\n\nint _glfwPlatformPollJoystick(_GLFWjoystick* js, int mode)\n{\n    return GLFW_FALSE;\n}\n\nvoid _glfwPlatformUpdateGamepadGUID(char* guid)\n{\n}\n\n"
  },
  {
    "path": "thirdparty/glfw/src/null_joystick.h",
    "content": "//========================================================================\n// GLFW 3.3 - www.glfw.org\n//------------------------------------------------------------------------\n// Copyright (c) 2006-2017 Camilla Löwy <elmindreda@glfw.org>\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//    claim that you wrote the original software. If you use this software\n//    in a product, an acknowledgment in the product documentation would\n//    be appreciated but is not required.\n//\n// 2. Altered source versions must be plainly marked as such, and must not\n//    be misrepresented as being the original software.\n//\n// 3. This notice may not be removed or altered from any source\n//    distribution.\n//\n//========================================================================\n\n#define _GLFW_PLATFORM_JOYSTICK_STATE         struct { int dummyJoystick; }\n#define _GLFW_PLATFORM_LIBRARY_JOYSTICK_STATE struct { int dummyLibraryJoystick; }\n\n#define _GLFW_PLATFORM_MAPPING_NAME \"\"\n\n"
  },
  {
    "path": "thirdparty/glfw/src/null_monitor.c",
    "content": "//========================================================================\n// GLFW 3.3 - www.glfw.org\n//------------------------------------------------------------------------\n// Copyright (c) 2016 Google Inc.\n// Copyright (c) 2016-2019 Camilla Löwy <elmindreda@glfw.org>\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//    claim that you wrote the original software. If you use this software\n//    in a product, an acknowledgment in the product documentation would\n//    be appreciated but is not required.\n//\n// 2. Altered source versions must be plainly marked as such, and must not\n//    be misrepresented as being the original software.\n//\n// 3. This notice may not be removed or altered from any source\n//    distribution.\n//\n//========================================================================\n// It is fine to use C99 in this file because it will not be built with VS\n//========================================================================\n\n#include \"internal.h\"\n\n\n//////////////////////////////////////////////////////////////////////////\n//////                       GLFW platform API                      //////\n//////////////////////////////////////////////////////////////////////////\n\nvoid _glfwPlatformFreeMonitor(_GLFWmonitor* monitor)\n{\n}\n\nvoid _glfwPlatformGetMonitorPos(_GLFWmonitor* monitor, int* xpos, int* ypos)\n{\n}\n\nvoid _glfwPlatformGetMonitorContentScale(_GLFWmonitor* monitor,\n                                         float* xscale, float* yscale)\n{\n    if (xscale)\n        *xscale = 1.f;\n    if (yscale)\n        *yscale = 1.f;\n}\n\nvoid _glfwPlatformGetMonitorWorkarea(_GLFWmonitor* monitor,\n                                     int* xpos, int* ypos,\n                                     int* width, int* height)\n{\n}\n\nGLFWvidmode* _glfwPlatformGetVideoModes(_GLFWmonitor* monitor, int* found)\n{\n    return NULL;\n}\n\nvoid _glfwPlatformGetVideoMode(_GLFWmonitor* monitor, GLFWvidmode* mode)\n{\n}\n\nGLFWbool _glfwPlatformGetGammaRamp(_GLFWmonitor* monitor, GLFWgammaramp* ramp)\n{\n    return GLFW_FALSE;\n}\n\nvoid _glfwPlatformSetGammaRamp(_GLFWmonitor* monitor, const GLFWgammaramp* ramp)\n{\n}\n\n"
  },
  {
    "path": "thirdparty/glfw/src/null_platform.h",
    "content": "//========================================================================\n// GLFW 3.3 - www.glfw.org\n//------------------------------------------------------------------------\n// Copyright (c) 2016 Google Inc.\n// Copyright (c) 2016-2017 Camilla Löwy <elmindreda@glfw.org>\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//    claim that you wrote the original software. If you use this software\n//    in a product, an acknowledgment in the product documentation would\n//    be appreciated but is not required.\n//\n// 2. Altered source versions must be plainly marked as such, and must not\n//    be misrepresented as being the original software.\n//\n// 3. This notice may not be removed or altered from any source\n//    distribution.\n//\n//========================================================================\n\n#include <dlfcn.h>\n\n#define _GLFW_PLATFORM_WINDOW_STATE _GLFWwindowNull null\n\n#define _GLFW_PLATFORM_CONTEXT_STATE         struct { int dummyContext; }\n#define _GLFW_PLATFORM_MONITOR_STATE         struct { int dummyMonitor; }\n#define _GLFW_PLATFORM_CURSOR_STATE          struct { int dummyCursor; }\n#define _GLFW_PLATFORM_LIBRARY_WINDOW_STATE  struct { int dummyLibraryWindow; }\n#define _GLFW_PLATFORM_LIBRARY_CONTEXT_STATE struct { int dummyLibraryContext; }\n#define _GLFW_EGL_CONTEXT_STATE              struct { int dummyEGLContext; }\n#define _GLFW_EGL_LIBRARY_CONTEXT_STATE      struct { int dummyEGLLibraryContext; }\n\n#include \"osmesa_context.h\"\n#include \"posix_time.h\"\n#include \"posix_thread.h\"\n#include \"null_joystick.h\"\n\n#if defined(_GLFW_WIN32)\n #define _glfw_dlopen(name) LoadLibraryA(name)\n #define _glfw_dlclose(handle) FreeLibrary((HMODULE) handle)\n #define _glfw_dlsym(handle, name) GetProcAddress((HMODULE) handle, name)\n#else\n #define _glfw_dlopen(name) dlopen(name, RTLD_LAZY | RTLD_LOCAL)\n #define _glfw_dlclose(handle) dlclose(handle)\n #define _glfw_dlsym(handle, name) dlsym(handle, name)\n#endif\n\n// Null-specific per-window data\n//\ntypedef struct _GLFWwindowNull\n{\n    int width;\n    int height;\n} _GLFWwindowNull;\n\n"
  },
  {
    "path": "thirdparty/glfw/src/null_window.c",
    "content": "//========================================================================\n// GLFW 3.3 - www.glfw.org\n//------------------------------------------------------------------------\n// Copyright (c) 2016 Google Inc.\n// Copyright (c) 2016-2019 Camilla Löwy <elmindreda@glfw.org>\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//    claim that you wrote the original software. If you use this software\n//    in a product, an acknowledgment in the product documentation would\n//    be appreciated but is not required.\n//\n// 2. Altered source versions must be plainly marked as such, and must not\n//    be misrepresented as being the original software.\n//\n// 3. This notice may not be removed or altered from any source\n//    distribution.\n//\n//========================================================================\n// It is fine to use C99 in this file because it will not be built with VS\n//========================================================================\n\n#include \"internal.h\"\n\n\nstatic int createNativeWindow(_GLFWwindow* window,\n                              const _GLFWwndconfig* wndconfig)\n{\n    window->null.width = wndconfig->width;\n    window->null.height = wndconfig->height;\n\n    return GLFW_TRUE;\n}\n\n\n//////////////////////////////////////////////////////////////////////////\n//////                       GLFW platform API                      //////\n//////////////////////////////////////////////////////////////////////////\n\nint _glfwPlatformCreateWindow(_GLFWwindow* window,\n                              const _GLFWwndconfig* wndconfig,\n                              const _GLFWctxconfig* ctxconfig,\n                              const _GLFWfbconfig* fbconfig)\n{\n    if (!createNativeWindow(window, wndconfig))\n        return GLFW_FALSE;\n\n    if (ctxconfig->client != GLFW_NO_API)\n    {\n        if (ctxconfig->source == GLFW_NATIVE_CONTEXT_API ||\n            ctxconfig->source == GLFW_OSMESA_CONTEXT_API)\n        {\n            if (!_glfwInitOSMesa())\n                return GLFW_FALSE;\n            if (!_glfwCreateContextOSMesa(window, ctxconfig, fbconfig))\n                return GLFW_FALSE;\n        }\n        else\n        {\n            _glfwInputError(GLFW_API_UNAVAILABLE, \"Null: EGL not available\");\n            return GLFW_FALSE;\n        }\n    }\n\n    return GLFW_TRUE;\n}\n\nvoid _glfwPlatformDestroyWindow(_GLFWwindow* window)\n{\n    if (window->context.destroy)\n        window->context.destroy(window);\n}\n\nvoid _glfwPlatformSetWindowTitle(_GLFWwindow* window, const char* title)\n{\n}\n\nvoid _glfwPlatformSetWindowIcon(_GLFWwindow* window, int count,\n                                const GLFWimage* images)\n{\n}\n\nvoid _glfwPlatformSetWindowMonitor(_GLFWwindow* window,\n                                   _GLFWmonitor* monitor,\n                                   int xpos, int ypos,\n                                   int width, int height,\n                                   int refreshRate)\n{\n}\n\nvoid _glfwPlatformGetWindowPos(_GLFWwindow* window, int* xpos, int* ypos)\n{\n}\n\nvoid _glfwPlatformSetWindowPos(_GLFWwindow* window, int xpos, int ypos)\n{\n}\n\nvoid _glfwPlatformGetWindowSize(_GLFWwindow* window, int* width, int* height)\n{\n    if (width)\n        *width = window->null.width;\n    if (height)\n        *height = window->null.height;\n}\n\nvoid _glfwPlatformSetWindowSize(_GLFWwindow* window, int width, int height)\n{\n    window->null.width = width;\n    window->null.height = height;\n}\n\nvoid _glfwPlatformSetWindowSizeLimits(_GLFWwindow* window,\n                                      int minwidth, int minheight,\n                                      int maxwidth, int maxheight)\n{\n}\n\nvoid _glfwPlatformSetWindowAspectRatio(_GLFWwindow* window, int n, int d)\n{\n}\n\nvoid _glfwPlatformGetFramebufferSize(_GLFWwindow* window, int* width, int* height)\n{\n    if (width)\n        *width = window->null.width;\n    if (height)\n        *height = window->null.height;\n}\n\nvoid _glfwPlatformGetWindowFrameSize(_GLFWwindow* window,\n                                     int* left, int* top,\n                                     int* right, int* bottom)\n{\n}\n\nvoid _glfwPlatformGetWindowContentScale(_GLFWwindow* window,\n                                        float* xscale, float* yscale)\n{\n    if (xscale)\n        *xscale = 1.f;\n    if (yscale)\n        *yscale = 1.f;\n}\n\nvoid _glfwPlatformIconifyWindow(_GLFWwindow* window)\n{\n}\n\nvoid _glfwPlatformRestoreWindow(_GLFWwindow* window)\n{\n}\n\nvoid _glfwPlatformMaximizeWindow(_GLFWwindow* window)\n{\n}\n\nint _glfwPlatformWindowMaximized(_GLFWwindow* window)\n{\n    return GLFW_FALSE;\n}\n\nint _glfwPlatformWindowHovered(_GLFWwindow* window)\n{\n    return GLFW_FALSE;\n}\n\nint _glfwPlatformFramebufferTransparent(_GLFWwindow* window)\n{\n    return GLFW_FALSE;\n}\n\nvoid _glfwPlatformSetWindowResizable(_GLFWwindow* window, GLFWbool enabled)\n{\n}\n\nvoid _glfwPlatformSetWindowDecorated(_GLFWwindow* window, GLFWbool enabled)\n{\n}\n\nvoid _glfwPlatformSetWindowFloating(_GLFWwindow* window, GLFWbool enabled)\n{\n}\n\nfloat _glfwPlatformGetWindowOpacity(_GLFWwindow* window)\n{\n    return 1.f;\n}\n\nvoid _glfwPlatformSetWindowOpacity(_GLFWwindow* window, float opacity)\n{\n}\n\nvoid _glfwPlatformSetRawMouseMotion(_GLFWwindow *window, GLFWbool enabled)\n{\n}\n\nGLFWbool _glfwPlatformRawMouseMotionSupported(void)\n{\n    return GLFW_FALSE;\n}\n\nvoid _glfwPlatformShowWindow(_GLFWwindow* window)\n{\n}\n\n\nvoid _glfwPlatformRequestWindowAttention(_GLFWwindow* window)\n{\n}\n\nvoid _glfwPlatformUnhideWindow(_GLFWwindow* window)\n{\n}\n\nvoid _glfwPlatformHideWindow(_GLFWwindow* window)\n{\n}\n\nvoid _glfwPlatformFocusWindow(_GLFWwindow* window)\n{\n}\n\nint _glfwPlatformWindowFocused(_GLFWwindow* window)\n{\n    return GLFW_FALSE;\n}\n\nint _glfwPlatformWindowIconified(_GLFWwindow* window)\n{\n    return GLFW_FALSE;\n}\n\nint _glfwPlatformWindowVisible(_GLFWwindow* window)\n{\n    return GLFW_FALSE;\n}\n\nvoid _glfwPlatformPollEvents(void)\n{\n}\n\nvoid _glfwPlatformWaitEvents(void)\n{\n}\n\nvoid _glfwPlatformWaitEventsTimeout(double timeout)\n{\n}\n\nvoid _glfwPlatformPostEmptyEvent(void)\n{\n}\n\nvoid _glfwPlatformGetCursorPos(_GLFWwindow* window, double* xpos, double* ypos)\n{\n}\n\nvoid _glfwPlatformSetCursorPos(_GLFWwindow* window, double x, double y)\n{\n}\n\nvoid _glfwPlatformSetCursorMode(_GLFWwindow* window, int mode)\n{\n}\n\nint _glfwPlatformCreateCursor(_GLFWcursor* cursor,\n                              const GLFWimage* image,\n                              int xhot, int yhot)\n{\n    return GLFW_TRUE;\n}\n\nint _glfwPlatformCreateStandardCursor(_GLFWcursor* cursor, int shape)\n{\n    return GLFW_TRUE;\n}\n\nvoid _glfwPlatformDestroyCursor(_GLFWcursor* cursor)\n{\n}\n\nvoid _glfwPlatformSetCursor(_GLFWwindow* window, _GLFWcursor* cursor)\n{\n}\n\nvoid _glfwPlatformSetClipboardString(const char* string)\n{\n}\n\nconst char* _glfwPlatformGetClipboardString(void)\n{\n    return NULL;\n}\n\nconst char* _glfwPlatformGetScancodeName(int scancode)\n{\n    return \"\";\n}\n\nint _glfwPlatformGetKeyScancode(int key)\n{\n    return -1;\n}\n\nvoid _glfwPlatformGetRequiredInstanceExtensions(char** extensions)\n{\n}\n\nint _glfwPlatformGetPhysicalDevicePresentationSupport(VkInstance instance,\n                                                      VkPhysicalDevice device,\n                                                      uint32_t queuefamily)\n{\n    return GLFW_FALSE;\n}\n\nVkResult _glfwPlatformCreateWindowSurface(VkInstance instance,\n                                          _GLFWwindow* window,\n                                          const VkAllocationCallbacks* allocator,\n                                          VkSurfaceKHR* surface)\n{\n    // This seems like the most appropriate error to return here\n    return VK_ERROR_INITIALIZATION_FAILED;\n}\n\n"
  },
  {
    "path": "thirdparty/glfw/src/osmesa_context.c",
    "content": "//========================================================================\n// GLFW 3.3 OSMesa - www.glfw.org\n//------------------------------------------------------------------------\n// Copyright (c) 2016 Google Inc.\n// Copyright (c) 2016-2017 Camilla Löwy <elmindreda@glfw.org>\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//    claim that you wrote the original software. If you use this software\n//    in a product, an acknowledgment in the product documentation would\n//    be appreciated but is not required.\n//\n// 2. Altered source versions must be plainly marked as such, and must not\n//    be misrepresented as being the original software.\n//\n// 3. This notice may not be removed or altered from any source\n//    distribution.\n//\n//========================================================================\n// Please use C89 style variable declarations in this file because VS 2010\n//========================================================================\n\n#include <stdlib.h>\n#include <string.h>\n#include <assert.h>\n\n#include \"internal.h\"\n\n\nstatic void makeContextCurrentOSMesa(_GLFWwindow* window)\n{\n    if (window)\n    {\n        int width, height;\n        _glfwPlatformGetFramebufferSize(window, &width, &height);\n\n        // Check to see if we need to allocate a new buffer\n        if ((window->context.osmesa.buffer == NULL) ||\n            (width != window->context.osmesa.width) ||\n            (height != window->context.osmesa.height))\n        {\n            free(window->context.osmesa.buffer);\n\n            // Allocate the new buffer (width * height * 8-bit RGBA)\n            window->context.osmesa.buffer = calloc(4, (size_t) width * height);\n            window->context.osmesa.width  = width;\n            window->context.osmesa.height = height;\n        }\n\n        if (!OSMesaMakeCurrent(window->context.osmesa.handle,\n                               window->context.osmesa.buffer,\n                               GL_UNSIGNED_BYTE,\n                               width, height))\n        {\n            _glfwInputError(GLFW_PLATFORM_ERROR,\n                            \"OSMesa: Failed to make context current\");\n            return;\n        }\n    }\n\n    _glfwPlatformSetTls(&_glfw.contextSlot, window);\n}\n\nstatic GLFWglproc getProcAddressOSMesa(const char* procname)\n{\n    return (GLFWglproc) OSMesaGetProcAddress(procname);\n}\n\nstatic void destroyContextOSMesa(_GLFWwindow* window)\n{\n    if (window->context.osmesa.handle)\n    {\n        OSMesaDestroyContext(window->context.osmesa.handle);\n        window->context.osmesa.handle = NULL;\n    }\n\n    if (window->context.osmesa.buffer)\n    {\n        free(window->context.osmesa.buffer);\n        window->context.osmesa.width = 0;\n        window->context.osmesa.height = 0;\n    }\n}\n\nstatic void swapBuffersOSMesa(_GLFWwindow* window)\n{\n    // No double buffering on OSMesa\n}\n\nstatic void swapIntervalOSMesa(int interval)\n{\n    // No swap interval on OSMesa\n}\n\nstatic int extensionSupportedOSMesa(const char* extension)\n{\n    // OSMesa does not have extensions\n    return GLFW_FALSE;\n}\n\n\n//////////////////////////////////////////////////////////////////////////\n//////                       GLFW internal API                      //////\n//////////////////////////////////////////////////////////////////////////\n\nGLFWbool _glfwInitOSMesa(void)\n{\n    int i;\n    const char* sonames[] =\n    {\n#if defined(_GLFW_OSMESA_LIBRARY)\n        _GLFW_OSMESA_LIBRARY,\n#elif defined(_WIN32)\n        \"libOSMesa.dll\",\n        \"OSMesa.dll\",\n#elif defined(__APPLE__)\n        \"libOSMesa.8.dylib\",\n#elif defined(__CYGWIN__)\n        \"libOSMesa-8.so\",\n#else\n        \"libOSMesa.so.8\",\n        \"libOSMesa.so.6\",\n#endif\n        NULL\n    };\n\n    if (_glfw.osmesa.handle)\n        return GLFW_TRUE;\n\n    for (i = 0;  sonames[i];  i++)\n    {\n        _glfw.osmesa.handle = _glfw_dlopen(sonames[i]);\n        if (_glfw.osmesa.handle)\n            break;\n    }\n\n    if (!_glfw.osmesa.handle)\n    {\n        _glfwInputError(GLFW_API_UNAVAILABLE, \"OSMesa: Library not found\");\n        return GLFW_FALSE;\n    }\n\n    _glfw.osmesa.CreateContextExt = (PFN_OSMesaCreateContextExt)\n        _glfw_dlsym(_glfw.osmesa.handle, \"OSMesaCreateContextExt\");\n    _glfw.osmesa.CreateContextAttribs = (PFN_OSMesaCreateContextAttribs)\n        _glfw_dlsym(_glfw.osmesa.handle, \"OSMesaCreateContextAttribs\");\n    _glfw.osmesa.DestroyContext = (PFN_OSMesaDestroyContext)\n        _glfw_dlsym(_glfw.osmesa.handle, \"OSMesaDestroyContext\");\n    _glfw.osmesa.MakeCurrent = (PFN_OSMesaMakeCurrent)\n        _glfw_dlsym(_glfw.osmesa.handle, \"OSMesaMakeCurrent\");\n    _glfw.osmesa.GetColorBuffer = (PFN_OSMesaGetColorBuffer)\n        _glfw_dlsym(_glfw.osmesa.handle, \"OSMesaGetColorBuffer\");\n    _glfw.osmesa.GetDepthBuffer = (PFN_OSMesaGetDepthBuffer)\n        _glfw_dlsym(_glfw.osmesa.handle, \"OSMesaGetDepthBuffer\");\n    _glfw.osmesa.GetProcAddress = (PFN_OSMesaGetProcAddress)\n        _glfw_dlsym(_glfw.osmesa.handle, \"OSMesaGetProcAddress\");\n\n    if (!_glfw.osmesa.CreateContextExt ||\n        !_glfw.osmesa.DestroyContext ||\n        !_glfw.osmesa.MakeCurrent ||\n        !_glfw.osmesa.GetColorBuffer ||\n        !_glfw.osmesa.GetDepthBuffer ||\n        !_glfw.osmesa.GetProcAddress)\n    {\n        _glfwInputError(GLFW_PLATFORM_ERROR,\n                        \"OSMesa: Failed to load required entry points\");\n\n        _glfwTerminateOSMesa();\n        return GLFW_FALSE;\n    }\n\n    return GLFW_TRUE;\n}\n\nvoid _glfwTerminateOSMesa(void)\n{\n    if (_glfw.osmesa.handle)\n    {\n        _glfw_dlclose(_glfw.osmesa.handle);\n        _glfw.osmesa.handle = NULL;\n    }\n}\n\n#define setAttrib(a, v) \\\n{ \\\n    assert(((size_t) index + 1) < sizeof(attribs) / sizeof(attribs[0])); \\\n    attribs[index++] = a; \\\n    attribs[index++] = v; \\\n}\n\nGLFWbool _glfwCreateContextOSMesa(_GLFWwindow* window,\n                                  const _GLFWctxconfig* ctxconfig,\n                                  const _GLFWfbconfig* fbconfig)\n{\n    OSMesaContext share = NULL;\n    const int accumBits = fbconfig->accumRedBits +\n                          fbconfig->accumGreenBits +\n                          fbconfig->accumBlueBits +\n                          fbconfig->accumAlphaBits;\n\n    if (ctxconfig->client == GLFW_OPENGL_ES_API)\n    {\n        _glfwInputError(GLFW_API_UNAVAILABLE,\n                        \"OSMesa: OpenGL ES is not available on OSMesa\");\n        return GLFW_FALSE;\n    }\n\n    if (ctxconfig->share)\n        share = ctxconfig->share->context.osmesa.handle;\n\n    if (OSMesaCreateContextAttribs)\n    {\n        int index = 0, attribs[40];\n\n        setAttrib(OSMESA_FORMAT, OSMESA_RGBA);\n        setAttrib(OSMESA_DEPTH_BITS, fbconfig->depthBits);\n        setAttrib(OSMESA_STENCIL_BITS, fbconfig->stencilBits);\n        setAttrib(OSMESA_ACCUM_BITS, accumBits);\n\n        if (ctxconfig->profile == GLFW_OPENGL_CORE_PROFILE)\n        {\n            setAttrib(OSMESA_PROFILE, OSMESA_CORE_PROFILE);\n        }\n        else if (ctxconfig->profile == GLFW_OPENGL_COMPAT_PROFILE)\n        {\n            setAttrib(OSMESA_PROFILE, OSMESA_COMPAT_PROFILE);\n        }\n\n        if (ctxconfig->major != 1 || ctxconfig->minor != 0)\n        {\n            setAttrib(OSMESA_CONTEXT_MAJOR_VERSION, ctxconfig->major);\n            setAttrib(OSMESA_CONTEXT_MINOR_VERSION, ctxconfig->minor);\n        }\n\n        if (ctxconfig->forward)\n        {\n            _glfwInputError(GLFW_VERSION_UNAVAILABLE,\n                            \"OSMesa: Forward-compatible contexts not supported\");\n            return GLFW_FALSE;\n        }\n\n        setAttrib(0, 0);\n\n        window->context.osmesa.handle =\n            OSMesaCreateContextAttribs(attribs, share);\n    }\n    else\n    {\n        if (ctxconfig->profile)\n        {\n            _glfwInputError(GLFW_VERSION_UNAVAILABLE,\n                            \"OSMesa: OpenGL profiles unavailable\");\n            return GLFW_FALSE;\n        }\n\n        window->context.osmesa.handle =\n            OSMesaCreateContextExt(OSMESA_RGBA,\n                                   fbconfig->depthBits,\n                                   fbconfig->stencilBits,\n                                   accumBits,\n                                   share);\n    }\n\n    if (window->context.osmesa.handle == NULL)\n    {\n        _glfwInputError(GLFW_VERSION_UNAVAILABLE,\n                        \"OSMesa: Failed to create context\");\n        return GLFW_FALSE;\n    }\n\n    window->context.makeCurrent = makeContextCurrentOSMesa;\n    window->context.swapBuffers = swapBuffersOSMesa;\n    window->context.swapInterval = swapIntervalOSMesa;\n    window->context.extensionSupported = extensionSupportedOSMesa;\n    window->context.getProcAddress = getProcAddressOSMesa;\n    window->context.destroy = destroyContextOSMesa;\n\n    return GLFW_TRUE;\n}\n\n#undef setAttrib\n\n\n//////////////////////////////////////////////////////////////////////////\n//////                        GLFW native API                       //////\n//////////////////////////////////////////////////////////////////////////\n\nGLFWAPI int glfwGetOSMesaColorBuffer(GLFWwindow* handle, int* width,\n                                     int* height, int* format, void** buffer)\n{\n    void* mesaBuffer;\n    GLint mesaWidth, mesaHeight, mesaFormat;\n    _GLFWwindow* window = (_GLFWwindow*) handle;\n    assert(window != NULL);\n\n    _GLFW_REQUIRE_INIT_OR_RETURN(GLFW_FALSE);\n\n    if (!OSMesaGetColorBuffer(window->context.osmesa.handle,\n                              &mesaWidth, &mesaHeight,\n                              &mesaFormat, &mesaBuffer))\n    {\n        _glfwInputError(GLFW_PLATFORM_ERROR,\n                        \"OSMesa: Failed to retrieve color buffer\");\n        return GLFW_FALSE;\n    }\n\n    if (width)\n        *width = mesaWidth;\n    if (height)\n        *height = mesaHeight;\n    if (format)\n        *format = mesaFormat;\n    if (buffer)\n        *buffer = mesaBuffer;\n\n    return GLFW_TRUE;\n}\n\nGLFWAPI int glfwGetOSMesaDepthBuffer(GLFWwindow* handle,\n                                     int* width, int* height,\n                                     int* bytesPerValue,\n                                     void** buffer)\n{\n    void* mesaBuffer;\n    GLint mesaWidth, mesaHeight, mesaBytes;\n    _GLFWwindow* window = (_GLFWwindow*) handle;\n    assert(window != NULL);\n\n    _GLFW_REQUIRE_INIT_OR_RETURN(GLFW_FALSE);\n\n    if (!OSMesaGetDepthBuffer(window->context.osmesa.handle,\n                              &mesaWidth, &mesaHeight,\n                              &mesaBytes, &mesaBuffer))\n    {\n        _glfwInputError(GLFW_PLATFORM_ERROR,\n                        \"OSMesa: Failed to retrieve depth buffer\");\n        return GLFW_FALSE;\n    }\n\n    if (width)\n        *width = mesaWidth;\n    if (height)\n        *height = mesaHeight;\n    if (bytesPerValue)\n        *bytesPerValue = mesaBytes;\n    if (buffer)\n        *buffer = mesaBuffer;\n\n    return GLFW_TRUE;\n}\n\nGLFWAPI OSMesaContext glfwGetOSMesaContext(GLFWwindow* handle)\n{\n    _GLFWwindow* window = (_GLFWwindow*) handle;\n    _GLFW_REQUIRE_INIT_OR_RETURN(NULL);\n\n    if (window->context.client == GLFW_NO_API)\n    {\n        _glfwInputError(GLFW_NO_WINDOW_CONTEXT, NULL);\n        return NULL;\n    }\n\n    return window->context.osmesa.handle;\n}\n\n"
  },
  {
    "path": "thirdparty/glfw/src/osmesa_context.h",
    "content": "//========================================================================\n// GLFW 3.3 OSMesa - www.glfw.org\n//------------------------------------------------------------------------\n// Copyright (c) 2016 Google Inc.\n// Copyright (c) 2016-2017 Camilla Löwy <elmindreda@glfw.org>\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//    claim that you wrote the original software. If you use this software\n//    in a product, an acknowledgment in the product documentation would\n//    be appreciated but is not required.\n//\n// 2. Altered source versions must be plainly marked as such, and must not\n//    be misrepresented as being the original software.\n//\n// 3. This notice may not be removed or altered from any source\n//    distribution.\n//\n//========================================================================\n\n#define OSMESA_RGBA 0x1908\n#define OSMESA_FORMAT 0x22\n#define OSMESA_DEPTH_BITS 0x30\n#define OSMESA_STENCIL_BITS 0x31\n#define OSMESA_ACCUM_BITS 0x32\n#define OSMESA_PROFILE 0x33\n#define OSMESA_CORE_PROFILE 0x34\n#define OSMESA_COMPAT_PROFILE 0x35\n#define OSMESA_CONTEXT_MAJOR_VERSION 0x36\n#define OSMESA_CONTEXT_MINOR_VERSION 0x37\n\ntypedef void* OSMesaContext;\ntypedef void (*OSMESAproc)(void);\n\ntypedef OSMesaContext (GLAPIENTRY * PFN_OSMesaCreateContextExt)(GLenum,GLint,GLint,GLint,OSMesaContext);\ntypedef OSMesaContext (GLAPIENTRY * PFN_OSMesaCreateContextAttribs)(const int*,OSMesaContext);\ntypedef void (GLAPIENTRY * PFN_OSMesaDestroyContext)(OSMesaContext);\ntypedef int (GLAPIENTRY * PFN_OSMesaMakeCurrent)(OSMesaContext,void*,int,int,int);\ntypedef int (GLAPIENTRY * PFN_OSMesaGetColorBuffer)(OSMesaContext,int*,int*,int*,void**);\ntypedef int (GLAPIENTRY * PFN_OSMesaGetDepthBuffer)(OSMesaContext,int*,int*,int*,void**);\ntypedef GLFWglproc (GLAPIENTRY * PFN_OSMesaGetProcAddress)(const char*);\n#define OSMesaCreateContextExt _glfw.osmesa.CreateContextExt\n#define OSMesaCreateContextAttribs _glfw.osmesa.CreateContextAttribs\n#define OSMesaDestroyContext _glfw.osmesa.DestroyContext\n#define OSMesaMakeCurrent _glfw.osmesa.MakeCurrent\n#define OSMesaGetColorBuffer _glfw.osmesa.GetColorBuffer\n#define OSMesaGetDepthBuffer _glfw.osmesa.GetDepthBuffer\n#define OSMesaGetProcAddress _glfw.osmesa.GetProcAddress\n\n#define _GLFW_OSMESA_CONTEXT_STATE              _GLFWcontextOSMesa osmesa\n#define _GLFW_OSMESA_LIBRARY_CONTEXT_STATE      _GLFWlibraryOSMesa osmesa\n\n\n// OSMesa-specific per-context data\n//\ntypedef struct _GLFWcontextOSMesa\n{\n    OSMesaContext       handle;\n    int                 width;\n    int                 height;\n    void*               buffer;\n\n} _GLFWcontextOSMesa;\n\n// OSMesa-specific global data\n//\ntypedef struct _GLFWlibraryOSMesa\n{\n    void*           handle;\n\n    PFN_OSMesaCreateContextExt      CreateContextExt;\n    PFN_OSMesaCreateContextAttribs  CreateContextAttribs;\n    PFN_OSMesaDestroyContext        DestroyContext;\n    PFN_OSMesaMakeCurrent           MakeCurrent;\n    PFN_OSMesaGetColorBuffer        GetColorBuffer;\n    PFN_OSMesaGetDepthBuffer        GetDepthBuffer;\n    PFN_OSMesaGetProcAddress        GetProcAddress;\n\n} _GLFWlibraryOSMesa;\n\n\nGLFWbool _glfwInitOSMesa(void);\nvoid _glfwTerminateOSMesa(void);\nGLFWbool _glfwCreateContextOSMesa(_GLFWwindow* window,\n                                  const _GLFWctxconfig* ctxconfig,\n                                  const _GLFWfbconfig* fbconfig);\n\n"
  },
  {
    "path": "thirdparty/glfw/src/posix_thread.c",
    "content": "//========================================================================\n// GLFW 3.3 POSIX - www.glfw.org\n//------------------------------------------------------------------------\n// Copyright (c) 2002-2006 Marcus Geelnard\n// Copyright (c) 2006-2017 Camilla Löwy <elmindreda@glfw.org>\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//    claim that you wrote the original software. If you use this software\n//    in a product, an acknowledgment in the product documentation would\n//    be appreciated but is not required.\n//\n// 2. Altered source versions must be plainly marked as such, and must not\n//    be misrepresented as being the original software.\n//\n// 3. This notice may not be removed or altered from any source\n//    distribution.\n//\n//========================================================================\n// It is fine to use C99 in this file because it will not be built with VS\n//========================================================================\n\n#include \"internal.h\"\n\n#include <assert.h>\n#include <string.h>\n\n\n//////////////////////////////////////////////////////////////////////////\n//////                       GLFW platform API                      //////\n//////////////////////////////////////////////////////////////////////////\n\nGLFWbool _glfwPlatformCreateTls(_GLFWtls* tls)\n{\n    assert(tls->posix.allocated == GLFW_FALSE);\n\n    if (pthread_key_create(&tls->posix.key, NULL) != 0)\n    {\n        _glfwInputError(GLFW_PLATFORM_ERROR,\n                        \"POSIX: Failed to create context TLS\");\n        return GLFW_FALSE;\n    }\n\n    tls->posix.allocated = GLFW_TRUE;\n    return GLFW_TRUE;\n}\n\nvoid _glfwPlatformDestroyTls(_GLFWtls* tls)\n{\n    if (tls->posix.allocated)\n        pthread_key_delete(tls->posix.key);\n    memset(tls, 0, sizeof(_GLFWtls));\n}\n\nvoid* _glfwPlatformGetTls(_GLFWtls* tls)\n{\n    assert(tls->posix.allocated == GLFW_TRUE);\n    return pthread_getspecific(tls->posix.key);\n}\n\nvoid _glfwPlatformSetTls(_GLFWtls* tls, void* value)\n{\n    assert(tls->posix.allocated == GLFW_TRUE);\n    pthread_setspecific(tls->posix.key, value);\n}\n\nGLFWbool _glfwPlatformCreateMutex(_GLFWmutex* mutex)\n{\n    assert(mutex->posix.allocated == GLFW_FALSE);\n\n    if (pthread_mutex_init(&mutex->posix.handle, NULL) != 0)\n    {\n        _glfwInputError(GLFW_PLATFORM_ERROR, \"POSIX: Failed to create mutex\");\n        return GLFW_FALSE;\n    }\n\n    return mutex->posix.allocated = GLFW_TRUE;\n}\n\nvoid _glfwPlatformDestroyMutex(_GLFWmutex* mutex)\n{\n    if (mutex->posix.allocated)\n        pthread_mutex_destroy(&mutex->posix.handle);\n    memset(mutex, 0, sizeof(_GLFWmutex));\n}\n\nvoid _glfwPlatformLockMutex(_GLFWmutex* mutex)\n{\n    assert(mutex->posix.allocated == GLFW_TRUE);\n    pthread_mutex_lock(&mutex->posix.handle);\n}\n\nvoid _glfwPlatformUnlockMutex(_GLFWmutex* mutex)\n{\n    assert(mutex->posix.allocated == GLFW_TRUE);\n    pthread_mutex_unlock(&mutex->posix.handle);\n}\n\n"
  },
  {
    "path": "thirdparty/glfw/src/posix_thread.h",
    "content": "//========================================================================\n// GLFW 3.3 POSIX - www.glfw.org\n//------------------------------------------------------------------------\n// Copyright (c) 2002-2006 Marcus Geelnard\n// Copyright (c) 2006-2017 Camilla Löwy <elmindreda@glfw.org>\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//    claim that you wrote the original software. If you use this software\n//    in a product, an acknowledgment in the product documentation would\n//    be appreciated but is not required.\n//\n// 2. Altered source versions must be plainly marked as such, and must not\n//    be misrepresented as being the original software.\n//\n// 3. This notice may not be removed or altered from any source\n//    distribution.\n//\n//========================================================================\n\n#include <pthread.h>\n\n#define _GLFW_PLATFORM_TLS_STATE    _GLFWtlsPOSIX   posix\n#define _GLFW_PLATFORM_MUTEX_STATE  _GLFWmutexPOSIX posix\n\n\n// POSIX-specific thread local storage data\n//\ntypedef struct _GLFWtlsPOSIX\n{\n    GLFWbool        allocated;\n    pthread_key_t   key;\n\n} _GLFWtlsPOSIX;\n\n// POSIX-specific mutex data\n//\ntypedef struct _GLFWmutexPOSIX\n{\n    GLFWbool        allocated;\n    pthread_mutex_t handle;\n\n} _GLFWmutexPOSIX;\n\n"
  },
  {
    "path": "thirdparty/glfw/src/posix_time.c",
    "content": "//========================================================================\n// GLFW 3.3 POSIX - www.glfw.org\n//------------------------------------------------------------------------\n// Copyright (c) 2002-2006 Marcus Geelnard\n// Copyright (c) 2006-2017 Camilla Löwy <elmindreda@glfw.org>\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//    claim that you wrote the original software. If you use this software\n//    in a product, an acknowledgment in the product documentation would\n//    be appreciated but is not required.\n//\n// 2. Altered source versions must be plainly marked as such, and must not\n//    be misrepresented as being the original software.\n//\n// 3. This notice may not be removed or altered from any source\n//    distribution.\n//\n//========================================================================\n// It is fine to use C99 in this file because it will not be built with VS\n//========================================================================\n\n#include \"internal.h\"\n\n#include <sys/time.h>\n#include <time.h>\n\n\n//////////////////////////////////////////////////////////////////////////\n//////                       GLFW internal API                      //////\n//////////////////////////////////////////////////////////////////////////\n\n// Initialise timer\n//\nvoid _glfwInitTimerPOSIX(void)\n{\n#if defined(CLOCK_MONOTONIC)\n    struct timespec ts;\n\n    if (clock_gettime(CLOCK_MONOTONIC, &ts) == 0)\n    {\n        _glfw.timer.posix.monotonic = GLFW_TRUE;\n        _glfw.timer.posix.frequency = 1000000000;\n    }\n    else\n#endif\n    {\n        _glfw.timer.posix.monotonic = GLFW_FALSE;\n        _glfw.timer.posix.frequency = 1000000;\n    }\n}\n\n\n//////////////////////////////////////////////////////////////////////////\n//////                       GLFW platform API                      //////\n//////////////////////////////////////////////////////////////////////////\n\nuint64_t _glfwPlatformGetTimerValue(void)\n{\n#if defined(CLOCK_MONOTONIC)\n    if (_glfw.timer.posix.monotonic)\n    {\n        struct timespec ts;\n        clock_gettime(CLOCK_MONOTONIC, &ts);\n        return (uint64_t) ts.tv_sec * (uint64_t) 1000000000 + (uint64_t) ts.tv_nsec;\n    }\n    else\n#endif\n    {\n        struct timeval tv;\n        gettimeofday(&tv, NULL);\n        return (uint64_t) tv.tv_sec * (uint64_t) 1000000 + (uint64_t) tv.tv_usec;\n    }\n}\n\nuint64_t _glfwPlatformGetTimerFrequency(void)\n{\n    return _glfw.timer.posix.frequency;\n}\n\n"
  },
  {
    "path": "thirdparty/glfw/src/posix_time.h",
    "content": "//========================================================================\n// GLFW 3.3 POSIX - www.glfw.org\n//------------------------------------------------------------------------\n// Copyright (c) 2002-2006 Marcus Geelnard\n// Copyright (c) 2006-2017 Camilla Löwy <elmindreda@glfw.org>\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//    claim that you wrote the original software. If you use this software\n//    in a product, an acknowledgment in the product documentation would\n//    be appreciated but is not required.\n//\n// 2. Altered source versions must be plainly marked as such, and must not\n//    be misrepresented as being the original software.\n//\n// 3. This notice may not be removed or altered from any source\n//    distribution.\n//\n//========================================================================\n\n#define _GLFW_PLATFORM_LIBRARY_TIMER_STATE _GLFWtimerPOSIX posix\n\n#include <stdint.h>\n\n\n// POSIX-specific global timer data\n//\ntypedef struct _GLFWtimerPOSIX\n{\n    GLFWbool    monotonic;\n    uint64_t    frequency;\n\n} _GLFWtimerPOSIX;\n\n\nvoid _glfwInitTimerPOSIX(void);\n\n"
  },
  {
    "path": "thirdparty/glfw/src/vulkan.c",
    "content": "//========================================================================\n// GLFW 3.3 - www.glfw.org\n//------------------------------------------------------------------------\n// Copyright (c) 2002-2006 Marcus Geelnard\n// Copyright (c) 2006-2018 Camilla Löwy <elmindreda@glfw.org>\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//    claim that you wrote the original software. If you use this software\n//    in a product, an acknowledgment in the product documentation would\n//    be appreciated but is not required.\n//\n// 2. Altered source versions must be plainly marked as such, and must not\n//    be misrepresented as being the original software.\n//\n// 3. This notice may not be removed or altered from any source\n//    distribution.\n//\n//========================================================================\n// Please use C89 style variable declarations in this file because VS 2010\n//========================================================================\n\n#include \"internal.h\"\n\n#include <assert.h>\n#include <string.h>\n#include <stdlib.h>\n\n#define _GLFW_FIND_LOADER    1\n#define _GLFW_REQUIRE_LOADER 2\n\n\n//////////////////////////////////////////////////////////////////////////\n//////                       GLFW internal API                      //////\n//////////////////////////////////////////////////////////////////////////\n\nGLFWbool _glfwInitVulkan(int mode)\n{\n    VkResult err;\n    VkExtensionProperties* ep;\n    uint32_t i, count;\n\n    if (_glfw.vk.available)\n        return GLFW_TRUE;\n\n#if !defined(_GLFW_VULKAN_STATIC)\n#if defined(_GLFW_VULKAN_LIBRARY)\n    _glfw.vk.handle = _glfw_dlopen(_GLFW_VULKAN_LIBRARY);\n#elif defined(_GLFW_WIN32)\n    _glfw.vk.handle = _glfw_dlopen(\"vulkan-1.dll\");\n#elif defined(_GLFW_COCOA)\n    _glfw.vk.handle = _glfw_dlopen(\"libvulkan.1.dylib\");\n    if (!_glfw.vk.handle)\n        _glfw.vk.handle = _glfwLoadLocalVulkanLoaderNS();\n#else\n    _glfw.vk.handle = _glfw_dlopen(\"libvulkan.so.1\");\n#endif\n    if (!_glfw.vk.handle)\n    {\n        if (mode == _GLFW_REQUIRE_LOADER)\n            _glfwInputError(GLFW_API_UNAVAILABLE, \"Vulkan: Loader not found\");\n\n        return GLFW_FALSE;\n    }\n\n    _glfw.vk.GetInstanceProcAddr = (PFN_vkGetInstanceProcAddr)\n        _glfw_dlsym(_glfw.vk.handle, \"vkGetInstanceProcAddr\");\n    if (!_glfw.vk.GetInstanceProcAddr)\n    {\n        _glfwInputError(GLFW_API_UNAVAILABLE,\n                        \"Vulkan: Loader does not export vkGetInstanceProcAddr\");\n\n        _glfwTerminateVulkan();\n        return GLFW_FALSE;\n    }\n\n    _glfw.vk.EnumerateInstanceExtensionProperties = (PFN_vkEnumerateInstanceExtensionProperties)\n        vkGetInstanceProcAddr(NULL, \"vkEnumerateInstanceExtensionProperties\");\n    if (!_glfw.vk.EnumerateInstanceExtensionProperties)\n    {\n        _glfwInputError(GLFW_API_UNAVAILABLE,\n                        \"Vulkan: Failed to retrieve vkEnumerateInstanceExtensionProperties\");\n\n        _glfwTerminateVulkan();\n        return GLFW_FALSE;\n    }\n#endif // _GLFW_VULKAN_STATIC\n\n    err = vkEnumerateInstanceExtensionProperties(NULL, &count, NULL);\n    if (err)\n    {\n        // NOTE: This happens on systems with a loader but without any Vulkan ICD\n        if (mode == _GLFW_REQUIRE_LOADER)\n        {\n            _glfwInputError(GLFW_API_UNAVAILABLE,\n                            \"Vulkan: Failed to query instance extension count: %s\",\n                            _glfwGetVulkanResultString(err));\n        }\n\n        _glfwTerminateVulkan();\n        return GLFW_FALSE;\n    }\n\n    ep = calloc(count, sizeof(VkExtensionProperties));\n\n    err = vkEnumerateInstanceExtensionProperties(NULL, &count, ep);\n    if (err)\n    {\n        _glfwInputError(GLFW_API_UNAVAILABLE,\n                        \"Vulkan: Failed to query instance extensions: %s\",\n                        _glfwGetVulkanResultString(err));\n\n        free(ep);\n        _glfwTerminateVulkan();\n        return GLFW_FALSE;\n    }\n\n    for (i = 0;  i < count;  i++)\n    {\n        if (strcmp(ep[i].extensionName, \"VK_KHR_surface\") == 0)\n            _glfw.vk.KHR_surface = GLFW_TRUE;\n#if defined(_GLFW_WIN32)\n        else if (strcmp(ep[i].extensionName, \"VK_KHR_win32_surface\") == 0)\n            _glfw.vk.KHR_win32_surface = GLFW_TRUE;\n#elif defined(_GLFW_COCOA)\n        else if (strcmp(ep[i].extensionName, \"VK_MVK_macos_surface\") == 0)\n            _glfw.vk.MVK_macos_surface = GLFW_TRUE;\n        else if (strcmp(ep[i].extensionName, \"VK_EXT_metal_surface\") == 0)\n            _glfw.vk.EXT_metal_surface = GLFW_TRUE;\n#elif defined(_GLFW_X11)\n        else if (strcmp(ep[i].extensionName, \"VK_KHR_xlib_surface\") == 0)\n            _glfw.vk.KHR_xlib_surface = GLFW_TRUE;\n        else if (strcmp(ep[i].extensionName, \"VK_KHR_xcb_surface\") == 0)\n            _glfw.vk.KHR_xcb_surface = GLFW_TRUE;\n#elif defined(_GLFW_WAYLAND)\n        else if (strcmp(ep[i].extensionName, \"VK_KHR_wayland_surface\") == 0)\n            _glfw.vk.KHR_wayland_surface = GLFW_TRUE;\n#endif\n    }\n\n    free(ep);\n\n    _glfw.vk.available = GLFW_TRUE;\n\n    _glfwPlatformGetRequiredInstanceExtensions(_glfw.vk.extensions);\n\n    return GLFW_TRUE;\n}\n\nvoid _glfwTerminateVulkan(void)\n{\n#if !defined(_GLFW_VULKAN_STATIC)\n    if (_glfw.vk.handle)\n        _glfw_dlclose(_glfw.vk.handle);\n#endif\n}\n\nconst char* _glfwGetVulkanResultString(VkResult result)\n{\n    switch (result)\n    {\n        case VK_SUCCESS:\n            return \"Success\";\n        case VK_NOT_READY:\n            return \"A fence or query has not yet completed\";\n        case VK_TIMEOUT:\n            return \"A wait operation has not completed in the specified time\";\n        case VK_EVENT_SET:\n            return \"An event is signaled\";\n        case VK_EVENT_RESET:\n            return \"An event is unsignaled\";\n        case VK_INCOMPLETE:\n            return \"A return array was too small for the result\";\n        case VK_ERROR_OUT_OF_HOST_MEMORY:\n            return \"A host memory allocation has failed\";\n        case VK_ERROR_OUT_OF_DEVICE_MEMORY:\n            return \"A device memory allocation has failed\";\n        case VK_ERROR_INITIALIZATION_FAILED:\n            return \"Initialization of an object could not be completed for implementation-specific reasons\";\n        case VK_ERROR_DEVICE_LOST:\n            return \"The logical or physical device has been lost\";\n        case VK_ERROR_MEMORY_MAP_FAILED:\n            return \"Mapping of a memory object has failed\";\n        case VK_ERROR_LAYER_NOT_PRESENT:\n            return \"A requested layer is not present or could not be loaded\";\n        case VK_ERROR_EXTENSION_NOT_PRESENT:\n            return \"A requested extension is not supported\";\n        case VK_ERROR_FEATURE_NOT_PRESENT:\n            return \"A requested feature is not supported\";\n        case VK_ERROR_INCOMPATIBLE_DRIVER:\n            return \"The requested version of Vulkan is not supported by the driver or is otherwise incompatible\";\n        case VK_ERROR_TOO_MANY_OBJECTS:\n            return \"Too many objects of the type have already been created\";\n        case VK_ERROR_FORMAT_NOT_SUPPORTED:\n            return \"A requested format is not supported on this device\";\n        case VK_ERROR_SURFACE_LOST_KHR:\n            return \"A surface is no longer available\";\n        case VK_SUBOPTIMAL_KHR:\n            return \"A swapchain no longer matches the surface properties exactly, but can still be used\";\n        case VK_ERROR_OUT_OF_DATE_KHR:\n            return \"A surface has changed in such a way that it is no longer compatible with the swapchain\";\n        case VK_ERROR_INCOMPATIBLE_DISPLAY_KHR:\n            return \"The display used by a swapchain does not use the same presentable image layout\";\n        case VK_ERROR_NATIVE_WINDOW_IN_USE_KHR:\n            return \"The requested window is already connected to a VkSurfaceKHR, or to some other non-Vulkan API\";\n        case VK_ERROR_VALIDATION_FAILED_EXT:\n            return \"A validation layer found an error\";\n        default:\n            return \"ERROR: UNKNOWN VULKAN ERROR\";\n    }\n}\n\n\n//////////////////////////////////////////////////////////////////////////\n//////                        GLFW public API                       //////\n//////////////////////////////////////////////////////////////////////////\n\nGLFWAPI int glfwVulkanSupported(void)\n{\n    _GLFW_REQUIRE_INIT_OR_RETURN(GLFW_FALSE);\n    return _glfwInitVulkan(_GLFW_FIND_LOADER);\n}\n\nGLFWAPI const char** glfwGetRequiredInstanceExtensions(uint32_t* count)\n{\n    assert(count != NULL);\n\n    *count = 0;\n\n    _GLFW_REQUIRE_INIT_OR_RETURN(NULL);\n\n    if (!_glfwInitVulkan(_GLFW_REQUIRE_LOADER))\n        return NULL;\n\n    if (!_glfw.vk.extensions[0])\n        return NULL;\n\n    *count = 2;\n    return (const char**) _glfw.vk.extensions;\n}\n\nGLFWAPI GLFWvkproc glfwGetInstanceProcAddress(VkInstance instance,\n                                              const char* procname)\n{\n    GLFWvkproc proc;\n    assert(procname != NULL);\n\n    _GLFW_REQUIRE_INIT_OR_RETURN(NULL);\n\n    if (!_glfwInitVulkan(_GLFW_REQUIRE_LOADER))\n        return NULL;\n\n    proc = (GLFWvkproc) vkGetInstanceProcAddr(instance, procname);\n#if defined(_GLFW_VULKAN_STATIC)\n    if (!proc)\n    {\n        if (strcmp(procname, \"vkGetInstanceProcAddr\") == 0)\n            return (GLFWvkproc) vkGetInstanceProcAddr;\n    }\n#else\n    if (!proc)\n        proc = (GLFWvkproc) _glfw_dlsym(_glfw.vk.handle, procname);\n#endif\n\n    return proc;\n}\n\nGLFWAPI int glfwGetPhysicalDevicePresentationSupport(VkInstance instance,\n                                                     VkPhysicalDevice device,\n                                                     uint32_t queuefamily)\n{\n    assert(instance != VK_NULL_HANDLE);\n    assert(device != VK_NULL_HANDLE);\n\n    _GLFW_REQUIRE_INIT_OR_RETURN(GLFW_FALSE);\n\n    if (!_glfwInitVulkan(_GLFW_REQUIRE_LOADER))\n        return GLFW_FALSE;\n\n    if (!_glfw.vk.extensions[0])\n    {\n        _glfwInputError(GLFW_API_UNAVAILABLE,\n                        \"Vulkan: Window surface creation extensions not found\");\n        return GLFW_FALSE;\n    }\n\n    return _glfwPlatformGetPhysicalDevicePresentationSupport(instance,\n                                                             device,\n                                                             queuefamily);\n}\n\nGLFWAPI VkResult glfwCreateWindowSurface(VkInstance instance,\n                                         GLFWwindow* handle,\n                                         const VkAllocationCallbacks* allocator,\n                                         VkSurfaceKHR* surface)\n{\n    _GLFWwindow* window = (_GLFWwindow*) handle;\n    assert(instance != VK_NULL_HANDLE);\n    assert(window != NULL);\n    assert(surface != NULL);\n\n    *surface = VK_NULL_HANDLE;\n\n    _GLFW_REQUIRE_INIT_OR_RETURN(VK_ERROR_INITIALIZATION_FAILED);\n\n    if (!_glfwInitVulkan(_GLFW_REQUIRE_LOADER))\n        return VK_ERROR_INITIALIZATION_FAILED;\n\n    if (!_glfw.vk.extensions[0])\n    {\n        _glfwInputError(GLFW_API_UNAVAILABLE,\n                        \"Vulkan: Window surface creation extensions not found\");\n        return VK_ERROR_EXTENSION_NOT_PRESENT;\n    }\n\n    if (window->context.client != GLFW_NO_API)\n    {\n        _glfwInputError(GLFW_INVALID_VALUE,\n                        \"Vulkan: Window surface creation requires the window to have the client API set to GLFW_NO_API\");\n        return VK_ERROR_NATIVE_WINDOW_IN_USE_KHR;\n    }\n\n    return _glfwPlatformCreateWindowSurface(instance, window, allocator, surface);\n}\n\n"
  },
  {
    "path": "thirdparty/glfw/src/wgl_context.c",
    "content": "//========================================================================\n// GLFW 3.3 WGL - www.glfw.org\n//------------------------------------------------------------------------\n// Copyright (c) 2002-2006 Marcus Geelnard\n// Copyright (c) 2006-2019 Camilla Löwy <elmindreda@glfw.org>\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//    claim that you wrote the original software. If you use this software\n//    in a product, an acknowledgment in the product documentation would\n//    be appreciated but is not required.\n//\n// 2. Altered source versions must be plainly marked as such, and must not\n//    be misrepresented as being the original software.\n//\n// 3. This notice may not be removed or altered from any source\n//    distribution.\n//\n//========================================================================\n// Please use C89 style variable declarations in this file because VS 2010\n//========================================================================\n\n#include \"internal.h\"\n\n#include <stdlib.h>\n#include <malloc.h>\n#include <assert.h>\n\n// Return the value corresponding to the specified attribute\n//\nstatic int findPixelFormatAttribValue(const int* attribs,\n                                      int attribCount,\n                                      const int* values,\n                                      int attrib)\n{\n    int i;\n\n    for (i = 0;  i < attribCount;  i++)\n    {\n        if (attribs[i] == attrib)\n            return values[i];\n    }\n\n    _glfwInputErrorWin32(GLFW_PLATFORM_ERROR,\n                         \"WGL: Unknown pixel format attribute requested\");\n    return 0;\n}\n\n#define addAttrib(a) \\\n{ \\\n    assert((size_t) attribCount < sizeof(attribs) / sizeof(attribs[0])); \\\n    attribs[attribCount++] = a; \\\n}\n#define findAttribValue(a) \\\n    findPixelFormatAttribValue(attribs, attribCount, values, a)\n\n// Return a list of available and usable framebuffer configs\n//\nstatic int choosePixelFormat(_GLFWwindow* window,\n                             const _GLFWctxconfig* ctxconfig,\n                             const _GLFWfbconfig* fbconfig)\n{\n    _GLFWfbconfig* usableConfigs;\n    const _GLFWfbconfig* closest;\n    int i, pixelFormat, nativeCount, usableCount = 0, attribCount = 0;\n    int attribs[40];\n    int values[sizeof(attribs) / sizeof(attribs[0])];\n\n    if (_glfw.wgl.ARB_pixel_format)\n    {\n        const int attrib = WGL_NUMBER_PIXEL_FORMATS_ARB;\n\n        if (!wglGetPixelFormatAttribivARB(window->context.wgl.dc,\n                                          1, 0, 1, &attrib, &nativeCount))\n        {\n            _glfwInputErrorWin32(GLFW_PLATFORM_ERROR,\n                                 \"WGL: Failed to retrieve pixel format attribute\");\n            return 0;\n        }\n\n        addAttrib(WGL_SUPPORT_OPENGL_ARB);\n        addAttrib(WGL_DRAW_TO_WINDOW_ARB);\n        addAttrib(WGL_PIXEL_TYPE_ARB);\n        addAttrib(WGL_ACCELERATION_ARB);\n        addAttrib(WGL_RED_BITS_ARB);\n        addAttrib(WGL_RED_SHIFT_ARB);\n        addAttrib(WGL_GREEN_BITS_ARB);\n        addAttrib(WGL_GREEN_SHIFT_ARB);\n        addAttrib(WGL_BLUE_BITS_ARB);\n        addAttrib(WGL_BLUE_SHIFT_ARB);\n        addAttrib(WGL_ALPHA_BITS_ARB);\n        addAttrib(WGL_ALPHA_SHIFT_ARB);\n        addAttrib(WGL_DEPTH_BITS_ARB);\n        addAttrib(WGL_STENCIL_BITS_ARB);\n        addAttrib(WGL_ACCUM_BITS_ARB);\n        addAttrib(WGL_ACCUM_RED_BITS_ARB);\n        addAttrib(WGL_ACCUM_GREEN_BITS_ARB);\n        addAttrib(WGL_ACCUM_BLUE_BITS_ARB);\n        addAttrib(WGL_ACCUM_ALPHA_BITS_ARB);\n        addAttrib(WGL_AUX_BUFFERS_ARB);\n        addAttrib(WGL_STEREO_ARB);\n        addAttrib(WGL_DOUBLE_BUFFER_ARB);\n\n        if (_glfw.wgl.ARB_multisample)\n            addAttrib(WGL_SAMPLES_ARB);\n\n        if (ctxconfig->client == GLFW_OPENGL_API)\n        {\n            if (_glfw.wgl.ARB_framebuffer_sRGB || _glfw.wgl.EXT_framebuffer_sRGB)\n                addAttrib(WGL_FRAMEBUFFER_SRGB_CAPABLE_ARB);\n        }\n        else\n        {\n            if (_glfw.wgl.EXT_colorspace)\n                addAttrib(WGL_COLORSPACE_EXT);\n        }\n    }\n    else\n    {\n        nativeCount = DescribePixelFormat(window->context.wgl.dc,\n                                          1,\n                                          sizeof(PIXELFORMATDESCRIPTOR),\n                                          NULL);\n    }\n\n    usableConfigs = calloc(nativeCount, sizeof(_GLFWfbconfig));\n\n    for (i = 0;  i < nativeCount;  i++)\n    {\n        _GLFWfbconfig* u = usableConfigs + usableCount;\n        pixelFormat = i + 1;\n\n        if (_glfw.wgl.ARB_pixel_format)\n        {\n            // Get pixel format attributes through \"modern\" extension\n\n            if (!wglGetPixelFormatAttribivARB(window->context.wgl.dc,\n                                              pixelFormat, 0,\n                                              attribCount,\n                                              attribs, values))\n            {\n                _glfwInputErrorWin32(GLFW_PLATFORM_ERROR,\n                                    \"WGL: Failed to retrieve pixel format attributes\");\n\n                free(usableConfigs);\n                return 0;\n            }\n\n            if (!findAttribValue(WGL_SUPPORT_OPENGL_ARB) ||\n                !findAttribValue(WGL_DRAW_TO_WINDOW_ARB))\n            {\n                continue;\n            }\n\n            if (findAttribValue(WGL_PIXEL_TYPE_ARB) != WGL_TYPE_RGBA_ARB)\n                continue;\n\n            if (findAttribValue(WGL_ACCELERATION_ARB) == WGL_NO_ACCELERATION_ARB)\n                continue;\n\n            u->redBits = findAttribValue(WGL_RED_BITS_ARB);\n            u->greenBits = findAttribValue(WGL_GREEN_BITS_ARB);\n            u->blueBits = findAttribValue(WGL_BLUE_BITS_ARB);\n            u->alphaBits = findAttribValue(WGL_ALPHA_BITS_ARB);\n\n            u->depthBits = findAttribValue(WGL_DEPTH_BITS_ARB);\n            u->stencilBits = findAttribValue(WGL_STENCIL_BITS_ARB);\n\n            u->accumRedBits = findAttribValue(WGL_ACCUM_RED_BITS_ARB);\n            u->accumGreenBits = findAttribValue(WGL_ACCUM_GREEN_BITS_ARB);\n            u->accumBlueBits = findAttribValue(WGL_ACCUM_BLUE_BITS_ARB);\n            u->accumAlphaBits = findAttribValue(WGL_ACCUM_ALPHA_BITS_ARB);\n\n            u->auxBuffers = findAttribValue(WGL_AUX_BUFFERS_ARB);\n\n            if (findAttribValue(WGL_STEREO_ARB))\n                u->stereo = GLFW_TRUE;\n            if (findAttribValue(WGL_DOUBLE_BUFFER_ARB))\n                u->doublebuffer = GLFW_TRUE;\n\n            if (_glfw.wgl.ARB_multisample)\n                u->samples = findAttribValue(WGL_SAMPLES_ARB);\n\n            if (ctxconfig->client == GLFW_OPENGL_API)\n            {\n                if (_glfw.wgl.ARB_framebuffer_sRGB ||\n                    _glfw.wgl.EXT_framebuffer_sRGB)\n                {\n                    if (findAttribValue(WGL_FRAMEBUFFER_SRGB_CAPABLE_ARB))\n                        u->sRGB = GLFW_TRUE;\n                }\n            }\n            else\n            {\n                if (_glfw.wgl.EXT_colorspace)\n                {\n                    if (findAttribValue(WGL_COLORSPACE_EXT) == WGL_COLORSPACE_SRGB_EXT)\n                        u->sRGB = GLFW_TRUE;\n                }\n            }\n        }\n        else\n        {\n            // Get pixel format attributes through legacy PFDs\n\n            PIXELFORMATDESCRIPTOR pfd;\n\n            if (!DescribePixelFormat(window->context.wgl.dc,\n                                     pixelFormat,\n                                     sizeof(PIXELFORMATDESCRIPTOR),\n                                     &pfd))\n            {\n                _glfwInputErrorWin32(GLFW_PLATFORM_ERROR,\n                                    \"WGL: Failed to describe pixel format\");\n\n                free(usableConfigs);\n                return 0;\n            }\n\n            if (!(pfd.dwFlags & PFD_DRAW_TO_WINDOW) ||\n                !(pfd.dwFlags & PFD_SUPPORT_OPENGL))\n            {\n                continue;\n            }\n\n            if (!(pfd.dwFlags & PFD_GENERIC_ACCELERATED) &&\n                (pfd.dwFlags & PFD_GENERIC_FORMAT))\n            {\n                continue;\n            }\n\n            if (pfd.iPixelType != PFD_TYPE_RGBA)\n                continue;\n\n            u->redBits = pfd.cRedBits;\n            u->greenBits = pfd.cGreenBits;\n            u->blueBits = pfd.cBlueBits;\n            u->alphaBits = pfd.cAlphaBits;\n\n            u->depthBits = pfd.cDepthBits;\n            u->stencilBits = pfd.cStencilBits;\n\n            u->accumRedBits = pfd.cAccumRedBits;\n            u->accumGreenBits = pfd.cAccumGreenBits;\n            u->accumBlueBits = pfd.cAccumBlueBits;\n            u->accumAlphaBits = pfd.cAccumAlphaBits;\n\n            u->auxBuffers = pfd.cAuxBuffers;\n\n            if (pfd.dwFlags & PFD_STEREO)\n                u->stereo = GLFW_TRUE;\n            if (pfd.dwFlags & PFD_DOUBLEBUFFER)\n                u->doublebuffer = GLFW_TRUE;\n        }\n\n        u->handle = pixelFormat;\n        usableCount++;\n    }\n\n    if (!usableCount)\n    {\n        _glfwInputError(GLFW_API_UNAVAILABLE,\n                        \"WGL: The driver does not appear to support OpenGL\");\n\n        free(usableConfigs);\n        return 0;\n    }\n\n    closest = _glfwChooseFBConfig(fbconfig, usableConfigs, usableCount);\n    if (!closest)\n    {\n        _glfwInputError(GLFW_FORMAT_UNAVAILABLE,\n                        \"WGL: Failed to find a suitable pixel format\");\n\n        free(usableConfigs);\n        return 0;\n    }\n\n    pixelFormat = (int) closest->handle;\n    free(usableConfigs);\n\n    return pixelFormat;\n}\n\n#undef addAttrib\n#undef findAttribValue\n\nstatic void makeContextCurrentWGL(_GLFWwindow* window)\n{\n    if (window)\n    {\n        if (wglMakeCurrent(window->context.wgl.dc, window->context.wgl.handle))\n            _glfwPlatformSetTls(&_glfw.contextSlot, window);\n        else\n        {\n            _glfwInputErrorWin32(GLFW_PLATFORM_ERROR,\n                                 \"WGL: Failed to make context current\");\n            _glfwPlatformSetTls(&_glfw.contextSlot, NULL);\n        }\n    }\n    else\n    {\n        if (!wglMakeCurrent(NULL, NULL))\n        {\n            _glfwInputErrorWin32(GLFW_PLATFORM_ERROR,\n                                 \"WGL: Failed to clear current context\");\n        }\n\n        _glfwPlatformSetTls(&_glfw.contextSlot, NULL);\n    }\n}\n\nstatic void swapBuffersWGL(_GLFWwindow* window)\n{\n    if (!window->monitor)\n    {\n        if (IsWindowsVistaOrGreater())\n        {\n            // DWM Composition is always enabled on Win8+\n            BOOL enabled = IsWindows8OrGreater();\n\n            // HACK: Use DwmFlush when desktop composition is enabled\n            if (enabled ||\n                (SUCCEEDED(DwmIsCompositionEnabled(&enabled)) && enabled))\n            {\n                int count = abs(window->context.wgl.interval);\n                while (count--)\n                    DwmFlush();\n            }\n        }\n    }\n\n    SwapBuffers(window->context.wgl.dc);\n}\n\nstatic void swapIntervalWGL(int interval)\n{\n    _GLFWwindow* window = _glfwPlatformGetTls(&_glfw.contextSlot);\n\n    window->context.wgl.interval = interval;\n\n    if (!window->monitor)\n    {\n        if (IsWindowsVistaOrGreater())\n        {\n            // DWM Composition is always enabled on Win8+\n            BOOL enabled = IsWindows8OrGreater();\n\n            // HACK: Disable WGL swap interval when desktop composition is enabled to\n            //       avoid interfering with DWM vsync\n            if (enabled ||\n                (SUCCEEDED(DwmIsCompositionEnabled(&enabled)) && enabled))\n                interval = 0;\n        }\n    }\n\n    if (_glfw.wgl.EXT_swap_control)\n        wglSwapIntervalEXT(interval);\n}\n\nstatic int extensionSupportedWGL(const char* extension)\n{\n    const char* extensions = NULL;\n\n    if (_glfw.wgl.GetExtensionsStringARB)\n        extensions = wglGetExtensionsStringARB(wglGetCurrentDC());\n    else if (_glfw.wgl.GetExtensionsStringEXT)\n        extensions = wglGetExtensionsStringEXT();\n\n    if (!extensions)\n        return GLFW_FALSE;\n\n    return _glfwStringInExtensionString(extension, extensions);\n}\n\nstatic GLFWglproc getProcAddressWGL(const char* procname)\n{\n    const GLFWglproc proc = (GLFWglproc) wglGetProcAddress(procname);\n    if (proc)\n        return proc;\n\n    return (GLFWglproc) GetProcAddress(_glfw.wgl.instance, procname);\n}\n\nstatic void destroyContextWGL(_GLFWwindow* window)\n{\n    if (window->context.wgl.handle)\n    {\n        wglDeleteContext(window->context.wgl.handle);\n        window->context.wgl.handle = NULL;\n    }\n}\n\n\n//////////////////////////////////////////////////////////////////////////\n//////                       GLFW internal API                      //////\n//////////////////////////////////////////////////////////////////////////\n\n// Initialize WGL\n//\nGLFWbool _glfwInitWGL(void)\n{\n    PIXELFORMATDESCRIPTOR pfd;\n    HGLRC prc, rc;\n    HDC pdc, dc;\n\n    if (_glfw.wgl.instance)\n        return GLFW_TRUE;\n\n    _glfw.wgl.instance = LoadLibraryA(\"opengl32.dll\");\n    if (!_glfw.wgl.instance)\n    {\n        _glfwInputErrorWin32(GLFW_PLATFORM_ERROR,\n                             \"WGL: Failed to load opengl32.dll\");\n        return GLFW_FALSE;\n    }\n\n    _glfw.wgl.CreateContext = (PFN_wglCreateContext)\n        GetProcAddress(_glfw.wgl.instance, \"wglCreateContext\");\n    _glfw.wgl.DeleteContext = (PFN_wglDeleteContext)\n        GetProcAddress(_glfw.wgl.instance, \"wglDeleteContext\");\n    _glfw.wgl.GetProcAddress = (PFN_wglGetProcAddress)\n        GetProcAddress(_glfw.wgl.instance, \"wglGetProcAddress\");\n    _glfw.wgl.GetCurrentDC = (PFN_wglGetCurrentDC)\n        GetProcAddress(_glfw.wgl.instance, \"wglGetCurrentDC\");\n    _glfw.wgl.GetCurrentContext = (PFN_wglGetCurrentContext)\n        GetProcAddress(_glfw.wgl.instance, \"wglGetCurrentContext\");\n    _glfw.wgl.MakeCurrent = (PFN_wglMakeCurrent)\n        GetProcAddress(_glfw.wgl.instance, \"wglMakeCurrent\");\n    _glfw.wgl.ShareLists = (PFN_wglShareLists)\n        GetProcAddress(_glfw.wgl.instance, \"wglShareLists\");\n\n    // NOTE: A dummy context has to be created for opengl32.dll to load the\n    //       OpenGL ICD, from which we can then query WGL extensions\n    // NOTE: This code will accept the Microsoft GDI ICD; accelerated context\n    //       creation failure occurs during manual pixel format enumeration\n\n    dc = GetDC(_glfw.win32.helperWindowHandle);\n\n    ZeroMemory(&pfd, sizeof(pfd));\n    pfd.nSize = sizeof(pfd);\n    pfd.nVersion = 1;\n    pfd.dwFlags = PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL | PFD_DOUBLEBUFFER;\n    pfd.iPixelType = PFD_TYPE_RGBA;\n    pfd.cColorBits = 24;\n\n    if (!SetPixelFormat(dc, ChoosePixelFormat(dc, &pfd), &pfd))\n    {\n        _glfwInputErrorWin32(GLFW_PLATFORM_ERROR,\n                             \"WGL: Failed to set pixel format for dummy context\");\n        return GLFW_FALSE;\n    }\n\n    rc = wglCreateContext(dc);\n    if (!rc)\n    {\n        _glfwInputErrorWin32(GLFW_PLATFORM_ERROR,\n                             \"WGL: Failed to create dummy context\");\n        return GLFW_FALSE;\n    }\n\n    pdc = wglGetCurrentDC();\n    prc = wglGetCurrentContext();\n\n    if (!wglMakeCurrent(dc, rc))\n    {\n        _glfwInputErrorWin32(GLFW_PLATFORM_ERROR,\n                             \"WGL: Failed to make dummy context current\");\n        wglMakeCurrent(pdc, prc);\n        wglDeleteContext(rc);\n        return GLFW_FALSE;\n    }\n\n    // NOTE: Functions must be loaded first as they're needed to retrieve the\n    //       extension string that tells us whether the functions are supported\n    _glfw.wgl.GetExtensionsStringEXT = (PFNWGLGETEXTENSIONSSTRINGEXTPROC)\n        wglGetProcAddress(\"wglGetExtensionsStringEXT\");\n    _glfw.wgl.GetExtensionsStringARB = (PFNWGLGETEXTENSIONSSTRINGARBPROC)\n        wglGetProcAddress(\"wglGetExtensionsStringARB\");\n    _glfw.wgl.CreateContextAttribsARB = (PFNWGLCREATECONTEXTATTRIBSARBPROC)\n        wglGetProcAddress(\"wglCreateContextAttribsARB\");\n    _glfw.wgl.SwapIntervalEXT = (PFNWGLSWAPINTERVALEXTPROC)\n        wglGetProcAddress(\"wglSwapIntervalEXT\");\n    _glfw.wgl.GetPixelFormatAttribivARB = (PFNWGLGETPIXELFORMATATTRIBIVARBPROC)\n        wglGetProcAddress(\"wglGetPixelFormatAttribivARB\");\n\n    // NOTE: WGL_ARB_extensions_string and WGL_EXT_extensions_string are not\n    //       checked below as we are already using them\n    _glfw.wgl.ARB_multisample =\n        extensionSupportedWGL(\"WGL_ARB_multisample\");\n    _glfw.wgl.ARB_framebuffer_sRGB =\n        extensionSupportedWGL(\"WGL_ARB_framebuffer_sRGB\");\n    _glfw.wgl.EXT_framebuffer_sRGB =\n        extensionSupportedWGL(\"WGL_EXT_framebuffer_sRGB\");\n    _glfw.wgl.ARB_create_context =\n        extensionSupportedWGL(\"WGL_ARB_create_context\");\n    _glfw.wgl.ARB_create_context_profile =\n        extensionSupportedWGL(\"WGL_ARB_create_context_profile\");\n    _glfw.wgl.EXT_create_context_es2_profile =\n        extensionSupportedWGL(\"WGL_EXT_create_context_es2_profile\");\n    _glfw.wgl.ARB_create_context_robustness =\n        extensionSupportedWGL(\"WGL_ARB_create_context_robustness\");\n    _glfw.wgl.ARB_create_context_no_error =\n        extensionSupportedWGL(\"WGL_ARB_create_context_no_error\");\n    _glfw.wgl.EXT_swap_control =\n        extensionSupportedWGL(\"WGL_EXT_swap_control\");\n    _glfw.wgl.EXT_colorspace =\n        extensionSupportedWGL(\"WGL_EXT_colorspace\");\n    _glfw.wgl.ARB_pixel_format =\n        extensionSupportedWGL(\"WGL_ARB_pixel_format\");\n    _glfw.wgl.ARB_context_flush_control =\n        extensionSupportedWGL(\"WGL_ARB_context_flush_control\");\n\n    wglMakeCurrent(pdc, prc);\n    wglDeleteContext(rc);\n    return GLFW_TRUE;\n}\n\n// Terminate WGL\n//\nvoid _glfwTerminateWGL(void)\n{\n    if (_glfw.wgl.instance)\n        FreeLibrary(_glfw.wgl.instance);\n}\n\n#define setAttrib(a, v) \\\n{ \\\n    assert(((size_t) index + 1) < sizeof(attribs) / sizeof(attribs[0])); \\\n    attribs[index++] = a; \\\n    attribs[index++] = v; \\\n}\n\n// Create the OpenGL or OpenGL ES context\n//\nGLFWbool _glfwCreateContextWGL(_GLFWwindow* window,\n                               const _GLFWctxconfig* ctxconfig,\n                               const _GLFWfbconfig* fbconfig)\n{\n    int attribs[40];\n    int pixelFormat;\n    PIXELFORMATDESCRIPTOR pfd;\n    HGLRC share = NULL;\n\n    if (ctxconfig->share)\n        share = ctxconfig->share->context.wgl.handle;\n\n    window->context.wgl.dc = GetDC(window->win32.handle);\n    if (!window->context.wgl.dc)\n    {\n        _glfwInputError(GLFW_PLATFORM_ERROR,\n                        \"WGL: Failed to retrieve DC for window\");\n        return GLFW_FALSE;\n    }\n\n    pixelFormat = choosePixelFormat(window, ctxconfig, fbconfig);\n    if (!pixelFormat)\n        return GLFW_FALSE;\n\n    if (!DescribePixelFormat(window->context.wgl.dc,\n                             pixelFormat, sizeof(pfd), &pfd))\n    {\n        _glfwInputErrorWin32(GLFW_PLATFORM_ERROR,\n                             \"WGL: Failed to retrieve PFD for selected pixel format\");\n        return GLFW_FALSE;\n    }\n\n    if (!SetPixelFormat(window->context.wgl.dc, pixelFormat, &pfd))\n    {\n        _glfwInputErrorWin32(GLFW_PLATFORM_ERROR,\n                             \"WGL: Failed to set selected pixel format\");\n        return GLFW_FALSE;\n    }\n\n    if (ctxconfig->client == GLFW_OPENGL_API)\n    {\n        if (ctxconfig->forward)\n        {\n            if (!_glfw.wgl.ARB_create_context)\n            {\n                _glfwInputError(GLFW_VERSION_UNAVAILABLE,\n                                \"WGL: A forward compatible OpenGL context requested but WGL_ARB_create_context is unavailable\");\n                return GLFW_FALSE;\n            }\n        }\n\n        if (ctxconfig->profile)\n        {\n            if (!_glfw.wgl.ARB_create_context_profile)\n            {\n                _glfwInputError(GLFW_VERSION_UNAVAILABLE,\n                                \"WGL: OpenGL profile requested but WGL_ARB_create_context_profile is unavailable\");\n                return GLFW_FALSE;\n            }\n        }\n    }\n    else\n    {\n        if (!_glfw.wgl.ARB_create_context ||\n            !_glfw.wgl.ARB_create_context_profile ||\n            !_glfw.wgl.EXT_create_context_es2_profile)\n        {\n            _glfwInputError(GLFW_API_UNAVAILABLE,\n                            \"WGL: OpenGL ES requested but WGL_ARB_create_context_es2_profile is unavailable\");\n            return GLFW_FALSE;\n        }\n    }\n\n    if (_glfw.wgl.ARB_create_context)\n    {\n        int index = 0, mask = 0, flags = 0;\n\n        if (ctxconfig->client == GLFW_OPENGL_API)\n        {\n            if (ctxconfig->forward)\n                flags |= WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB;\n\n            if (ctxconfig->profile == GLFW_OPENGL_CORE_PROFILE)\n                mask |= WGL_CONTEXT_CORE_PROFILE_BIT_ARB;\n            else if (ctxconfig->profile == GLFW_OPENGL_COMPAT_PROFILE)\n                mask |= WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB;\n        }\n        else\n            mask |= WGL_CONTEXT_ES2_PROFILE_BIT_EXT;\n\n        if (ctxconfig->debug)\n            flags |= WGL_CONTEXT_DEBUG_BIT_ARB;\n\n        if (ctxconfig->robustness)\n        {\n            if (_glfw.wgl.ARB_create_context_robustness)\n            {\n                if (ctxconfig->robustness == GLFW_NO_RESET_NOTIFICATION)\n                {\n                    setAttrib(WGL_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB,\n                              WGL_NO_RESET_NOTIFICATION_ARB);\n                }\n                else if (ctxconfig->robustness == GLFW_LOSE_CONTEXT_ON_RESET)\n                {\n                    setAttrib(WGL_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB,\n                              WGL_LOSE_CONTEXT_ON_RESET_ARB);\n                }\n\n                flags |= WGL_CONTEXT_ROBUST_ACCESS_BIT_ARB;\n            }\n        }\n\n        if (ctxconfig->release)\n        {\n            if (_glfw.wgl.ARB_context_flush_control)\n            {\n                if (ctxconfig->release == GLFW_RELEASE_BEHAVIOR_NONE)\n                {\n                    setAttrib(WGL_CONTEXT_RELEASE_BEHAVIOR_ARB,\n                              WGL_CONTEXT_RELEASE_BEHAVIOR_NONE_ARB);\n                }\n                else if (ctxconfig->release == GLFW_RELEASE_BEHAVIOR_FLUSH)\n                {\n                    setAttrib(WGL_CONTEXT_RELEASE_BEHAVIOR_ARB,\n                              WGL_CONTEXT_RELEASE_BEHAVIOR_FLUSH_ARB);\n                }\n            }\n        }\n\n        if (ctxconfig->noerror)\n        {\n            if (_glfw.wgl.ARB_create_context_no_error)\n                setAttrib(WGL_CONTEXT_OPENGL_NO_ERROR_ARB, GLFW_TRUE);\n        }\n\n        // NOTE: Only request an explicitly versioned context when necessary, as\n        //       explicitly requesting version 1.0 does not always return the\n        //       highest version supported by the driver\n        if (ctxconfig->major != 1 || ctxconfig->minor != 0)\n        {\n            setAttrib(WGL_CONTEXT_MAJOR_VERSION_ARB, ctxconfig->major);\n            setAttrib(WGL_CONTEXT_MINOR_VERSION_ARB, ctxconfig->minor);\n        }\n\n        if (flags)\n            setAttrib(WGL_CONTEXT_FLAGS_ARB, flags);\n\n        if (mask)\n            setAttrib(WGL_CONTEXT_PROFILE_MASK_ARB, mask);\n\n        setAttrib(0, 0);\n\n        window->context.wgl.handle =\n            wglCreateContextAttribsARB(window->context.wgl.dc, share, attribs);\n        if (!window->context.wgl.handle)\n        {\n            const DWORD error = GetLastError();\n\n            if (error == (0xc0070000 | ERROR_INVALID_VERSION_ARB))\n            {\n                if (ctxconfig->client == GLFW_OPENGL_API)\n                {\n                    _glfwInputError(GLFW_VERSION_UNAVAILABLE,\n                                    \"WGL: Driver does not support OpenGL version %i.%i\",\n                                    ctxconfig->major,\n                                    ctxconfig->minor);\n                }\n                else\n                {\n                    _glfwInputError(GLFW_VERSION_UNAVAILABLE,\n                                    \"WGL: Driver does not support OpenGL ES version %i.%i\",\n                                    ctxconfig->major,\n                                    ctxconfig->minor);\n                }\n            }\n            else if (error == (0xc0070000 | ERROR_INVALID_PROFILE_ARB))\n            {\n                _glfwInputError(GLFW_VERSION_UNAVAILABLE,\n                                \"WGL: Driver does not support the requested OpenGL profile\");\n            }\n            else if (error == (0xc0070000 | ERROR_INCOMPATIBLE_DEVICE_CONTEXTS_ARB))\n            {\n                _glfwInputError(GLFW_INVALID_VALUE,\n                                \"WGL: The share context is not compatible with the requested context\");\n            }\n            else\n            {\n                if (ctxconfig->client == GLFW_OPENGL_API)\n                {\n                    _glfwInputError(GLFW_VERSION_UNAVAILABLE,\n                                    \"WGL: Failed to create OpenGL context\");\n                }\n                else\n                {\n                    _glfwInputError(GLFW_VERSION_UNAVAILABLE,\n                                    \"WGL: Failed to create OpenGL ES context\");\n                }\n            }\n\n            return GLFW_FALSE;\n        }\n    }\n    else\n    {\n        window->context.wgl.handle = wglCreateContext(window->context.wgl.dc);\n        if (!window->context.wgl.handle)\n        {\n            _glfwInputErrorWin32(GLFW_VERSION_UNAVAILABLE,\n                                 \"WGL: Failed to create OpenGL context\");\n            return GLFW_FALSE;\n        }\n\n        if (share)\n        {\n            if (!wglShareLists(share, window->context.wgl.handle))\n            {\n                _glfwInputErrorWin32(GLFW_PLATFORM_ERROR,\n                                     \"WGL: Failed to enable sharing with specified OpenGL context\");\n                return GLFW_FALSE;\n            }\n        }\n    }\n\n    window->context.makeCurrent = makeContextCurrentWGL;\n    window->context.swapBuffers = swapBuffersWGL;\n    window->context.swapInterval = swapIntervalWGL;\n    window->context.extensionSupported = extensionSupportedWGL;\n    window->context.getProcAddress = getProcAddressWGL;\n    window->context.destroy = destroyContextWGL;\n\n    return GLFW_TRUE;\n}\n\n#undef setAttrib\n\n\n//////////////////////////////////////////////////////////////////////////\n//////                        GLFW native API                       //////\n//////////////////////////////////////////////////////////////////////////\n\nGLFWAPI HGLRC glfwGetWGLContext(GLFWwindow* handle)\n{\n    _GLFWwindow* window = (_GLFWwindow*) handle;\n    _GLFW_REQUIRE_INIT_OR_RETURN(NULL);\n\n    if (window->context.client == GLFW_NO_API)\n    {\n        _glfwInputError(GLFW_NO_WINDOW_CONTEXT, NULL);\n        return NULL;\n    }\n\n    return window->context.wgl.handle;\n}\n\n"
  },
  {
    "path": "thirdparty/glfw/src/wgl_context.h",
    "content": "//========================================================================\n// GLFW 3.3 WGL - www.glfw.org\n//------------------------------------------------------------------------\n// Copyright (c) 2002-2006 Marcus Geelnard\n// Copyright (c) 2006-2018 Camilla Löwy <elmindreda@glfw.org>\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//    claim that you wrote the original software. If you use this software\n//    in a product, an acknowledgment in the product documentation would\n//    be appreciated but is not required.\n//\n// 2. Altered source versions must be plainly marked as such, and must not\n//    be misrepresented as being the original software.\n//\n// 3. This notice may not be removed or altered from any source\n//    distribution.\n//\n//========================================================================\n\n#define WGL_NUMBER_PIXEL_FORMATS_ARB 0x2000\n#define WGL_SUPPORT_OPENGL_ARB 0x2010\n#define WGL_DRAW_TO_WINDOW_ARB 0x2001\n#define WGL_PIXEL_TYPE_ARB 0x2013\n#define WGL_TYPE_RGBA_ARB 0x202b\n#define WGL_ACCELERATION_ARB 0x2003\n#define WGL_NO_ACCELERATION_ARB 0x2025\n#define WGL_RED_BITS_ARB 0x2015\n#define WGL_RED_SHIFT_ARB 0x2016\n#define WGL_GREEN_BITS_ARB 0x2017\n#define WGL_GREEN_SHIFT_ARB 0x2018\n#define WGL_BLUE_BITS_ARB 0x2019\n#define WGL_BLUE_SHIFT_ARB 0x201a\n#define WGL_ALPHA_BITS_ARB 0x201b\n#define WGL_ALPHA_SHIFT_ARB 0x201c\n#define WGL_ACCUM_BITS_ARB 0x201d\n#define WGL_ACCUM_RED_BITS_ARB 0x201e\n#define WGL_ACCUM_GREEN_BITS_ARB 0x201f\n#define WGL_ACCUM_BLUE_BITS_ARB 0x2020\n#define WGL_ACCUM_ALPHA_BITS_ARB 0x2021\n#define WGL_DEPTH_BITS_ARB 0x2022\n#define WGL_STENCIL_BITS_ARB 0x2023\n#define WGL_AUX_BUFFERS_ARB 0x2024\n#define WGL_STEREO_ARB 0x2012\n#define WGL_DOUBLE_BUFFER_ARB 0x2011\n#define WGL_SAMPLES_ARB 0x2042\n#define WGL_FRAMEBUFFER_SRGB_CAPABLE_ARB 0x20a9\n#define WGL_CONTEXT_DEBUG_BIT_ARB 0x00000001\n#define WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB 0x00000002\n#define WGL_CONTEXT_PROFILE_MASK_ARB 0x9126\n#define WGL_CONTEXT_CORE_PROFILE_BIT_ARB 0x00000001\n#define WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB 0x00000002\n#define WGL_CONTEXT_MAJOR_VERSION_ARB 0x2091\n#define WGL_CONTEXT_MINOR_VERSION_ARB 0x2092\n#define WGL_CONTEXT_FLAGS_ARB 0x2094\n#define WGL_CONTEXT_ES2_PROFILE_BIT_EXT 0x00000004\n#define WGL_CONTEXT_ROBUST_ACCESS_BIT_ARB 0x00000004\n#define WGL_LOSE_CONTEXT_ON_RESET_ARB 0x8252\n#define WGL_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB 0x8256\n#define WGL_NO_RESET_NOTIFICATION_ARB 0x8261\n#define WGL_CONTEXT_RELEASE_BEHAVIOR_ARB 0x2097\n#define WGL_CONTEXT_RELEASE_BEHAVIOR_NONE_ARB 0\n#define WGL_CONTEXT_RELEASE_BEHAVIOR_FLUSH_ARB 0x2098\n#define WGL_CONTEXT_OPENGL_NO_ERROR_ARB 0x31b3\n#define WGL_COLORSPACE_EXT 0x309d\n#define WGL_COLORSPACE_SRGB_EXT 0x3089\n\n#define ERROR_INVALID_VERSION_ARB 0x2095\n#define ERROR_INVALID_PROFILE_ARB 0x2096\n#define ERROR_INCOMPATIBLE_DEVICE_CONTEXTS_ARB 0x2054\n\n// WGL extension pointer typedefs\ntypedef BOOL (WINAPI * PFNWGLSWAPINTERVALEXTPROC)(int);\ntypedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBIVARBPROC)(HDC,int,int,UINT,const int*,int*);\ntypedef const char* (WINAPI * PFNWGLGETEXTENSIONSSTRINGEXTPROC)(void);\ntypedef const char* (WINAPI * PFNWGLGETEXTENSIONSSTRINGARBPROC)(HDC);\ntypedef HGLRC (WINAPI * PFNWGLCREATECONTEXTATTRIBSARBPROC)(HDC,HGLRC,const int*);\n#define wglSwapIntervalEXT _glfw.wgl.SwapIntervalEXT\n#define wglGetPixelFormatAttribivARB _glfw.wgl.GetPixelFormatAttribivARB\n#define wglGetExtensionsStringEXT _glfw.wgl.GetExtensionsStringEXT\n#define wglGetExtensionsStringARB _glfw.wgl.GetExtensionsStringARB\n#define wglCreateContextAttribsARB _glfw.wgl.CreateContextAttribsARB\n\n// opengl32.dll function pointer typedefs\ntypedef HGLRC (WINAPI * PFN_wglCreateContext)(HDC);\ntypedef BOOL (WINAPI * PFN_wglDeleteContext)(HGLRC);\ntypedef PROC (WINAPI * PFN_wglGetProcAddress)(LPCSTR);\ntypedef HDC (WINAPI * PFN_wglGetCurrentDC)(void);\ntypedef HGLRC (WINAPI * PFN_wglGetCurrentContext)(void);\ntypedef BOOL (WINAPI * PFN_wglMakeCurrent)(HDC,HGLRC);\ntypedef BOOL (WINAPI * PFN_wglShareLists)(HGLRC,HGLRC);\n#define wglCreateContext _glfw.wgl.CreateContext\n#define wglDeleteContext _glfw.wgl.DeleteContext\n#define wglGetProcAddress _glfw.wgl.GetProcAddress\n#define wglGetCurrentDC _glfw.wgl.GetCurrentDC\n#define wglGetCurrentContext _glfw.wgl.GetCurrentContext\n#define wglMakeCurrent _glfw.wgl.MakeCurrent\n#define wglShareLists _glfw.wgl.ShareLists\n\n#define _GLFW_RECREATION_NOT_NEEDED 0\n#define _GLFW_RECREATION_REQUIRED   1\n#define _GLFW_RECREATION_IMPOSSIBLE 2\n\n#define _GLFW_PLATFORM_CONTEXT_STATE            _GLFWcontextWGL wgl\n#define _GLFW_PLATFORM_LIBRARY_CONTEXT_STATE    _GLFWlibraryWGL wgl\n\n\n// WGL-specific per-context data\n//\ntypedef struct _GLFWcontextWGL\n{\n    HDC       dc;\n    HGLRC     handle;\n    int       interval;\n\n} _GLFWcontextWGL;\n\n// WGL-specific global data\n//\ntypedef struct _GLFWlibraryWGL\n{\n    HINSTANCE                           instance;\n    PFN_wglCreateContext                CreateContext;\n    PFN_wglDeleteContext                DeleteContext;\n    PFN_wglGetProcAddress               GetProcAddress;\n    PFN_wglGetCurrentDC                 GetCurrentDC;\n    PFN_wglGetCurrentContext            GetCurrentContext;\n    PFN_wglMakeCurrent                  MakeCurrent;\n    PFN_wglShareLists                   ShareLists;\n\n    PFNWGLSWAPINTERVALEXTPROC           SwapIntervalEXT;\n    PFNWGLGETPIXELFORMATATTRIBIVARBPROC GetPixelFormatAttribivARB;\n    PFNWGLGETEXTENSIONSSTRINGEXTPROC    GetExtensionsStringEXT;\n    PFNWGLGETEXTENSIONSSTRINGARBPROC    GetExtensionsStringARB;\n    PFNWGLCREATECONTEXTATTRIBSARBPROC   CreateContextAttribsARB;\n    GLFWbool                            EXT_swap_control;\n    GLFWbool                            EXT_colorspace;\n    GLFWbool                            ARB_multisample;\n    GLFWbool                            ARB_framebuffer_sRGB;\n    GLFWbool                            EXT_framebuffer_sRGB;\n    GLFWbool                            ARB_pixel_format;\n    GLFWbool                            ARB_create_context;\n    GLFWbool                            ARB_create_context_profile;\n    GLFWbool                            EXT_create_context_es2_profile;\n    GLFWbool                            ARB_create_context_robustness;\n    GLFWbool                            ARB_create_context_no_error;\n    GLFWbool                            ARB_context_flush_control;\n\n} _GLFWlibraryWGL;\n\n\nGLFWbool _glfwInitWGL(void);\nvoid _glfwTerminateWGL(void);\nGLFWbool _glfwCreateContextWGL(_GLFWwindow* window,\n                               const _GLFWctxconfig* ctxconfig,\n                               const _GLFWfbconfig* fbconfig);\n\n"
  },
  {
    "path": "thirdparty/glfw/src/win32_init.c",
    "content": "//========================================================================\n// GLFW 3.3 Win32 - www.glfw.org\n//------------------------------------------------------------------------\n// Copyright (c) 2002-2006 Marcus Geelnard\n// Copyright (c) 2006-2019 Camilla Löwy <elmindreda@glfw.org>\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//    claim that you wrote the original software. If you use this software\n//    in a product, an acknowledgment in the product documentation would\n//    be appreciated but is not required.\n//\n// 2. Altered source versions must be plainly marked as such, and must not\n//    be misrepresented as being the original software.\n//\n// 3. This notice may not be removed or altered from any source\n//    distribution.\n//\n//========================================================================\n// Please use C89 style variable declarations in this file because VS 2010\n//========================================================================\n\n#include \"internal.h\"\n\n#include <stdlib.h>\n#include <malloc.h>\n\nstatic const GUID _glfw_GUID_DEVINTERFACE_HID =\n    {0x4d1e55b2,0xf16f,0x11cf,{0x88,0xcb,0x00,0x11,0x11,0x00,0x00,0x30}};\n\n#define GUID_DEVINTERFACE_HID _glfw_GUID_DEVINTERFACE_HID\n\n#if defined(_GLFW_USE_HYBRID_HPG) || defined(_GLFW_USE_OPTIMUS_HPG)\n\n// Executables (but not DLLs) exporting this symbol with this value will be\n// automatically directed to the high-performance GPU on Nvidia Optimus systems\n// with up-to-date drivers\n//\n__declspec(dllexport) DWORD NvOptimusEnablement = 1;\n\n// Executables (but not DLLs) exporting this symbol with this value will be\n// automatically directed to the high-performance GPU on AMD PowerXpress systems\n// with up-to-date drivers\n//\n__declspec(dllexport) int AmdPowerXpressRequestHighPerformance = 1;\n\n#endif // _GLFW_USE_HYBRID_HPG\n\n#if defined(_GLFW_BUILD_DLL)\n\n// GLFW DLL entry point\n//\nBOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, LPVOID reserved)\n{\n    return TRUE;\n}\n\n#endif // _GLFW_BUILD_DLL\n\n// Load necessary libraries (DLLs)\n//\nstatic GLFWbool loadLibraries(void)\n{\n    _glfw.win32.winmm.instance = LoadLibraryA(\"winmm.dll\");\n    if (!_glfw.win32.winmm.instance)\n    {\n        _glfwInputErrorWin32(GLFW_PLATFORM_ERROR,\n                             \"Win32: Failed to load winmm.dll\");\n        return GLFW_FALSE;\n    }\n\n    _glfw.win32.winmm.GetTime = (PFN_timeGetTime)\n        GetProcAddress(_glfw.win32.winmm.instance, \"timeGetTime\");\n\n    _glfw.win32.user32.instance = LoadLibraryA(\"user32.dll\");\n    if (!_glfw.win32.user32.instance)\n    {\n        _glfwInputErrorWin32(GLFW_PLATFORM_ERROR,\n                             \"Win32: Failed to load user32.dll\");\n        return GLFW_FALSE;\n    }\n\n    _glfw.win32.user32.SetProcessDPIAware_ = (PFN_SetProcessDPIAware)\n        GetProcAddress(_glfw.win32.user32.instance, \"SetProcessDPIAware\");\n    _glfw.win32.user32.ChangeWindowMessageFilterEx_ = (PFN_ChangeWindowMessageFilterEx)\n        GetProcAddress(_glfw.win32.user32.instance, \"ChangeWindowMessageFilterEx\");\n    _glfw.win32.user32.EnableNonClientDpiScaling_ = (PFN_EnableNonClientDpiScaling)\n        GetProcAddress(_glfw.win32.user32.instance, \"EnableNonClientDpiScaling\");\n    _glfw.win32.user32.SetProcessDpiAwarenessContext_ = (PFN_SetProcessDpiAwarenessContext)\n        GetProcAddress(_glfw.win32.user32.instance, \"SetProcessDpiAwarenessContext\");\n    _glfw.win32.user32.GetDpiForWindow_ = (PFN_GetDpiForWindow)\n        GetProcAddress(_glfw.win32.user32.instance, \"GetDpiForWindow\");\n    _glfw.win32.user32.AdjustWindowRectExForDpi_ = (PFN_AdjustWindowRectExForDpi)\n        GetProcAddress(_glfw.win32.user32.instance, \"AdjustWindowRectExForDpi\");\n\n    _glfw.win32.dinput8.instance = LoadLibraryA(\"dinput8.dll\");\n    if (_glfw.win32.dinput8.instance)\n    {\n        _glfw.win32.dinput8.Create = (PFN_DirectInput8Create)\n            GetProcAddress(_glfw.win32.dinput8.instance, \"DirectInput8Create\");\n    }\n\n    {\n        int i;\n        const char* names[] =\n        {\n            \"xinput1_4.dll\",\n            \"xinput1_3.dll\",\n            \"xinput9_1_0.dll\",\n            \"xinput1_2.dll\",\n            \"xinput1_1.dll\",\n            NULL\n        };\n\n        for (i = 0;  names[i];  i++)\n        {\n            _glfw.win32.xinput.instance = LoadLibraryA(names[i]);\n            if (_glfw.win32.xinput.instance)\n            {\n                _glfw.win32.xinput.GetCapabilities = (PFN_XInputGetCapabilities)\n                    GetProcAddress(_glfw.win32.xinput.instance, \"XInputGetCapabilities\");\n                _glfw.win32.xinput.GetState = (PFN_XInputGetState)\n                    GetProcAddress(_glfw.win32.xinput.instance, \"XInputGetState\");\n\n                break;\n            }\n        }\n    }\n\n    _glfw.win32.dwmapi.instance = LoadLibraryA(\"dwmapi.dll\");\n    if (_glfw.win32.dwmapi.instance)\n    {\n        _glfw.win32.dwmapi.IsCompositionEnabled = (PFN_DwmIsCompositionEnabled)\n            GetProcAddress(_glfw.win32.dwmapi.instance, \"DwmIsCompositionEnabled\");\n        _glfw.win32.dwmapi.Flush = (PFN_DwmFlush)\n            GetProcAddress(_glfw.win32.dwmapi.instance, \"DwmFlush\");\n        _glfw.win32.dwmapi.EnableBlurBehindWindow = (PFN_DwmEnableBlurBehindWindow)\n            GetProcAddress(_glfw.win32.dwmapi.instance, \"DwmEnableBlurBehindWindow\");\n    }\n\n    _glfw.win32.shcore.instance = LoadLibraryA(\"shcore.dll\");\n    if (_glfw.win32.shcore.instance)\n    {\n        _glfw.win32.shcore.SetProcessDpiAwareness_ = (PFN_SetProcessDpiAwareness)\n            GetProcAddress(_glfw.win32.shcore.instance, \"SetProcessDpiAwareness\");\n        _glfw.win32.shcore.GetDpiForMonitor_ = (PFN_GetDpiForMonitor)\n            GetProcAddress(_glfw.win32.shcore.instance, \"GetDpiForMonitor\");\n    }\n\n    _glfw.win32.ntdll.instance = LoadLibraryA(\"ntdll.dll\");\n    if (_glfw.win32.ntdll.instance)\n    {\n        _glfw.win32.ntdll.RtlVerifyVersionInfo_ = (PFN_RtlVerifyVersionInfo)\n            GetProcAddress(_glfw.win32.ntdll.instance, \"RtlVerifyVersionInfo\");\n    }\n\n    return GLFW_TRUE;\n}\n\n// Unload used libraries (DLLs)\n//\nstatic void freeLibraries(void)\n{\n    if (_glfw.win32.xinput.instance)\n        FreeLibrary(_glfw.win32.xinput.instance);\n\n    if (_glfw.win32.dinput8.instance)\n        FreeLibrary(_glfw.win32.dinput8.instance);\n\n    if (_glfw.win32.winmm.instance)\n        FreeLibrary(_glfw.win32.winmm.instance);\n\n    if (_glfw.win32.user32.instance)\n        FreeLibrary(_glfw.win32.user32.instance);\n\n    if (_glfw.win32.dwmapi.instance)\n        FreeLibrary(_glfw.win32.dwmapi.instance);\n\n    if (_glfw.win32.shcore.instance)\n        FreeLibrary(_glfw.win32.shcore.instance);\n\n    if (_glfw.win32.ntdll.instance)\n        FreeLibrary(_glfw.win32.ntdll.instance);\n}\n\n// Create key code translation tables\n//\nstatic void createKeyTables(void)\n{\n    int scancode;\n\n    memset(_glfw.win32.keycodes, -1, sizeof(_glfw.win32.keycodes));\n    memset(_glfw.win32.scancodes, -1, sizeof(_glfw.win32.scancodes));\n\n    _glfw.win32.keycodes[0x00B] = GLFW_KEY_0;\n    _glfw.win32.keycodes[0x002] = GLFW_KEY_1;\n    _glfw.win32.keycodes[0x003] = GLFW_KEY_2;\n    _glfw.win32.keycodes[0x004] = GLFW_KEY_3;\n    _glfw.win32.keycodes[0x005] = GLFW_KEY_4;\n    _glfw.win32.keycodes[0x006] = GLFW_KEY_5;\n    _glfw.win32.keycodes[0x007] = GLFW_KEY_6;\n    _glfw.win32.keycodes[0x008] = GLFW_KEY_7;\n    _glfw.win32.keycodes[0x009] = GLFW_KEY_8;\n    _glfw.win32.keycodes[0x00A] = GLFW_KEY_9;\n    _glfw.win32.keycodes[0x01E] = GLFW_KEY_A;\n    _glfw.win32.keycodes[0x030] = GLFW_KEY_B;\n    _glfw.win32.keycodes[0x02E] = GLFW_KEY_C;\n    _glfw.win32.keycodes[0x020] = GLFW_KEY_D;\n    _glfw.win32.keycodes[0x012] = GLFW_KEY_E;\n    _glfw.win32.keycodes[0x021] = GLFW_KEY_F;\n    _glfw.win32.keycodes[0x022] = GLFW_KEY_G;\n    _glfw.win32.keycodes[0x023] = GLFW_KEY_H;\n    _glfw.win32.keycodes[0x017] = GLFW_KEY_I;\n    _glfw.win32.keycodes[0x024] = GLFW_KEY_J;\n    _glfw.win32.keycodes[0x025] = GLFW_KEY_K;\n    _glfw.win32.keycodes[0x026] = GLFW_KEY_L;\n    _glfw.win32.keycodes[0x032] = GLFW_KEY_M;\n    _glfw.win32.keycodes[0x031] = GLFW_KEY_N;\n    _glfw.win32.keycodes[0x018] = GLFW_KEY_O;\n    _glfw.win32.keycodes[0x019] = GLFW_KEY_P;\n    _glfw.win32.keycodes[0x010] = GLFW_KEY_Q;\n    _glfw.win32.keycodes[0x013] = GLFW_KEY_R;\n    _glfw.win32.keycodes[0x01F] = GLFW_KEY_S;\n    _glfw.win32.keycodes[0x014] = GLFW_KEY_T;\n    _glfw.win32.keycodes[0x016] = GLFW_KEY_U;\n    _glfw.win32.keycodes[0x02F] = GLFW_KEY_V;\n    _glfw.win32.keycodes[0x011] = GLFW_KEY_W;\n    _glfw.win32.keycodes[0x02D] = GLFW_KEY_X;\n    _glfw.win32.keycodes[0x015] = GLFW_KEY_Y;\n    _glfw.win32.keycodes[0x02C] = GLFW_KEY_Z;\n\n    _glfw.win32.keycodes[0x028] = GLFW_KEY_APOSTROPHE;\n    _glfw.win32.keycodes[0x02B] = GLFW_KEY_BACKSLASH;\n    _glfw.win32.keycodes[0x033] = GLFW_KEY_COMMA;\n    _glfw.win32.keycodes[0x00D] = GLFW_KEY_EQUAL;\n    _glfw.win32.keycodes[0x029] = GLFW_KEY_GRAVE_ACCENT;\n    _glfw.win32.keycodes[0x01A] = GLFW_KEY_LEFT_BRACKET;\n    _glfw.win32.keycodes[0x00C] = GLFW_KEY_MINUS;\n    _glfw.win32.keycodes[0x034] = GLFW_KEY_PERIOD;\n    _glfw.win32.keycodes[0x01B] = GLFW_KEY_RIGHT_BRACKET;\n    _glfw.win32.keycodes[0x027] = GLFW_KEY_SEMICOLON;\n    _glfw.win32.keycodes[0x035] = GLFW_KEY_SLASH;\n    _glfw.win32.keycodes[0x056] = GLFW_KEY_WORLD_2;\n\n    _glfw.win32.keycodes[0x00E] = GLFW_KEY_BACKSPACE;\n    _glfw.win32.keycodes[0x153] = GLFW_KEY_DELETE;\n    _glfw.win32.keycodes[0x14F] = GLFW_KEY_END;\n    _glfw.win32.keycodes[0x01C] = GLFW_KEY_ENTER;\n    _glfw.win32.keycodes[0x001] = GLFW_KEY_ESCAPE;\n    _glfw.win32.keycodes[0x147] = GLFW_KEY_HOME;\n    _glfw.win32.keycodes[0x152] = GLFW_KEY_INSERT;\n    _glfw.win32.keycodes[0x15D] = GLFW_KEY_MENU;\n    _glfw.win32.keycodes[0x151] = GLFW_KEY_PAGE_DOWN;\n    _glfw.win32.keycodes[0x149] = GLFW_KEY_PAGE_UP;\n    _glfw.win32.keycodes[0x045] = GLFW_KEY_PAUSE;\n    _glfw.win32.keycodes[0x146] = GLFW_KEY_PAUSE;\n    _glfw.win32.keycodes[0x039] = GLFW_KEY_SPACE;\n    _glfw.win32.keycodes[0x00F] = GLFW_KEY_TAB;\n    _glfw.win32.keycodes[0x03A] = GLFW_KEY_CAPS_LOCK;\n    _glfw.win32.keycodes[0x145] = GLFW_KEY_NUM_LOCK;\n    _glfw.win32.keycodes[0x046] = GLFW_KEY_SCROLL_LOCK;\n    _glfw.win32.keycodes[0x03B] = GLFW_KEY_F1;\n    _glfw.win32.keycodes[0x03C] = GLFW_KEY_F2;\n    _glfw.win32.keycodes[0x03D] = GLFW_KEY_F3;\n    _glfw.win32.keycodes[0x03E] = GLFW_KEY_F4;\n    _glfw.win32.keycodes[0x03F] = GLFW_KEY_F5;\n    _glfw.win32.keycodes[0x040] = GLFW_KEY_F6;\n    _glfw.win32.keycodes[0x041] = GLFW_KEY_F7;\n    _glfw.win32.keycodes[0x042] = GLFW_KEY_F8;\n    _glfw.win32.keycodes[0x043] = GLFW_KEY_F9;\n    _glfw.win32.keycodes[0x044] = GLFW_KEY_F10;\n    _glfw.win32.keycodes[0x057] = GLFW_KEY_F11;\n    _glfw.win32.keycodes[0x058] = GLFW_KEY_F12;\n    _glfw.win32.keycodes[0x064] = GLFW_KEY_F13;\n    _glfw.win32.keycodes[0x065] = GLFW_KEY_F14;\n    _glfw.win32.keycodes[0x066] = GLFW_KEY_F15;\n    _glfw.win32.keycodes[0x067] = GLFW_KEY_F16;\n    _glfw.win32.keycodes[0x068] = GLFW_KEY_F17;\n    _glfw.win32.keycodes[0x069] = GLFW_KEY_F18;\n    _glfw.win32.keycodes[0x06A] = GLFW_KEY_F19;\n    _glfw.win32.keycodes[0x06B] = GLFW_KEY_F20;\n    _glfw.win32.keycodes[0x06C] = GLFW_KEY_F21;\n    _glfw.win32.keycodes[0x06D] = GLFW_KEY_F22;\n    _glfw.win32.keycodes[0x06E] = GLFW_KEY_F23;\n    _glfw.win32.keycodes[0x076] = GLFW_KEY_F24;\n    _glfw.win32.keycodes[0x038] = GLFW_KEY_LEFT_ALT;\n    _glfw.win32.keycodes[0x01D] = GLFW_KEY_LEFT_CONTROL;\n    _glfw.win32.keycodes[0x02A] = GLFW_KEY_LEFT_SHIFT;\n    _glfw.win32.keycodes[0x15B] = GLFW_KEY_LEFT_SUPER;\n    _glfw.win32.keycodes[0x137] = GLFW_KEY_PRINT_SCREEN;\n    _glfw.win32.keycodes[0x138] = GLFW_KEY_RIGHT_ALT;\n    _glfw.win32.keycodes[0x11D] = GLFW_KEY_RIGHT_CONTROL;\n    _glfw.win32.keycodes[0x036] = GLFW_KEY_RIGHT_SHIFT;\n    _glfw.win32.keycodes[0x15C] = GLFW_KEY_RIGHT_SUPER;\n    _glfw.win32.keycodes[0x150] = GLFW_KEY_DOWN;\n    _glfw.win32.keycodes[0x14B] = GLFW_KEY_LEFT;\n    _glfw.win32.keycodes[0x14D] = GLFW_KEY_RIGHT;\n    _glfw.win32.keycodes[0x148] = GLFW_KEY_UP;\n\n    _glfw.win32.keycodes[0x052] = GLFW_KEY_KP_0;\n    _glfw.win32.keycodes[0x04F] = GLFW_KEY_KP_1;\n    _glfw.win32.keycodes[0x050] = GLFW_KEY_KP_2;\n    _glfw.win32.keycodes[0x051] = GLFW_KEY_KP_3;\n    _glfw.win32.keycodes[0x04B] = GLFW_KEY_KP_4;\n    _glfw.win32.keycodes[0x04C] = GLFW_KEY_KP_5;\n    _glfw.win32.keycodes[0x04D] = GLFW_KEY_KP_6;\n    _glfw.win32.keycodes[0x047] = GLFW_KEY_KP_7;\n    _glfw.win32.keycodes[0x048] = GLFW_KEY_KP_8;\n    _glfw.win32.keycodes[0x049] = GLFW_KEY_KP_9;\n    _glfw.win32.keycodes[0x04E] = GLFW_KEY_KP_ADD;\n    _glfw.win32.keycodes[0x053] = GLFW_KEY_KP_DECIMAL;\n    _glfw.win32.keycodes[0x135] = GLFW_KEY_KP_DIVIDE;\n    _glfw.win32.keycodes[0x11C] = GLFW_KEY_KP_ENTER;\n    _glfw.win32.keycodes[0x059] = GLFW_KEY_KP_EQUAL;\n    _glfw.win32.keycodes[0x037] = GLFW_KEY_KP_MULTIPLY;\n    _glfw.win32.keycodes[0x04A] = GLFW_KEY_KP_SUBTRACT;\n\n    for (scancode = 0;  scancode < 512;  scancode++)\n    {\n        if (_glfw.win32.keycodes[scancode] > 0)\n            _glfw.win32.scancodes[_glfw.win32.keycodes[scancode]] = scancode;\n    }\n}\n\n// Creates a dummy window for behind-the-scenes work\n//\nstatic GLFWbool createHelperWindow(void)\n{\n    MSG msg;\n\n    _glfw.win32.helperWindowHandle =\n        CreateWindowExW(WS_EX_OVERLAPPEDWINDOW,\n                        _GLFW_WNDCLASSNAME,\n                        L\"GLFW message window\",\n                        WS_CLIPSIBLINGS | WS_CLIPCHILDREN,\n                        0, 0, 1, 1,\n                        NULL, NULL,\n                        GetModuleHandleW(NULL),\n                        NULL);\n\n    if (!_glfw.win32.helperWindowHandle)\n    {\n        _glfwInputErrorWin32(GLFW_PLATFORM_ERROR,\n                             \"Win32: Failed to create helper window\");\n        return GLFW_FALSE;\n    }\n\n    // HACK: The command to the first ShowWindow call is ignored if the parent\n    //       process passed along a STARTUPINFO, so clear that with a no-op call\n    ShowWindow(_glfw.win32.helperWindowHandle, SW_HIDE);\n\n    // Register for HID device notifications\n    {\n        DEV_BROADCAST_DEVICEINTERFACE_W dbi;\n        ZeroMemory(&dbi, sizeof(dbi));\n        dbi.dbcc_size = sizeof(dbi);\n        dbi.dbcc_devicetype = DBT_DEVTYP_DEVICEINTERFACE;\n        dbi.dbcc_classguid = GUID_DEVINTERFACE_HID;\n\n        _glfw.win32.deviceNotificationHandle =\n            RegisterDeviceNotificationW(_glfw.win32.helperWindowHandle,\n                                        (DEV_BROADCAST_HDR*) &dbi,\n                                        DEVICE_NOTIFY_WINDOW_HANDLE);\n    }\n\n    while (PeekMessageW(&msg, _glfw.win32.helperWindowHandle, 0, 0, PM_REMOVE))\n    {\n        TranslateMessage(&msg);\n        DispatchMessageW(&msg);\n    }\n\n   return GLFW_TRUE;\n}\n\n\n//////////////////////////////////////////////////////////////////////////\n//////                       GLFW internal API                      //////\n//////////////////////////////////////////////////////////////////////////\n\n// Returns a wide string version of the specified UTF-8 string\n//\nWCHAR* _glfwCreateWideStringFromUTF8Win32(const char* source)\n{\n    WCHAR* target;\n    int count;\n\n    count = MultiByteToWideChar(CP_UTF8, 0, source, -1, NULL, 0);\n    if (!count)\n    {\n        _glfwInputErrorWin32(GLFW_PLATFORM_ERROR,\n                             \"Win32: Failed to convert string from UTF-8\");\n        return NULL;\n    }\n\n    target = calloc(count, sizeof(WCHAR));\n\n    if (!MultiByteToWideChar(CP_UTF8, 0, source, -1, target, count))\n    {\n        _glfwInputErrorWin32(GLFW_PLATFORM_ERROR,\n                             \"Win32: Failed to convert string from UTF-8\");\n        free(target);\n        return NULL;\n    }\n\n    return target;\n}\n\n// Returns a UTF-8 string version of the specified wide string\n//\nchar* _glfwCreateUTF8FromWideStringWin32(const WCHAR* source)\n{\n    char* target;\n    int size;\n\n    size = WideCharToMultiByte(CP_UTF8, 0, source, -1, NULL, 0, NULL, NULL);\n    if (!size)\n    {\n        _glfwInputErrorWin32(GLFW_PLATFORM_ERROR,\n                             \"Win32: Failed to convert string to UTF-8\");\n        return NULL;\n    }\n\n    target = calloc(size, 1);\n\n    if (!WideCharToMultiByte(CP_UTF8, 0, source, -1, target, size, NULL, NULL))\n    {\n        _glfwInputErrorWin32(GLFW_PLATFORM_ERROR,\n                             \"Win32: Failed to convert string to UTF-8\");\n        free(target);\n        return NULL;\n    }\n\n    return target;\n}\n\n// Reports the specified error, appending information about the last Win32 error\n//\nvoid _glfwInputErrorWin32(int error, const char* description)\n{\n    WCHAR buffer[_GLFW_MESSAGE_SIZE] = L\"\";\n    char message[_GLFW_MESSAGE_SIZE] = \"\";\n\n    FormatMessageW(FORMAT_MESSAGE_FROM_SYSTEM |\n                       FORMAT_MESSAGE_IGNORE_INSERTS |\n                       FORMAT_MESSAGE_MAX_WIDTH_MASK,\n                   NULL,\n                   GetLastError() & 0xffff,\n                   MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),\n                   buffer,\n                   sizeof(buffer) / sizeof(WCHAR),\n                   NULL);\n    WideCharToMultiByte(CP_UTF8, 0, buffer, -1, message, sizeof(message), NULL, NULL);\n\n    _glfwInputError(error, \"%s: %s\", description, message);\n}\n\n// Updates key names according to the current keyboard layout\n//\nvoid _glfwUpdateKeyNamesWin32(void)\n{\n    int key;\n    BYTE state[256] = {0};\n\n    memset(_glfw.win32.keynames, 0, sizeof(_glfw.win32.keynames));\n\n    for (key = GLFW_KEY_SPACE;  key <= GLFW_KEY_LAST;  key++)\n    {\n        UINT vk;\n        int scancode, length;\n        WCHAR chars[16];\n\n        scancode = _glfw.win32.scancodes[key];\n        if (scancode == -1)\n            continue;\n\n        if (key >= GLFW_KEY_KP_0 && key <= GLFW_KEY_KP_ADD)\n        {\n            const UINT vks[] = {\n                VK_NUMPAD0,  VK_NUMPAD1,  VK_NUMPAD2, VK_NUMPAD3,\n                VK_NUMPAD4,  VK_NUMPAD5,  VK_NUMPAD6, VK_NUMPAD7,\n                VK_NUMPAD8,  VK_NUMPAD9,  VK_DECIMAL, VK_DIVIDE,\n                VK_MULTIPLY, VK_SUBTRACT, VK_ADD\n            };\n\n            vk = vks[key - GLFW_KEY_KP_0];\n        }\n        else\n            vk = MapVirtualKey(scancode, MAPVK_VSC_TO_VK);\n\n        length = ToUnicode(vk, scancode, state,\n                           chars, sizeof(chars) / sizeof(WCHAR),\n                           0);\n\n        if (length == -1)\n        {\n            length = ToUnicode(vk, scancode, state,\n                               chars, sizeof(chars) / sizeof(WCHAR),\n                               0);\n        }\n\n        if (length < 1)\n            continue;\n\n        WideCharToMultiByte(CP_UTF8, 0, chars, 1,\n                            _glfw.win32.keynames[key],\n                            sizeof(_glfw.win32.keynames[key]),\n                            NULL, NULL);\n    }\n}\n\n// Replacement for IsWindowsVersionOrGreater as MinGW lacks versionhelpers.h\n//\nBOOL _glfwIsWindowsVersionOrGreaterWin32(WORD major, WORD minor, WORD sp)\n{\n    OSVERSIONINFOEXW osvi = { sizeof(osvi), major, minor, 0, 0, {0}, sp };\n    DWORD mask = VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR;\n    ULONGLONG cond = VerSetConditionMask(0, VER_MAJORVERSION, VER_GREATER_EQUAL);\n    cond = VerSetConditionMask(cond, VER_MINORVERSION, VER_GREATER_EQUAL);\n    cond = VerSetConditionMask(cond, VER_SERVICEPACKMAJOR, VER_GREATER_EQUAL);\n    // HACK: Use RtlVerifyVersionInfo instead of VerifyVersionInfoW as the\n    //       latter lies unless the user knew to embed a non-default manifest\n    //       announcing support for Windows 10 via supportedOS GUID\n    return RtlVerifyVersionInfo(&osvi, mask, cond) == 0;\n}\n\n// Checks whether we are on at least the specified build of Windows 10\n//\nBOOL _glfwIsWindows10BuildOrGreaterWin32(WORD build)\n{\n    OSVERSIONINFOEXW osvi = { sizeof(osvi), 10, 0, build };\n    DWORD mask = VER_MAJORVERSION | VER_MINORVERSION | VER_BUILDNUMBER;\n    ULONGLONG cond = VerSetConditionMask(0, VER_MAJORVERSION, VER_GREATER_EQUAL);\n    cond = VerSetConditionMask(cond, VER_MINORVERSION, VER_GREATER_EQUAL);\n    cond = VerSetConditionMask(cond, VER_BUILDNUMBER, VER_GREATER_EQUAL);\n    // HACK: Use RtlVerifyVersionInfo instead of VerifyVersionInfoW as the\n    //       latter lies unless the user knew to embed a non-default manifest\n    //       announcing support for Windows 10 via supportedOS GUID\n    return RtlVerifyVersionInfo(&osvi, mask, cond) == 0;\n}\n\n\n//////////////////////////////////////////////////////////////////////////\n//////                       GLFW platform API                      //////\n//////////////////////////////////////////////////////////////////////////\n\nint _glfwPlatformInit(void)\n{\n    // To make SetForegroundWindow work as we want, we need to fiddle\n    // with the FOREGROUNDLOCKTIMEOUT system setting (we do this as early\n    // as possible in the hope of still being the foreground process)\n    SystemParametersInfoW(SPI_GETFOREGROUNDLOCKTIMEOUT, 0,\n                          &_glfw.win32.foregroundLockTimeout, 0);\n    SystemParametersInfoW(SPI_SETFOREGROUNDLOCKTIMEOUT, 0, UIntToPtr(0),\n                          SPIF_SENDCHANGE);\n\n    if (!loadLibraries())\n        return GLFW_FALSE;\n\n    createKeyTables();\n    _glfwUpdateKeyNamesWin32();\n\n    if (_glfwIsWindows10CreatorsUpdateOrGreaterWin32())\n        SetProcessDpiAwarenessContext(DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2);\n    else if (IsWindows8Point1OrGreater())\n        SetProcessDpiAwareness(PROCESS_PER_MONITOR_DPI_AWARE);\n    else if (IsWindowsVistaOrGreater())\n        SetProcessDPIAware();\n\n    if (!_glfwRegisterWindowClassWin32())\n        return GLFW_FALSE;\n\n    if (!createHelperWindow())\n        return GLFW_FALSE;\n\n    _glfwInitTimerWin32();\n    _glfwInitJoysticksWin32();\n\n    _glfwPollMonitorsWin32();\n    return GLFW_TRUE;\n}\n\nvoid _glfwPlatformTerminate(void)\n{\n    if (_glfw.win32.deviceNotificationHandle)\n        UnregisterDeviceNotification(_glfw.win32.deviceNotificationHandle);\n\n    if (_glfw.win32.helperWindowHandle)\n        DestroyWindow(_glfw.win32.helperWindowHandle);\n\n    _glfwUnregisterWindowClassWin32();\n\n    // Restore previous foreground lock timeout system setting\n    SystemParametersInfoW(SPI_SETFOREGROUNDLOCKTIMEOUT, 0,\n                          UIntToPtr(_glfw.win32.foregroundLockTimeout),\n                          SPIF_SENDCHANGE);\n\n    free(_glfw.win32.clipboardString);\n    free(_glfw.win32.rawInput);\n\n    _glfwTerminateWGL();\n    _glfwTerminateEGL();\n\n    _glfwTerminateJoysticksWin32();\n\n    freeLibraries();\n}\n\nconst char* _glfwPlatformGetVersionString(void)\n{\n    return _GLFW_VERSION_NUMBER \" Win32 WGL EGL OSMesa\"\n#if defined(__MINGW32__)\n        \" MinGW\"\n#elif defined(_MSC_VER)\n        \" VisualC\"\n#endif\n#if defined(_GLFW_USE_HYBRID_HPG) || defined(_GLFW_USE_OPTIMUS_HPG)\n        \" hybrid-GPU\"\n#endif\n#if defined(_GLFW_BUILD_DLL)\n        \" DLL\"\n#endif\n        ;\n}\n\n"
  },
  {
    "path": "thirdparty/glfw/src/win32_joystick.c",
    "content": "//========================================================================\n// GLFW 3.3 Win32 - www.glfw.org\n//------------------------------------------------------------------------\n// Copyright (c) 2002-2006 Marcus Geelnard\n// Copyright (c) 2006-2019 Camilla Löwy <elmindreda@glfw.org>\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//    claim that you wrote the original software. If you use this software\n//    in a product, an acknowledgment in the product documentation would\n//    be appreciated but is not required.\n//\n// 2. Altered source versions must be plainly marked as such, and must not\n//    be misrepresented as being the original software.\n//\n// 3. This notice may not be removed or altered from any source\n//    distribution.\n//\n//========================================================================\n// Please use C89 style variable declarations in this file because VS 2010\n//========================================================================\n\n#include \"internal.h\"\n\n#include <stdio.h>\n#include <math.h>\n\n#define _GLFW_TYPE_AXIS     0\n#define _GLFW_TYPE_SLIDER   1\n#define _GLFW_TYPE_BUTTON   2\n#define _GLFW_TYPE_POV      3\n\n// Data produced with DirectInput device object enumeration\n//\ntypedef struct _GLFWobjenumWin32\n{\n    IDirectInputDevice8W*   device;\n    _GLFWjoyobjectWin32*    objects;\n    int                     objectCount;\n    int                     axisCount;\n    int                     sliderCount;\n    int                     buttonCount;\n    int                     povCount;\n} _GLFWobjenumWin32;\n\n// Define local copies of the necessary GUIDs\n//\nstatic const GUID _glfw_IID_IDirectInput8W =\n    {0xbf798031,0x483a,0x4da2,{0xaa,0x99,0x5d,0x64,0xed,0x36,0x97,0x00}};\nstatic const GUID _glfw_GUID_XAxis =\n    {0xa36d02e0,0xc9f3,0x11cf,{0xbf,0xc7,0x44,0x45,0x53,0x54,0x00,0x00}};\nstatic const GUID _glfw_GUID_YAxis =\n    {0xa36d02e1,0xc9f3,0x11cf,{0xbf,0xc7,0x44,0x45,0x53,0x54,0x00,0x00}};\nstatic const GUID _glfw_GUID_ZAxis =\n    {0xa36d02e2,0xc9f3,0x11cf,{0xbf,0xc7,0x44,0x45,0x53,0x54,0x00,0x00}};\nstatic const GUID _glfw_GUID_RxAxis =\n    {0xa36d02f4,0xc9f3,0x11cf,{0xbf,0xc7,0x44,0x45,0x53,0x54,0x00,0x00}};\nstatic const GUID _glfw_GUID_RyAxis =\n    {0xa36d02f5,0xc9f3,0x11cf,{0xbf,0xc7,0x44,0x45,0x53,0x54,0x00,0x00}};\nstatic const GUID _glfw_GUID_RzAxis =\n    {0xa36d02e3,0xc9f3,0x11cf,{0xbf,0xc7,0x44,0x45,0x53,0x54,0x00,0x00}};\nstatic const GUID _glfw_GUID_Slider =\n    {0xa36d02e4,0xc9f3,0x11cf,{0xbf,0xc7,0x44,0x45,0x53,0x54,0x00,0x00}};\nstatic const GUID _glfw_GUID_POV =\n    {0xa36d02f2,0xc9f3,0x11cf,{0xbf,0xc7,0x44,0x45,0x53,0x54,0x00,0x00}};\n\n#define IID_IDirectInput8W _glfw_IID_IDirectInput8W\n#define GUID_XAxis _glfw_GUID_XAxis\n#define GUID_YAxis _glfw_GUID_YAxis\n#define GUID_ZAxis _glfw_GUID_ZAxis\n#define GUID_RxAxis _glfw_GUID_RxAxis\n#define GUID_RyAxis _glfw_GUID_RyAxis\n#define GUID_RzAxis _glfw_GUID_RzAxis\n#define GUID_Slider _glfw_GUID_Slider\n#define GUID_POV _glfw_GUID_POV\n\n// Object data array for our clone of c_dfDIJoystick\n// Generated with https://github.com/elmindreda/c_dfDIJoystick2\n//\nstatic DIOBJECTDATAFORMAT _glfwObjectDataFormats[] =\n{\n    { &GUID_XAxis,DIJOFS_X,DIDFT_AXIS|DIDFT_OPTIONAL|DIDFT_ANYINSTANCE,DIDOI_ASPECTPOSITION },\n    { &GUID_YAxis,DIJOFS_Y,DIDFT_AXIS|DIDFT_OPTIONAL|DIDFT_ANYINSTANCE,DIDOI_ASPECTPOSITION },\n    { &GUID_ZAxis,DIJOFS_Z,DIDFT_AXIS|DIDFT_OPTIONAL|DIDFT_ANYINSTANCE,DIDOI_ASPECTPOSITION },\n    { &GUID_RxAxis,DIJOFS_RX,DIDFT_AXIS|DIDFT_OPTIONAL|DIDFT_ANYINSTANCE,DIDOI_ASPECTPOSITION },\n    { &GUID_RyAxis,DIJOFS_RY,DIDFT_AXIS|DIDFT_OPTIONAL|DIDFT_ANYINSTANCE,DIDOI_ASPECTPOSITION },\n    { &GUID_RzAxis,DIJOFS_RZ,DIDFT_AXIS|DIDFT_OPTIONAL|DIDFT_ANYINSTANCE,DIDOI_ASPECTPOSITION },\n    { &GUID_Slider,DIJOFS_SLIDER(0),DIDFT_AXIS|DIDFT_OPTIONAL|DIDFT_ANYINSTANCE,DIDOI_ASPECTPOSITION },\n    { &GUID_Slider,DIJOFS_SLIDER(1),DIDFT_AXIS|DIDFT_OPTIONAL|DIDFT_ANYINSTANCE,DIDOI_ASPECTPOSITION },\n    { &GUID_POV,DIJOFS_POV(0),DIDFT_POV|DIDFT_OPTIONAL|DIDFT_ANYINSTANCE,0 },\n    { &GUID_POV,DIJOFS_POV(1),DIDFT_POV|DIDFT_OPTIONAL|DIDFT_ANYINSTANCE,0 },\n    { &GUID_POV,DIJOFS_POV(2),DIDFT_POV|DIDFT_OPTIONAL|DIDFT_ANYINSTANCE,0 },\n    { &GUID_POV,DIJOFS_POV(3),DIDFT_POV|DIDFT_OPTIONAL|DIDFT_ANYINSTANCE,0 },\n    { NULL,DIJOFS_BUTTON(0),DIDFT_BUTTON|DIDFT_OPTIONAL|DIDFT_ANYINSTANCE,0 },\n    { NULL,DIJOFS_BUTTON(1),DIDFT_BUTTON|DIDFT_OPTIONAL|DIDFT_ANYINSTANCE,0 },\n    { NULL,DIJOFS_BUTTON(2),DIDFT_BUTTON|DIDFT_OPTIONAL|DIDFT_ANYINSTANCE,0 },\n    { NULL,DIJOFS_BUTTON(3),DIDFT_BUTTON|DIDFT_OPTIONAL|DIDFT_ANYINSTANCE,0 },\n    { NULL,DIJOFS_BUTTON(4),DIDFT_BUTTON|DIDFT_OPTIONAL|DIDFT_ANYINSTANCE,0 },\n    { NULL,DIJOFS_BUTTON(5),DIDFT_BUTTON|DIDFT_OPTIONAL|DIDFT_ANYINSTANCE,0 },\n    { NULL,DIJOFS_BUTTON(6),DIDFT_BUTTON|DIDFT_OPTIONAL|DIDFT_ANYINSTANCE,0 },\n    { NULL,DIJOFS_BUTTON(7),DIDFT_BUTTON|DIDFT_OPTIONAL|DIDFT_ANYINSTANCE,0 },\n    { NULL,DIJOFS_BUTTON(8),DIDFT_BUTTON|DIDFT_OPTIONAL|DIDFT_ANYINSTANCE,0 },\n    { NULL,DIJOFS_BUTTON(9),DIDFT_BUTTON|DIDFT_OPTIONAL|DIDFT_ANYINSTANCE,0 },\n    { NULL,DIJOFS_BUTTON(10),DIDFT_BUTTON|DIDFT_OPTIONAL|DIDFT_ANYINSTANCE,0 },\n    { NULL,DIJOFS_BUTTON(11),DIDFT_BUTTON|DIDFT_OPTIONAL|DIDFT_ANYINSTANCE,0 },\n    { NULL,DIJOFS_BUTTON(12),DIDFT_BUTTON|DIDFT_OPTIONAL|DIDFT_ANYINSTANCE,0 },\n    { NULL,DIJOFS_BUTTON(13),DIDFT_BUTTON|DIDFT_OPTIONAL|DIDFT_ANYINSTANCE,0 },\n    { NULL,DIJOFS_BUTTON(14),DIDFT_BUTTON|DIDFT_OPTIONAL|DIDFT_ANYINSTANCE,0 },\n    { NULL,DIJOFS_BUTTON(15),DIDFT_BUTTON|DIDFT_OPTIONAL|DIDFT_ANYINSTANCE,0 },\n    { NULL,DIJOFS_BUTTON(16),DIDFT_BUTTON|DIDFT_OPTIONAL|DIDFT_ANYINSTANCE,0 },\n    { NULL,DIJOFS_BUTTON(17),DIDFT_BUTTON|DIDFT_OPTIONAL|DIDFT_ANYINSTANCE,0 },\n    { NULL,DIJOFS_BUTTON(18),DIDFT_BUTTON|DIDFT_OPTIONAL|DIDFT_ANYINSTANCE,0 },\n    { NULL,DIJOFS_BUTTON(19),DIDFT_BUTTON|DIDFT_OPTIONAL|DIDFT_ANYINSTANCE,0 },\n    { NULL,DIJOFS_BUTTON(20),DIDFT_BUTTON|DIDFT_OPTIONAL|DIDFT_ANYINSTANCE,0 },\n    { NULL,DIJOFS_BUTTON(21),DIDFT_BUTTON|DIDFT_OPTIONAL|DIDFT_ANYINSTANCE,0 },\n    { NULL,DIJOFS_BUTTON(22),DIDFT_BUTTON|DIDFT_OPTIONAL|DIDFT_ANYINSTANCE,0 },\n    { NULL,DIJOFS_BUTTON(23),DIDFT_BUTTON|DIDFT_OPTIONAL|DIDFT_ANYINSTANCE,0 },\n    { NULL,DIJOFS_BUTTON(24),DIDFT_BUTTON|DIDFT_OPTIONAL|DIDFT_ANYINSTANCE,0 },\n    { NULL,DIJOFS_BUTTON(25),DIDFT_BUTTON|DIDFT_OPTIONAL|DIDFT_ANYINSTANCE,0 },\n    { NULL,DIJOFS_BUTTON(26),DIDFT_BUTTON|DIDFT_OPTIONAL|DIDFT_ANYINSTANCE,0 },\n    { NULL,DIJOFS_BUTTON(27),DIDFT_BUTTON|DIDFT_OPTIONAL|DIDFT_ANYINSTANCE,0 },\n    { NULL,DIJOFS_BUTTON(28),DIDFT_BUTTON|DIDFT_OPTIONAL|DIDFT_ANYINSTANCE,0 },\n    { NULL,DIJOFS_BUTTON(29),DIDFT_BUTTON|DIDFT_OPTIONAL|DIDFT_ANYINSTANCE,0 },\n    { NULL,DIJOFS_BUTTON(30),DIDFT_BUTTON|DIDFT_OPTIONAL|DIDFT_ANYINSTANCE,0 },\n    { NULL,DIJOFS_BUTTON(31),DIDFT_BUTTON|DIDFT_OPTIONAL|DIDFT_ANYINSTANCE,0 },\n};\n\n// Our clone of c_dfDIJoystick\n//\nstatic const DIDATAFORMAT _glfwDataFormat =\n{\n    sizeof(DIDATAFORMAT),\n    sizeof(DIOBJECTDATAFORMAT),\n    DIDFT_ABSAXIS,\n    sizeof(DIJOYSTATE),\n    sizeof(_glfwObjectDataFormats) / sizeof(DIOBJECTDATAFORMAT),\n    _glfwObjectDataFormats\n};\n\n// Returns a description fitting the specified XInput capabilities\n//\nstatic const char* getDeviceDescription(const XINPUT_CAPABILITIES* xic)\n{\n    switch (xic->SubType)\n    {\n        case XINPUT_DEVSUBTYPE_WHEEL:\n            return \"XInput Wheel\";\n        case XINPUT_DEVSUBTYPE_ARCADE_STICK:\n            return \"XInput Arcade Stick\";\n        case XINPUT_DEVSUBTYPE_FLIGHT_STICK:\n            return \"XInput Flight Stick\";\n        case XINPUT_DEVSUBTYPE_DANCE_PAD:\n            return \"XInput Dance Pad\";\n        case XINPUT_DEVSUBTYPE_GUITAR:\n            return \"XInput Guitar\";\n        case XINPUT_DEVSUBTYPE_DRUM_KIT:\n            return \"XInput Drum Kit\";\n        case XINPUT_DEVSUBTYPE_GAMEPAD:\n        {\n            if (xic->Flags & XINPUT_CAPS_WIRELESS)\n                return \"Wireless Xbox Controller\";\n            else\n                return \"Xbox Controller\";\n        }\n    }\n\n    return \"Unknown XInput Device\";\n}\n\n// Lexically compare device objects\n//\nstatic int compareJoystickObjects(const void* first, const void* second)\n{\n    const _GLFWjoyobjectWin32* fo = first;\n    const _GLFWjoyobjectWin32* so = second;\n\n    if (fo->type != so->type)\n        return fo->type - so->type;\n\n    return fo->offset - so->offset;\n}\n\n// Checks whether the specified device supports XInput\n// Technique from FDInputJoystickManager::IsXInputDeviceFast in ZDoom\n//\nstatic GLFWbool supportsXInput(const GUID* guid)\n{\n    UINT i, count = 0;\n    RAWINPUTDEVICELIST* ridl;\n    GLFWbool result = GLFW_FALSE;\n\n    if (GetRawInputDeviceList(NULL, &count, sizeof(RAWINPUTDEVICELIST)) != 0)\n        return GLFW_FALSE;\n\n    ridl = calloc(count, sizeof(RAWINPUTDEVICELIST));\n\n    if (GetRawInputDeviceList(ridl, &count, sizeof(RAWINPUTDEVICELIST)) == (UINT) -1)\n    {\n        free(ridl);\n        return GLFW_FALSE;\n    }\n\n    for (i = 0;  i < count;  i++)\n    {\n        RID_DEVICE_INFO rdi;\n        char name[256];\n        UINT size;\n\n        if (ridl[i].dwType != RIM_TYPEHID)\n            continue;\n\n        ZeroMemory(&rdi, sizeof(rdi));\n        rdi.cbSize = sizeof(rdi);\n        size = sizeof(rdi);\n\n        if ((INT) GetRawInputDeviceInfoA(ridl[i].hDevice,\n                                         RIDI_DEVICEINFO,\n                                         &rdi, &size) == -1)\n        {\n            continue;\n        }\n\n        if (MAKELONG(rdi.hid.dwVendorId, rdi.hid.dwProductId) != (LONG) guid->Data1)\n            continue;\n\n        memset(name, 0, sizeof(name));\n        size = sizeof(name);\n\n        if ((INT) GetRawInputDeviceInfoA(ridl[i].hDevice,\n                                         RIDI_DEVICENAME,\n                                         name, &size) == -1)\n        {\n            break;\n        }\n\n        name[sizeof(name) - 1] = '\\0';\n        if (strstr(name, \"IG_\"))\n        {\n            result = GLFW_TRUE;\n            break;\n        }\n    }\n\n    free(ridl);\n    return result;\n}\n\n// Frees all resources associated with the specified joystick\n//\nstatic void closeJoystick(_GLFWjoystick* js)\n{\n    if (js->win32.device)\n    {\n        IDirectInputDevice8_Unacquire(js->win32.device);\n        IDirectInputDevice8_Release(js->win32.device);\n    }\n\n    free(js->win32.objects);\n\n    _glfwFreeJoystick(js);\n    _glfwInputJoystick(js, GLFW_DISCONNECTED);\n}\n\n// DirectInput device object enumeration callback\n// Insights gleaned from SDL\n//\nstatic BOOL CALLBACK deviceObjectCallback(const DIDEVICEOBJECTINSTANCEW* doi,\n                                          void* user)\n{\n    _GLFWobjenumWin32* data = user;\n    _GLFWjoyobjectWin32* object = data->objects + data->objectCount;\n\n    if (DIDFT_GETTYPE(doi->dwType) & DIDFT_AXIS)\n    {\n        DIPROPRANGE dipr;\n\n        if (memcmp(&doi->guidType, &GUID_Slider, sizeof(GUID)) == 0)\n            object->offset = DIJOFS_SLIDER(data->sliderCount);\n        else if (memcmp(&doi->guidType, &GUID_XAxis, sizeof(GUID)) == 0)\n            object->offset = DIJOFS_X;\n        else if (memcmp(&doi->guidType, &GUID_YAxis, sizeof(GUID)) == 0)\n            object->offset = DIJOFS_Y;\n        else if (memcmp(&doi->guidType, &GUID_ZAxis, sizeof(GUID)) == 0)\n            object->offset = DIJOFS_Z;\n        else if (memcmp(&doi->guidType, &GUID_RxAxis, sizeof(GUID)) == 0)\n            object->offset = DIJOFS_RX;\n        else if (memcmp(&doi->guidType, &GUID_RyAxis, sizeof(GUID)) == 0)\n            object->offset = DIJOFS_RY;\n        else if (memcmp(&doi->guidType, &GUID_RzAxis, sizeof(GUID)) == 0)\n            object->offset = DIJOFS_RZ;\n        else\n            return DIENUM_CONTINUE;\n\n        ZeroMemory(&dipr, sizeof(dipr));\n        dipr.diph.dwSize = sizeof(dipr);\n        dipr.diph.dwHeaderSize = sizeof(dipr.diph);\n        dipr.diph.dwObj = doi->dwType;\n        dipr.diph.dwHow = DIPH_BYID;\n        dipr.lMin = -32768;\n        dipr.lMax =  32767;\n\n        if (FAILED(IDirectInputDevice8_SetProperty(data->device,\n                                                   DIPROP_RANGE,\n                                                   &dipr.diph)))\n        {\n            return DIENUM_CONTINUE;\n        }\n\n        if (memcmp(&doi->guidType, &GUID_Slider, sizeof(GUID)) == 0)\n        {\n            object->type = _GLFW_TYPE_SLIDER;\n            data->sliderCount++;\n        }\n        else\n        {\n            object->type = _GLFW_TYPE_AXIS;\n            data->axisCount++;\n        }\n    }\n    else if (DIDFT_GETTYPE(doi->dwType) & DIDFT_BUTTON)\n    {\n        object->offset = DIJOFS_BUTTON(data->buttonCount);\n        object->type = _GLFW_TYPE_BUTTON;\n        data->buttonCount++;\n    }\n    else if (DIDFT_GETTYPE(doi->dwType) & DIDFT_POV)\n    {\n        object->offset = DIJOFS_POV(data->povCount);\n        object->type = _GLFW_TYPE_POV;\n        data->povCount++;\n    }\n\n    data->objectCount++;\n    return DIENUM_CONTINUE;\n}\n\n// DirectInput device enumeration callback\n//\nstatic BOOL CALLBACK deviceCallback(const DIDEVICEINSTANCE* di, void* user)\n{\n    int jid = 0;\n    DIDEVCAPS dc;\n    DIPROPDWORD dipd;\n    IDirectInputDevice8* device;\n    _GLFWobjenumWin32 data;\n    _GLFWjoystick* js;\n    char guid[33];\n    char name[256];\n\n    for (jid = 0;  jid <= GLFW_JOYSTICK_LAST;  jid++)\n    {\n        _GLFWjoystick* js = _glfw.joysticks + jid;\n        if (js->present)\n        {\n            if (memcmp(&js->win32.guid, &di->guidInstance, sizeof(GUID)) == 0)\n                return DIENUM_CONTINUE;\n        }\n    }\n\n    if (supportsXInput(&di->guidProduct))\n        return DIENUM_CONTINUE;\n\n    if (FAILED(IDirectInput8_CreateDevice(_glfw.win32.dinput8.api,\n                                          &di->guidInstance,\n                                          &device,\n                                          NULL)))\n    {\n        _glfwInputError(GLFW_PLATFORM_ERROR, \"Win32: Failed to create device\");\n        return DIENUM_CONTINUE;\n    }\n\n    if (FAILED(IDirectInputDevice8_SetDataFormat(device, &_glfwDataFormat)))\n    {\n        _glfwInputError(GLFW_PLATFORM_ERROR,\n                        \"Win32: Failed to set device data format\");\n\n        IDirectInputDevice8_Release(device);\n        return DIENUM_CONTINUE;\n    }\n\n    ZeroMemory(&dc, sizeof(dc));\n    dc.dwSize = sizeof(dc);\n\n    if (FAILED(IDirectInputDevice8_GetCapabilities(device, &dc)))\n    {\n        _glfwInputError(GLFW_PLATFORM_ERROR,\n                        \"Win32: Failed to query device capabilities\");\n\n        IDirectInputDevice8_Release(device);\n        return DIENUM_CONTINUE;\n    }\n\n    ZeroMemory(&dipd, sizeof(dipd));\n    dipd.diph.dwSize = sizeof(dipd);\n    dipd.diph.dwHeaderSize = sizeof(dipd.diph);\n    dipd.diph.dwHow = DIPH_DEVICE;\n    dipd.dwData = DIPROPAXISMODE_ABS;\n\n    if (FAILED(IDirectInputDevice8_SetProperty(device,\n                                               DIPROP_AXISMODE,\n                                               &dipd.diph)))\n    {\n        _glfwInputError(GLFW_PLATFORM_ERROR,\n                        \"Win32: Failed to set device axis mode\");\n\n        IDirectInputDevice8_Release(device);\n        return DIENUM_CONTINUE;\n    }\n\n    memset(&data, 0, sizeof(data));\n    data.device = device;\n    data.objects = calloc(dc.dwAxes + (size_t) dc.dwButtons + dc.dwPOVs,\n                          sizeof(_GLFWjoyobjectWin32));\n\n    if (FAILED(IDirectInputDevice8_EnumObjects(device,\n                                               deviceObjectCallback,\n                                               &data,\n                                               DIDFT_AXIS | DIDFT_BUTTON | DIDFT_POV)))\n    {\n        _glfwInputError(GLFW_PLATFORM_ERROR,\n                        \"Win32: Failed to enumerate device objects\");\n\n        IDirectInputDevice8_Release(device);\n        free(data.objects);\n        return DIENUM_CONTINUE;\n    }\n\n    qsort(data.objects, data.objectCount,\n          sizeof(_GLFWjoyobjectWin32),\n          compareJoystickObjects);\n\n    if (!WideCharToMultiByte(CP_UTF8, 0,\n                             di->tszInstanceName, -1,\n                             name, sizeof(name),\n                             NULL, NULL))\n    {\n        _glfwInputError(GLFW_PLATFORM_ERROR,\n                        \"Win32: Failed to convert joystick name to UTF-8\");\n\n        IDirectInputDevice8_Release(device);\n        free(data.objects);\n        return DIENUM_STOP;\n    }\n\n    // Generate a joystick GUID that matches the SDL 2.0.5+ one\n    if (memcmp(&di->guidProduct.Data4[2], \"PIDVID\", 6) == 0)\n    {\n        sprintf(guid, \"03000000%02x%02x0000%02x%02x000000000000\",\n                (uint8_t) di->guidProduct.Data1,\n                (uint8_t) (di->guidProduct.Data1 >> 8),\n                (uint8_t) (di->guidProduct.Data1 >> 16),\n                (uint8_t) (di->guidProduct.Data1 >> 24));\n    }\n    else\n    {\n        sprintf(guid, \"05000000%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x00\",\n                name[0], name[1], name[2], name[3],\n                name[4], name[5], name[6], name[7],\n                name[8], name[9], name[10]);\n    }\n\n    js = _glfwAllocJoystick(name, guid,\n                            data.axisCount + data.sliderCount,\n                            data.buttonCount,\n                            data.povCount);\n    if (!js)\n    {\n        IDirectInputDevice8_Release(device);\n        free(data.objects);\n        return DIENUM_STOP;\n    }\n\n    js->win32.device = device;\n    js->win32.guid = di->guidInstance;\n    js->win32.objects = data.objects;\n    js->win32.objectCount = data.objectCount;\n\n    _glfwInputJoystick(js, GLFW_CONNECTED);\n    return DIENUM_CONTINUE;\n}\n\n\n//////////////////////////////////////////////////////////////////////////\n//////                       GLFW internal API                      //////\n//////////////////////////////////////////////////////////////////////////\n\n// Initialize joystick interface\n//\nvoid _glfwInitJoysticksWin32(void)\n{\n    if (_glfw.win32.dinput8.instance)\n    {\n        if (FAILED(DirectInput8Create(GetModuleHandle(NULL),\n                                      DIRECTINPUT_VERSION,\n                                      &IID_IDirectInput8W,\n                                      (void**) &_glfw.win32.dinput8.api,\n                                      NULL)))\n        {\n            _glfwInputError(GLFW_PLATFORM_ERROR,\n                            \"Win32: Failed to create interface\");\n        }\n    }\n\n    _glfwDetectJoystickConnectionWin32();\n}\n\n// Close all opened joystick handles\n//\nvoid _glfwTerminateJoysticksWin32(void)\n{\n    int jid;\n\n    for (jid = GLFW_JOYSTICK_1;  jid <= GLFW_JOYSTICK_LAST;  jid++)\n        closeJoystick(_glfw.joysticks + jid);\n\n    if (_glfw.win32.dinput8.api)\n        IDirectInput8_Release(_glfw.win32.dinput8.api);\n}\n\n// Checks for new joysticks after DBT_DEVICEARRIVAL\n//\nvoid _glfwDetectJoystickConnectionWin32(void)\n{\n    if (_glfw.win32.xinput.instance)\n    {\n        DWORD index;\n\n        for (index = 0;  index < XUSER_MAX_COUNT;  index++)\n        {\n            int jid;\n            char guid[33];\n            XINPUT_CAPABILITIES xic;\n            _GLFWjoystick* js;\n\n            for (jid = 0;  jid <= GLFW_JOYSTICK_LAST;  jid++)\n            {\n                if (_glfw.joysticks[jid].present &&\n                    _glfw.joysticks[jid].win32.device == NULL &&\n                    _glfw.joysticks[jid].win32.index == index)\n                {\n                    break;\n                }\n            }\n\n            if (jid <= GLFW_JOYSTICK_LAST)\n                continue;\n\n            if (XInputGetCapabilities(index, 0, &xic) != ERROR_SUCCESS)\n                continue;\n\n            // Generate a joystick GUID that matches the SDL 2.0.5+ one\n            sprintf(guid, \"78696e707574%02x000000000000000000\",\n                    xic.SubType & 0xff);\n\n            js = _glfwAllocJoystick(getDeviceDescription(&xic), guid, 6, 10, 1);\n            if (!js)\n                continue;\n\n            js->win32.index = index;\n\n            _glfwInputJoystick(js, GLFW_CONNECTED);\n        }\n    }\n\n    if (_glfw.win32.dinput8.api)\n    {\n        if (FAILED(IDirectInput8_EnumDevices(_glfw.win32.dinput8.api,\n                                             DI8DEVCLASS_GAMECTRL,\n                                             deviceCallback,\n                                             NULL,\n                                             DIEDFL_ALLDEVICES)))\n        {\n            _glfwInputError(GLFW_PLATFORM_ERROR,\n                            \"Failed to enumerate DirectInput8 devices\");\n            return;\n        }\n    }\n}\n\n// Checks for joystick disconnection after DBT_DEVICEREMOVECOMPLETE\n//\nvoid _glfwDetectJoystickDisconnectionWin32(void)\n{\n    int jid;\n\n    for (jid = 0;  jid <= GLFW_JOYSTICK_LAST;  jid++)\n    {\n        _GLFWjoystick* js = _glfw.joysticks + jid;\n        if (js->present)\n            _glfwPlatformPollJoystick(js, _GLFW_POLL_PRESENCE);\n    }\n}\n\n\n//////////////////////////////////////////////////////////////////////////\n//////                       GLFW platform API                      //////\n//////////////////////////////////////////////////////////////////////////\n\nint _glfwPlatformPollJoystick(_GLFWjoystick* js, int mode)\n{\n    if (js->win32.device)\n    {\n        int i, ai = 0, bi = 0, pi = 0;\n        HRESULT result;\n        DIJOYSTATE state;\n\n        IDirectInputDevice8_Poll(js->win32.device);\n        result = IDirectInputDevice8_GetDeviceState(js->win32.device,\n                                                    sizeof(state),\n                                                    &state);\n        if (result == DIERR_NOTACQUIRED || result == DIERR_INPUTLOST)\n        {\n            IDirectInputDevice8_Acquire(js->win32.device);\n            IDirectInputDevice8_Poll(js->win32.device);\n            result = IDirectInputDevice8_GetDeviceState(js->win32.device,\n                                                        sizeof(state),\n                                                        &state);\n        }\n\n        if (FAILED(result))\n        {\n            closeJoystick(js);\n            return GLFW_FALSE;\n        }\n\n        if (mode == _GLFW_POLL_PRESENCE)\n            return GLFW_TRUE;\n\n        for (i = 0;  i < js->win32.objectCount;  i++)\n        {\n            const void* data = (char*) &state + js->win32.objects[i].offset;\n\n            switch (js->win32.objects[i].type)\n            {\n                case _GLFW_TYPE_AXIS:\n                case _GLFW_TYPE_SLIDER:\n                {\n                    const float value = (*((LONG*) data) + 0.5f) / 32767.5f;\n                    _glfwInputJoystickAxis(js, ai, value);\n                    ai++;\n                    break;\n                }\n\n                case _GLFW_TYPE_BUTTON:\n                {\n                    const char value = (*((BYTE*) data) & 0x80) != 0;\n                    _glfwInputJoystickButton(js, bi, value);\n                    bi++;\n                    break;\n                }\n\n                case _GLFW_TYPE_POV:\n                {\n                    const int states[9] =\n                    {\n                        GLFW_HAT_UP,\n                        GLFW_HAT_RIGHT_UP,\n                        GLFW_HAT_RIGHT,\n                        GLFW_HAT_RIGHT_DOWN,\n                        GLFW_HAT_DOWN,\n                        GLFW_HAT_LEFT_DOWN,\n                        GLFW_HAT_LEFT,\n                        GLFW_HAT_LEFT_UP,\n                        GLFW_HAT_CENTERED\n                    };\n\n                    // Screams of horror are appropriate at this point\n                    int state = LOWORD(*(DWORD*) data) / (45 * DI_DEGREES);\n                    if (state < 0 || state > 8)\n                        state = 8;\n\n                    _glfwInputJoystickHat(js, pi, states[state]);\n                    pi++;\n                    break;\n                }\n            }\n        }\n    }\n    else\n    {\n        int i, dpad = 0;\n        DWORD result;\n        XINPUT_STATE xis;\n        const WORD buttons[10] =\n        {\n            XINPUT_GAMEPAD_A,\n            XINPUT_GAMEPAD_B,\n            XINPUT_GAMEPAD_X,\n            XINPUT_GAMEPAD_Y,\n            XINPUT_GAMEPAD_LEFT_SHOULDER,\n            XINPUT_GAMEPAD_RIGHT_SHOULDER,\n            XINPUT_GAMEPAD_BACK,\n            XINPUT_GAMEPAD_START,\n            XINPUT_GAMEPAD_LEFT_THUMB,\n            XINPUT_GAMEPAD_RIGHT_THUMB\n        };\n\n        result = XInputGetState(js->win32.index, &xis);\n        if (result != ERROR_SUCCESS)\n        {\n            if (result == ERROR_DEVICE_NOT_CONNECTED)\n                closeJoystick(js);\n\n            return GLFW_FALSE;\n        }\n\n        if (mode == _GLFW_POLL_PRESENCE)\n            return GLFW_TRUE;\n\n        _glfwInputJoystickAxis(js, 0, (xis.Gamepad.sThumbLX + 0.5f) / 32767.5f);\n        _glfwInputJoystickAxis(js, 1, -(xis.Gamepad.sThumbLY + 0.5f) / 32767.5f);\n        _glfwInputJoystickAxis(js, 2, (xis.Gamepad.sThumbRX + 0.5f) / 32767.5f);\n        _glfwInputJoystickAxis(js, 3, -(xis.Gamepad.sThumbRY + 0.5f) / 32767.5f);\n        _glfwInputJoystickAxis(js, 4, xis.Gamepad.bLeftTrigger / 127.5f - 1.f);\n        _glfwInputJoystickAxis(js, 5, xis.Gamepad.bRightTrigger / 127.5f - 1.f);\n\n        for (i = 0;  i < 10;  i++)\n        {\n            const char value = (xis.Gamepad.wButtons & buttons[i]) ? 1 : 0;\n            _glfwInputJoystickButton(js, i, value);\n        }\n\n        if (xis.Gamepad.wButtons & XINPUT_GAMEPAD_DPAD_UP)\n            dpad |= GLFW_HAT_UP;\n        if (xis.Gamepad.wButtons & XINPUT_GAMEPAD_DPAD_RIGHT)\n            dpad |= GLFW_HAT_RIGHT;\n        if (xis.Gamepad.wButtons & XINPUT_GAMEPAD_DPAD_DOWN)\n            dpad |= GLFW_HAT_DOWN;\n        if (xis.Gamepad.wButtons & XINPUT_GAMEPAD_DPAD_LEFT)\n            dpad |= GLFW_HAT_LEFT;\n\n        _glfwInputJoystickHat(js, 0, dpad);\n    }\n\n    return GLFW_TRUE;\n}\n\nvoid _glfwPlatformUpdateGamepadGUID(char* guid)\n{\n    if (strcmp(guid + 20, \"504944564944\") == 0)\n    {\n        char original[33];\n        strncpy(original, guid, sizeof(original) - 1);\n        sprintf(guid, \"03000000%.4s0000%.4s000000000000\",\n                original, original + 4);\n    }\n}\n\n"
  },
  {
    "path": "thirdparty/glfw/src/win32_joystick.h",
    "content": "//========================================================================\n// GLFW 3.3 Win32 - www.glfw.org\n//------------------------------------------------------------------------\n// Copyright (c) 2006-2017 Camilla Löwy <elmindreda@glfw.org>\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//    claim that you wrote the original software. If you use this software\n//    in a product, an acknowledgment in the product documentation would\n//    be appreciated but is not required.\n//\n// 2. Altered source versions must be plainly marked as such, and must not\n//    be misrepresented as being the original software.\n//\n// 3. This notice may not be removed or altered from any source\n//    distribution.\n//\n//========================================================================\n\n#define _GLFW_PLATFORM_JOYSTICK_STATE         _GLFWjoystickWin32 win32\n#define _GLFW_PLATFORM_LIBRARY_JOYSTICK_STATE struct { int dummyLibraryJoystick; }\n\n#define _GLFW_PLATFORM_MAPPING_NAME \"Windows\"\n\n// Joystick element (axis, button or slider)\n//\ntypedef struct _GLFWjoyobjectWin32\n{\n    int                     offset;\n    int                     type;\n} _GLFWjoyobjectWin32;\n\n// Win32-specific per-joystick data\n//\ntypedef struct _GLFWjoystickWin32\n{\n    _GLFWjoyobjectWin32*    objects;\n    int                     objectCount;\n    IDirectInputDevice8W*   device;\n    DWORD                   index;\n    GUID                    guid;\n} _GLFWjoystickWin32;\n\n\nvoid _glfwInitJoysticksWin32(void);\nvoid _glfwTerminateJoysticksWin32(void);\nvoid _glfwDetectJoystickConnectionWin32(void);\nvoid _glfwDetectJoystickDisconnectionWin32(void);\n\n"
  },
  {
    "path": "thirdparty/glfw/src/win32_monitor.c",
    "content": "//========================================================================\n// GLFW 3.3 Win32 - www.glfw.org\n//------------------------------------------------------------------------\n// Copyright (c) 2002-2006 Marcus Geelnard\n// Copyright (c) 2006-2019 Camilla Löwy <elmindreda@glfw.org>\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//    claim that you wrote the original software. If you use this software\n//    in a product, an acknowledgment in the product documentation would\n//    be appreciated but is not required.\n//\n// 2. Altered source versions must be plainly marked as such, and must not\n//    be misrepresented as being the original software.\n//\n// 3. This notice may not be removed or altered from any source\n//    distribution.\n//\n//========================================================================\n// Please use C89 style variable declarations in this file because VS 2010\n//========================================================================\n\n#include \"internal.h\"\n\n#include <stdlib.h>\n#include <string.h>\n#include <limits.h>\n#include <malloc.h>\n#include <wchar.h>\n\n\n// Callback for EnumDisplayMonitors in createMonitor\n//\nstatic BOOL CALLBACK monitorCallback(HMONITOR handle,\n                                     HDC dc,\n                                     RECT* rect,\n                                     LPARAM data)\n{\n    MONITORINFOEXW mi;\n    ZeroMemory(&mi, sizeof(mi));\n    mi.cbSize = sizeof(mi);\n\n    if (GetMonitorInfoW(handle, (MONITORINFO*) &mi))\n    {\n        _GLFWmonitor* monitor = (_GLFWmonitor*) data;\n        if (wcscmp(mi.szDevice, monitor->win32.adapterName) == 0)\n            monitor->win32.handle = handle;\n    }\n\n    return TRUE;\n}\n\n// Create monitor from an adapter and (optionally) a display\n//\nstatic _GLFWmonitor* createMonitor(DISPLAY_DEVICEW* adapter,\n                                   DISPLAY_DEVICEW* display)\n{\n    _GLFWmonitor* monitor;\n    int widthMM, heightMM;\n    char* name;\n    HDC dc;\n    DEVMODEW dm;\n    RECT rect;\n\n    if (display)\n        name = _glfwCreateUTF8FromWideStringWin32(display->DeviceString);\n    else\n        name = _glfwCreateUTF8FromWideStringWin32(adapter->DeviceString);\n    if (!name)\n        return NULL;\n\n    ZeroMemory(&dm, sizeof(dm));\n    dm.dmSize = sizeof(dm);\n    EnumDisplaySettingsW(adapter->DeviceName, ENUM_CURRENT_SETTINGS, &dm);\n\n    dc = CreateDCW(L\"DISPLAY\", adapter->DeviceName, NULL, NULL);\n\n    if (IsWindows8Point1OrGreater())\n    {\n        widthMM  = GetDeviceCaps(dc, HORZSIZE);\n        heightMM = GetDeviceCaps(dc, VERTSIZE);\n    }\n    else\n    {\n        widthMM  = (int) (dm.dmPelsWidth * 25.4f / GetDeviceCaps(dc, LOGPIXELSX));\n        heightMM = (int) (dm.dmPelsHeight * 25.4f / GetDeviceCaps(dc, LOGPIXELSY));\n    }\n\n    DeleteDC(dc);\n\n    monitor = _glfwAllocMonitor(name, widthMM, heightMM);\n    free(name);\n\n    if (adapter->StateFlags & DISPLAY_DEVICE_MODESPRUNED)\n        monitor->win32.modesPruned = GLFW_TRUE;\n\n    wcscpy(monitor->win32.adapterName, adapter->DeviceName);\n    WideCharToMultiByte(CP_UTF8, 0,\n                        adapter->DeviceName, -1,\n                        monitor->win32.publicAdapterName,\n                        sizeof(monitor->win32.publicAdapterName),\n                        NULL, NULL);\n\n    if (display)\n    {\n        wcscpy(monitor->win32.displayName, display->DeviceName);\n        WideCharToMultiByte(CP_UTF8, 0,\n                            display->DeviceName, -1,\n                            monitor->win32.publicDisplayName,\n                            sizeof(monitor->win32.publicDisplayName),\n                            NULL, NULL);\n    }\n\n    rect.left   = dm.dmPosition.x;\n    rect.top    = dm.dmPosition.y;\n    rect.right  = dm.dmPosition.x + dm.dmPelsWidth;\n    rect.bottom = dm.dmPosition.y + dm.dmPelsHeight;\n\n    EnumDisplayMonitors(NULL, &rect, monitorCallback, (LPARAM) monitor);\n    return monitor;\n}\n\n\n//////////////////////////////////////////////////////////////////////////\n//////                       GLFW internal API                      //////\n//////////////////////////////////////////////////////////////////////////\n\n// Poll for changes in the set of connected monitors\n//\nvoid _glfwPollMonitorsWin32(void)\n{\n    int i, disconnectedCount;\n    _GLFWmonitor** disconnected = NULL;\n    DWORD adapterIndex, displayIndex;\n    DISPLAY_DEVICEW adapter, display;\n    _GLFWmonitor* monitor;\n\n    disconnectedCount = _glfw.monitorCount;\n    if (disconnectedCount)\n    {\n        disconnected = calloc(_glfw.monitorCount, sizeof(_GLFWmonitor*));\n        memcpy(disconnected,\n               _glfw.monitors,\n               _glfw.monitorCount * sizeof(_GLFWmonitor*));\n    }\n\n    for (adapterIndex = 0;  ;  adapterIndex++)\n    {\n        int type = _GLFW_INSERT_LAST;\n\n        ZeroMemory(&adapter, sizeof(adapter));\n        adapter.cb = sizeof(adapter);\n\n        if (!EnumDisplayDevicesW(NULL, adapterIndex, &adapter, 0))\n            break;\n\n        if (!(adapter.StateFlags & DISPLAY_DEVICE_ACTIVE))\n            continue;\n\n        if (adapter.StateFlags & DISPLAY_DEVICE_PRIMARY_DEVICE)\n            type = _GLFW_INSERT_FIRST;\n\n        for (displayIndex = 0;  ;  displayIndex++)\n        {\n            ZeroMemory(&display, sizeof(display));\n            display.cb = sizeof(display);\n\n            if (!EnumDisplayDevicesW(adapter.DeviceName, displayIndex, &display, 0))\n                break;\n\n            if (!(display.StateFlags & DISPLAY_DEVICE_ACTIVE))\n                continue;\n\n            for (i = 0;  i < disconnectedCount;  i++)\n            {\n                if (disconnected[i] &&\n                    wcscmp(disconnected[i]->win32.displayName,\n                           display.DeviceName) == 0)\n                {\n                    disconnected[i] = NULL;\n                    break;\n                }\n            }\n\n            if (i < disconnectedCount)\n                continue;\n\n            monitor = createMonitor(&adapter, &display);\n            if (!monitor)\n            {\n                free(disconnected);\n                return;\n            }\n\n            _glfwInputMonitor(monitor, GLFW_CONNECTED, type);\n\n            type = _GLFW_INSERT_LAST;\n        }\n\n        // HACK: If an active adapter does not have any display devices\n        //       (as sometimes happens), add it directly as a monitor\n        if (displayIndex == 0)\n        {\n            for (i = 0;  i < disconnectedCount;  i++)\n            {\n                if (disconnected[i] &&\n                    wcscmp(disconnected[i]->win32.adapterName,\n                           adapter.DeviceName) == 0)\n                {\n                    disconnected[i] = NULL;\n                    break;\n                }\n            }\n\n            if (i < disconnectedCount)\n                continue;\n\n            monitor = createMonitor(&adapter, NULL);\n            if (!monitor)\n            {\n                free(disconnected);\n                return;\n            }\n\n            _glfwInputMonitor(monitor, GLFW_CONNECTED, type);\n        }\n    }\n\n    for (i = 0;  i < disconnectedCount;  i++)\n    {\n        if (disconnected[i])\n            _glfwInputMonitor(disconnected[i], GLFW_DISCONNECTED, 0);\n    }\n\n    free(disconnected);\n}\n\n// Change the current video mode\n//\nvoid _glfwSetVideoModeWin32(_GLFWmonitor* monitor, const GLFWvidmode* desired)\n{\n    GLFWvidmode current;\n    const GLFWvidmode* best;\n    DEVMODEW dm;\n    LONG result;\n\n    best = _glfwChooseVideoMode(monitor, desired);\n    _glfwPlatformGetVideoMode(monitor, &current);\n    if (_glfwCompareVideoModes(&current, best) == 0)\n        return;\n\n    ZeroMemory(&dm, sizeof(dm));\n    dm.dmSize = sizeof(dm);\n    dm.dmFields           = DM_PELSWIDTH | DM_PELSHEIGHT | DM_BITSPERPEL |\n                            DM_DISPLAYFREQUENCY;\n    dm.dmPelsWidth        = best->width;\n    dm.dmPelsHeight       = best->height;\n    dm.dmBitsPerPel       = best->redBits + best->greenBits + best->blueBits;\n    dm.dmDisplayFrequency = best->refreshRate;\n\n    if (dm.dmBitsPerPel < 15 || dm.dmBitsPerPel >= 24)\n        dm.dmBitsPerPel = 32;\n\n    result = ChangeDisplaySettingsExW(monitor->win32.adapterName,\n                                      &dm,\n                                      NULL,\n                                      CDS_FULLSCREEN,\n                                      NULL);\n    if (result == DISP_CHANGE_SUCCESSFUL)\n        monitor->win32.modeChanged = GLFW_TRUE;\n    else\n    {\n        const char* description = \"Unknown error\";\n\n        if (result == DISP_CHANGE_BADDUALVIEW)\n            description = \"The system uses DualView\";\n        else if (result == DISP_CHANGE_BADFLAGS)\n            description = \"Invalid flags\";\n        else if (result == DISP_CHANGE_BADMODE)\n            description = \"Graphics mode not supported\";\n        else if (result == DISP_CHANGE_BADPARAM)\n            description = \"Invalid parameter\";\n        else if (result == DISP_CHANGE_FAILED)\n            description = \"Graphics mode failed\";\n        else if (result == DISP_CHANGE_NOTUPDATED)\n            description = \"Failed to write to registry\";\n        else if (result == DISP_CHANGE_RESTART)\n            description = \"Computer restart required\";\n\n        _glfwInputError(GLFW_PLATFORM_ERROR,\n                        \"Win32: Failed to set video mode: %s\",\n                        description);\n    }\n}\n\n// Restore the previously saved (original) video mode\n//\nvoid _glfwRestoreVideoModeWin32(_GLFWmonitor* monitor)\n{\n    if (monitor->win32.modeChanged)\n    {\n        ChangeDisplaySettingsExW(monitor->win32.adapterName,\n                                 NULL, NULL, CDS_FULLSCREEN, NULL);\n        monitor->win32.modeChanged = GLFW_FALSE;\n    }\n}\n\nvoid _glfwGetMonitorContentScaleWin32(HMONITOR handle, float* xscale, float* yscale)\n{\n    UINT xdpi, ydpi;\n\n    if (IsWindows8Point1OrGreater())\n        GetDpiForMonitor(handle, MDT_EFFECTIVE_DPI, &xdpi, &ydpi);\n    else\n    {\n        const HDC dc = GetDC(NULL);\n        xdpi = GetDeviceCaps(dc, LOGPIXELSX);\n        ydpi = GetDeviceCaps(dc, LOGPIXELSY);\n        ReleaseDC(NULL, dc);\n    }\n\n    if (xscale)\n        *xscale = xdpi / (float) USER_DEFAULT_SCREEN_DPI;\n    if (yscale)\n        *yscale = ydpi / (float) USER_DEFAULT_SCREEN_DPI;\n}\n\n\n//////////////////////////////////////////////////////////////////////////\n//////                       GLFW platform API                      //////\n//////////////////////////////////////////////////////////////////////////\n\nvoid _glfwPlatformFreeMonitor(_GLFWmonitor* monitor)\n{\n}\n\nvoid _glfwPlatformGetMonitorPos(_GLFWmonitor* monitor, int* xpos, int* ypos)\n{\n    DEVMODEW dm;\n    ZeroMemory(&dm, sizeof(dm));\n    dm.dmSize = sizeof(dm);\n\n    EnumDisplaySettingsExW(monitor->win32.adapterName,\n                           ENUM_CURRENT_SETTINGS,\n                           &dm,\n                           EDS_ROTATEDMODE);\n\n    if (xpos)\n        *xpos = dm.dmPosition.x;\n    if (ypos)\n        *ypos = dm.dmPosition.y;\n}\n\nvoid _glfwPlatformGetMonitorContentScale(_GLFWmonitor* monitor,\n                                         float* xscale, float* yscale)\n{\n    _glfwGetMonitorContentScaleWin32(monitor->win32.handle, xscale, yscale);\n}\n\nvoid _glfwPlatformGetMonitorWorkarea(_GLFWmonitor* monitor,\n                                     int* xpos, int* ypos,\n                                     int* width, int* height)\n{\n    MONITORINFO mi = { sizeof(mi) };\n    GetMonitorInfo(monitor->win32.handle, &mi);\n\n    if (xpos)\n        *xpos = mi.rcWork.left;\n    if (ypos)\n        *ypos = mi.rcWork.top;\n    if (width)\n        *width = mi.rcWork.right - mi.rcWork.left;\n    if (height)\n        *height = mi.rcWork.bottom - mi.rcWork.top;\n}\n\nGLFWvidmode* _glfwPlatformGetVideoModes(_GLFWmonitor* monitor, int* count)\n{\n    int modeIndex = 0, size = 0;\n    GLFWvidmode* result = NULL;\n\n    *count = 0;\n\n    for (;;)\n    {\n        int i;\n        GLFWvidmode mode;\n        DEVMODEW dm;\n\n        ZeroMemory(&dm, sizeof(dm));\n        dm.dmSize = sizeof(dm);\n\n        if (!EnumDisplaySettingsW(monitor->win32.adapterName, modeIndex, &dm))\n            break;\n\n        modeIndex++;\n\n        // Skip modes with less than 15 BPP\n        if (dm.dmBitsPerPel < 15)\n            continue;\n\n        mode.width  = dm.dmPelsWidth;\n        mode.height = dm.dmPelsHeight;\n        mode.refreshRate = dm.dmDisplayFrequency;\n        _glfwSplitBPP(dm.dmBitsPerPel,\n                      &mode.redBits,\n                      &mode.greenBits,\n                      &mode.blueBits);\n\n        for (i = 0;  i < *count;  i++)\n        {\n            if (_glfwCompareVideoModes(result + i, &mode) == 0)\n                break;\n        }\n\n        // Skip duplicate modes\n        if (i < *count)\n            continue;\n\n        if (monitor->win32.modesPruned)\n        {\n            // Skip modes not supported by the connected displays\n            if (ChangeDisplaySettingsExW(monitor->win32.adapterName,\n                                         &dm,\n                                         NULL,\n                                         CDS_TEST,\n                                         NULL) != DISP_CHANGE_SUCCESSFUL)\n            {\n                continue;\n            }\n        }\n\n        if (*count == size)\n        {\n            size += 128;\n            result = (GLFWvidmode*) realloc(result, size * sizeof(GLFWvidmode));\n        }\n\n        (*count)++;\n        result[*count - 1] = mode;\n    }\n\n    if (!*count)\n    {\n        // HACK: Report the current mode if no valid modes were found\n        result = calloc(1, sizeof(GLFWvidmode));\n        _glfwPlatformGetVideoMode(monitor, result);\n        *count = 1;\n    }\n\n    return result;\n}\n\nvoid _glfwPlatformGetVideoMode(_GLFWmonitor* monitor, GLFWvidmode* mode)\n{\n    DEVMODEW dm;\n    ZeroMemory(&dm, sizeof(dm));\n    dm.dmSize = sizeof(dm);\n\n    EnumDisplaySettingsW(monitor->win32.adapterName, ENUM_CURRENT_SETTINGS, &dm);\n\n    mode->width  = dm.dmPelsWidth;\n    mode->height = dm.dmPelsHeight;\n    mode->refreshRate = dm.dmDisplayFrequency;\n    _glfwSplitBPP(dm.dmBitsPerPel,\n                  &mode->redBits,\n                  &mode->greenBits,\n                  &mode->blueBits);\n}\n\nGLFWbool _glfwPlatformGetGammaRamp(_GLFWmonitor* monitor, GLFWgammaramp* ramp)\n{\n    HDC dc;\n    WORD values[3][256];\n\n    dc = CreateDCW(L\"DISPLAY\", monitor->win32.adapterName, NULL, NULL);\n    GetDeviceGammaRamp(dc, values);\n    DeleteDC(dc);\n\n    _glfwAllocGammaArrays(ramp, 256);\n\n    memcpy(ramp->red,   values[0], sizeof(values[0]));\n    memcpy(ramp->green, values[1], sizeof(values[1]));\n    memcpy(ramp->blue,  values[2], sizeof(values[2]));\n\n    return GLFW_TRUE;\n}\n\nvoid _glfwPlatformSetGammaRamp(_GLFWmonitor* monitor, const GLFWgammaramp* ramp)\n{\n    HDC dc;\n    WORD values[3][256];\n\n    if (ramp->size != 256)\n    {\n        _glfwInputError(GLFW_PLATFORM_ERROR,\n                        \"Win32: Gamma ramp size must be 256\");\n        return;\n    }\n\n    memcpy(values[0], ramp->red,   sizeof(values[0]));\n    memcpy(values[1], ramp->green, sizeof(values[1]));\n    memcpy(values[2], ramp->blue,  sizeof(values[2]));\n\n    dc = CreateDCW(L\"DISPLAY\", monitor->win32.adapterName, NULL, NULL);\n    SetDeviceGammaRamp(dc, values);\n    DeleteDC(dc);\n}\n\n\n//////////////////////////////////////////////////////////////////////////\n//////                        GLFW native API                       //////\n//////////////////////////////////////////////////////////////////////////\n\nGLFWAPI const char* glfwGetWin32Adapter(GLFWmonitor* handle)\n{\n    _GLFWmonitor* monitor = (_GLFWmonitor*) handle;\n    _GLFW_REQUIRE_INIT_OR_RETURN(NULL);\n    return monitor->win32.publicAdapterName;\n}\n\nGLFWAPI const char* glfwGetWin32Monitor(GLFWmonitor* handle)\n{\n    _GLFWmonitor* monitor = (_GLFWmonitor*) handle;\n    _GLFW_REQUIRE_INIT_OR_RETURN(NULL);\n    return monitor->win32.publicDisplayName;\n}\n\n"
  },
  {
    "path": "thirdparty/glfw/src/win32_platform.h",
    "content": "//========================================================================\n// GLFW 3.3 Win32 - www.glfw.org\n//------------------------------------------------------------------------\n// Copyright (c) 2002-2006 Marcus Geelnard\n// Copyright (c) 2006-2019 Camilla Löwy <elmindreda@glfw.org>\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//    claim that you wrote the original software. If you use this software\n//    in a product, an acknowledgment in the product documentation would\n//    be appreciated but is not required.\n//\n// 2. Altered source versions must be plainly marked as such, and must not\n//    be misrepresented as being the original software.\n//\n// 3. This notice may not be removed or altered from any source\n//    distribution.\n//\n//========================================================================\n\n// We don't need all the fancy stuff\n#ifndef NOMINMAX\n #define NOMINMAX\n#endif\n\n#ifndef VC_EXTRALEAN\n #define VC_EXTRALEAN\n#endif\n\n#ifndef WIN32_LEAN_AND_MEAN\n #define WIN32_LEAN_AND_MEAN\n#endif\n\n// This is a workaround for the fact that glfw3.h needs to export APIENTRY (for\n// example to allow applications to correctly declare a GL_ARB_debug_output\n// callback) but windows.h assumes no one will define APIENTRY before it does\n#undef APIENTRY\n\n// GLFW on Windows is Unicode only and does not work in MBCS mode\n#ifndef UNICODE\n #define UNICODE\n#endif\n\n// GLFW requires Windows XP or later\n#if WINVER < 0x0501\n #undef WINVER\n #define WINVER 0x0501\n#endif\n#if _WIN32_WINNT < 0x0501\n #undef _WIN32_WINNT\n #define _WIN32_WINNT 0x0501\n#endif\n\n// GLFW uses DirectInput8 interfaces\n#define DIRECTINPUT_VERSION 0x0800\n\n// GLFW uses OEM cursor resources\n#define OEMRESOURCE\n\n#include <wctype.h>\n#include <windows.h>\n#include <dinput.h>\n#include <xinput.h>\n#include <dbt.h>\n\n// HACK: Define macros that some windows.h variants don't\n#ifndef WM_MOUSEHWHEEL\n #define WM_MOUSEHWHEEL 0x020E\n#endif\n#ifndef WM_DWMCOMPOSITIONCHANGED\n #define WM_DWMCOMPOSITIONCHANGED 0x031E\n#endif\n#ifndef WM_COPYGLOBALDATA\n #define WM_COPYGLOBALDATA 0x0049\n#endif\n#ifndef WM_UNICHAR\n #define WM_UNICHAR 0x0109\n#endif\n#ifndef UNICODE_NOCHAR\n #define UNICODE_NOCHAR 0xFFFF\n#endif\n#ifndef WM_DPICHANGED\n #define WM_DPICHANGED 0x02E0\n#endif\n#ifndef GET_XBUTTON_WPARAM\n #define GET_XBUTTON_WPARAM(w) (HIWORD(w))\n#endif\n#ifndef EDS_ROTATEDMODE\n #define EDS_ROTATEDMODE 0x00000004\n#endif\n#ifndef DISPLAY_DEVICE_ACTIVE\n #define DISPLAY_DEVICE_ACTIVE 0x00000001\n#endif\n#ifndef _WIN32_WINNT_WINBLUE\n #define _WIN32_WINNT_WINBLUE 0x0602\n#endif\n#ifndef _WIN32_WINNT_WIN8\n #define _WIN32_WINNT_WIN8 0x0602\n#endif\n#ifndef WM_GETDPISCALEDSIZE\n #define WM_GETDPISCALEDSIZE 0x02e4\n#endif\n#ifndef USER_DEFAULT_SCREEN_DPI\n #define USER_DEFAULT_SCREEN_DPI 96\n#endif\n#ifndef OCR_HAND\n #define OCR_HAND 32649\n#endif\n\n#if WINVER < 0x0601\ntypedef struct\n{\n    DWORD cbSize;\n    DWORD ExtStatus;\n} CHANGEFILTERSTRUCT;\n#ifndef MSGFLT_ALLOW\n #define MSGFLT_ALLOW 1\n#endif\n#endif /*Windows 7*/\n\n#if WINVER < 0x0600\n#define DWM_BB_ENABLE 0x00000001\n#define DWM_BB_BLURREGION 0x00000002\ntypedef struct\n{\n    DWORD dwFlags;\n    BOOL fEnable;\n    HRGN hRgnBlur;\n    BOOL fTransitionOnMaximized;\n} DWM_BLURBEHIND;\n#else\n #include <dwmapi.h>\n#endif /*Windows Vista*/\n\n#ifndef DPI_ENUMS_DECLARED\ntypedef enum\n{\n    PROCESS_DPI_UNAWARE = 0,\n    PROCESS_SYSTEM_DPI_AWARE = 1,\n    PROCESS_PER_MONITOR_DPI_AWARE = 2\n} PROCESS_DPI_AWARENESS;\ntypedef enum\n{\n    MDT_EFFECTIVE_DPI = 0,\n    MDT_ANGULAR_DPI = 1,\n    MDT_RAW_DPI = 2,\n    MDT_DEFAULT = MDT_EFFECTIVE_DPI\n} MONITOR_DPI_TYPE;\n#endif /*DPI_ENUMS_DECLARED*/\n\n#ifndef DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2\n#define DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2 ((HANDLE) -4)\n#endif /*DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2*/\n\n// HACK: Define versionhelpers.h functions manually as MinGW lacks the header\n#define IsWindowsXPOrGreater()                                 \\\n    _glfwIsWindowsVersionOrGreaterWin32(HIBYTE(_WIN32_WINNT_WINXP),   \\\n                                        LOBYTE(_WIN32_WINNT_WINXP), 0)\n#define IsWindowsVistaOrGreater()                                     \\\n    _glfwIsWindowsVersionOrGreaterWin32(HIBYTE(_WIN32_WINNT_VISTA),   \\\n                                        LOBYTE(_WIN32_WINNT_VISTA), 0)\n#define IsWindows7OrGreater()                                         \\\n    _glfwIsWindowsVersionOrGreaterWin32(HIBYTE(_WIN32_WINNT_WIN7),    \\\n                                        LOBYTE(_WIN32_WINNT_WIN7), 0)\n#define IsWindows8OrGreater()                                         \\\n    _glfwIsWindowsVersionOrGreaterWin32(HIBYTE(_WIN32_WINNT_WIN8),    \\\n                                        LOBYTE(_WIN32_WINNT_WIN8), 0)\n#define IsWindows8Point1OrGreater()                                   \\\n    _glfwIsWindowsVersionOrGreaterWin32(HIBYTE(_WIN32_WINNT_WINBLUE), \\\n                                        LOBYTE(_WIN32_WINNT_WINBLUE), 0)\n\n#define _glfwIsWindows10AnniversaryUpdateOrGreaterWin32() \\\n    _glfwIsWindows10BuildOrGreaterWin32(14393)\n#define _glfwIsWindows10CreatorsUpdateOrGreaterWin32() \\\n    _glfwIsWindows10BuildOrGreaterWin32(15063)\n\n// HACK: Define macros that some xinput.h variants don't\n#ifndef XINPUT_CAPS_WIRELESS\n #define XINPUT_CAPS_WIRELESS 0x0002\n#endif\n#ifndef XINPUT_DEVSUBTYPE_WHEEL\n #define XINPUT_DEVSUBTYPE_WHEEL 0x02\n#endif\n#ifndef XINPUT_DEVSUBTYPE_ARCADE_STICK\n #define XINPUT_DEVSUBTYPE_ARCADE_STICK 0x03\n#endif\n#ifndef XINPUT_DEVSUBTYPE_FLIGHT_STICK\n #define XINPUT_DEVSUBTYPE_FLIGHT_STICK 0x04\n#endif\n#ifndef XINPUT_DEVSUBTYPE_DANCE_PAD\n #define XINPUT_DEVSUBTYPE_DANCE_PAD 0x05\n#endif\n#ifndef XINPUT_DEVSUBTYPE_GUITAR\n #define XINPUT_DEVSUBTYPE_GUITAR 0x06\n#endif\n#ifndef XINPUT_DEVSUBTYPE_DRUM_KIT\n #define XINPUT_DEVSUBTYPE_DRUM_KIT 0x08\n#endif\n#ifndef XINPUT_DEVSUBTYPE_ARCADE_PAD\n #define XINPUT_DEVSUBTYPE_ARCADE_PAD 0x13\n#endif\n#ifndef XUSER_MAX_COUNT\n #define XUSER_MAX_COUNT 4\n#endif\n\n// HACK: Define macros that some dinput.h variants don't\n#ifndef DIDFT_OPTIONAL\n #define DIDFT_OPTIONAL 0x80000000\n#endif\n\n// winmm.dll function pointer typedefs\ntypedef DWORD (WINAPI * PFN_timeGetTime)(void);\n#define timeGetTime _glfw.win32.winmm.GetTime\n\n// xinput.dll function pointer typedefs\ntypedef DWORD (WINAPI * PFN_XInputGetCapabilities)(DWORD,DWORD,XINPUT_CAPABILITIES*);\ntypedef DWORD (WINAPI * PFN_XInputGetState)(DWORD,XINPUT_STATE*);\n#define XInputGetCapabilities _glfw.win32.xinput.GetCapabilities\n#define XInputGetState _glfw.win32.xinput.GetState\n\n// dinput8.dll function pointer typedefs\ntypedef HRESULT (WINAPI * PFN_DirectInput8Create)(HINSTANCE,DWORD,REFIID,LPVOID*,LPUNKNOWN);\n#define DirectInput8Create _glfw.win32.dinput8.Create\n\n// user32.dll function pointer typedefs\ntypedef BOOL (WINAPI * PFN_SetProcessDPIAware)(void);\ntypedef BOOL (WINAPI * PFN_ChangeWindowMessageFilterEx)(HWND,UINT,DWORD,CHANGEFILTERSTRUCT*);\ntypedef BOOL (WINAPI * PFN_EnableNonClientDpiScaling)(HWND);\ntypedef BOOL (WINAPI * PFN_SetProcessDpiAwarenessContext)(HANDLE);\ntypedef UINT (WINAPI * PFN_GetDpiForWindow)(HWND);\ntypedef BOOL (WINAPI * PFN_AdjustWindowRectExForDpi)(LPRECT,DWORD,BOOL,DWORD,UINT);\n#define SetProcessDPIAware _glfw.win32.user32.SetProcessDPIAware_\n#define ChangeWindowMessageFilterEx _glfw.win32.user32.ChangeWindowMessageFilterEx_\n#define EnableNonClientDpiScaling _glfw.win32.user32.EnableNonClientDpiScaling_\n#define SetProcessDpiAwarenessContext _glfw.win32.user32.SetProcessDpiAwarenessContext_\n#define GetDpiForWindow _glfw.win32.user32.GetDpiForWindow_\n#define AdjustWindowRectExForDpi _glfw.win32.user32.AdjustWindowRectExForDpi_\n\n// dwmapi.dll function pointer typedefs\ntypedef HRESULT (WINAPI * PFN_DwmIsCompositionEnabled)(BOOL*);\ntypedef HRESULT (WINAPI * PFN_DwmFlush)(VOID);\ntypedef HRESULT(WINAPI * PFN_DwmEnableBlurBehindWindow)(HWND,const DWM_BLURBEHIND*);\n#define DwmIsCompositionEnabled _glfw.win32.dwmapi.IsCompositionEnabled\n#define DwmFlush _glfw.win32.dwmapi.Flush\n#define DwmEnableBlurBehindWindow _glfw.win32.dwmapi.EnableBlurBehindWindow\n\n// shcore.dll function pointer typedefs\ntypedef HRESULT (WINAPI * PFN_SetProcessDpiAwareness)(PROCESS_DPI_AWARENESS);\ntypedef HRESULT (WINAPI * PFN_GetDpiForMonitor)(HMONITOR,MONITOR_DPI_TYPE,UINT*,UINT*);\n#define SetProcessDpiAwareness _glfw.win32.shcore.SetProcessDpiAwareness_\n#define GetDpiForMonitor _glfw.win32.shcore.GetDpiForMonitor_\n\n// ntdll.dll function pointer typedefs\ntypedef LONG (WINAPI * PFN_RtlVerifyVersionInfo)(OSVERSIONINFOEXW*,ULONG,ULONGLONG);\n#define RtlVerifyVersionInfo _glfw.win32.ntdll.RtlVerifyVersionInfo_\n\ntypedef VkFlags VkWin32SurfaceCreateFlagsKHR;\n\ntypedef struct VkWin32SurfaceCreateInfoKHR\n{\n    VkStructureType                 sType;\n    const void*                     pNext;\n    VkWin32SurfaceCreateFlagsKHR    flags;\n    HINSTANCE                       hinstance;\n    HWND                            hwnd;\n} VkWin32SurfaceCreateInfoKHR;\n\ntypedef VkResult (APIENTRY *PFN_vkCreateWin32SurfaceKHR)(VkInstance,const VkWin32SurfaceCreateInfoKHR*,const VkAllocationCallbacks*,VkSurfaceKHR*);\ntypedef VkBool32 (APIENTRY *PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR)(VkPhysicalDevice,uint32_t);\n\n#include \"win32_joystick.h\"\n#include \"wgl_context.h\"\n#include \"egl_context.h\"\n#include \"osmesa_context.h\"\n\n#if !defined(_GLFW_WNDCLASSNAME)\n #define _GLFW_WNDCLASSNAME L\"GLFW30\"\n#endif\n\n#define _glfw_dlopen(name) LoadLibraryA(name)\n#define _glfw_dlclose(handle) FreeLibrary((HMODULE) handle)\n#define _glfw_dlsym(handle, name) GetProcAddress((HMODULE) handle, name)\n\n#define _GLFW_EGL_NATIVE_WINDOW  ((EGLNativeWindowType) window->win32.handle)\n#define _GLFW_EGL_NATIVE_DISPLAY EGL_DEFAULT_DISPLAY\n\n#define _GLFW_PLATFORM_WINDOW_STATE         _GLFWwindowWin32  win32\n#define _GLFW_PLATFORM_LIBRARY_WINDOW_STATE _GLFWlibraryWin32 win32\n#define _GLFW_PLATFORM_LIBRARY_TIMER_STATE  _GLFWtimerWin32   win32\n#define _GLFW_PLATFORM_MONITOR_STATE        _GLFWmonitorWin32 win32\n#define _GLFW_PLATFORM_CURSOR_STATE         _GLFWcursorWin32  win32\n#define _GLFW_PLATFORM_TLS_STATE            _GLFWtlsWin32     win32\n#define _GLFW_PLATFORM_MUTEX_STATE          _GLFWmutexWin32   win32\n\n\n// Win32-specific per-window data\n//\ntypedef struct _GLFWwindowWin32\n{\n    HWND                handle;\n    HICON               bigIcon;\n    HICON               smallIcon;\n\n    GLFWbool            cursorTracked;\n    GLFWbool            frameAction;\n    GLFWbool            iconified;\n    GLFWbool            maximized;\n    // Whether to enable framebuffer transparency on DWM\n    GLFWbool            transparent;\n    GLFWbool            scaleToMonitor;\n\n    // The last received cursor position, regardless of source\n    int                 lastCursorPosX, lastCursorPosY;\n\n} _GLFWwindowWin32;\n\n// Win32-specific global data\n//\ntypedef struct _GLFWlibraryWin32\n{\n    HWND                helperWindowHandle;\n    HDEVNOTIFY          deviceNotificationHandle;\n    DWORD               foregroundLockTimeout;\n    int                 acquiredMonitorCount;\n    char*               clipboardString;\n    short int           keycodes[512];\n    short int           scancodes[GLFW_KEY_LAST + 1];\n    char                keynames[GLFW_KEY_LAST + 1][5];\n    // Where to place the cursor when re-enabled\n    double              restoreCursorPosX, restoreCursorPosY;\n    // The window whose disabled cursor mode is active\n    _GLFWwindow*        disabledCursorWindow;\n    RAWINPUT*           rawInput;\n    int                 rawInputSize;\n    UINT                mouseTrailSize;\n\n    struct {\n        HINSTANCE                       instance;\n        PFN_timeGetTime                 GetTime;\n    } winmm;\n\n    struct {\n        HINSTANCE                       instance;\n        PFN_DirectInput8Create          Create;\n        IDirectInput8W*                 api;\n    } dinput8;\n\n    struct {\n        HINSTANCE                       instance;\n        PFN_XInputGetCapabilities       GetCapabilities;\n        PFN_XInputGetState              GetState;\n    } xinput;\n\n    struct {\n        HINSTANCE                       instance;\n        PFN_SetProcessDPIAware          SetProcessDPIAware_;\n        PFN_ChangeWindowMessageFilterEx ChangeWindowMessageFilterEx_;\n        PFN_EnableNonClientDpiScaling   EnableNonClientDpiScaling_;\n        PFN_SetProcessDpiAwarenessContext SetProcessDpiAwarenessContext_;\n        PFN_GetDpiForWindow             GetDpiForWindow_;\n        PFN_AdjustWindowRectExForDpi    AdjustWindowRectExForDpi_;\n    } user32;\n\n    struct {\n        HINSTANCE                       instance;\n        PFN_DwmIsCompositionEnabled     IsCompositionEnabled;\n        PFN_DwmFlush                    Flush;\n        PFN_DwmEnableBlurBehindWindow   EnableBlurBehindWindow;\n    } dwmapi;\n\n    struct {\n        HINSTANCE                       instance;\n        PFN_SetProcessDpiAwareness      SetProcessDpiAwareness_;\n        PFN_GetDpiForMonitor            GetDpiForMonitor_;\n    } shcore;\n\n    struct {\n        HINSTANCE                       instance;\n        PFN_RtlVerifyVersionInfo        RtlVerifyVersionInfo_;\n    } ntdll;\n\n} _GLFWlibraryWin32;\n\n// Win32-specific per-monitor data\n//\ntypedef struct _GLFWmonitorWin32\n{\n    HMONITOR            handle;\n    // This size matches the static size of DISPLAY_DEVICE.DeviceName\n    WCHAR               adapterName[32];\n    WCHAR               displayName[32];\n    char                publicAdapterName[32];\n    char                publicDisplayName[32];\n    GLFWbool            modesPruned;\n    GLFWbool            modeChanged;\n\n} _GLFWmonitorWin32;\n\n// Win32-specific per-cursor data\n//\ntypedef struct _GLFWcursorWin32\n{\n    HCURSOR             handle;\n\n} _GLFWcursorWin32;\n\n// Win32-specific global timer data\n//\ntypedef struct _GLFWtimerWin32\n{\n    GLFWbool            hasPC;\n    uint64_t            frequency;\n\n} _GLFWtimerWin32;\n\n// Win32-specific thread local storage data\n//\ntypedef struct _GLFWtlsWin32\n{\n    GLFWbool            allocated;\n    DWORD               index;\n\n} _GLFWtlsWin32;\n\n// Win32-specific mutex data\n//\ntypedef struct _GLFWmutexWin32\n{\n    GLFWbool            allocated;\n    CRITICAL_SECTION    section;\n\n} _GLFWmutexWin32;\n\n\nGLFWbool _glfwRegisterWindowClassWin32(void);\nvoid _glfwUnregisterWindowClassWin32(void);\n\nWCHAR* _glfwCreateWideStringFromUTF8Win32(const char* source);\nchar* _glfwCreateUTF8FromWideStringWin32(const WCHAR* source);\nBOOL _glfwIsWindowsVersionOrGreaterWin32(WORD major, WORD minor, WORD sp);\nBOOL _glfwIsWindows10BuildOrGreaterWin32(WORD build);\nvoid _glfwInputErrorWin32(int error, const char* description);\nvoid _glfwUpdateKeyNamesWin32(void);\n\nvoid _glfwInitTimerWin32(void);\n\nvoid _glfwPollMonitorsWin32(void);\nvoid _glfwSetVideoModeWin32(_GLFWmonitor* monitor, const GLFWvidmode* desired);\nvoid _glfwRestoreVideoModeWin32(_GLFWmonitor* monitor);\nvoid _glfwGetMonitorContentScaleWin32(HMONITOR handle, float* xscale, float* yscale);\n\n"
  },
  {
    "path": "thirdparty/glfw/src/win32_thread.c",
    "content": "//========================================================================\n// GLFW 3.3 Win32 - www.glfw.org\n//------------------------------------------------------------------------\n// Copyright (c) 2002-2006 Marcus Geelnard\n// Copyright (c) 2006-2017 Camilla Löwy <elmindreda@glfw.org>\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//    claim that you wrote the original software. If you use this software\n//    in a product, an acknowledgment in the product documentation would\n//    be appreciated but is not required.\n//\n// 2. Altered source versions must be plainly marked as such, and must not\n//    be misrepresented as being the original software.\n//\n// 3. This notice may not be removed or altered from any source\n//    distribution.\n//\n//========================================================================\n// Please use C89 style variable declarations in this file because VS 2010\n//========================================================================\n\n#include \"internal.h\"\n\n#include <assert.h>\n\n\n//////////////////////////////////////////////////////////////////////////\n//////                       GLFW platform API                      //////\n//////////////////////////////////////////////////////////////////////////\n\nGLFWbool _glfwPlatformCreateTls(_GLFWtls* tls)\n{\n    assert(tls->win32.allocated == GLFW_FALSE);\n\n    tls->win32.index = TlsAlloc();\n    if (tls->win32.index == TLS_OUT_OF_INDEXES)\n    {\n        _glfwInputErrorWin32(GLFW_PLATFORM_ERROR,\n                             \"Win32: Failed to allocate TLS index\");\n        return GLFW_FALSE;\n    }\n\n    tls->win32.allocated = GLFW_TRUE;\n    return GLFW_TRUE;\n}\n\nvoid _glfwPlatformDestroyTls(_GLFWtls* tls)\n{\n    if (tls->win32.allocated)\n        TlsFree(tls->win32.index);\n    memset(tls, 0, sizeof(_GLFWtls));\n}\n\nvoid* _glfwPlatformGetTls(_GLFWtls* tls)\n{\n    assert(tls->win32.allocated == GLFW_TRUE);\n    return TlsGetValue(tls->win32.index);\n}\n\nvoid _glfwPlatformSetTls(_GLFWtls* tls, void* value)\n{\n    assert(tls->win32.allocated == GLFW_TRUE);\n    TlsSetValue(tls->win32.index, value);\n}\n\nGLFWbool _glfwPlatformCreateMutex(_GLFWmutex* mutex)\n{\n    assert(mutex->win32.allocated == GLFW_FALSE);\n    InitializeCriticalSection(&mutex->win32.section);\n    return mutex->win32.allocated = GLFW_TRUE;\n}\n\nvoid _glfwPlatformDestroyMutex(_GLFWmutex* mutex)\n{\n    if (mutex->win32.allocated)\n        DeleteCriticalSection(&mutex->win32.section);\n    memset(mutex, 0, sizeof(_GLFWmutex));\n}\n\nvoid _glfwPlatformLockMutex(_GLFWmutex* mutex)\n{\n    assert(mutex->win32.allocated == GLFW_TRUE);\n    EnterCriticalSection(&mutex->win32.section);\n}\n\nvoid _glfwPlatformUnlockMutex(_GLFWmutex* mutex)\n{\n    assert(mutex->win32.allocated == GLFW_TRUE);\n    LeaveCriticalSection(&mutex->win32.section);\n}\n\n"
  },
  {
    "path": "thirdparty/glfw/src/win32_time.c",
    "content": "//========================================================================\n// GLFW 3.3 Win32 - www.glfw.org\n//------------------------------------------------------------------------\n// Copyright (c) 2002-2006 Marcus Geelnard\n// Copyright (c) 2006-2017 Camilla Löwy <elmindreda@glfw.org>\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//    claim that you wrote the original software. If you use this software\n//    in a product, an acknowledgment in the product documentation would\n//    be appreciated but is not required.\n//\n// 2. Altered source versions must be plainly marked as such, and must not\n//    be misrepresented as being the original software.\n//\n// 3. This notice may not be removed or altered from any source\n//    distribution.\n//\n//========================================================================\n// Please use C89 style variable declarations in this file because VS 2010\n//========================================================================\n\n#include \"internal.h\"\n\n\n//////////////////////////////////////////////////////////////////////////\n//////                       GLFW internal API                      //////\n//////////////////////////////////////////////////////////////////////////\n\n// Initialise timer\n//\nvoid _glfwInitTimerWin32(void)\n{\n    uint64_t frequency;\n\n    if (QueryPerformanceFrequency((LARGE_INTEGER*) &frequency))\n    {\n        _glfw.timer.win32.hasPC = GLFW_TRUE;\n        _glfw.timer.win32.frequency = frequency;\n    }\n    else\n    {\n        _glfw.timer.win32.hasPC = GLFW_FALSE;\n        _glfw.timer.win32.frequency = 1000;\n    }\n}\n\n\n//////////////////////////////////////////////////////////////////////////\n//////                       GLFW platform API                      //////\n//////////////////////////////////////////////////////////////////////////\n\nuint64_t _glfwPlatformGetTimerValue(void)\n{\n    if (_glfw.timer.win32.hasPC)\n    {\n        uint64_t value;\n        QueryPerformanceCounter((LARGE_INTEGER*) &value);\n        return value;\n    }\n    else\n        return (uint64_t) timeGetTime();\n}\n\nuint64_t _glfwPlatformGetTimerFrequency(void)\n{\n    return _glfw.timer.win32.frequency;\n}\n\n"
  },
  {
    "path": "thirdparty/glfw/src/win32_window.c",
    "content": "//========================================================================\n// GLFW 3.3 Win32 - www.glfw.org\n//------------------------------------------------------------------------\n// Copyright (c) 2002-2006 Marcus Geelnard\n// Copyright (c) 2006-2019 Camilla Löwy <elmindreda@glfw.org>\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//    claim that you wrote the original software. If you use this software\n//    in a product, an acknowledgment in the product documentation would\n//    be appreciated but is not required.\n//\n// 2. Altered source versions must be plainly marked as such, and must not\n//    be misrepresented as being the original software.\n//\n// 3. This notice may not be removed or altered from any source\n//    distribution.\n//\n//========================================================================\n// Please use C89 style variable declarations in this file because VS 2010\n//========================================================================\n\n#include \"internal.h\"\n\n#include <limits.h>\n#include <stdlib.h>\n#include <malloc.h>\n#include <string.h>\n#include <windowsx.h>\n#include <shellapi.h>\n\n// Returns the window style for the specified window\n//\nstatic DWORD getWindowStyle(const _GLFWwindow* window)\n{\n    DWORD style = WS_CLIPSIBLINGS | WS_CLIPCHILDREN;\n\n    if (window->monitor)\n        style |= WS_POPUP;\n    else\n    {\n        style |= WS_SYSMENU | WS_MINIMIZEBOX;\n\n        if (window->decorated)\n        {\n            style |= WS_CAPTION;\n\n            if (window->resizable)\n                style |= WS_MAXIMIZEBOX | WS_THICKFRAME;\n        }\n        else\n            style |= WS_POPUP;\n    }\n\n    return style;\n}\n\n// Returns the extended window style for the specified window\n//\nstatic DWORD getWindowExStyle(const _GLFWwindow* window)\n{\n    DWORD style = WS_EX_APPWINDOW;\n\n    if (window->monitor || window->floating)\n        style |= WS_EX_TOPMOST;\n\n    return style;\n}\n\n// Returns the image whose area most closely matches the desired one\n//\nstatic const GLFWimage* chooseImage(int count, const GLFWimage* images,\n                                    int width, int height)\n{\n    int i, leastDiff = INT_MAX;\n    const GLFWimage* closest = NULL;\n\n    for (i = 0;  i < count;  i++)\n    {\n        const int currDiff = abs(images[i].width * images[i].height -\n                                 width * height);\n        if (currDiff < leastDiff)\n        {\n            closest = images + i;\n            leastDiff = currDiff;\n        }\n    }\n\n    return closest;\n}\n\n// Creates an RGBA icon or cursor\n//\nstatic HICON createIcon(const GLFWimage* image,\n                        int xhot, int yhot, GLFWbool icon)\n{\n    int i;\n    HDC dc;\n    HICON handle;\n    HBITMAP color, mask;\n    BITMAPV5HEADER bi;\n    ICONINFO ii;\n    unsigned char* target = NULL;\n    unsigned char* source = image->pixels;\n\n    ZeroMemory(&bi, sizeof(bi));\n    bi.bV5Size        = sizeof(bi);\n    bi.bV5Width       = image->width;\n    bi.bV5Height      = -image->height;\n    bi.bV5Planes      = 1;\n    bi.bV5BitCount    = 32;\n    bi.bV5Compression = BI_BITFIELDS;\n    bi.bV5RedMask     = 0x00ff0000;\n    bi.bV5GreenMask   = 0x0000ff00;\n    bi.bV5BlueMask    = 0x000000ff;\n    bi.bV5AlphaMask   = 0xff000000;\n\n    dc = GetDC(NULL);\n    color = CreateDIBSection(dc,\n                             (BITMAPINFO*) &bi,\n                             DIB_RGB_COLORS,\n                             (void**) &target,\n                             NULL,\n                             (DWORD) 0);\n    ReleaseDC(NULL, dc);\n\n    if (!color)\n    {\n        _glfwInputErrorWin32(GLFW_PLATFORM_ERROR,\n                             \"Win32: Failed to create RGBA bitmap\");\n        return NULL;\n    }\n\n    mask = CreateBitmap(image->width, image->height, 1, 1, NULL);\n    if (!mask)\n    {\n        _glfwInputErrorWin32(GLFW_PLATFORM_ERROR,\n                             \"Win32: Failed to create mask bitmap\");\n        DeleteObject(color);\n        return NULL;\n    }\n\n    for (i = 0;  i < image->width * image->height;  i++)\n    {\n        target[0] = source[2];\n        target[1] = source[1];\n        target[2] = source[0];\n        target[3] = source[3];\n        target += 4;\n        source += 4;\n    }\n\n    ZeroMemory(&ii, sizeof(ii));\n    ii.fIcon    = icon;\n    ii.xHotspot = xhot;\n    ii.yHotspot = yhot;\n    ii.hbmMask  = mask;\n    ii.hbmColor = color;\n\n    handle = CreateIconIndirect(&ii);\n\n    DeleteObject(color);\n    DeleteObject(mask);\n\n    if (!handle)\n    {\n        if (icon)\n        {\n            _glfwInputErrorWin32(GLFW_PLATFORM_ERROR,\n                                 \"Win32: Failed to create icon\");\n        }\n        else\n        {\n            _glfwInputErrorWin32(GLFW_PLATFORM_ERROR,\n                                 \"Win32: Failed to create cursor\");\n        }\n    }\n\n    return handle;\n}\n\n// Translate content area size to full window size according to styles and DPI\n//\nstatic void getFullWindowSize(DWORD style, DWORD exStyle,\n                              int contentWidth, int contentHeight,\n                              int* fullWidth, int* fullHeight,\n                              UINT dpi)\n{\n    RECT rect = { 0, 0, contentWidth, contentHeight };\n\n    if (_glfwIsWindows10AnniversaryUpdateOrGreaterWin32())\n        AdjustWindowRectExForDpi(&rect, style, FALSE, exStyle, dpi);\n    else\n        AdjustWindowRectEx(&rect, style, FALSE, exStyle);\n\n    *fullWidth = rect.right - rect.left;\n    *fullHeight = rect.bottom - rect.top;\n}\n\n// Enforce the content area aspect ratio based on which edge is being dragged\n//\nstatic void applyAspectRatio(_GLFWwindow* window, int edge, RECT* area)\n{\n    int xoff, yoff;\n    UINT dpi = USER_DEFAULT_SCREEN_DPI;\n    const float ratio = (float) window->numer / (float) window->denom;\n\n    if (_glfwIsWindows10AnniversaryUpdateOrGreaterWin32())\n        dpi = GetDpiForWindow(window->win32.handle);\n\n    getFullWindowSize(getWindowStyle(window), getWindowExStyle(window),\n                      0, 0, &xoff, &yoff, dpi);\n\n    if (edge == WMSZ_LEFT  || edge == WMSZ_BOTTOMLEFT ||\n        edge == WMSZ_RIGHT || edge == WMSZ_BOTTOMRIGHT)\n    {\n        area->bottom = area->top + yoff +\n            (int) ((area->right - area->left - xoff) / ratio);\n    }\n    else if (edge == WMSZ_TOPLEFT || edge == WMSZ_TOPRIGHT)\n    {\n        area->top = area->bottom - yoff -\n            (int) ((area->right - area->left - xoff) / ratio);\n    }\n    else if (edge == WMSZ_TOP || edge == WMSZ_BOTTOM)\n    {\n        area->right = area->left + xoff +\n            (int) ((area->bottom - area->top - yoff) * ratio);\n    }\n}\n\n// Updates the cursor image according to its cursor mode\n//\nstatic void updateCursorImage(_GLFWwindow* window)\n{\n    if (window->cursorMode == GLFW_CURSOR_NORMAL)\n    {\n        if (window->cursor)\n            SetCursor(window->cursor->win32.handle);\n        else\n            SetCursor(LoadCursorW(NULL, IDC_ARROW));\n    }\n    else\n        SetCursor(NULL);\n}\n\n// Updates the cursor clip rect\n//\nstatic void updateClipRect(_GLFWwindow* window)\n{\n    if (window)\n    {\n        RECT clipRect;\n        GetClientRect(window->win32.handle, &clipRect);\n        ClientToScreen(window->win32.handle, (POINT*) &clipRect.left);\n        ClientToScreen(window->win32.handle, (POINT*) &clipRect.right);\n        ClipCursor(&clipRect);\n    }\n    else\n        ClipCursor(NULL);\n}\n\n// Enables WM_INPUT messages for the mouse for the specified window\n//\nstatic void enableRawMouseMotion(_GLFWwindow* window)\n{\n    const RAWINPUTDEVICE rid = { 0x01, 0x02, 0, window->win32.handle };\n\n    if (!RegisterRawInputDevices(&rid, 1, sizeof(rid)))\n    {\n        _glfwInputErrorWin32(GLFW_PLATFORM_ERROR,\n                             \"Win32: Failed to register raw input device\");\n    }\n}\n\n// Disables WM_INPUT messages for the mouse\n//\nstatic void disableRawMouseMotion(_GLFWwindow* window)\n{\n    const RAWINPUTDEVICE rid = { 0x01, 0x02, RIDEV_REMOVE, NULL };\n\n    if (!RegisterRawInputDevices(&rid, 1, sizeof(rid)))\n    {\n        _glfwInputErrorWin32(GLFW_PLATFORM_ERROR,\n                             \"Win32: Failed to remove raw input device\");\n    }\n}\n\n// Apply disabled cursor mode to a focused window\n//\nstatic void disableCursor(_GLFWwindow* window)\n{\n    _glfw.win32.disabledCursorWindow = window;\n    _glfwPlatformGetCursorPos(window,\n                              &_glfw.win32.restoreCursorPosX,\n                              &_glfw.win32.restoreCursorPosY);\n    updateCursorImage(window);\n    _glfwCenterCursorInContentArea(window);\n    updateClipRect(window);\n\n    if (window->rawMouseMotion)\n        enableRawMouseMotion(window);\n}\n\n// Exit disabled cursor mode for the specified window\n//\nstatic void enableCursor(_GLFWwindow* window)\n{\n    if (window->rawMouseMotion)\n        disableRawMouseMotion(window);\n\n    _glfw.win32.disabledCursorWindow = NULL;\n    updateClipRect(NULL);\n    _glfwPlatformSetCursorPos(window,\n                              _glfw.win32.restoreCursorPosX,\n                              _glfw.win32.restoreCursorPosY);\n    updateCursorImage(window);\n}\n\n// Returns whether the cursor is in the content area of the specified window\n//\nstatic GLFWbool cursorInContentArea(_GLFWwindow* window)\n{\n    RECT area;\n    POINT pos;\n\n    if (!GetCursorPos(&pos))\n        return GLFW_FALSE;\n\n    if (WindowFromPoint(pos) != window->win32.handle)\n        return GLFW_FALSE;\n\n    GetClientRect(window->win32.handle, &area);\n    ClientToScreen(window->win32.handle, (POINT*) &area.left);\n    ClientToScreen(window->win32.handle, (POINT*) &area.right);\n\n    return PtInRect(&area, pos);\n}\n\n// Update native window styles to match attributes\n//\nstatic void updateWindowStyles(const _GLFWwindow* window)\n{\n    RECT rect;\n    DWORD style = GetWindowLongW(window->win32.handle, GWL_STYLE);\n    style &= ~(WS_OVERLAPPEDWINDOW | WS_POPUP);\n    style |= getWindowStyle(window);\n\n    GetClientRect(window->win32.handle, &rect);\n\n    if (_glfwIsWindows10AnniversaryUpdateOrGreaterWin32())\n    {\n        AdjustWindowRectExForDpi(&rect, style, FALSE,\n                                 getWindowExStyle(window),\n                                 GetDpiForWindow(window->win32.handle));\n    }\n    else\n        AdjustWindowRectEx(&rect, style, FALSE, getWindowExStyle(window));\n\n    ClientToScreen(window->win32.handle, (POINT*) &rect.left);\n    ClientToScreen(window->win32.handle, (POINT*) &rect.right);\n    SetWindowLongW(window->win32.handle, GWL_STYLE, style);\n    SetWindowPos(window->win32.handle, HWND_TOP,\n                 rect.left, rect.top,\n                 rect.right - rect.left, rect.bottom - rect.top,\n                 SWP_FRAMECHANGED | SWP_NOACTIVATE | SWP_NOZORDER);\n}\n\n// Update window framebuffer transparency\n//\nstatic void updateFramebufferTransparency(const _GLFWwindow* window)\n{\n    BOOL enabled;\n\n    if (!IsWindowsVistaOrGreater())\n        return;\n\n    if (SUCCEEDED(DwmIsCompositionEnabled(&enabled)) && enabled)\n    {\n        HRGN region = CreateRectRgn(0, 0, -1, -1);\n        DWM_BLURBEHIND bb = {0};\n        bb.dwFlags = DWM_BB_ENABLE | DWM_BB_BLURREGION;\n        bb.hRgnBlur = region;\n        bb.fEnable = TRUE;\n\n        if (SUCCEEDED(DwmEnableBlurBehindWindow(window->win32.handle, &bb)))\n        {\n            // Decorated windows don't repaint the transparent background\n            // leaving a trail behind animations\n            // HACK: Making the window layered with a transparency color key\n            //       seems to fix this.  Normally, when specifying\n            //       a transparency color key to be used when composing the\n            //       layered window, all pixels painted by the window in this\n            //       color will be transparent.  That doesn't seem to be the\n            //       case anymore, at least when used with blur behind window\n            //       plus negative region.\n            LONG exStyle = GetWindowLongW(window->win32.handle, GWL_EXSTYLE);\n            exStyle |= WS_EX_LAYERED;\n            SetWindowLongW(window->win32.handle, GWL_EXSTYLE, exStyle);\n\n            // Using a color key not equal to black to fix the trailing\n            // issue.  When set to black, something is making the hit test\n            // not resize with the window frame.\n            SetLayeredWindowAttributes(window->win32.handle,\n                                       RGB(255, 0, 255), 255, LWA_COLORKEY);\n        }\n\n        DeleteObject(region);\n    }\n    else\n    {\n        LONG exStyle = GetWindowLongW(window->win32.handle, GWL_EXSTYLE);\n        exStyle &= ~WS_EX_LAYERED;\n        SetWindowLongW(window->win32.handle, GWL_EXSTYLE, exStyle);\n        RedrawWindow(window->win32.handle, NULL, NULL,\n                     RDW_ERASE | RDW_INVALIDATE | RDW_FRAME);\n    }\n}\n\n// Retrieves and translates modifier keys\n//\nstatic int getKeyMods(void)\n{\n    int mods = 0;\n\n    if (GetKeyState(VK_SHIFT) & 0x8000)\n        mods |= GLFW_MOD_SHIFT;\n    if (GetKeyState(VK_CONTROL) & 0x8000)\n        mods |= GLFW_MOD_CONTROL;\n    if (GetKeyState(VK_MENU) & 0x8000)\n        mods |= GLFW_MOD_ALT;\n    if ((GetKeyState(VK_LWIN) | GetKeyState(VK_RWIN)) & 0x8000)\n        mods |= GLFW_MOD_SUPER;\n    if (GetKeyState(VK_CAPITAL) & 1)\n        mods |= GLFW_MOD_CAPS_LOCK;\n    if (GetKeyState(VK_NUMLOCK) & 1)\n        mods |= GLFW_MOD_NUM_LOCK;\n\n    return mods;\n}\n\nstatic void fitToMonitor(_GLFWwindow* window)\n{\n    MONITORINFO mi = { sizeof(mi) };\n    GetMonitorInfo(window->monitor->win32.handle, &mi);\n    SetWindowPos(window->win32.handle, HWND_TOPMOST,\n                 mi.rcMonitor.left,\n                 mi.rcMonitor.top,\n                 mi.rcMonitor.right - mi.rcMonitor.left,\n                 mi.rcMonitor.bottom - mi.rcMonitor.top,\n                 SWP_NOZORDER | SWP_NOACTIVATE | SWP_NOCOPYBITS);\n}\n\n// Make the specified window and its video mode active on its monitor\n//\nstatic void acquireMonitor(_GLFWwindow* window)\n{\n    if (!_glfw.win32.acquiredMonitorCount)\n    {\n        SetThreadExecutionState(ES_CONTINUOUS | ES_DISPLAY_REQUIRED);\n\n        // HACK: When mouse trails are enabled the cursor becomes invisible when\n        //       the OpenGL ICD switches to page flipping\n        if (IsWindowsXPOrGreater())\n        {\n            SystemParametersInfo(SPI_GETMOUSETRAILS, 0, &_glfw.win32.mouseTrailSize, 0);\n            SystemParametersInfo(SPI_SETMOUSETRAILS, 0, 0, 0);\n        }\n    }\n\n    if (!window->monitor->window)\n        _glfw.win32.acquiredMonitorCount++;\n\n    _glfwSetVideoModeWin32(window->monitor, &window->videoMode);\n    _glfwInputMonitorWindow(window->monitor, window);\n}\n\n// Remove the window and restore the original video mode\n//\nstatic void releaseMonitor(_GLFWwindow* window)\n{\n    if (window->monitor->window != window)\n        return;\n\n    _glfw.win32.acquiredMonitorCount--;\n    if (!_glfw.win32.acquiredMonitorCount)\n    {\n        SetThreadExecutionState(ES_CONTINUOUS);\n\n        // HACK: Restore mouse trail length saved in acquireMonitor\n        if (IsWindowsXPOrGreater())\n            SystemParametersInfo(SPI_SETMOUSETRAILS, _glfw.win32.mouseTrailSize, 0, 0);\n    }\n\n    _glfwInputMonitorWindow(window->monitor, NULL);\n    _glfwRestoreVideoModeWin32(window->monitor);\n}\n\n// Window callback function (handles window messages)\n//\nstatic LRESULT CALLBACK windowProc(HWND hWnd, UINT uMsg,\n                                   WPARAM wParam, LPARAM lParam)\n{\n    _GLFWwindow* window = GetPropW(hWnd, L\"GLFW\");\n    if (!window)\n    {\n        // This is the message handling for the hidden helper window\n        // and for a regular window during its initial creation\n\n        switch (uMsg)\n        {\n            case WM_NCCREATE:\n            {\n                if (_glfwIsWindows10AnniversaryUpdateOrGreaterWin32())\n                    EnableNonClientDpiScaling(hWnd);\n\n                break;\n            }\n\n            case WM_DISPLAYCHANGE:\n                _glfwPollMonitorsWin32();\n                break;\n\n            case WM_DEVICECHANGE:\n            {\n                if (wParam == DBT_DEVICEARRIVAL)\n                {\n                    DEV_BROADCAST_HDR* dbh = (DEV_BROADCAST_HDR*) lParam;\n                    if (dbh && dbh->dbch_devicetype == DBT_DEVTYP_DEVICEINTERFACE)\n                        _glfwDetectJoystickConnectionWin32();\n                }\n                else if (wParam == DBT_DEVICEREMOVECOMPLETE)\n                {\n                    DEV_BROADCAST_HDR* dbh = (DEV_BROADCAST_HDR*) lParam;\n                    if (dbh && dbh->dbch_devicetype == DBT_DEVTYP_DEVICEINTERFACE)\n                        _glfwDetectJoystickDisconnectionWin32();\n                }\n\n                break;\n            }\n        }\n\n        return DefWindowProcW(hWnd, uMsg, wParam, lParam);\n    }\n\n    switch (uMsg)\n    {\n        case WM_MOUSEACTIVATE:\n        {\n            // HACK: Postpone cursor disabling when the window was activated by\n            //       clicking a caption button\n            if (HIWORD(lParam) == WM_LBUTTONDOWN)\n            {\n                if (LOWORD(lParam) != HTCLIENT)\n                    window->win32.frameAction = GLFW_TRUE;\n            }\n\n            break;\n        }\n\n        case WM_CAPTURECHANGED:\n        {\n            // HACK: Disable the cursor once the caption button action has been\n            //       completed or cancelled\n            if (lParam == 0 && window->win32.frameAction)\n            {\n                if (window->cursorMode == GLFW_CURSOR_DISABLED)\n                    disableCursor(window);\n\n                window->win32.frameAction = GLFW_FALSE;\n            }\n\n            break;\n        }\n\n        case WM_SETFOCUS:\n        {\n            _glfwInputWindowFocus(window, GLFW_TRUE);\n\n            // HACK: Do not disable cursor while the user is interacting with\n            //       a caption button\n            if (window->win32.frameAction)\n                break;\n\n            if (window->cursorMode == GLFW_CURSOR_DISABLED)\n                disableCursor(window);\n\n            return 0;\n        }\n\n        case WM_KILLFOCUS:\n        {\n            if (window->cursorMode == GLFW_CURSOR_DISABLED)\n                enableCursor(window);\n\n            if (window->monitor && window->autoIconify)\n                _glfwPlatformIconifyWindow(window);\n\n            _glfwInputWindowFocus(window, GLFW_FALSE);\n            return 0;\n        }\n\n        case WM_SYSCOMMAND:\n        {\n            switch (wParam & 0xfff0)\n            {\n                case SC_SCREENSAVE:\n                case SC_MONITORPOWER:\n                {\n                    if (window->monitor)\n                    {\n                        // We are running in full screen mode, so disallow\n                        // screen saver and screen blanking\n                        return 0;\n                    }\n                    else\n                        break;\n                }\n\n                // User trying to access application menu using ALT?\n                case SC_KEYMENU:\n                    return 0;\n            }\n            break;\n        }\n\n        case WM_CLOSE:\n        {\n            _glfwInputWindowCloseRequest(window);\n            return 0;\n        }\n\n        case WM_INPUTLANGCHANGE:\n        {\n            _glfwUpdateKeyNamesWin32();\n            break;\n        }\n\n        case WM_CHAR:\n        case WM_SYSCHAR:\n        case WM_UNICHAR:\n        {\n            const GLFWbool plain = (uMsg != WM_SYSCHAR);\n\n            if (uMsg == WM_UNICHAR && wParam == UNICODE_NOCHAR)\n            {\n                // WM_UNICHAR is not sent by Windows, but is sent by some\n                // third-party input method engine\n                // Returning TRUE here announces support for this message\n                return TRUE;\n            }\n\n            _glfwInputChar(window, (unsigned int) wParam, getKeyMods(), plain);\n            return 0;\n        }\n\n        case WM_KEYDOWN:\n        case WM_SYSKEYDOWN:\n        case WM_KEYUP:\n        case WM_SYSKEYUP:\n        {\n            int key, scancode;\n            const int action = (HIWORD(lParam) & KF_UP) ? GLFW_RELEASE : GLFW_PRESS;\n            const int mods = getKeyMods();\n\n            scancode = (HIWORD(lParam) & (KF_EXTENDED | 0xff));\n            if (!scancode)\n            {\n                // NOTE: Some synthetic key messages have a scancode of zero\n                // HACK: Map the virtual key back to a usable scancode\n                scancode = MapVirtualKeyW((UINT) wParam, MAPVK_VK_TO_VSC);\n            }\n\n            key = _glfw.win32.keycodes[scancode];\n\n            // The Ctrl keys require special handling\n            if (wParam == VK_CONTROL)\n            {\n                if (HIWORD(lParam) & KF_EXTENDED)\n                {\n                    // Right side keys have the extended key bit set\n                    key = GLFW_KEY_RIGHT_CONTROL;\n                }\n                else\n                {\n                    // NOTE: Alt Gr sends Left Ctrl followed by Right Alt\n                    // HACK: We only want one event for Alt Gr, so if we detect\n                    //       this sequence we discard this Left Ctrl message now\n                    //       and later report Right Alt normally\n                    MSG next;\n                    const DWORD time = GetMessageTime();\n\n                    if (PeekMessageW(&next, NULL, 0, 0, PM_NOREMOVE))\n                    {\n                        if (next.message == WM_KEYDOWN ||\n                            next.message == WM_SYSKEYDOWN ||\n                            next.message == WM_KEYUP ||\n                            next.message == WM_SYSKEYUP)\n                        {\n                            if (next.wParam == VK_MENU &&\n                                (HIWORD(next.lParam) & KF_EXTENDED) &&\n                                next.time == time)\n                            {\n                                // Next message is Right Alt down so discard this\n                                break;\n                            }\n                        }\n                    }\n\n                    // This is a regular Left Ctrl message\n                    key = GLFW_KEY_LEFT_CONTROL;\n                }\n            }\n            else if (wParam == VK_PROCESSKEY)\n            {\n                // IME notifies that keys have been filtered by setting the\n                // virtual key-code to VK_PROCESSKEY\n                break;\n            }\n\n            if (action == GLFW_RELEASE && wParam == VK_SHIFT)\n            {\n                // HACK: Release both Shift keys on Shift up event, as when both\n                //       are pressed the first release does not emit any event\n                // NOTE: The other half of this is in _glfwPlatformPollEvents\n                _glfwInputKey(window, GLFW_KEY_LEFT_SHIFT, scancode, action, mods);\n                _glfwInputKey(window, GLFW_KEY_RIGHT_SHIFT, scancode, action, mods);\n            }\n            else if (wParam == VK_SNAPSHOT)\n            {\n                // HACK: Key down is not reported for the Print Screen key\n                _glfwInputKey(window, key, scancode, GLFW_PRESS, mods);\n                _glfwInputKey(window, key, scancode, GLFW_RELEASE, mods);\n            }\n            else\n                _glfwInputKey(window, key, scancode, action, mods);\n\n            break;\n        }\n\n        case WM_LBUTTONDOWN:\n        case WM_RBUTTONDOWN:\n        case WM_MBUTTONDOWN:\n        case WM_XBUTTONDOWN:\n        case WM_LBUTTONUP:\n        case WM_RBUTTONUP:\n        case WM_MBUTTONUP:\n        case WM_XBUTTONUP:\n        {\n            int i, button, action;\n\n            if (uMsg == WM_LBUTTONDOWN || uMsg == WM_LBUTTONUP)\n                button = GLFW_MOUSE_BUTTON_LEFT;\n            else if (uMsg == WM_RBUTTONDOWN || uMsg == WM_RBUTTONUP)\n                button = GLFW_MOUSE_BUTTON_RIGHT;\n            else if (uMsg == WM_MBUTTONDOWN || uMsg == WM_MBUTTONUP)\n                button = GLFW_MOUSE_BUTTON_MIDDLE;\n            else if (GET_XBUTTON_WPARAM(wParam) == XBUTTON1)\n                button = GLFW_MOUSE_BUTTON_4;\n            else\n                button = GLFW_MOUSE_BUTTON_5;\n\n            if (uMsg == WM_LBUTTONDOWN || uMsg == WM_RBUTTONDOWN ||\n                uMsg == WM_MBUTTONDOWN || uMsg == WM_XBUTTONDOWN)\n            {\n                action = GLFW_PRESS;\n            }\n            else\n                action = GLFW_RELEASE;\n\n            for (i = 0;  i <= GLFW_MOUSE_BUTTON_LAST;  i++)\n            {\n                if (window->mouseButtons[i] == GLFW_PRESS)\n                    break;\n            }\n\n            if (i > GLFW_MOUSE_BUTTON_LAST)\n                SetCapture(hWnd);\n\n            _glfwInputMouseClick(window, button, action, getKeyMods());\n\n            for (i = 0;  i <= GLFW_MOUSE_BUTTON_LAST;  i++)\n            {\n                if (window->mouseButtons[i] == GLFW_PRESS)\n                    break;\n            }\n\n            if (i > GLFW_MOUSE_BUTTON_LAST)\n                ReleaseCapture();\n\n            if (uMsg == WM_XBUTTONDOWN || uMsg == WM_XBUTTONUP)\n                return TRUE;\n\n            return 0;\n        }\n\n        case WM_MOUSEMOVE:\n        {\n            const int x = GET_X_LPARAM(lParam);\n            const int y = GET_Y_LPARAM(lParam);\n\n            if (!window->win32.cursorTracked)\n            {\n                TRACKMOUSEEVENT tme;\n                ZeroMemory(&tme, sizeof(tme));\n                tme.cbSize = sizeof(tme);\n                tme.dwFlags = TME_LEAVE;\n                tme.hwndTrack = window->win32.handle;\n                TrackMouseEvent(&tme);\n\n                window->win32.cursorTracked = GLFW_TRUE;\n                _glfwInputCursorEnter(window, GLFW_TRUE);\n            }\n\n            if (window->cursorMode == GLFW_CURSOR_DISABLED)\n            {\n                const int dx = x - window->win32.lastCursorPosX;\n                const int dy = y - window->win32.lastCursorPosY;\n\n                if (_glfw.win32.disabledCursorWindow != window)\n                    break;\n                if (window->rawMouseMotion)\n                    break;\n\n                _glfwInputCursorPos(window,\n                                    window->virtualCursorPosX + dx,\n                                    window->virtualCursorPosY + dy);\n            }\n            else\n                _glfwInputCursorPos(window, x, y);\n\n            window->win32.lastCursorPosX = x;\n            window->win32.lastCursorPosY = y;\n\n            return 0;\n        }\n\n        case WM_INPUT:\n        {\n            UINT size = 0;\n            HRAWINPUT ri = (HRAWINPUT) lParam;\n            RAWINPUT* data = NULL;\n            int dx, dy;\n\n            if (_glfw.win32.disabledCursorWindow != window)\n                break;\n            if (!window->rawMouseMotion)\n                break;\n\n            GetRawInputData(ri, RID_INPUT, NULL, &size, sizeof(RAWINPUTHEADER));\n            if (size > (UINT) _glfw.win32.rawInputSize)\n            {\n                free(_glfw.win32.rawInput);\n                _glfw.win32.rawInput = calloc(size, 1);\n                _glfw.win32.rawInputSize = size;\n            }\n\n            size = _glfw.win32.rawInputSize;\n            if (GetRawInputData(ri, RID_INPUT,\n                                _glfw.win32.rawInput, &size,\n                                sizeof(RAWINPUTHEADER)) == (UINT) -1)\n            {\n                _glfwInputError(GLFW_PLATFORM_ERROR,\n                                \"Win32: Failed to retrieve raw input data\");\n                break;\n            }\n\n            data = _glfw.win32.rawInput;\n            if (data->data.mouse.usFlags & MOUSE_MOVE_ABSOLUTE)\n            {\n                dx = data->data.mouse.lLastX - window->win32.lastCursorPosX;\n                dy = data->data.mouse.lLastY - window->win32.lastCursorPosY;\n            }\n            else\n            {\n                dx = data->data.mouse.lLastX;\n                dy = data->data.mouse.lLastY;\n            }\n\n            _glfwInputCursorPos(window,\n                                window->virtualCursorPosX + dx,\n                                window->virtualCursorPosY + dy);\n\n            window->win32.lastCursorPosX += dx;\n            window->win32.lastCursorPosY += dy;\n            break;\n        }\n\n        case WM_MOUSELEAVE:\n        {\n            window->win32.cursorTracked = GLFW_FALSE;\n            _glfwInputCursorEnter(window, GLFW_FALSE);\n            return 0;\n        }\n\n        case WM_MOUSEWHEEL:\n        {\n            _glfwInputScroll(window, 0.0, (SHORT) HIWORD(wParam) / (double) WHEEL_DELTA);\n            return 0;\n        }\n\n        case WM_MOUSEHWHEEL:\n        {\n            // This message is only sent on Windows Vista and later\n            // NOTE: The X-axis is inverted for consistency with macOS and X11\n            _glfwInputScroll(window, -((SHORT) HIWORD(wParam) / (double) WHEEL_DELTA), 0.0);\n            return 0;\n        }\n\n        case WM_ENTERSIZEMOVE:\n        case WM_ENTERMENULOOP:\n        {\n            if (window->win32.frameAction)\n                break;\n\n            // HACK: Enable the cursor while the user is moving or\n            //       resizing the window or using the window menu\n            if (window->cursorMode == GLFW_CURSOR_DISABLED)\n                enableCursor(window);\n\n            break;\n        }\n\n        case WM_EXITSIZEMOVE:\n        case WM_EXITMENULOOP:\n        {\n            if (window->win32.frameAction)\n                break;\n\n            // HACK: Disable the cursor once the user is done moving or\n            //       resizing the window or using the menu\n            if (window->cursorMode == GLFW_CURSOR_DISABLED)\n                disableCursor(window);\n\n            break;\n        }\n\n        case WM_SIZE:\n        {\n            const GLFWbool iconified = wParam == SIZE_MINIMIZED;\n            const GLFWbool maximized = wParam == SIZE_MAXIMIZED ||\n                                       (window->win32.maximized &&\n                                        wParam != SIZE_RESTORED);\n\n            if (_glfw.win32.disabledCursorWindow == window)\n                updateClipRect(window);\n\n            if (window->win32.iconified != iconified)\n                _glfwInputWindowIconify(window, iconified);\n\n            if (window->win32.maximized != maximized)\n                _glfwInputWindowMaximize(window, maximized);\n\n            _glfwInputFramebufferSize(window, LOWORD(lParam), HIWORD(lParam));\n            _glfwInputWindowSize(window, LOWORD(lParam), HIWORD(lParam));\n\n            if (window->monitor && window->win32.iconified != iconified)\n            {\n                if (iconified)\n                    releaseMonitor(window);\n                else\n                {\n                    acquireMonitor(window);\n                    fitToMonitor(window);\n                }\n            }\n\n            window->win32.iconified = iconified;\n            window->win32.maximized = maximized;\n            return 0;\n        }\n\n        case WM_MOVE:\n        {\n            if (_glfw.win32.disabledCursorWindow == window)\n                updateClipRect(window);\n\n            // NOTE: This cannot use LOWORD/HIWORD recommended by MSDN, as\n            // those macros do not handle negative window positions correctly\n            _glfwInputWindowPos(window,\n                                GET_X_LPARAM(lParam),\n                                GET_Y_LPARAM(lParam));\n            return 0;\n        }\n\n        case WM_SIZING:\n        {\n            if (window->numer == GLFW_DONT_CARE ||\n                window->denom == GLFW_DONT_CARE)\n            {\n                break;\n            }\n\n            applyAspectRatio(window, (int) wParam, (RECT*) lParam);\n            return TRUE;\n        }\n\n        case WM_GETMINMAXINFO:\n        {\n            int xoff, yoff;\n            UINT dpi = USER_DEFAULT_SCREEN_DPI;\n            MINMAXINFO* mmi = (MINMAXINFO*) lParam;\n\n            if (window->monitor)\n                break;\n\n            if (_glfwIsWindows10AnniversaryUpdateOrGreaterWin32())\n                dpi = GetDpiForWindow(window->win32.handle);\n\n            getFullWindowSize(getWindowStyle(window), getWindowExStyle(window),\n                              0, 0, &xoff, &yoff, dpi);\n\n            if (window->minwidth != GLFW_DONT_CARE &&\n                window->minheight != GLFW_DONT_CARE)\n            {\n                mmi->ptMinTrackSize.x = window->minwidth + xoff;\n                mmi->ptMinTrackSize.y = window->minheight + yoff;\n            }\n\n            if (window->maxwidth != GLFW_DONT_CARE &&\n                window->maxheight != GLFW_DONT_CARE)\n            {\n                mmi->ptMaxTrackSize.x = window->maxwidth + xoff;\n                mmi->ptMaxTrackSize.y = window->maxheight + yoff;\n            }\n\n            if (!window->decorated)\n            {\n                MONITORINFO mi;\n                const HMONITOR mh = MonitorFromWindow(window->win32.handle,\n                                                      MONITOR_DEFAULTTONEAREST);\n\n                ZeroMemory(&mi, sizeof(mi));\n                mi.cbSize = sizeof(mi);\n                GetMonitorInfo(mh, &mi);\n\n                mmi->ptMaxPosition.x = mi.rcWork.left - mi.rcMonitor.left;\n                mmi->ptMaxPosition.y = mi.rcWork.top - mi.rcMonitor.top;\n                mmi->ptMaxSize.x = mi.rcWork.right - mi.rcWork.left;\n                mmi->ptMaxSize.y = mi.rcWork.bottom - mi.rcWork.top;\n            }\n\n            return 0;\n        }\n\n        case WM_PAINT:\n        {\n            _glfwInputWindowDamage(window);\n            break;\n        }\n\n        case WM_ERASEBKGND:\n        {\n            return TRUE;\n        }\n\n        case WM_NCACTIVATE:\n        case WM_NCPAINT:\n        {\n            // Prevent title bar from being drawn after restoring a minimized\n            // undecorated window\n            if (!window->decorated)\n                return TRUE;\n\n            break;\n        }\n\n        case WM_DWMCOMPOSITIONCHANGED:\n        {\n            if (window->win32.transparent)\n                updateFramebufferTransparency(window);\n            return 0;\n        }\n\n        case WM_GETDPISCALEDSIZE:\n        {\n            if (window->win32.scaleToMonitor)\n                break;\n\n            // Adjust the window size to keep the content area size constant\n            if (_glfwIsWindows10CreatorsUpdateOrGreaterWin32())\n            {\n                RECT source = {0}, target = {0};\n                SIZE* size = (SIZE*) lParam;\n\n                AdjustWindowRectExForDpi(&source, getWindowStyle(window),\n                                         FALSE, getWindowExStyle(window),\n                                         GetDpiForWindow(window->win32.handle));\n                AdjustWindowRectExForDpi(&target, getWindowStyle(window),\n                                         FALSE, getWindowExStyle(window),\n                                         LOWORD(wParam));\n\n                size->cx += (target.right - target.left) -\n                            (source.right - source.left);\n                size->cy += (target.bottom - target.top) -\n                            (source.bottom - source.top);\n                return TRUE;\n            }\n\n            break;\n        }\n\n        case WM_DPICHANGED:\n        {\n            const float xscale = HIWORD(wParam) / (float) USER_DEFAULT_SCREEN_DPI;\n            const float yscale = LOWORD(wParam) / (float) USER_DEFAULT_SCREEN_DPI;\n\n            // Only apply the suggested size if the OS is new enough to have\n            // sent a WM_GETDPISCALEDSIZE before this\n            if (_glfwIsWindows10CreatorsUpdateOrGreaterWin32())\n            {\n                RECT* suggested = (RECT*) lParam;\n                SetWindowPos(window->win32.handle, HWND_TOP,\n                             suggested->left,\n                             suggested->top,\n                             suggested->right - suggested->left,\n                             suggested->bottom - suggested->top,\n                             SWP_NOACTIVATE | SWP_NOZORDER);\n            }\n\n            _glfwInputWindowContentScale(window, xscale, yscale);\n            break;\n        }\n\n        case WM_SETCURSOR:\n        {\n            if (LOWORD(lParam) == HTCLIENT)\n            {\n                updateCursorImage(window);\n                return TRUE;\n            }\n\n            break;\n        }\n\n        case WM_DROPFILES:\n        {\n            HDROP drop = (HDROP) wParam;\n            POINT pt;\n            int i;\n\n            const int count = DragQueryFileW(drop, 0xffffffff, NULL, 0);\n            char** paths = calloc(count, sizeof(char*));\n\n            // Move the mouse to the position of the drop\n            DragQueryPoint(drop, &pt);\n            _glfwInputCursorPos(window, pt.x, pt.y);\n\n            for (i = 0;  i < count;  i++)\n            {\n                const UINT length = DragQueryFileW(drop, i, NULL, 0);\n                WCHAR* buffer = calloc((size_t) length + 1, sizeof(WCHAR));\n\n                DragQueryFileW(drop, i, buffer, length + 1);\n                paths[i] = _glfwCreateUTF8FromWideStringWin32(buffer);\n\n                free(buffer);\n            }\n\n            _glfwInputDrop(window, count, (const char**) paths);\n\n            for (i = 0;  i < count;  i++)\n                free(paths[i]);\n            free(paths);\n\n            DragFinish(drop);\n            return 0;\n        }\n    }\n\n    return DefWindowProcW(hWnd, uMsg, wParam, lParam);\n}\n\n// Creates the GLFW window\n//\nstatic int createNativeWindow(_GLFWwindow* window,\n                              const _GLFWwndconfig* wndconfig,\n                              const _GLFWfbconfig* fbconfig)\n{\n    int xpos, ypos, fullWidth, fullHeight;\n    WCHAR* wideTitle;\n    DWORD style = getWindowStyle(window);\n    DWORD exStyle = getWindowExStyle(window);\n\n    if (window->monitor)\n    {\n        GLFWvidmode mode;\n\n        // NOTE: This window placement is temporary and approximate, as the\n        //       correct position and size cannot be known until the monitor\n        //       video mode has been picked in _glfwSetVideoModeWin32\n        _glfwPlatformGetMonitorPos(window->monitor, &xpos, &ypos);\n        _glfwPlatformGetVideoMode(window->monitor, &mode);\n        fullWidth  = mode.width;\n        fullHeight = mode.height;\n    }\n    else\n    {\n        xpos = CW_USEDEFAULT;\n        ypos = CW_USEDEFAULT;\n\n        window->win32.maximized = wndconfig->maximized;\n        if (wndconfig->maximized)\n            style |= WS_MAXIMIZE;\n\n        getFullWindowSize(style, exStyle,\n                          wndconfig->width, wndconfig->height,\n                          &fullWidth, &fullHeight,\n                          USER_DEFAULT_SCREEN_DPI);\n    }\n\n    wideTitle = _glfwCreateWideStringFromUTF8Win32(wndconfig->title);\n    if (!wideTitle)\n        return GLFW_FALSE;\n\n    window->win32.handle = CreateWindowExW(exStyle,\n                                           _GLFW_WNDCLASSNAME,\n                                           wideTitle,\n                                           style,\n                                           xpos, ypos,\n                                           fullWidth, fullHeight,\n                                           NULL, // No parent window\n                                           NULL, // No window menu\n                                           GetModuleHandleW(NULL),\n                                           NULL);\n\n    free(wideTitle);\n\n    if (!window->win32.handle)\n    {\n        _glfwInputErrorWin32(GLFW_PLATFORM_ERROR,\n                             \"Win32: Failed to create window\");\n        return GLFW_FALSE;\n    }\n\n    SetPropW(window->win32.handle, L\"GLFW\", window);\n\n    if (IsWindows7OrGreater())\n    {\n        ChangeWindowMessageFilterEx(window->win32.handle,\n                                    WM_DROPFILES, MSGFLT_ALLOW, NULL);\n        ChangeWindowMessageFilterEx(window->win32.handle,\n                                    WM_COPYDATA, MSGFLT_ALLOW, NULL);\n        ChangeWindowMessageFilterEx(window->win32.handle,\n                                    WM_COPYGLOBALDATA, MSGFLT_ALLOW, NULL);\n    }\n\n    window->win32.scaleToMonitor = wndconfig->scaleToMonitor;\n\n    // Adjust window rect to account for DPI scaling of the window frame and\n    // (if enabled) DPI scaling of the content area\n    // This cannot be done until we know what monitor the window was placed on\n    if (!window->monitor)\n    {\n        RECT rect = { 0, 0, wndconfig->width, wndconfig->height };\n        WINDOWPLACEMENT wp = { sizeof(wp) };\n\n        if (wndconfig->scaleToMonitor)\n        {\n            float xscale, yscale;\n            _glfwPlatformGetWindowContentScale(window, &xscale, &yscale);\n            rect.right = (int) (rect.right * xscale);\n            rect.bottom = (int) (rect.bottom * yscale);\n        }\n\n        ClientToScreen(window->win32.handle, (POINT*) &rect.left);\n        ClientToScreen(window->win32.handle, (POINT*) &rect.right);\n\n        if (_glfwIsWindows10AnniversaryUpdateOrGreaterWin32())\n        {\n            AdjustWindowRectExForDpi(&rect, style, FALSE, exStyle,\n                                     GetDpiForWindow(window->win32.handle));\n        }\n        else\n            AdjustWindowRectEx(&rect, style, FALSE, exStyle);\n\n        // Only update the restored window rect as the window may be maximized\n        GetWindowPlacement(window->win32.handle, &wp);\n        wp.rcNormalPosition = rect;\n        wp.showCmd = SW_HIDE;\n        SetWindowPlacement(window->win32.handle, &wp);\n    }\n\n    DragAcceptFiles(window->win32.handle, TRUE);\n\n    if (fbconfig->transparent)\n    {\n        updateFramebufferTransparency(window);\n        window->win32.transparent = GLFW_TRUE;\n    }\n\n    return GLFW_TRUE;\n}\n\n\n//////////////////////////////////////////////////////////////////////////\n//////                       GLFW internal API                      //////\n//////////////////////////////////////////////////////////////////////////\n\n// Registers the GLFW window class\n//\nGLFWbool _glfwRegisterWindowClassWin32(void)\n{\n    WNDCLASSEXW wc;\n\n    ZeroMemory(&wc, sizeof(wc));\n    wc.cbSize        = sizeof(wc);\n    wc.style         = CS_HREDRAW | CS_VREDRAW | CS_OWNDC;\n    wc.lpfnWndProc   = (WNDPROC) windowProc;\n    wc.hInstance     = GetModuleHandleW(NULL);\n    wc.hCursor       = LoadCursorW(NULL, IDC_ARROW);\n    wc.lpszClassName = _GLFW_WNDCLASSNAME;\n\n    // Load user-provided icon if available\n    wc.hIcon = LoadImageW(GetModuleHandleW(NULL),\n                          L\"GLFW_ICON\", IMAGE_ICON,\n                          0, 0, LR_DEFAULTSIZE | LR_SHARED);\n    if (!wc.hIcon)\n    {\n        // No user-provided icon found, load default icon\n        wc.hIcon = LoadImageW(NULL,\n                              IDI_APPLICATION, IMAGE_ICON,\n                              0, 0, LR_DEFAULTSIZE | LR_SHARED);\n    }\n\n    if (!RegisterClassExW(&wc))\n    {\n        _glfwInputErrorWin32(GLFW_PLATFORM_ERROR,\n                             \"Win32: Failed to register window class\");\n        return GLFW_FALSE;\n    }\n\n    return GLFW_TRUE;\n}\n\n// Unregisters the GLFW window class\n//\nvoid _glfwUnregisterWindowClassWin32(void)\n{\n    UnregisterClassW(_GLFW_WNDCLASSNAME, GetModuleHandleW(NULL));\n}\n\n\n//////////////////////////////////////////////////////////////////////////\n//////                       GLFW platform API                      //////\n//////////////////////////////////////////////////////////////////////////\n\nint _glfwPlatformCreateWindow(_GLFWwindow* window,\n                              const _GLFWwndconfig* wndconfig,\n                              const _GLFWctxconfig* ctxconfig,\n                              const _GLFWfbconfig* fbconfig)\n{\n    if (!createNativeWindow(window, wndconfig, fbconfig))\n        return GLFW_FALSE;\n\n    if (ctxconfig->client != GLFW_NO_API)\n    {\n        if (ctxconfig->source == GLFW_NATIVE_CONTEXT_API)\n        {\n            if (!_glfwInitWGL())\n                return GLFW_FALSE;\n            if (!_glfwCreateContextWGL(window, ctxconfig, fbconfig))\n                return GLFW_FALSE;\n        }\n        else if (ctxconfig->source == GLFW_EGL_CONTEXT_API)\n        {\n            if (!_glfwInitEGL())\n                return GLFW_FALSE;\n            if (!_glfwCreateContextEGL(window, ctxconfig, fbconfig))\n                return GLFW_FALSE;\n        }\n        else if (ctxconfig->source == GLFW_OSMESA_CONTEXT_API)\n        {\n            if (!_glfwInitOSMesa())\n                return GLFW_FALSE;\n            if (!_glfwCreateContextOSMesa(window, ctxconfig, fbconfig))\n                return GLFW_FALSE;\n        }\n    }\n\n    if (window->monitor)\n    {\n        _glfwPlatformShowWindow(window);\n        _glfwPlatformFocusWindow(window);\n        acquireMonitor(window);\n        fitToMonitor(window);\n    }\n\n    return GLFW_TRUE;\n}\n\nvoid _glfwPlatformDestroyWindow(_GLFWwindow* window)\n{\n    if (window->monitor)\n        releaseMonitor(window);\n\n    if (window->context.destroy)\n        window->context.destroy(window);\n\n    if (_glfw.win32.disabledCursorWindow == window)\n        _glfw.win32.disabledCursorWindow = NULL;\n\n    if (window->win32.handle)\n    {\n        RemovePropW(window->win32.handle, L\"GLFW\");\n        DestroyWindow(window->win32.handle);\n        window->win32.handle = NULL;\n    }\n\n    if (window->win32.bigIcon)\n        DestroyIcon(window->win32.bigIcon);\n\n    if (window->win32.smallIcon)\n        DestroyIcon(window->win32.smallIcon);\n}\n\nvoid _glfwPlatformSetWindowTitle(_GLFWwindow* window, const char* title)\n{\n    WCHAR* wideTitle = _glfwCreateWideStringFromUTF8Win32(title);\n    if (!wideTitle)\n        return;\n\n    SetWindowTextW(window->win32.handle, wideTitle);\n    free(wideTitle);\n}\n\nvoid _glfwPlatformSetWindowIcon(_GLFWwindow* window,\n                                int count, const GLFWimage* images)\n{\n    HICON bigIcon = NULL, smallIcon = NULL;\n\n    if (count)\n    {\n        const GLFWimage* bigImage = chooseImage(count, images,\n                                                GetSystemMetrics(SM_CXICON),\n                                                GetSystemMetrics(SM_CYICON));\n        const GLFWimage* smallImage = chooseImage(count, images,\n                                                  GetSystemMetrics(SM_CXSMICON),\n                                                  GetSystemMetrics(SM_CYSMICON));\n\n        bigIcon = createIcon(bigImage, 0, 0, GLFW_TRUE);\n        smallIcon = createIcon(smallImage, 0, 0, GLFW_TRUE);\n    }\n    else\n    {\n        bigIcon = (HICON) GetClassLongPtrW(window->win32.handle, GCLP_HICON);\n        smallIcon = (HICON) GetClassLongPtrW(window->win32.handle, GCLP_HICONSM);\n    }\n\n    SendMessage(window->win32.handle, WM_SETICON, ICON_BIG, (LPARAM) bigIcon);\n    SendMessage(window->win32.handle, WM_SETICON, ICON_SMALL, (LPARAM) smallIcon);\n\n    if (window->win32.bigIcon)\n        DestroyIcon(window->win32.bigIcon);\n\n    if (window->win32.smallIcon)\n        DestroyIcon(window->win32.smallIcon);\n\n    if (count)\n    {\n        window->win32.bigIcon = bigIcon;\n        window->win32.smallIcon = smallIcon;\n    }\n}\n\nvoid _glfwPlatformGetWindowPos(_GLFWwindow* window, int* xpos, int* ypos)\n{\n    POINT pos = { 0, 0 };\n    ClientToScreen(window->win32.handle, &pos);\n\n    if (xpos)\n        *xpos = pos.x;\n    if (ypos)\n        *ypos = pos.y;\n}\n\nvoid _glfwPlatformSetWindowPos(_GLFWwindow* window, int xpos, int ypos)\n{\n    RECT rect = { xpos, ypos, xpos, ypos };\n\n    if (_glfwIsWindows10AnniversaryUpdateOrGreaterWin32())\n    {\n        AdjustWindowRectExForDpi(&rect, getWindowStyle(window),\n                                 FALSE, getWindowExStyle(window),\n                                 GetDpiForWindow(window->win32.handle));\n    }\n    else\n    {\n        AdjustWindowRectEx(&rect, getWindowStyle(window),\n                           FALSE, getWindowExStyle(window));\n    }\n\n    SetWindowPos(window->win32.handle, NULL, rect.left, rect.top, 0, 0,\n                 SWP_NOACTIVATE | SWP_NOZORDER | SWP_NOSIZE);\n}\n\nvoid _glfwPlatformGetWindowSize(_GLFWwindow* window, int* width, int* height)\n{\n    RECT area;\n    GetClientRect(window->win32.handle, &area);\n\n    if (width)\n        *width = area.right;\n    if (height)\n        *height = area.bottom;\n}\n\nvoid _glfwPlatformSetWindowSize(_GLFWwindow* window, int width, int height)\n{\n    if (window->monitor)\n    {\n        if (window->monitor->window == window)\n        {\n            acquireMonitor(window);\n            fitToMonitor(window);\n        }\n    }\n    else\n    {\n        RECT rect = { 0, 0, width, height };\n\n        if (_glfwIsWindows10AnniversaryUpdateOrGreaterWin32())\n        {\n            AdjustWindowRectExForDpi(&rect, getWindowStyle(window),\n                                     FALSE, getWindowExStyle(window),\n                                     GetDpiForWindow(window->win32.handle));\n        }\n        else\n        {\n            AdjustWindowRectEx(&rect, getWindowStyle(window),\n                               FALSE, getWindowExStyle(window));\n        }\n\n        SetWindowPos(window->win32.handle, HWND_TOP,\n                     0, 0, rect.right - rect.left, rect.bottom - rect.top,\n                     SWP_NOACTIVATE | SWP_NOOWNERZORDER | SWP_NOMOVE | SWP_NOZORDER);\n    }\n}\n\nvoid _glfwPlatformSetWindowSizeLimits(_GLFWwindow* window,\n                                      int minwidth, int minheight,\n                                      int maxwidth, int maxheight)\n{\n    RECT area;\n\n    if ((minwidth == GLFW_DONT_CARE || minheight == GLFW_DONT_CARE) &&\n        (maxwidth == GLFW_DONT_CARE || maxheight == GLFW_DONT_CARE))\n    {\n        return;\n    }\n\n    GetWindowRect(window->win32.handle, &area);\n    MoveWindow(window->win32.handle,\n               area.left, area.top,\n               area.right - area.left,\n               area.bottom - area.top, TRUE);\n}\n\nvoid _glfwPlatformSetWindowAspectRatio(_GLFWwindow* window, int numer, int denom)\n{\n    RECT area;\n\n    if (numer == GLFW_DONT_CARE || denom == GLFW_DONT_CARE)\n        return;\n\n    GetWindowRect(window->win32.handle, &area);\n    applyAspectRatio(window, WMSZ_BOTTOMRIGHT, &area);\n    MoveWindow(window->win32.handle,\n               area.left, area.top,\n               area.right - area.left,\n               area.bottom - area.top, TRUE);\n}\n\nvoid _glfwPlatformGetFramebufferSize(_GLFWwindow* window, int* width, int* height)\n{\n    _glfwPlatformGetWindowSize(window, width, height);\n}\n\nvoid _glfwPlatformGetWindowFrameSize(_GLFWwindow* window,\n                                     int* left, int* top,\n                                     int* right, int* bottom)\n{\n    RECT rect;\n    int width, height;\n\n    _glfwPlatformGetWindowSize(window, &width, &height);\n    SetRect(&rect, 0, 0, width, height);\n\n    if (_glfwIsWindows10AnniversaryUpdateOrGreaterWin32())\n    {\n        AdjustWindowRectExForDpi(&rect, getWindowStyle(window),\n                                 FALSE, getWindowExStyle(window),\n                                 GetDpiForWindow(window->win32.handle));\n    }\n    else\n    {\n        AdjustWindowRectEx(&rect, getWindowStyle(window),\n                           FALSE, getWindowExStyle(window));\n    }\n\n    if (left)\n        *left = -rect.left;\n    if (top)\n        *top = -rect.top;\n    if (right)\n        *right = rect.right - width;\n    if (bottom)\n        *bottom = rect.bottom - height;\n}\n\nvoid _glfwPlatformGetWindowContentScale(_GLFWwindow* window,\n                                        float* xscale, float* yscale)\n{\n    const HANDLE handle = MonitorFromWindow(window->win32.handle,\n                                            MONITOR_DEFAULTTONEAREST);\n    _glfwGetMonitorContentScaleWin32(handle, xscale, yscale);\n}\n\nvoid _glfwPlatformIconifyWindow(_GLFWwindow* window)\n{\n    ShowWindow(window->win32.handle, SW_MINIMIZE);\n}\n\nvoid _glfwPlatformRestoreWindow(_GLFWwindow* window)\n{\n    ShowWindow(window->win32.handle, SW_RESTORE);\n}\n\nvoid _glfwPlatformMaximizeWindow(_GLFWwindow* window)\n{\n    ShowWindow(window->win32.handle, SW_MAXIMIZE);\n}\n\nvoid _glfwPlatformShowWindow(_GLFWwindow* window)\n{\n    ShowWindow(window->win32.handle, SW_SHOWNA);\n}\n\nvoid _glfwPlatformHideWindow(_GLFWwindow* window)\n{\n    ShowWindow(window->win32.handle, SW_HIDE);\n}\n\nvoid _glfwPlatformRequestWindowAttention(_GLFWwindow* window)\n{\n    FlashWindow(window->win32.handle, TRUE);\n}\n\nvoid _glfwPlatformFocusWindow(_GLFWwindow* window)\n{\n    BringWindowToTop(window->win32.handle);\n    SetForegroundWindow(window->win32.handle);\n    SetFocus(window->win32.handle);\n}\n\nvoid _glfwPlatformSetWindowMonitor(_GLFWwindow* window,\n                                   _GLFWmonitor* monitor,\n                                   int xpos, int ypos,\n                                   int width, int height,\n                                   int refreshRate)\n{\n    if (window->monitor == monitor)\n    {\n        if (monitor)\n        {\n            if (monitor->window == window)\n            {\n                acquireMonitor(window);\n                fitToMonitor(window);\n            }\n        }\n        else\n        {\n            RECT rect = { xpos, ypos, xpos + width, ypos + height };\n\n            if (_glfwIsWindows10AnniversaryUpdateOrGreaterWin32())\n            {\n                AdjustWindowRectExForDpi(&rect, getWindowStyle(window),\n                                         FALSE, getWindowExStyle(window),\n                                         GetDpiForWindow(window->win32.handle));\n            }\n            else\n            {\n                AdjustWindowRectEx(&rect, getWindowStyle(window),\n                                   FALSE, getWindowExStyle(window));\n            }\n\n            SetWindowPos(window->win32.handle, HWND_TOP,\n                         rect.left, rect.top,\n                         rect.right - rect.left, rect.bottom - rect.top,\n                         SWP_NOCOPYBITS | SWP_NOACTIVATE | SWP_NOZORDER);\n        }\n\n        return;\n    }\n\n    if (window->monitor)\n        releaseMonitor(window);\n\n    _glfwInputWindowMonitor(window, monitor);\n\n    if (window->monitor)\n    {\n        MONITORINFO mi = { sizeof(mi) };\n        UINT flags = SWP_SHOWWINDOW | SWP_NOACTIVATE | SWP_NOCOPYBITS;\n\n        if (window->decorated)\n        {\n            DWORD style = GetWindowLongW(window->win32.handle, GWL_STYLE);\n            style &= ~WS_OVERLAPPEDWINDOW;\n            style |= getWindowStyle(window);\n            SetWindowLongW(window->win32.handle, GWL_STYLE, style);\n            flags |= SWP_FRAMECHANGED;\n        }\n\n        acquireMonitor(window);\n\n        GetMonitorInfo(window->monitor->win32.handle, &mi);\n        SetWindowPos(window->win32.handle, HWND_TOPMOST,\n                     mi.rcMonitor.left,\n                     mi.rcMonitor.top,\n                     mi.rcMonitor.right - mi.rcMonitor.left,\n                     mi.rcMonitor.bottom - mi.rcMonitor.top,\n                     flags);\n    }\n    else\n    {\n        HWND after;\n        RECT rect = { xpos, ypos, xpos + width, ypos + height };\n        DWORD style = GetWindowLongW(window->win32.handle, GWL_STYLE);\n        UINT flags = SWP_NOACTIVATE | SWP_NOCOPYBITS;\n\n        if (window->decorated)\n        {\n            style &= ~WS_POPUP;\n            style |= getWindowStyle(window);\n            SetWindowLongW(window->win32.handle, GWL_STYLE, style);\n\n            flags |= SWP_FRAMECHANGED;\n        }\n\n        if (window->floating)\n            after = HWND_TOPMOST;\n        else\n            after = HWND_NOTOPMOST;\n\n        if (_glfwIsWindows10AnniversaryUpdateOrGreaterWin32())\n        {\n            AdjustWindowRectExForDpi(&rect, getWindowStyle(window),\n                                     FALSE, getWindowExStyle(window),\n                                     GetDpiForWindow(window->win32.handle));\n        }\n        else\n        {\n            AdjustWindowRectEx(&rect, getWindowStyle(window),\n                               FALSE, getWindowExStyle(window));\n        }\n\n        SetWindowPos(window->win32.handle, after,\n                     rect.left, rect.top,\n                     rect.right - rect.left, rect.bottom - rect.top,\n                     flags);\n    }\n}\n\nint _glfwPlatformWindowFocused(_GLFWwindow* window)\n{\n    return window->win32.handle == GetActiveWindow();\n}\n\nint _glfwPlatformWindowIconified(_GLFWwindow* window)\n{\n    return IsIconic(window->win32.handle);\n}\n\nint _glfwPlatformWindowVisible(_GLFWwindow* window)\n{\n    return IsWindowVisible(window->win32.handle);\n}\n\nint _glfwPlatformWindowMaximized(_GLFWwindow* window)\n{\n    return IsZoomed(window->win32.handle);\n}\n\nint _glfwPlatformWindowHovered(_GLFWwindow* window)\n{\n    return cursorInContentArea(window);\n}\n\nint _glfwPlatformFramebufferTransparent(_GLFWwindow* window)\n{\n    BOOL enabled;\n\n    if (!window->win32.transparent)\n        return GLFW_FALSE;\n\n    if (!IsWindowsVistaOrGreater())\n        return GLFW_FALSE;\n\n    return SUCCEEDED(DwmIsCompositionEnabled(&enabled)) && enabled;\n}\n\nvoid _glfwPlatformSetWindowResizable(_GLFWwindow* window, GLFWbool enabled)\n{\n    updateWindowStyles(window);\n}\n\nvoid _glfwPlatformSetWindowDecorated(_GLFWwindow* window, GLFWbool enabled)\n{\n    updateWindowStyles(window);\n}\n\nvoid _glfwPlatformSetWindowFloating(_GLFWwindow* window, GLFWbool enabled)\n{\n    const HWND after = enabled ? HWND_TOPMOST : HWND_NOTOPMOST;\n    SetWindowPos(window->win32.handle, after, 0, 0, 0, 0,\n                 SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE);\n}\n\nfloat _glfwPlatformGetWindowOpacity(_GLFWwindow* window)\n{\n    BYTE alpha;\n    DWORD flags;\n\n    if ((GetWindowLongW(window->win32.handle, GWL_EXSTYLE) & WS_EX_LAYERED) &&\n        GetLayeredWindowAttributes(window->win32.handle, NULL, &alpha, &flags))\n    {\n        if (flags & LWA_ALPHA)\n            return alpha / 255.f;\n    }\n\n    return 1.f;\n}\n\nvoid _glfwPlatformSetWindowOpacity(_GLFWwindow* window, float opacity)\n{\n    if (opacity < 1.f)\n    {\n        const BYTE alpha = (BYTE) (255 * opacity);\n        DWORD style = GetWindowLongW(window->win32.handle, GWL_EXSTYLE);\n        style |= WS_EX_LAYERED;\n        SetWindowLongW(window->win32.handle, GWL_EXSTYLE, style);\n        SetLayeredWindowAttributes(window->win32.handle, 0, alpha, LWA_ALPHA);\n    }\n    else\n    {\n        DWORD style = GetWindowLongW(window->win32.handle, GWL_EXSTYLE);\n        style &= ~WS_EX_LAYERED;\n        SetWindowLongW(window->win32.handle, GWL_EXSTYLE, style);\n    }\n}\n\nvoid _glfwPlatformSetRawMouseMotion(_GLFWwindow *window, GLFWbool enabled)\n{\n    if (_glfw.win32.disabledCursorWindow != window)\n        return;\n\n    if (enabled)\n        enableRawMouseMotion(window);\n    else\n        disableRawMouseMotion(window);\n}\n\nGLFWbool _glfwPlatformRawMouseMotionSupported(void)\n{\n    return GLFW_TRUE;\n}\n\nvoid _glfwPlatformPollEvents(void)\n{\n    MSG msg;\n    HWND handle;\n    _GLFWwindow* window;\n\n    while (PeekMessageW(&msg, NULL, 0, 0, PM_REMOVE))\n    {\n        if (msg.message == WM_QUIT)\n        {\n            // NOTE: While GLFW does not itself post WM_QUIT, other processes\n            //       may post it to this one, for example Task Manager\n            // HACK: Treat WM_QUIT as a close on all windows\n\n            window = _glfw.windowListHead;\n            while (window)\n            {\n                _glfwInputWindowCloseRequest(window);\n                window = window->next;\n            }\n        }\n        else\n        {\n            TranslateMessage(&msg);\n            DispatchMessageW(&msg);\n        }\n    }\n\n    // HACK: Release modifier keys that the system did not emit KEYUP for\n    // NOTE: Shift keys on Windows tend to \"stick\" when both are pressed as\n    //       no key up message is generated by the first key release\n    // NOTE: Windows key is not reported as released by the Win+V hotkey\n    //       Other Win hotkeys are handled implicitly by _glfwInputWindowFocus\n    //       because they change the input focus\n    // NOTE: The other half of this is in the WM_*KEY* handler in windowProc\n    handle = GetActiveWindow();\n    if (handle)\n    {\n        window = GetPropW(handle, L\"GLFW\");\n        if (window)\n        {\n            int i;\n            const int keys[4][2] =\n            {\n                { VK_LSHIFT, GLFW_KEY_LEFT_SHIFT },\n                { VK_RSHIFT, GLFW_KEY_RIGHT_SHIFT },\n                { VK_LWIN, GLFW_KEY_LEFT_SUPER },\n                { VK_RWIN, GLFW_KEY_RIGHT_SUPER }\n            };\n\n            for (i = 0;  i < 4;  i++)\n            {\n                const int vk = keys[i][0];\n                const int key = keys[i][1];\n                const int scancode = _glfw.win32.scancodes[key];\n\n                if ((GetKeyState(vk) & 0x8000))\n                    continue;\n                if (window->keys[key] != GLFW_PRESS)\n                    continue;\n\n                _glfwInputKey(window, key, scancode, GLFW_RELEASE, getKeyMods());\n            }\n        }\n    }\n\n    window = _glfw.win32.disabledCursorWindow;\n    if (window)\n    {\n        int width, height;\n        _glfwPlatformGetWindowSize(window, &width, &height);\n\n        // NOTE: Re-center the cursor only if it has moved since the last call,\n        //       to avoid breaking glfwWaitEvents with WM_MOUSEMOVE\n        if (window->win32.lastCursorPosX != width / 2 ||\n            window->win32.lastCursorPosY != height / 2)\n        {\n            _glfwPlatformSetCursorPos(window, width / 2, height / 2);\n        }\n    }\n}\n\nvoid _glfwPlatformWaitEvents(void)\n{\n    WaitMessage();\n\n    _glfwPlatformPollEvents();\n}\n\nvoid _glfwPlatformWaitEventsTimeout(double timeout)\n{\n    MsgWaitForMultipleObjects(0, NULL, FALSE, (DWORD) (timeout * 1e3), QS_ALLEVENTS);\n\n    _glfwPlatformPollEvents();\n}\n\nvoid _glfwPlatformPostEmptyEvent(void)\n{\n    PostMessage(_glfw.win32.helperWindowHandle, WM_NULL, 0, 0);\n}\n\nvoid _glfwPlatformGetCursorPos(_GLFWwindow* window, double* xpos, double* ypos)\n{\n    POINT pos;\n\n    if (GetCursorPos(&pos))\n    {\n        ScreenToClient(window->win32.handle, &pos);\n\n        if (xpos)\n            *xpos = pos.x;\n        if (ypos)\n            *ypos = pos.y;\n    }\n}\n\nvoid _glfwPlatformSetCursorPos(_GLFWwindow* window, double xpos, double ypos)\n{\n    POINT pos = { (int) xpos, (int) ypos };\n\n    // Store the new position so it can be recognized later\n    window->win32.lastCursorPosX = pos.x;\n    window->win32.lastCursorPosY = pos.y;\n\n    ClientToScreen(window->win32.handle, &pos);\n    SetCursorPos(pos.x, pos.y);\n}\n\nvoid _glfwPlatformSetCursorMode(_GLFWwindow* window, int mode)\n{\n    if (mode == GLFW_CURSOR_DISABLED)\n    {\n        if (_glfwPlatformWindowFocused(window))\n            disableCursor(window);\n    }\n    else if (_glfw.win32.disabledCursorWindow == window)\n        enableCursor(window);\n    else if (cursorInContentArea(window))\n        updateCursorImage(window);\n}\n\nconst char* _glfwPlatformGetScancodeName(int scancode)\n{\n    if (scancode < 0 || scancode > (KF_EXTENDED | 0xff) ||\n        _glfw.win32.keycodes[scancode] == GLFW_KEY_UNKNOWN)\n    {\n        _glfwInputError(GLFW_INVALID_VALUE, \"Invalid scancode\");\n        return NULL;\n    }\n\n    return _glfw.win32.keynames[_glfw.win32.keycodes[scancode]];\n}\n\nint _glfwPlatformGetKeyScancode(int key)\n{\n    return _glfw.win32.scancodes[key];\n}\n\nint _glfwPlatformCreateCursor(_GLFWcursor* cursor,\n                              const GLFWimage* image,\n                              int xhot, int yhot)\n{\n    cursor->win32.handle = (HCURSOR) createIcon(image, xhot, yhot, GLFW_FALSE);\n    if (!cursor->win32.handle)\n        return GLFW_FALSE;\n\n    return GLFW_TRUE;\n}\n\nint _glfwPlatformCreateStandardCursor(_GLFWcursor* cursor, int shape)\n{\n    int id = 0;\n\n    if (shape == GLFW_ARROW_CURSOR)\n        id = OCR_NORMAL;\n    else if (shape == GLFW_IBEAM_CURSOR)\n        id = OCR_IBEAM;\n    else if (shape == GLFW_CROSSHAIR_CURSOR)\n        id = OCR_CROSS;\n    else if (shape == GLFW_HAND_CURSOR)\n        id = OCR_HAND;\n    else if (shape == GLFW_HRESIZE_CURSOR)\n        id = OCR_SIZEWE;\n    else if (shape == GLFW_VRESIZE_CURSOR)\n        id = OCR_SIZENS;\n    else\n        return GLFW_FALSE;\n\n    cursor->win32.handle = LoadImageW(NULL,\n                                      MAKEINTRESOURCEW(id), IMAGE_CURSOR, 0, 0,\n                                      LR_DEFAULTSIZE | LR_SHARED);\n    if (!cursor->win32.handle)\n    {\n        _glfwInputErrorWin32(GLFW_PLATFORM_ERROR,\n                             \"Win32: Failed to create standard cursor\");\n        return GLFW_FALSE;\n    }\n\n    return GLFW_TRUE;\n}\n\nvoid _glfwPlatformDestroyCursor(_GLFWcursor* cursor)\n{\n    if (cursor->win32.handle)\n        DestroyIcon((HICON) cursor->win32.handle);\n}\n\nvoid _glfwPlatformSetCursor(_GLFWwindow* window, _GLFWcursor* cursor)\n{\n    if (cursorInContentArea(window))\n        updateCursorImage(window);\n}\n\nvoid _glfwPlatformSetClipboardString(const char* string)\n{\n    int characterCount;\n    HANDLE object;\n    WCHAR* buffer;\n\n    characterCount = MultiByteToWideChar(CP_UTF8, 0, string, -1, NULL, 0);\n    if (!characterCount)\n        return;\n\n    object = GlobalAlloc(GMEM_MOVEABLE, characterCount * sizeof(WCHAR));\n    if (!object)\n    {\n        _glfwInputErrorWin32(GLFW_PLATFORM_ERROR,\n                             \"Win32: Failed to allocate global handle for clipboard\");\n        return;\n    }\n\n    buffer = GlobalLock(object);\n    if (!buffer)\n    {\n        _glfwInputErrorWin32(GLFW_PLATFORM_ERROR,\n                             \"Win32: Failed to lock global handle\");\n        GlobalFree(object);\n        return;\n    }\n\n    MultiByteToWideChar(CP_UTF8, 0, string, -1, buffer, characterCount);\n    GlobalUnlock(object);\n\n    if (!OpenClipboard(_glfw.win32.helperWindowHandle))\n    {\n        _glfwInputErrorWin32(GLFW_PLATFORM_ERROR,\n                             \"Win32: Failed to open clipboard\");\n        GlobalFree(object);\n        return;\n    }\n\n    EmptyClipboard();\n    SetClipboardData(CF_UNICODETEXT, object);\n    CloseClipboard();\n}\n\nconst char* _glfwPlatformGetClipboardString(void)\n{\n    HANDLE object;\n    WCHAR* buffer;\n\n    if (!OpenClipboard(_glfw.win32.helperWindowHandle))\n    {\n        _glfwInputErrorWin32(GLFW_PLATFORM_ERROR,\n                             \"Win32: Failed to open clipboard\");\n        return NULL;\n    }\n\n    object = GetClipboardData(CF_UNICODETEXT);\n    if (!object)\n    {\n        _glfwInputErrorWin32(GLFW_FORMAT_UNAVAILABLE,\n                             \"Win32: Failed to convert clipboard to string\");\n        CloseClipboard();\n        return NULL;\n    }\n\n    buffer = GlobalLock(object);\n    if (!buffer)\n    {\n        _glfwInputErrorWin32(GLFW_PLATFORM_ERROR,\n                             \"Win32: Failed to lock global handle\");\n        CloseClipboard();\n        return NULL;\n    }\n\n    free(_glfw.win32.clipboardString);\n    _glfw.win32.clipboardString = _glfwCreateUTF8FromWideStringWin32(buffer);\n\n    GlobalUnlock(object);\n    CloseClipboard();\n\n    return _glfw.win32.clipboardString;\n}\n\nvoid _glfwPlatformGetRequiredInstanceExtensions(char** extensions)\n{\n    if (!_glfw.vk.KHR_surface || !_glfw.vk.KHR_win32_surface)\n        return;\n\n    extensions[0] = \"VK_KHR_surface\";\n    extensions[1] = \"VK_KHR_win32_surface\";\n}\n\nint _glfwPlatformGetPhysicalDevicePresentationSupport(VkInstance instance,\n                                                      VkPhysicalDevice device,\n                                                      uint32_t queuefamily)\n{\n    PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR\n        vkGetPhysicalDeviceWin32PresentationSupportKHR =\n        (PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR)\n        vkGetInstanceProcAddr(instance, \"vkGetPhysicalDeviceWin32PresentationSupportKHR\");\n    if (!vkGetPhysicalDeviceWin32PresentationSupportKHR)\n    {\n        _glfwInputError(GLFW_API_UNAVAILABLE,\n                        \"Win32: Vulkan instance missing VK_KHR_win32_surface extension\");\n        return GLFW_FALSE;\n    }\n\n    return vkGetPhysicalDeviceWin32PresentationSupportKHR(device, queuefamily);\n}\n\nVkResult _glfwPlatformCreateWindowSurface(VkInstance instance,\n                                          _GLFWwindow* window,\n                                          const VkAllocationCallbacks* allocator,\n                                          VkSurfaceKHR* surface)\n{\n    VkResult err;\n    VkWin32SurfaceCreateInfoKHR sci;\n    PFN_vkCreateWin32SurfaceKHR vkCreateWin32SurfaceKHR;\n\n    vkCreateWin32SurfaceKHR = (PFN_vkCreateWin32SurfaceKHR)\n        vkGetInstanceProcAddr(instance, \"vkCreateWin32SurfaceKHR\");\n    if (!vkCreateWin32SurfaceKHR)\n    {\n        _glfwInputError(GLFW_API_UNAVAILABLE,\n                        \"Win32: Vulkan instance missing VK_KHR_win32_surface extension\");\n        return VK_ERROR_EXTENSION_NOT_PRESENT;\n    }\n\n    memset(&sci, 0, sizeof(sci));\n    sci.sType = VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR;\n    sci.hinstance = GetModuleHandle(NULL);\n    sci.hwnd = window->win32.handle;\n\n    err = vkCreateWin32SurfaceKHR(instance, &sci, allocator, surface);\n    if (err)\n    {\n        _glfwInputError(GLFW_PLATFORM_ERROR,\n                        \"Win32: Failed to create Vulkan surface: %s\",\n                        _glfwGetVulkanResultString(err));\n    }\n\n    return err;\n}\n\n\n//////////////////////////////////////////////////////////////////////////\n//////                        GLFW native API                       //////\n//////////////////////////////////////////////////////////////////////////\n\nGLFWAPI HWND glfwGetWin32Window(GLFWwindow* handle)\n{\n    _GLFWwindow* window = (_GLFWwindow*) handle;\n    _GLFW_REQUIRE_INIT_OR_RETURN(NULL);\n    return window->win32.handle;\n}\n\n"
  },
  {
    "path": "thirdparty/glfw/src/window.c",
    "content": "//========================================================================\n// GLFW 3.3 - www.glfw.org\n//------------------------------------------------------------------------\n// Copyright (c) 2002-2006 Marcus Geelnard\n// Copyright (c) 2006-2019 Camilla Löwy <elmindreda@glfw.org>\n// Copyright (c) 2012 Torsten Walluhn <tw@mad-cad.net>\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//    claim that you wrote the original software. If you use this software\n//    in a product, an acknowledgment in the product documentation would\n//    be appreciated but is not required.\n//\n// 2. Altered source versions must be plainly marked as such, and must not\n//    be misrepresented as being the original software.\n//\n// 3. This notice may not be removed or altered from any source\n//    distribution.\n//\n//========================================================================\n// Please use C89 style variable declarations in this file because VS 2010\n//========================================================================\n\n#include \"internal.h\"\n\n#include <assert.h>\n#include <string.h>\n#include <stdlib.h>\n#include <float.h>\n\n\n//////////////////////////////////////////////////////////////////////////\n//////                         GLFW event API                       //////\n//////////////////////////////////////////////////////////////////////////\n\n// Notifies shared code that a window has lost or received input focus\n//\nvoid _glfwInputWindowFocus(_GLFWwindow* window, GLFWbool focused)\n{\n    if (window->callbacks.focus)\n        window->callbacks.focus((GLFWwindow*) window, focused);\n\n    if (!focused)\n    {\n        int key, button;\n\n        for (key = 0;  key <= GLFW_KEY_LAST;  key++)\n        {\n            if (window->keys[key] == GLFW_PRESS)\n            {\n                const int scancode = _glfwPlatformGetKeyScancode(key);\n                _glfwInputKey(window, key, scancode, GLFW_RELEASE, 0);\n            }\n        }\n\n        for (button = 0;  button <= GLFW_MOUSE_BUTTON_LAST;  button++)\n        {\n            if (window->mouseButtons[button] == GLFW_PRESS)\n                _glfwInputMouseClick(window, button, GLFW_RELEASE, 0);\n        }\n    }\n}\n\n// Notifies shared code that a window has moved\n// The position is specified in content area relative screen coordinates\n//\nvoid _glfwInputWindowPos(_GLFWwindow* window, int x, int y)\n{\n    if (window->callbacks.pos)\n        window->callbacks.pos((GLFWwindow*) window, x, y);\n}\n\n// Notifies shared code that a window has been resized\n// The size is specified in screen coordinates\n//\nvoid _glfwInputWindowSize(_GLFWwindow* window, int width, int height)\n{\n    if (window->callbacks.size)\n        window->callbacks.size((GLFWwindow*) window, width, height);\n}\n\n// Notifies shared code that a window has been iconified or restored\n//\nvoid _glfwInputWindowIconify(_GLFWwindow* window, GLFWbool iconified)\n{\n    if (window->callbacks.iconify)\n        window->callbacks.iconify((GLFWwindow*) window, iconified);\n}\n\n// Notifies shared code that a window has been maximized or restored\n//\nvoid _glfwInputWindowMaximize(_GLFWwindow* window, GLFWbool maximized)\n{\n    if (window->callbacks.maximize)\n        window->callbacks.maximize((GLFWwindow*) window, maximized);\n}\n\n// Notifies shared code that a window framebuffer has been resized\n// The size is specified in pixels\n//\nvoid _glfwInputFramebufferSize(_GLFWwindow* window, int width, int height)\n{\n    if (window->callbacks.fbsize)\n        window->callbacks.fbsize((GLFWwindow*) window, width, height);\n}\n\n// Notifies shared code that a window content scale has changed\n// The scale is specified as the ratio between the current and default DPI\n//\nvoid _glfwInputWindowContentScale(_GLFWwindow* window, float xscale, float yscale)\n{\n    if (window->callbacks.scale)\n        window->callbacks.scale((GLFWwindow*) window, xscale, yscale);\n}\n\n// Notifies shared code that the window contents needs updating\n//\nvoid _glfwInputWindowDamage(_GLFWwindow* window)\n{\n    if (window->callbacks.refresh)\n        window->callbacks.refresh((GLFWwindow*) window);\n}\n\n// Notifies shared code that the user wishes to close a window\n//\nvoid _glfwInputWindowCloseRequest(_GLFWwindow* window)\n{\n    window->shouldClose = GLFW_TRUE;\n\n    if (window->callbacks.close)\n        window->callbacks.close((GLFWwindow*) window);\n}\n\n// Notifies shared code that a window has changed its desired monitor\n//\nvoid _glfwInputWindowMonitor(_GLFWwindow* window, _GLFWmonitor* monitor)\n{\n    window->monitor = monitor;\n}\n\n//////////////////////////////////////////////////////////////////////////\n//////                        GLFW public API                       //////\n//////////////////////////////////////////////////////////////////////////\n\nGLFWAPI GLFWwindow* glfwCreateWindow(int width, int height,\n                                     const char* title,\n                                     GLFWmonitor* monitor,\n                                     GLFWwindow* share)\n{\n    _GLFWfbconfig fbconfig;\n    _GLFWctxconfig ctxconfig;\n    _GLFWwndconfig wndconfig;\n    _GLFWwindow* window;\n\n    assert(title != NULL);\n    assert(width >= 0);\n    assert(height >= 0);\n\n    _GLFW_REQUIRE_INIT_OR_RETURN(NULL);\n\n    if (width <= 0 || height <= 0)\n    {\n        _glfwInputError(GLFW_INVALID_VALUE,\n                        \"Invalid window size %ix%i\",\n                        width, height);\n\n        return NULL;\n    }\n\n    fbconfig  = _glfw.hints.framebuffer;\n    ctxconfig = _glfw.hints.context;\n    wndconfig = _glfw.hints.window;\n\n    wndconfig.width   = width;\n    wndconfig.height  = height;\n    wndconfig.title   = title;\n    ctxconfig.share   = (_GLFWwindow*) share;\n\n    if (!_glfwIsValidContextConfig(&ctxconfig))\n        return NULL;\n\n    window = calloc(1, sizeof(_GLFWwindow));\n    window->next = _glfw.windowListHead;\n    _glfw.windowListHead = window;\n\n    window->videoMode.width       = width;\n    window->videoMode.height      = height;\n    window->videoMode.redBits     = fbconfig.redBits;\n    window->videoMode.greenBits   = fbconfig.greenBits;\n    window->videoMode.blueBits    = fbconfig.blueBits;\n    window->videoMode.refreshRate = _glfw.hints.refreshRate;\n\n    window->monitor     = (_GLFWmonitor*) monitor;\n    window->resizable   = wndconfig.resizable;\n    window->decorated   = wndconfig.decorated;\n    window->autoIconify = wndconfig.autoIconify;\n    window->floating    = wndconfig.floating;\n    window->focusOnShow = wndconfig.focusOnShow;\n    window->cursorMode  = GLFW_CURSOR_NORMAL;\n\n    window->minwidth    = GLFW_DONT_CARE;\n    window->minheight   = GLFW_DONT_CARE;\n    window->maxwidth    = GLFW_DONT_CARE;\n    window->maxheight   = GLFW_DONT_CARE;\n    window->numer       = GLFW_DONT_CARE;\n    window->denom       = GLFW_DONT_CARE;\n\n    // Open the actual window and create its context\n    if (!_glfwPlatformCreateWindow(window, &wndconfig, &ctxconfig, &fbconfig))\n    {\n        glfwDestroyWindow((GLFWwindow*) window);\n        return NULL;\n    }\n\n    if (ctxconfig.client != GLFW_NO_API)\n    {\n        if (!_glfwRefreshContextAttribs(window, &ctxconfig))\n        {\n            glfwDestroyWindow((GLFWwindow*) window);\n            return NULL;\n        }\n    }\n\n    if (window->monitor)\n    {\n        if (wndconfig.centerCursor)\n            _glfwCenterCursorInContentArea(window);\n    }\n    else\n    {\n        if (wndconfig.visible)\n        {\n            _glfwPlatformShowWindow(window);\n            if (wndconfig.focused)\n                _glfwPlatformFocusWindow(window);\n        }\n    }\n\n    return (GLFWwindow*) window;\n}\n\nvoid glfwDefaultWindowHints(void)\n{\n    _GLFW_REQUIRE_INIT();\n\n    // The default is OpenGL with minimum version 1.0\n    memset(&_glfw.hints.context, 0, sizeof(_glfw.hints.context));\n    _glfw.hints.context.client = GLFW_OPENGL_API;\n    _glfw.hints.context.source = GLFW_NATIVE_CONTEXT_API;\n    _glfw.hints.context.major  = 1;\n    _glfw.hints.context.minor  = 0;\n\n    // The default is a focused, visible, resizable window with decorations\n    memset(&_glfw.hints.window, 0, sizeof(_glfw.hints.window));\n    _glfw.hints.window.resizable    = GLFW_TRUE;\n    _glfw.hints.window.visible      = GLFW_TRUE;\n    _glfw.hints.window.decorated    = GLFW_TRUE;\n    _glfw.hints.window.focused      = GLFW_TRUE;\n    _glfw.hints.window.autoIconify  = GLFW_TRUE;\n    _glfw.hints.window.centerCursor = GLFW_TRUE;\n    _glfw.hints.window.focusOnShow  = GLFW_TRUE;\n\n    // The default is 24 bits of color, 24 bits of depth and 8 bits of stencil,\n    // double buffered\n    memset(&_glfw.hints.framebuffer, 0, sizeof(_glfw.hints.framebuffer));\n    _glfw.hints.framebuffer.redBits      = 8;\n    _glfw.hints.framebuffer.greenBits    = 8;\n    _glfw.hints.framebuffer.blueBits     = 8;\n    _glfw.hints.framebuffer.alphaBits    = 8;\n    _glfw.hints.framebuffer.depthBits    = 24;\n    _glfw.hints.framebuffer.stencilBits  = 8;\n    _glfw.hints.framebuffer.doublebuffer = GLFW_TRUE;\n\n    // The default is to select the highest available refresh rate\n    _glfw.hints.refreshRate = GLFW_DONT_CARE;\n\n    // The default is to use full Retina resolution framebuffers\n    _glfw.hints.window.ns.retina = GLFW_TRUE;\n}\n\nGLFWAPI void glfwWindowHint(int hint, int value)\n{\n    _GLFW_REQUIRE_INIT();\n\n    switch (hint)\n    {\n        case GLFW_RED_BITS:\n            _glfw.hints.framebuffer.redBits = value;\n            return;\n        case GLFW_GREEN_BITS:\n            _glfw.hints.framebuffer.greenBits = value;\n            return;\n        case GLFW_BLUE_BITS:\n            _glfw.hints.framebuffer.blueBits = value;\n            return;\n        case GLFW_ALPHA_BITS:\n            _glfw.hints.framebuffer.alphaBits = value;\n            return;\n        case GLFW_DEPTH_BITS:\n            _glfw.hints.framebuffer.depthBits = value;\n            return;\n        case GLFW_STENCIL_BITS:\n            _glfw.hints.framebuffer.stencilBits = value;\n            return;\n        case GLFW_ACCUM_RED_BITS:\n            _glfw.hints.framebuffer.accumRedBits = value;\n            return;\n        case GLFW_ACCUM_GREEN_BITS:\n            _glfw.hints.framebuffer.accumGreenBits = value;\n            return;\n        case GLFW_ACCUM_BLUE_BITS:\n            _glfw.hints.framebuffer.accumBlueBits = value;\n            return;\n        case GLFW_ACCUM_ALPHA_BITS:\n            _glfw.hints.framebuffer.accumAlphaBits = value;\n            return;\n        case GLFW_AUX_BUFFERS:\n            _glfw.hints.framebuffer.auxBuffers = value;\n            return;\n        case GLFW_STEREO:\n            _glfw.hints.framebuffer.stereo = value ? GLFW_TRUE : GLFW_FALSE;\n            return;\n        case GLFW_DOUBLEBUFFER:\n            _glfw.hints.framebuffer.doublebuffer = value ? GLFW_TRUE : GLFW_FALSE;\n            return;\n        case GLFW_TRANSPARENT_FRAMEBUFFER:\n            _glfw.hints.framebuffer.transparent = value ? GLFW_TRUE : GLFW_FALSE;\n            return;\n        case GLFW_SAMPLES:\n            _glfw.hints.framebuffer.samples = value;\n            return;\n        case GLFW_SRGB_CAPABLE:\n            _glfw.hints.framebuffer.sRGB = value ? GLFW_TRUE : GLFW_FALSE;\n            return;\n        case GLFW_RESIZABLE:\n            _glfw.hints.window.resizable = value ? GLFW_TRUE : GLFW_FALSE;\n            return;\n        case GLFW_DECORATED:\n            _glfw.hints.window.decorated = value ? GLFW_TRUE : GLFW_FALSE;\n            return;\n        case GLFW_FOCUSED:\n            _glfw.hints.window.focused = value ? GLFW_TRUE : GLFW_FALSE;\n            return;\n        case GLFW_AUTO_ICONIFY:\n            _glfw.hints.window.autoIconify = value ? GLFW_TRUE : GLFW_FALSE;\n            return;\n        case GLFW_FLOATING:\n            _glfw.hints.window.floating = value ? GLFW_TRUE : GLFW_FALSE;\n            return;\n        case GLFW_MAXIMIZED:\n            _glfw.hints.window.maximized = value ? GLFW_TRUE : GLFW_FALSE;\n            return;\n        case GLFW_VISIBLE:\n            _glfw.hints.window.visible = value ? GLFW_TRUE : GLFW_FALSE;\n            return;\n        case GLFW_COCOA_RETINA_FRAMEBUFFER:\n            _glfw.hints.window.ns.retina = value ? GLFW_TRUE : GLFW_FALSE;\n            return;\n        case GLFW_COCOA_GRAPHICS_SWITCHING:\n            _glfw.hints.context.nsgl.offline = value ? GLFW_TRUE : GLFW_FALSE;\n            return;\n        case GLFW_SCALE_TO_MONITOR:\n            _glfw.hints.window.scaleToMonitor = value ? GLFW_TRUE : GLFW_FALSE;\n            return;\n        case GLFW_CENTER_CURSOR:\n            _glfw.hints.window.centerCursor = value ? GLFW_TRUE : GLFW_FALSE;\n            return;\n        case GLFW_FOCUS_ON_SHOW:\n            _glfw.hints.window.focusOnShow = value ? GLFW_TRUE : GLFW_FALSE;\n            return;\n        case GLFW_CLIENT_API:\n            _glfw.hints.context.client = value;\n            return;\n        case GLFW_CONTEXT_CREATION_API:\n            _glfw.hints.context.source = value;\n            return;\n        case GLFW_CONTEXT_VERSION_MAJOR:\n            _glfw.hints.context.major = value;\n            return;\n        case GLFW_CONTEXT_VERSION_MINOR:\n            _glfw.hints.context.minor = value;\n            return;\n        case GLFW_CONTEXT_ROBUSTNESS:\n            _glfw.hints.context.robustness = value;\n            return;\n        case GLFW_OPENGL_FORWARD_COMPAT:\n            _glfw.hints.context.forward = value ? GLFW_TRUE : GLFW_FALSE;\n            return;\n        case GLFW_OPENGL_DEBUG_CONTEXT:\n            _glfw.hints.context.debug = value ? GLFW_TRUE : GLFW_FALSE;\n            return;\n        case GLFW_CONTEXT_NO_ERROR:\n            _glfw.hints.context.noerror = value ? GLFW_TRUE : GLFW_FALSE;\n            return;\n        case GLFW_OPENGL_PROFILE:\n            _glfw.hints.context.profile = value;\n            return;\n        case GLFW_CONTEXT_RELEASE_BEHAVIOR:\n            _glfw.hints.context.release = value;\n            return;\n        case GLFW_REFRESH_RATE:\n            _glfw.hints.refreshRate = value;\n            return;\n    }\n\n    _glfwInputError(GLFW_INVALID_ENUM, \"Invalid window hint 0x%08X\", hint);\n}\n\nGLFWAPI void glfwWindowHintString(int hint, const char* value)\n{\n    assert(value != NULL);\n\n    _GLFW_REQUIRE_INIT();\n\n    switch (hint)\n    {\n        case GLFW_COCOA_FRAME_NAME:\n            strncpy(_glfw.hints.window.ns.frameName, value,\n                    sizeof(_glfw.hints.window.ns.frameName) - 1);\n            return;\n        case GLFW_X11_CLASS_NAME:\n            strncpy(_glfw.hints.window.x11.className, value,\n                    sizeof(_glfw.hints.window.x11.className) - 1);\n            return;\n        case GLFW_X11_INSTANCE_NAME:\n            strncpy(_glfw.hints.window.x11.instanceName, value,\n                    sizeof(_glfw.hints.window.x11.instanceName) - 1);\n            return;\n    }\n\n    _glfwInputError(GLFW_INVALID_ENUM, \"Invalid window hint string 0x%08X\", hint);\n}\n\nGLFWAPI void glfwDestroyWindow(GLFWwindow* handle)\n{\n    _GLFWwindow* window = (_GLFWwindow*) handle;\n\n    _GLFW_REQUIRE_INIT();\n\n    // Allow closing of NULL (to match the behavior of free)\n    if (window == NULL)\n        return;\n\n    // Clear all callbacks to avoid exposing a half torn-down window object\n    memset(&window->callbacks, 0, sizeof(window->callbacks));\n\n    // The window's context must not be current on another thread when the\n    // window is destroyed\n    if (window == _glfwPlatformGetTls(&_glfw.contextSlot))\n        glfwMakeContextCurrent(NULL);\n\n    _glfwPlatformDestroyWindow(window);\n\n    // Unlink window from global linked list\n    {\n        _GLFWwindow** prev = &_glfw.windowListHead;\n\n        while (*prev != window)\n            prev = &((*prev)->next);\n\n        *prev = window->next;\n    }\n\n    free(window);\n}\n\nGLFWAPI int glfwWindowShouldClose(GLFWwindow* handle)\n{\n    _GLFWwindow* window = (_GLFWwindow*) handle;\n    assert(window != NULL);\n\n    _GLFW_REQUIRE_INIT_OR_RETURN(0);\n    return window->shouldClose;\n}\n\nGLFWAPI void glfwSetWindowShouldClose(GLFWwindow* handle, int value)\n{\n    _GLFWwindow* window = (_GLFWwindow*) handle;\n    assert(window != NULL);\n\n    _GLFW_REQUIRE_INIT();\n    window->shouldClose = value;\n}\n\nGLFWAPI void glfwSetWindowTitle(GLFWwindow* handle, const char* title)\n{\n    _GLFWwindow* window = (_GLFWwindow*) handle;\n    assert(window != NULL);\n    assert(title != NULL);\n\n    _GLFW_REQUIRE_INIT();\n    _glfwPlatformSetWindowTitle(window, title);\n}\n\nGLFWAPI void glfwSetWindowIcon(GLFWwindow* handle,\n                               int count, const GLFWimage* images)\n{\n    _GLFWwindow* window = (_GLFWwindow*) handle;\n    assert(window != NULL);\n    assert(count >= 0);\n    assert(count == 0 || images != NULL);\n\n    _GLFW_REQUIRE_INIT();\n    _glfwPlatformSetWindowIcon(window, count, images);\n}\n\nGLFWAPI void glfwGetWindowPos(GLFWwindow* handle, int* xpos, int* ypos)\n{\n    _GLFWwindow* window = (_GLFWwindow*) handle;\n    assert(window != NULL);\n\n    if (xpos)\n        *xpos = 0;\n    if (ypos)\n        *ypos = 0;\n\n    _GLFW_REQUIRE_INIT();\n    _glfwPlatformGetWindowPos(window, xpos, ypos);\n}\n\nGLFWAPI void glfwSetWindowPos(GLFWwindow* handle, int xpos, int ypos)\n{\n    _GLFWwindow* window = (_GLFWwindow*) handle;\n    assert(window != NULL);\n\n    _GLFW_REQUIRE_INIT();\n\n    if (window->monitor)\n        return;\n\n    _glfwPlatformSetWindowPos(window, xpos, ypos);\n}\n\nGLFWAPI void glfwGetWindowSize(GLFWwindow* handle, int* width, int* height)\n{\n    _GLFWwindow* window = (_GLFWwindow*) handle;\n    assert(window != NULL);\n\n    if (width)\n        *width = 0;\n    if (height)\n        *height = 0;\n\n    _GLFW_REQUIRE_INIT();\n    _glfwPlatformGetWindowSize(window, width, height);\n}\n\nGLFWAPI void glfwSetWindowSize(GLFWwindow* handle, int width, int height)\n{\n    _GLFWwindow* window = (_GLFWwindow*) handle;\n    assert(window != NULL);\n    assert(width >= 0);\n    assert(height >= 0);\n\n    _GLFW_REQUIRE_INIT();\n\n    window->videoMode.width  = width;\n    window->videoMode.height = height;\n\n    _glfwPlatformSetWindowSize(window, width, height);\n}\n\nGLFWAPI void glfwSetWindowSizeLimits(GLFWwindow* handle,\n                                     int minwidth, int minheight,\n                                     int maxwidth, int maxheight)\n{\n    _GLFWwindow* window = (_GLFWwindow*) handle;\n    assert(window != NULL);\n\n    _GLFW_REQUIRE_INIT();\n\n    if (minwidth != GLFW_DONT_CARE && minheight != GLFW_DONT_CARE)\n    {\n        if (minwidth < 0 || minheight < 0)\n        {\n            _glfwInputError(GLFW_INVALID_VALUE,\n                            \"Invalid window minimum size %ix%i\",\n                            minwidth, minheight);\n            return;\n        }\n    }\n\n    if (maxwidth != GLFW_DONT_CARE && maxheight != GLFW_DONT_CARE)\n    {\n        if (maxwidth < 0 || maxheight < 0 ||\n            maxwidth < minwidth || maxheight < minheight)\n        {\n            _glfwInputError(GLFW_INVALID_VALUE,\n                            \"Invalid window maximum size %ix%i\",\n                            maxwidth, maxheight);\n            return;\n        }\n    }\n\n    window->minwidth  = minwidth;\n    window->minheight = minheight;\n    window->maxwidth  = maxwidth;\n    window->maxheight = maxheight;\n\n    if (window->monitor || !window->resizable)\n        return;\n\n    _glfwPlatformSetWindowSizeLimits(window,\n                                     minwidth, minheight,\n                                     maxwidth, maxheight);\n}\n\nGLFWAPI void glfwSetWindowAspectRatio(GLFWwindow* handle, int numer, int denom)\n{\n    _GLFWwindow* window = (_GLFWwindow*) handle;\n    assert(window != NULL);\n    assert(numer != 0);\n    assert(denom != 0);\n\n    _GLFW_REQUIRE_INIT();\n\n    if (numer != GLFW_DONT_CARE && denom != GLFW_DONT_CARE)\n    {\n        if (numer <= 0 || denom <= 0)\n        {\n            _glfwInputError(GLFW_INVALID_VALUE,\n                            \"Invalid window aspect ratio %i:%i\",\n                            numer, denom);\n            return;\n        }\n    }\n\n    window->numer = numer;\n    window->denom = denom;\n\n    if (window->monitor || !window->resizable)\n        return;\n\n    _glfwPlatformSetWindowAspectRatio(window, numer, denom);\n}\n\nGLFWAPI void glfwGetFramebufferSize(GLFWwindow* handle, int* width, int* height)\n{\n    _GLFWwindow* window = (_GLFWwindow*) handle;\n    assert(window != NULL);\n\n    if (width)\n        *width = 0;\n    if (height)\n        *height = 0;\n\n    _GLFW_REQUIRE_INIT();\n    _glfwPlatformGetFramebufferSize(window, width, height);\n}\n\nGLFWAPI void glfwGetWindowFrameSize(GLFWwindow* handle,\n                                    int* left, int* top,\n                                    int* right, int* bottom)\n{\n    _GLFWwindow* window = (_GLFWwindow*) handle;\n    assert(window != NULL);\n\n    if (left)\n        *left = 0;\n    if (top)\n        *top = 0;\n    if (right)\n        *right = 0;\n    if (bottom)\n        *bottom = 0;\n\n    _GLFW_REQUIRE_INIT();\n    _glfwPlatformGetWindowFrameSize(window, left, top, right, bottom);\n}\n\nGLFWAPI void glfwGetWindowContentScale(GLFWwindow* handle,\n                                       float* xscale, float* yscale)\n{\n    _GLFWwindow* window = (_GLFWwindow*) handle;\n    assert(window != NULL);\n\n    if (xscale)\n        *xscale = 0.f;\n    if (yscale)\n        *yscale = 0.f;\n\n    _GLFW_REQUIRE_INIT();\n    _glfwPlatformGetWindowContentScale(window, xscale, yscale);\n}\n\nGLFWAPI float glfwGetWindowOpacity(GLFWwindow* handle)\n{\n    _GLFWwindow* window = (_GLFWwindow*) handle;\n    assert(window != NULL);\n\n    _GLFW_REQUIRE_INIT_OR_RETURN(1.f);\n    return _glfwPlatformGetWindowOpacity(window);\n}\n\nGLFWAPI void glfwSetWindowOpacity(GLFWwindow* handle, float opacity)\n{\n    _GLFWwindow* window = (_GLFWwindow*) handle;\n    assert(window != NULL);\n    assert(opacity == opacity);\n    assert(opacity >= 0.f);\n    assert(opacity <= 1.f);\n\n    _GLFW_REQUIRE_INIT();\n\n    if (opacity != opacity || opacity < 0.f || opacity > 1.f)\n    {\n        _glfwInputError(GLFW_INVALID_VALUE, \"Invalid window opacity %f\", opacity);\n        return;\n    }\n\n    _glfwPlatformSetWindowOpacity(window, opacity);\n}\n\nGLFWAPI void glfwIconifyWindow(GLFWwindow* handle)\n{\n    _GLFWwindow* window = (_GLFWwindow*) handle;\n    assert(window != NULL);\n\n    _GLFW_REQUIRE_INIT();\n    _glfwPlatformIconifyWindow(window);\n}\n\nGLFWAPI void glfwRestoreWindow(GLFWwindow* handle)\n{\n    _GLFWwindow* window = (_GLFWwindow*) handle;\n    assert(window != NULL);\n\n    _GLFW_REQUIRE_INIT();\n    _glfwPlatformRestoreWindow(window);\n}\n\nGLFWAPI void glfwMaximizeWindow(GLFWwindow* handle)\n{\n    _GLFWwindow* window = (_GLFWwindow*) handle;\n    assert(window != NULL);\n\n    _GLFW_REQUIRE_INIT();\n\n    if (window->monitor)\n        return;\n\n    _glfwPlatformMaximizeWindow(window);\n}\n\nGLFWAPI void glfwShowWindow(GLFWwindow* handle)\n{\n    _GLFWwindow* window = (_GLFWwindow*) handle;\n    assert(window != NULL);\n\n    _GLFW_REQUIRE_INIT();\n\n    if (window->monitor)\n        return;\n\n    _glfwPlatformShowWindow(window);\n\n    if (window->focusOnShow)\n        _glfwPlatformFocusWindow(window);\n}\n\nGLFWAPI void glfwRequestWindowAttention(GLFWwindow* handle)\n{\n    _GLFWwindow* window = (_GLFWwindow*) handle;\n    assert(window != NULL);\n\n    _GLFW_REQUIRE_INIT();\n\n    _glfwPlatformRequestWindowAttention(window);\n}\n\nGLFWAPI void glfwHideWindow(GLFWwindow* handle)\n{\n    _GLFWwindow* window = (_GLFWwindow*) handle;\n    assert(window != NULL);\n\n    _GLFW_REQUIRE_INIT();\n\n    if (window->monitor)\n        return;\n\n    _glfwPlatformHideWindow(window);\n}\n\nGLFWAPI void glfwFocusWindow(GLFWwindow* handle)\n{\n    _GLFWwindow* window = (_GLFWwindow*) handle;\n    assert(window != NULL);\n\n    _GLFW_REQUIRE_INIT();\n\n    _glfwPlatformFocusWindow(window);\n}\n\nGLFWAPI int glfwGetWindowAttrib(GLFWwindow* handle, int attrib)\n{\n    _GLFWwindow* window = (_GLFWwindow*) handle;\n    assert(window != NULL);\n\n    _GLFW_REQUIRE_INIT_OR_RETURN(0);\n\n    switch (attrib)\n    {\n        case GLFW_FOCUSED:\n            return _glfwPlatformWindowFocused(window);\n        case GLFW_ICONIFIED:\n            return _glfwPlatformWindowIconified(window);\n        case GLFW_VISIBLE:\n            return _glfwPlatformWindowVisible(window);\n        case GLFW_MAXIMIZED:\n            return _glfwPlatformWindowMaximized(window);\n        case GLFW_HOVERED:\n            return _glfwPlatformWindowHovered(window);\n        case GLFW_FOCUS_ON_SHOW:\n            return window->focusOnShow;\n        case GLFW_TRANSPARENT_FRAMEBUFFER:\n            return _glfwPlatformFramebufferTransparent(window);\n        case GLFW_RESIZABLE:\n            return window->resizable;\n        case GLFW_DECORATED:\n            return window->decorated;\n        case GLFW_FLOATING:\n            return window->floating;\n        case GLFW_AUTO_ICONIFY:\n            return window->autoIconify;\n        case GLFW_CLIENT_API:\n            return window->context.client;\n        case GLFW_CONTEXT_CREATION_API:\n            return window->context.source;\n        case GLFW_CONTEXT_VERSION_MAJOR:\n            return window->context.major;\n        case GLFW_CONTEXT_VERSION_MINOR:\n            return window->context.minor;\n        case GLFW_CONTEXT_REVISION:\n            return window->context.revision;\n        case GLFW_CONTEXT_ROBUSTNESS:\n            return window->context.robustness;\n        case GLFW_OPENGL_FORWARD_COMPAT:\n            return window->context.forward;\n        case GLFW_OPENGL_DEBUG_CONTEXT:\n            return window->context.debug;\n        case GLFW_OPENGL_PROFILE:\n            return window->context.profile;\n        case GLFW_CONTEXT_RELEASE_BEHAVIOR:\n            return window->context.release;\n        case GLFW_CONTEXT_NO_ERROR:\n            return window->context.noerror;\n    }\n\n    _glfwInputError(GLFW_INVALID_ENUM, \"Invalid window attribute 0x%08X\", attrib);\n    return 0;\n}\n\nGLFWAPI void glfwSetWindowAttrib(GLFWwindow* handle, int attrib, int value)\n{\n    _GLFWwindow* window = (_GLFWwindow*) handle;\n    assert(window != NULL);\n\n    _GLFW_REQUIRE_INIT();\n\n    value = value ? GLFW_TRUE : GLFW_FALSE;\n\n    if (attrib == GLFW_AUTO_ICONIFY)\n        window->autoIconify = value;\n    else if (attrib == GLFW_RESIZABLE)\n    {\n        if (window->resizable == value)\n            return;\n\n        window->resizable = value;\n        if (!window->monitor)\n            _glfwPlatformSetWindowResizable(window, value);\n    }\n    else if (attrib == GLFW_DECORATED)\n    {\n        if (window->decorated == value)\n            return;\n\n        window->decorated = value;\n        if (!window->monitor)\n            _glfwPlatformSetWindowDecorated(window, value);\n    }\n    else if (attrib == GLFW_FLOATING)\n    {\n        if (window->floating == value)\n            return;\n\n        window->floating = value;\n        if (!window->monitor)\n            _glfwPlatformSetWindowFloating(window, value);\n    }\n    else if (attrib == GLFW_FOCUS_ON_SHOW)\n        window->focusOnShow = value;\n    else\n        _glfwInputError(GLFW_INVALID_ENUM, \"Invalid window attribute 0x%08X\", attrib);\n}\n\nGLFWAPI GLFWmonitor* glfwGetWindowMonitor(GLFWwindow* handle)\n{\n    _GLFWwindow* window = (_GLFWwindow*) handle;\n    assert(window != NULL);\n\n    _GLFW_REQUIRE_INIT_OR_RETURN(NULL);\n    return (GLFWmonitor*) window->monitor;\n}\n\nGLFWAPI void glfwSetWindowMonitor(GLFWwindow* wh,\n                                  GLFWmonitor* mh,\n                                  int xpos, int ypos,\n                                  int width, int height,\n                                  int refreshRate)\n{\n    _GLFWwindow* window = (_GLFWwindow*) wh;\n    _GLFWmonitor* monitor = (_GLFWmonitor*) mh;\n    assert(window != NULL);\n    assert(width >= 0);\n    assert(height >= 0);\n\n    _GLFW_REQUIRE_INIT();\n\n    if (width <= 0 || height <= 0)\n    {\n        _glfwInputError(GLFW_INVALID_VALUE,\n                        \"Invalid window size %ix%i\",\n                        width, height);\n        return;\n    }\n\n    if (refreshRate < 0 && refreshRate != GLFW_DONT_CARE)\n    {\n        _glfwInputError(GLFW_INVALID_VALUE,\n                        \"Invalid refresh rate %i\",\n                        refreshRate);\n        return;\n    }\n\n    window->videoMode.width       = width;\n    window->videoMode.height      = height;\n    window->videoMode.refreshRate = refreshRate;\n\n    _glfwPlatformSetWindowMonitor(window, monitor,\n                                  xpos, ypos, width, height,\n                                  refreshRate);\n}\n\nGLFWAPI void glfwSetWindowUserPointer(GLFWwindow* handle, void* pointer)\n{\n    _GLFWwindow* window = (_GLFWwindow*) handle;\n    assert(window != NULL);\n\n    _GLFW_REQUIRE_INIT();\n    window->userPointer = pointer;\n}\n\nGLFWAPI void* glfwGetWindowUserPointer(GLFWwindow* handle)\n{\n    _GLFWwindow* window = (_GLFWwindow*) handle;\n    assert(window != NULL);\n\n    _GLFW_REQUIRE_INIT_OR_RETURN(NULL);\n    return window->userPointer;\n}\n\nGLFWAPI GLFWwindowposfun glfwSetWindowPosCallback(GLFWwindow* handle,\n                                                  GLFWwindowposfun cbfun)\n{\n    _GLFWwindow* window = (_GLFWwindow*) handle;\n    assert(window != NULL);\n\n    _GLFW_REQUIRE_INIT_OR_RETURN(NULL);\n    _GLFW_SWAP_POINTERS(window->callbacks.pos, cbfun);\n    return cbfun;\n}\n\nGLFWAPI GLFWwindowsizefun glfwSetWindowSizeCallback(GLFWwindow* handle,\n                                                    GLFWwindowsizefun cbfun)\n{\n    _GLFWwindow* window = (_GLFWwindow*) handle;\n    assert(window != NULL);\n\n    _GLFW_REQUIRE_INIT_OR_RETURN(NULL);\n    _GLFW_SWAP_POINTERS(window->callbacks.size, cbfun);\n    return cbfun;\n}\n\nGLFWAPI GLFWwindowclosefun glfwSetWindowCloseCallback(GLFWwindow* handle,\n                                                      GLFWwindowclosefun cbfun)\n{\n    _GLFWwindow* window = (_GLFWwindow*) handle;\n    assert(window != NULL);\n\n    _GLFW_REQUIRE_INIT_OR_RETURN(NULL);\n    _GLFW_SWAP_POINTERS(window->callbacks.close, cbfun);\n    return cbfun;\n}\n\nGLFWAPI GLFWwindowrefreshfun glfwSetWindowRefreshCallback(GLFWwindow* handle,\n                                                          GLFWwindowrefreshfun cbfun)\n{\n    _GLFWwindow* window = (_GLFWwindow*) handle;\n    assert(window != NULL);\n\n    _GLFW_REQUIRE_INIT_OR_RETURN(NULL);\n    _GLFW_SWAP_POINTERS(window->callbacks.refresh, cbfun);\n    return cbfun;\n}\n\nGLFWAPI GLFWwindowfocusfun glfwSetWindowFocusCallback(GLFWwindow* handle,\n                                                      GLFWwindowfocusfun cbfun)\n{\n    _GLFWwindow* window = (_GLFWwindow*) handle;\n    assert(window != NULL);\n\n    _GLFW_REQUIRE_INIT_OR_RETURN(NULL);\n    _GLFW_SWAP_POINTERS(window->callbacks.focus, cbfun);\n    return cbfun;\n}\n\nGLFWAPI GLFWwindowiconifyfun glfwSetWindowIconifyCallback(GLFWwindow* handle,\n                                                          GLFWwindowiconifyfun cbfun)\n{\n    _GLFWwindow* window = (_GLFWwindow*) handle;\n    assert(window != NULL);\n\n    _GLFW_REQUIRE_INIT_OR_RETURN(NULL);\n    _GLFW_SWAP_POINTERS(window->callbacks.iconify, cbfun);\n    return cbfun;\n}\n\nGLFWAPI GLFWwindowmaximizefun glfwSetWindowMaximizeCallback(GLFWwindow* handle,\n                                                            GLFWwindowmaximizefun cbfun)\n{\n    _GLFWwindow* window = (_GLFWwindow*) handle;\n    assert(window != NULL);\n\n    _GLFW_REQUIRE_INIT_OR_RETURN(NULL);\n    _GLFW_SWAP_POINTERS(window->callbacks.maximize, cbfun);\n    return cbfun;\n}\n\nGLFWAPI GLFWframebuffersizefun glfwSetFramebufferSizeCallback(GLFWwindow* handle,\n                                                              GLFWframebuffersizefun cbfun)\n{\n    _GLFWwindow* window = (_GLFWwindow*) handle;\n    assert(window != NULL);\n\n    _GLFW_REQUIRE_INIT_OR_RETURN(NULL);\n    _GLFW_SWAP_POINTERS(window->callbacks.fbsize, cbfun);\n    return cbfun;\n}\n\nGLFWAPI GLFWwindowcontentscalefun glfwSetWindowContentScaleCallback(GLFWwindow* handle,\n                                                                    GLFWwindowcontentscalefun cbfun)\n{\n    _GLFWwindow* window = (_GLFWwindow*) handle;\n    assert(window != NULL);\n\n    _GLFW_REQUIRE_INIT_OR_RETURN(NULL);\n    _GLFW_SWAP_POINTERS(window->callbacks.scale, cbfun);\n    return cbfun;\n}\n\nGLFWAPI void glfwPollEvents(void)\n{\n    _GLFW_REQUIRE_INIT();\n    _glfwPlatformPollEvents();\n}\n\nGLFWAPI void glfwWaitEvents(void)\n{\n    _GLFW_REQUIRE_INIT();\n    _glfwPlatformWaitEvents();\n}\n\nGLFWAPI void glfwWaitEventsTimeout(double timeout)\n{\n    _GLFW_REQUIRE_INIT();\n    assert(timeout == timeout);\n    assert(timeout >= 0.0);\n    assert(timeout <= DBL_MAX);\n\n    if (timeout != timeout || timeout < 0.0 || timeout > DBL_MAX)\n    {\n        _glfwInputError(GLFW_INVALID_VALUE, \"Invalid time %f\", timeout);\n        return;\n    }\n\n    _glfwPlatformWaitEventsTimeout(timeout);\n}\n\nGLFWAPI void glfwPostEmptyEvent(void)\n{\n    _GLFW_REQUIRE_INIT();\n    _glfwPlatformPostEmptyEvent();\n}\n"
  },
  {
    "path": "thirdparty/glfw/src/wl_init.c",
    "content": "//========================================================================\n// GLFW 3.3 Wayland - www.glfw.org\n//------------------------------------------------------------------------\n// Copyright (c) 2014 Jonas Ådahl <jadahl@gmail.com>\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//    claim that you wrote the original software. If you use this software\n//    in a product, an acknowledgment in the product documentation would\n//    be appreciated but is not required.\n//\n// 2. Altered source versions must be plainly marked as such, and must not\n//    be misrepresented as being the original software.\n//\n// 3. This notice may not be removed or altered from any source\n//    distribution.\n//\n//========================================================================\n// It is fine to use C99 in this file because it will not be built with VS\n//========================================================================\n\n#include \"internal.h\"\n\n#include <assert.h>\n#include <errno.h>\n#include <limits.h>\n#include <linux/input.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <sys/mman.h>\n#include <sys/timerfd.h>\n#include <unistd.h>\n#include <wayland-client.h>\n\n\nstatic inline int min(int n1, int n2)\n{\n    return n1 < n2 ? n1 : n2;\n}\n\nstatic _GLFWwindow* findWindowFromDecorationSurface(struct wl_surface* surface,\n                                                    int* which)\n{\n    int focus;\n    _GLFWwindow* window = _glfw.windowListHead;\n    if (!which)\n        which = &focus;\n    while (window)\n    {\n        if (surface == window->wl.decorations.top.surface)\n        {\n            *which = topDecoration;\n            break;\n        }\n        if (surface == window->wl.decorations.left.surface)\n        {\n            *which = leftDecoration;\n            break;\n        }\n        if (surface == window->wl.decorations.right.surface)\n        {\n            *which = rightDecoration;\n            break;\n        }\n        if (surface == window->wl.decorations.bottom.surface)\n        {\n            *which = bottomDecoration;\n            break;\n        }\n        window = window->next;\n    }\n    return window;\n}\n\nstatic void pointerHandleEnter(void* data,\n                               struct wl_pointer* pointer,\n                               uint32_t serial,\n                               struct wl_surface* surface,\n                               wl_fixed_t sx,\n                               wl_fixed_t sy)\n{\n    // Happens in the case we just destroyed the surface.\n    if (!surface)\n        return;\n\n    int focus = 0;\n    _GLFWwindow* window = wl_surface_get_user_data(surface);\n    if (!window)\n    {\n        window = findWindowFromDecorationSurface(surface, &focus);\n        if (!window)\n            return;\n    }\n\n    window->wl.decorations.focus = focus;\n    _glfw.wl.serial = serial;\n    _glfw.wl.pointerFocus = window;\n\n    window->wl.hovered = GLFW_TRUE;\n\n    _glfwPlatformSetCursor(window, window->wl.currentCursor);\n    _glfwInputCursorEnter(window, GLFW_TRUE);\n}\n\nstatic void pointerHandleLeave(void* data,\n                               struct wl_pointer* pointer,\n                               uint32_t serial,\n                               struct wl_surface* surface)\n{\n    _GLFWwindow* window = _glfw.wl.pointerFocus;\n\n    if (!window)\n        return;\n\n    window->wl.hovered = GLFW_FALSE;\n\n    _glfw.wl.serial = serial;\n    _glfw.wl.pointerFocus = NULL;\n    _glfwInputCursorEnter(window, GLFW_FALSE);\n    _glfw.wl.cursorPreviousName = NULL;\n}\n\nstatic void setCursor(_GLFWwindow* window, const char* name)\n{\n    struct wl_buffer* buffer;\n    struct wl_cursor* cursor;\n    struct wl_cursor_image* image;\n    struct wl_surface* surface = _glfw.wl.cursorSurface;\n    struct wl_cursor_theme* theme = _glfw.wl.cursorTheme;\n    int scale = 1;\n\n    if (window->wl.scale > 1 && _glfw.wl.cursorThemeHiDPI)\n    {\n        // We only support up to scale=2 for now, since libwayland-cursor\n        // requires us to load a different theme for each size.\n        scale = 2;\n        theme = _glfw.wl.cursorThemeHiDPI;\n    }\n\n    cursor = wl_cursor_theme_get_cursor(theme, name);\n    if (!cursor)\n    {\n        _glfwInputError(GLFW_PLATFORM_ERROR,\n                        \"Wayland: Standard cursor not found\");\n        return;\n    }\n    // TODO: handle animated cursors too.\n    image = cursor->images[0];\n\n    if (!image)\n        return;\n\n    buffer = wl_cursor_image_get_buffer(image);\n    if (!buffer)\n        return;\n    wl_pointer_set_cursor(_glfw.wl.pointer, _glfw.wl.serial,\n                          surface,\n                          image->hotspot_x / scale,\n                          image->hotspot_y / scale);\n    wl_surface_set_buffer_scale(surface, scale);\n    wl_surface_attach(surface, buffer, 0, 0);\n    wl_surface_damage(surface, 0, 0,\n                      image->width, image->height);\n    wl_surface_commit(surface);\n    _glfw.wl.cursorPreviousName = name;\n}\n\nstatic void pointerHandleMotion(void* data,\n                                struct wl_pointer* pointer,\n                                uint32_t time,\n                                wl_fixed_t sx,\n                                wl_fixed_t sy)\n{\n    _GLFWwindow* window = _glfw.wl.pointerFocus;\n    const char* cursorName = NULL;\n    double x, y;\n\n    if (!window)\n        return;\n\n    if (window->cursorMode == GLFW_CURSOR_DISABLED)\n        return;\n    x = wl_fixed_to_double(sx);\n    y = wl_fixed_to_double(sy);\n\n    switch (window->wl.decorations.focus)\n    {\n        case mainWindow:\n            window->wl.cursorPosX = x;\n            window->wl.cursorPosY = y;\n            _glfwInputCursorPos(window, x, y);\n            _glfw.wl.cursorPreviousName = NULL;\n            return;\n        case topDecoration:\n            if (y < _GLFW_DECORATION_WIDTH)\n                cursorName = \"n-resize\";\n            else\n                cursorName = \"left_ptr\";\n            break;\n        case leftDecoration:\n            if (y < _GLFW_DECORATION_WIDTH)\n                cursorName = \"nw-resize\";\n            else\n                cursorName = \"w-resize\";\n            break;\n        case rightDecoration:\n            if (y < _GLFW_DECORATION_WIDTH)\n                cursorName = \"ne-resize\";\n            else\n                cursorName = \"e-resize\";\n            break;\n        case bottomDecoration:\n            if (x < _GLFW_DECORATION_WIDTH)\n                cursorName = \"sw-resize\";\n            else if (x > window->wl.width + _GLFW_DECORATION_WIDTH)\n                cursorName = \"se-resize\";\n            else\n                cursorName = \"s-resize\";\n            break;\n        default:\n            assert(0);\n    }\n    if (_glfw.wl.cursorPreviousName != cursorName)\n        setCursor(window, cursorName);\n}\n\nstatic void pointerHandleButton(void* data,\n                                struct wl_pointer* pointer,\n                                uint32_t serial,\n                                uint32_t time,\n                                uint32_t button,\n                                uint32_t state)\n{\n    _GLFWwindow* window = _glfw.wl.pointerFocus;\n    int glfwButton;\n\n    // Both xdg-shell and wl_shell use the same values.\n    uint32_t edges = WL_SHELL_SURFACE_RESIZE_NONE;\n\n    if (!window)\n        return;\n    if (button == BTN_LEFT)\n    {\n        switch (window->wl.decorations.focus)\n        {\n            case mainWindow:\n                break;\n            case topDecoration:\n                if (window->wl.cursorPosY < _GLFW_DECORATION_WIDTH)\n                    edges = WL_SHELL_SURFACE_RESIZE_TOP;\n                else\n                {\n                    if (window->wl.xdg.toplevel)\n                        xdg_toplevel_move(window->wl.xdg.toplevel, _glfw.wl.seat, serial);\n                    else\n                        wl_shell_surface_move(window->wl.shellSurface, _glfw.wl.seat, serial);\n                }\n                break;\n            case leftDecoration:\n                if (window->wl.cursorPosY < _GLFW_DECORATION_WIDTH)\n                    edges = WL_SHELL_SURFACE_RESIZE_TOP_LEFT;\n                else\n                    edges = WL_SHELL_SURFACE_RESIZE_LEFT;\n                break;\n            case rightDecoration:\n                if (window->wl.cursorPosY < _GLFW_DECORATION_WIDTH)\n                    edges = WL_SHELL_SURFACE_RESIZE_TOP_RIGHT;\n                else\n                    edges = WL_SHELL_SURFACE_RESIZE_RIGHT;\n                break;\n            case bottomDecoration:\n                if (window->wl.cursorPosX < _GLFW_DECORATION_WIDTH)\n                    edges = WL_SHELL_SURFACE_RESIZE_BOTTOM_LEFT;\n                else if (window->wl.cursorPosX > window->wl.width + _GLFW_DECORATION_WIDTH)\n                    edges = WL_SHELL_SURFACE_RESIZE_BOTTOM_RIGHT;\n                else\n                    edges = WL_SHELL_SURFACE_RESIZE_BOTTOM;\n                break;\n            default:\n                assert(0);\n        }\n        if (edges != WL_SHELL_SURFACE_RESIZE_NONE)\n        {\n            if (window->wl.xdg.toplevel)\n                xdg_toplevel_resize(window->wl.xdg.toplevel, _glfw.wl.seat,\n                                    serial, edges);\n            else\n                wl_shell_surface_resize(window->wl.shellSurface, _glfw.wl.seat,\n                                        serial, edges);\n        }\n    }\n    else if (button == BTN_RIGHT)\n    {\n        if (window->wl.decorations.focus != mainWindow && window->wl.xdg.toplevel)\n        {\n            xdg_toplevel_show_window_menu(window->wl.xdg.toplevel,\n                                          _glfw.wl.seat, serial,\n                                          window->wl.cursorPosX,\n                                          window->wl.cursorPosY);\n            return;\n        }\n    }\n\n    // Don’t pass the button to the user if it was related to a decoration.\n    if (window->wl.decorations.focus != mainWindow)\n        return;\n\n    _glfw.wl.serial = serial;\n\n    /* Makes left, right and middle 0, 1 and 2. Overall order follows evdev\n     * codes. */\n    glfwButton = button - BTN_LEFT;\n\n    _glfwInputMouseClick(window,\n                         glfwButton,\n                         state == WL_POINTER_BUTTON_STATE_PRESSED\n                                ? GLFW_PRESS\n                                : GLFW_RELEASE,\n                         _glfw.wl.xkb.modifiers);\n}\n\nstatic void pointerHandleAxis(void* data,\n                              struct wl_pointer* pointer,\n                              uint32_t time,\n                              uint32_t axis,\n                              wl_fixed_t value)\n{\n    _GLFWwindow* window = _glfw.wl.pointerFocus;\n    double x = 0.0, y = 0.0;\n    // Wayland scroll events are in pointer motion coordinate space (think two\n    // finger scroll).  The factor 10 is commonly used to convert to \"scroll\n    // step means 1.0.\n    const double scrollFactor = 1.0 / 10.0;\n\n    if (!window)\n        return;\n\n    assert(axis == WL_POINTER_AXIS_HORIZONTAL_SCROLL ||\n           axis == WL_POINTER_AXIS_VERTICAL_SCROLL);\n\n    if (axis == WL_POINTER_AXIS_HORIZONTAL_SCROLL)\n        x = wl_fixed_to_double(value) * scrollFactor;\n    else if (axis == WL_POINTER_AXIS_VERTICAL_SCROLL)\n        y = wl_fixed_to_double(value) * scrollFactor;\n\n    _glfwInputScroll(window, x, y);\n}\n\nstatic const struct wl_pointer_listener pointerListener = {\n    pointerHandleEnter,\n    pointerHandleLeave,\n    pointerHandleMotion,\n    pointerHandleButton,\n    pointerHandleAxis,\n};\n\nstatic void keyboardHandleKeymap(void* data,\n                                 struct wl_keyboard* keyboard,\n                                 uint32_t format,\n                                 int fd,\n                                 uint32_t size)\n{\n    struct xkb_keymap* keymap;\n    struct xkb_state* state;\n\n#ifdef HAVE_XKBCOMMON_COMPOSE_H\n    struct xkb_compose_table* composeTable;\n    struct xkb_compose_state* composeState;\n#endif\n\n    char* mapStr;\n    const char* locale;\n\n    if (format != WL_KEYBOARD_KEYMAP_FORMAT_XKB_V1)\n    {\n        close(fd);\n        return;\n    }\n\n    mapStr = mmap(NULL, size, PROT_READ, MAP_SHARED, fd, 0);\n    if (mapStr == MAP_FAILED) {\n        close(fd);\n        return;\n    }\n\n    keymap = xkb_keymap_new_from_string(_glfw.wl.xkb.context,\n                                        mapStr,\n                                        XKB_KEYMAP_FORMAT_TEXT_V1,\n                                        0);\n    munmap(mapStr, size);\n    close(fd);\n\n    if (!keymap)\n    {\n        _glfwInputError(GLFW_PLATFORM_ERROR,\n                        \"Wayland: Failed to compile keymap\");\n        return;\n    }\n\n    state = xkb_state_new(keymap);\n    if (!state)\n    {\n        _glfwInputError(GLFW_PLATFORM_ERROR,\n                        \"Wayland: Failed to create XKB state\");\n        xkb_keymap_unref(keymap);\n        return;\n    }\n\n    // Look up the preferred locale, falling back to \"C\" as default.\n    locale = getenv(\"LC_ALL\");\n    if (!locale)\n        locale = getenv(\"LC_CTYPE\");\n    if (!locale)\n        locale = getenv(\"LANG\");\n    if (!locale)\n        locale = \"C\";\n\n#ifdef HAVE_XKBCOMMON_COMPOSE_H\n    composeTable =\n        xkb_compose_table_new_from_locale(_glfw.wl.xkb.context, locale,\n                                          XKB_COMPOSE_COMPILE_NO_FLAGS);\n    if (composeTable)\n    {\n        composeState =\n            xkb_compose_state_new(composeTable, XKB_COMPOSE_STATE_NO_FLAGS);\n        xkb_compose_table_unref(composeTable);\n        if (composeState)\n            _glfw.wl.xkb.composeState = composeState;\n        else\n            _glfwInputError(GLFW_PLATFORM_ERROR,\n                            \"Wayland: Failed to create XKB compose state\");\n    }\n    else\n    {\n        _glfwInputError(GLFW_PLATFORM_ERROR,\n                        \"Wayland: Failed to create XKB compose table\");\n    }\n#endif\n\n    xkb_keymap_unref(_glfw.wl.xkb.keymap);\n    xkb_state_unref(_glfw.wl.xkb.state);\n    _glfw.wl.xkb.keymap = keymap;\n    _glfw.wl.xkb.state = state;\n\n    _glfw.wl.xkb.controlMask =\n        1 << xkb_keymap_mod_get_index(_glfw.wl.xkb.keymap, \"Control\");\n    _glfw.wl.xkb.altMask =\n        1 << xkb_keymap_mod_get_index(_glfw.wl.xkb.keymap, \"Mod1\");\n    _glfw.wl.xkb.shiftMask =\n        1 << xkb_keymap_mod_get_index(_glfw.wl.xkb.keymap, \"Shift\");\n    _glfw.wl.xkb.superMask =\n        1 << xkb_keymap_mod_get_index(_glfw.wl.xkb.keymap, \"Mod4\");\n    _glfw.wl.xkb.capsLockMask =\n        1 << xkb_keymap_mod_get_index(_glfw.wl.xkb.keymap, \"Lock\");\n    _glfw.wl.xkb.numLockMask =\n        1 << xkb_keymap_mod_get_index(_glfw.wl.xkb.keymap, \"Mod2\");\n}\n\nstatic void keyboardHandleEnter(void* data,\n                                struct wl_keyboard* keyboard,\n                                uint32_t serial,\n                                struct wl_surface* surface,\n                                struct wl_array* keys)\n{\n    // Happens in the case we just destroyed the surface.\n    if (!surface)\n        return;\n\n    _GLFWwindow* window = wl_surface_get_user_data(surface);\n    if (!window)\n    {\n        window = findWindowFromDecorationSurface(surface, NULL);\n        if (!window)\n            return;\n    }\n\n    _glfw.wl.serial = serial;\n    _glfw.wl.keyboardFocus = window;\n    _glfwInputWindowFocus(window, GLFW_TRUE);\n}\n\nstatic void keyboardHandleLeave(void* data,\n                                struct wl_keyboard* keyboard,\n                                uint32_t serial,\n                                struct wl_surface* surface)\n{\n    _GLFWwindow* window = _glfw.wl.keyboardFocus;\n\n    if (!window)\n        return;\n\n    _glfw.wl.serial = serial;\n    _glfw.wl.keyboardFocus = NULL;\n    _glfwInputWindowFocus(window, GLFW_FALSE);\n}\n\nstatic int toGLFWKeyCode(uint32_t key)\n{\n    if (key < sizeof(_glfw.wl.keycodes) / sizeof(_glfw.wl.keycodes[0]))\n        return _glfw.wl.keycodes[key];\n\n    return GLFW_KEY_UNKNOWN;\n}\n\n#ifdef HAVE_XKBCOMMON_COMPOSE_H\nstatic xkb_keysym_t composeSymbol(xkb_keysym_t sym)\n{\n    if (sym == XKB_KEY_NoSymbol || !_glfw.wl.xkb.composeState)\n        return sym;\n    if (xkb_compose_state_feed(_glfw.wl.xkb.composeState, sym)\n            != XKB_COMPOSE_FEED_ACCEPTED)\n        return sym;\n    switch (xkb_compose_state_get_status(_glfw.wl.xkb.composeState))\n    {\n        case XKB_COMPOSE_COMPOSED:\n            return xkb_compose_state_get_one_sym(_glfw.wl.xkb.composeState);\n        case XKB_COMPOSE_COMPOSING:\n        case XKB_COMPOSE_CANCELLED:\n            return XKB_KEY_NoSymbol;\n        case XKB_COMPOSE_NOTHING:\n        default:\n            return sym;\n    }\n}\n#endif\n\nstatic GLFWbool inputChar(_GLFWwindow* window, uint32_t key)\n{\n    uint32_t code, numSyms;\n    long cp;\n    const xkb_keysym_t *syms;\n    xkb_keysym_t sym;\n\n    code = key + 8;\n    numSyms = xkb_state_key_get_syms(_glfw.wl.xkb.state, code, &syms);\n\n    if (numSyms == 1)\n    {\n#ifdef HAVE_XKBCOMMON_COMPOSE_H\n        sym = composeSymbol(syms[0]);\n#else\n        sym = syms[0];\n#endif\n        cp = _glfwKeySym2Unicode(sym);\n        if (cp != -1)\n        {\n            const int mods = _glfw.wl.xkb.modifiers;\n            const int plain = !(mods & (GLFW_MOD_CONTROL | GLFW_MOD_ALT));\n            _glfwInputChar(window, cp, mods, plain);\n        }\n    }\n\n    return xkb_keymap_key_repeats(_glfw.wl.xkb.keymap, syms[0]);\n}\n\nstatic void keyboardHandleKey(void* data,\n                              struct wl_keyboard* keyboard,\n                              uint32_t serial,\n                              uint32_t time,\n                              uint32_t key,\n                              uint32_t state)\n{\n    int keyCode;\n    int action;\n    _GLFWwindow* window = _glfw.wl.keyboardFocus;\n    GLFWbool shouldRepeat;\n    struct itimerspec timer = {};\n\n    if (!window)\n        return;\n\n    keyCode = toGLFWKeyCode(key);\n    action = state == WL_KEYBOARD_KEY_STATE_PRESSED\n            ? GLFW_PRESS : GLFW_RELEASE;\n\n    _glfw.wl.serial = serial;\n    _glfwInputKey(window, keyCode, key, action,\n                  _glfw.wl.xkb.modifiers);\n\n    if (action == GLFW_PRESS)\n    {\n        shouldRepeat = inputChar(window, key);\n\n        if (shouldRepeat && _glfw.wl.keyboardRepeatRate > 0)\n        {\n            _glfw.wl.keyboardLastKey = keyCode;\n            _glfw.wl.keyboardLastScancode = key;\n            if (_glfw.wl.keyboardRepeatRate > 1)\n                timer.it_interval.tv_nsec = 1000000000 / _glfw.wl.keyboardRepeatRate;\n            else\n                timer.it_interval.tv_sec = 1;\n            timer.it_value.tv_sec = _glfw.wl.keyboardRepeatDelay / 1000;\n            timer.it_value.tv_nsec = (_glfw.wl.keyboardRepeatDelay % 1000) * 1000000;\n        }\n    }\n    timerfd_settime(_glfw.wl.timerfd, 0, &timer, NULL);\n}\n\nstatic void keyboardHandleModifiers(void* data,\n                                    struct wl_keyboard* keyboard,\n                                    uint32_t serial,\n                                    uint32_t modsDepressed,\n                                    uint32_t modsLatched,\n                                    uint32_t modsLocked,\n                                    uint32_t group)\n{\n    xkb_mod_mask_t mask;\n    unsigned int modifiers = 0;\n\n    _glfw.wl.serial = serial;\n\n    if (!_glfw.wl.xkb.keymap)\n        return;\n\n    xkb_state_update_mask(_glfw.wl.xkb.state,\n                          modsDepressed,\n                          modsLatched,\n                          modsLocked,\n                          0,\n                          0,\n                          group);\n\n    mask = xkb_state_serialize_mods(_glfw.wl.xkb.state,\n                                    XKB_STATE_MODS_DEPRESSED |\n                                    XKB_STATE_LAYOUT_DEPRESSED |\n                                    XKB_STATE_MODS_LATCHED |\n                                    XKB_STATE_LAYOUT_LATCHED);\n    if (mask & _glfw.wl.xkb.controlMask)\n        modifiers |= GLFW_MOD_CONTROL;\n    if (mask & _glfw.wl.xkb.altMask)\n        modifiers |= GLFW_MOD_ALT;\n    if (mask & _glfw.wl.xkb.shiftMask)\n        modifiers |= GLFW_MOD_SHIFT;\n    if (mask & _glfw.wl.xkb.superMask)\n        modifiers |= GLFW_MOD_SUPER;\n    if (mask & _glfw.wl.xkb.capsLockMask)\n        modifiers |= GLFW_MOD_CAPS_LOCK;\n    if (mask & _glfw.wl.xkb.numLockMask)\n        modifiers |= GLFW_MOD_NUM_LOCK;\n    _glfw.wl.xkb.modifiers = modifiers;\n}\n\n#ifdef WL_KEYBOARD_REPEAT_INFO_SINCE_VERSION\nstatic void keyboardHandleRepeatInfo(void* data,\n                                     struct wl_keyboard* keyboard,\n                                     int32_t rate,\n                                     int32_t delay)\n{\n    if (keyboard != _glfw.wl.keyboard)\n        return;\n\n    _glfw.wl.keyboardRepeatRate = rate;\n    _glfw.wl.keyboardRepeatDelay = delay;\n}\n#endif\n\nstatic const struct wl_keyboard_listener keyboardListener = {\n    keyboardHandleKeymap,\n    keyboardHandleEnter,\n    keyboardHandleLeave,\n    keyboardHandleKey,\n    keyboardHandleModifiers,\n#ifdef WL_KEYBOARD_REPEAT_INFO_SINCE_VERSION\n    keyboardHandleRepeatInfo,\n#endif\n};\n\nstatic void seatHandleCapabilities(void* data,\n                                   struct wl_seat* seat,\n                                   enum wl_seat_capability caps)\n{\n    if ((caps & WL_SEAT_CAPABILITY_POINTER) && !_glfw.wl.pointer)\n    {\n        _glfw.wl.pointer = wl_seat_get_pointer(seat);\n        wl_pointer_add_listener(_glfw.wl.pointer, &pointerListener, NULL);\n    }\n    else if (!(caps & WL_SEAT_CAPABILITY_POINTER) && _glfw.wl.pointer)\n    {\n        wl_pointer_destroy(_glfw.wl.pointer);\n        _glfw.wl.pointer = NULL;\n    }\n\n    if ((caps & WL_SEAT_CAPABILITY_KEYBOARD) && !_glfw.wl.keyboard)\n    {\n        _glfw.wl.keyboard = wl_seat_get_keyboard(seat);\n        wl_keyboard_add_listener(_glfw.wl.keyboard, &keyboardListener, NULL);\n    }\n    else if (!(caps & WL_SEAT_CAPABILITY_KEYBOARD) && _glfw.wl.keyboard)\n    {\n        wl_keyboard_destroy(_glfw.wl.keyboard);\n        _glfw.wl.keyboard = NULL;\n    }\n}\n\nstatic void seatHandleName(void* data,\n                           struct wl_seat* seat,\n                           const char* name)\n{\n}\n\nstatic const struct wl_seat_listener seatListener = {\n    seatHandleCapabilities,\n    seatHandleName,\n};\n\nstatic void dataOfferHandleOffer(void* data,\n                                 struct wl_data_offer* dataOffer,\n                                 const char* mimeType)\n{\n}\n\nstatic const struct wl_data_offer_listener dataOfferListener = {\n    dataOfferHandleOffer,\n};\n\nstatic void dataDeviceHandleDataOffer(void* data,\n                                      struct wl_data_device* dataDevice,\n                                      struct wl_data_offer* id)\n{\n    if (_glfw.wl.dataOffer)\n        wl_data_offer_destroy(_glfw.wl.dataOffer);\n\n    _glfw.wl.dataOffer = id;\n    wl_data_offer_add_listener(_glfw.wl.dataOffer, &dataOfferListener, NULL);\n}\n\nstatic void dataDeviceHandleEnter(void* data,\n                                  struct wl_data_device* dataDevice,\n                                  uint32_t serial,\n                                  struct wl_surface *surface,\n                                  wl_fixed_t x,\n                                  wl_fixed_t y,\n                                  struct wl_data_offer *id)\n{\n}\n\nstatic void dataDeviceHandleLeave(void* data,\n                                  struct wl_data_device* dataDevice)\n{\n}\n\nstatic void dataDeviceHandleMotion(void* data,\n                                   struct wl_data_device* dataDevice,\n                                   uint32_t time,\n                                   wl_fixed_t x,\n                                   wl_fixed_t y)\n{\n}\n\nstatic void dataDeviceHandleDrop(void* data,\n                                 struct wl_data_device* dataDevice)\n{\n}\n\nstatic void dataDeviceHandleSelection(void* data,\n                                      struct wl_data_device* dataDevice,\n                                      struct wl_data_offer* id)\n{\n}\n\nstatic const struct wl_data_device_listener dataDeviceListener = {\n    dataDeviceHandleDataOffer,\n    dataDeviceHandleEnter,\n    dataDeviceHandleLeave,\n    dataDeviceHandleMotion,\n    dataDeviceHandleDrop,\n    dataDeviceHandleSelection,\n};\n\nstatic void wmBaseHandlePing(void* data,\n                             struct xdg_wm_base* wmBase,\n                             uint32_t serial)\n{\n    xdg_wm_base_pong(wmBase, serial);\n}\n\nstatic const struct xdg_wm_base_listener wmBaseListener = {\n    wmBaseHandlePing\n};\n\nstatic void registryHandleGlobal(void* data,\n                                 struct wl_registry* registry,\n                                 uint32_t name,\n                                 const char* interface,\n                                 uint32_t version)\n{\n    if (strcmp(interface, \"wl_compositor\") == 0)\n    {\n        _glfw.wl.compositorVersion = min(3, version);\n        _glfw.wl.compositor =\n            wl_registry_bind(registry, name, &wl_compositor_interface,\n                             _glfw.wl.compositorVersion);\n    }\n    else if (strcmp(interface, \"wl_subcompositor\") == 0)\n    {\n        _glfw.wl.subcompositor =\n            wl_registry_bind(registry, name, &wl_subcompositor_interface, 1);\n    }\n    else if (strcmp(interface, \"wl_shm\") == 0)\n    {\n        _glfw.wl.shm =\n            wl_registry_bind(registry, name, &wl_shm_interface, 1);\n    }\n    else if (strcmp(interface, \"wl_shell\") == 0)\n    {\n        _glfw.wl.shell =\n            wl_registry_bind(registry, name, &wl_shell_interface, 1);\n    }\n    else if (strcmp(interface, \"wl_output\") == 0)\n    {\n        _glfwAddOutputWayland(name, version);\n    }\n    else if (strcmp(interface, \"wl_seat\") == 0)\n    {\n        if (!_glfw.wl.seat)\n        {\n            _glfw.wl.seatVersion = min(4, version);\n            _glfw.wl.seat =\n                wl_registry_bind(registry, name, &wl_seat_interface,\n                                 _glfw.wl.seatVersion);\n            wl_seat_add_listener(_glfw.wl.seat, &seatListener, NULL);\n        }\n    }\n    else if (strcmp(interface, \"wl_data_device_manager\") == 0)\n    {\n        if (!_glfw.wl.dataDeviceManager)\n        {\n            _glfw.wl.dataDeviceManager =\n                wl_registry_bind(registry, name,\n                                 &wl_data_device_manager_interface, 1);\n        }\n    }\n    else if (strcmp(interface, \"xdg_wm_base\") == 0)\n    {\n        _glfw.wl.wmBase =\n            wl_registry_bind(registry, name, &xdg_wm_base_interface, 1);\n        xdg_wm_base_add_listener(_glfw.wl.wmBase, &wmBaseListener, NULL);\n    }\n    else if (strcmp(interface, \"zxdg_decoration_manager_v1\") == 0)\n    {\n        _glfw.wl.decorationManager =\n            wl_registry_bind(registry, name,\n                             &zxdg_decoration_manager_v1_interface,\n                             1);\n    }\n    else if (strcmp(interface, \"wp_viewporter\") == 0)\n    {\n        _glfw.wl.viewporter =\n            wl_registry_bind(registry, name, &wp_viewporter_interface, 1);\n    }\n    else if (strcmp(interface, \"zwp_relative_pointer_manager_v1\") == 0)\n    {\n        _glfw.wl.relativePointerManager =\n            wl_registry_bind(registry, name,\n                             &zwp_relative_pointer_manager_v1_interface,\n                             1);\n    }\n    else if (strcmp(interface, \"zwp_pointer_constraints_v1\") == 0)\n    {\n        _glfw.wl.pointerConstraints =\n            wl_registry_bind(registry, name,\n                             &zwp_pointer_constraints_v1_interface,\n                             1);\n    }\n    else if (strcmp(interface, \"zwp_idle_inhibit_manager_v1\") == 0)\n    {\n        _glfw.wl.idleInhibitManager =\n            wl_registry_bind(registry, name,\n                             &zwp_idle_inhibit_manager_v1_interface,\n                             1);\n    }\n}\n\nstatic void registryHandleGlobalRemove(void *data,\n                                       struct wl_registry *registry,\n                                       uint32_t name)\n{\n    int i;\n    _GLFWmonitor* monitor;\n\n    for (i = 0; i < _glfw.monitorCount; ++i)\n    {\n        monitor = _glfw.monitors[i];\n        if (monitor->wl.name == name)\n        {\n            _glfwInputMonitor(monitor, GLFW_DISCONNECTED, 0);\n            return;\n        }\n    }\n}\n\n\nstatic const struct wl_registry_listener registryListener = {\n    registryHandleGlobal,\n    registryHandleGlobalRemove\n};\n\n// Create key code translation tables\n//\nstatic void createKeyTables(void)\n{\n    int scancode;\n\n    memset(_glfw.wl.keycodes, -1, sizeof(_glfw.wl.keycodes));\n    memset(_glfw.wl.scancodes, -1, sizeof(_glfw.wl.scancodes));\n\n    _glfw.wl.keycodes[KEY_GRAVE]      = GLFW_KEY_GRAVE_ACCENT;\n    _glfw.wl.keycodes[KEY_1]          = GLFW_KEY_1;\n    _glfw.wl.keycodes[KEY_2]          = GLFW_KEY_2;\n    _glfw.wl.keycodes[KEY_3]          = GLFW_KEY_3;\n    _glfw.wl.keycodes[KEY_4]          = GLFW_KEY_4;\n    _glfw.wl.keycodes[KEY_5]          = GLFW_KEY_5;\n    _glfw.wl.keycodes[KEY_6]          = GLFW_KEY_6;\n    _glfw.wl.keycodes[KEY_7]          = GLFW_KEY_7;\n    _glfw.wl.keycodes[KEY_8]          = GLFW_KEY_8;\n    _glfw.wl.keycodes[KEY_9]          = GLFW_KEY_9;\n    _glfw.wl.keycodes[KEY_0]          = GLFW_KEY_0;\n    _glfw.wl.keycodes[KEY_SPACE]      = GLFW_KEY_SPACE;\n    _glfw.wl.keycodes[KEY_MINUS]      = GLFW_KEY_MINUS;\n    _glfw.wl.keycodes[KEY_EQUAL]      = GLFW_KEY_EQUAL;\n    _glfw.wl.keycodes[KEY_Q]          = GLFW_KEY_Q;\n    _glfw.wl.keycodes[KEY_W]          = GLFW_KEY_W;\n    _glfw.wl.keycodes[KEY_E]          = GLFW_KEY_E;\n    _glfw.wl.keycodes[KEY_R]          = GLFW_KEY_R;\n    _glfw.wl.keycodes[KEY_T]          = GLFW_KEY_T;\n    _glfw.wl.keycodes[KEY_Y]          = GLFW_KEY_Y;\n    _glfw.wl.keycodes[KEY_U]          = GLFW_KEY_U;\n    _glfw.wl.keycodes[KEY_I]          = GLFW_KEY_I;\n    _glfw.wl.keycodes[KEY_O]          = GLFW_KEY_O;\n    _glfw.wl.keycodes[KEY_P]          = GLFW_KEY_P;\n    _glfw.wl.keycodes[KEY_LEFTBRACE]  = GLFW_KEY_LEFT_BRACKET;\n    _glfw.wl.keycodes[KEY_RIGHTBRACE] = GLFW_KEY_RIGHT_BRACKET;\n    _glfw.wl.keycodes[KEY_A]          = GLFW_KEY_A;\n    _glfw.wl.keycodes[KEY_S]          = GLFW_KEY_S;\n    _glfw.wl.keycodes[KEY_D]          = GLFW_KEY_D;\n    _glfw.wl.keycodes[KEY_F]          = GLFW_KEY_F;\n    _glfw.wl.keycodes[KEY_G]          = GLFW_KEY_G;\n    _glfw.wl.keycodes[KEY_H]          = GLFW_KEY_H;\n    _glfw.wl.keycodes[KEY_J]          = GLFW_KEY_J;\n    _glfw.wl.keycodes[KEY_K]          = GLFW_KEY_K;\n    _glfw.wl.keycodes[KEY_L]          = GLFW_KEY_L;\n    _glfw.wl.keycodes[KEY_SEMICOLON]  = GLFW_KEY_SEMICOLON;\n    _glfw.wl.keycodes[KEY_APOSTROPHE] = GLFW_KEY_APOSTROPHE;\n    _glfw.wl.keycodes[KEY_Z]          = GLFW_KEY_Z;\n    _glfw.wl.keycodes[KEY_X]          = GLFW_KEY_X;\n    _glfw.wl.keycodes[KEY_C]          = GLFW_KEY_C;\n    _glfw.wl.keycodes[KEY_V]          = GLFW_KEY_V;\n    _glfw.wl.keycodes[KEY_B]          = GLFW_KEY_B;\n    _glfw.wl.keycodes[KEY_N]          = GLFW_KEY_N;\n    _glfw.wl.keycodes[KEY_M]          = GLFW_KEY_M;\n    _glfw.wl.keycodes[KEY_COMMA]      = GLFW_KEY_COMMA;\n    _glfw.wl.keycodes[KEY_DOT]        = GLFW_KEY_PERIOD;\n    _glfw.wl.keycodes[KEY_SLASH]      = GLFW_KEY_SLASH;\n    _glfw.wl.keycodes[KEY_BACKSLASH]  = GLFW_KEY_BACKSLASH;\n    _glfw.wl.keycodes[KEY_ESC]        = GLFW_KEY_ESCAPE;\n    _glfw.wl.keycodes[KEY_TAB]        = GLFW_KEY_TAB;\n    _glfw.wl.keycodes[KEY_LEFTSHIFT]  = GLFW_KEY_LEFT_SHIFT;\n    _glfw.wl.keycodes[KEY_RIGHTSHIFT] = GLFW_KEY_RIGHT_SHIFT;\n    _glfw.wl.keycodes[KEY_LEFTCTRL]   = GLFW_KEY_LEFT_CONTROL;\n    _glfw.wl.keycodes[KEY_RIGHTCTRL]  = GLFW_KEY_RIGHT_CONTROL;\n    _glfw.wl.keycodes[KEY_LEFTALT]    = GLFW_KEY_LEFT_ALT;\n    _glfw.wl.keycodes[KEY_RIGHTALT]   = GLFW_KEY_RIGHT_ALT;\n    _glfw.wl.keycodes[KEY_LEFTMETA]   = GLFW_KEY_LEFT_SUPER;\n    _glfw.wl.keycodes[KEY_RIGHTMETA]  = GLFW_KEY_RIGHT_SUPER;\n    _glfw.wl.keycodes[KEY_MENU]       = GLFW_KEY_MENU;\n    _glfw.wl.keycodes[KEY_NUMLOCK]    = GLFW_KEY_NUM_LOCK;\n    _glfw.wl.keycodes[KEY_CAPSLOCK]   = GLFW_KEY_CAPS_LOCK;\n    _glfw.wl.keycodes[KEY_PRINT]      = GLFW_KEY_PRINT_SCREEN;\n    _glfw.wl.keycodes[KEY_SCROLLLOCK] = GLFW_KEY_SCROLL_LOCK;\n    _glfw.wl.keycodes[KEY_PAUSE]      = GLFW_KEY_PAUSE;\n    _glfw.wl.keycodes[KEY_DELETE]     = GLFW_KEY_DELETE;\n    _glfw.wl.keycodes[KEY_BACKSPACE]  = GLFW_KEY_BACKSPACE;\n    _glfw.wl.keycodes[KEY_ENTER]      = GLFW_KEY_ENTER;\n    _glfw.wl.keycodes[KEY_HOME]       = GLFW_KEY_HOME;\n    _glfw.wl.keycodes[KEY_END]        = GLFW_KEY_END;\n    _glfw.wl.keycodes[KEY_PAGEUP]     = GLFW_KEY_PAGE_UP;\n    _glfw.wl.keycodes[KEY_PAGEDOWN]   = GLFW_KEY_PAGE_DOWN;\n    _glfw.wl.keycodes[KEY_INSERT]     = GLFW_KEY_INSERT;\n    _glfw.wl.keycodes[KEY_LEFT]       = GLFW_KEY_LEFT;\n    _glfw.wl.keycodes[KEY_RIGHT]      = GLFW_KEY_RIGHT;\n    _glfw.wl.keycodes[KEY_DOWN]       = GLFW_KEY_DOWN;\n    _glfw.wl.keycodes[KEY_UP]         = GLFW_KEY_UP;\n    _glfw.wl.keycodes[KEY_F1]         = GLFW_KEY_F1;\n    _glfw.wl.keycodes[KEY_F2]         = GLFW_KEY_F2;\n    _glfw.wl.keycodes[KEY_F3]         = GLFW_KEY_F3;\n    _glfw.wl.keycodes[KEY_F4]         = GLFW_KEY_F4;\n    _glfw.wl.keycodes[KEY_F5]         = GLFW_KEY_F5;\n    _glfw.wl.keycodes[KEY_F6]         = GLFW_KEY_F6;\n    _glfw.wl.keycodes[KEY_F7]         = GLFW_KEY_F7;\n    _glfw.wl.keycodes[KEY_F8]         = GLFW_KEY_F8;\n    _glfw.wl.keycodes[KEY_F9]         = GLFW_KEY_F9;\n    _glfw.wl.keycodes[KEY_F10]        = GLFW_KEY_F10;\n    _glfw.wl.keycodes[KEY_F11]        = GLFW_KEY_F11;\n    _glfw.wl.keycodes[KEY_F12]        = GLFW_KEY_F12;\n    _glfw.wl.keycodes[KEY_F13]        = GLFW_KEY_F13;\n    _glfw.wl.keycodes[KEY_F14]        = GLFW_KEY_F14;\n    _glfw.wl.keycodes[KEY_F15]        = GLFW_KEY_F15;\n    _glfw.wl.keycodes[KEY_F16]        = GLFW_KEY_F16;\n    _glfw.wl.keycodes[KEY_F17]        = GLFW_KEY_F17;\n    _glfw.wl.keycodes[KEY_F18]        = GLFW_KEY_F18;\n    _glfw.wl.keycodes[KEY_F19]        = GLFW_KEY_F19;\n    _glfw.wl.keycodes[KEY_F20]        = GLFW_KEY_F20;\n    _glfw.wl.keycodes[KEY_F21]        = GLFW_KEY_F21;\n    _glfw.wl.keycodes[KEY_F22]        = GLFW_KEY_F22;\n    _glfw.wl.keycodes[KEY_F23]        = GLFW_KEY_F23;\n    _glfw.wl.keycodes[KEY_F24]        = GLFW_KEY_F24;\n    _glfw.wl.keycodes[KEY_KPSLASH]    = GLFW_KEY_KP_DIVIDE;\n    _glfw.wl.keycodes[KEY_KPDOT]      = GLFW_KEY_KP_MULTIPLY;\n    _glfw.wl.keycodes[KEY_KPMINUS]    = GLFW_KEY_KP_SUBTRACT;\n    _glfw.wl.keycodes[KEY_KPPLUS]     = GLFW_KEY_KP_ADD;\n    _glfw.wl.keycodes[KEY_KP0]        = GLFW_KEY_KP_0;\n    _glfw.wl.keycodes[KEY_KP1]        = GLFW_KEY_KP_1;\n    _glfw.wl.keycodes[KEY_KP2]        = GLFW_KEY_KP_2;\n    _glfw.wl.keycodes[KEY_KP3]        = GLFW_KEY_KP_3;\n    _glfw.wl.keycodes[KEY_KP4]        = GLFW_KEY_KP_4;\n    _glfw.wl.keycodes[KEY_KP5]        = GLFW_KEY_KP_5;\n    _glfw.wl.keycodes[KEY_KP6]        = GLFW_KEY_KP_6;\n    _glfw.wl.keycodes[KEY_KP7]        = GLFW_KEY_KP_7;\n    _glfw.wl.keycodes[KEY_KP8]        = GLFW_KEY_KP_8;\n    _glfw.wl.keycodes[KEY_KP9]        = GLFW_KEY_KP_9;\n    _glfw.wl.keycodes[KEY_KPCOMMA]    = GLFW_KEY_KP_DECIMAL;\n    _glfw.wl.keycodes[KEY_KPEQUAL]    = GLFW_KEY_KP_EQUAL;\n    _glfw.wl.keycodes[KEY_KPENTER]    = GLFW_KEY_KP_ENTER;\n\n    for (scancode = 0;  scancode < 256;  scancode++)\n    {\n        if (_glfw.wl.keycodes[scancode] > 0)\n            _glfw.wl.scancodes[_glfw.wl.keycodes[scancode]] = scancode;\n    }\n}\n\n\n//////////////////////////////////////////////////////////////////////////\n//////                       GLFW platform API                      //////\n//////////////////////////////////////////////////////////////////////////\n\nint _glfwPlatformInit(void)\n{\n    const char *cursorTheme;\n    const char *cursorSizeStr;\n    char *cursorSizeEnd;\n    long cursorSizeLong;\n    int cursorSize;\n\n    _glfw.wl.cursor.handle = _glfw_dlopen(\"libwayland-cursor.so.0\");\n    if (!_glfw.wl.cursor.handle)\n    {\n        _glfwInputError(GLFW_PLATFORM_ERROR,\n                        \"Wayland: Failed to open libwayland-cursor\");\n        return GLFW_FALSE;\n    }\n\n    _glfw.wl.cursor.theme_load = (PFN_wl_cursor_theme_load)\n        _glfw_dlsym(_glfw.wl.cursor.handle, \"wl_cursor_theme_load\");\n    _glfw.wl.cursor.theme_destroy = (PFN_wl_cursor_theme_destroy)\n        _glfw_dlsym(_glfw.wl.cursor.handle, \"wl_cursor_theme_destroy\");\n    _glfw.wl.cursor.theme_get_cursor = (PFN_wl_cursor_theme_get_cursor)\n        _glfw_dlsym(_glfw.wl.cursor.handle, \"wl_cursor_theme_get_cursor\");\n    _glfw.wl.cursor.image_get_buffer = (PFN_wl_cursor_image_get_buffer)\n        _glfw_dlsym(_glfw.wl.cursor.handle, \"wl_cursor_image_get_buffer\");\n\n    _glfw.wl.egl.handle = _glfw_dlopen(\"libwayland-egl.so.1\");\n    if (!_glfw.wl.egl.handle)\n    {\n        _glfwInputError(GLFW_PLATFORM_ERROR,\n                        \"Wayland: Failed to open libwayland-egl\");\n        return GLFW_FALSE;\n    }\n\n    _glfw.wl.egl.window_create = (PFN_wl_egl_window_create)\n        _glfw_dlsym(_glfw.wl.egl.handle, \"wl_egl_window_create\");\n    _glfw.wl.egl.window_destroy = (PFN_wl_egl_window_destroy)\n        _glfw_dlsym(_glfw.wl.egl.handle, \"wl_egl_window_destroy\");\n    _glfw.wl.egl.window_resize = (PFN_wl_egl_window_resize)\n        _glfw_dlsym(_glfw.wl.egl.handle, \"wl_egl_window_resize\");\n\n    _glfw.wl.xkb.handle = _glfw_dlopen(\"libxkbcommon.so.0\");\n    if (!_glfw.wl.xkb.handle)\n    {\n        _glfwInputError(GLFW_PLATFORM_ERROR,\n                        \"Wayland: Failed to open libxkbcommon\");\n        return GLFW_FALSE;\n    }\n\n    _glfw.wl.xkb.context_new = (PFN_xkb_context_new)\n        _glfw_dlsym(_glfw.wl.xkb.handle, \"xkb_context_new\");\n    _glfw.wl.xkb.context_unref = (PFN_xkb_context_unref)\n        _glfw_dlsym(_glfw.wl.xkb.handle, \"xkb_context_unref\");\n    _glfw.wl.xkb.keymap_new_from_string = (PFN_xkb_keymap_new_from_string)\n        _glfw_dlsym(_glfw.wl.xkb.handle, \"xkb_keymap_new_from_string\");\n    _glfw.wl.xkb.keymap_unref = (PFN_xkb_keymap_unref)\n        _glfw_dlsym(_glfw.wl.xkb.handle, \"xkb_keymap_unref\");\n    _glfw.wl.xkb.keymap_mod_get_index = (PFN_xkb_keymap_mod_get_index)\n        _glfw_dlsym(_glfw.wl.xkb.handle, \"xkb_keymap_mod_get_index\");\n    _glfw.wl.xkb.keymap_key_repeats = (PFN_xkb_keymap_key_repeats)\n        _glfw_dlsym(_glfw.wl.xkb.handle, \"xkb_keymap_key_repeats\");\n    _glfw.wl.xkb.state_new = (PFN_xkb_state_new)\n        _glfw_dlsym(_glfw.wl.xkb.handle, \"xkb_state_new\");\n    _glfw.wl.xkb.state_unref = (PFN_xkb_state_unref)\n        _glfw_dlsym(_glfw.wl.xkb.handle, \"xkb_state_unref\");\n    _glfw.wl.xkb.state_key_get_syms = (PFN_xkb_state_key_get_syms)\n        _glfw_dlsym(_glfw.wl.xkb.handle, \"xkb_state_key_get_syms\");\n    _glfw.wl.xkb.state_update_mask = (PFN_xkb_state_update_mask)\n        _glfw_dlsym(_glfw.wl.xkb.handle, \"xkb_state_update_mask\");\n    _glfw.wl.xkb.state_serialize_mods = (PFN_xkb_state_serialize_mods)\n        _glfw_dlsym(_glfw.wl.xkb.handle, \"xkb_state_serialize_mods\");\n\n#ifdef HAVE_XKBCOMMON_COMPOSE_H\n    _glfw.wl.xkb.compose_table_new_from_locale = (PFN_xkb_compose_table_new_from_locale)\n        _glfw_dlsym(_glfw.wl.xkb.handle, \"xkb_compose_table_new_from_locale\");\n    _glfw.wl.xkb.compose_table_unref = (PFN_xkb_compose_table_unref)\n        _glfw_dlsym(_glfw.wl.xkb.handle, \"xkb_compose_table_unref\");\n    _glfw.wl.xkb.compose_state_new = (PFN_xkb_compose_state_new)\n        _glfw_dlsym(_glfw.wl.xkb.handle, \"xkb_compose_state_new\");\n    _glfw.wl.xkb.compose_state_unref = (PFN_xkb_compose_state_unref)\n        _glfw_dlsym(_glfw.wl.xkb.handle, \"xkb_compose_state_unref\");\n    _glfw.wl.xkb.compose_state_feed = (PFN_xkb_compose_state_feed)\n        _glfw_dlsym(_glfw.wl.xkb.handle, \"xkb_compose_state_feed\");\n    _glfw.wl.xkb.compose_state_get_status = (PFN_xkb_compose_state_get_status)\n        _glfw_dlsym(_glfw.wl.xkb.handle, \"xkb_compose_state_get_status\");\n    _glfw.wl.xkb.compose_state_get_one_sym = (PFN_xkb_compose_state_get_one_sym)\n        _glfw_dlsym(_glfw.wl.xkb.handle, \"xkb_compose_state_get_one_sym\");\n#endif\n\n    _glfw.wl.display = wl_display_connect(NULL);\n    if (!_glfw.wl.display)\n    {\n        _glfwInputError(GLFW_PLATFORM_ERROR,\n                        \"Wayland: Failed to connect to display\");\n        return GLFW_FALSE;\n    }\n\n    _glfw.wl.registry = wl_display_get_registry(_glfw.wl.display);\n    wl_registry_add_listener(_glfw.wl.registry, &registryListener, NULL);\n\n    createKeyTables();\n\n    _glfw.wl.xkb.context = xkb_context_new(0);\n    if (!_glfw.wl.xkb.context)\n    {\n        _glfwInputError(GLFW_PLATFORM_ERROR,\n                        \"Wayland: Failed to initialize xkb context\");\n        return GLFW_FALSE;\n    }\n\n    // Sync so we got all registry objects\n    wl_display_roundtrip(_glfw.wl.display);\n\n    // Sync so we got all initial output events\n    wl_display_roundtrip(_glfw.wl.display);\n\n#ifdef __linux__\n    if (!_glfwInitJoysticksLinux())\n        return GLFW_FALSE;\n#endif\n\n    _glfwInitTimerPOSIX();\n\n    _glfw.wl.timerfd = -1;\n    if (_glfw.wl.seatVersion >= 4)\n        _glfw.wl.timerfd = timerfd_create(CLOCK_MONOTONIC, TFD_CLOEXEC);\n\n    if (_glfw.wl.pointer && _glfw.wl.shm)\n    {\n        cursorTheme = getenv(\"XCURSOR_THEME\");\n        cursorSizeStr = getenv(\"XCURSOR_SIZE\");\n        cursorSize = 32;\n        if (cursorSizeStr)\n        {\n            errno = 0;\n            cursorSizeLong = strtol(cursorSizeStr, &cursorSizeEnd, 10);\n            if (!*cursorSizeEnd && !errno && cursorSizeLong > 0 && cursorSizeLong <= INT_MAX)\n                cursorSize = (int)cursorSizeLong;\n        }\n        _glfw.wl.cursorTheme =\n            wl_cursor_theme_load(cursorTheme, cursorSize, _glfw.wl.shm);\n        if (!_glfw.wl.cursorTheme)\n        {\n            _glfwInputError(GLFW_PLATFORM_ERROR,\n                            \"Wayland: Unable to load default cursor theme\");\n            return GLFW_FALSE;\n        }\n        // If this happens to be NULL, we just fallback to the scale=1 version.\n        _glfw.wl.cursorThemeHiDPI =\n            wl_cursor_theme_load(cursorTheme, 2 * cursorSize, _glfw.wl.shm);\n        _glfw.wl.cursorSurface =\n            wl_compositor_create_surface(_glfw.wl.compositor);\n        _glfw.wl.cursorTimerfd = timerfd_create(CLOCK_MONOTONIC, TFD_CLOEXEC);\n    }\n\n    if (_glfw.wl.seat && _glfw.wl.dataDeviceManager)\n    {\n        _glfw.wl.dataDevice =\n            wl_data_device_manager_get_data_device(_glfw.wl.dataDeviceManager,\n                                                   _glfw.wl.seat);\n        wl_data_device_add_listener(_glfw.wl.dataDevice, &dataDeviceListener, NULL);\n        _glfw.wl.clipboardString = malloc(4096);\n        if (!_glfw.wl.clipboardString)\n        {\n            _glfwInputError(GLFW_PLATFORM_ERROR,\n                            \"Wayland: Unable to allocate clipboard memory\");\n            return GLFW_FALSE;\n        }\n        _glfw.wl.clipboardSize = 4096;\n    }\n\n    return GLFW_TRUE;\n}\n\nvoid _glfwPlatformTerminate(void)\n{\n#ifdef __linux__\n    _glfwTerminateJoysticksLinux();\n#endif\n    _glfwTerminateEGL();\n    if (_glfw.wl.egl.handle)\n    {\n        _glfw_dlclose(_glfw.wl.egl.handle);\n        _glfw.wl.egl.handle = NULL;\n    }\n\n#ifdef HAVE_XKBCOMMON_COMPOSE_H\n    if (_glfw.wl.xkb.composeState)\n        xkb_compose_state_unref(_glfw.wl.xkb.composeState);\n#endif\n    if (_glfw.wl.xkb.keymap)\n        xkb_keymap_unref(_glfw.wl.xkb.keymap);\n    if (_glfw.wl.xkb.state)\n        xkb_state_unref(_glfw.wl.xkb.state);\n    if (_glfw.wl.xkb.context)\n        xkb_context_unref(_glfw.wl.xkb.context);\n    if (_glfw.wl.xkb.handle)\n    {\n        _glfw_dlclose(_glfw.wl.xkb.handle);\n        _glfw.wl.xkb.handle = NULL;\n    }\n\n    if (_glfw.wl.cursorTheme)\n        wl_cursor_theme_destroy(_glfw.wl.cursorTheme);\n    if (_glfw.wl.cursorThemeHiDPI)\n        wl_cursor_theme_destroy(_glfw.wl.cursorThemeHiDPI);\n    if (_glfw.wl.cursor.handle)\n    {\n        _glfw_dlclose(_glfw.wl.cursor.handle);\n        _glfw.wl.cursor.handle = NULL;\n    }\n\n    if (_glfw.wl.cursorSurface)\n        wl_surface_destroy(_glfw.wl.cursorSurface);\n    if (_glfw.wl.subcompositor)\n        wl_subcompositor_destroy(_glfw.wl.subcompositor);\n    if (_glfw.wl.compositor)\n        wl_compositor_destroy(_glfw.wl.compositor);\n    if (_glfw.wl.shm)\n        wl_shm_destroy(_glfw.wl.shm);\n    if (_glfw.wl.shell)\n        wl_shell_destroy(_glfw.wl.shell);\n    if (_glfw.wl.viewporter)\n        wp_viewporter_destroy(_glfw.wl.viewporter);\n    if (_glfw.wl.decorationManager)\n        zxdg_decoration_manager_v1_destroy(_glfw.wl.decorationManager);\n    if (_glfw.wl.wmBase)\n        xdg_wm_base_destroy(_glfw.wl.wmBase);\n    if (_glfw.wl.dataSource)\n        wl_data_source_destroy(_glfw.wl.dataSource);\n    if (_glfw.wl.dataDevice)\n        wl_data_device_destroy(_glfw.wl.dataDevice);\n    if (_glfw.wl.dataOffer)\n        wl_data_offer_destroy(_glfw.wl.dataOffer);\n    if (_glfw.wl.dataDeviceManager)\n        wl_data_device_manager_destroy(_glfw.wl.dataDeviceManager);\n    if (_glfw.wl.pointer)\n        wl_pointer_destroy(_glfw.wl.pointer);\n    if (_glfw.wl.keyboard)\n        wl_keyboard_destroy(_glfw.wl.keyboard);\n    if (_glfw.wl.seat)\n        wl_seat_destroy(_glfw.wl.seat);\n    if (_glfw.wl.relativePointerManager)\n        zwp_relative_pointer_manager_v1_destroy(_glfw.wl.relativePointerManager);\n    if (_glfw.wl.pointerConstraints)\n        zwp_pointer_constraints_v1_destroy(_glfw.wl.pointerConstraints);\n    if (_glfw.wl.idleInhibitManager)\n        zwp_idle_inhibit_manager_v1_destroy(_glfw.wl.idleInhibitManager);\n    if (_glfw.wl.registry)\n        wl_registry_destroy(_glfw.wl.registry);\n    if (_glfw.wl.display)\n    {\n        wl_display_flush(_glfw.wl.display);\n        wl_display_disconnect(_glfw.wl.display);\n    }\n\n    if (_glfw.wl.timerfd >= 0)\n        close(_glfw.wl.timerfd);\n    if (_glfw.wl.cursorTimerfd >= 0)\n        close(_glfw.wl.cursorTimerfd);\n\n    if (_glfw.wl.clipboardString)\n        free(_glfw.wl.clipboardString);\n    if (_glfw.wl.clipboardSendString)\n        free(_glfw.wl.clipboardSendString);\n}\n\nconst char* _glfwPlatformGetVersionString(void)\n{\n    return _GLFW_VERSION_NUMBER \" Wayland EGL OSMesa\"\n#if defined(_POSIX_TIMERS) && defined(_POSIX_MONOTONIC_CLOCK)\n        \" clock_gettime\"\n#else\n        \" gettimeofday\"\n#endif\n        \" evdev\"\n#if defined(_GLFW_BUILD_DLL)\n        \" shared\"\n#endif\n        ;\n}\n"
  },
  {
    "path": "thirdparty/glfw/src/wl_monitor.c",
    "content": "//========================================================================\n// GLFW 3.3 Wayland - www.glfw.org\n//------------------------------------------------------------------------\n// Copyright (c) 2014 Jonas Ådahl <jadahl@gmail.com>\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//    claim that you wrote the original software. If you use this software\n//    in a product, an acknowledgment in the product documentation would\n//    be appreciated but is not required.\n//\n// 2. Altered source versions must be plainly marked as such, and must not\n//    be misrepresented as being the original software.\n//\n// 3. This notice may not be removed or altered from any source\n//    distribution.\n//\n//========================================================================\n// It is fine to use C99 in this file because it will not be built with VS\n//========================================================================\n\n#include \"internal.h\"\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <errno.h>\n#include <math.h>\n\n\nstatic void outputHandleGeometry(void* data,\n                                 struct wl_output* output,\n                                 int32_t x,\n                                 int32_t y,\n                                 int32_t physicalWidth,\n                                 int32_t physicalHeight,\n                                 int32_t subpixel,\n                                 const char* make,\n                                 const char* model,\n                                 int32_t transform)\n{\n    struct _GLFWmonitor *monitor = data;\n    char name[1024];\n\n    monitor->wl.x = x;\n    monitor->wl.y = y;\n    monitor->widthMM = physicalWidth;\n    monitor->heightMM = physicalHeight;\n\n    snprintf(name, sizeof(name), \"%s %s\", make, model);\n    monitor->name = _glfw_strdup(name);\n}\n\nstatic void outputHandleMode(void* data,\n                             struct wl_output* output,\n                             uint32_t flags,\n                             int32_t width,\n                             int32_t height,\n                             int32_t refresh)\n{\n    struct _GLFWmonitor *monitor = data;\n    GLFWvidmode mode;\n\n    mode.width = width;\n    mode.height = height;\n    mode.redBits = 8;\n    mode.greenBits = 8;\n    mode.blueBits = 8;\n    mode.refreshRate = (int) round(refresh / 1000.0);\n\n    monitor->modeCount++;\n    monitor->modes =\n        realloc(monitor->modes, monitor->modeCount * sizeof(GLFWvidmode));\n    monitor->modes[monitor->modeCount - 1] = mode;\n\n    if (flags & WL_OUTPUT_MODE_CURRENT)\n        monitor->wl.currentMode = monitor->modeCount - 1;\n}\n\nstatic void outputHandleDone(void* data, struct wl_output* output)\n{\n    struct _GLFWmonitor *monitor = data;\n\n    _glfwInputMonitor(monitor, GLFW_CONNECTED, _GLFW_INSERT_LAST);\n}\n\nstatic void outputHandleScale(void* data,\n                              struct wl_output* output,\n                              int32_t factor)\n{\n    struct _GLFWmonitor *monitor = data;\n\n    monitor->wl.scale = factor;\n}\n\nstatic const struct wl_output_listener outputListener = {\n    outputHandleGeometry,\n    outputHandleMode,\n    outputHandleDone,\n    outputHandleScale,\n};\n\n\n//////////////////////////////////////////////////////////////////////////\n//////                       GLFW internal API                      //////\n//////////////////////////////////////////////////////////////////////////\n\nvoid _glfwAddOutputWayland(uint32_t name, uint32_t version)\n{\n    _GLFWmonitor *monitor;\n    struct wl_output *output;\n\n    if (version < 2)\n    {\n        _glfwInputError(GLFW_PLATFORM_ERROR,\n                        \"Wayland: Unsupported output interface version\");\n        return;\n    }\n\n    // The actual name of this output will be set in the geometry handler.\n    monitor = _glfwAllocMonitor(NULL, 0, 0);\n\n    output = wl_registry_bind(_glfw.wl.registry,\n                              name,\n                              &wl_output_interface,\n                              2);\n    if (!output)\n    {\n        _glfwFreeMonitor(monitor);\n        return;\n    }\n\n    monitor->wl.scale = 1;\n    monitor->wl.output = output;\n    monitor->wl.name = name;\n\n    wl_output_add_listener(output, &outputListener, monitor);\n}\n\n\n//////////////////////////////////////////////////////////////////////////\n//////                       GLFW platform API                      //////\n//////////////////////////////////////////////////////////////////////////\n\nvoid _glfwPlatformFreeMonitor(_GLFWmonitor* monitor)\n{\n    if (monitor->wl.output)\n        wl_output_destroy(monitor->wl.output);\n}\n\nvoid _glfwPlatformGetMonitorPos(_GLFWmonitor* monitor, int* xpos, int* ypos)\n{\n    if (xpos)\n        *xpos = monitor->wl.x;\n    if (ypos)\n        *ypos = monitor->wl.y;\n}\n\nvoid _glfwPlatformGetMonitorContentScale(_GLFWmonitor* monitor,\n                                         float* xscale, float* yscale)\n{\n    if (xscale)\n        *xscale = (float) monitor->wl.scale;\n    if (yscale)\n        *yscale = (float) monitor->wl.scale;\n}\n\nvoid _glfwPlatformGetMonitorWorkarea(_GLFWmonitor* monitor,\n                                     int* xpos, int* ypos,\n                                     int* width, int* height)\n{\n    if (xpos)\n        *xpos = monitor->wl.x;\n    if (ypos)\n        *ypos = monitor->wl.y;\n    if (width)\n        *width = monitor->modes[monitor->wl.currentMode].width;\n    if (height)\n        *height = monitor->modes[monitor->wl.currentMode].height;\n}\n\nGLFWvidmode* _glfwPlatformGetVideoModes(_GLFWmonitor* monitor, int* found)\n{\n    *found = monitor->modeCount;\n    return monitor->modes;\n}\n\nvoid _glfwPlatformGetVideoMode(_GLFWmonitor* monitor, GLFWvidmode* mode)\n{\n    *mode = monitor->modes[monitor->wl.currentMode];\n}\n\nGLFWbool _glfwPlatformGetGammaRamp(_GLFWmonitor* monitor, GLFWgammaramp* ramp)\n{\n    _glfwInputError(GLFW_PLATFORM_ERROR,\n                    \"Wayland: Gamma ramp access is not available\");\n    return GLFW_FALSE;\n}\n\nvoid _glfwPlatformSetGammaRamp(_GLFWmonitor* monitor,\n                               const GLFWgammaramp* ramp)\n{\n    _glfwInputError(GLFW_PLATFORM_ERROR,\n                    \"Wayland: Gamma ramp access is not available\");\n}\n\n\n//////////////////////////////////////////////////////////////////////////\n//////                        GLFW native API                       //////\n//////////////////////////////////////////////////////////////////////////\n\nGLFWAPI struct wl_output* glfwGetWaylandMonitor(GLFWmonitor* handle)\n{\n    _GLFWmonitor* monitor = (_GLFWmonitor*) handle;\n    _GLFW_REQUIRE_INIT_OR_RETURN(NULL);\n    return monitor->wl.output;\n}\n\n"
  },
  {
    "path": "thirdparty/glfw/src/wl_platform.h",
    "content": "//========================================================================\n// GLFW 3.3 Wayland - www.glfw.org\n//------------------------------------------------------------------------\n// Copyright (c) 2014 Jonas Ådahl <jadahl@gmail.com>\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//    claim that you wrote the original software. If you use this software\n//    in a product, an acknowledgment in the product documentation would\n//    be appreciated but is not required.\n//\n// 2. Altered source versions must be plainly marked as such, and must not\n//    be misrepresented as being the original software.\n//\n// 3. This notice may not be removed or altered from any source\n//    distribution.\n//\n//========================================================================\n\n#include <wayland-client.h>\n#include <xkbcommon/xkbcommon.h>\n#ifdef HAVE_XKBCOMMON_COMPOSE_H\n#include <xkbcommon/xkbcommon-compose.h>\n#endif\n#include <dlfcn.h>\n\ntypedef VkFlags VkWaylandSurfaceCreateFlagsKHR;\n\ntypedef struct VkWaylandSurfaceCreateInfoKHR\n{\n    VkStructureType                 sType;\n    const void*                     pNext;\n    VkWaylandSurfaceCreateFlagsKHR  flags;\n    struct wl_display*              display;\n    struct wl_surface*              surface;\n} VkWaylandSurfaceCreateInfoKHR;\n\ntypedef VkResult (APIENTRY *PFN_vkCreateWaylandSurfaceKHR)(VkInstance,const VkWaylandSurfaceCreateInfoKHR*,const VkAllocationCallbacks*,VkSurfaceKHR*);\ntypedef VkBool32 (APIENTRY *PFN_vkGetPhysicalDeviceWaylandPresentationSupportKHR)(VkPhysicalDevice,uint32_t,struct wl_display*);\n\n#include \"posix_thread.h\"\n#include \"posix_time.h\"\n#ifdef __linux__\n#include \"linux_joystick.h\"\n#else\n#include \"null_joystick.h\"\n#endif\n#include \"xkb_unicode.h\"\n#include \"egl_context.h\"\n#include \"osmesa_context.h\"\n\n#include \"wayland-xdg-shell-client-protocol.h\"\n#include \"wayland-xdg-decoration-client-protocol.h\"\n#include \"wayland-viewporter-client-protocol.h\"\n#include \"wayland-relative-pointer-unstable-v1-client-protocol.h\"\n#include \"wayland-pointer-constraints-unstable-v1-client-protocol.h\"\n#include \"wayland-idle-inhibit-unstable-v1-client-protocol.h\"\n\n#define _glfw_dlopen(name) dlopen(name, RTLD_LAZY | RTLD_LOCAL)\n#define _glfw_dlclose(handle) dlclose(handle)\n#define _glfw_dlsym(handle, name) dlsym(handle, name)\n\n#define _GLFW_EGL_NATIVE_WINDOW         ((EGLNativeWindowType) window->wl.native)\n#define _GLFW_EGL_NATIVE_DISPLAY        ((EGLNativeDisplayType) _glfw.wl.display)\n\n#define _GLFW_PLATFORM_WINDOW_STATE         _GLFWwindowWayland  wl\n#define _GLFW_PLATFORM_LIBRARY_WINDOW_STATE _GLFWlibraryWayland wl\n#define _GLFW_PLATFORM_MONITOR_STATE        _GLFWmonitorWayland wl\n#define _GLFW_PLATFORM_CURSOR_STATE         _GLFWcursorWayland  wl\n\n#define _GLFW_PLATFORM_CONTEXT_STATE         struct { int dummyContext; }\n#define _GLFW_PLATFORM_LIBRARY_CONTEXT_STATE struct { int dummyLibraryContext; }\n\nstruct wl_cursor_image {\n    uint32_t width;\n    uint32_t height;\n    uint32_t hotspot_x;\n    uint32_t hotspot_y;\n    uint32_t delay;\n};\nstruct wl_cursor {\n    unsigned int image_count;\n    struct wl_cursor_image** images;\n    char* name;\n};\ntypedef struct wl_cursor_theme* (* PFN_wl_cursor_theme_load)(const char*, int, struct wl_shm*);\ntypedef void (* PFN_wl_cursor_theme_destroy)(struct wl_cursor_theme*);\ntypedef struct wl_cursor* (* PFN_wl_cursor_theme_get_cursor)(struct wl_cursor_theme*, const char*);\ntypedef struct wl_buffer* (* PFN_wl_cursor_image_get_buffer)(struct wl_cursor_image*);\n#define wl_cursor_theme_load _glfw.wl.cursor.theme_load\n#define wl_cursor_theme_destroy _glfw.wl.cursor.theme_destroy\n#define wl_cursor_theme_get_cursor _glfw.wl.cursor.theme_get_cursor\n#define wl_cursor_image_get_buffer _glfw.wl.cursor.image_get_buffer\n\ntypedef struct wl_egl_window* (* PFN_wl_egl_window_create)(struct wl_surface*, int, int);\ntypedef void (* PFN_wl_egl_window_destroy)(struct wl_egl_window*);\ntypedef void (* PFN_wl_egl_window_resize)(struct wl_egl_window*, int, int, int, int);\n#define wl_egl_window_create _glfw.wl.egl.window_create\n#define wl_egl_window_destroy _glfw.wl.egl.window_destroy\n#define wl_egl_window_resize _glfw.wl.egl.window_resize\n\ntypedef struct xkb_context* (* PFN_xkb_context_new)(enum xkb_context_flags);\ntypedef void (* PFN_xkb_context_unref)(struct xkb_context*);\ntypedef struct xkb_keymap* (* PFN_xkb_keymap_new_from_string)(struct xkb_context*, const char*, enum xkb_keymap_format, enum xkb_keymap_compile_flags);\ntypedef void (* PFN_xkb_keymap_unref)(struct xkb_keymap*);\ntypedef xkb_mod_index_t (* PFN_xkb_keymap_mod_get_index)(struct xkb_keymap*, const char*);\ntypedef int (* PFN_xkb_keymap_key_repeats)(struct xkb_keymap*, xkb_keycode_t);\ntypedef struct xkb_state* (* PFN_xkb_state_new)(struct xkb_keymap*);\ntypedef void (* PFN_xkb_state_unref)(struct xkb_state*);\ntypedef int (* PFN_xkb_state_key_get_syms)(struct xkb_state*, xkb_keycode_t, const xkb_keysym_t**);\ntypedef enum xkb_state_component (* PFN_xkb_state_update_mask)(struct xkb_state*, xkb_mod_mask_t, xkb_mod_mask_t, xkb_mod_mask_t, xkb_layout_index_t, xkb_layout_index_t, xkb_layout_index_t);\ntypedef xkb_mod_mask_t (* PFN_xkb_state_serialize_mods)(struct xkb_state*, enum xkb_state_component);\n#define xkb_context_new _glfw.wl.xkb.context_new\n#define xkb_context_unref _glfw.wl.xkb.context_unref\n#define xkb_keymap_new_from_string _glfw.wl.xkb.keymap_new_from_string\n#define xkb_keymap_unref _glfw.wl.xkb.keymap_unref\n#define xkb_keymap_mod_get_index _glfw.wl.xkb.keymap_mod_get_index\n#define xkb_keymap_key_repeats _glfw.wl.xkb.keymap_key_repeats\n#define xkb_state_new _glfw.wl.xkb.state_new\n#define xkb_state_unref _glfw.wl.xkb.state_unref\n#define xkb_state_key_get_syms _glfw.wl.xkb.state_key_get_syms\n#define xkb_state_update_mask _glfw.wl.xkb.state_update_mask\n#define xkb_state_serialize_mods _glfw.wl.xkb.state_serialize_mods\n\n#ifdef HAVE_XKBCOMMON_COMPOSE_H\ntypedef struct xkb_compose_table* (* PFN_xkb_compose_table_new_from_locale)(struct xkb_context*, const char*, enum xkb_compose_compile_flags);\ntypedef void (* PFN_xkb_compose_table_unref)(struct xkb_compose_table*);\ntypedef struct xkb_compose_state* (* PFN_xkb_compose_state_new)(struct xkb_compose_table*, enum xkb_compose_state_flags);\ntypedef void (* PFN_xkb_compose_state_unref)(struct xkb_compose_state*);\ntypedef enum xkb_compose_feed_result (* PFN_xkb_compose_state_feed)(struct xkb_compose_state*, xkb_keysym_t);\ntypedef enum xkb_compose_status (* PFN_xkb_compose_state_get_status)(struct xkb_compose_state*);\ntypedef xkb_keysym_t (* PFN_xkb_compose_state_get_one_sym)(struct xkb_compose_state*);\n#define xkb_compose_table_new_from_locale _glfw.wl.xkb.compose_table_new_from_locale\n#define xkb_compose_table_unref _glfw.wl.xkb.compose_table_unref\n#define xkb_compose_state_new _glfw.wl.xkb.compose_state_new\n#define xkb_compose_state_unref _glfw.wl.xkb.compose_state_unref\n#define xkb_compose_state_feed _glfw.wl.xkb.compose_state_feed\n#define xkb_compose_state_get_status _glfw.wl.xkb.compose_state_get_status\n#define xkb_compose_state_get_one_sym _glfw.wl.xkb.compose_state_get_one_sym\n#endif\n\n#define _GLFW_DECORATION_WIDTH 4\n#define _GLFW_DECORATION_TOP 24\n#define _GLFW_DECORATION_VERTICAL (_GLFW_DECORATION_TOP + _GLFW_DECORATION_WIDTH)\n#define _GLFW_DECORATION_HORIZONTAL (2 * _GLFW_DECORATION_WIDTH)\n\ntypedef enum _GLFWdecorationSideWayland\n{\n    mainWindow,\n    topDecoration,\n    leftDecoration,\n    rightDecoration,\n    bottomDecoration,\n\n} _GLFWdecorationSideWayland;\n\ntypedef struct _GLFWdecorationWayland\n{\n    struct wl_surface*          surface;\n    struct wl_subsurface*       subsurface;\n    struct wp_viewport*         viewport;\n\n} _GLFWdecorationWayland;\n\n// Wayland-specific per-window data\n//\ntypedef struct _GLFWwindowWayland\n{\n    int                         width, height;\n    GLFWbool                    visible;\n    GLFWbool                    maximized;\n    GLFWbool                    hovered;\n    GLFWbool                    transparent;\n    struct wl_surface*          surface;\n    struct wl_egl_window*       native;\n    struct wl_shell_surface*    shellSurface;\n    struct wl_callback*         callback;\n\n    struct {\n        struct xdg_surface*     surface;\n        struct xdg_toplevel*    toplevel;\n        struct zxdg_toplevel_decoration_v1* decoration;\n    } xdg;\n\n    _GLFWcursor*                currentCursor;\n    double                      cursorPosX, cursorPosY;\n\n    char*                       title;\n\n    // We need to track the monitors the window spans on to calculate the\n    // optimal scaling factor.\n    int                         scale;\n    _GLFWmonitor**              monitors;\n    int                         monitorsCount;\n    int                         monitorsSize;\n\n    struct {\n        struct zwp_relative_pointer_v1*    relativePointer;\n        struct zwp_locked_pointer_v1*      lockedPointer;\n    } pointerLock;\n\n    struct zwp_idle_inhibitor_v1*          idleInhibitor;\n\n    GLFWbool                    wasFullscreen;\n\n    struct {\n        GLFWbool                           serverSide;\n        struct wl_buffer*                  buffer;\n        _GLFWdecorationWayland             top, left, right, bottom;\n        int                                focus;\n    } decorations;\n\n} _GLFWwindowWayland;\n\n// Wayland-specific global data\n//\ntypedef struct _GLFWlibraryWayland\n{\n    struct wl_display*          display;\n    struct wl_registry*         registry;\n    struct wl_compositor*       compositor;\n    struct wl_subcompositor*    subcompositor;\n    struct wl_shell*            shell;\n    struct wl_shm*              shm;\n    struct wl_seat*             seat;\n    struct wl_pointer*          pointer;\n    struct wl_keyboard*         keyboard;\n    struct wl_data_device_manager*          dataDeviceManager;\n    struct wl_data_device*      dataDevice;\n    struct wl_data_offer*       dataOffer;\n    struct wl_data_source*      dataSource;\n    struct xdg_wm_base*         wmBase;\n    struct zxdg_decoration_manager_v1*      decorationManager;\n    struct wp_viewporter*       viewporter;\n    struct zwp_relative_pointer_manager_v1* relativePointerManager;\n    struct zwp_pointer_constraints_v1*      pointerConstraints;\n    struct zwp_idle_inhibit_manager_v1*     idleInhibitManager;\n\n    int                         compositorVersion;\n    int                         seatVersion;\n\n    struct wl_cursor_theme*     cursorTheme;\n    struct wl_cursor_theme*     cursorThemeHiDPI;\n    struct wl_surface*          cursorSurface;\n    const char*                 cursorPreviousName;\n    int                         cursorTimerfd;\n    uint32_t                    serial;\n\n    int32_t                     keyboardRepeatRate;\n    int32_t                     keyboardRepeatDelay;\n    int                         keyboardLastKey;\n    int                         keyboardLastScancode;\n    char*                       clipboardString;\n    size_t                      clipboardSize;\n    char*                       clipboardSendString;\n    size_t                      clipboardSendSize;\n    int                         timerfd;\n    short int                   keycodes[256];\n    short int                   scancodes[GLFW_KEY_LAST + 1];\n\n    struct {\n        void*                   handle;\n        struct xkb_context*     context;\n        struct xkb_keymap*      keymap;\n        struct xkb_state*       state;\n\n#ifdef HAVE_XKBCOMMON_COMPOSE_H\n        struct xkb_compose_state* composeState;\n#endif\n\n        xkb_mod_mask_t          controlMask;\n        xkb_mod_mask_t          altMask;\n        xkb_mod_mask_t          shiftMask;\n        xkb_mod_mask_t          superMask;\n        xkb_mod_mask_t          capsLockMask;\n        xkb_mod_mask_t          numLockMask;\n        unsigned int            modifiers;\n\n        PFN_xkb_context_new context_new;\n        PFN_xkb_context_unref context_unref;\n        PFN_xkb_keymap_new_from_string keymap_new_from_string;\n        PFN_xkb_keymap_unref keymap_unref;\n        PFN_xkb_keymap_mod_get_index keymap_mod_get_index;\n        PFN_xkb_keymap_key_repeats keymap_key_repeats;\n        PFN_xkb_state_new state_new;\n        PFN_xkb_state_unref state_unref;\n        PFN_xkb_state_key_get_syms state_key_get_syms;\n        PFN_xkb_state_update_mask state_update_mask;\n        PFN_xkb_state_serialize_mods state_serialize_mods;\n\n#ifdef HAVE_XKBCOMMON_COMPOSE_H\n        PFN_xkb_compose_table_new_from_locale compose_table_new_from_locale;\n        PFN_xkb_compose_table_unref compose_table_unref;\n        PFN_xkb_compose_state_new compose_state_new;\n        PFN_xkb_compose_state_unref compose_state_unref;\n        PFN_xkb_compose_state_feed compose_state_feed;\n        PFN_xkb_compose_state_get_status compose_state_get_status;\n        PFN_xkb_compose_state_get_one_sym compose_state_get_one_sym;\n#endif\n    } xkb;\n\n    _GLFWwindow*                pointerFocus;\n    _GLFWwindow*                keyboardFocus;\n\n    struct {\n        void*                   handle;\n\n        PFN_wl_cursor_theme_load theme_load;\n        PFN_wl_cursor_theme_destroy theme_destroy;\n        PFN_wl_cursor_theme_get_cursor theme_get_cursor;\n        PFN_wl_cursor_image_get_buffer image_get_buffer;\n    } cursor;\n\n    struct {\n        void*                   handle;\n\n        PFN_wl_egl_window_create window_create;\n        PFN_wl_egl_window_destroy window_destroy;\n        PFN_wl_egl_window_resize window_resize;\n    } egl;\n\n} _GLFWlibraryWayland;\n\n// Wayland-specific per-monitor data\n//\ntypedef struct _GLFWmonitorWayland\n{\n    struct wl_output*           output;\n    uint32_t                    name;\n    int                         currentMode;\n\n    int                         x;\n    int                         y;\n    int                         scale;\n\n} _GLFWmonitorWayland;\n\n// Wayland-specific per-cursor data\n//\ntypedef struct _GLFWcursorWayland\n{\n    struct wl_cursor*           cursor;\n    struct wl_cursor*           cursorHiDPI;\n    struct wl_buffer*           buffer;\n    int                         width, height;\n    int                         xhot, yhot;\n    int                         currentImage;\n} _GLFWcursorWayland;\n\n\nvoid _glfwAddOutputWayland(uint32_t name, uint32_t version);\n\n"
  },
  {
    "path": "thirdparty/glfw/src/wl_window.c",
    "content": "//========================================================================\n// GLFW 3.3 Wayland - www.glfw.org\n//------------------------------------------------------------------------\n// Copyright (c) 2014 Jonas Ådahl <jadahl@gmail.com>\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//    claim that you wrote the original software. If you use this software\n//    in a product, an acknowledgment in the product documentation would\n//    be appreciated but is not required.\n//\n// 2. Altered source versions must be plainly marked as such, and must not\n//    be misrepresented as being the original software.\n//\n// 3. This notice may not be removed or altered from any source\n//    distribution.\n//\n//========================================================================\n// It is fine to use C99 in this file because it will not be built with VS\n//========================================================================\n\n#define _GNU_SOURCE\n\n#include \"internal.h\"\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <errno.h>\n#include <unistd.h>\n#include <string.h>\n#include <fcntl.h>\n#include <sys/mman.h>\n#include <sys/timerfd.h>\n#include <poll.h>\n\n\nstatic void shellSurfaceHandlePing(void* data,\n                                   struct wl_shell_surface* shellSurface,\n                                   uint32_t serial)\n{\n    wl_shell_surface_pong(shellSurface, serial);\n}\n\nstatic void shellSurfaceHandleConfigure(void* data,\n                                        struct wl_shell_surface* shellSurface,\n                                        uint32_t edges,\n                                        int32_t width,\n                                        int32_t height)\n{\n    _GLFWwindow* window = data;\n    float aspectRatio;\n    float targetRatio;\n\n    if (!window->monitor)\n    {\n        if (_glfw.wl.viewporter && window->decorated)\n        {\n            width -= _GLFW_DECORATION_HORIZONTAL;\n            height -= _GLFW_DECORATION_VERTICAL;\n        }\n        if (width < 1)\n            width = 1;\n        if (height < 1)\n            height = 1;\n\n        if (window->numer != GLFW_DONT_CARE && window->denom != GLFW_DONT_CARE)\n        {\n            aspectRatio = (float)width / (float)height;\n            targetRatio = (float)window->numer / (float)window->denom;\n            if (aspectRatio < targetRatio)\n                height = width / targetRatio;\n            else if (aspectRatio > targetRatio)\n                width = height * targetRatio;\n        }\n\n        if (window->minwidth != GLFW_DONT_CARE && width < window->minwidth)\n            width = window->minwidth;\n        else if (window->maxwidth != GLFW_DONT_CARE && width > window->maxwidth)\n            width = window->maxwidth;\n\n        if (window->minheight != GLFW_DONT_CARE && height < window->minheight)\n            height = window->minheight;\n        else if (window->maxheight != GLFW_DONT_CARE && height > window->maxheight)\n            height = window->maxheight;\n    }\n\n    _glfwInputWindowSize(window, width, height);\n    _glfwPlatformSetWindowSize(window, width, height);\n    _glfwInputWindowDamage(window);\n}\n\nstatic void shellSurfaceHandlePopupDone(void* data,\n                                        struct wl_shell_surface* shellSurface)\n{\n}\n\nstatic const struct wl_shell_surface_listener shellSurfaceListener = {\n    shellSurfaceHandlePing,\n    shellSurfaceHandleConfigure,\n    shellSurfaceHandlePopupDone\n};\n\nstatic int createTmpfileCloexec(char* tmpname)\n{\n    int fd;\n\n    fd = mkostemp(tmpname, O_CLOEXEC);\n    if (fd >= 0)\n        unlink(tmpname);\n\n    return fd;\n}\n\n/*\n * Create a new, unique, anonymous file of the given size, and\n * return the file descriptor for it. The file descriptor is set\n * CLOEXEC. The file is immediately suitable for mmap()'ing\n * the given size at offset zero.\n *\n * The file should not have a permanent backing store like a disk,\n * but may have if XDG_RUNTIME_DIR is not properly implemented in OS.\n *\n * The file name is deleted from the file system.\n *\n * The file is suitable for buffer sharing between processes by\n * transmitting the file descriptor over Unix sockets using the\n * SCM_RIGHTS methods.\n *\n * posix_fallocate() is used to guarantee that disk space is available\n * for the file at the given size. If disk space is insufficient, errno\n * is set to ENOSPC. If posix_fallocate() is not supported, program may\n * receive SIGBUS on accessing mmap()'ed file contents instead.\n */\nstatic int createAnonymousFile(off_t size)\n{\n    static const char template[] = \"/glfw-shared-XXXXXX\";\n    const char* path;\n    char* name;\n    int fd;\n    int ret;\n\n#ifdef HAVE_MEMFD_CREATE\n    fd = memfd_create(\"glfw-shared\", MFD_CLOEXEC | MFD_ALLOW_SEALING);\n    if (fd >= 0)\n    {\n        // We can add this seal before calling posix_fallocate(), as the file\n        // is currently zero-sized anyway.\n        //\n        // There is also no need to check for the return value, we couldn’t do\n        // anything with it anyway.\n        fcntl(fd, F_ADD_SEALS, F_SEAL_SHRINK | F_SEAL_SEAL);\n    }\n    else\n#elif defined(SHM_ANON)\n    fd = shm_open(SHM_ANON, O_RDWR | O_CLOEXEC, 0600);\n    if (fd < 0)\n#endif\n    {\n        path = getenv(\"XDG_RUNTIME_DIR\");\n        if (!path)\n        {\n            errno = ENOENT;\n            return -1;\n        }\n\n        name = calloc(strlen(path) + sizeof(template), 1);\n        strcpy(name, path);\n        strcat(name, template);\n\n        fd = createTmpfileCloexec(name);\n        free(name);\n        if (fd < 0)\n            return -1;\n    }\n\n#if defined(SHM_ANON)\n    // posix_fallocate does not work on SHM descriptors\n    ret = ftruncate(fd, size);\n#else\n    ret = posix_fallocate(fd, 0, size);\n#endif\n    if (ret != 0)\n    {\n        close(fd);\n        errno = ret;\n        return -1;\n    }\n    return fd;\n}\n\nstatic struct wl_buffer* createShmBuffer(const GLFWimage* image)\n{\n    struct wl_shm_pool* pool;\n    struct wl_buffer* buffer;\n    int stride = image->width * 4;\n    int length = image->width * image->height * 4;\n    void* data;\n    int fd, i;\n\n    fd = createAnonymousFile(length);\n    if (fd < 0)\n    {\n        _glfwInputError(GLFW_PLATFORM_ERROR,\n                        \"Wayland: Creating a buffer file for %d B failed: %m\",\n                        length);\n        return NULL;\n    }\n\n    data = mmap(NULL, length, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);\n    if (data == MAP_FAILED)\n    {\n        _glfwInputError(GLFW_PLATFORM_ERROR,\n                        \"Wayland: mmap failed: %m\");\n        close(fd);\n        return NULL;\n    }\n\n    pool = wl_shm_create_pool(_glfw.wl.shm, fd, length);\n\n    close(fd);\n    unsigned char* source = (unsigned char*) image->pixels;\n    unsigned char* target = data;\n    for (i = 0;  i < image->width * image->height;  i++, source += 4)\n    {\n        unsigned int alpha = source[3];\n\n        *target++ = (unsigned char) ((source[2] * alpha) / 255);\n        *target++ = (unsigned char) ((source[1] * alpha) / 255);\n        *target++ = (unsigned char) ((source[0] * alpha) / 255);\n        *target++ = (unsigned char) alpha;\n    }\n\n    buffer =\n        wl_shm_pool_create_buffer(pool, 0,\n                                  image->width,\n                                  image->height,\n                                  stride, WL_SHM_FORMAT_ARGB8888);\n    munmap(data, length);\n    wl_shm_pool_destroy(pool);\n\n    return buffer;\n}\n\nstatic void createDecoration(_GLFWdecorationWayland* decoration,\n                             struct wl_surface* parent,\n                             struct wl_buffer* buffer, GLFWbool opaque,\n                             int x, int y,\n                             int width, int height)\n{\n    struct wl_region* region;\n\n    decoration->surface = wl_compositor_create_surface(_glfw.wl.compositor);\n    decoration->subsurface =\n        wl_subcompositor_get_subsurface(_glfw.wl.subcompositor,\n                                        decoration->surface, parent);\n    wl_subsurface_set_position(decoration->subsurface, x, y);\n    decoration->viewport = wp_viewporter_get_viewport(_glfw.wl.viewporter,\n                                                      decoration->surface);\n    wp_viewport_set_destination(decoration->viewport, width, height);\n    wl_surface_attach(decoration->surface, buffer, 0, 0);\n\n    if (opaque)\n    {\n        region = wl_compositor_create_region(_glfw.wl.compositor);\n        wl_region_add(region, 0, 0, width, height);\n        wl_surface_set_opaque_region(decoration->surface, region);\n        wl_surface_commit(decoration->surface);\n        wl_region_destroy(region);\n    }\n    else\n        wl_surface_commit(decoration->surface);\n}\n\nstatic void createDecorations(_GLFWwindow* window)\n{\n    unsigned char data[] = { 224, 224, 224, 255 };\n    const GLFWimage image = { 1, 1, data };\n    GLFWbool opaque = (data[3] == 255);\n\n    if (!_glfw.wl.viewporter || !window->decorated || window->wl.decorations.serverSide)\n        return;\n\n    if (!window->wl.decorations.buffer)\n        window->wl.decorations.buffer = createShmBuffer(&image);\n    if (!window->wl.decorations.buffer)\n        return;\n\n    createDecoration(&window->wl.decorations.top, window->wl.surface,\n                     window->wl.decorations.buffer, opaque,\n                     0, -_GLFW_DECORATION_TOP,\n                     window->wl.width, _GLFW_DECORATION_TOP);\n    createDecoration(&window->wl.decorations.left, window->wl.surface,\n                     window->wl.decorations.buffer, opaque,\n                     -_GLFW_DECORATION_WIDTH, -_GLFW_DECORATION_TOP,\n                     _GLFW_DECORATION_WIDTH, window->wl.height + _GLFW_DECORATION_TOP);\n    createDecoration(&window->wl.decorations.right, window->wl.surface,\n                     window->wl.decorations.buffer, opaque,\n                     window->wl.width, -_GLFW_DECORATION_TOP,\n                     _GLFW_DECORATION_WIDTH, window->wl.height + _GLFW_DECORATION_TOP);\n    createDecoration(&window->wl.decorations.bottom, window->wl.surface,\n                     window->wl.decorations.buffer, opaque,\n                     -_GLFW_DECORATION_WIDTH, window->wl.height,\n                     window->wl.width + _GLFW_DECORATION_HORIZONTAL, _GLFW_DECORATION_WIDTH);\n}\n\nstatic void destroyDecoration(_GLFWdecorationWayland* decoration)\n{\n    if (decoration->surface)\n        wl_surface_destroy(decoration->surface);\n    if (decoration->subsurface)\n        wl_subsurface_destroy(decoration->subsurface);\n    if (decoration->viewport)\n        wp_viewport_destroy(decoration->viewport);\n    decoration->surface = NULL;\n    decoration->subsurface = NULL;\n    decoration->viewport = NULL;\n}\n\nstatic void destroyDecorations(_GLFWwindow* window)\n{\n    destroyDecoration(&window->wl.decorations.top);\n    destroyDecoration(&window->wl.decorations.left);\n    destroyDecoration(&window->wl.decorations.right);\n    destroyDecoration(&window->wl.decorations.bottom);\n}\n\nstatic void xdgDecorationHandleConfigure(void* data,\n                                         struct zxdg_toplevel_decoration_v1* decoration,\n                                         uint32_t mode)\n{\n    _GLFWwindow* window = data;\n\n    window->wl.decorations.serverSide = (mode == ZXDG_TOPLEVEL_DECORATION_V1_MODE_SERVER_SIDE);\n\n    if (!window->wl.decorations.serverSide)\n        createDecorations(window);\n}\n\nstatic const struct zxdg_toplevel_decoration_v1_listener xdgDecorationListener = {\n    xdgDecorationHandleConfigure,\n};\n\n// Makes the surface considered as XRGB instead of ARGB.\nstatic void setOpaqueRegion(_GLFWwindow* window)\n{\n    struct wl_region* region;\n\n    region = wl_compositor_create_region(_glfw.wl.compositor);\n    if (!region)\n        return;\n\n    wl_region_add(region, 0, 0, window->wl.width, window->wl.height);\n    wl_surface_set_opaque_region(window->wl.surface, region);\n    wl_surface_commit(window->wl.surface);\n    wl_region_destroy(region);\n}\n\n\nstatic void resizeWindow(_GLFWwindow* window)\n{\n    int scale = window->wl.scale;\n    int scaledWidth = window->wl.width * scale;\n    int scaledHeight = window->wl.height * scale;\n    wl_egl_window_resize(window->wl.native, scaledWidth, scaledHeight, 0, 0);\n    if (!window->wl.transparent)\n        setOpaqueRegion(window);\n    _glfwInputFramebufferSize(window, scaledWidth, scaledHeight);\n    _glfwInputWindowContentScale(window, scale, scale);\n\n    if (!window->wl.decorations.top.surface)\n        return;\n\n    // Top decoration.\n    wp_viewport_set_destination(window->wl.decorations.top.viewport,\n                                window->wl.width, _GLFW_DECORATION_TOP);\n    wl_surface_commit(window->wl.decorations.top.surface);\n\n    // Left decoration.\n    wp_viewport_set_destination(window->wl.decorations.left.viewport,\n                                _GLFW_DECORATION_WIDTH, window->wl.height + _GLFW_DECORATION_TOP);\n    wl_surface_commit(window->wl.decorations.left.surface);\n\n    // Right decoration.\n    wl_subsurface_set_position(window->wl.decorations.right.subsurface,\n                               window->wl.width, -_GLFW_DECORATION_TOP);\n    wp_viewport_set_destination(window->wl.decorations.right.viewport,\n                                _GLFW_DECORATION_WIDTH, window->wl.height + _GLFW_DECORATION_TOP);\n    wl_surface_commit(window->wl.decorations.right.surface);\n\n    // Bottom decoration.\n    wl_subsurface_set_position(window->wl.decorations.bottom.subsurface,\n                               -_GLFW_DECORATION_WIDTH, window->wl.height);\n    wp_viewport_set_destination(window->wl.decorations.bottom.viewport,\n                                window->wl.width + _GLFW_DECORATION_HORIZONTAL, _GLFW_DECORATION_WIDTH);\n    wl_surface_commit(window->wl.decorations.bottom.surface);\n}\n\nstatic void checkScaleChange(_GLFWwindow* window)\n{\n    int scale = 1;\n    int i;\n    int monitorScale;\n\n    // Check if we will be able to set the buffer scale or not.\n    if (_glfw.wl.compositorVersion < 3)\n        return;\n\n    // Get the scale factor from the highest scale monitor.\n    for (i = 0; i < window->wl.monitorsCount; ++i)\n    {\n        monitorScale = window->wl.monitors[i]->wl.scale;\n        if (scale < monitorScale)\n            scale = monitorScale;\n    }\n\n    // Only change the framebuffer size if the scale changed.\n    if (scale != window->wl.scale)\n    {\n        window->wl.scale = scale;\n        wl_surface_set_buffer_scale(window->wl.surface, scale);\n        resizeWindow(window);\n    }\n}\n\nstatic void surfaceHandleEnter(void *data,\n                               struct wl_surface *surface,\n                               struct wl_output *output)\n{\n    _GLFWwindow* window = data;\n    _GLFWmonitor* monitor = wl_output_get_user_data(output);\n\n    if (window->wl.monitorsCount + 1 > window->wl.monitorsSize)\n    {\n        ++window->wl.monitorsSize;\n        window->wl.monitors =\n            realloc(window->wl.monitors,\n                    window->wl.monitorsSize * sizeof(_GLFWmonitor*));\n    }\n\n    window->wl.monitors[window->wl.monitorsCount++] = monitor;\n\n    checkScaleChange(window);\n}\n\nstatic void surfaceHandleLeave(void *data,\n                               struct wl_surface *surface,\n                               struct wl_output *output)\n{\n    _GLFWwindow* window = data;\n    _GLFWmonitor* monitor = wl_output_get_user_data(output);\n    GLFWbool found;\n    int i;\n\n    for (i = 0, found = GLFW_FALSE; i < window->wl.monitorsCount - 1; ++i)\n    {\n        if (monitor == window->wl.monitors[i])\n            found = GLFW_TRUE;\n        if (found)\n            window->wl.monitors[i] = window->wl.monitors[i + 1];\n    }\n    window->wl.monitors[--window->wl.monitorsCount] = NULL;\n\n    checkScaleChange(window);\n}\n\nstatic const struct wl_surface_listener surfaceListener = {\n    surfaceHandleEnter,\n    surfaceHandleLeave\n};\n\nstatic void setIdleInhibitor(_GLFWwindow* window, GLFWbool enable)\n{\n    if (enable && !window->wl.idleInhibitor && _glfw.wl.idleInhibitManager)\n    {\n        window->wl.idleInhibitor =\n            zwp_idle_inhibit_manager_v1_create_inhibitor(\n                _glfw.wl.idleInhibitManager, window->wl.surface);\n        if (!window->wl.idleInhibitor)\n            _glfwInputError(GLFW_PLATFORM_ERROR,\n                            \"Wayland: Idle inhibitor creation failed\");\n    }\n    else if (!enable && window->wl.idleInhibitor)\n    {\n        zwp_idle_inhibitor_v1_destroy(window->wl.idleInhibitor);\n        window->wl.idleInhibitor = NULL;\n    }\n}\n\nstatic GLFWbool createSurface(_GLFWwindow* window,\n                              const _GLFWwndconfig* wndconfig)\n{\n    window->wl.surface = wl_compositor_create_surface(_glfw.wl.compositor);\n    if (!window->wl.surface)\n        return GLFW_FALSE;\n\n    wl_surface_add_listener(window->wl.surface,\n                            &surfaceListener,\n                            window);\n\n    wl_surface_set_user_data(window->wl.surface, window);\n\n    window->wl.native = wl_egl_window_create(window->wl.surface,\n                                             wndconfig->width,\n                                             wndconfig->height);\n    if (!window->wl.native)\n        return GLFW_FALSE;\n\n    window->wl.width = wndconfig->width;\n    window->wl.height = wndconfig->height;\n    window->wl.scale = 1;\n\n    if (!window->wl.transparent)\n        setOpaqueRegion(window);\n\n    return GLFW_TRUE;\n}\n\nstatic void setFullscreen(_GLFWwindow* window, _GLFWmonitor* monitor,\n                          int refreshRate)\n{\n    if (window->wl.xdg.toplevel)\n    {\n        xdg_toplevel_set_fullscreen(\n            window->wl.xdg.toplevel,\n            monitor->wl.output);\n    }\n    else if (window->wl.shellSurface)\n    {\n        wl_shell_surface_set_fullscreen(\n            window->wl.shellSurface,\n            WL_SHELL_SURFACE_FULLSCREEN_METHOD_DEFAULT,\n            refreshRate * 1000, // Convert Hz to mHz.\n            monitor->wl.output);\n    }\n    setIdleInhibitor(window, GLFW_TRUE);\n    if (!window->wl.decorations.serverSide)\n        destroyDecorations(window);\n}\n\nstatic GLFWbool createShellSurface(_GLFWwindow* window)\n{\n    if (!_glfw.wl.shell)\n    {\n        _glfwInputError(GLFW_PLATFORM_ERROR,\n                        \"Wayland: wl_shell protocol not available\");\n        return GLFW_FALSE;\n    }\n\n    window->wl.shellSurface = wl_shell_get_shell_surface(_glfw.wl.shell,\n                                                         window->wl.surface);\n    if (!window->wl.shellSurface)\n    {\n        _glfwInputError(GLFW_PLATFORM_ERROR,\n                        \"Wayland: Shell surface creation failed\");\n        return GLFW_FALSE;\n    }\n\n    wl_shell_surface_add_listener(window->wl.shellSurface,\n                                  &shellSurfaceListener,\n                                  window);\n\n    if (window->wl.title)\n        wl_shell_surface_set_title(window->wl.shellSurface, window->wl.title);\n\n    if (window->monitor)\n    {\n        setFullscreen(window, window->monitor, 0);\n    }\n    else if (window->wl.maximized)\n    {\n        wl_shell_surface_set_maximized(window->wl.shellSurface, NULL);\n        setIdleInhibitor(window, GLFW_FALSE);\n        createDecorations(window);\n    }\n    else\n    {\n        wl_shell_surface_set_toplevel(window->wl.shellSurface);\n        setIdleInhibitor(window, GLFW_FALSE);\n        createDecorations(window);\n    }\n\n    wl_surface_commit(window->wl.surface);\n\n    return GLFW_TRUE;\n}\n\nstatic void xdgToplevelHandleConfigure(void* data,\n                                       struct xdg_toplevel* toplevel,\n                                       int32_t width,\n                                       int32_t height,\n                                       struct wl_array* states)\n{\n    _GLFWwindow* window = data;\n    float aspectRatio;\n    float targetRatio;\n    uint32_t* state;\n    GLFWbool maximized = GLFW_FALSE;\n    GLFWbool fullscreen = GLFW_FALSE;\n    GLFWbool activated = GLFW_FALSE;\n\n    wl_array_for_each(state, states)\n    {\n        switch (*state)\n        {\n            case XDG_TOPLEVEL_STATE_MAXIMIZED:\n                maximized = GLFW_TRUE;\n                break;\n            case XDG_TOPLEVEL_STATE_FULLSCREEN:\n                fullscreen = GLFW_TRUE;\n                break;\n            case XDG_TOPLEVEL_STATE_RESIZING:\n                break;\n            case XDG_TOPLEVEL_STATE_ACTIVATED:\n                activated = GLFW_TRUE;\n                break;\n        }\n    }\n\n    if (width != 0 && height != 0)\n    {\n        if (!maximized && !fullscreen)\n        {\n            if (window->numer != GLFW_DONT_CARE && window->denom != GLFW_DONT_CARE)\n            {\n                aspectRatio = (float)width / (float)height;\n                targetRatio = (float)window->numer / (float)window->denom;\n                if (aspectRatio < targetRatio)\n                    height = width / targetRatio;\n                else if (aspectRatio > targetRatio)\n                    width = height * targetRatio;\n            }\n        }\n\n        _glfwInputWindowSize(window, width, height);\n        _glfwPlatformSetWindowSize(window, width, height);\n        _glfwInputWindowDamage(window);\n    }\n\n    if (window->wl.wasFullscreen && window->autoIconify)\n    {\n        if (!activated || !fullscreen)\n        {\n            _glfwPlatformIconifyWindow(window);\n            window->wl.wasFullscreen = GLFW_FALSE;\n        }\n    }\n    if (fullscreen && activated)\n        window->wl.wasFullscreen = GLFW_TRUE;\n    _glfwInputWindowFocus(window, activated);\n}\n\nstatic void xdgToplevelHandleClose(void* data,\n                                   struct xdg_toplevel* toplevel)\n{\n    _GLFWwindow* window = data;\n    _glfwInputWindowCloseRequest(window);\n}\n\nstatic const struct xdg_toplevel_listener xdgToplevelListener = {\n    xdgToplevelHandleConfigure,\n    xdgToplevelHandleClose\n};\n\nstatic void xdgSurfaceHandleConfigure(void* data,\n                                      struct xdg_surface* surface,\n                                      uint32_t serial)\n{\n    xdg_surface_ack_configure(surface, serial);\n}\n\nstatic const struct xdg_surface_listener xdgSurfaceListener = {\n    xdgSurfaceHandleConfigure\n};\n\nstatic void setXdgDecorations(_GLFWwindow* window)\n{\n    if (_glfw.wl.decorationManager)\n    {\n        window->wl.xdg.decoration =\n            zxdg_decoration_manager_v1_get_toplevel_decoration(\n                _glfw.wl.decorationManager, window->wl.xdg.toplevel);\n        zxdg_toplevel_decoration_v1_add_listener(window->wl.xdg.decoration,\n                                                 &xdgDecorationListener,\n                                                 window);\n        zxdg_toplevel_decoration_v1_set_mode(\n            window->wl.xdg.decoration,\n            ZXDG_TOPLEVEL_DECORATION_V1_MODE_SERVER_SIDE);\n    }\n    else\n    {\n        window->wl.decorations.serverSide = GLFW_FALSE;\n        createDecorations(window);\n    }\n}\n\nstatic GLFWbool createXdgSurface(_GLFWwindow* window)\n{\n    window->wl.xdg.surface = xdg_wm_base_get_xdg_surface(_glfw.wl.wmBase,\n                                                         window->wl.surface);\n    if (!window->wl.xdg.surface)\n    {\n        _glfwInputError(GLFW_PLATFORM_ERROR,\n                        \"Wayland: xdg-surface creation failed\");\n        return GLFW_FALSE;\n    }\n\n    xdg_surface_add_listener(window->wl.xdg.surface,\n                             &xdgSurfaceListener,\n                             window);\n\n    window->wl.xdg.toplevel = xdg_surface_get_toplevel(window->wl.xdg.surface);\n    if (!window->wl.xdg.toplevel)\n    {\n        _glfwInputError(GLFW_PLATFORM_ERROR,\n                        \"Wayland: xdg-toplevel creation failed\");\n        return GLFW_FALSE;\n    }\n\n    xdg_toplevel_add_listener(window->wl.xdg.toplevel,\n                              &xdgToplevelListener,\n                              window);\n\n    if (window->wl.title)\n        xdg_toplevel_set_title(window->wl.xdg.toplevel, window->wl.title);\n\n    if (window->minwidth != GLFW_DONT_CARE && window->minheight != GLFW_DONT_CARE)\n        xdg_toplevel_set_min_size(window->wl.xdg.toplevel,\n                                  window->minwidth, window->minheight);\n    if (window->maxwidth != GLFW_DONT_CARE && window->maxheight != GLFW_DONT_CARE)\n        xdg_toplevel_set_max_size(window->wl.xdg.toplevel,\n                                  window->maxwidth, window->maxheight);\n\n    if (window->monitor)\n    {\n        xdg_toplevel_set_fullscreen(window->wl.xdg.toplevel,\n                                    window->monitor->wl.output);\n        setIdleInhibitor(window, GLFW_TRUE);\n    }\n    else if (window->wl.maximized)\n    {\n        xdg_toplevel_set_maximized(window->wl.xdg.toplevel);\n        setIdleInhibitor(window, GLFW_FALSE);\n        setXdgDecorations(window);\n    }\n    else\n    {\n        setIdleInhibitor(window, GLFW_FALSE);\n        setXdgDecorations(window);\n    }\n\n    wl_surface_commit(window->wl.surface);\n    wl_display_roundtrip(_glfw.wl.display);\n\n    return GLFW_TRUE;\n}\n\nstatic void setCursorImage(_GLFWwindow* window,\n                           _GLFWcursorWayland* cursorWayland)\n{\n    struct itimerspec timer = {};\n    struct wl_cursor* wlCursor = cursorWayland->cursor;\n    struct wl_cursor_image* image;\n    struct wl_buffer* buffer;\n    struct wl_surface* surface = _glfw.wl.cursorSurface;\n    int scale = 1;\n\n    if (!wlCursor)\n        buffer = cursorWayland->buffer;\n    else\n    {\n        if (window->wl.scale > 1 && cursorWayland->cursorHiDPI)\n        {\n            wlCursor = cursorWayland->cursorHiDPI;\n            scale = 2;\n        }\n\n        image = wlCursor->images[cursorWayland->currentImage];\n        buffer = wl_cursor_image_get_buffer(image);\n        if (!buffer)\n            return;\n\n        timer.it_value.tv_sec = image->delay / 1000;\n        timer.it_value.tv_nsec = (image->delay % 1000) * 1000000;\n        timerfd_settime(_glfw.wl.cursorTimerfd, 0, &timer, NULL);\n\n        cursorWayland->width = image->width;\n        cursorWayland->height = image->height;\n        cursorWayland->xhot = image->hotspot_x;\n        cursorWayland->yhot = image->hotspot_y;\n    }\n\n    wl_pointer_set_cursor(_glfw.wl.pointer, _glfw.wl.serial,\n                          surface,\n                          cursorWayland->xhot / scale,\n                          cursorWayland->yhot / scale);\n    wl_surface_set_buffer_scale(surface, scale);\n    wl_surface_attach(surface, buffer, 0, 0);\n    wl_surface_damage(surface, 0, 0,\n                      cursorWayland->width, cursorWayland->height);\n    wl_surface_commit(surface);\n}\n\nstatic void incrementCursorImage(_GLFWwindow* window)\n{\n    _GLFWcursor* cursor;\n\n    if (!window || window->wl.decorations.focus != mainWindow)\n        return;\n\n    cursor = window->wl.currentCursor;\n    if (cursor && cursor->wl.cursor)\n    {\n        cursor->wl.currentImage += 1;\n        cursor->wl.currentImage %= cursor->wl.cursor->image_count;\n        setCursorImage(window, &cursor->wl);\n    }\n}\n\nstatic void handleEvents(int timeout)\n{\n    struct wl_display* display = _glfw.wl.display;\n    struct pollfd fds[] = {\n        { wl_display_get_fd(display), POLLIN },\n        { _glfw.wl.timerfd, POLLIN },\n        { _glfw.wl.cursorTimerfd, POLLIN },\n    };\n    ssize_t read_ret;\n    uint64_t repeats, i;\n\n    while (wl_display_prepare_read(display) != 0)\n        wl_display_dispatch_pending(display);\n\n    // If an error different from EAGAIN happens, we have likely been\n    // disconnected from the Wayland session, try to handle that the best we\n    // can.\n    if (wl_display_flush(display) < 0 && errno != EAGAIN)\n    {\n        _GLFWwindow* window = _glfw.windowListHead;\n        while (window)\n        {\n            _glfwInputWindowCloseRequest(window);\n            window = window->next;\n        }\n        wl_display_cancel_read(display);\n        return;\n    }\n\n    if (poll(fds, 3, timeout) > 0)\n    {\n        if (fds[0].revents & POLLIN)\n        {\n            wl_display_read_events(display);\n            wl_display_dispatch_pending(display);\n        }\n        else\n        {\n            wl_display_cancel_read(display);\n        }\n\n        if (fds[1].revents & POLLIN)\n        {\n            read_ret = read(_glfw.wl.timerfd, &repeats, sizeof(repeats));\n            if (read_ret != 8)\n                return;\n\n            for (i = 0; i < repeats; ++i)\n                _glfwInputKey(_glfw.wl.keyboardFocus, _glfw.wl.keyboardLastKey,\n                              _glfw.wl.keyboardLastScancode, GLFW_REPEAT,\n                              _glfw.wl.xkb.modifiers);\n        }\n\n        if (fds[2].revents & POLLIN)\n        {\n            read_ret = read(_glfw.wl.cursorTimerfd, &repeats, sizeof(repeats));\n            if (read_ret != 8)\n                return;\n\n            incrementCursorImage(_glfw.wl.pointerFocus);\n        }\n    }\n    else\n    {\n        wl_display_cancel_read(display);\n    }\n}\n\n// Translates a GLFW standard cursor to a theme cursor name\n//\nstatic char *translateCursorShape(int shape)\n{\n    switch (shape)\n    {\n        case GLFW_ARROW_CURSOR:\n            return \"left_ptr\";\n        case GLFW_IBEAM_CURSOR:\n            return \"xterm\";\n        case GLFW_CROSSHAIR_CURSOR:\n            return \"crosshair\";\n        case GLFW_HAND_CURSOR:\n            return \"hand2\";\n        case GLFW_HRESIZE_CURSOR:\n            return \"sb_h_double_arrow\";\n        case GLFW_VRESIZE_CURSOR:\n            return \"sb_v_double_arrow\";\n    }\n    return NULL;\n}\n\n//////////////////////////////////////////////////////////////////////////\n//////                       GLFW platform API                      //////\n//////////////////////////////////////////////////////////////////////////\n\nint _glfwPlatformCreateWindow(_GLFWwindow* window,\n                              const _GLFWwndconfig* wndconfig,\n                              const _GLFWctxconfig* ctxconfig,\n                              const _GLFWfbconfig* fbconfig)\n{\n    window->wl.transparent = fbconfig->transparent;\n\n    if (!createSurface(window, wndconfig))\n        return GLFW_FALSE;\n\n    if (ctxconfig->client != GLFW_NO_API)\n    {\n        if (ctxconfig->source == GLFW_EGL_CONTEXT_API ||\n            ctxconfig->source == GLFW_NATIVE_CONTEXT_API)\n        {\n            if (!_glfwInitEGL())\n                return GLFW_FALSE;\n            if (!_glfwCreateContextEGL(window, ctxconfig, fbconfig))\n                return GLFW_FALSE;\n        }\n        else if (ctxconfig->source == GLFW_OSMESA_CONTEXT_API)\n        {\n            if (!_glfwInitOSMesa())\n                return GLFW_FALSE;\n            if (!_glfwCreateContextOSMesa(window, ctxconfig, fbconfig))\n                return GLFW_FALSE;\n        }\n    }\n\n    if (wndconfig->title)\n        window->wl.title = _glfw_strdup(wndconfig->title);\n\n    if (wndconfig->visible)\n    {\n        if (_glfw.wl.wmBase)\n        {\n            if (!createXdgSurface(window))\n                return GLFW_FALSE;\n        }\n        else\n        {\n            if (!createShellSurface(window))\n                return GLFW_FALSE;\n        }\n\n        window->wl.visible = GLFW_TRUE;\n    }\n    else\n    {\n        window->wl.xdg.surface = NULL;\n        window->wl.xdg.toplevel = NULL;\n        window->wl.shellSurface = NULL;\n        window->wl.visible = GLFW_FALSE;\n    }\n\n    window->wl.currentCursor = NULL;\n\n    window->wl.monitors = calloc(1, sizeof(_GLFWmonitor*));\n    window->wl.monitorsCount = 0;\n    window->wl.monitorsSize = 1;\n\n    return GLFW_TRUE;\n}\n\nvoid _glfwPlatformDestroyWindow(_GLFWwindow* window)\n{\n    if (window == _glfw.wl.pointerFocus)\n    {\n        _glfw.wl.pointerFocus = NULL;\n        _glfwInputCursorEnter(window, GLFW_FALSE);\n    }\n    if (window == _glfw.wl.keyboardFocus)\n    {\n        _glfw.wl.keyboardFocus = NULL;\n        _glfwInputWindowFocus(window, GLFW_FALSE);\n    }\n\n    if (window->wl.idleInhibitor)\n        zwp_idle_inhibitor_v1_destroy(window->wl.idleInhibitor);\n\n    if (window->context.destroy)\n        window->context.destroy(window);\n\n    destroyDecorations(window);\n    if (window->wl.xdg.decoration)\n        zxdg_toplevel_decoration_v1_destroy(window->wl.xdg.decoration);\n\n    if (window->wl.decorations.buffer)\n        wl_buffer_destroy(window->wl.decorations.buffer);\n\n    if (window->wl.native)\n        wl_egl_window_destroy(window->wl.native);\n\n    if (window->wl.shellSurface)\n        wl_shell_surface_destroy(window->wl.shellSurface);\n\n    if (window->wl.xdg.toplevel)\n        xdg_toplevel_destroy(window->wl.xdg.toplevel);\n\n    if (window->wl.xdg.surface)\n        xdg_surface_destroy(window->wl.xdg.surface);\n\n    if (window->wl.surface)\n        wl_surface_destroy(window->wl.surface);\n\n    free(window->wl.title);\n    free(window->wl.monitors);\n}\n\nvoid _glfwPlatformSetWindowTitle(_GLFWwindow* window, const char* title)\n{\n    if (window->wl.title)\n        free(window->wl.title);\n    window->wl.title = _glfw_strdup(title);\n    if (window->wl.xdg.toplevel)\n        xdg_toplevel_set_title(window->wl.xdg.toplevel, title);\n    else if (window->wl.shellSurface)\n        wl_shell_surface_set_title(window->wl.shellSurface, title);\n}\n\nvoid _glfwPlatformSetWindowIcon(_GLFWwindow* window,\n                                int count, const GLFWimage* images)\n{\n    _glfwInputError(GLFW_PLATFORM_ERROR,\n                    \"Wayland: Setting window icon not supported\");\n}\n\nvoid _glfwPlatformGetWindowPos(_GLFWwindow* window, int* xpos, int* ypos)\n{\n    // A Wayland client is not aware of its position, so just warn and leave it\n    // as (0, 0)\n\n    _glfwInputError(GLFW_PLATFORM_ERROR,\n                    \"Wayland: Window position retrieval not supported\");\n}\n\nvoid _glfwPlatformSetWindowPos(_GLFWwindow* window, int xpos, int ypos)\n{\n    // A Wayland client can not set its position, so just warn\n\n    _glfwInputError(GLFW_PLATFORM_ERROR,\n                    \"Wayland: Window position setting not supported\");\n}\n\nvoid _glfwPlatformGetWindowSize(_GLFWwindow* window, int* width, int* height)\n{\n    if (width)\n        *width = window->wl.width;\n    if (height)\n        *height = window->wl.height;\n}\n\nvoid _glfwPlatformSetWindowSize(_GLFWwindow* window, int width, int height)\n{\n    window->wl.width = width;\n    window->wl.height = height;\n    resizeWindow(window);\n}\n\nvoid _glfwPlatformSetWindowSizeLimits(_GLFWwindow* window,\n                                      int minwidth, int minheight,\n                                      int maxwidth, int maxheight)\n{\n    if (_glfw.wl.wmBase)\n    {\n        if (window->wl.xdg.toplevel)\n        {\n            if (minwidth == GLFW_DONT_CARE || minheight == GLFW_DONT_CARE)\n                minwidth = minheight = 0;\n            if (maxwidth == GLFW_DONT_CARE || maxheight == GLFW_DONT_CARE)\n                maxwidth = maxheight = 0;\n            xdg_toplevel_set_min_size(window->wl.xdg.toplevel, minwidth, minheight);\n            xdg_toplevel_set_max_size(window->wl.xdg.toplevel, maxwidth, maxheight);\n            wl_surface_commit(window->wl.surface);\n        }\n    }\n    else\n    {\n        // TODO: find out how to trigger a resize.\n        // The actual limits are checked in the wl_shell_surface::configure handler.\n    }\n}\n\nvoid _glfwPlatformSetWindowAspectRatio(_GLFWwindow* window,\n                                       int numer, int denom)\n{\n    // TODO: find out how to trigger a resize.\n    // The actual limits are checked in the wl_shell_surface::configure handler.\n}\n\nvoid _glfwPlatformGetFramebufferSize(_GLFWwindow* window,\n                                     int* width, int* height)\n{\n    _glfwPlatformGetWindowSize(window, width, height);\n    *width *= window->wl.scale;\n    *height *= window->wl.scale;\n}\n\nvoid _glfwPlatformGetWindowFrameSize(_GLFWwindow* window,\n                                     int* left, int* top,\n                                     int* right, int* bottom)\n{\n    if (window->decorated && !window->monitor && !window->wl.decorations.serverSide)\n    {\n        if (top)\n            *top = _GLFW_DECORATION_TOP;\n        if (left)\n            *left = _GLFW_DECORATION_WIDTH;\n        if (right)\n            *right = _GLFW_DECORATION_WIDTH;\n        if (bottom)\n            *bottom = _GLFW_DECORATION_WIDTH;\n    }\n}\n\nvoid _glfwPlatformGetWindowContentScale(_GLFWwindow* window,\n                                        float* xscale, float* yscale)\n{\n    if (xscale)\n        *xscale = (float) window->wl.scale;\n    if (yscale)\n        *yscale = (float) window->wl.scale;\n}\n\nvoid _glfwPlatformIconifyWindow(_GLFWwindow* window)\n{\n    if (_glfw.wl.wmBase)\n    {\n        if (window->wl.xdg.toplevel)\n            xdg_toplevel_set_minimized(window->wl.xdg.toplevel);\n    }\n    else\n    {\n        _glfwInputError(GLFW_PLATFORM_ERROR,\n                        \"Wayland: Iconify window not supported on wl_shell\");\n    }\n}\n\nvoid _glfwPlatformRestoreWindow(_GLFWwindow* window)\n{\n    if (window->wl.xdg.toplevel)\n    {\n        if (window->monitor)\n            xdg_toplevel_unset_fullscreen(window->wl.xdg.toplevel);\n        if (window->wl.maximized)\n            xdg_toplevel_unset_maximized(window->wl.xdg.toplevel);\n        // There is no way to unset minimized, or even to know if we are\n        // minimized, so there is nothing to do here.\n    }\n    else if (window->wl.shellSurface)\n    {\n        if (window->monitor || window->wl.maximized)\n            wl_shell_surface_set_toplevel(window->wl.shellSurface);\n    }\n    _glfwInputWindowMonitor(window, NULL);\n    window->wl.maximized = GLFW_FALSE;\n}\n\nvoid _glfwPlatformMaximizeWindow(_GLFWwindow* window)\n{\n    if (window->wl.xdg.toplevel)\n    {\n        xdg_toplevel_set_maximized(window->wl.xdg.toplevel);\n    }\n    else if (window->wl.shellSurface)\n    {\n        // Let the compositor select the best output.\n        wl_shell_surface_set_maximized(window->wl.shellSurface, NULL);\n    }\n    window->wl.maximized = GLFW_TRUE;\n}\n\nvoid _glfwPlatformShowWindow(_GLFWwindow* window)\n{\n    if (!window->wl.visible)\n    {\n        if (_glfw.wl.wmBase)\n            createXdgSurface(window);\n        else if (!window->wl.shellSurface)\n            createShellSurface(window);\n        window->wl.visible = GLFW_TRUE;\n    }\n}\n\nvoid _glfwPlatformHideWindow(_GLFWwindow* window)\n{\n    if (window->wl.xdg.toplevel)\n    {\n        xdg_toplevel_destroy(window->wl.xdg.toplevel);\n        xdg_surface_destroy(window->wl.xdg.surface);\n        window->wl.xdg.toplevel = NULL;\n        window->wl.xdg.surface = NULL;\n    }\n    else if (window->wl.shellSurface)\n    {\n        wl_shell_surface_destroy(window->wl.shellSurface);\n        window->wl.shellSurface = NULL;\n    }\n    window->wl.visible = GLFW_FALSE;\n}\n\nvoid _glfwPlatformRequestWindowAttention(_GLFWwindow* window)\n{\n    // TODO\n    _glfwInputError(GLFW_PLATFORM_ERROR,\n                    \"Wayland: Window attention request not implemented yet\");\n}\n\nvoid _glfwPlatformFocusWindow(_GLFWwindow* window)\n{\n    _glfwInputError(GLFW_PLATFORM_ERROR,\n                    \"Wayland: Focusing a window requires user interaction\");\n}\n\nvoid _glfwPlatformSetWindowMonitor(_GLFWwindow* window,\n                                   _GLFWmonitor* monitor,\n                                   int xpos, int ypos,\n                                   int width, int height,\n                                   int refreshRate)\n{\n    if (monitor)\n    {\n        setFullscreen(window, monitor, refreshRate);\n    }\n    else\n    {\n        if (window->wl.xdg.toplevel)\n            xdg_toplevel_unset_fullscreen(window->wl.xdg.toplevel);\n        else if (window->wl.shellSurface)\n            wl_shell_surface_set_toplevel(window->wl.shellSurface);\n        setIdleInhibitor(window, GLFW_FALSE);\n        if (!_glfw.wl.decorationManager)\n            createDecorations(window);\n    }\n    _glfwInputWindowMonitor(window, monitor);\n}\n\nint _glfwPlatformWindowFocused(_GLFWwindow* window)\n{\n    return _glfw.wl.keyboardFocus == window;\n}\n\nint _glfwPlatformWindowIconified(_GLFWwindow* window)\n{\n    // wl_shell doesn't have any iconified concept, and xdg-shell doesn’t give\n    // any way to request whether a surface is iconified.\n    return GLFW_FALSE;\n}\n\nint _glfwPlatformWindowVisible(_GLFWwindow* window)\n{\n    return window->wl.visible;\n}\n\nint _glfwPlatformWindowMaximized(_GLFWwindow* window)\n{\n    return window->wl.maximized;\n}\n\nint _glfwPlatformWindowHovered(_GLFWwindow* window)\n{\n    return window->wl.hovered;\n}\n\nint _glfwPlatformFramebufferTransparent(_GLFWwindow* window)\n{\n    return window->wl.transparent;\n}\n\nvoid _glfwPlatformSetWindowResizable(_GLFWwindow* window, GLFWbool enabled)\n{\n    // TODO\n    _glfwInputError(GLFW_PLATFORM_ERROR,\n                    \"Wayland: Window attribute setting not implemented yet\");\n}\n\nvoid _glfwPlatformSetWindowDecorated(_GLFWwindow* window, GLFWbool enabled)\n{\n    if (!window->monitor)\n    {\n        if (enabled)\n            createDecorations(window);\n        else\n            destroyDecorations(window);\n    }\n}\n\nvoid _glfwPlatformSetWindowFloating(_GLFWwindow* window, GLFWbool enabled)\n{\n    // TODO\n    _glfwInputError(GLFW_PLATFORM_ERROR,\n                    \"Wayland: Window attribute setting not implemented yet\");\n}\n\nfloat _glfwPlatformGetWindowOpacity(_GLFWwindow* window)\n{\n    return 1.f;\n}\n\nvoid _glfwPlatformSetWindowOpacity(_GLFWwindow* window, float opacity)\n{\n}\n\nvoid _glfwPlatformSetRawMouseMotion(_GLFWwindow *window, GLFWbool enabled)\n{\n    // This is handled in relativePointerHandleRelativeMotion\n}\n\nGLFWbool _glfwPlatformRawMouseMotionSupported(void)\n{\n    return GLFW_TRUE;\n}\n\nvoid _glfwPlatformPollEvents(void)\n{\n    handleEvents(0);\n}\n\nvoid _glfwPlatformWaitEvents(void)\n{\n    handleEvents(-1);\n}\n\nvoid _glfwPlatformWaitEventsTimeout(double timeout)\n{\n    handleEvents((int) (timeout * 1e3));\n}\n\nvoid _glfwPlatformPostEmptyEvent(void)\n{\n    wl_display_sync(_glfw.wl.display);\n}\n\nvoid _glfwPlatformGetCursorPos(_GLFWwindow* window, double* xpos, double* ypos)\n{\n    if (xpos)\n        *xpos = window->wl.cursorPosX;\n    if (ypos)\n        *ypos = window->wl.cursorPosY;\n}\n\nstatic GLFWbool isPointerLocked(_GLFWwindow* window);\n\nvoid _glfwPlatformSetCursorPos(_GLFWwindow* window, double x, double y)\n{\n    if (isPointerLocked(window))\n    {\n        zwp_locked_pointer_v1_set_cursor_position_hint(\n            window->wl.pointerLock.lockedPointer,\n            wl_fixed_from_double(x), wl_fixed_from_double(y));\n        wl_surface_commit(window->wl.surface);\n    }\n}\n\nvoid _glfwPlatformSetCursorMode(_GLFWwindow* window, int mode)\n{\n    _glfwPlatformSetCursor(window, window->wl.currentCursor);\n}\n\nconst char* _glfwPlatformGetScancodeName(int scancode)\n{\n    // TODO\n    return NULL;\n}\n\nint _glfwPlatformGetKeyScancode(int key)\n{\n    return _glfw.wl.scancodes[key];\n}\n\nint _glfwPlatformCreateCursor(_GLFWcursor* cursor,\n                              const GLFWimage* image,\n                              int xhot, int yhot)\n{\n    cursor->wl.buffer = createShmBuffer(image);\n    if (!cursor->wl.buffer)\n        return GLFW_FALSE;\n\n    cursor->wl.width = image->width;\n    cursor->wl.height = image->height;\n    cursor->wl.xhot = xhot;\n    cursor->wl.yhot = yhot;\n    return GLFW_TRUE;\n}\n\nint _glfwPlatformCreateStandardCursor(_GLFWcursor* cursor, int shape)\n{\n    struct wl_cursor* standardCursor;\n\n    standardCursor = wl_cursor_theme_get_cursor(_glfw.wl.cursorTheme,\n                                                translateCursorShape(shape));\n    if (!standardCursor)\n    {\n        _glfwInputError(GLFW_PLATFORM_ERROR,\n                        \"Wayland: Standard cursor \\\"%s\\\" not found\",\n                        translateCursorShape(shape));\n        return GLFW_FALSE;\n    }\n\n    cursor->wl.cursor = standardCursor;\n    cursor->wl.currentImage = 0;\n\n    if (_glfw.wl.cursorThemeHiDPI)\n    {\n        standardCursor = wl_cursor_theme_get_cursor(_glfw.wl.cursorThemeHiDPI,\n                                                    translateCursorShape(shape));\n        cursor->wl.cursorHiDPI = standardCursor;\n    }\n\n    return GLFW_TRUE;\n}\n\nvoid _glfwPlatformDestroyCursor(_GLFWcursor* cursor)\n{\n    // If it's a standard cursor we don't need to do anything here\n    if (cursor->wl.cursor)\n        return;\n\n    if (cursor->wl.buffer)\n        wl_buffer_destroy(cursor->wl.buffer);\n}\n\nstatic void relativePointerHandleRelativeMotion(void* data,\n                                                struct zwp_relative_pointer_v1* pointer,\n                                                uint32_t timeHi,\n                                                uint32_t timeLo,\n                                                wl_fixed_t dx,\n                                                wl_fixed_t dy,\n                                                wl_fixed_t dxUnaccel,\n                                                wl_fixed_t dyUnaccel)\n{\n    _GLFWwindow* window = data;\n    double xpos = window->virtualCursorPosX;\n    double ypos = window->virtualCursorPosY;\n\n    if (window->cursorMode != GLFW_CURSOR_DISABLED)\n        return;\n\n    if (window->rawMouseMotion)\n    {\n        xpos += wl_fixed_to_double(dxUnaccel);\n        ypos += wl_fixed_to_double(dyUnaccel);\n    }\n    else\n    {\n        xpos += wl_fixed_to_double(dx);\n        ypos += wl_fixed_to_double(dy);\n    }\n\n    _glfwInputCursorPos(window, xpos, ypos);\n}\n\nstatic const struct zwp_relative_pointer_v1_listener relativePointerListener = {\n    relativePointerHandleRelativeMotion\n};\n\nstatic void lockedPointerHandleLocked(void* data,\n                                      struct zwp_locked_pointer_v1* lockedPointer)\n{\n}\n\nstatic void unlockPointer(_GLFWwindow* window)\n{\n    struct zwp_relative_pointer_v1* relativePointer =\n        window->wl.pointerLock.relativePointer;\n    struct zwp_locked_pointer_v1* lockedPointer =\n        window->wl.pointerLock.lockedPointer;\n\n    zwp_relative_pointer_v1_destroy(relativePointer);\n    zwp_locked_pointer_v1_destroy(lockedPointer);\n\n    window->wl.pointerLock.relativePointer = NULL;\n    window->wl.pointerLock.lockedPointer = NULL;\n}\n\nstatic void lockPointer(_GLFWwindow* window);\n\nstatic void lockedPointerHandleUnlocked(void* data,\n                                        struct zwp_locked_pointer_v1* lockedPointer)\n{\n}\n\nstatic const struct zwp_locked_pointer_v1_listener lockedPointerListener = {\n    lockedPointerHandleLocked,\n    lockedPointerHandleUnlocked\n};\n\nstatic void lockPointer(_GLFWwindow* window)\n{\n    struct zwp_relative_pointer_v1* relativePointer;\n    struct zwp_locked_pointer_v1* lockedPointer;\n\n    if (!_glfw.wl.relativePointerManager)\n    {\n        _glfwInputError(GLFW_PLATFORM_ERROR,\n                        \"Wayland: no relative pointer manager\");\n        return;\n    }\n\n    relativePointer =\n        zwp_relative_pointer_manager_v1_get_relative_pointer(\n            _glfw.wl.relativePointerManager,\n            _glfw.wl.pointer);\n    zwp_relative_pointer_v1_add_listener(relativePointer,\n                                         &relativePointerListener,\n                                         window);\n\n    lockedPointer =\n        zwp_pointer_constraints_v1_lock_pointer(\n            _glfw.wl.pointerConstraints,\n            window->wl.surface,\n            _glfw.wl.pointer,\n            NULL,\n            ZWP_POINTER_CONSTRAINTS_V1_LIFETIME_PERSISTENT);\n    zwp_locked_pointer_v1_add_listener(lockedPointer,\n                                       &lockedPointerListener,\n                                       window);\n\n    window->wl.pointerLock.relativePointer = relativePointer;\n    window->wl.pointerLock.lockedPointer = lockedPointer;\n\n    wl_pointer_set_cursor(_glfw.wl.pointer, _glfw.wl.serial,\n                          NULL, 0, 0);\n}\n\nstatic GLFWbool isPointerLocked(_GLFWwindow* window)\n{\n    return window->wl.pointerLock.lockedPointer != NULL;\n}\n\nvoid _glfwPlatformSetCursor(_GLFWwindow* window, _GLFWcursor* cursor)\n{\n    struct wl_cursor* defaultCursor;\n    struct wl_cursor* defaultCursorHiDPI = NULL;\n\n    if (!_glfw.wl.pointer)\n        return;\n\n    window->wl.currentCursor = cursor;\n\n    // If we're not in the correct window just save the cursor\n    // the next time the pointer enters the window the cursor will change\n    if (window != _glfw.wl.pointerFocus || window->wl.decorations.focus != mainWindow)\n        return;\n\n    // Unlock possible pointer lock if no longer disabled.\n    if (window->cursorMode != GLFW_CURSOR_DISABLED && isPointerLocked(window))\n        unlockPointer(window);\n\n    if (window->cursorMode == GLFW_CURSOR_NORMAL)\n    {\n        if (cursor)\n            setCursorImage(window, &cursor->wl);\n        else\n        {\n            defaultCursor = wl_cursor_theme_get_cursor(_glfw.wl.cursorTheme,\n                                                       \"left_ptr\");\n            if (!defaultCursor)\n            {\n                _glfwInputError(GLFW_PLATFORM_ERROR,\n                                \"Wayland: Standard cursor not found\");\n                return;\n            }\n            if (_glfw.wl.cursorThemeHiDPI)\n                defaultCursorHiDPI =\n                    wl_cursor_theme_get_cursor(_glfw.wl.cursorThemeHiDPI,\n                                               \"left_ptr\");\n            _GLFWcursorWayland cursorWayland = {\n                defaultCursor,\n                defaultCursorHiDPI,\n                NULL,\n                0, 0,\n                0, 0,\n                0\n            };\n            setCursorImage(window, &cursorWayland);\n        }\n    }\n    else if (window->cursorMode == GLFW_CURSOR_DISABLED)\n    {\n        if (!isPointerLocked(window))\n            lockPointer(window);\n    }\n    else if (window->cursorMode == GLFW_CURSOR_HIDDEN)\n    {\n        wl_pointer_set_cursor(_glfw.wl.pointer, _glfw.wl.serial, NULL, 0, 0);\n    }\n}\n\nstatic void dataSourceHandleTarget(void* data,\n                                   struct wl_data_source* dataSource,\n                                   const char* mimeType)\n{\n    if (_glfw.wl.dataSource != dataSource)\n    {\n        _glfwInputError(GLFW_PLATFORM_ERROR,\n                        \"Wayland: Unknown clipboard data source\");\n        return;\n    }\n}\n\nstatic void dataSourceHandleSend(void* data,\n                                 struct wl_data_source* dataSource,\n                                 const char* mimeType,\n                                 int fd)\n{\n    const char* string = _glfw.wl.clipboardSendString;\n    size_t len = _glfw.wl.clipboardSendSize;\n    int ret;\n\n    if (_glfw.wl.dataSource != dataSource)\n    {\n        _glfwInputError(GLFW_PLATFORM_ERROR,\n                        \"Wayland: Unknown clipboard data source\");\n        return;\n    }\n\n    if (!string)\n    {\n        _glfwInputError(GLFW_PLATFORM_ERROR,\n                        \"Wayland: Copy requested from an invalid string\");\n        return;\n    }\n\n    if (strcmp(mimeType, \"text/plain;charset=utf-8\") != 0)\n    {\n        _glfwInputError(GLFW_PLATFORM_ERROR,\n                        \"Wayland: Wrong MIME type asked from clipboard\");\n        close(fd);\n        return;\n    }\n\n    while (len > 0)\n    {\n        ret = write(fd, string, len);\n        if (ret == -1 && errno == EINTR)\n            continue;\n        if (ret == -1)\n        {\n            // TODO: also report errno maybe.\n            _glfwInputError(GLFW_PLATFORM_ERROR,\n                            \"Wayland: Error while writing the clipboard\");\n            close(fd);\n            return;\n        }\n        len -= ret;\n    }\n    close(fd);\n}\n\nstatic void dataSourceHandleCancelled(void* data,\n                                      struct wl_data_source* dataSource)\n{\n    wl_data_source_destroy(dataSource);\n\n    if (_glfw.wl.dataSource != dataSource)\n    {\n        _glfwInputError(GLFW_PLATFORM_ERROR,\n                        \"Wayland: Unknown clipboard data source\");\n        return;\n    }\n\n    _glfw.wl.dataSource = NULL;\n}\n\nstatic const struct wl_data_source_listener dataSourceListener = {\n    dataSourceHandleTarget,\n    dataSourceHandleSend,\n    dataSourceHandleCancelled,\n};\n\nvoid _glfwPlatformSetClipboardString(const char* string)\n{\n    if (_glfw.wl.dataSource)\n    {\n        wl_data_source_destroy(_glfw.wl.dataSource);\n        _glfw.wl.dataSource = NULL;\n    }\n\n    if (_glfw.wl.clipboardSendString)\n    {\n        free(_glfw.wl.clipboardSendString);\n        _glfw.wl.clipboardSendString = NULL;\n    }\n\n    _glfw.wl.clipboardSendString = strdup(string);\n    if (!_glfw.wl.clipboardSendString)\n    {\n        _glfwInputError(GLFW_PLATFORM_ERROR,\n                        \"Wayland: Impossible to allocate clipboard string\");\n        return;\n    }\n    _glfw.wl.clipboardSendSize = strlen(string);\n    _glfw.wl.dataSource =\n        wl_data_device_manager_create_data_source(_glfw.wl.dataDeviceManager);\n    if (!_glfw.wl.dataSource)\n    {\n        _glfwInputError(GLFW_PLATFORM_ERROR,\n                        \"Wayland: Impossible to create clipboard source\");\n        free(_glfw.wl.clipboardSendString);\n        return;\n    }\n    wl_data_source_add_listener(_glfw.wl.dataSource,\n                                &dataSourceListener,\n                                NULL);\n    wl_data_source_offer(_glfw.wl.dataSource, \"text/plain;charset=utf-8\");\n    wl_data_device_set_selection(_glfw.wl.dataDevice,\n                                 _glfw.wl.dataSource,\n                                 _glfw.wl.serial);\n}\n\nstatic GLFWbool growClipboardString(void)\n{\n    char* clipboard = _glfw.wl.clipboardString;\n\n    clipboard = realloc(clipboard, _glfw.wl.clipboardSize * 2);\n    if (!clipboard)\n    {\n        _glfwInputError(GLFW_PLATFORM_ERROR,\n                        \"Wayland: Impossible to grow clipboard string\");\n        return GLFW_FALSE;\n    }\n    _glfw.wl.clipboardString = clipboard;\n    _glfw.wl.clipboardSize = _glfw.wl.clipboardSize * 2;\n    return GLFW_TRUE;\n}\n\nconst char* _glfwPlatformGetClipboardString(void)\n{\n    int fds[2];\n    int ret;\n    size_t len = 0;\n\n    if (!_glfw.wl.dataOffer)\n    {\n        _glfwInputError(GLFW_FORMAT_UNAVAILABLE,\n                        \"No clipboard data has been sent yet\");\n        return NULL;\n    }\n\n    ret = pipe2(fds, O_CLOEXEC);\n    if (ret < 0)\n    {\n        // TODO: also report errno maybe?\n        _glfwInputError(GLFW_PLATFORM_ERROR,\n                        \"Wayland: Impossible to create clipboard pipe fds\");\n        return NULL;\n    }\n\n    wl_data_offer_receive(_glfw.wl.dataOffer, \"text/plain;charset=utf-8\", fds[1]);\n    close(fds[1]);\n\n    // XXX: this is a huge hack, this function shouldn’t be synchronous!\n    handleEvents(-1);\n\n    while (1)\n    {\n        // Grow the clipboard if we need to paste something bigger, there is no\n        // shrink operation yet.\n        if (len + 4096 > _glfw.wl.clipboardSize)\n        {\n            if (!growClipboardString())\n            {\n                close(fds[0]);\n                return NULL;\n            }\n        }\n\n        // Then read from the fd to the clipboard, handling all known errors.\n        ret = read(fds[0], _glfw.wl.clipboardString + len, 4096);\n        if (ret == 0)\n            break;\n        if (ret == -1 && errno == EINTR)\n            continue;\n        if (ret == -1)\n        {\n            // TODO: also report errno maybe.\n            _glfwInputError(GLFW_PLATFORM_ERROR,\n                            \"Wayland: Impossible to read from clipboard fd\");\n            close(fds[0]);\n            return NULL;\n        }\n        len += ret;\n    }\n    close(fds[0]);\n    if (len + 1 > _glfw.wl.clipboardSize)\n    {\n        if (!growClipboardString())\n            return NULL;\n    }\n    _glfw.wl.clipboardString[len] = '\\0';\n    return _glfw.wl.clipboardString;\n}\n\nvoid _glfwPlatformGetRequiredInstanceExtensions(char** extensions)\n{\n    if (!_glfw.vk.KHR_surface || !_glfw.vk.KHR_wayland_surface)\n        return;\n\n    extensions[0] = \"VK_KHR_surface\";\n    extensions[1] = \"VK_KHR_wayland_surface\";\n}\n\nint _glfwPlatformGetPhysicalDevicePresentationSupport(VkInstance instance,\n                                                      VkPhysicalDevice device,\n                                                      uint32_t queuefamily)\n{\n    PFN_vkGetPhysicalDeviceWaylandPresentationSupportKHR\n        vkGetPhysicalDeviceWaylandPresentationSupportKHR =\n        (PFN_vkGetPhysicalDeviceWaylandPresentationSupportKHR)\n        vkGetInstanceProcAddr(instance, \"vkGetPhysicalDeviceWaylandPresentationSupportKHR\");\n    if (!vkGetPhysicalDeviceWaylandPresentationSupportKHR)\n    {\n        _glfwInputError(GLFW_API_UNAVAILABLE,\n                        \"Wayland: Vulkan instance missing VK_KHR_wayland_surface extension\");\n        return VK_NULL_HANDLE;\n    }\n\n    return vkGetPhysicalDeviceWaylandPresentationSupportKHR(device,\n                                                            queuefamily,\n                                                            _glfw.wl.display);\n}\n\nVkResult _glfwPlatformCreateWindowSurface(VkInstance instance,\n                                          _GLFWwindow* window,\n                                          const VkAllocationCallbacks* allocator,\n                                          VkSurfaceKHR* surface)\n{\n    VkResult err;\n    VkWaylandSurfaceCreateInfoKHR sci;\n    PFN_vkCreateWaylandSurfaceKHR vkCreateWaylandSurfaceKHR;\n\n    vkCreateWaylandSurfaceKHR = (PFN_vkCreateWaylandSurfaceKHR)\n        vkGetInstanceProcAddr(instance, \"vkCreateWaylandSurfaceKHR\");\n    if (!vkCreateWaylandSurfaceKHR)\n    {\n        _glfwInputError(GLFW_API_UNAVAILABLE,\n                        \"Wayland: Vulkan instance missing VK_KHR_wayland_surface extension\");\n        return VK_ERROR_EXTENSION_NOT_PRESENT;\n    }\n\n    memset(&sci, 0, sizeof(sci));\n    sci.sType = VK_STRUCTURE_TYPE_WAYLAND_SURFACE_CREATE_INFO_KHR;\n    sci.display = _glfw.wl.display;\n    sci.surface = window->wl.surface;\n\n    err = vkCreateWaylandSurfaceKHR(instance, &sci, allocator, surface);\n    if (err)\n    {\n        _glfwInputError(GLFW_PLATFORM_ERROR,\n                        \"Wayland: Failed to create Vulkan surface: %s\",\n                        _glfwGetVulkanResultString(err));\n    }\n\n    return err;\n}\n\n\n//////////////////////////////////////////////////////////////////////////\n//////                        GLFW native API                       //////\n//////////////////////////////////////////////////////////////////////////\n\nGLFWAPI struct wl_display* glfwGetWaylandDisplay(void)\n{\n    _GLFW_REQUIRE_INIT_OR_RETURN(NULL);\n    return _glfw.wl.display;\n}\n\nGLFWAPI struct wl_surface* glfwGetWaylandWindow(GLFWwindow* handle)\n{\n    _GLFWwindow* window = (_GLFWwindow*) handle;\n    _GLFW_REQUIRE_INIT_OR_RETURN(NULL);\n    return window->wl.surface;\n}\n\n"
  },
  {
    "path": "thirdparty/glfw/src/x11_init.c",
    "content": "//========================================================================\n// GLFW 3.3 X11 - www.glfw.org\n//------------------------------------------------------------------------\n// Copyright (c) 2002-2006 Marcus Geelnard\n// Copyright (c) 2006-2019 Camilla Löwy <elmindreda@glfw.org>\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//    claim that you wrote the original software. If you use this software\n//    in a product, an acknowledgment in the product documentation would\n//    be appreciated but is not required.\n//\n// 2. Altered source versions must be plainly marked as such, and must not\n//    be misrepresented as being the original software.\n//\n// 3. This notice may not be removed or altered from any source\n//    distribution.\n//\n//========================================================================\n// It is fine to use C99 in this file because it will not be built with VS\n//========================================================================\n\n#include \"internal.h\"\n\n#include <X11/Xresource.h>\n\n#include <stdlib.h>\n#include <string.h>\n#include <limits.h>\n#include <stdio.h>\n#include <locale.h>\n\n\n// Translate an X11 key code to a GLFW key code.\n//\nstatic int translateKeyCode(int scancode)\n{\n    int keySym;\n\n    // Valid key code range is  [8,255], according to the Xlib manual\n    if (scancode < 8 || scancode > 255)\n        return GLFW_KEY_UNKNOWN;\n\n    if (_glfw.x11.xkb.available)\n    {\n        // Try secondary keysym, for numeric keypad keys\n        // Note: This way we always force \"NumLock = ON\", which is intentional\n        // since the returned key code should correspond to a physical\n        // location.\n        keySym = XkbKeycodeToKeysym(_glfw.x11.display, scancode, _glfw.x11.xkb.group, 1);\n        switch (keySym)\n        {\n            case XK_KP_0:           return GLFW_KEY_KP_0;\n            case XK_KP_1:           return GLFW_KEY_KP_1;\n            case XK_KP_2:           return GLFW_KEY_KP_2;\n            case XK_KP_3:           return GLFW_KEY_KP_3;\n            case XK_KP_4:           return GLFW_KEY_KP_4;\n            case XK_KP_5:           return GLFW_KEY_KP_5;\n            case XK_KP_6:           return GLFW_KEY_KP_6;\n            case XK_KP_7:           return GLFW_KEY_KP_7;\n            case XK_KP_8:           return GLFW_KEY_KP_8;\n            case XK_KP_9:           return GLFW_KEY_KP_9;\n            case XK_KP_Separator:\n            case XK_KP_Decimal:     return GLFW_KEY_KP_DECIMAL;\n            case XK_KP_Equal:       return GLFW_KEY_KP_EQUAL;\n            case XK_KP_Enter:       return GLFW_KEY_KP_ENTER;\n            default:                break;\n        }\n\n        // Now try primary keysym for function keys (non-printable keys)\n        // These should not depend on the current keyboard layout\n        keySym = XkbKeycodeToKeysym(_glfw.x11.display, scancode, _glfw.x11.xkb.group, 0);\n    }\n    else\n    {\n        int dummy;\n        KeySym* keySyms;\n\n        keySyms = XGetKeyboardMapping(_glfw.x11.display, scancode, 1, &dummy);\n        keySym = keySyms[0];\n        XFree(keySyms);\n    }\n\n    switch (keySym)\n    {\n        case XK_Escape:         return GLFW_KEY_ESCAPE;\n        case XK_Tab:            return GLFW_KEY_TAB;\n        case XK_Shift_L:        return GLFW_KEY_LEFT_SHIFT;\n        case XK_Shift_R:        return GLFW_KEY_RIGHT_SHIFT;\n        case XK_Control_L:      return GLFW_KEY_LEFT_CONTROL;\n        case XK_Control_R:      return GLFW_KEY_RIGHT_CONTROL;\n        case XK_Meta_L:\n        case XK_Alt_L:          return GLFW_KEY_LEFT_ALT;\n        case XK_Mode_switch: // Mapped to Alt_R on many keyboards\n        case XK_ISO_Level3_Shift: // AltGr on at least some machines\n        case XK_Meta_R:\n        case XK_Alt_R:          return GLFW_KEY_RIGHT_ALT;\n        case XK_Super_L:        return GLFW_KEY_LEFT_SUPER;\n        case XK_Super_R:        return GLFW_KEY_RIGHT_SUPER;\n        case XK_Menu:           return GLFW_KEY_MENU;\n        case XK_Num_Lock:       return GLFW_KEY_NUM_LOCK;\n        case XK_Caps_Lock:      return GLFW_KEY_CAPS_LOCK;\n        case XK_Print:          return GLFW_KEY_PRINT_SCREEN;\n        case XK_Scroll_Lock:    return GLFW_KEY_SCROLL_LOCK;\n        case XK_Pause:          return GLFW_KEY_PAUSE;\n        case XK_Delete:         return GLFW_KEY_DELETE;\n        case XK_BackSpace:      return GLFW_KEY_BACKSPACE;\n        case XK_Return:         return GLFW_KEY_ENTER;\n        case XK_Home:           return GLFW_KEY_HOME;\n        case XK_End:            return GLFW_KEY_END;\n        case XK_Page_Up:        return GLFW_KEY_PAGE_UP;\n        case XK_Page_Down:      return GLFW_KEY_PAGE_DOWN;\n        case XK_Insert:         return GLFW_KEY_INSERT;\n        case XK_Left:           return GLFW_KEY_LEFT;\n        case XK_Right:          return GLFW_KEY_RIGHT;\n        case XK_Down:           return GLFW_KEY_DOWN;\n        case XK_Up:             return GLFW_KEY_UP;\n        case XK_F1:             return GLFW_KEY_F1;\n        case XK_F2:             return GLFW_KEY_F2;\n        case XK_F3:             return GLFW_KEY_F3;\n        case XK_F4:             return GLFW_KEY_F4;\n        case XK_F5:             return GLFW_KEY_F5;\n        case XK_F6:             return GLFW_KEY_F6;\n        case XK_F7:             return GLFW_KEY_F7;\n        case XK_F8:             return GLFW_KEY_F8;\n        case XK_F9:             return GLFW_KEY_F9;\n        case XK_F10:            return GLFW_KEY_F10;\n        case XK_F11:            return GLFW_KEY_F11;\n        case XK_F12:            return GLFW_KEY_F12;\n        case XK_F13:            return GLFW_KEY_F13;\n        case XK_F14:            return GLFW_KEY_F14;\n        case XK_F15:            return GLFW_KEY_F15;\n        case XK_F16:            return GLFW_KEY_F16;\n        case XK_F17:            return GLFW_KEY_F17;\n        case XK_F18:            return GLFW_KEY_F18;\n        case XK_F19:            return GLFW_KEY_F19;\n        case XK_F20:            return GLFW_KEY_F20;\n        case XK_F21:            return GLFW_KEY_F21;\n        case XK_F22:            return GLFW_KEY_F22;\n        case XK_F23:            return GLFW_KEY_F23;\n        case XK_F24:            return GLFW_KEY_F24;\n        case XK_F25:            return GLFW_KEY_F25;\n\n        // Numeric keypad\n        case XK_KP_Divide:      return GLFW_KEY_KP_DIVIDE;\n        case XK_KP_Multiply:    return GLFW_KEY_KP_MULTIPLY;\n        case XK_KP_Subtract:    return GLFW_KEY_KP_SUBTRACT;\n        case XK_KP_Add:         return GLFW_KEY_KP_ADD;\n\n        // These should have been detected in secondary keysym test above!\n        case XK_KP_Insert:      return GLFW_KEY_KP_0;\n        case XK_KP_End:         return GLFW_KEY_KP_1;\n        case XK_KP_Down:        return GLFW_KEY_KP_2;\n        case XK_KP_Page_Down:   return GLFW_KEY_KP_3;\n        case XK_KP_Left:        return GLFW_KEY_KP_4;\n        case XK_KP_Right:       return GLFW_KEY_KP_6;\n        case XK_KP_Home:        return GLFW_KEY_KP_7;\n        case XK_KP_Up:          return GLFW_KEY_KP_8;\n        case XK_KP_Page_Up:     return GLFW_KEY_KP_9;\n        case XK_KP_Delete:      return GLFW_KEY_KP_DECIMAL;\n        case XK_KP_Equal:       return GLFW_KEY_KP_EQUAL;\n        case XK_KP_Enter:       return GLFW_KEY_KP_ENTER;\n\n        // Last resort: Check for printable keys (should not happen if the XKB\n        // extension is available). This will give a layout dependent mapping\n        // (which is wrong, and we may miss some keys, especially on non-US\n        // keyboards), but it's better than nothing...\n        case XK_a:              return GLFW_KEY_A;\n        case XK_b:              return GLFW_KEY_B;\n        case XK_c:              return GLFW_KEY_C;\n        case XK_d:              return GLFW_KEY_D;\n        case XK_e:              return GLFW_KEY_E;\n        case XK_f:              return GLFW_KEY_F;\n        case XK_g:              return GLFW_KEY_G;\n        case XK_h:              return GLFW_KEY_H;\n        case XK_i:              return GLFW_KEY_I;\n        case XK_j:              return GLFW_KEY_J;\n        case XK_k:              return GLFW_KEY_K;\n        case XK_l:              return GLFW_KEY_L;\n        case XK_m:              return GLFW_KEY_M;\n        case XK_n:              return GLFW_KEY_N;\n        case XK_o:              return GLFW_KEY_O;\n        case XK_p:              return GLFW_KEY_P;\n        case XK_q:              return GLFW_KEY_Q;\n        case XK_r:              return GLFW_KEY_R;\n        case XK_s:              return GLFW_KEY_S;\n        case XK_t:              return GLFW_KEY_T;\n        case XK_u:              return GLFW_KEY_U;\n        case XK_v:              return GLFW_KEY_V;\n        case XK_w:              return GLFW_KEY_W;\n        case XK_x:              return GLFW_KEY_X;\n        case XK_y:              return GLFW_KEY_Y;\n        case XK_z:              return GLFW_KEY_Z;\n        case XK_1:              return GLFW_KEY_1;\n        case XK_2:              return GLFW_KEY_2;\n        case XK_3:              return GLFW_KEY_3;\n        case XK_4:              return GLFW_KEY_4;\n        case XK_5:              return GLFW_KEY_5;\n        case XK_6:              return GLFW_KEY_6;\n        case XK_7:              return GLFW_KEY_7;\n        case XK_8:              return GLFW_KEY_8;\n        case XK_9:              return GLFW_KEY_9;\n        case XK_0:              return GLFW_KEY_0;\n        case XK_space:          return GLFW_KEY_SPACE;\n        case XK_minus:          return GLFW_KEY_MINUS;\n        case XK_equal:          return GLFW_KEY_EQUAL;\n        case XK_bracketleft:    return GLFW_KEY_LEFT_BRACKET;\n        case XK_bracketright:   return GLFW_KEY_RIGHT_BRACKET;\n        case XK_backslash:      return GLFW_KEY_BACKSLASH;\n        case XK_semicolon:      return GLFW_KEY_SEMICOLON;\n        case XK_apostrophe:     return GLFW_KEY_APOSTROPHE;\n        case XK_grave:          return GLFW_KEY_GRAVE_ACCENT;\n        case XK_comma:          return GLFW_KEY_COMMA;\n        case XK_period:         return GLFW_KEY_PERIOD;\n        case XK_slash:          return GLFW_KEY_SLASH;\n        case XK_less:           return GLFW_KEY_WORLD_1; // At least in some layouts...\n        default:                break;\n    }\n\n    // No matching translation was found\n    return GLFW_KEY_UNKNOWN;\n}\n\n// Create key code translation tables\n//\nstatic void createKeyTables(void)\n{\n    int scancode, key;\n\n    memset(_glfw.x11.keycodes, -1, sizeof(_glfw.x11.keycodes));\n    memset(_glfw.x11.scancodes, -1, sizeof(_glfw.x11.scancodes));\n\n    if (_glfw.x11.xkb.available)\n    {\n        // Use XKB to determine physical key locations independently of the\n        // current keyboard layout\n\n        char name[XkbKeyNameLength + 1];\n        XkbDescPtr desc = XkbGetMap(_glfw.x11.display, 0, XkbUseCoreKbd);\n        XkbGetNames(_glfw.x11.display, XkbKeyNamesMask, desc);\n\n        // Find the X11 key code -> GLFW key code mapping\n        for (scancode = desc->min_key_code;  scancode <= desc->max_key_code;  scancode++)\n        {\n            memcpy(name, desc->names->keys[scancode].name, XkbKeyNameLength);\n            name[XkbKeyNameLength] = '\\0';\n\n            // Map the key name to a GLFW key code. Note: We only map printable\n            // keys here, and we use the US keyboard layout. The rest of the\n            // keys (function keys) are mapped using traditional KeySym\n            // translations.\n            if (strcmp(name, \"TLDE\") == 0) key = GLFW_KEY_GRAVE_ACCENT;\n            else if (strcmp(name, \"AE01\") == 0) key = GLFW_KEY_1;\n            else if (strcmp(name, \"AE02\") == 0) key = GLFW_KEY_2;\n            else if (strcmp(name, \"AE03\") == 0) key = GLFW_KEY_3;\n            else if (strcmp(name, \"AE04\") == 0) key = GLFW_KEY_4;\n            else if (strcmp(name, \"AE05\") == 0) key = GLFW_KEY_5;\n            else if (strcmp(name, \"AE06\") == 0) key = GLFW_KEY_6;\n            else if (strcmp(name, \"AE07\") == 0) key = GLFW_KEY_7;\n            else if (strcmp(name, \"AE08\") == 0) key = GLFW_KEY_8;\n            else if (strcmp(name, \"AE09\") == 0) key = GLFW_KEY_9;\n            else if (strcmp(name, \"AE10\") == 0) key = GLFW_KEY_0;\n            else if (strcmp(name, \"AE11\") == 0) key = GLFW_KEY_MINUS;\n            else if (strcmp(name, \"AE12\") == 0) key = GLFW_KEY_EQUAL;\n            else if (strcmp(name, \"AD01\") == 0) key = GLFW_KEY_Q;\n            else if (strcmp(name, \"AD02\") == 0) key = GLFW_KEY_W;\n            else if (strcmp(name, \"AD03\") == 0) key = GLFW_KEY_E;\n            else if (strcmp(name, \"AD04\") == 0) key = GLFW_KEY_R;\n            else if (strcmp(name, \"AD05\") == 0) key = GLFW_KEY_T;\n            else if (strcmp(name, \"AD06\") == 0) key = GLFW_KEY_Y;\n            else if (strcmp(name, \"AD07\") == 0) key = GLFW_KEY_U;\n            else if (strcmp(name, \"AD08\") == 0) key = GLFW_KEY_I;\n            else if (strcmp(name, \"AD09\") == 0) key = GLFW_KEY_O;\n            else if (strcmp(name, \"AD10\") == 0) key = GLFW_KEY_P;\n            else if (strcmp(name, \"AD11\") == 0) key = GLFW_KEY_LEFT_BRACKET;\n            else if (strcmp(name, \"AD12\") == 0) key = GLFW_KEY_RIGHT_BRACKET;\n            else if (strcmp(name, \"AC01\") == 0) key = GLFW_KEY_A;\n            else if (strcmp(name, \"AC02\") == 0) key = GLFW_KEY_S;\n            else if (strcmp(name, \"AC03\") == 0) key = GLFW_KEY_D;\n            else if (strcmp(name, \"AC04\") == 0) key = GLFW_KEY_F;\n            else if (strcmp(name, \"AC05\") == 0) key = GLFW_KEY_G;\n            else if (strcmp(name, \"AC06\") == 0) key = GLFW_KEY_H;\n            else if (strcmp(name, \"AC07\") == 0) key = GLFW_KEY_J;\n            else if (strcmp(name, \"AC08\") == 0) key = GLFW_KEY_K;\n            else if (strcmp(name, \"AC09\") == 0) key = GLFW_KEY_L;\n            else if (strcmp(name, \"AC10\") == 0) key = GLFW_KEY_SEMICOLON;\n            else if (strcmp(name, \"AC11\") == 0) key = GLFW_KEY_APOSTROPHE;\n            else if (strcmp(name, \"AB01\") == 0) key = GLFW_KEY_Z;\n            else if (strcmp(name, \"AB02\") == 0) key = GLFW_KEY_X;\n            else if (strcmp(name, \"AB03\") == 0) key = GLFW_KEY_C;\n            else if (strcmp(name, \"AB04\") == 0) key = GLFW_KEY_V;\n            else if (strcmp(name, \"AB05\") == 0) key = GLFW_KEY_B;\n            else if (strcmp(name, \"AB06\") == 0) key = GLFW_KEY_N;\n            else if (strcmp(name, \"AB07\") == 0) key = GLFW_KEY_M;\n            else if (strcmp(name, \"AB08\") == 0) key = GLFW_KEY_COMMA;\n            else if (strcmp(name, \"AB09\") == 0) key = GLFW_KEY_PERIOD;\n            else if (strcmp(name, \"AB10\") == 0) key = GLFW_KEY_SLASH;\n            else if (strcmp(name, \"BKSL\") == 0) key = GLFW_KEY_BACKSLASH;\n            else if (strcmp(name, \"LSGT\") == 0) key = GLFW_KEY_WORLD_1;\n            else key = GLFW_KEY_UNKNOWN;\n\n            if ((scancode >= 0) && (scancode < 256))\n                _glfw.x11.keycodes[scancode] = key;\n        }\n\n        XkbFreeNames(desc, XkbKeyNamesMask, True);\n        XkbFreeKeyboard(desc, 0, True);\n    }\n\n    for (scancode = 0;  scancode < 256;  scancode++)\n    {\n        // Translate the un-translated key codes using traditional X11 KeySym\n        // lookups\n        if (_glfw.x11.keycodes[scancode] < 0)\n            _glfw.x11.keycodes[scancode] = translateKeyCode(scancode);\n\n        // Store the reverse translation for faster key name lookup\n        if (_glfw.x11.keycodes[scancode] > 0)\n            _glfw.x11.scancodes[_glfw.x11.keycodes[scancode]] = scancode;\n    }\n}\n\n// Check whether the IM has a usable style\n//\nstatic GLFWbool hasUsableInputMethodStyle(void)\n{\n    GLFWbool found = GLFW_FALSE;\n    XIMStyles* styles = NULL;\n\n    if (XGetIMValues(_glfw.x11.im, XNQueryInputStyle, &styles, NULL) != NULL)\n        return GLFW_FALSE;\n\n    for (unsigned int i = 0;  i < styles->count_styles;  i++)\n    {\n        if (styles->supported_styles[i] == (XIMPreeditNothing | XIMStatusNothing))\n        {\n            found = GLFW_TRUE;\n            break;\n        }\n    }\n\n    XFree(styles);\n    return found;\n}\n\n// Check whether the specified atom is supported\n//\nstatic Atom getSupportedAtom(Atom* supportedAtoms,\n                             unsigned long atomCount,\n                             const char* atomName)\n{\n    const Atom atom = XInternAtom(_glfw.x11.display, atomName, False);\n\n    for (unsigned int i = 0;  i < atomCount;  i++)\n    {\n        if (supportedAtoms[i] == atom)\n            return atom;\n    }\n\n    return None;\n}\n\n// Check whether the running window manager is EWMH-compliant\n//\nstatic void detectEWMH(void)\n{\n    // First we read the _NET_SUPPORTING_WM_CHECK property on the root window\n\n    Window* windowFromRoot = NULL;\n    if (!_glfwGetWindowPropertyX11(_glfw.x11.root,\n                                   _glfw.x11.NET_SUPPORTING_WM_CHECK,\n                                   XA_WINDOW,\n                                   (unsigned char**) &windowFromRoot))\n    {\n        return;\n    }\n\n    _glfwGrabErrorHandlerX11();\n\n    // If it exists, it should be the XID of a top-level window\n    // Then we look for the same property on that window\n\n    Window* windowFromChild = NULL;\n    if (!_glfwGetWindowPropertyX11(*windowFromRoot,\n                                   _glfw.x11.NET_SUPPORTING_WM_CHECK,\n                                   XA_WINDOW,\n                                   (unsigned char**) &windowFromChild))\n    {\n        XFree(windowFromRoot);\n        return;\n    }\n\n    _glfwReleaseErrorHandlerX11();\n\n    // If the property exists, it should contain the XID of the window\n\n    if (*windowFromRoot != *windowFromChild)\n    {\n        XFree(windowFromRoot);\n        XFree(windowFromChild);\n        return;\n    }\n\n    XFree(windowFromRoot);\n    XFree(windowFromChild);\n\n    // We are now fairly sure that an EWMH-compliant WM is currently running\n    // We can now start querying the WM about what features it supports by\n    // looking in the _NET_SUPPORTED property on the root window\n    // It should contain a list of supported EWMH protocol and state atoms\n\n    Atom* supportedAtoms = NULL;\n    const unsigned long atomCount =\n        _glfwGetWindowPropertyX11(_glfw.x11.root,\n                                  _glfw.x11.NET_SUPPORTED,\n                                  XA_ATOM,\n                                  (unsigned char**) &supportedAtoms);\n\n    // See which of the atoms we support that are supported by the WM\n\n    _glfw.x11.NET_WM_STATE =\n        getSupportedAtom(supportedAtoms, atomCount, \"_NET_WM_STATE\");\n    _glfw.x11.NET_WM_STATE_ABOVE =\n        getSupportedAtom(supportedAtoms, atomCount, \"_NET_WM_STATE_ABOVE\");\n    _glfw.x11.NET_WM_STATE_FULLSCREEN =\n        getSupportedAtom(supportedAtoms, atomCount, \"_NET_WM_STATE_FULLSCREEN\");\n    _glfw.x11.NET_WM_STATE_MAXIMIZED_VERT =\n        getSupportedAtom(supportedAtoms, atomCount, \"_NET_WM_STATE_MAXIMIZED_VERT\");\n    _glfw.x11.NET_WM_STATE_MAXIMIZED_HORZ =\n        getSupportedAtom(supportedAtoms, atomCount, \"_NET_WM_STATE_MAXIMIZED_HORZ\");\n    _glfw.x11.NET_WM_STATE_DEMANDS_ATTENTION =\n        getSupportedAtom(supportedAtoms, atomCount, \"_NET_WM_STATE_DEMANDS_ATTENTION\");\n    _glfw.x11.NET_WM_FULLSCREEN_MONITORS =\n        getSupportedAtom(supportedAtoms, atomCount, \"_NET_WM_FULLSCREEN_MONITORS\");\n    _glfw.x11.NET_WM_WINDOW_TYPE =\n        getSupportedAtom(supportedAtoms, atomCount, \"_NET_WM_WINDOW_TYPE\");\n    _glfw.x11.NET_WM_WINDOW_TYPE_NORMAL =\n        getSupportedAtom(supportedAtoms, atomCount, \"_NET_WM_WINDOW_TYPE_NORMAL\");\n    _glfw.x11.NET_WORKAREA =\n        getSupportedAtom(supportedAtoms, atomCount, \"_NET_WORKAREA\");\n    _glfw.x11.NET_CURRENT_DESKTOP =\n        getSupportedAtom(supportedAtoms, atomCount, \"_NET_CURRENT_DESKTOP\");\n    _glfw.x11.NET_ACTIVE_WINDOW =\n        getSupportedAtom(supportedAtoms, atomCount, \"_NET_ACTIVE_WINDOW\");\n    _glfw.x11.NET_FRAME_EXTENTS =\n        getSupportedAtom(supportedAtoms, atomCount, \"_NET_FRAME_EXTENTS\");\n    _glfw.x11.NET_REQUEST_FRAME_EXTENTS =\n        getSupportedAtom(supportedAtoms, atomCount, \"_NET_REQUEST_FRAME_EXTENTS\");\n\n    if (supportedAtoms)\n        XFree(supportedAtoms);\n}\n\n// Look for and initialize supported X11 extensions\n//\nstatic GLFWbool initExtensions(void)\n{\n    _glfw.x11.vidmode.handle = _glfw_dlopen(\"libXxf86vm.so.1\");\n    if (_glfw.x11.vidmode.handle)\n    {\n        _glfw.x11.vidmode.QueryExtension = (PFN_XF86VidModeQueryExtension)\n            _glfw_dlsym(_glfw.x11.vidmode.handle, \"XF86VidModeQueryExtension\");\n        _glfw.x11.vidmode.GetGammaRamp = (PFN_XF86VidModeGetGammaRamp)\n            _glfw_dlsym(_glfw.x11.vidmode.handle, \"XF86VidModeGetGammaRamp\");\n        _glfw.x11.vidmode.SetGammaRamp = (PFN_XF86VidModeSetGammaRamp)\n            _glfw_dlsym(_glfw.x11.vidmode.handle, \"XF86VidModeSetGammaRamp\");\n        _glfw.x11.vidmode.GetGammaRampSize = (PFN_XF86VidModeGetGammaRampSize)\n            _glfw_dlsym(_glfw.x11.vidmode.handle, \"XF86VidModeGetGammaRampSize\");\n\n        _glfw.x11.vidmode.available =\n            XF86VidModeQueryExtension(_glfw.x11.display,\n                                      &_glfw.x11.vidmode.eventBase,\n                                      &_glfw.x11.vidmode.errorBase);\n    }\n\n#if defined(__CYGWIN__)\n    _glfw.x11.xi.handle = _glfw_dlopen(\"libXi-6.so\");\n#else\n    _glfw.x11.xi.handle = _glfw_dlopen(\"libXi.so.6\");\n#endif\n    if (_glfw.x11.xi.handle)\n    {\n        _glfw.x11.xi.QueryVersion = (PFN_XIQueryVersion)\n            _glfw_dlsym(_glfw.x11.xi.handle, \"XIQueryVersion\");\n        _glfw.x11.xi.SelectEvents = (PFN_XISelectEvents)\n            _glfw_dlsym(_glfw.x11.xi.handle, \"XISelectEvents\");\n\n        if (XQueryExtension(_glfw.x11.display,\n                            \"XInputExtension\",\n                            &_glfw.x11.xi.majorOpcode,\n                            &_glfw.x11.xi.eventBase,\n                            &_glfw.x11.xi.errorBase))\n        {\n            _glfw.x11.xi.major = 2;\n            _glfw.x11.xi.minor = 0;\n\n            if (XIQueryVersion(_glfw.x11.display,\n                               &_glfw.x11.xi.major,\n                               &_glfw.x11.xi.minor) == Success)\n            {\n                _glfw.x11.xi.available = GLFW_TRUE;\n            }\n        }\n    }\n\n#if defined(__CYGWIN__)\n    _glfw.x11.randr.handle = _glfw_dlopen(\"libXrandr-2.so\");\n#else\n    _glfw.x11.randr.handle = _glfw_dlopen(\"libXrandr.so.2\");\n#endif\n    if (_glfw.x11.randr.handle)\n    {\n        _glfw.x11.randr.AllocGamma = (PFN_XRRAllocGamma)\n            _glfw_dlsym(_glfw.x11.randr.handle, \"XRRAllocGamma\");\n        _glfw.x11.randr.FreeGamma = (PFN_XRRFreeGamma)\n            _glfw_dlsym(_glfw.x11.randr.handle, \"XRRFreeGamma\");\n        _glfw.x11.randr.FreeCrtcInfo = (PFN_XRRFreeCrtcInfo)\n            _glfw_dlsym(_glfw.x11.randr.handle, \"XRRFreeCrtcInfo\");\n        _glfw.x11.randr.FreeGamma = (PFN_XRRFreeGamma)\n            _glfw_dlsym(_glfw.x11.randr.handle, \"XRRFreeGamma\");\n        _glfw.x11.randr.FreeOutputInfo = (PFN_XRRFreeOutputInfo)\n            _glfw_dlsym(_glfw.x11.randr.handle, \"XRRFreeOutputInfo\");\n        _glfw.x11.randr.FreeScreenResources = (PFN_XRRFreeScreenResources)\n            _glfw_dlsym(_glfw.x11.randr.handle, \"XRRFreeScreenResources\");\n        _glfw.x11.randr.GetCrtcGamma = (PFN_XRRGetCrtcGamma)\n            _glfw_dlsym(_glfw.x11.randr.handle, \"XRRGetCrtcGamma\");\n        _glfw.x11.randr.GetCrtcGammaSize = (PFN_XRRGetCrtcGammaSize)\n            _glfw_dlsym(_glfw.x11.randr.handle, \"XRRGetCrtcGammaSize\");\n        _glfw.x11.randr.GetCrtcInfo = (PFN_XRRGetCrtcInfo)\n            _glfw_dlsym(_glfw.x11.randr.handle, \"XRRGetCrtcInfo\");\n        _glfw.x11.randr.GetOutputInfo = (PFN_XRRGetOutputInfo)\n            _glfw_dlsym(_glfw.x11.randr.handle, \"XRRGetOutputInfo\");\n        _glfw.x11.randr.GetOutputPrimary = (PFN_XRRGetOutputPrimary)\n            _glfw_dlsym(_glfw.x11.randr.handle, \"XRRGetOutputPrimary\");\n        _glfw.x11.randr.GetScreenResourcesCurrent = (PFN_XRRGetScreenResourcesCurrent)\n            _glfw_dlsym(_glfw.x11.randr.handle, \"XRRGetScreenResourcesCurrent\");\n        _glfw.x11.randr.QueryExtension = (PFN_XRRQueryExtension)\n            _glfw_dlsym(_glfw.x11.randr.handle, \"XRRQueryExtension\");\n        _glfw.x11.randr.QueryVersion = (PFN_XRRQueryVersion)\n            _glfw_dlsym(_glfw.x11.randr.handle, \"XRRQueryVersion\");\n        _glfw.x11.randr.SelectInput = (PFN_XRRSelectInput)\n            _glfw_dlsym(_glfw.x11.randr.handle, \"XRRSelectInput\");\n        _glfw.x11.randr.SetCrtcConfig = (PFN_XRRSetCrtcConfig)\n            _glfw_dlsym(_glfw.x11.randr.handle, \"XRRSetCrtcConfig\");\n        _glfw.x11.randr.SetCrtcGamma = (PFN_XRRSetCrtcGamma)\n            _glfw_dlsym(_glfw.x11.randr.handle, \"XRRSetCrtcGamma\");\n        _glfw.x11.randr.UpdateConfiguration = (PFN_XRRUpdateConfiguration)\n            _glfw_dlsym(_glfw.x11.randr.handle, \"XRRUpdateConfiguration\");\n\n        if (XRRQueryExtension(_glfw.x11.display,\n                              &_glfw.x11.randr.eventBase,\n                              &_glfw.x11.randr.errorBase))\n        {\n            if (XRRQueryVersion(_glfw.x11.display,\n                                &_glfw.x11.randr.major,\n                                &_glfw.x11.randr.minor))\n            {\n                // The GLFW RandR path requires at least version 1.3\n                if (_glfw.x11.randr.major > 1 || _glfw.x11.randr.minor >= 3)\n                    _glfw.x11.randr.available = GLFW_TRUE;\n            }\n            else\n            {\n                _glfwInputError(GLFW_PLATFORM_ERROR,\n                                \"X11: Failed to query RandR version\");\n            }\n        }\n    }\n\n    if (_glfw.x11.randr.available)\n    {\n        XRRScreenResources* sr = XRRGetScreenResourcesCurrent(_glfw.x11.display,\n                                                              _glfw.x11.root);\n\n        if (!sr->ncrtc || !XRRGetCrtcGammaSize(_glfw.x11.display, sr->crtcs[0]))\n        {\n            // This is likely an older Nvidia driver with broken gamma support\n            // Flag it as useless and fall back to xf86vm gamma, if available\n            _glfw.x11.randr.gammaBroken = GLFW_TRUE;\n        }\n\n        if (!sr->ncrtc)\n        {\n            // A system without CRTCs is likely a system with broken RandR\n            // Disable the RandR monitor path and fall back to core functions\n            _glfw.x11.randr.monitorBroken = GLFW_TRUE;\n        }\n\n        XRRFreeScreenResources(sr);\n    }\n\n    if (_glfw.x11.randr.available && !_glfw.x11.randr.monitorBroken)\n    {\n        XRRSelectInput(_glfw.x11.display, _glfw.x11.root,\n                       RROutputChangeNotifyMask);\n    }\n\n#if defined(__CYGWIN__)\n    _glfw.x11.xcursor.handle = _glfw_dlopen(\"libXcursor-1.so\");\n#else\n    _glfw.x11.xcursor.handle = _glfw_dlopen(\"libXcursor.so.1\");\n#endif\n    if (_glfw.x11.xcursor.handle)\n    {\n        _glfw.x11.xcursor.ImageCreate = (PFN_XcursorImageCreate)\n            _glfw_dlsym(_glfw.x11.xcursor.handle, \"XcursorImageCreate\");\n        _glfw.x11.xcursor.ImageDestroy = (PFN_XcursorImageDestroy)\n            _glfw_dlsym(_glfw.x11.xcursor.handle, \"XcursorImageDestroy\");\n        _glfw.x11.xcursor.ImageLoadCursor = (PFN_XcursorImageLoadCursor)\n            _glfw_dlsym(_glfw.x11.xcursor.handle, \"XcursorImageLoadCursor\");\n    }\n\n#if defined(__CYGWIN__)\n    _glfw.x11.xinerama.handle = _glfw_dlopen(\"libXinerama-1.so\");\n#else\n    _glfw.x11.xinerama.handle = _glfw_dlopen(\"libXinerama.so.1\");\n#endif\n    if (_glfw.x11.xinerama.handle)\n    {\n        _glfw.x11.xinerama.IsActive = (PFN_XineramaIsActive)\n            _glfw_dlsym(_glfw.x11.xinerama.handle, \"XineramaIsActive\");\n        _glfw.x11.xinerama.QueryExtension = (PFN_XineramaQueryExtension)\n            _glfw_dlsym(_glfw.x11.xinerama.handle, \"XineramaQueryExtension\");\n        _glfw.x11.xinerama.QueryScreens = (PFN_XineramaQueryScreens)\n            _glfw_dlsym(_glfw.x11.xinerama.handle, \"XineramaQueryScreens\");\n\n        if (XineramaQueryExtension(_glfw.x11.display,\n                                   &_glfw.x11.xinerama.major,\n                                   &_glfw.x11.xinerama.minor))\n        {\n            if (XineramaIsActive(_glfw.x11.display))\n                _glfw.x11.xinerama.available = GLFW_TRUE;\n        }\n    }\n\n    _glfw.x11.xkb.major = 1;\n    _glfw.x11.xkb.minor = 0;\n    _glfw.x11.xkb.available =\n        XkbQueryExtension(_glfw.x11.display,\n                          &_glfw.x11.xkb.majorOpcode,\n                          &_glfw.x11.xkb.eventBase,\n                          &_glfw.x11.xkb.errorBase,\n                          &_glfw.x11.xkb.major,\n                          &_glfw.x11.xkb.minor);\n\n    if (_glfw.x11.xkb.available)\n    {\n        Bool supported;\n\n        if (XkbSetDetectableAutoRepeat(_glfw.x11.display, True, &supported))\n        {\n            if (supported)\n                _glfw.x11.xkb.detectable = GLFW_TRUE;\n        }\n\n        _glfw.x11.xkb.group = 0;\n        XkbStateRec state;\n        if (XkbGetState(_glfw.x11.display, XkbUseCoreKbd, &state) == Success)\n        {\n            XkbSelectEventDetails(_glfw.x11.display, XkbUseCoreKbd, XkbStateNotify, XkbAllStateComponentsMask, XkbGroupStateMask);\n            _glfw.x11.xkb.group = (unsigned int)state.group;\n        }\n    }\n\n#if defined(__CYGWIN__)\n    _glfw.x11.x11xcb.handle = _glfw_dlopen(\"libX11-xcb-1.so\");\n#else\n    _glfw.x11.x11xcb.handle = _glfw_dlopen(\"libX11-xcb.so.1\");\n#endif\n    if (_glfw.x11.x11xcb.handle)\n    {\n        _glfw.x11.x11xcb.GetXCBConnection = (PFN_XGetXCBConnection)\n            _glfw_dlsym(_glfw.x11.x11xcb.handle, \"XGetXCBConnection\");\n    }\n\n#if defined(__CYGWIN__)\n    _glfw.x11.xrender.handle = _glfw_dlopen(\"libXrender-1.so\");\n#else\n    _glfw.x11.xrender.handle = _glfw_dlopen(\"libXrender.so.1\");\n#endif\n    if (_glfw.x11.xrender.handle)\n    {\n        _glfw.x11.xrender.QueryExtension = (PFN_XRenderQueryExtension)\n            _glfw_dlsym(_glfw.x11.xrender.handle, \"XRenderQueryExtension\");\n        _glfw.x11.xrender.QueryVersion = (PFN_XRenderQueryVersion)\n            _glfw_dlsym(_glfw.x11.xrender.handle, \"XRenderQueryVersion\");\n        _glfw.x11.xrender.FindVisualFormat = (PFN_XRenderFindVisualFormat)\n            _glfw_dlsym(_glfw.x11.xrender.handle, \"XRenderFindVisualFormat\");\n\n        if (XRenderQueryExtension(_glfw.x11.display,\n                                  &_glfw.x11.xrender.errorBase,\n                                  &_glfw.x11.xrender.eventBase))\n        {\n            if (XRenderQueryVersion(_glfw.x11.display,\n                                    &_glfw.x11.xrender.major,\n                                    &_glfw.x11.xrender.minor))\n            {\n                _glfw.x11.xrender.available = GLFW_TRUE;\n            }\n        }\n    }\n\n    // Update the key code LUT\n    // FIXME: We should listen to XkbMapNotify events to track changes to\n    // the keyboard mapping.\n    createKeyTables();\n\n    // String format atoms\n    _glfw.x11.NULL_ = XInternAtom(_glfw.x11.display, \"NULL\", False);\n    _glfw.x11.UTF8_STRING = XInternAtom(_glfw.x11.display, \"UTF8_STRING\", False);\n    _glfw.x11.ATOM_PAIR = XInternAtom(_glfw.x11.display, \"ATOM_PAIR\", False);\n\n    // Custom selection property atom\n    _glfw.x11.GLFW_SELECTION =\n        XInternAtom(_glfw.x11.display, \"GLFW_SELECTION\", False);\n\n    // ICCCM standard clipboard atoms\n    _glfw.x11.TARGETS = XInternAtom(_glfw.x11.display, \"TARGETS\", False);\n    _glfw.x11.MULTIPLE = XInternAtom(_glfw.x11.display, \"MULTIPLE\", False);\n    _glfw.x11.PRIMARY = XInternAtom(_glfw.x11.display, \"PRIMARY\", False);\n    _glfw.x11.INCR = XInternAtom(_glfw.x11.display, \"INCR\", False);\n    _glfw.x11.CLIPBOARD = XInternAtom(_glfw.x11.display, \"CLIPBOARD\", False);\n\n    // Clipboard manager atoms\n    _glfw.x11.CLIPBOARD_MANAGER =\n        XInternAtom(_glfw.x11.display, \"CLIPBOARD_MANAGER\", False);\n    _glfw.x11.SAVE_TARGETS =\n        XInternAtom(_glfw.x11.display, \"SAVE_TARGETS\", False);\n\n    // Xdnd (drag and drop) atoms\n    _glfw.x11.XdndAware = XInternAtom(_glfw.x11.display, \"XdndAware\", False);\n    _glfw.x11.XdndEnter = XInternAtom(_glfw.x11.display, \"XdndEnter\", False);\n    _glfw.x11.XdndPosition = XInternAtom(_glfw.x11.display, \"XdndPosition\", False);\n    _glfw.x11.XdndStatus = XInternAtom(_glfw.x11.display, \"XdndStatus\", False);\n    _glfw.x11.XdndActionCopy = XInternAtom(_glfw.x11.display, \"XdndActionCopy\", False);\n    _glfw.x11.XdndDrop = XInternAtom(_glfw.x11.display, \"XdndDrop\", False);\n    _glfw.x11.XdndFinished = XInternAtom(_glfw.x11.display, \"XdndFinished\", False);\n    _glfw.x11.XdndSelection = XInternAtom(_glfw.x11.display, \"XdndSelection\", False);\n    _glfw.x11.XdndTypeList = XInternAtom(_glfw.x11.display, \"XdndTypeList\", False);\n    _glfw.x11.text_uri_list = XInternAtom(_glfw.x11.display, \"text/uri-list\", False);\n\n    // ICCCM, EWMH and Motif window property atoms\n    // These can be set safely even without WM support\n    // The EWMH atoms that require WM support are handled in detectEWMH\n    _glfw.x11.WM_PROTOCOLS =\n        XInternAtom(_glfw.x11.display, \"WM_PROTOCOLS\", False);\n    _glfw.x11.WM_STATE =\n        XInternAtom(_glfw.x11.display, \"WM_STATE\", False);\n    _glfw.x11.WM_DELETE_WINDOW =\n        XInternAtom(_glfw.x11.display, \"WM_DELETE_WINDOW\", False);\n    _glfw.x11.NET_SUPPORTED =\n        XInternAtom(_glfw.x11.display, \"_NET_SUPPORTED\", False);\n    _glfw.x11.NET_SUPPORTING_WM_CHECK =\n        XInternAtom(_glfw.x11.display, \"_NET_SUPPORTING_WM_CHECK\", False);\n    _glfw.x11.NET_WM_ICON =\n        XInternAtom(_glfw.x11.display, \"_NET_WM_ICON\", False);\n    _glfw.x11.NET_WM_PING =\n        XInternAtom(_glfw.x11.display, \"_NET_WM_PING\", False);\n    _glfw.x11.NET_WM_PID =\n        XInternAtom(_glfw.x11.display, \"_NET_WM_PID\", False);\n    _glfw.x11.NET_WM_NAME =\n        XInternAtom(_glfw.x11.display, \"_NET_WM_NAME\", False);\n    _glfw.x11.NET_WM_ICON_NAME =\n        XInternAtom(_glfw.x11.display, \"_NET_WM_ICON_NAME\", False);\n    _glfw.x11.NET_WM_BYPASS_COMPOSITOR =\n        XInternAtom(_glfw.x11.display, \"_NET_WM_BYPASS_COMPOSITOR\", False);\n    _glfw.x11.NET_WM_WINDOW_OPACITY =\n        XInternAtom(_glfw.x11.display, \"_NET_WM_WINDOW_OPACITY\", False);\n    _glfw.x11.MOTIF_WM_HINTS =\n        XInternAtom(_glfw.x11.display, \"_MOTIF_WM_HINTS\", False);\n\n    // The compositing manager selection name contains the screen number\n    {\n        char name[32];\n        snprintf(name, sizeof(name), \"_NET_WM_CM_S%u\", _glfw.x11.screen);\n        _glfw.x11.NET_WM_CM_Sx = XInternAtom(_glfw.x11.display, name, False);\n    }\n\n    // Detect whether an EWMH-conformant window manager is running\n    detectEWMH();\n\n    return GLFW_TRUE;\n}\n\n// Retrieve system content scale via folklore heuristics\n//\nstatic void getSystemContentScale(float* xscale, float* yscale)\n{\n    // Start by assuming the default X11 DPI\n    // NOTE: Some desktop environments (KDE) may remove the Xft.dpi field when it\n    //       would be set to 96, so assume that is the case if we cannot find it\n    float xdpi = 96.f, ydpi = 96.f;\n\n    // NOTE: Basing the scale on Xft.dpi where available should provide the most\n    //       consistent user experience (matches Qt, Gtk, etc), although not\n    //       always the most accurate one\n    char* rms = XResourceManagerString(_glfw.x11.display);\n    if (rms)\n    {\n        XrmDatabase db = XrmGetStringDatabase(rms);\n        if (db)\n        {\n            XrmValue value;\n            char* type = NULL;\n\n            if (XrmGetResource(db, \"Xft.dpi\", \"Xft.Dpi\", &type, &value))\n            {\n                if (type && strcmp(type, \"String\") == 0)\n                    xdpi = ydpi = atof(value.addr);\n            }\n\n            XrmDestroyDatabase(db);\n        }\n    }\n\n    *xscale = xdpi / 96.f;\n    *yscale = ydpi / 96.f;\n}\n\n// Create a blank cursor for hidden and disabled cursor modes\n//\nstatic Cursor createHiddenCursor(void)\n{\n    unsigned char pixels[16 * 16 * 4] = { 0 };\n    GLFWimage image = { 16, 16, pixels };\n    return _glfwCreateCursorX11(&image, 0, 0);\n}\n\n// Create a helper window for IPC\n//\nstatic Window createHelperWindow(void)\n{\n    XSetWindowAttributes wa;\n    wa.event_mask = PropertyChangeMask;\n\n    return XCreateWindow(_glfw.x11.display, _glfw.x11.root,\n                         0, 0, 1, 1, 0, 0,\n                         InputOnly,\n                         DefaultVisual(_glfw.x11.display, _glfw.x11.screen),\n                         CWEventMask, &wa);\n}\n\n// X error handler\n//\nstatic int errorHandler(Display *display, XErrorEvent* event)\n{\n    _glfw.x11.errorCode = event->error_code;\n    return 0;\n}\n\n\n//////////////////////////////////////////////////////////////////////////\n//////                       GLFW internal API                      //////\n//////////////////////////////////////////////////////////////////////////\n\n// Sets the X error handler callback\n//\nvoid _glfwGrabErrorHandlerX11(void)\n{\n    _glfw.x11.errorCode = Success;\n    XSetErrorHandler(errorHandler);\n}\n\n// Clears the X error handler callback\n//\nvoid _glfwReleaseErrorHandlerX11(void)\n{\n    // Synchronize to make sure all commands are processed\n    XSync(_glfw.x11.display, False);\n    XSetErrorHandler(NULL);\n}\n\n// Reports the specified error, appending information about the last X error\n//\nvoid _glfwInputErrorX11(int error, const char* message)\n{\n    char buffer[_GLFW_MESSAGE_SIZE];\n    XGetErrorText(_glfw.x11.display, _glfw.x11.errorCode,\n                  buffer, sizeof(buffer));\n\n    _glfwInputError(error, \"%s: %s\", message, buffer);\n}\n\n// Creates a native cursor object from the specified image and hotspot\n//\nCursor _glfwCreateCursorX11(const GLFWimage* image, int xhot, int yhot)\n{\n    int i;\n    Cursor cursor;\n\n    if (!_glfw.x11.xcursor.handle)\n        return None;\n\n    XcursorImage* native = XcursorImageCreate(image->width, image->height);\n    if (native == NULL)\n        return None;\n\n    native->xhot = xhot;\n    native->yhot = yhot;\n\n    unsigned char* source = (unsigned char*) image->pixels;\n    XcursorPixel* target = native->pixels;\n\n    for (i = 0;  i < image->width * image->height;  i++, target++, source += 4)\n    {\n        unsigned int alpha = source[3];\n\n        *target = (alpha << 24) |\n                  ((unsigned char) ((source[0] * alpha) / 255) << 16) |\n                  ((unsigned char) ((source[1] * alpha) / 255) <<  8) |\n                  ((unsigned char) ((source[2] * alpha) / 255) <<  0);\n    }\n\n    cursor = XcursorImageLoadCursor(_glfw.x11.display, native);\n    XcursorImageDestroy(native);\n\n    return cursor;\n}\n\n\n//////////////////////////////////////////////////////////////////////////\n//////                       GLFW platform API                      //////\n//////////////////////////////////////////////////////////////////////////\n\nint _glfwPlatformInit(void)\n{\n#if !defined(X_HAVE_UTF8_STRING)\n    // HACK: If the current locale is \"C\" and the Xlib UTF-8 functions are\n    //       unavailable, apply the environment's locale in the hope that it's\n    //       both available and not \"C\"\n    //       This is done because the \"C\" locale breaks wide character input,\n    //       which is what we fall back on when UTF-8 support is missing\n    if (strcmp(setlocale(LC_CTYPE, NULL), \"C\") == 0)\n        setlocale(LC_CTYPE, \"\");\n#endif\n\n    XInitThreads();\n    XrmInitialize();\n\n    _glfw.x11.display = XOpenDisplay(NULL);\n    if (!_glfw.x11.display)\n    {\n        const char* display = getenv(\"DISPLAY\");\n        if (display)\n        {\n            _glfwInputError(GLFW_PLATFORM_ERROR,\n                            \"X11: Failed to open display %s\", display);\n        }\n        else\n        {\n            _glfwInputError(GLFW_PLATFORM_ERROR,\n                            \"X11: The DISPLAY environment variable is missing\");\n        }\n\n        return GLFW_FALSE;\n    }\n\n    _glfw.x11.screen = DefaultScreen(_glfw.x11.display);\n    _glfw.x11.root = RootWindow(_glfw.x11.display, _glfw.x11.screen);\n    _glfw.x11.context = XUniqueContext();\n\n    getSystemContentScale(&_glfw.x11.contentScaleX, &_glfw.x11.contentScaleY);\n\n    if (!initExtensions())\n        return GLFW_FALSE;\n\n    _glfw.x11.helperWindowHandle = createHelperWindow();\n    _glfw.x11.hiddenCursorHandle = createHiddenCursor();\n\n    if (XSupportsLocale())\n    {\n        XSetLocaleModifiers(\"\");\n\n        _glfw.x11.im = XOpenIM(_glfw.x11.display, 0, NULL, NULL);\n        if (_glfw.x11.im)\n        {\n            if (!hasUsableInputMethodStyle())\n            {\n                XCloseIM(_glfw.x11.im);\n                _glfw.x11.im = NULL;\n            }\n        }\n    }\n\n#if defined(__linux__)\n    if (!_glfwInitJoysticksLinux())\n        return GLFW_FALSE;\n#endif\n\n    _glfwInitTimerPOSIX();\n\n    _glfwPollMonitorsX11();\n    return GLFW_TRUE;\n}\n\nvoid _glfwPlatformTerminate(void)\n{\n    if (_glfw.x11.helperWindowHandle)\n    {\n        if (XGetSelectionOwner(_glfw.x11.display, _glfw.x11.CLIPBOARD) ==\n            _glfw.x11.helperWindowHandle)\n        {\n            _glfwPushSelectionToManagerX11();\n        }\n\n        XDestroyWindow(_glfw.x11.display, _glfw.x11.helperWindowHandle);\n        _glfw.x11.helperWindowHandle = None;\n    }\n\n    if (_glfw.x11.hiddenCursorHandle)\n    {\n        XFreeCursor(_glfw.x11.display, _glfw.x11.hiddenCursorHandle);\n        _glfw.x11.hiddenCursorHandle = (Cursor) 0;\n    }\n\n    free(_glfw.x11.primarySelectionString);\n    free(_glfw.x11.clipboardString);\n\n    if (_glfw.x11.im)\n    {\n        XCloseIM(_glfw.x11.im);\n        _glfw.x11.im = NULL;\n    }\n\n    if (_glfw.x11.display)\n    {\n        XCloseDisplay(_glfw.x11.display);\n        _glfw.x11.display = NULL;\n    }\n\n    if (_glfw.x11.x11xcb.handle)\n    {\n        _glfw_dlclose(_glfw.x11.x11xcb.handle);\n        _glfw.x11.x11xcb.handle = NULL;\n    }\n\n    if (_glfw.x11.xcursor.handle)\n    {\n        _glfw_dlclose(_glfw.x11.xcursor.handle);\n        _glfw.x11.xcursor.handle = NULL;\n    }\n\n    if (_glfw.x11.randr.handle)\n    {\n        _glfw_dlclose(_glfw.x11.randr.handle);\n        _glfw.x11.randr.handle = NULL;\n    }\n\n    if (_glfw.x11.xinerama.handle)\n    {\n        _glfw_dlclose(_glfw.x11.xinerama.handle);\n        _glfw.x11.xinerama.handle = NULL;\n    }\n\n    if (_glfw.x11.xrender.handle)\n    {\n        _glfw_dlclose(_glfw.x11.xrender.handle);\n        _glfw.x11.xrender.handle = NULL;\n    }\n\n    if (_glfw.x11.vidmode.handle)\n    {\n        _glfw_dlclose(_glfw.x11.vidmode.handle);\n        _glfw.x11.vidmode.handle = NULL;\n    }\n\n    if (_glfw.x11.xi.handle)\n    {\n        _glfw_dlclose(_glfw.x11.xi.handle);\n        _glfw.x11.xi.handle = NULL;\n    }\n\n    // NOTE: These need to be unloaded after XCloseDisplay, as they register\n    //       cleanup callbacks that get called by that function\n    _glfwTerminateEGL();\n    _glfwTerminateGLX();\n\n#if defined(__linux__)\n    _glfwTerminateJoysticksLinux();\n#endif\n}\n\nconst char* _glfwPlatformGetVersionString(void)\n{\n    return _GLFW_VERSION_NUMBER \" X11 GLX EGL OSMesa\"\n#if defined(_POSIX_TIMERS) && defined(_POSIX_MONOTONIC_CLOCK)\n        \" clock_gettime\"\n#else\n        \" gettimeofday\"\n#endif\n#if defined(__linux__)\n        \" evdev\"\n#endif\n#if defined(_GLFW_BUILD_DLL)\n        \" shared\"\n#endif\n        ;\n}\n\n"
  },
  {
    "path": "thirdparty/glfw/src/x11_monitor.c",
    "content": "//========================================================================\n// GLFW 3.3 X11 - www.glfw.org\n//------------------------------------------------------------------------\n// Copyright (c) 2002-2006 Marcus Geelnard\n// Copyright (c) 2006-2019 Camilla Löwy <elmindreda@glfw.org>\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//    claim that you wrote the original software. If you use this software\n//    in a product, an acknowledgment in the product documentation would\n//    be appreciated but is not required.\n//\n// 2. Altered source versions must be plainly marked as such, and must not\n//    be misrepresented as being the original software.\n//\n// 3. This notice may not be removed or altered from any source\n//    distribution.\n//\n//========================================================================\n// It is fine to use C99 in this file because it will not be built with VS\n//========================================================================\n\n#include \"internal.h\"\n\n#include <limits.h>\n#include <stdlib.h>\n#include <string.h>\n#include <math.h>\n\n\n// Check whether the display mode should be included in enumeration\n//\nstatic GLFWbool modeIsGood(const XRRModeInfo* mi)\n{\n    return (mi->modeFlags & RR_Interlace) == 0;\n}\n\n// Calculates the refresh rate, in Hz, from the specified RandR mode info\n//\nstatic int calculateRefreshRate(const XRRModeInfo* mi)\n{\n    if (mi->hTotal && mi->vTotal)\n        return (int) round((double) mi->dotClock / ((double) mi->hTotal * (double) mi->vTotal));\n    else\n        return 0;\n}\n\n// Returns the mode info for a RandR mode XID\n//\nstatic const XRRModeInfo* getModeInfo(const XRRScreenResources* sr, RRMode id)\n{\n    for (int i = 0;  i < sr->nmode;  i++)\n    {\n        if (sr->modes[i].id == id)\n            return sr->modes + i;\n    }\n\n    return NULL;\n}\n\n// Convert RandR mode info to GLFW video mode\n//\nstatic GLFWvidmode vidmodeFromModeInfo(const XRRModeInfo* mi,\n                                       const XRRCrtcInfo* ci)\n{\n    GLFWvidmode mode;\n\n    if (ci->rotation == RR_Rotate_90 || ci->rotation == RR_Rotate_270)\n    {\n        mode.width  = mi->height;\n        mode.height = mi->width;\n    }\n    else\n    {\n        mode.width  = mi->width;\n        mode.height = mi->height;\n    }\n\n    mode.refreshRate = calculateRefreshRate(mi);\n\n    _glfwSplitBPP(DefaultDepth(_glfw.x11.display, _glfw.x11.screen),\n                  &mode.redBits, &mode.greenBits, &mode.blueBits);\n\n    return mode;\n}\n\n\n//////////////////////////////////////////////////////////////////////////\n//////                       GLFW internal API                      //////\n//////////////////////////////////////////////////////////////////////////\n\n// Poll for changes in the set of connected monitors\n//\nvoid _glfwPollMonitorsX11(void)\n{\n    if (_glfw.x11.randr.available && !_glfw.x11.randr.monitorBroken)\n    {\n        int disconnectedCount, screenCount = 0;\n        _GLFWmonitor** disconnected = NULL;\n        XineramaScreenInfo* screens = NULL;\n        XRRScreenResources* sr = XRRGetScreenResourcesCurrent(_glfw.x11.display,\n                                                              _glfw.x11.root);\n        RROutput primary = XRRGetOutputPrimary(_glfw.x11.display,\n                                               _glfw.x11.root);\n\n        if (_glfw.x11.xinerama.available)\n            screens = XineramaQueryScreens(_glfw.x11.display, &screenCount);\n\n        disconnectedCount = _glfw.monitorCount;\n        if (disconnectedCount)\n        {\n            disconnected = calloc(_glfw.monitorCount, sizeof(_GLFWmonitor*));\n            memcpy(disconnected,\n                   _glfw.monitors,\n                   _glfw.monitorCount * sizeof(_GLFWmonitor*));\n        }\n\n        for (int i = 0;  i < sr->noutput;  i++)\n        {\n            int j, type, widthMM, heightMM;\n\n            XRROutputInfo* oi = XRRGetOutputInfo(_glfw.x11.display, sr, sr->outputs[i]);\n            if (oi->connection != RR_Connected || oi->crtc == None)\n            {\n                XRRFreeOutputInfo(oi);\n                continue;\n            }\n\n            for (j = 0;  j < disconnectedCount;  j++)\n            {\n                if (disconnected[j] &&\n                    disconnected[j]->x11.output == sr->outputs[i])\n                {\n                    disconnected[j] = NULL;\n                    break;\n                }\n            }\n\n            if (j < disconnectedCount)\n            {\n                XRRFreeOutputInfo(oi);\n                continue;\n            }\n\n            XRRCrtcInfo* ci = XRRGetCrtcInfo(_glfw.x11.display, sr, oi->crtc);\n            if (ci->rotation == RR_Rotate_90 || ci->rotation == RR_Rotate_270)\n            {\n                widthMM  = oi->mm_height;\n                heightMM = oi->mm_width;\n            }\n            else\n            {\n                widthMM  = oi->mm_width;\n                heightMM = oi->mm_height;\n            }\n\n            if (widthMM <= 0 || heightMM <= 0)\n            {\n                // HACK: If RandR does not provide a physical size, assume the\n                //       X11 default 96 DPI and calcuate from the CRTC viewport\n                // NOTE: These members are affected by rotation, unlike the mode\n                //       info and output info members\n                widthMM  = (int) (ci->width * 25.4f / 96.f);\n                heightMM = (int) (ci->height * 25.4f / 96.f);\n            }\n\n            _GLFWmonitor* monitor = _glfwAllocMonitor(oi->name, widthMM, heightMM);\n            monitor->x11.output = sr->outputs[i];\n            monitor->x11.crtc   = oi->crtc;\n\n            for (j = 0;  j < screenCount;  j++)\n            {\n                if (screens[j].x_org == ci->x &&\n                    screens[j].y_org == ci->y &&\n                    screens[j].width == ci->width &&\n                    screens[j].height == ci->height)\n                {\n                    monitor->x11.index = j;\n                    break;\n                }\n            }\n\n            if (monitor->x11.output == primary)\n                type = _GLFW_INSERT_FIRST;\n            else\n                type = _GLFW_INSERT_LAST;\n\n            _glfwInputMonitor(monitor, GLFW_CONNECTED, type);\n\n            XRRFreeOutputInfo(oi);\n            XRRFreeCrtcInfo(ci);\n        }\n\n        XRRFreeScreenResources(sr);\n\n        if (screens)\n            XFree(screens);\n\n        for (int i = 0;  i < disconnectedCount;  i++)\n        {\n            if (disconnected[i])\n                _glfwInputMonitor(disconnected[i], GLFW_DISCONNECTED, 0);\n        }\n\n        free(disconnected);\n    }\n    else\n    {\n        const int widthMM = DisplayWidthMM(_glfw.x11.display, _glfw.x11.screen);\n        const int heightMM = DisplayHeightMM(_glfw.x11.display, _glfw.x11.screen);\n\n        _glfwInputMonitor(_glfwAllocMonitor(\"Display\", widthMM, heightMM),\n                          GLFW_CONNECTED,\n                          _GLFW_INSERT_FIRST);\n    }\n}\n\n// Set the current video mode for the specified monitor\n//\nvoid _glfwSetVideoModeX11(_GLFWmonitor* monitor, const GLFWvidmode* desired)\n{\n    if (_glfw.x11.randr.available && !_glfw.x11.randr.monitorBroken)\n    {\n        GLFWvidmode current;\n        RRMode native = None;\n\n        const GLFWvidmode* best = _glfwChooseVideoMode(monitor, desired);\n        _glfwPlatformGetVideoMode(monitor, &current);\n        if (_glfwCompareVideoModes(&current, best) == 0)\n            return;\n\n        XRRScreenResources* sr =\n            XRRGetScreenResourcesCurrent(_glfw.x11.display, _glfw.x11.root);\n        XRRCrtcInfo* ci = XRRGetCrtcInfo(_glfw.x11.display, sr, monitor->x11.crtc);\n        XRROutputInfo* oi = XRRGetOutputInfo(_glfw.x11.display, sr, monitor->x11.output);\n\n        for (int i = 0;  i < oi->nmode;  i++)\n        {\n            const XRRModeInfo* mi = getModeInfo(sr, oi->modes[i]);\n            if (!modeIsGood(mi))\n                continue;\n\n            const GLFWvidmode mode = vidmodeFromModeInfo(mi, ci);\n            if (_glfwCompareVideoModes(best, &mode) == 0)\n            {\n                native = mi->id;\n                break;\n            }\n        }\n\n        if (native)\n        {\n            if (monitor->x11.oldMode == None)\n                monitor->x11.oldMode = ci->mode;\n\n            XRRSetCrtcConfig(_glfw.x11.display,\n                             sr, monitor->x11.crtc,\n                             CurrentTime,\n                             ci->x, ci->y,\n                             native,\n                             ci->rotation,\n                             ci->outputs,\n                             ci->noutput);\n        }\n\n        XRRFreeOutputInfo(oi);\n        XRRFreeCrtcInfo(ci);\n        XRRFreeScreenResources(sr);\n    }\n}\n\n// Restore the saved (original) video mode for the specified monitor\n//\nvoid _glfwRestoreVideoModeX11(_GLFWmonitor* monitor)\n{\n    if (_glfw.x11.randr.available && !_glfw.x11.randr.monitorBroken)\n    {\n        if (monitor->x11.oldMode == None)\n            return;\n\n        XRRScreenResources* sr =\n            XRRGetScreenResourcesCurrent(_glfw.x11.display, _glfw.x11.root);\n        XRRCrtcInfo* ci = XRRGetCrtcInfo(_glfw.x11.display, sr, monitor->x11.crtc);\n\n        XRRSetCrtcConfig(_glfw.x11.display,\n                         sr, monitor->x11.crtc,\n                         CurrentTime,\n                         ci->x, ci->y,\n                         monitor->x11.oldMode,\n                         ci->rotation,\n                         ci->outputs,\n                         ci->noutput);\n\n        XRRFreeCrtcInfo(ci);\n        XRRFreeScreenResources(sr);\n\n        monitor->x11.oldMode = None;\n    }\n}\n\n\n//////////////////////////////////////////////////////////////////////////\n//////                       GLFW platform API                      //////\n//////////////////////////////////////////////////////////////////////////\n\nvoid _glfwPlatformFreeMonitor(_GLFWmonitor* monitor)\n{\n}\n\nvoid _glfwPlatformGetMonitorPos(_GLFWmonitor* monitor, int* xpos, int* ypos)\n{\n    if (_glfw.x11.randr.available && !_glfw.x11.randr.monitorBroken)\n    {\n        XRRScreenResources* sr =\n            XRRGetScreenResourcesCurrent(_glfw.x11.display, _glfw.x11.root);\n        XRRCrtcInfo* ci = XRRGetCrtcInfo(_glfw.x11.display, sr, monitor->x11.crtc);\n\n        if (ci)\n        {\n            if (xpos)\n                *xpos = ci->x;\n            if (ypos)\n                *ypos = ci->y;\n\n            XRRFreeCrtcInfo(ci);\n        }\n\n        XRRFreeScreenResources(sr);\n    }\n}\n\nvoid _glfwPlatformGetMonitorContentScale(_GLFWmonitor* monitor,\n                                         float* xscale, float* yscale)\n{\n    if (xscale)\n        *xscale = _glfw.x11.contentScaleX;\n    if (yscale)\n        *yscale = _glfw.x11.contentScaleY;\n}\n\nvoid _glfwPlatformGetMonitorWorkarea(_GLFWmonitor* monitor, int* xpos, int* ypos, int* width, int* height)\n{\n    int areaX = 0, areaY = 0, areaWidth = 0, areaHeight = 0;\n\n    if (_glfw.x11.randr.available && !_glfw.x11.randr.monitorBroken)\n    {\n        XRRScreenResources* sr =\n            XRRGetScreenResourcesCurrent(_glfw.x11.display, _glfw.x11.root);\n        XRRCrtcInfo* ci = XRRGetCrtcInfo(_glfw.x11.display, sr, monitor->x11.crtc);\n\n        areaX = ci->x;\n        areaY = ci->y;\n\n        const XRRModeInfo* mi = getModeInfo(sr, ci->mode);\n\n        if (ci->rotation == RR_Rotate_90 || ci->rotation == RR_Rotate_270)\n        {\n            areaWidth  = mi->height;\n            areaHeight = mi->width;\n        }\n        else\n        {\n            areaWidth  = mi->width;\n            areaHeight = mi->height;\n        }\n\n        XRRFreeCrtcInfo(ci);\n        XRRFreeScreenResources(sr);\n    }\n    else\n    {\n        areaWidth  = DisplayWidth(_glfw.x11.display, _glfw.x11.screen);\n        areaHeight = DisplayHeight(_glfw.x11.display, _glfw.x11.screen);\n    }\n\n    if (_glfw.x11.NET_WORKAREA && _glfw.x11.NET_CURRENT_DESKTOP)\n    {\n        Atom* extents = NULL;\n        Atom* desktop = NULL;\n        const unsigned long extentCount =\n            _glfwGetWindowPropertyX11(_glfw.x11.root,\n                                      _glfw.x11.NET_WORKAREA,\n                                      XA_CARDINAL,\n                                      (unsigned char**) &extents);\n\n        if (_glfwGetWindowPropertyX11(_glfw.x11.root,\n                                      _glfw.x11.NET_CURRENT_DESKTOP,\n                                      XA_CARDINAL,\n                                      (unsigned char**) &desktop) > 0)\n        {\n            if (extentCount >= 4 && *desktop < extentCount / 4)\n            {\n                const int globalX = extents[*desktop * 4 + 0];\n                const int globalY = extents[*desktop * 4 + 1];\n                const int globalWidth  = extents[*desktop * 4 + 2];\n                const int globalHeight = extents[*desktop * 4 + 3];\n\n                if (areaX < globalX)\n                {\n                    areaWidth -= globalX - areaX;\n                    areaX = globalX;\n                }\n\n                if (areaY < globalY)\n                {\n                    areaHeight -= globalY - areaY;\n                    areaY = globalY;\n                }\n\n                if (areaX + areaWidth > globalX + globalWidth)\n                    areaWidth = globalX - areaX + globalWidth;\n                if (areaY + areaHeight > globalY + globalHeight)\n                    areaHeight = globalY - areaY + globalHeight;\n            }\n        }\n\n        if (extents)\n            XFree(extents);\n        if (desktop)\n            XFree(desktop);\n    }\n\n    if (xpos)\n        *xpos = areaX;\n    if (ypos)\n        *ypos = areaY;\n    if (width)\n        *width = areaWidth;\n    if (height)\n        *height = areaHeight;\n}\n\nGLFWvidmode* _glfwPlatformGetVideoModes(_GLFWmonitor* monitor, int* count)\n{\n    GLFWvidmode* result;\n\n    *count = 0;\n\n    if (_glfw.x11.randr.available && !_glfw.x11.randr.monitorBroken)\n    {\n        XRRScreenResources* sr =\n            XRRGetScreenResourcesCurrent(_glfw.x11.display, _glfw.x11.root);\n        XRRCrtcInfo* ci = XRRGetCrtcInfo(_glfw.x11.display, sr, monitor->x11.crtc);\n        XRROutputInfo* oi = XRRGetOutputInfo(_glfw.x11.display, sr, monitor->x11.output);\n\n        result = calloc(oi->nmode, sizeof(GLFWvidmode));\n\n        for (int i = 0;  i < oi->nmode;  i++)\n        {\n            const XRRModeInfo* mi = getModeInfo(sr, oi->modes[i]);\n            if (!modeIsGood(mi))\n                continue;\n\n            const GLFWvidmode mode = vidmodeFromModeInfo(mi, ci);\n            int j;\n\n            for (j = 0;  j < *count;  j++)\n            {\n                if (_glfwCompareVideoModes(result + j, &mode) == 0)\n                    break;\n            }\n\n            // Skip duplicate modes\n            if (j < *count)\n                continue;\n\n            (*count)++;\n            result[*count - 1] = mode;\n        }\n\n        XRRFreeOutputInfo(oi);\n        XRRFreeCrtcInfo(ci);\n        XRRFreeScreenResources(sr);\n    }\n    else\n    {\n        *count = 1;\n        result = calloc(1, sizeof(GLFWvidmode));\n        _glfwPlatformGetVideoMode(monitor, result);\n    }\n\n    return result;\n}\n\nvoid _glfwPlatformGetVideoMode(_GLFWmonitor* monitor, GLFWvidmode* mode)\n{\n    if (_glfw.x11.randr.available && !_glfw.x11.randr.monitorBroken)\n    {\n        XRRScreenResources* sr =\n            XRRGetScreenResourcesCurrent(_glfw.x11.display, _glfw.x11.root);\n        XRRCrtcInfo* ci = XRRGetCrtcInfo(_glfw.x11.display, sr, monitor->x11.crtc);\n\n        if (ci)\n        {\n            const XRRModeInfo* mi = getModeInfo(sr, ci->mode);\n            if (mi)  // mi can be NULL if the monitor has been disconnected\n                *mode = vidmodeFromModeInfo(mi, ci);\n\n            XRRFreeCrtcInfo(ci);\n        }\n\n        XRRFreeScreenResources(sr);\n    }\n    else\n    {\n        mode->width = DisplayWidth(_glfw.x11.display, _glfw.x11.screen);\n        mode->height = DisplayHeight(_glfw.x11.display, _glfw.x11.screen);\n        mode->refreshRate = 0;\n\n        _glfwSplitBPP(DefaultDepth(_glfw.x11.display, _glfw.x11.screen),\n                      &mode->redBits, &mode->greenBits, &mode->blueBits);\n    }\n}\n\nGLFWbool _glfwPlatformGetGammaRamp(_GLFWmonitor* monitor, GLFWgammaramp* ramp)\n{\n    if (_glfw.x11.randr.available && !_glfw.x11.randr.gammaBroken)\n    {\n        const size_t size = XRRGetCrtcGammaSize(_glfw.x11.display,\n                                                monitor->x11.crtc);\n        XRRCrtcGamma* gamma = XRRGetCrtcGamma(_glfw.x11.display,\n                                              monitor->x11.crtc);\n\n        _glfwAllocGammaArrays(ramp, size);\n\n        memcpy(ramp->red,   gamma->red,   size * sizeof(unsigned short));\n        memcpy(ramp->green, gamma->green, size * sizeof(unsigned short));\n        memcpy(ramp->blue,  gamma->blue,  size * sizeof(unsigned short));\n\n        XRRFreeGamma(gamma);\n        return GLFW_TRUE;\n    }\n    else if (_glfw.x11.vidmode.available)\n    {\n        int size;\n        XF86VidModeGetGammaRampSize(_glfw.x11.display, _glfw.x11.screen, &size);\n\n        _glfwAllocGammaArrays(ramp, size);\n\n        XF86VidModeGetGammaRamp(_glfw.x11.display,\n                                _glfw.x11.screen,\n                                ramp->size, ramp->red, ramp->green, ramp->blue);\n        return GLFW_TRUE;\n    }\n    else\n    {\n        _glfwInputError(GLFW_PLATFORM_ERROR,\n                        \"X11: Gamma ramp access not supported by server\");\n        return GLFW_FALSE;\n    }\n}\n\nvoid _glfwPlatformSetGammaRamp(_GLFWmonitor* monitor, const GLFWgammaramp* ramp)\n{\n    if (_glfw.x11.randr.available && !_glfw.x11.randr.gammaBroken)\n    {\n        if (XRRGetCrtcGammaSize(_glfw.x11.display, monitor->x11.crtc) != ramp->size)\n        {\n            _glfwInputError(GLFW_PLATFORM_ERROR,\n                            \"X11: Gamma ramp size must match current ramp size\");\n            return;\n        }\n\n        XRRCrtcGamma* gamma = XRRAllocGamma(ramp->size);\n\n        memcpy(gamma->red,   ramp->red,   ramp->size * sizeof(unsigned short));\n        memcpy(gamma->green, ramp->green, ramp->size * sizeof(unsigned short));\n        memcpy(gamma->blue,  ramp->blue,  ramp->size * sizeof(unsigned short));\n\n        XRRSetCrtcGamma(_glfw.x11.display, monitor->x11.crtc, gamma);\n        XRRFreeGamma(gamma);\n    }\n    else if (_glfw.x11.vidmode.available)\n    {\n        XF86VidModeSetGammaRamp(_glfw.x11.display,\n                                _glfw.x11.screen,\n                                ramp->size,\n                                (unsigned short*) ramp->red,\n                                (unsigned short*) ramp->green,\n                                (unsigned short*) ramp->blue);\n    }\n    else\n    {\n        _glfwInputError(GLFW_PLATFORM_ERROR,\n                        \"X11: Gamma ramp access not supported by server\");\n    }\n}\n\n\n//////////////////////////////////////////////////////////////////////////\n//////                        GLFW native API                       //////\n//////////////////////////////////////////////////////////////////////////\n\nGLFWAPI RRCrtc glfwGetX11Adapter(GLFWmonitor* handle)\n{\n    _GLFWmonitor* monitor = (_GLFWmonitor*) handle;\n    _GLFW_REQUIRE_INIT_OR_RETURN(None);\n    return monitor->x11.crtc;\n}\n\nGLFWAPI RROutput glfwGetX11Monitor(GLFWmonitor* handle)\n{\n    _GLFWmonitor* monitor = (_GLFWmonitor*) handle;\n    _GLFW_REQUIRE_INIT_OR_RETURN(None);\n    return monitor->x11.output;\n}\n\n"
  },
  {
    "path": "thirdparty/glfw/src/x11_platform.h",
    "content": "//========================================================================\n// GLFW 3.3 X11 - www.glfw.org\n//------------------------------------------------------------------------\n// Copyright (c) 2002-2006 Marcus Geelnard\n// Copyright (c) 2006-2019 Camilla Löwy <elmindreda@glfw.org>\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//    claim that you wrote the original software. If you use this software\n//    in a product, an acknowledgment in the product documentation would\n//    be appreciated but is not required.\n//\n// 2. Altered source versions must be plainly marked as such, and must not\n//    be misrepresented as being the original software.\n//\n// 3. This notice may not be removed or altered from any source\n//    distribution.\n//\n//========================================================================\n\n#include <unistd.h>\n#include <signal.h>\n#include <stdint.h>\n#include <dlfcn.h>\n\n#include <X11/Xlib.h>\n#include <X11/keysym.h>\n#include <X11/Xatom.h>\n#include <X11/Xcursor/Xcursor.h>\n\n// The XRandR extension provides mode setting and gamma control\n#include <X11/extensions/Xrandr.h>\n\n// The Xkb extension provides improved keyboard support\n#include <X11/XKBlib.h>\n\n// The Xinerama extension provides legacy monitor indices\n#include <X11/extensions/Xinerama.h>\n\n// The XInput extension provides raw mouse motion input\n#include <X11/extensions/XInput2.h>\n\ntypedef XRRCrtcGamma* (* PFN_XRRAllocGamma)(int);\ntypedef void (* PFN_XRRFreeCrtcInfo)(XRRCrtcInfo*);\ntypedef void (* PFN_XRRFreeGamma)(XRRCrtcGamma*);\ntypedef void (* PFN_XRRFreeOutputInfo)(XRROutputInfo*);\ntypedef void (* PFN_XRRFreeScreenResources)(XRRScreenResources*);\ntypedef XRRCrtcGamma* (* PFN_XRRGetCrtcGamma)(Display*,RRCrtc);\ntypedef int (* PFN_XRRGetCrtcGammaSize)(Display*,RRCrtc);\ntypedef XRRCrtcInfo* (* PFN_XRRGetCrtcInfo) (Display*,XRRScreenResources*,RRCrtc);\ntypedef XRROutputInfo* (* PFN_XRRGetOutputInfo)(Display*,XRRScreenResources*,RROutput);\ntypedef RROutput (* PFN_XRRGetOutputPrimary)(Display*,Window);\ntypedef XRRScreenResources* (* PFN_XRRGetScreenResourcesCurrent)(Display*,Window);\ntypedef Bool (* PFN_XRRQueryExtension)(Display*,int*,int*);\ntypedef Status (* PFN_XRRQueryVersion)(Display*,int*,int*);\ntypedef void (* PFN_XRRSelectInput)(Display*,Window,int);\ntypedef Status (* PFN_XRRSetCrtcConfig)(Display*,XRRScreenResources*,RRCrtc,Time,int,int,RRMode,Rotation,RROutput*,int);\ntypedef void (* PFN_XRRSetCrtcGamma)(Display*,RRCrtc,XRRCrtcGamma*);\ntypedef int (* PFN_XRRUpdateConfiguration)(XEvent*);\n#define XRRAllocGamma _glfw.x11.randr.AllocGamma\n#define XRRFreeCrtcInfo _glfw.x11.randr.FreeCrtcInfo\n#define XRRFreeGamma _glfw.x11.randr.FreeGamma\n#define XRRFreeOutputInfo _glfw.x11.randr.FreeOutputInfo\n#define XRRFreeScreenResources _glfw.x11.randr.FreeScreenResources\n#define XRRGetCrtcGamma _glfw.x11.randr.GetCrtcGamma\n#define XRRGetCrtcGammaSize _glfw.x11.randr.GetCrtcGammaSize\n#define XRRGetCrtcInfo _glfw.x11.randr.GetCrtcInfo\n#define XRRGetOutputInfo _glfw.x11.randr.GetOutputInfo\n#define XRRGetOutputPrimary _glfw.x11.randr.GetOutputPrimary\n#define XRRGetScreenResourcesCurrent _glfw.x11.randr.GetScreenResourcesCurrent\n#define XRRQueryExtension _glfw.x11.randr.QueryExtension\n#define XRRQueryVersion _glfw.x11.randr.QueryVersion\n#define XRRSelectInput _glfw.x11.randr.SelectInput\n#define XRRSetCrtcConfig _glfw.x11.randr.SetCrtcConfig\n#define XRRSetCrtcGamma _glfw.x11.randr.SetCrtcGamma\n#define XRRUpdateConfiguration _glfw.x11.randr.UpdateConfiguration\n\ntypedef XcursorImage* (* PFN_XcursorImageCreate)(int,int);\ntypedef void (* PFN_XcursorImageDestroy)(XcursorImage*);\ntypedef Cursor (* PFN_XcursorImageLoadCursor)(Display*,const XcursorImage*);\n#define XcursorImageCreate _glfw.x11.xcursor.ImageCreate\n#define XcursorImageDestroy _glfw.x11.xcursor.ImageDestroy\n#define XcursorImageLoadCursor _glfw.x11.xcursor.ImageLoadCursor\n\ntypedef Bool (* PFN_XineramaIsActive)(Display*);\ntypedef Bool (* PFN_XineramaQueryExtension)(Display*,int*,int*);\ntypedef XineramaScreenInfo* (* PFN_XineramaQueryScreens)(Display*,int*);\n#define XineramaIsActive _glfw.x11.xinerama.IsActive\n#define XineramaQueryExtension _glfw.x11.xinerama.QueryExtension\n#define XineramaQueryScreens _glfw.x11.xinerama.QueryScreens\n\ntypedef XID xcb_window_t;\ntypedef XID xcb_visualid_t;\ntypedef struct xcb_connection_t xcb_connection_t;\ntypedef xcb_connection_t* (* PFN_XGetXCBConnection)(Display*);\n#define XGetXCBConnection _glfw.x11.x11xcb.GetXCBConnection\n\ntypedef Bool (* PFN_XF86VidModeQueryExtension)(Display*,int*,int*);\ntypedef Bool (* PFN_XF86VidModeGetGammaRamp)(Display*,int,int,unsigned short*,unsigned short*,unsigned short*);\ntypedef Bool (* PFN_XF86VidModeSetGammaRamp)(Display*,int,int,unsigned short*,unsigned short*,unsigned short*);\ntypedef Bool (* PFN_XF86VidModeGetGammaRampSize)(Display*,int,int*);\n#define XF86VidModeQueryExtension _glfw.x11.vidmode.QueryExtension\n#define XF86VidModeGetGammaRamp _glfw.x11.vidmode.GetGammaRamp\n#define XF86VidModeSetGammaRamp _glfw.x11.vidmode.SetGammaRamp\n#define XF86VidModeGetGammaRampSize _glfw.x11.vidmode.GetGammaRampSize\n\ntypedef Status (* PFN_XIQueryVersion)(Display*,int*,int*);\ntypedef int (* PFN_XISelectEvents)(Display*,Window,XIEventMask*,int);\n#define XIQueryVersion _glfw.x11.xi.QueryVersion\n#define XISelectEvents _glfw.x11.xi.SelectEvents\n\ntypedef Bool (* PFN_XRenderQueryExtension)(Display*,int*,int*);\ntypedef Status (* PFN_XRenderQueryVersion)(Display*dpy,int*,int*);\ntypedef XRenderPictFormat* (* PFN_XRenderFindVisualFormat)(Display*,Visual const*);\n#define XRenderQueryExtension _glfw.x11.xrender.QueryExtension\n#define XRenderQueryVersion _glfw.x11.xrender.QueryVersion\n#define XRenderFindVisualFormat _glfw.x11.xrender.FindVisualFormat\n\ntypedef VkFlags VkXlibSurfaceCreateFlagsKHR;\ntypedef VkFlags VkXcbSurfaceCreateFlagsKHR;\n\ntypedef struct VkXlibSurfaceCreateInfoKHR\n{\n    VkStructureType             sType;\n    const void*                 pNext;\n    VkXlibSurfaceCreateFlagsKHR flags;\n    Display*                    dpy;\n    Window                      window;\n} VkXlibSurfaceCreateInfoKHR;\n\ntypedef struct VkXcbSurfaceCreateInfoKHR\n{\n    VkStructureType             sType;\n    const void*                 pNext;\n    VkXcbSurfaceCreateFlagsKHR  flags;\n    xcb_connection_t*           connection;\n    xcb_window_t                window;\n} VkXcbSurfaceCreateInfoKHR;\n\ntypedef VkResult (APIENTRY *PFN_vkCreateXlibSurfaceKHR)(VkInstance,const VkXlibSurfaceCreateInfoKHR*,const VkAllocationCallbacks*,VkSurfaceKHR*);\ntypedef VkBool32 (APIENTRY *PFN_vkGetPhysicalDeviceXlibPresentationSupportKHR)(VkPhysicalDevice,uint32_t,Display*,VisualID);\ntypedef VkResult (APIENTRY *PFN_vkCreateXcbSurfaceKHR)(VkInstance,const VkXcbSurfaceCreateInfoKHR*,const VkAllocationCallbacks*,VkSurfaceKHR*);\ntypedef VkBool32 (APIENTRY *PFN_vkGetPhysicalDeviceXcbPresentationSupportKHR)(VkPhysicalDevice,uint32_t,xcb_connection_t*,xcb_visualid_t);\n\n#include \"posix_thread.h\"\n#include \"posix_time.h\"\n#include \"xkb_unicode.h\"\n#include \"glx_context.h\"\n#include \"egl_context.h\"\n#include \"osmesa_context.h\"\n#if defined(__linux__)\n#include \"linux_joystick.h\"\n#else\n#include \"null_joystick.h\"\n#endif\n\n#define _glfw_dlopen(name) dlopen(name, RTLD_LAZY | RTLD_LOCAL)\n#define _glfw_dlclose(handle) dlclose(handle)\n#define _glfw_dlsym(handle, name) dlsym(handle, name)\n\n#define _GLFW_EGL_NATIVE_WINDOW  ((EGLNativeWindowType) window->x11.handle)\n#define _GLFW_EGL_NATIVE_DISPLAY ((EGLNativeDisplayType) _glfw.x11.display)\n\n#define _GLFW_PLATFORM_WINDOW_STATE         _GLFWwindowX11  x11\n#define _GLFW_PLATFORM_LIBRARY_WINDOW_STATE _GLFWlibraryX11 x11\n#define _GLFW_PLATFORM_MONITOR_STATE        _GLFWmonitorX11 x11\n#define _GLFW_PLATFORM_CURSOR_STATE         _GLFWcursorX11  x11\n\n\n// X11-specific per-window data\n//\ntypedef struct _GLFWwindowX11\n{\n    Colormap        colormap;\n    Window          handle;\n    Window          parent;\n    XIC             ic;\n\n    GLFWbool        overrideRedirect;\n    GLFWbool        iconified;\n    GLFWbool        maximized;\n\n    // Whether the visual supports framebuffer transparency\n    GLFWbool        transparent;\n\n    // Cached position and size used to filter out duplicate events\n    int             width, height;\n    int             xpos, ypos;\n\n    // The last received cursor position, regardless of source\n    int             lastCursorPosX, lastCursorPosY;\n    // The last position the cursor was warped to by GLFW\n    int             warpCursorPosX, warpCursorPosY;\n\n    // The time of the last KeyPress event\n    Time            lastKeyTime;\n\n} _GLFWwindowX11;\n\n// X11-specific global data\n//\ntypedef struct _GLFWlibraryX11\n{\n    Display*        display;\n    int             screen;\n    Window          root;\n\n    // System content scale\n    float           contentScaleX, contentScaleY;\n    // Helper window for IPC\n    Window          helperWindowHandle;\n    // Invisible cursor for hidden cursor mode\n    Cursor          hiddenCursorHandle;\n    // Context for mapping window XIDs to _GLFWwindow pointers\n    XContext        context;\n    // XIM input method\n    XIM             im;\n    // Most recent error code received by X error handler\n    int             errorCode;\n    // Primary selection string (while the primary selection is owned)\n    char*           primarySelectionString;\n    // Clipboard string (while the selection is owned)\n    char*           clipboardString;\n    // Key name string\n    char            keynames[GLFW_KEY_LAST + 1][5];\n    // X11 keycode to GLFW key LUT\n    short int       keycodes[256];\n    // GLFW key to X11 keycode LUT\n    short int       scancodes[GLFW_KEY_LAST + 1];\n    // Where to place the cursor when re-enabled\n    double          restoreCursorPosX, restoreCursorPosY;\n    // The window whose disabled cursor mode is active\n    _GLFWwindow*    disabledCursorWindow;\n\n    // Window manager atoms\n    Atom            NET_SUPPORTED;\n    Atom            NET_SUPPORTING_WM_CHECK;\n    Atom            WM_PROTOCOLS;\n    Atom            WM_STATE;\n    Atom            WM_DELETE_WINDOW;\n    Atom            NET_WM_NAME;\n    Atom            NET_WM_ICON_NAME;\n    Atom            NET_WM_ICON;\n    Atom            NET_WM_PID;\n    Atom            NET_WM_PING;\n    Atom            NET_WM_WINDOW_TYPE;\n    Atom            NET_WM_WINDOW_TYPE_NORMAL;\n    Atom            NET_WM_STATE;\n    Atom            NET_WM_STATE_ABOVE;\n    Atom            NET_WM_STATE_FULLSCREEN;\n    Atom            NET_WM_STATE_MAXIMIZED_VERT;\n    Atom            NET_WM_STATE_MAXIMIZED_HORZ;\n    Atom            NET_WM_STATE_DEMANDS_ATTENTION;\n    Atom            NET_WM_BYPASS_COMPOSITOR;\n    Atom            NET_WM_FULLSCREEN_MONITORS;\n    Atom            NET_WM_WINDOW_OPACITY;\n    Atom            NET_WM_CM_Sx;\n    Atom            NET_WORKAREA;\n    Atom            NET_CURRENT_DESKTOP;\n    Atom            NET_ACTIVE_WINDOW;\n    Atom            NET_FRAME_EXTENTS;\n    Atom            NET_REQUEST_FRAME_EXTENTS;\n    Atom            MOTIF_WM_HINTS;\n\n    // Xdnd (drag and drop) atoms\n    Atom            XdndAware;\n    Atom            XdndEnter;\n    Atom            XdndPosition;\n    Atom            XdndStatus;\n    Atom            XdndActionCopy;\n    Atom            XdndDrop;\n    Atom            XdndFinished;\n    Atom            XdndSelection;\n    Atom            XdndTypeList;\n    Atom            text_uri_list;\n\n    // Selection (clipboard) atoms\n    Atom            TARGETS;\n    Atom            MULTIPLE;\n    Atom            INCR;\n    Atom            CLIPBOARD;\n    Atom            PRIMARY;\n    Atom            CLIPBOARD_MANAGER;\n    Atom            SAVE_TARGETS;\n    Atom            NULL_;\n    Atom            UTF8_STRING;\n    Atom            COMPOUND_STRING;\n    Atom            ATOM_PAIR;\n    Atom            GLFW_SELECTION;\n\n    struct {\n        GLFWbool    available;\n        void*       handle;\n        int         eventBase;\n        int         errorBase;\n        int         major;\n        int         minor;\n        GLFWbool    gammaBroken;\n        GLFWbool    monitorBroken;\n        PFN_XRRAllocGamma AllocGamma;\n        PFN_XRRFreeCrtcInfo FreeCrtcInfo;\n        PFN_XRRFreeGamma FreeGamma;\n        PFN_XRRFreeOutputInfo FreeOutputInfo;\n        PFN_XRRFreeScreenResources FreeScreenResources;\n        PFN_XRRGetCrtcGamma GetCrtcGamma;\n        PFN_XRRGetCrtcGammaSize GetCrtcGammaSize;\n        PFN_XRRGetCrtcInfo GetCrtcInfo;\n        PFN_XRRGetOutputInfo GetOutputInfo;\n        PFN_XRRGetOutputPrimary GetOutputPrimary;\n        PFN_XRRGetScreenResourcesCurrent GetScreenResourcesCurrent;\n        PFN_XRRQueryExtension QueryExtension;\n        PFN_XRRQueryVersion QueryVersion;\n        PFN_XRRSelectInput SelectInput;\n        PFN_XRRSetCrtcConfig SetCrtcConfig;\n        PFN_XRRSetCrtcGamma SetCrtcGamma;\n        PFN_XRRUpdateConfiguration UpdateConfiguration;\n    } randr;\n\n    struct {\n        GLFWbool     available;\n        GLFWbool     detectable;\n        int          majorOpcode;\n        int          eventBase;\n        int          errorBase;\n        int          major;\n        int          minor;\n        unsigned int group;\n    } xkb;\n\n    struct {\n        int         count;\n        int         timeout;\n        int         interval;\n        int         blanking;\n        int         exposure;\n    } saver;\n\n    struct {\n        int         version;\n        Window      source;\n        Atom        format;\n    } xdnd;\n\n    struct {\n        void*       handle;\n        PFN_XcursorImageCreate ImageCreate;\n        PFN_XcursorImageDestroy ImageDestroy;\n        PFN_XcursorImageLoadCursor ImageLoadCursor;\n    } xcursor;\n\n    struct {\n        GLFWbool    available;\n        void*       handle;\n        int         major;\n        int         minor;\n        PFN_XineramaIsActive IsActive;\n        PFN_XineramaQueryExtension QueryExtension;\n        PFN_XineramaQueryScreens QueryScreens;\n    } xinerama;\n\n    struct {\n        void*       handle;\n        PFN_XGetXCBConnection GetXCBConnection;\n    } x11xcb;\n\n    struct {\n        GLFWbool    available;\n        void*       handle;\n        int         eventBase;\n        int         errorBase;\n        PFN_XF86VidModeQueryExtension QueryExtension;\n        PFN_XF86VidModeGetGammaRamp GetGammaRamp;\n        PFN_XF86VidModeSetGammaRamp SetGammaRamp;\n        PFN_XF86VidModeGetGammaRampSize GetGammaRampSize;\n    } vidmode;\n\n    struct {\n        GLFWbool    available;\n        void*       handle;\n        int         majorOpcode;\n        int         eventBase;\n        int         errorBase;\n        int         major;\n        int         minor;\n        PFN_XIQueryVersion QueryVersion;\n        PFN_XISelectEvents SelectEvents;\n    } xi;\n\n    struct {\n        GLFWbool    available;\n        void*       handle;\n        int         major;\n        int         minor;\n        int         eventBase;\n        int         errorBase;\n        PFN_XRenderQueryExtension QueryExtension;\n        PFN_XRenderQueryVersion QueryVersion;\n        PFN_XRenderFindVisualFormat FindVisualFormat;\n    } xrender;\n\n} _GLFWlibraryX11;\n\n// X11-specific per-monitor data\n//\ntypedef struct _GLFWmonitorX11\n{\n    RROutput        output;\n    RRCrtc          crtc;\n    RRMode          oldMode;\n\n    // Index of corresponding Xinerama screen,\n    // for EWMH full screen window placement\n    int             index;\n\n} _GLFWmonitorX11;\n\n// X11-specific per-cursor data\n//\ntypedef struct _GLFWcursorX11\n{\n    Cursor handle;\n\n} _GLFWcursorX11;\n\n\nvoid _glfwPollMonitorsX11(void);\nvoid _glfwSetVideoModeX11(_GLFWmonitor* monitor, const GLFWvidmode* desired);\nvoid _glfwRestoreVideoModeX11(_GLFWmonitor* monitor);\n\nCursor _glfwCreateCursorX11(const GLFWimage* image, int xhot, int yhot);\n\nunsigned long _glfwGetWindowPropertyX11(Window window,\n                                        Atom property,\n                                        Atom type,\n                                        unsigned char** value);\nGLFWbool _glfwIsVisualTransparentX11(Visual* visual);\n\nvoid _glfwGrabErrorHandlerX11(void);\nvoid _glfwReleaseErrorHandlerX11(void);\nvoid _glfwInputErrorX11(int error, const char* message);\n\nvoid _glfwPushSelectionToManagerX11(void);\n\n"
  },
  {
    "path": "thirdparty/glfw/src/x11_window.c",
    "content": "//========================================================================\n// GLFW 3.3 X11 - www.glfw.org\n//------------------------------------------------------------------------\n// Copyright (c) 2002-2006 Marcus Geelnard\n// Copyright (c) 2006-2019 Camilla Löwy <elmindreda@glfw.org>\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//    claim that you wrote the original software. If you use this software\n//    in a product, an acknowledgment in the product documentation would\n//    be appreciated but is not required.\n//\n// 2. Altered source versions must be plainly marked as such, and must not\n//    be misrepresented as being the original software.\n//\n// 3. This notice may not be removed or altered from any source\n//    distribution.\n//\n//========================================================================\n// It is fine to use C99 in this file because it will not be built with VS\n//========================================================================\n\n#include \"internal.h\"\n\n#include <X11/cursorfont.h>\n#include <X11/Xmd.h>\n\n#include <sys/select.h>\n\n#include <string.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <limits.h>\n#include <errno.h>\n#include <assert.h>\n\n// Action for EWMH client messages\n#define _NET_WM_STATE_REMOVE        0\n#define _NET_WM_STATE_ADD           1\n#define _NET_WM_STATE_TOGGLE        2\n\n// Additional mouse button names for XButtonEvent\n#define Button6            6\n#define Button7            7\n\n// Motif WM hints flags\n#define MWM_HINTS_DECORATIONS   2\n#define MWM_DECOR_ALL           1\n\n#define _GLFW_XDND_VERSION 5\n\n\n// Wait for data to arrive using select\n// This avoids blocking other threads via the per-display Xlib lock that also\n// covers GLX functions\n//\nstatic GLFWbool waitForEvent(double* timeout)\n{\n    fd_set fds;\n    const int fd = ConnectionNumber(_glfw.x11.display);\n    int count = fd + 1;\n\n#if defined(__linux__)\n    if (_glfw.linjs.inotify > fd)\n        count = _glfw.linjs.inotify + 1;\n#endif\n    for (;;)\n    {\n        FD_ZERO(&fds);\n        FD_SET(fd, &fds);\n#if defined(__linux__)\n        if (_glfw.linjs.inotify > 0)\n            FD_SET(_glfw.linjs.inotify, &fds);\n#endif\n\n        if (timeout)\n        {\n            const long seconds = (long) *timeout;\n            const long microseconds = (long) ((*timeout - seconds) * 1e6);\n            struct timeval tv = { seconds, microseconds };\n            const uint64_t base = _glfwPlatformGetTimerValue();\n\n            const int result = select(count, &fds, NULL, NULL, &tv);\n            const int error = errno;\n\n            *timeout -= (_glfwPlatformGetTimerValue() - base) /\n                (double) _glfwPlatformGetTimerFrequency();\n\n            if (result > 0)\n                return GLFW_TRUE;\n            if ((result == -1 && error == EINTR) || *timeout <= 0.0)\n                return GLFW_FALSE;\n        }\n        else if (select(count, &fds, NULL, NULL, NULL) != -1 || errno != EINTR)\n            return GLFW_TRUE;\n    }\n}\n\n// Waits until a VisibilityNotify event arrives for the specified window or the\n// timeout period elapses (ICCCM section 4.2.2)\n//\nstatic GLFWbool waitForVisibilityNotify(_GLFWwindow* window)\n{\n    XEvent dummy;\n    double timeout = 0.1;\n\n    while (!XCheckTypedWindowEvent(_glfw.x11.display,\n                                   window->x11.handle,\n                                   VisibilityNotify,\n                                   &dummy))\n    {\n        if (!waitForEvent(&timeout))\n            return GLFW_FALSE;\n    }\n\n    return GLFW_TRUE;\n}\n\n// Returns whether the window is iconified\n//\nstatic int getWindowState(_GLFWwindow* window)\n{\n    int result = WithdrawnState;\n    struct {\n        CARD32 state;\n        Window icon;\n    } *state = NULL;\n\n    if (_glfwGetWindowPropertyX11(window->x11.handle,\n                                  _glfw.x11.WM_STATE,\n                                  _glfw.x11.WM_STATE,\n                                  (unsigned char**) &state) >= 2)\n    {\n        result = state->state;\n    }\n\n    if (state)\n        XFree(state);\n\n    return result;\n}\n\n// Returns whether the event is a selection event\n//\nstatic Bool isSelectionEvent(Display* display, XEvent* event, XPointer pointer)\n{\n    if (event->xany.window != _glfw.x11.helperWindowHandle)\n        return False;\n\n    return event->type == SelectionRequest ||\n           event->type == SelectionNotify ||\n           event->type == SelectionClear;\n}\n\n// Returns whether it is a _NET_FRAME_EXTENTS event for the specified window\n//\nstatic Bool isFrameExtentsEvent(Display* display, XEvent* event, XPointer pointer)\n{\n    _GLFWwindow* window = (_GLFWwindow*) pointer;\n    return event->type == PropertyNotify &&\n           event->xproperty.state == PropertyNewValue &&\n           event->xproperty.window == window->x11.handle &&\n           event->xproperty.atom == _glfw.x11.NET_FRAME_EXTENTS;\n}\n\n// Returns whether it is a property event for the specified selection transfer\n//\nstatic Bool isSelPropNewValueNotify(Display* display, XEvent* event, XPointer pointer)\n{\n    XEvent* notification = (XEvent*) pointer;\n    return event->type == PropertyNotify &&\n           event->xproperty.state == PropertyNewValue &&\n           event->xproperty.window == notification->xselection.requestor &&\n           event->xproperty.atom == notification->xselection.property;\n}\n\n// Translates an X event modifier state mask\n//\nstatic int translateState(int state)\n{\n    int mods = 0;\n\n    if (state & ShiftMask)\n        mods |= GLFW_MOD_SHIFT;\n    if (state & ControlMask)\n        mods |= GLFW_MOD_CONTROL;\n    if (state & Mod1Mask)\n        mods |= GLFW_MOD_ALT;\n    if (state & Mod4Mask)\n        mods |= GLFW_MOD_SUPER;\n    if (state & LockMask)\n        mods |= GLFW_MOD_CAPS_LOCK;\n    if (state & Mod2Mask)\n        mods |= GLFW_MOD_NUM_LOCK;\n\n    return mods;\n}\n\n// Translates an X11 key code to a GLFW key token\n//\nstatic int translateKey(int scancode)\n{\n    // Use the pre-filled LUT (see createKeyTables() in x11_init.c)\n    if (scancode < 0 || scancode > 255)\n        return GLFW_KEY_UNKNOWN;\n\n    return _glfw.x11.keycodes[scancode];\n}\n\n// Sends an EWMH or ICCCM event to the window manager\n//\nstatic void sendEventToWM(_GLFWwindow* window, Atom type,\n                          long a, long b, long c, long d, long e)\n{\n    XEvent event = { ClientMessage };\n    event.xclient.window = window->x11.handle;\n    event.xclient.format = 32; // Data is 32-bit longs\n    event.xclient.message_type = type;\n    event.xclient.data.l[0] = a;\n    event.xclient.data.l[1] = b;\n    event.xclient.data.l[2] = c;\n    event.xclient.data.l[3] = d;\n    event.xclient.data.l[4] = e;\n\n    XSendEvent(_glfw.x11.display, _glfw.x11.root,\n               False,\n               SubstructureNotifyMask | SubstructureRedirectMask,\n               &event);\n}\n\n// Updates the normal hints according to the window settings\n//\nstatic void updateNormalHints(_GLFWwindow* window, int width, int height)\n{\n    XSizeHints* hints = XAllocSizeHints();\n\n    if (!window->monitor)\n    {\n        if (window->resizable)\n        {\n            if (window->minwidth != GLFW_DONT_CARE &&\n                window->minheight != GLFW_DONT_CARE)\n            {\n                hints->flags |= PMinSize;\n                hints->min_width = window->minwidth;\n                hints->min_height = window->minheight;\n            }\n\n            if (window->maxwidth != GLFW_DONT_CARE &&\n                window->maxheight != GLFW_DONT_CARE)\n            {\n                hints->flags |= PMaxSize;\n                hints->max_width = window->maxwidth;\n                hints->max_height = window->maxheight;\n            }\n\n            if (window->numer != GLFW_DONT_CARE &&\n                window->denom != GLFW_DONT_CARE)\n            {\n                hints->flags |= PAspect;\n                hints->min_aspect.x = hints->max_aspect.x = window->numer;\n                hints->min_aspect.y = hints->max_aspect.y = window->denom;\n            }\n        }\n        else\n        {\n            hints->flags |= (PMinSize | PMaxSize);\n            hints->min_width  = hints->max_width  = width;\n            hints->min_height = hints->max_height = height;\n        }\n    }\n\n    hints->flags |= PWinGravity;\n    hints->win_gravity = StaticGravity;\n\n    XSetWMNormalHints(_glfw.x11.display, window->x11.handle, hints);\n    XFree(hints);\n}\n\n// Updates the full screen status of the window\n//\nstatic void updateWindowMode(_GLFWwindow* window)\n{\n    if (window->monitor)\n    {\n        if (_glfw.x11.xinerama.available &&\n            _glfw.x11.NET_WM_FULLSCREEN_MONITORS)\n        {\n            sendEventToWM(window,\n                          _glfw.x11.NET_WM_FULLSCREEN_MONITORS,\n                          window->monitor->x11.index,\n                          window->monitor->x11.index,\n                          window->monitor->x11.index,\n                          window->monitor->x11.index,\n                          0);\n        }\n\n        if (_glfw.x11.NET_WM_STATE && _glfw.x11.NET_WM_STATE_FULLSCREEN)\n        {\n            sendEventToWM(window,\n                          _glfw.x11.NET_WM_STATE,\n                          _NET_WM_STATE_ADD,\n                          _glfw.x11.NET_WM_STATE_FULLSCREEN,\n                          0, 1, 0);\n        }\n        else\n        {\n            // This is the butcher's way of removing window decorations\n            // Setting the override-redirect attribute on a window makes the\n            // window manager ignore the window completely (ICCCM, section 4)\n            // The good thing is that this makes undecorated full screen windows\n            // easy to do; the bad thing is that we have to do everything\n            // manually and some things (like iconify/restore) won't work at\n            // all, as those are tasks usually performed by the window manager\n\n            XSetWindowAttributes attributes;\n            attributes.override_redirect = True;\n            XChangeWindowAttributes(_glfw.x11.display,\n                                    window->x11.handle,\n                                    CWOverrideRedirect,\n                                    &attributes);\n\n            window->x11.overrideRedirect = GLFW_TRUE;\n        }\n\n        // Enable compositor bypass\n        if (!window->x11.transparent)\n        {\n            const unsigned long value = 1;\n\n            XChangeProperty(_glfw.x11.display,  window->x11.handle,\n                            _glfw.x11.NET_WM_BYPASS_COMPOSITOR, XA_CARDINAL, 32,\n                            PropModeReplace, (unsigned char*) &value, 1);\n        }\n    }\n    else\n    {\n        if (_glfw.x11.xinerama.available &&\n            _glfw.x11.NET_WM_FULLSCREEN_MONITORS)\n        {\n            XDeleteProperty(_glfw.x11.display, window->x11.handle,\n                            _glfw.x11.NET_WM_FULLSCREEN_MONITORS);\n        }\n\n        if (_glfw.x11.NET_WM_STATE && _glfw.x11.NET_WM_STATE_FULLSCREEN)\n        {\n            sendEventToWM(window,\n                          _glfw.x11.NET_WM_STATE,\n                          _NET_WM_STATE_REMOVE,\n                          _glfw.x11.NET_WM_STATE_FULLSCREEN,\n                          0, 1, 0);\n        }\n        else\n        {\n            XSetWindowAttributes attributes;\n            attributes.override_redirect = False;\n            XChangeWindowAttributes(_glfw.x11.display,\n                                    window->x11.handle,\n                                    CWOverrideRedirect,\n                                    &attributes);\n\n            window->x11.overrideRedirect = GLFW_FALSE;\n        }\n\n        // Disable compositor bypass\n        if (!window->x11.transparent)\n        {\n            XDeleteProperty(_glfw.x11.display, window->x11.handle,\n                            _glfw.x11.NET_WM_BYPASS_COMPOSITOR);\n        }\n    }\n}\n\n// Splits and translates a text/uri-list into separate file paths\n// NOTE: This function destroys the provided string\n//\nstatic char** parseUriList(char* text, int* count)\n{\n    const char* prefix = \"file://\";\n    char** paths = NULL;\n    char* line;\n\n    *count = 0;\n\n    while ((line = strtok(text, \"\\r\\n\")))\n    {\n        text = NULL;\n\n        if (line[0] == '#')\n            continue;\n\n        if (strncmp(line, prefix, strlen(prefix)) == 0)\n        {\n            line += strlen(prefix);\n            // TODO: Validate hostname\n            while (*line != '/')\n                line++;\n        }\n\n        (*count)++;\n\n        char* path = calloc(strlen(line) + 1, 1);\n        paths = realloc(paths, *count * sizeof(char*));\n        paths[*count - 1] = path;\n\n        while (*line)\n        {\n            if (line[0] == '%' && line[1] && line[2])\n            {\n                const char digits[3] = { line[1], line[2], '\\0' };\n                *path = strtol(digits, NULL, 16);\n                line += 2;\n            }\n            else\n                *path = *line;\n\n            path++;\n            line++;\n        }\n    }\n\n    return paths;\n}\n\n// Encode a Unicode code point to a UTF-8 stream\n// Based on cutef8 by Jeff Bezanson (Public Domain)\n//\nstatic size_t encodeUTF8(char* s, unsigned int ch)\n{\n    size_t count = 0;\n\n    if (ch < 0x80)\n        s[count++] = (char) ch;\n    else if (ch < 0x800)\n    {\n        s[count++] = (ch >> 6) | 0xc0;\n        s[count++] = (ch & 0x3f) | 0x80;\n    }\n    else if (ch < 0x10000)\n    {\n        s[count++] = (ch >> 12) | 0xe0;\n        s[count++] = ((ch >> 6) & 0x3f) | 0x80;\n        s[count++] = (ch & 0x3f) | 0x80;\n    }\n    else if (ch < 0x110000)\n    {\n        s[count++] = (ch >> 18) | 0xf0;\n        s[count++] = ((ch >> 12) & 0x3f) | 0x80;\n        s[count++] = ((ch >> 6) & 0x3f) | 0x80;\n        s[count++] = (ch & 0x3f) | 0x80;\n    }\n\n    return count;\n}\n\n// Decode a Unicode code point from a UTF-8 stream\n// Based on cutef8 by Jeff Bezanson (Public Domain)\n//\n#if defined(X_HAVE_UTF8_STRING)\nstatic unsigned int decodeUTF8(const char** s)\n{\n    unsigned int ch = 0, count = 0;\n    static const unsigned int offsets[] =\n    {\n        0x00000000u, 0x00003080u, 0x000e2080u,\n        0x03c82080u, 0xfa082080u, 0x82082080u\n    };\n\n    do\n    {\n        ch = (ch << 6) + (unsigned char) **s;\n        (*s)++;\n        count++;\n    } while ((**s & 0xc0) == 0x80);\n\n    assert(count <= 6);\n    return ch - offsets[count - 1];\n}\n#endif /*X_HAVE_UTF8_STRING*/\n\n// Convert the specified Latin-1 string to UTF-8\n//\nstatic char* convertLatin1toUTF8(const char* source)\n{\n    size_t size = 1;\n    const char* sp;\n\n    for (sp = source;  *sp;  sp++)\n        size += (*sp & 0x80) ? 2 : 1;\n\n    char* target = calloc(size, 1);\n    char* tp = target;\n\n    for (sp = source;  *sp;  sp++)\n        tp += encodeUTF8(tp, *sp);\n\n    return target;\n}\n\n// Updates the cursor image according to its cursor mode\n//\nstatic void updateCursorImage(_GLFWwindow* window)\n{\n    if (window->cursorMode == GLFW_CURSOR_NORMAL)\n    {\n        if (window->cursor)\n        {\n            XDefineCursor(_glfw.x11.display, window->x11.handle,\n                          window->cursor->x11.handle);\n        }\n        else\n            XUndefineCursor(_glfw.x11.display, window->x11.handle);\n    }\n    else\n    {\n        XDefineCursor(_glfw.x11.display, window->x11.handle,\n                      _glfw.x11.hiddenCursorHandle);\n    }\n}\n\n// Enable XI2 raw mouse motion events\n//\nstatic void enableRawMouseMotion(_GLFWwindow* window)\n{\n    XIEventMask em;\n    unsigned char mask[XIMaskLen(XI_RawMotion)] = { 0 };\n\n    em.deviceid = XIAllMasterDevices;\n    em.mask_len = sizeof(mask);\n    em.mask = mask;\n    XISetMask(mask, XI_RawMotion);\n\n    XISelectEvents(_glfw.x11.display, _glfw.x11.root, &em, 1);\n}\n\n// Disable XI2 raw mouse motion events\n//\nstatic void disableRawMouseMotion(_GLFWwindow* window)\n{\n    XIEventMask em;\n    unsigned char mask[] = { 0 };\n\n    em.deviceid = XIAllMasterDevices;\n    em.mask_len = sizeof(mask);\n    em.mask = mask;\n\n    XISelectEvents(_glfw.x11.display, _glfw.x11.root, &em, 1);\n}\n\n// Apply disabled cursor mode to a focused window\n//\nstatic void disableCursor(_GLFWwindow* window)\n{\n    if (window->rawMouseMotion)\n        enableRawMouseMotion(window);\n\n    _glfw.x11.disabledCursorWindow = window;\n    _glfwPlatformGetCursorPos(window,\n                              &_glfw.x11.restoreCursorPosX,\n                              &_glfw.x11.restoreCursorPosY);\n    updateCursorImage(window);\n    _glfwCenterCursorInContentArea(window);\n    XGrabPointer(_glfw.x11.display, window->x11.handle, True,\n                 ButtonPressMask | ButtonReleaseMask | PointerMotionMask,\n                 GrabModeAsync, GrabModeAsync,\n                 window->x11.handle,\n                 _glfw.x11.hiddenCursorHandle,\n                 CurrentTime);\n}\n\n// Exit disabled cursor mode for the specified window\n//\nstatic void enableCursor(_GLFWwindow* window)\n{\n    if (window->rawMouseMotion)\n        disableRawMouseMotion(window);\n\n    _glfw.x11.disabledCursorWindow = NULL;\n    XUngrabPointer(_glfw.x11.display, CurrentTime);\n    _glfwPlatformSetCursorPos(window,\n                              _glfw.x11.restoreCursorPosX,\n                              _glfw.x11.restoreCursorPosY);\n    updateCursorImage(window);\n}\n\n// Create the X11 window (and its colormap)\n//\nstatic GLFWbool createNativeWindow(_GLFWwindow* window,\n                                   const _GLFWwndconfig* wndconfig,\n                                   Visual* visual, int depth)\n{\n    int width = wndconfig->width;\n    int height = wndconfig->height;\n\n    if (wndconfig->scaleToMonitor)\n    {\n        width *= _glfw.x11.contentScaleX;\n        height *= _glfw.x11.contentScaleY;\n    }\n\n    // Create a colormap based on the visual used by the current context\n    window->x11.colormap = XCreateColormap(_glfw.x11.display,\n                                           _glfw.x11.root,\n                                           visual,\n                                           AllocNone);\n\n    window->x11.transparent = _glfwIsVisualTransparentX11(visual);\n\n    XSetWindowAttributes wa = { 0 };\n    wa.colormap = window->x11.colormap;\n    wa.event_mask = StructureNotifyMask | KeyPressMask | KeyReleaseMask |\n                    PointerMotionMask | ButtonPressMask | ButtonReleaseMask |\n                    ExposureMask | FocusChangeMask | VisibilityChangeMask |\n                    EnterWindowMask | LeaveWindowMask | PropertyChangeMask;\n\n    _glfwGrabErrorHandlerX11();\n\n    window->x11.parent = _glfw.x11.root;\n    window->x11.handle = XCreateWindow(_glfw.x11.display,\n                                       _glfw.x11.root,\n                                       0, 0,   // Position\n                                       width, height,\n                                       0,      // Border width\n                                       depth,  // Color depth\n                                       InputOutput,\n                                       visual,\n                                       CWBorderPixel | CWColormap | CWEventMask,\n                                       &wa);\n\n    _glfwReleaseErrorHandlerX11();\n\n    if (!window->x11.handle)\n    {\n        _glfwInputErrorX11(GLFW_PLATFORM_ERROR,\n                           \"X11: Failed to create window\");\n        return GLFW_FALSE;\n    }\n\n    XSaveContext(_glfw.x11.display,\n                 window->x11.handle,\n                 _glfw.x11.context,\n                 (XPointer) window);\n\n    if (!wndconfig->decorated)\n        _glfwPlatformSetWindowDecorated(window, GLFW_FALSE);\n\n    if (_glfw.x11.NET_WM_STATE && !window->monitor)\n    {\n        Atom states[3];\n        int count = 0;\n\n        if (wndconfig->floating)\n        {\n            if (_glfw.x11.NET_WM_STATE_ABOVE)\n                states[count++] = _glfw.x11.NET_WM_STATE_ABOVE;\n        }\n\n        if (wndconfig->maximized)\n        {\n            if (_glfw.x11.NET_WM_STATE_MAXIMIZED_VERT &&\n                _glfw.x11.NET_WM_STATE_MAXIMIZED_HORZ)\n            {\n                states[count++] = _glfw.x11.NET_WM_STATE_MAXIMIZED_VERT;\n                states[count++] = _glfw.x11.NET_WM_STATE_MAXIMIZED_HORZ;\n                window->x11.maximized = GLFW_TRUE;\n            }\n        }\n\n        if (count)\n        {\n            XChangeProperty(_glfw.x11.display, window->x11.handle,\n                            _glfw.x11.NET_WM_STATE, XA_ATOM, 32,\n                            PropModeReplace, (unsigned char*) states, count);\n        }\n    }\n\n    // Declare the WM protocols supported by GLFW\n    {\n        Atom protocols[] =\n        {\n            _glfw.x11.WM_DELETE_WINDOW,\n            _glfw.x11.NET_WM_PING\n        };\n\n        XSetWMProtocols(_glfw.x11.display, window->x11.handle,\n                        protocols, sizeof(protocols) / sizeof(Atom));\n    }\n\n    // Declare our PID\n    {\n        const long pid = getpid();\n\n        XChangeProperty(_glfw.x11.display,  window->x11.handle,\n                        _glfw.x11.NET_WM_PID, XA_CARDINAL, 32,\n                        PropModeReplace,\n                        (unsigned char*) &pid, 1);\n    }\n\n    if (_glfw.x11.NET_WM_WINDOW_TYPE && _glfw.x11.NET_WM_WINDOW_TYPE_NORMAL)\n    {\n        Atom type = _glfw.x11.NET_WM_WINDOW_TYPE_NORMAL;\n        XChangeProperty(_glfw.x11.display,  window->x11.handle,\n                        _glfw.x11.NET_WM_WINDOW_TYPE, XA_ATOM, 32,\n                        PropModeReplace, (unsigned char*) &type, 1);\n    }\n\n    // Set ICCCM WM_HINTS property\n    {\n        XWMHints* hints = XAllocWMHints();\n        if (!hints)\n        {\n            _glfwInputError(GLFW_OUT_OF_MEMORY,\n                            \"X11: Failed to allocate WM hints\");\n            return GLFW_FALSE;\n        }\n\n        hints->flags = StateHint;\n        hints->initial_state = NormalState;\n\n        XSetWMHints(_glfw.x11.display, window->x11.handle, hints);\n        XFree(hints);\n    }\n\n    updateNormalHints(window, width, height);\n\n    // Set ICCCM WM_CLASS property\n    {\n        XClassHint* hint = XAllocClassHint();\n\n        if (strlen(wndconfig->x11.instanceName) &&\n            strlen(wndconfig->x11.className))\n        {\n            hint->res_name = (char*) wndconfig->x11.instanceName;\n            hint->res_class = (char*) wndconfig->x11.className;\n        }\n        else\n        {\n            const char* resourceName = getenv(\"RESOURCE_NAME\");\n            if (resourceName && strlen(resourceName))\n                hint->res_name = (char*) resourceName;\n            else if (strlen(wndconfig->title))\n                hint->res_name = (char*) wndconfig->title;\n            else\n                hint->res_name = (char*) \"glfw-application\";\n\n            if (strlen(wndconfig->title))\n                hint->res_class = (char*) wndconfig->title;\n            else\n                hint->res_class = (char*) \"GLFW-Application\";\n        }\n\n        XSetClassHint(_glfw.x11.display, window->x11.handle, hint);\n        XFree(hint);\n    }\n\n    // Announce support for Xdnd (drag and drop)\n    {\n        const Atom version = _GLFW_XDND_VERSION;\n        XChangeProperty(_glfw.x11.display, window->x11.handle,\n                        _glfw.x11.XdndAware, XA_ATOM, 32,\n                        PropModeReplace, (unsigned char*) &version, 1);\n    }\n\n    _glfwPlatformSetWindowTitle(window, wndconfig->title);\n\n    if (_glfw.x11.im)\n    {\n        window->x11.ic = XCreateIC(_glfw.x11.im,\n                                   XNInputStyle,\n                                   XIMPreeditNothing | XIMStatusNothing,\n                                   XNClientWindow,\n                                   window->x11.handle,\n                                   XNFocusWindow,\n                                   window->x11.handle,\n                                   NULL);\n    }\n\n    if (window->x11.ic)\n    {\n        unsigned long filter = 0;\n        if (XGetICValues(window->x11.ic, XNFilterEvents, &filter, NULL) == NULL)\n            XSelectInput(_glfw.x11.display, window->x11.handle, wa.event_mask | filter);\n    }\n\n    _glfwPlatformGetWindowPos(window, &window->x11.xpos, &window->x11.ypos);\n    _glfwPlatformGetWindowSize(window, &window->x11.width, &window->x11.height);\n\n    return GLFW_TRUE;\n}\n\n// Set the specified property to the selection converted to the requested target\n//\nstatic Atom writeTargetToProperty(const XSelectionRequestEvent* request)\n{\n    int i;\n    char* selectionString = NULL;\n    const Atom formats[] = { _glfw.x11.UTF8_STRING, XA_STRING };\n    const int formatCount = sizeof(formats) / sizeof(formats[0]);\n\n    if (request->selection == _glfw.x11.PRIMARY)\n        selectionString = _glfw.x11.primarySelectionString;\n    else\n        selectionString = _glfw.x11.clipboardString;\n\n    if (request->property == None)\n    {\n        // The requester is a legacy client (ICCCM section 2.2)\n        // We don't support legacy clients, so fail here\n        return None;\n    }\n\n    if (request->target == _glfw.x11.TARGETS)\n    {\n        // The list of supported targets was requested\n\n        const Atom targets[] = { _glfw.x11.TARGETS,\n                                 _glfw.x11.MULTIPLE,\n                                 _glfw.x11.UTF8_STRING,\n                                 XA_STRING };\n\n        XChangeProperty(_glfw.x11.display,\n                        request->requestor,\n                        request->property,\n                        XA_ATOM,\n                        32,\n                        PropModeReplace,\n                        (unsigned char*) targets,\n                        sizeof(targets) / sizeof(targets[0]));\n\n        return request->property;\n    }\n\n    if (request->target == _glfw.x11.MULTIPLE)\n    {\n        // Multiple conversions were requested\n\n        Atom* targets;\n        unsigned long i, count;\n\n        count = _glfwGetWindowPropertyX11(request->requestor,\n                                          request->property,\n                                          _glfw.x11.ATOM_PAIR,\n                                          (unsigned char**) &targets);\n\n        for (i = 0;  i < count;  i += 2)\n        {\n            int j;\n\n            for (j = 0;  j < formatCount;  j++)\n            {\n                if (targets[i] == formats[j])\n                    break;\n            }\n\n            if (j < formatCount)\n            {\n                XChangeProperty(_glfw.x11.display,\n                                request->requestor,\n                                targets[i + 1],\n                                targets[i],\n                                8,\n                                PropModeReplace,\n                                (unsigned char *) selectionString,\n                                strlen(selectionString));\n            }\n            else\n                targets[i + 1] = None;\n        }\n\n        XChangeProperty(_glfw.x11.display,\n                        request->requestor,\n                        request->property,\n                        _glfw.x11.ATOM_PAIR,\n                        32,\n                        PropModeReplace,\n                        (unsigned char*) targets,\n                        count);\n\n        XFree(targets);\n\n        return request->property;\n    }\n\n    if (request->target == _glfw.x11.SAVE_TARGETS)\n    {\n        // The request is a check whether we support SAVE_TARGETS\n        // It should be handled as a no-op side effect target\n\n        XChangeProperty(_glfw.x11.display,\n                        request->requestor,\n                        request->property,\n                        _glfw.x11.NULL_,\n                        32,\n                        PropModeReplace,\n                        NULL,\n                        0);\n\n        return request->property;\n    }\n\n    // Conversion to a data target was requested\n\n    for (i = 0;  i < formatCount;  i++)\n    {\n        if (request->target == formats[i])\n        {\n            // The requested target is one we support\n\n            XChangeProperty(_glfw.x11.display,\n                            request->requestor,\n                            request->property,\n                            request->target,\n                            8,\n                            PropModeReplace,\n                            (unsigned char *) selectionString,\n                            strlen(selectionString));\n\n            return request->property;\n        }\n    }\n\n    // The requested target is not supported\n\n    return None;\n}\n\nstatic void handleSelectionClear(XEvent* event)\n{\n    if (event->xselectionclear.selection == _glfw.x11.PRIMARY)\n    {\n        free(_glfw.x11.primarySelectionString);\n        _glfw.x11.primarySelectionString = NULL;\n    }\n    else\n    {\n        free(_glfw.x11.clipboardString);\n        _glfw.x11.clipboardString = NULL;\n    }\n}\n\nstatic void handleSelectionRequest(XEvent* event)\n{\n    const XSelectionRequestEvent* request = &event->xselectionrequest;\n\n    XEvent reply = { SelectionNotify };\n    reply.xselection.property = writeTargetToProperty(request);\n    reply.xselection.display = request->display;\n    reply.xselection.requestor = request->requestor;\n    reply.xselection.selection = request->selection;\n    reply.xselection.target = request->target;\n    reply.xselection.time = request->time;\n\n    XSendEvent(_glfw.x11.display, request->requestor, False, 0, &reply);\n}\n\nstatic const char* getSelectionString(Atom selection)\n{\n    char** selectionString = NULL;\n    const Atom targets[] = { _glfw.x11.UTF8_STRING, XA_STRING };\n    const size_t targetCount = sizeof(targets) / sizeof(targets[0]);\n\n    if (selection == _glfw.x11.PRIMARY)\n        selectionString = &_glfw.x11.primarySelectionString;\n    else\n        selectionString = &_glfw.x11.clipboardString;\n\n    if (XGetSelectionOwner(_glfw.x11.display, selection) ==\n        _glfw.x11.helperWindowHandle)\n    {\n        // Instead of doing a large number of X round-trips just to put this\n        // string into a window property and then read it back, just return it\n        return *selectionString;\n    }\n\n    free(*selectionString);\n    *selectionString = NULL;\n\n    for (size_t i = 0;  i < targetCount;  i++)\n    {\n        char* data;\n        Atom actualType;\n        int actualFormat;\n        unsigned long itemCount, bytesAfter;\n        XEvent notification, dummy;\n\n        XConvertSelection(_glfw.x11.display,\n                          selection,\n                          targets[i],\n                          _glfw.x11.GLFW_SELECTION,\n                          _glfw.x11.helperWindowHandle,\n                          CurrentTime);\n\n        while (!XCheckTypedWindowEvent(_glfw.x11.display,\n                                       _glfw.x11.helperWindowHandle,\n                                       SelectionNotify,\n                                       &notification))\n        {\n            waitForEvent(NULL);\n        }\n\n        if (notification.xselection.property == None)\n            continue;\n\n        XCheckIfEvent(_glfw.x11.display,\n                      &dummy,\n                      isSelPropNewValueNotify,\n                      (XPointer) &notification);\n\n        XGetWindowProperty(_glfw.x11.display,\n                           notification.xselection.requestor,\n                           notification.xselection.property,\n                           0,\n                           LONG_MAX,\n                           True,\n                           AnyPropertyType,\n                           &actualType,\n                           &actualFormat,\n                           &itemCount,\n                           &bytesAfter,\n                           (unsigned char**) &data);\n\n        if (actualType == _glfw.x11.INCR)\n        {\n            size_t size = 1;\n            char* string = NULL;\n\n            for (;;)\n            {\n                while (!XCheckIfEvent(_glfw.x11.display,\n                                      &dummy,\n                                      isSelPropNewValueNotify,\n                                      (XPointer) &notification))\n                {\n                    waitForEvent(NULL);\n                }\n\n                XFree(data);\n                XGetWindowProperty(_glfw.x11.display,\n                                   notification.xselection.requestor,\n                                   notification.xselection.property,\n                                   0,\n                                   LONG_MAX,\n                                   True,\n                                   AnyPropertyType,\n                                   &actualType,\n                                   &actualFormat,\n                                   &itemCount,\n                                   &bytesAfter,\n                                   (unsigned char**) &data);\n\n                if (itemCount)\n                {\n                    size += itemCount;\n                    string = realloc(string, size);\n                    string[size - itemCount - 1] = '\\0';\n                    strcat(string, data);\n                }\n\n                if (!itemCount)\n                {\n                    if (targets[i] == XA_STRING)\n                    {\n                        *selectionString = convertLatin1toUTF8(string);\n                        free(string);\n                    }\n                    else\n                        *selectionString = string;\n\n                    break;\n                }\n            }\n        }\n        else if (actualType == targets[i])\n        {\n            if (targets[i] == XA_STRING)\n                *selectionString = convertLatin1toUTF8(data);\n            else\n                *selectionString = _glfw_strdup(data);\n        }\n\n        XFree(data);\n\n        if (*selectionString)\n            break;\n    }\n\n    if (!*selectionString)\n    {\n        _glfwInputError(GLFW_FORMAT_UNAVAILABLE,\n                        \"X11: Failed to convert selection to string\");\n    }\n\n    return *selectionString;\n}\n\n// Make the specified window and its video mode active on its monitor\n//\nstatic void acquireMonitor(_GLFWwindow* window)\n{\n    if (_glfw.x11.saver.count == 0)\n    {\n        // Remember old screen saver settings\n        XGetScreenSaver(_glfw.x11.display,\n                        &_glfw.x11.saver.timeout,\n                        &_glfw.x11.saver.interval,\n                        &_glfw.x11.saver.blanking,\n                        &_glfw.x11.saver.exposure);\n\n        // Disable screen saver\n        XSetScreenSaver(_glfw.x11.display, 0, 0, DontPreferBlanking,\n                        DefaultExposures);\n    }\n\n    if (!window->monitor->window)\n        _glfw.x11.saver.count++;\n\n    _glfwSetVideoModeX11(window->monitor, &window->videoMode);\n\n    if (window->x11.overrideRedirect)\n    {\n        int xpos, ypos;\n        GLFWvidmode mode;\n\n        // Manually position the window over its monitor\n        _glfwPlatformGetMonitorPos(window->monitor, &xpos, &ypos);\n        _glfwPlatformGetVideoMode(window->monitor, &mode);\n\n        XMoveResizeWindow(_glfw.x11.display, window->x11.handle,\n                          xpos, ypos, mode.width, mode.height);\n    }\n\n    _glfwInputMonitorWindow(window->monitor, window);\n}\n\n// Remove the window and restore the original video mode\n//\nstatic void releaseMonitor(_GLFWwindow* window)\n{\n    if (window->monitor->window != window)\n        return;\n\n    _glfwInputMonitorWindow(window->monitor, NULL);\n    _glfwRestoreVideoModeX11(window->monitor);\n\n    _glfw.x11.saver.count--;\n\n    if (_glfw.x11.saver.count == 0)\n    {\n        // Restore old screen saver settings\n        XSetScreenSaver(_glfw.x11.display,\n                        _glfw.x11.saver.timeout,\n                        _glfw.x11.saver.interval,\n                        _glfw.x11.saver.blanking,\n                        _glfw.x11.saver.exposure);\n    }\n}\n\n// Process the specified X event\n//\nstatic void processEvent(XEvent *event)\n{\n    int keycode = 0;\n    Bool filtered = False;\n\n    // HACK: Save scancode as some IMs clear the field in XFilterEvent\n    if (event->type == KeyPress || event->type == KeyRelease)\n        keycode = event->xkey.keycode;\n\n    if (_glfw.x11.im)\n        filtered = XFilterEvent(event, None);\n\n    if (_glfw.x11.randr.available)\n    {\n        if (event->type == _glfw.x11.randr.eventBase + RRNotify)\n        {\n            XRRUpdateConfiguration(event);\n            _glfwPollMonitorsX11();\n            return;\n        }\n    }\n\n    if (_glfw.x11.xkb.available)\n    {\n        if (event->type == _glfw.x11.xkb.eventBase + XkbEventCode)\n        {\n            if (((XkbEvent*) event)->any.xkb_type == XkbStateNotify &&\n                (((XkbEvent*) event)->state.changed & XkbGroupStateMask))\n            {\n                _glfw.x11.xkb.group = ((XkbEvent*) event)->state.group;\n            }\n        }\n    }\n\n    if (event->type == GenericEvent)\n    {\n        if (_glfw.x11.xi.available)\n        {\n            _GLFWwindow* window = _glfw.x11.disabledCursorWindow;\n\n            if (window &&\n                window->rawMouseMotion &&\n                event->xcookie.extension == _glfw.x11.xi.majorOpcode &&\n                XGetEventData(_glfw.x11.display, &event->xcookie) &&\n                event->xcookie.evtype == XI_RawMotion)\n            {\n                XIRawEvent* re = event->xcookie.data;\n                if (re->valuators.mask_len)\n                {\n                    const double* values = re->raw_values;\n                    double xpos = window->virtualCursorPosX;\n                    double ypos = window->virtualCursorPosY;\n\n                    if (XIMaskIsSet(re->valuators.mask, 0))\n                    {\n                        xpos += *values;\n                        values++;\n                    }\n\n                    if (XIMaskIsSet(re->valuators.mask, 1))\n                        ypos += *values;\n\n                    _glfwInputCursorPos(window, xpos, ypos);\n                }\n            }\n\n            XFreeEventData(_glfw.x11.display, &event->xcookie);\n        }\n\n        return;\n    }\n\n    if (event->type == SelectionClear)\n    {\n        handleSelectionClear(event);\n        return;\n    }\n    else if (event->type == SelectionRequest)\n    {\n        handleSelectionRequest(event);\n        return;\n    }\n\n    _GLFWwindow* window = NULL;\n    if (XFindContext(_glfw.x11.display,\n                     event->xany.window,\n                     _glfw.x11.context,\n                     (XPointer*) &window) != 0)\n    {\n        // This is an event for a window that has already been destroyed\n        return;\n    }\n\n    switch (event->type)\n    {\n        case ReparentNotify:\n        {\n            window->x11.parent = event->xreparent.parent;\n            return;\n        }\n\n        case KeyPress:\n        {\n            const int key = translateKey(keycode);\n            const int mods = translateState(event->xkey.state);\n            const int plain = !(mods & (GLFW_MOD_CONTROL | GLFW_MOD_ALT));\n\n            if (window->x11.ic)\n            {\n                // HACK: Ignore duplicate key press events generated by ibus\n                //       These have the same timestamp as the original event\n                //       Corresponding release events are filtered out\n                //       implicitly by the GLFW key repeat logic\n                if (window->x11.lastKeyTime < event->xkey.time)\n                {\n                    if (keycode)\n                        _glfwInputKey(window, key, keycode, GLFW_PRESS, mods);\n\n                    window->x11.lastKeyTime = event->xkey.time;\n                }\n\n                if (!filtered)\n                {\n                    int count;\n                    Status status;\n#if defined(X_HAVE_UTF8_STRING)\n                    char buffer[100];\n                    char* chars = buffer;\n\n                    count = Xutf8LookupString(window->x11.ic,\n                                              &event->xkey,\n                                              buffer, sizeof(buffer) - 1,\n                                              NULL, &status);\n\n                    if (status == XBufferOverflow)\n                    {\n                        chars = calloc(count + 1, 1);\n                        count = Xutf8LookupString(window->x11.ic,\n                                                  &event->xkey,\n                                                  chars, count,\n                                                  NULL, &status);\n                    }\n\n                    if (status == XLookupChars || status == XLookupBoth)\n                    {\n                        const char* c = chars;\n                        chars[count] = '\\0';\n                        while (c - chars < count)\n                            _glfwInputChar(window, decodeUTF8(&c), mods, plain);\n                    }\n#else /*X_HAVE_UTF8_STRING*/\n                    wchar_t buffer[16];\n                    wchar_t* chars = buffer;\n\n                    count = XwcLookupString(window->x11.ic,\n                                            &event->xkey,\n                                            buffer,\n                                            sizeof(buffer) / sizeof(wchar_t),\n                                            NULL,\n                                            &status);\n\n                    if (status == XBufferOverflow)\n                    {\n                        chars = calloc(count, sizeof(wchar_t));\n                        count = XwcLookupString(window->x11.ic,\n                                                &event->xkey,\n                                                chars, count,\n                                                NULL, &status);\n                    }\n\n                    if (status == XLookupChars || status == XLookupBoth)\n                    {\n                        int i;\n                        for (i = 0;  i < count;  i++)\n                            _glfwInputChar(window, chars[i], mods, plain);\n                    }\n#endif /*X_HAVE_UTF8_STRING*/\n\n                    if (chars != buffer)\n                        free(chars);\n                }\n            }\n            else\n            {\n                KeySym keysym;\n                XLookupString(&event->xkey, NULL, 0, &keysym, NULL);\n\n                _glfwInputKey(window, key, keycode, GLFW_PRESS, mods);\n\n                const long character = _glfwKeySym2Unicode(keysym);\n                if (character != -1)\n                    _glfwInputChar(window, character, mods, plain);\n            }\n\n            return;\n        }\n\n        case KeyRelease:\n        {\n            const int key = translateKey(keycode);\n            const int mods = translateState(event->xkey.state);\n\n            if (!_glfw.x11.xkb.detectable)\n            {\n                // HACK: Key repeat events will arrive as KeyRelease/KeyPress\n                //       pairs with similar or identical time stamps\n                //       The key repeat logic in _glfwInputKey expects only key\n                //       presses to repeat, so detect and discard release events\n                if (XEventsQueued(_glfw.x11.display, QueuedAfterReading))\n                {\n                    XEvent next;\n                    XPeekEvent(_glfw.x11.display, &next);\n\n                    if (next.type == KeyPress &&\n                        next.xkey.window == event->xkey.window &&\n                        next.xkey.keycode == keycode)\n                    {\n                        // HACK: The time of repeat events sometimes doesn't\n                        //       match that of the press event, so add an\n                        //       epsilon\n                        //       Toshiyuki Takahashi can press a button\n                        //       16 times per second so it's fairly safe to\n                        //       assume that no human is pressing the key 50\n                        //       times per second (value is ms)\n                        if ((next.xkey.time - event->xkey.time) < 20)\n                        {\n                            // This is very likely a server-generated key repeat\n                            // event, so ignore it\n                            return;\n                        }\n                    }\n                }\n            }\n\n            _glfwInputKey(window, key, keycode, GLFW_RELEASE, mods);\n            return;\n        }\n\n        case ButtonPress:\n        {\n            const int mods = translateState(event->xbutton.state);\n\n            if (event->xbutton.button == Button1)\n                _glfwInputMouseClick(window, GLFW_MOUSE_BUTTON_LEFT, GLFW_PRESS, mods);\n            else if (event->xbutton.button == Button2)\n                _glfwInputMouseClick(window, GLFW_MOUSE_BUTTON_MIDDLE, GLFW_PRESS, mods);\n            else if (event->xbutton.button == Button3)\n                _glfwInputMouseClick(window, GLFW_MOUSE_BUTTON_RIGHT, GLFW_PRESS, mods);\n\n            // Modern X provides scroll events as mouse button presses\n            else if (event->xbutton.button == Button4)\n                _glfwInputScroll(window, 0.0, 1.0);\n            else if (event->xbutton.button == Button5)\n                _glfwInputScroll(window, 0.0, -1.0);\n            else if (event->xbutton.button == Button6)\n                _glfwInputScroll(window, 1.0, 0.0);\n            else if (event->xbutton.button == Button7)\n                _glfwInputScroll(window, -1.0, 0.0);\n\n            else\n            {\n                // Additional buttons after 7 are treated as regular buttons\n                // We subtract 4 to fill the gap left by scroll input above\n                _glfwInputMouseClick(window,\n                                     event->xbutton.button - Button1 - 4,\n                                     GLFW_PRESS,\n                                     mods);\n            }\n\n            return;\n        }\n\n        case ButtonRelease:\n        {\n            const int mods = translateState(event->xbutton.state);\n\n            if (event->xbutton.button == Button1)\n            {\n                _glfwInputMouseClick(window,\n                                     GLFW_MOUSE_BUTTON_LEFT,\n                                     GLFW_RELEASE,\n                                     mods);\n            }\n            else if (event->xbutton.button == Button2)\n            {\n                _glfwInputMouseClick(window,\n                                     GLFW_MOUSE_BUTTON_MIDDLE,\n                                     GLFW_RELEASE,\n                                     mods);\n            }\n            else if (event->xbutton.button == Button3)\n            {\n                _glfwInputMouseClick(window,\n                                     GLFW_MOUSE_BUTTON_RIGHT,\n                                     GLFW_RELEASE,\n                                     mods);\n            }\n            else if (event->xbutton.button > Button7)\n            {\n                // Additional buttons after 7 are treated as regular buttons\n                // We subtract 4 to fill the gap left by scroll input above\n                _glfwInputMouseClick(window,\n                                     event->xbutton.button - Button1 - 4,\n                                     GLFW_RELEASE,\n                                     mods);\n            }\n\n            return;\n        }\n\n        case EnterNotify:\n        {\n            // XEnterWindowEvent is XCrossingEvent\n            const int x = event->xcrossing.x;\n            const int y = event->xcrossing.y;\n\n            // HACK: This is a workaround for WMs (KWM, Fluxbox) that otherwise\n            //       ignore the defined cursor for hidden cursor mode\n            if (window->cursorMode == GLFW_CURSOR_HIDDEN)\n                updateCursorImage(window);\n\n            _glfwInputCursorEnter(window, GLFW_TRUE);\n            _glfwInputCursorPos(window, x, y);\n\n            window->x11.lastCursorPosX = x;\n            window->x11.lastCursorPosY = y;\n            return;\n        }\n\n        case LeaveNotify:\n        {\n            _glfwInputCursorEnter(window, GLFW_FALSE);\n            return;\n        }\n\n        case MotionNotify:\n        {\n            const int x = event->xmotion.x;\n            const int y = event->xmotion.y;\n\n            if (x != window->x11.warpCursorPosX ||\n                y != window->x11.warpCursorPosY)\n            {\n                // The cursor was moved by something other than GLFW\n\n                if (window->cursorMode == GLFW_CURSOR_DISABLED)\n                {\n                    if (_glfw.x11.disabledCursorWindow != window)\n                        return;\n                    if (window->rawMouseMotion)\n                        return;\n\n                    const int dx = x - window->x11.lastCursorPosX;\n                    const int dy = y - window->x11.lastCursorPosY;\n\n                    _glfwInputCursorPos(window,\n                                        window->virtualCursorPosX + dx,\n                                        window->virtualCursorPosY + dy);\n                }\n                else\n                    _glfwInputCursorPos(window, x, y);\n            }\n\n            window->x11.lastCursorPosX = x;\n            window->x11.lastCursorPosY = y;\n            return;\n        }\n\n        case ConfigureNotify:\n        {\n            if (event->xconfigure.width != window->x11.width ||\n                event->xconfigure.height != window->x11.height)\n            {\n                _glfwInputFramebufferSize(window,\n                                          event->xconfigure.width,\n                                          event->xconfigure.height);\n\n                _glfwInputWindowSize(window,\n                                     event->xconfigure.width,\n                                     event->xconfigure.height);\n\n                window->x11.width = event->xconfigure.width;\n                window->x11.height = event->xconfigure.height;\n            }\n\n            int xpos = event->xconfigure.x;\n            int ypos = event->xconfigure.y;\n\n            // NOTE: ConfigureNotify events from the server are in local\n            //       coordinates, so if we are reparented we need to translate\n            //       the position into root (screen) coordinates\n            if (!event->xany.send_event && window->x11.parent != _glfw.x11.root)\n            {\n                Window dummy;\n                XTranslateCoordinates(_glfw.x11.display,\n                                      window->x11.parent,\n                                      _glfw.x11.root,\n                                      xpos, ypos,\n                                      &xpos, &ypos,\n                                      &dummy);\n            }\n\n            if (xpos != window->x11.xpos || ypos != window->x11.ypos)\n            {\n                _glfwInputWindowPos(window, xpos, ypos);\n                window->x11.xpos = xpos;\n                window->x11.ypos = ypos;\n            }\n\n            return;\n        }\n\n        case ClientMessage:\n        {\n            // Custom client message, probably from the window manager\n\n            if (filtered)\n                return;\n\n            if (event->xclient.message_type == None)\n                return;\n\n            if (event->xclient.message_type == _glfw.x11.WM_PROTOCOLS)\n            {\n                const Atom protocol = event->xclient.data.l[0];\n                if (protocol == None)\n                    return;\n\n                if (protocol == _glfw.x11.WM_DELETE_WINDOW)\n                {\n                    // The window manager was asked to close the window, for\n                    // example by the user pressing a 'close' window decoration\n                    // button\n                    _glfwInputWindowCloseRequest(window);\n                }\n                else if (protocol == _glfw.x11.NET_WM_PING)\n                {\n                    // The window manager is pinging the application to ensure\n                    // it's still responding to events\n\n                    XEvent reply = *event;\n                    reply.xclient.window = _glfw.x11.root;\n\n                    XSendEvent(_glfw.x11.display, _glfw.x11.root,\n                               False,\n                               SubstructureNotifyMask | SubstructureRedirectMask,\n                               &reply);\n                }\n            }\n            else if (event->xclient.message_type == _glfw.x11.XdndEnter)\n            {\n                // A drag operation has entered the window\n                unsigned long i, count;\n                Atom* formats = NULL;\n                const GLFWbool list = event->xclient.data.l[1] & 1;\n\n                _glfw.x11.xdnd.source  = event->xclient.data.l[0];\n                _glfw.x11.xdnd.version = event->xclient.data.l[1] >> 24;\n                _glfw.x11.xdnd.format  = None;\n\n                if (_glfw.x11.xdnd.version > _GLFW_XDND_VERSION)\n                    return;\n\n                if (list)\n                {\n                    count = _glfwGetWindowPropertyX11(_glfw.x11.xdnd.source,\n                                                      _glfw.x11.XdndTypeList,\n                                                      XA_ATOM,\n                                                      (unsigned char**) &formats);\n                }\n                else\n                {\n                    count = 3;\n                    formats = (Atom*) event->xclient.data.l + 2;\n                }\n\n                for (i = 0;  i < count;  i++)\n                {\n                    if (formats[i] == _glfw.x11.text_uri_list)\n                    {\n                        _glfw.x11.xdnd.format = _glfw.x11.text_uri_list;\n                        break;\n                    }\n                }\n\n                if (list && formats)\n                    XFree(formats);\n            }\n            else if (event->xclient.message_type == _glfw.x11.XdndDrop)\n            {\n                // The drag operation has finished by dropping on the window\n                Time time = CurrentTime;\n\n                if (_glfw.x11.xdnd.version > _GLFW_XDND_VERSION)\n                    return;\n\n                if (_glfw.x11.xdnd.format)\n                {\n                    if (_glfw.x11.xdnd.version >= 1)\n                        time = event->xclient.data.l[2];\n\n                    // Request the chosen format from the source window\n                    XConvertSelection(_glfw.x11.display,\n                                      _glfw.x11.XdndSelection,\n                                      _glfw.x11.xdnd.format,\n                                      _glfw.x11.XdndSelection,\n                                      window->x11.handle,\n                                      time);\n                }\n                else if (_glfw.x11.xdnd.version >= 2)\n                {\n                    XEvent reply = { ClientMessage };\n                    reply.xclient.window = _glfw.x11.xdnd.source;\n                    reply.xclient.message_type = _glfw.x11.XdndFinished;\n                    reply.xclient.format = 32;\n                    reply.xclient.data.l[0] = window->x11.handle;\n                    reply.xclient.data.l[1] = 0; // The drag was rejected\n                    reply.xclient.data.l[2] = None;\n\n                    XSendEvent(_glfw.x11.display, _glfw.x11.xdnd.source,\n                               False, NoEventMask, &reply);\n                    XFlush(_glfw.x11.display);\n                }\n            }\n            else if (event->xclient.message_type == _glfw.x11.XdndPosition)\n            {\n                // The drag operation has moved over the window\n                const int xabs = (event->xclient.data.l[2] >> 16) & 0xffff;\n                const int yabs = (event->xclient.data.l[2]) & 0xffff;\n                Window dummy;\n                int xpos, ypos;\n\n                if (_glfw.x11.xdnd.version > _GLFW_XDND_VERSION)\n                    return;\n\n                XTranslateCoordinates(_glfw.x11.display,\n                                      _glfw.x11.root,\n                                      window->x11.handle,\n                                      xabs, yabs,\n                                      &xpos, &ypos,\n                                      &dummy);\n\n                _glfwInputCursorPos(window, xpos, ypos);\n\n                XEvent reply = { ClientMessage };\n                reply.xclient.window = _glfw.x11.xdnd.source;\n                reply.xclient.message_type = _glfw.x11.XdndStatus;\n                reply.xclient.format = 32;\n                reply.xclient.data.l[0] = window->x11.handle;\n                reply.xclient.data.l[2] = 0; // Specify an empty rectangle\n                reply.xclient.data.l[3] = 0;\n\n                if (_glfw.x11.xdnd.format)\n                {\n                    // Reply that we are ready to copy the dragged data\n                    reply.xclient.data.l[1] = 1; // Accept with no rectangle\n                    if (_glfw.x11.xdnd.version >= 2)\n                        reply.xclient.data.l[4] = _glfw.x11.XdndActionCopy;\n                }\n\n                XSendEvent(_glfw.x11.display, _glfw.x11.xdnd.source,\n                           False, NoEventMask, &reply);\n                XFlush(_glfw.x11.display);\n            }\n\n            return;\n        }\n\n        case SelectionNotify:\n        {\n            if (event->xselection.property == _glfw.x11.XdndSelection)\n            {\n                // The converted data from the drag operation has arrived\n                char* data;\n                const unsigned long result =\n                    _glfwGetWindowPropertyX11(event->xselection.requestor,\n                                              event->xselection.property,\n                                              event->xselection.target,\n                                              (unsigned char**) &data);\n\n                if (result)\n                {\n                    int i, count;\n                    char** paths = parseUriList(data, &count);\n\n                    _glfwInputDrop(window, count, (const char**) paths);\n\n                    for (i = 0;  i < count;  i++)\n                        free(paths[i]);\n                    free(paths);\n                }\n\n                if (data)\n                    XFree(data);\n\n                if (_glfw.x11.xdnd.version >= 2)\n                {\n                    XEvent reply = { ClientMessage };\n                    reply.xclient.window = _glfw.x11.xdnd.source;\n                    reply.xclient.message_type = _glfw.x11.XdndFinished;\n                    reply.xclient.format = 32;\n                    reply.xclient.data.l[0] = window->x11.handle;\n                    reply.xclient.data.l[1] = result;\n                    reply.xclient.data.l[2] = _glfw.x11.XdndActionCopy;\n\n                    XSendEvent(_glfw.x11.display, _glfw.x11.xdnd.source,\n                               False, NoEventMask, &reply);\n                    XFlush(_glfw.x11.display);\n                }\n            }\n\n            return;\n        }\n\n        case FocusIn:\n        {\n            if (event->xfocus.mode == NotifyGrab ||\n                event->xfocus.mode == NotifyUngrab)\n            {\n                // Ignore focus events from popup indicator windows, window menu\n                // key chords and window dragging\n                return;\n            }\n\n            if (window->cursorMode == GLFW_CURSOR_DISABLED)\n                disableCursor(window);\n\n            if (window->x11.ic)\n                XSetICFocus(window->x11.ic);\n\n            _glfwInputWindowFocus(window, GLFW_TRUE);\n            return;\n        }\n\n        case FocusOut:\n        {\n            if (event->xfocus.mode == NotifyGrab ||\n                event->xfocus.mode == NotifyUngrab)\n            {\n                // Ignore focus events from popup indicator windows, window menu\n                // key chords and window dragging\n                return;\n            }\n\n            if (window->cursorMode == GLFW_CURSOR_DISABLED)\n                enableCursor(window);\n\n            if (window->x11.ic)\n                XUnsetICFocus(window->x11.ic);\n\n            if (window->monitor && window->autoIconify)\n                _glfwPlatformIconifyWindow(window);\n\n            _glfwInputWindowFocus(window, GLFW_FALSE);\n            return;\n        }\n\n        case Expose:\n        {\n            _glfwInputWindowDamage(window);\n            return;\n        }\n\n        case PropertyNotify:\n        {\n            if (event->xproperty.state != PropertyNewValue)\n                return;\n\n            if (event->xproperty.atom == _glfw.x11.WM_STATE)\n            {\n                const int state = getWindowState(window);\n                if (state != IconicState && state != NormalState)\n                    return;\n\n                const GLFWbool iconified = (state == IconicState);\n                if (window->x11.iconified != iconified)\n                {\n                    if (window->monitor)\n                    {\n                        if (iconified)\n                            releaseMonitor(window);\n                        else\n                            acquireMonitor(window);\n                    }\n\n                    window->x11.iconified = iconified;\n                    _glfwInputWindowIconify(window, iconified);\n                }\n            }\n            else if (event->xproperty.atom == _glfw.x11.NET_WM_STATE)\n            {\n                const GLFWbool maximized = _glfwPlatformWindowMaximized(window);\n                if (window->x11.maximized != maximized)\n                {\n                    window->x11.maximized = maximized;\n                    _glfwInputWindowMaximize(window, maximized);\n                }\n            }\n\n            return;\n        }\n\n        case DestroyNotify:\n            return;\n    }\n}\n\n\n//////////////////////////////////////////////////////////////////////////\n//////                       GLFW internal API                      //////\n//////////////////////////////////////////////////////////////////////////\n\n// Retrieve a single window property of the specified type\n// Inspired by fghGetWindowProperty from freeglut\n//\nunsigned long _glfwGetWindowPropertyX11(Window window,\n                                        Atom property,\n                                        Atom type,\n                                        unsigned char** value)\n{\n    Atom actualType;\n    int actualFormat;\n    unsigned long itemCount, bytesAfter;\n\n    XGetWindowProperty(_glfw.x11.display,\n                       window,\n                       property,\n                       0,\n                       LONG_MAX,\n                       False,\n                       type,\n                       &actualType,\n                       &actualFormat,\n                       &itemCount,\n                       &bytesAfter,\n                       value);\n\n    return itemCount;\n}\n\nGLFWbool _glfwIsVisualTransparentX11(Visual* visual)\n{\n    if (!_glfw.x11.xrender.available)\n        return GLFW_FALSE;\n\n    XRenderPictFormat* pf = XRenderFindVisualFormat(_glfw.x11.display, visual);\n    return pf && pf->direct.alphaMask;\n}\n\n// Push contents of our selection to clipboard manager\n//\nvoid _glfwPushSelectionToManagerX11(void)\n{\n    XConvertSelection(_glfw.x11.display,\n                      _glfw.x11.CLIPBOARD_MANAGER,\n                      _glfw.x11.SAVE_TARGETS,\n                      None,\n                      _glfw.x11.helperWindowHandle,\n                      CurrentTime);\n\n    for (;;)\n    {\n        XEvent event;\n\n        while (XCheckIfEvent(_glfw.x11.display, &event, isSelectionEvent, NULL))\n        {\n            switch (event.type)\n            {\n                case SelectionRequest:\n                    handleSelectionRequest(&event);\n                    break;\n\n                case SelectionClear:\n                    handleSelectionClear(&event);\n                    break;\n\n                case SelectionNotify:\n                {\n                    if (event.xselection.target == _glfw.x11.SAVE_TARGETS)\n                    {\n                        // This means one of two things; either the selection\n                        // was not owned, which means there is no clipboard\n                        // manager, or the transfer to the clipboard manager has\n                        // completed\n                        // In either case, it means we are done here\n                        return;\n                    }\n\n                    break;\n                }\n            }\n        }\n\n        waitForEvent(NULL);\n    }\n}\n\n\n//////////////////////////////////////////////////////////////////////////\n//////                       GLFW platform API                      //////\n//////////////////////////////////////////////////////////////////////////\n\nint _glfwPlatformCreateWindow(_GLFWwindow* window,\n                              const _GLFWwndconfig* wndconfig,\n                              const _GLFWctxconfig* ctxconfig,\n                              const _GLFWfbconfig* fbconfig)\n{\n    Visual* visual;\n    int depth;\n\n    if (ctxconfig->client != GLFW_NO_API)\n    {\n        if (ctxconfig->source == GLFW_NATIVE_CONTEXT_API)\n        {\n            if (!_glfwInitGLX())\n                return GLFW_FALSE;\n            if (!_glfwChooseVisualGLX(wndconfig, ctxconfig, fbconfig, &visual, &depth))\n                return GLFW_FALSE;\n        }\n        else if (ctxconfig->source == GLFW_EGL_CONTEXT_API)\n        {\n            if (!_glfwInitEGL())\n                return GLFW_FALSE;\n            if (!_glfwChooseVisualEGL(wndconfig, ctxconfig, fbconfig, &visual, &depth))\n                return GLFW_FALSE;\n        }\n        else if (ctxconfig->source == GLFW_OSMESA_CONTEXT_API)\n        {\n            if (!_glfwInitOSMesa())\n                return GLFW_FALSE;\n        }\n    }\n\n    if (ctxconfig->client == GLFW_NO_API ||\n        ctxconfig->source == GLFW_OSMESA_CONTEXT_API)\n    {\n        visual = DefaultVisual(_glfw.x11.display, _glfw.x11.screen);\n        depth = DefaultDepth(_glfw.x11.display, _glfw.x11.screen);\n    }\n\n    if (!createNativeWindow(window, wndconfig, visual, depth))\n        return GLFW_FALSE;\n\n    if (ctxconfig->client != GLFW_NO_API)\n    {\n        if (ctxconfig->source == GLFW_NATIVE_CONTEXT_API)\n        {\n            if (!_glfwCreateContextGLX(window, ctxconfig, fbconfig))\n                return GLFW_FALSE;\n        }\n        else if (ctxconfig->source == GLFW_EGL_CONTEXT_API)\n        {\n            if (!_glfwCreateContextEGL(window, ctxconfig, fbconfig))\n                return GLFW_FALSE;\n        }\n        else if (ctxconfig->source == GLFW_OSMESA_CONTEXT_API)\n        {\n            if (!_glfwCreateContextOSMesa(window, ctxconfig, fbconfig))\n                return GLFW_FALSE;\n        }\n    }\n\n    if (window->monitor)\n    {\n        _glfwPlatformShowWindow(window);\n        updateWindowMode(window);\n        acquireMonitor(window);\n    }\n\n    XFlush(_glfw.x11.display);\n    return GLFW_TRUE;\n}\n\nvoid _glfwPlatformDestroyWindow(_GLFWwindow* window)\n{\n    if (_glfw.x11.disabledCursorWindow == window)\n        _glfw.x11.disabledCursorWindow = NULL;\n\n    if (window->monitor)\n        releaseMonitor(window);\n\n    if (window->x11.ic)\n    {\n        XDestroyIC(window->x11.ic);\n        window->x11.ic = NULL;\n    }\n\n    if (window->context.destroy)\n        window->context.destroy(window);\n\n    if (window->x11.handle)\n    {\n        XDeleteContext(_glfw.x11.display, window->x11.handle, _glfw.x11.context);\n        XUnmapWindow(_glfw.x11.display, window->x11.handle);\n        XDestroyWindow(_glfw.x11.display, window->x11.handle);\n        window->x11.handle = (Window) 0;\n    }\n\n    if (window->x11.colormap)\n    {\n        XFreeColormap(_glfw.x11.display, window->x11.colormap);\n        window->x11.colormap = (Colormap) 0;\n    }\n\n    XFlush(_glfw.x11.display);\n}\n\nvoid _glfwPlatformSetWindowTitle(_GLFWwindow* window, const char* title)\n{\n#if defined(X_HAVE_UTF8_STRING)\n    Xutf8SetWMProperties(_glfw.x11.display,\n                         window->x11.handle,\n                         title, title,\n                         NULL, 0,\n                         NULL, NULL, NULL);\n#else\n    // This may be a slightly better fallback than using XStoreName and\n    // XSetIconName, which always store their arguments using STRING\n    XmbSetWMProperties(_glfw.x11.display,\n                       window->x11.handle,\n                       title, title,\n                       NULL, 0,\n                       NULL, NULL, NULL);\n#endif\n\n    XChangeProperty(_glfw.x11.display,  window->x11.handle,\n                    _glfw.x11.NET_WM_NAME, _glfw.x11.UTF8_STRING, 8,\n                    PropModeReplace,\n                    (unsigned char*) title, strlen(title));\n\n    XChangeProperty(_glfw.x11.display,  window->x11.handle,\n                    _glfw.x11.NET_WM_ICON_NAME, _glfw.x11.UTF8_STRING, 8,\n                    PropModeReplace,\n                    (unsigned char*) title, strlen(title));\n\n    XFlush(_glfw.x11.display);\n}\n\nvoid _glfwPlatformSetWindowIcon(_GLFWwindow* window,\n                                int count, const GLFWimage* images)\n{\n    if (count)\n    {\n        int i, j, longCount = 0;\n\n        for (i = 0;  i < count;  i++)\n            longCount += 2 + images[i].width * images[i].height;\n\n        long* icon = calloc(longCount, sizeof(long));\n        long* target = icon;\n\n        for (i = 0;  i < count;  i++)\n        {\n            *target++ = images[i].width;\n            *target++ = images[i].height;\n\n            for (j = 0;  j < images[i].width * images[i].height;  j++)\n            {\n                *target++ = (images[i].pixels[j * 4 + 0] << 16) |\n                            (images[i].pixels[j * 4 + 1] <<  8) |\n                            (images[i].pixels[j * 4 + 2] <<  0) |\n                            (images[i].pixels[j * 4 + 3] << 24);\n            }\n        }\n\n        XChangeProperty(_glfw.x11.display, window->x11.handle,\n                        _glfw.x11.NET_WM_ICON,\n                        XA_CARDINAL, 32,\n                        PropModeReplace,\n                        (unsigned char*) icon,\n                        longCount);\n\n        free(icon);\n    }\n    else\n    {\n        XDeleteProperty(_glfw.x11.display, window->x11.handle,\n                        _glfw.x11.NET_WM_ICON);\n    }\n\n    XFlush(_glfw.x11.display);\n}\n\nvoid _glfwPlatformGetWindowPos(_GLFWwindow* window, int* xpos, int* ypos)\n{\n    Window dummy;\n    int x, y;\n\n    XTranslateCoordinates(_glfw.x11.display, window->x11.handle, _glfw.x11.root,\n                          0, 0, &x, &y, &dummy);\n\n    if (xpos)\n        *xpos = x;\n    if (ypos)\n        *ypos = y;\n}\n\nvoid _glfwPlatformSetWindowPos(_GLFWwindow* window, int xpos, int ypos)\n{\n    // HACK: Explicitly setting PPosition to any value causes some WMs, notably\n    //       Compiz and Metacity, to honor the position of unmapped windows\n    if (!_glfwPlatformWindowVisible(window))\n    {\n        long supplied;\n        XSizeHints* hints = XAllocSizeHints();\n\n        if (XGetWMNormalHints(_glfw.x11.display, window->x11.handle, hints, &supplied))\n        {\n            hints->flags |= PPosition;\n            hints->x = hints->y = 0;\n\n            XSetWMNormalHints(_glfw.x11.display, window->x11.handle, hints);\n        }\n\n        XFree(hints);\n    }\n\n    XMoveWindow(_glfw.x11.display, window->x11.handle, xpos, ypos);\n    XFlush(_glfw.x11.display);\n}\n\nvoid _glfwPlatformGetWindowSize(_GLFWwindow* window, int* width, int* height)\n{\n    XWindowAttributes attribs;\n    XGetWindowAttributes(_glfw.x11.display, window->x11.handle, &attribs);\n\n    if (width)\n        *width = attribs.width;\n    if (height)\n        *height = attribs.height;\n}\n\nvoid _glfwPlatformSetWindowSize(_GLFWwindow* window, int width, int height)\n{\n    if (window->monitor)\n    {\n        if (window->monitor->window == window)\n            acquireMonitor(window);\n    }\n    else\n    {\n        if (!window->resizable)\n            updateNormalHints(window, width, height);\n\n        XResizeWindow(_glfw.x11.display, window->x11.handle, width, height);\n    }\n\n    XFlush(_glfw.x11.display);\n}\n\nvoid _glfwPlatformSetWindowSizeLimits(_GLFWwindow* window,\n                                      int minwidth, int minheight,\n                                      int maxwidth, int maxheight)\n{\n    int width, height;\n    _glfwPlatformGetWindowSize(window, &width, &height);\n    updateNormalHints(window, width, height);\n    XFlush(_glfw.x11.display);\n}\n\nvoid _glfwPlatformSetWindowAspectRatio(_GLFWwindow* window, int numer, int denom)\n{\n    int width, height;\n    _glfwPlatformGetWindowSize(window, &width, &height);\n    updateNormalHints(window, width, height);\n    XFlush(_glfw.x11.display);\n}\n\nvoid _glfwPlatformGetFramebufferSize(_GLFWwindow* window, int* width, int* height)\n{\n    _glfwPlatformGetWindowSize(window, width, height);\n}\n\nvoid _glfwPlatformGetWindowFrameSize(_GLFWwindow* window,\n                                     int* left, int* top,\n                                     int* right, int* bottom)\n{\n    long* extents = NULL;\n\n    if (window->monitor || !window->decorated)\n        return;\n\n    if (_glfw.x11.NET_FRAME_EXTENTS == None)\n        return;\n\n    if (!_glfwPlatformWindowVisible(window) &&\n        _glfw.x11.NET_REQUEST_FRAME_EXTENTS)\n    {\n        XEvent event;\n        double timeout = 0.5;\n\n        // Ensure _NET_FRAME_EXTENTS is set, allowing glfwGetWindowFrameSize to\n        // function before the window is mapped\n        sendEventToWM(window, _glfw.x11.NET_REQUEST_FRAME_EXTENTS,\n                      0, 0, 0, 0, 0);\n\n        // HACK: Use a timeout because earlier versions of some window managers\n        //       (at least Unity, Fluxbox and Xfwm) failed to send the reply\n        //       They have been fixed but broken versions are still in the wild\n        //       If you are affected by this and your window manager is NOT\n        //       listed above, PLEASE report it to their and our issue trackers\n        while (!XCheckIfEvent(_glfw.x11.display,\n                              &event,\n                              isFrameExtentsEvent,\n                              (XPointer) window))\n        {\n            if (!waitForEvent(&timeout))\n            {\n                _glfwInputError(GLFW_PLATFORM_ERROR,\n                                \"X11: The window manager has a broken _NET_REQUEST_FRAME_EXTENTS implementation; please report this issue\");\n                return;\n            }\n        }\n    }\n\n    if (_glfwGetWindowPropertyX11(window->x11.handle,\n                                  _glfw.x11.NET_FRAME_EXTENTS,\n                                  XA_CARDINAL,\n                                  (unsigned char**) &extents) == 4)\n    {\n        if (left)\n            *left = extents[0];\n        if (top)\n            *top = extents[2];\n        if (right)\n            *right = extents[1];\n        if (bottom)\n            *bottom = extents[3];\n    }\n\n    if (extents)\n        XFree(extents);\n}\n\nvoid _glfwPlatformGetWindowContentScale(_GLFWwindow* window,\n                                        float* xscale, float* yscale)\n{\n    if (xscale)\n        *xscale = _glfw.x11.contentScaleX;\n    if (yscale)\n        *yscale = _glfw.x11.contentScaleY;\n}\n\nvoid _glfwPlatformIconifyWindow(_GLFWwindow* window)\n{\n    if (window->x11.overrideRedirect)\n    {\n        // Override-redirect windows cannot be iconified or restored, as those\n        // tasks are performed by the window manager\n        _glfwInputError(GLFW_PLATFORM_ERROR,\n                        \"X11: Iconification of full screen windows requires a WM that supports EWMH full screen\");\n        return;\n    }\n\n    XIconifyWindow(_glfw.x11.display, window->x11.handle, _glfw.x11.screen);\n    XFlush(_glfw.x11.display);\n}\n\nvoid _glfwPlatformRestoreWindow(_GLFWwindow* window)\n{\n    if (window->x11.overrideRedirect)\n    {\n        // Override-redirect windows cannot be iconified or restored, as those\n        // tasks are performed by the window manager\n        _glfwInputError(GLFW_PLATFORM_ERROR,\n                        \"X11: Iconification of full screen windows requires a WM that supports EWMH full screen\");\n        return;\n    }\n\n    if (_glfwPlatformWindowIconified(window))\n    {\n        XMapWindow(_glfw.x11.display, window->x11.handle);\n        waitForVisibilityNotify(window);\n    }\n    else if (_glfwPlatformWindowVisible(window))\n    {\n        if (_glfw.x11.NET_WM_STATE &&\n            _glfw.x11.NET_WM_STATE_MAXIMIZED_VERT &&\n            _glfw.x11.NET_WM_STATE_MAXIMIZED_HORZ)\n        {\n            sendEventToWM(window,\n                          _glfw.x11.NET_WM_STATE,\n                          _NET_WM_STATE_REMOVE,\n                          _glfw.x11.NET_WM_STATE_MAXIMIZED_VERT,\n                          _glfw.x11.NET_WM_STATE_MAXIMIZED_HORZ,\n                          1, 0);\n        }\n    }\n\n    XFlush(_glfw.x11.display);\n}\n\nvoid _glfwPlatformMaximizeWindow(_GLFWwindow* window)\n{\n    if (!_glfw.x11.NET_WM_STATE ||\n        !_glfw.x11.NET_WM_STATE_MAXIMIZED_VERT ||\n        !_glfw.x11.NET_WM_STATE_MAXIMIZED_HORZ)\n    {\n        return;\n    }\n\n    if (_glfwPlatformWindowVisible(window))\n    {\n        sendEventToWM(window,\n                    _glfw.x11.NET_WM_STATE,\n                    _NET_WM_STATE_ADD,\n                    _glfw.x11.NET_WM_STATE_MAXIMIZED_VERT,\n                    _glfw.x11.NET_WM_STATE_MAXIMIZED_HORZ,\n                    1, 0);\n    }\n    else\n    {\n        Atom* states = NULL;\n        unsigned long count =\n            _glfwGetWindowPropertyX11(window->x11.handle,\n                                      _glfw.x11.NET_WM_STATE,\n                                      XA_ATOM,\n                                      (unsigned char**) &states);\n\n        // NOTE: We don't check for failure as this property may not exist yet\n        //       and that's fine (and we'll create it implicitly with append)\n\n        Atom missing[2] =\n        {\n            _glfw.x11.NET_WM_STATE_MAXIMIZED_VERT,\n            _glfw.x11.NET_WM_STATE_MAXIMIZED_HORZ\n        };\n        unsigned long missingCount = 2;\n\n        for (unsigned long i = 0;  i < count;  i++)\n        {\n            for (unsigned long j = 0;  j < missingCount;  j++)\n            {\n                if (states[i] == missing[j])\n                {\n                    missing[j] = missing[missingCount - 1];\n                    missingCount--;\n                }\n            }\n        }\n\n        if (states)\n            XFree(states);\n\n        if (!missingCount)\n            return;\n\n        XChangeProperty(_glfw.x11.display, window->x11.handle,\n                        _glfw.x11.NET_WM_STATE, XA_ATOM, 32,\n                        PropModeAppend,\n                        (unsigned char*) missing,\n                        missingCount);\n    }\n\n    XFlush(_glfw.x11.display);\n}\n\nvoid _glfwPlatformShowWindow(_GLFWwindow* window)\n{\n    if (_glfwPlatformWindowVisible(window))\n        return;\n\n    XMapWindow(_glfw.x11.display, window->x11.handle);\n    waitForVisibilityNotify(window);\n}\n\nvoid _glfwPlatformHideWindow(_GLFWwindow* window)\n{\n    XUnmapWindow(_glfw.x11.display, window->x11.handle);\n    XFlush(_glfw.x11.display);\n}\n\nvoid _glfwPlatformRequestWindowAttention(_GLFWwindow* window)\n{\n    if (!_glfw.x11.NET_WM_STATE || !_glfw.x11.NET_WM_STATE_DEMANDS_ATTENTION)\n        return;\n\n    sendEventToWM(window,\n                  _glfw.x11.NET_WM_STATE,\n                  _NET_WM_STATE_ADD,\n                  _glfw.x11.NET_WM_STATE_DEMANDS_ATTENTION,\n                  0, 1, 0);\n}\n\nvoid _glfwPlatformFocusWindow(_GLFWwindow* window)\n{\n    if (_glfw.x11.NET_ACTIVE_WINDOW)\n        sendEventToWM(window, _glfw.x11.NET_ACTIVE_WINDOW, 1, 0, 0, 0, 0);\n    else if (_glfwPlatformWindowVisible(window))\n    {\n        XRaiseWindow(_glfw.x11.display, window->x11.handle);\n        XSetInputFocus(_glfw.x11.display, window->x11.handle,\n                       RevertToParent, CurrentTime);\n    }\n\n    XFlush(_glfw.x11.display);\n}\n\nvoid _glfwPlatformSetWindowMonitor(_GLFWwindow* window,\n                                   _GLFWmonitor* monitor,\n                                   int xpos, int ypos,\n                                   int width, int height,\n                                   int refreshRate)\n{\n    if (window->monitor == monitor)\n    {\n        if (monitor)\n        {\n            if (monitor->window == window)\n                acquireMonitor(window);\n        }\n        else\n        {\n            if (!window->resizable)\n                updateNormalHints(window, width, height);\n\n            XMoveResizeWindow(_glfw.x11.display, window->x11.handle,\n                              xpos, ypos, width, height);\n        }\n\n        XFlush(_glfw.x11.display);\n        return;\n    }\n\n    if (window->monitor)\n        releaseMonitor(window);\n\n    _glfwInputWindowMonitor(window, monitor);\n    updateNormalHints(window, width, height);\n\n    if (window->monitor)\n    {\n        if (!_glfwPlatformWindowVisible(window))\n        {\n            XMapRaised(_glfw.x11.display, window->x11.handle);\n            waitForVisibilityNotify(window);\n        }\n\n        updateWindowMode(window);\n        acquireMonitor(window);\n    }\n    else\n    {\n        updateWindowMode(window);\n        XMoveResizeWindow(_glfw.x11.display, window->x11.handle,\n                          xpos, ypos, width, height);\n    }\n\n    XFlush(_glfw.x11.display);\n}\n\nint _glfwPlatformWindowFocused(_GLFWwindow* window)\n{\n    Window focused;\n    int state;\n\n    XGetInputFocus(_glfw.x11.display, &focused, &state);\n    return window->x11.handle == focused;\n}\n\nint _glfwPlatformWindowIconified(_GLFWwindow* window)\n{\n    return getWindowState(window) == IconicState;\n}\n\nint _glfwPlatformWindowVisible(_GLFWwindow* window)\n{\n    XWindowAttributes wa;\n    XGetWindowAttributes(_glfw.x11.display, window->x11.handle, &wa);\n    return wa.map_state == IsViewable;\n}\n\nint _glfwPlatformWindowMaximized(_GLFWwindow* window)\n{\n    Atom* states;\n    unsigned long i;\n    GLFWbool maximized = GLFW_FALSE;\n\n    if (!_glfw.x11.NET_WM_STATE ||\n        !_glfw.x11.NET_WM_STATE_MAXIMIZED_VERT ||\n        !_glfw.x11.NET_WM_STATE_MAXIMIZED_HORZ)\n    {\n        return maximized;\n    }\n\n    const unsigned long count =\n        _glfwGetWindowPropertyX11(window->x11.handle,\n                                  _glfw.x11.NET_WM_STATE,\n                                  XA_ATOM,\n                                  (unsigned char**) &states);\n\n    for (i = 0;  i < count;  i++)\n    {\n        if (states[i] == _glfw.x11.NET_WM_STATE_MAXIMIZED_VERT ||\n            states[i] == _glfw.x11.NET_WM_STATE_MAXIMIZED_HORZ)\n        {\n            maximized = GLFW_TRUE;\n            break;\n        }\n    }\n\n    if (states)\n        XFree(states);\n\n    return maximized;\n}\n\nint _glfwPlatformWindowHovered(_GLFWwindow* window)\n{\n    Window w = _glfw.x11.root;\n    while (w)\n    {\n        Window root;\n        int rootX, rootY, childX, childY;\n        unsigned int mask;\n\n        if (!XQueryPointer(_glfw.x11.display, w,\n                           &root, &w, &rootX, &rootY, &childX, &childY, &mask))\n        {\n            return GLFW_FALSE;\n        }\n\n        if (w == window->x11.handle)\n            return GLFW_TRUE;\n    }\n\n    return GLFW_FALSE;\n}\n\nint _glfwPlatformFramebufferTransparent(_GLFWwindow* window)\n{\n    if (!window->x11.transparent)\n        return GLFW_FALSE;\n\n    return XGetSelectionOwner(_glfw.x11.display, _glfw.x11.NET_WM_CM_Sx) != None;\n}\n\nvoid _glfwPlatformSetWindowResizable(_GLFWwindow* window, GLFWbool enabled)\n{\n    int width, height;\n    _glfwPlatformGetWindowSize(window, &width, &height);\n    updateNormalHints(window, width, height);\n}\n\nvoid _glfwPlatformSetWindowDecorated(_GLFWwindow* window, GLFWbool enabled)\n{\n    struct\n    {\n        unsigned long flags;\n        unsigned long functions;\n        unsigned long decorations;\n        long input_mode;\n        unsigned long status;\n    } hints = {0};\n\n    hints.flags = MWM_HINTS_DECORATIONS;\n    hints.decorations = enabled ? MWM_DECOR_ALL : 0;\n\n    XChangeProperty(_glfw.x11.display, window->x11.handle,\n                    _glfw.x11.MOTIF_WM_HINTS,\n                    _glfw.x11.MOTIF_WM_HINTS, 32,\n                    PropModeReplace,\n                    (unsigned char*) &hints,\n                    sizeof(hints) / sizeof(long));\n}\n\nvoid _glfwPlatformSetWindowFloating(_GLFWwindow* window, GLFWbool enabled)\n{\n    if (!_glfw.x11.NET_WM_STATE || !_glfw.x11.NET_WM_STATE_ABOVE)\n        return;\n\n    if (_glfwPlatformWindowVisible(window))\n    {\n        const long action = enabled ? _NET_WM_STATE_ADD : _NET_WM_STATE_REMOVE;\n        sendEventToWM(window,\n                      _glfw.x11.NET_WM_STATE,\n                      action,\n                      _glfw.x11.NET_WM_STATE_ABOVE,\n                      0, 1, 0);\n    }\n    else\n    {\n        Atom* states = NULL;\n        unsigned long i, count;\n\n        count = _glfwGetWindowPropertyX11(window->x11.handle,\n                                          _glfw.x11.NET_WM_STATE,\n                                          XA_ATOM,\n                                          (unsigned char**) &states);\n\n        // NOTE: We don't check for failure as this property may not exist yet\n        //       and that's fine (and we'll create it implicitly with append)\n\n        if (enabled)\n        {\n            for (i = 0;  i < count;  i++)\n            {\n                if (states[i] == _glfw.x11.NET_WM_STATE_ABOVE)\n                    break;\n            }\n\n            if (i < count)\n                return;\n\n            XChangeProperty(_glfw.x11.display, window->x11.handle,\n                            _glfw.x11.NET_WM_STATE, XA_ATOM, 32,\n                            PropModeAppend,\n                            (unsigned char*) &_glfw.x11.NET_WM_STATE_ABOVE,\n                            1);\n        }\n        else if (states)\n        {\n            for (i = 0;  i < count;  i++)\n            {\n                if (states[i] == _glfw.x11.NET_WM_STATE_ABOVE)\n                    break;\n            }\n\n            if (i == count)\n                return;\n\n            states[i] = states[count - 1];\n            count--;\n\n            XChangeProperty(_glfw.x11.display, window->x11.handle,\n                            _glfw.x11.NET_WM_STATE, XA_ATOM, 32,\n                            PropModeReplace, (unsigned char*) states, count);\n        }\n\n        if (states)\n            XFree(states);\n    }\n\n    XFlush(_glfw.x11.display);\n}\n\nfloat _glfwPlatformGetWindowOpacity(_GLFWwindow* window)\n{\n    float opacity = 1.f;\n\n    if (XGetSelectionOwner(_glfw.x11.display, _glfw.x11.NET_WM_CM_Sx))\n    {\n        CARD32* value = NULL;\n\n        if (_glfwGetWindowPropertyX11(window->x11.handle,\n                                      _glfw.x11.NET_WM_WINDOW_OPACITY,\n                                      XA_CARDINAL,\n                                      (unsigned char**) &value))\n        {\n            opacity = (float) (*value / (double) 0xffffffffu);\n        }\n\n        if (value)\n            XFree(value);\n    }\n\n    return opacity;\n}\n\nvoid _glfwPlatformSetWindowOpacity(_GLFWwindow* window, float opacity)\n{\n    const CARD32 value = (CARD32) (0xffffffffu * (double) opacity);\n    XChangeProperty(_glfw.x11.display, window->x11.handle,\n                    _glfw.x11.NET_WM_WINDOW_OPACITY, XA_CARDINAL, 32,\n                    PropModeReplace, (unsigned char*) &value, 1);\n}\n\nvoid _glfwPlatformSetRawMouseMotion(_GLFWwindow *window, GLFWbool enabled)\n{\n    if (!_glfw.x11.xi.available)\n        return;\n\n    if (_glfw.x11.disabledCursorWindow != window)\n        return;\n\n    if (enabled)\n        enableRawMouseMotion(window);\n    else\n        disableRawMouseMotion(window);\n}\n\nGLFWbool _glfwPlatformRawMouseMotionSupported(void)\n{\n    return _glfw.x11.xi.available;\n}\n\nvoid _glfwPlatformPollEvents(void)\n{\n    _GLFWwindow* window;\n\n#if defined(__linux__)\n    _glfwDetectJoystickConnectionLinux();\n#endif\n    XPending(_glfw.x11.display);\n\n    while (XQLength(_glfw.x11.display))\n    {\n        XEvent event;\n        XNextEvent(_glfw.x11.display, &event);\n        processEvent(&event);\n    }\n\n    window = _glfw.x11.disabledCursorWindow;\n    if (window)\n    {\n        int width, height;\n        _glfwPlatformGetWindowSize(window, &width, &height);\n\n        // NOTE: Re-center the cursor only if it has moved since the last call,\n        //       to avoid breaking glfwWaitEvents with MotionNotify\n        if (window->x11.lastCursorPosX != width / 2 ||\n            window->x11.lastCursorPosY != height / 2)\n        {\n            _glfwPlatformSetCursorPos(window, width / 2, height / 2);\n        }\n    }\n\n    XFlush(_glfw.x11.display);\n}\n\nvoid _glfwPlatformWaitEvents(void)\n{\n    while (!XPending(_glfw.x11.display))\n        waitForEvent(NULL);\n\n    _glfwPlatformPollEvents();\n}\n\nvoid _glfwPlatformWaitEventsTimeout(double timeout)\n{\n    while (!XPending(_glfw.x11.display))\n    {\n        if (!waitForEvent(&timeout))\n            break;\n    }\n\n    _glfwPlatformPollEvents();\n}\n\nvoid _glfwPlatformPostEmptyEvent(void)\n{\n    XEvent event = { ClientMessage };\n    event.xclient.window = _glfw.x11.helperWindowHandle;\n    event.xclient.format = 32; // Data is 32-bit longs\n    event.xclient.message_type = _glfw.x11.NULL_;\n\n    XSendEvent(_glfw.x11.display, _glfw.x11.helperWindowHandle, False, 0, &event);\n    XFlush(_glfw.x11.display);\n}\n\nvoid _glfwPlatformGetCursorPos(_GLFWwindow* window, double* xpos, double* ypos)\n{\n    Window root, child;\n    int rootX, rootY, childX, childY;\n    unsigned int mask;\n\n    XQueryPointer(_glfw.x11.display, window->x11.handle,\n                  &root, &child,\n                  &rootX, &rootY, &childX, &childY,\n                  &mask);\n\n    if (xpos)\n        *xpos = childX;\n    if (ypos)\n        *ypos = childY;\n}\n\nvoid _glfwPlatformSetCursorPos(_GLFWwindow* window, double x, double y)\n{\n    // Store the new position so it can be recognized later\n    window->x11.warpCursorPosX = (int) x;\n    window->x11.warpCursorPosY = (int) y;\n\n    XWarpPointer(_glfw.x11.display, None, window->x11.handle,\n                 0,0,0,0, (int) x, (int) y);\n    XFlush(_glfw.x11.display);\n}\n\nvoid _glfwPlatformSetCursorMode(_GLFWwindow* window, int mode)\n{\n    if (mode == GLFW_CURSOR_DISABLED)\n    {\n        if (_glfwPlatformWindowFocused(window))\n            disableCursor(window);\n    }\n    else if (_glfw.x11.disabledCursorWindow == window)\n        enableCursor(window);\n    else\n        updateCursorImage(window);\n\n    XFlush(_glfw.x11.display);\n}\n\nconst char* _glfwPlatformGetScancodeName(int scancode)\n{\n    if (!_glfw.x11.xkb.available)\n        return NULL;\n\n    if (scancode < 0 || scancode > 0xff ||\n        _glfw.x11.keycodes[scancode] == GLFW_KEY_UNKNOWN)\n    {\n        _glfwInputError(GLFW_INVALID_VALUE, \"Invalid scancode\");\n        return NULL;\n    }\n\n    const int key = _glfw.x11.keycodes[scancode];\n    const KeySym keysym = XkbKeycodeToKeysym(_glfw.x11.display,\n                                             scancode, _glfw.x11.xkb.group, 0);\n    if (keysym == NoSymbol)\n        return NULL;\n\n    const long ch = _glfwKeySym2Unicode(keysym);\n    if (ch == -1)\n        return NULL;\n\n    const size_t count = encodeUTF8(_glfw.x11.keynames[key], (unsigned int) ch);\n    if (count == 0)\n        return NULL;\n\n    _glfw.x11.keynames[key][count] = '\\0';\n    return _glfw.x11.keynames[key];\n}\n\nint _glfwPlatformGetKeyScancode(int key)\n{\n    return _glfw.x11.scancodes[key];\n}\n\nint _glfwPlatformCreateCursor(_GLFWcursor* cursor,\n                              const GLFWimage* image,\n                              int xhot, int yhot)\n{\n    cursor->x11.handle = _glfwCreateCursorX11(image, xhot, yhot);\n    if (!cursor->x11.handle)\n        return GLFW_FALSE;\n\n    return GLFW_TRUE;\n}\n\nint _glfwPlatformCreateStandardCursor(_GLFWcursor* cursor, int shape)\n{\n    int native = 0;\n\n    if (shape == GLFW_ARROW_CURSOR)\n        native = XC_left_ptr;\n    else if (shape == GLFW_IBEAM_CURSOR)\n        native = XC_xterm;\n    else if (shape == GLFW_CROSSHAIR_CURSOR)\n        native = XC_crosshair;\n    else if (shape == GLFW_HAND_CURSOR)\n        native = XC_hand2;\n    else if (shape == GLFW_HRESIZE_CURSOR)\n        native = XC_sb_h_double_arrow;\n    else if (shape == GLFW_VRESIZE_CURSOR)\n        native = XC_sb_v_double_arrow;\n    else\n        return GLFW_FALSE;\n\n    cursor->x11.handle = XCreateFontCursor(_glfw.x11.display, native);\n    if (!cursor->x11.handle)\n    {\n        _glfwInputError(GLFW_PLATFORM_ERROR,\n                        \"X11: Failed to create standard cursor\");\n        return GLFW_FALSE;\n    }\n\n    return GLFW_TRUE;\n}\n\nvoid _glfwPlatformDestroyCursor(_GLFWcursor* cursor)\n{\n    if (cursor->x11.handle)\n        XFreeCursor(_glfw.x11.display, cursor->x11.handle);\n}\n\nvoid _glfwPlatformSetCursor(_GLFWwindow* window, _GLFWcursor* cursor)\n{\n    if (window->cursorMode == GLFW_CURSOR_NORMAL)\n    {\n        updateCursorImage(window);\n        XFlush(_glfw.x11.display);\n    }\n}\n\nvoid _glfwPlatformSetClipboardString(const char* string)\n{\n    free(_glfw.x11.clipboardString);\n    _glfw.x11.clipboardString = _glfw_strdup(string);\n\n    XSetSelectionOwner(_glfw.x11.display,\n                       _glfw.x11.CLIPBOARD,\n                       _glfw.x11.helperWindowHandle,\n                       CurrentTime);\n\n    if (XGetSelectionOwner(_glfw.x11.display, _glfw.x11.CLIPBOARD) !=\n        _glfw.x11.helperWindowHandle)\n    {\n        _glfwInputError(GLFW_PLATFORM_ERROR,\n                        \"X11: Failed to become owner of clipboard selection\");\n    }\n}\n\nconst char* _glfwPlatformGetClipboardString(void)\n{\n    return getSelectionString(_glfw.x11.CLIPBOARD);\n}\n\nvoid _glfwPlatformGetRequiredInstanceExtensions(char** extensions)\n{\n    if (!_glfw.vk.KHR_surface)\n        return;\n\n    if (!_glfw.vk.KHR_xcb_surface || !_glfw.x11.x11xcb.handle)\n    {\n        if (!_glfw.vk.KHR_xlib_surface)\n            return;\n    }\n\n    extensions[0] = \"VK_KHR_surface\";\n\n    // NOTE: VK_KHR_xcb_surface is preferred due to some early ICDs exposing but\n    //       not correctly implementing VK_KHR_xlib_surface\n    if (_glfw.vk.KHR_xcb_surface && _glfw.x11.x11xcb.handle)\n        extensions[1] = \"VK_KHR_xcb_surface\";\n    else\n        extensions[1] = \"VK_KHR_xlib_surface\";\n}\n\nint _glfwPlatformGetPhysicalDevicePresentationSupport(VkInstance instance,\n                                                      VkPhysicalDevice device,\n                                                      uint32_t queuefamily)\n{\n    VisualID visualID = XVisualIDFromVisual(DefaultVisual(_glfw.x11.display,\n                                                          _glfw.x11.screen));\n\n    if (_glfw.vk.KHR_xcb_surface && _glfw.x11.x11xcb.handle)\n    {\n        PFN_vkGetPhysicalDeviceXcbPresentationSupportKHR\n            vkGetPhysicalDeviceXcbPresentationSupportKHR =\n            (PFN_vkGetPhysicalDeviceXcbPresentationSupportKHR)\n            vkGetInstanceProcAddr(instance, \"vkGetPhysicalDeviceXcbPresentationSupportKHR\");\n        if (!vkGetPhysicalDeviceXcbPresentationSupportKHR)\n        {\n            _glfwInputError(GLFW_API_UNAVAILABLE,\n                            \"X11: Vulkan instance missing VK_KHR_xcb_surface extension\");\n            return GLFW_FALSE;\n        }\n\n        xcb_connection_t* connection = XGetXCBConnection(_glfw.x11.display);\n        if (!connection)\n        {\n            _glfwInputError(GLFW_PLATFORM_ERROR,\n                            \"X11: Failed to retrieve XCB connection\");\n            return GLFW_FALSE;\n        }\n\n        return vkGetPhysicalDeviceXcbPresentationSupportKHR(device,\n                                                            queuefamily,\n                                                            connection,\n                                                            visualID);\n    }\n    else\n    {\n        PFN_vkGetPhysicalDeviceXlibPresentationSupportKHR\n            vkGetPhysicalDeviceXlibPresentationSupportKHR =\n            (PFN_vkGetPhysicalDeviceXlibPresentationSupportKHR)\n            vkGetInstanceProcAddr(instance, \"vkGetPhysicalDeviceXlibPresentationSupportKHR\");\n        if (!vkGetPhysicalDeviceXlibPresentationSupportKHR)\n        {\n            _glfwInputError(GLFW_API_UNAVAILABLE,\n                            \"X11: Vulkan instance missing VK_KHR_xlib_surface extension\");\n            return GLFW_FALSE;\n        }\n\n        return vkGetPhysicalDeviceXlibPresentationSupportKHR(device,\n                                                             queuefamily,\n                                                             _glfw.x11.display,\n                                                             visualID);\n    }\n}\n\nVkResult _glfwPlatformCreateWindowSurface(VkInstance instance,\n                                          _GLFWwindow* window,\n                                          const VkAllocationCallbacks* allocator,\n                                          VkSurfaceKHR* surface)\n{\n    if (_glfw.vk.KHR_xcb_surface && _glfw.x11.x11xcb.handle)\n    {\n        VkResult err;\n        VkXcbSurfaceCreateInfoKHR sci;\n        PFN_vkCreateXcbSurfaceKHR vkCreateXcbSurfaceKHR;\n\n        xcb_connection_t* connection = XGetXCBConnection(_glfw.x11.display);\n        if (!connection)\n        {\n            _glfwInputError(GLFW_PLATFORM_ERROR,\n                            \"X11: Failed to retrieve XCB connection\");\n            return VK_ERROR_EXTENSION_NOT_PRESENT;\n        }\n\n        vkCreateXcbSurfaceKHR = (PFN_vkCreateXcbSurfaceKHR)\n            vkGetInstanceProcAddr(instance, \"vkCreateXcbSurfaceKHR\");\n        if (!vkCreateXcbSurfaceKHR)\n        {\n            _glfwInputError(GLFW_API_UNAVAILABLE,\n                            \"X11: Vulkan instance missing VK_KHR_xcb_surface extension\");\n            return VK_ERROR_EXTENSION_NOT_PRESENT;\n        }\n\n        memset(&sci, 0, sizeof(sci));\n        sci.sType = VK_STRUCTURE_TYPE_XCB_SURFACE_CREATE_INFO_KHR;\n        sci.connection = connection;\n        sci.window = window->x11.handle;\n\n        err = vkCreateXcbSurfaceKHR(instance, &sci, allocator, surface);\n        if (err)\n        {\n            _glfwInputError(GLFW_PLATFORM_ERROR,\n                            \"X11: Failed to create Vulkan XCB surface: %s\",\n                            _glfwGetVulkanResultString(err));\n        }\n\n        return err;\n    }\n    else\n    {\n        VkResult err;\n        VkXlibSurfaceCreateInfoKHR sci;\n        PFN_vkCreateXlibSurfaceKHR vkCreateXlibSurfaceKHR;\n\n        vkCreateXlibSurfaceKHR = (PFN_vkCreateXlibSurfaceKHR)\n            vkGetInstanceProcAddr(instance, \"vkCreateXlibSurfaceKHR\");\n        if (!vkCreateXlibSurfaceKHR)\n        {\n            _glfwInputError(GLFW_API_UNAVAILABLE,\n                            \"X11: Vulkan instance missing VK_KHR_xlib_surface extension\");\n            return VK_ERROR_EXTENSION_NOT_PRESENT;\n        }\n\n        memset(&sci, 0, sizeof(sci));\n        sci.sType = VK_STRUCTURE_TYPE_XLIB_SURFACE_CREATE_INFO_KHR;\n        sci.dpy = _glfw.x11.display;\n        sci.window = window->x11.handle;\n\n        err = vkCreateXlibSurfaceKHR(instance, &sci, allocator, surface);\n        if (err)\n        {\n            _glfwInputError(GLFW_PLATFORM_ERROR,\n                            \"X11: Failed to create Vulkan X11 surface: %s\",\n                            _glfwGetVulkanResultString(err));\n        }\n\n        return err;\n    }\n}\n\n\n//////////////////////////////////////////////////////////////////////////\n//////                        GLFW native API                       //////\n//////////////////////////////////////////////////////////////////////////\n\nGLFWAPI Display* glfwGetX11Display(void)\n{\n    _GLFW_REQUIRE_INIT_OR_RETURN(NULL);\n    return _glfw.x11.display;\n}\n\nGLFWAPI Window glfwGetX11Window(GLFWwindow* handle)\n{\n    _GLFWwindow* window = (_GLFWwindow*) handle;\n    _GLFW_REQUIRE_INIT_OR_RETURN(None);\n    return window->x11.handle;\n}\n\nGLFWAPI void glfwSetX11SelectionString(const char* string)\n{\n    _GLFW_REQUIRE_INIT();\n\n    free(_glfw.x11.primarySelectionString);\n    _glfw.x11.primarySelectionString = _glfw_strdup(string);\n\n    XSetSelectionOwner(_glfw.x11.display,\n                       _glfw.x11.PRIMARY,\n                       _glfw.x11.helperWindowHandle,\n                       CurrentTime);\n\n    if (XGetSelectionOwner(_glfw.x11.display, _glfw.x11.PRIMARY) !=\n        _glfw.x11.helperWindowHandle)\n    {\n        _glfwInputError(GLFW_PLATFORM_ERROR,\n                        \"X11: Failed to become owner of primary selection\");\n    }\n}\n\nGLFWAPI const char* glfwGetX11SelectionString(void)\n{\n    _GLFW_REQUIRE_INIT_OR_RETURN(NULL);\n    return getSelectionString(_glfw.x11.PRIMARY);\n}\n\n"
  },
  {
    "path": "thirdparty/glfw/src/xkb_unicode.c",
    "content": "//========================================================================\n// GLFW 3.3 X11 - www.glfw.org\n//------------------------------------------------------------------------\n// Copyright (c) 2002-2006 Marcus Geelnard\n// Copyright (c) 2006-2017 Camilla Löwy <elmindreda@glfw.org>\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//    claim that you wrote the original software. If you use this software\n//    in a product, an acknowledgment in the product documentation would\n//    be appreciated but is not required.\n//\n// 2. Altered source versions must be plainly marked as such, and must not\n//    be misrepresented as being the original software.\n//\n// 3. This notice may not be removed or altered from any source\n//    distribution.\n//\n//========================================================================\n// It is fine to use C99 in this file because it will not be built with VS\n//========================================================================\n\n#include \"internal.h\"\n\n\n/*\n * Marcus: This code was originally written by Markus G. Kuhn.\n * I have made some slight changes (trimmed it down a bit from >60 KB to\n * 20 KB), but the functionality is the same.\n */\n\n/*\n * This module converts keysym values into the corresponding ISO 10646\n * (UCS, Unicode) values.\n *\n * The array keysymtab[] contains pairs of X11 keysym values for graphical\n * characters and the corresponding Unicode value. The function\n * _glfwKeySym2Unicode() maps a keysym onto a Unicode value using a binary\n * search, therefore keysymtab[] must remain SORTED by keysym value.\n *\n * We allow to represent any UCS character in the range U-00000000 to\n * U-00FFFFFF by a keysym value in the range 0x01000000 to 0x01ffffff.\n * This admittedly does not cover the entire 31-bit space of UCS, but\n * it does cover all of the characters up to U-10FFFF, which can be\n * represented by UTF-16, and more, and it is very unlikely that higher\n * UCS codes will ever be assigned by ISO. So to get Unicode character\n * U+ABCD you can directly use keysym 0x0100abcd.\n *\n * Original author: Markus G. Kuhn <mkuhn@acm.org>, University of\n *                  Cambridge, April 2001\n *\n * Special thanks to Richard Verhoeven <river@win.tue.nl> for preparing\n * an initial draft of the mapping table.\n *\n */\n\n\n//************************************************************************\n//****                KeySym to Unicode mapping table                 ****\n//************************************************************************\n\nstatic const struct codepair {\n  unsigned short keysym;\n  unsigned short ucs;\n} keysymtab[] = {\n  { 0x01a1, 0x0104 },\n  { 0x01a2, 0x02d8 },\n  { 0x01a3, 0x0141 },\n  { 0x01a5, 0x013d },\n  { 0x01a6, 0x015a },\n  { 0x01a9, 0x0160 },\n  { 0x01aa, 0x015e },\n  { 0x01ab, 0x0164 },\n  { 0x01ac, 0x0179 },\n  { 0x01ae, 0x017d },\n  { 0x01af, 0x017b },\n  { 0x01b1, 0x0105 },\n  { 0x01b2, 0x02db },\n  { 0x01b3, 0x0142 },\n  { 0x01b5, 0x013e },\n  { 0x01b6, 0x015b },\n  { 0x01b7, 0x02c7 },\n  { 0x01b9, 0x0161 },\n  { 0x01ba, 0x015f },\n  { 0x01bb, 0x0165 },\n  { 0x01bc, 0x017a },\n  { 0x01bd, 0x02dd },\n  { 0x01be, 0x017e },\n  { 0x01bf, 0x017c },\n  { 0x01c0, 0x0154 },\n  { 0x01c3, 0x0102 },\n  { 0x01c5, 0x0139 },\n  { 0x01c6, 0x0106 },\n  { 0x01c8, 0x010c },\n  { 0x01ca, 0x0118 },\n  { 0x01cc, 0x011a },\n  { 0x01cf, 0x010e },\n  { 0x01d0, 0x0110 },\n  { 0x01d1, 0x0143 },\n  { 0x01d2, 0x0147 },\n  { 0x01d5, 0x0150 },\n  { 0x01d8, 0x0158 },\n  { 0x01d9, 0x016e },\n  { 0x01db, 0x0170 },\n  { 0x01de, 0x0162 },\n  { 0x01e0, 0x0155 },\n  { 0x01e3, 0x0103 },\n  { 0x01e5, 0x013a },\n  { 0x01e6, 0x0107 },\n  { 0x01e8, 0x010d },\n  { 0x01ea, 0x0119 },\n  { 0x01ec, 0x011b },\n  { 0x01ef, 0x010f },\n  { 0x01f0, 0x0111 },\n  { 0x01f1, 0x0144 },\n  { 0x01f2, 0x0148 },\n  { 0x01f5, 0x0151 },\n  { 0x01f8, 0x0159 },\n  { 0x01f9, 0x016f },\n  { 0x01fb, 0x0171 },\n  { 0x01fe, 0x0163 },\n  { 0x01ff, 0x02d9 },\n  { 0x02a1, 0x0126 },\n  { 0x02a6, 0x0124 },\n  { 0x02a9, 0x0130 },\n  { 0x02ab, 0x011e },\n  { 0x02ac, 0x0134 },\n  { 0x02b1, 0x0127 },\n  { 0x02b6, 0x0125 },\n  { 0x02b9, 0x0131 },\n  { 0x02bb, 0x011f },\n  { 0x02bc, 0x0135 },\n  { 0x02c5, 0x010a },\n  { 0x02c6, 0x0108 },\n  { 0x02d5, 0x0120 },\n  { 0x02d8, 0x011c },\n  { 0x02dd, 0x016c },\n  { 0x02de, 0x015c },\n  { 0x02e5, 0x010b },\n  { 0x02e6, 0x0109 },\n  { 0x02f5, 0x0121 },\n  { 0x02f8, 0x011d },\n  { 0x02fd, 0x016d },\n  { 0x02fe, 0x015d },\n  { 0x03a2, 0x0138 },\n  { 0x03a3, 0x0156 },\n  { 0x03a5, 0x0128 },\n  { 0x03a6, 0x013b },\n  { 0x03aa, 0x0112 },\n  { 0x03ab, 0x0122 },\n  { 0x03ac, 0x0166 },\n  { 0x03b3, 0x0157 },\n  { 0x03b5, 0x0129 },\n  { 0x03b6, 0x013c },\n  { 0x03ba, 0x0113 },\n  { 0x03bb, 0x0123 },\n  { 0x03bc, 0x0167 },\n  { 0x03bd, 0x014a },\n  { 0x03bf, 0x014b },\n  { 0x03c0, 0x0100 },\n  { 0x03c7, 0x012e },\n  { 0x03cc, 0x0116 },\n  { 0x03cf, 0x012a },\n  { 0x03d1, 0x0145 },\n  { 0x03d2, 0x014c },\n  { 0x03d3, 0x0136 },\n  { 0x03d9, 0x0172 },\n  { 0x03dd, 0x0168 },\n  { 0x03de, 0x016a },\n  { 0x03e0, 0x0101 },\n  { 0x03e7, 0x012f },\n  { 0x03ec, 0x0117 },\n  { 0x03ef, 0x012b },\n  { 0x03f1, 0x0146 },\n  { 0x03f2, 0x014d },\n  { 0x03f3, 0x0137 },\n  { 0x03f9, 0x0173 },\n  { 0x03fd, 0x0169 },\n  { 0x03fe, 0x016b },\n  { 0x047e, 0x203e },\n  { 0x04a1, 0x3002 },\n  { 0x04a2, 0x300c },\n  { 0x04a3, 0x300d },\n  { 0x04a4, 0x3001 },\n  { 0x04a5, 0x30fb },\n  { 0x04a6, 0x30f2 },\n  { 0x04a7, 0x30a1 },\n  { 0x04a8, 0x30a3 },\n  { 0x04a9, 0x30a5 },\n  { 0x04aa, 0x30a7 },\n  { 0x04ab, 0x30a9 },\n  { 0x04ac, 0x30e3 },\n  { 0x04ad, 0x30e5 },\n  { 0x04ae, 0x30e7 },\n  { 0x04af, 0x30c3 },\n  { 0x04b0, 0x30fc },\n  { 0x04b1, 0x30a2 },\n  { 0x04b2, 0x30a4 },\n  { 0x04b3, 0x30a6 },\n  { 0x04b4, 0x30a8 },\n  { 0x04b5, 0x30aa },\n  { 0x04b6, 0x30ab },\n  { 0x04b7, 0x30ad },\n  { 0x04b8, 0x30af },\n  { 0x04b9, 0x30b1 },\n  { 0x04ba, 0x30b3 },\n  { 0x04bb, 0x30b5 },\n  { 0x04bc, 0x30b7 },\n  { 0x04bd, 0x30b9 },\n  { 0x04be, 0x30bb },\n  { 0x04bf, 0x30bd },\n  { 0x04c0, 0x30bf },\n  { 0x04c1, 0x30c1 },\n  { 0x04c2, 0x30c4 },\n  { 0x04c3, 0x30c6 },\n  { 0x04c4, 0x30c8 },\n  { 0x04c5, 0x30ca },\n  { 0x04c6, 0x30cb },\n  { 0x04c7, 0x30cc },\n  { 0x04c8, 0x30cd },\n  { 0x04c9, 0x30ce },\n  { 0x04ca, 0x30cf },\n  { 0x04cb, 0x30d2 },\n  { 0x04cc, 0x30d5 },\n  { 0x04cd, 0x30d8 },\n  { 0x04ce, 0x30db },\n  { 0x04cf, 0x30de },\n  { 0x04d0, 0x30df },\n  { 0x04d1, 0x30e0 },\n  { 0x04d2, 0x30e1 },\n  { 0x04d3, 0x30e2 },\n  { 0x04d4, 0x30e4 },\n  { 0x04d5, 0x30e6 },\n  { 0x04d6, 0x30e8 },\n  { 0x04d7, 0x30e9 },\n  { 0x04d8, 0x30ea },\n  { 0x04d9, 0x30eb },\n  { 0x04da, 0x30ec },\n  { 0x04db, 0x30ed },\n  { 0x04dc, 0x30ef },\n  { 0x04dd, 0x30f3 },\n  { 0x04de, 0x309b },\n  { 0x04df, 0x309c },\n  { 0x05ac, 0x060c },\n  { 0x05bb, 0x061b },\n  { 0x05bf, 0x061f },\n  { 0x05c1, 0x0621 },\n  { 0x05c2, 0x0622 },\n  { 0x05c3, 0x0623 },\n  { 0x05c4, 0x0624 },\n  { 0x05c5, 0x0625 },\n  { 0x05c6, 0x0626 },\n  { 0x05c7, 0x0627 },\n  { 0x05c8, 0x0628 },\n  { 0x05c9, 0x0629 },\n  { 0x05ca, 0x062a },\n  { 0x05cb, 0x062b },\n  { 0x05cc, 0x062c },\n  { 0x05cd, 0x062d },\n  { 0x05ce, 0x062e },\n  { 0x05cf, 0x062f },\n  { 0x05d0, 0x0630 },\n  { 0x05d1, 0x0631 },\n  { 0x05d2, 0x0632 },\n  { 0x05d3, 0x0633 },\n  { 0x05d4, 0x0634 },\n  { 0x05d5, 0x0635 },\n  { 0x05d6, 0x0636 },\n  { 0x05d7, 0x0637 },\n  { 0x05d8, 0x0638 },\n  { 0x05d9, 0x0639 },\n  { 0x05da, 0x063a },\n  { 0x05e0, 0x0640 },\n  { 0x05e1, 0x0641 },\n  { 0x05e2, 0x0642 },\n  { 0x05e3, 0x0643 },\n  { 0x05e4, 0x0644 },\n  { 0x05e5, 0x0645 },\n  { 0x05e6, 0x0646 },\n  { 0x05e7, 0x0647 },\n  { 0x05e8, 0x0648 },\n  { 0x05e9, 0x0649 },\n  { 0x05ea, 0x064a },\n  { 0x05eb, 0x064b },\n  { 0x05ec, 0x064c },\n  { 0x05ed, 0x064d },\n  { 0x05ee, 0x064e },\n  { 0x05ef, 0x064f },\n  { 0x05f0, 0x0650 },\n  { 0x05f1, 0x0651 },\n  { 0x05f2, 0x0652 },\n  { 0x06a1, 0x0452 },\n  { 0x06a2, 0x0453 },\n  { 0x06a3, 0x0451 },\n  { 0x06a4, 0x0454 },\n  { 0x06a5, 0x0455 },\n  { 0x06a6, 0x0456 },\n  { 0x06a7, 0x0457 },\n  { 0x06a8, 0x0458 },\n  { 0x06a9, 0x0459 },\n  { 0x06aa, 0x045a },\n  { 0x06ab, 0x045b },\n  { 0x06ac, 0x045c },\n  { 0x06ae, 0x045e },\n  { 0x06af, 0x045f },\n  { 0x06b0, 0x2116 },\n  { 0x06b1, 0x0402 },\n  { 0x06b2, 0x0403 },\n  { 0x06b3, 0x0401 },\n  { 0x06b4, 0x0404 },\n  { 0x06b5, 0x0405 },\n  { 0x06b6, 0x0406 },\n  { 0x06b7, 0x0407 },\n  { 0x06b8, 0x0408 },\n  { 0x06b9, 0x0409 },\n  { 0x06ba, 0x040a },\n  { 0x06bb, 0x040b },\n  { 0x06bc, 0x040c },\n  { 0x06be, 0x040e },\n  { 0x06bf, 0x040f },\n  { 0x06c0, 0x044e },\n  { 0x06c1, 0x0430 },\n  { 0x06c2, 0x0431 },\n  { 0x06c3, 0x0446 },\n  { 0x06c4, 0x0434 },\n  { 0x06c5, 0x0435 },\n  { 0x06c6, 0x0444 },\n  { 0x06c7, 0x0433 },\n  { 0x06c8, 0x0445 },\n  { 0x06c9, 0x0438 },\n  { 0x06ca, 0x0439 },\n  { 0x06cb, 0x043a },\n  { 0x06cc, 0x043b },\n  { 0x06cd, 0x043c },\n  { 0x06ce, 0x043d },\n  { 0x06cf, 0x043e },\n  { 0x06d0, 0x043f },\n  { 0x06d1, 0x044f },\n  { 0x06d2, 0x0440 },\n  { 0x06d3, 0x0441 },\n  { 0x06d4, 0x0442 },\n  { 0x06d5, 0x0443 },\n  { 0x06d6, 0x0436 },\n  { 0x06d7, 0x0432 },\n  { 0x06d8, 0x044c },\n  { 0x06d9, 0x044b },\n  { 0x06da, 0x0437 },\n  { 0x06db, 0x0448 },\n  { 0x06dc, 0x044d },\n  { 0x06dd, 0x0449 },\n  { 0x06de, 0x0447 },\n  { 0x06df, 0x044a },\n  { 0x06e0, 0x042e },\n  { 0x06e1, 0x0410 },\n  { 0x06e2, 0x0411 },\n  { 0x06e3, 0x0426 },\n  { 0x06e4, 0x0414 },\n  { 0x06e5, 0x0415 },\n  { 0x06e6, 0x0424 },\n  { 0x06e7, 0x0413 },\n  { 0x06e8, 0x0425 },\n  { 0x06e9, 0x0418 },\n  { 0x06ea, 0x0419 },\n  { 0x06eb, 0x041a },\n  { 0x06ec, 0x041b },\n  { 0x06ed, 0x041c },\n  { 0x06ee, 0x041d },\n  { 0x06ef, 0x041e },\n  { 0x06f0, 0x041f },\n  { 0x06f1, 0x042f },\n  { 0x06f2, 0x0420 },\n  { 0x06f3, 0x0421 },\n  { 0x06f4, 0x0422 },\n  { 0x06f5, 0x0423 },\n  { 0x06f6, 0x0416 },\n  { 0x06f7, 0x0412 },\n  { 0x06f8, 0x042c },\n  { 0x06f9, 0x042b },\n  { 0x06fa, 0x0417 },\n  { 0x06fb, 0x0428 },\n  { 0x06fc, 0x042d },\n  { 0x06fd, 0x0429 },\n  { 0x06fe, 0x0427 },\n  { 0x06ff, 0x042a },\n  { 0x07a1, 0x0386 },\n  { 0x07a2, 0x0388 },\n  { 0x07a3, 0x0389 },\n  { 0x07a4, 0x038a },\n  { 0x07a5, 0x03aa },\n  { 0x07a7, 0x038c },\n  { 0x07a8, 0x038e },\n  { 0x07a9, 0x03ab },\n  { 0x07ab, 0x038f },\n  { 0x07ae, 0x0385 },\n  { 0x07af, 0x2015 },\n  { 0x07b1, 0x03ac },\n  { 0x07b2, 0x03ad },\n  { 0x07b3, 0x03ae },\n  { 0x07b4, 0x03af },\n  { 0x07b5, 0x03ca },\n  { 0x07b6, 0x0390 },\n  { 0x07b7, 0x03cc },\n  { 0x07b8, 0x03cd },\n  { 0x07b9, 0x03cb },\n  { 0x07ba, 0x03b0 },\n  { 0x07bb, 0x03ce },\n  { 0x07c1, 0x0391 },\n  { 0x07c2, 0x0392 },\n  { 0x07c3, 0x0393 },\n  { 0x07c4, 0x0394 },\n  { 0x07c5, 0x0395 },\n  { 0x07c6, 0x0396 },\n  { 0x07c7, 0x0397 },\n  { 0x07c8, 0x0398 },\n  { 0x07c9, 0x0399 },\n  { 0x07ca, 0x039a },\n  { 0x07cb, 0x039b },\n  { 0x07cc, 0x039c },\n  { 0x07cd, 0x039d },\n  { 0x07ce, 0x039e },\n  { 0x07cf, 0x039f },\n  { 0x07d0, 0x03a0 },\n  { 0x07d1, 0x03a1 },\n  { 0x07d2, 0x03a3 },\n  { 0x07d4, 0x03a4 },\n  { 0x07d5, 0x03a5 },\n  { 0x07d6, 0x03a6 },\n  { 0x07d7, 0x03a7 },\n  { 0x07d8, 0x03a8 },\n  { 0x07d9, 0x03a9 },\n  { 0x07e1, 0x03b1 },\n  { 0x07e2, 0x03b2 },\n  { 0x07e3, 0x03b3 },\n  { 0x07e4, 0x03b4 },\n  { 0x07e5, 0x03b5 },\n  { 0x07e6, 0x03b6 },\n  { 0x07e7, 0x03b7 },\n  { 0x07e8, 0x03b8 },\n  { 0x07e9, 0x03b9 },\n  { 0x07ea, 0x03ba },\n  { 0x07eb, 0x03bb },\n  { 0x07ec, 0x03bc },\n  { 0x07ed, 0x03bd },\n  { 0x07ee, 0x03be },\n  { 0x07ef, 0x03bf },\n  { 0x07f0, 0x03c0 },\n  { 0x07f1, 0x03c1 },\n  { 0x07f2, 0x03c3 },\n  { 0x07f3, 0x03c2 },\n  { 0x07f4, 0x03c4 },\n  { 0x07f5, 0x03c5 },\n  { 0x07f6, 0x03c6 },\n  { 0x07f7, 0x03c7 },\n  { 0x07f8, 0x03c8 },\n  { 0x07f9, 0x03c9 },\n  { 0x08a1, 0x23b7 },\n  { 0x08a2, 0x250c },\n  { 0x08a3, 0x2500 },\n  { 0x08a4, 0x2320 },\n  { 0x08a5, 0x2321 },\n  { 0x08a6, 0x2502 },\n  { 0x08a7, 0x23a1 },\n  { 0x08a8, 0x23a3 },\n  { 0x08a9, 0x23a4 },\n  { 0x08aa, 0x23a6 },\n  { 0x08ab, 0x239b },\n  { 0x08ac, 0x239d },\n  { 0x08ad, 0x239e },\n  { 0x08ae, 0x23a0 },\n  { 0x08af, 0x23a8 },\n  { 0x08b0, 0x23ac },\n  { 0x08bc, 0x2264 },\n  { 0x08bd, 0x2260 },\n  { 0x08be, 0x2265 },\n  { 0x08bf, 0x222b },\n  { 0x08c0, 0x2234 },\n  { 0x08c1, 0x221d },\n  { 0x08c2, 0x221e },\n  { 0x08c5, 0x2207 },\n  { 0x08c8, 0x223c },\n  { 0x08c9, 0x2243 },\n  { 0x08cd, 0x21d4 },\n  { 0x08ce, 0x21d2 },\n  { 0x08cf, 0x2261 },\n  { 0x08d6, 0x221a },\n  { 0x08da, 0x2282 },\n  { 0x08db, 0x2283 },\n  { 0x08dc, 0x2229 },\n  { 0x08dd, 0x222a },\n  { 0x08de, 0x2227 },\n  { 0x08df, 0x2228 },\n  { 0x08ef, 0x2202 },\n  { 0x08f6, 0x0192 },\n  { 0x08fb, 0x2190 },\n  { 0x08fc, 0x2191 },\n  { 0x08fd, 0x2192 },\n  { 0x08fe, 0x2193 },\n  { 0x09e0, 0x25c6 },\n  { 0x09e1, 0x2592 },\n  { 0x09e2, 0x2409 },\n  { 0x09e3, 0x240c },\n  { 0x09e4, 0x240d },\n  { 0x09e5, 0x240a },\n  { 0x09e8, 0x2424 },\n  { 0x09e9, 0x240b },\n  { 0x09ea, 0x2518 },\n  { 0x09eb, 0x2510 },\n  { 0x09ec, 0x250c },\n  { 0x09ed, 0x2514 },\n  { 0x09ee, 0x253c },\n  { 0x09ef, 0x23ba },\n  { 0x09f0, 0x23bb },\n  { 0x09f1, 0x2500 },\n  { 0x09f2, 0x23bc },\n  { 0x09f3, 0x23bd },\n  { 0x09f4, 0x251c },\n  { 0x09f5, 0x2524 },\n  { 0x09f6, 0x2534 },\n  { 0x09f7, 0x252c },\n  { 0x09f8, 0x2502 },\n  { 0x0aa1, 0x2003 },\n  { 0x0aa2, 0x2002 },\n  { 0x0aa3, 0x2004 },\n  { 0x0aa4, 0x2005 },\n  { 0x0aa5, 0x2007 },\n  { 0x0aa6, 0x2008 },\n  { 0x0aa7, 0x2009 },\n  { 0x0aa8, 0x200a },\n  { 0x0aa9, 0x2014 },\n  { 0x0aaa, 0x2013 },\n  { 0x0aae, 0x2026 },\n  { 0x0aaf, 0x2025 },\n  { 0x0ab0, 0x2153 },\n  { 0x0ab1, 0x2154 },\n  { 0x0ab2, 0x2155 },\n  { 0x0ab3, 0x2156 },\n  { 0x0ab4, 0x2157 },\n  { 0x0ab5, 0x2158 },\n  { 0x0ab6, 0x2159 },\n  { 0x0ab7, 0x215a },\n  { 0x0ab8, 0x2105 },\n  { 0x0abb, 0x2012 },\n  { 0x0abc, 0x2329 },\n  { 0x0abe, 0x232a },\n  { 0x0ac3, 0x215b },\n  { 0x0ac4, 0x215c },\n  { 0x0ac5, 0x215d },\n  { 0x0ac6, 0x215e },\n  { 0x0ac9, 0x2122 },\n  { 0x0aca, 0x2613 },\n  { 0x0acc, 0x25c1 },\n  { 0x0acd, 0x25b7 },\n  { 0x0ace, 0x25cb },\n  { 0x0acf, 0x25af },\n  { 0x0ad0, 0x2018 },\n  { 0x0ad1, 0x2019 },\n  { 0x0ad2, 0x201c },\n  { 0x0ad3, 0x201d },\n  { 0x0ad4, 0x211e },\n  { 0x0ad6, 0x2032 },\n  { 0x0ad7, 0x2033 },\n  { 0x0ad9, 0x271d },\n  { 0x0adb, 0x25ac },\n  { 0x0adc, 0x25c0 },\n  { 0x0add, 0x25b6 },\n  { 0x0ade, 0x25cf },\n  { 0x0adf, 0x25ae },\n  { 0x0ae0, 0x25e6 },\n  { 0x0ae1, 0x25ab },\n  { 0x0ae2, 0x25ad },\n  { 0x0ae3, 0x25b3 },\n  { 0x0ae4, 0x25bd },\n  { 0x0ae5, 0x2606 },\n  { 0x0ae6, 0x2022 },\n  { 0x0ae7, 0x25aa },\n  { 0x0ae8, 0x25b2 },\n  { 0x0ae9, 0x25bc },\n  { 0x0aea, 0x261c },\n  { 0x0aeb, 0x261e },\n  { 0x0aec, 0x2663 },\n  { 0x0aed, 0x2666 },\n  { 0x0aee, 0x2665 },\n  { 0x0af0, 0x2720 },\n  { 0x0af1, 0x2020 },\n  { 0x0af2, 0x2021 },\n  { 0x0af3, 0x2713 },\n  { 0x0af4, 0x2717 },\n  { 0x0af5, 0x266f },\n  { 0x0af6, 0x266d },\n  { 0x0af7, 0x2642 },\n  { 0x0af8, 0x2640 },\n  { 0x0af9, 0x260e },\n  { 0x0afa, 0x2315 },\n  { 0x0afb, 0x2117 },\n  { 0x0afc, 0x2038 },\n  { 0x0afd, 0x201a },\n  { 0x0afe, 0x201e },\n  { 0x0ba3, 0x003c },\n  { 0x0ba6, 0x003e },\n  { 0x0ba8, 0x2228 },\n  { 0x0ba9, 0x2227 },\n  { 0x0bc0, 0x00af },\n  { 0x0bc2, 0x22a5 },\n  { 0x0bc3, 0x2229 },\n  { 0x0bc4, 0x230a },\n  { 0x0bc6, 0x005f },\n  { 0x0bca, 0x2218 },\n  { 0x0bcc, 0x2395 },\n  { 0x0bce, 0x22a4 },\n  { 0x0bcf, 0x25cb },\n  { 0x0bd3, 0x2308 },\n  { 0x0bd6, 0x222a },\n  { 0x0bd8, 0x2283 },\n  { 0x0bda, 0x2282 },\n  { 0x0bdc, 0x22a2 },\n  { 0x0bfc, 0x22a3 },\n  { 0x0cdf, 0x2017 },\n  { 0x0ce0, 0x05d0 },\n  { 0x0ce1, 0x05d1 },\n  { 0x0ce2, 0x05d2 },\n  { 0x0ce3, 0x05d3 },\n  { 0x0ce4, 0x05d4 },\n  { 0x0ce5, 0x05d5 },\n  { 0x0ce6, 0x05d6 },\n  { 0x0ce7, 0x05d7 },\n  { 0x0ce8, 0x05d8 },\n  { 0x0ce9, 0x05d9 },\n  { 0x0cea, 0x05da },\n  { 0x0ceb, 0x05db },\n  { 0x0cec, 0x05dc },\n  { 0x0ced, 0x05dd },\n  { 0x0cee, 0x05de },\n  { 0x0cef, 0x05df },\n  { 0x0cf0, 0x05e0 },\n  { 0x0cf1, 0x05e1 },\n  { 0x0cf2, 0x05e2 },\n  { 0x0cf3, 0x05e3 },\n  { 0x0cf4, 0x05e4 },\n  { 0x0cf5, 0x05e5 },\n  { 0x0cf6, 0x05e6 },\n  { 0x0cf7, 0x05e7 },\n  { 0x0cf8, 0x05e8 },\n  { 0x0cf9, 0x05e9 },\n  { 0x0cfa, 0x05ea },\n  { 0x0da1, 0x0e01 },\n  { 0x0da2, 0x0e02 },\n  { 0x0da3, 0x0e03 },\n  { 0x0da4, 0x0e04 },\n  { 0x0da5, 0x0e05 },\n  { 0x0da6, 0x0e06 },\n  { 0x0da7, 0x0e07 },\n  { 0x0da8, 0x0e08 },\n  { 0x0da9, 0x0e09 },\n  { 0x0daa, 0x0e0a },\n  { 0x0dab, 0x0e0b },\n  { 0x0dac, 0x0e0c },\n  { 0x0dad, 0x0e0d },\n  { 0x0dae, 0x0e0e },\n  { 0x0daf, 0x0e0f },\n  { 0x0db0, 0x0e10 },\n  { 0x0db1, 0x0e11 },\n  { 0x0db2, 0x0e12 },\n  { 0x0db3, 0x0e13 },\n  { 0x0db4, 0x0e14 },\n  { 0x0db5, 0x0e15 },\n  { 0x0db6, 0x0e16 },\n  { 0x0db7, 0x0e17 },\n  { 0x0db8, 0x0e18 },\n  { 0x0db9, 0x0e19 },\n  { 0x0dba, 0x0e1a },\n  { 0x0dbb, 0x0e1b },\n  { 0x0dbc, 0x0e1c },\n  { 0x0dbd, 0x0e1d },\n  { 0x0dbe, 0x0e1e },\n  { 0x0dbf, 0x0e1f },\n  { 0x0dc0, 0x0e20 },\n  { 0x0dc1, 0x0e21 },\n  { 0x0dc2, 0x0e22 },\n  { 0x0dc3, 0x0e23 },\n  { 0x0dc4, 0x0e24 },\n  { 0x0dc5, 0x0e25 },\n  { 0x0dc6, 0x0e26 },\n  { 0x0dc7, 0x0e27 },\n  { 0x0dc8, 0x0e28 },\n  { 0x0dc9, 0x0e29 },\n  { 0x0dca, 0x0e2a },\n  { 0x0dcb, 0x0e2b },\n  { 0x0dcc, 0x0e2c },\n  { 0x0dcd, 0x0e2d },\n  { 0x0dce, 0x0e2e },\n  { 0x0dcf, 0x0e2f },\n  { 0x0dd0, 0x0e30 },\n  { 0x0dd1, 0x0e31 },\n  { 0x0dd2, 0x0e32 },\n  { 0x0dd3, 0x0e33 },\n  { 0x0dd4, 0x0e34 },\n  { 0x0dd5, 0x0e35 },\n  { 0x0dd6, 0x0e36 },\n  { 0x0dd7, 0x0e37 },\n  { 0x0dd8, 0x0e38 },\n  { 0x0dd9, 0x0e39 },\n  { 0x0dda, 0x0e3a },\n  { 0x0ddf, 0x0e3f },\n  { 0x0de0, 0x0e40 },\n  { 0x0de1, 0x0e41 },\n  { 0x0de2, 0x0e42 },\n  { 0x0de3, 0x0e43 },\n  { 0x0de4, 0x0e44 },\n  { 0x0de5, 0x0e45 },\n  { 0x0de6, 0x0e46 },\n  { 0x0de7, 0x0e47 },\n  { 0x0de8, 0x0e48 },\n  { 0x0de9, 0x0e49 },\n  { 0x0dea, 0x0e4a },\n  { 0x0deb, 0x0e4b },\n  { 0x0dec, 0x0e4c },\n  { 0x0ded, 0x0e4d },\n  { 0x0df0, 0x0e50 },\n  { 0x0df1, 0x0e51 },\n  { 0x0df2, 0x0e52 },\n  { 0x0df3, 0x0e53 },\n  { 0x0df4, 0x0e54 },\n  { 0x0df5, 0x0e55 },\n  { 0x0df6, 0x0e56 },\n  { 0x0df7, 0x0e57 },\n  { 0x0df8, 0x0e58 },\n  { 0x0df9, 0x0e59 },\n  { 0x0ea1, 0x3131 },\n  { 0x0ea2, 0x3132 },\n  { 0x0ea3, 0x3133 },\n  { 0x0ea4, 0x3134 },\n  { 0x0ea5, 0x3135 },\n  { 0x0ea6, 0x3136 },\n  { 0x0ea7, 0x3137 },\n  { 0x0ea8, 0x3138 },\n  { 0x0ea9, 0x3139 },\n  { 0x0eaa, 0x313a },\n  { 0x0eab, 0x313b },\n  { 0x0eac, 0x313c },\n  { 0x0ead, 0x313d },\n  { 0x0eae, 0x313e },\n  { 0x0eaf, 0x313f },\n  { 0x0eb0, 0x3140 },\n  { 0x0eb1, 0x3141 },\n  { 0x0eb2, 0x3142 },\n  { 0x0eb3, 0x3143 },\n  { 0x0eb4, 0x3144 },\n  { 0x0eb5, 0x3145 },\n  { 0x0eb6, 0x3146 },\n  { 0x0eb7, 0x3147 },\n  { 0x0eb8, 0x3148 },\n  { 0x0eb9, 0x3149 },\n  { 0x0eba, 0x314a },\n  { 0x0ebb, 0x314b },\n  { 0x0ebc, 0x314c },\n  { 0x0ebd, 0x314d },\n  { 0x0ebe, 0x314e },\n  { 0x0ebf, 0x314f },\n  { 0x0ec0, 0x3150 },\n  { 0x0ec1, 0x3151 },\n  { 0x0ec2, 0x3152 },\n  { 0x0ec3, 0x3153 },\n  { 0x0ec4, 0x3154 },\n  { 0x0ec5, 0x3155 },\n  { 0x0ec6, 0x3156 },\n  { 0x0ec7, 0x3157 },\n  { 0x0ec8, 0x3158 },\n  { 0x0ec9, 0x3159 },\n  { 0x0eca, 0x315a },\n  { 0x0ecb, 0x315b },\n  { 0x0ecc, 0x315c },\n  { 0x0ecd, 0x315d },\n  { 0x0ece, 0x315e },\n  { 0x0ecf, 0x315f },\n  { 0x0ed0, 0x3160 },\n  { 0x0ed1, 0x3161 },\n  { 0x0ed2, 0x3162 },\n  { 0x0ed3, 0x3163 },\n  { 0x0ed4, 0x11a8 },\n  { 0x0ed5, 0x11a9 },\n  { 0x0ed6, 0x11aa },\n  { 0x0ed7, 0x11ab },\n  { 0x0ed8, 0x11ac },\n  { 0x0ed9, 0x11ad },\n  { 0x0eda, 0x11ae },\n  { 0x0edb, 0x11af },\n  { 0x0edc, 0x11b0 },\n  { 0x0edd, 0x11b1 },\n  { 0x0ede, 0x11b2 },\n  { 0x0edf, 0x11b3 },\n  { 0x0ee0, 0x11b4 },\n  { 0x0ee1, 0x11b5 },\n  { 0x0ee2, 0x11b6 },\n  { 0x0ee3, 0x11b7 },\n  { 0x0ee4, 0x11b8 },\n  { 0x0ee5, 0x11b9 },\n  { 0x0ee6, 0x11ba },\n  { 0x0ee7, 0x11bb },\n  { 0x0ee8, 0x11bc },\n  { 0x0ee9, 0x11bd },\n  { 0x0eea, 0x11be },\n  { 0x0eeb, 0x11bf },\n  { 0x0eec, 0x11c0 },\n  { 0x0eed, 0x11c1 },\n  { 0x0eee, 0x11c2 },\n  { 0x0eef, 0x316d },\n  { 0x0ef0, 0x3171 },\n  { 0x0ef1, 0x3178 },\n  { 0x0ef2, 0x317f },\n  { 0x0ef3, 0x3181 },\n  { 0x0ef4, 0x3184 },\n  { 0x0ef5, 0x3186 },\n  { 0x0ef6, 0x318d },\n  { 0x0ef7, 0x318e },\n  { 0x0ef8, 0x11eb },\n  { 0x0ef9, 0x11f0 },\n  { 0x0efa, 0x11f9 },\n  { 0x0eff, 0x20a9 },\n  { 0x13a4, 0x20ac },\n  { 0x13bc, 0x0152 },\n  { 0x13bd, 0x0153 },\n  { 0x13be, 0x0178 },\n  { 0x20ac, 0x20ac },\n  { 0xfe50,    '`' },\n  { 0xfe51, 0x00b4 },\n  { 0xfe52,    '^' },\n  { 0xfe53,    '~' },\n  { 0xfe54, 0x00af },\n  { 0xfe55, 0x02d8 },\n  { 0xfe56, 0x02d9 },\n  { 0xfe57, 0x00a8 },\n  { 0xfe58, 0x02da },\n  { 0xfe59, 0x02dd },\n  { 0xfe5a, 0x02c7 },\n  { 0xfe5b, 0x00b8 },\n  { 0xfe5c, 0x02db },\n  { 0xfe5d, 0x037a },\n  { 0xfe5e, 0x309b },\n  { 0xfe5f, 0x309c },\n  { 0xfe63,    '/' },\n  { 0xfe64, 0x02bc },\n  { 0xfe65, 0x02bd },\n  { 0xfe66, 0x02f5 },\n  { 0xfe67, 0x02f3 },\n  { 0xfe68, 0x02cd },\n  { 0xfe69, 0xa788 },\n  { 0xfe6a, 0x02f7 },\n  { 0xfe6e,    ',' },\n  { 0xfe6f, 0x00a4 },\n  { 0xfe80,    'a' }, // XK_dead_a\n  { 0xfe81,    'A' }, // XK_dead_A\n  { 0xfe82,    'e' }, // XK_dead_e\n  { 0xfe83,    'E' }, // XK_dead_E\n  { 0xfe84,    'i' }, // XK_dead_i\n  { 0xfe85,    'I' }, // XK_dead_I\n  { 0xfe86,    'o' }, // XK_dead_o\n  { 0xfe87,    'O' }, // XK_dead_O\n  { 0xfe88,    'u' }, // XK_dead_u\n  { 0xfe89,    'U' }, // XK_dead_U\n  { 0xfe8a, 0x0259 },\n  { 0xfe8b, 0x018f },\n  { 0xfe8c, 0x00b5 },\n  { 0xfe90,    '_' },\n  { 0xfe91, 0x02c8 },\n  { 0xfe92, 0x02cc },\n  { 0xff80 /*XKB_KEY_KP_Space*/,     ' ' },\n  { 0xff95 /*XKB_KEY_KP_7*/, 0x0037 },\n  { 0xff96 /*XKB_KEY_KP_4*/, 0x0034 },\n  { 0xff97 /*XKB_KEY_KP_8*/, 0x0038 },\n  { 0xff98 /*XKB_KEY_KP_6*/, 0x0036 },\n  { 0xff99 /*XKB_KEY_KP_2*/, 0x0032 },\n  { 0xff9a /*XKB_KEY_KP_9*/, 0x0039 },\n  { 0xff9b /*XKB_KEY_KP_3*/, 0x0033 },\n  { 0xff9c /*XKB_KEY_KP_1*/, 0x0031 },\n  { 0xff9d /*XKB_KEY_KP_5*/, 0x0035 },\n  { 0xff9e /*XKB_KEY_KP_0*/, 0x0030 },\n  { 0xffaa /*XKB_KEY_KP_Multiply*/,  '*' },\n  { 0xffab /*XKB_KEY_KP_Add*/,       '+' },\n  { 0xffac /*XKB_KEY_KP_Separator*/, ',' },\n  { 0xffad /*XKB_KEY_KP_Subtract*/,  '-' },\n  { 0xffae /*XKB_KEY_KP_Decimal*/,   '.' },\n  { 0xffaf /*XKB_KEY_KP_Divide*/,    '/' },\n  { 0xffb0 /*XKB_KEY_KP_0*/, 0x0030 },\n  { 0xffb1 /*XKB_KEY_KP_1*/, 0x0031 },\n  { 0xffb2 /*XKB_KEY_KP_2*/, 0x0032 },\n  { 0xffb3 /*XKB_KEY_KP_3*/, 0x0033 },\n  { 0xffb4 /*XKB_KEY_KP_4*/, 0x0034 },\n  { 0xffb5 /*XKB_KEY_KP_5*/, 0x0035 },\n  { 0xffb6 /*XKB_KEY_KP_6*/, 0x0036 },\n  { 0xffb7 /*XKB_KEY_KP_7*/, 0x0037 },\n  { 0xffb8 /*XKB_KEY_KP_8*/, 0x0038 },\n  { 0xffb9 /*XKB_KEY_KP_9*/, 0x0039 },\n  { 0xffbd /*XKB_KEY_KP_Equal*/,     '=' }\n};\n\n\n//////////////////////////////////////////////////////////////////////////\n//////                       GLFW internal API                      //////\n//////////////////////////////////////////////////////////////////////////\n\n// Convert XKB KeySym to Unicode\n//\nlong _glfwKeySym2Unicode(unsigned int keysym)\n{\n    int min = 0;\n    int max = sizeof(keysymtab) / sizeof(struct codepair) - 1;\n    int mid;\n\n    // First check for Latin-1 characters (1:1 mapping)\n    if ((keysym >= 0x0020 && keysym <= 0x007e) ||\n        (keysym >= 0x00a0 && keysym <= 0x00ff))\n    {\n        return keysym;\n    }\n\n    // Also check for directly encoded 24-bit UCS characters\n    if ((keysym & 0xff000000) == 0x01000000)\n        return keysym & 0x00ffffff;\n\n    // Binary search in table\n    while (max >= min)\n    {\n        mid = (min + max) / 2;\n        if (keysymtab[mid].keysym < keysym)\n            min = mid + 1;\n        else if (keysymtab[mid].keysym > keysym)\n            max = mid - 1;\n        else\n            return keysymtab[mid].ucs;\n    }\n\n    // No matching Unicode value found\n    return -1;\n}\n\n"
  },
  {
    "path": "thirdparty/glfw/src/xkb_unicode.h",
    "content": "//========================================================================\n// GLFW 3.3 Linux - www.glfw.org\n//------------------------------------------------------------------------\n// Copyright (c) 2014 Jonas Ådahl <jadahl@gmail.com>\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//    claim that you wrote the original software. If you use this software\n//    in a product, an acknowledgment in the product documentation would\n//    be appreciated but is not required.\n//\n// 2. Altered source versions must be plainly marked as such, and must not\n//    be misrepresented as being the original software.\n//\n// 3. This notice may not be removed or altered from any source\n//    distribution.\n//\n//========================================================================\n\nlong _glfwKeySym2Unicode(unsigned int keysym);\n\n"
  },
  {
    "path": "thirdparty/glfw/tests/CMakeLists.txt",
    "content": "\nlink_libraries(glfw)\n\ninclude_directories(\"${GLFW_SOURCE_DIR}/deps\")\n\nif (MATH_LIBRARY)\n    link_libraries(\"${MATH_LIBRARY}\")\nendif()\n\nif (MSVC)\n    add_definitions(-D_CRT_SECURE_NO_WARNINGS)\nendif()\n\nset(GLAD_GL \"${GLFW_SOURCE_DIR}/deps/glad/gl.h\"\n            \"${GLFW_SOURCE_DIR}/deps/glad_gl.c\")\nset(GLAD_VULKAN \"${GLFW_SOURCE_DIR}/deps/glad/vulkan.h\"\n                \"${GLFW_SOURCE_DIR}/deps/glad_vulkan.c\")\nset(GETOPT \"${GLFW_SOURCE_DIR}/deps/getopt.h\"\n           \"${GLFW_SOURCE_DIR}/deps/getopt.c\")\nset(TINYCTHREAD \"${GLFW_SOURCE_DIR}/deps/tinycthread.h\"\n                \"${GLFW_SOURCE_DIR}/deps/tinycthread.c\")\n\nif (${CMAKE_VERSION} VERSION_EQUAL \"3.1.0\" OR\n    ${CMAKE_VERSION} VERSION_GREATER \"3.1.0\")\n    set(CMAKE_C_STANDARD 99)\nelse()\n    # Remove this fallback when removing support for CMake version less than 3.1\n    add_compile_options(\"$<$<C_COMPILER_ID:AppleClang>:-std=c99>\"\n                        \"$<$<C_COMPILER_ID:Clang>:-std=c99>\"\n                        \"$<$<C_COMPILER_ID:GNU>:-std=c99>\")\n\nendif()\n\nadd_executable(clipboard clipboard.c ${GETOPT} ${GLAD_GL})\nadd_executable(events events.c ${GETOPT} ${GLAD_GL})\nadd_executable(msaa msaa.c ${GETOPT} ${GLAD_GL})\nadd_executable(glfwinfo glfwinfo.c ${GETOPT} ${GLAD_GL} ${GLAD_VULKAN})\nadd_executable(iconify iconify.c ${GETOPT} ${GLAD_GL})\nadd_executable(monitors monitors.c ${GETOPT} ${GLAD_GL})\nadd_executable(reopen reopen.c ${GLAD_GL})\nadd_executable(cursor cursor.c ${GLAD_GL})\n\nadd_executable(empty WIN32 MACOSX_BUNDLE empty.c ${TINYCTHREAD} ${GLAD_GL})\nadd_executable(gamma WIN32 MACOSX_BUNDLE gamma.c ${GLAD_GL})\nadd_executable(icon WIN32 MACOSX_BUNDLE icon.c ${GLAD_GL})\nadd_executable(inputlag WIN32 MACOSX_BUNDLE inputlag.c ${GETOPT} ${GLAD_GL})\nadd_executable(joysticks WIN32 MACOSX_BUNDLE joysticks.c ${GLAD_GL})\nadd_executable(opacity WIN32 MACOSX_BUNDLE opacity.c ${GLAD_GL})\nadd_executable(tearing WIN32 MACOSX_BUNDLE tearing.c ${GLAD_GL})\nadd_executable(threads WIN32 MACOSX_BUNDLE threads.c ${TINYCTHREAD} ${GLAD_GL})\nadd_executable(timeout WIN32 MACOSX_BUNDLE timeout.c ${GLAD_GL})\nadd_executable(title WIN32 MACOSX_BUNDLE title.c ${GLAD_GL})\nadd_executable(triangle-vulkan WIN32 triangle-vulkan.c ${GLAD_VULKAN})\nadd_executable(windows WIN32 MACOSX_BUNDLE windows.c ${GETOPT} ${GLAD_GL})\n\ntarget_link_libraries(empty \"${CMAKE_THREAD_LIBS_INIT}\")\ntarget_link_libraries(threads \"${CMAKE_THREAD_LIBS_INIT}\")\nif (RT_LIBRARY)\n    target_link_libraries(empty \"${RT_LIBRARY}\")\n    target_link_libraries(threads \"${RT_LIBRARY}\")\nendif()\n\nset(GUI_ONLY_BINARIES empty gamma icon inputlag joysticks opacity tearing\n    threads timeout title triangle-vulkan windows)\nset(CONSOLE_BINARIES clipboard events msaa glfwinfo iconify monitors reopen\n                     cursor)\n\nset_target_properties(${GUI_ONLY_BINARIES} ${CONSOLE_BINARIES} PROPERTIES\n                      FOLDER \"GLFW3/Tests\")\n\nif (MSVC)\n    # Tell MSVC to use main instead of WinMain for Windows subsystem executables\n    set_target_properties(${GUI_ONLY_BINARIES} PROPERTIES\n                          LINK_FLAGS \"/ENTRY:mainCRTStartup\")\nendif()\n\nif (APPLE)\n    set_target_properties(empty PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME \"Empty Event\")\n    set_target_properties(gamma PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME \"Gamma\")\n    set_target_properties(inputlag PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME \"Input Lag\")\n    set_target_properties(joysticks PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME \"Joysticks\")\n    set_target_properties(opacity PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME \"Opacity\")\n    set_target_properties(tearing PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME \"Tearing\")\n    set_target_properties(threads PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME \"Threads\")\n    set_target_properties(timeout PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME \"Timeout\")\n    set_target_properties(title PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME \"Title\")\n    set_target_properties(windows PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME \"Windows\")\n\n    set_target_properties(${GUI_ONLY_BINARIES} PROPERTIES\n                          MACOSX_BUNDLE_SHORT_VERSION_STRING ${GLFW_VERSION}\n                          MACOSX_BUNDLE_LONG_VERSION_STRING ${GLFW_VERSION}\n                          MACOSX_BUNDLE_INFO_PLIST \"${GLFW_SOURCE_DIR}/CMake/MacOSXBundleInfo.plist.in\")\nendif()\n\n"
  },
  {
    "path": "thirdparty/glfw/tests/clipboard.c",
    "content": "//========================================================================\n// Clipboard test program\n// Copyright (c) Camilla Löwy <elmindreda@glfw.org>\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//    claim that you wrote the original software. If you use this software\n//    in a product, an acknowledgment in the product documentation would\n//    be appreciated but is not required.\n//\n// 2. Altered source versions must be plainly marked as such, and must not\n//    be misrepresented as being the original software.\n//\n// 3. This notice may not be removed or altered from any source\n//    distribution.\n//\n//========================================================================\n//\n// This program is used to test the clipboard functionality.\n//\n//========================================================================\n\n#include <glad/gl.h>\n#define GLFW_INCLUDE_NONE\n#include <GLFW/glfw3.h>\n\n#include <stdio.h>\n#include <stdlib.h>\n\n#include \"getopt.h\"\n\n#if defined(__APPLE__)\n #define MODIFIER GLFW_MOD_SUPER\n#else\n #define MODIFIER GLFW_MOD_CONTROL\n#endif\n\nstatic void usage(void)\n{\n    printf(\"Usage: clipboard [-h]\\n\");\n}\n\nstatic void error_callback(int error, const char* description)\n{\n    fprintf(stderr, \"Error: %s\\n\", description);\n}\n\nstatic void key_callback(GLFWwindow* window, int key, int scancode, int action, int mods)\n{\n    if (action != GLFW_PRESS)\n        return;\n\n    switch (key)\n    {\n        case GLFW_KEY_ESCAPE:\n            glfwSetWindowShouldClose(window, GLFW_TRUE);\n            break;\n\n        case GLFW_KEY_V:\n            if (mods == MODIFIER)\n            {\n                const char* string;\n\n                string = glfwGetClipboardString(NULL);\n                if (string)\n                    printf(\"Clipboard contains \\\"%s\\\"\\n\", string);\n                else\n                    printf(\"Clipboard does not contain a string\\n\");\n            }\n            break;\n\n        case GLFW_KEY_C:\n            if (mods == MODIFIER)\n            {\n                const char* string = \"Hello GLFW World!\";\n                glfwSetClipboardString(NULL, string);\n                printf(\"Setting clipboard to \\\"%s\\\"\\n\", string);\n            }\n            break;\n    }\n}\n\nint main(int argc, char** argv)\n{\n    int ch;\n    GLFWwindow* window;\n\n    while ((ch = getopt(argc, argv, \"h\")) != -1)\n    {\n        switch (ch)\n        {\n            case 'h':\n                usage();\n                exit(EXIT_SUCCESS);\n\n            default:\n                usage();\n                exit(EXIT_FAILURE);\n        }\n    }\n\n    glfwSetErrorCallback(error_callback);\n\n    if (!glfwInit())\n    {\n        fprintf(stderr, \"Failed to initialize GLFW\\n\");\n        exit(EXIT_FAILURE);\n    }\n\n    window = glfwCreateWindow(200, 200, \"Clipboard Test\", NULL, NULL);\n    if (!window)\n    {\n        glfwTerminate();\n\n        fprintf(stderr, \"Failed to open GLFW window\\n\");\n        exit(EXIT_FAILURE);\n    }\n\n    glfwMakeContextCurrent(window);\n    gladLoadGL(glfwGetProcAddress);\n    glfwSwapInterval(1);\n\n    glfwSetKeyCallback(window, key_callback);\n\n    glClearColor(0.5f, 0.5f, 0.5f, 0);\n\n    while (!glfwWindowShouldClose(window))\n    {\n        glClear(GL_COLOR_BUFFER_BIT);\n\n        glfwSwapBuffers(window);\n        glfwWaitEvents();\n    }\n\n    glfwTerminate();\n    exit(EXIT_SUCCESS);\n}\n\n"
  },
  {
    "path": "thirdparty/glfw/tests/cursor.c",
    "content": "//========================================================================\n// Cursor & input mode tests\n// Copyright (c) Camilla Löwy <elmindreda@glfw.org>\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//    claim that you wrote the original software. If you use this software\n//    in a product, an acknowledgment in the product documentation would\n//    be appreciated but is not required.\n//\n// 2. Altered source versions must be plainly marked as such, and must not\n//    be misrepresented as being the original software.\n//\n// 3. This notice may not be removed or altered from any source\n//    distribution.\n//\n//========================================================================\n//\n// This test provides an interface to the cursor image and cursor mode\n// parts of the API.\n//\n// Custom cursor image generation by urraka.\n//\n//========================================================================\n\n#include <glad/gl.h>\n#define GLFW_INCLUDE_NONE\n#include <GLFW/glfw3.h>\n\n#if defined(_MSC_VER)\n // Make MS math.h define M_PI\n #define _USE_MATH_DEFINES\n#endif\n\n#include <math.h>\n#include <stdio.h>\n#include <stdlib.h>\n\n#include \"linmath.h\"\n\n#define CURSOR_FRAME_COUNT 60\n\nstatic const char* vertex_shader_text =\n\"#version 110\\n\"\n\"uniform mat4 MVP;\\n\"\n\"attribute vec2 vPos;\\n\"\n\"void main()\\n\"\n\"{\\n\"\n\"    gl_Position = MVP * vec4(vPos, 0.0, 1.0);\\n\"\n\"}\\n\";\n\nstatic const char* fragment_shader_text =\n\"#version 110\\n\"\n\"void main()\\n\"\n\"{\\n\"\n\"    gl_FragColor = vec4(1.0);\\n\"\n\"}\\n\";\n\nstatic double cursor_x;\nstatic double cursor_y;\nstatic int swap_interval = 1;\nstatic int wait_events = GLFW_TRUE;\nstatic int animate_cursor = GLFW_FALSE;\nstatic int track_cursor = GLFW_FALSE;\nstatic GLFWcursor* standard_cursors[6];\nstatic GLFWcursor* tracking_cursor = NULL;\n\nstatic void error_callback(int error, const char* description)\n{\n    fprintf(stderr, \"Error: %s\\n\", description);\n}\n\nstatic float star(int x, int y, float t)\n{\n    const float c = 64 / 2.f;\n\n    const float i = (0.25f * (float) sin(2.f * M_PI * t) + 0.75f);\n    const float k = 64 * 0.046875f * i;\n\n    const float dist = (float) sqrt((x - c) * (x - c) + (y - c) * (y - c));\n\n    const float salpha = 1.f - dist / c;\n    const float xalpha = (float) x == c ? c : k / (float) fabs(x - c);\n    const float yalpha = (float) y == c ? c : k / (float) fabs(y - c);\n\n    return (float) fmax(0.f, fmin(1.f, i * salpha * 0.2f + salpha * xalpha * yalpha));\n}\n\nstatic GLFWcursor* create_cursor_frame(float t)\n{\n    int i = 0, x, y;\n    unsigned char buffer[64 * 64 * 4];\n    const GLFWimage image = { 64, 64, buffer };\n\n    for (y = 0;  y < image.width;  y++)\n    {\n        for (x = 0;  x < image.height;  x++)\n        {\n            buffer[i++] = 255;\n            buffer[i++] = 255;\n            buffer[i++] = 255;\n            buffer[i++] = (unsigned char) (255 * star(x, y, t));\n        }\n    }\n\n    return glfwCreateCursor(&image, image.width / 2, image.height / 2);\n}\n\nstatic GLFWcursor* create_tracking_cursor(void)\n{\n    int i = 0, x, y;\n    unsigned char buffer[32 * 32 * 4];\n    const GLFWimage image = { 32, 32, buffer };\n\n    for (y = 0;  y < image.width;  y++)\n    {\n        for (x = 0;  x < image.height;  x++)\n        {\n            if (x == 7 || y == 7)\n            {\n                buffer[i++] = 255;\n                buffer[i++] = 0;\n                buffer[i++] = 0;\n                buffer[i++] = 255;\n            }\n            else\n            {\n                buffer[i++] = 0;\n                buffer[i++] = 0;\n                buffer[i++] = 0;\n                buffer[i++] = 0;\n            }\n        }\n    }\n\n    return glfwCreateCursor(&image, 7, 7);\n}\n\nstatic void cursor_position_callback(GLFWwindow* window, double x, double y)\n{\n    printf(\"%0.3f: Cursor position: %f %f (%+f %+f)\\n\",\n           glfwGetTime(),\n           x, y, x - cursor_x, y - cursor_y);\n\n    cursor_x = x;\n    cursor_y = y;\n}\n\nstatic void key_callback(GLFWwindow* window, int key, int scancode, int action, int mods)\n{\n    if (action != GLFW_PRESS)\n        return;\n\n    switch (key)\n    {\n        case GLFW_KEY_A:\n        {\n            animate_cursor = !animate_cursor;\n            if (!animate_cursor)\n                glfwSetCursor(window, NULL);\n\n            break;\n        }\n\n        case GLFW_KEY_ESCAPE:\n        {\n            if (glfwGetInputMode(window, GLFW_CURSOR) != GLFW_CURSOR_DISABLED)\n            {\n                glfwSetWindowShouldClose(window, GLFW_TRUE);\n                break;\n            }\n\n            /* FALLTHROUGH */\n        }\n\n        case GLFW_KEY_N:\n            glfwSetInputMode(window, GLFW_CURSOR, GLFW_CURSOR_NORMAL);\n            glfwGetCursorPos(window, &cursor_x, &cursor_y);\n            printf(\"(( cursor is normal ))\\n\");\n            break;\n\n        case GLFW_KEY_D:\n            glfwSetInputMode(window, GLFW_CURSOR, GLFW_CURSOR_DISABLED);\n            printf(\"(( cursor is disabled ))\\n\");\n            break;\n\n        case GLFW_KEY_H:\n            glfwSetInputMode(window, GLFW_CURSOR, GLFW_CURSOR_HIDDEN);\n            printf(\"(( cursor is hidden ))\\n\");\n            break;\n\n        case GLFW_KEY_R:\n            if (!glfwRawMouseMotionSupported())\n                break;\n\n            if (glfwGetInputMode(window, GLFW_RAW_MOUSE_MOTION))\n            {\n                glfwSetInputMode(window, GLFW_RAW_MOUSE_MOTION, GLFW_FALSE);\n                printf(\"(( raw input is disabled ))\\n\");\n            }\n            else\n            {\n                glfwSetInputMode(window, GLFW_RAW_MOUSE_MOTION, GLFW_TRUE);\n                printf(\"(( raw input is enabled ))\\n\");\n            }\n            break;\n\n        case GLFW_KEY_SPACE:\n            swap_interval = 1 - swap_interval;\n            printf(\"(( swap interval: %i ))\\n\", swap_interval);\n            glfwSwapInterval(swap_interval);\n            break;\n\n        case GLFW_KEY_W:\n            wait_events = !wait_events;\n            printf(\"(( %sing for events ))\\n\", wait_events ? \"wait\" : \"poll\");\n            break;\n\n        case GLFW_KEY_T:\n            track_cursor = !track_cursor;\n            if (track_cursor)\n                glfwSetCursor(window, tracking_cursor);\n            else\n                glfwSetCursor(window, NULL);\n\n            break;\n\n        case GLFW_KEY_P:\n        {\n            double x, y;\n            glfwGetCursorPos(window, &x, &y);\n\n            printf(\"Query before set: %f %f (%+f %+f)\\n\",\n                   x, y, x - cursor_x, y - cursor_y);\n            cursor_x = x;\n            cursor_y = y;\n\n            glfwSetCursorPos(window, cursor_x, cursor_y);\n            glfwGetCursorPos(window, &x, &y);\n\n            printf(\"Query after set: %f %f (%+f %+f)\\n\",\n                   x, y, x - cursor_x, y - cursor_y);\n            cursor_x = x;\n            cursor_y = y;\n            break;\n        }\n\n        case GLFW_KEY_UP:\n            glfwSetCursorPos(window, 0, 0);\n            glfwGetCursorPos(window, &cursor_x, &cursor_y);\n            break;\n\n        case GLFW_KEY_DOWN:\n        {\n            int width, height;\n            glfwGetWindowSize(window, &width, &height);\n            glfwSetCursorPos(window, width - 1, height - 1);\n            glfwGetCursorPos(window, &cursor_x, &cursor_y);\n            break;\n        }\n\n        case GLFW_KEY_0:\n            glfwSetCursor(window, NULL);\n            break;\n\n        case GLFW_KEY_1:\n            glfwSetCursor(window, standard_cursors[0]);\n            break;\n\n        case GLFW_KEY_2:\n            glfwSetCursor(window, standard_cursors[1]);\n            break;\n\n        case GLFW_KEY_3:\n            glfwSetCursor(window, standard_cursors[2]);\n            break;\n\n        case GLFW_KEY_4:\n            glfwSetCursor(window, standard_cursors[3]);\n            break;\n\n        case GLFW_KEY_5:\n            glfwSetCursor(window, standard_cursors[4]);\n            break;\n\n        case GLFW_KEY_6:\n            glfwSetCursor(window, standard_cursors[5]);\n            break;\n\n        case GLFW_KEY_F11:\n        case GLFW_KEY_ENTER:\n        {\n            static int x, y, width, height;\n\n            if (mods != GLFW_MOD_ALT)\n                return;\n\n            if (glfwGetWindowMonitor(window))\n                glfwSetWindowMonitor(window, NULL, x, y, width, height, 0);\n            else\n            {\n                GLFWmonitor* monitor = glfwGetPrimaryMonitor();\n                const GLFWvidmode* mode = glfwGetVideoMode(monitor);\n                glfwGetWindowPos(window, &x, &y);\n                glfwGetWindowSize(window, &width, &height);\n                glfwSetWindowMonitor(window, monitor,\n                                     0, 0, mode->width, mode->height,\n                                     mode->refreshRate);\n            }\n\n            glfwGetCursorPos(window, &cursor_x, &cursor_y);\n            break;\n        }\n    }\n}\n\nint main(void)\n{\n    int i;\n    GLFWwindow* window;\n    GLFWcursor* star_cursors[CURSOR_FRAME_COUNT];\n    GLFWcursor* current_frame = NULL;\n    GLuint vertex_buffer, vertex_shader, fragment_shader, program;\n    GLint mvp_location, vpos_location;\n\n    glfwSetErrorCallback(error_callback);\n\n    if (!glfwInit())\n        exit(EXIT_FAILURE);\n\n    tracking_cursor = create_tracking_cursor();\n    if (!tracking_cursor)\n    {\n        glfwTerminate();\n        exit(EXIT_FAILURE);\n    }\n\n    for (i = 0;  i < CURSOR_FRAME_COUNT;  i++)\n    {\n        star_cursors[i] = create_cursor_frame(i / (float) CURSOR_FRAME_COUNT);\n        if (!star_cursors[i])\n        {\n            glfwTerminate();\n            exit(EXIT_FAILURE);\n        }\n    }\n\n    for (i = 0;  i < sizeof(standard_cursors) / sizeof(standard_cursors[0]);  i++)\n    {\n        const int shapes[] = {\n            GLFW_ARROW_CURSOR,\n            GLFW_IBEAM_CURSOR,\n            GLFW_CROSSHAIR_CURSOR,\n            GLFW_HAND_CURSOR,\n            GLFW_HRESIZE_CURSOR,\n            GLFW_VRESIZE_CURSOR\n        };\n\n        standard_cursors[i] = glfwCreateStandardCursor(shapes[i]);\n        if (!standard_cursors[i])\n        {\n            glfwTerminate();\n            exit(EXIT_FAILURE);\n        }\n    }\n\n    glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 2);\n    glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 0);\n\n    window = glfwCreateWindow(640, 480, \"Cursor Test\", NULL, NULL);\n    if (!window)\n    {\n        glfwTerminate();\n        exit(EXIT_FAILURE);\n    }\n\n    glfwMakeContextCurrent(window);\n    gladLoadGL(glfwGetProcAddress);\n\n    glGenBuffers(1, &vertex_buffer);\n    glBindBuffer(GL_ARRAY_BUFFER, vertex_buffer);\n\n    vertex_shader = glCreateShader(GL_VERTEX_SHADER);\n    glShaderSource(vertex_shader, 1, &vertex_shader_text, NULL);\n    glCompileShader(vertex_shader);\n\n    fragment_shader = glCreateShader(GL_FRAGMENT_SHADER);\n    glShaderSource(fragment_shader, 1, &fragment_shader_text, NULL);\n    glCompileShader(fragment_shader);\n\n    program = glCreateProgram();\n    glAttachShader(program, vertex_shader);\n    glAttachShader(program, fragment_shader);\n    glLinkProgram(program);\n\n    mvp_location = glGetUniformLocation(program, \"MVP\");\n    vpos_location = glGetAttribLocation(program, \"vPos\");\n\n    glEnableVertexAttribArray(vpos_location);\n    glVertexAttribPointer(vpos_location, 2, GL_FLOAT, GL_FALSE,\n                          sizeof(vec2), (void*) 0);\n    glUseProgram(program);\n\n    glfwGetCursorPos(window, &cursor_x, &cursor_y);\n    printf(\"Cursor position: %f %f\\n\", cursor_x, cursor_y);\n\n    glfwSetCursorPosCallback(window, cursor_position_callback);\n    glfwSetKeyCallback(window, key_callback);\n\n    while (!glfwWindowShouldClose(window))\n    {\n        glClear(GL_COLOR_BUFFER_BIT);\n\n        if (track_cursor)\n        {\n            int wnd_width, wnd_height, fb_width, fb_height;\n            float scale;\n            vec2 vertices[4];\n            mat4x4 mvp;\n\n            glfwGetWindowSize(window, &wnd_width, &wnd_height);\n            glfwGetFramebufferSize(window, &fb_width, &fb_height);\n\n            glViewport(0, 0, fb_width, fb_height);\n\n            scale = (float) fb_width / (float) wnd_width;\n            vertices[0][0] = 0.5f;\n            vertices[0][1] = (float) (fb_height - floor(cursor_y * scale) - 1.f + 0.5f);\n            vertices[1][0] = (float) fb_width + 0.5f;\n            vertices[1][1] = (float) (fb_height - floor(cursor_y * scale) - 1.f + 0.5f);\n            vertices[2][0] = (float) floor(cursor_x * scale) + 0.5f;\n            vertices[2][1] = 0.5f;\n            vertices[3][0] = (float) floor(cursor_x * scale) + 0.5f;\n            vertices[3][1] = (float) fb_height + 0.5f;\n\n            glBufferData(GL_ARRAY_BUFFER,\n                         sizeof(vertices),\n                         vertices,\n                         GL_STREAM_DRAW);\n\n            mat4x4_ortho(mvp, 0.f, (float) fb_width, 0.f, (float) fb_height, 0.f, 1.f);\n            glUniformMatrix4fv(mvp_location, 1, GL_FALSE, (const GLfloat*) mvp);\n\n            glDrawArrays(GL_LINES, 0, 4);\n        }\n\n        glfwSwapBuffers(window);\n\n        if (animate_cursor)\n        {\n            const int i = (int) (glfwGetTime() * 30.0) % CURSOR_FRAME_COUNT;\n            if (current_frame != star_cursors[i])\n            {\n                glfwSetCursor(window, star_cursors[i]);\n                current_frame = star_cursors[i];\n            }\n        }\n        else\n            current_frame = NULL;\n\n        if (wait_events)\n        {\n            if (animate_cursor)\n                glfwWaitEventsTimeout(1.0 / 30.0);\n            else\n                glfwWaitEvents();\n        }\n        else\n            glfwPollEvents();\n\n        // Workaround for an issue with msvcrt and mintty\n        fflush(stdout);\n    }\n\n    glfwDestroyWindow(window);\n\n    for (i = 0;  i < CURSOR_FRAME_COUNT;  i++)\n        glfwDestroyCursor(star_cursors[i]);\n\n    for (i = 0;  i < sizeof(standard_cursors) / sizeof(standard_cursors[0]);  i++)\n        glfwDestroyCursor(standard_cursors[i]);\n\n    glfwTerminate();\n    exit(EXIT_SUCCESS);\n}\n\n"
  },
  {
    "path": "thirdparty/glfw/tests/empty.c",
    "content": "//========================================================================\n// Empty event test\n// Copyright (c) Camilla Löwy <elmindreda@glfw.org>\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//    claim that you wrote the original software. If you use this software\n//    in a product, an acknowledgment in the product documentation would\n//    be appreciated but is not required.\n//\n// 2. Altered source versions must be plainly marked as such, and must not\n//    be misrepresented as being the original software.\n//\n// 3. This notice may not be removed or altered from any source\n//    distribution.\n//\n//========================================================================\n//\n// This test is intended to verify that posting of empty events works\n//\n//========================================================================\n\n#include \"tinycthread.h\"\n\n#include <glad/gl.h>\n#define GLFW_INCLUDE_NONE\n#include <GLFW/glfw3.h>\n\n#include <math.h>\n#include <stdio.h>\n#include <stdlib.h>\n\nstatic volatile int running = GLFW_TRUE;\n\nstatic void error_callback(int error, const char* description)\n{\n    fprintf(stderr, \"Error: %s\\n\", description);\n}\n\nstatic int thread_main(void* data)\n{\n    struct timespec time;\n\n    while (running)\n    {\n        clock_gettime(CLOCK_REALTIME, &time);\n        time.tv_sec += 1;\n        thrd_sleep(&time, NULL);\n\n        glfwPostEmptyEvent();\n    }\n\n    return 0;\n}\n\nstatic void key_callback(GLFWwindow* window, int key, int scancode, int action, int mods)\n{\n    if (key == GLFW_KEY_ESCAPE && action == GLFW_PRESS)\n        glfwSetWindowShouldClose(window, GLFW_TRUE);\n}\n\nstatic float nrand(void)\n{\n    return (float) rand() / (float) RAND_MAX;\n}\n\nint main(void)\n{\n    int result;\n    thrd_t thread;\n    GLFWwindow* window;\n\n    srand((unsigned int) time(NULL));\n\n    glfwSetErrorCallback(error_callback);\n\n    if (!glfwInit())\n        exit(EXIT_FAILURE);\n\n    window = glfwCreateWindow(640, 480, \"Empty Event Test\", NULL, NULL);\n    if (!window)\n    {\n        glfwTerminate();\n        exit(EXIT_FAILURE);\n    }\n\n    glfwMakeContextCurrent(window);\n    gladLoadGL(glfwGetProcAddress);\n    glfwSetKeyCallback(window, key_callback);\n\n    if (thrd_create(&thread, thread_main, NULL) != thrd_success)\n    {\n        fprintf(stderr, \"Failed to create secondary thread\\n\");\n\n        glfwTerminate();\n        exit(EXIT_FAILURE);\n    }\n\n    while (running)\n    {\n        int width, height;\n        float r = nrand(), g = nrand(), b = nrand();\n        float l = (float) sqrt(r * r + g * g + b * b);\n\n        glfwGetFramebufferSize(window, &width, &height);\n\n        glViewport(0, 0, width, height);\n        glClearColor(r / l, g / l, b / l, 1.f);\n        glClear(GL_COLOR_BUFFER_BIT);\n        glfwSwapBuffers(window);\n\n        glfwWaitEvents();\n\n        if (glfwWindowShouldClose(window))\n            running = GLFW_FALSE;\n    }\n\n    glfwHideWindow(window);\n    thrd_join(thread, &result);\n    glfwDestroyWindow(window);\n\n    glfwTerminate();\n    exit(EXIT_SUCCESS);\n}\n\n"
  },
  {
    "path": "thirdparty/glfw/tests/events.c",
    "content": "//========================================================================\n// Event linter (event spewer)\n// Copyright (c) Camilla Löwy <elmindreda@glfw.org>\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//    claim that you wrote the original software. If you use this software\n//    in a product, an acknowledgment in the product documentation would\n//    be appreciated but is not required.\n//\n// 2. Altered source versions must be plainly marked as such, and must not\n//    be misrepresented as being the original software.\n//\n// 3. This notice may not be removed or altered from any source\n//    distribution.\n//\n//========================================================================\n//\n// This test hooks every available callback and outputs their arguments\n//\n// Log messages go to stdout, error messages to stderr\n//\n// Every event also gets a (sequential) number to aid discussion of logs\n//\n//========================================================================\n\n#include <glad/gl.h>\n#define GLFW_INCLUDE_NONE\n#include <GLFW/glfw3.h>\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <ctype.h>\n#include <string.h>\n#include <locale.h>\n\n#include \"getopt.h\"\n\n// Event index\nstatic unsigned int counter = 0;\n\ntypedef struct\n{\n    GLFWwindow* window;\n    int number;\n    int closeable;\n} Slot;\n\nstatic void usage(void)\n{\n    printf(\"Usage: events [-f] [-h] [-n WINDOWS]\\n\");\n    printf(\"Options:\\n\");\n    printf(\"  -f use full screen\\n\");\n    printf(\"  -h show this help\\n\");\n    printf(\"  -n the number of windows to create\\n\");\n}\n\nstatic const char* get_key_name(int key)\n{\n    switch (key)\n    {\n        // Printable keys\n        case GLFW_KEY_A:            return \"A\";\n        case GLFW_KEY_B:            return \"B\";\n        case GLFW_KEY_C:            return \"C\";\n        case GLFW_KEY_D:            return \"D\";\n        case GLFW_KEY_E:            return \"E\";\n        case GLFW_KEY_F:            return \"F\";\n        case GLFW_KEY_G:            return \"G\";\n        case GLFW_KEY_H:            return \"H\";\n        case GLFW_KEY_I:            return \"I\";\n        case GLFW_KEY_J:            return \"J\";\n        case GLFW_KEY_K:            return \"K\";\n        case GLFW_KEY_L:            return \"L\";\n        case GLFW_KEY_M:            return \"M\";\n        case GLFW_KEY_N:            return \"N\";\n        case GLFW_KEY_O:            return \"O\";\n        case GLFW_KEY_P:            return \"P\";\n        case GLFW_KEY_Q:            return \"Q\";\n        case GLFW_KEY_R:            return \"R\";\n        case GLFW_KEY_S:            return \"S\";\n        case GLFW_KEY_T:            return \"T\";\n        case GLFW_KEY_U:            return \"U\";\n        case GLFW_KEY_V:            return \"V\";\n        case GLFW_KEY_W:            return \"W\";\n        case GLFW_KEY_X:            return \"X\";\n        case GLFW_KEY_Y:            return \"Y\";\n        case GLFW_KEY_Z:            return \"Z\";\n        case GLFW_KEY_1:            return \"1\";\n        case GLFW_KEY_2:            return \"2\";\n        case GLFW_KEY_3:            return \"3\";\n        case GLFW_KEY_4:            return \"4\";\n        case GLFW_KEY_5:            return \"5\";\n        case GLFW_KEY_6:            return \"6\";\n        case GLFW_KEY_7:            return \"7\";\n        case GLFW_KEY_8:            return \"8\";\n        case GLFW_KEY_9:            return \"9\";\n        case GLFW_KEY_0:            return \"0\";\n        case GLFW_KEY_SPACE:        return \"SPACE\";\n        case GLFW_KEY_MINUS:        return \"MINUS\";\n        case GLFW_KEY_EQUAL:        return \"EQUAL\";\n        case GLFW_KEY_LEFT_BRACKET: return \"LEFT BRACKET\";\n        case GLFW_KEY_RIGHT_BRACKET: return \"RIGHT BRACKET\";\n        case GLFW_KEY_BACKSLASH:    return \"BACKSLASH\";\n        case GLFW_KEY_SEMICOLON:    return \"SEMICOLON\";\n        case GLFW_KEY_APOSTROPHE:   return \"APOSTROPHE\";\n        case GLFW_KEY_GRAVE_ACCENT: return \"GRAVE ACCENT\";\n        case GLFW_KEY_COMMA:        return \"COMMA\";\n        case GLFW_KEY_PERIOD:       return \"PERIOD\";\n        case GLFW_KEY_SLASH:        return \"SLASH\";\n        case GLFW_KEY_WORLD_1:      return \"WORLD 1\";\n        case GLFW_KEY_WORLD_2:      return \"WORLD 2\";\n\n        // Function keys\n        case GLFW_KEY_ESCAPE:       return \"ESCAPE\";\n        case GLFW_KEY_F1:           return \"F1\";\n        case GLFW_KEY_F2:           return \"F2\";\n        case GLFW_KEY_F3:           return \"F3\";\n        case GLFW_KEY_F4:           return \"F4\";\n        case GLFW_KEY_F5:           return \"F5\";\n        case GLFW_KEY_F6:           return \"F6\";\n        case GLFW_KEY_F7:           return \"F7\";\n        case GLFW_KEY_F8:           return \"F8\";\n        case GLFW_KEY_F9:           return \"F9\";\n        case GLFW_KEY_F10:          return \"F10\";\n        case GLFW_KEY_F11:          return \"F11\";\n        case GLFW_KEY_F12:          return \"F12\";\n        case GLFW_KEY_F13:          return \"F13\";\n        case GLFW_KEY_F14:          return \"F14\";\n        case GLFW_KEY_F15:          return \"F15\";\n        case GLFW_KEY_F16:          return \"F16\";\n        case GLFW_KEY_F17:          return \"F17\";\n        case GLFW_KEY_F18:          return \"F18\";\n        case GLFW_KEY_F19:          return \"F19\";\n        case GLFW_KEY_F20:          return \"F20\";\n        case GLFW_KEY_F21:          return \"F21\";\n        case GLFW_KEY_F22:          return \"F22\";\n        case GLFW_KEY_F23:          return \"F23\";\n        case GLFW_KEY_F24:          return \"F24\";\n        case GLFW_KEY_F25:          return \"F25\";\n        case GLFW_KEY_UP:           return \"UP\";\n        case GLFW_KEY_DOWN:         return \"DOWN\";\n        case GLFW_KEY_LEFT:         return \"LEFT\";\n        case GLFW_KEY_RIGHT:        return \"RIGHT\";\n        case GLFW_KEY_LEFT_SHIFT:   return \"LEFT SHIFT\";\n        case GLFW_KEY_RIGHT_SHIFT:  return \"RIGHT SHIFT\";\n        case GLFW_KEY_LEFT_CONTROL: return \"LEFT CONTROL\";\n        case GLFW_KEY_RIGHT_CONTROL: return \"RIGHT CONTROL\";\n        case GLFW_KEY_LEFT_ALT:     return \"LEFT ALT\";\n        case GLFW_KEY_RIGHT_ALT:    return \"RIGHT ALT\";\n        case GLFW_KEY_TAB:          return \"TAB\";\n        case GLFW_KEY_ENTER:        return \"ENTER\";\n        case GLFW_KEY_BACKSPACE:    return \"BACKSPACE\";\n        case GLFW_KEY_INSERT:       return \"INSERT\";\n        case GLFW_KEY_DELETE:       return \"DELETE\";\n        case GLFW_KEY_PAGE_UP:      return \"PAGE UP\";\n        case GLFW_KEY_PAGE_DOWN:    return \"PAGE DOWN\";\n        case GLFW_KEY_HOME:         return \"HOME\";\n        case GLFW_KEY_END:          return \"END\";\n        case GLFW_KEY_KP_0:         return \"KEYPAD 0\";\n        case GLFW_KEY_KP_1:         return \"KEYPAD 1\";\n        case GLFW_KEY_KP_2:         return \"KEYPAD 2\";\n        case GLFW_KEY_KP_3:         return \"KEYPAD 3\";\n        case GLFW_KEY_KP_4:         return \"KEYPAD 4\";\n        case GLFW_KEY_KP_5:         return \"KEYPAD 5\";\n        case GLFW_KEY_KP_6:         return \"KEYPAD 6\";\n        case GLFW_KEY_KP_7:         return \"KEYPAD 7\";\n        case GLFW_KEY_KP_8:         return \"KEYPAD 8\";\n        case GLFW_KEY_KP_9:         return \"KEYPAD 9\";\n        case GLFW_KEY_KP_DIVIDE:    return \"KEYPAD DIVIDE\";\n        case GLFW_KEY_KP_MULTIPLY:  return \"KEYPAD MULTIPLY\";\n        case GLFW_KEY_KP_SUBTRACT:  return \"KEYPAD SUBTRACT\";\n        case GLFW_KEY_KP_ADD:       return \"KEYPAD ADD\";\n        case GLFW_KEY_KP_DECIMAL:   return \"KEYPAD DECIMAL\";\n        case GLFW_KEY_KP_EQUAL:     return \"KEYPAD EQUAL\";\n        case GLFW_KEY_KP_ENTER:     return \"KEYPAD ENTER\";\n        case GLFW_KEY_PRINT_SCREEN: return \"PRINT SCREEN\";\n        case GLFW_KEY_NUM_LOCK:     return \"NUM LOCK\";\n        case GLFW_KEY_CAPS_LOCK:    return \"CAPS LOCK\";\n        case GLFW_KEY_SCROLL_LOCK:  return \"SCROLL LOCK\";\n        case GLFW_KEY_PAUSE:        return \"PAUSE\";\n        case GLFW_KEY_LEFT_SUPER:   return \"LEFT SUPER\";\n        case GLFW_KEY_RIGHT_SUPER:  return \"RIGHT SUPER\";\n        case GLFW_KEY_MENU:         return \"MENU\";\n\n        default:                    return \"UNKNOWN\";\n    }\n}\n\nstatic const char* get_action_name(int action)\n{\n    switch (action)\n    {\n        case GLFW_PRESS:\n            return \"pressed\";\n        case GLFW_RELEASE:\n            return \"released\";\n        case GLFW_REPEAT:\n            return \"repeated\";\n    }\n\n    return \"caused unknown action\";\n}\n\nstatic const char* get_button_name(int button)\n{\n    switch (button)\n    {\n        case GLFW_MOUSE_BUTTON_LEFT:\n            return \"left\";\n        case GLFW_MOUSE_BUTTON_RIGHT:\n            return \"right\";\n        case GLFW_MOUSE_BUTTON_MIDDLE:\n            return \"middle\";\n        default:\n        {\n            static char name[16];\n            snprintf(name, sizeof(name), \"%i\", button);\n            return name;\n        }\n    }\n}\n\nstatic const char* get_mods_name(int mods)\n{\n    static char name[512];\n\n    if (mods == 0)\n        return \" no mods\";\n\n    name[0] = '\\0';\n\n    if (mods & GLFW_MOD_SHIFT)\n        strcat(name, \" shift\");\n    if (mods & GLFW_MOD_CONTROL)\n        strcat(name, \" control\");\n    if (mods & GLFW_MOD_ALT)\n        strcat(name, \" alt\");\n    if (mods & GLFW_MOD_SUPER)\n        strcat(name, \" super\");\n    if (mods & GLFW_MOD_CAPS_LOCK)\n        strcat(name, \" capslock-on\");\n    if (mods & GLFW_MOD_NUM_LOCK)\n        strcat(name, \" numlock-on\");\n\n    return name;\n}\n\nstatic size_t encode_utf8(char* s, unsigned int ch)\n{\n    size_t count = 0;\n\n    if (ch < 0x80)\n        s[count++] = (char) ch;\n    else if (ch < 0x800)\n    {\n        s[count++] = (ch >> 6) | 0xc0;\n        s[count++] = (ch & 0x3f) | 0x80;\n    }\n    else if (ch < 0x10000)\n    {\n        s[count++] = (ch >> 12) | 0xe0;\n        s[count++] = ((ch >> 6) & 0x3f) | 0x80;\n        s[count++] = (ch & 0x3f) | 0x80;\n    }\n    else if (ch < 0x110000)\n    {\n        s[count++] = (ch >> 18) | 0xf0;\n        s[count++] = ((ch >> 12) & 0x3f) | 0x80;\n        s[count++] = ((ch >> 6) & 0x3f) | 0x80;\n        s[count++] = (ch & 0x3f) | 0x80;\n    }\n\n    return count;\n}\n\nstatic void error_callback(int error, const char* description)\n{\n    fprintf(stderr, \"Error: %s\\n\", description);\n}\n\nstatic void window_pos_callback(GLFWwindow* window, int x, int y)\n{\n    Slot* slot = glfwGetWindowUserPointer(window);\n    printf(\"%08x to %i at %0.3f: Window position: %i %i\\n\",\n           counter++, slot->number, glfwGetTime(), x, y);\n}\n\nstatic void window_size_callback(GLFWwindow* window, int width, int height)\n{\n    Slot* slot = glfwGetWindowUserPointer(window);\n    printf(\"%08x to %i at %0.3f: Window size: %i %i\\n\",\n           counter++, slot->number, glfwGetTime(), width, height);\n}\n\nstatic void framebuffer_size_callback(GLFWwindow* window, int width, int height)\n{\n    Slot* slot = glfwGetWindowUserPointer(window);\n    printf(\"%08x to %i at %0.3f: Framebuffer size: %i %i\\n\",\n           counter++, slot->number, glfwGetTime(), width, height);\n}\n\nstatic void window_content_scale_callback(GLFWwindow* window, float xscale, float yscale)\n{\n    Slot* slot = glfwGetWindowUserPointer(window);\n    printf(\"%08x to %i at %0.3f: Window content scale: %0.3f %0.3f\\n\",\n           counter++, slot->number, glfwGetTime(), xscale, yscale);\n}\n\nstatic void window_close_callback(GLFWwindow* window)\n{\n    Slot* slot = glfwGetWindowUserPointer(window);\n    printf(\"%08x to %i at %0.3f: Window close\\n\",\n           counter++, slot->number, glfwGetTime());\n\n    glfwSetWindowShouldClose(window, slot->closeable);\n}\n\nstatic void window_refresh_callback(GLFWwindow* window)\n{\n    Slot* slot = glfwGetWindowUserPointer(window);\n    printf(\"%08x to %i at %0.3f: Window refresh\\n\",\n           counter++, slot->number, glfwGetTime());\n\n    glfwMakeContextCurrent(window);\n    glClear(GL_COLOR_BUFFER_BIT);\n    glfwSwapBuffers(window);\n}\n\nstatic void window_focus_callback(GLFWwindow* window, int focused)\n{\n    Slot* slot = glfwGetWindowUserPointer(window);\n    printf(\"%08x to %i at %0.3f: Window %s\\n\",\n           counter++, slot->number, glfwGetTime(),\n           focused ? \"focused\" : \"defocused\");\n}\n\nstatic void window_iconify_callback(GLFWwindow* window, int iconified)\n{\n    Slot* slot = glfwGetWindowUserPointer(window);\n    printf(\"%08x to %i at %0.3f: Window was %s\\n\",\n           counter++, slot->number, glfwGetTime(),\n           iconified ? \"iconified\" : \"uniconified\");\n}\n\nstatic void window_maximize_callback(GLFWwindow* window, int maximized)\n{\n    Slot* slot = glfwGetWindowUserPointer(window);\n    printf(\"%08x to %i at %0.3f: Window was %s\\n\",\n           counter++, slot->number, glfwGetTime(),\n           maximized ? \"maximized\" : \"unmaximized\");\n}\n\nstatic void mouse_button_callback(GLFWwindow* window, int button, int action, int mods)\n{\n    Slot* slot = glfwGetWindowUserPointer(window);\n    printf(\"%08x to %i at %0.3f: Mouse button %i (%s) (with%s) was %s\\n\",\n           counter++, slot->number, glfwGetTime(), button,\n           get_button_name(button),\n           get_mods_name(mods),\n           get_action_name(action));\n}\n\nstatic void cursor_position_callback(GLFWwindow* window, double x, double y)\n{\n    Slot* slot = glfwGetWindowUserPointer(window);\n    printf(\"%08x to %i at %0.3f: Cursor position: %f %f\\n\",\n           counter++, slot->number, glfwGetTime(), x, y);\n}\n\nstatic void cursor_enter_callback(GLFWwindow* window, int entered)\n{\n    Slot* slot = glfwGetWindowUserPointer(window);\n    printf(\"%08x to %i at %0.3f: Cursor %s window\\n\",\n           counter++, slot->number, glfwGetTime(),\n           entered ? \"entered\" : \"left\");\n}\n\nstatic void scroll_callback(GLFWwindow* window, double x, double y)\n{\n    Slot* slot = glfwGetWindowUserPointer(window);\n    printf(\"%08x to %i at %0.3f: Scroll: %0.3f %0.3f\\n\",\n           counter++, slot->number, glfwGetTime(), x, y);\n}\n\nstatic void key_callback(GLFWwindow* window, int key, int scancode, int action, int mods)\n{\n    Slot* slot = glfwGetWindowUserPointer(window);\n    const char* name = glfwGetKeyName(key, scancode);\n\n    if (name)\n    {\n        printf(\"%08x to %i at %0.3f: Key 0x%04x Scancode 0x%04x (%s) (%s) (with%s) was %s\\n\",\n               counter++, slot->number, glfwGetTime(), key, scancode,\n               get_key_name(key),\n               name,\n               get_mods_name(mods),\n               get_action_name(action));\n    }\n    else\n    {\n        printf(\"%08x to %i at %0.3f: Key 0x%04x Scancode 0x%04x (%s) (with%s) was %s\\n\",\n               counter++, slot->number, glfwGetTime(), key, scancode,\n               get_key_name(key),\n               get_mods_name(mods),\n               get_action_name(action));\n    }\n\n    if (action != GLFW_PRESS)\n        return;\n\n    switch (key)\n    {\n        case GLFW_KEY_C:\n        {\n            slot->closeable = !slot->closeable;\n\n            printf(\"(( closing %s ))\\n\", slot->closeable ? \"enabled\" : \"disabled\");\n            break;\n        }\n\n        case GLFW_KEY_L:\n        {\n            const int state = glfwGetInputMode(window, GLFW_LOCK_KEY_MODS);\n            glfwSetInputMode(window, GLFW_LOCK_KEY_MODS, !state);\n\n            printf(\"(( lock key mods %s ))\\n\", !state ? \"enabled\" : \"disabled\");\n            break;\n        }\n    }\n}\n\nstatic void char_callback(GLFWwindow* window, unsigned int codepoint)\n{\n    Slot* slot = glfwGetWindowUserPointer(window);\n    char string[5] = \"\";\n\n    encode_utf8(string, codepoint);\n    printf(\"%08x to %i at %0.3f: Character 0x%08x (%s) input\\n\",\n           counter++, slot->number, glfwGetTime(), codepoint, string);\n}\n\nstatic void drop_callback(GLFWwindow* window, int count, const char* paths[])\n{\n    int i;\n    Slot* slot = glfwGetWindowUserPointer(window);\n\n    printf(\"%08x to %i at %0.3f: Drop input\\n\",\n           counter++, slot->number, glfwGetTime());\n\n    for (i = 0;  i < count;  i++)\n        printf(\"  %i: \\\"%s\\\"\\n\", i, paths[i]);\n}\n\nstatic void monitor_callback(GLFWmonitor* monitor, int event)\n{\n    if (event == GLFW_CONNECTED)\n    {\n        int x, y, widthMM, heightMM;\n        const GLFWvidmode* mode = glfwGetVideoMode(monitor);\n\n        glfwGetMonitorPos(monitor, &x, &y);\n        glfwGetMonitorPhysicalSize(monitor, &widthMM, &heightMM);\n\n        printf(\"%08x at %0.3f: Monitor %s (%ix%i at %ix%i, %ix%i mm) was connected\\n\",\n               counter++,\n               glfwGetTime(),\n               glfwGetMonitorName(monitor),\n               mode->width, mode->height,\n               x, y,\n               widthMM, heightMM);\n    }\n    else if (event == GLFW_DISCONNECTED)\n    {\n        printf(\"%08x at %0.3f: Monitor %s was disconnected\\n\",\n               counter++,\n               glfwGetTime(),\n               glfwGetMonitorName(monitor));\n    }\n}\n\nstatic void joystick_callback(int jid, int event)\n{\n    if (event == GLFW_CONNECTED)\n    {\n        int axisCount, buttonCount, hatCount;\n\n        glfwGetJoystickAxes(jid, &axisCount);\n        glfwGetJoystickButtons(jid, &buttonCount);\n        glfwGetJoystickHats(jid, &hatCount);\n\n        printf(\"%08x at %0.3f: Joystick %i (%s) was connected with %i axes, %i buttons, and %i hats\\n\",\n               counter++, glfwGetTime(),\n               jid,\n               glfwGetJoystickName(jid),\n               axisCount,\n               buttonCount,\n               hatCount);\n    }\n    else\n    {\n        printf(\"%08x at %0.3f: Joystick %i was disconnected\\n\",\n               counter++, glfwGetTime(), jid);\n    }\n}\n\nint main(int argc, char** argv)\n{\n    Slot* slots;\n    GLFWmonitor* monitor = NULL;\n    int ch, i, width, height, count = 1;\n\n    glfwSetErrorCallback(error_callback);\n\n    if (!glfwInit())\n        exit(EXIT_FAILURE);\n\n    printf(\"Library initialized\\n\");\n\n    glfwSetMonitorCallback(monitor_callback);\n    glfwSetJoystickCallback(joystick_callback);\n\n    while ((ch = getopt(argc, argv, \"hfn:\")) != -1)\n    {\n        switch (ch)\n        {\n            case 'h':\n                usage();\n                exit(EXIT_SUCCESS);\n\n            case 'f':\n                monitor = glfwGetPrimaryMonitor();\n                break;\n\n            case 'n':\n                count = (int) strtoul(optarg, NULL, 10);\n                break;\n\n            default:\n                usage();\n                exit(EXIT_FAILURE);\n        }\n    }\n\n    if (monitor)\n    {\n        const GLFWvidmode* mode = glfwGetVideoMode(monitor);\n\n        glfwWindowHint(GLFW_REFRESH_RATE, mode->refreshRate);\n        glfwWindowHint(GLFW_RED_BITS, mode->redBits);\n        glfwWindowHint(GLFW_GREEN_BITS, mode->greenBits);\n        glfwWindowHint(GLFW_BLUE_BITS, mode->blueBits);\n\n        width = mode->width;\n        height = mode->height;\n    }\n    else\n    {\n        width  = 640;\n        height = 480;\n    }\n\n    slots = calloc(count, sizeof(Slot));\n\n    for (i = 0;  i < count;  i++)\n    {\n        char title[128];\n\n        slots[i].closeable = GLFW_TRUE;\n        slots[i].number = i + 1;\n\n        snprintf(title, sizeof(title), \"Event Linter (Window %i)\", slots[i].number);\n\n        if (monitor)\n        {\n            printf(\"Creating full screen window %i (%ix%i on %s)\\n\",\n                   slots[i].number,\n                   width, height,\n                   glfwGetMonitorName(monitor));\n        }\n        else\n        {\n            printf(\"Creating windowed mode window %i (%ix%i)\\n\",\n                   slots[i].number,\n                   width, height);\n        }\n\n        slots[i].window = glfwCreateWindow(width, height, title, monitor, NULL);\n        if (!slots[i].window)\n        {\n            free(slots);\n            glfwTerminate();\n            exit(EXIT_FAILURE);\n        }\n\n        glfwSetWindowUserPointer(slots[i].window, slots + i);\n\n        glfwSetWindowPosCallback(slots[i].window, window_pos_callback);\n        glfwSetWindowSizeCallback(slots[i].window, window_size_callback);\n        glfwSetFramebufferSizeCallback(slots[i].window, framebuffer_size_callback);\n        glfwSetWindowContentScaleCallback(slots[i].window, window_content_scale_callback);\n        glfwSetWindowCloseCallback(slots[i].window, window_close_callback);\n        glfwSetWindowRefreshCallback(slots[i].window, window_refresh_callback);\n        glfwSetWindowFocusCallback(slots[i].window, window_focus_callback);\n        glfwSetWindowIconifyCallback(slots[i].window, window_iconify_callback);\n        glfwSetWindowMaximizeCallback(slots[i].window, window_maximize_callback);\n        glfwSetMouseButtonCallback(slots[i].window, mouse_button_callback);\n        glfwSetCursorPosCallback(slots[i].window, cursor_position_callback);\n        glfwSetCursorEnterCallback(slots[i].window, cursor_enter_callback);\n        glfwSetScrollCallback(slots[i].window, scroll_callback);\n        glfwSetKeyCallback(slots[i].window, key_callback);\n        glfwSetCharCallback(slots[i].window, char_callback);\n        glfwSetDropCallback(slots[i].window, drop_callback);\n\n        glfwMakeContextCurrent(slots[i].window);\n        gladLoadGL(glfwGetProcAddress);\n        glfwSwapInterval(1);\n    }\n\n    printf(\"Main loop starting\\n\");\n\n    for (;;)\n    {\n        for (i = 0;  i < count;  i++)\n        {\n            if (glfwWindowShouldClose(slots[i].window))\n                break;\n        }\n\n        if (i < count)\n            break;\n\n        glfwWaitEvents();\n\n        // Workaround for an issue with msvcrt and mintty\n        fflush(stdout);\n    }\n\n    free(slots);\n    glfwTerminate();\n    exit(EXIT_SUCCESS);\n}\n\n"
  },
  {
    "path": "thirdparty/glfw/tests/gamma.c",
    "content": "//========================================================================\n// Gamma correction test program\n// Copyright (c) Camilla Löwy <elmindreda@glfw.org>\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//    claim that you wrote the original software. If you use this software\n//    in a product, an acknowledgment in the product documentation would\n//    be appreciated but is not required.\n//\n// 2. Altered source versions must be plainly marked as such, and must not\n//    be misrepresented as being the original software.\n//\n// 3. This notice may not be removed or altered from any source\n//    distribution.\n//\n//========================================================================\n//\n// This program is used to test the gamma correction functionality for\n// both full screen and windowed mode windows\n//\n//========================================================================\n\n#include <glad/gl.h>\n#define GLFW_INCLUDE_NONE\n#include <GLFW/glfw3.h>\n\n#define NK_IMPLEMENTATION\n#define NK_INCLUDE_FIXED_TYPES\n#define NK_INCLUDE_FONT_BAKING\n#define NK_INCLUDE_DEFAULT_FONT\n#define NK_INCLUDE_DEFAULT_ALLOCATOR\n#define NK_INCLUDE_VERTEX_BUFFER_OUTPUT\n#define NK_INCLUDE_STANDARD_VARARGS\n#define NK_BUTTON_TRIGGER_ON_RELEASE\n#include <nuklear.h>\n\n#define NK_GLFW_GL2_IMPLEMENTATION\n#include <nuklear_glfw_gl2.h>\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n\nstatic void error_callback(int error, const char* description)\n{\n    fprintf(stderr, \"Error: %s\\n\", description);\n}\n\nstatic void key_callback(GLFWwindow* window, int key, int scancode, int action, int mods)\n{\n    if (action == GLFW_PRESS && key == GLFW_KEY_ESCAPE)\n        glfwSetWindowShouldClose(window, GLFW_TRUE);\n}\n\nstatic void chart_ramp_array(struct nk_context* nk,\n                             struct nk_color color,\n                             int count, unsigned short int* values)\n{\n    if (nk_chart_begin_colored(nk, NK_CHART_LINES,\n                               color, nk_rgb(255, 255, 255),\n                               count, 0, 65535))\n    {\n        int i;\n        for (i = 0;  i < count;  i++)\n        {\n            char buffer[1024];\n            if (nk_chart_push(nk, values[i]))\n            {\n                snprintf(buffer, sizeof(buffer), \"#%u: %u (%0.5f) \",\n                         i, values[i], values[i] / 65535.f);\n                nk_tooltip(nk, buffer);\n            }\n        }\n\n        nk_chart_end(nk);\n    }\n}\n\nint main(int argc, char** argv)\n{\n    GLFWmonitor* monitor = NULL;\n    GLFWwindow* window;\n    GLFWgammaramp orig_ramp;\n    struct nk_context* nk;\n    struct nk_font_atlas* atlas;\n    float gamma_value = 1.f;\n\n    glfwSetErrorCallback(error_callback);\n\n    if (!glfwInit())\n        exit(EXIT_FAILURE);\n\n    monitor = glfwGetPrimaryMonitor();\n\n    glfwWindowHint(GLFW_SCALE_TO_MONITOR, GLFW_TRUE);\n\n    window = glfwCreateWindow(800, 400, \"Gamma Test\", NULL, NULL);\n    if (!window)\n    {\n        glfwTerminate();\n        exit(EXIT_FAILURE);\n    }\n\n    {\n        const GLFWgammaramp* ramp = glfwGetGammaRamp(monitor);\n        const size_t array_size = ramp->size * sizeof(short);\n        orig_ramp.size = ramp->size;\n        orig_ramp.red = malloc(array_size);\n        orig_ramp.green = malloc(array_size);\n        orig_ramp.blue = malloc(array_size);\n        memcpy(orig_ramp.red, ramp->red, array_size);\n        memcpy(orig_ramp.green, ramp->green, array_size);\n        memcpy(orig_ramp.blue, ramp->blue, array_size);\n    }\n\n    glfwMakeContextCurrent(window);\n    gladLoadGL(glfwGetProcAddress);\n    glfwSwapInterval(1);\n\n    nk = nk_glfw3_init(window, NK_GLFW3_INSTALL_CALLBACKS);\n    nk_glfw3_font_stash_begin(&atlas);\n    nk_glfw3_font_stash_end();\n\n    glfwSetKeyCallback(window, key_callback);\n\n    while (!glfwWindowShouldClose(window))\n    {\n        int width, height;\n        struct nk_rect area;\n\n        glfwGetWindowSize(window, &width, &height);\n        area = nk_rect(0.f, 0.f, (float) width, (float) height);\n        nk_window_set_bounds(nk, \"\", area);\n\n        glClear(GL_COLOR_BUFFER_BIT);\n        nk_glfw3_new_frame();\n        if (nk_begin(nk, \"\", area, 0))\n        {\n            const GLFWgammaramp* ramp;\n\n            nk_layout_row_dynamic(nk, 30, 3);\n            if (nk_slider_float(nk, 0.1f, &gamma_value, 5.f, 0.1f))\n                glfwSetGamma(monitor, gamma_value);\n            nk_labelf(nk, NK_TEXT_LEFT, \"%0.1f\", gamma_value);\n            if (nk_button_label(nk, \"Revert\"))\n                glfwSetGammaRamp(monitor, &orig_ramp);\n\n            ramp = glfwGetGammaRamp(monitor);\n\n            nk_layout_row_dynamic(nk, height - 60.f, 3);\n            chart_ramp_array(nk, nk_rgb(255, 0, 0), ramp->size, ramp->red);\n            chart_ramp_array(nk, nk_rgb(0, 255, 0), ramp->size, ramp->green);\n            chart_ramp_array(nk, nk_rgb(0, 0, 255), ramp->size, ramp->blue);\n        }\n\n        nk_end(nk);\n        nk_glfw3_render(NK_ANTI_ALIASING_ON);\n\n        glfwSwapBuffers(window);\n        glfwWaitEventsTimeout(1.0);\n    }\n\n    free(orig_ramp.red);\n    free(orig_ramp.green);\n    free(orig_ramp.blue);\n\n    nk_glfw3_shutdown();\n    glfwTerminate();\n    exit(EXIT_SUCCESS);\n}\n\n"
  },
  {
    "path": "thirdparty/glfw/tests/glfwinfo.c",
    "content": "//========================================================================\n// Context creation and information tool\n// Copyright (c) Camilla Löwy <elmindreda@glfw.org>\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//    claim that you wrote the original software. If you use this software\n//    in a product, an acknowledgment in the product documentation would\n//    be appreciated but is not required.\n//\n// 2. Altered source versions must be plainly marked as such, and must not\n//    be misrepresented as being the original software.\n//\n// 3. This notice may not be removed or altered from any source\n//    distribution.\n//\n//========================================================================\n\n#include <glad/gl.h>\n#include <glad/vulkan.h>\n#define GLFW_INCLUDE_NONE\n#include <GLFW/glfw3.h>\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n\n#include \"getopt.h\"\n\n#ifdef _MSC_VER\n#define strcasecmp(x, y) _stricmp(x, y)\n#endif\n\n#define API_NAME_OPENGL     \"gl\"\n#define API_NAME_OPENGL_ES  \"es\"\n\n#define API_NAME_NATIVE     \"native\"\n#define API_NAME_EGL        \"egl\"\n#define API_NAME_OSMESA     \"osmesa\"\n\n#define PROFILE_NAME_CORE   \"core\"\n#define PROFILE_NAME_COMPAT \"compat\"\n\n#define STRATEGY_NAME_NONE  \"none\"\n#define STRATEGY_NAME_LOSE  \"lose\"\n\n#define BEHAVIOR_NAME_NONE  \"none\"\n#define BEHAVIOR_NAME_FLUSH \"flush\"\n\nstatic void usage(void)\n{\n    printf(\"Usage: glfwinfo [OPTION]...\\n\");\n    printf(\"Options:\\n\");\n    printf(\"  -a, --client-api=API      the client API to use (\"\n                                        API_NAME_OPENGL \" or \"\n                                        API_NAME_OPENGL_ES \")\\n\");\n    printf(\"  -b, --behavior=BEHAVIOR   the release behavior to use (\"\n                                        BEHAVIOR_NAME_NONE \" or \"\n                                        BEHAVIOR_NAME_FLUSH \")\\n\");\n    printf(\"  -c, --context-api=API     the context creation API to use (\"\n                                        API_NAME_NATIVE \" or \"\n                                        API_NAME_EGL \" or \"\n                                        API_NAME_OSMESA \")\\n\");\n    printf(\"  -d, --debug               request a debug context\\n\");\n    printf(\"  -f, --forward             require a forward-compatible context\\n\");\n    printf(\"  -h, --help                show this help\\n\");\n    printf(\"  -l, --list-extensions     list all Vulkan and client API extensions\\n\");\n    printf(\"      --list-layers         list all Vulkan layers\\n\");\n    printf(\"  -m, --major=MAJOR         the major number of the required \"\n                                        \"client API version\\n\");\n    printf(\"  -n, --minor=MINOR         the minor number of the required \"\n                                        \"client API version\\n\");\n    printf(\"  -p, --profile=PROFILE     the OpenGL profile to use (\"\n                                        PROFILE_NAME_CORE \" or \"\n                                        PROFILE_NAME_COMPAT \")\\n\");\n    printf(\"  -s, --robustness=STRATEGY the robustness strategy to use (\"\n                                        STRATEGY_NAME_NONE \" or \"\n                                        STRATEGY_NAME_LOSE \")\\n\");\n    printf(\"  -v, --version             print version information\\n\");\n    printf(\"      --red-bits=N          the number of red bits to request\\n\");\n    printf(\"      --green-bits=N        the number of green bits to request\\n\");\n    printf(\"      --blue-bits=N         the number of blue bits to request\\n\");\n    printf(\"      --alpha-bits=N        the number of alpha bits to request\\n\");\n    printf(\"      --depth-bits=N        the number of depth bits to request\\n\");\n    printf(\"      --stencil-bits=N      the number of stencil bits to request\\n\");\n    printf(\"      --accum-red-bits=N    the number of red bits to request\\n\");\n    printf(\"      --accum-green-bits=N  the number of green bits to request\\n\");\n    printf(\"      --accum-blue-bits=N   the number of blue bits to request\\n\");\n    printf(\"      --accum-alpha-bits=N  the number of alpha bits to request\\n\");\n    printf(\"      --aux-buffers=N       the number of aux buffers to request\\n\");\n    printf(\"      --samples=N           the number of MSAA samples to request\\n\");\n    printf(\"      --stereo              request stereo rendering\\n\");\n    printf(\"      --srgb                request an sRGB capable framebuffer\\n\");\n    printf(\"      --singlebuffer        request single-buffering\\n\");\n    printf(\"      --no-error            request a context that does not emit errors\\n\");\n    printf(\"      --graphics-switching  request macOS graphics switching\\n\");\n}\n\nstatic void error_callback(int error, const char* description)\n{\n    fprintf(stderr, \"Error: %s\\n\", description);\n}\n\nstatic const char* get_device_type_name(VkPhysicalDeviceType type)\n{\n    if (type == VK_PHYSICAL_DEVICE_TYPE_OTHER)\n        return \"other\";\n    else if (type == VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU)\n        return \"integrated GPU\";\n    else if (type == VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU)\n        return \"discrete GPU\";\n    else if (type == VK_PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU)\n        return \"virtual GPU\";\n    else if (type == VK_PHYSICAL_DEVICE_TYPE_CPU)\n        return \"CPU\";\n\n    return \"unknown\";\n}\n\nstatic const char* get_api_name(int api)\n{\n    if (api == GLFW_OPENGL_API)\n        return \"OpenGL\";\n    else if (api == GLFW_OPENGL_ES_API)\n        return \"OpenGL ES\";\n\n    return \"Unknown API\";\n}\n\nstatic const char* get_profile_name_gl(GLint mask)\n{\n    if (mask & GL_CONTEXT_COMPATIBILITY_PROFILE_BIT)\n        return PROFILE_NAME_COMPAT;\n    if (mask & GL_CONTEXT_CORE_PROFILE_BIT)\n        return PROFILE_NAME_CORE;\n\n    return \"unknown\";\n}\n\nstatic const char* get_profile_name_glfw(int profile)\n{\n    if (profile == GLFW_OPENGL_COMPAT_PROFILE)\n        return PROFILE_NAME_COMPAT;\n    if (profile == GLFW_OPENGL_CORE_PROFILE)\n        return PROFILE_NAME_CORE;\n\n    return \"unknown\";\n}\n\nstatic const char* get_strategy_name_gl(GLint strategy)\n{\n    if (strategy == GL_LOSE_CONTEXT_ON_RESET_ARB)\n        return STRATEGY_NAME_LOSE;\n    if (strategy == GL_NO_RESET_NOTIFICATION_ARB)\n        return STRATEGY_NAME_NONE;\n\n    return \"unknown\";\n}\n\nstatic const char* get_strategy_name_glfw(int strategy)\n{\n    if (strategy == GLFW_LOSE_CONTEXT_ON_RESET)\n        return STRATEGY_NAME_LOSE;\n    if (strategy == GLFW_NO_RESET_NOTIFICATION)\n        return STRATEGY_NAME_NONE;\n\n    return \"unknown\";\n}\n\nstatic void list_context_extensions(int client, int major, int minor)\n{\n    int i;\n    GLint count;\n    const GLubyte* extensions;\n\n    printf(\"%s context extensions:\\n\", get_api_name(client));\n\n    if (client == GLFW_OPENGL_API && major > 2)\n    {\n        glGetIntegerv(GL_NUM_EXTENSIONS, &count);\n\n        for (i = 0;  i < count;  i++)\n            printf(\" %s\\n\", (const char*) glGetStringi(GL_EXTENSIONS, i));\n    }\n    else\n    {\n        extensions = glGetString(GL_EXTENSIONS);\n        while (*extensions != '\\0')\n        {\n            putchar(' ');\n\n            while (*extensions != '\\0' && *extensions != ' ')\n            {\n                putchar(*extensions);\n                extensions++;\n            }\n\n            while (*extensions == ' ')\n                extensions++;\n\n            putchar('\\n');\n        }\n    }\n}\n\nstatic void list_vulkan_instance_extensions(void)\n{\n    uint32_t i, ep_count = 0;\n    VkExtensionProperties* ep;\n\n    printf(\"Vulkan instance extensions:\\n\");\n\n    if (vkEnumerateInstanceExtensionProperties(NULL, &ep_count, NULL) != VK_SUCCESS)\n        return;\n\n    ep = calloc(ep_count, sizeof(VkExtensionProperties));\n\n    if (vkEnumerateInstanceExtensionProperties(NULL, &ep_count, ep) != VK_SUCCESS)\n    {\n        free(ep);\n        return;\n    }\n\n    for (i = 0;  i < ep_count;  i++)\n        printf(\" %s (v%u)\\n\", ep[i].extensionName, ep[i].specVersion);\n\n    free(ep);\n}\n\nstatic void list_vulkan_instance_layers(void)\n{\n    uint32_t i, lp_count = 0;\n    VkLayerProperties* lp;\n\n    printf(\"Vulkan instance layers:\\n\");\n\n    if (vkEnumerateInstanceLayerProperties(&lp_count, NULL) != VK_SUCCESS)\n        return;\n\n    lp = calloc(lp_count, sizeof(VkLayerProperties));\n\n    if (vkEnumerateInstanceLayerProperties(&lp_count, lp) != VK_SUCCESS)\n    {\n        free(lp);\n        return;\n    }\n\n    for (i = 0;  i < lp_count;  i++)\n    {\n        printf(\" %s (v%u) \\\"%s\\\"\\n\",\n               lp[i].layerName,\n               lp[i].specVersion >> 22,\n               lp[i].description);\n    }\n\n    free(lp);\n}\n\nstatic void list_vulkan_device_extensions(VkInstance instance, VkPhysicalDevice device)\n{\n    uint32_t i, ep_count;\n    VkExtensionProperties* ep;\n\n    printf(\"Vulkan device extensions:\\n\");\n\n    if (vkEnumerateDeviceExtensionProperties(device, NULL, &ep_count, NULL) != VK_SUCCESS)\n        return;\n\n    ep = calloc(ep_count, sizeof(VkExtensionProperties));\n\n    if (vkEnumerateDeviceExtensionProperties(device, NULL, &ep_count, ep) != VK_SUCCESS)\n    {\n        free(ep);\n        return;\n    }\n\n    for (i = 0;  i < ep_count;  i++)\n        printf(\" %s (v%u)\\n\", ep[i].extensionName, ep[i].specVersion);\n\n    free(ep);\n}\n\nstatic void list_vulkan_device_layers(VkInstance instance, VkPhysicalDevice device)\n{\n    uint32_t i, lp_count;\n    VkLayerProperties* lp;\n\n    printf(\"Vulkan device layers:\\n\");\n\n    if (vkEnumerateDeviceLayerProperties(device, &lp_count, NULL) != VK_SUCCESS)\n        return;\n\n    lp = calloc(lp_count, sizeof(VkLayerProperties));\n\n    if (vkEnumerateDeviceLayerProperties(device, &lp_count, lp) != VK_SUCCESS)\n    {\n        free(lp);\n        return;\n    }\n\n    for (i = 0;  i < lp_count;  i++)\n    {\n        printf(\" %s (v%u) \\\"%s\\\"\\n\",\n               lp[i].layerName,\n               lp[i].specVersion >> 22,\n               lp[i].description);\n    }\n\n    free(lp);\n}\n\nstatic int valid_version(void)\n{\n    int major, minor, revision;\n    glfwGetVersion(&major, &minor, &revision);\n\n    if (major != GLFW_VERSION_MAJOR)\n    {\n        printf(\"*** ERROR: GLFW major version mismatch! ***\\n\");\n        return GLFW_FALSE;\n    }\n\n    if (minor != GLFW_VERSION_MINOR || revision != GLFW_VERSION_REVISION)\n        printf(\"*** WARNING: GLFW version mismatch! ***\\n\");\n\n    return GLFW_TRUE;\n}\n\nstatic void print_version(void)\n{\n    int major, minor, revision;\n    glfwGetVersion(&major, &minor, &revision);\n\n    printf(\"GLFW header version: %u.%u.%u\\n\",\n           GLFW_VERSION_MAJOR,\n           GLFW_VERSION_MINOR,\n           GLFW_VERSION_REVISION);\n    printf(\"GLFW library version: %u.%u.%u\\n\", major, minor, revision);\n    printf(\"GLFW library version string: \\\"%s\\\"\\n\", glfwGetVersionString());\n}\n\nstatic GLADapiproc glad_vulkan_callback(const char* name, void* user)\n{\n    return glfwGetInstanceProcAddress((VkInstance) user, name);\n}\n\nint main(int argc, char** argv)\n{\n    int ch, client, major, minor, revision, profile;\n    GLint redbits, greenbits, bluebits, alphabits, depthbits, stencilbits;\n    int list_extensions = GLFW_FALSE, list_layers = GLFW_FALSE;\n    GLenum error;\n    GLFWwindow* window;\n\n    enum { CLIENT, CONTEXT, BEHAVIOR, DEBUG_CONTEXT, FORWARD, HELP,\n           EXTENSIONS, LAYERS,\n           MAJOR, MINOR, PROFILE, ROBUSTNESS, VERSION,\n           REDBITS, GREENBITS, BLUEBITS, ALPHABITS, DEPTHBITS, STENCILBITS,\n           ACCUMREDBITS, ACCUMGREENBITS, ACCUMBLUEBITS, ACCUMALPHABITS,\n           AUXBUFFERS, SAMPLES, STEREO, SRGB, SINGLEBUFFER, NOERROR_SRSLY,\n           GRAPHICS_SWITCHING };\n    const struct option options[] =\n    {\n        { \"behavior\",           1, NULL, BEHAVIOR },\n        { \"client-api\",         1, NULL, CLIENT },\n        { \"context-api\",        1, NULL, CONTEXT },\n        { \"debug\",              0, NULL, DEBUG_CONTEXT },\n        { \"forward\",            0, NULL, FORWARD },\n        { \"help\",               0, NULL, HELP },\n        { \"list-extensions\",    0, NULL, EXTENSIONS },\n        { \"list-layers\",        0, NULL, LAYERS },\n        { \"major\",              1, NULL, MAJOR },\n        { \"minor\",              1, NULL, MINOR },\n        { \"profile\",            1, NULL, PROFILE },\n        { \"robustness\",         1, NULL, ROBUSTNESS },\n        { \"version\",            0, NULL, VERSION },\n        { \"red-bits\",           1, NULL, REDBITS },\n        { \"green-bits\",         1, NULL, GREENBITS },\n        { \"blue-bits\",          1, NULL, BLUEBITS },\n        { \"alpha-bits\",         1, NULL, ALPHABITS },\n        { \"depth-bits\",         1, NULL, DEPTHBITS },\n        { \"stencil-bits\",       1, NULL, STENCILBITS },\n        { \"accum-red-bits\",     1, NULL, ACCUMREDBITS },\n        { \"accum-green-bits\",   1, NULL, ACCUMGREENBITS },\n        { \"accum-blue-bits\",    1, NULL, ACCUMBLUEBITS },\n        { \"accum-alpha-bits\",   1, NULL, ACCUMALPHABITS },\n        { \"aux-buffers\",        1, NULL, AUXBUFFERS },\n        { \"samples\",            1, NULL, SAMPLES },\n        { \"stereo\",             0, NULL, STEREO },\n        { \"srgb\",               0, NULL, SRGB },\n        { \"singlebuffer\",       0, NULL, SINGLEBUFFER },\n        { \"no-error\",           0, NULL, NOERROR_SRSLY },\n        { \"graphics-switching\", 0, NULL, GRAPHICS_SWITCHING },\n        { NULL, 0, NULL, 0 }\n    };\n\n    // Initialize GLFW and create window\n\n    if (!valid_version())\n        exit(EXIT_FAILURE);\n\n    glfwSetErrorCallback(error_callback);\n\n    glfwInitHint(GLFW_COCOA_MENUBAR, GLFW_FALSE);\n\n    if (!glfwInit())\n        exit(EXIT_FAILURE);\n\n    while ((ch = getopt_long(argc, argv, \"a:b:c:dfhlm:n:p:s:v\", options, NULL)) != -1)\n    {\n        switch (ch)\n        {\n            case 'a':\n            case CLIENT:\n                if (strcasecmp(optarg, API_NAME_OPENGL) == 0)\n                    glfwWindowHint(GLFW_CLIENT_API, GLFW_OPENGL_API);\n                else if (strcasecmp(optarg, API_NAME_OPENGL_ES) == 0)\n                    glfwWindowHint(GLFW_CLIENT_API, GLFW_OPENGL_ES_API);\n                else\n                {\n                    usage();\n                    exit(EXIT_FAILURE);\n                }\n                break;\n            case 'b':\n            case BEHAVIOR:\n                if (strcasecmp(optarg, BEHAVIOR_NAME_NONE) == 0)\n                {\n                    glfwWindowHint(GLFW_CONTEXT_RELEASE_BEHAVIOR,\n                                   GLFW_RELEASE_BEHAVIOR_NONE);\n                }\n                else if (strcasecmp(optarg, BEHAVIOR_NAME_FLUSH) == 0)\n                {\n                    glfwWindowHint(GLFW_CONTEXT_RELEASE_BEHAVIOR,\n                                   GLFW_RELEASE_BEHAVIOR_FLUSH);\n                }\n                else\n                {\n                    usage();\n                    exit(EXIT_FAILURE);\n                }\n                break;\n            case 'c':\n            case CONTEXT:\n                if (strcasecmp(optarg, API_NAME_NATIVE) == 0)\n                    glfwWindowHint(GLFW_CONTEXT_CREATION_API, GLFW_NATIVE_CONTEXT_API);\n                else if (strcasecmp(optarg, API_NAME_EGL) == 0)\n                    glfwWindowHint(GLFW_CONTEXT_CREATION_API, GLFW_EGL_CONTEXT_API);\n                else if (strcasecmp(optarg, API_NAME_OSMESA) == 0)\n                    glfwWindowHint(GLFW_CONTEXT_CREATION_API, GLFW_OSMESA_CONTEXT_API);\n                else\n                {\n                    usage();\n                    exit(EXIT_FAILURE);\n                }\n                break;\n            case 'd':\n            case DEBUG_CONTEXT:\n                glfwWindowHint(GLFW_OPENGL_DEBUG_CONTEXT, GLFW_TRUE);\n                break;\n            case 'f':\n            case FORWARD:\n                glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GLFW_TRUE);\n                break;\n            case 'h':\n            case HELP:\n                usage();\n                exit(EXIT_SUCCESS);\n            case 'l':\n            case EXTENSIONS:\n                list_extensions = GLFW_TRUE;\n                break;\n            case LAYERS:\n                list_layers = GLFW_TRUE;\n                break;\n            case 'm':\n            case MAJOR:\n                glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, atoi(optarg));\n                break;\n            case 'n':\n            case MINOR:\n                glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, atoi(optarg));\n                break;\n            case 'p':\n            case PROFILE:\n                if (strcasecmp(optarg, PROFILE_NAME_CORE) == 0)\n                {\n                    glfwWindowHint(GLFW_OPENGL_PROFILE,\n                                   GLFW_OPENGL_CORE_PROFILE);\n                }\n                else if (strcasecmp(optarg, PROFILE_NAME_COMPAT) == 0)\n                {\n                    glfwWindowHint(GLFW_OPENGL_PROFILE,\n                                   GLFW_OPENGL_COMPAT_PROFILE);\n                }\n                else\n                {\n                    usage();\n                    exit(EXIT_FAILURE);\n                }\n                break;\n            case 's':\n            case ROBUSTNESS:\n                if (strcasecmp(optarg, STRATEGY_NAME_NONE) == 0)\n                {\n                    glfwWindowHint(GLFW_CONTEXT_ROBUSTNESS,\n                                   GLFW_NO_RESET_NOTIFICATION);\n                }\n                else if (strcasecmp(optarg, STRATEGY_NAME_LOSE) == 0)\n                {\n                    glfwWindowHint(GLFW_CONTEXT_ROBUSTNESS,\n                                   GLFW_LOSE_CONTEXT_ON_RESET);\n                }\n                else\n                {\n                    usage();\n                    exit(EXIT_FAILURE);\n                }\n                break;\n            case 'v':\n            case VERSION:\n                print_version();\n                exit(EXIT_SUCCESS);\n            case REDBITS:\n                if (strcmp(optarg, \"-\") == 0)\n                    glfwWindowHint(GLFW_RED_BITS, GLFW_DONT_CARE);\n                else\n                    glfwWindowHint(GLFW_RED_BITS, atoi(optarg));\n                break;\n            case GREENBITS:\n                if (strcmp(optarg, \"-\") == 0)\n                    glfwWindowHint(GLFW_GREEN_BITS, GLFW_DONT_CARE);\n                else\n                    glfwWindowHint(GLFW_GREEN_BITS, atoi(optarg));\n                break;\n            case BLUEBITS:\n                if (strcmp(optarg, \"-\") == 0)\n                    glfwWindowHint(GLFW_BLUE_BITS, GLFW_DONT_CARE);\n                else\n                    glfwWindowHint(GLFW_BLUE_BITS, atoi(optarg));\n                break;\n            case ALPHABITS:\n                if (strcmp(optarg, \"-\") == 0)\n                    glfwWindowHint(GLFW_ALPHA_BITS, GLFW_DONT_CARE);\n                else\n                    glfwWindowHint(GLFW_ALPHA_BITS, atoi(optarg));\n                break;\n            case DEPTHBITS:\n                if (strcmp(optarg, \"-\") == 0)\n                    glfwWindowHint(GLFW_DEPTH_BITS, GLFW_DONT_CARE);\n                else\n                    glfwWindowHint(GLFW_DEPTH_BITS, atoi(optarg));\n                break;\n            case STENCILBITS:\n                if (strcmp(optarg, \"-\") == 0)\n                    glfwWindowHint(GLFW_STENCIL_BITS, GLFW_DONT_CARE);\n                else\n                    glfwWindowHint(GLFW_STENCIL_BITS, atoi(optarg));\n                break;\n            case ACCUMREDBITS:\n                if (strcmp(optarg, \"-\") == 0)\n                    glfwWindowHint(GLFW_ACCUM_RED_BITS, GLFW_DONT_CARE);\n                else\n                    glfwWindowHint(GLFW_ACCUM_RED_BITS, atoi(optarg));\n                break;\n            case ACCUMGREENBITS:\n                if (strcmp(optarg, \"-\") == 0)\n                    glfwWindowHint(GLFW_ACCUM_GREEN_BITS, GLFW_DONT_CARE);\n                else\n                    glfwWindowHint(GLFW_ACCUM_GREEN_BITS, atoi(optarg));\n                break;\n            case ACCUMBLUEBITS:\n                if (strcmp(optarg, \"-\") == 0)\n                    glfwWindowHint(GLFW_ACCUM_BLUE_BITS, GLFW_DONT_CARE);\n                else\n                    glfwWindowHint(GLFW_ACCUM_BLUE_BITS, atoi(optarg));\n                break;\n            case ACCUMALPHABITS:\n                if (strcmp(optarg, \"-\") == 0)\n                    glfwWindowHint(GLFW_ACCUM_ALPHA_BITS, GLFW_DONT_CARE);\n                else\n                    glfwWindowHint(GLFW_ACCUM_ALPHA_BITS, atoi(optarg));\n                break;\n            case AUXBUFFERS:\n                if (strcmp(optarg, \"-\") == 0)\n                    glfwWindowHint(GLFW_AUX_BUFFERS, GLFW_DONT_CARE);\n                else\n                    glfwWindowHint(GLFW_AUX_BUFFERS, atoi(optarg));\n                break;\n            case SAMPLES:\n                if (strcmp(optarg, \"-\") == 0)\n                    glfwWindowHint(GLFW_SAMPLES, GLFW_DONT_CARE);\n                else\n                    glfwWindowHint(GLFW_SAMPLES, atoi(optarg));\n                break;\n            case STEREO:\n                glfwWindowHint(GLFW_STEREO, GLFW_TRUE);\n                break;\n            case SRGB:\n                glfwWindowHint(GLFW_SRGB_CAPABLE, GLFW_TRUE);\n                break;\n            case SINGLEBUFFER:\n                glfwWindowHint(GLFW_DOUBLEBUFFER, GLFW_FALSE);\n                break;\n            case NOERROR_SRSLY:\n                glfwWindowHint(GLFW_CONTEXT_NO_ERROR, GLFW_TRUE);\n                break;\n            case GRAPHICS_SWITCHING:\n                glfwWindowHint(GLFW_COCOA_GRAPHICS_SWITCHING, GLFW_TRUE);\n                break;\n            default:\n                usage();\n                exit(EXIT_FAILURE);\n        }\n    }\n\n    print_version();\n\n    glfwWindowHint(GLFW_VISIBLE, GLFW_FALSE);\n\n    window = glfwCreateWindow(200, 200, \"Version\", NULL, NULL);\n    if (!window)\n    {\n        glfwTerminate();\n        exit(EXIT_FAILURE);\n    }\n\n    glfwMakeContextCurrent(window);\n    gladLoadGL(glfwGetProcAddress);\n\n    error = glGetError();\n    if (error != GL_NO_ERROR)\n        printf(\"*** OpenGL error after make current: 0x%08x ***\\n\", error);\n\n    // Report client API version\n\n    client = glfwGetWindowAttrib(window, GLFW_CLIENT_API);\n    major = glfwGetWindowAttrib(window, GLFW_CONTEXT_VERSION_MAJOR);\n    minor = glfwGetWindowAttrib(window, GLFW_CONTEXT_VERSION_MINOR);\n    revision = glfwGetWindowAttrib(window, GLFW_CONTEXT_REVISION);\n    profile = glfwGetWindowAttrib(window, GLFW_OPENGL_PROFILE);\n\n    printf(\"%s context version string: \\\"%s\\\"\\n\",\n           get_api_name(client),\n           glGetString(GL_VERSION));\n\n    printf(\"%s context version parsed by GLFW: %u.%u.%u\\n\",\n           get_api_name(client),\n           major, minor, revision);\n\n    // Report client API context properties\n\n    if (client == GLFW_OPENGL_API)\n    {\n        if (major >= 3)\n        {\n            GLint flags;\n\n            glGetIntegerv(GL_CONTEXT_FLAGS, &flags);\n            printf(\"%s context flags (0x%08x):\", get_api_name(client), flags);\n\n            if (flags & GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT)\n                printf(\" forward-compatible\");\n            if (flags & 2/*GL_CONTEXT_FLAG_DEBUG_BIT*/)\n                printf(\" debug\");\n            if (flags & GL_CONTEXT_FLAG_ROBUST_ACCESS_BIT_ARB)\n                printf(\" robustness\");\n            if (flags & 8/*GL_CONTEXT_FLAG_NO_ERROR_BIT_KHR*/)\n                printf(\" no-error\");\n            putchar('\\n');\n\n            printf(\"%s context flags parsed by GLFW:\", get_api_name(client));\n\n            if (glfwGetWindowAttrib(window, GLFW_OPENGL_FORWARD_COMPAT))\n                printf(\" forward-compatible\");\n            if (glfwGetWindowAttrib(window, GLFW_OPENGL_DEBUG_CONTEXT))\n                printf(\" debug\");\n            if (glfwGetWindowAttrib(window, GLFW_CONTEXT_ROBUSTNESS) == GLFW_LOSE_CONTEXT_ON_RESET)\n                printf(\" robustness\");\n            if (glfwGetWindowAttrib(window, GLFW_CONTEXT_NO_ERROR))\n                printf(\" no-error\");\n            putchar('\\n');\n        }\n\n        if (major >= 4 || (major == 3 && minor >= 2))\n        {\n            GLint mask;\n            glGetIntegerv(GL_CONTEXT_PROFILE_MASK, &mask);\n\n            printf(\"%s profile mask (0x%08x): %s\\n\",\n                   get_api_name(client),\n                   mask,\n                   get_profile_name_gl(mask));\n\n            printf(\"%s profile mask parsed by GLFW: %s\\n\",\n                   get_api_name(client),\n                   get_profile_name_glfw(profile));\n        }\n\n        if (GLAD_GL_ARB_robustness)\n        {\n            const int robustness = glfwGetWindowAttrib(window, GLFW_CONTEXT_ROBUSTNESS);\n            GLint strategy;\n            glGetIntegerv(GL_RESET_NOTIFICATION_STRATEGY_ARB, &strategy);\n\n            printf(\"%s robustness strategy (0x%08x): %s\\n\",\n                   get_api_name(client),\n                   strategy,\n                   get_strategy_name_gl(strategy));\n\n            printf(\"%s robustness strategy parsed by GLFW: %s\\n\",\n                   get_api_name(client),\n                   get_strategy_name_glfw(robustness));\n        }\n    }\n\n    printf(\"%s context renderer string: \\\"%s\\\"\\n\",\n           get_api_name(client),\n           glGetString(GL_RENDERER));\n    printf(\"%s context vendor string: \\\"%s\\\"\\n\",\n           get_api_name(client),\n           glGetString(GL_VENDOR));\n\n    if (major >= 2)\n    {\n        printf(\"%s context shading language version: \\\"%s\\\"\\n\",\n               get_api_name(client),\n               glGetString(GL_SHADING_LANGUAGE_VERSION));\n    }\n\n    printf(\"%s framebuffer:\\n\", get_api_name(client));\n\n    if (client == GLFW_OPENGL_API && profile == GLFW_OPENGL_CORE_PROFILE)\n    {\n        glGetFramebufferAttachmentParameteriv(GL_FRAMEBUFFER,\n                                              GL_BACK_LEFT,\n                                              GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE,\n                                              &redbits);\n        glGetFramebufferAttachmentParameteriv(GL_FRAMEBUFFER,\n                                              GL_BACK_LEFT,\n                                              GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE,\n                                              &greenbits);\n        glGetFramebufferAttachmentParameteriv(GL_FRAMEBUFFER,\n                                              GL_BACK_LEFT,\n                                              GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE,\n                                              &bluebits);\n        glGetFramebufferAttachmentParameteriv(GL_FRAMEBUFFER,\n                                              GL_BACK_LEFT,\n                                              GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE,\n                                              &alphabits);\n        glGetFramebufferAttachmentParameteriv(GL_FRAMEBUFFER,\n                                              GL_DEPTH,\n                                              GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE,\n                                              &depthbits);\n        glGetFramebufferAttachmentParameteriv(GL_FRAMEBUFFER,\n                                              GL_STENCIL,\n                                              GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE,\n                                              &stencilbits);\n    }\n    else\n    {\n        glGetIntegerv(GL_RED_BITS, &redbits);\n        glGetIntegerv(GL_GREEN_BITS, &greenbits);\n        glGetIntegerv(GL_BLUE_BITS, &bluebits);\n        glGetIntegerv(GL_ALPHA_BITS, &alphabits);\n        glGetIntegerv(GL_DEPTH_BITS, &depthbits);\n        glGetIntegerv(GL_STENCIL_BITS, &stencilbits);\n    }\n\n    printf(\" red: %u green: %u blue: %u alpha: %u depth: %u stencil: %u\\n\",\n           redbits, greenbits, bluebits, alphabits, depthbits, stencilbits);\n\n    if (client == GLFW_OPENGL_ES_API ||\n        GLAD_GL_ARB_multisample ||\n        major > 1 || minor >= 3)\n    {\n        GLint samples, samplebuffers;\n        glGetIntegerv(GL_SAMPLES, &samples);\n        glGetIntegerv(GL_SAMPLE_BUFFERS, &samplebuffers);\n\n        printf(\" samples: %u sample buffers: %u\\n\", samples, samplebuffers);\n    }\n\n    if (client == GLFW_OPENGL_API && profile != GLFW_OPENGL_CORE_PROFILE)\n    {\n        GLint accumredbits, accumgreenbits, accumbluebits, accumalphabits;\n        GLint auxbuffers;\n\n        glGetIntegerv(GL_ACCUM_RED_BITS, &accumredbits);\n        glGetIntegerv(GL_ACCUM_GREEN_BITS, &accumgreenbits);\n        glGetIntegerv(GL_ACCUM_BLUE_BITS, &accumbluebits);\n        glGetIntegerv(GL_ACCUM_ALPHA_BITS, &accumalphabits);\n        glGetIntegerv(GL_AUX_BUFFERS, &auxbuffers);\n\n        printf(\" accum red: %u accum green: %u accum blue: %u accum alpha: %u aux buffers: %u\\n\",\n               accumredbits, accumgreenbits, accumbluebits, accumalphabits, auxbuffers);\n    }\n\n    if (list_extensions)\n        list_context_extensions(client, major, minor);\n\n    printf(\"Vulkan loader: %s\\n\",\n           glfwVulkanSupported() ? \"available\" : \"missing\");\n\n    if (glfwVulkanSupported())\n    {\n        uint32_t loader_version = VK_API_VERSION_1_0;\n        uint32_t i, re_count, pd_count;\n        const char** re;\n        VkApplicationInfo ai = {0};\n        VkInstanceCreateInfo ici = {0};\n        VkInstance instance;\n        VkPhysicalDevice* pd;\n\n        gladLoadVulkanUserPtr(NULL, glad_vulkan_callback, NULL);\n\n        if (vkEnumerateInstanceVersion)\n        {\n            uint32_t version;\n            if (vkEnumerateInstanceVersion(&version) == VK_SUCCESS)\n                loader_version = version;\n        }\n\n        printf(\"Vulkan loader API version: %i.%i\\n\",\n               VK_VERSION_MAJOR(loader_version),\n               VK_VERSION_MINOR(loader_version));\n\n        re = glfwGetRequiredInstanceExtensions(&re_count);\n\n        printf(\"Vulkan required instance extensions:\");\n        if (re)\n        {\n            for (i = 0;  i < re_count;  i++)\n                printf(\" %s\", re[i]);\n            putchar('\\n');\n        }\n        else\n            printf(\" missing\\n\");\n\n        if (list_extensions)\n            list_vulkan_instance_extensions();\n\n        if (list_layers)\n            list_vulkan_instance_layers();\n\n        ai.sType = VK_STRUCTURE_TYPE_APPLICATION_INFO;\n        ai.pApplicationName = \"glfwinfo\";\n        ai.applicationVersion = VK_MAKE_VERSION(GLFW_VERSION_MAJOR,\n                                                GLFW_VERSION_MINOR,\n                                                GLFW_VERSION_REVISION);\n\n        if (loader_version >= VK_API_VERSION_1_1)\n            ai.apiVersion = VK_API_VERSION_1_1;\n        else\n            ai.apiVersion = VK_API_VERSION_1_0;\n\n        ici.sType = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO;\n        ici.pApplicationInfo = &ai;\n        ici.enabledExtensionCount = re_count;\n        ici.ppEnabledExtensionNames = re;\n\n        if (vkCreateInstance(&ici, NULL, &instance) != VK_SUCCESS)\n        {\n            glfwTerminate();\n            exit(EXIT_FAILURE);\n        }\n\n        gladLoadVulkanUserPtr(NULL, glad_vulkan_callback, instance);\n\n        if (vkEnumeratePhysicalDevices(instance, &pd_count, NULL) != VK_SUCCESS)\n        {\n            vkDestroyInstance(instance, NULL);\n            glfwTerminate();\n            exit(EXIT_FAILURE);\n        }\n\n        pd = calloc(pd_count, sizeof(VkPhysicalDevice));\n\n        if (vkEnumeratePhysicalDevices(instance, &pd_count, pd) != VK_SUCCESS)\n        {\n            free(pd);\n            vkDestroyInstance(instance, NULL);\n            glfwTerminate();\n            exit(EXIT_FAILURE);\n        }\n\n        for (i = 0;  i < pd_count;  i++)\n        {\n            VkPhysicalDeviceProperties pdp;\n\n            vkGetPhysicalDeviceProperties(pd[i], &pdp);\n\n            printf(\"Vulkan %s device: \\\"%s\\\" API version %i.%i\\n\",\n                   get_device_type_name(pdp.deviceType),\n                   pdp.deviceName,\n                   VK_VERSION_MAJOR(pdp.apiVersion),\n                   VK_VERSION_MINOR(pdp.apiVersion));\n\n            if (list_extensions)\n                list_vulkan_device_extensions(instance, pd[i]);\n\n            if (list_layers)\n                list_vulkan_device_layers(instance, pd[i]);\n        }\n\n        free(pd);\n        vkDestroyInstance(instance, NULL);\n    }\n\n    glfwTerminate();\n    exit(EXIT_SUCCESS);\n}\n\n"
  },
  {
    "path": "thirdparty/glfw/tests/icon.c",
    "content": "//========================================================================\n// Window icon test program\n// Copyright (c) Camilla Löwy <elmindreda@glfw.org>\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//    claim that you wrote the original software. If you use this software\n//    in a product, an acknowledgment in the product documentation would\n//    be appreciated but is not required.\n//\n// 2. Altered source versions must be plainly marked as such, and must not\n//    be misrepresented as being the original software.\n//\n// 3. This notice may not be removed or altered from any source\n//    distribution.\n//\n//========================================================================\n//\n// This program is used to test the icon feature.\n//\n//========================================================================\n\n#include <glad/gl.h>\n#define GLFW_INCLUDE_NONE\n#include <GLFW/glfw3.h>\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n\n// a simple glfw logo\nconst char* const logo[] =\n{\n    \"................\",\n    \"................\",\n    \"...0000..0......\",\n    \"...0.....0......\",\n    \"...0.00..0......\",\n    \"...0..0..0......\",\n    \"...0000..0000...\",\n    \"................\",\n    \"................\",\n    \"...000..0...0...\",\n    \"...0....0...0...\",\n    \"...000..0.0.0...\",\n    \"...0....0.0.0...\",\n    \"...0....00000...\",\n    \"................\",\n    \"................\"\n};\n\nconst unsigned char icon_colors[5][4] =\n{\n    {   0,   0,   0, 255 }, // black\n    { 255,   0,   0, 255 }, // red\n    {   0, 255,   0, 255 }, // green\n    {   0,   0, 255, 255 }, // blue\n    { 255, 255, 255, 255 }  // white\n};\n\nstatic int cur_icon_color = 0;\n\nstatic void set_icon(GLFWwindow* window, int icon_color)\n{\n    int x, y;\n    unsigned char pixels[16 * 16 * 4];\n    unsigned char* target = pixels;\n    GLFWimage img = { 16, 16, pixels };\n\n    for (y = 0;  y < img.width;  y++)\n    {\n        for (x = 0;  x < img.height;  x++)\n        {\n            if (logo[y][x] == '0')\n                memcpy(target, icon_colors[icon_color], 4);\n            else\n                memset(target, 0, 4);\n\n            target += 4;\n        }\n    }\n\n    glfwSetWindowIcon(window, 1, &img);\n}\n\nstatic void key_callback(GLFWwindow* window, int key, int scancode, int action, int mods)\n{\n    if (action != GLFW_PRESS)\n        return;\n\n    switch (key)\n    {\n        case GLFW_KEY_ESCAPE:\n            glfwSetWindowShouldClose(window, GLFW_TRUE);\n            break;\n        case GLFW_KEY_SPACE:\n            cur_icon_color = (cur_icon_color + 1) % 5;\n            set_icon(window, cur_icon_color);\n            break;\n        case GLFW_KEY_X:\n            glfwSetWindowIcon(window, 0, NULL);\n            break;\n    }\n}\n\nint main(int argc, char** argv)\n{\n    GLFWwindow* window;\n\n    if (!glfwInit())\n    {\n        fprintf(stderr, \"Failed to initialize GLFW\\n\");\n        exit(EXIT_FAILURE);\n    }\n\n    window = glfwCreateWindow(200, 200, \"Window Icon\", NULL, NULL);\n    if (!window)\n    {\n        glfwTerminate();\n\n        fprintf(stderr, \"Failed to open GLFW window\\n\");\n        exit(EXIT_FAILURE);\n    }\n\n    glfwMakeContextCurrent(window);\n    gladLoadGL(glfwGetProcAddress);\n\n    glfwSetKeyCallback(window, key_callback);\n    set_icon(window, cur_icon_color);\n\n    while (!glfwWindowShouldClose(window))\n    {\n        glClear(GL_COLOR_BUFFER_BIT);\n        glfwSwapBuffers(window);\n        glfwWaitEvents();\n    }\n\n    glfwDestroyWindow(window);\n    glfwTerminate();\n    exit(EXIT_SUCCESS);\n}\n\n"
  },
  {
    "path": "thirdparty/glfw/tests/iconify.c",
    "content": "//========================================================================\n// Iconify/restore test program\n// Copyright (c) Camilla Löwy <elmindreda@glfw.org>\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//    claim that you wrote the original software. If you use this software\n//    in a product, an acknowledgment in the product documentation would\n//    be appreciated but is not required.\n//\n// 2. Altered source versions must be plainly marked as such, and must not\n//    be misrepresented as being the original software.\n//\n// 3. This notice may not be removed or altered from any source\n//    distribution.\n//\n//========================================================================\n//\n// This program is used to test the iconify/restore functionality for\n// both full screen and windowed mode windows\n//\n//========================================================================\n\n#include <glad/gl.h>\n#define GLFW_INCLUDE_NONE\n#include <GLFW/glfw3.h>\n\n#include <stdio.h>\n#include <stdlib.h>\n\n#include \"getopt.h\"\n\nstatic int windowed_xpos, windowed_ypos, windowed_width, windowed_height;\n\nstatic void usage(void)\n{\n    printf(\"Usage: iconify [-h] [-f [-a] [-n]]\\n\");\n    printf(\"Options:\\n\");\n    printf(\"  -a create windows for all monitors\\n\");\n    printf(\"  -f create full screen window(s)\\n\");\n    printf(\"  -h show this help\\n\");\n}\n\nstatic void error_callback(int error, const char* description)\n{\n    fprintf(stderr, \"Error: %s\\n\", description);\n}\n\nstatic void key_callback(GLFWwindow* window, int key, int scancode, int action, int mods)\n{\n    printf(\"%0.2f Key %s\\n\",\n           glfwGetTime(),\n           action == GLFW_PRESS ? \"pressed\" : \"released\");\n\n    if (action != GLFW_PRESS)\n        return;\n\n    switch (key)\n    {\n        case GLFW_KEY_I:\n            glfwIconifyWindow(window);\n            break;\n        case GLFW_KEY_M:\n            glfwMaximizeWindow(window);\n            break;\n        case GLFW_KEY_R:\n            glfwRestoreWindow(window);\n            break;\n        case GLFW_KEY_ESCAPE:\n            glfwSetWindowShouldClose(window, GLFW_TRUE);\n            break;\n        case GLFW_KEY_A:\n            glfwSetWindowAttrib(window, GLFW_AUTO_ICONIFY, !glfwGetWindowAttrib(window, GLFW_AUTO_ICONIFY));\n            break;\n        case GLFW_KEY_B:\n            glfwSetWindowAttrib(window, GLFW_RESIZABLE, !glfwGetWindowAttrib(window, GLFW_RESIZABLE));\n            break;\n        case GLFW_KEY_D:\n            glfwSetWindowAttrib(window, GLFW_DECORATED, !glfwGetWindowAttrib(window, GLFW_DECORATED));\n            break;\n        case GLFW_KEY_F:\n            glfwSetWindowAttrib(window, GLFW_FLOATING, !glfwGetWindowAttrib(window, GLFW_FLOATING));\n            break;\n        case GLFW_KEY_F11:\n        case GLFW_KEY_ENTER:\n        {\n            if (mods != GLFW_MOD_ALT)\n                return;\n\n            if (glfwGetWindowMonitor(window))\n            {\n                glfwSetWindowMonitor(window, NULL,\n                                     windowed_xpos, windowed_ypos,\n                                     windowed_width, windowed_height,\n                                     0);\n            }\n            else\n            {\n                GLFWmonitor* monitor = glfwGetPrimaryMonitor();\n                if (monitor)\n                {\n                    const GLFWvidmode* mode = glfwGetVideoMode(monitor);\n                    glfwGetWindowPos(window, &windowed_xpos, &windowed_ypos);\n                    glfwGetWindowSize(window, &windowed_width, &windowed_height);\n                    glfwSetWindowMonitor(window, monitor,\n                                         0, 0, mode->width, mode->height,\n                                         mode->refreshRate);\n                }\n            }\n\n            break;\n        }\n    }\n}\n\nstatic void window_size_callback(GLFWwindow* window, int width, int height)\n{\n    printf(\"%0.2f Window resized to %ix%i\\n\", glfwGetTime(), width, height);\n}\n\nstatic void framebuffer_size_callback(GLFWwindow* window, int width, int height)\n{\n    printf(\"%0.2f Framebuffer resized to %ix%i\\n\", glfwGetTime(), width, height);\n}\n\nstatic void window_focus_callback(GLFWwindow* window, int focused)\n{\n    printf(\"%0.2f Window %s\\n\",\n           glfwGetTime(),\n           focused ? \"focused\" : \"defocused\");\n}\n\nstatic void window_iconify_callback(GLFWwindow* window, int iconified)\n{\n    printf(\"%0.2f Window %s\\n\",\n           glfwGetTime(),\n           iconified ? \"iconified\" : \"uniconified\");\n}\n\nstatic void window_maximize_callback(GLFWwindow* window, int maximized)\n{\n    printf(\"%0.2f Window %s\\n\",\n           glfwGetTime(),\n           maximized ? \"maximized\" : \"unmaximized\");\n}\n\nstatic void window_refresh_callback(GLFWwindow* window)\n{\n    printf(\"%0.2f Window refresh\\n\", glfwGetTime());\n\n    glfwMakeContextCurrent(window);\n\n    glClear(GL_COLOR_BUFFER_BIT);\n    glfwSwapBuffers(window);\n}\n\nstatic GLFWwindow* create_window(GLFWmonitor* monitor)\n{\n    int width, height;\n    GLFWwindow* window;\n\n    if (monitor)\n    {\n        const GLFWvidmode* mode = glfwGetVideoMode(monitor);\n\n        glfwWindowHint(GLFW_REFRESH_RATE, mode->refreshRate);\n        glfwWindowHint(GLFW_RED_BITS, mode->redBits);\n        glfwWindowHint(GLFW_GREEN_BITS, mode->greenBits);\n        glfwWindowHint(GLFW_BLUE_BITS, mode->blueBits);\n\n        width = mode->width;\n        height = mode->height;\n    }\n    else\n    {\n        width = 640;\n        height = 480;\n    }\n\n    window = glfwCreateWindow(width, height, \"Iconify\", monitor, NULL);\n    if (!window)\n    {\n        glfwTerminate();\n        exit(EXIT_FAILURE);\n    }\n\n    glfwMakeContextCurrent(window);\n    gladLoadGL(glfwGetProcAddress);\n\n    return window;\n}\n\nint main(int argc, char** argv)\n{\n    int ch, i, window_count;\n    int fullscreen = GLFW_FALSE, all_monitors = GLFW_FALSE;\n    GLFWwindow** windows;\n\n    while ((ch = getopt(argc, argv, \"afhn\")) != -1)\n    {\n        switch (ch)\n        {\n            case 'a':\n                all_monitors = GLFW_TRUE;\n                break;\n\n            case 'h':\n                usage();\n                exit(EXIT_SUCCESS);\n\n            case 'f':\n                fullscreen = GLFW_TRUE;\n                break;\n\n            default:\n                usage();\n                exit(EXIT_FAILURE);\n        }\n    }\n\n    glfwSetErrorCallback(error_callback);\n\n    if (!glfwInit())\n        exit(EXIT_FAILURE);\n\n    if (fullscreen && all_monitors)\n    {\n        int monitor_count;\n        GLFWmonitor** monitors = glfwGetMonitors(&monitor_count);\n\n        window_count = monitor_count;\n        windows = calloc(window_count, sizeof(GLFWwindow*));\n\n        for (i = 0;  i < monitor_count;  i++)\n        {\n            windows[i] = create_window(monitors[i]);\n            if (!windows[i])\n                break;\n        }\n    }\n    else\n    {\n        GLFWmonitor* monitor = NULL;\n\n        if (fullscreen)\n            monitor = glfwGetPrimaryMonitor();\n\n        window_count = 1;\n        windows = calloc(window_count, sizeof(GLFWwindow*));\n        windows[0] = create_window(monitor);\n    }\n\n    for (i = 0;  i < window_count;  i++)\n    {\n        glfwSetKeyCallback(windows[i], key_callback);\n        glfwSetFramebufferSizeCallback(windows[i], framebuffer_size_callback);\n        glfwSetWindowSizeCallback(windows[i], window_size_callback);\n        glfwSetWindowFocusCallback(windows[i], window_focus_callback);\n        glfwSetWindowIconifyCallback(windows[i], window_iconify_callback);\n        glfwSetWindowMaximizeCallback(windows[i], window_maximize_callback);\n        glfwSetWindowRefreshCallback(windows[i], window_refresh_callback);\n\n        window_refresh_callback(windows[i]);\n\n        printf(\"Window is %s and %s\\n\",\n            glfwGetWindowAttrib(windows[i], GLFW_ICONIFIED) ? \"iconified\" : \"restored\",\n            glfwGetWindowAttrib(windows[i], GLFW_FOCUSED) ? \"focused\" : \"defocused\");\n    }\n\n    for (;;)\n    {\n        glfwWaitEvents();\n\n        for (i = 0;  i < window_count;  i++)\n        {\n            if (glfwWindowShouldClose(windows[i]))\n                break;\n        }\n\n        if (i < window_count)\n            break;\n\n        // Workaround for an issue with msvcrt and mintty\n        fflush(stdout);\n    }\n\n    glfwTerminate();\n    exit(EXIT_SUCCESS);\n}\n\n"
  },
  {
    "path": "thirdparty/glfw/tests/inputlag.c",
    "content": "//========================================================================\n// Input lag test\n// Copyright (c) Camilla Löwy <elmindreda@glfw.org>\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//    claim that you wrote the original software. If you use this software\n//    in a product, an acknowledgment in the product documentation would\n//    be appreciated but is not required.\n//\n// 2. Altered source versions must be plainly marked as such, and must not\n//    be misrepresented as being the original software.\n//\n// 3. This notice may not be removed or altered from any source\n//    distribution.\n//\n//========================================================================\n//\n// This test renders a marker at the cursor position reported by GLFW to\n// check how much it lags behind the hardware mouse cursor\n//\n//========================================================================\n\n#include <glad/gl.h>\n#define GLFW_INCLUDE_NONE\n#include <GLFW/glfw3.h>\n\n#define NK_IMPLEMENTATION\n#define NK_INCLUDE_FIXED_TYPES\n#define NK_INCLUDE_FONT_BAKING\n#define NK_INCLUDE_DEFAULT_FONT\n#define NK_INCLUDE_DEFAULT_ALLOCATOR\n#define NK_INCLUDE_VERTEX_BUFFER_OUTPUT\n#define NK_INCLUDE_STANDARD_VARARGS\n#include <nuklear.h>\n\n#define NK_GLFW_GL2_IMPLEMENTATION\n#include <nuklear_glfw_gl2.h>\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n\n#include \"getopt.h\"\n\nvoid usage(void)\n{\n    printf(\"Usage: inputlag [-h] [-f]\\n\");\n    printf(\"Options:\\n\");\n    printf(\"  -f create full screen window\\n\");\n    printf(\"  -h show this help\\n\");\n}\n\nstruct nk_vec2 cursor_new, cursor_pos, cursor_vel;\nenum { cursor_sync_query, cursor_input_message } cursor_method = cursor_sync_query;\n\nvoid sample_input(GLFWwindow* window)\n{\n    float a = .25; // exponential smoothing factor\n\n    if (cursor_method == cursor_sync_query) {\n        double x, y;\n        glfwGetCursorPos(window, &x, &y);\n        cursor_new.x = (float) x;\n        cursor_new.y = (float) y;\n    }\n\n    cursor_vel.x = (cursor_new.x - cursor_pos.x) * a + cursor_vel.x * (1 - a);\n    cursor_vel.y = (cursor_new.y - cursor_pos.y) * a + cursor_vel.y * (1 - a);\n    cursor_pos = cursor_new;\n}\n\nvoid cursor_pos_callback(GLFWwindow* window, double xpos, double ypos)\n{\n    cursor_new.x = (float) xpos;\n    cursor_new.y = (float) ypos;\n}\n\nint enable_vsync = nk_true;\n\nvoid update_vsync()\n{\n    glfwSwapInterval(enable_vsync == nk_true ? 1 : 0);\n}\n\nint swap_clear = nk_false;\nint swap_finish = nk_true;\nint swap_occlusion_query = nk_false;\nint swap_read_pixels = nk_false;\nGLuint occlusion_query;\n\nvoid swap_buffers(GLFWwindow* window)\n{\n    glfwSwapBuffers(window);\n\n    if (swap_clear)\n        glClear(GL_COLOR_BUFFER_BIT);\n\n    if (swap_finish)\n        glFinish();\n\n    if (swap_occlusion_query) {\n        GLint occlusion_result;\n        if (!occlusion_query)\n            glGenQueries(1, &occlusion_query);\n        glBeginQuery(GL_SAMPLES_PASSED, occlusion_query);\n        glBegin(GL_POINTS);\n        glVertex2f(0, 0);\n        glEnd();\n        glEndQuery(GL_SAMPLES_PASSED);\n        glGetQueryObjectiv(occlusion_query, GL_QUERY_RESULT, &occlusion_result);\n    }\n\n    if (swap_read_pixels) {\n        unsigned char rgba[4];\n        glReadPixels(0, 0, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, rgba);\n    }\n}\n\nvoid error_callback(int error, const char* description)\n{\n    fprintf(stderr, \"Error: %s\\n\", description);\n}\n\nvoid key_callback(GLFWwindow* window, int key, int scancode, int action, int mods)\n{\n    if (action != GLFW_PRESS)\n        return;\n\n    switch (key)\n    {\n        case GLFW_KEY_ESCAPE:\n            glfwSetWindowShouldClose(window, 1);\n            break;\n    }\n}\n\nvoid draw_marker(struct nk_command_buffer* canvas, int lead, struct nk_vec2 pos)\n{\n    struct nk_color colors[4] = { nk_rgb(255,0,0), nk_rgb(255,255,0), nk_rgb(0,255,0), nk_rgb(0,96,255) };\n    struct nk_rect rect = { -5 + pos.x, -5 + pos.y, 10, 10 };\n    nk_fill_circle(canvas, rect, colors[lead]);\n}\n\nint main(int argc, char** argv)\n{\n    int ch, width, height;\n    unsigned long frame_count = 0;\n    double last_time, current_time;\n    double frame_rate = 0;\n    int fullscreen = GLFW_FALSE;\n    GLFWmonitor* monitor = NULL;\n    GLFWwindow* window;\n    struct nk_context* nk;\n    struct nk_font_atlas* atlas;\n\n    int show_forecasts = nk_true;\n\n    while ((ch = getopt(argc, argv, \"fh\")) != -1)\n    {\n        switch (ch)\n        {\n            case 'h':\n                usage();\n                exit(EXIT_SUCCESS);\n\n            case 'f':\n                fullscreen = GLFW_TRUE;\n                break;\n        }\n    }\n\n    glfwSetErrorCallback(error_callback);\n\n    if (!glfwInit())\n        exit(EXIT_FAILURE);\n\n    if (fullscreen)\n    {\n        const GLFWvidmode* mode;\n\n        monitor = glfwGetPrimaryMonitor();\n        mode = glfwGetVideoMode(monitor);\n\n        width = mode->width;\n        height = mode->height;\n    }\n    else\n    {\n        width = 640;\n        height = 480;\n    }\n\n    glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 2);\n    glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 0);\n\n    glfwWindowHint(GLFW_SCALE_TO_MONITOR, GLFW_TRUE);\n\n    window = glfwCreateWindow(width, height, \"Input lag test\", monitor, NULL);\n    if (!window)\n    {\n        glfwTerminate();\n        exit(EXIT_FAILURE);\n    }\n\n    glfwMakeContextCurrent(window);\n    gladLoadGL(glfwGetProcAddress);\n    update_vsync();\n\n    last_time = glfwGetTime();\n\n    nk = nk_glfw3_init(window, NK_GLFW3_INSTALL_CALLBACKS);\n    nk_glfw3_font_stash_begin(&atlas);\n    nk_glfw3_font_stash_end();\n\n    glfwSetKeyCallback(window, key_callback);\n    glfwSetCursorPosCallback(window, cursor_pos_callback);\n\n    while (!glfwWindowShouldClose(window))\n    {\n        int width, height;\n        struct nk_rect area;\n\n        glfwPollEvents();\n        sample_input(window);\n\n        glfwGetWindowSize(window, &width, &height);\n        area = nk_rect(0.f, 0.f, (float) width, (float) height);\n\n        glClear(GL_COLOR_BUFFER_BIT);\n        nk_glfw3_new_frame();\n        if (nk_begin(nk, \"\", area, 0))\n        {\n            nk_flags align_left = NK_TEXT_ALIGN_LEFT | NK_TEXT_ALIGN_MIDDLE;\n            struct nk_command_buffer *canvas = nk_window_get_canvas(nk);\n            int lead;\n\n            for (lead = show_forecasts ? 3 : 0; lead >= 0; lead--)\n                draw_marker(canvas, lead, nk_vec2(cursor_pos.x + cursor_vel.x * lead,\n                                                  cursor_pos.y + cursor_vel.y * lead));\n\n            // print instructions\n            nk_layout_row_dynamic(nk, 20, 1);\n            nk_label(nk, \"Move mouse uniformly and check marker under cursor:\", align_left);\n            for (lead = 0; lead <= 3; lead++) {\n                nk_layout_row_begin(nk, NK_STATIC, 12, 2);\n                nk_layout_row_push(nk, 25);\n                draw_marker(canvas, lead, nk_layout_space_to_screen(nk, nk_vec2(20, 5)));\n                nk_label(nk, \"\", 0);\n                nk_layout_row_push(nk, 500);\n                if (lead == 0)\n                    nk_label(nk, \"- current cursor position (no input lag)\", align_left);\n                else\n                    nk_labelf(nk, align_left, \"- %d-frame forecast (input lag is %d frame)\", lead, lead);\n                nk_layout_row_end(nk);\n            }\n\n            nk_layout_row_dynamic(nk, 20, 1);\n\n            nk_checkbox_label(nk, \"Show forecasts\", &show_forecasts);\n            nk_label(nk, \"Input method:\", align_left);\n            if (nk_option_label(nk, \"glfwGetCursorPos (sync query)\", cursor_method == cursor_sync_query))\n                cursor_method = cursor_sync_query;\n            if (nk_option_label(nk, \"glfwSetCursorPosCallback (latest input message)\", cursor_method == cursor_input_message))\n                cursor_method = cursor_input_message;\n\n            nk_label(nk, \"\", 0); // separator\n\n            nk_value_float(nk, \"FPS\", (float) frame_rate);\n            if (nk_checkbox_label(nk, \"Enable vsync\", &enable_vsync))\n                update_vsync();\n\n            nk_label(nk, \"\", 0); // separator\n\n            nk_label(nk, \"After swap:\", align_left);\n            nk_checkbox_label(nk, \"glClear\", &swap_clear);\n            nk_checkbox_label(nk, \"glFinish\", &swap_finish);\n            nk_checkbox_label(nk, \"draw with occlusion query\", &swap_occlusion_query);\n            nk_checkbox_label(nk, \"glReadPixels\", &swap_read_pixels);\n        }\n\n        nk_end(nk);\n        nk_glfw3_render(NK_ANTI_ALIASING_ON);\n\n        swap_buffers(window);\n\n        frame_count++;\n\n        current_time = glfwGetTime();\n        if (current_time - last_time > 1.0)\n        {\n            frame_rate = frame_count / (current_time - last_time);\n            frame_count = 0;\n            last_time = current_time;\n        }\n    }\n\n    glfwTerminate();\n    exit(EXIT_SUCCESS);\n}\n\n"
  },
  {
    "path": "thirdparty/glfw/tests/joysticks.c",
    "content": "//========================================================================\n// Joystick input test\n// Copyright (c) Camilla Löwy <elmindreda@glfw.org>\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//    claim that you wrote the original software. If you use this software\n//    in a product, an acknowledgment in the product documentation would\n//    be appreciated but is not required.\n//\n// 2. Altered source versions must be plainly marked as such, and must not\n//    be misrepresented as being the original software.\n//\n// 3. This notice may not be removed or altered from any source\n//    distribution.\n//\n//========================================================================\n//\n// This test displays the state of every button and axis of every connected\n// joystick and/or gamepad\n//\n//========================================================================\n\n#include <glad/gl.h>\n#define GLFW_INCLUDE_NONE\n#include <GLFW/glfw3.h>\n\n#define NK_IMPLEMENTATION\n#define NK_INCLUDE_FIXED_TYPES\n#define NK_INCLUDE_FONT_BAKING\n#define NK_INCLUDE_DEFAULT_FONT\n#define NK_INCLUDE_DEFAULT_ALLOCATOR\n#define NK_INCLUDE_VERTEX_BUFFER_OUTPUT\n#define NK_INCLUDE_STANDARD_VARARGS\n#define NK_BUTTON_TRIGGER_ON_RELEASE\n#include <nuklear.h>\n\n#define NK_GLFW_GL2_IMPLEMENTATION\n#include <nuklear_glfw_gl2.h>\n\n#include <stdio.h>\n#include <string.h>\n#include <stdlib.h>\n\n#ifdef _MSC_VER\n#define strdup(x) _strdup(x)\n#endif\n\nstatic GLFWwindow* window;\nstatic int joysticks[GLFW_JOYSTICK_LAST + 1];\nstatic int joystick_count = 0;\n\nstatic void error_callback(int error, const char* description)\n{\n    fprintf(stderr, \"Error: %s\\n\", description);\n}\n\nstatic void joystick_callback(int jid, int event)\n{\n    if (event == GLFW_CONNECTED)\n        joysticks[joystick_count++] = jid;\n    else if (event == GLFW_DISCONNECTED)\n    {\n        int i;\n\n        for (i = 0;  i < joystick_count;  i++)\n        {\n            if (joysticks[i] == jid)\n                break;\n        }\n\n        for (i = i + 1;  i < joystick_count;  i++)\n            joysticks[i - 1] = joysticks[i];\n\n        joystick_count--;\n    }\n\n    if (!glfwGetWindowAttrib(window, GLFW_FOCUSED))\n        glfwRequestWindowAttention(window);\n}\n\nstatic void drop_callback(GLFWwindow* window, int count, const char* paths[])\n{\n    int i;\n\n    for (i = 0;  i < count;  i++)\n    {\n        long size;\n        char* text;\n        FILE* stream = fopen(paths[i], \"rb\");\n        if (!stream)\n            continue;\n\n        fseek(stream, 0, SEEK_END);\n        size = ftell(stream);\n        fseek(stream, 0, SEEK_SET);\n\n        text = malloc(size + 1);\n        text[size] = '\\0';\n        if (fread(text, 1, size, stream) == size)\n            glfwUpdateGamepadMappings(text);\n\n        free(text);\n        fclose(stream);\n    }\n}\n\nstatic const char* joystick_label(int jid)\n{\n    static char label[1024];\n    snprintf(label, sizeof(label), \"%i: %s\", jid + 1, glfwGetJoystickName(jid));\n    return label;\n}\n\nstatic void hat_widget(struct nk_context* nk, unsigned char state)\n{\n    float radius;\n    struct nk_rect area;\n    struct nk_vec2 center;\n\n    if (nk_widget(&area, nk) == NK_WIDGET_INVALID)\n        return;\n\n    center = nk_vec2(area.x + area.w / 2.f, area.y + area.h / 2.f);\n    radius = NK_MIN(area.w, area.h) / 2.f;\n\n    nk_stroke_circle(nk_window_get_canvas(nk),\n                     nk_rect(center.x - radius,\n                             center.y - radius,\n                             radius * 2.f,\n                             radius * 2.f),\n                     1.f,\n                     nk_rgb(175, 175, 175));\n\n    if (state)\n    {\n        const float angles[] =\n        {\n            0.f,           0.f,\n            NK_PI * 1.5f,  NK_PI * 1.75f,\n            NK_PI,         0.f,\n            NK_PI * 1.25f, 0.f,\n            NK_PI * 0.5f,  NK_PI * 0.25f,\n            0.f,           0.f,\n            NK_PI * 0.75f, 0.f,\n        };\n        const float cosa = nk_cos(angles[state]);\n        const float sina = nk_sin(angles[state]);\n        const struct nk_vec2 p0 = nk_vec2(0.f, -radius);\n        const struct nk_vec2 p1 = nk_vec2( radius / 2.f, -radius / 3.f);\n        const struct nk_vec2 p2 = nk_vec2(-radius / 2.f, -radius / 3.f);\n\n        nk_fill_triangle(nk_window_get_canvas(nk),\n                         center.x + cosa * p0.x + sina * p0.y,\n                         center.y + cosa * p0.y - sina * p0.x,\n                         center.x + cosa * p1.x + sina * p1.y,\n                         center.y + cosa * p1.y - sina * p1.x,\n                         center.x + cosa * p2.x + sina * p2.y,\n                         center.y + cosa * p2.y - sina * p2.x,\n                         nk_rgb(175, 175, 175));\n    }\n}\n\nint main(void)\n{\n    int jid, hat_buttons = GLFW_FALSE;\n    struct nk_context* nk;\n    struct nk_font_atlas* atlas;\n\n    memset(joysticks, 0, sizeof(joysticks));\n\n    glfwSetErrorCallback(error_callback);\n\n    if (!glfwInit())\n        exit(EXIT_FAILURE);\n\n    glfwWindowHint(GLFW_SCALE_TO_MONITOR, GLFW_TRUE);\n\n    window = glfwCreateWindow(800, 600, \"Joystick Test\", NULL, NULL);\n    if (!window)\n    {\n        glfwTerminate();\n        exit(EXIT_FAILURE);\n    }\n\n    glfwMakeContextCurrent(window);\n    gladLoadGL(glfwGetProcAddress);\n    glfwSwapInterval(1);\n\n    nk = nk_glfw3_init(window, NK_GLFW3_INSTALL_CALLBACKS);\n    nk_glfw3_font_stash_begin(&atlas);\n    nk_glfw3_font_stash_end();\n\n    for (jid = GLFW_JOYSTICK_1;  jid <= GLFW_JOYSTICK_LAST;  jid++)\n    {\n        if (glfwJoystickPresent(jid))\n            joysticks[joystick_count++] = jid;\n    }\n\n    glfwSetJoystickCallback(joystick_callback);\n    glfwSetDropCallback(window, drop_callback);\n\n    while (!glfwWindowShouldClose(window))\n    {\n        int i, width, height;\n\n        glfwGetWindowSize(window, &width, &height);\n\n        glClear(GL_COLOR_BUFFER_BIT);\n        nk_glfw3_new_frame();\n\n        if (nk_begin(nk,\n                     \"Joysticks\",\n                     nk_rect(width - 200.f, 0.f, 200.f, (float) height),\n                     NK_WINDOW_MINIMIZABLE |\n                     NK_WINDOW_TITLE))\n        {\n            nk_layout_row_dynamic(nk, 30, 1);\n\n            nk_checkbox_label(nk, \"Hat buttons\", &hat_buttons);\n\n            if (joystick_count)\n            {\n                for (i = 0;  i < joystick_count;  i++)\n                {\n                    if (nk_button_label(nk, joystick_label(joysticks[i])))\n                        nk_window_set_focus(nk, joystick_label(joysticks[i]));\n                }\n            }\n            else\n                nk_label(nk, \"No joysticks connected\", NK_TEXT_LEFT);\n        }\n\n        nk_end(nk);\n\n        for (i = 0;  i < joystick_count;  i++)\n        {\n            if (nk_begin(nk,\n                         joystick_label(joysticks[i]),\n                         nk_rect(i * 20.f, i * 20.f, 550.f, 570.f),\n                         NK_WINDOW_BORDER |\n                         NK_WINDOW_MOVABLE |\n                         NK_WINDOW_SCALABLE |\n                         NK_WINDOW_MINIMIZABLE |\n                         NK_WINDOW_TITLE))\n            {\n                int j, axis_count, button_count, hat_count;\n                const float* axes;\n                const unsigned char* buttons;\n                const unsigned char* hats;\n                GLFWgamepadstate state;\n\n                nk_layout_row_dynamic(nk, 30, 1);\n                nk_labelf(nk, NK_TEXT_LEFT, \"Hardware GUID %s\",\n                          glfwGetJoystickGUID(joysticks[i]));\n                nk_label(nk, \"Joystick state\", NK_TEXT_LEFT);\n\n                axes = glfwGetJoystickAxes(joysticks[i], &axis_count);\n                buttons = glfwGetJoystickButtons(joysticks[i], &button_count);\n                hats = glfwGetJoystickHats(joysticks[i], &hat_count);\n\n                if (!hat_buttons)\n                    button_count -= hat_count * 4;\n\n                for (j = 0;  j < axis_count;  j++)\n                    nk_slide_float(nk, -1.f, axes[j], 1.f, 0.1f);\n\n                nk_layout_row_dynamic(nk, 30, 12);\n\n                for (j = 0;  j < button_count;  j++)\n                {\n                    char name[16];\n                    snprintf(name, sizeof(name), \"%i\", j + 1);\n                    nk_select_label(nk, name, NK_TEXT_CENTERED, buttons[j]);\n                }\n\n                nk_layout_row_dynamic(nk, 30, 8);\n\n                for (j = 0;  j < hat_count;  j++)\n                    hat_widget(nk, hats[j]);\n\n                nk_layout_row_dynamic(nk, 30, 1);\n\n                if (glfwGetGamepadState(joysticks[i], &state))\n                {\n                    int hat = 0;\n                    const char* names[GLFW_GAMEPAD_BUTTON_LAST + 1 - 4] =\n                    {\n                        \"A\", \"B\", \"X\", \"Y\",\n                        \"LB\", \"RB\",\n                        \"Back\", \"Start\", \"Guide\",\n                        \"LT\", \"RT\",\n                    };\n\n                    nk_labelf(nk, NK_TEXT_LEFT,\n                              \"Gamepad state: %s\",\n                              glfwGetGamepadName(joysticks[i]));\n\n                    nk_layout_row_dynamic(nk, 30, 2);\n\n                    for (j = 0;  j <= GLFW_GAMEPAD_AXIS_LAST;  j++)\n                        nk_slide_float(nk, -1.f, state.axes[j], 1.f, 0.1f);\n\n                    nk_layout_row_dynamic(nk, 30, GLFW_GAMEPAD_BUTTON_LAST + 1 - 4);\n\n                    for (j = 0;  j <= GLFW_GAMEPAD_BUTTON_LAST - 4;  j++)\n                        nk_select_label(nk, names[j], NK_TEXT_CENTERED, state.buttons[j]);\n\n                    if (state.buttons[GLFW_GAMEPAD_BUTTON_DPAD_UP])\n                        hat |= GLFW_HAT_UP;\n                    if (state.buttons[GLFW_GAMEPAD_BUTTON_DPAD_RIGHT])\n                        hat |= GLFW_HAT_RIGHT;\n                    if (state.buttons[GLFW_GAMEPAD_BUTTON_DPAD_DOWN])\n                        hat |= GLFW_HAT_DOWN;\n                    if (state.buttons[GLFW_GAMEPAD_BUTTON_DPAD_LEFT])\n                        hat |= GLFW_HAT_LEFT;\n\n                    nk_layout_row_dynamic(nk, 30, 8);\n                    hat_widget(nk, hat);\n                }\n                else\n                    nk_label(nk, \"Joystick has no gamepad mapping\", NK_TEXT_LEFT);\n            }\n\n            nk_end(nk);\n        }\n\n        nk_glfw3_render(NK_ANTI_ALIASING_ON);\n\n        glfwSwapBuffers(window);\n        glfwPollEvents();\n    }\n\n    glfwTerminate();\n    exit(EXIT_SUCCESS);\n}\n\n"
  },
  {
    "path": "thirdparty/glfw/tests/monitors.c",
    "content": "//========================================================================\n// Monitor information tool\n// Copyright (c) Camilla Löwy <elmindreda@glfw.org>\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//    claim that you wrote the original software. If you use this software\n//    in a product, an acknowledgment in the product documentation would\n//    be appreciated but is not required.\n//\n// 2. Altered source versions must be plainly marked as such, and must not\n//    be misrepresented as being the original software.\n//\n// 3. This notice may not be removed or altered from any source\n//    distribution.\n//\n//========================================================================\n//\n// This test prints monitor and video mode information or verifies video\n// modes\n//\n//========================================================================\n\n#include <glad/gl.h>\n#define GLFW_INCLUDE_NONE\n#include <GLFW/glfw3.h>\n\n#include <stdio.h>\n#include <string.h>\n#include <stdlib.h>\n\n#include \"getopt.h\"\n\nenum Mode\n{\n    LIST_MODE,\n    TEST_MODE\n};\n\nstatic void usage(void)\n{\n    printf(\"Usage: monitors [-t]\\n\");\n    printf(\"       monitors -h\\n\");\n}\n\nstatic int euclid(int a, int b)\n{\n    return b ? euclid(b, a % b) : a;\n}\n\nstatic const char* format_mode(const GLFWvidmode* mode)\n{\n    static char buffer[512];\n    const int gcd = euclid(mode->width, mode->height);\n\n    snprintf(buffer,\n             sizeof(buffer),\n             \"%i x %i x %i (%i:%i) (%i %i %i) %i Hz\",\n             mode->width, mode->height,\n             mode->redBits + mode->greenBits + mode->blueBits,\n             mode->width / gcd, mode->height / gcd,\n             mode->redBits, mode->greenBits, mode->blueBits,\n             mode->refreshRate);\n\n    buffer[sizeof(buffer) - 1] = '\\0';\n    return buffer;\n}\n\nstatic void error_callback(int error, const char* description)\n{\n    fprintf(stderr, \"Error: %s\\n\", description);\n}\n\nstatic void framebuffer_size_callback(GLFWwindow* window, int width, int height)\n{\n    printf(\"Framebuffer resized to %ix%i\\n\", width, height);\n\n    glViewport(0, 0, width, height);\n}\n\nstatic void key_callback(GLFWwindow* window, int key, int scancode, int action, int mods)\n{\n    if (key == GLFW_KEY_ESCAPE)\n        glfwSetWindowShouldClose(window, GLFW_TRUE);\n}\n\nstatic void list_modes(GLFWmonitor* monitor)\n{\n    int count, x, y, width_mm, height_mm, i;\n    int workarea_x, workarea_y, workarea_width, workarea_height;\n    float xscale, yscale;\n\n    const GLFWvidmode* mode = glfwGetVideoMode(monitor);\n    const GLFWvidmode* modes = glfwGetVideoModes(monitor, &count);\n\n    glfwGetMonitorPos(monitor, &x, &y);\n    glfwGetMonitorPhysicalSize(monitor, &width_mm, &height_mm);\n    glfwGetMonitorContentScale(monitor, &xscale, &yscale);\n    glfwGetMonitorWorkarea(monitor, &workarea_x, &workarea_y, &workarea_width, &workarea_height);\n\n    printf(\"Name: %s (%s)\\n\",\n           glfwGetMonitorName(monitor),\n           glfwGetPrimaryMonitor() == monitor ? \"primary\" : \"secondary\");\n    printf(\"Current mode: %s\\n\", format_mode(mode));\n    printf(\"Virtual position: %i, %i\\n\", x, y);\n    printf(\"Content scale: %f x %f\\n\", xscale, yscale);\n\n    printf(\"Physical size: %i x %i mm (%0.2f dpi at %i x %i)\\n\",\n           width_mm, height_mm, mode->width * 25.4f / width_mm, mode->width, mode->height);\n    printf(\"Monitor work area: %i x %i starting at %i, %i\\n\",\n            workarea_width, workarea_height, workarea_x, workarea_y);\n\n    printf(\"Modes:\\n\");\n\n    for (i = 0;  i < count;  i++)\n    {\n        printf(\"%3u: %s\", (unsigned int) i, format_mode(modes + i));\n\n        if (memcmp(mode, modes + i, sizeof(GLFWvidmode)) == 0)\n            printf(\" (current mode)\");\n\n        putchar('\\n');\n    }\n}\n\nstatic void test_modes(GLFWmonitor* monitor)\n{\n    int i, count;\n    GLFWwindow* window;\n    const GLFWvidmode* modes = glfwGetVideoModes(monitor, &count);\n\n    for (i = 0;  i < count;  i++)\n    {\n        const GLFWvidmode* mode = modes + i;\n        GLFWvidmode current;\n\n        glfwWindowHint(GLFW_RED_BITS, mode->redBits);\n        glfwWindowHint(GLFW_GREEN_BITS, mode->greenBits);\n        glfwWindowHint(GLFW_BLUE_BITS, mode->blueBits);\n        glfwWindowHint(GLFW_REFRESH_RATE, mode->refreshRate);\n\n        printf(\"Testing mode %u on monitor %s: %s\\n\",\n               (unsigned int) i,\n               glfwGetMonitorName(monitor),\n               format_mode(mode));\n\n        window = glfwCreateWindow(mode->width, mode->height,\n                                  \"Video Mode Test\",\n                                  glfwGetPrimaryMonitor(),\n                                  NULL);\n        if (!window)\n        {\n            printf(\"Failed to enter mode %u: %s\\n\",\n                   (unsigned int) i,\n                   format_mode(mode));\n            continue;\n        }\n\n        glfwSetFramebufferSizeCallback(window, framebuffer_size_callback);\n        glfwSetKeyCallback(window, key_callback);\n\n        glfwMakeContextCurrent(window);\n        gladLoadGL(glfwGetProcAddress);\n        glfwSwapInterval(1);\n\n        glfwSetTime(0.0);\n\n        while (glfwGetTime() < 5.0)\n        {\n            glClear(GL_COLOR_BUFFER_BIT);\n            glfwSwapBuffers(window);\n            glfwPollEvents();\n\n            if (glfwWindowShouldClose(window))\n            {\n                printf(\"User terminated program\\n\");\n\n                glfwTerminate();\n                exit(EXIT_SUCCESS);\n            }\n        }\n\n        glGetIntegerv(GL_RED_BITS, &current.redBits);\n        glGetIntegerv(GL_GREEN_BITS, &current.greenBits);\n        glGetIntegerv(GL_BLUE_BITS, &current.blueBits);\n\n        glfwGetWindowSize(window, &current.width, &current.height);\n\n        if (current.redBits != mode->redBits ||\n            current.greenBits != mode->greenBits ||\n            current.blueBits != mode->blueBits)\n        {\n            printf(\"*** Color bit mismatch: (%i %i %i) instead of (%i %i %i)\\n\",\n                   current.redBits, current.greenBits, current.blueBits,\n                   mode->redBits, mode->greenBits, mode->blueBits);\n        }\n\n        if (current.width != mode->width || current.height != mode->height)\n        {\n            printf(\"*** Size mismatch: %ix%i instead of %ix%i\\n\",\n                   current.width, current.height,\n                   mode->width, mode->height);\n        }\n\n        printf(\"Closing window\\n\");\n\n        glfwDestroyWindow(window);\n        window = NULL;\n\n        glfwPollEvents();\n    }\n}\n\nint main(int argc, char** argv)\n{\n    int ch, i, count, mode = LIST_MODE;\n    GLFWmonitor** monitors;\n\n    while ((ch = getopt(argc, argv, \"th\")) != -1)\n    {\n        switch (ch)\n        {\n            case 'h':\n                usage();\n                exit(EXIT_SUCCESS);\n            case 't':\n                mode = TEST_MODE;\n                break;\n            default:\n                usage();\n                exit(EXIT_FAILURE);\n        }\n    }\n\n    glfwSetErrorCallback(error_callback);\n\n    if (!glfwInit())\n        exit(EXIT_FAILURE);\n\n    monitors = glfwGetMonitors(&count);\n\n    for (i = 0;  i < count;  i++)\n    {\n        if (mode == LIST_MODE)\n            list_modes(monitors[i]);\n        else if (mode == TEST_MODE)\n            test_modes(monitors[i]);\n    }\n\n    glfwTerminate();\n    exit(EXIT_SUCCESS);\n}\n\n"
  },
  {
    "path": "thirdparty/glfw/tests/msaa.c",
    "content": "//========================================================================\n// Multisample anti-aliasing test\n// Copyright (c) Camilla Löwy <elmindreda@glfw.org>\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//    claim that you wrote the original software. If you use this software\n//    in a product, an acknowledgment in the product documentation would\n//    be appreciated but is not required.\n//\n// 2. Altered source versions must be plainly marked as such, and must not\n//    be misrepresented as being the original software.\n//\n// 3. This notice may not be removed or altered from any source\n//    distribution.\n//\n//========================================================================\n//\n// This test renders two high contrast, slowly rotating quads, one aliased\n// and one (hopefully) anti-aliased, thus allowing for visual verification\n// of whether MSAA is indeed enabled\n//\n//========================================================================\n\n#include <glad/gl.h>\n#define GLFW_INCLUDE_NONE\n#include <GLFW/glfw3.h>\n\n#if defined(_MSC_VER)\n // Make MS math.h define M_PI\n #define _USE_MATH_DEFINES\n#endif\n\n#include \"linmath.h\"\n\n#include <stdio.h>\n#include <stdlib.h>\n\n#include \"getopt.h\"\n\nstatic const vec2 vertices[4] =\n{\n    { -0.6f, -0.6f },\n    {  0.6f, -0.6f },\n    {  0.6f,  0.6f },\n    { -0.6f,  0.6f }\n};\n\nstatic const char* vertex_shader_text =\n\"#version 110\\n\"\n\"uniform mat4 MVP;\\n\"\n\"attribute vec2 vPos;\\n\"\n\"void main()\\n\"\n\"{\\n\"\n\"    gl_Position = MVP * vec4(vPos, 0.0, 1.0);\\n\"\n\"}\\n\";\n\nstatic const char* fragment_shader_text =\n\"#version 110\\n\"\n\"void main()\\n\"\n\"{\\n\"\n\"    gl_FragColor = vec4(1.0);\\n\"\n\"}\\n\";\n\nstatic void error_callback(int error, const char* description)\n{\n    fprintf(stderr, \"Error: %s\\n\", description);\n}\n\nstatic void key_callback(GLFWwindow* window, int key, int scancode, int action, int mods)\n{\n    if (action != GLFW_PRESS)\n        return;\n\n    switch (key)\n    {\n        case GLFW_KEY_SPACE:\n            glfwSetTime(0.0);\n            break;\n        case GLFW_KEY_ESCAPE:\n            glfwSetWindowShouldClose(window, GLFW_TRUE);\n            break;\n    }\n}\n\nstatic void usage(void)\n{\n    printf(\"Usage: msaa [-h] [-s SAMPLES]\\n\");\n}\n\nint main(int argc, char** argv)\n{\n    int ch, samples = 4;\n    GLFWwindow* window;\n    GLuint vertex_buffer, vertex_shader, fragment_shader, program;\n    GLint mvp_location, vpos_location;\n\n    while ((ch = getopt(argc, argv, \"hs:\")) != -1)\n    {\n        switch (ch)\n        {\n            case 'h':\n                usage();\n                exit(EXIT_SUCCESS);\n            case 's':\n                samples = atoi(optarg);\n                break;\n            default:\n                usage();\n                exit(EXIT_FAILURE);\n        }\n    }\n\n    glfwSetErrorCallback(error_callback);\n\n    if (!glfwInit())\n        exit(EXIT_FAILURE);\n\n    if (samples)\n        printf(\"Requesting MSAA with %i samples\\n\", samples);\n    else\n        printf(\"Requesting that MSAA not be available\\n\");\n\n    glfwWindowHint(GLFW_SAMPLES, samples);\n    glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 2);\n    glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 0);\n\n    window = glfwCreateWindow(800, 400, \"Aliasing Detector\", NULL, NULL);\n    if (!window)\n    {\n        glfwTerminate();\n        exit(EXIT_FAILURE);\n    }\n\n    glfwSetKeyCallback(window, key_callback);\n\n    glfwMakeContextCurrent(window);\n    gladLoadGL(glfwGetProcAddress);\n    glfwSwapInterval(1);\n\n    glGetIntegerv(GL_SAMPLES, &samples);\n    if (samples)\n        printf(\"Context reports MSAA is available with %i samples\\n\", samples);\n    else\n        printf(\"Context reports MSAA is unavailable\\n\");\n\n    glGenBuffers(1, &vertex_buffer);\n    glBindBuffer(GL_ARRAY_BUFFER, vertex_buffer);\n    glBufferData(GL_ARRAY_BUFFER, sizeof(vertices), vertices, GL_STATIC_DRAW);\n\n    vertex_shader = glCreateShader(GL_VERTEX_SHADER);\n    glShaderSource(vertex_shader, 1, &vertex_shader_text, NULL);\n    glCompileShader(vertex_shader);\n\n    fragment_shader = glCreateShader(GL_FRAGMENT_SHADER);\n    glShaderSource(fragment_shader, 1, &fragment_shader_text, NULL);\n    glCompileShader(fragment_shader);\n\n    program = glCreateProgram();\n    glAttachShader(program, vertex_shader);\n    glAttachShader(program, fragment_shader);\n    glLinkProgram(program);\n\n    mvp_location = glGetUniformLocation(program, \"MVP\");\n    vpos_location = glGetAttribLocation(program, \"vPos\");\n\n    glEnableVertexAttribArray(vpos_location);\n    glVertexAttribPointer(vpos_location, 2, GL_FLOAT, GL_FALSE,\n                          sizeof(vertices[0]), (void*) 0);\n\n    while (!glfwWindowShouldClose(window))\n    {\n        float ratio;\n        int width, height;\n        mat4x4 m, p, mvp;\n        const double angle = glfwGetTime() * M_PI / 180.0;\n\n        glfwGetFramebufferSize(window, &width, &height);\n        ratio = width / (float) height;\n\n        glViewport(0, 0, width, height);\n        glClear(GL_COLOR_BUFFER_BIT);\n\n        glUseProgram(program);\n\n        mat4x4_ortho(p, -ratio, ratio, -1.f, 1.f, 0.f, 1.f);\n\n        mat4x4_translate(m, -1.f, 0.f, 0.f);\n        mat4x4_rotate_Z(m, m, (float) angle);\n        mat4x4_mul(mvp, p, m);\n\n        glUniformMatrix4fv(mvp_location, 1, GL_FALSE, (const GLfloat*) mvp);\n        glDisable(GL_MULTISAMPLE);\n        glDrawArrays(GL_TRIANGLE_FAN, 0, 4);\n\n        mat4x4_translate(m, 1.f, 0.f, 0.f);\n        mat4x4_rotate_Z(m, m, (float) angle);\n        mat4x4_mul(mvp, p, m);\n\n        glUniformMatrix4fv(mvp_location, 1, GL_FALSE, (const GLfloat*) mvp);\n        glEnable(GL_MULTISAMPLE);\n        glDrawArrays(GL_TRIANGLE_FAN, 0, 4);\n\n        glfwSwapBuffers(window);\n        glfwPollEvents();\n    }\n\n    glfwDestroyWindow(window);\n\n    glfwTerminate();\n    exit(EXIT_SUCCESS);\n}\n\n"
  },
  {
    "path": "thirdparty/glfw/tests/opacity.c",
    "content": "//========================================================================\n// Window opacity test program\n// Copyright (c) Camilla Löwy <elmindreda@glfw.org>\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//    claim that you wrote the original software. If you use this software\n//    in a product, an acknowledgment in the product documentation would\n//    be appreciated but is not required.\n//\n// 2. Altered source versions must be plainly marked as such, and must not\n//    be misrepresented as being the original software.\n//\n// 3. This notice may not be removed or altered from any source\n//    distribution.\n//\n//========================================================================\n\n#include <glad/gl.h>\n#define GLFW_INCLUDE_NONE\n#include <GLFW/glfw3.h>\n\n#define NK_IMPLEMENTATION\n#define NK_INCLUDE_FIXED_TYPES\n#define NK_INCLUDE_FONT_BAKING\n#define NK_INCLUDE_DEFAULT_FONT\n#define NK_INCLUDE_DEFAULT_ALLOCATOR\n#define NK_INCLUDE_VERTEX_BUFFER_OUTPUT\n#define NK_INCLUDE_STANDARD_VARARGS\n#include <nuklear.h>\n\n#define NK_GLFW_GL2_IMPLEMENTATION\n#include <nuklear_glfw_gl2.h>\n\n#include <stdio.h>\n#include <stdlib.h>\n\nstatic void error_callback(int error, const char* description)\n{\n    fprintf(stderr, \"Error: %s\\n\", description);\n}\n\nint main(int argc, char** argv)\n{\n    GLFWwindow* window;\n    struct nk_context* nk;\n    struct nk_font_atlas* atlas;\n\n    glfwSetErrorCallback(error_callback);\n\n    if (!glfwInit())\n        exit(EXIT_FAILURE);\n\n    glfwWindowHint(GLFW_SCALE_TO_MONITOR, GLFW_TRUE);\n\n    window = glfwCreateWindow(400, 400, \"Opacity\", NULL, NULL);\n    if (!window)\n    {\n        glfwTerminate();\n        exit(EXIT_FAILURE);\n    }\n\n    glfwMakeContextCurrent(window);\n    gladLoadGL(glfwGetProcAddress);\n    glfwSwapInterval(1);\n\n    nk = nk_glfw3_init(window, NK_GLFW3_INSTALL_CALLBACKS);\n    nk_glfw3_font_stash_begin(&atlas);\n    nk_glfw3_font_stash_end();\n\n    while (!glfwWindowShouldClose(window))\n    {\n        int width, height;\n        struct nk_rect area;\n\n        glfwGetWindowSize(window, &width, &height);\n        area = nk_rect(0.f, 0.f, (float) width, (float) height);\n\n        glClear(GL_COLOR_BUFFER_BIT);\n        nk_glfw3_new_frame();\n        if (nk_begin(nk, \"\", area, 0))\n        {\n            float opacity = glfwGetWindowOpacity(window);\n            nk_layout_row_dynamic(nk, 30, 2);\n            if (nk_slider_float(nk, 0.f, &opacity, 1.f, 0.001f))\n                glfwSetWindowOpacity(window, opacity);\n            nk_labelf(nk, NK_TEXT_LEFT, \"%0.3f\", opacity);\n        }\n\n        nk_end(nk);\n        nk_glfw3_render(NK_ANTI_ALIASING_ON);\n\n        glfwSwapBuffers(window);\n        glfwWaitEventsTimeout(1.0);\n    }\n\n    nk_glfw3_shutdown();\n    glfwTerminate();\n    exit(EXIT_SUCCESS);\n}\n\n"
  },
  {
    "path": "thirdparty/glfw/tests/reopen.c",
    "content": "//========================================================================\n// Window re-opener (open/close stress test)\n// Copyright (c) Camilla Löwy <elmindreda@glfw.org>\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//    claim that you wrote the original software. If you use this software\n//    in a product, an acknowledgment in the product documentation would\n//    be appreciated but is not required.\n//\n// 2. Altered source versions must be plainly marked as such, and must not\n//    be misrepresented as being the original software.\n//\n// 3. This notice may not be removed or altered from any source\n//    distribution.\n//\n//========================================================================\n//\n// This test came about as the result of bug #1262773\n//\n// It closes and re-opens the GLFW window every five seconds, alternating\n// between windowed and full screen mode\n//\n// It also times and logs opening and closing actions and attempts to separate\n// user initiated window closing from its own\n//\n//========================================================================\n\n#include <glad/gl.h>\n#define GLFW_INCLUDE_NONE\n#include <GLFW/glfw3.h>\n\n#include <time.h>\n#include <stdio.h>\n#include <stdlib.h>\n\n#include \"linmath.h\"\n\nstatic const char* vertex_shader_text =\n\"#version 110\\n\"\n\"uniform mat4 MVP;\\n\"\n\"attribute vec2 vPos;\\n\"\n\"void main()\\n\"\n\"{\\n\"\n\"    gl_Position = MVP * vec4(vPos, 0.0, 1.0);\\n\"\n\"}\\n\";\n\nstatic const char* fragment_shader_text =\n\"#version 110\\n\"\n\"void main()\\n\"\n\"{\\n\"\n\"    gl_FragColor = vec4(1.0);\\n\"\n\"}\\n\";\n\nstatic const vec2 vertices[4] =\n{\n    { -0.5f, -0.5f },\n    {  0.5f, -0.5f },\n    {  0.5f,  0.5f },\n    { -0.5f,  0.5f }\n};\n\nstatic void error_callback(int error, const char* description)\n{\n    fprintf(stderr, \"Error: %s\\n\", description);\n}\n\nstatic void window_close_callback(GLFWwindow* window)\n{\n    printf(\"Close callback triggered\\n\");\n}\n\nstatic void key_callback(GLFWwindow* window, int key, int scancode, int action, int mods)\n{\n    if (action != GLFW_PRESS)\n        return;\n\n    switch (key)\n    {\n        case GLFW_KEY_Q:\n        case GLFW_KEY_ESCAPE:\n            glfwSetWindowShouldClose(window, GLFW_TRUE);\n            break;\n    }\n}\n\nstatic void close_window(GLFWwindow* window)\n{\n    double base = glfwGetTime();\n    glfwDestroyWindow(window);\n    printf(\"Closing window took %0.3f seconds\\n\", glfwGetTime() - base);\n}\n\nint main(int argc, char** argv)\n{\n    int count = 0;\n    double base;\n    GLFWwindow* window;\n\n    srand((unsigned int) time(NULL));\n\n    glfwSetErrorCallback(error_callback);\n\n    if (!glfwInit())\n        exit(EXIT_FAILURE);\n\n    glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 2);\n    glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 0);\n\n    for (;;)\n    {\n        int width, height;\n        GLFWmonitor* monitor = NULL;\n        GLuint vertex_shader, fragment_shader, program, vertex_buffer;\n        GLint mvp_location, vpos_location;\n\n        if (count & 1)\n        {\n            int monitorCount;\n            GLFWmonitor** monitors = glfwGetMonitors(&monitorCount);\n            monitor = monitors[rand() % monitorCount];\n        }\n\n        if (monitor)\n        {\n            const GLFWvidmode* mode = glfwGetVideoMode(monitor);\n            width = mode->width;\n            height = mode->height;\n        }\n        else\n        {\n            width = 640;\n            height = 480;\n        }\n\n        base = glfwGetTime();\n\n        window = glfwCreateWindow(width, height, \"Window Re-opener\", monitor, NULL);\n        if (!window)\n        {\n            glfwTerminate();\n            exit(EXIT_FAILURE);\n        }\n\n        if (monitor)\n        {\n            printf(\"Opening full screen window on monitor %s took %0.3f seconds\\n\",\n                   glfwGetMonitorName(monitor),\n                   glfwGetTime() - base);\n        }\n        else\n        {\n            printf(\"Opening regular window took %0.3f seconds\\n\",\n                   glfwGetTime() - base);\n        }\n\n        glfwSetWindowCloseCallback(window, window_close_callback);\n        glfwSetKeyCallback(window, key_callback);\n\n        glfwMakeContextCurrent(window);\n        gladLoadGL(glfwGetProcAddress);\n        glfwSwapInterval(1);\n\n        vertex_shader = glCreateShader(GL_VERTEX_SHADER);\n        glShaderSource(vertex_shader, 1, &vertex_shader_text, NULL);\n        glCompileShader(vertex_shader);\n\n        fragment_shader = glCreateShader(GL_FRAGMENT_SHADER);\n        glShaderSource(fragment_shader, 1, &fragment_shader_text, NULL);\n        glCompileShader(fragment_shader);\n\n        program = glCreateProgram();\n        glAttachShader(program, vertex_shader);\n        glAttachShader(program, fragment_shader);\n        glLinkProgram(program);\n\n        mvp_location = glGetUniformLocation(program, \"MVP\");\n        vpos_location = glGetAttribLocation(program, \"vPos\");\n\n        glGenBuffers(1, &vertex_buffer);\n        glBindBuffer(GL_ARRAY_BUFFER, vertex_buffer);\n        glBufferData(GL_ARRAY_BUFFER, sizeof(vertices), vertices, GL_STATIC_DRAW);\n\n        glEnableVertexAttribArray(vpos_location);\n        glVertexAttribPointer(vpos_location, 2, GL_FLOAT, GL_FALSE,\n                              sizeof(vertices[0]), (void*) 0);\n\n        glfwSetTime(0.0);\n\n        while (glfwGetTime() < 5.0)\n        {\n            float ratio;\n            int width, height;\n            mat4x4 m, p, mvp;\n\n            glfwGetFramebufferSize(window, &width, &height);\n            ratio = width / (float) height;\n\n            glViewport(0, 0, width, height);\n            glClear(GL_COLOR_BUFFER_BIT);\n\n            mat4x4_ortho(p, -ratio, ratio, -1.f, 1.f, 0.f, 1.f);\n\n            mat4x4_identity(m);\n            mat4x4_rotate_Z(m, m, (float) glfwGetTime());\n            mat4x4_mul(mvp, p, m);\n\n            glUseProgram(program);\n            glUniformMatrix4fv(mvp_location, 1, GL_FALSE, (const GLfloat*) mvp);\n            glDrawArrays(GL_TRIANGLE_FAN, 0, 4);\n\n            glfwSwapBuffers(window);\n            glfwPollEvents();\n\n            if (glfwWindowShouldClose(window))\n            {\n                close_window(window);\n                printf(\"User closed window\\n\");\n\n                glfwTerminate();\n                exit(EXIT_SUCCESS);\n            }\n        }\n\n        printf(\"Closing window\\n\");\n        close_window(window);\n\n        count++;\n    }\n\n    glfwTerminate();\n}\n\n"
  },
  {
    "path": "thirdparty/glfw/tests/tearing.c",
    "content": "//========================================================================\n// Vsync enabling test\n// Copyright (c) Camilla Löwy <elmindreda@glfw.org>\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//    claim that you wrote the original software. If you use this software\n//    in a product, an acknowledgment in the product documentation would\n//    be appreciated but is not required.\n//\n// 2. Altered source versions must be plainly marked as such, and must not\n//    be misrepresented as being the original software.\n//\n// 3. This notice may not be removed or altered from any source\n//    distribution.\n//\n//========================================================================\n//\n// This test renders a high contrast, horizontally moving bar, allowing for\n// visual verification of whether the set swap interval is indeed obeyed\n//\n//========================================================================\n\n#include <glad/gl.h>\n#define GLFW_INCLUDE_NONE\n#include <GLFW/glfw3.h>\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <math.h>\n\n#include \"linmath.h\"\n\nstatic const struct\n{\n    float x, y;\n} vertices[4] =\n{\n    { -0.25f, -1.f },\n    {  0.25f, -1.f },\n    {  0.25f,  1.f },\n    { -0.25f,  1.f }\n};\n\nstatic const char* vertex_shader_text =\n\"#version 110\\n\"\n\"uniform mat4 MVP;\\n\"\n\"attribute vec2 vPos;\\n\"\n\"void main()\\n\"\n\"{\\n\"\n\"    gl_Position = MVP * vec4(vPos, 0.0, 1.0);\\n\"\n\"}\\n\";\n\nstatic const char* fragment_shader_text =\n\"#version 110\\n\"\n\"void main()\\n\"\n\"{\\n\"\n\"    gl_FragColor = vec4(1.0);\\n\"\n\"}\\n\";\n\nstatic int swap_tear;\nstatic int swap_interval;\nstatic double frame_rate;\n\nstatic void update_window_title(GLFWwindow* window)\n{\n    char title[256];\n\n    snprintf(title, sizeof(title), \"Tearing detector (interval %i%s, %0.1f Hz)\",\n             swap_interval,\n             (swap_tear && swap_interval < 0) ? \" (swap tear)\" : \"\",\n             frame_rate);\n\n    glfwSetWindowTitle(window, title);\n}\n\nstatic void set_swap_interval(GLFWwindow* window, int interval)\n{\n    swap_interval = interval;\n    glfwSwapInterval(swap_interval);\n    update_window_title(window);\n}\n\nstatic void error_callback(int error, const char* description)\n{\n    fprintf(stderr, \"Error: %s\\n\", description);\n}\n\nstatic void key_callback(GLFWwindow* window, int key, int scancode, int action, int mods)\n{\n    if (action != GLFW_PRESS)\n        return;\n\n    switch (key)\n    {\n        case GLFW_KEY_UP:\n        {\n            if (swap_interval + 1 > swap_interval)\n                set_swap_interval(window, swap_interval + 1);\n            break;\n        }\n\n        case GLFW_KEY_DOWN:\n        {\n            if (swap_tear)\n            {\n                if (swap_interval - 1 < swap_interval)\n                    set_swap_interval(window, swap_interval - 1);\n            }\n            else\n            {\n                if (swap_interval - 1 >= 0)\n                    set_swap_interval(window, swap_interval - 1);\n            }\n            break;\n        }\n\n        case GLFW_KEY_ESCAPE:\n            glfwSetWindowShouldClose(window, 1);\n            break;\n\n        case GLFW_KEY_F11:\n        case GLFW_KEY_ENTER:\n        {\n            static int x, y, width, height;\n\n            if (mods != GLFW_MOD_ALT)\n                return;\n\n            if (glfwGetWindowMonitor(window))\n                glfwSetWindowMonitor(window, NULL, x, y, width, height, 0);\n            else\n            {\n                GLFWmonitor* monitor = glfwGetPrimaryMonitor();\n                const GLFWvidmode* mode = glfwGetVideoMode(monitor);\n                glfwGetWindowPos(window, &x, &y);\n                glfwGetWindowSize(window, &width, &height);\n                glfwSetWindowMonitor(window, monitor,\n                                     0, 0, mode->width, mode->height,\n                                     mode->refreshRate);\n            }\n\n            break;\n        }\n    }\n}\n\nint main(int argc, char** argv)\n{\n    unsigned long frame_count = 0;\n    double last_time, current_time;\n    GLFWwindow* window;\n    GLuint vertex_buffer, vertex_shader, fragment_shader, program;\n    GLint mvp_location, vpos_location;\n\n    glfwSetErrorCallback(error_callback);\n\n    if (!glfwInit())\n        exit(EXIT_FAILURE);\n\n    glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 2);\n    glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 0);\n\n    window = glfwCreateWindow(640, 480, \"Tearing detector\", NULL, NULL);\n    if (!window)\n    {\n        glfwTerminate();\n        exit(EXIT_FAILURE);\n    }\n\n    glfwMakeContextCurrent(window);\n    gladLoadGL(glfwGetProcAddress);\n    set_swap_interval(window, 0);\n\n    last_time = glfwGetTime();\n    frame_rate = 0.0;\n    swap_tear = (glfwExtensionSupported(\"WGL_EXT_swap_control_tear\") ||\n                 glfwExtensionSupported(\"GLX_EXT_swap_control_tear\"));\n\n    glfwSetKeyCallback(window, key_callback);\n\n    glGenBuffers(1, &vertex_buffer);\n    glBindBuffer(GL_ARRAY_BUFFER, vertex_buffer);\n    glBufferData(GL_ARRAY_BUFFER, sizeof(vertices), vertices, GL_STATIC_DRAW);\n\n    vertex_shader = glCreateShader(GL_VERTEX_SHADER);\n    glShaderSource(vertex_shader, 1, &vertex_shader_text, NULL);\n    glCompileShader(vertex_shader);\n\n    fragment_shader = glCreateShader(GL_FRAGMENT_SHADER);\n    glShaderSource(fragment_shader, 1, &fragment_shader_text, NULL);\n    glCompileShader(fragment_shader);\n\n    program = glCreateProgram();\n    glAttachShader(program, vertex_shader);\n    glAttachShader(program, fragment_shader);\n    glLinkProgram(program);\n\n    mvp_location = glGetUniformLocation(program, \"MVP\");\n    vpos_location = glGetAttribLocation(program, \"vPos\");\n\n    glEnableVertexAttribArray(vpos_location);\n    glVertexAttribPointer(vpos_location, 2, GL_FLOAT, GL_FALSE,\n                          sizeof(vertices[0]), (void*) 0);\n\n    while (!glfwWindowShouldClose(window))\n    {\n        int width, height;\n        mat4x4 m, p, mvp;\n        float position = cosf((float) glfwGetTime() * 4.f) * 0.75f;\n\n        glfwGetFramebufferSize(window, &width, &height);\n\n        glViewport(0, 0, width, height);\n        glClear(GL_COLOR_BUFFER_BIT);\n\n        mat4x4_ortho(p, -1.f, 1.f, -1.f, 1.f, 0.f, 1.f);\n        mat4x4_translate(m, position, 0.f, 0.f);\n        mat4x4_mul(mvp, p, m);\n\n        glUseProgram(program);\n        glUniformMatrix4fv(mvp_location, 1, GL_FALSE, (const GLfloat*) mvp);\n        glDrawArrays(GL_TRIANGLE_FAN, 0, 4);\n\n        glfwSwapBuffers(window);\n        glfwPollEvents();\n\n        frame_count++;\n\n        current_time = glfwGetTime();\n        if (current_time - last_time > 1.0)\n        {\n            frame_rate = frame_count / (current_time - last_time);\n            frame_count = 0;\n            last_time = current_time;\n            update_window_title(window);\n        }\n    }\n\n    glfwTerminate();\n    exit(EXIT_SUCCESS);\n}\n\n"
  },
  {
    "path": "thirdparty/glfw/tests/threads.c",
    "content": "//========================================================================\n// Multi-threading test\n// Copyright (c) Camilla Löwy <elmindreda@glfw.org>\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//    claim that you wrote the original software. If you use this software\n//    in a product, an acknowledgment in the product documentation would\n//    be appreciated but is not required.\n//\n// 2. Altered source versions must be plainly marked as such, and must not\n//    be misrepresented as being the original software.\n//\n// 3. This notice may not be removed or altered from any source\n//    distribution.\n//\n//========================================================================\n//\n// This test is intended to verify whether the OpenGL context part of\n// the GLFW API is able to be used from multiple threads\n//\n//========================================================================\n\n#include \"tinycthread.h\"\n\n#include <glad/gl.h>\n#define GLFW_INCLUDE_NONE\n#include <GLFW/glfw3.h>\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <math.h>\n\ntypedef struct\n{\n    GLFWwindow* window;\n    const char* title;\n    float r, g, b;\n    thrd_t id;\n} Thread;\n\nstatic volatile int running = GLFW_TRUE;\n\nstatic void error_callback(int error, const char* description)\n{\n    fprintf(stderr, \"Error: %s\\n\", description);\n}\n\nstatic void key_callback(GLFWwindow* window, int key, int scancode, int action, int mods)\n{\n    if (key == GLFW_KEY_ESCAPE && action == GLFW_PRESS)\n        glfwSetWindowShouldClose(window, GLFW_TRUE);\n}\n\nstatic int thread_main(void* data)\n{\n    const Thread* thread = data;\n\n    glfwMakeContextCurrent(thread->window);\n    glfwSwapInterval(1);\n\n    while (running)\n    {\n        const float v = (float) fabs(sin(glfwGetTime() * 2.f));\n        glClearColor(thread->r * v, thread->g * v, thread->b * v, 0.f);\n\n        glClear(GL_COLOR_BUFFER_BIT);\n        glfwSwapBuffers(thread->window);\n    }\n\n    glfwMakeContextCurrent(NULL);\n    return 0;\n}\n\nint main(void)\n{\n    int i, result;\n    Thread threads[] =\n    {\n        { NULL, \"Red\", 1.f, 0.f, 0.f, 0 },\n        { NULL, \"Green\", 0.f, 1.f, 0.f, 0 },\n        { NULL, \"Blue\", 0.f, 0.f, 1.f, 0 }\n    };\n    const int count = sizeof(threads) / sizeof(Thread);\n\n    glfwSetErrorCallback(error_callback);\n\n    if (!glfwInit())\n        exit(EXIT_FAILURE);\n\n    glfwWindowHint(GLFW_VISIBLE, GLFW_FALSE);\n\n    for (i = 0;  i < count;  i++)\n    {\n        threads[i].window = glfwCreateWindow(200, 200,\n                                             threads[i].title,\n                                             NULL, NULL);\n        if (!threads[i].window)\n        {\n            glfwTerminate();\n            exit(EXIT_FAILURE);\n        }\n\n        glfwSetKeyCallback(threads[i].window, key_callback);\n\n        glfwSetWindowPos(threads[i].window, 200 + 250 * i, 200);\n        glfwShowWindow(threads[i].window);\n    }\n\n    glfwMakeContextCurrent(threads[0].window);\n    gladLoadGL(glfwGetProcAddress);\n    glfwMakeContextCurrent(NULL);\n\n    for (i = 0;  i < count;  i++)\n    {\n        if (thrd_create(&threads[i].id, thread_main, threads + i) !=\n            thrd_success)\n        {\n            fprintf(stderr, \"Failed to create secondary thread\\n\");\n\n            glfwTerminate();\n            exit(EXIT_FAILURE);\n        }\n    }\n\n    while (running)\n    {\n        glfwWaitEvents();\n\n        for (i = 0;  i < count;  i++)\n        {\n            if (glfwWindowShouldClose(threads[i].window))\n                running = GLFW_FALSE;\n        }\n    }\n\n    for (i = 0;  i < count;  i++)\n        glfwHideWindow(threads[i].window);\n\n    for (i = 0;  i < count;  i++)\n        thrd_join(threads[i].id, &result);\n\n    exit(EXIT_SUCCESS);\n}\n\n"
  },
  {
    "path": "thirdparty/glfw/tests/timeout.c",
    "content": "//========================================================================\n// Event wait timeout test\n// Copyright (c) Camilla Löwy <elmindreda@glfw.org>\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//    claim that you wrote the original software. If you use this software\n//    in a product, an acknowledgment in the product documentation would\n//    be appreciated but is not required.\n//\n// 2. Altered source versions must be plainly marked as such, and must not\n//    be misrepresented as being the original software.\n//\n// 3. This notice may not be removed or altered from any source\n//    distribution.\n//\n//========================================================================\n//\n// This test is intended to verify that waiting for events with timeout works\n//\n//========================================================================\n\n#include <glad/gl.h>\n#define GLFW_INCLUDE_NONE\n#include <GLFW/glfw3.h>\n\n#include <time.h>\n#include <math.h>\n#include <stdio.h>\n#include <stdlib.h>\n\nstatic void error_callback(int error, const char* description)\n{\n    fprintf(stderr, \"Error: %s\\n\", description);\n}\n\nstatic void key_callback(GLFWwindow* window, int key, int scancode, int action, int mods)\n{\n    if (key == GLFW_KEY_ESCAPE && action == GLFW_PRESS)\n        glfwSetWindowShouldClose(window, GLFW_TRUE);\n}\n\nstatic float nrand(void)\n{\n    return (float) rand() / (float) RAND_MAX;\n}\n\nint main(void)\n{\n    GLFWwindow* window;\n\n    srand((unsigned int) time(NULL));\n\n    glfwSetErrorCallback(error_callback);\n\n    if (!glfwInit())\n        exit(EXIT_FAILURE);\n\n    window = glfwCreateWindow(640, 480, \"Event Wait Timeout Test\", NULL, NULL);\n    if (!window)\n    {\n        glfwTerminate();\n        exit(EXIT_FAILURE);\n    }\n\n    glfwMakeContextCurrent(window);\n    gladLoadGL(glfwGetProcAddress);\n    glfwSetKeyCallback(window, key_callback);\n\n    while (!glfwWindowShouldClose(window))\n    {\n        int width, height;\n        float r = nrand(), g = nrand(), b = nrand();\n        float l = (float) sqrt(r * r + g * g + b * b);\n\n        glfwGetFramebufferSize(window, &width, &height);\n\n        glViewport(0, 0, width, height);\n        glClearColor(r / l, g / l, b / l, 1.f);\n        glClear(GL_COLOR_BUFFER_BIT);\n        glfwSwapBuffers(window);\n\n        glfwWaitEventsTimeout(1.0);\n    }\n\n    glfwDestroyWindow(window);\n\n    glfwTerminate();\n    exit(EXIT_SUCCESS);\n}\n\n"
  },
  {
    "path": "thirdparty/glfw/tests/title.c",
    "content": "//========================================================================\n// UTF-8 window title test\n// Copyright (c) Camilla Löwy <elmindreda@glfw.org>\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//    claim that you wrote the original software. If you use this software\n//    in a product, an acknowledgment in the product documentation would\n//    be appreciated but is not required.\n//\n// 2. Altered source versions must be plainly marked as such, and must not\n//    be misrepresented as being the original software.\n//\n// 3. This notice may not be removed or altered from any source\n//    distribution.\n//\n//========================================================================\n//\n// This test sets a UTF-8 window title\n//\n//========================================================================\n\n#include <glad/gl.h>\n#define GLFW_INCLUDE_NONE\n#include <GLFW/glfw3.h>\n\n#include <stdio.h>\n#include <stdlib.h>\n\nstatic void error_callback(int error, const char* description)\n{\n    fprintf(stderr, \"Error: %s\\n\", description);\n}\n\nint main(void)\n{\n    GLFWwindow* window;\n\n    glfwSetErrorCallback(error_callback);\n\n    if (!glfwInit())\n        exit(EXIT_FAILURE);\n\n    window = glfwCreateWindow(400, 400, \"English 日本語 русский язык 官話\", NULL, NULL);\n    if (!window)\n    {\n        glfwTerminate();\n        exit(EXIT_FAILURE);\n    }\n\n    glfwMakeContextCurrent(window);\n    gladLoadGL(glfwGetProcAddress);\n    glfwSwapInterval(1);\n\n    while (!glfwWindowShouldClose(window))\n    {\n        glClear(GL_COLOR_BUFFER_BIT);\n        glfwSwapBuffers(window);\n        glfwWaitEvents();\n    }\n\n    glfwTerminate();\n    exit(EXIT_SUCCESS);\n}\n\n"
  },
  {
    "path": "thirdparty/glfw/tests/triangle-vulkan.c",
    "content": "/*\n * Copyright (c) 2015-2016 The Khronos Group Inc.\n * Copyright (c) 2015-2016 Valve Corporation\n * Copyright (c) 2015-2016 LunarG, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * Author: Chia-I Wu <olvaffe@gmail.com>\n * Author: Cody Northrop <cody@lunarg.com>\n * Author: Courtney Goeltzenleuchter <courtney@LunarG.com>\n * Author: Ian Elliott <ian@LunarG.com>\n * Author: Jon Ashburn <jon@lunarg.com>\n * Author: Piers Daniell <pdaniell@nvidia.com>\n * Author: Gwan-gyeong Mun <elongbug@gmail.com>\n * Porter: Camilla Löwy <elmindreda@glfw.org>\n */\n/*\n * Draw a textured triangle with depth testing.  This is written against Intel\n * ICD.  It does not do state transition nor object memory binding like it\n * should.  It also does no error checking.\n */\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <stdbool.h>\n#include <assert.h>\n#include <signal.h>\n\n#ifdef _WIN32\n#include <windows.h>\n#endif\n\n#include <glad/vulkan.h>\n#define GLFW_INCLUDE_NONE\n#include <GLFW/glfw3.h>\n\n#define DEMO_TEXTURE_COUNT 1\n#define VERTEX_BUFFER_BIND_ID 0\n#define APP_SHORT_NAME \"tri\"\n#define APP_LONG_NAME \"The Vulkan Triangle Demo Program\"\n\n#define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0]))\n\n#if defined(NDEBUG) && defined(__GNUC__)\n#define U_ASSERT_ONLY __attribute__((unused))\n#else\n#define U_ASSERT_ONLY\n#endif\n\n#define ERR_EXIT(err_msg, err_class)                                           \\\n    do {                                                                       \\\n        printf(err_msg);                                                       \\\n        fflush(stdout);                                                        \\\n        exit(1);                                                               \\\n    } while (0)\n\nstatic GLADapiproc glad_vulkan_callback(const char* name, void* user)\n{\n    return glfwGetInstanceProcAddress((VkInstance) user, name);\n}\n\nstatic const char fragShaderCode[] = {\n    0x03, 0x02, 0x23, 0x07, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x08, 0x00,\n    0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x02, 0x00,\n    0x01, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x06, 0x00, 0x01, 0x00, 0x00, 0x00,\n    0x47, 0x4c, 0x53, 0x4c, 0x2e, 0x73, 0x74, 0x64, 0x2e, 0x34, 0x35, 0x30,\n    0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00,\n    0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x07, 0x00, 0x04, 0x00, 0x00, 0x00,\n    0x04, 0x00, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00,\n    0x09, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x10, 0x00, 0x03, 0x00,\n    0x04, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x03, 0x00, 0x03, 0x00,\n    0x02, 0x00, 0x00, 0x00, 0x90, 0x01, 0x00, 0x00, 0x04, 0x00, 0x09, 0x00,\n    0x47, 0x4c, 0x5f, 0x41, 0x52, 0x42, 0x5f, 0x73, 0x65, 0x70, 0x61, 0x72,\n    0x61, 0x74, 0x65, 0x5f, 0x73, 0x68, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x6f,\n    0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x00, 0x00, 0x04, 0x00, 0x09, 0x00,\n    0x47, 0x4c, 0x5f, 0x41, 0x52, 0x42, 0x5f, 0x73, 0x68, 0x61, 0x64, 0x69,\n    0x6e, 0x67, 0x5f, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x5f,\n    0x34, 0x32, 0x30, 0x70, 0x61, 0x63, 0x6b, 0x00, 0x05, 0x00, 0x04, 0x00,\n    0x04, 0x00, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00,\n    0x05, 0x00, 0x05, 0x00, 0x09, 0x00, 0x00, 0x00, 0x75, 0x46, 0x72, 0x61,\n    0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00,\n    0x0d, 0x00, 0x00, 0x00, 0x74, 0x65, 0x78, 0x00, 0x05, 0x00, 0x05, 0x00,\n    0x11, 0x00, 0x00, 0x00, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64,\n    0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x09, 0x00, 0x00, 0x00,\n    0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00,\n    0x0d, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n    0x47, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00,\n    0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x11, 0x00, 0x00, 0x00,\n    0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x02, 0x00,\n    0x02, 0x00, 0x00, 0x00, 0x21, 0x00, 0x03, 0x00, 0x03, 0x00, 0x00, 0x00,\n    0x02, 0x00, 0x00, 0x00, 0x16, 0x00, 0x03, 0x00, 0x06, 0x00, 0x00, 0x00,\n    0x20, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x07, 0x00, 0x00, 0x00,\n    0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00,\n    0x08, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00,\n    0x3b, 0x00, 0x04, 0x00, 0x08, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00,\n    0x03, 0x00, 0x00, 0x00, 0x19, 0x00, 0x09, 0x00, 0x0a, 0x00, 0x00, 0x00,\n    0x06, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,\n    0x00, 0x00, 0x00, 0x00, 0x1b, 0x00, 0x03, 0x00, 0x0b, 0x00, 0x00, 0x00,\n    0x0a, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00,\n    0x00, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00,\n    0x0c, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n    0x17, 0x00, 0x04, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,\n    0x02, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x10, 0x00, 0x00, 0x00,\n    0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00,\n    0x10, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,\n    0x36, 0x00, 0x05, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,\n    0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00,\n    0x05, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00,\n    0x0e, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00,\n    0x0f, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00,\n    0x57, 0x00, 0x05, 0x00, 0x07, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00,\n    0x0e, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00,\n    0x09, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00,\n    0x38, 0x00, 0x01, 0x00\n};\n\nstatic const char vertShaderCode[] = {\n    0x03, 0x02, 0x23, 0x07, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x08, 0x00,\n    0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x02, 0x00,\n    0x01, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x06, 0x00, 0x01, 0x00, 0x00, 0x00,\n    0x47, 0x4c, 0x53, 0x4c, 0x2e, 0x73, 0x74, 0x64, 0x2e, 0x34, 0x35, 0x30,\n    0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00,\n    0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00,\n    0x04, 0x00, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00,\n    0x09, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00,\n    0x17, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00,\n    0x03, 0x00, 0x03, 0x00, 0x02, 0x00, 0x00, 0x00, 0x90, 0x01, 0x00, 0x00,\n    0x04, 0x00, 0x09, 0x00, 0x47, 0x4c, 0x5f, 0x41, 0x52, 0x42, 0x5f, 0x73,\n    0x65, 0x70, 0x61, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x73, 0x68, 0x61, 0x64,\n    0x65, 0x72, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x00, 0x00,\n    0x04, 0x00, 0x09, 0x00, 0x47, 0x4c, 0x5f, 0x41, 0x52, 0x42, 0x5f, 0x73,\n    0x68, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x6c, 0x61, 0x6e, 0x67, 0x75,\n    0x61, 0x67, 0x65, 0x5f, 0x34, 0x32, 0x30, 0x70, 0x61, 0x63, 0x6b, 0x00,\n    0x05, 0x00, 0x04, 0x00, 0x04, 0x00, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e,\n    0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x09, 0x00, 0x00, 0x00,\n    0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x00, 0x00, 0x00, 0x00,\n    0x05, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x61, 0x74, 0x74, 0x72,\n    0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x11, 0x00, 0x00, 0x00,\n    0x67, 0x6c, 0x5f, 0x50, 0x65, 0x72, 0x56, 0x65, 0x72, 0x74, 0x65, 0x78,\n    0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x11, 0x00, 0x00, 0x00,\n    0x00, 0x00, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74,\n    0x69, 0x6f, 0x6e, 0x00, 0x06, 0x00, 0x07, 0x00, 0x11, 0x00, 0x00, 0x00,\n    0x01, 0x00, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x69, 0x6e, 0x74,\n    0x53, 0x69, 0x7a, 0x65, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x07, 0x00,\n    0x11, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x43,\n    0x6c, 0x69, 0x70, 0x44, 0x69, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x00,\n    0x05, 0x00, 0x03, 0x00, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n    0x05, 0x00, 0x03, 0x00, 0x17, 0x00, 0x00, 0x00, 0x70, 0x6f, 0x73, 0x00,\n    0x05, 0x00, 0x05, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x56,\n    0x65, 0x72, 0x74, 0x65, 0x78, 0x49, 0x44, 0x00, 0x05, 0x00, 0x06, 0x00,\n    0x1d, 0x00, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x49, 0x6e, 0x73, 0x74, 0x61,\n    0x6e, 0x63, 0x65, 0x49, 0x44, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00,\n    0x09, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n    0x47, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00,\n    0x01, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x11, 0x00, 0x00, 0x00,\n    0x00, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n    0x48, 0x00, 0x05, 0x00, 0x11, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,\n    0x0b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00,\n    0x11, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00,\n    0x03, 0x00, 0x00, 0x00, 0x47, 0x00, 0x03, 0x00, 0x11, 0x00, 0x00, 0x00,\n    0x02, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x17, 0x00, 0x00, 0x00,\n    0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00,\n    0x1c, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00,\n    0x47, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00,\n    0x06, 0x00, 0x00, 0x00, 0x13, 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00,\n    0x21, 0x00, 0x03, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,\n    0x16, 0x00, 0x03, 0x00, 0x06, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00,\n    0x17, 0x00, 0x04, 0x00, 0x07, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,\n    0x02, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x08, 0x00, 0x00, 0x00,\n    0x03, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00,\n    0x08, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,\n    0x20, 0x00, 0x04, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,\n    0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x0a, 0x00, 0x00, 0x00,\n    0x0b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00,\n    0x0d, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,\n    0x15, 0x00, 0x04, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00,\n    0x00, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0e, 0x00, 0x00, 0x00,\n    0x0f, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x04, 0x00,\n    0x10, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00,\n    0x1e, 0x00, 0x05, 0x00, 0x11, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00,\n    0x06, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00,\n    0x12, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00,\n    0x3b, 0x00, 0x04, 0x00, 0x12, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00,\n    0x03, 0x00, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, 0x14, 0x00, 0x00, 0x00,\n    0x20, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00,\n    0x14, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n    0x20, 0x00, 0x04, 0x00, 0x16, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,\n    0x0d, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x16, 0x00, 0x00, 0x00,\n    0x17, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00,\n    0x19, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00,\n    0x20, 0x00, 0x04, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,\n    0x14, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x1b, 0x00, 0x00, 0x00,\n    0x1c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00,\n    0x1b, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,\n    0x36, 0x00, 0x05, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,\n    0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00,\n    0x05, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x07, 0x00, 0x00, 0x00,\n    0x0c, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00,\n    0x09, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00,\n    0x0d, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00,\n    0x41, 0x00, 0x05, 0x00, 0x19, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00,\n    0x13, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00,\n    0x1a, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00,\n    0x38, 0x00, 0x01, 0x00\n};\n\nstruct texture_object {\n    VkSampler sampler;\n\n    VkImage image;\n    VkImageLayout imageLayout;\n\n    VkDeviceMemory mem;\n    VkImageView view;\n    int32_t tex_width, tex_height;\n};\n\nstatic int validation_error = 0;\n\nVKAPI_ATTR VkBool32 VKAPI_CALL\nBreakCallback(VkFlags msgFlags, VkDebugReportObjectTypeEXT objType,\n              uint64_t srcObject, size_t location, int32_t msgCode,\n              const char *pLayerPrefix, const char *pMsg,\n              void *pUserData) {\n#ifdef _WIN32\n    DebugBreak();\n#else\n    raise(SIGTRAP);\n#endif\n\n    return false;\n}\n\ntypedef struct {\n    VkImage image;\n    VkCommandBuffer cmd;\n    VkImageView view;\n} SwapchainBuffers;\n\nstruct demo {\n    GLFWwindow* window;\n    VkSurfaceKHR surface;\n    bool use_staging_buffer;\n\n    VkInstance inst;\n    VkPhysicalDevice gpu;\n    VkDevice device;\n    VkQueue queue;\n    VkPhysicalDeviceProperties gpu_props;\n    VkPhysicalDeviceFeatures gpu_features;\n    VkQueueFamilyProperties *queue_props;\n    uint32_t graphics_queue_node_index;\n\n    uint32_t enabled_extension_count;\n    uint32_t enabled_layer_count;\n    const char *extension_names[64];\n    const char *enabled_layers[64];\n\n    int width, height;\n    VkFormat format;\n    VkColorSpaceKHR color_space;\n\n    uint32_t swapchainImageCount;\n    VkSwapchainKHR swapchain;\n    SwapchainBuffers *buffers;\n\n    VkCommandPool cmd_pool;\n\n    struct {\n        VkFormat format;\n\n        VkImage image;\n        VkDeviceMemory mem;\n        VkImageView view;\n    } depth;\n\n    struct texture_object textures[DEMO_TEXTURE_COUNT];\n\n    struct {\n        VkBuffer buf;\n        VkDeviceMemory mem;\n\n        VkPipelineVertexInputStateCreateInfo vi;\n        VkVertexInputBindingDescription vi_bindings[1];\n        VkVertexInputAttributeDescription vi_attrs[2];\n    } vertices;\n\n    VkCommandBuffer setup_cmd; // Command Buffer for initialization commands\n    VkCommandBuffer draw_cmd;  // Command Buffer for drawing commands\n    VkPipelineLayout pipeline_layout;\n    VkDescriptorSetLayout desc_layout;\n    VkPipelineCache pipelineCache;\n    VkRenderPass render_pass;\n    VkPipeline pipeline;\n\n    VkShaderModule vert_shader_module;\n    VkShaderModule frag_shader_module;\n\n    VkDescriptorPool desc_pool;\n    VkDescriptorSet desc_set;\n\n    VkFramebuffer *framebuffers;\n\n    VkPhysicalDeviceMemoryProperties memory_properties;\n\n    int32_t curFrame;\n    int32_t frameCount;\n    bool validate;\n    bool use_break;\n    VkDebugReportCallbackEXT msg_callback;\n\n    float depthStencil;\n    float depthIncrement;\n\n    uint32_t current_buffer;\n    uint32_t queue_count;\n};\n\nVKAPI_ATTR VkBool32 VKAPI_CALL\ndbgFunc(VkFlags msgFlags, VkDebugReportObjectTypeEXT objType,\n    uint64_t srcObject, size_t location, int32_t msgCode,\n    const char *pLayerPrefix, const char *pMsg, void *pUserData) {\n    char *message = (char *)malloc(strlen(pMsg) + 100);\n\n    assert(message);\n\n    validation_error = 1;\n\n    if (msgFlags & VK_DEBUG_REPORT_ERROR_BIT_EXT) {\n        sprintf(message, \"ERROR: [%s] Code %d : %s\", pLayerPrefix, msgCode,\n            pMsg);\n    } else if (msgFlags & VK_DEBUG_REPORT_WARNING_BIT_EXT) {\n        sprintf(message, \"WARNING: [%s] Code %d : %s\", pLayerPrefix, msgCode,\n            pMsg);\n    } else {\n        return false;\n    }\n\n    printf(\"%s\\n\", message);\n    fflush(stdout);\n    free(message);\n\n    /*\n    * false indicates that layer should not bail-out of an\n    * API call that had validation failures. This may mean that the\n    * app dies inside the driver due to invalid parameter(s).\n    * That's what would happen without validation layers, so we'll\n    * keep that behavior here.\n    */\n    return false;\n}\n\n// Forward declaration:\nstatic void demo_resize(struct demo *demo);\n\nstatic bool memory_type_from_properties(struct demo *demo, uint32_t typeBits,\n                                        VkFlags requirements_mask,\n                                        uint32_t *typeIndex) {\n    uint32_t i;\n    // Search memtypes to find first index with those properties\n    for (i = 0; i < VK_MAX_MEMORY_TYPES; i++) {\n        if ((typeBits & 1) == 1) {\n            // Type is available, does it match user properties?\n            if ((demo->memory_properties.memoryTypes[i].propertyFlags &\n                 requirements_mask) == requirements_mask) {\n                *typeIndex = i;\n                return true;\n            }\n        }\n        typeBits >>= 1;\n    }\n    // No memory types matched, return failure\n    return false;\n}\n\nstatic void demo_flush_init_cmd(struct demo *demo) {\n    VkResult U_ASSERT_ONLY err;\n\n    if (demo->setup_cmd == VK_NULL_HANDLE)\n        return;\n\n    err = vkEndCommandBuffer(demo->setup_cmd);\n    assert(!err);\n\n    const VkCommandBuffer cmd_bufs[] = {demo->setup_cmd};\n    VkFence nullFence = {VK_NULL_HANDLE};\n    VkSubmitInfo submit_info = {.sType = VK_STRUCTURE_TYPE_SUBMIT_INFO,\n                                .pNext = NULL,\n                                .waitSemaphoreCount = 0,\n                                .pWaitSemaphores = NULL,\n                                .pWaitDstStageMask = NULL,\n                                .commandBufferCount = 1,\n                                .pCommandBuffers = cmd_bufs,\n                                .signalSemaphoreCount = 0,\n                                .pSignalSemaphores = NULL};\n\n    err = vkQueueSubmit(demo->queue, 1, &submit_info, nullFence);\n    assert(!err);\n\n    err = vkQueueWaitIdle(demo->queue);\n    assert(!err);\n\n    vkFreeCommandBuffers(demo->device, demo->cmd_pool, 1, cmd_bufs);\n    demo->setup_cmd = VK_NULL_HANDLE;\n}\n\nstatic void demo_set_image_layout(struct demo *demo, VkImage image,\n                                  VkImageAspectFlags aspectMask,\n                                  VkImageLayout old_image_layout,\n                                  VkImageLayout new_image_layout,\n                                  VkAccessFlagBits srcAccessMask) {\n\n    VkResult U_ASSERT_ONLY err;\n\n    if (demo->setup_cmd == VK_NULL_HANDLE) {\n        const VkCommandBufferAllocateInfo cmd = {\n            .sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO,\n            .pNext = NULL,\n            .commandPool = demo->cmd_pool,\n            .level = VK_COMMAND_BUFFER_LEVEL_PRIMARY,\n            .commandBufferCount = 1,\n        };\n\n        err = vkAllocateCommandBuffers(demo->device, &cmd, &demo->setup_cmd);\n        assert(!err);\n\n        VkCommandBufferBeginInfo cmd_buf_info = {\n            .sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO,\n            .pNext = NULL,\n            .flags = 0,\n            .pInheritanceInfo = NULL,\n        };\n        err = vkBeginCommandBuffer(demo->setup_cmd, &cmd_buf_info);\n        assert(!err);\n    }\n\n    VkImageMemoryBarrier image_memory_barrier = {\n        .sType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER,\n        .pNext = NULL,\n        .srcAccessMask = srcAccessMask,\n        .dstAccessMask = 0,\n        .oldLayout = old_image_layout,\n        .newLayout = new_image_layout,\n        .image = image,\n        .subresourceRange = {aspectMask, 0, 1, 0, 1}};\n\n    if (new_image_layout == VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL) {\n        /* Make sure anything that was copying from this image has completed */\n        image_memory_barrier.dstAccessMask = VK_ACCESS_TRANSFER_READ_BIT;\n    }\n\n    if (new_image_layout == VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL) {\n        image_memory_barrier.dstAccessMask =\n            VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT;\n    }\n\n    if (new_image_layout == VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL) {\n        image_memory_barrier.dstAccessMask =\n            VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT;\n    }\n\n    if (new_image_layout == VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL) {\n        /* Make sure any Copy or CPU writes to image are flushed */\n        image_memory_barrier.dstAccessMask =\n            VK_ACCESS_SHADER_READ_BIT | VK_ACCESS_INPUT_ATTACHMENT_READ_BIT;\n    }\n\n    VkImageMemoryBarrier *pmemory_barrier = &image_memory_barrier;\n\n    VkPipelineStageFlags src_stages = VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT;\n    VkPipelineStageFlags dest_stages = VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT;\n\n    vkCmdPipelineBarrier(demo->setup_cmd, src_stages, dest_stages, 0, 0, NULL,\n                         0, NULL, 1, pmemory_barrier);\n}\n\nstatic void demo_draw_build_cmd(struct demo *demo) {\n    const VkCommandBufferBeginInfo cmd_buf_info = {\n        .sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO,\n        .pNext = NULL,\n        .flags = 0,\n        .pInheritanceInfo = NULL,\n    };\n    const VkClearValue clear_values[2] = {\n            [0] = {.color.float32 = {0.2f, 0.2f, 0.2f, 0.2f}},\n            [1] = {.depthStencil = {demo->depthStencil, 0}},\n    };\n    const VkRenderPassBeginInfo rp_begin = {\n        .sType = VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO,\n        .pNext = NULL,\n        .renderPass = demo->render_pass,\n        .framebuffer = demo->framebuffers[demo->current_buffer],\n        .renderArea.offset.x = 0,\n        .renderArea.offset.y = 0,\n        .renderArea.extent.width = demo->width,\n        .renderArea.extent.height = demo->height,\n        .clearValueCount = 2,\n        .pClearValues = clear_values,\n    };\n    VkResult U_ASSERT_ONLY err;\n\n    err = vkBeginCommandBuffer(demo->draw_cmd, &cmd_buf_info);\n    assert(!err);\n\n    // We can use LAYOUT_UNDEFINED as a wildcard here because we don't care what\n    // happens to the previous contents of the image\n    VkImageMemoryBarrier image_memory_barrier = {\n        .sType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER,\n        .pNext = NULL,\n        .srcAccessMask = 0,\n        .dstAccessMask = VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT,\n        .oldLayout = VK_IMAGE_LAYOUT_UNDEFINED,\n        .newLayout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL,\n        .srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED,\n        .dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED,\n        .image = demo->buffers[demo->current_buffer].image,\n        .subresourceRange = {VK_IMAGE_ASPECT_COLOR_BIT, 0, 1, 0, 1}};\n\n    vkCmdPipelineBarrier(demo->draw_cmd, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT,\n                         VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT, 0, 0, NULL, 0,\n                         NULL, 1, &image_memory_barrier);\n    vkCmdBeginRenderPass(demo->draw_cmd, &rp_begin, VK_SUBPASS_CONTENTS_INLINE);\n    vkCmdBindPipeline(demo->draw_cmd, VK_PIPELINE_BIND_POINT_GRAPHICS,\n                      demo->pipeline);\n    vkCmdBindDescriptorSets(demo->draw_cmd, VK_PIPELINE_BIND_POINT_GRAPHICS,\n                            demo->pipeline_layout, 0, 1, &demo->desc_set, 0,\n                            NULL);\n\n    VkViewport viewport;\n    memset(&viewport, 0, sizeof(viewport));\n    viewport.height = (float)demo->height;\n    viewport.width = (float)demo->width;\n    viewport.minDepth = (float)0.0f;\n    viewport.maxDepth = (float)1.0f;\n    vkCmdSetViewport(demo->draw_cmd, 0, 1, &viewport);\n\n    VkRect2D scissor;\n    memset(&scissor, 0, sizeof(scissor));\n    scissor.extent.width = demo->width;\n    scissor.extent.height = demo->height;\n    scissor.offset.x = 0;\n    scissor.offset.y = 0;\n    vkCmdSetScissor(demo->draw_cmd, 0, 1, &scissor);\n\n    VkDeviceSize offsets[1] = {0};\n    vkCmdBindVertexBuffers(demo->draw_cmd, VERTEX_BUFFER_BIND_ID, 1,\n                           &demo->vertices.buf, offsets);\n\n    vkCmdDraw(demo->draw_cmd, 3, 1, 0, 0);\n    vkCmdEndRenderPass(demo->draw_cmd);\n\n    VkImageMemoryBarrier prePresentBarrier = {\n        .sType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER,\n        .pNext = NULL,\n        .srcAccessMask = VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT,\n        .dstAccessMask = VK_ACCESS_MEMORY_READ_BIT,\n        .oldLayout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL,\n        .newLayout = VK_IMAGE_LAYOUT_PRESENT_SRC_KHR,\n        .srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED,\n        .dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED,\n        .subresourceRange = {VK_IMAGE_ASPECT_COLOR_BIT, 0, 1, 0, 1}};\n\n    prePresentBarrier.image = demo->buffers[demo->current_buffer].image;\n    VkImageMemoryBarrier *pmemory_barrier = &prePresentBarrier;\n    vkCmdPipelineBarrier(demo->draw_cmd, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT,\n                         VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT, 0, 0, NULL, 0,\n                         NULL, 1, pmemory_barrier);\n\n    err = vkEndCommandBuffer(demo->draw_cmd);\n    assert(!err);\n}\n\nstatic void demo_draw(struct demo *demo) {\n    VkResult U_ASSERT_ONLY err;\n    VkSemaphore imageAcquiredSemaphore, drawCompleteSemaphore;\n    VkSemaphoreCreateInfo semaphoreCreateInfo = {\n        .sType = VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO,\n        .pNext = NULL,\n        .flags = 0,\n    };\n\n    err = vkCreateSemaphore(demo->device, &semaphoreCreateInfo,\n                            NULL, &imageAcquiredSemaphore);\n    assert(!err);\n\n    err = vkCreateSemaphore(demo->device, &semaphoreCreateInfo,\n                            NULL, &drawCompleteSemaphore);\n    assert(!err);\n\n    // Get the index of the next available swapchain image:\n    err = vkAcquireNextImageKHR(demo->device, demo->swapchain, UINT64_MAX,\n                                imageAcquiredSemaphore,\n                                (VkFence)0, // TODO: Show use of fence\n                                &demo->current_buffer);\n    if (err == VK_ERROR_OUT_OF_DATE_KHR) {\n        // demo->swapchain is out of date (e.g. the window was resized) and\n        // must be recreated:\n        demo_resize(demo);\n        demo_draw(demo);\n        vkDestroySemaphore(demo->device, imageAcquiredSemaphore, NULL);\n        vkDestroySemaphore(demo->device, drawCompleteSemaphore, NULL);\n        return;\n    } else if (err == VK_SUBOPTIMAL_KHR) {\n        // demo->swapchain is not as optimal as it could be, but the platform's\n        // presentation engine will still present the image correctly.\n    } else {\n        assert(!err);\n    }\n\n    demo_flush_init_cmd(demo);\n\n    // Wait for the present complete semaphore to be signaled to ensure\n    // that the image won't be rendered to until the presentation\n    // engine has fully released ownership to the application, and it is\n    // okay to render to the image.\n\n    demo_draw_build_cmd(demo);\n    VkFence nullFence = VK_NULL_HANDLE;\n    VkPipelineStageFlags pipe_stage_flags =\n        VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT;\n    VkSubmitInfo submit_info = {.sType = VK_STRUCTURE_TYPE_SUBMIT_INFO,\n                                .pNext = NULL,\n                                .waitSemaphoreCount = 1,\n                                .pWaitSemaphores = &imageAcquiredSemaphore,\n                                .pWaitDstStageMask = &pipe_stage_flags,\n                                .commandBufferCount = 1,\n                                .pCommandBuffers = &demo->draw_cmd,\n                                .signalSemaphoreCount = 1,\n                                .pSignalSemaphores = &drawCompleteSemaphore};\n\n    err = vkQueueSubmit(demo->queue, 1, &submit_info, nullFence);\n    assert(!err);\n\n    VkPresentInfoKHR present = {\n        .sType = VK_STRUCTURE_TYPE_PRESENT_INFO_KHR,\n        .pNext = NULL,\n        .waitSemaphoreCount = 1,\n        .pWaitSemaphores = &drawCompleteSemaphore,\n        .swapchainCount = 1,\n        .pSwapchains = &demo->swapchain,\n        .pImageIndices = &demo->current_buffer,\n    };\n\n    err = vkQueuePresentKHR(demo->queue, &present);\n    if (err == VK_ERROR_OUT_OF_DATE_KHR) {\n        // demo->swapchain is out of date (e.g. the window was resized) and\n        // must be recreated:\n        demo_resize(demo);\n    } else if (err == VK_SUBOPTIMAL_KHR) {\n        // demo->swapchain is not as optimal as it could be, but the platform's\n        // presentation engine will still present the image correctly.\n    } else {\n        assert(!err);\n    }\n\n    err = vkQueueWaitIdle(demo->queue);\n    assert(err == VK_SUCCESS);\n\n    vkDestroySemaphore(demo->device, imageAcquiredSemaphore, NULL);\n    vkDestroySemaphore(demo->device, drawCompleteSemaphore, NULL);\n}\n\nstatic void demo_prepare_buffers(struct demo *demo) {\n    VkResult U_ASSERT_ONLY err;\n    VkSwapchainKHR oldSwapchain = demo->swapchain;\n\n    // Check the surface capabilities and formats\n    VkSurfaceCapabilitiesKHR surfCapabilities;\n    err = vkGetPhysicalDeviceSurfaceCapabilitiesKHR(\n        demo->gpu, demo->surface, &surfCapabilities);\n    assert(!err);\n\n    uint32_t presentModeCount;\n    err = vkGetPhysicalDeviceSurfacePresentModesKHR(\n        demo->gpu, demo->surface, &presentModeCount, NULL);\n    assert(!err);\n    VkPresentModeKHR *presentModes =\n        (VkPresentModeKHR *)malloc(presentModeCount * sizeof(VkPresentModeKHR));\n    assert(presentModes);\n    err = vkGetPhysicalDeviceSurfacePresentModesKHR(\n        demo->gpu, demo->surface, &presentModeCount, presentModes);\n    assert(!err);\n\n    VkExtent2D swapchainExtent;\n    // width and height are either both 0xFFFFFFFF, or both not 0xFFFFFFFF.\n    if (surfCapabilities.currentExtent.width == 0xFFFFFFFF) {\n        // If the surface size is undefined, the size is set to the size\n        // of the images requested, which must fit within the minimum and\n        // maximum values.\n        swapchainExtent.width = demo->width;\n        swapchainExtent.height = demo->height;\n\n        if (swapchainExtent.width < surfCapabilities.minImageExtent.width) {\n            swapchainExtent.width = surfCapabilities.minImageExtent.width;\n        } else if (swapchainExtent.width > surfCapabilities.maxImageExtent.width) {\n            swapchainExtent.width = surfCapabilities.maxImageExtent.width;\n        }\n\n        if (swapchainExtent.height < surfCapabilities.minImageExtent.height) {\n            swapchainExtent.height = surfCapabilities.minImageExtent.height;\n        } else if (swapchainExtent.height > surfCapabilities.maxImageExtent.height) {\n            swapchainExtent.height = surfCapabilities.maxImageExtent.height;\n        }\n    } else {\n        // If the surface size is defined, the swap chain size must match\n        swapchainExtent = surfCapabilities.currentExtent;\n        demo->width = surfCapabilities.currentExtent.width;\n        demo->height = surfCapabilities.currentExtent.height;\n    }\n\n    VkPresentModeKHR swapchainPresentMode = VK_PRESENT_MODE_FIFO_KHR;\n\n    // Determine the number of VkImage's to use in the swap chain.\n    // Application desires to only acquire 1 image at a time (which is\n    // \"surfCapabilities.minImageCount\").\n    uint32_t desiredNumOfSwapchainImages = surfCapabilities.minImageCount;\n    // If maxImageCount is 0, we can ask for as many images as we want;\n    // otherwise we're limited to maxImageCount\n    if ((surfCapabilities.maxImageCount > 0) &&\n        (desiredNumOfSwapchainImages > surfCapabilities.maxImageCount)) {\n        // Application must settle for fewer images than desired:\n        desiredNumOfSwapchainImages = surfCapabilities.maxImageCount;\n    }\n\n    VkSurfaceTransformFlagsKHR preTransform;\n    if (surfCapabilities.supportedTransforms &\n        VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR) {\n        preTransform = VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR;\n    } else {\n        preTransform = surfCapabilities.currentTransform;\n    }\n\n    const VkSwapchainCreateInfoKHR swapchain = {\n        .sType = VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR,\n        .pNext = NULL,\n        .surface = demo->surface,\n        .minImageCount = desiredNumOfSwapchainImages,\n        .imageFormat = demo->format,\n        .imageColorSpace = demo->color_space,\n        .imageExtent =\n            {\n             .width = swapchainExtent.width, .height = swapchainExtent.height,\n            },\n        .imageUsage = VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT,\n        .preTransform = preTransform,\n        .compositeAlpha = VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR,\n        .imageArrayLayers = 1,\n        .imageSharingMode = VK_SHARING_MODE_EXCLUSIVE,\n        .queueFamilyIndexCount = 0,\n        .pQueueFamilyIndices = NULL,\n        .presentMode = swapchainPresentMode,\n        .oldSwapchain = oldSwapchain,\n        .clipped = true,\n    };\n    uint32_t i;\n\n    err = vkCreateSwapchainKHR(demo->device, &swapchain, NULL, &demo->swapchain);\n    assert(!err);\n\n    // If we just re-created an existing swapchain, we should destroy the old\n    // swapchain at this point.\n    // Note: destroying the swapchain also cleans up all its associated\n    // presentable images once the platform is done with them.\n    if (oldSwapchain != VK_NULL_HANDLE) {\n        vkDestroySwapchainKHR(demo->device, oldSwapchain, NULL);\n    }\n\n    err = vkGetSwapchainImagesKHR(demo->device, demo->swapchain,\n                                        &demo->swapchainImageCount, NULL);\n    assert(!err);\n\n    VkImage *swapchainImages =\n        (VkImage *)malloc(demo->swapchainImageCount * sizeof(VkImage));\n    assert(swapchainImages);\n    err = vkGetSwapchainImagesKHR(demo->device, demo->swapchain,\n                                  &demo->swapchainImageCount,\n                                  swapchainImages);\n    assert(!err);\n\n    demo->buffers = (SwapchainBuffers *)malloc(sizeof(SwapchainBuffers) *\n                                               demo->swapchainImageCount);\n    assert(demo->buffers);\n\n    for (i = 0; i < demo->swapchainImageCount; i++) {\n        VkImageViewCreateInfo color_attachment_view = {\n            .sType = VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO,\n            .pNext = NULL,\n            .format = demo->format,\n            .components =\n                {\n                 .r = VK_COMPONENT_SWIZZLE_R,\n                 .g = VK_COMPONENT_SWIZZLE_G,\n                 .b = VK_COMPONENT_SWIZZLE_B,\n                 .a = VK_COMPONENT_SWIZZLE_A,\n                },\n            .subresourceRange = {.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT,\n                                 .baseMipLevel = 0,\n                                 .levelCount = 1,\n                                 .baseArrayLayer = 0,\n                                 .layerCount = 1},\n            .viewType = VK_IMAGE_VIEW_TYPE_2D,\n            .flags = 0,\n        };\n\n        demo->buffers[i].image = swapchainImages[i];\n\n        color_attachment_view.image = demo->buffers[i].image;\n\n        err = vkCreateImageView(demo->device, &color_attachment_view, NULL,\n                                &demo->buffers[i].view);\n        assert(!err);\n    }\n\n    demo->current_buffer = 0;\n\n    if (NULL != presentModes) {\n        free(presentModes);\n    }\n}\n\nstatic void demo_prepare_depth(struct demo *demo) {\n    const VkFormat depth_format = VK_FORMAT_D16_UNORM;\n    const VkImageCreateInfo image = {\n        .sType = VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO,\n        .pNext = NULL,\n        .imageType = VK_IMAGE_TYPE_2D,\n        .format = depth_format,\n        .extent = {demo->width, demo->height, 1},\n        .mipLevels = 1,\n        .arrayLayers = 1,\n        .samples = VK_SAMPLE_COUNT_1_BIT,\n        .tiling = VK_IMAGE_TILING_OPTIMAL,\n        .usage = VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT,\n        .flags = 0,\n    };\n    VkMemoryAllocateInfo mem_alloc = {\n        .sType = VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO,\n        .pNext = NULL,\n        .allocationSize = 0,\n        .memoryTypeIndex = 0,\n    };\n    VkImageViewCreateInfo view = {\n        .sType = VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO,\n        .pNext = NULL,\n        .image = VK_NULL_HANDLE,\n        .format = depth_format,\n        .subresourceRange = {.aspectMask = VK_IMAGE_ASPECT_DEPTH_BIT,\n                             .baseMipLevel = 0,\n                             .levelCount = 1,\n                             .baseArrayLayer = 0,\n                             .layerCount = 1},\n        .flags = 0,\n        .viewType = VK_IMAGE_VIEW_TYPE_2D,\n    };\n\n    VkMemoryRequirements mem_reqs;\n    VkResult U_ASSERT_ONLY err;\n    bool U_ASSERT_ONLY pass;\n\n    demo->depth.format = depth_format;\n\n    /* create image */\n    err = vkCreateImage(demo->device, &image, NULL, &demo->depth.image);\n    assert(!err);\n\n    /* get memory requirements for this object */\n    vkGetImageMemoryRequirements(demo->device, demo->depth.image, &mem_reqs);\n\n    /* select memory size and type */\n    mem_alloc.allocationSize = mem_reqs.size;\n    pass = memory_type_from_properties(demo, mem_reqs.memoryTypeBits,\n                                       0, /* No requirements */\n                                       &mem_alloc.memoryTypeIndex);\n    assert(pass);\n\n    /* allocate memory */\n    err = vkAllocateMemory(demo->device, &mem_alloc, NULL, &demo->depth.mem);\n    assert(!err);\n\n    /* bind memory */\n    err =\n        vkBindImageMemory(demo->device, demo->depth.image, demo->depth.mem, 0);\n    assert(!err);\n\n    demo_set_image_layout(demo, demo->depth.image, VK_IMAGE_ASPECT_DEPTH_BIT,\n                          VK_IMAGE_LAYOUT_UNDEFINED,\n                          VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL,\n                          0);\n\n    /* create image view */\n    view.image = demo->depth.image;\n    err = vkCreateImageView(demo->device, &view, NULL, &demo->depth.view);\n    assert(!err);\n}\n\nstatic void\ndemo_prepare_texture_image(struct demo *demo, const uint32_t *tex_colors,\n                           struct texture_object *tex_obj, VkImageTiling tiling,\n                           VkImageUsageFlags usage, VkFlags required_props) {\n    const VkFormat tex_format = VK_FORMAT_B8G8R8A8_UNORM;\n    const int32_t tex_width = 2;\n    const int32_t tex_height = 2;\n    VkResult U_ASSERT_ONLY err;\n    bool U_ASSERT_ONLY pass;\n\n    tex_obj->tex_width = tex_width;\n    tex_obj->tex_height = tex_height;\n\n    const VkImageCreateInfo image_create_info = {\n        .sType = VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO,\n        .pNext = NULL,\n        .imageType = VK_IMAGE_TYPE_2D,\n        .format = tex_format,\n        .extent = {tex_width, tex_height, 1},\n        .mipLevels = 1,\n        .arrayLayers = 1,\n        .samples = VK_SAMPLE_COUNT_1_BIT,\n        .tiling = tiling,\n        .usage = usage,\n        .flags = 0,\n        .initialLayout = VK_IMAGE_LAYOUT_PREINITIALIZED\n    };\n    VkMemoryAllocateInfo mem_alloc = {\n        .sType = VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO,\n        .pNext = NULL,\n        .allocationSize = 0,\n        .memoryTypeIndex = 0,\n    };\n\n    VkMemoryRequirements mem_reqs;\n\n    err =\n        vkCreateImage(demo->device, &image_create_info, NULL, &tex_obj->image);\n    assert(!err);\n\n    vkGetImageMemoryRequirements(demo->device, tex_obj->image, &mem_reqs);\n\n    mem_alloc.allocationSize = mem_reqs.size;\n    pass =\n        memory_type_from_properties(demo, mem_reqs.memoryTypeBits,\n                                    required_props, &mem_alloc.memoryTypeIndex);\n    assert(pass);\n\n    /* allocate memory */\n    err = vkAllocateMemory(demo->device, &mem_alloc, NULL, &tex_obj->mem);\n    assert(!err);\n\n    /* bind memory */\n    err = vkBindImageMemory(demo->device, tex_obj->image, tex_obj->mem, 0);\n    assert(!err);\n\n    if (required_props & VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT) {\n        const VkImageSubresource subres = {\n            .aspectMask = VK_IMAGE_ASPECT_COLOR_BIT,\n            .mipLevel = 0,\n            .arrayLayer = 0,\n        };\n        VkSubresourceLayout layout;\n        void *data;\n        int32_t x, y;\n\n        vkGetImageSubresourceLayout(demo->device, tex_obj->image, &subres,\n                                    &layout);\n\n        err = vkMapMemory(demo->device, tex_obj->mem, 0,\n                          mem_alloc.allocationSize, 0, &data);\n        assert(!err);\n\n        for (y = 0; y < tex_height; y++) {\n            uint32_t *row = (uint32_t *)((char *)data + layout.rowPitch * y);\n            for (x = 0; x < tex_width; x++)\n                row[x] = tex_colors[(x & 1) ^ (y & 1)];\n        }\n\n        vkUnmapMemory(demo->device, tex_obj->mem);\n    }\n\n    tex_obj->imageLayout = VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL;\n    demo_set_image_layout(demo, tex_obj->image, VK_IMAGE_ASPECT_COLOR_BIT,\n                          VK_IMAGE_LAYOUT_PREINITIALIZED, tex_obj->imageLayout,\n                          VK_ACCESS_HOST_WRITE_BIT);\n    /* setting the image layout does not reference the actual memory so no need\n     * to add a mem ref */\n}\n\nstatic void demo_destroy_texture_image(struct demo *demo,\n                                       struct texture_object *tex_obj) {\n    /* clean up staging resources */\n    vkDestroyImage(demo->device, tex_obj->image, NULL);\n    vkFreeMemory(demo->device, tex_obj->mem, NULL);\n}\n\nstatic void demo_prepare_textures(struct demo *demo) {\n    const VkFormat tex_format = VK_FORMAT_B8G8R8A8_UNORM;\n    VkFormatProperties props;\n    const uint32_t tex_colors[DEMO_TEXTURE_COUNT][2] = {\n        {0xffff0000, 0xff00ff00},\n    };\n    uint32_t i;\n    VkResult U_ASSERT_ONLY err;\n\n    vkGetPhysicalDeviceFormatProperties(demo->gpu, tex_format, &props);\n\n    for (i = 0; i < DEMO_TEXTURE_COUNT; i++) {\n        if ((props.linearTilingFeatures &\n             VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT) &&\n            !demo->use_staging_buffer) {\n            /* Device can texture using linear textures */\n            demo_prepare_texture_image(\n                demo, tex_colors[i], &demo->textures[i], VK_IMAGE_TILING_LINEAR,\n                VK_IMAGE_USAGE_SAMPLED_BIT,\n                VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT |\n                    VK_MEMORY_PROPERTY_HOST_COHERENT_BIT);\n        } else if (props.optimalTilingFeatures &\n                   VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT) {\n            /* Must use staging buffer to copy linear texture to optimized */\n            struct texture_object staging_texture;\n\n            memset(&staging_texture, 0, sizeof(staging_texture));\n            demo_prepare_texture_image(\n                demo, tex_colors[i], &staging_texture, VK_IMAGE_TILING_LINEAR,\n                VK_IMAGE_USAGE_TRANSFER_SRC_BIT,\n                VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT |\n                    VK_MEMORY_PROPERTY_HOST_COHERENT_BIT);\n\n            demo_prepare_texture_image(\n                demo, tex_colors[i], &demo->textures[i],\n                VK_IMAGE_TILING_OPTIMAL,\n                (VK_IMAGE_USAGE_TRANSFER_DST_BIT | VK_IMAGE_USAGE_SAMPLED_BIT),\n                VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT);\n\n            demo_set_image_layout(demo, staging_texture.image,\n                                  VK_IMAGE_ASPECT_COLOR_BIT,\n                                  staging_texture.imageLayout,\n                                  VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL,\n                                  0);\n\n            demo_set_image_layout(demo, demo->textures[i].image,\n                                  VK_IMAGE_ASPECT_COLOR_BIT,\n                                  demo->textures[i].imageLayout,\n                                  VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL,\n                                  0);\n\n            VkImageCopy copy_region = {\n                .srcSubresource = {VK_IMAGE_ASPECT_COLOR_BIT, 0, 0, 1},\n                .srcOffset = {0, 0, 0},\n                .dstSubresource = {VK_IMAGE_ASPECT_COLOR_BIT, 0, 0, 1},\n                .dstOffset = {0, 0, 0},\n                .extent = {staging_texture.tex_width,\n                           staging_texture.tex_height, 1},\n            };\n            vkCmdCopyImage(\n                demo->setup_cmd, staging_texture.image,\n                VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, demo->textures[i].image,\n                VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, 1, &copy_region);\n\n            demo_set_image_layout(demo, demo->textures[i].image,\n                                  VK_IMAGE_ASPECT_COLOR_BIT,\n                                  VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL,\n                                  demo->textures[i].imageLayout,\n                                  0);\n\n            demo_flush_init_cmd(demo);\n\n            demo_destroy_texture_image(demo, &staging_texture);\n        } else {\n            /* Can't support VK_FORMAT_B8G8R8A8_UNORM !? */\n            assert(!\"No support for B8G8R8A8_UNORM as texture image format\");\n        }\n\n        const VkSamplerCreateInfo sampler = {\n            .sType = VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO,\n            .pNext = NULL,\n            .magFilter = VK_FILTER_NEAREST,\n            .minFilter = VK_FILTER_NEAREST,\n            .mipmapMode = VK_SAMPLER_MIPMAP_MODE_NEAREST,\n            .addressModeU = VK_SAMPLER_ADDRESS_MODE_REPEAT,\n            .addressModeV = VK_SAMPLER_ADDRESS_MODE_REPEAT,\n            .addressModeW = VK_SAMPLER_ADDRESS_MODE_REPEAT,\n            .mipLodBias = 0.0f,\n            .anisotropyEnable = VK_FALSE,\n            .maxAnisotropy = 1,\n            .compareOp = VK_COMPARE_OP_NEVER,\n            .minLod = 0.0f,\n            .maxLod = 0.0f,\n            .borderColor = VK_BORDER_COLOR_FLOAT_OPAQUE_WHITE,\n            .unnormalizedCoordinates = VK_FALSE,\n        };\n        VkImageViewCreateInfo view = {\n            .sType = VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO,\n            .pNext = NULL,\n            .image = VK_NULL_HANDLE,\n            .viewType = VK_IMAGE_VIEW_TYPE_2D,\n            .format = tex_format,\n            .components =\n                {\n                 VK_COMPONENT_SWIZZLE_R, VK_COMPONENT_SWIZZLE_G,\n                 VK_COMPONENT_SWIZZLE_B, VK_COMPONENT_SWIZZLE_A,\n                },\n            .subresourceRange = {VK_IMAGE_ASPECT_COLOR_BIT, 0, 1, 0, 1},\n            .flags = 0,\n        };\n\n        /* create sampler */\n        err = vkCreateSampler(demo->device, &sampler, NULL,\n                              &demo->textures[i].sampler);\n        assert(!err);\n\n        /* create image view */\n        view.image = demo->textures[i].image;\n        err = vkCreateImageView(demo->device, &view, NULL,\n                                &demo->textures[i].view);\n        assert(!err);\n    }\n}\n\nstatic void demo_prepare_vertices(struct demo *demo) {\n    // clang-format off\n    const float vb[3][5] = {\n        /*      position             texcoord */\n        { -1.0f, -1.0f,  0.25f,     0.0f, 0.0f },\n        {  1.0f, -1.0f,  0.25f,     1.0f, 0.0f },\n        {  0.0f,  1.0f,  1.0f,      0.5f, 1.0f },\n    };\n    // clang-format on\n    const VkBufferCreateInfo buf_info = {\n        .sType = VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO,\n        .pNext = NULL,\n        .size = sizeof(vb),\n        .usage = VK_BUFFER_USAGE_VERTEX_BUFFER_BIT,\n        .flags = 0,\n    };\n    VkMemoryAllocateInfo mem_alloc = {\n        .sType = VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO,\n        .pNext = NULL,\n        .allocationSize = 0,\n        .memoryTypeIndex = 0,\n    };\n    VkMemoryRequirements mem_reqs;\n    VkResult U_ASSERT_ONLY err;\n    bool U_ASSERT_ONLY pass;\n    void *data;\n\n    memset(&demo->vertices, 0, sizeof(demo->vertices));\n\n    err = vkCreateBuffer(demo->device, &buf_info, NULL, &demo->vertices.buf);\n    assert(!err);\n\n    vkGetBufferMemoryRequirements(demo->device, demo->vertices.buf, &mem_reqs);\n    assert(!err);\n\n    mem_alloc.allocationSize = mem_reqs.size;\n    pass = memory_type_from_properties(demo, mem_reqs.memoryTypeBits,\n                                       VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT |\n                                           VK_MEMORY_PROPERTY_HOST_COHERENT_BIT,\n                                       &mem_alloc.memoryTypeIndex);\n    assert(pass);\n\n    err = vkAllocateMemory(demo->device, &mem_alloc, NULL, &demo->vertices.mem);\n    assert(!err);\n\n    err = vkMapMemory(demo->device, demo->vertices.mem, 0,\n                      mem_alloc.allocationSize, 0, &data);\n    assert(!err);\n\n    memcpy(data, vb, sizeof(vb));\n\n    vkUnmapMemory(demo->device, demo->vertices.mem);\n\n    err = vkBindBufferMemory(demo->device, demo->vertices.buf,\n                             demo->vertices.mem, 0);\n    assert(!err);\n\n    demo->vertices.vi.sType =\n        VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO;\n    demo->vertices.vi.pNext = NULL;\n    demo->vertices.vi.vertexBindingDescriptionCount = 1;\n    demo->vertices.vi.pVertexBindingDescriptions = demo->vertices.vi_bindings;\n    demo->vertices.vi.vertexAttributeDescriptionCount = 2;\n    demo->vertices.vi.pVertexAttributeDescriptions = demo->vertices.vi_attrs;\n\n    demo->vertices.vi_bindings[0].binding = VERTEX_BUFFER_BIND_ID;\n    demo->vertices.vi_bindings[0].stride = sizeof(vb[0]);\n    demo->vertices.vi_bindings[0].inputRate = VK_VERTEX_INPUT_RATE_VERTEX;\n\n    demo->vertices.vi_attrs[0].binding = VERTEX_BUFFER_BIND_ID;\n    demo->vertices.vi_attrs[0].location = 0;\n    demo->vertices.vi_attrs[0].format = VK_FORMAT_R32G32B32_SFLOAT;\n    demo->vertices.vi_attrs[0].offset = 0;\n\n    demo->vertices.vi_attrs[1].binding = VERTEX_BUFFER_BIND_ID;\n    demo->vertices.vi_attrs[1].location = 1;\n    demo->vertices.vi_attrs[1].format = VK_FORMAT_R32G32_SFLOAT;\n    demo->vertices.vi_attrs[1].offset = sizeof(float) * 3;\n}\n\nstatic void demo_prepare_descriptor_layout(struct demo *demo) {\n    const VkDescriptorSetLayoutBinding layout_binding = {\n        .binding = 0,\n        .descriptorType = VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER,\n        .descriptorCount = DEMO_TEXTURE_COUNT,\n        .stageFlags = VK_SHADER_STAGE_FRAGMENT_BIT,\n        .pImmutableSamplers = NULL,\n    };\n    const VkDescriptorSetLayoutCreateInfo descriptor_layout = {\n        .sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO,\n        .pNext = NULL,\n        .bindingCount = 1,\n        .pBindings = &layout_binding,\n    };\n    VkResult U_ASSERT_ONLY err;\n\n    err = vkCreateDescriptorSetLayout(demo->device, &descriptor_layout, NULL,\n                                      &demo->desc_layout);\n    assert(!err);\n\n    const VkPipelineLayoutCreateInfo pPipelineLayoutCreateInfo = {\n        .sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO,\n        .pNext = NULL,\n        .setLayoutCount = 1,\n        .pSetLayouts = &demo->desc_layout,\n    };\n\n    err = vkCreatePipelineLayout(demo->device, &pPipelineLayoutCreateInfo, NULL,\n                                 &demo->pipeline_layout);\n    assert(!err);\n}\n\nstatic void demo_prepare_render_pass(struct demo *demo) {\n    const VkAttachmentDescription attachments[2] = {\n            [0] =\n                {\n                 .format = demo->format,\n                 .samples = VK_SAMPLE_COUNT_1_BIT,\n                 .loadOp = VK_ATTACHMENT_LOAD_OP_CLEAR,\n                 .storeOp = VK_ATTACHMENT_STORE_OP_STORE,\n                 .stencilLoadOp = VK_ATTACHMENT_LOAD_OP_DONT_CARE,\n                 .stencilStoreOp = VK_ATTACHMENT_STORE_OP_DONT_CARE,\n                 .initialLayout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL,\n                 .finalLayout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL,\n                },\n            [1] =\n                {\n                 .format = demo->depth.format,\n                 .samples = VK_SAMPLE_COUNT_1_BIT,\n                 .loadOp = VK_ATTACHMENT_LOAD_OP_CLEAR,\n                 .storeOp = VK_ATTACHMENT_STORE_OP_DONT_CARE,\n                 .stencilLoadOp = VK_ATTACHMENT_LOAD_OP_DONT_CARE,\n                 .stencilStoreOp = VK_ATTACHMENT_STORE_OP_DONT_CARE,\n                 .initialLayout =\n                     VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL,\n                 .finalLayout =\n                     VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL,\n                },\n    };\n    const VkAttachmentReference color_reference = {\n        .attachment = 0, .layout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL,\n    };\n    const VkAttachmentReference depth_reference = {\n        .attachment = 1,\n        .layout = VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL,\n    };\n    const VkSubpassDescription subpass = {\n        .pipelineBindPoint = VK_PIPELINE_BIND_POINT_GRAPHICS,\n        .flags = 0,\n        .inputAttachmentCount = 0,\n        .pInputAttachments = NULL,\n        .colorAttachmentCount = 1,\n        .pColorAttachments = &color_reference,\n        .pResolveAttachments = NULL,\n        .pDepthStencilAttachment = &depth_reference,\n        .preserveAttachmentCount = 0,\n        .pPreserveAttachments = NULL,\n    };\n    const VkRenderPassCreateInfo rp_info = {\n        .sType = VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO,\n        .pNext = NULL,\n        .attachmentCount = 2,\n        .pAttachments = attachments,\n        .subpassCount = 1,\n        .pSubpasses = &subpass,\n        .dependencyCount = 0,\n        .pDependencies = NULL,\n    };\n    VkResult U_ASSERT_ONLY err;\n\n    err = vkCreateRenderPass(demo->device, &rp_info, NULL, &demo->render_pass);\n    assert(!err);\n}\n\nstatic VkShaderModule\ndemo_prepare_shader_module(struct demo *demo, const void *code, size_t size) {\n    VkShaderModuleCreateInfo moduleCreateInfo;\n    VkShaderModule module;\n    VkResult U_ASSERT_ONLY err;\n\n    moduleCreateInfo.sType = VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO;\n    moduleCreateInfo.pNext = NULL;\n\n    moduleCreateInfo.codeSize = size;\n    moduleCreateInfo.pCode = code;\n    moduleCreateInfo.flags = 0;\n    err = vkCreateShaderModule(demo->device, &moduleCreateInfo, NULL, &module);\n    assert(!err);\n\n    return module;\n}\n\nstatic VkShaderModule demo_prepare_vs(struct demo *demo) {\n    size_t size = sizeof(vertShaderCode);\n\n    demo->vert_shader_module =\n        demo_prepare_shader_module(demo, vertShaderCode, size);\n\n    return demo->vert_shader_module;\n}\n\nstatic VkShaderModule demo_prepare_fs(struct demo *demo) {\n    size_t size = sizeof(fragShaderCode);\n\n    demo->frag_shader_module =\n        demo_prepare_shader_module(demo, fragShaderCode, size);\n\n    return demo->frag_shader_module;\n}\n\nstatic void demo_prepare_pipeline(struct demo *demo) {\n    VkGraphicsPipelineCreateInfo pipeline;\n    VkPipelineCacheCreateInfo pipelineCache;\n\n    VkPipelineVertexInputStateCreateInfo vi;\n    VkPipelineInputAssemblyStateCreateInfo ia;\n    VkPipelineRasterizationStateCreateInfo rs;\n    VkPipelineColorBlendStateCreateInfo cb;\n    VkPipelineDepthStencilStateCreateInfo ds;\n    VkPipelineViewportStateCreateInfo vp;\n    VkPipelineMultisampleStateCreateInfo ms;\n    VkDynamicState dynamicStateEnables[VK_DYNAMIC_STATE_RANGE_SIZE];\n    VkPipelineDynamicStateCreateInfo dynamicState;\n\n    VkResult U_ASSERT_ONLY err;\n\n    memset(dynamicStateEnables, 0, sizeof dynamicStateEnables);\n    memset(&dynamicState, 0, sizeof dynamicState);\n    dynamicState.sType = VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO;\n    dynamicState.pDynamicStates = dynamicStateEnables;\n\n    memset(&pipeline, 0, sizeof(pipeline));\n    pipeline.sType = VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO;\n    pipeline.layout = demo->pipeline_layout;\n\n    vi = demo->vertices.vi;\n\n    memset(&ia, 0, sizeof(ia));\n    ia.sType = VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO;\n    ia.topology = VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST;\n\n    memset(&rs, 0, sizeof(rs));\n    rs.sType = VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO;\n    rs.polygonMode = VK_POLYGON_MODE_FILL;\n    rs.cullMode = VK_CULL_MODE_BACK_BIT;\n    rs.frontFace = VK_FRONT_FACE_CLOCKWISE;\n    rs.depthClampEnable = VK_FALSE;\n    rs.rasterizerDiscardEnable = VK_FALSE;\n    rs.depthBiasEnable = VK_FALSE;\n    rs.lineWidth = 1.0f;\n\n    memset(&cb, 0, sizeof(cb));\n    cb.sType = VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO;\n    VkPipelineColorBlendAttachmentState att_state[1];\n    memset(att_state, 0, sizeof(att_state));\n    att_state[0].colorWriteMask = 0xf;\n    att_state[0].blendEnable = VK_FALSE;\n    cb.attachmentCount = 1;\n    cb.pAttachments = att_state;\n\n    memset(&vp, 0, sizeof(vp));\n    vp.sType = VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO;\n    vp.viewportCount = 1;\n    dynamicStateEnables[dynamicState.dynamicStateCount++] =\n        VK_DYNAMIC_STATE_VIEWPORT;\n    vp.scissorCount = 1;\n    dynamicStateEnables[dynamicState.dynamicStateCount++] =\n        VK_DYNAMIC_STATE_SCISSOR;\n\n    memset(&ds, 0, sizeof(ds));\n    ds.sType = VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO;\n    ds.depthTestEnable = VK_TRUE;\n    ds.depthWriteEnable = VK_TRUE;\n    ds.depthCompareOp = VK_COMPARE_OP_LESS_OR_EQUAL;\n    ds.depthBoundsTestEnable = VK_FALSE;\n    ds.back.failOp = VK_STENCIL_OP_KEEP;\n    ds.back.passOp = VK_STENCIL_OP_KEEP;\n    ds.back.compareOp = VK_COMPARE_OP_ALWAYS;\n    ds.stencilTestEnable = VK_FALSE;\n    ds.front = ds.back;\n\n    memset(&ms, 0, sizeof(ms));\n    ms.sType = VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO;\n    ms.pSampleMask = NULL;\n    ms.rasterizationSamples = VK_SAMPLE_COUNT_1_BIT;\n\n    // Two stages: vs and fs\n    pipeline.stageCount = 2;\n    VkPipelineShaderStageCreateInfo shaderStages[2];\n    memset(&shaderStages, 0, 2 * sizeof(VkPipelineShaderStageCreateInfo));\n\n    shaderStages[0].sType = VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO;\n    shaderStages[0].stage = VK_SHADER_STAGE_VERTEX_BIT;\n    shaderStages[0].module = demo_prepare_vs(demo);\n    shaderStages[0].pName = \"main\";\n\n    shaderStages[1].sType = VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO;\n    shaderStages[1].stage = VK_SHADER_STAGE_FRAGMENT_BIT;\n    shaderStages[1].module = demo_prepare_fs(demo);\n    shaderStages[1].pName = \"main\";\n\n    pipeline.pVertexInputState = &vi;\n    pipeline.pInputAssemblyState = &ia;\n    pipeline.pRasterizationState = &rs;\n    pipeline.pColorBlendState = &cb;\n    pipeline.pMultisampleState = &ms;\n    pipeline.pViewportState = &vp;\n    pipeline.pDepthStencilState = &ds;\n    pipeline.pStages = shaderStages;\n    pipeline.renderPass = demo->render_pass;\n    pipeline.pDynamicState = &dynamicState;\n\n    memset(&pipelineCache, 0, sizeof(pipelineCache));\n    pipelineCache.sType = VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO;\n\n    err = vkCreatePipelineCache(demo->device, &pipelineCache, NULL,\n                                &demo->pipelineCache);\n    assert(!err);\n    err = vkCreateGraphicsPipelines(demo->device, demo->pipelineCache, 1,\n                                    &pipeline, NULL, &demo->pipeline);\n    assert(!err);\n\n    vkDestroyPipelineCache(demo->device, demo->pipelineCache, NULL);\n\n    vkDestroyShaderModule(demo->device, demo->frag_shader_module, NULL);\n    vkDestroyShaderModule(demo->device, demo->vert_shader_module, NULL);\n}\n\nstatic void demo_prepare_descriptor_pool(struct demo *demo) {\n    const VkDescriptorPoolSize type_count = {\n        .type = VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER,\n        .descriptorCount = DEMO_TEXTURE_COUNT,\n    };\n    const VkDescriptorPoolCreateInfo descriptor_pool = {\n        .sType = VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO,\n        .pNext = NULL,\n        .maxSets = 1,\n        .poolSizeCount = 1,\n        .pPoolSizes = &type_count,\n    };\n    VkResult U_ASSERT_ONLY err;\n\n    err = vkCreateDescriptorPool(demo->device, &descriptor_pool, NULL,\n                                 &demo->desc_pool);\n    assert(!err);\n}\n\nstatic void demo_prepare_descriptor_set(struct demo *demo) {\n    VkDescriptorImageInfo tex_descs[DEMO_TEXTURE_COUNT];\n    VkWriteDescriptorSet write;\n    VkResult U_ASSERT_ONLY err;\n    uint32_t i;\n\n    VkDescriptorSetAllocateInfo alloc_info = {\n        .sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO,\n        .pNext = NULL,\n        .descriptorPool = demo->desc_pool,\n        .descriptorSetCount = 1,\n        .pSetLayouts = &demo->desc_layout};\n    err = vkAllocateDescriptorSets(demo->device, &alloc_info, &demo->desc_set);\n    assert(!err);\n\n    memset(&tex_descs, 0, sizeof(tex_descs));\n    for (i = 0; i < DEMO_TEXTURE_COUNT; i++) {\n        tex_descs[i].sampler = demo->textures[i].sampler;\n        tex_descs[i].imageView = demo->textures[i].view;\n        tex_descs[i].imageLayout = VK_IMAGE_LAYOUT_GENERAL;\n    }\n\n    memset(&write, 0, sizeof(write));\n    write.sType = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET;\n    write.dstSet = demo->desc_set;\n    write.descriptorCount = DEMO_TEXTURE_COUNT;\n    write.descriptorType = VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER;\n    write.pImageInfo = tex_descs;\n\n    vkUpdateDescriptorSets(demo->device, 1, &write, 0, NULL);\n}\n\nstatic void demo_prepare_framebuffers(struct demo *demo) {\n    VkImageView attachments[2];\n    attachments[1] = demo->depth.view;\n\n    const VkFramebufferCreateInfo fb_info = {\n        .sType = VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO,\n        .pNext = NULL,\n        .renderPass = demo->render_pass,\n        .attachmentCount = 2,\n        .pAttachments = attachments,\n        .width = demo->width,\n        .height = demo->height,\n        .layers = 1,\n    };\n    VkResult U_ASSERT_ONLY err;\n    uint32_t i;\n\n    demo->framebuffers = (VkFramebuffer *)malloc(demo->swapchainImageCount *\n                                                 sizeof(VkFramebuffer));\n    assert(demo->framebuffers);\n\n    for (i = 0; i < demo->swapchainImageCount; i++) {\n        attachments[0] = demo->buffers[i].view;\n        err = vkCreateFramebuffer(demo->device, &fb_info, NULL,\n                                  &demo->framebuffers[i]);\n        assert(!err);\n    }\n}\n\nstatic void demo_prepare(struct demo *demo) {\n    VkResult U_ASSERT_ONLY err;\n\n    const VkCommandPoolCreateInfo cmd_pool_info = {\n        .sType = VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO,\n        .pNext = NULL,\n        .queueFamilyIndex = demo->graphics_queue_node_index,\n        .flags = VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT,\n    };\n    err = vkCreateCommandPool(demo->device, &cmd_pool_info, NULL,\n                              &demo->cmd_pool);\n    assert(!err);\n\n    const VkCommandBufferAllocateInfo cmd = {\n        .sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO,\n        .pNext = NULL,\n        .commandPool = demo->cmd_pool,\n        .level = VK_COMMAND_BUFFER_LEVEL_PRIMARY,\n        .commandBufferCount = 1,\n    };\n    err = vkAllocateCommandBuffers(demo->device, &cmd, &demo->draw_cmd);\n    assert(!err);\n\n    demo_prepare_buffers(demo);\n    demo_prepare_depth(demo);\n    demo_prepare_textures(demo);\n    demo_prepare_vertices(demo);\n    demo_prepare_descriptor_layout(demo);\n    demo_prepare_render_pass(demo);\n    demo_prepare_pipeline(demo);\n\n    demo_prepare_descriptor_pool(demo);\n    demo_prepare_descriptor_set(demo);\n\n    demo_prepare_framebuffers(demo);\n}\n\nstatic void demo_error_callback(int error, const char* description) {\n    printf(\"GLFW error: %s\\n\", description);\n    fflush(stdout);\n}\n\nstatic void demo_key_callback(GLFWwindow* window, int key, int scancode, int action, int mods) {\n    if (key == GLFW_KEY_ESCAPE && action == GLFW_RELEASE)\n        glfwSetWindowShouldClose(window, GLFW_TRUE);\n}\n\nstatic void demo_refresh_callback(GLFWwindow* window) {\n    struct demo* demo = glfwGetWindowUserPointer(window);\n    demo_draw(demo);\n}\n\nstatic void demo_resize_callback(GLFWwindow* window, int width, int height) {\n    struct demo* demo = glfwGetWindowUserPointer(window);\n    demo->width = width;\n    demo->height = height;\n    demo_resize(demo);\n}\n\nstatic void demo_run(struct demo *demo) {\n    while (!glfwWindowShouldClose(demo->window)) {\n        glfwPollEvents();\n\n        demo_draw(demo);\n\n        if (demo->depthStencil > 0.99f)\n            demo->depthIncrement = -0.001f;\n        if (demo->depthStencil < 0.8f)\n            demo->depthIncrement = 0.001f;\n\n        demo->depthStencil += demo->depthIncrement;\n\n        // Wait for work to finish before updating MVP.\n        vkDeviceWaitIdle(demo->device);\n        demo->curFrame++;\n        if (demo->frameCount != INT32_MAX && demo->curFrame == demo->frameCount)\n            glfwSetWindowShouldClose(demo->window, GLFW_TRUE);\n    }\n}\n\nstatic void demo_create_window(struct demo *demo) {\n    glfwWindowHint(GLFW_CLIENT_API, GLFW_NO_API);\n\n    demo->window = glfwCreateWindow(demo->width,\n                                    demo->height,\n                                    APP_LONG_NAME,\n                                    NULL,\n                                    NULL);\n    if (!demo->window) {\n        // It didn't work, so try to give a useful error:\n        printf(\"Cannot create a window in which to draw!\\n\");\n        fflush(stdout);\n        exit(1);\n    }\n\n    glfwSetWindowUserPointer(demo->window, demo);\n    glfwSetWindowRefreshCallback(demo->window, demo_refresh_callback);\n    glfwSetFramebufferSizeCallback(demo->window, demo_resize_callback);\n    glfwSetKeyCallback(demo->window, demo_key_callback);\n}\n\n/*\n * Return 1 (true) if all layer names specified in check_names\n * can be found in given layer properties.\n */\nstatic VkBool32 demo_check_layers(uint32_t check_count, const char **check_names,\n                                  uint32_t layer_count,\n                                  VkLayerProperties *layers) {\n    uint32_t i, j;\n    for (i = 0; i < check_count; i++) {\n        VkBool32 found = 0;\n        for (j = 0; j < layer_count; j++) {\n            if (!strcmp(check_names[i], layers[j].layerName)) {\n                found = 1;\n                break;\n            }\n        }\n        if (!found) {\n            fprintf(stderr, \"Cannot find layer: %s\\n\", check_names[i]);\n            return 0;\n        }\n    }\n    return 1;\n}\n\nstatic void demo_init_vk(struct demo *demo) {\n    VkResult err;\n    uint32_t i = 0;\n    uint32_t required_extension_count = 0;\n    uint32_t instance_extension_count = 0;\n    uint32_t instance_layer_count = 0;\n    uint32_t validation_layer_count = 0;\n    const char **required_extensions = NULL;\n    const char **instance_validation_layers = NULL;\n    demo->enabled_extension_count = 0;\n    demo->enabled_layer_count = 0;\n\n    char *instance_validation_layers_alt1[] = {\n        \"VK_LAYER_LUNARG_standard_validation\"\n    };\n\n    char *instance_validation_layers_alt2[] = {\n        \"VK_LAYER_GOOGLE_threading\",       \"VK_LAYER_LUNARG_parameter_validation\",\n        \"VK_LAYER_LUNARG_object_tracker\",  \"VK_LAYER_LUNARG_image\",\n        \"VK_LAYER_LUNARG_core_validation\", \"VK_LAYER_LUNARG_swapchain\",\n        \"VK_LAYER_GOOGLE_unique_objects\"\n    };\n\n    /* Look for validation layers */\n    VkBool32 validation_found = 0;\n    if (demo->validate) {\n\n        err = vkEnumerateInstanceLayerProperties(&instance_layer_count, NULL);\n        assert(!err);\n\n        instance_validation_layers = (const char**) instance_validation_layers_alt1;\n        if (instance_layer_count > 0) {\n            VkLayerProperties *instance_layers =\n                    malloc(sizeof (VkLayerProperties) * instance_layer_count);\n            err = vkEnumerateInstanceLayerProperties(&instance_layer_count,\n                    instance_layers);\n            assert(!err);\n\n\n            validation_found = demo_check_layers(\n                    ARRAY_SIZE(instance_validation_layers_alt1),\n                    instance_validation_layers, instance_layer_count,\n                    instance_layers);\n            if (validation_found) {\n                demo->enabled_layer_count = ARRAY_SIZE(instance_validation_layers_alt1);\n                demo->enabled_layers[0] = \"VK_LAYER_LUNARG_standard_validation\";\n                validation_layer_count = 1;\n            } else {\n                // use alternative set of validation layers\n                instance_validation_layers =\n                    (const char**) instance_validation_layers_alt2;\n                demo->enabled_layer_count = ARRAY_SIZE(instance_validation_layers_alt2);\n                validation_found = demo_check_layers(\n                    ARRAY_SIZE(instance_validation_layers_alt2),\n                    instance_validation_layers, instance_layer_count,\n                    instance_layers);\n                validation_layer_count =\n                    ARRAY_SIZE(instance_validation_layers_alt2);\n                for (i = 0; i < validation_layer_count; i++) {\n                    demo->enabled_layers[i] = instance_validation_layers[i];\n                }\n            }\n            free(instance_layers);\n        }\n\n        if (!validation_found) {\n            ERR_EXIT(\"vkEnumerateInstanceLayerProperties failed to find \"\n                    \"required validation layer.\\n\\n\"\n                    \"Please look at the Getting Started guide for additional \"\n                    \"information.\\n\",\n                    \"vkCreateInstance Failure\");\n        }\n    }\n\n    /* Look for instance extensions */\n    required_extensions = glfwGetRequiredInstanceExtensions(&required_extension_count);\n    if (!required_extensions) {\n        ERR_EXIT(\"glfwGetRequiredInstanceExtensions failed to find the \"\n                 \"platform surface extensions.\\n\\nDo you have a compatible \"\n                 \"Vulkan installable client driver (ICD) installed?\\nPlease \"\n                 \"look at the Getting Started guide for additional \"\n                 \"information.\\n\",\n                 \"vkCreateInstance Failure\");\n    }\n\n    for (i = 0; i < required_extension_count; i++) {\n        demo->extension_names[demo->enabled_extension_count++] = required_extensions[i];\n        assert(demo->enabled_extension_count < 64);\n    }\n\n    err = vkEnumerateInstanceExtensionProperties(\n        NULL, &instance_extension_count, NULL);\n    assert(!err);\n\n    if (instance_extension_count > 0) {\n        VkExtensionProperties *instance_extensions =\n            malloc(sizeof(VkExtensionProperties) * instance_extension_count);\n        err = vkEnumerateInstanceExtensionProperties(\n            NULL, &instance_extension_count, instance_extensions);\n        assert(!err);\n        for (i = 0; i < instance_extension_count; i++) {\n            if (!strcmp(VK_EXT_DEBUG_REPORT_EXTENSION_NAME,\n                        instance_extensions[i].extensionName)) {\n                if (demo->validate) {\n                    demo->extension_names[demo->enabled_extension_count++] =\n                        VK_EXT_DEBUG_REPORT_EXTENSION_NAME;\n                }\n            }\n            assert(demo->enabled_extension_count < 64);\n        }\n\n        free(instance_extensions);\n    }\n\n    const VkApplicationInfo app = {\n        .sType = VK_STRUCTURE_TYPE_APPLICATION_INFO,\n        .pNext = NULL,\n        .pApplicationName = APP_SHORT_NAME,\n        .applicationVersion = 0,\n        .pEngineName = APP_SHORT_NAME,\n        .engineVersion = 0,\n        .apiVersion = VK_API_VERSION_1_0,\n    };\n    VkInstanceCreateInfo inst_info = {\n        .sType = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO,\n        .pNext = NULL,\n        .pApplicationInfo = &app,\n        .enabledLayerCount = demo->enabled_layer_count,\n        .ppEnabledLayerNames = (const char *const *)instance_validation_layers,\n        .enabledExtensionCount = demo->enabled_extension_count,\n        .ppEnabledExtensionNames = (const char *const *)demo->extension_names,\n    };\n\n    uint32_t gpu_count;\n\n    err = vkCreateInstance(&inst_info, NULL, &demo->inst);\n    if (err == VK_ERROR_INCOMPATIBLE_DRIVER) {\n        ERR_EXIT(\"Cannot find a compatible Vulkan installable client driver \"\n                 \"(ICD).\\n\\nPlease look at the Getting Started guide for \"\n                 \"additional information.\\n\",\n                 \"vkCreateInstance Failure\");\n    } else if (err == VK_ERROR_EXTENSION_NOT_PRESENT) {\n        ERR_EXIT(\"Cannot find a specified extension library\"\n                 \".\\nMake sure your layers path is set appropriately\\n\",\n                 \"vkCreateInstance Failure\");\n    } else if (err) {\n        ERR_EXIT(\"vkCreateInstance failed.\\n\\nDo you have a compatible Vulkan \"\n                 \"installable client driver (ICD) installed?\\nPlease look at \"\n                 \"the Getting Started guide for additional information.\\n\",\n                 \"vkCreateInstance Failure\");\n    }\n\n    gladLoadVulkanUserPtr(NULL, glad_vulkan_callback, demo->inst);\n\n    /* Make initial call to query gpu_count, then second call for gpu info*/\n    err = vkEnumeratePhysicalDevices(demo->inst, &gpu_count, NULL);\n    assert(!err && gpu_count > 0);\n\n    if (gpu_count > 0) {\n        VkPhysicalDevice *physical_devices =\n            malloc(sizeof(VkPhysicalDevice) * gpu_count);\n        err = vkEnumeratePhysicalDevices(demo->inst, &gpu_count,\n                                         physical_devices);\n        assert(!err);\n        /* For tri demo we just grab the first physical device */\n        demo->gpu = physical_devices[0];\n        free(physical_devices);\n    } else {\n        ERR_EXIT(\"vkEnumeratePhysicalDevices reported zero accessible devices.\"\n                 \"\\n\\nDo you have a compatible Vulkan installable client\"\n                 \" driver (ICD) installed?\\nPlease look at the Getting Started\"\n                 \" guide for additional information.\\n\",\n                 \"vkEnumeratePhysicalDevices Failure\");\n    }\n\n    gladLoadVulkanUserPtr(demo->gpu, glad_vulkan_callback, demo->inst);\n\n    /* Look for device extensions */\n    uint32_t device_extension_count = 0;\n    VkBool32 swapchainExtFound = 0;\n    demo->enabled_extension_count = 0;\n\n    err = vkEnumerateDeviceExtensionProperties(demo->gpu, NULL,\n                                               &device_extension_count, NULL);\n    assert(!err);\n\n    if (device_extension_count > 0) {\n        VkExtensionProperties *device_extensions =\n                malloc(sizeof(VkExtensionProperties) * device_extension_count);\n        err = vkEnumerateDeviceExtensionProperties(\n            demo->gpu, NULL, &device_extension_count, device_extensions);\n        assert(!err);\n\n        for (i = 0; i < device_extension_count; i++) {\n            if (!strcmp(VK_KHR_SWAPCHAIN_EXTENSION_NAME,\n                        device_extensions[i].extensionName)) {\n                swapchainExtFound = 1;\n                demo->extension_names[demo->enabled_extension_count++] =\n                    VK_KHR_SWAPCHAIN_EXTENSION_NAME;\n            }\n            assert(demo->enabled_extension_count < 64);\n        }\n\n        free(device_extensions);\n    }\n\n    if (!swapchainExtFound) {\n        ERR_EXIT(\"vkEnumerateDeviceExtensionProperties failed to find \"\n                 \"the \" VK_KHR_SWAPCHAIN_EXTENSION_NAME\n                 \" extension.\\n\\nDo you have a compatible \"\n                 \"Vulkan installable client driver (ICD) installed?\\nPlease \"\n                 \"look at the Getting Started guide for additional \"\n                 \"information.\\n\",\n                 \"vkCreateInstance Failure\");\n    }\n\n    if (demo->validate) {\n        VkDebugReportCallbackCreateInfoEXT dbgCreateInfo;\n        dbgCreateInfo.sType = VK_STRUCTURE_TYPE_DEBUG_REPORT_CREATE_INFO_EXT;\n        dbgCreateInfo.flags =\n            VK_DEBUG_REPORT_ERROR_BIT_EXT | VK_DEBUG_REPORT_WARNING_BIT_EXT;\n        dbgCreateInfo.pfnCallback = demo->use_break ? BreakCallback : dbgFunc;\n        dbgCreateInfo.pUserData = demo;\n        dbgCreateInfo.pNext = NULL;\n        err = vkCreateDebugReportCallbackEXT(demo->inst, &dbgCreateInfo, NULL,\n                                             &demo->msg_callback);\n        switch (err) {\n        case VK_SUCCESS:\n            break;\n        case VK_ERROR_OUT_OF_HOST_MEMORY:\n            ERR_EXIT(\"CreateDebugReportCallback: out of host memory\\n\",\n                     \"CreateDebugReportCallback Failure\");\n            break;\n        default:\n            ERR_EXIT(\"CreateDebugReportCallback: unknown failure\\n\",\n                     \"CreateDebugReportCallback Failure\");\n            break;\n        }\n    }\n\n    vkGetPhysicalDeviceProperties(demo->gpu, &demo->gpu_props);\n\n    // Query with NULL data to get count\n    vkGetPhysicalDeviceQueueFamilyProperties(demo->gpu, &demo->queue_count,\n                                             NULL);\n\n    demo->queue_props = (VkQueueFamilyProperties *)malloc(\n        demo->queue_count * sizeof(VkQueueFamilyProperties));\n    vkGetPhysicalDeviceQueueFamilyProperties(demo->gpu, &demo->queue_count,\n                                             demo->queue_props);\n    assert(demo->queue_count >= 1);\n\n    vkGetPhysicalDeviceFeatures(demo->gpu, &demo->gpu_features);\n\n    // Graphics queue and MemMgr queue can be separate.\n    // TODO: Add support for separate queues, including synchronization,\n    //       and appropriate tracking for QueueSubmit\n}\n\nstatic void demo_init_device(struct demo *demo) {\n    VkResult U_ASSERT_ONLY err;\n\n    float queue_priorities[1] = {0.0};\n    const VkDeviceQueueCreateInfo queue = {\n        .sType = VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO,\n        .pNext = NULL,\n        .queueFamilyIndex = demo->graphics_queue_node_index,\n        .queueCount = 1,\n        .pQueuePriorities = queue_priorities};\n\n\n    VkPhysicalDeviceFeatures features;\n    memset(&features, 0, sizeof(features));\n    if (demo->gpu_features.shaderClipDistance) {\n        features.shaderClipDistance = VK_TRUE;\n    }\n\n    VkDeviceCreateInfo device = {\n        .sType = VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO,\n        .pNext = NULL,\n        .queueCreateInfoCount = 1,\n        .pQueueCreateInfos = &queue,\n        .enabledLayerCount = 0,\n        .ppEnabledLayerNames = NULL,\n        .enabledExtensionCount = demo->enabled_extension_count,\n        .ppEnabledExtensionNames = (const char *const *)demo->extension_names,\n        .pEnabledFeatures = &features,\n    };\n\n    err = vkCreateDevice(demo->gpu, &device, NULL, &demo->device);\n    assert(!err);\n}\n\nstatic void demo_init_vk_swapchain(struct demo *demo) {\n    VkResult U_ASSERT_ONLY err;\n    uint32_t i;\n\n    // Create a WSI surface for the window:\n    glfwCreateWindowSurface(demo->inst, demo->window, NULL, &demo->surface);\n\n    // Iterate over each queue to learn whether it supports presenting:\n    VkBool32 *supportsPresent =\n        (VkBool32 *)malloc(demo->queue_count * sizeof(VkBool32));\n    for (i = 0; i < demo->queue_count; i++) {\n        vkGetPhysicalDeviceSurfaceSupportKHR(demo->gpu, i, demo->surface,\n                                             &supportsPresent[i]);\n    }\n\n    // Search for a graphics and a present queue in the array of queue\n    // families, try to find one that supports both\n    uint32_t graphicsQueueNodeIndex = UINT32_MAX;\n    uint32_t presentQueueNodeIndex = UINT32_MAX;\n    for (i = 0; i < demo->queue_count; i++) {\n        if ((demo->queue_props[i].queueFlags & VK_QUEUE_GRAPHICS_BIT) != 0) {\n            if (graphicsQueueNodeIndex == UINT32_MAX) {\n                graphicsQueueNodeIndex = i;\n            }\n\n            if (supportsPresent[i] == VK_TRUE) {\n                graphicsQueueNodeIndex = i;\n                presentQueueNodeIndex = i;\n                break;\n            }\n        }\n    }\n    if (presentQueueNodeIndex == UINT32_MAX) {\n        // If didn't find a queue that supports both graphics and present, then\n        // find a separate present queue.\n        for (i = 0; i < demo->queue_count; ++i) {\n            if (supportsPresent[i] == VK_TRUE) {\n                presentQueueNodeIndex = i;\n                break;\n            }\n        }\n    }\n    free(supportsPresent);\n\n    // Generate error if could not find both a graphics and a present queue\n    if (graphicsQueueNodeIndex == UINT32_MAX ||\n        presentQueueNodeIndex == UINT32_MAX) {\n        ERR_EXIT(\"Could not find a graphics and a present queue\\n\",\n                 \"Swapchain Initialization Failure\");\n    }\n\n    // TODO: Add support for separate queues, including presentation,\n    //       synchronization, and appropriate tracking for QueueSubmit.\n    // NOTE: While it is possible for an application to use a separate graphics\n    //       and a present queues, this demo program assumes it is only using\n    //       one:\n    if (graphicsQueueNodeIndex != presentQueueNodeIndex) {\n        ERR_EXIT(\"Could not find a common graphics and a present queue\\n\",\n                 \"Swapchain Initialization Failure\");\n    }\n\n    demo->graphics_queue_node_index = graphicsQueueNodeIndex;\n\n    demo_init_device(demo);\n\n    vkGetDeviceQueue(demo->device, demo->graphics_queue_node_index, 0,\n                     &demo->queue);\n\n    // Get the list of VkFormat's that are supported:\n    uint32_t formatCount;\n    err = vkGetPhysicalDeviceSurfaceFormatsKHR(demo->gpu, demo->surface,\n                                               &formatCount, NULL);\n    assert(!err);\n    VkSurfaceFormatKHR *surfFormats =\n        (VkSurfaceFormatKHR *)malloc(formatCount * sizeof(VkSurfaceFormatKHR));\n    err = vkGetPhysicalDeviceSurfaceFormatsKHR(demo->gpu, demo->surface,\n                                               &formatCount, surfFormats);\n    assert(!err);\n    // If the format list includes just one entry of VK_FORMAT_UNDEFINED,\n    // the surface has no preferred format.  Otherwise, at least one\n    // supported format will be returned.\n    if (formatCount == 1 && surfFormats[0].format == VK_FORMAT_UNDEFINED) {\n        demo->format = VK_FORMAT_B8G8R8A8_UNORM;\n    } else {\n        assert(formatCount >= 1);\n        demo->format = surfFormats[0].format;\n    }\n    demo->color_space = surfFormats[0].colorSpace;\n\n    demo->curFrame = 0;\n\n    // Get Memory information and properties\n    vkGetPhysicalDeviceMemoryProperties(demo->gpu, &demo->memory_properties);\n}\n\nstatic void demo_init_connection(struct demo *demo) {\n    glfwSetErrorCallback(demo_error_callback);\n\n    if (!glfwInit()) {\n        printf(\"Cannot initialize GLFW.\\nExiting ...\\n\");\n        fflush(stdout);\n        exit(1);\n    }\n\n    if (!glfwVulkanSupported()) {\n        printf(\"GLFW failed to find the Vulkan loader.\\nExiting ...\\n\");\n        fflush(stdout);\n        exit(1);\n    }\n\n    gladLoadVulkanUserPtr(NULL, glad_vulkan_callback, NULL);\n}\n\nstatic void demo_init(struct demo *demo, const int argc, const char *argv[])\n{\n    int i;\n    memset(demo, 0, sizeof(*demo));\n    demo->frameCount = INT32_MAX;\n\n    for (i = 1; i < argc; i++) {\n        if (strcmp(argv[i], \"--use_staging\") == 0) {\n            demo->use_staging_buffer = true;\n            continue;\n        }\n        if (strcmp(argv[i], \"--break\") == 0) {\n            demo->use_break = true;\n            continue;\n        }\n        if (strcmp(argv[i], \"--validate\") == 0) {\n            demo->validate = true;\n            continue;\n        }\n        if (strcmp(argv[i], \"--c\") == 0 && demo->frameCount == INT32_MAX &&\n            i < argc - 1 && sscanf(argv[i + 1], \"%d\", &demo->frameCount) == 1 &&\n            demo->frameCount >= 0) {\n            i++;\n            continue;\n        }\n\n        fprintf(stderr, \"Usage:\\n  %s [--use_staging] [--validate] [--break] \"\n                        \"[--c <framecount>]\\n\",\n                APP_SHORT_NAME);\n        fflush(stderr);\n        exit(1);\n    }\n\n    demo_init_connection(demo);\n    demo_init_vk(demo);\n\n    demo->width = 300;\n    demo->height = 300;\n    demo->depthStencil = 1.0;\n    demo->depthIncrement = -0.01f;\n}\n\nstatic void demo_cleanup(struct demo *demo) {\n    uint32_t i;\n\n    for (i = 0; i < demo->swapchainImageCount; i++) {\n        vkDestroyFramebuffer(demo->device, demo->framebuffers[i], NULL);\n    }\n    free(demo->framebuffers);\n    vkDestroyDescriptorPool(demo->device, demo->desc_pool, NULL);\n\n    if (demo->setup_cmd) {\n        vkFreeCommandBuffers(demo->device, demo->cmd_pool, 1, &demo->setup_cmd);\n    }\n    vkFreeCommandBuffers(demo->device, demo->cmd_pool, 1, &demo->draw_cmd);\n    vkDestroyCommandPool(demo->device, demo->cmd_pool, NULL);\n\n    vkDestroyPipeline(demo->device, demo->pipeline, NULL);\n    vkDestroyRenderPass(demo->device, demo->render_pass, NULL);\n    vkDestroyPipelineLayout(demo->device, demo->pipeline_layout, NULL);\n    vkDestroyDescriptorSetLayout(demo->device, demo->desc_layout, NULL);\n\n    vkDestroyBuffer(demo->device, demo->vertices.buf, NULL);\n    vkFreeMemory(demo->device, demo->vertices.mem, NULL);\n\n    for (i = 0; i < DEMO_TEXTURE_COUNT; i++) {\n        vkDestroyImageView(demo->device, demo->textures[i].view, NULL);\n        vkDestroyImage(demo->device, demo->textures[i].image, NULL);\n        vkFreeMemory(demo->device, demo->textures[i].mem, NULL);\n        vkDestroySampler(demo->device, demo->textures[i].sampler, NULL);\n    }\n\n    for (i = 0; i < demo->swapchainImageCount; i++) {\n        vkDestroyImageView(demo->device, demo->buffers[i].view, NULL);\n    }\n\n    vkDestroyImageView(demo->device, demo->depth.view, NULL);\n    vkDestroyImage(demo->device, demo->depth.image, NULL);\n    vkFreeMemory(demo->device, demo->depth.mem, NULL);\n\n    vkDestroySwapchainKHR(demo->device, demo->swapchain, NULL);\n    free(demo->buffers);\n\n    vkDestroyDevice(demo->device, NULL);\n    if (demo->validate) {\n        vkDestroyDebugReportCallbackEXT(demo->inst, demo->msg_callback, NULL);\n    }\n    vkDestroySurfaceKHR(demo->inst, demo->surface, NULL);\n    vkDestroyInstance(demo->inst, NULL);\n\n    free(demo->queue_props);\n\n    glfwDestroyWindow(demo->window);\n    glfwTerminate();\n}\n\nstatic void demo_resize(struct demo *demo) {\n    uint32_t i;\n\n    // In order to properly resize the window, we must re-create the swapchain\n    // AND redo the command buffers, etc.\n    //\n    // First, perform part of the demo_cleanup() function:\n\n    for (i = 0; i < demo->swapchainImageCount; i++) {\n        vkDestroyFramebuffer(demo->device, demo->framebuffers[i], NULL);\n    }\n    free(demo->framebuffers);\n    vkDestroyDescriptorPool(demo->device, demo->desc_pool, NULL);\n\n    if (demo->setup_cmd) {\n        vkFreeCommandBuffers(demo->device, demo->cmd_pool, 1, &demo->setup_cmd);\n        demo->setup_cmd = VK_NULL_HANDLE;\n    }\n    vkFreeCommandBuffers(demo->device, demo->cmd_pool, 1, &demo->draw_cmd);\n    vkDestroyCommandPool(demo->device, demo->cmd_pool, NULL);\n\n    vkDestroyPipeline(demo->device, demo->pipeline, NULL);\n    vkDestroyRenderPass(demo->device, demo->render_pass, NULL);\n    vkDestroyPipelineLayout(demo->device, demo->pipeline_layout, NULL);\n    vkDestroyDescriptorSetLayout(demo->device, demo->desc_layout, NULL);\n\n    vkDestroyBuffer(demo->device, demo->vertices.buf, NULL);\n    vkFreeMemory(demo->device, demo->vertices.mem, NULL);\n\n    for (i = 0; i < DEMO_TEXTURE_COUNT; i++) {\n        vkDestroyImageView(demo->device, demo->textures[i].view, NULL);\n        vkDestroyImage(demo->device, demo->textures[i].image, NULL);\n        vkFreeMemory(demo->device, demo->textures[i].mem, NULL);\n        vkDestroySampler(demo->device, demo->textures[i].sampler, NULL);\n    }\n\n    for (i = 0; i < demo->swapchainImageCount; i++) {\n        vkDestroyImageView(demo->device, demo->buffers[i].view, NULL);\n    }\n\n    vkDestroyImageView(demo->device, demo->depth.view, NULL);\n    vkDestroyImage(demo->device, demo->depth.image, NULL);\n    vkFreeMemory(demo->device, demo->depth.mem, NULL);\n\n    free(demo->buffers);\n\n    // Second, re-perform the demo_prepare() function, which will re-create the\n    // swapchain:\n    demo_prepare(demo);\n}\n\nint main(const int argc, const char *argv[]) {\n    struct demo demo;\n\n    demo_init(&demo, argc, argv);\n    demo_create_window(&demo);\n    demo_init_vk_swapchain(&demo);\n\n    demo_prepare(&demo);\n    demo_run(&demo);\n\n    demo_cleanup(&demo);\n\n    return validation_error;\n}\n\n"
  },
  {
    "path": "thirdparty/glfw/tests/windows.c",
    "content": "//========================================================================\n// Simple multi-window test\n// Copyright (c) Camilla Löwy <elmindreda@glfw.org>\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//    claim that you wrote the original software. If you use this software\n//    in a product, an acknowledgment in the product documentation would\n//    be appreciated but is not required.\n//\n// 2. Altered source versions must be plainly marked as such, and must not\n//    be misrepresented as being the original software.\n//\n// 3. This notice may not be removed or altered from any source\n//    distribution.\n//\n//========================================================================\n//\n// This test creates four windows and clears each in a different color\n//\n//========================================================================\n\n#include <glad/gl.h>\n#define GLFW_INCLUDE_NONE\n#include <GLFW/glfw3.h>\n\n#include <stdio.h>\n#include <stdlib.h>\n\n#include \"getopt.h\"\n\nstatic const char* titles[] =\n{\n    \"Red\",\n    \"Green\",\n    \"Blue\",\n    \"Yellow\"\n};\n\nstatic const struct\n{\n    float r, g, b;\n} colors[] =\n{\n    { 0.95f, 0.32f, 0.11f },\n    { 0.50f, 0.80f, 0.16f },\n    {   0.f, 0.68f, 0.94f },\n    { 0.98f, 0.74f, 0.04f }\n};\n\nstatic void usage(void)\n{\n    printf(\"Usage: windows [-h] [-b] [-f] \\n\");\n    printf(\"Options:\\n\");\n    printf(\"  -b create decorated windows\\n\");\n    printf(\"  -f set focus on show off for all but first window\\n\");\n    printf(\"  -h show this help\\n\");\n}\n\nstatic void error_callback(int error, const char* description)\n{\n    fprintf(stderr, \"Error: %s\\n\", description);\n}\n\nstatic void key_callback(GLFWwindow* window, int key, int scancode, int action, int mods)\n{\n    if (action != GLFW_PRESS)\n        return;\n\n    switch (key)\n    {\n        case GLFW_KEY_SPACE:\n        {\n            int xpos, ypos;\n            glfwGetWindowPos(window, &xpos, &ypos);\n            glfwSetWindowPos(window, xpos, ypos);\n            break;\n        }\n\n        case GLFW_KEY_ESCAPE:\n            glfwSetWindowShouldClose(window, GLFW_TRUE);\n            break;\n    }\n}\n\nint main(int argc, char** argv)\n{\n    int i, ch;\n    int decorated = GLFW_FALSE;\n    int focusOnShow = GLFW_TRUE;\n    int running = GLFW_TRUE;\n    GLFWwindow* windows[4];\n\n    while ((ch = getopt(argc, argv, \"bfh\")) != -1)\n    {\n        switch (ch)\n        {\n            case 'b':\n                decorated = GLFW_TRUE;\n                break;\n            case 'f':\n                focusOnShow = GLFW_FALSE;\n                break;\n            case 'h':\n                usage();\n                exit(EXIT_SUCCESS);\n            default:\n                usage();\n                exit(EXIT_FAILURE);\n        }\n    }\n\n    glfwSetErrorCallback(error_callback);\n\n    if (!glfwInit())\n        exit(EXIT_FAILURE);\n\n    glfwWindowHint(GLFW_DECORATED, decorated);\n    glfwWindowHint(GLFW_VISIBLE, GLFW_FALSE);\n\n    for (i = 0;  i < 4;  i++)\n    {\n        int left, top, right, bottom;\n        if (i)\n            glfwWindowHint(GLFW_FOCUS_ON_SHOW, focusOnShow);\n\n        windows[i] = glfwCreateWindow(200, 200, titles[i], NULL, NULL);\n        if (!windows[i])\n        {\n            glfwTerminate();\n            exit(EXIT_FAILURE);\n        }\n\n        glfwSetKeyCallback(windows[i], key_callback);\n\n        glfwMakeContextCurrent(windows[i]);\n        gladLoadGL(glfwGetProcAddress);\n        glClearColor(colors[i].r, colors[i].g, colors[i].b, 1.f);\n\n        glfwGetWindowFrameSize(windows[i], &left, &top, &right, &bottom);\n        glfwSetWindowPos(windows[i],\n                         100 + (i & 1) * (200 + left + right),\n                         100 + (i >> 1) * (200 + top + bottom));\n    }\n\n    for (i = 0;  i < 4;  i++)\n        glfwShowWindow(windows[i]);\n\n    while (running)\n    {\n        for (i = 0;  i < 4;  i++)\n        {\n            glfwMakeContextCurrent(windows[i]);\n            glClear(GL_COLOR_BUFFER_BIT);\n            glfwSwapBuffers(windows[i]);\n\n            if (glfwWindowShouldClose(windows[i]))\n                running = GLFW_FALSE;\n        }\n\n        glfwWaitEvents();\n    }\n\n    glfwTerminate();\n    exit(EXIT_SUCCESS);\n}\n\n"
  },
  {
    "path": "thirdparty/portaudio/.editorconfig",
    "content": "# EditorConfig info: https://editorconfig.org/\nroot = true\n\n[Makefile*]\nindent_style = tab\n\n[*.{c,cpp,h,cxx,hxx}]\nindent_style = space\nindent_size = 4\ncharset = utf-8\ntrim_trailing_whitespace = true\ninsert_final_newline = true\nmax_line_length = 120\n"
  },
  {
    "path": "thirdparty/portaudio/.gitattributes",
    "content": "# Set the default behavior, in case people don't have core.autocrlf set.\n* text=auto\n\n# Explicitly declare text files you want to always be normalized and converted\n# to native line endings on checkout.\n*.c text\n*.h text\n*.cpp text\n*.hpp text\n*.fth text\n*.java text\n*.f text\n*.txt text\n*.dox text\n*.m text\n\n# Declare files that will always have CRLF line endings on checkout.\n*.sln text eol=crlf\n*.def text eol=crlf\n*.dsp text eol=crlf\n*.dsw text eol=crlf\n*.vcproj text eol=crlf\n*.sln text eol=crlf\n*.doc text eol=crlf\n*.bat text eol=crlf\n\n# Denote all files that are truly binary and should not be modified.\n*.dic binary\n*.odt binary\n*.pdf binary\n*.png binary\n*.jpg binary\n*.wav binary\n*.la binary\nconfig.guess binary\nconfig.status binary\nconfig.sub binary\nconfigure binary\ndepcomp binary\ninstall-sh binary\nlibtool binary\nmissing binary\n\n"
  },
  {
    "path": "thirdparty/portaudio/.github/ISSUE_TEMPLATE/bug_report.md",
    "content": "---\nname: Bug report\nabout: Create a report to help us improve\ntitle: ''\nlabels: ''\nassignees: ''\n\n---\n\n(Please use the mailing list for support requests and general discussion. This is only for actual bugs.)\n\n**Describe the bug**\nA clear and concise description of what the bug is.\n\n**To Reproduce**\nSteps to reproduce the behavior. Include code if applicable.\n1. \n\n**Expected behavior**\nA clear and concise description of what you expected to happen.\n\n**Actual behavior**\nWhat actually happened.\nInclude a recording if helpful.\nError messages or logs longer than a page should be attached as a .txt file.\n\n**Desktop (please complete the following information):**\n - OS: [e.g. Mac OS]\n - OS Version [e.g. 22]\n - PortAudio version: stable, nightly snapshot (which?), current (please give date and/or Git hash):\n - If Windows or Linux, which Host API (e.g. WASAPI):\n\n**Additional context**\nAdd any other context about the problem here.\n"
  },
  {
    "path": "thirdparty/portaudio/.github/workflows/MSBuild.yml",
    "content": "name: MSBuild MSVC Project File CI\n\non: [push, pull_request]\n\nenv:\n  # Path to the solution file relative to the root of the project.\n  SOLUTION_FILE_PATH: ./build/msvc/portaudio.sln\n  VCPROJ_FILE_PATH: ./build/msvc/portaudio.vcproj\n  VCXPROJ_FILE_PATH: ./build/msvc/portaudio.vcxproj\n  VCXPROJ_FILTERS_FILE_PATH: ./build/msvc/portaudio.vcxproj.filters\n  VCXPROJ_USER_FILE_PATH: ./build/msvc/portaudio.vcxproj.user\n  DEF_FILE_PATH: ./build/msvc/portaudio.def\n\njobs:\n  build:\n    runs-on: windows-latest\n    strategy:\n      matrix:\n        BUILD_CONFIGURATION: [Release]\n        BUILD_PLATFORM: [Win32, x64]\n\n    steps:\n    - name: Add MSBuild to PATH\n      uses: microsoft/setup-msbuild@v1\n\n    - uses: actions/checkout@v2\n\n    - name: Upgrade VC Project File\n      # We maintain our vcproj file in an old format to maintain backwards compatibility\n      # This step upgrades the project to the latest version of MSVC\n      # see https://docs.microsoft.com/en-us/visualstudio/ide/reference/upgrade-devenv-exe?view=vs-2019\n      # pipe to file to ensure that it terminates https://stackoverflow.com/questions/48896010/occasionally-occurring-msbuild-error-msb3428/48918105#48918105\n      # discussion of using vswhere.exe here: https://stackoverflow.com/questions/65287456/how-to-upgrade-a-visual-studio-project-from-within-a-github-action/65311868#65311868\n      run: |\n        $devenv = & vswhere.exe '-property' productPath\n        Write-Output \"$devenv\"\n        & $devenv \"${{env.VCPROJ_FILE_PATH}}\" /Upgrade /NoSplash | Out-Null\n        Write-Output \"devenv launched\"\n        while (!(Test-Path \"${{env.VCXPROJ_FILE_PATH}}\")) { Start-Sleep -Seconds 10 }\n        Write-Output \"vcxproj found\"\n        while (!(Test-Path \"${{env.VCXPROJ_FILTERS_FILE_PATH}}\")) { Start-Sleep -Seconds 10 }\n        Write-Output \"vcxproj.filters found\"\n        Start-Sleep -Seconds 10\n        Write-Output \"done.\"\n\n    - name: Remove ASIO Files and Enable PA_USE_DS=1\n      # Process the project files to remove ASIO-related sources and includes (since we can not access the ASIO SDK in a public build)\n      run: |\n        # Process .vcxproj file: remove source files\n        $xdoc = new-object System.Xml.XmlDocument\n        $vcxprojFile = resolve-path(\"${{env.VCXPROJ_FILE_PATH}}\")\n        $xdoc.load($vcxprojFile)\n        $namespace = New-Object -TypeName \"Xml.XmlNamespaceManager\" -ArgumentList $xdoc.NameTable\n        $namespace.AddNamespace(\"vs\", $xdoc.DocumentElement.NamespaceURI)\n        $nodes = $xdoc.SelectNodes(\"//vs:ClCompile[contains(@Include, '..\\src\\hostapi\\asio')]\", $namespace)\n        Write-Output \"deleting ASIO related compilation nodes from .vcxproj:\"\n        Write-Output $nodes\n        ForEach($node in $nodes) {\n          $parent = $node.ParentNode\n          $parent.RemoveChild($node)\n        }\n        # Enable DirectSound host API\n        $nodes = $xdoc.SelectNodes(\"//vs:PreprocessorDefinitions[contains(., 'PA_USE_DS=0')]\", $namespace)\n        ForEach($node in $nodes) {\n          $text = $node.InnerText\n          $node.InnerText = $text -replace 'PA_USE_DS=0', 'PA_USE_DS=1'\n        }\n        $xdoc.save($vcxprojFile)\n        # Process .vcxproj.filters file: remove source files and includes\n        $vcxprojFiltersFile = resolve-path(\"${{env.VCXPROJ_FILTERS_FILE_PATH}}\")\n        $xdoc.load($vcxprojFiltersFile)\n        $namespace = New-Object -TypeName \"Xml.XmlNamespaceManager\" -ArgumentList $xdoc.NameTable\n        $namespace.AddNamespace(\"vs\", $xdoc.DocumentElement.NamespaceURI)\n        $nodes = $xdoc.SelectNodes(\"//vs:ClCompile[contains(@Include, '..\\src\\hostapi\\asio')]\", $namespace)\n        Write-Output \"deleting ASIO related compilation nodes from .vcxproj.filters:\"\n        Write-Output $nodes\n        ForEach($node in $nodes) {\n          $parent = $node.ParentNode\n          $parent.RemoveChild($node)\n        }\n        $nodes = $xdoc.SelectNodes(\"//vs:ClInclude[contains(@Include, 'pa_asio.h')]\", $namespace)\n        Write-Output \"deleting ASIO related include nodes from .vcxproj.filters:\"\n        Write-Output $nodes\n        ForEach($node in $nodes) {\n          $parent = $node.ParentNode\n          $parent.RemoveChild($node)\n        }\n        $xdoc.save($vcxprojFiltersFile)\n        # Process .def file: remove PaAsio_ symbols\n        Set-Content -Path \"${{env.DEF_FILE_PATH}}\" -Value (Get-Content -Path \"${{env.DEF_FILE_PATH}}\" | Select-String -Pattern 'PaAsio_' -NotMatch)\n\n    - name: Build\n      working-directory: ${{env.GITHUB_WORKSPACE}}\n      # Add additional options to the MSBuild command line here (like platform or verbosity level).\n      # See https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference\n      run: msbuild /m /p:Configuration=${{matrix.BUILD_CONFIGURATION}} /p:Platform=${{matrix.BUILD_PLATFORM}} ${{env.VCXPROJ_FILE_PATH}}\n"
  },
  {
    "path": "thirdparty/portaudio/.github/workflows/c-cpp.yml",
    "content": "name: C/C++ CI\n\non:\n  push:\n    branches: [ master ]\n  pull_request:\n    branches: [ master ]\n\njobs:\n  build:\n\n    runs-on: ubuntu-latest\n\n    steps:\n    - uses: actions/checkout@v2\n    - name: configure\n      run: ./configure\n    - name: make\n      run: make\n\n  build-cmake:\n\n    runs-on: ubuntu-latest\n\n    steps:\n    - uses: actions/checkout@v2\n    - name: cmake\n      run: cmake .\n    - name: make\n      run: make\n\n  build-cmake-msvc:\n\n    runs-on: windows-latest\n\n    steps:\n    - uses: actions/checkout@v1\n    - name: cmake\n      run: cmake .\n    - name: build\n      run: cmake --build .\n\n  build-cmake-mingw:\n\n    runs-on: ubuntu-latest\n\n    steps:\n    - uses: actions/checkout@v2\n    - name: apt\n      run: sudo apt-get install mingw-w64\n    - name: cmake\n      run: cmake -DCMAKE_TOOLCHAIN_FILE=i686-w64-mingw32.cmake .\n    - name: make\n      run: make\n"
  },
  {
    "path": "thirdparty/portaudio/.gitignore",
    "content": "# Compiled Object files\n*.slo\n*.lo\n*.o\n*.obj\n\n# annoying files\n**/.DS_Store\n\n# Generated by configure and make\nMakefile\nbin-stamp\nbin/*\nconfig.log\nconfig.status\nlib-stamp\nlib/*\nlibtool\nportaudio-2.0.pc\nautom4te.cache/*\n\n# Precompiled Headers\n*.gch\n*.pch\n\n# Compiled Dynamic libraries\n*.so\n*.dylib\n*.dll\n\n# Fortran module files\n*.mod\n\n# Compiled Static libraries\n*.lai\n*.la\n*.a\n*.lib\n\n# Executables\n*.exe\n*.out\n*.app\n\n# Visual Studio 2017/2019 state folder\n.vs/\n\n# Visual Studio CMake build output folder \nout/\n\n# Visual Studio CMake settings file\nCMakeSettings.json\n"
  },
  {
    "path": "thirdparty/portaudio/CMakeLists.txt",
    "content": "# $Id: $\n#\n# For a \"How-To\" please refer to the Portaudio documentation at:\n# http://www.portaudio.com/trac/wiki/TutorialDir/Compile/CMake\n#\n\nCMAKE_MINIMUM_REQUIRED(VERSION 2.8)\n\n# Check if the user is building PortAudio stand-alone or as part of a larger\n# project. If this is part of a larger project (i.e. the CMakeLists.txt has\n# been imported by some other CMakeLists.txt), we don't want to trump over\n# the top of that project's global settings.\nIF(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_LIST_DIR})\n  PROJECT(portaudio)\n\n  # CMAKE_CONFIGURATION_TYPES only exists for multi-config generators (like\n  # Visual Studio or Xcode). For these projects, we won't define\n  # CMAKE_BUILD_TYPE as it does not make sense.\n  IF(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)\n    MESSAGE(STATUS \"Setting CMAKE_BUILD_TYPE type to 'Debug' as none was specified.\")\n    SET(CMAKE_BUILD_TYPE Debug CACHE STRING \"Choose the type of build.\" FORCE)\n    SET_PROPERTY(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS \"Debug\" \"Release\")\n  ENDIF()\n\n  SET_PROPERTY(GLOBAL PROPERTY USE_FOLDERS ON)\n\n  IF(WIN32 AND MSVC)\n    OPTION(PA_DLL_LINK_WITH_STATIC_RUNTIME \"Link with static runtime libraries (minimizes runtime dependencies)\" ON)\n    IF(PA_DLL_LINK_WITH_STATIC_RUNTIME)\n      FOREACH(flag_var\n        CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE\n        CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO\n        CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE\n        CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO)\n        IF(${flag_var} MATCHES \"/MD\")\n          STRING(REGEX REPLACE \"/MD\" \"/MT\" ${flag_var} \"${${flag_var}}\")\n        ENDIF()\n      ENDFOREACH()\n    ENDIF()\n  ENDIF()\nENDIF()\n\nSET(PA_VERSION 19)\nSET(PA_PKGCONFIG_VERSION ${PA_VERSION})\nSET(PA_SOVERSION \"${PA_VERSION}.0\")\n\n# Most of the code from this point onwards is related to populating the\n# following variables:\n#   PA_PUBLIC_INCLUDES - This contains the list of public PortAudio header\n#       files. These files will be copied into /include paths on Unix'y\n#       systems when \"make install\" is invoked.\n#   PA_PRIVATE_INCLUDES - This contains the list of header files which\n#       are not part of PortAudio, but are required by the various hostapis.\n#       It is only used by CMake IDE generators (like Visual Studio) to\n#       provide quick-links to useful headers. It has no impact on build\n#       output.\n#   PA_PRIVATE_INCLUDE_PATHS - This contains the list of include paths which\n#       will be passed to the compiler while PortAudio is being built which\n#       are not required by applications using the PortAudio API.\n#   PA_PRIVATE_COMPILE_DEFINITIONS - This contains a list of preprocessor\n#       macro definitions which will be set when compiling PortAudio source\n#       files.\n#   PA_SOURCES - This contains the list of source files which will be built\n#       into the static and shared PortAudio libraries.\n#   PA_NON_UNICODE_SOURCES - This also contains a list of source files which\n#       will be build into the static and shared PortAudio libraries. However,\n#       these sources will not have any unicode compiler definitions added\n#       to them. This list should only contain external source dependencies.\n#   PA_EXTRA_SHARED_SOURCES - Contains a list of extra files which will be\n#       associated only with the shared PortAudio library. This only seems\n#       relevant for Windows shared libraries which require a list of export\n#       symbols.\n# Where other PA_* variables are set, these are almost always only used to\n# preserve the historic SOURCE_GROUP behavior (which again only has an impact\n# on IDE-style generators for visual appearance) or store the output of\n# find_library() calls.\n\nSET(PA_COMMON_INCLUDES\n  src/common/pa_allocation.h\n  src/common/pa_converters.h\n  src/common/pa_cpuload.h\n  src/common/pa_debugprint.h\n  src/common/pa_dither.h\n  src/common/pa_endianness.h\n  src/common/pa_hostapi.h\n  src/common/pa_memorybarrier.h\n  src/common/pa_process.h\n  src/common/pa_ringbuffer.h\n  src/common/pa_stream.h\n  src/common/pa_trace.h\n  src/common/pa_types.h\n  src/common/pa_util.h\n)\n\nSET(PA_COMMON_SOURCES\n  src/common/pa_allocation.c\n  src/common/pa_converters.c\n  src/common/pa_cpuload.c\n  src/common/pa_debugprint.c\n  src/common/pa_dither.c\n  src/common/pa_front.c\n  src/common/pa_process.c\n  src/common/pa_ringbuffer.c\n  src/common/pa_stream.c\n  src/common/pa_trace.c\n)\n\nSOURCE_GROUP(\"common\" FILES ${PA_COMMON_INCLUDES} ${PA_COMMON_SOURCES})\n\nSET(PA_PUBLIC_INCLUDES include/portaudio.h)\n\nSET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake_support)\n\nSET(PA_SKELETON_SOURCES src/hostapi/skeleton/pa_hostapi_skeleton.c)\nSOURCE_GROUP(\"hostapi\\\\skeleton\" ${PA_SKELETON_SOURCES})\nSET(PA_SOURCES ${PA_COMMON_SOURCES} ${PA_SKELETON_SOURCES})\nSET(PA_PRIVATE_INCLUDE_PATHS src/common ${CMAKE_CURRENT_BINARY_DIR})\n\nIF(WIN32)\n  SET(PA_PRIVATE_COMPILE_DEFINITIONS ${PA_PRIVATE_COMPILE_DEFINITIONS} _CRT_SECURE_NO_WARNINGS)\n\n  SET(PA_PLATFORM_SOURCES\n    src/os/win/pa_win_hostapis.c\n    src/os/win/pa_win_util.c\n    src/os/win/pa_win_waveformat.c\n    src/os/win/pa_win_wdmks_utils.c\n    src/os/win/pa_win_coinitialize.c)\n  SET(PA_PLATFORM_INCLUDES\n    src/os/win/pa_win_coinitialize.h\n    src/os/win/pa_win_wdmks_utils.h)\n\n  IF(MSVC)\n    SET(PA_PLATFORM_SOURCES ${PA_PLATFORM_SOURCES} src/os/win/pa_x86_plain_converters.c)\n    SET(PA_PLATFORM_INCLUDES ${PA_PLATFORM_INCLUDES} src/os/win/pa_x86_plain_converters.h)\n  ELSE()\n    SET(PA_PRIVATE_COMPILE_DEFINITIONS ${PA_PRIVATE_COMPILE_DEFINITIONS} _WIN32_WINNT=0x0501 WINVER=0x0501)\n    SET(DEF_EXCLUDE_X86_PLAIN_CONVERTERS \";\")\n  ENDIF()\n\n  SOURCE_GROUP(\"os\\\\win\" FILES ${PA_PLATFORM_SOURCES} ${PA_PLATFORM_INCLUDES})\n  SET(PA_SOURCES ${PA_SOURCES} ${PA_PLATFORM_SOURCES})\n  SET(PA_PRIVATE_INCLUDES ${PA_PRIVATE_INCLUDES} ${PA_PLATFORM_INCLUDES})\n  SET(PA_PRIVATE_INCLUDE_PATHS ${PA_PRIVATE_INCLUDE_PATHS} src/os/win)\n\n  SET(PA_LIBRARY_DEPENDENCIES ${PA_LIBRARY_DEPENDENCIES} winmm)\n\n  # Try to find ASIO SDK (assumes that portaudio and asiosdk folders are side-by-side, see\n  # http://www.portaudio.com/trac/wiki/TutorialDir/Compile/WindowsASIOMSVC)\n  FIND_PACKAGE(ASIOSDK)\n  IF(ASIOSDK_FOUND)\n    OPTION(PA_USE_ASIO \"Enable support for ASIO\" ON)\n  ELSE()\n    OPTION(PA_USE_ASIO \"Enable support for ASIO\" OFF)\n  ENDIF()\n  IF(PA_USE_ASIO)\n    SET(PA_PRIVATE_INCLUDE_PATHS ${PA_PRIVATE_INCLUDE_PATHS} ${ASIOSDK_ROOT_DIR}/common)\n    SET(PA_PRIVATE_INCLUDE_PATHS ${PA_PRIVATE_INCLUDE_PATHS} ${ASIOSDK_ROOT_DIR}/host)\n    SET(PA_PRIVATE_INCLUDE_PATHS ${PA_PRIVATE_INCLUDE_PATHS} ${ASIOSDK_ROOT_DIR}/host/pc)\n    SET(PA_ASIO_SOURCES src/hostapi/asio/pa_asio.cpp src/hostapi/asio/iasiothiscallresolver.cpp)\n    SET(PA_ASIOSDK_SOURCES ${ASIOSDK_ROOT_DIR}/common/asio.cpp ${ASIOSDK_ROOT_DIR}/host/pc/asiolist.cpp ${ASIOSDK_ROOT_DIR}/host/asiodrivers.cpp)\n    SOURCE_GROUP(\"hostapi\\\\ASIO\" FILES ${PA_ASIO_SOURCES})\n    SOURCE_GROUP(\"hostapi\\\\ASIO\\\\ASIOSDK\" FILES ${PA_ASIOSDK_SOURCES})\n    SET(PA_PUBLIC_INCLUDES ${PA_PUBLIC_INCLUDES} include/pa_asio.h)\n    SET(PA_SOURCES ${PA_SOURCES} ${PA_ASIO_SOURCES})\n    SET(PA_NON_UNICODE_SOURCES ${PA_NON_UNICODE_SOURCES} ${PA_ASIOSDK_SOURCES})\n    SET(PA_LIBRARY_DEPENDENCIES ${PA_LIBRARY_DEPENDENCIES} ole32 uuid)\n  ELSE()\n    # Set variables for DEF file expansion\n    SET(DEF_EXCLUDE_ASIO_SYMBOLS \";\")\n  ENDIF()\n\n  OPTION(PA_USE_DS \"Enable support for DirectSound\" ON)\n  IF(PA_USE_DS)\n    IF(MINGW)\n      MESSAGE(STATUS \"DirectSound support will be built with DSound provided by MinGW.\")\n      OPTION(PA_USE_DIRECTSOUNDFULLDUPLEXCREATE \"Use DirectSound full duplex create\" OFF)\n    ELSE(MINGW)\n      OPTION(PA_USE_DIRECTSOUNDFULLDUPLEXCREATE \"Use DirectSound full duplex create\" ON)\n    ENDIF(MINGW)\n    MARK_AS_ADVANCED(PA_USE_DIRECTSOUNDFULLDUPLEXCREATE)\n    IF(PA_USE_DIRECTSOUNDFULLDUPLEXCREATE)\n      SET(PA_PRIVATE_COMPILE_DEFINITIONS ${PA_PRIVATE_COMPILE_DEFINITIONS} PAWIN_USE_DIRECTSOUNDFULLDUPLEXCREATE)\n    ENDIF()\n    SET(PA_DS_INCLUDES src/hostapi/dsound/pa_win_ds_dynlink.h)\n    SET(PA_DS_SOURCES src/hostapi/dsound/pa_win_ds.c src/hostapi/dsound/pa_win_ds_dynlink.c)\n    SOURCE_GROUP(\"hostapi\\\\dsound\" FILES ${PA_DS_INCLUDES} ${PA_DS_SOURCES})\n    SET(PA_PUBLIC_INCLUDES ${PA_PUBLIC_INCLUDES} include/pa_win_ds.h include/pa_win_waveformat.h)\n    SET(PA_PRIVATE_INCLUDES ${PA_PRIVATE_INCLUDES} ${PA_DS_INCLUDES})\n    SET(PA_SOURCES ${PA_SOURCES} ${PA_DS_SOURCES})\n    SET(PA_LIBRARY_DEPENDENCIES ${PA_LIBRARY_DEPENDENCIES} dsound)\n  ENDIF(PA_USE_DS)\n\n  OPTION(PA_USE_WMME \"Enable support for MME\" ON)\n  IF(PA_USE_WMME)\n    SET(PA_WMME_SOURCES src/hostapi/wmme/pa_win_wmme.c)\n    SOURCE_GROUP(\"hostapi\\\\wmme\" FILES ${PA_WMME_SOURCES})\n    SET(PA_PUBLIC_INCLUDES ${PA_PUBLIC_INCLUDES} include/pa_win_wmme.h include/pa_win_waveformat.h)\n    SET(PA_SOURCES ${PA_SOURCES} ${PA_WMME_SOURCES})\n    SET(PA_LIBRARY_DEPENDENCIES ${PA_LIBRARY_DEPENDENCIES} ole32 uuid)\n  ENDIF()\n\n  # MinGW versions below 4.93, especially non MinGW-w64 distributions may\n  # break in the wasapi build. If an older MinGW version is required, WASAPI-\n  # support needs to be disabled.\n  OPTION(PA_USE_WASAPI \"Enable support for WASAPI\" ON)\n  IF(PA_USE_WASAPI)\n    SET(PA_WASAPI_SOURCES src/hostapi/wasapi/pa_win_wasapi.c)\n    SOURCE_GROUP(\"hostapi\\\\wasapi\" FILES ${PA_WASAPI_SOURCES})\n    SET(PA_PUBLIC_INCLUDES ${PA_PUBLIC_INCLUDES} include/pa_win_wasapi.h include/pa_win_waveformat.h)\n    SET(PA_SOURCES ${PA_SOURCES} ${PA_WASAPI_SOURCES})\n    SET(PA_LIBRARY_DEPENDENCIES ${PA_LIBRARY_DEPENDENCIES} ole32 uuid)\n  ELSE()\n    SET(DEF_EXCLUDE_WASAPI_SYMBOLS \";\")\n  ENDIF()\n\n  OPTION(PA_USE_WDMKS \"Enable support for WDMKS\" ON)\n  IF(PA_USE_WDMKS)\n    SET(PA_WDMKS_SOURCES src/hostapi/wdmks/pa_win_wdmks.c)\n    SOURCE_GROUP(\"hostapi\\\\wdmks\" FILES ${PA_WDMKS_SOURCES})\n    SET(PA_PUBLIC_INCLUDES ${PA_PUBLIC_INCLUDES} include/pa_win_wdmks.h)\n    SET(PA_SOURCES ${PA_SOURCES} ${PA_WDMKS_SOURCES})\n    SET(PA_LIBRARY_DEPENDENCIES ${PA_LIBRARY_DEPENDENCIES} setupapi ole32 uuid)\n  ENDIF()\n\n  OPTION(PA_USE_WDMKS_DEVICE_INFO \"Use WDM/KS API for device info\" ON)\n  MARK_AS_ADVANCED(PA_USE_WDMKS_DEVICE_INFO)\n  IF(PA_USE_WDMKS_DEVICE_INFO)\n    SET(PA_PRIVATE_COMPILE_DEFINITIONS ${PA_PRIVATE_COMPILE_DEFINITIONS} PAWIN_USE_WDMKS_DEVICE_INFO)\n  ENDIF()\n\n  SET(GENERATED_MESSAGE \"CMake generated file, do NOT edit! Use CMake-GUI to change configuration instead.\")\n  CONFIGURE_FILE(cmake_support/template_portaudio.def ${CMAKE_CURRENT_BINARY_DIR}/portaudio_cmake.def @ONLY)\n  CONFIGURE_FILE(cmake_support/options_cmake.h.in ${CMAKE_CURRENT_BINARY_DIR}/options_cmake.h @ONLY)\n  SET(PA_PRIVATE_INCLUDES ${PA_PRIVATE_INCLUDES} ${CMAKE_CURRENT_BINARY_DIR}/options_cmake.h)\n  SET(PA_PRIVATE_COMPILE_DEFINITIONS ${PA_PRIVATE_COMPILE_DEFINITIONS} PORTAUDIO_CMAKE_GENERATED)\n  SOURCE_GROUP(\"cmake_generated\" FILES ${CMAKE_CURRENT_BINARY_DIR}/portaudio_cmake.def ${CMAKE_CURRENT_BINARY_DIR}/options_cmake.h)\n\n  SET(PA_EXTRA_SHARED_SOURCES ${CMAKE_CURRENT_BINARY_DIR}/portaudio_cmake.def)\n\nELSE()\n\n  SET(PA_PRIVATE_INCLUDE_PATHS ${PA_PRIVATE_INCLUDE_PATHS} src/os/unix)\n  SET(PA_PLATFORM_SOURCES src/os/unix/pa_unix_hostapis.c src/os/unix/pa_unix_util.c)\n  SOURCE_GROUP(\"os\\\\unix\" FILES ${PA_PLATFORM_SOURCES})\n  SET(PA_SOURCES ${PA_SOURCES} ${PA_PLATFORM_SOURCES})\n\n  IF(APPLE)\n\n    SET(CMAKE_MACOSX_RPATH 1)\n    OPTION(PA_USE_COREAUDIO \"Enable support for CoreAudio\" ON)\n    IF(PA_USE_COREAUDIO)\n      SET(PA_COREAUDIO_SOURCES\n        src/hostapi/coreaudio/pa_mac_core.c\n        src/hostapi/coreaudio/pa_mac_core_blocking.c\n        src/hostapi/coreaudio/pa_mac_core_utilities.c)\n      SET(PA_COREAUDIO_INCLUDES\n        src/hostapi/coreaudio/pa_mac_core_blocking.h\n        src/hostapi/coreaudio/pa_mac_core_utilities.h)\n      SOURCE_GROUP(\"hostapi\\\\coreaudio\" FILES ${PA_COREAUDIO_SOURCES} ${PA_COREAUDIO_INCLUDES})\n      SET(PA_PUBLIC_INCLUDES ${PA_PUBLIC_INCLUDES} include/pa_mac_core.h)\n      SET(PA_PRIVATE_INCLUDES ${PA_PRIVATE_INCLUDES} ${PA_COREAUDIO_INCLUDES})\n      SET(PA_SOURCES ${PA_SOURCES} ${PA_COREAUDIO_SOURCES})\n\n      FIND_LIBRARY(COREAUDIO_LIBRARY CoreAudio REQUIRED)\n      FIND_LIBRARY(AUDIOTOOLBOX_LIBRARY AudioToolbox REQUIRED)\n      FIND_LIBRARY(AUDIOUNIT_LIBRARY AudioUnit REQUIRED)\n      FIND_LIBRARY(COREFOUNDATION_LIBRARY CoreFoundation REQUIRED)\n      FIND_LIBRARY(CORESERVICES_LIBRARY CoreServices REQUIRED)\n      MARK_AS_ADVANCED(COREAUDIO_LIBRARY AUDIOTOOLBOX_LIBRARY AUDIOUNIT_LIBRARY COREFOUNDATION_LIBRARY CORESERVICES_LIBRARY)\n      SET(PA_LIBRARY_DEPENDENCIES ${PA_LIBRARY_DEPENDENCIES} ${COREAUDIO_LIBRARY} ${AUDIOTOOLBOX_LIBRARY} ${AUDIOUNIT_LIBRARY} ${COREFOUNDATION_LIBRARY} ${CORESERVICES_LIBRARY})\n      SET(PA_PRIVATE_COMPILE_DEFINITIONS ${PA_PRIVATE_COMPILE_DEFINITIONS} PA_USE_COREAUDIO)\n      SET(PA_PKGCONFIG_LDFLAGS \"${PA_PKGCONFIG_LDFLAGS} -framework CoreAudio -framework AudioToolbox -framework AudioUnit -framework CoreFoundation -framework CoreServices\")\n    ENDIF()\n\n  ELSEIF(UNIX)\n\n    FIND_PACKAGE(Jack)\n    IF(JACK_FOUND)\n      OPTION(PA_USE_JACK \"Enable support for Jack\" ON)\n    ELSE()\n      OPTION(PA_USE_JACK \"Enable support for Jack\" OFF)\n    ENDIF()\n    IF(PA_USE_JACK)\n      SET(PA_PRIVATE_INCLUDE_PATHS ${PA_PRIVATE_INCLUDE_PATHS} ${JACK_INCLUDE_DIRS})\n      SET(PA_JACK_SOURCES src/hostapi/jack/pa_jack.c)\n      SOURCE_GROUP(\"hostapi\\\\JACK\" FILES ${PA_JACK_SOURCES})\n      SET(PA_PUBLIC_INCLUDES ${PA_PUBLIC_INCLUDES} include/pa_jack.h)\n      SET(PA_SOURCES ${PA_SOURCES} ${PA_JACK_SOURCES})\n      SET(PA_PRIVATE_COMPILE_DEFINITIONS ${PA_PRIVATE_COMPILE_DEFINITIONS} PA_USE_JACK)\n      SET(PA_LIBRARY_DEPENDENCIES ${PA_LIBRARY_DEPENDENCIES} ${JACK_LIBRARIES})\n      SET(PA_PKGCONFIG_LDFLAGS \"${PA_PKGCONFIG_LDFLAGS} -ljack\")\n    ENDIF()\n\n    FIND_PACKAGE(ALSA)\n    IF(ALSA_FOUND)\n      OPTION(PA_USE_ALSA \"Enable support for ALSA\" ON)\n      OPTION(PA_ALSA_DYNAMIC \"Enable loading ALSA through dlopen\" OFF)\n    ELSE()\n      OPTION(PA_USE_ALSA \"Enable support for ALSA\" OFF)\n    ENDIF()\n    IF(PA_USE_ALSA)\n      SET(PA_PRIVATE_INCLUDE_PATHS ${PA_PRIVATE_INCLUDE_PATHS} ${ALSA_INCLUDE_DIRS})\n      SET(PA_ALSA_SOURCES src/hostapi/alsa/pa_linux_alsa.c)\n      SOURCE_GROUP(\"hostapi\\\\ALSA\" FILES ${PA_ALSA_SOURCES})\n      SET(PA_PUBLIC_INCLUDES ${PA_PUBLIC_INCLUDES} include/pa_linux_alsa.h)\n      SET(PA_SOURCES ${PA_SOURCES} ${PA_ALSA_SOURCES})\n      SET(PA_PRIVATE_COMPILE_DEFINITIONS ${PA_PRIVATE_COMPILE_DEFINITIONS} PA_USE_ALSA)\n      IF(PA_ALSA_DYNAMIC)\n        SET(PA_PRIVATE_COMPILE_DEFINITIONS ${PA_PRIVATE_COMPILE_DEFINITIONS} PA_ALSA_DYNAMIC)\n        SET(PA_LIBRARY_DEPENDENCIES ${PA_LIBRARY_DEPENDENCIES} ${CMAKE_DL_LIBS})\n        SET(PA_PKGCONFIG_LDFLAGS \"${PA_PKGCONFIG_LDFLAGS} -l${CMAKE_DL_LIBS}\")\n      ELSE()\n        SET(PA_LIBRARY_DEPENDENCIES ${PA_LIBRARY_DEPENDENCIES} ${ALSA_LIBRARIES})\n        SET(PA_PKGCONFIG_LDFLAGS \"${PA_PKGCONFIG_LDFLAGS} -lasound\")\n      ENDIF()\n    ENDIF()\n\n  ENDIF()\n\n  SET(PA_PKGCONFIG_LDFLAGS \"${PA_PKGCONFIG_LDFLAGS} -lm -lpthread\")\n  SET(PA_LIBRARY_DEPENDENCIES ${PA_LIBRARY_DEPENDENCIES} m pthread)\n\nENDIF()\n\nSOURCE_GROUP(\"include\" FILES ${PA_PUBLIC_INCLUDES})\n\nSET(PA_INCLUDES ${PA_PRIVATE_INCLUDES} ${PA_PUBLIC_INCLUDES})\n\nIF(WIN32)\n  OPTION(PA_UNICODE_BUILD \"Enable Portaudio Unicode build\" ON)\n  IF(PA_UNICODE_BUILD)\n    SET_SOURCE_FILES_PROPERTIES(${PA_SOURCES} PROPERTIES COMPILE_DEFINITIONS \"UNICODE;_UNICODE\")\n  ENDIF()\nENDIF()\n\nOPTION(PA_ENABLE_DEBUG_OUTPUT \"Enable debug output for Portaudio\" OFF)\nIF(PA_ENABLE_DEBUG_OUTPUT)\n  SET(PA_PRIVATE_COMPILE_DEFINITIONS ${PA_PRIVATE_COMPILE_DEFINITIONS} PA_ENABLE_DEBUG_OUTPUT)\nENDIF()\n\nINCLUDE(TestBigEndian)\nTEST_BIG_ENDIAN(IS_BIG_ENDIAN)\nIF(IS_BIG_ENDIAN)\n  SET(PA_PRIVATE_COMPILE_DEFINITIONS ${PA_PRIVATE_COMPILE_DEFINITIONS} PA_BIG_ENDIAN)\nELSE()\n  SET(PA_PRIVATE_COMPILE_DEFINITIONS ${PA_PRIVATE_COMPILE_DEFINITIONS} PA_LITTLE_ENDIAN)\nENDIF()\n\nOPTION(PA_BUILD_STATIC \"Build static library\" ON)\nOPTION(PA_BUILD_SHARED \"Build shared/dynamic library\" ON)\n\nIF(MSVC)\n  OPTION(PA_LIBNAME_ADD_SUFFIX \"Add suffix _static to static library name\" ON)\nELSE()\n  OPTION(PA_LIBNAME_ADD_SUFFIX \"Add suffix _static to static library name\" OFF)\nENDIF()\n\n# MSVC: if PA_LIBNAME_ADD_SUFFIX is not used, and both static and shared libraries are\n# built, one, of import- and static libraries, will overwrite the other. In\n# embedded builds this is not an issue as they will only build the configuration\n# used in the host application.\nMARK_AS_ADVANCED(PA_LIBNAME_ADD_SUFFIX)\nIF(MSVC AND PA_BUILD_STATIC AND PA_BUILD_SHARED AND NOT PA_LIBNAME_ADD_SUFFIX)\n  MESSAGE(WARNING \"Building both shared and static libraries, and avoiding the suffix _static will lead to a name conflict\")\n  SET(PA_LIBNAME_ADD_SUFFIX ON CACHE BOOL \"Forcing use of suffix _static to avoid name conflict between static and import library\" FORCE)\n  MESSAGE(WARNING \"PA_LIBNAME_ADD_SUFFIX was set to ON\")\nENDIF()\n\nSET(PA_TARGETS \"\")\n\nIF(PA_BUILD_SHARED)\n  LIST(APPEND PA_TARGETS portaudio)\n  ADD_LIBRARY(portaudio SHARED ${PA_INCLUDES} ${PA_COMMON_INCLUDES} ${PA_SOURCES} ${PA_NON_UNICODE_SOURCES} ${PA_EXTRA_SHARED_SOURCES})\n  SET_PROPERTY(TARGET portaudio APPEND_STRING PROPERTY COMPILE_DEFINITIONS ${PA_PRIVATE_COMPILE_DEFINITIONS})\n  TARGET_INCLUDE_DIRECTORIES(portaudio PRIVATE ${PA_PRIVATE_INCLUDE_PATHS})\n  TARGET_INCLUDE_DIRECTORIES(portaudio PUBLIC \"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>\" \"$<INSTALL_INTERFACE:include>\")\n  TARGET_LINK_LIBRARIES(portaudio ${PA_LIBRARY_DEPENDENCIES})\nENDIF()\n\nIF(PA_BUILD_STATIC)\n  LIST(APPEND PA_TARGETS portaudio_static)\n  ADD_LIBRARY(portaudio_static STATIC ${PA_INCLUDES} ${PA_COMMON_INCLUDES} ${PA_SOURCES} ${PA_NON_UNICODE_SOURCES})\n  SET_PROPERTY(TARGET portaudio_static APPEND_STRING PROPERTY COMPILE_DEFINITIONS ${PA_PRIVATE_COMPILE_DEFINITIONS})\n  TARGET_INCLUDE_DIRECTORIES(portaudio_static PRIVATE ${PA_PRIVATE_INCLUDE_PATHS})\n  TARGET_INCLUDE_DIRECTORIES(portaudio_static PUBLIC \"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>\" \"$<INSTALL_INTERFACE:include>\")\n  TARGET_LINK_LIBRARIES(portaudio_static ${PA_LIBRARY_DEPENDENCIES})\n  IF(NOT PA_LIBNAME_ADD_SUFFIX)\n    SET_PROPERTY(TARGET portaudio_static PROPERTY OUTPUT_NAME portaudio)\n  ENDIF()\nENDIF()\n\nIF(WIN32 AND MSVC)\n  OPTION(PA_CONFIG_LIB_OUTPUT_PATH \"Make sure that output paths are kept neat\" OFF)\n  IF(CMAKE_CL_64)\n    SET(TARGET_POSTFIX x64)\n    IF(PA_CONFIG_LIB_OUTPUT_PATH)\n      SET(LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR}/bin/x64)\n    ENDIF()\n  ELSE()\n    SET(TARGET_POSTFIX x86)\n    IF(PA_CONFIG_LIB_OUTPUT_PATH)\n      SET(LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR}/bin/Win32)\n    ENDIF()\n  ENDIF()\n  IF(PA_BUILD_SHARED)\n    IF(PA_LIBNAME_ADD_SUFFIX)\n      SET_TARGET_PROPERTIES(portaudio PROPERTIES OUTPUT_NAME portaudio_${TARGET_POSTFIX})\n    ELSE()\n      SET_TARGET_PROPERTIES(portaudio PROPERTIES OUTPUT_NAME portaudio)\n    ENDIF()\n  ENDIF()\n  IF(PA_BUILD_STATIC)\n    IF(PA_LIBNAME_ADD_SUFFIX)\n      SET_TARGET_PROPERTIES(portaudio_static PROPERTIES OUTPUT_NAME portaudio_static_${TARGET_POSTFIX})\n    ELSE()\n      SET_TARGET_PROPERTIES(portaudio_static PROPERTIES OUTPUT_NAME portaudio)\n    ENDIF()\n  ENDIF()\nELSE()\n  IF(APPLE AND CMAKE_VERSION VERSION_GREATER 3.4.2)\n    OPTION(PA_OUTPUT_OSX_FRAMEWORK \"Generate an OS X framework instead of the simple library\" OFF)\n    IF(PA_OUTPUT_OSX_FRAMEWORK)\n      SET_TARGET_PROPERTIES(portaudio PROPERTIES\n        FRAMEWORK TRUE\n        MACOSX_FRAMEWORK_IDENTIFIER com.portaudio\n        FRAMEWORK_VERSION A\n        PUBLIC_HEADER \"${PA_PUBLIC_INCLUDES}\"\n        VERSION ${PA_SOVERSION}\n        SOVERSION ${PA_SOVERSION})\n    ENDIF()\n  ENDIF()\nENDIF()\n\n# At least on Windows in embedded builds, portaudio's install target should likely\n# not be executed, as the library would usually already be installed as part of, and\n# by means of the host application.\n# The option below offers the option to avoid executing the portaudio install target\n# for cases in which the host-application executes install, but no independent install\n# of portaudio is wished.\nOPTION(PA_DISABLE_INSTALL \"Disable targets install and uninstall (for embedded builds)\" OFF)\n\nIF(NOT PA_OUTPUT_OSX_FRAMEWORK AND NOT PA_DISABLE_INSTALL)\n  INCLUDE(CMakePackageConfigHelpers)\n\n  CONFIGURE_PACKAGE_CONFIG_FILE(cmake_support/portaudioConfig.cmake.in ${CMAKE_BINARY_DIR}/cmake/portaudio/portaudioConfig.cmake\n    INSTALL_DESTINATION \"lib/cmake/portaudio\"\n    NO_CHECK_REQUIRED_COMPONENTS_MACRO)\n  WRITE_BASIC_PACKAGE_VERSION_FILE(${CMAKE_BINARY_DIR}/cmake/portaudio/portaudioConfigVersion.cmake\n    VERSION ${PA_VERSION}\n    COMPATIBILITY SameMajorVersion)\n  CONFIGURE_FILE(cmake_support/portaudio-2.0.pc.in ${CMAKE_CURRENT_BINARY_DIR}/portaudio-2.0.pc @ONLY)\n  INSTALL(FILES README.md DESTINATION share/doc/portaudio)\n  INSTALL(FILES LICENSE.txt DESTINATION share/doc/portaudio)\n  INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/portaudio-2.0.pc DESTINATION lib/pkgconfig)\n  INSTALL(FILES ${PA_PUBLIC_INCLUDES} DESTINATION include)\n  INSTALL(TARGETS ${PA_TARGETS}\n    EXPORT portaudio-targets\n    RUNTIME DESTINATION bin\n    LIBRARY DESTINATION lib\n    ARCHIVE DESTINATION lib)\n  INSTALL(EXPORT portaudio-targets FILE \"portaudioTargets.cmake\" DESTINATION \"lib/cmake/portaudio\")\n  EXPORT(TARGETS ${PA_TARGETS} FILE \"${PROJECT_BINARY_DIR}/cmake/portaudio/portaudioTargets.cmake\")\n  INSTALL(FILES \"${CMAKE_BINARY_DIR}/cmake/portaudio/portaudioConfig.cmake\"\n                \"${CMAKE_BINARY_DIR}/cmake/portaudio/portaudioConfigVersion.cmake\"\n    DESTINATION \"lib/cmake/portaudio\")\n\n  IF (NOT TARGET uninstall)\n    CONFIGURE_FILE(\n      \"${CMAKE_CURRENT_SOURCE_DIR}/cmake_support/cmake_uninstall.cmake.in\"\n      \"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake\"\n      IMMEDIATE @ONLY)\n    ADD_CUSTOM_TARGET(uninstall\n      COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)\n  ENDIF()\nENDIF()\n\n# Prepared for inclusion of test files\nOPTION(PA_BUILD_TESTS \"Include test projects\" OFF)\nIF(PA_BUILD_TESTS)\n  SUBDIRS(test)\nENDIF()\n\n# Prepared for inclusion of test files\nOPTION(PA_BUILD_EXAMPLES \"Include example projects\" OFF)\nIF(PA_BUILD_EXAMPLES)\n  SUBDIRS(examples)\nENDIF()\n"
  },
  {
    "path": "thirdparty/portaudio/Doxyfile",
    "content": "# Doxyfile 1.4.6\n\n#---------------------------------------------------------------------------\n# Project related configuration options\n#---------------------------------------------------------------------------\nPROJECT_NAME           = PortAudio\nPROJECT_NUMBER         = 2.0\nOUTPUT_DIRECTORY       = ./doc/\nCREATE_SUBDIRS         = NO\nOUTPUT_LANGUAGE        = English\nUSE_WINDOWS_ENCODING   = NO\nBRIEF_MEMBER_DESC      = YES\nREPEAT_BRIEF           = YES\nABBREVIATE_BRIEF       = \"The $name class\" \\\n                         \"The $name widget\" \\\n                         \"The $name file\" \\\n                         is \\\n                         provides \\\n                         specifies \\\n                         contains \\\n                         represents \\\n                         a \\\n                         an \\\n                         the\nALWAYS_DETAILED_SEC    = NO\nINLINE_INHERITED_MEMB  = NO\nFULL_PATH_NAMES        = NO\nSTRIP_FROM_PATH        = \nSTRIP_FROM_INC_PATH    = \nSHORT_NAMES            = NO\nJAVADOC_AUTOBRIEF      = NO\nMULTILINE_CPP_IS_BRIEF = NO\nDETAILS_AT_TOP         = NO\nINHERIT_DOCS           = YES\nSEPARATE_MEMBER_PAGES  = NO\nTAB_SIZE               = 8\nALIASES                = \nOPTIMIZE_OUTPUT_FOR_C  = YES\nOPTIMIZE_OUTPUT_JAVA   = NO\nBUILTIN_STL_SUPPORT    = NO\nDISTRIBUTE_GROUP_DOC   = NO\nSUBGROUPING            = YES\n#---------------------------------------------------------------------------\n# Build related configuration options\n#---------------------------------------------------------------------------\nEXTRACT_ALL            = NO\nEXTRACT_PRIVATE        = NO\nEXTRACT_STATIC         = NO\nEXTRACT_LOCAL_CLASSES  = YES\nEXTRACT_LOCAL_METHODS  = NO\nHIDE_UNDOC_MEMBERS     = NO\nHIDE_UNDOC_CLASSES     = NO\nHIDE_FRIEND_COMPOUNDS  = NO\nHIDE_IN_BODY_DOCS      = NO\nINTERNAL_DOCS          = NO\nCASE_SENSE_NAMES       = YES\nHIDE_SCOPE_NAMES       = NO\nSHOW_INCLUDE_FILES     = YES\nINLINE_INFO            = YES\nSORT_MEMBER_DOCS       = YES\nSORT_BRIEF_DOCS        = NO\nSORT_BY_SCOPE_NAME     = NO\nGENERATE_TODOLIST      = NO\nGENERATE_TESTLIST      = NO\nGENERATE_BUGLIST       = NO\nGENERATE_DEPRECATEDLIST= YES\nENABLED_SECTIONS       = \nMAX_INITIALIZER_LINES  = 30\nSHOW_USED_FILES        = YES\nSHOW_DIRECTORIES       = YES\nFILE_VERSION_FILTER    = \n#---------------------------------------------------------------------------\n# configuration options related to warning and progress messages\n#---------------------------------------------------------------------------\nQUIET                  = NO\nWARNINGS               = YES\nWARN_IF_UNDOCUMENTED   = YES\nWARN_IF_DOC_ERROR      = YES\nWARN_NO_PARAMDOC       = NO\nWARN_FORMAT            = \"$file:$line: $text\"\nWARN_LOGFILE           = \n#---------------------------------------------------------------------------\n# configuration options related to the input files\n#---------------------------------------------------------------------------\nINPUT                  = doc/src \\\n                         include \\\n                         examples\nFILE_PATTERNS          = *.h \\\n                         *.c \\\n                         *.cpp \\\n                         *.java \\\n                         *.dox\nRECURSIVE              = YES\nEXCLUDE                = src/hostapi/wasapi/mingw-include\nEXCLUDE_SYMLINKS       = NO\nEXCLUDE_PATTERNS       = \nEXAMPLE_PATH           = \nEXAMPLE_PATTERNS       = \nEXAMPLE_RECURSIVE      = NO\nIMAGE_PATH             = doc/src/images\nINPUT_FILTER           = \nFILTER_PATTERNS        = \nFILTER_SOURCE_FILES    = NO\n#---------------------------------------------------------------------------\n# configuration options related to source browsing\n#---------------------------------------------------------------------------\nSOURCE_BROWSER         = YES\nINLINE_SOURCES         = NO\nSTRIP_CODE_COMMENTS    = YES\nREFERENCED_BY_RELATION = YES\nREFERENCES_RELATION    = YES\nUSE_HTAGS              = NO\nVERBATIM_HEADERS       = YES\n#---------------------------------------------------------------------------\n# configuration options related to the alphabetical class index\n#---------------------------------------------------------------------------\nALPHABETICAL_INDEX     = NO\nCOLS_IN_ALPHA_INDEX    = 5\nIGNORE_PREFIX          = \n#---------------------------------------------------------------------------\n# configuration options related to the HTML output\n#---------------------------------------------------------------------------\nGENERATE_HTML          = YES\nHTML_OUTPUT            = html\nHTML_FILE_EXTENSION    = .html\nHTML_HEADER            = \nHTML_FOOTER            = \nHTML_STYLESHEET        = \nHTML_ALIGN_MEMBERS     = YES\nGENERATE_HTMLHELP      = NO\nCHM_FILE               = \nHHC_LOCATION           = \nGENERATE_CHI           = NO\nBINARY_TOC             = NO\nTOC_EXPAND             = NO\nDISABLE_INDEX          = NO\nENUM_VALUES_PER_LINE   = 4\nGENERATE_TREEVIEW      = NO\nTREEVIEW_WIDTH         = 250\n#---------------------------------------------------------------------------\n# configuration options related to the LaTeX output\n#---------------------------------------------------------------------------\nGENERATE_LATEX         = NO\nLATEX_OUTPUT           = latex\nLATEX_CMD_NAME         = latex\nMAKEINDEX_CMD_NAME     = makeindex\nCOMPACT_LATEX          = NO\nPAPER_TYPE             = a4wide\nEXTRA_PACKAGES         = \nLATEX_HEADER           = \nPDF_HYPERLINKS         = NO\nUSE_PDFLATEX           = NO\nLATEX_BATCHMODE        = NO\nLATEX_HIDE_INDICES     = NO\n#---------------------------------------------------------------------------\n# configuration options related to the RTF output\n#---------------------------------------------------------------------------\nGENERATE_RTF           = NO\nRTF_OUTPUT             = rtf\nCOMPACT_RTF            = NO\nRTF_HYPERLINKS         = NO\nRTF_STYLESHEET_FILE    = \nRTF_EXTENSIONS_FILE    = \n#---------------------------------------------------------------------------\n# configuration options related to the man page output\n#---------------------------------------------------------------------------\nGENERATE_MAN           = NO\nMAN_OUTPUT             = man\nMAN_EXTENSION          = .3\nMAN_LINKS              = NO\n#---------------------------------------------------------------------------\n# configuration options related to the XML output\n#---------------------------------------------------------------------------\nGENERATE_XML           = NO\nXML_OUTPUT             = xml\nXML_SCHEMA             = \nXML_DTD                = \nXML_PROGRAMLISTING     = YES\n#---------------------------------------------------------------------------\n# configuration options for the AutoGen Definitions output\n#---------------------------------------------------------------------------\nGENERATE_AUTOGEN_DEF   = NO\n#---------------------------------------------------------------------------\n# configuration options related to the Perl module output\n#---------------------------------------------------------------------------\nGENERATE_PERLMOD       = NO\nPERLMOD_LATEX          = NO\nPERLMOD_PRETTY         = YES\nPERLMOD_MAKEVAR_PREFIX = \n#---------------------------------------------------------------------------\n# Configuration options related to the preprocessor   \n#---------------------------------------------------------------------------\nENABLE_PREPROCESSING   = YES\nMACRO_EXPANSION        = NO\nEXPAND_ONLY_PREDEF     = NO\nSEARCH_INCLUDES        = YES\nINCLUDE_PATH           = \nINCLUDE_FILE_PATTERNS  = \nPREDEFINED             = \nEXPAND_AS_DEFINED      = \nSKIP_FUNCTION_MACROS   = YES\n#---------------------------------------------------------------------------\n# Configuration::additions related to external references   \n#---------------------------------------------------------------------------\nTAGFILES               = \nGENERATE_TAGFILE       = \nALLEXTERNALS           = NO\nEXTERNAL_GROUPS        = YES\nPERL_PATH              = /usr/bin/perl\n#---------------------------------------------------------------------------\n# Configuration options related to the dot tool   \n#---------------------------------------------------------------------------\nCLASS_DIAGRAMS         = NO\nHIDE_UNDOC_RELATIONS   = NO\nHAVE_DOT               = NO\nCLASS_GRAPH            = YES\nCOLLABORATION_GRAPH    = YES\nGROUP_GRAPHS           = YES\nUML_LOOK               = NO\nTEMPLATE_RELATIONS     = YES\nINCLUDE_GRAPH          = YES\nINCLUDED_BY_GRAPH      = YES\nCALL_GRAPH             = NO\nGRAPHICAL_HIERARCHY    = YES\nDIRECTORY_GRAPH        = YES\nDOT_IMAGE_FORMAT       = png\nDOT_PATH               = \nDOTFILE_DIRS           = \nMAX_DOT_GRAPH_WIDTH    = 1024\nMAX_DOT_GRAPH_HEIGHT   = 1024\nMAX_DOT_GRAPH_DEPTH    = 1000\nDOT_TRANSPARENT        = NO\nDOT_MULTI_TARGETS      = NO\nGENERATE_LEGEND        = YES\nDOT_CLEANUP            = YES\n#---------------------------------------------------------------------------\n# Configuration::additions related to the search engine   \n#---------------------------------------------------------------------------\nSEARCHENGINE           = NO\n"
  },
  {
    "path": "thirdparty/portaudio/Doxyfile.developer",
    "content": "# Doxyfile 1.4.6\n\n#---------------------------------------------------------------------------\n# Project related configuration options\n#---------------------------------------------------------------------------\nPROJECT_NAME           = PortAudio\nPROJECT_NUMBER         = 2.0\nOUTPUT_DIRECTORY       = ./doc/\nCREATE_SUBDIRS         = NO\nOUTPUT_LANGUAGE        = English\nUSE_WINDOWS_ENCODING   = NO\nBRIEF_MEMBER_DESC      = YES\nREPEAT_BRIEF           = YES\nABBREVIATE_BRIEF       = \"The $name class\" \\\n                         \"The $name widget\" \\\n                         \"The $name file\" \\\n                         is \\\n                         provides \\\n                         specifies \\\n                         contains \\\n                         represents \\\n                         a \\\n                         an \\\n                         the\nALWAYS_DETAILED_SEC    = NO\nINLINE_INHERITED_MEMB  = NO\nFULL_PATH_NAMES        = NO\nSTRIP_FROM_PATH        = \nSTRIP_FROM_INC_PATH    = \nSHORT_NAMES            = NO\nJAVADOC_AUTOBRIEF      = NO\nMULTILINE_CPP_IS_BRIEF = NO\nDETAILS_AT_TOP         = NO\nINHERIT_DOCS           = YES\nSEPARATE_MEMBER_PAGES  = NO\nTAB_SIZE               = 8\nALIASES                = \nOPTIMIZE_OUTPUT_FOR_C  = YES\nOPTIMIZE_OUTPUT_JAVA   = NO\nBUILTIN_STL_SUPPORT    = NO\nDISTRIBUTE_GROUP_DOC   = NO\nSUBGROUPING            = YES\n#---------------------------------------------------------------------------\n# Build related configuration options\n#---------------------------------------------------------------------------\nEXTRACT_ALL            = YES\nEXTRACT_PRIVATE        = NO\nEXTRACT_STATIC         = NO\nEXTRACT_LOCAL_CLASSES  = YES\nEXTRACT_LOCAL_METHODS  = NO\nHIDE_UNDOC_MEMBERS     = NO\nHIDE_UNDOC_CLASSES     = NO\nHIDE_FRIEND_COMPOUNDS  = NO\nHIDE_IN_BODY_DOCS      = NO\nINTERNAL_DOCS          = YES\nCASE_SENSE_NAMES       = YES\nHIDE_SCOPE_NAMES       = NO\nSHOW_INCLUDE_FILES     = YES\nINLINE_INFO            = YES\nSORT_MEMBER_DOCS       = YES\nSORT_BRIEF_DOCS        = NO\nSORT_BY_SCOPE_NAME     = NO\nGENERATE_TODOLIST      = YES\nGENERATE_TESTLIST      = YES\nGENERATE_BUGLIST       = YES\nGENERATE_DEPRECATEDLIST= YES\nENABLED_SECTIONS       = INTERNAL\nMAX_INITIALIZER_LINES  = 30\nSHOW_USED_FILES        = YES\nSHOW_DIRECTORIES       = YES\nFILE_VERSION_FILTER    = \n#---------------------------------------------------------------------------\n# configuration options related to warning and progress messages\n#---------------------------------------------------------------------------\nQUIET                  = NO\nWARNINGS               = YES\nWARN_IF_UNDOCUMENTED   = YES\nWARN_IF_DOC_ERROR      = YES\nWARN_NO_PARAMDOC       = NO\nWARN_FORMAT            = \"$file:$line: $text\"\nWARN_LOGFILE           = \n#---------------------------------------------------------------------------\n# configuration options related to the input files\n#---------------------------------------------------------------------------\nINPUT                  = doc/src \\\n                         include \\\n                         examples \\          \n                         src \\\n                         test \\\n                         qa\nFILE_PATTERNS          = *.h \\\n                         *.c \\\n                         *.cpp \\\n                         *.java \\\n                         *.dox\nRECURSIVE              = YES\nEXCLUDE                = src/hostapi/wasapi/mingw-include\nEXCLUDE_SYMLINKS       = NO\nEXCLUDE_PATTERNS       = \nEXAMPLE_PATH           = \nEXAMPLE_PATTERNS       = \nEXAMPLE_RECURSIVE      = NO\nIMAGE_PATH             = doc/src/images\nINPUT_FILTER           = \nFILTER_PATTERNS        = \nFILTER_SOURCE_FILES    = NO\n#---------------------------------------------------------------------------\n# configuration options related to source browsing\n#---------------------------------------------------------------------------\nSOURCE_BROWSER         = NO\nINLINE_SOURCES         = NO\nSTRIP_CODE_COMMENTS    = YES\nREFERENCED_BY_RELATION = YES\nREFERENCES_RELATION    = YES\nUSE_HTAGS              = NO\nVERBATIM_HEADERS       = YES\n#---------------------------------------------------------------------------\n# configuration options related to the alphabetical class index\n#---------------------------------------------------------------------------\nALPHABETICAL_INDEX     = NO\nCOLS_IN_ALPHA_INDEX    = 5\nIGNORE_PREFIX          = \n#---------------------------------------------------------------------------\n# configuration options related to the HTML output\n#---------------------------------------------------------------------------\nGENERATE_HTML          = YES\nHTML_OUTPUT            = html\nHTML_FILE_EXTENSION    = .html\nHTML_HEADER            = \nHTML_FOOTER            = \nHTML_STYLESHEET        = \nHTML_ALIGN_MEMBERS     = YES\nGENERATE_HTMLHELP      = NO\nCHM_FILE               = \nHHC_LOCATION           = \nGENERATE_CHI           = NO\nBINARY_TOC             = NO\nTOC_EXPAND             = NO\nDISABLE_INDEX          = NO\nENUM_VALUES_PER_LINE   = 4\nGENERATE_TREEVIEW      = NO\nTREEVIEW_WIDTH         = 250\n#---------------------------------------------------------------------------\n# configuration options related to the LaTeX output\n#---------------------------------------------------------------------------\nGENERATE_LATEX         = NO\nLATEX_OUTPUT           = latex\nLATEX_CMD_NAME         = latex\nMAKEINDEX_CMD_NAME     = makeindex\nCOMPACT_LATEX          = NO\nPAPER_TYPE             = a4wide\nEXTRA_PACKAGES         = \nLATEX_HEADER           = \nPDF_HYPERLINKS         = NO\nUSE_PDFLATEX           = NO\nLATEX_BATCHMODE        = NO\nLATEX_HIDE_INDICES     = NO\n#---------------------------------------------------------------------------\n# configuration options related to the RTF output\n#---------------------------------------------------------------------------\nGENERATE_RTF           = NO\nRTF_OUTPUT             = rtf\nCOMPACT_RTF            = NO\nRTF_HYPERLINKS         = NO\nRTF_STYLESHEET_FILE    = \nRTF_EXTENSIONS_FILE    = \n#---------------------------------------------------------------------------\n# configuration options related to the man page output\n#---------------------------------------------------------------------------\nGENERATE_MAN           = NO\nMAN_OUTPUT             = man\nMAN_EXTENSION          = .3\nMAN_LINKS              = NO\n#---------------------------------------------------------------------------\n# configuration options related to the XML output\n#---------------------------------------------------------------------------\nGENERATE_XML           = NO\nXML_OUTPUT             = xml\nXML_SCHEMA             = \nXML_DTD                = \nXML_PROGRAMLISTING     = YES\n#---------------------------------------------------------------------------\n# configuration options for the AutoGen Definitions output\n#---------------------------------------------------------------------------\nGENERATE_AUTOGEN_DEF   = NO\n#---------------------------------------------------------------------------\n# configuration options related to the Perl module output\n#---------------------------------------------------------------------------\nGENERATE_PERLMOD       = NO\nPERLMOD_LATEX          = NO\nPERLMOD_PRETTY         = YES\nPERLMOD_MAKEVAR_PREFIX = \n#---------------------------------------------------------------------------\n# Configuration options related to the preprocessor   \n#---------------------------------------------------------------------------\nENABLE_PREPROCESSING   = YES\nMACRO_EXPANSION        = NO\nEXPAND_ONLY_PREDEF     = NO\nSEARCH_INCLUDES        = YES\nINCLUDE_PATH           = \nINCLUDE_FILE_PATTERNS  = \nPREDEFINED             = \nEXPAND_AS_DEFINED      = \nSKIP_FUNCTION_MACROS   = YES\n#---------------------------------------------------------------------------\n# Configuration::additions related to external references   \n#---------------------------------------------------------------------------\nTAGFILES               = \nGENERATE_TAGFILE       = \nALLEXTERNALS           = NO\nEXTERNAL_GROUPS        = YES\nPERL_PATH              = /usr/bin/perl\n#---------------------------------------------------------------------------\n# Configuration options related to the dot tool   \n#---------------------------------------------------------------------------\nCLASS_DIAGRAMS         = NO\nHIDE_UNDOC_RELATIONS   = NO\nHAVE_DOT               = NO\nCLASS_GRAPH            = YES\nCOLLABORATION_GRAPH    = YES\nGROUP_GRAPHS           = YES\nUML_LOOK               = NO\nTEMPLATE_RELATIONS     = YES\nINCLUDE_GRAPH          = YES\nINCLUDED_BY_GRAPH      = YES\nCALL_GRAPH             = NO\nGRAPHICAL_HIERARCHY    = YES\nDIRECTORY_GRAPH        = YES\nDOT_IMAGE_FORMAT       = png\nDOT_PATH               = \nDOTFILE_DIRS           = \nMAX_DOT_GRAPH_WIDTH    = 1024\nMAX_DOT_GRAPH_HEIGHT   = 1024\nMAX_DOT_GRAPH_DEPTH    = 1000\nDOT_TRANSPARENT        = NO\nDOT_MULTI_TARGETS      = NO\nGENERATE_LEGEND        = YES\nDOT_CLEANUP            = YES\n#---------------------------------------------------------------------------\n# Configuration::additions related to the search engine   \n#---------------------------------------------------------------------------\nSEARCHENGINE           = NO\n"
  },
  {
    "path": "thirdparty/portaudio/LICENSE.txt",
    "content": "Portable header file to contain:\n>>>>>\n/*\n * PortAudio Portable Real-Time Audio Library\n * PortAudio API Header File\n * Latest version available at: http://www.portaudio.com\n *\n * Copyright (c) 1999-2006 Ross Bencina and Phil Burk\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however, \n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also \n * requested that these non-binding requests be included along with the \n * license above.\n */\n<<<<<\n \n\nImplementation files to contain:\n>>>>>\n/*\n * PortAudio Portable Real-Time Audio Library\n * Latest version at: http://www.portaudio.com\n * <platform> Implementation\n * Copyright (c) 1999-2000 <author(s)>\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however, \n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also \n * requested that these non-binding requests be included along with the \n * license above.\n */\n<<<<<"
  },
  {
    "path": "thirdparty/portaudio/Makefile.in",
    "content": "#\n# PortAudio V19 Makefile.in\n#\n# Dominic Mazzoni\n# Modifications by Mikael Magnusson\n# Modifications by Stelios Bounanos\n#\n\ntop_srcdir = @top_srcdir@\nsrcdir = @srcdir@\nVPATH = @srcdir@\ntop_builddir = .\nPREFIX = @prefix@\nprefix = $(PREFIX)\nexec_prefix = @exec_prefix@\nbindir = @bindir@\nlibdir = @libdir@\nincludedir = @includedir@\nCC = @CC@\nCXX = @CXX@\nCFLAGS = @CFLAGS@ @DEFS@\nLIBS = @LIBS@\nAR = @AR@\nRANLIB = @RANLIB@\nSHELL = @SHELL@\nLIBTOOL = @LIBTOOL@\nINSTALL = @INSTALL@\nINSTALL_DATA = @INSTALL_DATA@\nSHARED_FLAGS = @SHARED_FLAGS@\nLDFLAGS = @LDFLAGS@\nDLL_LIBS = @DLL_LIBS@\nCXXFLAGS = @CXXFLAGS@\nNASM = @NASM@\nNASMOPT = @NASMOPT@\nLN_S = @LN_S@\nLT_CURRENT=@LT_CURRENT@\nLT_REVISION=@LT_REVISION@\nLT_AGE=@LT_AGE@\n\nOTHER_OBJS = @OTHER_OBJS@\nINCLUDES = @INCLUDES@\n\nPALIB = libportaudio.la\nPAINC = include/portaudio.h\n\nPA_LDFLAGS = $(LDFLAGS) $(SHARED_FLAGS) -rpath $(libdir) -no-undefined \\\n\t     -export-symbols-regex \"(Pa|PaMacCore|PaJack|PaAlsa|PaAsio|PaOSS|PaWasapi|PaWasapiWinrt)_.*\" \\\n\t     -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)\n\nCOMMON_OBJS = \\\n\tsrc/common/pa_allocation.o \\\n\tsrc/common/pa_converters.o \\\n\tsrc/common/pa_cpuload.o \\\n\tsrc/common/pa_dither.o \\\n\tsrc/common/pa_debugprint.o \\\n\tsrc/common/pa_front.o \\\n\tsrc/common/pa_process.o \\\n\tsrc/common/pa_stream.o \\\n\tsrc/common/pa_trace.o \\\n\tsrc/hostapi/skeleton/pa_hostapi_skeleton.o\n\nLOOPBACK_OBJS = \\\n\tqa/loopback/src/audio_analyzer.o \\\n\tqa/loopback/src/biquad_filter.o \\\n\tqa/loopback/src/paqa_tools.o \\\n\tqa/loopback/src/test_audio_analyzer.o \\\n\tqa/loopback/src/write_wav.o \\\n\tqa/loopback/src/paqa.o\n\t\nEXAMPLES = \\\n\tbin/pa_devs \\\n\tbin/pa_fuzz \\\n\tbin/paex_pink \\\n\tbin/paex_read_write_wire \\\n\tbin/paex_record \\\n\tbin/paex_saw \\\n\tbin/paex_sine \\\n\tbin/paex_write_sine \\\n\tbin/paex_write_sine_nonint\n\nSELFTESTS = \\\n\tbin/paqa_devs \\\n\tbin/paqa_errs \\\n\tbin/paqa_latency\n\t\nTESTS = \\\n\tbin/patest1 \\\n\tbin/patest_buffer \\\n\tbin/patest_callbackstop \\\n\tbin/patest_clip \\\n\tbin/patest_dither \\\n\tbin/patest_hang \\\n\tbin/patest_in_overflow \\\n\tbin/patest_latency \\\n\tbin/patest_leftright \\\n\tbin/patest_longsine \\\n\tbin/patest_many \\\n\tbin/patest_maxsines \\\n\tbin/patest_mono \\\n\tbin/patest_multi_sine \\\n\tbin/patest_out_underflow \\\n\tbin/patest_prime \\\n\tbin/patest_ringmix \\\n\tbin/patest_sine8 \\\n\tbin/patest_sine_channelmaps \\\n\tbin/patest_sine_formats \\\n\tbin/patest_sine_time \\\n\tbin/patest_sine_srate \\\n\tbin/patest_start_stop \\\n\tbin/patest_stop \\\n\tbin/patest_stop_playout \\\n\tbin/patest_toomanysines \\\n\tbin/patest_two_rates \\\n\tbin/patest_underflow \\\n\tbin/patest_wire \\\n\tbin/pa_minlat\n\n# Most of these don't compile yet.  Put them in TESTS, above, if\n# you want to try to compile them...\nALL_TESTS = \\\n\t$(TESTS) \\\n\tbin/patest_sync \\\n\tbin/debug_convert \\\n\tbin/debug_dither_calc \\\n\tbin/debug_dual \\\n\tbin/debug_multi_in \\\n\tbin/debug_multi_out \\\n\tbin/debug_record \\\n\tbin/debug_record_reuse \\\n\tbin/debug_sine_amp \\\n\tbin/debug_sine \\\n\tbin/debug_sine_formats \\\n\tbin/debug_srate \\\n\tbin/debug_test1\n\nOBJS := $(COMMON_OBJS) $(OTHER_OBJS)\n\nLTOBJS := $(OBJS:.o=.lo)\n\nSRC_DIRS = \\\n\tsrc/common \\\n\tsrc/hostapi/alsa \\\n\tsrc/hostapi/asihpi \\\n\tsrc/hostapi/asio \\\n\tsrc/hostapi/coreaudio \\\n\tsrc/hostapi/dsound \\\n\tsrc/hostapi/jack \\\n\tsrc/hostapi/oss \\\n\tsrc/hostapi/skeleton \\\n\tsrc/hostapi/wasapi \\\n\tsrc/hostapi/wdmks \\\n\tsrc/hostapi/wmme \\\n\tsrc/os/unix \\\n\tsrc/os/win\n\nSUBDIRS =\n@ENABLE_CXX_TRUE@SUBDIRS += bindings/cpp\n\nall: lib/$(PALIB) all-recursive tests examples selftests\n\ntests: bin-stamp $(TESTS)\n\nexamples: bin-stamp $(EXAMPLES)\n\nselftests: bin-stamp $(SELFTESTS)\n\nloopback: bin-stamp bin/paloopback\n\n# With ASIO enabled we must link libportaudio and all test programs with CXX\nlib/$(PALIB): lib-stamp $(LTOBJS) $(MAKEFILE) $(PAINC)\n\t@WITH_ASIO_FALSE@ $(LIBTOOL) --mode=link $(CC) $(PA_LDFLAGS) -o lib/$(PALIB) $(LTOBJS) $(DLL_LIBS)\n\t@WITH_ASIO_TRUE@  $(LIBTOOL) --mode=link --tag=CXX $(CXX) $(PA_LDFLAGS) -o lib/$(PALIB) $(LTOBJS) $(DLL_LIBS)\n\n$(ALL_TESTS): bin/%: lib/$(PALIB) $(MAKEFILE) $(PAINC) test/%.c\n\t@WITH_ASIO_FALSE@ $(LIBTOOL) --mode=link $(CC) -o $@ $(CFLAGS) $(top_srcdir)/test/$*.c lib/$(PALIB) $(LIBS)\n\t@WITH_ASIO_TRUE@  $(LIBTOOL) --mode=link --tag=CXX $(CXX) -o $@ $(CXXFLAGS) $(top_srcdir)/test/$*.c lib/$(PALIB) $(LIBS)\n\n$(EXAMPLES): bin/%: lib/$(PALIB) $(MAKEFILE) $(PAINC) examples/%.c\n\t@WITH_ASIO_FALSE@ $(LIBTOOL) --mode=link $(CC) -o $@ $(CFLAGS) $(top_srcdir)/examples/$*.c lib/$(PALIB) $(LIBS)\n\t@WITH_ASIO_TRUE@  $(LIBTOOL) --mode=link --tag=CXX $(CXX) -o $@ $(CXXFLAGS) $(top_srcdir)/examples/$*.c lib/$(PALIB) $(LIBS)\n\n$(SELFTESTS): bin/%: lib/$(PALIB) $(MAKEFILE) $(PAINC) qa/%.c\n\t@WITH_ASIO_FALSE@ $(LIBTOOL) --mode=link $(CC) -o $@ $(CFLAGS) $(top_srcdir)/qa/$*.c lib/$(PALIB) $(LIBS)\n\t@WITH_ASIO_TRUE@  $(LIBTOOL) --mode=link --tag=CXX $(CXX) -o $@ $(CXXFLAGS) $(top_srcdir)/qa/$*.c lib/$(PALIB) $(LIBS)\n\nbin/paloopback: lib/$(PALIB) $(MAKEFILE) $(PAINC) $(LOOPBACK_OBJS)\n\t@WITH_ASIO_FALSE@ $(LIBTOOL) --mode=link $(CC) -o $@ $(CFLAGS) $(LOOPBACK_OBJS) lib/$(PALIB) $(LIBS)\n\t@WITH_ASIO_TRUE@ $(LIBTOOL) --mode=link --tag=CXX $(CXX) -o $@ $(CXXFLAGS)  $(LOOPBACK_OBJS) lib/$(PALIB) $(LIBS)\n\ninstall: lib/$(PALIB) portaudio-2.0.pc\n\t$(INSTALL) -d $(DESTDIR)$(libdir)\n\t$(LIBTOOL) --mode=install $(INSTALL) lib/$(PALIB) $(DESTDIR)$(libdir)\n\t$(INSTALL) -d $(DESTDIR)$(includedir)\n\tfor include in $(INCLUDES); do \\\n\t\t$(INSTALL_DATA) -m 644 $(top_srcdir)/include/$$include $(DESTDIR)$(includedir)/$$include; \\\n\tdone\n\t$(INSTALL) -d $(DESTDIR)$(libdir)/pkgconfig\n\t$(INSTALL) -m 644 portaudio-2.0.pc $(DESTDIR)$(libdir)/pkgconfig/portaudio-2.0.pc\n\t@echo \"\"\n\t@echo \"------------------------------------------------------------\"\n\t@echo \"PortAudio was successfully installed.\"\n\t@echo \"\"\n\t@echo \"On some systems (e.g. Linux) you should run 'ldconfig' now\"\n\t@echo \"to make the shared object available.  You may also need to\"\n\t@echo \"modify your LD_LIBRARY_PATH environment variable to include\"\n\t@echo \"the directory $(libdir)\"\n\t@echo \"------------------------------------------------------------\"\n\t@echo \"\"\n\t$(MAKE) install-recursive\n\nuninstall:\n\t$(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$(PALIB)\n\t$(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(includedir)/portaudio.h\n\t$(MAKE) uninstall-recursive\n\nclean:\n\t$(LIBTOOL) --mode=clean rm -f $(LTOBJS) $(LOOPBACK_OBJS) $(ALL_TESTS) lib/$(PALIB)\n\t$(RM) bin-stamp lib-stamp\n\t-$(RM) -r bin lib\n\ndistclean: clean\n\t$(RM) config.log config.status Makefile libtool portaudio-2.0.pc\n\n%.o: %.c $(MAKEFILE) $(PAINC) lib-stamp\n\t$(CC) -c $(CFLAGS) $< -o $@\n\n%.lo: %.c $(MAKEFILE) $(PAINC) lib-stamp\n\t$(LIBTOOL) --mode=compile $(CC) -c $(CFLAGS) $< -o $@\n\n%.lo: %.cpp $(MAKEFILE) $(PAINC) lib-stamp\n\t$(LIBTOOL) --mode=compile --tag=CXX $(CXX) -c $(CXXFLAGS) $< -o $@\n\n%.o: %.cpp $(MAKEFILE) $(PAINC) lib-stamp\n\t$(CXX) -c $(CXXFLAGS) $< -o $@\n\n%.o: %.asm\n\t$(NASM) $(NASMOPT) -o $@ $<\n\nbin-stamp:\n\t-mkdir bin\n\ttouch $@\n\nlib-stamp:\n\t-mkdir lib\n\t-mkdir -p $(SRC_DIRS)\n\ttouch $@\n\nMakefile: Makefile.in config.status\n\t$(SHELL) config.status\n\nall-recursive:\n\tif test -n \"$(SUBDIRS)\" ; then for dir in \"$(SUBDIRS)\"; do $(MAKE) -C $$dir all; done ; fi\n\ninstall-recursive:\n\tif test -n \"$(SUBDIRS)\" ; then for dir in \"$(SUBDIRS)\"; do $(MAKE) -C $$dir install; done ; fi\n\nuninstall-recursive:\n\tif test -n \"$(SUBDIRS)\" ; then for dir in \"$(SUBDIRS)\"; do $(MAKE) -C $$dir uninstall; done ; fi\n"
  },
  {
    "path": "thirdparty/portaudio/README.configure.txt",
    "content": "PortAudio uses \"autoconf\" tools to generate Makefiles for Linux and Mac platforms.\nThe source for these are configure.in and Makefile.in\nIf you modify either of these files then please run this command before\ntesting and checking in your changes. I run this command on Linux.\n\n   autoreconf -if\n\nIf you do not have autoreconf then do:\n   sudo apt-get install autoconf\n\nIf you get error like \"possibly undefined macro: AC_LIBTOOL_WIN32_DLL\"\nthen you try installing some more packages and then try again.\n\n   sudo apt-get install build-essential\n   sudo apt-get install pkg-config\n   sudo apt-get install libtool\n   autoreconf -if\n\nThen test a build by doing:\n   \n   ./configure\n   make clean\n   make\n\nthen check in the related files that are modified.\nThese might include files like:\n\n   configure\n   config.guess\n   depcomp\n   install.sh\n   \n"
  },
  {
    "path": "thirdparty/portaudio/README.md",
    "content": "# PortAudio - portable audio I/O library\n\nPortAudio is a portable audio I/O library designed for cross-platform\nsupport of audio. It uses either a callback mechanism to request audio \nprocessing, or blocking read/write calls to buffer data between the \nnative audio subsystem and the client. Audio can be processed in various \nformats, including 32 bit floating point, and will be converted to the \nnative format internally.\n\n## Documentation:\n\n* Documentation is available at http://www.portaudio.com/docs/\n* Or at `/doc/html/index.html` after running Doxygen.\n* Also see `src/common/portaudio.h` for the API spec.\n* And see the `examples/` and `test/` directories for many examples of usage. (We suggest `examples/paex_saw.c` for an example.)\n\nFor information on compiling programs with PortAudio, please see the\ntutorial at:\n\n  http://portaudio.com/docs/v19-doxydocs/tutorial_start.html\n  \nWe have an active mailing list for user and developer discussions.\nPlease feel free to join. See http://www.portaudio.com for details.\n\n## Important Files and Folders:\n\n    include/portaudio.h     = header file for PortAudio API. Specifies API.\t\n    src/common/             = platform independent code, host independent \n                              code for all implementations.\n    src/os                  = os specific (but host api neutral) code\n    src/hostapi             = implementations for different host apis\n\n\n### Host API Implementations:\n\n    src/hostapi/alsa        = Advanced Linux Sound Architecture (ALSA)\n    src/hostapi/asihpi      = AudioScience HPI\n    src/hostapi/asio        = ASIO for Windows and Macintosh\n    src/hostapi/coreaudio   = Macintosh Core Audio for OS X\n    src/hostapi/dsound      = Windows Direct Sound\n    src/hostapi/jack        = JACK Audio Connection Kit\n    src/hostapi/oss         = Unix Open Sound System (OSS)\n    src/hostapi/wasapi      = Windows Vista WASAPI\n    src/hostapi/wdmks       = Windows WDM Kernel Streaming\n    src/hostapi/wmme        = Windows MultiMedia Extensions (MME)\n\n\n### Test Programs:\n\n    test/pa_fuzz.c         = guitar fuzz box\n    test/pa_devs.c         = print a list of available devices\n    test/pa_minlat.c       = determine minimum latency for your machine\n    test/paqa_devs.c       = self test that opens all devices\n    test/paqa_errs.c       = test error detection and reporting\n    test/patest_clip.c     = hear a sine wave clipped and unclipped\n    test/patest_dither.c   = hear effects of dithering (extremely subtle)\n    test/patest_pink.c     = fun with pink noise\n    test/patest_record.c   = record and playback some audio\n    test/patest_maxsines.c = how many sine waves can we play? Tests Pa_GetCPULoad().\n    test/patest_sine.c     = output a sine wave in a simple PA app\n    test/patest_sync.c     = test synchronization of audio and video\n    test/patest_wire.c     = pass input to output, wire simulator\n"
  },
  {
    "path": "thirdparty/portaudio/SConstruct",
    "content": "import sys, os.path\n\ndef rsplit(toSplit, sub, max=-1):\n    \"\"\" str.rsplit seems to have been introduced in 2.4 :( \"\"\"\n    l = []\n    i = 0\n    while i != max:\n        try: idx = toSplit.rindex(sub)\n        except ValueError: break\n\n        toSplit, splitOff = toSplit[:idx], toSplit[idx + len(sub):]\n        l.insert(0, splitOff)\n        i += 1\n\n    l.insert(0, toSplit)\n    return l\n\nsconsDir = os.path.join(\"build\", \"scons\")\nSConscript(os.path.join(sconsDir, \"SConscript_common\"))\nImport(\"Platform\", \"Posix\", \"ApiVer\")\n\n# SConscript_opts exports PortAudio options\noptsDict = SConscript(os.path.join(sconsDir, \"SConscript_opts\"))\noptionsCache = os.path.join(sconsDir, \"options.cache\")   # Save options between runs in this cache\noptions = Options(optionsCache, args=ARGUMENTS)\nfor k in (\"Installation Dirs\", \"Build Targets\", \"Host APIs\", \"Build Parameters\", \"Bindings\"):\n    options.AddOptions(*optsDict[k])\n# Propagate options into environment\nenv = Environment(options=options)\n# Save options for next run\noptions.Save(optionsCache, env)\n# Generate help text for options\nenv.Help(options.GenerateHelpText(env))\n\nbuildDir = os.path.join(\"#\", sconsDir, env[\"PLATFORM\"])\n\n# Determine parameters to build tools\nif Platform in Posix:\n    threadCFlags = ''\n    if Platform != 'darwin':\n        threadCFlags = \"-pthread \"\n    baseLinkFlags = threadCFlags\n    baseCxxFlags = baseCFlags = \"-Wall -pedantic -pipe \" + threadCFlags\n    debugCxxFlags = debugCFlags = \"-g\"\n    optCxxFlags = optCFlags  = \"-O2\"\nenv.Append(CCFLAGS = baseCFlags)\nenv.Append(CXXFLAGS = baseCxxFlags)\nenv.Append(LINKFLAGS = baseLinkFlags)\nif env[\"enableDebug\"]:\n    env.AppendUnique(CCFLAGS=debugCFlags.split())\n    env.AppendUnique(CXXFLAGS=debugCxxFlags.split())\nif env[\"enableOptimize\"]:\n    env.AppendUnique(CCFLAGS=optCFlags.split())\n    env.AppendUnique(CXXFLAGS=optCxxFlags.split())\nif not env[\"enableAsserts\"]:\n    env.AppendUnique(CPPDEFINES=[\"-DNDEBUG\"])\nif env[\"customCFlags\"]:\n    env.Append(CCFLAGS=Split(env[\"customCFlags\"]))\nif env[\"customCxxFlags\"]:\n    env.Append(CXXFLAGS=Split(env[\"customCxxFlags\"]))\nif env[\"customLinkFlags\"]:\n    env.Append(LINKFLAGS=Split(env[\"customLinkFlags\"]))\n\nenv.Append(CPPPATH=[os.path.join(\"#\", \"include\"), \"common\"])\n\n# Store all signatures in one file, otherwise .sconsign files will get installed along with our own files\nenv.SConsignFile(os.path.join(sconsDir, \".sconsign\"))\n\nenv.SConscriptChdir(False)\nsources, sharedLib, staticLib, tests, portEnv, hostApis = env.SConscript(os.path.join(\"src\", \"SConscript\"),\n        build_dir=buildDir, duplicate=False, exports=[\"env\"])\n\nif Platform in Posix:\n    prefix = env[\"prefix\"]\n    includeDir = os.path.join(prefix, \"include\")\n    libDir = os.path.join(prefix, \"lib\")\n    env.Alias(\"install\", includeDir)\n    env.Alias(\"install\", libDir)\n\n    # pkg-config\n\n    def installPkgconfig(env, target, source):\n        tgt = str(target[0])\n        src = str(source[0])\n        f = open(src)\n        try: txt = f.read()\n        finally: f.close()\n        txt = txt.replace(\"@prefix@\", prefix)\n        txt = txt.replace(\"@exec_prefix@\", prefix)\n        txt = txt.replace(\"@libdir@\", libDir)\n        txt = txt.replace(\"@includedir@\", includeDir)\n        txt = txt.replace(\"@LIBS@\", \" \".join([\"-l%s\" % l for l in portEnv[\"LIBS\"]]))\n        txt = txt.replace(\"@THREAD_CFLAGS@\", threadCFlags)\n\n        f = open(tgt, \"w\")\n        try: f.write(txt)\n        finally: f.close()\n\n    pkgconfigTgt = \"portaudio-%d.0.pc\" % int(ApiVer.split(\".\", 1)[0])\n    env.Command(os.path.join(libDir, \"pkgconfig\", pkgconfigTgt),\n        os.path.join(\"#\", pkgconfigTgt + \".in\"), installPkgconfig)\n\n# Default to None, since if the user disables all targets and no Default is set, all targets\n# are built by default\nenv.Default(None)\nif env[\"enableTests\"]:\n    env.Default(tests)\nif env[\"enableShared\"]:\n    env.Default(sharedLib)\n\n    if Platform in Posix:\n        def symlink(env, target, source):\n            trgt = str(target[0])\n            src = str(source[0])\n\n            if os.path.islink(trgt) or os.path.exists(trgt):\n                os.remove(trgt)\n            os.symlink(os.path.basename(src), trgt)\n\n        major, minor, micro = [int(c) for c in ApiVer.split(\".\")]\n        \n        soFile = \"%s.%s\" % (os.path.basename(str(sharedLib[0])), ApiVer)\n        env.InstallAs(target=os.path.join(libDir, soFile), source=sharedLib)\n        # Install symlinks\n        symTrgt = os.path.join(libDir, soFile)\n        env.Command(os.path.join(libDir, \"libportaudio.so.%d.%d\" % (major, minor)),\n            symTrgt, symlink)\n        symTrgt = rsplit(symTrgt, \".\", 1)[0]\n        env.Command(os.path.join(libDir, \"libportaudio.so.%d\" % major), symTrgt, symlink)\n        symTrgt = rsplit(symTrgt, \".\", 1)[0]\n        env.Command(os.path.join(libDir, \"libportaudio.so\"), symTrgt, symlink)\n\nif env[\"enableStatic\"]:\n    env.Default(staticLib)\n    env.Install(libDir, staticLib)\n\nenv.Install(includeDir, os.path.join(\"include\", \"portaudio.h\"))\n\n\nif env[\"enableCxx\"]:\n    env.SConscriptChdir(True)\n    cxxEnv = env.Copy()\n    sharedLibs, staticLibs, headers = env.SConscript(os.path.join(\"bindings\", \"cpp\", \"SConscript\"),\n            exports={\"env\": cxxEnv, \"buildDir\": buildDir}, build_dir=os.path.join(buildDir, \"portaudiocpp\"), duplicate=False)\n    if env[\"enableStatic\"]:\n        env.Default(staticLibs)\n        env.Install(libDir, staticLibs)\n    if env[\"enableShared\"]:\n        env.Default(sharedLibs)\n        env.Install(libDir, sharedLibs)\n    env.Install(os.path.join(includeDir, \"portaudiocpp\"), headers)\n\n# Generate portaudio_config.h header with compile-time definitions of which PA\n# back-ends are available, and which includes back-end extension headers\n\n# Host-specific headers\nhostApiHeaders = {\"ALSA\": \"pa_linux_alsa.h\",\n                    \"ASIO\": \"pa_asio.h\",\n                    \"COREAUDIO\": \"pa_mac_core.h\",\n                    \"JACK\": \"pa_jack.h\",\n                    \"WMME\": \"pa_winwmme.h\",\n                    }\n\ndef buildConfigH(target, source, env):\n    \"\"\"builder for portaudio_config.h\"\"\"\n    global hostApiHeaders, hostApis\n    out = \"\"\n    for hostApi in hostApis:\n        out += \"#define PA_HAVE_%s\\n\" % hostApi\n\n        hostApiSpecificHeader = hostApiHeaders.get(hostApi, None)\n        if hostApiSpecificHeader:\n            out += \"#include \\\"%s\\\"\\n\" % hostApiSpecificHeader\n\n        out += \"\\n\"\n    # Strip the last newline\n    if out and out[-1] == \"\\n\":\n        out = out[:-1]\n\n    f = file(str(target[0]), 'w')\n    try: f.write(out)\n    finally: f.close()\n    return 0\n\n# Define the builder for the config header\nenv.Append(BUILDERS={\"portaudioConfig\": env.Builder(\n            action=Action(buildConfigH), target_factory=env.fs.File)})\n\nconfH = env.portaudioConfig(File(\"portaudio_config.h\", \"include\"),\n        File(\"portaudio.h\", \"include\"))\nenv.Default(confH)\nenv.Install(os.path.join(includeDir, \"portaudio\"), confH)\n\nfor api in hostApis:\n    if api in hostApiHeaders:\n        env.Install(os.path.join(includeDir, \"portaudio\"),\n                File(hostApiHeaders[api], \"include\"))\n"
  },
  {
    "path": "thirdparty/portaudio/aclocal.m4",
    "content": "# generated automatically by aclocal 1.14.1 -*- Autoconf -*-\n\n# Copyright (C) 1996-2013 Free Software Foundation, Inc.\n\n# This file is free software; the Free Software Foundation\n# gives unlimited permission to copy and/or distribute it,\n# with or without modifications, as long as this notice is preserved.\n\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY, to the extent permitted by law; without\n# even the implied warranty of MERCHANTABILITY or FITNESS FOR A\n# PARTICULAR PURPOSE.\n\nm4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])\n# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-\n#\n#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,\n#                 2006, 2007, 2008, 2009, 2010, 2011 Free Software\n#                 Foundation, Inc.\n#   Written by Gordon Matzigkeit, 1996\n#\n# This file is free software; the Free Software Foundation gives\n# unlimited permission to copy and/or distribute it, with or without\n# modifications, as long as this notice is preserved.\n\nm4_define([_LT_COPYING], [dnl\n#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,\n#                 2006, 2007, 2008, 2009, 2010, 2011 Free Software\n#                 Foundation, Inc.\n#   Written by Gordon Matzigkeit, 1996\n#\n#   This file is part of GNU Libtool.\n#\n# GNU Libtool is free software; you can redistribute it and/or\n# modify it under the terms of the GNU General Public License as\n# published by the Free Software Foundation; either version 2 of\n# the License, or (at your option) any later version.\n#\n# As a special exception to the GNU General Public License,\n# if you distribute this file as part of a program or library that\n# is built using GNU Libtool, you may include this file under the\n# same distribution terms that you use for the rest of that program.\n#\n# GNU Libtool is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n# GNU General Public License for more details.\n#\n# You should have received a copy of the GNU General Public License\n# along with GNU Libtool; see the file COPYING.  If not, a copy\n# can be downloaded from http://www.gnu.org/licenses/gpl.html, or\n# obtained by writing to the Free Software Foundation, Inc.,\n# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n])\n\n# serial 57 LT_INIT\n\n\n# LT_PREREQ(VERSION)\n# ------------------\n# Complain and exit if this libtool version is less that VERSION.\nm4_defun([LT_PREREQ],\n[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,\n       [m4_default([$3],\n\t\t   [m4_fatal([Libtool version $1 or higher is required],\n\t\t             63)])],\n       [$2])])\n\n\n# _LT_CHECK_BUILDDIR\n# ------------------\n# Complain if the absolute build directory name contains unusual characters\nm4_defun([_LT_CHECK_BUILDDIR],\n[case `pwd` in\n  *\\ * | *\\\t*)\n    AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;\nesac\n])\n\n\n# LT_INIT([OPTIONS])\n# ------------------\nAC_DEFUN([LT_INIT],\n[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT\nAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl\nAC_BEFORE([$0], [LT_LANG])dnl\nAC_BEFORE([$0], [LT_OUTPUT])dnl\nAC_BEFORE([$0], [LTDL_INIT])dnl\nm4_require([_LT_CHECK_BUILDDIR])dnl\n\ndnl Autoconf doesn't catch unexpanded LT_ macros by default:\nm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl\nm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl\ndnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4\ndnl unless we require an AC_DEFUNed macro:\nAC_REQUIRE([LTOPTIONS_VERSION])dnl\nAC_REQUIRE([LTSUGAR_VERSION])dnl\nAC_REQUIRE([LTVERSION_VERSION])dnl\nAC_REQUIRE([LTOBSOLETE_VERSION])dnl\nm4_require([_LT_PROG_LTMAIN])dnl\n\n_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])\n\ndnl Parse OPTIONS\n_LT_SET_OPTIONS([$0], [$1])\n\n# This can be used to rebuild libtool when needed\nLIBTOOL_DEPS=\"$ltmain\"\n\n# Always use our own libtool.\nLIBTOOL='$(SHELL) $(top_builddir)/libtool'\nAC_SUBST(LIBTOOL)dnl\n\n_LT_SETUP\n\n# Only expand once:\nm4_define([LT_INIT])\n])# LT_INIT\n\n# Old names:\nAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])\nAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])\ndnl aclocal-1.4 backwards compatibility:\ndnl AC_DEFUN([AC_PROG_LIBTOOL], [])\ndnl AC_DEFUN([AM_PROG_LIBTOOL], [])\n\n\n# _LT_CC_BASENAME(CC)\n# -------------------\n# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.\nm4_defun([_LT_CC_BASENAME],\n[for cc_temp in $1\"\"; do\n  case $cc_temp in\n    compile | *[[\\\\/]]compile | ccache | *[[\\\\/]]ccache ) ;;\n    distcc | *[[\\\\/]]distcc | purify | *[[\\\\/]]purify ) ;;\n    \\-*) ;;\n    *) break;;\n  esac\ndone\ncc_basename=`$ECHO \"$cc_temp\" | $SED \"s%.*/%%; s%^$host_alias-%%\"`\n])\n\n\n# _LT_FILEUTILS_DEFAULTS\n# ----------------------\n# It is okay to use these file commands and assume they have been set\n# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.\nm4_defun([_LT_FILEUTILS_DEFAULTS],\n[: ${CP=\"cp -f\"}\n: ${MV=\"mv -f\"}\n: ${RM=\"rm -f\"}\n])# _LT_FILEUTILS_DEFAULTS\n\n\n# _LT_SETUP\n# ---------\nm4_defun([_LT_SETUP],\n[AC_REQUIRE([AC_CANONICAL_HOST])dnl\nAC_REQUIRE([AC_CANONICAL_BUILD])dnl\nAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl\nAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl\n\n_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl\ndnl\n_LT_DECL([], [host_alias], [0], [The host system])dnl\n_LT_DECL([], [host], [0])dnl\n_LT_DECL([], [host_os], [0])dnl\ndnl\n_LT_DECL([], [build_alias], [0], [The build system])dnl\n_LT_DECL([], [build], [0])dnl\n_LT_DECL([], [build_os], [0])dnl\ndnl\nAC_REQUIRE([AC_PROG_CC])dnl\nAC_REQUIRE([LT_PATH_LD])dnl\nAC_REQUIRE([LT_PATH_NM])dnl\ndnl\nAC_REQUIRE([AC_PROG_LN_S])dnl\ntest -z \"$LN_S\" && LN_S=\"ln -s\"\n_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl\ndnl\nAC_REQUIRE([LT_CMD_MAX_LEN])dnl\n_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally \"o\")])dnl\n_LT_DECL([], [exeext], [0], [Executable file suffix (normally \"\")])dnl\ndnl\nm4_require([_LT_FILEUTILS_DEFAULTS])dnl\nm4_require([_LT_CHECK_SHELL_FEATURES])dnl\nm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl\nm4_require([_LT_CMD_RELOAD])dnl\nm4_require([_LT_CHECK_MAGIC_METHOD])dnl\nm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl\nm4_require([_LT_CMD_OLD_ARCHIVE])dnl\nm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl\nm4_require([_LT_WITH_SYSROOT])dnl\n\n_LT_CONFIG_LIBTOOL_INIT([\n# See if we are running on zsh, and set the options which allow our\n# commands through without removal of \\ escapes INIT.\nif test -n \"\\${ZSH_VERSION+set}\" ; then\n   setopt NO_GLOB_SUBST\nfi\n])\nif test -n \"${ZSH_VERSION+set}\" ; then\n   setopt NO_GLOB_SUBST\nfi\n\n_LT_CHECK_OBJDIR\n\nm4_require([_LT_TAG_COMPILER])dnl\n\ncase $host_os in\naix3*)\n  # AIX sometimes has problems with the GCC collect2 program.  For some\n  # reason, if we set the COLLECT_NAMES environment variable, the problems\n  # vanish in a puff of smoke.\n  if test \"X${COLLECT_NAMES+set}\" != Xset; then\n    COLLECT_NAMES=\n    export COLLECT_NAMES\n  fi\n  ;;\nesac\n\n# Global variables:\nofile=libtool\ncan_build_shared=yes\n\n# All known linkers require a `.a' archive for static linking (except MSVC,\n# which needs '.lib').\nlibext=a\n\nwith_gnu_ld=\"$lt_cv_prog_gnu_ld\"\n\nold_CC=\"$CC\"\nold_CFLAGS=\"$CFLAGS\"\n\n# Set sane defaults for various variables\ntest -z \"$CC\" && CC=cc\ntest -z \"$LTCC\" && LTCC=$CC\ntest -z \"$LTCFLAGS\" && LTCFLAGS=$CFLAGS\ntest -z \"$LD\" && LD=ld\ntest -z \"$ac_objext\" && ac_objext=o\n\n_LT_CC_BASENAME([$compiler])\n\n# Only perform the check for file, if the check method requires it\ntest -z \"$MAGIC_CMD\" && MAGIC_CMD=file\ncase $deplibs_check_method in\nfile_magic*)\n  if test \"$file_magic_cmd\" = '$MAGIC_CMD'; then\n    _LT_PATH_MAGIC\n  fi\n  ;;\nesac\n\n# Use C for the default configuration in the libtool script\nLT_SUPPORTED_TAG([CC])\n_LT_LANG_C_CONFIG\n_LT_LANG_DEFAULT_CONFIG\n_LT_CONFIG_COMMANDS\n])# _LT_SETUP\n\n\n# _LT_PREPARE_SED_QUOTE_VARS\n# --------------------------\n# Define a few sed substitution that help us do robust quoting.\nm4_defun([_LT_PREPARE_SED_QUOTE_VARS],\n[# Backslashify metacharacters that are still active within\n# double-quoted strings.\nsed_quote_subst='s/\\([[\"`$\\\\]]\\)/\\\\\\1/g'\n\n# Same as above, but do not quote variable references.\ndouble_quote_subst='s/\\([[\"`\\\\]]\\)/\\\\\\1/g'\n\n# Sed substitution to delay expansion of an escaped shell variable in a\n# double_quote_subst'ed string.\ndelay_variable_subst='s/\\\\\\\\\\\\\\\\\\\\\\$/\\\\\\\\\\\\$/g'\n\n# Sed substitution to delay expansion of an escaped single quote.\ndelay_single_quote_subst='s/'\\''/'\\'\\\\\\\\\\\\\\'\\''/g'\n\n# Sed substitution to avoid accidental globbing in evaled expressions\nno_glob_subst='s/\\*/\\\\\\*/g'\n])\n\n# _LT_PROG_LTMAIN\n# ---------------\n# Note that this code is called both from `configure', and `config.status'\n# now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,\n# `config.status' has no value for ac_aux_dir unless we are using Automake,\n# so we pass a copy along to make sure it has a sensible value anyway.\nm4_defun([_LT_PROG_LTMAIN],\n[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl\n_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])\nltmain=\"$ac_aux_dir/ltmain.sh\"\n])# _LT_PROG_LTMAIN\n\n\n\n# So that we can recreate a full libtool script including additional\n# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS\n# in macros and then make a single call at the end using the `libtool'\n# label.\n\n\n# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])\n# ----------------------------------------\n# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.\nm4_define([_LT_CONFIG_LIBTOOL_INIT],\n[m4_ifval([$1],\n          [m4_append([_LT_OUTPUT_LIBTOOL_INIT],\n                     [$1\n])])])\n\n# Initialize.\nm4_define([_LT_OUTPUT_LIBTOOL_INIT])\n\n\n# _LT_CONFIG_LIBTOOL([COMMANDS])\n# ------------------------------\n# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.\nm4_define([_LT_CONFIG_LIBTOOL],\n[m4_ifval([$1],\n          [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],\n                     [$1\n])])])\n\n# Initialize.\nm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])\n\n\n# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])\n# -----------------------------------------------------\nm4_defun([_LT_CONFIG_SAVE_COMMANDS],\n[_LT_CONFIG_LIBTOOL([$1])\n_LT_CONFIG_LIBTOOL_INIT([$2])\n])\n\n\n# _LT_FORMAT_COMMENT([COMMENT])\n# -----------------------------\n# Add leading comment marks to the start of each line, and a trailing\n# full-stop to the whole comment if one is not present already.\nm4_define([_LT_FORMAT_COMMENT],\n[m4_ifval([$1], [\nm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],\n              [['`$\\]], [\\\\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])\n)])\n\n\n\n\n\n# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])\n# -------------------------------------------------------------------\n# CONFIGNAME is the name given to the value in the libtool script.\n# VARNAME is the (base) name used in the configure script.\n# VALUE may be 0, 1 or 2 for a computed quote escaped value based on\n# VARNAME.  Any other value will be used directly.\nm4_define([_LT_DECL],\n[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],\n    [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],\n\t[m4_ifval([$1], [$1], [$2])])\n    lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])\n    m4_ifval([$4],\n\t[lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])\n    lt_dict_add_subkey([lt_decl_dict], [$2],\n\t[tagged?], [m4_ifval([$5], [yes], [no])])])\n])\n\n\n# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])\n# --------------------------------------------------------\nm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])\n\n\n# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])\n# ------------------------------------------------\nm4_define([lt_decl_tag_varnames],\n[_lt_decl_filter([tagged?], [yes], $@)])\n\n\n# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])\n# ---------------------------------------------------------\nm4_define([_lt_decl_filter],\n[m4_case([$#],\n  [0], [m4_fatal([$0: too few arguments: $#])],\n  [1], [m4_fatal([$0: too few arguments: $#: $1])],\n  [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],\n  [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],\n  [lt_dict_filter([lt_decl_dict], $@)])[]dnl\n])\n\n\n# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])\n# --------------------------------------------------\nm4_define([lt_decl_quote_varnames],\n[_lt_decl_filter([value], [1], $@)])\n\n\n# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])\n# ---------------------------------------------------\nm4_define([lt_decl_dquote_varnames],\n[_lt_decl_filter([value], [2], $@)])\n\n\n# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])\n# ---------------------------------------------------\nm4_define([lt_decl_varnames_tagged],\n[m4_assert([$# <= 2])dnl\n_$0(m4_quote(m4_default([$1], [[, ]])),\n    m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),\n    m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])\nm4_define([_lt_decl_varnames_tagged],\n[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])\n\n\n# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])\n# ------------------------------------------------\nm4_define([lt_decl_all_varnames],\n[_$0(m4_quote(m4_default([$1], [[, ]])),\n     m4_if([$2], [],\n\t   m4_quote(lt_decl_varnames),\n\tm4_quote(m4_shift($@))))[]dnl\n])\nm4_define([_lt_decl_all_varnames],\n[lt_join($@, lt_decl_varnames_tagged([$1],\n\t\t\tlt_decl_tag_varnames([[, ]], m4_shift($@))))dnl\n])\n\n\n# _LT_CONFIG_STATUS_DECLARE([VARNAME])\n# ------------------------------------\n# Quote a variable value, and forward it to `config.status' so that its\n# declaration there will have the same value as in `configure'.  VARNAME\n# must have a single quote delimited value for this to work.\nm4_define([_LT_CONFIG_STATUS_DECLARE],\n[$1='`$ECHO \"$][$1\" | $SED \"$delay_single_quote_subst\"`'])\n\n\n# _LT_CONFIG_STATUS_DECLARATIONS\n# ------------------------------\n# We delimit libtool config variables with single quotes, so when\n# we write them to config.status, we have to be sure to quote all\n# embedded single quotes properly.  In configure, this macro expands\n# each variable declared with _LT_DECL (and _LT_TAGDECL) into:\n#\n#    <var>='`$ECHO \"$<var>\" | $SED \"$delay_single_quote_subst\"`'\nm4_defun([_LT_CONFIG_STATUS_DECLARATIONS],\n[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),\n    [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])\n\n\n# _LT_LIBTOOL_TAGS\n# ----------------\n# Output comment and list of tags supported by the script\nm4_defun([_LT_LIBTOOL_TAGS],\n[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl\navailable_tags=\"_LT_TAGS\"dnl\n])\n\n\n# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])\n# -----------------------------------\n# Extract the dictionary values for VARNAME (optionally with TAG) and\n# expand to a commented shell variable setting:\n#\n#    # Some comment about what VAR is for.\n#    visible_name=$lt_internal_name\nm4_define([_LT_LIBTOOL_DECLARE],\n[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],\n\t\t\t\t\t   [description])))[]dnl\nm4_pushdef([_libtool_name],\n    m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl\nm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),\n    [0], [_libtool_name=[$]$1],\n    [1], [_libtool_name=$lt_[]$1],\n    [2], [_libtool_name=$lt_[]$1],\n    [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl\nm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl\n])\n\n\n# _LT_LIBTOOL_CONFIG_VARS\n# -----------------------\n# Produce commented declarations of non-tagged libtool config variables\n# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'\n# script.  Tagged libtool config variables (even for the LIBTOOL CONFIG\n# section) are produced by _LT_LIBTOOL_TAG_VARS.\nm4_defun([_LT_LIBTOOL_CONFIG_VARS],\n[m4_foreach([_lt_var],\n    m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),\n    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])\n\n\n# _LT_LIBTOOL_TAG_VARS(TAG)\n# -------------------------\nm4_define([_LT_LIBTOOL_TAG_VARS],\n[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),\n    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])\n\n\n# _LT_TAGVAR(VARNAME, [TAGNAME])\n# ------------------------------\nm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])\n\n\n# _LT_CONFIG_COMMANDS\n# -------------------\n# Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of\n# variables for single and double quote escaping we saved from calls\n# to _LT_DECL, we can put quote escaped variables declarations\n# into `config.status', and then the shell code to quote escape them in\n# for loops in `config.status'.  Finally, any additional code accumulated\n# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.\nm4_defun([_LT_CONFIG_COMMANDS],\n[AC_PROVIDE_IFELSE([LT_OUTPUT],\n\tdnl If the libtool generation code has been placed in $CONFIG_LT,\n\tdnl instead of duplicating it all over again into config.status,\n\tdnl then we will have config.status run $CONFIG_LT later, so it\n\tdnl needs to know what name is stored there:\n        [AC_CONFIG_COMMANDS([libtool],\n            [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],\n    dnl If the libtool generation code is destined for config.status,\n    dnl expand the accumulated commands and init code now:\n    [AC_CONFIG_COMMANDS([libtool],\n        [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])\n])#_LT_CONFIG_COMMANDS\n\n\n# Initialize.\nm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],\n[\n\n# The HP-UX ksh and POSIX shell print the target directory to stdout\n# if CDPATH is set.\n(unset CDPATH) >/dev/null 2>&1 && unset CDPATH\n\nsed_quote_subst='$sed_quote_subst'\ndouble_quote_subst='$double_quote_subst'\ndelay_variable_subst='$delay_variable_subst'\n_LT_CONFIG_STATUS_DECLARATIONS\nLTCC='$LTCC'\nLTCFLAGS='$LTCFLAGS'\ncompiler='$compiler_DEFAULT'\n\n# A function that is used when there is no print builtin or printf.\nfunc_fallback_echo ()\n{\n  eval 'cat <<_LTECHO_EOF\n\\$[]1\n_LTECHO_EOF'\n}\n\n# Quote evaled strings.\nfor var in lt_decl_all_varnames([[ \\\n]], lt_decl_quote_varnames); do\n    case \\`eval \\\\\\\\\\$ECHO \\\\\\\\\"\"\\\\\\\\\\$\\$var\"\\\\\\\\\"\\` in\n    *[[\\\\\\\\\\\\\\`\\\\\"\\\\\\$]]*)\n      eval \"lt_\\$var=\\\\\\\\\\\\\"\\\\\\`\\\\\\$ECHO \\\\\"\\\\\\$\\$var\\\\\" | \\\\\\$SED \\\\\"\\\\\\$sed_quote_subst\\\\\"\\\\\\`\\\\\\\\\\\\\"\"\n      ;;\n    *)\n      eval \"lt_\\$var=\\\\\\\\\\\\\"\\\\\\$\\$var\\\\\\\\\\\\\"\"\n      ;;\n    esac\ndone\n\n# Double-quote double-evaled strings.\nfor var in lt_decl_all_varnames([[ \\\n]], lt_decl_dquote_varnames); do\n    case \\`eval \\\\\\\\\\$ECHO \\\\\\\\\"\"\\\\\\\\\\$\\$var\"\\\\\\\\\"\\` in\n    *[[\\\\\\\\\\\\\\`\\\\\"\\\\\\$]]*)\n      eval \"lt_\\$var=\\\\\\\\\\\\\"\\\\\\`\\\\\\$ECHO \\\\\"\\\\\\$\\$var\\\\\" | \\\\\\$SED -e \\\\\"\\\\\\$double_quote_subst\\\\\" -e \\\\\"\\\\\\$sed_quote_subst\\\\\" -e \\\\\"\\\\\\$delay_variable_subst\\\\\"\\\\\\`\\\\\\\\\\\\\"\"\n      ;;\n    *)\n      eval \"lt_\\$var=\\\\\\\\\\\\\"\\\\\\$\\$var\\\\\\\\\\\\\"\"\n      ;;\n    esac\ndone\n\n_LT_OUTPUT_LIBTOOL_INIT\n])\n\n# _LT_GENERATED_FILE_INIT(FILE, [COMMENT])\n# ------------------------------------\n# Generate a child script FILE with all initialization necessary to\n# reuse the environment learned by the parent script, and make the\n# file executable.  If COMMENT is supplied, it is inserted after the\n# `#!' sequence but before initialization text begins.  After this\n# macro, additional text can be appended to FILE to form the body of\n# the child script.  The macro ends with non-zero status if the\n# file could not be fully written (such as if the disk is full).\nm4_ifdef([AS_INIT_GENERATED],\n[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],\n[m4_defun([_LT_GENERATED_FILE_INIT],\n[m4_require([AS_PREPARE])]dnl\n[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl\n[lt_write_fail=0\ncat >$1 <<_ASEOF || lt_write_fail=1\n#! $SHELL\n# Generated by $as_me.\n$2\nSHELL=\\${CONFIG_SHELL-$SHELL}\nexport SHELL\n_ASEOF\ncat >>$1 <<\\_ASEOF || lt_write_fail=1\nAS_SHELL_SANITIZE\n_AS_PREPARE\nexec AS_MESSAGE_FD>&1\n_ASEOF\ntest $lt_write_fail = 0 && chmod +x $1[]dnl\nm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT\n\n# LT_OUTPUT\n# ---------\n# This macro allows early generation of the libtool script (before\n# AC_OUTPUT is called), incase it is used in configure for compilation\n# tests.\nAC_DEFUN([LT_OUTPUT],\n[: ${CONFIG_LT=./config.lt}\nAC_MSG_NOTICE([creating $CONFIG_LT])\n_LT_GENERATED_FILE_INIT([\"$CONFIG_LT\"],\n[# Run this file to recreate a libtool stub with the current configuration.])\n\ncat >>\"$CONFIG_LT\" <<\\_LTEOF\nlt_cl_silent=false\nexec AS_MESSAGE_LOG_FD>>config.log\n{\n  echo\n  AS_BOX([Running $as_me.])\n} >&AS_MESSAGE_LOG_FD\n\nlt_cl_help=\"\\\n\\`$as_me' creates a local libtool stub from the current configuration,\nfor use in further configure time tests before the real libtool is\ngenerated.\n\nUsage: $[0] [[OPTIONS]]\n\n  -h, --help      print this help, then exit\n  -V, --version   print version number, then exit\n  -q, --quiet     do not print progress messages\n  -d, --debug     don't remove temporary files\n\nReport bugs to <bug-libtool@gnu.org>.\"\n\nlt_cl_version=\"\\\nm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl\nm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])\nconfigured by $[0], generated by m4_PACKAGE_STRING.\n\nCopyright (C) 2011 Free Software Foundation, Inc.\nThis config.lt script is free software; the Free Software Foundation\ngives unlimited permission to copy, distribute and modify it.\"\n\nwhile test $[#] != 0\ndo\n  case $[1] in\n    --version | --v* | -V )\n      echo \"$lt_cl_version\"; exit 0 ;;\n    --help | --h* | -h )\n      echo \"$lt_cl_help\"; exit 0 ;;\n    --debug | --d* | -d )\n      debug=: ;;\n    --quiet | --q* | --silent | --s* | -q )\n      lt_cl_silent=: ;;\n\n    -*) AC_MSG_ERROR([unrecognized option: $[1]\nTry \\`$[0] --help' for more information.]) ;;\n\n    *) AC_MSG_ERROR([unrecognized argument: $[1]\nTry \\`$[0] --help' for more information.]) ;;\n  esac\n  shift\ndone\n\nif $lt_cl_silent; then\n  exec AS_MESSAGE_FD>/dev/null\nfi\n_LTEOF\n\ncat >>\"$CONFIG_LT\" <<_LTEOF\n_LT_OUTPUT_LIBTOOL_COMMANDS_INIT\n_LTEOF\n\ncat >>\"$CONFIG_LT\" <<\\_LTEOF\nAC_MSG_NOTICE([creating $ofile])\n_LT_OUTPUT_LIBTOOL_COMMANDS\nAS_EXIT(0)\n_LTEOF\nchmod +x \"$CONFIG_LT\"\n\n# configure is writing to config.log, but config.lt does its own redirection,\n# appending to config.log, which fails on DOS, as config.log is still kept\n# open by configure.  Here we exec the FD to /dev/null, effectively closing\n# config.log, so it can be properly (re)opened and appended to by config.lt.\nlt_cl_success=:\ntest \"$silent\" = yes &&\n  lt_config_lt_args=\"$lt_config_lt_args --quiet\"\nexec AS_MESSAGE_LOG_FD>/dev/null\n$SHELL \"$CONFIG_LT\" $lt_config_lt_args || lt_cl_success=false\nexec AS_MESSAGE_LOG_FD>>config.log\n$lt_cl_success || AS_EXIT(1)\n])# LT_OUTPUT\n\n\n# _LT_CONFIG(TAG)\n# ---------------\n# If TAG is the built-in tag, create an initial libtool script with a\n# default configuration from the untagged config vars.  Otherwise add code\n# to config.status for appending the configuration named by TAG from the\n# matching tagged config vars.\nm4_defun([_LT_CONFIG],\n[m4_require([_LT_FILEUTILS_DEFAULTS])dnl\n_LT_CONFIG_SAVE_COMMANDS([\n  m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl\n  m4_if(_LT_TAG, [C], [\n    # See if we are running on zsh, and set the options which allow our\n    # commands through without removal of \\ escapes.\n    if test -n \"${ZSH_VERSION+set}\" ; then\n      setopt NO_GLOB_SUBST\n    fi\n\n    cfgfile=\"${ofile}T\"\n    trap \"$RM \\\"$cfgfile\\\"; exit 1\" 1 2 15\n    $RM \"$cfgfile\"\n\n    cat <<_LT_EOF >> \"$cfgfile\"\n#! $SHELL\n\n# `$ECHO \"$ofile\" | sed 's%^.*/%%'` - Provide generalized library-building support services.\n# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION\n# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:\n# NOTE: Changes made to this file will be lost: look at ltmain.sh.\n#\n_LT_COPYING\n_LT_LIBTOOL_TAGS\n\n# ### BEGIN LIBTOOL CONFIG\n_LT_LIBTOOL_CONFIG_VARS\n_LT_LIBTOOL_TAG_VARS\n# ### END LIBTOOL CONFIG\n\n_LT_EOF\n\n  case $host_os in\n  aix3*)\n    cat <<\\_LT_EOF >> \"$cfgfile\"\n# AIX sometimes has problems with the GCC collect2 program.  For some\n# reason, if we set the COLLECT_NAMES environment variable, the problems\n# vanish in a puff of smoke.\nif test \"X${COLLECT_NAMES+set}\" != Xset; then\n  COLLECT_NAMES=\n  export COLLECT_NAMES\nfi\n_LT_EOF\n    ;;\n  esac\n\n  _LT_PROG_LTMAIN\n\n  # We use sed instead of cat because bash on DJGPP gets confused if\n  # if finds mixed CR/LF and LF-only lines.  Since sed operates in\n  # text mode, it properly converts lines to CR/LF.  This bash problem\n  # is reportedly fixed, but why not run on old versions too?\n  sed '$q' \"$ltmain\" >> \"$cfgfile\" \\\n     || (rm -f \"$cfgfile\"; exit 1)\n\n  _LT_PROG_REPLACE_SHELLFNS\n\n   mv -f \"$cfgfile\" \"$ofile\" ||\n    (rm -f \"$ofile\" && cp \"$cfgfile\" \"$ofile\" && rm -f \"$cfgfile\")\n  chmod +x \"$ofile\"\n],\n[cat <<_LT_EOF >> \"$ofile\"\n\ndnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded\ndnl in a comment (ie after a #).\n# ### BEGIN LIBTOOL TAG CONFIG: $1\n_LT_LIBTOOL_TAG_VARS(_LT_TAG)\n# ### END LIBTOOL TAG CONFIG: $1\n_LT_EOF\n])dnl /m4_if\n],\n[m4_if([$1], [], [\n    PACKAGE='$PACKAGE'\n    VERSION='$VERSION'\n    TIMESTAMP='$TIMESTAMP'\n    RM='$RM'\n    ofile='$ofile'], [])\n])dnl /_LT_CONFIG_SAVE_COMMANDS\n])# _LT_CONFIG\n\n\n# LT_SUPPORTED_TAG(TAG)\n# ---------------------\n# Trace this macro to discover what tags are supported by the libtool\n# --tag option, using:\n#    autoconf --trace 'LT_SUPPORTED_TAG:$1'\nAC_DEFUN([LT_SUPPORTED_TAG], [])\n\n\n# C support is built-in for now\nm4_define([_LT_LANG_C_enabled], [])\nm4_define([_LT_TAGS], [])\n\n\n# LT_LANG(LANG)\n# -------------\n# Enable libtool support for the given language if not already enabled.\nAC_DEFUN([LT_LANG],\n[AC_BEFORE([$0], [LT_OUTPUT])dnl\nm4_case([$1],\n  [C],\t\t\t[_LT_LANG(C)],\n  [C++],\t\t[_LT_LANG(CXX)],\n  [Go],\t\t\t[_LT_LANG(GO)],\n  [Java],\t\t[_LT_LANG(GCJ)],\n  [Fortran 77],\t\t[_LT_LANG(F77)],\n  [Fortran],\t\t[_LT_LANG(FC)],\n  [Windows Resource],\t[_LT_LANG(RC)],\n  [m4_ifdef([_LT_LANG_]$1[_CONFIG],\n    [_LT_LANG($1)],\n    [m4_fatal([$0: unsupported language: \"$1\"])])])dnl\n])# LT_LANG\n\n\n# _LT_LANG(LANGNAME)\n# ------------------\nm4_defun([_LT_LANG],\n[m4_ifdef([_LT_LANG_]$1[_enabled], [],\n  [LT_SUPPORTED_TAG([$1])dnl\n  m4_append([_LT_TAGS], [$1 ])dnl\n  m4_define([_LT_LANG_]$1[_enabled], [])dnl\n  _LT_LANG_$1_CONFIG($1)])dnl\n])# _LT_LANG\n\n\nm4_ifndef([AC_PROG_GO], [\n# NOTE: This macro has been submitted for inclusion into   #\n#  GNU Autoconf as AC_PROG_GO.  When it is available in    #\n#  a released version of Autoconf we should remove this    #\n#  macro and use it instead.                               #\nm4_defun([AC_PROG_GO],\n[AC_LANG_PUSH(Go)dnl\nAC_ARG_VAR([GOC],     [Go compiler command])dnl\nAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl\n_AC_ARG_VAR_LDFLAGS()dnl\nAC_CHECK_TOOL(GOC, gccgo)\nif test -z \"$GOC\"; then\n  if test -n \"$ac_tool_prefix\"; then\n    AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])\n  fi\nfi\nif test -z \"$GOC\"; then\n  AC_CHECK_PROG(GOC, gccgo, gccgo, false)\nfi\n])#m4_defun\n])#m4_ifndef\n\n\n# _LT_LANG_DEFAULT_CONFIG\n# -----------------------\nm4_defun([_LT_LANG_DEFAULT_CONFIG],\n[AC_PROVIDE_IFELSE([AC_PROG_CXX],\n  [LT_LANG(CXX)],\n  [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])\n\nAC_PROVIDE_IFELSE([AC_PROG_F77],\n  [LT_LANG(F77)],\n  [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])\n\nAC_PROVIDE_IFELSE([AC_PROG_FC],\n  [LT_LANG(FC)],\n  [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])\n\ndnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal\ndnl pulling things in needlessly.\nAC_PROVIDE_IFELSE([AC_PROG_GCJ],\n  [LT_LANG(GCJ)],\n  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],\n    [LT_LANG(GCJ)],\n    [AC_PROVIDE_IFELSE([LT_PROG_GCJ],\n      [LT_LANG(GCJ)],\n      [m4_ifdef([AC_PROG_GCJ],\n\t[m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])\n       m4_ifdef([A][M_PROG_GCJ],\n\t[m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])\n       m4_ifdef([LT_PROG_GCJ],\n\t[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])\n\nAC_PROVIDE_IFELSE([AC_PROG_GO],\n  [LT_LANG(GO)],\n  [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])\n\nAC_PROVIDE_IFELSE([LT_PROG_RC],\n  [LT_LANG(RC)],\n  [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])\n])# _LT_LANG_DEFAULT_CONFIG\n\n# Obsolete macros:\nAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])\nAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])\nAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])\nAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])\nAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])\ndnl aclocal-1.4 backwards compatibility:\ndnl AC_DEFUN([AC_LIBTOOL_CXX], [])\ndnl AC_DEFUN([AC_LIBTOOL_F77], [])\ndnl AC_DEFUN([AC_LIBTOOL_FC], [])\ndnl AC_DEFUN([AC_LIBTOOL_GCJ], [])\ndnl AC_DEFUN([AC_LIBTOOL_RC], [])\n\n\n# _LT_TAG_COMPILER\n# ----------------\nm4_defun([_LT_TAG_COMPILER],\n[AC_REQUIRE([AC_PROG_CC])dnl\n\n_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl\n_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl\n_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl\n_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl\n\n# If no C compiler was specified, use CC.\nLTCC=${LTCC-\"$CC\"}\n\n# If no C compiler flags were specified, use CFLAGS.\nLTCFLAGS=${LTCFLAGS-\"$CFLAGS\"}\n\n# Allow CC to be a program name with arguments.\ncompiler=$CC\n])# _LT_TAG_COMPILER\n\n\n# _LT_COMPILER_BOILERPLATE\n# ------------------------\n# Check for compiler boilerplate output or warnings with\n# the simple compiler test code.\nm4_defun([_LT_COMPILER_BOILERPLATE],\n[m4_require([_LT_DECL_SED])dnl\nac_outfile=conftest.$ac_objext\necho \"$lt_simple_compile_test_code\" >conftest.$ac_ext\neval \"$ac_compile\" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err\n_lt_compiler_boilerplate=`cat conftest.err`\n$RM conftest*\n])# _LT_COMPILER_BOILERPLATE\n\n\n# _LT_LINKER_BOILERPLATE\n# ----------------------\n# Check for linker boilerplate output or warnings with\n# the simple link test code.\nm4_defun([_LT_LINKER_BOILERPLATE],\n[m4_require([_LT_DECL_SED])dnl\nac_outfile=conftest.$ac_objext\necho \"$lt_simple_link_test_code\" >conftest.$ac_ext\neval \"$ac_link\" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err\n_lt_linker_boilerplate=`cat conftest.err`\n$RM -r conftest*\n])# _LT_LINKER_BOILERPLATE\n\n# _LT_REQUIRED_DARWIN_CHECKS\n# -------------------------\nm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[\n  case $host_os in\n    rhapsody* | darwin*)\n    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])\n    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])\n    AC_CHECK_TOOL([LIPO], [lipo], [:])\n    AC_CHECK_TOOL([OTOOL], [otool], [:])\n    AC_CHECK_TOOL([OTOOL64], [otool64], [:])\n    _LT_DECL([], [DSYMUTIL], [1],\n      [Tool to manipulate archived DWARF debug symbol files on Mac OS X])\n    _LT_DECL([], [NMEDIT], [1],\n      [Tool to change global to local symbols on Mac OS X])\n    _LT_DECL([], [LIPO], [1],\n      [Tool to manipulate fat objects and archives on Mac OS X])\n    _LT_DECL([], [OTOOL], [1],\n      [ldd/readelf like tool for Mach-O binaries on Mac OS X])\n    _LT_DECL([], [OTOOL64], [1],\n      [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])\n\n    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],\n      [lt_cv_apple_cc_single_mod=no\n      if test -z \"${LT_MULTI_MODULE}\"; then\n\t# By default we will add the -single_module flag. You can override\n\t# by either setting the environment variable LT_MULTI_MODULE\n\t# non-empty at configure time, or by adding -multi_module to the\n\t# link flags.\n\trm -rf libconftest.dylib*\n\techo \"int foo(void){return 1;}\" > conftest.c\n\techo \"$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \\\n-dynamiclib -Wl,-single_module conftest.c\" >&AS_MESSAGE_LOG_FD\n\t$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \\\n\t  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err\n        _lt_result=$?\n\t# If there is a non-empty error log, and \"single_module\"\n\t# appears in it, assume the flag caused a linker warning\n        if test -s conftest.err && $GREP single_module conftest.err; then\n\t  cat conftest.err >&AS_MESSAGE_LOG_FD\n\t# Otherwise, if the output was created with a 0 exit code from\n\t# the compiler, it worked.\n\telif test -f libconftest.dylib && test $_lt_result -eq 0; then\n\t  lt_cv_apple_cc_single_mod=yes\n\telse\n\t  cat conftest.err >&AS_MESSAGE_LOG_FD\n\tfi\n\trm -rf libconftest.dylib*\n\trm -f conftest.*\n      fi])\n\n    AC_CACHE_CHECK([for -exported_symbols_list linker flag],\n      [lt_cv_ld_exported_symbols_list],\n      [lt_cv_ld_exported_symbols_list=no\n      save_LDFLAGS=$LDFLAGS\n      echo \"_main\" > conftest.sym\n      LDFLAGS=\"$LDFLAGS -Wl,-exported_symbols_list,conftest.sym\"\n      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],\n\t[lt_cv_ld_exported_symbols_list=yes],\n\t[lt_cv_ld_exported_symbols_list=no])\n\tLDFLAGS=\"$save_LDFLAGS\"\n    ])\n\n    AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],\n      [lt_cv_ld_force_load=no\n      cat > conftest.c << _LT_EOF\nint forced_loaded() { return 2;}\n_LT_EOF\n      echo \"$LTCC $LTCFLAGS -c -o conftest.o conftest.c\" >&AS_MESSAGE_LOG_FD\n      $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD\n      echo \"$AR cru libconftest.a conftest.o\" >&AS_MESSAGE_LOG_FD\n      $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD\n      echo \"$RANLIB libconftest.a\" >&AS_MESSAGE_LOG_FD\n      $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD\n      cat > conftest.c << _LT_EOF\nint main() { return 0;}\n_LT_EOF\n      echo \"$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a\" >&AS_MESSAGE_LOG_FD\n      $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err\n      _lt_result=$?\n      if test -s conftest.err && $GREP force_load conftest.err; then\n\tcat conftest.err >&AS_MESSAGE_LOG_FD\n      elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then\n\tlt_cv_ld_force_load=yes\n      else\n\tcat conftest.err >&AS_MESSAGE_LOG_FD\n      fi\n        rm -f conftest.err libconftest.a conftest conftest.c\n        rm -rf conftest.dSYM\n    ])\n    case $host_os in\n    rhapsody* | darwin1.[[012]])\n      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;\n    darwin1.*)\n      _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;\n    darwin*) # darwin 5.x on\n      # if running on 10.5 or later, the deployment target defaults\n      # to the OS version, if on x86, and 10.4, the deployment\n      # target defaults to 10.4. Don't you love it?\n      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in\n\t10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)\n\t  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;\n\t10.[[012]]*)\n\t  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;\n\t10.*)\n\t  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;\n      esac\n    ;;\n  esac\n    if test \"$lt_cv_apple_cc_single_mod\" = \"yes\"; then\n      _lt_dar_single_mod='$single_module'\n    fi\n    if test \"$lt_cv_ld_exported_symbols_list\" = \"yes\"; then\n      _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'\n    else\n      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'\n    fi\n    if test \"$DSYMUTIL\" != \":\" && test \"$lt_cv_ld_force_load\" = \"no\"; then\n      _lt_dsymutil='~$DSYMUTIL $lib || :'\n    else\n      _lt_dsymutil=\n    fi\n    ;;\n  esac\n])\n\n\n# _LT_DARWIN_LINKER_FEATURES([TAG])\n# ---------------------------------\n# Checks for linker and compiler features on darwin\nm4_defun([_LT_DARWIN_LINKER_FEATURES],\n[\n  m4_require([_LT_REQUIRED_DARWIN_CHECKS])\n  _LT_TAGVAR(archive_cmds_need_lc, $1)=no\n  _LT_TAGVAR(hardcode_direct, $1)=no\n  _LT_TAGVAR(hardcode_automatic, $1)=yes\n  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported\n  if test \"$lt_cv_ld_force_load\" = \"yes\"; then\n    _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\\\"\\\"; do test  -n \\\"$conv\\\" && new_convenience=\\\"$new_convenience ${wl}-force_load,$conv\\\"; done; func_echo_all \\\"$new_convenience\\\"`'\n    m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],\n                  [FC],  [_LT_TAGVAR(compiler_needs_object, $1)=yes])\n  else\n    _LT_TAGVAR(whole_archive_flag_spec, $1)=''\n  fi\n  _LT_TAGVAR(link_all_deplibs, $1)=yes\n  _LT_TAGVAR(allow_undefined_flag, $1)=\"$_lt_dar_allow_undefined\"\n  case $cc_basename in\n     ifort*) _lt_dar_can_shared=yes ;;\n     *) _lt_dar_can_shared=$GCC ;;\n  esac\n  if test \"$_lt_dar_can_shared\" = \"yes\"; then\n    output_verbose_link_cmd=func_echo_all\n    _LT_TAGVAR(archive_cmds, $1)=\"\\$CC -dynamiclib \\$allow_undefined_flag -o \\$lib \\$libobjs \\$deplibs \\$compiler_flags -install_name \\$rpath/\\$soname \\$verstring $_lt_dar_single_mod${_lt_dsymutil}\"\n    _LT_TAGVAR(module_cmds, $1)=\"\\$CC \\$allow_undefined_flag -o \\$lib -bundle \\$libobjs \\$deplibs \\$compiler_flags${_lt_dsymutil}\"\n    _LT_TAGVAR(archive_expsym_cmds, $1)=\"sed 's,^,_,' < \\$export_symbols > \\$output_objdir/\\${libname}-symbols.expsym~\\$CC -dynamiclib \\$allow_undefined_flag -o \\$lib \\$libobjs \\$deplibs \\$compiler_flags -install_name \\$rpath/\\$soname \\$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}\"\n    _LT_TAGVAR(module_expsym_cmds, $1)=\"sed -e 's,^,_,' < \\$export_symbols > \\$output_objdir/\\${libname}-symbols.expsym~\\$CC \\$allow_undefined_flag -o \\$lib -bundle \\$libobjs \\$deplibs \\$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}\"\n    m4_if([$1], [CXX],\n[   if test \"$lt_cv_apple_cc_single_mod\" != \"yes\"; then\n      _LT_TAGVAR(archive_cmds, $1)=\"\\$CC -r -keep_private_externs -nostdlib -o \\${lib}-master.o \\$libobjs~\\$CC -dynamiclib \\$allow_undefined_flag -o \\$lib \\${lib}-master.o \\$deplibs \\$compiler_flags -install_name \\$rpath/\\$soname \\$verstring${_lt_dsymutil}\"\n      _LT_TAGVAR(archive_expsym_cmds, $1)=\"sed 's,^,_,' < \\$export_symbols > \\$output_objdir/\\${libname}-symbols.expsym~\\$CC -r -keep_private_externs -nostdlib -o \\${lib}-master.o \\$libobjs~\\$CC -dynamiclib \\$allow_undefined_flag -o \\$lib \\${lib}-master.o \\$deplibs \\$compiler_flags -install_name \\$rpath/\\$soname \\$verstring${_lt_dar_export_syms}${_lt_dsymutil}\"\n    fi\n],[])\n  else\n  _LT_TAGVAR(ld_shlibs, $1)=no\n  fi\n])\n\n# _LT_SYS_MODULE_PATH_AIX([TAGNAME])\n# ----------------------------------\n# Links a minimal program and checks the executable\n# for the system default hardcoded library path. In most cases,\n# this is /usr/lib:/lib, but when the MPI compilers are used\n# the location of the communication and MPI libs are included too.\n# If we don't find anything, use the default library path according\n# to the aix ld manual.\n# Store the results from the different compilers for each TAGNAME.\n# Allow to override them for all tags through lt_cv_aix_libpath.\nm4_defun([_LT_SYS_MODULE_PATH_AIX],\n[m4_require([_LT_DECL_SED])dnl\nif test \"${lt_cv_aix_libpath+set}\" = set; then\n  aix_libpath=$lt_cv_aix_libpath\nelse\n  AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],\n  [AC_LINK_IFELSE([AC_LANG_PROGRAM],[\n  lt_aix_libpath_sed='[\n      /Import File Strings/,/^$/ {\n\t  /^0/ {\n\t      s/^0  *\\([^ ]*\\) *$/\\1/\n\t      p\n\t  }\n      }]'\n  _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e \"$lt_aix_libpath_sed\"`\n  # Check for a 64-bit object if we didn't find anything.\n  if test -z \"$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])\"; then\n    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e \"$lt_aix_libpath_sed\"`\n  fi],[])\n  if test -z \"$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])\"; then\n    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=\"/usr/lib:/lib\"\n  fi\n  ])\n  aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])\nfi\n])# _LT_SYS_MODULE_PATH_AIX\n\n\n# _LT_SHELL_INIT(ARG)\n# -------------------\nm4_define([_LT_SHELL_INIT],\n[m4_divert_text([M4SH-INIT], [$1\n])])# _LT_SHELL_INIT\n\n\n\n# _LT_PROG_ECHO_BACKSLASH\n# -----------------------\n# Find how we can fake an echo command that does not interpret backslash.\n# In particular, with Autoconf 2.60 or later we add some code to the start\n# of the generated configure script which will find a shell with a builtin\n# printf (which we can use as an echo command).\nm4_defun([_LT_PROG_ECHO_BACKSLASH],\n[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'\nECHO=$ECHO$ECHO$ECHO$ECHO$ECHO\nECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO\n\nAC_MSG_CHECKING([how to print strings])\n# Test print first, because it will be a builtin if present.\nif test \"X`( print -r -- -n ) 2>/dev/null`\" = X-n && \\\n   test \"X`print -r -- $ECHO 2>/dev/null`\" = \"X$ECHO\"; then\n  ECHO='print -r --'\nelif test \"X`printf %s $ECHO 2>/dev/null`\" = \"X$ECHO\"; then\n  ECHO='printf %s\\n'\nelse\n  # Use this function as a fallback that always works.\n  func_fallback_echo ()\n  {\n    eval 'cat <<_LTECHO_EOF\n$[]1\n_LTECHO_EOF'\n  }\n  ECHO='func_fallback_echo'\nfi\n\n# func_echo_all arg...\n# Invoke $ECHO with all args, space-separated.\nfunc_echo_all ()\n{\n    $ECHO \"$*\" \n}\n\ncase \"$ECHO\" in\n  printf*) AC_MSG_RESULT([printf]) ;;\n  print*) AC_MSG_RESULT([print -r]) ;;\n  *) AC_MSG_RESULT([cat]) ;;\nesac\n\nm4_ifdef([_AS_DETECT_SUGGESTED],\n[_AS_DETECT_SUGGESTED([\n  test -n \"${ZSH_VERSION+set}${BASH_VERSION+set}\" || (\n    ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'\n    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO\n    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO\n    PATH=/empty FPATH=/empty; export PATH FPATH\n    test \"X`printf %s $ECHO`\" = \"X$ECHO\" \\\n      || test \"X`print -r -- $ECHO`\" = \"X$ECHO\" )])])\n\n_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])\n_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])\n])# _LT_PROG_ECHO_BACKSLASH\n\n\n# _LT_WITH_SYSROOT\n# ----------------\nAC_DEFUN([_LT_WITH_SYSROOT],\n[AC_MSG_CHECKING([for sysroot])\nAC_ARG_WITH([sysroot],\n[  --with-sysroot[=DIR] Search for dependent libraries within DIR\n                        (or the compiler's sysroot if not specified).],\n[], [with_sysroot=no])\n\ndnl lt_sysroot will always be passed unquoted.  We quote it here\ndnl in case the user passed a directory name.\nlt_sysroot=\ncase ${with_sysroot} in #(\n yes)\n   if test \"$GCC\" = yes; then\n     lt_sysroot=`$CC --print-sysroot 2>/dev/null`\n   fi\n   ;; #(\n /*)\n   lt_sysroot=`echo \"$with_sysroot\" | sed -e \"$sed_quote_subst\"`\n   ;; #(\n no|'')\n   ;; #(\n *)\n   AC_MSG_RESULT([${with_sysroot}])\n   AC_MSG_ERROR([The sysroot must be an absolute path.])\n   ;;\nesac\n\n AC_MSG_RESULT([${lt_sysroot:-no}])\n_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl\n[dependent libraries, and in which our libraries should be installed.])])\n\n# _LT_ENABLE_LOCK\n# ---------------\nm4_defun([_LT_ENABLE_LOCK],\n[AC_ARG_ENABLE([libtool-lock],\n  [AS_HELP_STRING([--disable-libtool-lock],\n    [avoid locking (might break parallel builds)])])\ntest \"x$enable_libtool_lock\" != xno && enable_libtool_lock=yes\n\n# Some flags need to be propagated to the compiler or linker for good\n# libtool support.\ncase $host in\nia64-*-hpux*)\n  # Find out which ABI we are using.\n  echo 'int i;' > conftest.$ac_ext\n  if AC_TRY_EVAL(ac_compile); then\n    case `/usr/bin/file conftest.$ac_objext` in\n      *ELF-32*)\n\tHPUX_IA64_MODE=\"32\"\n\t;;\n      *ELF-64*)\n\tHPUX_IA64_MODE=\"64\"\n\t;;\n    esac\n  fi\n  rm -rf conftest*\n  ;;\n*-*-irix6*)\n  # Find out which ABI we are using.\n  echo '[#]line '$LINENO' \"configure\"' > conftest.$ac_ext\n  if AC_TRY_EVAL(ac_compile); then\n    if test \"$lt_cv_prog_gnu_ld\" = yes; then\n      case `/usr/bin/file conftest.$ac_objext` in\n\t*32-bit*)\n\t  LD=\"${LD-ld} -melf32bsmip\"\n\t  ;;\n\t*N32*)\n\t  LD=\"${LD-ld} -melf32bmipn32\"\n\t  ;;\n\t*64-bit*)\n\t  LD=\"${LD-ld} -melf64bmip\"\n\t;;\n      esac\n    else\n      case `/usr/bin/file conftest.$ac_objext` in\n\t*32-bit*)\n\t  LD=\"${LD-ld} -32\"\n\t  ;;\n\t*N32*)\n\t  LD=\"${LD-ld} -n32\"\n\t  ;;\n\t*64-bit*)\n\t  LD=\"${LD-ld} -64\"\n\t  ;;\n      esac\n    fi\n  fi\n  rm -rf conftest*\n  ;;\n\nx86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \\\ns390*-*linux*|s390*-*tpf*|sparc*-*linux*)\n  # Find out which ABI we are using.\n  echo 'int i;' > conftest.$ac_ext\n  if AC_TRY_EVAL(ac_compile); then\n    case `/usr/bin/file conftest.o` in\n      *32-bit*)\n\tcase $host in\n\t  x86_64-*kfreebsd*-gnu)\n\t    LD=\"${LD-ld} -m elf_i386_fbsd\"\n\t    ;;\n\t  x86_64-*linux*)\n\t    case `/usr/bin/file conftest.o` in\n\t      *x86-64*)\n\t\tLD=\"${LD-ld} -m elf32_x86_64\"\n\t\t;;\n\t      *)\n\t\tLD=\"${LD-ld} -m elf_i386\"\n\t\t;;\n\t    esac\n\t    ;;\n\t  powerpc64le-*)\n\t    LD=\"${LD-ld} -m elf32lppclinux\"\n\t    ;;\n\t  powerpc64-*)\n\t    LD=\"${LD-ld} -m elf32ppclinux\"\n\t    ;;\n\t  s390x-*linux*)\n\t    LD=\"${LD-ld} -m elf_s390\"\n\t    ;;\n\t  sparc64-*linux*)\n\t    LD=\"${LD-ld} -m elf32_sparc\"\n\t    ;;\n\tesac\n\t;;\n      *64-bit*)\n\tcase $host in\n\t  x86_64-*kfreebsd*-gnu)\n\t    LD=\"${LD-ld} -m elf_x86_64_fbsd\"\n\t    ;;\n\t  x86_64-*linux*)\n\t    LD=\"${LD-ld} -m elf_x86_64\"\n\t    ;;\n\t  powerpcle-*)\n\t    LD=\"${LD-ld} -m elf64lppc\"\n\t    ;;\n\t  powerpc-*)\n\t    LD=\"${LD-ld} -m elf64ppc\"\n\t    ;;\n\t  s390*-*linux*|s390*-*tpf*)\n\t    LD=\"${LD-ld} -m elf64_s390\"\n\t    ;;\n\t  sparc*-*linux*)\n\t    LD=\"${LD-ld} -m elf64_sparc\"\n\t    ;;\n\tesac\n\t;;\n    esac\n  fi\n  rm -rf conftest*\n  ;;\n\n*-*-sco3.2v5*)\n  # On SCO OpenServer 5, we need -belf to get full-featured binaries.\n  SAVE_CFLAGS=\"$CFLAGS\"\n  CFLAGS=\"$CFLAGS -belf\"\n  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,\n    [AC_LANG_PUSH(C)\n     AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])\n     AC_LANG_POP])\n  if test x\"$lt_cv_cc_needs_belf\" != x\"yes\"; then\n    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf\n    CFLAGS=\"$SAVE_CFLAGS\"\n  fi\n  ;;\n*-*solaris*)\n  # Find out which ABI we are using.\n  echo 'int i;' > conftest.$ac_ext\n  if AC_TRY_EVAL(ac_compile); then\n    case `/usr/bin/file conftest.o` in\n    *64-bit*)\n      case $lt_cv_prog_gnu_ld in\n      yes*)\n        case $host in\n        i?86-*-solaris*)\n          LD=\"${LD-ld} -m elf_x86_64\"\n          ;;\n        sparc*-*-solaris*)\n          LD=\"${LD-ld} -m elf64_sparc\"\n          ;;\n        esac\n        # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.\n        if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then\n          LD=\"${LD-ld}_sol2\"\n        fi\n        ;;\n      *)\n\tif ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then\n\t  LD=\"${LD-ld} -64\"\n\tfi\n\t;;\n      esac\n      ;;\n    esac\n  fi\n  rm -rf conftest*\n  ;;\nesac\n\nneed_locks=\"$enable_libtool_lock\"\n])# _LT_ENABLE_LOCK\n\n\n# _LT_PROG_AR\n# -----------\nm4_defun([_LT_PROG_AR],\n[AC_CHECK_TOOLS(AR, [ar], false)\n: ${AR=ar}\n: ${AR_FLAGS=cru}\n_LT_DECL([], [AR], [1], [The archiver])\n_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])\n\nAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],\n  [lt_cv_ar_at_file=no\n   AC_COMPILE_IFELSE([AC_LANG_PROGRAM],\n     [echo conftest.$ac_objext > conftest.lst\n      lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'\n      AC_TRY_EVAL([lt_ar_try])\n      if test \"$ac_status\" -eq 0; then\n\t# Ensure the archiver fails upon bogus file names.\n\trm -f conftest.$ac_objext libconftest.a\n\tAC_TRY_EVAL([lt_ar_try])\n\tif test \"$ac_status\" -ne 0; then\n          lt_cv_ar_at_file=@\n        fi\n      fi\n      rm -f conftest.* libconftest.a\n     ])\n  ])\n\nif test \"x$lt_cv_ar_at_file\" = xno; then\n  archiver_list_spec=\nelse\n  archiver_list_spec=$lt_cv_ar_at_file\nfi\n_LT_DECL([], [archiver_list_spec], [1],\n  [How to feed a file listing to the archiver])\n])# _LT_PROG_AR\n\n\n# _LT_CMD_OLD_ARCHIVE\n# -------------------\nm4_defun([_LT_CMD_OLD_ARCHIVE],\n[_LT_PROG_AR\n\nAC_CHECK_TOOL(STRIP, strip, :)\ntest -z \"$STRIP\" && STRIP=:\n_LT_DECL([], [STRIP], [1], [A symbol stripping program])\n\nAC_CHECK_TOOL(RANLIB, ranlib, :)\ntest -z \"$RANLIB\" && RANLIB=:\n_LT_DECL([], [RANLIB], [1],\n    [Commands used to install an old-style archive])\n\n# Determine commands to create old-style static archives.\nold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'\nold_postinstall_cmds='chmod 644 $oldlib'\nold_postuninstall_cmds=\n\nif test -n \"$RANLIB\"; then\n  case $host_os in\n  openbsd*)\n    old_postinstall_cmds=\"$old_postinstall_cmds~\\$RANLIB -t \\$tool_oldlib\"\n    ;;\n  *)\n    old_postinstall_cmds=\"$old_postinstall_cmds~\\$RANLIB \\$tool_oldlib\"\n    ;;\n  esac\n  old_archive_cmds=\"$old_archive_cmds~\\$RANLIB \\$tool_oldlib\"\nfi\n\ncase $host_os in\n  darwin*)\n    lock_old_archive_extraction=yes ;;\n  *)\n    lock_old_archive_extraction=no ;;\nesac\n_LT_DECL([], [old_postinstall_cmds], [2])\n_LT_DECL([], [old_postuninstall_cmds], [2])\n_LT_TAGDECL([], [old_archive_cmds], [2],\n    [Commands used to build an old-style archive])\n_LT_DECL([], [lock_old_archive_extraction], [0],\n    [Whether to use a lock for old archive extraction])\n])# _LT_CMD_OLD_ARCHIVE\n\n\n# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,\n#\t\t[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])\n# ----------------------------------------------------------------\n# Check whether the given compiler option works\nAC_DEFUN([_LT_COMPILER_OPTION],\n[m4_require([_LT_FILEUTILS_DEFAULTS])dnl\nm4_require([_LT_DECL_SED])dnl\nAC_CACHE_CHECK([$1], [$2],\n  [$2=no\n   m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])\n   echo \"$lt_simple_compile_test_code\" > conftest.$ac_ext\n   lt_compiler_flag=\"$3\"\n   # Insert the option either (1) after the last *FLAGS variable, or\n   # (2) before a word containing \"conftest.\", or (3) at the end.\n   # Note that $ac_compile itself does not contain backslashes and begins\n   # with a dollar sign (not a hyphen), so the echo should work correctly.\n   # The option is referenced via a variable to avoid confusing sed.\n   lt_compile=`echo \"$ac_compile\" | $SED \\\n   -e 's:.*FLAGS}\\{0,1\\} :&$lt_compiler_flag :; t' \\\n   -e 's: [[^ ]]*conftest\\.: $lt_compiler_flag&:; t' \\\n   -e 's:$: $lt_compiler_flag:'`\n   (eval echo \"\\\"\\$as_me:$LINENO: $lt_compile\\\"\" >&AS_MESSAGE_LOG_FD)\n   (eval \"$lt_compile\" 2>conftest.err)\n   ac_status=$?\n   cat conftest.err >&AS_MESSAGE_LOG_FD\n   echo \"$as_me:$LINENO: \\$? = $ac_status\" >&AS_MESSAGE_LOG_FD\n   if (exit $ac_status) && test -s \"$ac_outfile\"; then\n     # The compiler can only warn and ignore the option if not recognized\n     # So say no if there are warnings other than the usual output.\n     $ECHO \"$_lt_compiler_boilerplate\" | $SED '/^$/d' >conftest.exp\n     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2\n     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then\n       $2=yes\n     fi\n   fi\n   $RM conftest*\n])\n\nif test x\"[$]$2\" = xyes; then\n    m4_if([$5], , :, [$5])\nelse\n    m4_if([$6], , :, [$6])\nfi\n])# _LT_COMPILER_OPTION\n\n# Old name:\nAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])\ndnl aclocal-1.4 backwards compatibility:\ndnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])\n\n\n# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,\n#                  [ACTION-SUCCESS], [ACTION-FAILURE])\n# ----------------------------------------------------\n# Check whether the given linker option works\nAC_DEFUN([_LT_LINKER_OPTION],\n[m4_require([_LT_FILEUTILS_DEFAULTS])dnl\nm4_require([_LT_DECL_SED])dnl\nAC_CACHE_CHECK([$1], [$2],\n  [$2=no\n   save_LDFLAGS=\"$LDFLAGS\"\n   LDFLAGS=\"$LDFLAGS $3\"\n   echo \"$lt_simple_link_test_code\" > conftest.$ac_ext\n   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then\n     # The linker can only warn and ignore the option if not recognized\n     # So say no if there are warnings\n     if test -s conftest.err; then\n       # Append any errors to the config.log.\n       cat conftest.err 1>&AS_MESSAGE_LOG_FD\n       $ECHO \"$_lt_linker_boilerplate\" | $SED '/^$/d' > conftest.exp\n       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2\n       if diff conftest.exp conftest.er2 >/dev/null; then\n         $2=yes\n       fi\n     else\n       $2=yes\n     fi\n   fi\n   $RM -r conftest*\n   LDFLAGS=\"$save_LDFLAGS\"\n])\n\nif test x\"[$]$2\" = xyes; then\n    m4_if([$4], , :, [$4])\nelse\n    m4_if([$5], , :, [$5])\nfi\n])# _LT_LINKER_OPTION\n\n# Old name:\nAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])\ndnl aclocal-1.4 backwards compatibility:\ndnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])\n\n\n# LT_CMD_MAX_LEN\n#---------------\nAC_DEFUN([LT_CMD_MAX_LEN],\n[AC_REQUIRE([AC_CANONICAL_HOST])dnl\n# find the maximum length of command line arguments\nAC_MSG_CHECKING([the maximum length of command line arguments])\nAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl\n  i=0\n  teststring=\"ABCD\"\n\n  case $build_os in\n  msdosdjgpp*)\n    # On DJGPP, this test can blow up pretty badly due to problems in libc\n    # (any single argument exceeding 2000 bytes causes a buffer overrun\n    # during glob expansion).  Even if it were fixed, the result of this\n    # check would be larger than it should be.\n    lt_cv_sys_max_cmd_len=12288;    # 12K is about right\n    ;;\n\n  gnu*)\n    # Under GNU Hurd, this test is not required because there is\n    # no limit to the length of command line arguments.\n    # Libtool will interpret -1 as no limit whatsoever\n    lt_cv_sys_max_cmd_len=-1;\n    ;;\n\n  cygwin* | mingw* | cegcc*)\n    # On Win9x/ME, this test blows up -- it succeeds, but takes\n    # about 5 minutes as the teststring grows exponentially.\n    # Worse, since 9x/ME are not pre-emptively multitasking,\n    # you end up with a \"frozen\" computer, even though with patience\n    # the test eventually succeeds (with a max line length of 256k).\n    # Instead, let's just punt: use the minimum linelength reported by\n    # all of the supported platforms: 8192 (on NT/2K/XP).\n    lt_cv_sys_max_cmd_len=8192;\n    ;;\n\n  mint*)\n    # On MiNT this can take a long time and run out of memory.\n    lt_cv_sys_max_cmd_len=8192;\n    ;;\n\n  amigaos*)\n    # On AmigaOS with pdksh, this test takes hours, literally.\n    # So we just punt and use a minimum line length of 8192.\n    lt_cv_sys_max_cmd_len=8192;\n    ;;\n\n  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)\n    # This has been around since 386BSD, at least.  Likely further.\n    if test -x /sbin/sysctl; then\n      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`\n    elif test -x /usr/sbin/sysctl; then\n      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`\n    else\n      lt_cv_sys_max_cmd_len=65536\t# usable default for all BSDs\n    fi\n    # And add a safety zone\n    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \\/ 4`\n    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \\* 3`\n    ;;\n\n  interix*)\n    # We know the value 262144 and hardcode it with a safety zone (like BSD)\n    lt_cv_sys_max_cmd_len=196608\n    ;;\n\n  os2*)\n    # The test takes a long time on OS/2.\n    lt_cv_sys_max_cmd_len=8192\n    ;;\n\n  osf*)\n    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure\n    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not\n    # nice to cause kernel panics so lets avoid the loop below.\n    # First set a reasonable default.\n    lt_cv_sys_max_cmd_len=16384\n    #\n    if test -x /sbin/sysconfig; then\n      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in\n        *1*) lt_cv_sys_max_cmd_len=-1 ;;\n      esac\n    fi\n    ;;\n  sco3.2v5*)\n    lt_cv_sys_max_cmd_len=102400\n    ;;\n  sysv5* | sco5v6* | sysv4.2uw2*)\n    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`\n    if test -n \"$kargmax\"; then\n      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[\t ]]//'`\n    else\n      lt_cv_sys_max_cmd_len=32768\n    fi\n    ;;\n  *)\n    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`\n    if test -n \"$lt_cv_sys_max_cmd_len\" && \\\n\ttest undefined != \"$lt_cv_sys_max_cmd_len\"; then\n      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \\/ 4`\n      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \\* 3`\n    else\n      # Make teststring a little bigger before we do anything with it.\n      # a 1K string should be a reasonable start.\n      for i in 1 2 3 4 5 6 7 8 ; do\n        teststring=$teststring$teststring\n      done\n      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}\n      # If test is not a shell built-in, we'll probably end up computing a\n      # maximum length that is only half of the actual maximum length, but\n      # we can't tell.\n      while { test \"X\"`env echo \"$teststring$teststring\" 2>/dev/null` \\\n\t         = \"X$teststring$teststring\"; } >/dev/null 2>&1 &&\n\t      test $i != 17 # 1/2 MB should be enough\n      do\n        i=`expr $i + 1`\n        teststring=$teststring$teststring\n      done\n      # Only check the string length outside the loop.\n      lt_cv_sys_max_cmd_len=`expr \"X$teststring\" : \".*\" 2>&1`\n      teststring=\n      # Add a significant safety factor because C++ compilers can tack on\n      # massive amounts of additional arguments before passing them to the\n      # linker.  It appears as though 1/2 is a usable value.\n      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \\/ 2`\n    fi\n    ;;\n  esac\n])\nif test -n $lt_cv_sys_max_cmd_len ; then\n  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)\nelse\n  AC_MSG_RESULT(none)\nfi\nmax_cmd_len=$lt_cv_sys_max_cmd_len\n_LT_DECL([], [max_cmd_len], [0],\n    [What is the maximum length of a command?])\n])# LT_CMD_MAX_LEN\n\n# Old name:\nAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])\ndnl aclocal-1.4 backwards compatibility:\ndnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])\n\n\n# _LT_HEADER_DLFCN\n# ----------------\nm4_defun([_LT_HEADER_DLFCN],\n[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl\n])# _LT_HEADER_DLFCN\n\n\n# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,\n#                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)\n# ----------------------------------------------------------------\nm4_defun([_LT_TRY_DLOPEN_SELF],\n[m4_require([_LT_HEADER_DLFCN])dnl\nif test \"$cross_compiling\" = yes; then :\n  [$4]\nelse\n  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2\n  lt_status=$lt_dlunknown\n  cat > conftest.$ac_ext <<_LT_EOF\n[#line $LINENO \"configure\"\n#include \"confdefs.h\"\n\n#if HAVE_DLFCN_H\n#include <dlfcn.h>\n#endif\n\n#include <stdio.h>\n\n#ifdef RTLD_GLOBAL\n#  define LT_DLGLOBAL\t\tRTLD_GLOBAL\n#else\n#  ifdef DL_GLOBAL\n#    define LT_DLGLOBAL\t\tDL_GLOBAL\n#  else\n#    define LT_DLGLOBAL\t\t0\n#  endif\n#endif\n\n/* We may have to define LT_DLLAZY_OR_NOW in the command line if we\n   find out it does not work in some platform. */\n#ifndef LT_DLLAZY_OR_NOW\n#  ifdef RTLD_LAZY\n#    define LT_DLLAZY_OR_NOW\t\tRTLD_LAZY\n#  else\n#    ifdef DL_LAZY\n#      define LT_DLLAZY_OR_NOW\t\tDL_LAZY\n#    else\n#      ifdef RTLD_NOW\n#        define LT_DLLAZY_OR_NOW\tRTLD_NOW\n#      else\n#        ifdef DL_NOW\n#          define LT_DLLAZY_OR_NOW\tDL_NOW\n#        else\n#          define LT_DLLAZY_OR_NOW\t0\n#        endif\n#      endif\n#    endif\n#  endif\n#endif\n\n/* When -fvisbility=hidden is used, assume the code has been annotated\n   correspondingly for the symbols needed.  */\n#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))\nint fnord () __attribute__((visibility(\"default\")));\n#endif\n\nint fnord () { return 42; }\nint main ()\n{\n  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);\n  int status = $lt_dlunknown;\n\n  if (self)\n    {\n      if (dlsym (self,\"fnord\"))       status = $lt_dlno_uscore;\n      else\n        {\n\t  if (dlsym( self,\"_fnord\"))  status = $lt_dlneed_uscore;\n          else puts (dlerror ());\n\t}\n      /* dlclose (self); */\n    }\n  else\n    puts (dlerror ());\n\n  return status;\n}]\n_LT_EOF\n  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then\n    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null\n    lt_status=$?\n    case x$lt_status in\n      x$lt_dlno_uscore) $1 ;;\n      x$lt_dlneed_uscore) $2 ;;\n      x$lt_dlunknown|x*) $3 ;;\n    esac\n  else :\n    # compilation failed\n    $3\n  fi\nfi\nrm -fr conftest*\n])# _LT_TRY_DLOPEN_SELF\n\n\n# LT_SYS_DLOPEN_SELF\n# ------------------\nAC_DEFUN([LT_SYS_DLOPEN_SELF],\n[m4_require([_LT_HEADER_DLFCN])dnl\nif test \"x$enable_dlopen\" != xyes; then\n  enable_dlopen=unknown\n  enable_dlopen_self=unknown\n  enable_dlopen_self_static=unknown\nelse\n  lt_cv_dlopen=no\n  lt_cv_dlopen_libs=\n\n  case $host_os in\n  beos*)\n    lt_cv_dlopen=\"load_add_on\"\n    lt_cv_dlopen_libs=\n    lt_cv_dlopen_self=yes\n    ;;\n\n  mingw* | pw32* | cegcc*)\n    lt_cv_dlopen=\"LoadLibrary\"\n    lt_cv_dlopen_libs=\n    ;;\n\n  cygwin*)\n    lt_cv_dlopen=\"dlopen\"\n    lt_cv_dlopen_libs=\n    ;;\n\n  darwin*)\n  # if libdl is installed we need to link against it\n    AC_CHECK_LIB([dl], [dlopen],\n\t\t[lt_cv_dlopen=\"dlopen\" lt_cv_dlopen_libs=\"-ldl\"],[\n    lt_cv_dlopen=\"dyld\"\n    lt_cv_dlopen_libs=\n    lt_cv_dlopen_self=yes\n    ])\n    ;;\n\n  *)\n    AC_CHECK_FUNC([shl_load],\n\t  [lt_cv_dlopen=\"shl_load\"],\n      [AC_CHECK_LIB([dld], [shl_load],\n\t    [lt_cv_dlopen=\"shl_load\" lt_cv_dlopen_libs=\"-ldld\"],\n\t[AC_CHECK_FUNC([dlopen],\n\t      [lt_cv_dlopen=\"dlopen\"],\n\t  [AC_CHECK_LIB([dl], [dlopen],\n\t\t[lt_cv_dlopen=\"dlopen\" lt_cv_dlopen_libs=\"-ldl\"],\n\t    [AC_CHECK_LIB([svld], [dlopen],\n\t\t  [lt_cv_dlopen=\"dlopen\" lt_cv_dlopen_libs=\"-lsvld\"],\n\t      [AC_CHECK_LIB([dld], [dld_link],\n\t\t    [lt_cv_dlopen=\"dld_link\" lt_cv_dlopen_libs=\"-ldld\"])\n\t      ])\n\t    ])\n\t  ])\n\t])\n      ])\n    ;;\n  esac\n\n  if test \"x$lt_cv_dlopen\" != xno; then\n    enable_dlopen=yes\n  else\n    enable_dlopen=no\n  fi\n\n  case $lt_cv_dlopen in\n  dlopen)\n    save_CPPFLAGS=\"$CPPFLAGS\"\n    test \"x$ac_cv_header_dlfcn_h\" = xyes && CPPFLAGS=\"$CPPFLAGS -DHAVE_DLFCN_H\"\n\n    save_LDFLAGS=\"$LDFLAGS\"\n    wl=$lt_prog_compiler_wl eval LDFLAGS=\\\"\\$LDFLAGS $export_dynamic_flag_spec\\\"\n\n    save_LIBS=\"$LIBS\"\n    LIBS=\"$lt_cv_dlopen_libs $LIBS\"\n\n    AC_CACHE_CHECK([whether a program can dlopen itself],\n\t  lt_cv_dlopen_self, [dnl\n\t  _LT_TRY_DLOPEN_SELF(\n\t    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,\n\t    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)\n    ])\n\n    if test \"x$lt_cv_dlopen_self\" = xyes; then\n      wl=$lt_prog_compiler_wl eval LDFLAGS=\\\"\\$LDFLAGS $lt_prog_compiler_static\\\"\n      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],\n\t  lt_cv_dlopen_self_static, [dnl\n\t  _LT_TRY_DLOPEN_SELF(\n\t    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,\n\t    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)\n      ])\n    fi\n\n    CPPFLAGS=\"$save_CPPFLAGS\"\n    LDFLAGS=\"$save_LDFLAGS\"\n    LIBS=\"$save_LIBS\"\n    ;;\n  esac\n\n  case $lt_cv_dlopen_self in\n  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;\n  *) enable_dlopen_self=unknown ;;\n  esac\n\n  case $lt_cv_dlopen_self_static in\n  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;\n  *) enable_dlopen_self_static=unknown ;;\n  esac\nfi\n_LT_DECL([dlopen_support], [enable_dlopen], [0],\n\t [Whether dlopen is supported])\n_LT_DECL([dlopen_self], [enable_dlopen_self], [0],\n\t [Whether dlopen of programs is supported])\n_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],\n\t [Whether dlopen of statically linked programs is supported])\n])# LT_SYS_DLOPEN_SELF\n\n# Old name:\nAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])\ndnl aclocal-1.4 backwards compatibility:\ndnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])\n\n\n# _LT_COMPILER_C_O([TAGNAME])\n# ---------------------------\n# Check to see if options -c and -o are simultaneously supported by compiler.\n# This macro does not hard code the compiler like AC_PROG_CC_C_O.\nm4_defun([_LT_COMPILER_C_O],\n[m4_require([_LT_DECL_SED])dnl\nm4_require([_LT_FILEUTILS_DEFAULTS])dnl\nm4_require([_LT_TAG_COMPILER])dnl\nAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],\n  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],\n  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no\n   $RM -r conftest 2>/dev/null\n   mkdir conftest\n   cd conftest\n   mkdir out\n   echo \"$lt_simple_compile_test_code\" > conftest.$ac_ext\n\n   lt_compiler_flag=\"-o out/conftest2.$ac_objext\"\n   # Insert the option either (1) after the last *FLAGS variable, or\n   # (2) before a word containing \"conftest.\", or (3) at the end.\n   # Note that $ac_compile itself does not contain backslashes and begins\n   # with a dollar sign (not a hyphen), so the echo should work correctly.\n   lt_compile=`echo \"$ac_compile\" | $SED \\\n   -e 's:.*FLAGS}\\{0,1\\} :&$lt_compiler_flag :; t' \\\n   -e 's: [[^ ]]*conftest\\.: $lt_compiler_flag&:; t' \\\n   -e 's:$: $lt_compiler_flag:'`\n   (eval echo \"\\\"\\$as_me:$LINENO: $lt_compile\\\"\" >&AS_MESSAGE_LOG_FD)\n   (eval \"$lt_compile\" 2>out/conftest.err)\n   ac_status=$?\n   cat out/conftest.err >&AS_MESSAGE_LOG_FD\n   echo \"$as_me:$LINENO: \\$? = $ac_status\" >&AS_MESSAGE_LOG_FD\n   if (exit $ac_status) && test -s out/conftest2.$ac_objext\n   then\n     # The compiler can only warn and ignore the option if not recognized\n     # So say no if there are warnings\n     $ECHO \"$_lt_compiler_boilerplate\" | $SED '/^$/d' > out/conftest.exp\n     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2\n     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then\n       _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes\n     fi\n   fi\n   chmod u+w . 2>&AS_MESSAGE_LOG_FD\n   $RM conftest*\n   # SGI C++ compiler will create directory out/ii_files/ for\n   # template instantiation\n   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files\n   $RM out/* && rmdir out\n   cd ..\n   $RM -r conftest\n   $RM conftest*\n])\n_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],\n\t[Does compiler simultaneously support -c and -o options?])\n])# _LT_COMPILER_C_O\n\n\n# _LT_COMPILER_FILE_LOCKS([TAGNAME])\n# ----------------------------------\n# Check to see if we can do hard links to lock some files if needed\nm4_defun([_LT_COMPILER_FILE_LOCKS],\n[m4_require([_LT_ENABLE_LOCK])dnl\nm4_require([_LT_FILEUTILS_DEFAULTS])dnl\n_LT_COMPILER_C_O([$1])\n\nhard_links=\"nottested\"\nif test \"$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)\" = no && test \"$need_locks\" != no; then\n  # do not overwrite the value of need_locks provided by the user\n  AC_MSG_CHECKING([if we can lock with hard links])\n  hard_links=yes\n  $RM conftest*\n  ln conftest.a conftest.b 2>/dev/null && hard_links=no\n  touch conftest.a\n  ln conftest.a conftest.b 2>&5 || hard_links=no\n  ln conftest.a conftest.b 2>/dev/null && hard_links=no\n  AC_MSG_RESULT([$hard_links])\n  if test \"$hard_links\" = no; then\n    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])\n    need_locks=warn\n  fi\nelse\n  need_locks=no\nfi\n_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])\n])# _LT_COMPILER_FILE_LOCKS\n\n\n# _LT_CHECK_OBJDIR\n# ----------------\nm4_defun([_LT_CHECK_OBJDIR],\n[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],\n[rm -f .libs 2>/dev/null\nmkdir .libs 2>/dev/null\nif test -d .libs; then\n  lt_cv_objdir=.libs\nelse\n  # MS-DOS does not allow filenames that begin with a dot.\n  lt_cv_objdir=_libs\nfi\nrmdir .libs 2>/dev/null])\nobjdir=$lt_cv_objdir\n_LT_DECL([], [objdir], [0],\n         [The name of the directory that contains temporary libtool files])dnl\nm4_pattern_allow([LT_OBJDIR])dnl\nAC_DEFINE_UNQUOTED(LT_OBJDIR, \"$lt_cv_objdir/\",\n  [Define to the sub-directory in which libtool stores uninstalled libraries.])\n])# _LT_CHECK_OBJDIR\n\n\n# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])\n# --------------------------------------\n# Check hardcoding attributes.\nm4_defun([_LT_LINKER_HARDCODE_LIBPATH],\n[AC_MSG_CHECKING([how to hardcode library paths into programs])\n_LT_TAGVAR(hardcode_action, $1)=\nif test -n \"$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\" ||\n   test -n \"$_LT_TAGVAR(runpath_var, $1)\" ||\n   test \"X$_LT_TAGVAR(hardcode_automatic, $1)\" = \"Xyes\" ; then\n\n  # We can hardcode non-existent directories.\n  if test \"$_LT_TAGVAR(hardcode_direct, $1)\" != no &&\n     # If the only mechanism to avoid hardcoding is shlibpath_var, we\n     # have to relink, otherwise we might link with an installed library\n     # when we should be linking with a yet-to-be-installed one\n     ## test \"$_LT_TAGVAR(hardcode_shlibpath_var, $1)\" != no &&\n     test \"$_LT_TAGVAR(hardcode_minus_L, $1)\" != no; then\n    # Linking always hardcodes the temporary library directory.\n    _LT_TAGVAR(hardcode_action, $1)=relink\n  else\n    # We can link without hardcoding, and we can hardcode nonexisting dirs.\n    _LT_TAGVAR(hardcode_action, $1)=immediate\n  fi\nelse\n  # We cannot hardcode anything, or else we can only hardcode existing\n  # directories.\n  _LT_TAGVAR(hardcode_action, $1)=unsupported\nfi\nAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])\n\nif test \"$_LT_TAGVAR(hardcode_action, $1)\" = relink ||\n   test \"$_LT_TAGVAR(inherit_rpath, $1)\" = yes; then\n  # Fast installation is not supported\n  enable_fast_install=no\nelif test \"$shlibpath_overrides_runpath\" = yes ||\n     test \"$enable_shared\" = no; then\n  # Fast installation is not necessary\n  enable_fast_install=needless\nfi\n_LT_TAGDECL([], [hardcode_action], [0],\n    [How to hardcode a shared library path into an executable])\n])# _LT_LINKER_HARDCODE_LIBPATH\n\n\n# _LT_CMD_STRIPLIB\n# ----------------\nm4_defun([_LT_CMD_STRIPLIB],\n[m4_require([_LT_DECL_EGREP])\nstriplib=\nold_striplib=\nAC_MSG_CHECKING([whether stripping libraries is possible])\nif test -n \"$STRIP\" && $STRIP -V 2>&1 | $GREP \"GNU strip\" >/dev/null; then\n  test -z \"$old_striplib\" && old_striplib=\"$STRIP --strip-debug\"\n  test -z \"$striplib\" && striplib=\"$STRIP --strip-unneeded\"\n  AC_MSG_RESULT([yes])\nelse\n# FIXME - insert some real tests, host_os isn't really good enough\n  case $host_os in\n  darwin*)\n    if test -n \"$STRIP\" ; then\n      striplib=\"$STRIP -x\"\n      old_striplib=\"$STRIP -S\"\n      AC_MSG_RESULT([yes])\n    else\n      AC_MSG_RESULT([no])\n    fi\n    ;;\n  *)\n    AC_MSG_RESULT([no])\n    ;;\n  esac\nfi\n_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])\n_LT_DECL([], [striplib], [1])\n])# _LT_CMD_STRIPLIB\n\n\n# _LT_SYS_DYNAMIC_LINKER([TAG])\n# -----------------------------\n# PORTME Fill in your ld.so characteristics\nm4_defun([_LT_SYS_DYNAMIC_LINKER],\n[AC_REQUIRE([AC_CANONICAL_HOST])dnl\nm4_require([_LT_DECL_EGREP])dnl\nm4_require([_LT_FILEUTILS_DEFAULTS])dnl\nm4_require([_LT_DECL_OBJDUMP])dnl\nm4_require([_LT_DECL_SED])dnl\nm4_require([_LT_CHECK_SHELL_FEATURES])dnl\nAC_MSG_CHECKING([dynamic linker characteristics])\nm4_if([$1],\n\t[], [\nif test \"$GCC\" = yes; then\n  case $host_os in\n    darwin*) lt_awk_arg=\"/^libraries:/,/LR/\" ;;\n    *) lt_awk_arg=\"/^libraries:/\" ;;\n  esac\n  case $host_os in\n    mingw* | cegcc*) lt_sed_strip_eq=\"s,=\\([[A-Za-z]]:\\),\\1,g\" ;;\n    *) lt_sed_strip_eq=\"s,=/,/,g\" ;;\n  esac\n  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e \"s/^libraries://\" -e $lt_sed_strip_eq`\n  case $lt_search_path_spec in\n  *\\;*)\n    # if the path contains \";\" then we assume it to be the separator\n    # otherwise default to the standard path separator (i.e. \":\") - it is\n    # assumed that no part of a normal pathname contains \";\" but that should\n    # okay in the real world where \";\" in dirpaths is itself problematic.\n    lt_search_path_spec=`$ECHO \"$lt_search_path_spec\" | $SED 's/;/ /g'`\n    ;;\n  *)\n    lt_search_path_spec=`$ECHO \"$lt_search_path_spec\" | $SED \"s/$PATH_SEPARATOR/ /g\"`\n    ;;\n  esac\n  # Ok, now we have the path, separated by spaces, we can step through it\n  # and add multilib dir if necessary.\n  lt_tmp_lt_search_path_spec=\n  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`\n  for lt_sys_path in $lt_search_path_spec; do\n    if test -d \"$lt_sys_path/$lt_multi_os_dir\"; then\n      lt_tmp_lt_search_path_spec=\"$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir\"\n    else\n      test -d \"$lt_sys_path\" && \\\n\tlt_tmp_lt_search_path_spec=\"$lt_tmp_lt_search_path_spec $lt_sys_path\"\n    fi\n  done\n  lt_search_path_spec=`$ECHO \"$lt_tmp_lt_search_path_spec\" | awk '\nBEGIN {RS=\" \"; FS=\"/|\\n\";} {\n  lt_foo=\"\";\n  lt_count=0;\n  for (lt_i = NF; lt_i > 0; lt_i--) {\n    if ($lt_i != \"\" && $lt_i != \".\") {\n      if ($lt_i == \"..\") {\n        lt_count++;\n      } else {\n        if (lt_count == 0) {\n          lt_foo=\"/\" $lt_i lt_foo;\n        } else {\n          lt_count--;\n        }\n      }\n    }\n  }\n  if (lt_foo != \"\") { lt_freq[[lt_foo]]++; }\n  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }\n}'`\n  # AWK program above erroneously prepends '/' to C:/dos/paths\n  # for these hosts.\n  case $host_os in\n    mingw* | cegcc*) lt_search_path_spec=`$ECHO \"$lt_search_path_spec\" |\\\n      $SED 's,/\\([[A-Za-z]]:\\),\\1,g'` ;;\n  esac\n  sys_lib_search_path_spec=`$ECHO \"$lt_search_path_spec\" | $lt_NL2SP`\nelse\n  sys_lib_search_path_spec=\"/lib /usr/lib /usr/local/lib\"\nfi])\nlibrary_names_spec=\nlibname_spec='lib$name'\nsoname_spec=\nshrext_cmds=\".so\"\npostinstall_cmds=\npostuninstall_cmds=\nfinish_cmds=\nfinish_eval=\nshlibpath_var=\nshlibpath_overrides_runpath=unknown\nversion_type=none\ndynamic_linker=\"$host_os ld.so\"\nsys_lib_dlsearch_path_spec=\"/lib /usr/lib\"\nneed_lib_prefix=unknown\nhardcode_into_libs=no\n\n# when you set need_version to no, make sure it does not cause -set_version\n# flags to be left without arguments\nneed_version=unknown\n\ncase $host_os in\naix3*)\n  version_type=linux # correct to gnu/linux during the next big refactor\n  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'\n  shlibpath_var=LIBPATH\n\n  # AIX 3 has no versioning support, so we append a major version to the name.\n  soname_spec='${libname}${release}${shared_ext}$major'\n  ;;\n\naix[[4-9]]*)\n  version_type=linux # correct to gnu/linux during the next big refactor\n  need_lib_prefix=no\n  need_version=no\n  hardcode_into_libs=yes\n  if test \"$host_cpu\" = ia64; then\n    # AIX 5 supports IA64\n    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'\n    shlibpath_var=LD_LIBRARY_PATH\n  else\n    # With GCC up to 2.95.x, collect2 would create an import file\n    # for dependence libraries.  The import file would start with\n    # the line `#! .'.  This would cause the generated library to\n    # depend on `.', always an invalid library.  This was fixed in\n    # development snapshots of GCC prior to 3.0.\n    case $host_os in\n      aix4 | aix4.[[01]] | aix4.[[01]].*)\n      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'\n\t   echo ' yes '\n\t   echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then\n\t:\n      else\n\tcan_build_shared=no\n      fi\n      ;;\n    esac\n    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct\n    # soname into executable. Probably we can add versioning support to\n    # collect2, so additional links can be useful in future.\n    if test \"$aix_use_runtimelinking\" = yes; then\n      # If using run time linking (on AIX 4.2 or later) use lib<name>.so\n      # instead of lib<name>.a to let people know that these are not\n      # typical AIX shared libraries.\n      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n    else\n      # We preserve .a as extension for shared libraries through AIX4.2\n      # and later when we are not doing run time linking.\n      library_names_spec='${libname}${release}.a $libname.a'\n      soname_spec='${libname}${release}${shared_ext}$major'\n    fi\n    shlibpath_var=LIBPATH\n  fi\n  ;;\n\namigaos*)\n  case $host_cpu in\n  powerpc)\n    # Since July 2007 AmigaOS4 officially supports .so libraries.\n    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.\n    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n    ;;\n  m68k)\n    library_names_spec='$libname.ixlibrary $libname.a'\n    # Create ${libname}_ixlibrary.a entries in /sys/libs.\n    finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all \"$lib\" | $SED '\\''s%^.*/\\([[^/]]*\\)\\.ixlibrary$%\\1%'\\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show \"cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a\"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'\n    ;;\n  esac\n  ;;\n\nbeos*)\n  library_names_spec='${libname}${shared_ext}'\n  dynamic_linker=\"$host_os ld.so\"\n  shlibpath_var=LIBRARY_PATH\n  ;;\n\nbsdi[[45]]*)\n  version_type=linux # correct to gnu/linux during the next big refactor\n  need_version=no\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  finish_cmds='PATH=\"\\$PATH:/sbin\" ldconfig $libdir'\n  shlibpath_var=LD_LIBRARY_PATH\n  sys_lib_search_path_spec=\"/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib\"\n  sys_lib_dlsearch_path_spec=\"/shlib /usr/lib /usr/local/lib\"\n  # the default ld.so.conf also contains /usr/contrib/lib and\n  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow\n  # libtool to hard-code these into programs\n  ;;\n\ncygwin* | mingw* | pw32* | cegcc*)\n  version_type=windows\n  shrext_cmds=\".dll\"\n  need_version=no\n  need_lib_prefix=no\n\n  case $GCC,$cc_basename in\n  yes,*)\n    # gcc\n    library_names_spec='$libname.dll.a'\n    # DLL is installed to $(libdir)/../bin by postinstall_cmds\n    postinstall_cmds='base_file=`basename \\${file}`~\n      dlpath=`$SHELL 2>&1 -c '\\''. $dir/'\\''\\${base_file}'\\''i; echo \\$dlname'\\''`~\n      dldir=$destdir/`dirname \\$dlpath`~\n      test -d \\$dldir || mkdir -p \\$dldir~\n      $install_prog $dir/$dlname \\$dldir/$dlname~\n      chmod a+x \\$dldir/$dlname~\n      if test -n '\\''$stripme'\\'' && test -n '\\''$striplib'\\''; then\n        eval '\\''$striplib \\$dldir/$dlname'\\'' || exit \\$?;\n      fi'\n    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\\''. $file; echo \\$dlname'\\''`~\n      dlpath=$dir/\\$dldll~\n       $RM \\$dlpath'\n    shlibpath_overrides_runpath=yes\n\n    case $host_os in\n    cygwin*)\n      # Cygwin DLLs use 'cyg' prefix rather than 'lib'\n      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'\nm4_if([$1], [],[\n      sys_lib_search_path_spec=\"$sys_lib_search_path_spec /usr/lib/w32api\"])\n      ;;\n    mingw* | cegcc*)\n      # MinGW DLLs use traditional 'lib' prefix\n      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'\n      ;;\n    pw32*)\n      # pw32 DLLs use 'pw' prefix rather than 'lib'\n      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'\n      ;;\n    esac\n    dynamic_linker='Win32 ld.exe'\n    ;;\n\n  *,cl*)\n    # Native MSVC\n    libname_spec='$name'\n    soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'\n    library_names_spec='${libname}.dll.lib'\n\n    case $build_os in\n    mingw*)\n      sys_lib_search_path_spec=\n      lt_save_ifs=$IFS\n      IFS=';'\n      for lt_path in $LIB\n      do\n        IFS=$lt_save_ifs\n        # Let DOS variable expansion print the short 8.3 style file name.\n        lt_path=`cd \"$lt_path\" 2>/dev/null && cmd //C \"for %i in (\".\") do @echo %~si\"`\n        sys_lib_search_path_spec=\"$sys_lib_search_path_spec $lt_path\"\n      done\n      IFS=$lt_save_ifs\n      # Convert to MSYS style.\n      sys_lib_search_path_spec=`$ECHO \"$sys_lib_search_path_spec\" | sed -e 's|\\\\\\\\|/|g' -e 's| \\\\([[a-zA-Z]]\\\\):| /\\\\1|g' -e 's|^ ||'`\n      ;;\n    cygwin*)\n      # Convert to unix form, then to dos form, then back to unix form\n      # but this time dos style (no spaces!) so that the unix form looks\n      # like /cygdrive/c/PROGRA~1:/cygdr...\n      sys_lib_search_path_spec=`cygpath --path --unix \"$LIB\"`\n      sys_lib_search_path_spec=`cygpath --path --dos \"$sys_lib_search_path_spec\" 2>/dev/null`\n      sys_lib_search_path_spec=`cygpath --path --unix \"$sys_lib_search_path_spec\" | $SED -e \"s/$PATH_SEPARATOR/ /g\"`\n      ;;\n    *)\n      sys_lib_search_path_spec=\"$LIB\"\n      if $ECHO \"$sys_lib_search_path_spec\" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then\n        # It is most probably a Windows format PATH.\n        sys_lib_search_path_spec=`$ECHO \"$sys_lib_search_path_spec\" | $SED -e 's/;/ /g'`\n      else\n        sys_lib_search_path_spec=`$ECHO \"$sys_lib_search_path_spec\" | $SED -e \"s/$PATH_SEPARATOR/ /g\"`\n      fi\n      # FIXME: find the short name or the path components, as spaces are\n      # common. (e.g. \"Program Files\" -> \"PROGRA~1\")\n      ;;\n    esac\n\n    # DLL is installed to $(libdir)/../bin by postinstall_cmds\n    postinstall_cmds='base_file=`basename \\${file}`~\n      dlpath=`$SHELL 2>&1 -c '\\''. $dir/'\\''\\${base_file}'\\''i; echo \\$dlname'\\''`~\n      dldir=$destdir/`dirname \\$dlpath`~\n      test -d \\$dldir || mkdir -p \\$dldir~\n      $install_prog $dir/$dlname \\$dldir/$dlname'\n    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\\''. $file; echo \\$dlname'\\''`~\n      dlpath=$dir/\\$dldll~\n       $RM \\$dlpath'\n    shlibpath_overrides_runpath=yes\n    dynamic_linker='Win32 link.exe'\n    ;;\n\n  *)\n    # Assume MSVC wrapper\n    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'\n    dynamic_linker='Win32 ld.exe'\n    ;;\n  esac\n  # FIXME: first we should search . and the directory the executable is in\n  shlibpath_var=PATH\n  ;;\n\ndarwin* | rhapsody*)\n  dynamic_linker=\"$host_os dyld\"\n  version_type=darwin\n  need_lib_prefix=no\n  need_version=no\n  library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'\n  soname_spec='${libname}${release}${major}$shared_ext'\n  shlibpath_overrides_runpath=yes\n  shlibpath_var=DYLD_LIBRARY_PATH\n  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'\nm4_if([$1], [],[\n  sys_lib_search_path_spec=\"$sys_lib_search_path_spec /usr/local/lib\"])\n  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'\n  ;;\n\ndgux*)\n  version_type=linux # correct to gnu/linux during the next big refactor\n  need_lib_prefix=no\n  need_version=no\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  shlibpath_var=LD_LIBRARY_PATH\n  ;;\n\nfreebsd* | dragonfly*)\n  # DragonFly does not have aout.  When/if they implement a new\n  # versioning mechanism, adjust this.\n  if test -x /usr/bin/objformat; then\n    objformat=`/usr/bin/objformat`\n  else\n    case $host_os in\n    freebsd[[23]].*) objformat=aout ;;\n    *) objformat=elf ;;\n    esac\n  fi\n  version_type=freebsd-$objformat\n  case $version_type in\n    freebsd-elf*)\n      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'\n      need_version=no\n      need_lib_prefix=no\n      ;;\n    freebsd-*)\n      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'\n      need_version=yes\n      ;;\n  esac\n  shlibpath_var=LD_LIBRARY_PATH\n  case $host_os in\n  freebsd2.*)\n    shlibpath_overrides_runpath=yes\n    ;;\n  freebsd3.[[01]]* | freebsdelf3.[[01]]*)\n    shlibpath_overrides_runpath=yes\n    hardcode_into_libs=yes\n    ;;\n  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \\\n  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)\n    shlibpath_overrides_runpath=no\n    hardcode_into_libs=yes\n    ;;\n  *) # from 4.6 on, and DragonFly\n    shlibpath_overrides_runpath=yes\n    hardcode_into_libs=yes\n    ;;\n  esac\n  ;;\n\nhaiku*)\n  version_type=linux # correct to gnu/linux during the next big refactor\n  need_lib_prefix=no\n  need_version=no\n  dynamic_linker=\"$host_os runtime_loader\"\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  shlibpath_var=LIBRARY_PATH\n  shlibpath_overrides_runpath=yes\n  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'\n  hardcode_into_libs=yes\n  ;;\n\nhpux9* | hpux10* | hpux11*)\n  # Give a soname corresponding to the major version so that dld.sl refuses to\n  # link against other versions.\n  version_type=sunos\n  need_lib_prefix=no\n  need_version=no\n  case $host_cpu in\n  ia64*)\n    shrext_cmds='.so'\n    hardcode_into_libs=yes\n    dynamic_linker=\"$host_os dld.so\"\n    shlibpath_var=LD_LIBRARY_PATH\n    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.\n    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n    soname_spec='${libname}${release}${shared_ext}$major'\n    if test \"X$HPUX_IA64_MODE\" = X32; then\n      sys_lib_search_path_spec=\"/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib\"\n    else\n      sys_lib_search_path_spec=\"/usr/lib/hpux64 /usr/local/lib/hpux64\"\n    fi\n    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec\n    ;;\n  hppa*64*)\n    shrext_cmds='.sl'\n    hardcode_into_libs=yes\n    dynamic_linker=\"$host_os dld.sl\"\n    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH\n    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.\n    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n    soname_spec='${libname}${release}${shared_ext}$major'\n    sys_lib_search_path_spec=\"/usr/lib/pa20_64 /usr/ccs/lib/pa20_64\"\n    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec\n    ;;\n  *)\n    shrext_cmds='.sl'\n    dynamic_linker=\"$host_os dld.sl\"\n    shlibpath_var=SHLIB_PATH\n    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH\n    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n    soname_spec='${libname}${release}${shared_ext}$major'\n    ;;\n  esac\n  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...\n  postinstall_cmds='chmod 555 $lib'\n  # or fails outright, so override atomically:\n  install_override_mode=555\n  ;;\n\ninterix[[3-9]]*)\n  version_type=linux # correct to gnu/linux during the next big refactor\n  need_lib_prefix=no\n  need_version=no\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'\n  shlibpath_var=LD_LIBRARY_PATH\n  shlibpath_overrides_runpath=no\n  hardcode_into_libs=yes\n  ;;\n\nirix5* | irix6* | nonstopux*)\n  case $host_os in\n    nonstopux*) version_type=nonstopux ;;\n    *)\n\tif test \"$lt_cv_prog_gnu_ld\" = yes; then\n\t\tversion_type=linux # correct to gnu/linux during the next big refactor\n\telse\n\t\tversion_type=irix\n\tfi ;;\n  esac\n  need_lib_prefix=no\n  need_version=no\n  soname_spec='${libname}${release}${shared_ext}$major'\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'\n  case $host_os in\n  irix5* | nonstopux*)\n    libsuff= shlibsuff=\n    ;;\n  *)\n    case $LD in # libtool.m4 will add one of these switches to LD\n    *-32|*\"-32 \"|*-melf32bsmip|*\"-melf32bsmip \")\n      libsuff= shlibsuff= libmagic=32-bit;;\n    *-n32|*\"-n32 \"|*-melf32bmipn32|*\"-melf32bmipn32 \")\n      libsuff=32 shlibsuff=N32 libmagic=N32;;\n    *-64|*\"-64 \"|*-melf64bmip|*\"-melf64bmip \")\n      libsuff=64 shlibsuff=64 libmagic=64-bit;;\n    *) libsuff= shlibsuff= libmagic=never-match;;\n    esac\n    ;;\n  esac\n  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH\n  shlibpath_overrides_runpath=no\n  sys_lib_search_path_spec=\"/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}\"\n  sys_lib_dlsearch_path_spec=\"/usr/lib${libsuff} /lib${libsuff}\"\n  hardcode_into_libs=yes\n  ;;\n\n# No shared lib support for Linux oldld, aout, or coff.\nlinux*oldld* | linux*aout* | linux*coff*)\n  dynamic_linker=no\n  ;;\n\n# This must be glibc/ELF.\nlinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)\n  version_type=linux # correct to gnu/linux during the next big refactor\n  need_lib_prefix=no\n  need_version=no\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  finish_cmds='PATH=\"\\$PATH:/sbin\" ldconfig -n $libdir'\n  shlibpath_var=LD_LIBRARY_PATH\n  shlibpath_overrides_runpath=no\n\n  # Some binutils ld are patched to set DT_RUNPATH\n  AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],\n    [lt_cv_shlibpath_overrides_runpath=no\n    save_LDFLAGS=$LDFLAGS\n    save_libdir=$libdir\n    eval \"libdir=/foo; wl=\\\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\\\"; \\\n\t LDFLAGS=\\\"\\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\\\"\"\n    AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],\n      [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep \"RUNPATH.*$libdir\" >/dev/null],\n\t [lt_cv_shlibpath_overrides_runpath=yes])])\n    LDFLAGS=$save_LDFLAGS\n    libdir=$save_libdir\n    ])\n  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath\n\n  # This implies no fast_install, which is unacceptable.\n  # Some rework will be needed to allow for fast_install\n  # before this can be enabled.\n  hardcode_into_libs=yes\n\n  # Append ld.so.conf contents to the search path\n  if test -f /etc/ld.so.conf; then\n    lt_ld_extra=`awk '/^include / { system(sprintf(\"cd /etc; cat %s 2>/dev/null\", \\[$]2)); skip = 1; } { if (!skip) print \\[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[\t ]*hwcap[\t ]/d;s/[:,\t]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/\"//g;/^$/d' | tr '\\n' ' '`\n    sys_lib_dlsearch_path_spec=\"/lib /usr/lib $lt_ld_extra\"\n  fi\n\n  # We used to test for /lib/ld.so.1 and disable shared libraries on\n  # powerpc, because MkLinux only supported shared libraries with the\n  # GNU dynamic linker.  Since this was broken with cross compilers,\n  # most powerpc-linux boxes support dynamic linking these days and\n  # people can always --disable-shared, the test was removed, and we\n  # assume the GNU/Linux dynamic linker is in use.\n  dynamic_linker='GNU/Linux ld.so'\n  ;;\n\nnetbsdelf*-gnu)\n  version_type=linux\n  need_lib_prefix=no\n  need_version=no\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  shlibpath_var=LD_LIBRARY_PATH\n  shlibpath_overrides_runpath=no\n  hardcode_into_libs=yes\n  dynamic_linker='NetBSD ld.elf_so'\n  ;;\n\nnetbsd*)\n  version_type=sunos\n  need_lib_prefix=no\n  need_version=no\n  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then\n    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'\n    finish_cmds='PATH=\"\\$PATH:/sbin\" ldconfig -m $libdir'\n    dynamic_linker='NetBSD (a.out) ld.so'\n  else\n    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'\n    soname_spec='${libname}${release}${shared_ext}$major'\n    dynamic_linker='NetBSD ld.elf_so'\n  fi\n  shlibpath_var=LD_LIBRARY_PATH\n  shlibpath_overrides_runpath=yes\n  hardcode_into_libs=yes\n  ;;\n\nnewsos6)\n  version_type=linux # correct to gnu/linux during the next big refactor\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n  shlibpath_var=LD_LIBRARY_PATH\n  shlibpath_overrides_runpath=yes\n  ;;\n\n*nto* | *qnx*)\n  version_type=qnx\n  need_lib_prefix=no\n  need_version=no\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  shlibpath_var=LD_LIBRARY_PATH\n  shlibpath_overrides_runpath=no\n  hardcode_into_libs=yes\n  dynamic_linker='ldqnx.so'\n  ;;\n\nopenbsd*)\n  version_type=sunos\n  sys_lib_dlsearch_path_spec=\"/usr/lib\"\n  need_lib_prefix=no\n  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.\n  case $host_os in\n    openbsd3.3 | openbsd3.3.*)\tneed_version=yes ;;\n    *)\t\t\t\tneed_version=no  ;;\n  esac\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'\n  finish_cmds='PATH=\"\\$PATH:/sbin\" ldconfig -m $libdir'\n  shlibpath_var=LD_LIBRARY_PATH\n  if test -z \"`echo __ELF__ | $CC -E - | $GREP __ELF__`\" || test \"$host_os-$host_cpu\" = \"openbsd2.8-powerpc\"; then\n    case $host_os in\n      openbsd2.[[89]] | openbsd2.[[89]].*)\n\tshlibpath_overrides_runpath=no\n\t;;\n      *)\n\tshlibpath_overrides_runpath=yes\n\t;;\n      esac\n  else\n    shlibpath_overrides_runpath=yes\n  fi\n  ;;\n\nos2*)\n  libname_spec='$name'\n  shrext_cmds=\".dll\"\n  need_lib_prefix=no\n  library_names_spec='$libname${shared_ext} $libname.a'\n  dynamic_linker='OS/2 ld.exe'\n  shlibpath_var=LIBPATH\n  ;;\n\nosf3* | osf4* | osf5*)\n  version_type=osf\n  need_lib_prefix=no\n  need_version=no\n  soname_spec='${libname}${release}${shared_ext}$major'\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n  shlibpath_var=LD_LIBRARY_PATH\n  sys_lib_search_path_spec=\"/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib\"\n  sys_lib_dlsearch_path_spec=\"$sys_lib_search_path_spec\"\n  ;;\n\nrdos*)\n  dynamic_linker=no\n  ;;\n\nsolaris*)\n  version_type=linux # correct to gnu/linux during the next big refactor\n  need_lib_prefix=no\n  need_version=no\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  shlibpath_var=LD_LIBRARY_PATH\n  shlibpath_overrides_runpath=yes\n  hardcode_into_libs=yes\n  # ldd complains unless libraries are executable\n  postinstall_cmds='chmod +x $lib'\n  ;;\n\nsunos4*)\n  version_type=sunos\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'\n  finish_cmds='PATH=\"\\$PATH:/usr/etc\" ldconfig $libdir'\n  shlibpath_var=LD_LIBRARY_PATH\n  shlibpath_overrides_runpath=yes\n  if test \"$with_gnu_ld\" = yes; then\n    need_lib_prefix=no\n  fi\n  need_version=yes\n  ;;\n\nsysv4 | sysv4.3*)\n  version_type=linux # correct to gnu/linux during the next big refactor\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  shlibpath_var=LD_LIBRARY_PATH\n  case $host_vendor in\n    sni)\n      shlibpath_overrides_runpath=no\n      need_lib_prefix=no\n      runpath_var=LD_RUN_PATH\n      ;;\n    siemens)\n      need_lib_prefix=no\n      ;;\n    motorola)\n      need_lib_prefix=no\n      need_version=no\n      shlibpath_overrides_runpath=no\n      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'\n      ;;\n  esac\n  ;;\n\nsysv4*MP*)\n  if test -d /usr/nec ;then\n    version_type=linux # correct to gnu/linux during the next big refactor\n    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'\n    soname_spec='$libname${shared_ext}.$major'\n    shlibpath_var=LD_LIBRARY_PATH\n  fi\n  ;;\n\nsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)\n  version_type=freebsd-elf\n  need_lib_prefix=no\n  need_version=no\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  shlibpath_var=LD_LIBRARY_PATH\n  shlibpath_overrides_runpath=yes\n  hardcode_into_libs=yes\n  if test \"$with_gnu_ld\" = yes; then\n    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'\n  else\n    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'\n    case $host_os in\n      sco3.2v5*)\n        sys_lib_search_path_spec=\"$sys_lib_search_path_spec /lib\"\n\t;;\n    esac\n  fi\n  sys_lib_dlsearch_path_spec='/usr/lib'\n  ;;\n\ntpf*)\n  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.\n  version_type=linux # correct to gnu/linux during the next big refactor\n  need_lib_prefix=no\n  need_version=no\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n  shlibpath_var=LD_LIBRARY_PATH\n  shlibpath_overrides_runpath=no\n  hardcode_into_libs=yes\n  ;;\n\nuts4*)\n  version_type=linux # correct to gnu/linux during the next big refactor\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  shlibpath_var=LD_LIBRARY_PATH\n  ;;\n\n*)\n  dynamic_linker=no\n  ;;\nesac\nAC_MSG_RESULT([$dynamic_linker])\ntest \"$dynamic_linker\" = no && can_build_shared=no\n\nvariables_saved_for_relink=\"PATH $shlibpath_var $runpath_var\"\nif test \"$GCC\" = yes; then\n  variables_saved_for_relink=\"$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH\"\nfi\n\nif test \"${lt_cv_sys_lib_search_path_spec+set}\" = set; then\n  sys_lib_search_path_spec=\"$lt_cv_sys_lib_search_path_spec\"\nfi\nif test \"${lt_cv_sys_lib_dlsearch_path_spec+set}\" = set; then\n  sys_lib_dlsearch_path_spec=\"$lt_cv_sys_lib_dlsearch_path_spec\"\nfi\n\n_LT_DECL([], [variables_saved_for_relink], [1],\n    [Variables whose values should be saved in libtool wrapper scripts and\n    restored at link time])\n_LT_DECL([], [need_lib_prefix], [0],\n    [Do we need the \"lib\" prefix for modules?])\n_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])\n_LT_DECL([], [version_type], [0], [Library versioning type])\n_LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])\n_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])\n_LT_DECL([], [shlibpath_overrides_runpath], [0],\n    [Is shlibpath searched before the hard-coded library search path?])\n_LT_DECL([], [libname_spec], [1], [Format of library name prefix])\n_LT_DECL([], [library_names_spec], [1],\n    [[List of archive names.  First name is the real one, the rest are links.\n    The last name is the one that the linker finds with -lNAME]])\n_LT_DECL([], [soname_spec], [1],\n    [[The coded name of the library, if different from the real name]])\n_LT_DECL([], [install_override_mode], [1],\n    [Permission mode override for installation of shared libraries])\n_LT_DECL([], [postinstall_cmds], [2],\n    [Command to use after installation of a shared archive])\n_LT_DECL([], [postuninstall_cmds], [2],\n    [Command to use after uninstallation of a shared archive])\n_LT_DECL([], [finish_cmds], [2],\n    [Commands used to finish a libtool library installation in a directory])\n_LT_DECL([], [finish_eval], [1],\n    [[As \"finish_cmds\", except a single script fragment to be evaled but\n    not shown]])\n_LT_DECL([], [hardcode_into_libs], [0],\n    [Whether we should hardcode library paths into libraries])\n_LT_DECL([], [sys_lib_search_path_spec], [2],\n    [Compile-time system search path for libraries])\n_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],\n    [Run-time system search path for libraries])\n])# _LT_SYS_DYNAMIC_LINKER\n\n\n# _LT_PATH_TOOL_PREFIX(TOOL)\n# --------------------------\n# find a file program which can recognize shared library\nAC_DEFUN([_LT_PATH_TOOL_PREFIX],\n[m4_require([_LT_DECL_EGREP])dnl\nAC_MSG_CHECKING([for $1])\nAC_CACHE_VAL(lt_cv_path_MAGIC_CMD,\n[case $MAGIC_CMD in\n[[\\\\/*] |  ?:[\\\\/]*])\n  lt_cv_path_MAGIC_CMD=\"$MAGIC_CMD\" # Let the user override the test with a path.\n  ;;\n*)\n  lt_save_MAGIC_CMD=\"$MAGIC_CMD\"\n  lt_save_ifs=\"$IFS\"; IFS=$PATH_SEPARATOR\ndnl $ac_dummy forces splitting on constant user-supplied paths.\ndnl POSIX.2 word splitting is done only on the output of word expansions,\ndnl not every word.  This closes a longstanding sh security hole.\n  ac_dummy=\"m4_if([$2], , $PATH, [$2])\"\n  for ac_dir in $ac_dummy; do\n    IFS=\"$lt_save_ifs\"\n    test -z \"$ac_dir\" && ac_dir=.\n    if test -f $ac_dir/$1; then\n      lt_cv_path_MAGIC_CMD=\"$ac_dir/$1\"\n      if test -n \"$file_magic_test_file\"; then\n\tcase $deplibs_check_method in\n\t\"file_magic \"*)\n\t  file_magic_regex=`expr \"$deplibs_check_method\" : \"file_magic \\(.*\\)\"`\n\t  MAGIC_CMD=\"$lt_cv_path_MAGIC_CMD\"\n\t  if eval $file_magic_cmd \\$file_magic_test_file 2> /dev/null |\n\t    $EGREP \"$file_magic_regex\" > /dev/null; then\n\t    :\n\t  else\n\t    cat <<_LT_EOF 1>&2\n\n*** Warning: the command libtool uses to detect shared libraries,\n*** $file_magic_cmd, produces output that libtool cannot recognize.\n*** The result is that libtool may fail to recognize shared libraries\n*** as such.  This will affect the creation of libtool libraries that\n*** depend on shared libraries, but programs linked with such libtool\n*** libraries will work regardless of this problem.  Nevertheless, you\n*** may want to report the problem to your system manager and/or to\n*** bug-libtool@gnu.org\n\n_LT_EOF\n\t  fi ;;\n\tesac\n      fi\n      break\n    fi\n  done\n  IFS=\"$lt_save_ifs\"\n  MAGIC_CMD=\"$lt_save_MAGIC_CMD\"\n  ;;\nesac])\nMAGIC_CMD=\"$lt_cv_path_MAGIC_CMD\"\nif test -n \"$MAGIC_CMD\"; then\n  AC_MSG_RESULT($MAGIC_CMD)\nelse\n  AC_MSG_RESULT(no)\nfi\n_LT_DECL([], [MAGIC_CMD], [0],\n\t [Used to examine libraries when file_magic_cmd begins with \"file\"])dnl\n])# _LT_PATH_TOOL_PREFIX\n\n# Old name:\nAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])\ndnl aclocal-1.4 backwards compatibility:\ndnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])\n\n\n# _LT_PATH_MAGIC\n# --------------\n# find a file program which can recognize a shared library\nm4_defun([_LT_PATH_MAGIC],\n[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)\nif test -z \"$lt_cv_path_MAGIC_CMD\"; then\n  if test -n \"$ac_tool_prefix\"; then\n    _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)\n  else\n    MAGIC_CMD=:\n  fi\nfi\n])# _LT_PATH_MAGIC\n\n\n# LT_PATH_LD\n# ----------\n# find the pathname to the GNU or non-GNU linker\nAC_DEFUN([LT_PATH_LD],\n[AC_REQUIRE([AC_PROG_CC])dnl\nAC_REQUIRE([AC_CANONICAL_HOST])dnl\nAC_REQUIRE([AC_CANONICAL_BUILD])dnl\nm4_require([_LT_DECL_SED])dnl\nm4_require([_LT_DECL_EGREP])dnl\nm4_require([_LT_PROG_ECHO_BACKSLASH])dnl\n\nAC_ARG_WITH([gnu-ld],\n    [AS_HELP_STRING([--with-gnu-ld],\n\t[assume the C compiler uses GNU ld @<:@default=no@:>@])],\n    [test \"$withval\" = no || with_gnu_ld=yes],\n    [with_gnu_ld=no])dnl\n\nac_prog=ld\nif test \"$GCC\" = yes; then\n  # Check if gcc -print-prog-name=ld gives a path.\n  AC_MSG_CHECKING([for ld used by $CC])\n  case $host in\n  *-*-mingw*)\n    # gcc leaves a trailing carriage return which upsets mingw\n    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\\015'` ;;\n  *)\n    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;\n  esac\n  case $ac_prog in\n    # Accept absolute paths.\n    [[\\\\/]]* | ?:[[\\\\/]]*)\n      re_direlt='/[[^/]][[^/]]*/\\.\\./'\n      # Canonicalize the pathname of ld\n      ac_prog=`$ECHO \"$ac_prog\"| $SED 's%\\\\\\\\%/%g'`\n      while $ECHO \"$ac_prog\" | $GREP \"$re_direlt\" > /dev/null 2>&1; do\n\tac_prog=`$ECHO $ac_prog| $SED \"s%$re_direlt%/%\"`\n      done\n      test -z \"$LD\" && LD=\"$ac_prog\"\n      ;;\n  \"\")\n    # If it fails, then pretend we aren't using GCC.\n    ac_prog=ld\n    ;;\n  *)\n    # If it is relative, then search for the first ld in PATH.\n    with_gnu_ld=unknown\n    ;;\n  esac\nelif test \"$with_gnu_ld\" = yes; then\n  AC_MSG_CHECKING([for GNU ld])\nelse\n  AC_MSG_CHECKING([for non-GNU ld])\nfi\nAC_CACHE_VAL(lt_cv_path_LD,\n[if test -z \"$LD\"; then\n  lt_save_ifs=\"$IFS\"; IFS=$PATH_SEPARATOR\n  for ac_dir in $PATH; do\n    IFS=\"$lt_save_ifs\"\n    test -z \"$ac_dir\" && ac_dir=.\n    if test -f \"$ac_dir/$ac_prog\" || test -f \"$ac_dir/$ac_prog$ac_exeext\"; then\n      lt_cv_path_LD=\"$ac_dir/$ac_prog\"\n      # Check to see if the program is GNU ld.  I'd rather use --version,\n      # but apparently some variants of GNU ld only accept -v.\n      # Break only if it was the GNU/non-GNU ld that we prefer.\n      case `\"$lt_cv_path_LD\" -v 2>&1 </dev/null` in\n      *GNU* | *'with BFD'*)\n\ttest \"$with_gnu_ld\" != no && break\n\t;;\n      *)\n\ttest \"$with_gnu_ld\" != yes && break\n\t;;\n      esac\n    fi\n  done\n  IFS=\"$lt_save_ifs\"\nelse\n  lt_cv_path_LD=\"$LD\" # Let the user override the test with a path.\nfi])\nLD=\"$lt_cv_path_LD\"\nif test -n \"$LD\"; then\n  AC_MSG_RESULT($LD)\nelse\n  AC_MSG_RESULT(no)\nfi\ntest -z \"$LD\" && AC_MSG_ERROR([no acceptable ld found in \\$PATH])\n_LT_PATH_LD_GNU\nAC_SUBST([LD])\n\n_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])\n])# LT_PATH_LD\n\n# Old names:\nAU_ALIAS([AM_PROG_LD], [LT_PATH_LD])\nAU_ALIAS([AC_PROG_LD], [LT_PATH_LD])\ndnl aclocal-1.4 backwards compatibility:\ndnl AC_DEFUN([AM_PROG_LD], [])\ndnl AC_DEFUN([AC_PROG_LD], [])\n\n\n# _LT_PATH_LD_GNU\n#- --------------\nm4_defun([_LT_PATH_LD_GNU],\n[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,\n[# I'd rather use --version here, but apparently some GNU lds only accept -v.\ncase `$LD -v 2>&1 </dev/null` in\n*GNU* | *'with BFD'*)\n  lt_cv_prog_gnu_ld=yes\n  ;;\n*)\n  lt_cv_prog_gnu_ld=no\n  ;;\nesac])\nwith_gnu_ld=$lt_cv_prog_gnu_ld\n])# _LT_PATH_LD_GNU\n\n\n# _LT_CMD_RELOAD\n# --------------\n# find reload flag for linker\n#   -- PORTME Some linkers may need a different reload flag.\nm4_defun([_LT_CMD_RELOAD],\n[AC_CACHE_CHECK([for $LD option to reload object files],\n  lt_cv_ld_reload_flag,\n  [lt_cv_ld_reload_flag='-r'])\nreload_flag=$lt_cv_ld_reload_flag\ncase $reload_flag in\n\"\" | \" \"*) ;;\n*) reload_flag=\" $reload_flag\" ;;\nesac\nreload_cmds='$LD$reload_flag -o $output$reload_objs'\ncase $host_os in\n  cygwin* | mingw* | pw32* | cegcc*)\n    if test \"$GCC\" != yes; then\n      reload_cmds=false\n    fi\n    ;;\n  darwin*)\n    if test \"$GCC\" = yes; then\n      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'\n    else\n      reload_cmds='$LD$reload_flag -o $output$reload_objs'\n    fi\n    ;;\nesac\n_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl\n_LT_TAGDECL([], [reload_cmds], [2])dnl\n])# _LT_CMD_RELOAD\n\n\n# _LT_CHECK_MAGIC_METHOD\n# ----------------------\n# how to check for library dependencies\n#  -- PORTME fill in with the dynamic library characteristics\nm4_defun([_LT_CHECK_MAGIC_METHOD],\n[m4_require([_LT_DECL_EGREP])\nm4_require([_LT_DECL_OBJDUMP])\nAC_CACHE_CHECK([how to recognize dependent libraries],\nlt_cv_deplibs_check_method,\n[lt_cv_file_magic_cmd='$MAGIC_CMD'\nlt_cv_file_magic_test_file=\nlt_cv_deplibs_check_method='unknown'\n# Need to set the preceding variable on all platforms that support\n# interlibrary dependencies.\n# 'none' -- dependencies not supported.\n# `unknown' -- same as none, but documents that we really don't know.\n# 'pass_all' -- all dependencies passed with no checks.\n# 'test_compile' -- check by making test program.\n# 'file_magic [[regex]]' -- check by looking for files in library path\n# which responds to the $file_magic_cmd with a given extended regex.\n# If you have `file' or equivalent on your system and you're not sure\n# whether `pass_all' will *always* work, you probably want this one.\n\ncase $host_os in\naix[[4-9]]*)\n  lt_cv_deplibs_check_method=pass_all\n  ;;\n\nbeos*)\n  lt_cv_deplibs_check_method=pass_all\n  ;;\n\nbsdi[[45]]*)\n  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'\n  lt_cv_file_magic_cmd='/usr/bin/file -L'\n  lt_cv_file_magic_test_file=/shlib/libc.so\n  ;;\n\ncygwin*)\n  # func_win32_libid is a shell function defined in ltmain.sh\n  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'\n  lt_cv_file_magic_cmd='func_win32_libid'\n  ;;\n\nmingw* | pw32*)\n  # Base MSYS/MinGW do not provide the 'file' command needed by\n  # func_win32_libid shell function, so use a weaker test based on 'objdump',\n  # unless we find 'file', for example because we are cross-compiling.\n  # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.\n  if ( test \"$lt_cv_nm_interface\" = \"BSD nm\" && file / ) >/dev/null 2>&1; then\n    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'\n    lt_cv_file_magic_cmd='func_win32_libid'\n  else\n    # Keep this pattern in sync with the one in func_win32_libid.\n    lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'\n    lt_cv_file_magic_cmd='$OBJDUMP -f'\n  fi\n  ;;\n\ncegcc*)\n  # use the weaker test based on 'objdump'. See mingw*.\n  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'\n  lt_cv_file_magic_cmd='$OBJDUMP -f'\n  ;;\n\ndarwin* | rhapsody*)\n  lt_cv_deplibs_check_method=pass_all\n  ;;\n\nfreebsd* | dragonfly*)\n  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then\n    case $host_cpu in\n    i*86 )\n      # Not sure whether the presence of OpenBSD here was a mistake.\n      # Let's accept both of them until this is cleared up.\n      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'\n      lt_cv_file_magic_cmd=/usr/bin/file\n      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`\n      ;;\n    esac\n  else\n    lt_cv_deplibs_check_method=pass_all\n  fi\n  ;;\n\nhaiku*)\n  lt_cv_deplibs_check_method=pass_all\n  ;;\n\nhpux10.20* | hpux11*)\n  lt_cv_file_magic_cmd=/usr/bin/file\n  case $host_cpu in\n  ia64*)\n    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'\n    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so\n    ;;\n  hppa*64*)\n    [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\\.[0-9]']\n    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl\n    ;;\n  *)\n    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\\.[[0-9]]) shared library'\n    lt_cv_file_magic_test_file=/usr/lib/libc.sl\n    ;;\n  esac\n  ;;\n\ninterix[[3-9]]*)\n  # PIC code is broken on Interix 3.x, that's why |\\.a not |_pic\\.a here\n  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\\.so|\\.a)$'\n  ;;\n\nirix5* | irix6* | nonstopux*)\n  case $LD in\n  *-32|*\"-32 \") libmagic=32-bit;;\n  *-n32|*\"-n32 \") libmagic=N32;;\n  *-64|*\"-64 \") libmagic=64-bit;;\n  *) libmagic=never-match;;\n  esac\n  lt_cv_deplibs_check_method=pass_all\n  ;;\n\n# This must be glibc/ELF.\nlinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)\n  lt_cv_deplibs_check_method=pass_all\n  ;;\n\nnetbsd* | netbsdelf*-gnu)\n  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then\n    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\\.so\\.[[0-9]]+\\.[[0-9]]+|_pic\\.a)$'\n  else\n    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\\.so|_pic\\.a)$'\n  fi\n  ;;\n\nnewos6*)\n  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'\n  lt_cv_file_magic_cmd=/usr/bin/file\n  lt_cv_file_magic_test_file=/usr/lib/libnls.so\n  ;;\n\n*nto* | *qnx*)\n  lt_cv_deplibs_check_method=pass_all\n  ;;\n\nopenbsd*)\n  if test -z \"`echo __ELF__ | $CC -E - | $GREP __ELF__`\" || test \"$host_os-$host_cpu\" = \"openbsd2.8-powerpc\"; then\n    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\\.so\\.[[0-9]]+\\.[[0-9]]+|\\.so|_pic\\.a)$'\n  else\n    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\\.so\\.[[0-9]]+\\.[[0-9]]+|_pic\\.a)$'\n  fi\n  ;;\n\nosf3* | osf4* | osf5*)\n  lt_cv_deplibs_check_method=pass_all\n  ;;\n\nrdos*)\n  lt_cv_deplibs_check_method=pass_all\n  ;;\n\nsolaris*)\n  lt_cv_deplibs_check_method=pass_all\n  ;;\n\nsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)\n  lt_cv_deplibs_check_method=pass_all\n  ;;\n\nsysv4 | sysv4.3*)\n  case $host_vendor in\n  motorola)\n    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]'\n    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`\n    ;;\n  ncr)\n    lt_cv_deplibs_check_method=pass_all\n    ;;\n  sequent)\n    lt_cv_file_magic_cmd='/bin/file'\n    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'\n    ;;\n  sni)\n    lt_cv_file_magic_cmd='/bin/file'\n    lt_cv_deplibs_check_method=\"file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib\"\n    lt_cv_file_magic_test_file=/lib/libc.so\n    ;;\n  siemens)\n    lt_cv_deplibs_check_method=pass_all\n    ;;\n  pc)\n    lt_cv_deplibs_check_method=pass_all\n    ;;\n  esac\n  ;;\n\ntpf*)\n  lt_cv_deplibs_check_method=pass_all\n  ;;\nesac\n])\n\nfile_magic_glob=\nwant_nocaseglob=no\nif test \"$build\" = \"$host\"; then\n  case $host_os in\n  mingw* | pw32*)\n    if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then\n      want_nocaseglob=yes\n    else\n      file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e \"s/\\(..\\)/s\\/[[\\1]]\\/[[\\1]]\\/g;/g\"`\n    fi\n    ;;\n  esac\nfi\n\nfile_magic_cmd=$lt_cv_file_magic_cmd\ndeplibs_check_method=$lt_cv_deplibs_check_method\ntest -z \"$deplibs_check_method\" && deplibs_check_method=unknown\n\n_LT_DECL([], [deplibs_check_method], [1],\n    [Method to check whether dependent libraries are shared objects])\n_LT_DECL([], [file_magic_cmd], [1],\n    [Command to use when deplibs_check_method = \"file_magic\"])\n_LT_DECL([], [file_magic_glob], [1],\n    [How to find potential files when deplibs_check_method = \"file_magic\"])\n_LT_DECL([], [want_nocaseglob], [1],\n    [Find potential files using nocaseglob when deplibs_check_method = \"file_magic\"])\n])# _LT_CHECK_MAGIC_METHOD\n\n\n# LT_PATH_NM\n# ----------\n# find the pathname to a BSD- or MS-compatible name lister\nAC_DEFUN([LT_PATH_NM],\n[AC_REQUIRE([AC_PROG_CC])dnl\nAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,\n[if test -n \"$NM\"; then\n  # Let the user override the test.\n  lt_cv_path_NM=\"$NM\"\nelse\n  lt_nm_to_check=\"${ac_tool_prefix}nm\"\n  if test -n \"$ac_tool_prefix\" && test \"$build\" = \"$host\"; then\n    lt_nm_to_check=\"$lt_nm_to_check nm\"\n  fi\n  for lt_tmp_nm in $lt_nm_to_check; do\n    lt_save_ifs=\"$IFS\"; IFS=$PATH_SEPARATOR\n    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do\n      IFS=\"$lt_save_ifs\"\n      test -z \"$ac_dir\" && ac_dir=.\n      tmp_nm=\"$ac_dir/$lt_tmp_nm\"\n      if test -f \"$tmp_nm\" || test -f \"$tmp_nm$ac_exeext\" ; then\n\t# Check to see if the nm accepts a BSD-compat flag.\n\t# Adding the `sed 1q' prevents false positives on HP-UX, which says:\n\t#   nm: unknown option \"B\" ignored\n\t# Tru64's nm complains that /dev/null is an invalid object file\n\tcase `\"$tmp_nm\" -B /dev/null 2>&1 | sed '1q'` in\n\t*/dev/null* | *'Invalid file or object type'*)\n\t  lt_cv_path_NM=\"$tmp_nm -B\"\n\t  break\n\t  ;;\n\t*)\n\t  case `\"$tmp_nm\" -p /dev/null 2>&1 | sed '1q'` in\n\t  */dev/null*)\n\t    lt_cv_path_NM=\"$tmp_nm -p\"\n\t    break\n\t    ;;\n\t  *)\n\t    lt_cv_path_NM=${lt_cv_path_NM=\"$tmp_nm\"} # keep the first match, but\n\t    continue # so that we can try to find one that supports BSD flags\n\t    ;;\n\t  esac\n\t  ;;\n\tesac\n      fi\n    done\n    IFS=\"$lt_save_ifs\"\n  done\n  : ${lt_cv_path_NM=no}\nfi])\nif test \"$lt_cv_path_NM\" != \"no\"; then\n  NM=\"$lt_cv_path_NM\"\nelse\n  # Didn't find any BSD compatible name lister, look for dumpbin.\n  if test -n \"$DUMPBIN\"; then :\n    # Let the user override the test.\n  else\n    AC_CHECK_TOOLS(DUMPBIN, [dumpbin \"link -dump\"], :)\n    case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in\n    *COFF*)\n      DUMPBIN=\"$DUMPBIN -symbols\"\n      ;;\n    *)\n      DUMPBIN=:\n      ;;\n    esac\n  fi\n  AC_SUBST([DUMPBIN])\n  if test \"$DUMPBIN\" != \":\"; then\n    NM=\"$DUMPBIN\"\n  fi\nfi\ntest -z \"$NM\" && NM=nm\nAC_SUBST([NM])\n_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl\n\nAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],\n  [lt_cv_nm_interface=\"BSD nm\"\n  echo \"int some_variable = 0;\" > conftest.$ac_ext\n  (eval echo \"\\\"\\$as_me:$LINENO: $ac_compile\\\"\" >&AS_MESSAGE_LOG_FD)\n  (eval \"$ac_compile\" 2>conftest.err)\n  cat conftest.err >&AS_MESSAGE_LOG_FD\n  (eval echo \"\\\"\\$as_me:$LINENO: $NM \\\\\\\"conftest.$ac_objext\\\\\\\"\\\"\" >&AS_MESSAGE_LOG_FD)\n  (eval \"$NM \\\"conftest.$ac_objext\\\"\" 2>conftest.err > conftest.out)\n  cat conftest.err >&AS_MESSAGE_LOG_FD\n  (eval echo \"\\\"\\$as_me:$LINENO: output\\\"\" >&AS_MESSAGE_LOG_FD)\n  cat conftest.out >&AS_MESSAGE_LOG_FD\n  if $GREP 'External.*some_variable' conftest.out > /dev/null; then\n    lt_cv_nm_interface=\"MS dumpbin\"\n  fi\n  rm -f conftest*])\n])# LT_PATH_NM\n\n# Old names:\nAU_ALIAS([AM_PROG_NM], [LT_PATH_NM])\nAU_ALIAS([AC_PROG_NM], [LT_PATH_NM])\ndnl aclocal-1.4 backwards compatibility:\ndnl AC_DEFUN([AM_PROG_NM], [])\ndnl AC_DEFUN([AC_PROG_NM], [])\n\n# _LT_CHECK_SHAREDLIB_FROM_LINKLIB\n# --------------------------------\n# how to determine the name of the shared library\n# associated with a specific link library.\n#  -- PORTME fill in with the dynamic library characteristics\nm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],\n[m4_require([_LT_DECL_EGREP])\nm4_require([_LT_DECL_OBJDUMP])\nm4_require([_LT_DECL_DLLTOOL])\nAC_CACHE_CHECK([how to associate runtime and link libraries],\nlt_cv_sharedlib_from_linklib_cmd,\n[lt_cv_sharedlib_from_linklib_cmd='unknown'\n\ncase $host_os in\ncygwin* | mingw* | pw32* | cegcc*)\n  # two different shell functions defined in ltmain.sh\n  # decide which to use based on capabilities of $DLLTOOL\n  case `$DLLTOOL --help 2>&1` in\n  *--identify-strict*)\n    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib\n    ;;\n  *)\n    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback\n    ;;\n  esac\n  ;;\n*)\n  # fallback: assume linklib IS sharedlib\n  lt_cv_sharedlib_from_linklib_cmd=\"$ECHO\"\n  ;;\nesac\n])\nsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd\ntest -z \"$sharedlib_from_linklib_cmd\" && sharedlib_from_linklib_cmd=$ECHO\n\n_LT_DECL([], [sharedlib_from_linklib_cmd], [1],\n    [Command to associate shared and link libraries])\n])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB\n\n\n# _LT_PATH_MANIFEST_TOOL\n# ----------------------\n# locate the manifest tool\nm4_defun([_LT_PATH_MANIFEST_TOOL],\n[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)\ntest -z \"$MANIFEST_TOOL\" && MANIFEST_TOOL=mt\nAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],\n  [lt_cv_path_mainfest_tool=no\n  echo \"$as_me:$LINENO: $MANIFEST_TOOL '-?'\" >&AS_MESSAGE_LOG_FD\n  $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out\n  cat conftest.err >&AS_MESSAGE_LOG_FD\n  if $GREP 'Manifest Tool' conftest.out > /dev/null; then\n    lt_cv_path_mainfest_tool=yes\n  fi\n  rm -f conftest*])\nif test \"x$lt_cv_path_mainfest_tool\" != xyes; then\n  MANIFEST_TOOL=:\nfi\n_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl\n])# _LT_PATH_MANIFEST_TOOL\n\n\n# LT_LIB_M\n# --------\n# check for math library\nAC_DEFUN([LT_LIB_M],\n[AC_REQUIRE([AC_CANONICAL_HOST])dnl\nLIBM=\ncase $host in\n*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)\n  # These system don't have libm, or don't need it\n  ;;\n*-ncr-sysv4.3*)\n  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=\"-lmw\")\n  AC_CHECK_LIB(m, cos, LIBM=\"$LIBM -lm\")\n  ;;\n*)\n  AC_CHECK_LIB(m, cos, LIBM=\"-lm\")\n  ;;\nesac\nAC_SUBST([LIBM])\n])# LT_LIB_M\n\n# Old name:\nAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])\ndnl aclocal-1.4 backwards compatibility:\ndnl AC_DEFUN([AC_CHECK_LIBM], [])\n\n\n# _LT_COMPILER_NO_RTTI([TAGNAME])\n# -------------------------------\nm4_defun([_LT_COMPILER_NO_RTTI],\n[m4_require([_LT_TAG_COMPILER])dnl\n\n_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=\n\nif test \"$GCC\" = yes; then\n  case $cc_basename in\n  nvcc*)\n    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;\n  *)\n    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;\n  esac\n\n  _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],\n    lt_cv_prog_compiler_rtti_exceptions,\n    [-fno-rtti -fno-exceptions], [],\n    [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=\"$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions\"])\nfi\n_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],\n\t[Compiler flag to turn off builtin functions])\n])# _LT_COMPILER_NO_RTTI\n\n\n# _LT_CMD_GLOBAL_SYMBOLS\n# ----------------------\nm4_defun([_LT_CMD_GLOBAL_SYMBOLS],\n[AC_REQUIRE([AC_CANONICAL_HOST])dnl\nAC_REQUIRE([AC_PROG_CC])dnl\nAC_REQUIRE([AC_PROG_AWK])dnl\nAC_REQUIRE([LT_PATH_NM])dnl\nAC_REQUIRE([LT_PATH_LD])dnl\nm4_require([_LT_DECL_SED])dnl\nm4_require([_LT_DECL_EGREP])dnl\nm4_require([_LT_TAG_COMPILER])dnl\n\n# Check for command to grab the raw symbol name followed by C symbol from nm.\nAC_MSG_CHECKING([command to parse $NM output from $compiler object])\nAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],\n[\n# These are sane defaults that work on at least a few old systems.\n# [They come from Ultrix.  What could be older than Ultrix?!! ;)]\n\n# Character class describing NM global symbol codes.\nsymcode='[[BCDEGRST]]'\n\n# Regexp to match symbols that can be accessed directly from C.\nsympat='\\([[_A-Za-z]][[_A-Za-z0-9]]*\\)'\n\n# Define system-specific variables.\ncase $host_os in\naix*)\n  symcode='[[BCDT]]'\n  ;;\ncygwin* | mingw* | pw32* | cegcc*)\n  symcode='[[ABCDGISTW]]'\n  ;;\nhpux*)\n  if test \"$host_cpu\" = ia64; then\n    symcode='[[ABCDEGRST]]'\n  fi\n  ;;\nirix* | nonstopux*)\n  symcode='[[BCDEGRST]]'\n  ;;\nosf*)\n  symcode='[[BCDEGQRST]]'\n  ;;\nsolaris*)\n  symcode='[[BDRT]]'\n  ;;\nsco3.2v5*)\n  symcode='[[DT]]'\n  ;;\nsysv4.2uw2*)\n  symcode='[[DT]]'\n  ;;\nsysv5* | sco5v6* | unixware* | OpenUNIX*)\n  symcode='[[ABDT]]'\n  ;;\nsysv4)\n  symcode='[[DFNSTU]]'\n  ;;\nesac\n\n# If we're using GNU nm, then use its standard symbol codes.\ncase `$NM -V 2>&1` in\n*GNU* | *'with BFD'*)\n  symcode='[[ABCDGIRSTW]]' ;;\nesac\n\n# Transform an extracted symbol line into a proper C declaration.\n# Some systems (esp. on ia64) link data and code symbols differently,\n# so use this general approach.\nlt_cv_sys_global_symbol_to_cdecl=\"sed -n -e 's/^T .* \\(.*\\)$/extern int \\1();/p' -e 's/^$symcode* .* \\(.*\\)$/extern char \\1;/p'\"\n\n# Transform an extracted symbol line into symbol name and symbol address\nlt_cv_sys_global_symbol_to_c_name_address=\"sed -n -e 's/^: \\([[^ ]]*\\)[[ ]]*$/  {\\\\\\\"\\1\\\\\\\", (void *) 0},/p' -e 's/^$symcode* \\([[^ ]]*\\) \\([[^ ]]*\\)$/  {\\\"\\2\\\", (void *) \\&\\2},/p'\"\nlt_cv_sys_global_symbol_to_c_name_address_lib_prefix=\"sed -n -e 's/^: \\([[^ ]]*\\)[[ ]]*$/  {\\\\\\\"\\1\\\\\\\", (void *) 0},/p' -e 's/^$symcode* \\([[^ ]]*\\) \\(lib[[^ ]]*\\)$/  {\\\"\\2\\\", (void *) \\&\\2},/p' -e 's/^$symcode* \\([[^ ]]*\\) \\([[^ ]]*\\)$/  {\\\"lib\\2\\\", (void *) \\&\\2},/p'\"\n\n# Handle CRLF in mingw tool chain\nopt_cr=\ncase $build_os in\nmingw*)\n  opt_cr=`$ECHO 'x\\{0,1\\}' | tr x '\\015'` # option cr in regexp\n  ;;\nesac\n\n# Try without a prefix underscore, then with it.\nfor ac_symprfx in \"\" \"_\"; do\n\n  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.\n  symxfrm=\"\\\\1 $ac_symprfx\\\\2 \\\\2\"\n\n  # Write the raw and C identifiers.\n  if test \"$lt_cv_nm_interface\" = \"MS dumpbin\"; then\n    # Fake it for dumpbin and say T for any non-static function\n    # and D for any global variable.\n    # Also find C++ and __fastcall symbols from MSVC++,\n    # which start with @ or ?.\n    lt_cv_sys_global_symbol_pipe=\"$AWK ['\"\\\n\"     {last_section=section; section=\\$ 3};\"\\\n\"     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};\"\\\n\"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};\"\\\n\"     \\$ 0!~/External *\\|/{next};\"\\\n\"     / 0+ UNDEF /{next}; / UNDEF \\([^|]\\)*()/{next};\"\\\n\"     {if(hide[section]) next};\"\\\n\"     {f=0}; \\$ 0~/\\(\\).*\\|/{f=1}; {printf f ? \\\"T \\\" : \\\"D \\\"};\"\\\n\"     {split(\\$ 0, a, /\\||\\r/); split(a[2], s)};\"\\\n\"     s[1]~/^[@?]/{print s[1], s[1]; next};\"\\\n\"     s[1]~prfx {split(s[1],t,\\\"@\\\"); print t[1], substr(t[1],length(prfx))}\"\\\n\"     ' prfx=^$ac_symprfx]\"\n  else\n    lt_cv_sys_global_symbol_pipe=\"sed -n -e 's/^.*[[\t ]]\\($symcode$symcode*\\)[[\t ]][[\t ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'\"\n  fi\n  lt_cv_sys_global_symbol_pipe=\"$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'\"\n\n  # Check to see that the pipe works correctly.\n  pipe_works=no\n\n  rm -f conftest*\n  cat > conftest.$ac_ext <<_LT_EOF\n#ifdef __cplusplus\nextern \"C\" {\n#endif\nchar nm_test_var;\nvoid nm_test_func(void);\nvoid nm_test_func(void){}\n#ifdef __cplusplus\n}\n#endif\nint main(){nm_test_var='a';nm_test_func();return(0);}\n_LT_EOF\n\n  if AC_TRY_EVAL(ac_compile); then\n    # Now try to grab the symbols.\n    nlist=conftest.nm\n    if AC_TRY_EVAL(NM conftest.$ac_objext \\| \"$lt_cv_sys_global_symbol_pipe\" \\> $nlist) && test -s \"$nlist\"; then\n      # Try sorting and uniquifying the output.\n      if sort \"$nlist\" | uniq > \"$nlist\"T; then\n\tmv -f \"$nlist\"T \"$nlist\"\n      else\n\trm -f \"$nlist\"T\n      fi\n\n      # Make sure that we snagged all the symbols we need.\n      if $GREP ' nm_test_var$' \"$nlist\" >/dev/null; then\n\tif $GREP ' nm_test_func$' \"$nlist\" >/dev/null; then\n\t  cat <<_LT_EOF > conftest.$ac_ext\n/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */\n#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)\n/* DATA imports from DLLs on WIN32 con't be const, because runtime\n   relocations are performed -- see ld's documentation on pseudo-relocs.  */\n# define LT@&t@_DLSYM_CONST\n#elif defined(__osf__)\n/* This system does not cope well with relocations in const data.  */\n# define LT@&t@_DLSYM_CONST\n#else\n# define LT@&t@_DLSYM_CONST const\n#endif\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n_LT_EOF\n\t  # Now generate the symbol file.\n\t  eval \"$lt_cv_sys_global_symbol_to_cdecl\"' < \"$nlist\" | $GREP -v main >> conftest.$ac_ext'\n\n\t  cat <<_LT_EOF >> conftest.$ac_ext\n\n/* The mapping between symbol names and symbols.  */\nLT@&t@_DLSYM_CONST struct {\n  const char *name;\n  void       *address;\n}\nlt__PROGRAM__LTX_preloaded_symbols[[]] =\n{\n  { \"@PROGRAM@\", (void *) 0 },\n_LT_EOF\n\t  $SED \"s/^$symcode$symcode* \\(.*\\) \\(.*\\)$/  {\\\"\\2\\\", (void *) \\&\\2},/\" < \"$nlist\" | $GREP -v main >> conftest.$ac_ext\n\t  cat <<\\_LT_EOF >> conftest.$ac_ext\n  {0, (void *) 0}\n};\n\n/* This works around a problem in FreeBSD linker */\n#ifdef FREEBSD_WORKAROUND\nstatic const void *lt_preloaded_setup() {\n  return lt__PROGRAM__LTX_preloaded_symbols;\n}\n#endif\n\n#ifdef __cplusplus\n}\n#endif\n_LT_EOF\n\t  # Now try linking the two files.\n\t  mv conftest.$ac_objext conftstm.$ac_objext\n\t  lt_globsym_save_LIBS=$LIBS\n\t  lt_globsym_save_CFLAGS=$CFLAGS\n\t  LIBS=\"conftstm.$ac_objext\"\n\t  CFLAGS=\"$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)\"\n\t  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then\n\t    pipe_works=yes\n\t  fi\n\t  LIBS=$lt_globsym_save_LIBS\n\t  CFLAGS=$lt_globsym_save_CFLAGS\n\telse\n\t  echo \"cannot find nm_test_func in $nlist\" >&AS_MESSAGE_LOG_FD\n\tfi\n      else\n\techo \"cannot find nm_test_var in $nlist\" >&AS_MESSAGE_LOG_FD\n      fi\n    else\n      echo \"cannot run $lt_cv_sys_global_symbol_pipe\" >&AS_MESSAGE_LOG_FD\n    fi\n  else\n    echo \"$progname: failed program was:\" >&AS_MESSAGE_LOG_FD\n    cat conftest.$ac_ext >&5\n  fi\n  rm -rf conftest* conftst*\n\n  # Do not use the global_symbol_pipe unless it works.\n  if test \"$pipe_works\" = yes; then\n    break\n  else\n    lt_cv_sys_global_symbol_pipe=\n  fi\ndone\n])\nif test -z \"$lt_cv_sys_global_symbol_pipe\"; then\n  lt_cv_sys_global_symbol_to_cdecl=\nfi\nif test -z \"$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl\"; then\n  AC_MSG_RESULT(failed)\nelse\n  AC_MSG_RESULT(ok)\nfi\n\n# Response file support.\nif test \"$lt_cv_nm_interface\" = \"MS dumpbin\"; then\n  nm_file_list_spec='@'\nelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then\n  nm_file_list_spec='@'\nfi\n\n_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],\n    [Take the output of nm and produce a listing of raw symbols and C names])\n_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],\n    [Transform the output of nm in a proper C declaration])\n_LT_DECL([global_symbol_to_c_name_address],\n    [lt_cv_sys_global_symbol_to_c_name_address], [1],\n    [Transform the output of nm in a C name address pair])\n_LT_DECL([global_symbol_to_c_name_address_lib_prefix],\n    [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],\n    [Transform the output of nm in a C name address pair when lib prefix is needed])\n_LT_DECL([], [nm_file_list_spec], [1],\n    [Specify filename containing input files for $NM])\n]) # _LT_CMD_GLOBAL_SYMBOLS\n\n\n# _LT_COMPILER_PIC([TAGNAME])\n# ---------------------------\nm4_defun([_LT_COMPILER_PIC],\n[m4_require([_LT_TAG_COMPILER])dnl\n_LT_TAGVAR(lt_prog_compiler_wl, $1)=\n_LT_TAGVAR(lt_prog_compiler_pic, $1)=\n_LT_TAGVAR(lt_prog_compiler_static, $1)=\n\nm4_if([$1], [CXX], [\n  # C++ specific cases for pic, static, wl, etc.\n  if test \"$GXX\" = yes; then\n    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'\n    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'\n\n    case $host_os in\n    aix*)\n      # All AIX code is PIC.\n      if test \"$host_cpu\" = ia64; then\n\t# AIX 5 now supports IA64 processor\n\t_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'\n      fi\n      ;;\n\n    amigaos*)\n      case $host_cpu in\n      powerpc)\n            # see comment about AmigaOS4 .so support\n            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'\n        ;;\n      m68k)\n            # FIXME: we need at least 68020 code to build shared libraries, but\n            # adding the `-m68020' flag to GCC prevents building anything better,\n            # like `-m68040'.\n            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'\n        ;;\n      esac\n      ;;\n\n    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)\n      # PIC is the default for these OSes.\n      ;;\n    mingw* | cygwin* | os2* | pw32* | cegcc*)\n      # This hack is so that the source file can tell whether it is being\n      # built for inclusion in a dll (and should export symbols for example).\n      # Although the cygwin gcc ignores -fPIC, still need this for old-style\n      # (--disable-auto-import) libraries\n      m4_if([$1], [GCJ], [],\n\t[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])\n      ;;\n    darwin* | rhapsody*)\n      # PIC is the default on this platform\n      # Common symbols not allowed in MH_DYLIB files\n      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'\n      ;;\n    *djgpp*)\n      # DJGPP does not support shared libraries at all\n      _LT_TAGVAR(lt_prog_compiler_pic, $1)=\n      ;;\n    haiku*)\n      # PIC is the default for Haiku.\n      # The \"-static\" flag exists, but is broken.\n      _LT_TAGVAR(lt_prog_compiler_static, $1)=\n      ;;\n    interix[[3-9]]*)\n      # Interix 3.x gcc -fpic/-fPIC options generate broken code.\n      # Instead, we relocate shared libraries at runtime.\n      ;;\n    sysv4*MP*)\n      if test -d /usr/nec; then\n\t_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic\n      fi\n      ;;\n    hpux*)\n      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit\n      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag\n      # sets the default TLS model and affects inlining.\n      case $host_cpu in\n      hppa*64*)\n\t;;\n      *)\n\t_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'\n\t;;\n      esac\n      ;;\n    *qnx* | *nto*)\n      # QNX uses GNU C++, but need to define -shared option too, otherwise\n      # it will coredump.\n      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'\n      ;;\n    *)\n      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'\n      ;;\n    esac\n  else\n    case $host_os in\n      aix[[4-9]]*)\n\t# All AIX code is PIC.\n\tif test \"$host_cpu\" = ia64; then\n\t  # AIX 5 now supports IA64 processor\n\t  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'\n\telse\n\t  _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'\n\tfi\n\t;;\n      chorus*)\n\tcase $cc_basename in\n\tcxch68*)\n\t  # Green Hills C++ Compiler\n\t  # _LT_TAGVAR(lt_prog_compiler_static, $1)=\"--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a\"\n\t  ;;\n\tesac\n\t;;\n      mingw* | cygwin* | os2* | pw32* | cegcc*)\n\t# This hack is so that the source file can tell whether it is being\n\t# built for inclusion in a dll (and should export symbols for example).\n\tm4_if([$1], [GCJ], [],\n\t  [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])\n\t;;\n      dgux*)\n\tcase $cc_basename in\n\t  ec++*)\n\t    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'\n\t    ;;\n\t  ghcx*)\n\t    # Green Hills C++ Compiler\n\t    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'\n\t    ;;\n\t  *)\n\t    ;;\n\tesac\n\t;;\n      freebsd* | dragonfly*)\n\t# FreeBSD uses GNU C++\n\t;;\n      hpux9* | hpux10* | hpux11*)\n\tcase $cc_basename in\n\t  CC*)\n\t    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'\n\t    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'\n\t    if test \"$host_cpu\" != ia64; then\n\t      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'\n\t    fi\n\t    ;;\n\t  aCC*)\n\t    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'\n\t    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'\n\t    case $host_cpu in\n\t    hppa*64*|ia64*)\n\t      # +Z the default\n\t      ;;\n\t    *)\n\t      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'\n\t      ;;\n\t    esac\n\t    ;;\n\t  *)\n\t    ;;\n\tesac\n\t;;\n      interix*)\n\t# This is c89, which is MS Visual C++ (no shared libs)\n\t# Anyone wants to do a port?\n\t;;\n      irix5* | irix6* | nonstopux*)\n\tcase $cc_basename in\n\t  CC*)\n\t    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'\n\t    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'\n\t    # CC pic flag -KPIC is the default.\n\t    ;;\n\t  *)\n\t    ;;\n\tesac\n\t;;\n      linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)\n\tcase $cc_basename in\n\t  KCC*)\n\t    # KAI C++ Compiler\n\t    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'\n\t    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'\n\t    ;;\n\t  ecpc* )\n\t    # old Intel C++ for x86_64 which still supported -KPIC.\n\t    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'\n\t    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'\n\t    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'\n\t    ;;\n\t  icpc* )\n\t    # Intel C++, used to be incompatible with GCC.\n\t    # ICC 10 doesn't accept -KPIC any more.\n\t    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'\n\t    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'\n\t    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'\n\t    ;;\n\t  pgCC* | pgcpp*)\n\t    # Portland Group C++ compiler\n\t    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'\n\t    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'\n\t    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'\n\t    ;;\n\t  cxx*)\n\t    # Compaq C++\n\t    # Make sure the PIC flag is empty.  It appears that all Alpha\n\t    # Linux and Compaq Tru64 Unix objects are PIC.\n\t    _LT_TAGVAR(lt_prog_compiler_pic, $1)=\n\t    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'\n\t    ;;\n\t  xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)\n\t    # IBM XL 8.0, 9.0 on PPC and BlueGene\n\t    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'\n\t    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'\n\t    _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'\n\t    ;;\n\t  *)\n\t    case `$CC -V 2>&1 | sed 5q` in\n\t    *Sun\\ C*)\n\t      # Sun C++ 5.9\n\t      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'\n\t      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'\n\t      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '\n\t      ;;\n\t    esac\n\t    ;;\n\tesac\n\t;;\n      lynxos*)\n\t;;\n      m88k*)\n\t;;\n      mvs*)\n\tcase $cc_basename in\n\t  cxx*)\n\t    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'\n\t    ;;\n\t  *)\n\t    ;;\n\tesac\n\t;;\n      netbsd* | netbsdelf*-gnu)\n\t;;\n      *qnx* | *nto*)\n        # QNX uses GNU C++, but need to define -shared option too, otherwise\n        # it will coredump.\n        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'\n        ;;\n      osf3* | osf4* | osf5*)\n\tcase $cc_basename in\n\t  KCC*)\n\t    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'\n\t    ;;\n\t  RCC*)\n\t    # Rational C++ 2.4.1\n\t    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'\n\t    ;;\n\t  cxx*)\n\t    # Digital/Compaq C++\n\t    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'\n\t    # Make sure the PIC flag is empty.  It appears that all Alpha\n\t    # Linux and Compaq Tru64 Unix objects are PIC.\n\t    _LT_TAGVAR(lt_prog_compiler_pic, $1)=\n\t    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'\n\t    ;;\n\t  *)\n\t    ;;\n\tesac\n\t;;\n      psos*)\n\t;;\n      solaris*)\n\tcase $cc_basename in\n\t  CC* | sunCC*)\n\t    # Sun C++ 4.2, 5.x and Centerline C++\n\t    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'\n\t    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'\n\t    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '\n\t    ;;\n\t  gcx*)\n\t    # Green Hills C++ Compiler\n\t    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'\n\t    ;;\n\t  *)\n\t    ;;\n\tesac\n\t;;\n      sunos4*)\n\tcase $cc_basename in\n\t  CC*)\n\t    # Sun C++ 4.x\n\t    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'\n\t    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'\n\t    ;;\n\t  lcc*)\n\t    # Lucid\n\t    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'\n\t    ;;\n\t  *)\n\t    ;;\n\tesac\n\t;;\n      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)\n\tcase $cc_basename in\n\t  CC*)\n\t    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'\n\t    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'\n\t    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'\n\t    ;;\n\tesac\n\t;;\n      tandem*)\n\tcase $cc_basename in\n\t  NCC*)\n\t    # NonStop-UX NCC 3.20\n\t    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'\n\t    ;;\n\t  *)\n\t    ;;\n\tesac\n\t;;\n      vxworks*)\n\t;;\n      *)\n\t_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no\n\t;;\n    esac\n  fi\n],\n[\n  if test \"$GCC\" = yes; then\n    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'\n    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'\n\n    case $host_os in\n      aix*)\n      # All AIX code is PIC.\n      if test \"$host_cpu\" = ia64; then\n\t# AIX 5 now supports IA64 processor\n\t_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'\n      fi\n      ;;\n\n    amigaos*)\n      case $host_cpu in\n      powerpc)\n            # see comment about AmigaOS4 .so support\n            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'\n        ;;\n      m68k)\n            # FIXME: we need at least 68020 code to build shared libraries, but\n            # adding the `-m68020' flag to GCC prevents building anything better,\n            # like `-m68040'.\n            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'\n        ;;\n      esac\n      ;;\n\n    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)\n      # PIC is the default for these OSes.\n      ;;\n\n    mingw* | cygwin* | pw32* | os2* | cegcc*)\n      # This hack is so that the source file can tell whether it is being\n      # built for inclusion in a dll (and should export symbols for example).\n      # Although the cygwin gcc ignores -fPIC, still need this for old-style\n      # (--disable-auto-import) libraries\n      m4_if([$1], [GCJ], [],\n\t[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])\n      ;;\n\n    darwin* | rhapsody*)\n      # PIC is the default on this platform\n      # Common symbols not allowed in MH_DYLIB files\n      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'\n      ;;\n\n    haiku*)\n      # PIC is the default for Haiku.\n      # The \"-static\" flag exists, but is broken.\n      _LT_TAGVAR(lt_prog_compiler_static, $1)=\n      ;;\n\n    hpux*)\n      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit\n      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag\n      # sets the default TLS model and affects inlining.\n      case $host_cpu in\n      hppa*64*)\n\t# +Z the default\n\t;;\n      *)\n\t_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'\n\t;;\n      esac\n      ;;\n\n    interix[[3-9]]*)\n      # Interix 3.x gcc -fpic/-fPIC options generate broken code.\n      # Instead, we relocate shared libraries at runtime.\n      ;;\n\n    msdosdjgpp*)\n      # Just because we use GCC doesn't mean we suddenly get shared libraries\n      # on systems that don't support them.\n      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no\n      enable_shared=no\n      ;;\n\n    *nto* | *qnx*)\n      # QNX uses GNU C++, but need to define -shared option too, otherwise\n      # it will coredump.\n      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'\n      ;;\n\n    sysv4*MP*)\n      if test -d /usr/nec; then\n\t_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic\n      fi\n      ;;\n\n    *)\n      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'\n      ;;\n    esac\n\n    case $cc_basename in\n    nvcc*) # Cuda Compiler Driver 2.2\n      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '\n      if test -n \"$_LT_TAGVAR(lt_prog_compiler_pic, $1)\"; then\n        _LT_TAGVAR(lt_prog_compiler_pic, $1)=\"-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)\"\n      fi\n      ;;\n    esac\n  else\n    # PORTME Check for flag to pass linker flags through the system compiler.\n    case $host_os in\n    aix*)\n      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'\n      if test \"$host_cpu\" = ia64; then\n\t# AIX 5 now supports IA64 processor\n\t_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'\n      else\n\t_LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'\n      fi\n      ;;\n\n    mingw* | cygwin* | pw32* | os2* | cegcc*)\n      # This hack is so that the source file can tell whether it is being\n      # built for inclusion in a dll (and should export symbols for example).\n      m4_if([$1], [GCJ], [],\n\t[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])\n      ;;\n\n    hpux9* | hpux10* | hpux11*)\n      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'\n      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but\n      # not for PA HP-UX.\n      case $host_cpu in\n      hppa*64*|ia64*)\n\t# +Z the default\n\t;;\n      *)\n\t_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'\n\t;;\n      esac\n      # Is there a better lt_prog_compiler_static that works with the bundled CC?\n      _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'\n      ;;\n\n    irix5* | irix6* | nonstopux*)\n      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'\n      # PIC (with -KPIC) is the default.\n      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'\n      ;;\n\n    linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)\n      case $cc_basename in\n      # old Intel for x86_64 which still supported -KPIC.\n      ecc*)\n\t_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'\n\t_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'\n\t_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'\n        ;;\n      # icc used to be incompatible with GCC.\n      # ICC 10 doesn't accept -KPIC any more.\n      icc* | ifort*)\n\t_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'\n\t_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'\n\t_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'\n        ;;\n      # Lahey Fortran 8.1.\n      lf95*)\n\t_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'\n\t_LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'\n\t_LT_TAGVAR(lt_prog_compiler_static, $1)='--static'\n\t;;\n      nagfor*)\n\t# NAG Fortran compiler\n\t_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'\n\t_LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'\n\t_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'\n\t;;\n      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)\n        # Portland Group compilers (*not* the Pentium gcc compiler,\n\t# which looks to be a dead project)\n\t_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'\n\t_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'\n\t_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'\n        ;;\n      ccc*)\n        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'\n        # All Alpha code is PIC.\n        _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'\n        ;;\n      xl* | bgxl* | bgf* | mpixl*)\n\t# IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene\n\t_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'\n\t_LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'\n\t_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'\n\t;;\n      *)\n\tcase `$CC -V 2>&1 | sed 5q` in\n\t*Sun\\ Ceres\\ Fortran* | *Sun*Fortran*\\ [[1-7]].* | *Sun*Fortran*\\ 8.[[0-3]]*)\n\t  # Sun Fortran 8.3 passes all unrecognized flags to the linker\n\t  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'\n\t  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'\n\t  _LT_TAGVAR(lt_prog_compiler_wl, $1)=''\n\t  ;;\n\t*Sun\\ F* | *Sun*Fortran*)\n\t  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'\n\t  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'\n\t  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '\n\t  ;;\n\t*Sun\\ C*)\n\t  # Sun C 5.9\n\t  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'\n\t  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'\n\t  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'\n\t  ;;\n        *Intel*\\ [[CF]]*Compiler*)\n\t  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'\n\t  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'\n\t  _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'\n\t  ;;\n\t*Portland\\ Group*)\n\t  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'\n\t  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'\n\t  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'\n\t  ;;\n\tesac\n\t;;\n      esac\n      ;;\n\n    newsos6)\n      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'\n      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'\n      ;;\n\n    *nto* | *qnx*)\n      # QNX uses GNU C++, but need to define -shared option too, otherwise\n      # it will coredump.\n      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'\n      ;;\n\n    osf3* | osf4* | osf5*)\n      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'\n      # All OSF/1 code is PIC.\n      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'\n      ;;\n\n    rdos*)\n      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'\n      ;;\n\n    solaris*)\n      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'\n      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'\n      case $cc_basename in\n      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)\n\t_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;\n      *)\n\t_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;\n      esac\n      ;;\n\n    sunos4*)\n      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '\n      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'\n      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'\n      ;;\n\n    sysv4 | sysv4.2uw2* | sysv4.3*)\n      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'\n      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'\n      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'\n      ;;\n\n    sysv4*MP*)\n      if test -d /usr/nec ;then\n\t_LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'\n\t_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'\n      fi\n      ;;\n\n    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)\n      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'\n      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'\n      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'\n      ;;\n\n    unicos*)\n      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'\n      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no\n      ;;\n\n    uts4*)\n      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'\n      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'\n      ;;\n\n    *)\n      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no\n      ;;\n    esac\n  fi\n])\ncase $host_os in\n  # For platforms which do not support PIC, -DPIC is meaningless:\n  *djgpp*)\n    _LT_TAGVAR(lt_prog_compiler_pic, $1)=\n    ;;\n  *)\n    _LT_TAGVAR(lt_prog_compiler_pic, $1)=\"$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])\"\n    ;;\nesac\n\nAC_CACHE_CHECK([for $compiler option to produce PIC],\n  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],\n  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])\n_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)\n\n#\n# Check to make sure the PIC flag actually works.\n#\nif test -n \"$_LT_TAGVAR(lt_prog_compiler_pic, $1)\"; then\n  _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],\n    [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],\n    [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],\n    [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in\n     \"\" | \" \"*) ;;\n     *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=\" $_LT_TAGVAR(lt_prog_compiler_pic, $1)\" ;;\n     esac],\n    [_LT_TAGVAR(lt_prog_compiler_pic, $1)=\n     _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])\nfi\n_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],\n\t[Additional compiler flags for building library objects])\n\n_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],\n\t[How to pass a linker flag through the compiler])\n#\n# Check to make sure the static flag actually works.\n#\nwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\\\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\\\"\n_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],\n  _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),\n  $lt_tmp_static_flag,\n  [],\n  [_LT_TAGVAR(lt_prog_compiler_static, $1)=])\n_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],\n\t[Compiler flag to prevent dynamic linking])\n])# _LT_COMPILER_PIC\n\n\n# _LT_LINKER_SHLIBS([TAGNAME])\n# ----------------------------\n# See if the linker supports building shared libraries.\nm4_defun([_LT_LINKER_SHLIBS],\n[AC_REQUIRE([LT_PATH_LD])dnl\nAC_REQUIRE([LT_PATH_NM])dnl\nm4_require([_LT_PATH_MANIFEST_TOOL])dnl\nm4_require([_LT_FILEUTILS_DEFAULTS])dnl\nm4_require([_LT_DECL_EGREP])dnl\nm4_require([_LT_DECL_SED])dnl\nm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl\nm4_require([_LT_TAG_COMPILER])dnl\nAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])\nm4_if([$1], [CXX], [\n  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\\''s/.* //'\\'' | sort | uniq > $export_symbols'\n  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']\n  case $host_os in\n  aix[[4-9]]*)\n    # If we're using GNU nm, then we don't want the \"-C\" option.\n    # -C means demangle to AIX nm, but means don't demangle with GNU nm\n    # Also, AIX nm treats weak defined symbols like other global defined\n    # symbols, whereas GNU nm marks them as \"W\".\n    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then\n      _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\\''{ if (((\\$ 2 == \"T\") || (\\$ 2 == \"D\") || (\\$ 2 == \"B\") || (\\$ 2 == \"W\")) && ([substr](\\$ 3,1,1) != \".\")) { print \\$ 3 } }'\\'' | sort -u > $export_symbols'\n    else\n      _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\\''{ if (((\\$ 2 == \"T\") || (\\$ 2 == \"D\") || (\\$ 2 == \"B\")) && ([substr](\\$ 3,1,1) != \".\")) { print \\$ 3 } }'\\'' | sort -u > $export_symbols'\n    fi\n    ;;\n  pw32*)\n    _LT_TAGVAR(export_symbols_cmds, $1)=\"$ltdll_cmds\"\n    ;;\n  cygwin* | mingw* | cegcc*)\n    case $cc_basename in\n    cl*)\n      _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'\n      ;;\n    *)\n      _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\\([[^ ]]*\\)/\\1 DATA/;s/^.*[[ ]]__nm__\\([[^ ]]*\\)[[ ]][[^ ]]*/\\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\\'' | sort | uniq > $export_symbols'\n      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']\n      ;;\n    esac\n    ;;\n  linux* | k*bsd*-gnu | gnu*)\n    _LT_TAGVAR(link_all_deplibs, $1)=no\n    ;;\n  *)\n    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\\''s/.* //'\\'' | sort | uniq > $export_symbols'\n    ;;\n  esac\n], [\n  runpath_var=\n  _LT_TAGVAR(allow_undefined_flag, $1)=\n  _LT_TAGVAR(always_export_symbols, $1)=no\n  _LT_TAGVAR(archive_cmds, $1)=\n  _LT_TAGVAR(archive_expsym_cmds, $1)=\n  _LT_TAGVAR(compiler_needs_object, $1)=no\n  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no\n  _LT_TAGVAR(export_dynamic_flag_spec, $1)=\n  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\\''s/.* //'\\'' | sort | uniq > $export_symbols'\n  _LT_TAGVAR(hardcode_automatic, $1)=no\n  _LT_TAGVAR(hardcode_direct, $1)=no\n  _LT_TAGVAR(hardcode_direct_absolute, $1)=no\n  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=\n  _LT_TAGVAR(hardcode_libdir_separator, $1)=\n  _LT_TAGVAR(hardcode_minus_L, $1)=no\n  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported\n  _LT_TAGVAR(inherit_rpath, $1)=no\n  _LT_TAGVAR(link_all_deplibs, $1)=unknown\n  _LT_TAGVAR(module_cmds, $1)=\n  _LT_TAGVAR(module_expsym_cmds, $1)=\n  _LT_TAGVAR(old_archive_from_new_cmds, $1)=\n  _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=\n  _LT_TAGVAR(thread_safe_flag_spec, $1)=\n  _LT_TAGVAR(whole_archive_flag_spec, $1)=\n  # include_expsyms should be a list of space-separated symbols to be *always*\n  # included in the symbol list\n  _LT_TAGVAR(include_expsyms, $1)=\n  # exclude_expsyms can be an extended regexp of symbols to exclude\n  # it will be wrapped by ` (' and `)$', so one must not match beginning or\n  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',\n  # as well as any symbol that contains `d'.\n  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']\n  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out\n  # platforms (ab)use it in PIC code, but their linkers get confused if\n  # the symbol is explicitly referenced.  Since portable code cannot\n  # rely on this symbol name, it's probably fine to never include it in\n  # preloaded symbol tables.\n  # Exclude shared library initialization/finalization symbols.\ndnl Note also adjust exclude_expsyms for C++ above.\n  extract_expsyms_cmds=\n\n  case $host_os in\n  cygwin* | mingw* | pw32* | cegcc*)\n    # FIXME: the MSVC++ port hasn't been tested in a loooong time\n    # When not using gcc, we currently assume that we are using\n    # Microsoft Visual C++.\n    if test \"$GCC\" != yes; then\n      with_gnu_ld=no\n    fi\n    ;;\n  interix*)\n    # we just hope/assume this is gcc and not c89 (= MSVC++)\n    with_gnu_ld=yes\n    ;;\n  openbsd*)\n    with_gnu_ld=no\n    ;;\n  linux* | k*bsd*-gnu | gnu*)\n    _LT_TAGVAR(link_all_deplibs, $1)=no\n    ;;\n  esac\n\n  _LT_TAGVAR(ld_shlibs, $1)=yes\n\n  # On some targets, GNU ld is compatible enough with the native linker\n  # that we're better off using the native interface for both.\n  lt_use_gnu_ld_interface=no\n  if test \"$with_gnu_ld\" = yes; then\n    case $host_os in\n      aix*)\n\t# The AIX port of GNU ld has always aspired to compatibility\n\t# with the native linker.  However, as the warning in the GNU ld\n\t# block says, versions before 2.19.5* couldn't really create working\n\t# shared libraries, regardless of the interface used.\n\tcase `$LD -v 2>&1` in\n\t  *\\ \\(GNU\\ Binutils\\)\\ 2.19.5*) ;;\n\t  *\\ \\(GNU\\ Binutils\\)\\ 2.[[2-9]]*) ;;\n\t  *\\ \\(GNU\\ Binutils\\)\\ [[3-9]]*) ;;\n\t  *)\n\t    lt_use_gnu_ld_interface=yes\n\t    ;;\n\tesac\n\t;;\n      *)\n\tlt_use_gnu_ld_interface=yes\n\t;;\n    esac\n  fi\n\n  if test \"$lt_use_gnu_ld_interface\" = yes; then\n    # If archive_cmds runs LD, not CC, wlarc should be empty\n    wlarc='${wl}'\n\n    # Set some defaults for GNU ld with shared library support. These\n    # are reset later if shared libraries are not supported. Putting them\n    # here allows them to be overridden if necessary.\n    runpath_var=LD_RUN_PATH\n    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'\n    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'\n    # ancient GNU ld didn't support --whole-archive et. al.\n    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then\n      _LT_TAGVAR(whole_archive_flag_spec, $1)=\"$wlarc\"'--whole-archive$convenience '\"$wlarc\"'--no-whole-archive'\n    else\n      _LT_TAGVAR(whole_archive_flag_spec, $1)=\n    fi\n    supports_anon_versioning=no\n    case `$LD -v 2>&1` in\n      *GNU\\ gold*) supports_anon_versioning=yes ;;\n      *\\ [[01]].* | *\\ 2.[[0-9]].* | *\\ 2.10.*) ;; # catch versions < 2.11\n      *\\ 2.11.93.0.2\\ *) supports_anon_versioning=yes ;; # RH7.3 ...\n      *\\ 2.11.92.0.12\\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...\n      *\\ 2.11.*) ;; # other 2.11 versions\n      *) supports_anon_versioning=yes ;;\n    esac\n\n    # See if GNU ld supports shared libraries.\n    case $host_os in\n    aix[[3-9]]*)\n      # On AIX/PPC, the GNU linker is very broken\n      if test \"$host_cpu\" != ia64; then\n\t_LT_TAGVAR(ld_shlibs, $1)=no\n\tcat <<_LT_EOF 1>&2\n\n*** Warning: the GNU linker, at least up to release 2.19, is reported\n*** to be unable to reliably create shared libraries on AIX.\n*** Therefore, libtool is disabling shared libraries support.  If you\n*** really care for shared libraries, you may want to install binutils\n*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.\n*** You will then need to restart the configuration process.\n\n_LT_EOF\n      fi\n      ;;\n\n    amigaos*)\n      case $host_cpu in\n      powerpc)\n            # see comment about AmigaOS4 .so support\n            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'\n            _LT_TAGVAR(archive_expsym_cmds, $1)=''\n        ;;\n      m68k)\n            _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO \"#define NAME $libname\" > $output_objdir/a2ixlibrary.data~$ECHO \"#define LIBRARY_ID 1\" >> $output_objdir/a2ixlibrary.data~$ECHO \"#define VERSION $major\" >> $output_objdir/a2ixlibrary.data~$ECHO \"#define REVISION $revision\" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'\n            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'\n            _LT_TAGVAR(hardcode_minus_L, $1)=yes\n        ;;\n      esac\n      ;;\n\n    beos*)\n      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then\n\t_LT_TAGVAR(allow_undefined_flag, $1)=unsupported\n\t# Joseph Beckenbach <jrb3@best.com> says some releases of gcc\n\t# support --undefined.  This deserves some investigation.  FIXME\n\t_LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'\n      else\n\t_LT_TAGVAR(ld_shlibs, $1)=no\n      fi\n      ;;\n\n    cygwin* | mingw* | pw32* | cegcc*)\n      # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,\n      # as there is no search path for DLLs.\n      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'\n      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'\n      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported\n      _LT_TAGVAR(always_export_symbols, $1)=no\n      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes\n      _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\\([[^ ]]*\\)/\\1 DATA/;s/^.*[[ ]]__nm__\\([[^ ]]*\\)[[ ]][[^ ]]*/\\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\\'' | sort | uniq > $export_symbols'\n      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']\n\n      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then\n        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'\n\t# If the export-symbols file already is a .def file (1st line\n\t# is EXPORTS), use it as is; otherwise, prepend...\n\t_LT_TAGVAR(archive_expsym_cmds, $1)='if test \"x`$SED 1q $export_symbols`\" = xEXPORTS; then\n\t  cp $export_symbols $output_objdir/$soname.def;\n\telse\n\t  echo EXPORTS > $output_objdir/$soname.def;\n\t  cat $export_symbols >> $output_objdir/$soname.def;\n\tfi~\n\t$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'\n      else\n\t_LT_TAGVAR(ld_shlibs, $1)=no\n      fi\n      ;;\n\n    haiku*)\n      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'\n      _LT_TAGVAR(link_all_deplibs, $1)=yes\n      ;;\n\n    interix[[3-9]]*)\n      _LT_TAGVAR(hardcode_direct, $1)=no\n      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no\n      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'\n      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'\n      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.\n      # Instead, shared libraries are loaded at an image base (0x10000000 by\n      # default) and relocated if they conflict, which is a slow very memory\n      # consuming and fragmenting process.  To avoid this, we pick a random,\n      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link\n      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.\n      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \\* 262144 + 1342177280` -o $lib'\n      _LT_TAGVAR(archive_expsym_cmds, $1)='sed \"s,^,_,\" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \\* 262144 + 1342177280` -o $lib'\n      ;;\n\n    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)\n      tmp_diet=no\n      if test \"$host_os\" = linux-dietlibc; then\n\tcase $cc_basename in\n\t  diet\\ *) tmp_diet=yes;;\t# linux-dietlibc with static linking (!diet-dyn)\n\tesac\n      fi\n      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \\\n\t && test \"$tmp_diet\" = no\n      then\n\ttmp_addflag=' $pic_flag'\n\ttmp_sharedflag='-shared'\n\tcase $cc_basename,$host_cpu in\n        pgcc*)\t\t\t\t# Portland Group C compiler\n\t  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\\\"\\\"; do test  -n \\\"$conv\\\" && new_convenience=\\\"$new_convenience,$conv\\\"; done; func_echo_all \\\"$new_convenience\\\"` ${wl}--no-whole-archive'\n\t  tmp_addflag=' $pic_flag'\n\t  ;;\n\tpgf77* | pgf90* | pgf95* | pgfortran*)\n\t\t\t\t\t# Portland Group f77 and f90 compilers\n\t  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\\\"\\\"; do test  -n \\\"$conv\\\" && new_convenience=\\\"$new_convenience,$conv\\\"; done; func_echo_all \\\"$new_convenience\\\"` ${wl}--no-whole-archive'\n\t  tmp_addflag=' $pic_flag -Mnomain' ;;\n\tecc*,ia64* | icc*,ia64*)\t# Intel C compiler on ia64\n\t  tmp_addflag=' -i_dynamic' ;;\n\tefc*,ia64* | ifort*,ia64*)\t# Intel Fortran compiler on ia64\n\t  tmp_addflag=' -i_dynamic -nofor_main' ;;\n\tifc* | ifort*)\t\t\t# Intel Fortran compiler\n\t  tmp_addflag=' -nofor_main' ;;\n\tlf95*)\t\t\t\t# Lahey Fortran 8.1\n\t  _LT_TAGVAR(whole_archive_flag_spec, $1)=\n\t  tmp_sharedflag='--shared' ;;\n\txl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)\n\t  tmp_sharedflag='-qmkshrobj'\n\t  tmp_addflag= ;;\n\tnvcc*)\t# Cuda Compiler Driver 2.2\n\t  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\\\"\\\"; do test  -n \\\"$conv\\\" && new_convenience=\\\"$new_convenience,$conv\\\"; done; func_echo_all \\\"$new_convenience\\\"` ${wl}--no-whole-archive'\n\t  _LT_TAGVAR(compiler_needs_object, $1)=yes\n\t  ;;\n\tesac\n\tcase `$CC -V 2>&1 | sed 5q` in\n\t*Sun\\ C*)\t\t\t# Sun C 5.9\n\t  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\\\"\\\"; do test -z \\\"$conv\\\" || new_convenience=\\\"$new_convenience,$conv\\\"; done; func_echo_all \\\"$new_convenience\\\"` ${wl}--no-whole-archive'\n\t  _LT_TAGVAR(compiler_needs_object, $1)=yes\n\t  tmp_sharedflag='-G' ;;\n\t*Sun\\ F*)\t\t\t# Sun Fortran 8.3\n\t  tmp_sharedflag='-G' ;;\n\tesac\n\t_LT_TAGVAR(archive_cmds, $1)='$CC '\"$tmp_sharedflag\"\"$tmp_addflag\"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'\n\n        if test \"x$supports_anon_versioning\" = xyes; then\n          _LT_TAGVAR(archive_expsym_cmds, $1)='echo \"{ global:\" > $output_objdir/$libname.ver~\n\t    cat $export_symbols | sed -e \"s/\\(.*\\)/\\1;/\" >> $output_objdir/$libname.ver~\n\t    echo \"local: *; };\" >> $output_objdir/$libname.ver~\n\t    $CC '\"$tmp_sharedflag\"\"$tmp_addflag\"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'\n        fi\n\n\tcase $cc_basename in\n\txlf* | bgf* | bgxlf* | mpixlf*)\n\t  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself\n\t  _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'\n\t  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'\n\t  _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'\n\t  if test \"x$supports_anon_versioning\" = xyes; then\n\t    _LT_TAGVAR(archive_expsym_cmds, $1)='echo \"{ global:\" > $output_objdir/$libname.ver~\n\t      cat $export_symbols | sed -e \"s/\\(.*\\)/\\1;/\" >> $output_objdir/$libname.ver~\n\t      echo \"local: *; };\" >> $output_objdir/$libname.ver~\n\t      $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'\n\t  fi\n\t  ;;\n\tesac\n      else\n        _LT_TAGVAR(ld_shlibs, $1)=no\n      fi\n      ;;\n\n    netbsd* | netbsdelf*-gnu)\n      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then\n\t_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'\n\twlarc=\n      else\n\t_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'\n\t_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'\n      fi\n      ;;\n\n    solaris*)\n      if $LD -v 2>&1 | $GREP 'BFD 2\\.8' > /dev/null; then\n\t_LT_TAGVAR(ld_shlibs, $1)=no\n\tcat <<_LT_EOF 1>&2\n\n*** Warning: The releases 2.8.* of the GNU linker cannot reliably\n*** create shared libraries on Solaris systems.  Therefore, libtool\n*** is disabling shared libraries support.  We urge you to upgrade GNU\n*** binutils to release 2.9.1 or newer.  Another option is to modify\n*** your PATH or compiler configuration so that the native linker is\n*** used, and then restart.\n\n_LT_EOF\n      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then\n\t_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'\n\t_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'\n      else\n\t_LT_TAGVAR(ld_shlibs, $1)=no\n      fi\n      ;;\n\n    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)\n      case `$LD -v 2>&1` in\n        *\\ [[01]].* | *\\ 2.[[0-9]].* | *\\ 2.1[[0-5]].*)\n\t_LT_TAGVAR(ld_shlibs, $1)=no\n\tcat <<_LT_EOF 1>&2\n\n*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not\n*** reliably create shared libraries on SCO systems.  Therefore, libtool\n*** is disabling shared libraries support.  We urge you to upgrade GNU\n*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify\n*** your PATH or compiler configuration so that the native linker is\n*** used, and then restart.\n\n_LT_EOF\n\t;;\n\t*)\n\t  # For security reasons, it is highly recommended that you always\n\t  # use absolute paths for naming shared libraries, and exclude the\n\t  # DT_RUNPATH tag from executables and libraries.  But doing so\n\t  # requires that you compile everything twice, which is a pain.\n\t  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then\n\t    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'\n\t    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'\n\t    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'\n\t  else\n\t    _LT_TAGVAR(ld_shlibs, $1)=no\n\t  fi\n\t;;\n      esac\n      ;;\n\n    sunos4*)\n      _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'\n      wlarc=\n      _LT_TAGVAR(hardcode_direct, $1)=yes\n      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no\n      ;;\n\n    *)\n      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then\n\t_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'\n\t_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'\n      else\n\t_LT_TAGVAR(ld_shlibs, $1)=no\n      fi\n      ;;\n    esac\n\n    if test \"$_LT_TAGVAR(ld_shlibs, $1)\" = no; then\n      runpath_var=\n      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=\n      _LT_TAGVAR(export_dynamic_flag_spec, $1)=\n      _LT_TAGVAR(whole_archive_flag_spec, $1)=\n    fi\n  else\n    # PORTME fill in a description of your system's linker (not GNU ld)\n    case $host_os in\n    aix3*)\n      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported\n      _LT_TAGVAR(always_export_symbols, $1)=yes\n      _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'\n      # Note: this linker hardcodes the directories in LIBPATH if there\n      # are no directories specified by -L.\n      _LT_TAGVAR(hardcode_minus_L, $1)=yes\n      if test \"$GCC\" = yes && test -z \"$lt_prog_compiler_static\"; then\n\t# Neither direct hardcoding nor static linking is supported with a\n\t# broken collect2.\n\t_LT_TAGVAR(hardcode_direct, $1)=unsupported\n      fi\n      ;;\n\n    aix[[4-9]]*)\n      if test \"$host_cpu\" = ia64; then\n\t# On IA64, the linker does run time linking by default, so we don't\n\t# have to do anything special.\n\taix_use_runtimelinking=no\n\texp_sym_flag='-Bexport'\n\tno_entry_flag=\"\"\n      else\n\t# If we're using GNU nm, then we don't want the \"-C\" option.\n\t# -C means demangle to AIX nm, but means don't demangle with GNU nm\n\t# Also, AIX nm treats weak defined symbols like other global\n\t# defined symbols, whereas GNU nm marks them as \"W\".\n\tif $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then\n\t  _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\\''{ if (((\\$ 2 == \"T\") || (\\$ 2 == \"D\") || (\\$ 2 == \"B\") || (\\$ 2 == \"W\")) && ([substr](\\$ 3,1,1) != \".\")) { print \\$ 3 } }'\\'' | sort -u > $export_symbols'\n\telse\n\t  _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\\''{ if (((\\$ 2 == \"T\") || (\\$ 2 == \"D\") || (\\$ 2 == \"B\")) && ([substr](\\$ 3,1,1) != \".\")) { print \\$ 3 } }'\\'' | sort -u > $export_symbols'\n\tfi\n\taix_use_runtimelinking=no\n\n\t# Test if we are trying to use run time linking or normal\n\t# AIX style linking. If -brtl is somewhere in LDFLAGS, we\n\t# need to do runtime linking.\n\tcase $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)\n\t  for ld_flag in $LDFLAGS; do\n\t  if (test $ld_flag = \"-brtl\" || test $ld_flag = \"-Wl,-brtl\"); then\n\t    aix_use_runtimelinking=yes\n\t    break\n\t  fi\n\t  done\n\t  ;;\n\tesac\n\n\texp_sym_flag='-bexport'\n\tno_entry_flag='-bnoentry'\n      fi\n\n      # When large executables or shared objects are built, AIX ld can\n      # have problems creating the table of contents.  If linking a library\n      # or program results in \"error TOC overflow\" add -mminimal-toc to\n      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not\n      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.\n\n      _LT_TAGVAR(archive_cmds, $1)=''\n      _LT_TAGVAR(hardcode_direct, $1)=yes\n      _LT_TAGVAR(hardcode_direct_absolute, $1)=yes\n      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'\n      _LT_TAGVAR(link_all_deplibs, $1)=yes\n      _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'\n\n      if test \"$GCC\" = yes; then\n\tcase $host_os in aix4.[[012]]|aix4.[[012]].*)\n\t# We only want to do this on AIX 4.2 and lower, the check\n\t# below for broken collect2 doesn't work under 4.3+\n\t  collect2name=`${CC} -print-prog-name=collect2`\n\t  if test -f \"$collect2name\" &&\n\t   strings \"$collect2name\" | $GREP resolve_lib_name >/dev/null\n\t  then\n\t  # We have reworked collect2\n\t  :\n\t  else\n\t  # We have old collect2\n\t  _LT_TAGVAR(hardcode_direct, $1)=unsupported\n\t  # It fails to find uninstalled libraries when the uninstalled\n\t  # path is not listed in the libpath.  Setting hardcode_minus_L\n\t  # to unsupported forces relinking\n\t  _LT_TAGVAR(hardcode_minus_L, $1)=yes\n\t  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'\n\t  _LT_TAGVAR(hardcode_libdir_separator, $1)=\n\t  fi\n\t  ;;\n\tesac\n\tshared_flag='-shared'\n\tif test \"$aix_use_runtimelinking\" = yes; then\n\t  shared_flag=\"$shared_flag \"'${wl}-G'\n\tfi\n\t_LT_TAGVAR(link_all_deplibs, $1)=no\n      else\n\t# not using gcc\n\tif test \"$host_cpu\" = ia64; then\n\t# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release\n\t# chokes on -Wl,-G. The following line is correct:\n\t  shared_flag='-G'\n\telse\n\t  if test \"$aix_use_runtimelinking\" = yes; then\n\t    shared_flag='${wl}-G'\n\t  else\n\t    shared_flag='${wl}-bM:SRE'\n\t  fi\n\tfi\n      fi\n\n      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'\n      # It seems that -bexpall does not export symbols beginning with\n      # underscore (_), so it is better to generate a list of symbols to export.\n      _LT_TAGVAR(always_export_symbols, $1)=yes\n      if test \"$aix_use_runtimelinking\" = yes; then\n\t# Warning - without using the other runtime loading flags (-brtl),\n\t# -berok will link without error, but may produce a broken library.\n\t_LT_TAGVAR(allow_undefined_flag, $1)='-berok'\n        # Determine the default libpath from the value encoded in an\n        # empty executable.\n        _LT_SYS_MODULE_PATH_AIX([$1])\n        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'\"$aix_libpath\"\n        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '\"\\${wl}$no_entry_flag\"' $compiler_flags `if test \"x${allow_undefined_flag}\" != \"x\"; then func_echo_all \"${wl}${allow_undefined_flag}\"; else :; fi` '\"\\${wl}$exp_sym_flag:\\$export_symbols $shared_flag\"\n      else\n\tif test \"$host_cpu\" = ia64; then\n\t  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'\n\t  _LT_TAGVAR(allow_undefined_flag, $1)=\"-z nodefs\"\n\t  _LT_TAGVAR(archive_expsym_cmds, $1)=\"\\$CC $shared_flag\"' -o $output_objdir/$soname $libobjs $deplibs '\"\\${wl}$no_entry_flag\"' $compiler_flags ${wl}${allow_undefined_flag} '\"\\${wl}$exp_sym_flag:\\$export_symbols\"\n\telse\n\t # Determine the default libpath from the value encoded in an\n\t # empty executable.\n\t _LT_SYS_MODULE_PATH_AIX([$1])\n\t _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'\"$aix_libpath\"\n\t  # Warning - without using the other run time loading flags,\n\t  # -berok will link without error, but may produce a broken library.\n\t  _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'\n\t  _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'\n\t  if test \"$with_gnu_ld\" = yes; then\n\t    # We only use this code for GNU lds that support --whole-archive.\n\t    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'\n\t  else\n\t    # Exported symbols can be pulled into shared objects from archives\n\t    _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'\n\t  fi\n\t  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes\n\t  # This is similar to how AIX traditionally builds its shared libraries.\n\t  _LT_TAGVAR(archive_expsym_cmds, $1)=\"\\$CC $shared_flag\"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'\n\tfi\n      fi\n      ;;\n\n    amigaos*)\n      case $host_cpu in\n      powerpc)\n            # see comment about AmigaOS4 .so support\n            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'\n            _LT_TAGVAR(archive_expsym_cmds, $1)=''\n        ;;\n      m68k)\n            _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO \"#define NAME $libname\" > $output_objdir/a2ixlibrary.data~$ECHO \"#define LIBRARY_ID 1\" >> $output_objdir/a2ixlibrary.data~$ECHO \"#define VERSION $major\" >> $output_objdir/a2ixlibrary.data~$ECHO \"#define REVISION $revision\" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'\n            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'\n            _LT_TAGVAR(hardcode_minus_L, $1)=yes\n        ;;\n      esac\n      ;;\n\n    bsdi[[45]]*)\n      _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic\n      ;;\n\n    cygwin* | mingw* | pw32* | cegcc*)\n      # When not using gcc, we currently assume that we are using\n      # Microsoft Visual C++.\n      # hardcode_libdir_flag_spec is actually meaningless, as there is\n      # no search path for DLLs.\n      case $cc_basename in\n      cl*)\n\t# Native MSVC\n\t_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '\n\t_LT_TAGVAR(allow_undefined_flag, $1)=unsupported\n\t_LT_TAGVAR(always_export_symbols, $1)=yes\n\t_LT_TAGVAR(file_list_spec, $1)='@'\n\t# Tell ltmain to make .lib files, not .a files.\n\tlibext=lib\n\t# Tell ltmain to make .dll files, not .so files.\n\tshrext_cmds=\".dll\"\n\t# FIXME: Setting linknames here is a bad hack.\n\t_LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='\n\t_LT_TAGVAR(archive_expsym_cmds, $1)='if test \"x`$SED 1q $export_symbols`\" = xEXPORTS; then\n\t    sed -n -e 's/\\\\\\\\\\\\\\(.*\\\\\\\\\\\\\\)/-link\\\\\\ -EXPORT:\\\\\\\\\\\\\\1/' -e '1\\\\\\!p' < $export_symbols > $output_objdir/$soname.exp;\n\t  else\n\t    sed -e 's/\\\\\\\\\\\\\\(.*\\\\\\\\\\\\\\)/-link\\\\\\ -EXPORT:\\\\\\\\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;\n\t  fi~\n\t  $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs \"@$tool_output_objdir$soname.exp\" -Wl,-DLL,-IMPLIB:\"$tool_output_objdir$libname.dll.lib\"~\n\t  linknames='\n\t# The linker will not automatically build a static lib if we build a DLL.\n\t# _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'\n\t_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes\n\t_LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'\n\t_LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\\([[^ ]]*\\)/\\1,DATA/'\\'' | $SED -e '\\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\\'' | sort | uniq > $export_symbols'\n\t# Don't use ranlib\n\t_LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'\n\t_LT_TAGVAR(postlink_cmds, $1)='lt_outputfile=\"@OUTPUT@\"~\n\t  lt_tool_outputfile=\"@TOOL_OUTPUT@\"~\n\t  case $lt_outputfile in\n\t    *.exe|*.EXE) ;;\n\t    *)\n\t      lt_outputfile=\"$lt_outputfile.exe\"\n\t      lt_tool_outputfile=\"$lt_tool_outputfile.exe\"\n\t      ;;\n\t  esac~\n\t  if test \"$MANIFEST_TOOL\" != \":\" && test -f \"$lt_outputfile.manifest\"; then\n\t    $MANIFEST_TOOL -manifest \"$lt_tool_outputfile.manifest\" -outputresource:\"$lt_tool_outputfile\" || exit 1;\n\t    $RM \"$lt_outputfile.manifest\";\n\t  fi'\n\t;;\n      *)\n\t# Assume MSVC wrapper\n\t_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '\n\t_LT_TAGVAR(allow_undefined_flag, $1)=unsupported\n\t# Tell ltmain to make .lib files, not .a files.\n\tlibext=lib\n\t# Tell ltmain to make .dll files, not .so files.\n\tshrext_cmds=\".dll\"\n\t# FIXME: Setting linknames here is a bad hack.\n\t_LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all \"$deplibs\" | $SED '\\''s/ -lc$//'\\''` -link -dll~linknames='\n\t# The linker will automatically build a .lib file if we build a DLL.\n\t_LT_TAGVAR(old_archive_from_new_cmds, $1)='true'\n\t# FIXME: Should let the user specify the lib program.\n\t_LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'\n\t_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes\n\t;;\n      esac\n      ;;\n\n    darwin* | rhapsody*)\n      _LT_DARWIN_LINKER_FEATURES($1)\n      ;;\n\n    dgux*)\n      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'\n      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'\n      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no\n      ;;\n\n    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor\n    # support.  Future versions do this automatically, but an explicit c++rt0.o\n    # does not break anything, and helps significantly (at the cost of a little\n    # extra space).\n    freebsd2.2*)\n      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'\n      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'\n      _LT_TAGVAR(hardcode_direct, $1)=yes\n      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no\n      ;;\n\n    # Unfortunately, older versions of FreeBSD 2 do not have this feature.\n    freebsd2.*)\n      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'\n      _LT_TAGVAR(hardcode_direct, $1)=yes\n      _LT_TAGVAR(hardcode_minus_L, $1)=yes\n      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no\n      ;;\n\n    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.\n    freebsd* | dragonfly*)\n      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'\n      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'\n      _LT_TAGVAR(hardcode_direct, $1)=yes\n      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no\n      ;;\n\n    hpux9*)\n      if test \"$GCC\" = yes; then\n\t_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'\n      else\n\t_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'\n      fi\n      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'\n      _LT_TAGVAR(hardcode_libdir_separator, $1)=:\n      _LT_TAGVAR(hardcode_direct, $1)=yes\n\n      # hardcode_minus_L: Not really in the search PATH,\n      # but as the default location of the library.\n      _LT_TAGVAR(hardcode_minus_L, $1)=yes\n      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'\n      ;;\n\n    hpux10*)\n      if test \"$GCC\" = yes && test \"$with_gnu_ld\" = no; then\n\t_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'\n      else\n\t_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'\n      fi\n      if test \"$with_gnu_ld\" = no; then\n\t_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'\n\t_LT_TAGVAR(hardcode_libdir_separator, $1)=:\n\t_LT_TAGVAR(hardcode_direct, $1)=yes\n\t_LT_TAGVAR(hardcode_direct_absolute, $1)=yes\n\t_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'\n\t# hardcode_minus_L: Not really in the search PATH,\n\t# but as the default location of the library.\n\t_LT_TAGVAR(hardcode_minus_L, $1)=yes\n      fi\n      ;;\n\n    hpux11*)\n      if test \"$GCC\" = yes && test \"$with_gnu_ld\" = no; then\n\tcase $host_cpu in\n\thppa*64*)\n\t  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'\n\t  ;;\n\tia64*)\n\t  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'\n\t  ;;\n\t*)\n\t  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'\n\t  ;;\n\tesac\n      else\n\tcase $host_cpu in\n\thppa*64*)\n\t  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'\n\t  ;;\n\tia64*)\n\t  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'\n\t  ;;\n\t*)\n\tm4_if($1, [], [\n\t  # Older versions of the 11.00 compiler do not understand -b yet\n\t  # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)\n\t  _LT_LINKER_OPTION([if $CC understands -b],\n\t    _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],\n\t    [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],\n\t    [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],\n\t  [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])\n\t  ;;\n\tesac\n      fi\n      if test \"$with_gnu_ld\" = no; then\n\t_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'\n\t_LT_TAGVAR(hardcode_libdir_separator, $1)=:\n\n\tcase $host_cpu in\n\thppa*64*|ia64*)\n\t  _LT_TAGVAR(hardcode_direct, $1)=no\n\t  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no\n\t  ;;\n\t*)\n\t  _LT_TAGVAR(hardcode_direct, $1)=yes\n\t  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes\n\t  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'\n\n\t  # hardcode_minus_L: Not really in the search PATH,\n\t  # but as the default location of the library.\n\t  _LT_TAGVAR(hardcode_minus_L, $1)=yes\n\t  ;;\n\tesac\n      fi\n      ;;\n\n    irix5* | irix6* | nonstopux*)\n      if test \"$GCC\" = yes; then\n\t_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n \"$verstring\" && func_echo_all \"${wl}-set_version ${wl}$verstring\"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'\n\t# Try to use the -exported_symbol ld option, if it does not\n\t# work, assume that -exports_file does not work either and\n\t# implicitly export all symbols.\n\t# This should be the same for all languages, so no per-tag cache variable.\n\tAC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],\n\t  [lt_cv_irix_exported_symbol],\n\t  [save_LDFLAGS=\"$LDFLAGS\"\n\t   LDFLAGS=\"$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null\"\n\t   AC_LINK_IFELSE(\n\t     [AC_LANG_SOURCE(\n\t        [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],\n\t\t\t      [C++], [[int foo (void) { return 0; }]],\n\t\t\t      [Fortran 77], [[\n      subroutine foo\n      end]],\n\t\t\t      [Fortran], [[\n      subroutine foo\n      end]])])],\n\t      [lt_cv_irix_exported_symbol=yes],\n\t      [lt_cv_irix_exported_symbol=no])\n           LDFLAGS=\"$save_LDFLAGS\"])\n\tif test \"$lt_cv_irix_exported_symbol\" = yes; then\n          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n \"$verstring\" && func_echo_all \"${wl}-set_version ${wl}$verstring\"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'\n\tfi\n      else\n\t_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n \"$verstring\" && func_echo_all \"-set_version $verstring\"` -update_registry ${output_objdir}/so_locations -o $lib'\n\t_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n \"$verstring\" && func_echo_all \"-set_version $verstring\"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'\n      fi\n      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'\n      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'\n      _LT_TAGVAR(hardcode_libdir_separator, $1)=:\n      _LT_TAGVAR(inherit_rpath, $1)=yes\n      _LT_TAGVAR(link_all_deplibs, $1)=yes\n      ;;\n\n    netbsd* | netbsdelf*-gnu)\n      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then\n\t_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out\n      else\n\t_LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF\n      fi\n      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'\n      _LT_TAGVAR(hardcode_direct, $1)=yes\n      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no\n      ;;\n\n    newsos6)\n      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'\n      _LT_TAGVAR(hardcode_direct, $1)=yes\n      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'\n      _LT_TAGVAR(hardcode_libdir_separator, $1)=:\n      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no\n      ;;\n\n    *nto* | *qnx*)\n      ;;\n\n    openbsd*)\n      if test -f /usr/libexec/ld.so; then\n\t_LT_TAGVAR(hardcode_direct, $1)=yes\n\t_LT_TAGVAR(hardcode_shlibpath_var, $1)=no\n\t_LT_TAGVAR(hardcode_direct_absolute, $1)=yes\n\tif test -z \"`echo __ELF__ | $CC -E - | $GREP __ELF__`\" || test \"$host_os-$host_cpu\" = \"openbsd2.8-powerpc\"; then\n\t  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'\n\t  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'\n\t  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'\n\t  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'\n\telse\n\t  case $host_os in\n\t   openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)\n\t     _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'\n\t     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'\n\t     ;;\n\t   *)\n\t     _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'\n\t     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'\n\t     ;;\n\t  esac\n\tfi\n      else\n\t_LT_TAGVAR(ld_shlibs, $1)=no\n      fi\n      ;;\n\n    os2*)\n      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'\n      _LT_TAGVAR(hardcode_minus_L, $1)=yes\n      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported\n      _LT_TAGVAR(archive_cmds, $1)='$ECHO \"LIBRARY $libname INITINSTANCE\" > $output_objdir/$libname.def~$ECHO \"DESCRIPTION \\\"$libname\\\"\" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo \" SINGLE NONSHARED\" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'\n      _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'\n      ;;\n\n    osf3*)\n      if test \"$GCC\" = yes; then\n\t_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\\*'\n\t_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n \"$verstring\" && func_echo_all \"${wl}-set_version ${wl}$verstring\"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'\n      else\n\t_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \\*'\n\t_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n \"$verstring\" && func_echo_all \"-set_version $verstring\"` -update_registry ${output_objdir}/so_locations -o $lib'\n      fi\n      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'\n      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'\n      _LT_TAGVAR(hardcode_libdir_separator, $1)=:\n      ;;\n\n    osf4* | osf5*)\t# as osf3* with the addition of -msym flag\n      if test \"$GCC\" = yes; then\n\t_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\\*'\n\t_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n \"$verstring\" && func_echo_all \"${wl}-set_version ${wl}$verstring\"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'\n\t_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'\n      else\n\t_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \\*'\n\t_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n \"$verstring\" && func_echo_all \"-set_version $verstring\"` -update_registry ${output_objdir}/so_locations -o $lib'\n\t_LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf \"%s %s\\\\n\" -exported_symbol \"\\$i\" >> $lib.exp; done; printf \"%s\\\\n\" \"-hidden\">> $lib.exp~\n\t$CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n \"$verstring\" && $ECHO \"-set_version $verstring\"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'\n\n\t# Both c and cxx compiler support -rpath directly\n\t_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'\n      fi\n      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'\n      _LT_TAGVAR(hardcode_libdir_separator, $1)=:\n      ;;\n\n    solaris*)\n      _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'\n      if test \"$GCC\" = yes; then\n\twlarc='${wl}'\n\t_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'\n\t_LT_TAGVAR(archive_expsym_cmds, $1)='echo \"{ global:\" > $lib.exp~cat $export_symbols | $SED -e \"s/\\(.*\\)/\\1;/\" >> $lib.exp~echo \"local: *; };\" >> $lib.exp~\n\t  $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'\n      else\n\tcase `$CC -V 2>&1` in\n\t*\"Compilers 5.0\"*)\n\t  wlarc=''\n\t  _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'\n\t  _LT_TAGVAR(archive_expsym_cmds, $1)='echo \"{ global:\" > $lib.exp~cat $export_symbols | $SED -e \"s/\\(.*\\)/\\1;/\" >> $lib.exp~echo \"local: *; };\" >> $lib.exp~\n\t  $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'\n\t  ;;\n\t*)\n\t  wlarc='${wl}'\n\t  _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'\n\t  _LT_TAGVAR(archive_expsym_cmds, $1)='echo \"{ global:\" > $lib.exp~cat $export_symbols | $SED -e \"s/\\(.*\\)/\\1;/\" >> $lib.exp~echo \"local: *; };\" >> $lib.exp~\n\t  $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'\n\t  ;;\n\tesac\n      fi\n      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'\n      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no\n      case $host_os in\n      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;\n      *)\n\t# The compiler driver will combine and reorder linker options,\n\t# but understands `-z linker_flag'.  GCC discards it without `$wl',\n\t# but is careful enough not to reorder.\n\t# Supported since Solaris 2.6 (maybe 2.5.1?)\n\tif test \"$GCC\" = yes; then\n\t  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'\n\telse\n\t  _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'\n\tfi\n\t;;\n      esac\n      _LT_TAGVAR(link_all_deplibs, $1)=yes\n      ;;\n\n    sunos4*)\n      if test \"x$host_vendor\" = xsequent; then\n\t# Use $CC to link under sequent, because it throws in some extra .o\n\t# files that make .init and .fini sections work.\n\t_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'\n      else\n\t_LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'\n      fi\n      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'\n      _LT_TAGVAR(hardcode_direct, $1)=yes\n      _LT_TAGVAR(hardcode_minus_L, $1)=yes\n      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no\n      ;;\n\n    sysv4)\n      case $host_vendor in\n\tsni)\n\t  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'\n\t  _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???\n\t;;\n\tsiemens)\n\t  ## LD is ld it makes a PLAMLIB\n\t  ## CC just makes a GrossModule.\n\t  _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'\n\t  _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'\n\t  _LT_TAGVAR(hardcode_direct, $1)=no\n        ;;\n\tmotorola)\n\t  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'\n\t  _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie\n\t;;\n      esac\n      runpath_var='LD_RUN_PATH'\n      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no\n      ;;\n\n    sysv4.3*)\n      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'\n      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no\n      _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'\n      ;;\n\n    sysv4*MP*)\n      if test -d /usr/nec; then\n\t_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'\n\t_LT_TAGVAR(hardcode_shlibpath_var, $1)=no\n\trunpath_var=LD_RUN_PATH\n\thardcode_runpath_var=yes\n\t_LT_TAGVAR(ld_shlibs, $1)=yes\n      fi\n      ;;\n\n    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)\n      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'\n      _LT_TAGVAR(archive_cmds_need_lc, $1)=no\n      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no\n      runpath_var='LD_RUN_PATH'\n\n      if test \"$GCC\" = yes; then\n\t_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'\n\t_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'\n      else\n\t_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'\n\t_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'\n      fi\n      ;;\n\n    sysv5* | sco3.2v5* | sco5v6*)\n      # Note: We can NOT use -z defs as we might desire, because we do not\n      # link with -lc, and that would cause any symbols used from libc to\n      # always be unresolved, which means just about no library would\n      # ever link correctly.  If we're not using GNU ld we use -z text\n      # though, which does catch some bad symbols but isn't as heavy-handed\n      # as -z defs.\n      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'\n      _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'\n      _LT_TAGVAR(archive_cmds_need_lc, $1)=no\n      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no\n      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'\n      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'\n      _LT_TAGVAR(link_all_deplibs, $1)=yes\n      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'\n      runpath_var='LD_RUN_PATH'\n\n      if test \"$GCC\" = yes; then\n\t_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'\n\t_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'\n      else\n\t_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'\n\t_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'\n      fi\n      ;;\n\n    uts4*)\n      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'\n      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'\n      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no\n      ;;\n\n    *)\n      _LT_TAGVAR(ld_shlibs, $1)=no\n      ;;\n    esac\n\n    if test x$host_vendor = xsni; then\n      case $host in\n      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)\n\t_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'\n\t;;\n      esac\n    fi\n  fi\n])\nAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])\ntest \"$_LT_TAGVAR(ld_shlibs, $1)\" = no && can_build_shared=no\n\n_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld\n\n_LT_DECL([], [libext], [0], [Old archive suffix (normally \"a\")])dnl\n_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally \".so\")])dnl\n_LT_DECL([], [extract_expsyms_cmds], [2],\n    [The commands to extract the exported symbol list from a shared archive])\n\n#\n# Do we need to explicitly link libc?\n#\ncase \"x$_LT_TAGVAR(archive_cmds_need_lc, $1)\" in\nx|xyes)\n  # Assume -lc should be added\n  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes\n\n  if test \"$enable_shared\" = yes && test \"$GCC\" = yes; then\n    case $_LT_TAGVAR(archive_cmds, $1) in\n    *'~'*)\n      # FIXME: we may have to deal with multi-command sequences.\n      ;;\n    '$CC '*)\n      # Test whether the compiler implicitly links with -lc since on some\n      # systems, -lgcc has to come before -lc. If gcc already passes -lc\n      # to ld, don't add -lc before -lgcc.\n      AC_CACHE_CHECK([whether -lc should be explicitly linked in],\n\t[lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),\n\t[$RM conftest*\n\techo \"$lt_simple_compile_test_code\" > conftest.$ac_ext\n\n\tif AC_TRY_EVAL(ac_compile) 2>conftest.err; then\n\t  soname=conftest\n\t  lib=conftest\n\t  libobjs=conftest.$ac_objext\n\t  deplibs=\n\t  wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)\n\t  pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)\n\t  compiler_flags=-v\n\t  linker_flags=-v\n\t  verstring=\n\t  output_objdir=.\n\t  libname=conftest\n\t  lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)\n\t  _LT_TAGVAR(allow_undefined_flag, $1)=\n\t  if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\\>\\&1 \\| $GREP \\\" -lc \\\" \\>/dev/null 2\\>\\&1)\n\t  then\n\t    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no\n\t  else\n\t    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes\n\t  fi\n\t  _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag\n\telse\n\t  cat conftest.err 1>&5\n\tfi\n\t$RM conftest*\n\t])\n      _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)\n      ;;\n    esac\n  fi\n  ;;\nesac\n\n_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],\n    [Whether or not to add -lc for building shared libraries])\n_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],\n    [enable_shared_with_static_runtimes], [0],\n    [Whether or not to disallow shared libs when runtime libs are static])\n_LT_TAGDECL([], [export_dynamic_flag_spec], [1],\n    [Compiler flag to allow reflexive dlopens])\n_LT_TAGDECL([], [whole_archive_flag_spec], [1],\n    [Compiler flag to generate shared objects directly from archives])\n_LT_TAGDECL([], [compiler_needs_object], [1],\n    [Whether the compiler copes with passing no objects directly])\n_LT_TAGDECL([], [old_archive_from_new_cmds], [2],\n    [Create an old-style archive from a shared archive])\n_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],\n    [Create a temporary old-style archive to link instead of a shared archive])\n_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])\n_LT_TAGDECL([], [archive_expsym_cmds], [2])\n_LT_TAGDECL([], [module_cmds], [2],\n    [Commands used to build a loadable module if different from building\n    a shared archive.])\n_LT_TAGDECL([], [module_expsym_cmds], [2])\n_LT_TAGDECL([], [with_gnu_ld], [1],\n    [Whether we are building with GNU ld or not])\n_LT_TAGDECL([], [allow_undefined_flag], [1],\n    [Flag that allows shared libraries with undefined symbols to be built])\n_LT_TAGDECL([], [no_undefined_flag], [1],\n    [Flag that enforces no undefined symbols])\n_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],\n    [Flag to hardcode $libdir into a binary during linking.\n    This must work even if $libdir does not exist])\n_LT_TAGDECL([], [hardcode_libdir_separator], [1],\n    [Whether we need a single \"-rpath\" flag with a separated argument])\n_LT_TAGDECL([], [hardcode_direct], [0],\n    [Set to \"yes\" if using DIR/libNAME${shared_ext} during linking hardcodes\n    DIR into the resulting binary])\n_LT_TAGDECL([], [hardcode_direct_absolute], [0],\n    [Set to \"yes\" if using DIR/libNAME${shared_ext} during linking hardcodes\n    DIR into the resulting binary and the resulting library dependency is\n    \"absolute\", i.e impossible to change by setting ${shlibpath_var} if the\n    library is relocated])\n_LT_TAGDECL([], [hardcode_minus_L], [0],\n    [Set to \"yes\" if using the -LDIR flag during linking hardcodes DIR\n    into the resulting binary])\n_LT_TAGDECL([], [hardcode_shlibpath_var], [0],\n    [Set to \"yes\" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR\n    into the resulting binary])\n_LT_TAGDECL([], [hardcode_automatic], [0],\n    [Set to \"yes\" if building a shared library automatically hardcodes DIR\n    into the library and all subsequent libraries and executables linked\n    against it])\n_LT_TAGDECL([], [inherit_rpath], [0],\n    [Set to yes if linker adds runtime paths of dependent libraries\n    to runtime path list])\n_LT_TAGDECL([], [link_all_deplibs], [0],\n    [Whether libtool must link a program against all its dependency libraries])\n_LT_TAGDECL([], [always_export_symbols], [0],\n    [Set to \"yes\" if exported symbols are required])\n_LT_TAGDECL([], [export_symbols_cmds], [2],\n    [The commands to list exported symbols])\n_LT_TAGDECL([], [exclude_expsyms], [1],\n    [Symbols that should not be listed in the preloaded symbols])\n_LT_TAGDECL([], [include_expsyms], [1],\n    [Symbols that must always be exported])\n_LT_TAGDECL([], [prelink_cmds], [2],\n    [Commands necessary for linking programs (against libraries) with templates])\n_LT_TAGDECL([], [postlink_cmds], [2],\n    [Commands necessary for finishing linking programs])\n_LT_TAGDECL([], [file_list_spec], [1],\n    [Specify filename containing input files])\ndnl FIXME: Not yet implemented\ndnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],\ndnl    [Compiler flag to generate thread safe objects])\n])# _LT_LINKER_SHLIBS\n\n\n# _LT_LANG_C_CONFIG([TAG])\n# ------------------------\n# Ensure that the configuration variables for a C compiler are suitably\n# defined.  These variables are subsequently used by _LT_CONFIG to write\n# the compiler configuration to `libtool'.\nm4_defun([_LT_LANG_C_CONFIG],\n[m4_require([_LT_DECL_EGREP])dnl\nlt_save_CC=\"$CC\"\nAC_LANG_PUSH(C)\n\n# Source file extension for C test sources.\nac_ext=c\n\n# Object file extension for compiled C test sources.\nobjext=o\n_LT_TAGVAR(objext, $1)=$objext\n\n# Code to be used in simple compile tests\nlt_simple_compile_test_code=\"int some_variable = 0;\"\n\n# Code to be used in simple link tests\nlt_simple_link_test_code='int main(){return(0);}'\n\n_LT_TAG_COMPILER\n# Save the default compiler, since it gets overwritten when the other\n# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.\ncompiler_DEFAULT=$CC\n\n# save warnings/boilerplate of simple test code\n_LT_COMPILER_BOILERPLATE\n_LT_LINKER_BOILERPLATE\n\nif test -n \"$compiler\"; then\n  _LT_COMPILER_NO_RTTI($1)\n  _LT_COMPILER_PIC($1)\n  _LT_COMPILER_C_O($1)\n  _LT_COMPILER_FILE_LOCKS($1)\n  _LT_LINKER_SHLIBS($1)\n  _LT_SYS_DYNAMIC_LINKER($1)\n  _LT_LINKER_HARDCODE_LIBPATH($1)\n  LT_SYS_DLOPEN_SELF\n  _LT_CMD_STRIPLIB\n\n  # Report which library types will actually be built\n  AC_MSG_CHECKING([if libtool supports shared libraries])\n  AC_MSG_RESULT([$can_build_shared])\n\n  AC_MSG_CHECKING([whether to build shared libraries])\n  test \"$can_build_shared\" = \"no\" && enable_shared=no\n\n  # On AIX, shared libraries and static libraries use the same namespace, and\n  # are all built from PIC.\n  case $host_os in\n  aix3*)\n    test \"$enable_shared\" = yes && enable_static=no\n    if test -n \"$RANLIB\"; then\n      archive_cmds=\"$archive_cmds~\\$RANLIB \\$lib\"\n      postinstall_cmds='$RANLIB $lib'\n    fi\n    ;;\n\n  aix[[4-9]]*)\n    if test \"$host_cpu\" != ia64 && test \"$aix_use_runtimelinking\" = no ; then\n      test \"$enable_shared\" = yes && enable_static=no\n    fi\n    ;;\n  esac\n  AC_MSG_RESULT([$enable_shared])\n\n  AC_MSG_CHECKING([whether to build static libraries])\n  # Make sure either enable_shared or enable_static is yes.\n  test \"$enable_shared\" = yes || enable_static=yes\n  AC_MSG_RESULT([$enable_static])\n\n  _LT_CONFIG($1)\nfi\nAC_LANG_POP\nCC=\"$lt_save_CC\"\n])# _LT_LANG_C_CONFIG\n\n\n# _LT_LANG_CXX_CONFIG([TAG])\n# --------------------------\n# Ensure that the configuration variables for a C++ compiler are suitably\n# defined.  These variables are subsequently used by _LT_CONFIG to write\n# the compiler configuration to `libtool'.\nm4_defun([_LT_LANG_CXX_CONFIG],\n[m4_require([_LT_FILEUTILS_DEFAULTS])dnl\nm4_require([_LT_DECL_EGREP])dnl\nm4_require([_LT_PATH_MANIFEST_TOOL])dnl\nif test -n \"$CXX\" && ( test \"X$CXX\" != \"Xno\" &&\n    ( (test \"X$CXX\" = \"Xg++\" && `g++ -v >/dev/null 2>&1` ) ||\n    (test \"X$CXX\" != \"Xg++\"))) ; then\n  AC_PROG_CXXCPP\nelse\n  _lt_caught_CXX_error=yes\nfi\n\nAC_LANG_PUSH(C++)\n_LT_TAGVAR(archive_cmds_need_lc, $1)=no\n_LT_TAGVAR(allow_undefined_flag, $1)=\n_LT_TAGVAR(always_export_symbols, $1)=no\n_LT_TAGVAR(archive_expsym_cmds, $1)=\n_LT_TAGVAR(compiler_needs_object, $1)=no\n_LT_TAGVAR(export_dynamic_flag_spec, $1)=\n_LT_TAGVAR(hardcode_direct, $1)=no\n_LT_TAGVAR(hardcode_direct_absolute, $1)=no\n_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=\n_LT_TAGVAR(hardcode_libdir_separator, $1)=\n_LT_TAGVAR(hardcode_minus_L, $1)=no\n_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported\n_LT_TAGVAR(hardcode_automatic, $1)=no\n_LT_TAGVAR(inherit_rpath, $1)=no\n_LT_TAGVAR(module_cmds, $1)=\n_LT_TAGVAR(module_expsym_cmds, $1)=\n_LT_TAGVAR(link_all_deplibs, $1)=unknown\n_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds\n_LT_TAGVAR(reload_flag, $1)=$reload_flag\n_LT_TAGVAR(reload_cmds, $1)=$reload_cmds\n_LT_TAGVAR(no_undefined_flag, $1)=\n_LT_TAGVAR(whole_archive_flag_spec, $1)=\n_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no\n\n# Source file extension for C++ test sources.\nac_ext=cpp\n\n# Object file extension for compiled C++ test sources.\nobjext=o\n_LT_TAGVAR(objext, $1)=$objext\n\n# No sense in running all these tests if we already determined that\n# the CXX compiler isn't working.  Some variables (like enable_shared)\n# are currently assumed to apply to all compilers on this platform,\n# and will be corrupted by setting them based on a non-working compiler.\nif test \"$_lt_caught_CXX_error\" != yes; then\n  # Code to be used in simple compile tests\n  lt_simple_compile_test_code=\"int some_variable = 0;\"\n\n  # Code to be used in simple link tests\n  lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'\n\n  # ltmain only uses $CC for tagged configurations so make sure $CC is set.\n  _LT_TAG_COMPILER\n\n  # save warnings/boilerplate of simple test code\n  _LT_COMPILER_BOILERPLATE\n  _LT_LINKER_BOILERPLATE\n\n  # Allow CC to be a program name with arguments.\n  lt_save_CC=$CC\n  lt_save_CFLAGS=$CFLAGS\n  lt_save_LD=$LD\n  lt_save_GCC=$GCC\n  GCC=$GXX\n  lt_save_with_gnu_ld=$with_gnu_ld\n  lt_save_path_LD=$lt_cv_path_LD\n  if test -n \"${lt_cv_prog_gnu_ldcxx+set}\"; then\n    lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx\n  else\n    $as_unset lt_cv_prog_gnu_ld\n  fi\n  if test -n \"${lt_cv_path_LDCXX+set}\"; then\n    lt_cv_path_LD=$lt_cv_path_LDCXX\n  else\n    $as_unset lt_cv_path_LD\n  fi\n  test -z \"${LDCXX+set}\" || LD=$LDCXX\n  CC=${CXX-\"c++\"}\n  CFLAGS=$CXXFLAGS\n  compiler=$CC\n  _LT_TAGVAR(compiler, $1)=$CC\n  _LT_CC_BASENAME([$compiler])\n\n  if test -n \"$compiler\"; then\n    # We don't want -fno-exception when compiling C++ code, so set the\n    # no_builtin_flag separately\n    if test \"$GXX\" = yes; then\n      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'\n    else\n      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=\n    fi\n\n    if test \"$GXX\" = yes; then\n      # Set up default GNU C++ configuration\n\n      LT_PATH_LD\n\n      # Check if GNU C++ uses GNU ld as the underlying linker, since the\n      # archiving commands below assume that GNU ld is being used.\n      if test \"$with_gnu_ld\" = yes; then\n        _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'\n        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'\n\n        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'\n        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'\n\n        # If archive_cmds runs LD, not CC, wlarc should be empty\n        # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to\n        #     investigate it a little bit more. (MM)\n        wlarc='${wl}'\n\n        # ancient GNU ld didn't support --whole-archive et. al.\n        if eval \"`$CC -print-prog-name=ld` --help 2>&1\" |\n\t  $GREP 'no-whole-archive' > /dev/null; then\n          _LT_TAGVAR(whole_archive_flag_spec, $1)=\"$wlarc\"'--whole-archive$convenience '\"$wlarc\"'--no-whole-archive'\n        else\n          _LT_TAGVAR(whole_archive_flag_spec, $1)=\n        fi\n      else\n        with_gnu_ld=no\n        wlarc=\n\n        # A generic and very simple default shared library creation\n        # command for GNU C++ for the case where it uses the native\n        # linker, instead of GNU ld.  If possible, this setting should\n        # overridden to take advantage of the native linker features on\n        # the platform it is being used on.\n        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'\n      fi\n\n      # Commands to make compiler produce verbose output that lists\n      # what \"hidden\" libraries, object files and flags are used when\n      # linking a shared library.\n      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v \"^Configured with:\" | $GREP \"\\-L\"'\n\n    else\n      GXX=no\n      with_gnu_ld=no\n      wlarc=\n    fi\n\n    # PORTME: fill in a description of your system's C++ link characteristics\n    AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])\n    _LT_TAGVAR(ld_shlibs, $1)=yes\n    case $host_os in\n      aix3*)\n        # FIXME: insert proper C++ library support\n        _LT_TAGVAR(ld_shlibs, $1)=no\n        ;;\n      aix[[4-9]]*)\n        if test \"$host_cpu\" = ia64; then\n          # On IA64, the linker does run time linking by default, so we don't\n          # have to do anything special.\n          aix_use_runtimelinking=no\n          exp_sym_flag='-Bexport'\n          no_entry_flag=\"\"\n        else\n          aix_use_runtimelinking=no\n\n          # Test if we are trying to use run time linking or normal\n          # AIX style linking. If -brtl is somewhere in LDFLAGS, we\n          # need to do runtime linking.\n          case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)\n\t    for ld_flag in $LDFLAGS; do\n\t      case $ld_flag in\n\t      *-brtl*)\n\t        aix_use_runtimelinking=yes\n\t        break\n\t        ;;\n\t      esac\n\t    done\n\t    ;;\n          esac\n\n          exp_sym_flag='-bexport'\n          no_entry_flag='-bnoentry'\n        fi\n\n        # When large executables or shared objects are built, AIX ld can\n        # have problems creating the table of contents.  If linking a library\n        # or program results in \"error TOC overflow\" add -mminimal-toc to\n        # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not\n        # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.\n\n        _LT_TAGVAR(archive_cmds, $1)=''\n        _LT_TAGVAR(hardcode_direct, $1)=yes\n        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes\n        _LT_TAGVAR(hardcode_libdir_separator, $1)=':'\n        _LT_TAGVAR(link_all_deplibs, $1)=yes\n        _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'\n\n        if test \"$GXX\" = yes; then\n          case $host_os in aix4.[[012]]|aix4.[[012]].*)\n          # We only want to do this on AIX 4.2 and lower, the check\n          # below for broken collect2 doesn't work under 4.3+\n\t  collect2name=`${CC} -print-prog-name=collect2`\n\t  if test -f \"$collect2name\" &&\n\t     strings \"$collect2name\" | $GREP resolve_lib_name >/dev/null\n\t  then\n\t    # We have reworked collect2\n\t    :\n\t  else\n\t    # We have old collect2\n\t    _LT_TAGVAR(hardcode_direct, $1)=unsupported\n\t    # It fails to find uninstalled libraries when the uninstalled\n\t    # path is not listed in the libpath.  Setting hardcode_minus_L\n\t    # to unsupported forces relinking\n\t    _LT_TAGVAR(hardcode_minus_L, $1)=yes\n\t    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'\n\t    _LT_TAGVAR(hardcode_libdir_separator, $1)=\n\t  fi\n          esac\n          shared_flag='-shared'\n\t  if test \"$aix_use_runtimelinking\" = yes; then\n\t    shared_flag=\"$shared_flag \"'${wl}-G'\n\t  fi\n        else\n          # not using gcc\n          if test \"$host_cpu\" = ia64; then\n\t  # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release\n\t  # chokes on -Wl,-G. The following line is correct:\n\t  shared_flag='-G'\n          else\n\t    if test \"$aix_use_runtimelinking\" = yes; then\n\t      shared_flag='${wl}-G'\n\t    else\n\t      shared_flag='${wl}-bM:SRE'\n\t    fi\n          fi\n        fi\n\n        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'\n        # It seems that -bexpall does not export symbols beginning with\n        # underscore (_), so it is better to generate a list of symbols to\n\t# export.\n        _LT_TAGVAR(always_export_symbols, $1)=yes\n        if test \"$aix_use_runtimelinking\" = yes; then\n          # Warning - without using the other runtime loading flags (-brtl),\n          # -berok will link without error, but may produce a broken library.\n          _LT_TAGVAR(allow_undefined_flag, $1)='-berok'\n          # Determine the default libpath from the value encoded in an empty\n          # executable.\n          _LT_SYS_MODULE_PATH_AIX([$1])\n          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'\"$aix_libpath\"\n\n          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '\"\\${wl}$no_entry_flag\"' $compiler_flags `if test \"x${allow_undefined_flag}\" != \"x\"; then func_echo_all \"${wl}${allow_undefined_flag}\"; else :; fi` '\"\\${wl}$exp_sym_flag:\\$export_symbols $shared_flag\"\n        else\n          if test \"$host_cpu\" = ia64; then\n\t    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'\n\t    _LT_TAGVAR(allow_undefined_flag, $1)=\"-z nodefs\"\n\t    _LT_TAGVAR(archive_expsym_cmds, $1)=\"\\$CC $shared_flag\"' -o $output_objdir/$soname $libobjs $deplibs '\"\\${wl}$no_entry_flag\"' $compiler_flags ${wl}${allow_undefined_flag} '\"\\${wl}$exp_sym_flag:\\$export_symbols\"\n          else\n\t    # Determine the default libpath from the value encoded in an\n\t    # empty executable.\n\t    _LT_SYS_MODULE_PATH_AIX([$1])\n\t    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'\"$aix_libpath\"\n\t    # Warning - without using the other run time loading flags,\n\t    # -berok will link without error, but may produce a broken library.\n\t    _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'\n\t    _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'\n\t    if test \"$with_gnu_ld\" = yes; then\n\t      # We only use this code for GNU lds that support --whole-archive.\n\t      _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'\n\t    else\n\t      # Exported symbols can be pulled into shared objects from archives\n\t      _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'\n\t    fi\n\t    _LT_TAGVAR(archive_cmds_need_lc, $1)=yes\n\t    # This is similar to how AIX traditionally builds its shared\n\t    # libraries.\n\t    _LT_TAGVAR(archive_expsym_cmds, $1)=\"\\$CC $shared_flag\"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'\n          fi\n        fi\n        ;;\n\n      beos*)\n\tif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then\n\t  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported\n\t  # Joseph Beckenbach <jrb3@best.com> says some releases of gcc\n\t  # support --undefined.  This deserves some investigation.  FIXME\n\t  _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'\n\telse\n\t  _LT_TAGVAR(ld_shlibs, $1)=no\n\tfi\n\t;;\n\n      chorus*)\n        case $cc_basename in\n          *)\n\t  # FIXME: insert proper C++ library support\n\t  _LT_TAGVAR(ld_shlibs, $1)=no\n\t  ;;\n        esac\n        ;;\n\n      cygwin* | mingw* | pw32* | cegcc*)\n\tcase $GXX,$cc_basename in\n\t,cl* | no,cl*)\n\t  # Native MSVC\n\t  # hardcode_libdir_flag_spec is actually meaningless, as there is\n\t  # no search path for DLLs.\n\t  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '\n\t  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported\n\t  _LT_TAGVAR(always_export_symbols, $1)=yes\n\t  _LT_TAGVAR(file_list_spec, $1)='@'\n\t  # Tell ltmain to make .lib files, not .a files.\n\t  libext=lib\n\t  # Tell ltmain to make .dll files, not .so files.\n\t  shrext_cmds=\".dll\"\n\t  # FIXME: Setting linknames here is a bad hack.\n\t  _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='\n\t  _LT_TAGVAR(archive_expsym_cmds, $1)='if test \"x`$SED 1q $export_symbols`\" = xEXPORTS; then\n\t      $SED -n -e 's/\\\\\\\\\\\\\\(.*\\\\\\\\\\\\\\)/-link\\\\\\ -EXPORT:\\\\\\\\\\\\\\1/' -e '1\\\\\\!p' < $export_symbols > $output_objdir/$soname.exp;\n\t    else\n\t      $SED -e 's/\\\\\\\\\\\\\\(.*\\\\\\\\\\\\\\)/-link\\\\\\ -EXPORT:\\\\\\\\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;\n\t    fi~\n\t    $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs \"@$tool_output_objdir$soname.exp\" -Wl,-DLL,-IMPLIB:\"$tool_output_objdir$libname.dll.lib\"~\n\t    linknames='\n\t  # The linker will not automatically build a static lib if we build a DLL.\n\t  # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'\n\t  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes\n\t  # Don't use ranlib\n\t  _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'\n\t  _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile=\"@OUTPUT@\"~\n\t    lt_tool_outputfile=\"@TOOL_OUTPUT@\"~\n\t    case $lt_outputfile in\n\t      *.exe|*.EXE) ;;\n\t      *)\n\t\tlt_outputfile=\"$lt_outputfile.exe\"\n\t\tlt_tool_outputfile=\"$lt_tool_outputfile.exe\"\n\t\t;;\n\t    esac~\n\t    func_to_tool_file \"$lt_outputfile\"~\n\t    if test \"$MANIFEST_TOOL\" != \":\" && test -f \"$lt_outputfile.manifest\"; then\n\t      $MANIFEST_TOOL -manifest \"$lt_tool_outputfile.manifest\" -outputresource:\"$lt_tool_outputfile\" || exit 1;\n\t      $RM \"$lt_outputfile.manifest\";\n\t    fi'\n\t  ;;\n\t*)\n\t  # g++\n\t  # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,\n\t  # as there is no search path for DLLs.\n\t  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'\n\t  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'\n\t  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported\n\t  _LT_TAGVAR(always_export_symbols, $1)=no\n\t  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes\n\n\t  if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then\n\t    _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'\n\t    # If the export-symbols file already is a .def file (1st line\n\t    # is EXPORTS), use it as is; otherwise, prepend...\n\t    _LT_TAGVAR(archive_expsym_cmds, $1)='if test \"x`$SED 1q $export_symbols`\" = xEXPORTS; then\n\t      cp $export_symbols $output_objdir/$soname.def;\n\t    else\n\t      echo EXPORTS > $output_objdir/$soname.def;\n\t      cat $export_symbols >> $output_objdir/$soname.def;\n\t    fi~\n\t    $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'\n\t  else\n\t    _LT_TAGVAR(ld_shlibs, $1)=no\n\t  fi\n\t  ;;\n\tesac\n\t;;\n      darwin* | rhapsody*)\n        _LT_DARWIN_LINKER_FEATURES($1)\n\t;;\n\n      dgux*)\n        case $cc_basename in\n          ec++*)\n\t    # FIXME: insert proper C++ library support\n\t    _LT_TAGVAR(ld_shlibs, $1)=no\n\t    ;;\n          ghcx*)\n\t    # Green Hills C++ Compiler\n\t    # FIXME: insert proper C++ library support\n\t    _LT_TAGVAR(ld_shlibs, $1)=no\n\t    ;;\n          *)\n\t    # FIXME: insert proper C++ library support\n\t    _LT_TAGVAR(ld_shlibs, $1)=no\n\t    ;;\n        esac\n        ;;\n\n      freebsd2.*)\n        # C++ shared libraries reported to be fairly broken before\n\t# switch to ELF\n        _LT_TAGVAR(ld_shlibs, $1)=no\n        ;;\n\n      freebsd-elf*)\n        _LT_TAGVAR(archive_cmds_need_lc, $1)=no\n        ;;\n\n      freebsd* | dragonfly*)\n        # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF\n        # conventions\n        _LT_TAGVAR(ld_shlibs, $1)=yes\n        ;;\n\n      haiku*)\n        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'\n        _LT_TAGVAR(link_all_deplibs, $1)=yes\n        ;;\n\n      hpux9*)\n        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'\n        _LT_TAGVAR(hardcode_libdir_separator, $1)=:\n        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'\n        _LT_TAGVAR(hardcode_direct, $1)=yes\n        _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,\n\t\t\t\t             # but as the default\n\t\t\t\t             # location of the library.\n\n        case $cc_basename in\n          CC*)\n            # FIXME: insert proper C++ library support\n            _LT_TAGVAR(ld_shlibs, $1)=no\n            ;;\n          aCC*)\n            _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'\n            # Commands to make compiler produce verbose output that lists\n            # what \"hidden\" libraries, object files and flags are used when\n            # linking a shared library.\n            #\n            # There doesn't appear to be a way to prevent this compiler from\n            # explicitly linking system object files so we need to strip them\n            # from the output so that they don't get included in the library\n            # dependencies.\n            output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP \"\\-L\"`; list=\"\"; for z in $templist; do case $z in conftest.$objext) list=\"$list $z\";; *.$objext);; *) list=\"$list $z\";;esac; done; func_echo_all \"$list\"'\n            ;;\n          *)\n            if test \"$GXX\" = yes; then\n              _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'\n            else\n              # FIXME: insert proper C++ library support\n              _LT_TAGVAR(ld_shlibs, $1)=no\n            fi\n            ;;\n        esac\n        ;;\n\n      hpux10*|hpux11*)\n        if test $with_gnu_ld = no; then\n\t  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'\n\t  _LT_TAGVAR(hardcode_libdir_separator, $1)=:\n\n          case $host_cpu in\n            hppa*64*|ia64*)\n              ;;\n            *)\n\t      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'\n              ;;\n          esac\n        fi\n        case $host_cpu in\n          hppa*64*|ia64*)\n            _LT_TAGVAR(hardcode_direct, $1)=no\n            _LT_TAGVAR(hardcode_shlibpath_var, $1)=no\n            ;;\n          *)\n            _LT_TAGVAR(hardcode_direct, $1)=yes\n            _LT_TAGVAR(hardcode_direct_absolute, $1)=yes\n            _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,\n\t\t\t\t\t         # but as the default\n\t\t\t\t\t         # location of the library.\n            ;;\n        esac\n\n        case $cc_basename in\n          CC*)\n\t    # FIXME: insert proper C++ library support\n\t    _LT_TAGVAR(ld_shlibs, $1)=no\n\t    ;;\n          aCC*)\n\t    case $host_cpu in\n\t      hppa*64*)\n\t        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'\n\t        ;;\n\t      ia64*)\n\t        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'\n\t        ;;\n\t      *)\n\t        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'\n\t        ;;\n\t    esac\n\t    # Commands to make compiler produce verbose output that lists\n\t    # what \"hidden\" libraries, object files and flags are used when\n\t    # linking a shared library.\n\t    #\n\t    # There doesn't appear to be a way to prevent this compiler from\n\t    # explicitly linking system object files so we need to strip them\n\t    # from the output so that they don't get included in the library\n\t    # dependencies.\n\t    output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP \"\\-L\"`; list=\"\"; for z in $templist; do case $z in conftest.$objext) list=\"$list $z\";; *.$objext);; *) list=\"$list $z\";;esac; done; func_echo_all \"$list\"'\n\t    ;;\n          *)\n\t    if test \"$GXX\" = yes; then\n\t      if test $with_gnu_ld = no; then\n\t        case $host_cpu in\n\t          hppa*64*)\n\t            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'\n\t            ;;\n\t          ia64*)\n\t            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'\n\t            ;;\n\t          *)\n\t            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'\n\t            ;;\n\t        esac\n\t      fi\n\t    else\n\t      # FIXME: insert proper C++ library support\n\t      _LT_TAGVAR(ld_shlibs, $1)=no\n\t    fi\n\t    ;;\n        esac\n        ;;\n\n      interix[[3-9]]*)\n\t_LT_TAGVAR(hardcode_direct, $1)=no\n\t_LT_TAGVAR(hardcode_shlibpath_var, $1)=no\n\t_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'\n\t_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'\n\t# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.\n\t# Instead, shared libraries are loaded at an image base (0x10000000 by\n\t# default) and relocated if they conflict, which is a slow very memory\n\t# consuming and fragmenting process.  To avoid this, we pick a random,\n\t# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link\n\t# time.  Moving up from 0x10000000 also allows more sbrk(2) space.\n\t_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \\* 262144 + 1342177280` -o $lib'\n\t_LT_TAGVAR(archive_expsym_cmds, $1)='sed \"s,^,_,\" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \\* 262144 + 1342177280` -o $lib'\n\t;;\n      irix5* | irix6*)\n        case $cc_basename in\n          CC*)\n\t    # SGI C++\n\t    _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n \"$verstring\" && func_echo_all \"-set_version $verstring\"` -update_registry ${output_objdir}/so_locations -o $lib'\n\n\t    # Archives containing C++ object files must be created using\n\t    # \"CC -ar\", where \"CC\" is the IRIX C++ compiler.  This is\n\t    # necessary to make sure instantiated templates are included\n\t    # in the archive.\n\t    _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'\n\t    ;;\n          *)\n\t    if test \"$GXX\" = yes; then\n\t      if test \"$with_gnu_ld\" = no; then\n\t        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n \"$verstring\" && func_echo_all \"${wl}-set_version ${wl}$verstring\"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'\n\t      else\n\t        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n \"$verstring\" && func_echo_all \"${wl}-set_version ${wl}$verstring\"` -o $lib'\n\t      fi\n\t    fi\n\t    _LT_TAGVAR(link_all_deplibs, $1)=yes\n\t    ;;\n        esac\n        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'\n        _LT_TAGVAR(hardcode_libdir_separator, $1)=:\n        _LT_TAGVAR(inherit_rpath, $1)=yes\n        ;;\n\n      linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)\n        case $cc_basename in\n          KCC*)\n\t    # Kuck and Associates, Inc. (KAI) C++ Compiler\n\n\t    # KCC will only create a shared library if the output file\n\t    # ends with \".so\" (or \".sl\" for HP-UX), so rename the library\n\t    # to its proper name (with version) after linking.\n\t    _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\\''s/\\([[^()0-9A-Za-z{}]]\\)/\\\\\\\\\\1/g'\\''`; templib=`echo $lib | $SED -e \"s/\\${tempext}\\..*/.so/\"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \\$templib; mv \\$templib $lib'\n\t    _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\\''s/\\([[^()0-9A-Za-z{}]]\\)/\\\\\\\\\\1/g'\\''`; templib=`echo $lib | $SED -e \"s/\\${tempext}\\..*/.so/\"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \\$templib ${wl}-retain-symbols-file,$export_symbols; mv \\$templib $lib'\n\t    # Commands to make compiler produce verbose output that lists\n\t    # what \"hidden\" libraries, object files and flags are used when\n\t    # linking a shared library.\n\t    #\n\t    # There doesn't appear to be a way to prevent this compiler from\n\t    # explicitly linking system object files so we need to strip them\n\t    # from the output so that they don't get included in the library\n\t    # dependencies.\n\t    output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP \"ld\"`; rm -f libconftest$shared_ext; list=\"\"; for z in $templist; do case $z in conftest.$objext) list=\"$list $z\";; *.$objext);; *) list=\"$list $z\";;esac; done; func_echo_all \"$list\"'\n\n\t    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'\n\t    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'\n\n\t    # Archives containing C++ object files must be created using\n\t    # \"CC -Bstatic\", where \"CC\" is the KAI C++ compiler.\n\t    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'\n\t    ;;\n\t  icpc* | ecpc* )\n\t    # Intel C++\n\t    with_gnu_ld=yes\n\t    # version 8.0 and above of icpc choke on multiply defined symbols\n\t    # if we add $predep_objects and $postdep_objects, however 7.1 and\n\t    # earlier do not add the objects themselves.\n\t    case `$CC -V 2>&1` in\n\t      *\"Version 7.\"*)\n\t        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'\n\t\t_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'\n\t\t;;\n\t      *)  # Version 8.0 or newer\n\t        tmp_idyn=\n\t        case $host_cpu in\n\t\t  ia64*) tmp_idyn=' -i_dynamic';;\n\t\tesac\n\t        _LT_TAGVAR(archive_cmds, $1)='$CC -shared'\"$tmp_idyn\"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'\n\t\t_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'\"$tmp_idyn\"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'\n\t\t;;\n\t    esac\n\t    _LT_TAGVAR(archive_cmds_need_lc, $1)=no\n\t    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'\n\t    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'\n\t    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'\n\t    ;;\n          pgCC* | pgcpp*)\n            # Portland Group C++ compiler\n\t    case `$CC -V` in\n\t    *pgCC\\ [[1-5]].* | *pgcpp\\ [[1-5]].*)\n\t      _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~\n\t\trm -rf $tpldir~\n\t\t$CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~\n\t\tcompile_command=\"$compile_command `find $tpldir -name \\*.o | sort | $NL2SP`\"'\n\t      _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~\n\t\trm -rf $tpldir~\n\t\t$CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~\n\t\t$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \\*.o | sort | $NL2SP`~\n\t\t$RANLIB $oldlib'\n\t      _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~\n\t\trm -rf $tpldir~\n\t\t$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~\n\t\t$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \\*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'\n\t      _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~\n\t\trm -rf $tpldir~\n\t\t$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~\n\t\t$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \\*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'\n\t      ;;\n\t    *) # Version 6 and above use weak symbols\n\t      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'\n\t      _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'\n\t      ;;\n\t    esac\n\n\t    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'\n\t    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'\n\t    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\\\"\\\"; do test  -n \\\"$conv\\\" && new_convenience=\\\"$new_convenience,$conv\\\"; done; func_echo_all \\\"$new_convenience\\\"` ${wl}--no-whole-archive'\n            ;;\n\t  cxx*)\n\t    # Compaq C++\n\t    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'\n\t    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname  -o $lib ${wl}-retain-symbols-file $wl$export_symbols'\n\n\t    runpath_var=LD_RUN_PATH\n\t    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'\n\t    _LT_TAGVAR(hardcode_libdir_separator, $1)=:\n\n\t    # Commands to make compiler produce verbose output that lists\n\t    # what \"hidden\" libraries, object files and flags are used when\n\t    # linking a shared library.\n\t    #\n\t    # There doesn't appear to be a way to prevent this compiler from\n\t    # explicitly linking system object files so we need to strip them\n\t    # from the output so that they don't get included in the library\n\t    # dependencies.\n\t    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP \"ld\"`; templist=`func_echo_all \"$templist\" | $SED \"s/\\(^.*ld.*\\)\\( .*ld .*$\\)/\\1/\"`; list=\"\"; for z in $templist; do case $z in conftest.$objext) list=\"$list $z\";; *.$objext);; *) list=\"$list $z\";;esac; done; func_echo_all \"X$list\" | $Xsed'\n\t    ;;\n\t  xl* | mpixl* | bgxl*)\n\t    # IBM XL 8.0 on PPC, with GNU ld\n\t    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'\n\t    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'\n\t    _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'\n\t    if test \"x$supports_anon_versioning\" = xyes; then\n\t      _LT_TAGVAR(archive_expsym_cmds, $1)='echo \"{ global:\" > $output_objdir/$libname.ver~\n\t\tcat $export_symbols | sed -e \"s/\\(.*\\)/\\1;/\" >> $output_objdir/$libname.ver~\n\t\techo \"local: *; };\" >> $output_objdir/$libname.ver~\n\t\t$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'\n\t    fi\n\t    ;;\n\t  *)\n\t    case `$CC -V 2>&1 | sed 5q` in\n\t    *Sun\\ C*)\n\t      # Sun C++ 5.9\n\t      _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'\n\t      _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'\n\t      _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'\n\t      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'\n\t      _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\\\"\\\"; do test -z \\\"$conv\\\" || new_convenience=\\\"$new_convenience,$conv\\\"; done; func_echo_all \\\"$new_convenience\\\"` ${wl}--no-whole-archive'\n\t      _LT_TAGVAR(compiler_needs_object, $1)=yes\n\n\t      # Not sure whether something based on\n\t      # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1\n\t      # would be better.\n\t      output_verbose_link_cmd='func_echo_all'\n\n\t      # Archives containing C++ object files must be created using\n\t      # \"CC -xar\", where \"CC\" is the Sun C++ compiler.  This is\n\t      # necessary to make sure instantiated templates are included\n\t      # in the archive.\n\t      _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'\n\t      ;;\n\t    esac\n\t    ;;\n\tesac\n\t;;\n\n      lynxos*)\n        # FIXME: insert proper C++ library support\n\t_LT_TAGVAR(ld_shlibs, $1)=no\n\t;;\n\n      m88k*)\n        # FIXME: insert proper C++ library support\n        _LT_TAGVAR(ld_shlibs, $1)=no\n\t;;\n\n      mvs*)\n        case $cc_basename in\n          cxx*)\n\t    # FIXME: insert proper C++ library support\n\t    _LT_TAGVAR(ld_shlibs, $1)=no\n\t    ;;\n\t  *)\n\t    # FIXME: insert proper C++ library support\n\t    _LT_TAGVAR(ld_shlibs, $1)=no\n\t    ;;\n\tesac\n\t;;\n\n      netbsd*)\n        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then\n\t  _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'\n\t  wlarc=\n\t  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'\n\t  _LT_TAGVAR(hardcode_direct, $1)=yes\n\t  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no\n\tfi\n\t# Workaround some broken pre-1.5 toolchains\n\toutput_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e \"s:-lgcc -lc -lgcc::\"'\n\t;;\n\n      *nto* | *qnx*)\n        _LT_TAGVAR(ld_shlibs, $1)=yes\n\t;;\n\n      openbsd2*)\n        # C++ shared libraries are fairly broken\n\t_LT_TAGVAR(ld_shlibs, $1)=no\n\t;;\n\n      openbsd*)\n\tif test -f /usr/libexec/ld.so; then\n\t  _LT_TAGVAR(hardcode_direct, $1)=yes\n\t  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no\n\t  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes\n\t  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'\n\t  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'\n\t  if test -z \"`echo __ELF__ | $CC -E - | grep __ELF__`\" || test \"$host_os-$host_cpu\" = \"openbsd2.8-powerpc\"; then\n\t    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'\n\t    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'\n\t    _LT_TAGVAR(whole_archive_flag_spec, $1)=\"$wlarc\"'--whole-archive$convenience '\"$wlarc\"'--no-whole-archive'\n\t  fi\n\t  output_verbose_link_cmd=func_echo_all\n\telse\n\t  _LT_TAGVAR(ld_shlibs, $1)=no\n\tfi\n\t;;\n\n      osf3* | osf4* | osf5*)\n        case $cc_basename in\n          KCC*)\n\t    # Kuck and Associates, Inc. (KAI) C++ Compiler\n\n\t    # KCC will only create a shared library if the output file\n\t    # ends with \".so\" (or \".sl\" for HP-UX), so rename the library\n\t    # to its proper name (with version) after linking.\n\t    _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\\''s/\\([[^()0-9A-Za-z{}]]\\)/\\\\\\\\\\1/g'\\''`; templib=`echo \"$lib\" | $SED -e \"s/\\${tempext}\\..*/.so/\"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \\$templib; mv \\$templib $lib'\n\n\t    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'\n\t    _LT_TAGVAR(hardcode_libdir_separator, $1)=:\n\n\t    # Archives containing C++ object files must be created using\n\t    # the KAI C++ compiler.\n\t    case $host in\n\t      osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;\n\t      *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;\n\t    esac\n\t    ;;\n          RCC*)\n\t    # Rational C++ 2.4.1\n\t    # FIXME: insert proper C++ library support\n\t    _LT_TAGVAR(ld_shlibs, $1)=no\n\t    ;;\n          cxx*)\n\t    case $host in\n\t      osf3*)\n\t        _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\\*'\n\t        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n \"$verstring\" && func_echo_all \"${wl}-set_version $verstring\"` -update_registry ${output_objdir}/so_locations -o $lib'\n\t        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'\n\t\t;;\n\t      *)\n\t        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \\*'\n\t        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n \"$verstring\" && func_echo_all \"-set_version $verstring\"` -update_registry ${output_objdir}/so_locations -o $lib'\n\t        _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf \"%s %s\\\\n\" -exported_symbol \"\\$i\" >> $lib.exp; done~\n\t          echo \"-hidden\">> $lib.exp~\n\t          $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp  `test -n \"$verstring\" && $ECHO \"-set_version $verstring\"` -update_registry ${output_objdir}/so_locations -o $lib~\n\t          $RM $lib.exp'\n\t        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'\n\t\t;;\n\t    esac\n\n\t    _LT_TAGVAR(hardcode_libdir_separator, $1)=:\n\n\t    # Commands to make compiler produce verbose output that lists\n\t    # what \"hidden\" libraries, object files and flags are used when\n\t    # linking a shared library.\n\t    #\n\t    # There doesn't appear to be a way to prevent this compiler from\n\t    # explicitly linking system object files so we need to strip them\n\t    # from the output so that they don't get included in the library\n\t    # dependencies.\n\t    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP \"ld\" | $GREP -v \"ld:\"`; templist=`func_echo_all \"$templist\" | $SED \"s/\\(^.*ld.*\\)\\( .*ld.*$\\)/\\1/\"`; list=\"\"; for z in $templist; do case $z in conftest.$objext) list=\"$list $z\";; *.$objext);; *) list=\"$list $z\";;esac; done; func_echo_all \"$list\"'\n\t    ;;\n\t  *)\n\t    if test \"$GXX\" = yes && test \"$with_gnu_ld\" = no; then\n\t      _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\\*'\n\t      case $host in\n\t        osf3*)\n\t          _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n \"$verstring\" && func_echo_all \"${wl}-set_version ${wl}$verstring\"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'\n\t\t  ;;\n\t        *)\n\t          _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n \"$verstring\" && func_echo_all \"${wl}-set_version ${wl}$verstring\"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'\n\t\t  ;;\n\t      esac\n\n\t      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'\n\t      _LT_TAGVAR(hardcode_libdir_separator, $1)=:\n\n\t      # Commands to make compiler produce verbose output that lists\n\t      # what \"hidden\" libraries, object files and flags are used when\n\t      # linking a shared library.\n\t      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v \"^Configured with:\" | $GREP \"\\-L\"'\n\n\t    else\n\t      # FIXME: insert proper C++ library support\n\t      _LT_TAGVAR(ld_shlibs, $1)=no\n\t    fi\n\t    ;;\n        esac\n        ;;\n\n      psos*)\n        # FIXME: insert proper C++ library support\n        _LT_TAGVAR(ld_shlibs, $1)=no\n        ;;\n\n      sunos4*)\n        case $cc_basename in\n          CC*)\n\t    # Sun C++ 4.x\n\t    # FIXME: insert proper C++ library support\n\t    _LT_TAGVAR(ld_shlibs, $1)=no\n\t    ;;\n          lcc*)\n\t    # Lucid\n\t    # FIXME: insert proper C++ library support\n\t    _LT_TAGVAR(ld_shlibs, $1)=no\n\t    ;;\n          *)\n\t    # FIXME: insert proper C++ library support\n\t    _LT_TAGVAR(ld_shlibs, $1)=no\n\t    ;;\n        esac\n        ;;\n\n      solaris*)\n        case $cc_basename in\n          CC* | sunCC*)\n\t    # Sun C++ 4.2, 5.x and Centerline C++\n            _LT_TAGVAR(archive_cmds_need_lc,$1)=yes\n\t    _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'\n\t    _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'\n\t    _LT_TAGVAR(archive_expsym_cmds, $1)='echo \"{ global:\" > $lib.exp~cat $export_symbols | $SED -e \"s/\\(.*\\)/\\1;/\" >> $lib.exp~echo \"local: *; };\" >> $lib.exp~\n\t      $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'\n\n\t    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'\n\t    _LT_TAGVAR(hardcode_shlibpath_var, $1)=no\n\t    case $host_os in\n\t      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;\n\t      *)\n\t\t# The compiler driver will combine and reorder linker options,\n\t\t# but understands `-z linker_flag'.\n\t        # Supported since Solaris 2.6 (maybe 2.5.1?)\n\t\t_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'\n\t        ;;\n\t    esac\n\t    _LT_TAGVAR(link_all_deplibs, $1)=yes\n\n\t    output_verbose_link_cmd='func_echo_all'\n\n\t    # Archives containing C++ object files must be created using\n\t    # \"CC -xar\", where \"CC\" is the Sun C++ compiler.  This is\n\t    # necessary to make sure instantiated templates are included\n\t    # in the archive.\n\t    _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'\n\t    ;;\n          gcx*)\n\t    # Green Hills C++ Compiler\n\t    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'\n\n\t    # The C++ compiler must be used to create the archive.\n\t    _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'\n\t    ;;\n          *)\n\t    # GNU C++ compiler with Solaris linker\n\t    if test \"$GXX\" = yes && test \"$with_gnu_ld\" = no; then\n\t      _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'\n\t      if $CC --version | $GREP -v '^2\\.7' > /dev/null; then\n\t        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'\n\t        _LT_TAGVAR(archive_expsym_cmds, $1)='echo \"{ global:\" > $lib.exp~cat $export_symbols | $SED -e \"s/\\(.*\\)/\\1;/\" >> $lib.exp~echo \"local: *; };\" >> $lib.exp~\n\t\t  $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'\n\n\t        # Commands to make compiler produce verbose output that lists\n\t        # what \"hidden\" libraries, object files and flags are used when\n\t        # linking a shared library.\n\t        output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v \"^Configured with:\" | $GREP \"\\-L\"'\n\t      else\n\t        # g++ 2.7 appears to require `-G' NOT `-shared' on this\n\t        # platform.\n\t        _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'\n\t        _LT_TAGVAR(archive_expsym_cmds, $1)='echo \"{ global:\" > $lib.exp~cat $export_symbols | $SED -e \"s/\\(.*\\)/\\1;/\" >> $lib.exp~echo \"local: *; };\" >> $lib.exp~\n\t\t  $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'\n\n\t        # Commands to make compiler produce verbose output that lists\n\t        # what \"hidden\" libraries, object files and flags are used when\n\t        # linking a shared library.\n\t        output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v \"^Configured with:\" | $GREP \"\\-L\"'\n\t      fi\n\n\t      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'\n\t      case $host_os in\n\t\tsolaris2.[[0-5]] | solaris2.[[0-5]].*) ;;\n\t\t*)\n\t\t  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'\n\t\t  ;;\n\t      esac\n\t    fi\n\t    ;;\n        esac\n        ;;\n\n    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)\n      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'\n      _LT_TAGVAR(archive_cmds_need_lc, $1)=no\n      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no\n      runpath_var='LD_RUN_PATH'\n\n      case $cc_basename in\n        CC*)\n\t  _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'\n\t  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'\n\t  ;;\n\t*)\n\t  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'\n\t  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'\n\t  ;;\n      esac\n      ;;\n\n      sysv5* | sco3.2v5* | sco5v6*)\n\t# Note: We can NOT use -z defs as we might desire, because we do not\n\t# link with -lc, and that would cause any symbols used from libc to\n\t# always be unresolved, which means just about no library would\n\t# ever link correctly.  If we're not using GNU ld we use -z text\n\t# though, which does catch some bad symbols but isn't as heavy-handed\n\t# as -z defs.\n\t_LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'\n\t_LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'\n\t_LT_TAGVAR(archive_cmds_need_lc, $1)=no\n\t_LT_TAGVAR(hardcode_shlibpath_var, $1)=no\n\t_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'\n\t_LT_TAGVAR(hardcode_libdir_separator, $1)=':'\n\t_LT_TAGVAR(link_all_deplibs, $1)=yes\n\t_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'\n\trunpath_var='LD_RUN_PATH'\n\n\tcase $cc_basename in\n          CC*)\n\t    _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'\n\t    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'\n\t    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~\n\t      '\"$_LT_TAGVAR(old_archive_cmds, $1)\"\n\t    _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~\n\t      '\"$_LT_TAGVAR(reload_cmds, $1)\"\n\t    ;;\n\t  *)\n\t    _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'\n\t    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'\n\t    ;;\n\tesac\n      ;;\n\n      tandem*)\n        case $cc_basename in\n          NCC*)\n\t    # NonStop-UX NCC 3.20\n\t    # FIXME: insert proper C++ library support\n\t    _LT_TAGVAR(ld_shlibs, $1)=no\n\t    ;;\n          *)\n\t    # FIXME: insert proper C++ library support\n\t    _LT_TAGVAR(ld_shlibs, $1)=no\n\t    ;;\n        esac\n        ;;\n\n      vxworks*)\n        # FIXME: insert proper C++ library support\n        _LT_TAGVAR(ld_shlibs, $1)=no\n        ;;\n\n      *)\n        # FIXME: insert proper C++ library support\n        _LT_TAGVAR(ld_shlibs, $1)=no\n        ;;\n    esac\n\n    AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])\n    test \"$_LT_TAGVAR(ld_shlibs, $1)\" = no && can_build_shared=no\n\n    _LT_TAGVAR(GCC, $1)=\"$GXX\"\n    _LT_TAGVAR(LD, $1)=\"$LD\"\n\n    ## CAVEAT EMPTOR:\n    ## There is no encapsulation within the following macros, do not change\n    ## the running order or otherwise move them around unless you know exactly\n    ## what you are doing...\n    _LT_SYS_HIDDEN_LIBDEPS($1)\n    _LT_COMPILER_PIC($1)\n    _LT_COMPILER_C_O($1)\n    _LT_COMPILER_FILE_LOCKS($1)\n    _LT_LINKER_SHLIBS($1)\n    _LT_SYS_DYNAMIC_LINKER($1)\n    _LT_LINKER_HARDCODE_LIBPATH($1)\n\n    _LT_CONFIG($1)\n  fi # test -n \"$compiler\"\n\n  CC=$lt_save_CC\n  CFLAGS=$lt_save_CFLAGS\n  LDCXX=$LD\n  LD=$lt_save_LD\n  GCC=$lt_save_GCC\n  with_gnu_ld=$lt_save_with_gnu_ld\n  lt_cv_path_LDCXX=$lt_cv_path_LD\n  lt_cv_path_LD=$lt_save_path_LD\n  lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld\n  lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld\nfi # test \"$_lt_caught_CXX_error\" != yes\n\nAC_LANG_POP\n])# _LT_LANG_CXX_CONFIG\n\n\n# _LT_FUNC_STRIPNAME_CNF\n# ----------------------\n# func_stripname_cnf prefix suffix name\n# strip PREFIX and SUFFIX off of NAME.\n# PREFIX and SUFFIX must not contain globbing or regex special\n# characters, hashes, percent signs, but SUFFIX may contain a leading\n# dot (in which case that matches only a dot).\n#\n# This function is identical to the (non-XSI) version of func_stripname,\n# except this one can be used by m4 code that may be executed by configure,\n# rather than the libtool script.\nm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl\nAC_REQUIRE([_LT_DECL_SED])\nAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])\nfunc_stripname_cnf ()\n{\n  case ${2} in\n  .*) func_stripname_result=`$ECHO \"${3}\" | $SED \"s%^${1}%%; s%\\\\\\\\${2}\\$%%\"`;;\n  *)  func_stripname_result=`$ECHO \"${3}\" | $SED \"s%^${1}%%; s%${2}\\$%%\"`;;\n  esac\n} # func_stripname_cnf\n])# _LT_FUNC_STRIPNAME_CNF\n\n# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])\n# ---------------------------------\n# Figure out \"hidden\" library dependencies from verbose\n# compiler output when linking a shared library.\n# Parse the compiler output and extract the necessary\n# objects, libraries and library flags.\nm4_defun([_LT_SYS_HIDDEN_LIBDEPS],\n[m4_require([_LT_FILEUTILS_DEFAULTS])dnl\nAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl\n# Dependencies to place before and after the object being linked:\n_LT_TAGVAR(predep_objects, $1)=\n_LT_TAGVAR(postdep_objects, $1)=\n_LT_TAGVAR(predeps, $1)=\n_LT_TAGVAR(postdeps, $1)=\n_LT_TAGVAR(compiler_lib_search_path, $1)=\n\ndnl we can't use the lt_simple_compile_test_code here,\ndnl because it contains code intended for an executable,\ndnl not a library.  It's possible we should let each\ndnl tag define a new lt_????_link_test_code variable,\ndnl but it's only used here...\nm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF\nint a;\nvoid foo (void) { a = 0; }\n_LT_EOF\n], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF\nclass Foo\n{\npublic:\n  Foo (void) { a = 0; }\nprivate:\n  int a;\n};\n_LT_EOF\n], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF\n      subroutine foo\n      implicit none\n      integer*4 a\n      a=0\n      return\n      end\n_LT_EOF\n], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF\n      subroutine foo\n      implicit none\n      integer a\n      a=0\n      return\n      end\n_LT_EOF\n], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF\npublic class foo {\n  private int a;\n  public void bar (void) {\n    a = 0;\n  }\n};\n_LT_EOF\n], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF\npackage foo\nfunc foo() {\n}\n_LT_EOF\n])\n\n_lt_libdeps_save_CFLAGS=$CFLAGS\ncase \"$CC $CFLAGS \" in #(\n*\\ -flto*\\ *) CFLAGS=\"$CFLAGS -fno-lto\" ;;\n*\\ -fwhopr*\\ *) CFLAGS=\"$CFLAGS -fno-whopr\" ;;\n*\\ -fuse-linker-plugin*\\ *) CFLAGS=\"$CFLAGS -fno-use-linker-plugin\" ;;\nesac\n\ndnl Parse the compiler output and extract the necessary\ndnl objects, libraries and library flags.\nif AC_TRY_EVAL(ac_compile); then\n  # Parse the compiler output and extract the necessary\n  # objects, libraries and library flags.\n\n  # Sentinel used to keep track of whether or not we are before\n  # the conftest object file.\n  pre_test_object_deps_done=no\n\n  for p in `eval \"$output_verbose_link_cmd\"`; do\n    case ${prev}${p} in\n\n    -L* | -R* | -l*)\n       # Some compilers place space between \"-{L,R}\" and the path.\n       # Remove the space.\n       if test $p = \"-L\" ||\n          test $p = \"-R\"; then\n\t prev=$p\n\t continue\n       fi\n\n       # Expand the sysroot to ease extracting the directories later.\n       if test -z \"$prev\"; then\n         case $p in\n         -L*) func_stripname_cnf '-L' '' \"$p\"; prev=-L; p=$func_stripname_result ;;\n         -R*) func_stripname_cnf '-R' '' \"$p\"; prev=-R; p=$func_stripname_result ;;\n         -l*) func_stripname_cnf '-l' '' \"$p\"; prev=-l; p=$func_stripname_result ;;\n         esac\n       fi\n       case $p in\n       =*) func_stripname_cnf '=' '' \"$p\"; p=$lt_sysroot$func_stripname_result ;;\n       esac\n       if test \"$pre_test_object_deps_done\" = no; then\n\t case ${prev} in\n\t -L | -R)\n\t   # Internal compiler library paths should come after those\n\t   # provided the user.  The postdeps already come after the\n\t   # user supplied libs so there is no need to process them.\n\t   if test -z \"$_LT_TAGVAR(compiler_lib_search_path, $1)\"; then\n\t     _LT_TAGVAR(compiler_lib_search_path, $1)=\"${prev}${p}\"\n\t   else\n\t     _LT_TAGVAR(compiler_lib_search_path, $1)=\"${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}\"\n\t   fi\n\t   ;;\n\t # The \"-l\" case would never come before the object being\n\t # linked, so don't bother handling this case.\n\t esac\n       else\n\t if test -z \"$_LT_TAGVAR(postdeps, $1)\"; then\n\t   _LT_TAGVAR(postdeps, $1)=\"${prev}${p}\"\n\t else\n\t   _LT_TAGVAR(postdeps, $1)=\"${_LT_TAGVAR(postdeps, $1)} ${prev}${p}\"\n\t fi\n       fi\n       prev=\n       ;;\n\n    *.lto.$objext) ;; # Ignore GCC LTO objects\n    *.$objext)\n       # This assumes that the test object file only shows up\n       # once in the compiler output.\n       if test \"$p\" = \"conftest.$objext\"; then\n\t pre_test_object_deps_done=yes\n\t continue\n       fi\n\n       if test \"$pre_test_object_deps_done\" = no; then\n\t if test -z \"$_LT_TAGVAR(predep_objects, $1)\"; then\n\t   _LT_TAGVAR(predep_objects, $1)=\"$p\"\n\t else\n\t   _LT_TAGVAR(predep_objects, $1)=\"$_LT_TAGVAR(predep_objects, $1) $p\"\n\t fi\n       else\n\t if test -z \"$_LT_TAGVAR(postdep_objects, $1)\"; then\n\t   _LT_TAGVAR(postdep_objects, $1)=\"$p\"\n\t else\n\t   _LT_TAGVAR(postdep_objects, $1)=\"$_LT_TAGVAR(postdep_objects, $1) $p\"\n\t fi\n       fi\n       ;;\n\n    *) ;; # Ignore the rest.\n\n    esac\n  done\n\n  # Clean up.\n  rm -f a.out a.exe\nelse\n  echo \"libtool.m4: error: problem compiling $1 test program\"\nfi\n\n$RM -f confest.$objext\nCFLAGS=$_lt_libdeps_save_CFLAGS\n\n# PORTME: override above test on systems where it is broken\nm4_if([$1], [CXX],\n[case $host_os in\ninterix[[3-9]]*)\n  # Interix 3.5 installs completely hosed .la files for C++, so rather than\n  # hack all around it, let's just trust \"g++\" to DTRT.\n  _LT_TAGVAR(predep_objects,$1)=\n  _LT_TAGVAR(postdep_objects,$1)=\n  _LT_TAGVAR(postdeps,$1)=\n  ;;\n\nlinux*)\n  case `$CC -V 2>&1 | sed 5q` in\n  *Sun\\ C*)\n    # Sun C++ 5.9\n\n    # The more standards-conforming stlport4 library is\n    # incompatible with the Cstd library. Avoid specifying\n    # it if it's in CXXFLAGS. Ignore libCrun as\n    # -library=stlport4 depends on it.\n    case \" $CXX $CXXFLAGS \" in\n    *\" -library=stlport4 \"*)\n      solaris_use_stlport4=yes\n      ;;\n    esac\n\n    if test \"$solaris_use_stlport4\" != yes; then\n      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'\n    fi\n    ;;\n  esac\n  ;;\n\nsolaris*)\n  case $cc_basename in\n  CC* | sunCC*)\n    # The more standards-conforming stlport4 library is\n    # incompatible with the Cstd library. Avoid specifying\n    # it if it's in CXXFLAGS. Ignore libCrun as\n    # -library=stlport4 depends on it.\n    case \" $CXX $CXXFLAGS \" in\n    *\" -library=stlport4 \"*)\n      solaris_use_stlport4=yes\n      ;;\n    esac\n\n    # Adding this requires a known-good setup of shared libraries for\n    # Sun compiler versions before 5.6, else PIC objects from an old\n    # archive will be linked into the output, leading to subtle bugs.\n    if test \"$solaris_use_stlport4\" != yes; then\n      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'\n    fi\n    ;;\n  esac\n  ;;\nesac\n])\n\ncase \" $_LT_TAGVAR(postdeps, $1) \" in\n*\" -lc \"*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;\nesac\n _LT_TAGVAR(compiler_lib_search_dirs, $1)=\nif test -n \"${_LT_TAGVAR(compiler_lib_search_path, $1)}\"; then\n _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo \" ${_LT_TAGVAR(compiler_lib_search_path, $1)}\" | ${SED} -e 's! -L! !g' -e 's!^ !!'`\nfi\n_LT_TAGDECL([], [compiler_lib_search_dirs], [1],\n    [The directories searched by this compiler when creating a shared library])\n_LT_TAGDECL([], [predep_objects], [1],\n    [Dependencies to place before and after the objects being linked to\n    create a shared library])\n_LT_TAGDECL([], [postdep_objects], [1])\n_LT_TAGDECL([], [predeps], [1])\n_LT_TAGDECL([], [postdeps], [1])\n_LT_TAGDECL([], [compiler_lib_search_path], [1],\n    [The library search path used internally by the compiler when linking\n    a shared library])\n])# _LT_SYS_HIDDEN_LIBDEPS\n\n\n# _LT_LANG_F77_CONFIG([TAG])\n# --------------------------\n# Ensure that the configuration variables for a Fortran 77 compiler are\n# suitably defined.  These variables are subsequently used by _LT_CONFIG\n# to write the compiler configuration to `libtool'.\nm4_defun([_LT_LANG_F77_CONFIG],\n[AC_LANG_PUSH(Fortran 77)\nif test -z \"$F77\" || test \"X$F77\" = \"Xno\"; then\n  _lt_disable_F77=yes\nfi\n\n_LT_TAGVAR(archive_cmds_need_lc, $1)=no\n_LT_TAGVAR(allow_undefined_flag, $1)=\n_LT_TAGVAR(always_export_symbols, $1)=no\n_LT_TAGVAR(archive_expsym_cmds, $1)=\n_LT_TAGVAR(export_dynamic_flag_spec, $1)=\n_LT_TAGVAR(hardcode_direct, $1)=no\n_LT_TAGVAR(hardcode_direct_absolute, $1)=no\n_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=\n_LT_TAGVAR(hardcode_libdir_separator, $1)=\n_LT_TAGVAR(hardcode_minus_L, $1)=no\n_LT_TAGVAR(hardcode_automatic, $1)=no\n_LT_TAGVAR(inherit_rpath, $1)=no\n_LT_TAGVAR(module_cmds, $1)=\n_LT_TAGVAR(module_expsym_cmds, $1)=\n_LT_TAGVAR(link_all_deplibs, $1)=unknown\n_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds\n_LT_TAGVAR(reload_flag, $1)=$reload_flag\n_LT_TAGVAR(reload_cmds, $1)=$reload_cmds\n_LT_TAGVAR(no_undefined_flag, $1)=\n_LT_TAGVAR(whole_archive_flag_spec, $1)=\n_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no\n\n# Source file extension for f77 test sources.\nac_ext=f\n\n# Object file extension for compiled f77 test sources.\nobjext=o\n_LT_TAGVAR(objext, $1)=$objext\n\n# No sense in running all these tests if we already determined that\n# the F77 compiler isn't working.  Some variables (like enable_shared)\n# are currently assumed to apply to all compilers on this platform,\n# and will be corrupted by setting them based on a non-working compiler.\nif test \"$_lt_disable_F77\" != yes; then\n  # Code to be used in simple compile tests\n  lt_simple_compile_test_code=\"\\\n      subroutine t\n      return\n      end\n\"\n\n  # Code to be used in simple link tests\n  lt_simple_link_test_code=\"\\\n      program t\n      end\n\"\n\n  # ltmain only uses $CC for tagged configurations so make sure $CC is set.\n  _LT_TAG_COMPILER\n\n  # save warnings/boilerplate of simple test code\n  _LT_COMPILER_BOILERPLATE\n  _LT_LINKER_BOILERPLATE\n\n  # Allow CC to be a program name with arguments.\n  lt_save_CC=\"$CC\"\n  lt_save_GCC=$GCC\n  lt_save_CFLAGS=$CFLAGS\n  CC=${F77-\"f77\"}\n  CFLAGS=$FFLAGS\n  compiler=$CC\n  _LT_TAGVAR(compiler, $1)=$CC\n  _LT_CC_BASENAME([$compiler])\n  GCC=$G77\n  if test -n \"$compiler\"; then\n    AC_MSG_CHECKING([if libtool supports shared libraries])\n    AC_MSG_RESULT([$can_build_shared])\n\n    AC_MSG_CHECKING([whether to build shared libraries])\n    test \"$can_build_shared\" = \"no\" && enable_shared=no\n\n    # On AIX, shared libraries and static libraries use the same namespace, and\n    # are all built from PIC.\n    case $host_os in\n      aix3*)\n        test \"$enable_shared\" = yes && enable_static=no\n        if test -n \"$RANLIB\"; then\n          archive_cmds=\"$archive_cmds~\\$RANLIB \\$lib\"\n          postinstall_cmds='$RANLIB $lib'\n        fi\n        ;;\n      aix[[4-9]]*)\n\tif test \"$host_cpu\" != ia64 && test \"$aix_use_runtimelinking\" = no ; then\n\t  test \"$enable_shared\" = yes && enable_static=no\n\tfi\n        ;;\n    esac\n    AC_MSG_RESULT([$enable_shared])\n\n    AC_MSG_CHECKING([whether to build static libraries])\n    # Make sure either enable_shared or enable_static is yes.\n    test \"$enable_shared\" = yes || enable_static=yes\n    AC_MSG_RESULT([$enable_static])\n\n    _LT_TAGVAR(GCC, $1)=\"$G77\"\n    _LT_TAGVAR(LD, $1)=\"$LD\"\n\n    ## CAVEAT EMPTOR:\n    ## There is no encapsulation within the following macros, do not change\n    ## the running order or otherwise move them around unless you know exactly\n    ## what you are doing...\n    _LT_COMPILER_PIC($1)\n    _LT_COMPILER_C_O($1)\n    _LT_COMPILER_FILE_LOCKS($1)\n    _LT_LINKER_SHLIBS($1)\n    _LT_SYS_DYNAMIC_LINKER($1)\n    _LT_LINKER_HARDCODE_LIBPATH($1)\n\n    _LT_CONFIG($1)\n  fi # test -n \"$compiler\"\n\n  GCC=$lt_save_GCC\n  CC=\"$lt_save_CC\"\n  CFLAGS=\"$lt_save_CFLAGS\"\nfi # test \"$_lt_disable_F77\" != yes\n\nAC_LANG_POP\n])# _LT_LANG_F77_CONFIG\n\n\n# _LT_LANG_FC_CONFIG([TAG])\n# -------------------------\n# Ensure that the configuration variables for a Fortran compiler are\n# suitably defined.  These variables are subsequently used by _LT_CONFIG\n# to write the compiler configuration to `libtool'.\nm4_defun([_LT_LANG_FC_CONFIG],\n[AC_LANG_PUSH(Fortran)\n\nif test -z \"$FC\" || test \"X$FC\" = \"Xno\"; then\n  _lt_disable_FC=yes\nfi\n\n_LT_TAGVAR(archive_cmds_need_lc, $1)=no\n_LT_TAGVAR(allow_undefined_flag, $1)=\n_LT_TAGVAR(always_export_symbols, $1)=no\n_LT_TAGVAR(archive_expsym_cmds, $1)=\n_LT_TAGVAR(export_dynamic_flag_spec, $1)=\n_LT_TAGVAR(hardcode_direct, $1)=no\n_LT_TAGVAR(hardcode_direct_absolute, $1)=no\n_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=\n_LT_TAGVAR(hardcode_libdir_separator, $1)=\n_LT_TAGVAR(hardcode_minus_L, $1)=no\n_LT_TAGVAR(hardcode_automatic, $1)=no\n_LT_TAGVAR(inherit_rpath, $1)=no\n_LT_TAGVAR(module_cmds, $1)=\n_LT_TAGVAR(module_expsym_cmds, $1)=\n_LT_TAGVAR(link_all_deplibs, $1)=unknown\n_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds\n_LT_TAGVAR(reload_flag, $1)=$reload_flag\n_LT_TAGVAR(reload_cmds, $1)=$reload_cmds\n_LT_TAGVAR(no_undefined_flag, $1)=\n_LT_TAGVAR(whole_archive_flag_spec, $1)=\n_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no\n\n# Source file extension for fc test sources.\nac_ext=${ac_fc_srcext-f}\n\n# Object file extension for compiled fc test sources.\nobjext=o\n_LT_TAGVAR(objext, $1)=$objext\n\n# No sense in running all these tests if we already determined that\n# the FC compiler isn't working.  Some variables (like enable_shared)\n# are currently assumed to apply to all compilers on this platform,\n# and will be corrupted by setting them based on a non-working compiler.\nif test \"$_lt_disable_FC\" != yes; then\n  # Code to be used in simple compile tests\n  lt_simple_compile_test_code=\"\\\n      subroutine t\n      return\n      end\n\"\n\n  # Code to be used in simple link tests\n  lt_simple_link_test_code=\"\\\n      program t\n      end\n\"\n\n  # ltmain only uses $CC for tagged configurations so make sure $CC is set.\n  _LT_TAG_COMPILER\n\n  # save warnings/boilerplate of simple test code\n  _LT_COMPILER_BOILERPLATE\n  _LT_LINKER_BOILERPLATE\n\n  # Allow CC to be a program name with arguments.\n  lt_save_CC=\"$CC\"\n  lt_save_GCC=$GCC\n  lt_save_CFLAGS=$CFLAGS\n  CC=${FC-\"f95\"}\n  CFLAGS=$FCFLAGS\n  compiler=$CC\n  GCC=$ac_cv_fc_compiler_gnu\n\n  _LT_TAGVAR(compiler, $1)=$CC\n  _LT_CC_BASENAME([$compiler])\n\n  if test -n \"$compiler\"; then\n    AC_MSG_CHECKING([if libtool supports shared libraries])\n    AC_MSG_RESULT([$can_build_shared])\n\n    AC_MSG_CHECKING([whether to build shared libraries])\n    test \"$can_build_shared\" = \"no\" && enable_shared=no\n\n    # On AIX, shared libraries and static libraries use the same namespace, and\n    # are all built from PIC.\n    case $host_os in\n      aix3*)\n        test \"$enable_shared\" = yes && enable_static=no\n        if test -n \"$RANLIB\"; then\n          archive_cmds=\"$archive_cmds~\\$RANLIB \\$lib\"\n          postinstall_cmds='$RANLIB $lib'\n        fi\n        ;;\n      aix[[4-9]]*)\n\tif test \"$host_cpu\" != ia64 && test \"$aix_use_runtimelinking\" = no ; then\n\t  test \"$enable_shared\" = yes && enable_static=no\n\tfi\n        ;;\n    esac\n    AC_MSG_RESULT([$enable_shared])\n\n    AC_MSG_CHECKING([whether to build static libraries])\n    # Make sure either enable_shared or enable_static is yes.\n    test \"$enable_shared\" = yes || enable_static=yes\n    AC_MSG_RESULT([$enable_static])\n\n    _LT_TAGVAR(GCC, $1)=\"$ac_cv_fc_compiler_gnu\"\n    _LT_TAGVAR(LD, $1)=\"$LD\"\n\n    ## CAVEAT EMPTOR:\n    ## There is no encapsulation within the following macros, do not change\n    ## the running order or otherwise move them around unless you know exactly\n    ## what you are doing...\n    _LT_SYS_HIDDEN_LIBDEPS($1)\n    _LT_COMPILER_PIC($1)\n    _LT_COMPILER_C_O($1)\n    _LT_COMPILER_FILE_LOCKS($1)\n    _LT_LINKER_SHLIBS($1)\n    _LT_SYS_DYNAMIC_LINKER($1)\n    _LT_LINKER_HARDCODE_LIBPATH($1)\n\n    _LT_CONFIG($1)\n  fi # test -n \"$compiler\"\n\n  GCC=$lt_save_GCC\n  CC=$lt_save_CC\n  CFLAGS=$lt_save_CFLAGS\nfi # test \"$_lt_disable_FC\" != yes\n\nAC_LANG_POP\n])# _LT_LANG_FC_CONFIG\n\n\n# _LT_LANG_GCJ_CONFIG([TAG])\n# --------------------------\n# Ensure that the configuration variables for the GNU Java Compiler compiler\n# are suitably defined.  These variables are subsequently used by _LT_CONFIG\n# to write the compiler configuration to `libtool'.\nm4_defun([_LT_LANG_GCJ_CONFIG],\n[AC_REQUIRE([LT_PROG_GCJ])dnl\nAC_LANG_SAVE\n\n# Source file extension for Java test sources.\nac_ext=java\n\n# Object file extension for compiled Java test sources.\nobjext=o\n_LT_TAGVAR(objext, $1)=$objext\n\n# Code to be used in simple compile tests\nlt_simple_compile_test_code=\"class foo {}\"\n\n# Code to be used in simple link tests\nlt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'\n\n# ltmain only uses $CC for tagged configurations so make sure $CC is set.\n_LT_TAG_COMPILER\n\n# save warnings/boilerplate of simple test code\n_LT_COMPILER_BOILERPLATE\n_LT_LINKER_BOILERPLATE\n\n# Allow CC to be a program name with arguments.\nlt_save_CC=$CC\nlt_save_CFLAGS=$CFLAGS\nlt_save_GCC=$GCC\nGCC=yes\nCC=${GCJ-\"gcj\"}\nCFLAGS=$GCJFLAGS\ncompiler=$CC\n_LT_TAGVAR(compiler, $1)=$CC\n_LT_TAGVAR(LD, $1)=\"$LD\"\n_LT_CC_BASENAME([$compiler])\n\n# GCJ did not exist at the time GCC didn't implicitly link libc in.\n_LT_TAGVAR(archive_cmds_need_lc, $1)=no\n\n_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds\n_LT_TAGVAR(reload_flag, $1)=$reload_flag\n_LT_TAGVAR(reload_cmds, $1)=$reload_cmds\n\nif test -n \"$compiler\"; then\n  _LT_COMPILER_NO_RTTI($1)\n  _LT_COMPILER_PIC($1)\n  _LT_COMPILER_C_O($1)\n  _LT_COMPILER_FILE_LOCKS($1)\n  _LT_LINKER_SHLIBS($1)\n  _LT_LINKER_HARDCODE_LIBPATH($1)\n\n  _LT_CONFIG($1)\nfi\n\nAC_LANG_RESTORE\n\nGCC=$lt_save_GCC\nCC=$lt_save_CC\nCFLAGS=$lt_save_CFLAGS\n])# _LT_LANG_GCJ_CONFIG\n\n\n# _LT_LANG_GO_CONFIG([TAG])\n# --------------------------\n# Ensure that the configuration variables for the GNU Go compiler\n# are suitably defined.  These variables are subsequently used by _LT_CONFIG\n# to write the compiler configuration to `libtool'.\nm4_defun([_LT_LANG_GO_CONFIG],\n[AC_REQUIRE([LT_PROG_GO])dnl\nAC_LANG_SAVE\n\n# Source file extension for Go test sources.\nac_ext=go\n\n# Object file extension for compiled Go test sources.\nobjext=o\n_LT_TAGVAR(objext, $1)=$objext\n\n# Code to be used in simple compile tests\nlt_simple_compile_test_code=\"package main; func main() { }\"\n\n# Code to be used in simple link tests\nlt_simple_link_test_code='package main; func main() { }'\n\n# ltmain only uses $CC for tagged configurations so make sure $CC is set.\n_LT_TAG_COMPILER\n\n# save warnings/boilerplate of simple test code\n_LT_COMPILER_BOILERPLATE\n_LT_LINKER_BOILERPLATE\n\n# Allow CC to be a program name with arguments.\nlt_save_CC=$CC\nlt_save_CFLAGS=$CFLAGS\nlt_save_GCC=$GCC\nGCC=yes\nCC=${GOC-\"gccgo\"}\nCFLAGS=$GOFLAGS\ncompiler=$CC\n_LT_TAGVAR(compiler, $1)=$CC\n_LT_TAGVAR(LD, $1)=\"$LD\"\n_LT_CC_BASENAME([$compiler])\n\n# Go did not exist at the time GCC didn't implicitly link libc in.\n_LT_TAGVAR(archive_cmds_need_lc, $1)=no\n\n_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds\n_LT_TAGVAR(reload_flag, $1)=$reload_flag\n_LT_TAGVAR(reload_cmds, $1)=$reload_cmds\n\nif test -n \"$compiler\"; then\n  _LT_COMPILER_NO_RTTI($1)\n  _LT_COMPILER_PIC($1)\n  _LT_COMPILER_C_O($1)\n  _LT_COMPILER_FILE_LOCKS($1)\n  _LT_LINKER_SHLIBS($1)\n  _LT_LINKER_HARDCODE_LIBPATH($1)\n\n  _LT_CONFIG($1)\nfi\n\nAC_LANG_RESTORE\n\nGCC=$lt_save_GCC\nCC=$lt_save_CC\nCFLAGS=$lt_save_CFLAGS\n])# _LT_LANG_GO_CONFIG\n\n\n# _LT_LANG_RC_CONFIG([TAG])\n# -------------------------\n# Ensure that the configuration variables for the Windows resource compiler\n# are suitably defined.  These variables are subsequently used by _LT_CONFIG\n# to write the compiler configuration to `libtool'.\nm4_defun([_LT_LANG_RC_CONFIG],\n[AC_REQUIRE([LT_PROG_RC])dnl\nAC_LANG_SAVE\n\n# Source file extension for RC test sources.\nac_ext=rc\n\n# Object file extension for compiled RC test sources.\nobjext=o\n_LT_TAGVAR(objext, $1)=$objext\n\n# Code to be used in simple compile tests\nlt_simple_compile_test_code='sample MENU { MENUITEM \"&Soup\", 100, CHECKED }'\n\n# Code to be used in simple link tests\nlt_simple_link_test_code=\"$lt_simple_compile_test_code\"\n\n# ltmain only uses $CC for tagged configurations so make sure $CC is set.\n_LT_TAG_COMPILER\n\n# save warnings/boilerplate of simple test code\n_LT_COMPILER_BOILERPLATE\n_LT_LINKER_BOILERPLATE\n\n# Allow CC to be a program name with arguments.\nlt_save_CC=\"$CC\"\nlt_save_CFLAGS=$CFLAGS\nlt_save_GCC=$GCC\nGCC=\nCC=${RC-\"windres\"}\nCFLAGS=\ncompiler=$CC\n_LT_TAGVAR(compiler, $1)=$CC\n_LT_CC_BASENAME([$compiler])\n_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes\n\nif test -n \"$compiler\"; then\n  :\n  _LT_CONFIG($1)\nfi\n\nGCC=$lt_save_GCC\nAC_LANG_RESTORE\nCC=$lt_save_CC\nCFLAGS=$lt_save_CFLAGS\n])# _LT_LANG_RC_CONFIG\n\n\n# LT_PROG_GCJ\n# -----------\nAC_DEFUN([LT_PROG_GCJ],\n[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],\n  [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],\n    [AC_CHECK_TOOL(GCJ, gcj,)\n      test \"x${GCJFLAGS+set}\" = xset || GCJFLAGS=\"-g -O2\"\n      AC_SUBST(GCJFLAGS)])])[]dnl\n])\n\n# Old name:\nAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])\ndnl aclocal-1.4 backwards compatibility:\ndnl AC_DEFUN([LT_AC_PROG_GCJ], [])\n\n\n# LT_PROG_GO\n# ----------\nAC_DEFUN([LT_PROG_GO],\n[AC_CHECK_TOOL(GOC, gccgo,)\n])\n\n\n# LT_PROG_RC\n# ----------\nAC_DEFUN([LT_PROG_RC],\n[AC_CHECK_TOOL(RC, windres,)\n])\n\n# Old name:\nAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])\ndnl aclocal-1.4 backwards compatibility:\ndnl AC_DEFUN([LT_AC_PROG_RC], [])\n\n\n# _LT_DECL_EGREP\n# --------------\n# If we don't have a new enough Autoconf to choose the best grep\n# available, choose the one first in the user's PATH.\nm4_defun([_LT_DECL_EGREP],\n[AC_REQUIRE([AC_PROG_EGREP])dnl\nAC_REQUIRE([AC_PROG_FGREP])dnl\ntest -z \"$GREP\" && GREP=grep\n_LT_DECL([], [GREP], [1], [A grep program that handles long lines])\n_LT_DECL([], [EGREP], [1], [An ERE matcher])\n_LT_DECL([], [FGREP], [1], [A literal string matcher])\ndnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too\nAC_SUBST([GREP])\n])\n\n\n# _LT_DECL_OBJDUMP\n# --------------\n# If we don't have a new enough Autoconf to choose the best objdump\n# available, choose the one first in the user's PATH.\nm4_defun([_LT_DECL_OBJDUMP],\n[AC_CHECK_TOOL(OBJDUMP, objdump, false)\ntest -z \"$OBJDUMP\" && OBJDUMP=objdump\n_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])\nAC_SUBST([OBJDUMP])\n])\n\n# _LT_DECL_DLLTOOL\n# ----------------\n# Ensure DLLTOOL variable is set.\nm4_defun([_LT_DECL_DLLTOOL],\n[AC_CHECK_TOOL(DLLTOOL, dlltool, false)\ntest -z \"$DLLTOOL\" && DLLTOOL=dlltool\n_LT_DECL([], [DLLTOOL], [1], [DLL creation program])\nAC_SUBST([DLLTOOL])\n])\n\n# _LT_DECL_SED\n# ------------\n# Check for a fully-functional sed program, that truncates\n# as few characters as possible.  Prefer GNU sed if found.\nm4_defun([_LT_DECL_SED],\n[AC_PROG_SED\ntest -z \"$SED\" && SED=sed\nXsed=\"$SED -e 1s/^X//\"\n_LT_DECL([], [SED], [1], [A sed program that does not truncate output])\n_LT_DECL([], [Xsed], [\"\\$SED -e 1s/^X//\"],\n    [Sed that helps us avoid accidentally triggering echo(1) options like -n])\n])# _LT_DECL_SED\n\nm4_ifndef([AC_PROG_SED], [\n# NOTE: This macro has been submitted for inclusion into   #\n#  GNU Autoconf as AC_PROG_SED.  When it is available in   #\n#  a released version of Autoconf we should remove this    #\n#  macro and use it instead.                               #\n\nm4_defun([AC_PROG_SED],\n[AC_MSG_CHECKING([for a sed that does not truncate output])\nAC_CACHE_VAL(lt_cv_path_SED,\n[# Loop through the user's path and test for sed and gsed.\n# Then use that list of sed's as ones to test for truncation.\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n  for lt_ac_prog in sed gsed; do\n    for ac_exec_ext in '' $ac_executable_extensions; do\n      if $as_executable_p \"$as_dir/$lt_ac_prog$ac_exec_ext\"; then\n        lt_ac_sed_list=\"$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext\"\n      fi\n    done\n  done\ndone\nIFS=$as_save_IFS\nlt_ac_max=0\nlt_ac_count=0\n# Add /usr/xpg4/bin/sed as it is typically found on Solaris\n# along with /bin/sed that truncates output.\nfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do\n  test ! -f $lt_ac_sed && continue\n  cat /dev/null > conftest.in\n  lt_ac_count=0\n  echo $ECHO_N \"0123456789$ECHO_C\" >conftest.in\n  # Check for GNU sed and select it if it is found.\n  if \"$lt_ac_sed\" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then\n    lt_cv_path_SED=$lt_ac_sed\n    break\n  fi\n  while true; do\n    cat conftest.in conftest.in >conftest.tmp\n    mv conftest.tmp conftest.in\n    cp conftest.in conftest.nl\n    echo >>conftest.nl\n    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break\n    cmp -s conftest.out conftest.nl || break\n    # 10000 chars as input seems more than enough\n    test $lt_ac_count -gt 10 && break\n    lt_ac_count=`expr $lt_ac_count + 1`\n    if test $lt_ac_count -gt $lt_ac_max; then\n      lt_ac_max=$lt_ac_count\n      lt_cv_path_SED=$lt_ac_sed\n    fi\n  done\ndone\n])\nSED=$lt_cv_path_SED\nAC_SUBST([SED])\nAC_MSG_RESULT([$SED])\n])#AC_PROG_SED\n])#m4_ifndef\n\n# Old name:\nAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])\ndnl aclocal-1.4 backwards compatibility:\ndnl AC_DEFUN([LT_AC_PROG_SED], [])\n\n\n# _LT_CHECK_SHELL_FEATURES\n# ------------------------\n# Find out whether the shell is Bourne or XSI compatible,\n# or has some other useful features.\nm4_defun([_LT_CHECK_SHELL_FEATURES],\n[AC_MSG_CHECKING([whether the shell understands some XSI constructs])\n# Try some XSI features\nxsi_shell=no\n( _lt_dummy=\"a/b/c\"\n  test \"${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}\"${_lt_dummy%\"$_lt_dummy\"}, \\\n      = c,a/b,b/c, \\\n    && eval 'test $(( 1 + 1 )) -eq 2 \\\n    && test \"${#_lt_dummy}\" -eq 5' ) >/dev/null 2>&1 \\\n  && xsi_shell=yes\nAC_MSG_RESULT([$xsi_shell])\n_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])\n\nAC_MSG_CHECKING([whether the shell understands \"+=\"])\nlt_shell_append=no\n( foo=bar; set foo baz; eval \"$[1]+=\\$[2]\" && test \"$foo\" = barbaz ) \\\n    >/dev/null 2>&1 \\\n  && lt_shell_append=yes\nAC_MSG_RESULT([$lt_shell_append])\n_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])\n\nif ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then\n  lt_unset=unset\nelse\n  lt_unset=false\nfi\n_LT_DECL([], [lt_unset], [0], [whether the shell understands \"unset\"])dnl\n\n# test EBCDIC or ASCII\ncase `echo X|tr X '\\101'` in\n A) # ASCII based system\n    # \\n is not interpreted correctly by Solaris 8 /usr/ucb/tr\n  lt_SP2NL='tr \\040 \\012'\n  lt_NL2SP='tr \\015\\012 \\040\\040'\n  ;;\n *) # EBCDIC based system\n  lt_SP2NL='tr \\100 \\n'\n  lt_NL2SP='tr \\r\\n \\100\\100'\n  ;;\nesac\n_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl\n_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl\n])# _LT_CHECK_SHELL_FEATURES\n\n\n# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY)\n# ------------------------------------------------------\n# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and\n# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY.\nm4_defun([_LT_PROG_FUNCTION_REPLACE],\n[dnl {\nsed -e '/^$1 ()$/,/^} # $1 /c\\\n$1 ()\\\n{\\\nm4_bpatsubsts([$2], [$], [\\\\], [^\\([\t ]\\)], [\\\\\\1])\n} # Extended-shell $1 implementation' \"$cfgfile\" > $cfgfile.tmp \\\n  && mv -f \"$cfgfile.tmp\" \"$cfgfile\" \\\n    || (rm -f \"$cfgfile\" && cp \"$cfgfile.tmp\" \"$cfgfile\" && rm -f \"$cfgfile.tmp\")\ntest 0 -eq $? || _lt_function_replace_fail=:\n])\n\n\n# _LT_PROG_REPLACE_SHELLFNS\n# -------------------------\n# Replace existing portable implementations of several shell functions with\n# equivalent extended shell implementations where those features are available..\nm4_defun([_LT_PROG_REPLACE_SHELLFNS],\n[if test x\"$xsi_shell\" = xyes; then\n  _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl\n    case ${1} in\n      */*) func_dirname_result=\"${1%/*}${2}\" ;;\n      *  ) func_dirname_result=\"${3}\" ;;\n    esac])\n\n  _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl\n    func_basename_result=\"${1##*/}\"])\n\n  _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl\n    case ${1} in\n      */*) func_dirname_result=\"${1%/*}${2}\" ;;\n      *  ) func_dirname_result=\"${3}\" ;;\n    esac\n    func_basename_result=\"${1##*/}\"])\n\n  _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl\n    # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\n    # positional parameters, so assign one to ordinary parameter first.\n    func_stripname_result=${3}\n    func_stripname_result=${func_stripname_result#\"${1}\"}\n    func_stripname_result=${func_stripname_result%\"${2}\"}])\n\n  _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl\n    func_split_long_opt_name=${1%%=*}\n    func_split_long_opt_arg=${1#*=}])\n\n  _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl\n    func_split_short_opt_arg=${1#??}\n    func_split_short_opt_name=${1%\"$func_split_short_opt_arg\"}])\n\n  _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl\n    case ${1} in\n      *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\n      *)    func_lo2o_result=${1} ;;\n    esac])\n\n  _LT_PROG_FUNCTION_REPLACE([func_xform], [    func_xform_result=${1%.*}.lo])\n\n  _LT_PROG_FUNCTION_REPLACE([func_arith], [    func_arith_result=$(( $[*] ))])\n\n  _LT_PROG_FUNCTION_REPLACE([func_len], [    func_len_result=${#1}])\nfi\n\nif test x\"$lt_shell_append\" = xyes; then\n  _LT_PROG_FUNCTION_REPLACE([func_append], [    eval \"${1}+=\\\\${2}\"])\n\n  _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl\n    func_quote_for_eval \"${2}\"\ndnl m4 expansion turns \\\\\\\\ into \\\\, and then the shell eval turns that into \\\n    eval \"${1}+=\\\\\\\\ \\\\$func_quote_for_eval_result\"])\n\n  # Save a `func_append' function call where possible by direct use of '+='\n  sed -e 's%func_append \\([[a-zA-Z_]]\\{1,\\}\\) \"%\\1+=\"%g' $cfgfile > $cfgfile.tmp \\\n    && mv -f \"$cfgfile.tmp\" \"$cfgfile\" \\\n      || (rm -f \"$cfgfile\" && cp \"$cfgfile.tmp\" \"$cfgfile\" && rm -f \"$cfgfile.tmp\")\n  test 0 -eq $? || _lt_function_replace_fail=:\nelse\n  # Save a `func_append' function call even when '+=' is not available\n  sed -e 's%func_append \\([[a-zA-Z_]]\\{1,\\}\\) \"%\\1=\"$\\1%g' $cfgfile > $cfgfile.tmp \\\n    && mv -f \"$cfgfile.tmp\" \"$cfgfile\" \\\n      || (rm -f \"$cfgfile\" && cp \"$cfgfile.tmp\" \"$cfgfile\" && rm -f \"$cfgfile.tmp\")\n  test 0 -eq $? || _lt_function_replace_fail=:\nfi\n\nif test x\"$_lt_function_replace_fail\" = x\":\"; then\n  AC_MSG_WARN([Unable to substitute extended shell functions in $ofile])\nfi\n])\n\n# _LT_PATH_CONVERSION_FUNCTIONS\n# -----------------------------\n# Determine which file name conversion functions should be used by\n# func_to_host_file (and, implicitly, by func_to_host_path).  These are needed\n# for certain cross-compile configurations and native mingw.\nm4_defun([_LT_PATH_CONVERSION_FUNCTIONS],\n[AC_REQUIRE([AC_CANONICAL_HOST])dnl\nAC_REQUIRE([AC_CANONICAL_BUILD])dnl\nAC_MSG_CHECKING([how to convert $build file names to $host format])\nAC_CACHE_VAL(lt_cv_to_host_file_cmd,\n[case $host in\n  *-*-mingw* )\n    case $build in\n      *-*-mingw* ) # actually msys\n        lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32\n        ;;\n      *-*-cygwin* )\n        lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32\n        ;;\n      * ) # otherwise, assume *nix\n        lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32\n        ;;\n    esac\n    ;;\n  *-*-cygwin* )\n    case $build in\n      *-*-mingw* ) # actually msys\n        lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin\n        ;;\n      *-*-cygwin* )\n        lt_cv_to_host_file_cmd=func_convert_file_noop\n        ;;\n      * ) # otherwise, assume *nix\n        lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin\n        ;;\n    esac\n    ;;\n  * ) # unhandled hosts (and \"normal\" native builds)\n    lt_cv_to_host_file_cmd=func_convert_file_noop\n    ;;\nesac\n])\nto_host_file_cmd=$lt_cv_to_host_file_cmd\nAC_MSG_RESULT([$lt_cv_to_host_file_cmd])\n_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],\n         [0], [convert $build file names to $host format])dnl\n\nAC_MSG_CHECKING([how to convert $build file names to toolchain format])\nAC_CACHE_VAL(lt_cv_to_tool_file_cmd,\n[#assume ordinary cross tools, or native build.\nlt_cv_to_tool_file_cmd=func_convert_file_noop\ncase $host in\n  *-*-mingw* )\n    case $build in\n      *-*-mingw* ) # actually msys\n        lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32\n        ;;\n    esac\n    ;;\nesac\n])\nto_tool_file_cmd=$lt_cv_to_tool_file_cmd\nAC_MSG_RESULT([$lt_cv_to_tool_file_cmd])\n_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],\n         [0], [convert $build files to toolchain format])dnl\n])# _LT_PATH_CONVERSION_FUNCTIONS\n\n# Helper functions for option handling.                    -*- Autoconf -*-\n#\n#   Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation,\n#   Inc.\n#   Written by Gary V. Vaughan, 2004\n#\n# This file is free software; the Free Software Foundation gives\n# unlimited permission to copy and/or distribute it, with or without\n# modifications, as long as this notice is preserved.\n\n# serial 7 ltoptions.m4\n\n# This is to help aclocal find these macros, as it can't see m4_define.\nAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])\n\n\n# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)\n# ------------------------------------------\nm4_define([_LT_MANGLE_OPTION],\n[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])\n\n\n# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)\n# ---------------------------------------\n# Set option OPTION-NAME for macro MACRO-NAME, and if there is a\n# matching handler defined, dispatch to it.  Other OPTION-NAMEs are\n# saved as a flag.\nm4_define([_LT_SET_OPTION],\n[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl\nm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),\n        _LT_MANGLE_DEFUN([$1], [$2]),\n    [m4_warning([Unknown $1 option `$2'])])[]dnl\n])\n\n\n# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])\n# ------------------------------------------------------------\n# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.\nm4_define([_LT_IF_OPTION],\n[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])\n\n\n# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)\n# -------------------------------------------------------\n# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME\n# are set.\nm4_define([_LT_UNLESS_OPTIONS],\n[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),\n\t    [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),\n\t\t      [m4_define([$0_found])])])[]dnl\nm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3\n])[]dnl\n])\n\n\n# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)\n# ----------------------------------------\n# OPTION-LIST is a space-separated list of Libtool options associated\n# with MACRO-NAME.  If any OPTION has a matching handler declared with\n# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about\n# the unknown option and exit.\nm4_defun([_LT_SET_OPTIONS],\n[# Set options\nm4_foreach([_LT_Option], m4_split(m4_normalize([$2])),\n    [_LT_SET_OPTION([$1], _LT_Option)])\n\nm4_if([$1],[LT_INIT],[\n  dnl\n  dnl Simply set some default values (i.e off) if boolean options were not\n  dnl specified:\n  _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no\n  ])\n  _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no\n  ])\n  dnl\n  dnl If no reference was made to various pairs of opposing options, then\n  dnl we run the default mode handler for the pair.  For example, if neither\n  dnl `shared' nor `disable-shared' was passed, we enable building of shared\n  dnl archives by default:\n  _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])\n  _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])\n  _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])\n  _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],\n  \t\t   [_LT_ENABLE_FAST_INSTALL])\n  ])\n])# _LT_SET_OPTIONS\n\n\n\n# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)\n# -----------------------------------------\nm4_define([_LT_MANGLE_DEFUN],\n[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])\n\n\n# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)\n# -----------------------------------------------\nm4_define([LT_OPTION_DEFINE],\n[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl\n])# LT_OPTION_DEFINE\n\n\n# dlopen\n# ------\nLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes\n])\n\nAU_DEFUN([AC_LIBTOOL_DLOPEN],\n[_LT_SET_OPTION([LT_INIT], [dlopen])\nAC_DIAGNOSE([obsolete],\n[$0: Remove this warning and the call to _LT_SET_OPTION when you\nput the `dlopen' option into LT_INIT's first parameter.])\n])\n\ndnl aclocal-1.4 backwards compatibility:\ndnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])\n\n\n# win32-dll\n# ---------\n# Declare package support for building win32 dll's.\nLT_OPTION_DEFINE([LT_INIT], [win32-dll],\n[enable_win32_dll=yes\n\ncase $host in\n*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)\n  AC_CHECK_TOOL(AS, as, false)\n  AC_CHECK_TOOL(DLLTOOL, dlltool, false)\n  AC_CHECK_TOOL(OBJDUMP, objdump, false)\n  ;;\nesac\n\ntest -z \"$AS\" && AS=as\n_LT_DECL([], [AS],      [1], [Assembler program])dnl\n\ntest -z \"$DLLTOOL\" && DLLTOOL=dlltool\n_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl\n\ntest -z \"$OBJDUMP\" && OBJDUMP=objdump\n_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl\n])# win32-dll\n\nAU_DEFUN([AC_LIBTOOL_WIN32_DLL],\n[AC_REQUIRE([AC_CANONICAL_HOST])dnl\n_LT_SET_OPTION([LT_INIT], [win32-dll])\nAC_DIAGNOSE([obsolete],\n[$0: Remove this warning and the call to _LT_SET_OPTION when you\nput the `win32-dll' option into LT_INIT's first parameter.])\n])\n\ndnl aclocal-1.4 backwards compatibility:\ndnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])\n\n\n# _LT_ENABLE_SHARED([DEFAULT])\n# ----------------------------\n# implement the --enable-shared flag, and supports the `shared' and\n# `disable-shared' LT_INIT options.\n# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.\nm4_define([_LT_ENABLE_SHARED],\n[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl\nAC_ARG_ENABLE([shared],\n    [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],\n\t[build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],\n    [p=${PACKAGE-default}\n    case $enableval in\n    yes) enable_shared=yes ;;\n    no) enable_shared=no ;;\n    *)\n      enable_shared=no\n      # Look at the argument we got.  We use all the common list separators.\n      lt_save_ifs=\"$IFS\"; IFS=\"${IFS}$PATH_SEPARATOR,\"\n      for pkg in $enableval; do\n\tIFS=\"$lt_save_ifs\"\n\tif test \"X$pkg\" = \"X$p\"; then\n\t  enable_shared=yes\n\tfi\n      done\n      IFS=\"$lt_save_ifs\"\n      ;;\n    esac],\n    [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)\n\n    _LT_DECL([build_libtool_libs], [enable_shared], [0],\n\t[Whether or not to build shared libraries])\n])# _LT_ENABLE_SHARED\n\nLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])\nLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])\n\n# Old names:\nAC_DEFUN([AC_ENABLE_SHARED],\n[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])\n])\n\nAC_DEFUN([AC_DISABLE_SHARED],\n[_LT_SET_OPTION([LT_INIT], [disable-shared])\n])\n\nAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])\nAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])\n\ndnl aclocal-1.4 backwards compatibility:\ndnl AC_DEFUN([AM_ENABLE_SHARED], [])\ndnl AC_DEFUN([AM_DISABLE_SHARED], [])\n\n\n\n# _LT_ENABLE_STATIC([DEFAULT])\n# ----------------------------\n# implement the --enable-static flag, and support the `static' and\n# `disable-static' LT_INIT options.\n# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.\nm4_define([_LT_ENABLE_STATIC],\n[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl\nAC_ARG_ENABLE([static],\n    [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],\n\t[build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],\n    [p=${PACKAGE-default}\n    case $enableval in\n    yes) enable_static=yes ;;\n    no) enable_static=no ;;\n    *)\n     enable_static=no\n      # Look at the argument we got.  We use all the common list separators.\n      lt_save_ifs=\"$IFS\"; IFS=\"${IFS}$PATH_SEPARATOR,\"\n      for pkg in $enableval; do\n\tIFS=\"$lt_save_ifs\"\n\tif test \"X$pkg\" = \"X$p\"; then\n\t  enable_static=yes\n\tfi\n      done\n      IFS=\"$lt_save_ifs\"\n      ;;\n    esac],\n    [enable_static=]_LT_ENABLE_STATIC_DEFAULT)\n\n    _LT_DECL([build_old_libs], [enable_static], [0],\n\t[Whether or not to build static libraries])\n])# _LT_ENABLE_STATIC\n\nLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])\nLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])\n\n# Old names:\nAC_DEFUN([AC_ENABLE_STATIC],\n[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])\n])\n\nAC_DEFUN([AC_DISABLE_STATIC],\n[_LT_SET_OPTION([LT_INIT], [disable-static])\n])\n\nAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])\nAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])\n\ndnl aclocal-1.4 backwards compatibility:\ndnl AC_DEFUN([AM_ENABLE_STATIC], [])\ndnl AC_DEFUN([AM_DISABLE_STATIC], [])\n\n\n\n# _LT_ENABLE_FAST_INSTALL([DEFAULT])\n# ----------------------------------\n# implement the --enable-fast-install flag, and support the `fast-install'\n# and `disable-fast-install' LT_INIT options.\n# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.\nm4_define([_LT_ENABLE_FAST_INSTALL],\n[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl\nAC_ARG_ENABLE([fast-install],\n    [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],\n    [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],\n    [p=${PACKAGE-default}\n    case $enableval in\n    yes) enable_fast_install=yes ;;\n    no) enable_fast_install=no ;;\n    *)\n      enable_fast_install=no\n      # Look at the argument we got.  We use all the common list separators.\n      lt_save_ifs=\"$IFS\"; IFS=\"${IFS}$PATH_SEPARATOR,\"\n      for pkg in $enableval; do\n\tIFS=\"$lt_save_ifs\"\n\tif test \"X$pkg\" = \"X$p\"; then\n\t  enable_fast_install=yes\n\tfi\n      done\n      IFS=\"$lt_save_ifs\"\n      ;;\n    esac],\n    [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)\n\n_LT_DECL([fast_install], [enable_fast_install], [0],\n\t [Whether or not to optimize for fast installation])dnl\n])# _LT_ENABLE_FAST_INSTALL\n\nLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])\nLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])\n\n# Old names:\nAU_DEFUN([AC_ENABLE_FAST_INSTALL],\n[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])\nAC_DIAGNOSE([obsolete],\n[$0: Remove this warning and the call to _LT_SET_OPTION when you put\nthe `fast-install' option into LT_INIT's first parameter.])\n])\n\nAU_DEFUN([AC_DISABLE_FAST_INSTALL],\n[_LT_SET_OPTION([LT_INIT], [disable-fast-install])\nAC_DIAGNOSE([obsolete],\n[$0: Remove this warning and the call to _LT_SET_OPTION when you put\nthe `disable-fast-install' option into LT_INIT's first parameter.])\n])\n\ndnl aclocal-1.4 backwards compatibility:\ndnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])\ndnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])\n\n\n# _LT_WITH_PIC([MODE])\n# --------------------\n# implement the --with-pic flag, and support the `pic-only' and `no-pic'\n# LT_INIT options.\n# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.\nm4_define([_LT_WITH_PIC],\n[AC_ARG_WITH([pic],\n    [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],\n\t[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],\n    [lt_p=${PACKAGE-default}\n    case $withval in\n    yes|no) pic_mode=$withval ;;\n    *)\n      pic_mode=default\n      # Look at the argument we got.  We use all the common list separators.\n      lt_save_ifs=\"$IFS\"; IFS=\"${IFS}$PATH_SEPARATOR,\"\n      for lt_pkg in $withval; do\n\tIFS=\"$lt_save_ifs\"\n\tif test \"X$lt_pkg\" = \"X$lt_p\"; then\n\t  pic_mode=yes\n\tfi\n      done\n      IFS=\"$lt_save_ifs\"\n      ;;\n    esac],\n    [pic_mode=default])\n\ntest -z \"$pic_mode\" && pic_mode=m4_default([$1], [default])\n\n_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl\n])# _LT_WITH_PIC\n\nLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])\nLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])\n\n# Old name:\nAU_DEFUN([AC_LIBTOOL_PICMODE],\n[_LT_SET_OPTION([LT_INIT], [pic-only])\nAC_DIAGNOSE([obsolete],\n[$0: Remove this warning and the call to _LT_SET_OPTION when you\nput the `pic-only' option into LT_INIT's first parameter.])\n])\n\ndnl aclocal-1.4 backwards compatibility:\ndnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])\n\n\nm4_define([_LTDL_MODE], [])\nLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],\n\t\t [m4_define([_LTDL_MODE], [nonrecursive])])\nLT_OPTION_DEFINE([LTDL_INIT], [recursive],\n\t\t [m4_define([_LTDL_MODE], [recursive])])\nLT_OPTION_DEFINE([LTDL_INIT], [subproject],\n\t\t [m4_define([_LTDL_MODE], [subproject])])\n\nm4_define([_LTDL_TYPE], [])\nLT_OPTION_DEFINE([LTDL_INIT], [installable],\n\t\t [m4_define([_LTDL_TYPE], [installable])])\nLT_OPTION_DEFINE([LTDL_INIT], [convenience],\n\t\t [m4_define([_LTDL_TYPE], [convenience])])\n\n# ltsugar.m4 -- libtool m4 base layer.                         -*-Autoconf-*-\n#\n# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.\n# Written by Gary V. Vaughan, 2004\n#\n# This file is free software; the Free Software Foundation gives\n# unlimited permission to copy and/or distribute it, with or without\n# modifications, as long as this notice is preserved.\n\n# serial 6 ltsugar.m4\n\n# This is to help aclocal find these macros, as it can't see m4_define.\nAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])\n\n\n# lt_join(SEP, ARG1, [ARG2...])\n# -----------------------------\n# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their\n# associated separator.\n# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier\n# versions in m4sugar had bugs.\nm4_define([lt_join],\n[m4_if([$#], [1], [],\n       [$#], [2], [[$2]],\n       [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])\nm4_define([_lt_join],\n[m4_if([$#$2], [2], [],\n       [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])\n\n\n# lt_car(LIST)\n# lt_cdr(LIST)\n# ------------\n# Manipulate m4 lists.\n# These macros are necessary as long as will still need to support\n# Autoconf-2.59 which quotes differently.\nm4_define([lt_car], [[$1]])\nm4_define([lt_cdr],\n[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],\n       [$#], 1, [],\n       [m4_dquote(m4_shift($@))])])\nm4_define([lt_unquote], $1)\n\n\n# lt_append(MACRO-NAME, STRING, [SEPARATOR])\n# ------------------------------------------\n# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.\n# Note that neither SEPARATOR nor STRING are expanded; they are appended\n# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).\n# No SEPARATOR is output if MACRO-NAME was previously undefined (different\n# than defined and empty).\n#\n# This macro is needed until we can rely on Autoconf 2.62, since earlier\n# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.\nm4_define([lt_append],\n[m4_define([$1],\n\t   m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])\n\n\n\n# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])\n# ----------------------------------------------------------\n# Produce a SEP delimited list of all paired combinations of elements of\n# PREFIX-LIST with SUFFIX1 through SUFFIXn.  Each element of the list\n# has the form PREFIXmINFIXSUFFIXn.\n# Needed until we can rely on m4_combine added in Autoconf 2.62.\nm4_define([lt_combine],\n[m4_if(m4_eval([$# > 3]), [1],\n       [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl\n[[m4_foreach([_Lt_prefix], [$2],\n\t     [m4_foreach([_Lt_suffix],\n\t\t]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,\n\t[_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])\n\n\n# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])\n# -----------------------------------------------------------------------\n# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited\n# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.\nm4_define([lt_if_append_uniq],\n[m4_ifdef([$1],\n\t  [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],\n\t\t [lt_append([$1], [$2], [$3])$4],\n\t\t [$5])],\n\t  [lt_append([$1], [$2], [$3])$4])])\n\n\n# lt_dict_add(DICT, KEY, VALUE)\n# -----------------------------\nm4_define([lt_dict_add],\n[m4_define([$1($2)], [$3])])\n\n\n# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)\n# --------------------------------------------\nm4_define([lt_dict_add_subkey],\n[m4_define([$1($2:$3)], [$4])])\n\n\n# lt_dict_fetch(DICT, KEY, [SUBKEY])\n# ----------------------------------\nm4_define([lt_dict_fetch],\n[m4_ifval([$3],\n\tm4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),\n    m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])\n\n\n# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])\n# -----------------------------------------------------------------\nm4_define([lt_if_dict_fetch],\n[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],\n\t[$5],\n    [$6])])\n\n\n# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])\n# --------------------------------------------------------------\nm4_define([lt_dict_filter],\n[m4_if([$5], [], [],\n  [lt_join(m4_quote(m4_default([$4], [[, ]])),\n           lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),\n\t\t      [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl\n])\n\n# ltversion.m4 -- version numbers\t\t\t-*- Autoconf -*-\n#\n#   Copyright (C) 2004 Free Software Foundation, Inc.\n#   Written by Scott James Remnant, 2004\n#\n# This file is free software; the Free Software Foundation gives\n# unlimited permission to copy and/or distribute it, with or without\n# modifications, as long as this notice is preserved.\n\n# @configure_input@\n\n# serial 3337 ltversion.m4\n# This file is part of GNU Libtool\n\nm4_define([LT_PACKAGE_VERSION], [2.4.2])\nm4_define([LT_PACKAGE_REVISION], [1.3337])\n\nAC_DEFUN([LTVERSION_VERSION],\n[macro_version='2.4.2'\nmacro_revision='1.3337'\n_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])\n_LT_DECL(, macro_revision, 0)\n])\n\n# lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-\n#\n#   Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.\n#   Written by Scott James Remnant, 2004.\n#\n# This file is free software; the Free Software Foundation gives\n# unlimited permission to copy and/or distribute it, with or without\n# modifications, as long as this notice is preserved.\n\n# serial 5 lt~obsolete.m4\n\n# These exist entirely to fool aclocal when bootstrapping libtool.\n#\n# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)\n# which have later been changed to m4_define as they aren't part of the\n# exported API, or moved to Autoconf or Automake where they belong.\n#\n# The trouble is, aclocal is a bit thick.  It'll see the old AC_DEFUN\n# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us\n# using a macro with the same name in our local m4/libtool.m4 it'll\n# pull the old libtool.m4 in (it doesn't see our shiny new m4_define\n# and doesn't know about Autoconf macros at all.)\n#\n# So we provide this file, which has a silly filename so it's always\n# included after everything else.  This provides aclocal with the\n# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything\n# because those macros already exist, or will be overwritten later.\n# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. \n#\n# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.\n# Yes, that means every name once taken will need to remain here until\n# we give up compatibility with versions before 1.7, at which point\n# we need to keep only those names which we still refer to.\n\n# This is to help aclocal find these macros, as it can't see m4_define.\nAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])\n\nm4_ifndef([AC_LIBTOOL_LINKER_OPTION],\t[AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])\nm4_ifndef([AC_PROG_EGREP],\t\t[AC_DEFUN([AC_PROG_EGREP])])\nm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH],\t[AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])\nm4_ifndef([_LT_AC_SHELL_INIT],\t\t[AC_DEFUN([_LT_AC_SHELL_INIT])])\nm4_ifndef([_LT_AC_SYS_LIBPATH_AIX],\t[AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])\nm4_ifndef([_LT_PROG_LTMAIN],\t\t[AC_DEFUN([_LT_PROG_LTMAIN])])\nm4_ifndef([_LT_AC_TAGVAR],\t\t[AC_DEFUN([_LT_AC_TAGVAR])])\nm4_ifndef([AC_LTDL_ENABLE_INSTALL],\t[AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])\nm4_ifndef([AC_LTDL_PREOPEN],\t\t[AC_DEFUN([AC_LTDL_PREOPEN])])\nm4_ifndef([_LT_AC_SYS_COMPILER],\t[AC_DEFUN([_LT_AC_SYS_COMPILER])])\nm4_ifndef([_LT_AC_LOCK],\t\t[AC_DEFUN([_LT_AC_LOCK])])\nm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE],\t[AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])\nm4_ifndef([_LT_AC_TRY_DLOPEN_SELF],\t[AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])\nm4_ifndef([AC_LIBTOOL_PROG_CC_C_O],\t[AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])\nm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])\nm4_ifndef([AC_LIBTOOL_OBJDIR],\t\t[AC_DEFUN([AC_LIBTOOL_OBJDIR])])\nm4_ifndef([AC_LTDL_OBJDIR],\t\t[AC_DEFUN([AC_LTDL_OBJDIR])])\nm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])\nm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP],\t[AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])\nm4_ifndef([AC_PATH_MAGIC],\t\t[AC_DEFUN([AC_PATH_MAGIC])])\nm4_ifndef([AC_PROG_LD_GNU],\t\t[AC_DEFUN([AC_PROG_LD_GNU])])\nm4_ifndef([AC_PROG_LD_RELOAD_FLAG],\t[AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])\nm4_ifndef([AC_DEPLIBS_CHECK_METHOD],\t[AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])\nm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])\nm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])\nm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])\nm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS],\t[AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])\nm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP],\t[AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])\nm4_ifndef([LT_AC_PROG_EGREP],\t\t[AC_DEFUN([LT_AC_PROG_EGREP])])\nm4_ifndef([LT_AC_PROG_SED],\t\t[AC_DEFUN([LT_AC_PROG_SED])])\nm4_ifndef([_LT_CC_BASENAME],\t\t[AC_DEFUN([_LT_CC_BASENAME])])\nm4_ifndef([_LT_COMPILER_BOILERPLATE],\t[AC_DEFUN([_LT_COMPILER_BOILERPLATE])])\nm4_ifndef([_LT_LINKER_BOILERPLATE],\t[AC_DEFUN([_LT_LINKER_BOILERPLATE])])\nm4_ifndef([_AC_PROG_LIBTOOL],\t\t[AC_DEFUN([_AC_PROG_LIBTOOL])])\nm4_ifndef([AC_LIBTOOL_SETUP],\t\t[AC_DEFUN([AC_LIBTOOL_SETUP])])\nm4_ifndef([_LT_AC_CHECK_DLFCN],\t\t[AC_DEFUN([_LT_AC_CHECK_DLFCN])])\nm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER],\t[AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])\nm4_ifndef([_LT_AC_TAGCONFIG],\t\t[AC_DEFUN([_LT_AC_TAGCONFIG])])\nm4_ifndef([AC_DISABLE_FAST_INSTALL],\t[AC_DEFUN([AC_DISABLE_FAST_INSTALL])])\nm4_ifndef([_LT_AC_LANG_CXX],\t\t[AC_DEFUN([_LT_AC_LANG_CXX])])\nm4_ifndef([_LT_AC_LANG_F77],\t\t[AC_DEFUN([_LT_AC_LANG_F77])])\nm4_ifndef([_LT_AC_LANG_GCJ],\t\t[AC_DEFUN([_LT_AC_LANG_GCJ])])\nm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG],\t[AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])\nm4_ifndef([_LT_AC_LANG_C_CONFIG],\t[AC_DEFUN([_LT_AC_LANG_C_CONFIG])])\nm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG],\t[AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])\nm4_ifndef([_LT_AC_LANG_CXX_CONFIG],\t[AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])\nm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG],\t[AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])\nm4_ifndef([_LT_AC_LANG_F77_CONFIG],\t[AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])\nm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG],\t[AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])\nm4_ifndef([_LT_AC_LANG_GCJ_CONFIG],\t[AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])\nm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG],\t[AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])\nm4_ifndef([_LT_AC_LANG_RC_CONFIG],\t[AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])\nm4_ifndef([AC_LIBTOOL_CONFIG],\t\t[AC_DEFUN([AC_LIBTOOL_CONFIG])])\nm4_ifndef([_LT_AC_FILE_LTDLL_C],\t[AC_DEFUN([_LT_AC_FILE_LTDLL_C])])\nm4_ifndef([_LT_REQUIRED_DARWIN_CHECKS],\t[AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])\nm4_ifndef([_LT_AC_PROG_CXXCPP],\t\t[AC_DEFUN([_LT_AC_PROG_CXXCPP])])\nm4_ifndef([_LT_PREPARE_SED_QUOTE_VARS],\t[AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])\nm4_ifndef([_LT_PROG_ECHO_BACKSLASH],\t[AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])\nm4_ifndef([_LT_PROG_F77],\t\t[AC_DEFUN([_LT_PROG_F77])])\nm4_ifndef([_LT_PROG_FC],\t\t[AC_DEFUN([_LT_PROG_FC])])\nm4_ifndef([_LT_PROG_CXX],\t\t[AC_DEFUN([_LT_PROG_CXX])])\n\n# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-\n# serial 1 (pkg-config-0.24)\n# \n# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.\n#\n# This program is free software; you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation; either version 2 of the License, or\n# (at your option) any later version.\n#\n# This program is distributed in the hope that it will be useful, but\n# WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n# General Public License for more details.\n#\n# You should have received a copy of the GNU General Public License\n# along with this program; if not, write to the Free Software\n# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n#\n# As a special exception to the GNU General Public License, if you\n# distribute this file as part of a program that contains a\n# configuration script generated by Autoconf, you may include it under\n# the same distribution terms that you use for the rest of that program.\n\n# PKG_PROG_PKG_CONFIG([MIN-VERSION])\n# ----------------------------------\nAC_DEFUN([PKG_PROG_PKG_CONFIG],\n[m4_pattern_forbid([^_?PKG_[A-Z_]+$])\nm4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])\nm4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])\nAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])\nAC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])\nAC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])\n\nif test \"x$ac_cv_env_PKG_CONFIG_set\" != \"xset\"; then\n\tAC_PATH_TOOL([PKG_CONFIG], [pkg-config])\nfi\nif test -n \"$PKG_CONFIG\"; then\n\t_pkg_min_version=m4_default([$1], [0.9.0])\n\tAC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])\n\tif $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then\n\t\tAC_MSG_RESULT([yes])\n\telse\n\t\tAC_MSG_RESULT([no])\n\t\tPKG_CONFIG=\"\"\n\tfi\nfi[]dnl\n])# PKG_PROG_PKG_CONFIG\n\n# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])\n#\n# Check to see whether a particular set of modules exists.  Similar\n# to PKG_CHECK_MODULES(), but does not set variables or print errors.\n#\n# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])\n# only at the first occurrence in configure.ac, so if the first place\n# it's called might be skipped (such as if it is within an \"if\", you\n# have to call PKG_CHECK_EXISTS manually\n# --------------------------------------------------------------\nAC_DEFUN([PKG_CHECK_EXISTS],\n[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl\nif test -n \"$PKG_CONFIG\" && \\\n    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors \"$1\"]); then\n  m4_default([$2], [:])\nm4_ifvaln([$3], [else\n  $3])dnl\nfi])\n\n# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])\n# ---------------------------------------------\nm4_define([_PKG_CONFIG],\n[if test -n \"$$1\"; then\n    pkg_cv_[]$1=\"$$1\"\n elif test -n \"$PKG_CONFIG\"; then\n    PKG_CHECK_EXISTS([$3],\n                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 \"$3\" 2>/dev/null`\n\t\t      test \"x$?\" != \"x0\" && pkg_failed=yes ],\n\t\t     [pkg_failed=yes])\n else\n    pkg_failed=untried\nfi[]dnl\n])# _PKG_CONFIG\n\n# _PKG_SHORT_ERRORS_SUPPORTED\n# -----------------------------\nAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],\n[AC_REQUIRE([PKG_PROG_PKG_CONFIG])\nif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then\n        _pkg_short_errors_supported=yes\nelse\n        _pkg_short_errors_supported=no\nfi[]dnl\n])# _PKG_SHORT_ERRORS_SUPPORTED\n\n\n# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],\n# [ACTION-IF-NOT-FOUND])\n#\n#\n# Note that if there is a possibility the first call to\n# PKG_CHECK_MODULES might not happen, you should be sure to include an\n# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac\n#\n#\n# --------------------------------------------------------------\nAC_DEFUN([PKG_CHECK_MODULES],\n[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl\nAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl\nAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl\n\npkg_failed=no\nAC_MSG_CHECKING([for $1])\n\n_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])\n_PKG_CONFIG([$1][_LIBS], [libs], [$2])\n\nm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS\nand $1[]_LIBS to avoid the need to call pkg-config.\nSee the pkg-config man page for more details.])\n\nif test $pkg_failed = yes; then\n   \tAC_MSG_RESULT([no])\n        _PKG_SHORT_ERRORS_SUPPORTED\n        if test $_pkg_short_errors_supported = yes; then\n\t        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs \"$2\" 2>&1`\n        else \n\t        $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs \"$2\" 2>&1`\n        fi\n\t# Put the nasty error message in config.log where it belongs\n\techo \"$$1[]_PKG_ERRORS\" >&AS_MESSAGE_LOG_FD\n\n\tm4_default([$4], [AC_MSG_ERROR(\n[Package requirements ($2) were not met:\n\n$$1_PKG_ERRORS\n\nConsider adjusting the PKG_CONFIG_PATH environment variable if you\ninstalled software in a non-standard prefix.\n\n_PKG_TEXT])[]dnl\n        ])\nelif test $pkg_failed = untried; then\n     \tAC_MSG_RESULT([no])\n\tm4_default([$4], [AC_MSG_FAILURE(\n[The pkg-config script could not be found or is too old.  Make sure it\nis in your PATH or set the PKG_CONFIG environment variable to the full\npath to pkg-config.\n\n_PKG_TEXT\n\nTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl\n        ])\nelse\n\t$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS\n\t$1[]_LIBS=$pkg_cv_[]$1[]_LIBS\n        AC_MSG_RESULT([yes])\n\t$3\nfi[]dnl\n])# PKG_CHECK_MODULES\n\n"
  },
  {
    "path": "thirdparty/portaudio/bindings/cpp/AUTHORS",
    "content": ""
  },
  {
    "path": "thirdparty/portaudio/bindings/cpp/COPYING",
    "content": "PortAudio Portable Real-Time Audio Library\nCopyright (c) 1999-2006 Ross Bencina and Phil Burk\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files\n(the \"Software\"), to deal in the Software without restriction,\nincluding without limitation the rights to use, copy, modify, merge,\npublish, distribute, sublicense, and/or sell copies of the Software,\nand to permit persons to whom the Software is furnished to do so,\nsubject to the following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\nANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\nCONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n\nThe text above constitutes the entire PortAudio license; however, \nthe PortAudio community also makes the following non-binding requests:\n\nAny person wishing to distribute modifications to the Software is\nrequested to send the modifications to the original developer so that\nthey can be incorporated into the canonical version. It is also \nrequested that these non-binding requests be included along with the \nlicense above.\n"
  },
  {
    "path": "thirdparty/portaudio/bindings/cpp/ChangeLog",
    "content": "Note: Because PortAudioCpp is now in the main PortAudio SVN repository, having these per-release changelogs probably doesn't make much sense anymore. Perhaps it's better to just note mayor changes by date from now on.\n\nPortAudioCpp v19 revision 16 06/05/22:\n\n\tmblaauw:\n\t- Added up-to-date MSVC 6.0 projects created by David Moore. Besides MSVC 6.0 users, MSVC 7.0 users may use these projects and automatically convert them to MSVC 7.0 projects.\n\t- Changed the code and projects (MSVC 7.1 only) to be up-to-date with PortAudio's new directory structure.\n\t- Added equivalents of the PaAsio_GetInputChannelName() and PaAsio_GetOutputChannelName() functions to the AsioDeviceAdapter wrapper-class (missing functions pointed out by David Moore).\n\t- Added code to PortAudio's main SVN repository.\n\nPortAudioCpp v19 revision 15 (unknown release date):\n\n\tmblaauw:\n\t- Changed some exception handling code in HostApi's constructor.\n\t- Added accessors to PortAudio PaStream from PortAudioCpp Stream (their absence being pointed out\n\tby Tom Jordan).\n\t- Fixed a bug/typo in MemFunToCallbackInterfaceAdapter::init() thanks to Fredrik Viklund.\n\t- Fixed issue with concrete Stream classes possibly throwing an exception and fixed documentation w.r.t. this.\n\t- Moved files to portaudio/binding/cpp/. Made new msvc 7.1 projects to reflect the change and removed msvc 6.0 \n\tand 7.0 projects (because I can no longer maintain them myself). Gnu projects will probably need updating.\n\nPortAudioCpp v19 revision 14 03/10/24:\n\n\tmblaauw:\n\t- Fixed some error handling bugs in Stream and System (pointed out by Tom Jordan).\n\t- Updated documentation a little (main page).\n\t- Fixed order of members so initializer list was in the right order in \n\tStreamParameters (pointed out by Ludwig Schwardt).\n\t- Added new lines at EOF's (as indicated by Ludwig Schwardt).\n\nPortAudioCpp v19 revision 13 03/10/19:\n\n\tlschwardt:\n\t- Added build files for GNU/Linux.\n\t- Fixed bug in Exception where the inherited what() member function (and destructor) had looser \n\texception specification (namely no exception specification, i.e. could throw anything) than \n\tthe std::exception base class's what() member function (which had throw(), i.e. no-throw guarantee).\n\t- Changed the iterators so that they have a set of public typedefs instead of deriving the C++ standard \n\tlibrary std::iterator<> struct. G++ 2.95 doesn't support std::exception<> and composition-by-aggregation \n\tis preferred over composition-by-inheritance in this case.\n\t- Changed some minor things to avoid G++ warning messages.\n\n\tmblaauw:\n\t- Renamed this file (/WHATSNEW.txt) to /CHANGELOG.\n\t- Renamed /PA_ISSUES.txt to /PA_ISSUES.\n\t- Added /INSTALL file with some build info for GNU/Linux and VC6.\n\t- Added MSVC 6.0 projects for building PortAudioCpp as a statically or dynamically linkable library.\n\t- Moved build files to /build/(gnu/ or vc6/).\n\t- Moved Doxygen configuration files to /doc/ and output to /doc/api_reference/.\n\t- Added a /doc/README with some info how to generate Doxygen documentation.\n\nPortAudioCpp v19 revision 12 03/09/02:\n\n\tmblaauw:\n\t- Updated code to reflect changes on V19-devel CVS branch.\n\t- Fixed some typos in the documentation.\n\nPortAudioCpp v19 revision 11 03/07/31:\n\n\tmblaauw:\n\t- Renamed SingleDirecionStreamParameters to DirectionSpecificStreamParameters.\n\t- Implemented BlockingStream.\n\t- Updated code to reflect recent changes to PortAudio V19-devel.\n\t- Fixed a potential memory leak when an exception was thrown in the HostApi \n\tconstructor.\n\t- Renamed ``Latency'' to ``BufferSize'' in AsioDeviceAdapter.\n\t- Updated class documentation.\n\nPortAudioCpp v19 revision 10 03/07/18:\n\n\tmblaauw:\n\t- SingleDirectionStreamParameters now has a (static) null() method.\n\t- StreamParameters uses references for the direction-specific stream parameters \n\tinstead of pointers (use null() method (above) instead of NULL).\n\t- StreamParameters and SingleDirectionStreamParameters must now be fully specified \n\tand now default values are used (because this was not very useful in general and \n\tonly made things more complex).\n\t- Updated documentation.\n\nPortAudioCpp v19 revision 09 03/06/25:\n\n\tmblaauw:\n\t- Changed some things in SingleDirectionStreamParameters to ease it's usage.\n\t- Placed all SingleDirectionStreamParameters stuff into a separate file.\n\t+ Totally redid the callback stuff, now it's less awkward and supports C++ functions.\n\nPortAudioCpp v19 revision 08 03/06/20:\n\n\tmblaauw:\n\t- Made deconstructors for Device and HostApi private.\n\t+ Added a AsioDeviceWrapper host api specific device extension class.\n\t- Refactored Exception into a Exception base class and PaException and PaCppException \n\tderived classes.\n\t- Added ASIO specific device info to the devs.cxx example.\n\t- Fixed a bug in System::hostApiCount() and System::defaultHostApi().\n\t+ Moved Device::null to System::nullDevice.\n\t- Fixed some bugs in Device and System.\n\nPortAudioCpp v19 revision 07 03/06/08:\n\n\tmblaauw:\n\t- Updated some doxy comments.\n\t+ Renamed CbXyz to CallbackXyz.\n\t+ Renamed all ``configurations'' to ``parameters''.\n\t+ Renamed HalfDuplexStreamConfiguration to SingleDirectionStreamConfiguration.\n\t- Renamed SingleDirectionStreamParameters::streamParameters() to \n\tSingleDirectionStreamParameters::paSteamParameters.\n\t- Added a non-constant version of SingleDirectionStreamParameters::paStreamParameters().\n\t- A few improvements to SingleDirectionStreamParameters.\n\t- Allowed AutoSystem to be created without initializing the System singleton \n\t(using a ctor flag).\n\t- Added a BlockingStream class (not implemented for now).\n\t- Fixed many bugs in the implementation of the iterators.\n\t- Fixed a bug in Device::operator==().\n\t+ Added a C++ version of the patest_sine.c test/example.\n\t- Added a ctor for StreamParameters for a default half-duplex stream.\n\t- Added SingleDirectionStreamParameters::setDevice() and setNumChannels().\n\t- Renamed System::numHostApis() to System::hostApiCount().\n\t+ Rewrote the iterators and related classes. They are now fully STL compliant. The System now \n\thas a static array of all HostApis and all Devices. Only the System can create HostApis and \n\tDevices and they are non-copyable now. All HostApis and Devices are now passed by-reference.\n\t- Renamed (System::) getVersion() to version() and getVersionText() to versionText().\n\t- Renamed (Device::) numXyzChannels() to maxXyzChannels().\n\t- Changed some stuff in StreamParameters.\n\t+ Added a C++ version of the patest_devs.c test/example.\n\nPortAudioCpp v19 revision 06 03/06/04:\n\n\tmblaauw:\n\t+ Added this file to the project (roughly, a `+' denotes a major change, a `-' a minor change).\n\t- Added System::deviceByIndex(), useful when a Device's index is stored for instance.\n\t- Renamed System::hostApiFromTypeId() to System::hostApiByTypeId().\n\t- Updated and added some Doxygen documentation.\n\t- Made Stream::usedIntputLatency(), Stream::usedOutputLatency() and \n\tStream::usedSampleRate() throw an paInternalError equivalent exception instead of paBadStreamPtr.\n\t- Changed exception handling in Stream::open() functions. They now follow the PA error handling \n\tmechanism better and a couple of bugs regarding ownership of objects were fixed.\n\t- Renamed Device::isDefaultXyzDevice() to Device::isSystemDefaultXyzDevice().\n\t- Added Device::isHostApiDefaultXyzDevice().\n\t- Added StreamConfiguration::unsetFlag().\n\t- Removed CUSTOM from SampleDataFormat.\n\t- System::hostApiByTypeId() now throws an paInternalError if the type id was out-of-range; this \n\tis a temporary work-around (see comments).\n\t- Changed CbInterface to use paCallbackFun() instead of operator()().\n\t- Renamed ``object'' to ``instance'' in CbMemFunAdapter.hxx.\n\t- Added StreamConfiguration::setXyzHostApiSpecificSampleFormat().\n\t- Added StreamConfiguration::isXyzSampleFormatHostApiSpecific().\n\t- Changed error handling in System::terminate(), it can now throw an Exception.\n\t- Added error handling in System::defaultHostApi().\n\t- Added error handling in System::hostApisEnd().\n\t- Changed some (but probably not all) C casts to C++ casts to avoid confusion with a \n\tcertain Python person.\n\t- Renamed RaiiSystem to AutoSystem (class and file) as this is a come common convention.\n\t- Renamed System::numDevices() to System::deviceCount() to be more compatible with PortAudio \n\t(although PortAudio uses Pa_CountDevices() instead, see comment).\n\t- Renamed HostApi::numDevices() to HostApi::deviceCount().\n\t- Changed INC_ to INCLUDED_ in the header multiple include guards.\n\t- Changed the order of functions in the StreamConfiguration class' header.\n\t- Written some more info in PortAudioCpp.hxx (Doxygen).\n\t- Added CallbackStream.hxx and CallbackStream.cxx files.\n\t+ Refactored StreamConfiguration to remove the duplication which was there. There is now a \n\tHalfDuplexStreamConfiguration class. Also made some improvements to these classes while \n\tdoing the refactoring.\n\t+ Moved all code files to source/portaudiocpp/ and changed includes.\n\t+ Moved all header files to include/portaudiocpp/ to easy a binary build if needed. The project \n\tmust be set to have .../include/ as a path to look for includes.\n\t+ Refactored the Stream class into a Stream base class and a CallbackStream derived class.\n\t- Renamed Stream::usingXyz() to Stream::xyz().\n\t- Updated some doxy comments.\n\t- Changed ``using namespace portaudio'' in .cxx files to ``namespace portaudio { ... }''.\n\nPortAudioCpp v19 revision 05 03/04/09:\n\n\tmblaauw:\n\t- Initial release on the PortAudio mailinglist.\n\n\n\n"
  },
  {
    "path": "thirdparty/portaudio/bindings/cpp/INSTALL",
    "content": "Installation Instructions\n*************************\n\nCopyright (C) 1994-1996, 1999-2002, 2004-2013 Free Software Foundation,\nInc.\n\n   Copying and distribution of this file, with or without modification,\nare permitted in any medium without royalty provided the copyright\nnotice and this notice are preserved.  This file is offered as-is,\nwithout warranty of any kind.\n\nBasic Installation\n==================\n\n   Briefly, the shell command `./configure && make && make install'\nshould configure, build, and install this package.  The following\nmore-detailed instructions are generic; see the `README' file for\ninstructions specific to this package.  Some packages provide this\n`INSTALL' file but do not implement all of the features documented\nbelow.  The lack of an optional feature in a given package is not\nnecessarily a bug.  More recommendations for GNU packages can be found\nin *note Makefile Conventions: (standards)Makefile Conventions.\n\n   The `configure' shell script attempts to guess correct values for\nvarious system-dependent variables used during compilation.  It uses\nthose values to create a `Makefile' in each directory of the package.\nIt may also create one or more `.h' files containing system-dependent\ndefinitions.  Finally, it creates a shell script `config.status' that\nyou can run in the future to recreate the current configuration, and a\nfile `config.log' containing compiler output (useful mainly for\ndebugging `configure').\n\n   It can also use an optional file (typically called `config.cache'\nand enabled with `--cache-file=config.cache' or simply `-C') that saves\nthe results of its tests to speed up reconfiguring.  Caching is\ndisabled by default to prevent problems with accidental use of stale\ncache files.\n\n   If you need to do unusual things to compile the package, please try\nto figure out how `configure' could check whether to do them, and mail\ndiffs or instructions to the address given in the `README' so they can\nbe considered for the next release.  If you are using the cache, and at\nsome point `config.cache' contains results you don't want to keep, you\nmay remove or edit it.\n\n   The file `configure.ac' (or `configure.in') is used to create\n`configure' by a program called `autoconf'.  You need `configure.ac' if\nyou want to change it or regenerate `configure' using a newer version\nof `autoconf'.\n\n   The simplest way to compile this package is:\n\n  1. `cd' to the directory containing the package's source code and type\n     `./configure' to configure the package for your system.\n\n     Running `configure' might take a while.  While running, it prints\n     some messages telling which features it is checking for.\n\n  2. Type `make' to compile the package.\n\n  3. Optionally, type `make check' to run any self-tests that come with\n     the package, generally using the just-built uninstalled binaries.\n\n  4. Type `make install' to install the programs and any data files and\n     documentation.  When installing into a prefix owned by root, it is\n     recommended that the package be configured and built as a regular\n     user, and only the `make install' phase executed with root\n     privileges.\n\n  5. Optionally, type `make installcheck' to repeat any self-tests, but\n     this time using the binaries in their final installed location.\n     This target does not install anything.  Running this target as a\n     regular user, particularly if the prior `make install' required\n     root privileges, verifies that the installation completed\n     correctly.\n\n  6. You can remove the program binaries and object files from the\n     source code directory by typing `make clean'.  To also remove the\n     files that `configure' created (so you can compile the package for\n     a different kind of computer), type `make distclean'.  There is\n     also a `make maintainer-clean' target, but that is intended mainly\n     for the package's developers.  If you use it, you may have to get\n     all sorts of other programs in order to regenerate files that came\n     with the distribution.\n\n  7. Often, you can also type `make uninstall' to remove the installed\n     files again.  In practice, not all packages have tested that\n     uninstallation works correctly, even though it is required by the\n     GNU Coding Standards.\n\n  8. Some packages, particularly those that use Automake, provide `make\n     distcheck', which can by used by developers to test that all other\n     targets like `make install' and `make uninstall' work correctly.\n     This target is generally not run by end users.\n\nCompilers and Options\n=====================\n\n   Some systems require unusual options for compilation or linking that\nthe `configure' script does not know about.  Run `./configure --help'\nfor details on some of the pertinent environment variables.\n\n   You can give `configure' initial values for configuration parameters\nby setting variables in the command line or in the environment.  Here\nis an example:\n\n     ./configure CC=c99 CFLAGS=-g LIBS=-lposix\n\n   *Note Defining Variables::, for more details.\n\nCompiling For Multiple Architectures\n====================================\n\n   You can compile the package for more than one kind of computer at the\nsame time, by placing the object files for each architecture in their\nown directory.  To do this, you can use GNU `make'.  `cd' to the\ndirectory where you want the object files and executables to go and run\nthe `configure' script.  `configure' automatically checks for the\nsource code in the directory that `configure' is in and in `..'.  This\nis known as a \"VPATH\" build.\n\n   With a non-GNU `make', it is safer to compile the package for one\narchitecture at a time in the source code directory.  After you have\ninstalled the package for one architecture, use `make distclean' before\nreconfiguring for another architecture.\n\n   On MacOS X 10.5 and later systems, you can create libraries and\nexecutables that work on multiple system types--known as \"fat\" or\n\"universal\" binaries--by specifying multiple `-arch' options to the\ncompiler but only a single `-arch' option to the preprocessor.  Like\nthis:\n\n     ./configure CC=\"gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64\" \\\n                 CXX=\"g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64\" \\\n                 CPP=\"gcc -E\" CXXCPP=\"g++ -E\"\n\n   This is not guaranteed to produce working output in all cases, you\nmay have to build one architecture at a time and combine the results\nusing the `lipo' tool if you have problems.\n\nInstallation Names\n==================\n\n   By default, `make install' installs the package's commands under\n`/usr/local/bin', include files under `/usr/local/include', etc.  You\ncan specify an installation prefix other than `/usr/local' by giving\n`configure' the option `--prefix=PREFIX', where PREFIX must be an\nabsolute file name.\n\n   You can specify separate installation prefixes for\narchitecture-specific files and architecture-independent files.  If you\npass the option `--exec-prefix=PREFIX' to `configure', the package uses\nPREFIX as the prefix for installing programs and libraries.\nDocumentation and other data files still use the regular prefix.\n\n   In addition, if you use an unusual directory layout you can give\noptions like `--bindir=DIR' to specify different values for particular\nkinds of files.  Run `configure --help' for a list of the directories\nyou can set and what kinds of files go in them.  In general, the\ndefault for these options is expressed in terms of `${prefix}', so that\nspecifying just `--prefix' will affect all of the other directory\nspecifications that were not explicitly provided.\n\n   The most portable way to affect installation locations is to pass the\ncorrect locations to `configure'; however, many packages provide one or\nboth of the following shortcuts of passing variable assignments to the\n`make install' command line to change installation locations without\nhaving to reconfigure or recompile.\n\n   The first method involves providing an override variable for each\naffected directory.  For example, `make install\nprefix=/alternate/directory' will choose an alternate location for all\ndirectory configuration variables that were expressed in terms of\n`${prefix}'.  Any directories that were specified during `configure',\nbut not in terms of `${prefix}', must each be overridden at install\ntime for the entire installation to be relocated.  The approach of\nmakefile variable overrides for each directory variable is required by\nthe GNU Coding Standards, and ideally causes no recompilation.\nHowever, some platforms have known limitations with the semantics of\nshared libraries that end up requiring recompilation when using this\nmethod, particularly noticeable in packages that use GNU Libtool.\n\n   The second method involves providing the `DESTDIR' variable.  For\nexample, `make install DESTDIR=/alternate/directory' will prepend\n`/alternate/directory' before all installation names.  The approach of\n`DESTDIR' overrides is not required by the GNU Coding Standards, and\ndoes not work on platforms that have drive letters.  On the other hand,\nit does better at avoiding recompilation issues, and works well even\nwhen some directory options were not specified in terms of `${prefix}'\nat `configure' time.\n\nOptional Features\n=================\n\n   If the package supports it, you can cause programs to be installed\nwith an extra prefix or suffix on their names by giving `configure' the\noption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.\n\n   Some packages pay attention to `--enable-FEATURE' options to\n`configure', where FEATURE indicates an optional part of the package.\nThey may also pay attention to `--with-PACKAGE' options, where PACKAGE\nis something like `gnu-as' or `x' (for the X Window System).  The\n`README' should mention any `--enable-' and `--with-' options that the\npackage recognizes.\n\n   For packages that use the X Window System, `configure' can usually\nfind the X include and library files automatically, but if it doesn't,\nyou can use the `configure' options `--x-includes=DIR' and\n`--x-libraries=DIR' to specify their locations.\n\n   Some packages offer the ability to configure how verbose the\nexecution of `make' will be.  For these packages, running `./configure\n--enable-silent-rules' sets the default to minimal output, which can be\noverridden with `make V=1'; while running `./configure\n--disable-silent-rules' sets the default to verbose, which can be\noverridden with `make V=0'.\n\nParticular systems\n==================\n\n   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU\nCC is not installed, it is recommended to use the following options in\norder to use an ANSI C compiler:\n\n     ./configure CC=\"cc -Ae -D_XOPEN_SOURCE=500\"\n\nand if that doesn't work, install pre-built binaries of GCC for HP-UX.\n\n   HP-UX `make' updates targets which have the same time stamps as\ntheir prerequisites, which makes it generally unusable when shipped\ngenerated files such as `configure' are involved.  Use GNU `make'\ninstead.\n\n   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot\nparse its `<wchar.h>' header file.  The option `-nodtk' can be used as\na workaround.  If GNU CC is not installed, it is therefore recommended\nto try\n\n     ./configure CC=\"cc\"\n\nand if that doesn't work, try\n\n     ./configure CC=\"cc -nodtk\"\n\n   On Solaris, don't put `/usr/ucb' early in your `PATH'.  This\ndirectory contains several dysfunctional programs; working variants of\nthese programs are available in `/usr/bin'.  So, if you need `/usr/ucb'\nin your `PATH', put it _after_ `/usr/bin'.\n\n   On Haiku, software installed for all users goes in `/boot/common',\nnot `/usr/local'.  It is recommended to use the following options:\n\n     ./configure --prefix=/boot/common\n\nSpecifying the System Type\n==========================\n\n   There may be some features `configure' cannot figure out\nautomatically, but needs to determine by the type of machine the package\nwill run on.  Usually, assuming the package is built to be run on the\n_same_ architectures, `configure' can figure that out, but if it prints\na message saying it cannot guess the machine type, give it the\n`--build=TYPE' option.  TYPE can either be a short name for the system\ntype, such as `sun4', or a canonical name which has the form:\n\n     CPU-COMPANY-SYSTEM\n\nwhere SYSTEM can have one of these forms:\n\n     OS\n     KERNEL-OS\n\n   See the file `config.sub' for the possible values of each field.  If\n`config.sub' isn't included in this package, then this package doesn't\nneed to know the machine type.\n\n   If you are _building_ compiler tools for cross-compiling, you should\nuse the option `--target=TYPE' to select the type of system they will\nproduce code for.\n\n   If you want to _use_ a cross compiler, that generates code for a\nplatform different from the build platform, you should specify the\n\"host\" platform (i.e., that on which the generated programs will\neventually be run) with `--host=TYPE'.\n\nSharing Defaults\n================\n\n   If you want to set default values for `configure' scripts to share,\nyou can create a site shell script called `config.site' that gives\ndefault values for variables like `CC', `cache_file', and `prefix'.\n`configure' looks for `PREFIX/share/config.site' if it exists, then\n`PREFIX/etc/config.site' if it exists.  Or, you can set the\n`CONFIG_SITE' environment variable to the location of the site script.\nA warning: not all `configure' scripts look for a site script.\n\nDefining Variables\n==================\n\n   Variables not defined in a site shell script can be set in the\nenvironment passed to `configure'.  However, some packages may run\nconfigure again during the build, and the customized values of these\nvariables may be lost.  In order to avoid this problem, you should set\nthem in the `configure' command line, using `VAR=value'.  For example:\n\n     ./configure CC=/usr/local2/bin/gcc\n\ncauses the specified `gcc' to be used as the C compiler (unless it is\noverridden in the site shell script).\n\nUnfortunately, this technique does not work for `CONFIG_SHELL' due to\nan Autoconf limitation.  Until the limitation is lifted, you can use\nthis workaround:\n\n     CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash\n\n`configure' Invocation\n======================\n\n   `configure' recognizes the following options to control how it\noperates.\n\n`--help'\n`-h'\n     Print a summary of all of the options to `configure', and exit.\n\n`--help=short'\n`--help=recursive'\n     Print a summary of the options unique to this package's\n     `configure', and exit.  The `short' variant lists options used\n     only in the top level, while the `recursive' variant lists options\n     also present in any nested packages.\n\n`--version'\n`-V'\n     Print the version of Autoconf used to generate the `configure'\n     script, and exit.\n\n`--cache-file=FILE'\n     Enable the cache: use and save the results of the tests in FILE,\n     traditionally `config.cache'.  FILE defaults to `/dev/null' to\n     disable caching.\n\n`--config-cache'\n`-C'\n     Alias for `--cache-file=config.cache'.\n\n`--quiet'\n`--silent'\n`-q'\n     Do not print messages saying which checks are being made.  To\n     suppress all normal output, redirect it to `/dev/null' (any error\n     messages will still be shown).\n\n`--srcdir=DIR'\n     Look for the package's source code in directory DIR.  Usually\n     `configure' can determine that directory automatically.\n\n`--prefix=DIR'\n     Use DIR as the installation prefix.  *note Installation Names::\n     for more details, including other options available for fine-tuning\n     the installation locations.\n\n`--no-create'\n`-n'\n     Run the configure checks, but stop before creating any output\n     files.\n\n`configure' also accepts some other, not widely useful, options.  Run\n`configure --help' for more details.\n"
  },
  {
    "path": "thirdparty/portaudio/bindings/cpp/Makefile.am",
    "content": "SUBDIRS = lib include bin \n#doc\n\nEXTRA_DIST = portaudiocpp.pc\n\npkgconfigdir = $(libdir)/pkgconfig\npkgconfig_DATA = portaudiocpp.pc\n"
  },
  {
    "path": "thirdparty/portaudio/bindings/cpp/Makefile.in",
    "content": "# Makefile.in generated by automake 1.14.1 from Makefile.am.\n# @configure_input@\n\n# Copyright (C) 1994-2013 Free Software Foundation, Inc.\n\n# This Makefile.in is free software; the Free Software Foundation\n# gives unlimited permission to copy and/or distribute it,\n# with or without modifications, as long as this notice is preserved.\n\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY, to the extent permitted by law; without\n# even the implied warranty of MERCHANTABILITY or FITNESS FOR A\n# PARTICULAR PURPOSE.\n\n@SET_MAKE@\n\nVPATH = @srcdir@\nam__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'\nam__make_running_with_option = \\\n  case $${target_option-} in \\\n      ?) ;; \\\n      *) echo \"am__make_running_with_option: internal error: invalid\" \\\n              \"target option '$${target_option-}' specified\" >&2; \\\n         exit 1;; \\\n  esac; \\\n  has_opt=no; \\\n  sane_makeflags=$$MAKEFLAGS; \\\n  if $(am__is_gnu_make); then \\\n    sane_makeflags=$$MFLAGS; \\\n  else \\\n    case $$MAKEFLAGS in \\\n      *\\\\[\\ \\\t]*) \\\n        bs=\\\\; \\\n        sane_makeflags=`printf '%s\\n' \"$$MAKEFLAGS\" \\\n          | sed \"s/$$bs$$bs[$$bs $$bs\t]*//g\"`;; \\\n    esac; \\\n  fi; \\\n  skip_next=no; \\\n  strip_trailopt () \\\n  { \\\n    flg=`printf '%s\\n' \"$$flg\" | sed \"s/$$1.*$$//\"`; \\\n  }; \\\n  for flg in $$sane_makeflags; do \\\n    test $$skip_next = yes && { skip_next=no; continue; }; \\\n    case $$flg in \\\n      *=*|--*) continue;; \\\n        -*I) strip_trailopt 'I'; skip_next=yes;; \\\n      -*I?*) strip_trailopt 'I';; \\\n        -*O) strip_trailopt 'O'; skip_next=yes;; \\\n      -*O?*) strip_trailopt 'O';; \\\n        -*l) strip_trailopt 'l'; skip_next=yes;; \\\n      -*l?*) strip_trailopt 'l';; \\\n      -[dEDm]) skip_next=yes;; \\\n      -[JT]) skip_next=yes;; \\\n    esac; \\\n    case $$flg in \\\n      *$$target_option*) has_opt=yes; break;; \\\n    esac; \\\n  done; \\\n  test $$has_opt = yes\nam__make_dryrun = (target_option=n; $(am__make_running_with_option))\nam__make_keepgoing = (target_option=k; $(am__make_running_with_option))\npkgdatadir = $(datadir)/@PACKAGE@\npkgincludedir = $(includedir)/@PACKAGE@\npkglibdir = $(libdir)/@PACKAGE@\npkglibexecdir = $(libexecdir)/@PACKAGE@\nam__cd = CDPATH=\"$${ZSH_VERSION+.}$(PATH_SEPARATOR)\" && cd\ninstall_sh_DATA = $(install_sh) -c -m 644\ninstall_sh_PROGRAM = $(install_sh) -c\ninstall_sh_SCRIPT = $(install_sh) -c\nINSTALL_HEADER = $(INSTALL_DATA)\ntransform = $(program_transform_name)\nNORMAL_INSTALL = :\nPRE_INSTALL = :\nPOST_INSTALL = :\nNORMAL_UNINSTALL = :\nPRE_UNINSTALL = :\nPOST_UNINSTALL = :\nbuild_triplet = @build@\nhost_triplet = @host@\nsubdir = .\nDIST_COMMON = INSTALL NEWS README AUTHORS ChangeLog \\\n\t$(srcdir)/Makefile.in $(srcdir)/Makefile.am \\\n\t$(top_srcdir)/configure $(am__configure_deps) \\\n\t$(srcdir)/portaudiocpp.pc.in COPYING \\\n\t$(top_srcdir)/../../compile $(top_srcdir)/../../config.guess \\\n\t$(top_srcdir)/../../config.sub $(top_srcdir)/../../install-sh \\\n\t$(top_srcdir)/../../ltmain.sh $(top_srcdir)/../../missing\nACLOCAL_M4 = $(top_srcdir)/aclocal.m4\nam__aclocal_m4_deps = $(top_srcdir)/configure.ac\nam__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \\\n\t$(ACLOCAL_M4)\nam__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \\\n configure.lineno config.status.lineno\nmkinstalldirs = $(install_sh) -d\nCONFIG_CLEAN_FILES = portaudiocpp.pc\nCONFIG_CLEAN_VPATH_FILES =\nAM_V_P = $(am__v_P_@AM_V@)\nam__v_P_ = $(am__v_P_@AM_DEFAULT_V@)\nam__v_P_0 = false\nam__v_P_1 = :\nAM_V_GEN = $(am__v_GEN_@AM_V@)\nam__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)\nam__v_GEN_0 = @echo \"  GEN     \" $@;\nam__v_GEN_1 = \nAM_V_at = $(am__v_at_@AM_V@)\nam__v_at_ = $(am__v_at_@AM_DEFAULT_V@)\nam__v_at_0 = @\nam__v_at_1 = \nSOURCES =\nDIST_SOURCES =\nRECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \\\n\tctags-recursive dvi-recursive html-recursive info-recursive \\\n\tinstall-data-recursive install-dvi-recursive \\\n\tinstall-exec-recursive install-html-recursive \\\n\tinstall-info-recursive install-pdf-recursive \\\n\tinstall-ps-recursive install-recursive installcheck-recursive \\\n\tinstalldirs-recursive pdf-recursive ps-recursive \\\n\ttags-recursive uninstall-recursive\nam__can_run_installinfo = \\\n  case $$AM_UPDATE_INFO_DIR in \\\n    n|no|NO) false;; \\\n    *) (install-info --version) >/dev/null 2>&1;; \\\n  esac\nam__vpath_adj_setup = srcdirstrip=`echo \"$(srcdir)\" | sed 's|.|.|g'`;\nam__vpath_adj = case $$p in \\\n    $(srcdir)/*) f=`echo \"$$p\" | sed \"s|^$$srcdirstrip/||\"`;; \\\n    *) f=$$p;; \\\n  esac;\nam__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;\nam__install_max = 40\nam__nobase_strip_setup = \\\n  srcdirstrip=`echo \"$(srcdir)\" | sed 's/[].[^$$\\\\*|]/\\\\\\\\&/g'`\nam__nobase_strip = \\\n  for p in $$list; do echo \"$$p\"; done | sed -e \"s|$$srcdirstrip/||\"\nam__nobase_list = $(am__nobase_strip_setup); \\\n  for p in $$list; do echo \"$$p $$p\"; done | \\\n  sed \"s| $$srcdirstrip/| |;\"' / .*\\//!s/ .*/ ./; s,\\( .*\\)/[^/]*$$,\\1,' | \\\n  $(AWK) 'BEGIN { files[\".\"] = \"\" } { files[$$2] = files[$$2] \" \" $$1; \\\n    if (++n[$$2] == $(am__install_max)) \\\n      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = \"\" } } \\\n    END { for (dir in files) print dir, files[dir] }'\nam__base_list = \\\n  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\\n/ /g' | \\\n  sed '$$!N;$$!N;$$!N;$$!N;s/\\n/ /g'\nam__uninstall_files_from_dir = { \\\n  test -z \"$$files\" \\\n    || { test ! -d \"$$dir\" && test ! -f \"$$dir\" && test ! -r \"$$dir\"; } \\\n    || { echo \" ( cd '$$dir' && rm -f\" $$files \")\"; \\\n         $(am__cd) \"$$dir\" && rm -f $$files; }; \\\n  }\nam__installdirs = \"$(DESTDIR)$(pkgconfigdir)\"\nDATA = $(pkgconfig_DATA)\nRECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive\t\\\n  distclean-recursive maintainer-clean-recursive\nam__recursive_targets = \\\n  $(RECURSIVE_TARGETS) \\\n  $(RECURSIVE_CLEAN_TARGETS) \\\n  $(am__extra_recursive_targets)\nAM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \\\n\tcscope distdir dist dist-all distcheck\nam__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)\n# Read a list of newline-separated strings from the standard input,\n# and print each of them once, without duplicates.  Input order is\n# *not* preserved.\nam__uniquify_input = $(AWK) '\\\n  BEGIN { nonempty = 0; } \\\n  { items[$$0] = 1; nonempty = 1; } \\\n  END { if (nonempty) { for (i in items) print i; }; } \\\n'\n# Make sure the list of sources is unique.  This is necessary because,\n# e.g., the same source file might be shared among _SOURCES variables\n# for different programs/libraries.\nam__define_uniq_tagged_files = \\\n  list='$(am__tagged_files)'; \\\n  unique=`for i in $$list; do \\\n    if test -f \"$$i\"; then echo $$i; else echo $(srcdir)/$$i; fi; \\\n  done | $(am__uniquify_input)`\nETAGS = etags\nCTAGS = ctags\nCSCOPE = cscope\nDIST_SUBDIRS = $(SUBDIRS)\nDISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)\ndistdir = $(PACKAGE)-$(VERSION)\ntop_distdir = $(distdir)\nam__remove_distdir = \\\n  if test -d \"$(distdir)\"; then \\\n    find \"$(distdir)\" -type d ! -perm -200 -exec chmod u+w {} ';' \\\n      && rm -rf \"$(distdir)\" \\\n      || { sleep 5 && rm -rf \"$(distdir)\"; }; \\\n  else :; fi\nam__post_remove_distdir = $(am__remove_distdir)\nam__relativize = \\\n  dir0=`pwd`; \\\n  sed_first='s,^\\([^/]*\\)/.*$$,\\1,'; \\\n  sed_rest='s,^[^/]*/*,,'; \\\n  sed_last='s,^.*/\\([^/]*\\)$$,\\1,'; \\\n  sed_butlast='s,/*[^/]*$$,,'; \\\n  while test -n \"$$dir1\"; do \\\n    first=`echo \"$$dir1\" | sed -e \"$$sed_first\"`; \\\n    if test \"$$first\" != \".\"; then \\\n      if test \"$$first\" = \"..\"; then \\\n        dir2=`echo \"$$dir0\" | sed -e \"$$sed_last\"`/\"$$dir2\"; \\\n        dir0=`echo \"$$dir0\" | sed -e \"$$sed_butlast\"`; \\\n      else \\\n        first2=`echo \"$$dir2\" | sed -e \"$$sed_first\"`; \\\n        if test \"$$first2\" = \"$$first\"; then \\\n          dir2=`echo \"$$dir2\" | sed -e \"$$sed_rest\"`; \\\n        else \\\n          dir2=\"../$$dir2\"; \\\n        fi; \\\n        dir0=\"$$dir0\"/\"$$first\"; \\\n      fi; \\\n    fi; \\\n    dir1=`echo \"$$dir1\" | sed -e \"$$sed_rest\"`; \\\n  done; \\\n  reldir=\"$$dir2\"\nDIST_ARCHIVES = $(distdir).tar.gz\nGZIP_ENV = --best\nDIST_TARGETS = dist-gzip\ndistuninstallcheck_listfiles = find . -type f -print\nam__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \\\n  | sed 's|^\\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'\ndistcleancheck_listfiles = find . -type f -print\nACLOCAL = @ACLOCAL@\nAMTAR = @AMTAR@\nAM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@\nAR = @AR@\nAS = @AS@\nAUTOCONF = @AUTOCONF@\nAUTOHEADER = @AUTOHEADER@\nAUTOMAKE = @AUTOMAKE@\nAWK = @AWK@\nCC = @CC@\nCCDEPMODE = @CCDEPMODE@\nCFLAGS = @CFLAGS@\nCPP = @CPP@\nCPPFLAGS = @CPPFLAGS@\nCXX = @CXX@\nCXXCPP = @CXXCPP@\nCXXDEPMODE = @CXXDEPMODE@\nCXXFLAGS = @CXXFLAGS@\nCYGPATH_W = @CYGPATH_W@\nDEFAULT_INCLUDES = @DEFAULT_INCLUDES@\nDEFS = @DEFS@\nDEPDIR = @DEPDIR@\nDLLTOOL = @DLLTOOL@\nDSYMUTIL = @DSYMUTIL@\nDUMPBIN = @DUMPBIN@\nECHO_C = @ECHO_C@\nECHO_N = @ECHO_N@\nECHO_T = @ECHO_T@\nEGREP = @EGREP@\nEXEEXT = @EXEEXT@\nFGREP = @FGREP@\nGREP = @GREP@\nINSTALL = @INSTALL@\nINSTALL_DATA = @INSTALL_DATA@\nINSTALL_PROGRAM = @INSTALL_PROGRAM@\nINSTALL_SCRIPT = @INSTALL_SCRIPT@\nINSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@\nLD = @LD@\nLDFLAGS = @LDFLAGS@\nLIBOBJS = @LIBOBJS@\nLIBS = @LIBS@\nLIBTOOL = @LIBTOOL@\nLIPO = @LIPO@\nLN_S = @LN_S@\nLTLIBOBJS = @LTLIBOBJS@\nLT_VERSION_INFO = @LT_VERSION_INFO@\nMAINT = @MAINT@\nMAKEINFO = @MAKEINFO@\nMANIFEST_TOOL = @MANIFEST_TOOL@\nMKDIR_P = @MKDIR_P@\nNM = @NM@\nNMEDIT = @NMEDIT@\nOBJDUMP = @OBJDUMP@\nOBJEXT = @OBJEXT@\nOTOOL = @OTOOL@\nOTOOL64 = @OTOOL64@\nPACKAGE = @PACKAGE@\nPACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@\nPACKAGE_NAME = @PACKAGE_NAME@\nPACKAGE_STRING = @PACKAGE_STRING@\nPACKAGE_TARNAME = @PACKAGE_TARNAME@\nPACKAGE_URL = @PACKAGE_URL@\nPACKAGE_VERSION = @PACKAGE_VERSION@\nPATH_SEPARATOR = @PATH_SEPARATOR@\nPORTAUDIO_ROOT = @PORTAUDIO_ROOT@\nRANLIB = @RANLIB@\nSED = @SED@\nSET_MAKE = @SET_MAKE@\nSHELL = @SHELL@\nSTRIP = @STRIP@\nVERSION = @VERSION@\nabs_builddir = @abs_builddir@\nabs_srcdir = @abs_srcdir@\nabs_top_builddir = @abs_top_builddir@\nabs_top_srcdir = @abs_top_srcdir@\nac_ct_AR = @ac_ct_AR@\nac_ct_CC = @ac_ct_CC@\nac_ct_CXX = @ac_ct_CXX@\nac_ct_DUMPBIN = @ac_ct_DUMPBIN@\nam__include = @am__include@\nam__leading_dot = @am__leading_dot@\nam__quote = @am__quote@\nam__tar = @am__tar@\nam__untar = @am__untar@\nbindir = @bindir@\nbuild = @build@\nbuild_alias = @build_alias@\nbuild_cpu = @build_cpu@\nbuild_os = @build_os@\nbuild_vendor = @build_vendor@\nbuilddir = @builddir@\ndatadir = @datadir@\ndatarootdir = @datarootdir@\ndocdir = @docdir@\ndvidir = @dvidir@\nexec_prefix = @exec_prefix@\nhost = @host@\nhost_alias = @host_alias@\nhost_cpu = @host_cpu@\nhost_os = @host_os@\nhost_vendor = @host_vendor@\nhtmldir = @htmldir@\nincludedir = @includedir@\ninfodir = @infodir@\ninstall_sh = @install_sh@\nlibdir = @libdir@\nlibexecdir = @libexecdir@\nlocaledir = @localedir@\nlocalstatedir = @localstatedir@\nmandir = @mandir@\nmkdir_p = @mkdir_p@\noldincludedir = @oldincludedir@\npdfdir = @pdfdir@\nprefix = @prefix@\nprogram_transform_name = @program_transform_name@\npsdir = @psdir@\nsbindir = @sbindir@\nsharedstatedir = @sharedstatedir@\nsrcdir = @srcdir@\nsysconfdir = @sysconfdir@\ntarget_alias = @target_alias@\ntop_build_prefix = @top_build_prefix@\ntop_builddir = @top_builddir@\ntop_srcdir = @top_srcdir@\nSUBDIRS = lib include bin \n#doc\nEXTRA_DIST = portaudiocpp.pc\npkgconfigdir = $(libdir)/pkgconfig\npkgconfig_DATA = portaudiocpp.pc\nall: all-recursive\n\n.SUFFIXES:\nam--refresh: Makefile\n\t@:\n$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)\n\t@for dep in $?; do \\\n\t  case '$(am__configure_deps)' in \\\n\t    *$$dep*) \\\n\t      echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \\\n\t      $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \\\n\t\t&& exit 0; \\\n\t      exit 1;; \\\n\t  esac; \\\n\tdone; \\\n\techo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \\\n\t$(am__cd) $(top_srcdir) && \\\n\t  $(AUTOMAKE) --gnu Makefile\n.PRECIOUS: Makefile\nMakefile: $(srcdir)/Makefile.in $(top_builddir)/config.status\n\t@case '$?' in \\\n\t  *config.status*) \\\n\t    echo ' $(SHELL) ./config.status'; \\\n\t    $(SHELL) ./config.status;; \\\n\t  *) \\\n\t    echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \\\n\t    cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \\\n\tesac;\n\n$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)\n\t$(SHELL) ./config.status --recheck\n\n$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)\n\t$(am__cd) $(srcdir) && $(AUTOCONF)\n$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)\n\t$(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)\n$(am__aclocal_m4_deps):\nportaudiocpp.pc: $(top_builddir)/config.status $(srcdir)/portaudiocpp.pc.in\n\tcd $(top_builddir) && $(SHELL) ./config.status $@\n\nmostlyclean-libtool:\n\t-rm -f *.lo\n\nclean-libtool:\n\t-rm -rf .libs _libs\n\ndistclean-libtool:\n\t-rm -f libtool config.lt\ninstall-pkgconfigDATA: $(pkgconfig_DATA)\n\t@$(NORMAL_INSTALL)\n\t@list='$(pkgconfig_DATA)'; test -n \"$(pkgconfigdir)\" || list=; \\\n\tif test -n \"$$list\"; then \\\n\t  echo \" $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'\"; \\\n\t  $(MKDIR_P) \"$(DESTDIR)$(pkgconfigdir)\" || exit 1; \\\n\tfi; \\\n\tfor p in $$list; do \\\n\t  if test -f \"$$p\"; then d=; else d=\"$(srcdir)/\"; fi; \\\n\t  echo \"$$d$$p\"; \\\n\tdone | $(am__base_list) | \\\n\twhile read files; do \\\n\t  echo \" $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'\"; \\\n\t  $(INSTALL_DATA) $$files \"$(DESTDIR)$(pkgconfigdir)\" || exit $$?; \\\n\tdone\n\nuninstall-pkgconfigDATA:\n\t@$(NORMAL_UNINSTALL)\n\t@list='$(pkgconfig_DATA)'; test -n \"$(pkgconfigdir)\" || list=; \\\n\tfiles=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \\\n\tdir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir)\n\n# This directory's subdirectories are mostly independent; you can cd\n# into them and run 'make' without going through this Makefile.\n# To change the values of 'make' variables: instead of editing Makefiles,\n# (1) if the variable is set in 'config.status', edit 'config.status'\n#     (which will cause the Makefiles to be regenerated when you run 'make');\n# (2) otherwise, pass the desired values on the 'make' command line.\n$(am__recursive_targets):\n\t@fail=; \\\n\tif $(am__make_keepgoing); then \\\n\t  failcom='fail=yes'; \\\n\telse \\\n\t  failcom='exit 1'; \\\n\tfi; \\\n\tdot_seen=no; \\\n\ttarget=`echo $@ | sed s/-recursive//`; \\\n\tcase \"$@\" in \\\n\t  distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \\\n\t  *) list='$(SUBDIRS)' ;; \\\n\tesac; \\\n\tfor subdir in $$list; do \\\n\t  echo \"Making $$target in $$subdir\"; \\\n\t  if test \"$$subdir\" = \".\"; then \\\n\t    dot_seen=yes; \\\n\t    local_target=\"$$target-am\"; \\\n\t  else \\\n\t    local_target=\"$$target\"; \\\n\t  fi; \\\n\t  ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \\\n\t  || eval $$failcom; \\\n\tdone; \\\n\tif test \"$$dot_seen\" = \"no\"; then \\\n\t  $(MAKE) $(AM_MAKEFLAGS) \"$$target-am\" || exit 1; \\\n\tfi; test -z \"$$fail\"\n\nID: $(am__tagged_files)\n\t$(am__define_uniq_tagged_files); mkid -fID $$unique\ntags: tags-recursive\nTAGS: tags\n\ntags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)\n\tset x; \\\n\there=`pwd`; \\\n\tif ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \\\n\t  include_option=--etags-include; \\\n\t  empty_fix=.; \\\n\telse \\\n\t  include_option=--include; \\\n\t  empty_fix=; \\\n\tfi; \\\n\tlist='$(SUBDIRS)'; for subdir in $$list; do \\\n\t  if test \"$$subdir\" = .; then :; else \\\n\t    test ! -f $$subdir/TAGS || \\\n\t      set \"$$@\" \"$$include_option=$$here/$$subdir/TAGS\"; \\\n\t  fi; \\\n\tdone; \\\n\t$(am__define_uniq_tagged_files); \\\n\tshift; \\\n\tif test -z \"$(ETAGS_ARGS)$$*$$unique\"; then :; else \\\n\t  test -n \"$$unique\" || unique=$$empty_fix; \\\n\t  if test $$# -gt 0; then \\\n\t    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \\\n\t      \"$$@\" $$unique; \\\n\t  else \\\n\t    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \\\n\t      $$unique; \\\n\t  fi; \\\n\tfi\nctags: ctags-recursive\n\nCTAGS: ctags\nctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)\n\t$(am__define_uniq_tagged_files); \\\n\ttest -z \"$(CTAGS_ARGS)$$unique\" \\\n\t  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \\\n\t     $$unique\n\nGTAGS:\n\there=`$(am__cd) $(top_builddir) && pwd` \\\n\t  && $(am__cd) $(top_srcdir) \\\n\t  && gtags -i $(GTAGS_ARGS) \"$$here\"\ncscope: cscope.files\n\ttest ! -s cscope.files \\\n\t  || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS)\nclean-cscope:\n\t-rm -f cscope.files\ncscope.files: clean-cscope cscopelist\ncscopelist: cscopelist-recursive\n\ncscopelist-am: $(am__tagged_files)\n\tlist='$(am__tagged_files)'; \\\n\tcase \"$(srcdir)\" in \\\n\t  [\\\\/]* | ?:[\\\\/]*) sdir=\"$(srcdir)\" ;; \\\n\t  *) sdir=$(subdir)/$(srcdir) ;; \\\n\tesac; \\\n\tfor i in $$list; do \\\n\t  if test -f \"$$i\"; then \\\n\t    echo \"$(subdir)/$$i\"; \\\n\t  else \\\n\t    echo \"$$sdir/$$i\"; \\\n\t  fi; \\\n\tdone >> $(top_builddir)/cscope.files\n\ndistclean-tags:\n\t-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags\n\t-rm -f cscope.out cscope.in.out cscope.po.out cscope.files\n\ndistdir: $(DISTFILES)\n\t$(am__remove_distdir)\n\ttest -d \"$(distdir)\" || mkdir \"$(distdir)\"\n\t@srcdirstrip=`echo \"$(srcdir)\" | sed 's/[].[^$$\\\\*]/\\\\\\\\&/g'`; \\\n\ttopsrcdirstrip=`echo \"$(top_srcdir)\" | sed 's/[].[^$$\\\\*]/\\\\\\\\&/g'`; \\\n\tlist='$(DISTFILES)'; \\\n\t  dist_files=`for file in $$list; do echo $$file; done | \\\n\t  sed -e \"s|^$$srcdirstrip/||;t\" \\\n\t      -e \"s|^$$topsrcdirstrip/|$(top_builddir)/|;t\"`; \\\n\tcase $$dist_files in \\\n\t  */*) $(MKDIR_P) `echo \"$$dist_files\" | \\\n\t\t\t   sed '/\\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \\\n\t\t\t   sort -u` ;; \\\n\tesac; \\\n\tfor file in $$dist_files; do \\\n\t  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \\\n\t  if test -d $$d/$$file; then \\\n\t    dir=`echo \"/$$file\" | sed -e 's,/[^/]*$$,,'`; \\\n\t    if test -d \"$(distdir)/$$file\"; then \\\n\t      find \"$(distdir)/$$file\" -type d ! -perm -700 -exec chmod u+rwx {} \\;; \\\n\t    fi; \\\n\t    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \\\n\t      cp -fpR $(srcdir)/$$file \"$(distdir)$$dir\" || exit 1; \\\n\t      find \"$(distdir)/$$file\" -type d ! -perm -700 -exec chmod u+rwx {} \\;; \\\n\t    fi; \\\n\t    cp -fpR $$d/$$file \"$(distdir)$$dir\" || exit 1; \\\n\t  else \\\n\t    test -f \"$(distdir)/$$file\" \\\n\t    || cp -p $$d/$$file \"$(distdir)/$$file\" \\\n\t    || exit 1; \\\n\t  fi; \\\n\tdone\n\t@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \\\n\t  if test \"$$subdir\" = .; then :; else \\\n\t    $(am__make_dryrun) \\\n\t      || test -d \"$(distdir)/$$subdir\" \\\n\t      || $(MKDIR_P) \"$(distdir)/$$subdir\" \\\n\t      || exit 1; \\\n\t    dir1=$$subdir; dir2=\"$(distdir)/$$subdir\"; \\\n\t    $(am__relativize); \\\n\t    new_distdir=$$reldir; \\\n\t    dir1=$$subdir; dir2=\"$(top_distdir)\"; \\\n\t    $(am__relativize); \\\n\t    new_top_distdir=$$reldir; \\\n\t    echo \" (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir=\"$$new_top_distdir\" distdir=\"$$new_distdir\" \\\\\"; \\\n\t    echo \"     am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)\"; \\\n\t    ($(am__cd) $$subdir && \\\n\t      $(MAKE) $(AM_MAKEFLAGS) \\\n\t        top_distdir=\"$$new_top_distdir\" \\\n\t        distdir=\"$$new_distdir\" \\\n\t\tam__remove_distdir=: \\\n\t\tam__skip_length_check=: \\\n\t\tam__skip_mode_fix=: \\\n\t        distdir) \\\n\t      || exit 1; \\\n\t  fi; \\\n\tdone\n\t-test -n \"$(am__skip_mode_fix)\" \\\n\t|| find \"$(distdir)\" -type d ! -perm -755 \\\n\t\t-exec chmod u+rwx,go+rx {} \\; -o \\\n\t  ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \\; -o \\\n\t  ! -type d ! -perm -400 -exec chmod a+r {} \\; -o \\\n\t  ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \\; \\\n\t|| chmod -R a+r \"$(distdir)\"\ndist-gzip: distdir\n\ttardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz\n\t$(am__post_remove_distdir)\n\ndist-bzip2: distdir\n\ttardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2\n\t$(am__post_remove_distdir)\n\ndist-lzip: distdir\n\ttardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz\n\t$(am__post_remove_distdir)\n\ndist-xz: distdir\n\ttardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz\n\t$(am__post_remove_distdir)\n\ndist-tarZ: distdir\n\t@echo WARNING: \"Support for shar distribution archives is\" \\\n\t               \"deprecated.\" >&2\n\t@echo WARNING: \"It will be removed altogether in Automake 2.0\" >&2\n\ttardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z\n\t$(am__post_remove_distdir)\n\ndist-shar: distdir\n\t@echo WARNING: \"Support for distribution archives compressed with\" \\\n\t\t       \"legacy program 'compress' is deprecated.\" >&2\n\t@echo WARNING: \"It will be removed altogether in Automake 2.0\" >&2\n\tshar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz\n\t$(am__post_remove_distdir)\n\ndist-zip: distdir\n\t-rm -f $(distdir).zip\n\tzip -rq $(distdir).zip $(distdir)\n\t$(am__post_remove_distdir)\n\ndist dist-all:\n\t$(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:'\n\t$(am__post_remove_distdir)\n\n# This target untars the dist file and tries a VPATH configuration.  Then\n# it guarantees that the distribution is self-contained by making another\n# tarfile.\ndistcheck: dist\n\tcase '$(DIST_ARCHIVES)' in \\\n\t*.tar.gz*) \\\n\t  GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\\\n\t*.tar.bz2*) \\\n\t  bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\\\n\t*.tar.lz*) \\\n\t  lzip -dc $(distdir).tar.lz | $(am__untar) ;;\\\n\t*.tar.xz*) \\\n\t  xz -dc $(distdir).tar.xz | $(am__untar) ;;\\\n\t*.tar.Z*) \\\n\t  uncompress -c $(distdir).tar.Z | $(am__untar) ;;\\\n\t*.shar.gz*) \\\n\t  GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\\\n\t*.zip*) \\\n\t  unzip $(distdir).zip ;;\\\n\tesac\n\tchmod -R a-w $(distdir)\n\tchmod u+w $(distdir)\n\tmkdir $(distdir)/_build $(distdir)/_inst\n\tchmod a-w $(distdir)\n\ttest -d $(distdir)/_build || exit 0; \\\n\tdc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\\\/]:[\\\\/],/,'` \\\n\t  && dc_destdir=\"$${TMPDIR-/tmp}/am-dc-$$$$/\" \\\n\t  && am__cwd=`pwd` \\\n\t  && $(am__cd) $(distdir)/_build \\\n\t  && ../configure \\\n\t    $(AM_DISTCHECK_CONFIGURE_FLAGS) \\\n\t    $(DISTCHECK_CONFIGURE_FLAGS) \\\n\t    --srcdir=.. --prefix=\"$$dc_install_base\" \\\n\t  && $(MAKE) $(AM_MAKEFLAGS) \\\n\t  && $(MAKE) $(AM_MAKEFLAGS) dvi \\\n\t  && $(MAKE) $(AM_MAKEFLAGS) check \\\n\t  && $(MAKE) $(AM_MAKEFLAGS) install \\\n\t  && $(MAKE) $(AM_MAKEFLAGS) installcheck \\\n\t  && $(MAKE) $(AM_MAKEFLAGS) uninstall \\\n\t  && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir=\"$$dc_install_base\" \\\n\t        distuninstallcheck \\\n\t  && chmod -R a-w \"$$dc_install_base\" \\\n\t  && ({ \\\n\t       (cd ../.. && umask 077 && mkdir \"$$dc_destdir\") \\\n\t       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR=\"$$dc_destdir\" install \\\n\t       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR=\"$$dc_destdir\" uninstall \\\n\t       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR=\"$$dc_destdir\" \\\n\t            distuninstallcheck_dir=\"$$dc_destdir\" distuninstallcheck; \\\n\t      } || { rm -rf \"$$dc_destdir\"; exit 1; }) \\\n\t  && rm -rf \"$$dc_destdir\" \\\n\t  && $(MAKE) $(AM_MAKEFLAGS) dist \\\n\t  && rm -rf $(DIST_ARCHIVES) \\\n\t  && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \\\n\t  && cd \"$$am__cwd\" \\\n\t  || exit 1\n\t$(am__post_remove_distdir)\n\t@(echo \"$(distdir) archives ready for distribution: \"; \\\n\t  list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \\\n\t  sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'\ndistuninstallcheck:\n\t@test -n '$(distuninstallcheck_dir)' || { \\\n\t  echo 'ERROR: trying to run $@ with an empty' \\\n\t       '$$(distuninstallcheck_dir)' >&2; \\\n\t  exit 1; \\\n\t}; \\\n\t$(am__cd) '$(distuninstallcheck_dir)' || { \\\n\t  echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \\\n\t  exit 1; \\\n\t}; \\\n\ttest `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \\\n\t   || { echo \"ERROR: files left after uninstall:\" ; \\\n\t        if test -n \"$(DESTDIR)\"; then \\\n\t          echo \"  (check DESTDIR support)\"; \\\n\t        fi ; \\\n\t        $(distuninstallcheck_listfiles) ; \\\n\t        exit 1; } >&2\ndistcleancheck: distclean\n\t@if test '$(srcdir)' = . ; then \\\n\t  echo \"ERROR: distcleancheck can only run from a VPATH build\" ; \\\n\t  exit 1 ; \\\n\tfi\n\t@test `$(distcleancheck_listfiles) | wc -l` -eq 0 \\\n\t  || { echo \"ERROR: files left in build directory after distclean:\" ; \\\n\t       $(distcleancheck_listfiles) ; \\\n\t       exit 1; } >&2\ncheck-am: all-am\ncheck: check-recursive\nall-am: Makefile $(DATA)\ninstalldirs: installdirs-recursive\ninstalldirs-am:\n\tfor dir in \"$(DESTDIR)$(pkgconfigdir)\"; do \\\n\t  test -z \"$$dir\" || $(MKDIR_P) \"$$dir\"; \\\n\tdone\ninstall: install-recursive\ninstall-exec: install-exec-recursive\ninstall-data: install-data-recursive\nuninstall: uninstall-recursive\n\ninstall-am: all-am\n\t@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am\n\ninstallcheck: installcheck-recursive\ninstall-strip:\n\tif test -z '$(STRIP)'; then \\\n\t  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM=\"$(INSTALL_STRIP_PROGRAM)\" \\\n\t    install_sh_PROGRAM=\"$(INSTALL_STRIP_PROGRAM)\" INSTALL_STRIP_FLAG=-s \\\n\t      install; \\\n\telse \\\n\t  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM=\"$(INSTALL_STRIP_PROGRAM)\" \\\n\t    install_sh_PROGRAM=\"$(INSTALL_STRIP_PROGRAM)\" INSTALL_STRIP_FLAG=-s \\\n\t    \"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'\" install; \\\n\tfi\nmostlyclean-generic:\n\nclean-generic:\n\ndistclean-generic:\n\t-test -z \"$(CONFIG_CLEAN_FILES)\" || rm -f $(CONFIG_CLEAN_FILES)\n\t-test . = \"$(srcdir)\" || test -z \"$(CONFIG_CLEAN_VPATH_FILES)\" || rm -f $(CONFIG_CLEAN_VPATH_FILES)\n\nmaintainer-clean-generic:\n\t@echo \"This command is intended for maintainers to use\"\n\t@echo \"it deletes files that may require special tools to rebuild.\"\nclean: clean-recursive\n\nclean-am: clean-generic clean-libtool mostlyclean-am\n\ndistclean: distclean-recursive\n\t-rm -f $(am__CONFIG_DISTCLEAN_FILES)\n\t-rm -f Makefile\ndistclean-am: clean-am distclean-generic distclean-libtool \\\n\tdistclean-tags\n\ndvi: dvi-recursive\n\ndvi-am:\n\nhtml: html-recursive\n\nhtml-am:\n\ninfo: info-recursive\n\ninfo-am:\n\ninstall-data-am: install-pkgconfigDATA\n\ninstall-dvi: install-dvi-recursive\n\ninstall-dvi-am:\n\ninstall-exec-am:\n\ninstall-html: install-html-recursive\n\ninstall-html-am:\n\ninstall-info: install-info-recursive\n\ninstall-info-am:\n\ninstall-man:\n\ninstall-pdf: install-pdf-recursive\n\ninstall-pdf-am:\n\ninstall-ps: install-ps-recursive\n\ninstall-ps-am:\n\ninstallcheck-am:\n\nmaintainer-clean: maintainer-clean-recursive\n\t-rm -f $(am__CONFIG_DISTCLEAN_FILES)\n\t-rm -rf $(top_srcdir)/autom4te.cache\n\t-rm -f Makefile\nmaintainer-clean-am: distclean-am maintainer-clean-generic\n\nmostlyclean: mostlyclean-recursive\n\nmostlyclean-am: mostlyclean-generic mostlyclean-libtool\n\npdf: pdf-recursive\n\npdf-am:\n\nps: ps-recursive\n\nps-am:\n\nuninstall-am: uninstall-pkgconfigDATA\n\n.MAKE: $(am__recursive_targets) install-am install-strip\n\n.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \\\n\tam--refresh check check-am clean clean-cscope clean-generic \\\n\tclean-libtool cscope cscopelist-am ctags ctags-am dist \\\n\tdist-all dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ \\\n\tdist-xz dist-zip distcheck distclean distclean-generic \\\n\tdistclean-libtool distclean-tags distcleancheck distdir \\\n\tdistuninstallcheck dvi dvi-am html html-am info info-am \\\n\tinstall install-am install-data install-data-am install-dvi \\\n\tinstall-dvi-am install-exec install-exec-am install-html \\\n\tinstall-html-am install-info install-info-am install-man \\\n\tinstall-pdf install-pdf-am install-pkgconfigDATA install-ps \\\n\tinstall-ps-am install-strip installcheck installcheck-am \\\n\tinstalldirs installdirs-am maintainer-clean \\\n\tmaintainer-clean-generic mostlyclean mostlyclean-generic \\\n\tmostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \\\n\tuninstall-am uninstall-pkgconfigDATA\n\n\n# Tell versions [3.59,3.63) of GNU make to not export all variables.\n# Otherwise a system limit (for SysV at least) may be exceeded.\n.NOEXPORT:\n"
  },
  {
    "path": "thirdparty/portaudio/bindings/cpp/NEWS",
    "content": ""
  },
  {
    "path": "thirdparty/portaudio/bindings/cpp/README",
    "content": ""
  },
  {
    "path": "thirdparty/portaudio/bindings/cpp/SConscript",
    "content": "import os.path\n\nImport(\"env\", \"buildDir\")\nenv.Append(CPPPATH=\"include\")\n\nApiVer = \"0.0.12\"\nMajor, Minor, Micro = [int(c) for c in ApiVer.split(\".\")]\n\nsharedLibs = []\nstaticLibs = []\nImport(\"Platform\", \"Posix\")\nif Platform in Posix:\n    env[\"SHLIBSUFFIX\"] = \".so.%d.%d.%d\" % (Major, Minor, Micro)\n    soFile = \"libportaudiocpp.so\"\n    if Platform != 'darwin':\n        env.AppendUnique(SHLINKFLAGS=\"-Wl,-soname=%s.%d\" % (soFile, Major))\n\n    # Create symlinks\n    def symlink(env, target, source):\n        trgt = str(target[0])\n        src = str(source[0])\n        if os.path.islink(trgt) or os.path.exists(trgt):\n            os.remove(trgt)\n        os.symlink(os.path.basename(src), trgt)\n    lnk0 = env.Command(soFile + \".%d\" % (Major), soFile + \".%d.%d.%d\" % (Major, Minor, Micro), symlink)\n    lnk1 = env.Command(soFile, soFile + \".%d\" % (Major), symlink)\n    sharedLibs.append(lnk0)\n    sharedLibs.append(lnk1)\n\nsrc = [os.path.join(\"source\", \"portaudiocpp\", \"%s.cxx\" % f) for f in (\"BlockingStream\", \"CallbackInterface\", \\\n    \"CallbackStream\", \"CFunCallbackStream\",\"CppFunCallbackStream\", \"Device\",\n    \"DirectionSpecificStreamParameters\", \"Exception\", \"HostApi\", \"InterfaceCallbackStream\",\n    \"MemFunCallbackStream\", \"Stream\", \"StreamParameters\", \"System\", \"SystemDeviceIterator\",\n    \"SystemHostApiIterator\")]\nenv.Append(LIBS=\"portaudio\", LIBPATH=buildDir)\nsharedLib = env.SharedLibrary(\"portaudiocpp\", src, LIBS=[\"portaudio\"])\nstaticLib = env.Library(\"portaudiocpp\", src, LIBS=[\"portaudio\"])\nsharedLibs.append(sharedLib)\nstaticLibs.append(staticLib)\n\nheaders = Split(\"\"\"AutoSystem.hxx                         \n                   BlockingStream.hxx                     \n                   CallbackInterface.hxx                  \n                   CallbackStream.hxx\n                   CFunCallbackStream.hxx                 \n                   CppFunCallbackStream.hxx               \n                   Device.hxx                             \n                   DirectionSpecificStreamParameters.hxx  \n                   Exception.hxx                           \n                   HostApi.hxx\n                   InterfaceCallbackStream.hxx\n                   MemFunCallbackStream.hxx\n                   PortAudioCpp.hxx\n                   SampleDataFormat.hxx\n                   Stream.hxx\n                   StreamParameters.hxx\n                   SystemDeviceIterator.hxx\n                   SystemHostApiIterator.hxx\n                   System.hxx\n                   \"\"\")\nif env[\"PLATFORM\"] == \"win32\":\n    headers.append(\"AsioDeviceAdapter.hxx\") \nheaders = [File(os.path.join(\"include\", \"portaudiocpp\", h)) for h in headers]\n\nReturn(\"sharedLibs\", \"staticLibs\", \"headers\")\n"
  },
  {
    "path": "thirdparty/portaudio/bindings/cpp/aclocal.m4",
    "content": "# generated automatically by aclocal 1.14.1 -*- Autoconf -*-\n\n# Copyright (C) 1996-2013 Free Software Foundation, Inc.\n\n# This file is free software; the Free Software Foundation\n# gives unlimited permission to copy and/or distribute it,\n# with or without modifications, as long as this notice is preserved.\n\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY, to the extent permitted by law; without\n# even the implied warranty of MERCHANTABILITY or FITNESS FOR A\n# PARTICULAR PURPOSE.\n\nm4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])\nm4_ifndef([AC_AUTOCONF_VERSION],\n  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl\nm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,\n[m4_warning([this file was generated for autoconf 2.69.\nYou have another version of autoconf.  It may work, but is not guaranteed to.\nIf you have problems, you may need to regenerate the build system entirely.\nTo do so, use the procedure documented by the package, typically 'autoreconf'.])])\n\n# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-\n#\n#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,\n#                 2006, 2007, 2008, 2009, 2010, 2011 Free Software\n#                 Foundation, Inc.\n#   Written by Gordon Matzigkeit, 1996\n#\n# This file is free software; the Free Software Foundation gives\n# unlimited permission to copy and/or distribute it, with or without\n# modifications, as long as this notice is preserved.\n\nm4_define([_LT_COPYING], [dnl\n#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,\n#                 2006, 2007, 2008, 2009, 2010, 2011 Free Software\n#                 Foundation, Inc.\n#   Written by Gordon Matzigkeit, 1996\n#\n#   This file is part of GNU Libtool.\n#\n# GNU Libtool is free software; you can redistribute it and/or\n# modify it under the terms of the GNU General Public License as\n# published by the Free Software Foundation; either version 2 of\n# the License, or (at your option) any later version.\n#\n# As a special exception to the GNU General Public License,\n# if you distribute this file as part of a program or library that\n# is built using GNU Libtool, you may include this file under the\n# same distribution terms that you use for the rest of that program.\n#\n# GNU Libtool is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n# GNU General Public License for more details.\n#\n# You should have received a copy of the GNU General Public License\n# along with GNU Libtool; see the file COPYING.  If not, a copy\n# can be downloaded from http://www.gnu.org/licenses/gpl.html, or\n# obtained by writing to the Free Software Foundation, Inc.,\n# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n])\n\n# serial 57 LT_INIT\n\n\n# LT_PREREQ(VERSION)\n# ------------------\n# Complain and exit if this libtool version is less that VERSION.\nm4_defun([LT_PREREQ],\n[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,\n       [m4_default([$3],\n\t\t   [m4_fatal([Libtool version $1 or higher is required],\n\t\t             63)])],\n       [$2])])\n\n\n# _LT_CHECK_BUILDDIR\n# ------------------\n# Complain if the absolute build directory name contains unusual characters\nm4_defun([_LT_CHECK_BUILDDIR],\n[case `pwd` in\n  *\\ * | *\\\t*)\n    AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;\nesac\n])\n\n\n# LT_INIT([OPTIONS])\n# ------------------\nAC_DEFUN([LT_INIT],\n[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT\nAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl\nAC_BEFORE([$0], [LT_LANG])dnl\nAC_BEFORE([$0], [LT_OUTPUT])dnl\nAC_BEFORE([$0], [LTDL_INIT])dnl\nm4_require([_LT_CHECK_BUILDDIR])dnl\n\ndnl Autoconf doesn't catch unexpanded LT_ macros by default:\nm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl\nm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl\ndnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4\ndnl unless we require an AC_DEFUNed macro:\nAC_REQUIRE([LTOPTIONS_VERSION])dnl\nAC_REQUIRE([LTSUGAR_VERSION])dnl\nAC_REQUIRE([LTVERSION_VERSION])dnl\nAC_REQUIRE([LTOBSOLETE_VERSION])dnl\nm4_require([_LT_PROG_LTMAIN])dnl\n\n_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])\n\ndnl Parse OPTIONS\n_LT_SET_OPTIONS([$0], [$1])\n\n# This can be used to rebuild libtool when needed\nLIBTOOL_DEPS=\"$ltmain\"\n\n# Always use our own libtool.\nLIBTOOL='$(SHELL) $(top_builddir)/libtool'\nAC_SUBST(LIBTOOL)dnl\n\n_LT_SETUP\n\n# Only expand once:\nm4_define([LT_INIT])\n])# LT_INIT\n\n# Old names:\nAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])\nAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])\ndnl aclocal-1.4 backwards compatibility:\ndnl AC_DEFUN([AC_PROG_LIBTOOL], [])\ndnl AC_DEFUN([AM_PROG_LIBTOOL], [])\n\n\n# _LT_CC_BASENAME(CC)\n# -------------------\n# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.\nm4_defun([_LT_CC_BASENAME],\n[for cc_temp in $1\"\"; do\n  case $cc_temp in\n    compile | *[[\\\\/]]compile | ccache | *[[\\\\/]]ccache ) ;;\n    distcc | *[[\\\\/]]distcc | purify | *[[\\\\/]]purify ) ;;\n    \\-*) ;;\n    *) break;;\n  esac\ndone\ncc_basename=`$ECHO \"$cc_temp\" | $SED \"s%.*/%%; s%^$host_alias-%%\"`\n])\n\n\n# _LT_FILEUTILS_DEFAULTS\n# ----------------------\n# It is okay to use these file commands and assume they have been set\n# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.\nm4_defun([_LT_FILEUTILS_DEFAULTS],\n[: ${CP=\"cp -f\"}\n: ${MV=\"mv -f\"}\n: ${RM=\"rm -f\"}\n])# _LT_FILEUTILS_DEFAULTS\n\n\n# _LT_SETUP\n# ---------\nm4_defun([_LT_SETUP],\n[AC_REQUIRE([AC_CANONICAL_HOST])dnl\nAC_REQUIRE([AC_CANONICAL_BUILD])dnl\nAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl\nAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl\n\n_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl\ndnl\n_LT_DECL([], [host_alias], [0], [The host system])dnl\n_LT_DECL([], [host], [0])dnl\n_LT_DECL([], [host_os], [0])dnl\ndnl\n_LT_DECL([], [build_alias], [0], [The build system])dnl\n_LT_DECL([], [build], [0])dnl\n_LT_DECL([], [build_os], [0])dnl\ndnl\nAC_REQUIRE([AC_PROG_CC])dnl\nAC_REQUIRE([LT_PATH_LD])dnl\nAC_REQUIRE([LT_PATH_NM])dnl\ndnl\nAC_REQUIRE([AC_PROG_LN_S])dnl\ntest -z \"$LN_S\" && LN_S=\"ln -s\"\n_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl\ndnl\nAC_REQUIRE([LT_CMD_MAX_LEN])dnl\n_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally \"o\")])dnl\n_LT_DECL([], [exeext], [0], [Executable file suffix (normally \"\")])dnl\ndnl\nm4_require([_LT_FILEUTILS_DEFAULTS])dnl\nm4_require([_LT_CHECK_SHELL_FEATURES])dnl\nm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl\nm4_require([_LT_CMD_RELOAD])dnl\nm4_require([_LT_CHECK_MAGIC_METHOD])dnl\nm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl\nm4_require([_LT_CMD_OLD_ARCHIVE])dnl\nm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl\nm4_require([_LT_WITH_SYSROOT])dnl\n\n_LT_CONFIG_LIBTOOL_INIT([\n# See if we are running on zsh, and set the options which allow our\n# commands through without removal of \\ escapes INIT.\nif test -n \"\\${ZSH_VERSION+set}\" ; then\n   setopt NO_GLOB_SUBST\nfi\n])\nif test -n \"${ZSH_VERSION+set}\" ; then\n   setopt NO_GLOB_SUBST\nfi\n\n_LT_CHECK_OBJDIR\n\nm4_require([_LT_TAG_COMPILER])dnl\n\ncase $host_os in\naix3*)\n  # AIX sometimes has problems with the GCC collect2 program.  For some\n  # reason, if we set the COLLECT_NAMES environment variable, the problems\n  # vanish in a puff of smoke.\n  if test \"X${COLLECT_NAMES+set}\" != Xset; then\n    COLLECT_NAMES=\n    export COLLECT_NAMES\n  fi\n  ;;\nesac\n\n# Global variables:\nofile=libtool\ncan_build_shared=yes\n\n# All known linkers require a `.a' archive for static linking (except MSVC,\n# which needs '.lib').\nlibext=a\n\nwith_gnu_ld=\"$lt_cv_prog_gnu_ld\"\n\nold_CC=\"$CC\"\nold_CFLAGS=\"$CFLAGS\"\n\n# Set sane defaults for various variables\ntest -z \"$CC\" && CC=cc\ntest -z \"$LTCC\" && LTCC=$CC\ntest -z \"$LTCFLAGS\" && LTCFLAGS=$CFLAGS\ntest -z \"$LD\" && LD=ld\ntest -z \"$ac_objext\" && ac_objext=o\n\n_LT_CC_BASENAME([$compiler])\n\n# Only perform the check for file, if the check method requires it\ntest -z \"$MAGIC_CMD\" && MAGIC_CMD=file\ncase $deplibs_check_method in\nfile_magic*)\n  if test \"$file_magic_cmd\" = '$MAGIC_CMD'; then\n    _LT_PATH_MAGIC\n  fi\n  ;;\nesac\n\n# Use C for the default configuration in the libtool script\nLT_SUPPORTED_TAG([CC])\n_LT_LANG_C_CONFIG\n_LT_LANG_DEFAULT_CONFIG\n_LT_CONFIG_COMMANDS\n])# _LT_SETUP\n\n\n# _LT_PREPARE_SED_QUOTE_VARS\n# --------------------------\n# Define a few sed substitution that help us do robust quoting.\nm4_defun([_LT_PREPARE_SED_QUOTE_VARS],\n[# Backslashify metacharacters that are still active within\n# double-quoted strings.\nsed_quote_subst='s/\\([[\"`$\\\\]]\\)/\\\\\\1/g'\n\n# Same as above, but do not quote variable references.\ndouble_quote_subst='s/\\([[\"`\\\\]]\\)/\\\\\\1/g'\n\n# Sed substitution to delay expansion of an escaped shell variable in a\n# double_quote_subst'ed string.\ndelay_variable_subst='s/\\\\\\\\\\\\\\\\\\\\\\$/\\\\\\\\\\\\$/g'\n\n# Sed substitution to delay expansion of an escaped single quote.\ndelay_single_quote_subst='s/'\\''/'\\'\\\\\\\\\\\\\\'\\''/g'\n\n# Sed substitution to avoid accidental globbing in evaled expressions\nno_glob_subst='s/\\*/\\\\\\*/g'\n])\n\n# _LT_PROG_LTMAIN\n# ---------------\n# Note that this code is called both from `configure', and `config.status'\n# now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,\n# `config.status' has no value for ac_aux_dir unless we are using Automake,\n# so we pass a copy along to make sure it has a sensible value anyway.\nm4_defun([_LT_PROG_LTMAIN],\n[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl\n_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])\nltmain=\"$ac_aux_dir/ltmain.sh\"\n])# _LT_PROG_LTMAIN\n\n\n\n# So that we can recreate a full libtool script including additional\n# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS\n# in macros and then make a single call at the end using the `libtool'\n# label.\n\n\n# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])\n# ----------------------------------------\n# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.\nm4_define([_LT_CONFIG_LIBTOOL_INIT],\n[m4_ifval([$1],\n          [m4_append([_LT_OUTPUT_LIBTOOL_INIT],\n                     [$1\n])])])\n\n# Initialize.\nm4_define([_LT_OUTPUT_LIBTOOL_INIT])\n\n\n# _LT_CONFIG_LIBTOOL([COMMANDS])\n# ------------------------------\n# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.\nm4_define([_LT_CONFIG_LIBTOOL],\n[m4_ifval([$1],\n          [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],\n                     [$1\n])])])\n\n# Initialize.\nm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])\n\n\n# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])\n# -----------------------------------------------------\nm4_defun([_LT_CONFIG_SAVE_COMMANDS],\n[_LT_CONFIG_LIBTOOL([$1])\n_LT_CONFIG_LIBTOOL_INIT([$2])\n])\n\n\n# _LT_FORMAT_COMMENT([COMMENT])\n# -----------------------------\n# Add leading comment marks to the start of each line, and a trailing\n# full-stop to the whole comment if one is not present already.\nm4_define([_LT_FORMAT_COMMENT],\n[m4_ifval([$1], [\nm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],\n              [['`$\\]], [\\\\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])\n)])\n\n\n\n\n\n# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])\n# -------------------------------------------------------------------\n# CONFIGNAME is the name given to the value in the libtool script.\n# VARNAME is the (base) name used in the configure script.\n# VALUE may be 0, 1 or 2 for a computed quote escaped value based on\n# VARNAME.  Any other value will be used directly.\nm4_define([_LT_DECL],\n[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],\n    [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],\n\t[m4_ifval([$1], [$1], [$2])])\n    lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])\n    m4_ifval([$4],\n\t[lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])\n    lt_dict_add_subkey([lt_decl_dict], [$2],\n\t[tagged?], [m4_ifval([$5], [yes], [no])])])\n])\n\n\n# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])\n# --------------------------------------------------------\nm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])\n\n\n# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])\n# ------------------------------------------------\nm4_define([lt_decl_tag_varnames],\n[_lt_decl_filter([tagged?], [yes], $@)])\n\n\n# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])\n# ---------------------------------------------------------\nm4_define([_lt_decl_filter],\n[m4_case([$#],\n  [0], [m4_fatal([$0: too few arguments: $#])],\n  [1], [m4_fatal([$0: too few arguments: $#: $1])],\n  [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],\n  [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],\n  [lt_dict_filter([lt_decl_dict], $@)])[]dnl\n])\n\n\n# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])\n# --------------------------------------------------\nm4_define([lt_decl_quote_varnames],\n[_lt_decl_filter([value], [1], $@)])\n\n\n# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])\n# ---------------------------------------------------\nm4_define([lt_decl_dquote_varnames],\n[_lt_decl_filter([value], [2], $@)])\n\n\n# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])\n# ---------------------------------------------------\nm4_define([lt_decl_varnames_tagged],\n[m4_assert([$# <= 2])dnl\n_$0(m4_quote(m4_default([$1], [[, ]])),\n    m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),\n    m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])\nm4_define([_lt_decl_varnames_tagged],\n[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])\n\n\n# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])\n# ------------------------------------------------\nm4_define([lt_decl_all_varnames],\n[_$0(m4_quote(m4_default([$1], [[, ]])),\n     m4_if([$2], [],\n\t   m4_quote(lt_decl_varnames),\n\tm4_quote(m4_shift($@))))[]dnl\n])\nm4_define([_lt_decl_all_varnames],\n[lt_join($@, lt_decl_varnames_tagged([$1],\n\t\t\tlt_decl_tag_varnames([[, ]], m4_shift($@))))dnl\n])\n\n\n# _LT_CONFIG_STATUS_DECLARE([VARNAME])\n# ------------------------------------\n# Quote a variable value, and forward it to `config.status' so that its\n# declaration there will have the same value as in `configure'.  VARNAME\n# must have a single quote delimited value for this to work.\nm4_define([_LT_CONFIG_STATUS_DECLARE],\n[$1='`$ECHO \"$][$1\" | $SED \"$delay_single_quote_subst\"`'])\n\n\n# _LT_CONFIG_STATUS_DECLARATIONS\n# ------------------------------\n# We delimit libtool config variables with single quotes, so when\n# we write them to config.status, we have to be sure to quote all\n# embedded single quotes properly.  In configure, this macro expands\n# each variable declared with _LT_DECL (and _LT_TAGDECL) into:\n#\n#    <var>='`$ECHO \"$<var>\" | $SED \"$delay_single_quote_subst\"`'\nm4_defun([_LT_CONFIG_STATUS_DECLARATIONS],\n[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),\n    [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])\n\n\n# _LT_LIBTOOL_TAGS\n# ----------------\n# Output comment and list of tags supported by the script\nm4_defun([_LT_LIBTOOL_TAGS],\n[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl\navailable_tags=\"_LT_TAGS\"dnl\n])\n\n\n# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])\n# -----------------------------------\n# Extract the dictionary values for VARNAME (optionally with TAG) and\n# expand to a commented shell variable setting:\n#\n#    # Some comment about what VAR is for.\n#    visible_name=$lt_internal_name\nm4_define([_LT_LIBTOOL_DECLARE],\n[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],\n\t\t\t\t\t   [description])))[]dnl\nm4_pushdef([_libtool_name],\n    m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl\nm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),\n    [0], [_libtool_name=[$]$1],\n    [1], [_libtool_name=$lt_[]$1],\n    [2], [_libtool_name=$lt_[]$1],\n    [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl\nm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl\n])\n\n\n# _LT_LIBTOOL_CONFIG_VARS\n# -----------------------\n# Produce commented declarations of non-tagged libtool config variables\n# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'\n# script.  Tagged libtool config variables (even for the LIBTOOL CONFIG\n# section) are produced by _LT_LIBTOOL_TAG_VARS.\nm4_defun([_LT_LIBTOOL_CONFIG_VARS],\n[m4_foreach([_lt_var],\n    m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),\n    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])\n\n\n# _LT_LIBTOOL_TAG_VARS(TAG)\n# -------------------------\nm4_define([_LT_LIBTOOL_TAG_VARS],\n[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),\n    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])\n\n\n# _LT_TAGVAR(VARNAME, [TAGNAME])\n# ------------------------------\nm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])\n\n\n# _LT_CONFIG_COMMANDS\n# -------------------\n# Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of\n# variables for single and double quote escaping we saved from calls\n# to _LT_DECL, we can put quote escaped variables declarations\n# into `config.status', and then the shell code to quote escape them in\n# for loops in `config.status'.  Finally, any additional code accumulated\n# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.\nm4_defun([_LT_CONFIG_COMMANDS],\n[AC_PROVIDE_IFELSE([LT_OUTPUT],\n\tdnl If the libtool generation code has been placed in $CONFIG_LT,\n\tdnl instead of duplicating it all over again into config.status,\n\tdnl then we will have config.status run $CONFIG_LT later, so it\n\tdnl needs to know what name is stored there:\n        [AC_CONFIG_COMMANDS([libtool],\n            [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],\n    dnl If the libtool generation code is destined for config.status,\n    dnl expand the accumulated commands and init code now:\n    [AC_CONFIG_COMMANDS([libtool],\n        [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])\n])#_LT_CONFIG_COMMANDS\n\n\n# Initialize.\nm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],\n[\n\n# The HP-UX ksh and POSIX shell print the target directory to stdout\n# if CDPATH is set.\n(unset CDPATH) >/dev/null 2>&1 && unset CDPATH\n\nsed_quote_subst='$sed_quote_subst'\ndouble_quote_subst='$double_quote_subst'\ndelay_variable_subst='$delay_variable_subst'\n_LT_CONFIG_STATUS_DECLARATIONS\nLTCC='$LTCC'\nLTCFLAGS='$LTCFLAGS'\ncompiler='$compiler_DEFAULT'\n\n# A function that is used when there is no print builtin or printf.\nfunc_fallback_echo ()\n{\n  eval 'cat <<_LTECHO_EOF\n\\$[]1\n_LTECHO_EOF'\n}\n\n# Quote evaled strings.\nfor var in lt_decl_all_varnames([[ \\\n]], lt_decl_quote_varnames); do\n    case \\`eval \\\\\\\\\\$ECHO \\\\\\\\\"\"\\\\\\\\\\$\\$var\"\\\\\\\\\"\\` in\n    *[[\\\\\\\\\\\\\\`\\\\\"\\\\\\$]]*)\n      eval \"lt_\\$var=\\\\\\\\\\\\\"\\\\\\`\\\\\\$ECHO \\\\\"\\\\\\$\\$var\\\\\" | \\\\\\$SED \\\\\"\\\\\\$sed_quote_subst\\\\\"\\\\\\`\\\\\\\\\\\\\"\"\n      ;;\n    *)\n      eval \"lt_\\$var=\\\\\\\\\\\\\"\\\\\\$\\$var\\\\\\\\\\\\\"\"\n      ;;\n    esac\ndone\n\n# Double-quote double-evaled strings.\nfor var in lt_decl_all_varnames([[ \\\n]], lt_decl_dquote_varnames); do\n    case \\`eval \\\\\\\\\\$ECHO \\\\\\\\\"\"\\\\\\\\\\$\\$var\"\\\\\\\\\"\\` in\n    *[[\\\\\\\\\\\\\\`\\\\\"\\\\\\$]]*)\n      eval \"lt_\\$var=\\\\\\\\\\\\\"\\\\\\`\\\\\\$ECHO \\\\\"\\\\\\$\\$var\\\\\" | \\\\\\$SED -e \\\\\"\\\\\\$double_quote_subst\\\\\" -e \\\\\"\\\\\\$sed_quote_subst\\\\\" -e \\\\\"\\\\\\$delay_variable_subst\\\\\"\\\\\\`\\\\\\\\\\\\\"\"\n      ;;\n    *)\n      eval \"lt_\\$var=\\\\\\\\\\\\\"\\\\\\$\\$var\\\\\\\\\\\\\"\"\n      ;;\n    esac\ndone\n\n_LT_OUTPUT_LIBTOOL_INIT\n])\n\n# _LT_GENERATED_FILE_INIT(FILE, [COMMENT])\n# ------------------------------------\n# Generate a child script FILE with all initialization necessary to\n# reuse the environment learned by the parent script, and make the\n# file executable.  If COMMENT is supplied, it is inserted after the\n# `#!' sequence but before initialization text begins.  After this\n# macro, additional text can be appended to FILE to form the body of\n# the child script.  The macro ends with non-zero status if the\n# file could not be fully written (such as if the disk is full).\nm4_ifdef([AS_INIT_GENERATED],\n[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],\n[m4_defun([_LT_GENERATED_FILE_INIT],\n[m4_require([AS_PREPARE])]dnl\n[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl\n[lt_write_fail=0\ncat >$1 <<_ASEOF || lt_write_fail=1\n#! $SHELL\n# Generated by $as_me.\n$2\nSHELL=\\${CONFIG_SHELL-$SHELL}\nexport SHELL\n_ASEOF\ncat >>$1 <<\\_ASEOF || lt_write_fail=1\nAS_SHELL_SANITIZE\n_AS_PREPARE\nexec AS_MESSAGE_FD>&1\n_ASEOF\ntest $lt_write_fail = 0 && chmod +x $1[]dnl\nm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT\n\n# LT_OUTPUT\n# ---------\n# This macro allows early generation of the libtool script (before\n# AC_OUTPUT is called), incase it is used in configure for compilation\n# tests.\nAC_DEFUN([LT_OUTPUT],\n[: ${CONFIG_LT=./config.lt}\nAC_MSG_NOTICE([creating $CONFIG_LT])\n_LT_GENERATED_FILE_INIT([\"$CONFIG_LT\"],\n[# Run this file to recreate a libtool stub with the current configuration.])\n\ncat >>\"$CONFIG_LT\" <<\\_LTEOF\nlt_cl_silent=false\nexec AS_MESSAGE_LOG_FD>>config.log\n{\n  echo\n  AS_BOX([Running $as_me.])\n} >&AS_MESSAGE_LOG_FD\n\nlt_cl_help=\"\\\n\\`$as_me' creates a local libtool stub from the current configuration,\nfor use in further configure time tests before the real libtool is\ngenerated.\n\nUsage: $[0] [[OPTIONS]]\n\n  -h, --help      print this help, then exit\n  -V, --version   print version number, then exit\n  -q, --quiet     do not print progress messages\n  -d, --debug     don't remove temporary files\n\nReport bugs to <bug-libtool@gnu.org>.\"\n\nlt_cl_version=\"\\\nm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl\nm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])\nconfigured by $[0], generated by m4_PACKAGE_STRING.\n\nCopyright (C) 2011 Free Software Foundation, Inc.\nThis config.lt script is free software; the Free Software Foundation\ngives unlimited permission to copy, distribute and modify it.\"\n\nwhile test $[#] != 0\ndo\n  case $[1] in\n    --version | --v* | -V )\n      echo \"$lt_cl_version\"; exit 0 ;;\n    --help | --h* | -h )\n      echo \"$lt_cl_help\"; exit 0 ;;\n    --debug | --d* | -d )\n      debug=: ;;\n    --quiet | --q* | --silent | --s* | -q )\n      lt_cl_silent=: ;;\n\n    -*) AC_MSG_ERROR([unrecognized option: $[1]\nTry \\`$[0] --help' for more information.]) ;;\n\n    *) AC_MSG_ERROR([unrecognized argument: $[1]\nTry \\`$[0] --help' for more information.]) ;;\n  esac\n  shift\ndone\n\nif $lt_cl_silent; then\n  exec AS_MESSAGE_FD>/dev/null\nfi\n_LTEOF\n\ncat >>\"$CONFIG_LT\" <<_LTEOF\n_LT_OUTPUT_LIBTOOL_COMMANDS_INIT\n_LTEOF\n\ncat >>\"$CONFIG_LT\" <<\\_LTEOF\nAC_MSG_NOTICE([creating $ofile])\n_LT_OUTPUT_LIBTOOL_COMMANDS\nAS_EXIT(0)\n_LTEOF\nchmod +x \"$CONFIG_LT\"\n\n# configure is writing to config.log, but config.lt does its own redirection,\n# appending to config.log, which fails on DOS, as config.log is still kept\n# open by configure.  Here we exec the FD to /dev/null, effectively closing\n# config.log, so it can be properly (re)opened and appended to by config.lt.\nlt_cl_success=:\ntest \"$silent\" = yes &&\n  lt_config_lt_args=\"$lt_config_lt_args --quiet\"\nexec AS_MESSAGE_LOG_FD>/dev/null\n$SHELL \"$CONFIG_LT\" $lt_config_lt_args || lt_cl_success=false\nexec AS_MESSAGE_LOG_FD>>config.log\n$lt_cl_success || AS_EXIT(1)\n])# LT_OUTPUT\n\n\n# _LT_CONFIG(TAG)\n# ---------------\n# If TAG is the built-in tag, create an initial libtool script with a\n# default configuration from the untagged config vars.  Otherwise add code\n# to config.status for appending the configuration named by TAG from the\n# matching tagged config vars.\nm4_defun([_LT_CONFIG],\n[m4_require([_LT_FILEUTILS_DEFAULTS])dnl\n_LT_CONFIG_SAVE_COMMANDS([\n  m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl\n  m4_if(_LT_TAG, [C], [\n    # See if we are running on zsh, and set the options which allow our\n    # commands through without removal of \\ escapes.\n    if test -n \"${ZSH_VERSION+set}\" ; then\n      setopt NO_GLOB_SUBST\n    fi\n\n    cfgfile=\"${ofile}T\"\n    trap \"$RM \\\"$cfgfile\\\"; exit 1\" 1 2 15\n    $RM \"$cfgfile\"\n\n    cat <<_LT_EOF >> \"$cfgfile\"\n#! $SHELL\n\n# `$ECHO \"$ofile\" | sed 's%^.*/%%'` - Provide generalized library-building support services.\n# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION\n# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:\n# NOTE: Changes made to this file will be lost: look at ltmain.sh.\n#\n_LT_COPYING\n_LT_LIBTOOL_TAGS\n\n# ### BEGIN LIBTOOL CONFIG\n_LT_LIBTOOL_CONFIG_VARS\n_LT_LIBTOOL_TAG_VARS\n# ### END LIBTOOL CONFIG\n\n_LT_EOF\n\n  case $host_os in\n  aix3*)\n    cat <<\\_LT_EOF >> \"$cfgfile\"\n# AIX sometimes has problems with the GCC collect2 program.  For some\n# reason, if we set the COLLECT_NAMES environment variable, the problems\n# vanish in a puff of smoke.\nif test \"X${COLLECT_NAMES+set}\" != Xset; then\n  COLLECT_NAMES=\n  export COLLECT_NAMES\nfi\n_LT_EOF\n    ;;\n  esac\n\n  _LT_PROG_LTMAIN\n\n  # We use sed instead of cat because bash on DJGPP gets confused if\n  # if finds mixed CR/LF and LF-only lines.  Since sed operates in\n  # text mode, it properly converts lines to CR/LF.  This bash problem\n  # is reportedly fixed, but why not run on old versions too?\n  sed '$q' \"$ltmain\" >> \"$cfgfile\" \\\n     || (rm -f \"$cfgfile\"; exit 1)\n\n  _LT_PROG_REPLACE_SHELLFNS\n\n   mv -f \"$cfgfile\" \"$ofile\" ||\n    (rm -f \"$ofile\" && cp \"$cfgfile\" \"$ofile\" && rm -f \"$cfgfile\")\n  chmod +x \"$ofile\"\n],\n[cat <<_LT_EOF >> \"$ofile\"\n\ndnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded\ndnl in a comment (ie after a #).\n# ### BEGIN LIBTOOL TAG CONFIG: $1\n_LT_LIBTOOL_TAG_VARS(_LT_TAG)\n# ### END LIBTOOL TAG CONFIG: $1\n_LT_EOF\n])dnl /m4_if\n],\n[m4_if([$1], [], [\n    PACKAGE='$PACKAGE'\n    VERSION='$VERSION'\n    TIMESTAMP='$TIMESTAMP'\n    RM='$RM'\n    ofile='$ofile'], [])\n])dnl /_LT_CONFIG_SAVE_COMMANDS\n])# _LT_CONFIG\n\n\n# LT_SUPPORTED_TAG(TAG)\n# ---------------------\n# Trace this macro to discover what tags are supported by the libtool\n# --tag option, using:\n#    autoconf --trace 'LT_SUPPORTED_TAG:$1'\nAC_DEFUN([LT_SUPPORTED_TAG], [])\n\n\n# C support is built-in for now\nm4_define([_LT_LANG_C_enabled], [])\nm4_define([_LT_TAGS], [])\n\n\n# LT_LANG(LANG)\n# -------------\n# Enable libtool support for the given language if not already enabled.\nAC_DEFUN([LT_LANG],\n[AC_BEFORE([$0], [LT_OUTPUT])dnl\nm4_case([$1],\n  [C],\t\t\t[_LT_LANG(C)],\n  [C++],\t\t[_LT_LANG(CXX)],\n  [Go],\t\t\t[_LT_LANG(GO)],\n  [Java],\t\t[_LT_LANG(GCJ)],\n  [Fortran 77],\t\t[_LT_LANG(F77)],\n  [Fortran],\t\t[_LT_LANG(FC)],\n  [Windows Resource],\t[_LT_LANG(RC)],\n  [m4_ifdef([_LT_LANG_]$1[_CONFIG],\n    [_LT_LANG($1)],\n    [m4_fatal([$0: unsupported language: \"$1\"])])])dnl\n])# LT_LANG\n\n\n# _LT_LANG(LANGNAME)\n# ------------------\nm4_defun([_LT_LANG],\n[m4_ifdef([_LT_LANG_]$1[_enabled], [],\n  [LT_SUPPORTED_TAG([$1])dnl\n  m4_append([_LT_TAGS], [$1 ])dnl\n  m4_define([_LT_LANG_]$1[_enabled], [])dnl\n  _LT_LANG_$1_CONFIG($1)])dnl\n])# _LT_LANG\n\n\nm4_ifndef([AC_PROG_GO], [\n# NOTE: This macro has been submitted for inclusion into   #\n#  GNU Autoconf as AC_PROG_GO.  When it is available in    #\n#  a released version of Autoconf we should remove this    #\n#  macro and use it instead.                               #\nm4_defun([AC_PROG_GO],\n[AC_LANG_PUSH(Go)dnl\nAC_ARG_VAR([GOC],     [Go compiler command])dnl\nAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl\n_AC_ARG_VAR_LDFLAGS()dnl\nAC_CHECK_TOOL(GOC, gccgo)\nif test -z \"$GOC\"; then\n  if test -n \"$ac_tool_prefix\"; then\n    AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])\n  fi\nfi\nif test -z \"$GOC\"; then\n  AC_CHECK_PROG(GOC, gccgo, gccgo, false)\nfi\n])#m4_defun\n])#m4_ifndef\n\n\n# _LT_LANG_DEFAULT_CONFIG\n# -----------------------\nm4_defun([_LT_LANG_DEFAULT_CONFIG],\n[AC_PROVIDE_IFELSE([AC_PROG_CXX],\n  [LT_LANG(CXX)],\n  [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])\n\nAC_PROVIDE_IFELSE([AC_PROG_F77],\n  [LT_LANG(F77)],\n  [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])\n\nAC_PROVIDE_IFELSE([AC_PROG_FC],\n  [LT_LANG(FC)],\n  [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])\n\ndnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal\ndnl pulling things in needlessly.\nAC_PROVIDE_IFELSE([AC_PROG_GCJ],\n  [LT_LANG(GCJ)],\n  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],\n    [LT_LANG(GCJ)],\n    [AC_PROVIDE_IFELSE([LT_PROG_GCJ],\n      [LT_LANG(GCJ)],\n      [m4_ifdef([AC_PROG_GCJ],\n\t[m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])\n       m4_ifdef([A][M_PROG_GCJ],\n\t[m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])\n       m4_ifdef([LT_PROG_GCJ],\n\t[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])\n\nAC_PROVIDE_IFELSE([AC_PROG_GO],\n  [LT_LANG(GO)],\n  [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])\n\nAC_PROVIDE_IFELSE([LT_PROG_RC],\n  [LT_LANG(RC)],\n  [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])\n])# _LT_LANG_DEFAULT_CONFIG\n\n# Obsolete macros:\nAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])\nAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])\nAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])\nAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])\nAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])\ndnl aclocal-1.4 backwards compatibility:\ndnl AC_DEFUN([AC_LIBTOOL_CXX], [])\ndnl AC_DEFUN([AC_LIBTOOL_F77], [])\ndnl AC_DEFUN([AC_LIBTOOL_FC], [])\ndnl AC_DEFUN([AC_LIBTOOL_GCJ], [])\ndnl AC_DEFUN([AC_LIBTOOL_RC], [])\n\n\n# _LT_TAG_COMPILER\n# ----------------\nm4_defun([_LT_TAG_COMPILER],\n[AC_REQUIRE([AC_PROG_CC])dnl\n\n_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl\n_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl\n_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl\n_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl\n\n# If no C compiler was specified, use CC.\nLTCC=${LTCC-\"$CC\"}\n\n# If no C compiler flags were specified, use CFLAGS.\nLTCFLAGS=${LTCFLAGS-\"$CFLAGS\"}\n\n# Allow CC to be a program name with arguments.\ncompiler=$CC\n])# _LT_TAG_COMPILER\n\n\n# _LT_COMPILER_BOILERPLATE\n# ------------------------\n# Check for compiler boilerplate output or warnings with\n# the simple compiler test code.\nm4_defun([_LT_COMPILER_BOILERPLATE],\n[m4_require([_LT_DECL_SED])dnl\nac_outfile=conftest.$ac_objext\necho \"$lt_simple_compile_test_code\" >conftest.$ac_ext\neval \"$ac_compile\" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err\n_lt_compiler_boilerplate=`cat conftest.err`\n$RM conftest*\n])# _LT_COMPILER_BOILERPLATE\n\n\n# _LT_LINKER_BOILERPLATE\n# ----------------------\n# Check for linker boilerplate output or warnings with\n# the simple link test code.\nm4_defun([_LT_LINKER_BOILERPLATE],\n[m4_require([_LT_DECL_SED])dnl\nac_outfile=conftest.$ac_objext\necho \"$lt_simple_link_test_code\" >conftest.$ac_ext\neval \"$ac_link\" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err\n_lt_linker_boilerplate=`cat conftest.err`\n$RM -r conftest*\n])# _LT_LINKER_BOILERPLATE\n\n# _LT_REQUIRED_DARWIN_CHECKS\n# -------------------------\nm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[\n  case $host_os in\n    rhapsody* | darwin*)\n    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])\n    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])\n    AC_CHECK_TOOL([LIPO], [lipo], [:])\n    AC_CHECK_TOOL([OTOOL], [otool], [:])\n    AC_CHECK_TOOL([OTOOL64], [otool64], [:])\n    _LT_DECL([], [DSYMUTIL], [1],\n      [Tool to manipulate archived DWARF debug symbol files on Mac OS X])\n    _LT_DECL([], [NMEDIT], [1],\n      [Tool to change global to local symbols on Mac OS X])\n    _LT_DECL([], [LIPO], [1],\n      [Tool to manipulate fat objects and archives on Mac OS X])\n    _LT_DECL([], [OTOOL], [1],\n      [ldd/readelf like tool for Mach-O binaries on Mac OS X])\n    _LT_DECL([], [OTOOL64], [1],\n      [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])\n\n    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],\n      [lt_cv_apple_cc_single_mod=no\n      if test -z \"${LT_MULTI_MODULE}\"; then\n\t# By default we will add the -single_module flag. You can override\n\t# by either setting the environment variable LT_MULTI_MODULE\n\t# non-empty at configure time, or by adding -multi_module to the\n\t# link flags.\n\trm -rf libconftest.dylib*\n\techo \"int foo(void){return 1;}\" > conftest.c\n\techo \"$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \\\n-dynamiclib -Wl,-single_module conftest.c\" >&AS_MESSAGE_LOG_FD\n\t$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \\\n\t  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err\n        _lt_result=$?\n\t# If there is a non-empty error log, and \"single_module\"\n\t# appears in it, assume the flag caused a linker warning\n        if test -s conftest.err && $GREP single_module conftest.err; then\n\t  cat conftest.err >&AS_MESSAGE_LOG_FD\n\t# Otherwise, if the output was created with a 0 exit code from\n\t# the compiler, it worked.\n\telif test -f libconftest.dylib && test $_lt_result -eq 0; then\n\t  lt_cv_apple_cc_single_mod=yes\n\telse\n\t  cat conftest.err >&AS_MESSAGE_LOG_FD\n\tfi\n\trm -rf libconftest.dylib*\n\trm -f conftest.*\n      fi])\n\n    AC_CACHE_CHECK([for -exported_symbols_list linker flag],\n      [lt_cv_ld_exported_symbols_list],\n      [lt_cv_ld_exported_symbols_list=no\n      save_LDFLAGS=$LDFLAGS\n      echo \"_main\" > conftest.sym\n      LDFLAGS=\"$LDFLAGS -Wl,-exported_symbols_list,conftest.sym\"\n      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],\n\t[lt_cv_ld_exported_symbols_list=yes],\n\t[lt_cv_ld_exported_symbols_list=no])\n\tLDFLAGS=\"$save_LDFLAGS\"\n    ])\n\n    AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],\n      [lt_cv_ld_force_load=no\n      cat > conftest.c << _LT_EOF\nint forced_loaded() { return 2;}\n_LT_EOF\n      echo \"$LTCC $LTCFLAGS -c -o conftest.o conftest.c\" >&AS_MESSAGE_LOG_FD\n      $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD\n      echo \"$AR cru libconftest.a conftest.o\" >&AS_MESSAGE_LOG_FD\n      $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD\n      echo \"$RANLIB libconftest.a\" >&AS_MESSAGE_LOG_FD\n      $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD\n      cat > conftest.c << _LT_EOF\nint main() { return 0;}\n_LT_EOF\n      echo \"$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a\" >&AS_MESSAGE_LOG_FD\n      $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err\n      _lt_result=$?\n      if test -s conftest.err && $GREP force_load conftest.err; then\n\tcat conftest.err >&AS_MESSAGE_LOG_FD\n      elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then\n\tlt_cv_ld_force_load=yes\n      else\n\tcat conftest.err >&AS_MESSAGE_LOG_FD\n      fi\n        rm -f conftest.err libconftest.a conftest conftest.c\n        rm -rf conftest.dSYM\n    ])\n    case $host_os in\n    rhapsody* | darwin1.[[012]])\n      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;\n    darwin1.*)\n      _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;\n    darwin*) # darwin 5.x on\n      # if running on 10.5 or later, the deployment target defaults\n      # to the OS version, if on x86, and 10.4, the deployment\n      # target defaults to 10.4. Don't you love it?\n      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in\n\t10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)\n\t  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;\n\t10.[[012]]*)\n\t  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;\n\t10.*)\n\t  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;\n      esac\n    ;;\n  esac\n    if test \"$lt_cv_apple_cc_single_mod\" = \"yes\"; then\n      _lt_dar_single_mod='$single_module'\n    fi\n    if test \"$lt_cv_ld_exported_symbols_list\" = \"yes\"; then\n      _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'\n    else\n      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'\n    fi\n    if test \"$DSYMUTIL\" != \":\" && test \"$lt_cv_ld_force_load\" = \"no\"; then\n      _lt_dsymutil='~$DSYMUTIL $lib || :'\n    else\n      _lt_dsymutil=\n    fi\n    ;;\n  esac\n])\n\n\n# _LT_DARWIN_LINKER_FEATURES([TAG])\n# ---------------------------------\n# Checks for linker and compiler features on darwin\nm4_defun([_LT_DARWIN_LINKER_FEATURES],\n[\n  m4_require([_LT_REQUIRED_DARWIN_CHECKS])\n  _LT_TAGVAR(archive_cmds_need_lc, $1)=no\n  _LT_TAGVAR(hardcode_direct, $1)=no\n  _LT_TAGVAR(hardcode_automatic, $1)=yes\n  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported\n  if test \"$lt_cv_ld_force_load\" = \"yes\"; then\n    _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\\\"\\\"; do test  -n \\\"$conv\\\" && new_convenience=\\\"$new_convenience ${wl}-force_load,$conv\\\"; done; func_echo_all \\\"$new_convenience\\\"`'\n    m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],\n                  [FC],  [_LT_TAGVAR(compiler_needs_object, $1)=yes])\n  else\n    _LT_TAGVAR(whole_archive_flag_spec, $1)=''\n  fi\n  _LT_TAGVAR(link_all_deplibs, $1)=yes\n  _LT_TAGVAR(allow_undefined_flag, $1)=\"$_lt_dar_allow_undefined\"\n  case $cc_basename in\n     ifort*) _lt_dar_can_shared=yes ;;\n     *) _lt_dar_can_shared=$GCC ;;\n  esac\n  if test \"$_lt_dar_can_shared\" = \"yes\"; then\n    output_verbose_link_cmd=func_echo_all\n    _LT_TAGVAR(archive_cmds, $1)=\"\\$CC -dynamiclib \\$allow_undefined_flag -o \\$lib \\$libobjs \\$deplibs \\$compiler_flags -install_name \\$rpath/\\$soname \\$verstring $_lt_dar_single_mod${_lt_dsymutil}\"\n    _LT_TAGVAR(module_cmds, $1)=\"\\$CC \\$allow_undefined_flag -o \\$lib -bundle \\$libobjs \\$deplibs \\$compiler_flags${_lt_dsymutil}\"\n    _LT_TAGVAR(archive_expsym_cmds, $1)=\"sed 's,^,_,' < \\$export_symbols > \\$output_objdir/\\${libname}-symbols.expsym~\\$CC -dynamiclib \\$allow_undefined_flag -o \\$lib \\$libobjs \\$deplibs \\$compiler_flags -install_name \\$rpath/\\$soname \\$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}\"\n    _LT_TAGVAR(module_expsym_cmds, $1)=\"sed -e 's,^,_,' < \\$export_symbols > \\$output_objdir/\\${libname}-symbols.expsym~\\$CC \\$allow_undefined_flag -o \\$lib -bundle \\$libobjs \\$deplibs \\$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}\"\n    m4_if([$1], [CXX],\n[   if test \"$lt_cv_apple_cc_single_mod\" != \"yes\"; then\n      _LT_TAGVAR(archive_cmds, $1)=\"\\$CC -r -keep_private_externs -nostdlib -o \\${lib}-master.o \\$libobjs~\\$CC -dynamiclib \\$allow_undefined_flag -o \\$lib \\${lib}-master.o \\$deplibs \\$compiler_flags -install_name \\$rpath/\\$soname \\$verstring${_lt_dsymutil}\"\n      _LT_TAGVAR(archive_expsym_cmds, $1)=\"sed 's,^,_,' < \\$export_symbols > \\$output_objdir/\\${libname}-symbols.expsym~\\$CC -r -keep_private_externs -nostdlib -o \\${lib}-master.o \\$libobjs~\\$CC -dynamiclib \\$allow_undefined_flag -o \\$lib \\${lib}-master.o \\$deplibs \\$compiler_flags -install_name \\$rpath/\\$soname \\$verstring${_lt_dar_export_syms}${_lt_dsymutil}\"\n    fi\n],[])\n  else\n  _LT_TAGVAR(ld_shlibs, $1)=no\n  fi\n])\n\n# _LT_SYS_MODULE_PATH_AIX([TAGNAME])\n# ----------------------------------\n# Links a minimal program and checks the executable\n# for the system default hardcoded library path. In most cases,\n# this is /usr/lib:/lib, but when the MPI compilers are used\n# the location of the communication and MPI libs are included too.\n# If we don't find anything, use the default library path according\n# to the aix ld manual.\n# Store the results from the different compilers for each TAGNAME.\n# Allow to override them for all tags through lt_cv_aix_libpath.\nm4_defun([_LT_SYS_MODULE_PATH_AIX],\n[m4_require([_LT_DECL_SED])dnl\nif test \"${lt_cv_aix_libpath+set}\" = set; then\n  aix_libpath=$lt_cv_aix_libpath\nelse\n  AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],\n  [AC_LINK_IFELSE([AC_LANG_PROGRAM],[\n  lt_aix_libpath_sed='[\n      /Import File Strings/,/^$/ {\n\t  /^0/ {\n\t      s/^0  *\\([^ ]*\\) *$/\\1/\n\t      p\n\t  }\n      }]'\n  _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e \"$lt_aix_libpath_sed\"`\n  # Check for a 64-bit object if we didn't find anything.\n  if test -z \"$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])\"; then\n    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e \"$lt_aix_libpath_sed\"`\n  fi],[])\n  if test -z \"$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])\"; then\n    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=\"/usr/lib:/lib\"\n  fi\n  ])\n  aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])\nfi\n])# _LT_SYS_MODULE_PATH_AIX\n\n\n# _LT_SHELL_INIT(ARG)\n# -------------------\nm4_define([_LT_SHELL_INIT],\n[m4_divert_text([M4SH-INIT], [$1\n])])# _LT_SHELL_INIT\n\n\n\n# _LT_PROG_ECHO_BACKSLASH\n# -----------------------\n# Find how we can fake an echo command that does not interpret backslash.\n# In particular, with Autoconf 2.60 or later we add some code to the start\n# of the generated configure script which will find a shell with a builtin\n# printf (which we can use as an echo command).\nm4_defun([_LT_PROG_ECHO_BACKSLASH],\n[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'\nECHO=$ECHO$ECHO$ECHO$ECHO$ECHO\nECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO\n\nAC_MSG_CHECKING([how to print strings])\n# Test print first, because it will be a builtin if present.\nif test \"X`( print -r -- -n ) 2>/dev/null`\" = X-n && \\\n   test \"X`print -r -- $ECHO 2>/dev/null`\" = \"X$ECHO\"; then\n  ECHO='print -r --'\nelif test \"X`printf %s $ECHO 2>/dev/null`\" = \"X$ECHO\"; then\n  ECHO='printf %s\\n'\nelse\n  # Use this function as a fallback that always works.\n  func_fallback_echo ()\n  {\n    eval 'cat <<_LTECHO_EOF\n$[]1\n_LTECHO_EOF'\n  }\n  ECHO='func_fallback_echo'\nfi\n\n# func_echo_all arg...\n# Invoke $ECHO with all args, space-separated.\nfunc_echo_all ()\n{\n    $ECHO \"$*\" \n}\n\ncase \"$ECHO\" in\n  printf*) AC_MSG_RESULT([printf]) ;;\n  print*) AC_MSG_RESULT([print -r]) ;;\n  *) AC_MSG_RESULT([cat]) ;;\nesac\n\nm4_ifdef([_AS_DETECT_SUGGESTED],\n[_AS_DETECT_SUGGESTED([\n  test -n \"${ZSH_VERSION+set}${BASH_VERSION+set}\" || (\n    ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'\n    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO\n    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO\n    PATH=/empty FPATH=/empty; export PATH FPATH\n    test \"X`printf %s $ECHO`\" = \"X$ECHO\" \\\n      || test \"X`print -r -- $ECHO`\" = \"X$ECHO\" )])])\n\n_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])\n_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])\n])# _LT_PROG_ECHO_BACKSLASH\n\n\n# _LT_WITH_SYSROOT\n# ----------------\nAC_DEFUN([_LT_WITH_SYSROOT],\n[AC_MSG_CHECKING([for sysroot])\nAC_ARG_WITH([sysroot],\n[  --with-sysroot[=DIR] Search for dependent libraries within DIR\n                        (or the compiler's sysroot if not specified).],\n[], [with_sysroot=no])\n\ndnl lt_sysroot will always be passed unquoted.  We quote it here\ndnl in case the user passed a directory name.\nlt_sysroot=\ncase ${with_sysroot} in #(\n yes)\n   if test \"$GCC\" = yes; then\n     lt_sysroot=`$CC --print-sysroot 2>/dev/null`\n   fi\n   ;; #(\n /*)\n   lt_sysroot=`echo \"$with_sysroot\" | sed -e \"$sed_quote_subst\"`\n   ;; #(\n no|'')\n   ;; #(\n *)\n   AC_MSG_RESULT([${with_sysroot}])\n   AC_MSG_ERROR([The sysroot must be an absolute path.])\n   ;;\nesac\n\n AC_MSG_RESULT([${lt_sysroot:-no}])\n_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl\n[dependent libraries, and in which our libraries should be installed.])])\n\n# _LT_ENABLE_LOCK\n# ---------------\nm4_defun([_LT_ENABLE_LOCK],\n[AC_ARG_ENABLE([libtool-lock],\n  [AS_HELP_STRING([--disable-libtool-lock],\n    [avoid locking (might break parallel builds)])])\ntest \"x$enable_libtool_lock\" != xno && enable_libtool_lock=yes\n\n# Some flags need to be propagated to the compiler or linker for good\n# libtool support.\ncase $host in\nia64-*-hpux*)\n  # Find out which ABI we are using.\n  echo 'int i;' > conftest.$ac_ext\n  if AC_TRY_EVAL(ac_compile); then\n    case `/usr/bin/file conftest.$ac_objext` in\n      *ELF-32*)\n\tHPUX_IA64_MODE=\"32\"\n\t;;\n      *ELF-64*)\n\tHPUX_IA64_MODE=\"64\"\n\t;;\n    esac\n  fi\n  rm -rf conftest*\n  ;;\n*-*-irix6*)\n  # Find out which ABI we are using.\n  echo '[#]line '$LINENO' \"configure\"' > conftest.$ac_ext\n  if AC_TRY_EVAL(ac_compile); then\n    if test \"$lt_cv_prog_gnu_ld\" = yes; then\n      case `/usr/bin/file conftest.$ac_objext` in\n\t*32-bit*)\n\t  LD=\"${LD-ld} -melf32bsmip\"\n\t  ;;\n\t*N32*)\n\t  LD=\"${LD-ld} -melf32bmipn32\"\n\t  ;;\n\t*64-bit*)\n\t  LD=\"${LD-ld} -melf64bmip\"\n\t;;\n      esac\n    else\n      case `/usr/bin/file conftest.$ac_objext` in\n\t*32-bit*)\n\t  LD=\"${LD-ld} -32\"\n\t  ;;\n\t*N32*)\n\t  LD=\"${LD-ld} -n32\"\n\t  ;;\n\t*64-bit*)\n\t  LD=\"${LD-ld} -64\"\n\t  ;;\n      esac\n    fi\n  fi\n  rm -rf conftest*\n  ;;\n\nx86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \\\ns390*-*linux*|s390*-*tpf*|sparc*-*linux*)\n  # Find out which ABI we are using.\n  echo 'int i;' > conftest.$ac_ext\n  if AC_TRY_EVAL(ac_compile); then\n    case `/usr/bin/file conftest.o` in\n      *32-bit*)\n\tcase $host in\n\t  x86_64-*kfreebsd*-gnu)\n\t    LD=\"${LD-ld} -m elf_i386_fbsd\"\n\t    ;;\n\t  x86_64-*linux*)\n\t    case `/usr/bin/file conftest.o` in\n\t      *x86-64*)\n\t\tLD=\"${LD-ld} -m elf32_x86_64\"\n\t\t;;\n\t      *)\n\t\tLD=\"${LD-ld} -m elf_i386\"\n\t\t;;\n\t    esac\n\t    ;;\n\t  powerpc64le-*)\n\t    LD=\"${LD-ld} -m elf32lppclinux\"\n\t    ;;\n\t  powerpc64-*)\n\t    LD=\"${LD-ld} -m elf32ppclinux\"\n\t    ;;\n\t  s390x-*linux*)\n\t    LD=\"${LD-ld} -m elf_s390\"\n\t    ;;\n\t  sparc64-*linux*)\n\t    LD=\"${LD-ld} -m elf32_sparc\"\n\t    ;;\n\tesac\n\t;;\n      *64-bit*)\n\tcase $host in\n\t  x86_64-*kfreebsd*-gnu)\n\t    LD=\"${LD-ld} -m elf_x86_64_fbsd\"\n\t    ;;\n\t  x86_64-*linux*)\n\t    LD=\"${LD-ld} -m elf_x86_64\"\n\t    ;;\n\t  powerpcle-*)\n\t    LD=\"${LD-ld} -m elf64lppc\"\n\t    ;;\n\t  powerpc-*)\n\t    LD=\"${LD-ld} -m elf64ppc\"\n\t    ;;\n\t  s390*-*linux*|s390*-*tpf*)\n\t    LD=\"${LD-ld} -m elf64_s390\"\n\t    ;;\n\t  sparc*-*linux*)\n\t    LD=\"${LD-ld} -m elf64_sparc\"\n\t    ;;\n\tesac\n\t;;\n    esac\n  fi\n  rm -rf conftest*\n  ;;\n\n*-*-sco3.2v5*)\n  # On SCO OpenServer 5, we need -belf to get full-featured binaries.\n  SAVE_CFLAGS=\"$CFLAGS\"\n  CFLAGS=\"$CFLAGS -belf\"\n  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,\n    [AC_LANG_PUSH(C)\n     AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])\n     AC_LANG_POP])\n  if test x\"$lt_cv_cc_needs_belf\" != x\"yes\"; then\n    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf\n    CFLAGS=\"$SAVE_CFLAGS\"\n  fi\n  ;;\n*-*solaris*)\n  # Find out which ABI we are using.\n  echo 'int i;' > conftest.$ac_ext\n  if AC_TRY_EVAL(ac_compile); then\n    case `/usr/bin/file conftest.o` in\n    *64-bit*)\n      case $lt_cv_prog_gnu_ld in\n      yes*)\n        case $host in\n        i?86-*-solaris*)\n          LD=\"${LD-ld} -m elf_x86_64\"\n          ;;\n        sparc*-*-solaris*)\n          LD=\"${LD-ld} -m elf64_sparc\"\n          ;;\n        esac\n        # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.\n        if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then\n          LD=\"${LD-ld}_sol2\"\n        fi\n        ;;\n      *)\n\tif ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then\n\t  LD=\"${LD-ld} -64\"\n\tfi\n\t;;\n      esac\n      ;;\n    esac\n  fi\n  rm -rf conftest*\n  ;;\nesac\n\nneed_locks=\"$enable_libtool_lock\"\n])# _LT_ENABLE_LOCK\n\n\n# _LT_PROG_AR\n# -----------\nm4_defun([_LT_PROG_AR],\n[AC_CHECK_TOOLS(AR, [ar], false)\n: ${AR=ar}\n: ${AR_FLAGS=cru}\n_LT_DECL([], [AR], [1], [The archiver])\n_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])\n\nAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],\n  [lt_cv_ar_at_file=no\n   AC_COMPILE_IFELSE([AC_LANG_PROGRAM],\n     [echo conftest.$ac_objext > conftest.lst\n      lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'\n      AC_TRY_EVAL([lt_ar_try])\n      if test \"$ac_status\" -eq 0; then\n\t# Ensure the archiver fails upon bogus file names.\n\trm -f conftest.$ac_objext libconftest.a\n\tAC_TRY_EVAL([lt_ar_try])\n\tif test \"$ac_status\" -ne 0; then\n          lt_cv_ar_at_file=@\n        fi\n      fi\n      rm -f conftest.* libconftest.a\n     ])\n  ])\n\nif test \"x$lt_cv_ar_at_file\" = xno; then\n  archiver_list_spec=\nelse\n  archiver_list_spec=$lt_cv_ar_at_file\nfi\n_LT_DECL([], [archiver_list_spec], [1],\n  [How to feed a file listing to the archiver])\n])# _LT_PROG_AR\n\n\n# _LT_CMD_OLD_ARCHIVE\n# -------------------\nm4_defun([_LT_CMD_OLD_ARCHIVE],\n[_LT_PROG_AR\n\nAC_CHECK_TOOL(STRIP, strip, :)\ntest -z \"$STRIP\" && STRIP=:\n_LT_DECL([], [STRIP], [1], [A symbol stripping program])\n\nAC_CHECK_TOOL(RANLIB, ranlib, :)\ntest -z \"$RANLIB\" && RANLIB=:\n_LT_DECL([], [RANLIB], [1],\n    [Commands used to install an old-style archive])\n\n# Determine commands to create old-style static archives.\nold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'\nold_postinstall_cmds='chmod 644 $oldlib'\nold_postuninstall_cmds=\n\nif test -n \"$RANLIB\"; then\n  case $host_os in\n  openbsd*)\n    old_postinstall_cmds=\"$old_postinstall_cmds~\\$RANLIB -t \\$tool_oldlib\"\n    ;;\n  *)\n    old_postinstall_cmds=\"$old_postinstall_cmds~\\$RANLIB \\$tool_oldlib\"\n    ;;\n  esac\n  old_archive_cmds=\"$old_archive_cmds~\\$RANLIB \\$tool_oldlib\"\nfi\n\ncase $host_os in\n  darwin*)\n    lock_old_archive_extraction=yes ;;\n  *)\n    lock_old_archive_extraction=no ;;\nesac\n_LT_DECL([], [old_postinstall_cmds], [2])\n_LT_DECL([], [old_postuninstall_cmds], [2])\n_LT_TAGDECL([], [old_archive_cmds], [2],\n    [Commands used to build an old-style archive])\n_LT_DECL([], [lock_old_archive_extraction], [0],\n    [Whether to use a lock for old archive extraction])\n])# _LT_CMD_OLD_ARCHIVE\n\n\n# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,\n#\t\t[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])\n# ----------------------------------------------------------------\n# Check whether the given compiler option works\nAC_DEFUN([_LT_COMPILER_OPTION],\n[m4_require([_LT_FILEUTILS_DEFAULTS])dnl\nm4_require([_LT_DECL_SED])dnl\nAC_CACHE_CHECK([$1], [$2],\n  [$2=no\n   m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])\n   echo \"$lt_simple_compile_test_code\" > conftest.$ac_ext\n   lt_compiler_flag=\"$3\"\n   # Insert the option either (1) after the last *FLAGS variable, or\n   # (2) before a word containing \"conftest.\", or (3) at the end.\n   # Note that $ac_compile itself does not contain backslashes and begins\n   # with a dollar sign (not a hyphen), so the echo should work correctly.\n   # The option is referenced via a variable to avoid confusing sed.\n   lt_compile=`echo \"$ac_compile\" | $SED \\\n   -e 's:.*FLAGS}\\{0,1\\} :&$lt_compiler_flag :; t' \\\n   -e 's: [[^ ]]*conftest\\.: $lt_compiler_flag&:; t' \\\n   -e 's:$: $lt_compiler_flag:'`\n   (eval echo \"\\\"\\$as_me:$LINENO: $lt_compile\\\"\" >&AS_MESSAGE_LOG_FD)\n   (eval \"$lt_compile\" 2>conftest.err)\n   ac_status=$?\n   cat conftest.err >&AS_MESSAGE_LOG_FD\n   echo \"$as_me:$LINENO: \\$? = $ac_status\" >&AS_MESSAGE_LOG_FD\n   if (exit $ac_status) && test -s \"$ac_outfile\"; then\n     # The compiler can only warn and ignore the option if not recognized\n     # So say no if there are warnings other than the usual output.\n     $ECHO \"$_lt_compiler_boilerplate\" | $SED '/^$/d' >conftest.exp\n     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2\n     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then\n       $2=yes\n     fi\n   fi\n   $RM conftest*\n])\n\nif test x\"[$]$2\" = xyes; then\n    m4_if([$5], , :, [$5])\nelse\n    m4_if([$6], , :, [$6])\nfi\n])# _LT_COMPILER_OPTION\n\n# Old name:\nAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])\ndnl aclocal-1.4 backwards compatibility:\ndnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])\n\n\n# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,\n#                  [ACTION-SUCCESS], [ACTION-FAILURE])\n# ----------------------------------------------------\n# Check whether the given linker option works\nAC_DEFUN([_LT_LINKER_OPTION],\n[m4_require([_LT_FILEUTILS_DEFAULTS])dnl\nm4_require([_LT_DECL_SED])dnl\nAC_CACHE_CHECK([$1], [$2],\n  [$2=no\n   save_LDFLAGS=\"$LDFLAGS\"\n   LDFLAGS=\"$LDFLAGS $3\"\n   echo \"$lt_simple_link_test_code\" > conftest.$ac_ext\n   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then\n     # The linker can only warn and ignore the option if not recognized\n     # So say no if there are warnings\n     if test -s conftest.err; then\n       # Append any errors to the config.log.\n       cat conftest.err 1>&AS_MESSAGE_LOG_FD\n       $ECHO \"$_lt_linker_boilerplate\" | $SED '/^$/d' > conftest.exp\n       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2\n       if diff conftest.exp conftest.er2 >/dev/null; then\n         $2=yes\n       fi\n     else\n       $2=yes\n     fi\n   fi\n   $RM -r conftest*\n   LDFLAGS=\"$save_LDFLAGS\"\n])\n\nif test x\"[$]$2\" = xyes; then\n    m4_if([$4], , :, [$4])\nelse\n    m4_if([$5], , :, [$5])\nfi\n])# _LT_LINKER_OPTION\n\n# Old name:\nAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])\ndnl aclocal-1.4 backwards compatibility:\ndnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])\n\n\n# LT_CMD_MAX_LEN\n#---------------\nAC_DEFUN([LT_CMD_MAX_LEN],\n[AC_REQUIRE([AC_CANONICAL_HOST])dnl\n# find the maximum length of command line arguments\nAC_MSG_CHECKING([the maximum length of command line arguments])\nAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl\n  i=0\n  teststring=\"ABCD\"\n\n  case $build_os in\n  msdosdjgpp*)\n    # On DJGPP, this test can blow up pretty badly due to problems in libc\n    # (any single argument exceeding 2000 bytes causes a buffer overrun\n    # during glob expansion).  Even if it were fixed, the result of this\n    # check would be larger than it should be.\n    lt_cv_sys_max_cmd_len=12288;    # 12K is about right\n    ;;\n\n  gnu*)\n    # Under GNU Hurd, this test is not required because there is\n    # no limit to the length of command line arguments.\n    # Libtool will interpret -1 as no limit whatsoever\n    lt_cv_sys_max_cmd_len=-1;\n    ;;\n\n  cygwin* | mingw* | cegcc*)\n    # On Win9x/ME, this test blows up -- it succeeds, but takes\n    # about 5 minutes as the teststring grows exponentially.\n    # Worse, since 9x/ME are not pre-emptively multitasking,\n    # you end up with a \"frozen\" computer, even though with patience\n    # the test eventually succeeds (with a max line length of 256k).\n    # Instead, let's just punt: use the minimum linelength reported by\n    # all of the supported platforms: 8192 (on NT/2K/XP).\n    lt_cv_sys_max_cmd_len=8192;\n    ;;\n\n  mint*)\n    # On MiNT this can take a long time and run out of memory.\n    lt_cv_sys_max_cmd_len=8192;\n    ;;\n\n  amigaos*)\n    # On AmigaOS with pdksh, this test takes hours, literally.\n    # So we just punt and use a minimum line length of 8192.\n    lt_cv_sys_max_cmd_len=8192;\n    ;;\n\n  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)\n    # This has been around since 386BSD, at least.  Likely further.\n    if test -x /sbin/sysctl; then\n      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`\n    elif test -x /usr/sbin/sysctl; then\n      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`\n    else\n      lt_cv_sys_max_cmd_len=65536\t# usable default for all BSDs\n    fi\n    # And add a safety zone\n    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \\/ 4`\n    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \\* 3`\n    ;;\n\n  interix*)\n    # We know the value 262144 and hardcode it with a safety zone (like BSD)\n    lt_cv_sys_max_cmd_len=196608\n    ;;\n\n  os2*)\n    # The test takes a long time on OS/2.\n    lt_cv_sys_max_cmd_len=8192\n    ;;\n\n  osf*)\n    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure\n    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not\n    # nice to cause kernel panics so lets avoid the loop below.\n    # First set a reasonable default.\n    lt_cv_sys_max_cmd_len=16384\n    #\n    if test -x /sbin/sysconfig; then\n      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in\n        *1*) lt_cv_sys_max_cmd_len=-1 ;;\n      esac\n    fi\n    ;;\n  sco3.2v5*)\n    lt_cv_sys_max_cmd_len=102400\n    ;;\n  sysv5* | sco5v6* | sysv4.2uw2*)\n    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`\n    if test -n \"$kargmax\"; then\n      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[\t ]]//'`\n    else\n      lt_cv_sys_max_cmd_len=32768\n    fi\n    ;;\n  *)\n    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`\n    if test -n \"$lt_cv_sys_max_cmd_len\" && \\\n\ttest undefined != \"$lt_cv_sys_max_cmd_len\"; then\n      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \\/ 4`\n      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \\* 3`\n    else\n      # Make teststring a little bigger before we do anything with it.\n      # a 1K string should be a reasonable start.\n      for i in 1 2 3 4 5 6 7 8 ; do\n        teststring=$teststring$teststring\n      done\n      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}\n      # If test is not a shell built-in, we'll probably end up computing a\n      # maximum length that is only half of the actual maximum length, but\n      # we can't tell.\n      while { test \"X\"`env echo \"$teststring$teststring\" 2>/dev/null` \\\n\t         = \"X$teststring$teststring\"; } >/dev/null 2>&1 &&\n\t      test $i != 17 # 1/2 MB should be enough\n      do\n        i=`expr $i + 1`\n        teststring=$teststring$teststring\n      done\n      # Only check the string length outside the loop.\n      lt_cv_sys_max_cmd_len=`expr \"X$teststring\" : \".*\" 2>&1`\n      teststring=\n      # Add a significant safety factor because C++ compilers can tack on\n      # massive amounts of additional arguments before passing them to the\n      # linker.  It appears as though 1/2 is a usable value.\n      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \\/ 2`\n    fi\n    ;;\n  esac\n])\nif test -n $lt_cv_sys_max_cmd_len ; then\n  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)\nelse\n  AC_MSG_RESULT(none)\nfi\nmax_cmd_len=$lt_cv_sys_max_cmd_len\n_LT_DECL([], [max_cmd_len], [0],\n    [What is the maximum length of a command?])\n])# LT_CMD_MAX_LEN\n\n# Old name:\nAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])\ndnl aclocal-1.4 backwards compatibility:\ndnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])\n\n\n# _LT_HEADER_DLFCN\n# ----------------\nm4_defun([_LT_HEADER_DLFCN],\n[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl\n])# _LT_HEADER_DLFCN\n\n\n# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,\n#                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)\n# ----------------------------------------------------------------\nm4_defun([_LT_TRY_DLOPEN_SELF],\n[m4_require([_LT_HEADER_DLFCN])dnl\nif test \"$cross_compiling\" = yes; then :\n  [$4]\nelse\n  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2\n  lt_status=$lt_dlunknown\n  cat > conftest.$ac_ext <<_LT_EOF\n[#line $LINENO \"configure\"\n#include \"confdefs.h\"\n\n#if HAVE_DLFCN_H\n#include <dlfcn.h>\n#endif\n\n#include <stdio.h>\n\n#ifdef RTLD_GLOBAL\n#  define LT_DLGLOBAL\t\tRTLD_GLOBAL\n#else\n#  ifdef DL_GLOBAL\n#    define LT_DLGLOBAL\t\tDL_GLOBAL\n#  else\n#    define LT_DLGLOBAL\t\t0\n#  endif\n#endif\n\n/* We may have to define LT_DLLAZY_OR_NOW in the command line if we\n   find out it does not work in some platform. */\n#ifndef LT_DLLAZY_OR_NOW\n#  ifdef RTLD_LAZY\n#    define LT_DLLAZY_OR_NOW\t\tRTLD_LAZY\n#  else\n#    ifdef DL_LAZY\n#      define LT_DLLAZY_OR_NOW\t\tDL_LAZY\n#    else\n#      ifdef RTLD_NOW\n#        define LT_DLLAZY_OR_NOW\tRTLD_NOW\n#      else\n#        ifdef DL_NOW\n#          define LT_DLLAZY_OR_NOW\tDL_NOW\n#        else\n#          define LT_DLLAZY_OR_NOW\t0\n#        endif\n#      endif\n#    endif\n#  endif\n#endif\n\n/* When -fvisbility=hidden is used, assume the code has been annotated\n   correspondingly for the symbols needed.  */\n#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))\nint fnord () __attribute__((visibility(\"default\")));\n#endif\n\nint fnord () { return 42; }\nint main ()\n{\n  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);\n  int status = $lt_dlunknown;\n\n  if (self)\n    {\n      if (dlsym (self,\"fnord\"))       status = $lt_dlno_uscore;\n      else\n        {\n\t  if (dlsym( self,\"_fnord\"))  status = $lt_dlneed_uscore;\n          else puts (dlerror ());\n\t}\n      /* dlclose (self); */\n    }\n  else\n    puts (dlerror ());\n\n  return status;\n}]\n_LT_EOF\n  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then\n    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null\n    lt_status=$?\n    case x$lt_status in\n      x$lt_dlno_uscore) $1 ;;\n      x$lt_dlneed_uscore) $2 ;;\n      x$lt_dlunknown|x*) $3 ;;\n    esac\n  else :\n    # compilation failed\n    $3\n  fi\nfi\nrm -fr conftest*\n])# _LT_TRY_DLOPEN_SELF\n\n\n# LT_SYS_DLOPEN_SELF\n# ------------------\nAC_DEFUN([LT_SYS_DLOPEN_SELF],\n[m4_require([_LT_HEADER_DLFCN])dnl\nif test \"x$enable_dlopen\" != xyes; then\n  enable_dlopen=unknown\n  enable_dlopen_self=unknown\n  enable_dlopen_self_static=unknown\nelse\n  lt_cv_dlopen=no\n  lt_cv_dlopen_libs=\n\n  case $host_os in\n  beos*)\n    lt_cv_dlopen=\"load_add_on\"\n    lt_cv_dlopen_libs=\n    lt_cv_dlopen_self=yes\n    ;;\n\n  mingw* | pw32* | cegcc*)\n    lt_cv_dlopen=\"LoadLibrary\"\n    lt_cv_dlopen_libs=\n    ;;\n\n  cygwin*)\n    lt_cv_dlopen=\"dlopen\"\n    lt_cv_dlopen_libs=\n    ;;\n\n  darwin*)\n  # if libdl is installed we need to link against it\n    AC_CHECK_LIB([dl], [dlopen],\n\t\t[lt_cv_dlopen=\"dlopen\" lt_cv_dlopen_libs=\"-ldl\"],[\n    lt_cv_dlopen=\"dyld\"\n    lt_cv_dlopen_libs=\n    lt_cv_dlopen_self=yes\n    ])\n    ;;\n\n  *)\n    AC_CHECK_FUNC([shl_load],\n\t  [lt_cv_dlopen=\"shl_load\"],\n      [AC_CHECK_LIB([dld], [shl_load],\n\t    [lt_cv_dlopen=\"shl_load\" lt_cv_dlopen_libs=\"-ldld\"],\n\t[AC_CHECK_FUNC([dlopen],\n\t      [lt_cv_dlopen=\"dlopen\"],\n\t  [AC_CHECK_LIB([dl], [dlopen],\n\t\t[lt_cv_dlopen=\"dlopen\" lt_cv_dlopen_libs=\"-ldl\"],\n\t    [AC_CHECK_LIB([svld], [dlopen],\n\t\t  [lt_cv_dlopen=\"dlopen\" lt_cv_dlopen_libs=\"-lsvld\"],\n\t      [AC_CHECK_LIB([dld], [dld_link],\n\t\t    [lt_cv_dlopen=\"dld_link\" lt_cv_dlopen_libs=\"-ldld\"])\n\t      ])\n\t    ])\n\t  ])\n\t])\n      ])\n    ;;\n  esac\n\n  if test \"x$lt_cv_dlopen\" != xno; then\n    enable_dlopen=yes\n  else\n    enable_dlopen=no\n  fi\n\n  case $lt_cv_dlopen in\n  dlopen)\n    save_CPPFLAGS=\"$CPPFLAGS\"\n    test \"x$ac_cv_header_dlfcn_h\" = xyes && CPPFLAGS=\"$CPPFLAGS -DHAVE_DLFCN_H\"\n\n    save_LDFLAGS=\"$LDFLAGS\"\n    wl=$lt_prog_compiler_wl eval LDFLAGS=\\\"\\$LDFLAGS $export_dynamic_flag_spec\\\"\n\n    save_LIBS=\"$LIBS\"\n    LIBS=\"$lt_cv_dlopen_libs $LIBS\"\n\n    AC_CACHE_CHECK([whether a program can dlopen itself],\n\t  lt_cv_dlopen_self, [dnl\n\t  _LT_TRY_DLOPEN_SELF(\n\t    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,\n\t    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)\n    ])\n\n    if test \"x$lt_cv_dlopen_self\" = xyes; then\n      wl=$lt_prog_compiler_wl eval LDFLAGS=\\\"\\$LDFLAGS $lt_prog_compiler_static\\\"\n      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],\n\t  lt_cv_dlopen_self_static, [dnl\n\t  _LT_TRY_DLOPEN_SELF(\n\t    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,\n\t    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)\n      ])\n    fi\n\n    CPPFLAGS=\"$save_CPPFLAGS\"\n    LDFLAGS=\"$save_LDFLAGS\"\n    LIBS=\"$save_LIBS\"\n    ;;\n  esac\n\n  case $lt_cv_dlopen_self in\n  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;\n  *) enable_dlopen_self=unknown ;;\n  esac\n\n  case $lt_cv_dlopen_self_static in\n  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;\n  *) enable_dlopen_self_static=unknown ;;\n  esac\nfi\n_LT_DECL([dlopen_support], [enable_dlopen], [0],\n\t [Whether dlopen is supported])\n_LT_DECL([dlopen_self], [enable_dlopen_self], [0],\n\t [Whether dlopen of programs is supported])\n_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],\n\t [Whether dlopen of statically linked programs is supported])\n])# LT_SYS_DLOPEN_SELF\n\n# Old name:\nAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])\ndnl aclocal-1.4 backwards compatibility:\ndnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])\n\n\n# _LT_COMPILER_C_O([TAGNAME])\n# ---------------------------\n# Check to see if options -c and -o are simultaneously supported by compiler.\n# This macro does not hard code the compiler like AC_PROG_CC_C_O.\nm4_defun([_LT_COMPILER_C_O],\n[m4_require([_LT_DECL_SED])dnl\nm4_require([_LT_FILEUTILS_DEFAULTS])dnl\nm4_require([_LT_TAG_COMPILER])dnl\nAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],\n  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],\n  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no\n   $RM -r conftest 2>/dev/null\n   mkdir conftest\n   cd conftest\n   mkdir out\n   echo \"$lt_simple_compile_test_code\" > conftest.$ac_ext\n\n   lt_compiler_flag=\"-o out/conftest2.$ac_objext\"\n   # Insert the option either (1) after the last *FLAGS variable, or\n   # (2) before a word containing \"conftest.\", or (3) at the end.\n   # Note that $ac_compile itself does not contain backslashes and begins\n   # with a dollar sign (not a hyphen), so the echo should work correctly.\n   lt_compile=`echo \"$ac_compile\" | $SED \\\n   -e 's:.*FLAGS}\\{0,1\\} :&$lt_compiler_flag :; t' \\\n   -e 's: [[^ ]]*conftest\\.: $lt_compiler_flag&:; t' \\\n   -e 's:$: $lt_compiler_flag:'`\n   (eval echo \"\\\"\\$as_me:$LINENO: $lt_compile\\\"\" >&AS_MESSAGE_LOG_FD)\n   (eval \"$lt_compile\" 2>out/conftest.err)\n   ac_status=$?\n   cat out/conftest.err >&AS_MESSAGE_LOG_FD\n   echo \"$as_me:$LINENO: \\$? = $ac_status\" >&AS_MESSAGE_LOG_FD\n   if (exit $ac_status) && test -s out/conftest2.$ac_objext\n   then\n     # The compiler can only warn and ignore the option if not recognized\n     # So say no if there are warnings\n     $ECHO \"$_lt_compiler_boilerplate\" | $SED '/^$/d' > out/conftest.exp\n     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2\n     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then\n       _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes\n     fi\n   fi\n   chmod u+w . 2>&AS_MESSAGE_LOG_FD\n   $RM conftest*\n   # SGI C++ compiler will create directory out/ii_files/ for\n   # template instantiation\n   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files\n   $RM out/* && rmdir out\n   cd ..\n   $RM -r conftest\n   $RM conftest*\n])\n_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],\n\t[Does compiler simultaneously support -c and -o options?])\n])# _LT_COMPILER_C_O\n\n\n# _LT_COMPILER_FILE_LOCKS([TAGNAME])\n# ----------------------------------\n# Check to see if we can do hard links to lock some files if needed\nm4_defun([_LT_COMPILER_FILE_LOCKS],\n[m4_require([_LT_ENABLE_LOCK])dnl\nm4_require([_LT_FILEUTILS_DEFAULTS])dnl\n_LT_COMPILER_C_O([$1])\n\nhard_links=\"nottested\"\nif test \"$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)\" = no && test \"$need_locks\" != no; then\n  # do not overwrite the value of need_locks provided by the user\n  AC_MSG_CHECKING([if we can lock with hard links])\n  hard_links=yes\n  $RM conftest*\n  ln conftest.a conftest.b 2>/dev/null && hard_links=no\n  touch conftest.a\n  ln conftest.a conftest.b 2>&5 || hard_links=no\n  ln conftest.a conftest.b 2>/dev/null && hard_links=no\n  AC_MSG_RESULT([$hard_links])\n  if test \"$hard_links\" = no; then\n    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])\n    need_locks=warn\n  fi\nelse\n  need_locks=no\nfi\n_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])\n])# _LT_COMPILER_FILE_LOCKS\n\n\n# _LT_CHECK_OBJDIR\n# ----------------\nm4_defun([_LT_CHECK_OBJDIR],\n[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],\n[rm -f .libs 2>/dev/null\nmkdir .libs 2>/dev/null\nif test -d .libs; then\n  lt_cv_objdir=.libs\nelse\n  # MS-DOS does not allow filenames that begin with a dot.\n  lt_cv_objdir=_libs\nfi\nrmdir .libs 2>/dev/null])\nobjdir=$lt_cv_objdir\n_LT_DECL([], [objdir], [0],\n         [The name of the directory that contains temporary libtool files])dnl\nm4_pattern_allow([LT_OBJDIR])dnl\nAC_DEFINE_UNQUOTED(LT_OBJDIR, \"$lt_cv_objdir/\",\n  [Define to the sub-directory in which libtool stores uninstalled libraries.])\n])# _LT_CHECK_OBJDIR\n\n\n# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])\n# --------------------------------------\n# Check hardcoding attributes.\nm4_defun([_LT_LINKER_HARDCODE_LIBPATH],\n[AC_MSG_CHECKING([how to hardcode library paths into programs])\n_LT_TAGVAR(hardcode_action, $1)=\nif test -n \"$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\" ||\n   test -n \"$_LT_TAGVAR(runpath_var, $1)\" ||\n   test \"X$_LT_TAGVAR(hardcode_automatic, $1)\" = \"Xyes\" ; then\n\n  # We can hardcode non-existent directories.\n  if test \"$_LT_TAGVAR(hardcode_direct, $1)\" != no &&\n     # If the only mechanism to avoid hardcoding is shlibpath_var, we\n     # have to relink, otherwise we might link with an installed library\n     # when we should be linking with a yet-to-be-installed one\n     ## test \"$_LT_TAGVAR(hardcode_shlibpath_var, $1)\" != no &&\n     test \"$_LT_TAGVAR(hardcode_minus_L, $1)\" != no; then\n    # Linking always hardcodes the temporary library directory.\n    _LT_TAGVAR(hardcode_action, $1)=relink\n  else\n    # We can link without hardcoding, and we can hardcode nonexisting dirs.\n    _LT_TAGVAR(hardcode_action, $1)=immediate\n  fi\nelse\n  # We cannot hardcode anything, or else we can only hardcode existing\n  # directories.\n  _LT_TAGVAR(hardcode_action, $1)=unsupported\nfi\nAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])\n\nif test \"$_LT_TAGVAR(hardcode_action, $1)\" = relink ||\n   test \"$_LT_TAGVAR(inherit_rpath, $1)\" = yes; then\n  # Fast installation is not supported\n  enable_fast_install=no\nelif test \"$shlibpath_overrides_runpath\" = yes ||\n     test \"$enable_shared\" = no; then\n  # Fast installation is not necessary\n  enable_fast_install=needless\nfi\n_LT_TAGDECL([], [hardcode_action], [0],\n    [How to hardcode a shared library path into an executable])\n])# _LT_LINKER_HARDCODE_LIBPATH\n\n\n# _LT_CMD_STRIPLIB\n# ----------------\nm4_defun([_LT_CMD_STRIPLIB],\n[m4_require([_LT_DECL_EGREP])\nstriplib=\nold_striplib=\nAC_MSG_CHECKING([whether stripping libraries is possible])\nif test -n \"$STRIP\" && $STRIP -V 2>&1 | $GREP \"GNU strip\" >/dev/null; then\n  test -z \"$old_striplib\" && old_striplib=\"$STRIP --strip-debug\"\n  test -z \"$striplib\" && striplib=\"$STRIP --strip-unneeded\"\n  AC_MSG_RESULT([yes])\nelse\n# FIXME - insert some real tests, host_os isn't really good enough\n  case $host_os in\n  darwin*)\n    if test -n \"$STRIP\" ; then\n      striplib=\"$STRIP -x\"\n      old_striplib=\"$STRIP -S\"\n      AC_MSG_RESULT([yes])\n    else\n      AC_MSG_RESULT([no])\n    fi\n    ;;\n  *)\n    AC_MSG_RESULT([no])\n    ;;\n  esac\nfi\n_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])\n_LT_DECL([], [striplib], [1])\n])# _LT_CMD_STRIPLIB\n\n\n# _LT_SYS_DYNAMIC_LINKER([TAG])\n# -----------------------------\n# PORTME Fill in your ld.so characteristics\nm4_defun([_LT_SYS_DYNAMIC_LINKER],\n[AC_REQUIRE([AC_CANONICAL_HOST])dnl\nm4_require([_LT_DECL_EGREP])dnl\nm4_require([_LT_FILEUTILS_DEFAULTS])dnl\nm4_require([_LT_DECL_OBJDUMP])dnl\nm4_require([_LT_DECL_SED])dnl\nm4_require([_LT_CHECK_SHELL_FEATURES])dnl\nAC_MSG_CHECKING([dynamic linker characteristics])\nm4_if([$1],\n\t[], [\nif test \"$GCC\" = yes; then\n  case $host_os in\n    darwin*) lt_awk_arg=\"/^libraries:/,/LR/\" ;;\n    *) lt_awk_arg=\"/^libraries:/\" ;;\n  esac\n  case $host_os in\n    mingw* | cegcc*) lt_sed_strip_eq=\"s,=\\([[A-Za-z]]:\\),\\1,g\" ;;\n    *) lt_sed_strip_eq=\"s,=/,/,g\" ;;\n  esac\n  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e \"s/^libraries://\" -e $lt_sed_strip_eq`\n  case $lt_search_path_spec in\n  *\\;*)\n    # if the path contains \";\" then we assume it to be the separator\n    # otherwise default to the standard path separator (i.e. \":\") - it is\n    # assumed that no part of a normal pathname contains \";\" but that should\n    # okay in the real world where \";\" in dirpaths is itself problematic.\n    lt_search_path_spec=`$ECHO \"$lt_search_path_spec\" | $SED 's/;/ /g'`\n    ;;\n  *)\n    lt_search_path_spec=`$ECHO \"$lt_search_path_spec\" | $SED \"s/$PATH_SEPARATOR/ /g\"`\n    ;;\n  esac\n  # Ok, now we have the path, separated by spaces, we can step through it\n  # and add multilib dir if necessary.\n  lt_tmp_lt_search_path_spec=\n  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`\n  for lt_sys_path in $lt_search_path_spec; do\n    if test -d \"$lt_sys_path/$lt_multi_os_dir\"; then\n      lt_tmp_lt_search_path_spec=\"$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir\"\n    else\n      test -d \"$lt_sys_path\" && \\\n\tlt_tmp_lt_search_path_spec=\"$lt_tmp_lt_search_path_spec $lt_sys_path\"\n    fi\n  done\n  lt_search_path_spec=`$ECHO \"$lt_tmp_lt_search_path_spec\" | awk '\nBEGIN {RS=\" \"; FS=\"/|\\n\";} {\n  lt_foo=\"\";\n  lt_count=0;\n  for (lt_i = NF; lt_i > 0; lt_i--) {\n    if ($lt_i != \"\" && $lt_i != \".\") {\n      if ($lt_i == \"..\") {\n        lt_count++;\n      } else {\n        if (lt_count == 0) {\n          lt_foo=\"/\" $lt_i lt_foo;\n        } else {\n          lt_count--;\n        }\n      }\n    }\n  }\n  if (lt_foo != \"\") { lt_freq[[lt_foo]]++; }\n  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }\n}'`\n  # AWK program above erroneously prepends '/' to C:/dos/paths\n  # for these hosts.\n  case $host_os in\n    mingw* | cegcc*) lt_search_path_spec=`$ECHO \"$lt_search_path_spec\" |\\\n      $SED 's,/\\([[A-Za-z]]:\\),\\1,g'` ;;\n  esac\n  sys_lib_search_path_spec=`$ECHO \"$lt_search_path_spec\" | $lt_NL2SP`\nelse\n  sys_lib_search_path_spec=\"/lib /usr/lib /usr/local/lib\"\nfi])\nlibrary_names_spec=\nlibname_spec='lib$name'\nsoname_spec=\nshrext_cmds=\".so\"\npostinstall_cmds=\npostuninstall_cmds=\nfinish_cmds=\nfinish_eval=\nshlibpath_var=\nshlibpath_overrides_runpath=unknown\nversion_type=none\ndynamic_linker=\"$host_os ld.so\"\nsys_lib_dlsearch_path_spec=\"/lib /usr/lib\"\nneed_lib_prefix=unknown\nhardcode_into_libs=no\n\n# when you set need_version to no, make sure it does not cause -set_version\n# flags to be left without arguments\nneed_version=unknown\n\ncase $host_os in\naix3*)\n  version_type=linux # correct to gnu/linux during the next big refactor\n  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'\n  shlibpath_var=LIBPATH\n\n  # AIX 3 has no versioning support, so we append a major version to the name.\n  soname_spec='${libname}${release}${shared_ext}$major'\n  ;;\n\naix[[4-9]]*)\n  version_type=linux # correct to gnu/linux during the next big refactor\n  need_lib_prefix=no\n  need_version=no\n  hardcode_into_libs=yes\n  if test \"$host_cpu\" = ia64; then\n    # AIX 5 supports IA64\n    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'\n    shlibpath_var=LD_LIBRARY_PATH\n  else\n    # With GCC up to 2.95.x, collect2 would create an import file\n    # for dependence libraries.  The import file would start with\n    # the line `#! .'.  This would cause the generated library to\n    # depend on `.', always an invalid library.  This was fixed in\n    # development snapshots of GCC prior to 3.0.\n    case $host_os in\n      aix4 | aix4.[[01]] | aix4.[[01]].*)\n      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'\n\t   echo ' yes '\n\t   echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then\n\t:\n      else\n\tcan_build_shared=no\n      fi\n      ;;\n    esac\n    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct\n    # soname into executable. Probably we can add versioning support to\n    # collect2, so additional links can be useful in future.\n    if test \"$aix_use_runtimelinking\" = yes; then\n      # If using run time linking (on AIX 4.2 or later) use lib<name>.so\n      # instead of lib<name>.a to let people know that these are not\n      # typical AIX shared libraries.\n      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n    else\n      # We preserve .a as extension for shared libraries through AIX4.2\n      # and later when we are not doing run time linking.\n      library_names_spec='${libname}${release}.a $libname.a'\n      soname_spec='${libname}${release}${shared_ext}$major'\n    fi\n    shlibpath_var=LIBPATH\n  fi\n  ;;\n\namigaos*)\n  case $host_cpu in\n  powerpc)\n    # Since July 2007 AmigaOS4 officially supports .so libraries.\n    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.\n    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n    ;;\n  m68k)\n    library_names_spec='$libname.ixlibrary $libname.a'\n    # Create ${libname}_ixlibrary.a entries in /sys/libs.\n    finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all \"$lib\" | $SED '\\''s%^.*/\\([[^/]]*\\)\\.ixlibrary$%\\1%'\\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show \"cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a\"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'\n    ;;\n  esac\n  ;;\n\nbeos*)\n  library_names_spec='${libname}${shared_ext}'\n  dynamic_linker=\"$host_os ld.so\"\n  shlibpath_var=LIBRARY_PATH\n  ;;\n\nbsdi[[45]]*)\n  version_type=linux # correct to gnu/linux during the next big refactor\n  need_version=no\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  finish_cmds='PATH=\"\\$PATH:/sbin\" ldconfig $libdir'\n  shlibpath_var=LD_LIBRARY_PATH\n  sys_lib_search_path_spec=\"/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib\"\n  sys_lib_dlsearch_path_spec=\"/shlib /usr/lib /usr/local/lib\"\n  # the default ld.so.conf also contains /usr/contrib/lib and\n  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow\n  # libtool to hard-code these into programs\n  ;;\n\ncygwin* | mingw* | pw32* | cegcc*)\n  version_type=windows\n  shrext_cmds=\".dll\"\n  need_version=no\n  need_lib_prefix=no\n\n  case $GCC,$cc_basename in\n  yes,*)\n    # gcc\n    library_names_spec='$libname.dll.a'\n    # DLL is installed to $(libdir)/../bin by postinstall_cmds\n    postinstall_cmds='base_file=`basename \\${file}`~\n      dlpath=`$SHELL 2>&1 -c '\\''. $dir/'\\''\\${base_file}'\\''i; echo \\$dlname'\\''`~\n      dldir=$destdir/`dirname \\$dlpath`~\n      test -d \\$dldir || mkdir -p \\$dldir~\n      $install_prog $dir/$dlname \\$dldir/$dlname~\n      chmod a+x \\$dldir/$dlname~\n      if test -n '\\''$stripme'\\'' && test -n '\\''$striplib'\\''; then\n        eval '\\''$striplib \\$dldir/$dlname'\\'' || exit \\$?;\n      fi'\n    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\\''. $file; echo \\$dlname'\\''`~\n      dlpath=$dir/\\$dldll~\n       $RM \\$dlpath'\n    shlibpath_overrides_runpath=yes\n\n    case $host_os in\n    cygwin*)\n      # Cygwin DLLs use 'cyg' prefix rather than 'lib'\n      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'\nm4_if([$1], [],[\n      sys_lib_search_path_spec=\"$sys_lib_search_path_spec /usr/lib/w32api\"])\n      ;;\n    mingw* | cegcc*)\n      # MinGW DLLs use traditional 'lib' prefix\n      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'\n      ;;\n    pw32*)\n      # pw32 DLLs use 'pw' prefix rather than 'lib'\n      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'\n      ;;\n    esac\n    dynamic_linker='Win32 ld.exe'\n    ;;\n\n  *,cl*)\n    # Native MSVC\n    libname_spec='$name'\n    soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'\n    library_names_spec='${libname}.dll.lib'\n\n    case $build_os in\n    mingw*)\n      sys_lib_search_path_spec=\n      lt_save_ifs=$IFS\n      IFS=';'\n      for lt_path in $LIB\n      do\n        IFS=$lt_save_ifs\n        # Let DOS variable expansion print the short 8.3 style file name.\n        lt_path=`cd \"$lt_path\" 2>/dev/null && cmd //C \"for %i in (\".\") do @echo %~si\"`\n        sys_lib_search_path_spec=\"$sys_lib_search_path_spec $lt_path\"\n      done\n      IFS=$lt_save_ifs\n      # Convert to MSYS style.\n      sys_lib_search_path_spec=`$ECHO \"$sys_lib_search_path_spec\" | sed -e 's|\\\\\\\\|/|g' -e 's| \\\\([[a-zA-Z]]\\\\):| /\\\\1|g' -e 's|^ ||'`\n      ;;\n    cygwin*)\n      # Convert to unix form, then to dos form, then back to unix form\n      # but this time dos style (no spaces!) so that the unix form looks\n      # like /cygdrive/c/PROGRA~1:/cygdr...\n      sys_lib_search_path_spec=`cygpath --path --unix \"$LIB\"`\n      sys_lib_search_path_spec=`cygpath --path --dos \"$sys_lib_search_path_spec\" 2>/dev/null`\n      sys_lib_search_path_spec=`cygpath --path --unix \"$sys_lib_search_path_spec\" | $SED -e \"s/$PATH_SEPARATOR/ /g\"`\n      ;;\n    *)\n      sys_lib_search_path_spec=\"$LIB\"\n      if $ECHO \"$sys_lib_search_path_spec\" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then\n        # It is most probably a Windows format PATH.\n        sys_lib_search_path_spec=`$ECHO \"$sys_lib_search_path_spec\" | $SED -e 's/;/ /g'`\n      else\n        sys_lib_search_path_spec=`$ECHO \"$sys_lib_search_path_spec\" | $SED -e \"s/$PATH_SEPARATOR/ /g\"`\n      fi\n      # FIXME: find the short name or the path components, as spaces are\n      # common. (e.g. \"Program Files\" -> \"PROGRA~1\")\n      ;;\n    esac\n\n    # DLL is installed to $(libdir)/../bin by postinstall_cmds\n    postinstall_cmds='base_file=`basename \\${file}`~\n      dlpath=`$SHELL 2>&1 -c '\\''. $dir/'\\''\\${base_file}'\\''i; echo \\$dlname'\\''`~\n      dldir=$destdir/`dirname \\$dlpath`~\n      test -d \\$dldir || mkdir -p \\$dldir~\n      $install_prog $dir/$dlname \\$dldir/$dlname'\n    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\\''. $file; echo \\$dlname'\\''`~\n      dlpath=$dir/\\$dldll~\n       $RM \\$dlpath'\n    shlibpath_overrides_runpath=yes\n    dynamic_linker='Win32 link.exe'\n    ;;\n\n  *)\n    # Assume MSVC wrapper\n    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'\n    dynamic_linker='Win32 ld.exe'\n    ;;\n  esac\n  # FIXME: first we should search . and the directory the executable is in\n  shlibpath_var=PATH\n  ;;\n\ndarwin* | rhapsody*)\n  dynamic_linker=\"$host_os dyld\"\n  version_type=darwin\n  need_lib_prefix=no\n  need_version=no\n  library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'\n  soname_spec='${libname}${release}${major}$shared_ext'\n  shlibpath_overrides_runpath=yes\n  shlibpath_var=DYLD_LIBRARY_PATH\n  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'\nm4_if([$1], [],[\n  sys_lib_search_path_spec=\"$sys_lib_search_path_spec /usr/local/lib\"])\n  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'\n  ;;\n\ndgux*)\n  version_type=linux # correct to gnu/linux during the next big refactor\n  need_lib_prefix=no\n  need_version=no\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  shlibpath_var=LD_LIBRARY_PATH\n  ;;\n\nfreebsd* | dragonfly*)\n  # DragonFly does not have aout.  When/if they implement a new\n  # versioning mechanism, adjust this.\n  if test -x /usr/bin/objformat; then\n    objformat=`/usr/bin/objformat`\n  else\n    case $host_os in\n    freebsd[[23]].*) objformat=aout ;;\n    *) objformat=elf ;;\n    esac\n  fi\n  version_type=freebsd-$objformat\n  case $version_type in\n    freebsd-elf*)\n      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'\n      need_version=no\n      need_lib_prefix=no\n      ;;\n    freebsd-*)\n      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'\n      need_version=yes\n      ;;\n  esac\n  shlibpath_var=LD_LIBRARY_PATH\n  case $host_os in\n  freebsd2.*)\n    shlibpath_overrides_runpath=yes\n    ;;\n  freebsd3.[[01]]* | freebsdelf3.[[01]]*)\n    shlibpath_overrides_runpath=yes\n    hardcode_into_libs=yes\n    ;;\n  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \\\n  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)\n    shlibpath_overrides_runpath=no\n    hardcode_into_libs=yes\n    ;;\n  *) # from 4.6 on, and DragonFly\n    shlibpath_overrides_runpath=yes\n    hardcode_into_libs=yes\n    ;;\n  esac\n  ;;\n\nhaiku*)\n  version_type=linux # correct to gnu/linux during the next big refactor\n  need_lib_prefix=no\n  need_version=no\n  dynamic_linker=\"$host_os runtime_loader\"\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  shlibpath_var=LIBRARY_PATH\n  shlibpath_overrides_runpath=yes\n  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'\n  hardcode_into_libs=yes\n  ;;\n\nhpux9* | hpux10* | hpux11*)\n  # Give a soname corresponding to the major version so that dld.sl refuses to\n  # link against other versions.\n  version_type=sunos\n  need_lib_prefix=no\n  need_version=no\n  case $host_cpu in\n  ia64*)\n    shrext_cmds='.so'\n    hardcode_into_libs=yes\n    dynamic_linker=\"$host_os dld.so\"\n    shlibpath_var=LD_LIBRARY_PATH\n    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.\n    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n    soname_spec='${libname}${release}${shared_ext}$major'\n    if test \"X$HPUX_IA64_MODE\" = X32; then\n      sys_lib_search_path_spec=\"/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib\"\n    else\n      sys_lib_search_path_spec=\"/usr/lib/hpux64 /usr/local/lib/hpux64\"\n    fi\n    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec\n    ;;\n  hppa*64*)\n    shrext_cmds='.sl'\n    hardcode_into_libs=yes\n    dynamic_linker=\"$host_os dld.sl\"\n    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH\n    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.\n    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n    soname_spec='${libname}${release}${shared_ext}$major'\n    sys_lib_search_path_spec=\"/usr/lib/pa20_64 /usr/ccs/lib/pa20_64\"\n    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec\n    ;;\n  *)\n    shrext_cmds='.sl'\n    dynamic_linker=\"$host_os dld.sl\"\n    shlibpath_var=SHLIB_PATH\n    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH\n    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n    soname_spec='${libname}${release}${shared_ext}$major'\n    ;;\n  esac\n  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...\n  postinstall_cmds='chmod 555 $lib'\n  # or fails outright, so override atomically:\n  install_override_mode=555\n  ;;\n\ninterix[[3-9]]*)\n  version_type=linux # correct to gnu/linux during the next big refactor\n  need_lib_prefix=no\n  need_version=no\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'\n  shlibpath_var=LD_LIBRARY_PATH\n  shlibpath_overrides_runpath=no\n  hardcode_into_libs=yes\n  ;;\n\nirix5* | irix6* | nonstopux*)\n  case $host_os in\n    nonstopux*) version_type=nonstopux ;;\n    *)\n\tif test \"$lt_cv_prog_gnu_ld\" = yes; then\n\t\tversion_type=linux # correct to gnu/linux during the next big refactor\n\telse\n\t\tversion_type=irix\n\tfi ;;\n  esac\n  need_lib_prefix=no\n  need_version=no\n  soname_spec='${libname}${release}${shared_ext}$major'\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'\n  case $host_os in\n  irix5* | nonstopux*)\n    libsuff= shlibsuff=\n    ;;\n  *)\n    case $LD in # libtool.m4 will add one of these switches to LD\n    *-32|*\"-32 \"|*-melf32bsmip|*\"-melf32bsmip \")\n      libsuff= shlibsuff= libmagic=32-bit;;\n    *-n32|*\"-n32 \"|*-melf32bmipn32|*\"-melf32bmipn32 \")\n      libsuff=32 shlibsuff=N32 libmagic=N32;;\n    *-64|*\"-64 \"|*-melf64bmip|*\"-melf64bmip \")\n      libsuff=64 shlibsuff=64 libmagic=64-bit;;\n    *) libsuff= shlibsuff= libmagic=never-match;;\n    esac\n    ;;\n  esac\n  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH\n  shlibpath_overrides_runpath=no\n  sys_lib_search_path_spec=\"/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}\"\n  sys_lib_dlsearch_path_spec=\"/usr/lib${libsuff} /lib${libsuff}\"\n  hardcode_into_libs=yes\n  ;;\n\n# No shared lib support for Linux oldld, aout, or coff.\nlinux*oldld* | linux*aout* | linux*coff*)\n  dynamic_linker=no\n  ;;\n\n# This must be glibc/ELF.\nlinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)\n  version_type=linux # correct to gnu/linux during the next big refactor\n  need_lib_prefix=no\n  need_version=no\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  finish_cmds='PATH=\"\\$PATH:/sbin\" ldconfig -n $libdir'\n  shlibpath_var=LD_LIBRARY_PATH\n  shlibpath_overrides_runpath=no\n\n  # Some binutils ld are patched to set DT_RUNPATH\n  AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],\n    [lt_cv_shlibpath_overrides_runpath=no\n    save_LDFLAGS=$LDFLAGS\n    save_libdir=$libdir\n    eval \"libdir=/foo; wl=\\\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\\\"; \\\n\t LDFLAGS=\\\"\\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\\\"\"\n    AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],\n      [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep \"RUNPATH.*$libdir\" >/dev/null],\n\t [lt_cv_shlibpath_overrides_runpath=yes])])\n    LDFLAGS=$save_LDFLAGS\n    libdir=$save_libdir\n    ])\n  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath\n\n  # This implies no fast_install, which is unacceptable.\n  # Some rework will be needed to allow for fast_install\n  # before this can be enabled.\n  hardcode_into_libs=yes\n\n  # Append ld.so.conf contents to the search path\n  if test -f /etc/ld.so.conf; then\n    lt_ld_extra=`awk '/^include / { system(sprintf(\"cd /etc; cat %s 2>/dev/null\", \\[$]2)); skip = 1; } { if (!skip) print \\[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[\t ]*hwcap[\t ]/d;s/[:,\t]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/\"//g;/^$/d' | tr '\\n' ' '`\n    sys_lib_dlsearch_path_spec=\"/lib /usr/lib $lt_ld_extra\"\n  fi\n\n  # We used to test for /lib/ld.so.1 and disable shared libraries on\n  # powerpc, because MkLinux only supported shared libraries with the\n  # GNU dynamic linker.  Since this was broken with cross compilers,\n  # most powerpc-linux boxes support dynamic linking these days and\n  # people can always --disable-shared, the test was removed, and we\n  # assume the GNU/Linux dynamic linker is in use.\n  dynamic_linker='GNU/Linux ld.so'\n  ;;\n\nnetbsdelf*-gnu)\n  version_type=linux\n  need_lib_prefix=no\n  need_version=no\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  shlibpath_var=LD_LIBRARY_PATH\n  shlibpath_overrides_runpath=no\n  hardcode_into_libs=yes\n  dynamic_linker='NetBSD ld.elf_so'\n  ;;\n\nnetbsd*)\n  version_type=sunos\n  need_lib_prefix=no\n  need_version=no\n  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then\n    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'\n    finish_cmds='PATH=\"\\$PATH:/sbin\" ldconfig -m $libdir'\n    dynamic_linker='NetBSD (a.out) ld.so'\n  else\n    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'\n    soname_spec='${libname}${release}${shared_ext}$major'\n    dynamic_linker='NetBSD ld.elf_so'\n  fi\n  shlibpath_var=LD_LIBRARY_PATH\n  shlibpath_overrides_runpath=yes\n  hardcode_into_libs=yes\n  ;;\n\nnewsos6)\n  version_type=linux # correct to gnu/linux during the next big refactor\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n  shlibpath_var=LD_LIBRARY_PATH\n  shlibpath_overrides_runpath=yes\n  ;;\n\n*nto* | *qnx*)\n  version_type=qnx\n  need_lib_prefix=no\n  need_version=no\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  shlibpath_var=LD_LIBRARY_PATH\n  shlibpath_overrides_runpath=no\n  hardcode_into_libs=yes\n  dynamic_linker='ldqnx.so'\n  ;;\n\nopenbsd*)\n  version_type=sunos\n  sys_lib_dlsearch_path_spec=\"/usr/lib\"\n  need_lib_prefix=no\n  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.\n  case $host_os in\n    openbsd3.3 | openbsd3.3.*)\tneed_version=yes ;;\n    *)\t\t\t\tneed_version=no  ;;\n  esac\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'\n  finish_cmds='PATH=\"\\$PATH:/sbin\" ldconfig -m $libdir'\n  shlibpath_var=LD_LIBRARY_PATH\n  if test -z \"`echo __ELF__ | $CC -E - | $GREP __ELF__`\" || test \"$host_os-$host_cpu\" = \"openbsd2.8-powerpc\"; then\n    case $host_os in\n      openbsd2.[[89]] | openbsd2.[[89]].*)\n\tshlibpath_overrides_runpath=no\n\t;;\n      *)\n\tshlibpath_overrides_runpath=yes\n\t;;\n      esac\n  else\n    shlibpath_overrides_runpath=yes\n  fi\n  ;;\n\nos2*)\n  libname_spec='$name'\n  shrext_cmds=\".dll\"\n  need_lib_prefix=no\n  library_names_spec='$libname${shared_ext} $libname.a'\n  dynamic_linker='OS/2 ld.exe'\n  shlibpath_var=LIBPATH\n  ;;\n\nosf3* | osf4* | osf5*)\n  version_type=osf\n  need_lib_prefix=no\n  need_version=no\n  soname_spec='${libname}${release}${shared_ext}$major'\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n  shlibpath_var=LD_LIBRARY_PATH\n  sys_lib_search_path_spec=\"/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib\"\n  sys_lib_dlsearch_path_spec=\"$sys_lib_search_path_spec\"\n  ;;\n\nrdos*)\n  dynamic_linker=no\n  ;;\n\nsolaris*)\n  version_type=linux # correct to gnu/linux during the next big refactor\n  need_lib_prefix=no\n  need_version=no\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  shlibpath_var=LD_LIBRARY_PATH\n  shlibpath_overrides_runpath=yes\n  hardcode_into_libs=yes\n  # ldd complains unless libraries are executable\n  postinstall_cmds='chmod +x $lib'\n  ;;\n\nsunos4*)\n  version_type=sunos\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'\n  finish_cmds='PATH=\"\\$PATH:/usr/etc\" ldconfig $libdir'\n  shlibpath_var=LD_LIBRARY_PATH\n  shlibpath_overrides_runpath=yes\n  if test \"$with_gnu_ld\" = yes; then\n    need_lib_prefix=no\n  fi\n  need_version=yes\n  ;;\n\nsysv4 | sysv4.3*)\n  version_type=linux # correct to gnu/linux during the next big refactor\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  shlibpath_var=LD_LIBRARY_PATH\n  case $host_vendor in\n    sni)\n      shlibpath_overrides_runpath=no\n      need_lib_prefix=no\n      runpath_var=LD_RUN_PATH\n      ;;\n    siemens)\n      need_lib_prefix=no\n      ;;\n    motorola)\n      need_lib_prefix=no\n      need_version=no\n      shlibpath_overrides_runpath=no\n      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'\n      ;;\n  esac\n  ;;\n\nsysv4*MP*)\n  if test -d /usr/nec ;then\n    version_type=linux # correct to gnu/linux during the next big refactor\n    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'\n    soname_spec='$libname${shared_ext}.$major'\n    shlibpath_var=LD_LIBRARY_PATH\n  fi\n  ;;\n\nsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)\n  version_type=freebsd-elf\n  need_lib_prefix=no\n  need_version=no\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  shlibpath_var=LD_LIBRARY_PATH\n  shlibpath_overrides_runpath=yes\n  hardcode_into_libs=yes\n  if test \"$with_gnu_ld\" = yes; then\n    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'\n  else\n    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'\n    case $host_os in\n      sco3.2v5*)\n        sys_lib_search_path_spec=\"$sys_lib_search_path_spec /lib\"\n\t;;\n    esac\n  fi\n  sys_lib_dlsearch_path_spec='/usr/lib'\n  ;;\n\ntpf*)\n  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.\n  version_type=linux # correct to gnu/linux during the next big refactor\n  need_lib_prefix=no\n  need_version=no\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n  shlibpath_var=LD_LIBRARY_PATH\n  shlibpath_overrides_runpath=no\n  hardcode_into_libs=yes\n  ;;\n\nuts4*)\n  version_type=linux # correct to gnu/linux during the next big refactor\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  shlibpath_var=LD_LIBRARY_PATH\n  ;;\n\n*)\n  dynamic_linker=no\n  ;;\nesac\nAC_MSG_RESULT([$dynamic_linker])\ntest \"$dynamic_linker\" = no && can_build_shared=no\n\nvariables_saved_for_relink=\"PATH $shlibpath_var $runpath_var\"\nif test \"$GCC\" = yes; then\n  variables_saved_for_relink=\"$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH\"\nfi\n\nif test \"${lt_cv_sys_lib_search_path_spec+set}\" = set; then\n  sys_lib_search_path_spec=\"$lt_cv_sys_lib_search_path_spec\"\nfi\nif test \"${lt_cv_sys_lib_dlsearch_path_spec+set}\" = set; then\n  sys_lib_dlsearch_path_spec=\"$lt_cv_sys_lib_dlsearch_path_spec\"\nfi\n\n_LT_DECL([], [variables_saved_for_relink], [1],\n    [Variables whose values should be saved in libtool wrapper scripts and\n    restored at link time])\n_LT_DECL([], [need_lib_prefix], [0],\n    [Do we need the \"lib\" prefix for modules?])\n_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])\n_LT_DECL([], [version_type], [0], [Library versioning type])\n_LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])\n_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])\n_LT_DECL([], [shlibpath_overrides_runpath], [0],\n    [Is shlibpath searched before the hard-coded library search path?])\n_LT_DECL([], [libname_spec], [1], [Format of library name prefix])\n_LT_DECL([], [library_names_spec], [1],\n    [[List of archive names.  First name is the real one, the rest are links.\n    The last name is the one that the linker finds with -lNAME]])\n_LT_DECL([], [soname_spec], [1],\n    [[The coded name of the library, if different from the real name]])\n_LT_DECL([], [install_override_mode], [1],\n    [Permission mode override for installation of shared libraries])\n_LT_DECL([], [postinstall_cmds], [2],\n    [Command to use after installation of a shared archive])\n_LT_DECL([], [postuninstall_cmds], [2],\n    [Command to use after uninstallation of a shared archive])\n_LT_DECL([], [finish_cmds], [2],\n    [Commands used to finish a libtool library installation in a directory])\n_LT_DECL([], [finish_eval], [1],\n    [[As \"finish_cmds\", except a single script fragment to be evaled but\n    not shown]])\n_LT_DECL([], [hardcode_into_libs], [0],\n    [Whether we should hardcode library paths into libraries])\n_LT_DECL([], [sys_lib_search_path_spec], [2],\n    [Compile-time system search path for libraries])\n_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],\n    [Run-time system search path for libraries])\n])# _LT_SYS_DYNAMIC_LINKER\n\n\n# _LT_PATH_TOOL_PREFIX(TOOL)\n# --------------------------\n# find a file program which can recognize shared library\nAC_DEFUN([_LT_PATH_TOOL_PREFIX],\n[m4_require([_LT_DECL_EGREP])dnl\nAC_MSG_CHECKING([for $1])\nAC_CACHE_VAL(lt_cv_path_MAGIC_CMD,\n[case $MAGIC_CMD in\n[[\\\\/*] |  ?:[\\\\/]*])\n  lt_cv_path_MAGIC_CMD=\"$MAGIC_CMD\" # Let the user override the test with a path.\n  ;;\n*)\n  lt_save_MAGIC_CMD=\"$MAGIC_CMD\"\n  lt_save_ifs=\"$IFS\"; IFS=$PATH_SEPARATOR\ndnl $ac_dummy forces splitting on constant user-supplied paths.\ndnl POSIX.2 word splitting is done only on the output of word expansions,\ndnl not every word.  This closes a longstanding sh security hole.\n  ac_dummy=\"m4_if([$2], , $PATH, [$2])\"\n  for ac_dir in $ac_dummy; do\n    IFS=\"$lt_save_ifs\"\n    test -z \"$ac_dir\" && ac_dir=.\n    if test -f $ac_dir/$1; then\n      lt_cv_path_MAGIC_CMD=\"$ac_dir/$1\"\n      if test -n \"$file_magic_test_file\"; then\n\tcase $deplibs_check_method in\n\t\"file_magic \"*)\n\t  file_magic_regex=`expr \"$deplibs_check_method\" : \"file_magic \\(.*\\)\"`\n\t  MAGIC_CMD=\"$lt_cv_path_MAGIC_CMD\"\n\t  if eval $file_magic_cmd \\$file_magic_test_file 2> /dev/null |\n\t    $EGREP \"$file_magic_regex\" > /dev/null; then\n\t    :\n\t  else\n\t    cat <<_LT_EOF 1>&2\n\n*** Warning: the command libtool uses to detect shared libraries,\n*** $file_magic_cmd, produces output that libtool cannot recognize.\n*** The result is that libtool may fail to recognize shared libraries\n*** as such.  This will affect the creation of libtool libraries that\n*** depend on shared libraries, but programs linked with such libtool\n*** libraries will work regardless of this problem.  Nevertheless, you\n*** may want to report the problem to your system manager and/or to\n*** bug-libtool@gnu.org\n\n_LT_EOF\n\t  fi ;;\n\tesac\n      fi\n      break\n    fi\n  done\n  IFS=\"$lt_save_ifs\"\n  MAGIC_CMD=\"$lt_save_MAGIC_CMD\"\n  ;;\nesac])\nMAGIC_CMD=\"$lt_cv_path_MAGIC_CMD\"\nif test -n \"$MAGIC_CMD\"; then\n  AC_MSG_RESULT($MAGIC_CMD)\nelse\n  AC_MSG_RESULT(no)\nfi\n_LT_DECL([], [MAGIC_CMD], [0],\n\t [Used to examine libraries when file_magic_cmd begins with \"file\"])dnl\n])# _LT_PATH_TOOL_PREFIX\n\n# Old name:\nAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])\ndnl aclocal-1.4 backwards compatibility:\ndnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])\n\n\n# _LT_PATH_MAGIC\n# --------------\n# find a file program which can recognize a shared library\nm4_defun([_LT_PATH_MAGIC],\n[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)\nif test -z \"$lt_cv_path_MAGIC_CMD\"; then\n  if test -n \"$ac_tool_prefix\"; then\n    _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)\n  else\n    MAGIC_CMD=:\n  fi\nfi\n])# _LT_PATH_MAGIC\n\n\n# LT_PATH_LD\n# ----------\n# find the pathname to the GNU or non-GNU linker\nAC_DEFUN([LT_PATH_LD],\n[AC_REQUIRE([AC_PROG_CC])dnl\nAC_REQUIRE([AC_CANONICAL_HOST])dnl\nAC_REQUIRE([AC_CANONICAL_BUILD])dnl\nm4_require([_LT_DECL_SED])dnl\nm4_require([_LT_DECL_EGREP])dnl\nm4_require([_LT_PROG_ECHO_BACKSLASH])dnl\n\nAC_ARG_WITH([gnu-ld],\n    [AS_HELP_STRING([--with-gnu-ld],\n\t[assume the C compiler uses GNU ld @<:@default=no@:>@])],\n    [test \"$withval\" = no || with_gnu_ld=yes],\n    [with_gnu_ld=no])dnl\n\nac_prog=ld\nif test \"$GCC\" = yes; then\n  # Check if gcc -print-prog-name=ld gives a path.\n  AC_MSG_CHECKING([for ld used by $CC])\n  case $host in\n  *-*-mingw*)\n    # gcc leaves a trailing carriage return which upsets mingw\n    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\\015'` ;;\n  *)\n    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;\n  esac\n  case $ac_prog in\n    # Accept absolute paths.\n    [[\\\\/]]* | ?:[[\\\\/]]*)\n      re_direlt='/[[^/]][[^/]]*/\\.\\./'\n      # Canonicalize the pathname of ld\n      ac_prog=`$ECHO \"$ac_prog\"| $SED 's%\\\\\\\\%/%g'`\n      while $ECHO \"$ac_prog\" | $GREP \"$re_direlt\" > /dev/null 2>&1; do\n\tac_prog=`$ECHO $ac_prog| $SED \"s%$re_direlt%/%\"`\n      done\n      test -z \"$LD\" && LD=\"$ac_prog\"\n      ;;\n  \"\")\n    # If it fails, then pretend we aren't using GCC.\n    ac_prog=ld\n    ;;\n  *)\n    # If it is relative, then search for the first ld in PATH.\n    with_gnu_ld=unknown\n    ;;\n  esac\nelif test \"$with_gnu_ld\" = yes; then\n  AC_MSG_CHECKING([for GNU ld])\nelse\n  AC_MSG_CHECKING([for non-GNU ld])\nfi\nAC_CACHE_VAL(lt_cv_path_LD,\n[if test -z \"$LD\"; then\n  lt_save_ifs=\"$IFS\"; IFS=$PATH_SEPARATOR\n  for ac_dir in $PATH; do\n    IFS=\"$lt_save_ifs\"\n    test -z \"$ac_dir\" && ac_dir=.\n    if test -f \"$ac_dir/$ac_prog\" || test -f \"$ac_dir/$ac_prog$ac_exeext\"; then\n      lt_cv_path_LD=\"$ac_dir/$ac_prog\"\n      # Check to see if the program is GNU ld.  I'd rather use --version,\n      # but apparently some variants of GNU ld only accept -v.\n      # Break only if it was the GNU/non-GNU ld that we prefer.\n      case `\"$lt_cv_path_LD\" -v 2>&1 </dev/null` in\n      *GNU* | *'with BFD'*)\n\ttest \"$with_gnu_ld\" != no && break\n\t;;\n      *)\n\ttest \"$with_gnu_ld\" != yes && break\n\t;;\n      esac\n    fi\n  done\n  IFS=\"$lt_save_ifs\"\nelse\n  lt_cv_path_LD=\"$LD\" # Let the user override the test with a path.\nfi])\nLD=\"$lt_cv_path_LD\"\nif test -n \"$LD\"; then\n  AC_MSG_RESULT($LD)\nelse\n  AC_MSG_RESULT(no)\nfi\ntest -z \"$LD\" && AC_MSG_ERROR([no acceptable ld found in \\$PATH])\n_LT_PATH_LD_GNU\nAC_SUBST([LD])\n\n_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])\n])# LT_PATH_LD\n\n# Old names:\nAU_ALIAS([AM_PROG_LD], [LT_PATH_LD])\nAU_ALIAS([AC_PROG_LD], [LT_PATH_LD])\ndnl aclocal-1.4 backwards compatibility:\ndnl AC_DEFUN([AM_PROG_LD], [])\ndnl AC_DEFUN([AC_PROG_LD], [])\n\n\n# _LT_PATH_LD_GNU\n#- --------------\nm4_defun([_LT_PATH_LD_GNU],\n[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,\n[# I'd rather use --version here, but apparently some GNU lds only accept -v.\ncase `$LD -v 2>&1 </dev/null` in\n*GNU* | *'with BFD'*)\n  lt_cv_prog_gnu_ld=yes\n  ;;\n*)\n  lt_cv_prog_gnu_ld=no\n  ;;\nesac])\nwith_gnu_ld=$lt_cv_prog_gnu_ld\n])# _LT_PATH_LD_GNU\n\n\n# _LT_CMD_RELOAD\n# --------------\n# find reload flag for linker\n#   -- PORTME Some linkers may need a different reload flag.\nm4_defun([_LT_CMD_RELOAD],\n[AC_CACHE_CHECK([for $LD option to reload object files],\n  lt_cv_ld_reload_flag,\n  [lt_cv_ld_reload_flag='-r'])\nreload_flag=$lt_cv_ld_reload_flag\ncase $reload_flag in\n\"\" | \" \"*) ;;\n*) reload_flag=\" $reload_flag\" ;;\nesac\nreload_cmds='$LD$reload_flag -o $output$reload_objs'\ncase $host_os in\n  cygwin* | mingw* | pw32* | cegcc*)\n    if test \"$GCC\" != yes; then\n      reload_cmds=false\n    fi\n    ;;\n  darwin*)\n    if test \"$GCC\" = yes; then\n      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'\n    else\n      reload_cmds='$LD$reload_flag -o $output$reload_objs'\n    fi\n    ;;\nesac\n_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl\n_LT_TAGDECL([], [reload_cmds], [2])dnl\n])# _LT_CMD_RELOAD\n\n\n# _LT_CHECK_MAGIC_METHOD\n# ----------------------\n# how to check for library dependencies\n#  -- PORTME fill in with the dynamic library characteristics\nm4_defun([_LT_CHECK_MAGIC_METHOD],\n[m4_require([_LT_DECL_EGREP])\nm4_require([_LT_DECL_OBJDUMP])\nAC_CACHE_CHECK([how to recognize dependent libraries],\nlt_cv_deplibs_check_method,\n[lt_cv_file_magic_cmd='$MAGIC_CMD'\nlt_cv_file_magic_test_file=\nlt_cv_deplibs_check_method='unknown'\n# Need to set the preceding variable on all platforms that support\n# interlibrary dependencies.\n# 'none' -- dependencies not supported.\n# `unknown' -- same as none, but documents that we really don't know.\n# 'pass_all' -- all dependencies passed with no checks.\n# 'test_compile' -- check by making test program.\n# 'file_magic [[regex]]' -- check by looking for files in library path\n# which responds to the $file_magic_cmd with a given extended regex.\n# If you have `file' or equivalent on your system and you're not sure\n# whether `pass_all' will *always* work, you probably want this one.\n\ncase $host_os in\naix[[4-9]]*)\n  lt_cv_deplibs_check_method=pass_all\n  ;;\n\nbeos*)\n  lt_cv_deplibs_check_method=pass_all\n  ;;\n\nbsdi[[45]]*)\n  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'\n  lt_cv_file_magic_cmd='/usr/bin/file -L'\n  lt_cv_file_magic_test_file=/shlib/libc.so\n  ;;\n\ncygwin*)\n  # func_win32_libid is a shell function defined in ltmain.sh\n  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'\n  lt_cv_file_magic_cmd='func_win32_libid'\n  ;;\n\nmingw* | pw32*)\n  # Base MSYS/MinGW do not provide the 'file' command needed by\n  # func_win32_libid shell function, so use a weaker test based on 'objdump',\n  # unless we find 'file', for example because we are cross-compiling.\n  # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.\n  if ( test \"$lt_cv_nm_interface\" = \"BSD nm\" && file / ) >/dev/null 2>&1; then\n    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'\n    lt_cv_file_magic_cmd='func_win32_libid'\n  else\n    # Keep this pattern in sync with the one in func_win32_libid.\n    lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'\n    lt_cv_file_magic_cmd='$OBJDUMP -f'\n  fi\n  ;;\n\ncegcc*)\n  # use the weaker test based on 'objdump'. See mingw*.\n  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'\n  lt_cv_file_magic_cmd='$OBJDUMP -f'\n  ;;\n\ndarwin* | rhapsody*)\n  lt_cv_deplibs_check_method=pass_all\n  ;;\n\nfreebsd* | dragonfly*)\n  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then\n    case $host_cpu in\n    i*86 )\n      # Not sure whether the presence of OpenBSD here was a mistake.\n      # Let's accept both of them until this is cleared up.\n      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'\n      lt_cv_file_magic_cmd=/usr/bin/file\n      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`\n      ;;\n    esac\n  else\n    lt_cv_deplibs_check_method=pass_all\n  fi\n  ;;\n\nhaiku*)\n  lt_cv_deplibs_check_method=pass_all\n  ;;\n\nhpux10.20* | hpux11*)\n  lt_cv_file_magic_cmd=/usr/bin/file\n  case $host_cpu in\n  ia64*)\n    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'\n    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so\n    ;;\n  hppa*64*)\n    [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\\.[0-9]']\n    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl\n    ;;\n  *)\n    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\\.[[0-9]]) shared library'\n    lt_cv_file_magic_test_file=/usr/lib/libc.sl\n    ;;\n  esac\n  ;;\n\ninterix[[3-9]]*)\n  # PIC code is broken on Interix 3.x, that's why |\\.a not |_pic\\.a here\n  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\\.so|\\.a)$'\n  ;;\n\nirix5* | irix6* | nonstopux*)\n  case $LD in\n  *-32|*\"-32 \") libmagic=32-bit;;\n  *-n32|*\"-n32 \") libmagic=N32;;\n  *-64|*\"-64 \") libmagic=64-bit;;\n  *) libmagic=never-match;;\n  esac\n  lt_cv_deplibs_check_method=pass_all\n  ;;\n\n# This must be glibc/ELF.\nlinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)\n  lt_cv_deplibs_check_method=pass_all\n  ;;\n\nnetbsd* | netbsdelf*-gnu)\n  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then\n    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\\.so\\.[[0-9]]+\\.[[0-9]]+|_pic\\.a)$'\n  else\n    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\\.so|_pic\\.a)$'\n  fi\n  ;;\n\nnewos6*)\n  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'\n  lt_cv_file_magic_cmd=/usr/bin/file\n  lt_cv_file_magic_test_file=/usr/lib/libnls.so\n  ;;\n\n*nto* | *qnx*)\n  lt_cv_deplibs_check_method=pass_all\n  ;;\n\nopenbsd*)\n  if test -z \"`echo __ELF__ | $CC -E - | $GREP __ELF__`\" || test \"$host_os-$host_cpu\" = \"openbsd2.8-powerpc\"; then\n    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\\.so\\.[[0-9]]+\\.[[0-9]]+|\\.so|_pic\\.a)$'\n  else\n    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\\.so\\.[[0-9]]+\\.[[0-9]]+|_pic\\.a)$'\n  fi\n  ;;\n\nosf3* | osf4* | osf5*)\n  lt_cv_deplibs_check_method=pass_all\n  ;;\n\nrdos*)\n  lt_cv_deplibs_check_method=pass_all\n  ;;\n\nsolaris*)\n  lt_cv_deplibs_check_method=pass_all\n  ;;\n\nsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)\n  lt_cv_deplibs_check_method=pass_all\n  ;;\n\nsysv4 | sysv4.3*)\n  case $host_vendor in\n  motorola)\n    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]'\n    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`\n    ;;\n  ncr)\n    lt_cv_deplibs_check_method=pass_all\n    ;;\n  sequent)\n    lt_cv_file_magic_cmd='/bin/file'\n    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'\n    ;;\n  sni)\n    lt_cv_file_magic_cmd='/bin/file'\n    lt_cv_deplibs_check_method=\"file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib\"\n    lt_cv_file_magic_test_file=/lib/libc.so\n    ;;\n  siemens)\n    lt_cv_deplibs_check_method=pass_all\n    ;;\n  pc)\n    lt_cv_deplibs_check_method=pass_all\n    ;;\n  esac\n  ;;\n\ntpf*)\n  lt_cv_deplibs_check_method=pass_all\n  ;;\nesac\n])\n\nfile_magic_glob=\nwant_nocaseglob=no\nif test \"$build\" = \"$host\"; then\n  case $host_os in\n  mingw* | pw32*)\n    if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then\n      want_nocaseglob=yes\n    else\n      file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e \"s/\\(..\\)/s\\/[[\\1]]\\/[[\\1]]\\/g;/g\"`\n    fi\n    ;;\n  esac\nfi\n\nfile_magic_cmd=$lt_cv_file_magic_cmd\ndeplibs_check_method=$lt_cv_deplibs_check_method\ntest -z \"$deplibs_check_method\" && deplibs_check_method=unknown\n\n_LT_DECL([], [deplibs_check_method], [1],\n    [Method to check whether dependent libraries are shared objects])\n_LT_DECL([], [file_magic_cmd], [1],\n    [Command to use when deplibs_check_method = \"file_magic\"])\n_LT_DECL([], [file_magic_glob], [1],\n    [How to find potential files when deplibs_check_method = \"file_magic\"])\n_LT_DECL([], [want_nocaseglob], [1],\n    [Find potential files using nocaseglob when deplibs_check_method = \"file_magic\"])\n])# _LT_CHECK_MAGIC_METHOD\n\n\n# LT_PATH_NM\n# ----------\n# find the pathname to a BSD- or MS-compatible name lister\nAC_DEFUN([LT_PATH_NM],\n[AC_REQUIRE([AC_PROG_CC])dnl\nAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,\n[if test -n \"$NM\"; then\n  # Let the user override the test.\n  lt_cv_path_NM=\"$NM\"\nelse\n  lt_nm_to_check=\"${ac_tool_prefix}nm\"\n  if test -n \"$ac_tool_prefix\" && test \"$build\" = \"$host\"; then\n    lt_nm_to_check=\"$lt_nm_to_check nm\"\n  fi\n  for lt_tmp_nm in $lt_nm_to_check; do\n    lt_save_ifs=\"$IFS\"; IFS=$PATH_SEPARATOR\n    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do\n      IFS=\"$lt_save_ifs\"\n      test -z \"$ac_dir\" && ac_dir=.\n      tmp_nm=\"$ac_dir/$lt_tmp_nm\"\n      if test -f \"$tmp_nm\" || test -f \"$tmp_nm$ac_exeext\" ; then\n\t# Check to see if the nm accepts a BSD-compat flag.\n\t# Adding the `sed 1q' prevents false positives on HP-UX, which says:\n\t#   nm: unknown option \"B\" ignored\n\t# Tru64's nm complains that /dev/null is an invalid object file\n\tcase `\"$tmp_nm\" -B /dev/null 2>&1 | sed '1q'` in\n\t*/dev/null* | *'Invalid file or object type'*)\n\t  lt_cv_path_NM=\"$tmp_nm -B\"\n\t  break\n\t  ;;\n\t*)\n\t  case `\"$tmp_nm\" -p /dev/null 2>&1 | sed '1q'` in\n\t  */dev/null*)\n\t    lt_cv_path_NM=\"$tmp_nm -p\"\n\t    break\n\t    ;;\n\t  *)\n\t    lt_cv_path_NM=${lt_cv_path_NM=\"$tmp_nm\"} # keep the first match, but\n\t    continue # so that we can try to find one that supports BSD flags\n\t    ;;\n\t  esac\n\t  ;;\n\tesac\n      fi\n    done\n    IFS=\"$lt_save_ifs\"\n  done\n  : ${lt_cv_path_NM=no}\nfi])\nif test \"$lt_cv_path_NM\" != \"no\"; then\n  NM=\"$lt_cv_path_NM\"\nelse\n  # Didn't find any BSD compatible name lister, look for dumpbin.\n  if test -n \"$DUMPBIN\"; then :\n    # Let the user override the test.\n  else\n    AC_CHECK_TOOLS(DUMPBIN, [dumpbin \"link -dump\"], :)\n    case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in\n    *COFF*)\n      DUMPBIN=\"$DUMPBIN -symbols\"\n      ;;\n    *)\n      DUMPBIN=:\n      ;;\n    esac\n  fi\n  AC_SUBST([DUMPBIN])\n  if test \"$DUMPBIN\" != \":\"; then\n    NM=\"$DUMPBIN\"\n  fi\nfi\ntest -z \"$NM\" && NM=nm\nAC_SUBST([NM])\n_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl\n\nAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],\n  [lt_cv_nm_interface=\"BSD nm\"\n  echo \"int some_variable = 0;\" > conftest.$ac_ext\n  (eval echo \"\\\"\\$as_me:$LINENO: $ac_compile\\\"\" >&AS_MESSAGE_LOG_FD)\n  (eval \"$ac_compile\" 2>conftest.err)\n  cat conftest.err >&AS_MESSAGE_LOG_FD\n  (eval echo \"\\\"\\$as_me:$LINENO: $NM \\\\\\\"conftest.$ac_objext\\\\\\\"\\\"\" >&AS_MESSAGE_LOG_FD)\n  (eval \"$NM \\\"conftest.$ac_objext\\\"\" 2>conftest.err > conftest.out)\n  cat conftest.err >&AS_MESSAGE_LOG_FD\n  (eval echo \"\\\"\\$as_me:$LINENO: output\\\"\" >&AS_MESSAGE_LOG_FD)\n  cat conftest.out >&AS_MESSAGE_LOG_FD\n  if $GREP 'External.*some_variable' conftest.out > /dev/null; then\n    lt_cv_nm_interface=\"MS dumpbin\"\n  fi\n  rm -f conftest*])\n])# LT_PATH_NM\n\n# Old names:\nAU_ALIAS([AM_PROG_NM], [LT_PATH_NM])\nAU_ALIAS([AC_PROG_NM], [LT_PATH_NM])\ndnl aclocal-1.4 backwards compatibility:\ndnl AC_DEFUN([AM_PROG_NM], [])\ndnl AC_DEFUN([AC_PROG_NM], [])\n\n# _LT_CHECK_SHAREDLIB_FROM_LINKLIB\n# --------------------------------\n# how to determine the name of the shared library\n# associated with a specific link library.\n#  -- PORTME fill in with the dynamic library characteristics\nm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],\n[m4_require([_LT_DECL_EGREP])\nm4_require([_LT_DECL_OBJDUMP])\nm4_require([_LT_DECL_DLLTOOL])\nAC_CACHE_CHECK([how to associate runtime and link libraries],\nlt_cv_sharedlib_from_linklib_cmd,\n[lt_cv_sharedlib_from_linklib_cmd='unknown'\n\ncase $host_os in\ncygwin* | mingw* | pw32* | cegcc*)\n  # two different shell functions defined in ltmain.sh\n  # decide which to use based on capabilities of $DLLTOOL\n  case `$DLLTOOL --help 2>&1` in\n  *--identify-strict*)\n    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib\n    ;;\n  *)\n    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback\n    ;;\n  esac\n  ;;\n*)\n  # fallback: assume linklib IS sharedlib\n  lt_cv_sharedlib_from_linklib_cmd=\"$ECHO\"\n  ;;\nesac\n])\nsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd\ntest -z \"$sharedlib_from_linklib_cmd\" && sharedlib_from_linklib_cmd=$ECHO\n\n_LT_DECL([], [sharedlib_from_linklib_cmd], [1],\n    [Command to associate shared and link libraries])\n])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB\n\n\n# _LT_PATH_MANIFEST_TOOL\n# ----------------------\n# locate the manifest tool\nm4_defun([_LT_PATH_MANIFEST_TOOL],\n[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)\ntest -z \"$MANIFEST_TOOL\" && MANIFEST_TOOL=mt\nAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],\n  [lt_cv_path_mainfest_tool=no\n  echo \"$as_me:$LINENO: $MANIFEST_TOOL '-?'\" >&AS_MESSAGE_LOG_FD\n  $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out\n  cat conftest.err >&AS_MESSAGE_LOG_FD\n  if $GREP 'Manifest Tool' conftest.out > /dev/null; then\n    lt_cv_path_mainfest_tool=yes\n  fi\n  rm -f conftest*])\nif test \"x$lt_cv_path_mainfest_tool\" != xyes; then\n  MANIFEST_TOOL=:\nfi\n_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl\n])# _LT_PATH_MANIFEST_TOOL\n\n\n# LT_LIB_M\n# --------\n# check for math library\nAC_DEFUN([LT_LIB_M],\n[AC_REQUIRE([AC_CANONICAL_HOST])dnl\nLIBM=\ncase $host in\n*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)\n  # These system don't have libm, or don't need it\n  ;;\n*-ncr-sysv4.3*)\n  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=\"-lmw\")\n  AC_CHECK_LIB(m, cos, LIBM=\"$LIBM -lm\")\n  ;;\n*)\n  AC_CHECK_LIB(m, cos, LIBM=\"-lm\")\n  ;;\nesac\nAC_SUBST([LIBM])\n])# LT_LIB_M\n\n# Old name:\nAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])\ndnl aclocal-1.4 backwards compatibility:\ndnl AC_DEFUN([AC_CHECK_LIBM], [])\n\n\n# _LT_COMPILER_NO_RTTI([TAGNAME])\n# -------------------------------\nm4_defun([_LT_COMPILER_NO_RTTI],\n[m4_require([_LT_TAG_COMPILER])dnl\n\n_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=\n\nif test \"$GCC\" = yes; then\n  case $cc_basename in\n  nvcc*)\n    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;\n  *)\n    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;\n  esac\n\n  _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],\n    lt_cv_prog_compiler_rtti_exceptions,\n    [-fno-rtti -fno-exceptions], [],\n    [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=\"$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions\"])\nfi\n_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],\n\t[Compiler flag to turn off builtin functions])\n])# _LT_COMPILER_NO_RTTI\n\n\n# _LT_CMD_GLOBAL_SYMBOLS\n# ----------------------\nm4_defun([_LT_CMD_GLOBAL_SYMBOLS],\n[AC_REQUIRE([AC_CANONICAL_HOST])dnl\nAC_REQUIRE([AC_PROG_CC])dnl\nAC_REQUIRE([AC_PROG_AWK])dnl\nAC_REQUIRE([LT_PATH_NM])dnl\nAC_REQUIRE([LT_PATH_LD])dnl\nm4_require([_LT_DECL_SED])dnl\nm4_require([_LT_DECL_EGREP])dnl\nm4_require([_LT_TAG_COMPILER])dnl\n\n# Check for command to grab the raw symbol name followed by C symbol from nm.\nAC_MSG_CHECKING([command to parse $NM output from $compiler object])\nAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],\n[\n# These are sane defaults that work on at least a few old systems.\n# [They come from Ultrix.  What could be older than Ultrix?!! ;)]\n\n# Character class describing NM global symbol codes.\nsymcode='[[BCDEGRST]]'\n\n# Regexp to match symbols that can be accessed directly from C.\nsympat='\\([[_A-Za-z]][[_A-Za-z0-9]]*\\)'\n\n# Define system-specific variables.\ncase $host_os in\naix*)\n  symcode='[[BCDT]]'\n  ;;\ncygwin* | mingw* | pw32* | cegcc*)\n  symcode='[[ABCDGISTW]]'\n  ;;\nhpux*)\n  if test \"$host_cpu\" = ia64; then\n    symcode='[[ABCDEGRST]]'\n  fi\n  ;;\nirix* | nonstopux*)\n  symcode='[[BCDEGRST]]'\n  ;;\nosf*)\n  symcode='[[BCDEGQRST]]'\n  ;;\nsolaris*)\n  symcode='[[BDRT]]'\n  ;;\nsco3.2v5*)\n  symcode='[[DT]]'\n  ;;\nsysv4.2uw2*)\n  symcode='[[DT]]'\n  ;;\nsysv5* | sco5v6* | unixware* | OpenUNIX*)\n  symcode='[[ABDT]]'\n  ;;\nsysv4)\n  symcode='[[DFNSTU]]'\n  ;;\nesac\n\n# If we're using GNU nm, then use its standard symbol codes.\ncase `$NM -V 2>&1` in\n*GNU* | *'with BFD'*)\n  symcode='[[ABCDGIRSTW]]' ;;\nesac\n\n# Transform an extracted symbol line into a proper C declaration.\n# Some systems (esp. on ia64) link data and code symbols differently,\n# so use this general approach.\nlt_cv_sys_global_symbol_to_cdecl=\"sed -n -e 's/^T .* \\(.*\\)$/extern int \\1();/p' -e 's/^$symcode* .* \\(.*\\)$/extern char \\1;/p'\"\n\n# Transform an extracted symbol line into symbol name and symbol address\nlt_cv_sys_global_symbol_to_c_name_address=\"sed -n -e 's/^: \\([[^ ]]*\\)[[ ]]*$/  {\\\\\\\"\\1\\\\\\\", (void *) 0},/p' -e 's/^$symcode* \\([[^ ]]*\\) \\([[^ ]]*\\)$/  {\\\"\\2\\\", (void *) \\&\\2},/p'\"\nlt_cv_sys_global_symbol_to_c_name_address_lib_prefix=\"sed -n -e 's/^: \\([[^ ]]*\\)[[ ]]*$/  {\\\\\\\"\\1\\\\\\\", (void *) 0},/p' -e 's/^$symcode* \\([[^ ]]*\\) \\(lib[[^ ]]*\\)$/  {\\\"\\2\\\", (void *) \\&\\2},/p' -e 's/^$symcode* \\([[^ ]]*\\) \\([[^ ]]*\\)$/  {\\\"lib\\2\\\", (void *) \\&\\2},/p'\"\n\n# Handle CRLF in mingw tool chain\nopt_cr=\ncase $build_os in\nmingw*)\n  opt_cr=`$ECHO 'x\\{0,1\\}' | tr x '\\015'` # option cr in regexp\n  ;;\nesac\n\n# Try without a prefix underscore, then with it.\nfor ac_symprfx in \"\" \"_\"; do\n\n  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.\n  symxfrm=\"\\\\1 $ac_symprfx\\\\2 \\\\2\"\n\n  # Write the raw and C identifiers.\n  if test \"$lt_cv_nm_interface\" = \"MS dumpbin\"; then\n    # Fake it for dumpbin and say T for any non-static function\n    # and D for any global variable.\n    # Also find C++ and __fastcall symbols from MSVC++,\n    # which start with @ or ?.\n    lt_cv_sys_global_symbol_pipe=\"$AWK ['\"\\\n\"     {last_section=section; section=\\$ 3};\"\\\n\"     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};\"\\\n\"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};\"\\\n\"     \\$ 0!~/External *\\|/{next};\"\\\n\"     / 0+ UNDEF /{next}; / UNDEF \\([^|]\\)*()/{next};\"\\\n\"     {if(hide[section]) next};\"\\\n\"     {f=0}; \\$ 0~/\\(\\).*\\|/{f=1}; {printf f ? \\\"T \\\" : \\\"D \\\"};\"\\\n\"     {split(\\$ 0, a, /\\||\\r/); split(a[2], s)};\"\\\n\"     s[1]~/^[@?]/{print s[1], s[1]; next};\"\\\n\"     s[1]~prfx {split(s[1],t,\\\"@\\\"); print t[1], substr(t[1],length(prfx))}\"\\\n\"     ' prfx=^$ac_symprfx]\"\n  else\n    lt_cv_sys_global_symbol_pipe=\"sed -n -e 's/^.*[[\t ]]\\($symcode$symcode*\\)[[\t ]][[\t ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'\"\n  fi\n  lt_cv_sys_global_symbol_pipe=\"$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'\"\n\n  # Check to see that the pipe works correctly.\n  pipe_works=no\n\n  rm -f conftest*\n  cat > conftest.$ac_ext <<_LT_EOF\n#ifdef __cplusplus\nextern \"C\" {\n#endif\nchar nm_test_var;\nvoid nm_test_func(void);\nvoid nm_test_func(void){}\n#ifdef __cplusplus\n}\n#endif\nint main(){nm_test_var='a';nm_test_func();return(0);}\n_LT_EOF\n\n  if AC_TRY_EVAL(ac_compile); then\n    # Now try to grab the symbols.\n    nlist=conftest.nm\n    if AC_TRY_EVAL(NM conftest.$ac_objext \\| \"$lt_cv_sys_global_symbol_pipe\" \\> $nlist) && test -s \"$nlist\"; then\n      # Try sorting and uniquifying the output.\n      if sort \"$nlist\" | uniq > \"$nlist\"T; then\n\tmv -f \"$nlist\"T \"$nlist\"\n      else\n\trm -f \"$nlist\"T\n      fi\n\n      # Make sure that we snagged all the symbols we need.\n      if $GREP ' nm_test_var$' \"$nlist\" >/dev/null; then\n\tif $GREP ' nm_test_func$' \"$nlist\" >/dev/null; then\n\t  cat <<_LT_EOF > conftest.$ac_ext\n/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */\n#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)\n/* DATA imports from DLLs on WIN32 con't be const, because runtime\n   relocations are performed -- see ld's documentation on pseudo-relocs.  */\n# define LT@&t@_DLSYM_CONST\n#elif defined(__osf__)\n/* This system does not cope well with relocations in const data.  */\n# define LT@&t@_DLSYM_CONST\n#else\n# define LT@&t@_DLSYM_CONST const\n#endif\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n_LT_EOF\n\t  # Now generate the symbol file.\n\t  eval \"$lt_cv_sys_global_symbol_to_cdecl\"' < \"$nlist\" | $GREP -v main >> conftest.$ac_ext'\n\n\t  cat <<_LT_EOF >> conftest.$ac_ext\n\n/* The mapping between symbol names and symbols.  */\nLT@&t@_DLSYM_CONST struct {\n  const char *name;\n  void       *address;\n}\nlt__PROGRAM__LTX_preloaded_symbols[[]] =\n{\n  { \"@PROGRAM@\", (void *) 0 },\n_LT_EOF\n\t  $SED \"s/^$symcode$symcode* \\(.*\\) \\(.*\\)$/  {\\\"\\2\\\", (void *) \\&\\2},/\" < \"$nlist\" | $GREP -v main >> conftest.$ac_ext\n\t  cat <<\\_LT_EOF >> conftest.$ac_ext\n  {0, (void *) 0}\n};\n\n/* This works around a problem in FreeBSD linker */\n#ifdef FREEBSD_WORKAROUND\nstatic const void *lt_preloaded_setup() {\n  return lt__PROGRAM__LTX_preloaded_symbols;\n}\n#endif\n\n#ifdef __cplusplus\n}\n#endif\n_LT_EOF\n\t  # Now try linking the two files.\n\t  mv conftest.$ac_objext conftstm.$ac_objext\n\t  lt_globsym_save_LIBS=$LIBS\n\t  lt_globsym_save_CFLAGS=$CFLAGS\n\t  LIBS=\"conftstm.$ac_objext\"\n\t  CFLAGS=\"$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)\"\n\t  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then\n\t    pipe_works=yes\n\t  fi\n\t  LIBS=$lt_globsym_save_LIBS\n\t  CFLAGS=$lt_globsym_save_CFLAGS\n\telse\n\t  echo \"cannot find nm_test_func in $nlist\" >&AS_MESSAGE_LOG_FD\n\tfi\n      else\n\techo \"cannot find nm_test_var in $nlist\" >&AS_MESSAGE_LOG_FD\n      fi\n    else\n      echo \"cannot run $lt_cv_sys_global_symbol_pipe\" >&AS_MESSAGE_LOG_FD\n    fi\n  else\n    echo \"$progname: failed program was:\" >&AS_MESSAGE_LOG_FD\n    cat conftest.$ac_ext >&5\n  fi\n  rm -rf conftest* conftst*\n\n  # Do not use the global_symbol_pipe unless it works.\n  if test \"$pipe_works\" = yes; then\n    break\n  else\n    lt_cv_sys_global_symbol_pipe=\n  fi\ndone\n])\nif test -z \"$lt_cv_sys_global_symbol_pipe\"; then\n  lt_cv_sys_global_symbol_to_cdecl=\nfi\nif test -z \"$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl\"; then\n  AC_MSG_RESULT(failed)\nelse\n  AC_MSG_RESULT(ok)\nfi\n\n# Response file support.\nif test \"$lt_cv_nm_interface\" = \"MS dumpbin\"; then\n  nm_file_list_spec='@'\nelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then\n  nm_file_list_spec='@'\nfi\n\n_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],\n    [Take the output of nm and produce a listing of raw symbols and C names])\n_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],\n    [Transform the output of nm in a proper C declaration])\n_LT_DECL([global_symbol_to_c_name_address],\n    [lt_cv_sys_global_symbol_to_c_name_address], [1],\n    [Transform the output of nm in a C name address pair])\n_LT_DECL([global_symbol_to_c_name_address_lib_prefix],\n    [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],\n    [Transform the output of nm in a C name address pair when lib prefix is needed])\n_LT_DECL([], [nm_file_list_spec], [1],\n    [Specify filename containing input files for $NM])\n]) # _LT_CMD_GLOBAL_SYMBOLS\n\n\n# _LT_COMPILER_PIC([TAGNAME])\n# ---------------------------\nm4_defun([_LT_COMPILER_PIC],\n[m4_require([_LT_TAG_COMPILER])dnl\n_LT_TAGVAR(lt_prog_compiler_wl, $1)=\n_LT_TAGVAR(lt_prog_compiler_pic, $1)=\n_LT_TAGVAR(lt_prog_compiler_static, $1)=\n\nm4_if([$1], [CXX], [\n  # C++ specific cases for pic, static, wl, etc.\n  if test \"$GXX\" = yes; then\n    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'\n    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'\n\n    case $host_os in\n    aix*)\n      # All AIX code is PIC.\n      if test \"$host_cpu\" = ia64; then\n\t# AIX 5 now supports IA64 processor\n\t_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'\n      fi\n      ;;\n\n    amigaos*)\n      case $host_cpu in\n      powerpc)\n            # see comment about AmigaOS4 .so support\n            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'\n        ;;\n      m68k)\n            # FIXME: we need at least 68020 code to build shared libraries, but\n            # adding the `-m68020' flag to GCC prevents building anything better,\n            # like `-m68040'.\n            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'\n        ;;\n      esac\n      ;;\n\n    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)\n      # PIC is the default for these OSes.\n      ;;\n    mingw* | cygwin* | os2* | pw32* | cegcc*)\n      # This hack is so that the source file can tell whether it is being\n      # built for inclusion in a dll (and should export symbols for example).\n      # Although the cygwin gcc ignores -fPIC, still need this for old-style\n      # (--disable-auto-import) libraries\n      m4_if([$1], [GCJ], [],\n\t[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])\n      ;;\n    darwin* | rhapsody*)\n      # PIC is the default on this platform\n      # Common symbols not allowed in MH_DYLIB files\n      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'\n      ;;\n    *djgpp*)\n      # DJGPP does not support shared libraries at all\n      _LT_TAGVAR(lt_prog_compiler_pic, $1)=\n      ;;\n    haiku*)\n      # PIC is the default for Haiku.\n      # The \"-static\" flag exists, but is broken.\n      _LT_TAGVAR(lt_prog_compiler_static, $1)=\n      ;;\n    interix[[3-9]]*)\n      # Interix 3.x gcc -fpic/-fPIC options generate broken code.\n      # Instead, we relocate shared libraries at runtime.\n      ;;\n    sysv4*MP*)\n      if test -d /usr/nec; then\n\t_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic\n      fi\n      ;;\n    hpux*)\n      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit\n      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag\n      # sets the default TLS model and affects inlining.\n      case $host_cpu in\n      hppa*64*)\n\t;;\n      *)\n\t_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'\n\t;;\n      esac\n      ;;\n    *qnx* | *nto*)\n      # QNX uses GNU C++, but need to define -shared option too, otherwise\n      # it will coredump.\n      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'\n      ;;\n    *)\n      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'\n      ;;\n    esac\n  else\n    case $host_os in\n      aix[[4-9]]*)\n\t# All AIX code is PIC.\n\tif test \"$host_cpu\" = ia64; then\n\t  # AIX 5 now supports IA64 processor\n\t  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'\n\telse\n\t  _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'\n\tfi\n\t;;\n      chorus*)\n\tcase $cc_basename in\n\tcxch68*)\n\t  # Green Hills C++ Compiler\n\t  # _LT_TAGVAR(lt_prog_compiler_static, $1)=\"--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a\"\n\t  ;;\n\tesac\n\t;;\n      mingw* | cygwin* | os2* | pw32* | cegcc*)\n\t# This hack is so that the source file can tell whether it is being\n\t# built for inclusion in a dll (and should export symbols for example).\n\tm4_if([$1], [GCJ], [],\n\t  [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])\n\t;;\n      dgux*)\n\tcase $cc_basename in\n\t  ec++*)\n\t    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'\n\t    ;;\n\t  ghcx*)\n\t    # Green Hills C++ Compiler\n\t    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'\n\t    ;;\n\t  *)\n\t    ;;\n\tesac\n\t;;\n      freebsd* | dragonfly*)\n\t# FreeBSD uses GNU C++\n\t;;\n      hpux9* | hpux10* | hpux11*)\n\tcase $cc_basename in\n\t  CC*)\n\t    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'\n\t    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'\n\t    if test \"$host_cpu\" != ia64; then\n\t      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'\n\t    fi\n\t    ;;\n\t  aCC*)\n\t    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'\n\t    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'\n\t    case $host_cpu in\n\t    hppa*64*|ia64*)\n\t      # +Z the default\n\t      ;;\n\t    *)\n\t      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'\n\t      ;;\n\t    esac\n\t    ;;\n\t  *)\n\t    ;;\n\tesac\n\t;;\n      interix*)\n\t# This is c89, which is MS Visual C++ (no shared libs)\n\t# Anyone wants to do a port?\n\t;;\n      irix5* | irix6* | nonstopux*)\n\tcase $cc_basename in\n\t  CC*)\n\t    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'\n\t    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'\n\t    # CC pic flag -KPIC is the default.\n\t    ;;\n\t  *)\n\t    ;;\n\tesac\n\t;;\n      linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)\n\tcase $cc_basename in\n\t  KCC*)\n\t    # KAI C++ Compiler\n\t    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'\n\t    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'\n\t    ;;\n\t  ecpc* )\n\t    # old Intel C++ for x86_64 which still supported -KPIC.\n\t    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'\n\t    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'\n\t    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'\n\t    ;;\n\t  icpc* )\n\t    # Intel C++, used to be incompatible with GCC.\n\t    # ICC 10 doesn't accept -KPIC any more.\n\t    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'\n\t    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'\n\t    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'\n\t    ;;\n\t  pgCC* | pgcpp*)\n\t    # Portland Group C++ compiler\n\t    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'\n\t    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'\n\t    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'\n\t    ;;\n\t  cxx*)\n\t    # Compaq C++\n\t    # Make sure the PIC flag is empty.  It appears that all Alpha\n\t    # Linux and Compaq Tru64 Unix objects are PIC.\n\t    _LT_TAGVAR(lt_prog_compiler_pic, $1)=\n\t    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'\n\t    ;;\n\t  xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)\n\t    # IBM XL 8.0, 9.0 on PPC and BlueGene\n\t    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'\n\t    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'\n\t    _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'\n\t    ;;\n\t  *)\n\t    case `$CC -V 2>&1 | sed 5q` in\n\t    *Sun\\ C*)\n\t      # Sun C++ 5.9\n\t      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'\n\t      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'\n\t      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '\n\t      ;;\n\t    esac\n\t    ;;\n\tesac\n\t;;\n      lynxos*)\n\t;;\n      m88k*)\n\t;;\n      mvs*)\n\tcase $cc_basename in\n\t  cxx*)\n\t    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'\n\t    ;;\n\t  *)\n\t    ;;\n\tesac\n\t;;\n      netbsd* | netbsdelf*-gnu)\n\t;;\n      *qnx* | *nto*)\n        # QNX uses GNU C++, but need to define -shared option too, otherwise\n        # it will coredump.\n        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'\n        ;;\n      osf3* | osf4* | osf5*)\n\tcase $cc_basename in\n\t  KCC*)\n\t    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'\n\t    ;;\n\t  RCC*)\n\t    # Rational C++ 2.4.1\n\t    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'\n\t    ;;\n\t  cxx*)\n\t    # Digital/Compaq C++\n\t    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'\n\t    # Make sure the PIC flag is empty.  It appears that all Alpha\n\t    # Linux and Compaq Tru64 Unix objects are PIC.\n\t    _LT_TAGVAR(lt_prog_compiler_pic, $1)=\n\t    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'\n\t    ;;\n\t  *)\n\t    ;;\n\tesac\n\t;;\n      psos*)\n\t;;\n      solaris*)\n\tcase $cc_basename in\n\t  CC* | sunCC*)\n\t    # Sun C++ 4.2, 5.x and Centerline C++\n\t    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'\n\t    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'\n\t    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '\n\t    ;;\n\t  gcx*)\n\t    # Green Hills C++ Compiler\n\t    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'\n\t    ;;\n\t  *)\n\t    ;;\n\tesac\n\t;;\n      sunos4*)\n\tcase $cc_basename in\n\t  CC*)\n\t    # Sun C++ 4.x\n\t    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'\n\t    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'\n\t    ;;\n\t  lcc*)\n\t    # Lucid\n\t    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'\n\t    ;;\n\t  *)\n\t    ;;\n\tesac\n\t;;\n      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)\n\tcase $cc_basename in\n\t  CC*)\n\t    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'\n\t    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'\n\t    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'\n\t    ;;\n\tesac\n\t;;\n      tandem*)\n\tcase $cc_basename in\n\t  NCC*)\n\t    # NonStop-UX NCC 3.20\n\t    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'\n\t    ;;\n\t  *)\n\t    ;;\n\tesac\n\t;;\n      vxworks*)\n\t;;\n      *)\n\t_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no\n\t;;\n    esac\n  fi\n],\n[\n  if test \"$GCC\" = yes; then\n    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'\n    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'\n\n    case $host_os in\n      aix*)\n      # All AIX code is PIC.\n      if test \"$host_cpu\" = ia64; then\n\t# AIX 5 now supports IA64 processor\n\t_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'\n      fi\n      ;;\n\n    amigaos*)\n      case $host_cpu in\n      powerpc)\n            # see comment about AmigaOS4 .so support\n            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'\n        ;;\n      m68k)\n            # FIXME: we need at least 68020 code to build shared libraries, but\n            # adding the `-m68020' flag to GCC prevents building anything better,\n            # like `-m68040'.\n            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'\n        ;;\n      esac\n      ;;\n\n    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)\n      # PIC is the default for these OSes.\n      ;;\n\n    mingw* | cygwin* | pw32* | os2* | cegcc*)\n      # This hack is so that the source file can tell whether it is being\n      # built for inclusion in a dll (and should export symbols for example).\n      # Although the cygwin gcc ignores -fPIC, still need this for old-style\n      # (--disable-auto-import) libraries\n      m4_if([$1], [GCJ], [],\n\t[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])\n      ;;\n\n    darwin* | rhapsody*)\n      # PIC is the default on this platform\n      # Common symbols not allowed in MH_DYLIB files\n      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'\n      ;;\n\n    haiku*)\n      # PIC is the default for Haiku.\n      # The \"-static\" flag exists, but is broken.\n      _LT_TAGVAR(lt_prog_compiler_static, $1)=\n      ;;\n\n    hpux*)\n      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit\n      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag\n      # sets the default TLS model and affects inlining.\n      case $host_cpu in\n      hppa*64*)\n\t# +Z the default\n\t;;\n      *)\n\t_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'\n\t;;\n      esac\n      ;;\n\n    interix[[3-9]]*)\n      # Interix 3.x gcc -fpic/-fPIC options generate broken code.\n      # Instead, we relocate shared libraries at runtime.\n      ;;\n\n    msdosdjgpp*)\n      # Just because we use GCC doesn't mean we suddenly get shared libraries\n      # on systems that don't support them.\n      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no\n      enable_shared=no\n      ;;\n\n    *nto* | *qnx*)\n      # QNX uses GNU C++, but need to define -shared option too, otherwise\n      # it will coredump.\n      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'\n      ;;\n\n    sysv4*MP*)\n      if test -d /usr/nec; then\n\t_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic\n      fi\n      ;;\n\n    *)\n      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'\n      ;;\n    esac\n\n    case $cc_basename in\n    nvcc*) # Cuda Compiler Driver 2.2\n      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '\n      if test -n \"$_LT_TAGVAR(lt_prog_compiler_pic, $1)\"; then\n        _LT_TAGVAR(lt_prog_compiler_pic, $1)=\"-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)\"\n      fi\n      ;;\n    esac\n  else\n    # PORTME Check for flag to pass linker flags through the system compiler.\n    case $host_os in\n    aix*)\n      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'\n      if test \"$host_cpu\" = ia64; then\n\t# AIX 5 now supports IA64 processor\n\t_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'\n      else\n\t_LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'\n      fi\n      ;;\n\n    mingw* | cygwin* | pw32* | os2* | cegcc*)\n      # This hack is so that the source file can tell whether it is being\n      # built for inclusion in a dll (and should export symbols for example).\n      m4_if([$1], [GCJ], [],\n\t[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])\n      ;;\n\n    hpux9* | hpux10* | hpux11*)\n      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'\n      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but\n      # not for PA HP-UX.\n      case $host_cpu in\n      hppa*64*|ia64*)\n\t# +Z the default\n\t;;\n      *)\n\t_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'\n\t;;\n      esac\n      # Is there a better lt_prog_compiler_static that works with the bundled CC?\n      _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'\n      ;;\n\n    irix5* | irix6* | nonstopux*)\n      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'\n      # PIC (with -KPIC) is the default.\n      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'\n      ;;\n\n    linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)\n      case $cc_basename in\n      # old Intel for x86_64 which still supported -KPIC.\n      ecc*)\n\t_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'\n\t_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'\n\t_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'\n        ;;\n      # icc used to be incompatible with GCC.\n      # ICC 10 doesn't accept -KPIC any more.\n      icc* | ifort*)\n\t_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'\n\t_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'\n\t_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'\n        ;;\n      # Lahey Fortran 8.1.\n      lf95*)\n\t_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'\n\t_LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'\n\t_LT_TAGVAR(lt_prog_compiler_static, $1)='--static'\n\t;;\n      nagfor*)\n\t# NAG Fortran compiler\n\t_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'\n\t_LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'\n\t_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'\n\t;;\n      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)\n        # Portland Group compilers (*not* the Pentium gcc compiler,\n\t# which looks to be a dead project)\n\t_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'\n\t_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'\n\t_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'\n        ;;\n      ccc*)\n        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'\n        # All Alpha code is PIC.\n        _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'\n        ;;\n      xl* | bgxl* | bgf* | mpixl*)\n\t# IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene\n\t_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'\n\t_LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'\n\t_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'\n\t;;\n      *)\n\tcase `$CC -V 2>&1 | sed 5q` in\n\t*Sun\\ Ceres\\ Fortran* | *Sun*Fortran*\\ [[1-7]].* | *Sun*Fortran*\\ 8.[[0-3]]*)\n\t  # Sun Fortran 8.3 passes all unrecognized flags to the linker\n\t  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'\n\t  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'\n\t  _LT_TAGVAR(lt_prog_compiler_wl, $1)=''\n\t  ;;\n\t*Sun\\ F* | *Sun*Fortran*)\n\t  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'\n\t  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'\n\t  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '\n\t  ;;\n\t*Sun\\ C*)\n\t  # Sun C 5.9\n\t  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'\n\t  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'\n\t  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'\n\t  ;;\n        *Intel*\\ [[CF]]*Compiler*)\n\t  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'\n\t  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'\n\t  _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'\n\t  ;;\n\t*Portland\\ Group*)\n\t  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'\n\t  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'\n\t  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'\n\t  ;;\n\tesac\n\t;;\n      esac\n      ;;\n\n    newsos6)\n      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'\n      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'\n      ;;\n\n    *nto* | *qnx*)\n      # QNX uses GNU C++, but need to define -shared option too, otherwise\n      # it will coredump.\n      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'\n      ;;\n\n    osf3* | osf4* | osf5*)\n      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'\n      # All OSF/1 code is PIC.\n      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'\n      ;;\n\n    rdos*)\n      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'\n      ;;\n\n    solaris*)\n      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'\n      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'\n      case $cc_basename in\n      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)\n\t_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;\n      *)\n\t_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;\n      esac\n      ;;\n\n    sunos4*)\n      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '\n      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'\n      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'\n      ;;\n\n    sysv4 | sysv4.2uw2* | sysv4.3*)\n      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'\n      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'\n      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'\n      ;;\n\n    sysv4*MP*)\n      if test -d /usr/nec ;then\n\t_LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'\n\t_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'\n      fi\n      ;;\n\n    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)\n      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'\n      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'\n      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'\n      ;;\n\n    unicos*)\n      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'\n      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no\n      ;;\n\n    uts4*)\n      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'\n      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'\n      ;;\n\n    *)\n      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no\n      ;;\n    esac\n  fi\n])\ncase $host_os in\n  # For platforms which do not support PIC, -DPIC is meaningless:\n  *djgpp*)\n    _LT_TAGVAR(lt_prog_compiler_pic, $1)=\n    ;;\n  *)\n    _LT_TAGVAR(lt_prog_compiler_pic, $1)=\"$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])\"\n    ;;\nesac\n\nAC_CACHE_CHECK([for $compiler option to produce PIC],\n  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],\n  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])\n_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)\n\n#\n# Check to make sure the PIC flag actually works.\n#\nif test -n \"$_LT_TAGVAR(lt_prog_compiler_pic, $1)\"; then\n  _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],\n    [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],\n    [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],\n    [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in\n     \"\" | \" \"*) ;;\n     *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=\" $_LT_TAGVAR(lt_prog_compiler_pic, $1)\" ;;\n     esac],\n    [_LT_TAGVAR(lt_prog_compiler_pic, $1)=\n     _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])\nfi\n_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],\n\t[Additional compiler flags for building library objects])\n\n_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],\n\t[How to pass a linker flag through the compiler])\n#\n# Check to make sure the static flag actually works.\n#\nwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\\\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\\\"\n_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],\n  _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),\n  $lt_tmp_static_flag,\n  [],\n  [_LT_TAGVAR(lt_prog_compiler_static, $1)=])\n_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],\n\t[Compiler flag to prevent dynamic linking])\n])# _LT_COMPILER_PIC\n\n\n# _LT_LINKER_SHLIBS([TAGNAME])\n# ----------------------------\n# See if the linker supports building shared libraries.\nm4_defun([_LT_LINKER_SHLIBS],\n[AC_REQUIRE([LT_PATH_LD])dnl\nAC_REQUIRE([LT_PATH_NM])dnl\nm4_require([_LT_PATH_MANIFEST_TOOL])dnl\nm4_require([_LT_FILEUTILS_DEFAULTS])dnl\nm4_require([_LT_DECL_EGREP])dnl\nm4_require([_LT_DECL_SED])dnl\nm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl\nm4_require([_LT_TAG_COMPILER])dnl\nAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])\nm4_if([$1], [CXX], [\n  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\\''s/.* //'\\'' | sort | uniq > $export_symbols'\n  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']\n  case $host_os in\n  aix[[4-9]]*)\n    # If we're using GNU nm, then we don't want the \"-C\" option.\n    # -C means demangle to AIX nm, but means don't demangle with GNU nm\n    # Also, AIX nm treats weak defined symbols like other global defined\n    # symbols, whereas GNU nm marks them as \"W\".\n    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then\n      _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\\''{ if (((\\$ 2 == \"T\") || (\\$ 2 == \"D\") || (\\$ 2 == \"B\") || (\\$ 2 == \"W\")) && ([substr](\\$ 3,1,1) != \".\")) { print \\$ 3 } }'\\'' | sort -u > $export_symbols'\n    else\n      _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\\''{ if (((\\$ 2 == \"T\") || (\\$ 2 == \"D\") || (\\$ 2 == \"B\")) && ([substr](\\$ 3,1,1) != \".\")) { print \\$ 3 } }'\\'' | sort -u > $export_symbols'\n    fi\n    ;;\n  pw32*)\n    _LT_TAGVAR(export_symbols_cmds, $1)=\"$ltdll_cmds\"\n    ;;\n  cygwin* | mingw* | cegcc*)\n    case $cc_basename in\n    cl*)\n      _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'\n      ;;\n    *)\n      _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\\([[^ ]]*\\)/\\1 DATA/;s/^.*[[ ]]__nm__\\([[^ ]]*\\)[[ ]][[^ ]]*/\\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\\'' | sort | uniq > $export_symbols'\n      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']\n      ;;\n    esac\n    ;;\n  linux* | k*bsd*-gnu | gnu*)\n    _LT_TAGVAR(link_all_deplibs, $1)=no\n    ;;\n  *)\n    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\\''s/.* //'\\'' | sort | uniq > $export_symbols'\n    ;;\n  esac\n], [\n  runpath_var=\n  _LT_TAGVAR(allow_undefined_flag, $1)=\n  _LT_TAGVAR(always_export_symbols, $1)=no\n  _LT_TAGVAR(archive_cmds, $1)=\n  _LT_TAGVAR(archive_expsym_cmds, $1)=\n  _LT_TAGVAR(compiler_needs_object, $1)=no\n  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no\n  _LT_TAGVAR(export_dynamic_flag_spec, $1)=\n  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\\''s/.* //'\\'' | sort | uniq > $export_symbols'\n  _LT_TAGVAR(hardcode_automatic, $1)=no\n  _LT_TAGVAR(hardcode_direct, $1)=no\n  _LT_TAGVAR(hardcode_direct_absolute, $1)=no\n  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=\n  _LT_TAGVAR(hardcode_libdir_separator, $1)=\n  _LT_TAGVAR(hardcode_minus_L, $1)=no\n  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported\n  _LT_TAGVAR(inherit_rpath, $1)=no\n  _LT_TAGVAR(link_all_deplibs, $1)=unknown\n  _LT_TAGVAR(module_cmds, $1)=\n  _LT_TAGVAR(module_expsym_cmds, $1)=\n  _LT_TAGVAR(old_archive_from_new_cmds, $1)=\n  _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=\n  _LT_TAGVAR(thread_safe_flag_spec, $1)=\n  _LT_TAGVAR(whole_archive_flag_spec, $1)=\n  # include_expsyms should be a list of space-separated symbols to be *always*\n  # included in the symbol list\n  _LT_TAGVAR(include_expsyms, $1)=\n  # exclude_expsyms can be an extended regexp of symbols to exclude\n  # it will be wrapped by ` (' and `)$', so one must not match beginning or\n  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',\n  # as well as any symbol that contains `d'.\n  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']\n  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out\n  # platforms (ab)use it in PIC code, but their linkers get confused if\n  # the symbol is explicitly referenced.  Since portable code cannot\n  # rely on this symbol name, it's probably fine to never include it in\n  # preloaded symbol tables.\n  # Exclude shared library initialization/finalization symbols.\ndnl Note also adjust exclude_expsyms for C++ above.\n  extract_expsyms_cmds=\n\n  case $host_os in\n  cygwin* | mingw* | pw32* | cegcc*)\n    # FIXME: the MSVC++ port hasn't been tested in a loooong time\n    # When not using gcc, we currently assume that we are using\n    # Microsoft Visual C++.\n    if test \"$GCC\" != yes; then\n      with_gnu_ld=no\n    fi\n    ;;\n  interix*)\n    # we just hope/assume this is gcc and not c89 (= MSVC++)\n    with_gnu_ld=yes\n    ;;\n  openbsd*)\n    with_gnu_ld=no\n    ;;\n  linux* | k*bsd*-gnu | gnu*)\n    _LT_TAGVAR(link_all_deplibs, $1)=no\n    ;;\n  esac\n\n  _LT_TAGVAR(ld_shlibs, $1)=yes\n\n  # On some targets, GNU ld is compatible enough with the native linker\n  # that we're better off using the native interface for both.\n  lt_use_gnu_ld_interface=no\n  if test \"$with_gnu_ld\" = yes; then\n    case $host_os in\n      aix*)\n\t# The AIX port of GNU ld has always aspired to compatibility\n\t# with the native linker.  However, as the warning in the GNU ld\n\t# block says, versions before 2.19.5* couldn't really create working\n\t# shared libraries, regardless of the interface used.\n\tcase `$LD -v 2>&1` in\n\t  *\\ \\(GNU\\ Binutils\\)\\ 2.19.5*) ;;\n\t  *\\ \\(GNU\\ Binutils\\)\\ 2.[[2-9]]*) ;;\n\t  *\\ \\(GNU\\ Binutils\\)\\ [[3-9]]*) ;;\n\t  *)\n\t    lt_use_gnu_ld_interface=yes\n\t    ;;\n\tesac\n\t;;\n      *)\n\tlt_use_gnu_ld_interface=yes\n\t;;\n    esac\n  fi\n\n  if test \"$lt_use_gnu_ld_interface\" = yes; then\n    # If archive_cmds runs LD, not CC, wlarc should be empty\n    wlarc='${wl}'\n\n    # Set some defaults for GNU ld with shared library support. These\n    # are reset later if shared libraries are not supported. Putting them\n    # here allows them to be overridden if necessary.\n    runpath_var=LD_RUN_PATH\n    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'\n    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'\n    # ancient GNU ld didn't support --whole-archive et. al.\n    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then\n      _LT_TAGVAR(whole_archive_flag_spec, $1)=\"$wlarc\"'--whole-archive$convenience '\"$wlarc\"'--no-whole-archive'\n    else\n      _LT_TAGVAR(whole_archive_flag_spec, $1)=\n    fi\n    supports_anon_versioning=no\n    case `$LD -v 2>&1` in\n      *GNU\\ gold*) supports_anon_versioning=yes ;;\n      *\\ [[01]].* | *\\ 2.[[0-9]].* | *\\ 2.10.*) ;; # catch versions < 2.11\n      *\\ 2.11.93.0.2\\ *) supports_anon_versioning=yes ;; # RH7.3 ...\n      *\\ 2.11.92.0.12\\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...\n      *\\ 2.11.*) ;; # other 2.11 versions\n      *) supports_anon_versioning=yes ;;\n    esac\n\n    # See if GNU ld supports shared libraries.\n    case $host_os in\n    aix[[3-9]]*)\n      # On AIX/PPC, the GNU linker is very broken\n      if test \"$host_cpu\" != ia64; then\n\t_LT_TAGVAR(ld_shlibs, $1)=no\n\tcat <<_LT_EOF 1>&2\n\n*** Warning: the GNU linker, at least up to release 2.19, is reported\n*** to be unable to reliably create shared libraries on AIX.\n*** Therefore, libtool is disabling shared libraries support.  If you\n*** really care for shared libraries, you may want to install binutils\n*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.\n*** You will then need to restart the configuration process.\n\n_LT_EOF\n      fi\n      ;;\n\n    amigaos*)\n      case $host_cpu in\n      powerpc)\n            # see comment about AmigaOS4 .so support\n            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'\n            _LT_TAGVAR(archive_expsym_cmds, $1)=''\n        ;;\n      m68k)\n            _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO \"#define NAME $libname\" > $output_objdir/a2ixlibrary.data~$ECHO \"#define LIBRARY_ID 1\" >> $output_objdir/a2ixlibrary.data~$ECHO \"#define VERSION $major\" >> $output_objdir/a2ixlibrary.data~$ECHO \"#define REVISION $revision\" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'\n            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'\n            _LT_TAGVAR(hardcode_minus_L, $1)=yes\n        ;;\n      esac\n      ;;\n\n    beos*)\n      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then\n\t_LT_TAGVAR(allow_undefined_flag, $1)=unsupported\n\t# Joseph Beckenbach <jrb3@best.com> says some releases of gcc\n\t# support --undefined.  This deserves some investigation.  FIXME\n\t_LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'\n      else\n\t_LT_TAGVAR(ld_shlibs, $1)=no\n      fi\n      ;;\n\n    cygwin* | mingw* | pw32* | cegcc*)\n      # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,\n      # as there is no search path for DLLs.\n      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'\n      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'\n      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported\n      _LT_TAGVAR(always_export_symbols, $1)=no\n      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes\n      _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\\([[^ ]]*\\)/\\1 DATA/;s/^.*[[ ]]__nm__\\([[^ ]]*\\)[[ ]][[^ ]]*/\\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\\'' | sort | uniq > $export_symbols'\n      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']\n\n      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then\n        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'\n\t# If the export-symbols file already is a .def file (1st line\n\t# is EXPORTS), use it as is; otherwise, prepend...\n\t_LT_TAGVAR(archive_expsym_cmds, $1)='if test \"x`$SED 1q $export_symbols`\" = xEXPORTS; then\n\t  cp $export_symbols $output_objdir/$soname.def;\n\telse\n\t  echo EXPORTS > $output_objdir/$soname.def;\n\t  cat $export_symbols >> $output_objdir/$soname.def;\n\tfi~\n\t$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'\n      else\n\t_LT_TAGVAR(ld_shlibs, $1)=no\n      fi\n      ;;\n\n    haiku*)\n      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'\n      _LT_TAGVAR(link_all_deplibs, $1)=yes\n      ;;\n\n    interix[[3-9]]*)\n      _LT_TAGVAR(hardcode_direct, $1)=no\n      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no\n      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'\n      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'\n      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.\n      # Instead, shared libraries are loaded at an image base (0x10000000 by\n      # default) and relocated if they conflict, which is a slow very memory\n      # consuming and fragmenting process.  To avoid this, we pick a random,\n      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link\n      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.\n      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \\* 262144 + 1342177280` -o $lib'\n      _LT_TAGVAR(archive_expsym_cmds, $1)='sed \"s,^,_,\" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \\* 262144 + 1342177280` -o $lib'\n      ;;\n\n    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)\n      tmp_diet=no\n      if test \"$host_os\" = linux-dietlibc; then\n\tcase $cc_basename in\n\t  diet\\ *) tmp_diet=yes;;\t# linux-dietlibc with static linking (!diet-dyn)\n\tesac\n      fi\n      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \\\n\t && test \"$tmp_diet\" = no\n      then\n\ttmp_addflag=' $pic_flag'\n\ttmp_sharedflag='-shared'\n\tcase $cc_basename,$host_cpu in\n        pgcc*)\t\t\t\t# Portland Group C compiler\n\t  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\\\"\\\"; do test  -n \\\"$conv\\\" && new_convenience=\\\"$new_convenience,$conv\\\"; done; func_echo_all \\\"$new_convenience\\\"` ${wl}--no-whole-archive'\n\t  tmp_addflag=' $pic_flag'\n\t  ;;\n\tpgf77* | pgf90* | pgf95* | pgfortran*)\n\t\t\t\t\t# Portland Group f77 and f90 compilers\n\t  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\\\"\\\"; do test  -n \\\"$conv\\\" && new_convenience=\\\"$new_convenience,$conv\\\"; done; func_echo_all \\\"$new_convenience\\\"` ${wl}--no-whole-archive'\n\t  tmp_addflag=' $pic_flag -Mnomain' ;;\n\tecc*,ia64* | icc*,ia64*)\t# Intel C compiler on ia64\n\t  tmp_addflag=' -i_dynamic' ;;\n\tefc*,ia64* | ifort*,ia64*)\t# Intel Fortran compiler on ia64\n\t  tmp_addflag=' -i_dynamic -nofor_main' ;;\n\tifc* | ifort*)\t\t\t# Intel Fortran compiler\n\t  tmp_addflag=' -nofor_main' ;;\n\tlf95*)\t\t\t\t# Lahey Fortran 8.1\n\t  _LT_TAGVAR(whole_archive_flag_spec, $1)=\n\t  tmp_sharedflag='--shared' ;;\n\txl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)\n\t  tmp_sharedflag='-qmkshrobj'\n\t  tmp_addflag= ;;\n\tnvcc*)\t# Cuda Compiler Driver 2.2\n\t  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\\\"\\\"; do test  -n \\\"$conv\\\" && new_convenience=\\\"$new_convenience,$conv\\\"; done; func_echo_all \\\"$new_convenience\\\"` ${wl}--no-whole-archive'\n\t  _LT_TAGVAR(compiler_needs_object, $1)=yes\n\t  ;;\n\tesac\n\tcase `$CC -V 2>&1 | sed 5q` in\n\t*Sun\\ C*)\t\t\t# Sun C 5.9\n\t  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\\\"\\\"; do test -z \\\"$conv\\\" || new_convenience=\\\"$new_convenience,$conv\\\"; done; func_echo_all \\\"$new_convenience\\\"` ${wl}--no-whole-archive'\n\t  _LT_TAGVAR(compiler_needs_object, $1)=yes\n\t  tmp_sharedflag='-G' ;;\n\t*Sun\\ F*)\t\t\t# Sun Fortran 8.3\n\t  tmp_sharedflag='-G' ;;\n\tesac\n\t_LT_TAGVAR(archive_cmds, $1)='$CC '\"$tmp_sharedflag\"\"$tmp_addflag\"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'\n\n        if test \"x$supports_anon_versioning\" = xyes; then\n          _LT_TAGVAR(archive_expsym_cmds, $1)='echo \"{ global:\" > $output_objdir/$libname.ver~\n\t    cat $export_symbols | sed -e \"s/\\(.*\\)/\\1;/\" >> $output_objdir/$libname.ver~\n\t    echo \"local: *; };\" >> $output_objdir/$libname.ver~\n\t    $CC '\"$tmp_sharedflag\"\"$tmp_addflag\"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'\n        fi\n\n\tcase $cc_basename in\n\txlf* | bgf* | bgxlf* | mpixlf*)\n\t  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself\n\t  _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'\n\t  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'\n\t  _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'\n\t  if test \"x$supports_anon_versioning\" = xyes; then\n\t    _LT_TAGVAR(archive_expsym_cmds, $1)='echo \"{ global:\" > $output_objdir/$libname.ver~\n\t      cat $export_symbols | sed -e \"s/\\(.*\\)/\\1;/\" >> $output_objdir/$libname.ver~\n\t      echo \"local: *; };\" >> $output_objdir/$libname.ver~\n\t      $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'\n\t  fi\n\t  ;;\n\tesac\n      else\n        _LT_TAGVAR(ld_shlibs, $1)=no\n      fi\n      ;;\n\n    netbsd* | netbsdelf*-gnu)\n      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then\n\t_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'\n\twlarc=\n      else\n\t_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'\n\t_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'\n      fi\n      ;;\n\n    solaris*)\n      if $LD -v 2>&1 | $GREP 'BFD 2\\.8' > /dev/null; then\n\t_LT_TAGVAR(ld_shlibs, $1)=no\n\tcat <<_LT_EOF 1>&2\n\n*** Warning: The releases 2.8.* of the GNU linker cannot reliably\n*** create shared libraries on Solaris systems.  Therefore, libtool\n*** is disabling shared libraries support.  We urge you to upgrade GNU\n*** binutils to release 2.9.1 or newer.  Another option is to modify\n*** your PATH or compiler configuration so that the native linker is\n*** used, and then restart.\n\n_LT_EOF\n      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then\n\t_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'\n\t_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'\n      else\n\t_LT_TAGVAR(ld_shlibs, $1)=no\n      fi\n      ;;\n\n    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)\n      case `$LD -v 2>&1` in\n        *\\ [[01]].* | *\\ 2.[[0-9]].* | *\\ 2.1[[0-5]].*)\n\t_LT_TAGVAR(ld_shlibs, $1)=no\n\tcat <<_LT_EOF 1>&2\n\n*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not\n*** reliably create shared libraries on SCO systems.  Therefore, libtool\n*** is disabling shared libraries support.  We urge you to upgrade GNU\n*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify\n*** your PATH or compiler configuration so that the native linker is\n*** used, and then restart.\n\n_LT_EOF\n\t;;\n\t*)\n\t  # For security reasons, it is highly recommended that you always\n\t  # use absolute paths for naming shared libraries, and exclude the\n\t  # DT_RUNPATH tag from executables and libraries.  But doing so\n\t  # requires that you compile everything twice, which is a pain.\n\t  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then\n\t    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'\n\t    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'\n\t    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'\n\t  else\n\t    _LT_TAGVAR(ld_shlibs, $1)=no\n\t  fi\n\t;;\n      esac\n      ;;\n\n    sunos4*)\n      _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'\n      wlarc=\n      _LT_TAGVAR(hardcode_direct, $1)=yes\n      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no\n      ;;\n\n    *)\n      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then\n\t_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'\n\t_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'\n      else\n\t_LT_TAGVAR(ld_shlibs, $1)=no\n      fi\n      ;;\n    esac\n\n    if test \"$_LT_TAGVAR(ld_shlibs, $1)\" = no; then\n      runpath_var=\n      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=\n      _LT_TAGVAR(export_dynamic_flag_spec, $1)=\n      _LT_TAGVAR(whole_archive_flag_spec, $1)=\n    fi\n  else\n    # PORTME fill in a description of your system's linker (not GNU ld)\n    case $host_os in\n    aix3*)\n      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported\n      _LT_TAGVAR(always_export_symbols, $1)=yes\n      _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'\n      # Note: this linker hardcodes the directories in LIBPATH if there\n      # are no directories specified by -L.\n      _LT_TAGVAR(hardcode_minus_L, $1)=yes\n      if test \"$GCC\" = yes && test -z \"$lt_prog_compiler_static\"; then\n\t# Neither direct hardcoding nor static linking is supported with a\n\t# broken collect2.\n\t_LT_TAGVAR(hardcode_direct, $1)=unsupported\n      fi\n      ;;\n\n    aix[[4-9]]*)\n      if test \"$host_cpu\" = ia64; then\n\t# On IA64, the linker does run time linking by default, so we don't\n\t# have to do anything special.\n\taix_use_runtimelinking=no\n\texp_sym_flag='-Bexport'\n\tno_entry_flag=\"\"\n      else\n\t# If we're using GNU nm, then we don't want the \"-C\" option.\n\t# -C means demangle to AIX nm, but means don't demangle with GNU nm\n\t# Also, AIX nm treats weak defined symbols like other global\n\t# defined symbols, whereas GNU nm marks them as \"W\".\n\tif $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then\n\t  _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\\''{ if (((\\$ 2 == \"T\") || (\\$ 2 == \"D\") || (\\$ 2 == \"B\") || (\\$ 2 == \"W\")) && ([substr](\\$ 3,1,1) != \".\")) { print \\$ 3 } }'\\'' | sort -u > $export_symbols'\n\telse\n\t  _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\\''{ if (((\\$ 2 == \"T\") || (\\$ 2 == \"D\") || (\\$ 2 == \"B\")) && ([substr](\\$ 3,1,1) != \".\")) { print \\$ 3 } }'\\'' | sort -u > $export_symbols'\n\tfi\n\taix_use_runtimelinking=no\n\n\t# Test if we are trying to use run time linking or normal\n\t# AIX style linking. If -brtl is somewhere in LDFLAGS, we\n\t# need to do runtime linking.\n\tcase $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)\n\t  for ld_flag in $LDFLAGS; do\n\t  if (test $ld_flag = \"-brtl\" || test $ld_flag = \"-Wl,-brtl\"); then\n\t    aix_use_runtimelinking=yes\n\t    break\n\t  fi\n\t  done\n\t  ;;\n\tesac\n\n\texp_sym_flag='-bexport'\n\tno_entry_flag='-bnoentry'\n      fi\n\n      # When large executables or shared objects are built, AIX ld can\n      # have problems creating the table of contents.  If linking a library\n      # or program results in \"error TOC overflow\" add -mminimal-toc to\n      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not\n      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.\n\n      _LT_TAGVAR(archive_cmds, $1)=''\n      _LT_TAGVAR(hardcode_direct, $1)=yes\n      _LT_TAGVAR(hardcode_direct_absolute, $1)=yes\n      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'\n      _LT_TAGVAR(link_all_deplibs, $1)=yes\n      _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'\n\n      if test \"$GCC\" = yes; then\n\tcase $host_os in aix4.[[012]]|aix4.[[012]].*)\n\t# We only want to do this on AIX 4.2 and lower, the check\n\t# below for broken collect2 doesn't work under 4.3+\n\t  collect2name=`${CC} -print-prog-name=collect2`\n\t  if test -f \"$collect2name\" &&\n\t   strings \"$collect2name\" | $GREP resolve_lib_name >/dev/null\n\t  then\n\t  # We have reworked collect2\n\t  :\n\t  else\n\t  # We have old collect2\n\t  _LT_TAGVAR(hardcode_direct, $1)=unsupported\n\t  # It fails to find uninstalled libraries when the uninstalled\n\t  # path is not listed in the libpath.  Setting hardcode_minus_L\n\t  # to unsupported forces relinking\n\t  _LT_TAGVAR(hardcode_minus_L, $1)=yes\n\t  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'\n\t  _LT_TAGVAR(hardcode_libdir_separator, $1)=\n\t  fi\n\t  ;;\n\tesac\n\tshared_flag='-shared'\n\tif test \"$aix_use_runtimelinking\" = yes; then\n\t  shared_flag=\"$shared_flag \"'${wl}-G'\n\tfi\n\t_LT_TAGVAR(link_all_deplibs, $1)=no\n      else\n\t# not using gcc\n\tif test \"$host_cpu\" = ia64; then\n\t# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release\n\t# chokes on -Wl,-G. The following line is correct:\n\t  shared_flag='-G'\n\telse\n\t  if test \"$aix_use_runtimelinking\" = yes; then\n\t    shared_flag='${wl}-G'\n\t  else\n\t    shared_flag='${wl}-bM:SRE'\n\t  fi\n\tfi\n      fi\n\n      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'\n      # It seems that -bexpall does not export symbols beginning with\n      # underscore (_), so it is better to generate a list of symbols to export.\n      _LT_TAGVAR(always_export_symbols, $1)=yes\n      if test \"$aix_use_runtimelinking\" = yes; then\n\t# Warning - without using the other runtime loading flags (-brtl),\n\t# -berok will link without error, but may produce a broken library.\n\t_LT_TAGVAR(allow_undefined_flag, $1)='-berok'\n        # Determine the default libpath from the value encoded in an\n        # empty executable.\n        _LT_SYS_MODULE_PATH_AIX([$1])\n        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'\"$aix_libpath\"\n        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '\"\\${wl}$no_entry_flag\"' $compiler_flags `if test \"x${allow_undefined_flag}\" != \"x\"; then func_echo_all \"${wl}${allow_undefined_flag}\"; else :; fi` '\"\\${wl}$exp_sym_flag:\\$export_symbols $shared_flag\"\n      else\n\tif test \"$host_cpu\" = ia64; then\n\t  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'\n\t  _LT_TAGVAR(allow_undefined_flag, $1)=\"-z nodefs\"\n\t  _LT_TAGVAR(archive_expsym_cmds, $1)=\"\\$CC $shared_flag\"' -o $output_objdir/$soname $libobjs $deplibs '\"\\${wl}$no_entry_flag\"' $compiler_flags ${wl}${allow_undefined_flag} '\"\\${wl}$exp_sym_flag:\\$export_symbols\"\n\telse\n\t # Determine the default libpath from the value encoded in an\n\t # empty executable.\n\t _LT_SYS_MODULE_PATH_AIX([$1])\n\t _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'\"$aix_libpath\"\n\t  # Warning - without using the other run time loading flags,\n\t  # -berok will link without error, but may produce a broken library.\n\t  _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'\n\t  _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'\n\t  if test \"$with_gnu_ld\" = yes; then\n\t    # We only use this code for GNU lds that support --whole-archive.\n\t    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'\n\t  else\n\t    # Exported symbols can be pulled into shared objects from archives\n\t    _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'\n\t  fi\n\t  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes\n\t  # This is similar to how AIX traditionally builds its shared libraries.\n\t  _LT_TAGVAR(archive_expsym_cmds, $1)=\"\\$CC $shared_flag\"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'\n\tfi\n      fi\n      ;;\n\n    amigaos*)\n      case $host_cpu in\n      powerpc)\n            # see comment about AmigaOS4 .so support\n            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'\n            _LT_TAGVAR(archive_expsym_cmds, $1)=''\n        ;;\n      m68k)\n            _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO \"#define NAME $libname\" > $output_objdir/a2ixlibrary.data~$ECHO \"#define LIBRARY_ID 1\" >> $output_objdir/a2ixlibrary.data~$ECHO \"#define VERSION $major\" >> $output_objdir/a2ixlibrary.data~$ECHO \"#define REVISION $revision\" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'\n            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'\n            _LT_TAGVAR(hardcode_minus_L, $1)=yes\n        ;;\n      esac\n      ;;\n\n    bsdi[[45]]*)\n      _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic\n      ;;\n\n    cygwin* | mingw* | pw32* | cegcc*)\n      # When not using gcc, we currently assume that we are using\n      # Microsoft Visual C++.\n      # hardcode_libdir_flag_spec is actually meaningless, as there is\n      # no search path for DLLs.\n      case $cc_basename in\n      cl*)\n\t# Native MSVC\n\t_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '\n\t_LT_TAGVAR(allow_undefined_flag, $1)=unsupported\n\t_LT_TAGVAR(always_export_symbols, $1)=yes\n\t_LT_TAGVAR(file_list_spec, $1)='@'\n\t# Tell ltmain to make .lib files, not .a files.\n\tlibext=lib\n\t# Tell ltmain to make .dll files, not .so files.\n\tshrext_cmds=\".dll\"\n\t# FIXME: Setting linknames here is a bad hack.\n\t_LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='\n\t_LT_TAGVAR(archive_expsym_cmds, $1)='if test \"x`$SED 1q $export_symbols`\" = xEXPORTS; then\n\t    sed -n -e 's/\\\\\\\\\\\\\\(.*\\\\\\\\\\\\\\)/-link\\\\\\ -EXPORT:\\\\\\\\\\\\\\1/' -e '1\\\\\\!p' < $export_symbols > $output_objdir/$soname.exp;\n\t  else\n\t    sed -e 's/\\\\\\\\\\\\\\(.*\\\\\\\\\\\\\\)/-link\\\\\\ -EXPORT:\\\\\\\\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;\n\t  fi~\n\t  $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs \"@$tool_output_objdir$soname.exp\" -Wl,-DLL,-IMPLIB:\"$tool_output_objdir$libname.dll.lib\"~\n\t  linknames='\n\t# The linker will not automatically build a static lib if we build a DLL.\n\t# _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'\n\t_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes\n\t_LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'\n\t_LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\\([[^ ]]*\\)/\\1,DATA/'\\'' | $SED -e '\\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\\'' | sort | uniq > $export_symbols'\n\t# Don't use ranlib\n\t_LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'\n\t_LT_TAGVAR(postlink_cmds, $1)='lt_outputfile=\"@OUTPUT@\"~\n\t  lt_tool_outputfile=\"@TOOL_OUTPUT@\"~\n\t  case $lt_outputfile in\n\t    *.exe|*.EXE) ;;\n\t    *)\n\t      lt_outputfile=\"$lt_outputfile.exe\"\n\t      lt_tool_outputfile=\"$lt_tool_outputfile.exe\"\n\t      ;;\n\t  esac~\n\t  if test \"$MANIFEST_TOOL\" != \":\" && test -f \"$lt_outputfile.manifest\"; then\n\t    $MANIFEST_TOOL -manifest \"$lt_tool_outputfile.manifest\" -outputresource:\"$lt_tool_outputfile\" || exit 1;\n\t    $RM \"$lt_outputfile.manifest\";\n\t  fi'\n\t;;\n      *)\n\t# Assume MSVC wrapper\n\t_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '\n\t_LT_TAGVAR(allow_undefined_flag, $1)=unsupported\n\t# Tell ltmain to make .lib files, not .a files.\n\tlibext=lib\n\t# Tell ltmain to make .dll files, not .so files.\n\tshrext_cmds=\".dll\"\n\t# FIXME: Setting linknames here is a bad hack.\n\t_LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all \"$deplibs\" | $SED '\\''s/ -lc$//'\\''` -link -dll~linknames='\n\t# The linker will automatically build a .lib file if we build a DLL.\n\t_LT_TAGVAR(old_archive_from_new_cmds, $1)='true'\n\t# FIXME: Should let the user specify the lib program.\n\t_LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'\n\t_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes\n\t;;\n      esac\n      ;;\n\n    darwin* | rhapsody*)\n      _LT_DARWIN_LINKER_FEATURES($1)\n      ;;\n\n    dgux*)\n      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'\n      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'\n      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no\n      ;;\n\n    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor\n    # support.  Future versions do this automatically, but an explicit c++rt0.o\n    # does not break anything, and helps significantly (at the cost of a little\n    # extra space).\n    freebsd2.2*)\n      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'\n      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'\n      _LT_TAGVAR(hardcode_direct, $1)=yes\n      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no\n      ;;\n\n    # Unfortunately, older versions of FreeBSD 2 do not have this feature.\n    freebsd2.*)\n      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'\n      _LT_TAGVAR(hardcode_direct, $1)=yes\n      _LT_TAGVAR(hardcode_minus_L, $1)=yes\n      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no\n      ;;\n\n    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.\n    freebsd* | dragonfly*)\n      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'\n      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'\n      _LT_TAGVAR(hardcode_direct, $1)=yes\n      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no\n      ;;\n\n    hpux9*)\n      if test \"$GCC\" = yes; then\n\t_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'\n      else\n\t_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'\n      fi\n      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'\n      _LT_TAGVAR(hardcode_libdir_separator, $1)=:\n      _LT_TAGVAR(hardcode_direct, $1)=yes\n\n      # hardcode_minus_L: Not really in the search PATH,\n      # but as the default location of the library.\n      _LT_TAGVAR(hardcode_minus_L, $1)=yes\n      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'\n      ;;\n\n    hpux10*)\n      if test \"$GCC\" = yes && test \"$with_gnu_ld\" = no; then\n\t_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'\n      else\n\t_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'\n      fi\n      if test \"$with_gnu_ld\" = no; then\n\t_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'\n\t_LT_TAGVAR(hardcode_libdir_separator, $1)=:\n\t_LT_TAGVAR(hardcode_direct, $1)=yes\n\t_LT_TAGVAR(hardcode_direct_absolute, $1)=yes\n\t_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'\n\t# hardcode_minus_L: Not really in the search PATH,\n\t# but as the default location of the library.\n\t_LT_TAGVAR(hardcode_minus_L, $1)=yes\n      fi\n      ;;\n\n    hpux11*)\n      if test \"$GCC\" = yes && test \"$with_gnu_ld\" = no; then\n\tcase $host_cpu in\n\thppa*64*)\n\t  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'\n\t  ;;\n\tia64*)\n\t  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'\n\t  ;;\n\t*)\n\t  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'\n\t  ;;\n\tesac\n      else\n\tcase $host_cpu in\n\thppa*64*)\n\t  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'\n\t  ;;\n\tia64*)\n\t  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'\n\t  ;;\n\t*)\n\tm4_if($1, [], [\n\t  # Older versions of the 11.00 compiler do not understand -b yet\n\t  # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)\n\t  _LT_LINKER_OPTION([if $CC understands -b],\n\t    _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],\n\t    [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],\n\t    [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],\n\t  [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])\n\t  ;;\n\tesac\n      fi\n      if test \"$with_gnu_ld\" = no; then\n\t_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'\n\t_LT_TAGVAR(hardcode_libdir_separator, $1)=:\n\n\tcase $host_cpu in\n\thppa*64*|ia64*)\n\t  _LT_TAGVAR(hardcode_direct, $1)=no\n\t  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no\n\t  ;;\n\t*)\n\t  _LT_TAGVAR(hardcode_direct, $1)=yes\n\t  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes\n\t  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'\n\n\t  # hardcode_minus_L: Not really in the search PATH,\n\t  # but as the default location of the library.\n\t  _LT_TAGVAR(hardcode_minus_L, $1)=yes\n\t  ;;\n\tesac\n      fi\n      ;;\n\n    irix5* | irix6* | nonstopux*)\n      if test \"$GCC\" = yes; then\n\t_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n \"$verstring\" && func_echo_all \"${wl}-set_version ${wl}$verstring\"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'\n\t# Try to use the -exported_symbol ld option, if it does not\n\t# work, assume that -exports_file does not work either and\n\t# implicitly export all symbols.\n\t# This should be the same for all languages, so no per-tag cache variable.\n\tAC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],\n\t  [lt_cv_irix_exported_symbol],\n\t  [save_LDFLAGS=\"$LDFLAGS\"\n\t   LDFLAGS=\"$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null\"\n\t   AC_LINK_IFELSE(\n\t     [AC_LANG_SOURCE(\n\t        [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],\n\t\t\t      [C++], [[int foo (void) { return 0; }]],\n\t\t\t      [Fortran 77], [[\n      subroutine foo\n      end]],\n\t\t\t      [Fortran], [[\n      subroutine foo\n      end]])])],\n\t      [lt_cv_irix_exported_symbol=yes],\n\t      [lt_cv_irix_exported_symbol=no])\n           LDFLAGS=\"$save_LDFLAGS\"])\n\tif test \"$lt_cv_irix_exported_symbol\" = yes; then\n          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n \"$verstring\" && func_echo_all \"${wl}-set_version ${wl}$verstring\"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'\n\tfi\n      else\n\t_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n \"$verstring\" && func_echo_all \"-set_version $verstring\"` -update_registry ${output_objdir}/so_locations -o $lib'\n\t_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n \"$verstring\" && func_echo_all \"-set_version $verstring\"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'\n      fi\n      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'\n      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'\n      _LT_TAGVAR(hardcode_libdir_separator, $1)=:\n      _LT_TAGVAR(inherit_rpath, $1)=yes\n      _LT_TAGVAR(link_all_deplibs, $1)=yes\n      ;;\n\n    netbsd* | netbsdelf*-gnu)\n      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then\n\t_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out\n      else\n\t_LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF\n      fi\n      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'\n      _LT_TAGVAR(hardcode_direct, $1)=yes\n      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no\n      ;;\n\n    newsos6)\n      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'\n      _LT_TAGVAR(hardcode_direct, $1)=yes\n      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'\n      _LT_TAGVAR(hardcode_libdir_separator, $1)=:\n      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no\n      ;;\n\n    *nto* | *qnx*)\n      ;;\n\n    openbsd*)\n      if test -f /usr/libexec/ld.so; then\n\t_LT_TAGVAR(hardcode_direct, $1)=yes\n\t_LT_TAGVAR(hardcode_shlibpath_var, $1)=no\n\t_LT_TAGVAR(hardcode_direct_absolute, $1)=yes\n\tif test -z \"`echo __ELF__ | $CC -E - | $GREP __ELF__`\" || test \"$host_os-$host_cpu\" = \"openbsd2.8-powerpc\"; then\n\t  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'\n\t  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'\n\t  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'\n\t  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'\n\telse\n\t  case $host_os in\n\t   openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)\n\t     _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'\n\t     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'\n\t     ;;\n\t   *)\n\t     _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'\n\t     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'\n\t     ;;\n\t  esac\n\tfi\n      else\n\t_LT_TAGVAR(ld_shlibs, $1)=no\n      fi\n      ;;\n\n    os2*)\n      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'\n      _LT_TAGVAR(hardcode_minus_L, $1)=yes\n      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported\n      _LT_TAGVAR(archive_cmds, $1)='$ECHO \"LIBRARY $libname INITINSTANCE\" > $output_objdir/$libname.def~$ECHO \"DESCRIPTION \\\"$libname\\\"\" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo \" SINGLE NONSHARED\" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'\n      _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'\n      ;;\n\n    osf3*)\n      if test \"$GCC\" = yes; then\n\t_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\\*'\n\t_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n \"$verstring\" && func_echo_all \"${wl}-set_version ${wl}$verstring\"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'\n      else\n\t_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \\*'\n\t_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n \"$verstring\" && func_echo_all \"-set_version $verstring\"` -update_registry ${output_objdir}/so_locations -o $lib'\n      fi\n      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'\n      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'\n      _LT_TAGVAR(hardcode_libdir_separator, $1)=:\n      ;;\n\n    osf4* | osf5*)\t# as osf3* with the addition of -msym flag\n      if test \"$GCC\" = yes; then\n\t_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\\*'\n\t_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n \"$verstring\" && func_echo_all \"${wl}-set_version ${wl}$verstring\"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'\n\t_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'\n      else\n\t_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \\*'\n\t_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n \"$verstring\" && func_echo_all \"-set_version $verstring\"` -update_registry ${output_objdir}/so_locations -o $lib'\n\t_LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf \"%s %s\\\\n\" -exported_symbol \"\\$i\" >> $lib.exp; done; printf \"%s\\\\n\" \"-hidden\">> $lib.exp~\n\t$CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n \"$verstring\" && $ECHO \"-set_version $verstring\"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'\n\n\t# Both c and cxx compiler support -rpath directly\n\t_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'\n      fi\n      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'\n      _LT_TAGVAR(hardcode_libdir_separator, $1)=:\n      ;;\n\n    solaris*)\n      _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'\n      if test \"$GCC\" = yes; then\n\twlarc='${wl}'\n\t_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'\n\t_LT_TAGVAR(archive_expsym_cmds, $1)='echo \"{ global:\" > $lib.exp~cat $export_symbols | $SED -e \"s/\\(.*\\)/\\1;/\" >> $lib.exp~echo \"local: *; };\" >> $lib.exp~\n\t  $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'\n      else\n\tcase `$CC -V 2>&1` in\n\t*\"Compilers 5.0\"*)\n\t  wlarc=''\n\t  _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'\n\t  _LT_TAGVAR(archive_expsym_cmds, $1)='echo \"{ global:\" > $lib.exp~cat $export_symbols | $SED -e \"s/\\(.*\\)/\\1;/\" >> $lib.exp~echo \"local: *; };\" >> $lib.exp~\n\t  $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'\n\t  ;;\n\t*)\n\t  wlarc='${wl}'\n\t  _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'\n\t  _LT_TAGVAR(archive_expsym_cmds, $1)='echo \"{ global:\" > $lib.exp~cat $export_symbols | $SED -e \"s/\\(.*\\)/\\1;/\" >> $lib.exp~echo \"local: *; };\" >> $lib.exp~\n\t  $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'\n\t  ;;\n\tesac\n      fi\n      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'\n      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no\n      case $host_os in\n      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;\n      *)\n\t# The compiler driver will combine and reorder linker options,\n\t# but understands `-z linker_flag'.  GCC discards it without `$wl',\n\t# but is careful enough not to reorder.\n\t# Supported since Solaris 2.6 (maybe 2.5.1?)\n\tif test \"$GCC\" = yes; then\n\t  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'\n\telse\n\t  _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'\n\tfi\n\t;;\n      esac\n      _LT_TAGVAR(link_all_deplibs, $1)=yes\n      ;;\n\n    sunos4*)\n      if test \"x$host_vendor\" = xsequent; then\n\t# Use $CC to link under sequent, because it throws in some extra .o\n\t# files that make .init and .fini sections work.\n\t_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'\n      else\n\t_LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'\n      fi\n      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'\n      _LT_TAGVAR(hardcode_direct, $1)=yes\n      _LT_TAGVAR(hardcode_minus_L, $1)=yes\n      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no\n      ;;\n\n    sysv4)\n      case $host_vendor in\n\tsni)\n\t  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'\n\t  _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???\n\t;;\n\tsiemens)\n\t  ## LD is ld it makes a PLAMLIB\n\t  ## CC just makes a GrossModule.\n\t  _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'\n\t  _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'\n\t  _LT_TAGVAR(hardcode_direct, $1)=no\n        ;;\n\tmotorola)\n\t  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'\n\t  _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie\n\t;;\n      esac\n      runpath_var='LD_RUN_PATH'\n      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no\n      ;;\n\n    sysv4.3*)\n      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'\n      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no\n      _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'\n      ;;\n\n    sysv4*MP*)\n      if test -d /usr/nec; then\n\t_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'\n\t_LT_TAGVAR(hardcode_shlibpath_var, $1)=no\n\trunpath_var=LD_RUN_PATH\n\thardcode_runpath_var=yes\n\t_LT_TAGVAR(ld_shlibs, $1)=yes\n      fi\n      ;;\n\n    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)\n      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'\n      _LT_TAGVAR(archive_cmds_need_lc, $1)=no\n      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no\n      runpath_var='LD_RUN_PATH'\n\n      if test \"$GCC\" = yes; then\n\t_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'\n\t_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'\n      else\n\t_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'\n\t_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'\n      fi\n      ;;\n\n    sysv5* | sco3.2v5* | sco5v6*)\n      # Note: We can NOT use -z defs as we might desire, because we do not\n      # link with -lc, and that would cause any symbols used from libc to\n      # always be unresolved, which means just about no library would\n      # ever link correctly.  If we're not using GNU ld we use -z text\n      # though, which does catch some bad symbols but isn't as heavy-handed\n      # as -z defs.\n      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'\n      _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'\n      _LT_TAGVAR(archive_cmds_need_lc, $1)=no\n      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no\n      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'\n      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'\n      _LT_TAGVAR(link_all_deplibs, $1)=yes\n      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'\n      runpath_var='LD_RUN_PATH'\n\n      if test \"$GCC\" = yes; then\n\t_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'\n\t_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'\n      else\n\t_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'\n\t_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'\n      fi\n      ;;\n\n    uts4*)\n      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'\n      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'\n      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no\n      ;;\n\n    *)\n      _LT_TAGVAR(ld_shlibs, $1)=no\n      ;;\n    esac\n\n    if test x$host_vendor = xsni; then\n      case $host in\n      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)\n\t_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'\n\t;;\n      esac\n    fi\n  fi\n])\nAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])\ntest \"$_LT_TAGVAR(ld_shlibs, $1)\" = no && can_build_shared=no\n\n_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld\n\n_LT_DECL([], [libext], [0], [Old archive suffix (normally \"a\")])dnl\n_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally \".so\")])dnl\n_LT_DECL([], [extract_expsyms_cmds], [2],\n    [The commands to extract the exported symbol list from a shared archive])\n\n#\n# Do we need to explicitly link libc?\n#\ncase \"x$_LT_TAGVAR(archive_cmds_need_lc, $1)\" in\nx|xyes)\n  # Assume -lc should be added\n  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes\n\n  if test \"$enable_shared\" = yes && test \"$GCC\" = yes; then\n    case $_LT_TAGVAR(archive_cmds, $1) in\n    *'~'*)\n      # FIXME: we may have to deal with multi-command sequences.\n      ;;\n    '$CC '*)\n      # Test whether the compiler implicitly links with -lc since on some\n      # systems, -lgcc has to come before -lc. If gcc already passes -lc\n      # to ld, don't add -lc before -lgcc.\n      AC_CACHE_CHECK([whether -lc should be explicitly linked in],\n\t[lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),\n\t[$RM conftest*\n\techo \"$lt_simple_compile_test_code\" > conftest.$ac_ext\n\n\tif AC_TRY_EVAL(ac_compile) 2>conftest.err; then\n\t  soname=conftest\n\t  lib=conftest\n\t  libobjs=conftest.$ac_objext\n\t  deplibs=\n\t  wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)\n\t  pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)\n\t  compiler_flags=-v\n\t  linker_flags=-v\n\t  verstring=\n\t  output_objdir=.\n\t  libname=conftest\n\t  lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)\n\t  _LT_TAGVAR(allow_undefined_flag, $1)=\n\t  if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\\>\\&1 \\| $GREP \\\" -lc \\\" \\>/dev/null 2\\>\\&1)\n\t  then\n\t    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no\n\t  else\n\t    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes\n\t  fi\n\t  _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag\n\telse\n\t  cat conftest.err 1>&5\n\tfi\n\t$RM conftest*\n\t])\n      _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)\n      ;;\n    esac\n  fi\n  ;;\nesac\n\n_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],\n    [Whether or not to add -lc for building shared libraries])\n_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],\n    [enable_shared_with_static_runtimes], [0],\n    [Whether or not to disallow shared libs when runtime libs are static])\n_LT_TAGDECL([], [export_dynamic_flag_spec], [1],\n    [Compiler flag to allow reflexive dlopens])\n_LT_TAGDECL([], [whole_archive_flag_spec], [1],\n    [Compiler flag to generate shared objects directly from archives])\n_LT_TAGDECL([], [compiler_needs_object], [1],\n    [Whether the compiler copes with passing no objects directly])\n_LT_TAGDECL([], [old_archive_from_new_cmds], [2],\n    [Create an old-style archive from a shared archive])\n_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],\n    [Create a temporary old-style archive to link instead of a shared archive])\n_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])\n_LT_TAGDECL([], [archive_expsym_cmds], [2])\n_LT_TAGDECL([], [module_cmds], [2],\n    [Commands used to build a loadable module if different from building\n    a shared archive.])\n_LT_TAGDECL([], [module_expsym_cmds], [2])\n_LT_TAGDECL([], [with_gnu_ld], [1],\n    [Whether we are building with GNU ld or not])\n_LT_TAGDECL([], [allow_undefined_flag], [1],\n    [Flag that allows shared libraries with undefined symbols to be built])\n_LT_TAGDECL([], [no_undefined_flag], [1],\n    [Flag that enforces no undefined symbols])\n_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],\n    [Flag to hardcode $libdir into a binary during linking.\n    This must work even if $libdir does not exist])\n_LT_TAGDECL([], [hardcode_libdir_separator], [1],\n    [Whether we need a single \"-rpath\" flag with a separated argument])\n_LT_TAGDECL([], [hardcode_direct], [0],\n    [Set to \"yes\" if using DIR/libNAME${shared_ext} during linking hardcodes\n    DIR into the resulting binary])\n_LT_TAGDECL([], [hardcode_direct_absolute], [0],\n    [Set to \"yes\" if using DIR/libNAME${shared_ext} during linking hardcodes\n    DIR into the resulting binary and the resulting library dependency is\n    \"absolute\", i.e impossible to change by setting ${shlibpath_var} if the\n    library is relocated])\n_LT_TAGDECL([], [hardcode_minus_L], [0],\n    [Set to \"yes\" if using the -LDIR flag during linking hardcodes DIR\n    into the resulting binary])\n_LT_TAGDECL([], [hardcode_shlibpath_var], [0],\n    [Set to \"yes\" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR\n    into the resulting binary])\n_LT_TAGDECL([], [hardcode_automatic], [0],\n    [Set to \"yes\" if building a shared library automatically hardcodes DIR\n    into the library and all subsequent libraries and executables linked\n    against it])\n_LT_TAGDECL([], [inherit_rpath], [0],\n    [Set to yes if linker adds runtime paths of dependent libraries\n    to runtime path list])\n_LT_TAGDECL([], [link_all_deplibs], [0],\n    [Whether libtool must link a program against all its dependency libraries])\n_LT_TAGDECL([], [always_export_symbols], [0],\n    [Set to \"yes\" if exported symbols are required])\n_LT_TAGDECL([], [export_symbols_cmds], [2],\n    [The commands to list exported symbols])\n_LT_TAGDECL([], [exclude_expsyms], [1],\n    [Symbols that should not be listed in the preloaded symbols])\n_LT_TAGDECL([], [include_expsyms], [1],\n    [Symbols that must always be exported])\n_LT_TAGDECL([], [prelink_cmds], [2],\n    [Commands necessary for linking programs (against libraries) with templates])\n_LT_TAGDECL([], [postlink_cmds], [2],\n    [Commands necessary for finishing linking programs])\n_LT_TAGDECL([], [file_list_spec], [1],\n    [Specify filename containing input files])\ndnl FIXME: Not yet implemented\ndnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],\ndnl    [Compiler flag to generate thread safe objects])\n])# _LT_LINKER_SHLIBS\n\n\n# _LT_LANG_C_CONFIG([TAG])\n# ------------------------\n# Ensure that the configuration variables for a C compiler are suitably\n# defined.  These variables are subsequently used by _LT_CONFIG to write\n# the compiler configuration to `libtool'.\nm4_defun([_LT_LANG_C_CONFIG],\n[m4_require([_LT_DECL_EGREP])dnl\nlt_save_CC=\"$CC\"\nAC_LANG_PUSH(C)\n\n# Source file extension for C test sources.\nac_ext=c\n\n# Object file extension for compiled C test sources.\nobjext=o\n_LT_TAGVAR(objext, $1)=$objext\n\n# Code to be used in simple compile tests\nlt_simple_compile_test_code=\"int some_variable = 0;\"\n\n# Code to be used in simple link tests\nlt_simple_link_test_code='int main(){return(0);}'\n\n_LT_TAG_COMPILER\n# Save the default compiler, since it gets overwritten when the other\n# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.\ncompiler_DEFAULT=$CC\n\n# save warnings/boilerplate of simple test code\n_LT_COMPILER_BOILERPLATE\n_LT_LINKER_BOILERPLATE\n\nif test -n \"$compiler\"; then\n  _LT_COMPILER_NO_RTTI($1)\n  _LT_COMPILER_PIC($1)\n  _LT_COMPILER_C_O($1)\n  _LT_COMPILER_FILE_LOCKS($1)\n  _LT_LINKER_SHLIBS($1)\n  _LT_SYS_DYNAMIC_LINKER($1)\n  _LT_LINKER_HARDCODE_LIBPATH($1)\n  LT_SYS_DLOPEN_SELF\n  _LT_CMD_STRIPLIB\n\n  # Report which library types will actually be built\n  AC_MSG_CHECKING([if libtool supports shared libraries])\n  AC_MSG_RESULT([$can_build_shared])\n\n  AC_MSG_CHECKING([whether to build shared libraries])\n  test \"$can_build_shared\" = \"no\" && enable_shared=no\n\n  # On AIX, shared libraries and static libraries use the same namespace, and\n  # are all built from PIC.\n  case $host_os in\n  aix3*)\n    test \"$enable_shared\" = yes && enable_static=no\n    if test -n \"$RANLIB\"; then\n      archive_cmds=\"$archive_cmds~\\$RANLIB \\$lib\"\n      postinstall_cmds='$RANLIB $lib'\n    fi\n    ;;\n\n  aix[[4-9]]*)\n    if test \"$host_cpu\" != ia64 && test \"$aix_use_runtimelinking\" = no ; then\n      test \"$enable_shared\" = yes && enable_static=no\n    fi\n    ;;\n  esac\n  AC_MSG_RESULT([$enable_shared])\n\n  AC_MSG_CHECKING([whether to build static libraries])\n  # Make sure either enable_shared or enable_static is yes.\n  test \"$enable_shared\" = yes || enable_static=yes\n  AC_MSG_RESULT([$enable_static])\n\n  _LT_CONFIG($1)\nfi\nAC_LANG_POP\nCC=\"$lt_save_CC\"\n])# _LT_LANG_C_CONFIG\n\n\n# _LT_LANG_CXX_CONFIG([TAG])\n# --------------------------\n# Ensure that the configuration variables for a C++ compiler are suitably\n# defined.  These variables are subsequently used by _LT_CONFIG to write\n# the compiler configuration to `libtool'.\nm4_defun([_LT_LANG_CXX_CONFIG],\n[m4_require([_LT_FILEUTILS_DEFAULTS])dnl\nm4_require([_LT_DECL_EGREP])dnl\nm4_require([_LT_PATH_MANIFEST_TOOL])dnl\nif test -n \"$CXX\" && ( test \"X$CXX\" != \"Xno\" &&\n    ( (test \"X$CXX\" = \"Xg++\" && `g++ -v >/dev/null 2>&1` ) ||\n    (test \"X$CXX\" != \"Xg++\"))) ; then\n  AC_PROG_CXXCPP\nelse\n  _lt_caught_CXX_error=yes\nfi\n\nAC_LANG_PUSH(C++)\n_LT_TAGVAR(archive_cmds_need_lc, $1)=no\n_LT_TAGVAR(allow_undefined_flag, $1)=\n_LT_TAGVAR(always_export_symbols, $1)=no\n_LT_TAGVAR(archive_expsym_cmds, $1)=\n_LT_TAGVAR(compiler_needs_object, $1)=no\n_LT_TAGVAR(export_dynamic_flag_spec, $1)=\n_LT_TAGVAR(hardcode_direct, $1)=no\n_LT_TAGVAR(hardcode_direct_absolute, $1)=no\n_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=\n_LT_TAGVAR(hardcode_libdir_separator, $1)=\n_LT_TAGVAR(hardcode_minus_L, $1)=no\n_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported\n_LT_TAGVAR(hardcode_automatic, $1)=no\n_LT_TAGVAR(inherit_rpath, $1)=no\n_LT_TAGVAR(module_cmds, $1)=\n_LT_TAGVAR(module_expsym_cmds, $1)=\n_LT_TAGVAR(link_all_deplibs, $1)=unknown\n_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds\n_LT_TAGVAR(reload_flag, $1)=$reload_flag\n_LT_TAGVAR(reload_cmds, $1)=$reload_cmds\n_LT_TAGVAR(no_undefined_flag, $1)=\n_LT_TAGVAR(whole_archive_flag_spec, $1)=\n_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no\n\n# Source file extension for C++ test sources.\nac_ext=cpp\n\n# Object file extension for compiled C++ test sources.\nobjext=o\n_LT_TAGVAR(objext, $1)=$objext\n\n# No sense in running all these tests if we already determined that\n# the CXX compiler isn't working.  Some variables (like enable_shared)\n# are currently assumed to apply to all compilers on this platform,\n# and will be corrupted by setting them based on a non-working compiler.\nif test \"$_lt_caught_CXX_error\" != yes; then\n  # Code to be used in simple compile tests\n  lt_simple_compile_test_code=\"int some_variable = 0;\"\n\n  # Code to be used in simple link tests\n  lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'\n\n  # ltmain only uses $CC for tagged configurations so make sure $CC is set.\n  _LT_TAG_COMPILER\n\n  # save warnings/boilerplate of simple test code\n  _LT_COMPILER_BOILERPLATE\n  _LT_LINKER_BOILERPLATE\n\n  # Allow CC to be a program name with arguments.\n  lt_save_CC=$CC\n  lt_save_CFLAGS=$CFLAGS\n  lt_save_LD=$LD\n  lt_save_GCC=$GCC\n  GCC=$GXX\n  lt_save_with_gnu_ld=$with_gnu_ld\n  lt_save_path_LD=$lt_cv_path_LD\n  if test -n \"${lt_cv_prog_gnu_ldcxx+set}\"; then\n    lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx\n  else\n    $as_unset lt_cv_prog_gnu_ld\n  fi\n  if test -n \"${lt_cv_path_LDCXX+set}\"; then\n    lt_cv_path_LD=$lt_cv_path_LDCXX\n  else\n    $as_unset lt_cv_path_LD\n  fi\n  test -z \"${LDCXX+set}\" || LD=$LDCXX\n  CC=${CXX-\"c++\"}\n  CFLAGS=$CXXFLAGS\n  compiler=$CC\n  _LT_TAGVAR(compiler, $1)=$CC\n  _LT_CC_BASENAME([$compiler])\n\n  if test -n \"$compiler\"; then\n    # We don't want -fno-exception when compiling C++ code, so set the\n    # no_builtin_flag separately\n    if test \"$GXX\" = yes; then\n      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'\n    else\n      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=\n    fi\n\n    if test \"$GXX\" = yes; then\n      # Set up default GNU C++ configuration\n\n      LT_PATH_LD\n\n      # Check if GNU C++ uses GNU ld as the underlying linker, since the\n      # archiving commands below assume that GNU ld is being used.\n      if test \"$with_gnu_ld\" = yes; then\n        _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'\n        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'\n\n        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'\n        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'\n\n        # If archive_cmds runs LD, not CC, wlarc should be empty\n        # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to\n        #     investigate it a little bit more. (MM)\n        wlarc='${wl}'\n\n        # ancient GNU ld didn't support --whole-archive et. al.\n        if eval \"`$CC -print-prog-name=ld` --help 2>&1\" |\n\t  $GREP 'no-whole-archive' > /dev/null; then\n          _LT_TAGVAR(whole_archive_flag_spec, $1)=\"$wlarc\"'--whole-archive$convenience '\"$wlarc\"'--no-whole-archive'\n        else\n          _LT_TAGVAR(whole_archive_flag_spec, $1)=\n        fi\n      else\n        with_gnu_ld=no\n        wlarc=\n\n        # A generic and very simple default shared library creation\n        # command for GNU C++ for the case where it uses the native\n        # linker, instead of GNU ld.  If possible, this setting should\n        # overridden to take advantage of the native linker features on\n        # the platform it is being used on.\n        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'\n      fi\n\n      # Commands to make compiler produce verbose output that lists\n      # what \"hidden\" libraries, object files and flags are used when\n      # linking a shared library.\n      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v \"^Configured with:\" | $GREP \"\\-L\"'\n\n    else\n      GXX=no\n      with_gnu_ld=no\n      wlarc=\n    fi\n\n    # PORTME: fill in a description of your system's C++ link characteristics\n    AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])\n    _LT_TAGVAR(ld_shlibs, $1)=yes\n    case $host_os in\n      aix3*)\n        # FIXME: insert proper C++ library support\n        _LT_TAGVAR(ld_shlibs, $1)=no\n        ;;\n      aix[[4-9]]*)\n        if test \"$host_cpu\" = ia64; then\n          # On IA64, the linker does run time linking by default, so we don't\n          # have to do anything special.\n          aix_use_runtimelinking=no\n          exp_sym_flag='-Bexport'\n          no_entry_flag=\"\"\n        else\n          aix_use_runtimelinking=no\n\n          # Test if we are trying to use run time linking or normal\n          # AIX style linking. If -brtl is somewhere in LDFLAGS, we\n          # need to do runtime linking.\n          case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)\n\t    for ld_flag in $LDFLAGS; do\n\t      case $ld_flag in\n\t      *-brtl*)\n\t        aix_use_runtimelinking=yes\n\t        break\n\t        ;;\n\t      esac\n\t    done\n\t    ;;\n          esac\n\n          exp_sym_flag='-bexport'\n          no_entry_flag='-bnoentry'\n        fi\n\n        # When large executables or shared objects are built, AIX ld can\n        # have problems creating the table of contents.  If linking a library\n        # or program results in \"error TOC overflow\" add -mminimal-toc to\n        # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not\n        # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.\n\n        _LT_TAGVAR(archive_cmds, $1)=''\n        _LT_TAGVAR(hardcode_direct, $1)=yes\n        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes\n        _LT_TAGVAR(hardcode_libdir_separator, $1)=':'\n        _LT_TAGVAR(link_all_deplibs, $1)=yes\n        _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'\n\n        if test \"$GXX\" = yes; then\n          case $host_os in aix4.[[012]]|aix4.[[012]].*)\n          # We only want to do this on AIX 4.2 and lower, the check\n          # below for broken collect2 doesn't work under 4.3+\n\t  collect2name=`${CC} -print-prog-name=collect2`\n\t  if test -f \"$collect2name\" &&\n\t     strings \"$collect2name\" | $GREP resolve_lib_name >/dev/null\n\t  then\n\t    # We have reworked collect2\n\t    :\n\t  else\n\t    # We have old collect2\n\t    _LT_TAGVAR(hardcode_direct, $1)=unsupported\n\t    # It fails to find uninstalled libraries when the uninstalled\n\t    # path is not listed in the libpath.  Setting hardcode_minus_L\n\t    # to unsupported forces relinking\n\t    _LT_TAGVAR(hardcode_minus_L, $1)=yes\n\t    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'\n\t    _LT_TAGVAR(hardcode_libdir_separator, $1)=\n\t  fi\n          esac\n          shared_flag='-shared'\n\t  if test \"$aix_use_runtimelinking\" = yes; then\n\t    shared_flag=\"$shared_flag \"'${wl}-G'\n\t  fi\n        else\n          # not using gcc\n          if test \"$host_cpu\" = ia64; then\n\t  # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release\n\t  # chokes on -Wl,-G. The following line is correct:\n\t  shared_flag='-G'\n          else\n\t    if test \"$aix_use_runtimelinking\" = yes; then\n\t      shared_flag='${wl}-G'\n\t    else\n\t      shared_flag='${wl}-bM:SRE'\n\t    fi\n          fi\n        fi\n\n        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'\n        # It seems that -bexpall does not export symbols beginning with\n        # underscore (_), so it is better to generate a list of symbols to\n\t# export.\n        _LT_TAGVAR(always_export_symbols, $1)=yes\n        if test \"$aix_use_runtimelinking\" = yes; then\n          # Warning - without using the other runtime loading flags (-brtl),\n          # -berok will link without error, but may produce a broken library.\n          _LT_TAGVAR(allow_undefined_flag, $1)='-berok'\n          # Determine the default libpath from the value encoded in an empty\n          # executable.\n          _LT_SYS_MODULE_PATH_AIX([$1])\n          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'\"$aix_libpath\"\n\n          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '\"\\${wl}$no_entry_flag\"' $compiler_flags `if test \"x${allow_undefined_flag}\" != \"x\"; then func_echo_all \"${wl}${allow_undefined_flag}\"; else :; fi` '\"\\${wl}$exp_sym_flag:\\$export_symbols $shared_flag\"\n        else\n          if test \"$host_cpu\" = ia64; then\n\t    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'\n\t    _LT_TAGVAR(allow_undefined_flag, $1)=\"-z nodefs\"\n\t    _LT_TAGVAR(archive_expsym_cmds, $1)=\"\\$CC $shared_flag\"' -o $output_objdir/$soname $libobjs $deplibs '\"\\${wl}$no_entry_flag\"' $compiler_flags ${wl}${allow_undefined_flag} '\"\\${wl}$exp_sym_flag:\\$export_symbols\"\n          else\n\t    # Determine the default libpath from the value encoded in an\n\t    # empty executable.\n\t    _LT_SYS_MODULE_PATH_AIX([$1])\n\t    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'\"$aix_libpath\"\n\t    # Warning - without using the other run time loading flags,\n\t    # -berok will link without error, but may produce a broken library.\n\t    _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'\n\t    _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'\n\t    if test \"$with_gnu_ld\" = yes; then\n\t      # We only use this code for GNU lds that support --whole-archive.\n\t      _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'\n\t    else\n\t      # Exported symbols can be pulled into shared objects from archives\n\t      _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'\n\t    fi\n\t    _LT_TAGVAR(archive_cmds_need_lc, $1)=yes\n\t    # This is similar to how AIX traditionally builds its shared\n\t    # libraries.\n\t    _LT_TAGVAR(archive_expsym_cmds, $1)=\"\\$CC $shared_flag\"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'\n          fi\n        fi\n        ;;\n\n      beos*)\n\tif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then\n\t  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported\n\t  # Joseph Beckenbach <jrb3@best.com> says some releases of gcc\n\t  # support --undefined.  This deserves some investigation.  FIXME\n\t  _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'\n\telse\n\t  _LT_TAGVAR(ld_shlibs, $1)=no\n\tfi\n\t;;\n\n      chorus*)\n        case $cc_basename in\n          *)\n\t  # FIXME: insert proper C++ library support\n\t  _LT_TAGVAR(ld_shlibs, $1)=no\n\t  ;;\n        esac\n        ;;\n\n      cygwin* | mingw* | pw32* | cegcc*)\n\tcase $GXX,$cc_basename in\n\t,cl* | no,cl*)\n\t  # Native MSVC\n\t  # hardcode_libdir_flag_spec is actually meaningless, as there is\n\t  # no search path for DLLs.\n\t  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '\n\t  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported\n\t  _LT_TAGVAR(always_export_symbols, $1)=yes\n\t  _LT_TAGVAR(file_list_spec, $1)='@'\n\t  # Tell ltmain to make .lib files, not .a files.\n\t  libext=lib\n\t  # Tell ltmain to make .dll files, not .so files.\n\t  shrext_cmds=\".dll\"\n\t  # FIXME: Setting linknames here is a bad hack.\n\t  _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='\n\t  _LT_TAGVAR(archive_expsym_cmds, $1)='if test \"x`$SED 1q $export_symbols`\" = xEXPORTS; then\n\t      $SED -n -e 's/\\\\\\\\\\\\\\(.*\\\\\\\\\\\\\\)/-link\\\\\\ -EXPORT:\\\\\\\\\\\\\\1/' -e '1\\\\\\!p' < $export_symbols > $output_objdir/$soname.exp;\n\t    else\n\t      $SED -e 's/\\\\\\\\\\\\\\(.*\\\\\\\\\\\\\\)/-link\\\\\\ -EXPORT:\\\\\\\\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;\n\t    fi~\n\t    $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs \"@$tool_output_objdir$soname.exp\" -Wl,-DLL,-IMPLIB:\"$tool_output_objdir$libname.dll.lib\"~\n\t    linknames='\n\t  # The linker will not automatically build a static lib if we build a DLL.\n\t  # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'\n\t  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes\n\t  # Don't use ranlib\n\t  _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'\n\t  _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile=\"@OUTPUT@\"~\n\t    lt_tool_outputfile=\"@TOOL_OUTPUT@\"~\n\t    case $lt_outputfile in\n\t      *.exe|*.EXE) ;;\n\t      *)\n\t\tlt_outputfile=\"$lt_outputfile.exe\"\n\t\tlt_tool_outputfile=\"$lt_tool_outputfile.exe\"\n\t\t;;\n\t    esac~\n\t    func_to_tool_file \"$lt_outputfile\"~\n\t    if test \"$MANIFEST_TOOL\" != \":\" && test -f \"$lt_outputfile.manifest\"; then\n\t      $MANIFEST_TOOL -manifest \"$lt_tool_outputfile.manifest\" -outputresource:\"$lt_tool_outputfile\" || exit 1;\n\t      $RM \"$lt_outputfile.manifest\";\n\t    fi'\n\t  ;;\n\t*)\n\t  # g++\n\t  # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,\n\t  # as there is no search path for DLLs.\n\t  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'\n\t  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'\n\t  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported\n\t  _LT_TAGVAR(always_export_symbols, $1)=no\n\t  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes\n\n\t  if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then\n\t    _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'\n\t    # If the export-symbols file already is a .def file (1st line\n\t    # is EXPORTS), use it as is; otherwise, prepend...\n\t    _LT_TAGVAR(archive_expsym_cmds, $1)='if test \"x`$SED 1q $export_symbols`\" = xEXPORTS; then\n\t      cp $export_symbols $output_objdir/$soname.def;\n\t    else\n\t      echo EXPORTS > $output_objdir/$soname.def;\n\t      cat $export_symbols >> $output_objdir/$soname.def;\n\t    fi~\n\t    $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'\n\t  else\n\t    _LT_TAGVAR(ld_shlibs, $1)=no\n\t  fi\n\t  ;;\n\tesac\n\t;;\n      darwin* | rhapsody*)\n        _LT_DARWIN_LINKER_FEATURES($1)\n\t;;\n\n      dgux*)\n        case $cc_basename in\n          ec++*)\n\t    # FIXME: insert proper C++ library support\n\t    _LT_TAGVAR(ld_shlibs, $1)=no\n\t    ;;\n          ghcx*)\n\t    # Green Hills C++ Compiler\n\t    # FIXME: insert proper C++ library support\n\t    _LT_TAGVAR(ld_shlibs, $1)=no\n\t    ;;\n          *)\n\t    # FIXME: insert proper C++ library support\n\t    _LT_TAGVAR(ld_shlibs, $1)=no\n\t    ;;\n        esac\n        ;;\n\n      freebsd2.*)\n        # C++ shared libraries reported to be fairly broken before\n\t# switch to ELF\n        _LT_TAGVAR(ld_shlibs, $1)=no\n        ;;\n\n      freebsd-elf*)\n        _LT_TAGVAR(archive_cmds_need_lc, $1)=no\n        ;;\n\n      freebsd* | dragonfly*)\n        # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF\n        # conventions\n        _LT_TAGVAR(ld_shlibs, $1)=yes\n        ;;\n\n      haiku*)\n        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'\n        _LT_TAGVAR(link_all_deplibs, $1)=yes\n        ;;\n\n      hpux9*)\n        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'\n        _LT_TAGVAR(hardcode_libdir_separator, $1)=:\n        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'\n        _LT_TAGVAR(hardcode_direct, $1)=yes\n        _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,\n\t\t\t\t             # but as the default\n\t\t\t\t             # location of the library.\n\n        case $cc_basename in\n          CC*)\n            # FIXME: insert proper C++ library support\n            _LT_TAGVAR(ld_shlibs, $1)=no\n            ;;\n          aCC*)\n            _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'\n            # Commands to make compiler produce verbose output that lists\n            # what \"hidden\" libraries, object files and flags are used when\n            # linking a shared library.\n            #\n            # There doesn't appear to be a way to prevent this compiler from\n            # explicitly linking system object files so we need to strip them\n            # from the output so that they don't get included in the library\n            # dependencies.\n            output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP \"\\-L\"`; list=\"\"; for z in $templist; do case $z in conftest.$objext) list=\"$list $z\";; *.$objext);; *) list=\"$list $z\";;esac; done; func_echo_all \"$list\"'\n            ;;\n          *)\n            if test \"$GXX\" = yes; then\n              _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'\n            else\n              # FIXME: insert proper C++ library support\n              _LT_TAGVAR(ld_shlibs, $1)=no\n            fi\n            ;;\n        esac\n        ;;\n\n      hpux10*|hpux11*)\n        if test $with_gnu_ld = no; then\n\t  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'\n\t  _LT_TAGVAR(hardcode_libdir_separator, $1)=:\n\n          case $host_cpu in\n            hppa*64*|ia64*)\n              ;;\n            *)\n\t      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'\n              ;;\n          esac\n        fi\n        case $host_cpu in\n          hppa*64*|ia64*)\n            _LT_TAGVAR(hardcode_direct, $1)=no\n            _LT_TAGVAR(hardcode_shlibpath_var, $1)=no\n            ;;\n          *)\n            _LT_TAGVAR(hardcode_direct, $1)=yes\n            _LT_TAGVAR(hardcode_direct_absolute, $1)=yes\n            _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,\n\t\t\t\t\t         # but as the default\n\t\t\t\t\t         # location of the library.\n            ;;\n        esac\n\n        case $cc_basename in\n          CC*)\n\t    # FIXME: insert proper C++ library support\n\t    _LT_TAGVAR(ld_shlibs, $1)=no\n\t    ;;\n          aCC*)\n\t    case $host_cpu in\n\t      hppa*64*)\n\t        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'\n\t        ;;\n\t      ia64*)\n\t        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'\n\t        ;;\n\t      *)\n\t        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'\n\t        ;;\n\t    esac\n\t    # Commands to make compiler produce verbose output that lists\n\t    # what \"hidden\" libraries, object files and flags are used when\n\t    # linking a shared library.\n\t    #\n\t    # There doesn't appear to be a way to prevent this compiler from\n\t    # explicitly linking system object files so we need to strip them\n\t    # from the output so that they don't get included in the library\n\t    # dependencies.\n\t    output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP \"\\-L\"`; list=\"\"; for z in $templist; do case $z in conftest.$objext) list=\"$list $z\";; *.$objext);; *) list=\"$list $z\";;esac; done; func_echo_all \"$list\"'\n\t    ;;\n          *)\n\t    if test \"$GXX\" = yes; then\n\t      if test $with_gnu_ld = no; then\n\t        case $host_cpu in\n\t          hppa*64*)\n\t            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'\n\t            ;;\n\t          ia64*)\n\t            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'\n\t            ;;\n\t          *)\n\t            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'\n\t            ;;\n\t        esac\n\t      fi\n\t    else\n\t      # FIXME: insert proper C++ library support\n\t      _LT_TAGVAR(ld_shlibs, $1)=no\n\t    fi\n\t    ;;\n        esac\n        ;;\n\n      interix[[3-9]]*)\n\t_LT_TAGVAR(hardcode_direct, $1)=no\n\t_LT_TAGVAR(hardcode_shlibpath_var, $1)=no\n\t_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'\n\t_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'\n\t# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.\n\t# Instead, shared libraries are loaded at an image base (0x10000000 by\n\t# default) and relocated if they conflict, which is a slow very memory\n\t# consuming and fragmenting process.  To avoid this, we pick a random,\n\t# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link\n\t# time.  Moving up from 0x10000000 also allows more sbrk(2) space.\n\t_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \\* 262144 + 1342177280` -o $lib'\n\t_LT_TAGVAR(archive_expsym_cmds, $1)='sed \"s,^,_,\" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \\* 262144 + 1342177280` -o $lib'\n\t;;\n      irix5* | irix6*)\n        case $cc_basename in\n          CC*)\n\t    # SGI C++\n\t    _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n \"$verstring\" && func_echo_all \"-set_version $verstring\"` -update_registry ${output_objdir}/so_locations -o $lib'\n\n\t    # Archives containing C++ object files must be created using\n\t    # \"CC -ar\", where \"CC\" is the IRIX C++ compiler.  This is\n\t    # necessary to make sure instantiated templates are included\n\t    # in the archive.\n\t    _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'\n\t    ;;\n          *)\n\t    if test \"$GXX\" = yes; then\n\t      if test \"$with_gnu_ld\" = no; then\n\t        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n \"$verstring\" && func_echo_all \"${wl}-set_version ${wl}$verstring\"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'\n\t      else\n\t        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n \"$verstring\" && func_echo_all \"${wl}-set_version ${wl}$verstring\"` -o $lib'\n\t      fi\n\t    fi\n\t    _LT_TAGVAR(link_all_deplibs, $1)=yes\n\t    ;;\n        esac\n        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'\n        _LT_TAGVAR(hardcode_libdir_separator, $1)=:\n        _LT_TAGVAR(inherit_rpath, $1)=yes\n        ;;\n\n      linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)\n        case $cc_basename in\n          KCC*)\n\t    # Kuck and Associates, Inc. (KAI) C++ Compiler\n\n\t    # KCC will only create a shared library if the output file\n\t    # ends with \".so\" (or \".sl\" for HP-UX), so rename the library\n\t    # to its proper name (with version) after linking.\n\t    _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\\''s/\\([[^()0-9A-Za-z{}]]\\)/\\\\\\\\\\1/g'\\''`; templib=`echo $lib | $SED -e \"s/\\${tempext}\\..*/.so/\"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \\$templib; mv \\$templib $lib'\n\t    _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\\''s/\\([[^()0-9A-Za-z{}]]\\)/\\\\\\\\\\1/g'\\''`; templib=`echo $lib | $SED -e \"s/\\${tempext}\\..*/.so/\"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \\$templib ${wl}-retain-symbols-file,$export_symbols; mv \\$templib $lib'\n\t    # Commands to make compiler produce verbose output that lists\n\t    # what \"hidden\" libraries, object files and flags are used when\n\t    # linking a shared library.\n\t    #\n\t    # There doesn't appear to be a way to prevent this compiler from\n\t    # explicitly linking system object files so we need to strip them\n\t    # from the output so that they don't get included in the library\n\t    # dependencies.\n\t    output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP \"ld\"`; rm -f libconftest$shared_ext; list=\"\"; for z in $templist; do case $z in conftest.$objext) list=\"$list $z\";; *.$objext);; *) list=\"$list $z\";;esac; done; func_echo_all \"$list\"'\n\n\t    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'\n\t    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'\n\n\t    # Archives containing C++ object files must be created using\n\t    # \"CC -Bstatic\", where \"CC\" is the KAI C++ compiler.\n\t    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'\n\t    ;;\n\t  icpc* | ecpc* )\n\t    # Intel C++\n\t    with_gnu_ld=yes\n\t    # version 8.0 and above of icpc choke on multiply defined symbols\n\t    # if we add $predep_objects and $postdep_objects, however 7.1 and\n\t    # earlier do not add the objects themselves.\n\t    case `$CC -V 2>&1` in\n\t      *\"Version 7.\"*)\n\t        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'\n\t\t_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'\n\t\t;;\n\t      *)  # Version 8.0 or newer\n\t        tmp_idyn=\n\t        case $host_cpu in\n\t\t  ia64*) tmp_idyn=' -i_dynamic';;\n\t\tesac\n\t        _LT_TAGVAR(archive_cmds, $1)='$CC -shared'\"$tmp_idyn\"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'\n\t\t_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'\"$tmp_idyn\"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'\n\t\t;;\n\t    esac\n\t    _LT_TAGVAR(archive_cmds_need_lc, $1)=no\n\t    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'\n\t    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'\n\t    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'\n\t    ;;\n          pgCC* | pgcpp*)\n            # Portland Group C++ compiler\n\t    case `$CC -V` in\n\t    *pgCC\\ [[1-5]].* | *pgcpp\\ [[1-5]].*)\n\t      _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~\n\t\trm -rf $tpldir~\n\t\t$CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~\n\t\tcompile_command=\"$compile_command `find $tpldir -name \\*.o | sort | $NL2SP`\"'\n\t      _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~\n\t\trm -rf $tpldir~\n\t\t$CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~\n\t\t$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \\*.o | sort | $NL2SP`~\n\t\t$RANLIB $oldlib'\n\t      _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~\n\t\trm -rf $tpldir~\n\t\t$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~\n\t\t$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \\*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'\n\t      _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~\n\t\trm -rf $tpldir~\n\t\t$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~\n\t\t$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \\*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'\n\t      ;;\n\t    *) # Version 6 and above use weak symbols\n\t      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'\n\t      _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'\n\t      ;;\n\t    esac\n\n\t    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'\n\t    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'\n\t    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\\\"\\\"; do test  -n \\\"$conv\\\" && new_convenience=\\\"$new_convenience,$conv\\\"; done; func_echo_all \\\"$new_convenience\\\"` ${wl}--no-whole-archive'\n            ;;\n\t  cxx*)\n\t    # Compaq C++\n\t    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'\n\t    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname  -o $lib ${wl}-retain-symbols-file $wl$export_symbols'\n\n\t    runpath_var=LD_RUN_PATH\n\t    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'\n\t    _LT_TAGVAR(hardcode_libdir_separator, $1)=:\n\n\t    # Commands to make compiler produce verbose output that lists\n\t    # what \"hidden\" libraries, object files and flags are used when\n\t    # linking a shared library.\n\t    #\n\t    # There doesn't appear to be a way to prevent this compiler from\n\t    # explicitly linking system object files so we need to strip them\n\t    # from the output so that they don't get included in the library\n\t    # dependencies.\n\t    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP \"ld\"`; templist=`func_echo_all \"$templist\" | $SED \"s/\\(^.*ld.*\\)\\( .*ld .*$\\)/\\1/\"`; list=\"\"; for z in $templist; do case $z in conftest.$objext) list=\"$list $z\";; *.$objext);; *) list=\"$list $z\";;esac; done; func_echo_all \"X$list\" | $Xsed'\n\t    ;;\n\t  xl* | mpixl* | bgxl*)\n\t    # IBM XL 8.0 on PPC, with GNU ld\n\t    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'\n\t    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'\n\t    _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'\n\t    if test \"x$supports_anon_versioning\" = xyes; then\n\t      _LT_TAGVAR(archive_expsym_cmds, $1)='echo \"{ global:\" > $output_objdir/$libname.ver~\n\t\tcat $export_symbols | sed -e \"s/\\(.*\\)/\\1;/\" >> $output_objdir/$libname.ver~\n\t\techo \"local: *; };\" >> $output_objdir/$libname.ver~\n\t\t$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'\n\t    fi\n\t    ;;\n\t  *)\n\t    case `$CC -V 2>&1 | sed 5q` in\n\t    *Sun\\ C*)\n\t      # Sun C++ 5.9\n\t      _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'\n\t      _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'\n\t      _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'\n\t      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'\n\t      _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\\\"\\\"; do test -z \\\"$conv\\\" || new_convenience=\\\"$new_convenience,$conv\\\"; done; func_echo_all \\\"$new_convenience\\\"` ${wl}--no-whole-archive'\n\t      _LT_TAGVAR(compiler_needs_object, $1)=yes\n\n\t      # Not sure whether something based on\n\t      # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1\n\t      # would be better.\n\t      output_verbose_link_cmd='func_echo_all'\n\n\t      # Archives containing C++ object files must be created using\n\t      # \"CC -xar\", where \"CC\" is the Sun C++ compiler.  This is\n\t      # necessary to make sure instantiated templates are included\n\t      # in the archive.\n\t      _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'\n\t      ;;\n\t    esac\n\t    ;;\n\tesac\n\t;;\n\n      lynxos*)\n        # FIXME: insert proper C++ library support\n\t_LT_TAGVAR(ld_shlibs, $1)=no\n\t;;\n\n      m88k*)\n        # FIXME: insert proper C++ library support\n        _LT_TAGVAR(ld_shlibs, $1)=no\n\t;;\n\n      mvs*)\n        case $cc_basename in\n          cxx*)\n\t    # FIXME: insert proper C++ library support\n\t    _LT_TAGVAR(ld_shlibs, $1)=no\n\t    ;;\n\t  *)\n\t    # FIXME: insert proper C++ library support\n\t    _LT_TAGVAR(ld_shlibs, $1)=no\n\t    ;;\n\tesac\n\t;;\n\n      netbsd*)\n        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then\n\t  _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'\n\t  wlarc=\n\t  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'\n\t  _LT_TAGVAR(hardcode_direct, $1)=yes\n\t  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no\n\tfi\n\t# Workaround some broken pre-1.5 toolchains\n\toutput_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e \"s:-lgcc -lc -lgcc::\"'\n\t;;\n\n      *nto* | *qnx*)\n        _LT_TAGVAR(ld_shlibs, $1)=yes\n\t;;\n\n      openbsd2*)\n        # C++ shared libraries are fairly broken\n\t_LT_TAGVAR(ld_shlibs, $1)=no\n\t;;\n\n      openbsd*)\n\tif test -f /usr/libexec/ld.so; then\n\t  _LT_TAGVAR(hardcode_direct, $1)=yes\n\t  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no\n\t  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes\n\t  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'\n\t  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'\n\t  if test -z \"`echo __ELF__ | $CC -E - | grep __ELF__`\" || test \"$host_os-$host_cpu\" = \"openbsd2.8-powerpc\"; then\n\t    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'\n\t    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'\n\t    _LT_TAGVAR(whole_archive_flag_spec, $1)=\"$wlarc\"'--whole-archive$convenience '\"$wlarc\"'--no-whole-archive'\n\t  fi\n\t  output_verbose_link_cmd=func_echo_all\n\telse\n\t  _LT_TAGVAR(ld_shlibs, $1)=no\n\tfi\n\t;;\n\n      osf3* | osf4* | osf5*)\n        case $cc_basename in\n          KCC*)\n\t    # Kuck and Associates, Inc. (KAI) C++ Compiler\n\n\t    # KCC will only create a shared library if the output file\n\t    # ends with \".so\" (or \".sl\" for HP-UX), so rename the library\n\t    # to its proper name (with version) after linking.\n\t    _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\\''s/\\([[^()0-9A-Za-z{}]]\\)/\\\\\\\\\\1/g'\\''`; templib=`echo \"$lib\" | $SED -e \"s/\\${tempext}\\..*/.so/\"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \\$templib; mv \\$templib $lib'\n\n\t    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'\n\t    _LT_TAGVAR(hardcode_libdir_separator, $1)=:\n\n\t    # Archives containing C++ object files must be created using\n\t    # the KAI C++ compiler.\n\t    case $host in\n\t      osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;\n\t      *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;\n\t    esac\n\t    ;;\n          RCC*)\n\t    # Rational C++ 2.4.1\n\t    # FIXME: insert proper C++ library support\n\t    _LT_TAGVAR(ld_shlibs, $1)=no\n\t    ;;\n          cxx*)\n\t    case $host in\n\t      osf3*)\n\t        _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\\*'\n\t        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n \"$verstring\" && func_echo_all \"${wl}-set_version $verstring\"` -update_registry ${output_objdir}/so_locations -o $lib'\n\t        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'\n\t\t;;\n\t      *)\n\t        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \\*'\n\t        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n \"$verstring\" && func_echo_all \"-set_version $verstring\"` -update_registry ${output_objdir}/so_locations -o $lib'\n\t        _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf \"%s %s\\\\n\" -exported_symbol \"\\$i\" >> $lib.exp; done~\n\t          echo \"-hidden\">> $lib.exp~\n\t          $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp  `test -n \"$verstring\" && $ECHO \"-set_version $verstring\"` -update_registry ${output_objdir}/so_locations -o $lib~\n\t          $RM $lib.exp'\n\t        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'\n\t\t;;\n\t    esac\n\n\t    _LT_TAGVAR(hardcode_libdir_separator, $1)=:\n\n\t    # Commands to make compiler produce verbose output that lists\n\t    # what \"hidden\" libraries, object files and flags are used when\n\t    # linking a shared library.\n\t    #\n\t    # There doesn't appear to be a way to prevent this compiler from\n\t    # explicitly linking system object files so we need to strip them\n\t    # from the output so that they don't get included in the library\n\t    # dependencies.\n\t    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP \"ld\" | $GREP -v \"ld:\"`; templist=`func_echo_all \"$templist\" | $SED \"s/\\(^.*ld.*\\)\\( .*ld.*$\\)/\\1/\"`; list=\"\"; for z in $templist; do case $z in conftest.$objext) list=\"$list $z\";; *.$objext);; *) list=\"$list $z\";;esac; done; func_echo_all \"$list\"'\n\t    ;;\n\t  *)\n\t    if test \"$GXX\" = yes && test \"$with_gnu_ld\" = no; then\n\t      _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\\*'\n\t      case $host in\n\t        osf3*)\n\t          _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n \"$verstring\" && func_echo_all \"${wl}-set_version ${wl}$verstring\"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'\n\t\t  ;;\n\t        *)\n\t          _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n \"$verstring\" && func_echo_all \"${wl}-set_version ${wl}$verstring\"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'\n\t\t  ;;\n\t      esac\n\n\t      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'\n\t      _LT_TAGVAR(hardcode_libdir_separator, $1)=:\n\n\t      # Commands to make compiler produce verbose output that lists\n\t      # what \"hidden\" libraries, object files and flags are used when\n\t      # linking a shared library.\n\t      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v \"^Configured with:\" | $GREP \"\\-L\"'\n\n\t    else\n\t      # FIXME: insert proper C++ library support\n\t      _LT_TAGVAR(ld_shlibs, $1)=no\n\t    fi\n\t    ;;\n        esac\n        ;;\n\n      psos*)\n        # FIXME: insert proper C++ library support\n        _LT_TAGVAR(ld_shlibs, $1)=no\n        ;;\n\n      sunos4*)\n        case $cc_basename in\n          CC*)\n\t    # Sun C++ 4.x\n\t    # FIXME: insert proper C++ library support\n\t    _LT_TAGVAR(ld_shlibs, $1)=no\n\t    ;;\n          lcc*)\n\t    # Lucid\n\t    # FIXME: insert proper C++ library support\n\t    _LT_TAGVAR(ld_shlibs, $1)=no\n\t    ;;\n          *)\n\t    # FIXME: insert proper C++ library support\n\t    _LT_TAGVAR(ld_shlibs, $1)=no\n\t    ;;\n        esac\n        ;;\n\n      solaris*)\n        case $cc_basename in\n          CC* | sunCC*)\n\t    # Sun C++ 4.2, 5.x and Centerline C++\n            _LT_TAGVAR(archive_cmds_need_lc,$1)=yes\n\t    _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'\n\t    _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'\n\t    _LT_TAGVAR(archive_expsym_cmds, $1)='echo \"{ global:\" > $lib.exp~cat $export_symbols | $SED -e \"s/\\(.*\\)/\\1;/\" >> $lib.exp~echo \"local: *; };\" >> $lib.exp~\n\t      $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'\n\n\t    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'\n\t    _LT_TAGVAR(hardcode_shlibpath_var, $1)=no\n\t    case $host_os in\n\t      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;\n\t      *)\n\t\t# The compiler driver will combine and reorder linker options,\n\t\t# but understands `-z linker_flag'.\n\t        # Supported since Solaris 2.6 (maybe 2.5.1?)\n\t\t_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'\n\t        ;;\n\t    esac\n\t    _LT_TAGVAR(link_all_deplibs, $1)=yes\n\n\t    output_verbose_link_cmd='func_echo_all'\n\n\t    # Archives containing C++ object files must be created using\n\t    # \"CC -xar\", where \"CC\" is the Sun C++ compiler.  This is\n\t    # necessary to make sure instantiated templates are included\n\t    # in the archive.\n\t    _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'\n\t    ;;\n          gcx*)\n\t    # Green Hills C++ Compiler\n\t    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'\n\n\t    # The C++ compiler must be used to create the archive.\n\t    _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'\n\t    ;;\n          *)\n\t    # GNU C++ compiler with Solaris linker\n\t    if test \"$GXX\" = yes && test \"$with_gnu_ld\" = no; then\n\t      _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'\n\t      if $CC --version | $GREP -v '^2\\.7' > /dev/null; then\n\t        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'\n\t        _LT_TAGVAR(archive_expsym_cmds, $1)='echo \"{ global:\" > $lib.exp~cat $export_symbols | $SED -e \"s/\\(.*\\)/\\1;/\" >> $lib.exp~echo \"local: *; };\" >> $lib.exp~\n\t\t  $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'\n\n\t        # Commands to make compiler produce verbose output that lists\n\t        # what \"hidden\" libraries, object files and flags are used when\n\t        # linking a shared library.\n\t        output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v \"^Configured with:\" | $GREP \"\\-L\"'\n\t      else\n\t        # g++ 2.7 appears to require `-G' NOT `-shared' on this\n\t        # platform.\n\t        _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'\n\t        _LT_TAGVAR(archive_expsym_cmds, $1)='echo \"{ global:\" > $lib.exp~cat $export_symbols | $SED -e \"s/\\(.*\\)/\\1;/\" >> $lib.exp~echo \"local: *; };\" >> $lib.exp~\n\t\t  $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'\n\n\t        # Commands to make compiler produce verbose output that lists\n\t        # what \"hidden\" libraries, object files and flags are used when\n\t        # linking a shared library.\n\t        output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v \"^Configured with:\" | $GREP \"\\-L\"'\n\t      fi\n\n\t      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'\n\t      case $host_os in\n\t\tsolaris2.[[0-5]] | solaris2.[[0-5]].*) ;;\n\t\t*)\n\t\t  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'\n\t\t  ;;\n\t      esac\n\t    fi\n\t    ;;\n        esac\n        ;;\n\n    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)\n      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'\n      _LT_TAGVAR(archive_cmds_need_lc, $1)=no\n      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no\n      runpath_var='LD_RUN_PATH'\n\n      case $cc_basename in\n        CC*)\n\t  _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'\n\t  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'\n\t  ;;\n\t*)\n\t  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'\n\t  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'\n\t  ;;\n      esac\n      ;;\n\n      sysv5* | sco3.2v5* | sco5v6*)\n\t# Note: We can NOT use -z defs as we might desire, because we do not\n\t# link with -lc, and that would cause any symbols used from libc to\n\t# always be unresolved, which means just about no library would\n\t# ever link correctly.  If we're not using GNU ld we use -z text\n\t# though, which does catch some bad symbols but isn't as heavy-handed\n\t# as -z defs.\n\t_LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'\n\t_LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'\n\t_LT_TAGVAR(archive_cmds_need_lc, $1)=no\n\t_LT_TAGVAR(hardcode_shlibpath_var, $1)=no\n\t_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'\n\t_LT_TAGVAR(hardcode_libdir_separator, $1)=':'\n\t_LT_TAGVAR(link_all_deplibs, $1)=yes\n\t_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'\n\trunpath_var='LD_RUN_PATH'\n\n\tcase $cc_basename in\n          CC*)\n\t    _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'\n\t    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'\n\t    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~\n\t      '\"$_LT_TAGVAR(old_archive_cmds, $1)\"\n\t    _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~\n\t      '\"$_LT_TAGVAR(reload_cmds, $1)\"\n\t    ;;\n\t  *)\n\t    _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'\n\t    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'\n\t    ;;\n\tesac\n      ;;\n\n      tandem*)\n        case $cc_basename in\n          NCC*)\n\t    # NonStop-UX NCC 3.20\n\t    # FIXME: insert proper C++ library support\n\t    _LT_TAGVAR(ld_shlibs, $1)=no\n\t    ;;\n          *)\n\t    # FIXME: insert proper C++ library support\n\t    _LT_TAGVAR(ld_shlibs, $1)=no\n\t    ;;\n        esac\n        ;;\n\n      vxworks*)\n        # FIXME: insert proper C++ library support\n        _LT_TAGVAR(ld_shlibs, $1)=no\n        ;;\n\n      *)\n        # FIXME: insert proper C++ library support\n        _LT_TAGVAR(ld_shlibs, $1)=no\n        ;;\n    esac\n\n    AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])\n    test \"$_LT_TAGVAR(ld_shlibs, $1)\" = no && can_build_shared=no\n\n    _LT_TAGVAR(GCC, $1)=\"$GXX\"\n    _LT_TAGVAR(LD, $1)=\"$LD\"\n\n    ## CAVEAT EMPTOR:\n    ## There is no encapsulation within the following macros, do not change\n    ## the running order or otherwise move them around unless you know exactly\n    ## what you are doing...\n    _LT_SYS_HIDDEN_LIBDEPS($1)\n    _LT_COMPILER_PIC($1)\n    _LT_COMPILER_C_O($1)\n    _LT_COMPILER_FILE_LOCKS($1)\n    _LT_LINKER_SHLIBS($1)\n    _LT_SYS_DYNAMIC_LINKER($1)\n    _LT_LINKER_HARDCODE_LIBPATH($1)\n\n    _LT_CONFIG($1)\n  fi # test -n \"$compiler\"\n\n  CC=$lt_save_CC\n  CFLAGS=$lt_save_CFLAGS\n  LDCXX=$LD\n  LD=$lt_save_LD\n  GCC=$lt_save_GCC\n  with_gnu_ld=$lt_save_with_gnu_ld\n  lt_cv_path_LDCXX=$lt_cv_path_LD\n  lt_cv_path_LD=$lt_save_path_LD\n  lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld\n  lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld\nfi # test \"$_lt_caught_CXX_error\" != yes\n\nAC_LANG_POP\n])# _LT_LANG_CXX_CONFIG\n\n\n# _LT_FUNC_STRIPNAME_CNF\n# ----------------------\n# func_stripname_cnf prefix suffix name\n# strip PREFIX and SUFFIX off of NAME.\n# PREFIX and SUFFIX must not contain globbing or regex special\n# characters, hashes, percent signs, but SUFFIX may contain a leading\n# dot (in which case that matches only a dot).\n#\n# This function is identical to the (non-XSI) version of func_stripname,\n# except this one can be used by m4 code that may be executed by configure,\n# rather than the libtool script.\nm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl\nAC_REQUIRE([_LT_DECL_SED])\nAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])\nfunc_stripname_cnf ()\n{\n  case ${2} in\n  .*) func_stripname_result=`$ECHO \"${3}\" | $SED \"s%^${1}%%; s%\\\\\\\\${2}\\$%%\"`;;\n  *)  func_stripname_result=`$ECHO \"${3}\" | $SED \"s%^${1}%%; s%${2}\\$%%\"`;;\n  esac\n} # func_stripname_cnf\n])# _LT_FUNC_STRIPNAME_CNF\n\n# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])\n# ---------------------------------\n# Figure out \"hidden\" library dependencies from verbose\n# compiler output when linking a shared library.\n# Parse the compiler output and extract the necessary\n# objects, libraries and library flags.\nm4_defun([_LT_SYS_HIDDEN_LIBDEPS],\n[m4_require([_LT_FILEUTILS_DEFAULTS])dnl\nAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl\n# Dependencies to place before and after the object being linked:\n_LT_TAGVAR(predep_objects, $1)=\n_LT_TAGVAR(postdep_objects, $1)=\n_LT_TAGVAR(predeps, $1)=\n_LT_TAGVAR(postdeps, $1)=\n_LT_TAGVAR(compiler_lib_search_path, $1)=\n\ndnl we can't use the lt_simple_compile_test_code here,\ndnl because it contains code intended for an executable,\ndnl not a library.  It's possible we should let each\ndnl tag define a new lt_????_link_test_code variable,\ndnl but it's only used here...\nm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF\nint a;\nvoid foo (void) { a = 0; }\n_LT_EOF\n], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF\nclass Foo\n{\npublic:\n  Foo (void) { a = 0; }\nprivate:\n  int a;\n};\n_LT_EOF\n], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF\n      subroutine foo\n      implicit none\n      integer*4 a\n      a=0\n      return\n      end\n_LT_EOF\n], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF\n      subroutine foo\n      implicit none\n      integer a\n      a=0\n      return\n      end\n_LT_EOF\n], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF\npublic class foo {\n  private int a;\n  public void bar (void) {\n    a = 0;\n  }\n};\n_LT_EOF\n], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF\npackage foo\nfunc foo() {\n}\n_LT_EOF\n])\n\n_lt_libdeps_save_CFLAGS=$CFLAGS\ncase \"$CC $CFLAGS \" in #(\n*\\ -flto*\\ *) CFLAGS=\"$CFLAGS -fno-lto\" ;;\n*\\ -fwhopr*\\ *) CFLAGS=\"$CFLAGS -fno-whopr\" ;;\n*\\ -fuse-linker-plugin*\\ *) CFLAGS=\"$CFLAGS -fno-use-linker-plugin\" ;;\nesac\n\ndnl Parse the compiler output and extract the necessary\ndnl objects, libraries and library flags.\nif AC_TRY_EVAL(ac_compile); then\n  # Parse the compiler output and extract the necessary\n  # objects, libraries and library flags.\n\n  # Sentinel used to keep track of whether or not we are before\n  # the conftest object file.\n  pre_test_object_deps_done=no\n\n  for p in `eval \"$output_verbose_link_cmd\"`; do\n    case ${prev}${p} in\n\n    -L* | -R* | -l*)\n       # Some compilers place space between \"-{L,R}\" and the path.\n       # Remove the space.\n       if test $p = \"-L\" ||\n          test $p = \"-R\"; then\n\t prev=$p\n\t continue\n       fi\n\n       # Expand the sysroot to ease extracting the directories later.\n       if test -z \"$prev\"; then\n         case $p in\n         -L*) func_stripname_cnf '-L' '' \"$p\"; prev=-L; p=$func_stripname_result ;;\n         -R*) func_stripname_cnf '-R' '' \"$p\"; prev=-R; p=$func_stripname_result ;;\n         -l*) func_stripname_cnf '-l' '' \"$p\"; prev=-l; p=$func_stripname_result ;;\n         esac\n       fi\n       case $p in\n       =*) func_stripname_cnf '=' '' \"$p\"; p=$lt_sysroot$func_stripname_result ;;\n       esac\n       if test \"$pre_test_object_deps_done\" = no; then\n\t case ${prev} in\n\t -L | -R)\n\t   # Internal compiler library paths should come after those\n\t   # provided the user.  The postdeps already come after the\n\t   # user supplied libs so there is no need to process them.\n\t   if test -z \"$_LT_TAGVAR(compiler_lib_search_path, $1)\"; then\n\t     _LT_TAGVAR(compiler_lib_search_path, $1)=\"${prev}${p}\"\n\t   else\n\t     _LT_TAGVAR(compiler_lib_search_path, $1)=\"${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}\"\n\t   fi\n\t   ;;\n\t # The \"-l\" case would never come before the object being\n\t # linked, so don't bother handling this case.\n\t esac\n       else\n\t if test -z \"$_LT_TAGVAR(postdeps, $1)\"; then\n\t   _LT_TAGVAR(postdeps, $1)=\"${prev}${p}\"\n\t else\n\t   _LT_TAGVAR(postdeps, $1)=\"${_LT_TAGVAR(postdeps, $1)} ${prev}${p}\"\n\t fi\n       fi\n       prev=\n       ;;\n\n    *.lto.$objext) ;; # Ignore GCC LTO objects\n    *.$objext)\n       # This assumes that the test object file only shows up\n       # once in the compiler output.\n       if test \"$p\" = \"conftest.$objext\"; then\n\t pre_test_object_deps_done=yes\n\t continue\n       fi\n\n       if test \"$pre_test_object_deps_done\" = no; then\n\t if test -z \"$_LT_TAGVAR(predep_objects, $1)\"; then\n\t   _LT_TAGVAR(predep_objects, $1)=\"$p\"\n\t else\n\t   _LT_TAGVAR(predep_objects, $1)=\"$_LT_TAGVAR(predep_objects, $1) $p\"\n\t fi\n       else\n\t if test -z \"$_LT_TAGVAR(postdep_objects, $1)\"; then\n\t   _LT_TAGVAR(postdep_objects, $1)=\"$p\"\n\t else\n\t   _LT_TAGVAR(postdep_objects, $1)=\"$_LT_TAGVAR(postdep_objects, $1) $p\"\n\t fi\n       fi\n       ;;\n\n    *) ;; # Ignore the rest.\n\n    esac\n  done\n\n  # Clean up.\n  rm -f a.out a.exe\nelse\n  echo \"libtool.m4: error: problem compiling $1 test program\"\nfi\n\n$RM -f confest.$objext\nCFLAGS=$_lt_libdeps_save_CFLAGS\n\n# PORTME: override above test on systems where it is broken\nm4_if([$1], [CXX],\n[case $host_os in\ninterix[[3-9]]*)\n  # Interix 3.5 installs completely hosed .la files for C++, so rather than\n  # hack all around it, let's just trust \"g++\" to DTRT.\n  _LT_TAGVAR(predep_objects,$1)=\n  _LT_TAGVAR(postdep_objects,$1)=\n  _LT_TAGVAR(postdeps,$1)=\n  ;;\n\nlinux*)\n  case `$CC -V 2>&1 | sed 5q` in\n  *Sun\\ C*)\n    # Sun C++ 5.9\n\n    # The more standards-conforming stlport4 library is\n    # incompatible with the Cstd library. Avoid specifying\n    # it if it's in CXXFLAGS. Ignore libCrun as\n    # -library=stlport4 depends on it.\n    case \" $CXX $CXXFLAGS \" in\n    *\" -library=stlport4 \"*)\n      solaris_use_stlport4=yes\n      ;;\n    esac\n\n    if test \"$solaris_use_stlport4\" != yes; then\n      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'\n    fi\n    ;;\n  esac\n  ;;\n\nsolaris*)\n  case $cc_basename in\n  CC* | sunCC*)\n    # The more standards-conforming stlport4 library is\n    # incompatible with the Cstd library. Avoid specifying\n    # it if it's in CXXFLAGS. Ignore libCrun as\n    # -library=stlport4 depends on it.\n    case \" $CXX $CXXFLAGS \" in\n    *\" -library=stlport4 \"*)\n      solaris_use_stlport4=yes\n      ;;\n    esac\n\n    # Adding this requires a known-good setup of shared libraries for\n    # Sun compiler versions before 5.6, else PIC objects from an old\n    # archive will be linked into the output, leading to subtle bugs.\n    if test \"$solaris_use_stlport4\" != yes; then\n      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'\n    fi\n    ;;\n  esac\n  ;;\nesac\n])\n\ncase \" $_LT_TAGVAR(postdeps, $1) \" in\n*\" -lc \"*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;\nesac\n _LT_TAGVAR(compiler_lib_search_dirs, $1)=\nif test -n \"${_LT_TAGVAR(compiler_lib_search_path, $1)}\"; then\n _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo \" ${_LT_TAGVAR(compiler_lib_search_path, $1)}\" | ${SED} -e 's! -L! !g' -e 's!^ !!'`\nfi\n_LT_TAGDECL([], [compiler_lib_search_dirs], [1],\n    [The directories searched by this compiler when creating a shared library])\n_LT_TAGDECL([], [predep_objects], [1],\n    [Dependencies to place before and after the objects being linked to\n    create a shared library])\n_LT_TAGDECL([], [postdep_objects], [1])\n_LT_TAGDECL([], [predeps], [1])\n_LT_TAGDECL([], [postdeps], [1])\n_LT_TAGDECL([], [compiler_lib_search_path], [1],\n    [The library search path used internally by the compiler when linking\n    a shared library])\n])# _LT_SYS_HIDDEN_LIBDEPS\n\n\n# _LT_LANG_F77_CONFIG([TAG])\n# --------------------------\n# Ensure that the configuration variables for a Fortran 77 compiler are\n# suitably defined.  These variables are subsequently used by _LT_CONFIG\n# to write the compiler configuration to `libtool'.\nm4_defun([_LT_LANG_F77_CONFIG],\n[AC_LANG_PUSH(Fortran 77)\nif test -z \"$F77\" || test \"X$F77\" = \"Xno\"; then\n  _lt_disable_F77=yes\nfi\n\n_LT_TAGVAR(archive_cmds_need_lc, $1)=no\n_LT_TAGVAR(allow_undefined_flag, $1)=\n_LT_TAGVAR(always_export_symbols, $1)=no\n_LT_TAGVAR(archive_expsym_cmds, $1)=\n_LT_TAGVAR(export_dynamic_flag_spec, $1)=\n_LT_TAGVAR(hardcode_direct, $1)=no\n_LT_TAGVAR(hardcode_direct_absolute, $1)=no\n_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=\n_LT_TAGVAR(hardcode_libdir_separator, $1)=\n_LT_TAGVAR(hardcode_minus_L, $1)=no\n_LT_TAGVAR(hardcode_automatic, $1)=no\n_LT_TAGVAR(inherit_rpath, $1)=no\n_LT_TAGVAR(module_cmds, $1)=\n_LT_TAGVAR(module_expsym_cmds, $1)=\n_LT_TAGVAR(link_all_deplibs, $1)=unknown\n_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds\n_LT_TAGVAR(reload_flag, $1)=$reload_flag\n_LT_TAGVAR(reload_cmds, $1)=$reload_cmds\n_LT_TAGVAR(no_undefined_flag, $1)=\n_LT_TAGVAR(whole_archive_flag_spec, $1)=\n_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no\n\n# Source file extension for f77 test sources.\nac_ext=f\n\n# Object file extension for compiled f77 test sources.\nobjext=o\n_LT_TAGVAR(objext, $1)=$objext\n\n# No sense in running all these tests if we already determined that\n# the F77 compiler isn't working.  Some variables (like enable_shared)\n# are currently assumed to apply to all compilers on this platform,\n# and will be corrupted by setting them based on a non-working compiler.\nif test \"$_lt_disable_F77\" != yes; then\n  # Code to be used in simple compile tests\n  lt_simple_compile_test_code=\"\\\n      subroutine t\n      return\n      end\n\"\n\n  # Code to be used in simple link tests\n  lt_simple_link_test_code=\"\\\n      program t\n      end\n\"\n\n  # ltmain only uses $CC for tagged configurations so make sure $CC is set.\n  _LT_TAG_COMPILER\n\n  # save warnings/boilerplate of simple test code\n  _LT_COMPILER_BOILERPLATE\n  _LT_LINKER_BOILERPLATE\n\n  # Allow CC to be a program name with arguments.\n  lt_save_CC=\"$CC\"\n  lt_save_GCC=$GCC\n  lt_save_CFLAGS=$CFLAGS\n  CC=${F77-\"f77\"}\n  CFLAGS=$FFLAGS\n  compiler=$CC\n  _LT_TAGVAR(compiler, $1)=$CC\n  _LT_CC_BASENAME([$compiler])\n  GCC=$G77\n  if test -n \"$compiler\"; then\n    AC_MSG_CHECKING([if libtool supports shared libraries])\n    AC_MSG_RESULT([$can_build_shared])\n\n    AC_MSG_CHECKING([whether to build shared libraries])\n    test \"$can_build_shared\" = \"no\" && enable_shared=no\n\n    # On AIX, shared libraries and static libraries use the same namespace, and\n    # are all built from PIC.\n    case $host_os in\n      aix3*)\n        test \"$enable_shared\" = yes && enable_static=no\n        if test -n \"$RANLIB\"; then\n          archive_cmds=\"$archive_cmds~\\$RANLIB \\$lib\"\n          postinstall_cmds='$RANLIB $lib'\n        fi\n        ;;\n      aix[[4-9]]*)\n\tif test \"$host_cpu\" != ia64 && test \"$aix_use_runtimelinking\" = no ; then\n\t  test \"$enable_shared\" = yes && enable_static=no\n\tfi\n        ;;\n    esac\n    AC_MSG_RESULT([$enable_shared])\n\n    AC_MSG_CHECKING([whether to build static libraries])\n    # Make sure either enable_shared or enable_static is yes.\n    test \"$enable_shared\" = yes || enable_static=yes\n    AC_MSG_RESULT([$enable_static])\n\n    _LT_TAGVAR(GCC, $1)=\"$G77\"\n    _LT_TAGVAR(LD, $1)=\"$LD\"\n\n    ## CAVEAT EMPTOR:\n    ## There is no encapsulation within the following macros, do not change\n    ## the running order or otherwise move them around unless you know exactly\n    ## what you are doing...\n    _LT_COMPILER_PIC($1)\n    _LT_COMPILER_C_O($1)\n    _LT_COMPILER_FILE_LOCKS($1)\n    _LT_LINKER_SHLIBS($1)\n    _LT_SYS_DYNAMIC_LINKER($1)\n    _LT_LINKER_HARDCODE_LIBPATH($1)\n\n    _LT_CONFIG($1)\n  fi # test -n \"$compiler\"\n\n  GCC=$lt_save_GCC\n  CC=\"$lt_save_CC\"\n  CFLAGS=\"$lt_save_CFLAGS\"\nfi # test \"$_lt_disable_F77\" != yes\n\nAC_LANG_POP\n])# _LT_LANG_F77_CONFIG\n\n\n# _LT_LANG_FC_CONFIG([TAG])\n# -------------------------\n# Ensure that the configuration variables for a Fortran compiler are\n# suitably defined.  These variables are subsequently used by _LT_CONFIG\n# to write the compiler configuration to `libtool'.\nm4_defun([_LT_LANG_FC_CONFIG],\n[AC_LANG_PUSH(Fortran)\n\nif test -z \"$FC\" || test \"X$FC\" = \"Xno\"; then\n  _lt_disable_FC=yes\nfi\n\n_LT_TAGVAR(archive_cmds_need_lc, $1)=no\n_LT_TAGVAR(allow_undefined_flag, $1)=\n_LT_TAGVAR(always_export_symbols, $1)=no\n_LT_TAGVAR(archive_expsym_cmds, $1)=\n_LT_TAGVAR(export_dynamic_flag_spec, $1)=\n_LT_TAGVAR(hardcode_direct, $1)=no\n_LT_TAGVAR(hardcode_direct_absolute, $1)=no\n_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=\n_LT_TAGVAR(hardcode_libdir_separator, $1)=\n_LT_TAGVAR(hardcode_minus_L, $1)=no\n_LT_TAGVAR(hardcode_automatic, $1)=no\n_LT_TAGVAR(inherit_rpath, $1)=no\n_LT_TAGVAR(module_cmds, $1)=\n_LT_TAGVAR(module_expsym_cmds, $1)=\n_LT_TAGVAR(link_all_deplibs, $1)=unknown\n_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds\n_LT_TAGVAR(reload_flag, $1)=$reload_flag\n_LT_TAGVAR(reload_cmds, $1)=$reload_cmds\n_LT_TAGVAR(no_undefined_flag, $1)=\n_LT_TAGVAR(whole_archive_flag_spec, $1)=\n_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no\n\n# Source file extension for fc test sources.\nac_ext=${ac_fc_srcext-f}\n\n# Object file extension for compiled fc test sources.\nobjext=o\n_LT_TAGVAR(objext, $1)=$objext\n\n# No sense in running all these tests if we already determined that\n# the FC compiler isn't working.  Some variables (like enable_shared)\n# are currently assumed to apply to all compilers on this platform,\n# and will be corrupted by setting them based on a non-working compiler.\nif test \"$_lt_disable_FC\" != yes; then\n  # Code to be used in simple compile tests\n  lt_simple_compile_test_code=\"\\\n      subroutine t\n      return\n      end\n\"\n\n  # Code to be used in simple link tests\n  lt_simple_link_test_code=\"\\\n      program t\n      end\n\"\n\n  # ltmain only uses $CC for tagged configurations so make sure $CC is set.\n  _LT_TAG_COMPILER\n\n  # save warnings/boilerplate of simple test code\n  _LT_COMPILER_BOILERPLATE\n  _LT_LINKER_BOILERPLATE\n\n  # Allow CC to be a program name with arguments.\n  lt_save_CC=\"$CC\"\n  lt_save_GCC=$GCC\n  lt_save_CFLAGS=$CFLAGS\n  CC=${FC-\"f95\"}\n  CFLAGS=$FCFLAGS\n  compiler=$CC\n  GCC=$ac_cv_fc_compiler_gnu\n\n  _LT_TAGVAR(compiler, $1)=$CC\n  _LT_CC_BASENAME([$compiler])\n\n  if test -n \"$compiler\"; then\n    AC_MSG_CHECKING([if libtool supports shared libraries])\n    AC_MSG_RESULT([$can_build_shared])\n\n    AC_MSG_CHECKING([whether to build shared libraries])\n    test \"$can_build_shared\" = \"no\" && enable_shared=no\n\n    # On AIX, shared libraries and static libraries use the same namespace, and\n    # are all built from PIC.\n    case $host_os in\n      aix3*)\n        test \"$enable_shared\" = yes && enable_static=no\n        if test -n \"$RANLIB\"; then\n          archive_cmds=\"$archive_cmds~\\$RANLIB \\$lib\"\n          postinstall_cmds='$RANLIB $lib'\n        fi\n        ;;\n      aix[[4-9]]*)\n\tif test \"$host_cpu\" != ia64 && test \"$aix_use_runtimelinking\" = no ; then\n\t  test \"$enable_shared\" = yes && enable_static=no\n\tfi\n        ;;\n    esac\n    AC_MSG_RESULT([$enable_shared])\n\n    AC_MSG_CHECKING([whether to build static libraries])\n    # Make sure either enable_shared or enable_static is yes.\n    test \"$enable_shared\" = yes || enable_static=yes\n    AC_MSG_RESULT([$enable_static])\n\n    _LT_TAGVAR(GCC, $1)=\"$ac_cv_fc_compiler_gnu\"\n    _LT_TAGVAR(LD, $1)=\"$LD\"\n\n    ## CAVEAT EMPTOR:\n    ## There is no encapsulation within the following macros, do not change\n    ## the running order or otherwise move them around unless you know exactly\n    ## what you are doing...\n    _LT_SYS_HIDDEN_LIBDEPS($1)\n    _LT_COMPILER_PIC($1)\n    _LT_COMPILER_C_O($1)\n    _LT_COMPILER_FILE_LOCKS($1)\n    _LT_LINKER_SHLIBS($1)\n    _LT_SYS_DYNAMIC_LINKER($1)\n    _LT_LINKER_HARDCODE_LIBPATH($1)\n\n    _LT_CONFIG($1)\n  fi # test -n \"$compiler\"\n\n  GCC=$lt_save_GCC\n  CC=$lt_save_CC\n  CFLAGS=$lt_save_CFLAGS\nfi # test \"$_lt_disable_FC\" != yes\n\nAC_LANG_POP\n])# _LT_LANG_FC_CONFIG\n\n\n# _LT_LANG_GCJ_CONFIG([TAG])\n# --------------------------\n# Ensure that the configuration variables for the GNU Java Compiler compiler\n# are suitably defined.  These variables are subsequently used by _LT_CONFIG\n# to write the compiler configuration to `libtool'.\nm4_defun([_LT_LANG_GCJ_CONFIG],\n[AC_REQUIRE([LT_PROG_GCJ])dnl\nAC_LANG_SAVE\n\n# Source file extension for Java test sources.\nac_ext=java\n\n# Object file extension for compiled Java test sources.\nobjext=o\n_LT_TAGVAR(objext, $1)=$objext\n\n# Code to be used in simple compile tests\nlt_simple_compile_test_code=\"class foo {}\"\n\n# Code to be used in simple link tests\nlt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'\n\n# ltmain only uses $CC for tagged configurations so make sure $CC is set.\n_LT_TAG_COMPILER\n\n# save warnings/boilerplate of simple test code\n_LT_COMPILER_BOILERPLATE\n_LT_LINKER_BOILERPLATE\n\n# Allow CC to be a program name with arguments.\nlt_save_CC=$CC\nlt_save_CFLAGS=$CFLAGS\nlt_save_GCC=$GCC\nGCC=yes\nCC=${GCJ-\"gcj\"}\nCFLAGS=$GCJFLAGS\ncompiler=$CC\n_LT_TAGVAR(compiler, $1)=$CC\n_LT_TAGVAR(LD, $1)=\"$LD\"\n_LT_CC_BASENAME([$compiler])\n\n# GCJ did not exist at the time GCC didn't implicitly link libc in.\n_LT_TAGVAR(archive_cmds_need_lc, $1)=no\n\n_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds\n_LT_TAGVAR(reload_flag, $1)=$reload_flag\n_LT_TAGVAR(reload_cmds, $1)=$reload_cmds\n\nif test -n \"$compiler\"; then\n  _LT_COMPILER_NO_RTTI($1)\n  _LT_COMPILER_PIC($1)\n  _LT_COMPILER_C_O($1)\n  _LT_COMPILER_FILE_LOCKS($1)\n  _LT_LINKER_SHLIBS($1)\n  _LT_LINKER_HARDCODE_LIBPATH($1)\n\n  _LT_CONFIG($1)\nfi\n\nAC_LANG_RESTORE\n\nGCC=$lt_save_GCC\nCC=$lt_save_CC\nCFLAGS=$lt_save_CFLAGS\n])# _LT_LANG_GCJ_CONFIG\n\n\n# _LT_LANG_GO_CONFIG([TAG])\n# --------------------------\n# Ensure that the configuration variables for the GNU Go compiler\n# are suitably defined.  These variables are subsequently used by _LT_CONFIG\n# to write the compiler configuration to `libtool'.\nm4_defun([_LT_LANG_GO_CONFIG],\n[AC_REQUIRE([LT_PROG_GO])dnl\nAC_LANG_SAVE\n\n# Source file extension for Go test sources.\nac_ext=go\n\n# Object file extension for compiled Go test sources.\nobjext=o\n_LT_TAGVAR(objext, $1)=$objext\n\n# Code to be used in simple compile tests\nlt_simple_compile_test_code=\"package main; func main() { }\"\n\n# Code to be used in simple link tests\nlt_simple_link_test_code='package main; func main() { }'\n\n# ltmain only uses $CC for tagged configurations so make sure $CC is set.\n_LT_TAG_COMPILER\n\n# save warnings/boilerplate of simple test code\n_LT_COMPILER_BOILERPLATE\n_LT_LINKER_BOILERPLATE\n\n# Allow CC to be a program name with arguments.\nlt_save_CC=$CC\nlt_save_CFLAGS=$CFLAGS\nlt_save_GCC=$GCC\nGCC=yes\nCC=${GOC-\"gccgo\"}\nCFLAGS=$GOFLAGS\ncompiler=$CC\n_LT_TAGVAR(compiler, $1)=$CC\n_LT_TAGVAR(LD, $1)=\"$LD\"\n_LT_CC_BASENAME([$compiler])\n\n# Go did not exist at the time GCC didn't implicitly link libc in.\n_LT_TAGVAR(archive_cmds_need_lc, $1)=no\n\n_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds\n_LT_TAGVAR(reload_flag, $1)=$reload_flag\n_LT_TAGVAR(reload_cmds, $1)=$reload_cmds\n\nif test -n \"$compiler\"; then\n  _LT_COMPILER_NO_RTTI($1)\n  _LT_COMPILER_PIC($1)\n  _LT_COMPILER_C_O($1)\n  _LT_COMPILER_FILE_LOCKS($1)\n  _LT_LINKER_SHLIBS($1)\n  _LT_LINKER_HARDCODE_LIBPATH($1)\n\n  _LT_CONFIG($1)\nfi\n\nAC_LANG_RESTORE\n\nGCC=$lt_save_GCC\nCC=$lt_save_CC\nCFLAGS=$lt_save_CFLAGS\n])# _LT_LANG_GO_CONFIG\n\n\n# _LT_LANG_RC_CONFIG([TAG])\n# -------------------------\n# Ensure that the configuration variables for the Windows resource compiler\n# are suitably defined.  These variables are subsequently used by _LT_CONFIG\n# to write the compiler configuration to `libtool'.\nm4_defun([_LT_LANG_RC_CONFIG],\n[AC_REQUIRE([LT_PROG_RC])dnl\nAC_LANG_SAVE\n\n# Source file extension for RC test sources.\nac_ext=rc\n\n# Object file extension for compiled RC test sources.\nobjext=o\n_LT_TAGVAR(objext, $1)=$objext\n\n# Code to be used in simple compile tests\nlt_simple_compile_test_code='sample MENU { MENUITEM \"&Soup\", 100, CHECKED }'\n\n# Code to be used in simple link tests\nlt_simple_link_test_code=\"$lt_simple_compile_test_code\"\n\n# ltmain only uses $CC for tagged configurations so make sure $CC is set.\n_LT_TAG_COMPILER\n\n# save warnings/boilerplate of simple test code\n_LT_COMPILER_BOILERPLATE\n_LT_LINKER_BOILERPLATE\n\n# Allow CC to be a program name with arguments.\nlt_save_CC=\"$CC\"\nlt_save_CFLAGS=$CFLAGS\nlt_save_GCC=$GCC\nGCC=\nCC=${RC-\"windres\"}\nCFLAGS=\ncompiler=$CC\n_LT_TAGVAR(compiler, $1)=$CC\n_LT_CC_BASENAME([$compiler])\n_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes\n\nif test -n \"$compiler\"; then\n  :\n  _LT_CONFIG($1)\nfi\n\nGCC=$lt_save_GCC\nAC_LANG_RESTORE\nCC=$lt_save_CC\nCFLAGS=$lt_save_CFLAGS\n])# _LT_LANG_RC_CONFIG\n\n\n# LT_PROG_GCJ\n# -----------\nAC_DEFUN([LT_PROG_GCJ],\n[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],\n  [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],\n    [AC_CHECK_TOOL(GCJ, gcj,)\n      test \"x${GCJFLAGS+set}\" = xset || GCJFLAGS=\"-g -O2\"\n      AC_SUBST(GCJFLAGS)])])[]dnl\n])\n\n# Old name:\nAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])\ndnl aclocal-1.4 backwards compatibility:\ndnl AC_DEFUN([LT_AC_PROG_GCJ], [])\n\n\n# LT_PROG_GO\n# ----------\nAC_DEFUN([LT_PROG_GO],\n[AC_CHECK_TOOL(GOC, gccgo,)\n])\n\n\n# LT_PROG_RC\n# ----------\nAC_DEFUN([LT_PROG_RC],\n[AC_CHECK_TOOL(RC, windres,)\n])\n\n# Old name:\nAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])\ndnl aclocal-1.4 backwards compatibility:\ndnl AC_DEFUN([LT_AC_PROG_RC], [])\n\n\n# _LT_DECL_EGREP\n# --------------\n# If we don't have a new enough Autoconf to choose the best grep\n# available, choose the one first in the user's PATH.\nm4_defun([_LT_DECL_EGREP],\n[AC_REQUIRE([AC_PROG_EGREP])dnl\nAC_REQUIRE([AC_PROG_FGREP])dnl\ntest -z \"$GREP\" && GREP=grep\n_LT_DECL([], [GREP], [1], [A grep program that handles long lines])\n_LT_DECL([], [EGREP], [1], [An ERE matcher])\n_LT_DECL([], [FGREP], [1], [A literal string matcher])\ndnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too\nAC_SUBST([GREP])\n])\n\n\n# _LT_DECL_OBJDUMP\n# --------------\n# If we don't have a new enough Autoconf to choose the best objdump\n# available, choose the one first in the user's PATH.\nm4_defun([_LT_DECL_OBJDUMP],\n[AC_CHECK_TOOL(OBJDUMP, objdump, false)\ntest -z \"$OBJDUMP\" && OBJDUMP=objdump\n_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])\nAC_SUBST([OBJDUMP])\n])\n\n# _LT_DECL_DLLTOOL\n# ----------------\n# Ensure DLLTOOL variable is set.\nm4_defun([_LT_DECL_DLLTOOL],\n[AC_CHECK_TOOL(DLLTOOL, dlltool, false)\ntest -z \"$DLLTOOL\" && DLLTOOL=dlltool\n_LT_DECL([], [DLLTOOL], [1], [DLL creation program])\nAC_SUBST([DLLTOOL])\n])\n\n# _LT_DECL_SED\n# ------------\n# Check for a fully-functional sed program, that truncates\n# as few characters as possible.  Prefer GNU sed if found.\nm4_defun([_LT_DECL_SED],\n[AC_PROG_SED\ntest -z \"$SED\" && SED=sed\nXsed=\"$SED -e 1s/^X//\"\n_LT_DECL([], [SED], [1], [A sed program that does not truncate output])\n_LT_DECL([], [Xsed], [\"\\$SED -e 1s/^X//\"],\n    [Sed that helps us avoid accidentally triggering echo(1) options like -n])\n])# _LT_DECL_SED\n\nm4_ifndef([AC_PROG_SED], [\n# NOTE: This macro has been submitted for inclusion into   #\n#  GNU Autoconf as AC_PROG_SED.  When it is available in   #\n#  a released version of Autoconf we should remove this    #\n#  macro and use it instead.                               #\n\nm4_defun([AC_PROG_SED],\n[AC_MSG_CHECKING([for a sed that does not truncate output])\nAC_CACHE_VAL(lt_cv_path_SED,\n[# Loop through the user's path and test for sed and gsed.\n# Then use that list of sed's as ones to test for truncation.\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n  for lt_ac_prog in sed gsed; do\n    for ac_exec_ext in '' $ac_executable_extensions; do\n      if $as_executable_p \"$as_dir/$lt_ac_prog$ac_exec_ext\"; then\n        lt_ac_sed_list=\"$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext\"\n      fi\n    done\n  done\ndone\nIFS=$as_save_IFS\nlt_ac_max=0\nlt_ac_count=0\n# Add /usr/xpg4/bin/sed as it is typically found on Solaris\n# along with /bin/sed that truncates output.\nfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do\n  test ! -f $lt_ac_sed && continue\n  cat /dev/null > conftest.in\n  lt_ac_count=0\n  echo $ECHO_N \"0123456789$ECHO_C\" >conftest.in\n  # Check for GNU sed and select it if it is found.\n  if \"$lt_ac_sed\" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then\n    lt_cv_path_SED=$lt_ac_sed\n    break\n  fi\n  while true; do\n    cat conftest.in conftest.in >conftest.tmp\n    mv conftest.tmp conftest.in\n    cp conftest.in conftest.nl\n    echo >>conftest.nl\n    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break\n    cmp -s conftest.out conftest.nl || break\n    # 10000 chars as input seems more than enough\n    test $lt_ac_count -gt 10 && break\n    lt_ac_count=`expr $lt_ac_count + 1`\n    if test $lt_ac_count -gt $lt_ac_max; then\n      lt_ac_max=$lt_ac_count\n      lt_cv_path_SED=$lt_ac_sed\n    fi\n  done\ndone\n])\nSED=$lt_cv_path_SED\nAC_SUBST([SED])\nAC_MSG_RESULT([$SED])\n])#AC_PROG_SED\n])#m4_ifndef\n\n# Old name:\nAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])\ndnl aclocal-1.4 backwards compatibility:\ndnl AC_DEFUN([LT_AC_PROG_SED], [])\n\n\n# _LT_CHECK_SHELL_FEATURES\n# ------------------------\n# Find out whether the shell is Bourne or XSI compatible,\n# or has some other useful features.\nm4_defun([_LT_CHECK_SHELL_FEATURES],\n[AC_MSG_CHECKING([whether the shell understands some XSI constructs])\n# Try some XSI features\nxsi_shell=no\n( _lt_dummy=\"a/b/c\"\n  test \"${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}\"${_lt_dummy%\"$_lt_dummy\"}, \\\n      = c,a/b,b/c, \\\n    && eval 'test $(( 1 + 1 )) -eq 2 \\\n    && test \"${#_lt_dummy}\" -eq 5' ) >/dev/null 2>&1 \\\n  && xsi_shell=yes\nAC_MSG_RESULT([$xsi_shell])\n_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])\n\nAC_MSG_CHECKING([whether the shell understands \"+=\"])\nlt_shell_append=no\n( foo=bar; set foo baz; eval \"$[1]+=\\$[2]\" && test \"$foo\" = barbaz ) \\\n    >/dev/null 2>&1 \\\n  && lt_shell_append=yes\nAC_MSG_RESULT([$lt_shell_append])\n_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])\n\nif ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then\n  lt_unset=unset\nelse\n  lt_unset=false\nfi\n_LT_DECL([], [lt_unset], [0], [whether the shell understands \"unset\"])dnl\n\n# test EBCDIC or ASCII\ncase `echo X|tr X '\\101'` in\n A) # ASCII based system\n    # \\n is not interpreted correctly by Solaris 8 /usr/ucb/tr\n  lt_SP2NL='tr \\040 \\012'\n  lt_NL2SP='tr \\015\\012 \\040\\040'\n  ;;\n *) # EBCDIC based system\n  lt_SP2NL='tr \\100 \\n'\n  lt_NL2SP='tr \\r\\n \\100\\100'\n  ;;\nesac\n_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl\n_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl\n])# _LT_CHECK_SHELL_FEATURES\n\n\n# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY)\n# ------------------------------------------------------\n# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and\n# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY.\nm4_defun([_LT_PROG_FUNCTION_REPLACE],\n[dnl {\nsed -e '/^$1 ()$/,/^} # $1 /c\\\n$1 ()\\\n{\\\nm4_bpatsubsts([$2], [$], [\\\\], [^\\([\t ]\\)], [\\\\\\1])\n} # Extended-shell $1 implementation' \"$cfgfile\" > $cfgfile.tmp \\\n  && mv -f \"$cfgfile.tmp\" \"$cfgfile\" \\\n    || (rm -f \"$cfgfile\" && cp \"$cfgfile.tmp\" \"$cfgfile\" && rm -f \"$cfgfile.tmp\")\ntest 0 -eq $? || _lt_function_replace_fail=:\n])\n\n\n# _LT_PROG_REPLACE_SHELLFNS\n# -------------------------\n# Replace existing portable implementations of several shell functions with\n# equivalent extended shell implementations where those features are available..\nm4_defun([_LT_PROG_REPLACE_SHELLFNS],\n[if test x\"$xsi_shell\" = xyes; then\n  _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl\n    case ${1} in\n      */*) func_dirname_result=\"${1%/*}${2}\" ;;\n      *  ) func_dirname_result=\"${3}\" ;;\n    esac])\n\n  _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl\n    func_basename_result=\"${1##*/}\"])\n\n  _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl\n    case ${1} in\n      */*) func_dirname_result=\"${1%/*}${2}\" ;;\n      *  ) func_dirname_result=\"${3}\" ;;\n    esac\n    func_basename_result=\"${1##*/}\"])\n\n  _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl\n    # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\n    # positional parameters, so assign one to ordinary parameter first.\n    func_stripname_result=${3}\n    func_stripname_result=${func_stripname_result#\"${1}\"}\n    func_stripname_result=${func_stripname_result%\"${2}\"}])\n\n  _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl\n    func_split_long_opt_name=${1%%=*}\n    func_split_long_opt_arg=${1#*=}])\n\n  _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl\n    func_split_short_opt_arg=${1#??}\n    func_split_short_opt_name=${1%\"$func_split_short_opt_arg\"}])\n\n  _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl\n    case ${1} in\n      *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\n      *)    func_lo2o_result=${1} ;;\n    esac])\n\n  _LT_PROG_FUNCTION_REPLACE([func_xform], [    func_xform_result=${1%.*}.lo])\n\n  _LT_PROG_FUNCTION_REPLACE([func_arith], [    func_arith_result=$(( $[*] ))])\n\n  _LT_PROG_FUNCTION_REPLACE([func_len], [    func_len_result=${#1}])\nfi\n\nif test x\"$lt_shell_append\" = xyes; then\n  _LT_PROG_FUNCTION_REPLACE([func_append], [    eval \"${1}+=\\\\${2}\"])\n\n  _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl\n    func_quote_for_eval \"${2}\"\ndnl m4 expansion turns \\\\\\\\ into \\\\, and then the shell eval turns that into \\\n    eval \"${1}+=\\\\\\\\ \\\\$func_quote_for_eval_result\"])\n\n  # Save a `func_append' function call where possible by direct use of '+='\n  sed -e 's%func_append \\([[a-zA-Z_]]\\{1,\\}\\) \"%\\1+=\"%g' $cfgfile > $cfgfile.tmp \\\n    && mv -f \"$cfgfile.tmp\" \"$cfgfile\" \\\n      || (rm -f \"$cfgfile\" && cp \"$cfgfile.tmp\" \"$cfgfile\" && rm -f \"$cfgfile.tmp\")\n  test 0 -eq $? || _lt_function_replace_fail=:\nelse\n  # Save a `func_append' function call even when '+=' is not available\n  sed -e 's%func_append \\([[a-zA-Z_]]\\{1,\\}\\) \"%\\1=\"$\\1%g' $cfgfile > $cfgfile.tmp \\\n    && mv -f \"$cfgfile.tmp\" \"$cfgfile\" \\\n      || (rm -f \"$cfgfile\" && cp \"$cfgfile.tmp\" \"$cfgfile\" && rm -f \"$cfgfile.tmp\")\n  test 0 -eq $? || _lt_function_replace_fail=:\nfi\n\nif test x\"$_lt_function_replace_fail\" = x\":\"; then\n  AC_MSG_WARN([Unable to substitute extended shell functions in $ofile])\nfi\n])\n\n# _LT_PATH_CONVERSION_FUNCTIONS\n# -----------------------------\n# Determine which file name conversion functions should be used by\n# func_to_host_file (and, implicitly, by func_to_host_path).  These are needed\n# for certain cross-compile configurations and native mingw.\nm4_defun([_LT_PATH_CONVERSION_FUNCTIONS],\n[AC_REQUIRE([AC_CANONICAL_HOST])dnl\nAC_REQUIRE([AC_CANONICAL_BUILD])dnl\nAC_MSG_CHECKING([how to convert $build file names to $host format])\nAC_CACHE_VAL(lt_cv_to_host_file_cmd,\n[case $host in\n  *-*-mingw* )\n    case $build in\n      *-*-mingw* ) # actually msys\n        lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32\n        ;;\n      *-*-cygwin* )\n        lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32\n        ;;\n      * ) # otherwise, assume *nix\n        lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32\n        ;;\n    esac\n    ;;\n  *-*-cygwin* )\n    case $build in\n      *-*-mingw* ) # actually msys\n        lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin\n        ;;\n      *-*-cygwin* )\n        lt_cv_to_host_file_cmd=func_convert_file_noop\n        ;;\n      * ) # otherwise, assume *nix\n        lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin\n        ;;\n    esac\n    ;;\n  * ) # unhandled hosts (and \"normal\" native builds)\n    lt_cv_to_host_file_cmd=func_convert_file_noop\n    ;;\nesac\n])\nto_host_file_cmd=$lt_cv_to_host_file_cmd\nAC_MSG_RESULT([$lt_cv_to_host_file_cmd])\n_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],\n         [0], [convert $build file names to $host format])dnl\n\nAC_MSG_CHECKING([how to convert $build file names to toolchain format])\nAC_CACHE_VAL(lt_cv_to_tool_file_cmd,\n[#assume ordinary cross tools, or native build.\nlt_cv_to_tool_file_cmd=func_convert_file_noop\ncase $host in\n  *-*-mingw* )\n    case $build in\n      *-*-mingw* ) # actually msys\n        lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32\n        ;;\n    esac\n    ;;\nesac\n])\nto_tool_file_cmd=$lt_cv_to_tool_file_cmd\nAC_MSG_RESULT([$lt_cv_to_tool_file_cmd])\n_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],\n         [0], [convert $build files to toolchain format])dnl\n])# _LT_PATH_CONVERSION_FUNCTIONS\n\n# Helper functions for option handling.                    -*- Autoconf -*-\n#\n#   Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation,\n#   Inc.\n#   Written by Gary V. Vaughan, 2004\n#\n# This file is free software; the Free Software Foundation gives\n# unlimited permission to copy and/or distribute it, with or without\n# modifications, as long as this notice is preserved.\n\n# serial 7 ltoptions.m4\n\n# This is to help aclocal find these macros, as it can't see m4_define.\nAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])\n\n\n# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)\n# ------------------------------------------\nm4_define([_LT_MANGLE_OPTION],\n[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])\n\n\n# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)\n# ---------------------------------------\n# Set option OPTION-NAME for macro MACRO-NAME, and if there is a\n# matching handler defined, dispatch to it.  Other OPTION-NAMEs are\n# saved as a flag.\nm4_define([_LT_SET_OPTION],\n[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl\nm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),\n        _LT_MANGLE_DEFUN([$1], [$2]),\n    [m4_warning([Unknown $1 option `$2'])])[]dnl\n])\n\n\n# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])\n# ------------------------------------------------------------\n# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.\nm4_define([_LT_IF_OPTION],\n[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])\n\n\n# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)\n# -------------------------------------------------------\n# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME\n# are set.\nm4_define([_LT_UNLESS_OPTIONS],\n[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),\n\t    [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),\n\t\t      [m4_define([$0_found])])])[]dnl\nm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3\n])[]dnl\n])\n\n\n# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)\n# ----------------------------------------\n# OPTION-LIST is a space-separated list of Libtool options associated\n# with MACRO-NAME.  If any OPTION has a matching handler declared with\n# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about\n# the unknown option and exit.\nm4_defun([_LT_SET_OPTIONS],\n[# Set options\nm4_foreach([_LT_Option], m4_split(m4_normalize([$2])),\n    [_LT_SET_OPTION([$1], _LT_Option)])\n\nm4_if([$1],[LT_INIT],[\n  dnl\n  dnl Simply set some default values (i.e off) if boolean options were not\n  dnl specified:\n  _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no\n  ])\n  _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no\n  ])\n  dnl\n  dnl If no reference was made to various pairs of opposing options, then\n  dnl we run the default mode handler for the pair.  For example, if neither\n  dnl `shared' nor `disable-shared' was passed, we enable building of shared\n  dnl archives by default:\n  _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])\n  _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])\n  _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])\n  _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],\n  \t\t   [_LT_ENABLE_FAST_INSTALL])\n  ])\n])# _LT_SET_OPTIONS\n\n\n\n# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)\n# -----------------------------------------\nm4_define([_LT_MANGLE_DEFUN],\n[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])\n\n\n# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)\n# -----------------------------------------------\nm4_define([LT_OPTION_DEFINE],\n[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl\n])# LT_OPTION_DEFINE\n\n\n# dlopen\n# ------\nLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes\n])\n\nAU_DEFUN([AC_LIBTOOL_DLOPEN],\n[_LT_SET_OPTION([LT_INIT], [dlopen])\nAC_DIAGNOSE([obsolete],\n[$0: Remove this warning and the call to _LT_SET_OPTION when you\nput the `dlopen' option into LT_INIT's first parameter.])\n])\n\ndnl aclocal-1.4 backwards compatibility:\ndnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])\n\n\n# win32-dll\n# ---------\n# Declare package support for building win32 dll's.\nLT_OPTION_DEFINE([LT_INIT], [win32-dll],\n[enable_win32_dll=yes\n\ncase $host in\n*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)\n  AC_CHECK_TOOL(AS, as, false)\n  AC_CHECK_TOOL(DLLTOOL, dlltool, false)\n  AC_CHECK_TOOL(OBJDUMP, objdump, false)\n  ;;\nesac\n\ntest -z \"$AS\" && AS=as\n_LT_DECL([], [AS],      [1], [Assembler program])dnl\n\ntest -z \"$DLLTOOL\" && DLLTOOL=dlltool\n_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl\n\ntest -z \"$OBJDUMP\" && OBJDUMP=objdump\n_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl\n])# win32-dll\n\nAU_DEFUN([AC_LIBTOOL_WIN32_DLL],\n[AC_REQUIRE([AC_CANONICAL_HOST])dnl\n_LT_SET_OPTION([LT_INIT], [win32-dll])\nAC_DIAGNOSE([obsolete],\n[$0: Remove this warning and the call to _LT_SET_OPTION when you\nput the `win32-dll' option into LT_INIT's first parameter.])\n])\n\ndnl aclocal-1.4 backwards compatibility:\ndnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])\n\n\n# _LT_ENABLE_SHARED([DEFAULT])\n# ----------------------------\n# implement the --enable-shared flag, and supports the `shared' and\n# `disable-shared' LT_INIT options.\n# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.\nm4_define([_LT_ENABLE_SHARED],\n[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl\nAC_ARG_ENABLE([shared],\n    [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],\n\t[build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],\n    [p=${PACKAGE-default}\n    case $enableval in\n    yes) enable_shared=yes ;;\n    no) enable_shared=no ;;\n    *)\n      enable_shared=no\n      # Look at the argument we got.  We use all the common list separators.\n      lt_save_ifs=\"$IFS\"; IFS=\"${IFS}$PATH_SEPARATOR,\"\n      for pkg in $enableval; do\n\tIFS=\"$lt_save_ifs\"\n\tif test \"X$pkg\" = \"X$p\"; then\n\t  enable_shared=yes\n\tfi\n      done\n      IFS=\"$lt_save_ifs\"\n      ;;\n    esac],\n    [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)\n\n    _LT_DECL([build_libtool_libs], [enable_shared], [0],\n\t[Whether or not to build shared libraries])\n])# _LT_ENABLE_SHARED\n\nLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])\nLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])\n\n# Old names:\nAC_DEFUN([AC_ENABLE_SHARED],\n[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])\n])\n\nAC_DEFUN([AC_DISABLE_SHARED],\n[_LT_SET_OPTION([LT_INIT], [disable-shared])\n])\n\nAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])\nAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])\n\ndnl aclocal-1.4 backwards compatibility:\ndnl AC_DEFUN([AM_ENABLE_SHARED], [])\ndnl AC_DEFUN([AM_DISABLE_SHARED], [])\n\n\n\n# _LT_ENABLE_STATIC([DEFAULT])\n# ----------------------------\n# implement the --enable-static flag, and support the `static' and\n# `disable-static' LT_INIT options.\n# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.\nm4_define([_LT_ENABLE_STATIC],\n[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl\nAC_ARG_ENABLE([static],\n    [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],\n\t[build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],\n    [p=${PACKAGE-default}\n    case $enableval in\n    yes) enable_static=yes ;;\n    no) enable_static=no ;;\n    *)\n     enable_static=no\n      # Look at the argument we got.  We use all the common list separators.\n      lt_save_ifs=\"$IFS\"; IFS=\"${IFS}$PATH_SEPARATOR,\"\n      for pkg in $enableval; do\n\tIFS=\"$lt_save_ifs\"\n\tif test \"X$pkg\" = \"X$p\"; then\n\t  enable_static=yes\n\tfi\n      done\n      IFS=\"$lt_save_ifs\"\n      ;;\n    esac],\n    [enable_static=]_LT_ENABLE_STATIC_DEFAULT)\n\n    _LT_DECL([build_old_libs], [enable_static], [0],\n\t[Whether or not to build static libraries])\n])# _LT_ENABLE_STATIC\n\nLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])\nLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])\n\n# Old names:\nAC_DEFUN([AC_ENABLE_STATIC],\n[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])\n])\n\nAC_DEFUN([AC_DISABLE_STATIC],\n[_LT_SET_OPTION([LT_INIT], [disable-static])\n])\n\nAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])\nAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])\n\ndnl aclocal-1.4 backwards compatibility:\ndnl AC_DEFUN([AM_ENABLE_STATIC], [])\ndnl AC_DEFUN([AM_DISABLE_STATIC], [])\n\n\n\n# _LT_ENABLE_FAST_INSTALL([DEFAULT])\n# ----------------------------------\n# implement the --enable-fast-install flag, and support the `fast-install'\n# and `disable-fast-install' LT_INIT options.\n# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.\nm4_define([_LT_ENABLE_FAST_INSTALL],\n[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl\nAC_ARG_ENABLE([fast-install],\n    [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],\n    [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],\n    [p=${PACKAGE-default}\n    case $enableval in\n    yes) enable_fast_install=yes ;;\n    no) enable_fast_install=no ;;\n    *)\n      enable_fast_install=no\n      # Look at the argument we got.  We use all the common list separators.\n      lt_save_ifs=\"$IFS\"; IFS=\"${IFS}$PATH_SEPARATOR,\"\n      for pkg in $enableval; do\n\tIFS=\"$lt_save_ifs\"\n\tif test \"X$pkg\" = \"X$p\"; then\n\t  enable_fast_install=yes\n\tfi\n      done\n      IFS=\"$lt_save_ifs\"\n      ;;\n    esac],\n    [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)\n\n_LT_DECL([fast_install], [enable_fast_install], [0],\n\t [Whether or not to optimize for fast installation])dnl\n])# _LT_ENABLE_FAST_INSTALL\n\nLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])\nLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])\n\n# Old names:\nAU_DEFUN([AC_ENABLE_FAST_INSTALL],\n[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])\nAC_DIAGNOSE([obsolete],\n[$0: Remove this warning and the call to _LT_SET_OPTION when you put\nthe `fast-install' option into LT_INIT's first parameter.])\n])\n\nAU_DEFUN([AC_DISABLE_FAST_INSTALL],\n[_LT_SET_OPTION([LT_INIT], [disable-fast-install])\nAC_DIAGNOSE([obsolete],\n[$0: Remove this warning and the call to _LT_SET_OPTION when you put\nthe `disable-fast-install' option into LT_INIT's first parameter.])\n])\n\ndnl aclocal-1.4 backwards compatibility:\ndnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])\ndnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])\n\n\n# _LT_WITH_PIC([MODE])\n# --------------------\n# implement the --with-pic flag, and support the `pic-only' and `no-pic'\n# LT_INIT options.\n# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.\nm4_define([_LT_WITH_PIC],\n[AC_ARG_WITH([pic],\n    [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],\n\t[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],\n    [lt_p=${PACKAGE-default}\n    case $withval in\n    yes|no) pic_mode=$withval ;;\n    *)\n      pic_mode=default\n      # Look at the argument we got.  We use all the common list separators.\n      lt_save_ifs=\"$IFS\"; IFS=\"${IFS}$PATH_SEPARATOR,\"\n      for lt_pkg in $withval; do\n\tIFS=\"$lt_save_ifs\"\n\tif test \"X$lt_pkg\" = \"X$lt_p\"; then\n\t  pic_mode=yes\n\tfi\n      done\n      IFS=\"$lt_save_ifs\"\n      ;;\n    esac],\n    [pic_mode=default])\n\ntest -z \"$pic_mode\" && pic_mode=m4_default([$1], [default])\n\n_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl\n])# _LT_WITH_PIC\n\nLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])\nLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])\n\n# Old name:\nAU_DEFUN([AC_LIBTOOL_PICMODE],\n[_LT_SET_OPTION([LT_INIT], [pic-only])\nAC_DIAGNOSE([obsolete],\n[$0: Remove this warning and the call to _LT_SET_OPTION when you\nput the `pic-only' option into LT_INIT's first parameter.])\n])\n\ndnl aclocal-1.4 backwards compatibility:\ndnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])\n\n\nm4_define([_LTDL_MODE], [])\nLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],\n\t\t [m4_define([_LTDL_MODE], [nonrecursive])])\nLT_OPTION_DEFINE([LTDL_INIT], [recursive],\n\t\t [m4_define([_LTDL_MODE], [recursive])])\nLT_OPTION_DEFINE([LTDL_INIT], [subproject],\n\t\t [m4_define([_LTDL_MODE], [subproject])])\n\nm4_define([_LTDL_TYPE], [])\nLT_OPTION_DEFINE([LTDL_INIT], [installable],\n\t\t [m4_define([_LTDL_TYPE], [installable])])\nLT_OPTION_DEFINE([LTDL_INIT], [convenience],\n\t\t [m4_define([_LTDL_TYPE], [convenience])])\n\n# ltsugar.m4 -- libtool m4 base layer.                         -*-Autoconf-*-\n#\n# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.\n# Written by Gary V. Vaughan, 2004\n#\n# This file is free software; the Free Software Foundation gives\n# unlimited permission to copy and/or distribute it, with or without\n# modifications, as long as this notice is preserved.\n\n# serial 6 ltsugar.m4\n\n# This is to help aclocal find these macros, as it can't see m4_define.\nAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])\n\n\n# lt_join(SEP, ARG1, [ARG2...])\n# -----------------------------\n# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their\n# associated separator.\n# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier\n# versions in m4sugar had bugs.\nm4_define([lt_join],\n[m4_if([$#], [1], [],\n       [$#], [2], [[$2]],\n       [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])\nm4_define([_lt_join],\n[m4_if([$#$2], [2], [],\n       [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])\n\n\n# lt_car(LIST)\n# lt_cdr(LIST)\n# ------------\n# Manipulate m4 lists.\n# These macros are necessary as long as will still need to support\n# Autoconf-2.59 which quotes differently.\nm4_define([lt_car], [[$1]])\nm4_define([lt_cdr],\n[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],\n       [$#], 1, [],\n       [m4_dquote(m4_shift($@))])])\nm4_define([lt_unquote], $1)\n\n\n# lt_append(MACRO-NAME, STRING, [SEPARATOR])\n# ------------------------------------------\n# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.\n# Note that neither SEPARATOR nor STRING are expanded; they are appended\n# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).\n# No SEPARATOR is output if MACRO-NAME was previously undefined (different\n# than defined and empty).\n#\n# This macro is needed until we can rely on Autoconf 2.62, since earlier\n# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.\nm4_define([lt_append],\n[m4_define([$1],\n\t   m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])\n\n\n\n# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])\n# ----------------------------------------------------------\n# Produce a SEP delimited list of all paired combinations of elements of\n# PREFIX-LIST with SUFFIX1 through SUFFIXn.  Each element of the list\n# has the form PREFIXmINFIXSUFFIXn.\n# Needed until we can rely on m4_combine added in Autoconf 2.62.\nm4_define([lt_combine],\n[m4_if(m4_eval([$# > 3]), [1],\n       [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl\n[[m4_foreach([_Lt_prefix], [$2],\n\t     [m4_foreach([_Lt_suffix],\n\t\t]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,\n\t[_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])\n\n\n# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])\n# -----------------------------------------------------------------------\n# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited\n# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.\nm4_define([lt_if_append_uniq],\n[m4_ifdef([$1],\n\t  [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],\n\t\t [lt_append([$1], [$2], [$3])$4],\n\t\t [$5])],\n\t  [lt_append([$1], [$2], [$3])$4])])\n\n\n# lt_dict_add(DICT, KEY, VALUE)\n# -----------------------------\nm4_define([lt_dict_add],\n[m4_define([$1($2)], [$3])])\n\n\n# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)\n# --------------------------------------------\nm4_define([lt_dict_add_subkey],\n[m4_define([$1($2:$3)], [$4])])\n\n\n# lt_dict_fetch(DICT, KEY, [SUBKEY])\n# ----------------------------------\nm4_define([lt_dict_fetch],\n[m4_ifval([$3],\n\tm4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),\n    m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])\n\n\n# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])\n# -----------------------------------------------------------------\nm4_define([lt_if_dict_fetch],\n[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],\n\t[$5],\n    [$6])])\n\n\n# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])\n# --------------------------------------------------------------\nm4_define([lt_dict_filter],\n[m4_if([$5], [], [],\n  [lt_join(m4_quote(m4_default([$4], [[, ]])),\n           lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),\n\t\t      [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl\n])\n\n# ltversion.m4 -- version numbers\t\t\t-*- Autoconf -*-\n#\n#   Copyright (C) 2004 Free Software Foundation, Inc.\n#   Written by Scott James Remnant, 2004\n#\n# This file is free software; the Free Software Foundation gives\n# unlimited permission to copy and/or distribute it, with or without\n# modifications, as long as this notice is preserved.\n\n# @configure_input@\n\n# serial 3337 ltversion.m4\n# This file is part of GNU Libtool\n\nm4_define([LT_PACKAGE_VERSION], [2.4.2])\nm4_define([LT_PACKAGE_REVISION], [1.3337])\n\nAC_DEFUN([LTVERSION_VERSION],\n[macro_version='2.4.2'\nmacro_revision='1.3337'\n_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])\n_LT_DECL(, macro_revision, 0)\n])\n\n# lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-\n#\n#   Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.\n#   Written by Scott James Remnant, 2004.\n#\n# This file is free software; the Free Software Foundation gives\n# unlimited permission to copy and/or distribute it, with or without\n# modifications, as long as this notice is preserved.\n\n# serial 5 lt~obsolete.m4\n\n# These exist entirely to fool aclocal when bootstrapping libtool.\n#\n# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)\n# which have later been changed to m4_define as they aren't part of the\n# exported API, or moved to Autoconf or Automake where they belong.\n#\n# The trouble is, aclocal is a bit thick.  It'll see the old AC_DEFUN\n# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us\n# using a macro with the same name in our local m4/libtool.m4 it'll\n# pull the old libtool.m4 in (it doesn't see our shiny new m4_define\n# and doesn't know about Autoconf macros at all.)\n#\n# So we provide this file, which has a silly filename so it's always\n# included after everything else.  This provides aclocal with the\n# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything\n# because those macros already exist, or will be overwritten later.\n# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. \n#\n# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.\n# Yes, that means every name once taken will need to remain here until\n# we give up compatibility with versions before 1.7, at which point\n# we need to keep only those names which we still refer to.\n\n# This is to help aclocal find these macros, as it can't see m4_define.\nAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])\n\nm4_ifndef([AC_LIBTOOL_LINKER_OPTION],\t[AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])\nm4_ifndef([AC_PROG_EGREP],\t\t[AC_DEFUN([AC_PROG_EGREP])])\nm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH],\t[AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])\nm4_ifndef([_LT_AC_SHELL_INIT],\t\t[AC_DEFUN([_LT_AC_SHELL_INIT])])\nm4_ifndef([_LT_AC_SYS_LIBPATH_AIX],\t[AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])\nm4_ifndef([_LT_PROG_LTMAIN],\t\t[AC_DEFUN([_LT_PROG_LTMAIN])])\nm4_ifndef([_LT_AC_TAGVAR],\t\t[AC_DEFUN([_LT_AC_TAGVAR])])\nm4_ifndef([AC_LTDL_ENABLE_INSTALL],\t[AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])\nm4_ifndef([AC_LTDL_PREOPEN],\t\t[AC_DEFUN([AC_LTDL_PREOPEN])])\nm4_ifndef([_LT_AC_SYS_COMPILER],\t[AC_DEFUN([_LT_AC_SYS_COMPILER])])\nm4_ifndef([_LT_AC_LOCK],\t\t[AC_DEFUN([_LT_AC_LOCK])])\nm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE],\t[AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])\nm4_ifndef([_LT_AC_TRY_DLOPEN_SELF],\t[AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])\nm4_ifndef([AC_LIBTOOL_PROG_CC_C_O],\t[AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])\nm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])\nm4_ifndef([AC_LIBTOOL_OBJDIR],\t\t[AC_DEFUN([AC_LIBTOOL_OBJDIR])])\nm4_ifndef([AC_LTDL_OBJDIR],\t\t[AC_DEFUN([AC_LTDL_OBJDIR])])\nm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])\nm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP],\t[AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])\nm4_ifndef([AC_PATH_MAGIC],\t\t[AC_DEFUN([AC_PATH_MAGIC])])\nm4_ifndef([AC_PROG_LD_GNU],\t\t[AC_DEFUN([AC_PROG_LD_GNU])])\nm4_ifndef([AC_PROG_LD_RELOAD_FLAG],\t[AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])\nm4_ifndef([AC_DEPLIBS_CHECK_METHOD],\t[AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])\nm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])\nm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])\nm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])\nm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS],\t[AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])\nm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP],\t[AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])\nm4_ifndef([LT_AC_PROG_EGREP],\t\t[AC_DEFUN([LT_AC_PROG_EGREP])])\nm4_ifndef([LT_AC_PROG_SED],\t\t[AC_DEFUN([LT_AC_PROG_SED])])\nm4_ifndef([_LT_CC_BASENAME],\t\t[AC_DEFUN([_LT_CC_BASENAME])])\nm4_ifndef([_LT_COMPILER_BOILERPLATE],\t[AC_DEFUN([_LT_COMPILER_BOILERPLATE])])\nm4_ifndef([_LT_LINKER_BOILERPLATE],\t[AC_DEFUN([_LT_LINKER_BOILERPLATE])])\nm4_ifndef([_AC_PROG_LIBTOOL],\t\t[AC_DEFUN([_AC_PROG_LIBTOOL])])\nm4_ifndef([AC_LIBTOOL_SETUP],\t\t[AC_DEFUN([AC_LIBTOOL_SETUP])])\nm4_ifndef([_LT_AC_CHECK_DLFCN],\t\t[AC_DEFUN([_LT_AC_CHECK_DLFCN])])\nm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER],\t[AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])\nm4_ifndef([_LT_AC_TAGCONFIG],\t\t[AC_DEFUN([_LT_AC_TAGCONFIG])])\nm4_ifndef([AC_DISABLE_FAST_INSTALL],\t[AC_DEFUN([AC_DISABLE_FAST_INSTALL])])\nm4_ifndef([_LT_AC_LANG_CXX],\t\t[AC_DEFUN([_LT_AC_LANG_CXX])])\nm4_ifndef([_LT_AC_LANG_F77],\t\t[AC_DEFUN([_LT_AC_LANG_F77])])\nm4_ifndef([_LT_AC_LANG_GCJ],\t\t[AC_DEFUN([_LT_AC_LANG_GCJ])])\nm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG],\t[AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])\nm4_ifndef([_LT_AC_LANG_C_CONFIG],\t[AC_DEFUN([_LT_AC_LANG_C_CONFIG])])\nm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG],\t[AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])\nm4_ifndef([_LT_AC_LANG_CXX_CONFIG],\t[AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])\nm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG],\t[AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])\nm4_ifndef([_LT_AC_LANG_F77_CONFIG],\t[AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])\nm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG],\t[AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])\nm4_ifndef([_LT_AC_LANG_GCJ_CONFIG],\t[AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])\nm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG],\t[AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])\nm4_ifndef([_LT_AC_LANG_RC_CONFIG],\t[AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])\nm4_ifndef([AC_LIBTOOL_CONFIG],\t\t[AC_DEFUN([AC_LIBTOOL_CONFIG])])\nm4_ifndef([_LT_AC_FILE_LTDLL_C],\t[AC_DEFUN([_LT_AC_FILE_LTDLL_C])])\nm4_ifndef([_LT_REQUIRED_DARWIN_CHECKS],\t[AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])\nm4_ifndef([_LT_AC_PROG_CXXCPP],\t\t[AC_DEFUN([_LT_AC_PROG_CXXCPP])])\nm4_ifndef([_LT_PREPARE_SED_QUOTE_VARS],\t[AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])\nm4_ifndef([_LT_PROG_ECHO_BACKSLASH],\t[AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])\nm4_ifndef([_LT_PROG_F77],\t\t[AC_DEFUN([_LT_PROG_F77])])\nm4_ifndef([_LT_PROG_FC],\t\t[AC_DEFUN([_LT_PROG_FC])])\nm4_ifndef([_LT_PROG_CXX],\t\t[AC_DEFUN([_LT_PROG_CXX])])\n\n# Copyright (C) 2002-2013 Free Software Foundation, Inc.\n#\n# This file is free software; the Free Software Foundation\n# gives unlimited permission to copy and/or distribute it,\n# with or without modifications, as long as this notice is preserved.\n\n# AM_AUTOMAKE_VERSION(VERSION)\n# ----------------------------\n# Automake X.Y traces this macro to ensure aclocal.m4 has been\n# generated from the m4 files accompanying Automake X.Y.\n# (This private macro should not be called outside this file.)\nAC_DEFUN([AM_AUTOMAKE_VERSION],\n[am__api_version='1.14'\ndnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to\ndnl require some minimum version.  Point them to the right macro.\nm4_if([$1], [1.14.1], [],\n      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl\n])\n\n# _AM_AUTOCONF_VERSION(VERSION)\n# -----------------------------\n# aclocal traces this macro to find the Autoconf version.\n# This is a private macro too.  Using m4_define simplifies\n# the logic in aclocal, which can simply ignore this definition.\nm4_define([_AM_AUTOCONF_VERSION], [])\n\n# AM_SET_CURRENT_AUTOMAKE_VERSION\n# -------------------------------\n# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.\n# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.\nAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],\n[AM_AUTOMAKE_VERSION([1.14.1])dnl\nm4_ifndef([AC_AUTOCONF_VERSION],\n  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl\n_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])\n\n# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-\n\n# Copyright (C) 2001-2013 Free Software Foundation, Inc.\n#\n# This file is free software; the Free Software Foundation\n# gives unlimited permission to copy and/or distribute it,\n# with or without modifications, as long as this notice is preserved.\n\n# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets\n# $ac_aux_dir to '$srcdir/foo'.  In other projects, it is set to\n# '$srcdir', '$srcdir/..', or '$srcdir/../..'.\n#\n# Of course, Automake must honor this variable whenever it calls a\n# tool from the auxiliary directory.  The problem is that $srcdir (and\n# therefore $ac_aux_dir as well) can be either absolute or relative,\n# depending on how configure is run.  This is pretty annoying, since\n# it makes $ac_aux_dir quite unusable in subdirectories: in the top\n# source directory, any form will work fine, but in subdirectories a\n# relative path needs to be adjusted first.\n#\n# $ac_aux_dir/missing\n#    fails when called from a subdirectory if $ac_aux_dir is relative\n# $top_srcdir/$ac_aux_dir/missing\n#    fails if $ac_aux_dir is absolute,\n#    fails when called from a subdirectory in a VPATH build with\n#          a relative $ac_aux_dir\n#\n# The reason of the latter failure is that $top_srcdir and $ac_aux_dir\n# are both prefixed by $srcdir.  In an in-source build this is usually\n# harmless because $srcdir is '.', but things will broke when you\n# start a VPATH build or use an absolute $srcdir.\n#\n# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,\n# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:\n#   am_aux_dir='\\$(top_srcdir)/'`expr \"$ac_aux_dir\" : \"$srcdir//*\\(.*\\)\"`\n# and then we would define $MISSING as\n#   MISSING=\"\\${SHELL} $am_aux_dir/missing\"\n# This will work as long as MISSING is not called from configure, because\n# unfortunately $(top_srcdir) has no meaning in configure.\n# However there are other variables, like CC, which are often used in\n# configure, and could therefore not use this \"fixed\" $ac_aux_dir.\n#\n# Another solution, used here, is to always expand $ac_aux_dir to an\n# absolute PATH.  The drawback is that using absolute paths prevent a\n# configured tree to be moved without reconfiguration.\n\nAC_DEFUN([AM_AUX_DIR_EXPAND],\n[dnl Rely on autoconf to set up CDPATH properly.\nAC_PREREQ([2.50])dnl\n# expand $ac_aux_dir to an absolute path\nam_aux_dir=`cd $ac_aux_dir && pwd`\n])\n\n# AM_CONDITIONAL                                            -*- Autoconf -*-\n\n# Copyright (C) 1997-2013 Free Software Foundation, Inc.\n#\n# This file is free software; the Free Software Foundation\n# gives unlimited permission to copy and/or distribute it,\n# with or without modifications, as long as this notice is preserved.\n\n# AM_CONDITIONAL(NAME, SHELL-CONDITION)\n# -------------------------------------\n# Define a conditional.\nAC_DEFUN([AM_CONDITIONAL],\n[AC_PREREQ([2.52])dnl\n m4_if([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],\n       [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl\nAC_SUBST([$1_TRUE])dnl\nAC_SUBST([$1_FALSE])dnl\n_AM_SUBST_NOTMAKE([$1_TRUE])dnl\n_AM_SUBST_NOTMAKE([$1_FALSE])dnl\nm4_define([_AM_COND_VALUE_$1], [$2])dnl\nif $2; then\n  $1_TRUE=\n  $1_FALSE='#'\nelse\n  $1_TRUE='#'\n  $1_FALSE=\nfi\nAC_CONFIG_COMMANDS_PRE(\n[if test -z \"${$1_TRUE}\" && test -z \"${$1_FALSE}\"; then\n  AC_MSG_ERROR([[conditional \"$1\" was never defined.\nUsually this means the macro was only invoked conditionally.]])\nfi])])\n\n# Copyright (C) 1999-2013 Free Software Foundation, Inc.\n#\n# This file is free software; the Free Software Foundation\n# gives unlimited permission to copy and/or distribute it,\n# with or without modifications, as long as this notice is preserved.\n\n\n# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be\n# written in clear, in which case automake, when reading aclocal.m4,\n# will think it sees a *use*, and therefore will trigger all it's\n# C support machinery.  Also note that it means that autoscan, seeing\n# CC etc. in the Makefile, will ask for an AC_PROG_CC use...\n\n\n# _AM_DEPENDENCIES(NAME)\n# ----------------------\n# See how the compiler implements dependency checking.\n# NAME is \"CC\", \"CXX\", \"OBJC\", \"OBJCXX\", \"UPC\", or \"GJC\".\n# We try a few techniques and use that to set a single cache variable.\n#\n# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was\n# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular\n# dependency, and given that the user is not expected to run this macro,\n# just rely on AC_PROG_CC.\nAC_DEFUN([_AM_DEPENDENCIES],\n[AC_REQUIRE([AM_SET_DEPDIR])dnl\nAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl\nAC_REQUIRE([AM_MAKE_INCLUDE])dnl\nAC_REQUIRE([AM_DEP_TRACK])dnl\n\nm4_if([$1], [CC],   [depcc=\"$CC\"   am_compiler_list=],\n      [$1], [CXX],  [depcc=\"$CXX\"  am_compiler_list=],\n      [$1], [OBJC], [depcc=\"$OBJC\" am_compiler_list='gcc3 gcc'],\n      [$1], [OBJCXX], [depcc=\"$OBJCXX\" am_compiler_list='gcc3 gcc'],\n      [$1], [UPC],  [depcc=\"$UPC\"  am_compiler_list=],\n      [$1], [GCJ],  [depcc=\"$GCJ\"  am_compiler_list='gcc3 gcc'],\n                    [depcc=\"$$1\"   am_compiler_list=])\n\nAC_CACHE_CHECK([dependency style of $depcc],\n               [am_cv_$1_dependencies_compiler_type],\n[if test -z \"$AMDEP_TRUE\" && test -f \"$am_depcomp\"; then\n  # We make a subdir and do the tests there.  Otherwise we can end up\n  # making bogus files that we don't know about and never remove.  For\n  # instance it was reported that on HP-UX the gcc test will end up\n  # making a dummy file named 'D' -- because '-MD' means \"put the output\n  # in D\".\n  rm -rf conftest.dir\n  mkdir conftest.dir\n  # Copy depcomp to subdir because otherwise we won't find it if we're\n  # using a relative directory.\n  cp \"$am_depcomp\" conftest.dir\n  cd conftest.dir\n  # We will build objects and dependencies in a subdirectory because\n  # it helps to detect inapplicable dependency modes.  For instance\n  # both Tru64's cc and ICC support -MD to output dependencies as a\n  # side effect of compilation, but ICC will put the dependencies in\n  # the current directory while Tru64 will put them in the object\n  # directory.\n  mkdir sub\n\n  am_cv_$1_dependencies_compiler_type=none\n  if test \"$am_compiler_list\" = \"\"; then\n     am_compiler_list=`sed -n ['s/^#*\\([a-zA-Z0-9]*\\))$/\\1/p'] < ./depcomp`\n  fi\n  am__universal=false\n  m4_case([$1], [CC],\n    [case \" $depcc \" in #(\n     *\\ -arch\\ *\\ -arch\\ *) am__universal=true ;;\n     esac],\n    [CXX],\n    [case \" $depcc \" in #(\n     *\\ -arch\\ *\\ -arch\\ *) am__universal=true ;;\n     esac])\n\n  for depmode in $am_compiler_list; do\n    # Setup a source with many dependencies, because some compilers\n    # like to wrap large dependency lists on column 80 (with \\), and\n    # we should not choose a depcomp mode which is confused by this.\n    #\n    # We need to recreate these files for each test, as the compiler may\n    # overwrite some of them when testing with obscure command lines.\n    # This happens at least with the AIX C compiler.\n    : > sub/conftest.c\n    for i in 1 2 3 4 5 6; do\n      echo '#include \"conftst'$i'.h\"' >> sub/conftest.c\n      # Using \": > sub/conftst$i.h\" creates only sub/conftst1.h with\n      # Solaris 10 /bin/sh.\n      echo '/* dummy */' > sub/conftst$i.h\n    done\n    echo \"${am__include} ${am__quote}sub/conftest.Po${am__quote}\" > confmf\n\n    # We check with '-c' and '-o' for the sake of the \"dashmstdout\"\n    # mode.  It turns out that the SunPro C++ compiler does not properly\n    # handle '-M -o', and we need to detect this.  Also, some Intel\n    # versions had trouble with output in subdirs.\n    am__obj=sub/conftest.${OBJEXT-o}\n    am__minus_obj=\"-o $am__obj\"\n    case $depmode in\n    gcc)\n      # This depmode causes a compiler race in universal mode.\n      test \"$am__universal\" = false || continue\n      ;;\n    nosideeffect)\n      # After this tag, mechanisms are not by side-effect, so they'll\n      # only be used when explicitly requested.\n      if test \"x$enable_dependency_tracking\" = xyes; then\n\tcontinue\n      else\n\tbreak\n      fi\n      ;;\n    msvc7 | msvc7msys | msvisualcpp | msvcmsys)\n      # This compiler won't grok '-c -o', but also, the minuso test has\n      # not run yet.  These depmodes are late enough in the game, and\n      # so weak that their functioning should not be impacted.\n      am__obj=conftest.${OBJEXT-o}\n      am__minus_obj=\n      ;;\n    none) break ;;\n    esac\n    if depmode=$depmode \\\n       source=sub/conftest.c object=$am__obj \\\n       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \\\n       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \\\n         >/dev/null 2>conftest.err &&\n       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&\n       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&\n       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&\n       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then\n      # icc doesn't choke on unknown options, it will just issue warnings\n      # or remarks (even with -Werror).  So we grep stderr for any message\n      # that says an option was ignored or not supported.\n      # When given -MP, icc 7.0 and 7.1 complain thusly:\n      #   icc: Command line warning: ignoring option '-M'; no argument required\n      # The diagnosis changed in icc 8.0:\n      #   icc: Command line remark: option '-MP' not supported\n      if (grep 'ignoring option' conftest.err ||\n          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else\n        am_cv_$1_dependencies_compiler_type=$depmode\n        break\n      fi\n    fi\n  done\n\n  cd ..\n  rm -rf conftest.dir\nelse\n  am_cv_$1_dependencies_compiler_type=none\nfi\n])\nAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])\nAM_CONDITIONAL([am__fastdep$1], [\n  test \"x$enable_dependency_tracking\" != xno \\\n  && test \"$am_cv_$1_dependencies_compiler_type\" = gcc3])\n])\n\n\n# AM_SET_DEPDIR\n# -------------\n# Choose a directory name for dependency files.\n# This macro is AC_REQUIREd in _AM_DEPENDENCIES.\nAC_DEFUN([AM_SET_DEPDIR],\n[AC_REQUIRE([AM_SET_LEADING_DOT])dnl\nAC_SUBST([DEPDIR], [\"${am__leading_dot}deps\"])dnl\n])\n\n\n# AM_DEP_TRACK\n# ------------\nAC_DEFUN([AM_DEP_TRACK],\n[AC_ARG_ENABLE([dependency-tracking], [dnl\nAS_HELP_STRING(\n  [--enable-dependency-tracking],\n  [do not reject slow dependency extractors])\nAS_HELP_STRING(\n  [--disable-dependency-tracking],\n  [speeds up one-time build])])\nif test \"x$enable_dependency_tracking\" != xno; then\n  am_depcomp=\"$ac_aux_dir/depcomp\"\n  AMDEPBACKSLASH='\\'\n  am__nodep='_no'\nfi\nAM_CONDITIONAL([AMDEP], [test \"x$enable_dependency_tracking\" != xno])\nAC_SUBST([AMDEPBACKSLASH])dnl\n_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl\nAC_SUBST([am__nodep])dnl\n_AM_SUBST_NOTMAKE([am__nodep])dnl\n])\n\n# Generate code to set up dependency tracking.              -*- Autoconf -*-\n\n# Copyright (C) 1999-2013 Free Software Foundation, Inc.\n#\n# This file is free software; the Free Software Foundation\n# gives unlimited permission to copy and/or distribute it,\n# with or without modifications, as long as this notice is preserved.\n\n\n# _AM_OUTPUT_DEPENDENCY_COMMANDS\n# ------------------------------\nAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],\n[{\n  # Older Autoconf quotes --file arguments for eval, but not when files\n  # are listed without --file.  Let's play safe and only enable the eval\n  # if we detect the quoting.\n  case $CONFIG_FILES in\n  *\\'*) eval set x \"$CONFIG_FILES\" ;;\n  *)   set x $CONFIG_FILES ;;\n  esac\n  shift\n  for mf\n  do\n    # Strip MF so we end up with the name of the file.\n    mf=`echo \"$mf\" | sed -e 's/:.*$//'`\n    # Check whether this is an Automake generated Makefile or not.\n    # We used to match only the files named 'Makefile.in', but\n    # some people rename them; so instead we look at the file content.\n    # Grep'ing the first line is not enough: some people post-process\n    # each Makefile.in and add a new line on top of each file to say so.\n    # Grep'ing the whole file is not good either: AIX grep has a line\n    # limit of 2048, but all sed's we know have understand at least 4000.\n    if sed -n 's,^#.*generated by automake.*,X,p' \"$mf\" | grep X >/dev/null 2>&1; then\n      dirpart=`AS_DIRNAME(\"$mf\")`\n    else\n      continue\n    fi\n    # Extract the definition of DEPDIR, am__include, and am__quote\n    # from the Makefile without running 'make'.\n    DEPDIR=`sed -n 's/^DEPDIR = //p' < \"$mf\"`\n    test -z \"$DEPDIR\" && continue\n    am__include=`sed -n 's/^am__include = //p' < \"$mf\"`\n    test -z \"$am__include\" && continue\n    am__quote=`sed -n 's/^am__quote = //p' < \"$mf\"`\n    # Find all dependency output files, they are included files with\n    # $(DEPDIR) in their names.  We invoke sed twice because it is the\n    # simplest approach to changing $(DEPDIR) to its actual value in the\n    # expansion.\n    for file in `sed -n \"\n      s/^$am__include $am__quote\\(.*(DEPDIR).*\\)$am__quote\"'$/\\1/p' <\"$mf\" | \\\n\t sed -e 's/\\$(DEPDIR)/'\"$DEPDIR\"'/g'`; do\n      # Make sure the directory exists.\n      test -f \"$dirpart/$file\" && continue\n      fdir=`AS_DIRNAME([\"$file\"])`\n      AS_MKDIR_P([$dirpart/$fdir])\n      # echo \"creating $dirpart/$file\"\n      echo '# dummy' > \"$dirpart/$file\"\n    done\n  done\n}\n])# _AM_OUTPUT_DEPENDENCY_COMMANDS\n\n\n# AM_OUTPUT_DEPENDENCY_COMMANDS\n# -----------------------------\n# This macro should only be invoked once -- use via AC_REQUIRE.\n#\n# This code is only required when automatic dependency tracking\n# is enabled.  FIXME.  This creates each '.P' file that we will\n# need in order to bootstrap the dependency handling code.\nAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],\n[AC_CONFIG_COMMANDS([depfiles],\n     [test x\"$AMDEP_TRUE\" != x\"\" || _AM_OUTPUT_DEPENDENCY_COMMANDS],\n     [AMDEP_TRUE=\"$AMDEP_TRUE\" ac_aux_dir=\"$ac_aux_dir\"])\n])\n\n# Do all the work for Automake.                             -*- Autoconf -*-\n\n# Copyright (C) 1996-2013 Free Software Foundation, Inc.\n#\n# This file is free software; the Free Software Foundation\n# gives unlimited permission to copy and/or distribute it,\n# with or without modifications, as long as this notice is preserved.\n\n# This macro actually does too much.  Some checks are only needed if\n# your package does certain things.  But this isn't really a big deal.\n\ndnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.\nm4_define([AC_PROG_CC],\nm4_defn([AC_PROG_CC])\n[_AM_PROG_CC_C_O\n])\n\n# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])\n# AM_INIT_AUTOMAKE([OPTIONS])\n# -----------------------------------------------\n# The call with PACKAGE and VERSION arguments is the old style\n# call (pre autoconf-2.50), which is being phased out.  PACKAGE\n# and VERSION should now be passed to AC_INIT and removed from\n# the call to AM_INIT_AUTOMAKE.\n# We support both call styles for the transition.  After\n# the next Automake release, Autoconf can make the AC_INIT\n# arguments mandatory, and then we can depend on a new Autoconf\n# release and drop the old call support.\nAC_DEFUN([AM_INIT_AUTOMAKE],\n[AC_PREREQ([2.65])dnl\ndnl Autoconf wants to disallow AM_ names.  We explicitly allow\ndnl the ones we care about.\nm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl\nAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl\nAC_REQUIRE([AC_PROG_INSTALL])dnl\nif test \"`cd $srcdir && pwd`\" != \"`pwd`\"; then\n  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output\n  # is not polluted with repeated \"-I.\"\n  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl\n  # test to see if srcdir already configured\n  if test -f $srcdir/config.status; then\n    AC_MSG_ERROR([source directory already configured; run \"make distclean\" there first])\n  fi\nfi\n\n# test whether we have cygpath\nif test -z \"$CYGPATH_W\"; then\n  if (cygpath --version) >/dev/null 2>/dev/null; then\n    CYGPATH_W='cygpath -w'\n  else\n    CYGPATH_W=echo\n  fi\nfi\nAC_SUBST([CYGPATH_W])\n\n# Define the identity of the package.\ndnl Distinguish between old-style and new-style calls.\nm4_ifval([$2],\n[AC_DIAGNOSE([obsolete],\n             [$0: two- and three-arguments forms are deprecated.])\nm4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl\n AC_SUBST([PACKAGE], [$1])dnl\n AC_SUBST([VERSION], [$2])],\n[_AM_SET_OPTIONS([$1])dnl\ndnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.\nm4_if(\n  m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),\n  [ok:ok],,\n  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl\n AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl\n AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl\n\n_AM_IF_OPTION([no-define],,\n[AC_DEFINE_UNQUOTED([PACKAGE], [\"$PACKAGE\"], [Name of package])\n AC_DEFINE_UNQUOTED([VERSION], [\"$VERSION\"], [Version number of package])])dnl\n\n# Some tools Automake needs.\nAC_REQUIRE([AM_SANITY_CHECK])dnl\nAC_REQUIRE([AC_ARG_PROGRAM])dnl\nAM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])\nAM_MISSING_PROG([AUTOCONF], [autoconf])\nAM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])\nAM_MISSING_PROG([AUTOHEADER], [autoheader])\nAM_MISSING_PROG([MAKEINFO], [makeinfo])\nAC_REQUIRE([AM_PROG_INSTALL_SH])dnl\nAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl\nAC_REQUIRE([AC_PROG_MKDIR_P])dnl\n# For better backward compatibility.  To be removed once Automake 1.9.x\n# dies out for good.  For more background, see:\n# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>\n# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>\nAC_SUBST([mkdir_p], ['$(MKDIR_P)'])\n# We need awk for the \"check\" target.  The system \"awk\" is bad on\n# some platforms.\nAC_REQUIRE([AC_PROG_AWK])dnl\nAC_REQUIRE([AC_PROG_MAKE_SET])dnl\nAC_REQUIRE([AM_SET_LEADING_DOT])dnl\n_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],\n\t      [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],\n\t\t\t     [_AM_PROG_TAR([v7])])])\n_AM_IF_OPTION([no-dependencies],,\n[AC_PROVIDE_IFELSE([AC_PROG_CC],\n\t\t  [_AM_DEPENDENCIES([CC])],\n\t\t  [m4_define([AC_PROG_CC],\n\t\t\t     m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl\nAC_PROVIDE_IFELSE([AC_PROG_CXX],\n\t\t  [_AM_DEPENDENCIES([CXX])],\n\t\t  [m4_define([AC_PROG_CXX],\n\t\t\t     m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl\nAC_PROVIDE_IFELSE([AC_PROG_OBJC],\n\t\t  [_AM_DEPENDENCIES([OBJC])],\n\t\t  [m4_define([AC_PROG_OBJC],\n\t\t\t     m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl\nAC_PROVIDE_IFELSE([AC_PROG_OBJCXX],\n\t\t  [_AM_DEPENDENCIES([OBJCXX])],\n\t\t  [m4_define([AC_PROG_OBJCXX],\n\t\t\t     m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl\n])\nAC_REQUIRE([AM_SILENT_RULES])dnl\ndnl The testsuite driver may need to know about EXEEXT, so add the\ndnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This\ndnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.\nAC_CONFIG_COMMANDS_PRE(dnl\n[m4_provide_if([_AM_COMPILER_EXEEXT],\n  [AM_CONDITIONAL([am__EXEEXT], [test -n \"$EXEEXT\"])])])dnl\n\n# POSIX will say in a future version that running \"rm -f\" with no argument\n# is OK; and we want to be able to make that assumption in our Makefile\n# recipes.  So use an aggressive probe to check that the usage we want is\n# actually supported \"in the wild\" to an acceptable degree.\n# See automake bug#10828.\n# To make any issue more visible, cause the running configure to be aborted\n# by default if the 'rm' program in use doesn't match our expectations; the\n# user can still override this though.\nif rm -f && rm -fr && rm -rf; then : OK; else\n  cat >&2 <<'END'\nOops!\n\nYour 'rm' program seems unable to run without file operands specified\non the command line, even when the '-f' option is present.  This is contrary\nto the behaviour of most rm programs out there, and not conforming with\nthe upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>\n\nPlease tell bug-automake@gnu.org about your system, including the value\nof your $PATH and any error possibly output before this message.  This\ncan help us improve future automake versions.\n\nEND\n  if test x\"$ACCEPT_INFERIOR_RM_PROGRAM\" = x\"yes\"; then\n    echo 'Configuration will proceed anyway, since you have set the' >&2\n    echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to \"yes\"' >&2\n    echo >&2\n  else\n    cat >&2 <<'END'\nAborting the configuration process, to ensure you take notice of the issue.\n\nYou can download and install GNU coreutils to get an 'rm' implementation\nthat behaves properly: <http://www.gnu.org/software/coreutils/>.\n\nIf you want to complete the configuration process using your problematic\n'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM\nto \"yes\", and re-run configure.\n\nEND\n    AC_MSG_ERROR([Your 'rm' program is bad, sorry.])\n  fi\nfi])\n\ndnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not\ndnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further\ndnl mangled by Autoconf and run in a shell conditional statement.\nm4_define([_AC_COMPILER_EXEEXT],\nm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])\n\n# When config.status generates a header, we must update the stamp-h file.\n# This file resides in the same directory as the config header\n# that is generated.  The stamp files are numbered to have different names.\n\n# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the\n# loop where config.status creates the headers, so we can generate\n# our stamp files there.\nAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],\n[# Compute $1's index in $config_headers.\n_am_arg=$1\n_am_stamp_count=1\nfor _am_header in $config_headers :; do\n  case $_am_header in\n    $_am_arg | $_am_arg:* )\n      break ;;\n    * )\n      _am_stamp_count=`expr $_am_stamp_count + 1` ;;\n  esac\ndone\necho \"timestamp for $_am_arg\" >`AS_DIRNAME([\"$_am_arg\"])`/stamp-h[]$_am_stamp_count])\n\n# Copyright (C) 2001-2013 Free Software Foundation, Inc.\n#\n# This file is free software; the Free Software Foundation\n# gives unlimited permission to copy and/or distribute it,\n# with or without modifications, as long as this notice is preserved.\n\n# AM_PROG_INSTALL_SH\n# ------------------\n# Define $install_sh.\nAC_DEFUN([AM_PROG_INSTALL_SH],\n[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl\nif test x\"${install_sh}\" != xset; then\n  case $am_aux_dir in\n  *\\ * | *\\\t*)\n    install_sh=\"\\${SHELL} '$am_aux_dir/install-sh'\" ;;\n  *)\n    install_sh=\"\\${SHELL} $am_aux_dir/install-sh\"\n  esac\nfi\nAC_SUBST([install_sh])])\n\n# Copyright (C) 2003-2013 Free Software Foundation, Inc.\n#\n# This file is free software; the Free Software Foundation\n# gives unlimited permission to copy and/or distribute it,\n# with or without modifications, as long as this notice is preserved.\n\n# Check whether the underlying file-system supports filenames\n# with a leading dot.  For instance MS-DOS doesn't.\nAC_DEFUN([AM_SET_LEADING_DOT],\n[rm -rf .tst 2>/dev/null\nmkdir .tst 2>/dev/null\nif test -d .tst; then\n  am__leading_dot=.\nelse\n  am__leading_dot=_\nfi\nrmdir .tst 2>/dev/null\nAC_SUBST([am__leading_dot])])\n\n# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-\n# From Jim Meyering\n\n# Copyright (C) 1996-2013 Free Software Foundation, Inc.\n#\n# This file is free software; the Free Software Foundation\n# gives unlimited permission to copy and/or distribute it,\n# with or without modifications, as long as this notice is preserved.\n\n# AM_MAINTAINER_MODE([DEFAULT-MODE])\n# ----------------------------------\n# Control maintainer-specific portions of Makefiles.\n# Default is to disable them, unless 'enable' is passed literally.\n# For symmetry, 'disable' may be passed as well.  Anyway, the user\n# can override the default with the --enable/--disable switch.\nAC_DEFUN([AM_MAINTAINER_MODE],\n[m4_case(m4_default([$1], [disable]),\n       [enable], [m4_define([am_maintainer_other], [disable])],\n       [disable], [m4_define([am_maintainer_other], [enable])],\n       [m4_define([am_maintainer_other], [enable])\n        m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])\nAC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])\n  dnl maintainer-mode's default is 'disable' unless 'enable' is passed\n  AC_ARG_ENABLE([maintainer-mode],\n    [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode],\n      am_maintainer_other[ make rules and dependencies not useful\n      (and sometimes confusing) to the casual installer])],\n    [USE_MAINTAINER_MODE=$enableval],\n    [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))\n  AC_MSG_RESULT([$USE_MAINTAINER_MODE])\n  AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])\n  MAINT=$MAINTAINER_MODE_TRUE\n  AC_SUBST([MAINT])dnl\n]\n)\n\n# Check to see how 'make' treats includes.\t            -*- Autoconf -*-\n\n# Copyright (C) 2001-2013 Free Software Foundation, Inc.\n#\n# This file is free software; the Free Software Foundation\n# gives unlimited permission to copy and/or distribute it,\n# with or without modifications, as long as this notice is preserved.\n\n# AM_MAKE_INCLUDE()\n# -----------------\n# Check to see how make treats includes.\nAC_DEFUN([AM_MAKE_INCLUDE],\n[am_make=${MAKE-make}\ncat > confinc << 'END'\nam__doit:\n\t@echo this is the am__doit target\n.PHONY: am__doit\nEND\n# If we don't find an include directive, just comment out the code.\nAC_MSG_CHECKING([for style of include used by $am_make])\nam__include=\"#\"\nam__quote=\n_am_result=none\n# First try GNU make style include.\necho \"include confinc\" > confmf\n# Ignore all kinds of additional output from 'make'.\ncase `$am_make -s -f confmf 2> /dev/null` in #(\n*the\\ am__doit\\ target*)\n  am__include=include\n  am__quote=\n  _am_result=GNU\n  ;;\nesac\n# Now try BSD make style include.\nif test \"$am__include\" = \"#\"; then\n   echo '.include \"confinc\"' > confmf\n   case `$am_make -s -f confmf 2> /dev/null` in #(\n   *the\\ am__doit\\ target*)\n     am__include=.include\n     am__quote=\"\\\"\"\n     _am_result=BSD\n     ;;\n   esac\nfi\nAC_SUBST([am__include])\nAC_SUBST([am__quote])\nAC_MSG_RESULT([$_am_result])\nrm -f confinc confmf\n])\n\n# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-\n\n# Copyright (C) 1997-2013 Free Software Foundation, Inc.\n#\n# This file is free software; the Free Software Foundation\n# gives unlimited permission to copy and/or distribute it,\n# with or without modifications, as long as this notice is preserved.\n\n# AM_MISSING_PROG(NAME, PROGRAM)\n# ------------------------------\nAC_DEFUN([AM_MISSING_PROG],\n[AC_REQUIRE([AM_MISSING_HAS_RUN])\n$1=${$1-\"${am_missing_run}$2\"}\nAC_SUBST($1)])\n\n# AM_MISSING_HAS_RUN\n# ------------------\n# Define MISSING if not defined so far and test if it is modern enough.\n# If it is, set am_missing_run to use it, otherwise, to nothing.\nAC_DEFUN([AM_MISSING_HAS_RUN],\n[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl\nAC_REQUIRE_AUX_FILE([missing])dnl\nif test x\"${MISSING+set}\" != xset; then\n  case $am_aux_dir in\n  *\\ * | *\\\t*)\n    MISSING=\"\\${SHELL} \\\"$am_aux_dir/missing\\\"\" ;;\n  *)\n    MISSING=\"\\${SHELL} $am_aux_dir/missing\" ;;\n  esac\nfi\n# Use eval to expand $SHELL\nif eval \"$MISSING --is-lightweight\"; then\n  am_missing_run=\"$MISSING \"\nelse\n  am_missing_run=\n  AC_MSG_WARN(['missing' script is too old or missing])\nfi\n])\n\n# Helper functions for option handling.                     -*- Autoconf -*-\n\n# Copyright (C) 2001-2013 Free Software Foundation, Inc.\n#\n# This file is free software; the Free Software Foundation\n# gives unlimited permission to copy and/or distribute it,\n# with or without modifications, as long as this notice is preserved.\n\n# _AM_MANGLE_OPTION(NAME)\n# -----------------------\nAC_DEFUN([_AM_MANGLE_OPTION],\n[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])\n\n# _AM_SET_OPTION(NAME)\n# --------------------\n# Set option NAME.  Presently that only means defining a flag for this option.\nAC_DEFUN([_AM_SET_OPTION],\n[m4_define(_AM_MANGLE_OPTION([$1]), [1])])\n\n# _AM_SET_OPTIONS(OPTIONS)\n# ------------------------\n# OPTIONS is a space-separated list of Automake options.\nAC_DEFUN([_AM_SET_OPTIONS],\n[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])\n\n# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])\n# -------------------------------------------\n# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.\nAC_DEFUN([_AM_IF_OPTION],\n[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])\n\n# Copyright (C) 1999-2013 Free Software Foundation, Inc.\n#\n# This file is free software; the Free Software Foundation\n# gives unlimited permission to copy and/or distribute it,\n# with or without modifications, as long as this notice is preserved.\n\n# _AM_PROG_CC_C_O\n# ---------------\n# Like AC_PROG_CC_C_O, but changed for automake.  We rewrite AC_PROG_CC\n# to automatically call this.\nAC_DEFUN([_AM_PROG_CC_C_O],\n[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl\nAC_REQUIRE_AUX_FILE([compile])dnl\nAC_LANG_PUSH([C])dnl\nAC_CACHE_CHECK(\n  [whether $CC understands -c and -o together],\n  [am_cv_prog_cc_c_o],\n  [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])\n  # Make sure it works both with $CC and with simple cc.\n  # Following AC_PROG_CC_C_O, we do the test twice because some\n  # compilers refuse to overwrite an existing .o file with -o,\n  # though they will create one.\n  am_cv_prog_cc_c_o=yes\n  for am_i in 1 2; do\n    if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \\\n         && test -f conftest2.$ac_objext; then\n      : OK\n    else\n      am_cv_prog_cc_c_o=no\n      break\n    fi\n  done\n  rm -f core conftest*\n  unset am_i])\nif test \"$am_cv_prog_cc_c_o\" != yes; then\n   # Losing compiler, so override with the script.\n   # FIXME: It is wrong to rewrite CC.\n   # But if we don't then we get into trouble of one sort or another.\n   # A longer-term fix would be to have automake use am__CC in this case,\n   # and then we could set am__CC=\"\\$(top_srcdir)/compile \\$(CC)\"\n   CC=\"$am_aux_dir/compile $CC\"\nfi\nAC_LANG_POP([C])])\n\n# For backward compatibility.\nAC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])\n\n# Copyright (C) 2001-2013 Free Software Foundation, Inc.\n#\n# This file is free software; the Free Software Foundation\n# gives unlimited permission to copy and/or distribute it,\n# with or without modifications, as long as this notice is preserved.\n\n# AM_RUN_LOG(COMMAND)\n# -------------------\n# Run COMMAND, save the exit status in ac_status, and log it.\n# (This has been adapted from Autoconf's _AC_RUN_LOG macro.)\nAC_DEFUN([AM_RUN_LOG],\n[{ echo \"$as_me:$LINENO: $1\" >&AS_MESSAGE_LOG_FD\n   ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD\n   ac_status=$?\n   echo \"$as_me:$LINENO: \\$? = $ac_status\" >&AS_MESSAGE_LOG_FD\n   (exit $ac_status); }])\n\n# Check to make sure that the build environment is sane.    -*- Autoconf -*-\n\n# Copyright (C) 1996-2013 Free Software Foundation, Inc.\n#\n# This file is free software; the Free Software Foundation\n# gives unlimited permission to copy and/or distribute it,\n# with or without modifications, as long as this notice is preserved.\n\n# AM_SANITY_CHECK\n# ---------------\nAC_DEFUN([AM_SANITY_CHECK],\n[AC_MSG_CHECKING([whether build environment is sane])\n# Reject unsafe characters in $srcdir or the absolute working directory\n# name.  Accept space and tab only in the latter.\nam_lf='\n'\ncase `pwd` in\n  *[[\\\\\\\"\\#\\$\\&\\'\\`$am_lf]]*)\n    AC_MSG_ERROR([unsafe absolute working directory name]);;\nesac\ncase $srcdir in\n  *[[\\\\\\\"\\#\\$\\&\\'\\`$am_lf\\ \\\t]]*)\n    AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;\nesac\n\n# Do 'set' in a subshell so we don't clobber the current shell's\n# arguments.  Must try -L first in case configure is actually a\n# symlink; some systems play weird games with the mod time of symlinks\n# (eg FreeBSD returns the mod time of the symlink's containing\n# directory).\nif (\n   am_has_slept=no\n   for am_try in 1 2; do\n     echo \"timestamp, slept: $am_has_slept\" > conftest.file\n     set X `ls -Lt \"$srcdir/configure\" conftest.file 2> /dev/null`\n     if test \"$[*]\" = \"X\"; then\n\t# -L didn't work.\n\tset X `ls -t \"$srcdir/configure\" conftest.file`\n     fi\n     if test \"$[*]\" != \"X $srcdir/configure conftest.file\" \\\n\t&& test \"$[*]\" != \"X conftest.file $srcdir/configure\"; then\n\n\t# If neither matched, then we have a broken ls.  This can happen\n\t# if, for instance, CONFIG_SHELL is bash and it inherits a\n\t# broken ls alias from the environment.  This has actually\n\t# happened.  Such a system could not be considered \"sane\".\n\tAC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken\n  alias in your environment])\n     fi\n     if test \"$[2]\" = conftest.file || test $am_try -eq 2; then\n       break\n     fi\n     # Just in case.\n     sleep 1\n     am_has_slept=yes\n   done\n   test \"$[2]\" = conftest.file\n   )\nthen\n   # Ok.\n   :\nelse\n   AC_MSG_ERROR([newly created file is older than distributed files!\nCheck your system clock])\nfi\nAC_MSG_RESULT([yes])\n# If we didn't sleep, we still need to ensure time stamps of config.status and\n# generated files are strictly newer.\nam_sleep_pid=\nif grep 'slept: no' conftest.file >/dev/null 2>&1; then\n  ( sleep 1 ) &\n  am_sleep_pid=$!\nfi\nAC_CONFIG_COMMANDS_PRE(\n  [AC_MSG_CHECKING([that generated files are newer than configure])\n   if test -n \"$am_sleep_pid\"; then\n     # Hide warnings about reused PIDs.\n     wait $am_sleep_pid 2>/dev/null\n   fi\n   AC_MSG_RESULT([done])])\nrm -f conftest.file\n])\n\n# Copyright (C) 2009-2013 Free Software Foundation, Inc.\n#\n# This file is free software; the Free Software Foundation\n# gives unlimited permission to copy and/or distribute it,\n# with or without modifications, as long as this notice is preserved.\n\n# AM_SILENT_RULES([DEFAULT])\n# --------------------------\n# Enable less verbose build rules; with the default set to DEFAULT\n# (\"yes\" being less verbose, \"no\" or empty being verbose).\nAC_DEFUN([AM_SILENT_RULES],\n[AC_ARG_ENABLE([silent-rules], [dnl\nAS_HELP_STRING(\n  [--enable-silent-rules],\n  [less verbose build output (undo: \"make V=1\")])\nAS_HELP_STRING(\n  [--disable-silent-rules],\n  [verbose build output (undo: \"make V=0\")])dnl\n])\ncase $enable_silent_rules in @%:@ (((\n  yes) AM_DEFAULT_VERBOSITY=0;;\n   no) AM_DEFAULT_VERBOSITY=1;;\n    *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;\nesac\ndnl\ndnl A few 'make' implementations (e.g., NonStop OS and NextStep)\ndnl do not support nested variable expansions.\ndnl See automake bug#9928 and bug#10237.\nam_make=${MAKE-make}\nAC_CACHE_CHECK([whether $am_make supports nested variables],\n   [am_cv_make_support_nested_variables],\n   [if AS_ECHO([['TRUE=$(BAR$(V))\nBAR0=false\nBAR1=true\nV=1\nam__doit:\n\t@$(TRUE)\n.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then\n  am_cv_make_support_nested_variables=yes\nelse\n  am_cv_make_support_nested_variables=no\nfi])\nif test $am_cv_make_support_nested_variables = yes; then\n  dnl Using '$V' instead of '$(V)' breaks IRIX make.\n  AM_V='$(V)'\n  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'\nelse\n  AM_V=$AM_DEFAULT_VERBOSITY\n  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY\nfi\nAC_SUBST([AM_V])dnl\nAM_SUBST_NOTMAKE([AM_V])dnl\nAC_SUBST([AM_DEFAULT_V])dnl\nAM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl\nAC_SUBST([AM_DEFAULT_VERBOSITY])dnl\nAM_BACKSLASH='\\'\nAC_SUBST([AM_BACKSLASH])dnl\n_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl\n])\n\n# Copyright (C) 2001-2013 Free Software Foundation, Inc.\n#\n# This file is free software; the Free Software Foundation\n# gives unlimited permission to copy and/or distribute it,\n# with or without modifications, as long as this notice is preserved.\n\n# AM_PROG_INSTALL_STRIP\n# ---------------------\n# One issue with vendor 'install' (even GNU) is that you can't\n# specify the program used to strip binaries.  This is especially\n# annoying in cross-compiling environments, where the build's strip\n# is unlikely to handle the host's binaries.\n# Fortunately install-sh will honor a STRIPPROG variable, so we\n# always use install-sh in \"make install-strip\", and initialize\n# STRIPPROG with the value of the STRIP variable (set by the user).\nAC_DEFUN([AM_PROG_INSTALL_STRIP],\n[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl\n# Installed binaries are usually stripped using 'strip' when the user\n# run \"make install-strip\".  However 'strip' might not be the right\n# tool to use in cross-compilation environments, therefore Automake\n# will honor the 'STRIP' environment variable to overrule this program.\ndnl Don't test for $cross_compiling = yes, because it might be 'maybe'.\nif test \"$cross_compiling\" != no; then\n  AC_CHECK_TOOL([STRIP], [strip], :)\nfi\nINSTALL_STRIP_PROGRAM=\"\\$(install_sh) -c -s\"\nAC_SUBST([INSTALL_STRIP_PROGRAM])])\n\n# Copyright (C) 2006-2013 Free Software Foundation, Inc.\n#\n# This file is free software; the Free Software Foundation\n# gives unlimited permission to copy and/or distribute it,\n# with or without modifications, as long as this notice is preserved.\n\n# _AM_SUBST_NOTMAKE(VARIABLE)\n# ---------------------------\n# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.\n# This macro is traced by Automake.\nAC_DEFUN([_AM_SUBST_NOTMAKE])\n\n# AM_SUBST_NOTMAKE(VARIABLE)\n# --------------------------\n# Public sister of _AM_SUBST_NOTMAKE.\nAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])\n\n# Check how to create a tarball.                            -*- Autoconf -*-\n\n# Copyright (C) 2004-2013 Free Software Foundation, Inc.\n#\n# This file is free software; the Free Software Foundation\n# gives unlimited permission to copy and/or distribute it,\n# with or without modifications, as long as this notice is preserved.\n\n# _AM_PROG_TAR(FORMAT)\n# --------------------\n# Check how to create a tarball in format FORMAT.\n# FORMAT should be one of 'v7', 'ustar', or 'pax'.\n#\n# Substitute a variable $(am__tar) that is a command\n# writing to stdout a FORMAT-tarball containing the directory\n# $tardir.\n#     tardir=directory && $(am__tar) > result.tar\n#\n# Substitute a variable $(am__untar) that extract such\n# a tarball read from stdin.\n#     $(am__untar) < result.tar\n#\nAC_DEFUN([_AM_PROG_TAR],\n[# Always define AMTAR for backward compatibility.  Yes, it's still used\n# in the wild :-(  We should find a proper way to deprecate it ...\nAC_SUBST([AMTAR], ['$${TAR-tar}'])\n\n# We'll loop over all known methods to create a tar archive until one works.\n_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'\n\nm4_if([$1], [v7],\n  [am__tar='$${TAR-tar} chof - \"$$tardir\"' am__untar='$${TAR-tar} xf -'],\n\n  [m4_case([$1],\n    [ustar],\n     [# The POSIX 1988 'ustar' format is defined with fixed-size fields.\n      # There is notably a 21 bits limit for the UID and the GID.  In fact,\n      # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343\n      # and bug#13588).\n      am_max_uid=2097151 # 2^21 - 1\n      am_max_gid=$am_max_uid\n      # The $UID and $GID variables are not portable, so we need to resort\n      # to the POSIX-mandated id(1) utility.  Errors in the 'id' calls\n      # below are definitely unexpected, so allow the users to see them\n      # (that is, avoid stderr redirection).\n      am_uid=`id -u || echo unknown`\n      am_gid=`id -g || echo unknown`\n      AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])\n      if test $am_uid -le $am_max_uid; then\n         AC_MSG_RESULT([yes])\n      else\n         AC_MSG_RESULT([no])\n         _am_tools=none\n      fi\n      AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])\n      if test $am_gid -le $am_max_gid; then\n         AC_MSG_RESULT([yes])\n      else\n        AC_MSG_RESULT([no])\n        _am_tools=none\n      fi],\n\n  [pax],\n    [],\n\n  [m4_fatal([Unknown tar format])])\n\n  AC_MSG_CHECKING([how to create a $1 tar archive])\n\n  # Go ahead even if we have the value already cached.  We do so because we\n  # need to set the values for the 'am__tar' and 'am__untar' variables.\n  _am_tools=${am_cv_prog_tar_$1-$_am_tools}\n\n  for _am_tool in $_am_tools; do\n    case $_am_tool in\n    gnutar)\n      for _am_tar in tar gnutar gtar; do\n        AM_RUN_LOG([$_am_tar --version]) && break\n      done\n      am__tar=\"$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - \"'\"$$tardir\"'\n      am__tar_=\"$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - \"'\"$tardir\"'\n      am__untar=\"$_am_tar -xf -\"\n      ;;\n    plaintar)\n      # Must skip GNU tar: if it does not support --format= it doesn't create\n      # ustar tarball either.\n      (tar --version) >/dev/null 2>&1 && continue\n      am__tar='tar chf - \"$$tardir\"'\n      am__tar_='tar chf - \"$tardir\"'\n      am__untar='tar xf -'\n      ;;\n    pax)\n      am__tar='pax -L -x $1 -w \"$$tardir\"'\n      am__tar_='pax -L -x $1 -w \"$tardir\"'\n      am__untar='pax -r'\n      ;;\n    cpio)\n      am__tar='find \"$$tardir\" -print | cpio -o -H $1 -L'\n      am__tar_='find \"$tardir\" -print | cpio -o -H $1 -L'\n      am__untar='cpio -i -H $1 -d'\n      ;;\n    none)\n      am__tar=false\n      am__tar_=false\n      am__untar=false\n      ;;\n    esac\n\n    # If the value was cached, stop now.  We just wanted to have am__tar\n    # and am__untar set.\n    test -n \"${am_cv_prog_tar_$1}\" && break\n\n    # tar/untar a dummy directory, and stop if the command works.\n    rm -rf conftest.dir\n    mkdir conftest.dir\n    echo GrepMe > conftest.dir/file\n    AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])\n    rm -rf conftest.dir\n    if test -s conftest.tar; then\n      AM_RUN_LOG([$am__untar <conftest.tar])\n      AM_RUN_LOG([cat conftest.dir/file])\n      grep GrepMe conftest.dir/file >/dev/null 2>&1 && break\n    fi\n  done\n  rm -rf conftest.dir\n\n  AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])\n  AC_MSG_RESULT([$am_cv_prog_tar_$1])])\n\nAC_SUBST([am__tar])\nAC_SUBST([am__untar])\n]) # _AM_PROG_TAR\n\n"
  },
  {
    "path": "thirdparty/portaudio/bindings/cpp/bin/Makefile.am",
    "content": "BINDIR = $(top_srcdir)/example\nLIBDIR = $(top_builddir)/lib\n\nnoinst_PROGRAMS = devs sine\n\nLDADD = $(LIBDIR)/libportaudiocpp.la $(top_builddir)/$(PORTAUDIO_ROOT)/lib/libportaudio.la\n\ndevs_SOURCES = $(BINDIR)/devs.cxx\nsine_SOURCES = $(BINDIR)/sine.cxx\n"
  },
  {
    "path": "thirdparty/portaudio/bindings/cpp/bin/Makefile.in",
    "content": "# Makefile.in generated by automake 1.14.1 from Makefile.am.\n# @configure_input@\n\n# Copyright (C) 1994-2013 Free Software Foundation, Inc.\n\n# This Makefile.in is free software; the Free Software Foundation\n# gives unlimited permission to copy and/or distribute it,\n# with or without modifications, as long as this notice is preserved.\n\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY, to the extent permitted by law; without\n# even the implied warranty of MERCHANTABILITY or FITNESS FOR A\n# PARTICULAR PURPOSE.\n\n@SET_MAKE@\n\nVPATH = @srcdir@\nam__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'\nam__make_running_with_option = \\\n  case $${target_option-} in \\\n      ?) ;; \\\n      *) echo \"am__make_running_with_option: internal error: invalid\" \\\n              \"target option '$${target_option-}' specified\" >&2; \\\n         exit 1;; \\\n  esac; \\\n  has_opt=no; \\\n  sane_makeflags=$$MAKEFLAGS; \\\n  if $(am__is_gnu_make); then \\\n    sane_makeflags=$$MFLAGS; \\\n  else \\\n    case $$MAKEFLAGS in \\\n      *\\\\[\\ \\\t]*) \\\n        bs=\\\\; \\\n        sane_makeflags=`printf '%s\\n' \"$$MAKEFLAGS\" \\\n          | sed \"s/$$bs$$bs[$$bs $$bs\t]*//g\"`;; \\\n    esac; \\\n  fi; \\\n  skip_next=no; \\\n  strip_trailopt () \\\n  { \\\n    flg=`printf '%s\\n' \"$$flg\" | sed \"s/$$1.*$$//\"`; \\\n  }; \\\n  for flg in $$sane_makeflags; do \\\n    test $$skip_next = yes && { skip_next=no; continue; }; \\\n    case $$flg in \\\n      *=*|--*) continue;; \\\n        -*I) strip_trailopt 'I'; skip_next=yes;; \\\n      -*I?*) strip_trailopt 'I';; \\\n        -*O) strip_trailopt 'O'; skip_next=yes;; \\\n      -*O?*) strip_trailopt 'O';; \\\n        -*l) strip_trailopt 'l'; skip_next=yes;; \\\n      -*l?*) strip_trailopt 'l';; \\\n      -[dEDm]) skip_next=yes;; \\\n      -[JT]) skip_next=yes;; \\\n    esac; \\\n    case $$flg in \\\n      *$$target_option*) has_opt=yes; break;; \\\n    esac; \\\n  done; \\\n  test $$has_opt = yes\nam__make_dryrun = (target_option=n; $(am__make_running_with_option))\nam__make_keepgoing = (target_option=k; $(am__make_running_with_option))\npkgdatadir = $(datadir)/@PACKAGE@\npkgincludedir = $(includedir)/@PACKAGE@\npkglibdir = $(libdir)/@PACKAGE@\npkglibexecdir = $(libexecdir)/@PACKAGE@\nam__cd = CDPATH=\"$${ZSH_VERSION+.}$(PATH_SEPARATOR)\" && cd\ninstall_sh_DATA = $(install_sh) -c -m 644\ninstall_sh_PROGRAM = $(install_sh) -c\ninstall_sh_SCRIPT = $(install_sh) -c\nINSTALL_HEADER = $(INSTALL_DATA)\ntransform = $(program_transform_name)\nNORMAL_INSTALL = :\nPRE_INSTALL = :\nPOST_INSTALL = :\nNORMAL_UNINSTALL = :\nPRE_UNINSTALL = :\nPOST_UNINSTALL = :\nbuild_triplet = @build@\nhost_triplet = @host@\nnoinst_PROGRAMS = devs$(EXEEXT) sine$(EXEEXT)\nsubdir = bin\nDIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \\\n\t$(top_srcdir)/../../depcomp\nACLOCAL_M4 = $(top_srcdir)/aclocal.m4\nam__aclocal_m4_deps = $(top_srcdir)/configure.ac\nam__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \\\n\t$(ACLOCAL_M4)\nmkinstalldirs = $(install_sh) -d\nCONFIG_CLEAN_FILES =\nCONFIG_CLEAN_VPATH_FILES =\nPROGRAMS = $(noinst_PROGRAMS)\nam_devs_OBJECTS = devs.$(OBJEXT)\ndevs_OBJECTS = $(am_devs_OBJECTS)\ndevs_LDADD = $(LDADD)\ndevs_DEPENDENCIES = $(LIBDIR)/libportaudiocpp.la \\\n\t$(top_builddir)/$(PORTAUDIO_ROOT)/lib/libportaudio.la\nAM_V_lt = $(am__v_lt_@AM_V@)\nam__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)\nam__v_lt_0 = --silent\nam__v_lt_1 = \nam_sine_OBJECTS = sine.$(OBJEXT)\nsine_OBJECTS = $(am_sine_OBJECTS)\nsine_LDADD = $(LDADD)\nsine_DEPENDENCIES = $(LIBDIR)/libportaudiocpp.la \\\n\t$(top_builddir)/$(PORTAUDIO_ROOT)/lib/libportaudio.la\nAM_V_P = $(am__v_P_@AM_V@)\nam__v_P_ = $(am__v_P_@AM_DEFAULT_V@)\nam__v_P_0 = false\nam__v_P_1 = :\nAM_V_GEN = $(am__v_GEN_@AM_V@)\nam__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)\nam__v_GEN_0 = @echo \"  GEN     \" $@;\nam__v_GEN_1 = \nAM_V_at = $(am__v_at_@AM_V@)\nam__v_at_ = $(am__v_at_@AM_DEFAULT_V@)\nam__v_at_0 = @\nam__v_at_1 = \ndepcomp = $(SHELL) $(top_srcdir)/../../depcomp\nam__depfiles_maybe = depfiles\nam__mv = mv -f\nCXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \\\n\t$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)\nLTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \\\n\t$(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \\\n\t$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \\\n\t$(AM_CXXFLAGS) $(CXXFLAGS)\nAM_V_CXX = $(am__v_CXX_@AM_V@)\nam__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@)\nam__v_CXX_0 = @echo \"  CXX     \" $@;\nam__v_CXX_1 = \nCXXLD = $(CXX)\nCXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \\\n\t$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \\\n\t$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@\nAM_V_CXXLD = $(am__v_CXXLD_@AM_V@)\nam__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@)\nam__v_CXXLD_0 = @echo \"  CXXLD   \" $@;\nam__v_CXXLD_1 = \nSOURCES = $(devs_SOURCES) $(sine_SOURCES)\nDIST_SOURCES = $(devs_SOURCES) $(sine_SOURCES)\nam__can_run_installinfo = \\\n  case $$AM_UPDATE_INFO_DIR in \\\n    n|no|NO) false;; \\\n    *) (install-info --version) >/dev/null 2>&1;; \\\n  esac\nam__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)\n# Read a list of newline-separated strings from the standard input,\n# and print each of them once, without duplicates.  Input order is\n# *not* preserved.\nam__uniquify_input = $(AWK) '\\\n  BEGIN { nonempty = 0; } \\\n  { items[$$0] = 1; nonempty = 1; } \\\n  END { if (nonempty) { for (i in items) print i; }; } \\\n'\n# Make sure the list of sources is unique.  This is necessary because,\n# e.g., the same source file might be shared among _SOURCES variables\n# for different programs/libraries.\nam__define_uniq_tagged_files = \\\n  list='$(am__tagged_files)'; \\\n  unique=`for i in $$list; do \\\n    if test -f \"$$i\"; then echo $$i; else echo $(srcdir)/$$i; fi; \\\n  done | $(am__uniquify_input)`\nETAGS = etags\nCTAGS = ctags\nDISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)\nACLOCAL = @ACLOCAL@\nAMTAR = @AMTAR@\nAM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@\nAR = @AR@\nAS = @AS@\nAUTOCONF = @AUTOCONF@\nAUTOHEADER = @AUTOHEADER@\nAUTOMAKE = @AUTOMAKE@\nAWK = @AWK@\nCC = @CC@\nCCDEPMODE = @CCDEPMODE@\nCFLAGS = @CFLAGS@\nCPP = @CPP@\nCPPFLAGS = @CPPFLAGS@\nCXX = @CXX@\nCXXCPP = @CXXCPP@\nCXXDEPMODE = @CXXDEPMODE@\nCXXFLAGS = @CXXFLAGS@\nCYGPATH_W = @CYGPATH_W@\nDEFAULT_INCLUDES = @DEFAULT_INCLUDES@\nDEFS = @DEFS@\nDEPDIR = @DEPDIR@\nDLLTOOL = @DLLTOOL@\nDSYMUTIL = @DSYMUTIL@\nDUMPBIN = @DUMPBIN@\nECHO_C = @ECHO_C@\nECHO_N = @ECHO_N@\nECHO_T = @ECHO_T@\nEGREP = @EGREP@\nEXEEXT = @EXEEXT@\nFGREP = @FGREP@\nGREP = @GREP@\nINSTALL = @INSTALL@\nINSTALL_DATA = @INSTALL_DATA@\nINSTALL_PROGRAM = @INSTALL_PROGRAM@\nINSTALL_SCRIPT = @INSTALL_SCRIPT@\nINSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@\nLD = @LD@\nLDFLAGS = @LDFLAGS@\nLIBOBJS = @LIBOBJS@\nLIBS = @LIBS@\nLIBTOOL = @LIBTOOL@\nLIPO = @LIPO@\nLN_S = @LN_S@\nLTLIBOBJS = @LTLIBOBJS@\nLT_VERSION_INFO = @LT_VERSION_INFO@\nMAINT = @MAINT@\nMAKEINFO = @MAKEINFO@\nMANIFEST_TOOL = @MANIFEST_TOOL@\nMKDIR_P = @MKDIR_P@\nNM = @NM@\nNMEDIT = @NMEDIT@\nOBJDUMP = @OBJDUMP@\nOBJEXT = @OBJEXT@\nOTOOL = @OTOOL@\nOTOOL64 = @OTOOL64@\nPACKAGE = @PACKAGE@\nPACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@\nPACKAGE_NAME = @PACKAGE_NAME@\nPACKAGE_STRING = @PACKAGE_STRING@\nPACKAGE_TARNAME = @PACKAGE_TARNAME@\nPACKAGE_URL = @PACKAGE_URL@\nPACKAGE_VERSION = @PACKAGE_VERSION@\nPATH_SEPARATOR = @PATH_SEPARATOR@\nPORTAUDIO_ROOT = @PORTAUDIO_ROOT@\nRANLIB = @RANLIB@\nSED = @SED@\nSET_MAKE = @SET_MAKE@\nSHELL = @SHELL@\nSTRIP = @STRIP@\nVERSION = @VERSION@\nabs_builddir = @abs_builddir@\nabs_srcdir = @abs_srcdir@\nabs_top_builddir = @abs_top_builddir@\nabs_top_srcdir = @abs_top_srcdir@\nac_ct_AR = @ac_ct_AR@\nac_ct_CC = @ac_ct_CC@\nac_ct_CXX = @ac_ct_CXX@\nac_ct_DUMPBIN = @ac_ct_DUMPBIN@\nam__include = @am__include@\nam__leading_dot = @am__leading_dot@\nam__quote = @am__quote@\nam__tar = @am__tar@\nam__untar = @am__untar@\nbindir = @bindir@\nbuild = @build@\nbuild_alias = @build_alias@\nbuild_cpu = @build_cpu@\nbuild_os = @build_os@\nbuild_vendor = @build_vendor@\nbuilddir = @builddir@\ndatadir = @datadir@\ndatarootdir = @datarootdir@\ndocdir = @docdir@\ndvidir = @dvidir@\nexec_prefix = @exec_prefix@\nhost = @host@\nhost_alias = @host_alias@\nhost_cpu = @host_cpu@\nhost_os = @host_os@\nhost_vendor = @host_vendor@\nhtmldir = @htmldir@\nincludedir = @includedir@\ninfodir = @infodir@\ninstall_sh = @install_sh@\nlibdir = @libdir@\nlibexecdir = @libexecdir@\nlocaledir = @localedir@\nlocalstatedir = @localstatedir@\nmandir = @mandir@\nmkdir_p = @mkdir_p@\noldincludedir = @oldincludedir@\npdfdir = @pdfdir@\nprefix = @prefix@\nprogram_transform_name = @program_transform_name@\npsdir = @psdir@\nsbindir = @sbindir@\nsharedstatedir = @sharedstatedir@\nsrcdir = @srcdir@\nsysconfdir = @sysconfdir@\ntarget_alias = @target_alias@\ntop_build_prefix = @top_build_prefix@\ntop_builddir = @top_builddir@\ntop_srcdir = @top_srcdir@\nBINDIR = $(top_srcdir)/example\nLIBDIR = $(top_builddir)/lib\nLDADD = $(LIBDIR)/libportaudiocpp.la $(top_builddir)/$(PORTAUDIO_ROOT)/lib/libportaudio.la\ndevs_SOURCES = $(BINDIR)/devs.cxx\nsine_SOURCES = $(BINDIR)/sine.cxx\nall: all-am\n\n.SUFFIXES:\n.SUFFIXES: .cxx .lo .o .obj\n$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)\n\t@for dep in $?; do \\\n\t  case '$(am__configure_deps)' in \\\n\t    *$$dep*) \\\n\t      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \\\n\t        && { if test -f $@; then exit 0; else break; fi; }; \\\n\t      exit 1;; \\\n\t  esac; \\\n\tdone; \\\n\techo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/Makefile'; \\\n\t$(am__cd) $(top_srcdir) && \\\n\t  $(AUTOMAKE) --gnu bin/Makefile\n.PRECIOUS: Makefile\nMakefile: $(srcdir)/Makefile.in $(top_builddir)/config.status\n\t@case '$?' in \\\n\t  *config.status*) \\\n\t    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \\\n\t  *) \\\n\t    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \\\n\t    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \\\n\tesac;\n\n$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)\n\tcd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh\n\n$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)\n\tcd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh\n$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)\n\tcd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh\n$(am__aclocal_m4_deps):\n\nclean-noinstPROGRAMS:\n\t@list='$(noinst_PROGRAMS)'; test -n \"$$list\" || exit 0; \\\n\techo \" rm -f\" $$list; \\\n\trm -f $$list || exit $$?; \\\n\ttest -n \"$(EXEEXT)\" || exit 0; \\\n\tlist=`for p in $$list; do echo \"$$p\"; done | sed 's/$(EXEEXT)$$//'`; \\\n\techo \" rm -f\" $$list; \\\n\trm -f $$list\n\ndevs$(EXEEXT): $(devs_OBJECTS) $(devs_DEPENDENCIES) $(EXTRA_devs_DEPENDENCIES) \n\t@rm -f devs$(EXEEXT)\n\t$(AM_V_CXXLD)$(CXXLINK) $(devs_OBJECTS) $(devs_LDADD) $(LIBS)\n\nsine$(EXEEXT): $(sine_OBJECTS) $(sine_DEPENDENCIES) $(EXTRA_sine_DEPENDENCIES) \n\t@rm -f sine$(EXEEXT)\n\t$(AM_V_CXXLD)$(CXXLINK) $(sine_OBJECTS) $(sine_LDADD) $(LIBS)\n\nmostlyclean-compile:\n\t-rm -f *.$(OBJEXT)\n\ndistclean-compile:\n\t-rm -f *.tab.c\n\n@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/devs.Po@am__quote@\n@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sine.Po@am__quote@\n\n.cxx.o:\n@am__fastdepCXX_TRUE@\t$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<\n@am__fastdepCXX_TRUE@\t$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po\n@AMDEP_TRUE@@am__fastdepCXX_FALSE@\t$(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@\n@AMDEP_TRUE@@am__fastdepCXX_FALSE@\tDEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@\n@am__fastdepCXX_FALSE@\t$(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $<\n\n.cxx.obj:\n@am__fastdepCXX_TRUE@\t$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`\n@am__fastdepCXX_TRUE@\t$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po\n@AMDEP_TRUE@@am__fastdepCXX_FALSE@\t$(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@\n@AMDEP_TRUE@@am__fastdepCXX_FALSE@\tDEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@\n@am__fastdepCXX_FALSE@\t$(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`\n\n.cxx.lo:\n@am__fastdepCXX_TRUE@\t$(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<\n@am__fastdepCXX_TRUE@\t$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo\n@AMDEP_TRUE@@am__fastdepCXX_FALSE@\t$(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@\n@AMDEP_TRUE@@am__fastdepCXX_FALSE@\tDEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@\n@am__fastdepCXX_FALSE@\t$(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $<\n\ndevs.o: $(BINDIR)/devs.cxx\n@am__fastdepCXX_TRUE@\t$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT devs.o -MD -MP -MF $(DEPDIR)/devs.Tpo -c -o devs.o `test -f '$(BINDIR)/devs.cxx' || echo '$(srcdir)/'`$(BINDIR)/devs.cxx\n@am__fastdepCXX_TRUE@\t$(AM_V_at)$(am__mv) $(DEPDIR)/devs.Tpo $(DEPDIR)/devs.Po\n@AMDEP_TRUE@@am__fastdepCXX_FALSE@\t$(AM_V_CXX)source='$(BINDIR)/devs.cxx' object='devs.o' libtool=no @AMDEPBACKSLASH@\n@AMDEP_TRUE@@am__fastdepCXX_FALSE@\tDEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@\n@am__fastdepCXX_FALSE@\t$(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o devs.o `test -f '$(BINDIR)/devs.cxx' || echo '$(srcdir)/'`$(BINDIR)/devs.cxx\n\ndevs.obj: $(BINDIR)/devs.cxx\n@am__fastdepCXX_TRUE@\t$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT devs.obj -MD -MP -MF $(DEPDIR)/devs.Tpo -c -o devs.obj `if test -f '$(BINDIR)/devs.cxx'; then $(CYGPATH_W) '$(BINDIR)/devs.cxx'; else $(CYGPATH_W) '$(srcdir)/$(BINDIR)/devs.cxx'; fi`\n@am__fastdepCXX_TRUE@\t$(AM_V_at)$(am__mv) $(DEPDIR)/devs.Tpo $(DEPDIR)/devs.Po\n@AMDEP_TRUE@@am__fastdepCXX_FALSE@\t$(AM_V_CXX)source='$(BINDIR)/devs.cxx' object='devs.obj' libtool=no @AMDEPBACKSLASH@\n@AMDEP_TRUE@@am__fastdepCXX_FALSE@\tDEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@\n@am__fastdepCXX_FALSE@\t$(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o devs.obj `if test -f '$(BINDIR)/devs.cxx'; then $(CYGPATH_W) '$(BINDIR)/devs.cxx'; else $(CYGPATH_W) '$(srcdir)/$(BINDIR)/devs.cxx'; fi`\n\nsine.o: $(BINDIR)/sine.cxx\n@am__fastdepCXX_TRUE@\t$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT sine.o -MD -MP -MF $(DEPDIR)/sine.Tpo -c -o sine.o `test -f '$(BINDIR)/sine.cxx' || echo '$(srcdir)/'`$(BINDIR)/sine.cxx\n@am__fastdepCXX_TRUE@\t$(AM_V_at)$(am__mv) $(DEPDIR)/sine.Tpo $(DEPDIR)/sine.Po\n@AMDEP_TRUE@@am__fastdepCXX_FALSE@\t$(AM_V_CXX)source='$(BINDIR)/sine.cxx' object='sine.o' libtool=no @AMDEPBACKSLASH@\n@AMDEP_TRUE@@am__fastdepCXX_FALSE@\tDEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@\n@am__fastdepCXX_FALSE@\t$(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o sine.o `test -f '$(BINDIR)/sine.cxx' || echo '$(srcdir)/'`$(BINDIR)/sine.cxx\n\nsine.obj: $(BINDIR)/sine.cxx\n@am__fastdepCXX_TRUE@\t$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT sine.obj -MD -MP -MF $(DEPDIR)/sine.Tpo -c -o sine.obj `if test -f '$(BINDIR)/sine.cxx'; then $(CYGPATH_W) '$(BINDIR)/sine.cxx'; else $(CYGPATH_W) '$(srcdir)/$(BINDIR)/sine.cxx'; fi`\n@am__fastdepCXX_TRUE@\t$(AM_V_at)$(am__mv) $(DEPDIR)/sine.Tpo $(DEPDIR)/sine.Po\n@AMDEP_TRUE@@am__fastdepCXX_FALSE@\t$(AM_V_CXX)source='$(BINDIR)/sine.cxx' object='sine.obj' libtool=no @AMDEPBACKSLASH@\n@AMDEP_TRUE@@am__fastdepCXX_FALSE@\tDEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@\n@am__fastdepCXX_FALSE@\t$(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o sine.obj `if test -f '$(BINDIR)/sine.cxx'; then $(CYGPATH_W) '$(BINDIR)/sine.cxx'; else $(CYGPATH_W) '$(srcdir)/$(BINDIR)/sine.cxx'; fi`\n\nmostlyclean-libtool:\n\t-rm -f *.lo\n\nclean-libtool:\n\t-rm -rf .libs _libs\n\nID: $(am__tagged_files)\n\t$(am__define_uniq_tagged_files); mkid -fID $$unique\ntags: tags-am\nTAGS: tags\n\ntags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)\n\tset x; \\\n\there=`pwd`; \\\n\t$(am__define_uniq_tagged_files); \\\n\tshift; \\\n\tif test -z \"$(ETAGS_ARGS)$$*$$unique\"; then :; else \\\n\t  test -n \"$$unique\" || unique=$$empty_fix; \\\n\t  if test $$# -gt 0; then \\\n\t    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \\\n\t      \"$$@\" $$unique; \\\n\t  else \\\n\t    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \\\n\t      $$unique; \\\n\t  fi; \\\n\tfi\nctags: ctags-am\n\nCTAGS: ctags\nctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)\n\t$(am__define_uniq_tagged_files); \\\n\ttest -z \"$(CTAGS_ARGS)$$unique\" \\\n\t  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \\\n\t     $$unique\n\nGTAGS:\n\there=`$(am__cd) $(top_builddir) && pwd` \\\n\t  && $(am__cd) $(top_srcdir) \\\n\t  && gtags -i $(GTAGS_ARGS) \"$$here\"\ncscopelist: cscopelist-am\n\ncscopelist-am: $(am__tagged_files)\n\tlist='$(am__tagged_files)'; \\\n\tcase \"$(srcdir)\" in \\\n\t  [\\\\/]* | ?:[\\\\/]*) sdir=\"$(srcdir)\" ;; \\\n\t  *) sdir=$(subdir)/$(srcdir) ;; \\\n\tesac; \\\n\tfor i in $$list; do \\\n\t  if test -f \"$$i\"; then \\\n\t    echo \"$(subdir)/$$i\"; \\\n\t  else \\\n\t    echo \"$$sdir/$$i\"; \\\n\t  fi; \\\n\tdone >> $(top_builddir)/cscope.files\n\ndistclean-tags:\n\t-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags\n\ndistdir: $(DISTFILES)\n\t@srcdirstrip=`echo \"$(srcdir)\" | sed 's/[].[^$$\\\\*]/\\\\\\\\&/g'`; \\\n\ttopsrcdirstrip=`echo \"$(top_srcdir)\" | sed 's/[].[^$$\\\\*]/\\\\\\\\&/g'`; \\\n\tlist='$(DISTFILES)'; \\\n\t  dist_files=`for file in $$list; do echo $$file; done | \\\n\t  sed -e \"s|^$$srcdirstrip/||;t\" \\\n\t      -e \"s|^$$topsrcdirstrip/|$(top_builddir)/|;t\"`; \\\n\tcase $$dist_files in \\\n\t  */*) $(MKDIR_P) `echo \"$$dist_files\" | \\\n\t\t\t   sed '/\\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \\\n\t\t\t   sort -u` ;; \\\n\tesac; \\\n\tfor file in $$dist_files; do \\\n\t  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \\\n\t  if test -d $$d/$$file; then \\\n\t    dir=`echo \"/$$file\" | sed -e 's,/[^/]*$$,,'`; \\\n\t    if test -d \"$(distdir)/$$file\"; then \\\n\t      find \"$(distdir)/$$file\" -type d ! -perm -700 -exec chmod u+rwx {} \\;; \\\n\t    fi; \\\n\t    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \\\n\t      cp -fpR $(srcdir)/$$file \"$(distdir)$$dir\" || exit 1; \\\n\t      find \"$(distdir)/$$file\" -type d ! -perm -700 -exec chmod u+rwx {} \\;; \\\n\t    fi; \\\n\t    cp -fpR $$d/$$file \"$(distdir)$$dir\" || exit 1; \\\n\t  else \\\n\t    test -f \"$(distdir)/$$file\" \\\n\t    || cp -p $$d/$$file \"$(distdir)/$$file\" \\\n\t    || exit 1; \\\n\t  fi; \\\n\tdone\ncheck-am: all-am\ncheck: check-am\nall-am: Makefile $(PROGRAMS)\ninstalldirs:\ninstall: install-am\ninstall-exec: install-exec-am\ninstall-data: install-data-am\nuninstall: uninstall-am\n\ninstall-am: all-am\n\t@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am\n\ninstallcheck: installcheck-am\ninstall-strip:\n\tif test -z '$(STRIP)'; then \\\n\t  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM=\"$(INSTALL_STRIP_PROGRAM)\" \\\n\t    install_sh_PROGRAM=\"$(INSTALL_STRIP_PROGRAM)\" INSTALL_STRIP_FLAG=-s \\\n\t      install; \\\n\telse \\\n\t  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM=\"$(INSTALL_STRIP_PROGRAM)\" \\\n\t    install_sh_PROGRAM=\"$(INSTALL_STRIP_PROGRAM)\" INSTALL_STRIP_FLAG=-s \\\n\t    \"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'\" install; \\\n\tfi\nmostlyclean-generic:\n\nclean-generic:\n\ndistclean-generic:\n\t-test -z \"$(CONFIG_CLEAN_FILES)\" || rm -f $(CONFIG_CLEAN_FILES)\n\t-test . = \"$(srcdir)\" || test -z \"$(CONFIG_CLEAN_VPATH_FILES)\" || rm -f $(CONFIG_CLEAN_VPATH_FILES)\n\nmaintainer-clean-generic:\n\t@echo \"This command is intended for maintainers to use\"\n\t@echo \"it deletes files that may require special tools to rebuild.\"\nclean: clean-am\n\nclean-am: clean-generic clean-libtool clean-noinstPROGRAMS \\\n\tmostlyclean-am\n\ndistclean: distclean-am\n\t-rm -rf ./$(DEPDIR)\n\t-rm -f Makefile\ndistclean-am: clean-am distclean-compile distclean-generic \\\n\tdistclean-tags\n\ndvi: dvi-am\n\ndvi-am:\n\nhtml: html-am\n\nhtml-am:\n\ninfo: info-am\n\ninfo-am:\n\ninstall-data-am:\n\ninstall-dvi: install-dvi-am\n\ninstall-dvi-am:\n\ninstall-exec-am:\n\ninstall-html: install-html-am\n\ninstall-html-am:\n\ninstall-info: install-info-am\n\ninstall-info-am:\n\ninstall-man:\n\ninstall-pdf: install-pdf-am\n\ninstall-pdf-am:\n\ninstall-ps: install-ps-am\n\ninstall-ps-am:\n\ninstallcheck-am:\n\nmaintainer-clean: maintainer-clean-am\n\t-rm -rf ./$(DEPDIR)\n\t-rm -f Makefile\nmaintainer-clean-am: distclean-am maintainer-clean-generic\n\nmostlyclean: mostlyclean-am\n\nmostlyclean-am: mostlyclean-compile mostlyclean-generic \\\n\tmostlyclean-libtool\n\npdf: pdf-am\n\npdf-am:\n\nps: ps-am\n\nps-am:\n\nuninstall-am:\n\n.MAKE: install-am install-strip\n\n.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \\\n\tclean-libtool clean-noinstPROGRAMS cscopelist-am ctags \\\n\tctags-am distclean distclean-compile distclean-generic \\\n\tdistclean-libtool distclean-tags distdir dvi dvi-am html \\\n\thtml-am info info-am install install-am install-data \\\n\tinstall-data-am install-dvi install-dvi-am install-exec \\\n\tinstall-exec-am install-html install-html-am install-info \\\n\tinstall-info-am install-man install-pdf install-pdf-am \\\n\tinstall-ps install-ps-am install-strip installcheck \\\n\tinstallcheck-am installdirs maintainer-clean \\\n\tmaintainer-clean-generic mostlyclean mostlyclean-compile \\\n\tmostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \\\n\ttags tags-am uninstall uninstall-am\n\n\n# Tell versions [3.59,3.63) of GNU make to not export all variables.\n# Otherwise a system limit (for SysV at least) may be exceeded.\n.NOEXPORT:\n"
  },
  {
    "path": "thirdparty/portaudio/bindings/cpp/build/gnu/Makefile.in",
    "content": "#\n# Makefile template for PortAudioCpp\n# Ludwig Schwardt\n# 01/10/2003\n#\n# Not much to edit here - rather check configure.ac\n#\n\nPREFIX = @prefix@\nCC = @CC@\nCXX = @CXX@\nCFLAGS = @CFLAGS@ @DEFS@\nCXXFLAGS = @CXXFLAGS@\nSHARED_FLAGS = @SHARED_FLAGS@\nLIBS = @LIBS@\nDLL_LIBS = @DLL_LIBS@\nAR = @AR@\nRANLIB = @RANLIB@\nINSTALL = @INSTALL@\n\nPACPP_ROOT = @PACPP_ROOT@\nPORTAUDIO = @PORTAUDIO@\nPADLL = @PADLL@\nPACPP_DLL = @PACPP_DLL@\nPALIB = libportaudio.a\nPACPP_LIB = libportaudiocpp.a\nPACPP_DLLV = $(PACPP_DLL).0.0.12\n\nSRCDIR = $(PACPP_ROOT)/source/portaudiocpp\nBINDIR = $(PACPP_ROOT)/example\nLIBDIR = $(PACPP_ROOT)/lib\nDOCDIR = $(PACPP_ROOT)/doc\n\nOBJS = \\\n       $(SRCDIR)/BlockingStream.o \\\n       $(SRCDIR)/CallbackInterface.o \\\n       $(SRCDIR)/CallbackStream.o \\\n       $(SRCDIR)/CFunCallbackStream.o \\\n       $(SRCDIR)/CppFunCallbackStream.o \\\n       $(SRCDIR)/Device.o \\\n       $(SRCDIR)/DirectionSpecificStreamParameters.o \\\n       $(SRCDIR)/Exception.o \\\n       $(SRCDIR)/HostApi.o \\\n       $(SRCDIR)/InterfaceCallbackStream.o \\\n       $(SRCDIR)/MemFunCallbackStream.o \\\n       $(SRCDIR)/Stream.o \\\n       $(SRCDIR)/StreamParameters.o \\\n       $(SRCDIR)/System.o \\\n       $(SRCDIR)/SystemDeviceIterator.o \\\n       $(SRCDIR)/SystemHostApiIterator.o\n\n# Not supported yet\n#      $(SRCDIR)/AsioDeviceAdapter.o\n\nEXAMPLES = \\\n           $(BINDIR)/devs \\\n\t   $(BINDIR)/sine\n\n.PHONY: all clean docs\n\nall: $(EXAMPLES) $(LIBDIR)/$(PACPP_LIB) $(LIBDIR)/$(PACPP_DLL)\n\nclean:\n\trm -rf $(SRCDIR)/*.o $(BINDIR)/*.o $(EXAMPLES) $(LIBDIR) $(DOCDIR)/api_reference \n\trm -rf autom4te.cache config.status config.log\n\ndocs:\n\tcd $(DOCDIR); doxygen config.doxy.linux\n\t\n%.o: %.c\n\t$(CC) -c $(CFLAGS) $< -o $@\n\t\t\n%.o: %.cxx\n\t$(CXX) -c $(CXXFLAGS) $< -o $@\n\n\n$(EXAMPLES): $(BINDIR)/%: $(BINDIR)/%.o $(OBJS)\n\t$(CXX) $^ -o $@ $(LIBS)\n\n$(LIBDIR)/$(PACPP_LIB): $(LIBDIR) $(OBJS)\n\t$(AR) ruv $(LIBDIR)/$(PACPP_LIB) $(OBJS)\n\t$(RANLIB) $(LIBDIR)/$(PACPP_LIB)\n\n$(LIBDIR)/$(PACPP_DLLV): $(LIBDIR) $(OBJS)\n\t$(CXX) $(SHARED_FLAGS) -o $(LIBDIR)/$(PACPP_DLLV) $(OBJS) $(DLL_LIBS)\n\n$(LIBDIR)/$(PACPP_DLL): $(LIBDIR) $(OBJS)\n\t$(CXX) $(SHARED_FLAGS) -o $(LIBDIR)/$(PACPP_DLL) $(OBJS) $(DLL_LIBS)\n\n#install: $(LIBDIR)/$(PACPP_LIB) $(LIBDIR)/$(PACPP_DLLV)\n#\t$(INSTALL) -m 644 $(LIBDIR)/$(PACPP_DLLV) $(PREFIX)/lib/$(PACPP_DLLV)\n#\t$(INSTALL) -m 644 $(LIBDIR)/$(PACPP_LIB) $(PREFIX)/lib/$(PACPP_LIB)\n#\tcd $(PREFIX)/lib && rm -f $(PACPP_DLL) && ln -s $(PACPP_DLLV) $(PACPP_DLL)\n#\t@echo \"\"\n#\t@echo \"------------------------------------------------------------\"\n#\t@echo \"PortAudioCpp was successfully installed.\"\n#\t@echo \"\"\n#\t@echo \"On some systems (e.g. Linux) you should run 'ldconfig' now\"\n#\t@echo \"to make the shared object available.  You may also need to\"\n#\t@echo \"modify your LD_LIBRARY_PATH environment variable to include\"\n#\t@echo \"the directory $(PREFIX)/lib\"\n#\t@echo \"------------------------------------------------------------\"\n#\t@echo \"\"\n\n$(LIBDIR):\n\tmkdir $(LIBDIR)\n"
  },
  {
    "path": "thirdparty/portaudio/bindings/cpp/build/gnu/OUT_OF_DATE",
    "content": ""
  },
  {
    "path": "thirdparty/portaudio/bindings/cpp/build/gnu/aclocal.m4",
    "content": "\ndnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not)\ndnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page\ndnl also defines GSTUFF_PKG_ERRORS on error\nAC_DEFUN(PKG_CHECK_MODULES, [\n  succeeded=no\n\n  if test -z \"$PKG_CONFIG\"; then\n    AC_PATH_PROG(PKG_CONFIG, pkg-config, no)\n  fi\n\n  if test \"$PKG_CONFIG\" = \"no\" ; then\n     echo \"*** The pkg-config script could not be found. Make sure it is\"\n     echo \"*** in your path, or set the PKG_CONFIG environment variable\"\n     echo \"*** to the full path to pkg-config.\"\n     echo \"*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config.\"\n  else\n     PKG_CONFIG_MIN_VERSION=0.9.0\n     if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then\n        AC_MSG_CHECKING(for $2)\n\n        if $PKG_CONFIG --exists \"$2\" ; then\n            AC_MSG_RESULT(yes)\n            succeeded=yes\n\n            AC_MSG_CHECKING($1_CFLAGS)\n            $1_CFLAGS=`$PKG_CONFIG --cflags \"$2\"`\n            AC_MSG_RESULT($$1_CFLAGS)\n\n            AC_MSG_CHECKING($1_LIBS)\n            $1_LIBS=`$PKG_CONFIG --libs \"$2\"`\n            AC_MSG_RESULT($$1_LIBS)\n        else\n            $1_CFLAGS=\"\"\n            $1_LIBS=\"\"\n            ## If we have a custom action on failure, don't print errors, but \n            ## do set a variable so people can do so.\n            $1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors \"$2\"`\n            ifelse([$4], ,echo $$1_PKG_ERRORS,)\n        fi\n\n        AC_SUBST($1_CFLAGS)\n        AC_SUBST($1_LIBS)\n     else\n        echo \"*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer.\"\n        echo \"*** See http://www.freedesktop.org/software/pkgconfig\"\n     fi\n  fi\n\n  if test $succeeded = yes; then\n     ifelse([$3], , :, [$3])\n  else\n     ifelse([$4], , AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.]), [$4])\n  fi\n])\n\n\n"
  },
  {
    "path": "thirdparty/portaudio/bindings/cpp/build/gnu/config.guess",
    "content": "#! /bin/sh\n# Attempt to guess a canonical system name.\n#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001\n#   Free Software Foundation, Inc.\n\ntimestamp='2001-10-05'\n\n# This file is free software; you can redistribute it and/or modify it\n# under the terms of the GNU General Public License as published by\n# the Free Software Foundation; either version 2 of the License, or\n# (at your option) any later version.\n#\n# This program is distributed in the hope that it will be useful, but\n# WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n# General Public License for more details.\n#\n# You should have received a copy of the GNU General Public License\n# along with this program; if not, write to the Free Software\n# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n#\n# As a special exception to the GNU General Public License, if you\n# distribute this file as part of a program that contains a\n# configuration script generated by Autoconf, you may include it under\n# the same distribution terms that you use for the rest of that program.\n\n# Originally written by Per Bothner <bothner@cygnus.com>.\n# Please send patches to <config-patches@gnu.org>.  Submit a context\n# diff and a properly formatted ChangeLog entry.\n#\n# This script attempts to guess a canonical system name similar to\n# config.sub.  If it succeeds, it prints the system name on stdout, and\n# exits with 0.  Otherwise, it exits with 1.\n#\n# The plan is that this can be called by configure scripts if you\n# don't specify an explicit build system type.\n\nme=`echo \"$0\" | sed -e 's,.*/,,'`\n\nusage=\"\\\nUsage: $0 [OPTION]\n\nOutput the configuration name of the system \\`$me' is run on.\n\nOperation modes:\n  -h, --help         print this help, then exit\n  -t, --time-stamp   print date of last modification, then exit\n  -v, --version      print version number, then exit\n\nReport bugs and patches to <config-patches@gnu.org>.\"\n\nversion=\"\\\nGNU config.guess ($timestamp)\n\nOriginally written by Per Bothner.\nCopyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001\nFree Software Foundation, Inc.\n\nThis is free software; see the source for copying conditions.  There is NO\nwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\"\n\nhelp=\"\nTry \\`$me --help' for more information.\"\n\n# Parse command line\nwhile test $# -gt 0 ; do\n  case $1 in\n    --time-stamp | --time* | -t )\n       echo \"$timestamp\" ; exit 0 ;;\n    --version | -v )\n       echo \"$version\" ; exit 0 ;;\n    --help | --h* | -h )\n       echo \"$usage\"; exit 0 ;;\n    -- )     # Stop option processing\n       shift; break ;;\n    - )\t# Use stdin as input.\n       break ;;\n    -* )\n       echo \"$me: invalid option $1$help\" >&2\n       exit 1 ;;\n    * )\n       break ;;\n  esac\ndone\n\nif test $# != 0; then\n  echo \"$me: too many arguments$help\" >&2\n  exit 1\nfi\n\n\ndummy=dummy-$$\ntrap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15\n\n# CC_FOR_BUILD -- compiler used by this script.\n# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still\n# use `HOST_CC' if defined, but it is deprecated.\n\nset_cc_for_build='case $CC_FOR_BUILD,$HOST_CC,$CC in\n ,,)    echo \"int dummy(){}\" > $dummy.c ;\n\tfor c in cc gcc c89 ; do\n\t  ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ;\n\t  if test $? = 0 ; then\n\t     CC_FOR_BUILD=\"$c\"; break ;\n\t  fi ;\n\tdone ;\n\trm -f $dummy.c $dummy.o $dummy.rel ;\n\tif test x\"$CC_FOR_BUILD\" = x ; then\n\t  CC_FOR_BUILD=no_compiler_found ;\n\tfi\n\t;;\n ,,*)   CC_FOR_BUILD=$CC ;;\n ,*,*)  CC_FOR_BUILD=$HOST_CC ;;\nesac'\n\n# This is needed to find uname on a Pyramid OSx when run in the BSD universe.\n# (ghazi@noc.rutgers.edu 1994-08-24)\nif (test -f /.attbin/uname) >/dev/null 2>&1 ; then\n\tPATH=$PATH:/.attbin ; export PATH\nfi\n\nUNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown\nUNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown\nUNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown\nUNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown\n\n# Note: order is significant - the case branches are not exclusive.\n\ncase \"${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}\" in\n    *:NetBSD:*:*)\n\t# NetBSD (nbsd) targets should (where applicable) match one or\n\t# more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,\n\t# *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently\n\t# switched to ELF, *-*-netbsd* would select the old\n\t# object file format.  This provides both forward\n\t# compatibility and a consistent mechanism for selecting the\n\t# object file format.\n\t# Determine the machine/vendor (is the vendor relevant).\n\tcase \"${UNAME_MACHINE}\" in\n\t    amiga) machine=m68k-unknown ;;\n\t    arm32) machine=arm-unknown ;;\n\t    atari*) machine=m68k-atari ;;\n\t    sun3*) machine=m68k-sun ;;\n\t    mac68k) machine=m68k-apple ;;\n\t    macppc) machine=powerpc-apple ;;\n\t    hp3[0-9][05]) machine=m68k-hp ;;\n\t    ibmrt|romp-ibm) machine=romp-ibm ;;\n\t    sparc*) machine=`uname -p`-unknown ;;\n\t    *) machine=${UNAME_MACHINE}-unknown ;;\n\tesac\n\t# The Operating System including object format, if it has switched\n\t# to ELF recently, or will in the future.\n\tcase \"${UNAME_MACHINE}\" in\n\t    i386|sparc|amiga|arm*|hp300|mvme68k|vax|atari|luna68k|mac68k|news68k|next68k|pc532|sun3*|x68k)\n\t\teval $set_cc_for_build\n\t\tif echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \\\n\t\t\t| grep __ELF__ >/dev/null\n\t\tthen\n\t\t    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).\n\t\t    # Return netbsd for either.  FIX?\n\t\t    os=netbsd\n\t\telse\n\t\t    os=netbsdelf\n\t\tfi\n\t\t;;\n\t    *)\n\t        os=netbsd\n\t\t;;\n\tesac\n\t# The OS release\n\trelease=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\\./'`\n\t# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:\n\t# contains redundant information, the shorter form:\n\t# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.\n\techo \"${machine}-${os}${release}\"\n\texit 0 ;;\n    amiga:OpenBSD:*:*)\n\techo m68k-unknown-openbsd${UNAME_RELEASE}\n\texit 0 ;;\n    arc:OpenBSD:*:*)\n\techo mipsel-unknown-openbsd${UNAME_RELEASE}\n\texit 0 ;;\n    hp300:OpenBSD:*:*)\n\techo m68k-unknown-openbsd${UNAME_RELEASE}\n\texit 0 ;;\n    mac68k:OpenBSD:*:*)\n\techo m68k-unknown-openbsd${UNAME_RELEASE}\n\texit 0 ;;\n    macppc:OpenBSD:*:*)\n\techo powerpc-unknown-openbsd${UNAME_RELEASE}\n\texit 0 ;;\n    mvme68k:OpenBSD:*:*)\n\techo m68k-unknown-openbsd${UNAME_RELEASE}\n\texit 0 ;;\n    mvme88k:OpenBSD:*:*)\n\techo m88k-unknown-openbsd${UNAME_RELEASE}\n\texit 0 ;;\n    mvmeppc:OpenBSD:*:*)\n\techo powerpc-unknown-openbsd${UNAME_RELEASE}\n\texit 0 ;;\n    pmax:OpenBSD:*:*)\n\techo mipsel-unknown-openbsd${UNAME_RELEASE}\n\texit 0 ;;\n    sgi:OpenBSD:*:*)\n\techo mipseb-unknown-openbsd${UNAME_RELEASE}\n\texit 0 ;;\n    sun3:OpenBSD:*:*)\n\techo m68k-unknown-openbsd${UNAME_RELEASE}\n\texit 0 ;;\n    wgrisc:OpenBSD:*:*)\n\techo mipsel-unknown-openbsd${UNAME_RELEASE}\n\texit 0 ;;\n    *:OpenBSD:*:*)\n\techo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}\n\texit 0 ;;\n    alpha:OSF1:*:*)\n\tif test $UNAME_RELEASE = \"V4.0\"; then\n\t\tUNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`\n\tfi\n\t# A Vn.n version is a released version.\n\t# A Tn.n version is a released field test version.\n\t# A Xn.n version is an unreleased experimental baselevel.\n\t# 1.2 uses \"1.2\" for uname -r.\n\tcat <<EOF >$dummy.s\n\t.data\n\\$Lformat:\n\t.byte 37,100,45,37,120,10,0\t# \"%d-%x\\n\"\n\n\t.text\n\t.globl main\n\t.align 4\n\t.ent main\nmain:\n\t.frame \\$30,16,\\$26,0\n\tldgp \\$29,0(\\$27)\n\t.prologue 1\n\t.long 0x47e03d80 # implver \\$0\n\tlda \\$2,-1\n\t.long 0x47e20c21 # amask \\$2,\\$1\n\tlda \\$16,\\$Lformat\n\tmov \\$0,\\$17\n\tnot \\$1,\\$18\n\tjsr \\$26,printf\n\tldgp \\$29,0(\\$26)\n\tmov 0,\\$16\n\tjsr \\$26,exit\n\t.end main\nEOF\n\teval $set_cc_for_build\n\t$CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null\n\tif test \"$?\" = 0 ; then\n\t\tcase `./$dummy` in\n\t\t\t0-0)\n\t\t\t\tUNAME_MACHINE=\"alpha\"\n\t\t\t\t;;\n\t\t\t1-0)\n\t\t\t\tUNAME_MACHINE=\"alphaev5\"\n\t\t\t\t;;\n\t\t\t1-1)\n\t\t\t\tUNAME_MACHINE=\"alphaev56\"\n\t\t\t\t;;\n\t\t\t1-101)\n\t\t\t\tUNAME_MACHINE=\"alphapca56\"\n\t\t\t\t;;\n\t\t\t2-303)\n\t\t\t\tUNAME_MACHINE=\"alphaev6\"\n\t\t\t\t;;\n\t\t\t2-307)\n\t\t\t\tUNAME_MACHINE=\"alphaev67\"\n\t\t\t\t;;\n\t\t\t2-1307)\n\t\t\t\tUNAME_MACHINE=\"alphaev68\"\n\t\t\t\t;;\n\t\tesac\n\tfi\n\trm -f $dummy.s $dummy\n\techo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`\n\texit 0 ;;\n    Alpha\\ *:Windows_NT*:*)\n\t# How do we know it's Interix rather than the generic POSIX subsystem?\n\t# Should we change UNAME_MACHINE based on the output of uname instead\n\t# of the specific Alpha model?\n\techo alpha-pc-interix\n\texit 0 ;;\n    21064:Windows_NT:50:3)\n\techo alpha-dec-winnt3.5\n\texit 0 ;;\n    Amiga*:UNIX_System_V:4.0:*)\n\techo m68k-unknown-sysv4\n\texit 0;;\n    *:[Aa]miga[Oo][Ss]:*:*)\n\techo ${UNAME_MACHINE}-unknown-amigaos\n\texit 0 ;;\n    *:OS/390:*:*)\n\techo i370-ibm-openedition\n\texit 0 ;;\n    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)\n\techo arm-acorn-riscix${UNAME_RELEASE}\n\texit 0;;\n    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)\n\techo hppa1.1-hitachi-hiuxmpp\n\texit 0;;\n    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)\n\t# akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.\n\tif test \"`(/bin/universe) 2>/dev/null`\" = att ; then\n\t\techo pyramid-pyramid-sysv3\n\telse\n\t\techo pyramid-pyramid-bsd\n\tfi\n\texit 0 ;;\n    NILE*:*:*:dcosx)\n\techo pyramid-pyramid-svr4\n\texit 0 ;;\n    sun4H:SunOS:5.*:*)\n\techo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`\n\texit 0 ;;\n    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)\n\techo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`\n\texit 0 ;;\n    i86pc:SunOS:5.*:*)\n\techo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`\n\texit 0 ;;\n    sun4*:SunOS:6*:*)\n\t# According to config.sub, this is the proper way to canonicalize\n\t# SunOS6.  Hard to guess exactly what SunOS6 will be like, but\n\t# it's likely to be more like Solaris than SunOS4.\n\techo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`\n\texit 0 ;;\n    sun4*:SunOS:*:*)\n\tcase \"`/usr/bin/arch -k`\" in\n\t    Series*|S4*)\n\t\tUNAME_RELEASE=`uname -v`\n\t\t;;\n\tesac\n\t# Japanese Language versions have a version number like `4.1.3-JL'.\n\techo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`\n\texit 0 ;;\n    sun3*:SunOS:*:*)\n\techo m68k-sun-sunos${UNAME_RELEASE}\n\texit 0 ;;\n    sun*:*:4.2BSD:*)\n\tUNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`\n\ttest \"x${UNAME_RELEASE}\" = \"x\" && UNAME_RELEASE=3\n\tcase \"`/bin/arch`\" in\n\t    sun3)\n\t\techo m68k-sun-sunos${UNAME_RELEASE}\n\t\t;;\n\t    sun4)\n\t\techo sparc-sun-sunos${UNAME_RELEASE}\n\t\t;;\n\tesac\n\texit 0 ;;\n    aushp:SunOS:*:*)\n\techo sparc-auspex-sunos${UNAME_RELEASE}\n\texit 0 ;;\n    # The situation for MiNT is a little confusing.  The machine name\n    # can be virtually everything (everything which is not\n    # \"atarist\" or \"atariste\" at least should have a processor\n    # > m68000).  The system name ranges from \"MiNT\" over \"FreeMiNT\"\n    # to the lowercase version \"mint\" (or \"freemint\").  Finally\n    # the system name \"TOS\" denotes a system which is actually not\n    # MiNT.  But MiNT is downward compatible to TOS, so this should\n    # be no problem.\n    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)\n        echo m68k-atari-mint${UNAME_RELEASE}\n\texit 0 ;;\n    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)\n\techo m68k-atari-mint${UNAME_RELEASE}\n        exit 0 ;;\n    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)\n        echo m68k-atari-mint${UNAME_RELEASE}\n\texit 0 ;;\n    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)\n        echo m68k-milan-mint${UNAME_RELEASE}\n        exit 0 ;;\n    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)\n        echo m68k-hades-mint${UNAME_RELEASE}\n        exit 0 ;;\n    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)\n        echo m68k-unknown-mint${UNAME_RELEASE}\n        exit 0 ;;\n    powerpc:machten:*:*)\n\techo powerpc-apple-machten${UNAME_RELEASE}\n\texit 0 ;;\n    RISC*:Mach:*:*)\n\techo mips-dec-mach_bsd4.3\n\texit 0 ;;\n    RISC*:ULTRIX:*:*)\n\techo mips-dec-ultrix${UNAME_RELEASE}\n\texit 0 ;;\n    VAX*:ULTRIX*:*:*)\n\techo vax-dec-ultrix${UNAME_RELEASE}\n\texit 0 ;;\n    2020:CLIX:*:* | 2430:CLIX:*:*)\n\techo clipper-intergraph-clix${UNAME_RELEASE}\n\texit 0 ;;\n    mips:*:*:UMIPS | mips:*:*:RISCos)\n\teval $set_cc_for_build\n\tsed 's/^\t//' << EOF >$dummy.c\n#ifdef __cplusplus\n#include <stdio.h>  /* for printf() prototype */\n\tint main (int argc, char *argv[]) {\n#else\n\tint main (argc, argv) int argc; char *argv[]; {\n#endif\n\t#if defined (host_mips) && defined (MIPSEB)\n\t#if defined (SYSTYPE_SYSV)\n\t  printf (\"mips-mips-riscos%ssysv\\n\", argv[1]); exit (0);\n\t#endif\n\t#if defined (SYSTYPE_SVR4)\n\t  printf (\"mips-mips-riscos%ssvr4\\n\", argv[1]); exit (0);\n\t#endif\n\t#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)\n\t  printf (\"mips-mips-riscos%sbsd\\n\", argv[1]); exit (0);\n\t#endif\n\t#endif\n\t  exit (-1);\n\t}\nEOF\n\t$CC_FOR_BUILD $dummy.c -o $dummy \\\n\t  && ./$dummy `echo \"${UNAME_RELEASE}\" | sed -n 's/\\([0-9]*\\).*/\\1/p'` \\\n\t  && rm -f $dummy.c $dummy && exit 0\n\trm -f $dummy.c $dummy\n\techo mips-mips-riscos${UNAME_RELEASE}\n\texit 0 ;;\n    Motorola:PowerMAX_OS:*:*)\n\techo powerpc-motorola-powermax\n\texit 0 ;;\n    Night_Hawk:Power_UNIX:*:*)\n\techo powerpc-harris-powerunix\n\texit 0 ;;\n    m88k:CX/UX:7*:*)\n\techo m88k-harris-cxux7\n\texit 0 ;;\n    m88k:*:4*:R4*)\n\techo m88k-motorola-sysv4\n\texit 0 ;;\n    m88k:*:3*:R3*)\n\techo m88k-motorola-sysv3\n\texit 0 ;;\n    AViiON:dgux:*:*)\n        # DG/UX returns AViiON for all architectures\n        UNAME_PROCESSOR=`/usr/bin/uname -p`\n\tif [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]\n\tthen\n\t    if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \\\n\t       [ ${TARGET_BINARY_INTERFACE}x = x ]\n\t    then\n\t\techo m88k-dg-dgux${UNAME_RELEASE}\n\t    else\n\t\techo m88k-dg-dguxbcs${UNAME_RELEASE}\n\t    fi\n\telse\n\t    echo i586-dg-dgux${UNAME_RELEASE}\n\tfi\n \texit 0 ;;\n    M88*:DolphinOS:*:*)\t# DolphinOS (SVR3)\n\techo m88k-dolphin-sysv3\n\texit 0 ;;\n    M88*:*:R3*:*)\n\t# Delta 88k system running SVR3\n\techo m88k-motorola-sysv3\n\texit 0 ;;\n    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)\n\techo m88k-tektronix-sysv3\n\texit 0 ;;\n    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)\n\techo m68k-tektronix-bsd\n\texit 0 ;;\n    *:IRIX*:*:*)\n\techo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`\n\texit 0 ;;\n    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.\n\techo romp-ibm-aix      # uname -m gives an 8 hex-code CPU id\n\texit 0 ;;              # Note that: echo \"'`uname -s`'\" gives 'AIX '\n    i*86:AIX:*:*)\n\techo i386-ibm-aix\n\texit 0 ;;\n    ia64:AIX:*:*)\n\tif [ -x /usr/bin/oslevel ] ; then\n\t\tIBM_REV=`/usr/bin/oslevel`\n\telse\n\t\tIBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}\n\tfi\n\techo ${UNAME_MACHINE}-ibm-aix${IBM_REV}\n\texit 0 ;;\n    *:AIX:2:3)\n\tif grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then\n\t\teval $set_cc_for_build\n\t\tsed 's/^\t\t//' << EOF >$dummy.c\n\t\t#include <sys/systemcfg.h>\n\n\t\tmain()\n\t\t\t{\n\t\t\tif (!__power_pc())\n\t\t\t\texit(1);\n\t\t\tputs(\"powerpc-ibm-aix3.2.5\");\n\t\t\texit(0);\n\t\t\t}\nEOF\n\t\t$CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0\n\t\trm -f $dummy.c $dummy\n\t\techo rs6000-ibm-aix3.2.5\n\telif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then\n\t\techo rs6000-ibm-aix3.2.4\n\telse\n\t\techo rs6000-ibm-aix3.2\n\tfi\n\texit 0 ;;\n    *:AIX:*:[45])\n\tIBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'`\n\tif /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then\n\t\tIBM_ARCH=rs6000\n\telse\n\t\tIBM_ARCH=powerpc\n\tfi\n\tif [ -x /usr/bin/oslevel ] ; then\n\t\tIBM_REV=`/usr/bin/oslevel`\n\telse\n\t\tIBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}\n\tfi\n\techo ${IBM_ARCH}-ibm-aix${IBM_REV}\n\texit 0 ;;\n    *:AIX:*:*)\n\techo rs6000-ibm-aix\n\texit 0 ;;\n    ibmrt:4.4BSD:*|romp-ibm:BSD:*)\n\techo romp-ibm-bsd4.4\n\texit 0 ;;\n    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and\n\techo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to\n\texit 0 ;;                           # report: romp-ibm BSD 4.3\n    *:BOSX:*:*)\n\techo rs6000-bull-bosx\n\texit 0 ;;\n    DPX/2?00:B.O.S.:*:*)\n\techo m68k-bull-sysv3\n\texit 0 ;;\n    9000/[34]??:4.3bsd:1.*:*)\n\techo m68k-hp-bsd\n\texit 0 ;;\n    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)\n\techo m68k-hp-bsd4.4\n\texit 0 ;;\n    9000/[34678]??:HP-UX:*:*)\n\tHPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`\n\tcase \"${UNAME_MACHINE}\" in\n\t    9000/31? )            HP_ARCH=m68000 ;;\n\t    9000/[34]?? )         HP_ARCH=m68k ;;\n\t    9000/[678][0-9][0-9])\n\t\tif [ -x /usr/bin/getconf ]; then\n\t\t    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`\n                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`\n                    case \"${sc_cpu_version}\" in\n                      523) HP_ARCH=\"hppa1.0\" ;; # CPU_PA_RISC1_0\n                      528) HP_ARCH=\"hppa1.1\" ;; # CPU_PA_RISC1_1\n                      532)                      # CPU_PA_RISC2_0\n                        case \"${sc_kernel_bits}\" in\n                          32) HP_ARCH=\"hppa2.0n\" ;;\n                          64) HP_ARCH=\"hppa2.0w\" ;;\n\t\t\t  '') HP_ARCH=\"hppa2.0\" ;;   # HP-UX 10.20\n                        esac ;;\n                    esac\n\t\tfi\n\t\tif [ \"${HP_ARCH}\" = \"\" ]; then\n\t\t    eval $set_cc_for_build\n\t\t    sed 's/^              //' << EOF >$dummy.c\n\n              #define _HPUX_SOURCE\n              #include <stdlib.h>\n              #include <unistd.h>\n\n              int main ()\n              {\n              #if defined(_SC_KERNEL_BITS)\n                  long bits = sysconf(_SC_KERNEL_BITS);\n              #endif\n                  long cpu  = sysconf (_SC_CPU_VERSION);\n\n                  switch (cpu)\n              \t{\n              \tcase CPU_PA_RISC1_0: puts (\"hppa1.0\"); break;\n              \tcase CPU_PA_RISC1_1: puts (\"hppa1.1\"); break;\n              \tcase CPU_PA_RISC2_0:\n              #if defined(_SC_KERNEL_BITS)\n              \t    switch (bits)\n              \t\t{\n              \t\tcase 64: puts (\"hppa2.0w\"); break;\n              \t\tcase 32: puts (\"hppa2.0n\"); break;\n              \t\tdefault: puts (\"hppa2.0\"); break;\n              \t\t} break;\n              #else  /* !defined(_SC_KERNEL_BITS) */\n              \t    puts (\"hppa2.0\"); break;\n              #endif\n              \tdefault: puts (\"hppa1.0\"); break;\n              \t}\n                  exit (0);\n              }\nEOF\n\t\t    (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null) && HP_ARCH=`./$dummy`\n\t\t    if test -z \"$HP_ARCH\"; then HP_ARCH=hppa; fi\n\t\t    rm -f $dummy.c $dummy\n\t\tfi ;;\n\tesac\n\techo ${HP_ARCH}-hp-hpux${HPUX_REV}\n\texit 0 ;;\n    ia64:HP-UX:*:*)\n\tHPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`\n\techo ia64-hp-hpux${HPUX_REV}\n\texit 0 ;;\n    3050*:HI-UX:*:*)\n\teval $set_cc_for_build\n\tsed 's/^\t//' << EOF >$dummy.c\n\t#include <unistd.h>\n\tint\n\tmain ()\n\t{\n\t  long cpu = sysconf (_SC_CPU_VERSION);\n\t  /* The order matters, because CPU_IS_HP_MC68K erroneously returns\n\t     true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct\n\t     results, however.  */\n\t  if (CPU_IS_PA_RISC (cpu))\n\t    {\n\t      switch (cpu)\n\t\t{\n\t\t  case CPU_PA_RISC1_0: puts (\"hppa1.0-hitachi-hiuxwe2\"); break;\n\t\t  case CPU_PA_RISC1_1: puts (\"hppa1.1-hitachi-hiuxwe2\"); break;\n\t\t  case CPU_PA_RISC2_0: puts (\"hppa2.0-hitachi-hiuxwe2\"); break;\n\t\t  default: puts (\"hppa-hitachi-hiuxwe2\"); break;\n\t\t}\n\t    }\n\t  else if (CPU_IS_HP_MC68K (cpu))\n\t    puts (\"m68k-hitachi-hiuxwe2\");\n\t  else puts (\"unknown-hitachi-hiuxwe2\");\n\t  exit (0);\n\t}\nEOF\n\t$CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0\n\trm -f $dummy.c $dummy\n\techo unknown-hitachi-hiuxwe2\n\texit 0 ;;\n    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )\n\techo hppa1.1-hp-bsd\n\texit 0 ;;\n    9000/8??:4.3bsd:*:*)\n\techo hppa1.0-hp-bsd\n\texit 0 ;;\n    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)\n\techo hppa1.0-hp-mpeix\n\texit 0 ;;\n    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )\n\techo hppa1.1-hp-osf\n\texit 0 ;;\n    hp8??:OSF1:*:*)\n\techo hppa1.0-hp-osf\n\texit 0 ;;\n    i*86:OSF1:*:*)\n\tif [ -x /usr/sbin/sysversion ] ; then\n\t    echo ${UNAME_MACHINE}-unknown-osf1mk\n\telse\n\t    echo ${UNAME_MACHINE}-unknown-osf1\n\tfi\n\texit 0 ;;\n    parisc*:Lites*:*:*)\n\techo hppa1.1-hp-lites\n\texit 0 ;;\n    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)\n\techo c1-convex-bsd\n        exit 0 ;;\n    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)\n\tif getsysinfo -f scalar_acc\n\tthen echo c32-convex-bsd\n\telse echo c2-convex-bsd\n\tfi\n        exit 0 ;;\n    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)\n\techo c34-convex-bsd\n        exit 0 ;;\n    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)\n\techo c38-convex-bsd\n        exit 0 ;;\n    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)\n\techo c4-convex-bsd\n        exit 0 ;;\n    CRAY*X-MP:*:*:*)\n\techo xmp-cray-unicos\n        exit 0 ;;\n    CRAY*Y-MP:*:*:*)\n\techo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\\.[^.]*$/.X/'\n\texit 0 ;;\n    CRAY*[A-Z]90:*:*:*)\n\techo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \\\n\t| sed -e 's/CRAY.*\\([A-Z]90\\)/\\1/' \\\n\t      -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \\\n\t      -e 's/\\.[^.]*$/.X/'\n\texit 0 ;;\n    CRAY*TS:*:*:*)\n\techo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\\.[^.]*$/.X/'\n\texit 0 ;;\n    CRAY*T3D:*:*:*)\n\techo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\\.[^.]*$/.X/'\n\texit 0 ;;\n    CRAY*T3E:*:*:*)\n\techo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\\.[^.]*$/.X/'\n\texit 0 ;;\n    CRAY*SV1:*:*:*)\n\techo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\\.[^.]*$/.X/'\n\texit 0 ;;\n    CRAY-2:*:*:*)\n\techo cray2-cray-unicos\n        exit 0 ;;\n    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)\n\tFUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`\n        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\\///'`\n        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`\n        echo \"${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}\"\n        exit 0 ;;\n    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\\ Embedded/OS:*:*)\n\techo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}\n\texit 0 ;;\n    sparc*:BSD/OS:*:*)\n\techo sparc-unknown-bsdi${UNAME_RELEASE}\n\texit 0 ;;\n    *:BSD/OS:*:*)\n\techo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}\n\texit 0 ;;\n    *:FreeBSD:*:*)\n\techo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`\n\texit 0 ;;\n    i*:CYGWIN*:*)\n\techo ${UNAME_MACHINE}-pc-cygwin\n\texit 0 ;;\n    i*:MINGW*:*)\n\techo ${UNAME_MACHINE}-pc-mingw32\n\texit 0 ;;\n    i*:PW*:*)\n\techo ${UNAME_MACHINE}-pc-pw32\n\texit 0 ;;\n    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)\n\t# How do we know it's Interix rather than the generic POSIX subsystem?\n\t# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we\n\t# UNAME_MACHINE based on the output of uname instead of i386?\n\techo i386-pc-interix\n\texit 0 ;;\n    i*:UWIN*:*)\n\techo ${UNAME_MACHINE}-pc-uwin\n\texit 0 ;;\n    p*:CYGWIN*:*)\n\techo powerpcle-unknown-cygwin\n\texit 0 ;;\n    prep*:SunOS:5.*:*)\n\techo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`\n\texit 0 ;;\n    *:GNU:*:*)\n\techo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`\n\texit 0 ;;\n    i*86:Minix:*:*)\n\techo ${UNAME_MACHINE}-pc-minix\n\texit 0 ;;\n    arm*:Linux:*:*)\n\techo ${UNAME_MACHINE}-unknown-linux-gnu\n\texit 0 ;;\n    ia64:Linux:*:*)\n\techo ${UNAME_MACHINE}-unknown-linux\n\texit 0 ;;\n    m68*:Linux:*:*)\n\techo ${UNAME_MACHINE}-unknown-linux-gnu\n\texit 0 ;;\n    mips:Linux:*:*)\n\tcase `sed -n '/^byte/s/^.*: \\(.*\\) endian/\\1/p' < /proc/cpuinfo` in\n\t  big)    echo mips-unknown-linux-gnu && exit 0 ;;\n\t  little) echo mipsel-unknown-linux-gnu && exit 0 ;;\n\tesac\n\t;;\n    ppc:Linux:*:*)\n\techo powerpc-unknown-linux-gnu\n\texit 0 ;;\n    ppc64:Linux:*:*)\n\techo powerpc64-unknown-linux-gnu\n\texit 0 ;;\n    alpha:Linux:*:*)\n\tcase `sed -n '/^cpu model/s/^.*: \\(.*\\)/\\1/p' < /proc/cpuinfo` in\n\t  EV5)   UNAME_MACHINE=alphaev5 ;;\n\t  EV56)  UNAME_MACHINE=alphaev56 ;;\n\t  PCA56) UNAME_MACHINE=alphapca56 ;;\n\t  PCA57) UNAME_MACHINE=alphapca56 ;;\n\t  EV6)   UNAME_MACHINE=alphaev6 ;;\n\t  EV67)  UNAME_MACHINE=alphaev67 ;;\n\t  EV68*) UNAME_MACHINE=alphaev68 ;;\n        esac\n\tobjdump --private-headers /bin/sh | grep ld.so.1 >/dev/null\n\tif test \"$?\" = 0 ; then LIBC=\"libc1\" ; else LIBC=\"\" ; fi\n\techo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}\n\texit 0 ;;\n    parisc:Linux:*:* | hppa:Linux:*:*)\n\t# Look for CPU level\n\tcase `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in\n\t  PA7*) echo hppa1.1-unknown-linux-gnu ;;\n\t  PA8*) echo hppa2.0-unknown-linux-gnu ;;\n\t  *)    echo hppa-unknown-linux-gnu ;;\n\tesac\n\texit 0 ;;\n    parisc64:Linux:*:* | hppa64:Linux:*:*)\n\techo hppa64-unknown-linux-gnu\n\texit 0 ;;\n    s390:Linux:*:* | s390x:Linux:*:*)\n\techo ${UNAME_MACHINE}-ibm-linux\n\texit 0 ;;\n    sh*:Linux:*:*)\n\techo ${UNAME_MACHINE}-unknown-linux-gnu\n\texit 0 ;;\n    sparc:Linux:*:* | sparc64:Linux:*:*)\n\techo ${UNAME_MACHINE}-unknown-linux-gnu\n\texit 0 ;;\n    x86_64:Linux:*:*)\n\techo x86_64-unknown-linux-gnu\n\texit 0 ;;\n    i*86:Linux:*:*)\n\t# The BFD linker knows what the default object file format is, so\n\t# first see if it will tell us. cd to the root directory to prevent\n\t# problems with other programs or directories called `ld' in the path.\n\tld_supported_targets=`cd /; ld --help 2>&1 \\\n\t\t\t | sed -ne '/supported targets:/!d\n\t\t\t\t    s/[ \t][ \t]*/ /g\n\t\t\t\t    s/.*supported targets: *//\n\t\t\t\t    s/ .*//\n\t\t\t\t    p'`\n        case \"$ld_supported_targets\" in\n\t  elf32-i386)\n\t\tTENTATIVE=\"${UNAME_MACHINE}-pc-linux-gnu\"\n\t\t;;\n\t  a.out-i386-linux)\n\t\techo \"${UNAME_MACHINE}-pc-linux-gnuaout\"\n\t\texit 0 ;;\t\t\n\t  coff-i386)\n\t\techo \"${UNAME_MACHINE}-pc-linux-gnucoff\"\n\t\texit 0 ;;\n\t  \"\")\n\t\t# Either a pre-BFD a.out linker (linux-gnuoldld) or\n\t\t# one that does not give us useful --help.\n\t\techo \"${UNAME_MACHINE}-pc-linux-gnuoldld\"\n\t\texit 0 ;;\n\tesac\n\t# Determine whether the default compiler is a.out or elf\n\teval $set_cc_for_build\n\tcat >$dummy.c <<EOF\n#include <features.h>\n#ifdef __cplusplus\n#include <stdio.h>  /* for printf() prototype */\n\tint main (int argc, char *argv[]) {\n#else\n\tint main (argc, argv) int argc; char *argv[]; {\n#endif\n#ifdef __ELF__\n# ifdef __GLIBC__\n#  if __GLIBC__ >= 2\n    printf (\"%s-pc-linux-gnu\\n\", argv[1]);\n#  else\n    printf (\"%s-pc-linux-gnulibc1\\n\", argv[1]);\n#  endif\n# else\n   printf (\"%s-pc-linux-gnulibc1\\n\", argv[1]);\n# endif\n#else\n  printf (\"%s-pc-linux-gnuaout\\n\", argv[1]);\n#endif\n  return 0;\n}\nEOF\n\t$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy \"${UNAME_MACHINE}\" && rm -f $dummy.c $dummy && exit 0\n\trm -f $dummy.c $dummy\n\ttest x\"${TENTATIVE}\" != x && echo \"${TENTATIVE}\" && exit 0\n\t;;\n    i*86:DYNIX/ptx:4*:*)\n\t# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.\n\t# earlier versions are messed up and put the nodename in both\n\t# sysname and nodename.\n\techo i386-sequent-sysv4\n\texit 0 ;;\n    i*86:UNIX_SV:4.2MP:2.*)\n        # Unixware is an offshoot of SVR4, but it has its own version\n        # number series starting with 2...\n        # I am not positive that other SVR4 systems won't match this,\n\t# I just have to hope.  -- rms.\n        # Use sysv4.2uw... so that sysv4* matches it.\n\techo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}\n\texit 0 ;;\n    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)\n\tUNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\\/MP$//'`\n\tif grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then\n\t\techo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}\n\telse\n\t\techo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}\n\tfi\n\texit 0 ;;\n    i*86:*:5:[78]*)\n\tcase `/bin/uname -X | grep \"^Machine\"` in\n\t    *486*)\t     UNAME_MACHINE=i486 ;;\n\t    *Pentium)\t     UNAME_MACHINE=i586 ;;\n\t    *Pent*|*Celeron) UNAME_MACHINE=i686 ;;\n\tesac\n\techo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}\n\texit 0 ;;\n    i*86:*:3.2:*)\n\tif test -f /usr/options/cb.name; then\n\t\tUNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`\n\t\techo ${UNAME_MACHINE}-pc-isc$UNAME_REL\n\telif /bin/uname -X 2>/dev/null >/dev/null ; then\n\t\tUNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')`\n\t\t(/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486\n\t\t(/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \\\n\t\t\t&& UNAME_MACHINE=i586\n\t\t(/bin/uname -X|egrep '^Machine.*Pent ?II' >/dev/null) \\\n\t\t\t&& UNAME_MACHINE=i686\n\t\t(/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \\\n\t\t\t&& UNAME_MACHINE=i686\n\t\techo ${UNAME_MACHINE}-pc-sco$UNAME_REL\n\telse\n\t\techo ${UNAME_MACHINE}-pc-sysv32\n\tfi\n\texit 0 ;;\n    i*86:*DOS:*:*)\n\techo ${UNAME_MACHINE}-pc-msdosdjgpp\n\texit 0 ;;\n    pc:*:*:*)\n\t# Left here for compatibility:\n        # uname -m prints for DJGPP always 'pc', but it prints nothing about\n        # the processor, so we play safe by assuming i386.\n\techo i386-pc-msdosdjgpp\n        exit 0 ;;\n    Intel:Mach:3*:*)\n\techo i386-pc-mach3\n\texit 0 ;;\n    paragon:*:*:*)\n\techo i860-intel-osf1\n\texit 0 ;;\n    i860:*:4.*:*) # i860-SVR4\n\tif grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then\n\t  echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4\n\telse # Add other i860-SVR4 vendors below as they are discovered.\n\t  echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4\n\tfi\n\texit 0 ;;\n    mini*:CTIX:SYS*5:*)\n\t# \"miniframe\"\n\techo m68010-convergent-sysv\n\texit 0 ;;\n    M68*:*:R3V[567]*:*)\n\ttest -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;\n    3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0)\n\tOS_REL=''\n\ttest -r /etc/.relid \\\n\t&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \\([0-9][0-9]\\).*/\\1/p' < /etc/.relid`\n\t/bin/uname -p 2>/dev/null | grep 86 >/dev/null \\\n\t  && echo i486-ncr-sysv4.3${OS_REL} && exit 0\n\t/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \\\n\t  && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;;\n    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)\n        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \\\n          && echo i486-ncr-sysv4 && exit 0 ;;\n    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)\n\techo m68k-unknown-lynxos${UNAME_RELEASE}\n\texit 0 ;;\n    mc68030:UNIX_System_V:4.*:*)\n\techo m68k-atari-sysv4\n\texit 0 ;;\n    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)\n\techo i386-unknown-lynxos${UNAME_RELEASE}\n\texit 0 ;;\n    TSUNAMI:LynxOS:2.*:*)\n\techo sparc-unknown-lynxos${UNAME_RELEASE}\n\texit 0 ;;\n    rs6000:LynxOS:2.*:*)\n\techo rs6000-unknown-lynxos${UNAME_RELEASE}\n\texit 0 ;;\n    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)\n\techo powerpc-unknown-lynxos${UNAME_RELEASE}\n\texit 0 ;;\n    SM[BE]S:UNIX_SV:*:*)\n\techo mips-dde-sysv${UNAME_RELEASE}\n\texit 0 ;;\n    RM*:ReliantUNIX-*:*:*)\n\techo mips-sni-sysv4\n\texit 0 ;;\n    RM*:SINIX-*:*:*)\n\techo mips-sni-sysv4\n\texit 0 ;;\n    *:SINIX-*:*:*)\n\tif uname -p 2>/dev/null >/dev/null ; then\n\t\tUNAME_MACHINE=`(uname -p) 2>/dev/null`\n\t\techo ${UNAME_MACHINE}-sni-sysv4\n\telse\n\t\techo ns32k-sni-sysv\n\tfi\n\texit 0 ;;\n    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort\n                      # says <Richard.M.Bartel@ccMail.Census.GOV>\n        echo i586-unisys-sysv4\n        exit 0 ;;\n    *:UNIX_System_V:4*:FTX*)\n\t# From Gerald Hewes <hewes@openmarket.com>.\n\t# How about differentiating between stratus architectures? -djm\n\techo hppa1.1-stratus-sysv4\n\texit 0 ;;\n    *:*:*:FTX*)\n\t# From seanf@swdc.stratus.com.\n\techo i860-stratus-sysv4\n\texit 0 ;;\n    *:VOS:*:*)\n\t# From Paul.Green@stratus.com.\n\techo hppa1.1-stratus-vos\n\texit 0 ;;\n    mc68*:A/UX:*:*)\n\techo m68k-apple-aux${UNAME_RELEASE}\n\texit 0 ;;\n    news*:NEWS-OS:6*:*)\n\techo mips-sony-newsos6\n\texit 0 ;;\n    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)\n\tif [ -d /usr/nec ]; then\n\t        echo mips-nec-sysv${UNAME_RELEASE}\n\telse\n\t        echo mips-unknown-sysv${UNAME_RELEASE}\n\tfi\n        exit 0 ;;\n    BeBox:BeOS:*:*)\t# BeOS running on hardware made by Be, PPC only.\n\techo powerpc-be-beos\n\texit 0 ;;\n    BeMac:BeOS:*:*)\t# BeOS running on Mac or Mac clone, PPC only.\n\techo powerpc-apple-beos\n\texit 0 ;;\n    BePC:BeOS:*:*)\t# BeOS running on Intel PC compatible.\n\techo i586-pc-beos\n\texit 0 ;;\n    SX-4:SUPER-UX:*:*)\n\techo sx4-nec-superux${UNAME_RELEASE}\n\texit 0 ;;\n    SX-5:SUPER-UX:*:*)\n\techo sx5-nec-superux${UNAME_RELEASE}\n\texit 0 ;;\n    Power*:Rhapsody:*:*)\n\techo powerpc-apple-rhapsody${UNAME_RELEASE}\n\texit 0 ;;\n    *:Rhapsody:*:*)\n\techo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}\n\texit 0 ;;\n    *:Darwin:*:*)\n\techo `uname -p`-apple-darwin${UNAME_RELEASE}\n\texit 0 ;;\n    *:procnto*:*:* | *:QNX:[0123456789]*:*)\n\tif test \"${UNAME_MACHINE}\" = \"x86pc\"; then\n\t\tUNAME_MACHINE=pc\n\tfi\n\techo `uname -p`-${UNAME_MACHINE}-nto-qnx\n\texit 0 ;;\n    *:QNX:*:4*)\n\techo i386-pc-qnx\n\texit 0 ;;\n    NSR-[KW]:NONSTOP_KERNEL:*:*)\n\techo nsr-tandem-nsk${UNAME_RELEASE}\n\texit 0 ;;\n    *:NonStop-UX:*:*)\n\techo mips-compaq-nonstopux\n\texit 0 ;;\n    BS2000:POSIX*:*:*)\n\techo bs2000-siemens-sysv\n\texit 0 ;;\n    DS/*:UNIX_System_V:*:*)\n\techo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}\n\texit 0 ;;\n    *:Plan9:*:*)\n\t# \"uname -m\" is not consistent, so use $cputype instead. 386\n\t# is converted to i386 for consistency with other x86\n\t# operating systems.\n\tif test \"$cputype\" = \"386\"; then\n\t    UNAME_MACHINE=i386\n\telse\n\t    UNAME_MACHINE=\"$cputype\"\n\tfi\n\techo ${UNAME_MACHINE}-unknown-plan9\n\texit 0 ;;\n    i*86:OS/2:*:*)\n\t# If we were able to find `uname', then EMX Unix compatibility\n\t# is probably installed.\n\techo ${UNAME_MACHINE}-pc-os2-emx\n\texit 0 ;;\n    *:TOPS-10:*:*)\n\techo pdp10-unknown-tops10\n\texit 0 ;;\n    *:TENEX:*:*)\n\techo pdp10-unknown-tenex\n\texit 0 ;;\n    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)\n\techo pdp10-dec-tops20\n\texit 0 ;;\n    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)\n\techo pdp10-xkl-tops20\n\texit 0 ;;\n    *:TOPS-20:*:*)\n\techo pdp10-unknown-tops20\n\texit 0 ;;\n    *:ITS:*:*)\n\techo pdp10-unknown-its\n\texit 0 ;;\n    i*86:XTS-300:*:STOP)\n\techo ${UNAME_MACHINE}-unknown-stop\n\texit 0 ;;\n    i*86:atheos:*:*)\n\techo ${UNAME_MACHINE}-unknown-atheos\n\texit 0 ;;\nesac\n\n#echo '(No uname command or uname output not recognized.)' 1>&2\n#echo \"${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}\" 1>&2\n\neval $set_cc_for_build\ncat >$dummy.c <<EOF\n#ifdef _SEQUENT_\n# include <sys/types.h>\n# include <sys/utsname.h>\n#endif\nmain ()\n{\n#if defined (sony)\n#if defined (MIPSEB)\n  /* BFD wants \"bsd\" instead of \"newsos\".  Perhaps BFD should be changed,\n     I don't know....  */\n  printf (\"mips-sony-bsd\\n\"); exit (0);\n#else\n#include <sys/param.h>\n  printf (\"m68k-sony-newsos%s\\n\",\n#ifdef NEWSOS4\n          \"4\"\n#else\n\t  \"\"\n#endif\n         ); exit (0);\n#endif\n#endif\n\n#if defined (__arm) && defined (__acorn) && defined (__unix)\n  printf (\"arm-acorn-riscix\"); exit (0);\n#endif\n\n#if defined (hp300) && !defined (hpux)\n  printf (\"m68k-hp-bsd\\n\"); exit (0);\n#endif\n\n#if defined (NeXT)\n#if !defined (__ARCHITECTURE__)\n#define __ARCHITECTURE__ \"m68k\"\n#endif\n  int version;\n  version=`(hostinfo | sed -n 's/.*NeXT Mach \\([0-9]*\\).*/\\1/p') 2>/dev/null`;\n  if (version < 4)\n    printf (\"%s-next-nextstep%d\\n\", __ARCHITECTURE__, version);\n  else\n    printf (\"%s-next-openstep%d\\n\", __ARCHITECTURE__, version);\n  exit (0);\n#endif\n\n#if defined (MULTIMAX) || defined (n16)\n#if defined (UMAXV)\n  printf (\"ns32k-encore-sysv\\n\"); exit (0);\n#else\n#if defined (CMU)\n  printf (\"ns32k-encore-mach\\n\"); exit (0);\n#else\n  printf (\"ns32k-encore-bsd\\n\"); exit (0);\n#endif\n#endif\n#endif\n\n#if defined (__386BSD__)\n  printf (\"i386-pc-bsd\\n\"); exit (0);\n#endif\n\n#if defined (sequent)\n#if defined (i386)\n  printf (\"i386-sequent-dynix\\n\"); exit (0);\n#endif\n#if defined (ns32000)\n  printf (\"ns32k-sequent-dynix\\n\"); exit (0);\n#endif\n#endif\n\n#if defined (_SEQUENT_)\n    struct utsname un;\n\n    uname(&un);\n\n    if (strncmp(un.version, \"V2\", 2) == 0) {\n\tprintf (\"i386-sequent-ptx2\\n\"); exit (0);\n    }\n    if (strncmp(un.version, \"V1\", 2) == 0) { /* XXX is V1 correct? */\n\tprintf (\"i386-sequent-ptx1\\n\"); exit (0);\n    }\n    printf (\"i386-sequent-ptx\\n\"); exit (0);\n\n#endif\n\n#if defined (vax)\n# if !defined (ultrix)\n#  include <sys/param.h>\n#  if defined (BSD)\n#   if BSD == 43\n      printf (\"vax-dec-bsd4.3\\n\"); exit (0);\n#   else\n#    if BSD == 199006\n      printf (\"vax-dec-bsd4.3reno\\n\"); exit (0);\n#    else\n      printf (\"vax-dec-bsd\\n\"); exit (0);\n#    endif\n#   endif\n#  else\n    printf (\"vax-dec-bsd\\n\"); exit (0);\n#  endif\n# else\n    printf (\"vax-dec-ultrix\\n\"); exit (0);\n# endif\n#endif\n\n#if defined (alliant) && defined (i860)\n  printf (\"i860-alliant-bsd\\n\"); exit (0);\n#endif\n\n  exit (1);\n}\nEOF\n\n$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm -f $dummy.c $dummy && exit 0\nrm -f $dummy.c $dummy\n\n# Apollos put the system type in the environment.\n\ntest -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }\n\n# Convex versions that predate uname can use getsysinfo(1)\n\nif [ -x /usr/convex/getsysinfo ]\nthen\n    case `getsysinfo -f cpu_type` in\n    c1*)\n\techo c1-convex-bsd\n\texit 0 ;;\n    c2*)\n\tif getsysinfo -f scalar_acc\n\tthen echo c32-convex-bsd\n\telse echo c2-convex-bsd\n\tfi\n\texit 0 ;;\n    c34*)\n\techo c34-convex-bsd\n\texit 0 ;;\n    c38*)\n\techo c38-convex-bsd\n\texit 0 ;;\n    c4*)\n\techo c4-convex-bsd\n\texit 0 ;;\n    esac\nfi\n\ncat >&2 <<EOF\n$0: unable to guess system type\n\nThis script, last modified $timestamp, has failed to recognize\nthe operating system you are using. It is advised that you\ndownload the most up to date version of the config scripts from\n\n    ftp://ftp.gnu.org/pub/gnu/config/\n\nIf the version you run ($0) is already up to date, please\nsend the following data and any information you think might be\npertinent to <config-patches@gnu.org> in order to provide the needed\ninformation to handle your system.\n\nconfig.guess timestamp = $timestamp\n\nuname -m = `(uname -m) 2>/dev/null || echo unknown`\nuname -r = `(uname -r) 2>/dev/null || echo unknown`\nuname -s = `(uname -s) 2>/dev/null || echo unknown`\nuname -v = `(uname -v) 2>/dev/null || echo unknown`\n\n/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`\n/bin/uname -X     = `(/bin/uname -X) 2>/dev/null`\n\nhostinfo               = `(hostinfo) 2>/dev/null`\n/bin/universe          = `(/bin/universe) 2>/dev/null`\n/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`\n/bin/arch              = `(/bin/arch) 2>/dev/null`\n/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`\n/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`\n\nUNAME_MACHINE = ${UNAME_MACHINE}\nUNAME_RELEASE = ${UNAME_RELEASE}\nUNAME_SYSTEM  = ${UNAME_SYSTEM}\nUNAME_VERSION = ${UNAME_VERSION}\nEOF\n\nexit 1\n\n# Local variables:\n# eval: (add-hook 'write-file-hooks 'time-stamp)\n# time-stamp-start: \"timestamp='\"\n# time-stamp-format: \"%:y-%02m-%02d\"\n# time-stamp-end: \"'\"\n# End:\n"
  },
  {
    "path": "thirdparty/portaudio/bindings/cpp/build/gnu/config.sub",
    "content": "#! /bin/sh\n# Configuration validation subroutine script.\n#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,\n#   2000, 2001, 2002, 2003 Free Software Foundation, Inc.\n\ntimestamp='2003-07-17'\n\n# This file is (in principle) common to ALL GNU software.\n# The presence of a machine in this file suggests that SOME GNU software\n# can handle that machine.  It does not imply ALL GNU software can.\n#\n# This file is free software; you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation; either version 2 of the License, or\n# (at your option) any later version.\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n# GNU General Public License for more details.\n#\n# You should have received a copy of the GNU General Public License\n# along with this program; if not, write to the Free Software\n# Foundation, Inc., 59 Temple Place - Suite 330,\n# Boston, MA 02111-1307, USA.\n\n# As a special exception to the GNU General Public License, if you\n# distribute this file as part of a program that contains a\n# configuration script generated by Autoconf, you may include it under\n# the same distribution terms that you use for the rest of that program.\n\n# Please send patches to <config-patches@gnu.org>.  Submit a context\n# diff and a properly formatted ChangeLog entry.\n#\n# Configuration subroutine to validate and canonicalize a configuration type.\n# Supply the specified configuration type as an argument.\n# If it is invalid, we print an error message on stderr and exit with code 1.\n# Otherwise, we print the canonical config type on stdout and succeed.\n\n# This file is supposed to be the same for all GNU packages\n# and recognize all the CPU types, system types and aliases\n# that are meaningful with *any* GNU software.\n# Each package is responsible for reporting which valid configurations\n# it does not support.  The user should be able to distinguish\n# a failure to support a valid configuration from a meaningless\n# configuration.\n\n# The goal of this file is to map all the various variations of a given\n# machine specification into a single specification in the form:\n#\tCPU_TYPE-MANUFACTURER-OPERATING_SYSTEM\n# or in some cases, the newer four-part form:\n#\tCPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM\n# It is wrong to echo any other type of specification.\n\nme=`echo \"$0\" | sed -e 's,.*/,,'`\n\nusage=\"\\\nUsage: $0 [OPTION] CPU-MFR-OPSYS\n       $0 [OPTION] ALIAS\n\nCanonicalize a configuration name.\n\nOperation modes:\n  -h, --help         print this help, then exit\n  -t, --time-stamp   print date of last modification, then exit\n  -v, --version      print version number, then exit\n\nReport bugs and patches to <config-patches@gnu.org>.\"\n\nversion=\"\\\nGNU config.sub ($timestamp)\n\nCopyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001\nFree Software Foundation, Inc.\n\nThis is free software; see the source for copying conditions.  There is NO\nwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\"\n\nhelp=\"\nTry \\`$me --help' for more information.\"\n\n# Parse command line\nwhile test $# -gt 0 ; do\n  case $1 in\n    --time-stamp | --time* | -t )\n       echo \"$timestamp\" ; exit 0 ;;\n    --version | -v )\n       echo \"$version\" ; exit 0 ;;\n    --help | --h* | -h )\n       echo \"$usage\"; exit 0 ;;\n    -- )     # Stop option processing\n       shift; break ;;\n    - )\t# Use stdin as input.\n       break ;;\n    -* )\n       echo \"$me: invalid option $1$help\"\n       exit 1 ;;\n\n    *local*)\n       # First pass through any local machine types.\n       echo $1\n       exit 0;;\n\n    * )\n       break ;;\n  esac\ndone\n\ncase $# in\n 0) echo \"$me: missing argument$help\" >&2\n    exit 1;;\n 1) ;;\n *) echo \"$me: too many arguments$help\" >&2\n    exit 1;;\nesac\n\n# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).\n# Here we must recognize all the valid KERNEL-OS combinations.\nmaybe_os=`echo $1 | sed 's/^\\(.*\\)-\\([^-]*-[^-]*\\)$/\\2/'`\ncase $maybe_os in\n  nto-qnx* | linux-gnu* | kfreebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)\n    os=-$maybe_os\n    basic_machine=`echo $1 | sed 's/^\\(.*\\)-\\([^-]*-[^-]*\\)$/\\1/'`\n    ;;\n  *)\n    basic_machine=`echo $1 | sed 's/-[^-]*$//'`\n    if [ $basic_machine != $1 ]\n    then os=`echo $1 | sed 's/.*-/-/'`\n    else os=; fi\n    ;;\nesac\n\n### Let's recognize common machines as not being operating systems so\n### that things like config.sub decstation-3100 work.  We also\n### recognize some manufacturers as not being operating systems, so we\n### can provide default operating systems below.\ncase $os in\n\t-sun*os*)\n\t\t# Prevent following clause from handling this invalid input.\n\t\t;;\n\t-dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \\\n\t-att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \\\n\t-unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \\\n\t-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\\\n\t-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \\\n\t-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \\\n\t-apple | -axis)\n\t\tos=\n\t\tbasic_machine=$1\n\t\t;;\n\t-sim | -cisco | -oki | -wec | -winbond)\n\t\tos=\n\t\tbasic_machine=$1\n\t\t;;\n\t-scout)\n\t\t;;\n\t-wrs)\n\t\tos=-vxworks\n\t\tbasic_machine=$1\n\t\t;;\n\t-chorusos*)\n\t\tos=-chorusos\n\t\tbasic_machine=$1\n\t\t;;\n \t-chorusrdb)\n \t\tos=-chorusrdb\n\t\tbasic_machine=$1\n \t\t;;\n\t-hiux*)\n\t\tos=-hiuxwe2\n\t\t;;\n\t-sco5)\n\t\tos=-sco3.2v5\n\t\tbasic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`\n\t\t;;\n\t-sco4)\n\t\tos=-sco3.2v4\n\t\tbasic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`\n\t\t;;\n\t-sco3.2.[4-9]*)\n\t\tos=`echo $os | sed -e 's/sco3.2./sco3.2v/'`\n\t\tbasic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`\n\t\t;;\n\t-sco3.2v[4-9]*)\n\t\t# Don't forget version if it is 3.2v4 or newer.\n\t\tbasic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`\n\t\t;;\n\t-sco*)\n\t\tos=-sco3.2v2\n\t\tbasic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`\n\t\t;;\n\t-udk*)\n\t\tbasic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`\n\t\t;;\n\t-isc)\n\t\tos=-isc2.2\n\t\tbasic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`\n\t\t;;\n\t-clix*)\n\t\tbasic_machine=clipper-intergraph\n\t\t;;\n\t-isc*)\n\t\tbasic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`\n\t\t;;\n\t-lynx*)\n\t\tos=-lynxos\n\t\t;;\n\t-ptx*)\n\t\tbasic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`\n\t\t;;\n\t-windowsnt*)\n\t\tos=`echo $os | sed -e 's/windowsnt/winnt/'`\n\t\t;;\n\t-psos*)\n\t\tos=-psos\n\t\t;;\n\t-mint | -mint[0-9]*)\n\t\tbasic_machine=m68k-atari\n\t\tos=-mint\n\t\t;;\nesac\n\n# Decode aliases for certain CPU-COMPANY combinations.\ncase $basic_machine in\n\t# Recognize the basic CPU types without company name.\n\t# Some are omitted here because they have special meanings below.\n\t1750a | 580 \\\n\t| a29k \\\n\t| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \\\n\t| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \\\n\t| am33_2.0 \\\n\t| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \\\n\t| c4x | clipper \\\n\t| d10v | d30v | dlx | dsp16xx \\\n\t| fr30 | frv \\\n\t| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \\\n\t| i370 | i860 | i960 | ia64 \\\n\t| ip2k | iq2000 \\\n\t| m32r | m68000 | m68k | m88k | mcore \\\n\t| mips | mipsbe | mipseb | mipsel | mipsle \\\n\t| mips16 \\\n\t| mips64 | mips64el \\\n\t| mips64vr | mips64vrel \\\n\t| mips64orion | mips64orionel \\\n\t| mips64vr4100 | mips64vr4100el \\\n\t| mips64vr4300 | mips64vr4300el \\\n\t| mips64vr5000 | mips64vr5000el \\\n\t| mipsisa32 | mipsisa32el \\\n\t| mipsisa32r2 | mipsisa32r2el \\\n\t| mipsisa64 | mipsisa64el \\\n\t| mipsisa64sb1 | mipsisa64sb1el \\\n\t| mipsisa64sr71k | mipsisa64sr71kel \\\n\t| mipstx39 | mipstx39el \\\n\t| mn10200 | mn10300 \\\n\t| msp430 \\\n\t| ns16k | ns32k \\\n\t| openrisc | or32 \\\n\t| pdp10 | pdp11 | pj | pjl \\\n\t| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \\\n\t| pyramid \\\n\t| sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \\\n\t| sh64 | sh64le \\\n\t| sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \\\n\t| strongarm \\\n\t| tahoe | thumb | tic4x | tic80 | tron \\\n\t| v850 | v850e \\\n\t| we32k \\\n\t| x86 | xscale | xstormy16 | xtensa \\\n\t| z8k)\n\t\tbasic_machine=$basic_machine-unknown\n\t\t;;\n\tm6811 | m68hc11 | m6812 | m68hc12)\n\t\t# Motorola 68HC11/12.\n\t\tbasic_machine=$basic_machine-unknown\n\t\tos=-none\n\t\t;;\n\tm88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)\n\t\t;;\n\n\t# We use `pc' rather than `unknown'\n\t# because (1) that's what they normally are, and\n\t# (2) the word \"unknown\" tends to confuse beginning users.\n\ti*86 | x86_64)\n\t  basic_machine=$basic_machine-pc\n\t  ;;\n\t# Object if more than one company name word.\n\t*-*-*)\n\t\techo Invalid configuration \\`$1\\': machine \\`$basic_machine\\' not recognized 1>&2\n\t\texit 1\n\t\t;;\n\t# Recognize the basic CPU types with company name.\n\t580-* \\\n\t| a29k-* \\\n\t| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \\\n\t| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \\\n\t| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \\\n\t| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \\\n\t| avr-* \\\n\t| bs2000-* \\\n\t| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \\\n\t| clipper-* | cydra-* \\\n\t| d10v-* | d30v-* | dlx-* \\\n\t| elxsi-* \\\n\t| f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \\\n\t| h8300-* | h8500-* \\\n\t| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \\\n\t| i*86-* | i860-* | i960-* | ia64-* \\\n\t| ip2k-* | iq2000-* \\\n\t| m32r-* \\\n\t| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \\\n\t| m88110-* | m88k-* | mcore-* \\\n\t| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \\\n\t| mips16-* \\\n\t| mips64-* | mips64el-* \\\n\t| mips64vr-* | mips64vrel-* \\\n\t| mips64orion-* | mips64orionel-* \\\n\t| mips64vr4100-* | mips64vr4100el-* \\\n\t| mips64vr4300-* | mips64vr4300el-* \\\n\t| mips64vr5000-* | mips64vr5000el-* \\\n\t| mipsisa32-* | mipsisa32el-* \\\n\t| mipsisa32r2-* | mipsisa32r2el-* \\\n\t| mipsisa64-* | mipsisa64el-* \\\n\t| mipsisa64sb1-* | mipsisa64sb1el-* \\\n\t| mipsisa64sr71k-* | mipsisa64sr71kel-* \\\n\t| mipstx39-* | mipstx39el-* \\\n\t| msp430-* \\\n\t| none-* | np1-* | nv1-* | ns16k-* | ns32k-* \\\n\t| orion-* \\\n\t| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \\\n\t| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \\\n\t| pyramid-* \\\n\t| romp-* | rs6000-* \\\n\t| sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \\\n\t| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \\\n\t| sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \\\n\t| sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \\\n\t| tahoe-* | thumb-* \\\n\t| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \\\n\t| tron-* \\\n\t| v850-* | v850e-* | vax-* \\\n\t| we32k-* \\\n\t| x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \\\n\t| xtensa-* \\\n\t| ymp-* \\\n\t| z8k-*)\n\t\t;;\n\t# Recognize the various machine names and aliases which stand\n\t# for a CPU type and a company and sometimes even an OS.\n\t386bsd)\n\t\tbasic_machine=i386-unknown\n\t\tos=-bsd\n\t\t;;\n\t3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)\n\t\tbasic_machine=m68000-att\n\t\t;;\n\t3b*)\n\t\tbasic_machine=we32k-att\n\t\t;;\n\ta29khif)\n\t\tbasic_machine=a29k-amd\n\t\tos=-udi\n\t\t;;\n\tadobe68k)\n\t\tbasic_machine=m68010-adobe\n\t\tos=-scout\n\t\t;;\n\talliant | fx80)\n\t\tbasic_machine=fx80-alliant\n\t\t;;\n\taltos | altos3068)\n\t\tbasic_machine=m68k-altos\n\t\t;;\n\tam29k)\n\t\tbasic_machine=a29k-none\n\t\tos=-bsd\n\t\t;;\n\tamd64)\n\t\tbasic_machine=x86_64-pc\n\t\t;;\n\tamdahl)\n\t\tbasic_machine=580-amdahl\n\t\tos=-sysv\n\t\t;;\n\tamiga | amiga-*)\n\t\tbasic_machine=m68k-unknown\n\t\t;;\n\tamigaos | amigados)\n\t\tbasic_machine=m68k-unknown\n\t\tos=-amigaos\n\t\t;;\n\tamigaunix | amix)\n\t\tbasic_machine=m68k-unknown\n\t\tos=-sysv4\n\t\t;;\n\tapollo68)\n\t\tbasic_machine=m68k-apollo\n\t\tos=-sysv\n\t\t;;\n\tapollo68bsd)\n\t\tbasic_machine=m68k-apollo\n\t\tos=-bsd\n\t\t;;\n\taux)\n\t\tbasic_machine=m68k-apple\n\t\tos=-aux\n\t\t;;\n\tbalance)\n\t\tbasic_machine=ns32k-sequent\n\t\tos=-dynix\n\t\t;;\n\tc90)\n\t\tbasic_machine=c90-cray\n\t\tos=-unicos\n\t\t;;\n\tconvex-c1)\n\t\tbasic_machine=c1-convex\n\t\tos=-bsd\n\t\t;;\n\tconvex-c2)\n\t\tbasic_machine=c2-convex\n\t\tos=-bsd\n\t\t;;\n\tconvex-c32)\n\t\tbasic_machine=c32-convex\n\t\tos=-bsd\n\t\t;;\n\tconvex-c34)\n\t\tbasic_machine=c34-convex\n\t\tos=-bsd\n\t\t;;\n\tconvex-c38)\n\t\tbasic_machine=c38-convex\n\t\tos=-bsd\n\t\t;;\n\tcray | j90)\n\t\tbasic_machine=j90-cray\n\t\tos=-unicos\n\t\t;;\n\tcrds | unos)\n\t\tbasic_machine=m68k-crds\n\t\t;;\n\tcris | cris-* | etrax*)\n\t\tbasic_machine=cris-axis\n\t\t;;\n\tda30 | da30-*)\n\t\tbasic_machine=m68k-da30\n\t\t;;\n\tdecstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)\n\t\tbasic_machine=mips-dec\n\t\t;;\n\tdecsystem10* | dec10*)\n\t\tbasic_machine=pdp10-dec\n\t\tos=-tops10\n\t\t;;\n\tdecsystem20* | dec20*)\n\t\tbasic_machine=pdp10-dec\n\t\tos=-tops20\n\t\t;;\n\tdelta | 3300 | motorola-3300 | motorola-delta \\\n\t      | 3300-motorola | delta-motorola)\n\t\tbasic_machine=m68k-motorola\n\t\t;;\n\tdelta88)\n\t\tbasic_machine=m88k-motorola\n\t\tos=-sysv3\n\t\t;;\n\tdpx20 | dpx20-*)\n\t\tbasic_machine=rs6000-bull\n\t\tos=-bosx\n\t\t;;\n\tdpx2* | dpx2*-bull)\n\t\tbasic_machine=m68k-bull\n\t\tos=-sysv3\n\t\t;;\n\tebmon29k)\n\t\tbasic_machine=a29k-amd\n\t\tos=-ebmon\n\t\t;;\n\telxsi)\n\t\tbasic_machine=elxsi-elxsi\n\t\tos=-bsd\n\t\t;;\n\tencore | umax | mmax)\n\t\tbasic_machine=ns32k-encore\n\t\t;;\n\tes1800 | OSE68k | ose68k | ose | OSE)\n\t\tbasic_machine=m68k-ericsson\n\t\tos=-ose\n\t\t;;\n\tfx2800)\n\t\tbasic_machine=i860-alliant\n\t\t;;\n\tgenix)\n\t\tbasic_machine=ns32k-ns\n\t\t;;\n\tgmicro)\n\t\tbasic_machine=tron-gmicro\n\t\tos=-sysv\n\t\t;;\n\tgo32)\n\t\tbasic_machine=i386-pc\n\t\tos=-go32\n\t\t;;\n\th3050r* | hiux*)\n\t\tbasic_machine=hppa1.1-hitachi\n\t\tos=-hiuxwe2\n\t\t;;\n\th8300hms)\n\t\tbasic_machine=h8300-hitachi\n\t\tos=-hms\n\t\t;;\n\th8300xray)\n\t\tbasic_machine=h8300-hitachi\n\t\tos=-xray\n\t\t;;\n\th8500hms)\n\t\tbasic_machine=h8500-hitachi\n\t\tos=-hms\n\t\t;;\n\tharris)\n\t\tbasic_machine=m88k-harris\n\t\tos=-sysv3\n\t\t;;\n\thp300-*)\n\t\tbasic_machine=m68k-hp\n\t\t;;\n\thp300bsd)\n\t\tbasic_machine=m68k-hp\n\t\tos=-bsd\n\t\t;;\n\thp300hpux)\n\t\tbasic_machine=m68k-hp\n\t\tos=-hpux\n\t\t;;\n\thp3k9[0-9][0-9] | hp9[0-9][0-9])\n\t\tbasic_machine=hppa1.0-hp\n\t\t;;\n\thp9k2[0-9][0-9] | hp9k31[0-9])\n\t\tbasic_machine=m68000-hp\n\t\t;;\n\thp9k3[2-9][0-9])\n\t\tbasic_machine=m68k-hp\n\t\t;;\n\thp9k6[0-9][0-9] | hp6[0-9][0-9])\n\t\tbasic_machine=hppa1.0-hp\n\t\t;;\n\thp9k7[0-79][0-9] | hp7[0-79][0-9])\n\t\tbasic_machine=hppa1.1-hp\n\t\t;;\n\thp9k78[0-9] | hp78[0-9])\n\t\t# FIXME: really hppa2.0-hp\n\t\tbasic_machine=hppa1.1-hp\n\t\t;;\n\thp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)\n\t\t# FIXME: really hppa2.0-hp\n\t\tbasic_machine=hppa1.1-hp\n\t\t;;\n\thp9k8[0-9][13679] | hp8[0-9][13679])\n\t\tbasic_machine=hppa1.1-hp\n\t\t;;\n\thp9k8[0-9][0-9] | hp8[0-9][0-9])\n\t\tbasic_machine=hppa1.0-hp\n\t\t;;\n\thppa-next)\n\t\tos=-nextstep3\n\t\t;;\n\thppaosf)\n\t\tbasic_machine=hppa1.1-hp\n\t\tos=-osf\n\t\t;;\n\thppro)\n\t\tbasic_machine=hppa1.1-hp\n\t\tos=-proelf\n\t\t;;\n\ti370-ibm* | ibm*)\n\t\tbasic_machine=i370-ibm\n\t\t;;\n# I'm not sure what \"Sysv32\" means.  Should this be sysv3.2?\n\ti*86v32)\n\t\tbasic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`\n\t\tos=-sysv32\n\t\t;;\n\ti*86v4*)\n\t\tbasic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`\n\t\tos=-sysv4\n\t\t;;\n\ti*86v)\n\t\tbasic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`\n\t\tos=-sysv\n\t\t;;\n\ti*86sol2)\n\t\tbasic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`\n\t\tos=-solaris2\n\t\t;;\n\ti386mach)\n\t\tbasic_machine=i386-mach\n\t\tos=-mach\n\t\t;;\n\ti386-vsta | vsta)\n\t\tbasic_machine=i386-unknown\n\t\tos=-vsta\n\t\t;;\n\tiris | iris4d)\n\t\tbasic_machine=mips-sgi\n\t\tcase $os in\n\t\t    -irix*)\n\t\t\t;;\n\t\t    *)\n\t\t\tos=-irix4\n\t\t\t;;\n\t\tesac\n\t\t;;\n\tisi68 | isi)\n\t\tbasic_machine=m68k-isi\n\t\tos=-sysv\n\t\t;;\n\tm88k-omron*)\n\t\tbasic_machine=m88k-omron\n\t\t;;\n\tmagnum | m3230)\n\t\tbasic_machine=mips-mips\n\t\tos=-sysv\n\t\t;;\n\tmerlin)\n\t\tbasic_machine=ns32k-utek\n\t\tos=-sysv\n\t\t;;\n\tmingw32)\n\t\tbasic_machine=i386-pc\n\t\tos=-mingw32\n\t\t;;\n\tminiframe)\n\t\tbasic_machine=m68000-convergent\n\t\t;;\n\t*mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)\n\t\tbasic_machine=m68k-atari\n\t\tos=-mint\n\t\t;;\n\tmips3*-*)\n\t\tbasic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`\n\t\t;;\n\tmips3*)\n\t\tbasic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown\n\t\t;;\n\tmmix*)\n\t\tbasic_machine=mmix-knuth\n\t\tos=-mmixware\n\t\t;;\n\tmonitor)\n\t\tbasic_machine=m68k-rom68k\n\t\tos=-coff\n\t\t;;\n\tmorphos)\n\t\tbasic_machine=powerpc-unknown\n\t\tos=-morphos\n\t\t;;\n\tmsdos)\n\t\tbasic_machine=i386-pc\n\t\tos=-msdos\n\t\t;;\n\tmvs)\n\t\tbasic_machine=i370-ibm\n\t\tos=-mvs\n\t\t;;\n\tncr3000)\n\t\tbasic_machine=i486-ncr\n\t\tos=-sysv4\n\t\t;;\n\tnetbsd386)\n\t\tbasic_machine=i386-unknown\n\t\tos=-netbsd\n\t\t;;\n\tnetwinder)\n\t\tbasic_machine=armv4l-rebel\n\t\tos=-linux\n\t\t;;\n\tnews | news700 | news800 | news900)\n\t\tbasic_machine=m68k-sony\n\t\tos=-newsos\n\t\t;;\n\tnews1000)\n\t\tbasic_machine=m68030-sony\n\t\tos=-newsos\n\t\t;;\n\tnews-3600 | risc-news)\n\t\tbasic_machine=mips-sony\n\t\tos=-newsos\n\t\t;;\n\tnecv70)\n\t\tbasic_machine=v70-nec\n\t\tos=-sysv\n\t\t;;\n\tnext | m*-next )\n\t\tbasic_machine=m68k-next\n\t\tcase $os in\n\t\t    -nextstep* )\n\t\t\t;;\n\t\t    -ns2*)\n\t\t      os=-nextstep2\n\t\t\t;;\n\t\t    *)\n\t\t      os=-nextstep3\n\t\t\t;;\n\t\tesac\n\t\t;;\n\tnh3000)\n\t\tbasic_machine=m68k-harris\n\t\tos=-cxux\n\t\t;;\n\tnh[45]000)\n\t\tbasic_machine=m88k-harris\n\t\tos=-cxux\n\t\t;;\n\tnindy960)\n\t\tbasic_machine=i960-intel\n\t\tos=-nindy\n\t\t;;\n\tmon960)\n\t\tbasic_machine=i960-intel\n\t\tos=-mon960\n\t\t;;\n\tnonstopux)\n\t\tbasic_machine=mips-compaq\n\t\tos=-nonstopux\n\t\t;;\n\tnp1)\n\t\tbasic_machine=np1-gould\n\t\t;;\n\tnv1)\n\t\tbasic_machine=nv1-cray\n\t\tos=-unicosmp\n\t\t;;\n\tnsr-tandem)\n\t\tbasic_machine=nsr-tandem\n\t\t;;\n\top50n-* | op60c-*)\n\t\tbasic_machine=hppa1.1-oki\n\t\tos=-proelf\n\t\t;;\n\tor32 | or32-*)\n\t\tbasic_machine=or32-unknown\n\t\tos=-coff\n\t\t;;\n\tOSE68000 | ose68000)\n\t\tbasic_machine=m68000-ericsson\n\t\tos=-ose\n\t\t;;\n\tos68k)\n\t\tbasic_machine=m68k-none\n\t\tos=-os68k\n\t\t;;\n\tpa-hitachi)\n\t\tbasic_machine=hppa1.1-hitachi\n\t\tos=-hiuxwe2\n\t\t;;\n\tparagon)\n\t\tbasic_machine=i860-intel\n\t\tos=-osf\n\t\t;;\n\tpbd)\n\t\tbasic_machine=sparc-tti\n\t\t;;\n\tpbb)\n\t\tbasic_machine=m68k-tti\n\t\t;;\n\tpc532 | pc532-*)\n\t\tbasic_machine=ns32k-pc532\n\t\t;;\n\tpentium | p5 | k5 | k6 | nexgen | viac3)\n\t\tbasic_machine=i586-pc\n\t\t;;\n\tpentiumpro | p6 | 6x86 | athlon | athlon_*)\n\t\tbasic_machine=i686-pc\n\t\t;;\n\tpentiumii | pentium2 | pentiumiii | pentium3)\n\t\tbasic_machine=i686-pc\n\t\t;;\n\tpentium4)\n\t\tbasic_machine=i786-pc\n\t\t;;\n\tpentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)\n\t\tbasic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`\n\t\t;;\n\tpentiumpro-* | p6-* | 6x86-* | athlon-*)\n\t\tbasic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`\n\t\t;;\n\tpentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)\n\t\tbasic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`\n\t\t;;\n\tpentium4-*)\n\t\tbasic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`\n\t\t;;\n\tpn)\n\t\tbasic_machine=pn-gould\n\t\t;;\n\tpower)\tbasic_machine=power-ibm\n\t\t;;\n\tppc)\tbasic_machine=powerpc-unknown\n\t\t;;\n\tppc-*)\tbasic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`\n\t\t;;\n\tppcle | powerpclittle | ppc-le | powerpc-little)\n\t\tbasic_machine=powerpcle-unknown\n\t\t;;\n\tppcle-* | powerpclittle-*)\n\t\tbasic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`\n\t\t;;\n\tppc64)\tbasic_machine=powerpc64-unknown\n\t\t;;\n\tppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`\n\t\t;;\n\tppc64le | powerpc64little | ppc64-le | powerpc64-little)\n\t\tbasic_machine=powerpc64le-unknown\n\t\t;;\n\tppc64le-* | powerpc64little-*)\n\t\tbasic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`\n\t\t;;\n\tps2)\n\t\tbasic_machine=i386-ibm\n\t\t;;\n\tpw32)\n\t\tbasic_machine=i586-unknown\n\t\tos=-pw32\n\t\t;;\n\trom68k)\n\t\tbasic_machine=m68k-rom68k\n\t\tos=-coff\n\t\t;;\n\trm[46]00)\n\t\tbasic_machine=mips-siemens\n\t\t;;\n\trtpc | rtpc-*)\n\t\tbasic_machine=romp-ibm\n\t\t;;\n\ts390 | s390-*)\n\t\tbasic_machine=s390-ibm\n\t\t;;\n\ts390x | s390x-*)\n\t\tbasic_machine=s390x-ibm\n\t\t;;\n\tsa29200)\n\t\tbasic_machine=a29k-amd\n\t\tos=-udi\n\t\t;;\n\tsb1)\n\t\tbasic_machine=mipsisa64sb1-unknown\n\t\t;;\n\tsb1el)\n\t\tbasic_machine=mipsisa64sb1el-unknown\n\t\t;;\n\tsei)\n\t\tbasic_machine=mips-sei\n\t\tos=-seiux\n\t\t;;\n\tsequent)\n\t\tbasic_machine=i386-sequent\n\t\t;;\n\tsh)\n\t\tbasic_machine=sh-hitachi\n\t\tos=-hms\n\t\t;;\n\tsh64)\n\t\tbasic_machine=sh64-unknown\n\t\t;;\n\tsparclite-wrs | simso-wrs)\n\t\tbasic_machine=sparclite-wrs\n\t\tos=-vxworks\n\t\t;;\n\tsps7)\n\t\tbasic_machine=m68k-bull\n\t\tos=-sysv2\n\t\t;;\n\tspur)\n\t\tbasic_machine=spur-unknown\n\t\t;;\n\tst2000)\n\t\tbasic_machine=m68k-tandem\n\t\t;;\n\tstratus)\n\t\tbasic_machine=i860-stratus\n\t\tos=-sysv4\n\t\t;;\n\tsun2)\n\t\tbasic_machine=m68000-sun\n\t\t;;\n\tsun2os3)\n\t\tbasic_machine=m68000-sun\n\t\tos=-sunos3\n\t\t;;\n\tsun2os4)\n\t\tbasic_machine=m68000-sun\n\t\tos=-sunos4\n\t\t;;\n\tsun3os3)\n\t\tbasic_machine=m68k-sun\n\t\tos=-sunos3\n\t\t;;\n\tsun3os4)\n\t\tbasic_machine=m68k-sun\n\t\tos=-sunos4\n\t\t;;\n\tsun4os3)\n\t\tbasic_machine=sparc-sun\n\t\tos=-sunos3\n\t\t;;\n\tsun4os4)\n\t\tbasic_machine=sparc-sun\n\t\tos=-sunos4\n\t\t;;\n\tsun4sol2)\n\t\tbasic_machine=sparc-sun\n\t\tos=-solaris2\n\t\t;;\n\tsun3 | sun3-*)\n\t\tbasic_machine=m68k-sun\n\t\t;;\n\tsun4)\n\t\tbasic_machine=sparc-sun\n\t\t;;\n\tsun386 | sun386i | roadrunner)\n\t\tbasic_machine=i386-sun\n\t\t;;\n\tsv1)\n\t\tbasic_machine=sv1-cray\n\t\tos=-unicos\n\t\t;;\n\tsymmetry)\n\t\tbasic_machine=i386-sequent\n\t\tos=-dynix\n\t\t;;\n\tt3e)\n\t\tbasic_machine=alphaev5-cray\n\t\tos=-unicos\n\t\t;;\n\tt90)\n\t\tbasic_machine=t90-cray\n\t\tos=-unicos\n\t\t;;\n\ttic54x | c54x*)\n\t\tbasic_machine=tic54x-unknown\n\t\tos=-coff\n\t\t;;\n\ttic55x | c55x*)\n\t\tbasic_machine=tic55x-unknown\n\t\tos=-coff\n\t\t;;\n\ttic6x | c6x*)\n\t\tbasic_machine=tic6x-unknown\n\t\tos=-coff\n\t\t;;\n\ttx39)\n\t\tbasic_machine=mipstx39-unknown\n\t\t;;\n\ttx39el)\n\t\tbasic_machine=mipstx39el-unknown\n\t\t;;\n\ttoad1)\n\t\tbasic_machine=pdp10-xkl\n\t\tos=-tops20\n\t\t;;\n\ttower | tower-32)\n\t\tbasic_machine=m68k-ncr\n\t\t;;\n\tudi29k)\n\t\tbasic_machine=a29k-amd\n\t\tos=-udi\n\t\t;;\n\tultra3)\n\t\tbasic_machine=a29k-nyu\n\t\tos=-sym1\n\t\t;;\n\tv810 | necv810)\n\t\tbasic_machine=v810-nec\n\t\tos=-none\n\t\t;;\n\tvaxv)\n\t\tbasic_machine=vax-dec\n\t\tos=-sysv\n\t\t;;\n\tvms)\n\t\tbasic_machine=vax-dec\n\t\tos=-vms\n\t\t;;\n\tvpp*|vx|vx-*)\n\t\tbasic_machine=f301-fujitsu\n\t\t;;\n\tvxworks960)\n\t\tbasic_machine=i960-wrs\n\t\tos=-vxworks\n\t\t;;\n\tvxworks68)\n\t\tbasic_machine=m68k-wrs\n\t\tos=-vxworks\n\t\t;;\n\tvxworks29k)\n\t\tbasic_machine=a29k-wrs\n\t\tos=-vxworks\n\t\t;;\n\tw65*)\n\t\tbasic_machine=w65-wdc\n\t\tos=-none\n\t\t;;\n\tw89k-*)\n\t\tbasic_machine=hppa1.1-winbond\n\t\tos=-proelf\n\t\t;;\n\txps | xps100)\n\t\tbasic_machine=xps100-honeywell\n\t\t;;\n\tymp)\n\t\tbasic_machine=ymp-cray\n\t\tos=-unicos\n\t\t;;\n\tz8k-*-coff)\n\t\tbasic_machine=z8k-unknown\n\t\tos=-sim\n\t\t;;\n\tnone)\n\t\tbasic_machine=none-none\n\t\tos=-none\n\t\t;;\n\n# Here we handle the default manufacturer of certain CPU types.  It is in\n# some cases the only manufacturer, in others, it is the most popular.\n\tw89k)\n\t\tbasic_machine=hppa1.1-winbond\n\t\t;;\n\top50n)\n\t\tbasic_machine=hppa1.1-oki\n\t\t;;\n\top60c)\n\t\tbasic_machine=hppa1.1-oki\n\t\t;;\n\tromp)\n\t\tbasic_machine=romp-ibm\n\t\t;;\n\trs6000)\n\t\tbasic_machine=rs6000-ibm\n\t\t;;\n\tvax)\n\t\tbasic_machine=vax-dec\n\t\t;;\n\tpdp10)\n\t\t# there are many clones, so DEC is not a safe bet\n\t\tbasic_machine=pdp10-unknown\n\t\t;;\n\tpdp11)\n\t\tbasic_machine=pdp11-dec\n\t\t;;\n\twe32k)\n\t\tbasic_machine=we32k-att\n\t\t;;\n\tsh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele)\n\t\tbasic_machine=sh-unknown\n\t\t;;\n\tsh64)\n\t\tbasic_machine=sh64-unknown\n\t\t;;\n\tsparc | sparcv9 | sparcv9b)\n\t\tbasic_machine=sparc-sun\n\t\t;;\n\tcydra)\n\t\tbasic_machine=cydra-cydrome\n\t\t;;\n\torion)\n\t\tbasic_machine=orion-highlevel\n\t\t;;\n\torion105)\n\t\tbasic_machine=clipper-highlevel\n\t\t;;\n\tmac | mpw | mac-mpw)\n\t\tbasic_machine=m68k-apple\n\t\t;;\n\tpmac | pmac-mpw)\n\t\tbasic_machine=powerpc-apple\n\t\t;;\n\t*-unknown)\n\t\t# Make sure to match an already-canonicalized machine name.\n\t\t;;\n\t*)\n\t\techo Invalid configuration \\`$1\\': machine \\`$basic_machine\\' not recognized 1>&2\n\t\texit 1\n\t\t;;\nesac\n\n# Here we canonicalize certain aliases for manufacturers.\ncase $basic_machine in\n\t*-digital*)\n\t\tbasic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`\n\t\t;;\n\t*-commodore*)\n\t\tbasic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`\n\t\t;;\n\t*)\n\t\t;;\nesac\n\n# Decode manufacturer-specific aliases for certain operating systems.\n\nif [ x\"$os\" != x\"\" ]\nthen\ncase $os in\n        # First match some system type aliases\n        # that might get confused with valid system types.\n\t# -solaris* is a basic system type, with this one exception.\n\t-solaris1 | -solaris1.*)\n\t\tos=`echo $os | sed -e 's|solaris1|sunos4|'`\n\t\t;;\n\t-solaris)\n\t\tos=-solaris2\n\t\t;;\n\t-svr4*)\n\t\tos=-sysv4\n\t\t;;\n\t-unixware*)\n\t\tos=-sysv4.2uw\n\t\t;;\n\t-gnu/linux*)\n\t\tos=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`\n\t\t;;\n\t# First accept the basic system types.\n\t# The portable systems comes first.\n\t# Each alternative MUST END IN A *, to match a version number.\n\t# -sysv* is not here because it comes later, after sysvr4.\n\t-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \\\n\t      | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\\\n\t      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \\\n\t      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \\\n\t      | -aos* \\\n\t      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \\\n\t      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \\\n\t      | -hiux* | -386bsd* | -netbsd* | -openbsd* | -kfreebsd* | -freebsd* | -riscix* \\\n\t      | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \\\n\t      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \\\n\t      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \\\n\t      | -chorusos* | -chorusrdb* \\\n\t      | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \\\n\t      | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \\\n\t      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \\\n\t      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \\\n\t      | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \\\n\t      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \\\n\t      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \\\n\t      | -powermax* | -dnix* | -nx6 | -nx7 | -sei*)\n\t# Remember, each alternative MUST END IN *, to match a version number.\n\t\t;;\n\t-qnx*)\n\t\tcase $basic_machine in\n\t\t    x86-* | i*86-*)\n\t\t\t;;\n\t\t    *)\n\t\t\tos=-nto$os\n\t\t\t;;\n\t\tesac\n\t\t;;\n\t-nto-qnx*)\n\t\t;;\n\t-nto*)\n\t\tos=`echo $os | sed -e 's|nto|nto-qnx|'`\n\t\t;;\n\t-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \\\n\t      | -windows* | -osx | -abug | -netware* | -os9* | -beos* \\\n\t      | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)\n\t\t;;\n\t-mac*)\n\t\tos=`echo $os | sed -e 's|mac|macos|'`\n\t\t;;\n\t-linux*)\n\t\tos=`echo $os | sed -e 's|linux|linux-gnu|'`\n\t\t;;\n\t-sunos5*)\n\t\tos=`echo $os | sed -e 's|sunos5|solaris2|'`\n\t\t;;\n\t-sunos6*)\n\t\tos=`echo $os | sed -e 's|sunos6|solaris3|'`\n\t\t;;\n\t-opened*)\n\t\tos=-openedition\n\t\t;;\n\t-wince*)\n\t\tos=-wince\n\t\t;;\n\t-osfrose*)\n\t\tos=-osfrose\n\t\t;;\n\t-osf*)\n\t\tos=-osf\n\t\t;;\n\t-utek*)\n\t\tos=-bsd\n\t\t;;\n\t-dynix*)\n\t\tos=-bsd\n\t\t;;\n\t-acis*)\n\t\tos=-aos\n\t\t;;\n\t-atheos*)\n\t\tos=-atheos\n\t\t;;\n\t-386bsd)\n\t\tos=-bsd\n\t\t;;\n\t-ctix* | -uts*)\n\t\tos=-sysv\n\t\t;;\n\t-nova*)\n\t\tos=-rtmk-nova\n\t\t;;\n\t-ns2 )\n\t\tos=-nextstep2\n\t\t;;\n\t-nsk*)\n\t\tos=-nsk\n\t\t;;\n\t# Preserve the version number of sinix5.\n\t-sinix5.*)\n\t\tos=`echo $os | sed -e 's|sinix|sysv|'`\n\t\t;;\n\t-sinix*)\n\t\tos=-sysv4\n\t\t;;\n\t-triton*)\n\t\tos=-sysv3\n\t\t;;\n\t-oss*)\n\t\tos=-sysv3\n\t\t;;\n\t-svr4)\n\t\tos=-sysv4\n\t\t;;\n\t-svr3)\n\t\tos=-sysv3\n\t\t;;\n\t-sysvr4)\n\t\tos=-sysv4\n\t\t;;\n\t# This must come after -sysvr4.\n\t-sysv*)\n\t\t;;\n\t-ose*)\n\t\tos=-ose\n\t\t;;\n\t-es1800*)\n\t\tos=-ose\n\t\t;;\n\t-xenix)\n\t\tos=-xenix\n\t\t;;\n\t-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)\n\t\tos=-mint\n\t\t;;\n\t-aros*)\n\t\tos=-aros\n\t\t;;\n\t-kaos*)\n\t\tos=-kaos\n\t\t;;\n\t-none)\n\t\t;;\n\t*)\n\t\t# Get rid of the `-' at the beginning of $os.\n\t\tos=`echo $os | sed 's/[^-]*-//'`\n\t\techo Invalid configuration \\`$1\\': system \\`$os\\' not recognized 1>&2\n\t\texit 1\n\t\t;;\nesac\nelse\n\n# Here we handle the default operating systems that come with various machines.\n# The value should be what the vendor currently ships out the door with their\n# machine or put another way, the most popular os provided with the machine.\n\n# Note that if you're going to try to match \"-MANUFACTURER\" here (say,\n# \"-sun\"), then you have to tell the case statement up towards the top\n# that MANUFACTURER isn't an operating system.  Otherwise, code above\n# will signal an error saying that MANUFACTURER isn't an operating\n# system, and we'll never get to this point.\n\ncase $basic_machine in\n\t*-acorn)\n\t\tos=-riscix1.2\n\t\t;;\n\tarm*-rebel)\n\t\tos=-linux\n\t\t;;\n\tarm*-semi)\n\t\tos=-aout\n\t\t;;\n    c4x-* | tic4x-*)\n        os=-coff\n        ;;\n\t# This must come before the *-dec entry.\n\tpdp10-*)\n\t\tos=-tops20\n\t\t;;\n\tpdp11-*)\n\t\tos=-none\n\t\t;;\n\t*-dec | vax-*)\n\t\tos=-ultrix4.2\n\t\t;;\n\tm68*-apollo)\n\t\tos=-domain\n\t\t;;\n\ti386-sun)\n\t\tos=-sunos4.0.2\n\t\t;;\n\tm68000-sun)\n\t\tos=-sunos3\n\t\t# This also exists in the configure program, but was not the\n\t\t# default.\n\t\t# os=-sunos4\n\t\t;;\n\tm68*-cisco)\n\t\tos=-aout\n\t\t;;\n\tmips*-cisco)\n\t\tos=-elf\n\t\t;;\n\tmips*-*)\n\t\tos=-elf\n\t\t;;\n\tor32-*)\n\t\tos=-coff\n\t\t;;\n\t*-tti)\t# must be before sparc entry or we get the wrong os.\n\t\tos=-sysv3\n\t\t;;\n\tsparc-* | *-sun)\n\t\tos=-sunos4.1.1\n\t\t;;\n\t*-be)\n\t\tos=-beos\n\t\t;;\n\t*-ibm)\n\t\tos=-aix\n\t\t;;\n\t*-wec)\n\t\tos=-proelf\n\t\t;;\n\t*-winbond)\n\t\tos=-proelf\n\t\t;;\n\t*-oki)\n\t\tos=-proelf\n\t\t;;\n\t*-hp)\n\t\tos=-hpux\n\t\t;;\n\t*-hitachi)\n\t\tos=-hiux\n\t\t;;\n\ti860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)\n\t\tos=-sysv\n\t\t;;\n\t*-cbm)\n\t\tos=-amigaos\n\t\t;;\n\t*-dg)\n\t\tos=-dgux\n\t\t;;\n\t*-dolphin)\n\t\tos=-sysv3\n\t\t;;\n\tm68k-ccur)\n\t\tos=-rtu\n\t\t;;\n\tm88k-omron*)\n\t\tos=-luna\n\t\t;;\n\t*-next )\n\t\tos=-nextstep\n\t\t;;\n\t*-sequent)\n\t\tos=-ptx\n\t\t;;\n\t*-crds)\n\t\tos=-unos\n\t\t;;\n\t*-ns)\n\t\tos=-genix\n\t\t;;\n\ti370-*)\n\t\tos=-mvs\n\t\t;;\n\t*-next)\n\t\tos=-nextstep3\n\t\t;;\n\t*-gould)\n\t\tos=-sysv\n\t\t;;\n\t*-highlevel)\n\t\tos=-bsd\n\t\t;;\n\t*-encore)\n\t\tos=-bsd\n\t\t;;\n\t*-sgi)\n\t\tos=-irix\n\t\t;;\n\t*-siemens)\n\t\tos=-sysv4\n\t\t;;\n\t*-masscomp)\n\t\tos=-rtu\n\t\t;;\n\tf30[01]-fujitsu | f700-fujitsu)\n\t\tos=-uxpv\n\t\t;;\n\t*-rom68k)\n\t\tos=-coff\n\t\t;;\n\t*-*bug)\n\t\tos=-coff\n\t\t;;\n\t*-apple)\n\t\tos=-macos\n\t\t;;\n\t*-atari*)\n\t\tos=-mint\n\t\t;;\n\t*)\n\t\tos=-none\n\t\t;;\nesac\nfi\n\n# Here we handle the case where we know the os, and the CPU type, but not the\n# manufacturer.  We pick the logical manufacturer.\nvendor=unknown\ncase $basic_machine in\n\t*-unknown)\n\t\tcase $os in\n\t\t\t-riscix*)\n\t\t\t\tvendor=acorn\n\t\t\t\t;;\n\t\t\t-sunos*)\n\t\t\t\tvendor=sun\n\t\t\t\t;;\n\t\t\t-aix*)\n\t\t\t\tvendor=ibm\n\t\t\t\t;;\n\t\t\t-beos*)\n\t\t\t\tvendor=be\n\t\t\t\t;;\n\t\t\t-hpux*)\n\t\t\t\tvendor=hp\n\t\t\t\t;;\n\t\t\t-mpeix*)\n\t\t\t\tvendor=hp\n\t\t\t\t;;\n\t\t\t-hiux*)\n\t\t\t\tvendor=hitachi\n\t\t\t\t;;\n\t\t\t-unos*)\n\t\t\t\tvendor=crds\n\t\t\t\t;;\n\t\t\t-dgux*)\n\t\t\t\tvendor=dg\n\t\t\t\t;;\n\t\t\t-luna*)\n\t\t\t\tvendor=omron\n\t\t\t\t;;\n\t\t\t-genix*)\n\t\t\t\tvendor=ns\n\t\t\t\t;;\n\t\t\t-mvs* | -opened*)\n\t\t\t\tvendor=ibm\n\t\t\t\t;;\n\t\t\t-ptx*)\n\t\t\t\tvendor=sequent\n\t\t\t\t;;\n\t\t\t-vxsim* | -vxworks* | -windiss*)\n\t\t\t\tvendor=wrs\n\t\t\t\t;;\n\t\t\t-aux*)\n\t\t\t\tvendor=apple\n\t\t\t\t;;\n\t\t\t-hms*)\n\t\t\t\tvendor=hitachi\n\t\t\t\t;;\n\t\t\t-mpw* | -macos*)\n\t\t\t\tvendor=apple\n\t\t\t\t;;\n\t\t\t-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)\n\t\t\t\tvendor=atari\n\t\t\t\t;;\n\t\t\t-vos*)\n\t\t\t\tvendor=stratus\n\t\t\t\t;;\n\t\tesac\n\t\tbasic_machine=`echo $basic_machine | sed \"s/unknown/$vendor/\"`\n\t\t;;\nesac\n\necho $basic_machine$os\nexit 0\n\n# Local variables:\n# eval: (add-hook 'write-file-hooks 'time-stamp)\n# time-stamp-start: \"timestamp='\"\n# time-stamp-format: \"%:y-%02m-%02d\"\n# time-stamp-end: \"'\"\n# End:\n"
  },
  {
    "path": "thirdparty/portaudio/bindings/cpp/build/gnu/configure",
    "content": "#! /bin/sh\n# Guess values for system-dependent variables and create Makefiles.\n# Generated by GNU Autoconf 2.57 for PortAudioCpp 12.\n#\n# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002\n# Free Software Foundation, Inc.\n# This configure script is free software; the Free Software Foundation\n# gives unlimited permission to copy, distribute and modify it.\n## --------------------- ##\n## M4sh Initialization.  ##\n## --------------------- ##\n\n# Be Bourne compatible\nif test -n \"${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then\n  emulate sh\n  NULLCMD=:\n  # Zsh 3.x and 4.x performs word splitting on ${1+\"$@\"}, which\n  # is contrary to our usage.  Disable this feature.\n  alias -g '${1+\"$@\"}'='\"$@\"'\nelif test -n \"${BASH_VERSION+set}\" && (set -o posix) >/dev/null 2>&1; then\n  set -o posix\nfi\n\n# Support unset when possible.\nif (FOO=FOO; unset FOO) >/dev/null 2>&1; then\n  as_unset=unset\nelse\n  as_unset=false\nfi\n\n\n# Work around bugs in pre-3.0 UWIN ksh.\n$as_unset ENV MAIL MAILPATH\nPS1='$ '\nPS2='> '\nPS4='+ '\n\n# NLS nuisances.\nfor as_var in \\\n  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \\\n  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \\\n  LC_TELEPHONE LC_TIME\ndo\n  if (set +x; test -n \"`(eval $as_var=C; export $as_var) 2>&1`\"); then\n    eval $as_var=C; export $as_var\n  else\n    $as_unset $as_var\n  fi\ndone\n\n# Required to use basename.\nif expr a : '\\(a\\)' >/dev/null 2>&1; then\n  as_expr=expr\nelse\n  as_expr=false\nfi\n\nif (basename /) >/dev/null 2>&1 && test \"X`basename / 2>&1`\" = \"X/\"; then\n  as_basename=basename\nelse\n  as_basename=false\nfi\n\n\n# Name of the executable.\nas_me=`$as_basename \"$0\" ||\n$as_expr X/\"$0\" : '.*/\\([^/][^/]*\\)/*$' \\| \\\n\t X\"$0\" : 'X\\(//\\)$' \\| \\\n\t X\"$0\" : 'X\\(/\\)$' \\| \\\n\t .     : '\\(.\\)' 2>/dev/null ||\necho X/\"$0\" |\n    sed '/^.*\\/\\([^/][^/]*\\)\\/*$/{ s//\\1/; q; }\n  \t  /^X\\/\\(\\/\\/\\)$/{ s//\\1/; q; }\n  \t  /^X\\/\\(\\/\\).*/{ s//\\1/; q; }\n  \t  s/.*/./; q'`\n\n\n# PATH needs CR, and LINENO needs CR and PATH.\n# Avoid depending upon Character Ranges.\nas_cr_letters='abcdefghijklmnopqrstuvwxyz'\nas_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'\nas_cr_Letters=$as_cr_letters$as_cr_LETTERS\nas_cr_digits='0123456789'\nas_cr_alnum=$as_cr_Letters$as_cr_digits\n\n# The user is always right.\nif test \"${PATH_SEPARATOR+set}\" != set; then\n  echo \"#! /bin/sh\" >conf$$.sh\n  echo  \"exit 0\"   >>conf$$.sh\n  chmod +x conf$$.sh\n  if (PATH=\"/nonexistent;.\"; conf$$.sh) >/dev/null 2>&1; then\n    PATH_SEPARATOR=';'\n  else\n    PATH_SEPARATOR=:\n  fi\n  rm -f conf$$.sh\nfi\n\n\n  as_lineno_1=$LINENO\n  as_lineno_2=$LINENO\n  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`\n  test \"x$as_lineno_1\" != \"x$as_lineno_2\" &&\n  test \"x$as_lineno_3\"  = \"x$as_lineno_2\"  || {\n  # Find who we are.  Look in the path if we contain no path at all\n  # relative or not.\n  case $0 in\n    *[\\\\/]* ) as_myself=$0 ;;\n    *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n  test -r \"$as_dir/$0\" && as_myself=$as_dir/$0 && break\ndone\n\n       ;;\n  esac\n  # We did not find ourselves, most probably we were run as `sh COMMAND'\n  # in which case we are not to be found in the path.\n  if test \"x$as_myself\" = x; then\n    as_myself=$0\n  fi\n  if test ! -f \"$as_myself\"; then\n    { echo \"$as_me: error: cannot find myself; rerun with an absolute path\" >&2\n   { (exit 1); exit 1; }; }\n  fi\n  case $CONFIG_SHELL in\n  '')\n    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n  for as_base in sh bash ksh sh5; do\n\t case $as_dir in\n\t /*)\n\t   if (\"$as_dir/$as_base\" -c '\n  as_lineno_1=$LINENO\n  as_lineno_2=$LINENO\n  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`\n  test \"x$as_lineno_1\" != \"x$as_lineno_2\" &&\n  test \"x$as_lineno_3\"  = \"x$as_lineno_2\" ') 2>/dev/null; then\n\t     $as_unset BASH_ENV || test \"${BASH_ENV+set}\" != set || { BASH_ENV=; export BASH_ENV; }\n\t     $as_unset ENV || test \"${ENV+set}\" != set || { ENV=; export ENV; }\n\t     CONFIG_SHELL=$as_dir/$as_base\n\t     export CONFIG_SHELL\n\t     exec \"$CONFIG_SHELL\" \"$0\" ${1+\"$@\"}\n\t   fi;;\n\t esac\n       done\ndone\n;;\n  esac\n\n  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO\n  # uniformly replaced by the line number.  The first 'sed' inserts a\n  # line-number line before each line; the second 'sed' does the real\n  # work.  The second script uses 'N' to pair each line-number line\n  # with the numbered line, and appends trailing '-' during\n  # substitution so that $LINENO is not a special case at line end.\n  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the\n  # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)\n  sed '=' <$as_myself |\n    sed '\n      N\n      s,$,-,\n      : loop\n      s,^\\(['$as_cr_digits']*\\)\\(.*\\)[$]LINENO\\([^'$as_cr_alnum'_]\\),\\1\\2\\1\\3,\n      t loop\n      s,-$,,\n      s,^['$as_cr_digits']*\\n,,\n    ' >$as_me.lineno &&\n  chmod +x $as_me.lineno ||\n    { echo \"$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell\" >&2\n   { (exit 1); exit 1; }; }\n\n  # Don't try to exec as it changes $[0], causing all sort of problems\n  # (the dirname of $[0] is not the place where we might find the\n  # original and so on.  Autoconf is especially sensible to this).\n  . ./$as_me.lineno\n  # Exit status is that of the last command.\n  exit\n}\n\n\ncase `echo \"testing\\c\"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in\n  *c*,-n*) ECHO_N= ECHO_C='\n' ECHO_T='\t' ;;\n  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;\n  *)       ECHO_N= ECHO_C='\\c' ECHO_T= ;;\nesac\n\nif expr a : '\\(a\\)' >/dev/null 2>&1; then\n  as_expr=expr\nelse\n  as_expr=false\nfi\n\nrm -f conf$$ conf$$.exe conf$$.file\necho >conf$$.file\nif ln -s conf$$.file conf$$ 2>/dev/null; then\n  # We could just check for DJGPP; but this test a) works b) is more generic\n  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).\n  if test -f conf$$.exe; then\n    # Don't use ln at all; we don't have any links\n    as_ln_s='cp -p'\n  else\n    as_ln_s='ln -s'\n  fi\nelif ln conf$$.file conf$$ 2>/dev/null; then\n  as_ln_s=ln\nelse\n  as_ln_s='cp -p'\nfi\nrm -f conf$$ conf$$.exe conf$$.file\n\nif mkdir -p . 2>/dev/null; then\n  as_mkdir_p=:\nelse\n  as_mkdir_p=false\nfi\n\nas_executable_p=\"test -f\"\n\n# Sed expression to map a string onto a valid CPP name.\nas_tr_cpp=\"sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g\"\n\n# Sed expression to map a string onto a valid variable name.\nas_tr_sh=\"sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g\"\n\n\n# IFS\n# We need space, tab and new line, in precisely that order.\nas_nl='\n'\nIFS=\" \t$as_nl\"\n\n# CDPATH.\n$as_unset CDPATH\n\n\n# Name of the host.\n# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,\n# so uname gets run too.\nac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`\n\nexec 6>&1\n\n#\n# Initializations.\n#\nac_default_prefix=/usr/local\nac_config_libobj_dir=.\ncross_compiling=no\nsubdirs=\nMFLAGS=\nMAKEFLAGS=\nSHELL=${CONFIG_SHELL-/bin/sh}\n\n# Maximum number of lines to put in a shell here document.\n# This variable seems obsolete.  It should probably be removed, and\n# only ac_max_sed_lines should be used.\n: ${ac_max_here_lines=38}\n\n# Identity of this package.\nPACKAGE_NAME='PortAudioCpp'\nPACKAGE_TARNAME='portaudiocpp'\nPACKAGE_VERSION='12'\nPACKAGE_STRING='PortAudioCpp 12'\nPACKAGE_BUGREPORT=''\n\nac_unique_file=\"../../include/portaudiocpp/PortAudioCpp.hxx\"\nac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX LN_S RANLIB ac_ct_RANLIB INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA AR PACPP_ROOT PORTAUDIO PADLL PACPP_DLL PACPP_INC SHARED_FLAGS DLL_LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os PKG_CONFIG JACK_CFLAGS JACK_LIBS LIBOBJS LTLIBOBJS'\nac_subst_files=''\n\n# Initialize some variables set by options.\nac_init_help=\nac_init_version=false\n# The variables have the same names as the options, with\n# dashes changed to underlines.\ncache_file=/dev/null\nexec_prefix=NONE\nno_create=\nno_recursion=\nprefix=NONE\nprogram_prefix=NONE\nprogram_suffix=NONE\nprogram_transform_name=s,x,x,\nsilent=\nsite=\nsrcdir=\nverbose=\nx_includes=NONE\nx_libraries=NONE\n\n# Installation directory options.\n# These are left unexpanded so users can \"make install exec_prefix=/foo\"\n# and all the variables that are supposed to be based on exec_prefix\n# by default will actually change.\n# Use braces instead of parens because sh, perl, etc. also accept them.\nbindir='${exec_prefix}/bin'\nsbindir='${exec_prefix}/sbin'\nlibexecdir='${exec_prefix}/libexec'\ndatadir='${prefix}/share'\nsysconfdir='${prefix}/etc'\nsharedstatedir='${prefix}/com'\nlocalstatedir='${prefix}/var'\nlibdir='${exec_prefix}/lib'\nincludedir='${prefix}/include'\noldincludedir='/usr/include'\ninfodir='${prefix}/info'\nmandir='${prefix}/man'\n\nac_prev=\nfor ac_option\ndo\n  # If the previous option needs an argument, assign it.\n  if test -n \"$ac_prev\"; then\n    eval \"$ac_prev=\\$ac_option\"\n    ac_prev=\n    continue\n  fi\n\n  ac_optarg=`expr \"x$ac_option\" : 'x[^=]*=\\(.*\\)'`\n\n  # Accept the important Cygnus configure options, so we can diagnose typos.\n\n  case $ac_option in\n\n  -bindir | --bindir | --bindi | --bind | --bin | --bi)\n    ac_prev=bindir ;;\n  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)\n    bindir=$ac_optarg ;;\n\n  -build | --build | --buil | --bui | --bu)\n    ac_prev=build_alias ;;\n  -build=* | --build=* | --buil=* | --bui=* | --bu=*)\n    build_alias=$ac_optarg ;;\n\n  -cache-file | --cache-file | --cache-fil | --cache-fi \\\n  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)\n    ac_prev=cache_file ;;\n  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \\\n  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)\n    cache_file=$ac_optarg ;;\n\n  --config-cache | -C)\n    cache_file=config.cache ;;\n\n  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)\n    ac_prev=datadir ;;\n  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \\\n  | --da=*)\n    datadir=$ac_optarg ;;\n\n  -disable-* | --disable-*)\n    ac_feature=`expr \"x$ac_option\" : 'x-*disable-\\(.*\\)'`\n    # Reject names that are not valid shell variable names.\n    expr \"x$ac_feature\" : \".*[^-_$as_cr_alnum]\" >/dev/null &&\n      { echo \"$as_me: error: invalid feature name: $ac_feature\" >&2\n   { (exit 1); exit 1; }; }\n    ac_feature=`echo $ac_feature | sed 's/-/_/g'`\n    eval \"enable_$ac_feature=no\" ;;\n\n  -enable-* | --enable-*)\n    ac_feature=`expr \"x$ac_option\" : 'x-*enable-\\([^=]*\\)'`\n    # Reject names that are not valid shell variable names.\n    expr \"x$ac_feature\" : \".*[^-_$as_cr_alnum]\" >/dev/null &&\n      { echo \"$as_me: error: invalid feature name: $ac_feature\" >&2\n   { (exit 1); exit 1; }; }\n    ac_feature=`echo $ac_feature | sed 's/-/_/g'`\n    case $ac_option in\n      *=*) ac_optarg=`echo \"$ac_optarg\" | sed \"s/'/'\\\\\\\\\\\\\\\\''/g\"`;;\n      *) ac_optarg=yes ;;\n    esac\n    eval \"enable_$ac_feature='$ac_optarg'\" ;;\n\n  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \\\n  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \\\n  | --exec | --exe | --ex)\n    ac_prev=exec_prefix ;;\n  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \\\n  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \\\n  | --exec=* | --exe=* | --ex=*)\n    exec_prefix=$ac_optarg ;;\n\n  -gas | --gas | --ga | --g)\n    # Obsolete; use --with-gas.\n    with_gas=yes ;;\n\n  -help | --help | --hel | --he | -h)\n    ac_init_help=long ;;\n  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)\n    ac_init_help=recursive ;;\n  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)\n    ac_init_help=short ;;\n\n  -host | --host | --hos | --ho)\n    ac_prev=host_alias ;;\n  -host=* | --host=* | --hos=* | --ho=*)\n    host_alias=$ac_optarg ;;\n\n  -includedir | --includedir | --includedi | --included | --include \\\n  | --includ | --inclu | --incl | --inc)\n    ac_prev=includedir ;;\n  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \\\n  | --includ=* | --inclu=* | --incl=* | --inc=*)\n    includedir=$ac_optarg ;;\n\n  -infodir | --infodir | --infodi | --infod | --info | --inf)\n    ac_prev=infodir ;;\n  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)\n    infodir=$ac_optarg ;;\n\n  -libdir | --libdir | --libdi | --libd)\n    ac_prev=libdir ;;\n  -libdir=* | --libdir=* | --libdi=* | --libd=*)\n    libdir=$ac_optarg ;;\n\n  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \\\n  | --libexe | --libex | --libe)\n    ac_prev=libexecdir ;;\n  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \\\n  | --libexe=* | --libex=* | --libe=*)\n    libexecdir=$ac_optarg ;;\n\n  -localstatedir | --localstatedir | --localstatedi | --localstated \\\n  | --localstate | --localstat | --localsta | --localst \\\n  | --locals | --local | --loca | --loc | --lo)\n    ac_prev=localstatedir ;;\n  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \\\n  | --localstate=* | --localstat=* | --localsta=* | --localst=* \\\n  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)\n    localstatedir=$ac_optarg ;;\n\n  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)\n    ac_prev=mandir ;;\n  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)\n    mandir=$ac_optarg ;;\n\n  -nfp | --nfp | --nf)\n    # Obsolete; use --without-fp.\n    with_fp=no ;;\n\n  -no-create | --no-create | --no-creat | --no-crea | --no-cre \\\n  | --no-cr | --no-c | -n)\n    no_create=yes ;;\n\n  -no-recursion | --no-recursion | --no-recursio | --no-recursi \\\n  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)\n    no_recursion=yes ;;\n\n  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \\\n  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \\\n  | --oldin | --oldi | --old | --ol | --o)\n    ac_prev=oldincludedir ;;\n  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \\\n  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \\\n  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)\n    oldincludedir=$ac_optarg ;;\n\n  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)\n    ac_prev=prefix ;;\n  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)\n    prefix=$ac_optarg ;;\n\n  -program-prefix | --program-prefix | --program-prefi | --program-pref \\\n  | --program-pre | --program-pr | --program-p)\n    ac_prev=program_prefix ;;\n  -program-prefix=* | --program-prefix=* | --program-prefi=* \\\n  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)\n    program_prefix=$ac_optarg ;;\n\n  -program-suffix | --program-suffix | --program-suffi | --program-suff \\\n  | --program-suf | --program-su | --program-s)\n    ac_prev=program_suffix ;;\n  -program-suffix=* | --program-suffix=* | --program-suffi=* \\\n  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)\n    program_suffix=$ac_optarg ;;\n\n  -program-transform-name | --program-transform-name \\\n  | --program-transform-nam | --program-transform-na \\\n  | --program-transform-n | --program-transform- \\\n  | --program-transform | --program-transfor \\\n  | --program-transfo | --program-transf \\\n  | --program-trans | --program-tran \\\n  | --progr-tra | --program-tr | --program-t)\n    ac_prev=program_transform_name ;;\n  -program-transform-name=* | --program-transform-name=* \\\n  | --program-transform-nam=* | --program-transform-na=* \\\n  | --program-transform-n=* | --program-transform-=* \\\n  | --program-transform=* | --program-transfor=* \\\n  | --program-transfo=* | --program-transf=* \\\n  | --program-trans=* | --program-tran=* \\\n  | --progr-tra=* | --program-tr=* | --program-t=*)\n    program_transform_name=$ac_optarg ;;\n\n  -q | -quiet | --quiet | --quie | --qui | --qu | --q \\\n  | -silent | --silent | --silen | --sile | --sil)\n    silent=yes ;;\n\n  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)\n    ac_prev=sbindir ;;\n  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \\\n  | --sbi=* | --sb=*)\n    sbindir=$ac_optarg ;;\n\n  -sharedstatedir | --sharedstatedir | --sharedstatedi \\\n  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \\\n  | --sharedst | --shareds | --shared | --share | --shar \\\n  | --sha | --sh)\n    ac_prev=sharedstatedir ;;\n  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \\\n  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \\\n  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \\\n  | --sha=* | --sh=*)\n    sharedstatedir=$ac_optarg ;;\n\n  -site | --site | --sit)\n    ac_prev=site ;;\n  -site=* | --site=* | --sit=*)\n    site=$ac_optarg ;;\n\n  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)\n    ac_prev=srcdir ;;\n  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)\n    srcdir=$ac_optarg ;;\n\n  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \\\n  | --syscon | --sysco | --sysc | --sys | --sy)\n    ac_prev=sysconfdir ;;\n  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \\\n  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)\n    sysconfdir=$ac_optarg ;;\n\n  -target | --target | --targe | --targ | --tar | --ta | --t)\n    ac_prev=target_alias ;;\n  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)\n    target_alias=$ac_optarg ;;\n\n  -v | -verbose | --verbose | --verbos | --verbo | --verb)\n    verbose=yes ;;\n\n  -version | --version | --versio | --versi | --vers | -V)\n    ac_init_version=: ;;\n\n  -with-* | --with-*)\n    ac_package=`expr \"x$ac_option\" : 'x-*with-\\([^=]*\\)'`\n    # Reject names that are not valid shell variable names.\n    expr \"x$ac_package\" : \".*[^-_$as_cr_alnum]\" >/dev/null &&\n      { echo \"$as_me: error: invalid package name: $ac_package\" >&2\n   { (exit 1); exit 1; }; }\n    ac_package=`echo $ac_package| sed 's/-/_/g'`\n    case $ac_option in\n      *=*) ac_optarg=`echo \"$ac_optarg\" | sed \"s/'/'\\\\\\\\\\\\\\\\''/g\"`;;\n      *) ac_optarg=yes ;;\n    esac\n    eval \"with_$ac_package='$ac_optarg'\" ;;\n\n  -without-* | --without-*)\n    ac_package=`expr \"x$ac_option\" : 'x-*without-\\(.*\\)'`\n    # Reject names that are not valid shell variable names.\n    expr \"x$ac_package\" : \".*[^-_$as_cr_alnum]\" >/dev/null &&\n      { echo \"$as_me: error: invalid package name: $ac_package\" >&2\n   { (exit 1); exit 1; }; }\n    ac_package=`echo $ac_package | sed 's/-/_/g'`\n    eval \"with_$ac_package=no\" ;;\n\n  --x)\n    # Obsolete; use --with-x.\n    with_x=yes ;;\n\n  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \\\n  | --x-incl | --x-inc | --x-in | --x-i)\n    ac_prev=x_includes ;;\n  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \\\n  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)\n    x_includes=$ac_optarg ;;\n\n  -x-libraries | --x-libraries | --x-librarie | --x-librari \\\n  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)\n    ac_prev=x_libraries ;;\n  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \\\n  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)\n    x_libraries=$ac_optarg ;;\n\n  -*) { echo \"$as_me: error: unrecognized option: $ac_option\nTry \\`$0 --help' for more information.\" >&2\n   { (exit 1); exit 1; }; }\n    ;;\n\n  *=*)\n    ac_envvar=`expr \"x$ac_option\" : 'x\\([^=]*\\)='`\n    # Reject names that are not valid shell variable names.\n    expr \"x$ac_envvar\" : \".*[^_$as_cr_alnum]\" >/dev/null &&\n      { echo \"$as_me: error: invalid variable name: $ac_envvar\" >&2\n   { (exit 1); exit 1; }; }\n    ac_optarg=`echo \"$ac_optarg\" | sed \"s/'/'\\\\\\\\\\\\\\\\''/g\"`\n    eval \"$ac_envvar='$ac_optarg'\"\n    export $ac_envvar ;;\n\n  *)\n    # FIXME: should be removed in autoconf 3.0.\n    echo \"$as_me: WARNING: you should use --build, --host, --target\" >&2\n    expr \"x$ac_option\" : \".*[^-._$as_cr_alnum]\" >/dev/null &&\n      echo \"$as_me: WARNING: invalid host type: $ac_option\" >&2\n    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}\n    ;;\n\n  esac\ndone\n\nif test -n \"$ac_prev\"; then\n  ac_option=--`echo $ac_prev | sed 's/_/-/g'`\n  { echo \"$as_me: error: missing argument to $ac_option\" >&2\n   { (exit 1); exit 1; }; }\nfi\n\n# Be sure to have absolute paths.\nfor ac_var in exec_prefix prefix\ndo\n  eval ac_val=$`echo $ac_var`\n  case $ac_val in\n    [\\\\/$]* | ?:[\\\\/]* | NONE | '' ) ;;\n    *)  { echo \"$as_me: error: expected an absolute directory name for --$ac_var: $ac_val\" >&2\n   { (exit 1); exit 1; }; };;\n  esac\ndone\n\n# Be sure to have absolute paths.\nfor ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \\\n              localstatedir libdir includedir oldincludedir infodir mandir\ndo\n  eval ac_val=$`echo $ac_var`\n  case $ac_val in\n    [\\\\/$]* | ?:[\\\\/]* ) ;;\n    *)  { echo \"$as_me: error: expected an absolute directory name for --$ac_var: $ac_val\" >&2\n   { (exit 1); exit 1; }; };;\n  esac\ndone\n\n# There might be people who depend on the old broken behavior: `$host'\n# used to hold the argument of --host etc.\n# FIXME: To remove some day.\nbuild=$build_alias\nhost=$host_alias\ntarget=$target_alias\n\n# FIXME: To remove some day.\nif test \"x$host_alias\" != x; then\n  if test \"x$build_alias\" = x; then\n    cross_compiling=maybe\n    echo \"$as_me: WARNING: If you wanted to set the --build type, don't use --host.\n    If a cross compiler is detected then cross compile mode will be used.\" >&2\n  elif test \"x$build_alias\" != \"x$host_alias\"; then\n    cross_compiling=yes\n  fi\nfi\n\nac_tool_prefix=\ntest -n \"$host_alias\" && ac_tool_prefix=$host_alias-\n\ntest \"$silent\" = yes && exec 6>/dev/null\n\n\n# Find the source files, if location was not specified.\nif test -z \"$srcdir\"; then\n  ac_srcdir_defaulted=yes\n  # Try the directory containing this script, then its parent.\n  ac_confdir=`(dirname \"$0\") 2>/dev/null ||\n$as_expr X\"$0\" : 'X\\(.*[^/]\\)//*[^/][^/]*/*$' \\| \\\n         X\"$0\" : 'X\\(//\\)[^/]' \\| \\\n         X\"$0\" : 'X\\(//\\)$' \\| \\\n         X\"$0\" : 'X\\(/\\)' \\| \\\n         .     : '\\(.\\)' 2>/dev/null ||\necho X\"$0\" |\n    sed '/^X\\(.*[^/]\\)\\/\\/*[^/][^/]*\\/*$/{ s//\\1/; q; }\n  \t  /^X\\(\\/\\/\\)[^/].*/{ s//\\1/; q; }\n  \t  /^X\\(\\/\\/\\)$/{ s//\\1/; q; }\n  \t  /^X\\(\\/\\).*/{ s//\\1/; q; }\n  \t  s/.*/./; q'`\n  srcdir=$ac_confdir\n  if test ! -r $srcdir/$ac_unique_file; then\n    srcdir=..\n  fi\nelse\n  ac_srcdir_defaulted=no\nfi\nif test ! -r $srcdir/$ac_unique_file; then\n  if test \"$ac_srcdir_defaulted\" = yes; then\n    { echo \"$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or ..\" >&2\n   { (exit 1); exit 1; }; }\n  else\n    { echo \"$as_me: error: cannot find sources ($ac_unique_file) in $srcdir\" >&2\n   { (exit 1); exit 1; }; }\n  fi\nfi\n(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||\n  { echo \"$as_me: error: sources are in $srcdir, but \\`cd $srcdir' does not work\" >&2\n   { (exit 1); exit 1; }; }\nsrcdir=`echo \"$srcdir\" | sed 's%\\([^\\\\/]\\)[\\\\/]*$%\\1%'`\nac_env_build_alias_set=${build_alias+set}\nac_env_build_alias_value=$build_alias\nac_cv_env_build_alias_set=${build_alias+set}\nac_cv_env_build_alias_value=$build_alias\nac_env_host_alias_set=${host_alias+set}\nac_env_host_alias_value=$host_alias\nac_cv_env_host_alias_set=${host_alias+set}\nac_cv_env_host_alias_value=$host_alias\nac_env_target_alias_set=${target_alias+set}\nac_env_target_alias_value=$target_alias\nac_cv_env_target_alias_set=${target_alias+set}\nac_cv_env_target_alias_value=$target_alias\nac_env_CC_set=${CC+set}\nac_env_CC_value=$CC\nac_cv_env_CC_set=${CC+set}\nac_cv_env_CC_value=$CC\nac_env_CFLAGS_set=${CFLAGS+set}\nac_env_CFLAGS_value=$CFLAGS\nac_cv_env_CFLAGS_set=${CFLAGS+set}\nac_cv_env_CFLAGS_value=$CFLAGS\nac_env_LDFLAGS_set=${LDFLAGS+set}\nac_env_LDFLAGS_value=$LDFLAGS\nac_cv_env_LDFLAGS_set=${LDFLAGS+set}\nac_cv_env_LDFLAGS_value=$LDFLAGS\nac_env_CPPFLAGS_set=${CPPFLAGS+set}\nac_env_CPPFLAGS_value=$CPPFLAGS\nac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}\nac_cv_env_CPPFLAGS_value=$CPPFLAGS\nac_env_CXX_set=${CXX+set}\nac_env_CXX_value=$CXX\nac_cv_env_CXX_set=${CXX+set}\nac_cv_env_CXX_value=$CXX\nac_env_CXXFLAGS_set=${CXXFLAGS+set}\nac_env_CXXFLAGS_value=$CXXFLAGS\nac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}\nac_cv_env_CXXFLAGS_value=$CXXFLAGS\n\n#\n# Report the --help message.\n#\nif test \"$ac_init_help\" = \"long\"; then\n  # Omit some internal or obsolete options to make the list less imposing.\n  # This message is too long to be a string in the A/UX 3.1 sh.\n  cat <<_ACEOF\n\\`configure' configures PortAudioCpp 12 to adapt to many kinds of systems.\n\nUsage: $0 [OPTION]... [VAR=VALUE]...\n\nTo assign environment variables (e.g., CC, CFLAGS...), specify them as\nVAR=VALUE.  See below for descriptions of some of the useful variables.\n\nDefaults for the options are specified in brackets.\n\nConfiguration:\n  -h, --help              display this help and exit\n      --help=short        display options specific to this package\n      --help=recursive    display the short help of all the included packages\n  -V, --version           display version information and exit\n  -q, --quiet, --silent   do not print \\`checking...' messages\n      --cache-file=FILE   cache test results in FILE [disabled]\n  -C, --config-cache      alias for \\`--cache-file=config.cache'\n  -n, --no-create         do not create output files\n      --srcdir=DIR        find the sources in DIR [configure dir or \\`..']\n\n_ACEOF\n\n  cat <<_ACEOF\nInstallation directories:\n  --prefix=PREFIX         install architecture-independent files in PREFIX\n                          [$ac_default_prefix]\n  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX\n                          [PREFIX]\n\nBy default, \\`make install' will install all the files in\n\\`$ac_default_prefix/bin', \\`$ac_default_prefix/lib' etc.  You can specify\nan installation prefix other than \\`$ac_default_prefix' using \\`--prefix',\nfor instance \\`--prefix=\\$HOME'.\n\nFor better control, use the options below.\n\nFine tuning of the installation directories:\n  --bindir=DIR           user executables [EPREFIX/bin]\n  --sbindir=DIR          system admin executables [EPREFIX/sbin]\n  --libexecdir=DIR       program executables [EPREFIX/libexec]\n  --datadir=DIR          read-only architecture-independent data [PREFIX/share]\n  --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]\n  --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]\n  --localstatedir=DIR    modifiable single-machine data [PREFIX/var]\n  --libdir=DIR           object code libraries [EPREFIX/lib]\n  --includedir=DIR       C header files [PREFIX/include]\n  --oldincludedir=DIR    C header files for non-gcc [/usr/include]\n  --infodir=DIR          info documentation [PREFIX/info]\n  --mandir=DIR           man documentation [PREFIX/man]\n_ACEOF\n\n  cat <<\\_ACEOF\n\nSystem types:\n  --build=BUILD     configure for building on BUILD [guessed]\n  --host=HOST       cross-compile to build programs to run on HOST [BUILD]\n_ACEOF\nfi\n\nif test -n \"$ac_init_help\"; then\n  case $ac_init_help in\n     short | recursive ) echo \"Configuration of PortAudioCpp 12:\";;\n   esac\n  cat <<\\_ACEOF\n\nOptional Packages:\n  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]\n  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)\n  --with-alsa (default=auto)\n  --with-jack (default=auto)\n  --with-oss (default=yes)\n  --with-host_os (no default)\n  --with-winapi ((wmme/directx/asio) default=wmme)\n  --with-macapi (asio) default=asio)\n  --with-asiodir (default=/usr/local/asiosdk2)\n  --with-dxdir (default=/usr/local/dx7sdk)\n\nSome influential environment variables:\n  CC          C compiler command\n  CFLAGS      C compiler flags\n  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a\n              nonstandard directory <lib dir>\n  CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have\n              headers in a nonstandard directory <include dir>\n  CXX         C++ compiler command\n  CXXFLAGS    C++ compiler flags\n\nUse these variables to override the choices made by `configure' or to help\nit to find libraries and programs with nonstandard names/locations.\n\n_ACEOF\nfi\n\nif test \"$ac_init_help\" = \"recursive\"; then\n  # If there are subdirs, report their specific --help.\n  ac_popdir=`pwd`\n  for ac_dir in : $ac_subdirs_all; do test \"x$ac_dir\" = x: && continue\n    test -d $ac_dir || continue\n    ac_builddir=.\n\nif test \"$ac_dir\" != .; then\n  ac_dir_suffix=/`echo \"$ac_dir\" | sed 's,^\\.[\\\\/],,'`\n  # A \"../\" for each directory in $ac_dir_suffix.\n  ac_top_builddir=`echo \"$ac_dir_suffix\" | sed 's,/[^\\\\/]*,../,g'`\nelse\n  ac_dir_suffix= ac_top_builddir=\nfi\n\ncase $srcdir in\n  .)  # No --srcdir option.  We are building in place.\n    ac_srcdir=.\n    if test -z \"$ac_top_builddir\"; then\n       ac_top_srcdir=.\n    else\n       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`\n    fi ;;\n  [\\\\/]* | ?:[\\\\/]* )  # Absolute path.\n    ac_srcdir=$srcdir$ac_dir_suffix;\n    ac_top_srcdir=$srcdir ;;\n  *) # Relative path.\n    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix\n    ac_top_srcdir=$ac_top_builddir$srcdir ;;\nesac\n# Don't blindly perform a `cd \"$ac_dir\"/$ac_foo && pwd` since $ac_foo can be\n# absolute.\nac_abs_builddir=`cd \"$ac_dir\" && cd $ac_builddir && pwd`\nac_abs_top_builddir=`cd \"$ac_dir\" && cd ${ac_top_builddir}. && pwd`\nac_abs_srcdir=`cd \"$ac_dir\" && cd $ac_srcdir && pwd`\nac_abs_top_srcdir=`cd \"$ac_dir\" && cd $ac_top_srcdir && pwd`\n\n    cd $ac_dir\n    # Check for guested configure; otherwise get Cygnus style configure.\n    if test -f $ac_srcdir/configure.gnu; then\n      echo\n      $SHELL $ac_srcdir/configure.gnu  --help=recursive\n    elif test -f $ac_srcdir/configure; then\n      echo\n      $SHELL $ac_srcdir/configure  --help=recursive\n    elif test -f $ac_srcdir/configure.ac ||\n           test -f $ac_srcdir/configure.in; then\n      echo\n      $ac_configure --help\n    else\n      echo \"$as_me: WARNING: no configuration information is in $ac_dir\" >&2\n    fi\n    cd \"$ac_popdir\"\n  done\nfi\n\ntest -n \"$ac_init_help\" && exit 0\nif $ac_init_version; then\n  cat <<\\_ACEOF\nPortAudioCpp configure 12\ngenerated by GNU Autoconf 2.57\n\nCopyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002\nFree Software Foundation, Inc.\nThis configure script is free software; the Free Software Foundation\ngives unlimited permission to copy, distribute and modify it.\n_ACEOF\n  exit 0\nfi\nexec 5>config.log\ncat >&5 <<_ACEOF\nThis file contains any messages produced by compilers while\nrunning configure, to aid debugging if configure makes a mistake.\n\nIt was created by PortAudioCpp $as_me 12, which was\ngenerated by GNU Autoconf 2.57.  Invocation command line was\n\n  $ $0 $@\n\n_ACEOF\n{\ncat <<_ASUNAME\n## --------- ##\n## Platform. ##\n## --------- ##\n\nhostname = `(hostname || uname -n) 2>/dev/null | sed 1q`\nuname -m = `(uname -m) 2>/dev/null || echo unknown`\nuname -r = `(uname -r) 2>/dev/null || echo unknown`\nuname -s = `(uname -s) 2>/dev/null || echo unknown`\nuname -v = `(uname -v) 2>/dev/null || echo unknown`\n\n/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`\n/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`\n\n/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`\n/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`\n/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`\nhostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`\n/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`\n/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`\n/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`\n\n_ASUNAME\n\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n  echo \"PATH: $as_dir\"\ndone\n\n} >&5\n\ncat >&5 <<_ACEOF\n\n\n## ----------- ##\n## Core tests. ##\n## ----------- ##\n\n_ACEOF\n\n\n# Keep a trace of the command line.\n# Strip out --no-create and --no-recursion so they do not pile up.\n# Strip out --silent because we don't want to record it for future runs.\n# Also quote any args containing shell meta-characters.\n# Make two passes to allow for proper duplicate-argument suppression.\nac_configure_args=\nac_configure_args0=\nac_configure_args1=\nac_sep=\nac_must_keep_next=false\nfor ac_pass in 1 2\ndo\n  for ac_arg\n  do\n    case $ac_arg in\n    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;\n    -q | -quiet | --quiet | --quie | --qui | --qu | --q \\\n    | -silent | --silent | --silen | --sile | --sil)\n      continue ;;\n    *\" \"*|*\"\t\"*|*[\\[\\]\\~\\#\\$\\^\\&\\*\\(\\)\\{\\}\\\\\\|\\;\\<\\>\\?\\\"\\']*)\n      ac_arg=`echo \"$ac_arg\" | sed \"s/'/'\\\\\\\\\\\\\\\\''/g\"` ;;\n    esac\n    case $ac_pass in\n    1) ac_configure_args0=\"$ac_configure_args0 '$ac_arg'\" ;;\n    2)\n      ac_configure_args1=\"$ac_configure_args1 '$ac_arg'\"\n      if test $ac_must_keep_next = true; then\n        ac_must_keep_next=false # Got value, back to normal.\n      else\n        case $ac_arg in\n          *=* | --config-cache | -C | -disable-* | --disable-* \\\n          | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \\\n          | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \\\n          | -with-* | --with-* | -without-* | --without-* | --x)\n            case \"$ac_configure_args0 \" in\n              \"$ac_configure_args1\"*\" '$ac_arg' \"* ) continue ;;\n            esac\n            ;;\n          -* ) ac_must_keep_next=true ;;\n        esac\n      fi\n      ac_configure_args=\"$ac_configure_args$ac_sep'$ac_arg'\"\n      # Get rid of the leading space.\n      ac_sep=\" \"\n      ;;\n    esac\n  done\ndone\n$as_unset ac_configure_args0 || test \"${ac_configure_args0+set}\" != set || { ac_configure_args0=; export ac_configure_args0; }\n$as_unset ac_configure_args1 || test \"${ac_configure_args1+set}\" != set || { ac_configure_args1=; export ac_configure_args1; }\n\n# When interrupted or exit'd, cleanup temporary files, and complete\n# config.log.  We remove comments because anyway the quotes in there\n# would cause problems or look ugly.\n# WARNING: Be sure not to use single quotes in there, as some shells,\n# such as our DU 5.0 friend, will then `close' the trap.\ntrap 'exit_status=$?\n  # Save into config.log some information that might help in debugging.\n  {\n    echo\n\n    cat <<\\_ASBOX\n## ---------------- ##\n## Cache variables. ##\n## ---------------- ##\n_ASBOX\n    echo\n    # The following way of writing the cache mishandles newlines in values,\n{\n  (set) 2>&1 |\n    case `(ac_space='\"'\"' '\"'\"'; set | grep ac_space) 2>&1` in\n    *ac_space=\\ *)\n      sed -n \\\n        \"s/'\"'\"'/'\"'\"'\\\\\\\\'\"'\"''\"'\"'/g;\n    \t  s/^\\\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\\\)=\\\\(.*\\\\)/\\\\1='\"'\"'\\\\2'\"'\"'/p\"\n      ;;\n    *)\n      sed -n \\\n        \"s/^\\\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\\\)=\\\\(.*\\\\)/\\\\1=\\\\2/p\"\n      ;;\n    esac;\n}\n    echo\n\n    cat <<\\_ASBOX\n## ----------------- ##\n## Output variables. ##\n## ----------------- ##\n_ASBOX\n    echo\n    for ac_var in $ac_subst_vars\n    do\n      eval ac_val=$`echo $ac_var`\n      echo \"$ac_var='\"'\"'$ac_val'\"'\"'\"\n    done | sort\n    echo\n\n    if test -n \"$ac_subst_files\"; then\n      cat <<\\_ASBOX\n## ------------- ##\n## Output files. ##\n## ------------- ##\n_ASBOX\n      echo\n      for ac_var in $ac_subst_files\n      do\n\teval ac_val=$`echo $ac_var`\n        echo \"$ac_var='\"'\"'$ac_val'\"'\"'\"\n      done | sort\n      echo\n    fi\n\n    if test -s confdefs.h; then\n      cat <<\\_ASBOX\n## ----------- ##\n## confdefs.h. ##\n## ----------- ##\n_ASBOX\n      echo\n      sed \"/^$/d\" confdefs.h | sort\n      echo\n    fi\n    test \"$ac_signal\" != 0 &&\n      echo \"$as_me: caught signal $ac_signal\"\n    echo \"$as_me: exit $exit_status\"\n  } >&5\n  rm -f core *.core &&\n  rm -rf conftest* confdefs* conf$$* $ac_clean_files &&\n    exit $exit_status\n     ' 0\nfor ac_signal in 1 2 13 15; do\n  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal\ndone\nac_signal=0\n\n# confdefs.h avoids OS command line length limits that DEFS can exceed.\nrm -rf conftest* confdefs.h\n# AIX cpp loses on an empty file, so make sure it contains at least a newline.\necho >confdefs.h\n\n# Predefined preprocessor variables.\n\ncat >>confdefs.h <<_ACEOF\n#define PACKAGE_NAME \"$PACKAGE_NAME\"\n_ACEOF\n\n\ncat >>confdefs.h <<_ACEOF\n#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"\n_ACEOF\n\n\ncat >>confdefs.h <<_ACEOF\n#define PACKAGE_VERSION \"$PACKAGE_VERSION\"\n_ACEOF\n\n\ncat >>confdefs.h <<_ACEOF\n#define PACKAGE_STRING \"$PACKAGE_STRING\"\n_ACEOF\n\n\ncat >>confdefs.h <<_ACEOF\n#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"\n_ACEOF\n\n\n# Let the site file select an alternate cache file if it wants to.\n# Prefer explicitly selected file to automatically selected ones.\nif test -z \"$CONFIG_SITE\"; then\n  if test \"x$prefix\" != xNONE; then\n    CONFIG_SITE=\"$prefix/share/config.site $prefix/etc/config.site\"\n  else\n    CONFIG_SITE=\"$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site\"\n  fi\nfi\nfor ac_site_file in $CONFIG_SITE; do\n  if test -r \"$ac_site_file\"; then\n    { echo \"$as_me:$LINENO: loading site script $ac_site_file\" >&5\necho \"$as_me: loading site script $ac_site_file\" >&6;}\n    sed 's/^/| /' \"$ac_site_file\" >&5\n    . \"$ac_site_file\"\n  fi\ndone\n\nif test -r \"$cache_file\"; then\n  # Some versions of bash will fail to source /dev/null (special\n  # files actually), so we avoid doing that.\n  if test -f \"$cache_file\"; then\n    { echo \"$as_me:$LINENO: loading cache $cache_file\" >&5\necho \"$as_me: loading cache $cache_file\" >&6;}\n    case $cache_file in\n      [\\\\/]* | ?:[\\\\/]* ) . $cache_file;;\n      *)                      . ./$cache_file;;\n    esac\n  fi\nelse\n  { echo \"$as_me:$LINENO: creating cache $cache_file\" >&5\necho \"$as_me: creating cache $cache_file\" >&6;}\n  >$cache_file\nfi\n\n# Check that the precious variables saved in the cache have kept the same\n# value.\nac_cache_corrupted=false\nfor ac_var in `(set) 2>&1 |\n               sed -n 's/^ac_env_\\([a-zA-Z_0-9]*\\)_set=.*/\\1/p'`; do\n  eval ac_old_set=\\$ac_cv_env_${ac_var}_set\n  eval ac_new_set=\\$ac_env_${ac_var}_set\n  eval ac_old_val=\"\\$ac_cv_env_${ac_var}_value\"\n  eval ac_new_val=\"\\$ac_env_${ac_var}_value\"\n  case $ac_old_set,$ac_new_set in\n    set,)\n      { echo \"$as_me:$LINENO: error: \\`$ac_var' was set to \\`$ac_old_val' in the previous run\" >&5\necho \"$as_me: error: \\`$ac_var' was set to \\`$ac_old_val' in the previous run\" >&2;}\n      ac_cache_corrupted=: ;;\n    ,set)\n      { echo \"$as_me:$LINENO: error: \\`$ac_var' was not set in the previous run\" >&5\necho \"$as_me: error: \\`$ac_var' was not set in the previous run\" >&2;}\n      ac_cache_corrupted=: ;;\n    ,);;\n    *)\n      if test \"x$ac_old_val\" != \"x$ac_new_val\"; then\n        { echo \"$as_me:$LINENO: error: \\`$ac_var' has changed since the previous run:\" >&5\necho \"$as_me: error: \\`$ac_var' has changed since the previous run:\" >&2;}\n        { echo \"$as_me:$LINENO:   former value:  $ac_old_val\" >&5\necho \"$as_me:   former value:  $ac_old_val\" >&2;}\n        { echo \"$as_me:$LINENO:   current value: $ac_new_val\" >&5\necho \"$as_me:   current value: $ac_new_val\" >&2;}\n        ac_cache_corrupted=:\n      fi;;\n  esac\n  # Pass precious variables to config.status.\n  if test \"$ac_new_set\" = set; then\n    case $ac_new_val in\n    *\" \"*|*\"\t\"*|*[\\[\\]\\~\\#\\$\\^\\&\\*\\(\\)\\{\\}\\\\\\|\\;\\<\\>\\?\\\"\\']*)\n      ac_arg=$ac_var=`echo \"$ac_new_val\" | sed \"s/'/'\\\\\\\\\\\\\\\\''/g\"` ;;\n    *) ac_arg=$ac_var=$ac_new_val ;;\n    esac\n    case \" $ac_configure_args \" in\n      *\" '$ac_arg' \"*) ;; # Avoid dups.  Use of quotes ensures accuracy.\n      *) ac_configure_args=\"$ac_configure_args '$ac_arg'\" ;;\n    esac\n  fi\ndone\nif $ac_cache_corrupted; then\n  { echo \"$as_me:$LINENO: error: changes in the environment can compromise the build\" >&5\necho \"$as_me: error: changes in the environment can compromise the build\" >&2;}\n  { { echo \"$as_me:$LINENO: error: run \\`make distclean' and/or \\`rm $cache_file' and start over\" >&5\necho \"$as_me: error: run \\`make distclean' and/or \\`rm $cache_file' and start over\" >&2;}\n   { (exit 1); exit 1; }; }\nfi\n\nac_ext=c\nac_cpp='$CPP $CPPFLAGS'\nac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'\nac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'\nac_compiler_gnu=$ac_cv_c_compiler_gnu\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n###### Top-level directory of pacpp\n###### This makes it easy to shuffle the build directories\n###### Also edit AC_CONFIG_SRCDIR above (wouldn't accept this variable)!\nPACPP_ROOT=\"../..\"\n\n######\n###### SET THIS TO PORTAUDIO DIRECTORY\n######\nPORTAUDIO=\"$PACPP_ROOT/../portaudio\"\n\n# Various other variables and flags\n\nPACPP_INC=\"$PACPP_ROOT/include\"\nINCLUDES=\"-I$PACPP_INC -I$PORTAUDIO -I$PORTAUDIO/pa_common\"\nCFLAGS=\"-g -O2 -Wall -ansi -pedantic $INCLUDES\"\nCXXFLAGS=\"$CFLAGS\"\nPALIBDIR=\"$PORTAUDIO/lib\"\n\n# Checks for programs\n\nac_ext=c\nac_cpp='$CPP $CPPFLAGS'\nac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'\nac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'\nac_compiler_gnu=$ac_cv_c_compiler_gnu\nif test -n \"$ac_tool_prefix\"; then\n  # Extract the first word of \"${ac_tool_prefix}gcc\", so it can be a program name with args.\nset dummy ${ac_tool_prefix}gcc; ac_word=$2\necho \"$as_me:$LINENO: checking for $ac_word\" >&5\necho $ECHO_N \"checking for $ac_word... $ECHO_C\" >&6\nif test \"${ac_cv_prog_CC+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  if test -n \"$CC\"; then\n  ac_cv_prog_CC=\"$CC\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n  for ac_exec_ext in '' $ac_executable_extensions; do\n  if $as_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_CC=\"${ac_tool_prefix}gcc\"\n    echo \"$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\ndone\n\nfi\nfi\nCC=$ac_cv_prog_CC\nif test -n \"$CC\"; then\n  echo \"$as_me:$LINENO: result: $CC\" >&5\necho \"${ECHO_T}$CC\" >&6\nelse\n  echo \"$as_me:$LINENO: result: no\" >&5\necho \"${ECHO_T}no\" >&6\nfi\n\nfi\nif test -z \"$ac_cv_prog_CC\"; then\n  ac_ct_CC=$CC\n  # Extract the first word of \"gcc\", so it can be a program name with args.\nset dummy gcc; ac_word=$2\necho \"$as_me:$LINENO: checking for $ac_word\" >&5\necho $ECHO_N \"checking for $ac_word... $ECHO_C\" >&6\nif test \"${ac_cv_prog_ac_ct_CC+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  if test -n \"$ac_ct_CC\"; then\n  ac_cv_prog_ac_ct_CC=\"$ac_ct_CC\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n  for ac_exec_ext in '' $ac_executable_extensions; do\n  if $as_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_ac_ct_CC=\"gcc\"\n    echo \"$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\ndone\n\nfi\nfi\nac_ct_CC=$ac_cv_prog_ac_ct_CC\nif test -n \"$ac_ct_CC\"; then\n  echo \"$as_me:$LINENO: result: $ac_ct_CC\" >&5\necho \"${ECHO_T}$ac_ct_CC\" >&6\nelse\n  echo \"$as_me:$LINENO: result: no\" >&5\necho \"${ECHO_T}no\" >&6\nfi\n\n  CC=$ac_ct_CC\nelse\n  CC=\"$ac_cv_prog_CC\"\nfi\n\nif test -z \"$CC\"; then\n  if test -n \"$ac_tool_prefix\"; then\n  # Extract the first word of \"${ac_tool_prefix}cc\", so it can be a program name with args.\nset dummy ${ac_tool_prefix}cc; ac_word=$2\necho \"$as_me:$LINENO: checking for $ac_word\" >&5\necho $ECHO_N \"checking for $ac_word... $ECHO_C\" >&6\nif test \"${ac_cv_prog_CC+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  if test -n \"$CC\"; then\n  ac_cv_prog_CC=\"$CC\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n  for ac_exec_ext in '' $ac_executable_extensions; do\n  if $as_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_CC=\"${ac_tool_prefix}cc\"\n    echo \"$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\ndone\n\nfi\nfi\nCC=$ac_cv_prog_CC\nif test -n \"$CC\"; then\n  echo \"$as_me:$LINENO: result: $CC\" >&5\necho \"${ECHO_T}$CC\" >&6\nelse\n  echo \"$as_me:$LINENO: result: no\" >&5\necho \"${ECHO_T}no\" >&6\nfi\n\nfi\nif test -z \"$ac_cv_prog_CC\"; then\n  ac_ct_CC=$CC\n  # Extract the first word of \"cc\", so it can be a program name with args.\nset dummy cc; ac_word=$2\necho \"$as_me:$LINENO: checking for $ac_word\" >&5\necho $ECHO_N \"checking for $ac_word... $ECHO_C\" >&6\nif test \"${ac_cv_prog_ac_ct_CC+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  if test -n \"$ac_ct_CC\"; then\n  ac_cv_prog_ac_ct_CC=\"$ac_ct_CC\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n  for ac_exec_ext in '' $ac_executable_extensions; do\n  if $as_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_ac_ct_CC=\"cc\"\n    echo \"$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\ndone\n\nfi\nfi\nac_ct_CC=$ac_cv_prog_ac_ct_CC\nif test -n \"$ac_ct_CC\"; then\n  echo \"$as_me:$LINENO: result: $ac_ct_CC\" >&5\necho \"${ECHO_T}$ac_ct_CC\" >&6\nelse\n  echo \"$as_me:$LINENO: result: no\" >&5\necho \"${ECHO_T}no\" >&6\nfi\n\n  CC=$ac_ct_CC\nelse\n  CC=\"$ac_cv_prog_CC\"\nfi\n\nfi\nif test -z \"$CC\"; then\n  # Extract the first word of \"cc\", so it can be a program name with args.\nset dummy cc; ac_word=$2\necho \"$as_me:$LINENO: checking for $ac_word\" >&5\necho $ECHO_N \"checking for $ac_word... $ECHO_C\" >&6\nif test \"${ac_cv_prog_CC+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  if test -n \"$CC\"; then\n  ac_cv_prog_CC=\"$CC\" # Let the user override the test.\nelse\n  ac_prog_rejected=no\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n  for ac_exec_ext in '' $ac_executable_extensions; do\n  if $as_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    if test \"$as_dir/$ac_word$ac_exec_ext\" = \"/usr/ucb/cc\"; then\n       ac_prog_rejected=yes\n       continue\n     fi\n    ac_cv_prog_CC=\"cc\"\n    echo \"$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\ndone\n\nif test $ac_prog_rejected = yes; then\n  # We found a bogon in the path, so make sure we never use it.\n  set dummy $ac_cv_prog_CC\n  shift\n  if test $# != 0; then\n    # We chose a different compiler from the bogus one.\n    # However, it has the same basename, so the bogon will be chosen\n    # first if we set CC to just the basename; use the full file name.\n    shift\n    ac_cv_prog_CC=\"$as_dir/$ac_word${1+' '}$@\"\n  fi\nfi\nfi\nfi\nCC=$ac_cv_prog_CC\nif test -n \"$CC\"; then\n  echo \"$as_me:$LINENO: result: $CC\" >&5\necho \"${ECHO_T}$CC\" >&6\nelse\n  echo \"$as_me:$LINENO: result: no\" >&5\necho \"${ECHO_T}no\" >&6\nfi\n\nfi\nif test -z \"$CC\"; then\n  if test -n \"$ac_tool_prefix\"; then\n  for ac_prog in cl\n  do\n    # Extract the first word of \"$ac_tool_prefix$ac_prog\", so it can be a program name with args.\nset dummy $ac_tool_prefix$ac_prog; ac_word=$2\necho \"$as_me:$LINENO: checking for $ac_word\" >&5\necho $ECHO_N \"checking for $ac_word... $ECHO_C\" >&6\nif test \"${ac_cv_prog_CC+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  if test -n \"$CC\"; then\n  ac_cv_prog_CC=\"$CC\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n  for ac_exec_ext in '' $ac_executable_extensions; do\n  if $as_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_CC=\"$ac_tool_prefix$ac_prog\"\n    echo \"$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\ndone\n\nfi\nfi\nCC=$ac_cv_prog_CC\nif test -n \"$CC\"; then\n  echo \"$as_me:$LINENO: result: $CC\" >&5\necho \"${ECHO_T}$CC\" >&6\nelse\n  echo \"$as_me:$LINENO: result: no\" >&5\necho \"${ECHO_T}no\" >&6\nfi\n\n    test -n \"$CC\" && break\n  done\nfi\nif test -z \"$CC\"; then\n  ac_ct_CC=$CC\n  for ac_prog in cl\ndo\n  # Extract the first word of \"$ac_prog\", so it can be a program name with args.\nset dummy $ac_prog; ac_word=$2\necho \"$as_me:$LINENO: checking for $ac_word\" >&5\necho $ECHO_N \"checking for $ac_word... $ECHO_C\" >&6\nif test \"${ac_cv_prog_ac_ct_CC+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  if test -n \"$ac_ct_CC\"; then\n  ac_cv_prog_ac_ct_CC=\"$ac_ct_CC\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n  for ac_exec_ext in '' $ac_executable_extensions; do\n  if $as_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_ac_ct_CC=\"$ac_prog\"\n    echo \"$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\ndone\n\nfi\nfi\nac_ct_CC=$ac_cv_prog_ac_ct_CC\nif test -n \"$ac_ct_CC\"; then\n  echo \"$as_me:$LINENO: result: $ac_ct_CC\" >&5\necho \"${ECHO_T}$ac_ct_CC\" >&6\nelse\n  echo \"$as_me:$LINENO: result: no\" >&5\necho \"${ECHO_T}no\" >&6\nfi\n\n  test -n \"$ac_ct_CC\" && break\ndone\n\n  CC=$ac_ct_CC\nfi\n\nfi\n\n\ntest -z \"$CC\" && { { echo \"$as_me:$LINENO: error: no acceptable C compiler found in \\$PATH\nSee \\`config.log' for more details.\" >&5\necho \"$as_me: error: no acceptable C compiler found in \\$PATH\nSee \\`config.log' for more details.\" >&2;}\n   { (exit 1); exit 1; }; }\n\n# Provide some information about the compiler.\necho \"$as_me:$LINENO:\" \\\n     \"checking for C compiler version\" >&5\nac_compiler=`set X $ac_compile; echo $2`\n{ (eval echo \"$as_me:$LINENO: \\\"$ac_compiler --version </dev/null >&5\\\"\") >&5\n  (eval $ac_compiler --version </dev/null >&5) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }\n{ (eval echo \"$as_me:$LINENO: \\\"$ac_compiler -v </dev/null >&5\\\"\") >&5\n  (eval $ac_compiler -v </dev/null >&5) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }\n{ (eval echo \"$as_me:$LINENO: \\\"$ac_compiler -V </dev/null >&5\\\"\") >&5\n  (eval $ac_compiler -V </dev/null >&5) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }\n\ncat >conftest.$ac_ext <<_ACEOF\n#line $LINENO \"configure\"\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n\nint\nmain ()\n{\n\n  ;\n  return 0;\n}\n_ACEOF\nac_clean_files_save=$ac_clean_files\nac_clean_files=\"$ac_clean_files a.out a.exe b.out\"\n# Try to create an executable without -o first, disregard a.out.\n# It will help us diagnose broken compilers, and finding out an intuition\n# of exeext.\necho \"$as_me:$LINENO: checking for C compiler default output\" >&5\necho $ECHO_N \"checking for C compiler default output... $ECHO_C\" >&6\nac_link_default=`echo \"$ac_link\" | sed 's/ -o *conftest[^ ]*//'`\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_link_default\\\"\") >&5\n  (eval $ac_link_default) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; then\n  # Find the output, starting from the most likely.  This scheme is\n# not robust to junk in `.', hence go to wildcards (a.*) only as a last\n# resort.\n\n# Be careful to initialize this variable, since it used to be cached.\n# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.\nac_cv_exeext=\n# b.out is created by i960 compilers.\nfor ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out\ndo\n  test -f \"$ac_file\" || continue\n  case $ac_file in\n    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )\n        ;;\n    conftest.$ac_ext )\n        # This is the source file.\n        ;;\n    [ab].out )\n        # We found the default executable, but exeext='' is most\n        # certainly right.\n        break;;\n    *.* )\n        ac_cv_exeext=`expr \"$ac_file\" : '[^.]*\\(\\..*\\)'`\n        # FIXME: I believe we export ac_cv_exeext for Libtool,\n        # but it would be cool to find out if it's true.  Does anybody\n        # maintain Libtool? --akim.\n        export ac_cv_exeext\n        break;;\n    * )\n        break;;\n  esac\ndone\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\n{ { echo \"$as_me:$LINENO: error: C compiler cannot create executables\nSee \\`config.log' for more details.\" >&5\necho \"$as_me: error: C compiler cannot create executables\nSee \\`config.log' for more details.\" >&2;}\n   { (exit 77); exit 77; }; }\nfi\n\nac_exeext=$ac_cv_exeext\necho \"$as_me:$LINENO: result: $ac_file\" >&5\necho \"${ECHO_T}$ac_file\" >&6\n\n# Check the compiler produces executables we can run.  If not, either\n# the compiler is broken, or we cross compile.\necho \"$as_me:$LINENO: checking whether the C compiler works\" >&5\necho $ECHO_N \"checking whether the C compiler works... $ECHO_C\" >&6\n# FIXME: These cross compiler hacks should be removed for Autoconf 3.0\n# If not cross compiling, check that we can run a simple program.\nif test \"$cross_compiling\" != yes; then\n  if { ac_try='./$ac_file'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n    cross_compiling=no\n  else\n    if test \"$cross_compiling\" = maybe; then\n\tcross_compiling=yes\n    else\n\t{ { echo \"$as_me:$LINENO: error: cannot run C compiled programs.\nIf you meant to cross compile, use \\`--host'.\nSee \\`config.log' for more details.\" >&5\necho \"$as_me: error: cannot run C compiled programs.\nIf you meant to cross compile, use \\`--host'.\nSee \\`config.log' for more details.\" >&2;}\n   { (exit 1); exit 1; }; }\n    fi\n  fi\nfi\necho \"$as_me:$LINENO: result: yes\" >&5\necho \"${ECHO_T}yes\" >&6\n\nrm -f a.out a.exe conftest$ac_cv_exeext b.out\nac_clean_files=$ac_clean_files_save\n# Check the compiler produces executables we can run.  If not, either\n# the compiler is broken, or we cross compile.\necho \"$as_me:$LINENO: checking whether we are cross compiling\" >&5\necho $ECHO_N \"checking whether we are cross compiling... $ECHO_C\" >&6\necho \"$as_me:$LINENO: result: $cross_compiling\" >&5\necho \"${ECHO_T}$cross_compiling\" >&6\n\necho \"$as_me:$LINENO: checking for suffix of executables\" >&5\necho $ECHO_N \"checking for suffix of executables... $ECHO_C\" >&6\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_link\\\"\") >&5\n  (eval $ac_link) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; then\n  # If both `conftest.exe' and `conftest' are `present' (well, observable)\n# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will\n# work properly (i.e., refer to `conftest.exe'), while it won't with\n# `rm'.\nfor ac_file in conftest.exe conftest conftest.*; do\n  test -f \"$ac_file\" || continue\n  case $ac_file in\n    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;\n    *.* ) ac_cv_exeext=`expr \"$ac_file\" : '[^.]*\\(\\..*\\)'`\n          export ac_cv_exeext\n          break;;\n    * ) break;;\n  esac\ndone\nelse\n  { { echo \"$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link\nSee \\`config.log' for more details.\" >&5\necho \"$as_me: error: cannot compute suffix of executables: cannot compile and link\nSee \\`config.log' for more details.\" >&2;}\n   { (exit 1); exit 1; }; }\nfi\n\nrm -f conftest$ac_cv_exeext\necho \"$as_me:$LINENO: result: $ac_cv_exeext\" >&5\necho \"${ECHO_T}$ac_cv_exeext\" >&6\n\nrm -f conftest.$ac_ext\nEXEEXT=$ac_cv_exeext\nac_exeext=$EXEEXT\necho \"$as_me:$LINENO: checking for suffix of object files\" >&5\necho $ECHO_N \"checking for suffix of object files... $ECHO_C\" >&6\nif test \"${ac_cv_objext+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  cat >conftest.$ac_ext <<_ACEOF\n#line $LINENO \"configure\"\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n\nint\nmain ()\n{\n\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.o conftest.obj\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_compile\\\"\") >&5\n  (eval $ac_compile) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; then\n  for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do\n  case $ac_file in\n    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;\n    *) ac_cv_objext=`expr \"$ac_file\" : '.*\\.\\(.*\\)'`\n       break;;\n  esac\ndone\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\n{ { echo \"$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile\nSee \\`config.log' for more details.\" >&5\necho \"$as_me: error: cannot compute suffix of object files: cannot compile\nSee \\`config.log' for more details.\" >&2;}\n   { (exit 1); exit 1; }; }\nfi\n\nrm -f conftest.$ac_cv_objext conftest.$ac_ext\nfi\necho \"$as_me:$LINENO: result: $ac_cv_objext\" >&5\necho \"${ECHO_T}$ac_cv_objext\" >&6\nOBJEXT=$ac_cv_objext\nac_objext=$OBJEXT\necho \"$as_me:$LINENO: checking whether we are using the GNU C compiler\" >&5\necho $ECHO_N \"checking whether we are using the GNU C compiler... $ECHO_C\" >&6\nif test \"${ac_cv_c_compiler_gnu+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  cat >conftest.$ac_ext <<_ACEOF\n#line $LINENO \"configure\"\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n\nint\nmain ()\n{\n#ifndef __GNUC__\n       choke me\n#endif\n\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_compile\\\"\") >&5\n  (eval $ac_compile) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n         { ac_try='test -s conftest.$ac_objext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_compiler_gnu=yes\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nac_compiler_gnu=no\nfi\nrm -f conftest.$ac_objext conftest.$ac_ext\nac_cv_c_compiler_gnu=$ac_compiler_gnu\n\nfi\necho \"$as_me:$LINENO: result: $ac_cv_c_compiler_gnu\" >&5\necho \"${ECHO_T}$ac_cv_c_compiler_gnu\" >&6\nGCC=`test $ac_compiler_gnu = yes && echo yes`\nac_test_CFLAGS=${CFLAGS+set}\nac_save_CFLAGS=$CFLAGS\nCFLAGS=\"-g\"\necho \"$as_me:$LINENO: checking whether $CC accepts -g\" >&5\necho $ECHO_N \"checking whether $CC accepts -g... $ECHO_C\" >&6\nif test \"${ac_cv_prog_cc_g+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  cat >conftest.$ac_ext <<_ACEOF\n#line $LINENO \"configure\"\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n\nint\nmain ()\n{\n\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_compile\\\"\") >&5\n  (eval $ac_compile) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n         { ac_try='test -s conftest.$ac_objext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_cv_prog_cc_g=yes\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nac_cv_prog_cc_g=no\nfi\nrm -f conftest.$ac_objext conftest.$ac_ext\nfi\necho \"$as_me:$LINENO: result: $ac_cv_prog_cc_g\" >&5\necho \"${ECHO_T}$ac_cv_prog_cc_g\" >&6\nif test \"$ac_test_CFLAGS\" = set; then\n  CFLAGS=$ac_save_CFLAGS\nelif test $ac_cv_prog_cc_g = yes; then\n  if test \"$GCC\" = yes; then\n    CFLAGS=\"-g -O2\"\n  else\n    CFLAGS=\"-g\"\n  fi\nelse\n  if test \"$GCC\" = yes; then\n    CFLAGS=\"-O2\"\n  else\n    CFLAGS=\n  fi\nfi\necho \"$as_me:$LINENO: checking for $CC option to accept ANSI C\" >&5\necho $ECHO_N \"checking for $CC option to accept ANSI C... $ECHO_C\" >&6\nif test \"${ac_cv_prog_cc_stdc+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  ac_cv_prog_cc_stdc=no\nac_save_CC=$CC\ncat >conftest.$ac_ext <<_ACEOF\n#line $LINENO \"configure\"\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n#include <stdarg.h>\n#include <stdio.h>\n#include <sys/types.h>\n#include <sys/stat.h>\n/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */\nstruct buf { int x; };\nFILE * (*rcsopen) (struct buf *, struct stat *, int);\nstatic char *e (p, i)\n     char **p;\n     int i;\n{\n  return p[i];\n}\nstatic char *f (char * (*g) (char **, int), char **p, ...)\n{\n  char *s;\n  va_list v;\n  va_start (v,p);\n  s = g (p, va_arg (v,int));\n  va_end (v);\n  return s;\n}\nint test (int i, double x);\nstruct s1 {int (*f) (int a);};\nstruct s2 {int (*f) (double a);};\nint pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);\nint argc;\nchar **argv;\nint\nmain ()\n{\nreturn f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];\n  ;\n  return 0;\n}\n_ACEOF\n# Don't try gcc -ansi; that turns off useful extensions and\n# breaks some systems' header files.\n# AIX\t\t\t-qlanglvl=ansi\n# Ultrix and OSF/1\t-std1\n# HP-UX 10.20 and later\t-Ae\n# HP-UX older versions\t-Aa -D_HPUX_SOURCE\n# SVR4\t\t\t-Xc -D__EXTENSIONS__\nfor ac_arg in \"\" -qlanglvl=ansi -std1 -Ae \"-Aa -D_HPUX_SOURCE\" \"-Xc -D__EXTENSIONS__\"\ndo\n  CC=\"$ac_save_CC $ac_arg\"\n  rm -f conftest.$ac_objext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_compile\\\"\") >&5\n  (eval $ac_compile) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n         { ac_try='test -s conftest.$ac_objext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_cv_prog_cc_stdc=$ac_arg\nbreak\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nfi\nrm -f conftest.$ac_objext\ndone\nrm -f conftest.$ac_ext conftest.$ac_objext\nCC=$ac_save_CC\n\nfi\n\ncase \"x$ac_cv_prog_cc_stdc\" in\n  x|xno)\n    echo \"$as_me:$LINENO: result: none needed\" >&5\necho \"${ECHO_T}none needed\" >&6 ;;\n  *)\n    echo \"$as_me:$LINENO: result: $ac_cv_prog_cc_stdc\" >&5\necho \"${ECHO_T}$ac_cv_prog_cc_stdc\" >&6\n    CC=\"$CC $ac_cv_prog_cc_stdc\" ;;\nesac\n\n# Some people use a C++ compiler to compile C.  Since we use `exit',\n# in C++ we need to declare it.  In case someone uses the same compiler\n# for both compiling C and C++ we need to have the C++ compiler decide\n# the declaration of exit, since it's the most demanding environment.\ncat >conftest.$ac_ext <<_ACEOF\n#ifndef __cplusplus\n  choke me\n#endif\n_ACEOF\nrm -f conftest.$ac_objext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_compile\\\"\") >&5\n  (eval $ac_compile) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n         { ac_try='test -s conftest.$ac_objext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  for ac_declaration in \\\n   '' \\\n   'extern \"C\" void std::exit (int) throw (); using std::exit;' \\\n   'extern \"C\" void std::exit (int); using std::exit;' \\\n   'extern \"C\" void exit (int) throw ();' \\\n   'extern \"C\" void exit (int);' \\\n   'void exit (int);'\ndo\n  cat >conftest.$ac_ext <<_ACEOF\n#line $LINENO \"configure\"\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n$ac_declaration\n#include <stdlib.h>\nint\nmain ()\n{\nexit (42);\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_compile\\\"\") >&5\n  (eval $ac_compile) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n         { ac_try='test -s conftest.$ac_objext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  :\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\ncontinue\nfi\nrm -f conftest.$ac_objext conftest.$ac_ext\n  cat >conftest.$ac_ext <<_ACEOF\n#line $LINENO \"configure\"\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n$ac_declaration\nint\nmain ()\n{\nexit (42);\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_compile\\\"\") >&5\n  (eval $ac_compile) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n         { ac_try='test -s conftest.$ac_objext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  break\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nfi\nrm -f conftest.$ac_objext conftest.$ac_ext\ndone\nrm -f conftest*\nif test -n \"$ac_declaration\"; then\n  echo '#ifdef __cplusplus' >>confdefs.h\n  echo $ac_declaration      >>confdefs.h\n  echo '#endif'             >>confdefs.h\nfi\n\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nfi\nrm -f conftest.$ac_objext conftest.$ac_ext\nac_ext=c\nac_cpp='$CPP $CPPFLAGS'\nac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'\nac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'\nac_compiler_gnu=$ac_cv_c_compiler_gnu\n\nac_ext=cc\nac_cpp='$CXXCPP $CPPFLAGS'\nac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'\nac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'\nac_compiler_gnu=$ac_cv_cxx_compiler_gnu\nif test -n \"$ac_tool_prefix\"; then\n  for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC\n  do\n    # Extract the first word of \"$ac_tool_prefix$ac_prog\", so it can be a program name with args.\nset dummy $ac_tool_prefix$ac_prog; ac_word=$2\necho \"$as_me:$LINENO: checking for $ac_word\" >&5\necho $ECHO_N \"checking for $ac_word... $ECHO_C\" >&6\nif test \"${ac_cv_prog_CXX+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  if test -n \"$CXX\"; then\n  ac_cv_prog_CXX=\"$CXX\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n  for ac_exec_ext in '' $ac_executable_extensions; do\n  if $as_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_CXX=\"$ac_tool_prefix$ac_prog\"\n    echo \"$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\ndone\n\nfi\nfi\nCXX=$ac_cv_prog_CXX\nif test -n \"$CXX\"; then\n  echo \"$as_me:$LINENO: result: $CXX\" >&5\necho \"${ECHO_T}$CXX\" >&6\nelse\n  echo \"$as_me:$LINENO: result: no\" >&5\necho \"${ECHO_T}no\" >&6\nfi\n\n    test -n \"$CXX\" && break\n  done\nfi\nif test -z \"$CXX\"; then\n  ac_ct_CXX=$CXX\n  for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC\ndo\n  # Extract the first word of \"$ac_prog\", so it can be a program name with args.\nset dummy $ac_prog; ac_word=$2\necho \"$as_me:$LINENO: checking for $ac_word\" >&5\necho $ECHO_N \"checking for $ac_word... $ECHO_C\" >&6\nif test \"${ac_cv_prog_ac_ct_CXX+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  if test -n \"$ac_ct_CXX\"; then\n  ac_cv_prog_ac_ct_CXX=\"$ac_ct_CXX\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n  for ac_exec_ext in '' $ac_executable_extensions; do\n  if $as_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_ac_ct_CXX=\"$ac_prog\"\n    echo \"$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\ndone\n\nfi\nfi\nac_ct_CXX=$ac_cv_prog_ac_ct_CXX\nif test -n \"$ac_ct_CXX\"; then\n  echo \"$as_me:$LINENO: result: $ac_ct_CXX\" >&5\necho \"${ECHO_T}$ac_ct_CXX\" >&6\nelse\n  echo \"$as_me:$LINENO: result: no\" >&5\necho \"${ECHO_T}no\" >&6\nfi\n\n  test -n \"$ac_ct_CXX\" && break\ndone\ntest -n \"$ac_ct_CXX\" || ac_ct_CXX=\"g++\"\n\n  CXX=$ac_ct_CXX\nfi\n\n\n# Provide some information about the compiler.\necho \"$as_me:$LINENO:\" \\\n     \"checking for C++ compiler version\" >&5\nac_compiler=`set X $ac_compile; echo $2`\n{ (eval echo \"$as_me:$LINENO: \\\"$ac_compiler --version </dev/null >&5\\\"\") >&5\n  (eval $ac_compiler --version </dev/null >&5) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }\n{ (eval echo \"$as_me:$LINENO: \\\"$ac_compiler -v </dev/null >&5\\\"\") >&5\n  (eval $ac_compiler -v </dev/null >&5) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }\n{ (eval echo \"$as_me:$LINENO: \\\"$ac_compiler -V </dev/null >&5\\\"\") >&5\n  (eval $ac_compiler -V </dev/null >&5) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }\n\necho \"$as_me:$LINENO: checking whether we are using the GNU C++ compiler\" >&5\necho $ECHO_N \"checking whether we are using the GNU C++ compiler... $ECHO_C\" >&6\nif test \"${ac_cv_cxx_compiler_gnu+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  cat >conftest.$ac_ext <<_ACEOF\n#line $LINENO \"configure\"\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n\nint\nmain ()\n{\n#ifndef __GNUC__\n       choke me\n#endif\n\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_compile\\\"\") >&5\n  (eval $ac_compile) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n         { ac_try='test -s conftest.$ac_objext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_compiler_gnu=yes\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nac_compiler_gnu=no\nfi\nrm -f conftest.$ac_objext conftest.$ac_ext\nac_cv_cxx_compiler_gnu=$ac_compiler_gnu\n\nfi\necho \"$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu\" >&5\necho \"${ECHO_T}$ac_cv_cxx_compiler_gnu\" >&6\nGXX=`test $ac_compiler_gnu = yes && echo yes`\nac_test_CXXFLAGS=${CXXFLAGS+set}\nac_save_CXXFLAGS=$CXXFLAGS\nCXXFLAGS=\"-g\"\necho \"$as_me:$LINENO: checking whether $CXX accepts -g\" >&5\necho $ECHO_N \"checking whether $CXX accepts -g... $ECHO_C\" >&6\nif test \"${ac_cv_prog_cxx_g+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  cat >conftest.$ac_ext <<_ACEOF\n#line $LINENO \"configure\"\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n\nint\nmain ()\n{\n\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_compile\\\"\") >&5\n  (eval $ac_compile) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n         { ac_try='test -s conftest.$ac_objext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_cv_prog_cxx_g=yes\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nac_cv_prog_cxx_g=no\nfi\nrm -f conftest.$ac_objext conftest.$ac_ext\nfi\necho \"$as_me:$LINENO: result: $ac_cv_prog_cxx_g\" >&5\necho \"${ECHO_T}$ac_cv_prog_cxx_g\" >&6\nif test \"$ac_test_CXXFLAGS\" = set; then\n  CXXFLAGS=$ac_save_CXXFLAGS\nelif test $ac_cv_prog_cxx_g = yes; then\n  if test \"$GXX\" = yes; then\n    CXXFLAGS=\"-g -O2\"\n  else\n    CXXFLAGS=\"-g\"\n  fi\nelse\n  if test \"$GXX\" = yes; then\n    CXXFLAGS=\"-O2\"\n  else\n    CXXFLAGS=\n  fi\nfi\nfor ac_declaration in \\\n   '' \\\n   'extern \"C\" void std::exit (int) throw (); using std::exit;' \\\n   'extern \"C\" void std::exit (int); using std::exit;' \\\n   'extern \"C\" void exit (int) throw ();' \\\n   'extern \"C\" void exit (int);' \\\n   'void exit (int);'\ndo\n  cat >conftest.$ac_ext <<_ACEOF\n#line $LINENO \"configure\"\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n$ac_declaration\n#include <stdlib.h>\nint\nmain ()\n{\nexit (42);\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_compile\\\"\") >&5\n  (eval $ac_compile) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n         { ac_try='test -s conftest.$ac_objext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  :\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\ncontinue\nfi\nrm -f conftest.$ac_objext conftest.$ac_ext\n  cat >conftest.$ac_ext <<_ACEOF\n#line $LINENO \"configure\"\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n$ac_declaration\nint\nmain ()\n{\nexit (42);\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_compile\\\"\") >&5\n  (eval $ac_compile) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n         { ac_try='test -s conftest.$ac_objext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  break\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nfi\nrm -f conftest.$ac_objext conftest.$ac_ext\ndone\nrm -f conftest*\nif test -n \"$ac_declaration\"; then\n  echo '#ifdef __cplusplus' >>confdefs.h\n  echo $ac_declaration      >>confdefs.h\n  echo '#endif'             >>confdefs.h\nfi\n\nac_ext=c\nac_cpp='$CPP $CPPFLAGS'\nac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'\nac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'\nac_compiler_gnu=$ac_cv_c_compiler_gnu\n\necho \"$as_me:$LINENO: checking whether ln -s works\" >&5\necho $ECHO_N \"checking whether ln -s works... $ECHO_C\" >&6\nLN_S=$as_ln_s\nif test \"$LN_S\" = \"ln -s\"; then\n  echo \"$as_me:$LINENO: result: yes\" >&5\necho \"${ECHO_T}yes\" >&6\nelse\n  echo \"$as_me:$LINENO: result: no, using $LN_S\" >&5\necho \"${ECHO_T}no, using $LN_S\" >&6\nfi\n\nif test -n \"$ac_tool_prefix\"; then\n  # Extract the first word of \"${ac_tool_prefix}ranlib\", so it can be a program name with args.\nset dummy ${ac_tool_prefix}ranlib; ac_word=$2\necho \"$as_me:$LINENO: checking for $ac_word\" >&5\necho $ECHO_N \"checking for $ac_word... $ECHO_C\" >&6\nif test \"${ac_cv_prog_RANLIB+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  if test -n \"$RANLIB\"; then\n  ac_cv_prog_RANLIB=\"$RANLIB\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n  for ac_exec_ext in '' $ac_executable_extensions; do\n  if $as_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_RANLIB=\"${ac_tool_prefix}ranlib\"\n    echo \"$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\ndone\n\nfi\nfi\nRANLIB=$ac_cv_prog_RANLIB\nif test -n \"$RANLIB\"; then\n  echo \"$as_me:$LINENO: result: $RANLIB\" >&5\necho \"${ECHO_T}$RANLIB\" >&6\nelse\n  echo \"$as_me:$LINENO: result: no\" >&5\necho \"${ECHO_T}no\" >&6\nfi\n\nfi\nif test -z \"$ac_cv_prog_RANLIB\"; then\n  ac_ct_RANLIB=$RANLIB\n  # Extract the first word of \"ranlib\", so it can be a program name with args.\nset dummy ranlib; ac_word=$2\necho \"$as_me:$LINENO: checking for $ac_word\" >&5\necho $ECHO_N \"checking for $ac_word... $ECHO_C\" >&6\nif test \"${ac_cv_prog_ac_ct_RANLIB+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  if test -n \"$ac_ct_RANLIB\"; then\n  ac_cv_prog_ac_ct_RANLIB=\"$ac_ct_RANLIB\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n  for ac_exec_ext in '' $ac_executable_extensions; do\n  if $as_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_ac_ct_RANLIB=\"ranlib\"\n    echo \"$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\ndone\n\n  test -z \"$ac_cv_prog_ac_ct_RANLIB\" && ac_cv_prog_ac_ct_RANLIB=\":\"\nfi\nfi\nac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB\nif test -n \"$ac_ct_RANLIB\"; then\n  echo \"$as_me:$LINENO: result: $ac_ct_RANLIB\" >&5\necho \"${ECHO_T}$ac_ct_RANLIB\" >&6\nelse\n  echo \"$as_me:$LINENO: result: no\" >&5\necho \"${ECHO_T}no\" >&6\nfi\n\n  RANLIB=$ac_ct_RANLIB\nelse\n  RANLIB=\"$ac_cv_prog_RANLIB\"\nfi\n\nac_aux_dir=\nfor ac_dir in $srcdir $srcdir/.. $srcdir/../..; do\n  if test -f $ac_dir/install-sh; then\n    ac_aux_dir=$ac_dir\n    ac_install_sh=\"$ac_aux_dir/install-sh -c\"\n    break\n  elif test -f $ac_dir/install.sh; then\n    ac_aux_dir=$ac_dir\n    ac_install_sh=\"$ac_aux_dir/install.sh -c\"\n    break\n  elif test -f $ac_dir/shtool; then\n    ac_aux_dir=$ac_dir\n    ac_install_sh=\"$ac_aux_dir/shtool install -c\"\n    break\n  fi\ndone\nif test -z \"$ac_aux_dir\"; then\n  { { echo \"$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../..\" >&5\necho \"$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../..\" >&2;}\n   { (exit 1); exit 1; }; }\nfi\nac_config_guess=\"$SHELL $ac_aux_dir/config.guess\"\nac_config_sub=\"$SHELL $ac_aux_dir/config.sub\"\nac_configure=\"$SHELL $ac_aux_dir/configure\" # This should be Cygnus configure.\n\n# Find a good install program.  We prefer a C program (faster),\n# so one script is as good as another.  But avoid the broken or\n# incompatible versions:\n# SysV /etc/install, /usr/sbin/install\n# SunOS /usr/etc/install\n# IRIX /sbin/install\n# AIX /bin/install\n# AmigaOS /C/install, which installs bootblocks on floppy discs\n# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag\n# AFS /usr/afsws/bin/install, which mishandles nonexistent args\n# SVR4 /usr/ucb/install, which tries to use the nonexistent group \"staff\"\n# ./install, which can be erroneously created by make from ./install.sh.\necho \"$as_me:$LINENO: checking for a BSD-compatible install\" >&5\necho $ECHO_N \"checking for a BSD-compatible install... $ECHO_C\" >&6\nif test -z \"$INSTALL\"; then\nif test \"${ac_cv_path_install+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n  # Account for people who put trailing slashes in PATH elements.\ncase $as_dir/ in\n  ./ | .// | /cC/* | \\\n  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \\\n  /usr/ucb/* ) ;;\n  *)\n    # OSF1 and SCO ODT 3.0 have their own names for install.\n    # Don't use installbsd from OSF since it installs stuff as root\n    # by default.\n    for ac_prog in ginstall scoinst install; do\n      for ac_exec_ext in '' $ac_executable_extensions; do\n        if $as_executable_p \"$as_dir/$ac_prog$ac_exec_ext\"; then\n          if test $ac_prog = install &&\n            grep dspmsg \"$as_dir/$ac_prog$ac_exec_ext\" >/dev/null 2>&1; then\n            # AIX install.  It has an incompatible calling convention.\n            :\n          elif test $ac_prog = install &&\n            grep pwplus \"$as_dir/$ac_prog$ac_exec_ext\" >/dev/null 2>&1; then\n            # program-specific install script used by HP pwplus--don't use.\n            :\n          else\n            ac_cv_path_install=\"$as_dir/$ac_prog$ac_exec_ext -c\"\n            break 3\n          fi\n        fi\n      done\n    done\n    ;;\nesac\ndone\n\n\nfi\n  if test \"${ac_cv_path_install+set}\" = set; then\n    INSTALL=$ac_cv_path_install\n  else\n    # As a last resort, use the slow shell script.  We don't cache a\n    # path for INSTALL within a source directory, because that will\n    # break other packages using the cache if that directory is\n    # removed, or if the path is relative.\n    INSTALL=$ac_install_sh\n  fi\nfi\necho \"$as_me:$LINENO: result: $INSTALL\" >&5\necho \"${ECHO_T}$INSTALL\" >&6\n\n# Use test -z because SunOS4 sh mishandles braces in ${var-val}.\n# It thinks the first close brace ends the variable substitution.\ntest -z \"$INSTALL_PROGRAM\" && INSTALL_PROGRAM='${INSTALL}'\n\ntest -z \"$INSTALL_SCRIPT\" && INSTALL_SCRIPT='${INSTALL}'\n\ntest -z \"$INSTALL_DATA\" && INSTALL_DATA='${INSTALL} -m 644'\n\n# Extract the first word of \"ar\", so it can be a program name with args.\nset dummy ar; ac_word=$2\necho \"$as_me:$LINENO: checking for $ac_word\" >&5\necho $ECHO_N \"checking for $ac_word... $ECHO_C\" >&6\nif test \"${ac_cv_path_AR+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  case $AR in\n  [\\\\/]* | ?:[\\\\/]*)\n  ac_cv_path_AR=\"$AR\" # Let the user override the test with a path.\n  ;;\n  *)\n  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n  for ac_exec_ext in '' $ac_executable_extensions; do\n  if $as_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_path_AR=\"$as_dir/$ac_word$ac_exec_ext\"\n    echo \"$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\ndone\n\n  test -z \"$ac_cv_path_AR\" && ac_cv_path_AR=\"no\"\n  ;;\nesac\nfi\nAR=$ac_cv_path_AR\n\nif test -n \"$AR\"; then\n  echo \"$as_me:$LINENO: result: $AR\" >&5\necho \"${ECHO_T}$AR\" >&6\nelse\n  echo \"$as_me:$LINENO: result: no\" >&5\necho \"${ECHO_T}no\" >&6\nfi\n\nif [ $AR = \"no\" ] ; then\n    { { echo \"$as_me:$LINENO: error: \\\"Could not find ar - needed to create a library\\\"\" >&5\necho \"$as_me: error: \\\"Could not find ar - needed to create a library\\\"\" >&2;}\n   { (exit 1); exit 1; }; };\nfi\n\n# This must be one of the first tests we do or it will fail...\n\necho \"$as_me:$LINENO: checking whether byte ordering is bigendian\" >&5\necho $ECHO_N \"checking whether byte ordering is bigendian... $ECHO_C\" >&6\nif test \"${ac_cv_c_bigendian+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  # See if sys/param.h defines the BYTE_ORDER macro.\ncat >conftest.$ac_ext <<_ACEOF\n#line $LINENO \"configure\"\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n#include <sys/types.h>\n#include <sys/param.h>\n\nint\nmain ()\n{\n#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN\n bogus endian macros\n#endif\n\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_compile\\\"\") >&5\n  (eval $ac_compile) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n         { ac_try='test -s conftest.$ac_objext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  # It does; now see whether it defined to BIG_ENDIAN or not.\ncat >conftest.$ac_ext <<_ACEOF\n#line $LINENO \"configure\"\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n#include <sys/types.h>\n#include <sys/param.h>\n\nint\nmain ()\n{\n#if BYTE_ORDER != BIG_ENDIAN\n not big endian\n#endif\n\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_compile\\\"\") >&5\n  (eval $ac_compile) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n         { ac_try='test -s conftest.$ac_objext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_cv_c_bigendian=yes\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nac_cv_c_bigendian=no\nfi\nrm -f conftest.$ac_objext conftest.$ac_ext\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\n# It does not; compile a test program.\nif test \"$cross_compiling\" = yes; then\n  # try to guess the endianness by grepping values into an object file\n  ac_cv_c_bigendian=unknown\n  cat >conftest.$ac_ext <<_ACEOF\n#line $LINENO \"configure\"\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\nshort ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };\nshort ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };\nvoid _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }\nshort ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };\nshort ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };\nvoid _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }\nint\nmain ()\n{\n _ascii (); _ebcdic ();\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_compile\\\"\") >&5\n  (eval $ac_compile) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n         { ac_try='test -s conftest.$ac_objext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then\n  ac_cv_c_bigendian=yes\nfi\nif grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then\n  if test \"$ac_cv_c_bigendian\" = unknown; then\n    ac_cv_c_bigendian=no\n  else\n    # finding both strings is unlikely to happen, but who knows?\n    ac_cv_c_bigendian=unknown\n  fi\nfi\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nfi\nrm -f conftest.$ac_objext conftest.$ac_ext\nelse\n  cat >conftest.$ac_ext <<_ACEOF\n#line $LINENO \"configure\"\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\nint\nmain ()\n{\n  /* Are we little or big endian?  From Harbison&Steele.  */\n  union\n  {\n    long l;\n    char c[sizeof (long)];\n  } u;\n  u.l = 1;\n  exit (u.c[sizeof (long) - 1] == 1);\n}\n_ACEOF\nrm -f conftest$ac_exeext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_link\\\"\") >&5\n  (eval $ac_link) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_cv_c_bigendian=no\nelse\n  echo \"$as_me: program exited with status $ac_status\" >&5\necho \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\n( exit $ac_status )\nac_cv_c_bigendian=yes\nfi\nrm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext\nfi\nfi\nrm -f conftest.$ac_objext conftest.$ac_ext\nfi\necho \"$as_me:$LINENO: result: $ac_cv_c_bigendian\" >&5\necho \"${ECHO_T}$ac_cv_c_bigendian\" >&6\ncase $ac_cv_c_bigendian in\n  yes)\n\ncat >>confdefs.h <<\\_ACEOF\n#define WORDS_BIGENDIAN 1\n_ACEOF\n ;;\n  no)\n     ;;\n  *)\n    { { echo \"$as_me:$LINENO: error: unknown endianness\npresetting ac_cv_c_bigendian=no (or yes) will help\" >&5\necho \"$as_me: error: unknown endianness\npresetting ac_cv_c_bigendian=no (or yes) will help\" >&2;}\n   { (exit 1); exit 1; }; } ;;\nesac\n\n\n# Transfer these variables to the Makefile\n\n\n\n\n\n\n\n\n\n##################### CHECK FOR INSTALLED PACKAGES ############################\n\n# checks for various host APIs and arguments to configure that\n# turn them on or off\n\necho \"$as_me:$LINENO: checking for snd_pcm_open in -lasound\" >&5\necho $ECHO_N \"checking for snd_pcm_open in -lasound... $ECHO_C\" >&6\nif test \"${ac_cv_lib_asound_snd_pcm_open+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  ac_check_lib_save_LIBS=$LIBS\nLIBS=\"-lasound  $LIBS\"\ncat >conftest.$ac_ext <<_ACEOF\n#line $LINENO \"configure\"\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n\n/* Override any gcc2 internal prototype to avoid an error.  */\n#ifdef __cplusplus\nextern \"C\"\n#endif\n/* We use char because int might match the return type of a gcc2\n   builtin and then its argument prototype would still apply.  */\nchar snd_pcm_open ();\nint\nmain ()\n{\nsnd_pcm_open ();\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext conftest$ac_exeext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_link\\\"\") >&5\n  (eval $ac_link) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n         { ac_try='test -s conftest$ac_exeext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_cv_lib_asound_snd_pcm_open=yes\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nac_cv_lib_asound_snd_pcm_open=no\nfi\nrm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext\nLIBS=$ac_check_lib_save_LIBS\nfi\necho \"$as_me:$LINENO: result: $ac_cv_lib_asound_snd_pcm_open\" >&5\necho \"${ECHO_T}$ac_cv_lib_asound_snd_pcm_open\" >&6\nif test $ac_cv_lib_asound_snd_pcm_open = yes; then\n  have_alsa=yes\nelse\n  have_alsa=no\nfi\n\n\n# Determine the host description for the subsequent test.\n# PKG_CHECK_MODULES seems to check and set the host variable also, but\n# that then requires pkg-config availability which is not standard on\n# MinGW systems and can be a pain to install.\n# Make sure we can run config.sub.\n$ac_config_sub sun4 >/dev/null 2>&1 ||\n  { { echo \"$as_me:$LINENO: error: cannot run $ac_config_sub\" >&5\necho \"$as_me: error: cannot run $ac_config_sub\" >&2;}\n   { (exit 1); exit 1; }; }\n\necho \"$as_me:$LINENO: checking build system type\" >&5\necho $ECHO_N \"checking build system type... $ECHO_C\" >&6\nif test \"${ac_cv_build+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  ac_cv_build_alias=$build_alias\ntest -z \"$ac_cv_build_alias\" &&\n  ac_cv_build_alias=`$ac_config_guess`\ntest -z \"$ac_cv_build_alias\" &&\n  { { echo \"$as_me:$LINENO: error: cannot guess build type; you must specify one\" >&5\necho \"$as_me: error: cannot guess build type; you must specify one\" >&2;}\n   { (exit 1); exit 1; }; }\nac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||\n  { { echo \"$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed\" >&5\necho \"$as_me: error: $ac_config_sub $ac_cv_build_alias failed\" >&2;}\n   { (exit 1); exit 1; }; }\n\nfi\necho \"$as_me:$LINENO: result: $ac_cv_build\" >&5\necho \"${ECHO_T}$ac_cv_build\" >&6\nbuild=$ac_cv_build\nbuild_cpu=`echo $ac_cv_build | sed 's/^\\([^-]*\\)-\\([^-]*\\)-\\(.*\\)$/\\1/'`\nbuild_vendor=`echo $ac_cv_build | sed 's/^\\([^-]*\\)-\\([^-]*\\)-\\(.*\\)$/\\2/'`\nbuild_os=`echo $ac_cv_build | sed 's/^\\([^-]*\\)-\\([^-]*\\)-\\(.*\\)$/\\3/'`\n\n\necho \"$as_me:$LINENO: checking host system type\" >&5\necho $ECHO_N \"checking host system type... $ECHO_C\" >&6\nif test \"${ac_cv_host+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  ac_cv_host_alias=$host_alias\ntest -z \"$ac_cv_host_alias\" &&\n  ac_cv_host_alias=$ac_cv_build_alias\nac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||\n  { { echo \"$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed\" >&5\necho \"$as_me: error: $ac_config_sub $ac_cv_host_alias failed\" >&2;}\n   { (exit 1); exit 1; }; }\n\nfi\necho \"$as_me:$LINENO: result: $ac_cv_host\" >&5\necho \"${ECHO_T}$ac_cv_host\" >&6\nhost=$ac_cv_host\nhost_cpu=`echo $ac_cv_host | sed 's/^\\([^-]*\\)-\\([^-]*\\)-\\(.*\\)$/\\1/'`\nhost_vendor=`echo $ac_cv_host | sed 's/^\\([^-]*\\)-\\([^-]*\\)-\\(.*\\)$/\\2/'`\nhost_os=`echo $ac_cv_host | sed 's/^\\([^-]*\\)-\\([^-]*\\)-\\(.*\\)$/\\3/'`\n\n\n\n\n  succeeded=no\n\n  if test -z \"$PKG_CONFIG\"; then\n    # Extract the first word of \"pkg-config\", so it can be a program name with args.\nset dummy pkg-config; ac_word=$2\necho \"$as_me:$LINENO: checking for $ac_word\" >&5\necho $ECHO_N \"checking for $ac_word... $ECHO_C\" >&6\nif test \"${ac_cv_path_PKG_CONFIG+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  case $PKG_CONFIG in\n  [\\\\/]* | ?:[\\\\/]*)\n  ac_cv_path_PKG_CONFIG=\"$PKG_CONFIG\" # Let the user override the test with a path.\n  ;;\n  *)\n  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n  for ac_exec_ext in '' $ac_executable_extensions; do\n  if $as_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_path_PKG_CONFIG=\"$as_dir/$ac_word$ac_exec_ext\"\n    echo \"$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\ndone\n\n  test -z \"$ac_cv_path_PKG_CONFIG\" && ac_cv_path_PKG_CONFIG=\"no\"\n  ;;\nesac\nfi\nPKG_CONFIG=$ac_cv_path_PKG_CONFIG\n\nif test -n \"$PKG_CONFIG\"; then\n  echo \"$as_me:$LINENO: result: $PKG_CONFIG\" >&5\necho \"${ECHO_T}$PKG_CONFIG\" >&6\nelse\n  echo \"$as_me:$LINENO: result: no\" >&5\necho \"${ECHO_T}no\" >&6\nfi\n\n  fi\n\n  if test \"$PKG_CONFIG\" = \"no\" ; then\n     echo \"*** The pkg-config script could not be found. Make sure it is\"\n     echo \"*** in your path, or set the PKG_CONFIG environment variable\"\n     echo \"*** to the full path to pkg-config.\"\n     echo \"*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config.\"\n  else\n     PKG_CONFIG_MIN_VERSION=0.9.0\n     if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then\n        echo \"$as_me:$LINENO: checking for jack\" >&5\necho $ECHO_N \"checking for jack... $ECHO_C\" >&6\n\n        if $PKG_CONFIG --exists \"jack\" ; then\n            echo \"$as_me:$LINENO: result: yes\" >&5\necho \"${ECHO_T}yes\" >&6\n            succeeded=yes\n\n            echo \"$as_me:$LINENO: checking JACK_CFLAGS\" >&5\necho $ECHO_N \"checking JACK_CFLAGS... $ECHO_C\" >&6\n            JACK_CFLAGS=`$PKG_CONFIG --cflags \"jack\"`\n            echo \"$as_me:$LINENO: result: $JACK_CFLAGS\" >&5\necho \"${ECHO_T}$JACK_CFLAGS\" >&6\n\n            echo \"$as_me:$LINENO: checking JACK_LIBS\" >&5\necho $ECHO_N \"checking JACK_LIBS... $ECHO_C\" >&6\n            JACK_LIBS=`$PKG_CONFIG --libs \"jack\"`\n            echo \"$as_me:$LINENO: result: $JACK_LIBS\" >&5\necho \"${ECHO_T}$JACK_LIBS\" >&6\n        else\n            JACK_CFLAGS=\"\"\n            JACK_LIBS=\"\"\n            ## If we have a custom action on failure, don't print errors, but\n            ## do set a variable so people can do so.\n            JACK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors \"jack\"`\n\n        fi\n\n\n\n     else\n        echo \"*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer.\"\n        echo \"*** See http://www.freedesktop.org/software/pkgconfig\"\n     fi\n  fi\n\n  if test $succeeded = yes; then\n     have_jack=yes\n  else\n     have_jack=no\n  fi\n\n\n\n# Check whether --with-alsa or --without-alsa was given.\nif test \"${with_alsa+set}\" = set; then\n  withval=\"$with_alsa\"\n  with_alsa=$withval\nelse\n  with_alsa=\"yes\"\nfi;\n\n\n# Check whether --with-jack or --without-jack was given.\nif test \"${with_jack+set}\" = set; then\n  withval=\"$with_jack\"\n  with_jack=$withval\nelse\n  with_jack=\"yes\"\nfi;\n\n\n# Check whether --with-oss or --without-oss was given.\nif test \"${with_oss+set}\" = set; then\n  withval=\"$with_oss\"\n  with_oss=$withval\nelse\n  with_oss=\"yes\"\nfi;\n\n\n# Check whether --with-host_os or --without-host_os was given.\nif test \"${with_host_os+set}\" = set; then\n  withval=\"$with_host_os\"\n  host_os=$withval\nfi;\n\n\n# Check whether --with-winapi or --without-winapi was given.\nif test \"${with_winapi+set}\" = set; then\n  withval=\"$with_winapi\"\n  with_winapi=$withval\nelse\n  with_winapi=\"wmme\"\nfi;\n\n# Mac API added for ASIO, can have other api's listed\n\n# Check whether --with-macapi or --without-macapi was given.\nif test \"${with_macapi+set}\" = set; then\n  withval=\"$with_macapi\"\n  with_macapi=$withval\nelse\n  with_macapi=\"asio\"\nfi;\n\n\n# Check whether --with-asiodir or --without-asiodir was given.\nif test \"${with_asiodir+set}\" = set; then\n  withval=\"$with_asiodir\"\n  with_asiodir=$withval\nelse\n  with_asiodir=\"/usr/local/asiosdk2\"\nfi;\n\n\n# Check whether --with-dxdir or --without-dxdir was given.\nif test \"${with_dxdir+set}\" = set; then\n  withval=\"$with_dxdir\"\n  with_dxdir=$withval\nelse\n  with_dxdir=\"/usr/local/dx7sdk\"\nfi;\n\n\n##################### HOST-SPECIFIC LIBRARY SETTINGS ##########################\n\ncase \"${host_os}\" in\n  darwin* )\n\t# Mac OS X configuration\n\n\tLIBS=\"-framework AudioUnit -framework AudioToolbox -framework CoreAudio\";\n\tPADLL=\"libportaudio.dylib\";\n\tPACPP_DLL=\"libportaudiocpp.dylib\";\n\tSHARED_FLAGS=\"-framework AudioUnit -framework AudioToolbox\";\n\tSHARED_FLAGS=\"$SHARED_FLAGS -framework CoreAudio -dynamiclib\";\n        if [ $with_macapi = \"asio\" ] ; then\n            if [ $with_asiodir ] ; then\n              ASIODIR=\"$with_asiodir\";\n            else\n              ASIODIR=\"/usr/local/asiosdk2\";\n            fi\n            echo \"ASIODIR: $ASIODIR\";\n        fi\n\t;;\n\n  mingw* )\n        # MingW configuration\n\n        echo \"WINAPI: $with_winapi\"\n        if [ $with_winapi = \"directx\" ] ; then\n            if [ $with_dxdir ] ; then\n              DXDIR=\"$with_dxdir\";\n            else\n              DXDIR=\"/usr/local/dx7sdk\";\n            fi\n            echo \"DXDIR: $DXDIR\"\n\t    LIBS=\"-L$PALIBDIR -lportaudio\"\n            LIBS=\"$LIBS -lwinmm -lm -ldsound -lole32\";\n            PADLL=\"portaudio.dll\";\n            PACPP_DLL=\"portaudiocpp.dll\";\n            SHARED_FLAGS=\"-shared -mthreads\";\n            DLL_LIBS=\"-lwinmm -lm -L./dx7sdk/lib -ldsound -lole32\";\n            CFLAGS=\"$CFLAGS -DPA_NO_WMME -DPA_NO_ASIO\";\n\t    CXXFLAGS=\"$CFLAGS\"\n        elif [ $with_winapi = \"asio\" ] ; then\n            if [ $with_asiodir ] ; then\n              ASIODIR=\"$with_asiodir\";\n            else\n              ASIODIR=\"/usr/local/asiosdk2\";\n            fi\n            echo \"ASIODIR: $ASIODIR\"\n\n\t    LIBS=\"-L$PALIBDIR -lportaudio\"\n            LIBS=\"$LIBS -lwinmm -lm -lstdc++ -lole32 -luuid\";\n            PADLL=\"portaudio.dll\";\n            PACPP_DLL=\"portaudiocpp.dll\";\n            SHARED_FLAGS=\"-shared -mthreads\";\n            DLL_LIBS=\"-lwinmm -lm -lstdc++ -lole32 -luuid\";\n            CFLAGS=\"$CFLAGS -ffast-math -fomit-frame-pointer -DPA_NO_WMME -DPA_NO_DS -DWINDOWS\";\n            CXXFLAGS=\"$CFLAGS\";\n        else   # WMME default\n\t    LIBS=\"-L$PALIBDIR -lportaudio\"\n            LIBS=\"$LIBS -lwinmm -lm -lstdc++ -lole32 -luuid\";\n            PADLL=\"portaudio.dll\";\n            PACPP_DLL=\"portaudiocpp.dll\";\n            SHARED_FLAGS=\"-shared -mthreads\";\n            DLL_LIBS=\"-lwinmm\";\n            CFLAGS=\"$CFLAGS -DPA_NO_DS -DPA_NO_ASIO\";\n            CXXFLAGS=\"$CFLAGS\";\n        fi\n        ;;\n\n  cygwin* )\n\t# Cygwin configuration\n\n\tLIBS=\"-L$PALIBDIR -lportaudio\"\n\tLIBS=\"$LIBS -lwinmm -lm\";\n\tPADLL=\"portaudio.dll\";\n\tPACPP_DLL=\"portaudiocpp.dll\";\n\tSHARED_FLAGS=\"-shared -mthreads\";\n\tDLL_LIBS=\"-lwinmm\";\n\t;;\n\n  *)\n\t# Unix OSS configuration\n\n\necho \"$as_me:$LINENO: checking for pthread_create in -lpthread\" >&5\necho $ECHO_N \"checking for pthread_create in -lpthread... $ECHO_C\" >&6\nif test \"${ac_cv_lib_pthread_pthread_create+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  ac_check_lib_save_LIBS=$LIBS\nLIBS=\"-lpthread  $LIBS\"\ncat >conftest.$ac_ext <<_ACEOF\n#line $LINENO \"configure\"\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n\n/* Override any gcc2 internal prototype to avoid an error.  */\n#ifdef __cplusplus\nextern \"C\"\n#endif\n/* We use char because int might match the return type of a gcc2\n   builtin and then its argument prototype would still apply.  */\nchar pthread_create ();\nint\nmain ()\n{\npthread_create ();\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext conftest$ac_exeext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_link\\\"\") >&5\n  (eval $ac_link) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n         { ac_try='test -s conftest$ac_exeext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_cv_lib_pthread_pthread_create=yes\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nac_cv_lib_pthread_pthread_create=no\nfi\nrm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext\nLIBS=$ac_check_lib_save_LIBS\nfi\necho \"$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_create\" >&5\necho \"${ECHO_T}$ac_cv_lib_pthread_pthread_create\" >&6\nif test $ac_cv_lib_pthread_pthread_create = yes; then\n  cat >>confdefs.h <<_ACEOF\n#define HAVE_LIBPTHREAD 1\n_ACEOF\n\n  LIBS=\"-lpthread $LIBS\"\n\nelse\n  { { echo \"$as_me:$LINENO: error: libpthread not found!\" >&5\necho \"$as_me: error: libpthread not found!\" >&2;}\n   { (exit 1); exit 1; }; }\nfi\n\n\n\tLIBS=\"$LIBS -L$PALIBDIR -lportaudio\"\n\n\tif [ $have_jack = \"yes\" ] && [ $with_jack != \"no\" ] ; then\n   \t      \tLIBS=\"$LIBS $JACK_LIBS\"\n\t\tCFLAGS=\"$CFLAGS $JACK_CFLAGS\"\n                cat >>confdefs.h <<\\_ACEOF\n#define PA_USE_JACK 1\n_ACEOF\n\n\tfi\n\n\tif [ $have_alsa = \"yes\" ] && [ $with_alsa != \"no\" ] ; then\n                LIBS=\"$LIBS -lasound\"\n                cat >>confdefs.h <<\\_ACEOF\n#define PA_USE_ALSA 1\n_ACEOF\n\n\tfi\n\n\tif [ $with_oss != \"no\" ] ; then\n\t\tcat >>confdefs.h <<\\_ACEOF\n#define PA_USE_OSS 1\n_ACEOF\n\n\tfi\n\tLIBS=\"$LIBS -lm -lpthread\";\n\tPADLL=\"libportaudio.so\";\n\tPACPP_DLL=\"libportaudiocpp.so\";\n\tSHARED_FLAGS=\"-shared\";\nesac\n\n          ac_config_files=\"$ac_config_files Makefile\"\n\ncat >confcache <<\\_ACEOF\n# This file is a shell script that caches the results of configure\n# tests run on this system so they can be shared between configure\n# scripts and configure runs, see configure's option --config-cache.\n# It is not useful on other systems.  If it contains results you don't\n# want to keep, you may remove or edit it.\n#\n# config.status only pays attention to the cache file if you give it\n# the --recheck option to rerun configure.\n#\n# `ac_cv_env_foo' variables (set or unset) will be overridden when\n# loading this file, other *unset* `ac_cv_foo' will be assigned the\n# following values.\n\n_ACEOF\n\n# The following way of writing the cache mishandles newlines in values,\n# but we know of no workaround that is simple, portable, and efficient.\n# So, don't put newlines in cache variables' values.\n# Ultrix sh set writes to stderr and can't be redirected directly,\n# and sets the high bit in the cache file unless we assign to the vars.\n{\n  (set) 2>&1 |\n    case `(ac_space=' '; set | grep ac_space) 2>&1` in\n    *ac_space=\\ *)\n      # `set' does not quote correctly, so add quotes (double-quote\n      # substitution turns \\\\\\\\ into \\\\, and sed turns \\\\ into \\).\n      sed -n \\\n        \"s/'/'\\\\\\\\''/g;\n    \t  s/^\\\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\\\)=\\\\(.*\\\\)/\\\\1='\\\\2'/p\"\n      ;;\n    *)\n      # `set' quotes correctly as required by POSIX, so do not add quotes.\n      sed -n \\\n        \"s/^\\\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\\\)=\\\\(.*\\\\)/\\\\1=\\\\2/p\"\n      ;;\n    esac;\n} |\n  sed '\n     t clear\n     : clear\n     s/^\\([^=]*\\)=\\(.*[{}].*\\)$/test \"${\\1+set}\" = set || &/\n     t end\n     /^ac_cv_env/!s/^\\([^=]*\\)=\\(.*\\)$/\\1=${\\1=\\2}/\n     : end' >>confcache\nif diff $cache_file confcache >/dev/null 2>&1; then :; else\n  if test -w $cache_file; then\n    test \"x$cache_file\" != \"x/dev/null\" && echo \"updating cache $cache_file\"\n    cat confcache >$cache_file\n  else\n    echo \"not updating unwritable cache $cache_file\"\n  fi\nfi\nrm -f confcache\n\ntest \"x$prefix\" = xNONE && prefix=$ac_default_prefix\n# Let make expand exec_prefix.\ntest \"x$exec_prefix\" = xNONE && exec_prefix='${prefix}'\n\n# VPATH may cause trouble with some makes, so we remove $(srcdir),\n# ${srcdir} and @srcdir@ from VPATH if srcdir is \".\", strip leading and\n# trailing colons and then remove the whole line if VPATH becomes empty\n# (actually we leave an empty line to preserve line numbers).\nif test \"x$srcdir\" = x.; then\n  ac_vpsub='/^[ \t]*VPATH[ \t]*=/{\ns/:*\\$(srcdir):*/:/;\ns/:*\\${srcdir}:*/:/;\ns/:*@srcdir@:*/:/;\ns/^\\([^=]*=[ \t]*\\):*/\\1/;\ns/:*$//;\ns/^[^=]*=[ \t]*$//;\n}'\nfi\n\n# Transform confdefs.h into DEFS.\n# Protect against shell expansion while executing Makefile rules.\n# Protect against Makefile macro expansion.\n#\n# If the first sed substitution is executed (which looks for macros that\n# take arguments), then we branch to the quote section.  Otherwise,\n# look for a macro that doesn't take arguments.\ncat >confdef2opt.sed <<\\_ACEOF\nt clear\n: clear\ns,^[ \t]*#[ \t]*define[ \t][ \t]*\\([^ \t(][^ \t(]*([^)]*)\\)[ \t]*\\(.*\\),-D\\1=\\2,g\nt quote\ns,^[ \t]*#[ \t]*define[ \t][ \t]*\\([^ \t][^ \t]*\\)[ \t]*\\(.*\\),-D\\1=\\2,g\nt quote\nd\n: quote\ns,[ \t`~#$^&*(){}\\\\|;'\"<>?],\\\\&,g\ns,\\[,\\\\&,g\ns,\\],\\\\&,g\ns,\\$,$$,g\np\n_ACEOF\n# We use echo to avoid assuming a particular line-breaking character.\n# The extra dot is to prevent the shell from consuming trailing\n# line-breaks from the sub-command output.  A line-break within\n# single-quotes doesn't work because, if this script is created in a\n# platform that uses two characters for line-breaks (e.g., DOS), tr\n# would break.\nac_LF_and_DOT=`echo; echo .`\nDEFS=`sed -n -f confdef2opt.sed confdefs.h | tr \"$ac_LF_and_DOT\" ' .'`\nrm -f confdef2opt.sed\n\n\nac_libobjs=\nac_ltlibobjs=\nfor ac_i in : $LIBOBJS; do test \"x$ac_i\" = x: && continue\n  # 1. Remove the extension, and $U if already installed.\n  ac_i=`echo \"$ac_i\" |\n         sed 's/\\$U\\././;s/\\.o$//;s/\\.obj$//'`\n  # 2. Add them.\n  ac_libobjs=\"$ac_libobjs $ac_i\\$U.$ac_objext\"\n  ac_ltlibobjs=\"$ac_ltlibobjs $ac_i\"'$U.lo'\ndone\nLIBOBJS=$ac_libobjs\n\nLTLIBOBJS=$ac_ltlibobjs\n\n\n\n: ${CONFIG_STATUS=./config.status}\nac_clean_files_save=$ac_clean_files\nac_clean_files=\"$ac_clean_files $CONFIG_STATUS\"\n{ echo \"$as_me:$LINENO: creating $CONFIG_STATUS\" >&5\necho \"$as_me: creating $CONFIG_STATUS\" >&6;}\ncat >$CONFIG_STATUS <<_ACEOF\n#! $SHELL\n# Generated by $as_me.\n# Run this file to recreate the current configuration.\n# Compiler output produced by configure, useful for debugging\n# configure, is in config.log if it exists.\n\ndebug=false\nac_cs_recheck=false\nac_cs_silent=false\nSHELL=\\${CONFIG_SHELL-$SHELL}\n_ACEOF\n\ncat >>$CONFIG_STATUS <<\\_ACEOF\n## --------------------- ##\n## M4sh Initialization.  ##\n## --------------------- ##\n\n# Be Bourne compatible\nif test -n \"${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then\n  emulate sh\n  NULLCMD=:\n  # Zsh 3.x and 4.x performs word splitting on ${1+\"$@\"}, which\n  # is contrary to our usage.  Disable this feature.\n  alias -g '${1+\"$@\"}'='\"$@\"'\nelif test -n \"${BASH_VERSION+set}\" && (set -o posix) >/dev/null 2>&1; then\n  set -o posix\nfi\n\n# Support unset when possible.\nif (FOO=FOO; unset FOO) >/dev/null 2>&1; then\n  as_unset=unset\nelse\n  as_unset=false\nfi\n\n\n# Work around bugs in pre-3.0 UWIN ksh.\n$as_unset ENV MAIL MAILPATH\nPS1='$ '\nPS2='> '\nPS4='+ '\n\n# NLS nuisances.\nfor as_var in \\\n  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \\\n  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \\\n  LC_TELEPHONE LC_TIME\ndo\n  if (set +x; test -n \"`(eval $as_var=C; export $as_var) 2>&1`\"); then\n    eval $as_var=C; export $as_var\n  else\n    $as_unset $as_var\n  fi\ndone\n\n# Required to use basename.\nif expr a : '\\(a\\)' >/dev/null 2>&1; then\n  as_expr=expr\nelse\n  as_expr=false\nfi\n\nif (basename /) >/dev/null 2>&1 && test \"X`basename / 2>&1`\" = \"X/\"; then\n  as_basename=basename\nelse\n  as_basename=false\nfi\n\n\n# Name of the executable.\nas_me=`$as_basename \"$0\" ||\n$as_expr X/\"$0\" : '.*/\\([^/][^/]*\\)/*$' \\| \\\n\t X\"$0\" : 'X\\(//\\)$' \\| \\\n\t X\"$0\" : 'X\\(/\\)$' \\| \\\n\t .     : '\\(.\\)' 2>/dev/null ||\necho X/\"$0\" |\n    sed '/^.*\\/\\([^/][^/]*\\)\\/*$/{ s//\\1/; q; }\n  \t  /^X\\/\\(\\/\\/\\)$/{ s//\\1/; q; }\n  \t  /^X\\/\\(\\/\\).*/{ s//\\1/; q; }\n  \t  s/.*/./; q'`\n\n\n# PATH needs CR, and LINENO needs CR and PATH.\n# Avoid depending upon Character Ranges.\nas_cr_letters='abcdefghijklmnopqrstuvwxyz'\nas_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'\nas_cr_Letters=$as_cr_letters$as_cr_LETTERS\nas_cr_digits='0123456789'\nas_cr_alnum=$as_cr_Letters$as_cr_digits\n\n# The user is always right.\nif test \"${PATH_SEPARATOR+set}\" != set; then\n  echo \"#! /bin/sh\" >conf$$.sh\n  echo  \"exit 0\"   >>conf$$.sh\n  chmod +x conf$$.sh\n  if (PATH=\"/nonexistent;.\"; conf$$.sh) >/dev/null 2>&1; then\n    PATH_SEPARATOR=';'\n  else\n    PATH_SEPARATOR=:\n  fi\n  rm -f conf$$.sh\nfi\n\n\n  as_lineno_1=$LINENO\n  as_lineno_2=$LINENO\n  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`\n  test \"x$as_lineno_1\" != \"x$as_lineno_2\" &&\n  test \"x$as_lineno_3\"  = \"x$as_lineno_2\"  || {\n  # Find who we are.  Look in the path if we contain no path at all\n  # relative or not.\n  case $0 in\n    *[\\\\/]* ) as_myself=$0 ;;\n    *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n  test -r \"$as_dir/$0\" && as_myself=$as_dir/$0 && break\ndone\n\n       ;;\n  esac\n  # We did not find ourselves, most probably we were run as `sh COMMAND'\n  # in which case we are not to be found in the path.\n  if test \"x$as_myself\" = x; then\n    as_myself=$0\n  fi\n  if test ! -f \"$as_myself\"; then\n    { { echo \"$as_me:$LINENO: error: cannot find myself; rerun with an absolute path\" >&5\necho \"$as_me: error: cannot find myself; rerun with an absolute path\" >&2;}\n   { (exit 1); exit 1; }; }\n  fi\n  case $CONFIG_SHELL in\n  '')\n    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n  for as_base in sh bash ksh sh5; do\n\t case $as_dir in\n\t /*)\n\t   if (\"$as_dir/$as_base\" -c '\n  as_lineno_1=$LINENO\n  as_lineno_2=$LINENO\n  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`\n  test \"x$as_lineno_1\" != \"x$as_lineno_2\" &&\n  test \"x$as_lineno_3\"  = \"x$as_lineno_2\" ') 2>/dev/null; then\n\t     $as_unset BASH_ENV || test \"${BASH_ENV+set}\" != set || { BASH_ENV=; export BASH_ENV; }\n\t     $as_unset ENV || test \"${ENV+set}\" != set || { ENV=; export ENV; }\n\t     CONFIG_SHELL=$as_dir/$as_base\n\t     export CONFIG_SHELL\n\t     exec \"$CONFIG_SHELL\" \"$0\" ${1+\"$@\"}\n\t   fi;;\n\t esac\n       done\ndone\n;;\n  esac\n\n  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO\n  # uniformly replaced by the line number.  The first 'sed' inserts a\n  # line-number line before each line; the second 'sed' does the real\n  # work.  The second script uses 'N' to pair each line-number line\n  # with the numbered line, and appends trailing '-' during\n  # substitution so that $LINENO is not a special case at line end.\n  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the\n  # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)\n  sed '=' <$as_myself |\n    sed '\n      N\n      s,$,-,\n      : loop\n      s,^\\(['$as_cr_digits']*\\)\\(.*\\)[$]LINENO\\([^'$as_cr_alnum'_]\\),\\1\\2\\1\\3,\n      t loop\n      s,-$,,\n      s,^['$as_cr_digits']*\\n,,\n    ' >$as_me.lineno &&\n  chmod +x $as_me.lineno ||\n    { { echo \"$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell\" >&5\necho \"$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell\" >&2;}\n   { (exit 1); exit 1; }; }\n\n  # Don't try to exec as it changes $[0], causing all sort of problems\n  # (the dirname of $[0] is not the place where we might find the\n  # original and so on.  Autoconf is especially sensible to this).\n  . ./$as_me.lineno\n  # Exit status is that of the last command.\n  exit\n}\n\n\ncase `echo \"testing\\c\"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in\n  *c*,-n*) ECHO_N= ECHO_C='\n' ECHO_T='\t' ;;\n  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;\n  *)       ECHO_N= ECHO_C='\\c' ECHO_T= ;;\nesac\n\nif expr a : '\\(a\\)' >/dev/null 2>&1; then\n  as_expr=expr\nelse\n  as_expr=false\nfi\n\nrm -f conf$$ conf$$.exe conf$$.file\necho >conf$$.file\nif ln -s conf$$.file conf$$ 2>/dev/null; then\n  # We could just check for DJGPP; but this test a) works b) is more generic\n  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).\n  if test -f conf$$.exe; then\n    # Don't use ln at all; we don't have any links\n    as_ln_s='cp -p'\n  else\n    as_ln_s='ln -s'\n  fi\nelif ln conf$$.file conf$$ 2>/dev/null; then\n  as_ln_s=ln\nelse\n  as_ln_s='cp -p'\nfi\nrm -f conf$$ conf$$.exe conf$$.file\n\nif mkdir -p . 2>/dev/null; then\n  as_mkdir_p=:\nelse\n  as_mkdir_p=false\nfi\n\nas_executable_p=\"test -f\"\n\n# Sed expression to map a string onto a valid CPP name.\nas_tr_cpp=\"sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g\"\n\n# Sed expression to map a string onto a valid variable name.\nas_tr_sh=\"sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g\"\n\n\n# IFS\n# We need space, tab and new line, in precisely that order.\nas_nl='\n'\nIFS=\" \t$as_nl\"\n\n# CDPATH.\n$as_unset CDPATH\n\nexec 6>&1\n\n# Open the log real soon, to keep \\$[0] and so on meaningful, and to\n# report actual input values of CONFIG_FILES etc. instead of their\n# values after options handling.  Logging --version etc. is OK.\nexec 5>>config.log\n{\n  echo\n  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX\n## Running $as_me. ##\n_ASBOX\n} >&5\ncat >&5 <<_CSEOF\n\nThis file was extended by PortAudioCpp $as_me 12, which was\ngenerated by GNU Autoconf 2.57.  Invocation command line was\n\n  CONFIG_FILES    = $CONFIG_FILES\n  CONFIG_HEADERS  = $CONFIG_HEADERS\n  CONFIG_LINKS    = $CONFIG_LINKS\n  CONFIG_COMMANDS = $CONFIG_COMMANDS\n  $ $0 $@\n\n_CSEOF\necho \"on `(hostname || uname -n) 2>/dev/null | sed 1q`\" >&5\necho >&5\n_ACEOF\n\n# Files that config.status was made for.\nif test -n \"$ac_config_files\"; then\n  echo \"config_files=\\\"$ac_config_files\\\"\" >>$CONFIG_STATUS\nfi\n\nif test -n \"$ac_config_headers\"; then\n  echo \"config_headers=\\\"$ac_config_headers\\\"\" >>$CONFIG_STATUS\nfi\n\nif test -n \"$ac_config_links\"; then\n  echo \"config_links=\\\"$ac_config_links\\\"\" >>$CONFIG_STATUS\nfi\n\nif test -n \"$ac_config_commands\"; then\n  echo \"config_commands=\\\"$ac_config_commands\\\"\" >>$CONFIG_STATUS\nfi\n\ncat >>$CONFIG_STATUS <<\\_ACEOF\n\nac_cs_usage=\"\\\n\\`$as_me' instantiates files from templates according to the\ncurrent configuration.\n\nUsage: $0 [OPTIONS] [FILE]...\n\n  -h, --help       print this help, then exit\n  -V, --version    print version number, then exit\n  -q, --quiet      do not print progress messages\n  -d, --debug      don't remove temporary files\n      --recheck    update $as_me by reconfiguring in the same conditions\n  --file=FILE[:TEMPLATE]\n                   instantiate the configuration file FILE\n\nConfiguration files:\n$config_files\n\nReport bugs to <bug-autoconf@gnu.org>.\"\n_ACEOF\n\ncat >>$CONFIG_STATUS <<_ACEOF\nac_cs_version=\"\\\\\nPortAudioCpp config.status 12\nconfigured by $0, generated by GNU Autoconf 2.57,\n  with options \\\\\"`echo \"$ac_configure_args\" | sed 's/[\\\\\"\"\\`\\$]/\\\\\\\\&/g'`\\\\\"\n\nCopyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001\nFree Software Foundation, Inc.\nThis config.status script is free software; the Free Software Foundation\ngives unlimited permission to copy, distribute and modify it.\"\nsrcdir=$srcdir\nINSTALL=\"$INSTALL\"\n_ACEOF\n\ncat >>$CONFIG_STATUS <<\\_ACEOF\n# If no file are specified by the user, then we need to provide default\n# value.  By we need to know if files were specified by the user.\nac_need_defaults=:\nwhile test $# != 0\ndo\n  case $1 in\n  --*=*)\n    ac_option=`expr \"x$1\" : 'x\\([^=]*\\)='`\n    ac_optarg=`expr \"x$1\" : 'x[^=]*=\\(.*\\)'`\n    ac_shift=:\n    ;;\n  -*)\n    ac_option=$1\n    ac_optarg=$2\n    ac_shift=shift\n    ;;\n  *) # This is not an option, so the user has probably given explicit\n     # arguments.\n     ac_option=$1\n     ac_need_defaults=false;;\n  esac\n\n  case $ac_option in\n  # Handling of the options.\n_ACEOF\ncat >>$CONFIG_STATUS <<\\_ACEOF\n  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)\n    ac_cs_recheck=: ;;\n  --version | --vers* | -V )\n    echo \"$ac_cs_version\"; exit 0 ;;\n  --he | --h)\n    # Conflict between --help and --header\n    { { echo \"$as_me:$LINENO: error: ambiguous option: $1\nTry \\`$0 --help' for more information.\" >&5\necho \"$as_me: error: ambiguous option: $1\nTry \\`$0 --help' for more information.\" >&2;}\n   { (exit 1); exit 1; }; };;\n  --help | --hel | -h )\n    echo \"$ac_cs_usage\"; exit 0 ;;\n  --debug | --d* | -d )\n    debug=: ;;\n  --file | --fil | --fi | --f )\n    $ac_shift\n    CONFIG_FILES=\"$CONFIG_FILES $ac_optarg\"\n    ac_need_defaults=false;;\n  --header | --heade | --head | --hea )\n    $ac_shift\n    CONFIG_HEADERS=\"$CONFIG_HEADERS $ac_optarg\"\n    ac_need_defaults=false;;\n  -q | -quiet | --quiet | --quie | --qui | --qu | --q \\\n  | -silent | --silent | --silen | --sile | --sil | --si | --s)\n    ac_cs_silent=: ;;\n\n  # This is an error.\n  -*) { { echo \"$as_me:$LINENO: error: unrecognized option: $1\nTry \\`$0 --help' for more information.\" >&5\necho \"$as_me: error: unrecognized option: $1\nTry \\`$0 --help' for more information.\" >&2;}\n   { (exit 1); exit 1; }; } ;;\n\n  *) ac_config_targets=\"$ac_config_targets $1\" ;;\n\n  esac\n  shift\ndone\n\nac_configure_extra_args=\n\nif $ac_cs_silent; then\n  exec 6>/dev/null\n  ac_configure_extra_args=\"$ac_configure_extra_args --silent\"\nfi\n\n_ACEOF\ncat >>$CONFIG_STATUS <<_ACEOF\nif \\$ac_cs_recheck; then\n  echo \"running $SHELL $0 \" $ac_configure_args \\$ac_configure_extra_args \" --no-create --no-recursion\" >&6\n  exec $SHELL $0 $ac_configure_args \\$ac_configure_extra_args --no-create --no-recursion\nfi\n\n_ACEOF\n\n\n\n\n\ncat >>$CONFIG_STATUS <<\\_ACEOF\nfor ac_config_target in $ac_config_targets\ndo\n  case \"$ac_config_target\" in\n  # Handling of arguments.\n  \"Makefile\" ) CONFIG_FILES=\"$CONFIG_FILES Makefile\" ;;\n  *) { { echo \"$as_me:$LINENO: error: invalid argument: $ac_config_target\" >&5\necho \"$as_me: error: invalid argument: $ac_config_target\" >&2;}\n   { (exit 1); exit 1; }; };;\n  esac\ndone\n\n# If the user did not use the arguments to specify the items to instantiate,\n# then the envvar interface is used.  Set only those that are not.\n# We use the long form for the default assignment because of an extremely\n# bizarre bug on SunOS 4.1.3.\nif $ac_need_defaults; then\n  test \"${CONFIG_FILES+set}\" = set || CONFIG_FILES=$config_files\nfi\n\n# Have a temporary directory for convenience.  Make it in the build tree\n# simply because there is no reason to put it here, and in addition,\n# creating and moving files from /tmp can sometimes cause problems.\n# Create a temporary directory, and hook for its removal unless debugging.\n$debug ||\n{\n  trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0\n  trap '{ (exit 1); exit 1; }' 1 2 13 15\n}\n\n# Create a (secure) tmp directory for tmp files.\n\n{\n  tmp=`(umask 077 && mktemp -d -q \"./confstatXXXXXX\") 2>/dev/null` &&\n  test -n \"$tmp\" && test -d \"$tmp\"\n}  ||\n{\n  tmp=./confstat$$-$RANDOM\n  (umask 077 && mkdir $tmp)\n} ||\n{\n   echo \"$me: cannot create a temporary directory in .\" >&2\n   { (exit 1); exit 1; }\n}\n\n_ACEOF\n\ncat >>$CONFIG_STATUS <<_ACEOF\n\n#\n# CONFIG_FILES section.\n#\n\n# No need to generate the scripts if there are no CONFIG_FILES.\n# This happens for instance when ./config.status config.h\nif test -n \"\\$CONFIG_FILES\"; then\n  # Protect against being on the right side of a sed subst in config.status.\n  sed 's/,@/@@/; s/@,/@@/; s/,;t t\\$/@;t t/; /@;t t\\$/s/[\\\\\\\\&,]/\\\\\\\\&/g;\n   s/@@/,@/; s/@@/@,/; s/@;t t\\$/,;t t/' >\\$tmp/subs.sed <<\\\\CEOF\ns,@SHELL@,$SHELL,;t t\ns,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t\ns,@PACKAGE_NAME@,$PACKAGE_NAME,;t t\ns,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t\ns,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t\ns,@PACKAGE_STRING@,$PACKAGE_STRING,;t t\ns,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t\ns,@exec_prefix@,$exec_prefix,;t t\ns,@prefix@,$prefix,;t t\ns,@program_transform_name@,$program_transform_name,;t t\ns,@bindir@,$bindir,;t t\ns,@sbindir@,$sbindir,;t t\ns,@libexecdir@,$libexecdir,;t t\ns,@datadir@,$datadir,;t t\ns,@sysconfdir@,$sysconfdir,;t t\ns,@sharedstatedir@,$sharedstatedir,;t t\ns,@localstatedir@,$localstatedir,;t t\ns,@libdir@,$libdir,;t t\ns,@includedir@,$includedir,;t t\ns,@oldincludedir@,$oldincludedir,;t t\ns,@infodir@,$infodir,;t t\ns,@mandir@,$mandir,;t t\ns,@build_alias@,$build_alias,;t t\ns,@host_alias@,$host_alias,;t t\ns,@target_alias@,$target_alias,;t t\ns,@DEFS@,$DEFS,;t t\ns,@ECHO_C@,$ECHO_C,;t t\ns,@ECHO_N@,$ECHO_N,;t t\ns,@ECHO_T@,$ECHO_T,;t t\ns,@LIBS@,$LIBS,;t t\ns,@CC@,$CC,;t t\ns,@CFLAGS@,$CFLAGS,;t t\ns,@LDFLAGS@,$LDFLAGS,;t t\ns,@CPPFLAGS@,$CPPFLAGS,;t t\ns,@ac_ct_CC@,$ac_ct_CC,;t t\ns,@EXEEXT@,$EXEEXT,;t t\ns,@OBJEXT@,$OBJEXT,;t t\ns,@CXX@,$CXX,;t t\ns,@CXXFLAGS@,$CXXFLAGS,;t t\ns,@ac_ct_CXX@,$ac_ct_CXX,;t t\ns,@LN_S@,$LN_S,;t t\ns,@RANLIB@,$RANLIB,;t t\ns,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t\ns,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t\ns,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t\ns,@INSTALL_DATA@,$INSTALL_DATA,;t t\ns,@AR@,$AR,;t t\ns,@PACPP_ROOT@,$PACPP_ROOT,;t t\ns,@PORTAUDIO@,$PORTAUDIO,;t t\ns,@PADLL@,$PADLL,;t t\ns,@PACPP_DLL@,$PACPP_DLL,;t t\ns,@PACPP_INC@,$PACPP_INC,;t t\ns,@SHARED_FLAGS@,$SHARED_FLAGS,;t t\ns,@DLL_LIBS@,$DLL_LIBS,;t t\ns,@build@,$build,;t t\ns,@build_cpu@,$build_cpu,;t t\ns,@build_vendor@,$build_vendor,;t t\ns,@build_os@,$build_os,;t t\ns,@host@,$host,;t t\ns,@host_cpu@,$host_cpu,;t t\ns,@host_vendor@,$host_vendor,;t t\ns,@host_os@,$host_os,;t t\ns,@PKG_CONFIG@,$PKG_CONFIG,;t t\ns,@JACK_CFLAGS@,$JACK_CFLAGS,;t t\ns,@JACK_LIBS@,$JACK_LIBS,;t t\ns,@LIBOBJS@,$LIBOBJS,;t t\ns,@LTLIBOBJS@,$LTLIBOBJS,;t t\nCEOF\n\n_ACEOF\n\n  cat >>$CONFIG_STATUS <<\\_ACEOF\n  # Split the substitutions into bite-sized pieces for seds with\n  # small command number limits, like on Digital OSF/1 and HP-UX.\n  ac_max_sed_lines=48\n  ac_sed_frag=1 # Number of current file.\n  ac_beg=1 # First line for current file.\n  ac_end=$ac_max_sed_lines # Line after last line for current file.\n  ac_more_lines=:\n  ac_sed_cmds=\n  while $ac_more_lines; do\n    if test $ac_beg -gt 1; then\n      sed \"1,${ac_beg}d; ${ac_end}q\" $tmp/subs.sed >$tmp/subs.frag\n    else\n      sed \"${ac_end}q\" $tmp/subs.sed >$tmp/subs.frag\n    fi\n    if test ! -s $tmp/subs.frag; then\n      ac_more_lines=false\n    else\n      # The purpose of the label and of the branching condition is to\n      # speed up the sed processing (if there are no `@' at all, there\n      # is no need to browse any of the substitutions).\n      # These are the two extra sed commands mentioned above.\n      (echo ':t\n  /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed\n      if test -z \"$ac_sed_cmds\"; then\n  \tac_sed_cmds=\"sed -f $tmp/subs-$ac_sed_frag.sed\"\n      else\n  \tac_sed_cmds=\"$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed\"\n      fi\n      ac_sed_frag=`expr $ac_sed_frag + 1`\n      ac_beg=$ac_end\n      ac_end=`expr $ac_end + $ac_max_sed_lines`\n    fi\n  done\n  if test -z \"$ac_sed_cmds\"; then\n    ac_sed_cmds=cat\n  fi\nfi # test -n \"$CONFIG_FILES\"\n\n_ACEOF\ncat >>$CONFIG_STATUS <<\\_ACEOF\nfor ac_file in : $CONFIG_FILES; do test \"x$ac_file\" = x: && continue\n  # Support \"outfile[:infile[:infile...]]\", defaulting infile=\"outfile.in\".\n  case $ac_file in\n  - | *:- | *:-:* ) # input from stdin\n        cat >$tmp/stdin\n        ac_file_in=`echo \"$ac_file\" | sed 's,[^:]*:,,'`\n        ac_file=`echo \"$ac_file\" | sed 's,:.*,,'` ;;\n  *:* ) ac_file_in=`echo \"$ac_file\" | sed 's,[^:]*:,,'`\n        ac_file=`echo \"$ac_file\" | sed 's,:.*,,'` ;;\n  * )   ac_file_in=$ac_file.in ;;\n  esac\n\n  # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.\n  ac_dir=`(dirname \"$ac_file\") 2>/dev/null ||\n$as_expr X\"$ac_file\" : 'X\\(.*[^/]\\)//*[^/][^/]*/*$' \\| \\\n         X\"$ac_file\" : 'X\\(//\\)[^/]' \\| \\\n         X\"$ac_file\" : 'X\\(//\\)$' \\| \\\n         X\"$ac_file\" : 'X\\(/\\)' \\| \\\n         .     : '\\(.\\)' 2>/dev/null ||\necho X\"$ac_file\" |\n    sed '/^X\\(.*[^/]\\)\\/\\/*[^/][^/]*\\/*$/{ s//\\1/; q; }\n  \t  /^X\\(\\/\\/\\)[^/].*/{ s//\\1/; q; }\n  \t  /^X\\(\\/\\/\\)$/{ s//\\1/; q; }\n  \t  /^X\\(\\/\\).*/{ s//\\1/; q; }\n  \t  s/.*/./; q'`\n  { if $as_mkdir_p; then\n    mkdir -p \"$ac_dir\"\n  else\n    as_dir=\"$ac_dir\"\n    as_dirs=\n    while test ! -d \"$as_dir\"; do\n      as_dirs=\"$as_dir $as_dirs\"\n      as_dir=`(dirname \"$as_dir\") 2>/dev/null ||\n$as_expr X\"$as_dir\" : 'X\\(.*[^/]\\)//*[^/][^/]*/*$' \\| \\\n         X\"$as_dir\" : 'X\\(//\\)[^/]' \\| \\\n         X\"$as_dir\" : 'X\\(//\\)$' \\| \\\n         X\"$as_dir\" : 'X\\(/\\)' \\| \\\n         .     : '\\(.\\)' 2>/dev/null ||\necho X\"$as_dir\" |\n    sed '/^X\\(.*[^/]\\)\\/\\/*[^/][^/]*\\/*$/{ s//\\1/; q; }\n  \t  /^X\\(\\/\\/\\)[^/].*/{ s//\\1/; q; }\n  \t  /^X\\(\\/\\/\\)$/{ s//\\1/; q; }\n  \t  /^X\\(\\/\\).*/{ s//\\1/; q; }\n  \t  s/.*/./; q'`\n    done\n    test ! -n \"$as_dirs\" || mkdir $as_dirs\n  fi || { { echo \"$as_me:$LINENO: error: cannot create directory \\\"$ac_dir\\\"\" >&5\necho \"$as_me: error: cannot create directory \\\"$ac_dir\\\"\" >&2;}\n   { (exit 1); exit 1; }; }; }\n\n  ac_builddir=.\n\nif test \"$ac_dir\" != .; then\n  ac_dir_suffix=/`echo \"$ac_dir\" | sed 's,^\\.[\\\\/],,'`\n  # A \"../\" for each directory in $ac_dir_suffix.\n  ac_top_builddir=`echo \"$ac_dir_suffix\" | sed 's,/[^\\\\/]*,../,g'`\nelse\n  ac_dir_suffix= ac_top_builddir=\nfi\n\ncase $srcdir in\n  .)  # No --srcdir option.  We are building in place.\n    ac_srcdir=.\n    if test -z \"$ac_top_builddir\"; then\n       ac_top_srcdir=.\n    else\n       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`\n    fi ;;\n  [\\\\/]* | ?:[\\\\/]* )  # Absolute path.\n    ac_srcdir=$srcdir$ac_dir_suffix;\n    ac_top_srcdir=$srcdir ;;\n  *) # Relative path.\n    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix\n    ac_top_srcdir=$ac_top_builddir$srcdir ;;\nesac\n# Don't blindly perform a `cd \"$ac_dir\"/$ac_foo && pwd` since $ac_foo can be\n# absolute.\nac_abs_builddir=`cd \"$ac_dir\" && cd $ac_builddir && pwd`\nac_abs_top_builddir=`cd \"$ac_dir\" && cd ${ac_top_builddir}. && pwd`\nac_abs_srcdir=`cd \"$ac_dir\" && cd $ac_srcdir && pwd`\nac_abs_top_srcdir=`cd \"$ac_dir\" && cd $ac_top_srcdir && pwd`\n\n\n  case $INSTALL in\n  [\\\\/$]* | ?:[\\\\/]* ) ac_INSTALL=$INSTALL ;;\n  *) ac_INSTALL=$ac_top_builddir$INSTALL ;;\n  esac\n\n  if test x\"$ac_file\" != x-; then\n    { echo \"$as_me:$LINENO: creating $ac_file\" >&5\necho \"$as_me: creating $ac_file\" >&6;}\n    rm -f \"$ac_file\"\n  fi\n  # Let's still pretend it is `configure' which instantiates (i.e., don't\n  # use $as_me), people would be surprised to read:\n  #    /* config.h.  Generated by config.status.  */\n  if test x\"$ac_file\" = x-; then\n    configure_input=\n  else\n    configure_input=\"$ac_file.  \"\n  fi\n  configure_input=$configure_input\"Generated from `echo $ac_file_in |\n                                     sed 's,.*/,,'` by configure.\"\n\n  # First look for the input files in the build tree, otherwise in the\n  # src tree.\n  ac_file_inputs=`IFS=:\n    for f in $ac_file_in; do\n      case $f in\n      -) echo $tmp/stdin ;;\n      [\\\\/$]*)\n         # Absolute (can't be DOS-style, as IFS=:)\n         test -f \"$f\" || { { echo \"$as_me:$LINENO: error: cannot find input file: $f\" >&5\necho \"$as_me: error: cannot find input file: $f\" >&2;}\n   { (exit 1); exit 1; }; }\n         echo $f;;\n      *) # Relative\n         if test -f \"$f\"; then\n           # Build tree\n           echo $f\n         elif test -f \"$srcdir/$f\"; then\n           # Source tree\n           echo $srcdir/$f\n         else\n           # /dev/null tree\n           { { echo \"$as_me:$LINENO: error: cannot find input file: $f\" >&5\necho \"$as_me: error: cannot find input file: $f\" >&2;}\n   { (exit 1); exit 1; }; }\n         fi;;\n      esac\n    done` || { (exit 1); exit 1; }\n_ACEOF\ncat >>$CONFIG_STATUS <<_ACEOF\n  sed \"$ac_vpsub\n$extrasub\n_ACEOF\ncat >>$CONFIG_STATUS <<\\_ACEOF\n:t\n/@[a-zA-Z_][a-zA-Z_0-9]*@/!b\ns,@configure_input@,$configure_input,;t t\ns,@srcdir@,$ac_srcdir,;t t\ns,@abs_srcdir@,$ac_abs_srcdir,;t t\ns,@top_srcdir@,$ac_top_srcdir,;t t\ns,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t\ns,@builddir@,$ac_builddir,;t t\ns,@abs_builddir@,$ac_abs_builddir,;t t\ns,@top_builddir@,$ac_top_builddir,;t t\ns,@abs_top_builddir@,$ac_abs_top_builddir,;t t\ns,@INSTALL@,$ac_INSTALL,;t t\n\" $ac_file_inputs | (eval \"$ac_sed_cmds\") >$tmp/out\n  rm -f $tmp/stdin\n  if test x\"$ac_file\" != x-; then\n    mv $tmp/out $ac_file\n  else\n    cat $tmp/out\n    rm -f $tmp/out\n  fi\n\ndone\n_ACEOF\n\ncat >>$CONFIG_STATUS <<\\_ACEOF\n\n{ (exit 0); exit 0; }\n_ACEOF\nchmod +x $CONFIG_STATUS\nac_clean_files=$ac_clean_files_save\n\n\n# configure is writing to config.log, and then calls config.status.\n# config.status does its own redirection, appending to config.log.\n# Unfortunately, on DOS this fails, as config.log is still kept open\n# by configure, so config.status won't be able to write to it; its\n# output is simply discarded.  So we exec the FD to /dev/null,\n# effectively closing config.log, so it can be properly (re)opened and\n# appended to by config.status.  When coming back to configure, we\n# need to make the FD available again.\nif test \"$no_create\" != yes; then\n  ac_cs_success=:\n  ac_config_status_args=\n  test \"$silent\" = yes &&\n    ac_config_status_args=\"$ac_config_status_args --quiet\"\n  exec 5>/dev/null\n  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false\n  exec 5>>config.log\n  # Use ||, not &&, to avoid exiting from the if with $? = 1, which\n  # would make configure fail if this is the last instruction.\n  $ac_cs_success || { (exit 1); exit 1; }\nfi\n\n"
  },
  {
    "path": "thirdparty/portaudio/bindings/cpp/build/gnu/configure.ac",
    "content": "#\n# PortAudioCpp V19 autoconf input file\n# Shamelessly ripped from the PortAudio one by Dominic Mazzoni\n# Ludwig Schwardt\n#\n\n# Require autoconf >= 2.13\nAC_PREREQ(2.13)\n\nAC_INIT([PortAudioCpp], [12])\nAC_CONFIG_SRCDIR([../../include/portaudiocpp/PortAudioCpp.hxx])\n\n###### Top-level directory of pacpp\n###### This makes it easy to shuffle the build directories\n###### Also edit AC_CONFIG_SRCDIR above (wouldn't accept this variable)!\nPACPP_ROOT=\"../..\"\n\n######\n###### SET THIS TO PORTAUDIO DIRECTORY\n######\nPORTAUDIO=\"$PACPP_ROOT/../portaudio\"\n\n# Various other variables and flags\n\nPACPP_INC=\"$PACPP_ROOT/include\"\nINCLUDES=\"-I$PACPP_INC -I$PORTAUDIO -I$PORTAUDIO/pa_common\"\nCFLAGS=\"-g -O2 -Wall -ansi -pedantic $INCLUDES\"\nCXXFLAGS=\"$CFLAGS\"\nPALIBDIR=\"$PORTAUDIO/lib\"\n\n# Checks for programs\n\nAC_PROG_CC\nAC_PROG_CXX\nAC_PROG_LN_S\nAC_PROG_RANLIB\nAC_PROG_INSTALL\nAC_PATH_PROG(AR, ar, no)\nif [[ $AR = \"no\" ]] ; then\n    AC_MSG_ERROR(\"Could not find ar - needed to create a library\");\nfi\n\n# This must be one of the first tests we do or it will fail...\nAC_C_BIGENDIAN\n\n# Transfer these variables to the Makefile\nAC_SUBST(PACPP_ROOT)\nAC_SUBST(PORTAUDIO)\nAC_SUBST(PADLL)\nAC_SUBST(PACPP_DLL)\nAC_SUBST(PACPP_INC)\nAC_SUBST(SHARED_FLAGS)\nAC_SUBST(DLL_LIBS)\nAC_SUBST(CXXFLAGS)\n\n##################### CHECK FOR INSTALLED PACKAGES ############################\n\n# checks for various host APIs and arguments to configure that\n# turn them on or off\n\nAC_CHECK_LIB(asound, snd_pcm_open, have_alsa=yes, have_alsa=no)\n\n# Determine the host description for the subsequent test.\n# PKG_CHECK_MODULES seems to check and set the host variable also, but\n# that then requires pkg-config availability which is not standard on\n# MinGW systems and can be a pain to install.\nAC_CANONICAL_HOST\n\nPKG_CHECK_MODULES(JACK, jack, have_jack=yes, have_jack=no)\n\nAC_ARG_WITH(alsa, \n            [  --with-alsa (default=auto)],\n            with_alsa=$withval, with_alsa=\"yes\")\n\nAC_ARG_WITH(jack, \n            [  --with-jack (default=auto)],\n            with_jack=$withval, with_jack=\"yes\")\n\nAC_ARG_WITH(oss, \n            [  --with-oss (default=yes)],\n            with_oss=$withval, with_oss=\"yes\")\n\nAC_ARG_WITH(host_os, \n            [  --with-host_os (no default)],\n            host_os=$withval)\n\nAC_ARG_WITH(winapi,\n            [  --with-winapi ((wmme/directx/asio) default=wmme)],\n            with_winapi=$withval, with_winapi=\"wmme\")\n\n# Mac API added for ASIO, can have other api's listed\nAC_ARG_WITH(macapi,\n            [  --with-macapi (asio) default=asio)],\n            with_macapi=$withval, with_macapi=\"asio\")\n\nAC_ARG_WITH(asiodir,\n            [  --with-asiodir (default=/usr/local/asiosdk2)],\n            with_asiodir=$withval, with_asiodir=\"/usr/local/asiosdk2\")\n\nAC_ARG_WITH(dxdir,\n            [  --with-dxdir (default=/usr/local/dx7sdk)],\n            with_dxdir=$withval, with_dxdir=\"/usr/local/dx7sdk\")\n\n\n##################### HOST-SPECIFIC LIBRARY SETTINGS ##########################\n\ncase \"${host_os}\" in\n  darwin* )\n\t# Mac OS X configuration\n\n\tLIBS=\"-framework AudioUnit -framework AudioToolbox -framework CoreAudio\";\n\tPADLL=\"libportaudio.dylib\";\n\tPACPP_DLL=\"libportaudiocpp.dylib\";\n\tSHARED_FLAGS=\"-framework AudioUnit -framework AudioToolbox\";\n\tSHARED_FLAGS=\"$SHARED_FLAGS -framework CoreAudio -dynamiclib\";\n        if [[ $with_macapi = \"asio\" ]] ; then\n            if [[ $with_asiodir ]] ; then\n              ASIODIR=\"$with_asiodir\";\n            else\n              ASIODIR=\"/usr/local/asiosdk2\";\n            fi\n            echo \"ASIODIR: $ASIODIR\";\n        fi\n\t;;\n\n  mingw* )\n        # MingW configuration\n\n        echo \"WINAPI: $with_winapi\"\n        if [[ $with_winapi = \"directx\" ]] ; then\n            if [[ $with_dxdir ]] ; then\n              DXDIR=\"$with_dxdir\";\n            else\n              DXDIR=\"/usr/local/dx7sdk\";\n            fi\n            echo \"DXDIR: $DXDIR\"\n\t    LIBS=\"-L$PALIBDIR -lportaudio\"\n            LIBS=\"$LIBS -lwinmm -lm -ldsound -lole32\";\n            PADLL=\"portaudio.dll\";\n            PACPP_DLL=\"portaudiocpp.dll\";\n            SHARED_FLAGS=\"-shared -mthreads\";\n            DLL_LIBS=\"-lwinmm -lm -L./dx7sdk/lib -ldsound -lole32\";\n            CFLAGS=\"$CFLAGS -DPA_NO_WMME -DPA_NO_ASIO\";\n\t    CXXFLAGS=\"$CFLAGS\"\n        elif [[ $with_winapi = \"asio\" ]] ; then\n            if [[ $with_asiodir ]] ; then\n              ASIODIR=\"$with_asiodir\";\n            else\n              ASIODIR=\"/usr/local/asiosdk2\";\n            fi\n            echo \"ASIODIR: $ASIODIR\"\n\n\t    LIBS=\"-L$PALIBDIR -lportaudio\"\n            LIBS=\"$LIBS -lwinmm -lm -lstdc++ -lole32 -luuid\";\n            PADLL=\"portaudio.dll\";\n            PACPP_DLL=\"portaudiocpp.dll\";\n            SHARED_FLAGS=\"-shared -mthreads\";\n            DLL_LIBS=\"-lwinmm -lm -lstdc++ -lole32 -luuid\";\n            CFLAGS=\"$CFLAGS -ffast-math -fomit-frame-pointer -DPA_NO_WMME -DPA_NO_DS -DWINDOWS\";\n            CXXFLAGS=\"$CFLAGS\";\n        else   # WMME default\n\t    LIBS=\"-L$PALIBDIR -lportaudio\"\n            LIBS=\"$LIBS -lwinmm -lm -lstdc++ -lole32 -luuid\";\n            PADLL=\"portaudio.dll\";\n            PACPP_DLL=\"portaudiocpp.dll\";\n            SHARED_FLAGS=\"-shared -mthreads\";\n            DLL_LIBS=\"-lwinmm\";\n            CFLAGS=\"$CFLAGS -DPA_NO_DS -DPA_NO_ASIO\";\n            CXXFLAGS=\"$CFLAGS\";\n        fi\n        ;;\n\n  cygwin* )\n\t# Cygwin configuration\n\n\tLIBS=\"-L$PALIBDIR -lportaudio\"\n\tLIBS=\"$LIBS -lwinmm -lm\";\n\tPADLL=\"portaudio.dll\";\n\tPACPP_DLL=\"portaudiocpp.dll\";\n\tSHARED_FLAGS=\"-shared -mthreads\";\n\tDLL_LIBS=\"-lwinmm\";\n\t;;\n\n  *)\n\t# Unix OSS configuration\n\n   AC_CHECK_LIB(pthread, pthread_create,\n                ,\n                AC_MSG_ERROR([libpthread not found!]))\n\t\n\tLIBS=\"$LIBS -L$PALIBDIR -lportaudio\"\n\t\n\tif [[ $have_jack = \"yes\" ] && [ $with_jack != \"no\" ]] ; then\n   \t      \tLIBS=\"$LIBS $JACK_LIBS\"\n\t\tCFLAGS=\"$CFLAGS $JACK_CFLAGS\"\n                AC_DEFINE(PA_USE_JACK)\n\tfi\n\n\tif [[ $have_alsa = \"yes\" ] && [ $with_alsa != \"no\" ]] ; then\n                LIBS=\"$LIBS -lasound\"\n                AC_DEFINE(PA_USE_ALSA)\n\tfi\n\n\tif [[ $with_oss != \"no\" ]] ; then\n\t\tAC_DEFINE(PA_USE_OSS)\n\tfi\n\tLIBS=\"$LIBS -lm -lpthread\";\n\tPADLL=\"libportaudio.so\";\n\tPACPP_DLL=\"libportaudiocpp.so\";\n\tSHARED_FLAGS=\"-shared\";\nesac\n\nAC_CONFIG_FILES([Makefile])\nAC_OUTPUT\n"
  },
  {
    "path": "thirdparty/portaudio/bindings/cpp/build/gnu/install-sh",
    "content": "#!/bin/sh\n#\n# install - install a program, script, or datafile\n# This comes from X11R5 (mit/util/scripts/install.sh).\n#\n# Copyright 1991 by the Massachusetts Institute of Technology\n#\n# Permission to use, copy, modify, distribute, and sell this software and its\n# documentation for any purpose is hereby granted without fee, provided that\n# the above copyright notice appear in all copies and that both that\n# copyright notice and this permission notice appear in supporting\n# documentation, and that the name of M.I.T. not be used in advertising or\n# publicity pertaining to distribution of the software without specific,\n# written prior permission.  M.I.T. makes no representations about the\n# suitability of this software for any purpose.  It is provided \"as is\"\n# without express or implied warranty.\n#\n# Calling this script install-sh is preferred over install.sh, to prevent\n# `make' implicit rules from creating a file called install from it\n# when there is no Makefile.\n#\n# This script is compatible with the BSD install script, but was written\n# from scratch.  It can only install one file at a time, a restriction\n# shared with many OS's install programs.\n\n\n# set DOITPROG to echo to test this script\n\n# Don't use :- since 4.3BSD and earlier shells don't like it.\ndoit=\"${DOITPROG-}\"\n\n\n# put in absolute paths if you don't have them in your path; or use env. vars.\n\nmvprog=\"${MVPROG-mv}\"\ncpprog=\"${CPPROG-cp}\"\nchmodprog=\"${CHMODPROG-chmod}\"\nchownprog=\"${CHOWNPROG-chown}\"\nchgrpprog=\"${CHGRPPROG-chgrp}\"\nstripprog=\"${STRIPPROG-strip}\"\nrmprog=\"${RMPROG-rm}\"\nmkdirprog=\"${MKDIRPROG-mkdir}\"\n\ntransformbasename=\"\"\ntransform_arg=\"\"\ninstcmd=\"$mvprog\"\nchmodcmd=\"$chmodprog 0755\"\nchowncmd=\"\"\nchgrpcmd=\"\"\nstripcmd=\"\"\nrmcmd=\"$rmprog -f\"\nmvcmd=\"$mvprog\"\nsrc=\"\"\ndst=\"\"\ndir_arg=\"\"\n\nwhile [ x\"$1\" != x ]; do\n    case $1 in\n\t-c) instcmd=\"$cpprog\"\n\t    shift\n\t    continue;;\n\n\t-d) dir_arg=true\n\t    shift\n\t    continue;;\n\n\t-m) chmodcmd=\"$chmodprog $2\"\n\t    shift\n\t    shift\n\t    continue;;\n\n\t-o) chowncmd=\"$chownprog $2\"\n\t    shift\n\t    shift\n\t    continue;;\n\n\t-g) chgrpcmd=\"$chgrpprog $2\"\n\t    shift\n\t    shift\n\t    continue;;\n\n\t-s) stripcmd=\"$stripprog\"\n\t    shift\n\t    continue;;\n\n\t-t=*) transformarg=`echo $1 | sed 's/-t=//'`\n\t    shift\n\t    continue;;\n\n\t-b=*) transformbasename=`echo $1 | sed 's/-b=//'`\n\t    shift\n\t    continue;;\n\n\t*)  if [ x\"$src\" = x ]\n\t    then\n\t\tsrc=$1\n\t    else\n\t\t# this colon is to work around a 386BSD /bin/sh bug\n\t\t:\n\t\tdst=$1\n\t    fi\n\t    shift\n\t    continue;;\n    esac\ndone\n\nif [ x\"$src\" = x ]\nthen\n\techo \"install:\tno input file specified\"\n\texit 1\nelse\n\ttrue\nfi\n\nif [ x\"$dir_arg\" != x ]; then\n\tdst=$src\n\tsrc=\"\"\n\t\n\tif [ -d $dst ]; then\n\t\tinstcmd=:\n\t\tchmodcmd=\"\"\n\telse\n\t\tinstcmd=mkdir\n\tfi\nelse\n\n# Waiting for this to be detected by the \"$instcmd $src $dsttmp\" command\n# might cause directories to be created, which would be especially bad \n# if $src (and thus $dsttmp) contains '*'.\n\n\tif [ -f $src -o -d $src ]\n\tthen\n\t\ttrue\n\telse\n\t\techo \"install:  $src does not exist\"\n\t\texit 1\n\tfi\n\t\n\tif [ x\"$dst\" = x ]\n\tthen\n\t\techo \"install:\tno destination specified\"\n\t\texit 1\n\telse\n\t\ttrue\n\tfi\n\n# If destination is a directory, append the input filename; if your system\n# does not like double slashes in filenames, you may need to add some logic\n\n\tif [ -d $dst ]\n\tthen\n\t\tdst=\"$dst\"/`basename $src`\n\telse\n\t\ttrue\n\tfi\nfi\n\n## this sed command emulates the dirname command\ndstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`\n\n# Make sure that the destination directory exists.\n#  this part is taken from Noah Friedman's mkinstalldirs script\n\n# Skip lots of stat calls in the usual case.\nif [ ! -d \"$dstdir\" ]; then\ndefaultIFS='\t\n'\nIFS=\"${IFS-${defaultIFS}}\"\n\noIFS=\"${IFS}\"\n# Some sh's can't handle IFS=/ for some reason.\nIFS='%'\nset - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`\nIFS=\"${oIFS}\"\n\npathcomp=''\n\nwhile [ $# -ne 0 ] ; do\n\tpathcomp=\"${pathcomp}${1}\"\n\tshift\n\n\tif [ ! -d \"${pathcomp}\" ] ;\n        then\n\t\t$mkdirprog \"${pathcomp}\"\n\telse\n\t\ttrue\n\tfi\n\n\tpathcomp=\"${pathcomp}/\"\ndone\nfi\n\nif [ x\"$dir_arg\" != x ]\nthen\n\t$doit $instcmd $dst &&\n\n\tif [ x\"$chowncmd\" != x ]; then $doit $chowncmd $dst; else true ; fi &&\n\tif [ x\"$chgrpcmd\" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&\n\tif [ x\"$stripcmd\" != x ]; then $doit $stripcmd $dst; else true ; fi &&\n\tif [ x\"$chmodcmd\" != x ]; then $doit $chmodcmd $dst; else true ; fi\nelse\n\n# If we're going to rename the final executable, determine the name now.\n\n\tif [ x\"$transformarg\" = x ] \n\tthen\n\t\tdstfile=`basename $dst`\n\telse\n\t\tdstfile=`basename $dst $transformbasename | \n\t\t\tsed $transformarg`$transformbasename\n\tfi\n\n# don't allow the sed command to completely eliminate the filename\n\n\tif [ x\"$dstfile\" = x ] \n\tthen\n\t\tdstfile=`basename $dst`\n\telse\n\t\ttrue\n\tfi\n\n# Make a temp file name in the proper directory.\n\n\tdsttmp=$dstdir/#inst.$$#\n\n# Move or copy the file name to the temp name\n\n\t$doit $instcmd $src $dsttmp &&\n\n\ttrap \"rm -f ${dsttmp}\" 0 &&\n\n# and set any options; do chmod last to preserve setuid bits\n\n# If any of these fail, we abort the whole thing.  If we want to\n# ignore errors from any of these, just make sure not to ignore\n# errors from the above \"$doit $instcmd $src $dsttmp\" command.\n\n\tif [ x\"$chowncmd\" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&\n\tif [ x\"$chgrpcmd\" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&\n\tif [ x\"$stripcmd\" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&\n\tif [ x\"$chmodcmd\" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&\n\n# Now rename the file to the real destination.\n\n\t$doit $rmcmd -f $dstdir/$dstfile &&\n\t$doit $mvcmd $dsttmp $dstdir/$dstfile \n\nfi &&\n\n\nexit 0\n"
  },
  {
    "path": "thirdparty/portaudio/bindings/cpp/build/vc6/devs_example.dsp",
    "content": "# Microsoft Developer Studio Project File - Name=\"devs_example\" - Package Owner=<4>\r\n# Microsoft Developer Studio Generated Build File, Format Version 6.00\r\n# ** DO NOT EDIT **\r\n\r\n# TARGTYPE \"Win32 (x86) Console Application\" 0x0103\r\n\r\nCFG=devs_example - Win32 Debug\r\n!MESSAGE This is not a valid makefile. To build this project using NMAKE,\r\n!MESSAGE use the Export Makefile command and run\r\n!MESSAGE \r\n!MESSAGE NMAKE /f \"devs_example.mak\".\r\n!MESSAGE \r\n!MESSAGE You can specify a configuration when running NMAKE\r\n!MESSAGE by defining the macro CFG on the command line. For example:\r\n!MESSAGE \r\n!MESSAGE NMAKE /f \"devs_example.mak\" CFG=\"devs_example - Win32 Debug\"\r\n!MESSAGE \r\n!MESSAGE Possible choices for configuration are:\r\n!MESSAGE \r\n!MESSAGE \"devs_example - Win32 Release\" (based on \"Win32 (x86) Console Application\")\r\n!MESSAGE \"devs_example - Win32 Debug\" (based on \"Win32 (x86) Console Application\")\r\n!MESSAGE \r\n\r\n# Begin Project\r\n# PROP AllowPerConfigDependencies 0\r\n# PROP Scc_ProjName \"\"\r\n# PROP Scc_LocalPath \"\"\r\nCPP=cl.exe\r\nRSC=rc.exe\r\n\r\n!IF  \"$(CFG)\" == \"devs_example - Win32 Release\"\r\n\r\n# PROP BASE Use_MFC 0\r\n# PROP BASE Use_Debug_Libraries 0\r\n# PROP BASE Output_Dir \"Release\"\r\n# PROP BASE Intermediate_Dir \"Release\"\r\n# PROP BASE Target_Dir \"\"\r\n# PROP Use_MFC 0\r\n# PROP Use_Debug_Libraries 0\r\n# PROP Output_Dir \"Release\"\r\n# PROP Intermediate_Dir \"Release\"\r\n# PROP Ignore_Export_Lib 0\r\n# PROP Target_Dir \"\"\r\n# ADD BASE CPP /nologo /W3 /GX /O2 /D \"WIN32\" /D \"NDEBUG\" /D \"_CONSOLE\" /D \"_MBCS\" /YX /FD /c\r\n# ADD CPP /nologo /MTd /W3 /GX /O2 /I \"../../include/\" /I \"../../../../include/\" /I \"../../../../src/common/\" /I \"../../../../../asiosdk2/common/\" /I \"../../../../../asiosdk2/host/\" /I \"../../../../../asiosdk2/host/pc/\" /D \"WIN32\" /D \"NDEBUG\" /D \"_CONSOLE\" /D \"_MBCS\" /FD /c\r\n# SUBTRACT CPP /YX\r\n# ADD BASE RSC /l 0x809 /d \"NDEBUG\"\r\n# ADD RSC /l 0x809 /d \"NDEBUG\"\r\nBSC32=bscmake.exe\r\n# ADD BASE BSC32 /nologo\r\n# ADD BSC32 /nologo\r\nLINK32=link.exe\r\n# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386\r\n# ADD LINK32 portaudiocpp-vc6-r.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /out:\"../../bin/devs_example.exe\" /libpath:\"../../lib\"\r\n\r\n!ELSEIF  \"$(CFG)\" == \"devs_example - Win32 Debug\"\r\n\r\n# PROP BASE Use_MFC 0\r\n# PROP BASE Use_Debug_Libraries 1\r\n# PROP BASE Output_Dir \"Debug\"\r\n# PROP BASE Intermediate_Dir \"Debug\"\r\n# PROP BASE Target_Dir \"\"\r\n# PROP Use_MFC 0\r\n# PROP Use_Debug_Libraries 1\r\n# PROP Output_Dir \"Debug\"\r\n# PROP Intermediate_Dir \"Debug\"\r\n# PROP Ignore_Export_Lib 0\r\n# PROP Target_Dir \"\"\r\n# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D \"WIN32\" /D \"_DEBUG\" /D \"_CONSOLE\" /D \"_MBCS\" /YX /FD /GZ /c\r\n# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I \"../../include/\" /I \"../../../../include/\" /I \"../../../../src/common/\" /I \"../../../../../asiosdk2/common/\" /I \"../../../../../asiosdk2/host/\" /I \"../../../../../asiosdk2/host/pc/\" /D \"WIN32\" /D \"_DEBUG\" /D \"_CONSOLE\" /D \"_MBCS\" /FD /GZ /c\r\n# SUBTRACT CPP /YX\r\n# ADD BASE RSC /l 0x809 /d \"_DEBUG\"\r\n# ADD RSC /l 0x809 /d \"_DEBUG\"\r\nBSC32=bscmake.exe\r\n# ADD BASE BSC32 /nologo\r\n# ADD BSC32 /nologo\r\nLINK32=link.exe\r\n# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept\r\n# ADD LINK32 portaudiocpp-vc6-d.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /out:\"../../bin/devs_example.exe\" /pdbtype:sept /libpath:\"../../lib\"\r\n\r\n!ENDIF \r\n\r\n# Begin Target\r\n\r\n# Name \"devs_example - Win32 Release\"\r\n# Name \"devs_example - Win32 Debug\"\r\n# Begin Group \"Source Files\"\r\n\r\n# PROP Default_Filter \"cpp;c;cxx;rc;def;r;odl;idl;hpj;bat\"\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\..\\..\\pa_asio\\iasiothiscallresolver.cpp\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\..\\..\\src\\common\\pa_allocation.c\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\..\\..\\pa_asio\\pa_asio.cpp\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\..\\..\\src\\common\\pa_converters.c\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\..\\..\\src\\common\\pa_cpuload.c\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\..\\..\\src\\common\\pa_dither.c\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\..\\..\\src\\common\\pa_front.c\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\..\\..\\src\\common\\pa_process.c\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\..\\..\\src\\hostapi\\skeleton\\pa_hostapi_skeleton.c\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\..\\..\\src\\common\\pa_stream.c\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\..\\..\\src\\common\\pa_trace.c\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\..\\..\\src\\hostapi\\dsound\\pa_win_ds.c\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\..\\..\\src\\hostapi\\dsound\\pa_win_ds_dynlink.c\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\..\\..\\src\\os\\win\\pa_win_hostapis.c\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\..\\..\\src\\os\\win\\pa_win_util.c\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\..\\..\\src\\hostapi\\wmme\\pa_win_wmme.c\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\..\\..\\src\\os\\win\\pa_x86_plain_converters.c\r\n# End Source File\r\n# End Group\r\n# Begin Group \"Header Files\"\r\n\r\n# PROP Default_Filter \"h;hpp;hxx;hm;inl\"\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\..\\..\\pa_asio\\iasiothiscallresolver.h\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\..\\..\\src\\common\\pa_allocation.h\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\..\\..\\src\\common\\pa_converters.h\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\..\\..\\src\\common\\pa_cpuload.h\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\..\\..\\src\\common\\pa_dither.h\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\..\\..\\src\\common\\pa_endianness.h\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\..\\..\\src\\common\\pa_hostapi.h\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\..\\..\\src\\common\\pa_process.h\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\..\\..\\src\\common\\pa_stream.h\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\..\\..\\src\\common\\pa_trace.h\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\..\\..\\src\\common\\pa_types.h\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\..\\..\\src\\common\\pa_util.h\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\..\\..\\src\\hostapi\\dsound\\pa_win_ds_dynlink.h\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\..\\..\\src\\os\\win\\pa_x86_plain_converters.h\r\n# End Source File\r\n# End Group\r\n# Begin Group \"Resource Files\"\r\n\r\n# PROP Default_Filter \"ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe\"\r\n# End Group\r\n# Begin Group \"Example Files\"\r\n\r\n# PROP Default_Filter \"\"\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\example\\devs.cxx\r\n# End Source File\r\n# End Group\r\n# Begin Group \"ASIO 2 SDK\"\r\n\r\n# PROP Default_Filter \"\"\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\..\\..\\..\\asiosdk2\\common\\asio.cpp\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\..\\..\\..\\asiosdk2\\host\\asiodrivers.cpp\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\..\\..\\..\\asiosdk2\\host\\pc\\asiolist.cpp\r\n# End Source File\r\n# End Group\r\n# End Target\r\n# End Project\r\n"
  },
  {
    "path": "thirdparty/portaudio/bindings/cpp/build/vc6/devs_example.dsw",
    "content": "Microsoft Developer Studio Workspace File, Format Version 6.00\r\n# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!\r\n\r\n###############################################################################\r\n\r\nProject: \"devs_example\"=\".\\devs_example.dsp\" - Package Owner=<4>\r\n\r\nPackage=<5>\r\n{{{\r\n}}}\r\n\r\nPackage=<4>\r\n{{{\r\n    Begin Project Dependency\r\n    Project_Dep_Name static_library\r\n    End Project Dependency\r\n}}}\r\n\r\n###############################################################################\r\n\r\nProject: \"static_library\"=\".\\static_library.dsp\" - Package Owner=<4>\r\n\r\nPackage=<5>\r\n{{{\r\n}}}\r\n\r\nPackage=<4>\r\n{{{\r\n}}}\r\n\r\n###############################################################################\r\n\r\nGlobal:\r\n\r\nPackage=<5>\r\n{{{\r\n}}}\r\n\r\nPackage=<3>\r\n{{{\r\n}}}\r\n\r\n###############################################################################\r\n\r\n"
  },
  {
    "path": "thirdparty/portaudio/bindings/cpp/build/vc6/sine_example.dsp",
    "content": "# Microsoft Developer Studio Project File - Name=\"sine_example\" - Package Owner=<4>\r\n# Microsoft Developer Studio Generated Build File, Format Version 6.00\r\n# ** DO NOT EDIT **\r\n\r\n# TARGTYPE \"Win32 (x86) Console Application\" 0x0103\r\n\r\nCFG=sine_example - Win32 Debug\r\n!MESSAGE This is not a valid makefile. To build this project using NMAKE,\r\n!MESSAGE use the Export Makefile command and run\r\n!MESSAGE \r\n!MESSAGE NMAKE /f \"sine_example.mak\".\r\n!MESSAGE \r\n!MESSAGE You can specify a configuration when running NMAKE\r\n!MESSAGE by defining the macro CFG on the command line. For example:\r\n!MESSAGE \r\n!MESSAGE NMAKE /f \"sine_example.mak\" CFG=\"sine_example - Win32 Debug\"\r\n!MESSAGE \r\n!MESSAGE Possible choices for configuration are:\r\n!MESSAGE \r\n!MESSAGE \"sine_example - Win32 Release\" (based on \"Win32 (x86) Console Application\")\r\n!MESSAGE \"sine_example - Win32 Debug\" (based on \"Win32 (x86) Console Application\")\r\n!MESSAGE \r\n\r\n# Begin Project\r\n# PROP AllowPerConfigDependencies 0\r\n# PROP Scc_ProjName \"\"\r\n# PROP Scc_LocalPath \"\"\r\nCPP=cl.exe\r\nRSC=rc.exe\r\n\r\n!IF  \"$(CFG)\" == \"sine_example - Win32 Release\"\r\n\r\n# PROP BASE Use_MFC 0\r\n# PROP BASE Use_Debug_Libraries 0\r\n# PROP BASE Output_Dir \"Release\"\r\n# PROP BASE Intermediate_Dir \"Release\"\r\n# PROP BASE Target_Dir \"\"\r\n# PROP Use_MFC 0\r\n# PROP Use_Debug_Libraries 0\r\n# PROP Output_Dir \"Release\"\r\n# PROP Intermediate_Dir \"Release\"\r\n# PROP Ignore_Export_Lib 0\r\n# PROP Target_Dir \"\"\r\n# ADD BASE CPP /nologo /W3 /GX /O2 /D \"WIN32\" /D \"NDEBUG\" /D \"_CONSOLE\" /D \"_MBCS\" /YX /FD /c\r\n# ADD CPP /nologo /MTd /W3 /GX /O2 /I \"../../include/\" /I \"../../../../include/\" /I \"../../../../src/common/\" /I \"../../../../../asiosdk2/common/\" /I \"../../../../../asiosdk2/host/\" /I \"../../../../../asiosdk2/host/pc/\" /D \"WIN32\" /D \"NDEBUG\" /D \"_CONSOLE\" /D \"_MBCS\" /FD /c\r\n# SUBTRACT CPP /YX\r\n# ADD BASE RSC /l 0x809 /d \"NDEBUG\"\r\n# ADD RSC /l 0x809 /d \"NDEBUG\"\r\nBSC32=bscmake.exe\r\n# ADD BASE BSC32 /nologo\r\n# ADD BSC32 /nologo\r\nLINK32=link.exe\r\n# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386\r\n# ADD LINK32 portaudiocpp-vc6-r.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /out:\"../../bin/sine_example.exe\" /libpath:\"../../lib\"\r\n\r\n!ELSEIF  \"$(CFG)\" == \"sine_example - Win32 Debug\"\r\n\r\n# PROP BASE Use_MFC 0\r\n# PROP BASE Use_Debug_Libraries 1\r\n# PROP BASE Output_Dir \"Debug\"\r\n# PROP BASE Intermediate_Dir \"Debug\"\r\n# PROP BASE Target_Dir \"\"\r\n# PROP Use_MFC 0\r\n# PROP Use_Debug_Libraries 1\r\n# PROP Output_Dir \"Debug\"\r\n# PROP Intermediate_Dir \"Debug\"\r\n# PROP Ignore_Export_Lib 0\r\n# PROP Target_Dir \"\"\r\n# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D \"WIN32\" /D \"_DEBUG\" /D \"_CONSOLE\" /D \"_MBCS\" /YX /FD /GZ /c\r\n# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I \"../../include/\" /I \"../../../../include/\" /I \"../../../../src/common/\" /I \"../../../../../asiosdk2/common/\" /I \"../../../../../asiosdk2/host/\" /I \"../../../../../asiosdk2/host/pc/\" /D \"WIN32\" /D \"_DEBUG\" /D \"_CONSOLE\" /D \"_MBCS\" /FD /GZ /c\r\n# SUBTRACT CPP /YX\r\n# ADD BASE RSC /l 0x809 /d \"_DEBUG\"\r\n# ADD RSC /l 0x809 /d \"_DEBUG\"\r\nBSC32=bscmake.exe\r\n# ADD BASE BSC32 /nologo\r\n# ADD BSC32 /nologo\r\nLINK32=link.exe\r\n# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept\r\n# ADD LINK32 portaudiocpp-vc6-d.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /out:\"../../bin/sine_example.exe\" /pdbtype:sept /libpath:\"../../lib\"\r\n\r\n!ENDIF \r\n\r\n# Begin Target\r\n\r\n# Name \"sine_example - Win32 Release\"\r\n# Name \"sine_example - Win32 Debug\"\r\n# Begin Group \"Header Files\"\r\n\r\n# PROP Default_Filter \"h;hpp;hxx;hm;inl\"\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\..\\..\\pa_asio\\iasiothiscallresolver.h\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\..\\..\\src\\common\\pa_allocation.h\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\..\\..\\src\\common\\pa_converters.h\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\..\\..\\src\\common\\pa_cpuload.h\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\..\\..\\src\\common\\pa_dither.h\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\..\\..\\src\\common\\pa_endianness.h\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\..\\..\\src\\common\\pa_hostapi.h\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\..\\..\\src\\common\\pa_process.h\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\..\\..\\src\\common\\pa_stream.h\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\..\\..\\src\\common\\pa_trace.h\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\..\\..\\src\\common\\pa_types.h\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\..\\..\\src\\common\\pa_util.h\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\..\\..\\src\\hostapi\\dsound\\pa_win_ds_dynlink.h\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\..\\..\\src\\os\\win\\pa_x86_plain_converters.h\r\n# End Source File\r\n# End Group\r\n# Begin Group \"Resource Files\"\r\n\r\n# PROP Default_Filter \"ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe\"\r\n# End Group\r\n# Begin Group \"Example Files\"\r\n\r\n# PROP Default_Filter \"\"\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\example\\sine.cxx\r\n# End Source File\r\n# End Group\r\n# Begin Group \"Source Files\"\r\n\r\n# PROP Default_Filter \"cpp;c;cxx;rc;def;r;odl;idl;hpj;bat\"\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\..\\..\\pa_asio\\iasiothiscallresolver.cpp\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\..\\..\\src\\common\\pa_allocation.c\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\..\\..\\pa_asio\\pa_asio.cpp\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\..\\..\\src\\common\\pa_converters.c\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\..\\..\\src\\common\\pa_cpuload.c\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\..\\..\\src\\common\\pa_dither.c\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\..\\..\\src\\common\\pa_front.c\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\..\\..\\src\\common\\pa_process.c\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\..\\..\\src\\hostapi\\skeleton\\pa_hostapi_skeleton.c\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\..\\..\\src\\common\\pa_stream.c\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\..\\..\\src\\common\\pa_trace.c\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\..\\..\\src\\hostapi\\dsound\\pa_win_ds.c\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\..\\..\\src\\hostapi\\dsound\\pa_win_ds_dynlink.c\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\..\\..\\src\\os\\win\\pa_win_hostapis.c\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\..\\..\\src\\os\\win\\pa_win_util.c\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\..\\..\\src\\hostapi\\wasapi\\pa_win_wasapi.cpp\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\..\\..\\src\\hostapi\\wmme\\pa_win_wmme.c\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\..\\..\\src\\os\\win\\pa_x86_plain_converters.c\r\n# End Source File\r\n# End Group\r\n# Begin Group \"ASIO 2 SDK\"\r\n\r\n# PROP Default_Filter \"\"\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\..\\..\\..\\asiosdk2\\common\\asio.cpp\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\..\\..\\..\\asiosdk2\\host\\asiodrivers.cpp\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\..\\..\\..\\asiosdk2\\host\\pc\\asiolist.cpp\r\n# End Source File\r\n# End Group\r\n# End Target\r\n# End Project\r\n"
  },
  {
    "path": "thirdparty/portaudio/bindings/cpp/build/vc6/sine_example.dsw",
    "content": "Microsoft Developer Studio Workspace File, Format Version 6.00\r\n# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!\r\n\r\n###############################################################################\r\n\r\nProject: \"sine_example\"=\".\\sine_example.dsp\" - Package Owner=<4>\r\n\r\nPackage=<5>\r\n{{{\r\n}}}\r\n\r\nPackage=<4>\r\n{{{\r\n    Begin Project Dependency\r\n    Project_Dep_Name static_library\r\n    End Project Dependency\r\n}}}\r\n\r\n###############################################################################\r\n\r\nProject: \"static_library\"=\".\\static_library.dsp\" - Package Owner=<4>\r\n\r\nPackage=<5>\r\n{{{\r\n}}}\r\n\r\nPackage=<4>\r\n{{{\r\n}}}\r\n\r\n###############################################################################\r\n\r\nGlobal:\r\n\r\nPackage=<5>\r\n{{{\r\n}}}\r\n\r\nPackage=<3>\r\n{{{\r\n}}}\r\n\r\n###############################################################################\r\n\r\n"
  },
  {
    "path": "thirdparty/portaudio/bindings/cpp/build/vc6/static_library.dsp",
    "content": "# Microsoft Developer Studio Project File - Name=\"static_library\" - Package Owner=<4>\r\n# Microsoft Developer Studio Generated Build File, Format Version 6.00\r\n# ** DO NOT EDIT **\r\n\r\n# TARGTYPE \"Win32 (x86) Static Library\" 0x0104\r\n\r\nCFG=static_library - Win32 Debug\r\n!MESSAGE This is not a valid makefile. To build this project using NMAKE,\r\n!MESSAGE use the Export Makefile command and run\r\n!MESSAGE \r\n!MESSAGE NMAKE /f \"static_library.mak\".\r\n!MESSAGE \r\n!MESSAGE You can specify a configuration when running NMAKE\r\n!MESSAGE by defining the macro CFG on the command line. For example:\r\n!MESSAGE \r\n!MESSAGE NMAKE /f \"static_library.mak\" CFG=\"static_library - Win32 Debug\"\r\n!MESSAGE \r\n!MESSAGE Possible choices for configuration are:\r\n!MESSAGE \r\n!MESSAGE \"static_library - Win32 Release\" (based on \"Win32 (x86) Static Library\")\r\n!MESSAGE \"static_library - Win32 Debug\" (based on \"Win32 (x86) Static Library\")\r\n!MESSAGE \r\n\r\n# Begin Project\r\n# PROP AllowPerConfigDependencies 0\r\n# PROP Scc_ProjName \"\"\r\n# PROP Scc_LocalPath \"\"\r\nCPP=cl.exe\r\nRSC=rc.exe\r\n\r\n!IF  \"$(CFG)\" == \"static_library - Win32 Release\"\r\n\r\n# PROP BASE Use_MFC 0\r\n# PROP BASE Use_Debug_Libraries 0\r\n# PROP BASE Output_Dir \"Release\"\r\n# PROP BASE Intermediate_Dir \"Release\"\r\n# PROP BASE Target_Dir \"\"\r\n# PROP Use_MFC 0\r\n# PROP Use_Debug_Libraries 0\r\n# PROP Output_Dir \"Release\"\r\n# PROP Intermediate_Dir \"Release\"\r\n# PROP Target_Dir \"\"\r\n# ADD BASE CPP /nologo /W3 /GX /O2 /D \"WIN32\" /D \"NDEBUG\" /D \"_MBCS\" /D \"_LIB\" /YX /FD /c\r\n# ADD CPP /nologo /MTd /W3 /GX /O2 /I \"../../include/\" /I \"../../../../include/\" /D \"WIN32\" /D \"NDEBUG\" /D \"_MBCS\" /D \"_LIB\" /FD /c\r\n# SUBTRACT CPP /YX\r\n# ADD BASE RSC /l 0x809 /d \"NDEBUG\"\r\n# ADD RSC /l 0x809 /d \"NDEBUG\"\r\nBSC32=bscmake.exe\r\n# ADD BASE BSC32 /nologo\r\n# ADD BSC32 /nologo\r\nLIB32=link.exe -lib\r\n# ADD BASE LIB32 /nologo\r\n# ADD LIB32 /nologo /out:\"../../lib/portaudiocpp-vc6-r.lib\"\r\n\r\n!ELSEIF  \"$(CFG)\" == \"static_library - Win32 Debug\"\r\n\r\n# PROP BASE Use_MFC 0\r\n# PROP BASE Use_Debug_Libraries 1\r\n# PROP BASE Output_Dir \"Debug\"\r\n# PROP BASE Intermediate_Dir \"Debug\"\r\n# PROP BASE Target_Dir \"\"\r\n# PROP Use_MFC 0\r\n# PROP Use_Debug_Libraries 1\r\n# PROP Output_Dir \"Debug\"\r\n# PROP Intermediate_Dir \"Debug\"\r\n# PROP Target_Dir \"\"\r\n# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D \"WIN32\" /D \"_DEBUG\" /D \"_MBCS\" /D \"_LIB\" /YX /FD /GZ  /c\r\n# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I \"../../include/\" /I \"../../../../include/\" /D \"WIN32\" /D \"_DEBUG\" /D \"_MBCS\" /D \"_LIB\" /FD /GZ  /c\r\n# SUBTRACT CPP /YX\r\n# ADD BASE RSC /l 0x809 /d \"_DEBUG\"\r\n# ADD RSC /l 0x809 /d \"_DEBUG\"\r\nBSC32=bscmake.exe\r\n# ADD BASE BSC32 /nologo\r\n# ADD BSC32 /nologo\r\nLIB32=link.exe -lib\r\n# ADD BASE LIB32 /nologo\r\n# ADD LIB32 /nologo /out:\"../../lib/portaudiocpp-vc6-d.lib\"\r\n\r\n!ENDIF \r\n\r\n# Begin Target\r\n\r\n# Name \"static_library - Win32 Release\"\r\n# Name \"static_library - Win32 Debug\"\r\n# Begin Group \"Source Files\"\r\n\r\n# PROP Default_Filter \"cpp;c;cxx;rc;def;r;odl;idl;hpj;bat\"\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\source\\portaudiocpp\\AsioDeviceAdapter.cxx\r\n\r\n!IF  \"$(CFG)\" == \"static_library - Win32 Release\"\r\n\r\n!ELSEIF  \"$(CFG)\" == \"static_library - Win32 Debug\"\r\n\r\n# SUBTRACT CPP /YX\r\n\r\n!ENDIF \r\n\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\source\\portaudiocpp\\BlockingStream.cxx\r\n\r\n!IF  \"$(CFG)\" == \"static_library - Win32 Release\"\r\n\r\n!ELSEIF  \"$(CFG)\" == \"static_library - Win32 Debug\"\r\n\r\n# SUBTRACT CPP /YX\r\n\r\n!ENDIF \r\n\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\source\\portaudiocpp\\CallbackInterface.cxx\r\n\r\n!IF  \"$(CFG)\" == \"static_library - Win32 Release\"\r\n\r\n!ELSEIF  \"$(CFG)\" == \"static_library - Win32 Debug\"\r\n\r\n# SUBTRACT CPP /YX\r\n\r\n!ENDIF \r\n\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\source\\portaudiocpp\\CallbackStream.cxx\r\n\r\n!IF  \"$(CFG)\" == \"static_library - Win32 Release\"\r\n\r\n!ELSEIF  \"$(CFG)\" == \"static_library - Win32 Debug\"\r\n\r\n# SUBTRACT CPP /YX\r\n\r\n!ENDIF \r\n\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\source\\portaudiocpp\\CFunCallbackStream.cxx\r\n\r\n!IF  \"$(CFG)\" == \"static_library - Win32 Release\"\r\n\r\n!ELSEIF  \"$(CFG)\" == \"static_library - Win32 Debug\"\r\n\r\n# SUBTRACT CPP /YX\r\n\r\n!ENDIF \r\n\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\source\\portaudiocpp\\CppFunCallbackStream.cxx\r\n\r\n!IF  \"$(CFG)\" == \"static_library - Win32 Release\"\r\n\r\n!ELSEIF  \"$(CFG)\" == \"static_library - Win32 Debug\"\r\n\r\n# SUBTRACT CPP /YX\r\n\r\n!ENDIF \r\n\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\source\\portaudiocpp\\Device.cxx\r\n\r\n!IF  \"$(CFG)\" == \"static_library - Win32 Release\"\r\n\r\n!ELSEIF  \"$(CFG)\" == \"static_library - Win32 Debug\"\r\n\r\n# SUBTRACT CPP /YX\r\n\r\n!ENDIF \r\n\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\source\\portaudiocpp\\DirectionSpecificStreamParameters.cxx\r\n\r\n!IF  \"$(CFG)\" == \"static_library - Win32 Release\"\r\n\r\n!ELSEIF  \"$(CFG)\" == \"static_library - Win32 Debug\"\r\n\r\n# SUBTRACT CPP /YX\r\n\r\n!ENDIF \r\n\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\source\\portaudiocpp\\Exception.cxx\r\n\r\n!IF  \"$(CFG)\" == \"static_library - Win32 Release\"\r\n\r\n!ELSEIF  \"$(CFG)\" == \"static_library - Win32 Debug\"\r\n\r\n# SUBTRACT CPP /YX\r\n\r\n!ENDIF \r\n\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\source\\portaudiocpp\\HostApi.cxx\r\n\r\n!IF  \"$(CFG)\" == \"static_library - Win32 Release\"\r\n\r\n!ELSEIF  \"$(CFG)\" == \"static_library - Win32 Debug\"\r\n\r\n# SUBTRACT CPP /YX\r\n\r\n!ENDIF \r\n\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\source\\portaudiocpp\\InterfaceCallbackStream.cxx\r\n\r\n!IF  \"$(CFG)\" == \"static_library - Win32 Release\"\r\n\r\n!ELSEIF  \"$(CFG)\" == \"static_library - Win32 Debug\"\r\n\r\n# SUBTRACT CPP /YX\r\n\r\n!ENDIF \r\n\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\source\\portaudiocpp\\MemFunCallbackStream.cxx\r\n\r\n!IF  \"$(CFG)\" == \"static_library - Win32 Release\"\r\n\r\n!ELSEIF  \"$(CFG)\" == \"static_library - Win32 Debug\"\r\n\r\n# SUBTRACT CPP /YX\r\n\r\n!ENDIF \r\n\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\source\\portaudiocpp\\Stream.cxx\r\n\r\n!IF  \"$(CFG)\" == \"static_library - Win32 Release\"\r\n\r\n!ELSEIF  \"$(CFG)\" == \"static_library - Win32 Debug\"\r\n\r\n# SUBTRACT CPP /YX\r\n\r\n!ENDIF \r\n\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\source\\portaudiocpp\\StreamParameters.cxx\r\n\r\n!IF  \"$(CFG)\" == \"static_library - Win32 Release\"\r\n\r\n!ELSEIF  \"$(CFG)\" == \"static_library - Win32 Debug\"\r\n\r\n# SUBTRACT CPP /YX\r\n\r\n!ENDIF \r\n\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\source\\portaudiocpp\\System.cxx\r\n\r\n!IF  \"$(CFG)\" == \"static_library - Win32 Release\"\r\n\r\n!ELSEIF  \"$(CFG)\" == \"static_library - Win32 Debug\"\r\n\r\n# SUBTRACT CPP /YX\r\n\r\n!ENDIF \r\n\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\source\\portaudiocpp\\SystemDeviceIterator.cxx\r\n\r\n!IF  \"$(CFG)\" == \"static_library - Win32 Release\"\r\n\r\n!ELSEIF  \"$(CFG)\" == \"static_library - Win32 Debug\"\r\n\r\n# SUBTRACT CPP /YX\r\n\r\n!ENDIF \r\n\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\source\\portaudiocpp\\SystemHostApiIterator.cxx\r\n\r\n!IF  \"$(CFG)\" == \"static_library - Win32 Release\"\r\n\r\n!ELSEIF  \"$(CFG)\" == \"static_library - Win32 Debug\"\r\n\r\n# SUBTRACT CPP /YX\r\n\r\n!ENDIF \r\n\r\n# End Source File\r\n# End Group\r\n# Begin Group \"Header Files\"\r\n\r\n# PROP Default_Filter \"h;hpp;hxx;hm;inl\"\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\include\\portaudiocpp\\AsioDeviceAdapter.hxx\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\include\\portaudiocpp\\AutoSystem.hxx\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\include\\portaudiocpp\\BlockingStream.hxx\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\include\\portaudiocpp\\CallbackInterface.hxx\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\include\\portaudiocpp\\CallbackStream.hxx\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\include\\portaudiocpp\\CFunCallbackStream.hxx\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\include\\portaudiocpp\\CppFunCallbackStream.hxx\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\include\\portaudiocpp\\Device.hxx\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\include\\portaudiocpp\\DirectionSpecificStreamParameters.hxx\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\include\\portaudiocpp\\Exception.hxx\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\include\\portaudiocpp\\HostApi.hxx\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\include\\portaudiocpp\\InterfaceCallbackStream.hxx\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\include\\portaudiocpp\\MemFunCallbackStream.hxx\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\include\\portaudiocpp\\PortAudioCpp.hxx\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\include\\portaudiocpp\\SampleDataFormat.hxx\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\include\\portaudiocpp\\Stream.hxx\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\include\\portaudiocpp\\StreamParameters.hxx\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\include\\portaudiocpp\\System.hxx\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\include\\portaudiocpp\\SystemDeviceIterator.hxx\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\include\\portaudiocpp\\SystemHostApiIterator.hxx\r\n# End Source File\r\n# End Group\r\n# End Target\r\n# End Project\r\n"
  },
  {
    "path": "thirdparty/portaudio/bindings/cpp/build/vc6/static_library.dsw",
    "content": "Microsoft Developer Studio Workspace File, Format Version 6.00\r\n# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!\r\n\r\n###############################################################################\r\n\r\nProject: \"static_library\"=\".\\static_library.dsp\" - Package Owner=<4>\r\n\r\nPackage=<5>\r\n{{{\r\n}}}\r\n\r\nPackage=<4>\r\n{{{\r\n}}}\r\n\r\n###############################################################################\r\n\r\nGlobal:\r\n\r\nPackage=<5>\r\n{{{\r\n}}}\r\n\r\nPackage=<3>\r\n{{{\r\n}}}\r\n\r\n###############################################################################\r\n\r\n"
  },
  {
    "path": "thirdparty/portaudio/bindings/cpp/build/vc7/OUT_OF_DATE",
    "content": ""
  },
  {
    "path": "thirdparty/portaudio/bindings/cpp/build/vc7_1/devs_example.sln",
    "content": "Microsoft Visual Studio Solution File, Format Version 8.00\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"devs_example\", \"devs_example.vcproj\", \"{1B9A038D-80A3-4DBD-9F0D-AF10B49B863A}\"\r\n\tProjectSection(ProjectDependencies) = postProject\r\n\t\t{D18EA0C9-8C65-441D-884C-55EB43A84F2A} = {D18EA0C9-8C65-441D-884C-55EB43A84F2A}\r\n\tEndProjectSection\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"static_library\", \"static_library.vcproj\", \"{D18EA0C9-8C65-441D-884C-55EB43A84F2A}\"\r\n\tProjectSection(ProjectDependencies) = postProject\r\n\tEndProjectSection\r\nEndProject\r\nGlobal\r\n\tGlobalSection(SolutionConfiguration) = preSolution\r\n\t\tDebug = Debug\r\n\t\tRelease = Release\r\n\tEndGlobalSection\r\n\tGlobalSection(ProjectConfiguration) = postSolution\r\n\t\t{1B9A038D-80A3-4DBD-9F0D-AF10B49B863A}.Debug.ActiveCfg = Debug|Win32\r\n\t\t{1B9A038D-80A3-4DBD-9F0D-AF10B49B863A}.Debug.Build.0 = Debug|Win32\r\n\t\t{1B9A038D-80A3-4DBD-9F0D-AF10B49B863A}.Release.ActiveCfg = Release|Win32\r\n\t\t{1B9A038D-80A3-4DBD-9F0D-AF10B49B863A}.Release.Build.0 = Release|Win32\r\n\t\t{D18EA0C9-8C65-441D-884C-55EB43A84F2A}.Debug.ActiveCfg = Debug|Win32\r\n\t\t{D18EA0C9-8C65-441D-884C-55EB43A84F2A}.Debug.Build.0 = Debug|Win32\r\n\t\t{D18EA0C9-8C65-441D-884C-55EB43A84F2A}.Release.ActiveCfg = Release|Win32\r\n\t\t{D18EA0C9-8C65-441D-884C-55EB43A84F2A}.Release.Build.0 = Release|Win32\r\n\tEndGlobalSection\r\n\tGlobalSection(ExtensibilityGlobals) = postSolution\r\n\tEndGlobalSection\r\n\tGlobalSection(ExtensibilityAddIns) = postSolution\r\n\tEndGlobalSection\r\nEndGlobal\r\n"
  },
  {
    "path": "thirdparty/portaudio/bindings/cpp/build/vc7_1/devs_example.vcproj",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\r\n<VisualStudioProject\r\n\tProjectType=\"Visual C++\"\r\n\tVersion=\"7.10\"\r\n\tName=\"devs_example\"\r\n\tProjectGUID=\"{1B9A038D-80A3-4DBD-9F0D-AF10B49B863A}\"\r\n\tKeyword=\"Win32Proj\">\r\n\t<Platforms>\r\n\t\t<Platform\r\n\t\t\tName=\"Win32\"/>\r\n\t</Platforms>\r\n\t<Configurations>\r\n\t\t<Configuration\r\n\t\t\tName=\"Debug|Win32\"\r\n\t\t\tOutputDirectory=\"Debug\"\r\n\t\t\tIntermediateDirectory=\"Debug\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"2\">\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tOptimization=\"0\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"../../include/;../../../../include/;../../../../src/common/;../../../../../asiosdk2/common/,../../../../../asiosdk2/host/,../../../../../asiosdk2/host/pc/\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;_DEBUG;_CONSOLE\"\r\n\t\t\t\tMinimalRebuild=\"TRUE\"\r\n\t\t\t\tBasicRuntimeChecks=\"3\"\r\n\t\t\t\tRuntimeLibrary=\"3\"\r\n\t\t\t\tUsePrecompiledHeader=\"0\"\r\n\t\t\t\tProgramDataBaseFileName=\"$(IntDir)/vc71.pdb\"\r\n\t\t\t\tWarningLevel=\"3\"\r\n\t\t\t\tDetect64BitPortabilityProblems=\"TRUE\"\r\n\t\t\t\tDebugInformationFormat=\"3\"/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tAdditionalDependencies=\"../../lib/portaudiocpp-vc7_1-d.lib\"\r\n\t\t\t\tOutputFile=\"../../bin/devs_example.exe\"\r\n\t\t\t\tLinkIncremental=\"2\"\r\n\t\t\t\tGenerateDebugInformation=\"TRUE\"\r\n\t\t\t\tProgramDatabaseFile=\"$(OutDir)/devs_example.pdb\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tTargetMachine=\"1\"/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebDeploymentTool\"/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedWrapperGeneratorTool\"/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAuxiliaryManagedWrapperGeneratorTool\"/>\r\n\t\t</Configuration>\r\n\t\t<Configuration\r\n\t\t\tName=\"Release|Win32\"\r\n\t\t\tOutputDirectory=\"Release\"\r\n\t\t\tIntermediateDirectory=\"Release\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"2\">\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"../../include/;../../../../include/;../../../../src/common/;../../../../../asiosdk2/common/,../../../../../asiosdk2/host/,../../../../../asiosdk2/host/pc/\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE\"\r\n\t\t\t\tRuntimeLibrary=\"2\"\r\n\t\t\t\tUsePrecompiledHeader=\"0\"\r\n\t\t\t\tProgramDataBaseFileName=\"$(IntDir)/vc71.pdb\"\r\n\t\t\t\tWarningLevel=\"3\"\r\n\t\t\t\tDetect64BitPortabilityProblems=\"TRUE\"\r\n\t\t\t\tDebugInformationFormat=\"3\"/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tAdditionalDependencies=\"../../lib/portaudiocpp-vc7_1-r.lib\"\r\n\t\t\t\tOutputFile=\"../../bin/devs_example.exe\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tGenerateDebugInformation=\"TRUE\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tTargetMachine=\"1\"/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebDeploymentTool\"/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedWrapperGeneratorTool\"/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAuxiliaryManagedWrapperGeneratorTool\"/>\r\n\t\t</Configuration>\r\n\t</Configurations>\r\n\t<References>\r\n\t</References>\r\n\t<Files>\r\n\t\t<Filter\r\n\t\t\tName=\"Files\"\r\n\t\t\tFilter=\"\">\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\example\\devs.cxx\">\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"PortAudio v19 Files\"\r\n\t\t\tFilter=\"\">\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\..\\..\\src\\common\\pa_allocation.c\">\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\..\\..\\src\\hostapi\\asio\\pa_asio.cpp\">\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\..\\..\\src\\common\\pa_converters.c\">\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\..\\..\\src\\common\\pa_cpuload.c\">\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\..\\..\\src\\common\\pa_dither.c\">\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\..\\..\\src\\common\\pa_front.c\">\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\..\\..\\src\\common\\pa_process.c\">\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\..\\..\\src\\hostapi\\skeleton\\pa_hostapi_skeleton.c\">\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\..\\..\\src\\common\\pa_stream.c\">\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\..\\..\\src\\common\\pa_trace.c\">\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\..\\..\\src\\hostapi\\dsound\\pa_win_ds.c\">\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\..\\..\\src\\hostapi\\dsound\\pa_win_ds_dynlink.c\">\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\..\\..\\src\\os\\win\\pa_win_hostapis.c\">\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\..\\..\\src\\os\\win\\pa_win_util.c\">\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\..\\..\\src\\hostapi\\wasapi\\pa_win_wasapi.cpp\">\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\..\\..\\src\\hostapi\\wmme\\pa_win_wmme.c\">\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\..\\..\\src\\os\\win\\pa_x86_plain_converters.c\">\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"ASIO 2 SDK Files\"\r\n\t\t\tFilter=\"\">\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\..\\..\\..\\asiosdk2\\common\\asio.cpp\">\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\..\\..\\..\\asiosdk2\\host\\asiodrivers.cpp\">\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\..\\..\\..\\asiosdk2\\host\\pc\\asiolist.cpp\">\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t</Files>\r\n\t<Globals>\r\n\t</Globals>\r\n</VisualStudioProject>\r\n"
  },
  {
    "path": "thirdparty/portaudio/bindings/cpp/build/vc7_1/sine_example.sln",
    "content": "Microsoft Visual Studio Solution File, Format Version 8.00\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"sine_example\", \"sine_example.vcproj\", \"{1B9A038D-80A3-4DBD-9F0D-AF10B49B863A}\"\r\n\tProjectSection(ProjectDependencies) = postProject\r\n\t\t{D18EA0C9-8C65-441D-884C-55EB43A84F2A} = {D18EA0C9-8C65-441D-884C-55EB43A84F2A}\r\n\tEndProjectSection\r\nEndProject\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"static_library\", \"static_library.vcproj\", \"{D18EA0C9-8C65-441D-884C-55EB43A84F2A}\"\r\n\tProjectSection(ProjectDependencies) = postProject\r\n\tEndProjectSection\r\nEndProject\r\nGlobal\r\n\tGlobalSection(SolutionConfiguration) = preSolution\r\n\t\tDebug = Debug\r\n\t\tRelease = Release\r\n\tEndGlobalSection\r\n\tGlobalSection(ProjectConfiguration) = postSolution\r\n\t\t{1B9A038D-80A3-4DBD-9F0D-AF10B49B863A}.Debug.ActiveCfg = Debug|Win32\r\n\t\t{1B9A038D-80A3-4DBD-9F0D-AF10B49B863A}.Debug.Build.0 = Debug|Win32\r\n\t\t{1B9A038D-80A3-4DBD-9F0D-AF10B49B863A}.Release.ActiveCfg = Release|Win32\r\n\t\t{1B9A038D-80A3-4DBD-9F0D-AF10B49B863A}.Release.Build.0 = Release|Win32\r\n\t\t{D18EA0C9-8C65-441D-884C-55EB43A84F2A}.Debug.ActiveCfg = Debug|Win32\r\n\t\t{D18EA0C9-8C65-441D-884C-55EB43A84F2A}.Debug.Build.0 = Debug|Win32\r\n\t\t{D18EA0C9-8C65-441D-884C-55EB43A84F2A}.Release.ActiveCfg = Release|Win32\r\n\t\t{D18EA0C9-8C65-441D-884C-55EB43A84F2A}.Release.Build.0 = Release|Win32\r\n\tEndGlobalSection\r\n\tGlobalSection(ExtensibilityGlobals) = postSolution\r\n\tEndGlobalSection\r\n\tGlobalSection(ExtensibilityAddIns) = postSolution\r\n\tEndGlobalSection\r\nEndGlobal\r\n"
  },
  {
    "path": "thirdparty/portaudio/bindings/cpp/build/vc7_1/sine_example.vcproj",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\r\n<VisualStudioProject\r\n\tProjectType=\"Visual C++\"\r\n\tVersion=\"7.10\"\r\n\tName=\"sine_example\"\r\n\tProjectGUID=\"{1B9A038D-80A3-4DBD-9F0D-AF10B49B863A}\"\r\n\tKeyword=\"Win32Proj\">\r\n\t<Platforms>\r\n\t\t<Platform\r\n\t\t\tName=\"Win32\"/>\r\n\t</Platforms>\r\n\t<Configurations>\r\n\t\t<Configuration\r\n\t\t\tName=\"Debug|Win32\"\r\n\t\t\tOutputDirectory=\"Debug\"\r\n\t\t\tIntermediateDirectory=\"Debug\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"2\">\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tOptimization=\"0\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"../../include/;../../../../include/;../../../../src/common/;../../../../../asiosdk2/common/,../../../../../asiosdk2/host/,../../../../../asiosdk2/host/pc/\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;_DEBUG;_CONSOLE\"\r\n\t\t\t\tMinimalRebuild=\"TRUE\"\r\n\t\t\t\tBasicRuntimeChecks=\"3\"\r\n\t\t\t\tRuntimeLibrary=\"3\"\r\n\t\t\t\tUsePrecompiledHeader=\"0\"\r\n\t\t\t\tProgramDataBaseFileName=\"$(IntDir)/vc71.pdb\"\r\n\t\t\t\tWarningLevel=\"3\"\r\n\t\t\t\tDetect64BitPortabilityProblems=\"TRUE\"\r\n\t\t\t\tDebugInformationFormat=\"3\"/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tAdditionalDependencies=\"../../lib/portaudiocpp-vc7_1-d.lib\"\r\n\t\t\t\tOutputFile=\"../../bin/sine_example.exe\"\r\n\t\t\t\tLinkIncremental=\"2\"\r\n\t\t\t\tGenerateDebugInformation=\"TRUE\"\r\n\t\t\t\tProgramDatabaseFile=\"$(OutDir)/sine_example.pdb\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tTargetMachine=\"1\"/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebDeploymentTool\"/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedWrapperGeneratorTool\"/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAuxiliaryManagedWrapperGeneratorTool\"/>\r\n\t\t</Configuration>\r\n\t\t<Configuration\r\n\t\t\tName=\"Release|Win32\"\r\n\t\t\tOutputDirectory=\"Release\"\r\n\t\t\tIntermediateDirectory=\"Release\"\r\n\t\t\tConfigurationType=\"1\"\r\n\t\t\tCharacterSet=\"2\">\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"../../include/;../../../../include/;../../../../src/common/;../../../../../asiosdk2/common/,../../../../../asiosdk2/host/,../../../../../asiosdk2/host/pc/\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_CONSOLE\"\r\n\t\t\t\tRuntimeLibrary=\"2\"\r\n\t\t\t\tUsePrecompiledHeader=\"0\"\r\n\t\t\t\tProgramDataBaseFileName=\"$(IntDir)/vc71.pdb\"\r\n\t\t\t\tWarningLevel=\"3\"\r\n\t\t\t\tDetect64BitPortabilityProblems=\"TRUE\"\r\n\t\t\t\tDebugInformationFormat=\"3\"/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tAdditionalDependencies=\"../../lib/portaudiocpp-vc7_1-r.lib\"\r\n\t\t\t\tOutputFile=\"../../bin/sine_example.exe\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tGenerateDebugInformation=\"TRUE\"\r\n\t\t\t\tSubSystem=\"1\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tTargetMachine=\"1\"/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebDeploymentTool\"/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedWrapperGeneratorTool\"/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAuxiliaryManagedWrapperGeneratorTool\"/>\r\n\t\t</Configuration>\r\n\t</Configurations>\r\n\t<References>\r\n\t</References>\r\n\t<Files>\r\n\t\t<Filter\r\n\t\t\tName=\"Files\"\r\n\t\t\tFilter=\"\">\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\example\\sine.cxx\">\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"PortAudio v19 Files\"\r\n\t\t\tFilter=\"\">\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\..\\..\\src\\common\\pa_allocation.c\">\r\n\t\t\t\t<FileConfiguration\r\n\t\t\t\t\tName=\"Debug|Win32\">\r\n\t\t\t\t\t<Tool\r\n\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\tObjectFile=\"$(IntDir)/$(InputName)1.obj\"/>\r\n\t\t\t\t</FileConfiguration>\r\n\t\t\t\t<FileConfiguration\r\n\t\t\t\t\tName=\"Release|Win32\">\r\n\t\t\t\t\t<Tool\r\n\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\tObjectFile=\"$(IntDir)/$(InputName)1.obj\"/>\r\n\t\t\t\t</FileConfiguration>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\..\\..\\src\\hostapi\\asio\\pa_asio.cpp\">\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\..\\..\\src\\common\\pa_converters.c\">\r\n\t\t\t\t<FileConfiguration\r\n\t\t\t\t\tName=\"Debug|Win32\">\r\n\t\t\t\t\t<Tool\r\n\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\tObjectFile=\"$(IntDir)/$(InputName)1.obj\"/>\r\n\t\t\t\t</FileConfiguration>\r\n\t\t\t\t<FileConfiguration\r\n\t\t\t\t\tName=\"Release|Win32\">\r\n\t\t\t\t\t<Tool\r\n\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\tObjectFile=\"$(IntDir)/$(InputName)1.obj\"/>\r\n\t\t\t\t</FileConfiguration>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\..\\..\\src\\common\\pa_cpuload.c\">\r\n\t\t\t\t<FileConfiguration\r\n\t\t\t\t\tName=\"Debug|Win32\">\r\n\t\t\t\t\t<Tool\r\n\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\tObjectFile=\"$(IntDir)/$(InputName)1.obj\"/>\r\n\t\t\t\t</FileConfiguration>\r\n\t\t\t\t<FileConfiguration\r\n\t\t\t\t\tName=\"Release|Win32\">\r\n\t\t\t\t\t<Tool\r\n\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\tObjectFile=\"$(IntDir)/$(InputName)1.obj\"/>\r\n\t\t\t\t</FileConfiguration>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\..\\..\\src\\common\\pa_dither.c\">\r\n\t\t\t\t<FileConfiguration\r\n\t\t\t\t\tName=\"Debug|Win32\">\r\n\t\t\t\t\t<Tool\r\n\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\tObjectFile=\"$(IntDir)/$(InputName)1.obj\"/>\r\n\t\t\t\t</FileConfiguration>\r\n\t\t\t\t<FileConfiguration\r\n\t\t\t\t\tName=\"Release|Win32\">\r\n\t\t\t\t\t<Tool\r\n\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\tObjectFile=\"$(IntDir)/$(InputName)1.obj\"/>\r\n\t\t\t\t</FileConfiguration>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\..\\..\\src\\common\\pa_front.c\">\r\n\t\t\t\t<FileConfiguration\r\n\t\t\t\t\tName=\"Debug|Win32\">\r\n\t\t\t\t\t<Tool\r\n\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\tObjectFile=\"$(IntDir)/$(InputName)1.obj\"/>\r\n\t\t\t\t</FileConfiguration>\r\n\t\t\t\t<FileConfiguration\r\n\t\t\t\t\tName=\"Release|Win32\">\r\n\t\t\t\t\t<Tool\r\n\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\tObjectFile=\"$(IntDir)/$(InputName)1.obj\"/>\r\n\t\t\t\t</FileConfiguration>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\..\\..\\src\\common\\pa_process.c\">\r\n\t\t\t\t<FileConfiguration\r\n\t\t\t\t\tName=\"Debug|Win32\">\r\n\t\t\t\t\t<Tool\r\n\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\tObjectFile=\"$(IntDir)/$(InputName)1.obj\"/>\r\n\t\t\t\t</FileConfiguration>\r\n\t\t\t\t<FileConfiguration\r\n\t\t\t\t\tName=\"Release|Win32\">\r\n\t\t\t\t\t<Tool\r\n\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\tObjectFile=\"$(IntDir)/$(InputName)1.obj\"/>\r\n\t\t\t\t</FileConfiguration>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\..\\..\\src\\hostapi\\skeleton\\pa_hostapi_skeleton.c\">\r\n\t\t\t\t<FileConfiguration\r\n\t\t\t\t\tName=\"Debug|Win32\">\r\n\t\t\t\t\t<Tool\r\n\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\tObjectFile=\"$(IntDir)/$(InputName)1.obj\"/>\r\n\t\t\t\t</FileConfiguration>\r\n\t\t\t\t<FileConfiguration\r\n\t\t\t\t\tName=\"Release|Win32\">\r\n\t\t\t\t\t<Tool\r\n\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\tObjectFile=\"$(IntDir)/$(InputName)1.obj\"/>\r\n\t\t\t\t</FileConfiguration>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\..\\..\\src\\common\\pa_stream.c\">\r\n\t\t\t\t<FileConfiguration\r\n\t\t\t\t\tName=\"Debug|Win32\">\r\n\t\t\t\t\t<Tool\r\n\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\tObjectFile=\"$(IntDir)/$(InputName)1.obj\"/>\r\n\t\t\t\t</FileConfiguration>\r\n\t\t\t\t<FileConfiguration\r\n\t\t\t\t\tName=\"Release|Win32\">\r\n\t\t\t\t\t<Tool\r\n\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\tObjectFile=\"$(IntDir)/$(InputName)1.obj\"/>\r\n\t\t\t\t</FileConfiguration>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\..\\..\\src\\common\\pa_trace.c\">\r\n\t\t\t\t<FileConfiguration\r\n\t\t\t\t\tName=\"Debug|Win32\">\r\n\t\t\t\t\t<Tool\r\n\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\tObjectFile=\"$(IntDir)/$(InputName)1.obj\"/>\r\n\t\t\t\t</FileConfiguration>\r\n\t\t\t\t<FileConfiguration\r\n\t\t\t\t\tName=\"Release|Win32\">\r\n\t\t\t\t\t<Tool\r\n\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\tObjectFile=\"$(IntDir)/$(InputName)1.obj\"/>\r\n\t\t\t\t</FileConfiguration>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\..\\..\\src\\hostapi\\dsound\\pa_win_ds.c\">\r\n\t\t\t\t<FileConfiguration\r\n\t\t\t\t\tName=\"Debug|Win32\">\r\n\t\t\t\t\t<Tool\r\n\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\tObjectFile=\"$(IntDir)/$(InputName)1.obj\"/>\r\n\t\t\t\t</FileConfiguration>\r\n\t\t\t\t<FileConfiguration\r\n\t\t\t\t\tName=\"Release|Win32\">\r\n\t\t\t\t\t<Tool\r\n\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\tObjectFile=\"$(IntDir)/$(InputName)1.obj\"/>\r\n\t\t\t\t</FileConfiguration>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\..\\..\\src\\hostapi\\dsound\\pa_win_ds_dynlink.c\">\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\..\\..\\src\\os\\win\\pa_win_hostapis.c\">\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\..\\..\\src\\os\\win\\pa_win_util.c\">\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\..\\..\\src\\hostapi\\wasapi\\pa_win_wasapi.cpp\">\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\..\\..\\src\\hostapi\\wmme\\pa_win_wmme.c\">\r\n\t\t\t\t<FileConfiguration\r\n\t\t\t\t\tName=\"Debug|Win32\">\r\n\t\t\t\t\t<Tool\r\n\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\tObjectFile=\"$(IntDir)/$(InputName)1.obj\"/>\r\n\t\t\t\t</FileConfiguration>\r\n\t\t\t\t<FileConfiguration\r\n\t\t\t\t\tName=\"Release|Win32\">\r\n\t\t\t\t\t<Tool\r\n\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\tObjectFile=\"$(IntDir)/$(InputName)1.obj\"/>\r\n\t\t\t\t</FileConfiguration>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\..\\..\\src\\os\\win\\pa_x86_plain_converters.c\">\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"ASIO 2 SDK Files\"\r\n\t\t\tFilter=\"\">\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\..\\..\\..\\asiosdk2\\common\\asio.cpp\">\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\..\\..\\..\\asiosdk2\\host\\asiodrivers.cpp\">\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\..\\..\\..\\asiosdk2\\host\\pc\\asiolist.cpp\">\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t</Files>\r\n\t<Globals>\r\n\t</Globals>\r\n</VisualStudioProject>\r\n"
  },
  {
    "path": "thirdparty/portaudio/bindings/cpp/build/vc7_1/static_library.sln",
    "content": "Microsoft Visual Studio Solution File, Format Version 8.00\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"static_library\", \"static_library.vcproj\", \"{D18EA0C9-8C65-441D-884C-55EB43A84F2A}\"\r\n\tProjectSection(ProjectDependencies) = postProject\r\n\tEndProjectSection\r\nEndProject\r\nGlobal\r\n\tGlobalSection(SolutionConfiguration) = preSolution\r\n\t\tDebug = Debug\r\n\t\tRelease = Release\r\n\tEndGlobalSection\r\n\tGlobalSection(ProjectConfiguration) = postSolution\r\n\t\t{D18EA0C9-8C65-441D-884C-55EB43A84F2A}.Debug.ActiveCfg = Debug|Win32\r\n\t\t{D18EA0C9-8C65-441D-884C-55EB43A84F2A}.Debug.Build.0 = Debug|Win32\r\n\t\t{D18EA0C9-8C65-441D-884C-55EB43A84F2A}.Release.ActiveCfg = Release|Win32\r\n\t\t{D18EA0C9-8C65-441D-884C-55EB43A84F2A}.Release.Build.0 = Release|Win32\r\n\tEndGlobalSection\r\n\tGlobalSection(ExtensibilityGlobals) = postSolution\r\n\tEndGlobalSection\r\n\tGlobalSection(ExtensibilityAddIns) = postSolution\r\n\tEndGlobalSection\r\nEndGlobal\r\n"
  },
  {
    "path": "thirdparty/portaudio/bindings/cpp/build/vc7_1/static_library.vcproj",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\r\n<VisualStudioProject\r\n\tProjectType=\"Visual C++\"\r\n\tVersion=\"7.10\"\r\n\tName=\"static_library\"\r\n\tProjectGUID=\"{D18EA0C9-8C65-441D-884C-55EB43A84F2A}\"\r\n\tKeyword=\"Win32Proj\">\r\n\t<Platforms>\r\n\t\t<Platform\r\n\t\t\tName=\"Win32\"/>\r\n\t</Platforms>\r\n\t<Configurations>\r\n\t\t<Configuration\r\n\t\t\tName=\"Debug|Win32\"\r\n\t\t\tOutputDirectory=\"../../lib/\"\r\n\t\t\tIntermediateDirectory=\"Debug\"\r\n\t\t\tConfigurationType=\"4\"\r\n\t\t\tCharacterSet=\"2\">\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tOptimization=\"0\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"../../include/;../../../../include/\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;_DEBUG;_LIB\"\r\n\t\t\t\tMinimalRebuild=\"TRUE\"\r\n\t\t\t\tBasicRuntimeChecks=\"3\"\r\n\t\t\t\tRuntimeLibrary=\"3\"\r\n\t\t\t\tUsePrecompiledHeader=\"0\"\r\n\t\t\t\tProgramDataBaseFileName=\"$(IntDir)/vc71.pdb\"\r\n\t\t\t\tWarningLevel=\"3\"\r\n\t\t\t\tDetect64BitPortabilityProblems=\"TRUE\"\r\n\t\t\t\tDebugInformationFormat=\"3\"/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLibrarianTool\"\r\n\t\t\t\tOutputFile=\"$(OutDir)/portaudiocpp-vc7_1-d.lib\"/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedWrapperGeneratorTool\"/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAuxiliaryManagedWrapperGeneratorTool\"/>\r\n\t\t</Configuration>\r\n\t\t<Configuration\r\n\t\t\tName=\"Release|Win32\"\r\n\t\t\tOutputDirectory=\"../../lib/\"\r\n\t\t\tIntermediateDirectory=\"Release\"\r\n\t\t\tConfigurationType=\"4\"\r\n\t\t\tCharacterSet=\"2\">\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"../../include/;../../../../include/\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_LIB\"\r\n\t\t\t\tRuntimeLibrary=\"2\"\r\n\t\t\t\tUsePrecompiledHeader=\"0\"\r\n\t\t\t\tProgramDataBaseFileName=\"$(IntDir)/vc71.pdb\"\r\n\t\t\t\tWarningLevel=\"3\"\r\n\t\t\t\tDetect64BitPortabilityProblems=\"TRUE\"\r\n\t\t\t\tDebugInformationFormat=\"3\"/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLibrarianTool\"\r\n\t\t\t\tOutputFile=\"$(OutDir)/portaudiocpp-vc7_1-r.lib\"/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedWrapperGeneratorTool\"/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAuxiliaryManagedWrapperGeneratorTool\"/>\r\n\t\t</Configuration>\r\n\t</Configurations>\r\n\t<References>\r\n\t</References>\r\n\t<Files>\r\n\t\t<Filter\r\n\t\t\tName=\"Files\"\r\n\t\t\tFilter=\"\">\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\source\\portaudiocpp\\AsioDeviceAdapter.cxx\">\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\include\\portaudiocpp\\AsioDeviceAdapter.hxx\">\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\include\\portaudiocpp\\AutoSystem.hxx\">\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\source\\portaudiocpp\\BlockingStream.cxx\">\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\include\\portaudiocpp\\BlockingStream.hxx\">\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\source\\portaudiocpp\\CallbackInterface.cxx\">\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\include\\portaudiocpp\\CallbackInterface.hxx\">\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\source\\portaudiocpp\\CallbackStream.cxx\">\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\include\\portaudiocpp\\CallbackStream.hxx\">\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\source\\portaudiocpp\\CFunCallbackStream.cxx\">\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\include\\portaudiocpp\\CFunCallbackStream.hxx\">\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\source\\portaudiocpp\\CppFunCallbackStream.cxx\">\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\include\\portaudiocpp\\CppFunCallbackStream.hxx\">\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\source\\portaudiocpp\\Device.cxx\">\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\include\\portaudiocpp\\Device.hxx\">\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\source\\portaudiocpp\\DirectionSpecificStreamParameters.cxx\">\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\include\\portaudiocpp\\DirectionSpecificStreamParameters.hxx\">\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\source\\portaudiocpp\\Exception.cxx\">\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\include\\portaudiocpp\\Exception.hxx\">\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\source\\portaudiocpp\\HostApi.cxx\">\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\include\\portaudiocpp\\HostApi.hxx\">\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\source\\portaudiocpp\\InterfaceCallbackStream.cxx\">\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\include\\portaudiocpp\\InterfaceCallbackStream.hxx\">\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\source\\portaudiocpp\\MemFunCallbackStream.cxx\">\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\include\\portaudiocpp\\MemFunCallbackStream.hxx\">\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\include\\portaudiocpp\\PortAudioCpp.hxx\">\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\include\\portaudiocpp\\SampleDataFormat.hxx\">\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\source\\portaudiocpp\\Stream.cxx\">\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\include\\portaudiocpp\\Stream.hxx\">\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\source\\portaudiocpp\\StreamParameters.cxx\">\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\include\\portaudiocpp\\StreamParameters.hxx\">\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\source\\portaudiocpp\\System.cxx\">\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\include\\portaudiocpp\\System.hxx\">\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\source\\portaudiocpp\\SystemDeviceIterator.cxx\">\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\include\\portaudiocpp\\SystemDeviceIterator.hxx\">\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\source\\portaudiocpp\\SystemHostApiIterator.cxx\">\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\include\\portaudiocpp\\SystemHostApiIterator.hxx\">\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t</Files>\r\n\t<Globals>\r\n\t</Globals>\r\n</VisualStudioProject>\r\n"
  },
  {
    "path": "thirdparty/portaudio/bindings/cpp/configure",
    "content": "#! /bin/sh\n# Guess values for system-dependent variables and create Makefiles.\n# Generated by GNU Autoconf 2.69 for PortAudioCpp 12.\n#\n#\n# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.\n#\n#\n# This configure script is free software; the Free Software Foundation\n# gives unlimited permission to copy, distribute and modify it.\n## -------------------- ##\n## M4sh Initialization. ##\n## -------------------- ##\n\n# Be more Bourne compatible\nDUALCASE=1; export DUALCASE # for MKS sh\nif test -n \"${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :\n  emulate sh\n  NULLCMD=:\n  # Pre-4.2 versions of Zsh do word splitting on ${1+\"$@\"}, which\n  # is contrary to our usage.  Disable this feature.\n  alias -g '${1+\"$@\"}'='\"$@\"'\n  setopt NO_GLOB_SUBST\nelse\n  case `(set -o) 2>/dev/null` in #(\n  *posix*) :\n    set -o posix ;; #(\n  *) :\n     ;;\nesac\nfi\n\n\nas_nl='\n'\nexport as_nl\n# Printing a long string crashes Solaris 7 /usr/bin/printf.\nas_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'\nas_echo=$as_echo$as_echo$as_echo$as_echo$as_echo\nas_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo\n# Prefer a ksh shell builtin over an external printf program on Solaris,\n# but without wasting forks for bash or zsh.\nif test -z \"$BASH_VERSION$ZSH_VERSION\" \\\n    && (test \"X`print -r -- $as_echo`\" = \"X$as_echo\") 2>/dev/null; then\n  as_echo='print -r --'\n  as_echo_n='print -rn --'\nelif (test \"X`printf %s $as_echo`\" = \"X$as_echo\") 2>/dev/null; then\n  as_echo='printf %s\\n'\n  as_echo_n='printf %s'\nelse\n  if test \"X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`\" = \"X-n $as_echo\"; then\n    as_echo_body='eval /usr/ucb/echo -n \"$1$as_nl\"'\n    as_echo_n='/usr/ucb/echo -n'\n  else\n    as_echo_body='eval expr \"X$1\" : \"X\\\\(.*\\\\)\"'\n    as_echo_n_body='eval\n      arg=$1;\n      case $arg in #(\n      *\"$as_nl\"*)\n\texpr \"X$arg\" : \"X\\\\(.*\\\\)$as_nl\";\n\targ=`expr \"X$arg\" : \".*$as_nl\\\\(.*\\\\)\"`;;\n      esac;\n      expr \"X$arg\" : \"X\\\\(.*\\\\)\" | tr -d \"$as_nl\"\n    '\n    export as_echo_n_body\n    as_echo_n='sh -c $as_echo_n_body as_echo'\n  fi\n  export as_echo_body\n  as_echo='sh -c $as_echo_body as_echo'\nfi\n\n# The user is always right.\nif test \"${PATH_SEPARATOR+set}\" != set; then\n  PATH_SEPARATOR=:\n  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {\n    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||\n      PATH_SEPARATOR=';'\n  }\nfi\n\n\n# IFS\n# We need space, tab and new line, in precisely that order.  Quoting is\n# there to prevent editors from complaining about space-tab.\n# (If _AS_PATH_WALK were called with IFS unset, it would disable word\n# splitting by setting IFS to empty value.)\nIFS=\" \"\"\t$as_nl\"\n\n# Find who we are.  Look in the path if we contain no directory separator.\nas_myself=\ncase $0 in #((\n  *[\\\\/]* ) as_myself=$0 ;;\n  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    test -r \"$as_dir/$0\" && as_myself=$as_dir/$0 && break\n  done\nIFS=$as_save_IFS\n\n     ;;\nesac\n# We did not find ourselves, most probably we were run as `sh COMMAND'\n# in which case we are not to be found in the path.\nif test \"x$as_myself\" = x; then\n  as_myself=$0\nfi\nif test ! -f \"$as_myself\"; then\n  $as_echo \"$as_myself: error: cannot find myself; rerun with an absolute file name\" >&2\n  exit 1\nfi\n\n# Unset variables that we do not need and which cause bugs (e.g. in\n# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the \"|| exit 1\"\n# suppresses any \"Segmentation fault\" message there.  '((' could\n# trigger a bug in pdksh 5.2.14.\nfor as_var in BASH_ENV ENV MAIL MAILPATH\ndo eval test x\\${$as_var+set} = xset \\\n  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :\ndone\nPS1='$ '\nPS2='> '\nPS4='+ '\n\n# NLS nuisances.\nLC_ALL=C\nexport LC_ALL\nLANGUAGE=C\nexport LANGUAGE\n\n# CDPATH.\n(unset CDPATH) >/dev/null 2>&1 && unset CDPATH\n\n# Use a proper internal environment variable to ensure we don't fall\n  # into an infinite loop, continuously re-executing ourselves.\n  if test x\"${_as_can_reexec}\" != xno && test \"x$CONFIG_SHELL\" != x; then\n    _as_can_reexec=no; export _as_can_reexec;\n    # We cannot yet assume a decent shell, so we have to provide a\n# neutralization value for shells without unset; and this also\n# works around shells that cannot unset nonexistent variables.\n# Preserve -v and -x to the replacement shell.\nBASH_ENV=/dev/null\nENV=/dev/null\n(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV\ncase $- in # ((((\n  *v*x* | *x*v* ) as_opts=-vx ;;\n  *v* ) as_opts=-v ;;\n  *x* ) as_opts=-x ;;\n  * ) as_opts= ;;\nesac\nexec $CONFIG_SHELL $as_opts \"$as_myself\" ${1+\"$@\"}\n# Admittedly, this is quite paranoid, since all the known shells bail\n# out after a failed `exec'.\n$as_echo \"$0: could not re-execute with $CONFIG_SHELL\" >&2\nas_fn_exit 255\n  fi\n  # We don't want this to propagate to other subprocesses.\n          { _as_can_reexec=; unset _as_can_reexec;}\nif test \"x$CONFIG_SHELL\" = x; then\n  as_bourne_compatible=\"if test -n \\\"\\${ZSH_VERSION+set}\\\" && (emulate sh) >/dev/null 2>&1; then :\n  emulate sh\n  NULLCMD=:\n  # Pre-4.2 versions of Zsh do word splitting on \\${1+\\\"\\$@\\\"}, which\n  # is contrary to our usage.  Disable this feature.\n  alias -g '\\${1+\\\"\\$@\\\"}'='\\\"\\$@\\\"'\n  setopt NO_GLOB_SUBST\nelse\n  case \\`(set -o) 2>/dev/null\\` in #(\n  *posix*) :\n    set -o posix ;; #(\n  *) :\n     ;;\nesac\nfi\n\"\n  as_required=\"as_fn_return () { (exit \\$1); }\nas_fn_success () { as_fn_return 0; }\nas_fn_failure () { as_fn_return 1; }\nas_fn_ret_success () { return 0; }\nas_fn_ret_failure () { return 1; }\n\nexitcode=0\nas_fn_success || { exitcode=1; echo as_fn_success failed.; }\nas_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }\nas_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }\nas_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }\nif ( set x; as_fn_ret_success y && test x = \\\"\\$1\\\" ); then :\n\nelse\n  exitcode=1; echo positional parameters were not saved.\nfi\ntest x\\$exitcode = x0 || exit 1\ntest -x / || exit 1\"\n  as_suggested=\"  as_lineno_1=\";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested\" as_lineno_1a=\\$LINENO\n  as_lineno_2=\";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested\" as_lineno_2a=\\$LINENO\n  eval 'test \\\"x\\$as_lineno_1'\\$as_run'\\\" != \\\"x\\$as_lineno_2'\\$as_run'\\\" &&\n  test \\\"x\\`expr \\$as_lineno_1'\\$as_run' + 1\\`\\\" = \\\"x\\$as_lineno_2'\\$as_run'\\\"' || exit 1\n\n  test -n \\\"\\${ZSH_VERSION+set}\\${BASH_VERSION+set}\\\" || (\n    ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'\n    ECHO=\\$ECHO\\$ECHO\\$ECHO\\$ECHO\\$ECHO\n    ECHO=\\$ECHO\\$ECHO\\$ECHO\\$ECHO\\$ECHO\\$ECHO\n    PATH=/empty FPATH=/empty; export PATH FPATH\n    test \\\"X\\`printf %s \\$ECHO\\`\\\" = \\\"X\\$ECHO\\\" \\\\\n      || test \\\"X\\`print -r -- \\$ECHO\\`\\\" = \\\"X\\$ECHO\\\" ) || exit 1\ntest \\$(( 1 + 1 )) = 2 || exit 1\"\n  if (eval \"$as_required\") 2>/dev/null; then :\n  as_have_required=yes\nelse\n  as_have_required=no\nfi\n  if test x$as_have_required = xyes && (eval \"$as_suggested\") 2>/dev/null; then :\n\nelse\n  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nas_found=false\nfor as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n  as_found=:\n  case $as_dir in #(\n\t /*)\n\t   for as_base in sh bash ksh sh5; do\n\t     # Try only shells that exist, to save several forks.\n\t     as_shell=$as_dir/$as_base\n\t     if { test -f \"$as_shell\" || test -f \"$as_shell.exe\"; } &&\n\t\t    { $as_echo \"$as_bourne_compatible\"\"$as_required\" | as_run=a \"$as_shell\"; } 2>/dev/null; then :\n  CONFIG_SHELL=$as_shell as_have_required=yes\n\t\t   if { $as_echo \"$as_bourne_compatible\"\"$as_suggested\" | as_run=a \"$as_shell\"; } 2>/dev/null; then :\n  break 2\nfi\nfi\n\t   done;;\n       esac\n  as_found=false\ndone\n$as_found || { if { test -f \"$SHELL\" || test -f \"$SHELL.exe\"; } &&\n\t      { $as_echo \"$as_bourne_compatible\"\"$as_required\" | as_run=a \"$SHELL\"; } 2>/dev/null; then :\n  CONFIG_SHELL=$SHELL as_have_required=yes\nfi; }\nIFS=$as_save_IFS\n\n\n      if test \"x$CONFIG_SHELL\" != x; then :\n  export CONFIG_SHELL\n             # We cannot yet assume a decent shell, so we have to provide a\n# neutralization value for shells without unset; and this also\n# works around shells that cannot unset nonexistent variables.\n# Preserve -v and -x to the replacement shell.\nBASH_ENV=/dev/null\nENV=/dev/null\n(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV\ncase $- in # ((((\n  *v*x* | *x*v* ) as_opts=-vx ;;\n  *v* ) as_opts=-v ;;\n  *x* ) as_opts=-x ;;\n  * ) as_opts= ;;\nesac\nexec $CONFIG_SHELL $as_opts \"$as_myself\" ${1+\"$@\"}\n# Admittedly, this is quite paranoid, since all the known shells bail\n# out after a failed `exec'.\n$as_echo \"$0: could not re-execute with $CONFIG_SHELL\" >&2\nexit 255\nfi\n\n    if test x$as_have_required = xno; then :\n  $as_echo \"$0: This script requires a shell more modern than all\"\n  $as_echo \"$0: the shells that I found on your system.\"\n  if test x${ZSH_VERSION+set} = xset ; then\n    $as_echo \"$0: In particular, zsh $ZSH_VERSION has bugs and should\"\n    $as_echo \"$0: be upgraded to zsh 4.3.4 or later.\"\n  else\n    $as_echo \"$0: Please tell bug-autoconf@gnu.org about your system,\n$0: including any error possibly output before this\n$0: message. Then install a modern shell, or manually run\n$0: the script under such a shell if you do have one.\"\n  fi\n  exit 1\nfi\nfi\nfi\nSHELL=${CONFIG_SHELL-/bin/sh}\nexport SHELL\n# Unset more variables known to interfere with behavior of common tools.\nCLICOLOR_FORCE= GREP_OPTIONS=\nunset CLICOLOR_FORCE GREP_OPTIONS\n\n## --------------------- ##\n## M4sh Shell Functions. ##\n## --------------------- ##\n# as_fn_unset VAR\n# ---------------\n# Portably unset VAR.\nas_fn_unset ()\n{\n  { eval $1=; unset $1;}\n}\nas_unset=as_fn_unset\n\n# as_fn_set_status STATUS\n# -----------------------\n# Set $? to STATUS, without forking.\nas_fn_set_status ()\n{\n  return $1\n} # as_fn_set_status\n\n# as_fn_exit STATUS\n# -----------------\n# Exit the shell with STATUS, even in a \"trap 0\" or \"set -e\" context.\nas_fn_exit ()\n{\n  set +e\n  as_fn_set_status $1\n  exit $1\n} # as_fn_exit\n\n# as_fn_mkdir_p\n# -------------\n# Create \"$as_dir\" as a directory, including parents if necessary.\nas_fn_mkdir_p ()\n{\n\n  case $as_dir in #(\n  -*) as_dir=./$as_dir;;\n  esac\n  test -d \"$as_dir\" || eval $as_mkdir_p || {\n    as_dirs=\n    while :; do\n      case $as_dir in #(\n      *\\'*) as_qdir=`$as_echo \"$as_dir\" | sed \"s/'/'\\\\\\\\\\\\\\\\''/g\"`;; #'(\n      *) as_qdir=$as_dir;;\n      esac\n      as_dirs=\"'$as_qdir' $as_dirs\"\n      as_dir=`$as_dirname -- \"$as_dir\" ||\n$as_expr X\"$as_dir\" : 'X\\(.*[^/]\\)//*[^/][^/]*/*$' \\| \\\n\t X\"$as_dir\" : 'X\\(//\\)[^/]' \\| \\\n\t X\"$as_dir\" : 'X\\(//\\)$' \\| \\\n\t X\"$as_dir\" : 'X\\(/\\)' \\| . 2>/dev/null ||\n$as_echo X\"$as_dir\" |\n    sed '/^X\\(.*[^/]\\)\\/\\/*[^/][^/]*\\/*$/{\n\t    s//\\1/\n\t    q\n\t  }\n\t  /^X\\(\\/\\/\\)[^/].*/{\n\t    s//\\1/\n\t    q\n\t  }\n\t  /^X\\(\\/\\/\\)$/{\n\t    s//\\1/\n\t    q\n\t  }\n\t  /^X\\(\\/\\).*/{\n\t    s//\\1/\n\t    q\n\t  }\n\t  s/.*/./; q'`\n      test -d \"$as_dir\" && break\n    done\n    test -z \"$as_dirs\" || eval \"mkdir $as_dirs\"\n  } || test -d \"$as_dir\" || as_fn_error $? \"cannot create directory $as_dir\"\n\n\n} # as_fn_mkdir_p\n\n# as_fn_executable_p FILE\n# -----------------------\n# Test if FILE is an executable regular file.\nas_fn_executable_p ()\n{\n  test -f \"$1\" && test -x \"$1\"\n} # as_fn_executable_p\n# as_fn_append VAR VALUE\n# ----------------------\n# Append the text in VALUE to the end of the definition contained in VAR. Take\n# advantage of any shell optimizations that allow amortized linear growth over\n# repeated appends, instead of the typical quadratic growth present in naive\n# implementations.\nif (eval \"as_var=1; as_var+=2; test x\\$as_var = x12\") 2>/dev/null; then :\n  eval 'as_fn_append ()\n  {\n    eval $1+=\\$2\n  }'\nelse\n  as_fn_append ()\n  {\n    eval $1=\\$$1\\$2\n  }\nfi # as_fn_append\n\n# as_fn_arith ARG...\n# ------------------\n# Perform arithmetic evaluation on the ARGs, and store the result in the\n# global $as_val. Take advantage of shells that can avoid forks. The arguments\n# must be portable across $(()) and expr.\nif (eval \"test \\$(( 1 + 1 )) = 2\") 2>/dev/null; then :\n  eval 'as_fn_arith ()\n  {\n    as_val=$(( $* ))\n  }'\nelse\n  as_fn_arith ()\n  {\n    as_val=`expr \"$@\" || test $? -eq 1`\n  }\nfi # as_fn_arith\n\n\n# as_fn_error STATUS ERROR [LINENO LOG_FD]\n# ----------------------------------------\n# Output \"`basename $0`: error: ERROR\" to stderr. If LINENO and LOG_FD are\n# provided, also output the error to LOG_FD, referencing LINENO. Then exit the\n# script with STATUS, using 1 if that was 0.\nas_fn_error ()\n{\n  as_status=$1; test $as_status -eq 0 && as_status=1\n  if test \"$4\"; then\n    as_lineno=${as_lineno-\"$3\"} as_lineno_stack=as_lineno_stack=$as_lineno_stack\n    $as_echo \"$as_me:${as_lineno-$LINENO}: error: $2\" >&$4\n  fi\n  $as_echo \"$as_me: error: $2\" >&2\n  as_fn_exit $as_status\n} # as_fn_error\n\nif expr a : '\\(a\\)' >/dev/null 2>&1 &&\n   test \"X`expr 00001 : '.*\\(...\\)'`\" = X001; then\n  as_expr=expr\nelse\n  as_expr=false\nfi\n\nif (basename -- /) >/dev/null 2>&1 && test \"X`basename -- / 2>&1`\" = \"X/\"; then\n  as_basename=basename\nelse\n  as_basename=false\nfi\n\nif (as_dir=`dirname -- /` && test \"X$as_dir\" = X/) >/dev/null 2>&1; then\n  as_dirname=dirname\nelse\n  as_dirname=false\nfi\n\nas_me=`$as_basename -- \"$0\" ||\n$as_expr X/\"$0\" : '.*/\\([^/][^/]*\\)/*$' \\| \\\n\t X\"$0\" : 'X\\(//\\)$' \\| \\\n\t X\"$0\" : 'X\\(/\\)' \\| . 2>/dev/null ||\n$as_echo X/\"$0\" |\n    sed '/^.*\\/\\([^/][^/]*\\)\\/*$/{\n\t    s//\\1/\n\t    q\n\t  }\n\t  /^X\\/\\(\\/\\/\\)$/{\n\t    s//\\1/\n\t    q\n\t  }\n\t  /^X\\/\\(\\/\\).*/{\n\t    s//\\1/\n\t    q\n\t  }\n\t  s/.*/./; q'`\n\n# Avoid depending upon Character Ranges.\nas_cr_letters='abcdefghijklmnopqrstuvwxyz'\nas_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'\nas_cr_Letters=$as_cr_letters$as_cr_LETTERS\nas_cr_digits='0123456789'\nas_cr_alnum=$as_cr_Letters$as_cr_digits\n\n\n  as_lineno_1=$LINENO as_lineno_1a=$LINENO\n  as_lineno_2=$LINENO as_lineno_2a=$LINENO\n  eval 'test \"x$as_lineno_1'$as_run'\" != \"x$as_lineno_2'$as_run'\" &&\n  test \"x`expr $as_lineno_1'$as_run' + 1`\" = \"x$as_lineno_2'$as_run'\"' || {\n  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)\n  sed -n '\n    p\n    /[$]LINENO/=\n  ' <$as_myself |\n    sed '\n      s/[$]LINENO.*/&-/\n      t lineno\n      b\n      :lineno\n      N\n      :loop\n      s/[$]LINENO\\([^'$as_cr_alnum'_].*\\n\\)\\(.*\\)/\\2\\1\\2/\n      t loop\n      s/-\\n.*//\n    ' >$as_me.lineno &&\n  chmod +x \"$as_me.lineno\" ||\n    { $as_echo \"$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell\" >&2; as_fn_exit 1; }\n\n  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have\n  # already done that, so ensure we don't try to do so again and fall\n  # in an infinite loop.  This has already happened in practice.\n  _as_can_reexec=no; export _as_can_reexec\n  # Don't try to exec as it changes $[0], causing all sort of problems\n  # (the dirname of $[0] is not the place where we might find the\n  # original and so on.  Autoconf is especially sensitive to this).\n  . \"./$as_me.lineno\"\n  # Exit status is that of the last command.\n  exit\n}\n\nECHO_C= ECHO_N= ECHO_T=\ncase `echo -n x` in #(((((\n-n*)\n  case `echo 'xy\\c'` in\n  *c*) ECHO_T='\t';;\t# ECHO_T is single tab character.\n  xy)  ECHO_C='\\c';;\n  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null\n       ECHO_T='\t';;\n  esac;;\n*)\n  ECHO_N='-n';;\nesac\n\nrm -f conf$$ conf$$.exe conf$$.file\nif test -d conf$$.dir; then\n  rm -f conf$$.dir/conf$$.file\nelse\n  rm -f conf$$.dir\n  mkdir conf$$.dir 2>/dev/null\nfi\nif (echo >conf$$.file) 2>/dev/null; then\n  if ln -s conf$$.file conf$$ 2>/dev/null; then\n    as_ln_s='ln -s'\n    # ... but there are two gotchas:\n    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.\n    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.\n    # In both cases, we have to default to `cp -pR'.\n    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||\n      as_ln_s='cp -pR'\n  elif ln conf$$.file conf$$ 2>/dev/null; then\n    as_ln_s=ln\n  else\n    as_ln_s='cp -pR'\n  fi\nelse\n  as_ln_s='cp -pR'\nfi\nrm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file\nrmdir conf$$.dir 2>/dev/null\n\nif mkdir -p . 2>/dev/null; then\n  as_mkdir_p='mkdir -p \"$as_dir\"'\nelse\n  test -d ./-p && rmdir ./-p\n  as_mkdir_p=false\nfi\n\nas_test_x='test -x'\nas_executable_p=as_fn_executable_p\n\n# Sed expression to map a string onto a valid CPP name.\nas_tr_cpp=\"eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'\"\n\n# Sed expression to map a string onto a valid variable name.\nas_tr_sh=\"eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'\"\n\nSHELL=${CONFIG_SHELL-/bin/sh}\n\n\ntest -n \"$DJDIR\" || exec 7<&0 </dev/null\nexec 6>&1\n\n# Name of the host.\n# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,\n# so uname gets run too.\nac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`\n\n#\n# Initializations.\n#\nac_default_prefix=/usr/local\nac_clean_files=\nac_config_libobj_dir=.\nLIBOBJS=\ncross_compiling=no\nsubdirs=\nMFLAGS=\nMAKEFLAGS=\n\n# Identity of this package.\nPACKAGE_NAME='PortAudioCpp'\nPACKAGE_TARNAME='portaudiocpp'\nPACKAGE_VERSION='12'\nPACKAGE_STRING='PortAudioCpp 12'\nPACKAGE_BUGREPORT=''\nPACKAGE_URL=''\n\nac_unique_file=\"include/portaudiocpp/PortAudioCpp.hxx\"\n# Factoring default headers for most tests.\nac_includes_default=\"\\\n#include <stdio.h>\n#ifdef HAVE_SYS_TYPES_H\n# include <sys/types.h>\n#endif\n#ifdef HAVE_SYS_STAT_H\n# include <sys/stat.h>\n#endif\n#ifdef STDC_HEADERS\n# include <stdlib.h>\n# include <stddef.h>\n#else\n# ifdef HAVE_STDLIB_H\n#  include <stdlib.h>\n# endif\n#endif\n#ifdef HAVE_STRING_H\n# if !defined STDC_HEADERS && defined HAVE_MEMORY_H\n#  include <memory.h>\n# endif\n# include <string.h>\n#endif\n#ifdef HAVE_STRINGS_H\n# include <strings.h>\n#endif\n#ifdef HAVE_INTTYPES_H\n# include <inttypes.h>\n#endif\n#ifdef HAVE_STDINT_H\n# include <stdint.h>\n#endif\n#ifdef HAVE_UNISTD_H\n# include <unistd.h>\n#endif\"\n\nac_subst_vars='am__EXEEXT_FALSE\nam__EXEEXT_TRUE\nLTLIBOBJS\nLIBOBJS\nLT_VERSION_INFO\nPORTAUDIO_ROOT\nDEFAULT_INCLUDES\nCXXCPP\nCPP\nOTOOL64\nOTOOL\nLIPO\nNMEDIT\nDSYMUTIL\nMANIFEST_TOOL\nRANLIB\nac_ct_AR\nAR\nLN_S\nNM\nac_ct_DUMPBIN\nDUMPBIN\nLD\nFGREP\nEGREP\nGREP\nSED\nLIBTOOL\nOBJDUMP\nDLLTOOL\nAS\nhost_os\nhost_vendor\nhost_cpu\nhost\nbuild_os\nbuild_vendor\nbuild_cpu\nbuild\nam__fastdepCXX_FALSE\nam__fastdepCXX_TRUE\nCXXDEPMODE\nac_ct_CXX\nCXXFLAGS\nCXX\nam__fastdepCC_FALSE\nam__fastdepCC_TRUE\nCCDEPMODE\nam__nodep\nAMDEPBACKSLASH\nAMDEP_FALSE\nAMDEP_TRUE\nam__quote\nam__include\nDEPDIR\nOBJEXT\nEXEEXT\nac_ct_CC\nCPPFLAGS\nLDFLAGS\nCFLAGS\nCC\nMAINT\nMAINTAINER_MODE_FALSE\nMAINTAINER_MODE_TRUE\nAM_BACKSLASH\nAM_DEFAULT_VERBOSITY\nAM_DEFAULT_V\nAM_V\nam__untar\nam__tar\nAMTAR\nam__leading_dot\nSET_MAKE\nAWK\nmkdir_p\nMKDIR_P\nINSTALL_STRIP_PROGRAM\nSTRIP\ninstall_sh\nMAKEINFO\nAUTOHEADER\nAUTOMAKE\nAUTOCONF\nACLOCAL\nVERSION\nPACKAGE\nCYGPATH_W\nam__isrc\nINSTALL_DATA\nINSTALL_SCRIPT\nINSTALL_PROGRAM\ntarget_alias\nhost_alias\nbuild_alias\nLIBS\nECHO_T\nECHO_N\nECHO_C\nDEFS\nmandir\nlocaledir\nlibdir\npsdir\npdfdir\ndvidir\nhtmldir\ninfodir\ndocdir\noldincludedir\nincludedir\nlocalstatedir\nsharedstatedir\nsysconfdir\ndatadir\ndatarootdir\nlibexecdir\nsbindir\nbindir\nprogram_transform_name\nprefix\nexec_prefix\nPACKAGE_URL\nPACKAGE_BUGREPORT\nPACKAGE_STRING\nPACKAGE_VERSION\nPACKAGE_TARNAME\nPACKAGE_NAME\nPATH_SEPARATOR\nSHELL'\nac_subst_files=''\nac_user_opts='\nenable_option_checking\nenable_silent_rules\nenable_maintainer_mode\nenable_dependency_tracking\nenable_shared\nenable_static\nwith_pic\nenable_fast_install\nwith_gnu_ld\nwith_sysroot\nenable_libtool_lock\n'\n      ac_precious_vars='build_alias\nhost_alias\ntarget_alias\nCC\nCFLAGS\nLDFLAGS\nLIBS\nCPPFLAGS\nCXX\nCXXFLAGS\nCCC\nCPP\nCXXCPP'\n\n\n# Initialize some variables set by options.\nac_init_help=\nac_init_version=false\nac_unrecognized_opts=\nac_unrecognized_sep=\n# The variables have the same names as the options, with\n# dashes changed to underlines.\ncache_file=/dev/null\nexec_prefix=NONE\nno_create=\nno_recursion=\nprefix=NONE\nprogram_prefix=NONE\nprogram_suffix=NONE\nprogram_transform_name=s,x,x,\nsilent=\nsite=\nsrcdir=\nverbose=\nx_includes=NONE\nx_libraries=NONE\n\n# Installation directory options.\n# These are left unexpanded so users can \"make install exec_prefix=/foo\"\n# and all the variables that are supposed to be based on exec_prefix\n# by default will actually change.\n# Use braces instead of parens because sh, perl, etc. also accept them.\n# (The list follows the same order as the GNU Coding Standards.)\nbindir='${exec_prefix}/bin'\nsbindir='${exec_prefix}/sbin'\nlibexecdir='${exec_prefix}/libexec'\ndatarootdir='${prefix}/share'\ndatadir='${datarootdir}'\nsysconfdir='${prefix}/etc'\nsharedstatedir='${prefix}/com'\nlocalstatedir='${prefix}/var'\nincludedir='${prefix}/include'\noldincludedir='/usr/include'\ndocdir='${datarootdir}/doc/${PACKAGE_TARNAME}'\ninfodir='${datarootdir}/info'\nhtmldir='${docdir}'\ndvidir='${docdir}'\npdfdir='${docdir}'\npsdir='${docdir}'\nlibdir='${exec_prefix}/lib'\nlocaledir='${datarootdir}/locale'\nmandir='${datarootdir}/man'\n\nac_prev=\nac_dashdash=\nfor ac_option\ndo\n  # If the previous option needs an argument, assign it.\n  if test -n \"$ac_prev\"; then\n    eval $ac_prev=\\$ac_option\n    ac_prev=\n    continue\n  fi\n\n  case $ac_option in\n  *=?*) ac_optarg=`expr \"X$ac_option\" : '[^=]*=\\(.*\\)'` ;;\n  *=)   ac_optarg= ;;\n  *)    ac_optarg=yes ;;\n  esac\n\n  # Accept the important Cygnus configure options, so we can diagnose typos.\n\n  case $ac_dashdash$ac_option in\n  --)\n    ac_dashdash=yes ;;\n\n  -bindir | --bindir | --bindi | --bind | --bin | --bi)\n    ac_prev=bindir ;;\n  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)\n    bindir=$ac_optarg ;;\n\n  -build | --build | --buil | --bui | --bu)\n    ac_prev=build_alias ;;\n  -build=* | --build=* | --buil=* | --bui=* | --bu=*)\n    build_alias=$ac_optarg ;;\n\n  -cache-file | --cache-file | --cache-fil | --cache-fi \\\n  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)\n    ac_prev=cache_file ;;\n  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \\\n  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)\n    cache_file=$ac_optarg ;;\n\n  --config-cache | -C)\n    cache_file=config.cache ;;\n\n  -datadir | --datadir | --datadi | --datad)\n    ac_prev=datadir ;;\n  -datadir=* | --datadir=* | --datadi=* | --datad=*)\n    datadir=$ac_optarg ;;\n\n  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \\\n  | --dataroo | --dataro | --datar)\n    ac_prev=datarootdir ;;\n  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \\\n  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)\n    datarootdir=$ac_optarg ;;\n\n  -disable-* | --disable-*)\n    ac_useropt=`expr \"x$ac_option\" : 'x-*disable-\\(.*\\)'`\n    # Reject names that are not valid shell variable names.\n    expr \"x$ac_useropt\" : \".*[^-+._$as_cr_alnum]\" >/dev/null &&\n      as_fn_error $? \"invalid feature name: $ac_useropt\"\n    ac_useropt_orig=$ac_useropt\n    ac_useropt=`$as_echo \"$ac_useropt\" | sed 's/[-+.]/_/g'`\n    case $ac_user_opts in\n      *\"\n\"enable_$ac_useropt\"\n\"*) ;;\n      *) ac_unrecognized_opts=\"$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig\"\n\t ac_unrecognized_sep=', ';;\n    esac\n    eval enable_$ac_useropt=no ;;\n\n  -docdir | --docdir | --docdi | --doc | --do)\n    ac_prev=docdir ;;\n  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)\n    docdir=$ac_optarg ;;\n\n  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)\n    ac_prev=dvidir ;;\n  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)\n    dvidir=$ac_optarg ;;\n\n  -enable-* | --enable-*)\n    ac_useropt=`expr \"x$ac_option\" : 'x-*enable-\\([^=]*\\)'`\n    # Reject names that are not valid shell variable names.\n    expr \"x$ac_useropt\" : \".*[^-+._$as_cr_alnum]\" >/dev/null &&\n      as_fn_error $? \"invalid feature name: $ac_useropt\"\n    ac_useropt_orig=$ac_useropt\n    ac_useropt=`$as_echo \"$ac_useropt\" | sed 's/[-+.]/_/g'`\n    case $ac_user_opts in\n      *\"\n\"enable_$ac_useropt\"\n\"*) ;;\n      *) ac_unrecognized_opts=\"$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig\"\n\t ac_unrecognized_sep=', ';;\n    esac\n    eval enable_$ac_useropt=\\$ac_optarg ;;\n\n  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \\\n  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \\\n  | --exec | --exe | --ex)\n    ac_prev=exec_prefix ;;\n  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \\\n  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \\\n  | --exec=* | --exe=* | --ex=*)\n    exec_prefix=$ac_optarg ;;\n\n  -gas | --gas | --ga | --g)\n    # Obsolete; use --with-gas.\n    with_gas=yes ;;\n\n  -help | --help | --hel | --he | -h)\n    ac_init_help=long ;;\n  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)\n    ac_init_help=recursive ;;\n  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)\n    ac_init_help=short ;;\n\n  -host | --host | --hos | --ho)\n    ac_prev=host_alias ;;\n  -host=* | --host=* | --hos=* | --ho=*)\n    host_alias=$ac_optarg ;;\n\n  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)\n    ac_prev=htmldir ;;\n  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \\\n  | --ht=*)\n    htmldir=$ac_optarg ;;\n\n  -includedir | --includedir | --includedi | --included | --include \\\n  | --includ | --inclu | --incl | --inc)\n    ac_prev=includedir ;;\n  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \\\n  | --includ=* | --inclu=* | --incl=* | --inc=*)\n    includedir=$ac_optarg ;;\n\n  -infodir | --infodir | --infodi | --infod | --info | --inf)\n    ac_prev=infodir ;;\n  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)\n    infodir=$ac_optarg ;;\n\n  -libdir | --libdir | --libdi | --libd)\n    ac_prev=libdir ;;\n  -libdir=* | --libdir=* | --libdi=* | --libd=*)\n    libdir=$ac_optarg ;;\n\n  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \\\n  | --libexe | --libex | --libe)\n    ac_prev=libexecdir ;;\n  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \\\n  | --libexe=* | --libex=* | --libe=*)\n    libexecdir=$ac_optarg ;;\n\n  -localedir | --localedir | --localedi | --localed | --locale)\n    ac_prev=localedir ;;\n  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)\n    localedir=$ac_optarg ;;\n\n  -localstatedir | --localstatedir | --localstatedi | --localstated \\\n  | --localstate | --localstat | --localsta | --localst | --locals)\n    ac_prev=localstatedir ;;\n  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \\\n  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)\n    localstatedir=$ac_optarg ;;\n\n  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)\n    ac_prev=mandir ;;\n  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)\n    mandir=$ac_optarg ;;\n\n  -nfp | --nfp | --nf)\n    # Obsolete; use --without-fp.\n    with_fp=no ;;\n\n  -no-create | --no-create | --no-creat | --no-crea | --no-cre \\\n  | --no-cr | --no-c | -n)\n    no_create=yes ;;\n\n  -no-recursion | --no-recursion | --no-recursio | --no-recursi \\\n  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)\n    no_recursion=yes ;;\n\n  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \\\n  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \\\n  | --oldin | --oldi | --old | --ol | --o)\n    ac_prev=oldincludedir ;;\n  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \\\n  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \\\n  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)\n    oldincludedir=$ac_optarg ;;\n\n  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)\n    ac_prev=prefix ;;\n  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)\n    prefix=$ac_optarg ;;\n\n  -program-prefix | --program-prefix | --program-prefi | --program-pref \\\n  | --program-pre | --program-pr | --program-p)\n    ac_prev=program_prefix ;;\n  -program-prefix=* | --program-prefix=* | --program-prefi=* \\\n  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)\n    program_prefix=$ac_optarg ;;\n\n  -program-suffix | --program-suffix | --program-suffi | --program-suff \\\n  | --program-suf | --program-su | --program-s)\n    ac_prev=program_suffix ;;\n  -program-suffix=* | --program-suffix=* | --program-suffi=* \\\n  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)\n    program_suffix=$ac_optarg ;;\n\n  -program-transform-name | --program-transform-name \\\n  | --program-transform-nam | --program-transform-na \\\n  | --program-transform-n | --program-transform- \\\n  | --program-transform | --program-transfor \\\n  | --program-transfo | --program-transf \\\n  | --program-trans | --program-tran \\\n  | --progr-tra | --program-tr | --program-t)\n    ac_prev=program_transform_name ;;\n  -program-transform-name=* | --program-transform-name=* \\\n  | --program-transform-nam=* | --program-transform-na=* \\\n  | --program-transform-n=* | --program-transform-=* \\\n  | --program-transform=* | --program-transfor=* \\\n  | --program-transfo=* | --program-transf=* \\\n  | --program-trans=* | --program-tran=* \\\n  | --progr-tra=* | --program-tr=* | --program-t=*)\n    program_transform_name=$ac_optarg ;;\n\n  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)\n    ac_prev=pdfdir ;;\n  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)\n    pdfdir=$ac_optarg ;;\n\n  -psdir | --psdir | --psdi | --psd | --ps)\n    ac_prev=psdir ;;\n  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)\n    psdir=$ac_optarg ;;\n\n  -q | -quiet | --quiet | --quie | --qui | --qu | --q \\\n  | -silent | --silent | --silen | --sile | --sil)\n    silent=yes ;;\n\n  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)\n    ac_prev=sbindir ;;\n  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \\\n  | --sbi=* | --sb=*)\n    sbindir=$ac_optarg ;;\n\n  -sharedstatedir | --sharedstatedir | --sharedstatedi \\\n  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \\\n  | --sharedst | --shareds | --shared | --share | --shar \\\n  | --sha | --sh)\n    ac_prev=sharedstatedir ;;\n  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \\\n  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \\\n  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \\\n  | --sha=* | --sh=*)\n    sharedstatedir=$ac_optarg ;;\n\n  -site | --site | --sit)\n    ac_prev=site ;;\n  -site=* | --site=* | --sit=*)\n    site=$ac_optarg ;;\n\n  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)\n    ac_prev=srcdir ;;\n  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)\n    srcdir=$ac_optarg ;;\n\n  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \\\n  | --syscon | --sysco | --sysc | --sys | --sy)\n    ac_prev=sysconfdir ;;\n  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \\\n  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)\n    sysconfdir=$ac_optarg ;;\n\n  -target | --target | --targe | --targ | --tar | --ta | --t)\n    ac_prev=target_alias ;;\n  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)\n    target_alias=$ac_optarg ;;\n\n  -v | -verbose | --verbose | --verbos | --verbo | --verb)\n    verbose=yes ;;\n\n  -version | --version | --versio | --versi | --vers | -V)\n    ac_init_version=: ;;\n\n  -with-* | --with-*)\n    ac_useropt=`expr \"x$ac_option\" : 'x-*with-\\([^=]*\\)'`\n    # Reject names that are not valid shell variable names.\n    expr \"x$ac_useropt\" : \".*[^-+._$as_cr_alnum]\" >/dev/null &&\n      as_fn_error $? \"invalid package name: $ac_useropt\"\n    ac_useropt_orig=$ac_useropt\n    ac_useropt=`$as_echo \"$ac_useropt\" | sed 's/[-+.]/_/g'`\n    case $ac_user_opts in\n      *\"\n\"with_$ac_useropt\"\n\"*) ;;\n      *) ac_unrecognized_opts=\"$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig\"\n\t ac_unrecognized_sep=', ';;\n    esac\n    eval with_$ac_useropt=\\$ac_optarg ;;\n\n  -without-* | --without-*)\n    ac_useropt=`expr \"x$ac_option\" : 'x-*without-\\(.*\\)'`\n    # Reject names that are not valid shell variable names.\n    expr \"x$ac_useropt\" : \".*[^-+._$as_cr_alnum]\" >/dev/null &&\n      as_fn_error $? \"invalid package name: $ac_useropt\"\n    ac_useropt_orig=$ac_useropt\n    ac_useropt=`$as_echo \"$ac_useropt\" | sed 's/[-+.]/_/g'`\n    case $ac_user_opts in\n      *\"\n\"with_$ac_useropt\"\n\"*) ;;\n      *) ac_unrecognized_opts=\"$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig\"\n\t ac_unrecognized_sep=', ';;\n    esac\n    eval with_$ac_useropt=no ;;\n\n  --x)\n    # Obsolete; use --with-x.\n    with_x=yes ;;\n\n  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \\\n  | --x-incl | --x-inc | --x-in | --x-i)\n    ac_prev=x_includes ;;\n  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \\\n  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)\n    x_includes=$ac_optarg ;;\n\n  -x-libraries | --x-libraries | --x-librarie | --x-librari \\\n  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)\n    ac_prev=x_libraries ;;\n  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \\\n  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)\n    x_libraries=$ac_optarg ;;\n\n  -*) as_fn_error $? \"unrecognized option: \\`$ac_option'\nTry \\`$0 --help' for more information\"\n    ;;\n\n  *=*)\n    ac_envvar=`expr \"x$ac_option\" : 'x\\([^=]*\\)='`\n    # Reject names that are not valid shell variable names.\n    case $ac_envvar in #(\n      '' | [0-9]* | *[!_$as_cr_alnum]* )\n      as_fn_error $? \"invalid variable name: \\`$ac_envvar'\" ;;\n    esac\n    eval $ac_envvar=\\$ac_optarg\n    export $ac_envvar ;;\n\n  *)\n    # FIXME: should be removed in autoconf 3.0.\n    $as_echo \"$as_me: WARNING: you should use --build, --host, --target\" >&2\n    expr \"x$ac_option\" : \".*[^-._$as_cr_alnum]\" >/dev/null &&\n      $as_echo \"$as_me: WARNING: invalid host type: $ac_option\" >&2\n    : \"${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}\"\n    ;;\n\n  esac\ndone\n\nif test -n \"$ac_prev\"; then\n  ac_option=--`echo $ac_prev | sed 's/_/-/g'`\n  as_fn_error $? \"missing argument to $ac_option\"\nfi\n\nif test -n \"$ac_unrecognized_opts\"; then\n  case $enable_option_checking in\n    no) ;;\n    fatal) as_fn_error $? \"unrecognized options: $ac_unrecognized_opts\" ;;\n    *)     $as_echo \"$as_me: WARNING: unrecognized options: $ac_unrecognized_opts\" >&2 ;;\n  esac\nfi\n\n# Check all directory arguments for consistency.\nfor ac_var in\texec_prefix prefix bindir sbindir libexecdir datarootdir \\\n\t\tdatadir sysconfdir sharedstatedir localstatedir includedir \\\n\t\toldincludedir docdir infodir htmldir dvidir pdfdir psdir \\\n\t\tlibdir localedir mandir\ndo\n  eval ac_val=\\$$ac_var\n  # Remove trailing slashes.\n  case $ac_val in\n    */ )\n      ac_val=`expr \"X$ac_val\" : 'X\\(.*[^/]\\)' \\| \"X$ac_val\" : 'X\\(.*\\)'`\n      eval $ac_var=\\$ac_val;;\n  esac\n  # Be sure to have absolute directory names.\n  case $ac_val in\n    [\\\\/$]* | ?:[\\\\/]* )  continue;;\n    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;\n  esac\n  as_fn_error $? \"expected an absolute directory name for --$ac_var: $ac_val\"\ndone\n\n# There might be people who depend on the old broken behavior: `$host'\n# used to hold the argument of --host etc.\n# FIXME: To remove some day.\nbuild=$build_alias\nhost=$host_alias\ntarget=$target_alias\n\n# FIXME: To remove some day.\nif test \"x$host_alias\" != x; then\n  if test \"x$build_alias\" = x; then\n    cross_compiling=maybe\n  elif test \"x$build_alias\" != \"x$host_alias\"; then\n    cross_compiling=yes\n  fi\nfi\n\nac_tool_prefix=\ntest -n \"$host_alias\" && ac_tool_prefix=$host_alias-\n\ntest \"$silent\" = yes && exec 6>/dev/null\n\n\nac_pwd=`pwd` && test -n \"$ac_pwd\" &&\nac_ls_di=`ls -di .` &&\nac_pwd_ls_di=`cd \"$ac_pwd\" && ls -di .` ||\n  as_fn_error $? \"working directory cannot be determined\"\ntest \"X$ac_ls_di\" = \"X$ac_pwd_ls_di\" ||\n  as_fn_error $? \"pwd does not report name of working directory\"\n\n\n# Find the source files, if location was not specified.\nif test -z \"$srcdir\"; then\n  ac_srcdir_defaulted=yes\n  # Try the directory containing this script, then the parent directory.\n  ac_confdir=`$as_dirname -- \"$as_myself\" ||\n$as_expr X\"$as_myself\" : 'X\\(.*[^/]\\)//*[^/][^/]*/*$' \\| \\\n\t X\"$as_myself\" : 'X\\(//\\)[^/]' \\| \\\n\t X\"$as_myself\" : 'X\\(//\\)$' \\| \\\n\t X\"$as_myself\" : 'X\\(/\\)' \\| . 2>/dev/null ||\n$as_echo X\"$as_myself\" |\n    sed '/^X\\(.*[^/]\\)\\/\\/*[^/][^/]*\\/*$/{\n\t    s//\\1/\n\t    q\n\t  }\n\t  /^X\\(\\/\\/\\)[^/].*/{\n\t    s//\\1/\n\t    q\n\t  }\n\t  /^X\\(\\/\\/\\)$/{\n\t    s//\\1/\n\t    q\n\t  }\n\t  /^X\\(\\/\\).*/{\n\t    s//\\1/\n\t    q\n\t  }\n\t  s/.*/./; q'`\n  srcdir=$ac_confdir\n  if test ! -r \"$srcdir/$ac_unique_file\"; then\n    srcdir=..\n  fi\nelse\n  ac_srcdir_defaulted=no\nfi\nif test ! -r \"$srcdir/$ac_unique_file\"; then\n  test \"$ac_srcdir_defaulted\" = yes && srcdir=\"$ac_confdir or ..\"\n  as_fn_error $? \"cannot find sources ($ac_unique_file) in $srcdir\"\nfi\nac_msg=\"sources are in $srcdir, but \\`cd $srcdir' does not work\"\nac_abs_confdir=`(\n\tcd \"$srcdir\" && test -r \"./$ac_unique_file\" || as_fn_error $? \"$ac_msg\"\n\tpwd)`\n# When building in place, set srcdir=.\nif test \"$ac_abs_confdir\" = \"$ac_pwd\"; then\n  srcdir=.\nfi\n# Remove unnecessary trailing slashes from srcdir.\n# Double slashes in file names in object file debugging info\n# mess up M-x gdb in Emacs.\ncase $srcdir in\n*/) srcdir=`expr \"X$srcdir\" : 'X\\(.*[^/]\\)' \\| \"X$srcdir\" : 'X\\(.*\\)'`;;\nesac\nfor ac_var in $ac_precious_vars; do\n  eval ac_env_${ac_var}_set=\\${${ac_var}+set}\n  eval ac_env_${ac_var}_value=\\$${ac_var}\n  eval ac_cv_env_${ac_var}_set=\\${${ac_var}+set}\n  eval ac_cv_env_${ac_var}_value=\\$${ac_var}\ndone\n\n#\n# Report the --help message.\n#\nif test \"$ac_init_help\" = \"long\"; then\n  # Omit some internal or obsolete options to make the list less imposing.\n  # This message is too long to be a string in the A/UX 3.1 sh.\n  cat <<_ACEOF\n\\`configure' configures PortAudioCpp 12 to adapt to many kinds of systems.\n\nUsage: $0 [OPTION]... [VAR=VALUE]...\n\nTo assign environment variables (e.g., CC, CFLAGS...), specify them as\nVAR=VALUE.  See below for descriptions of some of the useful variables.\n\nDefaults for the options are specified in brackets.\n\nConfiguration:\n  -h, --help              display this help and exit\n      --help=short        display options specific to this package\n      --help=recursive    display the short help of all the included packages\n  -V, --version           display version information and exit\n  -q, --quiet, --silent   do not print \\`checking ...' messages\n      --cache-file=FILE   cache test results in FILE [disabled]\n  -C, --config-cache      alias for \\`--cache-file=config.cache'\n  -n, --no-create         do not create output files\n      --srcdir=DIR        find the sources in DIR [configure dir or \\`..']\n\nInstallation directories:\n  --prefix=PREFIX         install architecture-independent files in PREFIX\n                          [$ac_default_prefix]\n  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX\n                          [PREFIX]\n\nBy default, \\`make install' will install all the files in\n\\`$ac_default_prefix/bin', \\`$ac_default_prefix/lib' etc.  You can specify\nan installation prefix other than \\`$ac_default_prefix' using \\`--prefix',\nfor instance \\`--prefix=\\$HOME'.\n\nFor better control, use the options below.\n\nFine tuning of the installation directories:\n  --bindir=DIR            user executables [EPREFIX/bin]\n  --sbindir=DIR           system admin executables [EPREFIX/sbin]\n  --libexecdir=DIR        program executables [EPREFIX/libexec]\n  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]\n  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]\n  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]\n  --libdir=DIR            object code libraries [EPREFIX/lib]\n  --includedir=DIR        C header files [PREFIX/include]\n  --oldincludedir=DIR     C header files for non-gcc [/usr/include]\n  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]\n  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]\n  --infodir=DIR           info documentation [DATAROOTDIR/info]\n  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]\n  --mandir=DIR            man documentation [DATAROOTDIR/man]\n  --docdir=DIR            documentation root [DATAROOTDIR/doc/portaudiocpp]\n  --htmldir=DIR           html documentation [DOCDIR]\n  --dvidir=DIR            dvi documentation [DOCDIR]\n  --pdfdir=DIR            pdf documentation [DOCDIR]\n  --psdir=DIR             ps documentation [DOCDIR]\n_ACEOF\n\n  cat <<\\_ACEOF\n\nProgram names:\n  --program-prefix=PREFIX            prepend PREFIX to installed program names\n  --program-suffix=SUFFIX            append SUFFIX to installed program names\n  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names\n\nSystem types:\n  --build=BUILD     configure for building on BUILD [guessed]\n  --host=HOST       cross-compile to build programs to run on HOST [BUILD]\n_ACEOF\nfi\n\nif test -n \"$ac_init_help\"; then\n  case $ac_init_help in\n     short | recursive ) echo \"Configuration of PortAudioCpp 12:\";;\n   esac\n  cat <<\\_ACEOF\n\nOptional Features:\n  --disable-option-checking  ignore unrecognized --enable/--with options\n  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)\n  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]\n  --enable-silent-rules   less verbose build output (undo: \"make V=1\")\n  --disable-silent-rules  verbose build output (undo: \"make V=0\")\n  --enable-maintainer-mode\n                          enable make rules and dependencies not useful (and\n                          sometimes confusing) to the casual installer\n  --enable-dependency-tracking\n                          do not reject slow dependency extractors\n  --disable-dependency-tracking\n                          speeds up one-time build\n  --enable-shared[=PKGS]  build shared libraries [default=yes]\n  --enable-static[=PKGS]  build static libraries [default=yes]\n  --enable-fast-install[=PKGS]\n                          optimize for fast installation [default=yes]\n  --disable-libtool-lock  avoid locking (might break parallel builds)\n\nOptional Packages:\n  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]\n  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)\n  --with-pic[=PKGS]       try to use only PIC/non-PIC objects [default=use\n                          both]\n  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]\n  --with-sysroot=DIR Search for dependent libraries within DIR\n                        (or the compiler's sysroot if not specified).\n\nSome influential environment variables:\n  CC          C compiler command\n  CFLAGS      C compiler flags\n  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a\n              nonstandard directory <lib dir>\n  LIBS        libraries to pass to the linker, e.g. -l<library>\n  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if\n              you have headers in a nonstandard directory <include dir>\n  CXX         C++ compiler command\n  CXXFLAGS    C++ compiler flags\n  CPP         C preprocessor\n  CXXCPP      C++ preprocessor\n\nUse these variables to override the choices made by `configure' or to help\nit to find libraries and programs with nonstandard names/locations.\n\nReport bugs to the package provider.\n_ACEOF\nac_status=$?\nfi\n\nif test \"$ac_init_help\" = \"recursive\"; then\n  # If there are subdirs, report their specific --help.\n  for ac_dir in : $ac_subdirs_all; do test \"x$ac_dir\" = x: && continue\n    test -d \"$ac_dir\" ||\n      { cd \"$srcdir\" && ac_pwd=`pwd` && srcdir=. && test -d \"$ac_dir\"; } ||\n      continue\n    ac_builddir=.\n\ncase \"$ac_dir\" in\n.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;\n*)\n  ac_dir_suffix=/`$as_echo \"$ac_dir\" | sed 's|^\\.[\\\\/]||'`\n  # A \"..\" for each directory in $ac_dir_suffix.\n  ac_top_builddir_sub=`$as_echo \"$ac_dir_suffix\" | sed 's|/[^\\\\/]*|/..|g;s|/||'`\n  case $ac_top_builddir_sub in\n  \"\") ac_top_builddir_sub=. ac_top_build_prefix= ;;\n  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;\n  esac ;;\nesac\nac_abs_top_builddir=$ac_pwd\nac_abs_builddir=$ac_pwd$ac_dir_suffix\n# for backward compatibility:\nac_top_builddir=$ac_top_build_prefix\n\ncase $srcdir in\n  .)  # We are building in place.\n    ac_srcdir=.\n    ac_top_srcdir=$ac_top_builddir_sub\n    ac_abs_top_srcdir=$ac_pwd ;;\n  [\\\\/]* | ?:[\\\\/]* )  # Absolute name.\n    ac_srcdir=$srcdir$ac_dir_suffix;\n    ac_top_srcdir=$srcdir\n    ac_abs_top_srcdir=$srcdir ;;\n  *) # Relative name.\n    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix\n    ac_top_srcdir=$ac_top_build_prefix$srcdir\n    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;\nesac\nac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix\n\n    cd \"$ac_dir\" || { ac_status=$?; continue; }\n    # Check for guested configure.\n    if test -f \"$ac_srcdir/configure.gnu\"; then\n      echo &&\n      $SHELL \"$ac_srcdir/configure.gnu\" --help=recursive\n    elif test -f \"$ac_srcdir/configure\"; then\n      echo &&\n      $SHELL \"$ac_srcdir/configure\" --help=recursive\n    else\n      $as_echo \"$as_me: WARNING: no configuration information is in $ac_dir\" >&2\n    fi || ac_status=$?\n    cd \"$ac_pwd\" || { ac_status=$?; break; }\n  done\nfi\n\ntest -n \"$ac_init_help\" && exit $ac_status\nif $ac_init_version; then\n  cat <<\\_ACEOF\nPortAudioCpp configure 12\ngenerated by GNU Autoconf 2.69\n\nCopyright (C) 2012 Free Software Foundation, Inc.\nThis configure script is free software; the Free Software Foundation\ngives unlimited permission to copy, distribute and modify it.\n_ACEOF\n  exit\nfi\n\n## ------------------------ ##\n## Autoconf initialization. ##\n## ------------------------ ##\n\n# ac_fn_c_try_compile LINENO\n# --------------------------\n# Try to compile conftest.$ac_ext, and return whether this succeeded.\nac_fn_c_try_compile ()\n{\n  as_lineno=${as_lineno-\"$1\"} as_lineno_stack=as_lineno_stack=$as_lineno_stack\n  rm -f conftest.$ac_objext\n  if { { ac_try=\"$ac_compile\"\ncase \"(($ac_try\" in\n  *\\\"* | *\\`* | *\\\\*) ac_try_echo=\\$ac_try;;\n  *) ac_try_echo=$ac_try;;\nesac\neval ac_try_echo=\"\\\"\\$as_me:${as_lineno-$LINENO}: $ac_try_echo\\\"\"\n$as_echo \"$ac_try_echo\"; } >&5\n  (eval \"$ac_compile\") 2>conftest.err\n  ac_status=$?\n  if test -s conftest.err; then\n    grep -v '^ *+' conftest.err >conftest.er1\n    cat conftest.er1 >&5\n    mv -f conftest.er1 conftest.err\n  fi\n  $as_echo \"$as_me:${as_lineno-$LINENO}: \\$? = $ac_status\" >&5\n  test $ac_status = 0; } && {\n\t test -z \"$ac_c_werror_flag\" ||\n\t test ! -s conftest.err\n       } && test -s conftest.$ac_objext; then :\n  ac_retval=0\nelse\n  $as_echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\n\tac_retval=1\nfi\n  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno\n  as_fn_set_status $ac_retval\n\n} # ac_fn_c_try_compile\n\n# ac_fn_cxx_try_compile LINENO\n# ----------------------------\n# Try to compile conftest.$ac_ext, and return whether this succeeded.\nac_fn_cxx_try_compile ()\n{\n  as_lineno=${as_lineno-\"$1\"} as_lineno_stack=as_lineno_stack=$as_lineno_stack\n  rm -f conftest.$ac_objext\n  if { { ac_try=\"$ac_compile\"\ncase \"(($ac_try\" in\n  *\\\"* | *\\`* | *\\\\*) ac_try_echo=\\$ac_try;;\n  *) ac_try_echo=$ac_try;;\nesac\neval ac_try_echo=\"\\\"\\$as_me:${as_lineno-$LINENO}: $ac_try_echo\\\"\"\n$as_echo \"$ac_try_echo\"; } >&5\n  (eval \"$ac_compile\") 2>conftest.err\n  ac_status=$?\n  if test -s conftest.err; then\n    grep -v '^ *+' conftest.err >conftest.er1\n    cat conftest.er1 >&5\n    mv -f conftest.er1 conftest.err\n  fi\n  $as_echo \"$as_me:${as_lineno-$LINENO}: \\$? = $ac_status\" >&5\n  test $ac_status = 0; } && {\n\t test -z \"$ac_cxx_werror_flag\" ||\n\t test ! -s conftest.err\n       } && test -s conftest.$ac_objext; then :\n  ac_retval=0\nelse\n  $as_echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\n\tac_retval=1\nfi\n  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno\n  as_fn_set_status $ac_retval\n\n} # ac_fn_cxx_try_compile\n\n# ac_fn_c_try_link LINENO\n# -----------------------\n# Try to link conftest.$ac_ext, and return whether this succeeded.\nac_fn_c_try_link ()\n{\n  as_lineno=${as_lineno-\"$1\"} as_lineno_stack=as_lineno_stack=$as_lineno_stack\n  rm -f conftest.$ac_objext conftest$ac_exeext\n  if { { ac_try=\"$ac_link\"\ncase \"(($ac_try\" in\n  *\\\"* | *\\`* | *\\\\*) ac_try_echo=\\$ac_try;;\n  *) ac_try_echo=$ac_try;;\nesac\neval ac_try_echo=\"\\\"\\$as_me:${as_lineno-$LINENO}: $ac_try_echo\\\"\"\n$as_echo \"$ac_try_echo\"; } >&5\n  (eval \"$ac_link\") 2>conftest.err\n  ac_status=$?\n  if test -s conftest.err; then\n    grep -v '^ *+' conftest.err >conftest.er1\n    cat conftest.er1 >&5\n    mv -f conftest.er1 conftest.err\n  fi\n  $as_echo \"$as_me:${as_lineno-$LINENO}: \\$? = $ac_status\" >&5\n  test $ac_status = 0; } && {\n\t test -z \"$ac_c_werror_flag\" ||\n\t test ! -s conftest.err\n       } && test -s conftest$ac_exeext && {\n\t test \"$cross_compiling\" = yes ||\n\t test -x conftest$ac_exeext\n       }; then :\n  ac_retval=0\nelse\n  $as_echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\n\tac_retval=1\nfi\n  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information\n  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would\n  # interfere with the next link command; also delete a directory that is\n  # left behind by Apple's compiler.  We do this before executing the actions.\n  rm -rf conftest.dSYM conftest_ipa8_conftest.oo\n  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno\n  as_fn_set_status $ac_retval\n\n} # ac_fn_c_try_link\n\n# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES\n# -------------------------------------------------------\n# Tests whether HEADER exists and can be compiled using the include files in\n# INCLUDES, setting the cache variable VAR accordingly.\nac_fn_c_check_header_compile ()\n{\n  as_lineno=${as_lineno-\"$1\"} as_lineno_stack=as_lineno_stack=$as_lineno_stack\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $2\" >&5\n$as_echo_n \"checking for $2... \" >&6; }\nif eval \\${$3+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n$4\n#include <$2>\n_ACEOF\nif ac_fn_c_try_compile \"$LINENO\"; then :\n  eval \"$3=yes\"\nelse\n  eval \"$3=no\"\nfi\nrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext\nfi\neval ac_res=\\$$3\n\t       { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_res\" >&5\n$as_echo \"$ac_res\" >&6; }\n  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno\n\n} # ac_fn_c_check_header_compile\n\n# ac_fn_c_try_cpp LINENO\n# ----------------------\n# Try to preprocess conftest.$ac_ext, and return whether this succeeded.\nac_fn_c_try_cpp ()\n{\n  as_lineno=${as_lineno-\"$1\"} as_lineno_stack=as_lineno_stack=$as_lineno_stack\n  if { { ac_try=\"$ac_cpp conftest.$ac_ext\"\ncase \"(($ac_try\" in\n  *\\\"* | *\\`* | *\\\\*) ac_try_echo=\\$ac_try;;\n  *) ac_try_echo=$ac_try;;\nesac\neval ac_try_echo=\"\\\"\\$as_me:${as_lineno-$LINENO}: $ac_try_echo\\\"\"\n$as_echo \"$ac_try_echo\"; } >&5\n  (eval \"$ac_cpp conftest.$ac_ext\") 2>conftest.err\n  ac_status=$?\n  if test -s conftest.err; then\n    grep -v '^ *+' conftest.err >conftest.er1\n    cat conftest.er1 >&5\n    mv -f conftest.er1 conftest.err\n  fi\n  $as_echo \"$as_me:${as_lineno-$LINENO}: \\$? = $ac_status\" >&5\n  test $ac_status = 0; } > conftest.i && {\n\t test -z \"$ac_c_preproc_warn_flag$ac_c_werror_flag\" ||\n\t test ! -s conftest.err\n       }; then :\n  ac_retval=0\nelse\n  $as_echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\n    ac_retval=1\nfi\n  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno\n  as_fn_set_status $ac_retval\n\n} # ac_fn_c_try_cpp\n\n# ac_fn_c_try_run LINENO\n# ----------------------\n# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes\n# that executables *can* be run.\nac_fn_c_try_run ()\n{\n  as_lineno=${as_lineno-\"$1\"} as_lineno_stack=as_lineno_stack=$as_lineno_stack\n  if { { ac_try=\"$ac_link\"\ncase \"(($ac_try\" in\n  *\\\"* | *\\`* | *\\\\*) ac_try_echo=\\$ac_try;;\n  *) ac_try_echo=$ac_try;;\nesac\neval ac_try_echo=\"\\\"\\$as_me:${as_lineno-$LINENO}: $ac_try_echo\\\"\"\n$as_echo \"$ac_try_echo\"; } >&5\n  (eval \"$ac_link\") 2>&5\n  ac_status=$?\n  $as_echo \"$as_me:${as_lineno-$LINENO}: \\$? = $ac_status\" >&5\n  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'\n  { { case \"(($ac_try\" in\n  *\\\"* | *\\`* | *\\\\*) ac_try_echo=\\$ac_try;;\n  *) ac_try_echo=$ac_try;;\nesac\neval ac_try_echo=\"\\\"\\$as_me:${as_lineno-$LINENO}: $ac_try_echo\\\"\"\n$as_echo \"$ac_try_echo\"; } >&5\n  (eval \"$ac_try\") 2>&5\n  ac_status=$?\n  $as_echo \"$as_me:${as_lineno-$LINENO}: \\$? = $ac_status\" >&5\n  test $ac_status = 0; }; }; then :\n  ac_retval=0\nelse\n  $as_echo \"$as_me: program exited with status $ac_status\" >&5\n       $as_echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\n       ac_retval=$ac_status\nfi\n  rm -rf conftest.dSYM conftest_ipa8_conftest.oo\n  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno\n  as_fn_set_status $ac_retval\n\n} # ac_fn_c_try_run\n\n# ac_fn_c_check_func LINENO FUNC VAR\n# ----------------------------------\n# Tests whether FUNC exists, setting the cache variable VAR accordingly\nac_fn_c_check_func ()\n{\n  as_lineno=${as_lineno-\"$1\"} as_lineno_stack=as_lineno_stack=$as_lineno_stack\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $2\" >&5\n$as_echo_n \"checking for $2... \" >&6; }\nif eval \\${$3+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n/* Define $2 to an innocuous variant, in case <limits.h> declares $2.\n   For example, HP-UX 11i <limits.h> declares gettimeofday.  */\n#define $2 innocuous_$2\n\n/* System header to define __stub macros and hopefully few prototypes,\n    which can conflict with char $2 (); below.\n    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since\n    <limits.h> exists even on freestanding compilers.  */\n\n#ifdef __STDC__\n# include <limits.h>\n#else\n# include <assert.h>\n#endif\n\n#undef $2\n\n/* Override any GCC internal prototype to avoid an error.\n   Use char because int might match the return type of a GCC\n   builtin and then its argument prototype would still apply.  */\n#ifdef __cplusplus\nextern \"C\"\n#endif\nchar $2 ();\n/* The GNU C library defines this for functions which it implements\n    to always fail with ENOSYS.  Some functions are actually named\n    something starting with __ and the normal name is an alias.  */\n#if defined __stub_$2 || defined __stub___$2\nchoke me\n#endif\n\nint\nmain ()\n{\nreturn $2 ();\n  ;\n  return 0;\n}\n_ACEOF\nif ac_fn_c_try_link \"$LINENO\"; then :\n  eval \"$3=yes\"\nelse\n  eval \"$3=no\"\nfi\nrm -f core conftest.err conftest.$ac_objext \\\n    conftest$ac_exeext conftest.$ac_ext\nfi\neval ac_res=\\$$3\n\t       { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_res\" >&5\n$as_echo \"$ac_res\" >&6; }\n  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno\n\n} # ac_fn_c_check_func\n\n# ac_fn_cxx_try_cpp LINENO\n# ------------------------\n# Try to preprocess conftest.$ac_ext, and return whether this succeeded.\nac_fn_cxx_try_cpp ()\n{\n  as_lineno=${as_lineno-\"$1\"} as_lineno_stack=as_lineno_stack=$as_lineno_stack\n  if { { ac_try=\"$ac_cpp conftest.$ac_ext\"\ncase \"(($ac_try\" in\n  *\\\"* | *\\`* | *\\\\*) ac_try_echo=\\$ac_try;;\n  *) ac_try_echo=$ac_try;;\nesac\neval ac_try_echo=\"\\\"\\$as_me:${as_lineno-$LINENO}: $ac_try_echo\\\"\"\n$as_echo \"$ac_try_echo\"; } >&5\n  (eval \"$ac_cpp conftest.$ac_ext\") 2>conftest.err\n  ac_status=$?\n  if test -s conftest.err; then\n    grep -v '^ *+' conftest.err >conftest.er1\n    cat conftest.er1 >&5\n    mv -f conftest.er1 conftest.err\n  fi\n  $as_echo \"$as_me:${as_lineno-$LINENO}: \\$? = $ac_status\" >&5\n  test $ac_status = 0; } > conftest.i && {\n\t test -z \"$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag\" ||\n\t test ! -s conftest.err\n       }; then :\n  ac_retval=0\nelse\n  $as_echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\n    ac_retval=1\nfi\n  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno\n  as_fn_set_status $ac_retval\n\n} # ac_fn_cxx_try_cpp\n\n# ac_fn_cxx_try_link LINENO\n# -------------------------\n# Try to link conftest.$ac_ext, and return whether this succeeded.\nac_fn_cxx_try_link ()\n{\n  as_lineno=${as_lineno-\"$1\"} as_lineno_stack=as_lineno_stack=$as_lineno_stack\n  rm -f conftest.$ac_objext conftest$ac_exeext\n  if { { ac_try=\"$ac_link\"\ncase \"(($ac_try\" in\n  *\\\"* | *\\`* | *\\\\*) ac_try_echo=\\$ac_try;;\n  *) ac_try_echo=$ac_try;;\nesac\neval ac_try_echo=\"\\\"\\$as_me:${as_lineno-$LINENO}: $ac_try_echo\\\"\"\n$as_echo \"$ac_try_echo\"; } >&5\n  (eval \"$ac_link\") 2>conftest.err\n  ac_status=$?\n  if test -s conftest.err; then\n    grep -v '^ *+' conftest.err >conftest.er1\n    cat conftest.er1 >&5\n    mv -f conftest.er1 conftest.err\n  fi\n  $as_echo \"$as_me:${as_lineno-$LINENO}: \\$? = $ac_status\" >&5\n  test $ac_status = 0; } && {\n\t test -z \"$ac_cxx_werror_flag\" ||\n\t test ! -s conftest.err\n       } && test -s conftest$ac_exeext && {\n\t test \"$cross_compiling\" = yes ||\n\t test -x conftest$ac_exeext\n       }; then :\n  ac_retval=0\nelse\n  $as_echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\n\tac_retval=1\nfi\n  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information\n  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would\n  # interfere with the next link command; also delete a directory that is\n  # left behind by Apple's compiler.  We do this before executing the actions.\n  rm -rf conftest.dSYM conftest_ipa8_conftest.oo\n  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno\n  as_fn_set_status $ac_retval\n\n} # ac_fn_cxx_try_link\ncat >config.log <<_ACEOF\nThis file contains any messages produced by compilers while\nrunning configure, to aid debugging if configure makes a mistake.\n\nIt was created by PortAudioCpp $as_me 12, which was\ngenerated by GNU Autoconf 2.69.  Invocation command line was\n\n  $ $0 $@\n\n_ACEOF\nexec 5>>config.log\n{\ncat <<_ASUNAME\n## --------- ##\n## Platform. ##\n## --------- ##\n\nhostname = `(hostname || uname -n) 2>/dev/null | sed 1q`\nuname -m = `(uname -m) 2>/dev/null || echo unknown`\nuname -r = `(uname -r) 2>/dev/null || echo unknown`\nuname -s = `(uname -s) 2>/dev/null || echo unknown`\nuname -v = `(uname -v) 2>/dev/null || echo unknown`\n\n/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`\n/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`\n\n/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`\n/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`\n/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`\n/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`\n/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`\n/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`\n/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`\n\n_ASUNAME\n\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    $as_echo \"PATH: $as_dir\"\n  done\nIFS=$as_save_IFS\n\n} >&5\n\ncat >&5 <<_ACEOF\n\n\n## ----------- ##\n## Core tests. ##\n## ----------- ##\n\n_ACEOF\n\n\n# Keep a trace of the command line.\n# Strip out --no-create and --no-recursion so they do not pile up.\n# Strip out --silent because we don't want to record it for future runs.\n# Also quote any args containing shell meta-characters.\n# Make two passes to allow for proper duplicate-argument suppression.\nac_configure_args=\nac_configure_args0=\nac_configure_args1=\nac_must_keep_next=false\nfor ac_pass in 1 2\ndo\n  for ac_arg\n  do\n    case $ac_arg in\n    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;\n    -q | -quiet | --quiet | --quie | --qui | --qu | --q \\\n    | -silent | --silent | --silen | --sile | --sil)\n      continue ;;\n    *\\'*)\n      ac_arg=`$as_echo \"$ac_arg\" | sed \"s/'/'\\\\\\\\\\\\\\\\''/g\"` ;;\n    esac\n    case $ac_pass in\n    1) as_fn_append ac_configure_args0 \" '$ac_arg'\" ;;\n    2)\n      as_fn_append ac_configure_args1 \" '$ac_arg'\"\n      if test $ac_must_keep_next = true; then\n\tac_must_keep_next=false # Got value, back to normal.\n      else\n\tcase $ac_arg in\n\t  *=* | --config-cache | -C | -disable-* | --disable-* \\\n\t  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \\\n\t  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \\\n\t  | -with-* | --with-* | -without-* | --without-* | --x)\n\t    case \"$ac_configure_args0 \" in\n\t      \"$ac_configure_args1\"*\" '$ac_arg' \"* ) continue ;;\n\t    esac\n\t    ;;\n\t  -* ) ac_must_keep_next=true ;;\n\tesac\n      fi\n      as_fn_append ac_configure_args \" '$ac_arg'\"\n      ;;\n    esac\n  done\ndone\n{ ac_configure_args0=; unset ac_configure_args0;}\n{ ac_configure_args1=; unset ac_configure_args1;}\n\n# When interrupted or exit'd, cleanup temporary files, and complete\n# config.log.  We remove comments because anyway the quotes in there\n# would cause problems or look ugly.\n# WARNING: Use '\\'' to represent an apostrophe within the trap.\n# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.\ntrap 'exit_status=$?\n  # Save into config.log some information that might help in debugging.\n  {\n    echo\n\n    $as_echo \"## ---------------- ##\n## Cache variables. ##\n## ---------------- ##\"\n    echo\n    # The following way of writing the cache mishandles newlines in values,\n(\n  for ac_var in `(set) 2>&1 | sed -n '\\''s/^\\([a-zA-Z_][a-zA-Z0-9_]*\\)=.*/\\1/p'\\''`; do\n    eval ac_val=\\$$ac_var\n    case $ac_val in #(\n    *${as_nl}*)\n      case $ac_var in #(\n      *_cv_*) { $as_echo \"$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline\" >&5\n$as_echo \"$as_me: WARNING: cache variable $ac_var contains a newline\" >&2;} ;;\n      esac\n      case $ac_var in #(\n      _ | IFS | as_nl) ;; #(\n      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(\n      *) { eval $ac_var=; unset $ac_var;} ;;\n      esac ;;\n    esac\n  done\n  (set) 2>&1 |\n    case $as_nl`(ac_space='\\'' '\\''; set) 2>&1` in #(\n    *${as_nl}ac_space=\\ *)\n      sed -n \\\n\t\"s/'\\''/'\\''\\\\\\\\'\\'''\\''/g;\n\t  s/^\\\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\\\)=\\\\(.*\\\\)/\\\\1='\\''\\\\2'\\''/p\"\n      ;; #(\n    *)\n      sed -n \"/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p\"\n      ;;\n    esac |\n    sort\n)\n    echo\n\n    $as_echo \"## ----------------- ##\n## Output variables. ##\n## ----------------- ##\"\n    echo\n    for ac_var in $ac_subst_vars\n    do\n      eval ac_val=\\$$ac_var\n      case $ac_val in\n      *\\'\\''*) ac_val=`$as_echo \"$ac_val\" | sed \"s/'\\''/'\\''\\\\\\\\\\\\\\\\'\\'''\\''/g\"`;;\n      esac\n      $as_echo \"$ac_var='\\''$ac_val'\\''\"\n    done | sort\n    echo\n\n    if test -n \"$ac_subst_files\"; then\n      $as_echo \"## ------------------- ##\n## File substitutions. ##\n## ------------------- ##\"\n      echo\n      for ac_var in $ac_subst_files\n      do\n\teval ac_val=\\$$ac_var\n\tcase $ac_val in\n\t*\\'\\''*) ac_val=`$as_echo \"$ac_val\" | sed \"s/'\\''/'\\''\\\\\\\\\\\\\\\\'\\'''\\''/g\"`;;\n\tesac\n\t$as_echo \"$ac_var='\\''$ac_val'\\''\"\n      done | sort\n      echo\n    fi\n\n    if test -s confdefs.h; then\n      $as_echo \"## ----------- ##\n## confdefs.h. ##\n## ----------- ##\"\n      echo\n      cat confdefs.h\n      echo\n    fi\n    test \"$ac_signal\" != 0 &&\n      $as_echo \"$as_me: caught signal $ac_signal\"\n    $as_echo \"$as_me: exit $exit_status\"\n  } >&5\n  rm -f core *.core core.conftest.* &&\n    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&\n    exit $exit_status\n' 0\nfor ac_signal in 1 2 13 15; do\n  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal\ndone\nac_signal=0\n\n# confdefs.h avoids OS command line length limits that DEFS can exceed.\nrm -f -r conftest* confdefs.h\n\n$as_echo \"/* confdefs.h */\" > confdefs.h\n\n# Predefined preprocessor variables.\n\ncat >>confdefs.h <<_ACEOF\n#define PACKAGE_NAME \"$PACKAGE_NAME\"\n_ACEOF\n\ncat >>confdefs.h <<_ACEOF\n#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"\n_ACEOF\n\ncat >>confdefs.h <<_ACEOF\n#define PACKAGE_VERSION \"$PACKAGE_VERSION\"\n_ACEOF\n\ncat >>confdefs.h <<_ACEOF\n#define PACKAGE_STRING \"$PACKAGE_STRING\"\n_ACEOF\n\ncat >>confdefs.h <<_ACEOF\n#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"\n_ACEOF\n\ncat >>confdefs.h <<_ACEOF\n#define PACKAGE_URL \"$PACKAGE_URL\"\n_ACEOF\n\n\n# Let the site file select an alternate cache file if it wants to.\n# Prefer an explicitly selected file to automatically selected ones.\nac_site_file1=NONE\nac_site_file2=NONE\nif test -n \"$CONFIG_SITE\"; then\n  # We do not want a PATH search for config.site.\n  case $CONFIG_SITE in #((\n    -*)  ac_site_file1=./$CONFIG_SITE;;\n    */*) ac_site_file1=$CONFIG_SITE;;\n    *)   ac_site_file1=./$CONFIG_SITE;;\n  esac\nelif test \"x$prefix\" != xNONE; then\n  ac_site_file1=$prefix/share/config.site\n  ac_site_file2=$prefix/etc/config.site\nelse\n  ac_site_file1=$ac_default_prefix/share/config.site\n  ac_site_file2=$ac_default_prefix/etc/config.site\nfi\nfor ac_site_file in \"$ac_site_file1\" \"$ac_site_file2\"\ndo\n  test \"x$ac_site_file\" = xNONE && continue\n  if test /dev/null != \"$ac_site_file\" && test -r \"$ac_site_file\"; then\n    { $as_echo \"$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file\" >&5\n$as_echo \"$as_me: loading site script $ac_site_file\" >&6;}\n    sed 's/^/| /' \"$ac_site_file\" >&5\n    . \"$ac_site_file\" \\\n      || { { $as_echo \"$as_me:${as_lineno-$LINENO}: error: in \\`$ac_pwd':\" >&5\n$as_echo \"$as_me: error: in \\`$ac_pwd':\" >&2;}\nas_fn_error $? \"failed to load site script $ac_site_file\nSee \\`config.log' for more details\" \"$LINENO\" 5; }\n  fi\ndone\n\nif test -r \"$cache_file\"; then\n  # Some versions of bash will fail to source /dev/null (special files\n  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.\n  if test /dev/null != \"$cache_file\" && test -f \"$cache_file\"; then\n    { $as_echo \"$as_me:${as_lineno-$LINENO}: loading cache $cache_file\" >&5\n$as_echo \"$as_me: loading cache $cache_file\" >&6;}\n    case $cache_file in\n      [\\\\/]* | ?:[\\\\/]* ) . \"$cache_file\";;\n      *)                      . \"./$cache_file\";;\n    esac\n  fi\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: creating cache $cache_file\" >&5\n$as_echo \"$as_me: creating cache $cache_file\" >&6;}\n  >$cache_file\nfi\n\n# Check that the precious variables saved in the cache have kept the same\n# value.\nac_cache_corrupted=false\nfor ac_var in $ac_precious_vars; do\n  eval ac_old_set=\\$ac_cv_env_${ac_var}_set\n  eval ac_new_set=\\$ac_env_${ac_var}_set\n  eval ac_old_val=\\$ac_cv_env_${ac_var}_value\n  eval ac_new_val=\\$ac_env_${ac_var}_value\n  case $ac_old_set,$ac_new_set in\n    set,)\n      { $as_echo \"$as_me:${as_lineno-$LINENO}: error: \\`$ac_var' was set to \\`$ac_old_val' in the previous run\" >&5\n$as_echo \"$as_me: error: \\`$ac_var' was set to \\`$ac_old_val' in the previous run\" >&2;}\n      ac_cache_corrupted=: ;;\n    ,set)\n      { $as_echo \"$as_me:${as_lineno-$LINENO}: error: \\`$ac_var' was not set in the previous run\" >&5\n$as_echo \"$as_me: error: \\`$ac_var' was not set in the previous run\" >&2;}\n      ac_cache_corrupted=: ;;\n    ,);;\n    *)\n      if test \"x$ac_old_val\" != \"x$ac_new_val\"; then\n\t# differences in whitespace do not lead to failure.\n\tac_old_val_w=`echo x $ac_old_val`\n\tac_new_val_w=`echo x $ac_new_val`\n\tif test \"$ac_old_val_w\" != \"$ac_new_val_w\"; then\n\t  { $as_echo \"$as_me:${as_lineno-$LINENO}: error: \\`$ac_var' has changed since the previous run:\" >&5\n$as_echo \"$as_me: error: \\`$ac_var' has changed since the previous run:\" >&2;}\n\t  ac_cache_corrupted=:\n\telse\n\t  { $as_echo \"$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \\`$ac_var' since the previous run:\" >&5\n$as_echo \"$as_me: warning: ignoring whitespace changes in \\`$ac_var' since the previous run:\" >&2;}\n\t  eval $ac_var=\\$ac_old_val\n\tfi\n\t{ $as_echo \"$as_me:${as_lineno-$LINENO}:   former value:  \\`$ac_old_val'\" >&5\n$as_echo \"$as_me:   former value:  \\`$ac_old_val'\" >&2;}\n\t{ $as_echo \"$as_me:${as_lineno-$LINENO}:   current value: \\`$ac_new_val'\" >&5\n$as_echo \"$as_me:   current value: \\`$ac_new_val'\" >&2;}\n      fi;;\n  esac\n  # Pass precious variables to config.status.\n  if test \"$ac_new_set\" = set; then\n    case $ac_new_val in\n    *\\'*) ac_arg=$ac_var=`$as_echo \"$ac_new_val\" | sed \"s/'/'\\\\\\\\\\\\\\\\''/g\"` ;;\n    *) ac_arg=$ac_var=$ac_new_val ;;\n    esac\n    case \" $ac_configure_args \" in\n      *\" '$ac_arg' \"*) ;; # Avoid dups.  Use of quotes ensures accuracy.\n      *) as_fn_append ac_configure_args \" '$ac_arg'\" ;;\n    esac\n  fi\ndone\nif $ac_cache_corrupted; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: error: in \\`$ac_pwd':\" >&5\n$as_echo \"$as_me: error: in \\`$ac_pwd':\" >&2;}\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build\" >&5\n$as_echo \"$as_me: error: changes in the environment can compromise the build\" >&2;}\n  as_fn_error $? \"run \\`make distclean' and/or \\`rm $cache_file' and start over\" \"$LINENO\" 5\nfi\n## -------------------- ##\n## Main body of script. ##\n## -------------------- ##\n\nac_ext=c\nac_cpp='$CPP $CPPFLAGS'\nac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'\nac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'\nac_compiler_gnu=$ac_cv_c_compiler_gnu\n\n\n\nam__api_version='1.14'\n\nac_aux_dir=\nfor ac_dir in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"; do\n  if test -f \"$ac_dir/install-sh\"; then\n    ac_aux_dir=$ac_dir\n    ac_install_sh=\"$ac_aux_dir/install-sh -c\"\n    break\n  elif test -f \"$ac_dir/install.sh\"; then\n    ac_aux_dir=$ac_dir\n    ac_install_sh=\"$ac_aux_dir/install.sh -c\"\n    break\n  elif test -f \"$ac_dir/shtool\"; then\n    ac_aux_dir=$ac_dir\n    ac_install_sh=\"$ac_aux_dir/shtool install -c\"\n    break\n  fi\ndone\nif test -z \"$ac_aux_dir\"; then\n  as_fn_error $? \"cannot find install-sh, install.sh, or shtool in \\\"$srcdir\\\" \\\"$srcdir/..\\\" \\\"$srcdir/../..\\\"\" \"$LINENO\" 5\nfi\n\n# These three variables are undocumented and unsupported,\n# and are intended to be withdrawn in a future Autoconf release.\n# They can cause serious problems if a builder's source tree is in a directory\n# whose full name contains unusual characters.\nac_config_guess=\"$SHELL $ac_aux_dir/config.guess\"  # Please don't use this var.\nac_config_sub=\"$SHELL $ac_aux_dir/config.sub\"  # Please don't use this var.\nac_configure=\"$SHELL $ac_aux_dir/configure\"  # Please don't use this var.\n\n\n# Find a good install program.  We prefer a C program (faster),\n# so one script is as good as another.  But avoid the broken or\n# incompatible versions:\n# SysV /etc/install, /usr/sbin/install\n# SunOS /usr/etc/install\n# IRIX /sbin/install\n# AIX /bin/install\n# AmigaOS /C/install, which installs bootblocks on floppy discs\n# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag\n# AFS /usr/afsws/bin/install, which mishandles nonexistent args\n# SVR4 /usr/ucb/install, which tries to use the nonexistent group \"staff\"\n# OS/2's system install, which has a completely different semantic\n# ./install, which can be erroneously created by make from ./install.sh.\n# Reject install programs that cannot install multiple files.\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install\" >&5\n$as_echo_n \"checking for a BSD-compatible install... \" >&6; }\nif test -z \"$INSTALL\"; then\nif ${ac_cv_path_install+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    # Account for people who put trailing slashes in PATH elements.\ncase $as_dir/ in #((\n  ./ | .// | /[cC]/* | \\\n  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \\\n  ?:[\\\\/]os2[\\\\/]install[\\\\/]* | ?:[\\\\/]OS2[\\\\/]INSTALL[\\\\/]* | \\\n  /usr/ucb/* ) ;;\n  *)\n    # OSF1 and SCO ODT 3.0 have their own names for install.\n    # Don't use installbsd from OSF since it installs stuff as root\n    # by default.\n    for ac_prog in ginstall scoinst install; do\n      for ac_exec_ext in '' $ac_executable_extensions; do\n\tif as_fn_executable_p \"$as_dir/$ac_prog$ac_exec_ext\"; then\n\t  if test $ac_prog = install &&\n\t    grep dspmsg \"$as_dir/$ac_prog$ac_exec_ext\" >/dev/null 2>&1; then\n\t    # AIX install.  It has an incompatible calling convention.\n\t    :\n\t  elif test $ac_prog = install &&\n\t    grep pwplus \"$as_dir/$ac_prog$ac_exec_ext\" >/dev/null 2>&1; then\n\t    # program-specific install script used by HP pwplus--don't use.\n\t    :\n\t  else\n\t    rm -rf conftest.one conftest.two conftest.dir\n\t    echo one > conftest.one\n\t    echo two > conftest.two\n\t    mkdir conftest.dir\n\t    if \"$as_dir/$ac_prog$ac_exec_ext\" -c conftest.one conftest.two \"`pwd`/conftest.dir\" &&\n\t      test -s conftest.one && test -s conftest.two &&\n\t      test -s conftest.dir/conftest.one &&\n\t      test -s conftest.dir/conftest.two\n\t    then\n\t      ac_cv_path_install=\"$as_dir/$ac_prog$ac_exec_ext -c\"\n\t      break 3\n\t    fi\n\t  fi\n\tfi\n      done\n    done\n    ;;\nesac\n\n  done\nIFS=$as_save_IFS\n\nrm -rf conftest.one conftest.two conftest.dir\n\nfi\n  if test \"${ac_cv_path_install+set}\" = set; then\n    INSTALL=$ac_cv_path_install\n  else\n    # As a last resort, use the slow shell script.  Don't cache a\n    # value for INSTALL within a source directory, because that will\n    # break other packages using the cache if that directory is\n    # removed, or if the value is a relative name.\n    INSTALL=$ac_install_sh\n  fi\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $INSTALL\" >&5\n$as_echo \"$INSTALL\" >&6; }\n\n# Use test -z because SunOS4 sh mishandles braces in ${var-val}.\n# It thinks the first close brace ends the variable substitution.\ntest -z \"$INSTALL_PROGRAM\" && INSTALL_PROGRAM='${INSTALL}'\n\ntest -z \"$INSTALL_SCRIPT\" && INSTALL_SCRIPT='${INSTALL}'\n\ntest -z \"$INSTALL_DATA\" && INSTALL_DATA='${INSTALL} -m 644'\n\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking whether build environment is sane\" >&5\n$as_echo_n \"checking whether build environment is sane... \" >&6; }\n# Reject unsafe characters in $srcdir or the absolute working directory\n# name.  Accept space and tab only in the latter.\nam_lf='\n'\ncase `pwd` in\n  *[\\\\\\\"\\#\\$\\&\\'\\`$am_lf]*)\n    as_fn_error $? \"unsafe absolute working directory name\" \"$LINENO\" 5;;\nesac\ncase $srcdir in\n  *[\\\\\\\"\\#\\$\\&\\'\\`$am_lf\\ \\\t]*)\n    as_fn_error $? \"unsafe srcdir value: '$srcdir'\" \"$LINENO\" 5;;\nesac\n\n# Do 'set' in a subshell so we don't clobber the current shell's\n# arguments.  Must try -L first in case configure is actually a\n# symlink; some systems play weird games with the mod time of symlinks\n# (eg FreeBSD returns the mod time of the symlink's containing\n# directory).\nif (\n   am_has_slept=no\n   for am_try in 1 2; do\n     echo \"timestamp, slept: $am_has_slept\" > conftest.file\n     set X `ls -Lt \"$srcdir/configure\" conftest.file 2> /dev/null`\n     if test \"$*\" = \"X\"; then\n\t# -L didn't work.\n\tset X `ls -t \"$srcdir/configure\" conftest.file`\n     fi\n     if test \"$*\" != \"X $srcdir/configure conftest.file\" \\\n\t&& test \"$*\" != \"X conftest.file $srcdir/configure\"; then\n\n\t# If neither matched, then we have a broken ls.  This can happen\n\t# if, for instance, CONFIG_SHELL is bash and it inherits a\n\t# broken ls alias from the environment.  This has actually\n\t# happened.  Such a system could not be considered \"sane\".\n\tas_fn_error $? \"ls -t appears to fail.  Make sure there is not a broken\n  alias in your environment\" \"$LINENO\" 5\n     fi\n     if test \"$2\" = conftest.file || test $am_try -eq 2; then\n       break\n     fi\n     # Just in case.\n     sleep 1\n     am_has_slept=yes\n   done\n   test \"$2\" = conftest.file\n   )\nthen\n   # Ok.\n   :\nelse\n   as_fn_error $? \"newly created file is older than distributed files!\nCheck your system clock\" \"$LINENO\" 5\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: yes\" >&5\n$as_echo \"yes\" >&6; }\n# If we didn't sleep, we still need to ensure time stamps of config.status and\n# generated files are strictly newer.\nam_sleep_pid=\nif grep 'slept: no' conftest.file >/dev/null 2>&1; then\n  ( sleep 1 ) &\n  am_sleep_pid=$!\nfi\n\nrm -f conftest.file\n\ntest \"$program_prefix\" != NONE &&\n  program_transform_name=\"s&^&$program_prefix&;$program_transform_name\"\n# Use a double $ so make ignores it.\ntest \"$program_suffix\" != NONE &&\n  program_transform_name=\"s&\\$&$program_suffix&;$program_transform_name\"\n# Double any \\ or $.\n# By default was `s,x,x', remove it if useless.\nac_script='s/[\\\\$]/&&/g;s/;s,x,x,$//'\nprogram_transform_name=`$as_echo \"$program_transform_name\" | sed \"$ac_script\"`\n\n# expand $ac_aux_dir to an absolute path\nam_aux_dir=`cd $ac_aux_dir && pwd`\n\nif test x\"${MISSING+set}\" != xset; then\n  case $am_aux_dir in\n  *\\ * | *\\\t*)\n    MISSING=\"\\${SHELL} \\\"$am_aux_dir/missing\\\"\" ;;\n  *)\n    MISSING=\"\\${SHELL} $am_aux_dir/missing\" ;;\n  esac\nfi\n# Use eval to expand $SHELL\nif eval \"$MISSING --is-lightweight\"; then\n  am_missing_run=\"$MISSING \"\nelse\n  am_missing_run=\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing\" >&5\n$as_echo \"$as_me: WARNING: 'missing' script is too old or missing\" >&2;}\nfi\n\nif test x\"${install_sh}\" != xset; then\n  case $am_aux_dir in\n  *\\ * | *\\\t*)\n    install_sh=\"\\${SHELL} '$am_aux_dir/install-sh'\" ;;\n  *)\n    install_sh=\"\\${SHELL} $am_aux_dir/install-sh\"\n  esac\nfi\n\n# Installed binaries are usually stripped using 'strip' when the user\n# run \"make install-strip\".  However 'strip' might not be the right\n# tool to use in cross-compilation environments, therefore Automake\n# will honor the 'STRIP' environment variable to overrule this program.\nif test \"$cross_compiling\" != no; then\n  if test -n \"$ac_tool_prefix\"; then\n  # Extract the first word of \"${ac_tool_prefix}strip\", so it can be a program name with args.\nset dummy ${ac_tool_prefix}strip; ac_word=$2\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $ac_word\" >&5\n$as_echo_n \"checking for $ac_word... \" >&6; }\nif ${ac_cv_prog_STRIP+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if test -n \"$STRIP\"; then\n  ac_cv_prog_STRIP=\"$STRIP\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    for ac_exec_ext in '' $ac_executable_extensions; do\n  if as_fn_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_STRIP=\"${ac_tool_prefix}strip\"\n    $as_echo \"$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\n  done\nIFS=$as_save_IFS\n\nfi\nfi\nSTRIP=$ac_cv_prog_STRIP\nif test -n \"$STRIP\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $STRIP\" >&5\n$as_echo \"$STRIP\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\nfi\n\n\nfi\nif test -z \"$ac_cv_prog_STRIP\"; then\n  ac_ct_STRIP=$STRIP\n  # Extract the first word of \"strip\", so it can be a program name with args.\nset dummy strip; ac_word=$2\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $ac_word\" >&5\n$as_echo_n \"checking for $ac_word... \" >&6; }\nif ${ac_cv_prog_ac_ct_STRIP+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if test -n \"$ac_ct_STRIP\"; then\n  ac_cv_prog_ac_ct_STRIP=\"$ac_ct_STRIP\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    for ac_exec_ext in '' $ac_executable_extensions; do\n  if as_fn_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_ac_ct_STRIP=\"strip\"\n    $as_echo \"$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\n  done\nIFS=$as_save_IFS\n\nfi\nfi\nac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP\nif test -n \"$ac_ct_STRIP\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP\" >&5\n$as_echo \"$ac_ct_STRIP\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\nfi\n\n  if test \"x$ac_ct_STRIP\" = x; then\n    STRIP=\":\"\n  else\n    case $cross_compiling:$ac_tool_warned in\nyes:)\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet\" >&5\n$as_echo \"$as_me: WARNING: using cross tools not prefixed with host triplet\" >&2;}\nac_tool_warned=yes ;;\nesac\n    STRIP=$ac_ct_STRIP\n  fi\nelse\n  STRIP=\"$ac_cv_prog_STRIP\"\nfi\n\nfi\nINSTALL_STRIP_PROGRAM=\"\\$(install_sh) -c -s\"\n\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p\" >&5\n$as_echo_n \"checking for a thread-safe mkdir -p... \" >&6; }\nif test -z \"$MKDIR_P\"; then\n  if ${ac_cv_path_mkdir+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    for ac_prog in mkdir gmkdir; do\n\t for ac_exec_ext in '' $ac_executable_extensions; do\n\t   as_fn_executable_p \"$as_dir/$ac_prog$ac_exec_ext\" || continue\n\t   case `\"$as_dir/$ac_prog$ac_exec_ext\" --version 2>&1` in #(\n\t     'mkdir (GNU coreutils) '* | \\\n\t     'mkdir (coreutils) '* | \\\n\t     'mkdir (fileutils) '4.1*)\n\t       ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext\n\t       break 3;;\n\t   esac\n\t done\n       done\n  done\nIFS=$as_save_IFS\n\nfi\n\n  test -d ./--version && rmdir ./--version\n  if test \"${ac_cv_path_mkdir+set}\" = set; then\n    MKDIR_P=\"$ac_cv_path_mkdir -p\"\n  else\n    # As a last resort, use the slow shell script.  Don't cache a\n    # value for MKDIR_P within a source directory, because that will\n    # break other packages using the cache if that directory is\n    # removed, or if the value is a relative name.\n    MKDIR_P=\"$ac_install_sh -d\"\n  fi\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $MKDIR_P\" >&5\n$as_echo \"$MKDIR_P\" >&6; }\n\nfor ac_prog in gawk mawk nawk awk\ndo\n  # Extract the first word of \"$ac_prog\", so it can be a program name with args.\nset dummy $ac_prog; ac_word=$2\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $ac_word\" >&5\n$as_echo_n \"checking for $ac_word... \" >&6; }\nif ${ac_cv_prog_AWK+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if test -n \"$AWK\"; then\n  ac_cv_prog_AWK=\"$AWK\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    for ac_exec_ext in '' $ac_executable_extensions; do\n  if as_fn_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_AWK=\"$ac_prog\"\n    $as_echo \"$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\n  done\nIFS=$as_save_IFS\n\nfi\nfi\nAWK=$ac_cv_prog_AWK\nif test -n \"$AWK\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $AWK\" >&5\n$as_echo \"$AWK\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\nfi\n\n\n  test -n \"$AWK\" && break\ndone\n\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \\$(MAKE)\" >&5\n$as_echo_n \"checking whether ${MAKE-make} sets \\$(MAKE)... \" >&6; }\nset x ${MAKE-make}\nac_make=`$as_echo \"$2\" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`\nif eval \\${ac_cv_prog_make_${ac_make}_set+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  cat >conftest.make <<\\_ACEOF\nSHELL = /bin/sh\nall:\n\t@echo '@@@%%%=$(MAKE)=@@@%%%'\n_ACEOF\n# GNU make sometimes prints \"make[1]: Entering ...\", which would confuse us.\ncase `${MAKE-make} -f conftest.make 2>/dev/null` in\n  *@@@%%%=?*=@@@%%%*)\n    eval ac_cv_prog_make_${ac_make}_set=yes;;\n  *)\n    eval ac_cv_prog_make_${ac_make}_set=no;;\nesac\nrm -f conftest.make\nfi\nif eval test \\$ac_cv_prog_make_${ac_make}_set = yes; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: yes\" >&5\n$as_echo \"yes\" >&6; }\n  SET_MAKE=\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\n  SET_MAKE=\"MAKE=${MAKE-make}\"\nfi\n\nrm -rf .tst 2>/dev/null\nmkdir .tst 2>/dev/null\nif test -d .tst; then\n  am__leading_dot=.\nelse\n  am__leading_dot=_\nfi\nrmdir .tst 2>/dev/null\n\n# Check whether --enable-silent-rules was given.\nif test \"${enable_silent_rules+set}\" = set; then :\n  enableval=$enable_silent_rules;\nfi\n\ncase $enable_silent_rules in # (((\n  yes) AM_DEFAULT_VERBOSITY=0;;\n   no) AM_DEFAULT_VERBOSITY=1;;\n    *) AM_DEFAULT_VERBOSITY=1;;\nesac\nam_make=${MAKE-make}\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables\" >&5\n$as_echo_n \"checking whether $am_make supports nested variables... \" >&6; }\nif ${am_cv_make_support_nested_variables+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if $as_echo 'TRUE=$(BAR$(V))\nBAR0=false\nBAR1=true\nV=1\nam__doit:\n\t@$(TRUE)\n.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then\n  am_cv_make_support_nested_variables=yes\nelse\n  am_cv_make_support_nested_variables=no\nfi\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables\" >&5\n$as_echo \"$am_cv_make_support_nested_variables\" >&6; }\nif test $am_cv_make_support_nested_variables = yes; then\n    AM_V='$(V)'\n  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'\nelse\n  AM_V=$AM_DEFAULT_VERBOSITY\n  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY\nfi\nAM_BACKSLASH='\\'\n\nif test \"`cd $srcdir && pwd`\" != \"`pwd`\"; then\n  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output\n  # is not polluted with repeated \"-I.\"\n  am__isrc=' -I$(srcdir)'\n  # test to see if srcdir already configured\n  if test -f $srcdir/config.status; then\n    as_fn_error $? \"source directory already configured; run \\\"make distclean\\\" there first\" \"$LINENO\" 5\n  fi\nfi\n\n# test whether we have cygpath\nif test -z \"$CYGPATH_W\"; then\n  if (cygpath --version) >/dev/null 2>/dev/null; then\n    CYGPATH_W='cygpath -w'\n  else\n    CYGPATH_W=echo\n  fi\nfi\n\n\n# Define the identity of the package.\n PACKAGE='portaudiocpp'\n VERSION='12'\n\n\ncat >>confdefs.h <<_ACEOF\n#define PACKAGE \"$PACKAGE\"\n_ACEOF\n\n\ncat >>confdefs.h <<_ACEOF\n#define VERSION \"$VERSION\"\n_ACEOF\n\n# Some tools Automake needs.\n\nACLOCAL=${ACLOCAL-\"${am_missing_run}aclocal-${am__api_version}\"}\n\n\nAUTOCONF=${AUTOCONF-\"${am_missing_run}autoconf\"}\n\n\nAUTOMAKE=${AUTOMAKE-\"${am_missing_run}automake-${am__api_version}\"}\n\n\nAUTOHEADER=${AUTOHEADER-\"${am_missing_run}autoheader\"}\n\n\nMAKEINFO=${MAKEINFO-\"${am_missing_run}makeinfo\"}\n\n# For better backward compatibility.  To be removed once Automake 1.9.x\n# dies out for good.  For more background, see:\n# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>\n# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>\nmkdir_p='$(MKDIR_P)'\n\n# We need awk for the \"check\" target.  The system \"awk\" is bad on\n# some platforms.\n# Always define AMTAR for backward compatibility.  Yes, it's still used\n# in the wild :-(  We should find a proper way to deprecate it ...\nAMTAR='$${TAR-tar}'\n\n\n# We'll loop over all known methods to create a tar archive until one works.\n_am_tools='gnutar  pax cpio none'\n\nam__tar='$${TAR-tar} chof - \"$$tardir\"' am__untar='$${TAR-tar} xf -'\n\n\n\n\n\n\n# POSIX will say in a future version that running \"rm -f\" with no argument\n# is OK; and we want to be able to make that assumption in our Makefile\n# recipes.  So use an aggressive probe to check that the usage we want is\n# actually supported \"in the wild\" to an acceptable degree.\n# See automake bug#10828.\n# To make any issue more visible, cause the running configure to be aborted\n# by default if the 'rm' program in use doesn't match our expectations; the\n# user can still override this though.\nif rm -f && rm -fr && rm -rf; then : OK; else\n  cat >&2 <<'END'\nOops!\n\nYour 'rm' program seems unable to run without file operands specified\non the command line, even when the '-f' option is present.  This is contrary\nto the behaviour of most rm programs out there, and not conforming with\nthe upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>\n\nPlease tell bug-automake@gnu.org about your system, including the value\nof your $PATH and any error possibly output before this message.  This\ncan help us improve future automake versions.\n\nEND\n  if test x\"$ACCEPT_INFERIOR_RM_PROGRAM\" = x\"yes\"; then\n    echo 'Configuration will proceed anyway, since you have set the' >&2\n    echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to \"yes\"' >&2\n    echo >&2\n  else\n    cat >&2 <<'END'\nAborting the configuration process, to ensure you take notice of the issue.\n\nYou can download and install GNU coreutils to get an 'rm' implementation\nthat behaves properly: <http://www.gnu.org/software/coreutils/>.\n\nIf you want to complete the configuration process using your problematic\n'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM\nto \"yes\", and re-run configure.\n\nEND\n    as_fn_error $? \"Your 'rm' program is bad, sorry.\" \"$LINENO\" 5\n  fi\nfi\n\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles\" >&5\n$as_echo_n \"checking whether to enable maintainer-specific portions of Makefiles... \" >&6; }\n    # Check whether --enable-maintainer-mode was given.\nif test \"${enable_maintainer_mode+set}\" = set; then :\n  enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval\nelse\n  USE_MAINTAINER_MODE=no\nfi\n\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE\" >&5\n$as_echo \"$USE_MAINTAINER_MODE\" >&6; }\n   if test $USE_MAINTAINER_MODE = yes; then\n  MAINTAINER_MODE_TRUE=\n  MAINTAINER_MODE_FALSE='#'\nelse\n  MAINTAINER_MODE_TRUE='#'\n  MAINTAINER_MODE_FALSE=\nfi\n\n  MAINT=$MAINTAINER_MODE_TRUE\n\n\n\n###### Top-level directory of pacpp\n###### This makes it easy to shuffle the build directories\n###### Also edit AC_CONFIG_SRCDIR above (wouldn't accept this variable)!\nPACPP_ROOT=\"\\$(top_srcdir)\"\nPORTAUDIO_ROOT=\"../..\"\n\n# Various other variables and flags\nDEFAULT_INCLUDES=\"-I$PACPP_ROOT/include -I$PACPP_ROOT/$PORTAUDIO_ROOT/include\"\nCFLAGS=${CFLAGS-\"-g -O2 -Wall -ansi -pedantic\"}\nCXXFLAGS=${CXXFLAGS-\"${CFLAGS}\"}\n\nLT_VERSION_INFO=\"0:12:0\"\n\n# Checks for programs\n\nac_ext=c\nac_cpp='$CPP $CPPFLAGS'\nac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'\nac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'\nac_compiler_gnu=$ac_cv_c_compiler_gnu\nif test -n \"$ac_tool_prefix\"; then\n  # Extract the first word of \"${ac_tool_prefix}gcc\", so it can be a program name with args.\nset dummy ${ac_tool_prefix}gcc; ac_word=$2\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $ac_word\" >&5\n$as_echo_n \"checking for $ac_word... \" >&6; }\nif ${ac_cv_prog_CC+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if test -n \"$CC\"; then\n  ac_cv_prog_CC=\"$CC\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    for ac_exec_ext in '' $ac_executable_extensions; do\n  if as_fn_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_CC=\"${ac_tool_prefix}gcc\"\n    $as_echo \"$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\n  done\nIFS=$as_save_IFS\n\nfi\nfi\nCC=$ac_cv_prog_CC\nif test -n \"$CC\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $CC\" >&5\n$as_echo \"$CC\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\nfi\n\n\nfi\nif test -z \"$ac_cv_prog_CC\"; then\n  ac_ct_CC=$CC\n  # Extract the first word of \"gcc\", so it can be a program name with args.\nset dummy gcc; ac_word=$2\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $ac_word\" >&5\n$as_echo_n \"checking for $ac_word... \" >&6; }\nif ${ac_cv_prog_ac_ct_CC+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if test -n \"$ac_ct_CC\"; then\n  ac_cv_prog_ac_ct_CC=\"$ac_ct_CC\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    for ac_exec_ext in '' $ac_executable_extensions; do\n  if as_fn_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_ac_ct_CC=\"gcc\"\n    $as_echo \"$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\n  done\nIFS=$as_save_IFS\n\nfi\nfi\nac_ct_CC=$ac_cv_prog_ac_ct_CC\nif test -n \"$ac_ct_CC\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC\" >&5\n$as_echo \"$ac_ct_CC\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\nfi\n\n  if test \"x$ac_ct_CC\" = x; then\n    CC=\"\"\n  else\n    case $cross_compiling:$ac_tool_warned in\nyes:)\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet\" >&5\n$as_echo \"$as_me: WARNING: using cross tools not prefixed with host triplet\" >&2;}\nac_tool_warned=yes ;;\nesac\n    CC=$ac_ct_CC\n  fi\nelse\n  CC=\"$ac_cv_prog_CC\"\nfi\n\nif test -z \"$CC\"; then\n          if test -n \"$ac_tool_prefix\"; then\n    # Extract the first word of \"${ac_tool_prefix}cc\", so it can be a program name with args.\nset dummy ${ac_tool_prefix}cc; ac_word=$2\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $ac_word\" >&5\n$as_echo_n \"checking for $ac_word... \" >&6; }\nif ${ac_cv_prog_CC+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if test -n \"$CC\"; then\n  ac_cv_prog_CC=\"$CC\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    for ac_exec_ext in '' $ac_executable_extensions; do\n  if as_fn_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_CC=\"${ac_tool_prefix}cc\"\n    $as_echo \"$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\n  done\nIFS=$as_save_IFS\n\nfi\nfi\nCC=$ac_cv_prog_CC\nif test -n \"$CC\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $CC\" >&5\n$as_echo \"$CC\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\nfi\n\n\n  fi\nfi\nif test -z \"$CC\"; then\n  # Extract the first word of \"cc\", so it can be a program name with args.\nset dummy cc; ac_word=$2\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $ac_word\" >&5\n$as_echo_n \"checking for $ac_word... \" >&6; }\nif ${ac_cv_prog_CC+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if test -n \"$CC\"; then\n  ac_cv_prog_CC=\"$CC\" # Let the user override the test.\nelse\n  ac_prog_rejected=no\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    for ac_exec_ext in '' $ac_executable_extensions; do\n  if as_fn_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    if test \"$as_dir/$ac_word$ac_exec_ext\" = \"/usr/ucb/cc\"; then\n       ac_prog_rejected=yes\n       continue\n     fi\n    ac_cv_prog_CC=\"cc\"\n    $as_echo \"$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\n  done\nIFS=$as_save_IFS\n\nif test $ac_prog_rejected = yes; then\n  # We found a bogon in the path, so make sure we never use it.\n  set dummy $ac_cv_prog_CC\n  shift\n  if test $# != 0; then\n    # We chose a different compiler from the bogus one.\n    # However, it has the same basename, so the bogon will be chosen\n    # first if we set CC to just the basename; use the full file name.\n    shift\n    ac_cv_prog_CC=\"$as_dir/$ac_word${1+' '}$@\"\n  fi\nfi\nfi\nfi\nCC=$ac_cv_prog_CC\nif test -n \"$CC\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $CC\" >&5\n$as_echo \"$CC\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\nfi\n\n\nfi\nif test -z \"$CC\"; then\n  if test -n \"$ac_tool_prefix\"; then\n  for ac_prog in cl.exe\n  do\n    # Extract the first word of \"$ac_tool_prefix$ac_prog\", so it can be a program name with args.\nset dummy $ac_tool_prefix$ac_prog; ac_word=$2\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $ac_word\" >&5\n$as_echo_n \"checking for $ac_word... \" >&6; }\nif ${ac_cv_prog_CC+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if test -n \"$CC\"; then\n  ac_cv_prog_CC=\"$CC\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    for ac_exec_ext in '' $ac_executable_extensions; do\n  if as_fn_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_CC=\"$ac_tool_prefix$ac_prog\"\n    $as_echo \"$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\n  done\nIFS=$as_save_IFS\n\nfi\nfi\nCC=$ac_cv_prog_CC\nif test -n \"$CC\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $CC\" >&5\n$as_echo \"$CC\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\nfi\n\n\n    test -n \"$CC\" && break\n  done\nfi\nif test -z \"$CC\"; then\n  ac_ct_CC=$CC\n  for ac_prog in cl.exe\ndo\n  # Extract the first word of \"$ac_prog\", so it can be a program name with args.\nset dummy $ac_prog; ac_word=$2\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $ac_word\" >&5\n$as_echo_n \"checking for $ac_word... \" >&6; }\nif ${ac_cv_prog_ac_ct_CC+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if test -n \"$ac_ct_CC\"; then\n  ac_cv_prog_ac_ct_CC=\"$ac_ct_CC\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    for ac_exec_ext in '' $ac_executable_extensions; do\n  if as_fn_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_ac_ct_CC=\"$ac_prog\"\n    $as_echo \"$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\n  done\nIFS=$as_save_IFS\n\nfi\nfi\nac_ct_CC=$ac_cv_prog_ac_ct_CC\nif test -n \"$ac_ct_CC\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC\" >&5\n$as_echo \"$ac_ct_CC\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\nfi\n\n\n  test -n \"$ac_ct_CC\" && break\ndone\n\n  if test \"x$ac_ct_CC\" = x; then\n    CC=\"\"\n  else\n    case $cross_compiling:$ac_tool_warned in\nyes:)\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet\" >&5\n$as_echo \"$as_me: WARNING: using cross tools not prefixed with host triplet\" >&2;}\nac_tool_warned=yes ;;\nesac\n    CC=$ac_ct_CC\n  fi\nfi\n\nfi\n\n\ntest -z \"$CC\" && { { $as_echo \"$as_me:${as_lineno-$LINENO}: error: in \\`$ac_pwd':\" >&5\n$as_echo \"$as_me: error: in \\`$ac_pwd':\" >&2;}\nas_fn_error $? \"no acceptable C compiler found in \\$PATH\nSee \\`config.log' for more details\" \"$LINENO\" 5; }\n\n# Provide some information about the compiler.\n$as_echo \"$as_me:${as_lineno-$LINENO}: checking for C compiler version\" >&5\nset X $ac_compile\nac_compiler=$2\nfor ac_option in --version -v -V -qversion; do\n  { { ac_try=\"$ac_compiler $ac_option >&5\"\ncase \"(($ac_try\" in\n  *\\\"* | *\\`* | *\\\\*) ac_try_echo=\\$ac_try;;\n  *) ac_try_echo=$ac_try;;\nesac\neval ac_try_echo=\"\\\"\\$as_me:${as_lineno-$LINENO}: $ac_try_echo\\\"\"\n$as_echo \"$ac_try_echo\"; } >&5\n  (eval \"$ac_compiler $ac_option >&5\") 2>conftest.err\n  ac_status=$?\n  if test -s conftest.err; then\n    sed '10a\\\n... rest of stderr output deleted ...\n         10q' conftest.err >conftest.er1\n    cat conftest.er1 >&5\n  fi\n  rm -f conftest.er1 conftest.err\n  $as_echo \"$as_me:${as_lineno-$LINENO}: \\$? = $ac_status\" >&5\n  test $ac_status = 0; }\ndone\n\ncat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n\nint\nmain ()\n{\n\n  ;\n  return 0;\n}\n_ACEOF\nac_clean_files_save=$ac_clean_files\nac_clean_files=\"$ac_clean_files a.out a.out.dSYM a.exe b.out\"\n# Try to create an executable without -o first, disregard a.out.\n# It will help us diagnose broken compilers, and finding out an intuition\n# of exeext.\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking whether the C compiler works\" >&5\n$as_echo_n \"checking whether the C compiler works... \" >&6; }\nac_link_default=`$as_echo \"$ac_link\" | sed 's/ -o *conftest[^ ]*//'`\n\n# The possible output files:\nac_files=\"a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*\"\n\nac_rmfiles=\nfor ac_file in $ac_files\ndo\n  case $ac_file in\n    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;\n    * ) ac_rmfiles=\"$ac_rmfiles $ac_file\";;\n  esac\ndone\nrm -f $ac_rmfiles\n\nif { { ac_try=\"$ac_link_default\"\ncase \"(($ac_try\" in\n  *\\\"* | *\\`* | *\\\\*) ac_try_echo=\\$ac_try;;\n  *) ac_try_echo=$ac_try;;\nesac\neval ac_try_echo=\"\\\"\\$as_me:${as_lineno-$LINENO}: $ac_try_echo\\\"\"\n$as_echo \"$ac_try_echo\"; } >&5\n  (eval \"$ac_link_default\") 2>&5\n  ac_status=$?\n  $as_echo \"$as_me:${as_lineno-$LINENO}: \\$? = $ac_status\" >&5\n  test $ac_status = 0; }; then :\n  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.\n# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'\n# in a Makefile.  We should not override ac_cv_exeext if it was cached,\n# so that the user can short-circuit this test for compilers unknown to\n# Autoconf.\nfor ac_file in $ac_files ''\ndo\n  test -f \"$ac_file\" || continue\n  case $ac_file in\n    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )\n\t;;\n    [ab].out )\n\t# We found the default executable, but exeext='' is most\n\t# certainly right.\n\tbreak;;\n    *.* )\n\tif test \"${ac_cv_exeext+set}\" = set && test \"$ac_cv_exeext\" != no;\n\tthen :; else\n\t   ac_cv_exeext=`expr \"$ac_file\" : '[^.]*\\(\\..*\\)'`\n\tfi\n\t# We set ac_cv_exeext here because the later test for it is not\n\t# safe: cross compilers may not add the suffix if given an `-o'\n\t# argument, so we may need to know it at that point already.\n\t# Even if this section looks crufty: it has the advantage of\n\t# actually working.\n\tbreak;;\n    * )\n\tbreak;;\n  esac\ndone\ntest \"$ac_cv_exeext\" = no && ac_cv_exeext=\n\nelse\n  ac_file=''\nfi\nif test -z \"$ac_file\"; then :\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\n$as_echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\n{ { $as_echo \"$as_me:${as_lineno-$LINENO}: error: in \\`$ac_pwd':\" >&5\n$as_echo \"$as_me: error: in \\`$ac_pwd':\" >&2;}\nas_fn_error 77 \"C compiler cannot create executables\nSee \\`config.log' for more details\" \"$LINENO\" 5; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: yes\" >&5\n$as_echo \"yes\" >&6; }\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name\" >&5\n$as_echo_n \"checking for C compiler default output file name... \" >&6; }\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_file\" >&5\n$as_echo \"$ac_file\" >&6; }\nac_exeext=$ac_cv_exeext\n\nrm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out\nac_clean_files=$ac_clean_files_save\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for suffix of executables\" >&5\n$as_echo_n \"checking for suffix of executables... \" >&6; }\nif { { ac_try=\"$ac_link\"\ncase \"(($ac_try\" in\n  *\\\"* | *\\`* | *\\\\*) ac_try_echo=\\$ac_try;;\n  *) ac_try_echo=$ac_try;;\nesac\neval ac_try_echo=\"\\\"\\$as_me:${as_lineno-$LINENO}: $ac_try_echo\\\"\"\n$as_echo \"$ac_try_echo\"; } >&5\n  (eval \"$ac_link\") 2>&5\n  ac_status=$?\n  $as_echo \"$as_me:${as_lineno-$LINENO}: \\$? = $ac_status\" >&5\n  test $ac_status = 0; }; then :\n  # If both `conftest.exe' and `conftest' are `present' (well, observable)\n# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will\n# work properly (i.e., refer to `conftest.exe'), while it won't with\n# `rm'.\nfor ac_file in conftest.exe conftest conftest.*; do\n  test -f \"$ac_file\" || continue\n  case $ac_file in\n    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;\n    *.* ) ac_cv_exeext=`expr \"$ac_file\" : '[^.]*\\(\\..*\\)'`\n\t  break;;\n    * ) break;;\n  esac\ndone\nelse\n  { { $as_echo \"$as_me:${as_lineno-$LINENO}: error: in \\`$ac_pwd':\" >&5\n$as_echo \"$as_me: error: in \\`$ac_pwd':\" >&2;}\nas_fn_error $? \"cannot compute suffix of executables: cannot compile and link\nSee \\`config.log' for more details\" \"$LINENO\" 5; }\nfi\nrm -f conftest conftest$ac_cv_exeext\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext\" >&5\n$as_echo \"$ac_cv_exeext\" >&6; }\n\nrm -f conftest.$ac_ext\nEXEEXT=$ac_cv_exeext\nac_exeext=$EXEEXT\ncat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n#include <stdio.h>\nint\nmain ()\n{\nFILE *f = fopen (\"conftest.out\", \"w\");\n return ferror (f) || fclose (f) != 0;\n\n  ;\n  return 0;\n}\n_ACEOF\nac_clean_files=\"$ac_clean_files conftest.out\"\n# Check that the compiler produces executables we can run.  If not, either\n# the compiler is broken, or we cross compile.\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling\" >&5\n$as_echo_n \"checking whether we are cross compiling... \" >&6; }\nif test \"$cross_compiling\" != yes; then\n  { { ac_try=\"$ac_link\"\ncase \"(($ac_try\" in\n  *\\\"* | *\\`* | *\\\\*) ac_try_echo=\\$ac_try;;\n  *) ac_try_echo=$ac_try;;\nesac\neval ac_try_echo=\"\\\"\\$as_me:${as_lineno-$LINENO}: $ac_try_echo\\\"\"\n$as_echo \"$ac_try_echo\"; } >&5\n  (eval \"$ac_link\") 2>&5\n  ac_status=$?\n  $as_echo \"$as_me:${as_lineno-$LINENO}: \\$? = $ac_status\" >&5\n  test $ac_status = 0; }\n  if { ac_try='./conftest$ac_cv_exeext'\n  { { case \"(($ac_try\" in\n  *\\\"* | *\\`* | *\\\\*) ac_try_echo=\\$ac_try;;\n  *) ac_try_echo=$ac_try;;\nesac\neval ac_try_echo=\"\\\"\\$as_me:${as_lineno-$LINENO}: $ac_try_echo\\\"\"\n$as_echo \"$ac_try_echo\"; } >&5\n  (eval \"$ac_try\") 2>&5\n  ac_status=$?\n  $as_echo \"$as_me:${as_lineno-$LINENO}: \\$? = $ac_status\" >&5\n  test $ac_status = 0; }; }; then\n    cross_compiling=no\n  else\n    if test \"$cross_compiling\" = maybe; then\n\tcross_compiling=yes\n    else\n\t{ { $as_echo \"$as_me:${as_lineno-$LINENO}: error: in \\`$ac_pwd':\" >&5\n$as_echo \"$as_me: error: in \\`$ac_pwd':\" >&2;}\nas_fn_error $? \"cannot run C compiled programs.\nIf you meant to cross compile, use \\`--host'.\nSee \\`config.log' for more details\" \"$LINENO\" 5; }\n    fi\n  fi\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $cross_compiling\" >&5\n$as_echo \"$cross_compiling\" >&6; }\n\nrm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out\nac_clean_files=$ac_clean_files_save\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for suffix of object files\" >&5\n$as_echo_n \"checking for suffix of object files... \" >&6; }\nif ${ac_cv_objext+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n\nint\nmain ()\n{\n\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.o conftest.obj\nif { { ac_try=\"$ac_compile\"\ncase \"(($ac_try\" in\n  *\\\"* | *\\`* | *\\\\*) ac_try_echo=\\$ac_try;;\n  *) ac_try_echo=$ac_try;;\nesac\neval ac_try_echo=\"\\\"\\$as_me:${as_lineno-$LINENO}: $ac_try_echo\\\"\"\n$as_echo \"$ac_try_echo\"; } >&5\n  (eval \"$ac_compile\") 2>&5\n  ac_status=$?\n  $as_echo \"$as_me:${as_lineno-$LINENO}: \\$? = $ac_status\" >&5\n  test $ac_status = 0; }; then :\n  for ac_file in conftest.o conftest.obj conftest.*; do\n  test -f \"$ac_file\" || continue;\n  case $ac_file in\n    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;\n    *) ac_cv_objext=`expr \"$ac_file\" : '.*\\.\\(.*\\)'`\n       break;;\n  esac\ndone\nelse\n  $as_echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\n{ { $as_echo \"$as_me:${as_lineno-$LINENO}: error: in \\`$ac_pwd':\" >&5\n$as_echo \"$as_me: error: in \\`$ac_pwd':\" >&2;}\nas_fn_error $? \"cannot compute suffix of object files: cannot compile\nSee \\`config.log' for more details\" \"$LINENO\" 5; }\nfi\nrm -f conftest.$ac_cv_objext conftest.$ac_ext\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext\" >&5\n$as_echo \"$ac_cv_objext\" >&6; }\nOBJEXT=$ac_cv_objext\nac_objext=$OBJEXT\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler\" >&5\n$as_echo_n \"checking whether we are using the GNU C compiler... \" >&6; }\nif ${ac_cv_c_compiler_gnu+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n\nint\nmain ()\n{\n#ifndef __GNUC__\n       choke me\n#endif\n\n  ;\n  return 0;\n}\n_ACEOF\nif ac_fn_c_try_compile \"$LINENO\"; then :\n  ac_compiler_gnu=yes\nelse\n  ac_compiler_gnu=no\nfi\nrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext\nac_cv_c_compiler_gnu=$ac_compiler_gnu\n\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu\" >&5\n$as_echo \"$ac_cv_c_compiler_gnu\" >&6; }\nif test $ac_compiler_gnu = yes; then\n  GCC=yes\nelse\n  GCC=\nfi\nac_test_CFLAGS=${CFLAGS+set}\nac_save_CFLAGS=$CFLAGS\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g\" >&5\n$as_echo_n \"checking whether $CC accepts -g... \" >&6; }\nif ${ac_cv_prog_cc_g+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  ac_save_c_werror_flag=$ac_c_werror_flag\n   ac_c_werror_flag=yes\n   ac_cv_prog_cc_g=no\n   CFLAGS=\"-g\"\n   cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n\nint\nmain ()\n{\n\n  ;\n  return 0;\n}\n_ACEOF\nif ac_fn_c_try_compile \"$LINENO\"; then :\n  ac_cv_prog_cc_g=yes\nelse\n  CFLAGS=\"\"\n      cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n\nint\nmain ()\n{\n\n  ;\n  return 0;\n}\n_ACEOF\nif ac_fn_c_try_compile \"$LINENO\"; then :\n\nelse\n  ac_c_werror_flag=$ac_save_c_werror_flag\n\t CFLAGS=\"-g\"\n\t cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n\nint\nmain ()\n{\n\n  ;\n  return 0;\n}\n_ACEOF\nif ac_fn_c_try_compile \"$LINENO\"; then :\n  ac_cv_prog_cc_g=yes\nfi\nrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext\nfi\nrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext\nfi\nrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext\n   ac_c_werror_flag=$ac_save_c_werror_flag\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g\" >&5\n$as_echo \"$ac_cv_prog_cc_g\" >&6; }\nif test \"$ac_test_CFLAGS\" = set; then\n  CFLAGS=$ac_save_CFLAGS\nelif test $ac_cv_prog_cc_g = yes; then\n  if test \"$GCC\" = yes; then\n    CFLAGS=\"-g -O2\"\n  else\n    CFLAGS=\"-g\"\n  fi\nelse\n  if test \"$GCC\" = yes; then\n    CFLAGS=\"-O2\"\n  else\n    CFLAGS=\n  fi\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89\" >&5\n$as_echo_n \"checking for $CC option to accept ISO C89... \" >&6; }\nif ${ac_cv_prog_cc_c89+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  ac_cv_prog_cc_c89=no\nac_save_CC=$CC\ncat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n#include <stdarg.h>\n#include <stdio.h>\nstruct stat;\n/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */\nstruct buf { int x; };\nFILE * (*rcsopen) (struct buf *, struct stat *, int);\nstatic char *e (p, i)\n     char **p;\n     int i;\n{\n  return p[i];\n}\nstatic char *f (char * (*g) (char **, int), char **p, ...)\n{\n  char *s;\n  va_list v;\n  va_start (v,p);\n  s = g (p, va_arg (v,int));\n  va_end (v);\n  return s;\n}\n\n/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has\n   function prototypes and stuff, but not '\\xHH' hex character constants.\n   These don't provoke an error unfortunately, instead are silently treated\n   as 'x'.  The following induces an error, until -std is added to get\n   proper ANSI mode.  Curiously '\\x00'!='x' always comes out true, for an\n   array size at least.  It's necessary to write '\\x00'==0 to get something\n   that's true only with -std.  */\nint osf4_cc_array ['\\x00' == 0 ? 1 : -1];\n\n/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters\n   inside strings and character constants.  */\n#define FOO(x) 'x'\nint xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];\n\nint test (int i, double x);\nstruct s1 {int (*f) (int a);};\nstruct s2 {int (*f) (double a);};\nint pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);\nint argc;\nchar **argv;\nint\nmain ()\n{\nreturn f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];\n  ;\n  return 0;\n}\n_ACEOF\nfor ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \\\n\t-Ae \"-Aa -D_HPUX_SOURCE\" \"-Xc -D__EXTENSIONS__\"\ndo\n  CC=\"$ac_save_CC $ac_arg\"\n  if ac_fn_c_try_compile \"$LINENO\"; then :\n  ac_cv_prog_cc_c89=$ac_arg\nfi\nrm -f core conftest.err conftest.$ac_objext\n  test \"x$ac_cv_prog_cc_c89\" != \"xno\" && break\ndone\nrm -f conftest.$ac_ext\nCC=$ac_save_CC\n\nfi\n# AC_CACHE_VAL\ncase \"x$ac_cv_prog_cc_c89\" in\n  x)\n    { $as_echo \"$as_me:${as_lineno-$LINENO}: result: none needed\" >&5\n$as_echo \"none needed\" >&6; } ;;\n  xno)\n    { $as_echo \"$as_me:${as_lineno-$LINENO}: result: unsupported\" >&5\n$as_echo \"unsupported\" >&6; } ;;\n  *)\n    CC=\"$CC $ac_cv_prog_cc_c89\"\n    { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89\" >&5\n$as_echo \"$ac_cv_prog_cc_c89\" >&6; } ;;\nesac\nif test \"x$ac_cv_prog_cc_c89\" != xno; then :\n\nfi\n\nac_ext=c\nac_cpp='$CPP $CPPFLAGS'\nac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'\nac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'\nac_compiler_gnu=$ac_cv_c_compiler_gnu\n\nac_ext=c\nac_cpp='$CPP $CPPFLAGS'\nac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'\nac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'\nac_compiler_gnu=$ac_cv_c_compiler_gnu\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together\" >&5\n$as_echo_n \"checking whether $CC understands -c and -o together... \" >&6; }\nif ${am_cv_prog_cc_c_o+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n\nint\nmain ()\n{\n\n  ;\n  return 0;\n}\n_ACEOF\n  # Make sure it works both with $CC and with simple cc.\n  # Following AC_PROG_CC_C_O, we do the test twice because some\n  # compilers refuse to overwrite an existing .o file with -o,\n  # though they will create one.\n  am_cv_prog_cc_c_o=yes\n  for am_i in 1 2; do\n    if { echo \"$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext\" >&5\n   ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5\n   ac_status=$?\n   echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n   (exit $ac_status); } \\\n         && test -f conftest2.$ac_objext; then\n      : OK\n    else\n      am_cv_prog_cc_c_o=no\n      break\n    fi\n  done\n  rm -f core conftest*\n  unset am_i\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o\" >&5\n$as_echo \"$am_cv_prog_cc_c_o\" >&6; }\nif test \"$am_cv_prog_cc_c_o\" != yes; then\n   # Losing compiler, so override with the script.\n   # FIXME: It is wrong to rewrite CC.\n   # But if we don't then we get into trouble of one sort or another.\n   # A longer-term fix would be to have automake use am__CC in this case,\n   # and then we could set am__CC=\"\\$(top_srcdir)/compile \\$(CC)\"\n   CC=\"$am_aux_dir/compile $CC\"\nfi\nac_ext=c\nac_cpp='$CPP $CPPFLAGS'\nac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'\nac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'\nac_compiler_gnu=$ac_cv_c_compiler_gnu\n\nDEPDIR=\"${am__leading_dot}deps\"\n\nac_config_commands=\"$ac_config_commands depfiles\"\n\n\nam_make=${MAKE-make}\ncat > confinc << 'END'\nam__doit:\n\t@echo this is the am__doit target\n.PHONY: am__doit\nEND\n# If we don't find an include directive, just comment out the code.\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make\" >&5\n$as_echo_n \"checking for style of include used by $am_make... \" >&6; }\nam__include=\"#\"\nam__quote=\n_am_result=none\n# First try GNU make style include.\necho \"include confinc\" > confmf\n# Ignore all kinds of additional output from 'make'.\ncase `$am_make -s -f confmf 2> /dev/null` in #(\n*the\\ am__doit\\ target*)\n  am__include=include\n  am__quote=\n  _am_result=GNU\n  ;;\nesac\n# Now try BSD make style include.\nif test \"$am__include\" = \"#\"; then\n   echo '.include \"confinc\"' > confmf\n   case `$am_make -s -f confmf 2> /dev/null` in #(\n   *the\\ am__doit\\ target*)\n     am__include=.include\n     am__quote=\"\\\"\"\n     _am_result=BSD\n     ;;\n   esac\nfi\n\n\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $_am_result\" >&5\n$as_echo \"$_am_result\" >&6; }\nrm -f confinc confmf\n\n# Check whether --enable-dependency-tracking was given.\nif test \"${enable_dependency_tracking+set}\" = set; then :\n  enableval=$enable_dependency_tracking;\nfi\n\nif test \"x$enable_dependency_tracking\" != xno; then\n  am_depcomp=\"$ac_aux_dir/depcomp\"\n  AMDEPBACKSLASH='\\'\n  am__nodep='_no'\nfi\n if test \"x$enable_dependency_tracking\" != xno; then\n  AMDEP_TRUE=\n  AMDEP_FALSE='#'\nelse\n  AMDEP_TRUE='#'\n  AMDEP_FALSE=\nfi\n\n\n\ndepcc=\"$CC\"   am_compiler_list=\n\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc\" >&5\n$as_echo_n \"checking dependency style of $depcc... \" >&6; }\nif ${am_cv_CC_dependencies_compiler_type+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if test -z \"$AMDEP_TRUE\" && test -f \"$am_depcomp\"; then\n  # We make a subdir and do the tests there.  Otherwise we can end up\n  # making bogus files that we don't know about and never remove.  For\n  # instance it was reported that on HP-UX the gcc test will end up\n  # making a dummy file named 'D' -- because '-MD' means \"put the output\n  # in D\".\n  rm -rf conftest.dir\n  mkdir conftest.dir\n  # Copy depcomp to subdir because otherwise we won't find it if we're\n  # using a relative directory.\n  cp \"$am_depcomp\" conftest.dir\n  cd conftest.dir\n  # We will build objects and dependencies in a subdirectory because\n  # it helps to detect inapplicable dependency modes.  For instance\n  # both Tru64's cc and ICC support -MD to output dependencies as a\n  # side effect of compilation, but ICC will put the dependencies in\n  # the current directory while Tru64 will put them in the object\n  # directory.\n  mkdir sub\n\n  am_cv_CC_dependencies_compiler_type=none\n  if test \"$am_compiler_list\" = \"\"; then\n     am_compiler_list=`sed -n 's/^#*\\([a-zA-Z0-9]*\\))$/\\1/p' < ./depcomp`\n  fi\n  am__universal=false\n  case \" $depcc \" in #(\n     *\\ -arch\\ *\\ -arch\\ *) am__universal=true ;;\n     esac\n\n  for depmode in $am_compiler_list; do\n    # Setup a source with many dependencies, because some compilers\n    # like to wrap large dependency lists on column 80 (with \\), and\n    # we should not choose a depcomp mode which is confused by this.\n    #\n    # We need to recreate these files for each test, as the compiler may\n    # overwrite some of them when testing with obscure command lines.\n    # This happens at least with the AIX C compiler.\n    : > sub/conftest.c\n    for i in 1 2 3 4 5 6; do\n      echo '#include \"conftst'$i'.h\"' >> sub/conftest.c\n      # Using \": > sub/conftst$i.h\" creates only sub/conftst1.h with\n      # Solaris 10 /bin/sh.\n      echo '/* dummy */' > sub/conftst$i.h\n    done\n    echo \"${am__include} ${am__quote}sub/conftest.Po${am__quote}\" > confmf\n\n    # We check with '-c' and '-o' for the sake of the \"dashmstdout\"\n    # mode.  It turns out that the SunPro C++ compiler does not properly\n    # handle '-M -o', and we need to detect this.  Also, some Intel\n    # versions had trouble with output in subdirs.\n    am__obj=sub/conftest.${OBJEXT-o}\n    am__minus_obj=\"-o $am__obj\"\n    case $depmode in\n    gcc)\n      # This depmode causes a compiler race in universal mode.\n      test \"$am__universal\" = false || continue\n      ;;\n    nosideeffect)\n      # After this tag, mechanisms are not by side-effect, so they'll\n      # only be used when explicitly requested.\n      if test \"x$enable_dependency_tracking\" = xyes; then\n\tcontinue\n      else\n\tbreak\n      fi\n      ;;\n    msvc7 | msvc7msys | msvisualcpp | msvcmsys)\n      # This compiler won't grok '-c -o', but also, the minuso test has\n      # not run yet.  These depmodes are late enough in the game, and\n      # so weak that their functioning should not be impacted.\n      am__obj=conftest.${OBJEXT-o}\n      am__minus_obj=\n      ;;\n    none) break ;;\n    esac\n    if depmode=$depmode \\\n       source=sub/conftest.c object=$am__obj \\\n       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \\\n       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \\\n         >/dev/null 2>conftest.err &&\n       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&\n       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&\n       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&\n       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then\n      # icc doesn't choke on unknown options, it will just issue warnings\n      # or remarks (even with -Werror).  So we grep stderr for any message\n      # that says an option was ignored or not supported.\n      # When given -MP, icc 7.0 and 7.1 complain thusly:\n      #   icc: Command line warning: ignoring option '-M'; no argument required\n      # The diagnosis changed in icc 8.0:\n      #   icc: Command line remark: option '-MP' not supported\n      if (grep 'ignoring option' conftest.err ||\n          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else\n        am_cv_CC_dependencies_compiler_type=$depmode\n        break\n      fi\n    fi\n  done\n\n  cd ..\n  rm -rf conftest.dir\nelse\n  am_cv_CC_dependencies_compiler_type=none\nfi\n\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type\" >&5\n$as_echo \"$am_cv_CC_dependencies_compiler_type\" >&6; }\nCCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type\n\n if\n  test \"x$enable_dependency_tracking\" != xno \\\n  && test \"$am_cv_CC_dependencies_compiler_type\" = gcc3; then\n  am__fastdepCC_TRUE=\n  am__fastdepCC_FALSE='#'\nelse\n  am__fastdepCC_TRUE='#'\n  am__fastdepCC_FALSE=\nfi\n\n\nac_ext=cpp\nac_cpp='$CXXCPP $CPPFLAGS'\nac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'\nac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'\nac_compiler_gnu=$ac_cv_cxx_compiler_gnu\nif test -z \"$CXX\"; then\n  if test -n \"$CCC\"; then\n    CXX=$CCC\n  else\n    if test -n \"$ac_tool_prefix\"; then\n  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC\n  do\n    # Extract the first word of \"$ac_tool_prefix$ac_prog\", so it can be a program name with args.\nset dummy $ac_tool_prefix$ac_prog; ac_word=$2\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $ac_word\" >&5\n$as_echo_n \"checking for $ac_word... \" >&6; }\nif ${ac_cv_prog_CXX+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if test -n \"$CXX\"; then\n  ac_cv_prog_CXX=\"$CXX\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    for ac_exec_ext in '' $ac_executable_extensions; do\n  if as_fn_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_CXX=\"$ac_tool_prefix$ac_prog\"\n    $as_echo \"$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\n  done\nIFS=$as_save_IFS\n\nfi\nfi\nCXX=$ac_cv_prog_CXX\nif test -n \"$CXX\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $CXX\" >&5\n$as_echo \"$CXX\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\nfi\n\n\n    test -n \"$CXX\" && break\n  done\nfi\nif test -z \"$CXX\"; then\n  ac_ct_CXX=$CXX\n  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC\ndo\n  # Extract the first word of \"$ac_prog\", so it can be a program name with args.\nset dummy $ac_prog; ac_word=$2\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $ac_word\" >&5\n$as_echo_n \"checking for $ac_word... \" >&6; }\nif ${ac_cv_prog_ac_ct_CXX+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if test -n \"$ac_ct_CXX\"; then\n  ac_cv_prog_ac_ct_CXX=\"$ac_ct_CXX\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    for ac_exec_ext in '' $ac_executable_extensions; do\n  if as_fn_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_ac_ct_CXX=\"$ac_prog\"\n    $as_echo \"$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\n  done\nIFS=$as_save_IFS\n\nfi\nfi\nac_ct_CXX=$ac_cv_prog_ac_ct_CXX\nif test -n \"$ac_ct_CXX\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX\" >&5\n$as_echo \"$ac_ct_CXX\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\nfi\n\n\n  test -n \"$ac_ct_CXX\" && break\ndone\n\n  if test \"x$ac_ct_CXX\" = x; then\n    CXX=\"g++\"\n  else\n    case $cross_compiling:$ac_tool_warned in\nyes:)\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet\" >&5\n$as_echo \"$as_me: WARNING: using cross tools not prefixed with host triplet\" >&2;}\nac_tool_warned=yes ;;\nesac\n    CXX=$ac_ct_CXX\n  fi\nfi\n\n  fi\nfi\n# Provide some information about the compiler.\n$as_echo \"$as_me:${as_lineno-$LINENO}: checking for C++ compiler version\" >&5\nset X $ac_compile\nac_compiler=$2\nfor ac_option in --version -v -V -qversion; do\n  { { ac_try=\"$ac_compiler $ac_option >&5\"\ncase \"(($ac_try\" in\n  *\\\"* | *\\`* | *\\\\*) ac_try_echo=\\$ac_try;;\n  *) ac_try_echo=$ac_try;;\nesac\neval ac_try_echo=\"\\\"\\$as_me:${as_lineno-$LINENO}: $ac_try_echo\\\"\"\n$as_echo \"$ac_try_echo\"; } >&5\n  (eval \"$ac_compiler $ac_option >&5\") 2>conftest.err\n  ac_status=$?\n  if test -s conftest.err; then\n    sed '10a\\\n... rest of stderr output deleted ...\n         10q' conftest.err >conftest.er1\n    cat conftest.er1 >&5\n  fi\n  rm -f conftest.er1 conftest.err\n  $as_echo \"$as_me:${as_lineno-$LINENO}: \\$? = $ac_status\" >&5\n  test $ac_status = 0; }\ndone\n\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler\" >&5\n$as_echo_n \"checking whether we are using the GNU C++ compiler... \" >&6; }\nif ${ac_cv_cxx_compiler_gnu+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n\nint\nmain ()\n{\n#ifndef __GNUC__\n       choke me\n#endif\n\n  ;\n  return 0;\n}\n_ACEOF\nif ac_fn_cxx_try_compile \"$LINENO\"; then :\n  ac_compiler_gnu=yes\nelse\n  ac_compiler_gnu=no\nfi\nrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext\nac_cv_cxx_compiler_gnu=$ac_compiler_gnu\n\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu\" >&5\n$as_echo \"$ac_cv_cxx_compiler_gnu\" >&6; }\nif test $ac_compiler_gnu = yes; then\n  GXX=yes\nelse\n  GXX=\nfi\nac_test_CXXFLAGS=${CXXFLAGS+set}\nac_save_CXXFLAGS=$CXXFLAGS\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g\" >&5\n$as_echo_n \"checking whether $CXX accepts -g... \" >&6; }\nif ${ac_cv_prog_cxx_g+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  ac_save_cxx_werror_flag=$ac_cxx_werror_flag\n   ac_cxx_werror_flag=yes\n   ac_cv_prog_cxx_g=no\n   CXXFLAGS=\"-g\"\n   cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n\nint\nmain ()\n{\n\n  ;\n  return 0;\n}\n_ACEOF\nif ac_fn_cxx_try_compile \"$LINENO\"; then :\n  ac_cv_prog_cxx_g=yes\nelse\n  CXXFLAGS=\"\"\n      cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n\nint\nmain ()\n{\n\n  ;\n  return 0;\n}\n_ACEOF\nif ac_fn_cxx_try_compile \"$LINENO\"; then :\n\nelse\n  ac_cxx_werror_flag=$ac_save_cxx_werror_flag\n\t CXXFLAGS=\"-g\"\n\t cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n\nint\nmain ()\n{\n\n  ;\n  return 0;\n}\n_ACEOF\nif ac_fn_cxx_try_compile \"$LINENO\"; then :\n  ac_cv_prog_cxx_g=yes\nfi\nrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext\nfi\nrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext\nfi\nrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext\n   ac_cxx_werror_flag=$ac_save_cxx_werror_flag\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g\" >&5\n$as_echo \"$ac_cv_prog_cxx_g\" >&6; }\nif test \"$ac_test_CXXFLAGS\" = set; then\n  CXXFLAGS=$ac_save_CXXFLAGS\nelif test $ac_cv_prog_cxx_g = yes; then\n  if test \"$GXX\" = yes; then\n    CXXFLAGS=\"-g -O2\"\n  else\n    CXXFLAGS=\"-g\"\n  fi\nelse\n  if test \"$GXX\" = yes; then\n    CXXFLAGS=\"-O2\"\n  else\n    CXXFLAGS=\n  fi\nfi\nac_ext=c\nac_cpp='$CPP $CPPFLAGS'\nac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'\nac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'\nac_compiler_gnu=$ac_cv_c_compiler_gnu\n\ndepcc=\"$CXX\"  am_compiler_list=\n\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc\" >&5\n$as_echo_n \"checking dependency style of $depcc... \" >&6; }\nif ${am_cv_CXX_dependencies_compiler_type+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if test -z \"$AMDEP_TRUE\" && test -f \"$am_depcomp\"; then\n  # We make a subdir and do the tests there.  Otherwise we can end up\n  # making bogus files that we don't know about and never remove.  For\n  # instance it was reported that on HP-UX the gcc test will end up\n  # making a dummy file named 'D' -- because '-MD' means \"put the output\n  # in D\".\n  rm -rf conftest.dir\n  mkdir conftest.dir\n  # Copy depcomp to subdir because otherwise we won't find it if we're\n  # using a relative directory.\n  cp \"$am_depcomp\" conftest.dir\n  cd conftest.dir\n  # We will build objects and dependencies in a subdirectory because\n  # it helps to detect inapplicable dependency modes.  For instance\n  # both Tru64's cc and ICC support -MD to output dependencies as a\n  # side effect of compilation, but ICC will put the dependencies in\n  # the current directory while Tru64 will put them in the object\n  # directory.\n  mkdir sub\n\n  am_cv_CXX_dependencies_compiler_type=none\n  if test \"$am_compiler_list\" = \"\"; then\n     am_compiler_list=`sed -n 's/^#*\\([a-zA-Z0-9]*\\))$/\\1/p' < ./depcomp`\n  fi\n  am__universal=false\n  case \" $depcc \" in #(\n     *\\ -arch\\ *\\ -arch\\ *) am__universal=true ;;\n     esac\n\n  for depmode in $am_compiler_list; do\n    # Setup a source with many dependencies, because some compilers\n    # like to wrap large dependency lists on column 80 (with \\), and\n    # we should not choose a depcomp mode which is confused by this.\n    #\n    # We need to recreate these files for each test, as the compiler may\n    # overwrite some of them when testing with obscure command lines.\n    # This happens at least with the AIX C compiler.\n    : > sub/conftest.c\n    for i in 1 2 3 4 5 6; do\n      echo '#include \"conftst'$i'.h\"' >> sub/conftest.c\n      # Using \": > sub/conftst$i.h\" creates only sub/conftst1.h with\n      # Solaris 10 /bin/sh.\n      echo '/* dummy */' > sub/conftst$i.h\n    done\n    echo \"${am__include} ${am__quote}sub/conftest.Po${am__quote}\" > confmf\n\n    # We check with '-c' and '-o' for the sake of the \"dashmstdout\"\n    # mode.  It turns out that the SunPro C++ compiler does not properly\n    # handle '-M -o', and we need to detect this.  Also, some Intel\n    # versions had trouble with output in subdirs.\n    am__obj=sub/conftest.${OBJEXT-o}\n    am__minus_obj=\"-o $am__obj\"\n    case $depmode in\n    gcc)\n      # This depmode causes a compiler race in universal mode.\n      test \"$am__universal\" = false || continue\n      ;;\n    nosideeffect)\n      # After this tag, mechanisms are not by side-effect, so they'll\n      # only be used when explicitly requested.\n      if test \"x$enable_dependency_tracking\" = xyes; then\n\tcontinue\n      else\n\tbreak\n      fi\n      ;;\n    msvc7 | msvc7msys | msvisualcpp | msvcmsys)\n      # This compiler won't grok '-c -o', but also, the minuso test has\n      # not run yet.  These depmodes are late enough in the game, and\n      # so weak that their functioning should not be impacted.\n      am__obj=conftest.${OBJEXT-o}\n      am__minus_obj=\n      ;;\n    none) break ;;\n    esac\n    if depmode=$depmode \\\n       source=sub/conftest.c object=$am__obj \\\n       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \\\n       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \\\n         >/dev/null 2>conftest.err &&\n       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&\n       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&\n       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&\n       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then\n      # icc doesn't choke on unknown options, it will just issue warnings\n      # or remarks (even with -Werror).  So we grep stderr for any message\n      # that says an option was ignored or not supported.\n      # When given -MP, icc 7.0 and 7.1 complain thusly:\n      #   icc: Command line warning: ignoring option '-M'; no argument required\n      # The diagnosis changed in icc 8.0:\n      #   icc: Command line remark: option '-MP' not supported\n      if (grep 'ignoring option' conftest.err ||\n          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else\n        am_cv_CXX_dependencies_compiler_type=$depmode\n        break\n      fi\n    fi\n  done\n\n  cd ..\n  rm -rf conftest.dir\nelse\n  am_cv_CXX_dependencies_compiler_type=none\nfi\n\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type\" >&5\n$as_echo \"$am_cv_CXX_dependencies_compiler_type\" >&6; }\nCXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type\n\n if\n  test \"x$enable_dependency_tracking\" != xno \\\n  && test \"$am_cv_CXX_dependencies_compiler_type\" = gcc3; then\n  am__fastdepCXX_TRUE=\n  am__fastdepCXX_FALSE='#'\nelse\n  am__fastdepCXX_TRUE='#'\n  am__fastdepCXX_FALSE=\nfi\n\n\n# Make sure we can run config.sub.\n$SHELL \"$ac_aux_dir/config.sub\" sun4 >/dev/null 2>&1 ||\n  as_fn_error $? \"cannot run $SHELL $ac_aux_dir/config.sub\" \"$LINENO\" 5\n\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking build system type\" >&5\n$as_echo_n \"checking build system type... \" >&6; }\nif ${ac_cv_build+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  ac_build_alias=$build_alias\ntest \"x$ac_build_alias\" = x &&\n  ac_build_alias=`$SHELL \"$ac_aux_dir/config.guess\"`\ntest \"x$ac_build_alias\" = x &&\n  as_fn_error $? \"cannot guess build type; you must specify one\" \"$LINENO\" 5\nac_cv_build=`$SHELL \"$ac_aux_dir/config.sub\" $ac_build_alias` ||\n  as_fn_error $? \"$SHELL $ac_aux_dir/config.sub $ac_build_alias failed\" \"$LINENO\" 5\n\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_cv_build\" >&5\n$as_echo \"$ac_cv_build\" >&6; }\ncase $ac_cv_build in\n*-*-*) ;;\n*) as_fn_error $? \"invalid value of canonical build\" \"$LINENO\" 5;;\nesac\nbuild=$ac_cv_build\nac_save_IFS=$IFS; IFS='-'\nset x $ac_cv_build\nshift\nbuild_cpu=$1\nbuild_vendor=$2\nshift; shift\n# Remember, the first character of IFS is used to create $*,\n# except with old shells:\nbuild_os=$*\nIFS=$ac_save_IFS\ncase $build_os in *\\ *) build_os=`echo \"$build_os\" | sed 's/ /-/g'`;; esac\n\n\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking host system type\" >&5\n$as_echo_n \"checking host system type... \" >&6; }\nif ${ac_cv_host+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if test \"x$host_alias\" = x; then\n  ac_cv_host=$ac_cv_build\nelse\n  ac_cv_host=`$SHELL \"$ac_aux_dir/config.sub\" $host_alias` ||\n    as_fn_error $? \"$SHELL $ac_aux_dir/config.sub $host_alias failed\" \"$LINENO\" 5\nfi\n\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_cv_host\" >&5\n$as_echo \"$ac_cv_host\" >&6; }\ncase $ac_cv_host in\n*-*-*) ;;\n*) as_fn_error $? \"invalid value of canonical host\" \"$LINENO\" 5;;\nesac\nhost=$ac_cv_host\nac_save_IFS=$IFS; IFS='-'\nset x $ac_cv_host\nshift\nhost_cpu=$1\nhost_vendor=$2\nshift; shift\n# Remember, the first character of IFS is used to create $*,\n# except with old shells:\nhost_os=$*\nIFS=$ac_save_IFS\ncase $host_os in *\\ *) host_os=`echo \"$host_os\" | sed 's/ /-/g'`;; esac\n\n\nenable_win32_dll=yes\n\ncase $host in\n*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)\n  if test -n \"$ac_tool_prefix\"; then\n  # Extract the first word of \"${ac_tool_prefix}as\", so it can be a program name with args.\nset dummy ${ac_tool_prefix}as; ac_word=$2\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $ac_word\" >&5\n$as_echo_n \"checking for $ac_word... \" >&6; }\nif ${ac_cv_prog_AS+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if test -n \"$AS\"; then\n  ac_cv_prog_AS=\"$AS\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    for ac_exec_ext in '' $ac_executable_extensions; do\n  if as_fn_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_AS=\"${ac_tool_prefix}as\"\n    $as_echo \"$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\n  done\nIFS=$as_save_IFS\n\nfi\nfi\nAS=$ac_cv_prog_AS\nif test -n \"$AS\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $AS\" >&5\n$as_echo \"$AS\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\nfi\n\n\nfi\nif test -z \"$ac_cv_prog_AS\"; then\n  ac_ct_AS=$AS\n  # Extract the first word of \"as\", so it can be a program name with args.\nset dummy as; ac_word=$2\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $ac_word\" >&5\n$as_echo_n \"checking for $ac_word... \" >&6; }\nif ${ac_cv_prog_ac_ct_AS+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if test -n \"$ac_ct_AS\"; then\n  ac_cv_prog_ac_ct_AS=\"$ac_ct_AS\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    for ac_exec_ext in '' $ac_executable_extensions; do\n  if as_fn_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_ac_ct_AS=\"as\"\n    $as_echo \"$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\n  done\nIFS=$as_save_IFS\n\nfi\nfi\nac_ct_AS=$ac_cv_prog_ac_ct_AS\nif test -n \"$ac_ct_AS\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS\" >&5\n$as_echo \"$ac_ct_AS\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\nfi\n\n  if test \"x$ac_ct_AS\" = x; then\n    AS=\"false\"\n  else\n    case $cross_compiling:$ac_tool_warned in\nyes:)\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet\" >&5\n$as_echo \"$as_me: WARNING: using cross tools not prefixed with host triplet\" >&2;}\nac_tool_warned=yes ;;\nesac\n    AS=$ac_ct_AS\n  fi\nelse\n  AS=\"$ac_cv_prog_AS\"\nfi\n\n  if test -n \"$ac_tool_prefix\"; then\n  # Extract the first word of \"${ac_tool_prefix}dlltool\", so it can be a program name with args.\nset dummy ${ac_tool_prefix}dlltool; ac_word=$2\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $ac_word\" >&5\n$as_echo_n \"checking for $ac_word... \" >&6; }\nif ${ac_cv_prog_DLLTOOL+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if test -n \"$DLLTOOL\"; then\n  ac_cv_prog_DLLTOOL=\"$DLLTOOL\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    for ac_exec_ext in '' $ac_executable_extensions; do\n  if as_fn_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_DLLTOOL=\"${ac_tool_prefix}dlltool\"\n    $as_echo \"$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\n  done\nIFS=$as_save_IFS\n\nfi\nfi\nDLLTOOL=$ac_cv_prog_DLLTOOL\nif test -n \"$DLLTOOL\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $DLLTOOL\" >&5\n$as_echo \"$DLLTOOL\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\nfi\n\n\nfi\nif test -z \"$ac_cv_prog_DLLTOOL\"; then\n  ac_ct_DLLTOOL=$DLLTOOL\n  # Extract the first word of \"dlltool\", so it can be a program name with args.\nset dummy dlltool; ac_word=$2\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $ac_word\" >&5\n$as_echo_n \"checking for $ac_word... \" >&6; }\nif ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if test -n \"$ac_ct_DLLTOOL\"; then\n  ac_cv_prog_ac_ct_DLLTOOL=\"$ac_ct_DLLTOOL\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    for ac_exec_ext in '' $ac_executable_extensions; do\n  if as_fn_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_ac_ct_DLLTOOL=\"dlltool\"\n    $as_echo \"$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\n  done\nIFS=$as_save_IFS\n\nfi\nfi\nac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL\nif test -n \"$ac_ct_DLLTOOL\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL\" >&5\n$as_echo \"$ac_ct_DLLTOOL\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\nfi\n\n  if test \"x$ac_ct_DLLTOOL\" = x; then\n    DLLTOOL=\"false\"\n  else\n    case $cross_compiling:$ac_tool_warned in\nyes:)\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet\" >&5\n$as_echo \"$as_me: WARNING: using cross tools not prefixed with host triplet\" >&2;}\nac_tool_warned=yes ;;\nesac\n    DLLTOOL=$ac_ct_DLLTOOL\n  fi\nelse\n  DLLTOOL=\"$ac_cv_prog_DLLTOOL\"\nfi\n\n  if test -n \"$ac_tool_prefix\"; then\n  # Extract the first word of \"${ac_tool_prefix}objdump\", so it can be a program name with args.\nset dummy ${ac_tool_prefix}objdump; ac_word=$2\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $ac_word\" >&5\n$as_echo_n \"checking for $ac_word... \" >&6; }\nif ${ac_cv_prog_OBJDUMP+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if test -n \"$OBJDUMP\"; then\n  ac_cv_prog_OBJDUMP=\"$OBJDUMP\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    for ac_exec_ext in '' $ac_executable_extensions; do\n  if as_fn_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_OBJDUMP=\"${ac_tool_prefix}objdump\"\n    $as_echo \"$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\n  done\nIFS=$as_save_IFS\n\nfi\nfi\nOBJDUMP=$ac_cv_prog_OBJDUMP\nif test -n \"$OBJDUMP\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $OBJDUMP\" >&5\n$as_echo \"$OBJDUMP\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\nfi\n\n\nfi\nif test -z \"$ac_cv_prog_OBJDUMP\"; then\n  ac_ct_OBJDUMP=$OBJDUMP\n  # Extract the first word of \"objdump\", so it can be a program name with args.\nset dummy objdump; ac_word=$2\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $ac_word\" >&5\n$as_echo_n \"checking for $ac_word... \" >&6; }\nif ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if test -n \"$ac_ct_OBJDUMP\"; then\n  ac_cv_prog_ac_ct_OBJDUMP=\"$ac_ct_OBJDUMP\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    for ac_exec_ext in '' $ac_executable_extensions; do\n  if as_fn_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_ac_ct_OBJDUMP=\"objdump\"\n    $as_echo \"$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\n  done\nIFS=$as_save_IFS\n\nfi\nfi\nac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP\nif test -n \"$ac_ct_OBJDUMP\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP\" >&5\n$as_echo \"$ac_ct_OBJDUMP\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\nfi\n\n  if test \"x$ac_ct_OBJDUMP\" = x; then\n    OBJDUMP=\"false\"\n  else\n    case $cross_compiling:$ac_tool_warned in\nyes:)\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet\" >&5\n$as_echo \"$as_me: WARNING: using cross tools not prefixed with host triplet\" >&2;}\nac_tool_warned=yes ;;\nesac\n    OBJDUMP=$ac_ct_OBJDUMP\n  fi\nelse\n  OBJDUMP=\"$ac_cv_prog_OBJDUMP\"\nfi\n\n  ;;\nesac\n\ntest -z \"$AS\" && AS=as\n\n\n\n\n\ntest -z \"$DLLTOOL\" && DLLTOOL=dlltool\n\n\n\n\n\ntest -z \"$OBJDUMP\" && OBJDUMP=objdump\n\n\n\n\n\n\n\ncase `pwd` in\n  *\\ * | *\\\t*)\n    { $as_echo \"$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \\`pwd\\`\" >&5\n$as_echo \"$as_me: WARNING: Libtool does not cope well with whitespace in \\`pwd\\`\" >&2;} ;;\nesac\n\n\n\nmacro_version='2.4.2'\nmacro_revision='1.3337'\n\n\n\n\n\n\n\n\n\n\n\n\n\nltmain=\"$ac_aux_dir/ltmain.sh\"\n\n# Backslashify metacharacters that are still active within\n# double-quoted strings.\nsed_quote_subst='s/\\([\"`$\\\\]\\)/\\\\\\1/g'\n\n# Same as above, but do not quote variable references.\ndouble_quote_subst='s/\\([\"`\\\\]\\)/\\\\\\1/g'\n\n# Sed substitution to delay expansion of an escaped shell variable in a\n# double_quote_subst'ed string.\ndelay_variable_subst='s/\\\\\\\\\\\\\\\\\\\\\\$/\\\\\\\\\\\\$/g'\n\n# Sed substitution to delay expansion of an escaped single quote.\ndelay_single_quote_subst='s/'\\''/'\\'\\\\\\\\\\\\\\'\\''/g'\n\n# Sed substitution to avoid accidental globbing in evaled expressions\nno_glob_subst='s/\\*/\\\\\\*/g'\n\nECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'\nECHO=$ECHO$ECHO$ECHO$ECHO$ECHO\nECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO\n\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking how to print strings\" >&5\n$as_echo_n \"checking how to print strings... \" >&6; }\n# Test print first, because it will be a builtin if present.\nif test \"X`( print -r -- -n ) 2>/dev/null`\" = X-n && \\\n   test \"X`print -r -- $ECHO 2>/dev/null`\" = \"X$ECHO\"; then\n  ECHO='print -r --'\nelif test \"X`printf %s $ECHO 2>/dev/null`\" = \"X$ECHO\"; then\n  ECHO='printf %s\\n'\nelse\n  # Use this function as a fallback that always works.\n  func_fallback_echo ()\n  {\n    eval 'cat <<_LTECHO_EOF\n$1\n_LTECHO_EOF'\n  }\n  ECHO='func_fallback_echo'\nfi\n\n# func_echo_all arg...\n# Invoke $ECHO with all args, space-separated.\nfunc_echo_all ()\n{\n    $ECHO \"\"\n}\n\ncase \"$ECHO\" in\n  printf*) { $as_echo \"$as_me:${as_lineno-$LINENO}: result: printf\" >&5\n$as_echo \"printf\" >&6; } ;;\n  print*) { $as_echo \"$as_me:${as_lineno-$LINENO}: result: print -r\" >&5\n$as_echo \"print -r\" >&6; } ;;\n  *) { $as_echo \"$as_me:${as_lineno-$LINENO}: result: cat\" >&5\n$as_echo \"cat\" >&6; } ;;\nesac\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output\" >&5\n$as_echo_n \"checking for a sed that does not truncate output... \" >&6; }\nif ${ac_cv_path_SED+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/\n     for ac_i in 1 2 3 4 5 6 7; do\n       ac_script=\"$ac_script$as_nl$ac_script\"\n     done\n     echo \"$ac_script\" 2>/dev/null | sed 99q >conftest.sed\n     { ac_script=; unset ac_script;}\n     if test -z \"$SED\"; then\n  ac_path_SED_found=false\n  # Loop through the user's path and test for each of PROGNAME-LIST\n  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    for ac_prog in sed gsed; do\n    for ac_exec_ext in '' $ac_executable_extensions; do\n      ac_path_SED=\"$as_dir/$ac_prog$ac_exec_ext\"\n      as_fn_executable_p \"$ac_path_SED\" || continue\n# Check for GNU ac_path_SED and select it if it is found.\n  # Check for GNU $ac_path_SED\ncase `\"$ac_path_SED\" --version 2>&1` in\n*GNU*)\n  ac_cv_path_SED=\"$ac_path_SED\" ac_path_SED_found=:;;\n*)\n  ac_count=0\n  $as_echo_n 0123456789 >\"conftest.in\"\n  while :\n  do\n    cat \"conftest.in\" \"conftest.in\" >\"conftest.tmp\"\n    mv \"conftest.tmp\" \"conftest.in\"\n    cp \"conftest.in\" \"conftest.nl\"\n    $as_echo '' >> \"conftest.nl\"\n    \"$ac_path_SED\" -f conftest.sed < \"conftest.nl\" >\"conftest.out\" 2>/dev/null || break\n    diff \"conftest.out\" \"conftest.nl\" >/dev/null 2>&1 || break\n    as_fn_arith $ac_count + 1 && ac_count=$as_val\n    if test $ac_count -gt ${ac_path_SED_max-0}; then\n      # Best one so far, save it but keep looking for a better one\n      ac_cv_path_SED=\"$ac_path_SED\"\n      ac_path_SED_max=$ac_count\n    fi\n    # 10*(2^10) chars as input seems more than enough\n    test $ac_count -gt 10 && break\n  done\n  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;\nesac\n\n      $ac_path_SED_found && break 3\n    done\n  done\n  done\nIFS=$as_save_IFS\n  if test -z \"$ac_cv_path_SED\"; then\n    as_fn_error $? \"no acceptable sed could be found in \\$PATH\" \"$LINENO\" 5\n  fi\nelse\n  ac_cv_path_SED=$SED\nfi\n\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED\" >&5\n$as_echo \"$ac_cv_path_SED\" >&6; }\n SED=\"$ac_cv_path_SED\"\n  rm -f conftest.sed\n\ntest -z \"$SED\" && SED=sed\nXsed=\"$SED -e 1s/^X//\"\n\n\n\n\n\n\n\n\n\n\n\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e\" >&5\n$as_echo_n \"checking for grep that handles long lines and -e... \" >&6; }\nif ${ac_cv_path_GREP+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if test -z \"$GREP\"; then\n  ac_path_GREP_found=false\n  # Loop through the user's path and test for each of PROGNAME-LIST\n  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    for ac_prog in grep ggrep; do\n    for ac_exec_ext in '' $ac_executable_extensions; do\n      ac_path_GREP=\"$as_dir/$ac_prog$ac_exec_ext\"\n      as_fn_executable_p \"$ac_path_GREP\" || continue\n# Check for GNU ac_path_GREP and select it if it is found.\n  # Check for GNU $ac_path_GREP\ncase `\"$ac_path_GREP\" --version 2>&1` in\n*GNU*)\n  ac_cv_path_GREP=\"$ac_path_GREP\" ac_path_GREP_found=:;;\n*)\n  ac_count=0\n  $as_echo_n 0123456789 >\"conftest.in\"\n  while :\n  do\n    cat \"conftest.in\" \"conftest.in\" >\"conftest.tmp\"\n    mv \"conftest.tmp\" \"conftest.in\"\n    cp \"conftest.in\" \"conftest.nl\"\n    $as_echo 'GREP' >> \"conftest.nl\"\n    \"$ac_path_GREP\" -e 'GREP$' -e '-(cannot match)-' < \"conftest.nl\" >\"conftest.out\" 2>/dev/null || break\n    diff \"conftest.out\" \"conftest.nl\" >/dev/null 2>&1 || break\n    as_fn_arith $ac_count + 1 && ac_count=$as_val\n    if test $ac_count -gt ${ac_path_GREP_max-0}; then\n      # Best one so far, save it but keep looking for a better one\n      ac_cv_path_GREP=\"$ac_path_GREP\"\n      ac_path_GREP_max=$ac_count\n    fi\n    # 10*(2^10) chars as input seems more than enough\n    test $ac_count -gt 10 && break\n  done\n  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;\nesac\n\n      $ac_path_GREP_found && break 3\n    done\n  done\n  done\nIFS=$as_save_IFS\n  if test -z \"$ac_cv_path_GREP\"; then\n    as_fn_error $? \"no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin\" \"$LINENO\" 5\n  fi\nelse\n  ac_cv_path_GREP=$GREP\nfi\n\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP\" >&5\n$as_echo \"$ac_cv_path_GREP\" >&6; }\n GREP=\"$ac_cv_path_GREP\"\n\n\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for egrep\" >&5\n$as_echo_n \"checking for egrep... \" >&6; }\nif ${ac_cv_path_EGREP+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1\n   then ac_cv_path_EGREP=\"$GREP -E\"\n   else\n     if test -z \"$EGREP\"; then\n  ac_path_EGREP_found=false\n  # Loop through the user's path and test for each of PROGNAME-LIST\n  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    for ac_prog in egrep; do\n    for ac_exec_ext in '' $ac_executable_extensions; do\n      ac_path_EGREP=\"$as_dir/$ac_prog$ac_exec_ext\"\n      as_fn_executable_p \"$ac_path_EGREP\" || continue\n# Check for GNU ac_path_EGREP and select it if it is found.\n  # Check for GNU $ac_path_EGREP\ncase `\"$ac_path_EGREP\" --version 2>&1` in\n*GNU*)\n  ac_cv_path_EGREP=\"$ac_path_EGREP\" ac_path_EGREP_found=:;;\n*)\n  ac_count=0\n  $as_echo_n 0123456789 >\"conftest.in\"\n  while :\n  do\n    cat \"conftest.in\" \"conftest.in\" >\"conftest.tmp\"\n    mv \"conftest.tmp\" \"conftest.in\"\n    cp \"conftest.in\" \"conftest.nl\"\n    $as_echo 'EGREP' >> \"conftest.nl\"\n    \"$ac_path_EGREP\" 'EGREP$' < \"conftest.nl\" >\"conftest.out\" 2>/dev/null || break\n    diff \"conftest.out\" \"conftest.nl\" >/dev/null 2>&1 || break\n    as_fn_arith $ac_count + 1 && ac_count=$as_val\n    if test $ac_count -gt ${ac_path_EGREP_max-0}; then\n      # Best one so far, save it but keep looking for a better one\n      ac_cv_path_EGREP=\"$ac_path_EGREP\"\n      ac_path_EGREP_max=$ac_count\n    fi\n    # 10*(2^10) chars as input seems more than enough\n    test $ac_count -gt 10 && break\n  done\n  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;\nesac\n\n      $ac_path_EGREP_found && break 3\n    done\n  done\n  done\nIFS=$as_save_IFS\n  if test -z \"$ac_cv_path_EGREP\"; then\n    as_fn_error $? \"no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin\" \"$LINENO\" 5\n  fi\nelse\n  ac_cv_path_EGREP=$EGREP\nfi\n\n   fi\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP\" >&5\n$as_echo \"$ac_cv_path_EGREP\" >&6; }\n EGREP=\"$ac_cv_path_EGREP\"\n\n\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for fgrep\" >&5\n$as_echo_n \"checking for fgrep... \" >&6; }\nif ${ac_cv_path_FGREP+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1\n   then ac_cv_path_FGREP=\"$GREP -F\"\n   else\n     if test -z \"$FGREP\"; then\n  ac_path_FGREP_found=false\n  # Loop through the user's path and test for each of PROGNAME-LIST\n  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    for ac_prog in fgrep; do\n    for ac_exec_ext in '' $ac_executable_extensions; do\n      ac_path_FGREP=\"$as_dir/$ac_prog$ac_exec_ext\"\n      as_fn_executable_p \"$ac_path_FGREP\" || continue\n# Check for GNU ac_path_FGREP and select it if it is found.\n  # Check for GNU $ac_path_FGREP\ncase `\"$ac_path_FGREP\" --version 2>&1` in\n*GNU*)\n  ac_cv_path_FGREP=\"$ac_path_FGREP\" ac_path_FGREP_found=:;;\n*)\n  ac_count=0\n  $as_echo_n 0123456789 >\"conftest.in\"\n  while :\n  do\n    cat \"conftest.in\" \"conftest.in\" >\"conftest.tmp\"\n    mv \"conftest.tmp\" \"conftest.in\"\n    cp \"conftest.in\" \"conftest.nl\"\n    $as_echo 'FGREP' >> \"conftest.nl\"\n    \"$ac_path_FGREP\" FGREP < \"conftest.nl\" >\"conftest.out\" 2>/dev/null || break\n    diff \"conftest.out\" \"conftest.nl\" >/dev/null 2>&1 || break\n    as_fn_arith $ac_count + 1 && ac_count=$as_val\n    if test $ac_count -gt ${ac_path_FGREP_max-0}; then\n      # Best one so far, save it but keep looking for a better one\n      ac_cv_path_FGREP=\"$ac_path_FGREP\"\n      ac_path_FGREP_max=$ac_count\n    fi\n    # 10*(2^10) chars as input seems more than enough\n    test $ac_count -gt 10 && break\n  done\n  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;\nesac\n\n      $ac_path_FGREP_found && break 3\n    done\n  done\n  done\nIFS=$as_save_IFS\n  if test -z \"$ac_cv_path_FGREP\"; then\n    as_fn_error $? \"no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin\" \"$LINENO\" 5\n  fi\nelse\n  ac_cv_path_FGREP=$FGREP\nfi\n\n   fi\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP\" >&5\n$as_echo \"$ac_cv_path_FGREP\" >&6; }\n FGREP=\"$ac_cv_path_FGREP\"\n\n\ntest -z \"$GREP\" && GREP=grep\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n# Check whether --with-gnu-ld was given.\nif test \"${with_gnu_ld+set}\" = set; then :\n  withval=$with_gnu_ld; test \"$withval\" = no || with_gnu_ld=yes\nelse\n  with_gnu_ld=no\nfi\n\nac_prog=ld\nif test \"$GCC\" = yes; then\n  # Check if gcc -print-prog-name=ld gives a path.\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: checking for ld used by $CC\" >&5\n$as_echo_n \"checking for ld used by $CC... \" >&6; }\n  case $host in\n  *-*-mingw*)\n    # gcc leaves a trailing carriage return which upsets mingw\n    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\\015'` ;;\n  *)\n    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;\n  esac\n  case $ac_prog in\n    # Accept absolute paths.\n    [\\\\/]* | ?:[\\\\/]*)\n      re_direlt='/[^/][^/]*/\\.\\./'\n      # Canonicalize the pathname of ld\n      ac_prog=`$ECHO \"$ac_prog\"| $SED 's%\\\\\\\\%/%g'`\n      while $ECHO \"$ac_prog\" | $GREP \"$re_direlt\" > /dev/null 2>&1; do\n\tac_prog=`$ECHO $ac_prog| $SED \"s%$re_direlt%/%\"`\n      done\n      test -z \"$LD\" && LD=\"$ac_prog\"\n      ;;\n  \"\")\n    # If it fails, then pretend we aren't using GCC.\n    ac_prog=ld\n    ;;\n  *)\n    # If it is relative, then search for the first ld in PATH.\n    with_gnu_ld=unknown\n    ;;\n  esac\nelif test \"$with_gnu_ld\" = yes; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: checking for GNU ld\" >&5\n$as_echo_n \"checking for GNU ld... \" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: checking for non-GNU ld\" >&5\n$as_echo_n \"checking for non-GNU ld... \" >&6; }\nfi\nif ${lt_cv_path_LD+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if test -z \"$LD\"; then\n  lt_save_ifs=\"$IFS\"; IFS=$PATH_SEPARATOR\n  for ac_dir in $PATH; do\n    IFS=\"$lt_save_ifs\"\n    test -z \"$ac_dir\" && ac_dir=.\n    if test -f \"$ac_dir/$ac_prog\" || test -f \"$ac_dir/$ac_prog$ac_exeext\"; then\n      lt_cv_path_LD=\"$ac_dir/$ac_prog\"\n      # Check to see if the program is GNU ld.  I'd rather use --version,\n      # but apparently some variants of GNU ld only accept -v.\n      # Break only if it was the GNU/non-GNU ld that we prefer.\n      case `\"$lt_cv_path_LD\" -v 2>&1 </dev/null` in\n      *GNU* | *'with BFD'*)\n\ttest \"$with_gnu_ld\" != no && break\n\t;;\n      *)\n\ttest \"$with_gnu_ld\" != yes && break\n\t;;\n      esac\n    fi\n  done\n  IFS=\"$lt_save_ifs\"\nelse\n  lt_cv_path_LD=\"$LD\" # Let the user override the test with a path.\nfi\nfi\n\nLD=\"$lt_cv_path_LD\"\nif test -n \"$LD\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $LD\" >&5\n$as_echo \"$LD\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\nfi\ntest -z \"$LD\" && as_fn_error $? \"no acceptable ld found in \\$PATH\" \"$LINENO\" 5\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld\" >&5\n$as_echo_n \"checking if the linker ($LD) is GNU ld... \" >&6; }\nif ${lt_cv_prog_gnu_ld+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  # I'd rather use --version here, but apparently some GNU lds only accept -v.\ncase `$LD -v 2>&1 </dev/null` in\n*GNU* | *'with BFD'*)\n  lt_cv_prog_gnu_ld=yes\n  ;;\n*)\n  lt_cv_prog_gnu_ld=no\n  ;;\nesac\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld\" >&5\n$as_echo \"$lt_cv_prog_gnu_ld\" >&6; }\nwith_gnu_ld=$lt_cv_prog_gnu_ld\n\n\n\n\n\n\n\n\n\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)\" >&5\n$as_echo_n \"checking for BSD- or MS-compatible name lister (nm)... \" >&6; }\nif ${lt_cv_path_NM+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if test -n \"$NM\"; then\n  # Let the user override the test.\n  lt_cv_path_NM=\"$NM\"\nelse\n  lt_nm_to_check=\"${ac_tool_prefix}nm\"\n  if test -n \"$ac_tool_prefix\" && test \"$build\" = \"$host\"; then\n    lt_nm_to_check=\"$lt_nm_to_check nm\"\n  fi\n  for lt_tmp_nm in $lt_nm_to_check; do\n    lt_save_ifs=\"$IFS\"; IFS=$PATH_SEPARATOR\n    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do\n      IFS=\"$lt_save_ifs\"\n      test -z \"$ac_dir\" && ac_dir=.\n      tmp_nm=\"$ac_dir/$lt_tmp_nm\"\n      if test -f \"$tmp_nm\" || test -f \"$tmp_nm$ac_exeext\" ; then\n\t# Check to see if the nm accepts a BSD-compat flag.\n\t# Adding the `sed 1q' prevents false positives on HP-UX, which says:\n\t#   nm: unknown option \"B\" ignored\n\t# Tru64's nm complains that /dev/null is an invalid object file\n\tcase `\"$tmp_nm\" -B /dev/null 2>&1 | sed '1q'` in\n\t*/dev/null* | *'Invalid file or object type'*)\n\t  lt_cv_path_NM=\"$tmp_nm -B\"\n\t  break\n\t  ;;\n\t*)\n\t  case `\"$tmp_nm\" -p /dev/null 2>&1 | sed '1q'` in\n\t  */dev/null*)\n\t    lt_cv_path_NM=\"$tmp_nm -p\"\n\t    break\n\t    ;;\n\t  *)\n\t    lt_cv_path_NM=${lt_cv_path_NM=\"$tmp_nm\"} # keep the first match, but\n\t    continue # so that we can try to find one that supports BSD flags\n\t    ;;\n\t  esac\n\t  ;;\n\tesac\n      fi\n    done\n    IFS=\"$lt_save_ifs\"\n  done\n  : ${lt_cv_path_NM=no}\nfi\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM\" >&5\n$as_echo \"$lt_cv_path_NM\" >&6; }\nif test \"$lt_cv_path_NM\" != \"no\"; then\n  NM=\"$lt_cv_path_NM\"\nelse\n  # Didn't find any BSD compatible name lister, look for dumpbin.\n  if test -n \"$DUMPBIN\"; then :\n    # Let the user override the test.\n  else\n    if test -n \"$ac_tool_prefix\"; then\n  for ac_prog in dumpbin \"link -dump\"\n  do\n    # Extract the first word of \"$ac_tool_prefix$ac_prog\", so it can be a program name with args.\nset dummy $ac_tool_prefix$ac_prog; ac_word=$2\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $ac_word\" >&5\n$as_echo_n \"checking for $ac_word... \" >&6; }\nif ${ac_cv_prog_DUMPBIN+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if test -n \"$DUMPBIN\"; then\n  ac_cv_prog_DUMPBIN=\"$DUMPBIN\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    for ac_exec_ext in '' $ac_executable_extensions; do\n  if as_fn_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_DUMPBIN=\"$ac_tool_prefix$ac_prog\"\n    $as_echo \"$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\n  done\nIFS=$as_save_IFS\n\nfi\nfi\nDUMPBIN=$ac_cv_prog_DUMPBIN\nif test -n \"$DUMPBIN\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $DUMPBIN\" >&5\n$as_echo \"$DUMPBIN\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\nfi\n\n\n    test -n \"$DUMPBIN\" && break\n  done\nfi\nif test -z \"$DUMPBIN\"; then\n  ac_ct_DUMPBIN=$DUMPBIN\n  for ac_prog in dumpbin \"link -dump\"\ndo\n  # Extract the first word of \"$ac_prog\", so it can be a program name with args.\nset dummy $ac_prog; ac_word=$2\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $ac_word\" >&5\n$as_echo_n \"checking for $ac_word... \" >&6; }\nif ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if test -n \"$ac_ct_DUMPBIN\"; then\n  ac_cv_prog_ac_ct_DUMPBIN=\"$ac_ct_DUMPBIN\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    for ac_exec_ext in '' $ac_executable_extensions; do\n  if as_fn_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_ac_ct_DUMPBIN=\"$ac_prog\"\n    $as_echo \"$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\n  done\nIFS=$as_save_IFS\n\nfi\nfi\nac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN\nif test -n \"$ac_ct_DUMPBIN\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN\" >&5\n$as_echo \"$ac_ct_DUMPBIN\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\nfi\n\n\n  test -n \"$ac_ct_DUMPBIN\" && break\ndone\n\n  if test \"x$ac_ct_DUMPBIN\" = x; then\n    DUMPBIN=\":\"\n  else\n    case $cross_compiling:$ac_tool_warned in\nyes:)\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet\" >&5\n$as_echo \"$as_me: WARNING: using cross tools not prefixed with host triplet\" >&2;}\nac_tool_warned=yes ;;\nesac\n    DUMPBIN=$ac_ct_DUMPBIN\n  fi\nfi\n\n    case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in\n    *COFF*)\n      DUMPBIN=\"$DUMPBIN -symbols\"\n      ;;\n    *)\n      DUMPBIN=:\n      ;;\n    esac\n  fi\n\n  if test \"$DUMPBIN\" != \":\"; then\n    NM=\"$DUMPBIN\"\n  fi\nfi\ntest -z \"$NM\" && NM=nm\n\n\n\n\n\n\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface\" >&5\n$as_echo_n \"checking the name lister ($NM) interface... \" >&6; }\nif ${lt_cv_nm_interface+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  lt_cv_nm_interface=\"BSD nm\"\n  echo \"int some_variable = 0;\" > conftest.$ac_ext\n  (eval echo \"\\\"\\$as_me:$LINENO: $ac_compile\\\"\" >&5)\n  (eval \"$ac_compile\" 2>conftest.err)\n  cat conftest.err >&5\n  (eval echo \"\\\"\\$as_me:$LINENO: $NM \\\\\\\"conftest.$ac_objext\\\\\\\"\\\"\" >&5)\n  (eval \"$NM \\\"conftest.$ac_objext\\\"\" 2>conftest.err > conftest.out)\n  cat conftest.err >&5\n  (eval echo \"\\\"\\$as_me:$LINENO: output\\\"\" >&5)\n  cat conftest.out >&5\n  if $GREP 'External.*some_variable' conftest.out > /dev/null; then\n    lt_cv_nm_interface=\"MS dumpbin\"\n  fi\n  rm -f conftest*\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface\" >&5\n$as_echo \"$lt_cv_nm_interface\" >&6; }\n\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking whether ln -s works\" >&5\n$as_echo_n \"checking whether ln -s works... \" >&6; }\nLN_S=$as_ln_s\nif test \"$LN_S\" = \"ln -s\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: yes\" >&5\n$as_echo \"yes\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no, using $LN_S\" >&5\n$as_echo \"no, using $LN_S\" >&6; }\nfi\n\n# find the maximum length of command line arguments\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments\" >&5\n$as_echo_n \"checking the maximum length of command line arguments... \" >&6; }\nif ${lt_cv_sys_max_cmd_len+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n    i=0\n  teststring=\"ABCD\"\n\n  case $build_os in\n  msdosdjgpp*)\n    # On DJGPP, this test can blow up pretty badly due to problems in libc\n    # (any single argument exceeding 2000 bytes causes a buffer overrun\n    # during glob expansion).  Even if it were fixed, the result of this\n    # check would be larger than it should be.\n    lt_cv_sys_max_cmd_len=12288;    # 12K is about right\n    ;;\n\n  gnu*)\n    # Under GNU Hurd, this test is not required because there is\n    # no limit to the length of command line arguments.\n    # Libtool will interpret -1 as no limit whatsoever\n    lt_cv_sys_max_cmd_len=-1;\n    ;;\n\n  cygwin* | mingw* | cegcc*)\n    # On Win9x/ME, this test blows up -- it succeeds, but takes\n    # about 5 minutes as the teststring grows exponentially.\n    # Worse, since 9x/ME are not pre-emptively multitasking,\n    # you end up with a \"frozen\" computer, even though with patience\n    # the test eventually succeeds (with a max line length of 256k).\n    # Instead, let's just punt: use the minimum linelength reported by\n    # all of the supported platforms: 8192 (on NT/2K/XP).\n    lt_cv_sys_max_cmd_len=8192;\n    ;;\n\n  mint*)\n    # On MiNT this can take a long time and run out of memory.\n    lt_cv_sys_max_cmd_len=8192;\n    ;;\n\n  amigaos*)\n    # On AmigaOS with pdksh, this test takes hours, literally.\n    # So we just punt and use a minimum line length of 8192.\n    lt_cv_sys_max_cmd_len=8192;\n    ;;\n\n  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)\n    # This has been around since 386BSD, at least.  Likely further.\n    if test -x /sbin/sysctl; then\n      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`\n    elif test -x /usr/sbin/sysctl; then\n      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`\n    else\n      lt_cv_sys_max_cmd_len=65536\t# usable default for all BSDs\n    fi\n    # And add a safety zone\n    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \\/ 4`\n    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \\* 3`\n    ;;\n\n  interix*)\n    # We know the value 262144 and hardcode it with a safety zone (like BSD)\n    lt_cv_sys_max_cmd_len=196608\n    ;;\n\n  os2*)\n    # The test takes a long time on OS/2.\n    lt_cv_sys_max_cmd_len=8192\n    ;;\n\n  osf*)\n    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure\n    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not\n    # nice to cause kernel panics so lets avoid the loop below.\n    # First set a reasonable default.\n    lt_cv_sys_max_cmd_len=16384\n    #\n    if test -x /sbin/sysconfig; then\n      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in\n        *1*) lt_cv_sys_max_cmd_len=-1 ;;\n      esac\n    fi\n    ;;\n  sco3.2v5*)\n    lt_cv_sys_max_cmd_len=102400\n    ;;\n  sysv5* | sco5v6* | sysv4.2uw2*)\n    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`\n    if test -n \"$kargmax\"; then\n      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[\t ]//'`\n    else\n      lt_cv_sys_max_cmd_len=32768\n    fi\n    ;;\n  *)\n    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`\n    if test -n \"$lt_cv_sys_max_cmd_len\" && \\\n\ttest undefined != \"$lt_cv_sys_max_cmd_len\"; then\n      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \\/ 4`\n      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \\* 3`\n    else\n      # Make teststring a little bigger before we do anything with it.\n      # a 1K string should be a reasonable start.\n      for i in 1 2 3 4 5 6 7 8 ; do\n        teststring=$teststring$teststring\n      done\n      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}\n      # If test is not a shell built-in, we'll probably end up computing a\n      # maximum length that is only half of the actual maximum length, but\n      # we can't tell.\n      while { test \"X\"`env echo \"$teststring$teststring\" 2>/dev/null` \\\n\t         = \"X$teststring$teststring\"; } >/dev/null 2>&1 &&\n\t      test $i != 17 # 1/2 MB should be enough\n      do\n        i=`expr $i + 1`\n        teststring=$teststring$teststring\n      done\n      # Only check the string length outside the loop.\n      lt_cv_sys_max_cmd_len=`expr \"X$teststring\" : \".*\" 2>&1`\n      teststring=\n      # Add a significant safety factor because C++ compilers can tack on\n      # massive amounts of additional arguments before passing them to the\n      # linker.  It appears as though 1/2 is a usable value.\n      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \\/ 2`\n    fi\n    ;;\n  esac\n\nfi\n\nif test -n $lt_cv_sys_max_cmd_len ; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len\" >&5\n$as_echo \"$lt_cv_sys_max_cmd_len\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: none\" >&5\n$as_echo \"none\" >&6; }\nfi\nmax_cmd_len=$lt_cv_sys_max_cmd_len\n\n\n\n\n\n\n: ${CP=\"cp -f\"}\n: ${MV=\"mv -f\"}\n: ${RM=\"rm -f\"}\n\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs\" >&5\n$as_echo_n \"checking whether the shell understands some XSI constructs... \" >&6; }\n# Try some XSI features\nxsi_shell=no\n( _lt_dummy=\"a/b/c\"\n  test \"${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}\"${_lt_dummy%\"$_lt_dummy\"}, \\\n      = c,a/b,b/c, \\\n    && eval 'test $(( 1 + 1 )) -eq 2 \\\n    && test \"${#_lt_dummy}\" -eq 5' ) >/dev/null 2>&1 \\\n  && xsi_shell=yes\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $xsi_shell\" >&5\n$as_echo \"$xsi_shell\" >&6; }\n\n\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking whether the shell understands \\\"+=\\\"\" >&5\n$as_echo_n \"checking whether the shell understands \\\"+=\\\"... \" >&6; }\nlt_shell_append=no\n( foo=bar; set foo baz; eval \"$1+=\\$2\" && test \"$foo\" = barbaz ) \\\n    >/dev/null 2>&1 \\\n  && lt_shell_append=yes\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $lt_shell_append\" >&5\n$as_echo \"$lt_shell_append\" >&6; }\n\n\nif ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then\n  lt_unset=unset\nelse\n  lt_unset=false\nfi\n\n\n\n\n\n# test EBCDIC or ASCII\ncase `echo X|tr X '\\101'` in\n A) # ASCII based system\n    # \\n is not interpreted correctly by Solaris 8 /usr/ucb/tr\n  lt_SP2NL='tr \\040 \\012'\n  lt_NL2SP='tr \\015\\012 \\040\\040'\n  ;;\n *) # EBCDIC based system\n  lt_SP2NL='tr \\100 \\n'\n  lt_NL2SP='tr \\r\\n \\100\\100'\n  ;;\nesac\n\n\n\n\n\n\n\n\n\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format\" >&5\n$as_echo_n \"checking how to convert $build file names to $host format... \" >&6; }\nif ${lt_cv_to_host_file_cmd+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  case $host in\n  *-*-mingw* )\n    case $build in\n      *-*-mingw* ) # actually msys\n        lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32\n        ;;\n      *-*-cygwin* )\n        lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32\n        ;;\n      * ) # otherwise, assume *nix\n        lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32\n        ;;\n    esac\n    ;;\n  *-*-cygwin* )\n    case $build in\n      *-*-mingw* ) # actually msys\n        lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin\n        ;;\n      *-*-cygwin* )\n        lt_cv_to_host_file_cmd=func_convert_file_noop\n        ;;\n      * ) # otherwise, assume *nix\n        lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin\n        ;;\n    esac\n    ;;\n  * ) # unhandled hosts (and \"normal\" native builds)\n    lt_cv_to_host_file_cmd=func_convert_file_noop\n    ;;\nesac\n\nfi\n\nto_host_file_cmd=$lt_cv_to_host_file_cmd\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd\" >&5\n$as_echo \"$lt_cv_to_host_file_cmd\" >&6; }\n\n\n\n\n\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format\" >&5\n$as_echo_n \"checking how to convert $build file names to toolchain format... \" >&6; }\nif ${lt_cv_to_tool_file_cmd+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  #assume ordinary cross tools, or native build.\nlt_cv_to_tool_file_cmd=func_convert_file_noop\ncase $host in\n  *-*-mingw* )\n    case $build in\n      *-*-mingw* ) # actually msys\n        lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32\n        ;;\n    esac\n    ;;\nesac\n\nfi\n\nto_tool_file_cmd=$lt_cv_to_tool_file_cmd\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd\" >&5\n$as_echo \"$lt_cv_to_tool_file_cmd\" >&6; }\n\n\n\n\n\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files\" >&5\n$as_echo_n \"checking for $LD option to reload object files... \" >&6; }\nif ${lt_cv_ld_reload_flag+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  lt_cv_ld_reload_flag='-r'\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag\" >&5\n$as_echo \"$lt_cv_ld_reload_flag\" >&6; }\nreload_flag=$lt_cv_ld_reload_flag\ncase $reload_flag in\n\"\" | \" \"*) ;;\n*) reload_flag=\" $reload_flag\" ;;\nesac\nreload_cmds='$LD$reload_flag -o $output$reload_objs'\ncase $host_os in\n  cygwin* | mingw* | pw32* | cegcc*)\n    if test \"$GCC\" != yes; then\n      reload_cmds=false\n    fi\n    ;;\n  darwin*)\n    if test \"$GCC\" = yes; then\n      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'\n    else\n      reload_cmds='$LD$reload_flag -o $output$reload_objs'\n    fi\n    ;;\nesac\n\n\n\n\n\n\n\n\n\nif test -n \"$ac_tool_prefix\"; then\n  # Extract the first word of \"${ac_tool_prefix}objdump\", so it can be a program name with args.\nset dummy ${ac_tool_prefix}objdump; ac_word=$2\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $ac_word\" >&5\n$as_echo_n \"checking for $ac_word... \" >&6; }\nif ${ac_cv_prog_OBJDUMP+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if test -n \"$OBJDUMP\"; then\n  ac_cv_prog_OBJDUMP=\"$OBJDUMP\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    for ac_exec_ext in '' $ac_executable_extensions; do\n  if as_fn_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_OBJDUMP=\"${ac_tool_prefix}objdump\"\n    $as_echo \"$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\n  done\nIFS=$as_save_IFS\n\nfi\nfi\nOBJDUMP=$ac_cv_prog_OBJDUMP\nif test -n \"$OBJDUMP\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $OBJDUMP\" >&5\n$as_echo \"$OBJDUMP\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\nfi\n\n\nfi\nif test -z \"$ac_cv_prog_OBJDUMP\"; then\n  ac_ct_OBJDUMP=$OBJDUMP\n  # Extract the first word of \"objdump\", so it can be a program name with args.\nset dummy objdump; ac_word=$2\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $ac_word\" >&5\n$as_echo_n \"checking for $ac_word... \" >&6; }\nif ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if test -n \"$ac_ct_OBJDUMP\"; then\n  ac_cv_prog_ac_ct_OBJDUMP=\"$ac_ct_OBJDUMP\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    for ac_exec_ext in '' $ac_executable_extensions; do\n  if as_fn_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_ac_ct_OBJDUMP=\"objdump\"\n    $as_echo \"$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\n  done\nIFS=$as_save_IFS\n\nfi\nfi\nac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP\nif test -n \"$ac_ct_OBJDUMP\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP\" >&5\n$as_echo \"$ac_ct_OBJDUMP\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\nfi\n\n  if test \"x$ac_ct_OBJDUMP\" = x; then\n    OBJDUMP=\"false\"\n  else\n    case $cross_compiling:$ac_tool_warned in\nyes:)\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet\" >&5\n$as_echo \"$as_me: WARNING: using cross tools not prefixed with host triplet\" >&2;}\nac_tool_warned=yes ;;\nesac\n    OBJDUMP=$ac_ct_OBJDUMP\n  fi\nelse\n  OBJDUMP=\"$ac_cv_prog_OBJDUMP\"\nfi\n\ntest -z \"$OBJDUMP\" && OBJDUMP=objdump\n\n\n\n\n\n\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries\" >&5\n$as_echo_n \"checking how to recognize dependent libraries... \" >&6; }\nif ${lt_cv_deplibs_check_method+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  lt_cv_file_magic_cmd='$MAGIC_CMD'\nlt_cv_file_magic_test_file=\nlt_cv_deplibs_check_method='unknown'\n# Need to set the preceding variable on all platforms that support\n# interlibrary dependencies.\n# 'none' -- dependencies not supported.\n# `unknown' -- same as none, but documents that we really don't know.\n# 'pass_all' -- all dependencies passed with no checks.\n# 'test_compile' -- check by making test program.\n# 'file_magic [[regex]]' -- check by looking for files in library path\n# which responds to the $file_magic_cmd with a given extended regex.\n# If you have `file' or equivalent on your system and you're not sure\n# whether `pass_all' will *always* work, you probably want this one.\n\ncase $host_os in\naix[4-9]*)\n  lt_cv_deplibs_check_method=pass_all\n  ;;\n\nbeos*)\n  lt_cv_deplibs_check_method=pass_all\n  ;;\n\nbsdi[45]*)\n  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'\n  lt_cv_file_magic_cmd='/usr/bin/file -L'\n  lt_cv_file_magic_test_file=/shlib/libc.so\n  ;;\n\ncygwin*)\n  # func_win32_libid is a shell function defined in ltmain.sh\n  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'\n  lt_cv_file_magic_cmd='func_win32_libid'\n  ;;\n\nmingw* | pw32*)\n  # Base MSYS/MinGW do not provide the 'file' command needed by\n  # func_win32_libid shell function, so use a weaker test based on 'objdump',\n  # unless we find 'file', for example because we are cross-compiling.\n  # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.\n  if ( test \"$lt_cv_nm_interface\" = \"BSD nm\" && file / ) >/dev/null 2>&1; then\n    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'\n    lt_cv_file_magic_cmd='func_win32_libid'\n  else\n    # Keep this pattern in sync with the one in func_win32_libid.\n    lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'\n    lt_cv_file_magic_cmd='$OBJDUMP -f'\n  fi\n  ;;\n\ncegcc*)\n  # use the weaker test based on 'objdump'. See mingw*.\n  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'\n  lt_cv_file_magic_cmd='$OBJDUMP -f'\n  ;;\n\ndarwin* | rhapsody*)\n  lt_cv_deplibs_check_method=pass_all\n  ;;\n\nfreebsd* | dragonfly*)\n  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then\n    case $host_cpu in\n    i*86 )\n      # Not sure whether the presence of OpenBSD here was a mistake.\n      # Let's accept both of them until this is cleared up.\n      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'\n      lt_cv_file_magic_cmd=/usr/bin/file\n      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`\n      ;;\n    esac\n  else\n    lt_cv_deplibs_check_method=pass_all\n  fi\n  ;;\n\nhaiku*)\n  lt_cv_deplibs_check_method=pass_all\n  ;;\n\nhpux10.20* | hpux11*)\n  lt_cv_file_magic_cmd=/usr/bin/file\n  case $host_cpu in\n  ia64*)\n    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'\n    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so\n    ;;\n  hppa*64*)\n    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\\.[0-9]'\n    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl\n    ;;\n  *)\n    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\\.[0-9]) shared library'\n    lt_cv_file_magic_test_file=/usr/lib/libc.sl\n    ;;\n  esac\n  ;;\n\ninterix[3-9]*)\n  # PIC code is broken on Interix 3.x, that's why |\\.a not |_pic\\.a here\n  lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\\.so|\\.a)$'\n  ;;\n\nirix5* | irix6* | nonstopux*)\n  case $LD in\n  *-32|*\"-32 \") libmagic=32-bit;;\n  *-n32|*\"-n32 \") libmagic=N32;;\n  *-64|*\"-64 \") libmagic=64-bit;;\n  *) libmagic=never-match;;\n  esac\n  lt_cv_deplibs_check_method=pass_all\n  ;;\n\n# This must be glibc/ELF.\nlinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)\n  lt_cv_deplibs_check_method=pass_all\n  ;;\n\nnetbsd* | netbsdelf*-gnu)\n  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then\n    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\\.so\\.[0-9]+\\.[0-9]+|_pic\\.a)$'\n  else\n    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\\.so|_pic\\.a)$'\n  fi\n  ;;\n\nnewos6*)\n  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'\n  lt_cv_file_magic_cmd=/usr/bin/file\n  lt_cv_file_magic_test_file=/usr/lib/libnls.so\n  ;;\n\n*nto* | *qnx*)\n  lt_cv_deplibs_check_method=pass_all\n  ;;\n\nopenbsd*)\n  if test -z \"`echo __ELF__ | $CC -E - | $GREP __ELF__`\" || test \"$host_os-$host_cpu\" = \"openbsd2.8-powerpc\"; then\n    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\\.so\\.[0-9]+\\.[0-9]+|\\.so|_pic\\.a)$'\n  else\n    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\\.so\\.[0-9]+\\.[0-9]+|_pic\\.a)$'\n  fi\n  ;;\n\nosf3* | osf4* | osf5*)\n  lt_cv_deplibs_check_method=pass_all\n  ;;\n\nrdos*)\n  lt_cv_deplibs_check_method=pass_all\n  ;;\n\nsolaris*)\n  lt_cv_deplibs_check_method=pass_all\n  ;;\n\nsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)\n  lt_cv_deplibs_check_method=pass_all\n  ;;\n\nsysv4 | sysv4.3*)\n  case $host_vendor in\n  motorola)\n    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'\n    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`\n    ;;\n  ncr)\n    lt_cv_deplibs_check_method=pass_all\n    ;;\n  sequent)\n    lt_cv_file_magic_cmd='/bin/file'\n    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'\n    ;;\n  sni)\n    lt_cv_file_magic_cmd='/bin/file'\n    lt_cv_deplibs_check_method=\"file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib\"\n    lt_cv_file_magic_test_file=/lib/libc.so\n    ;;\n  siemens)\n    lt_cv_deplibs_check_method=pass_all\n    ;;\n  pc)\n    lt_cv_deplibs_check_method=pass_all\n    ;;\n  esac\n  ;;\n\ntpf*)\n  lt_cv_deplibs_check_method=pass_all\n  ;;\nesac\n\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method\" >&5\n$as_echo \"$lt_cv_deplibs_check_method\" >&6; }\n\nfile_magic_glob=\nwant_nocaseglob=no\nif test \"$build\" = \"$host\"; then\n  case $host_os in\n  mingw* | pw32*)\n    if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then\n      want_nocaseglob=yes\n    else\n      file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e \"s/\\(..\\)/s\\/[\\1]\\/[\\1]\\/g;/g\"`\n    fi\n    ;;\n  esac\nfi\n\nfile_magic_cmd=$lt_cv_file_magic_cmd\ndeplibs_check_method=$lt_cv_deplibs_check_method\ntest -z \"$deplibs_check_method\" && deplibs_check_method=unknown\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nif test -n \"$ac_tool_prefix\"; then\n  # Extract the first word of \"${ac_tool_prefix}dlltool\", so it can be a program name with args.\nset dummy ${ac_tool_prefix}dlltool; ac_word=$2\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $ac_word\" >&5\n$as_echo_n \"checking for $ac_word... \" >&6; }\nif ${ac_cv_prog_DLLTOOL+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if test -n \"$DLLTOOL\"; then\n  ac_cv_prog_DLLTOOL=\"$DLLTOOL\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    for ac_exec_ext in '' $ac_executable_extensions; do\n  if as_fn_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_DLLTOOL=\"${ac_tool_prefix}dlltool\"\n    $as_echo \"$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\n  done\nIFS=$as_save_IFS\n\nfi\nfi\nDLLTOOL=$ac_cv_prog_DLLTOOL\nif test -n \"$DLLTOOL\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $DLLTOOL\" >&5\n$as_echo \"$DLLTOOL\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\nfi\n\n\nfi\nif test -z \"$ac_cv_prog_DLLTOOL\"; then\n  ac_ct_DLLTOOL=$DLLTOOL\n  # Extract the first word of \"dlltool\", so it can be a program name with args.\nset dummy dlltool; ac_word=$2\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $ac_word\" >&5\n$as_echo_n \"checking for $ac_word... \" >&6; }\nif ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if test -n \"$ac_ct_DLLTOOL\"; then\n  ac_cv_prog_ac_ct_DLLTOOL=\"$ac_ct_DLLTOOL\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    for ac_exec_ext in '' $ac_executable_extensions; do\n  if as_fn_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_ac_ct_DLLTOOL=\"dlltool\"\n    $as_echo \"$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\n  done\nIFS=$as_save_IFS\n\nfi\nfi\nac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL\nif test -n \"$ac_ct_DLLTOOL\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL\" >&5\n$as_echo \"$ac_ct_DLLTOOL\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\nfi\n\n  if test \"x$ac_ct_DLLTOOL\" = x; then\n    DLLTOOL=\"false\"\n  else\n    case $cross_compiling:$ac_tool_warned in\nyes:)\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet\" >&5\n$as_echo \"$as_me: WARNING: using cross tools not prefixed with host triplet\" >&2;}\nac_tool_warned=yes ;;\nesac\n    DLLTOOL=$ac_ct_DLLTOOL\n  fi\nelse\n  DLLTOOL=\"$ac_cv_prog_DLLTOOL\"\nfi\n\ntest -z \"$DLLTOOL\" && DLLTOOL=dlltool\n\n\n\n\n\n\n\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries\" >&5\n$as_echo_n \"checking how to associate runtime and link libraries... \" >&6; }\nif ${lt_cv_sharedlib_from_linklib_cmd+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  lt_cv_sharedlib_from_linklib_cmd='unknown'\n\ncase $host_os in\ncygwin* | mingw* | pw32* | cegcc*)\n  # two different shell functions defined in ltmain.sh\n  # decide which to use based on capabilities of $DLLTOOL\n  case `$DLLTOOL --help 2>&1` in\n  *--identify-strict*)\n    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib\n    ;;\n  *)\n    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback\n    ;;\n  esac\n  ;;\n*)\n  # fallback: assume linklib IS sharedlib\n  lt_cv_sharedlib_from_linklib_cmd=\"$ECHO\"\n  ;;\nesac\n\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd\" >&5\n$as_echo \"$lt_cv_sharedlib_from_linklib_cmd\" >&6; }\nsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd\ntest -z \"$sharedlib_from_linklib_cmd\" && sharedlib_from_linklib_cmd=$ECHO\n\n\n\n\n\n\n\n\nif test -n \"$ac_tool_prefix\"; then\n  for ac_prog in ar\n  do\n    # Extract the first word of \"$ac_tool_prefix$ac_prog\", so it can be a program name with args.\nset dummy $ac_tool_prefix$ac_prog; ac_word=$2\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $ac_word\" >&5\n$as_echo_n \"checking for $ac_word... \" >&6; }\nif ${ac_cv_prog_AR+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if test -n \"$AR\"; then\n  ac_cv_prog_AR=\"$AR\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    for ac_exec_ext in '' $ac_executable_extensions; do\n  if as_fn_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_AR=\"$ac_tool_prefix$ac_prog\"\n    $as_echo \"$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\n  done\nIFS=$as_save_IFS\n\nfi\nfi\nAR=$ac_cv_prog_AR\nif test -n \"$AR\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $AR\" >&5\n$as_echo \"$AR\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\nfi\n\n\n    test -n \"$AR\" && break\n  done\nfi\nif test -z \"$AR\"; then\n  ac_ct_AR=$AR\n  for ac_prog in ar\ndo\n  # Extract the first word of \"$ac_prog\", so it can be a program name with args.\nset dummy $ac_prog; ac_word=$2\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $ac_word\" >&5\n$as_echo_n \"checking for $ac_word... \" >&6; }\nif ${ac_cv_prog_ac_ct_AR+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if test -n \"$ac_ct_AR\"; then\n  ac_cv_prog_ac_ct_AR=\"$ac_ct_AR\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    for ac_exec_ext in '' $ac_executable_extensions; do\n  if as_fn_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_ac_ct_AR=\"$ac_prog\"\n    $as_echo \"$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\n  done\nIFS=$as_save_IFS\n\nfi\nfi\nac_ct_AR=$ac_cv_prog_ac_ct_AR\nif test -n \"$ac_ct_AR\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR\" >&5\n$as_echo \"$ac_ct_AR\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\nfi\n\n\n  test -n \"$ac_ct_AR\" && break\ndone\n\n  if test \"x$ac_ct_AR\" = x; then\n    AR=\"false\"\n  else\n    case $cross_compiling:$ac_tool_warned in\nyes:)\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet\" >&5\n$as_echo \"$as_me: WARNING: using cross tools not prefixed with host triplet\" >&2;}\nac_tool_warned=yes ;;\nesac\n    AR=$ac_ct_AR\n  fi\nfi\n\n: ${AR=ar}\n: ${AR_FLAGS=cru}\n\n\n\n\n\n\n\n\n\n\n\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support\" >&5\n$as_echo_n \"checking for archiver @FILE support... \" >&6; }\nif ${lt_cv_ar_at_file+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  lt_cv_ar_at_file=no\n   cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n\nint\nmain ()\n{\n\n  ;\n  return 0;\n}\n_ACEOF\nif ac_fn_c_try_compile \"$LINENO\"; then :\n  echo conftest.$ac_objext > conftest.lst\n      lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5'\n      { { eval echo \"\\\"\\$as_me\\\":${as_lineno-$LINENO}: \\\"$lt_ar_try\\\"\"; } >&5\n  (eval $lt_ar_try) 2>&5\n  ac_status=$?\n  $as_echo \"$as_me:${as_lineno-$LINENO}: \\$? = $ac_status\" >&5\n  test $ac_status = 0; }\n      if test \"$ac_status\" -eq 0; then\n\t# Ensure the archiver fails upon bogus file names.\n\trm -f conftest.$ac_objext libconftest.a\n\t{ { eval echo \"\\\"\\$as_me\\\":${as_lineno-$LINENO}: \\\"$lt_ar_try\\\"\"; } >&5\n  (eval $lt_ar_try) 2>&5\n  ac_status=$?\n  $as_echo \"$as_me:${as_lineno-$LINENO}: \\$? = $ac_status\" >&5\n  test $ac_status = 0; }\n\tif test \"$ac_status\" -ne 0; then\n          lt_cv_ar_at_file=@\n        fi\n      fi\n      rm -f conftest.* libconftest.a\n\nfi\nrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext\n\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file\" >&5\n$as_echo \"$lt_cv_ar_at_file\" >&6; }\n\nif test \"x$lt_cv_ar_at_file\" = xno; then\n  archiver_list_spec=\nelse\n  archiver_list_spec=$lt_cv_ar_at_file\nfi\n\n\n\n\n\n\n\nif test -n \"$ac_tool_prefix\"; then\n  # Extract the first word of \"${ac_tool_prefix}strip\", so it can be a program name with args.\nset dummy ${ac_tool_prefix}strip; ac_word=$2\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $ac_word\" >&5\n$as_echo_n \"checking for $ac_word... \" >&6; }\nif ${ac_cv_prog_STRIP+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if test -n \"$STRIP\"; then\n  ac_cv_prog_STRIP=\"$STRIP\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    for ac_exec_ext in '' $ac_executable_extensions; do\n  if as_fn_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_STRIP=\"${ac_tool_prefix}strip\"\n    $as_echo \"$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\n  done\nIFS=$as_save_IFS\n\nfi\nfi\nSTRIP=$ac_cv_prog_STRIP\nif test -n \"$STRIP\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $STRIP\" >&5\n$as_echo \"$STRIP\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\nfi\n\n\nfi\nif test -z \"$ac_cv_prog_STRIP\"; then\n  ac_ct_STRIP=$STRIP\n  # Extract the first word of \"strip\", so it can be a program name with args.\nset dummy strip; ac_word=$2\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $ac_word\" >&5\n$as_echo_n \"checking for $ac_word... \" >&6; }\nif ${ac_cv_prog_ac_ct_STRIP+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if test -n \"$ac_ct_STRIP\"; then\n  ac_cv_prog_ac_ct_STRIP=\"$ac_ct_STRIP\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    for ac_exec_ext in '' $ac_executable_extensions; do\n  if as_fn_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_ac_ct_STRIP=\"strip\"\n    $as_echo \"$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\n  done\nIFS=$as_save_IFS\n\nfi\nfi\nac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP\nif test -n \"$ac_ct_STRIP\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP\" >&5\n$as_echo \"$ac_ct_STRIP\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\nfi\n\n  if test \"x$ac_ct_STRIP\" = x; then\n    STRIP=\":\"\n  else\n    case $cross_compiling:$ac_tool_warned in\nyes:)\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet\" >&5\n$as_echo \"$as_me: WARNING: using cross tools not prefixed with host triplet\" >&2;}\nac_tool_warned=yes ;;\nesac\n    STRIP=$ac_ct_STRIP\n  fi\nelse\n  STRIP=\"$ac_cv_prog_STRIP\"\nfi\n\ntest -z \"$STRIP\" && STRIP=:\n\n\n\n\n\n\nif test -n \"$ac_tool_prefix\"; then\n  # Extract the first word of \"${ac_tool_prefix}ranlib\", so it can be a program name with args.\nset dummy ${ac_tool_prefix}ranlib; ac_word=$2\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $ac_word\" >&5\n$as_echo_n \"checking for $ac_word... \" >&6; }\nif ${ac_cv_prog_RANLIB+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if test -n \"$RANLIB\"; then\n  ac_cv_prog_RANLIB=\"$RANLIB\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    for ac_exec_ext in '' $ac_executable_extensions; do\n  if as_fn_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_RANLIB=\"${ac_tool_prefix}ranlib\"\n    $as_echo \"$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\n  done\nIFS=$as_save_IFS\n\nfi\nfi\nRANLIB=$ac_cv_prog_RANLIB\nif test -n \"$RANLIB\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $RANLIB\" >&5\n$as_echo \"$RANLIB\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\nfi\n\n\nfi\nif test -z \"$ac_cv_prog_RANLIB\"; then\n  ac_ct_RANLIB=$RANLIB\n  # Extract the first word of \"ranlib\", so it can be a program name with args.\nset dummy ranlib; ac_word=$2\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $ac_word\" >&5\n$as_echo_n \"checking for $ac_word... \" >&6; }\nif ${ac_cv_prog_ac_ct_RANLIB+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if test -n \"$ac_ct_RANLIB\"; then\n  ac_cv_prog_ac_ct_RANLIB=\"$ac_ct_RANLIB\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    for ac_exec_ext in '' $ac_executable_extensions; do\n  if as_fn_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_ac_ct_RANLIB=\"ranlib\"\n    $as_echo \"$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\n  done\nIFS=$as_save_IFS\n\nfi\nfi\nac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB\nif test -n \"$ac_ct_RANLIB\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB\" >&5\n$as_echo \"$ac_ct_RANLIB\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\nfi\n\n  if test \"x$ac_ct_RANLIB\" = x; then\n    RANLIB=\":\"\n  else\n    case $cross_compiling:$ac_tool_warned in\nyes:)\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet\" >&5\n$as_echo \"$as_me: WARNING: using cross tools not prefixed with host triplet\" >&2;}\nac_tool_warned=yes ;;\nesac\n    RANLIB=$ac_ct_RANLIB\n  fi\nelse\n  RANLIB=\"$ac_cv_prog_RANLIB\"\nfi\n\ntest -z \"$RANLIB\" && RANLIB=:\n\n\n\n\n\n\n# Determine commands to create old-style static archives.\nold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'\nold_postinstall_cmds='chmod 644 $oldlib'\nold_postuninstall_cmds=\n\nif test -n \"$RANLIB\"; then\n  case $host_os in\n  openbsd*)\n    old_postinstall_cmds=\"$old_postinstall_cmds~\\$RANLIB -t \\$tool_oldlib\"\n    ;;\n  *)\n    old_postinstall_cmds=\"$old_postinstall_cmds~\\$RANLIB \\$tool_oldlib\"\n    ;;\n  esac\n  old_archive_cmds=\"$old_archive_cmds~\\$RANLIB \\$tool_oldlib\"\nfi\n\ncase $host_os in\n  darwin*)\n    lock_old_archive_extraction=yes ;;\n  *)\n    lock_old_archive_extraction=no ;;\nesac\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n# If no C compiler was specified, use CC.\nLTCC=${LTCC-\"$CC\"}\n\n# If no C compiler flags were specified, use CFLAGS.\nLTCFLAGS=${LTCFLAGS-\"$CFLAGS\"}\n\n# Allow CC to be a program name with arguments.\ncompiler=$CC\n\n\n# Check for command to grab the raw symbol name followed by C symbol from nm.\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object\" >&5\n$as_echo_n \"checking command to parse $NM output from $compiler object... \" >&6; }\nif ${lt_cv_sys_global_symbol_pipe+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n\n# These are sane defaults that work on at least a few old systems.\n# [They come from Ultrix.  What could be older than Ultrix?!! ;)]\n\n# Character class describing NM global symbol codes.\nsymcode='[BCDEGRST]'\n\n# Regexp to match symbols that can be accessed directly from C.\nsympat='\\([_A-Za-z][_A-Za-z0-9]*\\)'\n\n# Define system-specific variables.\ncase $host_os in\naix*)\n  symcode='[BCDT]'\n  ;;\ncygwin* | mingw* | pw32* | cegcc*)\n  symcode='[ABCDGISTW]'\n  ;;\nhpux*)\n  if test \"$host_cpu\" = ia64; then\n    symcode='[ABCDEGRST]'\n  fi\n  ;;\nirix* | nonstopux*)\n  symcode='[BCDEGRST]'\n  ;;\nosf*)\n  symcode='[BCDEGQRST]'\n  ;;\nsolaris*)\n  symcode='[BDRT]'\n  ;;\nsco3.2v5*)\n  symcode='[DT]'\n  ;;\nsysv4.2uw2*)\n  symcode='[DT]'\n  ;;\nsysv5* | sco5v6* | unixware* | OpenUNIX*)\n  symcode='[ABDT]'\n  ;;\nsysv4)\n  symcode='[DFNSTU]'\n  ;;\nesac\n\n# If we're using GNU nm, then use its standard symbol codes.\ncase `$NM -V 2>&1` in\n*GNU* | *'with BFD'*)\n  symcode='[ABCDGIRSTW]' ;;\nesac\n\n# Transform an extracted symbol line into a proper C declaration.\n# Some systems (esp. on ia64) link data and code symbols differently,\n# so use this general approach.\nlt_cv_sys_global_symbol_to_cdecl=\"sed -n -e 's/^T .* \\(.*\\)$/extern int \\1();/p' -e 's/^$symcode* .* \\(.*\\)$/extern char \\1;/p'\"\n\n# Transform an extracted symbol line into symbol name and symbol address\nlt_cv_sys_global_symbol_to_c_name_address=\"sed -n -e 's/^: \\([^ ]*\\)[ ]*$/  {\\\\\\\"\\1\\\\\\\", (void *) 0},/p' -e 's/^$symcode* \\([^ ]*\\) \\([^ ]*\\)$/  {\\\"\\2\\\", (void *) \\&\\2},/p'\"\nlt_cv_sys_global_symbol_to_c_name_address_lib_prefix=\"sed -n -e 's/^: \\([^ ]*\\)[ ]*$/  {\\\\\\\"\\1\\\\\\\", (void *) 0},/p' -e 's/^$symcode* \\([^ ]*\\) \\(lib[^ ]*\\)$/  {\\\"\\2\\\", (void *) \\&\\2},/p' -e 's/^$symcode* \\([^ ]*\\) \\([^ ]*\\)$/  {\\\"lib\\2\\\", (void *) \\&\\2},/p'\"\n\n# Handle CRLF in mingw tool chain\nopt_cr=\ncase $build_os in\nmingw*)\n  opt_cr=`$ECHO 'x\\{0,1\\}' | tr x '\\015'` # option cr in regexp\n  ;;\nesac\n\n# Try without a prefix underscore, then with it.\nfor ac_symprfx in \"\" \"_\"; do\n\n  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.\n  symxfrm=\"\\\\1 $ac_symprfx\\\\2 \\\\2\"\n\n  # Write the raw and C identifiers.\n  if test \"$lt_cv_nm_interface\" = \"MS dumpbin\"; then\n    # Fake it for dumpbin and say T for any non-static function\n    # and D for any global variable.\n    # Also find C++ and __fastcall symbols from MSVC++,\n    # which start with @ or ?.\n    lt_cv_sys_global_symbol_pipe=\"$AWK '\"\\\n\"     {last_section=section; section=\\$ 3};\"\\\n\"     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};\"\\\n\"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};\"\\\n\"     \\$ 0!~/External *\\|/{next};\"\\\n\"     / 0+ UNDEF /{next}; / UNDEF \\([^|]\\)*()/{next};\"\\\n\"     {if(hide[section]) next};\"\\\n\"     {f=0}; \\$ 0~/\\(\\).*\\|/{f=1}; {printf f ? \\\"T \\\" : \\\"D \\\"};\"\\\n\"     {split(\\$ 0, a, /\\||\\r/); split(a[2], s)};\"\\\n\"     s[1]~/^[@?]/{print s[1], s[1]; next};\"\\\n\"     s[1]~prfx {split(s[1],t,\\\"@\\\"); print t[1], substr(t[1],length(prfx))}\"\\\n\"     ' prfx=^$ac_symprfx\"\n  else\n    lt_cv_sys_global_symbol_pipe=\"sed -n -e 's/^.*[\t ]\\($symcode$symcode*\\)[\t ][\t ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'\"\n  fi\n  lt_cv_sys_global_symbol_pipe=\"$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'\"\n\n  # Check to see that the pipe works correctly.\n  pipe_works=no\n\n  rm -f conftest*\n  cat > conftest.$ac_ext <<_LT_EOF\n#ifdef __cplusplus\nextern \"C\" {\n#endif\nchar nm_test_var;\nvoid nm_test_func(void);\nvoid nm_test_func(void){}\n#ifdef __cplusplus\n}\n#endif\nint main(){nm_test_var='a';nm_test_func();return(0);}\n_LT_EOF\n\n  if { { eval echo \"\\\"\\$as_me\\\":${as_lineno-$LINENO}: \\\"$ac_compile\\\"\"; } >&5\n  (eval $ac_compile) 2>&5\n  ac_status=$?\n  $as_echo \"$as_me:${as_lineno-$LINENO}: \\$? = $ac_status\" >&5\n  test $ac_status = 0; }; then\n    # Now try to grab the symbols.\n    nlist=conftest.nm\n    if { { eval echo \"\\\"\\$as_me\\\":${as_lineno-$LINENO}: \\\"$NM conftest.$ac_objext \\| \"$lt_cv_sys_global_symbol_pipe\" \\> $nlist\\\"\"; } >&5\n  (eval $NM conftest.$ac_objext \\| \"$lt_cv_sys_global_symbol_pipe\" \\> $nlist) 2>&5\n  ac_status=$?\n  $as_echo \"$as_me:${as_lineno-$LINENO}: \\$? = $ac_status\" >&5\n  test $ac_status = 0; } && test -s \"$nlist\"; then\n      # Try sorting and uniquifying the output.\n      if sort \"$nlist\" | uniq > \"$nlist\"T; then\n\tmv -f \"$nlist\"T \"$nlist\"\n      else\n\trm -f \"$nlist\"T\n      fi\n\n      # Make sure that we snagged all the symbols we need.\n      if $GREP ' nm_test_var$' \"$nlist\" >/dev/null; then\n\tif $GREP ' nm_test_func$' \"$nlist\" >/dev/null; then\n\t  cat <<_LT_EOF > conftest.$ac_ext\n/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */\n#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)\n/* DATA imports from DLLs on WIN32 con't be const, because runtime\n   relocations are performed -- see ld's documentation on pseudo-relocs.  */\n# define LT_DLSYM_CONST\n#elif defined(__osf__)\n/* This system does not cope well with relocations in const data.  */\n# define LT_DLSYM_CONST\n#else\n# define LT_DLSYM_CONST const\n#endif\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n_LT_EOF\n\t  # Now generate the symbol file.\n\t  eval \"$lt_cv_sys_global_symbol_to_cdecl\"' < \"$nlist\" | $GREP -v main >> conftest.$ac_ext'\n\n\t  cat <<_LT_EOF >> conftest.$ac_ext\n\n/* The mapping between symbol names and symbols.  */\nLT_DLSYM_CONST struct {\n  const char *name;\n  void       *address;\n}\nlt__PROGRAM__LTX_preloaded_symbols[] =\n{\n  { \"@PROGRAM@\", (void *) 0 },\n_LT_EOF\n\t  $SED \"s/^$symcode$symcode* \\(.*\\) \\(.*\\)$/  {\\\"\\2\\\", (void *) \\&\\2},/\" < \"$nlist\" | $GREP -v main >> conftest.$ac_ext\n\t  cat <<\\_LT_EOF >> conftest.$ac_ext\n  {0, (void *) 0}\n};\n\n/* This works around a problem in FreeBSD linker */\n#ifdef FREEBSD_WORKAROUND\nstatic const void *lt_preloaded_setup() {\n  return lt__PROGRAM__LTX_preloaded_symbols;\n}\n#endif\n\n#ifdef __cplusplus\n}\n#endif\n_LT_EOF\n\t  # Now try linking the two files.\n\t  mv conftest.$ac_objext conftstm.$ac_objext\n\t  lt_globsym_save_LIBS=$LIBS\n\t  lt_globsym_save_CFLAGS=$CFLAGS\n\t  LIBS=\"conftstm.$ac_objext\"\n\t  CFLAGS=\"$CFLAGS$lt_prog_compiler_no_builtin_flag\"\n\t  if { { eval echo \"\\\"\\$as_me\\\":${as_lineno-$LINENO}: \\\"$ac_link\\\"\"; } >&5\n  (eval $ac_link) 2>&5\n  ac_status=$?\n  $as_echo \"$as_me:${as_lineno-$LINENO}: \\$? = $ac_status\" >&5\n  test $ac_status = 0; } && test -s conftest${ac_exeext}; then\n\t    pipe_works=yes\n\t  fi\n\t  LIBS=$lt_globsym_save_LIBS\n\t  CFLAGS=$lt_globsym_save_CFLAGS\n\telse\n\t  echo \"cannot find nm_test_func in $nlist\" >&5\n\tfi\n      else\n\techo \"cannot find nm_test_var in $nlist\" >&5\n      fi\n    else\n      echo \"cannot run $lt_cv_sys_global_symbol_pipe\" >&5\n    fi\n  else\n    echo \"$progname: failed program was:\" >&5\n    cat conftest.$ac_ext >&5\n  fi\n  rm -rf conftest* conftst*\n\n  # Do not use the global_symbol_pipe unless it works.\n  if test \"$pipe_works\" = yes; then\n    break\n  else\n    lt_cv_sys_global_symbol_pipe=\n  fi\ndone\n\nfi\n\nif test -z \"$lt_cv_sys_global_symbol_pipe\"; then\n  lt_cv_sys_global_symbol_to_cdecl=\nfi\nif test -z \"$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: failed\" >&5\n$as_echo \"failed\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: ok\" >&5\n$as_echo \"ok\" >&6; }\nfi\n\n# Response file support.\nif test \"$lt_cv_nm_interface\" = \"MS dumpbin\"; then\n  nm_file_list_spec='@'\nelif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then\n  nm_file_list_spec='@'\nfi\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for sysroot\" >&5\n$as_echo_n \"checking for sysroot... \" >&6; }\n\n# Check whether --with-sysroot was given.\nif test \"${with_sysroot+set}\" = set; then :\n  withval=$with_sysroot;\nelse\n  with_sysroot=no\nfi\n\n\nlt_sysroot=\ncase ${with_sysroot} in #(\n yes)\n   if test \"$GCC\" = yes; then\n     lt_sysroot=`$CC --print-sysroot 2>/dev/null`\n   fi\n   ;; #(\n /*)\n   lt_sysroot=`echo \"$with_sysroot\" | sed -e \"$sed_quote_subst\"`\n   ;; #(\n no|'')\n   ;; #(\n *)\n   { $as_echo \"$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}\" >&5\n$as_echo \"${with_sysroot}\" >&6; }\n   as_fn_error $? \"The sysroot must be an absolute path.\" \"$LINENO\" 5\n   ;;\nesac\n\n { $as_echo \"$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}\" >&5\n$as_echo \"${lt_sysroot:-no}\" >&6; }\n\n\n\n\n\n# Check whether --enable-libtool-lock was given.\nif test \"${enable_libtool_lock+set}\" = set; then :\n  enableval=$enable_libtool_lock;\nfi\n\ntest \"x$enable_libtool_lock\" != xno && enable_libtool_lock=yes\n\n# Some flags need to be propagated to the compiler or linker for good\n# libtool support.\ncase $host in\nia64-*-hpux*)\n  # Find out which ABI we are using.\n  echo 'int i;' > conftest.$ac_ext\n  if { { eval echo \"\\\"\\$as_me\\\":${as_lineno-$LINENO}: \\\"$ac_compile\\\"\"; } >&5\n  (eval $ac_compile) 2>&5\n  ac_status=$?\n  $as_echo \"$as_me:${as_lineno-$LINENO}: \\$? = $ac_status\" >&5\n  test $ac_status = 0; }; then\n    case `/usr/bin/file conftest.$ac_objext` in\n      *ELF-32*)\n\tHPUX_IA64_MODE=\"32\"\n\t;;\n      *ELF-64*)\n\tHPUX_IA64_MODE=\"64\"\n\t;;\n    esac\n  fi\n  rm -rf conftest*\n  ;;\n*-*-irix6*)\n  # Find out which ABI we are using.\n  echo '#line '$LINENO' \"configure\"' > conftest.$ac_ext\n  if { { eval echo \"\\\"\\$as_me\\\":${as_lineno-$LINENO}: \\\"$ac_compile\\\"\"; } >&5\n  (eval $ac_compile) 2>&5\n  ac_status=$?\n  $as_echo \"$as_me:${as_lineno-$LINENO}: \\$? = $ac_status\" >&5\n  test $ac_status = 0; }; then\n    if test \"$lt_cv_prog_gnu_ld\" = yes; then\n      case `/usr/bin/file conftest.$ac_objext` in\n\t*32-bit*)\n\t  LD=\"${LD-ld} -melf32bsmip\"\n\t  ;;\n\t*N32*)\n\t  LD=\"${LD-ld} -melf32bmipn32\"\n\t  ;;\n\t*64-bit*)\n\t  LD=\"${LD-ld} -melf64bmip\"\n\t;;\n      esac\n    else\n      case `/usr/bin/file conftest.$ac_objext` in\n\t*32-bit*)\n\t  LD=\"${LD-ld} -32\"\n\t  ;;\n\t*N32*)\n\t  LD=\"${LD-ld} -n32\"\n\t  ;;\n\t*64-bit*)\n\t  LD=\"${LD-ld} -64\"\n\t  ;;\n      esac\n    fi\n  fi\n  rm -rf conftest*\n  ;;\n\nx86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \\\ns390*-*linux*|s390*-*tpf*|sparc*-*linux*)\n  # Find out which ABI we are using.\n  echo 'int i;' > conftest.$ac_ext\n  if { { eval echo \"\\\"\\$as_me\\\":${as_lineno-$LINENO}: \\\"$ac_compile\\\"\"; } >&5\n  (eval $ac_compile) 2>&5\n  ac_status=$?\n  $as_echo \"$as_me:${as_lineno-$LINENO}: \\$? = $ac_status\" >&5\n  test $ac_status = 0; }; then\n    case `/usr/bin/file conftest.o` in\n      *32-bit*)\n\tcase $host in\n\t  x86_64-*kfreebsd*-gnu)\n\t    LD=\"${LD-ld} -m elf_i386_fbsd\"\n\t    ;;\n\t  x86_64-*linux*)\n\t    case `/usr/bin/file conftest.o` in\n\t      *x86-64*)\n\t\tLD=\"${LD-ld} -m elf32_x86_64\"\n\t\t;;\n\t      *)\n\t\tLD=\"${LD-ld} -m elf_i386\"\n\t\t;;\n\t    esac\n\t    ;;\n\t  powerpc64le-*)\n\t    LD=\"${LD-ld} -m elf32lppclinux\"\n\t    ;;\n\t  powerpc64-*)\n\t    LD=\"${LD-ld} -m elf32ppclinux\"\n\t    ;;\n\t  s390x-*linux*)\n\t    LD=\"${LD-ld} -m elf_s390\"\n\t    ;;\n\t  sparc64-*linux*)\n\t    LD=\"${LD-ld} -m elf32_sparc\"\n\t    ;;\n\tesac\n\t;;\n      *64-bit*)\n\tcase $host in\n\t  x86_64-*kfreebsd*-gnu)\n\t    LD=\"${LD-ld} -m elf_x86_64_fbsd\"\n\t    ;;\n\t  x86_64-*linux*)\n\t    LD=\"${LD-ld} -m elf_x86_64\"\n\t    ;;\n\t  powerpcle-*)\n\t    LD=\"${LD-ld} -m elf64lppc\"\n\t    ;;\n\t  powerpc-*)\n\t    LD=\"${LD-ld} -m elf64ppc\"\n\t    ;;\n\t  s390*-*linux*|s390*-*tpf*)\n\t    LD=\"${LD-ld} -m elf64_s390\"\n\t    ;;\n\t  sparc*-*linux*)\n\t    LD=\"${LD-ld} -m elf64_sparc\"\n\t    ;;\n\tesac\n\t;;\n    esac\n  fi\n  rm -rf conftest*\n  ;;\n\n*-*-sco3.2v5*)\n  # On SCO OpenServer 5, we need -belf to get full-featured binaries.\n  SAVE_CFLAGS=\"$CFLAGS\"\n  CFLAGS=\"$CFLAGS -belf\"\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf\" >&5\n$as_echo_n \"checking whether the C compiler needs -belf... \" >&6; }\nif ${lt_cv_cc_needs_belf+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  ac_ext=c\nac_cpp='$CPP $CPPFLAGS'\nac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'\nac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'\nac_compiler_gnu=$ac_cv_c_compiler_gnu\n\n     cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n\nint\nmain ()\n{\n\n  ;\n  return 0;\n}\n_ACEOF\nif ac_fn_c_try_link \"$LINENO\"; then :\n  lt_cv_cc_needs_belf=yes\nelse\n  lt_cv_cc_needs_belf=no\nfi\nrm -f core conftest.err conftest.$ac_objext \\\n    conftest$ac_exeext conftest.$ac_ext\n     ac_ext=c\nac_cpp='$CPP $CPPFLAGS'\nac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'\nac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'\nac_compiler_gnu=$ac_cv_c_compiler_gnu\n\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf\" >&5\n$as_echo \"$lt_cv_cc_needs_belf\" >&6; }\n  if test x\"$lt_cv_cc_needs_belf\" != x\"yes\"; then\n    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf\n    CFLAGS=\"$SAVE_CFLAGS\"\n  fi\n  ;;\n*-*solaris*)\n  # Find out which ABI we are using.\n  echo 'int i;' > conftest.$ac_ext\n  if { { eval echo \"\\\"\\$as_me\\\":${as_lineno-$LINENO}: \\\"$ac_compile\\\"\"; } >&5\n  (eval $ac_compile) 2>&5\n  ac_status=$?\n  $as_echo \"$as_me:${as_lineno-$LINENO}: \\$? = $ac_status\" >&5\n  test $ac_status = 0; }; then\n    case `/usr/bin/file conftest.o` in\n    *64-bit*)\n      case $lt_cv_prog_gnu_ld in\n      yes*)\n        case $host in\n        i?86-*-solaris*)\n          LD=\"${LD-ld} -m elf_x86_64\"\n          ;;\n        sparc*-*-solaris*)\n          LD=\"${LD-ld} -m elf64_sparc\"\n          ;;\n        esac\n        # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.\n        if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then\n          LD=\"${LD-ld}_sol2\"\n        fi\n        ;;\n      *)\n\tif ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then\n\t  LD=\"${LD-ld} -64\"\n\tfi\n\t;;\n      esac\n      ;;\n    esac\n  fi\n  rm -rf conftest*\n  ;;\nesac\n\nneed_locks=\"$enable_libtool_lock\"\n\nif test -n \"$ac_tool_prefix\"; then\n  # Extract the first word of \"${ac_tool_prefix}mt\", so it can be a program name with args.\nset dummy ${ac_tool_prefix}mt; ac_word=$2\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $ac_word\" >&5\n$as_echo_n \"checking for $ac_word... \" >&6; }\nif ${ac_cv_prog_MANIFEST_TOOL+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if test -n \"$MANIFEST_TOOL\"; then\n  ac_cv_prog_MANIFEST_TOOL=\"$MANIFEST_TOOL\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    for ac_exec_ext in '' $ac_executable_extensions; do\n  if as_fn_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_MANIFEST_TOOL=\"${ac_tool_prefix}mt\"\n    $as_echo \"$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\n  done\nIFS=$as_save_IFS\n\nfi\nfi\nMANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL\nif test -n \"$MANIFEST_TOOL\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL\" >&5\n$as_echo \"$MANIFEST_TOOL\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\nfi\n\n\nfi\nif test -z \"$ac_cv_prog_MANIFEST_TOOL\"; then\n  ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL\n  # Extract the first word of \"mt\", so it can be a program name with args.\nset dummy mt; ac_word=$2\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $ac_word\" >&5\n$as_echo_n \"checking for $ac_word... \" >&6; }\nif ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if test -n \"$ac_ct_MANIFEST_TOOL\"; then\n  ac_cv_prog_ac_ct_MANIFEST_TOOL=\"$ac_ct_MANIFEST_TOOL\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    for ac_exec_ext in '' $ac_executable_extensions; do\n  if as_fn_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_ac_ct_MANIFEST_TOOL=\"mt\"\n    $as_echo \"$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\n  done\nIFS=$as_save_IFS\n\nfi\nfi\nac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL\nif test -n \"$ac_ct_MANIFEST_TOOL\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL\" >&5\n$as_echo \"$ac_ct_MANIFEST_TOOL\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\nfi\n\n  if test \"x$ac_ct_MANIFEST_TOOL\" = x; then\n    MANIFEST_TOOL=\":\"\n  else\n    case $cross_compiling:$ac_tool_warned in\nyes:)\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet\" >&5\n$as_echo \"$as_me: WARNING: using cross tools not prefixed with host triplet\" >&2;}\nac_tool_warned=yes ;;\nesac\n    MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL\n  fi\nelse\n  MANIFEST_TOOL=\"$ac_cv_prog_MANIFEST_TOOL\"\nfi\n\ntest -z \"$MANIFEST_TOOL\" && MANIFEST_TOOL=mt\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool\" >&5\n$as_echo_n \"checking if $MANIFEST_TOOL is a manifest tool... \" >&6; }\nif ${lt_cv_path_mainfest_tool+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  lt_cv_path_mainfest_tool=no\n  echo \"$as_me:$LINENO: $MANIFEST_TOOL '-?'\" >&5\n  $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out\n  cat conftest.err >&5\n  if $GREP 'Manifest Tool' conftest.out > /dev/null; then\n    lt_cv_path_mainfest_tool=yes\n  fi\n  rm -f conftest*\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool\" >&5\n$as_echo \"$lt_cv_path_mainfest_tool\" >&6; }\nif test \"x$lt_cv_path_mainfest_tool\" != xyes; then\n  MANIFEST_TOOL=:\nfi\n\n\n\n\n\n\n  case $host_os in\n    rhapsody* | darwin*)\n    if test -n \"$ac_tool_prefix\"; then\n  # Extract the first word of \"${ac_tool_prefix}dsymutil\", so it can be a program name with args.\nset dummy ${ac_tool_prefix}dsymutil; ac_word=$2\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $ac_word\" >&5\n$as_echo_n \"checking for $ac_word... \" >&6; }\nif ${ac_cv_prog_DSYMUTIL+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if test -n \"$DSYMUTIL\"; then\n  ac_cv_prog_DSYMUTIL=\"$DSYMUTIL\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    for ac_exec_ext in '' $ac_executable_extensions; do\n  if as_fn_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_DSYMUTIL=\"${ac_tool_prefix}dsymutil\"\n    $as_echo \"$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\n  done\nIFS=$as_save_IFS\n\nfi\nfi\nDSYMUTIL=$ac_cv_prog_DSYMUTIL\nif test -n \"$DSYMUTIL\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL\" >&5\n$as_echo \"$DSYMUTIL\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\nfi\n\n\nfi\nif test -z \"$ac_cv_prog_DSYMUTIL\"; then\n  ac_ct_DSYMUTIL=$DSYMUTIL\n  # Extract the first word of \"dsymutil\", so it can be a program name with args.\nset dummy dsymutil; ac_word=$2\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $ac_word\" >&5\n$as_echo_n \"checking for $ac_word... \" >&6; }\nif ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if test -n \"$ac_ct_DSYMUTIL\"; then\n  ac_cv_prog_ac_ct_DSYMUTIL=\"$ac_ct_DSYMUTIL\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    for ac_exec_ext in '' $ac_executable_extensions; do\n  if as_fn_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_ac_ct_DSYMUTIL=\"dsymutil\"\n    $as_echo \"$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\n  done\nIFS=$as_save_IFS\n\nfi\nfi\nac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL\nif test -n \"$ac_ct_DSYMUTIL\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL\" >&5\n$as_echo \"$ac_ct_DSYMUTIL\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\nfi\n\n  if test \"x$ac_ct_DSYMUTIL\" = x; then\n    DSYMUTIL=\":\"\n  else\n    case $cross_compiling:$ac_tool_warned in\nyes:)\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet\" >&5\n$as_echo \"$as_me: WARNING: using cross tools not prefixed with host triplet\" >&2;}\nac_tool_warned=yes ;;\nesac\n    DSYMUTIL=$ac_ct_DSYMUTIL\n  fi\nelse\n  DSYMUTIL=\"$ac_cv_prog_DSYMUTIL\"\nfi\n\n    if test -n \"$ac_tool_prefix\"; then\n  # Extract the first word of \"${ac_tool_prefix}nmedit\", so it can be a program name with args.\nset dummy ${ac_tool_prefix}nmedit; ac_word=$2\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $ac_word\" >&5\n$as_echo_n \"checking for $ac_word... \" >&6; }\nif ${ac_cv_prog_NMEDIT+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if test -n \"$NMEDIT\"; then\n  ac_cv_prog_NMEDIT=\"$NMEDIT\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    for ac_exec_ext in '' $ac_executable_extensions; do\n  if as_fn_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_NMEDIT=\"${ac_tool_prefix}nmedit\"\n    $as_echo \"$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\n  done\nIFS=$as_save_IFS\n\nfi\nfi\nNMEDIT=$ac_cv_prog_NMEDIT\nif test -n \"$NMEDIT\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $NMEDIT\" >&5\n$as_echo \"$NMEDIT\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\nfi\n\n\nfi\nif test -z \"$ac_cv_prog_NMEDIT\"; then\n  ac_ct_NMEDIT=$NMEDIT\n  # Extract the first word of \"nmedit\", so it can be a program name with args.\nset dummy nmedit; ac_word=$2\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $ac_word\" >&5\n$as_echo_n \"checking for $ac_word... \" >&6; }\nif ${ac_cv_prog_ac_ct_NMEDIT+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if test -n \"$ac_ct_NMEDIT\"; then\n  ac_cv_prog_ac_ct_NMEDIT=\"$ac_ct_NMEDIT\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    for ac_exec_ext in '' $ac_executable_extensions; do\n  if as_fn_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_ac_ct_NMEDIT=\"nmedit\"\n    $as_echo \"$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\n  done\nIFS=$as_save_IFS\n\nfi\nfi\nac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT\nif test -n \"$ac_ct_NMEDIT\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT\" >&5\n$as_echo \"$ac_ct_NMEDIT\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\nfi\n\n  if test \"x$ac_ct_NMEDIT\" = x; then\n    NMEDIT=\":\"\n  else\n    case $cross_compiling:$ac_tool_warned in\nyes:)\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet\" >&5\n$as_echo \"$as_me: WARNING: using cross tools not prefixed with host triplet\" >&2;}\nac_tool_warned=yes ;;\nesac\n    NMEDIT=$ac_ct_NMEDIT\n  fi\nelse\n  NMEDIT=\"$ac_cv_prog_NMEDIT\"\nfi\n\n    if test -n \"$ac_tool_prefix\"; then\n  # Extract the first word of \"${ac_tool_prefix}lipo\", so it can be a program name with args.\nset dummy ${ac_tool_prefix}lipo; ac_word=$2\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $ac_word\" >&5\n$as_echo_n \"checking for $ac_word... \" >&6; }\nif ${ac_cv_prog_LIPO+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if test -n \"$LIPO\"; then\n  ac_cv_prog_LIPO=\"$LIPO\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    for ac_exec_ext in '' $ac_executable_extensions; do\n  if as_fn_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_LIPO=\"${ac_tool_prefix}lipo\"\n    $as_echo \"$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\n  done\nIFS=$as_save_IFS\n\nfi\nfi\nLIPO=$ac_cv_prog_LIPO\nif test -n \"$LIPO\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $LIPO\" >&5\n$as_echo \"$LIPO\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\nfi\n\n\nfi\nif test -z \"$ac_cv_prog_LIPO\"; then\n  ac_ct_LIPO=$LIPO\n  # Extract the first word of \"lipo\", so it can be a program name with args.\nset dummy lipo; ac_word=$2\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $ac_word\" >&5\n$as_echo_n \"checking for $ac_word... \" >&6; }\nif ${ac_cv_prog_ac_ct_LIPO+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if test -n \"$ac_ct_LIPO\"; then\n  ac_cv_prog_ac_ct_LIPO=\"$ac_ct_LIPO\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    for ac_exec_ext in '' $ac_executable_extensions; do\n  if as_fn_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_ac_ct_LIPO=\"lipo\"\n    $as_echo \"$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\n  done\nIFS=$as_save_IFS\n\nfi\nfi\nac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO\nif test -n \"$ac_ct_LIPO\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO\" >&5\n$as_echo \"$ac_ct_LIPO\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\nfi\n\n  if test \"x$ac_ct_LIPO\" = x; then\n    LIPO=\":\"\n  else\n    case $cross_compiling:$ac_tool_warned in\nyes:)\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet\" >&5\n$as_echo \"$as_me: WARNING: using cross tools not prefixed with host triplet\" >&2;}\nac_tool_warned=yes ;;\nesac\n    LIPO=$ac_ct_LIPO\n  fi\nelse\n  LIPO=\"$ac_cv_prog_LIPO\"\nfi\n\n    if test -n \"$ac_tool_prefix\"; then\n  # Extract the first word of \"${ac_tool_prefix}otool\", so it can be a program name with args.\nset dummy ${ac_tool_prefix}otool; ac_word=$2\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $ac_word\" >&5\n$as_echo_n \"checking for $ac_word... \" >&6; }\nif ${ac_cv_prog_OTOOL+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if test -n \"$OTOOL\"; then\n  ac_cv_prog_OTOOL=\"$OTOOL\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    for ac_exec_ext in '' $ac_executable_extensions; do\n  if as_fn_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_OTOOL=\"${ac_tool_prefix}otool\"\n    $as_echo \"$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\n  done\nIFS=$as_save_IFS\n\nfi\nfi\nOTOOL=$ac_cv_prog_OTOOL\nif test -n \"$OTOOL\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $OTOOL\" >&5\n$as_echo \"$OTOOL\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\nfi\n\n\nfi\nif test -z \"$ac_cv_prog_OTOOL\"; then\n  ac_ct_OTOOL=$OTOOL\n  # Extract the first word of \"otool\", so it can be a program name with args.\nset dummy otool; ac_word=$2\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $ac_word\" >&5\n$as_echo_n \"checking for $ac_word... \" >&6; }\nif ${ac_cv_prog_ac_ct_OTOOL+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if test -n \"$ac_ct_OTOOL\"; then\n  ac_cv_prog_ac_ct_OTOOL=\"$ac_ct_OTOOL\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    for ac_exec_ext in '' $ac_executable_extensions; do\n  if as_fn_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_ac_ct_OTOOL=\"otool\"\n    $as_echo \"$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\n  done\nIFS=$as_save_IFS\n\nfi\nfi\nac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL\nif test -n \"$ac_ct_OTOOL\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL\" >&5\n$as_echo \"$ac_ct_OTOOL\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\nfi\n\n  if test \"x$ac_ct_OTOOL\" = x; then\n    OTOOL=\":\"\n  else\n    case $cross_compiling:$ac_tool_warned in\nyes:)\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet\" >&5\n$as_echo \"$as_me: WARNING: using cross tools not prefixed with host triplet\" >&2;}\nac_tool_warned=yes ;;\nesac\n    OTOOL=$ac_ct_OTOOL\n  fi\nelse\n  OTOOL=\"$ac_cv_prog_OTOOL\"\nfi\n\n    if test -n \"$ac_tool_prefix\"; then\n  # Extract the first word of \"${ac_tool_prefix}otool64\", so it can be a program name with args.\nset dummy ${ac_tool_prefix}otool64; ac_word=$2\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $ac_word\" >&5\n$as_echo_n \"checking for $ac_word... \" >&6; }\nif ${ac_cv_prog_OTOOL64+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if test -n \"$OTOOL64\"; then\n  ac_cv_prog_OTOOL64=\"$OTOOL64\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    for ac_exec_ext in '' $ac_executable_extensions; do\n  if as_fn_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_OTOOL64=\"${ac_tool_prefix}otool64\"\n    $as_echo \"$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\n  done\nIFS=$as_save_IFS\n\nfi\nfi\nOTOOL64=$ac_cv_prog_OTOOL64\nif test -n \"$OTOOL64\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $OTOOL64\" >&5\n$as_echo \"$OTOOL64\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\nfi\n\n\nfi\nif test -z \"$ac_cv_prog_OTOOL64\"; then\n  ac_ct_OTOOL64=$OTOOL64\n  # Extract the first word of \"otool64\", so it can be a program name with args.\nset dummy otool64; ac_word=$2\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $ac_word\" >&5\n$as_echo_n \"checking for $ac_word... \" >&6; }\nif ${ac_cv_prog_ac_ct_OTOOL64+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if test -n \"$ac_ct_OTOOL64\"; then\n  ac_cv_prog_ac_ct_OTOOL64=\"$ac_ct_OTOOL64\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    for ac_exec_ext in '' $ac_executable_extensions; do\n  if as_fn_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_ac_ct_OTOOL64=\"otool64\"\n    $as_echo \"$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\n  done\nIFS=$as_save_IFS\n\nfi\nfi\nac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64\nif test -n \"$ac_ct_OTOOL64\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64\" >&5\n$as_echo \"$ac_ct_OTOOL64\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\nfi\n\n  if test \"x$ac_ct_OTOOL64\" = x; then\n    OTOOL64=\":\"\n  else\n    case $cross_compiling:$ac_tool_warned in\nyes:)\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet\" >&5\n$as_echo \"$as_me: WARNING: using cross tools not prefixed with host triplet\" >&2;}\nac_tool_warned=yes ;;\nesac\n    OTOOL64=$ac_ct_OTOOL64\n  fi\nelse\n  OTOOL64=\"$ac_cv_prog_OTOOL64\"\nfi\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n    { $as_echo \"$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag\" >&5\n$as_echo_n \"checking for -single_module linker flag... \" >&6; }\nif ${lt_cv_apple_cc_single_mod+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  lt_cv_apple_cc_single_mod=no\n      if test -z \"${LT_MULTI_MODULE}\"; then\n\t# By default we will add the -single_module flag. You can override\n\t# by either setting the environment variable LT_MULTI_MODULE\n\t# non-empty at configure time, or by adding -multi_module to the\n\t# link flags.\n\trm -rf libconftest.dylib*\n\techo \"int foo(void){return 1;}\" > conftest.c\n\techo \"$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \\\n-dynamiclib -Wl,-single_module conftest.c\" >&5\n\t$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \\\n\t  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err\n        _lt_result=$?\n\t# If there is a non-empty error log, and \"single_module\"\n\t# appears in it, assume the flag caused a linker warning\n        if test -s conftest.err && $GREP single_module conftest.err; then\n\t  cat conftest.err >&5\n\t# Otherwise, if the output was created with a 0 exit code from\n\t# the compiler, it worked.\n\telif test -f libconftest.dylib && test $_lt_result -eq 0; then\n\t  lt_cv_apple_cc_single_mod=yes\n\telse\n\t  cat conftest.err >&5\n\tfi\n\trm -rf libconftest.dylib*\n\trm -f conftest.*\n      fi\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod\" >&5\n$as_echo \"$lt_cv_apple_cc_single_mod\" >&6; }\n\n    { $as_echo \"$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag\" >&5\n$as_echo_n \"checking for -exported_symbols_list linker flag... \" >&6; }\nif ${lt_cv_ld_exported_symbols_list+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  lt_cv_ld_exported_symbols_list=no\n      save_LDFLAGS=$LDFLAGS\n      echo \"_main\" > conftest.sym\n      LDFLAGS=\"$LDFLAGS -Wl,-exported_symbols_list,conftest.sym\"\n      cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n\nint\nmain ()\n{\n\n  ;\n  return 0;\n}\n_ACEOF\nif ac_fn_c_try_link \"$LINENO\"; then :\n  lt_cv_ld_exported_symbols_list=yes\nelse\n  lt_cv_ld_exported_symbols_list=no\nfi\nrm -f core conftest.err conftest.$ac_objext \\\n    conftest$ac_exeext conftest.$ac_ext\n\tLDFLAGS=\"$save_LDFLAGS\"\n\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list\" >&5\n$as_echo \"$lt_cv_ld_exported_symbols_list\" >&6; }\n\n    { $as_echo \"$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag\" >&5\n$as_echo_n \"checking for -force_load linker flag... \" >&6; }\nif ${lt_cv_ld_force_load+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  lt_cv_ld_force_load=no\n      cat > conftest.c << _LT_EOF\nint forced_loaded() { return 2;}\n_LT_EOF\n      echo \"$LTCC $LTCFLAGS -c -o conftest.o conftest.c\" >&5\n      $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5\n      echo \"$AR cru libconftest.a conftest.o\" >&5\n      $AR cru libconftest.a conftest.o 2>&5\n      echo \"$RANLIB libconftest.a\" >&5\n      $RANLIB libconftest.a 2>&5\n      cat > conftest.c << _LT_EOF\nint main() { return 0;}\n_LT_EOF\n      echo \"$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a\" >&5\n      $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err\n      _lt_result=$?\n      if test -s conftest.err && $GREP force_load conftest.err; then\n\tcat conftest.err >&5\n      elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then\n\tlt_cv_ld_force_load=yes\n      else\n\tcat conftest.err >&5\n      fi\n        rm -f conftest.err libconftest.a conftest conftest.c\n        rm -rf conftest.dSYM\n\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load\" >&5\n$as_echo \"$lt_cv_ld_force_load\" >&6; }\n    case $host_os in\n    rhapsody* | darwin1.[012])\n      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;\n    darwin1.*)\n      _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;\n    darwin*) # darwin 5.x on\n      # if running on 10.5 or later, the deployment target defaults\n      # to the OS version, if on x86, and 10.4, the deployment\n      # target defaults to 10.4. Don't you love it?\n      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in\n\t10.0,*86*-darwin8*|10.0,*-darwin[91]*)\n\t  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;\n\t10.[012]*)\n\t  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;\n\t10.*)\n\t  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;\n      esac\n    ;;\n  esac\n    if test \"$lt_cv_apple_cc_single_mod\" = \"yes\"; then\n      _lt_dar_single_mod='$single_module'\n    fi\n    if test \"$lt_cv_ld_exported_symbols_list\" = \"yes\"; then\n      _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'\n    else\n      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'\n    fi\n    if test \"$DSYMUTIL\" != \":\" && test \"$lt_cv_ld_force_load\" = \"no\"; then\n      _lt_dsymutil='~$DSYMUTIL $lib || :'\n    else\n      _lt_dsymutil=\n    fi\n    ;;\n  esac\n\nac_ext=c\nac_cpp='$CPP $CPPFLAGS'\nac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'\nac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'\nac_compiler_gnu=$ac_cv_c_compiler_gnu\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor\" >&5\n$as_echo_n \"checking how to run the C preprocessor... \" >&6; }\n# On Suns, sometimes $CPP names a directory.\nif test -n \"$CPP\" && test -d \"$CPP\"; then\n  CPP=\nfi\nif test -z \"$CPP\"; then\n  if ${ac_cv_prog_CPP+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n      # Double quotes because CPP needs to be expanded\n    for CPP in \"$CC -E\" \"$CC -E -traditional-cpp\" \"/lib/cpp\"\n    do\n      ac_preproc_ok=false\nfor ac_c_preproc_warn_flag in '' yes\ndo\n  # Use a header file that comes with gcc, so configuring glibc\n  # with a fresh cross-compiler works.\n  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since\n  # <limits.h> exists even on freestanding compilers.\n  # On the NeXT, cc -E runs the code through the compiler's parser,\n  # not just through cpp. \"Syntax error\" is here to catch this case.\n  cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n#ifdef __STDC__\n# include <limits.h>\n#else\n# include <assert.h>\n#endif\n\t\t     Syntax error\n_ACEOF\nif ac_fn_c_try_cpp \"$LINENO\"; then :\n\nelse\n  # Broken: fails on valid input.\ncontinue\nfi\nrm -f conftest.err conftest.i conftest.$ac_ext\n\n  # OK, works on sane cases.  Now check whether nonexistent headers\n  # can be detected and how.\n  cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n#include <ac_nonexistent.h>\n_ACEOF\nif ac_fn_c_try_cpp \"$LINENO\"; then :\n  # Broken: success on invalid input.\ncontinue\nelse\n  # Passes both tests.\nac_preproc_ok=:\nbreak\nfi\nrm -f conftest.err conftest.i conftest.$ac_ext\n\ndone\n# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.\nrm -f conftest.i conftest.err conftest.$ac_ext\nif $ac_preproc_ok; then :\n  break\nfi\n\n    done\n    ac_cv_prog_CPP=$CPP\n\nfi\n  CPP=$ac_cv_prog_CPP\nelse\n  ac_cv_prog_CPP=$CPP\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $CPP\" >&5\n$as_echo \"$CPP\" >&6; }\nac_preproc_ok=false\nfor ac_c_preproc_warn_flag in '' yes\ndo\n  # Use a header file that comes with gcc, so configuring glibc\n  # with a fresh cross-compiler works.\n  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since\n  # <limits.h> exists even on freestanding compilers.\n  # On the NeXT, cc -E runs the code through the compiler's parser,\n  # not just through cpp. \"Syntax error\" is here to catch this case.\n  cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n#ifdef __STDC__\n# include <limits.h>\n#else\n# include <assert.h>\n#endif\n\t\t     Syntax error\n_ACEOF\nif ac_fn_c_try_cpp \"$LINENO\"; then :\n\nelse\n  # Broken: fails on valid input.\ncontinue\nfi\nrm -f conftest.err conftest.i conftest.$ac_ext\n\n  # OK, works on sane cases.  Now check whether nonexistent headers\n  # can be detected and how.\n  cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n#include <ac_nonexistent.h>\n_ACEOF\nif ac_fn_c_try_cpp \"$LINENO\"; then :\n  # Broken: success on invalid input.\ncontinue\nelse\n  # Passes both tests.\nac_preproc_ok=:\nbreak\nfi\nrm -f conftest.err conftest.i conftest.$ac_ext\n\ndone\n# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.\nrm -f conftest.i conftest.err conftest.$ac_ext\nif $ac_preproc_ok; then :\n\nelse\n  { { $as_echo \"$as_me:${as_lineno-$LINENO}: error: in \\`$ac_pwd':\" >&5\n$as_echo \"$as_me: error: in \\`$ac_pwd':\" >&2;}\nas_fn_error $? \"C preprocessor \\\"$CPP\\\" fails sanity check\nSee \\`config.log' for more details\" \"$LINENO\" 5; }\nfi\n\nac_ext=c\nac_cpp='$CPP $CPPFLAGS'\nac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'\nac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'\nac_compiler_gnu=$ac_cv_c_compiler_gnu\n\n\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for ANSI C header files\" >&5\n$as_echo_n \"checking for ANSI C header files... \" >&6; }\nif ${ac_cv_header_stdc+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n#include <stdlib.h>\n#include <stdarg.h>\n#include <string.h>\n#include <float.h>\n\nint\nmain ()\n{\n\n  ;\n  return 0;\n}\n_ACEOF\nif ac_fn_c_try_compile \"$LINENO\"; then :\n  ac_cv_header_stdc=yes\nelse\n  ac_cv_header_stdc=no\nfi\nrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext\n\nif test $ac_cv_header_stdc = yes; then\n  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.\n  cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n#include <string.h>\n\n_ACEOF\nif (eval \"$ac_cpp conftest.$ac_ext\") 2>&5 |\n  $EGREP \"memchr\" >/dev/null 2>&1; then :\n\nelse\n  ac_cv_header_stdc=no\nfi\nrm -f conftest*\n\nfi\n\nif test $ac_cv_header_stdc = yes; then\n  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.\n  cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n#include <stdlib.h>\n\n_ACEOF\nif (eval \"$ac_cpp conftest.$ac_ext\") 2>&5 |\n  $EGREP \"free\" >/dev/null 2>&1; then :\n\nelse\n  ac_cv_header_stdc=no\nfi\nrm -f conftest*\n\nfi\n\nif test $ac_cv_header_stdc = yes; then\n  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.\n  if test \"$cross_compiling\" = yes; then :\n  :\nelse\n  cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n#include <ctype.h>\n#include <stdlib.h>\n#if ((' ' & 0x0FF) == 0x020)\n# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')\n# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))\n#else\n# define ISLOWER(c) \\\n\t\t   (('a' <= (c) && (c) <= 'i') \\\n\t\t     || ('j' <= (c) && (c) <= 'r') \\\n\t\t     || ('s' <= (c) && (c) <= 'z'))\n# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))\n#endif\n\n#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))\nint\nmain ()\n{\n  int i;\n  for (i = 0; i < 256; i++)\n    if (XOR (islower (i), ISLOWER (i))\n\t|| toupper (i) != TOUPPER (i))\n      return 2;\n  return 0;\n}\n_ACEOF\nif ac_fn_c_try_run \"$LINENO\"; then :\n\nelse\n  ac_cv_header_stdc=no\nfi\nrm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \\\n  conftest.$ac_objext conftest.beam conftest.$ac_ext\nfi\n\nfi\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc\" >&5\n$as_echo \"$ac_cv_header_stdc\" >&6; }\nif test $ac_cv_header_stdc = yes; then\n\n$as_echo \"#define STDC_HEADERS 1\" >>confdefs.h\n\nfi\n\n# On IRIX 5.3, sys/types and inttypes.h are conflicting.\nfor ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \\\n\t\t  inttypes.h stdint.h unistd.h\ndo :\n  as_ac_Header=`$as_echo \"ac_cv_header_$ac_header\" | $as_tr_sh`\nac_fn_c_check_header_compile \"$LINENO\" \"$ac_header\" \"$as_ac_Header\" \"$ac_includes_default\n\"\nif eval test \\\"x\\$\"$as_ac_Header\"\\\" = x\"yes\"; then :\n  cat >>confdefs.h <<_ACEOF\n#define `$as_echo \"HAVE_$ac_header\" | $as_tr_cpp` 1\n_ACEOF\n\nfi\n\ndone\n\n\nfor ac_header in dlfcn.h\ndo :\n  ac_fn_c_check_header_compile \"$LINENO\" \"dlfcn.h\" \"ac_cv_header_dlfcn_h\" \"$ac_includes_default\n\"\nif test \"x$ac_cv_header_dlfcn_h\" = xyes; then :\n  cat >>confdefs.h <<_ACEOF\n#define HAVE_DLFCN_H 1\n_ACEOF\n\nfi\n\ndone\n\n\n\n\nfunc_stripname_cnf ()\n{\n  case ${2} in\n  .*) func_stripname_result=`$ECHO \"${3}\" | $SED \"s%^${1}%%; s%\\\\\\\\${2}\\$%%\"`;;\n  *)  func_stripname_result=`$ECHO \"${3}\" | $SED \"s%^${1}%%; s%${2}\\$%%\"`;;\n  esac\n} # func_stripname_cnf\n\n\n\n\n\n# Set options\n\n\n\n        enable_dlopen=no\n\n\n\n            # Check whether --enable-shared was given.\nif test \"${enable_shared+set}\" = set; then :\n  enableval=$enable_shared; p=${PACKAGE-default}\n    case $enableval in\n    yes) enable_shared=yes ;;\n    no) enable_shared=no ;;\n    *)\n      enable_shared=no\n      # Look at the argument we got.  We use all the common list separators.\n      lt_save_ifs=\"$IFS\"; IFS=\"${IFS}$PATH_SEPARATOR,\"\n      for pkg in $enableval; do\n\tIFS=\"$lt_save_ifs\"\n\tif test \"X$pkg\" = \"X$p\"; then\n\t  enable_shared=yes\n\tfi\n      done\n      IFS=\"$lt_save_ifs\"\n      ;;\n    esac\nelse\n  enable_shared=yes\nfi\n\n\n\n\n\n\n\n\n\n  # Check whether --enable-static was given.\nif test \"${enable_static+set}\" = set; then :\n  enableval=$enable_static; p=${PACKAGE-default}\n    case $enableval in\n    yes) enable_static=yes ;;\n    no) enable_static=no ;;\n    *)\n     enable_static=no\n      # Look at the argument we got.  We use all the common list separators.\n      lt_save_ifs=\"$IFS\"; IFS=\"${IFS}$PATH_SEPARATOR,\"\n      for pkg in $enableval; do\n\tIFS=\"$lt_save_ifs\"\n\tif test \"X$pkg\" = \"X$p\"; then\n\t  enable_static=yes\n\tfi\n      done\n      IFS=\"$lt_save_ifs\"\n      ;;\n    esac\nelse\n  enable_static=yes\nfi\n\n\n\n\n\n\n\n\n\n\n# Check whether --with-pic was given.\nif test \"${with_pic+set}\" = set; then :\n  withval=$with_pic; lt_p=${PACKAGE-default}\n    case $withval in\n    yes|no) pic_mode=$withval ;;\n    *)\n      pic_mode=default\n      # Look at the argument we got.  We use all the common list separators.\n      lt_save_ifs=\"$IFS\"; IFS=\"${IFS}$PATH_SEPARATOR,\"\n      for lt_pkg in $withval; do\n\tIFS=\"$lt_save_ifs\"\n\tif test \"X$lt_pkg\" = \"X$lt_p\"; then\n\t  pic_mode=yes\n\tfi\n      done\n      IFS=\"$lt_save_ifs\"\n      ;;\n    esac\nelse\n  pic_mode=default\nfi\n\n\ntest -z \"$pic_mode\" && pic_mode=default\n\n\n\n\n\n\n\n  # Check whether --enable-fast-install was given.\nif test \"${enable_fast_install+set}\" = set; then :\n  enableval=$enable_fast_install; p=${PACKAGE-default}\n    case $enableval in\n    yes) enable_fast_install=yes ;;\n    no) enable_fast_install=no ;;\n    *)\n      enable_fast_install=no\n      # Look at the argument we got.  We use all the common list separators.\n      lt_save_ifs=\"$IFS\"; IFS=\"${IFS}$PATH_SEPARATOR,\"\n      for pkg in $enableval; do\n\tIFS=\"$lt_save_ifs\"\n\tif test \"X$pkg\" = \"X$p\"; then\n\t  enable_fast_install=yes\n\tfi\n      done\n      IFS=\"$lt_save_ifs\"\n      ;;\n    esac\nelse\n  enable_fast_install=yes\nfi\n\n\n\n\n\n\n\n\n\n\n\n# This can be used to rebuild libtool when needed\nLIBTOOL_DEPS=\"$ltmain\"\n\n# Always use our own libtool.\nLIBTOOL='$(SHELL) $(top_builddir)/libtool'\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\ntest -z \"$LN_S\" && LN_S=\"ln -s\"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nif test -n \"${ZSH_VERSION+set}\" ; then\n   setopt NO_GLOB_SUBST\nfi\n\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for objdir\" >&5\n$as_echo_n \"checking for objdir... \" >&6; }\nif ${lt_cv_objdir+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  rm -f .libs 2>/dev/null\nmkdir .libs 2>/dev/null\nif test -d .libs; then\n  lt_cv_objdir=.libs\nelse\n  # MS-DOS does not allow filenames that begin with a dot.\n  lt_cv_objdir=_libs\nfi\nrmdir .libs 2>/dev/null\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir\" >&5\n$as_echo \"$lt_cv_objdir\" >&6; }\nobjdir=$lt_cv_objdir\n\n\n\n\n\ncat >>confdefs.h <<_ACEOF\n#define LT_OBJDIR \"$lt_cv_objdir/\"\n_ACEOF\n\n\n\n\ncase $host_os in\naix3*)\n  # AIX sometimes has problems with the GCC collect2 program.  For some\n  # reason, if we set the COLLECT_NAMES environment variable, the problems\n  # vanish in a puff of smoke.\n  if test \"X${COLLECT_NAMES+set}\" != Xset; then\n    COLLECT_NAMES=\n    export COLLECT_NAMES\n  fi\n  ;;\nesac\n\n# Global variables:\nofile=libtool\ncan_build_shared=yes\n\n# All known linkers require a `.a' archive for static linking (except MSVC,\n# which needs '.lib').\nlibext=a\n\nwith_gnu_ld=\"$lt_cv_prog_gnu_ld\"\n\nold_CC=\"$CC\"\nold_CFLAGS=\"$CFLAGS\"\n\n# Set sane defaults for various variables\ntest -z \"$CC\" && CC=cc\ntest -z \"$LTCC\" && LTCC=$CC\ntest -z \"$LTCFLAGS\" && LTCFLAGS=$CFLAGS\ntest -z \"$LD\" && LD=ld\ntest -z \"$ac_objext\" && ac_objext=o\n\nfor cc_temp in $compiler\"\"; do\n  case $cc_temp in\n    compile | *[\\\\/]compile | ccache | *[\\\\/]ccache ) ;;\n    distcc | *[\\\\/]distcc | purify | *[\\\\/]purify ) ;;\n    \\-*) ;;\n    *) break;;\n  esac\ndone\ncc_basename=`$ECHO \"$cc_temp\" | $SED \"s%.*/%%; s%^$host_alias-%%\"`\n\n\n# Only perform the check for file, if the check method requires it\ntest -z \"$MAGIC_CMD\" && MAGIC_CMD=file\ncase $deplibs_check_method in\nfile_magic*)\n  if test \"$file_magic_cmd\" = '$MAGIC_CMD'; then\n    { $as_echo \"$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file\" >&5\n$as_echo_n \"checking for ${ac_tool_prefix}file... \" >&6; }\nif ${lt_cv_path_MAGIC_CMD+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  case $MAGIC_CMD in\n[\\\\/*] |  ?:[\\\\/]*)\n  lt_cv_path_MAGIC_CMD=\"$MAGIC_CMD\" # Let the user override the test with a path.\n  ;;\n*)\n  lt_save_MAGIC_CMD=\"$MAGIC_CMD\"\n  lt_save_ifs=\"$IFS\"; IFS=$PATH_SEPARATOR\n  ac_dummy=\"/usr/bin$PATH_SEPARATOR$PATH\"\n  for ac_dir in $ac_dummy; do\n    IFS=\"$lt_save_ifs\"\n    test -z \"$ac_dir\" && ac_dir=.\n    if test -f $ac_dir/${ac_tool_prefix}file; then\n      lt_cv_path_MAGIC_CMD=\"$ac_dir/${ac_tool_prefix}file\"\n      if test -n \"$file_magic_test_file\"; then\n\tcase $deplibs_check_method in\n\t\"file_magic \"*)\n\t  file_magic_regex=`expr \"$deplibs_check_method\" : \"file_magic \\(.*\\)\"`\n\t  MAGIC_CMD=\"$lt_cv_path_MAGIC_CMD\"\n\t  if eval $file_magic_cmd \\$file_magic_test_file 2> /dev/null |\n\t    $EGREP \"$file_magic_regex\" > /dev/null; then\n\t    :\n\t  else\n\t    cat <<_LT_EOF 1>&2\n\n*** Warning: the command libtool uses to detect shared libraries,\n*** $file_magic_cmd, produces output that libtool cannot recognize.\n*** The result is that libtool may fail to recognize shared libraries\n*** as such.  This will affect the creation of libtool libraries that\n*** depend on shared libraries, but programs linked with such libtool\n*** libraries will work regardless of this problem.  Nevertheless, you\n*** may want to report the problem to your system manager and/or to\n*** bug-libtool@gnu.org\n\n_LT_EOF\n\t  fi ;;\n\tesac\n      fi\n      break\n    fi\n  done\n  IFS=\"$lt_save_ifs\"\n  MAGIC_CMD=\"$lt_save_MAGIC_CMD\"\n  ;;\nesac\nfi\n\nMAGIC_CMD=\"$lt_cv_path_MAGIC_CMD\"\nif test -n \"$MAGIC_CMD\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD\" >&5\n$as_echo \"$MAGIC_CMD\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\nfi\n\n\n\n\n\nif test -z \"$lt_cv_path_MAGIC_CMD\"; then\n  if test -n \"$ac_tool_prefix\"; then\n    { $as_echo \"$as_me:${as_lineno-$LINENO}: checking for file\" >&5\n$as_echo_n \"checking for file... \" >&6; }\nif ${lt_cv_path_MAGIC_CMD+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  case $MAGIC_CMD in\n[\\\\/*] |  ?:[\\\\/]*)\n  lt_cv_path_MAGIC_CMD=\"$MAGIC_CMD\" # Let the user override the test with a path.\n  ;;\n*)\n  lt_save_MAGIC_CMD=\"$MAGIC_CMD\"\n  lt_save_ifs=\"$IFS\"; IFS=$PATH_SEPARATOR\n  ac_dummy=\"/usr/bin$PATH_SEPARATOR$PATH\"\n  for ac_dir in $ac_dummy; do\n    IFS=\"$lt_save_ifs\"\n    test -z \"$ac_dir\" && ac_dir=.\n    if test -f $ac_dir/file; then\n      lt_cv_path_MAGIC_CMD=\"$ac_dir/file\"\n      if test -n \"$file_magic_test_file\"; then\n\tcase $deplibs_check_method in\n\t\"file_magic \"*)\n\t  file_magic_regex=`expr \"$deplibs_check_method\" : \"file_magic \\(.*\\)\"`\n\t  MAGIC_CMD=\"$lt_cv_path_MAGIC_CMD\"\n\t  if eval $file_magic_cmd \\$file_magic_test_file 2> /dev/null |\n\t    $EGREP \"$file_magic_regex\" > /dev/null; then\n\t    :\n\t  else\n\t    cat <<_LT_EOF 1>&2\n\n*** Warning: the command libtool uses to detect shared libraries,\n*** $file_magic_cmd, produces output that libtool cannot recognize.\n*** The result is that libtool may fail to recognize shared libraries\n*** as such.  This will affect the creation of libtool libraries that\n*** depend on shared libraries, but programs linked with such libtool\n*** libraries will work regardless of this problem.  Nevertheless, you\n*** may want to report the problem to your system manager and/or to\n*** bug-libtool@gnu.org\n\n_LT_EOF\n\t  fi ;;\n\tesac\n      fi\n      break\n    fi\n  done\n  IFS=\"$lt_save_ifs\"\n  MAGIC_CMD=\"$lt_save_MAGIC_CMD\"\n  ;;\nesac\nfi\n\nMAGIC_CMD=\"$lt_cv_path_MAGIC_CMD\"\nif test -n \"$MAGIC_CMD\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD\" >&5\n$as_echo \"$MAGIC_CMD\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\nfi\n\n\n  else\n    MAGIC_CMD=:\n  fi\nfi\n\n  fi\n  ;;\nesac\n\n# Use C for the default configuration in the libtool script\n\nlt_save_CC=\"$CC\"\nac_ext=c\nac_cpp='$CPP $CPPFLAGS'\nac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'\nac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'\nac_compiler_gnu=$ac_cv_c_compiler_gnu\n\n\n# Source file extension for C test sources.\nac_ext=c\n\n# Object file extension for compiled C test sources.\nobjext=o\nobjext=$objext\n\n# Code to be used in simple compile tests\nlt_simple_compile_test_code=\"int some_variable = 0;\"\n\n# Code to be used in simple link tests\nlt_simple_link_test_code='int main(){return(0);}'\n\n\n\n\n\n\n\n# If no C compiler was specified, use CC.\nLTCC=${LTCC-\"$CC\"}\n\n# If no C compiler flags were specified, use CFLAGS.\nLTCFLAGS=${LTCFLAGS-\"$CFLAGS\"}\n\n# Allow CC to be a program name with arguments.\ncompiler=$CC\n\n# Save the default compiler, since it gets overwritten when the other\n# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.\ncompiler_DEFAULT=$CC\n\n# save warnings/boilerplate of simple test code\nac_outfile=conftest.$ac_objext\necho \"$lt_simple_compile_test_code\" >conftest.$ac_ext\neval \"$ac_compile\" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err\n_lt_compiler_boilerplate=`cat conftest.err`\n$RM conftest*\n\nac_outfile=conftest.$ac_objext\necho \"$lt_simple_link_test_code\" >conftest.$ac_ext\neval \"$ac_link\" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err\n_lt_linker_boilerplate=`cat conftest.err`\n$RM -r conftest*\n\n\nif test -n \"$compiler\"; then\n\nlt_prog_compiler_no_builtin_flag=\n\nif test \"$GCC\" = yes; then\n  case $cc_basename in\n  nvcc*)\n    lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;;\n  *)\n    lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;;\n  esac\n\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions\" >&5\n$as_echo_n \"checking if $compiler supports -fno-rtti -fno-exceptions... \" >&6; }\nif ${lt_cv_prog_compiler_rtti_exceptions+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  lt_cv_prog_compiler_rtti_exceptions=no\n   ac_outfile=conftest.$ac_objext\n   echo \"$lt_simple_compile_test_code\" > conftest.$ac_ext\n   lt_compiler_flag=\"-fno-rtti -fno-exceptions\"\n   # Insert the option either (1) after the last *FLAGS variable, or\n   # (2) before a word containing \"conftest.\", or (3) at the end.\n   # Note that $ac_compile itself does not contain backslashes and begins\n   # with a dollar sign (not a hyphen), so the echo should work correctly.\n   # The option is referenced via a variable to avoid confusing sed.\n   lt_compile=`echo \"$ac_compile\" | $SED \\\n   -e 's:.*FLAGS}\\{0,1\\} :&$lt_compiler_flag :; t' \\\n   -e 's: [^ ]*conftest\\.: $lt_compiler_flag&:; t' \\\n   -e 's:$: $lt_compiler_flag:'`\n   (eval echo \"\\\"\\$as_me:$LINENO: $lt_compile\\\"\" >&5)\n   (eval \"$lt_compile\" 2>conftest.err)\n   ac_status=$?\n   cat conftest.err >&5\n   echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n   if (exit $ac_status) && test -s \"$ac_outfile\"; then\n     # The compiler can only warn and ignore the option if not recognized\n     # So say no if there are warnings other than the usual output.\n     $ECHO \"$_lt_compiler_boilerplate\" | $SED '/^$/d' >conftest.exp\n     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2\n     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then\n       lt_cv_prog_compiler_rtti_exceptions=yes\n     fi\n   fi\n   $RM conftest*\n\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions\" >&5\n$as_echo \"$lt_cv_prog_compiler_rtti_exceptions\" >&6; }\n\nif test x\"$lt_cv_prog_compiler_rtti_exceptions\" = xyes; then\n    lt_prog_compiler_no_builtin_flag=\"$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions\"\nelse\n    :\nfi\n\nfi\n\n\n\n\n\n\n  lt_prog_compiler_wl=\nlt_prog_compiler_pic=\nlt_prog_compiler_static=\n\n\n  if test \"$GCC\" = yes; then\n    lt_prog_compiler_wl='-Wl,'\n    lt_prog_compiler_static='-static'\n\n    case $host_os in\n      aix*)\n      # All AIX code is PIC.\n      if test \"$host_cpu\" = ia64; then\n\t# AIX 5 now supports IA64 processor\n\tlt_prog_compiler_static='-Bstatic'\n      fi\n      ;;\n\n    amigaos*)\n      case $host_cpu in\n      powerpc)\n            # see comment about AmigaOS4 .so support\n            lt_prog_compiler_pic='-fPIC'\n        ;;\n      m68k)\n            # FIXME: we need at least 68020 code to build shared libraries, but\n            # adding the `-m68020' flag to GCC prevents building anything better,\n            # like `-m68040'.\n            lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'\n        ;;\n      esac\n      ;;\n\n    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)\n      # PIC is the default for these OSes.\n      ;;\n\n    mingw* | cygwin* | pw32* | os2* | cegcc*)\n      # This hack is so that the source file can tell whether it is being\n      # built for inclusion in a dll (and should export symbols for example).\n      # Although the cygwin gcc ignores -fPIC, still need this for old-style\n      # (--disable-auto-import) libraries\n      lt_prog_compiler_pic='-DDLL_EXPORT'\n      ;;\n\n    darwin* | rhapsody*)\n      # PIC is the default on this platform\n      # Common symbols not allowed in MH_DYLIB files\n      lt_prog_compiler_pic='-fno-common'\n      ;;\n\n    haiku*)\n      # PIC is the default for Haiku.\n      # The \"-static\" flag exists, but is broken.\n      lt_prog_compiler_static=\n      ;;\n\n    hpux*)\n      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit\n      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag\n      # sets the default TLS model and affects inlining.\n      case $host_cpu in\n      hppa*64*)\n\t# +Z the default\n\t;;\n      *)\n\tlt_prog_compiler_pic='-fPIC'\n\t;;\n      esac\n      ;;\n\n    interix[3-9]*)\n      # Interix 3.x gcc -fpic/-fPIC options generate broken code.\n      # Instead, we relocate shared libraries at runtime.\n      ;;\n\n    msdosdjgpp*)\n      # Just because we use GCC doesn't mean we suddenly get shared libraries\n      # on systems that don't support them.\n      lt_prog_compiler_can_build_shared=no\n      enable_shared=no\n      ;;\n\n    *nto* | *qnx*)\n      # QNX uses GNU C++, but need to define -shared option too, otherwise\n      # it will coredump.\n      lt_prog_compiler_pic='-fPIC -shared'\n      ;;\n\n    sysv4*MP*)\n      if test -d /usr/nec; then\n\tlt_prog_compiler_pic=-Kconform_pic\n      fi\n      ;;\n\n    *)\n      lt_prog_compiler_pic='-fPIC'\n      ;;\n    esac\n\n    case $cc_basename in\n    nvcc*) # Cuda Compiler Driver 2.2\n      lt_prog_compiler_wl='-Xlinker '\n      if test -n \"$lt_prog_compiler_pic\"; then\n        lt_prog_compiler_pic=\"-Xcompiler $lt_prog_compiler_pic\"\n      fi\n      ;;\n    esac\n  else\n    # PORTME Check for flag to pass linker flags through the system compiler.\n    case $host_os in\n    aix*)\n      lt_prog_compiler_wl='-Wl,'\n      if test \"$host_cpu\" = ia64; then\n\t# AIX 5 now supports IA64 processor\n\tlt_prog_compiler_static='-Bstatic'\n      else\n\tlt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'\n      fi\n      ;;\n\n    mingw* | cygwin* | pw32* | os2* | cegcc*)\n      # This hack is so that the source file can tell whether it is being\n      # built for inclusion in a dll (and should export symbols for example).\n      lt_prog_compiler_pic='-DDLL_EXPORT'\n      ;;\n\n    hpux9* | hpux10* | hpux11*)\n      lt_prog_compiler_wl='-Wl,'\n      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but\n      # not for PA HP-UX.\n      case $host_cpu in\n      hppa*64*|ia64*)\n\t# +Z the default\n\t;;\n      *)\n\tlt_prog_compiler_pic='+Z'\n\t;;\n      esac\n      # Is there a better lt_prog_compiler_static that works with the bundled CC?\n      lt_prog_compiler_static='${wl}-a ${wl}archive'\n      ;;\n\n    irix5* | irix6* | nonstopux*)\n      lt_prog_compiler_wl='-Wl,'\n      # PIC (with -KPIC) is the default.\n      lt_prog_compiler_static='-non_shared'\n      ;;\n\n    linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)\n      case $cc_basename in\n      # old Intel for x86_64 which still supported -KPIC.\n      ecc*)\n\tlt_prog_compiler_wl='-Wl,'\n\tlt_prog_compiler_pic='-KPIC'\n\tlt_prog_compiler_static='-static'\n        ;;\n      # icc used to be incompatible with GCC.\n      # ICC 10 doesn't accept -KPIC any more.\n      icc* | ifort*)\n\tlt_prog_compiler_wl='-Wl,'\n\tlt_prog_compiler_pic='-fPIC'\n\tlt_prog_compiler_static='-static'\n        ;;\n      # Lahey Fortran 8.1.\n      lf95*)\n\tlt_prog_compiler_wl='-Wl,'\n\tlt_prog_compiler_pic='--shared'\n\tlt_prog_compiler_static='--static'\n\t;;\n      nagfor*)\n\t# NAG Fortran compiler\n\tlt_prog_compiler_wl='-Wl,-Wl,,'\n\tlt_prog_compiler_pic='-PIC'\n\tlt_prog_compiler_static='-Bstatic'\n\t;;\n      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)\n        # Portland Group compilers (*not* the Pentium gcc compiler,\n\t# which looks to be a dead project)\n\tlt_prog_compiler_wl='-Wl,'\n\tlt_prog_compiler_pic='-fpic'\n\tlt_prog_compiler_static='-Bstatic'\n        ;;\n      ccc*)\n        lt_prog_compiler_wl='-Wl,'\n        # All Alpha code is PIC.\n        lt_prog_compiler_static='-non_shared'\n        ;;\n      xl* | bgxl* | bgf* | mpixl*)\n\t# IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene\n\tlt_prog_compiler_wl='-Wl,'\n\tlt_prog_compiler_pic='-qpic'\n\tlt_prog_compiler_static='-qstaticlink'\n\t;;\n      *)\n\tcase `$CC -V 2>&1 | sed 5q` in\n\t*Sun\\ Ceres\\ Fortran* | *Sun*Fortran*\\ [1-7].* | *Sun*Fortran*\\ 8.[0-3]*)\n\t  # Sun Fortran 8.3 passes all unrecognized flags to the linker\n\t  lt_prog_compiler_pic='-KPIC'\n\t  lt_prog_compiler_static='-Bstatic'\n\t  lt_prog_compiler_wl=''\n\t  ;;\n\t*Sun\\ F* | *Sun*Fortran*)\n\t  lt_prog_compiler_pic='-KPIC'\n\t  lt_prog_compiler_static='-Bstatic'\n\t  lt_prog_compiler_wl='-Qoption ld '\n\t  ;;\n\t*Sun\\ C*)\n\t  # Sun C 5.9\n\t  lt_prog_compiler_pic='-KPIC'\n\t  lt_prog_compiler_static='-Bstatic'\n\t  lt_prog_compiler_wl='-Wl,'\n\t  ;;\n        *Intel*\\ [CF]*Compiler*)\n\t  lt_prog_compiler_wl='-Wl,'\n\t  lt_prog_compiler_pic='-fPIC'\n\t  lt_prog_compiler_static='-static'\n\t  ;;\n\t*Portland\\ Group*)\n\t  lt_prog_compiler_wl='-Wl,'\n\t  lt_prog_compiler_pic='-fpic'\n\t  lt_prog_compiler_static='-Bstatic'\n\t  ;;\n\tesac\n\t;;\n      esac\n      ;;\n\n    newsos6)\n      lt_prog_compiler_pic='-KPIC'\n      lt_prog_compiler_static='-Bstatic'\n      ;;\n\n    *nto* | *qnx*)\n      # QNX uses GNU C++, but need to define -shared option too, otherwise\n      # it will coredump.\n      lt_prog_compiler_pic='-fPIC -shared'\n      ;;\n\n    osf3* | osf4* | osf5*)\n      lt_prog_compiler_wl='-Wl,'\n      # All OSF/1 code is PIC.\n      lt_prog_compiler_static='-non_shared'\n      ;;\n\n    rdos*)\n      lt_prog_compiler_static='-non_shared'\n      ;;\n\n    solaris*)\n      lt_prog_compiler_pic='-KPIC'\n      lt_prog_compiler_static='-Bstatic'\n      case $cc_basename in\n      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)\n\tlt_prog_compiler_wl='-Qoption ld ';;\n      *)\n\tlt_prog_compiler_wl='-Wl,';;\n      esac\n      ;;\n\n    sunos4*)\n      lt_prog_compiler_wl='-Qoption ld '\n      lt_prog_compiler_pic='-PIC'\n      lt_prog_compiler_static='-Bstatic'\n      ;;\n\n    sysv4 | sysv4.2uw2* | sysv4.3*)\n      lt_prog_compiler_wl='-Wl,'\n      lt_prog_compiler_pic='-KPIC'\n      lt_prog_compiler_static='-Bstatic'\n      ;;\n\n    sysv4*MP*)\n      if test -d /usr/nec ;then\n\tlt_prog_compiler_pic='-Kconform_pic'\n\tlt_prog_compiler_static='-Bstatic'\n      fi\n      ;;\n\n    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)\n      lt_prog_compiler_wl='-Wl,'\n      lt_prog_compiler_pic='-KPIC'\n      lt_prog_compiler_static='-Bstatic'\n      ;;\n\n    unicos*)\n      lt_prog_compiler_wl='-Wl,'\n      lt_prog_compiler_can_build_shared=no\n      ;;\n\n    uts4*)\n      lt_prog_compiler_pic='-pic'\n      lt_prog_compiler_static='-Bstatic'\n      ;;\n\n    *)\n      lt_prog_compiler_can_build_shared=no\n      ;;\n    esac\n  fi\n\ncase $host_os in\n  # For platforms which do not support PIC, -DPIC is meaningless:\n  *djgpp*)\n    lt_prog_compiler_pic=\n    ;;\n  *)\n    lt_prog_compiler_pic=\"$lt_prog_compiler_pic -DPIC\"\n    ;;\nesac\n\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC\" >&5\n$as_echo_n \"checking for $compiler option to produce PIC... \" >&6; }\nif ${lt_cv_prog_compiler_pic+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  lt_cv_prog_compiler_pic=$lt_prog_compiler_pic\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic\" >&5\n$as_echo \"$lt_cv_prog_compiler_pic\" >&6; }\nlt_prog_compiler_pic=$lt_cv_prog_compiler_pic\n\n#\n# Check to make sure the PIC flag actually works.\n#\nif test -n \"$lt_prog_compiler_pic\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works\" >&5\n$as_echo_n \"checking if $compiler PIC flag $lt_prog_compiler_pic works... \" >&6; }\nif ${lt_cv_prog_compiler_pic_works+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  lt_cv_prog_compiler_pic_works=no\n   ac_outfile=conftest.$ac_objext\n   echo \"$lt_simple_compile_test_code\" > conftest.$ac_ext\n   lt_compiler_flag=\"$lt_prog_compiler_pic -DPIC\"\n   # Insert the option either (1) after the last *FLAGS variable, or\n   # (2) before a word containing \"conftest.\", or (3) at the end.\n   # Note that $ac_compile itself does not contain backslashes and begins\n   # with a dollar sign (not a hyphen), so the echo should work correctly.\n   # The option is referenced via a variable to avoid confusing sed.\n   lt_compile=`echo \"$ac_compile\" | $SED \\\n   -e 's:.*FLAGS}\\{0,1\\} :&$lt_compiler_flag :; t' \\\n   -e 's: [^ ]*conftest\\.: $lt_compiler_flag&:; t' \\\n   -e 's:$: $lt_compiler_flag:'`\n   (eval echo \"\\\"\\$as_me:$LINENO: $lt_compile\\\"\" >&5)\n   (eval \"$lt_compile\" 2>conftest.err)\n   ac_status=$?\n   cat conftest.err >&5\n   echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n   if (exit $ac_status) && test -s \"$ac_outfile\"; then\n     # The compiler can only warn and ignore the option if not recognized\n     # So say no if there are warnings other than the usual output.\n     $ECHO \"$_lt_compiler_boilerplate\" | $SED '/^$/d' >conftest.exp\n     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2\n     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then\n       lt_cv_prog_compiler_pic_works=yes\n     fi\n   fi\n   $RM conftest*\n\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works\" >&5\n$as_echo \"$lt_cv_prog_compiler_pic_works\" >&6; }\n\nif test x\"$lt_cv_prog_compiler_pic_works\" = xyes; then\n    case $lt_prog_compiler_pic in\n     \"\" | \" \"*) ;;\n     *) lt_prog_compiler_pic=\" $lt_prog_compiler_pic\" ;;\n     esac\nelse\n    lt_prog_compiler_pic=\n     lt_prog_compiler_can_build_shared=no\nfi\n\nfi\n\n\n\n\n\n\n\n\n\n\n\n#\n# Check to make sure the static flag actually works.\n#\nwl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\\\"$lt_prog_compiler_static\\\"\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works\" >&5\n$as_echo_n \"checking if $compiler static flag $lt_tmp_static_flag works... \" >&6; }\nif ${lt_cv_prog_compiler_static_works+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  lt_cv_prog_compiler_static_works=no\n   save_LDFLAGS=\"$LDFLAGS\"\n   LDFLAGS=\"$LDFLAGS $lt_tmp_static_flag\"\n   echo \"$lt_simple_link_test_code\" > conftest.$ac_ext\n   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then\n     # The linker can only warn and ignore the option if not recognized\n     # So say no if there are warnings\n     if test -s conftest.err; then\n       # Append any errors to the config.log.\n       cat conftest.err 1>&5\n       $ECHO \"$_lt_linker_boilerplate\" | $SED '/^$/d' > conftest.exp\n       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2\n       if diff conftest.exp conftest.er2 >/dev/null; then\n         lt_cv_prog_compiler_static_works=yes\n       fi\n     else\n       lt_cv_prog_compiler_static_works=yes\n     fi\n   fi\n   $RM -r conftest*\n   LDFLAGS=\"$save_LDFLAGS\"\n\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works\" >&5\n$as_echo \"$lt_cv_prog_compiler_static_works\" >&6; }\n\nif test x\"$lt_cv_prog_compiler_static_works\" = xyes; then\n    :\nelse\n    lt_prog_compiler_static=\nfi\n\n\n\n\n\n\n\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext\" >&5\n$as_echo_n \"checking if $compiler supports -c -o file.$ac_objext... \" >&6; }\nif ${lt_cv_prog_compiler_c_o+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  lt_cv_prog_compiler_c_o=no\n   $RM -r conftest 2>/dev/null\n   mkdir conftest\n   cd conftest\n   mkdir out\n   echo \"$lt_simple_compile_test_code\" > conftest.$ac_ext\n\n   lt_compiler_flag=\"-o out/conftest2.$ac_objext\"\n   # Insert the option either (1) after the last *FLAGS variable, or\n   # (2) before a word containing \"conftest.\", or (3) at the end.\n   # Note that $ac_compile itself does not contain backslashes and begins\n   # with a dollar sign (not a hyphen), so the echo should work correctly.\n   lt_compile=`echo \"$ac_compile\" | $SED \\\n   -e 's:.*FLAGS}\\{0,1\\} :&$lt_compiler_flag :; t' \\\n   -e 's: [^ ]*conftest\\.: $lt_compiler_flag&:; t' \\\n   -e 's:$: $lt_compiler_flag:'`\n   (eval echo \"\\\"\\$as_me:$LINENO: $lt_compile\\\"\" >&5)\n   (eval \"$lt_compile\" 2>out/conftest.err)\n   ac_status=$?\n   cat out/conftest.err >&5\n   echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n   if (exit $ac_status) && test -s out/conftest2.$ac_objext\n   then\n     # The compiler can only warn and ignore the option if not recognized\n     # So say no if there are warnings\n     $ECHO \"$_lt_compiler_boilerplate\" | $SED '/^$/d' > out/conftest.exp\n     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2\n     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then\n       lt_cv_prog_compiler_c_o=yes\n     fi\n   fi\n   chmod u+w . 2>&5\n   $RM conftest*\n   # SGI C++ compiler will create directory out/ii_files/ for\n   # template instantiation\n   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files\n   $RM out/* && rmdir out\n   cd ..\n   $RM -r conftest\n   $RM conftest*\n\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o\" >&5\n$as_echo \"$lt_cv_prog_compiler_c_o\" >&6; }\n\n\n\n\n\n\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext\" >&5\n$as_echo_n \"checking if $compiler supports -c -o file.$ac_objext... \" >&6; }\nif ${lt_cv_prog_compiler_c_o+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  lt_cv_prog_compiler_c_o=no\n   $RM -r conftest 2>/dev/null\n   mkdir conftest\n   cd conftest\n   mkdir out\n   echo \"$lt_simple_compile_test_code\" > conftest.$ac_ext\n\n   lt_compiler_flag=\"-o out/conftest2.$ac_objext\"\n   # Insert the option either (1) after the last *FLAGS variable, or\n   # (2) before a word containing \"conftest.\", or (3) at the end.\n   # Note that $ac_compile itself does not contain backslashes and begins\n   # with a dollar sign (not a hyphen), so the echo should work correctly.\n   lt_compile=`echo \"$ac_compile\" | $SED \\\n   -e 's:.*FLAGS}\\{0,1\\} :&$lt_compiler_flag :; t' \\\n   -e 's: [^ ]*conftest\\.: $lt_compiler_flag&:; t' \\\n   -e 's:$: $lt_compiler_flag:'`\n   (eval echo \"\\\"\\$as_me:$LINENO: $lt_compile\\\"\" >&5)\n   (eval \"$lt_compile\" 2>out/conftest.err)\n   ac_status=$?\n   cat out/conftest.err >&5\n   echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n   if (exit $ac_status) && test -s out/conftest2.$ac_objext\n   then\n     # The compiler can only warn and ignore the option if not recognized\n     # So say no if there are warnings\n     $ECHO \"$_lt_compiler_boilerplate\" | $SED '/^$/d' > out/conftest.exp\n     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2\n     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then\n       lt_cv_prog_compiler_c_o=yes\n     fi\n   fi\n   chmod u+w . 2>&5\n   $RM conftest*\n   # SGI C++ compiler will create directory out/ii_files/ for\n   # template instantiation\n   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files\n   $RM out/* && rmdir out\n   cd ..\n   $RM -r conftest\n   $RM conftest*\n\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o\" >&5\n$as_echo \"$lt_cv_prog_compiler_c_o\" >&6; }\n\n\n\n\nhard_links=\"nottested\"\nif test \"$lt_cv_prog_compiler_c_o\" = no && test \"$need_locks\" != no; then\n  # do not overwrite the value of need_locks provided by the user\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links\" >&5\n$as_echo_n \"checking if we can lock with hard links... \" >&6; }\n  hard_links=yes\n  $RM conftest*\n  ln conftest.a conftest.b 2>/dev/null && hard_links=no\n  touch conftest.a\n  ln conftest.a conftest.b 2>&5 || hard_links=no\n  ln conftest.a conftest.b 2>/dev/null && hard_links=no\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $hard_links\" >&5\n$as_echo \"$hard_links\" >&6; }\n  if test \"$hard_links\" = no; then\n    { $as_echo \"$as_me:${as_lineno-$LINENO}: WARNING: \\`$CC' does not support \\`-c -o', so \\`make -j' may be unsafe\" >&5\n$as_echo \"$as_me: WARNING: \\`$CC' does not support \\`-c -o', so \\`make -j' may be unsafe\" >&2;}\n    need_locks=warn\n  fi\nelse\n  need_locks=no\nfi\n\n\n\n\n\n\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries\" >&5\n$as_echo_n \"checking whether the $compiler linker ($LD) supports shared libraries... \" >&6; }\n\n  runpath_var=\n  allow_undefined_flag=\n  always_export_symbols=no\n  archive_cmds=\n  archive_expsym_cmds=\n  compiler_needs_object=no\n  enable_shared_with_static_runtimes=no\n  export_dynamic_flag_spec=\n  export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\\''s/.* //'\\'' | sort | uniq > $export_symbols'\n  hardcode_automatic=no\n  hardcode_direct=no\n  hardcode_direct_absolute=no\n  hardcode_libdir_flag_spec=\n  hardcode_libdir_separator=\n  hardcode_minus_L=no\n  hardcode_shlibpath_var=unsupported\n  inherit_rpath=no\n  link_all_deplibs=unknown\n  module_cmds=\n  module_expsym_cmds=\n  old_archive_from_new_cmds=\n  old_archive_from_expsyms_cmds=\n  thread_safe_flag_spec=\n  whole_archive_flag_spec=\n  # include_expsyms should be a list of space-separated symbols to be *always*\n  # included in the symbol list\n  include_expsyms=\n  # exclude_expsyms can be an extended regexp of symbols to exclude\n  # it will be wrapped by ` (' and `)$', so one must not match beginning or\n  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',\n  # as well as any symbol that contains `d'.\n  exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'\n  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out\n  # platforms (ab)use it in PIC code, but their linkers get confused if\n  # the symbol is explicitly referenced.  Since portable code cannot\n  # rely on this symbol name, it's probably fine to never include it in\n  # preloaded symbol tables.\n  # Exclude shared library initialization/finalization symbols.\n  extract_expsyms_cmds=\n\n  case $host_os in\n  cygwin* | mingw* | pw32* | cegcc*)\n    # FIXME: the MSVC++ port hasn't been tested in a loooong time\n    # When not using gcc, we currently assume that we are using\n    # Microsoft Visual C++.\n    if test \"$GCC\" != yes; then\n      with_gnu_ld=no\n    fi\n    ;;\n  interix*)\n    # we just hope/assume this is gcc and not c89 (= MSVC++)\n    with_gnu_ld=yes\n    ;;\n  openbsd*)\n    with_gnu_ld=no\n    ;;\n  linux* | k*bsd*-gnu | gnu*)\n    link_all_deplibs=no\n    ;;\n  esac\n\n  ld_shlibs=yes\n\n  # On some targets, GNU ld is compatible enough with the native linker\n  # that we're better off using the native interface for both.\n  lt_use_gnu_ld_interface=no\n  if test \"$with_gnu_ld\" = yes; then\n    case $host_os in\n      aix*)\n\t# The AIX port of GNU ld has always aspired to compatibility\n\t# with the native linker.  However, as the warning in the GNU ld\n\t# block says, versions before 2.19.5* couldn't really create working\n\t# shared libraries, regardless of the interface used.\n\tcase `$LD -v 2>&1` in\n\t  *\\ \\(GNU\\ Binutils\\)\\ 2.19.5*) ;;\n\t  *\\ \\(GNU\\ Binutils\\)\\ 2.[2-9]*) ;;\n\t  *\\ \\(GNU\\ Binutils\\)\\ [3-9]*) ;;\n\t  *)\n\t    lt_use_gnu_ld_interface=yes\n\t    ;;\n\tesac\n\t;;\n      *)\n\tlt_use_gnu_ld_interface=yes\n\t;;\n    esac\n  fi\n\n  if test \"$lt_use_gnu_ld_interface\" = yes; then\n    # If archive_cmds runs LD, not CC, wlarc should be empty\n    wlarc='${wl}'\n\n    # Set some defaults for GNU ld with shared library support. These\n    # are reset later if shared libraries are not supported. Putting them\n    # here allows them to be overridden if necessary.\n    runpath_var=LD_RUN_PATH\n    hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'\n    export_dynamic_flag_spec='${wl}--export-dynamic'\n    # ancient GNU ld didn't support --whole-archive et. al.\n    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then\n      whole_archive_flag_spec=\"$wlarc\"'--whole-archive$convenience '\"$wlarc\"'--no-whole-archive'\n    else\n      whole_archive_flag_spec=\n    fi\n    supports_anon_versioning=no\n    case `$LD -v 2>&1` in\n      *GNU\\ gold*) supports_anon_versioning=yes ;;\n      *\\ [01].* | *\\ 2.[0-9].* | *\\ 2.10.*) ;; # catch versions < 2.11\n      *\\ 2.11.93.0.2\\ *) supports_anon_versioning=yes ;; # RH7.3 ...\n      *\\ 2.11.92.0.12\\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...\n      *\\ 2.11.*) ;; # other 2.11 versions\n      *) supports_anon_versioning=yes ;;\n    esac\n\n    # See if GNU ld supports shared libraries.\n    case $host_os in\n    aix[3-9]*)\n      # On AIX/PPC, the GNU linker is very broken\n      if test \"$host_cpu\" != ia64; then\n\tld_shlibs=no\n\tcat <<_LT_EOF 1>&2\n\n*** Warning: the GNU linker, at least up to release 2.19, is reported\n*** to be unable to reliably create shared libraries on AIX.\n*** Therefore, libtool is disabling shared libraries support.  If you\n*** really care for shared libraries, you may want to install binutils\n*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.\n*** You will then need to restart the configuration process.\n\n_LT_EOF\n      fi\n      ;;\n\n    amigaos*)\n      case $host_cpu in\n      powerpc)\n            # see comment about AmigaOS4 .so support\n            archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'\n            archive_expsym_cmds=''\n        ;;\n      m68k)\n            archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO \"#define NAME $libname\" > $output_objdir/a2ixlibrary.data~$ECHO \"#define LIBRARY_ID 1\" >> $output_objdir/a2ixlibrary.data~$ECHO \"#define VERSION $major\" >> $output_objdir/a2ixlibrary.data~$ECHO \"#define REVISION $revision\" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'\n            hardcode_libdir_flag_spec='-L$libdir'\n            hardcode_minus_L=yes\n        ;;\n      esac\n      ;;\n\n    beos*)\n      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then\n\tallow_undefined_flag=unsupported\n\t# Joseph Beckenbach <jrb3@best.com> says some releases of gcc\n\t# support --undefined.  This deserves some investigation.  FIXME\n\tarchive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'\n      else\n\tld_shlibs=no\n      fi\n      ;;\n\n    cygwin* | mingw* | pw32* | cegcc*)\n      # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,\n      # as there is no search path for DLLs.\n      hardcode_libdir_flag_spec='-L$libdir'\n      export_dynamic_flag_spec='${wl}--export-all-symbols'\n      allow_undefined_flag=unsupported\n      always_export_symbols=no\n      enable_shared_with_static_runtimes=yes\n      export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\\''/^[BCDGRS][ ]/s/.*[ ]\\([^ ]*\\)/\\1 DATA/;s/^.*[ ]__nm__\\([^ ]*\\)[ ][^ ]*/\\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\\'' | sort | uniq > $export_symbols'\n      exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'\n\n      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then\n        archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'\n\t# If the export-symbols file already is a .def file (1st line\n\t# is EXPORTS), use it as is; otherwise, prepend...\n\tarchive_expsym_cmds='if test \"x`$SED 1q $export_symbols`\" = xEXPORTS; then\n\t  cp $export_symbols $output_objdir/$soname.def;\n\telse\n\t  echo EXPORTS > $output_objdir/$soname.def;\n\t  cat $export_symbols >> $output_objdir/$soname.def;\n\tfi~\n\t$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'\n      else\n\tld_shlibs=no\n      fi\n      ;;\n\n    haiku*)\n      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'\n      link_all_deplibs=yes\n      ;;\n\n    interix[3-9]*)\n      hardcode_direct=no\n      hardcode_shlibpath_var=no\n      hardcode_libdir_flag_spec='${wl}-rpath,$libdir'\n      export_dynamic_flag_spec='${wl}-E'\n      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.\n      # Instead, shared libraries are loaded at an image base (0x10000000 by\n      # default) and relocated if they conflict, which is a slow very memory\n      # consuming and fragmenting process.  To avoid this, we pick a random,\n      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link\n      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.\n      archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \\* 262144 + 1342177280` -o $lib'\n      archive_expsym_cmds='sed \"s,^,_,\" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \\* 262144 + 1342177280` -o $lib'\n      ;;\n\n    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)\n      tmp_diet=no\n      if test \"$host_os\" = linux-dietlibc; then\n\tcase $cc_basename in\n\t  diet\\ *) tmp_diet=yes;;\t# linux-dietlibc with static linking (!diet-dyn)\n\tesac\n      fi\n      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \\\n\t && test \"$tmp_diet\" = no\n      then\n\ttmp_addflag=' $pic_flag'\n\ttmp_sharedflag='-shared'\n\tcase $cc_basename,$host_cpu in\n        pgcc*)\t\t\t\t# Portland Group C compiler\n\t  whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\\\"\\\"; do test  -n \\\"$conv\\\" && new_convenience=\\\"$new_convenience,$conv\\\"; done; func_echo_all \\\"$new_convenience\\\"` ${wl}--no-whole-archive'\n\t  tmp_addflag=' $pic_flag'\n\t  ;;\n\tpgf77* | pgf90* | pgf95* | pgfortran*)\n\t\t\t\t\t# Portland Group f77 and f90 compilers\n\t  whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\\\"\\\"; do test  -n \\\"$conv\\\" && new_convenience=\\\"$new_convenience,$conv\\\"; done; func_echo_all \\\"$new_convenience\\\"` ${wl}--no-whole-archive'\n\t  tmp_addflag=' $pic_flag -Mnomain' ;;\n\tecc*,ia64* | icc*,ia64*)\t# Intel C compiler on ia64\n\t  tmp_addflag=' -i_dynamic' ;;\n\tefc*,ia64* | ifort*,ia64*)\t# Intel Fortran compiler on ia64\n\t  tmp_addflag=' -i_dynamic -nofor_main' ;;\n\tifc* | ifort*)\t\t\t# Intel Fortran compiler\n\t  tmp_addflag=' -nofor_main' ;;\n\tlf95*)\t\t\t\t# Lahey Fortran 8.1\n\t  whole_archive_flag_spec=\n\t  tmp_sharedflag='--shared' ;;\n\txl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)\n\t  tmp_sharedflag='-qmkshrobj'\n\t  tmp_addflag= ;;\n\tnvcc*)\t# Cuda Compiler Driver 2.2\n\t  whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\\\"\\\"; do test  -n \\\"$conv\\\" && new_convenience=\\\"$new_convenience,$conv\\\"; done; func_echo_all \\\"$new_convenience\\\"` ${wl}--no-whole-archive'\n\t  compiler_needs_object=yes\n\t  ;;\n\tesac\n\tcase `$CC -V 2>&1 | sed 5q` in\n\t*Sun\\ C*)\t\t\t# Sun C 5.9\n\t  whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\\\"\\\"; do test -z \\\"$conv\\\" || new_convenience=\\\"$new_convenience,$conv\\\"; done; func_echo_all \\\"$new_convenience\\\"` ${wl}--no-whole-archive'\n\t  compiler_needs_object=yes\n\t  tmp_sharedflag='-G' ;;\n\t*Sun\\ F*)\t\t\t# Sun Fortran 8.3\n\t  tmp_sharedflag='-G' ;;\n\tesac\n\tarchive_cmds='$CC '\"$tmp_sharedflag\"\"$tmp_addflag\"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'\n\n        if test \"x$supports_anon_versioning\" = xyes; then\n          archive_expsym_cmds='echo \"{ global:\" > $output_objdir/$libname.ver~\n\t    cat $export_symbols | sed -e \"s/\\(.*\\)/\\1;/\" >> $output_objdir/$libname.ver~\n\t    echo \"local: *; };\" >> $output_objdir/$libname.ver~\n\t    $CC '\"$tmp_sharedflag\"\"$tmp_addflag\"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'\n        fi\n\n\tcase $cc_basename in\n\txlf* | bgf* | bgxlf* | mpixlf*)\n\t  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself\n\t  whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'\n\t  hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'\n\t  archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'\n\t  if test \"x$supports_anon_versioning\" = xyes; then\n\t    archive_expsym_cmds='echo \"{ global:\" > $output_objdir/$libname.ver~\n\t      cat $export_symbols | sed -e \"s/\\(.*\\)/\\1;/\" >> $output_objdir/$libname.ver~\n\t      echo \"local: *; };\" >> $output_objdir/$libname.ver~\n\t      $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'\n\t  fi\n\t  ;;\n\tesac\n      else\n        ld_shlibs=no\n      fi\n      ;;\n\n    netbsd* | netbsdelf*-gnu)\n      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then\n\tarchive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'\n\twlarc=\n      else\n\tarchive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'\n\tarchive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'\n      fi\n      ;;\n\n    solaris*)\n      if $LD -v 2>&1 | $GREP 'BFD 2\\.8' > /dev/null; then\n\tld_shlibs=no\n\tcat <<_LT_EOF 1>&2\n\n*** Warning: The releases 2.8.* of the GNU linker cannot reliably\n*** create shared libraries on Solaris systems.  Therefore, libtool\n*** is disabling shared libraries support.  We urge you to upgrade GNU\n*** binutils to release 2.9.1 or newer.  Another option is to modify\n*** your PATH or compiler configuration so that the native linker is\n*** used, and then restart.\n\n_LT_EOF\n      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then\n\tarchive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'\n\tarchive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'\n      else\n\tld_shlibs=no\n      fi\n      ;;\n\n    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)\n      case `$LD -v 2>&1` in\n        *\\ [01].* | *\\ 2.[0-9].* | *\\ 2.1[0-5].*)\n\tld_shlibs=no\n\tcat <<_LT_EOF 1>&2\n\n*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not\n*** reliably create shared libraries on SCO systems.  Therefore, libtool\n*** is disabling shared libraries support.  We urge you to upgrade GNU\n*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify\n*** your PATH or compiler configuration so that the native linker is\n*** used, and then restart.\n\n_LT_EOF\n\t;;\n\t*)\n\t  # For security reasons, it is highly recommended that you always\n\t  # use absolute paths for naming shared libraries, and exclude the\n\t  # DT_RUNPATH tag from executables and libraries.  But doing so\n\t  # requires that you compile everything twice, which is a pain.\n\t  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then\n\t    hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'\n\t    archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'\n\t    archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'\n\t  else\n\t    ld_shlibs=no\n\t  fi\n\t;;\n      esac\n      ;;\n\n    sunos4*)\n      archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'\n      wlarc=\n      hardcode_direct=yes\n      hardcode_shlibpath_var=no\n      ;;\n\n    *)\n      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then\n\tarchive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'\n\tarchive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'\n      else\n\tld_shlibs=no\n      fi\n      ;;\n    esac\n\n    if test \"$ld_shlibs\" = no; then\n      runpath_var=\n      hardcode_libdir_flag_spec=\n      export_dynamic_flag_spec=\n      whole_archive_flag_spec=\n    fi\n  else\n    # PORTME fill in a description of your system's linker (not GNU ld)\n    case $host_os in\n    aix3*)\n      allow_undefined_flag=unsupported\n      always_export_symbols=yes\n      archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'\n      # Note: this linker hardcodes the directories in LIBPATH if there\n      # are no directories specified by -L.\n      hardcode_minus_L=yes\n      if test \"$GCC\" = yes && test -z \"$lt_prog_compiler_static\"; then\n\t# Neither direct hardcoding nor static linking is supported with a\n\t# broken collect2.\n\thardcode_direct=unsupported\n      fi\n      ;;\n\n    aix[4-9]*)\n      if test \"$host_cpu\" = ia64; then\n\t# On IA64, the linker does run time linking by default, so we don't\n\t# have to do anything special.\n\taix_use_runtimelinking=no\n\texp_sym_flag='-Bexport'\n\tno_entry_flag=\"\"\n      else\n\t# If we're using GNU nm, then we don't want the \"-C\" option.\n\t# -C means demangle to AIX nm, but means don't demangle with GNU nm\n\t# Also, AIX nm treats weak defined symbols like other global\n\t# defined symbols, whereas GNU nm marks them as \"W\".\n\tif $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then\n\t  export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\\''{ if (((\\$ 2 == \"T\") || (\\$ 2 == \"D\") || (\\$ 2 == \"B\") || (\\$ 2 == \"W\")) && (substr(\\$ 3,1,1) != \".\")) { print \\$ 3 } }'\\'' | sort -u > $export_symbols'\n\telse\n\t  export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\\''{ if (((\\$ 2 == \"T\") || (\\$ 2 == \"D\") || (\\$ 2 == \"B\")) && (substr(\\$ 3,1,1) != \".\")) { print \\$ 3 } }'\\'' | sort -u > $export_symbols'\n\tfi\n\taix_use_runtimelinking=no\n\n\t# Test if we are trying to use run time linking or normal\n\t# AIX style linking. If -brtl is somewhere in LDFLAGS, we\n\t# need to do runtime linking.\n\tcase $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)\n\t  for ld_flag in $LDFLAGS; do\n\t  if (test $ld_flag = \"-brtl\" || test $ld_flag = \"-Wl,-brtl\"); then\n\t    aix_use_runtimelinking=yes\n\t    break\n\t  fi\n\t  done\n\t  ;;\n\tesac\n\n\texp_sym_flag='-bexport'\n\tno_entry_flag='-bnoentry'\n      fi\n\n      # When large executables or shared objects are built, AIX ld can\n      # have problems creating the table of contents.  If linking a library\n      # or program results in \"error TOC overflow\" add -mminimal-toc to\n      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not\n      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.\n\n      archive_cmds=''\n      hardcode_direct=yes\n      hardcode_direct_absolute=yes\n      hardcode_libdir_separator=':'\n      link_all_deplibs=yes\n      file_list_spec='${wl}-f,'\n\n      if test \"$GCC\" = yes; then\n\tcase $host_os in aix4.[012]|aix4.[012].*)\n\t# We only want to do this on AIX 4.2 and lower, the check\n\t# below for broken collect2 doesn't work under 4.3+\n\t  collect2name=`${CC} -print-prog-name=collect2`\n\t  if test -f \"$collect2name\" &&\n\t   strings \"$collect2name\" | $GREP resolve_lib_name >/dev/null\n\t  then\n\t  # We have reworked collect2\n\t  :\n\t  else\n\t  # We have old collect2\n\t  hardcode_direct=unsupported\n\t  # It fails to find uninstalled libraries when the uninstalled\n\t  # path is not listed in the libpath.  Setting hardcode_minus_L\n\t  # to unsupported forces relinking\n\t  hardcode_minus_L=yes\n\t  hardcode_libdir_flag_spec='-L$libdir'\n\t  hardcode_libdir_separator=\n\t  fi\n\t  ;;\n\tesac\n\tshared_flag='-shared'\n\tif test \"$aix_use_runtimelinking\" = yes; then\n\t  shared_flag=\"$shared_flag \"'${wl}-G'\n\tfi\n\tlink_all_deplibs=no\n      else\n\t# not using gcc\n\tif test \"$host_cpu\" = ia64; then\n\t# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release\n\t# chokes on -Wl,-G. The following line is correct:\n\t  shared_flag='-G'\n\telse\n\t  if test \"$aix_use_runtimelinking\" = yes; then\n\t    shared_flag='${wl}-G'\n\t  else\n\t    shared_flag='${wl}-bM:SRE'\n\t  fi\n\tfi\n      fi\n\n      export_dynamic_flag_spec='${wl}-bexpall'\n      # It seems that -bexpall does not export symbols beginning with\n      # underscore (_), so it is better to generate a list of symbols to export.\n      always_export_symbols=yes\n      if test \"$aix_use_runtimelinking\" = yes; then\n\t# Warning - without using the other runtime loading flags (-brtl),\n\t# -berok will link without error, but may produce a broken library.\n\tallow_undefined_flag='-berok'\n        # Determine the default libpath from the value encoded in an\n        # empty executable.\n        if test \"${lt_cv_aix_libpath+set}\" = set; then\n  aix_libpath=$lt_cv_aix_libpath\nelse\n  if ${lt_cv_aix_libpath_+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n\nint\nmain ()\n{\n\n  ;\n  return 0;\n}\n_ACEOF\nif ac_fn_c_try_link \"$LINENO\"; then :\n\n  lt_aix_libpath_sed='\n      /Import File Strings/,/^$/ {\n\t  /^0/ {\n\t      s/^0  *\\([^ ]*\\) *$/\\1/\n\t      p\n\t  }\n      }'\n  lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e \"$lt_aix_libpath_sed\"`\n  # Check for a 64-bit object if we didn't find anything.\n  if test -z \"$lt_cv_aix_libpath_\"; then\n    lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e \"$lt_aix_libpath_sed\"`\n  fi\nfi\nrm -f core conftest.err conftest.$ac_objext \\\n    conftest$ac_exeext conftest.$ac_ext\n  if test -z \"$lt_cv_aix_libpath_\"; then\n    lt_cv_aix_libpath_=\"/usr/lib:/lib\"\n  fi\n\nfi\n\n  aix_libpath=$lt_cv_aix_libpath_\nfi\n\n        hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'\"$aix_libpath\"\n        archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '\"\\${wl}$no_entry_flag\"' $compiler_flags `if test \"x${allow_undefined_flag}\" != \"x\"; then func_echo_all \"${wl}${allow_undefined_flag}\"; else :; fi` '\"\\${wl}$exp_sym_flag:\\$export_symbols $shared_flag\"\n      else\n\tif test \"$host_cpu\" = ia64; then\n\t  hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'\n\t  allow_undefined_flag=\"-z nodefs\"\n\t  archive_expsym_cmds=\"\\$CC $shared_flag\"' -o $output_objdir/$soname $libobjs $deplibs '\"\\${wl}$no_entry_flag\"' $compiler_flags ${wl}${allow_undefined_flag} '\"\\${wl}$exp_sym_flag:\\$export_symbols\"\n\telse\n\t # Determine the default libpath from the value encoded in an\n\t # empty executable.\n\t if test \"${lt_cv_aix_libpath+set}\" = set; then\n  aix_libpath=$lt_cv_aix_libpath\nelse\n  if ${lt_cv_aix_libpath_+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n\nint\nmain ()\n{\n\n  ;\n  return 0;\n}\n_ACEOF\nif ac_fn_c_try_link \"$LINENO\"; then :\n\n  lt_aix_libpath_sed='\n      /Import File Strings/,/^$/ {\n\t  /^0/ {\n\t      s/^0  *\\([^ ]*\\) *$/\\1/\n\t      p\n\t  }\n      }'\n  lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e \"$lt_aix_libpath_sed\"`\n  # Check for a 64-bit object if we didn't find anything.\n  if test -z \"$lt_cv_aix_libpath_\"; then\n    lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e \"$lt_aix_libpath_sed\"`\n  fi\nfi\nrm -f core conftest.err conftest.$ac_objext \\\n    conftest$ac_exeext conftest.$ac_ext\n  if test -z \"$lt_cv_aix_libpath_\"; then\n    lt_cv_aix_libpath_=\"/usr/lib:/lib\"\n  fi\n\nfi\n\n  aix_libpath=$lt_cv_aix_libpath_\nfi\n\n\t hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'\"$aix_libpath\"\n\t  # Warning - without using the other run time loading flags,\n\t  # -berok will link without error, but may produce a broken library.\n\t  no_undefined_flag=' ${wl}-bernotok'\n\t  allow_undefined_flag=' ${wl}-berok'\n\t  if test \"$with_gnu_ld\" = yes; then\n\t    # We only use this code for GNU lds that support --whole-archive.\n\t    whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive'\n\t  else\n\t    # Exported symbols can be pulled into shared objects from archives\n\t    whole_archive_flag_spec='$convenience'\n\t  fi\n\t  archive_cmds_need_lc=yes\n\t  # This is similar to how AIX traditionally builds its shared libraries.\n\t  archive_expsym_cmds=\"\\$CC $shared_flag\"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'\n\tfi\n      fi\n      ;;\n\n    amigaos*)\n      case $host_cpu in\n      powerpc)\n            # see comment about AmigaOS4 .so support\n            archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'\n            archive_expsym_cmds=''\n        ;;\n      m68k)\n            archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO \"#define NAME $libname\" > $output_objdir/a2ixlibrary.data~$ECHO \"#define LIBRARY_ID 1\" >> $output_objdir/a2ixlibrary.data~$ECHO \"#define VERSION $major\" >> $output_objdir/a2ixlibrary.data~$ECHO \"#define REVISION $revision\" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'\n            hardcode_libdir_flag_spec='-L$libdir'\n            hardcode_minus_L=yes\n        ;;\n      esac\n      ;;\n\n    bsdi[45]*)\n      export_dynamic_flag_spec=-rdynamic\n      ;;\n\n    cygwin* | mingw* | pw32* | cegcc*)\n      # When not using gcc, we currently assume that we are using\n      # Microsoft Visual C++.\n      # hardcode_libdir_flag_spec is actually meaningless, as there is\n      # no search path for DLLs.\n      case $cc_basename in\n      cl*)\n\t# Native MSVC\n\thardcode_libdir_flag_spec=' '\n\tallow_undefined_flag=unsupported\n\talways_export_symbols=yes\n\tfile_list_spec='@'\n\t# Tell ltmain to make .lib files, not .a files.\n\tlibext=lib\n\t# Tell ltmain to make .dll files, not .so files.\n\tshrext_cmds=\".dll\"\n\t# FIXME: Setting linknames here is a bad hack.\n\tarchive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='\n\tarchive_expsym_cmds='if test \"x`$SED 1q $export_symbols`\" = xEXPORTS; then\n\t    sed -n -e 's/\\\\\\\\\\\\\\(.*\\\\\\\\\\\\\\)/-link\\\\\\ -EXPORT:\\\\\\\\\\\\\\1/' -e '1\\\\\\!p' < $export_symbols > $output_objdir/$soname.exp;\n\t  else\n\t    sed -e 's/\\\\\\\\\\\\\\(.*\\\\\\\\\\\\\\)/-link\\\\\\ -EXPORT:\\\\\\\\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;\n\t  fi~\n\t  $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs \"@$tool_output_objdir$soname.exp\" -Wl,-DLL,-IMPLIB:\"$tool_output_objdir$libname.dll.lib\"~\n\t  linknames='\n\t# The linker will not automatically build a static lib if we build a DLL.\n\t# _LT_TAGVAR(old_archive_from_new_cmds, )='true'\n\tenable_shared_with_static_runtimes=yes\n\texclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'\n\texport_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\\''/^[BCDGRS][ ]/s/.*[ ]\\([^ ]*\\)/\\1,DATA/'\\'' | $SED -e '\\''/^[AITW][ ]/s/.*[ ]//'\\'' | sort | uniq > $export_symbols'\n\t# Don't use ranlib\n\told_postinstall_cmds='chmod 644 $oldlib'\n\tpostlink_cmds='lt_outputfile=\"@OUTPUT@\"~\n\t  lt_tool_outputfile=\"@TOOL_OUTPUT@\"~\n\t  case $lt_outputfile in\n\t    *.exe|*.EXE) ;;\n\t    *)\n\t      lt_outputfile=\"$lt_outputfile.exe\"\n\t      lt_tool_outputfile=\"$lt_tool_outputfile.exe\"\n\t      ;;\n\t  esac~\n\t  if test \"$MANIFEST_TOOL\" != \":\" && test -f \"$lt_outputfile.manifest\"; then\n\t    $MANIFEST_TOOL -manifest \"$lt_tool_outputfile.manifest\" -outputresource:\"$lt_tool_outputfile\" || exit 1;\n\t    $RM \"$lt_outputfile.manifest\";\n\t  fi'\n\t;;\n      *)\n\t# Assume MSVC wrapper\n\thardcode_libdir_flag_spec=' '\n\tallow_undefined_flag=unsupported\n\t# Tell ltmain to make .lib files, not .a files.\n\tlibext=lib\n\t# Tell ltmain to make .dll files, not .so files.\n\tshrext_cmds=\".dll\"\n\t# FIXME: Setting linknames here is a bad hack.\n\tarchive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all \"$deplibs\" | $SED '\\''s/ -lc$//'\\''` -link -dll~linknames='\n\t# The linker will automatically build a .lib file if we build a DLL.\n\told_archive_from_new_cmds='true'\n\t# FIXME: Should let the user specify the lib program.\n\told_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'\n\tenable_shared_with_static_runtimes=yes\n\t;;\n      esac\n      ;;\n\n    darwin* | rhapsody*)\n\n\n  archive_cmds_need_lc=no\n  hardcode_direct=no\n  hardcode_automatic=yes\n  hardcode_shlibpath_var=unsupported\n  if test \"$lt_cv_ld_force_load\" = \"yes\"; then\n    whole_archive_flag_spec='`for conv in $convenience\\\"\\\"; do test  -n \\\"$conv\\\" && new_convenience=\\\"$new_convenience ${wl}-force_load,$conv\\\"; done; func_echo_all \\\"$new_convenience\\\"`'\n\n  else\n    whole_archive_flag_spec=''\n  fi\n  link_all_deplibs=yes\n  allow_undefined_flag=\"$_lt_dar_allow_undefined\"\n  case $cc_basename in\n     ifort*) _lt_dar_can_shared=yes ;;\n     *) _lt_dar_can_shared=$GCC ;;\n  esac\n  if test \"$_lt_dar_can_shared\" = \"yes\"; then\n    output_verbose_link_cmd=func_echo_all\n    archive_cmds=\"\\$CC -dynamiclib \\$allow_undefined_flag -o \\$lib \\$libobjs \\$deplibs \\$compiler_flags -install_name \\$rpath/\\$soname \\$verstring $_lt_dar_single_mod${_lt_dsymutil}\"\n    module_cmds=\"\\$CC \\$allow_undefined_flag -o \\$lib -bundle \\$libobjs \\$deplibs \\$compiler_flags${_lt_dsymutil}\"\n    archive_expsym_cmds=\"sed 's,^,_,' < \\$export_symbols > \\$output_objdir/\\${libname}-symbols.expsym~\\$CC -dynamiclib \\$allow_undefined_flag -o \\$lib \\$libobjs \\$deplibs \\$compiler_flags -install_name \\$rpath/\\$soname \\$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}\"\n    module_expsym_cmds=\"sed -e 's,^,_,' < \\$export_symbols > \\$output_objdir/\\${libname}-symbols.expsym~\\$CC \\$allow_undefined_flag -o \\$lib -bundle \\$libobjs \\$deplibs \\$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}\"\n\n  else\n  ld_shlibs=no\n  fi\n\n      ;;\n\n    dgux*)\n      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'\n      hardcode_libdir_flag_spec='-L$libdir'\n      hardcode_shlibpath_var=no\n      ;;\n\n    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor\n    # support.  Future versions do this automatically, but an explicit c++rt0.o\n    # does not break anything, and helps significantly (at the cost of a little\n    # extra space).\n    freebsd2.2*)\n      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'\n      hardcode_libdir_flag_spec='-R$libdir'\n      hardcode_direct=yes\n      hardcode_shlibpath_var=no\n      ;;\n\n    # Unfortunately, older versions of FreeBSD 2 do not have this feature.\n    freebsd2.*)\n      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'\n      hardcode_direct=yes\n      hardcode_minus_L=yes\n      hardcode_shlibpath_var=no\n      ;;\n\n    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.\n    freebsd* | dragonfly*)\n      archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'\n      hardcode_libdir_flag_spec='-R$libdir'\n      hardcode_direct=yes\n      hardcode_shlibpath_var=no\n      ;;\n\n    hpux9*)\n      if test \"$GCC\" = yes; then\n\tarchive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'\n      else\n\tarchive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'\n      fi\n      hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'\n      hardcode_libdir_separator=:\n      hardcode_direct=yes\n\n      # hardcode_minus_L: Not really in the search PATH,\n      # but as the default location of the library.\n      hardcode_minus_L=yes\n      export_dynamic_flag_spec='${wl}-E'\n      ;;\n\n    hpux10*)\n      if test \"$GCC\" = yes && test \"$with_gnu_ld\" = no; then\n\tarchive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'\n      else\n\tarchive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'\n      fi\n      if test \"$with_gnu_ld\" = no; then\n\thardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'\n\thardcode_libdir_separator=:\n\thardcode_direct=yes\n\thardcode_direct_absolute=yes\n\texport_dynamic_flag_spec='${wl}-E'\n\t# hardcode_minus_L: Not really in the search PATH,\n\t# but as the default location of the library.\n\thardcode_minus_L=yes\n      fi\n      ;;\n\n    hpux11*)\n      if test \"$GCC\" = yes && test \"$with_gnu_ld\" = no; then\n\tcase $host_cpu in\n\thppa*64*)\n\t  archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'\n\t  ;;\n\tia64*)\n\t  archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'\n\t  ;;\n\t*)\n\t  archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'\n\t  ;;\n\tesac\n      else\n\tcase $host_cpu in\n\thppa*64*)\n\t  archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'\n\t  ;;\n\tia64*)\n\t  archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'\n\t  ;;\n\t*)\n\n\t  # Older versions of the 11.00 compiler do not understand -b yet\n\t  # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)\n\t  { $as_echo \"$as_me:${as_lineno-$LINENO}: checking if $CC understands -b\" >&5\n$as_echo_n \"checking if $CC understands -b... \" >&6; }\nif ${lt_cv_prog_compiler__b+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  lt_cv_prog_compiler__b=no\n   save_LDFLAGS=\"$LDFLAGS\"\n   LDFLAGS=\"$LDFLAGS -b\"\n   echo \"$lt_simple_link_test_code\" > conftest.$ac_ext\n   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then\n     # The linker can only warn and ignore the option if not recognized\n     # So say no if there are warnings\n     if test -s conftest.err; then\n       # Append any errors to the config.log.\n       cat conftest.err 1>&5\n       $ECHO \"$_lt_linker_boilerplate\" | $SED '/^$/d' > conftest.exp\n       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2\n       if diff conftest.exp conftest.er2 >/dev/null; then\n         lt_cv_prog_compiler__b=yes\n       fi\n     else\n       lt_cv_prog_compiler__b=yes\n     fi\n   fi\n   $RM -r conftest*\n   LDFLAGS=\"$save_LDFLAGS\"\n\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b\" >&5\n$as_echo \"$lt_cv_prog_compiler__b\" >&6; }\n\nif test x\"$lt_cv_prog_compiler__b\" = xyes; then\n    archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'\nelse\n    archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'\nfi\n\n\t  ;;\n\tesac\n      fi\n      if test \"$with_gnu_ld\" = no; then\n\thardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'\n\thardcode_libdir_separator=:\n\n\tcase $host_cpu in\n\thppa*64*|ia64*)\n\t  hardcode_direct=no\n\t  hardcode_shlibpath_var=no\n\t  ;;\n\t*)\n\t  hardcode_direct=yes\n\t  hardcode_direct_absolute=yes\n\t  export_dynamic_flag_spec='${wl}-E'\n\n\t  # hardcode_minus_L: Not really in the search PATH,\n\t  # but as the default location of the library.\n\t  hardcode_minus_L=yes\n\t  ;;\n\tesac\n      fi\n      ;;\n\n    irix5* | irix6* | nonstopux*)\n      if test \"$GCC\" = yes; then\n\tarchive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n \"$verstring\" && func_echo_all \"${wl}-set_version ${wl}$verstring\"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'\n\t# Try to use the -exported_symbol ld option, if it does not\n\t# work, assume that -exports_file does not work either and\n\t# implicitly export all symbols.\n\t# This should be the same for all languages, so no per-tag cache variable.\n\t{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol\" >&5\n$as_echo_n \"checking whether the $host_os linker accepts -exported_symbol... \" >&6; }\nif ${lt_cv_irix_exported_symbol+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  save_LDFLAGS=\"$LDFLAGS\"\n\t   LDFLAGS=\"$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null\"\n\t   cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\nint foo (void) { return 0; }\n_ACEOF\nif ac_fn_c_try_link \"$LINENO\"; then :\n  lt_cv_irix_exported_symbol=yes\nelse\n  lt_cv_irix_exported_symbol=no\nfi\nrm -f core conftest.err conftest.$ac_objext \\\n    conftest$ac_exeext conftest.$ac_ext\n           LDFLAGS=\"$save_LDFLAGS\"\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol\" >&5\n$as_echo \"$lt_cv_irix_exported_symbol\" >&6; }\n\tif test \"$lt_cv_irix_exported_symbol\" = yes; then\n          archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n \"$verstring\" && func_echo_all \"${wl}-set_version ${wl}$verstring\"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'\n\tfi\n      else\n\tarchive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n \"$verstring\" && func_echo_all \"-set_version $verstring\"` -update_registry ${output_objdir}/so_locations -o $lib'\n\tarchive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n \"$verstring\" && func_echo_all \"-set_version $verstring\"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'\n      fi\n      archive_cmds_need_lc='no'\n      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'\n      hardcode_libdir_separator=:\n      inherit_rpath=yes\n      link_all_deplibs=yes\n      ;;\n\n    netbsd* | netbsdelf*-gnu)\n      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then\n\tarchive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out\n      else\n\tarchive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF\n      fi\n      hardcode_libdir_flag_spec='-R$libdir'\n      hardcode_direct=yes\n      hardcode_shlibpath_var=no\n      ;;\n\n    newsos6)\n      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'\n      hardcode_direct=yes\n      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'\n      hardcode_libdir_separator=:\n      hardcode_shlibpath_var=no\n      ;;\n\n    *nto* | *qnx*)\n      ;;\n\n    openbsd*)\n      if test -f /usr/libexec/ld.so; then\n\thardcode_direct=yes\n\thardcode_shlibpath_var=no\n\thardcode_direct_absolute=yes\n\tif test -z \"`echo __ELF__ | $CC -E - | $GREP __ELF__`\" || test \"$host_os-$host_cpu\" = \"openbsd2.8-powerpc\"; then\n\t  archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'\n\t  archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'\n\t  hardcode_libdir_flag_spec='${wl}-rpath,$libdir'\n\t  export_dynamic_flag_spec='${wl}-E'\n\telse\n\t  case $host_os in\n\t   openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)\n\t     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'\n\t     hardcode_libdir_flag_spec='-R$libdir'\n\t     ;;\n\t   *)\n\t     archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'\n\t     hardcode_libdir_flag_spec='${wl}-rpath,$libdir'\n\t     ;;\n\t  esac\n\tfi\n      else\n\tld_shlibs=no\n      fi\n      ;;\n\n    os2*)\n      hardcode_libdir_flag_spec='-L$libdir'\n      hardcode_minus_L=yes\n      allow_undefined_flag=unsupported\n      archive_cmds='$ECHO \"LIBRARY $libname INITINSTANCE\" > $output_objdir/$libname.def~$ECHO \"DESCRIPTION \\\"$libname\\\"\" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo \" SINGLE NONSHARED\" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'\n      old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'\n      ;;\n\n    osf3*)\n      if test \"$GCC\" = yes; then\n\tallow_undefined_flag=' ${wl}-expect_unresolved ${wl}\\*'\n\tarchive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n \"$verstring\" && func_echo_all \"${wl}-set_version ${wl}$verstring\"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'\n      else\n\tallow_undefined_flag=' -expect_unresolved \\*'\n\tarchive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n \"$verstring\" && func_echo_all \"-set_version $verstring\"` -update_registry ${output_objdir}/so_locations -o $lib'\n      fi\n      archive_cmds_need_lc='no'\n      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'\n      hardcode_libdir_separator=:\n      ;;\n\n    osf4* | osf5*)\t# as osf3* with the addition of -msym flag\n      if test \"$GCC\" = yes; then\n\tallow_undefined_flag=' ${wl}-expect_unresolved ${wl}\\*'\n\tarchive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n \"$verstring\" && func_echo_all \"${wl}-set_version ${wl}$verstring\"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'\n\thardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'\n      else\n\tallow_undefined_flag=' -expect_unresolved \\*'\n\tarchive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n \"$verstring\" && func_echo_all \"-set_version $verstring\"` -update_registry ${output_objdir}/so_locations -o $lib'\n\tarchive_expsym_cmds='for i in `cat $export_symbols`; do printf \"%s %s\\\\n\" -exported_symbol \"\\$i\" >> $lib.exp; done; printf \"%s\\\\n\" \"-hidden\">> $lib.exp~\n\t$CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n \"$verstring\" && $ECHO \"-set_version $verstring\"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'\n\n\t# Both c and cxx compiler support -rpath directly\n\thardcode_libdir_flag_spec='-rpath $libdir'\n      fi\n      archive_cmds_need_lc='no'\n      hardcode_libdir_separator=:\n      ;;\n\n    solaris*)\n      no_undefined_flag=' -z defs'\n      if test \"$GCC\" = yes; then\n\twlarc='${wl}'\n\tarchive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'\n\tarchive_expsym_cmds='echo \"{ global:\" > $lib.exp~cat $export_symbols | $SED -e \"s/\\(.*\\)/\\1;/\" >> $lib.exp~echo \"local: *; };\" >> $lib.exp~\n\t  $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'\n      else\n\tcase `$CC -V 2>&1` in\n\t*\"Compilers 5.0\"*)\n\t  wlarc=''\n\t  archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'\n\t  archive_expsym_cmds='echo \"{ global:\" > $lib.exp~cat $export_symbols | $SED -e \"s/\\(.*\\)/\\1;/\" >> $lib.exp~echo \"local: *; };\" >> $lib.exp~\n\t  $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'\n\t  ;;\n\t*)\n\t  wlarc='${wl}'\n\t  archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'\n\t  archive_expsym_cmds='echo \"{ global:\" > $lib.exp~cat $export_symbols | $SED -e \"s/\\(.*\\)/\\1;/\" >> $lib.exp~echo \"local: *; };\" >> $lib.exp~\n\t  $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'\n\t  ;;\n\tesac\n      fi\n      hardcode_libdir_flag_spec='-R$libdir'\n      hardcode_shlibpath_var=no\n      case $host_os in\n      solaris2.[0-5] | solaris2.[0-5].*) ;;\n      *)\n\t# The compiler driver will combine and reorder linker options,\n\t# but understands `-z linker_flag'.  GCC discards it without `$wl',\n\t# but is careful enough not to reorder.\n\t# Supported since Solaris 2.6 (maybe 2.5.1?)\n\tif test \"$GCC\" = yes; then\n\t  whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'\n\telse\n\t  whole_archive_flag_spec='-z allextract$convenience -z defaultextract'\n\tfi\n\t;;\n      esac\n      link_all_deplibs=yes\n      ;;\n\n    sunos4*)\n      if test \"x$host_vendor\" = xsequent; then\n\t# Use $CC to link under sequent, because it throws in some extra .o\n\t# files that make .init and .fini sections work.\n\tarchive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'\n      else\n\tarchive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'\n      fi\n      hardcode_libdir_flag_spec='-L$libdir'\n      hardcode_direct=yes\n      hardcode_minus_L=yes\n      hardcode_shlibpath_var=no\n      ;;\n\n    sysv4)\n      case $host_vendor in\n\tsni)\n\t  archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'\n\t  hardcode_direct=yes # is this really true???\n\t;;\n\tsiemens)\n\t  ## LD is ld it makes a PLAMLIB\n\t  ## CC just makes a GrossModule.\n\t  archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'\n\t  reload_cmds='$CC -r -o $output$reload_objs'\n\t  hardcode_direct=no\n        ;;\n\tmotorola)\n\t  archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'\n\t  hardcode_direct=no #Motorola manual says yes, but my tests say they lie\n\t;;\n      esac\n      runpath_var='LD_RUN_PATH'\n      hardcode_shlibpath_var=no\n      ;;\n\n    sysv4.3*)\n      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'\n      hardcode_shlibpath_var=no\n      export_dynamic_flag_spec='-Bexport'\n      ;;\n\n    sysv4*MP*)\n      if test -d /usr/nec; then\n\tarchive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'\n\thardcode_shlibpath_var=no\n\trunpath_var=LD_RUN_PATH\n\thardcode_runpath_var=yes\n\tld_shlibs=yes\n      fi\n      ;;\n\n    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)\n      no_undefined_flag='${wl}-z,text'\n      archive_cmds_need_lc=no\n      hardcode_shlibpath_var=no\n      runpath_var='LD_RUN_PATH'\n\n      if test \"$GCC\" = yes; then\n\tarchive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'\n\tarchive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'\n      else\n\tarchive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'\n\tarchive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'\n      fi\n      ;;\n\n    sysv5* | sco3.2v5* | sco5v6*)\n      # Note: We can NOT use -z defs as we might desire, because we do not\n      # link with -lc, and that would cause any symbols used from libc to\n      # always be unresolved, which means just about no library would\n      # ever link correctly.  If we're not using GNU ld we use -z text\n      # though, which does catch some bad symbols but isn't as heavy-handed\n      # as -z defs.\n      no_undefined_flag='${wl}-z,text'\n      allow_undefined_flag='${wl}-z,nodefs'\n      archive_cmds_need_lc=no\n      hardcode_shlibpath_var=no\n      hardcode_libdir_flag_spec='${wl}-R,$libdir'\n      hardcode_libdir_separator=':'\n      link_all_deplibs=yes\n      export_dynamic_flag_spec='${wl}-Bexport'\n      runpath_var='LD_RUN_PATH'\n\n      if test \"$GCC\" = yes; then\n\tarchive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'\n\tarchive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'\n      else\n\tarchive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'\n\tarchive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'\n      fi\n      ;;\n\n    uts4*)\n      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'\n      hardcode_libdir_flag_spec='-L$libdir'\n      hardcode_shlibpath_var=no\n      ;;\n\n    *)\n      ld_shlibs=no\n      ;;\n    esac\n\n    if test x$host_vendor = xsni; then\n      case $host in\n      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)\n\texport_dynamic_flag_spec='${wl}-Blargedynsym'\n\t;;\n      esac\n    fi\n  fi\n\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ld_shlibs\" >&5\n$as_echo \"$ld_shlibs\" >&6; }\ntest \"$ld_shlibs\" = no && can_build_shared=no\n\nwith_gnu_ld=$with_gnu_ld\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n#\n# Do we need to explicitly link libc?\n#\ncase \"x$archive_cmds_need_lc\" in\nx|xyes)\n  # Assume -lc should be added\n  archive_cmds_need_lc=yes\n\n  if test \"$enable_shared\" = yes && test \"$GCC\" = yes; then\n    case $archive_cmds in\n    *'~'*)\n      # FIXME: we may have to deal with multi-command sequences.\n      ;;\n    '$CC '*)\n      # Test whether the compiler implicitly links with -lc since on some\n      # systems, -lgcc has to come before -lc. If gcc already passes -lc\n      # to ld, don't add -lc before -lgcc.\n      { $as_echo \"$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in\" >&5\n$as_echo_n \"checking whether -lc should be explicitly linked in... \" >&6; }\nif ${lt_cv_archive_cmds_need_lc+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  $RM conftest*\n\techo \"$lt_simple_compile_test_code\" > conftest.$ac_ext\n\n\tif { { eval echo \"\\\"\\$as_me\\\":${as_lineno-$LINENO}: \\\"$ac_compile\\\"\"; } >&5\n  (eval $ac_compile) 2>&5\n  ac_status=$?\n  $as_echo \"$as_me:${as_lineno-$LINENO}: \\$? = $ac_status\" >&5\n  test $ac_status = 0; } 2>conftest.err; then\n\t  soname=conftest\n\t  lib=conftest\n\t  libobjs=conftest.$ac_objext\n\t  deplibs=\n\t  wl=$lt_prog_compiler_wl\n\t  pic_flag=$lt_prog_compiler_pic\n\t  compiler_flags=-v\n\t  linker_flags=-v\n\t  verstring=\n\t  output_objdir=.\n\t  libname=conftest\n\t  lt_save_allow_undefined_flag=$allow_undefined_flag\n\t  allow_undefined_flag=\n\t  if { { eval echo \"\\\"\\$as_me\\\":${as_lineno-$LINENO}: \\\"$archive_cmds 2\\>\\&1 \\| $GREP \\\" -lc \\\" \\>/dev/null 2\\>\\&1\\\"\"; } >&5\n  (eval $archive_cmds 2\\>\\&1 \\| $GREP \\\" -lc \\\" \\>/dev/null 2\\>\\&1) 2>&5\n  ac_status=$?\n  $as_echo \"$as_me:${as_lineno-$LINENO}: \\$? = $ac_status\" >&5\n  test $ac_status = 0; }\n\t  then\n\t    lt_cv_archive_cmds_need_lc=no\n\t  else\n\t    lt_cv_archive_cmds_need_lc=yes\n\t  fi\n\t  allow_undefined_flag=$lt_save_allow_undefined_flag\n\telse\n\t  cat conftest.err 1>&5\n\tfi\n\t$RM conftest*\n\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc\" >&5\n$as_echo \"$lt_cv_archive_cmds_need_lc\" >&6; }\n      archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc\n      ;;\n    esac\n  fi\n  ;;\nesac\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics\" >&5\n$as_echo_n \"checking dynamic linker characteristics... \" >&6; }\n\nif test \"$GCC\" = yes; then\n  case $host_os in\n    darwin*) lt_awk_arg=\"/^libraries:/,/LR/\" ;;\n    *) lt_awk_arg=\"/^libraries:/\" ;;\n  esac\n  case $host_os in\n    mingw* | cegcc*) lt_sed_strip_eq=\"s,=\\([A-Za-z]:\\),\\1,g\" ;;\n    *) lt_sed_strip_eq=\"s,=/,/,g\" ;;\n  esac\n  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e \"s/^libraries://\" -e $lt_sed_strip_eq`\n  case $lt_search_path_spec in\n  *\\;*)\n    # if the path contains \";\" then we assume it to be the separator\n    # otherwise default to the standard path separator (i.e. \":\") - it is\n    # assumed that no part of a normal pathname contains \";\" but that should\n    # okay in the real world where \";\" in dirpaths is itself problematic.\n    lt_search_path_spec=`$ECHO \"$lt_search_path_spec\" | $SED 's/;/ /g'`\n    ;;\n  *)\n    lt_search_path_spec=`$ECHO \"$lt_search_path_spec\" | $SED \"s/$PATH_SEPARATOR/ /g\"`\n    ;;\n  esac\n  # Ok, now we have the path, separated by spaces, we can step through it\n  # and add multilib dir if necessary.\n  lt_tmp_lt_search_path_spec=\n  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`\n  for lt_sys_path in $lt_search_path_spec; do\n    if test -d \"$lt_sys_path/$lt_multi_os_dir\"; then\n      lt_tmp_lt_search_path_spec=\"$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir\"\n    else\n      test -d \"$lt_sys_path\" && \\\n\tlt_tmp_lt_search_path_spec=\"$lt_tmp_lt_search_path_spec $lt_sys_path\"\n    fi\n  done\n  lt_search_path_spec=`$ECHO \"$lt_tmp_lt_search_path_spec\" | awk '\nBEGIN {RS=\" \"; FS=\"/|\\n\";} {\n  lt_foo=\"\";\n  lt_count=0;\n  for (lt_i = NF; lt_i > 0; lt_i--) {\n    if ($lt_i != \"\" && $lt_i != \".\") {\n      if ($lt_i == \"..\") {\n        lt_count++;\n      } else {\n        if (lt_count == 0) {\n          lt_foo=\"/\" $lt_i lt_foo;\n        } else {\n          lt_count--;\n        }\n      }\n    }\n  }\n  if (lt_foo != \"\") { lt_freq[lt_foo]++; }\n  if (lt_freq[lt_foo] == 1) { print lt_foo; }\n}'`\n  # AWK program above erroneously prepends '/' to C:/dos/paths\n  # for these hosts.\n  case $host_os in\n    mingw* | cegcc*) lt_search_path_spec=`$ECHO \"$lt_search_path_spec\" |\\\n      $SED 's,/\\([A-Za-z]:\\),\\1,g'` ;;\n  esac\n  sys_lib_search_path_spec=`$ECHO \"$lt_search_path_spec\" | $lt_NL2SP`\nelse\n  sys_lib_search_path_spec=\"/lib /usr/lib /usr/local/lib\"\nfi\nlibrary_names_spec=\nlibname_spec='lib$name'\nsoname_spec=\nshrext_cmds=\".so\"\npostinstall_cmds=\npostuninstall_cmds=\nfinish_cmds=\nfinish_eval=\nshlibpath_var=\nshlibpath_overrides_runpath=unknown\nversion_type=none\ndynamic_linker=\"$host_os ld.so\"\nsys_lib_dlsearch_path_spec=\"/lib /usr/lib\"\nneed_lib_prefix=unknown\nhardcode_into_libs=no\n\n# when you set need_version to no, make sure it does not cause -set_version\n# flags to be left without arguments\nneed_version=unknown\n\ncase $host_os in\naix3*)\n  version_type=linux # correct to gnu/linux during the next big refactor\n  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'\n  shlibpath_var=LIBPATH\n\n  # AIX 3 has no versioning support, so we append a major version to the name.\n  soname_spec='${libname}${release}${shared_ext}$major'\n  ;;\n\naix[4-9]*)\n  version_type=linux # correct to gnu/linux during the next big refactor\n  need_lib_prefix=no\n  need_version=no\n  hardcode_into_libs=yes\n  if test \"$host_cpu\" = ia64; then\n    # AIX 5 supports IA64\n    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'\n    shlibpath_var=LD_LIBRARY_PATH\n  else\n    # With GCC up to 2.95.x, collect2 would create an import file\n    # for dependence libraries.  The import file would start with\n    # the line `#! .'.  This would cause the generated library to\n    # depend on `.', always an invalid library.  This was fixed in\n    # development snapshots of GCC prior to 3.0.\n    case $host_os in\n      aix4 | aix4.[01] | aix4.[01].*)\n      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'\n\t   echo ' yes '\n\t   echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then\n\t:\n      else\n\tcan_build_shared=no\n      fi\n      ;;\n    esac\n    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct\n    # soname into executable. Probably we can add versioning support to\n    # collect2, so additional links can be useful in future.\n    if test \"$aix_use_runtimelinking\" = yes; then\n      # If using run time linking (on AIX 4.2 or later) use lib<name>.so\n      # instead of lib<name>.a to let people know that these are not\n      # typical AIX shared libraries.\n      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n    else\n      # We preserve .a as extension for shared libraries through AIX4.2\n      # and later when we are not doing run time linking.\n      library_names_spec='${libname}${release}.a $libname.a'\n      soname_spec='${libname}${release}${shared_ext}$major'\n    fi\n    shlibpath_var=LIBPATH\n  fi\n  ;;\n\namigaos*)\n  case $host_cpu in\n  powerpc)\n    # Since July 2007 AmigaOS4 officially supports .so libraries.\n    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.\n    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n    ;;\n  m68k)\n    library_names_spec='$libname.ixlibrary $libname.a'\n    # Create ${libname}_ixlibrary.a entries in /sys/libs.\n    finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all \"$lib\" | $SED '\\''s%^.*/\\([^/]*\\)\\.ixlibrary$%\\1%'\\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show \"cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a\"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'\n    ;;\n  esac\n  ;;\n\nbeos*)\n  library_names_spec='${libname}${shared_ext}'\n  dynamic_linker=\"$host_os ld.so\"\n  shlibpath_var=LIBRARY_PATH\n  ;;\n\nbsdi[45]*)\n  version_type=linux # correct to gnu/linux during the next big refactor\n  need_version=no\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  finish_cmds='PATH=\"\\$PATH:/sbin\" ldconfig $libdir'\n  shlibpath_var=LD_LIBRARY_PATH\n  sys_lib_search_path_spec=\"/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib\"\n  sys_lib_dlsearch_path_spec=\"/shlib /usr/lib /usr/local/lib\"\n  # the default ld.so.conf also contains /usr/contrib/lib and\n  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow\n  # libtool to hard-code these into programs\n  ;;\n\ncygwin* | mingw* | pw32* | cegcc*)\n  version_type=windows\n  shrext_cmds=\".dll\"\n  need_version=no\n  need_lib_prefix=no\n\n  case $GCC,$cc_basename in\n  yes,*)\n    # gcc\n    library_names_spec='$libname.dll.a'\n    # DLL is installed to $(libdir)/../bin by postinstall_cmds\n    postinstall_cmds='base_file=`basename \\${file}`~\n      dlpath=`$SHELL 2>&1 -c '\\''. $dir/'\\''\\${base_file}'\\''i; echo \\$dlname'\\''`~\n      dldir=$destdir/`dirname \\$dlpath`~\n      test -d \\$dldir || mkdir -p \\$dldir~\n      $install_prog $dir/$dlname \\$dldir/$dlname~\n      chmod a+x \\$dldir/$dlname~\n      if test -n '\\''$stripme'\\'' && test -n '\\''$striplib'\\''; then\n        eval '\\''$striplib \\$dldir/$dlname'\\'' || exit \\$?;\n      fi'\n    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\\''. $file; echo \\$dlname'\\''`~\n      dlpath=$dir/\\$dldll~\n       $RM \\$dlpath'\n    shlibpath_overrides_runpath=yes\n\n    case $host_os in\n    cygwin*)\n      # Cygwin DLLs use 'cyg' prefix rather than 'lib'\n      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'\n\n      sys_lib_search_path_spec=\"$sys_lib_search_path_spec /usr/lib/w32api\"\n      ;;\n    mingw* | cegcc*)\n      # MinGW DLLs use traditional 'lib' prefix\n      soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'\n      ;;\n    pw32*)\n      # pw32 DLLs use 'pw' prefix rather than 'lib'\n      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'\n      ;;\n    esac\n    dynamic_linker='Win32 ld.exe'\n    ;;\n\n  *,cl*)\n    # Native MSVC\n    libname_spec='$name'\n    soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'\n    library_names_spec='${libname}.dll.lib'\n\n    case $build_os in\n    mingw*)\n      sys_lib_search_path_spec=\n      lt_save_ifs=$IFS\n      IFS=';'\n      for lt_path in $LIB\n      do\n        IFS=$lt_save_ifs\n        # Let DOS variable expansion print the short 8.3 style file name.\n        lt_path=`cd \"$lt_path\" 2>/dev/null && cmd //C \"for %i in (\".\") do @echo %~si\"`\n        sys_lib_search_path_spec=\"$sys_lib_search_path_spec $lt_path\"\n      done\n      IFS=$lt_save_ifs\n      # Convert to MSYS style.\n      sys_lib_search_path_spec=`$ECHO \"$sys_lib_search_path_spec\" | sed -e 's|\\\\\\\\|/|g' -e 's| \\\\([a-zA-Z]\\\\):| /\\\\1|g' -e 's|^ ||'`\n      ;;\n    cygwin*)\n      # Convert to unix form, then to dos form, then back to unix form\n      # but this time dos style (no spaces!) so that the unix form looks\n      # like /cygdrive/c/PROGRA~1:/cygdr...\n      sys_lib_search_path_spec=`cygpath --path --unix \"$LIB\"`\n      sys_lib_search_path_spec=`cygpath --path --dos \"$sys_lib_search_path_spec\" 2>/dev/null`\n      sys_lib_search_path_spec=`cygpath --path --unix \"$sys_lib_search_path_spec\" | $SED -e \"s/$PATH_SEPARATOR/ /g\"`\n      ;;\n    *)\n      sys_lib_search_path_spec=\"$LIB\"\n      if $ECHO \"$sys_lib_search_path_spec\" | $GREP ';[c-zC-Z]:/' >/dev/null; then\n        # It is most probably a Windows format PATH.\n        sys_lib_search_path_spec=`$ECHO \"$sys_lib_search_path_spec\" | $SED -e 's/;/ /g'`\n      else\n        sys_lib_search_path_spec=`$ECHO \"$sys_lib_search_path_spec\" | $SED -e \"s/$PATH_SEPARATOR/ /g\"`\n      fi\n      # FIXME: find the short name or the path components, as spaces are\n      # common. (e.g. \"Program Files\" -> \"PROGRA~1\")\n      ;;\n    esac\n\n    # DLL is installed to $(libdir)/../bin by postinstall_cmds\n    postinstall_cmds='base_file=`basename \\${file}`~\n      dlpath=`$SHELL 2>&1 -c '\\''. $dir/'\\''\\${base_file}'\\''i; echo \\$dlname'\\''`~\n      dldir=$destdir/`dirname \\$dlpath`~\n      test -d \\$dldir || mkdir -p \\$dldir~\n      $install_prog $dir/$dlname \\$dldir/$dlname'\n    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\\''. $file; echo \\$dlname'\\''`~\n      dlpath=$dir/\\$dldll~\n       $RM \\$dlpath'\n    shlibpath_overrides_runpath=yes\n    dynamic_linker='Win32 link.exe'\n    ;;\n\n  *)\n    # Assume MSVC wrapper\n    library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'\n    dynamic_linker='Win32 ld.exe'\n    ;;\n  esac\n  # FIXME: first we should search . and the directory the executable is in\n  shlibpath_var=PATH\n  ;;\n\ndarwin* | rhapsody*)\n  dynamic_linker=\"$host_os dyld\"\n  version_type=darwin\n  need_lib_prefix=no\n  need_version=no\n  library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'\n  soname_spec='${libname}${release}${major}$shared_ext'\n  shlibpath_overrides_runpath=yes\n  shlibpath_var=DYLD_LIBRARY_PATH\n  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'\n\n  sys_lib_search_path_spec=\"$sys_lib_search_path_spec /usr/local/lib\"\n  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'\n  ;;\n\ndgux*)\n  version_type=linux # correct to gnu/linux during the next big refactor\n  need_lib_prefix=no\n  need_version=no\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  shlibpath_var=LD_LIBRARY_PATH\n  ;;\n\nfreebsd* | dragonfly*)\n  # DragonFly does not have aout.  When/if they implement a new\n  # versioning mechanism, adjust this.\n  if test -x /usr/bin/objformat; then\n    objformat=`/usr/bin/objformat`\n  else\n    case $host_os in\n    freebsd[23].*) objformat=aout ;;\n    *) objformat=elf ;;\n    esac\n  fi\n  version_type=freebsd-$objformat\n  case $version_type in\n    freebsd-elf*)\n      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'\n      need_version=no\n      need_lib_prefix=no\n      ;;\n    freebsd-*)\n      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'\n      need_version=yes\n      ;;\n  esac\n  shlibpath_var=LD_LIBRARY_PATH\n  case $host_os in\n  freebsd2.*)\n    shlibpath_overrides_runpath=yes\n    ;;\n  freebsd3.[01]* | freebsdelf3.[01]*)\n    shlibpath_overrides_runpath=yes\n    hardcode_into_libs=yes\n    ;;\n  freebsd3.[2-9]* | freebsdelf3.[2-9]* | \\\n  freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)\n    shlibpath_overrides_runpath=no\n    hardcode_into_libs=yes\n    ;;\n  *) # from 4.6 on, and DragonFly\n    shlibpath_overrides_runpath=yes\n    hardcode_into_libs=yes\n    ;;\n  esac\n  ;;\n\nhaiku*)\n  version_type=linux # correct to gnu/linux during the next big refactor\n  need_lib_prefix=no\n  need_version=no\n  dynamic_linker=\"$host_os runtime_loader\"\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  shlibpath_var=LIBRARY_PATH\n  shlibpath_overrides_runpath=yes\n  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'\n  hardcode_into_libs=yes\n  ;;\n\nhpux9* | hpux10* | hpux11*)\n  # Give a soname corresponding to the major version so that dld.sl refuses to\n  # link against other versions.\n  version_type=sunos\n  need_lib_prefix=no\n  need_version=no\n  case $host_cpu in\n  ia64*)\n    shrext_cmds='.so'\n    hardcode_into_libs=yes\n    dynamic_linker=\"$host_os dld.so\"\n    shlibpath_var=LD_LIBRARY_PATH\n    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.\n    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n    soname_spec='${libname}${release}${shared_ext}$major'\n    if test \"X$HPUX_IA64_MODE\" = X32; then\n      sys_lib_search_path_spec=\"/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib\"\n    else\n      sys_lib_search_path_spec=\"/usr/lib/hpux64 /usr/local/lib/hpux64\"\n    fi\n    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec\n    ;;\n  hppa*64*)\n    shrext_cmds='.sl'\n    hardcode_into_libs=yes\n    dynamic_linker=\"$host_os dld.sl\"\n    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH\n    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.\n    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n    soname_spec='${libname}${release}${shared_ext}$major'\n    sys_lib_search_path_spec=\"/usr/lib/pa20_64 /usr/ccs/lib/pa20_64\"\n    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec\n    ;;\n  *)\n    shrext_cmds='.sl'\n    dynamic_linker=\"$host_os dld.sl\"\n    shlibpath_var=SHLIB_PATH\n    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH\n    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n    soname_spec='${libname}${release}${shared_ext}$major'\n    ;;\n  esac\n  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...\n  postinstall_cmds='chmod 555 $lib'\n  # or fails outright, so override atomically:\n  install_override_mode=555\n  ;;\n\ninterix[3-9]*)\n  version_type=linux # correct to gnu/linux during the next big refactor\n  need_lib_prefix=no\n  need_version=no\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'\n  shlibpath_var=LD_LIBRARY_PATH\n  shlibpath_overrides_runpath=no\n  hardcode_into_libs=yes\n  ;;\n\nirix5* | irix6* | nonstopux*)\n  case $host_os in\n    nonstopux*) version_type=nonstopux ;;\n    *)\n\tif test \"$lt_cv_prog_gnu_ld\" = yes; then\n\t\tversion_type=linux # correct to gnu/linux during the next big refactor\n\telse\n\t\tversion_type=irix\n\tfi ;;\n  esac\n  need_lib_prefix=no\n  need_version=no\n  soname_spec='${libname}${release}${shared_ext}$major'\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'\n  case $host_os in\n  irix5* | nonstopux*)\n    libsuff= shlibsuff=\n    ;;\n  *)\n    case $LD in # libtool.m4 will add one of these switches to LD\n    *-32|*\"-32 \"|*-melf32bsmip|*\"-melf32bsmip \")\n      libsuff= shlibsuff= libmagic=32-bit;;\n    *-n32|*\"-n32 \"|*-melf32bmipn32|*\"-melf32bmipn32 \")\n      libsuff=32 shlibsuff=N32 libmagic=N32;;\n    *-64|*\"-64 \"|*-melf64bmip|*\"-melf64bmip \")\n      libsuff=64 shlibsuff=64 libmagic=64-bit;;\n    *) libsuff= shlibsuff= libmagic=never-match;;\n    esac\n    ;;\n  esac\n  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH\n  shlibpath_overrides_runpath=no\n  sys_lib_search_path_spec=\"/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}\"\n  sys_lib_dlsearch_path_spec=\"/usr/lib${libsuff} /lib${libsuff}\"\n  hardcode_into_libs=yes\n  ;;\n\n# No shared lib support for Linux oldld, aout, or coff.\nlinux*oldld* | linux*aout* | linux*coff*)\n  dynamic_linker=no\n  ;;\n\n# This must be glibc/ELF.\nlinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)\n  version_type=linux # correct to gnu/linux during the next big refactor\n  need_lib_prefix=no\n  need_version=no\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  finish_cmds='PATH=\"\\$PATH:/sbin\" ldconfig -n $libdir'\n  shlibpath_var=LD_LIBRARY_PATH\n  shlibpath_overrides_runpath=no\n\n  # Some binutils ld are patched to set DT_RUNPATH\n  if ${lt_cv_shlibpath_overrides_runpath+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  lt_cv_shlibpath_overrides_runpath=no\n    save_LDFLAGS=$LDFLAGS\n    save_libdir=$libdir\n    eval \"libdir=/foo; wl=\\\"$lt_prog_compiler_wl\\\"; \\\n\t LDFLAGS=\\\"\\$LDFLAGS $hardcode_libdir_flag_spec\\\"\"\n    cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n\nint\nmain ()\n{\n\n  ;\n  return 0;\n}\n_ACEOF\nif ac_fn_c_try_link \"$LINENO\"; then :\n  if  ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep \"RUNPATH.*$libdir\" >/dev/null; then :\n  lt_cv_shlibpath_overrides_runpath=yes\nfi\nfi\nrm -f core conftest.err conftest.$ac_objext \\\n    conftest$ac_exeext conftest.$ac_ext\n    LDFLAGS=$save_LDFLAGS\n    libdir=$save_libdir\n\nfi\n\n  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath\n\n  # This implies no fast_install, which is unacceptable.\n  # Some rework will be needed to allow for fast_install\n  # before this can be enabled.\n  hardcode_into_libs=yes\n\n  # Append ld.so.conf contents to the search path\n  if test -f /etc/ld.so.conf; then\n    lt_ld_extra=`awk '/^include / { system(sprintf(\"cd /etc; cat %s 2>/dev/null\", \\$2)); skip = 1; } { if (!skip) print \\$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[\t ]*hwcap[\t ]/d;s/[:,\t]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/\"//g;/^$/d' | tr '\\n' ' '`\n    sys_lib_dlsearch_path_spec=\"/lib /usr/lib $lt_ld_extra\"\n  fi\n\n  # We used to test for /lib/ld.so.1 and disable shared libraries on\n  # powerpc, because MkLinux only supported shared libraries with the\n  # GNU dynamic linker.  Since this was broken with cross compilers,\n  # most powerpc-linux boxes support dynamic linking these days and\n  # people can always --disable-shared, the test was removed, and we\n  # assume the GNU/Linux dynamic linker is in use.\n  dynamic_linker='GNU/Linux ld.so'\n  ;;\n\nnetbsdelf*-gnu)\n  version_type=linux\n  need_lib_prefix=no\n  need_version=no\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  shlibpath_var=LD_LIBRARY_PATH\n  shlibpath_overrides_runpath=no\n  hardcode_into_libs=yes\n  dynamic_linker='NetBSD ld.elf_so'\n  ;;\n\nnetbsd*)\n  version_type=sunos\n  need_lib_prefix=no\n  need_version=no\n  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then\n    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'\n    finish_cmds='PATH=\"\\$PATH:/sbin\" ldconfig -m $libdir'\n    dynamic_linker='NetBSD (a.out) ld.so'\n  else\n    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'\n    soname_spec='${libname}${release}${shared_ext}$major'\n    dynamic_linker='NetBSD ld.elf_so'\n  fi\n  shlibpath_var=LD_LIBRARY_PATH\n  shlibpath_overrides_runpath=yes\n  hardcode_into_libs=yes\n  ;;\n\nnewsos6)\n  version_type=linux # correct to gnu/linux during the next big refactor\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n  shlibpath_var=LD_LIBRARY_PATH\n  shlibpath_overrides_runpath=yes\n  ;;\n\n*nto* | *qnx*)\n  version_type=qnx\n  need_lib_prefix=no\n  need_version=no\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  shlibpath_var=LD_LIBRARY_PATH\n  shlibpath_overrides_runpath=no\n  hardcode_into_libs=yes\n  dynamic_linker='ldqnx.so'\n  ;;\n\nopenbsd*)\n  version_type=sunos\n  sys_lib_dlsearch_path_spec=\"/usr/lib\"\n  need_lib_prefix=no\n  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.\n  case $host_os in\n    openbsd3.3 | openbsd3.3.*)\tneed_version=yes ;;\n    *)\t\t\t\tneed_version=no  ;;\n  esac\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'\n  finish_cmds='PATH=\"\\$PATH:/sbin\" ldconfig -m $libdir'\n  shlibpath_var=LD_LIBRARY_PATH\n  if test -z \"`echo __ELF__ | $CC -E - | $GREP __ELF__`\" || test \"$host_os-$host_cpu\" = \"openbsd2.8-powerpc\"; then\n    case $host_os in\n      openbsd2.[89] | openbsd2.[89].*)\n\tshlibpath_overrides_runpath=no\n\t;;\n      *)\n\tshlibpath_overrides_runpath=yes\n\t;;\n      esac\n  else\n    shlibpath_overrides_runpath=yes\n  fi\n  ;;\n\nos2*)\n  libname_spec='$name'\n  shrext_cmds=\".dll\"\n  need_lib_prefix=no\n  library_names_spec='$libname${shared_ext} $libname.a'\n  dynamic_linker='OS/2 ld.exe'\n  shlibpath_var=LIBPATH\n  ;;\n\nosf3* | osf4* | osf5*)\n  version_type=osf\n  need_lib_prefix=no\n  need_version=no\n  soname_spec='${libname}${release}${shared_ext}$major'\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n  shlibpath_var=LD_LIBRARY_PATH\n  sys_lib_search_path_spec=\"/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib\"\n  sys_lib_dlsearch_path_spec=\"$sys_lib_search_path_spec\"\n  ;;\n\nrdos*)\n  dynamic_linker=no\n  ;;\n\nsolaris*)\n  version_type=linux # correct to gnu/linux during the next big refactor\n  need_lib_prefix=no\n  need_version=no\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  shlibpath_var=LD_LIBRARY_PATH\n  shlibpath_overrides_runpath=yes\n  hardcode_into_libs=yes\n  # ldd complains unless libraries are executable\n  postinstall_cmds='chmod +x $lib'\n  ;;\n\nsunos4*)\n  version_type=sunos\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'\n  finish_cmds='PATH=\"\\$PATH:/usr/etc\" ldconfig $libdir'\n  shlibpath_var=LD_LIBRARY_PATH\n  shlibpath_overrides_runpath=yes\n  if test \"$with_gnu_ld\" = yes; then\n    need_lib_prefix=no\n  fi\n  need_version=yes\n  ;;\n\nsysv4 | sysv4.3*)\n  version_type=linux # correct to gnu/linux during the next big refactor\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  shlibpath_var=LD_LIBRARY_PATH\n  case $host_vendor in\n    sni)\n      shlibpath_overrides_runpath=no\n      need_lib_prefix=no\n      runpath_var=LD_RUN_PATH\n      ;;\n    siemens)\n      need_lib_prefix=no\n      ;;\n    motorola)\n      need_lib_prefix=no\n      need_version=no\n      shlibpath_overrides_runpath=no\n      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'\n      ;;\n  esac\n  ;;\n\nsysv4*MP*)\n  if test -d /usr/nec ;then\n    version_type=linux # correct to gnu/linux during the next big refactor\n    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'\n    soname_spec='$libname${shared_ext}.$major'\n    shlibpath_var=LD_LIBRARY_PATH\n  fi\n  ;;\n\nsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)\n  version_type=freebsd-elf\n  need_lib_prefix=no\n  need_version=no\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  shlibpath_var=LD_LIBRARY_PATH\n  shlibpath_overrides_runpath=yes\n  hardcode_into_libs=yes\n  if test \"$with_gnu_ld\" = yes; then\n    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'\n  else\n    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'\n    case $host_os in\n      sco3.2v5*)\n        sys_lib_search_path_spec=\"$sys_lib_search_path_spec /lib\"\n\t;;\n    esac\n  fi\n  sys_lib_dlsearch_path_spec='/usr/lib'\n  ;;\n\ntpf*)\n  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.\n  version_type=linux # correct to gnu/linux during the next big refactor\n  need_lib_prefix=no\n  need_version=no\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n  shlibpath_var=LD_LIBRARY_PATH\n  shlibpath_overrides_runpath=no\n  hardcode_into_libs=yes\n  ;;\n\nuts4*)\n  version_type=linux # correct to gnu/linux during the next big refactor\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  shlibpath_var=LD_LIBRARY_PATH\n  ;;\n\n*)\n  dynamic_linker=no\n  ;;\nesac\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $dynamic_linker\" >&5\n$as_echo \"$dynamic_linker\" >&6; }\ntest \"$dynamic_linker\" = no && can_build_shared=no\n\nvariables_saved_for_relink=\"PATH $shlibpath_var $runpath_var\"\nif test \"$GCC\" = yes; then\n  variables_saved_for_relink=\"$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH\"\nfi\n\nif test \"${lt_cv_sys_lib_search_path_spec+set}\" = set; then\n  sys_lib_search_path_spec=\"$lt_cv_sys_lib_search_path_spec\"\nfi\nif test \"${lt_cv_sys_lib_dlsearch_path_spec+set}\" = set; then\n  sys_lib_dlsearch_path_spec=\"$lt_cv_sys_lib_dlsearch_path_spec\"\nfi\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs\" >&5\n$as_echo_n \"checking how to hardcode library paths into programs... \" >&6; }\nhardcode_action=\nif test -n \"$hardcode_libdir_flag_spec\" ||\n   test -n \"$runpath_var\" ||\n   test \"X$hardcode_automatic\" = \"Xyes\" ; then\n\n  # We can hardcode non-existent directories.\n  if test \"$hardcode_direct\" != no &&\n     # If the only mechanism to avoid hardcoding is shlibpath_var, we\n     # have to relink, otherwise we might link with an installed library\n     # when we should be linking with a yet-to-be-installed one\n     ## test \"$_LT_TAGVAR(hardcode_shlibpath_var, )\" != no &&\n     test \"$hardcode_minus_L\" != no; then\n    # Linking always hardcodes the temporary library directory.\n    hardcode_action=relink\n  else\n    # We can link without hardcoding, and we can hardcode nonexisting dirs.\n    hardcode_action=immediate\n  fi\nelse\n  # We cannot hardcode anything, or else we can only hardcode existing\n  # directories.\n  hardcode_action=unsupported\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $hardcode_action\" >&5\n$as_echo \"$hardcode_action\" >&6; }\n\nif test \"$hardcode_action\" = relink ||\n   test \"$inherit_rpath\" = yes; then\n  # Fast installation is not supported\n  enable_fast_install=no\nelif test \"$shlibpath_overrides_runpath\" = yes ||\n     test \"$enable_shared\" = no; then\n  # Fast installation is not necessary\n  enable_fast_install=needless\nfi\n\n\n\n\n\n\n  if test \"x$enable_dlopen\" != xyes; then\n  enable_dlopen=unknown\n  enable_dlopen_self=unknown\n  enable_dlopen_self_static=unknown\nelse\n  lt_cv_dlopen=no\n  lt_cv_dlopen_libs=\n\n  case $host_os in\n  beos*)\n    lt_cv_dlopen=\"load_add_on\"\n    lt_cv_dlopen_libs=\n    lt_cv_dlopen_self=yes\n    ;;\n\n  mingw* | pw32* | cegcc*)\n    lt_cv_dlopen=\"LoadLibrary\"\n    lt_cv_dlopen_libs=\n    ;;\n\n  cygwin*)\n    lt_cv_dlopen=\"dlopen\"\n    lt_cv_dlopen_libs=\n    ;;\n\n  darwin*)\n  # if libdl is installed we need to link against it\n    { $as_echo \"$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl\" >&5\n$as_echo_n \"checking for dlopen in -ldl... \" >&6; }\nif ${ac_cv_lib_dl_dlopen+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  ac_check_lib_save_LIBS=$LIBS\nLIBS=\"-ldl  $LIBS\"\ncat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n\n/* Override any GCC internal prototype to avoid an error.\n   Use char because int might match the return type of a GCC\n   builtin and then its argument prototype would still apply.  */\n#ifdef __cplusplus\nextern \"C\"\n#endif\nchar dlopen ();\nint\nmain ()\n{\nreturn dlopen ();\n  ;\n  return 0;\n}\n_ACEOF\nif ac_fn_c_try_link \"$LINENO\"; then :\n  ac_cv_lib_dl_dlopen=yes\nelse\n  ac_cv_lib_dl_dlopen=no\nfi\nrm -f core conftest.err conftest.$ac_objext \\\n    conftest$ac_exeext conftest.$ac_ext\nLIBS=$ac_check_lib_save_LIBS\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen\" >&5\n$as_echo \"$ac_cv_lib_dl_dlopen\" >&6; }\nif test \"x$ac_cv_lib_dl_dlopen\" = xyes; then :\n  lt_cv_dlopen=\"dlopen\" lt_cv_dlopen_libs=\"-ldl\"\nelse\n\n    lt_cv_dlopen=\"dyld\"\n    lt_cv_dlopen_libs=\n    lt_cv_dlopen_self=yes\n\nfi\n\n    ;;\n\n  *)\n    ac_fn_c_check_func \"$LINENO\" \"shl_load\" \"ac_cv_func_shl_load\"\nif test \"x$ac_cv_func_shl_load\" = xyes; then :\n  lt_cv_dlopen=\"shl_load\"\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld\" >&5\n$as_echo_n \"checking for shl_load in -ldld... \" >&6; }\nif ${ac_cv_lib_dld_shl_load+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  ac_check_lib_save_LIBS=$LIBS\nLIBS=\"-ldld  $LIBS\"\ncat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n\n/* Override any GCC internal prototype to avoid an error.\n   Use char because int might match the return type of a GCC\n   builtin and then its argument prototype would still apply.  */\n#ifdef __cplusplus\nextern \"C\"\n#endif\nchar shl_load ();\nint\nmain ()\n{\nreturn shl_load ();\n  ;\n  return 0;\n}\n_ACEOF\nif ac_fn_c_try_link \"$LINENO\"; then :\n  ac_cv_lib_dld_shl_load=yes\nelse\n  ac_cv_lib_dld_shl_load=no\nfi\nrm -f core conftest.err conftest.$ac_objext \\\n    conftest$ac_exeext conftest.$ac_ext\nLIBS=$ac_check_lib_save_LIBS\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load\" >&5\n$as_echo \"$ac_cv_lib_dld_shl_load\" >&6; }\nif test \"x$ac_cv_lib_dld_shl_load\" = xyes; then :\n  lt_cv_dlopen=\"shl_load\" lt_cv_dlopen_libs=\"-ldld\"\nelse\n  ac_fn_c_check_func \"$LINENO\" \"dlopen\" \"ac_cv_func_dlopen\"\nif test \"x$ac_cv_func_dlopen\" = xyes; then :\n  lt_cv_dlopen=\"dlopen\"\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl\" >&5\n$as_echo_n \"checking for dlopen in -ldl... \" >&6; }\nif ${ac_cv_lib_dl_dlopen+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  ac_check_lib_save_LIBS=$LIBS\nLIBS=\"-ldl  $LIBS\"\ncat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n\n/* Override any GCC internal prototype to avoid an error.\n   Use char because int might match the return type of a GCC\n   builtin and then its argument prototype would still apply.  */\n#ifdef __cplusplus\nextern \"C\"\n#endif\nchar dlopen ();\nint\nmain ()\n{\nreturn dlopen ();\n  ;\n  return 0;\n}\n_ACEOF\nif ac_fn_c_try_link \"$LINENO\"; then :\n  ac_cv_lib_dl_dlopen=yes\nelse\n  ac_cv_lib_dl_dlopen=no\nfi\nrm -f core conftest.err conftest.$ac_objext \\\n    conftest$ac_exeext conftest.$ac_ext\nLIBS=$ac_check_lib_save_LIBS\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen\" >&5\n$as_echo \"$ac_cv_lib_dl_dlopen\" >&6; }\nif test \"x$ac_cv_lib_dl_dlopen\" = xyes; then :\n  lt_cv_dlopen=\"dlopen\" lt_cv_dlopen_libs=\"-ldl\"\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld\" >&5\n$as_echo_n \"checking for dlopen in -lsvld... \" >&6; }\nif ${ac_cv_lib_svld_dlopen+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  ac_check_lib_save_LIBS=$LIBS\nLIBS=\"-lsvld  $LIBS\"\ncat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n\n/* Override any GCC internal prototype to avoid an error.\n   Use char because int might match the return type of a GCC\n   builtin and then its argument prototype would still apply.  */\n#ifdef __cplusplus\nextern \"C\"\n#endif\nchar dlopen ();\nint\nmain ()\n{\nreturn dlopen ();\n  ;\n  return 0;\n}\n_ACEOF\nif ac_fn_c_try_link \"$LINENO\"; then :\n  ac_cv_lib_svld_dlopen=yes\nelse\n  ac_cv_lib_svld_dlopen=no\nfi\nrm -f core conftest.err conftest.$ac_objext \\\n    conftest$ac_exeext conftest.$ac_ext\nLIBS=$ac_check_lib_save_LIBS\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen\" >&5\n$as_echo \"$ac_cv_lib_svld_dlopen\" >&6; }\nif test \"x$ac_cv_lib_svld_dlopen\" = xyes; then :\n  lt_cv_dlopen=\"dlopen\" lt_cv_dlopen_libs=\"-lsvld\"\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld\" >&5\n$as_echo_n \"checking for dld_link in -ldld... \" >&6; }\nif ${ac_cv_lib_dld_dld_link+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  ac_check_lib_save_LIBS=$LIBS\nLIBS=\"-ldld  $LIBS\"\ncat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n\n/* Override any GCC internal prototype to avoid an error.\n   Use char because int might match the return type of a GCC\n   builtin and then its argument prototype would still apply.  */\n#ifdef __cplusplus\nextern \"C\"\n#endif\nchar dld_link ();\nint\nmain ()\n{\nreturn dld_link ();\n  ;\n  return 0;\n}\n_ACEOF\nif ac_fn_c_try_link \"$LINENO\"; then :\n  ac_cv_lib_dld_dld_link=yes\nelse\n  ac_cv_lib_dld_dld_link=no\nfi\nrm -f core conftest.err conftest.$ac_objext \\\n    conftest$ac_exeext conftest.$ac_ext\nLIBS=$ac_check_lib_save_LIBS\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link\" >&5\n$as_echo \"$ac_cv_lib_dld_dld_link\" >&6; }\nif test \"x$ac_cv_lib_dld_dld_link\" = xyes; then :\n  lt_cv_dlopen=\"dld_link\" lt_cv_dlopen_libs=\"-ldld\"\nfi\n\n\nfi\n\n\nfi\n\n\nfi\n\n\nfi\n\n\nfi\n\n    ;;\n  esac\n\n  if test \"x$lt_cv_dlopen\" != xno; then\n    enable_dlopen=yes\n  else\n    enable_dlopen=no\n  fi\n\n  case $lt_cv_dlopen in\n  dlopen)\n    save_CPPFLAGS=\"$CPPFLAGS\"\n    test \"x$ac_cv_header_dlfcn_h\" = xyes && CPPFLAGS=\"$CPPFLAGS -DHAVE_DLFCN_H\"\n\n    save_LDFLAGS=\"$LDFLAGS\"\n    wl=$lt_prog_compiler_wl eval LDFLAGS=\\\"\\$LDFLAGS $export_dynamic_flag_spec\\\"\n\n    save_LIBS=\"$LIBS\"\n    LIBS=\"$lt_cv_dlopen_libs $LIBS\"\n\n    { $as_echo \"$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself\" >&5\n$as_echo_n \"checking whether a program can dlopen itself... \" >&6; }\nif ${lt_cv_dlopen_self+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  \t  if test \"$cross_compiling\" = yes; then :\n  lt_cv_dlopen_self=cross\nelse\n  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2\n  lt_status=$lt_dlunknown\n  cat > conftest.$ac_ext <<_LT_EOF\n#line $LINENO \"configure\"\n#include \"confdefs.h\"\n\n#if HAVE_DLFCN_H\n#include <dlfcn.h>\n#endif\n\n#include <stdio.h>\n\n#ifdef RTLD_GLOBAL\n#  define LT_DLGLOBAL\t\tRTLD_GLOBAL\n#else\n#  ifdef DL_GLOBAL\n#    define LT_DLGLOBAL\t\tDL_GLOBAL\n#  else\n#    define LT_DLGLOBAL\t\t0\n#  endif\n#endif\n\n/* We may have to define LT_DLLAZY_OR_NOW in the command line if we\n   find out it does not work in some platform. */\n#ifndef LT_DLLAZY_OR_NOW\n#  ifdef RTLD_LAZY\n#    define LT_DLLAZY_OR_NOW\t\tRTLD_LAZY\n#  else\n#    ifdef DL_LAZY\n#      define LT_DLLAZY_OR_NOW\t\tDL_LAZY\n#    else\n#      ifdef RTLD_NOW\n#        define LT_DLLAZY_OR_NOW\tRTLD_NOW\n#      else\n#        ifdef DL_NOW\n#          define LT_DLLAZY_OR_NOW\tDL_NOW\n#        else\n#          define LT_DLLAZY_OR_NOW\t0\n#        endif\n#      endif\n#    endif\n#  endif\n#endif\n\n/* When -fvisbility=hidden is used, assume the code has been annotated\n   correspondingly for the symbols needed.  */\n#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))\nint fnord () __attribute__((visibility(\"default\")));\n#endif\n\nint fnord () { return 42; }\nint main ()\n{\n  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);\n  int status = $lt_dlunknown;\n\n  if (self)\n    {\n      if (dlsym (self,\"fnord\"))       status = $lt_dlno_uscore;\n      else\n        {\n\t  if (dlsym( self,\"_fnord\"))  status = $lt_dlneed_uscore;\n          else puts (dlerror ());\n\t}\n      /* dlclose (self); */\n    }\n  else\n    puts (dlerror ());\n\n  return status;\n}\n_LT_EOF\n  if { { eval echo \"\\\"\\$as_me\\\":${as_lineno-$LINENO}: \\\"$ac_link\\\"\"; } >&5\n  (eval $ac_link) 2>&5\n  ac_status=$?\n  $as_echo \"$as_me:${as_lineno-$LINENO}: \\$? = $ac_status\" >&5\n  test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then\n    (./conftest; exit; ) >&5 2>/dev/null\n    lt_status=$?\n    case x$lt_status in\n      x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;\n      x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;\n      x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;\n    esac\n  else :\n    # compilation failed\n    lt_cv_dlopen_self=no\n  fi\nfi\nrm -fr conftest*\n\n\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self\" >&5\n$as_echo \"$lt_cv_dlopen_self\" >&6; }\n\n    if test \"x$lt_cv_dlopen_self\" = xyes; then\n      wl=$lt_prog_compiler_wl eval LDFLAGS=\\\"\\$LDFLAGS $lt_prog_compiler_static\\\"\n      { $as_echo \"$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself\" >&5\n$as_echo_n \"checking whether a statically linked program can dlopen itself... \" >&6; }\nif ${lt_cv_dlopen_self_static+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  \t  if test \"$cross_compiling\" = yes; then :\n  lt_cv_dlopen_self_static=cross\nelse\n  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2\n  lt_status=$lt_dlunknown\n  cat > conftest.$ac_ext <<_LT_EOF\n#line $LINENO \"configure\"\n#include \"confdefs.h\"\n\n#if HAVE_DLFCN_H\n#include <dlfcn.h>\n#endif\n\n#include <stdio.h>\n\n#ifdef RTLD_GLOBAL\n#  define LT_DLGLOBAL\t\tRTLD_GLOBAL\n#else\n#  ifdef DL_GLOBAL\n#    define LT_DLGLOBAL\t\tDL_GLOBAL\n#  else\n#    define LT_DLGLOBAL\t\t0\n#  endif\n#endif\n\n/* We may have to define LT_DLLAZY_OR_NOW in the command line if we\n   find out it does not work in some platform. */\n#ifndef LT_DLLAZY_OR_NOW\n#  ifdef RTLD_LAZY\n#    define LT_DLLAZY_OR_NOW\t\tRTLD_LAZY\n#  else\n#    ifdef DL_LAZY\n#      define LT_DLLAZY_OR_NOW\t\tDL_LAZY\n#    else\n#      ifdef RTLD_NOW\n#        define LT_DLLAZY_OR_NOW\tRTLD_NOW\n#      else\n#        ifdef DL_NOW\n#          define LT_DLLAZY_OR_NOW\tDL_NOW\n#        else\n#          define LT_DLLAZY_OR_NOW\t0\n#        endif\n#      endif\n#    endif\n#  endif\n#endif\n\n/* When -fvisbility=hidden is used, assume the code has been annotated\n   correspondingly for the symbols needed.  */\n#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))\nint fnord () __attribute__((visibility(\"default\")));\n#endif\n\nint fnord () { return 42; }\nint main ()\n{\n  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);\n  int status = $lt_dlunknown;\n\n  if (self)\n    {\n      if (dlsym (self,\"fnord\"))       status = $lt_dlno_uscore;\n      else\n        {\n\t  if (dlsym( self,\"_fnord\"))  status = $lt_dlneed_uscore;\n          else puts (dlerror ());\n\t}\n      /* dlclose (self); */\n    }\n  else\n    puts (dlerror ());\n\n  return status;\n}\n_LT_EOF\n  if { { eval echo \"\\\"\\$as_me\\\":${as_lineno-$LINENO}: \\\"$ac_link\\\"\"; } >&5\n  (eval $ac_link) 2>&5\n  ac_status=$?\n  $as_echo \"$as_me:${as_lineno-$LINENO}: \\$? = $ac_status\" >&5\n  test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then\n    (./conftest; exit; ) >&5 2>/dev/null\n    lt_status=$?\n    case x$lt_status in\n      x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;\n      x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;\n      x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;\n    esac\n  else :\n    # compilation failed\n    lt_cv_dlopen_self_static=no\n  fi\nfi\nrm -fr conftest*\n\n\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static\" >&5\n$as_echo \"$lt_cv_dlopen_self_static\" >&6; }\n    fi\n\n    CPPFLAGS=\"$save_CPPFLAGS\"\n    LDFLAGS=\"$save_LDFLAGS\"\n    LIBS=\"$save_LIBS\"\n    ;;\n  esac\n\n  case $lt_cv_dlopen_self in\n  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;\n  *) enable_dlopen_self=unknown ;;\n  esac\n\n  case $lt_cv_dlopen_self_static in\n  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;\n  *) enable_dlopen_self_static=unknown ;;\n  esac\nfi\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nstriplib=\nold_striplib=\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible\" >&5\n$as_echo_n \"checking whether stripping libraries is possible... \" >&6; }\nif test -n \"$STRIP\" && $STRIP -V 2>&1 | $GREP \"GNU strip\" >/dev/null; then\n  test -z \"$old_striplib\" && old_striplib=\"$STRIP --strip-debug\"\n  test -z \"$striplib\" && striplib=\"$STRIP --strip-unneeded\"\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: yes\" >&5\n$as_echo \"yes\" >&6; }\nelse\n# FIXME - insert some real tests, host_os isn't really good enough\n  case $host_os in\n  darwin*)\n    if test -n \"$STRIP\" ; then\n      striplib=\"$STRIP -x\"\n      old_striplib=\"$STRIP -S\"\n      { $as_echo \"$as_me:${as_lineno-$LINENO}: result: yes\" >&5\n$as_echo \"yes\" >&6; }\n    else\n      { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\n    fi\n    ;;\n  *)\n    { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\n    ;;\n  esac\nfi\n\n\n\n\n\n\n\n\n\n\n\n\n  # Report which library types will actually be built\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries\" >&5\n$as_echo_n \"checking if libtool supports shared libraries... \" >&6; }\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $can_build_shared\" >&5\n$as_echo \"$can_build_shared\" >&6; }\n\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries\" >&5\n$as_echo_n \"checking whether to build shared libraries... \" >&6; }\n  test \"$can_build_shared\" = \"no\" && enable_shared=no\n\n  # On AIX, shared libraries and static libraries use the same namespace, and\n  # are all built from PIC.\n  case $host_os in\n  aix3*)\n    test \"$enable_shared\" = yes && enable_static=no\n    if test -n \"$RANLIB\"; then\n      archive_cmds=\"$archive_cmds~\\$RANLIB \\$lib\"\n      postinstall_cmds='$RANLIB $lib'\n    fi\n    ;;\n\n  aix[4-9]*)\n    if test \"$host_cpu\" != ia64 && test \"$aix_use_runtimelinking\" = no ; then\n      test \"$enable_shared\" = yes && enable_static=no\n    fi\n    ;;\n  esac\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $enable_shared\" >&5\n$as_echo \"$enable_shared\" >&6; }\n\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: checking whether to build static libraries\" >&5\n$as_echo_n \"checking whether to build static libraries... \" >&6; }\n  # Make sure either enable_shared or enable_static is yes.\n  test \"$enable_shared\" = yes || enable_static=yes\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $enable_static\" >&5\n$as_echo \"$enable_static\" >&6; }\n\n\n\n\nfi\nac_ext=c\nac_cpp='$CPP $CPPFLAGS'\nac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'\nac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'\nac_compiler_gnu=$ac_cv_c_compiler_gnu\n\nCC=\"$lt_save_CC\"\n\n      if test -n \"$CXX\" && ( test \"X$CXX\" != \"Xno\" &&\n    ( (test \"X$CXX\" = \"Xg++\" && `g++ -v >/dev/null 2>&1` ) ||\n    (test \"X$CXX\" != \"Xg++\"))) ; then\n  ac_ext=cpp\nac_cpp='$CXXCPP $CPPFLAGS'\nac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'\nac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'\nac_compiler_gnu=$ac_cv_cxx_compiler_gnu\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor\" >&5\n$as_echo_n \"checking how to run the C++ preprocessor... \" >&6; }\nif test -z \"$CXXCPP\"; then\n  if ${ac_cv_prog_CXXCPP+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n      # Double quotes because CXXCPP needs to be expanded\n    for CXXCPP in \"$CXX -E\" \"/lib/cpp\"\n    do\n      ac_preproc_ok=false\nfor ac_cxx_preproc_warn_flag in '' yes\ndo\n  # Use a header file that comes with gcc, so configuring glibc\n  # with a fresh cross-compiler works.\n  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since\n  # <limits.h> exists even on freestanding compilers.\n  # On the NeXT, cc -E runs the code through the compiler's parser,\n  # not just through cpp. \"Syntax error\" is here to catch this case.\n  cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n#ifdef __STDC__\n# include <limits.h>\n#else\n# include <assert.h>\n#endif\n\t\t     Syntax error\n_ACEOF\nif ac_fn_cxx_try_cpp \"$LINENO\"; then :\n\nelse\n  # Broken: fails on valid input.\ncontinue\nfi\nrm -f conftest.err conftest.i conftest.$ac_ext\n\n  # OK, works on sane cases.  Now check whether nonexistent headers\n  # can be detected and how.\n  cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n#include <ac_nonexistent.h>\n_ACEOF\nif ac_fn_cxx_try_cpp \"$LINENO\"; then :\n  # Broken: success on invalid input.\ncontinue\nelse\n  # Passes both tests.\nac_preproc_ok=:\nbreak\nfi\nrm -f conftest.err conftest.i conftest.$ac_ext\n\ndone\n# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.\nrm -f conftest.i conftest.err conftest.$ac_ext\nif $ac_preproc_ok; then :\n  break\nfi\n\n    done\n    ac_cv_prog_CXXCPP=$CXXCPP\n\nfi\n  CXXCPP=$ac_cv_prog_CXXCPP\nelse\n  ac_cv_prog_CXXCPP=$CXXCPP\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $CXXCPP\" >&5\n$as_echo \"$CXXCPP\" >&6; }\nac_preproc_ok=false\nfor ac_cxx_preproc_warn_flag in '' yes\ndo\n  # Use a header file that comes with gcc, so configuring glibc\n  # with a fresh cross-compiler works.\n  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since\n  # <limits.h> exists even on freestanding compilers.\n  # On the NeXT, cc -E runs the code through the compiler's parser,\n  # not just through cpp. \"Syntax error\" is here to catch this case.\n  cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n#ifdef __STDC__\n# include <limits.h>\n#else\n# include <assert.h>\n#endif\n\t\t     Syntax error\n_ACEOF\nif ac_fn_cxx_try_cpp \"$LINENO\"; then :\n\nelse\n  # Broken: fails on valid input.\ncontinue\nfi\nrm -f conftest.err conftest.i conftest.$ac_ext\n\n  # OK, works on sane cases.  Now check whether nonexistent headers\n  # can be detected and how.\n  cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n#include <ac_nonexistent.h>\n_ACEOF\nif ac_fn_cxx_try_cpp \"$LINENO\"; then :\n  # Broken: success on invalid input.\ncontinue\nelse\n  # Passes both tests.\nac_preproc_ok=:\nbreak\nfi\nrm -f conftest.err conftest.i conftest.$ac_ext\n\ndone\n# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.\nrm -f conftest.i conftest.err conftest.$ac_ext\nif $ac_preproc_ok; then :\n\nelse\n  { { $as_echo \"$as_me:${as_lineno-$LINENO}: error: in \\`$ac_pwd':\" >&5\n$as_echo \"$as_me: error: in \\`$ac_pwd':\" >&2;}\nas_fn_error $? \"C++ preprocessor \\\"$CXXCPP\\\" fails sanity check\nSee \\`config.log' for more details\" \"$LINENO\" 5; }\nfi\n\nac_ext=c\nac_cpp='$CPP $CPPFLAGS'\nac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'\nac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'\nac_compiler_gnu=$ac_cv_c_compiler_gnu\n\nelse\n  _lt_caught_CXX_error=yes\nfi\n\nac_ext=cpp\nac_cpp='$CXXCPP $CPPFLAGS'\nac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'\nac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'\nac_compiler_gnu=$ac_cv_cxx_compiler_gnu\n\narchive_cmds_need_lc_CXX=no\nallow_undefined_flag_CXX=\nalways_export_symbols_CXX=no\narchive_expsym_cmds_CXX=\ncompiler_needs_object_CXX=no\nexport_dynamic_flag_spec_CXX=\nhardcode_direct_CXX=no\nhardcode_direct_absolute_CXX=no\nhardcode_libdir_flag_spec_CXX=\nhardcode_libdir_separator_CXX=\nhardcode_minus_L_CXX=no\nhardcode_shlibpath_var_CXX=unsupported\nhardcode_automatic_CXX=no\ninherit_rpath_CXX=no\nmodule_cmds_CXX=\nmodule_expsym_cmds_CXX=\nlink_all_deplibs_CXX=unknown\nold_archive_cmds_CXX=$old_archive_cmds\nreload_flag_CXX=$reload_flag\nreload_cmds_CXX=$reload_cmds\nno_undefined_flag_CXX=\nwhole_archive_flag_spec_CXX=\nenable_shared_with_static_runtimes_CXX=no\n\n# Source file extension for C++ test sources.\nac_ext=cpp\n\n# Object file extension for compiled C++ test sources.\nobjext=o\nobjext_CXX=$objext\n\n# No sense in running all these tests if we already determined that\n# the CXX compiler isn't working.  Some variables (like enable_shared)\n# are currently assumed to apply to all compilers on this platform,\n# and will be corrupted by setting them based on a non-working compiler.\nif test \"$_lt_caught_CXX_error\" != yes; then\n  # Code to be used in simple compile tests\n  lt_simple_compile_test_code=\"int some_variable = 0;\"\n\n  # Code to be used in simple link tests\n  lt_simple_link_test_code='int main(int, char *[]) { return(0); }'\n\n  # ltmain only uses $CC for tagged configurations so make sure $CC is set.\n\n\n\n\n\n\n# If no C compiler was specified, use CC.\nLTCC=${LTCC-\"$CC\"}\n\n# If no C compiler flags were specified, use CFLAGS.\nLTCFLAGS=${LTCFLAGS-\"$CFLAGS\"}\n\n# Allow CC to be a program name with arguments.\ncompiler=$CC\n\n\n  # save warnings/boilerplate of simple test code\n  ac_outfile=conftest.$ac_objext\necho \"$lt_simple_compile_test_code\" >conftest.$ac_ext\neval \"$ac_compile\" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err\n_lt_compiler_boilerplate=`cat conftest.err`\n$RM conftest*\n\n  ac_outfile=conftest.$ac_objext\necho \"$lt_simple_link_test_code\" >conftest.$ac_ext\neval \"$ac_link\" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err\n_lt_linker_boilerplate=`cat conftest.err`\n$RM -r conftest*\n\n\n  # Allow CC to be a program name with arguments.\n  lt_save_CC=$CC\n  lt_save_CFLAGS=$CFLAGS\n  lt_save_LD=$LD\n  lt_save_GCC=$GCC\n  GCC=$GXX\n  lt_save_with_gnu_ld=$with_gnu_ld\n  lt_save_path_LD=$lt_cv_path_LD\n  if test -n \"${lt_cv_prog_gnu_ldcxx+set}\"; then\n    lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx\n  else\n    $as_unset lt_cv_prog_gnu_ld\n  fi\n  if test -n \"${lt_cv_path_LDCXX+set}\"; then\n    lt_cv_path_LD=$lt_cv_path_LDCXX\n  else\n    $as_unset lt_cv_path_LD\n  fi\n  test -z \"${LDCXX+set}\" || LD=$LDCXX\n  CC=${CXX-\"c++\"}\n  CFLAGS=$CXXFLAGS\n  compiler=$CC\n  compiler_CXX=$CC\n  for cc_temp in $compiler\"\"; do\n  case $cc_temp in\n    compile | *[\\\\/]compile | ccache | *[\\\\/]ccache ) ;;\n    distcc | *[\\\\/]distcc | purify | *[\\\\/]purify ) ;;\n    \\-*) ;;\n    *) break;;\n  esac\ndone\ncc_basename=`$ECHO \"$cc_temp\" | $SED \"s%.*/%%; s%^$host_alias-%%\"`\n\n\n  if test -n \"$compiler\"; then\n    # We don't want -fno-exception when compiling C++ code, so set the\n    # no_builtin_flag separately\n    if test \"$GXX\" = yes; then\n      lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin'\n    else\n      lt_prog_compiler_no_builtin_flag_CXX=\n    fi\n\n    if test \"$GXX\" = yes; then\n      # Set up default GNU C++ configuration\n\n\n\n# Check whether --with-gnu-ld was given.\nif test \"${with_gnu_ld+set}\" = set; then :\n  withval=$with_gnu_ld; test \"$withval\" = no || with_gnu_ld=yes\nelse\n  with_gnu_ld=no\nfi\n\nac_prog=ld\nif test \"$GCC\" = yes; then\n  # Check if gcc -print-prog-name=ld gives a path.\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: checking for ld used by $CC\" >&5\n$as_echo_n \"checking for ld used by $CC... \" >&6; }\n  case $host in\n  *-*-mingw*)\n    # gcc leaves a trailing carriage return which upsets mingw\n    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\\015'` ;;\n  *)\n    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;\n  esac\n  case $ac_prog in\n    # Accept absolute paths.\n    [\\\\/]* | ?:[\\\\/]*)\n      re_direlt='/[^/][^/]*/\\.\\./'\n      # Canonicalize the pathname of ld\n      ac_prog=`$ECHO \"$ac_prog\"| $SED 's%\\\\\\\\%/%g'`\n      while $ECHO \"$ac_prog\" | $GREP \"$re_direlt\" > /dev/null 2>&1; do\n\tac_prog=`$ECHO $ac_prog| $SED \"s%$re_direlt%/%\"`\n      done\n      test -z \"$LD\" && LD=\"$ac_prog\"\n      ;;\n  \"\")\n    # If it fails, then pretend we aren't using GCC.\n    ac_prog=ld\n    ;;\n  *)\n    # If it is relative, then search for the first ld in PATH.\n    with_gnu_ld=unknown\n    ;;\n  esac\nelif test \"$with_gnu_ld\" = yes; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: checking for GNU ld\" >&5\n$as_echo_n \"checking for GNU ld... \" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: checking for non-GNU ld\" >&5\n$as_echo_n \"checking for non-GNU ld... \" >&6; }\nfi\nif ${lt_cv_path_LD+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if test -z \"$LD\"; then\n  lt_save_ifs=\"$IFS\"; IFS=$PATH_SEPARATOR\n  for ac_dir in $PATH; do\n    IFS=\"$lt_save_ifs\"\n    test -z \"$ac_dir\" && ac_dir=.\n    if test -f \"$ac_dir/$ac_prog\" || test -f \"$ac_dir/$ac_prog$ac_exeext\"; then\n      lt_cv_path_LD=\"$ac_dir/$ac_prog\"\n      # Check to see if the program is GNU ld.  I'd rather use --version,\n      # but apparently some variants of GNU ld only accept -v.\n      # Break only if it was the GNU/non-GNU ld that we prefer.\n      case `\"$lt_cv_path_LD\" -v 2>&1 </dev/null` in\n      *GNU* | *'with BFD'*)\n\ttest \"$with_gnu_ld\" != no && break\n\t;;\n      *)\n\ttest \"$with_gnu_ld\" != yes && break\n\t;;\n      esac\n    fi\n  done\n  IFS=\"$lt_save_ifs\"\nelse\n  lt_cv_path_LD=\"$LD\" # Let the user override the test with a path.\nfi\nfi\n\nLD=\"$lt_cv_path_LD\"\nif test -n \"$LD\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $LD\" >&5\n$as_echo \"$LD\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\nfi\ntest -z \"$LD\" && as_fn_error $? \"no acceptable ld found in \\$PATH\" \"$LINENO\" 5\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld\" >&5\n$as_echo_n \"checking if the linker ($LD) is GNU ld... \" >&6; }\nif ${lt_cv_prog_gnu_ld+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  # I'd rather use --version here, but apparently some GNU lds only accept -v.\ncase `$LD -v 2>&1 </dev/null` in\n*GNU* | *'with BFD'*)\n  lt_cv_prog_gnu_ld=yes\n  ;;\n*)\n  lt_cv_prog_gnu_ld=no\n  ;;\nesac\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld\" >&5\n$as_echo \"$lt_cv_prog_gnu_ld\" >&6; }\nwith_gnu_ld=$lt_cv_prog_gnu_ld\n\n\n\n\n\n\n\n      # Check if GNU C++ uses GNU ld as the underlying linker, since the\n      # archiving commands below assume that GNU ld is being used.\n      if test \"$with_gnu_ld\" = yes; then\n        archive_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'\n        archive_expsym_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'\n\n        hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'\n        export_dynamic_flag_spec_CXX='${wl}--export-dynamic'\n\n        # If archive_cmds runs LD, not CC, wlarc should be empty\n        # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to\n        #     investigate it a little bit more. (MM)\n        wlarc='${wl}'\n\n        # ancient GNU ld didn't support --whole-archive et. al.\n        if eval \"`$CC -print-prog-name=ld` --help 2>&1\" |\n\t  $GREP 'no-whole-archive' > /dev/null; then\n          whole_archive_flag_spec_CXX=\"$wlarc\"'--whole-archive$convenience '\"$wlarc\"'--no-whole-archive'\n        else\n          whole_archive_flag_spec_CXX=\n        fi\n      else\n        with_gnu_ld=no\n        wlarc=\n\n        # A generic and very simple default shared library creation\n        # command for GNU C++ for the case where it uses the native\n        # linker, instead of GNU ld.  If possible, this setting should\n        # overridden to take advantage of the native linker features on\n        # the platform it is being used on.\n        archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'\n      fi\n\n      # Commands to make compiler produce verbose output that lists\n      # what \"hidden\" libraries, object files and flags are used when\n      # linking a shared library.\n      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v \"^Configured with:\" | $GREP \"\\-L\"'\n\n    else\n      GXX=no\n      with_gnu_ld=no\n      wlarc=\n    fi\n\n    # PORTME: fill in a description of your system's C++ link characteristics\n    { $as_echo \"$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries\" >&5\n$as_echo_n \"checking whether the $compiler linker ($LD) supports shared libraries... \" >&6; }\n    ld_shlibs_CXX=yes\n    case $host_os in\n      aix3*)\n        # FIXME: insert proper C++ library support\n        ld_shlibs_CXX=no\n        ;;\n      aix[4-9]*)\n        if test \"$host_cpu\" = ia64; then\n          # On IA64, the linker does run time linking by default, so we don't\n          # have to do anything special.\n          aix_use_runtimelinking=no\n          exp_sym_flag='-Bexport'\n          no_entry_flag=\"\"\n        else\n          aix_use_runtimelinking=no\n\n          # Test if we are trying to use run time linking or normal\n          # AIX style linking. If -brtl is somewhere in LDFLAGS, we\n          # need to do runtime linking.\n          case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)\n\t    for ld_flag in $LDFLAGS; do\n\t      case $ld_flag in\n\t      *-brtl*)\n\t        aix_use_runtimelinking=yes\n\t        break\n\t        ;;\n\t      esac\n\t    done\n\t    ;;\n          esac\n\n          exp_sym_flag='-bexport'\n          no_entry_flag='-bnoentry'\n        fi\n\n        # When large executables or shared objects are built, AIX ld can\n        # have problems creating the table of contents.  If linking a library\n        # or program results in \"error TOC overflow\" add -mminimal-toc to\n        # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not\n        # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.\n\n        archive_cmds_CXX=''\n        hardcode_direct_CXX=yes\n        hardcode_direct_absolute_CXX=yes\n        hardcode_libdir_separator_CXX=':'\n        link_all_deplibs_CXX=yes\n        file_list_spec_CXX='${wl}-f,'\n\n        if test \"$GXX\" = yes; then\n          case $host_os in aix4.[012]|aix4.[012].*)\n          # We only want to do this on AIX 4.2 and lower, the check\n          # below for broken collect2 doesn't work under 4.3+\n\t  collect2name=`${CC} -print-prog-name=collect2`\n\t  if test -f \"$collect2name\" &&\n\t     strings \"$collect2name\" | $GREP resolve_lib_name >/dev/null\n\t  then\n\t    # We have reworked collect2\n\t    :\n\t  else\n\t    # We have old collect2\n\t    hardcode_direct_CXX=unsupported\n\t    # It fails to find uninstalled libraries when the uninstalled\n\t    # path is not listed in the libpath.  Setting hardcode_minus_L\n\t    # to unsupported forces relinking\n\t    hardcode_minus_L_CXX=yes\n\t    hardcode_libdir_flag_spec_CXX='-L$libdir'\n\t    hardcode_libdir_separator_CXX=\n\t  fi\n          esac\n          shared_flag='-shared'\n\t  if test \"$aix_use_runtimelinking\" = yes; then\n\t    shared_flag=\"$shared_flag \"'${wl}-G'\n\t  fi\n        else\n          # not using gcc\n          if test \"$host_cpu\" = ia64; then\n\t  # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release\n\t  # chokes on -Wl,-G. The following line is correct:\n\t  shared_flag='-G'\n          else\n\t    if test \"$aix_use_runtimelinking\" = yes; then\n\t      shared_flag='${wl}-G'\n\t    else\n\t      shared_flag='${wl}-bM:SRE'\n\t    fi\n          fi\n        fi\n\n        export_dynamic_flag_spec_CXX='${wl}-bexpall'\n        # It seems that -bexpall does not export symbols beginning with\n        # underscore (_), so it is better to generate a list of symbols to\n\t# export.\n        always_export_symbols_CXX=yes\n        if test \"$aix_use_runtimelinking\" = yes; then\n          # Warning - without using the other runtime loading flags (-brtl),\n          # -berok will link without error, but may produce a broken library.\n          allow_undefined_flag_CXX='-berok'\n          # Determine the default libpath from the value encoded in an empty\n          # executable.\n          if test \"${lt_cv_aix_libpath+set}\" = set; then\n  aix_libpath=$lt_cv_aix_libpath\nelse\n  if ${lt_cv_aix_libpath__CXX+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n\nint\nmain ()\n{\n\n  ;\n  return 0;\n}\n_ACEOF\nif ac_fn_cxx_try_link \"$LINENO\"; then :\n\n  lt_aix_libpath_sed='\n      /Import File Strings/,/^$/ {\n\t  /^0/ {\n\t      s/^0  *\\([^ ]*\\) *$/\\1/\n\t      p\n\t  }\n      }'\n  lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e \"$lt_aix_libpath_sed\"`\n  # Check for a 64-bit object if we didn't find anything.\n  if test -z \"$lt_cv_aix_libpath__CXX\"; then\n    lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e \"$lt_aix_libpath_sed\"`\n  fi\nfi\nrm -f core conftest.err conftest.$ac_objext \\\n    conftest$ac_exeext conftest.$ac_ext\n  if test -z \"$lt_cv_aix_libpath__CXX\"; then\n    lt_cv_aix_libpath__CXX=\"/usr/lib:/lib\"\n  fi\n\nfi\n\n  aix_libpath=$lt_cv_aix_libpath__CXX\nfi\n\n          hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'\"$aix_libpath\"\n\n          archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs '\"\\${wl}$no_entry_flag\"' $compiler_flags `if test \"x${allow_undefined_flag}\" != \"x\"; then func_echo_all \"${wl}${allow_undefined_flag}\"; else :; fi` '\"\\${wl}$exp_sym_flag:\\$export_symbols $shared_flag\"\n        else\n          if test \"$host_cpu\" = ia64; then\n\t    hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib'\n\t    allow_undefined_flag_CXX=\"-z nodefs\"\n\t    archive_expsym_cmds_CXX=\"\\$CC $shared_flag\"' -o $output_objdir/$soname $libobjs $deplibs '\"\\${wl}$no_entry_flag\"' $compiler_flags ${wl}${allow_undefined_flag} '\"\\${wl}$exp_sym_flag:\\$export_symbols\"\n          else\n\t    # Determine the default libpath from the value encoded in an\n\t    # empty executable.\n\t    if test \"${lt_cv_aix_libpath+set}\" = set; then\n  aix_libpath=$lt_cv_aix_libpath\nelse\n  if ${lt_cv_aix_libpath__CXX+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n\nint\nmain ()\n{\n\n  ;\n  return 0;\n}\n_ACEOF\nif ac_fn_cxx_try_link \"$LINENO\"; then :\n\n  lt_aix_libpath_sed='\n      /Import File Strings/,/^$/ {\n\t  /^0/ {\n\t      s/^0  *\\([^ ]*\\) *$/\\1/\n\t      p\n\t  }\n      }'\n  lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e \"$lt_aix_libpath_sed\"`\n  # Check for a 64-bit object if we didn't find anything.\n  if test -z \"$lt_cv_aix_libpath__CXX\"; then\n    lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e \"$lt_aix_libpath_sed\"`\n  fi\nfi\nrm -f core conftest.err conftest.$ac_objext \\\n    conftest$ac_exeext conftest.$ac_ext\n  if test -z \"$lt_cv_aix_libpath__CXX\"; then\n    lt_cv_aix_libpath__CXX=\"/usr/lib:/lib\"\n  fi\n\nfi\n\n  aix_libpath=$lt_cv_aix_libpath__CXX\nfi\n\n\t    hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'\"$aix_libpath\"\n\t    # Warning - without using the other run time loading flags,\n\t    # -berok will link without error, but may produce a broken library.\n\t    no_undefined_flag_CXX=' ${wl}-bernotok'\n\t    allow_undefined_flag_CXX=' ${wl}-berok'\n\t    if test \"$with_gnu_ld\" = yes; then\n\t      # We only use this code for GNU lds that support --whole-archive.\n\t      whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive'\n\t    else\n\t      # Exported symbols can be pulled into shared objects from archives\n\t      whole_archive_flag_spec_CXX='$convenience'\n\t    fi\n\t    archive_cmds_need_lc_CXX=yes\n\t    # This is similar to how AIX traditionally builds its shared\n\t    # libraries.\n\t    archive_expsym_cmds_CXX=\"\\$CC $shared_flag\"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'\n          fi\n        fi\n        ;;\n\n      beos*)\n\tif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then\n\t  allow_undefined_flag_CXX=unsupported\n\t  # Joseph Beckenbach <jrb3@best.com> says some releases of gcc\n\t  # support --undefined.  This deserves some investigation.  FIXME\n\t  archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'\n\telse\n\t  ld_shlibs_CXX=no\n\tfi\n\t;;\n\n      chorus*)\n        case $cc_basename in\n          *)\n\t  # FIXME: insert proper C++ library support\n\t  ld_shlibs_CXX=no\n\t  ;;\n        esac\n        ;;\n\n      cygwin* | mingw* | pw32* | cegcc*)\n\tcase $GXX,$cc_basename in\n\t,cl* | no,cl*)\n\t  # Native MSVC\n\t  # hardcode_libdir_flag_spec is actually meaningless, as there is\n\t  # no search path for DLLs.\n\t  hardcode_libdir_flag_spec_CXX=' '\n\t  allow_undefined_flag_CXX=unsupported\n\t  always_export_symbols_CXX=yes\n\t  file_list_spec_CXX='@'\n\t  # Tell ltmain to make .lib files, not .a files.\n\t  libext=lib\n\t  # Tell ltmain to make .dll files, not .so files.\n\t  shrext_cmds=\".dll\"\n\t  # FIXME: Setting linknames here is a bad hack.\n\t  archive_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='\n\t  archive_expsym_cmds_CXX='if test \"x`$SED 1q $export_symbols`\" = xEXPORTS; then\n\t      $SED -n -e 's/\\\\\\\\\\\\\\(.*\\\\\\\\\\\\\\)/-link\\\\\\ -EXPORT:\\\\\\\\\\\\\\1/' -e '1\\\\\\!p' < $export_symbols > $output_objdir/$soname.exp;\n\t    else\n\t      $SED -e 's/\\\\\\\\\\\\\\(.*\\\\\\\\\\\\\\)/-link\\\\\\ -EXPORT:\\\\\\\\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;\n\t    fi~\n\t    $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs \"@$tool_output_objdir$soname.exp\" -Wl,-DLL,-IMPLIB:\"$tool_output_objdir$libname.dll.lib\"~\n\t    linknames='\n\t  # The linker will not automatically build a static lib if we build a DLL.\n\t  # _LT_TAGVAR(old_archive_from_new_cmds, CXX)='true'\n\t  enable_shared_with_static_runtimes_CXX=yes\n\t  # Don't use ranlib\n\t  old_postinstall_cmds_CXX='chmod 644 $oldlib'\n\t  postlink_cmds_CXX='lt_outputfile=\"@OUTPUT@\"~\n\t    lt_tool_outputfile=\"@TOOL_OUTPUT@\"~\n\t    case $lt_outputfile in\n\t      *.exe|*.EXE) ;;\n\t      *)\n\t\tlt_outputfile=\"$lt_outputfile.exe\"\n\t\tlt_tool_outputfile=\"$lt_tool_outputfile.exe\"\n\t\t;;\n\t    esac~\n\t    func_to_tool_file \"$lt_outputfile\"~\n\t    if test \"$MANIFEST_TOOL\" != \":\" && test -f \"$lt_outputfile.manifest\"; then\n\t      $MANIFEST_TOOL -manifest \"$lt_tool_outputfile.manifest\" -outputresource:\"$lt_tool_outputfile\" || exit 1;\n\t      $RM \"$lt_outputfile.manifest\";\n\t    fi'\n\t  ;;\n\t*)\n\t  # g++\n\t  # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless,\n\t  # as there is no search path for DLLs.\n\t  hardcode_libdir_flag_spec_CXX='-L$libdir'\n\t  export_dynamic_flag_spec_CXX='${wl}--export-all-symbols'\n\t  allow_undefined_flag_CXX=unsupported\n\t  always_export_symbols_CXX=no\n\t  enable_shared_with_static_runtimes_CXX=yes\n\n\t  if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then\n\t    archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'\n\t    # If the export-symbols file already is a .def file (1st line\n\t    # is EXPORTS), use it as is; otherwise, prepend...\n\t    archive_expsym_cmds_CXX='if test \"x`$SED 1q $export_symbols`\" = xEXPORTS; then\n\t      cp $export_symbols $output_objdir/$soname.def;\n\t    else\n\t      echo EXPORTS > $output_objdir/$soname.def;\n\t      cat $export_symbols >> $output_objdir/$soname.def;\n\t    fi~\n\t    $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'\n\t  else\n\t    ld_shlibs_CXX=no\n\t  fi\n\t  ;;\n\tesac\n\t;;\n      darwin* | rhapsody*)\n\n\n  archive_cmds_need_lc_CXX=no\n  hardcode_direct_CXX=no\n  hardcode_automatic_CXX=yes\n  hardcode_shlibpath_var_CXX=unsupported\n  if test \"$lt_cv_ld_force_load\" = \"yes\"; then\n    whole_archive_flag_spec_CXX='`for conv in $convenience\\\"\\\"; do test  -n \\\"$conv\\\" && new_convenience=\\\"$new_convenience ${wl}-force_load,$conv\\\"; done; func_echo_all \\\"$new_convenience\\\"`'\n\n  else\n    whole_archive_flag_spec_CXX=''\n  fi\n  link_all_deplibs_CXX=yes\n  allow_undefined_flag_CXX=\"$_lt_dar_allow_undefined\"\n  case $cc_basename in\n     ifort*) _lt_dar_can_shared=yes ;;\n     *) _lt_dar_can_shared=$GCC ;;\n  esac\n  if test \"$_lt_dar_can_shared\" = \"yes\"; then\n    output_verbose_link_cmd=func_echo_all\n    archive_cmds_CXX=\"\\$CC -dynamiclib \\$allow_undefined_flag -o \\$lib \\$libobjs \\$deplibs \\$compiler_flags -install_name \\$rpath/\\$soname \\$verstring $_lt_dar_single_mod${_lt_dsymutil}\"\n    module_cmds_CXX=\"\\$CC \\$allow_undefined_flag -o \\$lib -bundle \\$libobjs \\$deplibs \\$compiler_flags${_lt_dsymutil}\"\n    archive_expsym_cmds_CXX=\"sed 's,^,_,' < \\$export_symbols > \\$output_objdir/\\${libname}-symbols.expsym~\\$CC -dynamiclib \\$allow_undefined_flag -o \\$lib \\$libobjs \\$deplibs \\$compiler_flags -install_name \\$rpath/\\$soname \\$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}\"\n    module_expsym_cmds_CXX=\"sed -e 's,^,_,' < \\$export_symbols > \\$output_objdir/\\${libname}-symbols.expsym~\\$CC \\$allow_undefined_flag -o \\$lib -bundle \\$libobjs \\$deplibs \\$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}\"\n       if test \"$lt_cv_apple_cc_single_mod\" != \"yes\"; then\n      archive_cmds_CXX=\"\\$CC -r -keep_private_externs -nostdlib -o \\${lib}-master.o \\$libobjs~\\$CC -dynamiclib \\$allow_undefined_flag -o \\$lib \\${lib}-master.o \\$deplibs \\$compiler_flags -install_name \\$rpath/\\$soname \\$verstring${_lt_dsymutil}\"\n      archive_expsym_cmds_CXX=\"sed 's,^,_,' < \\$export_symbols > \\$output_objdir/\\${libname}-symbols.expsym~\\$CC -r -keep_private_externs -nostdlib -o \\${lib}-master.o \\$libobjs~\\$CC -dynamiclib \\$allow_undefined_flag -o \\$lib \\${lib}-master.o \\$deplibs \\$compiler_flags -install_name \\$rpath/\\$soname \\$verstring${_lt_dar_export_syms}${_lt_dsymutil}\"\n    fi\n\n  else\n  ld_shlibs_CXX=no\n  fi\n\n\t;;\n\n      dgux*)\n        case $cc_basename in\n          ec++*)\n\t    # FIXME: insert proper C++ library support\n\t    ld_shlibs_CXX=no\n\t    ;;\n          ghcx*)\n\t    # Green Hills C++ Compiler\n\t    # FIXME: insert proper C++ library support\n\t    ld_shlibs_CXX=no\n\t    ;;\n          *)\n\t    # FIXME: insert proper C++ library support\n\t    ld_shlibs_CXX=no\n\t    ;;\n        esac\n        ;;\n\n      freebsd2.*)\n        # C++ shared libraries reported to be fairly broken before\n\t# switch to ELF\n        ld_shlibs_CXX=no\n        ;;\n\n      freebsd-elf*)\n        archive_cmds_need_lc_CXX=no\n        ;;\n\n      freebsd* | dragonfly*)\n        # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF\n        # conventions\n        ld_shlibs_CXX=yes\n        ;;\n\n      haiku*)\n        archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'\n        link_all_deplibs_CXX=yes\n        ;;\n\n      hpux9*)\n        hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'\n        hardcode_libdir_separator_CXX=:\n        export_dynamic_flag_spec_CXX='${wl}-E'\n        hardcode_direct_CXX=yes\n        hardcode_minus_L_CXX=yes # Not in the search PATH,\n\t\t\t\t             # but as the default\n\t\t\t\t             # location of the library.\n\n        case $cc_basename in\n          CC*)\n            # FIXME: insert proper C++ library support\n            ld_shlibs_CXX=no\n            ;;\n          aCC*)\n            archive_cmds_CXX='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'\n            # Commands to make compiler produce verbose output that lists\n            # what \"hidden\" libraries, object files and flags are used when\n            # linking a shared library.\n            #\n            # There doesn't appear to be a way to prevent this compiler from\n            # explicitly linking system object files so we need to strip them\n            # from the output so that they don't get included in the library\n            # dependencies.\n            output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP \"\\-L\"`; list=\"\"; for z in $templist; do case $z in conftest.$objext) list=\"$list $z\";; *.$objext);; *) list=\"$list $z\";;esac; done; func_echo_all \"$list\"'\n            ;;\n          *)\n            if test \"$GXX\" = yes; then\n              archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'\n            else\n              # FIXME: insert proper C++ library support\n              ld_shlibs_CXX=no\n            fi\n            ;;\n        esac\n        ;;\n\n      hpux10*|hpux11*)\n        if test $with_gnu_ld = no; then\n\t  hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'\n\t  hardcode_libdir_separator_CXX=:\n\n          case $host_cpu in\n            hppa*64*|ia64*)\n              ;;\n            *)\n\t      export_dynamic_flag_spec_CXX='${wl}-E'\n              ;;\n          esac\n        fi\n        case $host_cpu in\n          hppa*64*|ia64*)\n            hardcode_direct_CXX=no\n            hardcode_shlibpath_var_CXX=no\n            ;;\n          *)\n            hardcode_direct_CXX=yes\n            hardcode_direct_absolute_CXX=yes\n            hardcode_minus_L_CXX=yes # Not in the search PATH,\n\t\t\t\t\t         # but as the default\n\t\t\t\t\t         # location of the library.\n            ;;\n        esac\n\n        case $cc_basename in\n          CC*)\n\t    # FIXME: insert proper C++ library support\n\t    ld_shlibs_CXX=no\n\t    ;;\n          aCC*)\n\t    case $host_cpu in\n\t      hppa*64*)\n\t        archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'\n\t        ;;\n\t      ia64*)\n\t        archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'\n\t        ;;\n\t      *)\n\t        archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'\n\t        ;;\n\t    esac\n\t    # Commands to make compiler produce verbose output that lists\n\t    # what \"hidden\" libraries, object files and flags are used when\n\t    # linking a shared library.\n\t    #\n\t    # There doesn't appear to be a way to prevent this compiler from\n\t    # explicitly linking system object files so we need to strip them\n\t    # from the output so that they don't get included in the library\n\t    # dependencies.\n\t    output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP \"\\-L\"`; list=\"\"; for z in $templist; do case $z in conftest.$objext) list=\"$list $z\";; *.$objext);; *) list=\"$list $z\";;esac; done; func_echo_all \"$list\"'\n\t    ;;\n          *)\n\t    if test \"$GXX\" = yes; then\n\t      if test $with_gnu_ld = no; then\n\t        case $host_cpu in\n\t          hppa*64*)\n\t            archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'\n\t            ;;\n\t          ia64*)\n\t            archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'\n\t            ;;\n\t          *)\n\t            archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'\n\t            ;;\n\t        esac\n\t      fi\n\t    else\n\t      # FIXME: insert proper C++ library support\n\t      ld_shlibs_CXX=no\n\t    fi\n\t    ;;\n        esac\n        ;;\n\n      interix[3-9]*)\n\thardcode_direct_CXX=no\n\thardcode_shlibpath_var_CXX=no\n\thardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'\n\texport_dynamic_flag_spec_CXX='${wl}-E'\n\t# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.\n\t# Instead, shared libraries are loaded at an image base (0x10000000 by\n\t# default) and relocated if they conflict, which is a slow very memory\n\t# consuming and fragmenting process.  To avoid this, we pick a random,\n\t# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link\n\t# time.  Moving up from 0x10000000 also allows more sbrk(2) space.\n\tarchive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \\* 262144 + 1342177280` -o $lib'\n\tarchive_expsym_cmds_CXX='sed \"s,^,_,\" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \\* 262144 + 1342177280` -o $lib'\n\t;;\n      irix5* | irix6*)\n        case $cc_basename in\n          CC*)\n\t    # SGI C++\n\t    archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n \"$verstring\" && func_echo_all \"-set_version $verstring\"` -update_registry ${output_objdir}/so_locations -o $lib'\n\n\t    # Archives containing C++ object files must be created using\n\t    # \"CC -ar\", where \"CC\" is the IRIX C++ compiler.  This is\n\t    # necessary to make sure instantiated templates are included\n\t    # in the archive.\n\t    old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs'\n\t    ;;\n          *)\n\t    if test \"$GXX\" = yes; then\n\t      if test \"$with_gnu_ld\" = no; then\n\t        archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n \"$verstring\" && func_echo_all \"${wl}-set_version ${wl}$verstring\"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'\n\t      else\n\t        archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n \"$verstring\" && func_echo_all \"${wl}-set_version ${wl}$verstring\"` -o $lib'\n\t      fi\n\t    fi\n\t    link_all_deplibs_CXX=yes\n\t    ;;\n        esac\n        hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'\n        hardcode_libdir_separator_CXX=:\n        inherit_rpath_CXX=yes\n        ;;\n\n      linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)\n        case $cc_basename in\n          KCC*)\n\t    # Kuck and Associates, Inc. (KAI) C++ Compiler\n\n\t    # KCC will only create a shared library if the output file\n\t    # ends with \".so\" (or \".sl\" for HP-UX), so rename the library\n\t    # to its proper name (with version) after linking.\n\t    archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\\''s/\\([^()0-9A-Za-z{}]\\)/\\\\\\\\\\1/g'\\''`; templib=`echo $lib | $SED -e \"s/\\${tempext}\\..*/.so/\"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \\$templib; mv \\$templib $lib'\n\t    archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\\''s/\\([^()0-9A-Za-z{}]\\)/\\\\\\\\\\1/g'\\''`; templib=`echo $lib | $SED -e \"s/\\${tempext}\\..*/.so/\"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \\$templib ${wl}-retain-symbols-file,$export_symbols; mv \\$templib $lib'\n\t    # Commands to make compiler produce verbose output that lists\n\t    # what \"hidden\" libraries, object files and flags are used when\n\t    # linking a shared library.\n\t    #\n\t    # There doesn't appear to be a way to prevent this compiler from\n\t    # explicitly linking system object files so we need to strip them\n\t    # from the output so that they don't get included in the library\n\t    # dependencies.\n\t    output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP \"ld\"`; rm -f libconftest$shared_ext; list=\"\"; for z in $templist; do case $z in conftest.$objext) list=\"$list $z\";; *.$objext);; *) list=\"$list $z\";;esac; done; func_echo_all \"$list\"'\n\n\t    hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'\n\t    export_dynamic_flag_spec_CXX='${wl}--export-dynamic'\n\n\t    # Archives containing C++ object files must be created using\n\t    # \"CC -Bstatic\", where \"CC\" is the KAI C++ compiler.\n\t    old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs'\n\t    ;;\n\t  icpc* | ecpc* )\n\t    # Intel C++\n\t    with_gnu_ld=yes\n\t    # version 8.0 and above of icpc choke on multiply defined symbols\n\t    # if we add $predep_objects and $postdep_objects, however 7.1 and\n\t    # earlier do not add the objects themselves.\n\t    case `$CC -V 2>&1` in\n\t      *\"Version 7.\"*)\n\t        archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'\n\t\tarchive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'\n\t\t;;\n\t      *)  # Version 8.0 or newer\n\t        tmp_idyn=\n\t        case $host_cpu in\n\t\t  ia64*) tmp_idyn=' -i_dynamic';;\n\t\tesac\n\t        archive_cmds_CXX='$CC -shared'\"$tmp_idyn\"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'\n\t\tarchive_expsym_cmds_CXX='$CC -shared'\"$tmp_idyn\"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'\n\t\t;;\n\t    esac\n\t    archive_cmds_need_lc_CXX=no\n\t    hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'\n\t    export_dynamic_flag_spec_CXX='${wl}--export-dynamic'\n\t    whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive'\n\t    ;;\n          pgCC* | pgcpp*)\n            # Portland Group C++ compiler\n\t    case `$CC -V` in\n\t    *pgCC\\ [1-5].* | *pgcpp\\ [1-5].*)\n\t      prelink_cmds_CXX='tpldir=Template.dir~\n\t\trm -rf $tpldir~\n\t\t$CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~\n\t\tcompile_command=\"$compile_command `find $tpldir -name \\*.o | sort | $NL2SP`\"'\n\t      old_archive_cmds_CXX='tpldir=Template.dir~\n\t\trm -rf $tpldir~\n\t\t$CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~\n\t\t$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \\*.o | sort | $NL2SP`~\n\t\t$RANLIB $oldlib'\n\t      archive_cmds_CXX='tpldir=Template.dir~\n\t\trm -rf $tpldir~\n\t\t$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~\n\t\t$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \\*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'\n\t      archive_expsym_cmds_CXX='tpldir=Template.dir~\n\t\trm -rf $tpldir~\n\t\t$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~\n\t\t$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \\*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'\n\t      ;;\n\t    *) # Version 6 and above use weak symbols\n\t      archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'\n\t      archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'\n\t      ;;\n\t    esac\n\n\t    hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir'\n\t    export_dynamic_flag_spec_CXX='${wl}--export-dynamic'\n\t    whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\\\"\\\"; do test  -n \\\"$conv\\\" && new_convenience=\\\"$new_convenience,$conv\\\"; done; func_echo_all \\\"$new_convenience\\\"` ${wl}--no-whole-archive'\n            ;;\n\t  cxx*)\n\t    # Compaq C++\n\t    archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'\n\t    archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname  -o $lib ${wl}-retain-symbols-file $wl$export_symbols'\n\n\t    runpath_var=LD_RUN_PATH\n\t    hardcode_libdir_flag_spec_CXX='-rpath $libdir'\n\t    hardcode_libdir_separator_CXX=:\n\n\t    # Commands to make compiler produce verbose output that lists\n\t    # what \"hidden\" libraries, object files and flags are used when\n\t    # linking a shared library.\n\t    #\n\t    # There doesn't appear to be a way to prevent this compiler from\n\t    # explicitly linking system object files so we need to strip them\n\t    # from the output so that they don't get included in the library\n\t    # dependencies.\n\t    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP \"ld\"`; templist=`func_echo_all \"$templist\" | $SED \"s/\\(^.*ld.*\\)\\( .*ld .*$\\)/\\1/\"`; list=\"\"; for z in $templist; do case $z in conftest.$objext) list=\"$list $z\";; *.$objext);; *) list=\"$list $z\";;esac; done; func_echo_all \"X$list\" | $Xsed'\n\t    ;;\n\t  xl* | mpixl* | bgxl*)\n\t    # IBM XL 8.0 on PPC, with GNU ld\n\t    hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'\n\t    export_dynamic_flag_spec_CXX='${wl}--export-dynamic'\n\t    archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'\n\t    if test \"x$supports_anon_versioning\" = xyes; then\n\t      archive_expsym_cmds_CXX='echo \"{ global:\" > $output_objdir/$libname.ver~\n\t\tcat $export_symbols | sed -e \"s/\\(.*\\)/\\1;/\" >> $output_objdir/$libname.ver~\n\t\techo \"local: *; };\" >> $output_objdir/$libname.ver~\n\t\t$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'\n\t    fi\n\t    ;;\n\t  *)\n\t    case `$CC -V 2>&1 | sed 5q` in\n\t    *Sun\\ C*)\n\t      # Sun C++ 5.9\n\t      no_undefined_flag_CXX=' -zdefs'\n\t      archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'\n\t      archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'\n\t      hardcode_libdir_flag_spec_CXX='-R$libdir'\n\t      whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\\\"\\\"; do test -z \\\"$conv\\\" || new_convenience=\\\"$new_convenience,$conv\\\"; done; func_echo_all \\\"$new_convenience\\\"` ${wl}--no-whole-archive'\n\t      compiler_needs_object_CXX=yes\n\n\t      # Not sure whether something based on\n\t      # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1\n\t      # would be better.\n\t      output_verbose_link_cmd='func_echo_all'\n\n\t      # Archives containing C++ object files must be created using\n\t      # \"CC -xar\", where \"CC\" is the Sun C++ compiler.  This is\n\t      # necessary to make sure instantiated templates are included\n\t      # in the archive.\n\t      old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'\n\t      ;;\n\t    esac\n\t    ;;\n\tesac\n\t;;\n\n      lynxos*)\n        # FIXME: insert proper C++ library support\n\tld_shlibs_CXX=no\n\t;;\n\n      m88k*)\n        # FIXME: insert proper C++ library support\n        ld_shlibs_CXX=no\n\t;;\n\n      mvs*)\n        case $cc_basename in\n          cxx*)\n\t    # FIXME: insert proper C++ library support\n\t    ld_shlibs_CXX=no\n\t    ;;\n\t  *)\n\t    # FIXME: insert proper C++ library support\n\t    ld_shlibs_CXX=no\n\t    ;;\n\tesac\n\t;;\n\n      netbsd*)\n        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then\n\t  archive_cmds_CXX='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'\n\t  wlarc=\n\t  hardcode_libdir_flag_spec_CXX='-R$libdir'\n\t  hardcode_direct_CXX=yes\n\t  hardcode_shlibpath_var_CXX=no\n\tfi\n\t# Workaround some broken pre-1.5 toolchains\n\toutput_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e \"s:-lgcc -lc -lgcc::\"'\n\t;;\n\n      *nto* | *qnx*)\n        ld_shlibs_CXX=yes\n\t;;\n\n      openbsd2*)\n        # C++ shared libraries are fairly broken\n\tld_shlibs_CXX=no\n\t;;\n\n      openbsd*)\n\tif test -f /usr/libexec/ld.so; then\n\t  hardcode_direct_CXX=yes\n\t  hardcode_shlibpath_var_CXX=no\n\t  hardcode_direct_absolute_CXX=yes\n\t  archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'\n\t  hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'\n\t  if test -z \"`echo __ELF__ | $CC -E - | grep __ELF__`\" || test \"$host_os-$host_cpu\" = \"openbsd2.8-powerpc\"; then\n\t    archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'\n\t    export_dynamic_flag_spec_CXX='${wl}-E'\n\t    whole_archive_flag_spec_CXX=\"$wlarc\"'--whole-archive$convenience '\"$wlarc\"'--no-whole-archive'\n\t  fi\n\t  output_verbose_link_cmd=func_echo_all\n\telse\n\t  ld_shlibs_CXX=no\n\tfi\n\t;;\n\n      osf3* | osf4* | osf5*)\n        case $cc_basename in\n          KCC*)\n\t    # Kuck and Associates, Inc. (KAI) C++ Compiler\n\n\t    # KCC will only create a shared library if the output file\n\t    # ends with \".so\" (or \".sl\" for HP-UX), so rename the library\n\t    # to its proper name (with version) after linking.\n\t    archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\\''s/\\([^()0-9A-Za-z{}]\\)/\\\\\\\\\\1/g'\\''`; templib=`echo \"$lib\" | $SED -e \"s/\\${tempext}\\..*/.so/\"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \\$templib; mv \\$templib $lib'\n\n\t    hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'\n\t    hardcode_libdir_separator_CXX=:\n\n\t    # Archives containing C++ object files must be created using\n\t    # the KAI C++ compiler.\n\t    case $host in\n\t      osf3*) old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;;\n\t      *) old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;;\n\t    esac\n\t    ;;\n          RCC*)\n\t    # Rational C++ 2.4.1\n\t    # FIXME: insert proper C++ library support\n\t    ld_shlibs_CXX=no\n\t    ;;\n          cxx*)\n\t    case $host in\n\t      osf3*)\n\t        allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\\*'\n\t        archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n \"$verstring\" && func_echo_all \"${wl}-set_version $verstring\"` -update_registry ${output_objdir}/so_locations -o $lib'\n\t        hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'\n\t\t;;\n\t      *)\n\t        allow_undefined_flag_CXX=' -expect_unresolved \\*'\n\t        archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n \"$verstring\" && func_echo_all \"-set_version $verstring\"` -update_registry ${output_objdir}/so_locations -o $lib'\n\t        archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf \"%s %s\\\\n\" -exported_symbol \"\\$i\" >> $lib.exp; done~\n\t          echo \"-hidden\">> $lib.exp~\n\t          $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp  `test -n \"$verstring\" && $ECHO \"-set_version $verstring\"` -update_registry ${output_objdir}/so_locations -o $lib~\n\t          $RM $lib.exp'\n\t        hardcode_libdir_flag_spec_CXX='-rpath $libdir'\n\t\t;;\n\t    esac\n\n\t    hardcode_libdir_separator_CXX=:\n\n\t    # Commands to make compiler produce verbose output that lists\n\t    # what \"hidden\" libraries, object files and flags are used when\n\t    # linking a shared library.\n\t    #\n\t    # There doesn't appear to be a way to prevent this compiler from\n\t    # explicitly linking system object files so we need to strip them\n\t    # from the output so that they don't get included in the library\n\t    # dependencies.\n\t    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP \"ld\" | $GREP -v \"ld:\"`; templist=`func_echo_all \"$templist\" | $SED \"s/\\(^.*ld.*\\)\\( .*ld.*$\\)/\\1/\"`; list=\"\"; for z in $templist; do case $z in conftest.$objext) list=\"$list $z\";; *.$objext);; *) list=\"$list $z\";;esac; done; func_echo_all \"$list\"'\n\t    ;;\n\t  *)\n\t    if test \"$GXX\" = yes && test \"$with_gnu_ld\" = no; then\n\t      allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\\*'\n\t      case $host in\n\t        osf3*)\n\t          archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n \"$verstring\" && func_echo_all \"${wl}-set_version ${wl}$verstring\"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'\n\t\t  ;;\n\t        *)\n\t          archive_cmds_CXX='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n \"$verstring\" && func_echo_all \"${wl}-set_version ${wl}$verstring\"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'\n\t\t  ;;\n\t      esac\n\n\t      hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'\n\t      hardcode_libdir_separator_CXX=:\n\n\t      # Commands to make compiler produce verbose output that lists\n\t      # what \"hidden\" libraries, object files and flags are used when\n\t      # linking a shared library.\n\t      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v \"^Configured with:\" | $GREP \"\\-L\"'\n\n\t    else\n\t      # FIXME: insert proper C++ library support\n\t      ld_shlibs_CXX=no\n\t    fi\n\t    ;;\n        esac\n        ;;\n\n      psos*)\n        # FIXME: insert proper C++ library support\n        ld_shlibs_CXX=no\n        ;;\n\n      sunos4*)\n        case $cc_basename in\n          CC*)\n\t    # Sun C++ 4.x\n\t    # FIXME: insert proper C++ library support\n\t    ld_shlibs_CXX=no\n\t    ;;\n          lcc*)\n\t    # Lucid\n\t    # FIXME: insert proper C++ library support\n\t    ld_shlibs_CXX=no\n\t    ;;\n          *)\n\t    # FIXME: insert proper C++ library support\n\t    ld_shlibs_CXX=no\n\t    ;;\n        esac\n        ;;\n\n      solaris*)\n        case $cc_basename in\n          CC* | sunCC*)\n\t    # Sun C++ 4.2, 5.x and Centerline C++\n            archive_cmds_need_lc_CXX=yes\n\t    no_undefined_flag_CXX=' -zdefs'\n\t    archive_cmds_CXX='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'\n\t    archive_expsym_cmds_CXX='echo \"{ global:\" > $lib.exp~cat $export_symbols | $SED -e \"s/\\(.*\\)/\\1;/\" >> $lib.exp~echo \"local: *; };\" >> $lib.exp~\n\t      $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'\n\n\t    hardcode_libdir_flag_spec_CXX='-R$libdir'\n\t    hardcode_shlibpath_var_CXX=no\n\t    case $host_os in\n\t      solaris2.[0-5] | solaris2.[0-5].*) ;;\n\t      *)\n\t\t# The compiler driver will combine and reorder linker options,\n\t\t# but understands `-z linker_flag'.\n\t        # Supported since Solaris 2.6 (maybe 2.5.1?)\n\t\twhole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract'\n\t        ;;\n\t    esac\n\t    link_all_deplibs_CXX=yes\n\n\t    output_verbose_link_cmd='func_echo_all'\n\n\t    # Archives containing C++ object files must be created using\n\t    # \"CC -xar\", where \"CC\" is the Sun C++ compiler.  This is\n\t    # necessary to make sure instantiated templates are included\n\t    # in the archive.\n\t    old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'\n\t    ;;\n          gcx*)\n\t    # Green Hills C++ Compiler\n\t    archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'\n\n\t    # The C++ compiler must be used to create the archive.\n\t    old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs'\n\t    ;;\n          *)\n\t    # GNU C++ compiler with Solaris linker\n\t    if test \"$GXX\" = yes && test \"$with_gnu_ld\" = no; then\n\t      no_undefined_flag_CXX=' ${wl}-z ${wl}defs'\n\t      if $CC --version | $GREP -v '^2\\.7' > /dev/null; then\n\t        archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'\n\t        archive_expsym_cmds_CXX='echo \"{ global:\" > $lib.exp~cat $export_symbols | $SED -e \"s/\\(.*\\)/\\1;/\" >> $lib.exp~echo \"local: *; };\" >> $lib.exp~\n\t\t  $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'\n\n\t        # Commands to make compiler produce verbose output that lists\n\t        # what \"hidden\" libraries, object files and flags are used when\n\t        # linking a shared library.\n\t        output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v \"^Configured with:\" | $GREP \"\\-L\"'\n\t      else\n\t        # g++ 2.7 appears to require `-G' NOT `-shared' on this\n\t        # platform.\n\t        archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'\n\t        archive_expsym_cmds_CXX='echo \"{ global:\" > $lib.exp~cat $export_symbols | $SED -e \"s/\\(.*\\)/\\1;/\" >> $lib.exp~echo \"local: *; };\" >> $lib.exp~\n\t\t  $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'\n\n\t        # Commands to make compiler produce verbose output that lists\n\t        # what \"hidden\" libraries, object files and flags are used when\n\t        # linking a shared library.\n\t        output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v \"^Configured with:\" | $GREP \"\\-L\"'\n\t      fi\n\n\t      hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir'\n\t      case $host_os in\n\t\tsolaris2.[0-5] | solaris2.[0-5].*) ;;\n\t\t*)\n\t\t  whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'\n\t\t  ;;\n\t      esac\n\t    fi\n\t    ;;\n        esac\n        ;;\n\n    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)\n      no_undefined_flag_CXX='${wl}-z,text'\n      archive_cmds_need_lc_CXX=no\n      hardcode_shlibpath_var_CXX=no\n      runpath_var='LD_RUN_PATH'\n\n      case $cc_basename in\n        CC*)\n\t  archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'\n\t  archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'\n\t  ;;\n\t*)\n\t  archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'\n\t  archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'\n\t  ;;\n      esac\n      ;;\n\n      sysv5* | sco3.2v5* | sco5v6*)\n\t# Note: We can NOT use -z defs as we might desire, because we do not\n\t# link with -lc, and that would cause any symbols used from libc to\n\t# always be unresolved, which means just about no library would\n\t# ever link correctly.  If we're not using GNU ld we use -z text\n\t# though, which does catch some bad symbols but isn't as heavy-handed\n\t# as -z defs.\n\tno_undefined_flag_CXX='${wl}-z,text'\n\tallow_undefined_flag_CXX='${wl}-z,nodefs'\n\tarchive_cmds_need_lc_CXX=no\n\thardcode_shlibpath_var_CXX=no\n\thardcode_libdir_flag_spec_CXX='${wl}-R,$libdir'\n\thardcode_libdir_separator_CXX=':'\n\tlink_all_deplibs_CXX=yes\n\texport_dynamic_flag_spec_CXX='${wl}-Bexport'\n\trunpath_var='LD_RUN_PATH'\n\n\tcase $cc_basename in\n          CC*)\n\t    archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'\n\t    archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'\n\t    old_archive_cmds_CXX='$CC -Tprelink_objects $oldobjs~\n\t      '\"$old_archive_cmds_CXX\"\n\t    reload_cmds_CXX='$CC -Tprelink_objects $reload_objs~\n\t      '\"$reload_cmds_CXX\"\n\t    ;;\n\t  *)\n\t    archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'\n\t    archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'\n\t    ;;\n\tesac\n      ;;\n\n      tandem*)\n        case $cc_basename in\n          NCC*)\n\t    # NonStop-UX NCC 3.20\n\t    # FIXME: insert proper C++ library support\n\t    ld_shlibs_CXX=no\n\t    ;;\n          *)\n\t    # FIXME: insert proper C++ library support\n\t    ld_shlibs_CXX=no\n\t    ;;\n        esac\n        ;;\n\n      vxworks*)\n        # FIXME: insert proper C++ library support\n        ld_shlibs_CXX=no\n        ;;\n\n      *)\n        # FIXME: insert proper C++ library support\n        ld_shlibs_CXX=no\n        ;;\n    esac\n\n    { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX\" >&5\n$as_echo \"$ld_shlibs_CXX\" >&6; }\n    test \"$ld_shlibs_CXX\" = no && can_build_shared=no\n\n    GCC_CXX=\"$GXX\"\n    LD_CXX=\"$LD\"\n\n    ## CAVEAT EMPTOR:\n    ## There is no encapsulation within the following macros, do not change\n    ## the running order or otherwise move them around unless you know exactly\n    ## what you are doing...\n    # Dependencies to place before and after the object being linked:\npredep_objects_CXX=\npostdep_objects_CXX=\npredeps_CXX=\npostdeps_CXX=\ncompiler_lib_search_path_CXX=\n\ncat > conftest.$ac_ext <<_LT_EOF\nclass Foo\n{\npublic:\n  Foo (void) { a = 0; }\nprivate:\n  int a;\n};\n_LT_EOF\n\n\n_lt_libdeps_save_CFLAGS=$CFLAGS\ncase \"$CC $CFLAGS \" in #(\n*\\ -flto*\\ *) CFLAGS=\"$CFLAGS -fno-lto\" ;;\n*\\ -fwhopr*\\ *) CFLAGS=\"$CFLAGS -fno-whopr\" ;;\n*\\ -fuse-linker-plugin*\\ *) CFLAGS=\"$CFLAGS -fno-use-linker-plugin\" ;;\nesac\n\nif { { eval echo \"\\\"\\$as_me\\\":${as_lineno-$LINENO}: \\\"$ac_compile\\\"\"; } >&5\n  (eval $ac_compile) 2>&5\n  ac_status=$?\n  $as_echo \"$as_me:${as_lineno-$LINENO}: \\$? = $ac_status\" >&5\n  test $ac_status = 0; }; then\n  # Parse the compiler output and extract the necessary\n  # objects, libraries and library flags.\n\n  # Sentinel used to keep track of whether or not we are before\n  # the conftest object file.\n  pre_test_object_deps_done=no\n\n  for p in `eval \"$output_verbose_link_cmd\"`; do\n    case ${prev}${p} in\n\n    -L* | -R* | -l*)\n       # Some compilers place space between \"-{L,R}\" and the path.\n       # Remove the space.\n       if test $p = \"-L\" ||\n          test $p = \"-R\"; then\n\t prev=$p\n\t continue\n       fi\n\n       # Expand the sysroot to ease extracting the directories later.\n       if test -z \"$prev\"; then\n         case $p in\n         -L*) func_stripname_cnf '-L' '' \"$p\"; prev=-L; p=$func_stripname_result ;;\n         -R*) func_stripname_cnf '-R' '' \"$p\"; prev=-R; p=$func_stripname_result ;;\n         -l*) func_stripname_cnf '-l' '' \"$p\"; prev=-l; p=$func_stripname_result ;;\n         esac\n       fi\n       case $p in\n       =*) func_stripname_cnf '=' '' \"$p\"; p=$lt_sysroot$func_stripname_result ;;\n       esac\n       if test \"$pre_test_object_deps_done\" = no; then\n\t case ${prev} in\n\t -L | -R)\n\t   # Internal compiler library paths should come after those\n\t   # provided the user.  The postdeps already come after the\n\t   # user supplied libs so there is no need to process them.\n\t   if test -z \"$compiler_lib_search_path_CXX\"; then\n\t     compiler_lib_search_path_CXX=\"${prev}${p}\"\n\t   else\n\t     compiler_lib_search_path_CXX=\"${compiler_lib_search_path_CXX} ${prev}${p}\"\n\t   fi\n\t   ;;\n\t # The \"-l\" case would never come before the object being\n\t # linked, so don't bother handling this case.\n\t esac\n       else\n\t if test -z \"$postdeps_CXX\"; then\n\t   postdeps_CXX=\"${prev}${p}\"\n\t else\n\t   postdeps_CXX=\"${postdeps_CXX} ${prev}${p}\"\n\t fi\n       fi\n       prev=\n       ;;\n\n    *.lto.$objext) ;; # Ignore GCC LTO objects\n    *.$objext)\n       # This assumes that the test object file only shows up\n       # once in the compiler output.\n       if test \"$p\" = \"conftest.$objext\"; then\n\t pre_test_object_deps_done=yes\n\t continue\n       fi\n\n       if test \"$pre_test_object_deps_done\" = no; then\n\t if test -z \"$predep_objects_CXX\"; then\n\t   predep_objects_CXX=\"$p\"\n\t else\n\t   predep_objects_CXX=\"$predep_objects_CXX $p\"\n\t fi\n       else\n\t if test -z \"$postdep_objects_CXX\"; then\n\t   postdep_objects_CXX=\"$p\"\n\t else\n\t   postdep_objects_CXX=\"$postdep_objects_CXX $p\"\n\t fi\n       fi\n       ;;\n\n    *) ;; # Ignore the rest.\n\n    esac\n  done\n\n  # Clean up.\n  rm -f a.out a.exe\nelse\n  echo \"libtool.m4: error: problem compiling CXX test program\"\nfi\n\n$RM -f confest.$objext\nCFLAGS=$_lt_libdeps_save_CFLAGS\n\n# PORTME: override above test on systems where it is broken\ncase $host_os in\ninterix[3-9]*)\n  # Interix 3.5 installs completely hosed .la files for C++, so rather than\n  # hack all around it, let's just trust \"g++\" to DTRT.\n  predep_objects_CXX=\n  postdep_objects_CXX=\n  postdeps_CXX=\n  ;;\n\nlinux*)\n  case `$CC -V 2>&1 | sed 5q` in\n  *Sun\\ C*)\n    # Sun C++ 5.9\n\n    # The more standards-conforming stlport4 library is\n    # incompatible with the Cstd library. Avoid specifying\n    # it if it's in CXXFLAGS. Ignore libCrun as\n    # -library=stlport4 depends on it.\n    case \" $CXX $CXXFLAGS \" in\n    *\" -library=stlport4 \"*)\n      solaris_use_stlport4=yes\n      ;;\n    esac\n\n    if test \"$solaris_use_stlport4\" != yes; then\n      postdeps_CXX='-library=Cstd -library=Crun'\n    fi\n    ;;\n  esac\n  ;;\n\nsolaris*)\n  case $cc_basename in\n  CC* | sunCC*)\n    # The more standards-conforming stlport4 library is\n    # incompatible with the Cstd library. Avoid specifying\n    # it if it's in CXXFLAGS. Ignore libCrun as\n    # -library=stlport4 depends on it.\n    case \" $CXX $CXXFLAGS \" in\n    *\" -library=stlport4 \"*)\n      solaris_use_stlport4=yes\n      ;;\n    esac\n\n    # Adding this requires a known-good setup of shared libraries for\n    # Sun compiler versions before 5.6, else PIC objects from an old\n    # archive will be linked into the output, leading to subtle bugs.\n    if test \"$solaris_use_stlport4\" != yes; then\n      postdeps_CXX='-library=Cstd -library=Crun'\n    fi\n    ;;\n  esac\n  ;;\nesac\n\n\ncase \" $postdeps_CXX \" in\n*\" -lc \"*) archive_cmds_need_lc_CXX=no ;;\nesac\n compiler_lib_search_dirs_CXX=\nif test -n \"${compiler_lib_search_path_CXX}\"; then\n compiler_lib_search_dirs_CXX=`echo \" ${compiler_lib_search_path_CXX}\" | ${SED} -e 's! -L! !g' -e 's!^ !!'`\nfi\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n    lt_prog_compiler_wl_CXX=\nlt_prog_compiler_pic_CXX=\nlt_prog_compiler_static_CXX=\n\n\n  # C++ specific cases for pic, static, wl, etc.\n  if test \"$GXX\" = yes; then\n    lt_prog_compiler_wl_CXX='-Wl,'\n    lt_prog_compiler_static_CXX='-static'\n\n    case $host_os in\n    aix*)\n      # All AIX code is PIC.\n      if test \"$host_cpu\" = ia64; then\n\t# AIX 5 now supports IA64 processor\n\tlt_prog_compiler_static_CXX='-Bstatic'\n      fi\n      ;;\n\n    amigaos*)\n      case $host_cpu in\n      powerpc)\n            # see comment about AmigaOS4 .so support\n            lt_prog_compiler_pic_CXX='-fPIC'\n        ;;\n      m68k)\n            # FIXME: we need at least 68020 code to build shared libraries, but\n            # adding the `-m68020' flag to GCC prevents building anything better,\n            # like `-m68040'.\n            lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4'\n        ;;\n      esac\n      ;;\n\n    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)\n      # PIC is the default for these OSes.\n      ;;\n    mingw* | cygwin* | os2* | pw32* | cegcc*)\n      # This hack is so that the source file can tell whether it is being\n      # built for inclusion in a dll (and should export symbols for example).\n      # Although the cygwin gcc ignores -fPIC, still need this for old-style\n      # (--disable-auto-import) libraries\n      lt_prog_compiler_pic_CXX='-DDLL_EXPORT'\n      ;;\n    darwin* | rhapsody*)\n      # PIC is the default on this platform\n      # Common symbols not allowed in MH_DYLIB files\n      lt_prog_compiler_pic_CXX='-fno-common'\n      ;;\n    *djgpp*)\n      # DJGPP does not support shared libraries at all\n      lt_prog_compiler_pic_CXX=\n      ;;\n    haiku*)\n      # PIC is the default for Haiku.\n      # The \"-static\" flag exists, but is broken.\n      lt_prog_compiler_static_CXX=\n      ;;\n    interix[3-9]*)\n      # Interix 3.x gcc -fpic/-fPIC options generate broken code.\n      # Instead, we relocate shared libraries at runtime.\n      ;;\n    sysv4*MP*)\n      if test -d /usr/nec; then\n\tlt_prog_compiler_pic_CXX=-Kconform_pic\n      fi\n      ;;\n    hpux*)\n      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit\n      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag\n      # sets the default TLS model and affects inlining.\n      case $host_cpu in\n      hppa*64*)\n\t;;\n      *)\n\tlt_prog_compiler_pic_CXX='-fPIC'\n\t;;\n      esac\n      ;;\n    *qnx* | *nto*)\n      # QNX uses GNU C++, but need to define -shared option too, otherwise\n      # it will coredump.\n      lt_prog_compiler_pic_CXX='-fPIC -shared'\n      ;;\n    *)\n      lt_prog_compiler_pic_CXX='-fPIC'\n      ;;\n    esac\n  else\n    case $host_os in\n      aix[4-9]*)\n\t# All AIX code is PIC.\n\tif test \"$host_cpu\" = ia64; then\n\t  # AIX 5 now supports IA64 processor\n\t  lt_prog_compiler_static_CXX='-Bstatic'\n\telse\n\t  lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp'\n\tfi\n\t;;\n      chorus*)\n\tcase $cc_basename in\n\tcxch68*)\n\t  # Green Hills C++ Compiler\n\t  # _LT_TAGVAR(lt_prog_compiler_static, CXX)=\"--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a\"\n\t  ;;\n\tesac\n\t;;\n      mingw* | cygwin* | os2* | pw32* | cegcc*)\n\t# This hack is so that the source file can tell whether it is being\n\t# built for inclusion in a dll (and should export symbols for example).\n\tlt_prog_compiler_pic_CXX='-DDLL_EXPORT'\n\t;;\n      dgux*)\n\tcase $cc_basename in\n\t  ec++*)\n\t    lt_prog_compiler_pic_CXX='-KPIC'\n\t    ;;\n\t  ghcx*)\n\t    # Green Hills C++ Compiler\n\t    lt_prog_compiler_pic_CXX='-pic'\n\t    ;;\n\t  *)\n\t    ;;\n\tesac\n\t;;\n      freebsd* | dragonfly*)\n\t# FreeBSD uses GNU C++\n\t;;\n      hpux9* | hpux10* | hpux11*)\n\tcase $cc_basename in\n\t  CC*)\n\t    lt_prog_compiler_wl_CXX='-Wl,'\n\t    lt_prog_compiler_static_CXX='${wl}-a ${wl}archive'\n\t    if test \"$host_cpu\" != ia64; then\n\t      lt_prog_compiler_pic_CXX='+Z'\n\t    fi\n\t    ;;\n\t  aCC*)\n\t    lt_prog_compiler_wl_CXX='-Wl,'\n\t    lt_prog_compiler_static_CXX='${wl}-a ${wl}archive'\n\t    case $host_cpu in\n\t    hppa*64*|ia64*)\n\t      # +Z the default\n\t      ;;\n\t    *)\n\t      lt_prog_compiler_pic_CXX='+Z'\n\t      ;;\n\t    esac\n\t    ;;\n\t  *)\n\t    ;;\n\tesac\n\t;;\n      interix*)\n\t# This is c89, which is MS Visual C++ (no shared libs)\n\t# Anyone wants to do a port?\n\t;;\n      irix5* | irix6* | nonstopux*)\n\tcase $cc_basename in\n\t  CC*)\n\t    lt_prog_compiler_wl_CXX='-Wl,'\n\t    lt_prog_compiler_static_CXX='-non_shared'\n\t    # CC pic flag -KPIC is the default.\n\t    ;;\n\t  *)\n\t    ;;\n\tesac\n\t;;\n      linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)\n\tcase $cc_basename in\n\t  KCC*)\n\t    # KAI C++ Compiler\n\t    lt_prog_compiler_wl_CXX='--backend -Wl,'\n\t    lt_prog_compiler_pic_CXX='-fPIC'\n\t    ;;\n\t  ecpc* )\n\t    # old Intel C++ for x86_64 which still supported -KPIC.\n\t    lt_prog_compiler_wl_CXX='-Wl,'\n\t    lt_prog_compiler_pic_CXX='-KPIC'\n\t    lt_prog_compiler_static_CXX='-static'\n\t    ;;\n\t  icpc* )\n\t    # Intel C++, used to be incompatible with GCC.\n\t    # ICC 10 doesn't accept -KPIC any more.\n\t    lt_prog_compiler_wl_CXX='-Wl,'\n\t    lt_prog_compiler_pic_CXX='-fPIC'\n\t    lt_prog_compiler_static_CXX='-static'\n\t    ;;\n\t  pgCC* | pgcpp*)\n\t    # Portland Group C++ compiler\n\t    lt_prog_compiler_wl_CXX='-Wl,'\n\t    lt_prog_compiler_pic_CXX='-fpic'\n\t    lt_prog_compiler_static_CXX='-Bstatic'\n\t    ;;\n\t  cxx*)\n\t    # Compaq C++\n\t    # Make sure the PIC flag is empty.  It appears that all Alpha\n\t    # Linux and Compaq Tru64 Unix objects are PIC.\n\t    lt_prog_compiler_pic_CXX=\n\t    lt_prog_compiler_static_CXX='-non_shared'\n\t    ;;\n\t  xlc* | xlC* | bgxl[cC]* | mpixl[cC]*)\n\t    # IBM XL 8.0, 9.0 on PPC and BlueGene\n\t    lt_prog_compiler_wl_CXX='-Wl,'\n\t    lt_prog_compiler_pic_CXX='-qpic'\n\t    lt_prog_compiler_static_CXX='-qstaticlink'\n\t    ;;\n\t  *)\n\t    case `$CC -V 2>&1 | sed 5q` in\n\t    *Sun\\ C*)\n\t      # Sun C++ 5.9\n\t      lt_prog_compiler_pic_CXX='-KPIC'\n\t      lt_prog_compiler_static_CXX='-Bstatic'\n\t      lt_prog_compiler_wl_CXX='-Qoption ld '\n\t      ;;\n\t    esac\n\t    ;;\n\tesac\n\t;;\n      lynxos*)\n\t;;\n      m88k*)\n\t;;\n      mvs*)\n\tcase $cc_basename in\n\t  cxx*)\n\t    lt_prog_compiler_pic_CXX='-W c,exportall'\n\t    ;;\n\t  *)\n\t    ;;\n\tesac\n\t;;\n      netbsd* | netbsdelf*-gnu)\n\t;;\n      *qnx* | *nto*)\n        # QNX uses GNU C++, but need to define -shared option too, otherwise\n        # it will coredump.\n        lt_prog_compiler_pic_CXX='-fPIC -shared'\n        ;;\n      osf3* | osf4* | osf5*)\n\tcase $cc_basename in\n\t  KCC*)\n\t    lt_prog_compiler_wl_CXX='--backend -Wl,'\n\t    ;;\n\t  RCC*)\n\t    # Rational C++ 2.4.1\n\t    lt_prog_compiler_pic_CXX='-pic'\n\t    ;;\n\t  cxx*)\n\t    # Digital/Compaq C++\n\t    lt_prog_compiler_wl_CXX='-Wl,'\n\t    # Make sure the PIC flag is empty.  It appears that all Alpha\n\t    # Linux and Compaq Tru64 Unix objects are PIC.\n\t    lt_prog_compiler_pic_CXX=\n\t    lt_prog_compiler_static_CXX='-non_shared'\n\t    ;;\n\t  *)\n\t    ;;\n\tesac\n\t;;\n      psos*)\n\t;;\n      solaris*)\n\tcase $cc_basename in\n\t  CC* | sunCC*)\n\t    # Sun C++ 4.2, 5.x and Centerline C++\n\t    lt_prog_compiler_pic_CXX='-KPIC'\n\t    lt_prog_compiler_static_CXX='-Bstatic'\n\t    lt_prog_compiler_wl_CXX='-Qoption ld '\n\t    ;;\n\t  gcx*)\n\t    # Green Hills C++ Compiler\n\t    lt_prog_compiler_pic_CXX='-PIC'\n\t    ;;\n\t  *)\n\t    ;;\n\tesac\n\t;;\n      sunos4*)\n\tcase $cc_basename in\n\t  CC*)\n\t    # Sun C++ 4.x\n\t    lt_prog_compiler_pic_CXX='-pic'\n\t    lt_prog_compiler_static_CXX='-Bstatic'\n\t    ;;\n\t  lcc*)\n\t    # Lucid\n\t    lt_prog_compiler_pic_CXX='-pic'\n\t    ;;\n\t  *)\n\t    ;;\n\tesac\n\t;;\n      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)\n\tcase $cc_basename in\n\t  CC*)\n\t    lt_prog_compiler_wl_CXX='-Wl,'\n\t    lt_prog_compiler_pic_CXX='-KPIC'\n\t    lt_prog_compiler_static_CXX='-Bstatic'\n\t    ;;\n\tesac\n\t;;\n      tandem*)\n\tcase $cc_basename in\n\t  NCC*)\n\t    # NonStop-UX NCC 3.20\n\t    lt_prog_compiler_pic_CXX='-KPIC'\n\t    ;;\n\t  *)\n\t    ;;\n\tesac\n\t;;\n      vxworks*)\n\t;;\n      *)\n\tlt_prog_compiler_can_build_shared_CXX=no\n\t;;\n    esac\n  fi\n\ncase $host_os in\n  # For platforms which do not support PIC, -DPIC is meaningless:\n  *djgpp*)\n    lt_prog_compiler_pic_CXX=\n    ;;\n  *)\n    lt_prog_compiler_pic_CXX=\"$lt_prog_compiler_pic_CXX -DPIC\"\n    ;;\nesac\n\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC\" >&5\n$as_echo_n \"checking for $compiler option to produce PIC... \" >&6; }\nif ${lt_cv_prog_compiler_pic_CXX+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  lt_cv_prog_compiler_pic_CXX=$lt_prog_compiler_pic_CXX\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_CXX\" >&5\n$as_echo \"$lt_cv_prog_compiler_pic_CXX\" >&6; }\nlt_prog_compiler_pic_CXX=$lt_cv_prog_compiler_pic_CXX\n\n#\n# Check to make sure the PIC flag actually works.\n#\nif test -n \"$lt_prog_compiler_pic_CXX\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works\" >&5\n$as_echo_n \"checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... \" >&6; }\nif ${lt_cv_prog_compiler_pic_works_CXX+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  lt_cv_prog_compiler_pic_works_CXX=no\n   ac_outfile=conftest.$ac_objext\n   echo \"$lt_simple_compile_test_code\" > conftest.$ac_ext\n   lt_compiler_flag=\"$lt_prog_compiler_pic_CXX -DPIC\"\n   # Insert the option either (1) after the last *FLAGS variable, or\n   # (2) before a word containing \"conftest.\", or (3) at the end.\n   # Note that $ac_compile itself does not contain backslashes and begins\n   # with a dollar sign (not a hyphen), so the echo should work correctly.\n   # The option is referenced via a variable to avoid confusing sed.\n   lt_compile=`echo \"$ac_compile\" | $SED \\\n   -e 's:.*FLAGS}\\{0,1\\} :&$lt_compiler_flag :; t' \\\n   -e 's: [^ ]*conftest\\.: $lt_compiler_flag&:; t' \\\n   -e 's:$: $lt_compiler_flag:'`\n   (eval echo \"\\\"\\$as_me:$LINENO: $lt_compile\\\"\" >&5)\n   (eval \"$lt_compile\" 2>conftest.err)\n   ac_status=$?\n   cat conftest.err >&5\n   echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n   if (exit $ac_status) && test -s \"$ac_outfile\"; then\n     # The compiler can only warn and ignore the option if not recognized\n     # So say no if there are warnings other than the usual output.\n     $ECHO \"$_lt_compiler_boilerplate\" | $SED '/^$/d' >conftest.exp\n     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2\n     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then\n       lt_cv_prog_compiler_pic_works_CXX=yes\n     fi\n   fi\n   $RM conftest*\n\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX\" >&5\n$as_echo \"$lt_cv_prog_compiler_pic_works_CXX\" >&6; }\n\nif test x\"$lt_cv_prog_compiler_pic_works_CXX\" = xyes; then\n    case $lt_prog_compiler_pic_CXX in\n     \"\" | \" \"*) ;;\n     *) lt_prog_compiler_pic_CXX=\" $lt_prog_compiler_pic_CXX\" ;;\n     esac\nelse\n    lt_prog_compiler_pic_CXX=\n     lt_prog_compiler_can_build_shared_CXX=no\nfi\n\nfi\n\n\n\n\n\n#\n# Check to make sure the static flag actually works.\n#\nwl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\\\"$lt_prog_compiler_static_CXX\\\"\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works\" >&5\n$as_echo_n \"checking if $compiler static flag $lt_tmp_static_flag works... \" >&6; }\nif ${lt_cv_prog_compiler_static_works_CXX+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  lt_cv_prog_compiler_static_works_CXX=no\n   save_LDFLAGS=\"$LDFLAGS\"\n   LDFLAGS=\"$LDFLAGS $lt_tmp_static_flag\"\n   echo \"$lt_simple_link_test_code\" > conftest.$ac_ext\n   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then\n     # The linker can only warn and ignore the option if not recognized\n     # So say no if there are warnings\n     if test -s conftest.err; then\n       # Append any errors to the config.log.\n       cat conftest.err 1>&5\n       $ECHO \"$_lt_linker_boilerplate\" | $SED '/^$/d' > conftest.exp\n       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2\n       if diff conftest.exp conftest.er2 >/dev/null; then\n         lt_cv_prog_compiler_static_works_CXX=yes\n       fi\n     else\n       lt_cv_prog_compiler_static_works_CXX=yes\n     fi\n   fi\n   $RM -r conftest*\n   LDFLAGS=\"$save_LDFLAGS\"\n\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX\" >&5\n$as_echo \"$lt_cv_prog_compiler_static_works_CXX\" >&6; }\n\nif test x\"$lt_cv_prog_compiler_static_works_CXX\" = xyes; then\n    :\nelse\n    lt_prog_compiler_static_CXX=\nfi\n\n\n\n\n    { $as_echo \"$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext\" >&5\n$as_echo_n \"checking if $compiler supports -c -o file.$ac_objext... \" >&6; }\nif ${lt_cv_prog_compiler_c_o_CXX+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  lt_cv_prog_compiler_c_o_CXX=no\n   $RM -r conftest 2>/dev/null\n   mkdir conftest\n   cd conftest\n   mkdir out\n   echo \"$lt_simple_compile_test_code\" > conftest.$ac_ext\n\n   lt_compiler_flag=\"-o out/conftest2.$ac_objext\"\n   # Insert the option either (1) after the last *FLAGS variable, or\n   # (2) before a word containing \"conftest.\", or (3) at the end.\n   # Note that $ac_compile itself does not contain backslashes and begins\n   # with a dollar sign (not a hyphen), so the echo should work correctly.\n   lt_compile=`echo \"$ac_compile\" | $SED \\\n   -e 's:.*FLAGS}\\{0,1\\} :&$lt_compiler_flag :; t' \\\n   -e 's: [^ ]*conftest\\.: $lt_compiler_flag&:; t' \\\n   -e 's:$: $lt_compiler_flag:'`\n   (eval echo \"\\\"\\$as_me:$LINENO: $lt_compile\\\"\" >&5)\n   (eval \"$lt_compile\" 2>out/conftest.err)\n   ac_status=$?\n   cat out/conftest.err >&5\n   echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n   if (exit $ac_status) && test -s out/conftest2.$ac_objext\n   then\n     # The compiler can only warn and ignore the option if not recognized\n     # So say no if there are warnings\n     $ECHO \"$_lt_compiler_boilerplate\" | $SED '/^$/d' > out/conftest.exp\n     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2\n     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then\n       lt_cv_prog_compiler_c_o_CXX=yes\n     fi\n   fi\n   chmod u+w . 2>&5\n   $RM conftest*\n   # SGI C++ compiler will create directory out/ii_files/ for\n   # template instantiation\n   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files\n   $RM out/* && rmdir out\n   cd ..\n   $RM -r conftest\n   $RM conftest*\n\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX\" >&5\n$as_echo \"$lt_cv_prog_compiler_c_o_CXX\" >&6; }\n\n\n\n    { $as_echo \"$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext\" >&5\n$as_echo_n \"checking if $compiler supports -c -o file.$ac_objext... \" >&6; }\nif ${lt_cv_prog_compiler_c_o_CXX+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  lt_cv_prog_compiler_c_o_CXX=no\n   $RM -r conftest 2>/dev/null\n   mkdir conftest\n   cd conftest\n   mkdir out\n   echo \"$lt_simple_compile_test_code\" > conftest.$ac_ext\n\n   lt_compiler_flag=\"-o out/conftest2.$ac_objext\"\n   # Insert the option either (1) after the last *FLAGS variable, or\n   # (2) before a word containing \"conftest.\", or (3) at the end.\n   # Note that $ac_compile itself does not contain backslashes and begins\n   # with a dollar sign (not a hyphen), so the echo should work correctly.\n   lt_compile=`echo \"$ac_compile\" | $SED \\\n   -e 's:.*FLAGS}\\{0,1\\} :&$lt_compiler_flag :; t' \\\n   -e 's: [^ ]*conftest\\.: $lt_compiler_flag&:; t' \\\n   -e 's:$: $lt_compiler_flag:'`\n   (eval echo \"\\\"\\$as_me:$LINENO: $lt_compile\\\"\" >&5)\n   (eval \"$lt_compile\" 2>out/conftest.err)\n   ac_status=$?\n   cat out/conftest.err >&5\n   echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n   if (exit $ac_status) && test -s out/conftest2.$ac_objext\n   then\n     # The compiler can only warn and ignore the option if not recognized\n     # So say no if there are warnings\n     $ECHO \"$_lt_compiler_boilerplate\" | $SED '/^$/d' > out/conftest.exp\n     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2\n     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then\n       lt_cv_prog_compiler_c_o_CXX=yes\n     fi\n   fi\n   chmod u+w . 2>&5\n   $RM conftest*\n   # SGI C++ compiler will create directory out/ii_files/ for\n   # template instantiation\n   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files\n   $RM out/* && rmdir out\n   cd ..\n   $RM -r conftest\n   $RM conftest*\n\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX\" >&5\n$as_echo \"$lt_cv_prog_compiler_c_o_CXX\" >&6; }\n\n\n\n\nhard_links=\"nottested\"\nif test \"$lt_cv_prog_compiler_c_o_CXX\" = no && test \"$need_locks\" != no; then\n  # do not overwrite the value of need_locks provided by the user\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links\" >&5\n$as_echo_n \"checking if we can lock with hard links... \" >&6; }\n  hard_links=yes\n  $RM conftest*\n  ln conftest.a conftest.b 2>/dev/null && hard_links=no\n  touch conftest.a\n  ln conftest.a conftest.b 2>&5 || hard_links=no\n  ln conftest.a conftest.b 2>/dev/null && hard_links=no\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $hard_links\" >&5\n$as_echo \"$hard_links\" >&6; }\n  if test \"$hard_links\" = no; then\n    { $as_echo \"$as_me:${as_lineno-$LINENO}: WARNING: \\`$CC' does not support \\`-c -o', so \\`make -j' may be unsafe\" >&5\n$as_echo \"$as_me: WARNING: \\`$CC' does not support \\`-c -o', so \\`make -j' may be unsafe\" >&2;}\n    need_locks=warn\n  fi\nelse\n  need_locks=no\nfi\n\n\n\n    { $as_echo \"$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries\" >&5\n$as_echo_n \"checking whether the $compiler linker ($LD) supports shared libraries... \" >&6; }\n\n  export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\\''s/.* //'\\'' | sort | uniq > $export_symbols'\n  exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'\n  case $host_os in\n  aix[4-9]*)\n    # If we're using GNU nm, then we don't want the \"-C\" option.\n    # -C means demangle to AIX nm, but means don't demangle with GNU nm\n    # Also, AIX nm treats weak defined symbols like other global defined\n    # symbols, whereas GNU nm marks them as \"W\".\n    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then\n      export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\\''{ if (((\\$ 2 == \"T\") || (\\$ 2 == \"D\") || (\\$ 2 == \"B\") || (\\$ 2 == \"W\")) && (substr(\\$ 3,1,1) != \".\")) { print \\$ 3 } }'\\'' | sort -u > $export_symbols'\n    else\n      export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\\''{ if (((\\$ 2 == \"T\") || (\\$ 2 == \"D\") || (\\$ 2 == \"B\")) && (substr(\\$ 3,1,1) != \".\")) { print \\$ 3 } }'\\'' | sort -u > $export_symbols'\n    fi\n    ;;\n  pw32*)\n    export_symbols_cmds_CXX=\"$ltdll_cmds\"\n    ;;\n  cygwin* | mingw* | cegcc*)\n    case $cc_basename in\n    cl*)\n      exclude_expsyms_CXX='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'\n      ;;\n    *)\n      export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\\''/^[BCDGRS][ ]/s/.*[ ]\\([^ ]*\\)/\\1 DATA/;s/^.*[ ]__nm__\\([^ ]*\\)[ ][^ ]*/\\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\\'' | sort | uniq > $export_symbols'\n      exclude_expsyms_CXX='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'\n      ;;\n    esac\n    ;;\n  linux* | k*bsd*-gnu | gnu*)\n    link_all_deplibs_CXX=no\n    ;;\n  *)\n    export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\\''s/.* //'\\'' | sort | uniq > $export_symbols'\n    ;;\n  esac\n\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX\" >&5\n$as_echo \"$ld_shlibs_CXX\" >&6; }\ntest \"$ld_shlibs_CXX\" = no && can_build_shared=no\n\nwith_gnu_ld_CXX=$with_gnu_ld\n\n\n\n\n\n\n#\n# Do we need to explicitly link libc?\n#\ncase \"x$archive_cmds_need_lc_CXX\" in\nx|xyes)\n  # Assume -lc should be added\n  archive_cmds_need_lc_CXX=yes\n\n  if test \"$enable_shared\" = yes && test \"$GCC\" = yes; then\n    case $archive_cmds_CXX in\n    *'~'*)\n      # FIXME: we may have to deal with multi-command sequences.\n      ;;\n    '$CC '*)\n      # Test whether the compiler implicitly links with -lc since on some\n      # systems, -lgcc has to come before -lc. If gcc already passes -lc\n      # to ld, don't add -lc before -lgcc.\n      { $as_echo \"$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in\" >&5\n$as_echo_n \"checking whether -lc should be explicitly linked in... \" >&6; }\nif ${lt_cv_archive_cmds_need_lc_CXX+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  $RM conftest*\n\techo \"$lt_simple_compile_test_code\" > conftest.$ac_ext\n\n\tif { { eval echo \"\\\"\\$as_me\\\":${as_lineno-$LINENO}: \\\"$ac_compile\\\"\"; } >&5\n  (eval $ac_compile) 2>&5\n  ac_status=$?\n  $as_echo \"$as_me:${as_lineno-$LINENO}: \\$? = $ac_status\" >&5\n  test $ac_status = 0; } 2>conftest.err; then\n\t  soname=conftest\n\t  lib=conftest\n\t  libobjs=conftest.$ac_objext\n\t  deplibs=\n\t  wl=$lt_prog_compiler_wl_CXX\n\t  pic_flag=$lt_prog_compiler_pic_CXX\n\t  compiler_flags=-v\n\t  linker_flags=-v\n\t  verstring=\n\t  output_objdir=.\n\t  libname=conftest\n\t  lt_save_allow_undefined_flag=$allow_undefined_flag_CXX\n\t  allow_undefined_flag_CXX=\n\t  if { { eval echo \"\\\"\\$as_me\\\":${as_lineno-$LINENO}: \\\"$archive_cmds_CXX 2\\>\\&1 \\| $GREP \\\" -lc \\\" \\>/dev/null 2\\>\\&1\\\"\"; } >&5\n  (eval $archive_cmds_CXX 2\\>\\&1 \\| $GREP \\\" -lc \\\" \\>/dev/null 2\\>\\&1) 2>&5\n  ac_status=$?\n  $as_echo \"$as_me:${as_lineno-$LINENO}: \\$? = $ac_status\" >&5\n  test $ac_status = 0; }\n\t  then\n\t    lt_cv_archive_cmds_need_lc_CXX=no\n\t  else\n\t    lt_cv_archive_cmds_need_lc_CXX=yes\n\t  fi\n\t  allow_undefined_flag_CXX=$lt_save_allow_undefined_flag\n\telse\n\t  cat conftest.err 1>&5\n\tfi\n\t$RM conftest*\n\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_CXX\" >&5\n$as_echo \"$lt_cv_archive_cmds_need_lc_CXX\" >&6; }\n      archive_cmds_need_lc_CXX=$lt_cv_archive_cmds_need_lc_CXX\n      ;;\n    esac\n  fi\n  ;;\nesac\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n    { $as_echo \"$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics\" >&5\n$as_echo_n \"checking dynamic linker characteristics... \" >&6; }\n\nlibrary_names_spec=\nlibname_spec='lib$name'\nsoname_spec=\nshrext_cmds=\".so\"\npostinstall_cmds=\npostuninstall_cmds=\nfinish_cmds=\nfinish_eval=\nshlibpath_var=\nshlibpath_overrides_runpath=unknown\nversion_type=none\ndynamic_linker=\"$host_os ld.so\"\nsys_lib_dlsearch_path_spec=\"/lib /usr/lib\"\nneed_lib_prefix=unknown\nhardcode_into_libs=no\n\n# when you set need_version to no, make sure it does not cause -set_version\n# flags to be left without arguments\nneed_version=unknown\n\ncase $host_os in\naix3*)\n  version_type=linux # correct to gnu/linux during the next big refactor\n  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'\n  shlibpath_var=LIBPATH\n\n  # AIX 3 has no versioning support, so we append a major version to the name.\n  soname_spec='${libname}${release}${shared_ext}$major'\n  ;;\n\naix[4-9]*)\n  version_type=linux # correct to gnu/linux during the next big refactor\n  need_lib_prefix=no\n  need_version=no\n  hardcode_into_libs=yes\n  if test \"$host_cpu\" = ia64; then\n    # AIX 5 supports IA64\n    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'\n    shlibpath_var=LD_LIBRARY_PATH\n  else\n    # With GCC up to 2.95.x, collect2 would create an import file\n    # for dependence libraries.  The import file would start with\n    # the line `#! .'.  This would cause the generated library to\n    # depend on `.', always an invalid library.  This was fixed in\n    # development snapshots of GCC prior to 3.0.\n    case $host_os in\n      aix4 | aix4.[01] | aix4.[01].*)\n      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'\n\t   echo ' yes '\n\t   echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then\n\t:\n      else\n\tcan_build_shared=no\n      fi\n      ;;\n    esac\n    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct\n    # soname into executable. Probably we can add versioning support to\n    # collect2, so additional links can be useful in future.\n    if test \"$aix_use_runtimelinking\" = yes; then\n      # If using run time linking (on AIX 4.2 or later) use lib<name>.so\n      # instead of lib<name>.a to let people know that these are not\n      # typical AIX shared libraries.\n      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n    else\n      # We preserve .a as extension for shared libraries through AIX4.2\n      # and later when we are not doing run time linking.\n      library_names_spec='${libname}${release}.a $libname.a'\n      soname_spec='${libname}${release}${shared_ext}$major'\n    fi\n    shlibpath_var=LIBPATH\n  fi\n  ;;\n\namigaos*)\n  case $host_cpu in\n  powerpc)\n    # Since July 2007 AmigaOS4 officially supports .so libraries.\n    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.\n    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n    ;;\n  m68k)\n    library_names_spec='$libname.ixlibrary $libname.a'\n    # Create ${libname}_ixlibrary.a entries in /sys/libs.\n    finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all \"$lib\" | $SED '\\''s%^.*/\\([^/]*\\)\\.ixlibrary$%\\1%'\\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show \"cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a\"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'\n    ;;\n  esac\n  ;;\n\nbeos*)\n  library_names_spec='${libname}${shared_ext}'\n  dynamic_linker=\"$host_os ld.so\"\n  shlibpath_var=LIBRARY_PATH\n  ;;\n\nbsdi[45]*)\n  version_type=linux # correct to gnu/linux during the next big refactor\n  need_version=no\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  finish_cmds='PATH=\"\\$PATH:/sbin\" ldconfig $libdir'\n  shlibpath_var=LD_LIBRARY_PATH\n  sys_lib_search_path_spec=\"/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib\"\n  sys_lib_dlsearch_path_spec=\"/shlib /usr/lib /usr/local/lib\"\n  # the default ld.so.conf also contains /usr/contrib/lib and\n  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow\n  # libtool to hard-code these into programs\n  ;;\n\ncygwin* | mingw* | pw32* | cegcc*)\n  version_type=windows\n  shrext_cmds=\".dll\"\n  need_version=no\n  need_lib_prefix=no\n\n  case $GCC,$cc_basename in\n  yes,*)\n    # gcc\n    library_names_spec='$libname.dll.a'\n    # DLL is installed to $(libdir)/../bin by postinstall_cmds\n    postinstall_cmds='base_file=`basename \\${file}`~\n      dlpath=`$SHELL 2>&1 -c '\\''. $dir/'\\''\\${base_file}'\\''i; echo \\$dlname'\\''`~\n      dldir=$destdir/`dirname \\$dlpath`~\n      test -d \\$dldir || mkdir -p \\$dldir~\n      $install_prog $dir/$dlname \\$dldir/$dlname~\n      chmod a+x \\$dldir/$dlname~\n      if test -n '\\''$stripme'\\'' && test -n '\\''$striplib'\\''; then\n        eval '\\''$striplib \\$dldir/$dlname'\\'' || exit \\$?;\n      fi'\n    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\\''. $file; echo \\$dlname'\\''`~\n      dlpath=$dir/\\$dldll~\n       $RM \\$dlpath'\n    shlibpath_overrides_runpath=yes\n\n    case $host_os in\n    cygwin*)\n      # Cygwin DLLs use 'cyg' prefix rather than 'lib'\n      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'\n\n      ;;\n    mingw* | cegcc*)\n      # MinGW DLLs use traditional 'lib' prefix\n      soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'\n      ;;\n    pw32*)\n      # pw32 DLLs use 'pw' prefix rather than 'lib'\n      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'\n      ;;\n    esac\n    dynamic_linker='Win32 ld.exe'\n    ;;\n\n  *,cl*)\n    # Native MSVC\n    libname_spec='$name'\n    soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'\n    library_names_spec='${libname}.dll.lib'\n\n    case $build_os in\n    mingw*)\n      sys_lib_search_path_spec=\n      lt_save_ifs=$IFS\n      IFS=';'\n      for lt_path in $LIB\n      do\n        IFS=$lt_save_ifs\n        # Let DOS variable expansion print the short 8.3 style file name.\n        lt_path=`cd \"$lt_path\" 2>/dev/null && cmd //C \"for %i in (\".\") do @echo %~si\"`\n        sys_lib_search_path_spec=\"$sys_lib_search_path_spec $lt_path\"\n      done\n      IFS=$lt_save_ifs\n      # Convert to MSYS style.\n      sys_lib_search_path_spec=`$ECHO \"$sys_lib_search_path_spec\" | sed -e 's|\\\\\\\\|/|g' -e 's| \\\\([a-zA-Z]\\\\):| /\\\\1|g' -e 's|^ ||'`\n      ;;\n    cygwin*)\n      # Convert to unix form, then to dos form, then back to unix form\n      # but this time dos style (no spaces!) so that the unix form looks\n      # like /cygdrive/c/PROGRA~1:/cygdr...\n      sys_lib_search_path_spec=`cygpath --path --unix \"$LIB\"`\n      sys_lib_search_path_spec=`cygpath --path --dos \"$sys_lib_search_path_spec\" 2>/dev/null`\n      sys_lib_search_path_spec=`cygpath --path --unix \"$sys_lib_search_path_spec\" | $SED -e \"s/$PATH_SEPARATOR/ /g\"`\n      ;;\n    *)\n      sys_lib_search_path_spec=\"$LIB\"\n      if $ECHO \"$sys_lib_search_path_spec\" | $GREP ';[c-zC-Z]:/' >/dev/null; then\n        # It is most probably a Windows format PATH.\n        sys_lib_search_path_spec=`$ECHO \"$sys_lib_search_path_spec\" | $SED -e 's/;/ /g'`\n      else\n        sys_lib_search_path_spec=`$ECHO \"$sys_lib_search_path_spec\" | $SED -e \"s/$PATH_SEPARATOR/ /g\"`\n      fi\n      # FIXME: find the short name or the path components, as spaces are\n      # common. (e.g. \"Program Files\" -> \"PROGRA~1\")\n      ;;\n    esac\n\n    # DLL is installed to $(libdir)/../bin by postinstall_cmds\n    postinstall_cmds='base_file=`basename \\${file}`~\n      dlpath=`$SHELL 2>&1 -c '\\''. $dir/'\\''\\${base_file}'\\''i; echo \\$dlname'\\''`~\n      dldir=$destdir/`dirname \\$dlpath`~\n      test -d \\$dldir || mkdir -p \\$dldir~\n      $install_prog $dir/$dlname \\$dldir/$dlname'\n    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\\''. $file; echo \\$dlname'\\''`~\n      dlpath=$dir/\\$dldll~\n       $RM \\$dlpath'\n    shlibpath_overrides_runpath=yes\n    dynamic_linker='Win32 link.exe'\n    ;;\n\n  *)\n    # Assume MSVC wrapper\n    library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'\n    dynamic_linker='Win32 ld.exe'\n    ;;\n  esac\n  # FIXME: first we should search . and the directory the executable is in\n  shlibpath_var=PATH\n  ;;\n\ndarwin* | rhapsody*)\n  dynamic_linker=\"$host_os dyld\"\n  version_type=darwin\n  need_lib_prefix=no\n  need_version=no\n  library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'\n  soname_spec='${libname}${release}${major}$shared_ext'\n  shlibpath_overrides_runpath=yes\n  shlibpath_var=DYLD_LIBRARY_PATH\n  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'\n\n  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'\n  ;;\n\ndgux*)\n  version_type=linux # correct to gnu/linux during the next big refactor\n  need_lib_prefix=no\n  need_version=no\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  shlibpath_var=LD_LIBRARY_PATH\n  ;;\n\nfreebsd* | dragonfly*)\n  # DragonFly does not have aout.  When/if they implement a new\n  # versioning mechanism, adjust this.\n  if test -x /usr/bin/objformat; then\n    objformat=`/usr/bin/objformat`\n  else\n    case $host_os in\n    freebsd[23].*) objformat=aout ;;\n    *) objformat=elf ;;\n    esac\n  fi\n  version_type=freebsd-$objformat\n  case $version_type in\n    freebsd-elf*)\n      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'\n      need_version=no\n      need_lib_prefix=no\n      ;;\n    freebsd-*)\n      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'\n      need_version=yes\n      ;;\n  esac\n  shlibpath_var=LD_LIBRARY_PATH\n  case $host_os in\n  freebsd2.*)\n    shlibpath_overrides_runpath=yes\n    ;;\n  freebsd3.[01]* | freebsdelf3.[01]*)\n    shlibpath_overrides_runpath=yes\n    hardcode_into_libs=yes\n    ;;\n  freebsd3.[2-9]* | freebsdelf3.[2-9]* | \\\n  freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)\n    shlibpath_overrides_runpath=no\n    hardcode_into_libs=yes\n    ;;\n  *) # from 4.6 on, and DragonFly\n    shlibpath_overrides_runpath=yes\n    hardcode_into_libs=yes\n    ;;\n  esac\n  ;;\n\nhaiku*)\n  version_type=linux # correct to gnu/linux during the next big refactor\n  need_lib_prefix=no\n  need_version=no\n  dynamic_linker=\"$host_os runtime_loader\"\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  shlibpath_var=LIBRARY_PATH\n  shlibpath_overrides_runpath=yes\n  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'\n  hardcode_into_libs=yes\n  ;;\n\nhpux9* | hpux10* | hpux11*)\n  # Give a soname corresponding to the major version so that dld.sl refuses to\n  # link against other versions.\n  version_type=sunos\n  need_lib_prefix=no\n  need_version=no\n  case $host_cpu in\n  ia64*)\n    shrext_cmds='.so'\n    hardcode_into_libs=yes\n    dynamic_linker=\"$host_os dld.so\"\n    shlibpath_var=LD_LIBRARY_PATH\n    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.\n    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n    soname_spec='${libname}${release}${shared_ext}$major'\n    if test \"X$HPUX_IA64_MODE\" = X32; then\n      sys_lib_search_path_spec=\"/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib\"\n    else\n      sys_lib_search_path_spec=\"/usr/lib/hpux64 /usr/local/lib/hpux64\"\n    fi\n    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec\n    ;;\n  hppa*64*)\n    shrext_cmds='.sl'\n    hardcode_into_libs=yes\n    dynamic_linker=\"$host_os dld.sl\"\n    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH\n    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.\n    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n    soname_spec='${libname}${release}${shared_ext}$major'\n    sys_lib_search_path_spec=\"/usr/lib/pa20_64 /usr/ccs/lib/pa20_64\"\n    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec\n    ;;\n  *)\n    shrext_cmds='.sl'\n    dynamic_linker=\"$host_os dld.sl\"\n    shlibpath_var=SHLIB_PATH\n    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH\n    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n    soname_spec='${libname}${release}${shared_ext}$major'\n    ;;\n  esac\n  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...\n  postinstall_cmds='chmod 555 $lib'\n  # or fails outright, so override atomically:\n  install_override_mode=555\n  ;;\n\ninterix[3-9]*)\n  version_type=linux # correct to gnu/linux during the next big refactor\n  need_lib_prefix=no\n  need_version=no\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'\n  shlibpath_var=LD_LIBRARY_PATH\n  shlibpath_overrides_runpath=no\n  hardcode_into_libs=yes\n  ;;\n\nirix5* | irix6* | nonstopux*)\n  case $host_os in\n    nonstopux*) version_type=nonstopux ;;\n    *)\n\tif test \"$lt_cv_prog_gnu_ld\" = yes; then\n\t\tversion_type=linux # correct to gnu/linux during the next big refactor\n\telse\n\t\tversion_type=irix\n\tfi ;;\n  esac\n  need_lib_prefix=no\n  need_version=no\n  soname_spec='${libname}${release}${shared_ext}$major'\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'\n  case $host_os in\n  irix5* | nonstopux*)\n    libsuff= shlibsuff=\n    ;;\n  *)\n    case $LD in # libtool.m4 will add one of these switches to LD\n    *-32|*\"-32 \"|*-melf32bsmip|*\"-melf32bsmip \")\n      libsuff= shlibsuff= libmagic=32-bit;;\n    *-n32|*\"-n32 \"|*-melf32bmipn32|*\"-melf32bmipn32 \")\n      libsuff=32 shlibsuff=N32 libmagic=N32;;\n    *-64|*\"-64 \"|*-melf64bmip|*\"-melf64bmip \")\n      libsuff=64 shlibsuff=64 libmagic=64-bit;;\n    *) libsuff= shlibsuff= libmagic=never-match;;\n    esac\n    ;;\n  esac\n  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH\n  shlibpath_overrides_runpath=no\n  sys_lib_search_path_spec=\"/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}\"\n  sys_lib_dlsearch_path_spec=\"/usr/lib${libsuff} /lib${libsuff}\"\n  hardcode_into_libs=yes\n  ;;\n\n# No shared lib support for Linux oldld, aout, or coff.\nlinux*oldld* | linux*aout* | linux*coff*)\n  dynamic_linker=no\n  ;;\n\n# This must be glibc/ELF.\nlinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)\n  version_type=linux # correct to gnu/linux during the next big refactor\n  need_lib_prefix=no\n  need_version=no\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  finish_cmds='PATH=\"\\$PATH:/sbin\" ldconfig -n $libdir'\n  shlibpath_var=LD_LIBRARY_PATH\n  shlibpath_overrides_runpath=no\n\n  # Some binutils ld are patched to set DT_RUNPATH\n  if ${lt_cv_shlibpath_overrides_runpath+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  lt_cv_shlibpath_overrides_runpath=no\n    save_LDFLAGS=$LDFLAGS\n    save_libdir=$libdir\n    eval \"libdir=/foo; wl=\\\"$lt_prog_compiler_wl_CXX\\\"; \\\n\t LDFLAGS=\\\"\\$LDFLAGS $hardcode_libdir_flag_spec_CXX\\\"\"\n    cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n\nint\nmain ()\n{\n\n  ;\n  return 0;\n}\n_ACEOF\nif ac_fn_cxx_try_link \"$LINENO\"; then :\n  if  ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep \"RUNPATH.*$libdir\" >/dev/null; then :\n  lt_cv_shlibpath_overrides_runpath=yes\nfi\nfi\nrm -f core conftest.err conftest.$ac_objext \\\n    conftest$ac_exeext conftest.$ac_ext\n    LDFLAGS=$save_LDFLAGS\n    libdir=$save_libdir\n\nfi\n\n  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath\n\n  # This implies no fast_install, which is unacceptable.\n  # Some rework will be needed to allow for fast_install\n  # before this can be enabled.\n  hardcode_into_libs=yes\n\n  # Append ld.so.conf contents to the search path\n  if test -f /etc/ld.so.conf; then\n    lt_ld_extra=`awk '/^include / { system(sprintf(\"cd /etc; cat %s 2>/dev/null\", \\$2)); skip = 1; } { if (!skip) print \\$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[\t ]*hwcap[\t ]/d;s/[:,\t]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/\"//g;/^$/d' | tr '\\n' ' '`\n    sys_lib_dlsearch_path_spec=\"/lib /usr/lib $lt_ld_extra\"\n  fi\n\n  # We used to test for /lib/ld.so.1 and disable shared libraries on\n  # powerpc, because MkLinux only supported shared libraries with the\n  # GNU dynamic linker.  Since this was broken with cross compilers,\n  # most powerpc-linux boxes support dynamic linking these days and\n  # people can always --disable-shared, the test was removed, and we\n  # assume the GNU/Linux dynamic linker is in use.\n  dynamic_linker='GNU/Linux ld.so'\n  ;;\n\nnetbsdelf*-gnu)\n  version_type=linux\n  need_lib_prefix=no\n  need_version=no\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  shlibpath_var=LD_LIBRARY_PATH\n  shlibpath_overrides_runpath=no\n  hardcode_into_libs=yes\n  dynamic_linker='NetBSD ld.elf_so'\n  ;;\n\nnetbsd*)\n  version_type=sunos\n  need_lib_prefix=no\n  need_version=no\n  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then\n    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'\n    finish_cmds='PATH=\"\\$PATH:/sbin\" ldconfig -m $libdir'\n    dynamic_linker='NetBSD (a.out) ld.so'\n  else\n    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'\n    soname_spec='${libname}${release}${shared_ext}$major'\n    dynamic_linker='NetBSD ld.elf_so'\n  fi\n  shlibpath_var=LD_LIBRARY_PATH\n  shlibpath_overrides_runpath=yes\n  hardcode_into_libs=yes\n  ;;\n\nnewsos6)\n  version_type=linux # correct to gnu/linux during the next big refactor\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n  shlibpath_var=LD_LIBRARY_PATH\n  shlibpath_overrides_runpath=yes\n  ;;\n\n*nto* | *qnx*)\n  version_type=qnx\n  need_lib_prefix=no\n  need_version=no\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  shlibpath_var=LD_LIBRARY_PATH\n  shlibpath_overrides_runpath=no\n  hardcode_into_libs=yes\n  dynamic_linker='ldqnx.so'\n  ;;\n\nopenbsd*)\n  version_type=sunos\n  sys_lib_dlsearch_path_spec=\"/usr/lib\"\n  need_lib_prefix=no\n  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.\n  case $host_os in\n    openbsd3.3 | openbsd3.3.*)\tneed_version=yes ;;\n    *)\t\t\t\tneed_version=no  ;;\n  esac\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'\n  finish_cmds='PATH=\"\\$PATH:/sbin\" ldconfig -m $libdir'\n  shlibpath_var=LD_LIBRARY_PATH\n  if test -z \"`echo __ELF__ | $CC -E - | $GREP __ELF__`\" || test \"$host_os-$host_cpu\" = \"openbsd2.8-powerpc\"; then\n    case $host_os in\n      openbsd2.[89] | openbsd2.[89].*)\n\tshlibpath_overrides_runpath=no\n\t;;\n      *)\n\tshlibpath_overrides_runpath=yes\n\t;;\n      esac\n  else\n    shlibpath_overrides_runpath=yes\n  fi\n  ;;\n\nos2*)\n  libname_spec='$name'\n  shrext_cmds=\".dll\"\n  need_lib_prefix=no\n  library_names_spec='$libname${shared_ext} $libname.a'\n  dynamic_linker='OS/2 ld.exe'\n  shlibpath_var=LIBPATH\n  ;;\n\nosf3* | osf4* | osf5*)\n  version_type=osf\n  need_lib_prefix=no\n  need_version=no\n  soname_spec='${libname}${release}${shared_ext}$major'\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n  shlibpath_var=LD_LIBRARY_PATH\n  sys_lib_search_path_spec=\"/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib\"\n  sys_lib_dlsearch_path_spec=\"$sys_lib_search_path_spec\"\n  ;;\n\nrdos*)\n  dynamic_linker=no\n  ;;\n\nsolaris*)\n  version_type=linux # correct to gnu/linux during the next big refactor\n  need_lib_prefix=no\n  need_version=no\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  shlibpath_var=LD_LIBRARY_PATH\n  shlibpath_overrides_runpath=yes\n  hardcode_into_libs=yes\n  # ldd complains unless libraries are executable\n  postinstall_cmds='chmod +x $lib'\n  ;;\n\nsunos4*)\n  version_type=sunos\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'\n  finish_cmds='PATH=\"\\$PATH:/usr/etc\" ldconfig $libdir'\n  shlibpath_var=LD_LIBRARY_PATH\n  shlibpath_overrides_runpath=yes\n  if test \"$with_gnu_ld\" = yes; then\n    need_lib_prefix=no\n  fi\n  need_version=yes\n  ;;\n\nsysv4 | sysv4.3*)\n  version_type=linux # correct to gnu/linux during the next big refactor\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  shlibpath_var=LD_LIBRARY_PATH\n  case $host_vendor in\n    sni)\n      shlibpath_overrides_runpath=no\n      need_lib_prefix=no\n      runpath_var=LD_RUN_PATH\n      ;;\n    siemens)\n      need_lib_prefix=no\n      ;;\n    motorola)\n      need_lib_prefix=no\n      need_version=no\n      shlibpath_overrides_runpath=no\n      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'\n      ;;\n  esac\n  ;;\n\nsysv4*MP*)\n  if test -d /usr/nec ;then\n    version_type=linux # correct to gnu/linux during the next big refactor\n    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'\n    soname_spec='$libname${shared_ext}.$major'\n    shlibpath_var=LD_LIBRARY_PATH\n  fi\n  ;;\n\nsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)\n  version_type=freebsd-elf\n  need_lib_prefix=no\n  need_version=no\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  shlibpath_var=LD_LIBRARY_PATH\n  shlibpath_overrides_runpath=yes\n  hardcode_into_libs=yes\n  if test \"$with_gnu_ld\" = yes; then\n    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'\n  else\n    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'\n    case $host_os in\n      sco3.2v5*)\n        sys_lib_search_path_spec=\"$sys_lib_search_path_spec /lib\"\n\t;;\n    esac\n  fi\n  sys_lib_dlsearch_path_spec='/usr/lib'\n  ;;\n\ntpf*)\n  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.\n  version_type=linux # correct to gnu/linux during the next big refactor\n  need_lib_prefix=no\n  need_version=no\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n  shlibpath_var=LD_LIBRARY_PATH\n  shlibpath_overrides_runpath=no\n  hardcode_into_libs=yes\n  ;;\n\nuts4*)\n  version_type=linux # correct to gnu/linux during the next big refactor\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  shlibpath_var=LD_LIBRARY_PATH\n  ;;\n\n*)\n  dynamic_linker=no\n  ;;\nesac\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $dynamic_linker\" >&5\n$as_echo \"$dynamic_linker\" >&6; }\ntest \"$dynamic_linker\" = no && can_build_shared=no\n\nvariables_saved_for_relink=\"PATH $shlibpath_var $runpath_var\"\nif test \"$GCC\" = yes; then\n  variables_saved_for_relink=\"$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH\"\nfi\n\nif test \"${lt_cv_sys_lib_search_path_spec+set}\" = set; then\n  sys_lib_search_path_spec=\"$lt_cv_sys_lib_search_path_spec\"\nfi\nif test \"${lt_cv_sys_lib_dlsearch_path_spec+set}\" = set; then\n  sys_lib_dlsearch_path_spec=\"$lt_cv_sys_lib_dlsearch_path_spec\"\nfi\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n    { $as_echo \"$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs\" >&5\n$as_echo_n \"checking how to hardcode library paths into programs... \" >&6; }\nhardcode_action_CXX=\nif test -n \"$hardcode_libdir_flag_spec_CXX\" ||\n   test -n \"$runpath_var_CXX\" ||\n   test \"X$hardcode_automatic_CXX\" = \"Xyes\" ; then\n\n  # We can hardcode non-existent directories.\n  if test \"$hardcode_direct_CXX\" != no &&\n     # If the only mechanism to avoid hardcoding is shlibpath_var, we\n     # have to relink, otherwise we might link with an installed library\n     # when we should be linking with a yet-to-be-installed one\n     ## test \"$_LT_TAGVAR(hardcode_shlibpath_var, CXX)\" != no &&\n     test \"$hardcode_minus_L_CXX\" != no; then\n    # Linking always hardcodes the temporary library directory.\n    hardcode_action_CXX=relink\n  else\n    # We can link without hardcoding, and we can hardcode nonexisting dirs.\n    hardcode_action_CXX=immediate\n  fi\nelse\n  # We cannot hardcode anything, or else we can only hardcode existing\n  # directories.\n  hardcode_action_CXX=unsupported\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX\" >&5\n$as_echo \"$hardcode_action_CXX\" >&6; }\n\nif test \"$hardcode_action_CXX\" = relink ||\n   test \"$inherit_rpath_CXX\" = yes; then\n  # Fast installation is not supported\n  enable_fast_install=no\nelif test \"$shlibpath_overrides_runpath\" = yes ||\n     test \"$enable_shared\" = no; then\n  # Fast installation is not necessary\n  enable_fast_install=needless\nfi\n\n\n\n\n\n\n\n  fi # test -n \"$compiler\"\n\n  CC=$lt_save_CC\n  CFLAGS=$lt_save_CFLAGS\n  LDCXX=$LD\n  LD=$lt_save_LD\n  GCC=$lt_save_GCC\n  with_gnu_ld=$lt_save_with_gnu_ld\n  lt_cv_path_LDCXX=$lt_cv_path_LD\n  lt_cv_path_LD=$lt_save_path_LD\n  lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld\n  lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld\nfi # test \"$_lt_caught_CXX_error\" != yes\n\nac_ext=c\nac_cpp='$CPP $CPPFLAGS'\nac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'\nac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'\nac_compiler_gnu=$ac_cv_c_compiler_gnu\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n        ac_config_commands=\"$ac_config_commands libtool\"\n\n\n\n\n# Only expand once:\n\n\n\n# Transfer these variables to the Makefile\n\n\n\n\n\nac_config_files=\"$ac_config_files Makefile lib/Makefile include/Makefile bin/Makefile doc/Makefile portaudiocpp.pc\"\n\ncat >confcache <<\\_ACEOF\n# This file is a shell script that caches the results of configure\n# tests run on this system so they can be shared between configure\n# scripts and configure runs, see configure's option --config-cache.\n# It is not useful on other systems.  If it contains results you don't\n# want to keep, you may remove or edit it.\n#\n# config.status only pays attention to the cache file if you give it\n# the --recheck option to rerun configure.\n#\n# `ac_cv_env_foo' variables (set or unset) will be overridden when\n# loading this file, other *unset* `ac_cv_foo' will be assigned the\n# following values.\n\n_ACEOF\n\n# The following way of writing the cache mishandles newlines in values,\n# but we know of no workaround that is simple, portable, and efficient.\n# So, we kill variables containing newlines.\n# Ultrix sh set writes to stderr and can't be redirected directly,\n# and sets the high bit in the cache file unless we assign to the vars.\n(\n  for ac_var in `(set) 2>&1 | sed -n 's/^\\([a-zA-Z_][a-zA-Z0-9_]*\\)=.*/\\1/p'`; do\n    eval ac_val=\\$$ac_var\n    case $ac_val in #(\n    *${as_nl}*)\n      case $ac_var in #(\n      *_cv_*) { $as_echo \"$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline\" >&5\n$as_echo \"$as_me: WARNING: cache variable $ac_var contains a newline\" >&2;} ;;\n      esac\n      case $ac_var in #(\n      _ | IFS | as_nl) ;; #(\n      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(\n      *) { eval $ac_var=; unset $ac_var;} ;;\n      esac ;;\n    esac\n  done\n\n  (set) 2>&1 |\n    case $as_nl`(ac_space=' '; set) 2>&1` in #(\n    *${as_nl}ac_space=\\ *)\n      # `set' does not quote correctly, so add quotes: double-quote\n      # substitution turns \\\\\\\\ into \\\\, and sed turns \\\\ into \\.\n      sed -n \\\n\t\"s/'/'\\\\\\\\''/g;\n\t  s/^\\\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\\\)=\\\\(.*\\\\)/\\\\1='\\\\2'/p\"\n      ;; #(\n    *)\n      # `set' quotes correctly as required by POSIX, so do not add quotes.\n      sed -n \"/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p\"\n      ;;\n    esac |\n    sort\n) |\n  sed '\n     /^ac_cv_env_/b end\n     t clear\n     :clear\n     s/^\\([^=]*\\)=\\(.*[{}].*\\)$/test \"${\\1+set}\" = set || &/\n     t end\n     s/^\\([^=]*\\)=\\(.*\\)$/\\1=${\\1=\\2}/\n     :end' >>confcache\nif diff \"$cache_file\" confcache >/dev/null 2>&1; then :; else\n  if test -w \"$cache_file\"; then\n    if test \"x$cache_file\" != \"x/dev/null\"; then\n      { $as_echo \"$as_me:${as_lineno-$LINENO}: updating cache $cache_file\" >&5\n$as_echo \"$as_me: updating cache $cache_file\" >&6;}\n      if test ! -f \"$cache_file\" || test -h \"$cache_file\"; then\n\tcat confcache >\"$cache_file\"\n      else\n        case $cache_file in #(\n        */* | ?:*)\n\t  mv -f confcache \"$cache_file\"$$ &&\n\t  mv -f \"$cache_file\"$$ \"$cache_file\" ;; #(\n        *)\n\t  mv -f confcache \"$cache_file\" ;;\n\tesac\n      fi\n    fi\n  else\n    { $as_echo \"$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file\" >&5\n$as_echo \"$as_me: not updating unwritable cache $cache_file\" >&6;}\n  fi\nfi\nrm -f confcache\n\ntest \"x$prefix\" = xNONE && prefix=$ac_default_prefix\n# Let make expand exec_prefix.\ntest \"x$exec_prefix\" = xNONE && exec_prefix='${prefix}'\n\n# Transform confdefs.h into DEFS.\n# Protect against shell expansion while executing Makefile rules.\n# Protect against Makefile macro expansion.\n#\n# If the first sed substitution is executed (which looks for macros that\n# take arguments), then branch to the quote section.  Otherwise,\n# look for a macro that doesn't take arguments.\nac_script='\n:mline\n/\\\\$/{\n N\n s,\\\\\\n,,\n b mline\n}\nt clear\n:clear\ns/^[\t ]*#[\t ]*define[\t ][\t ]*\\([^\t (][^\t (]*([^)]*)\\)[\t ]*\\(.*\\)/-D\\1=\\2/g\nt quote\ns/^[\t ]*#[\t ]*define[\t ][\t ]*\\([^\t ][^\t ]*\\)[\t ]*\\(.*\\)/-D\\1=\\2/g\nt quote\nb any\n:quote\ns/[\t `~#$^&*(){}\\\\|;'\\''\"<>?]/\\\\&/g\ns/\\[/\\\\&/g\ns/\\]/\\\\&/g\ns/\\$/$$/g\nH\n:any\n${\n\tg\n\ts/^\\n//\n\ts/\\n/ /g\n\tp\n}\n'\nDEFS=`sed -n \"$ac_script\" confdefs.h`\n\n\nac_libobjs=\nac_ltlibobjs=\nU=\nfor ac_i in : $LIBOBJS; do test \"x$ac_i\" = x: && continue\n  # 1. Remove the extension, and $U if already installed.\n  ac_script='s/\\$U\\././;s/\\.o$//;s/\\.obj$//'\n  ac_i=`$as_echo \"$ac_i\" | sed \"$ac_script\"`\n  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR\n  #    will be set to the directory where LIBOBJS objects are built.\n  as_fn_append ac_libobjs \" \\${LIBOBJDIR}$ac_i\\$U.$ac_objext\"\n  as_fn_append ac_ltlibobjs \" \\${LIBOBJDIR}$ac_i\"'$U.lo'\ndone\nLIBOBJS=$ac_libobjs\n\nLTLIBOBJS=$ac_ltlibobjs\n\n\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure\" >&5\n$as_echo_n \"checking that generated files are newer than configure... \" >&6; }\n   if test -n \"$am_sleep_pid\"; then\n     # Hide warnings about reused PIDs.\n     wait $am_sleep_pid 2>/dev/null\n   fi\n   { $as_echo \"$as_me:${as_lineno-$LINENO}: result: done\" >&5\n$as_echo \"done\" >&6; }\n if test -n \"$EXEEXT\"; then\n  am__EXEEXT_TRUE=\n  am__EXEEXT_FALSE='#'\nelse\n  am__EXEEXT_TRUE='#'\n  am__EXEEXT_FALSE=\nfi\n\nif test -z \"${MAINTAINER_MODE_TRUE}\" && test -z \"${MAINTAINER_MODE_FALSE}\"; then\n  as_fn_error $? \"conditional \\\"MAINTAINER_MODE\\\" was never defined.\nUsually this means the macro was only invoked conditionally.\" \"$LINENO\" 5\nfi\nif test -z \"${AMDEP_TRUE}\" && test -z \"${AMDEP_FALSE}\"; then\n  as_fn_error $? \"conditional \\\"AMDEP\\\" was never defined.\nUsually this means the macro was only invoked conditionally.\" \"$LINENO\" 5\nfi\nif test -z \"${am__fastdepCC_TRUE}\" && test -z \"${am__fastdepCC_FALSE}\"; then\n  as_fn_error $? \"conditional \\\"am__fastdepCC\\\" was never defined.\nUsually this means the macro was only invoked conditionally.\" \"$LINENO\" 5\nfi\nif test -z \"${am__fastdepCXX_TRUE}\" && test -z \"${am__fastdepCXX_FALSE}\"; then\n  as_fn_error $? \"conditional \\\"am__fastdepCXX\\\" was never defined.\nUsually this means the macro was only invoked conditionally.\" \"$LINENO\" 5\nfi\n\n: \"${CONFIG_STATUS=./config.status}\"\nac_write_fail=0\nac_clean_files_save=$ac_clean_files\nac_clean_files=\"$ac_clean_files $CONFIG_STATUS\"\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS\" >&5\n$as_echo \"$as_me: creating $CONFIG_STATUS\" >&6;}\nas_write_fail=0\ncat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1\n#! $SHELL\n# Generated by $as_me.\n# Run this file to recreate the current configuration.\n# Compiler output produced by configure, useful for debugging\n# configure, is in config.log if it exists.\n\ndebug=false\nac_cs_recheck=false\nac_cs_silent=false\n\nSHELL=\\${CONFIG_SHELL-$SHELL}\nexport SHELL\n_ASEOF\ncat >>$CONFIG_STATUS <<\\_ASEOF || as_write_fail=1\n## -------------------- ##\n## M4sh Initialization. ##\n## -------------------- ##\n\n# Be more Bourne compatible\nDUALCASE=1; export DUALCASE # for MKS sh\nif test -n \"${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :\n  emulate sh\n  NULLCMD=:\n  # Pre-4.2 versions of Zsh do word splitting on ${1+\"$@\"}, which\n  # is contrary to our usage.  Disable this feature.\n  alias -g '${1+\"$@\"}'='\"$@\"'\n  setopt NO_GLOB_SUBST\nelse\n  case `(set -o) 2>/dev/null` in #(\n  *posix*) :\n    set -o posix ;; #(\n  *) :\n     ;;\nesac\nfi\n\n\nas_nl='\n'\nexport as_nl\n# Printing a long string crashes Solaris 7 /usr/bin/printf.\nas_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'\nas_echo=$as_echo$as_echo$as_echo$as_echo$as_echo\nas_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo\n# Prefer a ksh shell builtin over an external printf program on Solaris,\n# but without wasting forks for bash or zsh.\nif test -z \"$BASH_VERSION$ZSH_VERSION\" \\\n    && (test \"X`print -r -- $as_echo`\" = \"X$as_echo\") 2>/dev/null; then\n  as_echo='print -r --'\n  as_echo_n='print -rn --'\nelif (test \"X`printf %s $as_echo`\" = \"X$as_echo\") 2>/dev/null; then\n  as_echo='printf %s\\n'\n  as_echo_n='printf %s'\nelse\n  if test \"X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`\" = \"X-n $as_echo\"; then\n    as_echo_body='eval /usr/ucb/echo -n \"$1$as_nl\"'\n    as_echo_n='/usr/ucb/echo -n'\n  else\n    as_echo_body='eval expr \"X$1\" : \"X\\\\(.*\\\\)\"'\n    as_echo_n_body='eval\n      arg=$1;\n      case $arg in #(\n      *\"$as_nl\"*)\n\texpr \"X$arg\" : \"X\\\\(.*\\\\)$as_nl\";\n\targ=`expr \"X$arg\" : \".*$as_nl\\\\(.*\\\\)\"`;;\n      esac;\n      expr \"X$arg\" : \"X\\\\(.*\\\\)\" | tr -d \"$as_nl\"\n    '\n    export as_echo_n_body\n    as_echo_n='sh -c $as_echo_n_body as_echo'\n  fi\n  export as_echo_body\n  as_echo='sh -c $as_echo_body as_echo'\nfi\n\n# The user is always right.\nif test \"${PATH_SEPARATOR+set}\" != set; then\n  PATH_SEPARATOR=:\n  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {\n    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||\n      PATH_SEPARATOR=';'\n  }\nfi\n\n\n# IFS\n# We need space, tab and new line, in precisely that order.  Quoting is\n# there to prevent editors from complaining about space-tab.\n# (If _AS_PATH_WALK were called with IFS unset, it would disable word\n# splitting by setting IFS to empty value.)\nIFS=\" \"\"\t$as_nl\"\n\n# Find who we are.  Look in the path if we contain no directory separator.\nas_myself=\ncase $0 in #((\n  *[\\\\/]* ) as_myself=$0 ;;\n  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    test -r \"$as_dir/$0\" && as_myself=$as_dir/$0 && break\n  done\nIFS=$as_save_IFS\n\n     ;;\nesac\n# We did not find ourselves, most probably we were run as `sh COMMAND'\n# in which case we are not to be found in the path.\nif test \"x$as_myself\" = x; then\n  as_myself=$0\nfi\nif test ! -f \"$as_myself\"; then\n  $as_echo \"$as_myself: error: cannot find myself; rerun with an absolute file name\" >&2\n  exit 1\nfi\n\n# Unset variables that we do not need and which cause bugs (e.g. in\n# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the \"|| exit 1\"\n# suppresses any \"Segmentation fault\" message there.  '((' could\n# trigger a bug in pdksh 5.2.14.\nfor as_var in BASH_ENV ENV MAIL MAILPATH\ndo eval test x\\${$as_var+set} = xset \\\n  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :\ndone\nPS1='$ '\nPS2='> '\nPS4='+ '\n\n# NLS nuisances.\nLC_ALL=C\nexport LC_ALL\nLANGUAGE=C\nexport LANGUAGE\n\n# CDPATH.\n(unset CDPATH) >/dev/null 2>&1 && unset CDPATH\n\n\n# as_fn_error STATUS ERROR [LINENO LOG_FD]\n# ----------------------------------------\n# Output \"`basename $0`: error: ERROR\" to stderr. If LINENO and LOG_FD are\n# provided, also output the error to LOG_FD, referencing LINENO. Then exit the\n# script with STATUS, using 1 if that was 0.\nas_fn_error ()\n{\n  as_status=$1; test $as_status -eq 0 && as_status=1\n  if test \"$4\"; then\n    as_lineno=${as_lineno-\"$3\"} as_lineno_stack=as_lineno_stack=$as_lineno_stack\n    $as_echo \"$as_me:${as_lineno-$LINENO}: error: $2\" >&$4\n  fi\n  $as_echo \"$as_me: error: $2\" >&2\n  as_fn_exit $as_status\n} # as_fn_error\n\n\n# as_fn_set_status STATUS\n# -----------------------\n# Set $? to STATUS, without forking.\nas_fn_set_status ()\n{\n  return $1\n} # as_fn_set_status\n\n# as_fn_exit STATUS\n# -----------------\n# Exit the shell with STATUS, even in a \"trap 0\" or \"set -e\" context.\nas_fn_exit ()\n{\n  set +e\n  as_fn_set_status $1\n  exit $1\n} # as_fn_exit\n\n# as_fn_unset VAR\n# ---------------\n# Portably unset VAR.\nas_fn_unset ()\n{\n  { eval $1=; unset $1;}\n}\nas_unset=as_fn_unset\n# as_fn_append VAR VALUE\n# ----------------------\n# Append the text in VALUE to the end of the definition contained in VAR. Take\n# advantage of any shell optimizations that allow amortized linear growth over\n# repeated appends, instead of the typical quadratic growth present in naive\n# implementations.\nif (eval \"as_var=1; as_var+=2; test x\\$as_var = x12\") 2>/dev/null; then :\n  eval 'as_fn_append ()\n  {\n    eval $1+=\\$2\n  }'\nelse\n  as_fn_append ()\n  {\n    eval $1=\\$$1\\$2\n  }\nfi # as_fn_append\n\n# as_fn_arith ARG...\n# ------------------\n# Perform arithmetic evaluation on the ARGs, and store the result in the\n# global $as_val. Take advantage of shells that can avoid forks. The arguments\n# must be portable across $(()) and expr.\nif (eval \"test \\$(( 1 + 1 )) = 2\") 2>/dev/null; then :\n  eval 'as_fn_arith ()\n  {\n    as_val=$(( $* ))\n  }'\nelse\n  as_fn_arith ()\n  {\n    as_val=`expr \"$@\" || test $? -eq 1`\n  }\nfi # as_fn_arith\n\n\nif expr a : '\\(a\\)' >/dev/null 2>&1 &&\n   test \"X`expr 00001 : '.*\\(...\\)'`\" = X001; then\n  as_expr=expr\nelse\n  as_expr=false\nfi\n\nif (basename -- /) >/dev/null 2>&1 && test \"X`basename -- / 2>&1`\" = \"X/\"; then\n  as_basename=basename\nelse\n  as_basename=false\nfi\n\nif (as_dir=`dirname -- /` && test \"X$as_dir\" = X/) >/dev/null 2>&1; then\n  as_dirname=dirname\nelse\n  as_dirname=false\nfi\n\nas_me=`$as_basename -- \"$0\" ||\n$as_expr X/\"$0\" : '.*/\\([^/][^/]*\\)/*$' \\| \\\n\t X\"$0\" : 'X\\(//\\)$' \\| \\\n\t X\"$0\" : 'X\\(/\\)' \\| . 2>/dev/null ||\n$as_echo X/\"$0\" |\n    sed '/^.*\\/\\([^/][^/]*\\)\\/*$/{\n\t    s//\\1/\n\t    q\n\t  }\n\t  /^X\\/\\(\\/\\/\\)$/{\n\t    s//\\1/\n\t    q\n\t  }\n\t  /^X\\/\\(\\/\\).*/{\n\t    s//\\1/\n\t    q\n\t  }\n\t  s/.*/./; q'`\n\n# Avoid depending upon Character Ranges.\nas_cr_letters='abcdefghijklmnopqrstuvwxyz'\nas_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'\nas_cr_Letters=$as_cr_letters$as_cr_LETTERS\nas_cr_digits='0123456789'\nas_cr_alnum=$as_cr_Letters$as_cr_digits\n\nECHO_C= ECHO_N= ECHO_T=\ncase `echo -n x` in #(((((\n-n*)\n  case `echo 'xy\\c'` in\n  *c*) ECHO_T='\t';;\t# ECHO_T is single tab character.\n  xy)  ECHO_C='\\c';;\n  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null\n       ECHO_T='\t';;\n  esac;;\n*)\n  ECHO_N='-n';;\nesac\n\nrm -f conf$$ conf$$.exe conf$$.file\nif test -d conf$$.dir; then\n  rm -f conf$$.dir/conf$$.file\nelse\n  rm -f conf$$.dir\n  mkdir conf$$.dir 2>/dev/null\nfi\nif (echo >conf$$.file) 2>/dev/null; then\n  if ln -s conf$$.file conf$$ 2>/dev/null; then\n    as_ln_s='ln -s'\n    # ... but there are two gotchas:\n    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.\n    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.\n    # In both cases, we have to default to `cp -pR'.\n    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||\n      as_ln_s='cp -pR'\n  elif ln conf$$.file conf$$ 2>/dev/null; then\n    as_ln_s=ln\n  else\n    as_ln_s='cp -pR'\n  fi\nelse\n  as_ln_s='cp -pR'\nfi\nrm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file\nrmdir conf$$.dir 2>/dev/null\n\n\n# as_fn_mkdir_p\n# -------------\n# Create \"$as_dir\" as a directory, including parents if necessary.\nas_fn_mkdir_p ()\n{\n\n  case $as_dir in #(\n  -*) as_dir=./$as_dir;;\n  esac\n  test -d \"$as_dir\" || eval $as_mkdir_p || {\n    as_dirs=\n    while :; do\n      case $as_dir in #(\n      *\\'*) as_qdir=`$as_echo \"$as_dir\" | sed \"s/'/'\\\\\\\\\\\\\\\\''/g\"`;; #'(\n      *) as_qdir=$as_dir;;\n      esac\n      as_dirs=\"'$as_qdir' $as_dirs\"\n      as_dir=`$as_dirname -- \"$as_dir\" ||\n$as_expr X\"$as_dir\" : 'X\\(.*[^/]\\)//*[^/][^/]*/*$' \\| \\\n\t X\"$as_dir\" : 'X\\(//\\)[^/]' \\| \\\n\t X\"$as_dir\" : 'X\\(//\\)$' \\| \\\n\t X\"$as_dir\" : 'X\\(/\\)' \\| . 2>/dev/null ||\n$as_echo X\"$as_dir\" |\n    sed '/^X\\(.*[^/]\\)\\/\\/*[^/][^/]*\\/*$/{\n\t    s//\\1/\n\t    q\n\t  }\n\t  /^X\\(\\/\\/\\)[^/].*/{\n\t    s//\\1/\n\t    q\n\t  }\n\t  /^X\\(\\/\\/\\)$/{\n\t    s//\\1/\n\t    q\n\t  }\n\t  /^X\\(\\/\\).*/{\n\t    s//\\1/\n\t    q\n\t  }\n\t  s/.*/./; q'`\n      test -d \"$as_dir\" && break\n    done\n    test -z \"$as_dirs\" || eval \"mkdir $as_dirs\"\n  } || test -d \"$as_dir\" || as_fn_error $? \"cannot create directory $as_dir\"\n\n\n} # as_fn_mkdir_p\nif mkdir -p . 2>/dev/null; then\n  as_mkdir_p='mkdir -p \"$as_dir\"'\nelse\n  test -d ./-p && rmdir ./-p\n  as_mkdir_p=false\nfi\n\n\n# as_fn_executable_p FILE\n# -----------------------\n# Test if FILE is an executable regular file.\nas_fn_executable_p ()\n{\n  test -f \"$1\" && test -x \"$1\"\n} # as_fn_executable_p\nas_test_x='test -x'\nas_executable_p=as_fn_executable_p\n\n# Sed expression to map a string onto a valid CPP name.\nas_tr_cpp=\"eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'\"\n\n# Sed expression to map a string onto a valid variable name.\nas_tr_sh=\"eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'\"\n\n\nexec 6>&1\n## ----------------------------------- ##\n## Main body of $CONFIG_STATUS script. ##\n## ----------------------------------- ##\n_ASEOF\ntest $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1\n\ncat >>$CONFIG_STATUS <<\\_ACEOF || ac_write_fail=1\n# Save the log message, to keep $0 and so on meaningful, and to\n# report actual input values of CONFIG_FILES etc. instead of their\n# values after options handling.\nac_log=\"\nThis file was extended by PortAudioCpp $as_me 12, which was\ngenerated by GNU Autoconf 2.69.  Invocation command line was\n\n  CONFIG_FILES    = $CONFIG_FILES\n  CONFIG_HEADERS  = $CONFIG_HEADERS\n  CONFIG_LINKS    = $CONFIG_LINKS\n  CONFIG_COMMANDS = $CONFIG_COMMANDS\n  $ $0 $@\n\non `(hostname || uname -n) 2>/dev/null | sed 1q`\n\"\n\n_ACEOF\n\ncase $ac_config_files in *\"\n\"*) set x $ac_config_files; shift; ac_config_files=$*;;\nesac\n\n\n\ncat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1\n# Files that config.status was made for.\nconfig_files=\"$ac_config_files\"\nconfig_commands=\"$ac_config_commands\"\n\n_ACEOF\n\ncat >>$CONFIG_STATUS <<\\_ACEOF || ac_write_fail=1\nac_cs_usage=\"\\\n\\`$as_me' instantiates files and other configuration actions\nfrom templates according to the current configuration.  Unless the files\nand actions are specified as TAGs, all are instantiated by default.\n\nUsage: $0 [OPTION]... [TAG]...\n\n  -h, --help       print this help, then exit\n  -V, --version    print version number and configuration settings, then exit\n      --config     print configuration, then exit\n  -q, --quiet, --silent\n                   do not print progress messages\n  -d, --debug      don't remove temporary files\n      --recheck    update $as_me by reconfiguring in the same conditions\n      --file=FILE[:TEMPLATE]\n                   instantiate the configuration file FILE\n\nConfiguration files:\n$config_files\n\nConfiguration commands:\n$config_commands\n\nReport bugs to the package provider.\"\n\n_ACEOF\ncat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1\nac_cs_config=\"`$as_echo \"$ac_configure_args\" | sed 's/^ //; s/[\\\\\"\"\\`\\$]/\\\\\\\\&/g'`\"\nac_cs_version=\"\\\\\nPortAudioCpp config.status 12\nconfigured by $0, generated by GNU Autoconf 2.69,\n  with options \\\\\"\\$ac_cs_config\\\\\"\n\nCopyright (C) 2012 Free Software Foundation, Inc.\nThis config.status script is free software; the Free Software Foundation\ngives unlimited permission to copy, distribute and modify it.\"\n\nac_pwd='$ac_pwd'\nsrcdir='$srcdir'\nINSTALL='$INSTALL'\nMKDIR_P='$MKDIR_P'\nAWK='$AWK'\ntest -n \"\\$AWK\" || AWK=awk\n_ACEOF\n\ncat >>$CONFIG_STATUS <<\\_ACEOF || ac_write_fail=1\n# The default lists apply if the user does not specify any file.\nac_need_defaults=:\nwhile test $# != 0\ndo\n  case $1 in\n  --*=?*)\n    ac_option=`expr \"X$1\" : 'X\\([^=]*\\)='`\n    ac_optarg=`expr \"X$1\" : 'X[^=]*=\\(.*\\)'`\n    ac_shift=:\n    ;;\n  --*=)\n    ac_option=`expr \"X$1\" : 'X\\([^=]*\\)='`\n    ac_optarg=\n    ac_shift=:\n    ;;\n  *)\n    ac_option=$1\n    ac_optarg=$2\n    ac_shift=shift\n    ;;\n  esac\n\n  case $ac_option in\n  # Handling of the options.\n  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)\n    ac_cs_recheck=: ;;\n  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )\n    $as_echo \"$ac_cs_version\"; exit ;;\n  --config | --confi | --conf | --con | --co | --c )\n    $as_echo \"$ac_cs_config\"; exit ;;\n  --debug | --debu | --deb | --de | --d | -d )\n    debug=: ;;\n  --file | --fil | --fi | --f )\n    $ac_shift\n    case $ac_optarg in\n    *\\'*) ac_optarg=`$as_echo \"$ac_optarg\" | sed \"s/'/'\\\\\\\\\\\\\\\\''/g\"` ;;\n    '') as_fn_error $? \"missing file argument\" ;;\n    esac\n    as_fn_append CONFIG_FILES \" '$ac_optarg'\"\n    ac_need_defaults=false;;\n  --he | --h |  --help | --hel | -h )\n    $as_echo \"$ac_cs_usage\"; exit ;;\n  -q | -quiet | --quiet | --quie | --qui | --qu | --q \\\n  | -silent | --silent | --silen | --sile | --sil | --si | --s)\n    ac_cs_silent=: ;;\n\n  # This is an error.\n  -*) as_fn_error $? \"unrecognized option: \\`$1'\nTry \\`$0 --help' for more information.\" ;;\n\n  *) as_fn_append ac_config_targets \" $1\"\n     ac_need_defaults=false ;;\n\n  esac\n  shift\ndone\n\nac_configure_extra_args=\n\nif $ac_cs_silent; then\n  exec 6>/dev/null\n  ac_configure_extra_args=\"$ac_configure_extra_args --silent\"\nfi\n\n_ACEOF\ncat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1\nif \\$ac_cs_recheck; then\n  set X $SHELL '$0' $ac_configure_args \\$ac_configure_extra_args --no-create --no-recursion\n  shift\n  \\$as_echo \"running CONFIG_SHELL=$SHELL \\$*\" >&6\n  CONFIG_SHELL='$SHELL'\n  export CONFIG_SHELL\n  exec \"\\$@\"\nfi\n\n_ACEOF\ncat >>$CONFIG_STATUS <<\\_ACEOF || ac_write_fail=1\nexec 5>>config.log\n{\n  echo\n  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX\n## Running $as_me. ##\n_ASBOX\n  $as_echo \"$ac_log\"\n} >&5\n\n_ACEOF\ncat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1\n#\n# INIT-COMMANDS\n#\nAMDEP_TRUE=\"$AMDEP_TRUE\" ac_aux_dir=\"$ac_aux_dir\"\n\n\n# The HP-UX ksh and POSIX shell print the target directory to stdout\n# if CDPATH is set.\n(unset CDPATH) >/dev/null 2>&1 && unset CDPATH\n\nsed_quote_subst='$sed_quote_subst'\ndouble_quote_subst='$double_quote_subst'\ndelay_variable_subst='$delay_variable_subst'\nAS='`$ECHO \"$AS\" | $SED \"$delay_single_quote_subst\"`'\nDLLTOOL='`$ECHO \"$DLLTOOL\" | $SED \"$delay_single_quote_subst\"`'\nOBJDUMP='`$ECHO \"$OBJDUMP\" | $SED \"$delay_single_quote_subst\"`'\nmacro_version='`$ECHO \"$macro_version\" | $SED \"$delay_single_quote_subst\"`'\nmacro_revision='`$ECHO \"$macro_revision\" | $SED \"$delay_single_quote_subst\"`'\nenable_shared='`$ECHO \"$enable_shared\" | $SED \"$delay_single_quote_subst\"`'\nenable_static='`$ECHO \"$enable_static\" | $SED \"$delay_single_quote_subst\"`'\npic_mode='`$ECHO \"$pic_mode\" | $SED \"$delay_single_quote_subst\"`'\nenable_fast_install='`$ECHO \"$enable_fast_install\" | $SED \"$delay_single_quote_subst\"`'\nSHELL='`$ECHO \"$SHELL\" | $SED \"$delay_single_quote_subst\"`'\nECHO='`$ECHO \"$ECHO\" | $SED \"$delay_single_quote_subst\"`'\nPATH_SEPARATOR='`$ECHO \"$PATH_SEPARATOR\" | $SED \"$delay_single_quote_subst\"`'\nhost_alias='`$ECHO \"$host_alias\" | $SED \"$delay_single_quote_subst\"`'\nhost='`$ECHO \"$host\" | $SED \"$delay_single_quote_subst\"`'\nhost_os='`$ECHO \"$host_os\" | $SED \"$delay_single_quote_subst\"`'\nbuild_alias='`$ECHO \"$build_alias\" | $SED \"$delay_single_quote_subst\"`'\nbuild='`$ECHO \"$build\" | $SED \"$delay_single_quote_subst\"`'\nbuild_os='`$ECHO \"$build_os\" | $SED \"$delay_single_quote_subst\"`'\nSED='`$ECHO \"$SED\" | $SED \"$delay_single_quote_subst\"`'\nXsed='`$ECHO \"$Xsed\" | $SED \"$delay_single_quote_subst\"`'\nGREP='`$ECHO \"$GREP\" | $SED \"$delay_single_quote_subst\"`'\nEGREP='`$ECHO \"$EGREP\" | $SED \"$delay_single_quote_subst\"`'\nFGREP='`$ECHO \"$FGREP\" | $SED \"$delay_single_quote_subst\"`'\nLD='`$ECHO \"$LD\" | $SED \"$delay_single_quote_subst\"`'\nNM='`$ECHO \"$NM\" | $SED \"$delay_single_quote_subst\"`'\nLN_S='`$ECHO \"$LN_S\" | $SED \"$delay_single_quote_subst\"`'\nmax_cmd_len='`$ECHO \"$max_cmd_len\" | $SED \"$delay_single_quote_subst\"`'\nac_objext='`$ECHO \"$ac_objext\" | $SED \"$delay_single_quote_subst\"`'\nexeext='`$ECHO \"$exeext\" | $SED \"$delay_single_quote_subst\"`'\nlt_unset='`$ECHO \"$lt_unset\" | $SED \"$delay_single_quote_subst\"`'\nlt_SP2NL='`$ECHO \"$lt_SP2NL\" | $SED \"$delay_single_quote_subst\"`'\nlt_NL2SP='`$ECHO \"$lt_NL2SP\" | $SED \"$delay_single_quote_subst\"`'\nlt_cv_to_host_file_cmd='`$ECHO \"$lt_cv_to_host_file_cmd\" | $SED \"$delay_single_quote_subst\"`'\nlt_cv_to_tool_file_cmd='`$ECHO \"$lt_cv_to_tool_file_cmd\" | $SED \"$delay_single_quote_subst\"`'\nreload_flag='`$ECHO \"$reload_flag\" | $SED \"$delay_single_quote_subst\"`'\nreload_cmds='`$ECHO \"$reload_cmds\" | $SED \"$delay_single_quote_subst\"`'\ndeplibs_check_method='`$ECHO \"$deplibs_check_method\" | $SED \"$delay_single_quote_subst\"`'\nfile_magic_cmd='`$ECHO \"$file_magic_cmd\" | $SED \"$delay_single_quote_subst\"`'\nfile_magic_glob='`$ECHO \"$file_magic_glob\" | $SED \"$delay_single_quote_subst\"`'\nwant_nocaseglob='`$ECHO \"$want_nocaseglob\" | $SED \"$delay_single_quote_subst\"`'\nsharedlib_from_linklib_cmd='`$ECHO \"$sharedlib_from_linklib_cmd\" | $SED \"$delay_single_quote_subst\"`'\nAR='`$ECHO \"$AR\" | $SED \"$delay_single_quote_subst\"`'\nAR_FLAGS='`$ECHO \"$AR_FLAGS\" | $SED \"$delay_single_quote_subst\"`'\narchiver_list_spec='`$ECHO \"$archiver_list_spec\" | $SED \"$delay_single_quote_subst\"`'\nSTRIP='`$ECHO \"$STRIP\" | $SED \"$delay_single_quote_subst\"`'\nRANLIB='`$ECHO \"$RANLIB\" | $SED \"$delay_single_quote_subst\"`'\nold_postinstall_cmds='`$ECHO \"$old_postinstall_cmds\" | $SED \"$delay_single_quote_subst\"`'\nold_postuninstall_cmds='`$ECHO \"$old_postuninstall_cmds\" | $SED \"$delay_single_quote_subst\"`'\nold_archive_cmds='`$ECHO \"$old_archive_cmds\" | $SED \"$delay_single_quote_subst\"`'\nlock_old_archive_extraction='`$ECHO \"$lock_old_archive_extraction\" | $SED \"$delay_single_quote_subst\"`'\nCC='`$ECHO \"$CC\" | $SED \"$delay_single_quote_subst\"`'\nCFLAGS='`$ECHO \"$CFLAGS\" | $SED \"$delay_single_quote_subst\"`'\ncompiler='`$ECHO \"$compiler\" | $SED \"$delay_single_quote_subst\"`'\nGCC='`$ECHO \"$GCC\" | $SED \"$delay_single_quote_subst\"`'\nlt_cv_sys_global_symbol_pipe='`$ECHO \"$lt_cv_sys_global_symbol_pipe\" | $SED \"$delay_single_quote_subst\"`'\nlt_cv_sys_global_symbol_to_cdecl='`$ECHO \"$lt_cv_sys_global_symbol_to_cdecl\" | $SED \"$delay_single_quote_subst\"`'\nlt_cv_sys_global_symbol_to_c_name_address='`$ECHO \"$lt_cv_sys_global_symbol_to_c_name_address\" | $SED \"$delay_single_quote_subst\"`'\nlt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO \"$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix\" | $SED \"$delay_single_quote_subst\"`'\nnm_file_list_spec='`$ECHO \"$nm_file_list_spec\" | $SED \"$delay_single_quote_subst\"`'\nlt_sysroot='`$ECHO \"$lt_sysroot\" | $SED \"$delay_single_quote_subst\"`'\nobjdir='`$ECHO \"$objdir\" | $SED \"$delay_single_quote_subst\"`'\nMAGIC_CMD='`$ECHO \"$MAGIC_CMD\" | $SED \"$delay_single_quote_subst\"`'\nlt_prog_compiler_no_builtin_flag='`$ECHO \"$lt_prog_compiler_no_builtin_flag\" | $SED \"$delay_single_quote_subst\"`'\nlt_prog_compiler_pic='`$ECHO \"$lt_prog_compiler_pic\" | $SED \"$delay_single_quote_subst\"`'\nlt_prog_compiler_wl='`$ECHO \"$lt_prog_compiler_wl\" | $SED \"$delay_single_quote_subst\"`'\nlt_prog_compiler_static='`$ECHO \"$lt_prog_compiler_static\" | $SED \"$delay_single_quote_subst\"`'\nlt_cv_prog_compiler_c_o='`$ECHO \"$lt_cv_prog_compiler_c_o\" | $SED \"$delay_single_quote_subst\"`'\nneed_locks='`$ECHO \"$need_locks\" | $SED \"$delay_single_quote_subst\"`'\nMANIFEST_TOOL='`$ECHO \"$MANIFEST_TOOL\" | $SED \"$delay_single_quote_subst\"`'\nDSYMUTIL='`$ECHO \"$DSYMUTIL\" | $SED \"$delay_single_quote_subst\"`'\nNMEDIT='`$ECHO \"$NMEDIT\" | $SED \"$delay_single_quote_subst\"`'\nLIPO='`$ECHO \"$LIPO\" | $SED \"$delay_single_quote_subst\"`'\nOTOOL='`$ECHO \"$OTOOL\" | $SED \"$delay_single_quote_subst\"`'\nOTOOL64='`$ECHO \"$OTOOL64\" | $SED \"$delay_single_quote_subst\"`'\nlibext='`$ECHO \"$libext\" | $SED \"$delay_single_quote_subst\"`'\nshrext_cmds='`$ECHO \"$shrext_cmds\" | $SED \"$delay_single_quote_subst\"`'\nextract_expsyms_cmds='`$ECHO \"$extract_expsyms_cmds\" | $SED \"$delay_single_quote_subst\"`'\narchive_cmds_need_lc='`$ECHO \"$archive_cmds_need_lc\" | $SED \"$delay_single_quote_subst\"`'\nenable_shared_with_static_runtimes='`$ECHO \"$enable_shared_with_static_runtimes\" | $SED \"$delay_single_quote_subst\"`'\nexport_dynamic_flag_spec='`$ECHO \"$export_dynamic_flag_spec\" | $SED \"$delay_single_quote_subst\"`'\nwhole_archive_flag_spec='`$ECHO \"$whole_archive_flag_spec\" | $SED \"$delay_single_quote_subst\"`'\ncompiler_needs_object='`$ECHO \"$compiler_needs_object\" | $SED \"$delay_single_quote_subst\"`'\nold_archive_from_new_cmds='`$ECHO \"$old_archive_from_new_cmds\" | $SED \"$delay_single_quote_subst\"`'\nold_archive_from_expsyms_cmds='`$ECHO \"$old_archive_from_expsyms_cmds\" | $SED \"$delay_single_quote_subst\"`'\narchive_cmds='`$ECHO \"$archive_cmds\" | $SED \"$delay_single_quote_subst\"`'\narchive_expsym_cmds='`$ECHO \"$archive_expsym_cmds\" | $SED \"$delay_single_quote_subst\"`'\nmodule_cmds='`$ECHO \"$module_cmds\" | $SED \"$delay_single_quote_subst\"`'\nmodule_expsym_cmds='`$ECHO \"$module_expsym_cmds\" | $SED \"$delay_single_quote_subst\"`'\nwith_gnu_ld='`$ECHO \"$with_gnu_ld\" | $SED \"$delay_single_quote_subst\"`'\nallow_undefined_flag='`$ECHO \"$allow_undefined_flag\" | $SED \"$delay_single_quote_subst\"`'\nno_undefined_flag='`$ECHO \"$no_undefined_flag\" | $SED \"$delay_single_quote_subst\"`'\nhardcode_libdir_flag_spec='`$ECHO \"$hardcode_libdir_flag_spec\" | $SED \"$delay_single_quote_subst\"`'\nhardcode_libdir_separator='`$ECHO \"$hardcode_libdir_separator\" | $SED \"$delay_single_quote_subst\"`'\nhardcode_direct='`$ECHO \"$hardcode_direct\" | $SED \"$delay_single_quote_subst\"`'\nhardcode_direct_absolute='`$ECHO \"$hardcode_direct_absolute\" | $SED \"$delay_single_quote_subst\"`'\nhardcode_minus_L='`$ECHO \"$hardcode_minus_L\" | $SED \"$delay_single_quote_subst\"`'\nhardcode_shlibpath_var='`$ECHO \"$hardcode_shlibpath_var\" | $SED \"$delay_single_quote_subst\"`'\nhardcode_automatic='`$ECHO \"$hardcode_automatic\" | $SED \"$delay_single_quote_subst\"`'\ninherit_rpath='`$ECHO \"$inherit_rpath\" | $SED \"$delay_single_quote_subst\"`'\nlink_all_deplibs='`$ECHO \"$link_all_deplibs\" | $SED \"$delay_single_quote_subst\"`'\nalways_export_symbols='`$ECHO \"$always_export_symbols\" | $SED \"$delay_single_quote_subst\"`'\nexport_symbols_cmds='`$ECHO \"$export_symbols_cmds\" | $SED \"$delay_single_quote_subst\"`'\nexclude_expsyms='`$ECHO \"$exclude_expsyms\" | $SED \"$delay_single_quote_subst\"`'\ninclude_expsyms='`$ECHO \"$include_expsyms\" | $SED \"$delay_single_quote_subst\"`'\nprelink_cmds='`$ECHO \"$prelink_cmds\" | $SED \"$delay_single_quote_subst\"`'\npostlink_cmds='`$ECHO \"$postlink_cmds\" | $SED \"$delay_single_quote_subst\"`'\nfile_list_spec='`$ECHO \"$file_list_spec\" | $SED \"$delay_single_quote_subst\"`'\nvariables_saved_for_relink='`$ECHO \"$variables_saved_for_relink\" | $SED \"$delay_single_quote_subst\"`'\nneed_lib_prefix='`$ECHO \"$need_lib_prefix\" | $SED \"$delay_single_quote_subst\"`'\nneed_version='`$ECHO \"$need_version\" | $SED \"$delay_single_quote_subst\"`'\nversion_type='`$ECHO \"$version_type\" | $SED \"$delay_single_quote_subst\"`'\nrunpath_var='`$ECHO \"$runpath_var\" | $SED \"$delay_single_quote_subst\"`'\nshlibpath_var='`$ECHO \"$shlibpath_var\" | $SED \"$delay_single_quote_subst\"`'\nshlibpath_overrides_runpath='`$ECHO \"$shlibpath_overrides_runpath\" | $SED \"$delay_single_quote_subst\"`'\nlibname_spec='`$ECHO \"$libname_spec\" | $SED \"$delay_single_quote_subst\"`'\nlibrary_names_spec='`$ECHO \"$library_names_spec\" | $SED \"$delay_single_quote_subst\"`'\nsoname_spec='`$ECHO \"$soname_spec\" | $SED \"$delay_single_quote_subst\"`'\ninstall_override_mode='`$ECHO \"$install_override_mode\" | $SED \"$delay_single_quote_subst\"`'\npostinstall_cmds='`$ECHO \"$postinstall_cmds\" | $SED \"$delay_single_quote_subst\"`'\npostuninstall_cmds='`$ECHO \"$postuninstall_cmds\" | $SED \"$delay_single_quote_subst\"`'\nfinish_cmds='`$ECHO \"$finish_cmds\" | $SED \"$delay_single_quote_subst\"`'\nfinish_eval='`$ECHO \"$finish_eval\" | $SED \"$delay_single_quote_subst\"`'\nhardcode_into_libs='`$ECHO \"$hardcode_into_libs\" | $SED \"$delay_single_quote_subst\"`'\nsys_lib_search_path_spec='`$ECHO \"$sys_lib_search_path_spec\" | $SED \"$delay_single_quote_subst\"`'\nsys_lib_dlsearch_path_spec='`$ECHO \"$sys_lib_dlsearch_path_spec\" | $SED \"$delay_single_quote_subst\"`'\nhardcode_action='`$ECHO \"$hardcode_action\" | $SED \"$delay_single_quote_subst\"`'\nenable_dlopen='`$ECHO \"$enable_dlopen\" | $SED \"$delay_single_quote_subst\"`'\nenable_dlopen_self='`$ECHO \"$enable_dlopen_self\" | $SED \"$delay_single_quote_subst\"`'\nenable_dlopen_self_static='`$ECHO \"$enable_dlopen_self_static\" | $SED \"$delay_single_quote_subst\"`'\nold_striplib='`$ECHO \"$old_striplib\" | $SED \"$delay_single_quote_subst\"`'\nstriplib='`$ECHO \"$striplib\" | $SED \"$delay_single_quote_subst\"`'\ncompiler_lib_search_dirs='`$ECHO \"$compiler_lib_search_dirs\" | $SED \"$delay_single_quote_subst\"`'\npredep_objects='`$ECHO \"$predep_objects\" | $SED \"$delay_single_quote_subst\"`'\npostdep_objects='`$ECHO \"$postdep_objects\" | $SED \"$delay_single_quote_subst\"`'\npredeps='`$ECHO \"$predeps\" | $SED \"$delay_single_quote_subst\"`'\npostdeps='`$ECHO \"$postdeps\" | $SED \"$delay_single_quote_subst\"`'\ncompiler_lib_search_path='`$ECHO \"$compiler_lib_search_path\" | $SED \"$delay_single_quote_subst\"`'\nLD_CXX='`$ECHO \"$LD_CXX\" | $SED \"$delay_single_quote_subst\"`'\nreload_flag_CXX='`$ECHO \"$reload_flag_CXX\" | $SED \"$delay_single_quote_subst\"`'\nreload_cmds_CXX='`$ECHO \"$reload_cmds_CXX\" | $SED \"$delay_single_quote_subst\"`'\nold_archive_cmds_CXX='`$ECHO \"$old_archive_cmds_CXX\" | $SED \"$delay_single_quote_subst\"`'\ncompiler_CXX='`$ECHO \"$compiler_CXX\" | $SED \"$delay_single_quote_subst\"`'\nGCC_CXX='`$ECHO \"$GCC_CXX\" | $SED \"$delay_single_quote_subst\"`'\nlt_prog_compiler_no_builtin_flag_CXX='`$ECHO \"$lt_prog_compiler_no_builtin_flag_CXX\" | $SED \"$delay_single_quote_subst\"`'\nlt_prog_compiler_pic_CXX='`$ECHO \"$lt_prog_compiler_pic_CXX\" | $SED \"$delay_single_quote_subst\"`'\nlt_prog_compiler_wl_CXX='`$ECHO \"$lt_prog_compiler_wl_CXX\" | $SED \"$delay_single_quote_subst\"`'\nlt_prog_compiler_static_CXX='`$ECHO \"$lt_prog_compiler_static_CXX\" | $SED \"$delay_single_quote_subst\"`'\nlt_cv_prog_compiler_c_o_CXX='`$ECHO \"$lt_cv_prog_compiler_c_o_CXX\" | $SED \"$delay_single_quote_subst\"`'\narchive_cmds_need_lc_CXX='`$ECHO \"$archive_cmds_need_lc_CXX\" | $SED \"$delay_single_quote_subst\"`'\nenable_shared_with_static_runtimes_CXX='`$ECHO \"$enable_shared_with_static_runtimes_CXX\" | $SED \"$delay_single_quote_subst\"`'\nexport_dynamic_flag_spec_CXX='`$ECHO \"$export_dynamic_flag_spec_CXX\" | $SED \"$delay_single_quote_subst\"`'\nwhole_archive_flag_spec_CXX='`$ECHO \"$whole_archive_flag_spec_CXX\" | $SED \"$delay_single_quote_subst\"`'\ncompiler_needs_object_CXX='`$ECHO \"$compiler_needs_object_CXX\" | $SED \"$delay_single_quote_subst\"`'\nold_archive_from_new_cmds_CXX='`$ECHO \"$old_archive_from_new_cmds_CXX\" | $SED \"$delay_single_quote_subst\"`'\nold_archive_from_expsyms_cmds_CXX='`$ECHO \"$old_archive_from_expsyms_cmds_CXX\" | $SED \"$delay_single_quote_subst\"`'\narchive_cmds_CXX='`$ECHO \"$archive_cmds_CXX\" | $SED \"$delay_single_quote_subst\"`'\narchive_expsym_cmds_CXX='`$ECHO \"$archive_expsym_cmds_CXX\" | $SED \"$delay_single_quote_subst\"`'\nmodule_cmds_CXX='`$ECHO \"$module_cmds_CXX\" | $SED \"$delay_single_quote_subst\"`'\nmodule_expsym_cmds_CXX='`$ECHO \"$module_expsym_cmds_CXX\" | $SED \"$delay_single_quote_subst\"`'\nwith_gnu_ld_CXX='`$ECHO \"$with_gnu_ld_CXX\" | $SED \"$delay_single_quote_subst\"`'\nallow_undefined_flag_CXX='`$ECHO \"$allow_undefined_flag_CXX\" | $SED \"$delay_single_quote_subst\"`'\nno_undefined_flag_CXX='`$ECHO \"$no_undefined_flag_CXX\" | $SED \"$delay_single_quote_subst\"`'\nhardcode_libdir_flag_spec_CXX='`$ECHO \"$hardcode_libdir_flag_spec_CXX\" | $SED \"$delay_single_quote_subst\"`'\nhardcode_libdir_separator_CXX='`$ECHO \"$hardcode_libdir_separator_CXX\" | $SED \"$delay_single_quote_subst\"`'\nhardcode_direct_CXX='`$ECHO \"$hardcode_direct_CXX\" | $SED \"$delay_single_quote_subst\"`'\nhardcode_direct_absolute_CXX='`$ECHO \"$hardcode_direct_absolute_CXX\" | $SED \"$delay_single_quote_subst\"`'\nhardcode_minus_L_CXX='`$ECHO \"$hardcode_minus_L_CXX\" | $SED \"$delay_single_quote_subst\"`'\nhardcode_shlibpath_var_CXX='`$ECHO \"$hardcode_shlibpath_var_CXX\" | $SED \"$delay_single_quote_subst\"`'\nhardcode_automatic_CXX='`$ECHO \"$hardcode_automatic_CXX\" | $SED \"$delay_single_quote_subst\"`'\ninherit_rpath_CXX='`$ECHO \"$inherit_rpath_CXX\" | $SED \"$delay_single_quote_subst\"`'\nlink_all_deplibs_CXX='`$ECHO \"$link_all_deplibs_CXX\" | $SED \"$delay_single_quote_subst\"`'\nalways_export_symbols_CXX='`$ECHO \"$always_export_symbols_CXX\" | $SED \"$delay_single_quote_subst\"`'\nexport_symbols_cmds_CXX='`$ECHO \"$export_symbols_cmds_CXX\" | $SED \"$delay_single_quote_subst\"`'\nexclude_expsyms_CXX='`$ECHO \"$exclude_expsyms_CXX\" | $SED \"$delay_single_quote_subst\"`'\ninclude_expsyms_CXX='`$ECHO \"$include_expsyms_CXX\" | $SED \"$delay_single_quote_subst\"`'\nprelink_cmds_CXX='`$ECHO \"$prelink_cmds_CXX\" | $SED \"$delay_single_quote_subst\"`'\npostlink_cmds_CXX='`$ECHO \"$postlink_cmds_CXX\" | $SED \"$delay_single_quote_subst\"`'\nfile_list_spec_CXX='`$ECHO \"$file_list_spec_CXX\" | $SED \"$delay_single_quote_subst\"`'\nhardcode_action_CXX='`$ECHO \"$hardcode_action_CXX\" | $SED \"$delay_single_quote_subst\"`'\ncompiler_lib_search_dirs_CXX='`$ECHO \"$compiler_lib_search_dirs_CXX\" | $SED \"$delay_single_quote_subst\"`'\npredep_objects_CXX='`$ECHO \"$predep_objects_CXX\" | $SED \"$delay_single_quote_subst\"`'\npostdep_objects_CXX='`$ECHO \"$postdep_objects_CXX\" | $SED \"$delay_single_quote_subst\"`'\npredeps_CXX='`$ECHO \"$predeps_CXX\" | $SED \"$delay_single_quote_subst\"`'\npostdeps_CXX='`$ECHO \"$postdeps_CXX\" | $SED \"$delay_single_quote_subst\"`'\ncompiler_lib_search_path_CXX='`$ECHO \"$compiler_lib_search_path_CXX\" | $SED \"$delay_single_quote_subst\"`'\n\nLTCC='$LTCC'\nLTCFLAGS='$LTCFLAGS'\ncompiler='$compiler_DEFAULT'\n\n# A function that is used when there is no print builtin or printf.\nfunc_fallback_echo ()\n{\n  eval 'cat <<_LTECHO_EOF\n\\$1\n_LTECHO_EOF'\n}\n\n# Quote evaled strings.\nfor var in AS \\\nDLLTOOL \\\nOBJDUMP \\\nSHELL \\\nECHO \\\nPATH_SEPARATOR \\\nSED \\\nGREP \\\nEGREP \\\nFGREP \\\nLD \\\nNM \\\nLN_S \\\nlt_SP2NL \\\nlt_NL2SP \\\nreload_flag \\\ndeplibs_check_method \\\nfile_magic_cmd \\\nfile_magic_glob \\\nwant_nocaseglob \\\nsharedlib_from_linklib_cmd \\\nAR \\\nAR_FLAGS \\\narchiver_list_spec \\\nSTRIP \\\nRANLIB \\\nCC \\\nCFLAGS \\\ncompiler \\\nlt_cv_sys_global_symbol_pipe \\\nlt_cv_sys_global_symbol_to_cdecl \\\nlt_cv_sys_global_symbol_to_c_name_address \\\nlt_cv_sys_global_symbol_to_c_name_address_lib_prefix \\\nnm_file_list_spec \\\nlt_prog_compiler_no_builtin_flag \\\nlt_prog_compiler_pic \\\nlt_prog_compiler_wl \\\nlt_prog_compiler_static \\\nlt_cv_prog_compiler_c_o \\\nneed_locks \\\nMANIFEST_TOOL \\\nDSYMUTIL \\\nNMEDIT \\\nLIPO \\\nOTOOL \\\nOTOOL64 \\\nshrext_cmds \\\nexport_dynamic_flag_spec \\\nwhole_archive_flag_spec \\\ncompiler_needs_object \\\nwith_gnu_ld \\\nallow_undefined_flag \\\nno_undefined_flag \\\nhardcode_libdir_flag_spec \\\nhardcode_libdir_separator \\\nexclude_expsyms \\\ninclude_expsyms \\\nfile_list_spec \\\nvariables_saved_for_relink \\\nlibname_spec \\\nlibrary_names_spec \\\nsoname_spec \\\ninstall_override_mode \\\nfinish_eval \\\nold_striplib \\\nstriplib \\\ncompiler_lib_search_dirs \\\npredep_objects \\\npostdep_objects \\\npredeps \\\npostdeps \\\ncompiler_lib_search_path \\\nLD_CXX \\\nreload_flag_CXX \\\ncompiler_CXX \\\nlt_prog_compiler_no_builtin_flag_CXX \\\nlt_prog_compiler_pic_CXX \\\nlt_prog_compiler_wl_CXX \\\nlt_prog_compiler_static_CXX \\\nlt_cv_prog_compiler_c_o_CXX \\\nexport_dynamic_flag_spec_CXX \\\nwhole_archive_flag_spec_CXX \\\ncompiler_needs_object_CXX \\\nwith_gnu_ld_CXX \\\nallow_undefined_flag_CXX \\\nno_undefined_flag_CXX \\\nhardcode_libdir_flag_spec_CXX \\\nhardcode_libdir_separator_CXX \\\nexclude_expsyms_CXX \\\ninclude_expsyms_CXX \\\nfile_list_spec_CXX \\\ncompiler_lib_search_dirs_CXX \\\npredep_objects_CXX \\\npostdep_objects_CXX \\\npredeps_CXX \\\npostdeps_CXX \\\ncompiler_lib_search_path_CXX; do\n    case \\`eval \\\\\\\\\\$ECHO \\\\\\\\\"\"\\\\\\\\\\$\\$var\"\\\\\\\\\"\\` in\n    *[\\\\\\\\\\\\\\`\\\\\"\\\\\\$]*)\n      eval \"lt_\\$var=\\\\\\\\\\\\\"\\\\\\`\\\\\\$ECHO \\\\\"\\\\\\$\\$var\\\\\" | \\\\\\$SED \\\\\"\\\\\\$sed_quote_subst\\\\\"\\\\\\`\\\\\\\\\\\\\"\"\n      ;;\n    *)\n      eval \"lt_\\$var=\\\\\\\\\\\\\"\\\\\\$\\$var\\\\\\\\\\\\\"\"\n      ;;\n    esac\ndone\n\n# Double-quote double-evaled strings.\nfor var in reload_cmds \\\nold_postinstall_cmds \\\nold_postuninstall_cmds \\\nold_archive_cmds \\\nextract_expsyms_cmds \\\nold_archive_from_new_cmds \\\nold_archive_from_expsyms_cmds \\\narchive_cmds \\\narchive_expsym_cmds \\\nmodule_cmds \\\nmodule_expsym_cmds \\\nexport_symbols_cmds \\\nprelink_cmds \\\npostlink_cmds \\\npostinstall_cmds \\\npostuninstall_cmds \\\nfinish_cmds \\\nsys_lib_search_path_spec \\\nsys_lib_dlsearch_path_spec \\\nreload_cmds_CXX \\\nold_archive_cmds_CXX \\\nold_archive_from_new_cmds_CXX \\\nold_archive_from_expsyms_cmds_CXX \\\narchive_cmds_CXX \\\narchive_expsym_cmds_CXX \\\nmodule_cmds_CXX \\\nmodule_expsym_cmds_CXX \\\nexport_symbols_cmds_CXX \\\nprelink_cmds_CXX \\\npostlink_cmds_CXX; do\n    case \\`eval \\\\\\\\\\$ECHO \\\\\\\\\"\"\\\\\\\\\\$\\$var\"\\\\\\\\\"\\` in\n    *[\\\\\\\\\\\\\\`\\\\\"\\\\\\$]*)\n      eval \"lt_\\$var=\\\\\\\\\\\\\"\\\\\\`\\\\\\$ECHO \\\\\"\\\\\\$\\$var\\\\\" | \\\\\\$SED -e \\\\\"\\\\\\$double_quote_subst\\\\\" -e \\\\\"\\\\\\$sed_quote_subst\\\\\" -e \\\\\"\\\\\\$delay_variable_subst\\\\\"\\\\\\`\\\\\\\\\\\\\"\"\n      ;;\n    *)\n      eval \"lt_\\$var=\\\\\\\\\\\\\"\\\\\\$\\$var\\\\\\\\\\\\\"\"\n      ;;\n    esac\ndone\n\nac_aux_dir='$ac_aux_dir'\nxsi_shell='$xsi_shell'\nlt_shell_append='$lt_shell_append'\n\n# See if we are running on zsh, and set the options which allow our\n# commands through without removal of \\ escapes INIT.\nif test -n \"\\${ZSH_VERSION+set}\" ; then\n   setopt NO_GLOB_SUBST\nfi\n\n\n    PACKAGE='$PACKAGE'\n    VERSION='$VERSION'\n    TIMESTAMP='$TIMESTAMP'\n    RM='$RM'\n    ofile='$ofile'\n\n\n\n\n\n\n_ACEOF\n\ncat >>$CONFIG_STATUS <<\\_ACEOF || ac_write_fail=1\n\n# Handling of arguments.\nfor ac_config_target in $ac_config_targets\ndo\n  case $ac_config_target in\n    \"depfiles\") CONFIG_COMMANDS=\"$CONFIG_COMMANDS depfiles\" ;;\n    \"libtool\") CONFIG_COMMANDS=\"$CONFIG_COMMANDS libtool\" ;;\n    \"Makefile\") CONFIG_FILES=\"$CONFIG_FILES Makefile\" ;;\n    \"lib/Makefile\") CONFIG_FILES=\"$CONFIG_FILES lib/Makefile\" ;;\n    \"include/Makefile\") CONFIG_FILES=\"$CONFIG_FILES include/Makefile\" ;;\n    \"bin/Makefile\") CONFIG_FILES=\"$CONFIG_FILES bin/Makefile\" ;;\n    \"doc/Makefile\") CONFIG_FILES=\"$CONFIG_FILES doc/Makefile\" ;;\n    \"portaudiocpp.pc\") CONFIG_FILES=\"$CONFIG_FILES portaudiocpp.pc\" ;;\n\n  *) as_fn_error $? \"invalid argument: \\`$ac_config_target'\" \"$LINENO\" 5;;\n  esac\ndone\n\n\n# If the user did not use the arguments to specify the items to instantiate,\n# then the envvar interface is used.  Set only those that are not.\n# We use the long form for the default assignment because of an extremely\n# bizarre bug on SunOS 4.1.3.\nif $ac_need_defaults; then\n  test \"${CONFIG_FILES+set}\" = set || CONFIG_FILES=$config_files\n  test \"${CONFIG_COMMANDS+set}\" = set || CONFIG_COMMANDS=$config_commands\nfi\n\n# Have a temporary directory for convenience.  Make it in the build tree\n# simply because there is no reason against having it here, and in addition,\n# creating and moving files from /tmp can sometimes cause problems.\n# Hook for its removal unless debugging.\n# Note that there is a small window in which the directory will not be cleaned:\n# after its creation but before its name has been assigned to `$tmp'.\n$debug ||\n{\n  tmp= ac_tmp=\n  trap 'exit_status=$?\n  : \"${ac_tmp:=$tmp}\"\n  { test ! -d \"$ac_tmp\" || rm -fr \"$ac_tmp\"; } && exit $exit_status\n' 0\n  trap 'as_fn_exit 1' 1 2 13 15\n}\n# Create a (secure) tmp directory for tmp files.\n\n{\n  tmp=`(umask 077 && mktemp -d \"./confXXXXXX\") 2>/dev/null` &&\n  test -d \"$tmp\"\n}  ||\n{\n  tmp=./conf$$-$RANDOM\n  (umask 077 && mkdir \"$tmp\")\n} || as_fn_error $? \"cannot create a temporary directory in .\" \"$LINENO\" 5\nac_tmp=$tmp\n\n# Set up the scripts for CONFIG_FILES section.\n# No need to generate them if there are no CONFIG_FILES.\n# This happens for instance with `./config.status config.h'.\nif test -n \"$CONFIG_FILES\"; then\n\n\nac_cr=`echo X | tr X '\\015'`\n# On cygwin, bash can eat \\r inside `` if the user requested igncr.\n# But we know of no other shell where ac_cr would be empty at this\n# point, so we can use a bashism as a fallback.\nif test \"x$ac_cr\" = x; then\n  eval ac_cr=\\$\\'\\\\r\\'\nfi\nac_cs_awk_cr=`$AWK 'BEGIN { print \"a\\rb\" }' </dev/null 2>/dev/null`\nif test \"$ac_cs_awk_cr\" = \"a${ac_cr}b\"; then\n  ac_cs_awk_cr='\\\\r'\nelse\n  ac_cs_awk_cr=$ac_cr\nfi\n\necho 'BEGIN {' >\"$ac_tmp/subs1.awk\" &&\n_ACEOF\n\n\n{\n  echo \"cat >conf$$subs.awk <<_ACEOF\" &&\n  echo \"$ac_subst_vars\" | sed 's/.*/&!$&$ac_delim/' &&\n  echo \"_ACEOF\"\n} >conf$$subs.sh ||\n  as_fn_error $? \"could not make $CONFIG_STATUS\" \"$LINENO\" 5\nac_delim_num=`echo \"$ac_subst_vars\" | grep -c '^'`\nac_delim='%!_!# '\nfor ac_last_try in false false false false false :; do\n  . ./conf$$subs.sh ||\n    as_fn_error $? \"could not make $CONFIG_STATUS\" \"$LINENO\" 5\n\n  ac_delim_n=`sed -n \"s/.*$ac_delim\\$/X/p\" conf$$subs.awk | grep -c X`\n  if test $ac_delim_n = $ac_delim_num; then\n    break\n  elif $ac_last_try; then\n    as_fn_error $? \"could not make $CONFIG_STATUS\" \"$LINENO\" 5\n  else\n    ac_delim=\"$ac_delim!$ac_delim _$ac_delim!! \"\n  fi\ndone\nrm -f conf$$subs.sh\n\ncat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1\ncat >>\"\\$ac_tmp/subs1.awk\" <<\\\\_ACAWK &&\n_ACEOF\nsed -n '\nh\ns/^/S[\"/; s/!.*/\"]=/\np\ng\ns/^[^!]*!//\n:repl\nt repl\ns/'\"$ac_delim\"'$//\nt delim\n:nl\nh\ns/\\(.\\{148\\}\\)..*/\\1/\nt more1\ns/[\"\\\\]/\\\\&/g; s/^/\"/; s/$/\\\\n\"\\\\/\np\nn\nb repl\n:more1\ns/[\"\\\\]/\\\\&/g; s/^/\"/; s/$/\"\\\\/\np\ng\ns/.\\{148\\}//\nt nl\n:delim\nh\ns/\\(.\\{148\\}\\)..*/\\1/\nt more2\ns/[\"\\\\]/\\\\&/g; s/^/\"/; s/$/\"/\np\nb\n:more2\ns/[\"\\\\]/\\\\&/g; s/^/\"/; s/$/\"\\\\/\np\ng\ns/.\\{148\\}//\nt delim\n' <conf$$subs.awk | sed '\n/^[^\"\"]/{\n  N\n  s/\\n//\n}\n' >>$CONFIG_STATUS || ac_write_fail=1\nrm -f conf$$subs.awk\ncat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1\n_ACAWK\ncat >>\"\\$ac_tmp/subs1.awk\" <<_ACAWK &&\n  for (key in S) S_is_set[key] = 1\n  FS = \"\u0007\"\n\n}\n{\n  line = $ 0\n  nfields = split(line, field, \"@\")\n  substed = 0\n  len = length(field[1])\n  for (i = 2; i < nfields; i++) {\n    key = field[i]\n    keylen = length(key)\n    if (S_is_set[key]) {\n      value = S[key]\n      line = substr(line, 1, len) \"\" value \"\" substr(line, len + keylen + 3)\n      len += length(value) + length(field[++i])\n      substed = 1\n    } else\n      len += 1 + keylen\n  }\n\n  print line\n}\n\n_ACAWK\n_ACEOF\ncat >>$CONFIG_STATUS <<\\_ACEOF || ac_write_fail=1\nif sed \"s/$ac_cr//\" < /dev/null > /dev/null 2>&1; then\n  sed \"s/$ac_cr\\$//; s/$ac_cr/$ac_cs_awk_cr/g\"\nelse\n  cat\nfi < \"$ac_tmp/subs1.awk\" > \"$ac_tmp/subs.awk\" \\\n  || as_fn_error $? \"could not setup config files machinery\" \"$LINENO\" 5\n_ACEOF\n\n# VPATH may cause trouble with some makes, so we remove sole $(srcdir),\n# ${srcdir} and @srcdir@ entries from VPATH if srcdir is \".\", strip leading and\n# trailing colons and then remove the whole line if VPATH becomes empty\n# (actually we leave an empty line to preserve line numbers).\nif test \"x$srcdir\" = x.; then\n  ac_vpsub='/^[\t ]*VPATH[\t ]*=[\t ]*/{\nh\ns///\ns/^/:/\ns/[\t ]*$/:/\ns/:\\$(srcdir):/:/g\ns/:\\${srcdir}:/:/g\ns/:@srcdir@:/:/g\ns/^:*//\ns/:*$//\nx\ns/\\(=[\t ]*\\).*/\\1/\nG\ns/\\n//\ns/^[^=]*=[\t ]*$//\n}'\nfi\n\ncat >>$CONFIG_STATUS <<\\_ACEOF || ac_write_fail=1\nfi # test -n \"$CONFIG_FILES\"\n\n\neval set X \"  :F $CONFIG_FILES      :C $CONFIG_COMMANDS\"\nshift\nfor ac_tag\ndo\n  case $ac_tag in\n  :[FHLC]) ac_mode=$ac_tag; continue;;\n  esac\n  case $ac_mode$ac_tag in\n  :[FHL]*:*);;\n  :L* | :C*:*) as_fn_error $? \"invalid tag \\`$ac_tag'\" \"$LINENO\" 5;;\n  :[FH]-) ac_tag=-:-;;\n  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;\n  esac\n  ac_save_IFS=$IFS\n  IFS=:\n  set x $ac_tag\n  IFS=$ac_save_IFS\n  shift\n  ac_file=$1\n  shift\n\n  case $ac_mode in\n  :L) ac_source=$1;;\n  :[FH])\n    ac_file_inputs=\n    for ac_f\n    do\n      case $ac_f in\n      -) ac_f=\"$ac_tmp/stdin\";;\n      *) # Look for the file first in the build tree, then in the source tree\n\t # (if the path is not absolute).  The absolute path cannot be DOS-style,\n\t # because $ac_f cannot contain `:'.\n\t test -f \"$ac_f\" ||\n\t   case $ac_f in\n\t   [\\\\/$]*) false;;\n\t   *) test -f \"$srcdir/$ac_f\" && ac_f=\"$srcdir/$ac_f\";;\n\t   esac ||\n\t   as_fn_error 1 \"cannot find input file: \\`$ac_f'\" \"$LINENO\" 5;;\n      esac\n      case $ac_f in *\\'*) ac_f=`$as_echo \"$ac_f\" | sed \"s/'/'\\\\\\\\\\\\\\\\''/g\"`;; esac\n      as_fn_append ac_file_inputs \" '$ac_f'\"\n    done\n\n    # Let's still pretend it is `configure' which instantiates (i.e., don't\n    # use $as_me), people would be surprised to read:\n    #    /* config.h.  Generated by config.status.  */\n    configure_input='Generated from '`\n\t  $as_echo \"$*\" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'\n\t`' by configure.'\n    if test x\"$ac_file\" != x-; then\n      configure_input=\"$ac_file.  $configure_input\"\n      { $as_echo \"$as_me:${as_lineno-$LINENO}: creating $ac_file\" >&5\n$as_echo \"$as_me: creating $ac_file\" >&6;}\n    fi\n    # Neutralize special characters interpreted by sed in replacement strings.\n    case $configure_input in #(\n    *\\&* | *\\|* | *\\\\* )\n       ac_sed_conf_input=`$as_echo \"$configure_input\" |\n       sed 's/[\\\\\\\\&|]/\\\\\\\\&/g'`;; #(\n    *) ac_sed_conf_input=$configure_input;;\n    esac\n\n    case $ac_tag in\n    *:-:* | *:-) cat >\"$ac_tmp/stdin\" \\\n      || as_fn_error $? \"could not create $ac_file\" \"$LINENO\" 5 ;;\n    esac\n    ;;\n  esac\n\n  ac_dir=`$as_dirname -- \"$ac_file\" ||\n$as_expr X\"$ac_file\" : 'X\\(.*[^/]\\)//*[^/][^/]*/*$' \\| \\\n\t X\"$ac_file\" : 'X\\(//\\)[^/]' \\| \\\n\t X\"$ac_file\" : 'X\\(//\\)$' \\| \\\n\t X\"$ac_file\" : 'X\\(/\\)' \\| . 2>/dev/null ||\n$as_echo X\"$ac_file\" |\n    sed '/^X\\(.*[^/]\\)\\/\\/*[^/][^/]*\\/*$/{\n\t    s//\\1/\n\t    q\n\t  }\n\t  /^X\\(\\/\\/\\)[^/].*/{\n\t    s//\\1/\n\t    q\n\t  }\n\t  /^X\\(\\/\\/\\)$/{\n\t    s//\\1/\n\t    q\n\t  }\n\t  /^X\\(\\/\\).*/{\n\t    s//\\1/\n\t    q\n\t  }\n\t  s/.*/./; q'`\n  as_dir=\"$ac_dir\"; as_fn_mkdir_p\n  ac_builddir=.\n\ncase \"$ac_dir\" in\n.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;\n*)\n  ac_dir_suffix=/`$as_echo \"$ac_dir\" | sed 's|^\\.[\\\\/]||'`\n  # A \"..\" for each directory in $ac_dir_suffix.\n  ac_top_builddir_sub=`$as_echo \"$ac_dir_suffix\" | sed 's|/[^\\\\/]*|/..|g;s|/||'`\n  case $ac_top_builddir_sub in\n  \"\") ac_top_builddir_sub=. ac_top_build_prefix= ;;\n  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;\n  esac ;;\nesac\nac_abs_top_builddir=$ac_pwd\nac_abs_builddir=$ac_pwd$ac_dir_suffix\n# for backward compatibility:\nac_top_builddir=$ac_top_build_prefix\n\ncase $srcdir in\n  .)  # We are building in place.\n    ac_srcdir=.\n    ac_top_srcdir=$ac_top_builddir_sub\n    ac_abs_top_srcdir=$ac_pwd ;;\n  [\\\\/]* | ?:[\\\\/]* )  # Absolute name.\n    ac_srcdir=$srcdir$ac_dir_suffix;\n    ac_top_srcdir=$srcdir\n    ac_abs_top_srcdir=$srcdir ;;\n  *) # Relative name.\n    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix\n    ac_top_srcdir=$ac_top_build_prefix$srcdir\n    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;\nesac\nac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix\n\n\n  case $ac_mode in\n  :F)\n  #\n  # CONFIG_FILE\n  #\n\n  case $INSTALL in\n  [\\\\/$]* | ?:[\\\\/]* ) ac_INSTALL=$INSTALL ;;\n  *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;\n  esac\n  ac_MKDIR_P=$MKDIR_P\n  case $MKDIR_P in\n  [\\\\/$]* | ?:[\\\\/]* ) ;;\n  */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;\n  esac\n_ACEOF\n\ncat >>$CONFIG_STATUS <<\\_ACEOF || ac_write_fail=1\n# If the template does not know about datarootdir, expand it.\n# FIXME: This hack should be removed a few years after 2.60.\nac_datarootdir_hack=; ac_datarootdir_seen=\nac_sed_dataroot='\n/datarootdir/ {\n  p\n  q\n}\n/@datadir@/p\n/@docdir@/p\n/@infodir@/p\n/@localedir@/p\n/@mandir@/p'\ncase `eval \"sed -n \\\"\\$ac_sed_dataroot\\\" $ac_file_inputs\"` in\n*datarootdir*) ac_datarootdir_seen=yes;;\n*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting\" >&5\n$as_echo \"$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting\" >&2;}\n_ACEOF\ncat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1\n  ac_datarootdir_hack='\n  s&@datadir@&$datadir&g\n  s&@docdir@&$docdir&g\n  s&@infodir@&$infodir&g\n  s&@localedir@&$localedir&g\n  s&@mandir@&$mandir&g\n  s&\\\\\\${datarootdir}&$datarootdir&g' ;;\nesac\n_ACEOF\n\n# Neutralize VPATH when `$srcdir' = `.'.\n# Shell code in configure.ac might set extrasub.\n# FIXME: do we really want to maintain this feature?\ncat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1\nac_sed_extra=\"$ac_vpsub\n$extrasub\n_ACEOF\ncat >>$CONFIG_STATUS <<\\_ACEOF || ac_write_fail=1\n:t\n/@[a-zA-Z_][a-zA-Z_0-9]*@/!b\ns|@configure_input@|$ac_sed_conf_input|;t t\ns&@top_builddir@&$ac_top_builddir_sub&;t t\ns&@top_build_prefix@&$ac_top_build_prefix&;t t\ns&@srcdir@&$ac_srcdir&;t t\ns&@abs_srcdir@&$ac_abs_srcdir&;t t\ns&@top_srcdir@&$ac_top_srcdir&;t t\ns&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t\ns&@builddir@&$ac_builddir&;t t\ns&@abs_builddir@&$ac_abs_builddir&;t t\ns&@abs_top_builddir@&$ac_abs_top_builddir&;t t\ns&@INSTALL@&$ac_INSTALL&;t t\ns&@MKDIR_P@&$ac_MKDIR_P&;t t\n$ac_datarootdir_hack\n\"\neval sed \\\"\\$ac_sed_extra\\\" \"$ac_file_inputs\" | $AWK -f \"$ac_tmp/subs.awk\" \\\n  >$ac_tmp/out || as_fn_error $? \"could not create $ac_file\" \"$LINENO\" 5\n\ntest -z \"$ac_datarootdir_hack$ac_datarootdir_seen\" &&\n  { ac_out=`sed -n '/\\${datarootdir}/p' \"$ac_tmp/out\"`; test -n \"$ac_out\"; } &&\n  { ac_out=`sed -n '/^[\t ]*datarootdir[\t ]*:*=/p' \\\n      \"$ac_tmp/out\"`; test -z \"$ac_out\"; } &&\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \\`datarootdir'\nwhich seems to be undefined.  Please make sure it is defined\" >&5\n$as_echo \"$as_me: WARNING: $ac_file contains a reference to the variable \\`datarootdir'\nwhich seems to be undefined.  Please make sure it is defined\" >&2;}\n\n  rm -f \"$ac_tmp/stdin\"\n  case $ac_file in\n  -) cat \"$ac_tmp/out\" && rm -f \"$ac_tmp/out\";;\n  *) rm -f \"$ac_file\" && mv \"$ac_tmp/out\" \"$ac_file\";;\n  esac \\\n  || as_fn_error $? \"could not create $ac_file\" \"$LINENO\" 5\n ;;\n\n\n  :C)  { $as_echo \"$as_me:${as_lineno-$LINENO}: executing $ac_file commands\" >&5\n$as_echo \"$as_me: executing $ac_file commands\" >&6;}\n ;;\n  esac\n\n\n  case $ac_file$ac_mode in\n    \"depfiles\":C) test x\"$AMDEP_TRUE\" != x\"\" || {\n  # Older Autoconf quotes --file arguments for eval, but not when files\n  # are listed without --file.  Let's play safe and only enable the eval\n  # if we detect the quoting.\n  case $CONFIG_FILES in\n  *\\'*) eval set x \"$CONFIG_FILES\" ;;\n  *)   set x $CONFIG_FILES ;;\n  esac\n  shift\n  for mf\n  do\n    # Strip MF so we end up with the name of the file.\n    mf=`echo \"$mf\" | sed -e 's/:.*$//'`\n    # Check whether this is an Automake generated Makefile or not.\n    # We used to match only the files named 'Makefile.in', but\n    # some people rename them; so instead we look at the file content.\n    # Grep'ing the first line is not enough: some people post-process\n    # each Makefile.in and add a new line on top of each file to say so.\n    # Grep'ing the whole file is not good either: AIX grep has a line\n    # limit of 2048, but all sed's we know have understand at least 4000.\n    if sed -n 's,^#.*generated by automake.*,X,p' \"$mf\" | grep X >/dev/null 2>&1; then\n      dirpart=`$as_dirname -- \"$mf\" ||\n$as_expr X\"$mf\" : 'X\\(.*[^/]\\)//*[^/][^/]*/*$' \\| \\\n\t X\"$mf\" : 'X\\(//\\)[^/]' \\| \\\n\t X\"$mf\" : 'X\\(//\\)$' \\| \\\n\t X\"$mf\" : 'X\\(/\\)' \\| . 2>/dev/null ||\n$as_echo X\"$mf\" |\n    sed '/^X\\(.*[^/]\\)\\/\\/*[^/][^/]*\\/*$/{\n\t    s//\\1/\n\t    q\n\t  }\n\t  /^X\\(\\/\\/\\)[^/].*/{\n\t    s//\\1/\n\t    q\n\t  }\n\t  /^X\\(\\/\\/\\)$/{\n\t    s//\\1/\n\t    q\n\t  }\n\t  /^X\\(\\/\\).*/{\n\t    s//\\1/\n\t    q\n\t  }\n\t  s/.*/./; q'`\n    else\n      continue\n    fi\n    # Extract the definition of DEPDIR, am__include, and am__quote\n    # from the Makefile without running 'make'.\n    DEPDIR=`sed -n 's/^DEPDIR = //p' < \"$mf\"`\n    test -z \"$DEPDIR\" && continue\n    am__include=`sed -n 's/^am__include = //p' < \"$mf\"`\n    test -z \"$am__include\" && continue\n    am__quote=`sed -n 's/^am__quote = //p' < \"$mf\"`\n    # Find all dependency output files, they are included files with\n    # $(DEPDIR) in their names.  We invoke sed twice because it is the\n    # simplest approach to changing $(DEPDIR) to its actual value in the\n    # expansion.\n    for file in `sed -n \"\n      s/^$am__include $am__quote\\(.*(DEPDIR).*\\)$am__quote\"'$/\\1/p' <\"$mf\" | \\\n\t sed -e 's/\\$(DEPDIR)/'\"$DEPDIR\"'/g'`; do\n      # Make sure the directory exists.\n      test -f \"$dirpart/$file\" && continue\n      fdir=`$as_dirname -- \"$file\" ||\n$as_expr X\"$file\" : 'X\\(.*[^/]\\)//*[^/][^/]*/*$' \\| \\\n\t X\"$file\" : 'X\\(//\\)[^/]' \\| \\\n\t X\"$file\" : 'X\\(//\\)$' \\| \\\n\t X\"$file\" : 'X\\(/\\)' \\| . 2>/dev/null ||\n$as_echo X\"$file\" |\n    sed '/^X\\(.*[^/]\\)\\/\\/*[^/][^/]*\\/*$/{\n\t    s//\\1/\n\t    q\n\t  }\n\t  /^X\\(\\/\\/\\)[^/].*/{\n\t    s//\\1/\n\t    q\n\t  }\n\t  /^X\\(\\/\\/\\)$/{\n\t    s//\\1/\n\t    q\n\t  }\n\t  /^X\\(\\/\\).*/{\n\t    s//\\1/\n\t    q\n\t  }\n\t  s/.*/./; q'`\n      as_dir=$dirpart/$fdir; as_fn_mkdir_p\n      # echo \"creating $dirpart/$file\"\n      echo '# dummy' > \"$dirpart/$file\"\n    done\n  done\n}\n ;;\n    \"libtool\":C)\n\n    # See if we are running on zsh, and set the options which allow our\n    # commands through without removal of \\ escapes.\n    if test -n \"${ZSH_VERSION+set}\" ; then\n      setopt NO_GLOB_SUBST\n    fi\n\n    cfgfile=\"${ofile}T\"\n    trap \"$RM \\\"$cfgfile\\\"; exit 1\" 1 2 15\n    $RM \"$cfgfile\"\n\n    cat <<_LT_EOF >> \"$cfgfile\"\n#! $SHELL\n\n# `$ECHO \"$ofile\" | sed 's%^.*/%%'` - Provide generalized library-building support services.\n# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION\n# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:\n# NOTE: Changes made to this file will be lost: look at ltmain.sh.\n#\n#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,\n#                 2006, 2007, 2008, 2009, 2010, 2011 Free Software\n#                 Foundation, Inc.\n#   Written by Gordon Matzigkeit, 1996\n#\n#   This file is part of GNU Libtool.\n#\n# GNU Libtool is free software; you can redistribute it and/or\n# modify it under the terms of the GNU General Public License as\n# published by the Free Software Foundation; either version 2 of\n# the License, or (at your option) any later version.\n#\n# As a special exception to the GNU General Public License,\n# if you distribute this file as part of a program or library that\n# is built using GNU Libtool, you may include this file under the\n# same distribution terms that you use for the rest of that program.\n#\n# GNU Libtool is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n# GNU General Public License for more details.\n#\n# You should have received a copy of the GNU General Public License\n# along with GNU Libtool; see the file COPYING.  If not, a copy\n# can be downloaded from http://www.gnu.org/licenses/gpl.html, or\n# obtained by writing to the Free Software Foundation, Inc.,\n# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n\n\n# The names of the tagged configurations supported by this script.\navailable_tags=\"CXX \"\n\n# ### BEGIN LIBTOOL CONFIG\n\n# Assembler program.\nAS=$lt_AS\n\n# DLL creation program.\nDLLTOOL=$lt_DLLTOOL\n\n# Object dumper program.\nOBJDUMP=$lt_OBJDUMP\n\n# Which release of libtool.m4 was used?\nmacro_version=$macro_version\nmacro_revision=$macro_revision\n\n# Whether or not to build shared libraries.\nbuild_libtool_libs=$enable_shared\n\n# Whether or not to build static libraries.\nbuild_old_libs=$enable_static\n\n# What type of objects to build.\npic_mode=$pic_mode\n\n# Whether or not to optimize for fast installation.\nfast_install=$enable_fast_install\n\n# Shell to use when invoking shell scripts.\nSHELL=$lt_SHELL\n\n# An echo program that protects backslashes.\nECHO=$lt_ECHO\n\n# The PATH separator for the build system.\nPATH_SEPARATOR=$lt_PATH_SEPARATOR\n\n# The host system.\nhost_alias=$host_alias\nhost=$host\nhost_os=$host_os\n\n# The build system.\nbuild_alias=$build_alias\nbuild=$build\nbuild_os=$build_os\n\n# A sed program that does not truncate output.\nSED=$lt_SED\n\n# Sed that helps us avoid accidentally triggering echo(1) options like -n.\nXsed=\"\\$SED -e 1s/^X//\"\n\n# A grep program that handles long lines.\nGREP=$lt_GREP\n\n# An ERE matcher.\nEGREP=$lt_EGREP\n\n# A literal string matcher.\nFGREP=$lt_FGREP\n\n# A BSD- or MS-compatible name lister.\nNM=$lt_NM\n\n# Whether we need soft or hard links.\nLN_S=$lt_LN_S\n\n# What is the maximum length of a command?\nmax_cmd_len=$max_cmd_len\n\n# Object file suffix (normally \"o\").\nobjext=$ac_objext\n\n# Executable file suffix (normally \"\").\nexeext=$exeext\n\n# whether the shell understands \"unset\".\nlt_unset=$lt_unset\n\n# turn spaces into newlines.\nSP2NL=$lt_lt_SP2NL\n\n# turn newlines into spaces.\nNL2SP=$lt_lt_NL2SP\n\n# convert \\$build file names to \\$host format.\nto_host_file_cmd=$lt_cv_to_host_file_cmd\n\n# convert \\$build files to toolchain format.\nto_tool_file_cmd=$lt_cv_to_tool_file_cmd\n\n# Method to check whether dependent libraries are shared objects.\ndeplibs_check_method=$lt_deplibs_check_method\n\n# Command to use when deplibs_check_method = \"file_magic\".\nfile_magic_cmd=$lt_file_magic_cmd\n\n# How to find potential files when deplibs_check_method = \"file_magic\".\nfile_magic_glob=$lt_file_magic_glob\n\n# Find potential files using nocaseglob when deplibs_check_method = \"file_magic\".\nwant_nocaseglob=$lt_want_nocaseglob\n\n# Command to associate shared and link libraries.\nsharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd\n\n# The archiver.\nAR=$lt_AR\n\n# Flags to create an archive.\nAR_FLAGS=$lt_AR_FLAGS\n\n# How to feed a file listing to the archiver.\narchiver_list_spec=$lt_archiver_list_spec\n\n# A symbol stripping program.\nSTRIP=$lt_STRIP\n\n# Commands used to install an old-style archive.\nRANLIB=$lt_RANLIB\nold_postinstall_cmds=$lt_old_postinstall_cmds\nold_postuninstall_cmds=$lt_old_postuninstall_cmds\n\n# Whether to use a lock for old archive extraction.\nlock_old_archive_extraction=$lock_old_archive_extraction\n\n# A C compiler.\nLTCC=$lt_CC\n\n# LTCC compiler flags.\nLTCFLAGS=$lt_CFLAGS\n\n# Take the output of nm and produce a listing of raw symbols and C names.\nglobal_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe\n\n# Transform the output of nm in a proper C declaration.\nglobal_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl\n\n# Transform the output of nm in a C name address pair.\nglobal_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address\n\n# Transform the output of nm in a C name address pair when lib prefix is needed.\nglobal_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix\n\n# Specify filename containing input files for \\$NM.\nnm_file_list_spec=$lt_nm_file_list_spec\n\n# The root where to search for dependent libraries,and in which our libraries should be installed.\nlt_sysroot=$lt_sysroot\n\n# The name of the directory that contains temporary libtool files.\nobjdir=$objdir\n\n# Used to examine libraries when file_magic_cmd begins with \"file\".\nMAGIC_CMD=$MAGIC_CMD\n\n# Must we lock files when doing compilation?\nneed_locks=$lt_need_locks\n\n# Manifest tool.\nMANIFEST_TOOL=$lt_MANIFEST_TOOL\n\n# Tool to manipulate archived DWARF debug symbol files on Mac OS X.\nDSYMUTIL=$lt_DSYMUTIL\n\n# Tool to change global to local symbols on Mac OS X.\nNMEDIT=$lt_NMEDIT\n\n# Tool to manipulate fat objects and archives on Mac OS X.\nLIPO=$lt_LIPO\n\n# ldd/readelf like tool for Mach-O binaries on Mac OS X.\nOTOOL=$lt_OTOOL\n\n# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4.\nOTOOL64=$lt_OTOOL64\n\n# Old archive suffix (normally \"a\").\nlibext=$libext\n\n# Shared library suffix (normally \".so\").\nshrext_cmds=$lt_shrext_cmds\n\n# The commands to extract the exported symbol list from a shared archive.\nextract_expsyms_cmds=$lt_extract_expsyms_cmds\n\n# Variables whose values should be saved in libtool wrapper scripts and\n# restored at link time.\nvariables_saved_for_relink=$lt_variables_saved_for_relink\n\n# Do we need the \"lib\" prefix for modules?\nneed_lib_prefix=$need_lib_prefix\n\n# Do we need a version for libraries?\nneed_version=$need_version\n\n# Library versioning type.\nversion_type=$version_type\n\n# Shared library runtime path variable.\nrunpath_var=$runpath_var\n\n# Shared library path variable.\nshlibpath_var=$shlibpath_var\n\n# Is shlibpath searched before the hard-coded library search path?\nshlibpath_overrides_runpath=$shlibpath_overrides_runpath\n\n# Format of library name prefix.\nlibname_spec=$lt_libname_spec\n\n# List of archive names.  First name is the real one, the rest are links.\n# The last name is the one that the linker finds with -lNAME\nlibrary_names_spec=$lt_library_names_spec\n\n# The coded name of the library, if different from the real name.\nsoname_spec=$lt_soname_spec\n\n# Permission mode override for installation of shared libraries.\ninstall_override_mode=$lt_install_override_mode\n\n# Command to use after installation of a shared archive.\npostinstall_cmds=$lt_postinstall_cmds\n\n# Command to use after uninstallation of a shared archive.\npostuninstall_cmds=$lt_postuninstall_cmds\n\n# Commands used to finish a libtool library installation in a directory.\nfinish_cmds=$lt_finish_cmds\n\n# As \"finish_cmds\", except a single script fragment to be evaled but\n# not shown.\nfinish_eval=$lt_finish_eval\n\n# Whether we should hardcode library paths into libraries.\nhardcode_into_libs=$hardcode_into_libs\n\n# Compile-time system search path for libraries.\nsys_lib_search_path_spec=$lt_sys_lib_search_path_spec\n\n# Run-time system search path for libraries.\nsys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec\n\n# Whether dlopen is supported.\ndlopen_support=$enable_dlopen\n\n# Whether dlopen of programs is supported.\ndlopen_self=$enable_dlopen_self\n\n# Whether dlopen of statically linked programs is supported.\ndlopen_self_static=$enable_dlopen_self_static\n\n# Commands to strip libraries.\nold_striplib=$lt_old_striplib\nstriplib=$lt_striplib\n\n\n# The linker used to build libraries.\nLD=$lt_LD\n\n# How to create reloadable object files.\nreload_flag=$lt_reload_flag\nreload_cmds=$lt_reload_cmds\n\n# Commands used to build an old-style archive.\nold_archive_cmds=$lt_old_archive_cmds\n\n# A language specific compiler.\nCC=$lt_compiler\n\n# Is the compiler the GNU compiler?\nwith_gcc=$GCC\n\n# Compiler flag to turn off builtin functions.\nno_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag\n\n# Additional compiler flags for building library objects.\npic_flag=$lt_lt_prog_compiler_pic\n\n# How to pass a linker flag through the compiler.\nwl=$lt_lt_prog_compiler_wl\n\n# Compiler flag to prevent dynamic linking.\nlink_static_flag=$lt_lt_prog_compiler_static\n\n# Does compiler simultaneously support -c and -o options?\ncompiler_c_o=$lt_lt_cv_prog_compiler_c_o\n\n# Whether or not to add -lc for building shared libraries.\nbuild_libtool_need_lc=$archive_cmds_need_lc\n\n# Whether or not to disallow shared libs when runtime libs are static.\nallow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes\n\n# Compiler flag to allow reflexive dlopens.\nexport_dynamic_flag_spec=$lt_export_dynamic_flag_spec\n\n# Compiler flag to generate shared objects directly from archives.\nwhole_archive_flag_spec=$lt_whole_archive_flag_spec\n\n# Whether the compiler copes with passing no objects directly.\ncompiler_needs_object=$lt_compiler_needs_object\n\n# Create an old-style archive from a shared archive.\nold_archive_from_new_cmds=$lt_old_archive_from_new_cmds\n\n# Create a temporary old-style archive to link instead of a shared archive.\nold_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds\n\n# Commands used to build a shared archive.\narchive_cmds=$lt_archive_cmds\narchive_expsym_cmds=$lt_archive_expsym_cmds\n\n# Commands used to build a loadable module if different from building\n# a shared archive.\nmodule_cmds=$lt_module_cmds\nmodule_expsym_cmds=$lt_module_expsym_cmds\n\n# Whether we are building with GNU ld or not.\nwith_gnu_ld=$lt_with_gnu_ld\n\n# Flag that allows shared libraries with undefined symbols to be built.\nallow_undefined_flag=$lt_allow_undefined_flag\n\n# Flag that enforces no undefined symbols.\nno_undefined_flag=$lt_no_undefined_flag\n\n# Flag to hardcode \\$libdir into a binary during linking.\n# This must work even if \\$libdir does not exist\nhardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec\n\n# Whether we need a single \"-rpath\" flag with a separated argument.\nhardcode_libdir_separator=$lt_hardcode_libdir_separator\n\n# Set to \"yes\" if using DIR/libNAME\\${shared_ext} during linking hardcodes\n# DIR into the resulting binary.\nhardcode_direct=$hardcode_direct\n\n# Set to \"yes\" if using DIR/libNAME\\${shared_ext} during linking hardcodes\n# DIR into the resulting binary and the resulting library dependency is\n# \"absolute\",i.e impossible to change by setting \\${shlibpath_var} if the\n# library is relocated.\nhardcode_direct_absolute=$hardcode_direct_absolute\n\n# Set to \"yes\" if using the -LDIR flag during linking hardcodes DIR\n# into the resulting binary.\nhardcode_minus_L=$hardcode_minus_L\n\n# Set to \"yes\" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR\n# into the resulting binary.\nhardcode_shlibpath_var=$hardcode_shlibpath_var\n\n# Set to \"yes\" if building a shared library automatically hardcodes DIR\n# into the library and all subsequent libraries and executables linked\n# against it.\nhardcode_automatic=$hardcode_automatic\n\n# Set to yes if linker adds runtime paths of dependent libraries\n# to runtime path list.\ninherit_rpath=$inherit_rpath\n\n# Whether libtool must link a program against all its dependency libraries.\nlink_all_deplibs=$link_all_deplibs\n\n# Set to \"yes\" if exported symbols are required.\nalways_export_symbols=$always_export_symbols\n\n# The commands to list exported symbols.\nexport_symbols_cmds=$lt_export_symbols_cmds\n\n# Symbols that should not be listed in the preloaded symbols.\nexclude_expsyms=$lt_exclude_expsyms\n\n# Symbols that must always be exported.\ninclude_expsyms=$lt_include_expsyms\n\n# Commands necessary for linking programs (against libraries) with templates.\nprelink_cmds=$lt_prelink_cmds\n\n# Commands necessary for finishing linking programs.\npostlink_cmds=$lt_postlink_cmds\n\n# Specify filename containing input files.\nfile_list_spec=$lt_file_list_spec\n\n# How to hardcode a shared library path into an executable.\nhardcode_action=$hardcode_action\n\n# The directories searched by this compiler when creating a shared library.\ncompiler_lib_search_dirs=$lt_compiler_lib_search_dirs\n\n# Dependencies to place before and after the objects being linked to\n# create a shared library.\npredep_objects=$lt_predep_objects\npostdep_objects=$lt_postdep_objects\npredeps=$lt_predeps\npostdeps=$lt_postdeps\n\n# The library search path used internally by the compiler when linking\n# a shared library.\ncompiler_lib_search_path=$lt_compiler_lib_search_path\n\n# ### END LIBTOOL CONFIG\n\n_LT_EOF\n\n  case $host_os in\n  aix3*)\n    cat <<\\_LT_EOF >> \"$cfgfile\"\n# AIX sometimes has problems with the GCC collect2 program.  For some\n# reason, if we set the COLLECT_NAMES environment variable, the problems\n# vanish in a puff of smoke.\nif test \"X${COLLECT_NAMES+set}\" != Xset; then\n  COLLECT_NAMES=\n  export COLLECT_NAMES\nfi\n_LT_EOF\n    ;;\n  esac\n\n\nltmain=\"$ac_aux_dir/ltmain.sh\"\n\n\n  # We use sed instead of cat because bash on DJGPP gets confused if\n  # if finds mixed CR/LF and LF-only lines.  Since sed operates in\n  # text mode, it properly converts lines to CR/LF.  This bash problem\n  # is reportedly fixed, but why not run on old versions too?\n  sed '$q' \"$ltmain\" >> \"$cfgfile\" \\\n     || (rm -f \"$cfgfile\"; exit 1)\n\n  if test x\"$xsi_shell\" = xyes; then\n  sed -e '/^func_dirname ()$/,/^} # func_dirname /c\\\nfunc_dirname ()\\\n{\\\n\\    case ${1} in\\\n\\      */*) func_dirname_result=\"${1%/*}${2}\" ;;\\\n\\      *  ) func_dirname_result=\"${3}\" ;;\\\n\\    esac\\\n} # Extended-shell func_dirname implementation' \"$cfgfile\" > $cfgfile.tmp \\\n  && mv -f \"$cfgfile.tmp\" \"$cfgfile\" \\\n    || (rm -f \"$cfgfile\" && cp \"$cfgfile.tmp\" \"$cfgfile\" && rm -f \"$cfgfile.tmp\")\ntest 0 -eq $? || _lt_function_replace_fail=:\n\n\n  sed -e '/^func_basename ()$/,/^} # func_basename /c\\\nfunc_basename ()\\\n{\\\n\\    func_basename_result=\"${1##*/}\"\\\n} # Extended-shell func_basename implementation' \"$cfgfile\" > $cfgfile.tmp \\\n  && mv -f \"$cfgfile.tmp\" \"$cfgfile\" \\\n    || (rm -f \"$cfgfile\" && cp \"$cfgfile.tmp\" \"$cfgfile\" && rm -f \"$cfgfile.tmp\")\ntest 0 -eq $? || _lt_function_replace_fail=:\n\n\n  sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\\\nfunc_dirname_and_basename ()\\\n{\\\n\\    case ${1} in\\\n\\      */*) func_dirname_result=\"${1%/*}${2}\" ;;\\\n\\      *  ) func_dirname_result=\"${3}\" ;;\\\n\\    esac\\\n\\    func_basename_result=\"${1##*/}\"\\\n} # Extended-shell func_dirname_and_basename implementation' \"$cfgfile\" > $cfgfile.tmp \\\n  && mv -f \"$cfgfile.tmp\" \"$cfgfile\" \\\n    || (rm -f \"$cfgfile\" && cp \"$cfgfile.tmp\" \"$cfgfile\" && rm -f \"$cfgfile.tmp\")\ntest 0 -eq $? || _lt_function_replace_fail=:\n\n\n  sed -e '/^func_stripname ()$/,/^} # func_stripname /c\\\nfunc_stripname ()\\\n{\\\n\\    # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\\\n\\    # positional parameters, so assign one to ordinary parameter first.\\\n\\    func_stripname_result=${3}\\\n\\    func_stripname_result=${func_stripname_result#\"${1}\"}\\\n\\    func_stripname_result=${func_stripname_result%\"${2}\"}\\\n} # Extended-shell func_stripname implementation' \"$cfgfile\" > $cfgfile.tmp \\\n  && mv -f \"$cfgfile.tmp\" \"$cfgfile\" \\\n    || (rm -f \"$cfgfile\" && cp \"$cfgfile.tmp\" \"$cfgfile\" && rm -f \"$cfgfile.tmp\")\ntest 0 -eq $? || _lt_function_replace_fail=:\n\n\n  sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\\\nfunc_split_long_opt ()\\\n{\\\n\\    func_split_long_opt_name=${1%%=*}\\\n\\    func_split_long_opt_arg=${1#*=}\\\n} # Extended-shell func_split_long_opt implementation' \"$cfgfile\" > $cfgfile.tmp \\\n  && mv -f \"$cfgfile.tmp\" \"$cfgfile\" \\\n    || (rm -f \"$cfgfile\" && cp \"$cfgfile.tmp\" \"$cfgfile\" && rm -f \"$cfgfile.tmp\")\ntest 0 -eq $? || _lt_function_replace_fail=:\n\n\n  sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\\\nfunc_split_short_opt ()\\\n{\\\n\\    func_split_short_opt_arg=${1#??}\\\n\\    func_split_short_opt_name=${1%\"$func_split_short_opt_arg\"}\\\n} # Extended-shell func_split_short_opt implementation' \"$cfgfile\" > $cfgfile.tmp \\\n  && mv -f \"$cfgfile.tmp\" \"$cfgfile\" \\\n    || (rm -f \"$cfgfile\" && cp \"$cfgfile.tmp\" \"$cfgfile\" && rm -f \"$cfgfile.tmp\")\ntest 0 -eq $? || _lt_function_replace_fail=:\n\n\n  sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\\\nfunc_lo2o ()\\\n{\\\n\\    case ${1} in\\\n\\      *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\\\n\\      *)    func_lo2o_result=${1} ;;\\\n\\    esac\\\n} # Extended-shell func_lo2o implementation' \"$cfgfile\" > $cfgfile.tmp \\\n  && mv -f \"$cfgfile.tmp\" \"$cfgfile\" \\\n    || (rm -f \"$cfgfile\" && cp \"$cfgfile.tmp\" \"$cfgfile\" && rm -f \"$cfgfile.tmp\")\ntest 0 -eq $? || _lt_function_replace_fail=:\n\n\n  sed -e '/^func_xform ()$/,/^} # func_xform /c\\\nfunc_xform ()\\\n{\\\n    func_xform_result=${1%.*}.lo\\\n} # Extended-shell func_xform implementation' \"$cfgfile\" > $cfgfile.tmp \\\n  && mv -f \"$cfgfile.tmp\" \"$cfgfile\" \\\n    || (rm -f \"$cfgfile\" && cp \"$cfgfile.tmp\" \"$cfgfile\" && rm -f \"$cfgfile.tmp\")\ntest 0 -eq $? || _lt_function_replace_fail=:\n\n\n  sed -e '/^func_arith ()$/,/^} # func_arith /c\\\nfunc_arith ()\\\n{\\\n    func_arith_result=$(( $* ))\\\n} # Extended-shell func_arith implementation' \"$cfgfile\" > $cfgfile.tmp \\\n  && mv -f \"$cfgfile.tmp\" \"$cfgfile\" \\\n    || (rm -f \"$cfgfile\" && cp \"$cfgfile.tmp\" \"$cfgfile\" && rm -f \"$cfgfile.tmp\")\ntest 0 -eq $? || _lt_function_replace_fail=:\n\n\n  sed -e '/^func_len ()$/,/^} # func_len /c\\\nfunc_len ()\\\n{\\\n    func_len_result=${#1}\\\n} # Extended-shell func_len implementation' \"$cfgfile\" > $cfgfile.tmp \\\n  && mv -f \"$cfgfile.tmp\" \"$cfgfile\" \\\n    || (rm -f \"$cfgfile\" && cp \"$cfgfile.tmp\" \"$cfgfile\" && rm -f \"$cfgfile.tmp\")\ntest 0 -eq $? || _lt_function_replace_fail=:\n\nfi\n\nif test x\"$lt_shell_append\" = xyes; then\n  sed -e '/^func_append ()$/,/^} # func_append /c\\\nfunc_append ()\\\n{\\\n    eval \"${1}+=\\\\${2}\"\\\n} # Extended-shell func_append implementation' \"$cfgfile\" > $cfgfile.tmp \\\n  && mv -f \"$cfgfile.tmp\" \"$cfgfile\" \\\n    || (rm -f \"$cfgfile\" && cp \"$cfgfile.tmp\" \"$cfgfile\" && rm -f \"$cfgfile.tmp\")\ntest 0 -eq $? || _lt_function_replace_fail=:\n\n\n  sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\\\nfunc_append_quoted ()\\\n{\\\n\\    func_quote_for_eval \"${2}\"\\\n\\    eval \"${1}+=\\\\\\\\ \\\\$func_quote_for_eval_result\"\\\n} # Extended-shell func_append_quoted implementation' \"$cfgfile\" > $cfgfile.tmp \\\n  && mv -f \"$cfgfile.tmp\" \"$cfgfile\" \\\n    || (rm -f \"$cfgfile\" && cp \"$cfgfile.tmp\" \"$cfgfile\" && rm -f \"$cfgfile.tmp\")\ntest 0 -eq $? || _lt_function_replace_fail=:\n\n\n  # Save a `func_append' function call where possible by direct use of '+='\n  sed -e 's%func_append \\([a-zA-Z_]\\{1,\\}\\) \"%\\1+=\"%g' $cfgfile > $cfgfile.tmp \\\n    && mv -f \"$cfgfile.tmp\" \"$cfgfile\" \\\n      || (rm -f \"$cfgfile\" && cp \"$cfgfile.tmp\" \"$cfgfile\" && rm -f \"$cfgfile.tmp\")\n  test 0 -eq $? || _lt_function_replace_fail=:\nelse\n  # Save a `func_append' function call even when '+=' is not available\n  sed -e 's%func_append \\([a-zA-Z_]\\{1,\\}\\) \"%\\1=\"$\\1%g' $cfgfile > $cfgfile.tmp \\\n    && mv -f \"$cfgfile.tmp\" \"$cfgfile\" \\\n      || (rm -f \"$cfgfile\" && cp \"$cfgfile.tmp\" \"$cfgfile\" && rm -f \"$cfgfile.tmp\")\n  test 0 -eq $? || _lt_function_replace_fail=:\nfi\n\nif test x\"$_lt_function_replace_fail\" = x\":\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile\" >&5\n$as_echo \"$as_me: WARNING: Unable to substitute extended shell functions in $ofile\" >&2;}\nfi\n\n\n   mv -f \"$cfgfile\" \"$ofile\" ||\n    (rm -f \"$ofile\" && cp \"$cfgfile\" \"$ofile\" && rm -f \"$cfgfile\")\n  chmod +x \"$ofile\"\n\n\n    cat <<_LT_EOF >> \"$ofile\"\n\n# ### BEGIN LIBTOOL TAG CONFIG: CXX\n\n# The linker used to build libraries.\nLD=$lt_LD_CXX\n\n# How to create reloadable object files.\nreload_flag=$lt_reload_flag_CXX\nreload_cmds=$lt_reload_cmds_CXX\n\n# Commands used to build an old-style archive.\nold_archive_cmds=$lt_old_archive_cmds_CXX\n\n# A language specific compiler.\nCC=$lt_compiler_CXX\n\n# Is the compiler the GNU compiler?\nwith_gcc=$GCC_CXX\n\n# Compiler flag to turn off builtin functions.\nno_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX\n\n# Additional compiler flags for building library objects.\npic_flag=$lt_lt_prog_compiler_pic_CXX\n\n# How to pass a linker flag through the compiler.\nwl=$lt_lt_prog_compiler_wl_CXX\n\n# Compiler flag to prevent dynamic linking.\nlink_static_flag=$lt_lt_prog_compiler_static_CXX\n\n# Does compiler simultaneously support -c and -o options?\ncompiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX\n\n# Whether or not to add -lc for building shared libraries.\nbuild_libtool_need_lc=$archive_cmds_need_lc_CXX\n\n# Whether or not to disallow shared libs when runtime libs are static.\nallow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX\n\n# Compiler flag to allow reflexive dlopens.\nexport_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX\n\n# Compiler flag to generate shared objects directly from archives.\nwhole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX\n\n# Whether the compiler copes with passing no objects directly.\ncompiler_needs_object=$lt_compiler_needs_object_CXX\n\n# Create an old-style archive from a shared archive.\nold_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX\n\n# Create a temporary old-style archive to link instead of a shared archive.\nold_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX\n\n# Commands used to build a shared archive.\narchive_cmds=$lt_archive_cmds_CXX\narchive_expsym_cmds=$lt_archive_expsym_cmds_CXX\n\n# Commands used to build a loadable module if different from building\n# a shared archive.\nmodule_cmds=$lt_module_cmds_CXX\nmodule_expsym_cmds=$lt_module_expsym_cmds_CXX\n\n# Whether we are building with GNU ld or not.\nwith_gnu_ld=$lt_with_gnu_ld_CXX\n\n# Flag that allows shared libraries with undefined symbols to be built.\nallow_undefined_flag=$lt_allow_undefined_flag_CXX\n\n# Flag that enforces no undefined symbols.\nno_undefined_flag=$lt_no_undefined_flag_CXX\n\n# Flag to hardcode \\$libdir into a binary during linking.\n# This must work even if \\$libdir does not exist\nhardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX\n\n# Whether we need a single \"-rpath\" flag with a separated argument.\nhardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX\n\n# Set to \"yes\" if using DIR/libNAME\\${shared_ext} during linking hardcodes\n# DIR into the resulting binary.\nhardcode_direct=$hardcode_direct_CXX\n\n# Set to \"yes\" if using DIR/libNAME\\${shared_ext} during linking hardcodes\n# DIR into the resulting binary and the resulting library dependency is\n# \"absolute\",i.e impossible to change by setting \\${shlibpath_var} if the\n# library is relocated.\nhardcode_direct_absolute=$hardcode_direct_absolute_CXX\n\n# Set to \"yes\" if using the -LDIR flag during linking hardcodes DIR\n# into the resulting binary.\nhardcode_minus_L=$hardcode_minus_L_CXX\n\n# Set to \"yes\" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR\n# into the resulting binary.\nhardcode_shlibpath_var=$hardcode_shlibpath_var_CXX\n\n# Set to \"yes\" if building a shared library automatically hardcodes DIR\n# into the library and all subsequent libraries and executables linked\n# against it.\nhardcode_automatic=$hardcode_automatic_CXX\n\n# Set to yes if linker adds runtime paths of dependent libraries\n# to runtime path list.\ninherit_rpath=$inherit_rpath_CXX\n\n# Whether libtool must link a program against all its dependency libraries.\nlink_all_deplibs=$link_all_deplibs_CXX\n\n# Set to \"yes\" if exported symbols are required.\nalways_export_symbols=$always_export_symbols_CXX\n\n# The commands to list exported symbols.\nexport_symbols_cmds=$lt_export_symbols_cmds_CXX\n\n# Symbols that should not be listed in the preloaded symbols.\nexclude_expsyms=$lt_exclude_expsyms_CXX\n\n# Symbols that must always be exported.\ninclude_expsyms=$lt_include_expsyms_CXX\n\n# Commands necessary for linking programs (against libraries) with templates.\nprelink_cmds=$lt_prelink_cmds_CXX\n\n# Commands necessary for finishing linking programs.\npostlink_cmds=$lt_postlink_cmds_CXX\n\n# Specify filename containing input files.\nfile_list_spec=$lt_file_list_spec_CXX\n\n# How to hardcode a shared library path into an executable.\nhardcode_action=$hardcode_action_CXX\n\n# The directories searched by this compiler when creating a shared library.\ncompiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX\n\n# Dependencies to place before and after the objects being linked to\n# create a shared library.\npredep_objects=$lt_predep_objects_CXX\npostdep_objects=$lt_postdep_objects_CXX\npredeps=$lt_predeps_CXX\npostdeps=$lt_postdeps_CXX\n\n# The library search path used internally by the compiler when linking\n# a shared library.\ncompiler_lib_search_path=$lt_compiler_lib_search_path_CXX\n\n# ### END LIBTOOL TAG CONFIG: CXX\n_LT_EOF\n\n ;;\n\n  esac\ndone # for ac_tag\n\n\nas_fn_exit 0\n_ACEOF\nac_clean_files=$ac_clean_files_save\n\ntest $ac_write_fail = 0 ||\n  as_fn_error $? \"write failure creating $CONFIG_STATUS\" \"$LINENO\" 5\n\n\n# configure is writing to config.log, and then calls config.status.\n# config.status does its own redirection, appending to config.log.\n# Unfortunately, on DOS this fails, as config.log is still kept open\n# by configure, so config.status won't be able to write to it; its\n# output is simply discarded.  So we exec the FD to /dev/null,\n# effectively closing config.log, so it can be properly (re)opened and\n# appended to by config.status.  When coming back to configure, we\n# need to make the FD available again.\nif test \"$no_create\" != yes; then\n  ac_cs_success=:\n  ac_config_status_args=\n  test \"$silent\" = yes &&\n    ac_config_status_args=\"$ac_config_status_args --quiet\"\n  exec 5>/dev/null\n  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false\n  exec 5>>config.log\n  # Use ||, not &&, to avoid exiting from the if with $? = 1, which\n  # would make configure fail if this is the last instruction.\n  $ac_cs_success || as_fn_exit 1\nfi\nif test -n \"$ac_unrecognized_opts\" && test \"$enable_option_checking\" != no; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts\" >&5\n$as_echo \"$as_me: WARNING: unrecognized options: $ac_unrecognized_opts\" >&2;}\nfi\n\n"
  },
  {
    "path": "thirdparty/portaudio/bindings/cpp/configure.ac",
    "content": "#\n# PortAudioCpp V19 autoconf input file\n# Shamelessly ripped from the PortAudio one by Dominic Mazzoni\n# Ludwig Schwardt\n# Customized for automake by Mikael Magnusson\n#\n\n# Require autoconf >= 2.13\nAC_PREREQ(2.13)\n\nm4_define([lt_current], [0])\nm4_define([lt_revision], [12])\nm4_define([lt_age], [0])\n\nAC_INIT([PortAudioCpp], [12])\nAC_CONFIG_SRCDIR([include/portaudiocpp/PortAudioCpp.hxx])\nAM_INIT_AUTOMAKE\nAM_MAINTAINER_MODE\n\n###### Top-level directory of pacpp\n###### This makes it easy to shuffle the build directories\n###### Also edit AC_CONFIG_SRCDIR above (wouldn't accept this variable)!\nPACPP_ROOT=\"\\$(top_srcdir)\"\nPORTAUDIO_ROOT=\"../..\"\n\n# Various other variables and flags\nDEFAULT_INCLUDES=\"-I$PACPP_ROOT/include -I$PACPP_ROOT/$PORTAUDIO_ROOT/include\"\nCFLAGS=${CFLAGS-\"-g -O2 -Wall -ansi -pedantic\"}\nCXXFLAGS=${CXXFLAGS-\"${CFLAGS}\"}\n\nLT_VERSION_INFO=\"lt_current:lt_revision:lt_age\"\n\n# Checks for programs\n\nAC_PROG_CC\nAC_PROG_CXX\nAC_LIBTOOL_WIN32_DLL\nAC_PROG_LIBTOOL\n\n# Transfer these variables to the Makefile\nAC_SUBST(DEFAULT_INCLUDES)\nAC_SUBST(PORTAUDIO_ROOT)\nAC_SUBST(CXXFLAGS)\nAC_SUBST(LT_VERSION_INFO)\n\nAC_CONFIG_FILES([\n                 Makefile\n                 lib/Makefile\n                 include/Makefile\n                 bin/Makefile\n                 doc/Makefile\n                 portaudiocpp.pc\n                ])\nAC_OUTPUT\n"
  },
  {
    "path": "thirdparty/portaudio/bindings/cpp/doc/Makefile.am",
    "content": "PACPP_ROOT = .\n#INCLUDES = -I$(srcdir)/$(PACPP_ROOT)/include -I$(top_srcdir)/include\n\ndocs:\n\tdoxygen $(srcdir)/config.doxy.linux\n"
  },
  {
    "path": "thirdparty/portaudio/bindings/cpp/doc/Makefile.in",
    "content": "# Makefile.in generated by automake 1.14.1 from Makefile.am.\n# @configure_input@\n\n# Copyright (C) 1994-2013 Free Software Foundation, Inc.\n\n# This Makefile.in is free software; the Free Software Foundation\n# gives unlimited permission to copy and/or distribute it,\n# with or without modifications, as long as this notice is preserved.\n\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY, to the extent permitted by law; without\n# even the implied warranty of MERCHANTABILITY or FITNESS FOR A\n# PARTICULAR PURPOSE.\n\n@SET_MAKE@\nVPATH = @srcdir@\nam__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'\nam__make_running_with_option = \\\n  case $${target_option-} in \\\n      ?) ;; \\\n      *) echo \"am__make_running_with_option: internal error: invalid\" \\\n              \"target option '$${target_option-}' specified\" >&2; \\\n         exit 1;; \\\n  esac; \\\n  has_opt=no; \\\n  sane_makeflags=$$MAKEFLAGS; \\\n  if $(am__is_gnu_make); then \\\n    sane_makeflags=$$MFLAGS; \\\n  else \\\n    case $$MAKEFLAGS in \\\n      *\\\\[\\ \\\t]*) \\\n        bs=\\\\; \\\n        sane_makeflags=`printf '%s\\n' \"$$MAKEFLAGS\" \\\n          | sed \"s/$$bs$$bs[$$bs $$bs\t]*//g\"`;; \\\n    esac; \\\n  fi; \\\n  skip_next=no; \\\n  strip_trailopt () \\\n  { \\\n    flg=`printf '%s\\n' \"$$flg\" | sed \"s/$$1.*$$//\"`; \\\n  }; \\\n  for flg in $$sane_makeflags; do \\\n    test $$skip_next = yes && { skip_next=no; continue; }; \\\n    case $$flg in \\\n      *=*|--*) continue;; \\\n        -*I) strip_trailopt 'I'; skip_next=yes;; \\\n      -*I?*) strip_trailopt 'I';; \\\n        -*O) strip_trailopt 'O'; skip_next=yes;; \\\n      -*O?*) strip_trailopt 'O';; \\\n        -*l) strip_trailopt 'l'; skip_next=yes;; \\\n      -*l?*) strip_trailopt 'l';; \\\n      -[dEDm]) skip_next=yes;; \\\n      -[JT]) skip_next=yes;; \\\n    esac; \\\n    case $$flg in \\\n      *$$target_option*) has_opt=yes; break;; \\\n    esac; \\\n  done; \\\n  test $$has_opt = yes\nam__make_dryrun = (target_option=n; $(am__make_running_with_option))\nam__make_keepgoing = (target_option=k; $(am__make_running_with_option))\npkgdatadir = $(datadir)/@PACKAGE@\npkgincludedir = $(includedir)/@PACKAGE@\npkglibdir = $(libdir)/@PACKAGE@\npkglibexecdir = $(libexecdir)/@PACKAGE@\nam__cd = CDPATH=\"$${ZSH_VERSION+.}$(PATH_SEPARATOR)\" && cd\ninstall_sh_DATA = $(install_sh) -c -m 644\ninstall_sh_PROGRAM = $(install_sh) -c\ninstall_sh_SCRIPT = $(install_sh) -c\nINSTALL_HEADER = $(INSTALL_DATA)\ntransform = $(program_transform_name)\nNORMAL_INSTALL = :\nPRE_INSTALL = :\nPOST_INSTALL = :\nNORMAL_UNINSTALL = :\nPRE_UNINSTALL = :\nPOST_UNINSTALL = :\nbuild_triplet = @build@\nhost_triplet = @host@\nsubdir = doc\nDIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am README\nACLOCAL_M4 = $(top_srcdir)/aclocal.m4\nam__aclocal_m4_deps = $(top_srcdir)/configure.ac\nam__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \\\n\t$(ACLOCAL_M4)\nmkinstalldirs = $(install_sh) -d\nCONFIG_CLEAN_FILES =\nCONFIG_CLEAN_VPATH_FILES =\nAM_V_P = $(am__v_P_@AM_V@)\nam__v_P_ = $(am__v_P_@AM_DEFAULT_V@)\nam__v_P_0 = false\nam__v_P_1 = :\nAM_V_GEN = $(am__v_GEN_@AM_V@)\nam__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)\nam__v_GEN_0 = @echo \"  GEN     \" $@;\nam__v_GEN_1 = \nAM_V_at = $(am__v_at_@AM_V@)\nam__v_at_ = $(am__v_at_@AM_DEFAULT_V@)\nam__v_at_0 = @\nam__v_at_1 = \nSOURCES =\nDIST_SOURCES =\nam__can_run_installinfo = \\\n  case $$AM_UPDATE_INFO_DIR in \\\n    n|no|NO) false;; \\\n    *) (install-info --version) >/dev/null 2>&1;; \\\n  esac\nam__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)\nDISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)\nACLOCAL = @ACLOCAL@\nAMTAR = @AMTAR@\nAM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@\nAR = @AR@\nAS = @AS@\nAUTOCONF = @AUTOCONF@\nAUTOHEADER = @AUTOHEADER@\nAUTOMAKE = @AUTOMAKE@\nAWK = @AWK@\nCC = @CC@\nCCDEPMODE = @CCDEPMODE@\nCFLAGS = @CFLAGS@\nCPP = @CPP@\nCPPFLAGS = @CPPFLAGS@\nCXX = @CXX@\nCXXCPP = @CXXCPP@\nCXXDEPMODE = @CXXDEPMODE@\nCXXFLAGS = @CXXFLAGS@\nCYGPATH_W = @CYGPATH_W@\nDEFAULT_INCLUDES = @DEFAULT_INCLUDES@\nDEFS = @DEFS@\nDEPDIR = @DEPDIR@\nDLLTOOL = @DLLTOOL@\nDSYMUTIL = @DSYMUTIL@\nDUMPBIN = @DUMPBIN@\nECHO_C = @ECHO_C@\nECHO_N = @ECHO_N@\nECHO_T = @ECHO_T@\nEGREP = @EGREP@\nEXEEXT = @EXEEXT@\nFGREP = @FGREP@\nGREP = @GREP@\nINSTALL = @INSTALL@\nINSTALL_DATA = @INSTALL_DATA@\nINSTALL_PROGRAM = @INSTALL_PROGRAM@\nINSTALL_SCRIPT = @INSTALL_SCRIPT@\nINSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@\nLD = @LD@\nLDFLAGS = @LDFLAGS@\nLIBOBJS = @LIBOBJS@\nLIBS = @LIBS@\nLIBTOOL = @LIBTOOL@\nLIPO = @LIPO@\nLN_S = @LN_S@\nLTLIBOBJS = @LTLIBOBJS@\nLT_VERSION_INFO = @LT_VERSION_INFO@\nMAINT = @MAINT@\nMAKEINFO = @MAKEINFO@\nMANIFEST_TOOL = @MANIFEST_TOOL@\nMKDIR_P = @MKDIR_P@\nNM = @NM@\nNMEDIT = @NMEDIT@\nOBJDUMP = @OBJDUMP@\nOBJEXT = @OBJEXT@\nOTOOL = @OTOOL@\nOTOOL64 = @OTOOL64@\nPACKAGE = @PACKAGE@\nPACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@\nPACKAGE_NAME = @PACKAGE_NAME@\nPACKAGE_STRING = @PACKAGE_STRING@\nPACKAGE_TARNAME = @PACKAGE_TARNAME@\nPACKAGE_URL = @PACKAGE_URL@\nPACKAGE_VERSION = @PACKAGE_VERSION@\nPATH_SEPARATOR = @PATH_SEPARATOR@\nPORTAUDIO_ROOT = @PORTAUDIO_ROOT@\nRANLIB = @RANLIB@\nSED = @SED@\nSET_MAKE = @SET_MAKE@\nSHELL = @SHELL@\nSTRIP = @STRIP@\nVERSION = @VERSION@\nabs_builddir = @abs_builddir@\nabs_srcdir = @abs_srcdir@\nabs_top_builddir = @abs_top_builddir@\nabs_top_srcdir = @abs_top_srcdir@\nac_ct_AR = @ac_ct_AR@\nac_ct_CC = @ac_ct_CC@\nac_ct_CXX = @ac_ct_CXX@\nac_ct_DUMPBIN = @ac_ct_DUMPBIN@\nam__include = @am__include@\nam__leading_dot = @am__leading_dot@\nam__quote = @am__quote@\nam__tar = @am__tar@\nam__untar = @am__untar@\nbindir = @bindir@\nbuild = @build@\nbuild_alias = @build_alias@\nbuild_cpu = @build_cpu@\nbuild_os = @build_os@\nbuild_vendor = @build_vendor@\nbuilddir = @builddir@\ndatadir = @datadir@\ndatarootdir = @datarootdir@\ndocdir = @docdir@\ndvidir = @dvidir@\nexec_prefix = @exec_prefix@\nhost = @host@\nhost_alias = @host_alias@\nhost_cpu = @host_cpu@\nhost_os = @host_os@\nhost_vendor = @host_vendor@\nhtmldir = @htmldir@\nincludedir = @includedir@\ninfodir = @infodir@\ninstall_sh = @install_sh@\nlibdir = @libdir@\nlibexecdir = @libexecdir@\nlocaledir = @localedir@\nlocalstatedir = @localstatedir@\nmandir = @mandir@\nmkdir_p = @mkdir_p@\noldincludedir = @oldincludedir@\npdfdir = @pdfdir@\nprefix = @prefix@\nprogram_transform_name = @program_transform_name@\npsdir = @psdir@\nsbindir = @sbindir@\nsharedstatedir = @sharedstatedir@\nsrcdir = @srcdir@\nsysconfdir = @sysconfdir@\ntarget_alias = @target_alias@\ntop_build_prefix = @top_build_prefix@\ntop_builddir = @top_builddir@\ntop_srcdir = @top_srcdir@\nPACPP_ROOT = .\nall: all-am\n\n.SUFFIXES:\n$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)\n\t@for dep in $?; do \\\n\t  case '$(am__configure_deps)' in \\\n\t    *$$dep*) \\\n\t      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \\\n\t        && { if test -f $@; then exit 0; else break; fi; }; \\\n\t      exit 1;; \\\n\t  esac; \\\n\tdone; \\\n\techo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile'; \\\n\t$(am__cd) $(top_srcdir) && \\\n\t  $(AUTOMAKE) --gnu doc/Makefile\n.PRECIOUS: Makefile\nMakefile: $(srcdir)/Makefile.in $(top_builddir)/config.status\n\t@case '$?' in \\\n\t  *config.status*) \\\n\t    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \\\n\t  *) \\\n\t    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \\\n\t    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \\\n\tesac;\n\n$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)\n\tcd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh\n\n$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)\n\tcd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh\n$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)\n\tcd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh\n$(am__aclocal_m4_deps):\n\nmostlyclean-libtool:\n\t-rm -f *.lo\n\nclean-libtool:\n\t-rm -rf .libs _libs\ntags TAGS:\n\nctags CTAGS:\n\ncscope cscopelist:\n\n\ndistdir: $(DISTFILES)\n\t@srcdirstrip=`echo \"$(srcdir)\" | sed 's/[].[^$$\\\\*]/\\\\\\\\&/g'`; \\\n\ttopsrcdirstrip=`echo \"$(top_srcdir)\" | sed 's/[].[^$$\\\\*]/\\\\\\\\&/g'`; \\\n\tlist='$(DISTFILES)'; \\\n\t  dist_files=`for file in $$list; do echo $$file; done | \\\n\t  sed -e \"s|^$$srcdirstrip/||;t\" \\\n\t      -e \"s|^$$topsrcdirstrip/|$(top_builddir)/|;t\"`; \\\n\tcase $$dist_files in \\\n\t  */*) $(MKDIR_P) `echo \"$$dist_files\" | \\\n\t\t\t   sed '/\\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \\\n\t\t\t   sort -u` ;; \\\n\tesac; \\\n\tfor file in $$dist_files; do \\\n\t  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \\\n\t  if test -d $$d/$$file; then \\\n\t    dir=`echo \"/$$file\" | sed -e 's,/[^/]*$$,,'`; \\\n\t    if test -d \"$(distdir)/$$file\"; then \\\n\t      find \"$(distdir)/$$file\" -type d ! -perm -700 -exec chmod u+rwx {} \\;; \\\n\t    fi; \\\n\t    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \\\n\t      cp -fpR $(srcdir)/$$file \"$(distdir)$$dir\" || exit 1; \\\n\t      find \"$(distdir)/$$file\" -type d ! -perm -700 -exec chmod u+rwx {} \\;; \\\n\t    fi; \\\n\t    cp -fpR $$d/$$file \"$(distdir)$$dir\" || exit 1; \\\n\t  else \\\n\t    test -f \"$(distdir)/$$file\" \\\n\t    || cp -p $$d/$$file \"$(distdir)/$$file\" \\\n\t    || exit 1; \\\n\t  fi; \\\n\tdone\ncheck-am: all-am\ncheck: check-am\nall-am: Makefile\ninstalldirs:\ninstall: install-am\ninstall-exec: install-exec-am\ninstall-data: install-data-am\nuninstall: uninstall-am\n\ninstall-am: all-am\n\t@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am\n\ninstallcheck: installcheck-am\ninstall-strip:\n\tif test -z '$(STRIP)'; then \\\n\t  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM=\"$(INSTALL_STRIP_PROGRAM)\" \\\n\t    install_sh_PROGRAM=\"$(INSTALL_STRIP_PROGRAM)\" INSTALL_STRIP_FLAG=-s \\\n\t      install; \\\n\telse \\\n\t  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM=\"$(INSTALL_STRIP_PROGRAM)\" \\\n\t    install_sh_PROGRAM=\"$(INSTALL_STRIP_PROGRAM)\" INSTALL_STRIP_FLAG=-s \\\n\t    \"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'\" install; \\\n\tfi\nmostlyclean-generic:\n\nclean-generic:\n\ndistclean-generic:\n\t-test -z \"$(CONFIG_CLEAN_FILES)\" || rm -f $(CONFIG_CLEAN_FILES)\n\t-test . = \"$(srcdir)\" || test -z \"$(CONFIG_CLEAN_VPATH_FILES)\" || rm -f $(CONFIG_CLEAN_VPATH_FILES)\n\nmaintainer-clean-generic:\n\t@echo \"This command is intended for maintainers to use\"\n\t@echo \"it deletes files that may require special tools to rebuild.\"\nclean: clean-am\n\nclean-am: clean-generic clean-libtool mostlyclean-am\n\ndistclean: distclean-am\n\t-rm -f Makefile\ndistclean-am: clean-am distclean-generic\n\ndvi: dvi-am\n\ndvi-am:\n\nhtml: html-am\n\nhtml-am:\n\ninfo: info-am\n\ninfo-am:\n\ninstall-data-am:\n\ninstall-dvi: install-dvi-am\n\ninstall-dvi-am:\n\ninstall-exec-am:\n\ninstall-html: install-html-am\n\ninstall-html-am:\n\ninstall-info: install-info-am\n\ninstall-info-am:\n\ninstall-man:\n\ninstall-pdf: install-pdf-am\n\ninstall-pdf-am:\n\ninstall-ps: install-ps-am\n\ninstall-ps-am:\n\ninstallcheck-am:\n\nmaintainer-clean: maintainer-clean-am\n\t-rm -f Makefile\nmaintainer-clean-am: distclean-am maintainer-clean-generic\n\nmostlyclean: mostlyclean-am\n\nmostlyclean-am: mostlyclean-generic mostlyclean-libtool\n\npdf: pdf-am\n\npdf-am:\n\nps: ps-am\n\nps-am:\n\nuninstall-am:\n\n.MAKE: install-am install-strip\n\n.PHONY: all all-am check check-am clean clean-generic clean-libtool \\\n\tcscopelist-am ctags-am distclean distclean-generic \\\n\tdistclean-libtool distdir dvi dvi-am html html-am info info-am \\\n\tinstall install-am install-data install-data-am install-dvi \\\n\tinstall-dvi-am install-exec install-exec-am install-html \\\n\tinstall-html-am install-info install-info-am install-man \\\n\tinstall-pdf install-pdf-am install-ps install-ps-am \\\n\tinstall-strip installcheck installcheck-am installdirs \\\n\tmaintainer-clean maintainer-clean-generic mostlyclean \\\n\tmostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \\\n\ttags-am uninstall uninstall-am\n\n#INCLUDES = -I$(srcdir)/$(PACPP_ROOT)/include -I$(top_srcdir)/include\n\ndocs:\n\tdoxygen $(srcdir)/config.doxy.linux\n\n# Tell versions [3.59,3.63) of GNU make to not export all variables.\n# Otherwise a system limit (for SysV at least) may be exceeded.\n.NOEXPORT:\n"
  },
  {
    "path": "thirdparty/portaudio/bindings/cpp/doc/README",
    "content": "GNU/Linux:\n----------\n\n1) Download and install a recent version of Doxygen (preferably version 1.3.3 or \nlater). See http://www.doxygen.org/.\n2) Download and install a recent version of GraphViz. See \nhttp://www.research.att.com/sw/tools/graphviz/.\n3) Run ``doxygen config.doxy.linux'' in this directory or load and generate the file \nconfig.doxy.linux from the Doxywizard application. Or alternatively ``make docs'' can \nbe run from the build/gnu folder.\n\nThe generated html documentation will be placed in /doc/api_reference/. To open \nthe main page of the documentation, open the file /doc/api_reference/index.html in \nan html browser.\n\n\nWindows:\n--------\n\n1) Download and install a recent Doxygen (preferably version 1.3.4 or later). See \nhttp://www.doxygen.org/.\n2) Download and install a recent version of GraphViz. See \nhttp://www.research.att.com/sw/tools/graphviz/.\n3) If needed, edit the config.doxy file in an ascii text editor so that \n``DOT_PATH'' variable points to the folder where GraphViz is installed.\n4) Run ``doxygen config.doxy'' in this directory or load and generate the file \nconfig.doxy from the Doxywizard application.\n\nThe generated html documentation will be placed in /doc/api_reference/. To open \nthe main page of the documentation, open the file /doc/api_reference/index.html in \nan html browser.\n\n\n\n"
  },
  {
    "path": "thirdparty/portaudio/bindings/cpp/doc/config.doxy",
    "content": "# Doxyfile 1.3.6\n\n#---------------------------------------------------------------------------\n# Project related configuration options\n#---------------------------------------------------------------------------\nPROJECT_NAME           = PortAudioCpp\nPROJECT_NUMBER         = 2.0\nOUTPUT_DIRECTORY       = ./\nOUTPUT_LANGUAGE        = English\nUSE_WINDOWS_ENCODING   = YES\nBRIEF_MEMBER_DESC      = YES\nREPEAT_BRIEF           = YES\nABBREVIATE_BRIEF       = \nALWAYS_DETAILED_SEC    = YES\nINLINE_INHERITED_MEMB  = NO\nFULL_PATH_NAMES        = NO\nSTRIP_FROM_PATH        = \nSHORT_NAMES            = YES\nJAVADOC_AUTOBRIEF      = NO\nMULTILINE_CPP_IS_BRIEF = NO\nDETAILS_AT_TOP         = YES\nINHERIT_DOCS           = YES\nDISTRIBUTE_GROUP_DOC   = NO\nTAB_SIZE               = 4\nALIASES                = \nOPTIMIZE_OUTPUT_FOR_C  = NO\nOPTIMIZE_OUTPUT_JAVA   = NO\nSUBGROUPING            = YES\n#---------------------------------------------------------------------------\n# Build related configuration options\n#---------------------------------------------------------------------------\nEXTRACT_ALL            = YES\nEXTRACT_PRIVATE        = YES\nEXTRACT_STATIC         = YES\nEXTRACT_LOCAL_CLASSES  = YES\nHIDE_UNDOC_MEMBERS     = NO\nHIDE_UNDOC_CLASSES     = NO\nHIDE_FRIEND_COMPOUNDS  = NO\nHIDE_IN_BODY_DOCS      = NO\nINTERNAL_DOCS          = NO\nCASE_SENSE_NAMES       = YES\nHIDE_SCOPE_NAMES       = NO\nSHOW_INCLUDE_FILES     = YES\nINLINE_INFO            = YES\nSORT_MEMBER_DOCS       = NO\nSORT_BRIEF_DOCS        = NO\nSORT_BY_SCOPE_NAME     = NO\nGENERATE_TODOLIST      = YES\nGENERATE_TESTLIST      = YES\nGENERATE_BUGLIST       = YES\nGENERATE_DEPRECATEDLIST= YES\nENABLED_SECTIONS       = \nMAX_INITIALIZER_LINES  = 30\nSHOW_USED_FILES        = YES\n#---------------------------------------------------------------------------\n# configuration options related to warning and progress messages\n#---------------------------------------------------------------------------\nQUIET                  = NO\nWARNINGS               = YES\nWARN_IF_UNDOCUMENTED   = YES\nWARN_IF_DOC_ERROR      = YES\nWARN_FORMAT            = \"$file:$line: $text\"\nWARN_LOGFILE           = \n#---------------------------------------------------------------------------\n# configuration options related to the input files\n#---------------------------------------------------------------------------\nINPUT                  = ../source \\\n                         ../include\nFILE_PATTERNS          = *.hxx \\\n                         *.cxx\nRECURSIVE              = YES\nEXCLUDE                = \nEXCLUDE_SYMLINKS       = NO\nEXCLUDE_PATTERNS       = \nEXAMPLE_PATH           = \nEXAMPLE_PATTERNS       = \nEXAMPLE_RECURSIVE      = NO\nIMAGE_PATH             = \nINPUT_FILTER           = \nFILTER_SOURCE_FILES    = NO\n#---------------------------------------------------------------------------\n# configuration options related to source browsing\n#---------------------------------------------------------------------------\nSOURCE_BROWSER         = NO\nINLINE_SOURCES         = NO\nSTRIP_CODE_COMMENTS    = YES\nREFERENCED_BY_RELATION = YES\nREFERENCES_RELATION    = YES\nVERBATIM_HEADERS       = YES\n#---------------------------------------------------------------------------\n# configuration options related to the alphabetical class index\n#---------------------------------------------------------------------------\nALPHABETICAL_INDEX     = YES\nCOLS_IN_ALPHA_INDEX    = 2\nIGNORE_PREFIX          = \n#---------------------------------------------------------------------------\n# configuration options related to the HTML output\n#---------------------------------------------------------------------------\nGENERATE_HTML          = YES\nHTML_OUTPUT            = api_reference\nHTML_FILE_EXTENSION    = .html\nHTML_HEADER            = \nHTML_FOOTER            = \nHTML_STYLESHEET        = \nHTML_ALIGN_MEMBERS     = YES\nGENERATE_HTMLHELP      = NO\nCHM_FILE               = \nHHC_LOCATION           = \nGENERATE_CHI           = NO\nBINARY_TOC             = NO\nTOC_EXPAND             = NO\nDISABLE_INDEX          = NO\nENUM_VALUES_PER_LINE   = 4\nGENERATE_TREEVIEW      = NO\nTREEVIEW_WIDTH         = 250\n#---------------------------------------------------------------------------\n# configuration options related to the LaTeX output\n#---------------------------------------------------------------------------\nGENERATE_LATEX         = NO\nLATEX_OUTPUT           = latex\nLATEX_CMD_NAME         = latex\nMAKEINDEX_CMD_NAME     = makeindex\nCOMPACT_LATEX          = NO\nPAPER_TYPE             = a4wide\nEXTRA_PACKAGES         = \nLATEX_HEADER           = \nPDF_HYPERLINKS         = NO\nUSE_PDFLATEX           = NO\nLATEX_BATCHMODE        = NO\nLATEX_HIDE_INDICES     = NO\n#---------------------------------------------------------------------------\n# configuration options related to the RTF output\n#---------------------------------------------------------------------------\nGENERATE_RTF           = NO\nRTF_OUTPUT             = rtf\nCOMPACT_RTF            = NO\nRTF_HYPERLINKS         = NO\nRTF_STYLESHEET_FILE    = \nRTF_EXTENSIONS_FILE    = \n#---------------------------------------------------------------------------\n# configuration options related to the man page output\n#---------------------------------------------------------------------------\nGENERATE_MAN           = NO\nMAN_OUTPUT             = man\nMAN_EXTENSION          = .3\nMAN_LINKS              = NO\n#---------------------------------------------------------------------------\n# configuration options related to the XML output\n#---------------------------------------------------------------------------\nGENERATE_XML           = NO\nXML_OUTPUT             = xml\nXML_SCHEMA             = \nXML_DTD                = \nXML_PROGRAMLISTING     = YES\n#---------------------------------------------------------------------------\n# configuration options for the AutoGen Definitions output\n#---------------------------------------------------------------------------\nGENERATE_AUTOGEN_DEF   = NO\n#---------------------------------------------------------------------------\n# configuration options related to the Perl module output\n#---------------------------------------------------------------------------\nGENERATE_PERLMOD       = NO\nPERLMOD_LATEX          = NO\nPERLMOD_PRETTY         = YES\nPERLMOD_MAKEVAR_PREFIX = \n#---------------------------------------------------------------------------\n# Configuration options related to the preprocessor   \n#---------------------------------------------------------------------------\nENABLE_PREPROCESSING   = YES\nMACRO_EXPANSION        = NO\nEXPAND_ONLY_PREDEF     = NO\nSEARCH_INCLUDES        = YES\nINCLUDE_PATH           = \nINCLUDE_FILE_PATTERNS  = \nPREDEFINED             = \nEXPAND_AS_DEFINED      = \nSKIP_FUNCTION_MACROS   = YES\n#---------------------------------------------------------------------------\n# Configuration::additions related to external references   \n#---------------------------------------------------------------------------\nTAGFILES               = \nGENERATE_TAGFILE       = \nALLEXTERNALS           = NO\nEXTERNAL_GROUPS        = YES\nPERL_PATH              = /usr/bin/perl\n#---------------------------------------------------------------------------\n# Configuration options related to the dot tool   \n#---------------------------------------------------------------------------\nCLASS_DIAGRAMS         = YES\nHIDE_UNDOC_RELATIONS   = YES\nHAVE_DOT               = YES\nCLASS_GRAPH            = YES\nCOLLABORATION_GRAPH    = YES\nUML_LOOK               = YES\nTEMPLATE_RELATIONS     = YES\nINCLUDE_GRAPH          = YES\nINCLUDED_BY_GRAPH      = YES\nCALL_GRAPH             = NO\nGRAPHICAL_HIERARCHY    = YES\nDOT_IMAGE_FORMAT       = png\nDOT_PATH               = \"c:/Program Files/ATT/Graphviz/bin/\"\nDOTFILE_DIRS           = \nMAX_DOT_GRAPH_WIDTH    = 1024\nMAX_DOT_GRAPH_HEIGHT   = 1024\nMAX_DOT_GRAPH_DEPTH    = 0\nGENERATE_LEGEND        = YES\nDOT_CLEANUP            = YES\n#---------------------------------------------------------------------------\n# Configuration::additions related to the search engine   \n#---------------------------------------------------------------------------\nSEARCHENGINE           = NO\n"
  },
  {
    "path": "thirdparty/portaudio/bindings/cpp/doc/config.doxy.linux",
    "content": "# Doxyfile 1.3.3\n\n#---------------------------------------------------------------------------\n# General configuration options\n#---------------------------------------------------------------------------\nPROJECT_NAME           = PortAudioCpp\nPROJECT_NUMBER         = 2.0\nOUTPUT_DIRECTORY       = ./\nOUTPUT_LANGUAGE        = English\nUSE_WINDOWS_ENCODING   = YES\nEXTRACT_ALL            = YES\nEXTRACT_PRIVATE        = YES\nEXTRACT_STATIC         = YES\nEXTRACT_LOCAL_CLASSES  = YES\nHIDE_UNDOC_MEMBERS     = NO\nHIDE_UNDOC_CLASSES     = NO\nHIDE_FRIEND_COMPOUNDS  = NO\nHIDE_IN_BODY_DOCS      = NO\nBRIEF_MEMBER_DESC      = YES\nREPEAT_BRIEF           = YES\nALWAYS_DETAILED_SEC    = YES\nINLINE_INHERITED_MEMB  = NO\nFULL_PATH_NAMES        = NO\nSTRIP_FROM_PATH        = \nINTERNAL_DOCS          = NO\nCASE_SENSE_NAMES       = YES\nSHORT_NAMES            = YES\nHIDE_SCOPE_NAMES       = NO\nSHOW_INCLUDE_FILES     = YES\nJAVADOC_AUTOBRIEF      = NO\nMULTILINE_CPP_IS_BRIEF = NO\nDETAILS_AT_TOP         = YES\nINHERIT_DOCS           = YES\nINLINE_INFO            = YES\nSORT_MEMBER_DOCS       = NO\nDISTRIBUTE_GROUP_DOC   = NO\nTAB_SIZE               = 4\nGENERATE_TODOLIST      = YES\nGENERATE_TESTLIST      = YES\nGENERATE_BUGLIST       = YES\nGENERATE_DEPRECATEDLIST= YES\nALIASES                = \nENABLED_SECTIONS       = \nMAX_INITIALIZER_LINES  = 30\nOPTIMIZE_OUTPUT_FOR_C  = NO\nOPTIMIZE_OUTPUT_JAVA   = NO\nSHOW_USED_FILES        = YES\nSUBGROUPING            = YES\n#---------------------------------------------------------------------------\n# configuration options related to warning and progress messages\n#---------------------------------------------------------------------------\nQUIET                  = NO\nWARNINGS               = YES\nWARN_IF_UNDOCUMENTED   = YES\nWARN_IF_DOC_ERROR      = YES\nWARN_FORMAT            = \"$file:$line: $text\"\nWARN_LOGFILE           = \n#---------------------------------------------------------------------------\n# configuration options related to the input files\n#---------------------------------------------------------------------------\nINPUT                  = ../source \\\n                         ../include\nFILE_PATTERNS          = *.hxx \\\n                         *.cxx\nRECURSIVE              = YES\nEXCLUDE                = \nEXCLUDE_SYMLINKS       = NO\nEXCLUDE_PATTERNS       = \nEXAMPLE_PATH           = \nEXAMPLE_PATTERNS       = \nEXAMPLE_RECURSIVE      = NO\nIMAGE_PATH             = \nINPUT_FILTER           = \nFILTER_SOURCE_FILES    = NO\n#---------------------------------------------------------------------------\n# configuration options related to source browsing\n#---------------------------------------------------------------------------\nSOURCE_BROWSER         = NO\nINLINE_SOURCES         = NO\nSTRIP_CODE_COMMENTS    = YES\nREFERENCED_BY_RELATION = YES\nREFERENCES_RELATION    = YES\nVERBATIM_HEADERS       = YES\n#---------------------------------------------------------------------------\n# configuration options related to the alphabetical class index\n#---------------------------------------------------------------------------\nALPHABETICAL_INDEX     = YES\nCOLS_IN_ALPHA_INDEX    = 2\nIGNORE_PREFIX          = \n#---------------------------------------------------------------------------\n# configuration options related to the HTML output\n#---------------------------------------------------------------------------\nGENERATE_HTML          = YES\nHTML_OUTPUT            = api_reference\nHTML_FILE_EXTENSION    = .html\nHTML_HEADER            = \nHTML_FOOTER            = \nHTML_STYLESHEET        = \nHTML_ALIGN_MEMBERS     = YES\nGENERATE_HTMLHELP      = NO\nCHM_FILE               = \nHHC_LOCATION           = \nGENERATE_CHI           = NO\nBINARY_TOC             = NO\nTOC_EXPAND             = NO\nDISABLE_INDEX          = NO\nENUM_VALUES_PER_LINE   = 4\nGENERATE_TREEVIEW      = NO\nTREEVIEW_WIDTH         = 250\n#---------------------------------------------------------------------------\n# configuration options related to the LaTeX output\n#---------------------------------------------------------------------------\nGENERATE_LATEX         = NO\nLATEX_OUTPUT           = latex\nLATEX_CMD_NAME         = latex\nMAKEINDEX_CMD_NAME     = makeindex\nCOMPACT_LATEX          = NO\nPAPER_TYPE             = a4wide\nEXTRA_PACKAGES         = \nLATEX_HEADER           = \nPDF_HYPERLINKS         = NO\nUSE_PDFLATEX           = NO\nLATEX_BATCHMODE        = NO\nLATEX_HIDE_INDICES     = NO\n#---------------------------------------------------------------------------\n# configuration options related to the RTF output\n#---------------------------------------------------------------------------\nGENERATE_RTF           = NO\nRTF_OUTPUT             = rtf\nCOMPACT_RTF            = NO\nRTF_HYPERLINKS         = NO\nRTF_STYLESHEET_FILE    = \nRTF_EXTENSIONS_FILE    = \n#---------------------------------------------------------------------------\n# configuration options related to the man page output\n#---------------------------------------------------------------------------\nGENERATE_MAN           = NO\nMAN_OUTPUT             = man\nMAN_EXTENSION          = .3\nMAN_LINKS              = NO\n#---------------------------------------------------------------------------\n# configuration options related to the XML output\n#---------------------------------------------------------------------------\nGENERATE_XML           = NO\nXML_OUTPUT             = xml\nXML_SCHEMA             = \nXML_DTD                = \n#---------------------------------------------------------------------------\n# configuration options for the AutoGen Definitions output\n#---------------------------------------------------------------------------\nGENERATE_AUTOGEN_DEF   = NO\n#---------------------------------------------------------------------------\n# configuration options related to the Perl module output\n#---------------------------------------------------------------------------\nGENERATE_PERLMOD       = NO\nPERLMOD_LATEX          = NO\nPERLMOD_PRETTY         = YES\nPERLMOD_MAKEVAR_PREFIX = \n#---------------------------------------------------------------------------\n# Configuration options related to the preprocessor   \n#---------------------------------------------------------------------------\nENABLE_PREPROCESSING   = YES\nMACRO_EXPANSION        = NO\nEXPAND_ONLY_PREDEF     = NO\nSEARCH_INCLUDES        = YES\nINCLUDE_PATH           = \nINCLUDE_FILE_PATTERNS  = \nPREDEFINED             = \nEXPAND_AS_DEFINED      = \nSKIP_FUNCTION_MACROS   = YES\n#---------------------------------------------------------------------------\n# Configuration::addtions related to external references   \n#---------------------------------------------------------------------------\nTAGFILES               = \nGENERATE_TAGFILE       = \nALLEXTERNALS           = NO\nEXTERNAL_GROUPS        = YES\nPERL_PATH              = /usr/bin/perl\n#---------------------------------------------------------------------------\n# Configuration options related to the dot tool   \n#---------------------------------------------------------------------------\nCLASS_DIAGRAMS         = YES\nHIDE_UNDOC_RELATIONS   = YES\nHAVE_DOT               = YES\nCLASS_GRAPH            = YES\nCOLLABORATION_GRAPH    = YES\nUML_LOOK               = YES\nTEMPLATE_RELATIONS     = YES\nINCLUDE_GRAPH          = YES\nINCLUDED_BY_GRAPH      = YES\nCALL_GRAPH             = NO\nGRAPHICAL_HIERARCHY    = YES\nDOT_IMAGE_FORMAT       = png\nDOT_PATH               = \"/usr/bin/dot\"\nDOTFILE_DIRS           = \nMAX_DOT_GRAPH_WIDTH    = 1024\nMAX_DOT_GRAPH_HEIGHT   = 1024\nMAX_DOT_GRAPH_DEPTH    = 0\nGENERATE_LEGEND        = YES\nDOT_CLEANUP            = YES\n#---------------------------------------------------------------------------\n# Configuration::addtions related to the search engine   \n#---------------------------------------------------------------------------\nSEARCHENGINE           = NO\nCGI_NAME               = search.cgi\nCGI_URL                = \nDOC_URL                = \nDOC_ABSPATH            = \nBIN_ABSPATH            = /usr/local/bin/\nEXT_DOC_PATHS          = \n"
  },
  {
    "path": "thirdparty/portaudio/bindings/cpp/example/devs.cxx",
    "content": "#include <iostream>\n#include \"portaudiocpp/PortAudioCpp.hxx\"\n\n#ifdef WIN32\n#include \"portaudiocpp/AsioDeviceAdapter.hxx\"\n#endif\n\n// ---------------------------------------------------------------------------------------\n\nvoid printSupportedStandardSampleRates(\n\t\tconst portaudio::DirectionSpecificStreamParameters &inputParameters, \n\t\tconst portaudio::DirectionSpecificStreamParameters &outputParameters)\n{\n\tstatic double STANDARD_SAMPLE_RATES[] = {\n\t\t8000.0, 9600.0, 11025.0, 12000.0, 16000.0, 22050.0, 24000.0, 32000.0,\n\t\t44100.0, 48000.0, 88200.0, 96000.0, -1 }; // negative terminated list\n\n\tint printCount = 0;\n\n\tfor (int i = 0; STANDARD_SAMPLE_RATES[i] > 0; ++i)\n\t{\n\t\tportaudio::StreamParameters tmp = portaudio::StreamParameters(inputParameters, outputParameters, STANDARD_SAMPLE_RATES[i], 0, paNoFlag);\n\n\t\tif (tmp.isSupported())\n\t\t{\n\t\t\tif (printCount == 0)\n\t\t\t{\n\t\t\t\tstd::cout << \"    \" << STANDARD_SAMPLE_RATES[i]; // 8.2\n\t\t\t\tprintCount = 1;\n\t\t\t}\n\t\t\telse if (printCount == 4)\n\t\t\t{\n\t\t\t\tstd::cout << \",\" << std::endl;\n\t\t\t\tstd::cout << \"    \" << STANDARD_SAMPLE_RATES[i]; // 8.2\n\t\t\t\tprintCount = 1;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tstd::cout << \", \" << STANDARD_SAMPLE_RATES[i]; // 8.2\n\t\t\t\t++printCount;\n\t\t\t}\n\t\t}\n\t}\n\n\tif (printCount == 0)\n\t\tstd::cout << \"None\" << std::endl;\n\telse\n\t\tstd::cout << std::endl;\n}\n\n// ---------------------------------------------------------------------------------------\n\nint main(int, char*[]);\nint main(int, char*[])\n{\n\ttry\n\t{\n\t\tportaudio::AutoSystem autoSys;\n\n\t\tportaudio::System &sys = portaudio::System::instance();\n\n\t\tstd::cout << \"PortAudio version number = \" << sys.version() << std::endl;\n\t\tstd::cout << \"PortAudio version text = '\" << sys.versionText() << \"'\" << std::endl;\n\n\t\tint numDevices = sys.deviceCount();\n\t\tstd::cout << \"Number of devices = \" << numDevices << std::endl;\n\n\t\tfor (portaudio::System::DeviceIterator i = sys.devicesBegin(); i != sys.devicesEnd(); ++i)\n\t\t{\n\t\t\tstd::cout << \"--------------------------------------- device #\" << (*i).index() << std::endl;\n\n\t\t\t// Mark global and API specific default devices:\n\t\t\tbool defaultDisplayed = false;\n\n\t\t\tif ((*i).isSystemDefaultInputDevice())\n\t\t\t{\n\t\t\t\tstd::cout << \"[ Default Input\";\n\t\t\t\tdefaultDisplayed = true;\n\t\t\t}\n\t\t\telse if ((*i).isHostApiDefaultInputDevice())\n\t\t\t{\n\t\t\t\tstd::cout << \"[ Default \" << (*i).hostApi().name() << \" Input\";\n\t\t\t\tdefaultDisplayed = true;\n\t\t\t}\n\n\t\t\tif ((*i).isSystemDefaultOutputDevice())\n\t\t\t{\n\t\t\t\tstd::cout << (defaultDisplayed ? \",\" : \"[\");\n\t\t\t\tstd::cout << \" Default Output\";\n\t\t\t\tdefaultDisplayed = true;\n\t\t\t}\n\t\t\telse if ((*i).isHostApiDefaultOutputDevice())\n\t\t\t{\n\t\t\t\tstd::cout << (defaultDisplayed ? \",\" : \"[\");\n\t\t\t\tstd::cout << \" Default \" << (*i).hostApi().name() << \" Output\";\n\t\t\t\tdefaultDisplayed = true;\n\t\t\t}\n\t\t\t\n\t\t\tif (defaultDisplayed)\n\t\t\t\tstd::cout << \" ]\" << std::endl;\n\n\t\t\t// Print device info:\n\t\t\tstd::cout << \"Name                        = \" << (*i).name() << std::endl;\n\t\t\tstd::cout << \"Host API                    = \" << (*i).hostApi().name() << std::endl;\n\t\t\tstd::cout << \"Max inputs = \" << (*i).maxInputChannels() << \", Max outputs = \" << (*i).maxOutputChannels() << std::endl;\n\n\t\t\tstd::cout << \"Default low input latency   = \" << (*i).defaultLowInputLatency() << std::endl; // 8.3\n\t\t\tstd::cout << \"Default low output latency  = \" << (*i).defaultLowOutputLatency() << std::endl; // 8.3\n\t\t\tstd::cout << \"Default high input latency  = \" << (*i).defaultHighInputLatency() << std::endl; // 8.3\n\t\t\tstd::cout << \"Default high output latency = \" << (*i).defaultHighOutputLatency() << std::endl; // 8.3\n\n#ifdef WIN32\n\t\t\t// ASIO specific latency information:\n\t\t\tif ((*i).hostApi().typeId() == paASIO)\n\t\t\t{\n\t\t\t\tportaudio::AsioDeviceAdapter asioDevice((*i));\n\n\t\t\t\tstd::cout << \"ASIO minimum buffer size    = \" << asioDevice.minBufferSize() << std::endl;\n\t\t\t\tstd::cout << \"ASIO maximum buffer size    = \" << asioDevice.maxBufferSize() << std::endl;\n\t\t\t\tstd::cout << \"ASIO preferred buffer size  = \" << asioDevice.preferredBufferSize() << std::endl;\n\n\t\t\t\tif (asioDevice.granularity() == -1)\n\t\t\t\t\tstd::cout << \"ASIO buffer granularity     = power of 2\" << std::endl;\n\t\t\t\telse\n\t\t\t\t\tstd::cout << \"ASIO buffer granularity     = \" << asioDevice.granularity() << std::endl;\n\t\t\t}\n#endif // WIN32\n\n\t\t\tstd::cout << \"Default sample rate         = \" << (*i).defaultSampleRate() << std::endl; // 8.2\n\n\t\t\t// Poll for standard sample rates:\n\t\t\tportaudio::DirectionSpecificStreamParameters inputParameters((*i), (*i).maxInputChannels(), portaudio::INT16, true, 0.0, NULL);\n\t\t\tportaudio::DirectionSpecificStreamParameters outputParameters((*i), (*i).maxOutputChannels(), portaudio::INT16, true, 0.0, NULL);\n\n\t\t\tif (inputParameters.numChannels() > 0)\n\t\t\t{\n\t\t\t\tstd::cout << \"Supported standard sample rates\" << std::endl;\n\t\t\t\tstd::cout << \" for half-duplex 16 bit \" << inputParameters.numChannels() << \" channel input = \" << std::endl;\n\t\t\t\tprintSupportedStandardSampleRates(inputParameters, portaudio::DirectionSpecificStreamParameters::null());\n\t\t\t}\n\n\t\t\tif (outputParameters.numChannels() > 0)\n\t\t\t{\n\t\t\t\tstd::cout << \"Supported standard sample rates\" << std::endl;\n\t\t\t\tstd::cout << \" for half-duplex 16 bit \" << outputParameters.numChannels() << \" channel output = \" << std::endl;\n\t\t\t\tprintSupportedStandardSampleRates(portaudio::DirectionSpecificStreamParameters::null(), outputParameters);\n\t\t\t}\n\n\t\t\tif (inputParameters.numChannels() > 0 && outputParameters.numChannels() > 0)\n\t\t\t{\n\t\t\t\tstd::cout << \"Supported standard sample rates\" << std::endl;\n\t\t\t\tstd::cout << \" for full-duplex 16 bit \" << inputParameters.numChannels() << \" channel input, \" << outputParameters.numChannels() << \" channel output = \" << std::endl;\n\t\t\t\tprintSupportedStandardSampleRates(inputParameters, outputParameters);\n\t\t\t}\n\t\t}\n\n\t\tstd::cout << \"----------------------------------------------\" << std::endl;\n\t}\n\tcatch (const portaudio::PaException &e)\n\t{\n\t\tstd::cout << \"A PortAudio error occurred: \" << e.paErrorText() << std::endl;\n\t}\n\tcatch (const portaudio::PaCppException &e)\n\t{\n\t\tstd::cout << \"A PortAudioCpp error occurred: \" << e.what() << std::endl;\n\t}\n\tcatch (const std::exception &e)\n\t{\n\t\tstd::cout << \"A generic exception occurred: \" << e.what() << std::endl;\n\t}\n\tcatch (...)\n\t{\n\t\tstd::cout << \"An unknown exception occurred.\" << std::endl;\n\t}\n\n\treturn 0;\n}\n"
  },
  {
    "path": "thirdparty/portaudio/bindings/cpp/example/sine.cxx",
    "content": "// ---------------------------------------------------------------------------------------\n\n#include <iostream>\n#include <cmath>\n#include <cassert>\n#include <cstddef>\n#include \"portaudiocpp/PortAudioCpp.hxx\"\n\n// ---------------------------------------------------------------------------------------\n\n// Some constants:\nconst int NUM_SECONDS = 5;\nconst double SAMPLE_RATE = 44100.0;\nconst int FRAMES_PER_BUFFER = 64;\nconst int TABLE_SIZE = 200;\n\n// ---------------------------------------------------------------------------------------\n\n// SineGenerator class:\nclass SineGenerator\n{\npublic:\n\tSineGenerator(int tableSize) : tableSize_(tableSize), leftPhase_(0), rightPhase_(0)\n\t{\n\t\tconst double PI = 3.14159265;\n\t\ttable_ = new float[tableSize];\n\t\tfor (int i = 0; i < tableSize; ++i)\n\t\t{\n\t\t\ttable_[i] = 0.125f * (float)sin(((double)i/(double)tableSize)*PI*2.);\n\t\t}\n\t}\n\n\t~SineGenerator()\n\t{\n\t\tdelete[] table_;\n\t}\n\n\tint generate(const void *inputBuffer, void *outputBuffer, unsigned long framesPerBuffer, \n\t\tconst PaStreamCallbackTimeInfo *timeInfo, PaStreamCallbackFlags statusFlags)\n\t{\n\t\tassert(outputBuffer != NULL);\n\n\t\tfloat **out = static_cast<float **>(outputBuffer);\n\n\t\tfor (unsigned int i = 0; i < framesPerBuffer; ++i)\n\t\t{\n\t\t\tout[0][i] = table_[leftPhase_];\n\t\t\tout[1][i] = table_[rightPhase_];\n\n\t\t\tleftPhase_ += 1;\n\t\t\tif (leftPhase_ >= tableSize_)\n\t\t\t\tleftPhase_ -= tableSize_;\n\n\t\t\trightPhase_ += 3;\n\t\t\tif (rightPhase_ >= tableSize_)\n\t\t\t\trightPhase_ -= tableSize_;\n\t\t}\n\n\t\treturn paContinue;\n\t}\n\nprivate:\n\tfloat *table_;\n\tint tableSize_;\n\tint leftPhase_;\n\tint rightPhase_;\n};\n\n// ---------------------------------------------------------------------------------------\n\n// main:\nint main(int, char *[]);\nint main(int, char *[])\n{\n\ttry\n\t{\n\t\t// Create a SineGenerator object:\n\t\tSineGenerator sineGenerator(TABLE_SIZE);\n\n\t\tstd::cout << \"Setting up PortAudio...\" << std::endl;\n\n\t\t// Set up the System:\n\t\tportaudio::AutoSystem autoSys;\n\t\tportaudio::System &sys = portaudio::System::instance();\n\n\t\t// Set up the parameters required to open a (Callback)Stream:\n\t\tportaudio::DirectionSpecificStreamParameters outParams(sys.defaultOutputDevice(), 2, portaudio::FLOAT32, false, sys.defaultOutputDevice().defaultLowOutputLatency(), NULL);\n\t\tportaudio::StreamParameters params(portaudio::DirectionSpecificStreamParameters::null(), outParams, SAMPLE_RATE, FRAMES_PER_BUFFER, paClipOff);\n\n\t\tstd::cout << \"Opening stereo output stream...\" << std::endl;\n\n\t\t// Create (and open) a new Stream, using the SineGenerator::generate function as a callback:\n\t\tportaudio::MemFunCallbackStream<SineGenerator> stream(params, sineGenerator, &SineGenerator::generate);\n\n\t\tstd::cout << \"Starting playback for \" << NUM_SECONDS << \" seconds.\" << std::endl;\n\n\t\t// Start the Stream (audio playback starts):\n\t\tstream.start();\n\n\t\t// Wait for 5 seconds:\n\t\tsys.sleep(NUM_SECONDS * 1000);\n\n\t\tstd::cout << \"Closing stream...\" <<std::endl;\n\n\t\t// Stop the Stream (not strictly needed as termintating the System will also stop all open Streams):\n\t\tstream.stop();\n\n\t\t// Close the Stream (not strictly needed as terminating the System will also close all open Streams):\n\t\tstream.close();\n\n\t\t// Terminate the System (not strictly needed as the AutoSystem will also take care of this when it \n\t\t// goes out of scope):\n\t\tsys.terminate();\n\n\t\tstd::cout << \"Test finished.\" << std::endl;\n\t}\n\tcatch (const portaudio::PaException &e)\n\t{\n\t\tstd::cout << \"A PortAudio error occurred: \" << e.paErrorText() << std::endl;\n\t}\n\tcatch (const portaudio::PaCppException &e)\n\t{\n\t\tstd::cout << \"A PortAudioCpp error occurred: \" << e.what() << std::endl;\n\t}\n\tcatch (const std::exception &e)\n\t{\n\t\tstd::cout << \"A generic exception occurred: \" << e.what() << std::endl;\n\t}\n\tcatch (...)\n\t{\n\t\tstd::cout << \"An unknown exception occurred.\" << std::endl;\n\t}\n\n\treturn 0;\n}\n\n\n"
  },
  {
    "path": "thirdparty/portaudio/bindings/cpp/include/Makefile.am",
    "content": "pkginclude_HEADERS = \\\n       portaudiocpp/AutoSystem.hxx \\\n       portaudiocpp/BlockingStream.hxx \\\n       portaudiocpp/CallbackInterface.hxx \\\n       portaudiocpp/CallbackStream.hxx \\\n       portaudiocpp/CFunCallbackStream.hxx \\\n       portaudiocpp/CppFunCallbackStream.hxx \\\n       portaudiocpp/Device.hxx \\\n       portaudiocpp/DirectionSpecificStreamParameters.hxx \\\n       portaudiocpp/Exception.hxx \\\n       portaudiocpp/HostApi.hxx \\\n       portaudiocpp/InterfaceCallbackStream.hxx \\\n       portaudiocpp/MemFunCallbackStream.hxx \\\n       portaudiocpp/PortAudioCpp.hxx \\\n       portaudiocpp/SampleDataFormat.hxx \\\n       portaudiocpp/Stream.hxx \\\n       portaudiocpp/StreamParameters.hxx \\\n       portaudiocpp/SystemDeviceIterator.hxx \\\n       portaudiocpp/SystemHostApiIterator.hxx \\\n       portaudiocpp/System.hxx\n\n#       portaudiocpp/AsioDeviceAdapter.hxx\n"
  },
  {
    "path": "thirdparty/portaudio/bindings/cpp/include/Makefile.in",
    "content": "# Makefile.in generated by automake 1.14.1 from Makefile.am.\n# @configure_input@\n\n# Copyright (C) 1994-2013 Free Software Foundation, Inc.\n\n# This Makefile.in is free software; the Free Software Foundation\n# gives unlimited permission to copy and/or distribute it,\n# with or without modifications, as long as this notice is preserved.\n\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY, to the extent permitted by law; without\n# even the implied warranty of MERCHANTABILITY or FITNESS FOR A\n# PARTICULAR PURPOSE.\n\n@SET_MAKE@\n\nVPATH = @srcdir@\nam__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'\nam__make_running_with_option = \\\n  case $${target_option-} in \\\n      ?) ;; \\\n      *) echo \"am__make_running_with_option: internal error: invalid\" \\\n              \"target option '$${target_option-}' specified\" >&2; \\\n         exit 1;; \\\n  esac; \\\n  has_opt=no; \\\n  sane_makeflags=$$MAKEFLAGS; \\\n  if $(am__is_gnu_make); then \\\n    sane_makeflags=$$MFLAGS; \\\n  else \\\n    case $$MAKEFLAGS in \\\n      *\\\\[\\ \\\t]*) \\\n        bs=\\\\; \\\n        sane_makeflags=`printf '%s\\n' \"$$MAKEFLAGS\" \\\n          | sed \"s/$$bs$$bs[$$bs $$bs\t]*//g\"`;; \\\n    esac; \\\n  fi; \\\n  skip_next=no; \\\n  strip_trailopt () \\\n  { \\\n    flg=`printf '%s\\n' \"$$flg\" | sed \"s/$$1.*$$//\"`; \\\n  }; \\\n  for flg in $$sane_makeflags; do \\\n    test $$skip_next = yes && { skip_next=no; continue; }; \\\n    case $$flg in \\\n      *=*|--*) continue;; \\\n        -*I) strip_trailopt 'I'; skip_next=yes;; \\\n      -*I?*) strip_trailopt 'I';; \\\n        -*O) strip_trailopt 'O'; skip_next=yes;; \\\n      -*O?*) strip_trailopt 'O';; \\\n        -*l) strip_trailopt 'l'; skip_next=yes;; \\\n      -*l?*) strip_trailopt 'l';; \\\n      -[dEDm]) skip_next=yes;; \\\n      -[JT]) skip_next=yes;; \\\n    esac; \\\n    case $$flg in \\\n      *$$target_option*) has_opt=yes; break;; \\\n    esac; \\\n  done; \\\n  test $$has_opt = yes\nam__make_dryrun = (target_option=n; $(am__make_running_with_option))\nam__make_keepgoing = (target_option=k; $(am__make_running_with_option))\npkgdatadir = $(datadir)/@PACKAGE@\npkgincludedir = $(includedir)/@PACKAGE@\npkglibdir = $(libdir)/@PACKAGE@\npkglibexecdir = $(libexecdir)/@PACKAGE@\nam__cd = CDPATH=\"$${ZSH_VERSION+.}$(PATH_SEPARATOR)\" && cd\ninstall_sh_DATA = $(install_sh) -c -m 644\ninstall_sh_PROGRAM = $(install_sh) -c\ninstall_sh_SCRIPT = $(install_sh) -c\nINSTALL_HEADER = $(INSTALL_DATA)\ntransform = $(program_transform_name)\nNORMAL_INSTALL = :\nPRE_INSTALL = :\nPOST_INSTALL = :\nNORMAL_UNINSTALL = :\nPRE_UNINSTALL = :\nPOST_UNINSTALL = :\nbuild_triplet = @build@\nhost_triplet = @host@\nsubdir = include\nDIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \\\n\t$(pkginclude_HEADERS)\nACLOCAL_M4 = $(top_srcdir)/aclocal.m4\nam__aclocal_m4_deps = $(top_srcdir)/configure.ac\nam__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \\\n\t$(ACLOCAL_M4)\nmkinstalldirs = $(install_sh) -d\nCONFIG_CLEAN_FILES =\nCONFIG_CLEAN_VPATH_FILES =\nAM_V_P = $(am__v_P_@AM_V@)\nam__v_P_ = $(am__v_P_@AM_DEFAULT_V@)\nam__v_P_0 = false\nam__v_P_1 = :\nAM_V_GEN = $(am__v_GEN_@AM_V@)\nam__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)\nam__v_GEN_0 = @echo \"  GEN     \" $@;\nam__v_GEN_1 = \nAM_V_at = $(am__v_at_@AM_V@)\nam__v_at_ = $(am__v_at_@AM_DEFAULT_V@)\nam__v_at_0 = @\nam__v_at_1 = \nSOURCES =\nDIST_SOURCES =\nam__can_run_installinfo = \\\n  case $$AM_UPDATE_INFO_DIR in \\\n    n|no|NO) false;; \\\n    *) (install-info --version) >/dev/null 2>&1;; \\\n  esac\nam__vpath_adj_setup = srcdirstrip=`echo \"$(srcdir)\" | sed 's|.|.|g'`;\nam__vpath_adj = case $$p in \\\n    $(srcdir)/*) f=`echo \"$$p\" | sed \"s|^$$srcdirstrip/||\"`;; \\\n    *) f=$$p;; \\\n  esac;\nam__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;\nam__install_max = 40\nam__nobase_strip_setup = \\\n  srcdirstrip=`echo \"$(srcdir)\" | sed 's/[].[^$$\\\\*|]/\\\\\\\\&/g'`\nam__nobase_strip = \\\n  for p in $$list; do echo \"$$p\"; done | sed -e \"s|$$srcdirstrip/||\"\nam__nobase_list = $(am__nobase_strip_setup); \\\n  for p in $$list; do echo \"$$p $$p\"; done | \\\n  sed \"s| $$srcdirstrip/| |;\"' / .*\\//!s/ .*/ ./; s,\\( .*\\)/[^/]*$$,\\1,' | \\\n  $(AWK) 'BEGIN { files[\".\"] = \"\" } { files[$$2] = files[$$2] \" \" $$1; \\\n    if (++n[$$2] == $(am__install_max)) \\\n      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = \"\" } } \\\n    END { for (dir in files) print dir, files[dir] }'\nam__base_list = \\\n  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\\n/ /g' | \\\n  sed '$$!N;$$!N;$$!N;$$!N;s/\\n/ /g'\nam__uninstall_files_from_dir = { \\\n  test -z \"$$files\" \\\n    || { test ! -d \"$$dir\" && test ! -f \"$$dir\" && test ! -r \"$$dir\"; } \\\n    || { echo \" ( cd '$$dir' && rm -f\" $$files \")\"; \\\n         $(am__cd) \"$$dir\" && rm -f $$files; }; \\\n  }\nam__installdirs = \"$(DESTDIR)$(pkgincludedir)\"\nHEADERS = $(pkginclude_HEADERS)\nam__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)\n# Read a list of newline-separated strings from the standard input,\n# and print each of them once, without duplicates.  Input order is\n# *not* preserved.\nam__uniquify_input = $(AWK) '\\\n  BEGIN { nonempty = 0; } \\\n  { items[$$0] = 1; nonempty = 1; } \\\n  END { if (nonempty) { for (i in items) print i; }; } \\\n'\n# Make sure the list of sources is unique.  This is necessary because,\n# e.g., the same source file might be shared among _SOURCES variables\n# for different programs/libraries.\nam__define_uniq_tagged_files = \\\n  list='$(am__tagged_files)'; \\\n  unique=`for i in $$list; do \\\n    if test -f \"$$i\"; then echo $$i; else echo $(srcdir)/$$i; fi; \\\n  done | $(am__uniquify_input)`\nETAGS = etags\nCTAGS = ctags\nDISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)\nACLOCAL = @ACLOCAL@\nAMTAR = @AMTAR@\nAM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@\nAR = @AR@\nAS = @AS@\nAUTOCONF = @AUTOCONF@\nAUTOHEADER = @AUTOHEADER@\nAUTOMAKE = @AUTOMAKE@\nAWK = @AWK@\nCC = @CC@\nCCDEPMODE = @CCDEPMODE@\nCFLAGS = @CFLAGS@\nCPP = @CPP@\nCPPFLAGS = @CPPFLAGS@\nCXX = @CXX@\nCXXCPP = @CXXCPP@\nCXXDEPMODE = @CXXDEPMODE@\nCXXFLAGS = @CXXFLAGS@\nCYGPATH_W = @CYGPATH_W@\nDEFAULT_INCLUDES = @DEFAULT_INCLUDES@\nDEFS = @DEFS@\nDEPDIR = @DEPDIR@\nDLLTOOL = @DLLTOOL@\nDSYMUTIL = @DSYMUTIL@\nDUMPBIN = @DUMPBIN@\nECHO_C = @ECHO_C@\nECHO_N = @ECHO_N@\nECHO_T = @ECHO_T@\nEGREP = @EGREP@\nEXEEXT = @EXEEXT@\nFGREP = @FGREP@\nGREP = @GREP@\nINSTALL = @INSTALL@\nINSTALL_DATA = @INSTALL_DATA@\nINSTALL_PROGRAM = @INSTALL_PROGRAM@\nINSTALL_SCRIPT = @INSTALL_SCRIPT@\nINSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@\nLD = @LD@\nLDFLAGS = @LDFLAGS@\nLIBOBJS = @LIBOBJS@\nLIBS = @LIBS@\nLIBTOOL = @LIBTOOL@\nLIPO = @LIPO@\nLN_S = @LN_S@\nLTLIBOBJS = @LTLIBOBJS@\nLT_VERSION_INFO = @LT_VERSION_INFO@\nMAINT = @MAINT@\nMAKEINFO = @MAKEINFO@\nMANIFEST_TOOL = @MANIFEST_TOOL@\nMKDIR_P = @MKDIR_P@\nNM = @NM@\nNMEDIT = @NMEDIT@\nOBJDUMP = @OBJDUMP@\nOBJEXT = @OBJEXT@\nOTOOL = @OTOOL@\nOTOOL64 = @OTOOL64@\nPACKAGE = @PACKAGE@\nPACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@\nPACKAGE_NAME = @PACKAGE_NAME@\nPACKAGE_STRING = @PACKAGE_STRING@\nPACKAGE_TARNAME = @PACKAGE_TARNAME@\nPACKAGE_URL = @PACKAGE_URL@\nPACKAGE_VERSION = @PACKAGE_VERSION@\nPATH_SEPARATOR = @PATH_SEPARATOR@\nPORTAUDIO_ROOT = @PORTAUDIO_ROOT@\nRANLIB = @RANLIB@\nSED = @SED@\nSET_MAKE = @SET_MAKE@\nSHELL = @SHELL@\nSTRIP = @STRIP@\nVERSION = @VERSION@\nabs_builddir = @abs_builddir@\nabs_srcdir = @abs_srcdir@\nabs_top_builddir = @abs_top_builddir@\nabs_top_srcdir = @abs_top_srcdir@\nac_ct_AR = @ac_ct_AR@\nac_ct_CC = @ac_ct_CC@\nac_ct_CXX = @ac_ct_CXX@\nac_ct_DUMPBIN = @ac_ct_DUMPBIN@\nam__include = @am__include@\nam__leading_dot = @am__leading_dot@\nam__quote = @am__quote@\nam__tar = @am__tar@\nam__untar = @am__untar@\nbindir = @bindir@\nbuild = @build@\nbuild_alias = @build_alias@\nbuild_cpu = @build_cpu@\nbuild_os = @build_os@\nbuild_vendor = @build_vendor@\nbuilddir = @builddir@\ndatadir = @datadir@\ndatarootdir = @datarootdir@\ndocdir = @docdir@\ndvidir = @dvidir@\nexec_prefix = @exec_prefix@\nhost = @host@\nhost_alias = @host_alias@\nhost_cpu = @host_cpu@\nhost_os = @host_os@\nhost_vendor = @host_vendor@\nhtmldir = @htmldir@\nincludedir = @includedir@\ninfodir = @infodir@\ninstall_sh = @install_sh@\nlibdir = @libdir@\nlibexecdir = @libexecdir@\nlocaledir = @localedir@\nlocalstatedir = @localstatedir@\nmandir = @mandir@\nmkdir_p = @mkdir_p@\noldincludedir = @oldincludedir@\npdfdir = @pdfdir@\nprefix = @prefix@\nprogram_transform_name = @program_transform_name@\npsdir = @psdir@\nsbindir = @sbindir@\nsharedstatedir = @sharedstatedir@\nsrcdir = @srcdir@\nsysconfdir = @sysconfdir@\ntarget_alias = @target_alias@\ntop_build_prefix = @top_build_prefix@\ntop_builddir = @top_builddir@\ntop_srcdir = @top_srcdir@\npkginclude_HEADERS = \\\n       portaudiocpp/AutoSystem.hxx \\\n       portaudiocpp/BlockingStream.hxx \\\n       portaudiocpp/CallbackInterface.hxx \\\n       portaudiocpp/CallbackStream.hxx \\\n       portaudiocpp/CFunCallbackStream.hxx \\\n       portaudiocpp/CppFunCallbackStream.hxx \\\n       portaudiocpp/Device.hxx \\\n       portaudiocpp/DirectionSpecificStreamParameters.hxx \\\n       portaudiocpp/Exception.hxx \\\n       portaudiocpp/HostApi.hxx \\\n       portaudiocpp/InterfaceCallbackStream.hxx \\\n       portaudiocpp/MemFunCallbackStream.hxx \\\n       portaudiocpp/PortAudioCpp.hxx \\\n       portaudiocpp/SampleDataFormat.hxx \\\n       portaudiocpp/Stream.hxx \\\n       portaudiocpp/StreamParameters.hxx \\\n       portaudiocpp/SystemDeviceIterator.hxx \\\n       portaudiocpp/SystemHostApiIterator.hxx \\\n       portaudiocpp/System.hxx\n\nall: all-am\n\n.SUFFIXES:\n$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)\n\t@for dep in $?; do \\\n\t  case '$(am__configure_deps)' in \\\n\t    *$$dep*) \\\n\t      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \\\n\t        && { if test -f $@; then exit 0; else break; fi; }; \\\n\t      exit 1;; \\\n\t  esac; \\\n\tdone; \\\n\techo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu include/Makefile'; \\\n\t$(am__cd) $(top_srcdir) && \\\n\t  $(AUTOMAKE) --gnu include/Makefile\n.PRECIOUS: Makefile\nMakefile: $(srcdir)/Makefile.in $(top_builddir)/config.status\n\t@case '$?' in \\\n\t  *config.status*) \\\n\t    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \\\n\t  *) \\\n\t    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \\\n\t    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \\\n\tesac;\n\n$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)\n\tcd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh\n\n$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)\n\tcd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh\n$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)\n\tcd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh\n$(am__aclocal_m4_deps):\n\nmostlyclean-libtool:\n\t-rm -f *.lo\n\nclean-libtool:\n\t-rm -rf .libs _libs\ninstall-pkgincludeHEADERS: $(pkginclude_HEADERS)\n\t@$(NORMAL_INSTALL)\n\t@list='$(pkginclude_HEADERS)'; test -n \"$(pkgincludedir)\" || list=; \\\n\tif test -n \"$$list\"; then \\\n\t  echo \" $(MKDIR_P) '$(DESTDIR)$(pkgincludedir)'\"; \\\n\t  $(MKDIR_P) \"$(DESTDIR)$(pkgincludedir)\" || exit 1; \\\n\tfi; \\\n\tfor p in $$list; do \\\n\t  if test -f \"$$p\"; then d=; else d=\"$(srcdir)/\"; fi; \\\n\t  echo \"$$d$$p\"; \\\n\tdone | $(am__base_list) | \\\n\twhile read files; do \\\n\t  echo \" $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'\"; \\\n\t  $(INSTALL_HEADER) $$files \"$(DESTDIR)$(pkgincludedir)\" || exit $$?; \\\n\tdone\n\nuninstall-pkgincludeHEADERS:\n\t@$(NORMAL_UNINSTALL)\n\t@list='$(pkginclude_HEADERS)'; test -n \"$(pkgincludedir)\" || list=; \\\n\tfiles=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \\\n\tdir='$(DESTDIR)$(pkgincludedir)'; $(am__uninstall_files_from_dir)\n\nID: $(am__tagged_files)\n\t$(am__define_uniq_tagged_files); mkid -fID $$unique\ntags: tags-am\nTAGS: tags\n\ntags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)\n\tset x; \\\n\there=`pwd`; \\\n\t$(am__define_uniq_tagged_files); \\\n\tshift; \\\n\tif test -z \"$(ETAGS_ARGS)$$*$$unique\"; then :; else \\\n\t  test -n \"$$unique\" || unique=$$empty_fix; \\\n\t  if test $$# -gt 0; then \\\n\t    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \\\n\t      \"$$@\" $$unique; \\\n\t  else \\\n\t    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \\\n\t      $$unique; \\\n\t  fi; \\\n\tfi\nctags: ctags-am\n\nCTAGS: ctags\nctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)\n\t$(am__define_uniq_tagged_files); \\\n\ttest -z \"$(CTAGS_ARGS)$$unique\" \\\n\t  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \\\n\t     $$unique\n\nGTAGS:\n\there=`$(am__cd) $(top_builddir) && pwd` \\\n\t  && $(am__cd) $(top_srcdir) \\\n\t  && gtags -i $(GTAGS_ARGS) \"$$here\"\ncscopelist: cscopelist-am\n\ncscopelist-am: $(am__tagged_files)\n\tlist='$(am__tagged_files)'; \\\n\tcase \"$(srcdir)\" in \\\n\t  [\\\\/]* | ?:[\\\\/]*) sdir=\"$(srcdir)\" ;; \\\n\t  *) sdir=$(subdir)/$(srcdir) ;; \\\n\tesac; \\\n\tfor i in $$list; do \\\n\t  if test -f \"$$i\"; then \\\n\t    echo \"$(subdir)/$$i\"; \\\n\t  else \\\n\t    echo \"$$sdir/$$i\"; \\\n\t  fi; \\\n\tdone >> $(top_builddir)/cscope.files\n\ndistclean-tags:\n\t-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags\n\ndistdir: $(DISTFILES)\n\t@srcdirstrip=`echo \"$(srcdir)\" | sed 's/[].[^$$\\\\*]/\\\\\\\\&/g'`; \\\n\ttopsrcdirstrip=`echo \"$(top_srcdir)\" | sed 's/[].[^$$\\\\*]/\\\\\\\\&/g'`; \\\n\tlist='$(DISTFILES)'; \\\n\t  dist_files=`for file in $$list; do echo $$file; done | \\\n\t  sed -e \"s|^$$srcdirstrip/||;t\" \\\n\t      -e \"s|^$$topsrcdirstrip/|$(top_builddir)/|;t\"`; \\\n\tcase $$dist_files in \\\n\t  */*) $(MKDIR_P) `echo \"$$dist_files\" | \\\n\t\t\t   sed '/\\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \\\n\t\t\t   sort -u` ;; \\\n\tesac; \\\n\tfor file in $$dist_files; do \\\n\t  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \\\n\t  if test -d $$d/$$file; then \\\n\t    dir=`echo \"/$$file\" | sed -e 's,/[^/]*$$,,'`; \\\n\t    if test -d \"$(distdir)/$$file\"; then \\\n\t      find \"$(distdir)/$$file\" -type d ! -perm -700 -exec chmod u+rwx {} \\;; \\\n\t    fi; \\\n\t    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \\\n\t      cp -fpR $(srcdir)/$$file \"$(distdir)$$dir\" || exit 1; \\\n\t      find \"$(distdir)/$$file\" -type d ! -perm -700 -exec chmod u+rwx {} \\;; \\\n\t    fi; \\\n\t    cp -fpR $$d/$$file \"$(distdir)$$dir\" || exit 1; \\\n\t  else \\\n\t    test -f \"$(distdir)/$$file\" \\\n\t    || cp -p $$d/$$file \"$(distdir)/$$file\" \\\n\t    || exit 1; \\\n\t  fi; \\\n\tdone\ncheck-am: all-am\ncheck: check-am\nall-am: Makefile $(HEADERS)\ninstalldirs:\n\tfor dir in \"$(DESTDIR)$(pkgincludedir)\"; do \\\n\t  test -z \"$$dir\" || $(MKDIR_P) \"$$dir\"; \\\n\tdone\ninstall: install-am\ninstall-exec: install-exec-am\ninstall-data: install-data-am\nuninstall: uninstall-am\n\ninstall-am: all-am\n\t@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am\n\ninstallcheck: installcheck-am\ninstall-strip:\n\tif test -z '$(STRIP)'; then \\\n\t  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM=\"$(INSTALL_STRIP_PROGRAM)\" \\\n\t    install_sh_PROGRAM=\"$(INSTALL_STRIP_PROGRAM)\" INSTALL_STRIP_FLAG=-s \\\n\t      install; \\\n\telse \\\n\t  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM=\"$(INSTALL_STRIP_PROGRAM)\" \\\n\t    install_sh_PROGRAM=\"$(INSTALL_STRIP_PROGRAM)\" INSTALL_STRIP_FLAG=-s \\\n\t    \"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'\" install; \\\n\tfi\nmostlyclean-generic:\n\nclean-generic:\n\ndistclean-generic:\n\t-test -z \"$(CONFIG_CLEAN_FILES)\" || rm -f $(CONFIG_CLEAN_FILES)\n\t-test . = \"$(srcdir)\" || test -z \"$(CONFIG_CLEAN_VPATH_FILES)\" || rm -f $(CONFIG_CLEAN_VPATH_FILES)\n\nmaintainer-clean-generic:\n\t@echo \"This command is intended for maintainers to use\"\n\t@echo \"it deletes files that may require special tools to rebuild.\"\nclean: clean-am\n\nclean-am: clean-generic clean-libtool mostlyclean-am\n\ndistclean: distclean-am\n\t-rm -f Makefile\ndistclean-am: clean-am distclean-generic distclean-tags\n\ndvi: dvi-am\n\ndvi-am:\n\nhtml: html-am\n\nhtml-am:\n\ninfo: info-am\n\ninfo-am:\n\ninstall-data-am: install-pkgincludeHEADERS\n\ninstall-dvi: install-dvi-am\n\ninstall-dvi-am:\n\ninstall-exec-am:\n\ninstall-html: install-html-am\n\ninstall-html-am:\n\ninstall-info: install-info-am\n\ninstall-info-am:\n\ninstall-man:\n\ninstall-pdf: install-pdf-am\n\ninstall-pdf-am:\n\ninstall-ps: install-ps-am\n\ninstall-ps-am:\n\ninstallcheck-am:\n\nmaintainer-clean: maintainer-clean-am\n\t-rm -f Makefile\nmaintainer-clean-am: distclean-am maintainer-clean-generic\n\nmostlyclean: mostlyclean-am\n\nmostlyclean-am: mostlyclean-generic mostlyclean-libtool\n\npdf: pdf-am\n\npdf-am:\n\nps: ps-am\n\nps-am:\n\nuninstall-am: uninstall-pkgincludeHEADERS\n\n.MAKE: install-am install-strip\n\n.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \\\n\tclean-libtool cscopelist-am ctags ctags-am distclean \\\n\tdistclean-generic distclean-libtool distclean-tags distdir dvi \\\n\tdvi-am html html-am info info-am install install-am \\\n\tinstall-data install-data-am install-dvi install-dvi-am \\\n\tinstall-exec install-exec-am install-html install-html-am \\\n\tinstall-info install-info-am install-man install-pdf \\\n\tinstall-pdf-am install-pkgincludeHEADERS install-ps \\\n\tinstall-ps-am install-strip installcheck installcheck-am \\\n\tinstalldirs maintainer-clean maintainer-clean-generic \\\n\tmostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \\\n\tps ps-am tags tags-am uninstall uninstall-am \\\n\tuninstall-pkgincludeHEADERS\n\n\n#       portaudiocpp/AsioDeviceAdapter.hxx\n\n# Tell versions [3.59,3.63) of GNU make to not export all variables.\n# Otherwise a system limit (for SysV at least) may be exceeded.\n.NOEXPORT:\n"
  },
  {
    "path": "thirdparty/portaudio/bindings/cpp/include/portaudiocpp/AsioDeviceAdapter.hxx",
    "content": "#ifndef INCLUDED_PORTAUDIO_ASIODEVICEADAPTER_HXX\n#define INCLUDED_PORTAUDIO_ASIODEVICEADAPTER_HXX\n\nnamespace portaudio\n{\n\n\t// Forward declaration(s):\n\tclass Device;\n\n\t// Declaration(s):\n\t//////\n\t/// @brief Adapts the given Device to an ASIO specific extension.\n\t///\n\t/// Deleting the AsioDeviceAdapter does not affect the underlying \n\t/// Device.\n\t//////\n\tclass AsioDeviceAdapter\n\t{\n\tpublic:\n\t\tAsioDeviceAdapter(Device &device);\n\n\t\tDevice &device();\n\n\t\tlong minBufferSize() const;\n\t\tlong maxBufferSize() const;\n\t\tlong preferredBufferSize() const;\n\t\tlong granularity() const;\n\n\t\tvoid showControlPanel(void *systemSpecific);\n\n\t\tconst char *inputChannelName(int channelIndex) const;\n\t\tconst char *outputChannelName(int channelIndex) const;\n\n\tprivate:\n\t\tDevice *device_;\n\n\t\tlong minBufferSize_;\n\t\tlong maxBufferSize_;\n\t\tlong preferredBufferSize_;\n\t\tlong granularity_;\n\t};\n}\n\n#endif // INCLUDED_PORTAUDIO_ASIODEVICEADAPTER_HXX\n"
  },
  {
    "path": "thirdparty/portaudio/bindings/cpp/include/portaudiocpp/AutoSystem.hxx",
    "content": "#ifndef INCLUDED_PORTAUDIO_AUTOSYSTEM_HXX\n#define INCLUDED_PORTAUDIO_AUTOSYSTEM_HXX\n\n// ---------------------------------------------------------------------------------------\n\n#include \"portaudiocpp/System.hxx\"\n\n// ---------------------------------------------------------------------------------------\n\nnamespace portaudio\n{\n\n\n\t//////\n\t/// @brief A RAII idiom class to ensure automatic clean-up when an exception is \n\t/// raised.\n\t///\n\t/// A simple helper class which uses the 'Resource Acquisition is Initialization' \n\t/// idiom (RAII). Use this class to initialize/terminate the System rather than \n\t/// using System directly. AutoSystem must be created on stack and must be valid \n\t/// throughout the time you wish to use PortAudioCpp. Your 'main' function might be \n\t/// a good place for it.\n\t///\n\t/// To avoid having to type portaudio::System::instance().xyz() all the time, it's usually \n\t/// a good idea to make a reference to the System which can be accessed directly.\n\t/// @verbatim\n\t/// portaudio::AutoSys autoSys;\n\t/// portaudio::System &sys = portaudio::System::instance();\n\t/// @endverbatim\n\t//////\n\tclass AutoSystem\n\t{\n\tpublic:\n\t\tAutoSystem(bool initialize = true)\n\t\t{\n\t\t\tif (initialize)\n\t\t\t\tSystem::initialize();\n\t\t}\n\n\t\t~AutoSystem()\n\t\t{\n\t\t\tif (System::exists())\n\t\t\t\tSystem::terminate();\n\t\t}\n\n\t\tvoid initialize()\n\t\t{\n\t\t\tSystem::initialize();\n\t\t}\n\n\t\tvoid terminate()\n\t\t{\n\t\t\tSystem::terminate();\n\t\t}\n\t};\n\n\n} // namespace portaudio\n\n// ---------------------------------------------------------------------------------------\n\n#endif // INCLUDED_PORTAUDIO_AUTOSYSTEM_HXX\n"
  },
  {
    "path": "thirdparty/portaudio/bindings/cpp/include/portaudiocpp/BlockingStream.hxx",
    "content": "#ifndef INCLUDED_PORTAUDIO_BLOCKINGSTREAM_HXX\n#define INCLUDED_PORTAUDIO_BLOCKINGSTREAM_HXX\n\n// ---------------------------------------------------------------------------------------\n\n#include \"portaudiocpp/Stream.hxx\"\n\n// ---------------------------------------------------------------------------------------\n\nnamespace portaudio\n{\n\n\n\n\t//////\n\t/// @brief Stream class for blocking read/write-style input and output.\n\t//////\n\tclass BlockingStream : public Stream\n\t{\n\tpublic:\n\t\tBlockingStream();\n\t\tBlockingStream(const StreamParameters &parameters);\n\t\t~BlockingStream();\n\n\t\tvoid open(const StreamParameters &parameters);\n\n\t\tvoid read(void *buffer, unsigned long numFrames);\n\t\tvoid write(const void *buffer, unsigned long numFrames);\n\n\t\tsigned long availableReadSize() const;\n\t\tsigned long availableWriteSize() const;\n\n\tprivate:\n\t\tBlockingStream(const BlockingStream &); // non-copyable\n\t\tBlockingStream &operator=(const BlockingStream &); // non-copyable\n\t};\n\n\n\n} // portaudio\n\n// ---------------------------------------------------------------------------------------\n\n#endif // INCLUDED_PORTAUDIO_BLOCKINGSTREAM_HXX\n\n"
  },
  {
    "path": "thirdparty/portaudio/bindings/cpp/include/portaudiocpp/CFunCallbackStream.hxx",
    "content": "#ifndef INCLUDED_PORTAUDIO_CFUNCALLBACKSTREAM_HXX\n#define INCLUDED_PORTAUDIO_CFUNCALLBACKSTREAM_HXX\n\n// ---------------------------------------------------------------------------------------\n\n#include \"portaudio.h\"\n\n#include \"portaudiocpp/CallbackStream.hxx\"\n\n// ---------------------------------------------------------------------------------------\n\n// Forward declaration(s)\nnamespace portaudio\n{\n\tclass StreamParameters;\n}\n\n// ---------------------------------------------------------------------------------------\n\n// Declaration(s):\nnamespace portaudio\n{\n\t// -----------------------------------------------------------------------------------\n\n\t//////\n\t/// @brief Callback stream using a free function with C linkage. It's important that the function \n\t/// the passed function pointer points to is declared ``extern \"C\"''.\n\t//////\n\tclass CFunCallbackStream : public CallbackStream\n\t{\n\tpublic:\n\t\tCFunCallbackStream();\n\t\tCFunCallbackStream(const StreamParameters &parameters, PaStreamCallback *funPtr, void *userData);\n\t\t~CFunCallbackStream();\n\t\t\n\t\tvoid open(const StreamParameters &parameters, PaStreamCallback *funPtr, void *userData);\n\n\tprivate:\n\t\tCFunCallbackStream(const CFunCallbackStream &); // non-copyable\n\t\tCFunCallbackStream &operator=(const CFunCallbackStream &); // non-copyable\n\t};\n\n\t// -----------------------------------------------------------------------------------\n} // portaudio\n\n// ---------------------------------------------------------------------------------------\n\n#endif // INCLUDED_PORTAUDIO_MEMFUNCALLBACKSTREAM_HXX\n\n"
  },
  {
    "path": "thirdparty/portaudio/bindings/cpp/include/portaudiocpp/CallbackInterface.hxx",
    "content": "#ifndef INCLUDED_PORTAUDIO_CALLBACKINTERFACE_HXX\n#define INCLUDED_PORTAUDIO_CALLBACKINTERFACE_HXX\n\n// ---------------------------------------------------------------------------------------\n\n#include \"portaudio.h\"\n\n// ---------------------------------------------------------------------------------------\n\nnamespace portaudio\n{\n\t// -----------------------------------------------------------------------------------\n\n\t//////\n\t/// @brief Interface for an object that's callable as a PortAudioCpp callback object (ie that implements the \n\t/// paCallbackFun method).\n\t//////\n\tclass CallbackInterface\n\t{\n\tpublic:\n\t\tvirtual ~CallbackInterface() {}\n\n\t\tvirtual int paCallbackFun(const void *inputBuffer, void *outputBuffer, unsigned long numFrames, \n\t\t\tconst PaStreamCallbackTimeInfo *timeInfo, PaStreamCallbackFlags statusFlags) = 0;\n\t};\n\n\t// -----------------------------------------------------------------------------------\n\n\tnamespace impl\n\t{\n\t\textern \"C\"\n\t\t{\n\t\t\tint callbackInterfaceToPaCallbackAdapter(const void *inputBuffer, void *outputBuffer, unsigned long numFrames, \n\t\t\t\tconst PaStreamCallbackTimeInfo *timeInfo, PaStreamCallbackFlags statusFlags, \n\t\t\t\tvoid *userData);\n\t\t} // extern \"C\"\n\t}\n\n\t// -----------------------------------------------------------------------------------\n\n} // namespace portaudio\n\n// ---------------------------------------------------------------------------------------\n\n#endif // INCLUDED_PORTAUDIO_CALLBACKINTERFACE_HXX\n"
  },
  {
    "path": "thirdparty/portaudio/bindings/cpp/include/portaudiocpp/CallbackStream.hxx",
    "content": "#ifndef INCLUDED_PORTAUDIO_CALLBACKSTREAM_HXX\n#define INCLUDED_PORTAUDIO_CALLBACKSTREAM_HXX\n\n// ---------------------------------------------------------------------------------------\n\n#include \"portaudio.h\"\n\n#include \"portaudiocpp/Stream.hxx\"\n\n// ---------------------------------------------------------------------------------------\n\n// Declaration(s):\nnamespace portaudio\n{\n\n\n\t//////\n\t/// @brief Base class for all Streams which use a callback-based mechanism.\n\t//////\n\tclass CallbackStream : public Stream\n\t{\n\tprotected:\n\t\tCallbackStream();\n\t\tvirtual ~CallbackStream();\n\n\tpublic:\n\t\t// stream info (time-varying)\n\t\tdouble cpuLoad() const;\n\n\tprivate:\n\t\tCallbackStream(const CallbackStream &); // non-copyable\n\t\tCallbackStream &operator=(const CallbackStream &); // non-copyable\n\t};\n\n\n} // namespace portaudio\n\n// ---------------------------------------------------------------------------------------\n\n#endif // INCLUDED_PORTAUDIO_CALLBACKSTREAM_HXX\n"
  },
  {
    "path": "thirdparty/portaudio/bindings/cpp/include/portaudiocpp/CppFunCallbackStream.hxx",
    "content": "#ifndef INCLUDED_PORTAUDIO_CPPFUNCALLBACKSTREAM_HXX\n#define INCLUDED_PORTAUDIO_CPPFUNCALLBACKSTREAM_HXX\n\n// ---------------------------------------------------------------------------------------\n\n#include \"portaudio.h\"\n\n#include \"portaudiocpp/CallbackStream.hxx\"\n\n// ---------------------------------------------------------------------------------------\n\n// Forward declaration(s):\nnamespace portaudio\n{\n\tclass StreamParameters;\n}\n\n// ---------------------------------------------------------------------------------------\n\n// Declaration(s):\nnamespace portaudio\n{\n\n\n\tnamespace impl\n\t{\n\t\textern \"C\"\n\t\t{\n\t\t\tint cppCallbackToPaCallbackAdapter(const void *inputBuffer, void *outputBuffer, unsigned long numFrames, \n\t\t\t\tconst PaStreamCallbackTimeInfo *timeInfo, PaStreamCallbackFlags statusFlags, \n\t\t\t\tvoid *userData);\n\t\t} // extern \"C\"\n\t}\n\n\t// -----------------------------------------------------------------------------------\n\n\t//////\n\t/// @brief Callback stream using a C++ function (either a free function or a static function) \n\t/// callback.\n\t//////\n\tclass FunCallbackStream : public CallbackStream\n\t{\n\tpublic:\n\t\ttypedef int (*CallbackFunPtr)(const void *inputBuffer, void *outputBuffer, unsigned long numFrames, \n\t\t\tconst PaStreamCallbackTimeInfo *timeInfo, PaStreamCallbackFlags statusFlags, \n\t\t\tvoid *userData);\n\n\t\t// -------------------------------------------------------------------------------\n\n\t\t//////\n\t\t/// @brief Simple structure containing a function pointer to the C++ callback function and a \n\t\t/// (void) pointer to the user supplied data.\n\t\t//////\n\t\tstruct CppToCCallbackData\n\t\t{\n\t\t\tCppToCCallbackData();\n\t\t\tCppToCCallbackData(CallbackFunPtr funPtr, void *userData);\n\t\t\tvoid init(CallbackFunPtr funPtr, void *userData);\n\n\t\t\tCallbackFunPtr funPtr;\n\t\t\tvoid *userData;\n\t\t};\n\n\t\t// -------------------------------------------------------------------------------\n\n\t\tFunCallbackStream();\n\t\tFunCallbackStream(const StreamParameters &parameters, CallbackFunPtr funPtr, void *userData);\n\t\t~FunCallbackStream();\n\n\t\tvoid open(const StreamParameters &parameters, CallbackFunPtr funPtr, void *userData);\n\n\tprivate:\n\t\tFunCallbackStream(const FunCallbackStream &); // non-copyable\n\t\tFunCallbackStream &operator=(const FunCallbackStream &); // non-copyable\n\n\t\tCppToCCallbackData adapterData_;\n\n\t\tvoid open(const StreamParameters &parameters);\n\t};\n\n\n} // portaudio\n\n// ---------------------------------------------------------------------------------------\n\n#endif // INCLUDED_PORTAUDIO_CPPFUNCALLBACKSTREAM_HXX\n"
  },
  {
    "path": "thirdparty/portaudio/bindings/cpp/include/portaudiocpp/Device.hxx",
    "content": "#ifndef INCLUDED_PORTAUDIO_DEVICE_HXX\n#define INCLUDED_PORTAUDIO_DEVICE_HXX\n\n// ---------------------------------------------------------------------------------------\n\n#include <iterator>\n\n#include \"portaudio.h\"\n\n#include \"portaudiocpp/SampleDataFormat.hxx\"\n\n// ---------------------------------------------------------------------------------------\n\n// Forward declaration(s):\nnamespace portaudio\n{\n\tclass System;\n\tclass HostApi;\n}\n\n// ---------------------------------------------------------------------------------------\n\n// Declaration(s):\nnamespace portaudio\n{\n\n\t//////\n\t/// @brief Class which represents a PortAudio device in the System.\n\t///\n\t/// A single physical device in the system may have multiple PortAudio \n\t/// Device representations using different HostApi 's though. A Device \n\t/// can be half-duplex or full-duplex. A half-duplex Device can be used \n\t/// to create a half-duplex Stream. A full-duplex Device can be used to \n\t/// create a full-duplex Stream. If supported by the HostApi, two \n\t/// half-duplex Devices can even be used to create a full-duplex Stream.\n\t///\n\t/// Note that Device objects are very light-weight and can be passed around \n\t/// by-value.\n\t//////\n\tclass Device\n\t{\n\tpublic:\n\t\t// query info: name, max in channels, max out channels, \n\t\t// default low/high input/output latency, default sample rate\n\t\tPaDeviceIndex index() const;\n\t\tconst char *name() const;\n\t\tint maxInputChannels() const;\n\t\tint maxOutputChannels() const;\n\t\tPaTime defaultLowInputLatency() const;\n\t\tPaTime defaultHighInputLatency() const;\n\t\tPaTime defaultLowOutputLatency() const;\n\t\tPaTime defaultHighOutputLatency() const;\n\t\tdouble defaultSampleRate() const;\n\n\t\tbool isInputOnlyDevice() const; // extended\n\t\tbool isOutputOnlyDevice() const; // extended\n\t\tbool isFullDuplexDevice() const; // extended\n\t\tbool isSystemDefaultInputDevice() const; // extended\n\t\tbool isSystemDefaultOutputDevice() const; // extended\n\t\tbool isHostApiDefaultInputDevice() const; // extended\n\t\tbool isHostApiDefaultOutputDevice() const; // extended\n\n\t\tbool operator==(const Device &rhs) const;\n\t\tbool operator!=(const Device &rhs) const;\n\n\t\t// host api reference\n\t\tHostApi &hostApi();\n\t\tconst HostApi &hostApi() const;\n\n\tprivate:\n\t\tPaDeviceIndex index_;\n\t\tconst PaDeviceInfo *info_;\n\n\tprivate:\n\t\tfriend class System;\n\t\t\n\t\texplicit Device(PaDeviceIndex index);\n\t\t~Device();\n\n\t\tDevice(const Device &); // non-copyable\n\t\tDevice &operator=(const Device &); // non-copyable\n\t};\n\n\t// -----------------------------------------------------------------------------------\n\n} // namespace portaudio\n\n// ---------------------------------------------------------------------------------------\n\n#endif // INCLUDED_PORTAUDIO_DEVICE_HXX\n\n"
  },
  {
    "path": "thirdparty/portaudio/bindings/cpp/include/portaudiocpp/DirectionSpecificStreamParameters.hxx",
    "content": "#ifndef INCLUDED_PORTAUDIO_SINGLEDIRECTIONSTREAMPARAMETERS_HXX\n#define INCLUDED_PORTAUDIO_SINGLEDIRECTIONSTREAMPARAMETERS_HXX\n\n// ---------------------------------------------------------------------------------------\n\n#include <cstddef>\n\n#include \"portaudio.h\"\n\n#include \"portaudiocpp/System.hxx\"\n#include \"portaudiocpp/SampleDataFormat.hxx\"\n\n// ---------------------------------------------------------------------------------------\n\n// Forward declaration(s):\nnamespace portaudio\n{\n\tclass Device;\n}\n\n// ---------------------------------------------------------------------------------------\n\n// Declaration(s):\nnamespace portaudio\n{\n\n\t//////\n\t/// @brief All parameters for one direction (either in or out) of a Stream. Together with \n\t/// parameters common to both directions, two DirectionSpecificStreamParameters can make up \n\t/// a StreamParameters object which contains all parameters for a Stream.\n\t//////\n\tclass DirectionSpecificStreamParameters\n\t{\n\tpublic:\n\t\tstatic DirectionSpecificStreamParameters null();\n\n\t\tDirectionSpecificStreamParameters();\n\t\tDirectionSpecificStreamParameters(const Device &device, int numChannels, SampleDataFormat format, \n\t\t\tbool interleaved, PaTime suggestedLatency, void *hostApiSpecificStreamInfo);\n\n\t\t// Set up methods:\n\t\tvoid setDevice(const Device &device);\n\t\tvoid setNumChannels(int numChannels);\n\n\t\tvoid setSampleFormat(SampleDataFormat format, bool interleaved = true);\n\t\tvoid setHostApiSpecificSampleFormat(PaSampleFormat format, bool interleaved = true);\n\n\t\tvoid setSuggestedLatency(PaTime latency);\n\n\t\tvoid setHostApiSpecificStreamInfo(void *streamInfo);\n\n\t\t// Accessor methods:\n\t\tPaStreamParameters *paStreamParameters();\n\t\tconst PaStreamParameters *paStreamParameters() const;\n\n\t\tDevice &device() const;\n\t\tint numChannels() const;\n\n\t\tSampleDataFormat sampleFormat() const;\n\t\tbool isSampleFormatInterleaved() const;\n\t\tbool isSampleFormatHostApiSpecific() const;\n\t\tPaSampleFormat hostApiSpecificSampleFormat() const;\n\n\t\tPaTime suggestedLatency() const;\n\n\t\tvoid *hostApiSpecificStreamInfo() const;\n\t\n\tprivate:\n\t\tPaStreamParameters paStreamParameters_;\n\t};\n\n\n} // namespace portaudio\n\n// ---------------------------------------------------------------------------------------\n\n#endif // INCLUDED_PORTAUDIO_SINGLEDIRECTIONSTREAMPARAMETERS_HXX\n"
  },
  {
    "path": "thirdparty/portaudio/bindings/cpp/include/portaudiocpp/Exception.hxx",
    "content": "#ifndef INCLUDED_PORTAUDIO_EXCEPTION_HXX\n#define INCLUDED_PORTAUDIO_EXCEPTION_HXX\n\n// ---------------------------------------------------------------------------------------\n\n#include <exception>\n\n#include \"portaudio.h\"\n\n// ---------------------------------------------------------------------------------------\n\nnamespace portaudio\n{\n\n\t//////\n\t/// @brief Base class for all exceptions PortAudioCpp can throw.\n\t///\n\t/// Class is derived from std::exception.\n\t//////\n\tclass Exception : public std::exception\n\t{\n\tpublic:\n\t\tvirtual ~Exception() throw() {}\n\n\t\tvirtual const char *what() const throw() = 0;\n\t};\n\t\n\t// -----------------------------------------------------------------------------------\n\n\t//////\n\t/// @brief Wrapper for PortAudio error codes to C++ exceptions.\n\t///\n\t/// It wraps up PortAudio's error handling mechanism using \n\t/// C++ exceptions and is derived from std::exception for \n\t/// easy exception handling and to ease integration with \n\t/// other code.\n\t///\n\t/// To know what exceptions each function may throw, look up \n\t/// the errors that can occur in the PortAudio documentation \n\t/// for the equivalent functions.\n\t///\n\t/// Some functions are likely to throw an exception (such as \n\t/// Stream::open(), etc) and these should always be called in \n\t/// try{} catch{} blocks and the thrown exceptions should be \n\t/// handled properly (ie. the application shouldn't just abort, \n\t/// but merely display a warning dialog to the user or something).\n\t/// However nearly all functions in PortAudioCpp are capable \n\t/// of throwing exceptions. When a function like Stream::isStopped() \n\t/// throws an exception, it's such an exceptional state that it's \n\t/// not likely that it can be recovered. PaExceptions such as these \n\t/// can ``safely'' be left to be handled by some outer catch-all-like \n\t/// mechanism for unrecoverable errors.\n\t//////\n\tclass PaException : public Exception\n\t{\n\tpublic:\n\t\texplicit PaException(PaError error);\n\n\t\tconst char *what() const throw();\n\n\t\tPaError paError() const;\n\t\tconst char *paErrorText() const;\n\n\t\tbool isHostApiError() const; // extended\n\t\tlong lastHostApiError() const;\n\t\tconst char *lastHostApiErrorText() const;\n\n\t\tbool operator==(const PaException &rhs) const;\n\t\tbool operator!=(const PaException &rhs) const;\n\n\tprivate:\n\t\tPaError error_;\n \t};\n\n\t// -----------------------------------------------------------------------------------\n\n\t//////\n\t/// @brief Exceptions specific to PortAudioCpp (ie. exceptions which do not have an \n\t/// equivalent PortAudio error code).\n\t//////\n\tclass PaCppException : public Exception\n\t{\n\tpublic:\n\t\tenum ExceptionSpecifier\n\t\t{\n\t\t\tUNABLE_TO_ADAPT_DEVICE\n\t\t};\n\n\t\tPaCppException(ExceptionSpecifier specifier);\n\n\t\tconst char *what() const throw();\n\n\t\tExceptionSpecifier specifier() const;\n\n\t\tbool operator==(const PaCppException &rhs) const;\n\t\tbool operator!=(const PaCppException &rhs) const;\n\n\tprivate:\n\t\tExceptionSpecifier specifier_;\n\t};\n\n\n} // namespace portaudio\n\n// ---------------------------------------------------------------------------------------\n\n#endif // INCLUDED_PORTAUDIO_EXCEPTION_HXX\n\n"
  },
  {
    "path": "thirdparty/portaudio/bindings/cpp/include/portaudiocpp/HostApi.hxx",
    "content": "#ifndef INCLUDED_PORTAUDIO_HOSTAPI_HXX\n#define INCLUDED_PORTAUDIO_HOSTAPI_HXX\n\n// ---------------------------------------------------------------------------------------\n\n#include \"portaudio.h\"\n\n#include \"portaudiocpp/System.hxx\"\n\n// ---------------------------------------------------------------------------------------\n\n// Forward declaration(s):\nnamespace portaudio\n{\n\tclass Device;\n}\n\n// ---------------------------------------------------------------------------------------\n\n// Declaration(s):\nnamespace portaudio\n{\n\n\n\t//////\n\t/// @brief HostApi represents a host API (usually type of driver) in the System.\n\t///\n\t/// A single System can support multiple HostApi's each one typically having \n\t/// a set of Devices using that HostApi (usually driver type). All Devices in \n\t/// the HostApi can be enumerated and the default input/output Device for this \n\t/// HostApi can be retrieved.\n\t//////\n\tclass HostApi\n\t{\n\tpublic:\n\t\ttypedef System::DeviceIterator DeviceIterator;\n\n\t\t// query info: id, name, numDevices\n\t\tPaHostApiTypeId typeId() const;\n\t\tPaHostApiIndex index() const;\n\t\tconst char *name() const;\n\t\tint deviceCount() const;\n\n\t\t// iterate devices\n\t\tDeviceIterator devicesBegin();\n\t\tDeviceIterator devicesEnd();\n\n\t\t// default devices\n\t\tDevice &defaultInputDevice() const;\n\t\tDevice &defaultOutputDevice() const;\n\n\t\t// comparison operators\n\t\tbool operator==(const HostApi &rhs) const;\n\t\tbool operator!=(const HostApi &rhs) const;\n\n\tprivate:\n\t\tconst PaHostApiInfo *info_;\n\t\tDevice **devices_;\n\n\tprivate:\n\t\tfriend class System;\n\n\t\texplicit HostApi(PaHostApiIndex index);\n\t\t~HostApi();\n\n\t\tHostApi(const HostApi &); // non-copyable\n\t\tHostApi &operator=(const HostApi &); // non-copyable\n\t};\n\n\n}\n\n// ---------------------------------------------------------------------------------------\n\n#endif // INCLUDED_PORTAUDIO_HOSTAPI_HXX\n\n"
  },
  {
    "path": "thirdparty/portaudio/bindings/cpp/include/portaudiocpp/InterfaceCallbackStream.hxx",
    "content": "#ifndef INCLUDED_PORTAUDIO_INTERFACECALLBACKSTREAM_HXX\n#define INCLUDED_PORTAUDIO_INTERFACECALLBACKSTREAM_HXX\n\n// ---------------------------------------------------------------------------------------\n\n#include \"portaudio.h\"\n\n#include \"portaudiocpp/CallbackStream.hxx\"\n\n// ---------------------------------------------------------------------------------------\n\n// Forward declaration(s)\nnamespace portaudio\n{\n\tclass StreamParameters;\n\tclass CallbackInterface;\n}\n\n// ---------------------------------------------------------------------------------------\n\n// Declaration(s):\nnamespace portaudio\n{\n\n\n\t//////\n\t/// @brief Callback stream using an instance of an object that's derived from the CallbackInterface \n\t/// interface.\n\t//////\n\tclass InterfaceCallbackStream : public CallbackStream\n\t{\n\tpublic:\n\t\tInterfaceCallbackStream();\n\t\tInterfaceCallbackStream(const StreamParameters &parameters, CallbackInterface &instance);\n\t\t~InterfaceCallbackStream();\n\t\t\n\t\tvoid open(const StreamParameters &parameters, CallbackInterface &instance);\n\n\tprivate:\n\t\tInterfaceCallbackStream(const InterfaceCallbackStream &); // non-copyable\n\t\tInterfaceCallbackStream &operator=(const InterfaceCallbackStream &); // non-copyable\n\t};\n\n\n} // portaudio\n\n// ---------------------------------------------------------------------------------------\n\n#endif // INCLUDED_PORTAUDIO_INTERFACECALLBACKSTREAM_HXX\n"
  },
  {
    "path": "thirdparty/portaudio/bindings/cpp/include/portaudiocpp/MemFunCallbackStream.hxx",
    "content": "#ifndef INCLUDED_PORTAUDIO_MEMFUNCALLBACKSTREAM_HXX\n#define INCLUDED_PORTAUDIO_MEMFUNCALLBACKSTREAM_HXX\n\n// ---------------------------------------------------------------------------------------\n\n#include \"portaudio.h\"\n\n#include \"portaudiocpp/CallbackStream.hxx\"\n#include \"portaudiocpp/CallbackInterface.hxx\"\n#include \"portaudiocpp/StreamParameters.hxx\"\n#include \"portaudiocpp/Exception.hxx\"\n#include \"portaudiocpp/InterfaceCallbackStream.hxx\"\n\n// ---------------------------------------------------------------------------------------\n\nnamespace portaudio\n{\n\n\n\t//////\n\t/// @brief Callback stream using a class's member function as a callback. Template argument T is the type of the \n\t/// class of which a member function is going to be used.\n\t///\n\t/// Example usage:\n\t/// @verbatim MemFunCallback<MyClass> stream = MemFunCallbackStream(parameters, *this, &MyClass::myCallbackFunction); @endverbatim\n\t//////\n\ttemplate<typename T>\n\tclass MemFunCallbackStream : public CallbackStream\n\t{\n\tpublic:\n\t\ttypedef int (T::*CallbackFunPtr)(const void *, void *, unsigned long, const PaStreamCallbackTimeInfo *, \n\t\t\tPaStreamCallbackFlags);\n\n\t\t// -------------------------------------------------------------------------------\n\n\t\tMemFunCallbackStream()\n\t\t{\n\t\t}\n\n\t\tMemFunCallbackStream(const StreamParameters &parameters, T &instance, CallbackFunPtr memFun) : adapter_(instance, memFun)\n\t\t{\n\t\t\topen(parameters);\n\t\t}\n\n\t\t~MemFunCallbackStream()\n\t\t{\n\t\t\tclose();\n\t\t}\n\n\t\tvoid open(const StreamParameters &parameters, T &instance, CallbackFunPtr memFun)\n\t\t{\n\t\t\t// XXX:\tneed to check if already open?\n\n\t\t\tadapter_.init(instance, memFun);\n\t\t\topen(parameters);\n\t\t}\n\n\tprivate:\n\t\tMemFunCallbackStream(const MemFunCallbackStream &); // non-copyable\n\t\tMemFunCallbackStream &operator=(const MemFunCallbackStream &); // non-copyable\n\n\t\t//////\n\t\t/// @brief Inner class which adapts a member function callback to a CallbackInterface compliant \n\t\t/// class (so it can be adapted using the paCallbackAdapter function).\n\t\t//////\n\t\tclass MemFunToCallbackInterfaceAdapter : public CallbackInterface\n\t\t{\n\t\tpublic:\n\t\t\tMemFunToCallbackInterfaceAdapter() {}\n\t\t\tMemFunToCallbackInterfaceAdapter(T &instance, CallbackFunPtr memFun) : instance_(&instance), memFun_(memFun) {}\n\n\t\t\tvoid init(T &instance, CallbackFunPtr memFun)\n\t\t\t{\n\t\t\t\tinstance_ = &instance;\n\t\t\t\tmemFun_ = memFun;\n\t\t\t}\n\n\t\t\tint paCallbackFun(const void *inputBuffer, void *outputBuffer, unsigned long numFrames, \n\t\t\t\tconst PaStreamCallbackTimeInfo *timeInfo, PaStreamCallbackFlags statusFlags)\n\t\t\t{\n\t\t\t\treturn (instance_->*memFun_)(inputBuffer, outputBuffer, numFrames, timeInfo, statusFlags);\n\t\t\t}\n\n\t\tprivate:\n\t\t\tT *instance_;\n\t\t\tCallbackFunPtr memFun_;\n\t\t};\n\n\t\tMemFunToCallbackInterfaceAdapter adapter_;\n\n\t\tvoid open(const StreamParameters &parameters)\n\t\t{\n\t\t\tPaError err = Pa_OpenStream(&stream_, parameters.inputParameters().paStreamParameters(), parameters.outputParameters().paStreamParameters(), \n\t\t\t\tparameters.sampleRate(), parameters.framesPerBuffer(), parameters.flags(), &impl::callbackInterfaceToPaCallbackAdapter, \n\t\t\t\tstatic_cast<void *>(&adapter_));\n\n\t\t\tif (err != paNoError)\n\t\t\t\tthrow PaException(err);\n\t\t}\n\t};\n\n\n} // portaudio\n\n// ---------------------------------------------------------------------------------------\n\n#endif // INCLUDED_PORTAUDIO_MEMFUNCALLBACKSTREAM_HXX\n"
  },
  {
    "path": "thirdparty/portaudio/bindings/cpp/include/portaudiocpp/PortAudioCpp.hxx",
    "content": "#ifndef INCLUDED_PORTAUDIO_PORTAUDIOCPP_HXX\n#define INCLUDED_PORTAUDIO_PORTAUDIOCPP_HXX\n\n// ---------------------------------------------------------------------------------------\n\n//////\n/// @mainpage PortAudioCpp\n///\n///\t<h1>PortAudioCpp - A Native C++ Binding of PortAudio V19</h1>\n/// <h2>PortAudio</h2>\n/// <p>\n///   PortAudio is a portable and mature C API for accessing audio hardware. It offers both callback-based and blocking \n///   style input and output, deals with sample data format conversions, dithering and much more. There are a large number \n///   of implementations available for various platforms including Windows MME, Windows DirectX, Windows and MacOS (Classic) \n///   ASIO, MacOS Classic SoundManager, MacOS X CoreAudio, OSS (Linux), Linux ALSA, JACK (MacOS X and Linux) and SGI Irix \n///   AL. Note that, currently not all of these implementations are equally complete or up-to-date (as PortAudio V19 is \n///   still in development). Because PortAudio has a C API, it can easily be called from a variety of other programming \n///   languages.\n/// </p>\n/// <h2>PortAudioCpp</h2>\n/// <p>\n///   Although, it is possible to use PortAudio's C API from within a C++ program, this is usually a little awkward \n///   as procedural and object-oriented paradigms need to be mixed. PortAudioCpp aims to resolve this by encapsulating \n///   PortAudio's C API to form an equivalent object-oriented C++ API. It provides a more natural integration of PortAudio \n///   into C++ programs as well as a more structured interface. PortAudio's concepts were preserved as much as possible and \n///   no additional features were added except for some `convenience methods'.\n/// </p>\n/// <p>\n///   PortAudioCpp's main features are:\n///   <ul>\n///     <li>Structured object model.</li>\n///     <li>C++ exception handling instead of C-style error return codes.</li>\n///     <li>Handling of callbacks using free functions (C and C++), static functions, member functions or instances of classes \n///     derived from a given interface.</li>\n///     <li>STL compliant iterators to host APIs and devices.</li>\n///     <li>Some additional convenience functions to more easily set up and use PortAudio.</li>\n///   </ul>\n/// </p>\n/// <p>\n///   PortAudioCpp requires a recent version of the PortAudio V19 source code. This can be obtained from CVS or as a snapshot \n///   from the website. The examples also require the ASIO 2 SDK which can be obtained from the Steinberg website. Alternatively, the \n///   examples can easily be modified to compile without needing ASIO.\n/// </p>\n/// <p>\n///   Supported platforms:\n///   <ul>\n///     <li>Microsoft Visual C++ 6.0, 7.0 (.NET 2002) and 7.1 (.NET 2003).</li>\n///     <li>GNU G++ 2.95 and G++ 3.3.</li>\n///   </ul>\n///   Other platforms should be easily supported as PortAudioCpp is platform-independent and (reasonably) C++ standard compliant.\n/// </p>\n/// <p>\n///   This documentation mainly provides information specific to PortAudioCpp. For a more complete explanation of all of the \n///   concepts used, please consult the PortAudio documentation.\n/// </p>\n/// <p>\n///   PortAudioCpp was developed by Merlijn Blaauw with many great suggestions and help from Ross Bencina. Ludwig Schwardt provided \n///   GNU/Linux build files and checked G++ compatibility. PortAudioCpp may be used under the same licensing, conditions and \n///   warranty as PortAudio. See <a href=\"http://www.portaudio.com/license.html\">the PortAudio license</a> for more details.\n/// </p>\n/// <h2>Links</h2>\n/// <p>\n///   <a href=\"http://www.portaudio.com/\">Official PortAudio site.</a><br>\n/// </p>\n//////\n\n// ---------------------------------------------------------------------------------------\n\n//////\n/// @namespace portaudio\n///\n/// To avoid name collision, everything in PortAudioCpp is in the portaudio \n/// namespace. If this name is too long it's usually pretty safe to use an \n/// alias like ``namespace pa = portaudio;''.\n//////\n\n// ---------------------------------------------------------------------------------------\n\n//////\n/// @file PortAudioCpp.hxx\n/// An include-all header file (for lazy programmers and using pre-compiled headers).\n//////\n\n// ---------------------------------------------------------------------------------------\n\n#include \"portaudio.h\"\n\n#include \"portaudiocpp/AutoSystem.hxx\"\n#include \"portaudiocpp/BlockingStream.hxx\"\n#include \"portaudiocpp/CallbackInterface.hxx\"\n#include \"portaudiocpp/CallbackStream.hxx\"\n#include \"portaudiocpp/CFunCallbackStream.hxx\"\n#include \"portaudiocpp/CppFunCallbackStream.hxx\"\n#include \"portaudiocpp/Device.hxx\"\n#include \"portaudiocpp/Exception.hxx\"\n#include \"portaudiocpp/HostApi.hxx\"\n#include \"portaudiocpp/InterfaceCallbackStream.hxx\"\n#include \"portaudiocpp/MemFunCallbackStream.hxx\"\n#include \"portaudiocpp/SampleDataFormat.hxx\"\n#include \"portaudiocpp/DirectionSpecificStreamParameters.hxx\"\n#include \"portaudiocpp/Stream.hxx\"\n#include \"portaudiocpp/StreamParameters.hxx\"\n#include \"portaudiocpp/System.hxx\"\n#include \"portaudiocpp/SystemDeviceIterator.hxx\"\n#include \"portaudiocpp/SystemHostApiIterator.hxx\"\n\n// ---------------------------------------------------------------------------------------\n\n#endif // INCLUDED_PORTAUDIO_PORTAUDIOCPP_HXX\n"
  },
  {
    "path": "thirdparty/portaudio/bindings/cpp/include/portaudiocpp/SampleDataFormat.hxx",
    "content": "#ifndef INCLUDED_PORTAUDIO_SAMPLEDATAFORMAT_HXX\n#define INCLUDED_PORTAUDIO_SAMPLEDATAFORMAT_HXX\n\n// ---------------------------------------------------------------------------------------\n\n#include \"portaudio.h\"\n\n// ---------------------------------------------------------------------------------------\n\nnamespace portaudio\n{\n\n\n\t//////\n\t/// @brief PortAudio sample data formats.\n\t///\n\t/// Small helper enum to wrap the PortAudio defines.\n\t//////\n\tenum SampleDataFormat\n\t{\n\t\tINVALID_FORMAT\t= 0,\n\t\tFLOAT32\t\t\t= paFloat32,\n\t\tINT32\t\t\t= paInt32,\n\t\tINT24\t\t\t= paInt24,\n\t\tINT16\t\t\t= paInt16,\n\t\tINT8\t\t\t= paInt8,\n\t\tUINT8\t\t\t= paUInt8\n\t};\n\n\n} // namespace portaudio\n\n// ---------------------------------------------------------------------------------------\n\n#endif // INCLUDED_PORTAUDIO_SAMPLEDATAFORMAT_HXX\n"
  },
  {
    "path": "thirdparty/portaudio/bindings/cpp/include/portaudiocpp/Stream.hxx",
    "content": "#ifndef INCLUDED_PORTAUDIO_STREAM_HXX\n#define INCLUDED_PORTAUDIO_STREAM_HXX\n\n#include \"portaudio.h\"\n\n// ---------------------------------------------------------------------------------------\n\n// Forward declaration(s):\nnamespace portaudio\n{\n\tclass StreamParameters;\n}\n\n// ---------------------------------------------------------------------------------------\n\n// Declaration(s):\nnamespace portaudio\n{\n\n\n\t//////\n\t/// @brief A Stream represents an active or inactive input and/or output data \n\t/// stream in the System.\n\t/// \n\t/// Concrete Stream classes should ensure themselves being in a closed state at \n\t/// destruction (i.e. by calling their own close() method in their deconstructor). \n\t/// Following good C++ programming practices, care must be taken to ensure no \n\t/// exceptions are thrown by the deconstructor of these classes. As a consequence, \n\t/// clients need to explicitly call close() to ensure the stream closed successfully.\n\t///\n\t/// The Stream object can be used to manipulate the Stream's state. Also, time-constant \n\t/// and time-varying information about the Stream can be retrieved.\n\t//////\n\tclass Stream\n\t{\n\tpublic:\n\t\t// Opening/closing:\n\t\tvirtual ~Stream();\n\n\t\tvirtual void close();\n\t\tbool isOpen() const;\n\n\t\t// Additional set up:\n\t\tvoid setStreamFinishedCallback(PaStreamFinishedCallback *callback);\n\n\t\t// State management:\n\t\tvoid start();\n\t\tvoid stop();\n\t\tvoid abort();\n\n\t\tbool isStopped() const;\n\t\tbool isActive() const;\n\n\t\t// Stream info (time-constant, but might become time-variant soon):\n\t\tPaTime inputLatency() const;\n\t\tPaTime outputLatency() const;\n\t\tdouble sampleRate() const;\n\n\t\t// Stream info (time-varying):\n\t\tPaTime time() const;\n\n\t\t// Accessors for PortAudio PaStream, useful for interfacing \n\t\t// with PortAudio add-ons (such as PortMixer) for instance:\n\t\tconst PaStream *paStream() const;\n\t\tPaStream *paStream();\n\n\tprotected:\n\t\tStream(); // abstract class\n\n\t\tPaStream *stream_;\n\n\tprivate:\n\t\tStream(const Stream &); // non-copyable\n\t\tStream &operator=(const Stream &); // non-copyable\n\t};\n\n\n} // namespace portaudio\n\n\n#endif // INCLUDED_PORTAUDIO_STREAM_HXX\n\n"
  },
  {
    "path": "thirdparty/portaudio/bindings/cpp/include/portaudiocpp/StreamParameters.hxx",
    "content": "#ifndef INCLUDED_PORTAUDIO_STREAMPARAMETERS_HXX\n#define INCLUDED_PORTAUDIO_STREAMPARAMETERS_HXX\n\n// ---------------------------------------------------------------------------------------\n\n#include \"portaudio.h\"\n\n#include \"portaudiocpp/DirectionSpecificStreamParameters.hxx\"\n\n// ---------------------------------------------------------------------------------------\n\n// Declaration(s):\nnamespace portaudio\n{\n\n\t//////\n\t/// @brief The entire set of parameters needed to configure and open \n\t/// a Stream.\n\t///\n\t/// It contains parameters of input, output and shared parameters. \n\t/// Using the isSupported() method, the StreamParameters can be \n\t/// checked if opening a Stream using this StreamParameters would \n\t/// succeed or not. Accessors are provided to higher-level parameters \n\t/// aswell as the lower-level parameters which are mainly intended for \n\t/// internal use.\n\t//////\n\tclass StreamParameters\n\t{\n\tpublic:\n\t\tStreamParameters();\n\t\tStreamParameters(const DirectionSpecificStreamParameters &inputParameters, \n\t\t\tconst DirectionSpecificStreamParameters &outputParameters, double sampleRate, \n\t\t\tunsigned long framesPerBuffer, PaStreamFlags flags);\n\n\t\t// Set up for direction-specific:\n\t\tvoid setInputParameters(const DirectionSpecificStreamParameters &parameters);\n\t\tvoid setOutputParameters(const DirectionSpecificStreamParameters &parameters);\n\n\t\t// Set up for common parameters:\n\t\tvoid setSampleRate(double sampleRate);\n\t\tvoid setFramesPerBuffer(unsigned long framesPerBuffer);\n\t\tvoid setFlag(PaStreamFlags flag);\n\t\tvoid unsetFlag(PaStreamFlags flag);\n\t\tvoid clearFlags();\n\n\t\t// Validation:\n\t\tbool isSupported() const;\n\n\t\t// Accessors (direction-specific):\n\t\tDirectionSpecificStreamParameters &inputParameters();\n\t\tconst DirectionSpecificStreamParameters &inputParameters() const;\n\t\tDirectionSpecificStreamParameters &outputParameters();\n\t\tconst DirectionSpecificStreamParameters &outputParameters() const;\n\n\t\t// Accessors (common):\n\t\tdouble sampleRate() const;\n\t\tunsigned long framesPerBuffer() const;\n\t\tPaStreamFlags flags() const;\n\t\tbool isFlagSet(PaStreamFlags flag) const;\n\n\tprivate:\n\t\t// Half-duplex specific parameters:\n\t\tDirectionSpecificStreamParameters inputParameters_;\n\t\tDirectionSpecificStreamParameters outputParameters_;\n\n\t\t// Common parameters:\n\t\tdouble sampleRate_;\n\t\tunsigned long framesPerBuffer_;\n\t\tPaStreamFlags flags_;\n\t};\n\n\n} // namespace portaudio\n\n// ---------------------------------------------------------------------------------------\n\n#endif // INCLUDED_PORTAUDIO_STREAMPARAMETERS_HXX\n"
  },
  {
    "path": "thirdparty/portaudio/bindings/cpp/include/portaudiocpp/System.hxx",
    "content": "#ifndef INCLUDED_PORTAUDIO_SYSTEM_HXX\n#define INCLUDED_PORTAUDIO_SYSTEM_HXX\n\n// ---------------------------------------------------------------------------------------\n\n#include \"portaudio.h\"\n\n// ---------------------------------------------------------------------------------------\n\n// Forward declaration(s):\nnamespace portaudio\n{\n\tclass Device;\n\tclass Stream;\n\tclass HostApi;\n}\n\n// ---------------------------------------------------------------------------------------\n\n// Declaration(s):\nnamespace portaudio\n{\n\n\n\t//////\n\t/// @brief System singleton which represents the PortAudio system.\n\t///\n\t/// The System is used to initialize/terminate PortAudio and provide \n\t/// a single access point to the PortAudio System (instance()).\n\t/// It can be used to iterate through all HostApi 's in the System as \n\t/// well as all devices in the System. It also provides some utility \n\t/// functionality of PortAudio.\n\t///\n\t/// Terminating the System will also abort and close the open streams. \n\t/// The Stream objects will need to be deallocated by the client though \n\t/// (it's usually a good idea to have them cleaned up automatically).\n\t//////\n\tclass System\n\t{\n\tpublic:\n\t\tclass HostApiIterator; // forward declaration\n\t\tclass DeviceIterator; // forward declaration\n\n\t\t// -------------------------------------------------------------------------------\n\n\t\tstatic int version();\n\t\tstatic const char *versionText();\n\n\t\tstatic void initialize();\n\t\tstatic void terminate();\n\n\t\tstatic System &instance();\n\t\tstatic bool exists();\n\n\t\t// -------------------------------------------------------------------------------\n\n\t\t// host apis:\n\t\tHostApiIterator hostApisBegin();\n\t\tHostApiIterator hostApisEnd();\n\n\t\tHostApi &defaultHostApi();\n\n\t\tHostApi &hostApiByTypeId(PaHostApiTypeId type);\n\t\tHostApi &hostApiByIndex(PaHostApiIndex index);\n\n\t\tint hostApiCount();\n\n\t\t// -------------------------------------------------------------------------------\n\n\t\t// devices:\n\t\tDeviceIterator devicesBegin();\n\t\tDeviceIterator devicesEnd();\n\n\t\tDevice &defaultInputDevice();\n\t\tDevice &defaultOutputDevice();\n\n\t\tDevice &deviceByIndex(PaDeviceIndex index);\n\n\t\tint deviceCount();\n\n\t\tstatic Device &nullDevice();\n\n\t\t// -------------------------------------------------------------------------------\n\n\t\t// misc:\n\t\tvoid sleep(long msec);\n\t\tint sizeOfSample(PaSampleFormat format);\n\n\tprivate:\n\t\tSystem();\n\t\t~System();\n\n\t\tstatic System *instance_;\n\t\tstatic int initCount_;\n\n\t\tstatic HostApi **hostApis_;\n\t\tstatic Device **devices_;\n\n\t\tstatic Device *nullDevice_;\n\t};\n\n\n} // namespace portaudio\n\n\n#endif // INCLUDED_PORTAUDIO_SYSTEM_HXX\n\n"
  },
  {
    "path": "thirdparty/portaudio/bindings/cpp/include/portaudiocpp/SystemDeviceIterator.hxx",
    "content": "#ifndef INCLUDED_PORTAUDIO_SYSTEMDEVICEITERATOR_HXX\n#define INCLUDED_PORTAUDIO_SYSTEMDEVICEITERATOR_HXX\n\n// ---------------------------------------------------------------------------------------\n\n#include <iterator>\n#include <cstddef>\n\n#include \"portaudiocpp/System.hxx\"\n\n// ---------------------------------------------------------------------------------------\n\n// Forward declaration(s):\nnamespace portaudio\n{\n\tclass Device;\n\tclass HostApi;\n}\n\n// ---------------------------------------------------------------------------------------\n\n// Declaration(s):\nnamespace portaudio\n{\n\n\t\n\t//////\n\t/// @brief Iterator class for iterating through all Devices in a System.\n\t///\n\t/// Devices will be iterated by iterating all Devices in each \n\t/// HostApi in the System. Compliant with the STL bidirectional \n\t/// iterator concept.\n\t//////\n\tclass System::DeviceIterator\n\t{\n\tpublic:\n\t\ttypedef std::bidirectional_iterator_tag iterator_category;\n\t\ttypedef Device value_type;\n\t\ttypedef ptrdiff_t difference_type;\n\t\ttypedef Device * pointer;\n\t\ttypedef Device & reference;\n\n\t\tDevice &operator*() const;\n\t\tDevice *operator->() const;\n\n\t\tDeviceIterator &operator++();\n\t\tDeviceIterator operator++(int);\n\t\tDeviceIterator &operator--();\n\t\tDeviceIterator operator--(int);\n\n\t\tbool operator==(const DeviceIterator &rhs) const;\n\t\tbool operator!=(const DeviceIterator &rhs) const;\n\n\tprivate:\n\t\tfriend class System;\n\t\tfriend class HostApi;\n\t\tDevice **ptr_;\n\t};\n\n\n} // namespace portaudio\n\n// ---------------------------------------------------------------------------------------\n\n#endif // INCLUDED_PORTAUDIO_SYSTEMDEVICEITERATOR_HXX\n\n"
  },
  {
    "path": "thirdparty/portaudio/bindings/cpp/include/portaudiocpp/SystemHostApiIterator.hxx",
    "content": "#ifndef INCLUDED_PORTAUDIO_SYSTEMHOSTAPIITERATOR_HXX\n#define INCLUDED_PORTAUDIO_SYSTEMHOSTAPIITERATOR_HXX\n\n// ---------------------------------------------------------------------------------------\n\n#include <iterator>\n#include <cstddef>\n\n#include \"portaudiocpp/System.hxx\"\n\n// ---------------------------------------------------------------------------------------\n\n// Forward declaration(s):\nnamespace portaudio\n{\n\tclass HostApi;\n}\n\n// ---------------------------------------------------------------------------------------\n\n// Declaration(s):\nnamespace portaudio\n{\n\n\n\t//////\n\t/// @brief Iterator class for iterating through all HostApis in a System.\n\t///\n\t/// Compliant with the STL bidirectional iterator concept.\n\t//////\n\tclass System::HostApiIterator\n\t{\n\tpublic:\n\t\ttypedef std::bidirectional_iterator_tag iterator_category;\n\t\ttypedef Device value_type;\n\t\ttypedef ptrdiff_t difference_type;\n\t\ttypedef HostApi * pointer;\n\t\ttypedef HostApi & reference;\n\n\t\tHostApi &operator*() const;\n\t\tHostApi *operator->() const;\n\n\t\tHostApiIterator &operator++();\n\t\tHostApiIterator operator++(int);\n\t\tHostApiIterator &operator--();\n\t\tHostApiIterator operator--(int);\n\n\t\tbool operator==(const HostApiIterator &rhs) const;\n\t\tbool operator!=(const HostApiIterator &rhs) const;\n\n\tprivate:\n\t\tfriend class System;\n\t\tHostApi **ptr_;\n\t};\n\n\n} // namespace portaudio\n\n// ---------------------------------------------------------------------------------------\n\n#endif // INCLUDED_PORTAUDIO_SYSTEMHOSTAPIITERATOR_HXX\n"
  },
  {
    "path": "thirdparty/portaudio/bindings/cpp/lib/Makefile.am",
    "content": "SRCDIR = $(top_srcdir)/source/portaudiocpp\n\nlib_LTLIBRARIES = libportaudiocpp.la\n\nLDADD = libportaudiocpp.la\n\nlibportaudiocpp_la_LDFLAGS = -version-info $(LT_VERSION_INFO) -no-undefined\n\nlibportaudiocpp_la_LIBADD = $(top_builddir)/$(PORTAUDIO_ROOT)/lib/libportaudio.la\nlibportaudiocpp_la_SOURCES = \\\n       $(SRCDIR)/BlockingStream.cxx \\\n       $(SRCDIR)/CallbackInterface.cxx \\\n       $(SRCDIR)/CallbackStream.cxx \\\n       $(SRCDIR)/CFunCallbackStream.cxx \\\n       $(SRCDIR)/CppFunCallbackStream.cxx \\\n       $(SRCDIR)/Device.cxx \\\n       $(SRCDIR)/DirectionSpecificStreamParameters.cxx \\\n       $(SRCDIR)/Exception.cxx \\\n       $(SRCDIR)/HostApi.cxx \\\n       $(SRCDIR)/InterfaceCallbackStream.cxx \\\n       $(SRCDIR)/MemFunCallbackStream.cxx \\\n       $(SRCDIR)/Stream.cxx \\\n       $(SRCDIR)/StreamParameters.cxx \\\n       $(SRCDIR)/System.cxx \\\n       $(SRCDIR)/SystemDeviceIterator.cxx \\\n       $(SRCDIR)/SystemHostApiIterator.cxx\n"
  },
  {
    "path": "thirdparty/portaudio/bindings/cpp/lib/Makefile.in",
    "content": "# Makefile.in generated by automake 1.14.1 from Makefile.am.\n# @configure_input@\n\n# Copyright (C) 1994-2013 Free Software Foundation, Inc.\n\n# This Makefile.in is free software; the Free Software Foundation\n# gives unlimited permission to copy and/or distribute it,\n# with or without modifications, as long as this notice is preserved.\n\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY, to the extent permitted by law; without\n# even the implied warranty of MERCHANTABILITY or FITNESS FOR A\n# PARTICULAR PURPOSE.\n\n@SET_MAKE@\n\nVPATH = @srcdir@\nam__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'\nam__make_running_with_option = \\\n  case $${target_option-} in \\\n      ?) ;; \\\n      *) echo \"am__make_running_with_option: internal error: invalid\" \\\n              \"target option '$${target_option-}' specified\" >&2; \\\n         exit 1;; \\\n  esac; \\\n  has_opt=no; \\\n  sane_makeflags=$$MAKEFLAGS; \\\n  if $(am__is_gnu_make); then \\\n    sane_makeflags=$$MFLAGS; \\\n  else \\\n    case $$MAKEFLAGS in \\\n      *\\\\[\\ \\\t]*) \\\n        bs=\\\\; \\\n        sane_makeflags=`printf '%s\\n' \"$$MAKEFLAGS\" \\\n          | sed \"s/$$bs$$bs[$$bs $$bs\t]*//g\"`;; \\\n    esac; \\\n  fi; \\\n  skip_next=no; \\\n  strip_trailopt () \\\n  { \\\n    flg=`printf '%s\\n' \"$$flg\" | sed \"s/$$1.*$$//\"`; \\\n  }; \\\n  for flg in $$sane_makeflags; do \\\n    test $$skip_next = yes && { skip_next=no; continue; }; \\\n    case $$flg in \\\n      *=*|--*) continue;; \\\n        -*I) strip_trailopt 'I'; skip_next=yes;; \\\n      -*I?*) strip_trailopt 'I';; \\\n        -*O) strip_trailopt 'O'; skip_next=yes;; \\\n      -*O?*) strip_trailopt 'O';; \\\n        -*l) strip_trailopt 'l'; skip_next=yes;; \\\n      -*l?*) strip_trailopt 'l';; \\\n      -[dEDm]) skip_next=yes;; \\\n      -[JT]) skip_next=yes;; \\\n    esac; \\\n    case $$flg in \\\n      *$$target_option*) has_opt=yes; break;; \\\n    esac; \\\n  done; \\\n  test $$has_opt = yes\nam__make_dryrun = (target_option=n; $(am__make_running_with_option))\nam__make_keepgoing = (target_option=k; $(am__make_running_with_option))\npkgdatadir = $(datadir)/@PACKAGE@\npkgincludedir = $(includedir)/@PACKAGE@\npkglibdir = $(libdir)/@PACKAGE@\npkglibexecdir = $(libexecdir)/@PACKAGE@\nam__cd = CDPATH=\"$${ZSH_VERSION+.}$(PATH_SEPARATOR)\" && cd\ninstall_sh_DATA = $(install_sh) -c -m 644\ninstall_sh_PROGRAM = $(install_sh) -c\ninstall_sh_SCRIPT = $(install_sh) -c\nINSTALL_HEADER = $(INSTALL_DATA)\ntransform = $(program_transform_name)\nNORMAL_INSTALL = :\nPRE_INSTALL = :\nPOST_INSTALL = :\nNORMAL_UNINSTALL = :\nPRE_UNINSTALL = :\nPOST_UNINSTALL = :\nbuild_triplet = @build@\nhost_triplet = @host@\nsubdir = lib\nDIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \\\n\t$(top_srcdir)/../../depcomp\nACLOCAL_M4 = $(top_srcdir)/aclocal.m4\nam__aclocal_m4_deps = $(top_srcdir)/configure.ac\nam__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \\\n\t$(ACLOCAL_M4)\nmkinstalldirs = $(install_sh) -d\nCONFIG_CLEAN_FILES =\nCONFIG_CLEAN_VPATH_FILES =\nam__vpath_adj_setup = srcdirstrip=`echo \"$(srcdir)\" | sed 's|.|.|g'`;\nam__vpath_adj = case $$p in \\\n    $(srcdir)/*) f=`echo \"$$p\" | sed \"s|^$$srcdirstrip/||\"`;; \\\n    *) f=$$p;; \\\n  esac;\nam__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;\nam__install_max = 40\nam__nobase_strip_setup = \\\n  srcdirstrip=`echo \"$(srcdir)\" | sed 's/[].[^$$\\\\*|]/\\\\\\\\&/g'`\nam__nobase_strip = \\\n  for p in $$list; do echo \"$$p\"; done | sed -e \"s|$$srcdirstrip/||\"\nam__nobase_list = $(am__nobase_strip_setup); \\\n  for p in $$list; do echo \"$$p $$p\"; done | \\\n  sed \"s| $$srcdirstrip/| |;\"' / .*\\//!s/ .*/ ./; s,\\( .*\\)/[^/]*$$,\\1,' | \\\n  $(AWK) 'BEGIN { files[\".\"] = \"\" } { files[$$2] = files[$$2] \" \" $$1; \\\n    if (++n[$$2] == $(am__install_max)) \\\n      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = \"\" } } \\\n    END { for (dir in files) print dir, files[dir] }'\nam__base_list = \\\n  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\\n/ /g' | \\\n  sed '$$!N;$$!N;$$!N;$$!N;s/\\n/ /g'\nam__uninstall_files_from_dir = { \\\n  test -z \"$$files\" \\\n    || { test ! -d \"$$dir\" && test ! -f \"$$dir\" && test ! -r \"$$dir\"; } \\\n    || { echo \" ( cd '$$dir' && rm -f\" $$files \")\"; \\\n         $(am__cd) \"$$dir\" && rm -f $$files; }; \\\n  }\nam__installdirs = \"$(DESTDIR)$(libdir)\"\nLTLIBRARIES = $(lib_LTLIBRARIES)\nlibportaudiocpp_la_DEPENDENCIES =  \\\n\t$(top_builddir)/$(PORTAUDIO_ROOT)/lib/libportaudio.la\nam_libportaudiocpp_la_OBJECTS = BlockingStream.lo CallbackInterface.lo \\\n\tCallbackStream.lo CFunCallbackStream.lo \\\n\tCppFunCallbackStream.lo Device.lo \\\n\tDirectionSpecificStreamParameters.lo Exception.lo HostApi.lo \\\n\tInterfaceCallbackStream.lo MemFunCallbackStream.lo Stream.lo \\\n\tStreamParameters.lo System.lo SystemDeviceIterator.lo \\\n\tSystemHostApiIterator.lo\nlibportaudiocpp_la_OBJECTS = $(am_libportaudiocpp_la_OBJECTS)\nAM_V_lt = $(am__v_lt_@AM_V@)\nam__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)\nam__v_lt_0 = --silent\nam__v_lt_1 = \nlibportaudiocpp_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \\\n\t$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \\\n\t$(AM_CXXFLAGS) $(CXXFLAGS) $(libportaudiocpp_la_LDFLAGS) \\\n\t$(LDFLAGS) -o $@\nAM_V_P = $(am__v_P_@AM_V@)\nam__v_P_ = $(am__v_P_@AM_DEFAULT_V@)\nam__v_P_0 = false\nam__v_P_1 = :\nAM_V_GEN = $(am__v_GEN_@AM_V@)\nam__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)\nam__v_GEN_0 = @echo \"  GEN     \" $@;\nam__v_GEN_1 = \nAM_V_at = $(am__v_at_@AM_V@)\nam__v_at_ = $(am__v_at_@AM_DEFAULT_V@)\nam__v_at_0 = @\nam__v_at_1 = \ndepcomp = $(SHELL) $(top_srcdir)/../../depcomp\nam__depfiles_maybe = depfiles\nam__mv = mv -f\nCXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \\\n\t$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)\nLTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \\\n\t$(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \\\n\t$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \\\n\t$(AM_CXXFLAGS) $(CXXFLAGS)\nAM_V_CXX = $(am__v_CXX_@AM_V@)\nam__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@)\nam__v_CXX_0 = @echo \"  CXX     \" $@;\nam__v_CXX_1 = \nCXXLD = $(CXX)\nCXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \\\n\t$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \\\n\t$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@\nAM_V_CXXLD = $(am__v_CXXLD_@AM_V@)\nam__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@)\nam__v_CXXLD_0 = @echo \"  CXXLD   \" $@;\nam__v_CXXLD_1 = \nSOURCES = $(libportaudiocpp_la_SOURCES)\nDIST_SOURCES = $(libportaudiocpp_la_SOURCES)\nam__can_run_installinfo = \\\n  case $$AM_UPDATE_INFO_DIR in \\\n    n|no|NO) false;; \\\n    *) (install-info --version) >/dev/null 2>&1;; \\\n  esac\nam__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)\n# Read a list of newline-separated strings from the standard input,\n# and print each of them once, without duplicates.  Input order is\n# *not* preserved.\nam__uniquify_input = $(AWK) '\\\n  BEGIN { nonempty = 0; } \\\n  { items[$$0] = 1; nonempty = 1; } \\\n  END { if (nonempty) { for (i in items) print i; }; } \\\n'\n# Make sure the list of sources is unique.  This is necessary because,\n# e.g., the same source file might be shared among _SOURCES variables\n# for different programs/libraries.\nam__define_uniq_tagged_files = \\\n  list='$(am__tagged_files)'; \\\n  unique=`for i in $$list; do \\\n    if test -f \"$$i\"; then echo $$i; else echo $(srcdir)/$$i; fi; \\\n  done | $(am__uniquify_input)`\nETAGS = etags\nCTAGS = ctags\nDISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)\nACLOCAL = @ACLOCAL@\nAMTAR = @AMTAR@\nAM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@\nAR = @AR@\nAS = @AS@\nAUTOCONF = @AUTOCONF@\nAUTOHEADER = @AUTOHEADER@\nAUTOMAKE = @AUTOMAKE@\nAWK = @AWK@\nCC = @CC@\nCCDEPMODE = @CCDEPMODE@\nCFLAGS = @CFLAGS@\nCPP = @CPP@\nCPPFLAGS = @CPPFLAGS@\nCXX = @CXX@\nCXXCPP = @CXXCPP@\nCXXDEPMODE = @CXXDEPMODE@\nCXXFLAGS = @CXXFLAGS@\nCYGPATH_W = @CYGPATH_W@\nDEFAULT_INCLUDES = @DEFAULT_INCLUDES@\nDEFS = @DEFS@\nDEPDIR = @DEPDIR@\nDLLTOOL = @DLLTOOL@\nDSYMUTIL = @DSYMUTIL@\nDUMPBIN = @DUMPBIN@\nECHO_C = @ECHO_C@\nECHO_N = @ECHO_N@\nECHO_T = @ECHO_T@\nEGREP = @EGREP@\nEXEEXT = @EXEEXT@\nFGREP = @FGREP@\nGREP = @GREP@\nINSTALL = @INSTALL@\nINSTALL_DATA = @INSTALL_DATA@\nINSTALL_PROGRAM = @INSTALL_PROGRAM@\nINSTALL_SCRIPT = @INSTALL_SCRIPT@\nINSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@\nLD = @LD@\nLDFLAGS = @LDFLAGS@\nLIBOBJS = @LIBOBJS@\nLIBS = @LIBS@\nLIBTOOL = @LIBTOOL@\nLIPO = @LIPO@\nLN_S = @LN_S@\nLTLIBOBJS = @LTLIBOBJS@\nLT_VERSION_INFO = @LT_VERSION_INFO@\nMAINT = @MAINT@\nMAKEINFO = @MAKEINFO@\nMANIFEST_TOOL = @MANIFEST_TOOL@\nMKDIR_P = @MKDIR_P@\nNM = @NM@\nNMEDIT = @NMEDIT@\nOBJDUMP = @OBJDUMP@\nOBJEXT = @OBJEXT@\nOTOOL = @OTOOL@\nOTOOL64 = @OTOOL64@\nPACKAGE = @PACKAGE@\nPACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@\nPACKAGE_NAME = @PACKAGE_NAME@\nPACKAGE_STRING = @PACKAGE_STRING@\nPACKAGE_TARNAME = @PACKAGE_TARNAME@\nPACKAGE_URL = @PACKAGE_URL@\nPACKAGE_VERSION = @PACKAGE_VERSION@\nPATH_SEPARATOR = @PATH_SEPARATOR@\nPORTAUDIO_ROOT = @PORTAUDIO_ROOT@\nRANLIB = @RANLIB@\nSED = @SED@\nSET_MAKE = @SET_MAKE@\nSHELL = @SHELL@\nSTRIP = @STRIP@\nVERSION = @VERSION@\nabs_builddir = @abs_builddir@\nabs_srcdir = @abs_srcdir@\nabs_top_builddir = @abs_top_builddir@\nabs_top_srcdir = @abs_top_srcdir@\nac_ct_AR = @ac_ct_AR@\nac_ct_CC = @ac_ct_CC@\nac_ct_CXX = @ac_ct_CXX@\nac_ct_DUMPBIN = @ac_ct_DUMPBIN@\nam__include = @am__include@\nam__leading_dot = @am__leading_dot@\nam__quote = @am__quote@\nam__tar = @am__tar@\nam__untar = @am__untar@\nbindir = @bindir@\nbuild = @build@\nbuild_alias = @build_alias@\nbuild_cpu = @build_cpu@\nbuild_os = @build_os@\nbuild_vendor = @build_vendor@\nbuilddir = @builddir@\ndatadir = @datadir@\ndatarootdir = @datarootdir@\ndocdir = @docdir@\ndvidir = @dvidir@\nexec_prefix = @exec_prefix@\nhost = @host@\nhost_alias = @host_alias@\nhost_cpu = @host_cpu@\nhost_os = @host_os@\nhost_vendor = @host_vendor@\nhtmldir = @htmldir@\nincludedir = @includedir@\ninfodir = @infodir@\ninstall_sh = @install_sh@\nlibdir = @libdir@\nlibexecdir = @libexecdir@\nlocaledir = @localedir@\nlocalstatedir = @localstatedir@\nmandir = @mandir@\nmkdir_p = @mkdir_p@\noldincludedir = @oldincludedir@\npdfdir = @pdfdir@\nprefix = @prefix@\nprogram_transform_name = @program_transform_name@\npsdir = @psdir@\nsbindir = @sbindir@\nsharedstatedir = @sharedstatedir@\nsrcdir = @srcdir@\nsysconfdir = @sysconfdir@\ntarget_alias = @target_alias@\ntop_build_prefix = @top_build_prefix@\ntop_builddir = @top_builddir@\ntop_srcdir = @top_srcdir@\nSRCDIR = $(top_srcdir)/source/portaudiocpp\nlib_LTLIBRARIES = libportaudiocpp.la\nLDADD = libportaudiocpp.la\nlibportaudiocpp_la_LDFLAGS = -version-info $(LT_VERSION_INFO) -no-undefined\nlibportaudiocpp_la_LIBADD = $(top_builddir)/$(PORTAUDIO_ROOT)/lib/libportaudio.la\nlibportaudiocpp_la_SOURCES = \\\n       $(SRCDIR)/BlockingStream.cxx \\\n       $(SRCDIR)/CallbackInterface.cxx \\\n       $(SRCDIR)/CallbackStream.cxx \\\n       $(SRCDIR)/CFunCallbackStream.cxx \\\n       $(SRCDIR)/CppFunCallbackStream.cxx \\\n       $(SRCDIR)/Device.cxx \\\n       $(SRCDIR)/DirectionSpecificStreamParameters.cxx \\\n       $(SRCDIR)/Exception.cxx \\\n       $(SRCDIR)/HostApi.cxx \\\n       $(SRCDIR)/InterfaceCallbackStream.cxx \\\n       $(SRCDIR)/MemFunCallbackStream.cxx \\\n       $(SRCDIR)/Stream.cxx \\\n       $(SRCDIR)/StreamParameters.cxx \\\n       $(SRCDIR)/System.cxx \\\n       $(SRCDIR)/SystemDeviceIterator.cxx \\\n       $(SRCDIR)/SystemHostApiIterator.cxx\n\nall: all-am\n\n.SUFFIXES:\n.SUFFIXES: .cxx .lo .o .obj\n$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)\n\t@for dep in $?; do \\\n\t  case '$(am__configure_deps)' in \\\n\t    *$$dep*) \\\n\t      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \\\n\t        && { if test -f $@; then exit 0; else break; fi; }; \\\n\t      exit 1;; \\\n\t  esac; \\\n\tdone; \\\n\techo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/Makefile'; \\\n\t$(am__cd) $(top_srcdir) && \\\n\t  $(AUTOMAKE) --gnu lib/Makefile\n.PRECIOUS: Makefile\nMakefile: $(srcdir)/Makefile.in $(top_builddir)/config.status\n\t@case '$?' in \\\n\t  *config.status*) \\\n\t    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \\\n\t  *) \\\n\t    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \\\n\t    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \\\n\tesac;\n\n$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)\n\tcd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh\n\n$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)\n\tcd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh\n$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)\n\tcd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh\n$(am__aclocal_m4_deps):\n\ninstall-libLTLIBRARIES: $(lib_LTLIBRARIES)\n\t@$(NORMAL_INSTALL)\n\t@list='$(lib_LTLIBRARIES)'; test -n \"$(libdir)\" || list=; \\\n\tlist2=; for p in $$list; do \\\n\t  if test -f $$p; then \\\n\t    list2=\"$$list2 $$p\"; \\\n\t  else :; fi; \\\n\tdone; \\\n\ttest -z \"$$list2\" || { \\\n\t  echo \" $(MKDIR_P) '$(DESTDIR)$(libdir)'\"; \\\n\t  $(MKDIR_P) \"$(DESTDIR)$(libdir)\" || exit 1; \\\n\t  echo \" $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'\"; \\\n\t  $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 \"$(DESTDIR)$(libdir)\"; \\\n\t}\n\nuninstall-libLTLIBRARIES:\n\t@$(NORMAL_UNINSTALL)\n\t@list='$(lib_LTLIBRARIES)'; test -n \"$(libdir)\" || list=; \\\n\tfor p in $$list; do \\\n\t  $(am__strip_dir) \\\n\t  echo \" $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'\"; \\\n\t  $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f \"$(DESTDIR)$(libdir)/$$f\"; \\\n\tdone\n\nclean-libLTLIBRARIES:\n\t-test -z \"$(lib_LTLIBRARIES)\" || rm -f $(lib_LTLIBRARIES)\n\t@list='$(lib_LTLIBRARIES)'; \\\n\tlocs=`for p in $$list; do echo $$p; done | \\\n\t      sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \\\n\t      sort -u`; \\\n\ttest -z \"$$locs\" || { \\\n\t  echo rm -f $${locs}; \\\n\t  rm -f $${locs}; \\\n\t}\n\nlibportaudiocpp.la: $(libportaudiocpp_la_OBJECTS) $(libportaudiocpp_la_DEPENDENCIES) $(EXTRA_libportaudiocpp_la_DEPENDENCIES) \n\t$(AM_V_CXXLD)$(libportaudiocpp_la_LINK) -rpath $(libdir) $(libportaudiocpp_la_OBJECTS) $(libportaudiocpp_la_LIBADD) $(LIBS)\n\nmostlyclean-compile:\n\t-rm -f *.$(OBJEXT)\n\ndistclean-compile:\n\t-rm -f *.tab.c\n\n@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/BlockingStream.Plo@am__quote@\n@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CFunCallbackStream.Plo@am__quote@\n@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CallbackInterface.Plo@am__quote@\n@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CallbackStream.Plo@am__quote@\n@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CppFunCallbackStream.Plo@am__quote@\n@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Device.Plo@am__quote@\n@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/DirectionSpecificStreamParameters.Plo@am__quote@\n@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Exception.Plo@am__quote@\n@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/HostApi.Plo@am__quote@\n@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/InterfaceCallbackStream.Plo@am__quote@\n@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MemFunCallbackStream.Plo@am__quote@\n@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Stream.Plo@am__quote@\n@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/StreamParameters.Plo@am__quote@\n@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/System.Plo@am__quote@\n@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SystemDeviceIterator.Plo@am__quote@\n@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SystemHostApiIterator.Plo@am__quote@\n\n.cxx.o:\n@am__fastdepCXX_TRUE@\t$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<\n@am__fastdepCXX_TRUE@\t$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po\n@AMDEP_TRUE@@am__fastdepCXX_FALSE@\t$(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@\n@AMDEP_TRUE@@am__fastdepCXX_FALSE@\tDEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@\n@am__fastdepCXX_FALSE@\t$(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $<\n\n.cxx.obj:\n@am__fastdepCXX_TRUE@\t$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`\n@am__fastdepCXX_TRUE@\t$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po\n@AMDEP_TRUE@@am__fastdepCXX_FALSE@\t$(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@\n@AMDEP_TRUE@@am__fastdepCXX_FALSE@\tDEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@\n@am__fastdepCXX_FALSE@\t$(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`\n\n.cxx.lo:\n@am__fastdepCXX_TRUE@\t$(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<\n@am__fastdepCXX_TRUE@\t$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo\n@AMDEP_TRUE@@am__fastdepCXX_FALSE@\t$(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@\n@AMDEP_TRUE@@am__fastdepCXX_FALSE@\tDEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@\n@am__fastdepCXX_FALSE@\t$(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $<\n\nBlockingStream.lo: $(SRCDIR)/BlockingStream.cxx\n@am__fastdepCXX_TRUE@\t$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT BlockingStream.lo -MD -MP -MF $(DEPDIR)/BlockingStream.Tpo -c -o BlockingStream.lo `test -f '$(SRCDIR)/BlockingStream.cxx' || echo '$(srcdir)/'`$(SRCDIR)/BlockingStream.cxx\n@am__fastdepCXX_TRUE@\t$(AM_V_at)$(am__mv) $(DEPDIR)/BlockingStream.Tpo $(DEPDIR)/BlockingStream.Plo\n@AMDEP_TRUE@@am__fastdepCXX_FALSE@\t$(AM_V_CXX)source='$(SRCDIR)/BlockingStream.cxx' object='BlockingStream.lo' libtool=yes @AMDEPBACKSLASH@\n@AMDEP_TRUE@@am__fastdepCXX_FALSE@\tDEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@\n@am__fastdepCXX_FALSE@\t$(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o BlockingStream.lo `test -f '$(SRCDIR)/BlockingStream.cxx' || echo '$(srcdir)/'`$(SRCDIR)/BlockingStream.cxx\n\nCallbackInterface.lo: $(SRCDIR)/CallbackInterface.cxx\n@am__fastdepCXX_TRUE@\t$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT CallbackInterface.lo -MD -MP -MF $(DEPDIR)/CallbackInterface.Tpo -c -o CallbackInterface.lo `test -f '$(SRCDIR)/CallbackInterface.cxx' || echo '$(srcdir)/'`$(SRCDIR)/CallbackInterface.cxx\n@am__fastdepCXX_TRUE@\t$(AM_V_at)$(am__mv) $(DEPDIR)/CallbackInterface.Tpo $(DEPDIR)/CallbackInterface.Plo\n@AMDEP_TRUE@@am__fastdepCXX_FALSE@\t$(AM_V_CXX)source='$(SRCDIR)/CallbackInterface.cxx' object='CallbackInterface.lo' libtool=yes @AMDEPBACKSLASH@\n@AMDEP_TRUE@@am__fastdepCXX_FALSE@\tDEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@\n@am__fastdepCXX_FALSE@\t$(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o CallbackInterface.lo `test -f '$(SRCDIR)/CallbackInterface.cxx' || echo '$(srcdir)/'`$(SRCDIR)/CallbackInterface.cxx\n\nCallbackStream.lo: $(SRCDIR)/CallbackStream.cxx\n@am__fastdepCXX_TRUE@\t$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT CallbackStream.lo -MD -MP -MF $(DEPDIR)/CallbackStream.Tpo -c -o CallbackStream.lo `test -f '$(SRCDIR)/CallbackStream.cxx' || echo '$(srcdir)/'`$(SRCDIR)/CallbackStream.cxx\n@am__fastdepCXX_TRUE@\t$(AM_V_at)$(am__mv) $(DEPDIR)/CallbackStream.Tpo $(DEPDIR)/CallbackStream.Plo\n@AMDEP_TRUE@@am__fastdepCXX_FALSE@\t$(AM_V_CXX)source='$(SRCDIR)/CallbackStream.cxx' object='CallbackStream.lo' libtool=yes @AMDEPBACKSLASH@\n@AMDEP_TRUE@@am__fastdepCXX_FALSE@\tDEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@\n@am__fastdepCXX_FALSE@\t$(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o CallbackStream.lo `test -f '$(SRCDIR)/CallbackStream.cxx' || echo '$(srcdir)/'`$(SRCDIR)/CallbackStream.cxx\n\nCFunCallbackStream.lo: $(SRCDIR)/CFunCallbackStream.cxx\n@am__fastdepCXX_TRUE@\t$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT CFunCallbackStream.lo -MD -MP -MF $(DEPDIR)/CFunCallbackStream.Tpo -c -o CFunCallbackStream.lo `test -f '$(SRCDIR)/CFunCallbackStream.cxx' || echo '$(srcdir)/'`$(SRCDIR)/CFunCallbackStream.cxx\n@am__fastdepCXX_TRUE@\t$(AM_V_at)$(am__mv) $(DEPDIR)/CFunCallbackStream.Tpo $(DEPDIR)/CFunCallbackStream.Plo\n@AMDEP_TRUE@@am__fastdepCXX_FALSE@\t$(AM_V_CXX)source='$(SRCDIR)/CFunCallbackStream.cxx' object='CFunCallbackStream.lo' libtool=yes @AMDEPBACKSLASH@\n@AMDEP_TRUE@@am__fastdepCXX_FALSE@\tDEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@\n@am__fastdepCXX_FALSE@\t$(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o CFunCallbackStream.lo `test -f '$(SRCDIR)/CFunCallbackStream.cxx' || echo '$(srcdir)/'`$(SRCDIR)/CFunCallbackStream.cxx\n\nCppFunCallbackStream.lo: $(SRCDIR)/CppFunCallbackStream.cxx\n@am__fastdepCXX_TRUE@\t$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT CppFunCallbackStream.lo -MD -MP -MF $(DEPDIR)/CppFunCallbackStream.Tpo -c -o CppFunCallbackStream.lo `test -f '$(SRCDIR)/CppFunCallbackStream.cxx' || echo '$(srcdir)/'`$(SRCDIR)/CppFunCallbackStream.cxx\n@am__fastdepCXX_TRUE@\t$(AM_V_at)$(am__mv) $(DEPDIR)/CppFunCallbackStream.Tpo $(DEPDIR)/CppFunCallbackStream.Plo\n@AMDEP_TRUE@@am__fastdepCXX_FALSE@\t$(AM_V_CXX)source='$(SRCDIR)/CppFunCallbackStream.cxx' object='CppFunCallbackStream.lo' libtool=yes @AMDEPBACKSLASH@\n@AMDEP_TRUE@@am__fastdepCXX_FALSE@\tDEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@\n@am__fastdepCXX_FALSE@\t$(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o CppFunCallbackStream.lo `test -f '$(SRCDIR)/CppFunCallbackStream.cxx' || echo '$(srcdir)/'`$(SRCDIR)/CppFunCallbackStream.cxx\n\nDevice.lo: $(SRCDIR)/Device.cxx\n@am__fastdepCXX_TRUE@\t$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Device.lo -MD -MP -MF $(DEPDIR)/Device.Tpo -c -o Device.lo `test -f '$(SRCDIR)/Device.cxx' || echo '$(srcdir)/'`$(SRCDIR)/Device.cxx\n@am__fastdepCXX_TRUE@\t$(AM_V_at)$(am__mv) $(DEPDIR)/Device.Tpo $(DEPDIR)/Device.Plo\n@AMDEP_TRUE@@am__fastdepCXX_FALSE@\t$(AM_V_CXX)source='$(SRCDIR)/Device.cxx' object='Device.lo' libtool=yes @AMDEPBACKSLASH@\n@AMDEP_TRUE@@am__fastdepCXX_FALSE@\tDEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@\n@am__fastdepCXX_FALSE@\t$(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Device.lo `test -f '$(SRCDIR)/Device.cxx' || echo '$(srcdir)/'`$(SRCDIR)/Device.cxx\n\nDirectionSpecificStreamParameters.lo: $(SRCDIR)/DirectionSpecificStreamParameters.cxx\n@am__fastdepCXX_TRUE@\t$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT DirectionSpecificStreamParameters.lo -MD -MP -MF $(DEPDIR)/DirectionSpecificStreamParameters.Tpo -c -o DirectionSpecificStreamParameters.lo `test -f '$(SRCDIR)/DirectionSpecificStreamParameters.cxx' || echo '$(srcdir)/'`$(SRCDIR)/DirectionSpecificStreamParameters.cxx\n@am__fastdepCXX_TRUE@\t$(AM_V_at)$(am__mv) $(DEPDIR)/DirectionSpecificStreamParameters.Tpo $(DEPDIR)/DirectionSpecificStreamParameters.Plo\n@AMDEP_TRUE@@am__fastdepCXX_FALSE@\t$(AM_V_CXX)source='$(SRCDIR)/DirectionSpecificStreamParameters.cxx' object='DirectionSpecificStreamParameters.lo' libtool=yes @AMDEPBACKSLASH@\n@AMDEP_TRUE@@am__fastdepCXX_FALSE@\tDEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@\n@am__fastdepCXX_FALSE@\t$(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o DirectionSpecificStreamParameters.lo `test -f '$(SRCDIR)/DirectionSpecificStreamParameters.cxx' || echo '$(srcdir)/'`$(SRCDIR)/DirectionSpecificStreamParameters.cxx\n\nException.lo: $(SRCDIR)/Exception.cxx\n@am__fastdepCXX_TRUE@\t$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Exception.lo -MD -MP -MF $(DEPDIR)/Exception.Tpo -c -o Exception.lo `test -f '$(SRCDIR)/Exception.cxx' || echo '$(srcdir)/'`$(SRCDIR)/Exception.cxx\n@am__fastdepCXX_TRUE@\t$(AM_V_at)$(am__mv) $(DEPDIR)/Exception.Tpo $(DEPDIR)/Exception.Plo\n@AMDEP_TRUE@@am__fastdepCXX_FALSE@\t$(AM_V_CXX)source='$(SRCDIR)/Exception.cxx' object='Exception.lo' libtool=yes @AMDEPBACKSLASH@\n@AMDEP_TRUE@@am__fastdepCXX_FALSE@\tDEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@\n@am__fastdepCXX_FALSE@\t$(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Exception.lo `test -f '$(SRCDIR)/Exception.cxx' || echo '$(srcdir)/'`$(SRCDIR)/Exception.cxx\n\nHostApi.lo: $(SRCDIR)/HostApi.cxx\n@am__fastdepCXX_TRUE@\t$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT HostApi.lo -MD -MP -MF $(DEPDIR)/HostApi.Tpo -c -o HostApi.lo `test -f '$(SRCDIR)/HostApi.cxx' || echo '$(srcdir)/'`$(SRCDIR)/HostApi.cxx\n@am__fastdepCXX_TRUE@\t$(AM_V_at)$(am__mv) $(DEPDIR)/HostApi.Tpo $(DEPDIR)/HostApi.Plo\n@AMDEP_TRUE@@am__fastdepCXX_FALSE@\t$(AM_V_CXX)source='$(SRCDIR)/HostApi.cxx' object='HostApi.lo' libtool=yes @AMDEPBACKSLASH@\n@AMDEP_TRUE@@am__fastdepCXX_FALSE@\tDEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@\n@am__fastdepCXX_FALSE@\t$(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o HostApi.lo `test -f '$(SRCDIR)/HostApi.cxx' || echo '$(srcdir)/'`$(SRCDIR)/HostApi.cxx\n\nInterfaceCallbackStream.lo: $(SRCDIR)/InterfaceCallbackStream.cxx\n@am__fastdepCXX_TRUE@\t$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT InterfaceCallbackStream.lo -MD -MP -MF $(DEPDIR)/InterfaceCallbackStream.Tpo -c -o InterfaceCallbackStream.lo `test -f '$(SRCDIR)/InterfaceCallbackStream.cxx' || echo '$(srcdir)/'`$(SRCDIR)/InterfaceCallbackStream.cxx\n@am__fastdepCXX_TRUE@\t$(AM_V_at)$(am__mv) $(DEPDIR)/InterfaceCallbackStream.Tpo $(DEPDIR)/InterfaceCallbackStream.Plo\n@AMDEP_TRUE@@am__fastdepCXX_FALSE@\t$(AM_V_CXX)source='$(SRCDIR)/InterfaceCallbackStream.cxx' object='InterfaceCallbackStream.lo' libtool=yes @AMDEPBACKSLASH@\n@AMDEP_TRUE@@am__fastdepCXX_FALSE@\tDEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@\n@am__fastdepCXX_FALSE@\t$(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o InterfaceCallbackStream.lo `test -f '$(SRCDIR)/InterfaceCallbackStream.cxx' || echo '$(srcdir)/'`$(SRCDIR)/InterfaceCallbackStream.cxx\n\nMemFunCallbackStream.lo: $(SRCDIR)/MemFunCallbackStream.cxx\n@am__fastdepCXX_TRUE@\t$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT MemFunCallbackStream.lo -MD -MP -MF $(DEPDIR)/MemFunCallbackStream.Tpo -c -o MemFunCallbackStream.lo `test -f '$(SRCDIR)/MemFunCallbackStream.cxx' || echo '$(srcdir)/'`$(SRCDIR)/MemFunCallbackStream.cxx\n@am__fastdepCXX_TRUE@\t$(AM_V_at)$(am__mv) $(DEPDIR)/MemFunCallbackStream.Tpo $(DEPDIR)/MemFunCallbackStream.Plo\n@AMDEP_TRUE@@am__fastdepCXX_FALSE@\t$(AM_V_CXX)source='$(SRCDIR)/MemFunCallbackStream.cxx' object='MemFunCallbackStream.lo' libtool=yes @AMDEPBACKSLASH@\n@AMDEP_TRUE@@am__fastdepCXX_FALSE@\tDEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@\n@am__fastdepCXX_FALSE@\t$(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o MemFunCallbackStream.lo `test -f '$(SRCDIR)/MemFunCallbackStream.cxx' || echo '$(srcdir)/'`$(SRCDIR)/MemFunCallbackStream.cxx\n\nStream.lo: $(SRCDIR)/Stream.cxx\n@am__fastdepCXX_TRUE@\t$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Stream.lo -MD -MP -MF $(DEPDIR)/Stream.Tpo -c -o Stream.lo `test -f '$(SRCDIR)/Stream.cxx' || echo '$(srcdir)/'`$(SRCDIR)/Stream.cxx\n@am__fastdepCXX_TRUE@\t$(AM_V_at)$(am__mv) $(DEPDIR)/Stream.Tpo $(DEPDIR)/Stream.Plo\n@AMDEP_TRUE@@am__fastdepCXX_FALSE@\t$(AM_V_CXX)source='$(SRCDIR)/Stream.cxx' object='Stream.lo' libtool=yes @AMDEPBACKSLASH@\n@AMDEP_TRUE@@am__fastdepCXX_FALSE@\tDEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@\n@am__fastdepCXX_FALSE@\t$(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Stream.lo `test -f '$(SRCDIR)/Stream.cxx' || echo '$(srcdir)/'`$(SRCDIR)/Stream.cxx\n\nStreamParameters.lo: $(SRCDIR)/StreamParameters.cxx\n@am__fastdepCXX_TRUE@\t$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT StreamParameters.lo -MD -MP -MF $(DEPDIR)/StreamParameters.Tpo -c -o StreamParameters.lo `test -f '$(SRCDIR)/StreamParameters.cxx' || echo '$(srcdir)/'`$(SRCDIR)/StreamParameters.cxx\n@am__fastdepCXX_TRUE@\t$(AM_V_at)$(am__mv) $(DEPDIR)/StreamParameters.Tpo $(DEPDIR)/StreamParameters.Plo\n@AMDEP_TRUE@@am__fastdepCXX_FALSE@\t$(AM_V_CXX)source='$(SRCDIR)/StreamParameters.cxx' object='StreamParameters.lo' libtool=yes @AMDEPBACKSLASH@\n@AMDEP_TRUE@@am__fastdepCXX_FALSE@\tDEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@\n@am__fastdepCXX_FALSE@\t$(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o StreamParameters.lo `test -f '$(SRCDIR)/StreamParameters.cxx' || echo '$(srcdir)/'`$(SRCDIR)/StreamParameters.cxx\n\nSystem.lo: $(SRCDIR)/System.cxx\n@am__fastdepCXX_TRUE@\t$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT System.lo -MD -MP -MF $(DEPDIR)/System.Tpo -c -o System.lo `test -f '$(SRCDIR)/System.cxx' || echo '$(srcdir)/'`$(SRCDIR)/System.cxx\n@am__fastdepCXX_TRUE@\t$(AM_V_at)$(am__mv) $(DEPDIR)/System.Tpo $(DEPDIR)/System.Plo\n@AMDEP_TRUE@@am__fastdepCXX_FALSE@\t$(AM_V_CXX)source='$(SRCDIR)/System.cxx' object='System.lo' libtool=yes @AMDEPBACKSLASH@\n@AMDEP_TRUE@@am__fastdepCXX_FALSE@\tDEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@\n@am__fastdepCXX_FALSE@\t$(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o System.lo `test -f '$(SRCDIR)/System.cxx' || echo '$(srcdir)/'`$(SRCDIR)/System.cxx\n\nSystemDeviceIterator.lo: $(SRCDIR)/SystemDeviceIterator.cxx\n@am__fastdepCXX_TRUE@\t$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT SystemDeviceIterator.lo -MD -MP -MF $(DEPDIR)/SystemDeviceIterator.Tpo -c -o SystemDeviceIterator.lo `test -f '$(SRCDIR)/SystemDeviceIterator.cxx' || echo '$(srcdir)/'`$(SRCDIR)/SystemDeviceIterator.cxx\n@am__fastdepCXX_TRUE@\t$(AM_V_at)$(am__mv) $(DEPDIR)/SystemDeviceIterator.Tpo $(DEPDIR)/SystemDeviceIterator.Plo\n@AMDEP_TRUE@@am__fastdepCXX_FALSE@\t$(AM_V_CXX)source='$(SRCDIR)/SystemDeviceIterator.cxx' object='SystemDeviceIterator.lo' libtool=yes @AMDEPBACKSLASH@\n@AMDEP_TRUE@@am__fastdepCXX_FALSE@\tDEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@\n@am__fastdepCXX_FALSE@\t$(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o SystemDeviceIterator.lo `test -f '$(SRCDIR)/SystemDeviceIterator.cxx' || echo '$(srcdir)/'`$(SRCDIR)/SystemDeviceIterator.cxx\n\nSystemHostApiIterator.lo: $(SRCDIR)/SystemHostApiIterator.cxx\n@am__fastdepCXX_TRUE@\t$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT SystemHostApiIterator.lo -MD -MP -MF $(DEPDIR)/SystemHostApiIterator.Tpo -c -o SystemHostApiIterator.lo `test -f '$(SRCDIR)/SystemHostApiIterator.cxx' || echo '$(srcdir)/'`$(SRCDIR)/SystemHostApiIterator.cxx\n@am__fastdepCXX_TRUE@\t$(AM_V_at)$(am__mv) $(DEPDIR)/SystemHostApiIterator.Tpo $(DEPDIR)/SystemHostApiIterator.Plo\n@AMDEP_TRUE@@am__fastdepCXX_FALSE@\t$(AM_V_CXX)source='$(SRCDIR)/SystemHostApiIterator.cxx' object='SystemHostApiIterator.lo' libtool=yes @AMDEPBACKSLASH@\n@AMDEP_TRUE@@am__fastdepCXX_FALSE@\tDEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@\n@am__fastdepCXX_FALSE@\t$(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o SystemHostApiIterator.lo `test -f '$(SRCDIR)/SystemHostApiIterator.cxx' || echo '$(srcdir)/'`$(SRCDIR)/SystemHostApiIterator.cxx\n\nmostlyclean-libtool:\n\t-rm -f *.lo\n\nclean-libtool:\n\t-rm -rf .libs _libs\n\nID: $(am__tagged_files)\n\t$(am__define_uniq_tagged_files); mkid -fID $$unique\ntags: tags-am\nTAGS: tags\n\ntags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)\n\tset x; \\\n\there=`pwd`; \\\n\t$(am__define_uniq_tagged_files); \\\n\tshift; \\\n\tif test -z \"$(ETAGS_ARGS)$$*$$unique\"; then :; else \\\n\t  test -n \"$$unique\" || unique=$$empty_fix; \\\n\t  if test $$# -gt 0; then \\\n\t    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \\\n\t      \"$$@\" $$unique; \\\n\t  else \\\n\t    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \\\n\t      $$unique; \\\n\t  fi; \\\n\tfi\nctags: ctags-am\n\nCTAGS: ctags\nctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)\n\t$(am__define_uniq_tagged_files); \\\n\ttest -z \"$(CTAGS_ARGS)$$unique\" \\\n\t  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \\\n\t     $$unique\n\nGTAGS:\n\there=`$(am__cd) $(top_builddir) && pwd` \\\n\t  && $(am__cd) $(top_srcdir) \\\n\t  && gtags -i $(GTAGS_ARGS) \"$$here\"\ncscopelist: cscopelist-am\n\ncscopelist-am: $(am__tagged_files)\n\tlist='$(am__tagged_files)'; \\\n\tcase \"$(srcdir)\" in \\\n\t  [\\\\/]* | ?:[\\\\/]*) sdir=\"$(srcdir)\" ;; \\\n\t  *) sdir=$(subdir)/$(srcdir) ;; \\\n\tesac; \\\n\tfor i in $$list; do \\\n\t  if test -f \"$$i\"; then \\\n\t    echo \"$(subdir)/$$i\"; \\\n\t  else \\\n\t    echo \"$$sdir/$$i\"; \\\n\t  fi; \\\n\tdone >> $(top_builddir)/cscope.files\n\ndistclean-tags:\n\t-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags\n\ndistdir: $(DISTFILES)\n\t@srcdirstrip=`echo \"$(srcdir)\" | sed 's/[].[^$$\\\\*]/\\\\\\\\&/g'`; \\\n\ttopsrcdirstrip=`echo \"$(top_srcdir)\" | sed 's/[].[^$$\\\\*]/\\\\\\\\&/g'`; \\\n\tlist='$(DISTFILES)'; \\\n\t  dist_files=`for file in $$list; do echo $$file; done | \\\n\t  sed -e \"s|^$$srcdirstrip/||;t\" \\\n\t      -e \"s|^$$topsrcdirstrip/|$(top_builddir)/|;t\"`; \\\n\tcase $$dist_files in \\\n\t  */*) $(MKDIR_P) `echo \"$$dist_files\" | \\\n\t\t\t   sed '/\\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \\\n\t\t\t   sort -u` ;; \\\n\tesac; \\\n\tfor file in $$dist_files; do \\\n\t  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \\\n\t  if test -d $$d/$$file; then \\\n\t    dir=`echo \"/$$file\" | sed -e 's,/[^/]*$$,,'`; \\\n\t    if test -d \"$(distdir)/$$file\"; then \\\n\t      find \"$(distdir)/$$file\" -type d ! -perm -700 -exec chmod u+rwx {} \\;; \\\n\t    fi; \\\n\t    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \\\n\t      cp -fpR $(srcdir)/$$file \"$(distdir)$$dir\" || exit 1; \\\n\t      find \"$(distdir)/$$file\" -type d ! -perm -700 -exec chmod u+rwx {} \\;; \\\n\t    fi; \\\n\t    cp -fpR $$d/$$file \"$(distdir)$$dir\" || exit 1; \\\n\t  else \\\n\t    test -f \"$(distdir)/$$file\" \\\n\t    || cp -p $$d/$$file \"$(distdir)/$$file\" \\\n\t    || exit 1; \\\n\t  fi; \\\n\tdone\ncheck-am: all-am\ncheck: check-am\nall-am: Makefile $(LTLIBRARIES)\ninstalldirs:\n\tfor dir in \"$(DESTDIR)$(libdir)\"; do \\\n\t  test -z \"$$dir\" || $(MKDIR_P) \"$$dir\"; \\\n\tdone\ninstall: install-am\ninstall-exec: install-exec-am\ninstall-data: install-data-am\nuninstall: uninstall-am\n\ninstall-am: all-am\n\t@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am\n\ninstallcheck: installcheck-am\ninstall-strip:\n\tif test -z '$(STRIP)'; then \\\n\t  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM=\"$(INSTALL_STRIP_PROGRAM)\" \\\n\t    install_sh_PROGRAM=\"$(INSTALL_STRIP_PROGRAM)\" INSTALL_STRIP_FLAG=-s \\\n\t      install; \\\n\telse \\\n\t  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM=\"$(INSTALL_STRIP_PROGRAM)\" \\\n\t    install_sh_PROGRAM=\"$(INSTALL_STRIP_PROGRAM)\" INSTALL_STRIP_FLAG=-s \\\n\t    \"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'\" install; \\\n\tfi\nmostlyclean-generic:\n\nclean-generic:\n\ndistclean-generic:\n\t-test -z \"$(CONFIG_CLEAN_FILES)\" || rm -f $(CONFIG_CLEAN_FILES)\n\t-test . = \"$(srcdir)\" || test -z \"$(CONFIG_CLEAN_VPATH_FILES)\" || rm -f $(CONFIG_CLEAN_VPATH_FILES)\n\nmaintainer-clean-generic:\n\t@echo \"This command is intended for maintainers to use\"\n\t@echo \"it deletes files that may require special tools to rebuild.\"\nclean: clean-am\n\nclean-am: clean-generic clean-libLTLIBRARIES clean-libtool \\\n\tmostlyclean-am\n\ndistclean: distclean-am\n\t-rm -rf ./$(DEPDIR)\n\t-rm -f Makefile\ndistclean-am: clean-am distclean-compile distclean-generic \\\n\tdistclean-tags\n\ndvi: dvi-am\n\ndvi-am:\n\nhtml: html-am\n\nhtml-am:\n\ninfo: info-am\n\ninfo-am:\n\ninstall-data-am:\n\ninstall-dvi: install-dvi-am\n\ninstall-dvi-am:\n\ninstall-exec-am: install-libLTLIBRARIES\n\ninstall-html: install-html-am\n\ninstall-html-am:\n\ninstall-info: install-info-am\n\ninstall-info-am:\n\ninstall-man:\n\ninstall-pdf: install-pdf-am\n\ninstall-pdf-am:\n\ninstall-ps: install-ps-am\n\ninstall-ps-am:\n\ninstallcheck-am:\n\nmaintainer-clean: maintainer-clean-am\n\t-rm -rf ./$(DEPDIR)\n\t-rm -f Makefile\nmaintainer-clean-am: distclean-am maintainer-clean-generic\n\nmostlyclean: mostlyclean-am\n\nmostlyclean-am: mostlyclean-compile mostlyclean-generic \\\n\tmostlyclean-libtool\n\npdf: pdf-am\n\npdf-am:\n\nps: ps-am\n\nps-am:\n\nuninstall-am: uninstall-libLTLIBRARIES\n\n.MAKE: install-am install-strip\n\n.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \\\n\tclean-libLTLIBRARIES clean-libtool cscopelist-am ctags \\\n\tctags-am distclean distclean-compile distclean-generic \\\n\tdistclean-libtool distclean-tags distdir dvi dvi-am html \\\n\thtml-am info info-am install install-am install-data \\\n\tinstall-data-am install-dvi install-dvi-am install-exec \\\n\tinstall-exec-am install-html install-html-am install-info \\\n\tinstall-info-am install-libLTLIBRARIES install-man install-pdf \\\n\tinstall-pdf-am install-ps install-ps-am install-strip \\\n\tinstallcheck installcheck-am installdirs maintainer-clean \\\n\tmaintainer-clean-generic mostlyclean mostlyclean-compile \\\n\tmostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \\\n\ttags tags-am uninstall uninstall-am uninstall-libLTLIBRARIES\n\n\n# Tell versions [3.59,3.63) of GNU make to not export all variables.\n# Otherwise a system limit (for SysV at least) may be exceeded.\n.NOEXPORT:\n"
  },
  {
    "path": "thirdparty/portaudio/bindings/cpp/portaudiocpp.pc.in",
    "content": "prefix=@prefix@\nexec_prefix=@exec_prefix@\nlibdir=@libdir@\nincludedir=@includedir@\n\nName: PortAudioCpp\nDescription: Portable audio I/O C++ bindings\nVersion: 12\nRequires: portaudio-2.0\n\nLibs: -L${libdir} -lportaudiocpp\nCflags: -I${includedir}\n"
  },
  {
    "path": "thirdparty/portaudio/bindings/cpp/source/portaudiocpp/AsioDeviceAdapter.cxx",
    "content": "#include \"portaudiocpp/AsioDeviceAdapter.hxx\"\n\n#include \"portaudio.h\"\n#include \"pa_asio.h\"\n\n#include \"portaudiocpp/Device.hxx\"\n#include \"portaudiocpp/HostApi.hxx\"\n#include \"portaudiocpp/Exception.hxx\"\n\nnamespace portaudio\n{\n\tAsioDeviceAdapter::AsioDeviceAdapter(Device &device)\n\t{\n\t\tif (device.hostApi().typeId() != paASIO)\n\t\t\tthrow PaCppException(PaCppException::UNABLE_TO_ADAPT_DEVICE);\n\n\t\tdevice_ = &device;\n\n\t\tPaError err = PaAsio_GetAvailableLatencyValues(device_->index(), &minBufferSize_, &maxBufferSize_, \n\t\t\t&preferredBufferSize_, &granularity_);\n\n\t\tif (err != paNoError)\n\t\t\tthrow PaException(err);\n\n\t}\n\n\tDevice &AsioDeviceAdapter::device()\n\t{\n\t\treturn *device_;\n\t}\n\n\tlong AsioDeviceAdapter::minBufferSize() const\n\t{\n\t\treturn minBufferSize_;\n\t}\n\n\tlong AsioDeviceAdapter::maxBufferSize() const\n\t{\n\t\treturn maxBufferSize_;\n\t}\n\n\tlong AsioDeviceAdapter::preferredBufferSize() const\n\t{\n\t\treturn preferredBufferSize_;\n\t}\n\n\tlong AsioDeviceAdapter::granularity() const\n\t{\n\t\treturn granularity_;\n\t}\n\n\tvoid AsioDeviceAdapter::showControlPanel(void *systemSpecific)\n\t{\n\t\tPaError err = PaAsio_ShowControlPanel(device_->index(), systemSpecific);\n\n\t\tif (err != paNoError)\n\t\t\tthrow PaException(err);\n\t}\n\n\tconst char *AsioDeviceAdapter::inputChannelName(int channelIndex) const\n\t{\n\t\tconst char *channelName;\n\t\tPaError err = PaAsio_GetInputChannelName(device_->index(), channelIndex, &channelName);\n\n\t\tif (err != paNoError)\n\t\t\tthrow PaException(err);\n\n\t\treturn channelName;\n\t}\n\n\tconst char *AsioDeviceAdapter::outputChannelName(int channelIndex) const\n\t{\n\t\tconst char *channelName;\n\t\tPaError err = PaAsio_GetOutputChannelName(device_->index(), channelIndex, &channelName);\n\n\t\tif (err != paNoError)\n\t\t\tthrow PaException(err);\n\n\t\treturn channelName;\n\t}\n}\n\n\n"
  },
  {
    "path": "thirdparty/portaudio/bindings/cpp/source/portaudiocpp/BlockingStream.cxx",
    "content": "#include \"portaudiocpp/BlockingStream.hxx\"\n\n#include \"portaudio.h\"\n\n#include \"portaudiocpp/StreamParameters.hxx\"\n#include \"portaudiocpp/Exception.hxx\"\n\nnamespace portaudio\n{\n\n\t// --------------------------------------------------------------------------------------\n\n\tBlockingStream::BlockingStream()\n\t{\n\t}\n\n\tBlockingStream::BlockingStream(const StreamParameters &parameters)\n\t{\n\t\topen(parameters);\n\t}\n\n\tBlockingStream::~BlockingStream()\n\t{\n\t\ttry\n\t\t{\n\t\t\tclose();\n\t\t}\n\t\tcatch (...)\n\t\t{\n\t\t\t// ignore all errors\n\t\t}\n\t}\n\n\t// --------------------------------------------------------------------------------------\n\n\tvoid BlockingStream::open(const StreamParameters &parameters)\n\t{\n\t\tPaError err = Pa_OpenStream(&stream_, parameters.inputParameters().paStreamParameters(), parameters.outputParameters().paStreamParameters(), \n\t\t\tparameters.sampleRate(), parameters.framesPerBuffer(), parameters.flags(), NULL, NULL);\n\n\t\tif (err != paNoError)\n\t\t{\n\t\t\tthrow PaException(err);\n\t\t}\n\t}\n\n\t// --------------------------------------------------------------------------------------\n\n\tvoid BlockingStream::read(void *buffer, unsigned long numFrames)\n\t{\n\t\tPaError err = Pa_ReadStream(stream_, buffer, numFrames);\n\n\t\tif (err != paNoError)\n\t\t{\n\t\t\tthrow PaException(err);\n\t\t}\n\t}\n\n\tvoid BlockingStream::write(const void *buffer, unsigned long numFrames)\n\t{\n\t\tPaError err = Pa_WriteStream(stream_, buffer, numFrames);\n\n\t\tif (err != paNoError)\n\t\t{\n\t\t\tthrow PaException(err);\n\t\t}\n\t}\n\n\t// --------------------------------------------------------------------------------------\n\n\tsigned long BlockingStream::availableReadSize() const\n\t{\n\t\tsigned long avail = Pa_GetStreamReadAvailable(stream_);\n\n\t\tif (avail < 0)\n\t\t{\n\t\t\tthrow PaException(avail);\n\t\t}\n\n\t\treturn avail;\n\t}\n\n\tsigned long BlockingStream::availableWriteSize() const\n\t{\n\t\tsigned long avail = Pa_GetStreamWriteAvailable(stream_);\n\n\t\tif (avail < 0)\n\t\t{\n\t\t\tthrow PaException(avail);\n\t\t}\n\n\t\treturn avail;\n\t}\n\n\t// --------------------------------------------------------------------------------------\n\n} // portaudio\n\n\n\n"
  },
  {
    "path": "thirdparty/portaudio/bindings/cpp/source/portaudiocpp/CFunCallbackStream.cxx",
    "content": "#include \"portaudiocpp/CFunCallbackStream.hxx\"\n\n#include \"portaudiocpp/StreamParameters.hxx\"\n#include \"portaudiocpp/Exception.hxx\"\n\nnamespace portaudio\n{\n\tCFunCallbackStream::CFunCallbackStream()\n\t{\n\t}\n\n\tCFunCallbackStream::CFunCallbackStream(const StreamParameters &parameters, PaStreamCallback *funPtr, void *userData)\n\t{\n\t\topen(parameters, funPtr, userData);\n\t}\n\n\tCFunCallbackStream::~CFunCallbackStream()\n\t{\n\t\ttry\n\t\t{\n\t\t\tclose();\n\t\t}\n\t\tcatch (...)\n\t\t{\n\t\t\t// ignore all errors\n\t\t}\n\t}\n\n\t// ---------------------------------------------------------------------------------==\n\n\tvoid CFunCallbackStream::open(const StreamParameters &parameters, PaStreamCallback *funPtr, void *userData)\n\t{\n\t\tPaError err = Pa_OpenStream(&stream_, parameters.inputParameters().paStreamParameters(), parameters.outputParameters().paStreamParameters(), \n\t\t\tparameters.sampleRate(), parameters.framesPerBuffer(), parameters.flags(), funPtr, userData);\n\n\t\tif (err != paNoError)\n\t\t{\n\t\t\tthrow PaException(err);\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "thirdparty/portaudio/bindings/cpp/source/portaudiocpp/CallbackInterface.cxx",
    "content": "#include \"portaudiocpp/CallbackInterface.hxx\"\n\nnamespace portaudio\n{\n\n\tnamespace impl\n\t{\n\n\t\t//////\n\t\t/// Adapts any CallbackInterface object to a C-callable function (ie this function). A \n\t\t/// pointer to the object should be passed as ``userData'' when setting up the callback.\n\t\t//////\n\t\tint callbackInterfaceToPaCallbackAdapter(const void *inputBuffer, void *outputBuffer, unsigned long numFrames, \n\t\t\tconst PaStreamCallbackTimeInfo *timeInfo, PaStreamCallbackFlags statusFlags, void *userData)\n\t\t{\n\t\t\tCallbackInterface *cb = static_cast<CallbackInterface *>(userData);\n\t\t\treturn cb->paCallbackFun(inputBuffer, outputBuffer, numFrames, timeInfo, statusFlags);\n\t\t}\n\n\n\t} // namespace impl\n\n} // namespace portaudio\n\n\n"
  },
  {
    "path": "thirdparty/portaudio/bindings/cpp/source/portaudiocpp/CallbackStream.cxx",
    "content": "#include \"portaudiocpp/CallbackStream.hxx\"\n\nnamespace portaudio\n{\n\tCallbackStream::CallbackStream()\n\t{\n\t}\n\n\tCallbackStream::~CallbackStream()\n\t{\n\t}\n\n\t// -----------------------------------------------------------------------------------\n\t\n\tdouble CallbackStream::cpuLoad() const\n\t{\n\t\treturn Pa_GetStreamCpuLoad(stream_);\n\t}\n\n} // namespace portaudio\n"
  },
  {
    "path": "thirdparty/portaudio/bindings/cpp/source/portaudiocpp/CppFunCallbackStream.cxx",
    "content": "#include \"portaudiocpp/CppFunCallbackStream.hxx\"\n\n#include \"portaudiocpp/StreamParameters.hxx\"\n#include \"portaudiocpp/Exception.hxx\"\n\nnamespace portaudio\n{\n\tnamespace impl\n\t{\n\t\t//////\n\t\t/// Adapts any a C++ callback to a C-callable function (ie this function). A \n\t\t/// pointer to a struct with the C++ function pointer and the actual user data should be \n\t\t/// passed as the ``userData'' parameter when setting up the callback.\n\t\t//////\n\t\tint cppCallbackToPaCallbackAdapter(const void *inputBuffer, void *outputBuffer, unsigned long numFrames, \n\t\t\tconst PaStreamCallbackTimeInfo *timeInfo, PaStreamCallbackFlags statusFlags, void *userData)\n\t\t{\n\t\t\tFunCallbackStream::CppToCCallbackData *data = static_cast<FunCallbackStream::CppToCCallbackData *>(userData);\n\t\t\treturn data->funPtr(inputBuffer, outputBuffer, numFrames, timeInfo, statusFlags, data->userData);\n\t\t}\n\t}\n\n\t// -----------------------------------------------------------------------------------\n\n\tFunCallbackStream::CppToCCallbackData::CppToCCallbackData()\n\t{\n\t}\n\n\tFunCallbackStream::CppToCCallbackData::CppToCCallbackData(CallbackFunPtr funPtr, void *userData) : funPtr(funPtr), userData(userData)\n\t{\n\t}\n\n\tvoid FunCallbackStream::CppToCCallbackData::init(CallbackFunPtr funPtr, void *userData)\n\t{\n\t\tthis->funPtr = funPtr;\n\t\tthis->userData = userData;\n\t}\n\n\t// -----------------------------------------------------------------------------------\n\n\tFunCallbackStream::FunCallbackStream()\n\t{\n\t}\n\n\tFunCallbackStream::FunCallbackStream(const StreamParameters &parameters, CallbackFunPtr funPtr, void *userData) : adapterData_(funPtr, userData)\n\t{\n\t\topen(parameters);\n\t}\n\n\tFunCallbackStream::~FunCallbackStream()\n\t{\n\t\ttry\n\t\t{\n\t\t\tclose();\n\t\t}\n\t\tcatch (...)\n\t\t{\n\t\t\t// ignore all errors\n\t\t}\n\t}\n\n\tvoid FunCallbackStream::open(const StreamParameters &parameters, CallbackFunPtr funPtr, void *userData)\n\t{\n\t\tadapterData_.init(funPtr, userData);\n\t\topen(parameters);\n\t}\n\n\tvoid FunCallbackStream::open(const StreamParameters &parameters)\n\t{\n\t\tPaError err = Pa_OpenStream(&stream_, parameters.inputParameters().paStreamParameters(), parameters.outputParameters().paStreamParameters(), \n\t\t\tparameters.sampleRate(), parameters.framesPerBuffer(), parameters.flags(), &impl::cppCallbackToPaCallbackAdapter, \n\t\t\tstatic_cast<void *>(&adapterData_));\n\n\t\tif (err != paNoError)\n\t\t{\n\t\t\tthrow PaException(err);\n\t\t}\n\t}\n\n\t// -----------------------------------------------------------------------------------\n}\n"
  },
  {
    "path": "thirdparty/portaudio/bindings/cpp/source/portaudiocpp/Device.cxx",
    "content": "#include \"portaudiocpp/Device.hxx\"\n\n#include <cstddef>\n\n#include \"portaudiocpp/HostApi.hxx\"\n#include \"portaudiocpp/System.hxx\"\n#include \"portaudiocpp/Exception.hxx\"\n\nnamespace portaudio\n{\n\n\t\t// -------------------------------------------------------------------------------\n\n\t\tDevice::Device(PaDeviceIndex index) : index_(index)\n\t\t{\n\t\t\tif (index == paNoDevice)\n\t\t\t\tinfo_ = NULL;\n\t\t\telse\n\t\t\t\tinfo_ = Pa_GetDeviceInfo(index);\n\t\t}\n\n\t\tDevice::~Device()\n\t\t{\n\t\t}\n\n\t\tPaDeviceIndex Device::index() const\n\t\t{\n\t\t\treturn index_;\n\t\t}\n\n\t\tconst char *Device::name() const\n\t\t{\n\t\t\tif (info_ == NULL)\n\t\t\t\treturn \"\";\n\n\t\t\treturn info_->name;\n\t\t}\n\n\t\tint Device::maxInputChannels() const\n\t\t{\n\t\t\tif (info_ == NULL)\n\t\t\t\treturn 0;\n\n\t\t\treturn info_->maxInputChannels;\n\t\t}\n\n\t\tint Device::maxOutputChannels() const\n\t\t{\n\t\t\tif (info_ == NULL)\n\t\t\t\treturn 0;\n\n\t\t\treturn info_->maxOutputChannels;\n\t\t}\n\n\t\tPaTime Device::defaultLowInputLatency() const\n\t\t{\n\t\t\tif (info_ == NULL)\n\t\t\t\treturn static_cast<PaTime>(0.0);\n\n\t\t\treturn info_->defaultLowInputLatency;\n\t\t}\n\n\t\tPaTime Device::defaultHighInputLatency() const\n\t\t{\n\t\t\tif (info_ == NULL)\n\t\t\t\treturn static_cast<PaTime>(0.0);\n\n\t\t\treturn info_->defaultHighInputLatency;\n\t\t}\n\n\t\tPaTime Device::defaultLowOutputLatency() const\n\t\t{\n\t\t\tif (info_ == NULL)\n\t\t\t\treturn static_cast<PaTime>(0.0);\n\n\t\t\treturn info_->defaultLowOutputLatency;\n\t\t}\n\n\t\tPaTime Device::defaultHighOutputLatency() const\n\t\t{\n\t\t\tif (info_ == NULL)\n\t\t\t\treturn static_cast<PaTime>(0.0);\n\n\t\t\treturn info_->defaultHighOutputLatency;\n\t\t}\n\n\t\tdouble Device::defaultSampleRate() const\n\t\t{\n\t\t\tif (info_ == NULL)\n\t\t\t\treturn 0.0;\n\n\t\t\treturn info_->defaultSampleRate;\n\t\t}\n\n\t\t// -------------------------------------------------------------------------------\n\n\t\tbool Device::isInputOnlyDevice() const\n\t\t{\n\t\t\treturn (maxOutputChannels() == 0);\n\t\t}\n\n\t\tbool Device::isOutputOnlyDevice() const\n\t\t{\n\t\t\treturn (maxInputChannels() == 0);\n\t\t}\n\n\t\tbool Device::isFullDuplexDevice() const\n\t\t{\n\t\t\treturn (maxInputChannels() > 0 && maxOutputChannels() > 0);\n\t\t}\n\n\t\tbool Device::isSystemDefaultInputDevice() const\n\t\t{\n\t\t\treturn (System::instance().defaultInputDevice() == *this);\n\t\t}\n\n\t\tbool Device::isSystemDefaultOutputDevice() const\n\t\t{\n\t\t\treturn (System::instance().defaultOutputDevice() == *this);\n\t\t}\n\n\t\tbool Device::isHostApiDefaultInputDevice() const\n\t\t{\n\t\t\treturn (hostApi().defaultInputDevice() == *this);\n\t\t}\n\n\t\tbool Device::isHostApiDefaultOutputDevice() const\n\t\t{\n\t\t\treturn (hostApi().defaultOutputDevice() == *this);\n\t\t}\n\n\t\t// -------------------------------------------------------------------------------\n\n\t\tbool Device::operator==(const Device &rhs) const\n\t\t{\n\t\t\treturn (index_ == rhs.index_);\n\t\t}\n\n\t\tbool Device::operator!=(const Device &rhs) const\n\t\t{\n\t\t\treturn !(*this == rhs);\n\t\t}\n\n\t\t// -------------------------------------------------------------------------------\n\n\t\tHostApi &Device::hostApi()\n\t\t{\n\t\t\t// NOTE: will cause an exception when called for the null device\n\t\t\tif (info_ == NULL)\n\t\t\t\tthrow PaException(paInternalError);\n\n\t\t\treturn System::instance().hostApiByIndex(info_->hostApi);\n\t\t}\n\n\t\tconst HostApi &Device::hostApi() const\n\t\t{\n\t\t\t// NOTE; will cause an exception when called for the null device\n\t\t\tif (info_ == NULL)\n\t\t\t\tthrow PaException(paInternalError);\n\n\t\t\treturn System::instance().hostApiByIndex(info_->hostApi);\n\t\t}\n\n\t\t// -------------------------------------------------------------------------------\n\n} // namespace portaudio\n\n\n"
  },
  {
    "path": "thirdparty/portaudio/bindings/cpp/source/portaudiocpp/DirectionSpecificStreamParameters.cxx",
    "content": "#include \"portaudiocpp/DirectionSpecificStreamParameters.hxx\"\n\n#include \"portaudiocpp/Device.hxx\"\n\nnamespace portaudio\n{\n\n\t// -----------------------------------------------------------------------------------\n\n\t//////\n\t/// Returns a `nil' DirectionSpecificStreamParameters object. This can be used to \n\t/// specify that one direction of a Stream is not required (i.e. when creating \n\t/// a half-duplex Stream). All fields of the null DirectionSpecificStreamParameters \n\t/// object are invalid except for the device and the number of channel, which are set \n\t/// to paNoDevice and 0 respectively.\n\t//////\n\tDirectionSpecificStreamParameters DirectionSpecificStreamParameters::null()\n\t{\n\t\tDirectionSpecificStreamParameters tmp;\n\t\ttmp.paStreamParameters_.device = paNoDevice;\n\t\ttmp.paStreamParameters_.channelCount = 0;\n\t\treturn tmp;\n\t}\n\n\t// -----------------------------------------------------------------------------------\n\n\t//////\n\t/// Default constructor -- all parameters will be uninitialized.\n\t//////\n\tDirectionSpecificStreamParameters::DirectionSpecificStreamParameters()\n\t{\n\t}\n\n\t//////\n\t/// Constructor which sets all required fields.\n\t//////\n\tDirectionSpecificStreamParameters::DirectionSpecificStreamParameters(const Device &device, int numChannels, \n\t\tSampleDataFormat format, bool interleaved, PaTime suggestedLatency, void *hostApiSpecificStreamInfo)\n\t{\n\t\tsetDevice(device);\n\t\tsetNumChannels(numChannels);\n\t\tsetSampleFormat(format, interleaved);\n\t\tsetSuggestedLatency(suggestedLatency);\n\t\tsetHostApiSpecificStreamInfo(hostApiSpecificStreamInfo);\n\t}\n\n\t// -----------------------------------------------------------------------------------\n\n\tvoid DirectionSpecificStreamParameters::setDevice(const Device &device)\n\t{\n\t\tpaStreamParameters_.device = device.index();\n\t}\n\n\tvoid DirectionSpecificStreamParameters::setNumChannels(int numChannels)\n\t{\n\t\tpaStreamParameters_.channelCount = numChannels;\n\t}\n\n\tvoid DirectionSpecificStreamParameters::setSampleFormat(SampleDataFormat format, bool interleaved)\n\t{\n\t\tpaStreamParameters_.sampleFormat = static_cast<PaSampleFormat>(format);\n\n\t\tif (!interleaved)\n\t\t\tpaStreamParameters_.sampleFormat |= paNonInterleaved;\n\t}\n\n\tvoid DirectionSpecificStreamParameters::setHostApiSpecificSampleFormat(PaSampleFormat format, bool interleaved)\n\t{\n\t\tpaStreamParameters_.sampleFormat = format;\n\n\t\tpaStreamParameters_.sampleFormat |= paCustomFormat;\n\n\t\tif (!interleaved)\n\t\t\tpaStreamParameters_.sampleFormat |= paNonInterleaved;\n\t}\n\n\tvoid DirectionSpecificStreamParameters::setSuggestedLatency(PaTime latency)\n\t{\n\t\tpaStreamParameters_.suggestedLatency = latency;\n\t}\n\n\tvoid DirectionSpecificStreamParameters::setHostApiSpecificStreamInfo(void *streamInfo)\n\t{\n\t\tpaStreamParameters_.hostApiSpecificStreamInfo = streamInfo;\n\t}\n\n\t// -----------------------------------------------------------------------------------\n\n\tPaStreamParameters *DirectionSpecificStreamParameters::paStreamParameters()\n\t{\n\t\tif (paStreamParameters_.channelCount > 0 && paStreamParameters_.device != paNoDevice)\n\t\t\treturn &paStreamParameters_;\n\t\telse\n\t\t\treturn NULL;\n\t}\n\n\tconst PaStreamParameters *DirectionSpecificStreamParameters::paStreamParameters() const\n\t{\n\t\tif (paStreamParameters_.channelCount > 0 && paStreamParameters_.device != paNoDevice)\n\t\t\treturn &paStreamParameters_;\n\t\telse\n\t\t\treturn NULL;\n\t}\n\n\tDevice &DirectionSpecificStreamParameters::device() const\n\t{\n\t\treturn System::instance().deviceByIndex(paStreamParameters_.device);\n\t}\n\n\tint DirectionSpecificStreamParameters::numChannels() const\n\t{\n\t\treturn paStreamParameters_.channelCount;\n\t}\n\n\t//////\n\t/// Returns the (non host api-specific) sample format, without including \n\t/// the paNonInterleaved flag. If the sample format is host api-spefific, \n\t/// INVALID_FORMAT (0) will be returned.\n\t//////\n\tSampleDataFormat DirectionSpecificStreamParameters::sampleFormat() const\n\t{\n\t\tif (isSampleFormatHostApiSpecific())\n\t\t\treturn INVALID_FORMAT;\n\t\telse\n\t\t\treturn static_cast<SampleDataFormat>(paStreamParameters_.sampleFormat & ~paNonInterleaved);\n\t}\n\n\tbool DirectionSpecificStreamParameters::isSampleFormatInterleaved() const\n\t{\n\t\treturn ((paStreamParameters_.sampleFormat & paNonInterleaved) == 0);\n\t}\n\n\tbool DirectionSpecificStreamParameters::isSampleFormatHostApiSpecific() const\n\t{\n\t\treturn ((paStreamParameters_.sampleFormat & paCustomFormat) == 0);\n\t}\n\n\t//////\n\t/// Returns the host api-specific sample format, without including any \n\t/// paCustomFormat or paNonInterleaved flags. Will return 0 if the sample format is \n\t/// not host api-specific.\n\t//////\n\tPaSampleFormat DirectionSpecificStreamParameters::hostApiSpecificSampleFormat() const\n\t{\n\t\tif (isSampleFormatHostApiSpecific())\n\t\t\treturn paStreamParameters_.sampleFormat & ~paCustomFormat & ~paNonInterleaved;\n\t\telse\n\t\t\treturn 0;\n\t}\n\n\tPaTime DirectionSpecificStreamParameters::suggestedLatency() const\n\t{\n\t\treturn paStreamParameters_.suggestedLatency;\n\t}\n\n\tvoid *DirectionSpecificStreamParameters::hostApiSpecificStreamInfo() const\n\t{\n\t\treturn paStreamParameters_.hostApiSpecificStreamInfo;\n\t}\n\n\t// -----------------------------------------------------------------------------------\n\n} // namespace portaudio\n"
  },
  {
    "path": "thirdparty/portaudio/bindings/cpp/source/portaudiocpp/Exception.cxx",
    "content": "#include \"portaudiocpp/Exception.hxx\"\n\nnamespace portaudio\n{\n\t// -----------------------------------------------------------------------------------\n\t// PaException:\n\t// -----------------------------------------------------------------------------------\n\n\t//////\n\t///  Wraps a PortAudio error into a PortAudioCpp PaException.\n\t//////\n\tPaException::PaException(PaError error) : error_(error)\n\t{\n\t}\n\n\t// -----------------------------------------------------------------------------------\n\n\t//////\n\t/// Alias for paErrorText(), to have std::exception compliance.\n\t//////\n\tconst char *PaException::what() const throw()\n\t{\n\t\treturn paErrorText();\n\t}\n\n\t// -----------------------------------------------------------------------------------\n\n\t//////\n\t/// Returns the PortAudio error code (PaError).\n\t//////\n\tPaError PaException::paError() const\n\t{\n\t\treturn error_;\n\t}\n\n\t//////\n\t/// Returns the error as a (zero-terminated) text string.\n\t//////\n\tconst char *PaException::paErrorText() const\n\t{\n\t\treturn Pa_GetErrorText(error_);\n\t}\n\n\t//////\n\t/// Returns true is the error is a HostApi error.\n\t//////\n\tbool PaException::isHostApiError() const\n\t{\n\t\treturn (error_ == paUnanticipatedHostError);\n\t}\n\n\t//////\n\t/// Returns the last HostApi error (which is the current one if \n\t/// isHostApiError() returns true) as an error code.\n\t//////\n\tlong PaException::lastHostApiError() const\n\t{\n\t\treturn Pa_GetLastHostErrorInfo()->errorCode;\n\t}\n\n\t//////\n\t/// Returns the last HostApi error (which is the current one if \n\t/// isHostApiError() returns true) as a (zero-terminated) text \n\t/// string, if it's available.\n\t//////\n\tconst char *PaException::lastHostApiErrorText() const\n\t{\n\t\treturn Pa_GetLastHostErrorInfo()->errorText;\n\t}\n\n\t// -----------------------------------------------------------------------------------\n\n\tbool PaException::operator==(const PaException &rhs) const\n\t{\n\t\treturn (error_ == rhs.error_);\n\t}\n\n\tbool PaException::operator!=(const PaException &rhs) const\n\t{\n\t\treturn !(*this == rhs);\n\t}\n\n\t// -----------------------------------------------------------------------------------\n\t// PaCppException:\n\t// -----------------------------------------------------------------------------------\n\t\n\tPaCppException::PaCppException(ExceptionSpecifier specifier) : specifier_(specifier)\n\t{\n\t}\n\n\tconst char *PaCppException::what() const throw()\n\t{\n\t\tswitch (specifier_)\n\t\t{\n\t\t\tcase UNABLE_TO_ADAPT_DEVICE:\n\t\t\t{\n\t\t\t\treturn \"Unable to adapt the given device to the specified host api specific device extension\";\n\t\t\t}\n\t\t}\n\n\t\treturn \"Unknown exception\";\n\t}\n\n\tPaCppException::ExceptionSpecifier PaCppException::specifier() const\n\t{\n\t\treturn specifier_;\n\t}\n\n\tbool PaCppException::operator==(const PaCppException &rhs) const\n\t{\n\t\treturn (specifier_ == rhs.specifier_);\n\t}\n\n\tbool PaCppException::operator!=(const PaCppException &rhs) const\n\t{\n\t\treturn !(*this == rhs);\n\t}\n\n\t// -----------------------------------------------------------------------------------\n\n} // namespace portaudio\n\n\n"
  },
  {
    "path": "thirdparty/portaudio/bindings/cpp/source/portaudiocpp/HostApi.cxx",
    "content": "#include \"portaudiocpp/HostApi.hxx\"\n\n#include \"portaudiocpp/System.hxx\"\n#include \"portaudiocpp/Device.hxx\"\n#include \"portaudiocpp/SystemDeviceIterator.hxx\"\n#include \"portaudiocpp/Exception.hxx\"\n\nnamespace portaudio\n{\n\n\t// -----------------------------------------------------------------------------------\n\n\tHostApi::HostApi(PaHostApiIndex index) : devices_(NULL)\n\t{\n\t\ttry\n\t\t{\n\t\t\tinfo_ = Pa_GetHostApiInfo(index);\n\n\t\t\t// Create and populate devices array:\n\t\t\tint numDevices = deviceCount();\n\n\t\t\tdevices_ = new Device*[numDevices];\n\n\t\t\tfor (int i = 0; i < numDevices; ++i)\n\t\t\t{\n\t\t\t\tPaDeviceIndex deviceIndex = Pa_HostApiDeviceIndexToDeviceIndex(index, i);\n\n\t\t\t\tif (deviceIndex < 0)\n\t\t\t\t{\n\t\t\t\t\tthrow PaException(deviceIndex);\n\t\t\t\t}\n\n\t\t\t\tdevices_[i] = &System::instance().deviceByIndex(deviceIndex);\n\t\t\t}\n\t\t}\n\t\tcatch (const std::exception &e)\n\t\t{\n\t\t\t// Delete any (partially) constructed objects (deconstructor isn't called):\n\t\t\tdelete[] devices_; // devices_ is either NULL or valid\n\n\t\t\t// Re-throw exception:\n\t\t\tthrow e;\n\t\t}\n\t}\n\n\tHostApi::~HostApi()\n\t{\n\t\t// Destroy devices array:\n\t\tdelete[] devices_;\n\t}\n\n\t// -----------------------------------------------------------------------------------\n\n\tPaHostApiTypeId HostApi::typeId() const\n\t{\n\t\treturn info_->type;\n\t}\n\n\tPaHostApiIndex HostApi::index() const\n\t{\n\t\tPaHostApiIndex index = Pa_HostApiTypeIdToHostApiIndex(typeId());\n\n\t\tif (index < 0)\n\t\t\tthrow PaException(index);\n\n\t\treturn index;\n\t}\n\n\tconst char *HostApi::name() const\n\t{\n\t\treturn info_->name;\n\t}\n\n\tint HostApi::deviceCount() const\n\t{\n\t\treturn info_->deviceCount;\n\t}\n\n\t// -----------------------------------------------------------------------------------\n\n\tHostApi::DeviceIterator HostApi::devicesBegin()\n\t{\n\t\tDeviceIterator tmp;\n\t\ttmp.ptr_ = &devices_[0]; // begin (first element)\n\t\treturn tmp;\n\t}\n\n\tHostApi::DeviceIterator HostApi::devicesEnd()\n\t{\n\t\tDeviceIterator tmp;\n\t\ttmp.ptr_ = &devices_[deviceCount()]; // end (one past last element)\n\t\treturn tmp;\n\t}\n\n\t// -----------------------------------------------------------------------------------\n\n\tDevice &HostApi::defaultInputDevice() const\n\t{\n\t\treturn System::instance().deviceByIndex(info_->defaultInputDevice);\n\t}\n\n\tDevice &HostApi::defaultOutputDevice() const\n\t{\n\t\treturn System::instance().deviceByIndex(info_->defaultOutputDevice);\n\t}\n\n\t// -----------------------------------------------------------------------------------\n\n\tbool HostApi::operator==(const HostApi &rhs) const\n\t{\n\t\treturn (typeId() == rhs.typeId());\n\t}\n\n\tbool HostApi::operator!=(const HostApi &rhs) const\n\t{\n\t\treturn !(*this == rhs);\n\t}\n\n\t// -----------------------------------------------------------------------------------\n\n} // namespace portaudio\n"
  },
  {
    "path": "thirdparty/portaudio/bindings/cpp/source/portaudiocpp/InterfaceCallbackStream.cxx",
    "content": "#include \"portaudiocpp/InterfaceCallbackStream.hxx\"\n\n#include \"portaudiocpp/StreamParameters.hxx\"\n#include \"portaudiocpp/Exception.hxx\"\n#include \"portaudiocpp/CallbackInterface.hxx\"\n\nnamespace portaudio\n{\n\n\t// ---------------------------------------------------------------------------------==\n\n\tInterfaceCallbackStream::InterfaceCallbackStream()\n\t{\n\t}\n\n\tInterfaceCallbackStream::InterfaceCallbackStream(const StreamParameters &parameters, CallbackInterface &instance)\n\t{\n\t\topen(parameters, instance);\n\t}\n\n\tInterfaceCallbackStream::~InterfaceCallbackStream()\n\t{\n\t\ttry\n\t\t{\n\t\t\tclose();\n\t\t}\n\t\tcatch (...)\n\t\t{\n\t\t\t// ignore all errors\n\t\t}\n\t}\n\n\t// ---------------------------------------------------------------------------------==\n\n\tvoid InterfaceCallbackStream::open(const StreamParameters &parameters, CallbackInterface &instance)\n\t{\n\t\tPaError err = Pa_OpenStream(&stream_, parameters.inputParameters().paStreamParameters(), parameters.outputParameters().paStreamParameters(), \n\t\t\tparameters.sampleRate(), parameters.framesPerBuffer(), parameters.flags(), &impl::callbackInterfaceToPaCallbackAdapter, static_cast<void *>(&instance));\n\n\t\tif (err != paNoError)\n\t\t{\n\t\t\tthrow PaException(err);\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "thirdparty/portaudio/bindings/cpp/source/portaudiocpp/MemFunCallbackStream.cxx",
    "content": "#include \"portaudiocpp/MemFunCallbackStream.hxx\"\n\n// (... template class ...)\n\n"
  },
  {
    "path": "thirdparty/portaudio/bindings/cpp/source/portaudiocpp/Stream.cxx",
    "content": "#include \"portaudiocpp/Stream.hxx\"\n\n#include <cstddef>\n\n#include \"portaudiocpp/Exception.hxx\"\n#include \"portaudiocpp/System.hxx\"\n\nnamespace portaudio\n{\n\n\t// -----------------------------------------------------------------------------------\n\n\tStream::Stream() : stream_(NULL)\n\t{\n\t}\n\n\tStream::~Stream()\n\t{\n\t\t// (can't call close here, \n\t\t// the derived class should atleast call \n\t\t// close() in it's deconstructor)\n\t}\n\n\t// -----------------------------------------------------------------------------------\n\n\t//////\n\t/// Closes the Stream if it's open, else does nothing.\n\t//////\n\tvoid Stream::close()\n\t{\n\t\tif (isOpen() && System::exists())\n\t\t{\n\t\t\tPaError err = Pa_CloseStream(stream_);\n\t\t\tstream_ = NULL;\n\n\t\t\tif (err != paNoError)\n\t\t\t\tthrow PaException(err);\n\t\t}\n\t}\n\n\t//////\n\t/// Returns true if the Stream is open.\n\t//////\n\tbool Stream::isOpen() const\n\t{\n\t\treturn (stream_ != NULL);\n\t}\n\n\t// -----------------------------------------------------------------------------------\n\n\tvoid Stream::setStreamFinishedCallback(PaStreamFinishedCallback *callback)\n\t{\n\t\tPaError err = Pa_SetStreamFinishedCallback(stream_, callback);\n\n\t\tif (err != paNoError)\n\t\t\tthrow PaException(err);\n\t}\n\n\t// -----------------------------------------------------------------------------------\n\n\tvoid Stream::start()\n\t{\n\t\tPaError err = Pa_StartStream(stream_);\n\n\t\tif (err != paNoError)\n\t\t\tthrow PaException(err);\n\t}\n\n\tvoid Stream::stop()\n\t{\n\t\tPaError err = Pa_StopStream(stream_);\n\n\t\tif (err != paNoError)\n\t\t\tthrow PaException(err);\n\t}\n\n\tvoid Stream::abort()\n\t{\n\t\tPaError err = Pa_AbortStream(stream_);\n\n\t\tif (err != paNoError)\n\t\t\tthrow PaException(err);\n\t}\n\n\tbool Stream::isStopped() const\n\t{\n\t\tPaError ret = Pa_IsStreamStopped(stream_);\n\n\t\tif (ret < 0)\n\t\t\tthrow PaException(ret);\n\n\t\treturn (ret == 1);\n\t}\n\n\tbool Stream::isActive() const\n\t{\n\t\tPaError ret = Pa_IsStreamActive(stream_);\n\n\t\tif (ret < 0)\n\t\t\tthrow PaException(ret);\n\n\t\treturn (ret == 1);\n\t}\n\n\t// -----------------------------------------------------------------------------------\n\n\t//////\n\t/// Returns the best known input latency for the Stream. This value may differ from the \n\t/// suggested input latency set in the StreamParameters. Includes all sources of \n\t/// latency known to PortAudio such as internal buffering, and Host API reported latency. \n\t/// Doesn't include any estimates of unknown latency.\n\t//////\n\tPaTime Stream::inputLatency() const\n\t{\n\t\tconst PaStreamInfo *info = Pa_GetStreamInfo(stream_);\n\t\tif (info == NULL)\n\t\t{\n\t\t\tthrow PaException(paInternalError);\n\t\t\treturn PaTime(0.0);\n\t\t}\n\n\t\treturn info->inputLatency;\n\t}\n\n\t//////\n\t/// Returns the best known output latency for the Stream. This value may differ from the \n\t/// suggested output latency set in the StreamParameters. Includes all sources of \n\t/// latency known to PortAudio such as internal buffering, and Host API reported latency. \n\t/// Doesn't include any estimates of unknown latency.\n\t//////\n\tPaTime Stream::outputLatency() const\n\t{\n\t\tconst PaStreamInfo *info = Pa_GetStreamInfo(stream_);\n\t\tif (info == NULL)\n\t\t{\n\t\t\tthrow PaException(paInternalError);\n\t\t\treturn PaTime(0.0);\n\t\t}\n\n\t\treturn info->outputLatency;\n\t}\n\n\t//////\n\t/// Returns the sample rate of the Stream. Usually this will be the \n\t/// best known estimate of the used sample rate. For instance when opening a \n\t/// Stream setting 44100.0 Hz in the StreamParameters, the actual sample \n\t/// rate might be something like 44103.2 Hz (due to imperfections in the \n\t/// sound card hardware).\n\t//////\n\tdouble Stream::sampleRate() const\n\t{\n\t\tconst PaStreamInfo *info = Pa_GetStreamInfo(stream_);\n\t\tif (info == NULL)\n\t\t{\n\t\t\tthrow PaException(paInternalError);\n\t\t\treturn 0.0;\n\t\t}\n\n\t\treturn info->sampleRate;\n\t}\n\n\t// -----------------------------------------------------------------------------------\n\n\tPaTime Stream::time() const\n\t{\n\t\treturn Pa_GetStreamTime(stream_);\n\t}\n\n\t// -----------------------------------------------------------------------------------\n\n\t//////\n\t/// Accessor (const) for PortAudio PaStream pointer, useful for interfacing with \n\t/// PortAudio add-ons such as PortMixer for instance. Normally accessing this \n\t/// pointer should not be needed as PortAudioCpp aims to provide all of PortAudio's \n\t/// functionality.\n\t//////\n\tconst PaStream *Stream::paStream() const\n\t{\n\t\treturn stream_;\n\t}\n\n\t//////\n\t/// Accessor (non-const) for PortAudio PaStream pointer, useful for interfacing with \n\t/// PortAudio add-ons such as PortMixer for instance. Normally accessing this \n\t/// pointer should not be needed as PortAudioCpp aims to provide all of PortAudio's \n\t/// functionality.\n\t//////\n\tPaStream *Stream::paStream()\n\t{\n\t\treturn stream_;\n\t}\n\n\t// -----------------------------------------------------------------------------------\n\n} // namespace portaudio\n"
  },
  {
    "path": "thirdparty/portaudio/bindings/cpp/source/portaudiocpp/StreamParameters.cxx",
    "content": "#include \"portaudiocpp/StreamParameters.hxx\"\n\n#include <cstddef>\n\n#include \"portaudiocpp/Device.hxx\"\n\nnamespace portaudio\n{\n\t// -----------------------------------------------------------------------------------\n\n\t//////\n\t/// Default constructor; does nothing.\n\t//////\n\tStreamParameters::StreamParameters()\n\t{\n\t}\n\n\t//////\n\t/// Sets up the all parameters needed to open either a half-duplex or full-duplex Stream.\n\t///\n\t/// @param inputParameters The parameters for the input direction of the to-be opened \n\t/// Stream or DirectionSpecificStreamParameters::null() for an output-only Stream.\n\t/// @param outputParameters The parameters for the output direction of the to-be opened\n\t/// Stream or DirectionSpecificStreamParameters::null() for an input-only Stream.\n\t/// @param sampleRate The to-be opened Stream's sample rate in Hz.\n\t/// @param framesPerBuffer The number of frames per buffer for a CallbackStream, or \n\t/// the preferred buffer granularity for a BlockingStream.\n\t/// @param flags The flags for the to-be opened Stream; default paNoFlag.\n\t//////\n\tStreamParameters::StreamParameters(const DirectionSpecificStreamParameters &inputParameters, \n\t\tconst DirectionSpecificStreamParameters &outputParameters, double sampleRate, unsigned long framesPerBuffer, \n\t\tPaStreamFlags flags) : inputParameters_(inputParameters), outputParameters_(outputParameters), \n\t\tsampleRate_(sampleRate), framesPerBuffer_(framesPerBuffer), flags_(flags)\n\t{\n\t}\n\n\t// -----------------------------------------------------------------------------------\n\n\t//////\n\t/// Sets the requested sample rate. If this sample rate isn't supported by the hardware, the \n\t/// Stream will fail to open. The real-life sample rate used might differ slightly due to \n\t/// imperfections in the sound card hardware; use Stream::sampleRate() to retrieve the \n\t/// best known estimate for this value.\n\t//////\n\tvoid StreamParameters::setSampleRate(double sampleRate)\n\t{\n\t\tsampleRate_ = sampleRate;\n\t}\n\n\t//////\n\t/// Either the number of frames per buffer for a CallbackStream, or \n\t/// the preferred buffer granularity for a BlockingStream. See PortAudio \n\t/// documentation.\n\t//////\n\tvoid StreamParameters::setFramesPerBuffer(unsigned long framesPerBuffer)\n\t{\n\t\tframesPerBuffer_ = framesPerBuffer;\n\t}\n\n\t//////\n\t/// Sets the specified flag or does nothing when the flag is already set. Doesn't \n\t/// `unset' any previously existing flags (use clearFlags() for that).\n\t//////\n\tvoid StreamParameters::setFlag(PaStreamFlags flag)\n\t{\n\t\tflags_ |= flag;\n\t}\n\n\t//////\n\t/// Unsets the specified flag or does nothing if the flag isn't set. Doesn't affect \n\t/// any other flags.\n\t//////\n\tvoid StreamParameters::unsetFlag(PaStreamFlags flag)\n\t{\n\t\tflags_ &= ~flag;\n\t}\n\n\t//////\n\t/// Clears or `unsets' all set flags.\n\t//////\n\tvoid StreamParameters::clearFlags()\n\t{\n\t\tflags_ = paNoFlag;\n\t}\n\n\t// -----------------------------------------------------------------------------------\n\n\tvoid StreamParameters::setInputParameters(const DirectionSpecificStreamParameters &parameters)\n\t{\n\t\tinputParameters_ = parameters;\n\t}\n\n\tvoid StreamParameters::setOutputParameters(const DirectionSpecificStreamParameters &parameters)\n\t{\n\t\toutputParameters_ = parameters;\n\t}\n\n\t// -----------------------------------------------------------------------------------\n\n\tbool StreamParameters::isSupported() const\n\t{\n\t\treturn (Pa_IsFormatSupported(inputParameters_.paStreamParameters(), \n\t\t\toutputParameters_.paStreamParameters(), sampleRate_) == paFormatIsSupported);\n\t}\n\n\t// -----------------------------------------------------------------------------------\n\n\tdouble StreamParameters::sampleRate() const\n\t{\n\t\treturn sampleRate_;\n\t}\n\n\tunsigned long StreamParameters::framesPerBuffer() const\n\t{\n\t\treturn framesPerBuffer_;\n\t}\n\n\t//////\n\t/// Returns all currently set flags as a binary combined \n\t/// integer value (PaStreamFlags). Use isFlagSet() to \n\t/// avoid dealing with the bitmasks.\n\t//////\n\tPaStreamFlags StreamParameters::flags() const\n\t{\n\t\treturn flags_;\n\t}\n\n\t//////\n\t/// Returns true if the specified flag is currently set \n\t/// or false if it isn't.\n\t//////\n\tbool StreamParameters::isFlagSet(PaStreamFlags flag) const\n\t{\n\t\treturn ((flags_ & flag) != 0);\n\t}\n\n\t// -----------------------------------------------------------------------------------\n\n\tDirectionSpecificStreamParameters &StreamParameters::inputParameters()\n\t{\n\t\treturn inputParameters_;\n\t}\n\n\tconst DirectionSpecificStreamParameters &StreamParameters::inputParameters() const\n\t{\n\t\treturn inputParameters_;\n\t}\n\n\tDirectionSpecificStreamParameters &StreamParameters::outputParameters()\n\t{\n\t\treturn outputParameters_;\n\t}\n\n\tconst DirectionSpecificStreamParameters &StreamParameters::outputParameters() const\n\t{\n\t\treturn outputParameters_;\n\t}\n\n\t// -----------------------------------------------------------------------------------\n} // namespace portaudio\n\n\n\n\n\n"
  },
  {
    "path": "thirdparty/portaudio/bindings/cpp/source/portaudiocpp/System.cxx",
    "content": "#include \"portaudiocpp/System.hxx\"\n\n#include <cstddef>\n#include <cassert>\n\n#include \"portaudiocpp/HostApi.hxx\"\n#include \"portaudiocpp/Device.hxx\"\n#include \"portaudiocpp/Stream.hxx\"\n#include \"portaudiocpp/Exception.hxx\"\n#include \"portaudiocpp/SystemHostApiIterator.hxx\"\n#include \"portaudiocpp/SystemDeviceIterator.hxx\"\n\nnamespace portaudio\n{\n\t// -----------------------------------------------------------------------------------\n\n\t// Static members:\n\tSystem *System::instance_ = NULL;\n\tint System::initCount_ = 0;\n\tHostApi **System::hostApis_ = NULL;\n\tDevice **System::devices_ = NULL;\n\tDevice *System::nullDevice_ = NULL;\n\n\t// -----------------------------------------------------------------------------------\n\n\tint System::version()\n\t{\n\t\treturn Pa_GetVersion();\n\t}\n\n\tconst char *System::versionText()\n\t{\n\t\treturn Pa_GetVersionText();\n\t}\n\n\tvoid System::initialize()\n\t{\n\t\t++initCount_;\n\n\t\tif (initCount_ == 1)\n\t\t{\n\t\t\t// Create singleton:\n\t\t\tassert(instance_ == NULL);\n\t\t\tinstance_ = new System();\n\n\t\t\t// Initialize the PortAudio system:\n\t\t\t{\n\t\t\t\tPaError err = Pa_Initialize();\n\n\t\t\t\tif (err != paNoError)\n\t\t\t\t\tthrow PaException(err);\n\t\t\t}\n\n\t\t\t// Create and populate device array:\n\t\t\t{\n\t\t\t\tint numDevices = instance().deviceCount();\n\n\t\t\t\tdevices_ = new Device*[numDevices];\n\n\t\t\t\tfor (int i = 0; i < numDevices; ++i)\n\t\t\t\t\tdevices_[i] = new Device(i);\n\t\t\t}\n\n\t\t\t// Create and populate host api array:\n\t\t\t{\n\t\t\t\tint numHostApis = instance().hostApiCount();\n\n\t\t\t\thostApis_ = new HostApi*[numHostApis];\n\n\t\t\t\tfor (int i = 0; i < numHostApis; ++i)\n\t\t\t\t\thostApis_[i] = new HostApi(i);\n\t\t\t}\n\t\t\t\n\t\t\t// Create null device:\n\t\t\tnullDevice_ = new Device(paNoDevice);\n\t\t}\n\t}\n\n\tvoid System::terminate()\n\t{\n\t\tPaError err = paNoError;\n\n\t\tif (initCount_ == 1)\n\t\t{\n\t\t\t// Destroy null device:\n\t\t\tdelete nullDevice_;\n\n\t\t\t// Destroy host api array:\n\t\t\t{\n\t\t\t\tif (hostApis_ != NULL)\n\t\t\t\t{\n\t\t\t\t\tint numHostApis = instance().hostApiCount();\n\n\t\t\t\t\tfor (int i = 0; i < numHostApis; ++i)\n\t\t\t\t\t\tdelete hostApis_[i];\n\n\t\t\t\t\tdelete[] hostApis_;\n\t\t\t\t\thostApis_ = NULL;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Destroy device array:\n\t\t\t{\n\t\t\t\tif (devices_ != NULL)\n\t\t\t\t{\n\t\t\t\t\tint numDevices = instance().deviceCount();\n\n\t\t\t\t\tfor (int i = 0; i < numDevices; ++i)\n\t\t\t\t\t\tdelete devices_[i];\n\n\t\t\t\t\tdelete[] devices_;\n\t\t\t\t\tdevices_ = NULL;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Terminate the PortAudio system:\n\t\t\tassert(instance_ != NULL);\n\t\t\terr = Pa_Terminate();\n\n\t\t\t// Destroy singleton:\n\t\t\tdelete instance_;\n\t\t\tinstance_ = NULL;\n\t\t}\n\n\t\tif (initCount_ > 0)\n\t\t\t--initCount_;\n\n\t\tif (err != paNoError)\n\t\t\tthrow PaException(err);\n\t}\n\n\n\tSystem &System::instance()\n\t{\n\t\tassert(exists());\n\n\t\treturn *instance_;\n\t}\n\n\tbool System::exists()\n\t{\n\t\treturn (instance_ != NULL);\n\t}\n\n\t// -----------------------------------------------------------------------------------\n\n\tSystem::HostApiIterator System::hostApisBegin()\n\t{\n\t\tSystem::HostApiIterator tmp;\n\t\ttmp.ptr_ = &hostApis_[0]; // begin (first element)\n\t\treturn tmp;\n\t}\n\n\tSystem::HostApiIterator System::hostApisEnd()\n\t{\n\t\tint count = hostApiCount();\n\n\t\tSystem::HostApiIterator tmp;\n\t\ttmp.ptr_ = &hostApis_[count]; // end (one past last element)\n\t\treturn tmp;\n\t}\n\n\tHostApi &System::defaultHostApi()\n\t{\n\t\tPaHostApiIndex defaultHostApi = Pa_GetDefaultHostApi();\n\n\t\tif (defaultHostApi < 0)\n\t\t\tthrow PaException(defaultHostApi);\n\n\t\treturn *hostApis_[defaultHostApi];\n\t}\n\n\tHostApi &System::hostApiByTypeId(PaHostApiTypeId type)\n\t{\n\t\tPaHostApiIndex index = Pa_HostApiTypeIdToHostApiIndex(type);\n\n\t\tif (index < 0)\n\t\t\tthrow PaException(index);\n\n\t\treturn *hostApis_[index];\n\t}\n\n\tHostApi &System::hostApiByIndex(PaHostApiIndex index)\n\t{\n\t\tif (index < 0 || index >= hostApiCount())\n\t\t\tthrow PaException(paInternalError);\n\n\t\treturn *hostApis_[index];\n\t}\n\n\tint System::hostApiCount()\n\t{\n\t\tPaHostApiIndex count = Pa_GetHostApiCount();\n\n\t\tif (count < 0)\n\t\t\tthrow PaException(count);\n\n\t\treturn count;\n\t}\n\n\t// -----------------------------------------------------------------------------------\n\n\tSystem::DeviceIterator System::devicesBegin()\n\t{\n\t\tDeviceIterator tmp;\n\t\ttmp.ptr_ = &devices_[0];\n\n\t\treturn tmp;\n\t}\n\n\tSystem::DeviceIterator System::devicesEnd()\n\t{\n\t\tint count = deviceCount();\n\n\t\tDeviceIterator tmp;\n\t\ttmp.ptr_ = &devices_[count];\n\n\t\treturn tmp;\n\t}\n\n\t//////\n\t/// Returns the System's default input Device, or the null Device if none \n\t/// was available.\n\t//////\n\tDevice &System::defaultInputDevice()\n\t{\n\t\tPaDeviceIndex index = Pa_GetDefaultInputDevice();\n\t\treturn deviceByIndex(index);\n\t}\n\n\t//////\n\t/// Returns the System's default output Device, or the null Device if none \n\t/// was available.\n\t//////\n\tDevice &System::defaultOutputDevice()\n\t{\n\t\tPaDeviceIndex index = Pa_GetDefaultOutputDevice();\n\t\treturn deviceByIndex(index);\n\t}\n\n\t//////\n\t/// Returns the Device for the given index.\n\t/// Will throw a paInternalError equivalent PaException if the given index \n\t/// is out of range.\n\t//////\n\tDevice &System::deviceByIndex(PaDeviceIndex index)\n\t{\n\t\tif (index < -1 || index >= deviceCount())\n\t\t{\n\t\t\tthrow PaException(paInternalError);\n\t\t}\n\n\t\tif (index == -1)\n\t\t\treturn System::instance().nullDevice();\n\n\t\treturn *devices_[index];\n\t}\n\n\tint System::deviceCount()\n\t{\n\t\tPaDeviceIndex count = Pa_GetDeviceCount();\n\n\t\tif (count < 0)\n\t\t\tthrow PaException(count);\n\n\t\treturn count;\n\t}\n\n\tDevice &System::nullDevice()\n\t{\n\t\treturn *nullDevice_;\n\t}\n\n\t// -----------------------------------------------------------------------------------\n\n\tvoid System::sleep(long msec)\n\t{\n\t\tPa_Sleep(msec);\n\t}\n\n\tint System::sizeOfSample(PaSampleFormat format)\n\t{\n\t\tPaError err = Pa_GetSampleSize(format);\n\t\tif (err < 0)\n\t\t{\n\t\t\tthrow PaException(err);\n\t\t\treturn 0;\n\t\t}\n\n\t\treturn err;\n\t}\n\n\t// -----------------------------------------------------------------------------------\n\n\tSystem::System()\n\t{\n\t\t// (left blank intentionally)\n\t}\n\n\tSystem::~System()\n\t{\n\t\t// (left blank intentionally)\n\t}\n\n\t// -----------------------------------------------------------------------------------\n\n} // namespace portaudio\n\n"
  },
  {
    "path": "thirdparty/portaudio/bindings/cpp/source/portaudiocpp/SystemDeviceIterator.cxx",
    "content": "#include \"portaudiocpp/SystemDeviceIterator.hxx\"\n\nnamespace portaudio\n{\n\t// -----------------------------------------------------------------------------------\n\n\tDevice &System::DeviceIterator::operator*() const\n\t{\n\t\treturn **ptr_;\n\t}\n\n\tDevice *System::DeviceIterator::operator->() const\n\t{\n\t\treturn &**this;\n\t}\n\n\t// -----------------------------------------------------------------------------------\n\n\tSystem::DeviceIterator &System::DeviceIterator::operator++()\n\t{\n\t\t++ptr_;\n\t\treturn *this;\n\t}\n\n\tSystem::DeviceIterator System::DeviceIterator::operator++(int)\n\t{\n\t\tSystem::DeviceIterator prev = *this;\n\t\t++*this;\n\t\treturn prev;\n\t}\n\n\tSystem::DeviceIterator &System::DeviceIterator::operator--()\n\t{\n\t\t--ptr_;\n\t\treturn *this;\n\t}\n\n\tSystem::DeviceIterator System::DeviceIterator::operator--(int)\n\t{\n\t\tSystem::DeviceIterator prev = *this;\n\t\t--*this;\n\t\treturn prev;\n\t}\n\n\t// -----------------------------------------------------------------------------------\n\n\tbool System::DeviceIterator::operator==(const System::DeviceIterator &rhs) const\n\t{\n\t\treturn (ptr_ == rhs.ptr_);\n\t}\n\n\tbool System::DeviceIterator::operator!=(const System::DeviceIterator &rhs) const\n\t{\n\t\treturn !(*this == rhs);\n\t}\n\n\t// -----------------------------------------------------------------------------------\n} // namespace portaudio\n\n\n"
  },
  {
    "path": "thirdparty/portaudio/bindings/cpp/source/portaudiocpp/SystemHostApiIterator.cxx",
    "content": "#include \"portaudiocpp/SystemHostApiIterator.hxx\"\n\nnamespace portaudio\n{\n\t// -----------------------------------------------------------------------------------\n\n\tHostApi &System::HostApiIterator::operator*() const\n\t{\n\t\treturn **ptr_;\n\t}\n\n\tHostApi *System::HostApiIterator::operator->() const\n\t{\n\t\treturn &**this;\n\t}\n\n\t// -----------------------------------------------------------------------------------\n\n\tSystem::HostApiIterator &System::HostApiIterator::operator++()\n\t{\n\t\t++ptr_;\n\t\treturn *this;\n\t}\n\n\tSystem::HostApiIterator System::HostApiIterator::operator++(int)\n\t{\n\t\tSystem::HostApiIterator prev = *this;\n\t\t++*this;\n\t\treturn prev;\n\t}\n\n\tSystem::HostApiIterator &System::HostApiIterator::operator--()\n\t{\n\t\t--ptr_;\n\t\treturn *this;\n\t}\n\n\tSystem::HostApiIterator System::HostApiIterator::operator--(int)\n\t{\n\t\tSystem::HostApiIterator prev = *this;\n\t\t--*this;\n\t\treturn prev;\n\t}\n\n\t// -----------------------------------------------------------------------------------\n\n\tbool System::HostApiIterator::operator==(const System::HostApiIterator &rhs) const\n\t{\n\t\treturn (ptr_ == rhs.ptr_);\n\t}\n\n\tbool System::HostApiIterator::operator!=(const System::HostApiIterator &rhs) const\n\t{\n\t\treturn !(*this == rhs);\n\t}\n\n\t// -----------------------------------------------------------------------------------\n} // namespace portaudio\n\n"
  },
  {
    "path": "thirdparty/portaudio/bindings/java/c/build/vs2010/PortAudioJNI/PortAudioJNI.sln",
    "content": "﻿\r\nMicrosoft Visual Studio Solution File, Format Version 11.00\r\n# Visual Studio 2010\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"PortAudioJNI\", \"PortAudioJNI.vcxproj\", \"{4024D885-39B0-4C8A-B3E7-BAB4BA08DFBB}\"\r\nEndProject\r\nGlobal\r\n\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\r\n\t\tDebug|Win32 = Debug|Win32\r\n\t\tDebug|x64 = Debug|x64\r\n\t\tRelease|Win32 = Release|Win32\r\n\t\tRelease|x64 = Release|x64\r\n\tEndGlobalSection\r\n\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\r\n\t\t{4024D885-39B0-4C8A-B3E7-BAB4BA08DFBB}.Debug|Win32.ActiveCfg = Debug|Win32\r\n\t\t{4024D885-39B0-4C8A-B3E7-BAB4BA08DFBB}.Debug|Win32.Build.0 = Debug|Win32\r\n\t\t{4024D885-39B0-4C8A-B3E7-BAB4BA08DFBB}.Debug|x64.ActiveCfg = Debug|x64\r\n\t\t{4024D885-39B0-4C8A-B3E7-BAB4BA08DFBB}.Debug|x64.Build.0 = Debug|x64\r\n\t\t{4024D885-39B0-4C8A-B3E7-BAB4BA08DFBB}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{4024D885-39B0-4C8A-B3E7-BAB4BA08DFBB}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{4024D885-39B0-4C8A-B3E7-BAB4BA08DFBB}.Release|x64.ActiveCfg = Release|x64\r\n\t\t{4024D885-39B0-4C8A-B3E7-BAB4BA08DFBB}.Release|x64.Build.0 = Release|x64\r\n\tEndGlobalSection\r\n\tGlobalSection(SolutionProperties) = preSolution\r\n\t\tHideSolutionNode = FALSE\r\n\tEndGlobalSection\r\nEndGlobal\r\n"
  },
  {
    "path": "thirdparty/portaudio/bindings/java/c/build/vs2010/PortAudioJNI/PortAudioJNI.vcproj",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\r\n<VisualStudioProject\r\n\tProjectType=\"Visual C++\"\r\n\tVersion=\"9.00\"\r\n\tName=\"PortAudioJNI\"\r\n\tProjectGUID=\"{4024D885-39B0-4C8A-B3E7-BAB4BA08DFBB}\"\r\n\tRootNamespace=\"PortAudioJNI\"\r\n\tKeyword=\"Win32Proj\"\r\n\tTargetFrameworkVersion=\"196613\"\r\n\t>\r\n\t<Platforms>\r\n\t\t<Platform\r\n\t\t\tName=\"Win32\"\r\n\t\t/>\r\n\t</Platforms>\r\n\t<ToolFiles>\r\n\t</ToolFiles>\r\n\t<Configurations>\r\n\t\t<Configuration\r\n\t\t\tName=\"Debug|Win32\"\r\n\t\t\tOutputDirectory=\"..\\..\\..\\..\\jportaudio\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"2\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tOptimization=\"0\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"C:\\glassfish3\\jdk\\include;C:\\glassfish3\\jdk\\include\\win32\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;_DEBUG;_WINDOWS;_USRDLL;PORTAUDIOJNI_EXPORTS\"\r\n\t\t\t\tMinimalRebuild=\"true\"\r\n\t\t\t\tBasicRuntimeChecks=\"3\"\r\n\t\t\t\tRuntimeLibrary=\"3\"\r\n\t\t\t\tUsePrecompiledHeader=\"0\"\r\n\t\t\t\tWarningLevel=\"3\"\r\n\t\t\t\tDebugInformationFormat=\"4\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"2\"\r\n\t\t\t\tGenerateDebugInformation=\"true\"\r\n\t\t\t\tSubSystem=\"2\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t\t<Configuration\r\n\t\t\tName=\"Release|Win32\"\r\n\t\t\tOutputDirectory=\"$(SolutionDir)$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"2\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\tWholeProgramOptimization=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tOptimization=\"2\"\r\n\t\t\t\tEnableIntrinsicFunctions=\"true\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_WINDOWS;_USRDLL;PORTAUDIOJNI_EXPORTS\"\r\n\t\t\t\tRuntimeLibrary=\"2\"\r\n\t\t\t\tEnableFunctionLevelLinking=\"true\"\r\n\t\t\t\tUsePrecompiledHeader=\"0\"\r\n\t\t\t\tWarningLevel=\"3\"\r\n\t\t\t\tDebugInformationFormat=\"3\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tGenerateDebugInformation=\"true\"\r\n\t\t\t\tSubSystem=\"2\"\r\n\t\t\t\tOptimizeReferences=\"2\"\r\n\t\t\t\tEnableCOMDATFolding=\"2\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t</Configurations>\r\n\t<References>\r\n\t</References>\r\n\t<Files>\r\n\t\t<Filter\r\n\t\t\tName=\"Source Files\"\r\n\t\t\tFilter=\"cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx\"\r\n\t\t\tUniqueIdentifier=\"{4FC737F1-C7A5-4376-A066-2A32D752A2FF}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\..\\src\\com_portaudio_PortAudio.c\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Header Files\"\r\n\t\t\tFilter=\"h;hpp;hxx;hm;inl;inc;xsd\"\r\n\t\t\tUniqueIdentifier=\"{93995380-89BD-4b04-88EB-625FBE52EBFB}\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\..\\src\\com_portaudio_PortAudio.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Resource Files\"\r\n\t\t\tFilter=\"rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav\"\r\n\t\t\tUniqueIdentifier=\"{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}\"\r\n\t\t\t>\r\n\t\t</Filter>\r\n\t</Files>\r\n\t<Globals>\r\n\t</Globals>\r\n</VisualStudioProject>\r\n"
  },
  {
    "path": "thirdparty/portaudio/bindings/java/c/build/vs2010/PortAudioJNI/PortAudioJNI.vcxproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project DefaultTargets=\"Build\" ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <ItemGroup Label=\"ProjectConfigurations\">\n    <ProjectConfiguration Include=\"Debug|Win32\">\n      <Configuration>Debug</Configuration>\n      <Platform>Win32</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Debug|x64\">\n      <Configuration>Debug</Configuration>\n      <Platform>x64</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Release|Win32\">\n      <Configuration>Release</Configuration>\n      <Platform>Win32</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"Release|x64\">\n      <Configuration>Release</Configuration>\n      <Platform>x64</Platform>\n    </ProjectConfiguration>\n  </ItemGroup>\n  <PropertyGroup Label=\"Globals\">\n    <ProjectGuid>{4024D885-39B0-4C8A-B3E7-BAB4BA08DFBB}</ProjectGuid>\n    <RootNamespace>PortAudioJNI</RootNamespace>\n    <Keyword>Win32Proj</Keyword>\n  </PropertyGroup>\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.Default.props\" />\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\" Label=\"Configuration\">\n    <ConfigurationType>DynamicLibrary</ConfigurationType>\n    <CharacterSet>Unicode</CharacterSet>\n    <WholeProgramOptimization>true</WholeProgramOptimization>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\" Label=\"Configuration\">\n    <ConfigurationType>DynamicLibrary</ConfigurationType>\n    <CharacterSet>Unicode</CharacterSet>\n    <WholeProgramOptimization>true</WholeProgramOptimization>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\" Label=\"Configuration\">\n    <ConfigurationType>DynamicLibrary</ConfigurationType>\n    <CharacterSet>Unicode</CharacterSet>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\" Label=\"Configuration\">\n    <ConfigurationType>DynamicLibrary</ConfigurationType>\n    <CharacterSet>Unicode</CharacterSet>\n  </PropertyGroup>\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.props\" />\n  <ImportGroup Label=\"ExtensionSettings\">\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <PropertyGroup Label=\"UserMacros\" />\n  <PropertyGroup>\n    <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>\n    <OutDir Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">..\\..\\..\\..\\jportaudio\\</OutDir>\n    <OutDir Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\">..\\..\\..\\..\\jportaudio\\</OutDir>\n    <IntDir Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">$(Configuration)\\</IntDir>\n    <IntDir Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\">$(Configuration)\\</IntDir>\n    <LinkIncremental Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">true</LinkIncremental>\n    <LinkIncremental Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\">true</LinkIncremental>\n    <OutDir Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">..\\..\\..\\..\\jportaudio\\</OutDir>\n    <OutDir Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\">..\\..\\..\\..\\jportaudio\\</OutDir>\n    <IntDir Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">$(Configuration)\\</IntDir>\n    <IntDir Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\">$(Configuration)\\</IntDir>\n    <LinkIncremental Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">false</LinkIncremental>\n    <LinkIncremental Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\">false</LinkIncremental>\n    <TargetName Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\">jportaudio_x64</TargetName>\n    <TargetName Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">jportaudio_x86</TargetName>\n    <TargetName Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">jportaudio_x86</TargetName>\n    <TargetName Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\">jportaudio_x64</TargetName>\n  </PropertyGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\n    <ClCompile>\n      <Optimization>Disabled</Optimization>\n      <AdditionalIncludeDirectories>..\\..\\..\\..\\..\\..\\include;%JAVA_HOME%\\include;%JAVA_HOME%\\include\\win32</AdditionalIncludeDirectories>\n      <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;PORTAUDIOJNI_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n      <MinimalRebuild>true</MinimalRebuild>\n      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\n      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\n      <PrecompiledHeader>\n      </PrecompiledHeader>\n      <WarningLevel>Level3</WarningLevel>\n      <DebugInformationFormat>EditAndContinue</DebugInformationFormat>\n    </ClCompile>\n    <Link>\n      <GenerateDebugInformation>true</GenerateDebugInformation>\n      <SubSystem>Windows</SubSystem>\n      <TargetMachine>MachineX86</TargetMachine>\n    </Link>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\">\n    <ClCompile>\n      <Optimization>Disabled</Optimization>\n      <AdditionalIncludeDirectories>..\\..\\..\\..\\..\\..\\include;%JAVA_HOME%\\include;%JAVA_HOME%\\include\\win32</AdditionalIncludeDirectories>\n      <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;PORTAUDIOJNI_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\n      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\n      <PrecompiledHeader>\n      </PrecompiledHeader>\n      <WarningLevel>Level3</WarningLevel>\n      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\n    </ClCompile>\n    <Link>\n      <GenerateDebugInformation>true</GenerateDebugInformation>\n      <SubSystem>Windows</SubSystem>\n    </Link>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\n    <ClCompile>\n      <Optimization>MaxSpeed</Optimization>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;PORTAUDIOJNI_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\n      <FunctionLevelLinking>true</FunctionLevelLinking>\n      <PrecompiledHeader>\n      </PrecompiledHeader>\n      <WarningLevel>Level3</WarningLevel>\n      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\n      <AdditionalIncludeDirectories>..\\..\\..\\..\\..\\..\\include;%JAVA_HOME%\\include;%JAVA_HOME%\\include\\win32</AdditionalIncludeDirectories>\n    </ClCompile>\n    <Link>\n      <GenerateDebugInformation>true</GenerateDebugInformation>\n      <SubSystem>Windows</SubSystem>\n      <OptimizeReferences>true</OptimizeReferences>\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\n      <TargetMachine>MachineX86</TargetMachine>\n    </Link>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\">\n    <ClCompile>\n      <Optimization>MaxSpeed</Optimization>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;PORTAUDIOJNI_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\n      <FunctionLevelLinking>true</FunctionLevelLinking>\n      <PrecompiledHeader>\n      </PrecompiledHeader>\n      <WarningLevel>Level3</WarningLevel>\n      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\n      <AdditionalIncludeDirectories>..\\..\\..\\..\\..\\..\\include;%JAVA_HOME%\\include;%JAVA_HOME%\\include\\win32</AdditionalIncludeDirectories>\n    </ClCompile>\n    <Link>\n      <GenerateDebugInformation>true</GenerateDebugInformation>\n      <SubSystem>Windows</SubSystem>\n      <OptimizeReferences>true</OptimizeReferences>\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\n    </Link>\n  </ItemDefinitionGroup>\n  <ItemGroup>\n    <ClCompile Include=\"..\\..\\..\\src\\com_portaudio_BlockingStream.c\" />\n    <ClCompile Include=\"..\\..\\..\\src\\com_portaudio_PortAudio.c\" />\n    <ClCompile Include=\"..\\..\\..\\src\\jpa_tools.c\" />\n  </ItemGroup>\n  <ItemGroup>\n    <ClInclude Include=\"..\\..\\..\\src\\com_portaudio_BlockingStream.h\" />\n    <ClInclude Include=\"..\\..\\..\\src\\com_portaudio_PortAudio.h\" />\n    <ClInclude Include=\"..\\..\\..\\src\\jpa_tools.h\" />\n  </ItemGroup>\n  <ItemGroup>\n    <Library Include=\"..\\..\\..\\..\\jportaudio\\portaudio_x64.lib\" />\n    <Library Include=\"..\\..\\..\\..\\jportaudio\\portaudio_x86.lib\" />\n  </ItemGroup>\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.targets\" />\n  <ImportGroup Label=\"ExtensionTargets\">\n  </ImportGroup>\n</Project>"
  },
  {
    "path": "thirdparty/portaudio/bindings/java/c/src/com_portaudio_BlockingStream.c",
    "content": "/*\n * Portable Audio I/O Library\n * Java Binding for PortAudio\n *\n * Based on the Open Source API proposed by Ross Bencina\n * Copyright (c) 2008 Ross Bencina\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however, \n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also \n * requested that these non-binding requests be included along with the \n * license above.\n */\n\n#include \"com_portaudio_BlockingStream.h\"\n#include \"portaudio.h\"\n#include \"jpa_tools.h\"\n\n#ifndef FALSE\n#define FALSE  (0)\n#endif\n#ifndef TRUE\n#define TRUE  (!FALSE)\n#endif\n\n/*\n * Class:     com_portaudio_BlockingStream\n * Method:    getReadAvailable\n * Signature: ()I\n */\nJNIEXPORT jint JNICALL Java_com_portaudio_BlockingStream_getReadAvailable\n  (JNIEnv *env, jobject blockingStream)\n{\n\tPaStream *stream =jpa_GetStreamPointer( env, blockingStream );\n\tif( stream == NULL ) return 0;\n\treturn Pa_GetStreamReadAvailable( stream );\n}\n\n/*\n * Class:     com_portaudio_BlockingStream\n * Method:    getWriteAvailable\n * Signature: ()I\n */\nJNIEXPORT jint JNICALL Java_com_portaudio_BlockingStream_getWriteAvailable\n  (JNIEnv *env, jobject blockingStream)\n{\n\tPaStream *stream =jpa_GetStreamPointer( env, blockingStream );\n\tif( stream == NULL ) return 0;\n\treturn Pa_GetStreamWriteAvailable( stream );\n}\n\n\n/*\n * Class:     com_portaudio_BlockingStream\n * Method:    writeFloats\n * Signature: ([FI)Z\n */\nJNIEXPORT jboolean JNICALL Java_com_portaudio_BlockingStream_writeFloats\n  (JNIEnv *env, jobject blockingStream, jfloatArray buffer, jint numFrames)\n{\n\tjfloat *carr;\n\tjint err;\n\tPaStream *stream =jpa_GetStreamPointer( env, blockingStream );\n\tif( buffer == NULL )\n\t{\n\t\t(*env)->ThrowNew( env, (*env)->FindClass(env,\"java/lang/RuntimeException\"),\n                  \"null stream buffer\");\n\t\treturn FALSE;\n\t}\n\tcarr = (*env)->GetFloatArrayElements(env, buffer, NULL);\n\tif (carr == NULL)\n\t{\n\t\t(*env)->ThrowNew( env, (*env)->FindClass(env,\"java/lang/RuntimeException\"),\n                  \"invalid stream buffer\");\n\t\treturn FALSE;\n\t}\n\terr = Pa_WriteStream( stream, carr, numFrames );\n\t(*env)->ReleaseFloatArrayElements(env, buffer, carr, 0);\n\tif( err == paOutputUnderflowed )\n\t{\n\t\treturn TRUE;\n\t}\n\telse\n\t{\n\t\tjpa_CheckError( env, err );\n\t\treturn FALSE;\n\t}\n}\n\n/*\n * Class:     com_portaudio_BlockingStream\n * Method:    readFloats\n * Signature: ([FI)Z\n */\nJNIEXPORT jboolean JNICALL Java_com_portaudio_BlockingStream_readFloats\n  (JNIEnv *env, jobject blockingStream, jfloatArray buffer, jint numFrames)\n{\n\tjfloat *carr;\n\tjint err;\n\tPaStream *stream =jpa_GetStreamPointer( env, blockingStream );\n\tif( buffer == NULL )\n\t{\n\t\t(*env)->ThrowNew( env, (*env)->FindClass(env,\"java/lang/RuntimeException\"),\n                  \"null stream buffer\");\n\t\treturn FALSE;\n\t}\n\tcarr = (*env)->GetFloatArrayElements(env, buffer, NULL);\n\tif (carr == NULL)\n\t{\n\t\t(*env)->ThrowNew( env, (*env)->FindClass(env,\"java/lang/RuntimeException\"),\n                  \"invalid stream buffer\");\n\t\treturn FALSE;\n\t}\n\terr = Pa_ReadStream( stream, carr, numFrames );\n\t(*env)->ReleaseFloatArrayElements(env, buffer, carr, 0);\n\tif( err == paInputOverflowed )\n\t{\n\t\treturn TRUE;\n\t}\n\telse\n\t{\n\t\tjpa_CheckError( env, err );\n\t\treturn FALSE;\n\t}\n}\n\n/*\n * Class:     com_portaudio_BlockingStream\n * Method:    writeShorts\n * Signature: ([SI)Z\n */\nJNIEXPORT jboolean JNICALL Java_com_portaudio_BlockingStream_writeShorts\n  (JNIEnv *env, jobject blockingStream, jfloatArray buffer, jint numFrames)\n{\n\tjshort *carr;\n\tjint err;\n\tPaStream *stream =jpa_GetStreamPointer( env, blockingStream );\n\tif( buffer == NULL )\n\t{\n\t\t(*env)->ThrowNew( env, (*env)->FindClass(env,\"java/lang/RuntimeException\"),\n                  \"null stream buffer\");\n\t\treturn FALSE;\n\t}\n\tcarr = (*env)->GetShortArrayElements(env, buffer, NULL);\n\tif (carr == NULL)\n\t{\n\t\t(*env)->ThrowNew( env, (*env)->FindClass(env,\"java/lang/RuntimeException\"),\n                  \"invalid stream buffer\");\n\t\treturn FALSE;\n\t}\n\terr = Pa_WriteStream( stream, carr, numFrames );\n\t(*env)->ReleaseShortArrayElements(env, buffer, carr, 0);\n\tif( err == paOutputUnderflowed )\n\t{\n\t\treturn TRUE;\n\t}\n\telse\n\t{\n\t\tjpa_CheckError( env, err );\n\t\treturn FALSE;\n\t}\n}\n\n/*\n * Class:     com_portaudio_BlockingStream\n * Method:    readShorts\n * Signature: ([SI)Z\n */\nJNIEXPORT jboolean JNICALL Java_com_portaudio_BlockingStream_readShorts\n  (JNIEnv *env, jobject blockingStream, jfloatArray buffer, jint numFrames)\n{\n\tjshort *carr;\n\tjint err;\n\tPaStream *stream =jpa_GetStreamPointer( env, blockingStream );\n\tif( buffer == NULL )\n\t{\n\t\t(*env)->ThrowNew( env, (*env)->FindClass(env,\"java/lang/RuntimeException\"),\n                  \"null stream buffer\");\n\t\treturn FALSE;\n\t}\n\tcarr = (*env)->GetShortArrayElements(env, buffer, NULL);\n\tif (carr == NULL)\n\t{\n\t\t(*env)->ThrowNew( env, (*env)->FindClass(env,\"java/lang/RuntimeException\"),\n                  \"invalid stream buffer\");\n\t\treturn FALSE;\n\t}\n\terr = Pa_ReadStream( stream, carr, numFrames );\n\t(*env)->ReleaseShortArrayElements(env, buffer, carr, 0);\n\tif( err == paInputOverflowed )\n\t{\n\t\treturn TRUE;\n\t}\n\telse\n\t{\n\t\tjpa_CheckError( env, err );\n\t\treturn FALSE;\n\t}\n}\n\n/*\n * Class:     com_portaudio_BlockingStream\n * Method:    start\n * Signature: ()V\n */\nJNIEXPORT void JNICALL Java_com_portaudio_BlockingStream_start\n  (JNIEnv *env, jobject blockingStream )\n{\n\tPaStream *stream = jpa_GetStreamPointer( env, blockingStream );\n\tint err = Pa_StartStream( stream );\n\tjpa_CheckError( env, err );\n}\n\n/*\n * Class:     com_portaudio_BlockingStream\n * Method:    stop\n * Signature: ()V\n */\nJNIEXPORT void JNICALL Java_com_portaudio_BlockingStream_stop\n  (JNIEnv *env, jobject blockingStream )\n{\n\tPaStream *stream =jpa_GetStreamPointer( env, blockingStream );\n\tint err = Pa_StopStream( stream );\n\tjpa_CheckError( env, err );\n}\n/*\n * Class:     com_portaudio_BlockingStream\n * Method:    abort\n * Signature: ()V\n */\nJNIEXPORT void JNICALL Java_com_portaudio_BlockingStream_abort\n  (JNIEnv *env, jobject blockingStream )\n{\n\tPaStream *stream =jpa_GetStreamPointer( env, blockingStream );\n\tint err = Pa_AbortStream( stream );\n\tjpa_CheckError( env, err );\n}\n\n/*\n * Class:     com_portaudio_BlockingStream\n * Method:    close\n * Signature: ()V\n */\nJNIEXPORT void JNICALL Java_com_portaudio_BlockingStream_close\n  (JNIEnv *env, jobject blockingStream )\n{\n\tjclass cls;\n\tPaStream *stream =jpa_GetStreamPointer( env, blockingStream );\n\tif( stream != NULL )\n\t{\n\t\tint err = Pa_CloseStream( stream );\n\t\tjpa_CheckError( env, err );\n\t\tcls = (*env)->GetObjectClass(env, blockingStream);\n\t\tjpa_SetLongField( env, cls, blockingStream, \"nativeStream\", (jlong) 0 );\n\t}\n}\n\n/*\n * Class:     com_portaudio_BlockingStream\n * Method:    isStopped\n * Signature: ()V\n */\nJNIEXPORT jboolean JNICALL Java_com_portaudio_BlockingStream_isStopped\n  (JNIEnv *env, jobject blockingStream )\n{\n\tint err;\n\tPaStream *stream =jpa_GetStreamPointer( env, blockingStream );\n\tif( stream == NULL ) return 1;\n\terr = Pa_IsStreamStopped( stream );\n\treturn (jpa_CheckError( env, err ) > 0);\n}\n/*\n * Class:     com_portaudio_BlockingStream\n * Method:    isActive\n * Signature: ()V\n */\nJNIEXPORT jboolean JNICALL Java_com_portaudio_BlockingStream_isActive\n  (JNIEnv *env, jobject blockingStream )\n{\n\tint err;\n\tPaStream *stream =jpa_GetStreamPointer( env, blockingStream );\n\tif( stream == NULL ) return 0;\n\terr = Pa_IsStreamActive( stream );\n\treturn (jpa_CheckError( env, err ) > 0);\n}\n\n\n/*\n * Class:     com_portaudio_BlockingStream\n * Method:    getTime\n * Signature: ()D\n */\nJNIEXPORT jdouble JNICALL Java_com_portaudio_BlockingStream_getTime\n  (JNIEnv *env, jobject blockingStream )\n{\n\tPaStream *stream =jpa_GetStreamPointer( env, blockingStream );\n\tif( stream == NULL ) return 0.0;\n\treturn Pa_GetStreamTime( stream );\n}\n\n\n/*\n * Class:     com_portaudio_BlockingStream\n * Method:    getInfo\n * Signature: ()Lcom/portaudio/StreamInfo;\n */\nJNIEXPORT void JNICALL Java_com_portaudio_BlockingStream_getInfo\n  (JNIEnv *env, jobject blockingStream, jobject streamInfo)\n{\n\t\n\tPaStream *stream =jpa_GetStreamPointer( env, blockingStream );\n\tconst PaStreamInfo *info = Pa_GetStreamInfo( stream );\n\tif( streamInfo == NULL )\n\t{\n\t\tjpa_ThrowError( env, \"Invalid stream.\" );\n\t}\n\telse\n\t{\n\t\t/* Get a reference to obj's class */\n\t\tjclass cls = (*env)->GetObjectClass(env, streamInfo);\n \n\t\tjpa_SetIntField( env, cls, streamInfo, \"structVersion\", info->structVersion );\n\t\tjpa_SetDoubleField( env, cls, streamInfo, \"inputLatency\", info->inputLatency );\n\t\tjpa_SetDoubleField( env, cls, streamInfo, \"outputLatency\", info->outputLatency );\n\t\tjpa_SetDoubleField( env, cls, streamInfo, \"sampleRate\", info->sampleRate );\n\t}\n}\n\n"
  },
  {
    "path": "thirdparty/portaudio/bindings/java/c/src/com_portaudio_BlockingStream.h",
    "content": "/* DO NOT EDIT THIS FILE - it is machine generated */\n#if defined(__APPLE__)\n#include <JavaVM/jni.h>\n#else\n#include <jni.h>\n#endif\n\n/* Header for class com_portaudio_BlockingStream */\n\n#ifndef _Included_com_portaudio_BlockingStream\n#define _Included_com_portaudio_BlockingStream\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n/*\n * Class:     com_portaudio_BlockingStream\n * Method:    getReadAvailable\n * Signature: ()I\n */\nJNIEXPORT jint JNICALL Java_com_portaudio_BlockingStream_getReadAvailable\n  (JNIEnv *, jobject);\n\n/*\n * Class:     com_portaudio_BlockingStream\n * Method:    getWriteAvailable\n * Signature: ()I\n */\nJNIEXPORT jint JNICALL Java_com_portaudio_BlockingStream_getWriteAvailable\n  (JNIEnv *, jobject);\n\n/*\n * Class:     com_portaudio_BlockingStream\n * Method:    readFloats\n * Signature: ([FI)Z\n */\nJNIEXPORT jboolean JNICALL Java_com_portaudio_BlockingStream_readFloats\n  (JNIEnv *, jobject, jfloatArray, jint);\n\n/*\n * Class:     com_portaudio_BlockingStream\n * Method:    writeFloats\n * Signature: ([FI)Z\n */\nJNIEXPORT jboolean JNICALL Java_com_portaudio_BlockingStream_writeFloats\n  (JNIEnv *, jobject, jfloatArray, jint);\n\n/*\n * Class:     com_portaudio_BlockingStream\n * Method:    readShorts\n * Signature: ([SI)Z\n */\nJNIEXPORT jboolean JNICALL Java_com_portaudio_BlockingStream_readShorts\n  (JNIEnv *, jobject, jshortArray, jint);\n\n/*\n * Class:     com_portaudio_BlockingStream\n * Method:    writeShorts\n * Signature: ([SI)Z\n */\nJNIEXPORT jboolean JNICALL Java_com_portaudio_BlockingStream_writeShorts\n  (JNIEnv *, jobject, jshortArray, jint);\n\n/*\n * Class:     com_portaudio_BlockingStream\n * Method:    start\n * Signature: ()V\n */\nJNIEXPORT void JNICALL Java_com_portaudio_BlockingStream_start\n  (JNIEnv *, jobject);\n\n/*\n * Class:     com_portaudio_BlockingStream\n * Method:    stop\n * Signature: ()V\n */\nJNIEXPORT void JNICALL Java_com_portaudio_BlockingStream_stop\n  (JNIEnv *, jobject);\n\n/*\n * Class:     com_portaudio_BlockingStream\n * Method:    abort\n * Signature: ()V\n */\nJNIEXPORT void JNICALL Java_com_portaudio_BlockingStream_abort\n  (JNIEnv *, jobject);\n\n/*\n * Class:     com_portaudio_BlockingStream\n * Method:    close\n * Signature: ()V\n */\nJNIEXPORT void JNICALL Java_com_portaudio_BlockingStream_close\n  (JNIEnv *, jobject);\n\n/*\n * Class:     com_portaudio_BlockingStream\n * Method:    isStopped\n * Signature: ()Z\n */\nJNIEXPORT jboolean JNICALL Java_com_portaudio_BlockingStream_isStopped\n  (JNIEnv *, jobject);\n\n/*\n * Class:     com_portaudio_BlockingStream\n * Method:    isActive\n * Signature: ()Z\n */\nJNIEXPORT jboolean JNICALL Java_com_portaudio_BlockingStream_isActive\n  (JNIEnv *, jobject);\n\n/*\n * Class:     com_portaudio_BlockingStream\n * Method:    getTime\n * Signature: ()D\n */\nJNIEXPORT jdouble JNICALL Java_com_portaudio_BlockingStream_getTime\n  (JNIEnv *, jobject);\n\n/*\n * Class:     com_portaudio_BlockingStream\n * Method:    getInfo\n * Signature: (Lcom/portaudio/StreamInfo;)V\n */\nJNIEXPORT void JNICALL Java_com_portaudio_BlockingStream_getInfo\n  (JNIEnv *, jobject, jobject);\n\n#ifdef __cplusplus\n}\n#endif\n#endif\n"
  },
  {
    "path": "thirdparty/portaudio/bindings/java/c/src/com_portaudio_PortAudio.c",
    "content": "/*\n * Portable Audio I/O Library\n * Java Binding for PortAudio\n *\n * Based on the Open Source API proposed by Ross Bencina\n * Copyright (c) 2008 Ross Bencina\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however, \n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also \n * requested that these non-binding requests be included along with the \n * license above.\n */\n\n#include \"com_portaudio_PortAudio.h\"\n#include \"portaudio.h\"\n#include \"jpa_tools.h\"\n\n/*\n * Class:     com_portaudio_PortAudio\n * Method:    getVersion\n * Signature: ()I\n */\nJNIEXPORT jint JNICALL Java_com_portaudio_PortAudio_getVersion\n  (JNIEnv *env, jclass clazz)\n{\n\treturn Pa_GetVersion();\n}\n\n/*\n * Class:     com_portaudio_PortAudio\n * Method:    getVersionText\n * Signature: ()Ljava/lang/String;\n */\nJNIEXPORT jstring JNICALL Java_com_portaudio_PortAudio_getVersionText\n  (JNIEnv *env, jclass clazz)\n{\n\treturn (*env)->NewStringUTF(env, Pa_GetVersionText() );\n}\n\n/*\n * Class:     com_portaudio_PortAudio\n * Method:    initialize\n * Signature: ()I\n */\nJNIEXPORT void JNICALL Java_com_portaudio_PortAudio_initialize\n  (JNIEnv *env, jclass clazz)\n{\n\tPaError err = Pa_Initialize();\n\tjpa_CheckError( env, err );\n}\n\n/*\n * Class:     com_portaudio_PortAudio\n * Method:    terminate\n * Signature: ()I\n */\nJNIEXPORT void JNICALL Java_com_portaudio_PortAudio_terminate\n  (JNIEnv *env, jclass clazz)\n{\n\tPaError err = Pa_Terminate();\n\tjpa_CheckError( env, err );\n}\n\n/*\n * Class:     com_portaudio_PortAudio\n * Method:    getDeviceCount\n * Signature: ()I\n */\nJNIEXPORT jint JNICALL Java_com_portaudio_PortAudio_getDeviceCount\n  (JNIEnv *env, jclass clazz)\n{\n\tjint count = Pa_GetDeviceCount();\n\treturn jpa_CheckError( env, count );\n}\n\n/*\n * Class:     com_portaudio_PortAudio\n * Method:    getDeviceInfo\n * Signature: (ILcom/portaudio/DeviceInfo;)I\n */\nJNIEXPORT void JNICALL Java_com_portaudio_PortAudio_getDeviceInfo\n  (JNIEnv *env, jclass clazz, jint index, jobject deviceInfo)\n{\n\tconst PaDeviceInfo *info;\n\t     /* Get a reference to obj's class */\n\tjclass cls = (*env)->GetObjectClass(env, deviceInfo);\n \n\tinfo = Pa_GetDeviceInfo( index );\n\tif( info == NULL )\n\t{\n\t\tjpa_ThrowError( env, \"Pa_GetDeviceInfo returned NULL.\" );\n\t}\n\telse\n\t{\n\t\tjpa_SetStringField( env, cls, deviceInfo, \"name\", info->name );\n\t\tjpa_SetIntField( env, cls, deviceInfo, \"maxInputChannels\", info->maxInputChannels );\n\t\tjpa_SetIntField( env, cls, deviceInfo, \"maxOutputChannels\", info->maxOutputChannels );\n\t\tjpa_SetIntField( env, cls, deviceInfo, \"hostApi\", info->hostApi );\n\t\tjpa_SetDoubleField( env, cls, deviceInfo, \"defaultSampleRate\", info->defaultSampleRate );\n\t\tjpa_SetDoubleField( env, cls, deviceInfo, \"defaultLowInputLatency\", info->defaultLowInputLatency );\n\t\tjpa_SetDoubleField( env, cls, deviceInfo, \"defaultLowInputLatency\", info->defaultHighInputLatency );\n\t\tjpa_SetDoubleField( env, cls, deviceInfo, \"defaultLowOutputLatency\", info->defaultLowOutputLatency );\n\t\tjpa_SetDoubleField( env, cls, deviceInfo, \"defaultHighOutputLatency\", info->defaultHighOutputLatency );\n\t}\n}\n\n/*\n * Class:     com_portaudio_PortAudio\n * Method:    geHostApiCount\n * Signature: ()I\n */\nJNIEXPORT jint JNICALL Java_com_portaudio_PortAudio_getHostApiCount\n  (JNIEnv *env, jclass clazz)\n{\n\tjint count = Pa_GetHostApiCount();\n\treturn jpa_CheckError( env, count );\n}\n\n\n/*\n * Class:     com_portaudio_PortAudio\n * Method:    hostApiTypeIdToHostApiIndex\n * Signature: (I)I\n */\nJNIEXPORT jint JNICALL Java_com_portaudio_PortAudio_hostApiTypeIdToHostApiIndex\n  (JNIEnv *env, jclass clazz, jint hostApiType)\n{\n\treturn Pa_HostApiTypeIdToHostApiIndex( (PaHostApiTypeId) hostApiType );\n}\n\n/*\n * Class:     com_portaudio_PortAudio\n * Method:    hostApiDeviceIndexToDeviceIndex\n * Signature: (II)I\n */\nJNIEXPORT jint JNICALL Java_com_portaudio_PortAudio_hostApiDeviceIndexToDeviceIndex\n  (JNIEnv *env, jclass clazz, jint hostApiIndex, jint apiDeviceIndex)\n{\n\treturn Pa_HostApiDeviceIndexToDeviceIndex( hostApiIndex, apiDeviceIndex );\n}\n\n\n/*\n * Class:     com_portaudio_PortAudio\n * Method:    getHostApiInfo\n * Signature: (ILcom/portaudio/HostApiInfo;)I\n */\nJNIEXPORT void JNICALL Java_com_portaudio_PortAudio_getHostApiInfo\n  (JNIEnv *env, jclass clazz, jint index, jobject hostApiInfo)\n{\n\tconst PaHostApiInfo *info;\n\t     /* Get a reference to obj's class */\n\tjclass cls = (*env)->GetObjectClass(env, hostApiInfo);\n \n\tinfo = Pa_GetHostApiInfo( index );\n\tif( info == NULL )\n\t{\n\t\tjpa_ThrowError( env, \"Pa_GetHostApiInfo returned NULL.\" );\n\t}\n\telse\n\t{\n\t\tjpa_SetIntField( env, cls, hostApiInfo, \"version\", info->structVersion );\n\t\tjpa_SetIntField( env, cls, hostApiInfo, \"type\", info->type );\n\t\tjpa_SetStringField( env, cls, hostApiInfo, \"name\", info->name );\n\t\tjpa_SetIntField( env, cls, hostApiInfo, \"deviceCount\", info->deviceCount );\n\t\tjpa_SetIntField( env, cls, hostApiInfo, \"defaultInputDevice\", info->defaultInputDevice );\n\t\tjpa_SetIntField( env, cls, hostApiInfo, \"defaultOutputDevice\", info->defaultOutputDevice );\n\t}\n}\n\n/*\n * Class:     com_portaudio_PortAudio\n * Method:    getDefaultInputDevice\n * Signature: ()I\n */\nJNIEXPORT jint JNICALL Java_com_portaudio_PortAudio_getDefaultInputDevice\n  (JNIEnv *env, jclass clazz)\n{\n\tjint deviceId = Pa_GetDefaultInputDevice();\n\treturn jpa_CheckError( env, deviceId );\n}\n\n/*\n * Class:     com_portaudio_PortAudio\n * Method:    getDefaultOutputDevice\n * Signature: ()I\n */\nJNIEXPORT jint JNICALL Java_com_portaudio_PortAudio_getDefaultOutputDevice\n  (JNIEnv *env, jclass clazz)\n{\n\tjint deviceId = Pa_GetDefaultOutputDevice();\n\treturn jpa_CheckError( env, deviceId );\n}\n\n/*\n * Class:     com_portaudio_PortAudio\n * Method:    getDefaultHostApi\n * Signature: ()I\n */\nJNIEXPORT jint JNICALL Java_com_portaudio_PortAudio_getDefaultHostApi\n  (JNIEnv *env, jclass clazz)\n{\n\tjint deviceId = Pa_GetDefaultHostApi();\n\treturn jpa_CheckError( env, deviceId );\n}\n\n/*\n * Class:     com_portaudio_PortAudio\n * Method:    isFormatSupported\n * Signature: (Lcom/portaudio/StreamParameters;Lcom/portaudio/StreamParameters;I)I\n */\nJNIEXPORT jint JNICALL Java_com_portaudio_PortAudio_isFormatSupported\n  (JNIEnv *env, jclass clazz, jobject inParams, jobject outParams, jint sampleRate )\n{\n\tPaStreamParameters myInParams, *paInParams;\n\tPaStreamParameters myOutParams, *paOutParams;\n\t\n\tpaInParams = jpa_FillStreamParameters(  env, inParams, &myInParams );\n\tpaOutParams = jpa_FillStreamParameters(  env, outParams, &myOutParams );\n\t\n\treturn Pa_IsFormatSupported( paInParams, paOutParams, sampleRate );\n\n}\n\n/*\n * Class:     com_portaudio_PortAudio\n * Method:    openStream\n * Signature: (Lcom/portaudio/BlockingStream;Lcom/portaudio/StreamParameters;Lcom/portaudio/StreamParameters;III)I\n */\nJNIEXPORT void JNICALL Java_com_portaudio_PortAudio_openStream\n  (JNIEnv *env, jclass clazz, jobject blockingStream,  jobject inParams, jobject outParams, jint sampleRate, jint framesPerBuffer, jint flags )\n{\n\tint err;\n\tPaStreamParameters myInParams, *paInParams;\n\tPaStreamParameters myOutParams, *paOutParams;\n\tPaStream *stream;\n\t\n\tpaInParams = jpa_FillStreamParameters(  env, inParams, &myInParams );\n\tpaOutParams = jpa_FillStreamParameters(  env, outParams, &myOutParams );\n\terr = Pa_OpenStream( &stream, paInParams, paOutParams, sampleRate, framesPerBuffer, flags, NULL, NULL );\n\tif( jpa_CheckError( env, err ) == 0 )\n\t{\n\t\tjclass cls = (*env)->GetObjectClass(env, blockingStream);\n\t\tjpa_SetLongField( env, cls, blockingStream, \"nativeStream\", (jlong) stream );\n\t\tif( paInParams != NULL )\n\t\t{\n\t\t\tjpa_SetIntField( env, cls, blockingStream, \"inputFormat\", paInParams->sampleFormat );\n\t\t}\n\t\tif( paOutParams != NULL )\n\t\t{\n\t\t\tjpa_SetIntField( env, cls, blockingStream, \"outputFormat\", paOutParams->sampleFormat );\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "thirdparty/portaudio/bindings/java/c/src/com_portaudio_PortAudio.h",
    "content": "/* DO NOT EDIT THIS FILE - it is machine generated */\n#if defined(__APPLE__)\n#include <JavaVM/jni.h>\n#else\n#include <jni.h>\n#endif\n/* Header for class com_portaudio_PortAudio */\n\n#ifndef _Included_com_portaudio_PortAudio\n#define _Included_com_portaudio_PortAudio\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n#undef com_portaudio_PortAudio_FLAG_CLIP_OFF\n#define com_portaudio_PortAudio_FLAG_CLIP_OFF 1L\n#undef com_portaudio_PortAudio_FLAG_DITHER_OFF\n#define com_portaudio_PortAudio_FLAG_DITHER_OFF 2L\n#undef com_portaudio_PortAudio_FORMAT_FLOAT_32\n#define com_portaudio_PortAudio_FORMAT_FLOAT_32 1L\n#undef com_portaudio_PortAudio_FORMAT_INT_32\n#define com_portaudio_PortAudio_FORMAT_INT_32 2L\n#undef com_portaudio_PortAudio_FORMAT_INT_24\n#define com_portaudio_PortAudio_FORMAT_INT_24 4L\n#undef com_portaudio_PortAudio_FORMAT_INT_16\n#define com_portaudio_PortAudio_FORMAT_INT_16 8L\n#undef com_portaudio_PortAudio_FORMAT_INT_8\n#define com_portaudio_PortAudio_FORMAT_INT_8 16L\n#undef com_portaudio_PortAudio_FORMAT_UINT_8\n#define com_portaudio_PortAudio_FORMAT_UINT_8 32L\n#undef com_portaudio_PortAudio_HOST_API_TYPE_DEV\n#define com_portaudio_PortAudio_HOST_API_TYPE_DEV 0L\n#undef com_portaudio_PortAudio_HOST_API_TYPE_DIRECTSOUND\n#define com_portaudio_PortAudio_HOST_API_TYPE_DIRECTSOUND 1L\n#undef com_portaudio_PortAudio_HOST_API_TYPE_MME\n#define com_portaudio_PortAudio_HOST_API_TYPE_MME 2L\n#undef com_portaudio_PortAudio_HOST_API_TYPE_ASIO\n#define com_portaudio_PortAudio_HOST_API_TYPE_ASIO 3L\n#undef com_portaudio_PortAudio_HOST_API_TYPE_SOUNDMANAGER\n#define com_portaudio_PortAudio_HOST_API_TYPE_SOUNDMANAGER 4L\n#undef com_portaudio_PortAudio_HOST_API_TYPE_COREAUDIO\n#define com_portaudio_PortAudio_HOST_API_TYPE_COREAUDIO 5L\n#undef com_portaudio_PortAudio_HOST_API_TYPE_OSS\n#define com_portaudio_PortAudio_HOST_API_TYPE_OSS 7L\n#undef com_portaudio_PortAudio_HOST_API_TYPE_ALSA\n#define com_portaudio_PortAudio_HOST_API_TYPE_ALSA 8L\n#undef com_portaudio_PortAudio_HOST_API_TYPE_AL\n#define com_portaudio_PortAudio_HOST_API_TYPE_AL 9L\n#undef com_portaudio_PortAudio_HOST_API_TYPE_BEOS\n#define com_portaudio_PortAudio_HOST_API_TYPE_BEOS 10L\n#undef com_portaudio_PortAudio_HOST_API_TYPE_WDMKS\n#define com_portaudio_PortAudio_HOST_API_TYPE_WDMKS 11L\n#undef com_portaudio_PortAudio_HOST_API_TYPE_JACK\n#define com_portaudio_PortAudio_HOST_API_TYPE_JACK 12L\n#undef com_portaudio_PortAudio_HOST_API_TYPE_WASAPI\n#define com_portaudio_PortAudio_HOST_API_TYPE_WASAPI 13L\n#undef com_portaudio_PortAudio_HOST_API_TYPE_AUDIOSCIENCE\n#define com_portaudio_PortAudio_HOST_API_TYPE_AUDIOSCIENCE 14L\n#undef com_portaudio_PortAudio_HOST_API_TYPE_COUNT\n#define com_portaudio_PortAudio_HOST_API_TYPE_COUNT 15L\n/*\n * Class:     com_portaudio_PortAudio\n * Method:    getVersion\n * Signature: ()I\n */\nJNIEXPORT jint JNICALL Java_com_portaudio_PortAudio_getVersion\n  (JNIEnv *, jclass);\n\n/*\n * Class:     com_portaudio_PortAudio\n * Method:    getVersionText\n * Signature: ()Ljava/lang/String;\n */\nJNIEXPORT jstring JNICALL Java_com_portaudio_PortAudio_getVersionText\n  (JNIEnv *, jclass);\n\n/*\n * Class:     com_portaudio_PortAudio\n * Method:    initialize\n * Signature: ()V\n */\nJNIEXPORT void JNICALL Java_com_portaudio_PortAudio_initialize\n  (JNIEnv *, jclass);\n\n/*\n * Class:     com_portaudio_PortAudio\n * Method:    terminate\n * Signature: ()V\n */\nJNIEXPORT void JNICALL Java_com_portaudio_PortAudio_terminate\n  (JNIEnv *, jclass);\n\n/*\n * Class:     com_portaudio_PortAudio\n * Method:    getDeviceCount\n * Signature: ()I\n */\nJNIEXPORT jint JNICALL Java_com_portaudio_PortAudio_getDeviceCount\n  (JNIEnv *, jclass);\n\n/*\n * Class:     com_portaudio_PortAudio\n * Method:    getDeviceInfo\n * Signature: (ILcom/portaudio/DeviceInfo;)V\n */\nJNIEXPORT void JNICALL Java_com_portaudio_PortAudio_getDeviceInfo\n  (JNIEnv *, jclass, jint, jobject);\n\n/*\n * Class:     com_portaudio_PortAudio\n * Method:    getHostApiCount\n * Signature: ()I\n */\nJNIEXPORT jint JNICALL Java_com_portaudio_PortAudio_getHostApiCount\n  (JNIEnv *, jclass);\n\n/*\n * Class:     com_portaudio_PortAudio\n * Method:    getHostApiInfo\n * Signature: (ILcom/portaudio/HostApiInfo;)V\n */\nJNIEXPORT void JNICALL Java_com_portaudio_PortAudio_getHostApiInfo\n  (JNIEnv *, jclass, jint, jobject);\n\n/*\n * Class:     com_portaudio_PortAudio\n * Method:    hostApiTypeIdToHostApiIndex\n * Signature: (I)I\n */\nJNIEXPORT jint JNICALL Java_com_portaudio_PortAudio_hostApiTypeIdToHostApiIndex\n  (JNIEnv *, jclass, jint);\n\n/*\n * Class:     com_portaudio_PortAudio\n * Method:    hostApiDeviceIndexToDeviceIndex\n * Signature: (II)I\n */\nJNIEXPORT jint JNICALL Java_com_portaudio_PortAudio_hostApiDeviceIndexToDeviceIndex\n  (JNIEnv *, jclass, jint, jint);\n\n/*\n * Class:     com_portaudio_PortAudio\n * Method:    getDefaultInputDevice\n * Signature: ()I\n */\nJNIEXPORT jint JNICALL Java_com_portaudio_PortAudio_getDefaultInputDevice\n  (JNIEnv *, jclass);\n\n/*\n * Class:     com_portaudio_PortAudio\n * Method:    getDefaultOutputDevice\n * Signature: ()I\n */\nJNIEXPORT jint JNICALL Java_com_portaudio_PortAudio_getDefaultOutputDevice\n  (JNIEnv *, jclass);\n\n/*\n * Class:     com_portaudio_PortAudio\n * Method:    getDefaultHostApi\n * Signature: ()I\n */\nJNIEXPORT jint JNICALL Java_com_portaudio_PortAudio_getDefaultHostApi\n  (JNIEnv *, jclass);\n\n/*\n * Class:     com_portaudio_PortAudio\n * Method:    isFormatSupported\n * Signature: (Lcom/portaudio/StreamParameters;Lcom/portaudio/StreamParameters;I)I\n */\nJNIEXPORT jint JNICALL Java_com_portaudio_PortAudio_isFormatSupported\n  (JNIEnv *, jclass, jobject, jobject, jint);\n\n/*\n * Class:     com_portaudio_PortAudio\n * Method:    openStream\n * Signature: (Lcom/portaudio/BlockingStream;Lcom/portaudio/StreamParameters;Lcom/portaudio/StreamParameters;III)V\n */\nJNIEXPORT void JNICALL Java_com_portaudio_PortAudio_openStream\n  (JNIEnv *, jclass, jobject, jobject, jobject, jint, jint, jint);\n\n#ifdef __cplusplus\n}\n#endif\n#endif\n"
  },
  {
    "path": "thirdparty/portaudio/bindings/java/c/src/jpa_tools.c",
    "content": "/*\n * Portable Audio I/O Library\n * Java Binding for PortAudio\n *\n * Based on the Open Source API proposed by Ross Bencina\n * Copyright (c) 2008 Ross Bencina\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however, \n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also \n * requested that these non-binding requests be included along with the \n * license above.\n */\n\n#include \"com_portaudio_PortAudio.h\"\n#include \"portaudio.h\"\n#include \"jpa_tools.h\"\n\njint jpa_GetIntField( JNIEnv *env, jclass cls, jobject obj, const char *fieldName )\n{\n     /* Look for the instance field maxInputChannels in cls */\n     jfieldID fid = (*env)->GetFieldID(env, cls, fieldName, \"I\");\n     if (fid == NULL)\n\t {\n\t\t jpa_ThrowError( env, \"Cannot find integer JNI field.\" );\n\t\treturn 0;\n     }\n\t else\n\t {\n\t\treturn (*env)->GetIntField(env, obj, fid );\n\t }\n}\n\nvoid jpa_SetIntField( JNIEnv *env, jclass cls, jobject obj, const char *fieldName, jint value )\n{\n     /* Look for the instance field maxInputChannels in cls */\n     jfieldID fid = (*env)->GetFieldID(env, cls, fieldName, \"I\");\n     if (fid == NULL)\n\t {\n\t\t jpa_ThrowError( env, \"Cannot find integer JNI field.\" );\n     }\n\t else\n\t {\n\t\t(*env)->SetIntField(env, obj, fid, value );\n\t }\n}\n\njlong jpa_GetLongField( JNIEnv *env, jclass cls, jobject obj, const char *fieldName )\n{\n     /* Look for the instance field maxInputChannels in cls */\n     jfieldID fid = (*env)->GetFieldID(env, cls, fieldName, \"J\");\n     if (fid == NULL)\n\t {\n\t\t jpa_ThrowError( env, \"Cannot find long JNI field.\" );\n\t\treturn 0L;\n     }\n\t else\n\t {\n\t\treturn (*env)->GetLongField(env, obj, fid );\n\t }\n}\n\nvoid jpa_SetLongField( JNIEnv *env, jclass cls, jobject obj, const char *fieldName, jlong value )\n{\n     /* Look for the instance field maxInputChannels in cls */\n     jfieldID fid = (*env)->GetFieldID(env, cls, fieldName, \"J\");\n     if (fid == NULL)\n\t {\n\t\t jpa_ThrowError( env, \"Cannot find long JNI field.\" );\n     }\n\t else\n\t {\n\t\t(*env)->SetLongField(env, obj, fid, value );\n\t }\n}\n\n\nvoid jpa_SetDoubleField( JNIEnv *env, jclass cls, jobject obj, const char *fieldName, jdouble value )\n{\n     /* Look for the instance field maxInputChannels in cls */\n     jfieldID fid = (*env)->GetFieldID(env, cls, fieldName, \"D\");\n     if (fid == NULL)\n\t {\n\t\t jpa_ThrowError( env, \"Cannot find double JNI field.\" );\n     }\n\t else\n\t {\n\t\t(*env)->SetDoubleField(env, obj, fid, value );\n\t }\n}\n\n\njdouble jpa_GetDoubleField( JNIEnv *env, jclass cls, jobject obj, const char *fieldName )\n{\n     /* Look for the instance field maxInputChannels in cls */\n     jfieldID fid = (*env)->GetFieldID(env, cls, fieldName, \"D\");\n     if (fid == NULL)\n\t {\n\t\t jpa_ThrowError( env, \"Cannot find double JNI field.\" );\n\t\treturn 0;\n     }\n\t else\n\t {\n\t\treturn (*env)->GetDoubleField(env, obj, fid );\n\t }\n}\n\nvoid jpa_SetStringField( JNIEnv *env, jclass cls, jobject obj, const char *fieldName, const char *value )\n{\n     /* Look for the instance field maxInputChannels in cls */\n     jfieldID fid = (*env)->GetFieldID(env, cls, fieldName, \"Ljava/lang/String;\");\n     if (fid == NULL)\n\t {\n\t\t jpa_ThrowError( env, \"Cannot find String JNI field.\" );\n     }\n\t else\n\t {\n\t\tjstring jstr = (*env)->NewStringUTF(env, value);\n\t\tif (jstr == NULL)\n\t\t{\n\t\t\tjpa_ThrowError( env, \"Cannot create new String.\" );\n\t\t}\n\t\telse\n\t\t{\n\t\t\t(*env)->SetObjectField(env, obj, fid, jstr );\n\t\t}\n\t }\n}\n\nPaStreamParameters *jpa_FillStreamParameters( JNIEnv *env, jobject jstreamParam, PaStreamParameters *myParams )\n{\n\tjclass cls;\n\t\n\tif( jstreamParam == NULL ) return NULL; // OK, not an error\n\n\tcls = (*env)->GetObjectClass(env, jstreamParam);\n\t\n\tmyParams->channelCount = jpa_GetIntField( env, cls, jstreamParam, \"channelCount\" );\n\tmyParams->device = jpa_GetIntField( env, cls, jstreamParam, \"device\" );\n\tmyParams->sampleFormat = jpa_GetIntField( env, cls, jstreamParam, \"sampleFormat\" );\n\tmyParams->suggestedLatency = jpa_GetDoubleField( env, cls, jstreamParam, \"suggestedLatency\" );\n\tmyParams->hostApiSpecificStreamInfo = NULL;\n\n\treturn myParams;\n}\n\n// Create an exception that will be thrown when we return from the JNI call.\njint jpa_ThrowError( JNIEnv *env, const char *message )\n{\n\treturn (*env)->ThrowNew(env, (*env)->FindClass( env, \"java/lang/RuntimeException\"),\n                  message );\n}\n\n// Throw an exception on error.\njint jpa_CheckError( JNIEnv *env, PaError err )\n{\n\tif( err == -1 )\n\t{\n        return jpa_ThrowError( env, \"-1, possibly no available default device\" );\n    }\n    else if( err < 0 )\n    {\n\t\tif( err == paUnanticipatedHostError )\n\t\t{\n\t\t\tconst PaHostErrorInfo *hostErrorInfo = Pa_GetLastHostErrorInfo();\n\t\t\treturn jpa_ThrowError( env, hostErrorInfo->errorText );\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn jpa_ThrowError( env, Pa_GetErrorText( err ) );\n\t\t}\n\t}\n\telse\n\t{\n\t\treturn err;\n\t}\n}\n\n// Get the stream pointer from a BlockingStream long field.\nPaStream *jpa_GetStreamPointer( JNIEnv *env, jobject blockingStream )\n{\n\tjclass cls = (*env)->GetObjectClass(env, blockingStream);\n\treturn (PaStream *) jpa_GetLongField( env, cls, blockingStream, \"nativeStream\" );\n}\n"
  },
  {
    "path": "thirdparty/portaudio/bindings/java/c/src/jpa_tools.h",
    "content": "/*\n * Portable Audio I/O Library\n * Java Binding for PortAudio\n *\n * Based on the Open Source API proposed by Ross Bencina\n * Copyright (c) 2008 Ross Bencina\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however, \n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also \n * requested that these non-binding requests be included along with the \n * license above.\n */\n\n#include \"com_portaudio_PortAudio.h\"\n#include \"portaudio.h\"\n\n#ifndef JPA_TOOLS_H\n#define JPA_TOOLS_H\n\njint jpa_GetIntField( JNIEnv *env, jclass cls, jobject obj, const char *fieldName );\nvoid jpa_SetIntField( JNIEnv *env, jclass cls, jobject obj, const char *fieldName, jint value );\n\njlong jpa_GetLongField( JNIEnv *env, jclass cls, jobject obj, const char *fieldName );\nvoid jpa_SetLongField( JNIEnv *env, jclass cls, jobject obj, const char *fieldName, jlong value );\n\njdouble jpa_GetDoubleField( JNIEnv *env, jclass cls, jobject obj, const char *fieldName );\nvoid jpa_SetDoubleField( JNIEnv *env, jclass cls, jobject obj, const char *fieldName, jdouble value );\n\nvoid jpa_SetStringField( JNIEnv *env, jclass cls, jobject obj, const char *fieldName, const char *value );\nPaStreamParameters *jpa_FillStreamParameters( JNIEnv *env, jobject jstreamParam, PaStreamParameters *myParams );\n\njint jpa_CheckError( JNIEnv *env, PaError err );\njint jpa_ThrowError( JNIEnv *env, const char *message );\n\nPaStream *jpa_GetStreamPointer( JNIEnv *env, jobject blockingStream );\n\n#endif /* JPA_TOOLS_H */\n"
  },
  {
    "path": "thirdparty/portaudio/bindings/java/jportaudio/.classpath",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<classpath>\n\t<classpathentry kind=\"src\" path=\"src\"/>\n\t<classpathentry kind=\"src\" path=\"jtests\"/>\n\t<classpathentry kind=\"con\" path=\"org.eclipse.jdt.launching.JRE_CONTAINER\"/>\n\t<classpathentry kind=\"con\" path=\"org.eclipse.jdt.junit.JUNIT_CONTAINER/3\"/>\n\t<classpathentry kind=\"output\" path=\"bin\"/>\n</classpath>\n"
  },
  {
    "path": "thirdparty/portaudio/bindings/java/jportaudio/.project",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<projectDescription>\n\t<name>JPortAudio</name>\n\t<comment></comment>\n\t<projects>\n\t</projects>\n\t<buildSpec>\n\t\t<buildCommand>\n\t\t\t<name>org.eclipse.jdt.core.javabuilder</name>\n\t\t\t<arguments>\n\t\t\t</arguments>\n\t\t</buildCommand>\n\t</buildSpec>\n\t<natures>\n\t\t<nature>org.eclipse.jdt.core.javanature</nature>\n\t</natures>\n</projectDescription>\n"
  },
  {
    "path": "thirdparty/portaudio/bindings/java/jportaudio/jtests/com/portaudio/PlaySine.java",
    "content": "\n/** @file\n @ingroup bindings_java\n\n @brief Example that shows how to play sine waves using JPortAudio.\n*/\npackage com.portaudio;\n\nimport com.portaudio.TestBasic.SineOscillator;\n\npublic class PlaySine\n{\n\t/**\n\t * Write a sine wave to the stream.\n\t * @param stream\n\t * @param framesPerBuffer\n\t * @param numFrames\n\t * @param sampleRate\n\t */\n\tprivate void writeSineData( BlockingStream stream, int framesPerBuffer,\n\t\t\tint numFrames, int sampleRate )\n\t{\n\t\tfloat[] buffer = new float[framesPerBuffer * 2];\n\t\tSineOscillator osc1 = new SineOscillator( 200.0, sampleRate );\n\t\tSineOscillator osc2 = new SineOscillator( 300.0, sampleRate );\n\t\tint framesLeft = numFrames;\n\t\twhile( framesLeft > 0 )\n\t\t{\n\t\t\tint index = 0;\n\t\t\tint framesToWrite = (framesLeft > framesPerBuffer) ? framesPerBuffer\n\t\t\t\t\t: framesLeft;\n\t\t\tfor( int j = 0; j < framesToWrite; j++ )\n\t\t\t{\n\t\t\t\tbuffer[index++] = (float) osc1.next();\n\t\t\t\tbuffer[index++] = (float) osc2.next();\n\t\t\t}\n\t\t\tstream.write( buffer, framesToWrite );\n\t\t\tframesLeft -= framesToWrite;\n\t\t}\n\t}\n\n\t/**\n\t * Create a stream on the default device then play sine waves.\n\t */\n\tpublic void play()\n\t{\n\t\tPortAudio.initialize();\n\n\t\t// Get the default device and setup the stream parameters.\n\t\tint deviceId = PortAudio.getDefaultOutputDevice();\n\t\tDeviceInfo deviceInfo = PortAudio.getDeviceInfo( deviceId );\n\t\tdouble sampleRate = deviceInfo.defaultSampleRate;\n\t\tSystem.out.println( \"  deviceId    = \" + deviceId );\n\t\tSystem.out.println( \"  sampleRate  = \" + sampleRate );\n\t\tSystem.out.println( \"  device name = \" + deviceInfo.name );\n\n\t\tStreamParameters streamParameters = new StreamParameters();\n\t\tstreamParameters.channelCount = 2;\n\t\tstreamParameters.device = deviceId;\n\t\tstreamParameters.suggestedLatency = deviceInfo.defaultLowOutputLatency;\n\t\tSystem.out.println( \"  suggestedLatency = \"\n\t\t\t\t+ streamParameters.suggestedLatency );\n\n\t\tint framesPerBuffer = 256;\n\t\tint flags = 0;\n\t\t\n\t\t// Open a stream for output.\n\t\tBlockingStream stream = PortAudio.openStream( null, streamParameters,\n\t\t\t\t(int) sampleRate, framesPerBuffer, flags );\n\n\t\tint numFrames = (int) (sampleRate * 4); // enough for 4 seconds\n\n\t\tstream.start();\n\n\t\twriteSineData( stream, framesPerBuffer, numFrames, (int) sampleRate );\n\n\t\tstream.stop();\n\t\tstream.close();\n\n\t\tPortAudio.terminate();\n\t\tSystem.out.println( \"JPortAudio test complete.\" );\n\t}\n\n\tpublic static void main( String[] args )\n\t{\n\t\tPlaySine player = new PlaySine();\n\t\tplayer.play();\n\t}\n}\n"
  },
  {
    "path": "thirdparty/portaudio/bindings/java/jportaudio/jtests/com/portaudio/TestBasic.java",
    "content": "/*\n * Portable Audio I/O Library\n * Java Binding for PortAudio\n *\n * Based on the Open Source API proposed by Ross Bencina\n * Copyright (c) 2008 Ross Bencina\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however, \n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also \n * requested that these non-binding requests be included along with the \n * license above.\n */\n\npackage com.portaudio;\n\nimport junit.framework.TestCase;\n\n/**\n * Test the Java bindings for PortAudio.\n * \n * @author Phil Burk\n * \n */\npublic class TestBasic extends TestCase\n{\n\n\tpublic void testDeviceCount()\n\t{\n\t\tPortAudio.initialize();\n\t\tassertTrue( \"version invalid\", (PortAudio.getVersion() > 0) );\n\t\tSystem.out.println( \"getVersion  = \" + PortAudio.getVersion() );\n\t\tSystem.out.println( \"getVersionText  = \" + PortAudio.getVersionText() );\n\t\tSystem.out.println( \"getDeviceCount  = \" + PortAudio.getDeviceCount() );\n\t\tassertTrue( \"getDeviceCount\", (PortAudio.getDeviceCount() > 0) );\n\t\tPortAudio.terminate();\n\t}\n\n\tpublic void testListDevices()\n\t{\n\t\tPortAudio.initialize();\n\t\tint count = PortAudio.getDeviceCount();\n\t\tassertTrue( \"getDeviceCount\", (count > 0) );\n\t\tfor( int i = 0; i < count; i++ )\n\t\t{\n\t\t\tDeviceInfo info = PortAudio.getDeviceInfo( i );\n\t\t\tSystem.out.println( \"------------------ #\" + i );\n\t\t\tSystem.out.println( \"  name              = \" + info.name );\n\t\t\tSystem.out.println( \"  hostApi           = \" + info.hostApi );\n\t\t\tSystem.out.println( \"  maxOutputChannels = \"\n\t\t\t\t\t+ info.maxOutputChannels );\n\t\t\tSystem.out.println( \"  maxInputChannels  = \"\n\t\t\t\t\t+ info.maxInputChannels );\n\t\t\tSystem.out.println( \"  defaultSampleRate = \"\n\t\t\t\t\t+ info.defaultSampleRate );\n\t\t\tSystem.out.printf( \"  defaultLowInputLatency   = %3d msec\\n\",\n\t\t\t\t\t((int) (info.defaultLowInputLatency * 1000)) );\n\t\t\tSystem.out.printf( \"  defaultHighInputLatency  = %3d msec\\n\",\n\t\t\t\t\t((int) (info.defaultHighInputLatency * 1000)) );\n\t\t\tSystem.out.printf( \"  defaultLowOutputLatency  = %3d msec\\n\",\n\t\t\t\t\t((int) (info.defaultLowOutputLatency * 1000)) );\n\t\t\tSystem.out.printf( \"  defaultHighOutputLatency = %3d msec\\n\",\n\t\t\t\t\t((int) (info.defaultHighOutputLatency * 1000)) );\n\n\t\t\tassertTrue( \"some channels\",\n\t\t\t\t\t(info.maxOutputChannels + info.maxInputChannels) > 0 );\n\t\t\tassertTrue( \"not too many channels\", (info.maxInputChannels < 64) );\n\t\t\tassertTrue( \"not too many channels\", (info.maxOutputChannels < 64) );\n\t\t}\n\n\t\tSystem.out.println( \"defaultInput  = \"\n\t\t\t\t+ PortAudio.getDefaultInputDevice() );\n\t\tSystem.out.println( \"defaultOutput = \"\n\t\t\t\t+ PortAudio.getDefaultOutputDevice() );\n\n\t\tPortAudio.terminate();\n\t}\n\n\tpublic void testHostApis()\n\t{\n\t\tPortAudio.initialize();\n\t\tint validApiCount = 0;\n\t\tfor( int hostApiType = 0; hostApiType < PortAudio.HOST_API_TYPE_COUNT; hostApiType++ )\n\t\t{\n\t\t\tint hostApiIndex = PortAudio\n\t\t\t\t\t.hostApiTypeIdToHostApiIndex( hostApiType );\n\t\t\tif( hostApiIndex >= 0 )\n\t\t\t{\n\t\t\t\tHostApiInfo info = PortAudio.getHostApiInfo( hostApiIndex );\n\t\t\t\tSystem.out.println( \"Checking Host API: \" + info.name );\n\t\t\t\tfor( int apiDeviceIndex = 0; apiDeviceIndex < info.deviceCount; apiDeviceIndex++ )\n\t\t\t\t{\n\t\t\t\t\tint deviceIndex = PortAudio\n\t\t\t\t\t\t\t.hostApiDeviceIndexToDeviceIndex( hostApiIndex,\n\t\t\t\t\t\t\t\t\tapiDeviceIndex );\n\t\t\t\t\tDeviceInfo deviceInfo = PortAudio\n\t\t\t\t\t\t\t.getDeviceInfo( deviceIndex );\n\t\t\t\t\tassertEquals( \"host api must match up\", hostApiIndex,\n\t\t\t\t\t\t\tdeviceInfo.hostApi );\n\t\t\t\t}\n\t\t\t\tvalidApiCount++;\n\t\t\t}\n\t\t}\n\n\t\tassertEquals( \"host api counts\", PortAudio.getHostApiCount(),\n\t\t\t\tvalidApiCount );\n\t}\n\n\tpublic void testListHostApis()\n\t{\n\t\tPortAudio.initialize();\n\t\tint count = PortAudio.getHostApiCount();\n\t\tassertTrue( \"getHostApiCount\", (count > 0) );\n\t\tfor( int i = 0; i < count; i++ )\n\t\t{\n\t\t\tHostApiInfo info = PortAudio.getHostApiInfo( i );\n\t\t\tSystem.out.println( \"------------------ #\" + i );\n\t\t\tSystem.out.println( \"  version             = \" + info.version );\n\t\t\tSystem.out.println( \"  name                = \" + info.name );\n\t\t\tSystem.out.println( \"  type                = \" + info.type );\n\t\t\tSystem.out.println( \"  deviceCount         = \" + info.deviceCount );\n\t\t\tSystem.out.println( \"  defaultInputDevice  = \"\n\t\t\t\t\t+ info.defaultInputDevice );\n\t\t\tSystem.out.println( \"  defaultOutputDevice = \"\n\t\t\t\t\t+ info.defaultOutputDevice );\n\t\t\tassertTrue( \"some devices\", info.deviceCount > 0 );\n\t\t}\n\n\t\tSystem.out.println( \"------\\ndefaultHostApi = \"\n\t\t\t\t+ PortAudio.getDefaultHostApi() );\n\t\tPortAudio.terminate();\n\t}\n\n\tpublic void testCheckFormat()\n\t{\n\t\tPortAudio.initialize();\n\t\tStreamParameters streamParameters = new StreamParameters();\n\t\tstreamParameters.device = PortAudio.getDefaultOutputDevice();\n\t\tint result = PortAudio\n\t\t\t\t.isFormatSupported( null, streamParameters, 44100 );\n\t\tSystem.out.println( \"isFormatSupported returns \" + result );\n\t\tassertEquals( \"default output format\", 0, result );\n\t\t// Try crazy channelCount\n\t\tstreamParameters.channelCount = 8765;\n\t\tresult = PortAudio.isFormatSupported( null, streamParameters, 44100 );\n\t\tSystem.out.println( \"crazy isFormatSupported returns \" + result );\n\t\tassertTrue( \"default output format\", (result < 0) );\n\t\tPortAudio.terminate();\n\t}\n\n\tstatic class SineOscillator\n\t{\n\t\tdouble phase = 0.0;\n\t\tdouble phaseIncrement = 0.01;\n\n\t\tSineOscillator(double freq, int sampleRate)\n\t\t{\n\t\t\tphaseIncrement = freq * Math.PI * 2.0 / sampleRate;\n\t\t}\n\n\t\tdouble next()\n\t\t{\n\t\t\tdouble value = Math.sin( phase );\n\t\t\tphase += phaseIncrement;\n\t\t\tif( phase > Math.PI )\n\t\t\t{\n\t\t\t\tphase -= Math.PI * 2.0;\n\t\t\t}\n\t\t\treturn value;\n\t\t}\n\t}\n\n\tpublic void testStreamError()\n\t{\n\t\tPortAudio.initialize();\n\t\tStreamParameters streamParameters = new StreamParameters();\n\t\tstreamParameters.sampleFormat = PortAudio.FORMAT_FLOAT_32;\n\t\tstreamParameters.channelCount = 2;\n\t\tstreamParameters.device = PortAudio.getDefaultOutputDevice();\n\t\tint framesPerBuffer = 256;\n\t\tint flags = 0;\n\t\tBlockingStream stream = PortAudio.openStream( null, streamParameters,\n\t\t\t\t44100, framesPerBuffer, flags );\n\n\t\t// Try to write data to a stopped stream.\n\t\tThrowable caught = null;\n\t\ttry\n\t\t{\n\t\t\tfloat[] buffer = new float[framesPerBuffer\n\t\t\t\t\t* streamParameters.channelCount];\n\t\t\tstream.write( buffer, framesPerBuffer );\n\t\t} catch( Throwable e )\n\t\t{\n\t\t\tcaught = e;\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tassertTrue( \"caught no exception\", (caught != null) );\n\t\tassertTrue( \"exception should say stream is stopped\", caught\n\t\t\t\t.getMessage().contains( \"stopped\" ) );\n\n\t\t// Try to write null data.\n\t\tcaught = null;\n\t\ttry\n\t\t{\n\t\t\tstream.write( (float[]) null, framesPerBuffer );\n\t\t} catch( Throwable e )\n\t\t{\n\t\t\tcaught = e;\n\t\t\te.printStackTrace();\n\t\t}\n\t\tassertTrue( \"caught no exception\", (caught != null) );\n\t\tassertTrue( \"exception should say stream is stopped\", caught\n\t\t\t\t.getMessage().contains( \"null\" ) );\n\n\t\t// Try to write short data to a float stream.\n\t\tstream.start();\n\t\tcaught = null;\n\t\ttry\n\t\t{\n\t\t\tshort[] buffer = new short[framesPerBuffer\n\t\t\t\t\t* streamParameters.channelCount];\n\t\t\tstream.write( buffer, framesPerBuffer );\n\t\t} catch( Throwable e )\n\t\t{\n\t\t\tcaught = e;\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tassertTrue( \"caught no exception\", (caught != null) );\n\t\tassertTrue( \"exception should say tried to\", caught.getMessage()\n\t\t\t\t.contains( \"Tried to write short\" ) );\n\n\t\tstream.close();\n\n\t\tPortAudio.terminate();\n\t}\n\n\tpublic void checkBlockingWriteFloat( int deviceId, double sampleRate )\n\t{\n\t\tStreamParameters streamParameters = new StreamParameters();\n\t\tstreamParameters.channelCount = 2;\n\t\tstreamParameters.device = deviceId;\n\t\tstreamParameters.suggestedLatency = PortAudio\n\t\t\t\t.getDeviceInfo( streamParameters.device ).defaultLowOutputLatency;\n\t\tSystem.out.println( \"suggestedLatency = \"\n\t\t\t\t+ streamParameters.suggestedLatency );\n\n\t\tint framesPerBuffer = 256;\n\t\tint flags = 0;\n\t\tBlockingStream stream = PortAudio.openStream( null, streamParameters,\n\t\t\t\t(int) sampleRate, framesPerBuffer, flags );\n\t\tassertTrue( \"got default stream\", stream != null );\n\n\t\tassertEquals( \"stream isStopped\", true, stream.isStopped() );\n\t\tassertEquals( \"stream isActive\", false, stream.isActive() );\n\n\t\tint numFrames = 80000;\n\t\tdouble expected = ((double)numFrames) / sampleRate;\n\t\tstream.start();\n\t\tlong startTime = System.currentTimeMillis();\n\t\tdouble startStreamTime = stream.getTime();\n\t\tassertEquals( \"stream isStopped\", false, stream.isStopped() );\n\t\tassertEquals( \"stream isActive\", true, stream.isActive() );\n\n\t\twriteSineData( stream, framesPerBuffer, numFrames, (int) sampleRate );\n\t\t\n\t\tStreamInfo streamInfo = stream.getInfo();\n\t\tSystem.out.println( \"inputLatency of a stream = \"+ streamInfo.inputLatency );\n\t\tSystem.out.println( \"outputLatency of a stream = \"+streamInfo.outputLatency );\n\t\tSystem.out.println( \"sampleRate of a stream = \"+ streamInfo.sampleRate );\n\t\t\n\t\tassertEquals( \"inputLatency of a stream \", 0.0, streamInfo.inputLatency, 0.000001 );\n\t\tassertTrue( \"outputLatency of a stream \",(streamInfo.outputLatency > 0) );\n\t\tassertEquals( \"sampleRate of a stream \", sampleRate, streamInfo.sampleRate, 3 );\n\n\t\tdouble endStreamTime = stream.getTime();\n\t\tstream.stop();\n\t\tlong stopTime = System.currentTimeMillis();\n\n\t\tSystem.out.println( \"startStreamTime = \" + startStreamTime );\n\t\tSystem.out.println( \"endStreamTime = \" + endStreamTime );\n\t\tdouble elapsedStreamTime = endStreamTime - startStreamTime;\n\t\tSystem.out.println( \"elapsedStreamTime = \" + elapsedStreamTime );\n\t\tassertTrue( \"elapsedStreamTime: \" + elapsedStreamTime,\n\t\t\t\t(elapsedStreamTime > 0.0) );\n\t\tassertEquals( \"elapsedStreamTime: \", expected, elapsedStreamTime, 0.10 );\n\n\t\tassertEquals( \"stream isStopped\", true, stream.isStopped() );\n\t\tassertEquals( \"stream isActive\", false, stream.isActive() );\n\t\tstream.close();\n\n\t\tdouble elapsed = (stopTime - startTime) / 1000.0;\n\t\tassertEquals( \"elapsed time to play\", expected, elapsed, 0.20 );\n\t}\n\n\tpublic void testBlockingWriteFloat()\n\t{\n\t\tPortAudio.initialize();\n\t\tcheckBlockingWriteFloat( PortAudio.getDefaultOutputDevice(), 44100 );\n\t\tPortAudio.terminate();\n\t}\n\n\tpublic void ZtestWriteEachHostAPI()\n\t{\n\t\tPortAudio.initialize();\n\t\tfor( int hostApiIndex = 0; hostApiIndex < PortAudio.getHostApiCount(); hostApiIndex++ )\n\t\t{\n\t\t\tHostApiInfo hostInfo = PortAudio.getHostApiInfo( hostApiIndex );\n\t\t\tSystem.out.println( \"-------------\\nWriting using Host API: \" + hostInfo.name );\n\t\t\tint deviceId = hostInfo.defaultOutputDevice;\n\t\t\tSystem.out.println( \"   Device ID  =\" + deviceId );\n\t\t\tDeviceInfo deviceInfo = PortAudio.getDeviceInfo( deviceId );\n\t\t\tSystem.out.println( \"   sampleRate =\" + deviceInfo.defaultSampleRate );\n\t\t\tcheckBlockingWriteFloat( deviceId,\n\t\t\t\t\t(int) deviceInfo.defaultSampleRate );\n\t\t\tSystem.out.println( \"Finished with \" + hostInfo.name );\n\t\t}\n\t\tPortAudio.terminate();\n\t}\n\n\tprivate void writeSineData( BlockingStream stream, int framesPerBuffer,\n\t\t\tint numFrames, int sampleRate )\n\t{\n\t\tfloat[] buffer = new float[framesPerBuffer * 2];\n\t\tSineOscillator osc1 = new SineOscillator( 200.0, sampleRate );\n\t\tSineOscillator osc2 = new SineOscillator( 300.0, sampleRate );\n\t\tint framesLeft = numFrames;\n\t\twhile( framesLeft > 0 )\n\t\t{\n\t\t\tint index = 0;\n\t\t\tint framesToWrite = (framesLeft > framesPerBuffer) ? framesPerBuffer\n\t\t\t\t\t: framesLeft;\n\t\t\tfor( int j = 0; j < framesToWrite; j++ )\n\t\t\t{\n\t\t\t\tbuffer[index++] = (float) osc1.next();\n\t\t\t\tbuffer[index++] = (float) osc2.next();\n\t\t\t}\n\t\t\tstream.write( buffer, framesToWrite );\n\t\t\tframesLeft -= framesToWrite;\n\t\t}\n\t}\n\n\tprivate void writeSineDataShort( BlockingStream stream,\n\t\t\tint framesPerBuffer, int numFrames )\n\t{\n\t\tshort[] buffer = new short[framesPerBuffer * 2];\n\t\tSineOscillator osc1 = new SineOscillator( 200.0, 44100 );\n\t\tSineOscillator osc2 = new SineOscillator( 300.0, 44100 );\n\t\tint framesLeft = numFrames;\n\t\twhile( framesLeft > 0 )\n\t\t{\n\t\t\tint index = 0;\n\t\t\tint framesToWrite = (framesLeft > framesPerBuffer) ? framesPerBuffer\n\t\t\t\t\t: framesLeft;\n\t\t\tfor( int j = 0; j < framesToWrite; j++ )\n\t\t\t{\n\t\t\t\tbuffer[index++] = (short) (osc1.next() * 32767);\n\t\t\t\tbuffer[index++] = (short) (osc2.next() * 32767);\n\t\t\t}\n\t\t\tstream.write( buffer, framesToWrite );\n\t\t\tframesLeft -= framesToWrite;\n\t\t}\n\t}\n\n\tpublic void testBlockingWriteShort()\n\t{\n\t\tPortAudio.initialize();\n\n\t\tStreamParameters streamParameters = new StreamParameters();\n\t\tstreamParameters.sampleFormat = PortAudio.FORMAT_INT_16;\n\t\tstreamParameters.channelCount = 2;\n\t\tstreamParameters.device = PortAudio.getDefaultOutputDevice();\n\t\tstreamParameters.suggestedLatency = PortAudio\n\t\t\t\t.getDeviceInfo( streamParameters.device ).defaultLowOutputLatency;\n\t\tSystem.out.println( \"suggestedLatency = \"\n\t\t\t\t+ streamParameters.suggestedLatency );\n\n\t\tint framesPerBuffer = 256;\n\t\tint flags = 0;\n\t\tBlockingStream stream = PortAudio.openStream( null, streamParameters,\n\t\t\t\t44100, framesPerBuffer, flags );\n\t\tassertTrue( \"got default stream\", stream != null );\n\n\t\tint numFrames = 80000;\n\t\tstream.start();\n\t\tlong startTime = System.currentTimeMillis();\n\t\twriteSineDataShort( stream, framesPerBuffer, numFrames );\n\t\tstream.stop();\n\t\tlong stopTime = System.currentTimeMillis();\n\t\tstream.close();\n\n\t\tdouble elapsed = (stopTime - startTime) / 1000.0;\n\t\tdouble expected = numFrames / 44100.0;\n\t\tassertEquals( \"elapsed time to play\", expected, elapsed, 0.20 );\n\t\tPortAudio.terminate();\n\t}\n\n\tpublic void testRecordPlayFloat() throws InterruptedException\n\t{\n\t\tcheckRecordPlay( PortAudio.FORMAT_FLOAT_32 );\n\t}\n\n\tpublic void testRecordPlayShort() throws InterruptedException\n\t{\n\t\tcheckRecordPlay( PortAudio.FORMAT_INT_16 );\n\t}\n\n\tpublic void checkRecordPlay( int sampleFormat ) throws InterruptedException\n\t{\n\t\tint framesPerBuffer = 256;\n\t\tint flags = 0;\n\t\tint sampleRate = 44100;\n\t\tint numFrames = sampleRate * 3;\n\t\tfloat[] floatBuffer = null;\n\t\tshort[] shortBuffer = null;\n\n\t\tPortAudio.initialize();\n\t\tStreamParameters inParameters = new StreamParameters();\n\t\tinParameters.sampleFormat = sampleFormat;\n\t\tinParameters.device = PortAudio.getDefaultInputDevice();\n\n\t\tDeviceInfo info = PortAudio.getDeviceInfo( inParameters.device );\n\t\tinParameters.channelCount = (info.maxInputChannels > 2) ? 2\n\t\t\t\t: info.maxInputChannels;\n\t\tSystem.out.println( \"channelCount = \" + inParameters.channelCount );\n\t\tinParameters.suggestedLatency = PortAudio\n\t\t\t\t.getDeviceInfo( inParameters.device ).defaultLowInputLatency;\n\n\t\tif( sampleFormat == PortAudio.FORMAT_FLOAT_32 )\n\t\t{\n\t\t\tfloatBuffer = new float[numFrames * inParameters.channelCount];\n\t\t}\n\t\telse if( sampleFormat == PortAudio.FORMAT_INT_16 )\n\t\t{\n\t\t\tshortBuffer = new short[numFrames * inParameters.channelCount];\n\t\t}\n\t\t// Record a few seconds of audio.\n\t\tBlockingStream inStream = PortAudio.openStream( inParameters, null,\n\t\t\t\tsampleRate, framesPerBuffer, flags );\n\n\t\tSystem.out.println( \"RECORDING - say something like testing 1,2,3...\" );\n\t\tinStream.start();\n\n\t\tif( sampleFormat == PortAudio.FORMAT_FLOAT_32 )\n\t\t{\n\t\t\tinStream.read( floatBuffer, numFrames );\n\t\t}\n\t\telse if( sampleFormat == PortAudio.FORMAT_INT_16 )\n\t\t{\n\t\t\tinStream.read( shortBuffer, numFrames );\n\t\t}\n\t\tThread.sleep( 100 );\n\t\tint availableToRead = inStream.getReadAvailable();\n\t\tSystem.out.println( \"availableToRead =  \" + availableToRead );\n\t\tassertTrue( \"getReadAvailable \", availableToRead > 0 );\n\n\t\tinStream.stop();\n\t\tinStream.close();\n\t\tSystem.out.println( \"Finished recording. Begin Playback.\" );\n\n\t\t// Play back what we recorded.\n\t\tStreamParameters outParameters = new StreamParameters();\n\t\toutParameters.sampleFormat = sampleFormat;\n\t\toutParameters.channelCount = inParameters.channelCount;\n\t\toutParameters.device = PortAudio.getDefaultOutputDevice();\n\t\toutParameters.suggestedLatency = PortAudio\n\t\t\t\t.getDeviceInfo( outParameters.device ).defaultLowOutputLatency;\n\n\t\tBlockingStream outStream = PortAudio.openStream( null, outParameters,\n\t\t\t\tsampleRate, framesPerBuffer, flags );\n\t\tassertTrue( \"got default stream\", outStream != null );\n\n\t\tassertEquals( \"inStream isActive\", false, inStream.isActive() );\n\n\t\toutStream.start();\n\t\tThread.sleep( 100 );\n\t\tint availableToWrite = outStream.getWriteAvailable();\n\t\tSystem.out.println( \"availableToWrite =  \" + availableToWrite );\n\t\tassertTrue( \"getWriteAvailable \", availableToWrite > 0 );\n\n\t\tSystem.out.println( \"inStream = \" + inStream );\n\t\tSystem.out.println( \"outStream = \" + outStream );\n\t\tassertEquals( \"inStream isActive\", false, inStream.isActive() );\n\t\tassertEquals( \"outStream isActive\", true, outStream.isActive() );\n\t\tif( sampleFormat == PortAudio.FORMAT_FLOAT_32 )\n\t\t{\n\t\t\toutStream.write( floatBuffer, numFrames );\n\t\t}\n\t\telse if( sampleFormat == PortAudio.FORMAT_INT_16 )\n\t\t{\n\t\t\toutStream.write( shortBuffer, numFrames );\n\t\t}\n\t\toutStream.stop();\n\n\t\toutStream.close();\n\t\tPortAudio.terminate();\n\t}\n}\n"
  },
  {
    "path": "thirdparty/portaudio/bindings/java/jportaudio/src/com/portaudio/BlockingStream.java",
    "content": "/*\n * Portable Audio I/O Library\n * Java Binding for PortAudio\n *\n * Based on the Open Source API proposed by Ross Bencina\n * Copyright (c) 2008 Ross Bencina\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however, \n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also \n * requested that these non-binding requests be included along with the \n * license above.\n */\n\n/** @file\n @ingroup bindings_java\n\n @brief A blocking read/write stream.\n*/\npackage com.portaudio;\n\n/**\n * Represents a stream for blocking read/write I/O.\n * \n * This Java object contains the pointer to a PortAudio stream stored as a long.\n * It is passed to PortAudio when calling stream related functions.\n * \n * To create one of these, call PortAudio.openStream().\n * \n * @see PortAudio\n * \n * @author Phil Burk\n * \n */\npublic class BlockingStream\n{\n\t// nativeStream is only accessed by the native code. It contains a pointer\n\t// to a PaStream.\n\tprivate long nativeStream;\n\tprivate int inputFormat = -1;\n\tprivate int outputFormat = -1;\n\n\tprotected BlockingStream()\n\t{\n\t}\n\n\t/**\n\t * @return number of frames that can be read without blocking.\n\t */\n\tpublic native int getReadAvailable();\n\n\t/**\n\t * @return number of frames that can be written without blocking.\n\t */\n\tpublic native int getWriteAvailable();\n\n\tprivate native boolean readFloats( float[] buffer, int numFrames );\n\n\tprivate native boolean writeFloats( float[] buffer, int numFrames );\n\n\t/**\n\t * Read 32-bit floating point data from the stream into the array.\n\t * \n\t * @param buffer\n\t * @param numFrames\n\t *            number of frames to read\n\t * @return true if an input overflow occurred\n\t */\n\tpublic boolean read( float[] buffer, int numFrames )\n\t{\n\t\tif( inputFormat != PortAudio.FORMAT_FLOAT_32 )\n\t\t{\n\t\t\tthrow new RuntimeException(\n\t\t\t\t\t\"Tried to read float samples from a non float stream.\" );\n\t\t}\n\t\treturn readFloats( buffer, numFrames );\n\t}\n\n\t/**\n\t * Write 32-bit floating point data to the stream from the array. The data\n\t * should be in the range -1.0 to +1.0.\n\t * \n\t * @param buffer\n\t * @param numFrames\n\t *            number of frames to write\n\t * @return true if an output underflow occurred\n\t */\n\tpublic boolean write( float[] buffer, int numFrames )\n\t{\n\t\tif( outputFormat != PortAudio.FORMAT_FLOAT_32 )\n\t\t{\n\t\t\tthrow new RuntimeException(\n\t\t\t\t\t\"Tried to write float samples to a non float stream.\" );\n\t\t}\n\t\treturn writeFloats( buffer, numFrames );\n\t}\n\n\tprivate native boolean readShorts( short[] buffer, int numFrames );\n\n\tprivate native boolean writeShorts( short[] buffer, int numFrames );\n\n\t/**\n\t * Read 16-bit integer data to the stream from the array.\n\t * \n\t * @param buffer\n\t * @param numFrames\n\t *            number of frames to write\n\t * @return true if an input overflow occurred\n\t */\n\tpublic boolean read( short[] buffer, int numFrames )\n\t{\n\t\tif( inputFormat != PortAudio.FORMAT_INT_16 )\n\t\t{\n\t\t\tthrow new RuntimeException(\n\t\t\t\t\t\"Tried to read short samples from a non short stream.\" );\n\t\t}\n\t\treturn readShorts( buffer, numFrames );\n\t}\n\n\t/**\n\t * Write 16-bit integer data to the stream from the array.\n\t * \n\t * @param buffer\n\t * @param numFrames\n\t *            number of frames to write\n\t * @return true if an output underflow occurred\n\t */\n\tpublic boolean write( short[] buffer, int numFrames )\n\t{\n\t\tif( outputFormat != PortAudio.FORMAT_INT_16 )\n\t\t{\n\t\t\tthrow new RuntimeException(\n\t\t\t\t\t\"Tried to write short samples from a non short stream.\" );\n\t\t}\n\t\treturn writeShorts( buffer, numFrames );\n\t}\n\n\t/**\n\t * Atart audio I/O.\n\t */\n\tpublic native void start();\n\n\t/**\n\t * Wait for the stream to play all of the data that has been written then\n\t * stop.\n\t */\n\tpublic native void stop();\n\n\t/**\n\t * Stop immediately and lose any data that was written but not played.\n\t */\n\tpublic native void abort();\n\n\t/**\n\t * Close the stream and zero out the pointer. Do not reference the stream\n\t * after this.\n\t */\n\tpublic native void close();\n\n\tpublic native boolean isStopped();\n\n\tpublic native boolean isActive();\n\n\tpublic String toString()\n\t{\n\t\treturn \"BlockingStream: streamPtr = \" + Long.toHexString( nativeStream )\n\t\t\t\t+ \", inFormat = \" + inputFormat + \", outFormat = \"\n\t\t\t\t+ outputFormat;\n\t}\n\n\t/**\n\t * Get audio time related to this stream. Note that it may not start at 0.0.\n\t */\n\tpublic native double getTime();\n\n\tprivate native void getInfo( StreamInfo streamInfo );\n\n\tpublic StreamInfo getInfo()\n\t{\n\t\tStreamInfo streamInfo = new StreamInfo();\n\t\tgetInfo( streamInfo );\n\t\treturn streamInfo;\n\t}\n}\n"
  },
  {
    "path": "thirdparty/portaudio/bindings/java/jportaudio/src/com/portaudio/DeviceInfo.java",
    "content": "/*\n * Portable Audio I/O Library\n * Java Binding for PortAudio\n *\n * Based on the Open Source API proposed by Ross Bencina\n * Copyright (c) 2008 Ross Bencina\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however, \n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also \n * requested that these non-binding requests be included along with the \n * license above.\n */\n\n/** @file\n @ingroup bindings_java\n\n @brief Information about a JPortAudio device.\n*/\npackage com.portaudio;\n\n/**\n * Equivalent to PaDeviceInfo\n * @see PortAudio\n * @see HostApiInfo\n * @author Phil Burk\n *\n */\npublic class DeviceInfo\n{\n\tpublic int version;\n\tpublic String name;\n\tpublic int hostApi;\n\tpublic int maxInputChannels;\n\tpublic int maxOutputChannels;\n\tpublic double defaultLowInputLatency;\n\tpublic double defaultHighInputLatency;\n\tpublic double defaultLowOutputLatency;\n\tpublic double defaultHighOutputLatency;\n\tpublic double defaultSampleRate;\n}\n"
  },
  {
    "path": "thirdparty/portaudio/bindings/java/jportaudio/src/com/portaudio/HostApiInfo.java",
    "content": "/*\n * Portable Audio I/O Library\n * Java Binding for PortAudio\n *\n * Based on the Open Source API proposed by Ross Bencina\n * Copyright (c) 2008 Ross Bencina\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however, \n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also \n * requested that these non-binding requests be included along with the \n * license above.\n */\n\n/** @file\n @ingroup bindings_java\n\n @brief Information about a JPortAudio Host API.\n*/\npackage com.portaudio;\n\n/**\n * Equivalent to PaHostApiInfo\n * @see PortAudio\n * @see DeviceInfo\n * @author Phil Burk\n *\n */\npublic class HostApiInfo\n{\n\tpublic int version;\n\tpublic int type;\n\tpublic String name;\n\tpublic int deviceCount;\n\tpublic int defaultInputDevice;\n\tpublic int defaultOutputDevice;\n}\n"
  },
  {
    "path": "thirdparty/portaudio/bindings/java/jportaudio/src/com/portaudio/PortAudio.java",
    "content": "/*\n * Portable Audio I/O Library\n * Java Binding for PortAudio\n *\n * Based on the Open Source API proposed by Ross Bencina\n * Copyright (c) 2008 Ross Bencina\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however, \n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also \n * requested that these non-binding requests be included along with the \n * license above.\n */\n\n/** @file\n @ingroup bindings_java\n\n @brief Java wrapper for the PortAudio API.\n*/\npackage com.portaudio;\n\n/**\n * Java methods that call PortAudio via JNI. This is a portable audio I/O\n * library that can be used as an alternative to JavaSound.\n * \n * Please see the PortAudio documentation for a full explanation.\n * \n * http://portaudio.com/docs/\n * http://portaudio.com/docs/v19-doxydocs/portaudio_8h.html\n * \n * This Java binding does not support audio callbacks because an audio callback\n * should never block. Calling into a Java virtual machine might block for\n * garbage collection or synchronization. So only the blocking read/write mode\n * is supported.\n * \n * @see BlockingStream\n * @see DeviceInfo\n * @see HostApiInfo\n * @see StreamInfo\n * @see StreamParameters\n * \n * @author Phil Burk\n * \n */\npublic class PortAudio\n{\n\tpublic final static int FLAG_CLIP_OFF = (1 << 0);\n\tpublic final static int FLAG_DITHER_OFF = (1 << 1);\n\n\t/** Sample Formats */\n\tpublic final static int FORMAT_FLOAT_32 = (1 << 0);\n\tpublic final static int FORMAT_INT_32 = (1 << 1); // not supported\n\tpublic final static int FORMAT_INT_24 = (1 << 2); // not supported\n\tpublic final static int FORMAT_INT_16 = (1 << 3);\n\tpublic final static int FORMAT_INT_8 = (1 << 4); // not supported\n\tpublic final static int FORMAT_UINT_8 = (1 << 5); // not supported\n\n\t/** These HOST_API_TYPES will not change in the future. */\n\tpublic final static int HOST_API_TYPE_DEV = 0;\n\tpublic final static int HOST_API_TYPE_DIRECTSOUND = 1;\n\tpublic final static int HOST_API_TYPE_MME = 2;\n\tpublic final static int HOST_API_TYPE_ASIO = 3;\n\t/** Apple Sound Manager. Obsolete. */\n\tpublic final static int HOST_API_TYPE_SOUNDMANAGER = 4;\n\tpublic final static int HOST_API_TYPE_COREAUDIO = 5;\n\tpublic final static int HOST_API_TYPE_OSS = 7;\n\tpublic final static int HOST_API_TYPE_ALSA = 8;\n\tpublic final static int HOST_API_TYPE_AL = 9;\n\tpublic final static int HOST_API_TYPE_BEOS = 10;\n\tpublic final static int HOST_API_TYPE_WDMKS = 11;\n\tpublic final static int HOST_API_TYPE_JACK = 12;\n\tpublic final static int HOST_API_TYPE_WASAPI = 13;\n\tpublic final static int HOST_API_TYPE_AUDIOSCIENCE = 14;\n\tpublic final static int HOST_API_TYPE_COUNT = 15;\n\n\tstatic\n\t{\n\t\tString os = System.getProperty( \"os.name\" ).toLowerCase();\n\t\t// On Windows we have separate libraries for 32 and 64-bit JVMs.\n\t\tif( os.indexOf( \"win\" ) >= 0 )\n\t\t{\n\t\t\tif( System.getProperty( \"os.arch\" ).contains( \"64\" ) )\n\t\t\t{\n\t\t\t\tSystem.loadLibrary( \"jportaudio_x64\" );\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tSystem.loadLibrary( \"jportaudio_x86\" );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.loadLibrary( \"jportaudio\" );\n\t\t}\n\t\tSystem.out.println( \"---- JPortAudio version \" + getVersion() + \", \"\n\t\t\t\t+ getVersionText() );\n\t}\n\n\t/**\n\t * @return the release number of the currently running PortAudio build, eg\n\t *         1900.\n\t */\n\tpublic native static int getVersion();\n\n\t/**\n\t * @return a textual description of the current PortAudio build, eg\n\t *         \"PortAudio V19-devel 13 October 2002\".\n\t */\n\tpublic native static String getVersionText();\n\n\t/**\n\t * Library initialization function - call this before using PortAudio. This\n\t * function initializes internal data structures and prepares underlying\n\t * host APIs for use. With the exception of getVersion(), getVersionText(),\n\t * and getErrorText(), this function MUST be called before using any other\n\t * PortAudio API functions.\n\t */\n\tpublic native static void initialize();\n\n\t/**\n\t * Library termination function - call this when finished using PortAudio.\n\t * This function deallocates all resources allocated by PortAudio since it\n\t * was initialized by a call to initialize(). In cases where Pa_Initialise()\n\t * has been called multiple times, each call must be matched with a\n\t * corresponding call to terminate(). The final matching call to terminate()\n\t * will automatically close any PortAudio streams that are still open.\n\t */\n\tpublic native static void terminate();\n\n\t/**\n\t * @return the number of available devices. The number of available devices\n\t *         may be zero.\n\t */\n\tpublic native static int getDeviceCount();\n\n\tprivate native static void getDeviceInfo( int index, DeviceInfo deviceInfo );\n\n\t/**\n\t * @param index\n\t *            A valid device index in the range 0 to (getDeviceCount()-1)\n\t * @return An DeviceInfo structure.\n\t * @throws RuntimeException\n\t *             if the device parameter is out of range.\n\t */\n\tpublic static DeviceInfo getDeviceInfo( int index )\n\t{\n\t\tDeviceInfo deviceInfo = new DeviceInfo();\n\t\tgetDeviceInfo( index, deviceInfo );\n\t\treturn deviceInfo;\n\t}\n\n\t/**\n\t * @return the number of available host APIs.\n\t */\n\tpublic native static int getHostApiCount();\n\n\tprivate native static void getHostApiInfo( int index,\n\t\t\tHostApiInfo hostApiInfo );\n\n\t/**\n\t * @param index\n\t * @return information about the Host API\n\t */\n\tpublic static HostApiInfo getHostApiInfo( int index )\n\t{\n\t\tHostApiInfo hostApiInfo = new HostApiInfo();\n\t\tgetHostApiInfo( index, hostApiInfo );\n\t\treturn hostApiInfo;\n\t}\n\n\t/**\n\t * @param hostApiType\n\t *            A unique host API identifier, for example\n\t *            HOST_API_TYPE_COREAUDIO.\n\t * @return a runtime host API index\n\t */\n\tpublic native static int hostApiTypeIdToHostApiIndex( int hostApiType );\n\n\t/**\n\t * @param hostApiIndex\n\t *            A valid host API index ranging from 0 to (getHostApiCount()-1)\n\t * @param apiDeviceIndex\n\t *            A valid per-host device index in the range 0 to\n\t *            (getHostApiInfo(hostApi).deviceCount-1)\n\t * @return standard PortAudio device index\n\t */\n\tpublic native static int hostApiDeviceIndexToDeviceIndex( int hostApiIndex,\n\t\t\tint apiDeviceIndex );\n\n\tpublic native static int getDefaultInputDevice();\n\n\tpublic native static int getDefaultOutputDevice();\n\n\tpublic native static int getDefaultHostApi();\n\n\t/**\n\t * @param inputStreamParameters\n\t *            input description, may be null\n\t * @param outputStreamParameters\n\t *            output description, may be null\n\t * @param sampleRate\n\t *            typically 44100 or 48000, or maybe 22050, 16000, 8000, 96000\n\t * @return 0 if supported or a negative error\n\t */\n\tpublic native static int isFormatSupported(\n\t\t\tStreamParameters inputStreamParameters,\n\t\t\tStreamParameters outputStreamParameters, int sampleRate );\n\n\tprivate native static void openStream( BlockingStream blockingStream,\n\t\t\tStreamParameters inputStreamParameters,\n\t\t\tStreamParameters outputStreamParameters, int sampleRate,\n\t\t\tint framesPerBuffer, int flags );\n\n\t/**\n\t * \n\t * @param inputStreamParameters\n\t *            input description, may be null\n\t * @param outputStreamParameters\n\t *            output description, may be null\n\t * @param sampleRate\n\t *            typically 44100 or 48000, or maybe 22050, 16000, 8000, 96000\n\t * @param framesPerBuffer\n\t * @param flags\n\t * @return\n\t */\n\tpublic static BlockingStream openStream(\n\t\t\tStreamParameters inputStreamParameters,\n\t\t\tStreamParameters outputStreamParameters, int sampleRate,\n\t\t\tint framesPerBuffer, int flags )\n\t{\n\t\tBlockingStream blockingStream = new BlockingStream();\n\t\topenStream( blockingStream, inputStreamParameters,\n\t\t\t\toutputStreamParameters, sampleRate, framesPerBuffer, flags );\n\t\treturn blockingStream;\n\t}\n\n}\n"
  },
  {
    "path": "thirdparty/portaudio/bindings/java/jportaudio/src/com/portaudio/StreamInfo.java",
    "content": "/*\n * Portable Audio I/O Library\n * Java Binding for PortAudio\n *\n * Based on the Open Source API proposed by Ross Bencina\n * Copyright (c) 2008 Ross Bencina\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however, \n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also \n * requested that these non-binding requests be included along with the \n * license above.\n */\n\n\n/** @file\n @ingroup bindings_java\n\n @brief Information about a JPortAudio Stream.\n*/\n\npackage com.portaudio;\n\n/**\n * Equivalent to PaStreamInfo\n * @see PortAudio\n * @author Phil Burk\n *\n */\npublic class StreamInfo\n{\n\tpublic int structVersion;\n\tpublic double outputLatency;\n\tpublic double inputLatency;\n\tpublic double sampleRate;\n}\n"
  },
  {
    "path": "thirdparty/portaudio/bindings/java/jportaudio/src/com/portaudio/StreamParameters.java",
    "content": "/*\n * Portable Audio I/O Library\n * Java Binding for PortAudio\n *\n * Based on the Open Source API proposed by Ross Bencina\n * Copyright (c) 2008 Ross Bencina\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however, \n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also \n * requested that these non-binding requests be included along with the \n * license above.\n */\n\n/** @file\n @ingroup bindings_java\n\n @brief Options to use when opening a stream.\n*/\npackage com.portaudio;\n/**\n * Equivalent to PaStreamParameters\n * @see PortAudio\n * @author Phil Burk\n *\n */\npublic class StreamParameters\n{\n\tpublic int device = 0;\n\tpublic int channelCount = 2;\n\tpublic int sampleFormat = PortAudio.FORMAT_FLOAT_32;\n\tpublic double suggestedLatency = 0.050;\n}\n"
  },
  {
    "path": "thirdparty/portaudio/bindings/java/jportaudio.dox",
    "content": "/** \n@page java_binding JPortAudio Java Binding\n@ingroup jportaudio\n\n<i>Note: this page has not been reviewed, and may contain errors.</i>\n\n@section java_draft DRAFT - IN PROGRESS\n\n9/4/12 JPortAudio is very new and should be considered an \"alpha\" release.\nThe building of JPortAudio will eventually be integrated into the Makefile as an optional build.\n\nCurrently JPortAudio is only supported for Windows and Macintosh. Please contact us if you want to help with porting Linux.\n\nFor reference documentation of the JPortAudio API see: com.portaudio.PortAudio\n\nFor an example see: PlaySine.java\n\n@section java_comp_windows Building JPortAudio on Windows\n\nBuild the Java code using the Eclipse project in \"jportaudio\". Export as \"jportaudio.jar\".\n\nIf you modify the JNI API then you will need to regenerate the JNI .h files using:\n\n@code\ncd bindings/java/scripts\nmake_header.bat\n@endcode\n\nBuild the JNI DLL using the Visual Studio 2010 solution in \"java/c/build/vs2010/PortAudioJNI\".\n\n@section java_use_windows Using JPortAudio on Windows\n\nPut the \"jportaudio.jar\" in the classpath for your application.\nPlace the following libraries where they can be found, typically in the same folder as your application.\n\n- portaudio_x86.dll\n- portaudio_x64.dll\n- jportaudio_x86.dll\n- jportaudio_x64.dll\n\n@section java_comp_max Building JPortAudio on Mac\n\nThese are notes from building JPortAudio on a Mac with 10.6.8 and XCode 4.\n\nI created a target of type 'C' library.\n\nI added the regular PortAudio frameworks plus the JavaVM framework.\n\nI modified com_portaudio_PortAudio.h and com_portaudio_BlockingStream.h so that jni.h could found.\n\n@code\n#if defined(__APPLE__)\n#include <JavaVM/jni.h>\n#else\n#include <jni.h>\n#endif\n@endcode\n\nThis is bad because those header files are autogenerated and will be overwritten.\nWe need a better solution for this.\n\nI had trouble finding the \"libjportaudio.jnilib\". So I added a Build Phase that copied the library to \"/Users/phil/Library/Java/Extensions\".\n\nOn the Mac we can create a universal library for both 32 and 64-bit JVMs. So in the JAR file I will open \"jportaudio\" on Apple. ON WIndows I will continue to open \"jportaudio_x64\" and \"jportaudio_x86\".\n*/\n"
  },
  {
    "path": "thirdparty/portaudio/bindings/java/scripts/make_header.bat",
    "content": "REM Generate the JNI header file from the Java code for JPortAudio\r\nREM by Phil Burk\r\n\r\njavah -classpath ../jportaudio/bin -d ../c/src com.portaudio.PortAudio com.portaudio.BlockingStream\r\n"
  },
  {
    "path": "thirdparty/portaudio/build/msvc/portaudio.def",
    "content": "EXPORTS\r\n\r\n;\r\nPa_GetVersion                       @1\r\nPa_GetVersionText                   @2\r\nPa_GetErrorText                     @3                 \r\nPa_Initialize                       @4\r\nPa_Terminate                        @5\r\nPa_GetHostApiCount                  @6\r\nPa_GetDefaultHostApi                @7\r\nPa_GetHostApiInfo                   @8\r\nPa_HostApiTypeIdToHostApiIndex      @9\r\nPa_HostApiDeviceIndexToDeviceIndex  @10\r\nPa_GetLastHostErrorInfo             @11\r\nPa_GetDeviceCount                   @12\r\nPa_GetDefaultInputDevice            @13\r\nPa_GetDefaultOutputDevice           @14\r\nPa_GetDeviceInfo                    @15\r\nPa_IsFormatSupported                @16\r\nPa_OpenStream                       @17\r\nPa_OpenDefaultStream                @18\r\nPa_CloseStream                      @19\r\nPa_SetStreamFinishedCallback        @20\r\nPa_StartStream                      @21\r\nPa_StopStream                       @22\r\nPa_AbortStream                      @23\r\nPa_IsStreamStopped                  @24\r\nPa_IsStreamActive                   @25\r\nPa_GetStreamInfo                    @26\r\nPa_GetStreamTime                    @27\r\nPa_GetStreamCpuLoad                 @28\r\nPa_ReadStream                       @29\r\nPa_WriteStream                      @30\r\nPa_GetStreamReadAvailable           @31\r\nPa_GetStreamWriteAvailable          @32\r\nPa_GetSampleSize                    @33\r\nPa_Sleep                            @34\r\nPaAsio_GetAvailableBufferSizes      @50\r\nPaAsio_ShowControlPanel             @51\r\nPaUtil_InitializeX86PlainConverters @52\r\nPaAsio_GetInputChannelName          @53\r\nPaAsio_GetOutputChannelName         @54\r\nPaUtil_SetDebugPrintFunction        @55\r\nPaWasapi_GetAudioClient             @56\r\nPaWasapi_UpdateDeviceList           @57\r\nPaWasapi_GetDeviceCurrentFormat     @58\r\nPaWasapi_GetDeviceDefaultFormat     @59\r\nPaWasapi_GetDeviceMixFormat         @60\r\nPaWasapi_GetDeviceRole              @61\r\nPaWasapi_ThreadPriorityBoost        @62\r\nPaWasapi_ThreadPriorityRevert       @63\r\nPaWasapi_GetFramesPerHostBuffer     @64\r\nPaWasapi_GetJackCount               @65\r\nPaWasapi_GetJackDescription         @66\r\nPaWasapi_SetStreamStateHandler      @68\r\nPaWasapiWinrt_SetDefaultDeviceId    @67\r\nPaWasapiWinrt_PopulateDeviceList    @69\r\nPaWasapi_GetIMMDevice               @70\r\n"
  },
  {
    "path": "thirdparty/portaudio/build/msvc/portaudio.dsp",
    "content": "# Microsoft Developer Studio Project File - Name=\"portaudio\" - Package Owner=<4>\r\n# Microsoft Developer Studio Generated Build File, Format Version 6.00\r\n# ** DO NOT EDIT **\r\n\r\n# TARGTYPE \"Win32 (x86) Dynamic-Link Library\" 0x0102\r\n\r\nCFG=portaudio - Win32 Release\r\n!MESSAGE This is not a valid makefile. To build this project using NMAKE,\r\n!MESSAGE use the Export Makefile command and run\r\n!MESSAGE \r\n!MESSAGE NMAKE /f \"portaudio.mak\".\r\n!MESSAGE \r\n!MESSAGE You can specify a configuration when running NMAKE\r\n!MESSAGE by defining the macro CFG on the command line. For example:\r\n!MESSAGE \r\n!MESSAGE NMAKE /f \"portaudio.mak\" CFG=\"portaudio - Win32 Release\"\r\n!MESSAGE \r\n!MESSAGE Possible choices for configuration are:\r\n!MESSAGE \r\n!MESSAGE \"portaudio - Win32 Release\" (based on \"Win32 (x86) Dynamic-Link Library\")\r\n!MESSAGE \"portaudio - Win32 Debug\" (based on \"Win32 (x86) Dynamic-Link Library\")\r\n!MESSAGE \r\n\r\n# Begin Project\r\n# PROP AllowPerConfigDependencies 0\r\n# PROP Scc_ProjName \"\"\r\n# PROP Scc_LocalPath \"\"\r\nCPP=cl.exe\r\nMTL=midl.exe\r\nRSC=rc.exe\r\n\r\n!IF  \"$(CFG)\" == \"portaudio - Win32 Release\"\r\n\r\n# PROP BASE Use_MFC 0\r\n# PROP BASE Use_Debug_Libraries 0\r\n# PROP BASE Output_Dir \"Release_x86\"\r\n# PROP BASE Intermediate_Dir \"Release_x86\"\r\n# PROP BASE Target_Dir \"\"\r\n# PROP Use_MFC 0\r\n# PROP Use_Debug_Libraries 0\r\n# PROP Output_Dir \"Release_x86\"\r\n# PROP Intermediate_Dir \"Release_x86\"\r\n# PROP Ignore_Export_Lib 0\r\n# PROP Target_Dir \"\"\r\n# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D \"WIN32\" /D \"NDEBUG\" /D \"_WINDOWS\" /D \"_MBCS\" /D \"_USRDLL\" /FD /c\r\n# ADD CPP /nologo /MD /W3 /GX /O2 /I \"..\\..\\src\\common\" /I \"..\\..\\include\" /I \".\\\\\" /I \"..\\..\\src\\os\\win\" /D \"WIN32\" /D \"NDEBUG\" /D \"_USRDLL\" /D \"PA_ENABLE_DEBUG_OUTPUT\" /D \"_CRT_SECURE_NO_DEPRECATE\" /D \"PAWIN_USE_WDMKS_DEVICE_INFO\" /FD /c\r\n# SUBTRACT CPP /YX /Yc /Yu\r\n# ADD BASE MTL /nologo /D \"NDEBUG\" /mktyplib203 /win32\r\n# ADD MTL /nologo /D \"NDEBUG\" /mktyplib203 /win32\r\n# ADD BASE RSC /l 0x409 /d \"NDEBUG\"\r\n# ADD RSC /l 0x409 /d \"NDEBUG\"\r\nBSC32=bscmake.exe\r\n# ADD BASE BSC32 /nologo\r\n# ADD BSC32 /nologo\r\nLINK32=link.exe\r\n# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386\r\n# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib setupapi.lib /nologo /dll /machine:I386 /out:\"./Release_x86/portaudio_x86.dll\"\r\n\r\n!ELSEIF  \"$(CFG)\" == \"portaudio - Win32 Debug\"\r\n\r\n# PROP BASE Use_MFC 0\r\n# PROP BASE Use_Debug_Libraries 1\r\n# PROP BASE Output_Dir \"Debug_x86\"\r\n# PROP BASE Intermediate_Dir \"Debug_x86\"\r\n# PROP BASE Target_Dir \"\"\r\n# PROP Use_MFC 0\r\n# PROP Use_Debug_Libraries 1\r\n# PROP Output_Dir \"Debug_x86\"\r\n# PROP Intermediate_Dir \"Debug_x86\"\r\n# PROP Ignore_Export_Lib 0\r\n# PROP Target_Dir \"\"\r\n# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D \"WIN32\" /D \"_DEBUG\" /D \"_WINDOWS\" /D \"_MBCS\" /D \"_USRDLL\" /FD /GZ /c\r\n# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I \"..\\..\\src\\common\" /I \"..\\..\\include\" /I \".\\\\\" /I \"..\\..\\src\\os\\win\" /D \"WIN32\" /D \"_DEBUG\" /D \"_USRDLL\" /D \"PA_ENABLE_DEBUG_OUTPUT\" /D \"_CRT_SECURE_NO_DEPRECATE\" /D \"PAWIN_USE_WDMKS_DEVICE_INFO\" /FD /GZ /c\r\n# SUBTRACT CPP /YX /Yc /Yu\r\n# ADD BASE MTL /nologo /D \"_DEBUG\" /mktyplib203 /win32\r\n# ADD MTL /nologo /D \"_DEBUG\" /mktyplib203 /win32\r\n# ADD BASE RSC /l 0x409 /d \"_DEBUG\"\r\n# ADD RSC /l 0x409 /d \"_DEBUG\"\r\nBSC32=bscmake.exe\r\n# ADD BASE BSC32 /nologo\r\n# ADD BSC32 /nologo\r\nLINK32=link.exe\r\n# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept\r\n# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib setupapi.lib /nologo /dll /debug /machine:I386 /out:\"./Debug_x86/portaudio_x86.dll\" /pdbtype:sept\r\n\r\n!ENDIF \r\n\r\n# Begin Target\r\n\r\n# Name \"portaudio - Win32 Release\"\r\n# Name \"portaudio - Win32 Debug\"\r\n# Begin Group \"Source Files\"\r\n\r\n# PROP Default_Filter \"cpp;c;cxx;rc;def;r;odl;idl;hpj;bat\"\r\n# Begin Group \"common\"\r\n\r\n# PROP Default_Filter \"\"\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\src\\common\\pa_allocation.c\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\src\\common\\pa_converters.c\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\src\\common\\pa_cpuload.c\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\src\\common\\pa_debugprint.c\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\src\\common\\pa_dither.c\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\src\\common\\pa_front.c\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\src\\common\\pa_process.c\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\src\\common\\pa_ringbuffer.c\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\src\\hostapi\\skeleton\\pa_hostapi_skeleton.c\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\src\\common\\pa_stream.c\r\n# End Source File\r\n# End Group\r\n# Begin Group \"hostapi\"\r\n\r\n# PROP Default_Filter \"\"\r\n# Begin Group \"ASIO\"\r\n\r\n# PROP Default_Filter \"\"\r\n# Begin Group \"ASIOSDK\"\r\n\r\n# PROP Default_Filter \"\"\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\src\\hostapi\\asio\\ASIOSDK\\common\\asio.cpp\r\n# ADD CPP /I \"..\\..\\src\\hostapi\\asio\\ASIOSDK\\host\" /I \"..\\..\\src\\hostapi\\asio\\ASIOSDK\\host\\pc\" /I \"..\\..\\src\\hostapi\\asio\\ASIOSDK\\common\"\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\src\\hostapi\\asio\\ASIOSDK\\host\\ASIOConvertSamples.cpp\r\n# ADD CPP /I \"..\\..\\src\\hostapi\\asio\\ASIOSDK\\host\" /I \"..\\..\\src\\hostapi\\asio\\ASIOSDK\\host\\pc\" /I \"..\\..\\src\\hostapi\\asio\\ASIOSDK\\common\"\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\src\\hostapi\\asio\\ASIOSDK\\host\\asiodrivers.cpp\r\n# ADD CPP /I \"..\\..\\src\\hostapi\\asio\\ASIOSDK\\host\" /I \"..\\..\\src\\hostapi\\asio\\ASIOSDK\\host\\pc\" /I \"..\\..\\src\\hostapi\\asio\\ASIOSDK\\common\"\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\src\\hostapi\\asio\\ASIOSDK\\host\\pc\\asiolist.cpp\r\n# ADD CPP /I \"..\\..\\src\\hostapi\\asio\\ASIOSDK\\host\" /I \"..\\..\\src\\hostapi\\asio\\ASIOSDK\\host\\pc\" /I \"..\\..\\src\\hostapi\\asio\\ASIOSDK\\common\"\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\src\\hostapi\\asio\\ASIOSDK\\common\\combase.cpp\r\n# ADD CPP /I \"..\\..\\src\\hostapi\\asio\\ASIOSDK\\host\" /I \"..\\..\\src\\hostapi\\asio\\ASIOSDK\\host\\pc\" /I \"..\\..\\src\\hostapi\\asio\\ASIOSDK\\common\"\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\src\\hostapi\\asio\\ASIOSDK\\common\\debugmessage.cpp\r\n# ADD CPP /I \"..\\..\\src\\hostapi\\asio\\ASIOSDK\\host\" /I \"..\\..\\src\\hostapi\\asio\\ASIOSDK\\host\\pc\" /I \"..\\..\\src\\hostapi\\asio\\ASIOSDK\\common\"\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\src\\hostapi\\asio\\ASIOSDK\\common\\register.cpp\r\n# ADD CPP /I \"..\\..\\src\\hostapi\\asio\\ASIOSDK\\host\" /I \"..\\..\\src\\hostapi\\asio\\ASIOSDK\\host\\pc\" /I \"..\\..\\src\\hostapi\\asio\\ASIOSDK\\common\"\r\n# End Source File\r\n# End Group\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\src\\hostapi\\asio\\pa_asio.cpp\r\n# ADD CPP /I \"..\\..\\src\\hostapi\\asio\\ASIOSDK\\host\" /I \"..\\..\\src\\hostapi\\asio\\ASIOSDK\\host\\pc\" /I \"..\\..\\src\\hostapi\\asio\\ASIOSDK\\common\"\r\n# End Source File\r\n# End Group\r\n# Begin Group \"dsound\"\r\n\r\n# PROP Default_Filter \"\"\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\src\\hostapi\\dsound\\pa_win_ds.c\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\src\\hostapi\\dsound\\pa_win_ds_dynlink.c\r\n# End Source File\r\n# End Group\r\n# Begin Group \"wmme\"\r\n\r\n# PROP Default_Filter \"\"\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\src\\hostapi\\wmme\\pa_win_wmme.c\r\n# End Source File\r\n# End Group\r\n# Begin Group \"wasapi\"\r\n\r\n# PROP Default_Filter \"\"\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\src\\hostapi\\wasapi\\pa_win_wasapi.cpp\r\n# End Source File\r\n# End Group\r\n# Begin Group \"wdm-ks\"\r\n\r\n# PROP Default_Filter \"\"\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\src\\hostapi\\wdmks\\pa_win_wdmks.c\r\n# End Source File\r\n# End Group\r\n# End Group\r\n# Begin Group \"os\"\r\n\r\n# PROP Default_Filter \"\"\r\n# Begin Group \"win\"\r\n\r\n# PROP Default_Filter \"\"\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\src\\os\\win\\pa_win_hostapis.c\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\src\\os\\win\\pa_win_util.c\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\src\\os\\win\\pa_win_waveformat.c\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\src\\os\\win\\pa_win_wdmks_utils.c\r\n# End Source File\r\n# Begin Source File\r\n\r\nSOURCE=..\\..\\src\\os\\win\\pa_x86_plain_converters.c\r\n# End Source File\r\n# End Group\r\n# End Group\r\n# End Group\r\n# Begin Group \"Header Files\"\r\n\r\n# PROP Default_Filter \"h;hpp;hxx;hm;inl\"\r\n# End Group\r\n# Begin Group \"Resource Files\"\r\n\r\n# PROP Default_Filter \"ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe\"\r\n# Begin Source File\r\n\r\nSOURCE=.\\portaudio.def\r\n# End Source File\r\n# End Group\r\n# End Target\r\n# End Project\r\n"
  },
  {
    "path": "thirdparty/portaudio/build/msvc/portaudio.dsw",
    "content": "Microsoft Developer Studio Workspace File, Format Version 6.00\r\n# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!\r\n\r\n###############################################################################\r\n\r\nProject: \"portaudio\"=\".\\portaudio.dsp\" - Package Owner=<4>\r\n\r\nPackage=<5>\r\n{{{\r\n}}}\r\n\r\nPackage=<4>\r\n{{{\r\n}}}\r\n\r\n###############################################################################\r\n\r\nGlobal:\r\n\r\nPackage=<5>\r\n{{{\r\n}}}\r\n\r\nPackage=<3>\r\n{{{\r\n}}}\r\n\r\n###############################################################################\r\n\r\n"
  },
  {
    "path": "thirdparty/portaudio/build/msvc/portaudio.sln",
    "content": "﻿\r\nMicrosoft Visual Studio Solution File, Format Version 9.00\r\n# Visual Studio 2005\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"portaudio\", \"portaudio.vcproj\", \"{0A18A071-125E-442F-AFF7-A3F68ABECF99}\"\r\nEndProject\r\nGlobal\r\n\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\r\n\t\tDebug|Win32 = Debug|Win32\r\n\t\tDebug|x64 = Debug|x64\r\n\t\tRelease|Win32 = Release|Win32\r\n\t\tRelease|x64 = Release|x64\r\n\t\tReleaseMinDependency|Win32 = ReleaseMinDependency|Win32\r\n\t\tReleaseMinDependency|x64 = ReleaseMinDependency|x64\r\n\tEndGlobalSection\r\n\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\r\n\t\t{0A18A071-125E-442F-AFF7-A3F68ABECF99}.Debug|Win32.ActiveCfg = Debug|Win32\r\n\t\t{0A18A071-125E-442F-AFF7-A3F68ABECF99}.Debug|Win32.Build.0 = Debug|Win32\r\n\t\t{0A18A071-125E-442F-AFF7-A3F68ABECF99}.Debug|x64.ActiveCfg = Debug|x64\r\n\t\t{0A18A071-125E-442F-AFF7-A3F68ABECF99}.Debug|x64.Build.0 = Debug|x64\r\n\t\t{0A18A071-125E-442F-AFF7-A3F68ABECF99}.Release|Win32.ActiveCfg = Release|Win32\r\n\t\t{0A18A071-125E-442F-AFF7-A3F68ABECF99}.Release|Win32.Build.0 = Release|Win32\r\n\t\t{0A18A071-125E-442F-AFF7-A3F68ABECF99}.Release|x64.ActiveCfg = Release|x64\r\n\t\t{0A18A071-125E-442F-AFF7-A3F68ABECF99}.Release|x64.Build.0 = Release|x64\r\n\t\t{0A18A071-125E-442F-AFF7-A3F68ABECF99}.ReleaseMinDependency|Win32.ActiveCfg = ReleaseMinDependency|Win32\r\n\t\t{0A18A071-125E-442F-AFF7-A3F68ABECF99}.ReleaseMinDependency|Win32.Build.0 = ReleaseMinDependency|Win32\r\n\t\t{0A18A071-125E-442F-AFF7-A3F68ABECF99}.ReleaseMinDependency|x64.ActiveCfg = ReleaseMinDependency|x64\r\n\t\t{0A18A071-125E-442F-AFF7-A3F68ABECF99}.ReleaseMinDependency|x64.Build.0 = ReleaseMinDependency|x64\r\n\tEndGlobalSection\r\n\tGlobalSection(SolutionProperties) = preSolution\r\n\t\tHideSolutionNode = FALSE\r\n\tEndGlobalSection\r\nEndGlobal\r\n"
  },
  {
    "path": "thirdparty/portaudio/build/msvc/portaudio.vcproj",
    "content": "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\r\n<VisualStudioProject\r\n\tProjectType=\"Visual C++\"\r\n\tVersion=\"8,00\"\r\n\tName=\"portaudio\"\r\n\tProjectGUID=\"{0A18A071-125E-442F-AFF7-A3F68ABECF99}\"\r\n\tRootNamespace=\"portaudio\"\r\n\t>\r\n\t<Platforms>\r\n\t\t<Platform\r\n\t\t\tName=\"Win32\"\r\n\t\t/>\r\n\t\t<Platform\r\n\t\t\tName=\"x64\"\r\n\t\t/>\r\n\t</Platforms>\r\n\t<ToolFiles>\r\n\t</ToolFiles>\r\n\t<Configurations>\r\n\t\t<Configuration\r\n\t\t\tName=\"Release|Win32\"\r\n\t\t\tOutputDirectory=\"$(PlatformName)\\$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(PlatformName)\\$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"2\"\r\n\t\t\tInheritedPropertySheets=\"$(VCInstallDir)VCProjectDefaults\\UpgradeFromVC60.vsprops\"\r\n\t\t\tUseOfMFC=\"0\"\r\n\t\t\tATLMinimizesCRunTimeLibraryUsage=\"false\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t\tPreprocessorDefinitions=\"NDEBUG\"\r\n\t\t\t\tMkTypLibCompatible=\"true\"\r\n\t\t\t\tSuppressStartupBanner=\"true\"\r\n\t\t\t\tTargetEnvironment=\"1\"\r\n\t\t\t\tTypeLibraryName=\".\\Release_x86/portaudio.tlb\"\r\n\t\t\t\tHeaderFileName=\"\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tOptimization=\"2\"\r\n\t\t\t\tInlineFunctionExpansion=\"1\"\r\n\t\t\t\tEnableIntrinsicFunctions=\"true\"\r\n\t\t\t\tFavorSizeOrSpeed=\"1\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\src\\common;..\\..\\include;.\\;..\\..\\src\\os\\win\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_USRDLL;PA_ENABLE_DEBUG_OUTPUT;_CRT_SECURE_NO_DEPRECATE;PAWIN_USE_WDMKS_DEVICE_INFO;PA_USE_ASIO=0;PA_USE_DS=0;PA_USE_WMME=1;PA_USE_WASAPI=1;PA_USE_WDMKS=1\"\r\n\t\t\t\tStringPooling=\"true\"\r\n\t\t\t\tRuntimeLibrary=\"2\"\r\n\t\t\t\tEnableFunctionLevelLinking=\"true\"\r\n\t\t\t\tPrecompiledHeaderFile=\"$(PlatformName)\\$(ConfigurationName)/portaudio.pch\"\r\n\t\t\t\tAssemblerListingLocation=\"$(PlatformName)\\$(ConfigurationName)\\\"\r\n\t\t\t\tObjectFile=\"$(PlatformName)\\$(ConfigurationName)\\\"\r\n\t\t\t\tProgramDataBaseFileName=\"$(PlatformName)\\$(ConfigurationName)\\\"\r\n\t\t\t\tWarningLevel=\"3\"\r\n\t\t\t\tSuppressStartupBanner=\"true\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t\tPreprocessorDefinitions=\"NDEBUG\"\r\n\t\t\t\tCulture=\"1033\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tAdditionalDependencies=\"ksuser.lib\"\r\n\t\t\t\tOutputFile=\"$(PlatformName)\\$(ConfigurationName)\\portaudio_x86.dll\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tSuppressStartupBanner=\"true\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"\"\r\n\t\t\t\tModuleDefinitionFile=\".\\portaudio.def\"\r\n\t\t\t\tProgramDatabaseFile=\"$(PlatformName)\\$(ConfigurationName)\\portaudio_x86.pdb\"\r\n\t\t\t\tImportLibrary=\"$(PlatformName)\\$(ConfigurationName)\\portaudio_x86.lib\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t\tSuppressStartupBanner=\"true\"\r\n\t\t\t\tOutputFile=\"$(PlatformName)\\$(ConfigurationName)\\portaudio.bsc\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebDeploymentTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t\t<Configuration\r\n\t\t\tName=\"Release|x64\"\r\n\t\t\tOutputDirectory=\"$(PlatformName)\\$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(PlatformName)\\$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"2\"\r\n\t\t\tInheritedPropertySheets=\"$(VCInstallDir)VCProjectDefaults\\UpgradeFromVC60.vsprops\"\r\n\t\t\tUseOfMFC=\"0\"\r\n\t\t\tATLMinimizesCRunTimeLibraryUsage=\"false\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t\tPreprocessorDefinitions=\"NDEBUG\"\r\n\t\t\t\tMkTypLibCompatible=\"true\"\r\n\t\t\t\tSuppressStartupBanner=\"true\"\r\n\t\t\t\tTargetEnvironment=\"3\"\r\n\t\t\t\tTypeLibraryName=\".\\Release_x86/portaudio.tlb\"\r\n\t\t\t\tHeaderFileName=\"\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tOptimization=\"2\"\r\n\t\t\t\tInlineFunctionExpansion=\"1\"\r\n\t\t\t\tEnableIntrinsicFunctions=\"true\"\r\n\t\t\t\tFavorSizeOrSpeed=\"1\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\src\\common;..\\..\\include;.\\;..\\..\\src\\os\\win\"\r\n\t\t\t\tPreprocessorDefinitions=\"_WIN64;NDEBUG;_USRDLL;PA_ENABLE_DEBUG_OUTPUT;_CRT_SECURE_NO_DEPRECATE;PAWIN_USE_WDMKS_DEVICE_INFO;PA_USE_ASIO=0;PA_USE_DS=0;PA_USE_WMME=1;PA_USE_WASAPI=1;PA_USE_WDMKS=1\"\r\n\t\t\t\tStringPooling=\"true\"\r\n\t\t\t\tRuntimeLibrary=\"2\"\r\n\t\t\t\tEnableFunctionLevelLinking=\"true\"\r\n\t\t\t\tPrecompiledHeaderFile=\"$(PlatformName)\\$(ConfigurationName)\\portaudio.pch\"\r\n\t\t\t\tAssemblerListingLocation=\"$(PlatformName)\\$(ConfigurationName)\\\"\r\n\t\t\t\tObjectFile=\"$(PlatformName)\\$(ConfigurationName)\\\"\r\n\t\t\t\tProgramDataBaseFileName=\"$(PlatformName)\\$(ConfigurationName)\\\"\r\n\t\t\t\tWarningLevel=\"3\"\r\n\t\t\t\tSuppressStartupBanner=\"true\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t\tPreprocessorDefinitions=\"NDEBUG\"\r\n\t\t\t\tCulture=\"1033\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tAdditionalDependencies=\"ksuser.lib\"\r\n\t\t\t\tOutputFile=\"$(PlatformName)\\$(ConfigurationName)\\portaudio_x64.dll\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tSuppressStartupBanner=\"true\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"\"\r\n\t\t\t\tModuleDefinitionFile=\".\\portaudio.def\"\r\n\t\t\t\tProgramDatabaseFile=\"$(PlatformName)\\$(ConfigurationName)/portaudio_x64.pdb\"\r\n\t\t\t\tImportLibrary=\"$(PlatformName)\\$(ConfigurationName)/portaudio_x64.lib\"\r\n\t\t\t\tTargetMachine=\"17\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t\tSuppressStartupBanner=\"true\"\r\n\t\t\t\tOutputFile=\"$(PlatformName)\\$(ConfigurationName)\\portaudio_x64.bsc\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebDeploymentTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t\t<Configuration\r\n\t\t\tName=\"Debug|Win32\"\r\n\t\t\tOutputDirectory=\"$(PlatformName)\\$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(PlatformName)\\$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"2\"\r\n\t\t\tInheritedPropertySheets=\"$(VCInstallDir)VCProjectDefaults\\UpgradeFromVC60.vsprops\"\r\n\t\t\tUseOfMFC=\"0\"\r\n\t\t\tATLMinimizesCRunTimeLibraryUsage=\"false\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t\tPreprocessorDefinitions=\"_DEBUG\"\r\n\t\t\t\tMkTypLibCompatible=\"true\"\r\n\t\t\t\tSuppressStartupBanner=\"true\"\r\n\t\t\t\tTargetEnvironment=\"1\"\r\n\t\t\t\tTypeLibraryName=\".\\Debug_x86/portaudio.tlb\"\r\n\t\t\t\tHeaderFileName=\"\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tOptimization=\"0\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\src\\common;..\\..\\include;.\\;..\\..\\src\\os\\win\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;_DEBUG;_USRDLL;PA_ENABLE_DEBUG_OUTPUT;_CRT_SECURE_NO_DEPRECATE;PAWIN_USE_WDMKS_DEVICE_INFO;PA_USE_ASIO=0;PA_USE_DS=0;PA_USE_WMME=1;PA_USE_WASAPI=1;PA_USE_WDMKS=1\"\r\n\t\t\t\tMinimalRebuild=\"true\"\r\n\t\t\t\tBasicRuntimeChecks=\"3\"\r\n\t\t\t\tRuntimeLibrary=\"3\"\r\n\t\t\t\tPrecompiledHeaderFile=\"$(PlatformName)\\$(ConfigurationName)/portaudio.pch\"\r\n\t\t\t\tAssemblerListingLocation=\"$(PlatformName)\\$(ConfigurationName)\\\"\r\n\t\t\t\tObjectFile=\"$(PlatformName)\\$(ConfigurationName)\\\"\r\n\t\t\t\tProgramDataBaseFileName=\"$(PlatformName)\\$(ConfigurationName)\\\"\r\n\t\t\t\tWarningLevel=\"3\"\r\n\t\t\t\tSuppressStartupBanner=\"true\"\r\n\t\t\t\tDebugInformationFormat=\"4\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t\tPreprocessorDefinitions=\"_DEBUG\"\r\n\t\t\t\tCulture=\"1033\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tAdditionalDependencies=\"\"\r\n\t\t\t\tOutputFile=\"$(PlatformName)\\$(ConfigurationName)\\portaudio_x86.dll\"\r\n\t\t\t\tLinkIncremental=\"2\"\r\n\t\t\t\tSuppressStartupBanner=\"true\"\r\n\t\t\t\tModuleDefinitionFile=\".\\portaudio.def\"\r\n\t\t\t\tGenerateDebugInformation=\"true\"\r\n\t\t\t\tProgramDatabaseFile=\"$(PlatformName)\\$(ConfigurationName)\\portaudio_x86.pdb\"\r\n\t\t\t\tImportLibrary=\"$(PlatformName)\\$(ConfigurationName)\\portaudio_x86.lib\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t\tSuppressStartupBanner=\"true\"\r\n\t\t\t\tOutputFile=\"$(PlatformName)\\$(ConfigurationName)\\portaudio.bsc\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebDeploymentTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t\t<Configuration\r\n\t\t\tName=\"Debug|x64\"\r\n\t\t\tOutputDirectory=\"$(PlatformName)\\$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(PlatformName)\\$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"2\"\r\n\t\t\tInheritedPropertySheets=\"$(VCInstallDir)VCProjectDefaults\\UpgradeFromVC60.vsprops\"\r\n\t\t\tUseOfMFC=\"0\"\r\n\t\t\tATLMinimizesCRunTimeLibraryUsage=\"false\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t\tPreprocessorDefinitions=\"_DEBUG\"\r\n\t\t\t\tMkTypLibCompatible=\"true\"\r\n\t\t\t\tSuppressStartupBanner=\"true\"\r\n\t\t\t\tTargetEnvironment=\"3\"\r\n\t\t\t\tTypeLibraryName=\".\\Debug_x86/portaudio.tlb\"\r\n\t\t\t\tHeaderFileName=\"\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tOptimization=\"0\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\src\\common,..\\..\\include,.\\,..\\..\\src\\os\\win\"\r\n\t\t\t\tPreprocessorDefinitions=\"_WIN64;_DEBUG;_USRDLL;PA_ENABLE_DEBUG_OUTPUT;_CRT_SECURE_NO_DEPRECATE;PAWIN_USE_WDMKS_DEVICE_INFO;PA_USE_ASIO=0;PA_USE_DS=0;PA_USE_WMME=1;PA_USE_WASAPI=1;PA_USE_WDMKS=1\"\r\n\t\t\t\tMinimalRebuild=\"true\"\r\n\t\t\t\tBasicRuntimeChecks=\"3\"\r\n\t\t\t\tRuntimeLibrary=\"3\"\r\n\t\t\t\tPrecompiledHeaderFile=\"$(PlatformName)\\$(ConfigurationName)\\portaudio.pch\"\r\n\t\t\t\tAssemblerListingLocation=\"$(PlatformName)\\$(ConfigurationName)\\\"\r\n\t\t\t\tObjectFile=\"$(PlatformName)\\$(ConfigurationName)\\\"\r\n\t\t\t\tProgramDataBaseFileName=\"$(PlatformName)\\$(ConfigurationName)\\\"\r\n\t\t\t\tWarningLevel=\"3\"\r\n\t\t\t\tSuppressStartupBanner=\"true\"\r\n\t\t\t\tDebugInformationFormat=\"3\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t\tPreprocessorDefinitions=\"_DEBUG\"\r\n\t\t\t\tCulture=\"1033\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tAdditionalDependencies=\"\"\r\n\t\t\t\tOutputFile=\"$(PlatformName)\\$(ConfigurationName)\\portaudio_x64.dll\"\r\n\t\t\t\tLinkIncremental=\"2\"\r\n\t\t\t\tSuppressStartupBanner=\"true\"\r\n\t\t\t\tModuleDefinitionFile=\".\\portaudio.def\"\r\n\t\t\t\tGenerateDebugInformation=\"true\"\r\n\t\t\t\tProgramDatabaseFile=\"$(PlatformName)\\$(ConfigurationName)/portaudio_x64.pdb\"\r\n\t\t\t\tImportLibrary=\"$(PlatformName)\\$(ConfigurationName)\\portaudio_x64.lib\"\r\n\t\t\t\tTargetMachine=\"17\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t\tSuppressStartupBanner=\"true\"\r\n\t\t\t\tOutputFile=\"$(PlatformName)\\$(ConfigurationName)/portaudio_x64.bsc\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebDeploymentTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t\t<Configuration\r\n\t\t\tName=\"ReleaseMinDependency|Win32\"\r\n\t\t\tOutputDirectory=\"$(PlatformName)\\$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(PlatformName)\\$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"2\"\r\n\t\t\tInheritedPropertySheets=\"$(VCInstallDir)VCProjectDefaults\\UpgradeFromVC60.vsprops\"\r\n\t\t\tUseOfMFC=\"0\"\r\n\t\t\tATLMinimizesCRunTimeLibraryUsage=\"false\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t\tPreprocessorDefinitions=\"NDEBUG\"\r\n\t\t\t\tMkTypLibCompatible=\"true\"\r\n\t\t\t\tSuppressStartupBanner=\"true\"\r\n\t\t\t\tTargetEnvironment=\"1\"\r\n\t\t\t\tTypeLibraryName=\".\\Release_x86/portaudio.tlb\"\r\n\t\t\t\tHeaderFileName=\"\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tOptimization=\"2\"\r\n\t\t\t\tInlineFunctionExpansion=\"1\"\r\n\t\t\t\tEnableIntrinsicFunctions=\"true\"\r\n\t\t\t\tFavorSizeOrSpeed=\"1\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\src\\common;..\\..\\include;.\\;..\\..\\src\\os\\win\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG;_USRDLL;PA_ENABLE_DEBUG_OUTPUT;_CRT_SECURE_NO_DEPRECATE;PAWIN_USE_WDMKS_DEVICE_INFO;PA_USE_ASIO=0;PA_USE_DS=0;PA_USE_WMME=1;PA_USE_WASAPI=1;PA_USE_WDMKS=1\"\r\n\t\t\t\tStringPooling=\"true\"\r\n\t\t\t\tRuntimeLibrary=\"0\"\r\n\t\t\t\tEnableFunctionLevelLinking=\"true\"\r\n\t\t\t\tPrecompiledHeaderFile=\"$(PlatformName)\\$(ConfigurationName)/portaudio.pch\"\r\n\t\t\t\tAssemblerListingLocation=\"$(PlatformName)\\$(ConfigurationName)\\\"\r\n\t\t\t\tObjectFile=\"$(PlatformName)\\$(ConfigurationName)\\\"\r\n\t\t\t\tProgramDataBaseFileName=\"$(PlatformName)\\$(ConfigurationName)\\\"\r\n\t\t\t\tWarningLevel=\"3\"\r\n\t\t\t\tSuppressStartupBanner=\"true\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t\tPreprocessorDefinitions=\"NDEBUG\"\r\n\t\t\t\tCulture=\"1033\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tAdditionalDependencies=\"ksuser.lib\"\r\n\t\t\t\tOutputFile=\"$(PlatformName)\\$(ConfigurationName)\\portaudio_x86.dll\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tSuppressStartupBanner=\"true\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"\"\r\n\t\t\t\tModuleDefinitionFile=\".\\portaudio.def\"\r\n\t\t\t\tProgramDatabaseFile=\"$(PlatformName)\\$(ConfigurationName)\\portaudio_x86.pdb\"\r\n\t\t\t\tImportLibrary=\"$(PlatformName)\\$(ConfigurationName)\\portaudio_x86.lib\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t\tSuppressStartupBanner=\"true\"\r\n\t\t\t\tOutputFile=\"$(PlatformName)\\$(ConfigurationName)\\portaudio.bsc\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebDeploymentTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t\t<Configuration\r\n\t\t\tName=\"ReleaseMinDependency|x64\"\r\n\t\t\tOutputDirectory=\"$(PlatformName)\\$(ConfigurationName)\"\r\n\t\t\tIntermediateDirectory=\"$(PlatformName)\\$(ConfigurationName)\"\r\n\t\t\tConfigurationType=\"2\"\r\n\t\t\tInheritedPropertySheets=\"$(VCInstallDir)VCProjectDefaults\\UpgradeFromVC60.vsprops\"\r\n\t\t\tUseOfMFC=\"0\"\r\n\t\t\tATLMinimizesCRunTimeLibraryUsage=\"false\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t\tPreprocessorDefinitions=\"NDEBUG\"\r\n\t\t\t\tMkTypLibCompatible=\"true\"\r\n\t\t\t\tSuppressStartupBanner=\"true\"\r\n\t\t\t\tTargetEnvironment=\"3\"\r\n\t\t\t\tTypeLibraryName=\".\\Release_x86/portaudio.tlb\"\r\n\t\t\t\tHeaderFileName=\"\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tOptimization=\"2\"\r\n\t\t\t\tInlineFunctionExpansion=\"1\"\r\n\t\t\t\tEnableIntrinsicFunctions=\"true\"\r\n\t\t\t\tFavorSizeOrSpeed=\"1\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\src\\common;..\\..\\include;.\\;..\\..\\src\\os\\win\"\r\n\t\t\t\tPreprocessorDefinitions=\"_WIN64;NDEBUG;_USRDLL;PA_ENABLE_DEBUG_OUTPUT;_CRT_SECURE_NO_DEPRECATE;PAWIN_USE_WDMKS_DEVICE_INFO;PA_USE_ASIO=0;PA_USE_DS=0;PA_USE_WMME=1;PA_USE_WASAPI=1;PA_USE_WDMKS=1\"\r\n\t\t\t\tStringPooling=\"true\"\r\n\t\t\t\tRuntimeLibrary=\"0\"\r\n\t\t\t\tEnableFunctionLevelLinking=\"true\"\r\n\t\t\t\tPrecompiledHeaderFile=\"$(PlatformName)\\$(ConfigurationName)\\portaudio.pch\"\r\n\t\t\t\tAssemblerListingLocation=\"$(PlatformName)\\$(ConfigurationName)\\\"\r\n\t\t\t\tObjectFile=\"$(PlatformName)\\$(ConfigurationName)\\\"\r\n\t\t\t\tProgramDataBaseFileName=\"$(PlatformName)\\$(ConfigurationName)\\\"\r\n\t\t\t\tWarningLevel=\"3\"\r\n\t\t\t\tSuppressStartupBanner=\"true\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t\tPreprocessorDefinitions=\"NDEBUG\"\r\n\t\t\t\tCulture=\"1033\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tAdditionalDependencies=\"ksuser.lib\"\r\n\t\t\t\tOutputFile=\"$(PlatformName)\\$(ConfigurationName)\\portaudio_x64.dll\"\r\n\t\t\t\tLinkIncremental=\"1\"\r\n\t\t\t\tSuppressStartupBanner=\"true\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"\"\r\n\t\t\t\tModuleDefinitionFile=\".\\portaudio.def\"\r\n\t\t\t\tProgramDatabaseFile=\"$(PlatformName)\\$(ConfigurationName)/portaudio_x64.pdb\"\r\n\t\t\t\tImportLibrary=\"$(PlatformName)\\$(ConfigurationName)/portaudio_x64.lib\"\r\n\t\t\t\tTargetMachine=\"17\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t\tSuppressStartupBanner=\"true\"\r\n\t\t\t\tOutputFile=\"$(PlatformName)\\$(ConfigurationName)\\portaudio_x64.bsc\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebDeploymentTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t</Configurations>\r\n\t<References>\r\n\t</References>\r\n\t<Files>\r\n\t\t<Filter\r\n\t\t\tName=\"Source Files\"\r\n\t\t\tFilter=\"cpp;c;cxx;rc;def;r;odl;idl;hpj;bat\"\r\n\t\t\t>\r\n\t\t\t<Filter\r\n\t\t\t\tName=\"common\"\r\n\t\t\t\t>\r\n\t\t\t\t<File\r\n\t\t\t\t\tRelativePath=\"..\\..\\src\\common\\pa_allocation.c\"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\tName=\"Release|Win32\"\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"\"\r\n\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\tName=\"Release|x64\"\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"\"\r\n\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\tName=\"Debug|Win32\"\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"\"\r\n\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\tName=\"Debug|x64\"\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"\"\r\n\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\tName=\"ReleaseMinDependency|Win32\"\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"\"\r\n\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\tName=\"ReleaseMinDependency|x64\"\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"\"\r\n\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t</File>\r\n\t\t\t\t<File\r\n\t\t\t\t\tRelativePath=\"..\\..\\src\\common\\pa_converters.c\"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\tName=\"Release|Win32\"\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"\"\r\n\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\tName=\"Release|x64\"\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"\"\r\n\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\tName=\"Debug|Win32\"\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"\"\r\n\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\tName=\"Debug|x64\"\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"\"\r\n\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\tName=\"ReleaseMinDependency|Win32\"\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"\"\r\n\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\tName=\"ReleaseMinDependency|x64\"\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"\"\r\n\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t</File>\r\n\t\t\t\t<File\r\n\t\t\t\t\tRelativePath=\"..\\..\\src\\common\\pa_cpuload.c\"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\tName=\"Release|Win32\"\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"\"\r\n\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\tName=\"Release|x64\"\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"\"\r\n\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\tName=\"Debug|Win32\"\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"\"\r\n\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\tName=\"Debug|x64\"\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"\"\r\n\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\tName=\"ReleaseMinDependency|Win32\"\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"\"\r\n\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\tName=\"ReleaseMinDependency|x64\"\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"\"\r\n\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t</File>\r\n\t\t\t\t<File\r\n\t\t\t\t\tRelativePath=\"..\\..\\src\\common\\pa_debugprint.c\"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\tName=\"Release|Win32\"\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"\"\r\n\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\tName=\"Release|x64\"\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"\"\r\n\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\tName=\"Debug|Win32\"\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"\"\r\n\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\tName=\"Debug|x64\"\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"\"\r\n\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\tName=\"ReleaseMinDependency|Win32\"\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"\"\r\n\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\tName=\"ReleaseMinDependency|x64\"\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"\"\r\n\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t</File>\r\n\t\t\t\t<File\r\n\t\t\t\t\tRelativePath=\"..\\..\\src\\common\\pa_dither.c\"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\tName=\"Release|Win32\"\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"\"\r\n\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\tName=\"Release|x64\"\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"\"\r\n\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\tName=\"Debug|Win32\"\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"\"\r\n\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\tName=\"Debug|x64\"\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"\"\r\n\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\tName=\"ReleaseMinDependency|Win32\"\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"\"\r\n\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\tName=\"ReleaseMinDependency|x64\"\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"\"\r\n\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t</File>\r\n\t\t\t\t<File\r\n\t\t\t\t\tRelativePath=\"..\\..\\src\\common\\pa_front.c\"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\tName=\"Release|Win32\"\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"\"\r\n\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\tName=\"Release|x64\"\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"\"\r\n\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\tName=\"Debug|Win32\"\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"\"\r\n\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\tName=\"Debug|x64\"\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"\"\r\n\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\tName=\"ReleaseMinDependency|Win32\"\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"\"\r\n\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\tName=\"ReleaseMinDependency|x64\"\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"\"\r\n\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t</File>\r\n\t\t\t\t<File\r\n\t\t\t\t\tRelativePath=\"..\\..\\src\\hostapi\\skeleton\\pa_hostapi_skeleton.c\"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\tName=\"Release|Win32\"\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"\"\r\n\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\tName=\"Release|x64\"\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"\"\r\n\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\tName=\"Debug|Win32\"\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"\"\r\n\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\tName=\"Debug|x64\"\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"\"\r\n\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\tName=\"ReleaseMinDependency|Win32\"\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"\"\r\n\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\tName=\"ReleaseMinDependency|x64\"\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"\"\r\n\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t</File>\r\n\t\t\t\t<File\r\n\t\t\t\t\tRelativePath=\"..\\..\\src\\common\\pa_process.c\"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\tName=\"Release|Win32\"\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"\"\r\n\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\tName=\"Release|x64\"\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"\"\r\n\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\tName=\"Debug|Win32\"\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"\"\r\n\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\tName=\"Debug|x64\"\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"\"\r\n\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\tName=\"ReleaseMinDependency|Win32\"\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"\"\r\n\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\tName=\"ReleaseMinDependency|x64\"\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"\"\r\n\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t</File>\r\n\t\t\t\t<File\r\n\t\t\t\t\tRelativePath=\"..\\..\\src\\common\\pa_ringbuffer.c\"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\tName=\"Release|Win32\"\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"\"\r\n\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\tName=\"Release|x64\"\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"\"\r\n\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\tName=\"Debug|Win32\"\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"\"\r\n\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\tName=\"Debug|x64\"\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"\"\r\n\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\tName=\"ReleaseMinDependency|Win32\"\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"\"\r\n\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\tName=\"ReleaseMinDependency|x64\"\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"\"\r\n\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t</File>\r\n\t\t\t\t<File\r\n\t\t\t\t\tRelativePath=\"..\\..\\src\\common\\pa_stream.c\"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\tName=\"Release|Win32\"\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"\"\r\n\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\tName=\"Release|x64\"\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"\"\r\n\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\tName=\"Debug|Win32\"\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"\"\r\n\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\tName=\"Debug|x64\"\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"\"\r\n\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\tName=\"ReleaseMinDependency|Win32\"\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"\"\r\n\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\tName=\"ReleaseMinDependency|x64\"\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"\"\r\n\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t</File>\r\n\t\t\t\t<File\r\n\t\t\t\t\tRelativePath=\"..\\..\\src\\common\\pa_trace.c\"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\tName=\"Release|Win32\"\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"\"\r\n\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\tName=\"Release|x64\"\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"\"\r\n\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\tName=\"Debug|Win32\"\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"\"\r\n\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\tName=\"Debug|x64\"\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"\"\r\n\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\tName=\"ReleaseMinDependency|Win32\"\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"\"\r\n\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\tName=\"ReleaseMinDependency|x64\"\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"\"\r\n\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t</File>\r\n\t\t\t</Filter>\r\n\t\t\t<Filter\r\n\t\t\t\tName=\"hostapi\"\r\n\t\t\t\t>\r\n\t\t\t\t<Filter\r\n\t\t\t\t\tName=\"ASIO\"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t<File\r\n\t\t\t\t\t\tRelativePath=\"..\\..\\src\\hostapi\\asio\\pa_asio.cpp\"\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\t\tName=\"Release|Win32\"\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\src\\hostapi\\asio\\ASIOSDK\\host;..\\..\\src\\hostapi\\asio\\ASIOSDK\\host\\pc;..\\..\\src\\hostapi\\asio\\ASIOSDK\\common\"\r\n\t\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\t\tName=\"Release|x64\"\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\src\\hostapi\\asio\\ASIOSDK\\host;..\\..\\src\\hostapi\\asio\\ASIOSDK\\host\\pc;..\\..\\src\\hostapi\\asio\\ASIOSDK\\common\"\r\n\t\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\t\tName=\"Debug|Win32\"\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\src\\hostapi\\asio\\ASIOSDK\\host;..\\..\\src\\hostapi\\asio\\ASIOSDK\\host\\pc;..\\..\\src\\hostapi\\asio\\ASIOSDK\\common\"\r\n\t\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\t\tName=\"Debug|x64\"\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\src\\hostapi\\asio\\ASIOSDK\\host;..\\..\\src\\hostapi\\asio\\ASIOSDK\\host\\pc;..\\..\\src\\hostapi\\asio\\ASIOSDK\\common\"\r\n\t\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\t\tName=\"ReleaseMinDependency|Win32\"\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\src\\hostapi\\asio\\ASIOSDK\\host;..\\..\\src\\hostapi\\asio\\ASIOSDK\\host\\pc;..\\..\\src\\hostapi\\asio\\ASIOSDK\\common\"\r\n\t\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\t\tName=\"ReleaseMinDependency|x64\"\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\src\\hostapi\\asio\\ASIOSDK\\host;..\\..\\src\\hostapi\\asio\\ASIOSDK\\host\\pc;..\\..\\src\\hostapi\\asio\\ASIOSDK\\common\"\r\n\t\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t</File>\r\n\t\t\t\t\t<Filter\r\n\t\t\t\t\t\tName=\"ASIOSDK\"\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t<File\r\n\t\t\t\t\t\t\tRelativePath=\"..\\..\\src\\hostapi\\asio\\ASIOSDK\\common\\asio.cpp\"\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\t\t\tName=\"Release|Win32\"\r\n\t\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\src\\hostapi\\asio\\ASIOSDK\\host;..\\..\\src\\hostapi\\asio\\ASIOSDK\\host\\pc;..\\..\\src\\hostapi\\asio\\ASIOSDK\\common\"\r\n\t\t\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\t\t\tName=\"Release|x64\"\r\n\t\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\src\\hostapi\\asio\\ASIOSDK\\host;..\\..\\src\\hostapi\\asio\\ASIOSDK\\host\\pc;..\\..\\src\\hostapi\\asio\\ASIOSDK\\common\"\r\n\t\t\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\t\t\tName=\"Debug|Win32\"\r\n\t\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\src\\hostapi\\asio\\ASIOSDK\\host;..\\..\\src\\hostapi\\asio\\ASIOSDK\\host\\pc;..\\..\\src\\hostapi\\asio\\ASIOSDK\\common\"\r\n\t\t\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\t\t\tName=\"Debug|x64\"\r\n\t\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\src\\hostapi\\asio\\ASIOSDK\\host;..\\..\\src\\hostapi\\asio\\ASIOSDK\\host\\pc;..\\..\\src\\hostapi\\asio\\ASIOSDK\\common\"\r\n\t\t\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\t\t\tName=\"ReleaseMinDependency|Win32\"\r\n\t\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\src\\hostapi\\asio\\ASIOSDK\\host;..\\..\\src\\hostapi\\asio\\ASIOSDK\\host\\pc;..\\..\\src\\hostapi\\asio\\ASIOSDK\\common\"\r\n\t\t\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\t\t\tName=\"ReleaseMinDependency|x64\"\r\n\t\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\src\\hostapi\\asio\\ASIOSDK\\host;..\\..\\src\\hostapi\\asio\\ASIOSDK\\host\\pc;..\\..\\src\\hostapi\\asio\\ASIOSDK\\common\"\r\n\t\t\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t\t</File>\r\n\t\t\t\t\t\t<File\r\n\t\t\t\t\t\t\tRelativePath=\"..\\..\\src\\hostapi\\asio\\ASIOSDK\\host\\asiodrivers.cpp\"\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\t\t\tName=\"Release|Win32\"\r\n\t\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\src\\hostapi\\asio\\ASIOSDK\\host;..\\..\\src\\hostapi\\asio\\ASIOSDK\\host\\pc;..\\..\\src\\hostapi\\asio\\ASIOSDK\\common\"\r\n\t\t\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\t\t\tName=\"Release|x64\"\r\n\t\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\src\\hostapi\\asio\\ASIOSDK\\host;..\\..\\src\\hostapi\\asio\\ASIOSDK\\host\\pc;..\\..\\src\\hostapi\\asio\\ASIOSDK\\common\"\r\n\t\t\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\t\t\tName=\"Debug|Win32\"\r\n\t\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\src\\hostapi\\asio\\ASIOSDK\\host;..\\..\\src\\hostapi\\asio\\ASIOSDK\\host\\pc;..\\..\\src\\hostapi\\asio\\ASIOSDK\\common\"\r\n\t\t\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\t\t\tName=\"Debug|x64\"\r\n\t\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\src\\hostapi\\asio\\ASIOSDK\\host;..\\..\\src\\hostapi\\asio\\ASIOSDK\\host\\pc;..\\..\\src\\hostapi\\asio\\ASIOSDK\\common\"\r\n\t\t\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\t\t\tName=\"ReleaseMinDependency|Win32\"\r\n\t\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\src\\hostapi\\asio\\ASIOSDK\\host;..\\..\\src\\hostapi\\asio\\ASIOSDK\\host\\pc;..\\..\\src\\hostapi\\asio\\ASIOSDK\\common\"\r\n\t\t\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\t\t\tName=\"ReleaseMinDependency|x64\"\r\n\t\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\src\\hostapi\\asio\\ASIOSDK\\host;..\\..\\src\\hostapi\\asio\\ASIOSDK\\host\\pc;..\\..\\src\\hostapi\\asio\\ASIOSDK\\common\"\r\n\t\t\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t\t</File>\r\n\t\t\t\t\t\t<File\r\n\t\t\t\t\t\t\tRelativePath=\"..\\..\\src\\hostapi\\asio\\ASIOSDK\\host\\pc\\asiolist.cpp\"\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\t\t\tName=\"Release|Win32\"\r\n\t\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\src\\hostapi\\asio\\ASIOSDK\\host;..\\..\\src\\hostapi\\asio\\ASIOSDK\\host\\pc;..\\..\\src\\hostapi\\asio\\ASIOSDK\\common\"\r\n\t\t\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\t\t\tName=\"Release|x64\"\r\n\t\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\src\\hostapi\\asio\\ASIOSDK\\host;..\\..\\src\\hostapi\\asio\\ASIOSDK\\host\\pc;..\\..\\src\\hostapi\\asio\\ASIOSDK\\common\"\r\n\t\t\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\t\t\tName=\"Debug|Win32\"\r\n\t\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\src\\hostapi\\asio\\ASIOSDK\\host;..\\..\\src\\hostapi\\asio\\ASIOSDK\\host\\pc;..\\..\\src\\hostapi\\asio\\ASIOSDK\\common\"\r\n\t\t\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\t\t\tName=\"Debug|x64\"\r\n\t\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\src\\hostapi\\asio\\ASIOSDK\\host;..\\..\\src\\hostapi\\asio\\ASIOSDK\\host\\pc;..\\..\\src\\hostapi\\asio\\ASIOSDK\\common\"\r\n\t\t\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\t\t\tName=\"ReleaseMinDependency|Win32\"\r\n\t\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\src\\hostapi\\asio\\ASIOSDK\\host;..\\..\\src\\hostapi\\asio\\ASIOSDK\\host\\pc;..\\..\\src\\hostapi\\asio\\ASIOSDK\\common\"\r\n\t\t\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\t\t\tName=\"ReleaseMinDependency|x64\"\r\n\t\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\src\\hostapi\\asio\\ASIOSDK\\host;..\\..\\src\\hostapi\\asio\\ASIOSDK\\host\\pc;..\\..\\src\\hostapi\\asio\\ASIOSDK\\common\"\r\n\t\t\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t\t</File>\r\n\t\t\t\t\t</Filter>\r\n\t\t\t\t</Filter>\r\n\t\t\t\t<Filter\r\n\t\t\t\t\tName=\"dsound\"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t<File\r\n\t\t\t\t\t\tRelativePath=\"..\\..\\src\\hostapi\\dsound\\pa_win_ds.c\"\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\t\tName=\"Release|Win32\"\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"\"\r\n\t\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\t\tName=\"Release|x64\"\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"\"\r\n\t\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\t\tName=\"Debug|Win32\"\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"\"\r\n\t\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\t\tName=\"Debug|x64\"\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"\"\r\n\t\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\t\tName=\"ReleaseMinDependency|Win32\"\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"\"\r\n\t\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\t\tName=\"ReleaseMinDependency|x64\"\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"\"\r\n\t\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t</File>\r\n\t\t\t\t\t<File\r\n\t\t\t\t\t\tRelativePath=\"..\\..\\src\\hostapi\\dsound\\pa_win_ds_dynlink.c\"\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\t\tName=\"Release|Win32\"\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"\"\r\n\t\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\t\tName=\"Release|x64\"\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"\"\r\n\t\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\t\tName=\"Debug|Win32\"\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"\"\r\n\t\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\t\tName=\"Debug|x64\"\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"\"\r\n\t\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\t\tName=\"ReleaseMinDependency|Win32\"\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"\"\r\n\t\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\t\tName=\"ReleaseMinDependency|x64\"\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"\"\r\n\t\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t</File>\r\n\t\t\t\t</Filter>\r\n\t\t\t\t<Filter\r\n\t\t\t\t\tName=\"wmme\"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t<File\r\n\t\t\t\t\t\tRelativePath=\"..\\..\\src\\hostapi\\wmme\\pa_win_wmme.c\"\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\t\tName=\"Release|Win32\"\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"\"\r\n\t\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\t\tName=\"Release|x64\"\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"\"\r\n\t\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\t\tName=\"Debug|Win32\"\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"\"\r\n\t\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\t\tName=\"Debug|x64\"\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"\"\r\n\t\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\t\tName=\"ReleaseMinDependency|Win32\"\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"\"\r\n\t\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\t\tName=\"ReleaseMinDependency|x64\"\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"\"\r\n\t\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t</File>\r\n\t\t\t\t</Filter>\r\n\t\t\t\t<Filter\r\n\t\t\t\t\tName=\"wasapi\"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t<File\r\n\t\t\t\t\t\tRelativePath=\"..\\..\\src\\hostapi\\wasapi\\pa_win_wasapi.c\"\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t</File>\r\n\t\t\t\t</Filter>\r\n\t\t\t\t<Filter\r\n\t\t\t\t\tName=\"wdmks\"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t<File\r\n\t\t\t\t\t\tRelativePath=\"..\\..\\src\\hostapi\\wdmks\\pa_win_wdmks.c\"\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t</File>\r\n\t\t\t\t</Filter>\r\n\t\t\t</Filter>\r\n\t\t\t<Filter\r\n\t\t\t\tName=\"os\"\r\n\t\t\t\t>\r\n\t\t\t\t<Filter\r\n\t\t\t\t\tName=\"win\"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t<File\r\n\t\t\t\t\t\tRelativePath=\"..\\..\\src\\os\\win\\pa_win_coinitialize.c\"\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t</File>\r\n\t\t\t\t\t<File\r\n\t\t\t\t\t\tRelativePath=\"..\\..\\src\\os\\win\\pa_win_hostapis.c\"\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\t\tName=\"Release|Win32\"\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"\"\r\n\t\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\t\tName=\"Release|x64\"\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"\"\r\n\t\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\t\tName=\"Debug|Win32\"\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"\"\r\n\t\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\t\tName=\"Debug|x64\"\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"\"\r\n\t\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\t\tName=\"ReleaseMinDependency|Win32\"\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"\"\r\n\t\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\t\tName=\"ReleaseMinDependency|x64\"\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"\"\r\n\t\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t</File>\r\n\t\t\t\t\t<File\r\n\t\t\t\t\t\tRelativePath=\"..\\..\\src\\os\\win\\pa_win_util.c\"\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\t\tName=\"Release|Win32\"\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"\"\r\n\t\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\t\tName=\"Release|x64\"\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"\"\r\n\t\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\t\tName=\"Debug|Win32\"\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"\"\r\n\t\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\t\tName=\"Debug|x64\"\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"\"\r\n\t\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\t\tName=\"ReleaseMinDependency|Win32\"\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"\"\r\n\t\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\t\tName=\"ReleaseMinDependency|x64\"\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"\"\r\n\t\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t</File>\r\n\t\t\t\t\t<File\r\n\t\t\t\t\t\tRelativePath=\"..\\..\\src\\os\\win\\pa_win_waveformat.c\"\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t</File>\r\n\t\t\t\t\t<File\r\n\t\t\t\t\t\tRelativePath=\"..\\..\\src\\os\\win\\pa_win_wdmks_utils.c\"\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t</File>\r\n\t\t\t\t\t<File\r\n\t\t\t\t\t\tRelativePath=\"..\\..\\src\\os\\win\\pa_x86_plain_converters.c\"\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\t\tName=\"Release|Win32\"\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"\"\r\n\t\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\t\tName=\"Release|x64\"\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"\"\r\n\t\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\t\tName=\"Debug|Win32\"\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"\"\r\n\t\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\t\tName=\"Debug|x64\"\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"\"\r\n\t\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\t\tName=\"ReleaseMinDependency|Win32\"\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"\"\r\n\t\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t\t<FileConfiguration\r\n\t\t\t\t\t\t\tName=\"ReleaseMinDependency|x64\"\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<Tool\r\n\t\t\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\t\t\tAdditionalIncludeDirectories=\"\"\r\n\t\t\t\t\t\t\t\tPreprocessorDefinitions=\"\"\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</FileConfiguration>\r\n\t\t\t\t\t</File>\r\n\t\t\t\t</Filter>\r\n\t\t\t</Filter>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Resource Files\"\r\n\t\t\tFilter=\"ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"portaudio.def\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Header Files\"\r\n\t\t\tFilter=\"h;hpp;hxx;hm;inl\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\include\\pa_asio.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\include\\pa_win_ds.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\include\\pa_win_wasapi.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\include\\pa_win_waveformat.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\include\\pa_win_wmme.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"..\\..\\include\\portaudio.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t</Files>\r\n\t<Globals>\r\n\t</Globals>\r\n</VisualStudioProject>\r\n"
  },
  {
    "path": "thirdparty/portaudio/build/msvc/readme.txt",
    "content": "Hello\n\n  This is a small list of steps in order to build portaudio\n(Currently v19-devel) into a VS2005 DLL and lib file.\nThis DLL contains all 5 current Win32 PA APIS (MME/DS/ASIO/WASAPI/WDMKS)\n\n1)Copy the source dirs that comes with the ASIO SDK inside src\\hostapi\\asio\\ASIOSDK\n  so you should now have example:\n  \n  portaudio19svn\\src\\hostapi\\asio\\ASIOSDK\\common\n  portaudio19svn\\src\\hostapi\\asio\\ASIOSDK\\host\n  portaudio19svn\\src\\hostapi\\asio\\ASIOSDK\\host\\sample\n  portaudio19svn\\src\\hostapi\\asio\\ASIOSDK\\host\\pc\n  portaudio19svn\\src\\hostapi\\asio\\ASIOSDK\\host\\mac (not needed)\n  \n  You dont need \"driver\"\n\n  To build without ASIO (or another Host API) see the \"Building without ASIO support\" section below.\n  \n2)\n  *If you have Visual Studio 6.0*, please make sure you have it updated with the latest (and final)\n  microsoft libraries for it, namely:\n  \n  Service pack 5:         \n     Latest known URL:  \n     http://msdn2.microsoft.com/en-us/vstudio/aa718363.aspx \n\t Yes there EXISTS a service pack 6 , but the processor pack (below) isn't compatible with it.\n\t \n  Processor Pack(only works with above SP5)\n     Latest known URL:\n     http://msdn2.microsoft.com/en-us/vstudio/Aa718349.aspx\n\t This isn't absolutely required for portaudio, but if you plan on using SSE intrinsics and similar things.\n\t Up to you to decide upon Service pack 5 or 6 depending on your need for intrinsics.\n\n  Platform SDK (Feb 2003) : \n     Latest known URL:  \n     http://www.microsoft.com/msdownload/platformsdk/sdkupdate/psdk-full.htm\n\t (This will allow your code base to be x64 friendly, with correct defines \n\t for LONG_PTR and such)\n\t NOTE A) Yes you have to use IE activex scripts to install that - wont work in Firefox, you \n\t may have to temporarily change tyour default browser(aint life unfair)\n\t NOTE B) Dont forget to hit \"Register PSDK Directories with Visual Studio\". \n\t you can make sure its right in VC6 if you open tools/options/directories/include files and you see SDK 2003 as the FIRST entry\n\t (it must be the same for libs)\n  \n  DirectX 9.0 SDK Update - (Summer 2003)\n    Latest known URL:\n    http://www.microsoft.com/downloads/details.aspx?familyid=9216652f-51e0-402e-b7b5-feb68d00f298&displaylang=en\n    Again register the links in VC6, and check inside vc6 if headers are in second place right after SDk 2003\n\t\n  *If you have 7.0(VC.NET/2001) or 7.1(VC.2003) *\n  then I suggest you open portaudio.dsp (and convert if needed)\n \n  *If you have Visual Studio 2005 * (or later), I suggest you open the portaudio.sln file\n  which contains 2 projects (portaudio & portaudio_static) each with 6 configurations: Win32/x64 in both Debug, Release and ReleaseMinDependency,\n  last of which removes dependency of all but basic OS system DLLs.\n\n  hit compile and hope for the best.\n \n3)Now in any  project, in which you require portaudio,\n  you can just link with portaudio_x86.lib, (or _x64) and of course include the \n  relevant headers\n  (portaudio.h, and/or pa_asio.h , pa_x86_plain_converters.h) See (*)\n  \n4) Your new exe should now use portaudio_xXX.dll.\n\n\nHave fun!\n\n(*): you may want to add/remove some DLL entry points.\nRight now those 6 entries are _not_ from portaudio.h\n\n(from portaudio.def)\n(...)\nPaAsio_GetAvailableLatencyValues    @50\nPaAsio_ShowControlPanel             @51\nPaUtil_InitializeX86PlainConverters @52\nPaAsio_GetInputChannelName          @53\nPaAsio_GetOutputChannelName         @54\nPaUtil_SetLogPrintFunction          @55\n\n\n*** Building without ASIO support ***\n\nTo build PortAudio without ASIO support you need to:\n  A. Make sure your project doesn't try to build any ASIO SDK files.\n     If you're using one of the shipped projects, remove the ASIO related files \n     from the project.\n\n  B. Make sure your project doesn't try to build the PortAudio ASIO\n     implementation files:\n\t      src/hostapi/pa_asio.cpp\n        src/hostapi/iasiothiscallresolver.cpp\n     If you're using one of the shipped projects remove them from the project.\n\n  C. Set the PA_USE_ASIO preprocessor symbol to zero (i.e. PA_USE_ASIO=0) in the project properties.\n     In VS2005 this can be added under\n     Project Properties > Configuration Properties > C/C++ > Preprocessor > Preprocessor Definitions\n\n     Setting PA_USE_ASIO=0 stops src/os/win/pa_win_hostapis.c \n     from trying to initialize the PA ASIO implementation.\n\n  D. Remove PaAsio_* entry points from portaudio.def, or comment them out with ;\n\n\nA similar procedure can be used to omit any of the other host APIs from the \nbuild. The relevant preprocessor symbols used by pa_win_hostapis.c are:\nPA_USE_WMME, PA_USE_DSOUND, PA_USE_ASIO, PA_USE_WASAPI and PA_USE_WDMKS\n\n-----\nDavid Viens, davidv@plogue.com\nRobert Bielik, robert@xponaut.se\n"
  },
  {
    "path": "thirdparty/portaudio/build/scons/SConscript_common",
    "content": "import os.path, sys\n\nclass ConfigurationError(Exception):\n    def __init__(self, reason):\n        Exception.__init__(self, \"Configuration failed: %s\" % reason)\n\nenv = Environment()\n\n# sunos, aix, hpux, irix, sunos appear to be platforms known by SCons, assuming they're POSIX compliant\nPosix = (\"linux\", \"darwin\", \"sunos\", \"aix\", \"hpux\", \"irix\", \"sunos\", \"netbsd\")\nWindows = (\"win32\", \"cygwin\")\n\nif env[\"PLATFORM\"] == \"posix\":\n    if sys.platform[:5] == \"linux\":\n        Platform = \"linux\"\n    elif sys.platform[:6] == \"netbsd\":\n\tPlatform = \"netbsd\"\n    else:\n        raise ConfigurationError(\"Unknown platform %s\" % sys.platform)\nelse:\n    if not env[\"PLATFORM\"] in (\"win32\", \"cygwin\") + Posix:\n        raise ConfigurationError(\"Unknown platform %s\" % env[\"PLATFORM\"])\n    Platform = env[\"PLATFORM\"]\n\n# Inspired by the versioning scheme followed by Qt, it seems sensible enough. There are three components: major, minor\n# and micro. Major changes with each subtraction from the API (backward-incompatible, i.e. V19 vs. V18), minor changes\n# with each addition to the API (backward-compatible), micro changes with each revision of the source code.\nApiVer = \"2.0.0\"\n\nExport(\"Platform\", \"Posix\", \"ConfigurationError\", \"ApiVer\")\n"
  },
  {
    "path": "thirdparty/portaudio/build/scons/SConscript_opts",
    "content": "import os.path, sys\n\ndef _PackageOption(pkgName, default=1):\n    \"\"\" Allow user to choose whether a package should be used if available. This results in a commandline option use<Pkgname>,\n    where Pkgname is the name of the package with a capitalized first letter.\n    @param pkgName: Name of package.\n    @param default: The default value for this option (\"yes\"/\"no\").\n    \"\"\"\n    return BoolOption(\"use%s\" % pkgName[0].upper() + pkgName[1:], \"use %s if available\" % (pkgName), default)\n\ndef _BoolOption(opt, explanation, default=1):\n    \"\"\" Allow user to enable/disable a certain option. This results in a commandline option enable<Option>, where Option\n    is the name of the option with a capitalized first letter.\n    @param opt: Name of option.\n    @param explanation: Explanation of option.\n    @param default: The default value for this option (1/0).\n    \"\"\"\n    return BoolOption(\"enable%s\" % opt[0].upper() + opt[1:], explanation, default)\n\ndef _EnumOption(opt, explanation, allowedValues, default):\n    \"\"\" Allow the user to choose among a set of values for an option. This results in a commandline option with<Option>,\n    where Option is the name of the option with a capitalized first letter.\n    @param opt: The name of the option.\n    @param explanation: Explanation of option.\n    @param allowedValues: The set of values to choose from.\n    @param default: The default value.\n    \"\"\"\n    assert default in allowedValues\n    return EnumOption(\"with%s\" % opt[0].upper() + opt[1:], explanation, default, allowed_values=allowedValues)\n\ndef _DirectoryOption(opt, explanation, default):\n    \"\"\" Allow the user to configure the location for a certain directory, for instance the prefix. This results in a\n    commandline option which is simply the name of this option.\n    @param opt: The configurable directory, for instance \"prefix\".\n    @param explanation: Explanation of option.\n    @param default: The default value for this option.\n    \"\"\"\n    return PathOption(opt, explanation, default)\n    # Incompatible with the latest stable SCons\n    # return PathOption(path, help, default, PathOption.PathIsDir)\n\nimport SCons.Errors\ntry:\n    Import(\"Platform\", \"Posix\")\nexcept SCons.Errors.UserError:\n    # The common objects must be exported first\n    SConscript(\"SConscript_common\")\n    Import(\"Platform\", \"Posix\")\n\n# Expose the options as a dictionary of sets of options\nopts = {}\n\nif Platform in Posix:\n    opts[\"Installation Dirs\"] = [_DirectoryOption(\"prefix\", \"installation prefix\", \"/usr/local\")]\nelif Platform in Windows:\n    if Platform == \"cygwin\":\n        opts[\"Installation Dirs\"] = [_DirectoryOption(\"prefix\", \"installation prefix\", \"/usr/local\")]\n\nopts[\"Build Targets\"] = [_BoolOption(\"shared\", \"create shared library\"), _BoolOption(\"static\", \"create static library\"),\n        _BoolOption(\"tests\", \"build test programs\")]\n\napis = []\nif Platform in Posix:\n    apis.append(_PackageOption(\"OSS\"))\n    apis.append(_PackageOption(\"JACK\"))\n    apis.append(_PackageOption(\"ALSA\", Platform == \"linux\"))\n    apis.append(_PackageOption(\"ASIHPI\", Platform == \"linux\"))\n    apis.append(_PackageOption(\"COREAUDIO\", Platform == \"darwin\"))\nelif Platform in Windows:\n    if Platform == \"cygwin\":\n        apis.append(_EnumOption(\"winAPI\", \"Windows API to use\", (\"wmme\", \"directx\", \"asio\"), \"wmme\"))\n\nopts[\"Host APIs\"] = apis\n\nopts[\"Build Parameters\"] = [\\\n        _BoolOption(\"debug\", \"compile with debug symbols\"),\n        _BoolOption(\"optimize\", \"compile with optimization\", default=0),\n        _BoolOption(\"asserts\", \"runtime assertions are helpful for debugging, but can be detrimental to performance\",\n                default=1),\n        _BoolOption(\"debugOutput\", \"enable debug output\", default=0),\n        # _BoolOption(\"python\", \"create Python binding\"),\n        (\"customCFlags\", \"customize compilation of C code\", \"\"),\n        (\"customCxxFlags\", \"customize compilation of C++ code\", \"\"),\n        (\"customLinkFlags\", \"customize linking\", \"\"),\n        ]\n\nopts[\"Bindings\"] = [\\\n        _BoolOption(\"cxx\", \"build Merlijn Blaauw's PA C++ wrapper\", default=0)\n        ]\n    \nReturn(\"opts\")\n"
  },
  {
    "path": "thirdparty/portaudio/clear_gitrevision.sh",
    "content": "#!/bin/bash\n#\n# Clear the Git commit SHA in the include file.\n# This should be run before checking in code to Git.\n#\nrevision_filename=src/common/pa_gitrevision.h\n\n# Update the include file with the current GIT revision.\necho \"#define PA_GIT_REVISION unknown\" > ${revision_filename}\n\necho ${revision_filename} now contains\ncat ${revision_filename}\n"
  },
  {
    "path": "thirdparty/portaudio/cmake_support/FindASIOSDK.cmake",
    "content": "# $Id: $\n#\n# - Try to find the ASIO SDK\n# Once done this will define\n#\n#  ASIOSDK_FOUND - system has ASIO SDK\n#  ASIOSDK_ROOT_DIR - path to the ASIO SDK base directory\n#  ASIOSDK_INCLUDE_DIR - the ASIO SDK include directory\n\nif(WIN32)\nelse(WIN32)\n  message(FATAL_ERROR \"FindASIOSDK.cmake: Unsupported platform ${CMAKE_SYSTEM_NAME}\" )\nendif(WIN32)\n\nfile(GLOB results \"${CMAKE_CURRENT_SOURCE_DIR}/../as*\")\nforeach(f ${results})\n  if(IS_DIRECTORY ${f})\n    set(ASIOSDK_PATH_HINT ${ASIOSDK_PATH_HINT} ${f})\n  endif()\nendforeach()\n\nfind_path(ASIOSDK_ROOT_DIR\n  common/asio.h\n  HINTS\n    ${ASIOSDK_PATH_HINT}\n)\n\nfind_path(ASIOSDK_INCLUDE_DIR\n  asio.h\n  PATHS\n    ${ASIOSDK_ROOT_DIR}/common \n)  \n\n# handle the QUIETLY and REQUIRED arguments and set ASIOSDK_FOUND to TRUE if \n# all listed variables are TRUE\nINCLUDE(FindPackageHandleStandardArgs)\nFIND_PACKAGE_HANDLE_STANDARD_ARGS(ASIOSDK DEFAULT_MSG ASIOSDK_ROOT_DIR ASIOSDK_INCLUDE_DIR)\n\nMARK_AS_ADVANCED(\n    ASIOSDK_ROOT_DIR ASIOSDK_INCLUDE_DIR\n)\n"
  },
  {
    "path": "thirdparty/portaudio/cmake_support/FindJack.cmake",
    "content": "# - Try to find jack\n# Once done this will define\n#  JACK_FOUND - System has jack\n#  JACK_INCLUDE_DIRS - The jack include directories\n#  JACK_LIBRARIES - The libraries needed to use jack\n#  JACK_DEFINITIONS - Compiler switches required for using jack\n\nif (JACK_LIBRARIES AND JACK_INCLUDE_DIRS)\n\n\t# in cache already\n\tset(JACK_FOUND TRUE)\n\nelse (JACK_LIBRARIES AND JACK_INCLUDE_DIRS)\n\n\tset(JACK_DEFINITIONS \"\")\n\n\t# Look for pkg-config and use it (if available) to find package\n\tfind_package(PkgConfig QUIET)\n\tif (PKG_CONFIG_FOUND)\n\t\tpkg_search_module(JACK QUIET jack)\n\tendif (PKG_CONFIG_FOUND)\n\n\tif (NOT JACK_FOUND)\n\n\t\tfind_path(JACK_INCLUDE_DIR jack/jack.h HINTS ${JACK_INCLUDEDIR} ${JACK_INCLUDE_DIRS} PATH_SUFFIXES jack)\n\t\tfind_library(JACK_LIBRARY NAMES jack HINTS ${JACK_LIBDIR} ${JACK_LIBRARY_DIRS})\n\n\t\tset(JACK_LIBRARIES    ${JACK_LIBRARY})\n\t\tset(JACK_INCLUDE_DIRS ${JACK_INCLUDE_DIR})\n\n\t\tinclude(FindPackageHandleStandardArgs)\n\n\t\t# Set JACK_FOUND if the library and include paths were found\n\t\tfind_package_handle_standard_args(jack DEFAULT_MSG JACK_LIBRARY JACK_INCLUDE_DIR)\n\n\t\t# Don't show include/library paths in cmake GUI\n\t\tmark_as_advanced(JACK_INCLUDE_DIR JACK_LIBRARY)\n\n\tendif (NOT JACK_FOUND)\n\nendif (JACK_LIBRARIES AND JACK_INCLUDE_DIRS)\n"
  },
  {
    "path": "thirdparty/portaudio/cmake_support/cmake_uninstall.cmake.in",
    "content": "if(NOT EXISTS \"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\")\n  message(FATAL_ERROR \"Cannot find install manifest: @CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\")\nendif(NOT EXISTS \"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\")\n\nfile(READ \"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\" files)\nstring(REGEX REPLACE \"\\n\" \";\" files \"${files}\")\nforeach(file ${files})\n  message(STATUS \"Uninstalling $ENV{DESTDIR}${file}\")\n  if(IS_SYMLINK \"$ENV{DESTDIR}${file}\" OR EXISTS \"$ENV{DESTDIR}${file}\")\n    exec_program(\n      \"@CMAKE_COMMAND@\" ARGS \"-E remove \\\"$ENV{DESTDIR}${file}\\\"\"\n      OUTPUT_VARIABLE rm_out\n      RETURN_VALUE rm_retval\n      )\n    if(NOT \"${rm_retval}\" STREQUAL 0)\n      message(FATAL_ERROR \"Problem when removing $ENV{DESTDIR}${file}\")\n    endif(NOT \"${rm_retval}\" STREQUAL 0)\n  else(IS_SYMLINK \"$ENV{DESTDIR}${file}\" OR EXISTS \"$ENV{DESTDIR}${file}\")\n    message(STATUS \"File $ENV{DESTDIR}${file} does not exist.\")\n  endif(IS_SYMLINK \"$ENV{DESTDIR}${file}\" OR EXISTS \"$ENV{DESTDIR}${file}\")\nendforeach(file)\n"
  },
  {
    "path": "thirdparty/portaudio/cmake_support/options_cmake.h.in",
    "content": "/* $Id: $\n\n   !!! @GENERATED_MESSAGE@ !!!\n\n   Header file configured by CMake to convert CMake options/vars to macros. It is done this way because if set via\n   preprocessor options, MSVC f.i. has no way of knowing when an option (or var) changes as there is no dependency chain.\n   \n   The generated \"options_cmake.h\" should be included like so:\n   \n   #ifdef PORTAUDIO_CMAKE_GENERATED\n   #include \"options_cmake.h\"\n   #endif\n   \n   so that non-CMake build environments are left intact.\n   \n   Source template: cmake_support/options_cmake.h.in\n*/\n\n#ifdef _WIN32\n#if defined(PA_USE_ASIO) || defined(PA_USE_DS) || defined(PA_USE_WMME) || defined(PA_USE_WASAPI) || defined(PA_USE_WDMKS)\n#error \"This header needs to be included before pa_hostapi.h!!\"\n#endif\n\n#cmakedefine01 PA_USE_ASIO\n#cmakedefine01 PA_USE_DS\n#cmakedefine01 PA_USE_WMME\n#cmakedefine01 PA_USE_WASAPI\n#cmakedefine01 PA_USE_WDMKS\n#else\n#error \"Platform currently not supported by CMake script\"\n#endif\n"
  },
  {
    "path": "thirdparty/portaudio/cmake_support/portaudio-2.0.pc.in",
    "content": "prefix=@CMAKE_INSTALL_PREFIX@\nexec_prefix=${prefix}\nlibdir=${prefix}/lib\nincludedir=${prefix}/include\n\nName: PortAudio\nDescription: Portable audio I/O\nRequires:\nVersion: @PA_PKGCONFIG_VERSION@\n\nLibs: -L${libdir} -lportaudio @PA_PKGCONFIG_LDFLAGS@\nCflags: -I${includedir} @PA_PKGCONFIG_CFLAGS@\n"
  },
  {
    "path": "thirdparty/portaudio/cmake_support/portaudioConfig.cmake.in",
    "content": "include(\"${CMAKE_CURRENT_LIST_DIR}/portaudioTargets.cmake\")\n"
  },
  {
    "path": "thirdparty/portaudio/cmake_support/template_portaudio.def",
    "content": "; $Id: $\r\n;\r\n; !!! @GENERATED_MESSAGE@ !!!\r\nEXPORTS\r\n\r\n;\r\nPa_GetVersion                       @1\r\nPa_GetVersionText                   @2\r\nPa_GetErrorText                     @3                 \r\nPa_Initialize                       @4\r\nPa_Terminate                        @5\r\nPa_GetHostApiCount                  @6\r\nPa_GetDefaultHostApi                @7\r\nPa_GetHostApiInfo                   @8\r\nPa_HostApiTypeIdToHostApiIndex      @9\r\nPa_HostApiDeviceIndexToDeviceIndex  @10\r\nPa_GetLastHostErrorInfo             @11\r\nPa_GetDeviceCount                   @12\r\nPa_GetDefaultInputDevice            @13\r\nPa_GetDefaultOutputDevice           @14\r\nPa_GetDeviceInfo                    @15\r\nPa_IsFormatSupported                @16\r\nPa_OpenStream                       @17\r\nPa_OpenDefaultStream                @18\r\nPa_CloseStream                      @19\r\nPa_SetStreamFinishedCallback        @20\r\nPa_StartStream                      @21\r\nPa_StopStream                       @22\r\nPa_AbortStream                      @23\r\nPa_IsStreamStopped                  @24\r\nPa_IsStreamActive                   @25\r\nPa_GetStreamInfo                    @26\r\nPa_GetStreamTime                    @27\r\nPa_GetStreamCpuLoad                 @28\r\nPa_ReadStream                       @29\r\nPa_WriteStream                      @30\r\nPa_GetStreamReadAvailable           @31\r\nPa_GetStreamWriteAvailable          @32\r\nPa_GetSampleSize                    @33\r\nPa_Sleep                            @34\r\n@DEF_EXCLUDE_ASIO_SYMBOLS@PaAsio_GetAvailableBufferSizes      @50\r\n@DEF_EXCLUDE_ASIO_SYMBOLS@PaAsio_ShowControlPanel             @51\r\n@DEF_EXCLUDE_X86_PLAIN_CONVERTERS@PaUtil_InitializeX86PlainConverters @52\r\n@DEF_EXCLUDE_ASIO_SYMBOLS@PaAsio_GetInputChannelName          @53\r\n@DEF_EXCLUDE_ASIO_SYMBOLS@PaAsio_GetOutputChannelName         @54\r\nPaUtil_SetDebugPrintFunction        @55\r\n@DEF_EXCLUDE_WASAPI_SYMBOLS@PaWasapi_GetAudioClient             @56\r\n@DEF_EXCLUDE_WASAPI_SYMBOLS@PaWasapi_UpdateDeviceList           @57\r\n@DEF_EXCLUDE_WASAPI_SYMBOLS@PaWasapi_GetDeviceCurrentFormat     @58\r\n@DEF_EXCLUDE_WASAPI_SYMBOLS@PaWasapi_GetDeviceDefaultFormat     @59\r\n@DEF_EXCLUDE_WASAPI_SYMBOLS@PaWasapi_GetDeviceMixFormat         @60\r\n@DEF_EXCLUDE_WASAPI_SYMBOLS@PaWasapi_GetDeviceRole              @61\r\n@DEF_EXCLUDE_WASAPI_SYMBOLS@PaWasapi_ThreadPriorityBoost        @62\r\n@DEF_EXCLUDE_WASAPI_SYMBOLS@PaWasapi_ThreadPriorityRevert       @63\r\n@DEF_EXCLUDE_WASAPI_SYMBOLS@PaWasapi_GetFramesPerHostBuffer     @64\r\n@DEF_EXCLUDE_WASAPI_SYMBOLS@PaWasapi_GetJackCount               @65\r\n@DEF_EXCLUDE_WASAPI_SYMBOLS@PaWasapi_GetJackDescription         @66\r\n@DEF_EXCLUDE_WASAPI_SYMBOLS@PaWasapi_SetStreamStateHandler      @68\r\n@DEF_EXCLUDE_WASAPI_SYMBOLS@PaWasapiWinrt_SetDefaultDeviceId    @67\r\n@DEF_EXCLUDE_WASAPI_SYMBOLS@PaWasapiWinrt_PopulateDeviceList    @69\r\n@DEF_EXCLUDE_WASAPI_SYMBOLS@PaWasapi_GetIMMDevice               @70\r\n"
  },
  {
    "path": "thirdparty/portaudio/config.guess",
    "content": "#! /bin/sh\n# Attempt to guess a canonical system name.\n#   Copyright 1992-2013 Free Software Foundation, Inc.\n\ntimestamp='2013-06-10'\n\n# This file is free software; you can redistribute it and/or modify it\n# under the terms of the GNU General Public License as published by\n# the Free Software Foundation; either version 3 of the License, or\n# (at your option) any later version.\n#\n# This program is distributed in the hope that it will be useful, but\n# WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n# General Public License for more details.\n#\n# You should have received a copy of the GNU General Public License\n# along with this program; if not, see <http://www.gnu.org/licenses/>.\n#\n# As a special exception to the GNU General Public License, if you\n# distribute this file as part of a program that contains a\n# configuration script generated by Autoconf, you may include it under\n# the same distribution terms that you use for the rest of that\n# program.  This Exception is an additional permission under section 7\n# of the GNU General Public License, version 3 (\"GPLv3\").\n#\n# Originally written by Per Bothner.\n#\n# You can get the latest version of this script from:\n# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD\n#\n# Please send patches with a ChangeLog entry to config-patches@gnu.org.\n\n\nme=`echo \"$0\" | sed -e 's,.*/,,'`\n\nusage=\"\\\nUsage: $0 [OPTION]\n\nOutput the configuration name of the system \\`$me' is run on.\n\nOperation modes:\n  -h, --help         print this help, then exit\n  -t, --time-stamp   print date of last modification, then exit\n  -v, --version      print version number, then exit\n\nReport bugs and patches to <config-patches@gnu.org>.\"\n\nversion=\"\\\nGNU config.guess ($timestamp)\n\nOriginally written by Per Bothner.\nCopyright 1992-2013 Free Software Foundation, Inc.\n\nThis is free software; see the source for copying conditions.  There is NO\nwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\"\n\nhelp=\"\nTry \\`$me --help' for more information.\"\n\n# Parse command line\nwhile test $# -gt 0 ; do\n  case $1 in\n    --time-stamp | --time* | -t )\n       echo \"$timestamp\" ; exit ;;\n    --version | -v )\n       echo \"$version\" ; exit ;;\n    --help | --h* | -h )\n       echo \"$usage\"; exit ;;\n    -- )     # Stop option processing\n       shift; break ;;\n    - )\t# Use stdin as input.\n       break ;;\n    -* )\n       echo \"$me: invalid option $1$help\" >&2\n       exit 1 ;;\n    * )\n       break ;;\n  esac\ndone\n\nif test $# != 0; then\n  echo \"$me: too many arguments$help\" >&2\n  exit 1\nfi\n\ntrap 'exit 1' 1 2 15\n\n# CC_FOR_BUILD -- compiler used by this script. Note that the use of a\n# compiler to aid in system detection is discouraged as it requires\n# temporary files to be created and, as you can see below, it is a\n# headache to deal with in a portable fashion.\n\n# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still\n# use `HOST_CC' if defined, but it is deprecated.\n\n# Portable tmp directory creation inspired by the Autoconf team.\n\nset_cc_for_build='\ntrap \"exitcode=\\$?; (rm -f \\$tmpfiles 2>/dev/null; rmdir \\$tmp 2>/dev/null) && exit \\$exitcode\" 0 ;\ntrap \"rm -f \\$tmpfiles 2>/dev/null; rmdir \\$tmp 2>/dev/null; exit 1\" 1 2 13 15 ;\n: ${TMPDIR=/tmp} ;\n { tmp=`(umask 077 && mktemp -d \"$TMPDIR/cgXXXXXX\") 2>/dev/null` && test -n \"$tmp\" && test -d \"$tmp\" ; } ||\n { test -n \"$RANDOM\" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||\n { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo \"Warning: creating insecure temp directory\" >&2 ; } ||\n { echo \"$me: cannot create a temporary directory in $TMPDIR\" >&2 ; exit 1 ; } ;\ndummy=$tmp/dummy ;\ntmpfiles=\"$dummy.c $dummy.o $dummy.rel $dummy\" ;\ncase $CC_FOR_BUILD,$HOST_CC,$CC in\n ,,)    echo \"int x;\" > $dummy.c ;\n\tfor c in cc gcc c89 c99 ; do\n\t  if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then\n\t     CC_FOR_BUILD=\"$c\"; break ;\n\t  fi ;\n\tdone ;\n\tif test x\"$CC_FOR_BUILD\" = x ; then\n\t  CC_FOR_BUILD=no_compiler_found ;\n\tfi\n\t;;\n ,,*)   CC_FOR_BUILD=$CC ;;\n ,*,*)  CC_FOR_BUILD=$HOST_CC ;;\nesac ; set_cc_for_build= ;'\n\n# This is needed to find uname on a Pyramid OSx when run in the BSD universe.\n# (ghazi@noc.rutgers.edu 1994-08-24)\nif (test -f /.attbin/uname) >/dev/null 2>&1 ; then\n\tPATH=$PATH:/.attbin ; export PATH\nfi\n\nUNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown\nUNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown\nUNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown\nUNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown\n\ncase \"${UNAME_SYSTEM}\" in\nLinux|GNU|GNU/*)\n\t# If the system lacks a compiler, then just pick glibc.\n\t# We could probably try harder.\n\tLIBC=gnu\n\n\teval $set_cc_for_build\n\tcat <<-EOF > $dummy.c\n\t#include <features.h>\n\t#if defined(__UCLIBC__)\n\tLIBC=uclibc\n\t#elif defined(__dietlibc__)\n\tLIBC=dietlibc\n\t#else\n\tLIBC=gnu\n\t#endif\n\tEOF\n\teval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`\n\t;;\nesac\n\n# Note: order is significant - the case branches are not exclusive.\n\ncase \"${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}\" in\n    *:NetBSD:*:*)\n\t# NetBSD (nbsd) targets should (where applicable) match one or\n\t# more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,\n\t# *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently\n\t# switched to ELF, *-*-netbsd* would select the old\n\t# object file format.  This provides both forward\n\t# compatibility and a consistent mechanism for selecting the\n\t# object file format.\n\t#\n\t# Note: NetBSD doesn't particularly care about the vendor\n\t# portion of the name.  We always set it to \"unknown\".\n\tsysctl=\"sysctl -n hw.machine_arch\"\n\tUNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \\\n\t    /usr/sbin/$sysctl 2>/dev/null || echo unknown)`\n\tcase \"${UNAME_MACHINE_ARCH}\" in\n\t    armeb) machine=armeb-unknown ;;\n\t    arm*) machine=arm-unknown ;;\n\t    sh3el) machine=shl-unknown ;;\n\t    sh3eb) machine=sh-unknown ;;\n\t    sh5el) machine=sh5le-unknown ;;\n\t    *) machine=${UNAME_MACHINE_ARCH}-unknown ;;\n\tesac\n\t# The Operating System including object format, if it has switched\n\t# to ELF recently, or will in the future.\n\tcase \"${UNAME_MACHINE_ARCH}\" in\n\t    arm*|i386|m68k|ns32k|sh3*|sparc|vax)\n\t\teval $set_cc_for_build\n\t\tif echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \\\n\t\t\t| grep -q __ELF__\n\t\tthen\n\t\t    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).\n\t\t    # Return netbsd for either.  FIX?\n\t\t    os=netbsd\n\t\telse\n\t\t    os=netbsdelf\n\t\tfi\n\t\t;;\n\t    *)\n\t\tos=netbsd\n\t\t;;\n\tesac\n\t# The OS release\n\t# Debian GNU/NetBSD machines have a different userland, and\n\t# thus, need a distinct triplet. However, they do not need\n\t# kernel version information, so it can be replaced with a\n\t# suitable tag, in the style of linux-gnu.\n\tcase \"${UNAME_VERSION}\" in\n\t    Debian*)\n\t\trelease='-gnu'\n\t\t;;\n\t    *)\n\t\trelease=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\\./'`\n\t\t;;\n\tesac\n\t# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:\n\t# contains redundant information, the shorter form:\n\t# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.\n\techo \"${machine}-${os}${release}\"\n\texit ;;\n    *:Bitrig:*:*)\n\tUNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`\n\techo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}\n\texit ;;\n    *:OpenBSD:*:*)\n\tUNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`\n\techo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}\n\texit ;;\n    *:ekkoBSD:*:*)\n\techo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}\n\texit ;;\n    *:SolidBSD:*:*)\n\techo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}\n\texit ;;\n    macppc:MirBSD:*:*)\n\techo powerpc-unknown-mirbsd${UNAME_RELEASE}\n\texit ;;\n    *:MirBSD:*:*)\n\techo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}\n\texit ;;\n    alpha:OSF1:*:*)\n\tcase $UNAME_RELEASE in\n\t*4.0)\n\t\tUNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`\n\t\t;;\n\t*5.*)\n\t\tUNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`\n\t\t;;\n\tesac\n\t# According to Compaq, /usr/sbin/psrinfo has been available on\n\t# OSF/1 and Tru64 systems produced since 1995.  I hope that\n\t# covers most systems running today.  This code pipes the CPU\n\t# types through head -n 1, so we only detect the type of CPU 0.\n\tALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \\(.*\\) processor.*$/\\1/p' | head -n 1`\n\tcase \"$ALPHA_CPU_TYPE\" in\n\t    \"EV4 (21064)\")\n\t\tUNAME_MACHINE=\"alpha\" ;;\n\t    \"EV4.5 (21064)\")\n\t\tUNAME_MACHINE=\"alpha\" ;;\n\t    \"LCA4 (21066/21068)\")\n\t\tUNAME_MACHINE=\"alpha\" ;;\n\t    \"EV5 (21164)\")\n\t\tUNAME_MACHINE=\"alphaev5\" ;;\n\t    \"EV5.6 (21164A)\")\n\t\tUNAME_MACHINE=\"alphaev56\" ;;\n\t    \"EV5.6 (21164PC)\")\n\t\tUNAME_MACHINE=\"alphapca56\" ;;\n\t    \"EV5.7 (21164PC)\")\n\t\tUNAME_MACHINE=\"alphapca57\" ;;\n\t    \"EV6 (21264)\")\n\t\tUNAME_MACHINE=\"alphaev6\" ;;\n\t    \"EV6.7 (21264A)\")\n\t\tUNAME_MACHINE=\"alphaev67\" ;;\n\t    \"EV6.8CB (21264C)\")\n\t\tUNAME_MACHINE=\"alphaev68\" ;;\n\t    \"EV6.8AL (21264B)\")\n\t\tUNAME_MACHINE=\"alphaev68\" ;;\n\t    \"EV6.8CX (21264D)\")\n\t\tUNAME_MACHINE=\"alphaev68\" ;;\n\t    \"EV6.9A (21264/EV69A)\")\n\t\tUNAME_MACHINE=\"alphaev69\" ;;\n\t    \"EV7 (21364)\")\n\t\tUNAME_MACHINE=\"alphaev7\" ;;\n\t    \"EV7.9 (21364A)\")\n\t\tUNAME_MACHINE=\"alphaev79\" ;;\n\tesac\n\t# A Pn.n version is a patched version.\n\t# A Vn.n version is a released version.\n\t# A Tn.n version is a released field test version.\n\t# A Xn.n version is an unreleased experimental baselevel.\n\t# 1.2 uses \"1.2\" for uname -r.\n\techo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`\n\t# Reset EXIT trap before exiting to avoid spurious non-zero exit code.\n\texitcode=$?\n\ttrap '' 0\n\texit $exitcode ;;\n    Alpha\\ *:Windows_NT*:*)\n\t# How do we know it's Interix rather than the generic POSIX subsystem?\n\t# Should we change UNAME_MACHINE based on the output of uname instead\n\t# of the specific Alpha model?\n\techo alpha-pc-interix\n\texit ;;\n    21064:Windows_NT:50:3)\n\techo alpha-dec-winnt3.5\n\texit ;;\n    Amiga*:UNIX_System_V:4.0:*)\n\techo m68k-unknown-sysv4\n\texit ;;\n    *:[Aa]miga[Oo][Ss]:*:*)\n\techo ${UNAME_MACHINE}-unknown-amigaos\n\texit ;;\n    *:[Mm]orph[Oo][Ss]:*:*)\n\techo ${UNAME_MACHINE}-unknown-morphos\n\texit ;;\n    *:OS/390:*:*)\n\techo i370-ibm-openedition\n\texit ;;\n    *:z/VM:*:*)\n\techo s390-ibm-zvmoe\n\texit ;;\n    *:OS400:*:*)\n\techo powerpc-ibm-os400\n\texit ;;\n    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)\n\techo arm-acorn-riscix${UNAME_RELEASE}\n\texit ;;\n    arm*:riscos:*:*|arm*:RISCOS:*:*)\n\techo arm-unknown-riscos\n\texit ;;\n    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)\n\techo hppa1.1-hitachi-hiuxmpp\n\texit ;;\n    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)\n\t# akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.\n\tif test \"`(/bin/universe) 2>/dev/null`\" = att ; then\n\t\techo pyramid-pyramid-sysv3\n\telse\n\t\techo pyramid-pyramid-bsd\n\tfi\n\texit ;;\n    NILE*:*:*:dcosx)\n\techo pyramid-pyramid-svr4\n\texit ;;\n    DRS?6000:unix:4.0:6*)\n\techo sparc-icl-nx6\n\texit ;;\n    DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)\n\tcase `/usr/bin/uname -p` in\n\t    sparc) echo sparc-icl-nx7; exit ;;\n\tesac ;;\n    s390x:SunOS:*:*)\n\techo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`\n\texit ;;\n    sun4H:SunOS:5.*:*)\n\techo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`\n\texit ;;\n    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)\n\techo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`\n\texit ;;\n    i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)\n\techo i386-pc-auroraux${UNAME_RELEASE}\n\texit ;;\n    i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)\n\teval $set_cc_for_build\n\tSUN_ARCH=\"i386\"\n\t# If there is a compiler, see if it is configured for 64-bit objects.\n\t# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.\n\t# This test works for both compilers.\n\tif [ \"$CC_FOR_BUILD\" != 'no_compiler_found' ]; then\n\t    if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \\\n\t\t(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \\\n\t\tgrep IS_64BIT_ARCH >/dev/null\n\t    then\n\t\tSUN_ARCH=\"x86_64\"\n\t    fi\n\tfi\n\techo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`\n\texit ;;\n    sun4*:SunOS:6*:*)\n\t# According to config.sub, this is the proper way to canonicalize\n\t# SunOS6.  Hard to guess exactly what SunOS6 will be like, but\n\t# it's likely to be more like Solaris than SunOS4.\n\techo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`\n\texit ;;\n    sun4*:SunOS:*:*)\n\tcase \"`/usr/bin/arch -k`\" in\n\t    Series*|S4*)\n\t\tUNAME_RELEASE=`uname -v`\n\t\t;;\n\tesac\n\t# Japanese Language versions have a version number like `4.1.3-JL'.\n\techo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`\n\texit ;;\n    sun3*:SunOS:*:*)\n\techo m68k-sun-sunos${UNAME_RELEASE}\n\texit ;;\n    sun*:*:4.2BSD:*)\n\tUNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`\n\ttest \"x${UNAME_RELEASE}\" = \"x\" && UNAME_RELEASE=3\n\tcase \"`/bin/arch`\" in\n\t    sun3)\n\t\techo m68k-sun-sunos${UNAME_RELEASE}\n\t\t;;\n\t    sun4)\n\t\techo sparc-sun-sunos${UNAME_RELEASE}\n\t\t;;\n\tesac\n\texit ;;\n    aushp:SunOS:*:*)\n\techo sparc-auspex-sunos${UNAME_RELEASE}\n\texit ;;\n    # The situation for MiNT is a little confusing.  The machine name\n    # can be virtually everything (everything which is not\n    # \"atarist\" or \"atariste\" at least should have a processor\n    # > m68000).  The system name ranges from \"MiNT\" over \"FreeMiNT\"\n    # to the lowercase version \"mint\" (or \"freemint\").  Finally\n    # the system name \"TOS\" denotes a system which is actually not\n    # MiNT.  But MiNT is downward compatible to TOS, so this should\n    # be no problem.\n    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)\n\techo m68k-atari-mint${UNAME_RELEASE}\n\texit ;;\n    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)\n\techo m68k-atari-mint${UNAME_RELEASE}\n\texit ;;\n    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)\n\techo m68k-atari-mint${UNAME_RELEASE}\n\texit ;;\n    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)\n\techo m68k-milan-mint${UNAME_RELEASE}\n\texit ;;\n    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)\n\techo m68k-hades-mint${UNAME_RELEASE}\n\texit ;;\n    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)\n\techo m68k-unknown-mint${UNAME_RELEASE}\n\texit ;;\n    m68k:machten:*:*)\n\techo m68k-apple-machten${UNAME_RELEASE}\n\texit ;;\n    powerpc:machten:*:*)\n\techo powerpc-apple-machten${UNAME_RELEASE}\n\texit ;;\n    RISC*:Mach:*:*)\n\techo mips-dec-mach_bsd4.3\n\texit ;;\n    RISC*:ULTRIX:*:*)\n\techo mips-dec-ultrix${UNAME_RELEASE}\n\texit ;;\n    VAX*:ULTRIX*:*:*)\n\techo vax-dec-ultrix${UNAME_RELEASE}\n\texit ;;\n    2020:CLIX:*:* | 2430:CLIX:*:*)\n\techo clipper-intergraph-clix${UNAME_RELEASE}\n\texit ;;\n    mips:*:*:UMIPS | mips:*:*:RISCos)\n\teval $set_cc_for_build\n\tsed 's/^\t//' << EOF >$dummy.c\n#ifdef __cplusplus\n#include <stdio.h>  /* for printf() prototype */\n\tint main (int argc, char *argv[]) {\n#else\n\tint main (argc, argv) int argc; char *argv[]; {\n#endif\n\t#if defined (host_mips) && defined (MIPSEB)\n\t#if defined (SYSTYPE_SYSV)\n\t  printf (\"mips-mips-riscos%ssysv\\n\", argv[1]); exit (0);\n\t#endif\n\t#if defined (SYSTYPE_SVR4)\n\t  printf (\"mips-mips-riscos%ssvr4\\n\", argv[1]); exit (0);\n\t#endif\n\t#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)\n\t  printf (\"mips-mips-riscos%sbsd\\n\", argv[1]); exit (0);\n\t#endif\n\t#endif\n\t  exit (-1);\n\t}\nEOF\n\t$CC_FOR_BUILD -o $dummy $dummy.c &&\n\t  dummyarg=`echo \"${UNAME_RELEASE}\" | sed -n 's/\\([0-9]*\\).*/\\1/p'` &&\n\t  SYSTEM_NAME=`$dummy $dummyarg` &&\n\t    { echo \"$SYSTEM_NAME\"; exit; }\n\techo mips-mips-riscos${UNAME_RELEASE}\n\texit ;;\n    Motorola:PowerMAX_OS:*:*)\n\techo powerpc-motorola-powermax\n\texit ;;\n    Motorola:*:4.3:PL8-*)\n\techo powerpc-harris-powermax\n\texit ;;\n    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)\n\techo powerpc-harris-powermax\n\texit ;;\n    Night_Hawk:Power_UNIX:*:*)\n\techo powerpc-harris-powerunix\n\texit ;;\n    m88k:CX/UX:7*:*)\n\techo m88k-harris-cxux7\n\texit ;;\n    m88k:*:4*:R4*)\n\techo m88k-motorola-sysv4\n\texit ;;\n    m88k:*:3*:R3*)\n\techo m88k-motorola-sysv3\n\texit ;;\n    AViiON:dgux:*:*)\n\t# DG/UX returns AViiON for all architectures\n\tUNAME_PROCESSOR=`/usr/bin/uname -p`\n\tif [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]\n\tthen\n\t    if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \\\n\t       [ ${TARGET_BINARY_INTERFACE}x = x ]\n\t    then\n\t\techo m88k-dg-dgux${UNAME_RELEASE}\n\t    else\n\t\techo m88k-dg-dguxbcs${UNAME_RELEASE}\n\t    fi\n\telse\n\t    echo i586-dg-dgux${UNAME_RELEASE}\n\tfi\n\texit ;;\n    M88*:DolphinOS:*:*)\t# DolphinOS (SVR3)\n\techo m88k-dolphin-sysv3\n\texit ;;\n    M88*:*:R3*:*)\n\t# Delta 88k system running SVR3\n\techo m88k-motorola-sysv3\n\texit ;;\n    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)\n\techo m88k-tektronix-sysv3\n\texit ;;\n    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)\n\techo m68k-tektronix-bsd\n\texit ;;\n    *:IRIX*:*:*)\n\techo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`\n\texit ;;\n    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.\n\techo romp-ibm-aix     # uname -m gives an 8 hex-code CPU id\n\texit ;;               # Note that: echo \"'`uname -s`'\" gives 'AIX '\n    i*86:AIX:*:*)\n\techo i386-ibm-aix\n\texit ;;\n    ia64:AIX:*:*)\n\tif [ -x /usr/bin/oslevel ] ; then\n\t\tIBM_REV=`/usr/bin/oslevel`\n\telse\n\t\tIBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}\n\tfi\n\techo ${UNAME_MACHINE}-ibm-aix${IBM_REV}\n\texit ;;\n    *:AIX:2:3)\n\tif grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then\n\t\teval $set_cc_for_build\n\t\tsed 's/^\t\t//' << EOF >$dummy.c\n\t\t#include <sys/systemcfg.h>\n\n\t\tmain()\n\t\t\t{\n\t\t\tif (!__power_pc())\n\t\t\t\texit(1);\n\t\t\tputs(\"powerpc-ibm-aix3.2.5\");\n\t\t\texit(0);\n\t\t\t}\nEOF\n\t\tif $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`\n\t\tthen\n\t\t\techo \"$SYSTEM_NAME\"\n\t\telse\n\t\t\techo rs6000-ibm-aix3.2.5\n\t\tfi\n\telif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then\n\t\techo rs6000-ibm-aix3.2.4\n\telse\n\t\techo rs6000-ibm-aix3.2\n\tfi\n\texit ;;\n    *:AIX:*:[4567])\n\tIBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`\n\tif /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then\n\t\tIBM_ARCH=rs6000\n\telse\n\t\tIBM_ARCH=powerpc\n\tfi\n\tif [ -x /usr/bin/oslevel ] ; then\n\t\tIBM_REV=`/usr/bin/oslevel`\n\telse\n\t\tIBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}\n\tfi\n\techo ${IBM_ARCH}-ibm-aix${IBM_REV}\n\texit ;;\n    *:AIX:*:*)\n\techo rs6000-ibm-aix\n\texit ;;\n    ibmrt:4.4BSD:*|romp-ibm:BSD:*)\n\techo romp-ibm-bsd4.4\n\texit ;;\n    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and\n\techo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to\n\texit ;;                             # report: romp-ibm BSD 4.3\n    *:BOSX:*:*)\n\techo rs6000-bull-bosx\n\texit ;;\n    DPX/2?00:B.O.S.:*:*)\n\techo m68k-bull-sysv3\n\texit ;;\n    9000/[34]??:4.3bsd:1.*:*)\n\techo m68k-hp-bsd\n\texit ;;\n    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)\n\techo m68k-hp-bsd4.4\n\texit ;;\n    9000/[34678]??:HP-UX:*:*)\n\tHPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`\n\tcase \"${UNAME_MACHINE}\" in\n\t    9000/31? )            HP_ARCH=m68000 ;;\n\t    9000/[34]?? )         HP_ARCH=m68k ;;\n\t    9000/[678][0-9][0-9])\n\t\tif [ -x /usr/bin/getconf ]; then\n\t\t    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`\n\t\t    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`\n\t\t    case \"${sc_cpu_version}\" in\n\t\t      523) HP_ARCH=\"hppa1.0\" ;; # CPU_PA_RISC1_0\n\t\t      528) HP_ARCH=\"hppa1.1\" ;; # CPU_PA_RISC1_1\n\t\t      532)                      # CPU_PA_RISC2_0\n\t\t\tcase \"${sc_kernel_bits}\" in\n\t\t\t  32) HP_ARCH=\"hppa2.0n\" ;;\n\t\t\t  64) HP_ARCH=\"hppa2.0w\" ;;\n\t\t\t  '') HP_ARCH=\"hppa2.0\" ;;   # HP-UX 10.20\n\t\t\tesac ;;\n\t\t    esac\n\t\tfi\n\t\tif [ \"${HP_ARCH}\" = \"\" ]; then\n\t\t    eval $set_cc_for_build\n\t\t    sed 's/^\t\t//' << EOF >$dummy.c\n\n\t\t#define _HPUX_SOURCE\n\t\t#include <stdlib.h>\n\t\t#include <unistd.h>\n\n\t\tint main ()\n\t\t{\n\t\t#if defined(_SC_KERNEL_BITS)\n\t\t    long bits = sysconf(_SC_KERNEL_BITS);\n\t\t#endif\n\t\t    long cpu  = sysconf (_SC_CPU_VERSION);\n\n\t\t    switch (cpu)\n\t\t\t{\n\t\t\tcase CPU_PA_RISC1_0: puts (\"hppa1.0\"); break;\n\t\t\tcase CPU_PA_RISC1_1: puts (\"hppa1.1\"); break;\n\t\t\tcase CPU_PA_RISC2_0:\n\t\t#if defined(_SC_KERNEL_BITS)\n\t\t\t    switch (bits)\n\t\t\t\t{\n\t\t\t\tcase 64: puts (\"hppa2.0w\"); break;\n\t\t\t\tcase 32: puts (\"hppa2.0n\"); break;\n\t\t\t\tdefault: puts (\"hppa2.0\"); break;\n\t\t\t\t} break;\n\t\t#else  /* !defined(_SC_KERNEL_BITS) */\n\t\t\t    puts (\"hppa2.0\"); break;\n\t\t#endif\n\t\t\tdefault: puts (\"hppa1.0\"); break;\n\t\t\t}\n\t\t    exit (0);\n\t\t}\nEOF\n\t\t    (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`\n\t\t    test -z \"$HP_ARCH\" && HP_ARCH=hppa\n\t\tfi ;;\n\tesac\n\tif [ ${HP_ARCH} = \"hppa2.0w\" ]\n\tthen\n\t    eval $set_cc_for_build\n\n\t    # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating\n\t    # 32-bit code.  hppa64-hp-hpux* has the same kernel and a compiler\n\t    # generating 64-bit code.  GNU and HP use different nomenclature:\n\t    #\n\t    # $ CC_FOR_BUILD=cc ./config.guess\n\t    # => hppa2.0w-hp-hpux11.23\n\t    # $ CC_FOR_BUILD=\"cc +DA2.0w\" ./config.guess\n\t    # => hppa64-hp-hpux11.23\n\n\t    if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |\n\t\tgrep -q __LP64__\n\t    then\n\t\tHP_ARCH=\"hppa2.0w\"\n\t    else\n\t\tHP_ARCH=\"hppa64\"\n\t    fi\n\tfi\n\techo ${HP_ARCH}-hp-hpux${HPUX_REV}\n\texit ;;\n    ia64:HP-UX:*:*)\n\tHPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`\n\techo ia64-hp-hpux${HPUX_REV}\n\texit ;;\n    3050*:HI-UX:*:*)\n\teval $set_cc_for_build\n\tsed 's/^\t//' << EOF >$dummy.c\n\t#include <unistd.h>\n\tint\n\tmain ()\n\t{\n\t  long cpu = sysconf (_SC_CPU_VERSION);\n\t  /* The order matters, because CPU_IS_HP_MC68K erroneously returns\n\t     true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct\n\t     results, however.  */\n\t  if (CPU_IS_PA_RISC (cpu))\n\t    {\n\t      switch (cpu)\n\t\t{\n\t\t  case CPU_PA_RISC1_0: puts (\"hppa1.0-hitachi-hiuxwe2\"); break;\n\t\t  case CPU_PA_RISC1_1: puts (\"hppa1.1-hitachi-hiuxwe2\"); break;\n\t\t  case CPU_PA_RISC2_0: puts (\"hppa2.0-hitachi-hiuxwe2\"); break;\n\t\t  default: puts (\"hppa-hitachi-hiuxwe2\"); break;\n\t\t}\n\t    }\n\t  else if (CPU_IS_HP_MC68K (cpu))\n\t    puts (\"m68k-hitachi-hiuxwe2\");\n\t  else puts (\"unknown-hitachi-hiuxwe2\");\n\t  exit (0);\n\t}\nEOF\n\t$CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&\n\t\t{ echo \"$SYSTEM_NAME\"; exit; }\n\techo unknown-hitachi-hiuxwe2\n\texit ;;\n    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )\n\techo hppa1.1-hp-bsd\n\texit ;;\n    9000/8??:4.3bsd:*:*)\n\techo hppa1.0-hp-bsd\n\texit ;;\n    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)\n\techo hppa1.0-hp-mpeix\n\texit ;;\n    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )\n\techo hppa1.1-hp-osf\n\texit ;;\n    hp8??:OSF1:*:*)\n\techo hppa1.0-hp-osf\n\texit ;;\n    i*86:OSF1:*:*)\n\tif [ -x /usr/sbin/sysversion ] ; then\n\t    echo ${UNAME_MACHINE}-unknown-osf1mk\n\telse\n\t    echo ${UNAME_MACHINE}-unknown-osf1\n\tfi\n\texit ;;\n    parisc*:Lites*:*:*)\n\techo hppa1.1-hp-lites\n\texit ;;\n    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)\n\techo c1-convex-bsd\n\texit ;;\n    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)\n\tif getsysinfo -f scalar_acc\n\tthen echo c32-convex-bsd\n\telse echo c2-convex-bsd\n\tfi\n\texit ;;\n    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)\n\techo c34-convex-bsd\n\texit ;;\n    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)\n\techo c38-convex-bsd\n\texit ;;\n    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)\n\techo c4-convex-bsd\n\texit ;;\n    CRAY*Y-MP:*:*:*)\n\techo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\\.[^.]*$/.X/'\n\texit ;;\n    CRAY*[A-Z]90:*:*:*)\n\techo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \\\n\t| sed -e 's/CRAY.*\\([A-Z]90\\)/\\1/' \\\n\t      -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \\\n\t      -e 's/\\.[^.]*$/.X/'\n\texit ;;\n    CRAY*TS:*:*:*)\n\techo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\\.[^.]*$/.X/'\n\texit ;;\n    CRAY*T3E:*:*:*)\n\techo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\\.[^.]*$/.X/'\n\texit ;;\n    CRAY*SV1:*:*:*)\n\techo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\\.[^.]*$/.X/'\n\texit ;;\n    *:UNICOS/mp:*:*)\n\techo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\\.[^.]*$/.X/'\n\texit ;;\n    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)\n\tFUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`\n\tFUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\\///'`\n\tFUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`\n\techo \"${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}\"\n\texit ;;\n    5000:UNIX_System_V:4.*:*)\n\tFUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\\///'`\n\tFUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`\n\techo \"sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}\"\n\texit ;;\n    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\\ Embedded/OS:*:*)\n\techo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}\n\texit ;;\n    sparc*:BSD/OS:*:*)\n\techo sparc-unknown-bsdi${UNAME_RELEASE}\n\texit ;;\n    *:BSD/OS:*:*)\n\techo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}\n\texit ;;\n    *:FreeBSD:*:*)\n\tUNAME_PROCESSOR=`/usr/bin/uname -p`\n\tcase ${UNAME_PROCESSOR} in\n\t    amd64)\n\t\techo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;\n\t    *)\n\t\techo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;\n\tesac\n\texit ;;\n    i*:CYGWIN*:*)\n\techo ${UNAME_MACHINE}-pc-cygwin\n\texit ;;\n    *:MINGW64*:*)\n\techo ${UNAME_MACHINE}-pc-mingw64\n\texit ;;\n    *:MINGW*:*)\n\techo ${UNAME_MACHINE}-pc-mingw32\n\texit ;;\n    i*:MSYS*:*)\n\techo ${UNAME_MACHINE}-pc-msys\n\texit ;;\n    i*:windows32*:*)\n\t# uname -m includes \"-pc\" on this system.\n\techo ${UNAME_MACHINE}-mingw32\n\texit ;;\n    i*:PW*:*)\n\techo ${UNAME_MACHINE}-pc-pw32\n\texit ;;\n    *:Interix*:*)\n\tcase ${UNAME_MACHINE} in\n\t    x86)\n\t\techo i586-pc-interix${UNAME_RELEASE}\n\t\texit ;;\n\t    authenticamd | genuineintel | EM64T)\n\t\techo x86_64-unknown-interix${UNAME_RELEASE}\n\t\texit ;;\n\t    IA64)\n\t\techo ia64-unknown-interix${UNAME_RELEASE}\n\t\texit ;;\n\tesac ;;\n    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)\n\techo i${UNAME_MACHINE}-pc-mks\n\texit ;;\n    8664:Windows_NT:*)\n\techo x86_64-pc-mks\n\texit ;;\n    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)\n\t# How do we know it's Interix rather than the generic POSIX subsystem?\n\t# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we\n\t# UNAME_MACHINE based on the output of uname instead of i386?\n\techo i586-pc-interix\n\texit ;;\n    i*:UWIN*:*)\n\techo ${UNAME_MACHINE}-pc-uwin\n\texit ;;\n    amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)\n\techo x86_64-unknown-cygwin\n\texit ;;\n    p*:CYGWIN*:*)\n\techo powerpcle-unknown-cygwin\n\texit ;;\n    prep*:SunOS:5.*:*)\n\techo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`\n\texit ;;\n    *:GNU:*:*)\n\t# the GNU system\n\techo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`\n\texit ;;\n    *:GNU/*:*:*)\n\t# other systems with GNU libc and userland\n\techo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}\n\texit ;;\n    i*86:Minix:*:*)\n\techo ${UNAME_MACHINE}-pc-minix\n\texit ;;\n    aarch64:Linux:*:*)\n\techo ${UNAME_MACHINE}-unknown-linux-${LIBC}\n\texit ;;\n    aarch64_be:Linux:*:*)\n\tUNAME_MACHINE=aarch64_be\n\techo ${UNAME_MACHINE}-unknown-linux-${LIBC}\n\texit ;;\n    alpha:Linux:*:*)\n\tcase `sed -n '/^cpu model/s/^.*: \\(.*\\)/\\1/p' < /proc/cpuinfo` in\n\t  EV5)   UNAME_MACHINE=alphaev5 ;;\n\t  EV56)  UNAME_MACHINE=alphaev56 ;;\n\t  PCA56) UNAME_MACHINE=alphapca56 ;;\n\t  PCA57) UNAME_MACHINE=alphapca56 ;;\n\t  EV6)   UNAME_MACHINE=alphaev6 ;;\n\t  EV67)  UNAME_MACHINE=alphaev67 ;;\n\t  EV68*) UNAME_MACHINE=alphaev68 ;;\n\tesac\n\tobjdump --private-headers /bin/sh | grep -q ld.so.1\n\tif test \"$?\" = 0 ; then LIBC=\"gnulibc1\" ; fi\n\techo ${UNAME_MACHINE}-unknown-linux-${LIBC}\n\texit ;;\n    arc:Linux:*:* | arceb:Linux:*:*)\n\techo ${UNAME_MACHINE}-unknown-linux-${LIBC}\n\texit ;;\n    arm*:Linux:*:*)\n\teval $set_cc_for_build\n\tif echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \\\n\t    | grep -q __ARM_EABI__\n\tthen\n\t    echo ${UNAME_MACHINE}-unknown-linux-${LIBC}\n\telse\n\t    if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \\\n\t\t| grep -q __ARM_PCS_VFP\n\t    then\n\t\techo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi\n\t    else\n\t\techo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf\n\t    fi\n\tfi\n\texit ;;\n    avr32*:Linux:*:*)\n\techo ${UNAME_MACHINE}-unknown-linux-${LIBC}\n\texit ;;\n    cris:Linux:*:*)\n\techo ${UNAME_MACHINE}-axis-linux-${LIBC}\n\texit ;;\n    crisv32:Linux:*:*)\n\techo ${UNAME_MACHINE}-axis-linux-${LIBC}\n\texit ;;\n    frv:Linux:*:*)\n\techo ${UNAME_MACHINE}-unknown-linux-${LIBC}\n\texit ;;\n    hexagon:Linux:*:*)\n\techo ${UNAME_MACHINE}-unknown-linux-${LIBC}\n\texit ;;\n    i*86:Linux:*:*)\n\techo ${UNAME_MACHINE}-pc-linux-${LIBC}\n\texit ;;\n    ia64:Linux:*:*)\n\techo ${UNAME_MACHINE}-unknown-linux-${LIBC}\n\texit ;;\n    m32r*:Linux:*:*)\n\techo ${UNAME_MACHINE}-unknown-linux-${LIBC}\n\texit ;;\n    m68*:Linux:*:*)\n\techo ${UNAME_MACHINE}-unknown-linux-${LIBC}\n\texit ;;\n    mips:Linux:*:* | mips64:Linux:*:*)\n\teval $set_cc_for_build\n\tsed 's/^\t//' << EOF >$dummy.c\n\t#undef CPU\n\t#undef ${UNAME_MACHINE}\n\t#undef ${UNAME_MACHINE}el\n\t#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)\n\tCPU=${UNAME_MACHINE}el\n\t#else\n\t#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)\n\tCPU=${UNAME_MACHINE}\n\t#else\n\tCPU=\n\t#endif\n\t#endif\nEOF\n\teval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`\n\ttest x\"${CPU}\" != x && { echo \"${CPU}-unknown-linux-${LIBC}\"; exit; }\n\t;;\n    or1k:Linux:*:*)\n\techo ${UNAME_MACHINE}-unknown-linux-${LIBC}\n\texit ;;\n    or32:Linux:*:*)\n\techo ${UNAME_MACHINE}-unknown-linux-${LIBC}\n\texit ;;\n    padre:Linux:*:*)\n\techo sparc-unknown-linux-${LIBC}\n\texit ;;\n    parisc64:Linux:*:* | hppa64:Linux:*:*)\n\techo hppa64-unknown-linux-${LIBC}\n\texit ;;\n    parisc:Linux:*:* | hppa:Linux:*:*)\n\t# Look for CPU level\n\tcase `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in\n\t  PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;\n\t  PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;\n\t  *)    echo hppa-unknown-linux-${LIBC} ;;\n\tesac\n\texit ;;\n    ppc64:Linux:*:*)\n\techo powerpc64-unknown-linux-${LIBC}\n\texit ;;\n    ppc:Linux:*:*)\n\techo powerpc-unknown-linux-${LIBC}\n\texit ;;\n    ppc64le:Linux:*:*)\n\techo powerpc64le-unknown-linux-${LIBC}\n\texit ;;\n    ppcle:Linux:*:*)\n\techo powerpcle-unknown-linux-${LIBC}\n\texit ;;\n    s390:Linux:*:* | s390x:Linux:*:*)\n\techo ${UNAME_MACHINE}-ibm-linux-${LIBC}\n\texit ;;\n    sh64*:Linux:*:*)\n\techo ${UNAME_MACHINE}-unknown-linux-${LIBC}\n\texit ;;\n    sh*:Linux:*:*)\n\techo ${UNAME_MACHINE}-unknown-linux-${LIBC}\n\texit ;;\n    sparc:Linux:*:* | sparc64:Linux:*:*)\n\techo ${UNAME_MACHINE}-unknown-linux-${LIBC}\n\texit ;;\n    tile*:Linux:*:*)\n\techo ${UNAME_MACHINE}-unknown-linux-${LIBC}\n\texit ;;\n    vax:Linux:*:*)\n\techo ${UNAME_MACHINE}-dec-linux-${LIBC}\n\texit ;;\n    x86_64:Linux:*:*)\n\techo ${UNAME_MACHINE}-unknown-linux-${LIBC}\n\texit ;;\n    xtensa*:Linux:*:*)\n\techo ${UNAME_MACHINE}-unknown-linux-${LIBC}\n\texit ;;\n    i*86:DYNIX/ptx:4*:*)\n\t# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.\n\t# earlier versions are messed up and put the nodename in both\n\t# sysname and nodename.\n\techo i386-sequent-sysv4\n\texit ;;\n    i*86:UNIX_SV:4.2MP:2.*)\n\t# Unixware is an offshoot of SVR4, but it has its own version\n\t# number series starting with 2...\n\t# I am not positive that other SVR4 systems won't match this,\n\t# I just have to hope.  -- rms.\n\t# Use sysv4.2uw... so that sysv4* matches it.\n\techo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}\n\texit ;;\n    i*86:OS/2:*:*)\n\t# If we were able to find `uname', then EMX Unix compatibility\n\t# is probably installed.\n\techo ${UNAME_MACHINE}-pc-os2-emx\n\texit ;;\n    i*86:XTS-300:*:STOP)\n\techo ${UNAME_MACHINE}-unknown-stop\n\texit ;;\n    i*86:atheos:*:*)\n\techo ${UNAME_MACHINE}-unknown-atheos\n\texit ;;\n    i*86:syllable:*:*)\n\techo ${UNAME_MACHINE}-pc-syllable\n\texit ;;\n    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)\n\techo i386-unknown-lynxos${UNAME_RELEASE}\n\texit ;;\n    i*86:*DOS:*:*)\n\techo ${UNAME_MACHINE}-pc-msdosdjgpp\n\texit ;;\n    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)\n\tUNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\\/MP$//'`\n\tif grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then\n\t\techo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}\n\telse\n\t\techo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}\n\tfi\n\texit ;;\n    i*86:*:5:[678]*)\n\t# UnixWare 7.x, OpenUNIX and OpenServer 6.\n\tcase `/bin/uname -X | grep \"^Machine\"` in\n\t    *486*)\t     UNAME_MACHINE=i486 ;;\n\t    *Pentium)\t     UNAME_MACHINE=i586 ;;\n\t    *Pent*|*Celeron) UNAME_MACHINE=i686 ;;\n\tesac\n\techo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}\n\texit ;;\n    i*86:*:3.2:*)\n\tif test -f /usr/options/cb.name; then\n\t\tUNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`\n\t\techo ${UNAME_MACHINE}-pc-isc$UNAME_REL\n\telif /bin/uname -X 2>/dev/null >/dev/null ; then\n\t\tUNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`\n\t\t(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486\n\t\t(/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \\\n\t\t\t&& UNAME_MACHINE=i586\n\t\t(/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \\\n\t\t\t&& UNAME_MACHINE=i686\n\t\t(/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \\\n\t\t\t&& UNAME_MACHINE=i686\n\t\techo ${UNAME_MACHINE}-pc-sco$UNAME_REL\n\telse\n\t\techo ${UNAME_MACHINE}-pc-sysv32\n\tfi\n\texit ;;\n    pc:*:*:*)\n\t# Left here for compatibility:\n\t# uname -m prints for DJGPP always 'pc', but it prints nothing about\n\t# the processor, so we play safe by assuming i586.\n\t# Note: whatever this is, it MUST be the same as what config.sub\n\t# prints for the \"djgpp\" host, or else GDB configury will decide that\n\t# this is a cross-build.\n\techo i586-pc-msdosdjgpp\n\texit ;;\n    Intel:Mach:3*:*)\n\techo i386-pc-mach3\n\texit ;;\n    paragon:*:*:*)\n\techo i860-intel-osf1\n\texit ;;\n    i860:*:4.*:*) # i860-SVR4\n\tif grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then\n\t  echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4\n\telse # Add other i860-SVR4 vendors below as they are discovered.\n\t  echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4\n\tfi\n\texit ;;\n    mini*:CTIX:SYS*5:*)\n\t# \"miniframe\"\n\techo m68010-convergent-sysv\n\texit ;;\n    mc68k:UNIX:SYSTEM5:3.51m)\n\techo m68k-convergent-sysv\n\texit ;;\n    M680?0:D-NIX:5.3:*)\n\techo m68k-diab-dnix\n\texit ;;\n    M68*:*:R3V[5678]*:*)\n\ttest -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;\n    3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)\n\tOS_REL=''\n\ttest -r /etc/.relid \\\n\t&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \\([0-9][0-9]\\).*/\\1/p' < /etc/.relid`\n\t/bin/uname -p 2>/dev/null | grep 86 >/dev/null \\\n\t  && { echo i486-ncr-sysv4.3${OS_REL}; exit; }\n\t/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \\\n\t  && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;\n    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)\n\t/bin/uname -p 2>/dev/null | grep 86 >/dev/null \\\n\t  && { echo i486-ncr-sysv4; exit; } ;;\n    NCR*:*:4.2:* | MPRAS*:*:4.2:*)\n\tOS_REL='.3'\n\ttest -r /etc/.relid \\\n\t    && OS_REL=.`sed -n 's/[^ ]* [^ ]* \\([0-9][0-9]\\).*/\\1/p' < /etc/.relid`\n\t/bin/uname -p 2>/dev/null | grep 86 >/dev/null \\\n\t    && { echo i486-ncr-sysv4.3${OS_REL}; exit; }\n\t/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \\\n\t    && { echo i586-ncr-sysv4.3${OS_REL}; exit; }\n\t/bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \\\n\t    && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;\n    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)\n\techo m68k-unknown-lynxos${UNAME_RELEASE}\n\texit ;;\n    mc68030:UNIX_System_V:4.*:*)\n\techo m68k-atari-sysv4\n\texit ;;\n    TSUNAMI:LynxOS:2.*:*)\n\techo sparc-unknown-lynxos${UNAME_RELEASE}\n\texit ;;\n    rs6000:LynxOS:2.*:*)\n\techo rs6000-unknown-lynxos${UNAME_RELEASE}\n\texit ;;\n    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)\n\techo powerpc-unknown-lynxos${UNAME_RELEASE}\n\texit ;;\n    SM[BE]S:UNIX_SV:*:*)\n\techo mips-dde-sysv${UNAME_RELEASE}\n\texit ;;\n    RM*:ReliantUNIX-*:*:*)\n\techo mips-sni-sysv4\n\texit ;;\n    RM*:SINIX-*:*:*)\n\techo mips-sni-sysv4\n\texit ;;\n    *:SINIX-*:*:*)\n\tif uname -p 2>/dev/null >/dev/null ; then\n\t\tUNAME_MACHINE=`(uname -p) 2>/dev/null`\n\t\techo ${UNAME_MACHINE}-sni-sysv4\n\telse\n\t\techo ns32k-sni-sysv\n\tfi\n\texit ;;\n    PENTIUM:*:4.0*:*)\t# Unisys `ClearPath HMP IX 4000' SVR4/MP effort\n\t\t\t# says <Richard.M.Bartel@ccMail.Census.GOV>\n\techo i586-unisys-sysv4\n\texit ;;\n    *:UNIX_System_V:4*:FTX*)\n\t# From Gerald Hewes <hewes@openmarket.com>.\n\t# How about differentiating between stratus architectures? -djm\n\techo hppa1.1-stratus-sysv4\n\texit ;;\n    *:*:*:FTX*)\n\t# From seanf@swdc.stratus.com.\n\techo i860-stratus-sysv4\n\texit ;;\n    i*86:VOS:*:*)\n\t# From Paul.Green@stratus.com.\n\techo ${UNAME_MACHINE}-stratus-vos\n\texit ;;\n    *:VOS:*:*)\n\t# From Paul.Green@stratus.com.\n\techo hppa1.1-stratus-vos\n\texit ;;\n    mc68*:A/UX:*:*)\n\techo m68k-apple-aux${UNAME_RELEASE}\n\texit ;;\n    news*:NEWS-OS:6*:*)\n\techo mips-sony-newsos6\n\texit ;;\n    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)\n\tif [ -d /usr/nec ]; then\n\t\techo mips-nec-sysv${UNAME_RELEASE}\n\telse\n\t\techo mips-unknown-sysv${UNAME_RELEASE}\n\tfi\n\texit ;;\n    BeBox:BeOS:*:*)\t# BeOS running on hardware made by Be, PPC only.\n\techo powerpc-be-beos\n\texit ;;\n    BeMac:BeOS:*:*)\t# BeOS running on Mac or Mac clone, PPC only.\n\techo powerpc-apple-beos\n\texit ;;\n    BePC:BeOS:*:*)\t# BeOS running on Intel PC compatible.\n\techo i586-pc-beos\n\texit ;;\n    BePC:Haiku:*:*)\t# Haiku running on Intel PC compatible.\n\techo i586-pc-haiku\n\texit ;;\n    x86_64:Haiku:*:*)\n\techo x86_64-unknown-haiku\n\texit ;;\n    SX-4:SUPER-UX:*:*)\n\techo sx4-nec-superux${UNAME_RELEASE}\n\texit ;;\n    SX-5:SUPER-UX:*:*)\n\techo sx5-nec-superux${UNAME_RELEASE}\n\texit ;;\n    SX-6:SUPER-UX:*:*)\n\techo sx6-nec-superux${UNAME_RELEASE}\n\texit ;;\n    SX-7:SUPER-UX:*:*)\n\techo sx7-nec-superux${UNAME_RELEASE}\n\texit ;;\n    SX-8:SUPER-UX:*:*)\n\techo sx8-nec-superux${UNAME_RELEASE}\n\texit ;;\n    SX-8R:SUPER-UX:*:*)\n\techo sx8r-nec-superux${UNAME_RELEASE}\n\texit ;;\n    Power*:Rhapsody:*:*)\n\techo powerpc-apple-rhapsody${UNAME_RELEASE}\n\texit ;;\n    *:Rhapsody:*:*)\n\techo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}\n\texit ;;\n    *:Darwin:*:*)\n\tUNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown\n\teval $set_cc_for_build\n\tif test \"$UNAME_PROCESSOR\" = unknown ; then\n\t    UNAME_PROCESSOR=powerpc\n\tfi\n\tif [ \"$CC_FOR_BUILD\" != 'no_compiler_found' ]; then\n\t    if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \\\n\t\t(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \\\n\t\tgrep IS_64BIT_ARCH >/dev/null\n\t    then\n\t\tcase $UNAME_PROCESSOR in\n\t\t    i386) UNAME_PROCESSOR=x86_64 ;;\n\t\t    powerpc) UNAME_PROCESSOR=powerpc64 ;;\n\t\tesac\n\t    fi\n\tfi\n\techo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}\n\texit ;;\n    *:procnto*:*:* | *:QNX:[0123456789]*:*)\n\tUNAME_PROCESSOR=`uname -p`\n\tif test \"$UNAME_PROCESSOR\" = \"x86\"; then\n\t\tUNAME_PROCESSOR=i386\n\t\tUNAME_MACHINE=pc\n\tfi\n\techo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}\n\texit ;;\n    *:QNX:*:4*)\n\techo i386-pc-qnx\n\texit ;;\n    NEO-?:NONSTOP_KERNEL:*:*)\n\techo neo-tandem-nsk${UNAME_RELEASE}\n\texit ;;\n    NSE-*:NONSTOP_KERNEL:*:*)\n\techo nse-tandem-nsk${UNAME_RELEASE}\n\texit ;;\n    NSR-?:NONSTOP_KERNEL:*:*)\n\techo nsr-tandem-nsk${UNAME_RELEASE}\n\texit ;;\n    *:NonStop-UX:*:*)\n\techo mips-compaq-nonstopux\n\texit ;;\n    BS2000:POSIX*:*:*)\n\techo bs2000-siemens-sysv\n\texit ;;\n    DS/*:UNIX_System_V:*:*)\n\techo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}\n\texit ;;\n    *:Plan9:*:*)\n\t# \"uname -m\" is not consistent, so use $cputype instead. 386\n\t# is converted to i386 for consistency with other x86\n\t# operating systems.\n\tif test \"$cputype\" = \"386\"; then\n\t    UNAME_MACHINE=i386\n\telse\n\t    UNAME_MACHINE=\"$cputype\"\n\tfi\n\techo ${UNAME_MACHINE}-unknown-plan9\n\texit ;;\n    *:TOPS-10:*:*)\n\techo pdp10-unknown-tops10\n\texit ;;\n    *:TENEX:*:*)\n\techo pdp10-unknown-tenex\n\texit ;;\n    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)\n\techo pdp10-dec-tops20\n\texit ;;\n    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)\n\techo pdp10-xkl-tops20\n\texit ;;\n    *:TOPS-20:*:*)\n\techo pdp10-unknown-tops20\n\texit ;;\n    *:ITS:*:*)\n\techo pdp10-unknown-its\n\texit ;;\n    SEI:*:*:SEIUX)\n\techo mips-sei-seiux${UNAME_RELEASE}\n\texit ;;\n    *:DragonFly:*:*)\n\techo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`\n\texit ;;\n    *:*VMS:*:*)\n\tUNAME_MACHINE=`(uname -p) 2>/dev/null`\n\tcase \"${UNAME_MACHINE}\" in\n\t    A*) echo alpha-dec-vms ; exit ;;\n\t    I*) echo ia64-dec-vms ; exit ;;\n\t    V*) echo vax-dec-vms ; exit ;;\n\tesac ;;\n    *:XENIX:*:SysV)\n\techo i386-pc-xenix\n\texit ;;\n    i*86:skyos:*:*)\n\techo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'\n\texit ;;\n    i*86:rdos:*:*)\n\techo ${UNAME_MACHINE}-pc-rdos\n\texit ;;\n    i*86:AROS:*:*)\n\techo ${UNAME_MACHINE}-pc-aros\n\texit ;;\n    x86_64:VMkernel:*:*)\n\techo ${UNAME_MACHINE}-unknown-esx\n\texit ;;\nesac\n\neval $set_cc_for_build\ncat >$dummy.c <<EOF\n#ifdef _SEQUENT_\n# include <sys/types.h>\n# include <sys/utsname.h>\n#endif\nmain ()\n{\n#if defined (sony)\n#if defined (MIPSEB)\n  /* BFD wants \"bsd\" instead of \"newsos\".  Perhaps BFD should be changed,\n     I don't know....  */\n  printf (\"mips-sony-bsd\\n\"); exit (0);\n#else\n#include <sys/param.h>\n  printf (\"m68k-sony-newsos%s\\n\",\n#ifdef NEWSOS4\n\t\"4\"\n#else\n\t\"\"\n#endif\n\t); exit (0);\n#endif\n#endif\n\n#if defined (__arm) && defined (__acorn) && defined (__unix)\n  printf (\"arm-acorn-riscix\\n\"); exit (0);\n#endif\n\n#if defined (hp300) && !defined (hpux)\n  printf (\"m68k-hp-bsd\\n\"); exit (0);\n#endif\n\n#if defined (NeXT)\n#if !defined (__ARCHITECTURE__)\n#define __ARCHITECTURE__ \"m68k\"\n#endif\n  int version;\n  version=`(hostinfo | sed -n 's/.*NeXT Mach \\([0-9]*\\).*/\\1/p') 2>/dev/null`;\n  if (version < 4)\n    printf (\"%s-next-nextstep%d\\n\", __ARCHITECTURE__, version);\n  else\n    printf (\"%s-next-openstep%d\\n\", __ARCHITECTURE__, version);\n  exit (0);\n#endif\n\n#if defined (MULTIMAX) || defined (n16)\n#if defined (UMAXV)\n  printf (\"ns32k-encore-sysv\\n\"); exit (0);\n#else\n#if defined (CMU)\n  printf (\"ns32k-encore-mach\\n\"); exit (0);\n#else\n  printf (\"ns32k-encore-bsd\\n\"); exit (0);\n#endif\n#endif\n#endif\n\n#if defined (__386BSD__)\n  printf (\"i386-pc-bsd\\n\"); exit (0);\n#endif\n\n#if defined (sequent)\n#if defined (i386)\n  printf (\"i386-sequent-dynix\\n\"); exit (0);\n#endif\n#if defined (ns32000)\n  printf (\"ns32k-sequent-dynix\\n\"); exit (0);\n#endif\n#endif\n\n#if defined (_SEQUENT_)\n    struct utsname un;\n\n    uname(&un);\n\n    if (strncmp(un.version, \"V2\", 2) == 0) {\n\tprintf (\"i386-sequent-ptx2\\n\"); exit (0);\n    }\n    if (strncmp(un.version, \"V1\", 2) == 0) { /* XXX is V1 correct? */\n\tprintf (\"i386-sequent-ptx1\\n\"); exit (0);\n    }\n    printf (\"i386-sequent-ptx\\n\"); exit (0);\n\n#endif\n\n#if defined (vax)\n# if !defined (ultrix)\n#  include <sys/param.h>\n#  if defined (BSD)\n#   if BSD == 43\n      printf (\"vax-dec-bsd4.3\\n\"); exit (0);\n#   else\n#    if BSD == 199006\n      printf (\"vax-dec-bsd4.3reno\\n\"); exit (0);\n#    else\n      printf (\"vax-dec-bsd\\n\"); exit (0);\n#    endif\n#   endif\n#  else\n    printf (\"vax-dec-bsd\\n\"); exit (0);\n#  endif\n# else\n    printf (\"vax-dec-ultrix\\n\"); exit (0);\n# endif\n#endif\n\n#if defined (alliant) && defined (i860)\n  printf (\"i860-alliant-bsd\\n\"); exit (0);\n#endif\n\n  exit (1);\n}\nEOF\n\n$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&\n\t{ echo \"$SYSTEM_NAME\"; exit; }\n\n# Apollos put the system type in the environment.\n\ntest -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }\n\n# Convex versions that predate uname can use getsysinfo(1)\n\nif [ -x /usr/convex/getsysinfo ]\nthen\n    case `getsysinfo -f cpu_type` in\n    c1*)\n\techo c1-convex-bsd\n\texit ;;\n    c2*)\n\tif getsysinfo -f scalar_acc\n\tthen echo c32-convex-bsd\n\telse echo c2-convex-bsd\n\tfi\n\texit ;;\n    c34*)\n\techo c34-convex-bsd\n\texit ;;\n    c38*)\n\techo c38-convex-bsd\n\texit ;;\n    c4*)\n\techo c4-convex-bsd\n\texit ;;\n    esac\nfi\n\ncat >&2 <<EOF\n$0: unable to guess system type\n\nThis script, last modified $timestamp, has failed to recognize\nthe operating system you are using. It is advised that you\ndownload the most up to date version of the config scripts from\n\n  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD\nand\n  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD\n\nIf the version you run ($0) is already up to date, please\nsend the following data and any information you think might be\npertinent to <config-patches@gnu.org> in order to provide the needed\ninformation to handle your system.\n\nconfig.guess timestamp = $timestamp\n\nuname -m = `(uname -m) 2>/dev/null || echo unknown`\nuname -r = `(uname -r) 2>/dev/null || echo unknown`\nuname -s = `(uname -s) 2>/dev/null || echo unknown`\nuname -v = `(uname -v) 2>/dev/null || echo unknown`\n\n/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`\n/bin/uname -X     = `(/bin/uname -X) 2>/dev/null`\n\nhostinfo               = `(hostinfo) 2>/dev/null`\n/bin/universe          = `(/bin/universe) 2>/dev/null`\n/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`\n/bin/arch              = `(/bin/arch) 2>/dev/null`\n/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`\n/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`\n\nUNAME_MACHINE = ${UNAME_MACHINE}\nUNAME_RELEASE = ${UNAME_RELEASE}\nUNAME_SYSTEM  = ${UNAME_SYSTEM}\nUNAME_VERSION = ${UNAME_VERSION}\nEOF\n\nexit 1\n\n# Local variables:\n# eval: (add-hook 'write-file-hooks 'time-stamp)\n# time-stamp-start: \"timestamp='\"\n# time-stamp-format: \"%:y-%02m-%02d\"\n# time-stamp-end: \"'\"\n# End:\n"
  },
  {
    "path": "thirdparty/portaudio/config.sub",
    "content": "#! /bin/sh\n# Configuration validation subroutine script.\n#   Copyright 1992-2013 Free Software Foundation, Inc.\n\ntimestamp='2013-08-10'\n\n# This file is free software; you can redistribute it and/or modify it\n# under the terms of the GNU General Public License as published by\n# the Free Software Foundation; either version 3 of the License, or\n# (at your option) any later version.\n#\n# This program is distributed in the hope that it will be useful, but\n# WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n# General Public License for more details.\n#\n# You should have received a copy of the GNU General Public License\n# along with this program; if not, see <http://www.gnu.org/licenses/>.\n#\n# As a special exception to the GNU General Public License, if you\n# distribute this file as part of a program that contains a\n# configuration script generated by Autoconf, you may include it under\n# the same distribution terms that you use for the rest of that\n# program.  This Exception is an additional permission under section 7\n# of the GNU General Public License, version 3 (\"GPLv3\").\n\n\n# Please send patches with a ChangeLog entry to config-patches@gnu.org.\n#\n# Configuration subroutine to validate and canonicalize a configuration type.\n# Supply the specified configuration type as an argument.\n# If it is invalid, we print an error message on stderr and exit with code 1.\n# Otherwise, we print the canonical config type on stdout and succeed.\n\n# You can get the latest version of this script from:\n# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD\n\n# This file is supposed to be the same for all GNU packages\n# and recognize all the CPU types, system types and aliases\n# that are meaningful with *any* GNU software.\n# Each package is responsible for reporting which valid configurations\n# it does not support.  The user should be able to distinguish\n# a failure to support a valid configuration from a meaningless\n# configuration.\n\n# The goal of this file is to map all the various variations of a given\n# machine specification into a single specification in the form:\n#\tCPU_TYPE-MANUFACTURER-OPERATING_SYSTEM\n# or in some cases, the newer four-part form:\n#\tCPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM\n# It is wrong to echo any other type of specification.\n\nme=`echo \"$0\" | sed -e 's,.*/,,'`\n\nusage=\"\\\nUsage: $0 [OPTION] CPU-MFR-OPSYS\n       $0 [OPTION] ALIAS\n\nCanonicalize a configuration name.\n\nOperation modes:\n  -h, --help         print this help, then exit\n  -t, --time-stamp   print date of last modification, then exit\n  -v, --version      print version number, then exit\n\nReport bugs and patches to <config-patches@gnu.org>.\"\n\nversion=\"\\\nGNU config.sub ($timestamp)\n\nCopyright 1992-2013 Free Software Foundation, Inc.\n\nThis is free software; see the source for copying conditions.  There is NO\nwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\"\n\nhelp=\"\nTry \\`$me --help' for more information.\"\n\n# Parse command line\nwhile test $# -gt 0 ; do\n  case $1 in\n    --time-stamp | --time* | -t )\n       echo \"$timestamp\" ; exit ;;\n    --version | -v )\n       echo \"$version\" ; exit ;;\n    --help | --h* | -h )\n       echo \"$usage\"; exit ;;\n    -- )     # Stop option processing\n       shift; break ;;\n    - )\t# Use stdin as input.\n       break ;;\n    -* )\n       echo \"$me: invalid option $1$help\"\n       exit 1 ;;\n\n    *local*)\n       # First pass through any local machine types.\n       echo $1\n       exit ;;\n\n    * )\n       break ;;\n  esac\ndone\n\ncase $# in\n 0) echo \"$me: missing argument$help\" >&2\n    exit 1;;\n 1) ;;\n *) echo \"$me: too many arguments$help\" >&2\n    exit 1;;\nesac\n\n# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).\n# Here we must recognize all the valid KERNEL-OS combinations.\nmaybe_os=`echo $1 | sed 's/^\\(.*\\)-\\([^-]*-[^-]*\\)$/\\2/'`\ncase $maybe_os in\n  nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \\\n  linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \\\n  knetbsd*-gnu* | netbsd*-gnu* | \\\n  kopensolaris*-gnu* | \\\n  storm-chaos* | os2-emx* | rtmk-nova*)\n    os=-$maybe_os\n    basic_machine=`echo $1 | sed 's/^\\(.*\\)-\\([^-]*-[^-]*\\)$/\\1/'`\n    ;;\n  android-linux)\n    os=-linux-android\n    basic_machine=`echo $1 | sed 's/^\\(.*\\)-\\([^-]*-[^-]*\\)$/\\1/'`-unknown\n    ;;\n  *)\n    basic_machine=`echo $1 | sed 's/-[^-]*$//'`\n    if [ $basic_machine != $1 ]\n    then os=`echo $1 | sed 's/.*-/-/'`\n    else os=; fi\n    ;;\nesac\n\n### Let's recognize common machines as not being operating systems so\n### that things like config.sub decstation-3100 work.  We also\n### recognize some manufacturers as not being operating systems, so we\n### can provide default operating systems below.\ncase $os in\n\t-sun*os*)\n\t\t# Prevent following clause from handling this invalid input.\n\t\t;;\n\t-dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \\\n\t-att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \\\n\t-unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \\\n\t-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\\\n\t-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \\\n\t-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \\\n\t-apple | -axis | -knuth | -cray | -microblaze*)\n\t\tos=\n\t\tbasic_machine=$1\n\t\t;;\n\t-bluegene*)\n\t\tos=-cnk\n\t\t;;\n\t-sim | -cisco | -oki | -wec | -winbond)\n\t\tos=\n\t\tbasic_machine=$1\n\t\t;;\n\t-scout)\n\t\t;;\n\t-wrs)\n\t\tos=-vxworks\n\t\tbasic_machine=$1\n\t\t;;\n\t-chorusos*)\n\t\tos=-chorusos\n\t\tbasic_machine=$1\n\t\t;;\n\t-chorusrdb)\n\t\tos=-chorusrdb\n\t\tbasic_machine=$1\n\t\t;;\n\t-hiux*)\n\t\tos=-hiuxwe2\n\t\t;;\n\t-sco6)\n\t\tos=-sco5v6\n\t\tbasic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`\n\t\t;;\n\t-sco5)\n\t\tos=-sco3.2v5\n\t\tbasic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`\n\t\t;;\n\t-sco4)\n\t\tos=-sco3.2v4\n\t\tbasic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`\n\t\t;;\n\t-sco3.2.[4-9]*)\n\t\tos=`echo $os | sed -e 's/sco3.2./sco3.2v/'`\n\t\tbasic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`\n\t\t;;\n\t-sco3.2v[4-9]*)\n\t\t# Don't forget version if it is 3.2v4 or newer.\n\t\tbasic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`\n\t\t;;\n\t-sco5v6*)\n\t\t# Don't forget version if it is 3.2v4 or newer.\n\t\tbasic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`\n\t\t;;\n\t-sco*)\n\t\tos=-sco3.2v2\n\t\tbasic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`\n\t\t;;\n\t-udk*)\n\t\tbasic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`\n\t\t;;\n\t-isc)\n\t\tos=-isc2.2\n\t\tbasic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`\n\t\t;;\n\t-clix*)\n\t\tbasic_machine=clipper-intergraph\n\t\t;;\n\t-isc*)\n\t\tbasic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`\n\t\t;;\n\t-lynx*178)\n\t\tos=-lynxos178\n\t\t;;\n\t-lynx*5)\n\t\tos=-lynxos5\n\t\t;;\n\t-lynx*)\n\t\tos=-lynxos\n\t\t;;\n\t-ptx*)\n\t\tbasic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`\n\t\t;;\n\t-windowsnt*)\n\t\tos=`echo $os | sed -e 's/windowsnt/winnt/'`\n\t\t;;\n\t-psos*)\n\t\tos=-psos\n\t\t;;\n\t-mint | -mint[0-9]*)\n\t\tbasic_machine=m68k-atari\n\t\tos=-mint\n\t\t;;\nesac\n\n# Decode aliases for certain CPU-COMPANY combinations.\ncase $basic_machine in\n\t# Recognize the basic CPU types without company name.\n\t# Some are omitted here because they have special meanings below.\n\t1750a | 580 \\\n\t| a29k \\\n\t| aarch64 | aarch64_be \\\n\t| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \\\n\t| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \\\n\t| am33_2.0 \\\n\t| arc | arceb \\\n\t| arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \\\n\t| avr | avr32 \\\n\t| be32 | be64 \\\n\t| bfin \\\n\t| c4x | c8051 | clipper \\\n\t| d10v | d30v | dlx | dsp16xx \\\n\t| epiphany \\\n\t| fido | fr30 | frv \\\n\t| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \\\n\t| hexagon \\\n\t| i370 | i860 | i960 | ia64 \\\n\t| ip2k | iq2000 \\\n\t| le32 | le64 \\\n\t| lm32 \\\n\t| m32c | m32r | m32rle | m68000 | m68k | m88k \\\n\t| maxq | mb | microblaze | microblazeel | mcore | mep | metag \\\n\t| mips | mipsbe | mipseb | mipsel | mipsle \\\n\t| mips16 \\\n\t| mips64 | mips64el \\\n\t| mips64octeon | mips64octeonel \\\n\t| mips64orion | mips64orionel \\\n\t| mips64r5900 | mips64r5900el \\\n\t| mips64vr | mips64vrel \\\n\t| mips64vr4100 | mips64vr4100el \\\n\t| mips64vr4300 | mips64vr4300el \\\n\t| mips64vr5000 | mips64vr5000el \\\n\t| mips64vr5900 | mips64vr5900el \\\n\t| mipsisa32 | mipsisa32el \\\n\t| mipsisa32r2 | mipsisa32r2el \\\n\t| mipsisa64 | mipsisa64el \\\n\t| mipsisa64r2 | mipsisa64r2el \\\n\t| mipsisa64sb1 | mipsisa64sb1el \\\n\t| mipsisa64sr71k | mipsisa64sr71kel \\\n\t| mipsr5900 | mipsr5900el \\\n\t| mipstx39 | mipstx39el \\\n\t| mn10200 | mn10300 \\\n\t| moxie \\\n\t| mt \\\n\t| msp430 \\\n\t| nds32 | nds32le | nds32be \\\n\t| nios | nios2 | nios2eb | nios2el \\\n\t| ns16k | ns32k \\\n\t| open8 \\\n\t| or1k | or32 \\\n\t| pdp10 | pdp11 | pj | pjl \\\n\t| powerpc | powerpc64 | powerpc64le | powerpcle \\\n\t| pyramid \\\n\t| rl78 | rx \\\n\t| score \\\n\t| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \\\n\t| sh64 | sh64le \\\n\t| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \\\n\t| sparcv8 | sparcv9 | sparcv9b | sparcv9v \\\n\t| spu \\\n\t| tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \\\n\t| ubicom32 \\\n\t| v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \\\n\t| we32k \\\n\t| x86 | xc16x | xstormy16 | xtensa \\\n\t| z8k | z80)\n\t\tbasic_machine=$basic_machine-unknown\n\t\t;;\n\tc54x)\n\t\tbasic_machine=tic54x-unknown\n\t\t;;\n\tc55x)\n\t\tbasic_machine=tic55x-unknown\n\t\t;;\n\tc6x)\n\t\tbasic_machine=tic6x-unknown\n\t\t;;\n\tm6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip)\n\t\tbasic_machine=$basic_machine-unknown\n\t\tos=-none\n\t\t;;\n\tm88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)\n\t\t;;\n\tms1)\n\t\tbasic_machine=mt-unknown\n\t\t;;\n\n\tstrongarm | thumb | xscale)\n\t\tbasic_machine=arm-unknown\n\t\t;;\n\txgate)\n\t\tbasic_machine=$basic_machine-unknown\n\t\tos=-none\n\t\t;;\n\txscaleeb)\n\t\tbasic_machine=armeb-unknown\n\t\t;;\n\n\txscaleel)\n\t\tbasic_machine=armel-unknown\n\t\t;;\n\n\t# We use `pc' rather than `unknown'\n\t# because (1) that's what they normally are, and\n\t# (2) the word \"unknown\" tends to confuse beginning users.\n\ti*86 | x86_64)\n\t  basic_machine=$basic_machine-pc\n\t  ;;\n\t# Object if more than one company name word.\n\t*-*-*)\n\t\techo Invalid configuration \\`$1\\': machine \\`$basic_machine\\' not recognized 1>&2\n\t\texit 1\n\t\t;;\n\t# Recognize the basic CPU types with company name.\n\t580-* \\\n\t| a29k-* \\\n\t| aarch64-* | aarch64_be-* \\\n\t| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \\\n\t| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \\\n\t| alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \\\n\t| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \\\n\t| avr-* | avr32-* \\\n\t| be32-* | be64-* \\\n\t| bfin-* | bs2000-* \\\n\t| c[123]* | c30-* | [cjt]90-* | c4x-* \\\n\t| c8051-* | clipper-* | craynv-* | cydra-* \\\n\t| d10v-* | d30v-* | dlx-* \\\n\t| elxsi-* \\\n\t| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \\\n\t| h8300-* | h8500-* \\\n\t| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \\\n\t| hexagon-* \\\n\t| i*86-* | i860-* | i960-* | ia64-* \\\n\t| ip2k-* | iq2000-* \\\n\t| le32-* | le64-* \\\n\t| lm32-* \\\n\t| m32c-* | m32r-* | m32rle-* \\\n\t| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \\\n\t| m88110-* | m88k-* | maxq-* | mcore-* | metag-* \\\n\t| microblaze-* | microblazeel-* \\\n\t| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \\\n\t| mips16-* \\\n\t| mips64-* | mips64el-* \\\n\t| mips64octeon-* | mips64octeonel-* \\\n\t| mips64orion-* | mips64orionel-* \\\n\t| mips64r5900-* | mips64r5900el-* \\\n\t| mips64vr-* | mips64vrel-* \\\n\t| mips64vr4100-* | mips64vr4100el-* \\\n\t| mips64vr4300-* | mips64vr4300el-* \\\n\t| mips64vr5000-* | mips64vr5000el-* \\\n\t| mips64vr5900-* | mips64vr5900el-* \\\n\t| mipsisa32-* | mipsisa32el-* \\\n\t| mipsisa32r2-* | mipsisa32r2el-* \\\n\t| mipsisa64-* | mipsisa64el-* \\\n\t| mipsisa64r2-* | mipsisa64r2el-* \\\n\t| mipsisa64sb1-* | mipsisa64sb1el-* \\\n\t| mipsisa64sr71k-* | mipsisa64sr71kel-* \\\n\t| mipsr5900-* | mipsr5900el-* \\\n\t| mipstx39-* | mipstx39el-* \\\n\t| mmix-* \\\n\t| mt-* \\\n\t| msp430-* \\\n\t| nds32-* | nds32le-* | nds32be-* \\\n\t| nios-* | nios2-* | nios2eb-* | nios2el-* \\\n\t| none-* | np1-* | ns16k-* | ns32k-* \\\n\t| open8-* \\\n\t| orion-* \\\n\t| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \\\n\t| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \\\n\t| pyramid-* \\\n\t| rl78-* | romp-* | rs6000-* | rx-* \\\n\t| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \\\n\t| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \\\n\t| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \\\n\t| sparclite-* \\\n\t| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \\\n\t| tahoe-* \\\n\t| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \\\n\t| tile*-* \\\n\t| tron-* \\\n\t| ubicom32-* \\\n\t| v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \\\n\t| vax-* \\\n\t| we32k-* \\\n\t| x86-* | x86_64-* | xc16x-* | xps100-* \\\n\t| xstormy16-* | xtensa*-* \\\n\t| ymp-* \\\n\t| z8k-* | z80-*)\n\t\t;;\n\t# Recognize the basic CPU types without company name, with glob match.\n\txtensa*)\n\t\tbasic_machine=$basic_machine-unknown\n\t\t;;\n\t# Recognize the various machine names and aliases which stand\n\t# for a CPU type and a company and sometimes even an OS.\n\t386bsd)\n\t\tbasic_machine=i386-unknown\n\t\tos=-bsd\n\t\t;;\n\t3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)\n\t\tbasic_machine=m68000-att\n\t\t;;\n\t3b*)\n\t\tbasic_machine=we32k-att\n\t\t;;\n\ta29khif)\n\t\tbasic_machine=a29k-amd\n\t\tos=-udi\n\t\t;;\n\tabacus)\n\t\tbasic_machine=abacus-unknown\n\t\t;;\n\tadobe68k)\n\t\tbasic_machine=m68010-adobe\n\t\tos=-scout\n\t\t;;\n\talliant | fx80)\n\t\tbasic_machine=fx80-alliant\n\t\t;;\n\taltos | altos3068)\n\t\tbasic_machine=m68k-altos\n\t\t;;\n\tam29k)\n\t\tbasic_machine=a29k-none\n\t\tos=-bsd\n\t\t;;\n\tamd64)\n\t\tbasic_machine=x86_64-pc\n\t\t;;\n\tamd64-*)\n\t\tbasic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`\n\t\t;;\n\tamdahl)\n\t\tbasic_machine=580-amdahl\n\t\tos=-sysv\n\t\t;;\n\tamiga | amiga-*)\n\t\tbasic_machine=m68k-unknown\n\t\t;;\n\tamigaos | amigados)\n\t\tbasic_machine=m68k-unknown\n\t\tos=-amigaos\n\t\t;;\n\tamigaunix | amix)\n\t\tbasic_machine=m68k-unknown\n\t\tos=-sysv4\n\t\t;;\n\tapollo68)\n\t\tbasic_machine=m68k-apollo\n\t\tos=-sysv\n\t\t;;\n\tapollo68bsd)\n\t\tbasic_machine=m68k-apollo\n\t\tos=-bsd\n\t\t;;\n\taros)\n\t\tbasic_machine=i386-pc\n\t\tos=-aros\n\t\t;;\n\taux)\n\t\tbasic_machine=m68k-apple\n\t\tos=-aux\n\t\t;;\n\tbalance)\n\t\tbasic_machine=ns32k-sequent\n\t\tos=-dynix\n\t\t;;\n\tblackfin)\n\t\tbasic_machine=bfin-unknown\n\t\tos=-linux\n\t\t;;\n\tblackfin-*)\n\t\tbasic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`\n\t\tos=-linux\n\t\t;;\n\tbluegene*)\n\t\tbasic_machine=powerpc-ibm\n\t\tos=-cnk\n\t\t;;\n\tc54x-*)\n\t\tbasic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`\n\t\t;;\n\tc55x-*)\n\t\tbasic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`\n\t\t;;\n\tc6x-*)\n\t\tbasic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`\n\t\t;;\n\tc90)\n\t\tbasic_machine=c90-cray\n\t\tos=-unicos\n\t\t;;\n\tcegcc)\n\t\tbasic_machine=arm-unknown\n\t\tos=-cegcc\n\t\t;;\n\tconvex-c1)\n\t\tbasic_machine=c1-convex\n\t\tos=-bsd\n\t\t;;\n\tconvex-c2)\n\t\tbasic_machine=c2-convex\n\t\tos=-bsd\n\t\t;;\n\tconvex-c32)\n\t\tbasic_machine=c32-convex\n\t\tos=-bsd\n\t\t;;\n\tconvex-c34)\n\t\tbasic_machine=c34-convex\n\t\tos=-bsd\n\t\t;;\n\tconvex-c38)\n\t\tbasic_machine=c38-convex\n\t\tos=-bsd\n\t\t;;\n\tcray | j90)\n\t\tbasic_machine=j90-cray\n\t\tos=-unicos\n\t\t;;\n\tcraynv)\n\t\tbasic_machine=craynv-cray\n\t\tos=-unicosmp\n\t\t;;\n\tcr16 | cr16-*)\n\t\tbasic_machine=cr16-unknown\n\t\tos=-elf\n\t\t;;\n\tcrds | unos)\n\t\tbasic_machine=m68k-crds\n\t\t;;\n\tcrisv32 | crisv32-* | etraxfs*)\n\t\tbasic_machine=crisv32-axis\n\t\t;;\n\tcris | cris-* | etrax*)\n\t\tbasic_machine=cris-axis\n\t\t;;\n\tcrx)\n\t\tbasic_machine=crx-unknown\n\t\tos=-elf\n\t\t;;\n\tda30 | da30-*)\n\t\tbasic_machine=m68k-da30\n\t\t;;\n\tdecstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)\n\t\tbasic_machine=mips-dec\n\t\t;;\n\tdecsystem10* | dec10*)\n\t\tbasic_machine=pdp10-dec\n\t\tos=-tops10\n\t\t;;\n\tdecsystem20* | dec20*)\n\t\tbasic_machine=pdp10-dec\n\t\tos=-tops20\n\t\t;;\n\tdelta | 3300 | motorola-3300 | motorola-delta \\\n\t      | 3300-motorola | delta-motorola)\n\t\tbasic_machine=m68k-motorola\n\t\t;;\n\tdelta88)\n\t\tbasic_machine=m88k-motorola\n\t\tos=-sysv3\n\t\t;;\n\tdicos)\n\t\tbasic_machine=i686-pc\n\t\tos=-dicos\n\t\t;;\n\tdjgpp)\n\t\tbasic_machine=i586-pc\n\t\tos=-msdosdjgpp\n\t\t;;\n\tdpx20 | dpx20-*)\n\t\tbasic_machine=rs6000-bull\n\t\tos=-bosx\n\t\t;;\n\tdpx2* | dpx2*-bull)\n\t\tbasic_machine=m68k-bull\n\t\tos=-sysv3\n\t\t;;\n\tebmon29k)\n\t\tbasic_machine=a29k-amd\n\t\tos=-ebmon\n\t\t;;\n\telxsi)\n\t\tbasic_machine=elxsi-elxsi\n\t\tos=-bsd\n\t\t;;\n\tencore | umax | mmax)\n\t\tbasic_machine=ns32k-encore\n\t\t;;\n\tes1800 | OSE68k | ose68k | ose | OSE)\n\t\tbasic_machine=m68k-ericsson\n\t\tos=-ose\n\t\t;;\n\tfx2800)\n\t\tbasic_machine=i860-alliant\n\t\t;;\n\tgenix)\n\t\tbasic_machine=ns32k-ns\n\t\t;;\n\tgmicro)\n\t\tbasic_machine=tron-gmicro\n\t\tos=-sysv\n\t\t;;\n\tgo32)\n\t\tbasic_machine=i386-pc\n\t\tos=-go32\n\t\t;;\n\th3050r* | hiux*)\n\t\tbasic_machine=hppa1.1-hitachi\n\t\tos=-hiuxwe2\n\t\t;;\n\th8300hms)\n\t\tbasic_machine=h8300-hitachi\n\t\tos=-hms\n\t\t;;\n\th8300xray)\n\t\tbasic_machine=h8300-hitachi\n\t\tos=-xray\n\t\t;;\n\th8500hms)\n\t\tbasic_machine=h8500-hitachi\n\t\tos=-hms\n\t\t;;\n\tharris)\n\t\tbasic_machine=m88k-harris\n\t\tos=-sysv3\n\t\t;;\n\thp300-*)\n\t\tbasic_machine=m68k-hp\n\t\t;;\n\thp300bsd)\n\t\tbasic_machine=m68k-hp\n\t\tos=-bsd\n\t\t;;\n\thp300hpux)\n\t\tbasic_machine=m68k-hp\n\t\tos=-hpux\n\t\t;;\n\thp3k9[0-9][0-9] | hp9[0-9][0-9])\n\t\tbasic_machine=hppa1.0-hp\n\t\t;;\n\thp9k2[0-9][0-9] | hp9k31[0-9])\n\t\tbasic_machine=m68000-hp\n\t\t;;\n\thp9k3[2-9][0-9])\n\t\tbasic_machine=m68k-hp\n\t\t;;\n\thp9k6[0-9][0-9] | hp6[0-9][0-9])\n\t\tbasic_machine=hppa1.0-hp\n\t\t;;\n\thp9k7[0-79][0-9] | hp7[0-79][0-9])\n\t\tbasic_machine=hppa1.1-hp\n\t\t;;\n\thp9k78[0-9] | hp78[0-9])\n\t\t# FIXME: really hppa2.0-hp\n\t\tbasic_machine=hppa1.1-hp\n\t\t;;\n\thp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)\n\t\t# FIXME: really hppa2.0-hp\n\t\tbasic_machine=hppa1.1-hp\n\t\t;;\n\thp9k8[0-9][13679] | hp8[0-9][13679])\n\t\tbasic_machine=hppa1.1-hp\n\t\t;;\n\thp9k8[0-9][0-9] | hp8[0-9][0-9])\n\t\tbasic_machine=hppa1.0-hp\n\t\t;;\n\thppa-next)\n\t\tos=-nextstep3\n\t\t;;\n\thppaosf)\n\t\tbasic_machine=hppa1.1-hp\n\t\tos=-osf\n\t\t;;\n\thppro)\n\t\tbasic_machine=hppa1.1-hp\n\t\tos=-proelf\n\t\t;;\n\ti370-ibm* | ibm*)\n\t\tbasic_machine=i370-ibm\n\t\t;;\n\ti*86v32)\n\t\tbasic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`\n\t\tos=-sysv32\n\t\t;;\n\ti*86v4*)\n\t\tbasic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`\n\t\tos=-sysv4\n\t\t;;\n\ti*86v)\n\t\tbasic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`\n\t\tos=-sysv\n\t\t;;\n\ti*86sol2)\n\t\tbasic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`\n\t\tos=-solaris2\n\t\t;;\n\ti386mach)\n\t\tbasic_machine=i386-mach\n\t\tos=-mach\n\t\t;;\n\ti386-vsta | vsta)\n\t\tbasic_machine=i386-unknown\n\t\tos=-vsta\n\t\t;;\n\tiris | iris4d)\n\t\tbasic_machine=mips-sgi\n\t\tcase $os in\n\t\t    -irix*)\n\t\t\t;;\n\t\t    *)\n\t\t\tos=-irix4\n\t\t\t;;\n\t\tesac\n\t\t;;\n\tisi68 | isi)\n\t\tbasic_machine=m68k-isi\n\t\tos=-sysv\n\t\t;;\n\tm68knommu)\n\t\tbasic_machine=m68k-unknown\n\t\tos=-linux\n\t\t;;\n\tm68knommu-*)\n\t\tbasic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`\n\t\tos=-linux\n\t\t;;\n\tm88k-omron*)\n\t\tbasic_machine=m88k-omron\n\t\t;;\n\tmagnum | m3230)\n\t\tbasic_machine=mips-mips\n\t\tos=-sysv\n\t\t;;\n\tmerlin)\n\t\tbasic_machine=ns32k-utek\n\t\tos=-sysv\n\t\t;;\n\tmicroblaze*)\n\t\tbasic_machine=microblaze-xilinx\n\t\t;;\n\tmingw64)\n\t\tbasic_machine=x86_64-pc\n\t\tos=-mingw64\n\t\t;;\n\tmingw32)\n\t\tbasic_machine=i686-pc\n\t\tos=-mingw32\n\t\t;;\n\tmingw32ce)\n\t\tbasic_machine=arm-unknown\n\t\tos=-mingw32ce\n\t\t;;\n\tminiframe)\n\t\tbasic_machine=m68000-convergent\n\t\t;;\n\t*mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)\n\t\tbasic_machine=m68k-atari\n\t\tos=-mint\n\t\t;;\n\tmips3*-*)\n\t\tbasic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`\n\t\t;;\n\tmips3*)\n\t\tbasic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown\n\t\t;;\n\tmonitor)\n\t\tbasic_machine=m68k-rom68k\n\t\tos=-coff\n\t\t;;\n\tmorphos)\n\t\tbasic_machine=powerpc-unknown\n\t\tos=-morphos\n\t\t;;\n\tmsdos)\n\t\tbasic_machine=i386-pc\n\t\tos=-msdos\n\t\t;;\n\tms1-*)\n\t\tbasic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`\n\t\t;;\n\tmsys)\n\t\tbasic_machine=i686-pc\n\t\tos=-msys\n\t\t;;\n\tmvs)\n\t\tbasic_machine=i370-ibm\n\t\tos=-mvs\n\t\t;;\n\tnacl)\n\t\tbasic_machine=le32-unknown\n\t\tos=-nacl\n\t\t;;\n\tncr3000)\n\t\tbasic_machine=i486-ncr\n\t\tos=-sysv4\n\t\t;;\n\tnetbsd386)\n\t\tbasic_machine=i386-unknown\n\t\tos=-netbsd\n\t\t;;\n\tnetwinder)\n\t\tbasic_machine=armv4l-rebel\n\t\tos=-linux\n\t\t;;\n\tnews | news700 | news800 | news900)\n\t\tbasic_machine=m68k-sony\n\t\tos=-newsos\n\t\t;;\n\tnews1000)\n\t\tbasic_machine=m68030-sony\n\t\tos=-newsos\n\t\t;;\n\tnews-3600 | risc-news)\n\t\tbasic_machine=mips-sony\n\t\tos=-newsos\n\t\t;;\n\tnecv70)\n\t\tbasic_machine=v70-nec\n\t\tos=-sysv\n\t\t;;\n\tnext | m*-next )\n\t\tbasic_machine=m68k-next\n\t\tcase $os in\n\t\t    -nextstep* )\n\t\t\t;;\n\t\t    -ns2*)\n\t\t      os=-nextstep2\n\t\t\t;;\n\t\t    *)\n\t\t      os=-nextstep3\n\t\t\t;;\n\t\tesac\n\t\t;;\n\tnh3000)\n\t\tbasic_machine=m68k-harris\n\t\tos=-cxux\n\t\t;;\n\tnh[45]000)\n\t\tbasic_machine=m88k-harris\n\t\tos=-cxux\n\t\t;;\n\tnindy960)\n\t\tbasic_machine=i960-intel\n\t\tos=-nindy\n\t\t;;\n\tmon960)\n\t\tbasic_machine=i960-intel\n\t\tos=-mon960\n\t\t;;\n\tnonstopux)\n\t\tbasic_machine=mips-compaq\n\t\tos=-nonstopux\n\t\t;;\n\tnp1)\n\t\tbasic_machine=np1-gould\n\t\t;;\n\tneo-tandem)\n\t\tbasic_machine=neo-tandem\n\t\t;;\n\tnse-tandem)\n\t\tbasic_machine=nse-tandem\n\t\t;;\n\tnsr-tandem)\n\t\tbasic_machine=nsr-tandem\n\t\t;;\n\top50n-* | op60c-*)\n\t\tbasic_machine=hppa1.1-oki\n\t\tos=-proelf\n\t\t;;\n\topenrisc | openrisc-*)\n\t\tbasic_machine=or32-unknown\n\t\t;;\n\tos400)\n\t\tbasic_machine=powerpc-ibm\n\t\tos=-os400\n\t\t;;\n\tOSE68000 | ose68000)\n\t\tbasic_machine=m68000-ericsson\n\t\tos=-ose\n\t\t;;\n\tos68k)\n\t\tbasic_machine=m68k-none\n\t\tos=-os68k\n\t\t;;\n\tpa-hitachi)\n\t\tbasic_machine=hppa1.1-hitachi\n\t\tos=-hiuxwe2\n\t\t;;\n\tparagon)\n\t\tbasic_machine=i860-intel\n\t\tos=-osf\n\t\t;;\n\tparisc)\n\t\tbasic_machine=hppa-unknown\n\t\tos=-linux\n\t\t;;\n\tparisc-*)\n\t\tbasic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`\n\t\tos=-linux\n\t\t;;\n\tpbd)\n\t\tbasic_machine=sparc-tti\n\t\t;;\n\tpbb)\n\t\tbasic_machine=m68k-tti\n\t\t;;\n\tpc532 | pc532-*)\n\t\tbasic_machine=ns32k-pc532\n\t\t;;\n\tpc98)\n\t\tbasic_machine=i386-pc\n\t\t;;\n\tpc98-*)\n\t\tbasic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`\n\t\t;;\n\tpentium | p5 | k5 | k6 | nexgen | viac3)\n\t\tbasic_machine=i586-pc\n\t\t;;\n\tpentiumpro | p6 | 6x86 | athlon | athlon_*)\n\t\tbasic_machine=i686-pc\n\t\t;;\n\tpentiumii | pentium2 | pentiumiii | pentium3)\n\t\tbasic_machine=i686-pc\n\t\t;;\n\tpentium4)\n\t\tbasic_machine=i786-pc\n\t\t;;\n\tpentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)\n\t\tbasic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`\n\t\t;;\n\tpentiumpro-* | p6-* | 6x86-* | athlon-*)\n\t\tbasic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`\n\t\t;;\n\tpentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)\n\t\tbasic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`\n\t\t;;\n\tpentium4-*)\n\t\tbasic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`\n\t\t;;\n\tpn)\n\t\tbasic_machine=pn-gould\n\t\t;;\n\tpower)\tbasic_machine=power-ibm\n\t\t;;\n\tppc | ppcbe)\tbasic_machine=powerpc-unknown\n\t\t;;\n\tppc-* | ppcbe-*)\n\t\tbasic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`\n\t\t;;\n\tppcle | powerpclittle | ppc-le | powerpc-little)\n\t\tbasic_machine=powerpcle-unknown\n\t\t;;\n\tppcle-* | powerpclittle-*)\n\t\tbasic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`\n\t\t;;\n\tppc64)\tbasic_machine=powerpc64-unknown\n\t\t;;\n\tppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`\n\t\t;;\n\tppc64le | powerpc64little | ppc64-le | powerpc64-little)\n\t\tbasic_machine=powerpc64le-unknown\n\t\t;;\n\tppc64le-* | powerpc64little-*)\n\t\tbasic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`\n\t\t;;\n\tps2)\n\t\tbasic_machine=i386-ibm\n\t\t;;\n\tpw32)\n\t\tbasic_machine=i586-unknown\n\t\tos=-pw32\n\t\t;;\n\trdos | rdos64)\n\t\tbasic_machine=x86_64-pc\n\t\tos=-rdos\n\t\t;;\n\trdos32)\n\t\tbasic_machine=i386-pc\n\t\tos=-rdos\n\t\t;;\n\trom68k)\n\t\tbasic_machine=m68k-rom68k\n\t\tos=-coff\n\t\t;;\n\trm[46]00)\n\t\tbasic_machine=mips-siemens\n\t\t;;\n\trtpc | rtpc-*)\n\t\tbasic_machine=romp-ibm\n\t\t;;\n\ts390 | s390-*)\n\t\tbasic_machine=s390-ibm\n\t\t;;\n\ts390x | s390x-*)\n\t\tbasic_machine=s390x-ibm\n\t\t;;\n\tsa29200)\n\t\tbasic_machine=a29k-amd\n\t\tos=-udi\n\t\t;;\n\tsb1)\n\t\tbasic_machine=mipsisa64sb1-unknown\n\t\t;;\n\tsb1el)\n\t\tbasic_machine=mipsisa64sb1el-unknown\n\t\t;;\n\tsde)\n\t\tbasic_machine=mipsisa32-sde\n\t\tos=-elf\n\t\t;;\n\tsei)\n\t\tbasic_machine=mips-sei\n\t\tos=-seiux\n\t\t;;\n\tsequent)\n\t\tbasic_machine=i386-sequent\n\t\t;;\n\tsh)\n\t\tbasic_machine=sh-hitachi\n\t\tos=-hms\n\t\t;;\n\tsh5el)\n\t\tbasic_machine=sh5le-unknown\n\t\t;;\n\tsh64)\n\t\tbasic_machine=sh64-unknown\n\t\t;;\n\tsparclite-wrs | simso-wrs)\n\t\tbasic_machine=sparclite-wrs\n\t\tos=-vxworks\n\t\t;;\n\tsps7)\n\t\tbasic_machine=m68k-bull\n\t\tos=-sysv2\n\t\t;;\n\tspur)\n\t\tbasic_machine=spur-unknown\n\t\t;;\n\tst2000)\n\t\tbasic_machine=m68k-tandem\n\t\t;;\n\tstratus)\n\t\tbasic_machine=i860-stratus\n\t\tos=-sysv4\n\t\t;;\n\tstrongarm-* | thumb-*)\n\t\tbasic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`\n\t\t;;\n\tsun2)\n\t\tbasic_machine=m68000-sun\n\t\t;;\n\tsun2os3)\n\t\tbasic_machine=m68000-sun\n\t\tos=-sunos3\n\t\t;;\n\tsun2os4)\n\t\tbasic_machine=m68000-sun\n\t\tos=-sunos4\n\t\t;;\n\tsun3os3)\n\t\tbasic_machine=m68k-sun\n\t\tos=-sunos3\n\t\t;;\n\tsun3os4)\n\t\tbasic_machine=m68k-sun\n\t\tos=-sunos4\n\t\t;;\n\tsun4os3)\n\t\tbasic_machine=sparc-sun\n\t\tos=-sunos3\n\t\t;;\n\tsun4os4)\n\t\tbasic_machine=sparc-sun\n\t\tos=-sunos4\n\t\t;;\n\tsun4sol2)\n\t\tbasic_machine=sparc-sun\n\t\tos=-solaris2\n\t\t;;\n\tsun3 | sun3-*)\n\t\tbasic_machine=m68k-sun\n\t\t;;\n\tsun4)\n\t\tbasic_machine=sparc-sun\n\t\t;;\n\tsun386 | sun386i | roadrunner)\n\t\tbasic_machine=i386-sun\n\t\t;;\n\tsv1)\n\t\tbasic_machine=sv1-cray\n\t\tos=-unicos\n\t\t;;\n\tsymmetry)\n\t\tbasic_machine=i386-sequent\n\t\tos=-dynix\n\t\t;;\n\tt3e)\n\t\tbasic_machine=alphaev5-cray\n\t\tos=-unicos\n\t\t;;\n\tt90)\n\t\tbasic_machine=t90-cray\n\t\tos=-unicos\n\t\t;;\n\ttile*)\n\t\tbasic_machine=$basic_machine-unknown\n\t\tos=-linux-gnu\n\t\t;;\n\ttx39)\n\t\tbasic_machine=mipstx39-unknown\n\t\t;;\n\ttx39el)\n\t\tbasic_machine=mipstx39el-unknown\n\t\t;;\n\ttoad1)\n\t\tbasic_machine=pdp10-xkl\n\t\tos=-tops20\n\t\t;;\n\ttower | tower-32)\n\t\tbasic_machine=m68k-ncr\n\t\t;;\n\ttpf)\n\t\tbasic_machine=s390x-ibm\n\t\tos=-tpf\n\t\t;;\n\tudi29k)\n\t\tbasic_machine=a29k-amd\n\t\tos=-udi\n\t\t;;\n\tultra3)\n\t\tbasic_machine=a29k-nyu\n\t\tos=-sym1\n\t\t;;\n\tv810 | necv810)\n\t\tbasic_machine=v810-nec\n\t\tos=-none\n\t\t;;\n\tvaxv)\n\t\tbasic_machine=vax-dec\n\t\tos=-sysv\n\t\t;;\n\tvms)\n\t\tbasic_machine=vax-dec\n\t\tos=-vms\n\t\t;;\n\tvpp*|vx|vx-*)\n\t\tbasic_machine=f301-fujitsu\n\t\t;;\n\tvxworks960)\n\t\tbasic_machine=i960-wrs\n\t\tos=-vxworks\n\t\t;;\n\tvxworks68)\n\t\tbasic_machine=m68k-wrs\n\t\tos=-vxworks\n\t\t;;\n\tvxworks29k)\n\t\tbasic_machine=a29k-wrs\n\t\tos=-vxworks\n\t\t;;\n\tw65*)\n\t\tbasic_machine=w65-wdc\n\t\tos=-none\n\t\t;;\n\tw89k-*)\n\t\tbasic_machine=hppa1.1-winbond\n\t\tos=-proelf\n\t\t;;\n\txbox)\n\t\tbasic_machine=i686-pc\n\t\tos=-mingw32\n\t\t;;\n\txps | xps100)\n\t\tbasic_machine=xps100-honeywell\n\t\t;;\n\txscale-* | xscalee[bl]-*)\n\t\tbasic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`\n\t\t;;\n\tymp)\n\t\tbasic_machine=ymp-cray\n\t\tos=-unicos\n\t\t;;\n\tz8k-*-coff)\n\t\tbasic_machine=z8k-unknown\n\t\tos=-sim\n\t\t;;\n\tz80-*-coff)\n\t\tbasic_machine=z80-unknown\n\t\tos=-sim\n\t\t;;\n\tnone)\n\t\tbasic_machine=none-none\n\t\tos=-none\n\t\t;;\n\n# Here we handle the default manufacturer of certain CPU types.  It is in\n# some cases the only manufacturer, in others, it is the most popular.\n\tw89k)\n\t\tbasic_machine=hppa1.1-winbond\n\t\t;;\n\top50n)\n\t\tbasic_machine=hppa1.1-oki\n\t\t;;\n\top60c)\n\t\tbasic_machine=hppa1.1-oki\n\t\t;;\n\tromp)\n\t\tbasic_machine=romp-ibm\n\t\t;;\n\tmmix)\n\t\tbasic_machine=mmix-knuth\n\t\t;;\n\trs6000)\n\t\tbasic_machine=rs6000-ibm\n\t\t;;\n\tvax)\n\t\tbasic_machine=vax-dec\n\t\t;;\n\tpdp10)\n\t\t# there are many clones, so DEC is not a safe bet\n\t\tbasic_machine=pdp10-unknown\n\t\t;;\n\tpdp11)\n\t\tbasic_machine=pdp11-dec\n\t\t;;\n\twe32k)\n\t\tbasic_machine=we32k-att\n\t\t;;\n\tsh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)\n\t\tbasic_machine=sh-unknown\n\t\t;;\n\tsparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)\n\t\tbasic_machine=sparc-sun\n\t\t;;\n\tcydra)\n\t\tbasic_machine=cydra-cydrome\n\t\t;;\n\torion)\n\t\tbasic_machine=orion-highlevel\n\t\t;;\n\torion105)\n\t\tbasic_machine=clipper-highlevel\n\t\t;;\n\tmac | mpw | mac-mpw)\n\t\tbasic_machine=m68k-apple\n\t\t;;\n\tpmac | pmac-mpw)\n\t\tbasic_machine=powerpc-apple\n\t\t;;\n\t*-unknown)\n\t\t# Make sure to match an already-canonicalized machine name.\n\t\t;;\n\t*)\n\t\techo Invalid configuration \\`$1\\': machine \\`$basic_machine\\' not recognized 1>&2\n\t\texit 1\n\t\t;;\nesac\n\n# Here we canonicalize certain aliases for manufacturers.\ncase $basic_machine in\n\t*-digital*)\n\t\tbasic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`\n\t\t;;\n\t*-commodore*)\n\t\tbasic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`\n\t\t;;\n\t*)\n\t\t;;\nesac\n\n# Decode manufacturer-specific aliases for certain operating systems.\n\nif [ x\"$os\" != x\"\" ]\nthen\ncase $os in\n\t# First match some system type aliases\n\t# that might get confused with valid system types.\n\t# -solaris* is a basic system type, with this one exception.\n\t-auroraux)\n\t\tos=-auroraux\n\t\t;;\n\t-solaris1 | -solaris1.*)\n\t\tos=`echo $os | sed -e 's|solaris1|sunos4|'`\n\t\t;;\n\t-solaris)\n\t\tos=-solaris2\n\t\t;;\n\t-svr4*)\n\t\tos=-sysv4\n\t\t;;\n\t-unixware*)\n\t\tos=-sysv4.2uw\n\t\t;;\n\t-gnu/linux*)\n\t\tos=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`\n\t\t;;\n\t# First accept the basic system types.\n\t# The portable systems comes first.\n\t# Each alternative MUST END IN A *, to match a version number.\n\t# -sysv* is not here because it comes later, after sysvr4.\n\t-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \\\n\t      | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\\\n\t      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \\\n\t      | -sym* | -kopensolaris* | -plan9* \\\n\t      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \\\n\t      | -aos* | -aros* \\\n\t      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \\\n\t      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \\\n\t      | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \\\n\t      | -bitrig* | -openbsd* | -solidbsd* \\\n\t      | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \\\n\t      | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \\\n\t      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \\\n\t      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \\\n\t      | -chorusos* | -chorusrdb* | -cegcc* \\\n\t      | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \\\n\t      | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \\\n\t      | -linux-newlib* | -linux-musl* | -linux-uclibc* \\\n\t      | -uxpv* | -beos* | -mpeix* | -udk* \\\n\t      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \\\n\t      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \\\n\t      | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \\\n\t      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \\\n\t      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \\\n\t      | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \\\n\t      | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)\n\t# Remember, each alternative MUST END IN *, to match a version number.\n\t\t;;\n\t-qnx*)\n\t\tcase $basic_machine in\n\t\t    x86-* | i*86-*)\n\t\t\t;;\n\t\t    *)\n\t\t\tos=-nto$os\n\t\t\t;;\n\t\tesac\n\t\t;;\n\t-nto-qnx*)\n\t\t;;\n\t-nto*)\n\t\tos=`echo $os | sed -e 's|nto|nto-qnx|'`\n\t\t;;\n\t-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \\\n\t      | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \\\n\t      | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)\n\t\t;;\n\t-mac*)\n\t\tos=`echo $os | sed -e 's|mac|macos|'`\n\t\t;;\n\t-linux-dietlibc)\n\t\tos=-linux-dietlibc\n\t\t;;\n\t-linux*)\n\t\tos=`echo $os | sed -e 's|linux|linux-gnu|'`\n\t\t;;\n\t-sunos5*)\n\t\tos=`echo $os | sed -e 's|sunos5|solaris2|'`\n\t\t;;\n\t-sunos6*)\n\t\tos=`echo $os | sed -e 's|sunos6|solaris3|'`\n\t\t;;\n\t-opened*)\n\t\tos=-openedition\n\t\t;;\n\t-os400*)\n\t\tos=-os400\n\t\t;;\n\t-wince*)\n\t\tos=-wince\n\t\t;;\n\t-osfrose*)\n\t\tos=-osfrose\n\t\t;;\n\t-osf*)\n\t\tos=-osf\n\t\t;;\n\t-utek*)\n\t\tos=-bsd\n\t\t;;\n\t-dynix*)\n\t\tos=-bsd\n\t\t;;\n\t-acis*)\n\t\tos=-aos\n\t\t;;\n\t-atheos*)\n\t\tos=-atheos\n\t\t;;\n\t-syllable*)\n\t\tos=-syllable\n\t\t;;\n\t-386bsd)\n\t\tos=-bsd\n\t\t;;\n\t-ctix* | -uts*)\n\t\tos=-sysv\n\t\t;;\n\t-nova*)\n\t\tos=-rtmk-nova\n\t\t;;\n\t-ns2 )\n\t\tos=-nextstep2\n\t\t;;\n\t-nsk*)\n\t\tos=-nsk\n\t\t;;\n\t# Preserve the version number of sinix5.\n\t-sinix5.*)\n\t\tos=`echo $os | sed -e 's|sinix|sysv|'`\n\t\t;;\n\t-sinix*)\n\t\tos=-sysv4\n\t\t;;\n\t-tpf*)\n\t\tos=-tpf\n\t\t;;\n\t-triton*)\n\t\tos=-sysv3\n\t\t;;\n\t-oss*)\n\t\tos=-sysv3\n\t\t;;\n\t-svr4)\n\t\tos=-sysv4\n\t\t;;\n\t-svr3)\n\t\tos=-sysv3\n\t\t;;\n\t-sysvr4)\n\t\tos=-sysv4\n\t\t;;\n\t# This must come after -sysvr4.\n\t-sysv*)\n\t\t;;\n\t-ose*)\n\t\tos=-ose\n\t\t;;\n\t-es1800*)\n\t\tos=-ose\n\t\t;;\n\t-xenix)\n\t\tos=-xenix\n\t\t;;\n\t-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)\n\t\tos=-mint\n\t\t;;\n\t-aros*)\n\t\tos=-aros\n\t\t;;\n\t-zvmoe)\n\t\tos=-zvmoe\n\t\t;;\n\t-dicos*)\n\t\tos=-dicos\n\t\t;;\n\t-nacl*)\n\t\t;;\n\t-none)\n\t\t;;\n\t*)\n\t\t# Get rid of the `-' at the beginning of $os.\n\t\tos=`echo $os | sed 's/[^-]*-//'`\n\t\techo Invalid configuration \\`$1\\': system \\`$os\\' not recognized 1>&2\n\t\texit 1\n\t\t;;\nesac\nelse\n\n# Here we handle the default operating systems that come with various machines.\n# The value should be what the vendor currently ships out the door with their\n# machine or put another way, the most popular os provided with the machine.\n\n# Note that if you're going to try to match \"-MANUFACTURER\" here (say,\n# \"-sun\"), then you have to tell the case statement up towards the top\n# that MANUFACTURER isn't an operating system.  Otherwise, code above\n# will signal an error saying that MANUFACTURER isn't an operating\n# system, and we'll never get to this point.\n\ncase $basic_machine in\n\tscore-*)\n\t\tos=-elf\n\t\t;;\n\tspu-*)\n\t\tos=-elf\n\t\t;;\n\t*-acorn)\n\t\tos=-riscix1.2\n\t\t;;\n\tarm*-rebel)\n\t\tos=-linux\n\t\t;;\n\tarm*-semi)\n\t\tos=-aout\n\t\t;;\n\tc4x-* | tic4x-*)\n\t\tos=-coff\n\t\t;;\n\tc8051-*)\n\t\tos=-elf\n\t\t;;\n\thexagon-*)\n\t\tos=-elf\n\t\t;;\n\ttic54x-*)\n\t\tos=-coff\n\t\t;;\n\ttic55x-*)\n\t\tos=-coff\n\t\t;;\n\ttic6x-*)\n\t\tos=-coff\n\t\t;;\n\t# This must come before the *-dec entry.\n\tpdp10-*)\n\t\tos=-tops20\n\t\t;;\n\tpdp11-*)\n\t\tos=-none\n\t\t;;\n\t*-dec | vax-*)\n\t\tos=-ultrix4.2\n\t\t;;\n\tm68*-apollo)\n\t\tos=-domain\n\t\t;;\n\ti386-sun)\n\t\tos=-sunos4.0.2\n\t\t;;\n\tm68000-sun)\n\t\tos=-sunos3\n\t\t;;\n\tm68*-cisco)\n\t\tos=-aout\n\t\t;;\n\tmep-*)\n\t\tos=-elf\n\t\t;;\n\tmips*-cisco)\n\t\tos=-elf\n\t\t;;\n\tmips*-*)\n\t\tos=-elf\n\t\t;;\n\tor1k-*)\n\t\tos=-elf\n\t\t;;\n\tor32-*)\n\t\tos=-coff\n\t\t;;\n\t*-tti)\t# must be before sparc entry or we get the wrong os.\n\t\tos=-sysv3\n\t\t;;\n\tsparc-* | *-sun)\n\t\tos=-sunos4.1.1\n\t\t;;\n\t*-be)\n\t\tos=-beos\n\t\t;;\n\t*-haiku)\n\t\tos=-haiku\n\t\t;;\n\t*-ibm)\n\t\tos=-aix\n\t\t;;\n\t*-knuth)\n\t\tos=-mmixware\n\t\t;;\n\t*-wec)\n\t\tos=-proelf\n\t\t;;\n\t*-winbond)\n\t\tos=-proelf\n\t\t;;\n\t*-oki)\n\t\tos=-proelf\n\t\t;;\n\t*-hp)\n\t\tos=-hpux\n\t\t;;\n\t*-hitachi)\n\t\tos=-hiux\n\t\t;;\n\ti860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)\n\t\tos=-sysv\n\t\t;;\n\t*-cbm)\n\t\tos=-amigaos\n\t\t;;\n\t*-dg)\n\t\tos=-dgux\n\t\t;;\n\t*-dolphin)\n\t\tos=-sysv3\n\t\t;;\n\tm68k-ccur)\n\t\tos=-rtu\n\t\t;;\n\tm88k-omron*)\n\t\tos=-luna\n\t\t;;\n\t*-next )\n\t\tos=-nextstep\n\t\t;;\n\t*-sequent)\n\t\tos=-ptx\n\t\t;;\n\t*-crds)\n\t\tos=-unos\n\t\t;;\n\t*-ns)\n\t\tos=-genix\n\t\t;;\n\ti370-*)\n\t\tos=-mvs\n\t\t;;\n\t*-next)\n\t\tos=-nextstep3\n\t\t;;\n\t*-gould)\n\t\tos=-sysv\n\t\t;;\n\t*-highlevel)\n\t\tos=-bsd\n\t\t;;\n\t*-encore)\n\t\tos=-bsd\n\t\t;;\n\t*-sgi)\n\t\tos=-irix\n\t\t;;\n\t*-siemens)\n\t\tos=-sysv4\n\t\t;;\n\t*-masscomp)\n\t\tos=-rtu\n\t\t;;\n\tf30[01]-fujitsu | f700-fujitsu)\n\t\tos=-uxpv\n\t\t;;\n\t*-rom68k)\n\t\tos=-coff\n\t\t;;\n\t*-*bug)\n\t\tos=-coff\n\t\t;;\n\t*-apple)\n\t\tos=-macos\n\t\t;;\n\t*-atari*)\n\t\tos=-mint\n\t\t;;\n\t*)\n\t\tos=-none\n\t\t;;\nesac\nfi\n\n# Here we handle the case where we know the os, and the CPU type, but not the\n# manufacturer.  We pick the logical manufacturer.\nvendor=unknown\ncase $basic_machine in\n\t*-unknown)\n\t\tcase $os in\n\t\t\t-riscix*)\n\t\t\t\tvendor=acorn\n\t\t\t\t;;\n\t\t\t-sunos*)\n\t\t\t\tvendor=sun\n\t\t\t\t;;\n\t\t\t-cnk*|-aix*)\n\t\t\t\tvendor=ibm\n\t\t\t\t;;\n\t\t\t-beos*)\n\t\t\t\tvendor=be\n\t\t\t\t;;\n\t\t\t-hpux*)\n\t\t\t\tvendor=hp\n\t\t\t\t;;\n\t\t\t-mpeix*)\n\t\t\t\tvendor=hp\n\t\t\t\t;;\n\t\t\t-hiux*)\n\t\t\t\tvendor=hitachi\n\t\t\t\t;;\n\t\t\t-unos*)\n\t\t\t\tvendor=crds\n\t\t\t\t;;\n\t\t\t-dgux*)\n\t\t\t\tvendor=dg\n\t\t\t\t;;\n\t\t\t-luna*)\n\t\t\t\tvendor=omron\n\t\t\t\t;;\n\t\t\t-genix*)\n\t\t\t\tvendor=ns\n\t\t\t\t;;\n\t\t\t-mvs* | -opened*)\n\t\t\t\tvendor=ibm\n\t\t\t\t;;\n\t\t\t-os400*)\n\t\t\t\tvendor=ibm\n\t\t\t\t;;\n\t\t\t-ptx*)\n\t\t\t\tvendor=sequent\n\t\t\t\t;;\n\t\t\t-tpf*)\n\t\t\t\tvendor=ibm\n\t\t\t\t;;\n\t\t\t-vxsim* | -vxworks* | -windiss*)\n\t\t\t\tvendor=wrs\n\t\t\t\t;;\n\t\t\t-aux*)\n\t\t\t\tvendor=apple\n\t\t\t\t;;\n\t\t\t-hms*)\n\t\t\t\tvendor=hitachi\n\t\t\t\t;;\n\t\t\t-mpw* | -macos*)\n\t\t\t\tvendor=apple\n\t\t\t\t;;\n\t\t\t-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)\n\t\t\t\tvendor=atari\n\t\t\t\t;;\n\t\t\t-vos*)\n\t\t\t\tvendor=stratus\n\t\t\t\t;;\n\t\tesac\n\t\tbasic_machine=`echo $basic_machine | sed \"s/unknown/$vendor/\"`\n\t\t;;\nesac\n\necho $basic_machine$os\nexit\n\n# Local variables:\n# eval: (add-hook 'write-file-hooks 'time-stamp)\n# time-stamp-start: \"timestamp='\"\n# time-stamp-format: \"%:y-%02m-%02d\"\n# time-stamp-end: \"'\"\n# End:\n"
  },
  {
    "path": "thirdparty/portaudio/configure",
    "content": "#! /bin/sh\n# Guess values for system-dependent variables and create Makefiles.\n# Generated by GNU Autoconf 2.69.\n#\n#\n# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.\n#\n#\n# This configure script is free software; the Free Software Foundation\n# gives unlimited permission to copy, distribute and modify it.\n## -------------------- ##\n## M4sh Initialization. ##\n## -------------------- ##\n\n# Be more Bourne compatible\nDUALCASE=1; export DUALCASE # for MKS sh\nif test -n \"${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :\n  emulate sh\n  NULLCMD=:\n  # Pre-4.2 versions of Zsh do word splitting on ${1+\"$@\"}, which\n  # is contrary to our usage.  Disable this feature.\n  alias -g '${1+\"$@\"}'='\"$@\"'\n  setopt NO_GLOB_SUBST\nelse\n  case `(set -o) 2>/dev/null` in #(\n  *posix*) :\n    set -o posix ;; #(\n  *) :\n     ;;\nesac\nfi\n\n\nas_nl='\n'\nexport as_nl\n# Printing a long string crashes Solaris 7 /usr/bin/printf.\nas_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'\nas_echo=$as_echo$as_echo$as_echo$as_echo$as_echo\nas_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo\n# Prefer a ksh shell builtin over an external printf program on Solaris,\n# but without wasting forks for bash or zsh.\nif test -z \"$BASH_VERSION$ZSH_VERSION\" \\\n    && (test \"X`print -r -- $as_echo`\" = \"X$as_echo\") 2>/dev/null; then\n  as_echo='print -r --'\n  as_echo_n='print -rn --'\nelif (test \"X`printf %s $as_echo`\" = \"X$as_echo\") 2>/dev/null; then\n  as_echo='printf %s\\n'\n  as_echo_n='printf %s'\nelse\n  if test \"X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`\" = \"X-n $as_echo\"; then\n    as_echo_body='eval /usr/ucb/echo -n \"$1$as_nl\"'\n    as_echo_n='/usr/ucb/echo -n'\n  else\n    as_echo_body='eval expr \"X$1\" : \"X\\\\(.*\\\\)\"'\n    as_echo_n_body='eval\n      arg=$1;\n      case $arg in #(\n      *\"$as_nl\"*)\n\texpr \"X$arg\" : \"X\\\\(.*\\\\)$as_nl\";\n\targ=`expr \"X$arg\" : \".*$as_nl\\\\(.*\\\\)\"`;;\n      esac;\n      expr \"X$arg\" : \"X\\\\(.*\\\\)\" | tr -d \"$as_nl\"\n    '\n    export as_echo_n_body\n    as_echo_n='sh -c $as_echo_n_body as_echo'\n  fi\n  export as_echo_body\n  as_echo='sh -c $as_echo_body as_echo'\nfi\n\n# The user is always right.\nif test \"${PATH_SEPARATOR+set}\" != set; then\n  PATH_SEPARATOR=:\n  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {\n    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||\n      PATH_SEPARATOR=';'\n  }\nfi\n\n\n# IFS\n# We need space, tab and new line, in precisely that order.  Quoting is\n# there to prevent editors from complaining about space-tab.\n# (If _AS_PATH_WALK were called with IFS unset, it would disable word\n# splitting by setting IFS to empty value.)\nIFS=\" \"\"\t$as_nl\"\n\n# Find who we are.  Look in the path if we contain no directory separator.\nas_myself=\ncase $0 in #((\n  *[\\\\/]* ) as_myself=$0 ;;\n  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    test -r \"$as_dir/$0\" && as_myself=$as_dir/$0 && break\n  done\nIFS=$as_save_IFS\n\n     ;;\nesac\n# We did not find ourselves, most probably we were run as `sh COMMAND'\n# in which case we are not to be found in the path.\nif test \"x$as_myself\" = x; then\n  as_myself=$0\nfi\nif test ! -f \"$as_myself\"; then\n  $as_echo \"$as_myself: error: cannot find myself; rerun with an absolute file name\" >&2\n  exit 1\nfi\n\n# Unset variables that we do not need and which cause bugs (e.g. in\n# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the \"|| exit 1\"\n# suppresses any \"Segmentation fault\" message there.  '((' could\n# trigger a bug in pdksh 5.2.14.\nfor as_var in BASH_ENV ENV MAIL MAILPATH\ndo eval test x\\${$as_var+set} = xset \\\n  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :\ndone\nPS1='$ '\nPS2='> '\nPS4='+ '\n\n# NLS nuisances.\nLC_ALL=C\nexport LC_ALL\nLANGUAGE=C\nexport LANGUAGE\n\n# CDPATH.\n(unset CDPATH) >/dev/null 2>&1 && unset CDPATH\n\n# Use a proper internal environment variable to ensure we don't fall\n  # into an infinite loop, continuously re-executing ourselves.\n  if test x\"${_as_can_reexec}\" != xno && test \"x$CONFIG_SHELL\" != x; then\n    _as_can_reexec=no; export _as_can_reexec;\n    # We cannot yet assume a decent shell, so we have to provide a\n# neutralization value for shells without unset; and this also\n# works around shells that cannot unset nonexistent variables.\n# Preserve -v and -x to the replacement shell.\nBASH_ENV=/dev/null\nENV=/dev/null\n(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV\ncase $- in # ((((\n  *v*x* | *x*v* ) as_opts=-vx ;;\n  *v* ) as_opts=-v ;;\n  *x* ) as_opts=-x ;;\n  * ) as_opts= ;;\nesac\nexec $CONFIG_SHELL $as_opts \"$as_myself\" ${1+\"$@\"}\n# Admittedly, this is quite paranoid, since all the known shells bail\n# out after a failed `exec'.\n$as_echo \"$0: could not re-execute with $CONFIG_SHELL\" >&2\nas_fn_exit 255\n  fi\n  # We don't want this to propagate to other subprocesses.\n          { _as_can_reexec=; unset _as_can_reexec;}\nif test \"x$CONFIG_SHELL\" = x; then\n  as_bourne_compatible=\"if test -n \\\"\\${ZSH_VERSION+set}\\\" && (emulate sh) >/dev/null 2>&1; then :\n  emulate sh\n  NULLCMD=:\n  # Pre-4.2 versions of Zsh do word splitting on \\${1+\\\"\\$@\\\"}, which\n  # is contrary to our usage.  Disable this feature.\n  alias -g '\\${1+\\\"\\$@\\\"}'='\\\"\\$@\\\"'\n  setopt NO_GLOB_SUBST\nelse\n  case \\`(set -o) 2>/dev/null\\` in #(\n  *posix*) :\n    set -o posix ;; #(\n  *) :\n     ;;\nesac\nfi\n\"\n  as_required=\"as_fn_return () { (exit \\$1); }\nas_fn_success () { as_fn_return 0; }\nas_fn_failure () { as_fn_return 1; }\nas_fn_ret_success () { return 0; }\nas_fn_ret_failure () { return 1; }\n\nexitcode=0\nas_fn_success || { exitcode=1; echo as_fn_success failed.; }\nas_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }\nas_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }\nas_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }\nif ( set x; as_fn_ret_success y && test x = \\\"\\$1\\\" ); then :\n\nelse\n  exitcode=1; echo positional parameters were not saved.\nfi\ntest x\\$exitcode = x0 || exit 1\ntest -x / || exit 1\"\n  as_suggested=\"  as_lineno_1=\";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested\" as_lineno_1a=\\$LINENO\n  as_lineno_2=\";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested\" as_lineno_2a=\\$LINENO\n  eval 'test \\\"x\\$as_lineno_1'\\$as_run'\\\" != \\\"x\\$as_lineno_2'\\$as_run'\\\" &&\n  test \\\"x\\`expr \\$as_lineno_1'\\$as_run' + 1\\`\\\" = \\\"x\\$as_lineno_2'\\$as_run'\\\"' || exit 1\n\n  test -n \\\"\\${ZSH_VERSION+set}\\${BASH_VERSION+set}\\\" || (\n    ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'\n    ECHO=\\$ECHO\\$ECHO\\$ECHO\\$ECHO\\$ECHO\n    ECHO=\\$ECHO\\$ECHO\\$ECHO\\$ECHO\\$ECHO\\$ECHO\n    PATH=/empty FPATH=/empty; export PATH FPATH\n    test \\\"X\\`printf %s \\$ECHO\\`\\\" = \\\"X\\$ECHO\\\" \\\\\n      || test \\\"X\\`print -r -- \\$ECHO\\`\\\" = \\\"X\\$ECHO\\\" ) || exit 1\ntest \\$(( 1 + 1 )) = 2 || exit 1\"\n  if (eval \"$as_required\") 2>/dev/null; then :\n  as_have_required=yes\nelse\n  as_have_required=no\nfi\n  if test x$as_have_required = xyes && (eval \"$as_suggested\") 2>/dev/null; then :\n\nelse\n  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nas_found=false\nfor as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n  as_found=:\n  case $as_dir in #(\n\t /*)\n\t   for as_base in sh bash ksh sh5; do\n\t     # Try only shells that exist, to save several forks.\n\t     as_shell=$as_dir/$as_base\n\t     if { test -f \"$as_shell\" || test -f \"$as_shell.exe\"; } &&\n\t\t    { $as_echo \"$as_bourne_compatible\"\"$as_required\" | as_run=a \"$as_shell\"; } 2>/dev/null; then :\n  CONFIG_SHELL=$as_shell as_have_required=yes\n\t\t   if { $as_echo \"$as_bourne_compatible\"\"$as_suggested\" | as_run=a \"$as_shell\"; } 2>/dev/null; then :\n  break 2\nfi\nfi\n\t   done;;\n       esac\n  as_found=false\ndone\n$as_found || { if { test -f \"$SHELL\" || test -f \"$SHELL.exe\"; } &&\n\t      { $as_echo \"$as_bourne_compatible\"\"$as_required\" | as_run=a \"$SHELL\"; } 2>/dev/null; then :\n  CONFIG_SHELL=$SHELL as_have_required=yes\nfi; }\nIFS=$as_save_IFS\n\n\n      if test \"x$CONFIG_SHELL\" != x; then :\n  export CONFIG_SHELL\n             # We cannot yet assume a decent shell, so we have to provide a\n# neutralization value for shells without unset; and this also\n# works around shells that cannot unset nonexistent variables.\n# Preserve -v and -x to the replacement shell.\nBASH_ENV=/dev/null\nENV=/dev/null\n(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV\ncase $- in # ((((\n  *v*x* | *x*v* ) as_opts=-vx ;;\n  *v* ) as_opts=-v ;;\n  *x* ) as_opts=-x ;;\n  * ) as_opts= ;;\nesac\nexec $CONFIG_SHELL $as_opts \"$as_myself\" ${1+\"$@\"}\n# Admittedly, this is quite paranoid, since all the known shells bail\n# out after a failed `exec'.\n$as_echo \"$0: could not re-execute with $CONFIG_SHELL\" >&2\nexit 255\nfi\n\n    if test x$as_have_required = xno; then :\n  $as_echo \"$0: This script requires a shell more modern than all\"\n  $as_echo \"$0: the shells that I found on your system.\"\n  if test x${ZSH_VERSION+set} = xset ; then\n    $as_echo \"$0: In particular, zsh $ZSH_VERSION has bugs and should\"\n    $as_echo \"$0: be upgraded to zsh 4.3.4 or later.\"\n  else\n    $as_echo \"$0: Please tell bug-autoconf@gnu.org about your system,\n$0: including any error possibly output before this\n$0: message. Then install a modern shell, or manually run\n$0: the script under such a shell if you do have one.\"\n  fi\n  exit 1\nfi\nfi\nfi\nSHELL=${CONFIG_SHELL-/bin/sh}\nexport SHELL\n# Unset more variables known to interfere with behavior of common tools.\nCLICOLOR_FORCE= GREP_OPTIONS=\nunset CLICOLOR_FORCE GREP_OPTIONS\n\n## --------------------- ##\n## M4sh Shell Functions. ##\n## --------------------- ##\n# as_fn_unset VAR\n# ---------------\n# Portably unset VAR.\nas_fn_unset ()\n{\n  { eval $1=; unset $1;}\n}\nas_unset=as_fn_unset\n\n# as_fn_set_status STATUS\n# -----------------------\n# Set $? to STATUS, without forking.\nas_fn_set_status ()\n{\n  return $1\n} # as_fn_set_status\n\n# as_fn_exit STATUS\n# -----------------\n# Exit the shell with STATUS, even in a \"trap 0\" or \"set -e\" context.\nas_fn_exit ()\n{\n  set +e\n  as_fn_set_status $1\n  exit $1\n} # as_fn_exit\n\n# as_fn_mkdir_p\n# -------------\n# Create \"$as_dir\" as a directory, including parents if necessary.\nas_fn_mkdir_p ()\n{\n\n  case $as_dir in #(\n  -*) as_dir=./$as_dir;;\n  esac\n  test -d \"$as_dir\" || eval $as_mkdir_p || {\n    as_dirs=\n    while :; do\n      case $as_dir in #(\n      *\\'*) as_qdir=`$as_echo \"$as_dir\" | sed \"s/'/'\\\\\\\\\\\\\\\\''/g\"`;; #'(\n      *) as_qdir=$as_dir;;\n      esac\n      as_dirs=\"'$as_qdir' $as_dirs\"\n      as_dir=`$as_dirname -- \"$as_dir\" ||\n$as_expr X\"$as_dir\" : 'X\\(.*[^/]\\)//*[^/][^/]*/*$' \\| \\\n\t X\"$as_dir\" : 'X\\(//\\)[^/]' \\| \\\n\t X\"$as_dir\" : 'X\\(//\\)$' \\| \\\n\t X\"$as_dir\" : 'X\\(/\\)' \\| . 2>/dev/null ||\n$as_echo X\"$as_dir\" |\n    sed '/^X\\(.*[^/]\\)\\/\\/*[^/][^/]*\\/*$/{\n\t    s//\\1/\n\t    q\n\t  }\n\t  /^X\\(\\/\\/\\)[^/].*/{\n\t    s//\\1/\n\t    q\n\t  }\n\t  /^X\\(\\/\\/\\)$/{\n\t    s//\\1/\n\t    q\n\t  }\n\t  /^X\\(\\/\\).*/{\n\t    s//\\1/\n\t    q\n\t  }\n\t  s/.*/./; q'`\n      test -d \"$as_dir\" && break\n    done\n    test -z \"$as_dirs\" || eval \"mkdir $as_dirs\"\n  } || test -d \"$as_dir\" || as_fn_error $? \"cannot create directory $as_dir\"\n\n\n} # as_fn_mkdir_p\n\n# as_fn_executable_p FILE\n# -----------------------\n# Test if FILE is an executable regular file.\nas_fn_executable_p ()\n{\n  test -f \"$1\" && test -x \"$1\"\n} # as_fn_executable_p\n# as_fn_append VAR VALUE\n# ----------------------\n# Append the text in VALUE to the end of the definition contained in VAR. Take\n# advantage of any shell optimizations that allow amortized linear growth over\n# repeated appends, instead of the typical quadratic growth present in naive\n# implementations.\nif (eval \"as_var=1; as_var+=2; test x\\$as_var = x12\") 2>/dev/null; then :\n  eval 'as_fn_append ()\n  {\n    eval $1+=\\$2\n  }'\nelse\n  as_fn_append ()\n  {\n    eval $1=\\$$1\\$2\n  }\nfi # as_fn_append\n\n# as_fn_arith ARG...\n# ------------------\n# Perform arithmetic evaluation on the ARGs, and store the result in the\n# global $as_val. Take advantage of shells that can avoid forks. The arguments\n# must be portable across $(()) and expr.\nif (eval \"test \\$(( 1 + 1 )) = 2\") 2>/dev/null; then :\n  eval 'as_fn_arith ()\n  {\n    as_val=$(( $* ))\n  }'\nelse\n  as_fn_arith ()\n  {\n    as_val=`expr \"$@\" || test $? -eq 1`\n  }\nfi # as_fn_arith\n\n\n# as_fn_error STATUS ERROR [LINENO LOG_FD]\n# ----------------------------------------\n# Output \"`basename $0`: error: ERROR\" to stderr. If LINENO and LOG_FD are\n# provided, also output the error to LOG_FD, referencing LINENO. Then exit the\n# script with STATUS, using 1 if that was 0.\nas_fn_error ()\n{\n  as_status=$1; test $as_status -eq 0 && as_status=1\n  if test \"$4\"; then\n    as_lineno=${as_lineno-\"$3\"} as_lineno_stack=as_lineno_stack=$as_lineno_stack\n    $as_echo \"$as_me:${as_lineno-$LINENO}: error: $2\" >&$4\n  fi\n  $as_echo \"$as_me: error: $2\" >&2\n  as_fn_exit $as_status\n} # as_fn_error\n\nif expr a : '\\(a\\)' >/dev/null 2>&1 &&\n   test \"X`expr 00001 : '.*\\(...\\)'`\" = X001; then\n  as_expr=expr\nelse\n  as_expr=false\nfi\n\nif (basename -- /) >/dev/null 2>&1 && test \"X`basename -- / 2>&1`\" = \"X/\"; then\n  as_basename=basename\nelse\n  as_basename=false\nfi\n\nif (as_dir=`dirname -- /` && test \"X$as_dir\" = X/) >/dev/null 2>&1; then\n  as_dirname=dirname\nelse\n  as_dirname=false\nfi\n\nas_me=`$as_basename -- \"$0\" ||\n$as_expr X/\"$0\" : '.*/\\([^/][^/]*\\)/*$' \\| \\\n\t X\"$0\" : 'X\\(//\\)$' \\| \\\n\t X\"$0\" : 'X\\(/\\)' \\| . 2>/dev/null ||\n$as_echo X/\"$0\" |\n    sed '/^.*\\/\\([^/][^/]*\\)\\/*$/{\n\t    s//\\1/\n\t    q\n\t  }\n\t  /^X\\/\\(\\/\\/\\)$/{\n\t    s//\\1/\n\t    q\n\t  }\n\t  /^X\\/\\(\\/\\).*/{\n\t    s//\\1/\n\t    q\n\t  }\n\t  s/.*/./; q'`\n\n# Avoid depending upon Character Ranges.\nas_cr_letters='abcdefghijklmnopqrstuvwxyz'\nas_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'\nas_cr_Letters=$as_cr_letters$as_cr_LETTERS\nas_cr_digits='0123456789'\nas_cr_alnum=$as_cr_Letters$as_cr_digits\n\n\n  as_lineno_1=$LINENO as_lineno_1a=$LINENO\n  as_lineno_2=$LINENO as_lineno_2a=$LINENO\n  eval 'test \"x$as_lineno_1'$as_run'\" != \"x$as_lineno_2'$as_run'\" &&\n  test \"x`expr $as_lineno_1'$as_run' + 1`\" = \"x$as_lineno_2'$as_run'\"' || {\n  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)\n  sed -n '\n    p\n    /[$]LINENO/=\n  ' <$as_myself |\n    sed '\n      s/[$]LINENO.*/&-/\n      t lineno\n      b\n      :lineno\n      N\n      :loop\n      s/[$]LINENO\\([^'$as_cr_alnum'_].*\\n\\)\\(.*\\)/\\2\\1\\2/\n      t loop\n      s/-\\n.*//\n    ' >$as_me.lineno &&\n  chmod +x \"$as_me.lineno\" ||\n    { $as_echo \"$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell\" >&2; as_fn_exit 1; }\n\n  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have\n  # already done that, so ensure we don't try to do so again and fall\n  # in an infinite loop.  This has already happened in practice.\n  _as_can_reexec=no; export _as_can_reexec\n  # Don't try to exec as it changes $[0], causing all sort of problems\n  # (the dirname of $[0] is not the place where we might find the\n  # original and so on.  Autoconf is especially sensitive to this).\n  . \"./$as_me.lineno\"\n  # Exit status is that of the last command.\n  exit\n}\n\nECHO_C= ECHO_N= ECHO_T=\ncase `echo -n x` in #(((((\n-n*)\n  case `echo 'xy\\c'` in\n  *c*) ECHO_T='\t';;\t# ECHO_T is single tab character.\n  xy)  ECHO_C='\\c';;\n  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null\n       ECHO_T='\t';;\n  esac;;\n*)\n  ECHO_N='-n';;\nesac\n\nrm -f conf$$ conf$$.exe conf$$.file\nif test -d conf$$.dir; then\n  rm -f conf$$.dir/conf$$.file\nelse\n  rm -f conf$$.dir\n  mkdir conf$$.dir 2>/dev/null\nfi\nif (echo >conf$$.file) 2>/dev/null; then\n  if ln -s conf$$.file conf$$ 2>/dev/null; then\n    as_ln_s='ln -s'\n    # ... but there are two gotchas:\n    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.\n    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.\n    # In both cases, we have to default to `cp -pR'.\n    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||\n      as_ln_s='cp -pR'\n  elif ln conf$$.file conf$$ 2>/dev/null; then\n    as_ln_s=ln\n  else\n    as_ln_s='cp -pR'\n  fi\nelse\n  as_ln_s='cp -pR'\nfi\nrm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file\nrmdir conf$$.dir 2>/dev/null\n\nif mkdir -p . 2>/dev/null; then\n  as_mkdir_p='mkdir -p \"$as_dir\"'\nelse\n  test -d ./-p && rmdir ./-p\n  as_mkdir_p=false\nfi\n\nas_test_x='test -x'\nas_executable_p=as_fn_executable_p\n\n# Sed expression to map a string onto a valid CPP name.\nas_tr_cpp=\"eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'\"\n\n# Sed expression to map a string onto a valid variable name.\nas_tr_sh=\"eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'\"\n\nSHELL=${CONFIG_SHELL-/bin/sh}\n\n\ntest -n \"$DJDIR\" || exec 7<&0 </dev/null\nexec 6>&1\n\n# Name of the host.\n# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,\n# so uname gets run too.\nac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`\n\n#\n# Initializations.\n#\nac_default_prefix=/usr/local\nac_clean_files=\nac_config_libobj_dir=.\nLIBOBJS=\ncross_compiling=no\nsubdirs=\nMFLAGS=\nMAKEFLAGS=\n\n# Identity of this package.\nPACKAGE_NAME=\nPACKAGE_TARNAME=\nPACKAGE_VERSION=\nPACKAGE_STRING=\nPACKAGE_BUGREPORT=\nPACKAGE_URL=\n\nac_unique_file=\"include/portaudio.h\"\n# Factoring default headers for most tests.\nac_includes_default=\"\\\n#include <stdio.h>\n#ifdef HAVE_SYS_TYPES_H\n# include <sys/types.h>\n#endif\n#ifdef HAVE_SYS_STAT_H\n# include <sys/stat.h>\n#endif\n#ifdef STDC_HEADERS\n# include <stdlib.h>\n# include <stddef.h>\n#else\n# ifdef HAVE_STDLIB_H\n#  include <stdlib.h>\n# endif\n#endif\n#ifdef HAVE_STRING_H\n# if !defined STDC_HEADERS && defined HAVE_MEMORY_H\n#  include <memory.h>\n# endif\n# include <string.h>\n#endif\n#ifdef HAVE_STRINGS_H\n# include <strings.h>\n#endif\n#ifdef HAVE_INTTYPES_H\n# include <inttypes.h>\n#endif\n#ifdef HAVE_STDINT_H\n# include <stdint.h>\n#endif\n#ifdef HAVE_UNISTD_H\n# include <unistd.h>\n#endif\"\n\nenable_option_checking=no\nac_subst_vars='LTLIBOBJS\nLIBOBJS\nWITH_ASIO_FALSE\nWITH_ASIO_TRUE\nENABLE_CXX_FALSE\nENABLE_CXX_TRUE\nsubdirs\nINCLUDES\nNASMOPT\nNASM\nDLL_LIBS\nTHREAD_CFLAGS\nSHARED_FLAGS\nPADLL\nOTHER_OBJS\nLT_AGE\nLT_REVISION\nLT_CURRENT\nJACK_LIBS\nJACK_CFLAGS\nPKG_CONFIG_LIBDIR\nPKG_CONFIG_PATH\nPKG_CONFIG\nINSTALL_DATA\nINSTALL_SCRIPT\nINSTALL_PROGRAM\nCXXCPP\nCPP\nOTOOL64\nOTOOL\nLIPO\nNMEDIT\nDSYMUTIL\nMANIFEST_TOOL\nAWK\nRANLIB\nSTRIP\nac_ct_AR\nAR\nLN_S\nNM\nac_ct_DUMPBIN\nDUMPBIN\nLD\nFGREP\nEGREP\nGREP\nSED\nLIBTOOL\nOBJDUMP\nDLLTOOL\nAS\nac_ct_CXX\nCXXFLAGS\nCXX\nOBJEXT\nEXEEXT\nac_ct_CC\nCPPFLAGS\nLDFLAGS\nCFLAGS\nCC\ntarget_os\ntarget_vendor\ntarget_cpu\ntarget\nhost_os\nhost_vendor\nhost_cpu\nhost\nbuild_os\nbuild_vendor\nbuild_cpu\nbuild\ntarget_alias\nhost_alias\nbuild_alias\nLIBS\nECHO_T\nECHO_N\nECHO_C\nDEFS\nmandir\nlocaledir\nlibdir\npsdir\npdfdir\ndvidir\nhtmldir\ninfodir\ndocdir\noldincludedir\nincludedir\nrunstatedir\nlocalstatedir\nsharedstatedir\nsysconfdir\ndatadir\ndatarootdir\nlibexecdir\nsbindir\nbindir\nprogram_transform_name\nprefix\nexec_prefix\nPACKAGE_URL\nPACKAGE_BUGREPORT\nPACKAGE_STRING\nPACKAGE_VERSION\nPACKAGE_TARNAME\nPACKAGE_NAME\nPATH_SEPARATOR\nSHELL'\nac_subst_files=''\nac_user_opts='\nenable_option_checking\nwith_alsa\nwith_jack\nwith_oss\nwith_asihpi\nwith_winapi\nwith_asiodir\nwith_dxdir\nenable_debug_output\nenable_cxx\nenable_mac_debug\nenable_mac_universal\nwith_host_os\nenable_shared\nenable_static\nwith_pic\nenable_fast_install\nwith_gnu_ld\nwith_sysroot\nenable_libtool_lock\n'\n      ac_precious_vars='build_alias\nhost_alias\ntarget_alias\nCC\nCFLAGS\nLDFLAGS\nLIBS\nCPPFLAGS\nCXX\nCXXFLAGS\nCCC\nCPP\nCXXCPP\nPKG_CONFIG\nPKG_CONFIG_PATH\nPKG_CONFIG_LIBDIR\nJACK_CFLAGS\nJACK_LIBS'\nac_subdirs_all='bindings/cpp'\n\n# Initialize some variables set by options.\nac_init_help=\nac_init_version=false\nac_unrecognized_opts=\nac_unrecognized_sep=\n# The variables have the same names as the options, with\n# dashes changed to underlines.\ncache_file=/dev/null\nexec_prefix=NONE\nno_create=\nno_recursion=\nprefix=NONE\nprogram_prefix=NONE\nprogram_suffix=NONE\nprogram_transform_name=s,x,x,\nsilent=\nsite=\nsrcdir=\nverbose=\nx_includes=NONE\nx_libraries=NONE\n\n# Installation directory options.\n# These are left unexpanded so users can \"make install exec_prefix=/foo\"\n# and all the variables that are supposed to be based on exec_prefix\n# by default will actually change.\n# Use braces instead of parens because sh, perl, etc. also accept them.\n# (The list follows the same order as the GNU Coding Standards.)\nbindir='${exec_prefix}/bin'\nsbindir='${exec_prefix}/sbin'\nlibexecdir='${exec_prefix}/libexec'\ndatarootdir='${prefix}/share'\ndatadir='${datarootdir}'\nsysconfdir='${prefix}/etc'\nsharedstatedir='${prefix}/com'\nlocalstatedir='${prefix}/var'\nrunstatedir='${localstatedir}/run'\nincludedir='${prefix}/include'\noldincludedir='/usr/include'\ndocdir='${datarootdir}/doc/${PACKAGE}'\ninfodir='${datarootdir}/info'\nhtmldir='${docdir}'\ndvidir='${docdir}'\npdfdir='${docdir}'\npsdir='${docdir}'\nlibdir='${exec_prefix}/lib'\nlocaledir='${datarootdir}/locale'\nmandir='${datarootdir}/man'\n\nac_prev=\nac_dashdash=\nfor ac_option\ndo\n  # If the previous option needs an argument, assign it.\n  if test -n \"$ac_prev\"; then\n    eval $ac_prev=\\$ac_option\n    ac_prev=\n    continue\n  fi\n\n  case $ac_option in\n  *=?*) ac_optarg=`expr \"X$ac_option\" : '[^=]*=\\(.*\\)'` ;;\n  *=)   ac_optarg= ;;\n  *)    ac_optarg=yes ;;\n  esac\n\n  # Accept the important Cygnus configure options, so we can diagnose typos.\n\n  case $ac_dashdash$ac_option in\n  --)\n    ac_dashdash=yes ;;\n\n  -bindir | --bindir | --bindi | --bind | --bin | --bi)\n    ac_prev=bindir ;;\n  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)\n    bindir=$ac_optarg ;;\n\n  -build | --build | --buil | --bui | --bu)\n    ac_prev=build_alias ;;\n  -build=* | --build=* | --buil=* | --bui=* | --bu=*)\n    build_alias=$ac_optarg ;;\n\n  -cache-file | --cache-file | --cache-fil | --cache-fi \\\n  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)\n    ac_prev=cache_file ;;\n  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \\\n  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)\n    cache_file=$ac_optarg ;;\n\n  --config-cache | -C)\n    cache_file=config.cache ;;\n\n  -datadir | --datadir | --datadi | --datad)\n    ac_prev=datadir ;;\n  -datadir=* | --datadir=* | --datadi=* | --datad=*)\n    datadir=$ac_optarg ;;\n\n  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \\\n  | --dataroo | --dataro | --datar)\n    ac_prev=datarootdir ;;\n  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \\\n  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)\n    datarootdir=$ac_optarg ;;\n\n  -disable-* | --disable-*)\n    ac_useropt=`expr \"x$ac_option\" : 'x-*disable-\\(.*\\)'`\n    # Reject names that are not valid shell variable names.\n    expr \"x$ac_useropt\" : \".*[^-+._$as_cr_alnum]\" >/dev/null &&\n      as_fn_error $? \"invalid feature name: $ac_useropt\"\n    ac_useropt_orig=$ac_useropt\n    ac_useropt=`$as_echo \"$ac_useropt\" | sed 's/[-+.]/_/g'`\n    case $ac_user_opts in\n      *\"\n\"enable_$ac_useropt\"\n\"*) ;;\n      *) ac_unrecognized_opts=\"$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig\"\n\t ac_unrecognized_sep=', ';;\n    esac\n    eval enable_$ac_useropt=no ;;\n\n  -docdir | --docdir | --docdi | --doc | --do)\n    ac_prev=docdir ;;\n  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)\n    docdir=$ac_optarg ;;\n\n  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)\n    ac_prev=dvidir ;;\n  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)\n    dvidir=$ac_optarg ;;\n\n  -enable-* | --enable-*)\n    ac_useropt=`expr \"x$ac_option\" : 'x-*enable-\\([^=]*\\)'`\n    # Reject names that are not valid shell variable names.\n    expr \"x$ac_useropt\" : \".*[^-+._$as_cr_alnum]\" >/dev/null &&\n      as_fn_error $? \"invalid feature name: $ac_useropt\"\n    ac_useropt_orig=$ac_useropt\n    ac_useropt=`$as_echo \"$ac_useropt\" | sed 's/[-+.]/_/g'`\n    case $ac_user_opts in\n      *\"\n\"enable_$ac_useropt\"\n\"*) ;;\n      *) ac_unrecognized_opts=\"$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig\"\n\t ac_unrecognized_sep=', ';;\n    esac\n    eval enable_$ac_useropt=\\$ac_optarg ;;\n\n  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \\\n  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \\\n  | --exec | --exe | --ex)\n    ac_prev=exec_prefix ;;\n  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \\\n  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \\\n  | --exec=* | --exe=* | --ex=*)\n    exec_prefix=$ac_optarg ;;\n\n  -gas | --gas | --ga | --g)\n    # Obsolete; use --with-gas.\n    with_gas=yes ;;\n\n  -help | --help | --hel | --he | -h)\n    ac_init_help=long ;;\n  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)\n    ac_init_help=recursive ;;\n  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)\n    ac_init_help=short ;;\n\n  -host | --host | --hos | --ho)\n    ac_prev=host_alias ;;\n  -host=* | --host=* | --hos=* | --ho=*)\n    host_alias=$ac_optarg ;;\n\n  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)\n    ac_prev=htmldir ;;\n  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \\\n  | --ht=*)\n    htmldir=$ac_optarg ;;\n\n  -includedir | --includedir | --includedi | --included | --include \\\n  | --includ | --inclu | --incl | --inc)\n    ac_prev=includedir ;;\n  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \\\n  | --includ=* | --inclu=* | --incl=* | --inc=*)\n    includedir=$ac_optarg ;;\n\n  -infodir | --infodir | --infodi | --infod | --info | --inf)\n    ac_prev=infodir ;;\n  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)\n    infodir=$ac_optarg ;;\n\n  -libdir | --libdir | --libdi | --libd)\n    ac_prev=libdir ;;\n  -libdir=* | --libdir=* | --libdi=* | --libd=*)\n    libdir=$ac_optarg ;;\n\n  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \\\n  | --libexe | --libex | --libe)\n    ac_prev=libexecdir ;;\n  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \\\n  | --libexe=* | --libex=* | --libe=*)\n    libexecdir=$ac_optarg ;;\n\n  -localedir | --localedir | --localedi | --localed | --locale)\n    ac_prev=localedir ;;\n  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)\n    localedir=$ac_optarg ;;\n\n  -localstatedir | --localstatedir | --localstatedi | --localstated \\\n  | --localstate | --localstat | --localsta | --localst | --locals)\n    ac_prev=localstatedir ;;\n  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \\\n  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)\n    localstatedir=$ac_optarg ;;\n\n  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)\n    ac_prev=mandir ;;\n  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)\n    mandir=$ac_optarg ;;\n\n  -nfp | --nfp | --nf)\n    # Obsolete; use --without-fp.\n    with_fp=no ;;\n\n  -no-create | --no-create | --no-creat | --no-crea | --no-cre \\\n  | --no-cr | --no-c | -n)\n    no_create=yes ;;\n\n  -no-recursion | --no-recursion | --no-recursio | --no-recursi \\\n  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)\n    no_recursion=yes ;;\n\n  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \\\n  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \\\n  | --oldin | --oldi | --old | --ol | --o)\n    ac_prev=oldincludedir ;;\n  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \\\n  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \\\n  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)\n    oldincludedir=$ac_optarg ;;\n\n  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)\n    ac_prev=prefix ;;\n  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)\n    prefix=$ac_optarg ;;\n\n  -program-prefix | --program-prefix | --program-prefi | --program-pref \\\n  | --program-pre | --program-pr | --program-p)\n    ac_prev=program_prefix ;;\n  -program-prefix=* | --program-prefix=* | --program-prefi=* \\\n  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)\n    program_prefix=$ac_optarg ;;\n\n  -program-suffix | --program-suffix | --program-suffi | --program-suff \\\n  | --program-suf | --program-su | --program-s)\n    ac_prev=program_suffix ;;\n  -program-suffix=* | --program-suffix=* | --program-suffi=* \\\n  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)\n    program_suffix=$ac_optarg ;;\n\n  -program-transform-name | --program-transform-name \\\n  | --program-transform-nam | --program-transform-na \\\n  | --program-transform-n | --program-transform- \\\n  | --program-transform | --program-transfor \\\n  | --program-transfo | --program-transf \\\n  | --program-trans | --program-tran \\\n  | --progr-tra | --program-tr | --program-t)\n    ac_prev=program_transform_name ;;\n  -program-transform-name=* | --program-transform-name=* \\\n  | --program-transform-nam=* | --program-transform-na=* \\\n  | --program-transform-n=* | --program-transform-=* \\\n  | --program-transform=* | --program-transfor=* \\\n  | --program-transfo=* | --program-transf=* \\\n  | --program-trans=* | --program-tran=* \\\n  | --progr-tra=* | --program-tr=* | --program-t=*)\n    program_transform_name=$ac_optarg ;;\n\n  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)\n    ac_prev=pdfdir ;;\n  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)\n    pdfdir=$ac_optarg ;;\n\n  -psdir | --psdir | --psdi | --psd | --ps)\n    ac_prev=psdir ;;\n  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)\n    psdir=$ac_optarg ;;\n\n  -q | -quiet | --quiet | --quie | --qui | --qu | --q \\\n  | -silent | --silent | --silen | --sile | --sil)\n    silent=yes ;;\n\n  -runstatedir | --runstatedir | --runstatedi | --runstated \\\n  | --runstate | --runstat | --runsta | --runst | --runs \\\n  | --run | --ru | --r)\n    ac_prev=runstatedir ;;\n  -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \\\n  | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \\\n  | --run=* | --ru=* | --r=*)\n    runstatedir=$ac_optarg ;;\n\n  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)\n    ac_prev=sbindir ;;\n  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \\\n  | --sbi=* | --sb=*)\n    sbindir=$ac_optarg ;;\n\n  -sharedstatedir | --sharedstatedir | --sharedstatedi \\\n  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \\\n  | --sharedst | --shareds | --shared | --share | --shar \\\n  | --sha | --sh)\n    ac_prev=sharedstatedir ;;\n  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \\\n  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \\\n  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \\\n  | --sha=* | --sh=*)\n    sharedstatedir=$ac_optarg ;;\n\n  -site | --site | --sit)\n    ac_prev=site ;;\n  -site=* | --site=* | --sit=*)\n    site=$ac_optarg ;;\n\n  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)\n    ac_prev=srcdir ;;\n  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)\n    srcdir=$ac_optarg ;;\n\n  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \\\n  | --syscon | --sysco | --sysc | --sys | --sy)\n    ac_prev=sysconfdir ;;\n  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \\\n  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)\n    sysconfdir=$ac_optarg ;;\n\n  -target | --target | --targe | --targ | --tar | --ta | --t)\n    ac_prev=target_alias ;;\n  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)\n    target_alias=$ac_optarg ;;\n\n  -v | -verbose | --verbose | --verbos | --verbo | --verb)\n    verbose=yes ;;\n\n  -version | --version | --versio | --versi | --vers | -V)\n    ac_init_version=: ;;\n\n  -with-* | --with-*)\n    ac_useropt=`expr \"x$ac_option\" : 'x-*with-\\([^=]*\\)'`\n    # Reject names that are not valid shell variable names.\n    expr \"x$ac_useropt\" : \".*[^-+._$as_cr_alnum]\" >/dev/null &&\n      as_fn_error $? \"invalid package name: $ac_useropt\"\n    ac_useropt_orig=$ac_useropt\n    ac_useropt=`$as_echo \"$ac_useropt\" | sed 's/[-+.]/_/g'`\n    case $ac_user_opts in\n      *\"\n\"with_$ac_useropt\"\n\"*) ;;\n      *) ac_unrecognized_opts=\"$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig\"\n\t ac_unrecognized_sep=', ';;\n    esac\n    eval with_$ac_useropt=\\$ac_optarg ;;\n\n  -without-* | --without-*)\n    ac_useropt=`expr \"x$ac_option\" : 'x-*without-\\(.*\\)'`\n    # Reject names that are not valid shell variable names.\n    expr \"x$ac_useropt\" : \".*[^-+._$as_cr_alnum]\" >/dev/null &&\n      as_fn_error $? \"invalid package name: $ac_useropt\"\n    ac_useropt_orig=$ac_useropt\n    ac_useropt=`$as_echo \"$ac_useropt\" | sed 's/[-+.]/_/g'`\n    case $ac_user_opts in\n      *\"\n\"with_$ac_useropt\"\n\"*) ;;\n      *) ac_unrecognized_opts=\"$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig\"\n\t ac_unrecognized_sep=', ';;\n    esac\n    eval with_$ac_useropt=no ;;\n\n  --x)\n    # Obsolete; use --with-x.\n    with_x=yes ;;\n\n  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \\\n  | --x-incl | --x-inc | --x-in | --x-i)\n    ac_prev=x_includes ;;\n  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \\\n  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)\n    x_includes=$ac_optarg ;;\n\n  -x-libraries | --x-libraries | --x-librarie | --x-librari \\\n  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)\n    ac_prev=x_libraries ;;\n  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \\\n  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)\n    x_libraries=$ac_optarg ;;\n\n  -*) as_fn_error $? \"unrecognized option: \\`$ac_option'\nTry \\`$0 --help' for more information\"\n    ;;\n\n  *=*)\n    ac_envvar=`expr \"x$ac_option\" : 'x\\([^=]*\\)='`\n    # Reject names that are not valid shell variable names.\n    case $ac_envvar in #(\n      '' | [0-9]* | *[!_$as_cr_alnum]* )\n      as_fn_error $? \"invalid variable name: \\`$ac_envvar'\" ;;\n    esac\n    eval $ac_envvar=\\$ac_optarg\n    export $ac_envvar ;;\n\n  *)\n    # FIXME: should be removed in autoconf 3.0.\n    $as_echo \"$as_me: WARNING: you should use --build, --host, --target\" >&2\n    expr \"x$ac_option\" : \".*[^-._$as_cr_alnum]\" >/dev/null &&\n      $as_echo \"$as_me: WARNING: invalid host type: $ac_option\" >&2\n    : \"${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}\"\n    ;;\n\n  esac\ndone\n\nif test -n \"$ac_prev\"; then\n  ac_option=--`echo $ac_prev | sed 's/_/-/g'`\n  as_fn_error $? \"missing argument to $ac_option\"\nfi\n\nif test -n \"$ac_unrecognized_opts\"; then\n  case $enable_option_checking in\n    no) ;;\n    fatal) as_fn_error $? \"unrecognized options: $ac_unrecognized_opts\" ;;\n    *)     $as_echo \"$as_me: WARNING: unrecognized options: $ac_unrecognized_opts\" >&2 ;;\n  esac\nfi\n\n# Check all directory arguments for consistency.\nfor ac_var in\texec_prefix prefix bindir sbindir libexecdir datarootdir \\\n\t\tdatadir sysconfdir sharedstatedir localstatedir includedir \\\n\t\toldincludedir docdir infodir htmldir dvidir pdfdir psdir \\\n\t\tlibdir localedir mandir runstatedir\ndo\n  eval ac_val=\\$$ac_var\n  # Remove trailing slashes.\n  case $ac_val in\n    */ )\n      ac_val=`expr \"X$ac_val\" : 'X\\(.*[^/]\\)' \\| \"X$ac_val\" : 'X\\(.*\\)'`\n      eval $ac_var=\\$ac_val;;\n  esac\n  # Be sure to have absolute directory names.\n  case $ac_val in\n    [\\\\/$]* | ?:[\\\\/]* )  continue;;\n    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;\n  esac\n  as_fn_error $? \"expected an absolute directory name for --$ac_var: $ac_val\"\ndone\n\n# There might be people who depend on the old broken behavior: `$host'\n# used to hold the argument of --host etc.\n# FIXME: To remove some day.\nbuild=$build_alias\nhost=$host_alias\ntarget=$target_alias\n\n# FIXME: To remove some day.\nif test \"x$host_alias\" != x; then\n  if test \"x$build_alias\" = x; then\n    cross_compiling=maybe\n  elif test \"x$build_alias\" != \"x$host_alias\"; then\n    cross_compiling=yes\n  fi\nfi\n\nac_tool_prefix=\ntest -n \"$host_alias\" && ac_tool_prefix=$host_alias-\n\ntest \"$silent\" = yes && exec 6>/dev/null\n\n\nac_pwd=`pwd` && test -n \"$ac_pwd\" &&\nac_ls_di=`ls -di .` &&\nac_pwd_ls_di=`cd \"$ac_pwd\" && ls -di .` ||\n  as_fn_error $? \"working directory cannot be determined\"\ntest \"X$ac_ls_di\" = \"X$ac_pwd_ls_di\" ||\n  as_fn_error $? \"pwd does not report name of working directory\"\n\n\n# Find the source files, if location was not specified.\nif test -z \"$srcdir\"; then\n  ac_srcdir_defaulted=yes\n  # Try the directory containing this script, then the parent directory.\n  ac_confdir=`$as_dirname -- \"$as_myself\" ||\n$as_expr X\"$as_myself\" : 'X\\(.*[^/]\\)//*[^/][^/]*/*$' \\| \\\n\t X\"$as_myself\" : 'X\\(//\\)[^/]' \\| \\\n\t X\"$as_myself\" : 'X\\(//\\)$' \\| \\\n\t X\"$as_myself\" : 'X\\(/\\)' \\| . 2>/dev/null ||\n$as_echo X\"$as_myself\" |\n    sed '/^X\\(.*[^/]\\)\\/\\/*[^/][^/]*\\/*$/{\n\t    s//\\1/\n\t    q\n\t  }\n\t  /^X\\(\\/\\/\\)[^/].*/{\n\t    s//\\1/\n\t    q\n\t  }\n\t  /^X\\(\\/\\/\\)$/{\n\t    s//\\1/\n\t    q\n\t  }\n\t  /^X\\(\\/\\).*/{\n\t    s//\\1/\n\t    q\n\t  }\n\t  s/.*/./; q'`\n  srcdir=$ac_confdir\n  if test ! -r \"$srcdir/$ac_unique_file\"; then\n    srcdir=..\n  fi\nelse\n  ac_srcdir_defaulted=no\nfi\nif test ! -r \"$srcdir/$ac_unique_file\"; then\n  test \"$ac_srcdir_defaulted\" = yes && srcdir=\"$ac_confdir or ..\"\n  as_fn_error $? \"cannot find sources ($ac_unique_file) in $srcdir\"\nfi\nac_msg=\"sources are in $srcdir, but \\`cd $srcdir' does not work\"\nac_abs_confdir=`(\n\tcd \"$srcdir\" && test -r \"./$ac_unique_file\" || as_fn_error $? \"$ac_msg\"\n\tpwd)`\n# When building in place, set srcdir=.\nif test \"$ac_abs_confdir\" = \"$ac_pwd\"; then\n  srcdir=.\nfi\n# Remove unnecessary trailing slashes from srcdir.\n# Double slashes in file names in object file debugging info\n# mess up M-x gdb in Emacs.\ncase $srcdir in\n*/) srcdir=`expr \"X$srcdir\" : 'X\\(.*[^/]\\)' \\| \"X$srcdir\" : 'X\\(.*\\)'`;;\nesac\nfor ac_var in $ac_precious_vars; do\n  eval ac_env_${ac_var}_set=\\${${ac_var}+set}\n  eval ac_env_${ac_var}_value=\\$${ac_var}\n  eval ac_cv_env_${ac_var}_set=\\${${ac_var}+set}\n  eval ac_cv_env_${ac_var}_value=\\$${ac_var}\ndone\n\n#\n# Report the --help message.\n#\nif test \"$ac_init_help\" = \"long\"; then\n  # Omit some internal or obsolete options to make the list less imposing.\n  # This message is too long to be a string in the A/UX 3.1 sh.\n  cat <<_ACEOF\n\\`configure' configures this package to adapt to many kinds of systems.\n\nUsage: $0 [OPTION]... [VAR=VALUE]...\n\nTo assign environment variables (e.g., CC, CFLAGS...), specify them as\nVAR=VALUE.  See below for descriptions of some of the useful variables.\n\nDefaults for the options are specified in brackets.\n\nConfiguration:\n  -h, --help              display this help and exit\n      --help=short        display options specific to this package\n      --help=recursive    display the short help of all the included packages\n  -V, --version           display version information and exit\n  -q, --quiet, --silent   do not print \\`checking ...' messages\n      --cache-file=FILE   cache test results in FILE [disabled]\n  -C, --config-cache      alias for \\`--cache-file=config.cache'\n  -n, --no-create         do not create output files\n      --srcdir=DIR        find the sources in DIR [configure dir or \\`..']\n\nInstallation directories:\n  --prefix=PREFIX         install architecture-independent files in PREFIX\n                          [$ac_default_prefix]\n  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX\n                          [PREFIX]\n\nBy default, \\`make install' will install all the files in\n\\`$ac_default_prefix/bin', \\`$ac_default_prefix/lib' etc.  You can specify\nan installation prefix other than \\`$ac_default_prefix' using \\`--prefix',\nfor instance \\`--prefix=\\$HOME'.\n\nFor better control, use the options below.\n\nFine tuning of the installation directories:\n  --bindir=DIR            user executables [EPREFIX/bin]\n  --sbindir=DIR           system admin executables [EPREFIX/sbin]\n  --libexecdir=DIR        program executables [EPREFIX/libexec]\n  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]\n  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]\n  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]\n  --runstatedir=DIR       modifiable per-process data [LOCALSTATEDIR/run]\n  --libdir=DIR            object code libraries [EPREFIX/lib]\n  --includedir=DIR        C header files [PREFIX/include]\n  --oldincludedir=DIR     C header files for non-gcc [/usr/include]\n  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]\n  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]\n  --infodir=DIR           info documentation [DATAROOTDIR/info]\n  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]\n  --mandir=DIR            man documentation [DATAROOTDIR/man]\n  --docdir=DIR            documentation root [DATAROOTDIR/doc/PACKAGE]\n  --htmldir=DIR           html documentation [DOCDIR]\n  --dvidir=DIR            dvi documentation [DOCDIR]\n  --pdfdir=DIR            pdf documentation [DOCDIR]\n  --psdir=DIR             ps documentation [DOCDIR]\n_ACEOF\n\n  cat <<\\_ACEOF\n\nSystem types:\n  --build=BUILD     configure for building on BUILD [guessed]\n  --host=HOST       cross-compile to build programs to run on HOST [BUILD]\n  --target=TARGET   configure for building compilers for TARGET [HOST]\n_ACEOF\nfi\n\nif test -n \"$ac_init_help\"; then\n\n  cat <<\\_ACEOF\n\nOptional Features:\n  --disable-option-checking  ignore unrecognized --enable/--with options\n  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)\n  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]\n  --enable-debug-output   Enable debug output [no]\n  --enable-cxx            Enable C++ bindings [no]\n  --enable-mac-debug      Enable Mac debug [no]\n  --enable-mac-universal  Build Mac universal binaries [yes]\n  --enable-shared[=PKGS]  build shared libraries [default=yes]\n  --enable-static[=PKGS]  build static libraries [default=yes]\n  --enable-fast-install[=PKGS]\n                          optimize for fast installation [default=yes]\n  --disable-libtool-lock  avoid locking (might break parallel builds)\n\nOptional Packages:\n  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]\n  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)\n  --with-alsa             Enable support for ALSA [autodetect]\n  --with-jack             Enable support for JACK [autodetect]\n  --with-oss              Enable support for OSS [autodetect]\n  --with-asihpi           Enable support for ASIHPI [autodetect]\n  --with-winapi           Select Windows API support\n                          ([wmme|directx|asio|wasapi|wdmks][,...]) [wmme]\n  --with-asiodir          ASIO directory [/usr/local/asiosdk2]\n  --with-dxdir            DirectX directory [/usr/local/dx7sdk]\n\n  --with-pic[=PKGS]       try to use only PIC/non-PIC objects [default=use\n                          both]\n  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]\n  --with-sysroot=DIR Search for dependent libraries within DIR\n                        (or the compiler's sysroot if not specified).\n\nSome influential environment variables:\n  CC          C compiler command\n  CFLAGS      C compiler flags\n  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a\n              nonstandard directory <lib dir>\n  LIBS        libraries to pass to the linker, e.g. -l<library>\n  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if\n              you have headers in a nonstandard directory <include dir>\n  CXX         C++ compiler command\n  CXXFLAGS    C++ compiler flags\n  CPP         C preprocessor\n  CXXCPP      C++ preprocessor\n  PKG_CONFIG  path to pkg-config utility\n  PKG_CONFIG_PATH\n              directories to add to pkg-config's search path\n  PKG_CONFIG_LIBDIR\n              path overriding pkg-config's built-in search path\n  JACK_CFLAGS C compiler flags for JACK, overriding pkg-config\n  JACK_LIBS   linker flags for JACK, overriding pkg-config\n\nUse these variables to override the choices made by `configure' or to help\nit to find libraries and programs with nonstandard names/locations.\n\nReport bugs to the package provider.\n_ACEOF\nac_status=$?\nfi\n\nif test \"$ac_init_help\" = \"recursive\"; then\n  # If there are subdirs, report their specific --help.\n  for ac_dir in : $ac_subdirs_all; do test \"x$ac_dir\" = x: && continue\n    test -d \"$ac_dir\" ||\n      { cd \"$srcdir\" && ac_pwd=`pwd` && srcdir=. && test -d \"$ac_dir\"; } ||\n      continue\n    ac_builddir=.\n\ncase \"$ac_dir\" in\n.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;\n*)\n  ac_dir_suffix=/`$as_echo \"$ac_dir\" | sed 's|^\\.[\\\\/]||'`\n  # A \"..\" for each directory in $ac_dir_suffix.\n  ac_top_builddir_sub=`$as_echo \"$ac_dir_suffix\" | sed 's|/[^\\\\/]*|/..|g;s|/||'`\n  case $ac_top_builddir_sub in\n  \"\") ac_top_builddir_sub=. ac_top_build_prefix= ;;\n  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;\n  esac ;;\nesac\nac_abs_top_builddir=$ac_pwd\nac_abs_builddir=$ac_pwd$ac_dir_suffix\n# for backward compatibility:\nac_top_builddir=$ac_top_build_prefix\n\ncase $srcdir in\n  .)  # We are building in place.\n    ac_srcdir=.\n    ac_top_srcdir=$ac_top_builddir_sub\n    ac_abs_top_srcdir=$ac_pwd ;;\n  [\\\\/]* | ?:[\\\\/]* )  # Absolute name.\n    ac_srcdir=$srcdir$ac_dir_suffix;\n    ac_top_srcdir=$srcdir\n    ac_abs_top_srcdir=$srcdir ;;\n  *) # Relative name.\n    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix\n    ac_top_srcdir=$ac_top_build_prefix$srcdir\n    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;\nesac\nac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix\n\n    cd \"$ac_dir\" || { ac_status=$?; continue; }\n    # Check for guested configure.\n    if test -f \"$ac_srcdir/configure.gnu\"; then\n      echo &&\n      $SHELL \"$ac_srcdir/configure.gnu\" --help=recursive\n    elif test -f \"$ac_srcdir/configure\"; then\n      echo &&\n      $SHELL \"$ac_srcdir/configure\" --help=recursive\n    else\n      $as_echo \"$as_me: WARNING: no configuration information is in $ac_dir\" >&2\n    fi || ac_status=$?\n    cd \"$ac_pwd\" || { ac_status=$?; break; }\n  done\nfi\n\ntest -n \"$ac_init_help\" && exit $ac_status\nif $ac_init_version; then\n  cat <<\\_ACEOF\nconfigure\ngenerated by GNU Autoconf 2.69\n\nCopyright (C) 2012 Free Software Foundation, Inc.\nThis configure script is free software; the Free Software Foundation\ngives unlimited permission to copy, distribute and modify it.\n_ACEOF\n  exit\nfi\n\n## ------------------------ ##\n## Autoconf initialization. ##\n## ------------------------ ##\n\n# ac_fn_c_try_compile LINENO\n# --------------------------\n# Try to compile conftest.$ac_ext, and return whether this succeeded.\nac_fn_c_try_compile ()\n{\n  as_lineno=${as_lineno-\"$1\"} as_lineno_stack=as_lineno_stack=$as_lineno_stack\n  rm -f conftest.$ac_objext\n  if { { ac_try=\"$ac_compile\"\ncase \"(($ac_try\" in\n  *\\\"* | *\\`* | *\\\\*) ac_try_echo=\\$ac_try;;\n  *) ac_try_echo=$ac_try;;\nesac\neval ac_try_echo=\"\\\"\\$as_me:${as_lineno-$LINENO}: $ac_try_echo\\\"\"\n$as_echo \"$ac_try_echo\"; } >&5\n  (eval \"$ac_compile\") 2>conftest.err\n  ac_status=$?\n  if test -s conftest.err; then\n    grep -v '^ *+' conftest.err >conftest.er1\n    cat conftest.er1 >&5\n    mv -f conftest.er1 conftest.err\n  fi\n  $as_echo \"$as_me:${as_lineno-$LINENO}: \\$? = $ac_status\" >&5\n  test $ac_status = 0; } && {\n\t test -z \"$ac_c_werror_flag\" ||\n\t test ! -s conftest.err\n       } && test -s conftest.$ac_objext; then :\n  ac_retval=0\nelse\n  $as_echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\n\tac_retval=1\nfi\n  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno\n  as_fn_set_status $ac_retval\n\n} # ac_fn_c_try_compile\n\n# ac_fn_cxx_try_compile LINENO\n# ----------------------------\n# Try to compile conftest.$ac_ext, and return whether this succeeded.\nac_fn_cxx_try_compile ()\n{\n  as_lineno=${as_lineno-\"$1\"} as_lineno_stack=as_lineno_stack=$as_lineno_stack\n  rm -f conftest.$ac_objext\n  if { { ac_try=\"$ac_compile\"\ncase \"(($ac_try\" in\n  *\\\"* | *\\`* | *\\\\*) ac_try_echo=\\$ac_try;;\n  *) ac_try_echo=$ac_try;;\nesac\neval ac_try_echo=\"\\\"\\$as_me:${as_lineno-$LINENO}: $ac_try_echo\\\"\"\n$as_echo \"$ac_try_echo\"; } >&5\n  (eval \"$ac_compile\") 2>conftest.err\n  ac_status=$?\n  if test -s conftest.err; then\n    grep -v '^ *+' conftest.err >conftest.er1\n    cat conftest.er1 >&5\n    mv -f conftest.er1 conftest.err\n  fi\n  $as_echo \"$as_me:${as_lineno-$LINENO}: \\$? = $ac_status\" >&5\n  test $ac_status = 0; } && {\n\t test -z \"$ac_cxx_werror_flag\" ||\n\t test ! -s conftest.err\n       } && test -s conftest.$ac_objext; then :\n  ac_retval=0\nelse\n  $as_echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\n\tac_retval=1\nfi\n  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno\n  as_fn_set_status $ac_retval\n\n} # ac_fn_cxx_try_compile\n\n# ac_fn_c_try_link LINENO\n# -----------------------\n# Try to link conftest.$ac_ext, and return whether this succeeded.\nac_fn_c_try_link ()\n{\n  as_lineno=${as_lineno-\"$1\"} as_lineno_stack=as_lineno_stack=$as_lineno_stack\n  rm -f conftest.$ac_objext conftest$ac_exeext\n  if { { ac_try=\"$ac_link\"\ncase \"(($ac_try\" in\n  *\\\"* | *\\`* | *\\\\*) ac_try_echo=\\$ac_try;;\n  *) ac_try_echo=$ac_try;;\nesac\neval ac_try_echo=\"\\\"\\$as_me:${as_lineno-$LINENO}: $ac_try_echo\\\"\"\n$as_echo \"$ac_try_echo\"; } >&5\n  (eval \"$ac_link\") 2>conftest.err\n  ac_status=$?\n  if test -s conftest.err; then\n    grep -v '^ *+' conftest.err >conftest.er1\n    cat conftest.er1 >&5\n    mv -f conftest.er1 conftest.err\n  fi\n  $as_echo \"$as_me:${as_lineno-$LINENO}: \\$? = $ac_status\" >&5\n  test $ac_status = 0; } && {\n\t test -z \"$ac_c_werror_flag\" ||\n\t test ! -s conftest.err\n       } && test -s conftest$ac_exeext && {\n\t test \"$cross_compiling\" = yes ||\n\t test -x conftest$ac_exeext\n       }; then :\n  ac_retval=0\nelse\n  $as_echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\n\tac_retval=1\nfi\n  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information\n  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would\n  # interfere with the next link command; also delete a directory that is\n  # left behind by Apple's compiler.  We do this before executing the actions.\n  rm -rf conftest.dSYM conftest_ipa8_conftest.oo\n  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno\n  as_fn_set_status $ac_retval\n\n} # ac_fn_c_try_link\n\n# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES\n# -------------------------------------------------------\n# Tests whether HEADER exists and can be compiled using the include files in\n# INCLUDES, setting the cache variable VAR accordingly.\nac_fn_c_check_header_compile ()\n{\n  as_lineno=${as_lineno-\"$1\"} as_lineno_stack=as_lineno_stack=$as_lineno_stack\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $2\" >&5\n$as_echo_n \"checking for $2... \" >&6; }\nif eval \\${$3+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n$4\n#include <$2>\n_ACEOF\nif ac_fn_c_try_compile \"$LINENO\"; then :\n  eval \"$3=yes\"\nelse\n  eval \"$3=no\"\nfi\nrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext\nfi\neval ac_res=\\$$3\n\t       { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_res\" >&5\n$as_echo \"$ac_res\" >&6; }\n  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno\n\n} # ac_fn_c_check_header_compile\n\n# ac_fn_c_try_cpp LINENO\n# ----------------------\n# Try to preprocess conftest.$ac_ext, and return whether this succeeded.\nac_fn_c_try_cpp ()\n{\n  as_lineno=${as_lineno-\"$1\"} as_lineno_stack=as_lineno_stack=$as_lineno_stack\n  if { { ac_try=\"$ac_cpp conftest.$ac_ext\"\ncase \"(($ac_try\" in\n  *\\\"* | *\\`* | *\\\\*) ac_try_echo=\\$ac_try;;\n  *) ac_try_echo=$ac_try;;\nesac\neval ac_try_echo=\"\\\"\\$as_me:${as_lineno-$LINENO}: $ac_try_echo\\\"\"\n$as_echo \"$ac_try_echo\"; } >&5\n  (eval \"$ac_cpp conftest.$ac_ext\") 2>conftest.err\n  ac_status=$?\n  if test -s conftest.err; then\n    grep -v '^ *+' conftest.err >conftest.er1\n    cat conftest.er1 >&5\n    mv -f conftest.er1 conftest.err\n  fi\n  $as_echo \"$as_me:${as_lineno-$LINENO}: \\$? = $ac_status\" >&5\n  test $ac_status = 0; } > conftest.i && {\n\t test -z \"$ac_c_preproc_warn_flag$ac_c_werror_flag\" ||\n\t test ! -s conftest.err\n       }; then :\n  ac_retval=0\nelse\n  $as_echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\n    ac_retval=1\nfi\n  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno\n  as_fn_set_status $ac_retval\n\n} # ac_fn_c_try_cpp\n\n# ac_fn_c_try_run LINENO\n# ----------------------\n# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes\n# that executables *can* be run.\nac_fn_c_try_run ()\n{\n  as_lineno=${as_lineno-\"$1\"} as_lineno_stack=as_lineno_stack=$as_lineno_stack\n  if { { ac_try=\"$ac_link\"\ncase \"(($ac_try\" in\n  *\\\"* | *\\`* | *\\\\*) ac_try_echo=\\$ac_try;;\n  *) ac_try_echo=$ac_try;;\nesac\neval ac_try_echo=\"\\\"\\$as_me:${as_lineno-$LINENO}: $ac_try_echo\\\"\"\n$as_echo \"$ac_try_echo\"; } >&5\n  (eval \"$ac_link\") 2>&5\n  ac_status=$?\n  $as_echo \"$as_me:${as_lineno-$LINENO}: \\$? = $ac_status\" >&5\n  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'\n  { { case \"(($ac_try\" in\n  *\\\"* | *\\`* | *\\\\*) ac_try_echo=\\$ac_try;;\n  *) ac_try_echo=$ac_try;;\nesac\neval ac_try_echo=\"\\\"\\$as_me:${as_lineno-$LINENO}: $ac_try_echo\\\"\"\n$as_echo \"$ac_try_echo\"; } >&5\n  (eval \"$ac_try\") 2>&5\n  ac_status=$?\n  $as_echo \"$as_me:${as_lineno-$LINENO}: \\$? = $ac_status\" >&5\n  test $ac_status = 0; }; }; then :\n  ac_retval=0\nelse\n  $as_echo \"$as_me: program exited with status $ac_status\" >&5\n       $as_echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\n       ac_retval=$ac_status\nfi\n  rm -rf conftest.dSYM conftest_ipa8_conftest.oo\n  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno\n  as_fn_set_status $ac_retval\n\n} # ac_fn_c_try_run\n\n# ac_fn_c_check_func LINENO FUNC VAR\n# ----------------------------------\n# Tests whether FUNC exists, setting the cache variable VAR accordingly\nac_fn_c_check_func ()\n{\n  as_lineno=${as_lineno-\"$1\"} as_lineno_stack=as_lineno_stack=$as_lineno_stack\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $2\" >&5\n$as_echo_n \"checking for $2... \" >&6; }\nif eval \\${$3+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n/* Define $2 to an innocuous variant, in case <limits.h> declares $2.\n   For example, HP-UX 11i <limits.h> declares gettimeofday.  */\n#define $2 innocuous_$2\n\n/* System header to define __stub macros and hopefully few prototypes,\n    which can conflict with char $2 (); below.\n    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since\n    <limits.h> exists even on freestanding compilers.  */\n\n#ifdef __STDC__\n# include <limits.h>\n#else\n# include <assert.h>\n#endif\n\n#undef $2\n\n/* Override any GCC internal prototype to avoid an error.\n   Use char because int might match the return type of a GCC\n   builtin and then its argument prototype would still apply.  */\n#ifdef __cplusplus\nextern \"C\"\n#endif\nchar $2 ();\n/* The GNU C library defines this for functions which it implements\n    to always fail with ENOSYS.  Some functions are actually named\n    something starting with __ and the normal name is an alias.  */\n#if defined __stub_$2 || defined __stub___$2\nchoke me\n#endif\n\nint\nmain ()\n{\nreturn $2 ();\n  ;\n  return 0;\n}\n_ACEOF\nif ac_fn_c_try_link \"$LINENO\"; then :\n  eval \"$3=yes\"\nelse\n  eval \"$3=no\"\nfi\nrm -f core conftest.err conftest.$ac_objext \\\n    conftest$ac_exeext conftest.$ac_ext\nfi\neval ac_res=\\$$3\n\t       { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_res\" >&5\n$as_echo \"$ac_res\" >&6; }\n  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno\n\n} # ac_fn_c_check_func\n\n# ac_fn_cxx_try_cpp LINENO\n# ------------------------\n# Try to preprocess conftest.$ac_ext, and return whether this succeeded.\nac_fn_cxx_try_cpp ()\n{\n  as_lineno=${as_lineno-\"$1\"} as_lineno_stack=as_lineno_stack=$as_lineno_stack\n  if { { ac_try=\"$ac_cpp conftest.$ac_ext\"\ncase \"(($ac_try\" in\n  *\\\"* | *\\`* | *\\\\*) ac_try_echo=\\$ac_try;;\n  *) ac_try_echo=$ac_try;;\nesac\neval ac_try_echo=\"\\\"\\$as_me:${as_lineno-$LINENO}: $ac_try_echo\\\"\"\n$as_echo \"$ac_try_echo\"; } >&5\n  (eval \"$ac_cpp conftest.$ac_ext\") 2>conftest.err\n  ac_status=$?\n  if test -s conftest.err; then\n    grep -v '^ *+' conftest.err >conftest.er1\n    cat conftest.er1 >&5\n    mv -f conftest.er1 conftest.err\n  fi\n  $as_echo \"$as_me:${as_lineno-$LINENO}: \\$? = $ac_status\" >&5\n  test $ac_status = 0; } > conftest.i && {\n\t test -z \"$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag\" ||\n\t test ! -s conftest.err\n       }; then :\n  ac_retval=0\nelse\n  $as_echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\n    ac_retval=1\nfi\n  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno\n  as_fn_set_status $ac_retval\n\n} # ac_fn_cxx_try_cpp\n\n# ac_fn_cxx_try_link LINENO\n# -------------------------\n# Try to link conftest.$ac_ext, and return whether this succeeded.\nac_fn_cxx_try_link ()\n{\n  as_lineno=${as_lineno-\"$1\"} as_lineno_stack=as_lineno_stack=$as_lineno_stack\n  rm -f conftest.$ac_objext conftest$ac_exeext\n  if { { ac_try=\"$ac_link\"\ncase \"(($ac_try\" in\n  *\\\"* | *\\`* | *\\\\*) ac_try_echo=\\$ac_try;;\n  *) ac_try_echo=$ac_try;;\nesac\neval ac_try_echo=\"\\\"\\$as_me:${as_lineno-$LINENO}: $ac_try_echo\\\"\"\n$as_echo \"$ac_try_echo\"; } >&5\n  (eval \"$ac_link\") 2>conftest.err\n  ac_status=$?\n  if test -s conftest.err; then\n    grep -v '^ *+' conftest.err >conftest.er1\n    cat conftest.er1 >&5\n    mv -f conftest.er1 conftest.err\n  fi\n  $as_echo \"$as_me:${as_lineno-$LINENO}: \\$? = $ac_status\" >&5\n  test $ac_status = 0; } && {\n\t test -z \"$ac_cxx_werror_flag\" ||\n\t test ! -s conftest.err\n       } && test -s conftest$ac_exeext && {\n\t test \"$cross_compiling\" = yes ||\n\t test -x conftest$ac_exeext\n       }; then :\n  ac_retval=0\nelse\n  $as_echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\n\tac_retval=1\nfi\n  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information\n  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would\n  # interfere with the next link command; also delete a directory that is\n  # left behind by Apple's compiler.  We do this before executing the actions.\n  rm -rf conftest.dSYM conftest_ipa8_conftest.oo\n  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno\n  as_fn_set_status $ac_retval\n\n} # ac_fn_cxx_try_link\n\n# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES\n# -------------------------------------------------------\n# Tests whether HEADER exists, giving a warning if it cannot be compiled using\n# the include files in INCLUDES and setting the cache variable VAR\n# accordingly.\nac_fn_c_check_header_mongrel ()\n{\n  as_lineno=${as_lineno-\"$1\"} as_lineno_stack=as_lineno_stack=$as_lineno_stack\n  if eval \\${$3+:} false; then :\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $2\" >&5\n$as_echo_n \"checking for $2... \" >&6; }\nif eval \\${$3+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nfi\neval ac_res=\\$$3\n\t       { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_res\" >&5\n$as_echo \"$ac_res\" >&6; }\nelse\n  # Is the header compilable?\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking $2 usability\" >&5\n$as_echo_n \"checking $2 usability... \" >&6; }\ncat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n$4\n#include <$2>\n_ACEOF\nif ac_fn_c_try_compile \"$LINENO\"; then :\n  ac_header_compiler=yes\nelse\n  ac_header_compiler=no\nfi\nrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler\" >&5\n$as_echo \"$ac_header_compiler\" >&6; }\n\n# Is the header present?\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking $2 presence\" >&5\n$as_echo_n \"checking $2 presence... \" >&6; }\ncat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n#include <$2>\n_ACEOF\nif ac_fn_c_try_cpp \"$LINENO\"; then :\n  ac_header_preproc=yes\nelse\n  ac_header_preproc=no\nfi\nrm -f conftest.err conftest.i conftest.$ac_ext\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc\" >&5\n$as_echo \"$ac_header_preproc\" >&6; }\n\n# So?  What about this header?\ncase $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((\n  yes:no: )\n    { $as_echo \"$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!\" >&5\n$as_echo \"$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!\" >&2;}\n    { $as_echo \"$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result\" >&5\n$as_echo \"$as_me: WARNING: $2: proceeding with the compiler's result\" >&2;}\n    ;;\n  no:yes:* )\n    { $as_echo \"$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled\" >&5\n$as_echo \"$as_me: WARNING: $2: present but cannot be compiled\" >&2;}\n    { $as_echo \"$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?\" >&5\n$as_echo \"$as_me: WARNING: $2:     check for missing prerequisite headers?\" >&2;}\n    { $as_echo \"$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation\" >&5\n$as_echo \"$as_me: WARNING: $2: see the Autoconf documentation\" >&2;}\n    { $as_echo \"$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \\\"Present But Cannot Be Compiled\\\"\" >&5\n$as_echo \"$as_me: WARNING: $2:     section \\\"Present But Cannot Be Compiled\\\"\" >&2;}\n    { $as_echo \"$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result\" >&5\n$as_echo \"$as_me: WARNING: $2: proceeding with the compiler's result\" >&2;}\n    ;;\nesac\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $2\" >&5\n$as_echo_n \"checking for $2... \" >&6; }\nif eval \\${$3+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  eval \"$3=\\$ac_header_compiler\"\nfi\neval ac_res=\\$$3\n\t       { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_res\" >&5\n$as_echo \"$ac_res\" >&6; }\nfi\n  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno\n\n} # ac_fn_c_check_header_mongrel\n\n# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES\n# --------------------------------------------\n# Tries to find the compile-time value of EXPR in a program that includes\n# INCLUDES, setting VAR accordingly. Returns whether the value could be\n# computed\nac_fn_c_compute_int ()\n{\n  as_lineno=${as_lineno-\"$1\"} as_lineno_stack=as_lineno_stack=$as_lineno_stack\n  if test \"$cross_compiling\" = yes; then\n    # Depending upon the size, compute the lo and hi bounds.\ncat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n$4\nint\nmain ()\n{\nstatic int test_array [1 - 2 * !(($2) >= 0)];\ntest_array [0] = 0;\nreturn test_array [0];\n\n  ;\n  return 0;\n}\n_ACEOF\nif ac_fn_c_try_compile \"$LINENO\"; then :\n  ac_lo=0 ac_mid=0\n  while :; do\n    cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n$4\nint\nmain ()\n{\nstatic int test_array [1 - 2 * !(($2) <= $ac_mid)];\ntest_array [0] = 0;\nreturn test_array [0];\n\n  ;\n  return 0;\n}\n_ACEOF\nif ac_fn_c_try_compile \"$LINENO\"; then :\n  ac_hi=$ac_mid; break\nelse\n  as_fn_arith $ac_mid + 1 && ac_lo=$as_val\n\t\t\tif test $ac_lo -le $ac_mid; then\n\t\t\t  ac_lo= ac_hi=\n\t\t\t  break\n\t\t\tfi\n\t\t\tas_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val\nfi\nrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext\n  done\nelse\n  cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n$4\nint\nmain ()\n{\nstatic int test_array [1 - 2 * !(($2) < 0)];\ntest_array [0] = 0;\nreturn test_array [0];\n\n  ;\n  return 0;\n}\n_ACEOF\nif ac_fn_c_try_compile \"$LINENO\"; then :\n  ac_hi=-1 ac_mid=-1\n  while :; do\n    cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n$4\nint\nmain ()\n{\nstatic int test_array [1 - 2 * !(($2) >= $ac_mid)];\ntest_array [0] = 0;\nreturn test_array [0];\n\n  ;\n  return 0;\n}\n_ACEOF\nif ac_fn_c_try_compile \"$LINENO\"; then :\n  ac_lo=$ac_mid; break\nelse\n  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val\n\t\t\tif test $ac_mid -le $ac_hi; then\n\t\t\t  ac_lo= ac_hi=\n\t\t\t  break\n\t\t\tfi\n\t\t\tas_fn_arith 2 '*' $ac_mid && ac_mid=$as_val\nfi\nrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext\n  done\nelse\n  ac_lo= ac_hi=\nfi\nrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext\nfi\nrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext\n# Binary search between lo and hi bounds.\nwhile test \"x$ac_lo\" != \"x$ac_hi\"; do\n  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val\n  cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n$4\nint\nmain ()\n{\nstatic int test_array [1 - 2 * !(($2) <= $ac_mid)];\ntest_array [0] = 0;\nreturn test_array [0];\n\n  ;\n  return 0;\n}\n_ACEOF\nif ac_fn_c_try_compile \"$LINENO\"; then :\n  ac_hi=$ac_mid\nelse\n  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val\nfi\nrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext\ndone\ncase $ac_lo in #((\n?*) eval \"$3=\\$ac_lo\"; ac_retval=0 ;;\n'') ac_retval=1 ;;\nesac\n  else\n    cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n$4\nstatic long int longval () { return $2; }\nstatic unsigned long int ulongval () { return $2; }\n#include <stdio.h>\n#include <stdlib.h>\nint\nmain ()\n{\n\n  FILE *f = fopen (\"conftest.val\", \"w\");\n  if (! f)\n    return 1;\n  if (($2) < 0)\n    {\n      long int i = longval ();\n      if (i != ($2))\n\treturn 1;\n      fprintf (f, \"%ld\", i);\n    }\n  else\n    {\n      unsigned long int i = ulongval ();\n      if (i != ($2))\n\treturn 1;\n      fprintf (f, \"%lu\", i);\n    }\n  /* Do not output a trailing newline, as this causes \\r\\n confusion\n     on some platforms.  */\n  return ferror (f) || fclose (f) != 0;\n\n  ;\n  return 0;\n}\n_ACEOF\nif ac_fn_c_try_run \"$LINENO\"; then :\n  echo >>conftest.val; read $3 <conftest.val; ac_retval=0\nelse\n  ac_retval=1\nfi\nrm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \\\n  conftest.$ac_objext conftest.beam conftest.$ac_ext\nrm -f conftest.val\n\n  fi\n  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno\n  as_fn_set_status $ac_retval\n\n} # ac_fn_c_compute_int\ncat >config.log <<_ACEOF\nThis file contains any messages produced by compilers while\nrunning configure, to aid debugging if configure makes a mistake.\n\nIt was created by $as_me, which was\ngenerated by GNU Autoconf 2.69.  Invocation command line was\n\n  $ $0 $@\n\n_ACEOF\nexec 5>>config.log\n{\ncat <<_ASUNAME\n## --------- ##\n## Platform. ##\n## --------- ##\n\nhostname = `(hostname || uname -n) 2>/dev/null | sed 1q`\nuname -m = `(uname -m) 2>/dev/null || echo unknown`\nuname -r = `(uname -r) 2>/dev/null || echo unknown`\nuname -s = `(uname -s) 2>/dev/null || echo unknown`\nuname -v = `(uname -v) 2>/dev/null || echo unknown`\n\n/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`\n/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`\n\n/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`\n/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`\n/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`\n/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`\n/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`\n/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`\n/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`\n\n_ASUNAME\n\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    $as_echo \"PATH: $as_dir\"\n  done\nIFS=$as_save_IFS\n\n} >&5\n\ncat >&5 <<_ACEOF\n\n\n## ----------- ##\n## Core tests. ##\n## ----------- ##\n\n_ACEOF\n\n\n# Keep a trace of the command line.\n# Strip out --no-create and --no-recursion so they do not pile up.\n# Strip out --silent because we don't want to record it for future runs.\n# Also quote any args containing shell meta-characters.\n# Make two passes to allow for proper duplicate-argument suppression.\nac_configure_args=\nac_configure_args0=\nac_configure_args1=\nac_must_keep_next=false\nfor ac_pass in 1 2\ndo\n  for ac_arg\n  do\n    case $ac_arg in\n    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;\n    -q | -quiet | --quiet | --quie | --qui | --qu | --q \\\n    | -silent | --silent | --silen | --sile | --sil)\n      continue ;;\n    *\\'*)\n      ac_arg=`$as_echo \"$ac_arg\" | sed \"s/'/'\\\\\\\\\\\\\\\\''/g\"` ;;\n    esac\n    case $ac_pass in\n    1) as_fn_append ac_configure_args0 \" '$ac_arg'\" ;;\n    2)\n      as_fn_append ac_configure_args1 \" '$ac_arg'\"\n      if test $ac_must_keep_next = true; then\n\tac_must_keep_next=false # Got value, back to normal.\n      else\n\tcase $ac_arg in\n\t  *=* | --config-cache | -C | -disable-* | --disable-* \\\n\t  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \\\n\t  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \\\n\t  | -with-* | --with-* | -without-* | --without-* | --x)\n\t    case \"$ac_configure_args0 \" in\n\t      \"$ac_configure_args1\"*\" '$ac_arg' \"* ) continue ;;\n\t    esac\n\t    ;;\n\t  -* ) ac_must_keep_next=true ;;\n\tesac\n      fi\n      as_fn_append ac_configure_args \" '$ac_arg'\"\n      ;;\n    esac\n  done\ndone\n{ ac_configure_args0=; unset ac_configure_args0;}\n{ ac_configure_args1=; unset ac_configure_args1;}\n\n# When interrupted or exit'd, cleanup temporary files, and complete\n# config.log.  We remove comments because anyway the quotes in there\n# would cause problems or look ugly.\n# WARNING: Use '\\'' to represent an apostrophe within the trap.\n# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.\ntrap 'exit_status=$?\n  # Save into config.log some information that might help in debugging.\n  {\n    echo\n\n    $as_echo \"## ---------------- ##\n## Cache variables. ##\n## ---------------- ##\"\n    echo\n    # The following way of writing the cache mishandles newlines in values,\n(\n  for ac_var in `(set) 2>&1 | sed -n '\\''s/^\\([a-zA-Z_][a-zA-Z0-9_]*\\)=.*/\\1/p'\\''`; do\n    eval ac_val=\\$$ac_var\n    case $ac_val in #(\n    *${as_nl}*)\n      case $ac_var in #(\n      *_cv_*) { $as_echo \"$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline\" >&5\n$as_echo \"$as_me: WARNING: cache variable $ac_var contains a newline\" >&2;} ;;\n      esac\n      case $ac_var in #(\n      _ | IFS | as_nl) ;; #(\n      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(\n      *) { eval $ac_var=; unset $ac_var;} ;;\n      esac ;;\n    esac\n  done\n  (set) 2>&1 |\n    case $as_nl`(ac_space='\\'' '\\''; set) 2>&1` in #(\n    *${as_nl}ac_space=\\ *)\n      sed -n \\\n\t\"s/'\\''/'\\''\\\\\\\\'\\'''\\''/g;\n\t  s/^\\\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\\\)=\\\\(.*\\\\)/\\\\1='\\''\\\\2'\\''/p\"\n      ;; #(\n    *)\n      sed -n \"/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p\"\n      ;;\n    esac |\n    sort\n)\n    echo\n\n    $as_echo \"## ----------------- ##\n## Output variables. ##\n## ----------------- ##\"\n    echo\n    for ac_var in $ac_subst_vars\n    do\n      eval ac_val=\\$$ac_var\n      case $ac_val in\n      *\\'\\''*) ac_val=`$as_echo \"$ac_val\" | sed \"s/'\\''/'\\''\\\\\\\\\\\\\\\\'\\'''\\''/g\"`;;\n      esac\n      $as_echo \"$ac_var='\\''$ac_val'\\''\"\n    done | sort\n    echo\n\n    if test -n \"$ac_subst_files\"; then\n      $as_echo \"## ------------------- ##\n## File substitutions. ##\n## ------------------- ##\"\n      echo\n      for ac_var in $ac_subst_files\n      do\n\teval ac_val=\\$$ac_var\n\tcase $ac_val in\n\t*\\'\\''*) ac_val=`$as_echo \"$ac_val\" | sed \"s/'\\''/'\\''\\\\\\\\\\\\\\\\'\\'''\\''/g\"`;;\n\tesac\n\t$as_echo \"$ac_var='\\''$ac_val'\\''\"\n      done | sort\n      echo\n    fi\n\n    if test -s confdefs.h; then\n      $as_echo \"## ----------- ##\n## confdefs.h. ##\n## ----------- ##\"\n      echo\n      cat confdefs.h\n      echo\n    fi\n    test \"$ac_signal\" != 0 &&\n      $as_echo \"$as_me: caught signal $ac_signal\"\n    $as_echo \"$as_me: exit $exit_status\"\n  } >&5\n  rm -f core *.core core.conftest.* &&\n    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&\n    exit $exit_status\n' 0\nfor ac_signal in 1 2 13 15; do\n  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal\ndone\nac_signal=0\n\n# confdefs.h avoids OS command line length limits that DEFS can exceed.\nrm -f -r conftest* confdefs.h\n\n$as_echo \"/* confdefs.h */\" > confdefs.h\n\n# Predefined preprocessor variables.\n\ncat >>confdefs.h <<_ACEOF\n#define PACKAGE_NAME \"$PACKAGE_NAME\"\n_ACEOF\n\ncat >>confdefs.h <<_ACEOF\n#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"\n_ACEOF\n\ncat >>confdefs.h <<_ACEOF\n#define PACKAGE_VERSION \"$PACKAGE_VERSION\"\n_ACEOF\n\ncat >>confdefs.h <<_ACEOF\n#define PACKAGE_STRING \"$PACKAGE_STRING\"\n_ACEOF\n\ncat >>confdefs.h <<_ACEOF\n#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"\n_ACEOF\n\ncat >>confdefs.h <<_ACEOF\n#define PACKAGE_URL \"$PACKAGE_URL\"\n_ACEOF\n\n\n# Let the site file select an alternate cache file if it wants to.\n# Prefer an explicitly selected file to automatically selected ones.\nac_site_file1=NONE\nac_site_file2=NONE\nif test -n \"$CONFIG_SITE\"; then\n  # We do not want a PATH search for config.site.\n  case $CONFIG_SITE in #((\n    -*)  ac_site_file1=./$CONFIG_SITE;;\n    */*) ac_site_file1=$CONFIG_SITE;;\n    *)   ac_site_file1=./$CONFIG_SITE;;\n  esac\nelif test \"x$prefix\" != xNONE; then\n  ac_site_file1=$prefix/share/config.site\n  ac_site_file2=$prefix/etc/config.site\nelse\n  ac_site_file1=$ac_default_prefix/share/config.site\n  ac_site_file2=$ac_default_prefix/etc/config.site\nfi\nfor ac_site_file in \"$ac_site_file1\" \"$ac_site_file2\"\ndo\n  test \"x$ac_site_file\" = xNONE && continue\n  if test /dev/null != \"$ac_site_file\" && test -r \"$ac_site_file\"; then\n    { $as_echo \"$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file\" >&5\n$as_echo \"$as_me: loading site script $ac_site_file\" >&6;}\n    sed 's/^/| /' \"$ac_site_file\" >&5\n    . \"$ac_site_file\" \\\n      || { { $as_echo \"$as_me:${as_lineno-$LINENO}: error: in \\`$ac_pwd':\" >&5\n$as_echo \"$as_me: error: in \\`$ac_pwd':\" >&2;}\nas_fn_error $? \"failed to load site script $ac_site_file\nSee \\`config.log' for more details\" \"$LINENO\" 5; }\n  fi\ndone\n\nif test -r \"$cache_file\"; then\n  # Some versions of bash will fail to source /dev/null (special files\n  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.\n  if test /dev/null != \"$cache_file\" && test -f \"$cache_file\"; then\n    { $as_echo \"$as_me:${as_lineno-$LINENO}: loading cache $cache_file\" >&5\n$as_echo \"$as_me: loading cache $cache_file\" >&6;}\n    case $cache_file in\n      [\\\\/]* | ?:[\\\\/]* ) . \"$cache_file\";;\n      *)                      . \"./$cache_file\";;\n    esac\n  fi\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: creating cache $cache_file\" >&5\n$as_echo \"$as_me: creating cache $cache_file\" >&6;}\n  >$cache_file\nfi\n\n# Check that the precious variables saved in the cache have kept the same\n# value.\nac_cache_corrupted=false\nfor ac_var in $ac_precious_vars; do\n  eval ac_old_set=\\$ac_cv_env_${ac_var}_set\n  eval ac_new_set=\\$ac_env_${ac_var}_set\n  eval ac_old_val=\\$ac_cv_env_${ac_var}_value\n  eval ac_new_val=\\$ac_env_${ac_var}_value\n  case $ac_old_set,$ac_new_set in\n    set,)\n      { $as_echo \"$as_me:${as_lineno-$LINENO}: error: \\`$ac_var' was set to \\`$ac_old_val' in the previous run\" >&5\n$as_echo \"$as_me: error: \\`$ac_var' was set to \\`$ac_old_val' in the previous run\" >&2;}\n      ac_cache_corrupted=: ;;\n    ,set)\n      { $as_echo \"$as_me:${as_lineno-$LINENO}: error: \\`$ac_var' was not set in the previous run\" >&5\n$as_echo \"$as_me: error: \\`$ac_var' was not set in the previous run\" >&2;}\n      ac_cache_corrupted=: ;;\n    ,);;\n    *)\n      if test \"x$ac_old_val\" != \"x$ac_new_val\"; then\n\t# differences in whitespace do not lead to failure.\n\tac_old_val_w=`echo x $ac_old_val`\n\tac_new_val_w=`echo x $ac_new_val`\n\tif test \"$ac_old_val_w\" != \"$ac_new_val_w\"; then\n\t  { $as_echo \"$as_me:${as_lineno-$LINENO}: error: \\`$ac_var' has changed since the previous run:\" >&5\n$as_echo \"$as_me: error: \\`$ac_var' has changed since the previous run:\" >&2;}\n\t  ac_cache_corrupted=:\n\telse\n\t  { $as_echo \"$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \\`$ac_var' since the previous run:\" >&5\n$as_echo \"$as_me: warning: ignoring whitespace changes in \\`$ac_var' since the previous run:\" >&2;}\n\t  eval $ac_var=\\$ac_old_val\n\tfi\n\t{ $as_echo \"$as_me:${as_lineno-$LINENO}:   former value:  \\`$ac_old_val'\" >&5\n$as_echo \"$as_me:   former value:  \\`$ac_old_val'\" >&2;}\n\t{ $as_echo \"$as_me:${as_lineno-$LINENO}:   current value: \\`$ac_new_val'\" >&5\n$as_echo \"$as_me:   current value: \\`$ac_new_val'\" >&2;}\n      fi;;\n  esac\n  # Pass precious variables to config.status.\n  if test \"$ac_new_set\" = set; then\n    case $ac_new_val in\n    *\\'*) ac_arg=$ac_var=`$as_echo \"$ac_new_val\" | sed \"s/'/'\\\\\\\\\\\\\\\\''/g\"` ;;\n    *) ac_arg=$ac_var=$ac_new_val ;;\n    esac\n    case \" $ac_configure_args \" in\n      *\" '$ac_arg' \"*) ;; # Avoid dups.  Use of quotes ensures accuracy.\n      *) as_fn_append ac_configure_args \" '$ac_arg'\" ;;\n    esac\n  fi\ndone\nif $ac_cache_corrupted; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: error: in \\`$ac_pwd':\" >&5\n$as_echo \"$as_me: error: in \\`$ac_pwd':\" >&2;}\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build\" >&5\n$as_echo \"$as_me: error: changes in the environment can compromise the build\" >&2;}\n  as_fn_error $? \"run \\`make distclean' and/or \\`rm $cache_file' and start over\" \"$LINENO\" 5\nfi\n## -------------------- ##\n## Main body of script. ##\n## -------------------- ##\n\nac_ext=c\nac_cpp='$CPP $CPPFLAGS'\nac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'\nac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'\nac_compiler_gnu=$ac_cv_c_compiler_gnu\n\n\n\nPAMAC_TEST_PROGRAM=\"\n  /* cdefs.h checks for supported architectures. */\n  #include <sys/cdefs.h>\n  int main() {\n      return 0;\n  }\n\"\n\nac_aux_dir=\nfor ac_dir in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"; do\n  if test -f \"$ac_dir/install-sh\"; then\n    ac_aux_dir=$ac_dir\n    ac_install_sh=\"$ac_aux_dir/install-sh -c\"\n    break\n  elif test -f \"$ac_dir/install.sh\"; then\n    ac_aux_dir=$ac_dir\n    ac_install_sh=\"$ac_aux_dir/install.sh -c\"\n    break\n  elif test -f \"$ac_dir/shtool\"; then\n    ac_aux_dir=$ac_dir\n    ac_install_sh=\"$ac_aux_dir/shtool install -c\"\n    break\n  fi\ndone\nif test -z \"$ac_aux_dir\"; then\n  as_fn_error $? \"cannot find install-sh, install.sh, or shtool in \\\"$srcdir\\\" \\\"$srcdir/..\\\" \\\"$srcdir/../..\\\"\" \"$LINENO\" 5\nfi\n\n# These three variables are undocumented and unsupported,\n# and are intended to be withdrawn in a future Autoconf release.\n# They can cause serious problems if a builder's source tree is in a directory\n# whose full name contains unusual characters.\nac_config_guess=\"$SHELL $ac_aux_dir/config.guess\"  # Please don't use this var.\nac_config_sub=\"$SHELL $ac_aux_dir/config.sub\"  # Please don't use this var.\nac_configure=\"$SHELL $ac_aux_dir/configure\"  # Please don't use this var.\n\n\n# Make sure we can run config.sub.\n$SHELL \"$ac_aux_dir/config.sub\" sun4 >/dev/null 2>&1 ||\n  as_fn_error $? \"cannot run $SHELL $ac_aux_dir/config.sub\" \"$LINENO\" 5\n\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking build system type\" >&5\n$as_echo_n \"checking build system type... \" >&6; }\nif ${ac_cv_build+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  ac_build_alias=$build_alias\ntest \"x$ac_build_alias\" = x &&\n  ac_build_alias=`$SHELL \"$ac_aux_dir/config.guess\"`\ntest \"x$ac_build_alias\" = x &&\n  as_fn_error $? \"cannot guess build type; you must specify one\" \"$LINENO\" 5\nac_cv_build=`$SHELL \"$ac_aux_dir/config.sub\" $ac_build_alias` ||\n  as_fn_error $? \"$SHELL $ac_aux_dir/config.sub $ac_build_alias failed\" \"$LINENO\" 5\n\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_cv_build\" >&5\n$as_echo \"$ac_cv_build\" >&6; }\ncase $ac_cv_build in\n*-*-*) ;;\n*) as_fn_error $? \"invalid value of canonical build\" \"$LINENO\" 5;;\nesac\nbuild=$ac_cv_build\nac_save_IFS=$IFS; IFS='-'\nset x $ac_cv_build\nshift\nbuild_cpu=$1\nbuild_vendor=$2\nshift; shift\n# Remember, the first character of IFS is used to create $*,\n# except with old shells:\nbuild_os=$*\nIFS=$ac_save_IFS\ncase $build_os in *\\ *) build_os=`echo \"$build_os\" | sed 's/ /-/g'`;; esac\n\n\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking host system type\" >&5\n$as_echo_n \"checking host system type... \" >&6; }\nif ${ac_cv_host+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if test \"x$host_alias\" = x; then\n  ac_cv_host=$ac_cv_build\nelse\n  ac_cv_host=`$SHELL \"$ac_aux_dir/config.sub\" $host_alias` ||\n    as_fn_error $? \"$SHELL $ac_aux_dir/config.sub $host_alias failed\" \"$LINENO\" 5\nfi\n\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_cv_host\" >&5\n$as_echo \"$ac_cv_host\" >&6; }\ncase $ac_cv_host in\n*-*-*) ;;\n*) as_fn_error $? \"invalid value of canonical host\" \"$LINENO\" 5;;\nesac\nhost=$ac_cv_host\nac_save_IFS=$IFS; IFS='-'\nset x $ac_cv_host\nshift\nhost_cpu=$1\nhost_vendor=$2\nshift; shift\n# Remember, the first character of IFS is used to create $*,\n# except with old shells:\nhost_os=$*\nIFS=$ac_save_IFS\ncase $host_os in *\\ *) host_os=`echo \"$host_os\" | sed 's/ /-/g'`;; esac\n\n\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking target system type\" >&5\n$as_echo_n \"checking target system type... \" >&6; }\nif ${ac_cv_target+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if test \"x$target_alias\" = x; then\n  ac_cv_target=$ac_cv_host\nelse\n  ac_cv_target=`$SHELL \"$ac_aux_dir/config.sub\" $target_alias` ||\n    as_fn_error $? \"$SHELL $ac_aux_dir/config.sub $target_alias failed\" \"$LINENO\" 5\nfi\n\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_cv_target\" >&5\n$as_echo \"$ac_cv_target\" >&6; }\ncase $ac_cv_target in\n*-*-*) ;;\n*) as_fn_error $? \"invalid value of canonical target\" \"$LINENO\" 5;;\nesac\ntarget=$ac_cv_target\nac_save_IFS=$IFS; IFS='-'\nset x $ac_cv_target\nshift\ntarget_cpu=$1\ntarget_vendor=$2\nshift; shift\n# Remember, the first character of IFS is used to create $*,\n# except with old shells:\ntarget_os=$*\nIFS=$ac_save_IFS\ncase $target_os in *\\ *) target_os=`echo \"$target_os\" | sed 's/ /-/g'`;; esac\n\n\n# The aliases save the names the user supplied, while $host etc.\n# will get canonicalized.\ntest -n \"$target_alias\" &&\n  test \"$program_prefix$program_suffix$program_transform_name\" = \\\n    NONENONEs,x,x, &&\n  program_prefix=${target_alias}-\n\n\n\n# Check whether --with-alsa was given.\nif test \"${with_alsa+set}\" = set; then :\n  withval=$with_alsa; with_alsa=$withval\nfi\n\n\n\n# Check whether --with-jack was given.\nif test \"${with_jack+set}\" = set; then :\n  withval=$with_jack; with_jack=$withval\nfi\n\n\n\n# Check whether --with-oss was given.\nif test \"${with_oss+set}\" = set; then :\n  withval=$with_oss; with_oss=$withval\nfi\n\n\n\n# Check whether --with-asihpi was given.\nif test \"${with_asihpi+set}\" = set; then :\n  withval=$with_asihpi; with_asihpi=$withval\nfi\n\n\n\n# Check whether --with-winapi was given.\nif test \"${with_winapi+set}\" = set; then :\n  withval=$with_winapi; with_winapi=$withval\nelse\n  with_winapi=\"wmme\"\nfi\n\ncase \"$target_os\" in *mingw* | *cygwin*)\n     with_wmme=no\n     with_directx=no\n     with_asio=no\n     with_wasapi=no\n     with_wdmks=no\n     for api in $(echo $with_winapi | sed 's/,/ /g'); do\n         case \"$api\" in\n             wmme|directx|asio|wasapi|wdmks)\n                 eval with_$api=yes\n                 ;;\n             *)\n                 as_fn_error $? \"unknown Windows API \\\"$api\\\" (do you need --help?)\" \"$LINENO\" 5\n                 ;;\n         esac\n     done\n     ;;\nesac\n\n\n# Check whether --with-asiodir was given.\nif test \"${with_asiodir+set}\" = set; then :\n  withval=$with_asiodir; with_asiodir=$withval\nelse\n  with_asiodir=\"/usr/local/asiosdk2\"\nfi\n\n\n\n# Check whether --with-dxdir was given.\nif test \"${with_dxdir+set}\" = set; then :\n  withval=$with_dxdir; with_dxdir=$withval\nelse\n  with_dxdir=\"/usr/local/dx7sdk\"\nfi\n\n\ndebug_output=no\n# Check whether --enable-debug-output was given.\nif test \"${enable_debug_output+set}\" = set; then :\n  enableval=$enable_debug_output; if test \"x$enableval\" != \"xno\" ; then\n\n$as_echo \"#define PA_ENABLE_DEBUG_OUTPUT /**/\" >>confdefs.h\n\n                  debug_output=yes\n               fi\n\nfi\n\n\n# Check whether --enable-cxx was given.\nif test \"${enable_cxx+set}\" = set; then :\n  enableval=$enable_cxx; enable_cxx=$enableval\nelse\n  enable_cxx=\"no\"\nfi\n\n\n# Check whether --enable-mac-debug was given.\nif test \"${enable_mac_debug+set}\" = set; then :\n  enableval=$enable_mac_debug; enable_mac_debug=$enableval\nelse\n  enable_mac_debug=\"no\"\nfi\n\n\n# Check whether --enable-mac-universal was given.\nif test \"${enable_mac_universal+set}\" = set; then :\n  enableval=$enable_mac_universal; enable_mac_universal=$enableval\nelse\n  enable_mac_universal=\"yes\"\nfi\n\n\n\n# Check whether --with-host_os was given.\nif test \"${with_host_os+set}\" = set; then :\n  withval=$with_host_os; host_os=$withval\nfi\n\n\n\nac_ext=c\nac_cpp='$CPP $CPPFLAGS'\nac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'\nac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'\nac_compiler_gnu=$ac_cv_c_compiler_gnu\nif test -n \"$ac_tool_prefix\"; then\n  # Extract the first word of \"${ac_tool_prefix}gcc\", so it can be a program name with args.\nset dummy ${ac_tool_prefix}gcc; ac_word=$2\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $ac_word\" >&5\n$as_echo_n \"checking for $ac_word... \" >&6; }\nif ${ac_cv_prog_CC+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if test -n \"$CC\"; then\n  ac_cv_prog_CC=\"$CC\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    for ac_exec_ext in '' $ac_executable_extensions; do\n  if as_fn_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_CC=\"${ac_tool_prefix}gcc\"\n    $as_echo \"$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\n  done\nIFS=$as_save_IFS\n\nfi\nfi\nCC=$ac_cv_prog_CC\nif test -n \"$CC\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $CC\" >&5\n$as_echo \"$CC\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\nfi\n\n\nfi\nif test -z \"$ac_cv_prog_CC\"; then\n  ac_ct_CC=$CC\n  # Extract the first word of \"gcc\", so it can be a program name with args.\nset dummy gcc; ac_word=$2\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $ac_word\" >&5\n$as_echo_n \"checking for $ac_word... \" >&6; }\nif ${ac_cv_prog_ac_ct_CC+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if test -n \"$ac_ct_CC\"; then\n  ac_cv_prog_ac_ct_CC=\"$ac_ct_CC\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    for ac_exec_ext in '' $ac_executable_extensions; do\n  if as_fn_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_ac_ct_CC=\"gcc\"\n    $as_echo \"$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\n  done\nIFS=$as_save_IFS\n\nfi\nfi\nac_ct_CC=$ac_cv_prog_ac_ct_CC\nif test -n \"$ac_ct_CC\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC\" >&5\n$as_echo \"$ac_ct_CC\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\nfi\n\n  if test \"x$ac_ct_CC\" = x; then\n    CC=\"\"\n  else\n    case $cross_compiling:$ac_tool_warned in\nyes:)\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet\" >&5\n$as_echo \"$as_me: WARNING: using cross tools not prefixed with host triplet\" >&2;}\nac_tool_warned=yes ;;\nesac\n    CC=$ac_ct_CC\n  fi\nelse\n  CC=\"$ac_cv_prog_CC\"\nfi\n\nif test -z \"$CC\"; then\n          if test -n \"$ac_tool_prefix\"; then\n    # Extract the first word of \"${ac_tool_prefix}cc\", so it can be a program name with args.\nset dummy ${ac_tool_prefix}cc; ac_word=$2\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $ac_word\" >&5\n$as_echo_n \"checking for $ac_word... \" >&6; }\nif ${ac_cv_prog_CC+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if test -n \"$CC\"; then\n  ac_cv_prog_CC=\"$CC\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    for ac_exec_ext in '' $ac_executable_extensions; do\n  if as_fn_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_CC=\"${ac_tool_prefix}cc\"\n    $as_echo \"$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\n  done\nIFS=$as_save_IFS\n\nfi\nfi\nCC=$ac_cv_prog_CC\nif test -n \"$CC\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $CC\" >&5\n$as_echo \"$CC\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\nfi\n\n\n  fi\nfi\nif test -z \"$CC\"; then\n  # Extract the first word of \"cc\", so it can be a program name with args.\nset dummy cc; ac_word=$2\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $ac_word\" >&5\n$as_echo_n \"checking for $ac_word... \" >&6; }\nif ${ac_cv_prog_CC+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if test -n \"$CC\"; then\n  ac_cv_prog_CC=\"$CC\" # Let the user override the test.\nelse\n  ac_prog_rejected=no\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    for ac_exec_ext in '' $ac_executable_extensions; do\n  if as_fn_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    if test \"$as_dir/$ac_word$ac_exec_ext\" = \"/usr/ucb/cc\"; then\n       ac_prog_rejected=yes\n       continue\n     fi\n    ac_cv_prog_CC=\"cc\"\n    $as_echo \"$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\n  done\nIFS=$as_save_IFS\n\nif test $ac_prog_rejected = yes; then\n  # We found a bogon in the path, so make sure we never use it.\n  set dummy $ac_cv_prog_CC\n  shift\n  if test $# != 0; then\n    # We chose a different compiler from the bogus one.\n    # However, it has the same basename, so the bogon will be chosen\n    # first if we set CC to just the basename; use the full file name.\n    shift\n    ac_cv_prog_CC=\"$as_dir/$ac_word${1+' '}$@\"\n  fi\nfi\nfi\nfi\nCC=$ac_cv_prog_CC\nif test -n \"$CC\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $CC\" >&5\n$as_echo \"$CC\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\nfi\n\n\nfi\nif test -z \"$CC\"; then\n  if test -n \"$ac_tool_prefix\"; then\n  for ac_prog in cl.exe\n  do\n    # Extract the first word of \"$ac_tool_prefix$ac_prog\", so it can be a program name with args.\nset dummy $ac_tool_prefix$ac_prog; ac_word=$2\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $ac_word\" >&5\n$as_echo_n \"checking for $ac_word... \" >&6; }\nif ${ac_cv_prog_CC+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if test -n \"$CC\"; then\n  ac_cv_prog_CC=\"$CC\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    for ac_exec_ext in '' $ac_executable_extensions; do\n  if as_fn_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_CC=\"$ac_tool_prefix$ac_prog\"\n    $as_echo \"$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\n  done\nIFS=$as_save_IFS\n\nfi\nfi\nCC=$ac_cv_prog_CC\nif test -n \"$CC\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $CC\" >&5\n$as_echo \"$CC\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\nfi\n\n\n    test -n \"$CC\" && break\n  done\nfi\nif test -z \"$CC\"; then\n  ac_ct_CC=$CC\n  for ac_prog in cl.exe\ndo\n  # Extract the first word of \"$ac_prog\", so it can be a program name with args.\nset dummy $ac_prog; ac_word=$2\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $ac_word\" >&5\n$as_echo_n \"checking for $ac_word... \" >&6; }\nif ${ac_cv_prog_ac_ct_CC+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if test -n \"$ac_ct_CC\"; then\n  ac_cv_prog_ac_ct_CC=\"$ac_ct_CC\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    for ac_exec_ext in '' $ac_executable_extensions; do\n  if as_fn_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_ac_ct_CC=\"$ac_prog\"\n    $as_echo \"$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\n  done\nIFS=$as_save_IFS\n\nfi\nfi\nac_ct_CC=$ac_cv_prog_ac_ct_CC\nif test -n \"$ac_ct_CC\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC\" >&5\n$as_echo \"$ac_ct_CC\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\nfi\n\n\n  test -n \"$ac_ct_CC\" && break\ndone\n\n  if test \"x$ac_ct_CC\" = x; then\n    CC=\"\"\n  else\n    case $cross_compiling:$ac_tool_warned in\nyes:)\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet\" >&5\n$as_echo \"$as_me: WARNING: using cross tools not prefixed with host triplet\" >&2;}\nac_tool_warned=yes ;;\nesac\n    CC=$ac_ct_CC\n  fi\nfi\n\nfi\n\n\ntest -z \"$CC\" && { { $as_echo \"$as_me:${as_lineno-$LINENO}: error: in \\`$ac_pwd':\" >&5\n$as_echo \"$as_me: error: in \\`$ac_pwd':\" >&2;}\nas_fn_error $? \"no acceptable C compiler found in \\$PATH\nSee \\`config.log' for more details\" \"$LINENO\" 5; }\n\n# Provide some information about the compiler.\n$as_echo \"$as_me:${as_lineno-$LINENO}: checking for C compiler version\" >&5\nset X $ac_compile\nac_compiler=$2\nfor ac_option in --version -v -V -qversion; do\n  { { ac_try=\"$ac_compiler $ac_option >&5\"\ncase \"(($ac_try\" in\n  *\\\"* | *\\`* | *\\\\*) ac_try_echo=\\$ac_try;;\n  *) ac_try_echo=$ac_try;;\nesac\neval ac_try_echo=\"\\\"\\$as_me:${as_lineno-$LINENO}: $ac_try_echo\\\"\"\n$as_echo \"$ac_try_echo\"; } >&5\n  (eval \"$ac_compiler $ac_option >&5\") 2>conftest.err\n  ac_status=$?\n  if test -s conftest.err; then\n    sed '10a\\\n... rest of stderr output deleted ...\n         10q' conftest.err >conftest.er1\n    cat conftest.er1 >&5\n  fi\n  rm -f conftest.er1 conftest.err\n  $as_echo \"$as_me:${as_lineno-$LINENO}: \\$? = $ac_status\" >&5\n  test $ac_status = 0; }\ndone\n\ncat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n\nint\nmain ()\n{\n\n  ;\n  return 0;\n}\n_ACEOF\nac_clean_files_save=$ac_clean_files\nac_clean_files=\"$ac_clean_files a.out a.out.dSYM a.exe b.out\"\n# Try to create an executable without -o first, disregard a.out.\n# It will help us diagnose broken compilers, and finding out an intuition\n# of exeext.\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking whether the C compiler works\" >&5\n$as_echo_n \"checking whether the C compiler works... \" >&6; }\nac_link_default=`$as_echo \"$ac_link\" | sed 's/ -o *conftest[^ ]*//'`\n\n# The possible output files:\nac_files=\"a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*\"\n\nac_rmfiles=\nfor ac_file in $ac_files\ndo\n  case $ac_file in\n    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;\n    * ) ac_rmfiles=\"$ac_rmfiles $ac_file\";;\n  esac\ndone\nrm -f $ac_rmfiles\n\nif { { ac_try=\"$ac_link_default\"\ncase \"(($ac_try\" in\n  *\\\"* | *\\`* | *\\\\*) ac_try_echo=\\$ac_try;;\n  *) ac_try_echo=$ac_try;;\nesac\neval ac_try_echo=\"\\\"\\$as_me:${as_lineno-$LINENO}: $ac_try_echo\\\"\"\n$as_echo \"$ac_try_echo\"; } >&5\n  (eval \"$ac_link_default\") 2>&5\n  ac_status=$?\n  $as_echo \"$as_me:${as_lineno-$LINENO}: \\$? = $ac_status\" >&5\n  test $ac_status = 0; }; then :\n  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.\n# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'\n# in a Makefile.  We should not override ac_cv_exeext if it was cached,\n# so that the user can short-circuit this test for compilers unknown to\n# Autoconf.\nfor ac_file in $ac_files ''\ndo\n  test -f \"$ac_file\" || continue\n  case $ac_file in\n    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )\n\t;;\n    [ab].out )\n\t# We found the default executable, but exeext='' is most\n\t# certainly right.\n\tbreak;;\n    *.* )\n\tif test \"${ac_cv_exeext+set}\" = set && test \"$ac_cv_exeext\" != no;\n\tthen :; else\n\t   ac_cv_exeext=`expr \"$ac_file\" : '[^.]*\\(\\..*\\)'`\n\tfi\n\t# We set ac_cv_exeext here because the later test for it is not\n\t# safe: cross compilers may not add the suffix if given an `-o'\n\t# argument, so we may need to know it at that point already.\n\t# Even if this section looks crufty: it has the advantage of\n\t# actually working.\n\tbreak;;\n    * )\n\tbreak;;\n  esac\ndone\ntest \"$ac_cv_exeext\" = no && ac_cv_exeext=\n\nelse\n  ac_file=''\nfi\nif test -z \"$ac_file\"; then :\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\n$as_echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\n{ { $as_echo \"$as_me:${as_lineno-$LINENO}: error: in \\`$ac_pwd':\" >&5\n$as_echo \"$as_me: error: in \\`$ac_pwd':\" >&2;}\nas_fn_error 77 \"C compiler cannot create executables\nSee \\`config.log' for more details\" \"$LINENO\" 5; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: yes\" >&5\n$as_echo \"yes\" >&6; }\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name\" >&5\n$as_echo_n \"checking for C compiler default output file name... \" >&6; }\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_file\" >&5\n$as_echo \"$ac_file\" >&6; }\nac_exeext=$ac_cv_exeext\n\nrm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out\nac_clean_files=$ac_clean_files_save\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for suffix of executables\" >&5\n$as_echo_n \"checking for suffix of executables... \" >&6; }\nif { { ac_try=\"$ac_link\"\ncase \"(($ac_try\" in\n  *\\\"* | *\\`* | *\\\\*) ac_try_echo=\\$ac_try;;\n  *) ac_try_echo=$ac_try;;\nesac\neval ac_try_echo=\"\\\"\\$as_me:${as_lineno-$LINENO}: $ac_try_echo\\\"\"\n$as_echo \"$ac_try_echo\"; } >&5\n  (eval \"$ac_link\") 2>&5\n  ac_status=$?\n  $as_echo \"$as_me:${as_lineno-$LINENO}: \\$? = $ac_status\" >&5\n  test $ac_status = 0; }; then :\n  # If both `conftest.exe' and `conftest' are `present' (well, observable)\n# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will\n# work properly (i.e., refer to `conftest.exe'), while it won't with\n# `rm'.\nfor ac_file in conftest.exe conftest conftest.*; do\n  test -f \"$ac_file\" || continue\n  case $ac_file in\n    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;\n    *.* ) ac_cv_exeext=`expr \"$ac_file\" : '[^.]*\\(\\..*\\)'`\n\t  break;;\n    * ) break;;\n  esac\ndone\nelse\n  { { $as_echo \"$as_me:${as_lineno-$LINENO}: error: in \\`$ac_pwd':\" >&5\n$as_echo \"$as_me: error: in \\`$ac_pwd':\" >&2;}\nas_fn_error $? \"cannot compute suffix of executables: cannot compile and link\nSee \\`config.log' for more details\" \"$LINENO\" 5; }\nfi\nrm -f conftest conftest$ac_cv_exeext\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext\" >&5\n$as_echo \"$ac_cv_exeext\" >&6; }\n\nrm -f conftest.$ac_ext\nEXEEXT=$ac_cv_exeext\nac_exeext=$EXEEXT\ncat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n#include <stdio.h>\nint\nmain ()\n{\nFILE *f = fopen (\"conftest.out\", \"w\");\n return ferror (f) || fclose (f) != 0;\n\n  ;\n  return 0;\n}\n_ACEOF\nac_clean_files=\"$ac_clean_files conftest.out\"\n# Check that the compiler produces executables we can run.  If not, either\n# the compiler is broken, or we cross compile.\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling\" >&5\n$as_echo_n \"checking whether we are cross compiling... \" >&6; }\nif test \"$cross_compiling\" != yes; then\n  { { ac_try=\"$ac_link\"\ncase \"(($ac_try\" in\n  *\\\"* | *\\`* | *\\\\*) ac_try_echo=\\$ac_try;;\n  *) ac_try_echo=$ac_try;;\nesac\neval ac_try_echo=\"\\\"\\$as_me:${as_lineno-$LINENO}: $ac_try_echo\\\"\"\n$as_echo \"$ac_try_echo\"; } >&5\n  (eval \"$ac_link\") 2>&5\n  ac_status=$?\n  $as_echo \"$as_me:${as_lineno-$LINENO}: \\$? = $ac_status\" >&5\n  test $ac_status = 0; }\n  if { ac_try='./conftest$ac_cv_exeext'\n  { { case \"(($ac_try\" in\n  *\\\"* | *\\`* | *\\\\*) ac_try_echo=\\$ac_try;;\n  *) ac_try_echo=$ac_try;;\nesac\neval ac_try_echo=\"\\\"\\$as_me:${as_lineno-$LINENO}: $ac_try_echo\\\"\"\n$as_echo \"$ac_try_echo\"; } >&5\n  (eval \"$ac_try\") 2>&5\n  ac_status=$?\n  $as_echo \"$as_me:${as_lineno-$LINENO}: \\$? = $ac_status\" >&5\n  test $ac_status = 0; }; }; then\n    cross_compiling=no\n  else\n    if test \"$cross_compiling\" = maybe; then\n\tcross_compiling=yes\n    else\n\t{ { $as_echo \"$as_me:${as_lineno-$LINENO}: error: in \\`$ac_pwd':\" >&5\n$as_echo \"$as_me: error: in \\`$ac_pwd':\" >&2;}\nas_fn_error $? \"cannot run C compiled programs.\nIf you meant to cross compile, use \\`--host'.\nSee \\`config.log' for more details\" \"$LINENO\" 5; }\n    fi\n  fi\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $cross_compiling\" >&5\n$as_echo \"$cross_compiling\" >&6; }\n\nrm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out\nac_clean_files=$ac_clean_files_save\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for suffix of object files\" >&5\n$as_echo_n \"checking for suffix of object files... \" >&6; }\nif ${ac_cv_objext+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n\nint\nmain ()\n{\n\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.o conftest.obj\nif { { ac_try=\"$ac_compile\"\ncase \"(($ac_try\" in\n  *\\\"* | *\\`* | *\\\\*) ac_try_echo=\\$ac_try;;\n  *) ac_try_echo=$ac_try;;\nesac\neval ac_try_echo=\"\\\"\\$as_me:${as_lineno-$LINENO}: $ac_try_echo\\\"\"\n$as_echo \"$ac_try_echo\"; } >&5\n  (eval \"$ac_compile\") 2>&5\n  ac_status=$?\n  $as_echo \"$as_me:${as_lineno-$LINENO}: \\$? = $ac_status\" >&5\n  test $ac_status = 0; }; then :\n  for ac_file in conftest.o conftest.obj conftest.*; do\n  test -f \"$ac_file\" || continue;\n  case $ac_file in\n    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;\n    *) ac_cv_objext=`expr \"$ac_file\" : '.*\\.\\(.*\\)'`\n       break;;\n  esac\ndone\nelse\n  $as_echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\n{ { $as_echo \"$as_me:${as_lineno-$LINENO}: error: in \\`$ac_pwd':\" >&5\n$as_echo \"$as_me: error: in \\`$ac_pwd':\" >&2;}\nas_fn_error $? \"cannot compute suffix of object files: cannot compile\nSee \\`config.log' for more details\" \"$LINENO\" 5; }\nfi\nrm -f conftest.$ac_cv_objext conftest.$ac_ext\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext\" >&5\n$as_echo \"$ac_cv_objext\" >&6; }\nOBJEXT=$ac_cv_objext\nac_objext=$OBJEXT\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler\" >&5\n$as_echo_n \"checking whether we are using the GNU C compiler... \" >&6; }\nif ${ac_cv_c_compiler_gnu+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n\nint\nmain ()\n{\n#ifndef __GNUC__\n       choke me\n#endif\n\n  ;\n  return 0;\n}\n_ACEOF\nif ac_fn_c_try_compile \"$LINENO\"; then :\n  ac_compiler_gnu=yes\nelse\n  ac_compiler_gnu=no\nfi\nrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext\nac_cv_c_compiler_gnu=$ac_compiler_gnu\n\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu\" >&5\n$as_echo \"$ac_cv_c_compiler_gnu\" >&6; }\nif test $ac_compiler_gnu = yes; then\n  GCC=yes\nelse\n  GCC=\nfi\nac_test_CFLAGS=${CFLAGS+set}\nac_save_CFLAGS=$CFLAGS\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g\" >&5\n$as_echo_n \"checking whether $CC accepts -g... \" >&6; }\nif ${ac_cv_prog_cc_g+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  ac_save_c_werror_flag=$ac_c_werror_flag\n   ac_c_werror_flag=yes\n   ac_cv_prog_cc_g=no\n   CFLAGS=\"-g\"\n   cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n\nint\nmain ()\n{\n\n  ;\n  return 0;\n}\n_ACEOF\nif ac_fn_c_try_compile \"$LINENO\"; then :\n  ac_cv_prog_cc_g=yes\nelse\n  CFLAGS=\"\"\n      cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n\nint\nmain ()\n{\n\n  ;\n  return 0;\n}\n_ACEOF\nif ac_fn_c_try_compile \"$LINENO\"; then :\n\nelse\n  ac_c_werror_flag=$ac_save_c_werror_flag\n\t CFLAGS=\"-g\"\n\t cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n\nint\nmain ()\n{\n\n  ;\n  return 0;\n}\n_ACEOF\nif ac_fn_c_try_compile \"$LINENO\"; then :\n  ac_cv_prog_cc_g=yes\nfi\nrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext\nfi\nrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext\nfi\nrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext\n   ac_c_werror_flag=$ac_save_c_werror_flag\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g\" >&5\n$as_echo \"$ac_cv_prog_cc_g\" >&6; }\nif test \"$ac_test_CFLAGS\" = set; then\n  CFLAGS=$ac_save_CFLAGS\nelif test $ac_cv_prog_cc_g = yes; then\n  if test \"$GCC\" = yes; then\n    CFLAGS=\"-g -O2\"\n  else\n    CFLAGS=\"-g\"\n  fi\nelse\n  if test \"$GCC\" = yes; then\n    CFLAGS=\"-O2\"\n  else\n    CFLAGS=\n  fi\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89\" >&5\n$as_echo_n \"checking for $CC option to accept ISO C89... \" >&6; }\nif ${ac_cv_prog_cc_c89+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  ac_cv_prog_cc_c89=no\nac_save_CC=$CC\ncat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n#include <stdarg.h>\n#include <stdio.h>\nstruct stat;\n/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */\nstruct buf { int x; };\nFILE * (*rcsopen) (struct buf *, struct stat *, int);\nstatic char *e (p, i)\n     char **p;\n     int i;\n{\n  return p[i];\n}\nstatic char *f (char * (*g) (char **, int), char **p, ...)\n{\n  char *s;\n  va_list v;\n  va_start (v,p);\n  s = g (p, va_arg (v,int));\n  va_end (v);\n  return s;\n}\n\n/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has\n   function prototypes and stuff, but not '\\xHH' hex character constants.\n   These don't provoke an error unfortunately, instead are silently treated\n   as 'x'.  The following induces an error, until -std is added to get\n   proper ANSI mode.  Curiously '\\x00'!='x' always comes out true, for an\n   array size at least.  It's necessary to write '\\x00'==0 to get something\n   that's true only with -std.  */\nint osf4_cc_array ['\\x00' == 0 ? 1 : -1];\n\n/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters\n   inside strings and character constants.  */\n#define FOO(x) 'x'\nint xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];\n\nint test (int i, double x);\nstruct s1 {int (*f) (int a);};\nstruct s2 {int (*f) (double a);};\nint pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);\nint argc;\nchar **argv;\nint\nmain ()\n{\nreturn f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];\n  ;\n  return 0;\n}\n_ACEOF\nfor ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \\\n\t-Ae \"-Aa -D_HPUX_SOURCE\" \"-Xc -D__EXTENSIONS__\"\ndo\n  CC=\"$ac_save_CC $ac_arg\"\n  if ac_fn_c_try_compile \"$LINENO\"; then :\n  ac_cv_prog_cc_c89=$ac_arg\nfi\nrm -f core conftest.err conftest.$ac_objext\n  test \"x$ac_cv_prog_cc_c89\" != \"xno\" && break\ndone\nrm -f conftest.$ac_ext\nCC=$ac_save_CC\n\nfi\n# AC_CACHE_VAL\ncase \"x$ac_cv_prog_cc_c89\" in\n  x)\n    { $as_echo \"$as_me:${as_lineno-$LINENO}: result: none needed\" >&5\n$as_echo \"none needed\" >&6; } ;;\n  xno)\n    { $as_echo \"$as_me:${as_lineno-$LINENO}: result: unsupported\" >&5\n$as_echo \"unsupported\" >&6; } ;;\n  *)\n    CC=\"$CC $ac_cv_prog_cc_c89\"\n    { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89\" >&5\n$as_echo \"$ac_cv_prog_cc_c89\" >&6; } ;;\nesac\nif test \"x$ac_cv_prog_cc_c89\" != xno; then :\n\nfi\n\nac_ext=c\nac_cpp='$CPP $CPPFLAGS'\nac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'\nac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'\nac_compiler_gnu=$ac_cv_c_compiler_gnu\n\nif [ \"$with_asio\" = \"yes\" ] || [ \"$enable_cxx\" = \"yes\" ] ; then\n       ac_ext=cpp\nac_cpp='$CXXCPP $CPPFLAGS'\nac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'\nac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'\nac_compiler_gnu=$ac_cv_cxx_compiler_gnu\nif test -z \"$CXX\"; then\n  if test -n \"$CCC\"; then\n    CXX=$CCC\n  else\n    if test -n \"$ac_tool_prefix\"; then\n  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC\n  do\n    # Extract the first word of \"$ac_tool_prefix$ac_prog\", so it can be a program name with args.\nset dummy $ac_tool_prefix$ac_prog; ac_word=$2\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $ac_word\" >&5\n$as_echo_n \"checking for $ac_word... \" >&6; }\nif ${ac_cv_prog_CXX+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if test -n \"$CXX\"; then\n  ac_cv_prog_CXX=\"$CXX\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    for ac_exec_ext in '' $ac_executable_extensions; do\n  if as_fn_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_CXX=\"$ac_tool_prefix$ac_prog\"\n    $as_echo \"$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\n  done\nIFS=$as_save_IFS\n\nfi\nfi\nCXX=$ac_cv_prog_CXX\nif test -n \"$CXX\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $CXX\" >&5\n$as_echo \"$CXX\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\nfi\n\n\n    test -n \"$CXX\" && break\n  done\nfi\nif test -z \"$CXX\"; then\n  ac_ct_CXX=$CXX\n  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC\ndo\n  # Extract the first word of \"$ac_prog\", so it can be a program name with args.\nset dummy $ac_prog; ac_word=$2\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $ac_word\" >&5\n$as_echo_n \"checking for $ac_word... \" >&6; }\nif ${ac_cv_prog_ac_ct_CXX+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if test -n \"$ac_ct_CXX\"; then\n  ac_cv_prog_ac_ct_CXX=\"$ac_ct_CXX\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    for ac_exec_ext in '' $ac_executable_extensions; do\n  if as_fn_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_ac_ct_CXX=\"$ac_prog\"\n    $as_echo \"$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\n  done\nIFS=$as_save_IFS\n\nfi\nfi\nac_ct_CXX=$ac_cv_prog_ac_ct_CXX\nif test -n \"$ac_ct_CXX\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX\" >&5\n$as_echo \"$ac_ct_CXX\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\nfi\n\n\n  test -n \"$ac_ct_CXX\" && break\ndone\n\n  if test \"x$ac_ct_CXX\" = x; then\n    CXX=\"g++\"\n  else\n    case $cross_compiling:$ac_tool_warned in\nyes:)\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet\" >&5\n$as_echo \"$as_me: WARNING: using cross tools not prefixed with host triplet\" >&2;}\nac_tool_warned=yes ;;\nesac\n    CXX=$ac_ct_CXX\n  fi\nfi\n\n  fi\nfi\n# Provide some information about the compiler.\n$as_echo \"$as_me:${as_lineno-$LINENO}: checking for C++ compiler version\" >&5\nset X $ac_compile\nac_compiler=$2\nfor ac_option in --version -v -V -qversion; do\n  { { ac_try=\"$ac_compiler $ac_option >&5\"\ncase \"(($ac_try\" in\n  *\\\"* | *\\`* | *\\\\*) ac_try_echo=\\$ac_try;;\n  *) ac_try_echo=$ac_try;;\nesac\neval ac_try_echo=\"\\\"\\$as_me:${as_lineno-$LINENO}: $ac_try_echo\\\"\"\n$as_echo \"$ac_try_echo\"; } >&5\n  (eval \"$ac_compiler $ac_option >&5\") 2>conftest.err\n  ac_status=$?\n  if test -s conftest.err; then\n    sed '10a\\\n... rest of stderr output deleted ...\n         10q' conftest.err >conftest.er1\n    cat conftest.er1 >&5\n  fi\n  rm -f conftest.er1 conftest.err\n  $as_echo \"$as_me:${as_lineno-$LINENO}: \\$? = $ac_status\" >&5\n  test $ac_status = 0; }\ndone\n\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler\" >&5\n$as_echo_n \"checking whether we are using the GNU C++ compiler... \" >&6; }\nif ${ac_cv_cxx_compiler_gnu+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n\nint\nmain ()\n{\n#ifndef __GNUC__\n       choke me\n#endif\n\n  ;\n  return 0;\n}\n_ACEOF\nif ac_fn_cxx_try_compile \"$LINENO\"; then :\n  ac_compiler_gnu=yes\nelse\n  ac_compiler_gnu=no\nfi\nrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext\nac_cv_cxx_compiler_gnu=$ac_compiler_gnu\n\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu\" >&5\n$as_echo \"$ac_cv_cxx_compiler_gnu\" >&6; }\nif test $ac_compiler_gnu = yes; then\n  GXX=yes\nelse\n  GXX=\nfi\nac_test_CXXFLAGS=${CXXFLAGS+set}\nac_save_CXXFLAGS=$CXXFLAGS\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g\" >&5\n$as_echo_n \"checking whether $CXX accepts -g... \" >&6; }\nif ${ac_cv_prog_cxx_g+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  ac_save_cxx_werror_flag=$ac_cxx_werror_flag\n   ac_cxx_werror_flag=yes\n   ac_cv_prog_cxx_g=no\n   CXXFLAGS=\"-g\"\n   cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n\nint\nmain ()\n{\n\n  ;\n  return 0;\n}\n_ACEOF\nif ac_fn_cxx_try_compile \"$LINENO\"; then :\n  ac_cv_prog_cxx_g=yes\nelse\n  CXXFLAGS=\"\"\n      cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n\nint\nmain ()\n{\n\n  ;\n  return 0;\n}\n_ACEOF\nif ac_fn_cxx_try_compile \"$LINENO\"; then :\n\nelse\n  ac_cxx_werror_flag=$ac_save_cxx_werror_flag\n\t CXXFLAGS=\"-g\"\n\t cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n\nint\nmain ()\n{\n\n  ;\n  return 0;\n}\n_ACEOF\nif ac_fn_cxx_try_compile \"$LINENO\"; then :\n  ac_cv_prog_cxx_g=yes\nfi\nrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext\nfi\nrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext\nfi\nrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext\n   ac_cxx_werror_flag=$ac_save_cxx_werror_flag\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g\" >&5\n$as_echo \"$ac_cv_prog_cxx_g\" >&6; }\nif test \"$ac_test_CXXFLAGS\" = set; then\n  CXXFLAGS=$ac_save_CXXFLAGS\nelif test $ac_cv_prog_cxx_g = yes; then\n  if test \"$GXX\" = yes; then\n    CXXFLAGS=\"-g -O2\"\n  else\n    CXXFLAGS=\"-g\"\n  fi\nelse\n  if test \"$GXX\" = yes; then\n    CXXFLAGS=\"-O2\"\n  else\n    CXXFLAGS=\n  fi\nfi\nac_ext=c\nac_cpp='$CPP $CPPFLAGS'\nac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'\nac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'\nac_compiler_gnu=$ac_cv_c_compiler_gnu\n\nfi\nenable_win32_dll=yes\n\ncase $host in\n*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)\n  if test -n \"$ac_tool_prefix\"; then\n  # Extract the first word of \"${ac_tool_prefix}as\", so it can be a program name with args.\nset dummy ${ac_tool_prefix}as; ac_word=$2\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $ac_word\" >&5\n$as_echo_n \"checking for $ac_word... \" >&6; }\nif ${ac_cv_prog_AS+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if test -n \"$AS\"; then\n  ac_cv_prog_AS=\"$AS\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    for ac_exec_ext in '' $ac_executable_extensions; do\n  if as_fn_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_AS=\"${ac_tool_prefix}as\"\n    $as_echo \"$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\n  done\nIFS=$as_save_IFS\n\nfi\nfi\nAS=$ac_cv_prog_AS\nif test -n \"$AS\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $AS\" >&5\n$as_echo \"$AS\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\nfi\n\n\nfi\nif test -z \"$ac_cv_prog_AS\"; then\n  ac_ct_AS=$AS\n  # Extract the first word of \"as\", so it can be a program name with args.\nset dummy as; ac_word=$2\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $ac_word\" >&5\n$as_echo_n \"checking for $ac_word... \" >&6; }\nif ${ac_cv_prog_ac_ct_AS+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if test -n \"$ac_ct_AS\"; then\n  ac_cv_prog_ac_ct_AS=\"$ac_ct_AS\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    for ac_exec_ext in '' $ac_executable_extensions; do\n  if as_fn_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_ac_ct_AS=\"as\"\n    $as_echo \"$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\n  done\nIFS=$as_save_IFS\n\nfi\nfi\nac_ct_AS=$ac_cv_prog_ac_ct_AS\nif test -n \"$ac_ct_AS\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS\" >&5\n$as_echo \"$ac_ct_AS\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\nfi\n\n  if test \"x$ac_ct_AS\" = x; then\n    AS=\"false\"\n  else\n    case $cross_compiling:$ac_tool_warned in\nyes:)\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet\" >&5\n$as_echo \"$as_me: WARNING: using cross tools not prefixed with host triplet\" >&2;}\nac_tool_warned=yes ;;\nesac\n    AS=$ac_ct_AS\n  fi\nelse\n  AS=\"$ac_cv_prog_AS\"\nfi\n\n  if test -n \"$ac_tool_prefix\"; then\n  # Extract the first word of \"${ac_tool_prefix}dlltool\", so it can be a program name with args.\nset dummy ${ac_tool_prefix}dlltool; ac_word=$2\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $ac_word\" >&5\n$as_echo_n \"checking for $ac_word... \" >&6; }\nif ${ac_cv_prog_DLLTOOL+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if test -n \"$DLLTOOL\"; then\n  ac_cv_prog_DLLTOOL=\"$DLLTOOL\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    for ac_exec_ext in '' $ac_executable_extensions; do\n  if as_fn_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_DLLTOOL=\"${ac_tool_prefix}dlltool\"\n    $as_echo \"$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\n  done\nIFS=$as_save_IFS\n\nfi\nfi\nDLLTOOL=$ac_cv_prog_DLLTOOL\nif test -n \"$DLLTOOL\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $DLLTOOL\" >&5\n$as_echo \"$DLLTOOL\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\nfi\n\n\nfi\nif test -z \"$ac_cv_prog_DLLTOOL\"; then\n  ac_ct_DLLTOOL=$DLLTOOL\n  # Extract the first word of \"dlltool\", so it can be a program name with args.\nset dummy dlltool; ac_word=$2\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $ac_word\" >&5\n$as_echo_n \"checking for $ac_word... \" >&6; }\nif ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if test -n \"$ac_ct_DLLTOOL\"; then\n  ac_cv_prog_ac_ct_DLLTOOL=\"$ac_ct_DLLTOOL\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    for ac_exec_ext in '' $ac_executable_extensions; do\n  if as_fn_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_ac_ct_DLLTOOL=\"dlltool\"\n    $as_echo \"$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\n  done\nIFS=$as_save_IFS\n\nfi\nfi\nac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL\nif test -n \"$ac_ct_DLLTOOL\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL\" >&5\n$as_echo \"$ac_ct_DLLTOOL\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\nfi\n\n  if test \"x$ac_ct_DLLTOOL\" = x; then\n    DLLTOOL=\"false\"\n  else\n    case $cross_compiling:$ac_tool_warned in\nyes:)\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet\" >&5\n$as_echo \"$as_me: WARNING: using cross tools not prefixed with host triplet\" >&2;}\nac_tool_warned=yes ;;\nesac\n    DLLTOOL=$ac_ct_DLLTOOL\n  fi\nelse\n  DLLTOOL=\"$ac_cv_prog_DLLTOOL\"\nfi\n\n  if test -n \"$ac_tool_prefix\"; then\n  # Extract the first word of \"${ac_tool_prefix}objdump\", so it can be a program name with args.\nset dummy ${ac_tool_prefix}objdump; ac_word=$2\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $ac_word\" >&5\n$as_echo_n \"checking for $ac_word... \" >&6; }\nif ${ac_cv_prog_OBJDUMP+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if test -n \"$OBJDUMP\"; then\n  ac_cv_prog_OBJDUMP=\"$OBJDUMP\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    for ac_exec_ext in '' $ac_executable_extensions; do\n  if as_fn_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_OBJDUMP=\"${ac_tool_prefix}objdump\"\n    $as_echo \"$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\n  done\nIFS=$as_save_IFS\n\nfi\nfi\nOBJDUMP=$ac_cv_prog_OBJDUMP\nif test -n \"$OBJDUMP\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $OBJDUMP\" >&5\n$as_echo \"$OBJDUMP\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\nfi\n\n\nfi\nif test -z \"$ac_cv_prog_OBJDUMP\"; then\n  ac_ct_OBJDUMP=$OBJDUMP\n  # Extract the first word of \"objdump\", so it can be a program name with args.\nset dummy objdump; ac_word=$2\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $ac_word\" >&5\n$as_echo_n \"checking for $ac_word... \" >&6; }\nif ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if test -n \"$ac_ct_OBJDUMP\"; then\n  ac_cv_prog_ac_ct_OBJDUMP=\"$ac_ct_OBJDUMP\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    for ac_exec_ext in '' $ac_executable_extensions; do\n  if as_fn_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_ac_ct_OBJDUMP=\"objdump\"\n    $as_echo \"$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\n  done\nIFS=$as_save_IFS\n\nfi\nfi\nac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP\nif test -n \"$ac_ct_OBJDUMP\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP\" >&5\n$as_echo \"$ac_ct_OBJDUMP\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\nfi\n\n  if test \"x$ac_ct_OBJDUMP\" = x; then\n    OBJDUMP=\"false\"\n  else\n    case $cross_compiling:$ac_tool_warned in\nyes:)\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet\" >&5\n$as_echo \"$as_me: WARNING: using cross tools not prefixed with host triplet\" >&2;}\nac_tool_warned=yes ;;\nesac\n    OBJDUMP=$ac_ct_OBJDUMP\n  fi\nelse\n  OBJDUMP=\"$ac_cv_prog_OBJDUMP\"\nfi\n\n  ;;\nesac\n\ntest -z \"$AS\" && AS=as\n\n\n\n\n\ntest -z \"$DLLTOOL\" && DLLTOOL=dlltool\n\n\n\n\n\ntest -z \"$OBJDUMP\" && OBJDUMP=objdump\n\n\n\n\n\n\n\ncase `pwd` in\n  *\\ * | *\\\t*)\n    { $as_echo \"$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \\`pwd\\`\" >&5\n$as_echo \"$as_me: WARNING: Libtool does not cope well with whitespace in \\`pwd\\`\" >&2;} ;;\nesac\n\n\n\nmacro_version='2.4.2'\nmacro_revision='1.3337'\n\n\n\n\n\n\n\n\n\n\n\n\n\nltmain=\"$ac_aux_dir/ltmain.sh\"\n\n# Backslashify metacharacters that are still active within\n# double-quoted strings.\nsed_quote_subst='s/\\([\"`$\\\\]\\)/\\\\\\1/g'\n\n# Same as above, but do not quote variable references.\ndouble_quote_subst='s/\\([\"`\\\\]\\)/\\\\\\1/g'\n\n# Sed substitution to delay expansion of an escaped shell variable in a\n# double_quote_subst'ed string.\ndelay_variable_subst='s/\\\\\\\\\\\\\\\\\\\\\\$/\\\\\\\\\\\\$/g'\n\n# Sed substitution to delay expansion of an escaped single quote.\ndelay_single_quote_subst='s/'\\''/'\\'\\\\\\\\\\\\\\'\\''/g'\n\n# Sed substitution to avoid accidental globbing in evaled expressions\nno_glob_subst='s/\\*/\\\\\\*/g'\n\nECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'\nECHO=$ECHO$ECHO$ECHO$ECHO$ECHO\nECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO\n\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking how to print strings\" >&5\n$as_echo_n \"checking how to print strings... \" >&6; }\n# Test print first, because it will be a builtin if present.\nif test \"X`( print -r -- -n ) 2>/dev/null`\" = X-n && \\\n   test \"X`print -r -- $ECHO 2>/dev/null`\" = \"X$ECHO\"; then\n  ECHO='print -r --'\nelif test \"X`printf %s $ECHO 2>/dev/null`\" = \"X$ECHO\"; then\n  ECHO='printf %s\\n'\nelse\n  # Use this function as a fallback that always works.\n  func_fallback_echo ()\n  {\n    eval 'cat <<_LTECHO_EOF\n$1\n_LTECHO_EOF'\n  }\n  ECHO='func_fallback_echo'\nfi\n\n# func_echo_all arg...\n# Invoke $ECHO with all args, space-separated.\nfunc_echo_all ()\n{\n    $ECHO \"\"\n}\n\ncase \"$ECHO\" in\n  printf*) { $as_echo \"$as_me:${as_lineno-$LINENO}: result: printf\" >&5\n$as_echo \"printf\" >&6; } ;;\n  print*) { $as_echo \"$as_me:${as_lineno-$LINENO}: result: print -r\" >&5\n$as_echo \"print -r\" >&6; } ;;\n  *) { $as_echo \"$as_me:${as_lineno-$LINENO}: result: cat\" >&5\n$as_echo \"cat\" >&6; } ;;\nesac\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output\" >&5\n$as_echo_n \"checking for a sed that does not truncate output... \" >&6; }\nif ${ac_cv_path_SED+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/\n     for ac_i in 1 2 3 4 5 6 7; do\n       ac_script=\"$ac_script$as_nl$ac_script\"\n     done\n     echo \"$ac_script\" 2>/dev/null | sed 99q >conftest.sed\n     { ac_script=; unset ac_script;}\n     if test -z \"$SED\"; then\n  ac_path_SED_found=false\n  # Loop through the user's path and test for each of PROGNAME-LIST\n  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    for ac_prog in sed gsed; do\n    for ac_exec_ext in '' $ac_executable_extensions; do\n      ac_path_SED=\"$as_dir/$ac_prog$ac_exec_ext\"\n      as_fn_executable_p \"$ac_path_SED\" || continue\n# Check for GNU ac_path_SED and select it if it is found.\n  # Check for GNU $ac_path_SED\ncase `\"$ac_path_SED\" --version 2>&1` in\n*GNU*)\n  ac_cv_path_SED=\"$ac_path_SED\" ac_path_SED_found=:;;\n*)\n  ac_count=0\n  $as_echo_n 0123456789 >\"conftest.in\"\n  while :\n  do\n    cat \"conftest.in\" \"conftest.in\" >\"conftest.tmp\"\n    mv \"conftest.tmp\" \"conftest.in\"\n    cp \"conftest.in\" \"conftest.nl\"\n    $as_echo '' >> \"conftest.nl\"\n    \"$ac_path_SED\" -f conftest.sed < \"conftest.nl\" >\"conftest.out\" 2>/dev/null || break\n    diff \"conftest.out\" \"conftest.nl\" >/dev/null 2>&1 || break\n    as_fn_arith $ac_count + 1 && ac_count=$as_val\n    if test $ac_count -gt ${ac_path_SED_max-0}; then\n      # Best one so far, save it but keep looking for a better one\n      ac_cv_path_SED=\"$ac_path_SED\"\n      ac_path_SED_max=$ac_count\n    fi\n    # 10*(2^10) chars as input seems more than enough\n    test $ac_count -gt 10 && break\n  done\n  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;\nesac\n\n      $ac_path_SED_found && break 3\n    done\n  done\n  done\nIFS=$as_save_IFS\n  if test -z \"$ac_cv_path_SED\"; then\n    as_fn_error $? \"no acceptable sed could be found in \\$PATH\" \"$LINENO\" 5\n  fi\nelse\n  ac_cv_path_SED=$SED\nfi\n\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED\" >&5\n$as_echo \"$ac_cv_path_SED\" >&6; }\n SED=\"$ac_cv_path_SED\"\n  rm -f conftest.sed\n\ntest -z \"$SED\" && SED=sed\nXsed=\"$SED -e 1s/^X//\"\n\n\n\n\n\n\n\n\n\n\n\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e\" >&5\n$as_echo_n \"checking for grep that handles long lines and -e... \" >&6; }\nif ${ac_cv_path_GREP+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if test -z \"$GREP\"; then\n  ac_path_GREP_found=false\n  # Loop through the user's path and test for each of PROGNAME-LIST\n  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    for ac_prog in grep ggrep; do\n    for ac_exec_ext in '' $ac_executable_extensions; do\n      ac_path_GREP=\"$as_dir/$ac_prog$ac_exec_ext\"\n      as_fn_executable_p \"$ac_path_GREP\" || continue\n# Check for GNU ac_path_GREP and select it if it is found.\n  # Check for GNU $ac_path_GREP\ncase `\"$ac_path_GREP\" --version 2>&1` in\n*GNU*)\n  ac_cv_path_GREP=\"$ac_path_GREP\" ac_path_GREP_found=:;;\n*)\n  ac_count=0\n  $as_echo_n 0123456789 >\"conftest.in\"\n  while :\n  do\n    cat \"conftest.in\" \"conftest.in\" >\"conftest.tmp\"\n    mv \"conftest.tmp\" \"conftest.in\"\n    cp \"conftest.in\" \"conftest.nl\"\n    $as_echo 'GREP' >> \"conftest.nl\"\n    \"$ac_path_GREP\" -e 'GREP$' -e '-(cannot match)-' < \"conftest.nl\" >\"conftest.out\" 2>/dev/null || break\n    diff \"conftest.out\" \"conftest.nl\" >/dev/null 2>&1 || break\n    as_fn_arith $ac_count + 1 && ac_count=$as_val\n    if test $ac_count -gt ${ac_path_GREP_max-0}; then\n      # Best one so far, save it but keep looking for a better one\n      ac_cv_path_GREP=\"$ac_path_GREP\"\n      ac_path_GREP_max=$ac_count\n    fi\n    # 10*(2^10) chars as input seems more than enough\n    test $ac_count -gt 10 && break\n  done\n  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;\nesac\n\n      $ac_path_GREP_found && break 3\n    done\n  done\n  done\nIFS=$as_save_IFS\n  if test -z \"$ac_cv_path_GREP\"; then\n    as_fn_error $? \"no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin\" \"$LINENO\" 5\n  fi\nelse\n  ac_cv_path_GREP=$GREP\nfi\n\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP\" >&5\n$as_echo \"$ac_cv_path_GREP\" >&6; }\n GREP=\"$ac_cv_path_GREP\"\n\n\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for egrep\" >&5\n$as_echo_n \"checking for egrep... \" >&6; }\nif ${ac_cv_path_EGREP+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1\n   then ac_cv_path_EGREP=\"$GREP -E\"\n   else\n     if test -z \"$EGREP\"; then\n  ac_path_EGREP_found=false\n  # Loop through the user's path and test for each of PROGNAME-LIST\n  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    for ac_prog in egrep; do\n    for ac_exec_ext in '' $ac_executable_extensions; do\n      ac_path_EGREP=\"$as_dir/$ac_prog$ac_exec_ext\"\n      as_fn_executable_p \"$ac_path_EGREP\" || continue\n# Check for GNU ac_path_EGREP and select it if it is found.\n  # Check for GNU $ac_path_EGREP\ncase `\"$ac_path_EGREP\" --version 2>&1` in\n*GNU*)\n  ac_cv_path_EGREP=\"$ac_path_EGREP\" ac_path_EGREP_found=:;;\n*)\n  ac_count=0\n  $as_echo_n 0123456789 >\"conftest.in\"\n  while :\n  do\n    cat \"conftest.in\" \"conftest.in\" >\"conftest.tmp\"\n    mv \"conftest.tmp\" \"conftest.in\"\n    cp \"conftest.in\" \"conftest.nl\"\n    $as_echo 'EGREP' >> \"conftest.nl\"\n    \"$ac_path_EGREP\" 'EGREP$' < \"conftest.nl\" >\"conftest.out\" 2>/dev/null || break\n    diff \"conftest.out\" \"conftest.nl\" >/dev/null 2>&1 || break\n    as_fn_arith $ac_count + 1 && ac_count=$as_val\n    if test $ac_count -gt ${ac_path_EGREP_max-0}; then\n      # Best one so far, save it but keep looking for a better one\n      ac_cv_path_EGREP=\"$ac_path_EGREP\"\n      ac_path_EGREP_max=$ac_count\n    fi\n    # 10*(2^10) chars as input seems more than enough\n    test $ac_count -gt 10 && break\n  done\n  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;\nesac\n\n      $ac_path_EGREP_found && break 3\n    done\n  done\n  done\nIFS=$as_save_IFS\n  if test -z \"$ac_cv_path_EGREP\"; then\n    as_fn_error $? \"no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin\" \"$LINENO\" 5\n  fi\nelse\n  ac_cv_path_EGREP=$EGREP\nfi\n\n   fi\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP\" >&5\n$as_echo \"$ac_cv_path_EGREP\" >&6; }\n EGREP=\"$ac_cv_path_EGREP\"\n\n\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for fgrep\" >&5\n$as_echo_n \"checking for fgrep... \" >&6; }\nif ${ac_cv_path_FGREP+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1\n   then ac_cv_path_FGREP=\"$GREP -F\"\n   else\n     if test -z \"$FGREP\"; then\n  ac_path_FGREP_found=false\n  # Loop through the user's path and test for each of PROGNAME-LIST\n  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    for ac_prog in fgrep; do\n    for ac_exec_ext in '' $ac_executable_extensions; do\n      ac_path_FGREP=\"$as_dir/$ac_prog$ac_exec_ext\"\n      as_fn_executable_p \"$ac_path_FGREP\" || continue\n# Check for GNU ac_path_FGREP and select it if it is found.\n  # Check for GNU $ac_path_FGREP\ncase `\"$ac_path_FGREP\" --version 2>&1` in\n*GNU*)\n  ac_cv_path_FGREP=\"$ac_path_FGREP\" ac_path_FGREP_found=:;;\n*)\n  ac_count=0\n  $as_echo_n 0123456789 >\"conftest.in\"\n  while :\n  do\n    cat \"conftest.in\" \"conftest.in\" >\"conftest.tmp\"\n    mv \"conftest.tmp\" \"conftest.in\"\n    cp \"conftest.in\" \"conftest.nl\"\n    $as_echo 'FGREP' >> \"conftest.nl\"\n    \"$ac_path_FGREP\" FGREP < \"conftest.nl\" >\"conftest.out\" 2>/dev/null || break\n    diff \"conftest.out\" \"conftest.nl\" >/dev/null 2>&1 || break\n    as_fn_arith $ac_count + 1 && ac_count=$as_val\n    if test $ac_count -gt ${ac_path_FGREP_max-0}; then\n      # Best one so far, save it but keep looking for a better one\n      ac_cv_path_FGREP=\"$ac_path_FGREP\"\n      ac_path_FGREP_max=$ac_count\n    fi\n    # 10*(2^10) chars as input seems more than enough\n    test $ac_count -gt 10 && break\n  done\n  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;\nesac\n\n      $ac_path_FGREP_found && break 3\n    done\n  done\n  done\nIFS=$as_save_IFS\n  if test -z \"$ac_cv_path_FGREP\"; then\n    as_fn_error $? \"no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin\" \"$LINENO\" 5\n  fi\nelse\n  ac_cv_path_FGREP=$FGREP\nfi\n\n   fi\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP\" >&5\n$as_echo \"$ac_cv_path_FGREP\" >&6; }\n FGREP=\"$ac_cv_path_FGREP\"\n\n\ntest -z \"$GREP\" && GREP=grep\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n# Check whether --with-gnu-ld was given.\nif test \"${with_gnu_ld+set}\" = set; then :\n  withval=$with_gnu_ld; test \"$withval\" = no || with_gnu_ld=yes\nelse\n  with_gnu_ld=no\nfi\n\nac_prog=ld\nif test \"$GCC\" = yes; then\n  # Check if gcc -print-prog-name=ld gives a path.\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: checking for ld used by $CC\" >&5\n$as_echo_n \"checking for ld used by $CC... \" >&6; }\n  case $host in\n  *-*-mingw*)\n    # gcc leaves a trailing carriage return which upsets mingw\n    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\\015'` ;;\n  *)\n    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;\n  esac\n  case $ac_prog in\n    # Accept absolute paths.\n    [\\\\/]* | ?:[\\\\/]*)\n      re_direlt='/[^/][^/]*/\\.\\./'\n      # Canonicalize the pathname of ld\n      ac_prog=`$ECHO \"$ac_prog\"| $SED 's%\\\\\\\\%/%g'`\n      while $ECHO \"$ac_prog\" | $GREP \"$re_direlt\" > /dev/null 2>&1; do\n\tac_prog=`$ECHO $ac_prog| $SED \"s%$re_direlt%/%\"`\n      done\n      test -z \"$LD\" && LD=\"$ac_prog\"\n      ;;\n  \"\")\n    # If it fails, then pretend we aren't using GCC.\n    ac_prog=ld\n    ;;\n  *)\n    # If it is relative, then search for the first ld in PATH.\n    with_gnu_ld=unknown\n    ;;\n  esac\nelif test \"$with_gnu_ld\" = yes; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: checking for GNU ld\" >&5\n$as_echo_n \"checking for GNU ld... \" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: checking for non-GNU ld\" >&5\n$as_echo_n \"checking for non-GNU ld... \" >&6; }\nfi\nif ${lt_cv_path_LD+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if test -z \"$LD\"; then\n  lt_save_ifs=\"$IFS\"; IFS=$PATH_SEPARATOR\n  for ac_dir in $PATH; do\n    IFS=\"$lt_save_ifs\"\n    test -z \"$ac_dir\" && ac_dir=.\n    if test -f \"$ac_dir/$ac_prog\" || test -f \"$ac_dir/$ac_prog$ac_exeext\"; then\n      lt_cv_path_LD=\"$ac_dir/$ac_prog\"\n      # Check to see if the program is GNU ld.  I'd rather use --version,\n      # but apparently some variants of GNU ld only accept -v.\n      # Break only if it was the GNU/non-GNU ld that we prefer.\n      case `\"$lt_cv_path_LD\" -v 2>&1 </dev/null` in\n      *GNU* | *'with BFD'*)\n\ttest \"$with_gnu_ld\" != no && break\n\t;;\n      *)\n\ttest \"$with_gnu_ld\" != yes && break\n\t;;\n      esac\n    fi\n  done\n  IFS=\"$lt_save_ifs\"\nelse\n  lt_cv_path_LD=\"$LD\" # Let the user override the test with a path.\nfi\nfi\n\nLD=\"$lt_cv_path_LD\"\nif test -n \"$LD\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $LD\" >&5\n$as_echo \"$LD\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\nfi\ntest -z \"$LD\" && as_fn_error $? \"no acceptable ld found in \\$PATH\" \"$LINENO\" 5\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld\" >&5\n$as_echo_n \"checking if the linker ($LD) is GNU ld... \" >&6; }\nif ${lt_cv_prog_gnu_ld+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  # I'd rather use --version here, but apparently some GNU lds only accept -v.\ncase `$LD -v 2>&1 </dev/null` in\n*GNU* | *'with BFD'*)\n  lt_cv_prog_gnu_ld=yes\n  ;;\n*)\n  lt_cv_prog_gnu_ld=no\n  ;;\nesac\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld\" >&5\n$as_echo \"$lt_cv_prog_gnu_ld\" >&6; }\nwith_gnu_ld=$lt_cv_prog_gnu_ld\n\n\n\n\n\n\n\n\n\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)\" >&5\n$as_echo_n \"checking for BSD- or MS-compatible name lister (nm)... \" >&6; }\nif ${lt_cv_path_NM+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if test -n \"$NM\"; then\n  # Let the user override the test.\n  lt_cv_path_NM=\"$NM\"\nelse\n  lt_nm_to_check=\"${ac_tool_prefix}nm\"\n  if test -n \"$ac_tool_prefix\" && test \"$build\" = \"$host\"; then\n    lt_nm_to_check=\"$lt_nm_to_check nm\"\n  fi\n  for lt_tmp_nm in $lt_nm_to_check; do\n    lt_save_ifs=\"$IFS\"; IFS=$PATH_SEPARATOR\n    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do\n      IFS=\"$lt_save_ifs\"\n      test -z \"$ac_dir\" && ac_dir=.\n      tmp_nm=\"$ac_dir/$lt_tmp_nm\"\n      if test -f \"$tmp_nm\" || test -f \"$tmp_nm$ac_exeext\" ; then\n\t# Check to see if the nm accepts a BSD-compat flag.\n\t# Adding the `sed 1q' prevents false positives on HP-UX, which says:\n\t#   nm: unknown option \"B\" ignored\n\t# Tru64's nm complains that /dev/null is an invalid object file\n\tcase `\"$tmp_nm\" -B /dev/null 2>&1 | sed '1q'` in\n\t*/dev/null* | *'Invalid file or object type'*)\n\t  lt_cv_path_NM=\"$tmp_nm -B\"\n\t  break\n\t  ;;\n\t*)\n\t  case `\"$tmp_nm\" -p /dev/null 2>&1 | sed '1q'` in\n\t  */dev/null*)\n\t    lt_cv_path_NM=\"$tmp_nm -p\"\n\t    break\n\t    ;;\n\t  *)\n\t    lt_cv_path_NM=${lt_cv_path_NM=\"$tmp_nm\"} # keep the first match, but\n\t    continue # so that we can try to find one that supports BSD flags\n\t    ;;\n\t  esac\n\t  ;;\n\tesac\n      fi\n    done\n    IFS=\"$lt_save_ifs\"\n  done\n  : ${lt_cv_path_NM=no}\nfi\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM\" >&5\n$as_echo \"$lt_cv_path_NM\" >&6; }\nif test \"$lt_cv_path_NM\" != \"no\"; then\n  NM=\"$lt_cv_path_NM\"\nelse\n  # Didn't find any BSD compatible name lister, look for dumpbin.\n  if test -n \"$DUMPBIN\"; then :\n    # Let the user override the test.\n  else\n    if test -n \"$ac_tool_prefix\"; then\n  for ac_prog in dumpbin \"link -dump\"\n  do\n    # Extract the first word of \"$ac_tool_prefix$ac_prog\", so it can be a program name with args.\nset dummy $ac_tool_prefix$ac_prog; ac_word=$2\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $ac_word\" >&5\n$as_echo_n \"checking for $ac_word... \" >&6; }\nif ${ac_cv_prog_DUMPBIN+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if test -n \"$DUMPBIN\"; then\n  ac_cv_prog_DUMPBIN=\"$DUMPBIN\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    for ac_exec_ext in '' $ac_executable_extensions; do\n  if as_fn_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_DUMPBIN=\"$ac_tool_prefix$ac_prog\"\n    $as_echo \"$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\n  done\nIFS=$as_save_IFS\n\nfi\nfi\nDUMPBIN=$ac_cv_prog_DUMPBIN\nif test -n \"$DUMPBIN\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $DUMPBIN\" >&5\n$as_echo \"$DUMPBIN\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\nfi\n\n\n    test -n \"$DUMPBIN\" && break\n  done\nfi\nif test -z \"$DUMPBIN\"; then\n  ac_ct_DUMPBIN=$DUMPBIN\n  for ac_prog in dumpbin \"link -dump\"\ndo\n  # Extract the first word of \"$ac_prog\", so it can be a program name with args.\nset dummy $ac_prog; ac_word=$2\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $ac_word\" >&5\n$as_echo_n \"checking for $ac_word... \" >&6; }\nif ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if test -n \"$ac_ct_DUMPBIN\"; then\n  ac_cv_prog_ac_ct_DUMPBIN=\"$ac_ct_DUMPBIN\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    for ac_exec_ext in '' $ac_executable_extensions; do\n  if as_fn_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_ac_ct_DUMPBIN=\"$ac_prog\"\n    $as_echo \"$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\n  done\nIFS=$as_save_IFS\n\nfi\nfi\nac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN\nif test -n \"$ac_ct_DUMPBIN\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN\" >&5\n$as_echo \"$ac_ct_DUMPBIN\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\nfi\n\n\n  test -n \"$ac_ct_DUMPBIN\" && break\ndone\n\n  if test \"x$ac_ct_DUMPBIN\" = x; then\n    DUMPBIN=\":\"\n  else\n    case $cross_compiling:$ac_tool_warned in\nyes:)\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet\" >&5\n$as_echo \"$as_me: WARNING: using cross tools not prefixed with host triplet\" >&2;}\nac_tool_warned=yes ;;\nesac\n    DUMPBIN=$ac_ct_DUMPBIN\n  fi\nfi\n\n    case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in\n    *COFF*)\n      DUMPBIN=\"$DUMPBIN -symbols\"\n      ;;\n    *)\n      DUMPBIN=:\n      ;;\n    esac\n  fi\n\n  if test \"$DUMPBIN\" != \":\"; then\n    NM=\"$DUMPBIN\"\n  fi\nfi\ntest -z \"$NM\" && NM=nm\n\n\n\n\n\n\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface\" >&5\n$as_echo_n \"checking the name lister ($NM) interface... \" >&6; }\nif ${lt_cv_nm_interface+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  lt_cv_nm_interface=\"BSD nm\"\n  echo \"int some_variable = 0;\" > conftest.$ac_ext\n  (eval echo \"\\\"\\$as_me:$LINENO: $ac_compile\\\"\" >&5)\n  (eval \"$ac_compile\" 2>conftest.err)\n  cat conftest.err >&5\n  (eval echo \"\\\"\\$as_me:$LINENO: $NM \\\\\\\"conftest.$ac_objext\\\\\\\"\\\"\" >&5)\n  (eval \"$NM \\\"conftest.$ac_objext\\\"\" 2>conftest.err > conftest.out)\n  cat conftest.err >&5\n  (eval echo \"\\\"\\$as_me:$LINENO: output\\\"\" >&5)\n  cat conftest.out >&5\n  if $GREP 'External.*some_variable' conftest.out > /dev/null; then\n    lt_cv_nm_interface=\"MS dumpbin\"\n  fi\n  rm -f conftest*\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface\" >&5\n$as_echo \"$lt_cv_nm_interface\" >&6; }\n\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking whether ln -s works\" >&5\n$as_echo_n \"checking whether ln -s works... \" >&6; }\nLN_S=$as_ln_s\nif test \"$LN_S\" = \"ln -s\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: yes\" >&5\n$as_echo \"yes\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no, using $LN_S\" >&5\n$as_echo \"no, using $LN_S\" >&6; }\nfi\n\n# find the maximum length of command line arguments\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments\" >&5\n$as_echo_n \"checking the maximum length of command line arguments... \" >&6; }\nif ${lt_cv_sys_max_cmd_len+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n    i=0\n  teststring=\"ABCD\"\n\n  case $build_os in\n  msdosdjgpp*)\n    # On DJGPP, this test can blow up pretty badly due to problems in libc\n    # (any single argument exceeding 2000 bytes causes a buffer overrun\n    # during glob expansion).  Even if it were fixed, the result of this\n    # check would be larger than it should be.\n    lt_cv_sys_max_cmd_len=12288;    # 12K is about right\n    ;;\n\n  gnu*)\n    # Under GNU Hurd, this test is not required because there is\n    # no limit to the length of command line arguments.\n    # Libtool will interpret -1 as no limit whatsoever\n    lt_cv_sys_max_cmd_len=-1;\n    ;;\n\n  cygwin* | mingw* | cegcc*)\n    # On Win9x/ME, this test blows up -- it succeeds, but takes\n    # about 5 minutes as the teststring grows exponentially.\n    # Worse, since 9x/ME are not pre-emptively multitasking,\n    # you end up with a \"frozen\" computer, even though with patience\n    # the test eventually succeeds (with a max line length of 256k).\n    # Instead, let's just punt: use the minimum linelength reported by\n    # all of the supported platforms: 8192 (on NT/2K/XP).\n    lt_cv_sys_max_cmd_len=8192;\n    ;;\n\n  mint*)\n    # On MiNT this can take a long time and run out of memory.\n    lt_cv_sys_max_cmd_len=8192;\n    ;;\n\n  amigaos*)\n    # On AmigaOS with pdksh, this test takes hours, literally.\n    # So we just punt and use a minimum line length of 8192.\n    lt_cv_sys_max_cmd_len=8192;\n    ;;\n\n  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)\n    # This has been around since 386BSD, at least.  Likely further.\n    if test -x /sbin/sysctl; then\n      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`\n    elif test -x /usr/sbin/sysctl; then\n      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`\n    else\n      lt_cv_sys_max_cmd_len=65536\t# usable default for all BSDs\n    fi\n    # And add a safety zone\n    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \\/ 4`\n    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \\* 3`\n    ;;\n\n  interix*)\n    # We know the value 262144 and hardcode it with a safety zone (like BSD)\n    lt_cv_sys_max_cmd_len=196608\n    ;;\n\n  os2*)\n    # The test takes a long time on OS/2.\n    lt_cv_sys_max_cmd_len=8192\n    ;;\n\n  osf*)\n    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure\n    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not\n    # nice to cause kernel panics so lets avoid the loop below.\n    # First set a reasonable default.\n    lt_cv_sys_max_cmd_len=16384\n    #\n    if test -x /sbin/sysconfig; then\n      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in\n        *1*) lt_cv_sys_max_cmd_len=-1 ;;\n      esac\n    fi\n    ;;\n  sco3.2v5*)\n    lt_cv_sys_max_cmd_len=102400\n    ;;\n  sysv5* | sco5v6* | sysv4.2uw2*)\n    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`\n    if test -n \"$kargmax\"; then\n      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[\t ]//'`\n    else\n      lt_cv_sys_max_cmd_len=32768\n    fi\n    ;;\n  *)\n    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`\n    if test -n \"$lt_cv_sys_max_cmd_len\" && \\\n\ttest undefined != \"$lt_cv_sys_max_cmd_len\"; then\n      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \\/ 4`\n      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \\* 3`\n    else\n      # Make teststring a little bigger before we do anything with it.\n      # a 1K string should be a reasonable start.\n      for i in 1 2 3 4 5 6 7 8 ; do\n        teststring=$teststring$teststring\n      done\n      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}\n      # If test is not a shell built-in, we'll probably end up computing a\n      # maximum length that is only half of the actual maximum length, but\n      # we can't tell.\n      while { test \"X\"`env echo \"$teststring$teststring\" 2>/dev/null` \\\n\t         = \"X$teststring$teststring\"; } >/dev/null 2>&1 &&\n\t      test $i != 17 # 1/2 MB should be enough\n      do\n        i=`expr $i + 1`\n        teststring=$teststring$teststring\n      done\n      # Only check the string length outside the loop.\n      lt_cv_sys_max_cmd_len=`expr \"X$teststring\" : \".*\" 2>&1`\n      teststring=\n      # Add a significant safety factor because C++ compilers can tack on\n      # massive amounts of additional arguments before passing them to the\n      # linker.  It appears as though 1/2 is a usable value.\n      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \\/ 2`\n    fi\n    ;;\n  esac\n\nfi\n\nif test -n $lt_cv_sys_max_cmd_len ; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len\" >&5\n$as_echo \"$lt_cv_sys_max_cmd_len\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: none\" >&5\n$as_echo \"none\" >&6; }\nfi\nmax_cmd_len=$lt_cv_sys_max_cmd_len\n\n\n\n\n\n\n: ${CP=\"cp -f\"}\n: ${MV=\"mv -f\"}\n: ${RM=\"rm -f\"}\n\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs\" >&5\n$as_echo_n \"checking whether the shell understands some XSI constructs... \" >&6; }\n# Try some XSI features\nxsi_shell=no\n( _lt_dummy=\"a/b/c\"\n  test \"${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}\"${_lt_dummy%\"$_lt_dummy\"}, \\\n      = c,a/b,b/c, \\\n    && eval 'test $(( 1 + 1 )) -eq 2 \\\n    && test \"${#_lt_dummy}\" -eq 5' ) >/dev/null 2>&1 \\\n  && xsi_shell=yes\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $xsi_shell\" >&5\n$as_echo \"$xsi_shell\" >&6; }\n\n\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking whether the shell understands \\\"+=\\\"\" >&5\n$as_echo_n \"checking whether the shell understands \\\"+=\\\"... \" >&6; }\nlt_shell_append=no\n( foo=bar; set foo baz; eval \"$1+=\\$2\" && test \"$foo\" = barbaz ) \\\n    >/dev/null 2>&1 \\\n  && lt_shell_append=yes\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $lt_shell_append\" >&5\n$as_echo \"$lt_shell_append\" >&6; }\n\n\nif ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then\n  lt_unset=unset\nelse\n  lt_unset=false\nfi\n\n\n\n\n\n# test EBCDIC or ASCII\ncase `echo X|tr X '\\101'` in\n A) # ASCII based system\n    # \\n is not interpreted correctly by Solaris 8 /usr/ucb/tr\n  lt_SP2NL='tr \\040 \\012'\n  lt_NL2SP='tr \\015\\012 \\040\\040'\n  ;;\n *) # EBCDIC based system\n  lt_SP2NL='tr \\100 \\n'\n  lt_NL2SP='tr \\r\\n \\100\\100'\n  ;;\nesac\n\n\n\n\n\n\n\n\n\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format\" >&5\n$as_echo_n \"checking how to convert $build file names to $host format... \" >&6; }\nif ${lt_cv_to_host_file_cmd+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  case $host in\n  *-*-mingw* )\n    case $build in\n      *-*-mingw* ) # actually msys\n        lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32\n        ;;\n      *-*-cygwin* )\n        lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32\n        ;;\n      * ) # otherwise, assume *nix\n        lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32\n        ;;\n    esac\n    ;;\n  *-*-cygwin* )\n    case $build in\n      *-*-mingw* ) # actually msys\n        lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin\n        ;;\n      *-*-cygwin* )\n        lt_cv_to_host_file_cmd=func_convert_file_noop\n        ;;\n      * ) # otherwise, assume *nix\n        lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin\n        ;;\n    esac\n    ;;\n  * ) # unhandled hosts (and \"normal\" native builds)\n    lt_cv_to_host_file_cmd=func_convert_file_noop\n    ;;\nesac\n\nfi\n\nto_host_file_cmd=$lt_cv_to_host_file_cmd\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd\" >&5\n$as_echo \"$lt_cv_to_host_file_cmd\" >&6; }\n\n\n\n\n\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format\" >&5\n$as_echo_n \"checking how to convert $build file names to toolchain format... \" >&6; }\nif ${lt_cv_to_tool_file_cmd+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  #assume ordinary cross tools, or native build.\nlt_cv_to_tool_file_cmd=func_convert_file_noop\ncase $host in\n  *-*-mingw* )\n    case $build in\n      *-*-mingw* ) # actually msys\n        lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32\n        ;;\n    esac\n    ;;\nesac\n\nfi\n\nto_tool_file_cmd=$lt_cv_to_tool_file_cmd\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd\" >&5\n$as_echo \"$lt_cv_to_tool_file_cmd\" >&6; }\n\n\n\n\n\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files\" >&5\n$as_echo_n \"checking for $LD option to reload object files... \" >&6; }\nif ${lt_cv_ld_reload_flag+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  lt_cv_ld_reload_flag='-r'\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag\" >&5\n$as_echo \"$lt_cv_ld_reload_flag\" >&6; }\nreload_flag=$lt_cv_ld_reload_flag\ncase $reload_flag in\n\"\" | \" \"*) ;;\n*) reload_flag=\" $reload_flag\" ;;\nesac\nreload_cmds='$LD$reload_flag -o $output$reload_objs'\ncase $host_os in\n  cygwin* | mingw* | pw32* | cegcc*)\n    if test \"$GCC\" != yes; then\n      reload_cmds=false\n    fi\n    ;;\n  darwin*)\n    if test \"$GCC\" = yes; then\n      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'\n    else\n      reload_cmds='$LD$reload_flag -o $output$reload_objs'\n    fi\n    ;;\nesac\n\n\n\n\n\n\n\n\n\nif test -n \"$ac_tool_prefix\"; then\n  # Extract the first word of \"${ac_tool_prefix}objdump\", so it can be a program name with args.\nset dummy ${ac_tool_prefix}objdump; ac_word=$2\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $ac_word\" >&5\n$as_echo_n \"checking for $ac_word... \" >&6; }\nif ${ac_cv_prog_OBJDUMP+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if test -n \"$OBJDUMP\"; then\n  ac_cv_prog_OBJDUMP=\"$OBJDUMP\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    for ac_exec_ext in '' $ac_executable_extensions; do\n  if as_fn_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_OBJDUMP=\"${ac_tool_prefix}objdump\"\n    $as_echo \"$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\n  done\nIFS=$as_save_IFS\n\nfi\nfi\nOBJDUMP=$ac_cv_prog_OBJDUMP\nif test -n \"$OBJDUMP\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $OBJDUMP\" >&5\n$as_echo \"$OBJDUMP\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\nfi\n\n\nfi\nif test -z \"$ac_cv_prog_OBJDUMP\"; then\n  ac_ct_OBJDUMP=$OBJDUMP\n  # Extract the first word of \"objdump\", so it can be a program name with args.\nset dummy objdump; ac_word=$2\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $ac_word\" >&5\n$as_echo_n \"checking for $ac_word... \" >&6; }\nif ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if test -n \"$ac_ct_OBJDUMP\"; then\n  ac_cv_prog_ac_ct_OBJDUMP=\"$ac_ct_OBJDUMP\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    for ac_exec_ext in '' $ac_executable_extensions; do\n  if as_fn_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_ac_ct_OBJDUMP=\"objdump\"\n    $as_echo \"$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\n  done\nIFS=$as_save_IFS\n\nfi\nfi\nac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP\nif test -n \"$ac_ct_OBJDUMP\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP\" >&5\n$as_echo \"$ac_ct_OBJDUMP\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\nfi\n\n  if test \"x$ac_ct_OBJDUMP\" = x; then\n    OBJDUMP=\"false\"\n  else\n    case $cross_compiling:$ac_tool_warned in\nyes:)\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet\" >&5\n$as_echo \"$as_me: WARNING: using cross tools not prefixed with host triplet\" >&2;}\nac_tool_warned=yes ;;\nesac\n    OBJDUMP=$ac_ct_OBJDUMP\n  fi\nelse\n  OBJDUMP=\"$ac_cv_prog_OBJDUMP\"\nfi\n\ntest -z \"$OBJDUMP\" && OBJDUMP=objdump\n\n\n\n\n\n\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries\" >&5\n$as_echo_n \"checking how to recognize dependent libraries... \" >&6; }\nif ${lt_cv_deplibs_check_method+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  lt_cv_file_magic_cmd='$MAGIC_CMD'\nlt_cv_file_magic_test_file=\nlt_cv_deplibs_check_method='unknown'\n# Need to set the preceding variable on all platforms that support\n# interlibrary dependencies.\n# 'none' -- dependencies not supported.\n# `unknown' -- same as none, but documents that we really don't know.\n# 'pass_all' -- all dependencies passed with no checks.\n# 'test_compile' -- check by making test program.\n# 'file_magic [[regex]]' -- check by looking for files in library path\n# which responds to the $file_magic_cmd with a given extended regex.\n# If you have `file' or equivalent on your system and you're not sure\n# whether `pass_all' will *always* work, you probably want this one.\n\ncase $host_os in\naix[4-9]*)\n  lt_cv_deplibs_check_method=pass_all\n  ;;\n\nbeos*)\n  lt_cv_deplibs_check_method=pass_all\n  ;;\n\nbsdi[45]*)\n  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'\n  lt_cv_file_magic_cmd='/usr/bin/file -L'\n  lt_cv_file_magic_test_file=/shlib/libc.so\n  ;;\n\ncygwin*)\n  # func_win32_libid is a shell function defined in ltmain.sh\n  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'\n  lt_cv_file_magic_cmd='func_win32_libid'\n  ;;\n\nmingw* | pw32*)\n  # Base MSYS/MinGW do not provide the 'file' command needed by\n  # func_win32_libid shell function, so use a weaker test based on 'objdump',\n  # unless we find 'file', for example because we are cross-compiling.\n  # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.\n  if ( test \"$lt_cv_nm_interface\" = \"BSD nm\" && file / ) >/dev/null 2>&1; then\n    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'\n    lt_cv_file_magic_cmd='func_win32_libid'\n  else\n    # Keep this pattern in sync with the one in func_win32_libid.\n    lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'\n    lt_cv_file_magic_cmd='$OBJDUMP -f'\n  fi\n  ;;\n\ncegcc*)\n  # use the weaker test based on 'objdump'. See mingw*.\n  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'\n  lt_cv_file_magic_cmd='$OBJDUMP -f'\n  ;;\n\ndarwin* | rhapsody*)\n  lt_cv_deplibs_check_method=pass_all\n  ;;\n\nfreebsd* | dragonfly*)\n  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then\n    case $host_cpu in\n    i*86 )\n      # Not sure whether the presence of OpenBSD here was a mistake.\n      # Let's accept both of them until this is cleared up.\n      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'\n      lt_cv_file_magic_cmd=/usr/bin/file\n      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`\n      ;;\n    esac\n  else\n    lt_cv_deplibs_check_method=pass_all\n  fi\n  ;;\n\nhaiku*)\n  lt_cv_deplibs_check_method=pass_all\n  ;;\n\nhpux10.20* | hpux11*)\n  lt_cv_file_magic_cmd=/usr/bin/file\n  case $host_cpu in\n  ia64*)\n    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'\n    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so\n    ;;\n  hppa*64*)\n    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\\.[0-9]'\n    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl\n    ;;\n  *)\n    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\\.[0-9]) shared library'\n    lt_cv_file_magic_test_file=/usr/lib/libc.sl\n    ;;\n  esac\n  ;;\n\ninterix[3-9]*)\n  # PIC code is broken on Interix 3.x, that's why |\\.a not |_pic\\.a here\n  lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\\.so|\\.a)$'\n  ;;\n\nirix5* | irix6* | nonstopux*)\n  case $LD in\n  *-32|*\"-32 \") libmagic=32-bit;;\n  *-n32|*\"-n32 \") libmagic=N32;;\n  *-64|*\"-64 \") libmagic=64-bit;;\n  *) libmagic=never-match;;\n  esac\n  lt_cv_deplibs_check_method=pass_all\n  ;;\n\n# This must be glibc/ELF.\nlinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)\n  lt_cv_deplibs_check_method=pass_all\n  ;;\n\nnetbsd* | netbsdelf*-gnu)\n  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then\n    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\\.so\\.[0-9]+\\.[0-9]+|_pic\\.a)$'\n  else\n    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\\.so|_pic\\.a)$'\n  fi\n  ;;\n\nnewos6*)\n  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'\n  lt_cv_file_magic_cmd=/usr/bin/file\n  lt_cv_file_magic_test_file=/usr/lib/libnls.so\n  ;;\n\n*nto* | *qnx*)\n  lt_cv_deplibs_check_method=pass_all\n  ;;\n\nopenbsd*)\n  if test -z \"`echo __ELF__ | $CC -E - | $GREP __ELF__`\" || test \"$host_os-$host_cpu\" = \"openbsd2.8-powerpc\"; then\n    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\\.so\\.[0-9]+\\.[0-9]+|\\.so|_pic\\.a)$'\n  else\n    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\\.so\\.[0-9]+\\.[0-9]+|_pic\\.a)$'\n  fi\n  ;;\n\nosf3* | osf4* | osf5*)\n  lt_cv_deplibs_check_method=pass_all\n  ;;\n\nrdos*)\n  lt_cv_deplibs_check_method=pass_all\n  ;;\n\nsolaris*)\n  lt_cv_deplibs_check_method=pass_all\n  ;;\n\nsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)\n  lt_cv_deplibs_check_method=pass_all\n  ;;\n\nsysv4 | sysv4.3*)\n  case $host_vendor in\n  motorola)\n    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'\n    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`\n    ;;\n  ncr)\n    lt_cv_deplibs_check_method=pass_all\n    ;;\n  sequent)\n    lt_cv_file_magic_cmd='/bin/file'\n    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'\n    ;;\n  sni)\n    lt_cv_file_magic_cmd='/bin/file'\n    lt_cv_deplibs_check_method=\"file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib\"\n    lt_cv_file_magic_test_file=/lib/libc.so\n    ;;\n  siemens)\n    lt_cv_deplibs_check_method=pass_all\n    ;;\n  pc)\n    lt_cv_deplibs_check_method=pass_all\n    ;;\n  esac\n  ;;\n\ntpf*)\n  lt_cv_deplibs_check_method=pass_all\n  ;;\nesac\n\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method\" >&5\n$as_echo \"$lt_cv_deplibs_check_method\" >&6; }\n\nfile_magic_glob=\nwant_nocaseglob=no\nif test \"$build\" = \"$host\"; then\n  case $host_os in\n  mingw* | pw32*)\n    if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then\n      want_nocaseglob=yes\n    else\n      file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e \"s/\\(..\\)/s\\/[\\1]\\/[\\1]\\/g;/g\"`\n    fi\n    ;;\n  esac\nfi\n\nfile_magic_cmd=$lt_cv_file_magic_cmd\ndeplibs_check_method=$lt_cv_deplibs_check_method\ntest -z \"$deplibs_check_method\" && deplibs_check_method=unknown\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nif test -n \"$ac_tool_prefix\"; then\n  # Extract the first word of \"${ac_tool_prefix}dlltool\", so it can be a program name with args.\nset dummy ${ac_tool_prefix}dlltool; ac_word=$2\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $ac_word\" >&5\n$as_echo_n \"checking for $ac_word... \" >&6; }\nif ${ac_cv_prog_DLLTOOL+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if test -n \"$DLLTOOL\"; then\n  ac_cv_prog_DLLTOOL=\"$DLLTOOL\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    for ac_exec_ext in '' $ac_executable_extensions; do\n  if as_fn_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_DLLTOOL=\"${ac_tool_prefix}dlltool\"\n    $as_echo \"$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\n  done\nIFS=$as_save_IFS\n\nfi\nfi\nDLLTOOL=$ac_cv_prog_DLLTOOL\nif test -n \"$DLLTOOL\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $DLLTOOL\" >&5\n$as_echo \"$DLLTOOL\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\nfi\n\n\nfi\nif test -z \"$ac_cv_prog_DLLTOOL\"; then\n  ac_ct_DLLTOOL=$DLLTOOL\n  # Extract the first word of \"dlltool\", so it can be a program name with args.\nset dummy dlltool; ac_word=$2\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $ac_word\" >&5\n$as_echo_n \"checking for $ac_word... \" >&6; }\nif ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if test -n \"$ac_ct_DLLTOOL\"; then\n  ac_cv_prog_ac_ct_DLLTOOL=\"$ac_ct_DLLTOOL\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    for ac_exec_ext in '' $ac_executable_extensions; do\n  if as_fn_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_ac_ct_DLLTOOL=\"dlltool\"\n    $as_echo \"$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\n  done\nIFS=$as_save_IFS\n\nfi\nfi\nac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL\nif test -n \"$ac_ct_DLLTOOL\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL\" >&5\n$as_echo \"$ac_ct_DLLTOOL\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\nfi\n\n  if test \"x$ac_ct_DLLTOOL\" = x; then\n    DLLTOOL=\"false\"\n  else\n    case $cross_compiling:$ac_tool_warned in\nyes:)\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet\" >&5\n$as_echo \"$as_me: WARNING: using cross tools not prefixed with host triplet\" >&2;}\nac_tool_warned=yes ;;\nesac\n    DLLTOOL=$ac_ct_DLLTOOL\n  fi\nelse\n  DLLTOOL=\"$ac_cv_prog_DLLTOOL\"\nfi\n\ntest -z \"$DLLTOOL\" && DLLTOOL=dlltool\n\n\n\n\n\n\n\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries\" >&5\n$as_echo_n \"checking how to associate runtime and link libraries... \" >&6; }\nif ${lt_cv_sharedlib_from_linklib_cmd+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  lt_cv_sharedlib_from_linklib_cmd='unknown'\n\ncase $host_os in\ncygwin* | mingw* | pw32* | cegcc*)\n  # two different shell functions defined in ltmain.sh\n  # decide which to use based on capabilities of $DLLTOOL\n  case `$DLLTOOL --help 2>&1` in\n  *--identify-strict*)\n    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib\n    ;;\n  *)\n    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback\n    ;;\n  esac\n  ;;\n*)\n  # fallback: assume linklib IS sharedlib\n  lt_cv_sharedlib_from_linklib_cmd=\"$ECHO\"\n  ;;\nesac\n\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd\" >&5\n$as_echo \"$lt_cv_sharedlib_from_linklib_cmd\" >&6; }\nsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd\ntest -z \"$sharedlib_from_linklib_cmd\" && sharedlib_from_linklib_cmd=$ECHO\n\n\n\n\n\n\n\n\nif test -n \"$ac_tool_prefix\"; then\n  for ac_prog in ar\n  do\n    # Extract the first word of \"$ac_tool_prefix$ac_prog\", so it can be a program name with args.\nset dummy $ac_tool_prefix$ac_prog; ac_word=$2\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $ac_word\" >&5\n$as_echo_n \"checking for $ac_word... \" >&6; }\nif ${ac_cv_prog_AR+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if test -n \"$AR\"; then\n  ac_cv_prog_AR=\"$AR\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    for ac_exec_ext in '' $ac_executable_extensions; do\n  if as_fn_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_AR=\"$ac_tool_prefix$ac_prog\"\n    $as_echo \"$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\n  done\nIFS=$as_save_IFS\n\nfi\nfi\nAR=$ac_cv_prog_AR\nif test -n \"$AR\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $AR\" >&5\n$as_echo \"$AR\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\nfi\n\n\n    test -n \"$AR\" && break\n  done\nfi\nif test -z \"$AR\"; then\n  ac_ct_AR=$AR\n  for ac_prog in ar\ndo\n  # Extract the first word of \"$ac_prog\", so it can be a program name with args.\nset dummy $ac_prog; ac_word=$2\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $ac_word\" >&5\n$as_echo_n \"checking for $ac_word... \" >&6; }\nif ${ac_cv_prog_ac_ct_AR+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if test -n \"$ac_ct_AR\"; then\n  ac_cv_prog_ac_ct_AR=\"$ac_ct_AR\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    for ac_exec_ext in '' $ac_executable_extensions; do\n  if as_fn_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_ac_ct_AR=\"$ac_prog\"\n    $as_echo \"$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\n  done\nIFS=$as_save_IFS\n\nfi\nfi\nac_ct_AR=$ac_cv_prog_ac_ct_AR\nif test -n \"$ac_ct_AR\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR\" >&5\n$as_echo \"$ac_ct_AR\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\nfi\n\n\n  test -n \"$ac_ct_AR\" && break\ndone\n\n  if test \"x$ac_ct_AR\" = x; then\n    AR=\"false\"\n  else\n    case $cross_compiling:$ac_tool_warned in\nyes:)\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet\" >&5\n$as_echo \"$as_me: WARNING: using cross tools not prefixed with host triplet\" >&2;}\nac_tool_warned=yes ;;\nesac\n    AR=$ac_ct_AR\n  fi\nfi\n\n: ${AR=ar}\n: ${AR_FLAGS=cru}\n\n\n\n\n\n\n\n\n\n\n\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support\" >&5\n$as_echo_n \"checking for archiver @FILE support... \" >&6; }\nif ${lt_cv_ar_at_file+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  lt_cv_ar_at_file=no\n   cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n\nint\nmain ()\n{\n\n  ;\n  return 0;\n}\n_ACEOF\nif ac_fn_c_try_compile \"$LINENO\"; then :\n  echo conftest.$ac_objext > conftest.lst\n      lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5'\n      { { eval echo \"\\\"\\$as_me\\\":${as_lineno-$LINENO}: \\\"$lt_ar_try\\\"\"; } >&5\n  (eval $lt_ar_try) 2>&5\n  ac_status=$?\n  $as_echo \"$as_me:${as_lineno-$LINENO}: \\$? = $ac_status\" >&5\n  test $ac_status = 0; }\n      if test \"$ac_status\" -eq 0; then\n\t# Ensure the archiver fails upon bogus file names.\n\trm -f conftest.$ac_objext libconftest.a\n\t{ { eval echo \"\\\"\\$as_me\\\":${as_lineno-$LINENO}: \\\"$lt_ar_try\\\"\"; } >&5\n  (eval $lt_ar_try) 2>&5\n  ac_status=$?\n  $as_echo \"$as_me:${as_lineno-$LINENO}: \\$? = $ac_status\" >&5\n  test $ac_status = 0; }\n\tif test \"$ac_status\" -ne 0; then\n          lt_cv_ar_at_file=@\n        fi\n      fi\n      rm -f conftest.* libconftest.a\n\nfi\nrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext\n\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file\" >&5\n$as_echo \"$lt_cv_ar_at_file\" >&6; }\n\nif test \"x$lt_cv_ar_at_file\" = xno; then\n  archiver_list_spec=\nelse\n  archiver_list_spec=$lt_cv_ar_at_file\nfi\n\n\n\n\n\n\n\nif test -n \"$ac_tool_prefix\"; then\n  # Extract the first word of \"${ac_tool_prefix}strip\", so it can be a program name with args.\nset dummy ${ac_tool_prefix}strip; ac_word=$2\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $ac_word\" >&5\n$as_echo_n \"checking for $ac_word... \" >&6; }\nif ${ac_cv_prog_STRIP+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if test -n \"$STRIP\"; then\n  ac_cv_prog_STRIP=\"$STRIP\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    for ac_exec_ext in '' $ac_executable_extensions; do\n  if as_fn_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_STRIP=\"${ac_tool_prefix}strip\"\n    $as_echo \"$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\n  done\nIFS=$as_save_IFS\n\nfi\nfi\nSTRIP=$ac_cv_prog_STRIP\nif test -n \"$STRIP\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $STRIP\" >&5\n$as_echo \"$STRIP\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\nfi\n\n\nfi\nif test -z \"$ac_cv_prog_STRIP\"; then\n  ac_ct_STRIP=$STRIP\n  # Extract the first word of \"strip\", so it can be a program name with args.\nset dummy strip; ac_word=$2\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $ac_word\" >&5\n$as_echo_n \"checking for $ac_word... \" >&6; }\nif ${ac_cv_prog_ac_ct_STRIP+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if test -n \"$ac_ct_STRIP\"; then\n  ac_cv_prog_ac_ct_STRIP=\"$ac_ct_STRIP\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    for ac_exec_ext in '' $ac_executable_extensions; do\n  if as_fn_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_ac_ct_STRIP=\"strip\"\n    $as_echo \"$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\n  done\nIFS=$as_save_IFS\n\nfi\nfi\nac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP\nif test -n \"$ac_ct_STRIP\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP\" >&5\n$as_echo \"$ac_ct_STRIP\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\nfi\n\n  if test \"x$ac_ct_STRIP\" = x; then\n    STRIP=\":\"\n  else\n    case $cross_compiling:$ac_tool_warned in\nyes:)\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet\" >&5\n$as_echo \"$as_me: WARNING: using cross tools not prefixed with host triplet\" >&2;}\nac_tool_warned=yes ;;\nesac\n    STRIP=$ac_ct_STRIP\n  fi\nelse\n  STRIP=\"$ac_cv_prog_STRIP\"\nfi\n\ntest -z \"$STRIP\" && STRIP=:\n\n\n\n\n\n\nif test -n \"$ac_tool_prefix\"; then\n  # Extract the first word of \"${ac_tool_prefix}ranlib\", so it can be a program name with args.\nset dummy ${ac_tool_prefix}ranlib; ac_word=$2\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $ac_word\" >&5\n$as_echo_n \"checking for $ac_word... \" >&6; }\nif ${ac_cv_prog_RANLIB+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if test -n \"$RANLIB\"; then\n  ac_cv_prog_RANLIB=\"$RANLIB\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    for ac_exec_ext in '' $ac_executable_extensions; do\n  if as_fn_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_RANLIB=\"${ac_tool_prefix}ranlib\"\n    $as_echo \"$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\n  done\nIFS=$as_save_IFS\n\nfi\nfi\nRANLIB=$ac_cv_prog_RANLIB\nif test -n \"$RANLIB\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $RANLIB\" >&5\n$as_echo \"$RANLIB\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\nfi\n\n\nfi\nif test -z \"$ac_cv_prog_RANLIB\"; then\n  ac_ct_RANLIB=$RANLIB\n  # Extract the first word of \"ranlib\", so it can be a program name with args.\nset dummy ranlib; ac_word=$2\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $ac_word\" >&5\n$as_echo_n \"checking for $ac_word... \" >&6; }\nif ${ac_cv_prog_ac_ct_RANLIB+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if test -n \"$ac_ct_RANLIB\"; then\n  ac_cv_prog_ac_ct_RANLIB=\"$ac_ct_RANLIB\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    for ac_exec_ext in '' $ac_executable_extensions; do\n  if as_fn_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_ac_ct_RANLIB=\"ranlib\"\n    $as_echo \"$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\n  done\nIFS=$as_save_IFS\n\nfi\nfi\nac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB\nif test -n \"$ac_ct_RANLIB\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB\" >&5\n$as_echo \"$ac_ct_RANLIB\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\nfi\n\n  if test \"x$ac_ct_RANLIB\" = x; then\n    RANLIB=\":\"\n  else\n    case $cross_compiling:$ac_tool_warned in\nyes:)\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet\" >&5\n$as_echo \"$as_me: WARNING: using cross tools not prefixed with host triplet\" >&2;}\nac_tool_warned=yes ;;\nesac\n    RANLIB=$ac_ct_RANLIB\n  fi\nelse\n  RANLIB=\"$ac_cv_prog_RANLIB\"\nfi\n\ntest -z \"$RANLIB\" && RANLIB=:\n\n\n\n\n\n\n# Determine commands to create old-style static archives.\nold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'\nold_postinstall_cmds='chmod 644 $oldlib'\nold_postuninstall_cmds=\n\nif test -n \"$RANLIB\"; then\n  case $host_os in\n  openbsd*)\n    old_postinstall_cmds=\"$old_postinstall_cmds~\\$RANLIB -t \\$tool_oldlib\"\n    ;;\n  *)\n    old_postinstall_cmds=\"$old_postinstall_cmds~\\$RANLIB \\$tool_oldlib\"\n    ;;\n  esac\n  old_archive_cmds=\"$old_archive_cmds~\\$RANLIB \\$tool_oldlib\"\nfi\n\ncase $host_os in\n  darwin*)\n    lock_old_archive_extraction=yes ;;\n  *)\n    lock_old_archive_extraction=no ;;\nesac\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfor ac_prog in gawk mawk nawk awk\ndo\n  # Extract the first word of \"$ac_prog\", so it can be a program name with args.\nset dummy $ac_prog; ac_word=$2\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $ac_word\" >&5\n$as_echo_n \"checking for $ac_word... \" >&6; }\nif ${ac_cv_prog_AWK+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if test -n \"$AWK\"; then\n  ac_cv_prog_AWK=\"$AWK\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    for ac_exec_ext in '' $ac_executable_extensions; do\n  if as_fn_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_AWK=\"$ac_prog\"\n    $as_echo \"$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\n  done\nIFS=$as_save_IFS\n\nfi\nfi\nAWK=$ac_cv_prog_AWK\nif test -n \"$AWK\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $AWK\" >&5\n$as_echo \"$AWK\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\nfi\n\n\n  test -n \"$AWK\" && break\ndone\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n# If no C compiler was specified, use CC.\nLTCC=${LTCC-\"$CC\"}\n\n# If no C compiler flags were specified, use CFLAGS.\nLTCFLAGS=${LTCFLAGS-\"$CFLAGS\"}\n\n# Allow CC to be a program name with arguments.\ncompiler=$CC\n\n\n# Check for command to grab the raw symbol name followed by C symbol from nm.\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object\" >&5\n$as_echo_n \"checking command to parse $NM output from $compiler object... \" >&6; }\nif ${lt_cv_sys_global_symbol_pipe+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n\n# These are sane defaults that work on at least a few old systems.\n# [They come from Ultrix.  What could be older than Ultrix?!! ;)]\n\n# Character class describing NM global symbol codes.\nsymcode='[BCDEGRST]'\n\n# Regexp to match symbols that can be accessed directly from C.\nsympat='\\([_A-Za-z][_A-Za-z0-9]*\\)'\n\n# Define system-specific variables.\ncase $host_os in\naix*)\n  symcode='[BCDT]'\n  ;;\ncygwin* | mingw* | pw32* | cegcc*)\n  symcode='[ABCDGISTW]'\n  ;;\nhpux*)\n  if test \"$host_cpu\" = ia64; then\n    symcode='[ABCDEGRST]'\n  fi\n  ;;\nirix* | nonstopux*)\n  symcode='[BCDEGRST]'\n  ;;\nosf*)\n  symcode='[BCDEGQRST]'\n  ;;\nsolaris*)\n  symcode='[BDRT]'\n  ;;\nsco3.2v5*)\n  symcode='[DT]'\n  ;;\nsysv4.2uw2*)\n  symcode='[DT]'\n  ;;\nsysv5* | sco5v6* | unixware* | OpenUNIX*)\n  symcode='[ABDT]'\n  ;;\nsysv4)\n  symcode='[DFNSTU]'\n  ;;\nesac\n\n# If we're using GNU nm, then use its standard symbol codes.\ncase `$NM -V 2>&1` in\n*GNU* | *'with BFD'*)\n  symcode='[ABCDGIRSTW]' ;;\nesac\n\n# Transform an extracted symbol line into a proper C declaration.\n# Some systems (esp. on ia64) link data and code symbols differently,\n# so use this general approach.\nlt_cv_sys_global_symbol_to_cdecl=\"sed -n -e 's/^T .* \\(.*\\)$/extern int \\1();/p' -e 's/^$symcode* .* \\(.*\\)$/extern char \\1;/p'\"\n\n# Transform an extracted symbol line into symbol name and symbol address\nlt_cv_sys_global_symbol_to_c_name_address=\"sed -n -e 's/^: \\([^ ]*\\)[ ]*$/  {\\\\\\\"\\1\\\\\\\", (void *) 0},/p' -e 's/^$symcode* \\([^ ]*\\) \\([^ ]*\\)$/  {\\\"\\2\\\", (void *) \\&\\2},/p'\"\nlt_cv_sys_global_symbol_to_c_name_address_lib_prefix=\"sed -n -e 's/^: \\([^ ]*\\)[ ]*$/  {\\\\\\\"\\1\\\\\\\", (void *) 0},/p' -e 's/^$symcode* \\([^ ]*\\) \\(lib[^ ]*\\)$/  {\\\"\\2\\\", (void *) \\&\\2},/p' -e 's/^$symcode* \\([^ ]*\\) \\([^ ]*\\)$/  {\\\"lib\\2\\\", (void *) \\&\\2},/p'\"\n\n# Handle CRLF in mingw tool chain\nopt_cr=\ncase $build_os in\nmingw*)\n  opt_cr=`$ECHO 'x\\{0,1\\}' | tr x '\\015'` # option cr in regexp\n  ;;\nesac\n\n# Try without a prefix underscore, then with it.\nfor ac_symprfx in \"\" \"_\"; do\n\n  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.\n  symxfrm=\"\\\\1 $ac_symprfx\\\\2 \\\\2\"\n\n  # Write the raw and C identifiers.\n  if test \"$lt_cv_nm_interface\" = \"MS dumpbin\"; then\n    # Fake it for dumpbin and say T for any non-static function\n    # and D for any global variable.\n    # Also find C++ and __fastcall symbols from MSVC++,\n    # which start with @ or ?.\n    lt_cv_sys_global_symbol_pipe=\"$AWK '\"\\\n\"     {last_section=section; section=\\$ 3};\"\\\n\"     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};\"\\\n\"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};\"\\\n\"     \\$ 0!~/External *\\|/{next};\"\\\n\"     / 0+ UNDEF /{next}; / UNDEF \\([^|]\\)*()/{next};\"\\\n\"     {if(hide[section]) next};\"\\\n\"     {f=0}; \\$ 0~/\\(\\).*\\|/{f=1}; {printf f ? \\\"T \\\" : \\\"D \\\"};\"\\\n\"     {split(\\$ 0, a, /\\||\\r/); split(a[2], s)};\"\\\n\"     s[1]~/^[@?]/{print s[1], s[1]; next};\"\\\n\"     s[1]~prfx {split(s[1],t,\\\"@\\\"); print t[1], substr(t[1],length(prfx))}\"\\\n\"     ' prfx=^$ac_symprfx\"\n  else\n    lt_cv_sys_global_symbol_pipe=\"sed -n -e 's/^.*[\t ]\\($symcode$symcode*\\)[\t ][\t ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'\"\n  fi\n  lt_cv_sys_global_symbol_pipe=\"$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'\"\n\n  # Check to see that the pipe works correctly.\n  pipe_works=no\n\n  rm -f conftest*\n  cat > conftest.$ac_ext <<_LT_EOF\n#ifdef __cplusplus\nextern \"C\" {\n#endif\nchar nm_test_var;\nvoid nm_test_func(void);\nvoid nm_test_func(void){}\n#ifdef __cplusplus\n}\n#endif\nint main(){nm_test_var='a';nm_test_func();return(0);}\n_LT_EOF\n\n  if { { eval echo \"\\\"\\$as_me\\\":${as_lineno-$LINENO}: \\\"$ac_compile\\\"\"; } >&5\n  (eval $ac_compile) 2>&5\n  ac_status=$?\n  $as_echo \"$as_me:${as_lineno-$LINENO}: \\$? = $ac_status\" >&5\n  test $ac_status = 0; }; then\n    # Now try to grab the symbols.\n    nlist=conftest.nm\n    if { { eval echo \"\\\"\\$as_me\\\":${as_lineno-$LINENO}: \\\"$NM conftest.$ac_objext \\| \"$lt_cv_sys_global_symbol_pipe\" \\> $nlist\\\"\"; } >&5\n  (eval $NM conftest.$ac_objext \\| \"$lt_cv_sys_global_symbol_pipe\" \\> $nlist) 2>&5\n  ac_status=$?\n  $as_echo \"$as_me:${as_lineno-$LINENO}: \\$? = $ac_status\" >&5\n  test $ac_status = 0; } && test -s \"$nlist\"; then\n      # Try sorting and uniquifying the output.\n      if sort \"$nlist\" | uniq > \"$nlist\"T; then\n\tmv -f \"$nlist\"T \"$nlist\"\n      else\n\trm -f \"$nlist\"T\n      fi\n\n      # Make sure that we snagged all the symbols we need.\n      if $GREP ' nm_test_var$' \"$nlist\" >/dev/null; then\n\tif $GREP ' nm_test_func$' \"$nlist\" >/dev/null; then\n\t  cat <<_LT_EOF > conftest.$ac_ext\n/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */\n#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)\n/* DATA imports from DLLs on WIN32 con't be const, because runtime\n   relocations are performed -- see ld's documentation on pseudo-relocs.  */\n# define LT_DLSYM_CONST\n#elif defined(__osf__)\n/* This system does not cope well with relocations in const data.  */\n# define LT_DLSYM_CONST\n#else\n# define LT_DLSYM_CONST const\n#endif\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n_LT_EOF\n\t  # Now generate the symbol file.\n\t  eval \"$lt_cv_sys_global_symbol_to_cdecl\"' < \"$nlist\" | $GREP -v main >> conftest.$ac_ext'\n\n\t  cat <<_LT_EOF >> conftest.$ac_ext\n\n/* The mapping between symbol names and symbols.  */\nLT_DLSYM_CONST struct {\n  const char *name;\n  void       *address;\n}\nlt__PROGRAM__LTX_preloaded_symbols[] =\n{\n  { \"@PROGRAM@\", (void *) 0 },\n_LT_EOF\n\t  $SED \"s/^$symcode$symcode* \\(.*\\) \\(.*\\)$/  {\\\"\\2\\\", (void *) \\&\\2},/\" < \"$nlist\" | $GREP -v main >> conftest.$ac_ext\n\t  cat <<\\_LT_EOF >> conftest.$ac_ext\n  {0, (void *) 0}\n};\n\n/* This works around a problem in FreeBSD linker */\n#ifdef FREEBSD_WORKAROUND\nstatic const void *lt_preloaded_setup() {\n  return lt__PROGRAM__LTX_preloaded_symbols;\n}\n#endif\n\n#ifdef __cplusplus\n}\n#endif\n_LT_EOF\n\t  # Now try linking the two files.\n\t  mv conftest.$ac_objext conftstm.$ac_objext\n\t  lt_globsym_save_LIBS=$LIBS\n\t  lt_globsym_save_CFLAGS=$CFLAGS\n\t  LIBS=\"conftstm.$ac_objext\"\n\t  CFLAGS=\"$CFLAGS$lt_prog_compiler_no_builtin_flag\"\n\t  if { { eval echo \"\\\"\\$as_me\\\":${as_lineno-$LINENO}: \\\"$ac_link\\\"\"; } >&5\n  (eval $ac_link) 2>&5\n  ac_status=$?\n  $as_echo \"$as_me:${as_lineno-$LINENO}: \\$? = $ac_status\" >&5\n  test $ac_status = 0; } && test -s conftest${ac_exeext}; then\n\t    pipe_works=yes\n\t  fi\n\t  LIBS=$lt_globsym_save_LIBS\n\t  CFLAGS=$lt_globsym_save_CFLAGS\n\telse\n\t  echo \"cannot find nm_test_func in $nlist\" >&5\n\tfi\n      else\n\techo \"cannot find nm_test_var in $nlist\" >&5\n      fi\n    else\n      echo \"cannot run $lt_cv_sys_global_symbol_pipe\" >&5\n    fi\n  else\n    echo \"$progname: failed program was:\" >&5\n    cat conftest.$ac_ext >&5\n  fi\n  rm -rf conftest* conftst*\n\n  # Do not use the global_symbol_pipe unless it works.\n  if test \"$pipe_works\" = yes; then\n    break\n  else\n    lt_cv_sys_global_symbol_pipe=\n  fi\ndone\n\nfi\n\nif test -z \"$lt_cv_sys_global_symbol_pipe\"; then\n  lt_cv_sys_global_symbol_to_cdecl=\nfi\nif test -z \"$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: failed\" >&5\n$as_echo \"failed\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: ok\" >&5\n$as_echo \"ok\" >&6; }\nfi\n\n# Response file support.\nif test \"$lt_cv_nm_interface\" = \"MS dumpbin\"; then\n  nm_file_list_spec='@'\nelif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then\n  nm_file_list_spec='@'\nfi\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for sysroot\" >&5\n$as_echo_n \"checking for sysroot... \" >&6; }\n\n# Check whether --with-sysroot was given.\nif test \"${with_sysroot+set}\" = set; then :\n  withval=$with_sysroot;\nelse\n  with_sysroot=no\nfi\n\n\nlt_sysroot=\ncase ${with_sysroot} in #(\n yes)\n   if test \"$GCC\" = yes; then\n     lt_sysroot=`$CC --print-sysroot 2>/dev/null`\n   fi\n   ;; #(\n /*)\n   lt_sysroot=`echo \"$with_sysroot\" | sed -e \"$sed_quote_subst\"`\n   ;; #(\n no|'')\n   ;; #(\n *)\n   { $as_echo \"$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}\" >&5\n$as_echo \"${with_sysroot}\" >&6; }\n   as_fn_error $? \"The sysroot must be an absolute path.\" \"$LINENO\" 5\n   ;;\nesac\n\n { $as_echo \"$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}\" >&5\n$as_echo \"${lt_sysroot:-no}\" >&6; }\n\n\n\n\n\n# Check whether --enable-libtool-lock was given.\nif test \"${enable_libtool_lock+set}\" = set; then :\n  enableval=$enable_libtool_lock;\nfi\n\ntest \"x$enable_libtool_lock\" != xno && enable_libtool_lock=yes\n\n# Some flags need to be propagated to the compiler or linker for good\n# libtool support.\ncase $host in\nia64-*-hpux*)\n  # Find out which ABI we are using.\n  echo 'int i;' > conftest.$ac_ext\n  if { { eval echo \"\\\"\\$as_me\\\":${as_lineno-$LINENO}: \\\"$ac_compile\\\"\"; } >&5\n  (eval $ac_compile) 2>&5\n  ac_status=$?\n  $as_echo \"$as_me:${as_lineno-$LINENO}: \\$? = $ac_status\" >&5\n  test $ac_status = 0; }; then\n    case `/usr/bin/file conftest.$ac_objext` in\n      *ELF-32*)\n\tHPUX_IA64_MODE=\"32\"\n\t;;\n      *ELF-64*)\n\tHPUX_IA64_MODE=\"64\"\n\t;;\n    esac\n  fi\n  rm -rf conftest*\n  ;;\n*-*-irix6*)\n  # Find out which ABI we are using.\n  echo '#line '$LINENO' \"configure\"' > conftest.$ac_ext\n  if { { eval echo \"\\\"\\$as_me\\\":${as_lineno-$LINENO}: \\\"$ac_compile\\\"\"; } >&5\n  (eval $ac_compile) 2>&5\n  ac_status=$?\n  $as_echo \"$as_me:${as_lineno-$LINENO}: \\$? = $ac_status\" >&5\n  test $ac_status = 0; }; then\n    if test \"$lt_cv_prog_gnu_ld\" = yes; then\n      case `/usr/bin/file conftest.$ac_objext` in\n\t*32-bit*)\n\t  LD=\"${LD-ld} -melf32bsmip\"\n\t  ;;\n\t*N32*)\n\t  LD=\"${LD-ld} -melf32bmipn32\"\n\t  ;;\n\t*64-bit*)\n\t  LD=\"${LD-ld} -melf64bmip\"\n\t;;\n      esac\n    else\n      case `/usr/bin/file conftest.$ac_objext` in\n\t*32-bit*)\n\t  LD=\"${LD-ld} -32\"\n\t  ;;\n\t*N32*)\n\t  LD=\"${LD-ld} -n32\"\n\t  ;;\n\t*64-bit*)\n\t  LD=\"${LD-ld} -64\"\n\t  ;;\n      esac\n    fi\n  fi\n  rm -rf conftest*\n  ;;\n\nx86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \\\ns390*-*linux*|s390*-*tpf*|sparc*-*linux*)\n  # Find out which ABI we are using.\n  echo 'int i;' > conftest.$ac_ext\n  if { { eval echo \"\\\"\\$as_me\\\":${as_lineno-$LINENO}: \\\"$ac_compile\\\"\"; } >&5\n  (eval $ac_compile) 2>&5\n  ac_status=$?\n  $as_echo \"$as_me:${as_lineno-$LINENO}: \\$? = $ac_status\" >&5\n  test $ac_status = 0; }; then\n    case `/usr/bin/file conftest.o` in\n      *32-bit*)\n\tcase $host in\n\t  x86_64-*kfreebsd*-gnu)\n\t    LD=\"${LD-ld} -m elf_i386_fbsd\"\n\t    ;;\n\t  x86_64-*linux*)\n\t    case `/usr/bin/file conftest.o` in\n\t      *x86-64*)\n\t\tLD=\"${LD-ld} -m elf32_x86_64\"\n\t\t;;\n\t      *)\n\t\tLD=\"${LD-ld} -m elf_i386\"\n\t\t;;\n\t    esac\n\t    ;;\n\t  powerpc64le-*)\n\t    LD=\"${LD-ld} -m elf32lppclinux\"\n\t    ;;\n\t  powerpc64-*)\n\t    LD=\"${LD-ld} -m elf32ppclinux\"\n\t    ;;\n\t  s390x-*linux*)\n\t    LD=\"${LD-ld} -m elf_s390\"\n\t    ;;\n\t  sparc64-*linux*)\n\t    LD=\"${LD-ld} -m elf32_sparc\"\n\t    ;;\n\tesac\n\t;;\n      *64-bit*)\n\tcase $host in\n\t  x86_64-*kfreebsd*-gnu)\n\t    LD=\"${LD-ld} -m elf_x86_64_fbsd\"\n\t    ;;\n\t  x86_64-*linux*)\n\t    LD=\"${LD-ld} -m elf_x86_64\"\n\t    ;;\n\t  powerpcle-*)\n\t    LD=\"${LD-ld} -m elf64lppc\"\n\t    ;;\n\t  powerpc-*)\n\t    LD=\"${LD-ld} -m elf64ppc\"\n\t    ;;\n\t  s390*-*linux*|s390*-*tpf*)\n\t    LD=\"${LD-ld} -m elf64_s390\"\n\t    ;;\n\t  sparc*-*linux*)\n\t    LD=\"${LD-ld} -m elf64_sparc\"\n\t    ;;\n\tesac\n\t;;\n    esac\n  fi\n  rm -rf conftest*\n  ;;\n\n*-*-sco3.2v5*)\n  # On SCO OpenServer 5, we need -belf to get full-featured binaries.\n  SAVE_CFLAGS=\"$CFLAGS\"\n  CFLAGS=\"$CFLAGS -belf\"\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf\" >&5\n$as_echo_n \"checking whether the C compiler needs -belf... \" >&6; }\nif ${lt_cv_cc_needs_belf+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  ac_ext=c\nac_cpp='$CPP $CPPFLAGS'\nac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'\nac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'\nac_compiler_gnu=$ac_cv_c_compiler_gnu\n\n     cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n\nint\nmain ()\n{\n\n  ;\n  return 0;\n}\n_ACEOF\nif ac_fn_c_try_link \"$LINENO\"; then :\n  lt_cv_cc_needs_belf=yes\nelse\n  lt_cv_cc_needs_belf=no\nfi\nrm -f core conftest.err conftest.$ac_objext \\\n    conftest$ac_exeext conftest.$ac_ext\n     ac_ext=c\nac_cpp='$CPP $CPPFLAGS'\nac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'\nac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'\nac_compiler_gnu=$ac_cv_c_compiler_gnu\n\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf\" >&5\n$as_echo \"$lt_cv_cc_needs_belf\" >&6; }\n  if test x\"$lt_cv_cc_needs_belf\" != x\"yes\"; then\n    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf\n    CFLAGS=\"$SAVE_CFLAGS\"\n  fi\n  ;;\n*-*solaris*)\n  # Find out which ABI we are using.\n  echo 'int i;' > conftest.$ac_ext\n  if { { eval echo \"\\\"\\$as_me\\\":${as_lineno-$LINENO}: \\\"$ac_compile\\\"\"; } >&5\n  (eval $ac_compile) 2>&5\n  ac_status=$?\n  $as_echo \"$as_me:${as_lineno-$LINENO}: \\$? = $ac_status\" >&5\n  test $ac_status = 0; }; then\n    case `/usr/bin/file conftest.o` in\n    *64-bit*)\n      case $lt_cv_prog_gnu_ld in\n      yes*)\n        case $host in\n        i?86-*-solaris*)\n          LD=\"${LD-ld} -m elf_x86_64\"\n          ;;\n        sparc*-*-solaris*)\n          LD=\"${LD-ld} -m elf64_sparc\"\n          ;;\n        esac\n        # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.\n        if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then\n          LD=\"${LD-ld}_sol2\"\n        fi\n        ;;\n      *)\n\tif ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then\n\t  LD=\"${LD-ld} -64\"\n\tfi\n\t;;\n      esac\n      ;;\n    esac\n  fi\n  rm -rf conftest*\n  ;;\nesac\n\nneed_locks=\"$enable_libtool_lock\"\n\nif test -n \"$ac_tool_prefix\"; then\n  # Extract the first word of \"${ac_tool_prefix}mt\", so it can be a program name with args.\nset dummy ${ac_tool_prefix}mt; ac_word=$2\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $ac_word\" >&5\n$as_echo_n \"checking for $ac_word... \" >&6; }\nif ${ac_cv_prog_MANIFEST_TOOL+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if test -n \"$MANIFEST_TOOL\"; then\n  ac_cv_prog_MANIFEST_TOOL=\"$MANIFEST_TOOL\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    for ac_exec_ext in '' $ac_executable_extensions; do\n  if as_fn_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_MANIFEST_TOOL=\"${ac_tool_prefix}mt\"\n    $as_echo \"$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\n  done\nIFS=$as_save_IFS\n\nfi\nfi\nMANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL\nif test -n \"$MANIFEST_TOOL\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL\" >&5\n$as_echo \"$MANIFEST_TOOL\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\nfi\n\n\nfi\nif test -z \"$ac_cv_prog_MANIFEST_TOOL\"; then\n  ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL\n  # Extract the first word of \"mt\", so it can be a program name with args.\nset dummy mt; ac_word=$2\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $ac_word\" >&5\n$as_echo_n \"checking for $ac_word... \" >&6; }\nif ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if test -n \"$ac_ct_MANIFEST_TOOL\"; then\n  ac_cv_prog_ac_ct_MANIFEST_TOOL=\"$ac_ct_MANIFEST_TOOL\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    for ac_exec_ext in '' $ac_executable_extensions; do\n  if as_fn_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_ac_ct_MANIFEST_TOOL=\"mt\"\n    $as_echo \"$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\n  done\nIFS=$as_save_IFS\n\nfi\nfi\nac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL\nif test -n \"$ac_ct_MANIFEST_TOOL\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL\" >&5\n$as_echo \"$ac_ct_MANIFEST_TOOL\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\nfi\n\n  if test \"x$ac_ct_MANIFEST_TOOL\" = x; then\n    MANIFEST_TOOL=\":\"\n  else\n    case $cross_compiling:$ac_tool_warned in\nyes:)\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet\" >&5\n$as_echo \"$as_me: WARNING: using cross tools not prefixed with host triplet\" >&2;}\nac_tool_warned=yes ;;\nesac\n    MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL\n  fi\nelse\n  MANIFEST_TOOL=\"$ac_cv_prog_MANIFEST_TOOL\"\nfi\n\ntest -z \"$MANIFEST_TOOL\" && MANIFEST_TOOL=mt\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool\" >&5\n$as_echo_n \"checking if $MANIFEST_TOOL is a manifest tool... \" >&6; }\nif ${lt_cv_path_mainfest_tool+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  lt_cv_path_mainfest_tool=no\n  echo \"$as_me:$LINENO: $MANIFEST_TOOL '-?'\" >&5\n  $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out\n  cat conftest.err >&5\n  if $GREP 'Manifest Tool' conftest.out > /dev/null; then\n    lt_cv_path_mainfest_tool=yes\n  fi\n  rm -f conftest*\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool\" >&5\n$as_echo \"$lt_cv_path_mainfest_tool\" >&6; }\nif test \"x$lt_cv_path_mainfest_tool\" != xyes; then\n  MANIFEST_TOOL=:\nfi\n\n\n\n\n\n\n  case $host_os in\n    rhapsody* | darwin*)\n    if test -n \"$ac_tool_prefix\"; then\n  # Extract the first word of \"${ac_tool_prefix}dsymutil\", so it can be a program name with args.\nset dummy ${ac_tool_prefix}dsymutil; ac_word=$2\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $ac_word\" >&5\n$as_echo_n \"checking for $ac_word... \" >&6; }\nif ${ac_cv_prog_DSYMUTIL+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if test -n \"$DSYMUTIL\"; then\n  ac_cv_prog_DSYMUTIL=\"$DSYMUTIL\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    for ac_exec_ext in '' $ac_executable_extensions; do\n  if as_fn_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_DSYMUTIL=\"${ac_tool_prefix}dsymutil\"\n    $as_echo \"$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\n  done\nIFS=$as_save_IFS\n\nfi\nfi\nDSYMUTIL=$ac_cv_prog_DSYMUTIL\nif test -n \"$DSYMUTIL\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL\" >&5\n$as_echo \"$DSYMUTIL\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\nfi\n\n\nfi\nif test -z \"$ac_cv_prog_DSYMUTIL\"; then\n  ac_ct_DSYMUTIL=$DSYMUTIL\n  # Extract the first word of \"dsymutil\", so it can be a program name with args.\nset dummy dsymutil; ac_word=$2\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $ac_word\" >&5\n$as_echo_n \"checking for $ac_word... \" >&6; }\nif ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if test -n \"$ac_ct_DSYMUTIL\"; then\n  ac_cv_prog_ac_ct_DSYMUTIL=\"$ac_ct_DSYMUTIL\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    for ac_exec_ext in '' $ac_executable_extensions; do\n  if as_fn_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_ac_ct_DSYMUTIL=\"dsymutil\"\n    $as_echo \"$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\n  done\nIFS=$as_save_IFS\n\nfi\nfi\nac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL\nif test -n \"$ac_ct_DSYMUTIL\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL\" >&5\n$as_echo \"$ac_ct_DSYMUTIL\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\nfi\n\n  if test \"x$ac_ct_DSYMUTIL\" = x; then\n    DSYMUTIL=\":\"\n  else\n    case $cross_compiling:$ac_tool_warned in\nyes:)\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet\" >&5\n$as_echo \"$as_me: WARNING: using cross tools not prefixed with host triplet\" >&2;}\nac_tool_warned=yes ;;\nesac\n    DSYMUTIL=$ac_ct_DSYMUTIL\n  fi\nelse\n  DSYMUTIL=\"$ac_cv_prog_DSYMUTIL\"\nfi\n\n    if test -n \"$ac_tool_prefix\"; then\n  # Extract the first word of \"${ac_tool_prefix}nmedit\", so it can be a program name with args.\nset dummy ${ac_tool_prefix}nmedit; ac_word=$2\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $ac_word\" >&5\n$as_echo_n \"checking for $ac_word... \" >&6; }\nif ${ac_cv_prog_NMEDIT+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if test -n \"$NMEDIT\"; then\n  ac_cv_prog_NMEDIT=\"$NMEDIT\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    for ac_exec_ext in '' $ac_executable_extensions; do\n  if as_fn_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_NMEDIT=\"${ac_tool_prefix}nmedit\"\n    $as_echo \"$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\n  done\nIFS=$as_save_IFS\n\nfi\nfi\nNMEDIT=$ac_cv_prog_NMEDIT\nif test -n \"$NMEDIT\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $NMEDIT\" >&5\n$as_echo \"$NMEDIT\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\nfi\n\n\nfi\nif test -z \"$ac_cv_prog_NMEDIT\"; then\n  ac_ct_NMEDIT=$NMEDIT\n  # Extract the first word of \"nmedit\", so it can be a program name with args.\nset dummy nmedit; ac_word=$2\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $ac_word\" >&5\n$as_echo_n \"checking for $ac_word... \" >&6; }\nif ${ac_cv_prog_ac_ct_NMEDIT+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if test -n \"$ac_ct_NMEDIT\"; then\n  ac_cv_prog_ac_ct_NMEDIT=\"$ac_ct_NMEDIT\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    for ac_exec_ext in '' $ac_executable_extensions; do\n  if as_fn_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_ac_ct_NMEDIT=\"nmedit\"\n    $as_echo \"$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\n  done\nIFS=$as_save_IFS\n\nfi\nfi\nac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT\nif test -n \"$ac_ct_NMEDIT\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT\" >&5\n$as_echo \"$ac_ct_NMEDIT\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\nfi\n\n  if test \"x$ac_ct_NMEDIT\" = x; then\n    NMEDIT=\":\"\n  else\n    case $cross_compiling:$ac_tool_warned in\nyes:)\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet\" >&5\n$as_echo \"$as_me: WARNING: using cross tools not prefixed with host triplet\" >&2;}\nac_tool_warned=yes ;;\nesac\n    NMEDIT=$ac_ct_NMEDIT\n  fi\nelse\n  NMEDIT=\"$ac_cv_prog_NMEDIT\"\nfi\n\n    if test -n \"$ac_tool_prefix\"; then\n  # Extract the first word of \"${ac_tool_prefix}lipo\", so it can be a program name with args.\nset dummy ${ac_tool_prefix}lipo; ac_word=$2\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $ac_word\" >&5\n$as_echo_n \"checking for $ac_word... \" >&6; }\nif ${ac_cv_prog_LIPO+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if test -n \"$LIPO\"; then\n  ac_cv_prog_LIPO=\"$LIPO\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    for ac_exec_ext in '' $ac_executable_extensions; do\n  if as_fn_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_LIPO=\"${ac_tool_prefix}lipo\"\n    $as_echo \"$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\n  done\nIFS=$as_save_IFS\n\nfi\nfi\nLIPO=$ac_cv_prog_LIPO\nif test -n \"$LIPO\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $LIPO\" >&5\n$as_echo \"$LIPO\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\nfi\n\n\nfi\nif test -z \"$ac_cv_prog_LIPO\"; then\n  ac_ct_LIPO=$LIPO\n  # Extract the first word of \"lipo\", so it can be a program name with args.\nset dummy lipo; ac_word=$2\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $ac_word\" >&5\n$as_echo_n \"checking for $ac_word... \" >&6; }\nif ${ac_cv_prog_ac_ct_LIPO+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if test -n \"$ac_ct_LIPO\"; then\n  ac_cv_prog_ac_ct_LIPO=\"$ac_ct_LIPO\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    for ac_exec_ext in '' $ac_executable_extensions; do\n  if as_fn_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_ac_ct_LIPO=\"lipo\"\n    $as_echo \"$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\n  done\nIFS=$as_save_IFS\n\nfi\nfi\nac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO\nif test -n \"$ac_ct_LIPO\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO\" >&5\n$as_echo \"$ac_ct_LIPO\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\nfi\n\n  if test \"x$ac_ct_LIPO\" = x; then\n    LIPO=\":\"\n  else\n    case $cross_compiling:$ac_tool_warned in\nyes:)\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet\" >&5\n$as_echo \"$as_me: WARNING: using cross tools not prefixed with host triplet\" >&2;}\nac_tool_warned=yes ;;\nesac\n    LIPO=$ac_ct_LIPO\n  fi\nelse\n  LIPO=\"$ac_cv_prog_LIPO\"\nfi\n\n    if test -n \"$ac_tool_prefix\"; then\n  # Extract the first word of \"${ac_tool_prefix}otool\", so it can be a program name with args.\nset dummy ${ac_tool_prefix}otool; ac_word=$2\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $ac_word\" >&5\n$as_echo_n \"checking for $ac_word... \" >&6; }\nif ${ac_cv_prog_OTOOL+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if test -n \"$OTOOL\"; then\n  ac_cv_prog_OTOOL=\"$OTOOL\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    for ac_exec_ext in '' $ac_executable_extensions; do\n  if as_fn_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_OTOOL=\"${ac_tool_prefix}otool\"\n    $as_echo \"$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\n  done\nIFS=$as_save_IFS\n\nfi\nfi\nOTOOL=$ac_cv_prog_OTOOL\nif test -n \"$OTOOL\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $OTOOL\" >&5\n$as_echo \"$OTOOL\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\nfi\n\n\nfi\nif test -z \"$ac_cv_prog_OTOOL\"; then\n  ac_ct_OTOOL=$OTOOL\n  # Extract the first word of \"otool\", so it can be a program name with args.\nset dummy otool; ac_word=$2\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $ac_word\" >&5\n$as_echo_n \"checking for $ac_word... \" >&6; }\nif ${ac_cv_prog_ac_ct_OTOOL+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if test -n \"$ac_ct_OTOOL\"; then\n  ac_cv_prog_ac_ct_OTOOL=\"$ac_ct_OTOOL\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    for ac_exec_ext in '' $ac_executable_extensions; do\n  if as_fn_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_ac_ct_OTOOL=\"otool\"\n    $as_echo \"$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\n  done\nIFS=$as_save_IFS\n\nfi\nfi\nac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL\nif test -n \"$ac_ct_OTOOL\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL\" >&5\n$as_echo \"$ac_ct_OTOOL\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\nfi\n\n  if test \"x$ac_ct_OTOOL\" = x; then\n    OTOOL=\":\"\n  else\n    case $cross_compiling:$ac_tool_warned in\nyes:)\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet\" >&5\n$as_echo \"$as_me: WARNING: using cross tools not prefixed with host triplet\" >&2;}\nac_tool_warned=yes ;;\nesac\n    OTOOL=$ac_ct_OTOOL\n  fi\nelse\n  OTOOL=\"$ac_cv_prog_OTOOL\"\nfi\n\n    if test -n \"$ac_tool_prefix\"; then\n  # Extract the first word of \"${ac_tool_prefix}otool64\", so it can be a program name with args.\nset dummy ${ac_tool_prefix}otool64; ac_word=$2\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $ac_word\" >&5\n$as_echo_n \"checking for $ac_word... \" >&6; }\nif ${ac_cv_prog_OTOOL64+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if test -n \"$OTOOL64\"; then\n  ac_cv_prog_OTOOL64=\"$OTOOL64\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    for ac_exec_ext in '' $ac_executable_extensions; do\n  if as_fn_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_OTOOL64=\"${ac_tool_prefix}otool64\"\n    $as_echo \"$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\n  done\nIFS=$as_save_IFS\n\nfi\nfi\nOTOOL64=$ac_cv_prog_OTOOL64\nif test -n \"$OTOOL64\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $OTOOL64\" >&5\n$as_echo \"$OTOOL64\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\nfi\n\n\nfi\nif test -z \"$ac_cv_prog_OTOOL64\"; then\n  ac_ct_OTOOL64=$OTOOL64\n  # Extract the first word of \"otool64\", so it can be a program name with args.\nset dummy otool64; ac_word=$2\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $ac_word\" >&5\n$as_echo_n \"checking for $ac_word... \" >&6; }\nif ${ac_cv_prog_ac_ct_OTOOL64+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if test -n \"$ac_ct_OTOOL64\"; then\n  ac_cv_prog_ac_ct_OTOOL64=\"$ac_ct_OTOOL64\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    for ac_exec_ext in '' $ac_executable_extensions; do\n  if as_fn_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_ac_ct_OTOOL64=\"otool64\"\n    $as_echo \"$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\n  done\nIFS=$as_save_IFS\n\nfi\nfi\nac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64\nif test -n \"$ac_ct_OTOOL64\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64\" >&5\n$as_echo \"$ac_ct_OTOOL64\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\nfi\n\n  if test \"x$ac_ct_OTOOL64\" = x; then\n    OTOOL64=\":\"\n  else\n    case $cross_compiling:$ac_tool_warned in\nyes:)\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet\" >&5\n$as_echo \"$as_me: WARNING: using cross tools not prefixed with host triplet\" >&2;}\nac_tool_warned=yes ;;\nesac\n    OTOOL64=$ac_ct_OTOOL64\n  fi\nelse\n  OTOOL64=\"$ac_cv_prog_OTOOL64\"\nfi\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n    { $as_echo \"$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag\" >&5\n$as_echo_n \"checking for -single_module linker flag... \" >&6; }\nif ${lt_cv_apple_cc_single_mod+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  lt_cv_apple_cc_single_mod=no\n      if test -z \"${LT_MULTI_MODULE}\"; then\n\t# By default we will add the -single_module flag. You can override\n\t# by either setting the environment variable LT_MULTI_MODULE\n\t# non-empty at configure time, or by adding -multi_module to the\n\t# link flags.\n\trm -rf libconftest.dylib*\n\techo \"int foo(void){return 1;}\" > conftest.c\n\techo \"$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \\\n-dynamiclib -Wl,-single_module conftest.c\" >&5\n\t$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \\\n\t  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err\n        _lt_result=$?\n\t# If there is a non-empty error log, and \"single_module\"\n\t# appears in it, assume the flag caused a linker warning\n        if test -s conftest.err && $GREP single_module conftest.err; then\n\t  cat conftest.err >&5\n\t# Otherwise, if the output was created with a 0 exit code from\n\t# the compiler, it worked.\n\telif test -f libconftest.dylib && test $_lt_result -eq 0; then\n\t  lt_cv_apple_cc_single_mod=yes\n\telse\n\t  cat conftest.err >&5\n\tfi\n\trm -rf libconftest.dylib*\n\trm -f conftest.*\n      fi\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod\" >&5\n$as_echo \"$lt_cv_apple_cc_single_mod\" >&6; }\n\n    { $as_echo \"$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag\" >&5\n$as_echo_n \"checking for -exported_symbols_list linker flag... \" >&6; }\nif ${lt_cv_ld_exported_symbols_list+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  lt_cv_ld_exported_symbols_list=no\n      save_LDFLAGS=$LDFLAGS\n      echo \"_main\" > conftest.sym\n      LDFLAGS=\"$LDFLAGS -Wl,-exported_symbols_list,conftest.sym\"\n      cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n\nint\nmain ()\n{\n\n  ;\n  return 0;\n}\n_ACEOF\nif ac_fn_c_try_link \"$LINENO\"; then :\n  lt_cv_ld_exported_symbols_list=yes\nelse\n  lt_cv_ld_exported_symbols_list=no\nfi\nrm -f core conftest.err conftest.$ac_objext \\\n    conftest$ac_exeext conftest.$ac_ext\n\tLDFLAGS=\"$save_LDFLAGS\"\n\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list\" >&5\n$as_echo \"$lt_cv_ld_exported_symbols_list\" >&6; }\n\n    { $as_echo \"$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag\" >&5\n$as_echo_n \"checking for -force_load linker flag... \" >&6; }\nif ${lt_cv_ld_force_load+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  lt_cv_ld_force_load=no\n      cat > conftest.c << _LT_EOF\nint forced_loaded() { return 2;}\n_LT_EOF\n      echo \"$LTCC $LTCFLAGS -c -o conftest.o conftest.c\" >&5\n      $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5\n      echo \"$AR cru libconftest.a conftest.o\" >&5\n      $AR cru libconftest.a conftest.o 2>&5\n      echo \"$RANLIB libconftest.a\" >&5\n      $RANLIB libconftest.a 2>&5\n      cat > conftest.c << _LT_EOF\nint main() { return 0;}\n_LT_EOF\n      echo \"$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a\" >&5\n      $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err\n      _lt_result=$?\n      if test -s conftest.err && $GREP force_load conftest.err; then\n\tcat conftest.err >&5\n      elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then\n\tlt_cv_ld_force_load=yes\n      else\n\tcat conftest.err >&5\n      fi\n        rm -f conftest.err libconftest.a conftest conftest.c\n        rm -rf conftest.dSYM\n\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load\" >&5\n$as_echo \"$lt_cv_ld_force_load\" >&6; }\n    case $host_os in\n    rhapsody* | darwin1.[012])\n      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;\n    darwin1.*)\n      _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;\n    darwin*) # darwin 5.x on\n      # if running on 10.5 or later, the deployment target defaults\n      # to the OS version, if on x86, and 10.4, the deployment\n      # target defaults to 10.4. Don't you love it?\n      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in\n\t10.0,*86*-darwin8*|10.0,*-darwin[91]*)\n\t  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;\n\t10.[012]*)\n\t  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;\n\t10.*)\n\t  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;\n      esac\n    ;;\n  esac\n    if test \"$lt_cv_apple_cc_single_mod\" = \"yes\"; then\n      _lt_dar_single_mod='$single_module'\n    fi\n    if test \"$lt_cv_ld_exported_symbols_list\" = \"yes\"; then\n      _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'\n    else\n      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'\n    fi\n    if test \"$DSYMUTIL\" != \":\" && test \"$lt_cv_ld_force_load\" = \"no\"; then\n      _lt_dsymutil='~$DSYMUTIL $lib || :'\n    else\n      _lt_dsymutil=\n    fi\n    ;;\n  esac\n\nac_ext=c\nac_cpp='$CPP $CPPFLAGS'\nac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'\nac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'\nac_compiler_gnu=$ac_cv_c_compiler_gnu\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor\" >&5\n$as_echo_n \"checking how to run the C preprocessor... \" >&6; }\n# On Suns, sometimes $CPP names a directory.\nif test -n \"$CPP\" && test -d \"$CPP\"; then\n  CPP=\nfi\nif test -z \"$CPP\"; then\n  if ${ac_cv_prog_CPP+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n      # Double quotes because CPP needs to be expanded\n    for CPP in \"$CC -E\" \"$CC -E -traditional-cpp\" \"/lib/cpp\"\n    do\n      ac_preproc_ok=false\nfor ac_c_preproc_warn_flag in '' yes\ndo\n  # Use a header file that comes with gcc, so configuring glibc\n  # with a fresh cross-compiler works.\n  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since\n  # <limits.h> exists even on freestanding compilers.\n  # On the NeXT, cc -E runs the code through the compiler's parser,\n  # not just through cpp. \"Syntax error\" is here to catch this case.\n  cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n#ifdef __STDC__\n# include <limits.h>\n#else\n# include <assert.h>\n#endif\n\t\t     Syntax error\n_ACEOF\nif ac_fn_c_try_cpp \"$LINENO\"; then :\n\nelse\n  # Broken: fails on valid input.\ncontinue\nfi\nrm -f conftest.err conftest.i conftest.$ac_ext\n\n  # OK, works on sane cases.  Now check whether nonexistent headers\n  # can be detected and how.\n  cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n#include <ac_nonexistent.h>\n_ACEOF\nif ac_fn_c_try_cpp \"$LINENO\"; then :\n  # Broken: success on invalid input.\ncontinue\nelse\n  # Passes both tests.\nac_preproc_ok=:\nbreak\nfi\nrm -f conftest.err conftest.i conftest.$ac_ext\n\ndone\n# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.\nrm -f conftest.i conftest.err conftest.$ac_ext\nif $ac_preproc_ok; then :\n  break\nfi\n\n    done\n    ac_cv_prog_CPP=$CPP\n\nfi\n  CPP=$ac_cv_prog_CPP\nelse\n  ac_cv_prog_CPP=$CPP\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $CPP\" >&5\n$as_echo \"$CPP\" >&6; }\nac_preproc_ok=false\nfor ac_c_preproc_warn_flag in '' yes\ndo\n  # Use a header file that comes with gcc, so configuring glibc\n  # with a fresh cross-compiler works.\n  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since\n  # <limits.h> exists even on freestanding compilers.\n  # On the NeXT, cc -E runs the code through the compiler's parser,\n  # not just through cpp. \"Syntax error\" is here to catch this case.\n  cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n#ifdef __STDC__\n# include <limits.h>\n#else\n# include <assert.h>\n#endif\n\t\t     Syntax error\n_ACEOF\nif ac_fn_c_try_cpp \"$LINENO\"; then :\n\nelse\n  # Broken: fails on valid input.\ncontinue\nfi\nrm -f conftest.err conftest.i conftest.$ac_ext\n\n  # OK, works on sane cases.  Now check whether nonexistent headers\n  # can be detected and how.\n  cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n#include <ac_nonexistent.h>\n_ACEOF\nif ac_fn_c_try_cpp \"$LINENO\"; then :\n  # Broken: success on invalid input.\ncontinue\nelse\n  # Passes both tests.\nac_preproc_ok=:\nbreak\nfi\nrm -f conftest.err conftest.i conftest.$ac_ext\n\ndone\n# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.\nrm -f conftest.i conftest.err conftest.$ac_ext\nif $ac_preproc_ok; then :\n\nelse\n  { { $as_echo \"$as_me:${as_lineno-$LINENO}: error: in \\`$ac_pwd':\" >&5\n$as_echo \"$as_me: error: in \\`$ac_pwd':\" >&2;}\nas_fn_error $? \"C preprocessor \\\"$CPP\\\" fails sanity check\nSee \\`config.log' for more details\" \"$LINENO\" 5; }\nfi\n\nac_ext=c\nac_cpp='$CPP $CPPFLAGS'\nac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'\nac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'\nac_compiler_gnu=$ac_cv_c_compiler_gnu\n\n\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for ANSI C header files\" >&5\n$as_echo_n \"checking for ANSI C header files... \" >&6; }\nif ${ac_cv_header_stdc+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n#include <stdlib.h>\n#include <stdarg.h>\n#include <string.h>\n#include <float.h>\n\nint\nmain ()\n{\n\n  ;\n  return 0;\n}\n_ACEOF\nif ac_fn_c_try_compile \"$LINENO\"; then :\n  ac_cv_header_stdc=yes\nelse\n  ac_cv_header_stdc=no\nfi\nrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext\n\nif test $ac_cv_header_stdc = yes; then\n  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.\n  cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n#include <string.h>\n\n_ACEOF\nif (eval \"$ac_cpp conftest.$ac_ext\") 2>&5 |\n  $EGREP \"memchr\" >/dev/null 2>&1; then :\n\nelse\n  ac_cv_header_stdc=no\nfi\nrm -f conftest*\n\nfi\n\nif test $ac_cv_header_stdc = yes; then\n  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.\n  cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n#include <stdlib.h>\n\n_ACEOF\nif (eval \"$ac_cpp conftest.$ac_ext\") 2>&5 |\n  $EGREP \"free\" >/dev/null 2>&1; then :\n\nelse\n  ac_cv_header_stdc=no\nfi\nrm -f conftest*\n\nfi\n\nif test $ac_cv_header_stdc = yes; then\n  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.\n  if test \"$cross_compiling\" = yes; then :\n  :\nelse\n  cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n#include <ctype.h>\n#include <stdlib.h>\n#if ((' ' & 0x0FF) == 0x020)\n# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')\n# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))\n#else\n# define ISLOWER(c) \\\n\t\t   (('a' <= (c) && (c) <= 'i') \\\n\t\t     || ('j' <= (c) && (c) <= 'r') \\\n\t\t     || ('s' <= (c) && (c) <= 'z'))\n# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))\n#endif\n\n#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))\nint\nmain ()\n{\n  int i;\n  for (i = 0; i < 256; i++)\n    if (XOR (islower (i), ISLOWER (i))\n\t|| toupper (i) != TOUPPER (i))\n      return 2;\n  return 0;\n}\n_ACEOF\nif ac_fn_c_try_run \"$LINENO\"; then :\n\nelse\n  ac_cv_header_stdc=no\nfi\nrm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \\\n  conftest.$ac_objext conftest.beam conftest.$ac_ext\nfi\n\nfi\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc\" >&5\n$as_echo \"$ac_cv_header_stdc\" >&6; }\nif test $ac_cv_header_stdc = yes; then\n\n$as_echo \"#define STDC_HEADERS 1\" >>confdefs.h\n\nfi\n\n# On IRIX 5.3, sys/types and inttypes.h are conflicting.\nfor ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \\\n\t\t  inttypes.h stdint.h unistd.h\ndo :\n  as_ac_Header=`$as_echo \"ac_cv_header_$ac_header\" | $as_tr_sh`\nac_fn_c_check_header_compile \"$LINENO\" \"$ac_header\" \"$as_ac_Header\" \"$ac_includes_default\n\"\nif eval test \\\"x\\$\"$as_ac_Header\"\\\" = x\"yes\"; then :\n  cat >>confdefs.h <<_ACEOF\n#define `$as_echo \"HAVE_$ac_header\" | $as_tr_cpp` 1\n_ACEOF\n\nfi\n\ndone\n\n\nfor ac_header in dlfcn.h\ndo :\n  ac_fn_c_check_header_compile \"$LINENO\" \"dlfcn.h\" \"ac_cv_header_dlfcn_h\" \"$ac_includes_default\n\"\nif test \"x$ac_cv_header_dlfcn_h\" = xyes; then :\n  cat >>confdefs.h <<_ACEOF\n#define HAVE_DLFCN_H 1\n_ACEOF\n\nfi\n\ndone\n\n\n\n\nfunc_stripname_cnf ()\n{\n  case ${2} in\n  .*) func_stripname_result=`$ECHO \"${3}\" | $SED \"s%^${1}%%; s%\\\\\\\\${2}\\$%%\"`;;\n  *)  func_stripname_result=`$ECHO \"${3}\" | $SED \"s%^${1}%%; s%${2}\\$%%\"`;;\n  esac\n} # func_stripname_cnf\n\n\n\n\n\n# Set options\n\n\n\n        enable_dlopen=no\n\n\n\n            # Check whether --enable-shared was given.\nif test \"${enable_shared+set}\" = set; then :\n  enableval=$enable_shared; p=${PACKAGE-default}\n    case $enableval in\n    yes) enable_shared=yes ;;\n    no) enable_shared=no ;;\n    *)\n      enable_shared=no\n      # Look at the argument we got.  We use all the common list separators.\n      lt_save_ifs=\"$IFS\"; IFS=\"${IFS}$PATH_SEPARATOR,\"\n      for pkg in $enableval; do\n\tIFS=\"$lt_save_ifs\"\n\tif test \"X$pkg\" = \"X$p\"; then\n\t  enable_shared=yes\n\tfi\n      done\n      IFS=\"$lt_save_ifs\"\n      ;;\n    esac\nelse\n  enable_shared=yes\nfi\n\n\n\n\n\n\n\n\n\n  # Check whether --enable-static was given.\nif test \"${enable_static+set}\" = set; then :\n  enableval=$enable_static; p=${PACKAGE-default}\n    case $enableval in\n    yes) enable_static=yes ;;\n    no) enable_static=no ;;\n    *)\n     enable_static=no\n      # Look at the argument we got.  We use all the common list separators.\n      lt_save_ifs=\"$IFS\"; IFS=\"${IFS}$PATH_SEPARATOR,\"\n      for pkg in $enableval; do\n\tIFS=\"$lt_save_ifs\"\n\tif test \"X$pkg\" = \"X$p\"; then\n\t  enable_static=yes\n\tfi\n      done\n      IFS=\"$lt_save_ifs\"\n      ;;\n    esac\nelse\n  enable_static=yes\nfi\n\n\n\n\n\n\n\n\n\n\n# Check whether --with-pic was given.\nif test \"${with_pic+set}\" = set; then :\n  withval=$with_pic; lt_p=${PACKAGE-default}\n    case $withval in\n    yes|no) pic_mode=$withval ;;\n    *)\n      pic_mode=default\n      # Look at the argument we got.  We use all the common list separators.\n      lt_save_ifs=\"$IFS\"; IFS=\"${IFS}$PATH_SEPARATOR,\"\n      for lt_pkg in $withval; do\n\tIFS=\"$lt_save_ifs\"\n\tif test \"X$lt_pkg\" = \"X$lt_p\"; then\n\t  pic_mode=yes\n\tfi\n      done\n      IFS=\"$lt_save_ifs\"\n      ;;\n    esac\nelse\n  pic_mode=default\nfi\n\n\ntest -z \"$pic_mode\" && pic_mode=default\n\n\n\n\n\n\n\n  # Check whether --enable-fast-install was given.\nif test \"${enable_fast_install+set}\" = set; then :\n  enableval=$enable_fast_install; p=${PACKAGE-default}\n    case $enableval in\n    yes) enable_fast_install=yes ;;\n    no) enable_fast_install=no ;;\n    *)\n      enable_fast_install=no\n      # Look at the argument we got.  We use all the common list separators.\n      lt_save_ifs=\"$IFS\"; IFS=\"${IFS}$PATH_SEPARATOR,\"\n      for pkg in $enableval; do\n\tIFS=\"$lt_save_ifs\"\n\tif test \"X$pkg\" = \"X$p\"; then\n\t  enable_fast_install=yes\n\tfi\n      done\n      IFS=\"$lt_save_ifs\"\n      ;;\n    esac\nelse\n  enable_fast_install=yes\nfi\n\n\n\n\n\n\n\n\n\n\n\n# This can be used to rebuild libtool when needed\nLIBTOOL_DEPS=\"$ltmain\"\n\n# Always use our own libtool.\nLIBTOOL='$(SHELL) $(top_builddir)/libtool'\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\ntest -z \"$LN_S\" && LN_S=\"ln -s\"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nif test -n \"${ZSH_VERSION+set}\" ; then\n   setopt NO_GLOB_SUBST\nfi\n\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for objdir\" >&5\n$as_echo_n \"checking for objdir... \" >&6; }\nif ${lt_cv_objdir+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  rm -f .libs 2>/dev/null\nmkdir .libs 2>/dev/null\nif test -d .libs; then\n  lt_cv_objdir=.libs\nelse\n  # MS-DOS does not allow filenames that begin with a dot.\n  lt_cv_objdir=_libs\nfi\nrmdir .libs 2>/dev/null\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir\" >&5\n$as_echo \"$lt_cv_objdir\" >&6; }\nobjdir=$lt_cv_objdir\n\n\n\n\n\ncat >>confdefs.h <<_ACEOF\n#define LT_OBJDIR \"$lt_cv_objdir/\"\n_ACEOF\n\n\n\n\ncase $host_os in\naix3*)\n  # AIX sometimes has problems with the GCC collect2 program.  For some\n  # reason, if we set the COLLECT_NAMES environment variable, the problems\n  # vanish in a puff of smoke.\n  if test \"X${COLLECT_NAMES+set}\" != Xset; then\n    COLLECT_NAMES=\n    export COLLECT_NAMES\n  fi\n  ;;\nesac\n\n# Global variables:\nofile=libtool\ncan_build_shared=yes\n\n# All known linkers require a `.a' archive for static linking (except MSVC,\n# which needs '.lib').\nlibext=a\n\nwith_gnu_ld=\"$lt_cv_prog_gnu_ld\"\n\nold_CC=\"$CC\"\nold_CFLAGS=\"$CFLAGS\"\n\n# Set sane defaults for various variables\ntest -z \"$CC\" && CC=cc\ntest -z \"$LTCC\" && LTCC=$CC\ntest -z \"$LTCFLAGS\" && LTCFLAGS=$CFLAGS\ntest -z \"$LD\" && LD=ld\ntest -z \"$ac_objext\" && ac_objext=o\n\nfor cc_temp in $compiler\"\"; do\n  case $cc_temp in\n    compile | *[\\\\/]compile | ccache | *[\\\\/]ccache ) ;;\n    distcc | *[\\\\/]distcc | purify | *[\\\\/]purify ) ;;\n    \\-*) ;;\n    *) break;;\n  esac\ndone\ncc_basename=`$ECHO \"$cc_temp\" | $SED \"s%.*/%%; s%^$host_alias-%%\"`\n\n\n# Only perform the check for file, if the check method requires it\ntest -z \"$MAGIC_CMD\" && MAGIC_CMD=file\ncase $deplibs_check_method in\nfile_magic*)\n  if test \"$file_magic_cmd\" = '$MAGIC_CMD'; then\n    { $as_echo \"$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file\" >&5\n$as_echo_n \"checking for ${ac_tool_prefix}file... \" >&6; }\nif ${lt_cv_path_MAGIC_CMD+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  case $MAGIC_CMD in\n[\\\\/*] |  ?:[\\\\/]*)\n  lt_cv_path_MAGIC_CMD=\"$MAGIC_CMD\" # Let the user override the test with a path.\n  ;;\n*)\n  lt_save_MAGIC_CMD=\"$MAGIC_CMD\"\n  lt_save_ifs=\"$IFS\"; IFS=$PATH_SEPARATOR\n  ac_dummy=\"/usr/bin$PATH_SEPARATOR$PATH\"\n  for ac_dir in $ac_dummy; do\n    IFS=\"$lt_save_ifs\"\n    test -z \"$ac_dir\" && ac_dir=.\n    if test -f $ac_dir/${ac_tool_prefix}file; then\n      lt_cv_path_MAGIC_CMD=\"$ac_dir/${ac_tool_prefix}file\"\n      if test -n \"$file_magic_test_file\"; then\n\tcase $deplibs_check_method in\n\t\"file_magic \"*)\n\t  file_magic_regex=`expr \"$deplibs_check_method\" : \"file_magic \\(.*\\)\"`\n\t  MAGIC_CMD=\"$lt_cv_path_MAGIC_CMD\"\n\t  if eval $file_magic_cmd \\$file_magic_test_file 2> /dev/null |\n\t    $EGREP \"$file_magic_regex\" > /dev/null; then\n\t    :\n\t  else\n\t    cat <<_LT_EOF 1>&2\n\n*** Warning: the command libtool uses to detect shared libraries,\n*** $file_magic_cmd, produces output that libtool cannot recognize.\n*** The result is that libtool may fail to recognize shared libraries\n*** as such.  This will affect the creation of libtool libraries that\n*** depend on shared libraries, but programs linked with such libtool\n*** libraries will work regardless of this problem.  Nevertheless, you\n*** may want to report the problem to your system manager and/or to\n*** bug-libtool@gnu.org\n\n_LT_EOF\n\t  fi ;;\n\tesac\n      fi\n      break\n    fi\n  done\n  IFS=\"$lt_save_ifs\"\n  MAGIC_CMD=\"$lt_save_MAGIC_CMD\"\n  ;;\nesac\nfi\n\nMAGIC_CMD=\"$lt_cv_path_MAGIC_CMD\"\nif test -n \"$MAGIC_CMD\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD\" >&5\n$as_echo \"$MAGIC_CMD\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\nfi\n\n\n\n\n\nif test -z \"$lt_cv_path_MAGIC_CMD\"; then\n  if test -n \"$ac_tool_prefix\"; then\n    { $as_echo \"$as_me:${as_lineno-$LINENO}: checking for file\" >&5\n$as_echo_n \"checking for file... \" >&6; }\nif ${lt_cv_path_MAGIC_CMD+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  case $MAGIC_CMD in\n[\\\\/*] |  ?:[\\\\/]*)\n  lt_cv_path_MAGIC_CMD=\"$MAGIC_CMD\" # Let the user override the test with a path.\n  ;;\n*)\n  lt_save_MAGIC_CMD=\"$MAGIC_CMD\"\n  lt_save_ifs=\"$IFS\"; IFS=$PATH_SEPARATOR\n  ac_dummy=\"/usr/bin$PATH_SEPARATOR$PATH\"\n  for ac_dir in $ac_dummy; do\n    IFS=\"$lt_save_ifs\"\n    test -z \"$ac_dir\" && ac_dir=.\n    if test -f $ac_dir/file; then\n      lt_cv_path_MAGIC_CMD=\"$ac_dir/file\"\n      if test -n \"$file_magic_test_file\"; then\n\tcase $deplibs_check_method in\n\t\"file_magic \"*)\n\t  file_magic_regex=`expr \"$deplibs_check_method\" : \"file_magic \\(.*\\)\"`\n\t  MAGIC_CMD=\"$lt_cv_path_MAGIC_CMD\"\n\t  if eval $file_magic_cmd \\$file_magic_test_file 2> /dev/null |\n\t    $EGREP \"$file_magic_regex\" > /dev/null; then\n\t    :\n\t  else\n\t    cat <<_LT_EOF 1>&2\n\n*** Warning: the command libtool uses to detect shared libraries,\n*** $file_magic_cmd, produces output that libtool cannot recognize.\n*** The result is that libtool may fail to recognize shared libraries\n*** as such.  This will affect the creation of libtool libraries that\n*** depend on shared libraries, but programs linked with such libtool\n*** libraries will work regardless of this problem.  Nevertheless, you\n*** may want to report the problem to your system manager and/or to\n*** bug-libtool@gnu.org\n\n_LT_EOF\n\t  fi ;;\n\tesac\n      fi\n      break\n    fi\n  done\n  IFS=\"$lt_save_ifs\"\n  MAGIC_CMD=\"$lt_save_MAGIC_CMD\"\n  ;;\nesac\nfi\n\nMAGIC_CMD=\"$lt_cv_path_MAGIC_CMD\"\nif test -n \"$MAGIC_CMD\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD\" >&5\n$as_echo \"$MAGIC_CMD\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\nfi\n\n\n  else\n    MAGIC_CMD=:\n  fi\nfi\n\n  fi\n  ;;\nesac\n\n# Use C for the default configuration in the libtool script\n\nlt_save_CC=\"$CC\"\nac_ext=c\nac_cpp='$CPP $CPPFLAGS'\nac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'\nac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'\nac_compiler_gnu=$ac_cv_c_compiler_gnu\n\n\n# Source file extension for C test sources.\nac_ext=c\n\n# Object file extension for compiled C test sources.\nobjext=o\nobjext=$objext\n\n# Code to be used in simple compile tests\nlt_simple_compile_test_code=\"int some_variable = 0;\"\n\n# Code to be used in simple link tests\nlt_simple_link_test_code='int main(){return(0);}'\n\n\n\n\n\n\n\n# If no C compiler was specified, use CC.\nLTCC=${LTCC-\"$CC\"}\n\n# If no C compiler flags were specified, use CFLAGS.\nLTCFLAGS=${LTCFLAGS-\"$CFLAGS\"}\n\n# Allow CC to be a program name with arguments.\ncompiler=$CC\n\n# Save the default compiler, since it gets overwritten when the other\n# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.\ncompiler_DEFAULT=$CC\n\n# save warnings/boilerplate of simple test code\nac_outfile=conftest.$ac_objext\necho \"$lt_simple_compile_test_code\" >conftest.$ac_ext\neval \"$ac_compile\" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err\n_lt_compiler_boilerplate=`cat conftest.err`\n$RM conftest*\n\nac_outfile=conftest.$ac_objext\necho \"$lt_simple_link_test_code\" >conftest.$ac_ext\neval \"$ac_link\" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err\n_lt_linker_boilerplate=`cat conftest.err`\n$RM -r conftest*\n\n\nif test -n \"$compiler\"; then\n\nlt_prog_compiler_no_builtin_flag=\n\nif test \"$GCC\" = yes; then\n  case $cc_basename in\n  nvcc*)\n    lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;;\n  *)\n    lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;;\n  esac\n\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions\" >&5\n$as_echo_n \"checking if $compiler supports -fno-rtti -fno-exceptions... \" >&6; }\nif ${lt_cv_prog_compiler_rtti_exceptions+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  lt_cv_prog_compiler_rtti_exceptions=no\n   ac_outfile=conftest.$ac_objext\n   echo \"$lt_simple_compile_test_code\" > conftest.$ac_ext\n   lt_compiler_flag=\"-fno-rtti -fno-exceptions\"\n   # Insert the option either (1) after the last *FLAGS variable, or\n   # (2) before a word containing \"conftest.\", or (3) at the end.\n   # Note that $ac_compile itself does not contain backslashes and begins\n   # with a dollar sign (not a hyphen), so the echo should work correctly.\n   # The option is referenced via a variable to avoid confusing sed.\n   lt_compile=`echo \"$ac_compile\" | $SED \\\n   -e 's:.*FLAGS}\\{0,1\\} :&$lt_compiler_flag :; t' \\\n   -e 's: [^ ]*conftest\\.: $lt_compiler_flag&:; t' \\\n   -e 's:$: $lt_compiler_flag:'`\n   (eval echo \"\\\"\\$as_me:$LINENO: $lt_compile\\\"\" >&5)\n   (eval \"$lt_compile\" 2>conftest.err)\n   ac_status=$?\n   cat conftest.err >&5\n   echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n   if (exit $ac_status) && test -s \"$ac_outfile\"; then\n     # The compiler can only warn and ignore the option if not recognized\n     # So say no if there are warnings other than the usual output.\n     $ECHO \"$_lt_compiler_boilerplate\" | $SED '/^$/d' >conftest.exp\n     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2\n     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then\n       lt_cv_prog_compiler_rtti_exceptions=yes\n     fi\n   fi\n   $RM conftest*\n\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions\" >&5\n$as_echo \"$lt_cv_prog_compiler_rtti_exceptions\" >&6; }\n\nif test x\"$lt_cv_prog_compiler_rtti_exceptions\" = xyes; then\n    lt_prog_compiler_no_builtin_flag=\"$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions\"\nelse\n    :\nfi\n\nfi\n\n\n\n\n\n\n  lt_prog_compiler_wl=\nlt_prog_compiler_pic=\nlt_prog_compiler_static=\n\n\n  if test \"$GCC\" = yes; then\n    lt_prog_compiler_wl='-Wl,'\n    lt_prog_compiler_static='-static'\n\n    case $host_os in\n      aix*)\n      # All AIX code is PIC.\n      if test \"$host_cpu\" = ia64; then\n\t# AIX 5 now supports IA64 processor\n\tlt_prog_compiler_static='-Bstatic'\n      fi\n      ;;\n\n    amigaos*)\n      case $host_cpu in\n      powerpc)\n            # see comment about AmigaOS4 .so support\n            lt_prog_compiler_pic='-fPIC'\n        ;;\n      m68k)\n            # FIXME: we need at least 68020 code to build shared libraries, but\n            # adding the `-m68020' flag to GCC prevents building anything better,\n            # like `-m68040'.\n            lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'\n        ;;\n      esac\n      ;;\n\n    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)\n      # PIC is the default for these OSes.\n      ;;\n\n    mingw* | cygwin* | pw32* | os2* | cegcc*)\n      # This hack is so that the source file can tell whether it is being\n      # built for inclusion in a dll (and should export symbols for example).\n      # Although the cygwin gcc ignores -fPIC, still need this for old-style\n      # (--disable-auto-import) libraries\n      lt_prog_compiler_pic='-DDLL_EXPORT'\n      ;;\n\n    darwin* | rhapsody*)\n      # PIC is the default on this platform\n      # Common symbols not allowed in MH_DYLIB files\n      lt_prog_compiler_pic='-fno-common'\n      ;;\n\n    haiku*)\n      # PIC is the default for Haiku.\n      # The \"-static\" flag exists, but is broken.\n      lt_prog_compiler_static=\n      ;;\n\n    hpux*)\n      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit\n      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag\n      # sets the default TLS model and affects inlining.\n      case $host_cpu in\n      hppa*64*)\n\t# +Z the default\n\t;;\n      *)\n\tlt_prog_compiler_pic='-fPIC'\n\t;;\n      esac\n      ;;\n\n    interix[3-9]*)\n      # Interix 3.x gcc -fpic/-fPIC options generate broken code.\n      # Instead, we relocate shared libraries at runtime.\n      ;;\n\n    msdosdjgpp*)\n      # Just because we use GCC doesn't mean we suddenly get shared libraries\n      # on systems that don't support them.\n      lt_prog_compiler_can_build_shared=no\n      enable_shared=no\n      ;;\n\n    *nto* | *qnx*)\n      # QNX uses GNU C++, but need to define -shared option too, otherwise\n      # it will coredump.\n      lt_prog_compiler_pic='-fPIC -shared'\n      ;;\n\n    sysv4*MP*)\n      if test -d /usr/nec; then\n\tlt_prog_compiler_pic=-Kconform_pic\n      fi\n      ;;\n\n    *)\n      lt_prog_compiler_pic='-fPIC'\n      ;;\n    esac\n\n    case $cc_basename in\n    nvcc*) # Cuda Compiler Driver 2.2\n      lt_prog_compiler_wl='-Xlinker '\n      if test -n \"$lt_prog_compiler_pic\"; then\n        lt_prog_compiler_pic=\"-Xcompiler $lt_prog_compiler_pic\"\n      fi\n      ;;\n    esac\n  else\n    # PORTME Check for flag to pass linker flags through the system compiler.\n    case $host_os in\n    aix*)\n      lt_prog_compiler_wl='-Wl,'\n      if test \"$host_cpu\" = ia64; then\n\t# AIX 5 now supports IA64 processor\n\tlt_prog_compiler_static='-Bstatic'\n      else\n\tlt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'\n      fi\n      ;;\n\n    mingw* | cygwin* | pw32* | os2* | cegcc*)\n      # This hack is so that the source file can tell whether it is being\n      # built for inclusion in a dll (and should export symbols for example).\n      lt_prog_compiler_pic='-DDLL_EXPORT'\n      ;;\n\n    hpux9* | hpux10* | hpux11*)\n      lt_prog_compiler_wl='-Wl,'\n      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but\n      # not for PA HP-UX.\n      case $host_cpu in\n      hppa*64*|ia64*)\n\t# +Z the default\n\t;;\n      *)\n\tlt_prog_compiler_pic='+Z'\n\t;;\n      esac\n      # Is there a better lt_prog_compiler_static that works with the bundled CC?\n      lt_prog_compiler_static='${wl}-a ${wl}archive'\n      ;;\n\n    irix5* | irix6* | nonstopux*)\n      lt_prog_compiler_wl='-Wl,'\n      # PIC (with -KPIC) is the default.\n      lt_prog_compiler_static='-non_shared'\n      ;;\n\n    linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)\n      case $cc_basename in\n      # old Intel for x86_64 which still supported -KPIC.\n      ecc*)\n\tlt_prog_compiler_wl='-Wl,'\n\tlt_prog_compiler_pic='-KPIC'\n\tlt_prog_compiler_static='-static'\n        ;;\n      # icc used to be incompatible with GCC.\n      # ICC 10 doesn't accept -KPIC any more.\n      icc* | ifort*)\n\tlt_prog_compiler_wl='-Wl,'\n\tlt_prog_compiler_pic='-fPIC'\n\tlt_prog_compiler_static='-static'\n        ;;\n      # Lahey Fortran 8.1.\n      lf95*)\n\tlt_prog_compiler_wl='-Wl,'\n\tlt_prog_compiler_pic='--shared'\n\tlt_prog_compiler_static='--static'\n\t;;\n      nagfor*)\n\t# NAG Fortran compiler\n\tlt_prog_compiler_wl='-Wl,-Wl,,'\n\tlt_prog_compiler_pic='-PIC'\n\tlt_prog_compiler_static='-Bstatic'\n\t;;\n      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)\n        # Portland Group compilers (*not* the Pentium gcc compiler,\n\t# which looks to be a dead project)\n\tlt_prog_compiler_wl='-Wl,'\n\tlt_prog_compiler_pic='-fpic'\n\tlt_prog_compiler_static='-Bstatic'\n        ;;\n      ccc*)\n        lt_prog_compiler_wl='-Wl,'\n        # All Alpha code is PIC.\n        lt_prog_compiler_static='-non_shared'\n        ;;\n      xl* | bgxl* | bgf* | mpixl*)\n\t# IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene\n\tlt_prog_compiler_wl='-Wl,'\n\tlt_prog_compiler_pic='-qpic'\n\tlt_prog_compiler_static='-qstaticlink'\n\t;;\n      *)\n\tcase `$CC -V 2>&1 | sed 5q` in\n\t*Sun\\ Ceres\\ Fortran* | *Sun*Fortran*\\ [1-7].* | *Sun*Fortran*\\ 8.[0-3]*)\n\t  # Sun Fortran 8.3 passes all unrecognized flags to the linker\n\t  lt_prog_compiler_pic='-KPIC'\n\t  lt_prog_compiler_static='-Bstatic'\n\t  lt_prog_compiler_wl=''\n\t  ;;\n\t*Sun\\ F* | *Sun*Fortran*)\n\t  lt_prog_compiler_pic='-KPIC'\n\t  lt_prog_compiler_static='-Bstatic'\n\t  lt_prog_compiler_wl='-Qoption ld '\n\t  ;;\n\t*Sun\\ C*)\n\t  # Sun C 5.9\n\t  lt_prog_compiler_pic='-KPIC'\n\t  lt_prog_compiler_static='-Bstatic'\n\t  lt_prog_compiler_wl='-Wl,'\n\t  ;;\n        *Intel*\\ [CF]*Compiler*)\n\t  lt_prog_compiler_wl='-Wl,'\n\t  lt_prog_compiler_pic='-fPIC'\n\t  lt_prog_compiler_static='-static'\n\t  ;;\n\t*Portland\\ Group*)\n\t  lt_prog_compiler_wl='-Wl,'\n\t  lt_prog_compiler_pic='-fpic'\n\t  lt_prog_compiler_static='-Bstatic'\n\t  ;;\n\tesac\n\t;;\n      esac\n      ;;\n\n    newsos6)\n      lt_prog_compiler_pic='-KPIC'\n      lt_prog_compiler_static='-Bstatic'\n      ;;\n\n    *nto* | *qnx*)\n      # QNX uses GNU C++, but need to define -shared option too, otherwise\n      # it will coredump.\n      lt_prog_compiler_pic='-fPIC -shared'\n      ;;\n\n    osf3* | osf4* | osf5*)\n      lt_prog_compiler_wl='-Wl,'\n      # All OSF/1 code is PIC.\n      lt_prog_compiler_static='-non_shared'\n      ;;\n\n    rdos*)\n      lt_prog_compiler_static='-non_shared'\n      ;;\n\n    solaris*)\n      lt_prog_compiler_pic='-KPIC'\n      lt_prog_compiler_static='-Bstatic'\n      case $cc_basename in\n      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)\n\tlt_prog_compiler_wl='-Qoption ld ';;\n      *)\n\tlt_prog_compiler_wl='-Wl,';;\n      esac\n      ;;\n\n    sunos4*)\n      lt_prog_compiler_wl='-Qoption ld '\n      lt_prog_compiler_pic='-PIC'\n      lt_prog_compiler_static='-Bstatic'\n      ;;\n\n    sysv4 | sysv4.2uw2* | sysv4.3*)\n      lt_prog_compiler_wl='-Wl,'\n      lt_prog_compiler_pic='-KPIC'\n      lt_prog_compiler_static='-Bstatic'\n      ;;\n\n    sysv4*MP*)\n      if test -d /usr/nec ;then\n\tlt_prog_compiler_pic='-Kconform_pic'\n\tlt_prog_compiler_static='-Bstatic'\n      fi\n      ;;\n\n    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)\n      lt_prog_compiler_wl='-Wl,'\n      lt_prog_compiler_pic='-KPIC'\n      lt_prog_compiler_static='-Bstatic'\n      ;;\n\n    unicos*)\n      lt_prog_compiler_wl='-Wl,'\n      lt_prog_compiler_can_build_shared=no\n      ;;\n\n    uts4*)\n      lt_prog_compiler_pic='-pic'\n      lt_prog_compiler_static='-Bstatic'\n      ;;\n\n    *)\n      lt_prog_compiler_can_build_shared=no\n      ;;\n    esac\n  fi\n\ncase $host_os in\n  # For platforms which do not support PIC, -DPIC is meaningless:\n  *djgpp*)\n    lt_prog_compiler_pic=\n    ;;\n  *)\n    lt_prog_compiler_pic=\"$lt_prog_compiler_pic -DPIC\"\n    ;;\nesac\n\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC\" >&5\n$as_echo_n \"checking for $compiler option to produce PIC... \" >&6; }\nif ${lt_cv_prog_compiler_pic+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  lt_cv_prog_compiler_pic=$lt_prog_compiler_pic\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic\" >&5\n$as_echo \"$lt_cv_prog_compiler_pic\" >&6; }\nlt_prog_compiler_pic=$lt_cv_prog_compiler_pic\n\n#\n# Check to make sure the PIC flag actually works.\n#\nif test -n \"$lt_prog_compiler_pic\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works\" >&5\n$as_echo_n \"checking if $compiler PIC flag $lt_prog_compiler_pic works... \" >&6; }\nif ${lt_cv_prog_compiler_pic_works+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  lt_cv_prog_compiler_pic_works=no\n   ac_outfile=conftest.$ac_objext\n   echo \"$lt_simple_compile_test_code\" > conftest.$ac_ext\n   lt_compiler_flag=\"$lt_prog_compiler_pic -DPIC\"\n   # Insert the option either (1) after the last *FLAGS variable, or\n   # (2) before a word containing \"conftest.\", or (3) at the end.\n   # Note that $ac_compile itself does not contain backslashes and begins\n   # with a dollar sign (not a hyphen), so the echo should work correctly.\n   # The option is referenced via a variable to avoid confusing sed.\n   lt_compile=`echo \"$ac_compile\" | $SED \\\n   -e 's:.*FLAGS}\\{0,1\\} :&$lt_compiler_flag :; t' \\\n   -e 's: [^ ]*conftest\\.: $lt_compiler_flag&:; t' \\\n   -e 's:$: $lt_compiler_flag:'`\n   (eval echo \"\\\"\\$as_me:$LINENO: $lt_compile\\\"\" >&5)\n   (eval \"$lt_compile\" 2>conftest.err)\n   ac_status=$?\n   cat conftest.err >&5\n   echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n   if (exit $ac_status) && test -s \"$ac_outfile\"; then\n     # The compiler can only warn and ignore the option if not recognized\n     # So say no if there are warnings other than the usual output.\n     $ECHO \"$_lt_compiler_boilerplate\" | $SED '/^$/d' >conftest.exp\n     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2\n     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then\n       lt_cv_prog_compiler_pic_works=yes\n     fi\n   fi\n   $RM conftest*\n\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works\" >&5\n$as_echo \"$lt_cv_prog_compiler_pic_works\" >&6; }\n\nif test x\"$lt_cv_prog_compiler_pic_works\" = xyes; then\n    case $lt_prog_compiler_pic in\n     \"\" | \" \"*) ;;\n     *) lt_prog_compiler_pic=\" $lt_prog_compiler_pic\" ;;\n     esac\nelse\n    lt_prog_compiler_pic=\n     lt_prog_compiler_can_build_shared=no\nfi\n\nfi\n\n\n\n\n\n\n\n\n\n\n\n#\n# Check to make sure the static flag actually works.\n#\nwl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\\\"$lt_prog_compiler_static\\\"\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works\" >&5\n$as_echo_n \"checking if $compiler static flag $lt_tmp_static_flag works... \" >&6; }\nif ${lt_cv_prog_compiler_static_works+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  lt_cv_prog_compiler_static_works=no\n   save_LDFLAGS=\"$LDFLAGS\"\n   LDFLAGS=\"$LDFLAGS $lt_tmp_static_flag\"\n   echo \"$lt_simple_link_test_code\" > conftest.$ac_ext\n   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then\n     # The linker can only warn and ignore the option if not recognized\n     # So say no if there are warnings\n     if test -s conftest.err; then\n       # Append any errors to the config.log.\n       cat conftest.err 1>&5\n       $ECHO \"$_lt_linker_boilerplate\" | $SED '/^$/d' > conftest.exp\n       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2\n       if diff conftest.exp conftest.er2 >/dev/null; then\n         lt_cv_prog_compiler_static_works=yes\n       fi\n     else\n       lt_cv_prog_compiler_static_works=yes\n     fi\n   fi\n   $RM -r conftest*\n   LDFLAGS=\"$save_LDFLAGS\"\n\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works\" >&5\n$as_echo \"$lt_cv_prog_compiler_static_works\" >&6; }\n\nif test x\"$lt_cv_prog_compiler_static_works\" = xyes; then\n    :\nelse\n    lt_prog_compiler_static=\nfi\n\n\n\n\n\n\n\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext\" >&5\n$as_echo_n \"checking if $compiler supports -c -o file.$ac_objext... \" >&6; }\nif ${lt_cv_prog_compiler_c_o+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  lt_cv_prog_compiler_c_o=no\n   $RM -r conftest 2>/dev/null\n   mkdir conftest\n   cd conftest\n   mkdir out\n   echo \"$lt_simple_compile_test_code\" > conftest.$ac_ext\n\n   lt_compiler_flag=\"-o out/conftest2.$ac_objext\"\n   # Insert the option either (1) after the last *FLAGS variable, or\n   # (2) before a word containing \"conftest.\", or (3) at the end.\n   # Note that $ac_compile itself does not contain backslashes and begins\n   # with a dollar sign (not a hyphen), so the echo should work correctly.\n   lt_compile=`echo \"$ac_compile\" | $SED \\\n   -e 's:.*FLAGS}\\{0,1\\} :&$lt_compiler_flag :; t' \\\n   -e 's: [^ ]*conftest\\.: $lt_compiler_flag&:; t' \\\n   -e 's:$: $lt_compiler_flag:'`\n   (eval echo \"\\\"\\$as_me:$LINENO: $lt_compile\\\"\" >&5)\n   (eval \"$lt_compile\" 2>out/conftest.err)\n   ac_status=$?\n   cat out/conftest.err >&5\n   echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n   if (exit $ac_status) && test -s out/conftest2.$ac_objext\n   then\n     # The compiler can only warn and ignore the option if not recognized\n     # So say no if there are warnings\n     $ECHO \"$_lt_compiler_boilerplate\" | $SED '/^$/d' > out/conftest.exp\n     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2\n     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then\n       lt_cv_prog_compiler_c_o=yes\n     fi\n   fi\n   chmod u+w . 2>&5\n   $RM conftest*\n   # SGI C++ compiler will create directory out/ii_files/ for\n   # template instantiation\n   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files\n   $RM out/* && rmdir out\n   cd ..\n   $RM -r conftest\n   $RM conftest*\n\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o\" >&5\n$as_echo \"$lt_cv_prog_compiler_c_o\" >&6; }\n\n\n\n\n\n\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext\" >&5\n$as_echo_n \"checking if $compiler supports -c -o file.$ac_objext... \" >&6; }\nif ${lt_cv_prog_compiler_c_o+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  lt_cv_prog_compiler_c_o=no\n   $RM -r conftest 2>/dev/null\n   mkdir conftest\n   cd conftest\n   mkdir out\n   echo \"$lt_simple_compile_test_code\" > conftest.$ac_ext\n\n   lt_compiler_flag=\"-o out/conftest2.$ac_objext\"\n   # Insert the option either (1) after the last *FLAGS variable, or\n   # (2) before a word containing \"conftest.\", or (3) at the end.\n   # Note that $ac_compile itself does not contain backslashes and begins\n   # with a dollar sign (not a hyphen), so the echo should work correctly.\n   lt_compile=`echo \"$ac_compile\" | $SED \\\n   -e 's:.*FLAGS}\\{0,1\\} :&$lt_compiler_flag :; t' \\\n   -e 's: [^ ]*conftest\\.: $lt_compiler_flag&:; t' \\\n   -e 's:$: $lt_compiler_flag:'`\n   (eval echo \"\\\"\\$as_me:$LINENO: $lt_compile\\\"\" >&5)\n   (eval \"$lt_compile\" 2>out/conftest.err)\n   ac_status=$?\n   cat out/conftest.err >&5\n   echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n   if (exit $ac_status) && test -s out/conftest2.$ac_objext\n   then\n     # The compiler can only warn and ignore the option if not recognized\n     # So say no if there are warnings\n     $ECHO \"$_lt_compiler_boilerplate\" | $SED '/^$/d' > out/conftest.exp\n     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2\n     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then\n       lt_cv_prog_compiler_c_o=yes\n     fi\n   fi\n   chmod u+w . 2>&5\n   $RM conftest*\n   # SGI C++ compiler will create directory out/ii_files/ for\n   # template instantiation\n   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files\n   $RM out/* && rmdir out\n   cd ..\n   $RM -r conftest\n   $RM conftest*\n\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o\" >&5\n$as_echo \"$lt_cv_prog_compiler_c_o\" >&6; }\n\n\n\n\nhard_links=\"nottested\"\nif test \"$lt_cv_prog_compiler_c_o\" = no && test \"$need_locks\" != no; then\n  # do not overwrite the value of need_locks provided by the user\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links\" >&5\n$as_echo_n \"checking if we can lock with hard links... \" >&6; }\n  hard_links=yes\n  $RM conftest*\n  ln conftest.a conftest.b 2>/dev/null && hard_links=no\n  touch conftest.a\n  ln conftest.a conftest.b 2>&5 || hard_links=no\n  ln conftest.a conftest.b 2>/dev/null && hard_links=no\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $hard_links\" >&5\n$as_echo \"$hard_links\" >&6; }\n  if test \"$hard_links\" = no; then\n    { $as_echo \"$as_me:${as_lineno-$LINENO}: WARNING: \\`$CC' does not support \\`-c -o', so \\`make -j' may be unsafe\" >&5\n$as_echo \"$as_me: WARNING: \\`$CC' does not support \\`-c -o', so \\`make -j' may be unsafe\" >&2;}\n    need_locks=warn\n  fi\nelse\n  need_locks=no\nfi\n\n\n\n\n\n\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries\" >&5\n$as_echo_n \"checking whether the $compiler linker ($LD) supports shared libraries... \" >&6; }\n\n  runpath_var=\n  allow_undefined_flag=\n  always_export_symbols=no\n  archive_cmds=\n  archive_expsym_cmds=\n  compiler_needs_object=no\n  enable_shared_with_static_runtimes=no\n  export_dynamic_flag_spec=\n  export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\\''s/.* //'\\'' | sort | uniq > $export_symbols'\n  hardcode_automatic=no\n  hardcode_direct=no\n  hardcode_direct_absolute=no\n  hardcode_libdir_flag_spec=\n  hardcode_libdir_separator=\n  hardcode_minus_L=no\n  hardcode_shlibpath_var=unsupported\n  inherit_rpath=no\n  link_all_deplibs=unknown\n  module_cmds=\n  module_expsym_cmds=\n  old_archive_from_new_cmds=\n  old_archive_from_expsyms_cmds=\n  thread_safe_flag_spec=\n  whole_archive_flag_spec=\n  # include_expsyms should be a list of space-separated symbols to be *always*\n  # included in the symbol list\n  include_expsyms=\n  # exclude_expsyms can be an extended regexp of symbols to exclude\n  # it will be wrapped by ` (' and `)$', so one must not match beginning or\n  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',\n  # as well as any symbol that contains `d'.\n  exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'\n  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out\n  # platforms (ab)use it in PIC code, but their linkers get confused if\n  # the symbol is explicitly referenced.  Since portable code cannot\n  # rely on this symbol name, it's probably fine to never include it in\n  # preloaded symbol tables.\n  # Exclude shared library initialization/finalization symbols.\n  extract_expsyms_cmds=\n\n  case $host_os in\n  cygwin* | mingw* | pw32* | cegcc*)\n    # FIXME: the MSVC++ port hasn't been tested in a loooong time\n    # When not using gcc, we currently assume that we are using\n    # Microsoft Visual C++.\n    if test \"$GCC\" != yes; then\n      with_gnu_ld=no\n    fi\n    ;;\n  interix*)\n    # we just hope/assume this is gcc and not c89 (= MSVC++)\n    with_gnu_ld=yes\n    ;;\n  openbsd*)\n    with_gnu_ld=no\n    ;;\n  linux* | k*bsd*-gnu | gnu*)\n    link_all_deplibs=no\n    ;;\n  esac\n\n  ld_shlibs=yes\n\n  # On some targets, GNU ld is compatible enough with the native linker\n  # that we're better off using the native interface for both.\n  lt_use_gnu_ld_interface=no\n  if test \"$with_gnu_ld\" = yes; then\n    case $host_os in\n      aix*)\n\t# The AIX port of GNU ld has always aspired to compatibility\n\t# with the native linker.  However, as the warning in the GNU ld\n\t# block says, versions before 2.19.5* couldn't really create working\n\t# shared libraries, regardless of the interface used.\n\tcase `$LD -v 2>&1` in\n\t  *\\ \\(GNU\\ Binutils\\)\\ 2.19.5*) ;;\n\t  *\\ \\(GNU\\ Binutils\\)\\ 2.[2-9]*) ;;\n\t  *\\ \\(GNU\\ Binutils\\)\\ [3-9]*) ;;\n\t  *)\n\t    lt_use_gnu_ld_interface=yes\n\t    ;;\n\tesac\n\t;;\n      *)\n\tlt_use_gnu_ld_interface=yes\n\t;;\n    esac\n  fi\n\n  if test \"$lt_use_gnu_ld_interface\" = yes; then\n    # If archive_cmds runs LD, not CC, wlarc should be empty\n    wlarc='${wl}'\n\n    # Set some defaults for GNU ld with shared library support. These\n    # are reset later if shared libraries are not supported. Putting them\n    # here allows them to be overridden if necessary.\n    runpath_var=LD_RUN_PATH\n    hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'\n    export_dynamic_flag_spec='${wl}--export-dynamic'\n    # ancient GNU ld didn't support --whole-archive et. al.\n    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then\n      whole_archive_flag_spec=\"$wlarc\"'--whole-archive$convenience '\"$wlarc\"'--no-whole-archive'\n    else\n      whole_archive_flag_spec=\n    fi\n    supports_anon_versioning=no\n    case `$LD -v 2>&1` in\n      *GNU\\ gold*) supports_anon_versioning=yes ;;\n      *\\ [01].* | *\\ 2.[0-9].* | *\\ 2.10.*) ;; # catch versions < 2.11\n      *\\ 2.11.93.0.2\\ *) supports_anon_versioning=yes ;; # RH7.3 ...\n      *\\ 2.11.92.0.12\\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...\n      *\\ 2.11.*) ;; # other 2.11 versions\n      *) supports_anon_versioning=yes ;;\n    esac\n\n    # See if GNU ld supports shared libraries.\n    case $host_os in\n    aix[3-9]*)\n      # On AIX/PPC, the GNU linker is very broken\n      if test \"$host_cpu\" != ia64; then\n\tld_shlibs=no\n\tcat <<_LT_EOF 1>&2\n\n*** Warning: the GNU linker, at least up to release 2.19, is reported\n*** to be unable to reliably create shared libraries on AIX.\n*** Therefore, libtool is disabling shared libraries support.  If you\n*** really care for shared libraries, you may want to install binutils\n*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.\n*** You will then need to restart the configuration process.\n\n_LT_EOF\n      fi\n      ;;\n\n    amigaos*)\n      case $host_cpu in\n      powerpc)\n            # see comment about AmigaOS4 .so support\n            archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'\n            archive_expsym_cmds=''\n        ;;\n      m68k)\n            archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO \"#define NAME $libname\" > $output_objdir/a2ixlibrary.data~$ECHO \"#define LIBRARY_ID 1\" >> $output_objdir/a2ixlibrary.data~$ECHO \"#define VERSION $major\" >> $output_objdir/a2ixlibrary.data~$ECHO \"#define REVISION $revision\" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'\n            hardcode_libdir_flag_spec='-L$libdir'\n            hardcode_minus_L=yes\n        ;;\n      esac\n      ;;\n\n    beos*)\n      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then\n\tallow_undefined_flag=unsupported\n\t# Joseph Beckenbach <jrb3@best.com> says some releases of gcc\n\t# support --undefined.  This deserves some investigation.  FIXME\n\tarchive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'\n      else\n\tld_shlibs=no\n      fi\n      ;;\n\n    cygwin* | mingw* | pw32* | cegcc*)\n      # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,\n      # as there is no search path for DLLs.\n      hardcode_libdir_flag_spec='-L$libdir'\n      export_dynamic_flag_spec='${wl}--export-all-symbols'\n      allow_undefined_flag=unsupported\n      always_export_symbols=no\n      enable_shared_with_static_runtimes=yes\n      export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\\''/^[BCDGRS][ ]/s/.*[ ]\\([^ ]*\\)/\\1 DATA/;s/^.*[ ]__nm__\\([^ ]*\\)[ ][^ ]*/\\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\\'' | sort | uniq > $export_symbols'\n      exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'\n\n      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then\n        archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'\n\t# If the export-symbols file already is a .def file (1st line\n\t# is EXPORTS), use it as is; otherwise, prepend...\n\tarchive_expsym_cmds='if test \"x`$SED 1q $export_symbols`\" = xEXPORTS; then\n\t  cp $export_symbols $output_objdir/$soname.def;\n\telse\n\t  echo EXPORTS > $output_objdir/$soname.def;\n\t  cat $export_symbols >> $output_objdir/$soname.def;\n\tfi~\n\t$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'\n      else\n\tld_shlibs=no\n      fi\n      ;;\n\n    haiku*)\n      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'\n      link_all_deplibs=yes\n      ;;\n\n    interix[3-9]*)\n      hardcode_direct=no\n      hardcode_shlibpath_var=no\n      hardcode_libdir_flag_spec='${wl}-rpath,$libdir'\n      export_dynamic_flag_spec='${wl}-E'\n      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.\n      # Instead, shared libraries are loaded at an image base (0x10000000 by\n      # default) and relocated if they conflict, which is a slow very memory\n      # consuming and fragmenting process.  To avoid this, we pick a random,\n      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link\n      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.\n      archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \\* 262144 + 1342177280` -o $lib'\n      archive_expsym_cmds='sed \"s,^,_,\" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \\* 262144 + 1342177280` -o $lib'\n      ;;\n\n    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)\n      tmp_diet=no\n      if test \"$host_os\" = linux-dietlibc; then\n\tcase $cc_basename in\n\t  diet\\ *) tmp_diet=yes;;\t# linux-dietlibc with static linking (!diet-dyn)\n\tesac\n      fi\n      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \\\n\t && test \"$tmp_diet\" = no\n      then\n\ttmp_addflag=' $pic_flag'\n\ttmp_sharedflag='-shared'\n\tcase $cc_basename,$host_cpu in\n        pgcc*)\t\t\t\t# Portland Group C compiler\n\t  whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\\\"\\\"; do test  -n \\\"$conv\\\" && new_convenience=\\\"$new_convenience,$conv\\\"; done; func_echo_all \\\"$new_convenience\\\"` ${wl}--no-whole-archive'\n\t  tmp_addflag=' $pic_flag'\n\t  ;;\n\tpgf77* | pgf90* | pgf95* | pgfortran*)\n\t\t\t\t\t# Portland Group f77 and f90 compilers\n\t  whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\\\"\\\"; do test  -n \\\"$conv\\\" && new_convenience=\\\"$new_convenience,$conv\\\"; done; func_echo_all \\\"$new_convenience\\\"` ${wl}--no-whole-archive'\n\t  tmp_addflag=' $pic_flag -Mnomain' ;;\n\tecc*,ia64* | icc*,ia64*)\t# Intel C compiler on ia64\n\t  tmp_addflag=' -i_dynamic' ;;\n\tefc*,ia64* | ifort*,ia64*)\t# Intel Fortran compiler on ia64\n\t  tmp_addflag=' -i_dynamic -nofor_main' ;;\n\tifc* | ifort*)\t\t\t# Intel Fortran compiler\n\t  tmp_addflag=' -nofor_main' ;;\n\tlf95*)\t\t\t\t# Lahey Fortran 8.1\n\t  whole_archive_flag_spec=\n\t  tmp_sharedflag='--shared' ;;\n\txl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)\n\t  tmp_sharedflag='-qmkshrobj'\n\t  tmp_addflag= ;;\n\tnvcc*)\t# Cuda Compiler Driver 2.2\n\t  whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\\\"\\\"; do test  -n \\\"$conv\\\" && new_convenience=\\\"$new_convenience,$conv\\\"; done; func_echo_all \\\"$new_convenience\\\"` ${wl}--no-whole-archive'\n\t  compiler_needs_object=yes\n\t  ;;\n\tesac\n\tcase `$CC -V 2>&1 | sed 5q` in\n\t*Sun\\ C*)\t\t\t# Sun C 5.9\n\t  whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\\\"\\\"; do test -z \\\"$conv\\\" || new_convenience=\\\"$new_convenience,$conv\\\"; done; func_echo_all \\\"$new_convenience\\\"` ${wl}--no-whole-archive'\n\t  compiler_needs_object=yes\n\t  tmp_sharedflag='-G' ;;\n\t*Sun\\ F*)\t\t\t# Sun Fortran 8.3\n\t  tmp_sharedflag='-G' ;;\n\tesac\n\tarchive_cmds='$CC '\"$tmp_sharedflag\"\"$tmp_addflag\"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'\n\n        if test \"x$supports_anon_versioning\" = xyes; then\n          archive_expsym_cmds='echo \"{ global:\" > $output_objdir/$libname.ver~\n\t    cat $export_symbols | sed -e \"s/\\(.*\\)/\\1;/\" >> $output_objdir/$libname.ver~\n\t    echo \"local: *; };\" >> $output_objdir/$libname.ver~\n\t    $CC '\"$tmp_sharedflag\"\"$tmp_addflag\"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'\n        fi\n\n\tcase $cc_basename in\n\txlf* | bgf* | bgxlf* | mpixlf*)\n\t  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself\n\t  whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'\n\t  hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'\n\t  archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'\n\t  if test \"x$supports_anon_versioning\" = xyes; then\n\t    archive_expsym_cmds='echo \"{ global:\" > $output_objdir/$libname.ver~\n\t      cat $export_symbols | sed -e \"s/\\(.*\\)/\\1;/\" >> $output_objdir/$libname.ver~\n\t      echo \"local: *; };\" >> $output_objdir/$libname.ver~\n\t      $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'\n\t  fi\n\t  ;;\n\tesac\n      else\n        ld_shlibs=no\n      fi\n      ;;\n\n    netbsd* | netbsdelf*-gnu)\n      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then\n\tarchive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'\n\twlarc=\n      else\n\tarchive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'\n\tarchive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'\n      fi\n      ;;\n\n    solaris*)\n      if $LD -v 2>&1 | $GREP 'BFD 2\\.8' > /dev/null; then\n\tld_shlibs=no\n\tcat <<_LT_EOF 1>&2\n\n*** Warning: The releases 2.8.* of the GNU linker cannot reliably\n*** create shared libraries on Solaris systems.  Therefore, libtool\n*** is disabling shared libraries support.  We urge you to upgrade GNU\n*** binutils to release 2.9.1 or newer.  Another option is to modify\n*** your PATH or compiler configuration so that the native linker is\n*** used, and then restart.\n\n_LT_EOF\n      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then\n\tarchive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'\n\tarchive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'\n      else\n\tld_shlibs=no\n      fi\n      ;;\n\n    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)\n      case `$LD -v 2>&1` in\n        *\\ [01].* | *\\ 2.[0-9].* | *\\ 2.1[0-5].*)\n\tld_shlibs=no\n\tcat <<_LT_EOF 1>&2\n\n*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not\n*** reliably create shared libraries on SCO systems.  Therefore, libtool\n*** is disabling shared libraries support.  We urge you to upgrade GNU\n*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify\n*** your PATH or compiler configuration so that the native linker is\n*** used, and then restart.\n\n_LT_EOF\n\t;;\n\t*)\n\t  # For security reasons, it is highly recommended that you always\n\t  # use absolute paths for naming shared libraries, and exclude the\n\t  # DT_RUNPATH tag from executables and libraries.  But doing so\n\t  # requires that you compile everything twice, which is a pain.\n\t  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then\n\t    hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'\n\t    archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'\n\t    archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'\n\t  else\n\t    ld_shlibs=no\n\t  fi\n\t;;\n      esac\n      ;;\n\n    sunos4*)\n      archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'\n      wlarc=\n      hardcode_direct=yes\n      hardcode_shlibpath_var=no\n      ;;\n\n    *)\n      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then\n\tarchive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'\n\tarchive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'\n      else\n\tld_shlibs=no\n      fi\n      ;;\n    esac\n\n    if test \"$ld_shlibs\" = no; then\n      runpath_var=\n      hardcode_libdir_flag_spec=\n      export_dynamic_flag_spec=\n      whole_archive_flag_spec=\n    fi\n  else\n    # PORTME fill in a description of your system's linker (not GNU ld)\n    case $host_os in\n    aix3*)\n      allow_undefined_flag=unsupported\n      always_export_symbols=yes\n      archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'\n      # Note: this linker hardcodes the directories in LIBPATH if there\n      # are no directories specified by -L.\n      hardcode_minus_L=yes\n      if test \"$GCC\" = yes && test -z \"$lt_prog_compiler_static\"; then\n\t# Neither direct hardcoding nor static linking is supported with a\n\t# broken collect2.\n\thardcode_direct=unsupported\n      fi\n      ;;\n\n    aix[4-9]*)\n      if test \"$host_cpu\" = ia64; then\n\t# On IA64, the linker does run time linking by default, so we don't\n\t# have to do anything special.\n\taix_use_runtimelinking=no\n\texp_sym_flag='-Bexport'\n\tno_entry_flag=\"\"\n      else\n\t# If we're using GNU nm, then we don't want the \"-C\" option.\n\t# -C means demangle to AIX nm, but means don't demangle with GNU nm\n\t# Also, AIX nm treats weak defined symbols like other global\n\t# defined symbols, whereas GNU nm marks them as \"W\".\n\tif $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then\n\t  export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\\''{ if (((\\$ 2 == \"T\") || (\\$ 2 == \"D\") || (\\$ 2 == \"B\") || (\\$ 2 == \"W\")) && (substr(\\$ 3,1,1) != \".\")) { print \\$ 3 } }'\\'' | sort -u > $export_symbols'\n\telse\n\t  export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\\''{ if (((\\$ 2 == \"T\") || (\\$ 2 == \"D\") || (\\$ 2 == \"B\")) && (substr(\\$ 3,1,1) != \".\")) { print \\$ 3 } }'\\'' | sort -u > $export_symbols'\n\tfi\n\taix_use_runtimelinking=no\n\n\t# Test if we are trying to use run time linking or normal\n\t# AIX style linking. If -brtl is somewhere in LDFLAGS, we\n\t# need to do runtime linking.\n\tcase $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)\n\t  for ld_flag in $LDFLAGS; do\n\t  if (test $ld_flag = \"-brtl\" || test $ld_flag = \"-Wl,-brtl\"); then\n\t    aix_use_runtimelinking=yes\n\t    break\n\t  fi\n\t  done\n\t  ;;\n\tesac\n\n\texp_sym_flag='-bexport'\n\tno_entry_flag='-bnoentry'\n      fi\n\n      # When large executables or shared objects are built, AIX ld can\n      # have problems creating the table of contents.  If linking a library\n      # or program results in \"error TOC overflow\" add -mminimal-toc to\n      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not\n      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.\n\n      archive_cmds=''\n      hardcode_direct=yes\n      hardcode_direct_absolute=yes\n      hardcode_libdir_separator=':'\n      link_all_deplibs=yes\n      file_list_spec='${wl}-f,'\n\n      if test \"$GCC\" = yes; then\n\tcase $host_os in aix4.[012]|aix4.[012].*)\n\t# We only want to do this on AIX 4.2 and lower, the check\n\t# below for broken collect2 doesn't work under 4.3+\n\t  collect2name=`${CC} -print-prog-name=collect2`\n\t  if test -f \"$collect2name\" &&\n\t   strings \"$collect2name\" | $GREP resolve_lib_name >/dev/null\n\t  then\n\t  # We have reworked collect2\n\t  :\n\t  else\n\t  # We have old collect2\n\t  hardcode_direct=unsupported\n\t  # It fails to find uninstalled libraries when the uninstalled\n\t  # path is not listed in the libpath.  Setting hardcode_minus_L\n\t  # to unsupported forces relinking\n\t  hardcode_minus_L=yes\n\t  hardcode_libdir_flag_spec='-L$libdir'\n\t  hardcode_libdir_separator=\n\t  fi\n\t  ;;\n\tesac\n\tshared_flag='-shared'\n\tif test \"$aix_use_runtimelinking\" = yes; then\n\t  shared_flag=\"$shared_flag \"'${wl}-G'\n\tfi\n\tlink_all_deplibs=no\n      else\n\t# not using gcc\n\tif test \"$host_cpu\" = ia64; then\n\t# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release\n\t# chokes on -Wl,-G. The following line is correct:\n\t  shared_flag='-G'\n\telse\n\t  if test \"$aix_use_runtimelinking\" = yes; then\n\t    shared_flag='${wl}-G'\n\t  else\n\t    shared_flag='${wl}-bM:SRE'\n\t  fi\n\tfi\n      fi\n\n      export_dynamic_flag_spec='${wl}-bexpall'\n      # It seems that -bexpall does not export symbols beginning with\n      # underscore (_), so it is better to generate a list of symbols to export.\n      always_export_symbols=yes\n      if test \"$aix_use_runtimelinking\" = yes; then\n\t# Warning - without using the other runtime loading flags (-brtl),\n\t# -berok will link without error, but may produce a broken library.\n\tallow_undefined_flag='-berok'\n        # Determine the default libpath from the value encoded in an\n        # empty executable.\n        if test \"${lt_cv_aix_libpath+set}\" = set; then\n  aix_libpath=$lt_cv_aix_libpath\nelse\n  if ${lt_cv_aix_libpath_+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n\nint\nmain ()\n{\n\n  ;\n  return 0;\n}\n_ACEOF\nif ac_fn_c_try_link \"$LINENO\"; then :\n\n  lt_aix_libpath_sed='\n      /Import File Strings/,/^$/ {\n\t  /^0/ {\n\t      s/^0  *\\([^ ]*\\) *$/\\1/\n\t      p\n\t  }\n      }'\n  lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e \"$lt_aix_libpath_sed\"`\n  # Check for a 64-bit object if we didn't find anything.\n  if test -z \"$lt_cv_aix_libpath_\"; then\n    lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e \"$lt_aix_libpath_sed\"`\n  fi\nfi\nrm -f core conftest.err conftest.$ac_objext \\\n    conftest$ac_exeext conftest.$ac_ext\n  if test -z \"$lt_cv_aix_libpath_\"; then\n    lt_cv_aix_libpath_=\"/usr/lib:/lib\"\n  fi\n\nfi\n\n  aix_libpath=$lt_cv_aix_libpath_\nfi\n\n        hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'\"$aix_libpath\"\n        archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '\"\\${wl}$no_entry_flag\"' $compiler_flags `if test \"x${allow_undefined_flag}\" != \"x\"; then func_echo_all \"${wl}${allow_undefined_flag}\"; else :; fi` '\"\\${wl}$exp_sym_flag:\\$export_symbols $shared_flag\"\n      else\n\tif test \"$host_cpu\" = ia64; then\n\t  hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'\n\t  allow_undefined_flag=\"-z nodefs\"\n\t  archive_expsym_cmds=\"\\$CC $shared_flag\"' -o $output_objdir/$soname $libobjs $deplibs '\"\\${wl}$no_entry_flag\"' $compiler_flags ${wl}${allow_undefined_flag} '\"\\${wl}$exp_sym_flag:\\$export_symbols\"\n\telse\n\t # Determine the default libpath from the value encoded in an\n\t # empty executable.\n\t if test \"${lt_cv_aix_libpath+set}\" = set; then\n  aix_libpath=$lt_cv_aix_libpath\nelse\n  if ${lt_cv_aix_libpath_+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n\nint\nmain ()\n{\n\n  ;\n  return 0;\n}\n_ACEOF\nif ac_fn_c_try_link \"$LINENO\"; then :\n\n  lt_aix_libpath_sed='\n      /Import File Strings/,/^$/ {\n\t  /^0/ {\n\t      s/^0  *\\([^ ]*\\) *$/\\1/\n\t      p\n\t  }\n      }'\n  lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e \"$lt_aix_libpath_sed\"`\n  # Check for a 64-bit object if we didn't find anything.\n  if test -z \"$lt_cv_aix_libpath_\"; then\n    lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e \"$lt_aix_libpath_sed\"`\n  fi\nfi\nrm -f core conftest.err conftest.$ac_objext \\\n    conftest$ac_exeext conftest.$ac_ext\n  if test -z \"$lt_cv_aix_libpath_\"; then\n    lt_cv_aix_libpath_=\"/usr/lib:/lib\"\n  fi\n\nfi\n\n  aix_libpath=$lt_cv_aix_libpath_\nfi\n\n\t hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'\"$aix_libpath\"\n\t  # Warning - without using the other run time loading flags,\n\t  # -berok will link without error, but may produce a broken library.\n\t  no_undefined_flag=' ${wl}-bernotok'\n\t  allow_undefined_flag=' ${wl}-berok'\n\t  if test \"$with_gnu_ld\" = yes; then\n\t    # We only use this code for GNU lds that support --whole-archive.\n\t    whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive'\n\t  else\n\t    # Exported symbols can be pulled into shared objects from archives\n\t    whole_archive_flag_spec='$convenience'\n\t  fi\n\t  archive_cmds_need_lc=yes\n\t  # This is similar to how AIX traditionally builds its shared libraries.\n\t  archive_expsym_cmds=\"\\$CC $shared_flag\"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'\n\tfi\n      fi\n      ;;\n\n    amigaos*)\n      case $host_cpu in\n      powerpc)\n            # see comment about AmigaOS4 .so support\n            archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'\n            archive_expsym_cmds=''\n        ;;\n      m68k)\n            archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO \"#define NAME $libname\" > $output_objdir/a2ixlibrary.data~$ECHO \"#define LIBRARY_ID 1\" >> $output_objdir/a2ixlibrary.data~$ECHO \"#define VERSION $major\" >> $output_objdir/a2ixlibrary.data~$ECHO \"#define REVISION $revision\" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'\n            hardcode_libdir_flag_spec='-L$libdir'\n            hardcode_minus_L=yes\n        ;;\n      esac\n      ;;\n\n    bsdi[45]*)\n      export_dynamic_flag_spec=-rdynamic\n      ;;\n\n    cygwin* | mingw* | pw32* | cegcc*)\n      # When not using gcc, we currently assume that we are using\n      # Microsoft Visual C++.\n      # hardcode_libdir_flag_spec is actually meaningless, as there is\n      # no search path for DLLs.\n      case $cc_basename in\n      cl*)\n\t# Native MSVC\n\thardcode_libdir_flag_spec=' '\n\tallow_undefined_flag=unsupported\n\talways_export_symbols=yes\n\tfile_list_spec='@'\n\t# Tell ltmain to make .lib files, not .a files.\n\tlibext=lib\n\t# Tell ltmain to make .dll files, not .so files.\n\tshrext_cmds=\".dll\"\n\t# FIXME: Setting linknames here is a bad hack.\n\tarchive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='\n\tarchive_expsym_cmds='if test \"x`$SED 1q $export_symbols`\" = xEXPORTS; then\n\t    sed -n -e 's/\\\\\\\\\\\\\\(.*\\\\\\\\\\\\\\)/-link\\\\\\ -EXPORT:\\\\\\\\\\\\\\1/' -e '1\\\\\\!p' < $export_symbols > $output_objdir/$soname.exp;\n\t  else\n\t    sed -e 's/\\\\\\\\\\\\\\(.*\\\\\\\\\\\\\\)/-link\\\\\\ -EXPORT:\\\\\\\\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;\n\t  fi~\n\t  $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs \"@$tool_output_objdir$soname.exp\" -Wl,-DLL,-IMPLIB:\"$tool_output_objdir$libname.dll.lib\"~\n\t  linknames='\n\t# The linker will not automatically build a static lib if we build a DLL.\n\t# _LT_TAGVAR(old_archive_from_new_cmds, )='true'\n\tenable_shared_with_static_runtimes=yes\n\texclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'\n\texport_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\\''/^[BCDGRS][ ]/s/.*[ ]\\([^ ]*\\)/\\1,DATA/'\\'' | $SED -e '\\''/^[AITW][ ]/s/.*[ ]//'\\'' | sort | uniq > $export_symbols'\n\t# Don't use ranlib\n\told_postinstall_cmds='chmod 644 $oldlib'\n\tpostlink_cmds='lt_outputfile=\"@OUTPUT@\"~\n\t  lt_tool_outputfile=\"@TOOL_OUTPUT@\"~\n\t  case $lt_outputfile in\n\t    *.exe|*.EXE) ;;\n\t    *)\n\t      lt_outputfile=\"$lt_outputfile.exe\"\n\t      lt_tool_outputfile=\"$lt_tool_outputfile.exe\"\n\t      ;;\n\t  esac~\n\t  if test \"$MANIFEST_TOOL\" != \":\" && test -f \"$lt_outputfile.manifest\"; then\n\t    $MANIFEST_TOOL -manifest \"$lt_tool_outputfile.manifest\" -outputresource:\"$lt_tool_outputfile\" || exit 1;\n\t    $RM \"$lt_outputfile.manifest\";\n\t  fi'\n\t;;\n      *)\n\t# Assume MSVC wrapper\n\thardcode_libdir_flag_spec=' '\n\tallow_undefined_flag=unsupported\n\t# Tell ltmain to make .lib files, not .a files.\n\tlibext=lib\n\t# Tell ltmain to make .dll files, not .so files.\n\tshrext_cmds=\".dll\"\n\t# FIXME: Setting linknames here is a bad hack.\n\tarchive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all \"$deplibs\" | $SED '\\''s/ -lc$//'\\''` -link -dll~linknames='\n\t# The linker will automatically build a .lib file if we build a DLL.\n\told_archive_from_new_cmds='true'\n\t# FIXME: Should let the user specify the lib program.\n\told_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'\n\tenable_shared_with_static_runtimes=yes\n\t;;\n      esac\n      ;;\n\n    darwin* | rhapsody*)\n\n\n  archive_cmds_need_lc=no\n  hardcode_direct=no\n  hardcode_automatic=yes\n  hardcode_shlibpath_var=unsupported\n  if test \"$lt_cv_ld_force_load\" = \"yes\"; then\n    whole_archive_flag_spec='`for conv in $convenience\\\"\\\"; do test  -n \\\"$conv\\\" && new_convenience=\\\"$new_convenience ${wl}-force_load,$conv\\\"; done; func_echo_all \\\"$new_convenience\\\"`'\n\n  else\n    whole_archive_flag_spec=''\n  fi\n  link_all_deplibs=yes\n  allow_undefined_flag=\"$_lt_dar_allow_undefined\"\n  case $cc_basename in\n     ifort*) _lt_dar_can_shared=yes ;;\n     *) _lt_dar_can_shared=$GCC ;;\n  esac\n  if test \"$_lt_dar_can_shared\" = \"yes\"; then\n    output_verbose_link_cmd=func_echo_all\n    archive_cmds=\"\\$CC -dynamiclib \\$allow_undefined_flag -o \\$lib \\$libobjs \\$deplibs \\$compiler_flags -install_name \\$rpath/\\$soname \\$verstring $_lt_dar_single_mod${_lt_dsymutil}\"\n    module_cmds=\"\\$CC \\$allow_undefined_flag -o \\$lib -bundle \\$libobjs \\$deplibs \\$compiler_flags${_lt_dsymutil}\"\n    archive_expsym_cmds=\"sed 's,^,_,' < \\$export_symbols > \\$output_objdir/\\${libname}-symbols.expsym~\\$CC -dynamiclib \\$allow_undefined_flag -o \\$lib \\$libobjs \\$deplibs \\$compiler_flags -install_name \\$rpath/\\$soname \\$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}\"\n    module_expsym_cmds=\"sed -e 's,^,_,' < \\$export_symbols > \\$output_objdir/\\${libname}-symbols.expsym~\\$CC \\$allow_undefined_flag -o \\$lib -bundle \\$libobjs \\$deplibs \\$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}\"\n\n  else\n  ld_shlibs=no\n  fi\n\n      ;;\n\n    dgux*)\n      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'\n      hardcode_libdir_flag_spec='-L$libdir'\n      hardcode_shlibpath_var=no\n      ;;\n\n    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor\n    # support.  Future versions do this automatically, but an explicit c++rt0.o\n    # does not break anything, and helps significantly (at the cost of a little\n    # extra space).\n    freebsd2.2*)\n      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'\n      hardcode_libdir_flag_spec='-R$libdir'\n      hardcode_direct=yes\n      hardcode_shlibpath_var=no\n      ;;\n\n    # Unfortunately, older versions of FreeBSD 2 do not have this feature.\n    freebsd2.*)\n      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'\n      hardcode_direct=yes\n      hardcode_minus_L=yes\n      hardcode_shlibpath_var=no\n      ;;\n\n    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.\n    freebsd* | dragonfly*)\n      archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'\n      hardcode_libdir_flag_spec='-R$libdir'\n      hardcode_direct=yes\n      hardcode_shlibpath_var=no\n      ;;\n\n    hpux9*)\n      if test \"$GCC\" = yes; then\n\tarchive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'\n      else\n\tarchive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'\n      fi\n      hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'\n      hardcode_libdir_separator=:\n      hardcode_direct=yes\n\n      # hardcode_minus_L: Not really in the search PATH,\n      # but as the default location of the library.\n      hardcode_minus_L=yes\n      export_dynamic_flag_spec='${wl}-E'\n      ;;\n\n    hpux10*)\n      if test \"$GCC\" = yes && test \"$with_gnu_ld\" = no; then\n\tarchive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'\n      else\n\tarchive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'\n      fi\n      if test \"$with_gnu_ld\" = no; then\n\thardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'\n\thardcode_libdir_separator=:\n\thardcode_direct=yes\n\thardcode_direct_absolute=yes\n\texport_dynamic_flag_spec='${wl}-E'\n\t# hardcode_minus_L: Not really in the search PATH,\n\t# but as the default location of the library.\n\thardcode_minus_L=yes\n      fi\n      ;;\n\n    hpux11*)\n      if test \"$GCC\" = yes && test \"$with_gnu_ld\" = no; then\n\tcase $host_cpu in\n\thppa*64*)\n\t  archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'\n\t  ;;\n\tia64*)\n\t  archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'\n\t  ;;\n\t*)\n\t  archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'\n\t  ;;\n\tesac\n      else\n\tcase $host_cpu in\n\thppa*64*)\n\t  archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'\n\t  ;;\n\tia64*)\n\t  archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'\n\t  ;;\n\t*)\n\n\t  # Older versions of the 11.00 compiler do not understand -b yet\n\t  # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)\n\t  { $as_echo \"$as_me:${as_lineno-$LINENO}: checking if $CC understands -b\" >&5\n$as_echo_n \"checking if $CC understands -b... \" >&6; }\nif ${lt_cv_prog_compiler__b+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  lt_cv_prog_compiler__b=no\n   save_LDFLAGS=\"$LDFLAGS\"\n   LDFLAGS=\"$LDFLAGS -b\"\n   echo \"$lt_simple_link_test_code\" > conftest.$ac_ext\n   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then\n     # The linker can only warn and ignore the option if not recognized\n     # So say no if there are warnings\n     if test -s conftest.err; then\n       # Append any errors to the config.log.\n       cat conftest.err 1>&5\n       $ECHO \"$_lt_linker_boilerplate\" | $SED '/^$/d' > conftest.exp\n       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2\n       if diff conftest.exp conftest.er2 >/dev/null; then\n         lt_cv_prog_compiler__b=yes\n       fi\n     else\n       lt_cv_prog_compiler__b=yes\n     fi\n   fi\n   $RM -r conftest*\n   LDFLAGS=\"$save_LDFLAGS\"\n\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b\" >&5\n$as_echo \"$lt_cv_prog_compiler__b\" >&6; }\n\nif test x\"$lt_cv_prog_compiler__b\" = xyes; then\n    archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'\nelse\n    archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'\nfi\n\n\t  ;;\n\tesac\n      fi\n      if test \"$with_gnu_ld\" = no; then\n\thardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'\n\thardcode_libdir_separator=:\n\n\tcase $host_cpu in\n\thppa*64*|ia64*)\n\t  hardcode_direct=no\n\t  hardcode_shlibpath_var=no\n\t  ;;\n\t*)\n\t  hardcode_direct=yes\n\t  hardcode_direct_absolute=yes\n\t  export_dynamic_flag_spec='${wl}-E'\n\n\t  # hardcode_minus_L: Not really in the search PATH,\n\t  # but as the default location of the library.\n\t  hardcode_minus_L=yes\n\t  ;;\n\tesac\n      fi\n      ;;\n\n    irix5* | irix6* | nonstopux*)\n      if test \"$GCC\" = yes; then\n\tarchive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n \"$verstring\" && func_echo_all \"${wl}-set_version ${wl}$verstring\"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'\n\t# Try to use the -exported_symbol ld option, if it does not\n\t# work, assume that -exports_file does not work either and\n\t# implicitly export all symbols.\n\t# This should be the same for all languages, so no per-tag cache variable.\n\t{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol\" >&5\n$as_echo_n \"checking whether the $host_os linker accepts -exported_symbol... \" >&6; }\nif ${lt_cv_irix_exported_symbol+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  save_LDFLAGS=\"$LDFLAGS\"\n\t   LDFLAGS=\"$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null\"\n\t   cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\nint foo (void) { return 0; }\n_ACEOF\nif ac_fn_c_try_link \"$LINENO\"; then :\n  lt_cv_irix_exported_symbol=yes\nelse\n  lt_cv_irix_exported_symbol=no\nfi\nrm -f core conftest.err conftest.$ac_objext \\\n    conftest$ac_exeext conftest.$ac_ext\n           LDFLAGS=\"$save_LDFLAGS\"\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol\" >&5\n$as_echo \"$lt_cv_irix_exported_symbol\" >&6; }\n\tif test \"$lt_cv_irix_exported_symbol\" = yes; then\n          archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n \"$verstring\" && func_echo_all \"${wl}-set_version ${wl}$verstring\"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'\n\tfi\n      else\n\tarchive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n \"$verstring\" && func_echo_all \"-set_version $verstring\"` -update_registry ${output_objdir}/so_locations -o $lib'\n\tarchive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n \"$verstring\" && func_echo_all \"-set_version $verstring\"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'\n      fi\n      archive_cmds_need_lc='no'\n      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'\n      hardcode_libdir_separator=:\n      inherit_rpath=yes\n      link_all_deplibs=yes\n      ;;\n\n    netbsd* | netbsdelf*-gnu)\n      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then\n\tarchive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out\n      else\n\tarchive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF\n      fi\n      hardcode_libdir_flag_spec='-R$libdir'\n      hardcode_direct=yes\n      hardcode_shlibpath_var=no\n      ;;\n\n    newsos6)\n      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'\n      hardcode_direct=yes\n      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'\n      hardcode_libdir_separator=:\n      hardcode_shlibpath_var=no\n      ;;\n\n    *nto* | *qnx*)\n      ;;\n\n    openbsd*)\n      if test -f /usr/libexec/ld.so; then\n\thardcode_direct=yes\n\thardcode_shlibpath_var=no\n\thardcode_direct_absolute=yes\n\tif test -z \"`echo __ELF__ | $CC -E - | $GREP __ELF__`\" || test \"$host_os-$host_cpu\" = \"openbsd2.8-powerpc\"; then\n\t  archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'\n\t  archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'\n\t  hardcode_libdir_flag_spec='${wl}-rpath,$libdir'\n\t  export_dynamic_flag_spec='${wl}-E'\n\telse\n\t  case $host_os in\n\t   openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)\n\t     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'\n\t     hardcode_libdir_flag_spec='-R$libdir'\n\t     ;;\n\t   *)\n\t     archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'\n\t     hardcode_libdir_flag_spec='${wl}-rpath,$libdir'\n\t     ;;\n\t  esac\n\tfi\n      else\n\tld_shlibs=no\n      fi\n      ;;\n\n    os2*)\n      hardcode_libdir_flag_spec='-L$libdir'\n      hardcode_minus_L=yes\n      allow_undefined_flag=unsupported\n      archive_cmds='$ECHO \"LIBRARY $libname INITINSTANCE\" > $output_objdir/$libname.def~$ECHO \"DESCRIPTION \\\"$libname\\\"\" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo \" SINGLE NONSHARED\" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'\n      old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'\n      ;;\n\n    osf3*)\n      if test \"$GCC\" = yes; then\n\tallow_undefined_flag=' ${wl}-expect_unresolved ${wl}\\*'\n\tarchive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n \"$verstring\" && func_echo_all \"${wl}-set_version ${wl}$verstring\"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'\n      else\n\tallow_undefined_flag=' -expect_unresolved \\*'\n\tarchive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n \"$verstring\" && func_echo_all \"-set_version $verstring\"` -update_registry ${output_objdir}/so_locations -o $lib'\n      fi\n      archive_cmds_need_lc='no'\n      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'\n      hardcode_libdir_separator=:\n      ;;\n\n    osf4* | osf5*)\t# as osf3* with the addition of -msym flag\n      if test \"$GCC\" = yes; then\n\tallow_undefined_flag=' ${wl}-expect_unresolved ${wl}\\*'\n\tarchive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n \"$verstring\" && func_echo_all \"${wl}-set_version ${wl}$verstring\"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'\n\thardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'\n      else\n\tallow_undefined_flag=' -expect_unresolved \\*'\n\tarchive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n \"$verstring\" && func_echo_all \"-set_version $verstring\"` -update_registry ${output_objdir}/so_locations -o $lib'\n\tarchive_expsym_cmds='for i in `cat $export_symbols`; do printf \"%s %s\\\\n\" -exported_symbol \"\\$i\" >> $lib.exp; done; printf \"%s\\\\n\" \"-hidden\">> $lib.exp~\n\t$CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n \"$verstring\" && $ECHO \"-set_version $verstring\"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'\n\n\t# Both c and cxx compiler support -rpath directly\n\thardcode_libdir_flag_spec='-rpath $libdir'\n      fi\n      archive_cmds_need_lc='no'\n      hardcode_libdir_separator=:\n      ;;\n\n    solaris*)\n      no_undefined_flag=' -z defs'\n      if test \"$GCC\" = yes; then\n\twlarc='${wl}'\n\tarchive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'\n\tarchive_expsym_cmds='echo \"{ global:\" > $lib.exp~cat $export_symbols | $SED -e \"s/\\(.*\\)/\\1;/\" >> $lib.exp~echo \"local: *; };\" >> $lib.exp~\n\t  $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'\n      else\n\tcase `$CC -V 2>&1` in\n\t*\"Compilers 5.0\"*)\n\t  wlarc=''\n\t  archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'\n\t  archive_expsym_cmds='echo \"{ global:\" > $lib.exp~cat $export_symbols | $SED -e \"s/\\(.*\\)/\\1;/\" >> $lib.exp~echo \"local: *; };\" >> $lib.exp~\n\t  $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'\n\t  ;;\n\t*)\n\t  wlarc='${wl}'\n\t  archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'\n\t  archive_expsym_cmds='echo \"{ global:\" > $lib.exp~cat $export_symbols | $SED -e \"s/\\(.*\\)/\\1;/\" >> $lib.exp~echo \"local: *; };\" >> $lib.exp~\n\t  $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'\n\t  ;;\n\tesac\n      fi\n      hardcode_libdir_flag_spec='-R$libdir'\n      hardcode_shlibpath_var=no\n      case $host_os in\n      solaris2.[0-5] | solaris2.[0-5].*) ;;\n      *)\n\t# The compiler driver will combine and reorder linker options,\n\t# but understands `-z linker_flag'.  GCC discards it without `$wl',\n\t# but is careful enough not to reorder.\n\t# Supported since Solaris 2.6 (maybe 2.5.1?)\n\tif test \"$GCC\" = yes; then\n\t  whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'\n\telse\n\t  whole_archive_flag_spec='-z allextract$convenience -z defaultextract'\n\tfi\n\t;;\n      esac\n      link_all_deplibs=yes\n      ;;\n\n    sunos4*)\n      if test \"x$host_vendor\" = xsequent; then\n\t# Use $CC to link under sequent, because it throws in some extra .o\n\t# files that make .init and .fini sections work.\n\tarchive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'\n      else\n\tarchive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'\n      fi\n      hardcode_libdir_flag_spec='-L$libdir'\n      hardcode_direct=yes\n      hardcode_minus_L=yes\n      hardcode_shlibpath_var=no\n      ;;\n\n    sysv4)\n      case $host_vendor in\n\tsni)\n\t  archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'\n\t  hardcode_direct=yes # is this really true???\n\t;;\n\tsiemens)\n\t  ## LD is ld it makes a PLAMLIB\n\t  ## CC just makes a GrossModule.\n\t  archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'\n\t  reload_cmds='$CC -r -o $output$reload_objs'\n\t  hardcode_direct=no\n        ;;\n\tmotorola)\n\t  archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'\n\t  hardcode_direct=no #Motorola manual says yes, but my tests say they lie\n\t;;\n      esac\n      runpath_var='LD_RUN_PATH'\n      hardcode_shlibpath_var=no\n      ;;\n\n    sysv4.3*)\n      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'\n      hardcode_shlibpath_var=no\n      export_dynamic_flag_spec='-Bexport'\n      ;;\n\n    sysv4*MP*)\n      if test -d /usr/nec; then\n\tarchive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'\n\thardcode_shlibpath_var=no\n\trunpath_var=LD_RUN_PATH\n\thardcode_runpath_var=yes\n\tld_shlibs=yes\n      fi\n      ;;\n\n    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)\n      no_undefined_flag='${wl}-z,text'\n      archive_cmds_need_lc=no\n      hardcode_shlibpath_var=no\n      runpath_var='LD_RUN_PATH'\n\n      if test \"$GCC\" = yes; then\n\tarchive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'\n\tarchive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'\n      else\n\tarchive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'\n\tarchive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'\n      fi\n      ;;\n\n    sysv5* | sco3.2v5* | sco5v6*)\n      # Note: We can NOT use -z defs as we might desire, because we do not\n      # link with -lc, and that would cause any symbols used from libc to\n      # always be unresolved, which means just about no library would\n      # ever link correctly.  If we're not using GNU ld we use -z text\n      # though, which does catch some bad symbols but isn't as heavy-handed\n      # as -z defs.\n      no_undefined_flag='${wl}-z,text'\n      allow_undefined_flag='${wl}-z,nodefs'\n      archive_cmds_need_lc=no\n      hardcode_shlibpath_var=no\n      hardcode_libdir_flag_spec='${wl}-R,$libdir'\n      hardcode_libdir_separator=':'\n      link_all_deplibs=yes\n      export_dynamic_flag_spec='${wl}-Bexport'\n      runpath_var='LD_RUN_PATH'\n\n      if test \"$GCC\" = yes; then\n\tarchive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'\n\tarchive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'\n      else\n\tarchive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'\n\tarchive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'\n      fi\n      ;;\n\n    uts4*)\n      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'\n      hardcode_libdir_flag_spec='-L$libdir'\n      hardcode_shlibpath_var=no\n      ;;\n\n    *)\n      ld_shlibs=no\n      ;;\n    esac\n\n    if test x$host_vendor = xsni; then\n      case $host in\n      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)\n\texport_dynamic_flag_spec='${wl}-Blargedynsym'\n\t;;\n      esac\n    fi\n  fi\n\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ld_shlibs\" >&5\n$as_echo \"$ld_shlibs\" >&6; }\ntest \"$ld_shlibs\" = no && can_build_shared=no\n\nwith_gnu_ld=$with_gnu_ld\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n#\n# Do we need to explicitly link libc?\n#\ncase \"x$archive_cmds_need_lc\" in\nx|xyes)\n  # Assume -lc should be added\n  archive_cmds_need_lc=yes\n\n  if test \"$enable_shared\" = yes && test \"$GCC\" = yes; then\n    case $archive_cmds in\n    *'~'*)\n      # FIXME: we may have to deal with multi-command sequences.\n      ;;\n    '$CC '*)\n      # Test whether the compiler implicitly links with -lc since on some\n      # systems, -lgcc has to come before -lc. If gcc already passes -lc\n      # to ld, don't add -lc before -lgcc.\n      { $as_echo \"$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in\" >&5\n$as_echo_n \"checking whether -lc should be explicitly linked in... \" >&6; }\nif ${lt_cv_archive_cmds_need_lc+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  $RM conftest*\n\techo \"$lt_simple_compile_test_code\" > conftest.$ac_ext\n\n\tif { { eval echo \"\\\"\\$as_me\\\":${as_lineno-$LINENO}: \\\"$ac_compile\\\"\"; } >&5\n  (eval $ac_compile) 2>&5\n  ac_status=$?\n  $as_echo \"$as_me:${as_lineno-$LINENO}: \\$? = $ac_status\" >&5\n  test $ac_status = 0; } 2>conftest.err; then\n\t  soname=conftest\n\t  lib=conftest\n\t  libobjs=conftest.$ac_objext\n\t  deplibs=\n\t  wl=$lt_prog_compiler_wl\n\t  pic_flag=$lt_prog_compiler_pic\n\t  compiler_flags=-v\n\t  linker_flags=-v\n\t  verstring=\n\t  output_objdir=.\n\t  libname=conftest\n\t  lt_save_allow_undefined_flag=$allow_undefined_flag\n\t  allow_undefined_flag=\n\t  if { { eval echo \"\\\"\\$as_me\\\":${as_lineno-$LINENO}: \\\"$archive_cmds 2\\>\\&1 \\| $GREP \\\" -lc \\\" \\>/dev/null 2\\>\\&1\\\"\"; } >&5\n  (eval $archive_cmds 2\\>\\&1 \\| $GREP \\\" -lc \\\" \\>/dev/null 2\\>\\&1) 2>&5\n  ac_status=$?\n  $as_echo \"$as_me:${as_lineno-$LINENO}: \\$? = $ac_status\" >&5\n  test $ac_status = 0; }\n\t  then\n\t    lt_cv_archive_cmds_need_lc=no\n\t  else\n\t    lt_cv_archive_cmds_need_lc=yes\n\t  fi\n\t  allow_undefined_flag=$lt_save_allow_undefined_flag\n\telse\n\t  cat conftest.err 1>&5\n\tfi\n\t$RM conftest*\n\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc\" >&5\n$as_echo \"$lt_cv_archive_cmds_need_lc\" >&6; }\n      archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc\n      ;;\n    esac\n  fi\n  ;;\nesac\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics\" >&5\n$as_echo_n \"checking dynamic linker characteristics... \" >&6; }\n\nif test \"$GCC\" = yes; then\n  case $host_os in\n    darwin*) lt_awk_arg=\"/^libraries:/,/LR/\" ;;\n    *) lt_awk_arg=\"/^libraries:/\" ;;\n  esac\n  case $host_os in\n    mingw* | cegcc*) lt_sed_strip_eq=\"s,=\\([A-Za-z]:\\),\\1,g\" ;;\n    *) lt_sed_strip_eq=\"s,=/,/,g\" ;;\n  esac\n  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e \"s/^libraries://\" -e $lt_sed_strip_eq`\n  case $lt_search_path_spec in\n  *\\;*)\n    # if the path contains \";\" then we assume it to be the separator\n    # otherwise default to the standard path separator (i.e. \":\") - it is\n    # assumed that no part of a normal pathname contains \";\" but that should\n    # okay in the real world where \";\" in dirpaths is itself problematic.\n    lt_search_path_spec=`$ECHO \"$lt_search_path_spec\" | $SED 's/;/ /g'`\n    ;;\n  *)\n    lt_search_path_spec=`$ECHO \"$lt_search_path_spec\" | $SED \"s/$PATH_SEPARATOR/ /g\"`\n    ;;\n  esac\n  # Ok, now we have the path, separated by spaces, we can step through it\n  # and add multilib dir if necessary.\n  lt_tmp_lt_search_path_spec=\n  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`\n  for lt_sys_path in $lt_search_path_spec; do\n    if test -d \"$lt_sys_path/$lt_multi_os_dir\"; then\n      lt_tmp_lt_search_path_spec=\"$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir\"\n    else\n      test -d \"$lt_sys_path\" && \\\n\tlt_tmp_lt_search_path_spec=\"$lt_tmp_lt_search_path_spec $lt_sys_path\"\n    fi\n  done\n  lt_search_path_spec=`$ECHO \"$lt_tmp_lt_search_path_spec\" | awk '\nBEGIN {RS=\" \"; FS=\"/|\\n\";} {\n  lt_foo=\"\";\n  lt_count=0;\n  for (lt_i = NF; lt_i > 0; lt_i--) {\n    if ($lt_i != \"\" && $lt_i != \".\") {\n      if ($lt_i == \"..\") {\n        lt_count++;\n      } else {\n        if (lt_count == 0) {\n          lt_foo=\"/\" $lt_i lt_foo;\n        } else {\n          lt_count--;\n        }\n      }\n    }\n  }\n  if (lt_foo != \"\") { lt_freq[lt_foo]++; }\n  if (lt_freq[lt_foo] == 1) { print lt_foo; }\n}'`\n  # AWK program above erroneously prepends '/' to C:/dos/paths\n  # for these hosts.\n  case $host_os in\n    mingw* | cegcc*) lt_search_path_spec=`$ECHO \"$lt_search_path_spec\" |\\\n      $SED 's,/\\([A-Za-z]:\\),\\1,g'` ;;\n  esac\n  sys_lib_search_path_spec=`$ECHO \"$lt_search_path_spec\" | $lt_NL2SP`\nelse\n  sys_lib_search_path_spec=\"/lib /usr/lib /usr/local/lib\"\nfi\nlibrary_names_spec=\nlibname_spec='lib$name'\nsoname_spec=\nshrext_cmds=\".so\"\npostinstall_cmds=\npostuninstall_cmds=\nfinish_cmds=\nfinish_eval=\nshlibpath_var=\nshlibpath_overrides_runpath=unknown\nversion_type=none\ndynamic_linker=\"$host_os ld.so\"\nsys_lib_dlsearch_path_spec=\"/lib /usr/lib\"\nneed_lib_prefix=unknown\nhardcode_into_libs=no\n\n# when you set need_version to no, make sure it does not cause -set_version\n# flags to be left without arguments\nneed_version=unknown\n\ncase $host_os in\naix3*)\n  version_type=linux # correct to gnu/linux during the next big refactor\n  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'\n  shlibpath_var=LIBPATH\n\n  # AIX 3 has no versioning support, so we append a major version to the name.\n  soname_spec='${libname}${release}${shared_ext}$major'\n  ;;\n\naix[4-9]*)\n  version_type=linux # correct to gnu/linux during the next big refactor\n  need_lib_prefix=no\n  need_version=no\n  hardcode_into_libs=yes\n  if test \"$host_cpu\" = ia64; then\n    # AIX 5 supports IA64\n    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'\n    shlibpath_var=LD_LIBRARY_PATH\n  else\n    # With GCC up to 2.95.x, collect2 would create an import file\n    # for dependence libraries.  The import file would start with\n    # the line `#! .'.  This would cause the generated library to\n    # depend on `.', always an invalid library.  This was fixed in\n    # development snapshots of GCC prior to 3.0.\n    case $host_os in\n      aix4 | aix4.[01] | aix4.[01].*)\n      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'\n\t   echo ' yes '\n\t   echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then\n\t:\n      else\n\tcan_build_shared=no\n      fi\n      ;;\n    esac\n    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct\n    # soname into executable. Probably we can add versioning support to\n    # collect2, so additional links can be useful in future.\n    if test \"$aix_use_runtimelinking\" = yes; then\n      # If using run time linking (on AIX 4.2 or later) use lib<name>.so\n      # instead of lib<name>.a to let people know that these are not\n      # typical AIX shared libraries.\n      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n    else\n      # We preserve .a as extension for shared libraries through AIX4.2\n      # and later when we are not doing run time linking.\n      library_names_spec='${libname}${release}.a $libname.a'\n      soname_spec='${libname}${release}${shared_ext}$major'\n    fi\n    shlibpath_var=LIBPATH\n  fi\n  ;;\n\namigaos*)\n  case $host_cpu in\n  powerpc)\n    # Since July 2007 AmigaOS4 officially supports .so libraries.\n    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.\n    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n    ;;\n  m68k)\n    library_names_spec='$libname.ixlibrary $libname.a'\n    # Create ${libname}_ixlibrary.a entries in /sys/libs.\n    finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all \"$lib\" | $SED '\\''s%^.*/\\([^/]*\\)\\.ixlibrary$%\\1%'\\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show \"cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a\"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'\n    ;;\n  esac\n  ;;\n\nbeos*)\n  library_names_spec='${libname}${shared_ext}'\n  dynamic_linker=\"$host_os ld.so\"\n  shlibpath_var=LIBRARY_PATH\n  ;;\n\nbsdi[45]*)\n  version_type=linux # correct to gnu/linux during the next big refactor\n  need_version=no\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  finish_cmds='PATH=\"\\$PATH:/sbin\" ldconfig $libdir'\n  shlibpath_var=LD_LIBRARY_PATH\n  sys_lib_search_path_spec=\"/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib\"\n  sys_lib_dlsearch_path_spec=\"/shlib /usr/lib /usr/local/lib\"\n  # the default ld.so.conf also contains /usr/contrib/lib and\n  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow\n  # libtool to hard-code these into programs\n  ;;\n\ncygwin* | mingw* | pw32* | cegcc*)\n  version_type=windows\n  shrext_cmds=\".dll\"\n  need_version=no\n  need_lib_prefix=no\n\n  case $GCC,$cc_basename in\n  yes,*)\n    # gcc\n    library_names_spec='$libname.dll.a'\n    # DLL is installed to $(libdir)/../bin by postinstall_cmds\n    postinstall_cmds='base_file=`basename \\${file}`~\n      dlpath=`$SHELL 2>&1 -c '\\''. $dir/'\\''\\${base_file}'\\''i; echo \\$dlname'\\''`~\n      dldir=$destdir/`dirname \\$dlpath`~\n      test -d \\$dldir || mkdir -p \\$dldir~\n      $install_prog $dir/$dlname \\$dldir/$dlname~\n      chmod a+x \\$dldir/$dlname~\n      if test -n '\\''$stripme'\\'' && test -n '\\''$striplib'\\''; then\n        eval '\\''$striplib \\$dldir/$dlname'\\'' || exit \\$?;\n      fi'\n    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\\''. $file; echo \\$dlname'\\''`~\n      dlpath=$dir/\\$dldll~\n       $RM \\$dlpath'\n    shlibpath_overrides_runpath=yes\n\n    case $host_os in\n    cygwin*)\n      # Cygwin DLLs use 'cyg' prefix rather than 'lib'\n      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'\n\n      sys_lib_search_path_spec=\"$sys_lib_search_path_spec /usr/lib/w32api\"\n      ;;\n    mingw* | cegcc*)\n      # MinGW DLLs use traditional 'lib' prefix\n      soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'\n      ;;\n    pw32*)\n      # pw32 DLLs use 'pw' prefix rather than 'lib'\n      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'\n      ;;\n    esac\n    dynamic_linker='Win32 ld.exe'\n    ;;\n\n  *,cl*)\n    # Native MSVC\n    libname_spec='$name'\n    soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'\n    library_names_spec='${libname}.dll.lib'\n\n    case $build_os in\n    mingw*)\n      sys_lib_search_path_spec=\n      lt_save_ifs=$IFS\n      IFS=';'\n      for lt_path in $LIB\n      do\n        IFS=$lt_save_ifs\n        # Let DOS variable expansion print the short 8.3 style file name.\n        lt_path=`cd \"$lt_path\" 2>/dev/null && cmd //C \"for %i in (\".\") do @echo %~si\"`\n        sys_lib_search_path_spec=\"$sys_lib_search_path_spec $lt_path\"\n      done\n      IFS=$lt_save_ifs\n      # Convert to MSYS style.\n      sys_lib_search_path_spec=`$ECHO \"$sys_lib_search_path_spec\" | sed -e 's|\\\\\\\\|/|g' -e 's| \\\\([a-zA-Z]\\\\):| /\\\\1|g' -e 's|^ ||'`\n      ;;\n    cygwin*)\n      # Convert to unix form, then to dos form, then back to unix form\n      # but this time dos style (no spaces!) so that the unix form looks\n      # like /cygdrive/c/PROGRA~1:/cygdr...\n      sys_lib_search_path_spec=`cygpath --path --unix \"$LIB\"`\n      sys_lib_search_path_spec=`cygpath --path --dos \"$sys_lib_search_path_spec\" 2>/dev/null`\n      sys_lib_search_path_spec=`cygpath --path --unix \"$sys_lib_search_path_spec\" | $SED -e \"s/$PATH_SEPARATOR/ /g\"`\n      ;;\n    *)\n      sys_lib_search_path_spec=\"$LIB\"\n      if $ECHO \"$sys_lib_search_path_spec\" | $GREP ';[c-zC-Z]:/' >/dev/null; then\n        # It is most probably a Windows format PATH.\n        sys_lib_search_path_spec=`$ECHO \"$sys_lib_search_path_spec\" | $SED -e 's/;/ /g'`\n      else\n        sys_lib_search_path_spec=`$ECHO \"$sys_lib_search_path_spec\" | $SED -e \"s/$PATH_SEPARATOR/ /g\"`\n      fi\n      # FIXME: find the short name or the path components, as spaces are\n      # common. (e.g. \"Program Files\" -> \"PROGRA~1\")\n      ;;\n    esac\n\n    # DLL is installed to $(libdir)/../bin by postinstall_cmds\n    postinstall_cmds='base_file=`basename \\${file}`~\n      dlpath=`$SHELL 2>&1 -c '\\''. $dir/'\\''\\${base_file}'\\''i; echo \\$dlname'\\''`~\n      dldir=$destdir/`dirname \\$dlpath`~\n      test -d \\$dldir || mkdir -p \\$dldir~\n      $install_prog $dir/$dlname \\$dldir/$dlname'\n    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\\''. $file; echo \\$dlname'\\''`~\n      dlpath=$dir/\\$dldll~\n       $RM \\$dlpath'\n    shlibpath_overrides_runpath=yes\n    dynamic_linker='Win32 link.exe'\n    ;;\n\n  *)\n    # Assume MSVC wrapper\n    library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'\n    dynamic_linker='Win32 ld.exe'\n    ;;\n  esac\n  # FIXME: first we should search . and the directory the executable is in\n  shlibpath_var=PATH\n  ;;\n\ndarwin* | rhapsody*)\n  dynamic_linker=\"$host_os dyld\"\n  version_type=darwin\n  need_lib_prefix=no\n  need_version=no\n  library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'\n  soname_spec='${libname}${release}${major}$shared_ext'\n  shlibpath_overrides_runpath=yes\n  shlibpath_var=DYLD_LIBRARY_PATH\n  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'\n\n  sys_lib_search_path_spec=\"$sys_lib_search_path_spec /usr/local/lib\"\n  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'\n  ;;\n\ndgux*)\n  version_type=linux # correct to gnu/linux during the next big refactor\n  need_lib_prefix=no\n  need_version=no\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  shlibpath_var=LD_LIBRARY_PATH\n  ;;\n\nfreebsd* | dragonfly*)\n  # DragonFly does not have aout.  When/if they implement a new\n  # versioning mechanism, adjust this.\n  if test -x /usr/bin/objformat; then\n    objformat=`/usr/bin/objformat`\n  else\n    case $host_os in\n    freebsd[23].*) objformat=aout ;;\n    *) objformat=elf ;;\n    esac\n  fi\n  version_type=freebsd-$objformat\n  case $version_type in\n    freebsd-elf*)\n      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'\n      need_version=no\n      need_lib_prefix=no\n      ;;\n    freebsd-*)\n      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'\n      need_version=yes\n      ;;\n  esac\n  shlibpath_var=LD_LIBRARY_PATH\n  case $host_os in\n  freebsd2.*)\n    shlibpath_overrides_runpath=yes\n    ;;\n  freebsd3.[01]* | freebsdelf3.[01]*)\n    shlibpath_overrides_runpath=yes\n    hardcode_into_libs=yes\n    ;;\n  freebsd3.[2-9]* | freebsdelf3.[2-9]* | \\\n  freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)\n    shlibpath_overrides_runpath=no\n    hardcode_into_libs=yes\n    ;;\n  *) # from 4.6 on, and DragonFly\n    shlibpath_overrides_runpath=yes\n    hardcode_into_libs=yes\n    ;;\n  esac\n  ;;\n\nhaiku*)\n  version_type=linux # correct to gnu/linux during the next big refactor\n  need_lib_prefix=no\n  need_version=no\n  dynamic_linker=\"$host_os runtime_loader\"\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  shlibpath_var=LIBRARY_PATH\n  shlibpath_overrides_runpath=yes\n  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'\n  hardcode_into_libs=yes\n  ;;\n\nhpux9* | hpux10* | hpux11*)\n  # Give a soname corresponding to the major version so that dld.sl refuses to\n  # link against other versions.\n  version_type=sunos\n  need_lib_prefix=no\n  need_version=no\n  case $host_cpu in\n  ia64*)\n    shrext_cmds='.so'\n    hardcode_into_libs=yes\n    dynamic_linker=\"$host_os dld.so\"\n    shlibpath_var=LD_LIBRARY_PATH\n    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.\n    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n    soname_spec='${libname}${release}${shared_ext}$major'\n    if test \"X$HPUX_IA64_MODE\" = X32; then\n      sys_lib_search_path_spec=\"/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib\"\n    else\n      sys_lib_search_path_spec=\"/usr/lib/hpux64 /usr/local/lib/hpux64\"\n    fi\n    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec\n    ;;\n  hppa*64*)\n    shrext_cmds='.sl'\n    hardcode_into_libs=yes\n    dynamic_linker=\"$host_os dld.sl\"\n    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH\n    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.\n    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n    soname_spec='${libname}${release}${shared_ext}$major'\n    sys_lib_search_path_spec=\"/usr/lib/pa20_64 /usr/ccs/lib/pa20_64\"\n    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec\n    ;;\n  *)\n    shrext_cmds='.sl'\n    dynamic_linker=\"$host_os dld.sl\"\n    shlibpath_var=SHLIB_PATH\n    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH\n    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n    soname_spec='${libname}${release}${shared_ext}$major'\n    ;;\n  esac\n  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...\n  postinstall_cmds='chmod 555 $lib'\n  # or fails outright, so override atomically:\n  install_override_mode=555\n  ;;\n\ninterix[3-9]*)\n  version_type=linux # correct to gnu/linux during the next big refactor\n  need_lib_prefix=no\n  need_version=no\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'\n  shlibpath_var=LD_LIBRARY_PATH\n  shlibpath_overrides_runpath=no\n  hardcode_into_libs=yes\n  ;;\n\nirix5* | irix6* | nonstopux*)\n  case $host_os in\n    nonstopux*) version_type=nonstopux ;;\n    *)\n\tif test \"$lt_cv_prog_gnu_ld\" = yes; then\n\t\tversion_type=linux # correct to gnu/linux during the next big refactor\n\telse\n\t\tversion_type=irix\n\tfi ;;\n  esac\n  need_lib_prefix=no\n  need_version=no\n  soname_spec='${libname}${release}${shared_ext}$major'\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'\n  case $host_os in\n  irix5* | nonstopux*)\n    libsuff= shlibsuff=\n    ;;\n  *)\n    case $LD in # libtool.m4 will add one of these switches to LD\n    *-32|*\"-32 \"|*-melf32bsmip|*\"-melf32bsmip \")\n      libsuff= shlibsuff= libmagic=32-bit;;\n    *-n32|*\"-n32 \"|*-melf32bmipn32|*\"-melf32bmipn32 \")\n      libsuff=32 shlibsuff=N32 libmagic=N32;;\n    *-64|*\"-64 \"|*-melf64bmip|*\"-melf64bmip \")\n      libsuff=64 shlibsuff=64 libmagic=64-bit;;\n    *) libsuff= shlibsuff= libmagic=never-match;;\n    esac\n    ;;\n  esac\n  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH\n  shlibpath_overrides_runpath=no\n  sys_lib_search_path_spec=\"/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}\"\n  sys_lib_dlsearch_path_spec=\"/usr/lib${libsuff} /lib${libsuff}\"\n  hardcode_into_libs=yes\n  ;;\n\n# No shared lib support for Linux oldld, aout, or coff.\nlinux*oldld* | linux*aout* | linux*coff*)\n  dynamic_linker=no\n  ;;\n\n# This must be glibc/ELF.\nlinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)\n  version_type=linux # correct to gnu/linux during the next big refactor\n  need_lib_prefix=no\n  need_version=no\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  finish_cmds='PATH=\"\\$PATH:/sbin\" ldconfig -n $libdir'\n  shlibpath_var=LD_LIBRARY_PATH\n  shlibpath_overrides_runpath=no\n\n  # Some binutils ld are patched to set DT_RUNPATH\n  if ${lt_cv_shlibpath_overrides_runpath+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  lt_cv_shlibpath_overrides_runpath=no\n    save_LDFLAGS=$LDFLAGS\n    save_libdir=$libdir\n    eval \"libdir=/foo; wl=\\\"$lt_prog_compiler_wl\\\"; \\\n\t LDFLAGS=\\\"\\$LDFLAGS $hardcode_libdir_flag_spec\\\"\"\n    cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n\nint\nmain ()\n{\n\n  ;\n  return 0;\n}\n_ACEOF\nif ac_fn_c_try_link \"$LINENO\"; then :\n  if  ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep \"RUNPATH.*$libdir\" >/dev/null; then :\n  lt_cv_shlibpath_overrides_runpath=yes\nfi\nfi\nrm -f core conftest.err conftest.$ac_objext \\\n    conftest$ac_exeext conftest.$ac_ext\n    LDFLAGS=$save_LDFLAGS\n    libdir=$save_libdir\n\nfi\n\n  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath\n\n  # This implies no fast_install, which is unacceptable.\n  # Some rework will be needed to allow for fast_install\n  # before this can be enabled.\n  hardcode_into_libs=yes\n\n  # Append ld.so.conf contents to the search path\n  if test -f /etc/ld.so.conf; then\n    lt_ld_extra=`awk '/^include / { system(sprintf(\"cd /etc; cat %s 2>/dev/null\", \\$2)); skip = 1; } { if (!skip) print \\$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[\t ]*hwcap[\t ]/d;s/[:,\t]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/\"//g;/^$/d' | tr '\\n' ' '`\n    sys_lib_dlsearch_path_spec=\"/lib /usr/lib $lt_ld_extra\"\n  fi\n\n  # We used to test for /lib/ld.so.1 and disable shared libraries on\n  # powerpc, because MkLinux only supported shared libraries with the\n  # GNU dynamic linker.  Since this was broken with cross compilers,\n  # most powerpc-linux boxes support dynamic linking these days and\n  # people can always --disable-shared, the test was removed, and we\n  # assume the GNU/Linux dynamic linker is in use.\n  dynamic_linker='GNU/Linux ld.so'\n  ;;\n\nnetbsdelf*-gnu)\n  version_type=linux\n  need_lib_prefix=no\n  need_version=no\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  shlibpath_var=LD_LIBRARY_PATH\n  shlibpath_overrides_runpath=no\n  hardcode_into_libs=yes\n  dynamic_linker='NetBSD ld.elf_so'\n  ;;\n\nnetbsd*)\n  version_type=sunos\n  need_lib_prefix=no\n  need_version=no\n  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then\n    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'\n    finish_cmds='PATH=\"\\$PATH:/sbin\" ldconfig -m $libdir'\n    dynamic_linker='NetBSD (a.out) ld.so'\n  else\n    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'\n    soname_spec='${libname}${release}${shared_ext}$major'\n    dynamic_linker='NetBSD ld.elf_so'\n  fi\n  shlibpath_var=LD_LIBRARY_PATH\n  shlibpath_overrides_runpath=yes\n  hardcode_into_libs=yes\n  ;;\n\nnewsos6)\n  version_type=linux # correct to gnu/linux during the next big refactor\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n  shlibpath_var=LD_LIBRARY_PATH\n  shlibpath_overrides_runpath=yes\n  ;;\n\n*nto* | *qnx*)\n  version_type=qnx\n  need_lib_prefix=no\n  need_version=no\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  shlibpath_var=LD_LIBRARY_PATH\n  shlibpath_overrides_runpath=no\n  hardcode_into_libs=yes\n  dynamic_linker='ldqnx.so'\n  ;;\n\nopenbsd*)\n  version_type=sunos\n  sys_lib_dlsearch_path_spec=\"/usr/lib\"\n  need_lib_prefix=no\n  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.\n  case $host_os in\n    openbsd3.3 | openbsd3.3.*)\tneed_version=yes ;;\n    *)\t\t\t\tneed_version=no  ;;\n  esac\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'\n  finish_cmds='PATH=\"\\$PATH:/sbin\" ldconfig -m $libdir'\n  shlibpath_var=LD_LIBRARY_PATH\n  if test -z \"`echo __ELF__ | $CC -E - | $GREP __ELF__`\" || test \"$host_os-$host_cpu\" = \"openbsd2.8-powerpc\"; then\n    case $host_os in\n      openbsd2.[89] | openbsd2.[89].*)\n\tshlibpath_overrides_runpath=no\n\t;;\n      *)\n\tshlibpath_overrides_runpath=yes\n\t;;\n      esac\n  else\n    shlibpath_overrides_runpath=yes\n  fi\n  ;;\n\nos2*)\n  libname_spec='$name'\n  shrext_cmds=\".dll\"\n  need_lib_prefix=no\n  library_names_spec='$libname${shared_ext} $libname.a'\n  dynamic_linker='OS/2 ld.exe'\n  shlibpath_var=LIBPATH\n  ;;\n\nosf3* | osf4* | osf5*)\n  version_type=osf\n  need_lib_prefix=no\n  need_version=no\n  soname_spec='${libname}${release}${shared_ext}$major'\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n  shlibpath_var=LD_LIBRARY_PATH\n  sys_lib_search_path_spec=\"/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib\"\n  sys_lib_dlsearch_path_spec=\"$sys_lib_search_path_spec\"\n  ;;\n\nrdos*)\n  dynamic_linker=no\n  ;;\n\nsolaris*)\n  version_type=linux # correct to gnu/linux during the next big refactor\n  need_lib_prefix=no\n  need_version=no\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  shlibpath_var=LD_LIBRARY_PATH\n  shlibpath_overrides_runpath=yes\n  hardcode_into_libs=yes\n  # ldd complains unless libraries are executable\n  postinstall_cmds='chmod +x $lib'\n  ;;\n\nsunos4*)\n  version_type=sunos\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'\n  finish_cmds='PATH=\"\\$PATH:/usr/etc\" ldconfig $libdir'\n  shlibpath_var=LD_LIBRARY_PATH\n  shlibpath_overrides_runpath=yes\n  if test \"$with_gnu_ld\" = yes; then\n    need_lib_prefix=no\n  fi\n  need_version=yes\n  ;;\n\nsysv4 | sysv4.3*)\n  version_type=linux # correct to gnu/linux during the next big refactor\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  shlibpath_var=LD_LIBRARY_PATH\n  case $host_vendor in\n    sni)\n      shlibpath_overrides_runpath=no\n      need_lib_prefix=no\n      runpath_var=LD_RUN_PATH\n      ;;\n    siemens)\n      need_lib_prefix=no\n      ;;\n    motorola)\n      need_lib_prefix=no\n      need_version=no\n      shlibpath_overrides_runpath=no\n      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'\n      ;;\n  esac\n  ;;\n\nsysv4*MP*)\n  if test -d /usr/nec ;then\n    version_type=linux # correct to gnu/linux during the next big refactor\n    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'\n    soname_spec='$libname${shared_ext}.$major'\n    shlibpath_var=LD_LIBRARY_PATH\n  fi\n  ;;\n\nsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)\n  version_type=freebsd-elf\n  need_lib_prefix=no\n  need_version=no\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  shlibpath_var=LD_LIBRARY_PATH\n  shlibpath_overrides_runpath=yes\n  hardcode_into_libs=yes\n  if test \"$with_gnu_ld\" = yes; then\n    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'\n  else\n    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'\n    case $host_os in\n      sco3.2v5*)\n        sys_lib_search_path_spec=\"$sys_lib_search_path_spec /lib\"\n\t;;\n    esac\n  fi\n  sys_lib_dlsearch_path_spec='/usr/lib'\n  ;;\n\ntpf*)\n  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.\n  version_type=linux # correct to gnu/linux during the next big refactor\n  need_lib_prefix=no\n  need_version=no\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n  shlibpath_var=LD_LIBRARY_PATH\n  shlibpath_overrides_runpath=no\n  hardcode_into_libs=yes\n  ;;\n\nuts4*)\n  version_type=linux # correct to gnu/linux during the next big refactor\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  shlibpath_var=LD_LIBRARY_PATH\n  ;;\n\n*)\n  dynamic_linker=no\n  ;;\nesac\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $dynamic_linker\" >&5\n$as_echo \"$dynamic_linker\" >&6; }\ntest \"$dynamic_linker\" = no && can_build_shared=no\n\nvariables_saved_for_relink=\"PATH $shlibpath_var $runpath_var\"\nif test \"$GCC\" = yes; then\n  variables_saved_for_relink=\"$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH\"\nfi\n\nif test \"${lt_cv_sys_lib_search_path_spec+set}\" = set; then\n  sys_lib_search_path_spec=\"$lt_cv_sys_lib_search_path_spec\"\nfi\nif test \"${lt_cv_sys_lib_dlsearch_path_spec+set}\" = set; then\n  sys_lib_dlsearch_path_spec=\"$lt_cv_sys_lib_dlsearch_path_spec\"\nfi\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs\" >&5\n$as_echo_n \"checking how to hardcode library paths into programs... \" >&6; }\nhardcode_action=\nif test -n \"$hardcode_libdir_flag_spec\" ||\n   test -n \"$runpath_var\" ||\n   test \"X$hardcode_automatic\" = \"Xyes\" ; then\n\n  # We can hardcode non-existent directories.\n  if test \"$hardcode_direct\" != no &&\n     # If the only mechanism to avoid hardcoding is shlibpath_var, we\n     # have to relink, otherwise we might link with an installed library\n     # when we should be linking with a yet-to-be-installed one\n     ## test \"$_LT_TAGVAR(hardcode_shlibpath_var, )\" != no &&\n     test \"$hardcode_minus_L\" != no; then\n    # Linking always hardcodes the temporary library directory.\n    hardcode_action=relink\n  else\n    # We can link without hardcoding, and we can hardcode nonexisting dirs.\n    hardcode_action=immediate\n  fi\nelse\n  # We cannot hardcode anything, or else we can only hardcode existing\n  # directories.\n  hardcode_action=unsupported\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $hardcode_action\" >&5\n$as_echo \"$hardcode_action\" >&6; }\n\nif test \"$hardcode_action\" = relink ||\n   test \"$inherit_rpath\" = yes; then\n  # Fast installation is not supported\n  enable_fast_install=no\nelif test \"$shlibpath_overrides_runpath\" = yes ||\n     test \"$enable_shared\" = no; then\n  # Fast installation is not necessary\n  enable_fast_install=needless\nfi\n\n\n\n\n\n\n  if test \"x$enable_dlopen\" != xyes; then\n  enable_dlopen=unknown\n  enable_dlopen_self=unknown\n  enable_dlopen_self_static=unknown\nelse\n  lt_cv_dlopen=no\n  lt_cv_dlopen_libs=\n\n  case $host_os in\n  beos*)\n    lt_cv_dlopen=\"load_add_on\"\n    lt_cv_dlopen_libs=\n    lt_cv_dlopen_self=yes\n    ;;\n\n  mingw* | pw32* | cegcc*)\n    lt_cv_dlopen=\"LoadLibrary\"\n    lt_cv_dlopen_libs=\n    ;;\n\n  cygwin*)\n    lt_cv_dlopen=\"dlopen\"\n    lt_cv_dlopen_libs=\n    ;;\n\n  darwin*)\n  # if libdl is installed we need to link against it\n    { $as_echo \"$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl\" >&5\n$as_echo_n \"checking for dlopen in -ldl... \" >&6; }\nif ${ac_cv_lib_dl_dlopen+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  ac_check_lib_save_LIBS=$LIBS\nLIBS=\"-ldl  $LIBS\"\ncat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n\n/* Override any GCC internal prototype to avoid an error.\n   Use char because int might match the return type of a GCC\n   builtin and then its argument prototype would still apply.  */\n#ifdef __cplusplus\nextern \"C\"\n#endif\nchar dlopen ();\nint\nmain ()\n{\nreturn dlopen ();\n  ;\n  return 0;\n}\n_ACEOF\nif ac_fn_c_try_link \"$LINENO\"; then :\n  ac_cv_lib_dl_dlopen=yes\nelse\n  ac_cv_lib_dl_dlopen=no\nfi\nrm -f core conftest.err conftest.$ac_objext \\\n    conftest$ac_exeext conftest.$ac_ext\nLIBS=$ac_check_lib_save_LIBS\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen\" >&5\n$as_echo \"$ac_cv_lib_dl_dlopen\" >&6; }\nif test \"x$ac_cv_lib_dl_dlopen\" = xyes; then :\n  lt_cv_dlopen=\"dlopen\" lt_cv_dlopen_libs=\"-ldl\"\nelse\n\n    lt_cv_dlopen=\"dyld\"\n    lt_cv_dlopen_libs=\n    lt_cv_dlopen_self=yes\n\nfi\n\n    ;;\n\n  *)\n    ac_fn_c_check_func \"$LINENO\" \"shl_load\" \"ac_cv_func_shl_load\"\nif test \"x$ac_cv_func_shl_load\" = xyes; then :\n  lt_cv_dlopen=\"shl_load\"\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld\" >&5\n$as_echo_n \"checking for shl_load in -ldld... \" >&6; }\nif ${ac_cv_lib_dld_shl_load+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  ac_check_lib_save_LIBS=$LIBS\nLIBS=\"-ldld  $LIBS\"\ncat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n\n/* Override any GCC internal prototype to avoid an error.\n   Use char because int might match the return type of a GCC\n   builtin and then its argument prototype would still apply.  */\n#ifdef __cplusplus\nextern \"C\"\n#endif\nchar shl_load ();\nint\nmain ()\n{\nreturn shl_load ();\n  ;\n  return 0;\n}\n_ACEOF\nif ac_fn_c_try_link \"$LINENO\"; then :\n  ac_cv_lib_dld_shl_load=yes\nelse\n  ac_cv_lib_dld_shl_load=no\nfi\nrm -f core conftest.err conftest.$ac_objext \\\n    conftest$ac_exeext conftest.$ac_ext\nLIBS=$ac_check_lib_save_LIBS\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load\" >&5\n$as_echo \"$ac_cv_lib_dld_shl_load\" >&6; }\nif test \"x$ac_cv_lib_dld_shl_load\" = xyes; then :\n  lt_cv_dlopen=\"shl_load\" lt_cv_dlopen_libs=\"-ldld\"\nelse\n  ac_fn_c_check_func \"$LINENO\" \"dlopen\" \"ac_cv_func_dlopen\"\nif test \"x$ac_cv_func_dlopen\" = xyes; then :\n  lt_cv_dlopen=\"dlopen\"\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl\" >&5\n$as_echo_n \"checking for dlopen in -ldl... \" >&6; }\nif ${ac_cv_lib_dl_dlopen+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  ac_check_lib_save_LIBS=$LIBS\nLIBS=\"-ldl  $LIBS\"\ncat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n\n/* Override any GCC internal prototype to avoid an error.\n   Use char because int might match the return type of a GCC\n   builtin and then its argument prototype would still apply.  */\n#ifdef __cplusplus\nextern \"C\"\n#endif\nchar dlopen ();\nint\nmain ()\n{\nreturn dlopen ();\n  ;\n  return 0;\n}\n_ACEOF\nif ac_fn_c_try_link \"$LINENO\"; then :\n  ac_cv_lib_dl_dlopen=yes\nelse\n  ac_cv_lib_dl_dlopen=no\nfi\nrm -f core conftest.err conftest.$ac_objext \\\n    conftest$ac_exeext conftest.$ac_ext\nLIBS=$ac_check_lib_save_LIBS\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen\" >&5\n$as_echo \"$ac_cv_lib_dl_dlopen\" >&6; }\nif test \"x$ac_cv_lib_dl_dlopen\" = xyes; then :\n  lt_cv_dlopen=\"dlopen\" lt_cv_dlopen_libs=\"-ldl\"\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld\" >&5\n$as_echo_n \"checking for dlopen in -lsvld... \" >&6; }\nif ${ac_cv_lib_svld_dlopen+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  ac_check_lib_save_LIBS=$LIBS\nLIBS=\"-lsvld  $LIBS\"\ncat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n\n/* Override any GCC internal prototype to avoid an error.\n   Use char because int might match the return type of a GCC\n   builtin and then its argument prototype would still apply.  */\n#ifdef __cplusplus\nextern \"C\"\n#endif\nchar dlopen ();\nint\nmain ()\n{\nreturn dlopen ();\n  ;\n  return 0;\n}\n_ACEOF\nif ac_fn_c_try_link \"$LINENO\"; then :\n  ac_cv_lib_svld_dlopen=yes\nelse\n  ac_cv_lib_svld_dlopen=no\nfi\nrm -f core conftest.err conftest.$ac_objext \\\n    conftest$ac_exeext conftest.$ac_ext\nLIBS=$ac_check_lib_save_LIBS\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen\" >&5\n$as_echo \"$ac_cv_lib_svld_dlopen\" >&6; }\nif test \"x$ac_cv_lib_svld_dlopen\" = xyes; then :\n  lt_cv_dlopen=\"dlopen\" lt_cv_dlopen_libs=\"-lsvld\"\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld\" >&5\n$as_echo_n \"checking for dld_link in -ldld... \" >&6; }\nif ${ac_cv_lib_dld_dld_link+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  ac_check_lib_save_LIBS=$LIBS\nLIBS=\"-ldld  $LIBS\"\ncat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n\n/* Override any GCC internal prototype to avoid an error.\n   Use char because int might match the return type of a GCC\n   builtin and then its argument prototype would still apply.  */\n#ifdef __cplusplus\nextern \"C\"\n#endif\nchar dld_link ();\nint\nmain ()\n{\nreturn dld_link ();\n  ;\n  return 0;\n}\n_ACEOF\nif ac_fn_c_try_link \"$LINENO\"; then :\n  ac_cv_lib_dld_dld_link=yes\nelse\n  ac_cv_lib_dld_dld_link=no\nfi\nrm -f core conftest.err conftest.$ac_objext \\\n    conftest$ac_exeext conftest.$ac_ext\nLIBS=$ac_check_lib_save_LIBS\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link\" >&5\n$as_echo \"$ac_cv_lib_dld_dld_link\" >&6; }\nif test \"x$ac_cv_lib_dld_dld_link\" = xyes; then :\n  lt_cv_dlopen=\"dld_link\" lt_cv_dlopen_libs=\"-ldld\"\nfi\n\n\nfi\n\n\nfi\n\n\nfi\n\n\nfi\n\n\nfi\n\n    ;;\n  esac\n\n  if test \"x$lt_cv_dlopen\" != xno; then\n    enable_dlopen=yes\n  else\n    enable_dlopen=no\n  fi\n\n  case $lt_cv_dlopen in\n  dlopen)\n    save_CPPFLAGS=\"$CPPFLAGS\"\n    test \"x$ac_cv_header_dlfcn_h\" = xyes && CPPFLAGS=\"$CPPFLAGS -DHAVE_DLFCN_H\"\n\n    save_LDFLAGS=\"$LDFLAGS\"\n    wl=$lt_prog_compiler_wl eval LDFLAGS=\\\"\\$LDFLAGS $export_dynamic_flag_spec\\\"\n\n    save_LIBS=\"$LIBS\"\n    LIBS=\"$lt_cv_dlopen_libs $LIBS\"\n\n    { $as_echo \"$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself\" >&5\n$as_echo_n \"checking whether a program can dlopen itself... \" >&6; }\nif ${lt_cv_dlopen_self+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  \t  if test \"$cross_compiling\" = yes; then :\n  lt_cv_dlopen_self=cross\nelse\n  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2\n  lt_status=$lt_dlunknown\n  cat > conftest.$ac_ext <<_LT_EOF\n#line $LINENO \"configure\"\n#include \"confdefs.h\"\n\n#if HAVE_DLFCN_H\n#include <dlfcn.h>\n#endif\n\n#include <stdio.h>\n\n#ifdef RTLD_GLOBAL\n#  define LT_DLGLOBAL\t\tRTLD_GLOBAL\n#else\n#  ifdef DL_GLOBAL\n#    define LT_DLGLOBAL\t\tDL_GLOBAL\n#  else\n#    define LT_DLGLOBAL\t\t0\n#  endif\n#endif\n\n/* We may have to define LT_DLLAZY_OR_NOW in the command line if we\n   find out it does not work in some platform. */\n#ifndef LT_DLLAZY_OR_NOW\n#  ifdef RTLD_LAZY\n#    define LT_DLLAZY_OR_NOW\t\tRTLD_LAZY\n#  else\n#    ifdef DL_LAZY\n#      define LT_DLLAZY_OR_NOW\t\tDL_LAZY\n#    else\n#      ifdef RTLD_NOW\n#        define LT_DLLAZY_OR_NOW\tRTLD_NOW\n#      else\n#        ifdef DL_NOW\n#          define LT_DLLAZY_OR_NOW\tDL_NOW\n#        else\n#          define LT_DLLAZY_OR_NOW\t0\n#        endif\n#      endif\n#    endif\n#  endif\n#endif\n\n/* When -fvisbility=hidden is used, assume the code has been annotated\n   correspondingly for the symbols needed.  */\n#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))\nint fnord () __attribute__((visibility(\"default\")));\n#endif\n\nint fnord () { return 42; }\nint main ()\n{\n  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);\n  int status = $lt_dlunknown;\n\n  if (self)\n    {\n      if (dlsym (self,\"fnord\"))       status = $lt_dlno_uscore;\n      else\n        {\n\t  if (dlsym( self,\"_fnord\"))  status = $lt_dlneed_uscore;\n          else puts (dlerror ());\n\t}\n      /* dlclose (self); */\n    }\n  else\n    puts (dlerror ());\n\n  return status;\n}\n_LT_EOF\n  if { { eval echo \"\\\"\\$as_me\\\":${as_lineno-$LINENO}: \\\"$ac_link\\\"\"; } >&5\n  (eval $ac_link) 2>&5\n  ac_status=$?\n  $as_echo \"$as_me:${as_lineno-$LINENO}: \\$? = $ac_status\" >&5\n  test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then\n    (./conftest; exit; ) >&5 2>/dev/null\n    lt_status=$?\n    case x$lt_status in\n      x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;\n      x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;\n      x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;\n    esac\n  else :\n    # compilation failed\n    lt_cv_dlopen_self=no\n  fi\nfi\nrm -fr conftest*\n\n\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self\" >&5\n$as_echo \"$lt_cv_dlopen_self\" >&6; }\n\n    if test \"x$lt_cv_dlopen_self\" = xyes; then\n      wl=$lt_prog_compiler_wl eval LDFLAGS=\\\"\\$LDFLAGS $lt_prog_compiler_static\\\"\n      { $as_echo \"$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself\" >&5\n$as_echo_n \"checking whether a statically linked program can dlopen itself... \" >&6; }\nif ${lt_cv_dlopen_self_static+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  \t  if test \"$cross_compiling\" = yes; then :\n  lt_cv_dlopen_self_static=cross\nelse\n  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2\n  lt_status=$lt_dlunknown\n  cat > conftest.$ac_ext <<_LT_EOF\n#line $LINENO \"configure\"\n#include \"confdefs.h\"\n\n#if HAVE_DLFCN_H\n#include <dlfcn.h>\n#endif\n\n#include <stdio.h>\n\n#ifdef RTLD_GLOBAL\n#  define LT_DLGLOBAL\t\tRTLD_GLOBAL\n#else\n#  ifdef DL_GLOBAL\n#    define LT_DLGLOBAL\t\tDL_GLOBAL\n#  else\n#    define LT_DLGLOBAL\t\t0\n#  endif\n#endif\n\n/* We may have to define LT_DLLAZY_OR_NOW in the command line if we\n   find out it does not work in some platform. */\n#ifndef LT_DLLAZY_OR_NOW\n#  ifdef RTLD_LAZY\n#    define LT_DLLAZY_OR_NOW\t\tRTLD_LAZY\n#  else\n#    ifdef DL_LAZY\n#      define LT_DLLAZY_OR_NOW\t\tDL_LAZY\n#    else\n#      ifdef RTLD_NOW\n#        define LT_DLLAZY_OR_NOW\tRTLD_NOW\n#      else\n#        ifdef DL_NOW\n#          define LT_DLLAZY_OR_NOW\tDL_NOW\n#        else\n#          define LT_DLLAZY_OR_NOW\t0\n#        endif\n#      endif\n#    endif\n#  endif\n#endif\n\n/* When -fvisbility=hidden is used, assume the code has been annotated\n   correspondingly for the symbols needed.  */\n#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))\nint fnord () __attribute__((visibility(\"default\")));\n#endif\n\nint fnord () { return 42; }\nint main ()\n{\n  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);\n  int status = $lt_dlunknown;\n\n  if (self)\n    {\n      if (dlsym (self,\"fnord\"))       status = $lt_dlno_uscore;\n      else\n        {\n\t  if (dlsym( self,\"_fnord\"))  status = $lt_dlneed_uscore;\n          else puts (dlerror ());\n\t}\n      /* dlclose (self); */\n    }\n  else\n    puts (dlerror ());\n\n  return status;\n}\n_LT_EOF\n  if { { eval echo \"\\\"\\$as_me\\\":${as_lineno-$LINENO}: \\\"$ac_link\\\"\"; } >&5\n  (eval $ac_link) 2>&5\n  ac_status=$?\n  $as_echo \"$as_me:${as_lineno-$LINENO}: \\$? = $ac_status\" >&5\n  test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then\n    (./conftest; exit; ) >&5 2>/dev/null\n    lt_status=$?\n    case x$lt_status in\n      x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;\n      x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;\n      x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;\n    esac\n  else :\n    # compilation failed\n    lt_cv_dlopen_self_static=no\n  fi\nfi\nrm -fr conftest*\n\n\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static\" >&5\n$as_echo \"$lt_cv_dlopen_self_static\" >&6; }\n    fi\n\n    CPPFLAGS=\"$save_CPPFLAGS\"\n    LDFLAGS=\"$save_LDFLAGS\"\n    LIBS=\"$save_LIBS\"\n    ;;\n  esac\n\n  case $lt_cv_dlopen_self in\n  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;\n  *) enable_dlopen_self=unknown ;;\n  esac\n\n  case $lt_cv_dlopen_self_static in\n  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;\n  *) enable_dlopen_self_static=unknown ;;\n  esac\nfi\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nstriplib=\nold_striplib=\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible\" >&5\n$as_echo_n \"checking whether stripping libraries is possible... \" >&6; }\nif test -n \"$STRIP\" && $STRIP -V 2>&1 | $GREP \"GNU strip\" >/dev/null; then\n  test -z \"$old_striplib\" && old_striplib=\"$STRIP --strip-debug\"\n  test -z \"$striplib\" && striplib=\"$STRIP --strip-unneeded\"\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: yes\" >&5\n$as_echo \"yes\" >&6; }\nelse\n# FIXME - insert some real tests, host_os isn't really good enough\n  case $host_os in\n  darwin*)\n    if test -n \"$STRIP\" ; then\n      striplib=\"$STRIP -x\"\n      old_striplib=\"$STRIP -S\"\n      { $as_echo \"$as_me:${as_lineno-$LINENO}: result: yes\" >&5\n$as_echo \"yes\" >&6; }\n    else\n      { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\n    fi\n    ;;\n  *)\n    { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\n    ;;\n  esac\nfi\n\n\n\n\n\n\n\n\n\n\n\n\n  # Report which library types will actually be built\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries\" >&5\n$as_echo_n \"checking if libtool supports shared libraries... \" >&6; }\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $can_build_shared\" >&5\n$as_echo \"$can_build_shared\" >&6; }\n\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries\" >&5\n$as_echo_n \"checking whether to build shared libraries... \" >&6; }\n  test \"$can_build_shared\" = \"no\" && enable_shared=no\n\n  # On AIX, shared libraries and static libraries use the same namespace, and\n  # are all built from PIC.\n  case $host_os in\n  aix3*)\n    test \"$enable_shared\" = yes && enable_static=no\n    if test -n \"$RANLIB\"; then\n      archive_cmds=\"$archive_cmds~\\$RANLIB \\$lib\"\n      postinstall_cmds='$RANLIB $lib'\n    fi\n    ;;\n\n  aix[4-9]*)\n    if test \"$host_cpu\" != ia64 && test \"$aix_use_runtimelinking\" = no ; then\n      test \"$enable_shared\" = yes && enable_static=no\n    fi\n    ;;\n  esac\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $enable_shared\" >&5\n$as_echo \"$enable_shared\" >&6; }\n\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: checking whether to build static libraries\" >&5\n$as_echo_n \"checking whether to build static libraries... \" >&6; }\n  # Make sure either enable_shared or enable_static is yes.\n  test \"$enable_shared\" = yes || enable_static=yes\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $enable_static\" >&5\n$as_echo \"$enable_static\" >&6; }\n\n\n\n\nfi\nac_ext=c\nac_cpp='$CPP $CPPFLAGS'\nac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'\nac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'\nac_compiler_gnu=$ac_cv_c_compiler_gnu\n\nCC=\"$lt_save_CC\"\n\n      if test -n \"$CXX\" && ( test \"X$CXX\" != \"Xno\" &&\n    ( (test \"X$CXX\" = \"Xg++\" && `g++ -v >/dev/null 2>&1` ) ||\n    (test \"X$CXX\" != \"Xg++\"))) ; then\n  ac_ext=cpp\nac_cpp='$CXXCPP $CPPFLAGS'\nac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'\nac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'\nac_compiler_gnu=$ac_cv_cxx_compiler_gnu\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor\" >&5\n$as_echo_n \"checking how to run the C++ preprocessor... \" >&6; }\nif test -z \"$CXXCPP\"; then\n  if ${ac_cv_prog_CXXCPP+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n      # Double quotes because CXXCPP needs to be expanded\n    for CXXCPP in \"$CXX -E\" \"/lib/cpp\"\n    do\n      ac_preproc_ok=false\nfor ac_cxx_preproc_warn_flag in '' yes\ndo\n  # Use a header file that comes with gcc, so configuring glibc\n  # with a fresh cross-compiler works.\n  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since\n  # <limits.h> exists even on freestanding compilers.\n  # On the NeXT, cc -E runs the code through the compiler's parser,\n  # not just through cpp. \"Syntax error\" is here to catch this case.\n  cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n#ifdef __STDC__\n# include <limits.h>\n#else\n# include <assert.h>\n#endif\n\t\t     Syntax error\n_ACEOF\nif ac_fn_cxx_try_cpp \"$LINENO\"; then :\n\nelse\n  # Broken: fails on valid input.\ncontinue\nfi\nrm -f conftest.err conftest.i conftest.$ac_ext\n\n  # OK, works on sane cases.  Now check whether nonexistent headers\n  # can be detected and how.\n  cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n#include <ac_nonexistent.h>\n_ACEOF\nif ac_fn_cxx_try_cpp \"$LINENO\"; then :\n  # Broken: success on invalid input.\ncontinue\nelse\n  # Passes both tests.\nac_preproc_ok=:\nbreak\nfi\nrm -f conftest.err conftest.i conftest.$ac_ext\n\ndone\n# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.\nrm -f conftest.i conftest.err conftest.$ac_ext\nif $ac_preproc_ok; then :\n  break\nfi\n\n    done\n    ac_cv_prog_CXXCPP=$CXXCPP\n\nfi\n  CXXCPP=$ac_cv_prog_CXXCPP\nelse\n  ac_cv_prog_CXXCPP=$CXXCPP\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $CXXCPP\" >&5\n$as_echo \"$CXXCPP\" >&6; }\nac_preproc_ok=false\nfor ac_cxx_preproc_warn_flag in '' yes\ndo\n  # Use a header file that comes with gcc, so configuring glibc\n  # with a fresh cross-compiler works.\n  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since\n  # <limits.h> exists even on freestanding compilers.\n  # On the NeXT, cc -E runs the code through the compiler's parser,\n  # not just through cpp. \"Syntax error\" is here to catch this case.\n  cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n#ifdef __STDC__\n# include <limits.h>\n#else\n# include <assert.h>\n#endif\n\t\t     Syntax error\n_ACEOF\nif ac_fn_cxx_try_cpp \"$LINENO\"; then :\n\nelse\n  # Broken: fails on valid input.\ncontinue\nfi\nrm -f conftest.err conftest.i conftest.$ac_ext\n\n  # OK, works on sane cases.  Now check whether nonexistent headers\n  # can be detected and how.\n  cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n#include <ac_nonexistent.h>\n_ACEOF\nif ac_fn_cxx_try_cpp \"$LINENO\"; then :\n  # Broken: success on invalid input.\ncontinue\nelse\n  # Passes both tests.\nac_preproc_ok=:\nbreak\nfi\nrm -f conftest.err conftest.i conftest.$ac_ext\n\ndone\n# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.\nrm -f conftest.i conftest.err conftest.$ac_ext\nif $ac_preproc_ok; then :\n\nelse\n  { { $as_echo \"$as_me:${as_lineno-$LINENO}: error: in \\`$ac_pwd':\" >&5\n$as_echo \"$as_me: error: in \\`$ac_pwd':\" >&2;}\nas_fn_error $? \"C++ preprocessor \\\"$CXXCPP\\\" fails sanity check\nSee \\`config.log' for more details\" \"$LINENO\" 5; }\nfi\n\nac_ext=c\nac_cpp='$CPP $CPPFLAGS'\nac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'\nac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'\nac_compiler_gnu=$ac_cv_c_compiler_gnu\n\nelse\n  _lt_caught_CXX_error=yes\nfi\n\nac_ext=cpp\nac_cpp='$CXXCPP $CPPFLAGS'\nac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'\nac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'\nac_compiler_gnu=$ac_cv_cxx_compiler_gnu\n\narchive_cmds_need_lc_CXX=no\nallow_undefined_flag_CXX=\nalways_export_symbols_CXX=no\narchive_expsym_cmds_CXX=\ncompiler_needs_object_CXX=no\nexport_dynamic_flag_spec_CXX=\nhardcode_direct_CXX=no\nhardcode_direct_absolute_CXX=no\nhardcode_libdir_flag_spec_CXX=\nhardcode_libdir_separator_CXX=\nhardcode_minus_L_CXX=no\nhardcode_shlibpath_var_CXX=unsupported\nhardcode_automatic_CXX=no\ninherit_rpath_CXX=no\nmodule_cmds_CXX=\nmodule_expsym_cmds_CXX=\nlink_all_deplibs_CXX=unknown\nold_archive_cmds_CXX=$old_archive_cmds\nreload_flag_CXX=$reload_flag\nreload_cmds_CXX=$reload_cmds\nno_undefined_flag_CXX=\nwhole_archive_flag_spec_CXX=\nenable_shared_with_static_runtimes_CXX=no\n\n# Source file extension for C++ test sources.\nac_ext=cpp\n\n# Object file extension for compiled C++ test sources.\nobjext=o\nobjext_CXX=$objext\n\n# No sense in running all these tests if we already determined that\n# the CXX compiler isn't working.  Some variables (like enable_shared)\n# are currently assumed to apply to all compilers on this platform,\n# and will be corrupted by setting them based on a non-working compiler.\nif test \"$_lt_caught_CXX_error\" != yes; then\n  # Code to be used in simple compile tests\n  lt_simple_compile_test_code=\"int some_variable = 0;\"\n\n  # Code to be used in simple link tests\n  lt_simple_link_test_code='int main(int, char *[]) { return(0); }'\n\n  # ltmain only uses $CC for tagged configurations so make sure $CC is set.\n\n\n\n\n\n\n# If no C compiler was specified, use CC.\nLTCC=${LTCC-\"$CC\"}\n\n# If no C compiler flags were specified, use CFLAGS.\nLTCFLAGS=${LTCFLAGS-\"$CFLAGS\"}\n\n# Allow CC to be a program name with arguments.\ncompiler=$CC\n\n\n  # save warnings/boilerplate of simple test code\n  ac_outfile=conftest.$ac_objext\necho \"$lt_simple_compile_test_code\" >conftest.$ac_ext\neval \"$ac_compile\" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err\n_lt_compiler_boilerplate=`cat conftest.err`\n$RM conftest*\n\n  ac_outfile=conftest.$ac_objext\necho \"$lt_simple_link_test_code\" >conftest.$ac_ext\neval \"$ac_link\" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err\n_lt_linker_boilerplate=`cat conftest.err`\n$RM -r conftest*\n\n\n  # Allow CC to be a program name with arguments.\n  lt_save_CC=$CC\n  lt_save_CFLAGS=$CFLAGS\n  lt_save_LD=$LD\n  lt_save_GCC=$GCC\n  GCC=$GXX\n  lt_save_with_gnu_ld=$with_gnu_ld\n  lt_save_path_LD=$lt_cv_path_LD\n  if test -n \"${lt_cv_prog_gnu_ldcxx+set}\"; then\n    lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx\n  else\n    $as_unset lt_cv_prog_gnu_ld\n  fi\n  if test -n \"${lt_cv_path_LDCXX+set}\"; then\n    lt_cv_path_LD=$lt_cv_path_LDCXX\n  else\n    $as_unset lt_cv_path_LD\n  fi\n  test -z \"${LDCXX+set}\" || LD=$LDCXX\n  CC=${CXX-\"c++\"}\n  CFLAGS=$CXXFLAGS\n  compiler=$CC\n  compiler_CXX=$CC\n  for cc_temp in $compiler\"\"; do\n  case $cc_temp in\n    compile | *[\\\\/]compile | ccache | *[\\\\/]ccache ) ;;\n    distcc | *[\\\\/]distcc | purify | *[\\\\/]purify ) ;;\n    \\-*) ;;\n    *) break;;\n  esac\ndone\ncc_basename=`$ECHO \"$cc_temp\" | $SED \"s%.*/%%; s%^$host_alias-%%\"`\n\n\n  if test -n \"$compiler\"; then\n    # We don't want -fno-exception when compiling C++ code, so set the\n    # no_builtin_flag separately\n    if test \"$GXX\" = yes; then\n      lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin'\n    else\n      lt_prog_compiler_no_builtin_flag_CXX=\n    fi\n\n    if test \"$GXX\" = yes; then\n      # Set up default GNU C++ configuration\n\n\n\n# Check whether --with-gnu-ld was given.\nif test \"${with_gnu_ld+set}\" = set; then :\n  withval=$with_gnu_ld; test \"$withval\" = no || with_gnu_ld=yes\nelse\n  with_gnu_ld=no\nfi\n\nac_prog=ld\nif test \"$GCC\" = yes; then\n  # Check if gcc -print-prog-name=ld gives a path.\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: checking for ld used by $CC\" >&5\n$as_echo_n \"checking for ld used by $CC... \" >&6; }\n  case $host in\n  *-*-mingw*)\n    # gcc leaves a trailing carriage return which upsets mingw\n    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\\015'` ;;\n  *)\n    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;\n  esac\n  case $ac_prog in\n    # Accept absolute paths.\n    [\\\\/]* | ?:[\\\\/]*)\n      re_direlt='/[^/][^/]*/\\.\\./'\n      # Canonicalize the pathname of ld\n      ac_prog=`$ECHO \"$ac_prog\"| $SED 's%\\\\\\\\%/%g'`\n      while $ECHO \"$ac_prog\" | $GREP \"$re_direlt\" > /dev/null 2>&1; do\n\tac_prog=`$ECHO $ac_prog| $SED \"s%$re_direlt%/%\"`\n      done\n      test -z \"$LD\" && LD=\"$ac_prog\"\n      ;;\n  \"\")\n    # If it fails, then pretend we aren't using GCC.\n    ac_prog=ld\n    ;;\n  *)\n    # If it is relative, then search for the first ld in PATH.\n    with_gnu_ld=unknown\n    ;;\n  esac\nelif test \"$with_gnu_ld\" = yes; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: checking for GNU ld\" >&5\n$as_echo_n \"checking for GNU ld... \" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: checking for non-GNU ld\" >&5\n$as_echo_n \"checking for non-GNU ld... \" >&6; }\nfi\nif ${lt_cv_path_LD+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if test -z \"$LD\"; then\n  lt_save_ifs=\"$IFS\"; IFS=$PATH_SEPARATOR\n  for ac_dir in $PATH; do\n    IFS=\"$lt_save_ifs\"\n    test -z \"$ac_dir\" && ac_dir=.\n    if test -f \"$ac_dir/$ac_prog\" || test -f \"$ac_dir/$ac_prog$ac_exeext\"; then\n      lt_cv_path_LD=\"$ac_dir/$ac_prog\"\n      # Check to see if the program is GNU ld.  I'd rather use --version,\n      # but apparently some variants of GNU ld only accept -v.\n      # Break only if it was the GNU/non-GNU ld that we prefer.\n      case `\"$lt_cv_path_LD\" -v 2>&1 </dev/null` in\n      *GNU* | *'with BFD'*)\n\ttest \"$with_gnu_ld\" != no && break\n\t;;\n      *)\n\ttest \"$with_gnu_ld\" != yes && break\n\t;;\n      esac\n    fi\n  done\n  IFS=\"$lt_save_ifs\"\nelse\n  lt_cv_path_LD=\"$LD\" # Let the user override the test with a path.\nfi\nfi\n\nLD=\"$lt_cv_path_LD\"\nif test -n \"$LD\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $LD\" >&5\n$as_echo \"$LD\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\nfi\ntest -z \"$LD\" && as_fn_error $? \"no acceptable ld found in \\$PATH\" \"$LINENO\" 5\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld\" >&5\n$as_echo_n \"checking if the linker ($LD) is GNU ld... \" >&6; }\nif ${lt_cv_prog_gnu_ld+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  # I'd rather use --version here, but apparently some GNU lds only accept -v.\ncase `$LD -v 2>&1 </dev/null` in\n*GNU* | *'with BFD'*)\n  lt_cv_prog_gnu_ld=yes\n  ;;\n*)\n  lt_cv_prog_gnu_ld=no\n  ;;\nesac\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld\" >&5\n$as_echo \"$lt_cv_prog_gnu_ld\" >&6; }\nwith_gnu_ld=$lt_cv_prog_gnu_ld\n\n\n\n\n\n\n\n      # Check if GNU C++ uses GNU ld as the underlying linker, since the\n      # archiving commands below assume that GNU ld is being used.\n      if test \"$with_gnu_ld\" = yes; then\n        archive_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'\n        archive_expsym_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'\n\n        hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'\n        export_dynamic_flag_spec_CXX='${wl}--export-dynamic'\n\n        # If archive_cmds runs LD, not CC, wlarc should be empty\n        # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to\n        #     investigate it a little bit more. (MM)\n        wlarc='${wl}'\n\n        # ancient GNU ld didn't support --whole-archive et. al.\n        if eval \"`$CC -print-prog-name=ld` --help 2>&1\" |\n\t  $GREP 'no-whole-archive' > /dev/null; then\n          whole_archive_flag_spec_CXX=\"$wlarc\"'--whole-archive$convenience '\"$wlarc\"'--no-whole-archive'\n        else\n          whole_archive_flag_spec_CXX=\n        fi\n      else\n        with_gnu_ld=no\n        wlarc=\n\n        # A generic and very simple default shared library creation\n        # command for GNU C++ for the case where it uses the native\n        # linker, instead of GNU ld.  If possible, this setting should\n        # overridden to take advantage of the native linker features on\n        # the platform it is being used on.\n        archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'\n      fi\n\n      # Commands to make compiler produce verbose output that lists\n      # what \"hidden\" libraries, object files and flags are used when\n      # linking a shared library.\n      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v \"^Configured with:\" | $GREP \"\\-L\"'\n\n    else\n      GXX=no\n      with_gnu_ld=no\n      wlarc=\n    fi\n\n    # PORTME: fill in a description of your system's C++ link characteristics\n    { $as_echo \"$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries\" >&5\n$as_echo_n \"checking whether the $compiler linker ($LD) supports shared libraries... \" >&6; }\n    ld_shlibs_CXX=yes\n    case $host_os in\n      aix3*)\n        # FIXME: insert proper C++ library support\n        ld_shlibs_CXX=no\n        ;;\n      aix[4-9]*)\n        if test \"$host_cpu\" = ia64; then\n          # On IA64, the linker does run time linking by default, so we don't\n          # have to do anything special.\n          aix_use_runtimelinking=no\n          exp_sym_flag='-Bexport'\n          no_entry_flag=\"\"\n        else\n          aix_use_runtimelinking=no\n\n          # Test if we are trying to use run time linking or normal\n          # AIX style linking. If -brtl is somewhere in LDFLAGS, we\n          # need to do runtime linking.\n          case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)\n\t    for ld_flag in $LDFLAGS; do\n\t      case $ld_flag in\n\t      *-brtl*)\n\t        aix_use_runtimelinking=yes\n\t        break\n\t        ;;\n\t      esac\n\t    done\n\t    ;;\n          esac\n\n          exp_sym_flag='-bexport'\n          no_entry_flag='-bnoentry'\n        fi\n\n        # When large executables or shared objects are built, AIX ld can\n        # have problems creating the table of contents.  If linking a library\n        # or program results in \"error TOC overflow\" add -mminimal-toc to\n        # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not\n        # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.\n\n        archive_cmds_CXX=''\n        hardcode_direct_CXX=yes\n        hardcode_direct_absolute_CXX=yes\n        hardcode_libdir_separator_CXX=':'\n        link_all_deplibs_CXX=yes\n        file_list_spec_CXX='${wl}-f,'\n\n        if test \"$GXX\" = yes; then\n          case $host_os in aix4.[012]|aix4.[012].*)\n          # We only want to do this on AIX 4.2 and lower, the check\n          # below for broken collect2 doesn't work under 4.3+\n\t  collect2name=`${CC} -print-prog-name=collect2`\n\t  if test -f \"$collect2name\" &&\n\t     strings \"$collect2name\" | $GREP resolve_lib_name >/dev/null\n\t  then\n\t    # We have reworked collect2\n\t    :\n\t  else\n\t    # We have old collect2\n\t    hardcode_direct_CXX=unsupported\n\t    # It fails to find uninstalled libraries when the uninstalled\n\t    # path is not listed in the libpath.  Setting hardcode_minus_L\n\t    # to unsupported forces relinking\n\t    hardcode_minus_L_CXX=yes\n\t    hardcode_libdir_flag_spec_CXX='-L$libdir'\n\t    hardcode_libdir_separator_CXX=\n\t  fi\n          esac\n          shared_flag='-shared'\n\t  if test \"$aix_use_runtimelinking\" = yes; then\n\t    shared_flag=\"$shared_flag \"'${wl}-G'\n\t  fi\n        else\n          # not using gcc\n          if test \"$host_cpu\" = ia64; then\n\t  # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release\n\t  # chokes on -Wl,-G. The following line is correct:\n\t  shared_flag='-G'\n          else\n\t    if test \"$aix_use_runtimelinking\" = yes; then\n\t      shared_flag='${wl}-G'\n\t    else\n\t      shared_flag='${wl}-bM:SRE'\n\t    fi\n          fi\n        fi\n\n        export_dynamic_flag_spec_CXX='${wl}-bexpall'\n        # It seems that -bexpall does not export symbols beginning with\n        # underscore (_), so it is better to generate a list of symbols to\n\t# export.\n        always_export_symbols_CXX=yes\n        if test \"$aix_use_runtimelinking\" = yes; then\n          # Warning - without using the other runtime loading flags (-brtl),\n          # -berok will link without error, but may produce a broken library.\n          allow_undefined_flag_CXX='-berok'\n          # Determine the default libpath from the value encoded in an empty\n          # executable.\n          if test \"${lt_cv_aix_libpath+set}\" = set; then\n  aix_libpath=$lt_cv_aix_libpath\nelse\n  if ${lt_cv_aix_libpath__CXX+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n\nint\nmain ()\n{\n\n  ;\n  return 0;\n}\n_ACEOF\nif ac_fn_cxx_try_link \"$LINENO\"; then :\n\n  lt_aix_libpath_sed='\n      /Import File Strings/,/^$/ {\n\t  /^0/ {\n\t      s/^0  *\\([^ ]*\\) *$/\\1/\n\t      p\n\t  }\n      }'\n  lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e \"$lt_aix_libpath_sed\"`\n  # Check for a 64-bit object if we didn't find anything.\n  if test -z \"$lt_cv_aix_libpath__CXX\"; then\n    lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e \"$lt_aix_libpath_sed\"`\n  fi\nfi\nrm -f core conftest.err conftest.$ac_objext \\\n    conftest$ac_exeext conftest.$ac_ext\n  if test -z \"$lt_cv_aix_libpath__CXX\"; then\n    lt_cv_aix_libpath__CXX=\"/usr/lib:/lib\"\n  fi\n\nfi\n\n  aix_libpath=$lt_cv_aix_libpath__CXX\nfi\n\n          hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'\"$aix_libpath\"\n\n          archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs '\"\\${wl}$no_entry_flag\"' $compiler_flags `if test \"x${allow_undefined_flag}\" != \"x\"; then func_echo_all \"${wl}${allow_undefined_flag}\"; else :; fi` '\"\\${wl}$exp_sym_flag:\\$export_symbols $shared_flag\"\n        else\n          if test \"$host_cpu\" = ia64; then\n\t    hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib'\n\t    allow_undefined_flag_CXX=\"-z nodefs\"\n\t    archive_expsym_cmds_CXX=\"\\$CC $shared_flag\"' -o $output_objdir/$soname $libobjs $deplibs '\"\\${wl}$no_entry_flag\"' $compiler_flags ${wl}${allow_undefined_flag} '\"\\${wl}$exp_sym_flag:\\$export_symbols\"\n          else\n\t    # Determine the default libpath from the value encoded in an\n\t    # empty executable.\n\t    if test \"${lt_cv_aix_libpath+set}\" = set; then\n  aix_libpath=$lt_cv_aix_libpath\nelse\n  if ${lt_cv_aix_libpath__CXX+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n\nint\nmain ()\n{\n\n  ;\n  return 0;\n}\n_ACEOF\nif ac_fn_cxx_try_link \"$LINENO\"; then :\n\n  lt_aix_libpath_sed='\n      /Import File Strings/,/^$/ {\n\t  /^0/ {\n\t      s/^0  *\\([^ ]*\\) *$/\\1/\n\t      p\n\t  }\n      }'\n  lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e \"$lt_aix_libpath_sed\"`\n  # Check for a 64-bit object if we didn't find anything.\n  if test -z \"$lt_cv_aix_libpath__CXX\"; then\n    lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e \"$lt_aix_libpath_sed\"`\n  fi\nfi\nrm -f core conftest.err conftest.$ac_objext \\\n    conftest$ac_exeext conftest.$ac_ext\n  if test -z \"$lt_cv_aix_libpath__CXX\"; then\n    lt_cv_aix_libpath__CXX=\"/usr/lib:/lib\"\n  fi\n\nfi\n\n  aix_libpath=$lt_cv_aix_libpath__CXX\nfi\n\n\t    hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'\"$aix_libpath\"\n\t    # Warning - without using the other run time loading flags,\n\t    # -berok will link without error, but may produce a broken library.\n\t    no_undefined_flag_CXX=' ${wl}-bernotok'\n\t    allow_undefined_flag_CXX=' ${wl}-berok'\n\t    if test \"$with_gnu_ld\" = yes; then\n\t      # We only use this code for GNU lds that support --whole-archive.\n\t      whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive'\n\t    else\n\t      # Exported symbols can be pulled into shared objects from archives\n\t      whole_archive_flag_spec_CXX='$convenience'\n\t    fi\n\t    archive_cmds_need_lc_CXX=yes\n\t    # This is similar to how AIX traditionally builds its shared\n\t    # libraries.\n\t    archive_expsym_cmds_CXX=\"\\$CC $shared_flag\"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'\n          fi\n        fi\n        ;;\n\n      beos*)\n\tif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then\n\t  allow_undefined_flag_CXX=unsupported\n\t  # Joseph Beckenbach <jrb3@best.com> says some releases of gcc\n\t  # support --undefined.  This deserves some investigation.  FIXME\n\t  archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'\n\telse\n\t  ld_shlibs_CXX=no\n\tfi\n\t;;\n\n      chorus*)\n        case $cc_basename in\n          *)\n\t  # FIXME: insert proper C++ library support\n\t  ld_shlibs_CXX=no\n\t  ;;\n        esac\n        ;;\n\n      cygwin* | mingw* | pw32* | cegcc*)\n\tcase $GXX,$cc_basename in\n\t,cl* | no,cl*)\n\t  # Native MSVC\n\t  # hardcode_libdir_flag_spec is actually meaningless, as there is\n\t  # no search path for DLLs.\n\t  hardcode_libdir_flag_spec_CXX=' '\n\t  allow_undefined_flag_CXX=unsupported\n\t  always_export_symbols_CXX=yes\n\t  file_list_spec_CXX='@'\n\t  # Tell ltmain to make .lib files, not .a files.\n\t  libext=lib\n\t  # Tell ltmain to make .dll files, not .so files.\n\t  shrext_cmds=\".dll\"\n\t  # FIXME: Setting linknames here is a bad hack.\n\t  archive_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='\n\t  archive_expsym_cmds_CXX='if test \"x`$SED 1q $export_symbols`\" = xEXPORTS; then\n\t      $SED -n -e 's/\\\\\\\\\\\\\\(.*\\\\\\\\\\\\\\)/-link\\\\\\ -EXPORT:\\\\\\\\\\\\\\1/' -e '1\\\\\\!p' < $export_symbols > $output_objdir/$soname.exp;\n\t    else\n\t      $SED -e 's/\\\\\\\\\\\\\\(.*\\\\\\\\\\\\\\)/-link\\\\\\ -EXPORT:\\\\\\\\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;\n\t    fi~\n\t    $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs \"@$tool_output_objdir$soname.exp\" -Wl,-DLL,-IMPLIB:\"$tool_output_objdir$libname.dll.lib\"~\n\t    linknames='\n\t  # The linker will not automatically build a static lib if we build a DLL.\n\t  # _LT_TAGVAR(old_archive_from_new_cmds, CXX)='true'\n\t  enable_shared_with_static_runtimes_CXX=yes\n\t  # Don't use ranlib\n\t  old_postinstall_cmds_CXX='chmod 644 $oldlib'\n\t  postlink_cmds_CXX='lt_outputfile=\"@OUTPUT@\"~\n\t    lt_tool_outputfile=\"@TOOL_OUTPUT@\"~\n\t    case $lt_outputfile in\n\t      *.exe|*.EXE) ;;\n\t      *)\n\t\tlt_outputfile=\"$lt_outputfile.exe\"\n\t\tlt_tool_outputfile=\"$lt_tool_outputfile.exe\"\n\t\t;;\n\t    esac~\n\t    func_to_tool_file \"$lt_outputfile\"~\n\t    if test \"$MANIFEST_TOOL\" != \":\" && test -f \"$lt_outputfile.manifest\"; then\n\t      $MANIFEST_TOOL -manifest \"$lt_tool_outputfile.manifest\" -outputresource:\"$lt_tool_outputfile\" || exit 1;\n\t      $RM \"$lt_outputfile.manifest\";\n\t    fi'\n\t  ;;\n\t*)\n\t  # g++\n\t  # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless,\n\t  # as there is no search path for DLLs.\n\t  hardcode_libdir_flag_spec_CXX='-L$libdir'\n\t  export_dynamic_flag_spec_CXX='${wl}--export-all-symbols'\n\t  allow_undefined_flag_CXX=unsupported\n\t  always_export_symbols_CXX=no\n\t  enable_shared_with_static_runtimes_CXX=yes\n\n\t  if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then\n\t    archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'\n\t    # If the export-symbols file already is a .def file (1st line\n\t    # is EXPORTS), use it as is; otherwise, prepend...\n\t    archive_expsym_cmds_CXX='if test \"x`$SED 1q $export_symbols`\" = xEXPORTS; then\n\t      cp $export_symbols $output_objdir/$soname.def;\n\t    else\n\t      echo EXPORTS > $output_objdir/$soname.def;\n\t      cat $export_symbols >> $output_objdir/$soname.def;\n\t    fi~\n\t    $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'\n\t  else\n\t    ld_shlibs_CXX=no\n\t  fi\n\t  ;;\n\tesac\n\t;;\n      darwin* | rhapsody*)\n\n\n  archive_cmds_need_lc_CXX=no\n  hardcode_direct_CXX=no\n  hardcode_automatic_CXX=yes\n  hardcode_shlibpath_var_CXX=unsupported\n  if test \"$lt_cv_ld_force_load\" = \"yes\"; then\n    whole_archive_flag_spec_CXX='`for conv in $convenience\\\"\\\"; do test  -n \\\"$conv\\\" && new_convenience=\\\"$new_convenience ${wl}-force_load,$conv\\\"; done; func_echo_all \\\"$new_convenience\\\"`'\n\n  else\n    whole_archive_flag_spec_CXX=''\n  fi\n  link_all_deplibs_CXX=yes\n  allow_undefined_flag_CXX=\"$_lt_dar_allow_undefined\"\n  case $cc_basename in\n     ifort*) _lt_dar_can_shared=yes ;;\n     *) _lt_dar_can_shared=$GCC ;;\n  esac\n  if test \"$_lt_dar_can_shared\" = \"yes\"; then\n    output_verbose_link_cmd=func_echo_all\n    archive_cmds_CXX=\"\\$CC -dynamiclib \\$allow_undefined_flag -o \\$lib \\$libobjs \\$deplibs \\$compiler_flags -install_name \\$rpath/\\$soname \\$verstring $_lt_dar_single_mod${_lt_dsymutil}\"\n    module_cmds_CXX=\"\\$CC \\$allow_undefined_flag -o \\$lib -bundle \\$libobjs \\$deplibs \\$compiler_flags${_lt_dsymutil}\"\n    archive_expsym_cmds_CXX=\"sed 's,^,_,' < \\$export_symbols > \\$output_objdir/\\${libname}-symbols.expsym~\\$CC -dynamiclib \\$allow_undefined_flag -o \\$lib \\$libobjs \\$deplibs \\$compiler_flags -install_name \\$rpath/\\$soname \\$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}\"\n    module_expsym_cmds_CXX=\"sed -e 's,^,_,' < \\$export_symbols > \\$output_objdir/\\${libname}-symbols.expsym~\\$CC \\$allow_undefined_flag -o \\$lib -bundle \\$libobjs \\$deplibs \\$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}\"\n       if test \"$lt_cv_apple_cc_single_mod\" != \"yes\"; then\n      archive_cmds_CXX=\"\\$CC -r -keep_private_externs -nostdlib -o \\${lib}-master.o \\$libobjs~\\$CC -dynamiclib \\$allow_undefined_flag -o \\$lib \\${lib}-master.o \\$deplibs \\$compiler_flags -install_name \\$rpath/\\$soname \\$verstring${_lt_dsymutil}\"\n      archive_expsym_cmds_CXX=\"sed 's,^,_,' < \\$export_symbols > \\$output_objdir/\\${libname}-symbols.expsym~\\$CC -r -keep_private_externs -nostdlib -o \\${lib}-master.o \\$libobjs~\\$CC -dynamiclib \\$allow_undefined_flag -o \\$lib \\${lib}-master.o \\$deplibs \\$compiler_flags -install_name \\$rpath/\\$soname \\$verstring${_lt_dar_export_syms}${_lt_dsymutil}\"\n    fi\n\n  else\n  ld_shlibs_CXX=no\n  fi\n\n\t;;\n\n      dgux*)\n        case $cc_basename in\n          ec++*)\n\t    # FIXME: insert proper C++ library support\n\t    ld_shlibs_CXX=no\n\t    ;;\n          ghcx*)\n\t    # Green Hills C++ Compiler\n\t    # FIXME: insert proper C++ library support\n\t    ld_shlibs_CXX=no\n\t    ;;\n          *)\n\t    # FIXME: insert proper C++ library support\n\t    ld_shlibs_CXX=no\n\t    ;;\n        esac\n        ;;\n\n      freebsd2.*)\n        # C++ shared libraries reported to be fairly broken before\n\t# switch to ELF\n        ld_shlibs_CXX=no\n        ;;\n\n      freebsd-elf*)\n        archive_cmds_need_lc_CXX=no\n        ;;\n\n      freebsd* | dragonfly*)\n        # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF\n        # conventions\n        ld_shlibs_CXX=yes\n        ;;\n\n      haiku*)\n        archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'\n        link_all_deplibs_CXX=yes\n        ;;\n\n      hpux9*)\n        hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'\n        hardcode_libdir_separator_CXX=:\n        export_dynamic_flag_spec_CXX='${wl}-E'\n        hardcode_direct_CXX=yes\n        hardcode_minus_L_CXX=yes # Not in the search PATH,\n\t\t\t\t             # but as the default\n\t\t\t\t             # location of the library.\n\n        case $cc_basename in\n          CC*)\n            # FIXME: insert proper C++ library support\n            ld_shlibs_CXX=no\n            ;;\n          aCC*)\n            archive_cmds_CXX='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'\n            # Commands to make compiler produce verbose output that lists\n            # what \"hidden\" libraries, object files and flags are used when\n            # linking a shared library.\n            #\n            # There doesn't appear to be a way to prevent this compiler from\n            # explicitly linking system object files so we need to strip them\n            # from the output so that they don't get included in the library\n            # dependencies.\n            output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP \"\\-L\"`; list=\"\"; for z in $templist; do case $z in conftest.$objext) list=\"$list $z\";; *.$objext);; *) list=\"$list $z\";;esac; done; func_echo_all \"$list\"'\n            ;;\n          *)\n            if test \"$GXX\" = yes; then\n              archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'\n            else\n              # FIXME: insert proper C++ library support\n              ld_shlibs_CXX=no\n            fi\n            ;;\n        esac\n        ;;\n\n      hpux10*|hpux11*)\n        if test $with_gnu_ld = no; then\n\t  hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'\n\t  hardcode_libdir_separator_CXX=:\n\n          case $host_cpu in\n            hppa*64*|ia64*)\n              ;;\n            *)\n\t      export_dynamic_flag_spec_CXX='${wl}-E'\n              ;;\n          esac\n        fi\n        case $host_cpu in\n          hppa*64*|ia64*)\n            hardcode_direct_CXX=no\n            hardcode_shlibpath_var_CXX=no\n            ;;\n          *)\n            hardcode_direct_CXX=yes\n            hardcode_direct_absolute_CXX=yes\n            hardcode_minus_L_CXX=yes # Not in the search PATH,\n\t\t\t\t\t         # but as the default\n\t\t\t\t\t         # location of the library.\n            ;;\n        esac\n\n        case $cc_basename in\n          CC*)\n\t    # FIXME: insert proper C++ library support\n\t    ld_shlibs_CXX=no\n\t    ;;\n          aCC*)\n\t    case $host_cpu in\n\t      hppa*64*)\n\t        archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'\n\t        ;;\n\t      ia64*)\n\t        archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'\n\t        ;;\n\t      *)\n\t        archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'\n\t        ;;\n\t    esac\n\t    # Commands to make compiler produce verbose output that lists\n\t    # what \"hidden\" libraries, object files and flags are used when\n\t    # linking a shared library.\n\t    #\n\t    # There doesn't appear to be a way to prevent this compiler from\n\t    # explicitly linking system object files so we need to strip them\n\t    # from the output so that they don't get included in the library\n\t    # dependencies.\n\t    output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP \"\\-L\"`; list=\"\"; for z in $templist; do case $z in conftest.$objext) list=\"$list $z\";; *.$objext);; *) list=\"$list $z\";;esac; done; func_echo_all \"$list\"'\n\t    ;;\n          *)\n\t    if test \"$GXX\" = yes; then\n\t      if test $with_gnu_ld = no; then\n\t        case $host_cpu in\n\t          hppa*64*)\n\t            archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'\n\t            ;;\n\t          ia64*)\n\t            archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'\n\t            ;;\n\t          *)\n\t            archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'\n\t            ;;\n\t        esac\n\t      fi\n\t    else\n\t      # FIXME: insert proper C++ library support\n\t      ld_shlibs_CXX=no\n\t    fi\n\t    ;;\n        esac\n        ;;\n\n      interix[3-9]*)\n\thardcode_direct_CXX=no\n\thardcode_shlibpath_var_CXX=no\n\thardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'\n\texport_dynamic_flag_spec_CXX='${wl}-E'\n\t# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.\n\t# Instead, shared libraries are loaded at an image base (0x10000000 by\n\t# default) and relocated if they conflict, which is a slow very memory\n\t# consuming and fragmenting process.  To avoid this, we pick a random,\n\t# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link\n\t# time.  Moving up from 0x10000000 also allows more sbrk(2) space.\n\tarchive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \\* 262144 + 1342177280` -o $lib'\n\tarchive_expsym_cmds_CXX='sed \"s,^,_,\" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \\* 262144 + 1342177280` -o $lib'\n\t;;\n      irix5* | irix6*)\n        case $cc_basename in\n          CC*)\n\t    # SGI C++\n\t    archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n \"$verstring\" && func_echo_all \"-set_version $verstring\"` -update_registry ${output_objdir}/so_locations -o $lib'\n\n\t    # Archives containing C++ object files must be created using\n\t    # \"CC -ar\", where \"CC\" is the IRIX C++ compiler.  This is\n\t    # necessary to make sure instantiated templates are included\n\t    # in the archive.\n\t    old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs'\n\t    ;;\n          *)\n\t    if test \"$GXX\" = yes; then\n\t      if test \"$with_gnu_ld\" = no; then\n\t        archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n \"$verstring\" && func_echo_all \"${wl}-set_version ${wl}$verstring\"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'\n\t      else\n\t        archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n \"$verstring\" && func_echo_all \"${wl}-set_version ${wl}$verstring\"` -o $lib'\n\t      fi\n\t    fi\n\t    link_all_deplibs_CXX=yes\n\t    ;;\n        esac\n        hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'\n        hardcode_libdir_separator_CXX=:\n        inherit_rpath_CXX=yes\n        ;;\n\n      linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)\n        case $cc_basename in\n          KCC*)\n\t    # Kuck and Associates, Inc. (KAI) C++ Compiler\n\n\t    # KCC will only create a shared library if the output file\n\t    # ends with \".so\" (or \".sl\" for HP-UX), so rename the library\n\t    # to its proper name (with version) after linking.\n\t    archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\\''s/\\([^()0-9A-Za-z{}]\\)/\\\\\\\\\\1/g'\\''`; templib=`echo $lib | $SED -e \"s/\\${tempext}\\..*/.so/\"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \\$templib; mv \\$templib $lib'\n\t    archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\\''s/\\([^()0-9A-Za-z{}]\\)/\\\\\\\\\\1/g'\\''`; templib=`echo $lib | $SED -e \"s/\\${tempext}\\..*/.so/\"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \\$templib ${wl}-retain-symbols-file,$export_symbols; mv \\$templib $lib'\n\t    # Commands to make compiler produce verbose output that lists\n\t    # what \"hidden\" libraries, object files and flags are used when\n\t    # linking a shared library.\n\t    #\n\t    # There doesn't appear to be a way to prevent this compiler from\n\t    # explicitly linking system object files so we need to strip them\n\t    # from the output so that they don't get included in the library\n\t    # dependencies.\n\t    output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP \"ld\"`; rm -f libconftest$shared_ext; list=\"\"; for z in $templist; do case $z in conftest.$objext) list=\"$list $z\";; *.$objext);; *) list=\"$list $z\";;esac; done; func_echo_all \"$list\"'\n\n\t    hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'\n\t    export_dynamic_flag_spec_CXX='${wl}--export-dynamic'\n\n\t    # Archives containing C++ object files must be created using\n\t    # \"CC -Bstatic\", where \"CC\" is the KAI C++ compiler.\n\t    old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs'\n\t    ;;\n\t  icpc* | ecpc* )\n\t    # Intel C++\n\t    with_gnu_ld=yes\n\t    # version 8.0 and above of icpc choke on multiply defined symbols\n\t    # if we add $predep_objects and $postdep_objects, however 7.1 and\n\t    # earlier do not add the objects themselves.\n\t    case `$CC -V 2>&1` in\n\t      *\"Version 7.\"*)\n\t        archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'\n\t\tarchive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'\n\t\t;;\n\t      *)  # Version 8.0 or newer\n\t        tmp_idyn=\n\t        case $host_cpu in\n\t\t  ia64*) tmp_idyn=' -i_dynamic';;\n\t\tesac\n\t        archive_cmds_CXX='$CC -shared'\"$tmp_idyn\"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'\n\t\tarchive_expsym_cmds_CXX='$CC -shared'\"$tmp_idyn\"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'\n\t\t;;\n\t    esac\n\t    archive_cmds_need_lc_CXX=no\n\t    hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'\n\t    export_dynamic_flag_spec_CXX='${wl}--export-dynamic'\n\t    whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive'\n\t    ;;\n          pgCC* | pgcpp*)\n            # Portland Group C++ compiler\n\t    case `$CC -V` in\n\t    *pgCC\\ [1-5].* | *pgcpp\\ [1-5].*)\n\t      prelink_cmds_CXX='tpldir=Template.dir~\n\t\trm -rf $tpldir~\n\t\t$CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~\n\t\tcompile_command=\"$compile_command `find $tpldir -name \\*.o | sort | $NL2SP`\"'\n\t      old_archive_cmds_CXX='tpldir=Template.dir~\n\t\trm -rf $tpldir~\n\t\t$CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~\n\t\t$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \\*.o | sort | $NL2SP`~\n\t\t$RANLIB $oldlib'\n\t      archive_cmds_CXX='tpldir=Template.dir~\n\t\trm -rf $tpldir~\n\t\t$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~\n\t\t$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \\*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'\n\t      archive_expsym_cmds_CXX='tpldir=Template.dir~\n\t\trm -rf $tpldir~\n\t\t$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~\n\t\t$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \\*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'\n\t      ;;\n\t    *) # Version 6 and above use weak symbols\n\t      archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'\n\t      archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'\n\t      ;;\n\t    esac\n\n\t    hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir'\n\t    export_dynamic_flag_spec_CXX='${wl}--export-dynamic'\n\t    whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\\\"\\\"; do test  -n \\\"$conv\\\" && new_convenience=\\\"$new_convenience,$conv\\\"; done; func_echo_all \\\"$new_convenience\\\"` ${wl}--no-whole-archive'\n            ;;\n\t  cxx*)\n\t    # Compaq C++\n\t    archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'\n\t    archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname  -o $lib ${wl}-retain-symbols-file $wl$export_symbols'\n\n\t    runpath_var=LD_RUN_PATH\n\t    hardcode_libdir_flag_spec_CXX='-rpath $libdir'\n\t    hardcode_libdir_separator_CXX=:\n\n\t    # Commands to make compiler produce verbose output that lists\n\t    # what \"hidden\" libraries, object files and flags are used when\n\t    # linking a shared library.\n\t    #\n\t    # There doesn't appear to be a way to prevent this compiler from\n\t    # explicitly linking system object files so we need to strip them\n\t    # from the output so that they don't get included in the library\n\t    # dependencies.\n\t    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP \"ld\"`; templist=`func_echo_all \"$templist\" | $SED \"s/\\(^.*ld.*\\)\\( .*ld .*$\\)/\\1/\"`; list=\"\"; for z in $templist; do case $z in conftest.$objext) list=\"$list $z\";; *.$objext);; *) list=\"$list $z\";;esac; done; func_echo_all \"X$list\" | $Xsed'\n\t    ;;\n\t  xl* | mpixl* | bgxl*)\n\t    # IBM XL 8.0 on PPC, with GNU ld\n\t    hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'\n\t    export_dynamic_flag_spec_CXX='${wl}--export-dynamic'\n\t    archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'\n\t    if test \"x$supports_anon_versioning\" = xyes; then\n\t      archive_expsym_cmds_CXX='echo \"{ global:\" > $output_objdir/$libname.ver~\n\t\tcat $export_symbols | sed -e \"s/\\(.*\\)/\\1;/\" >> $output_objdir/$libname.ver~\n\t\techo \"local: *; };\" >> $output_objdir/$libname.ver~\n\t\t$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'\n\t    fi\n\t    ;;\n\t  *)\n\t    case `$CC -V 2>&1 | sed 5q` in\n\t    *Sun\\ C*)\n\t      # Sun C++ 5.9\n\t      no_undefined_flag_CXX=' -zdefs'\n\t      archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'\n\t      archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'\n\t      hardcode_libdir_flag_spec_CXX='-R$libdir'\n\t      whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\\\"\\\"; do test -z \\\"$conv\\\" || new_convenience=\\\"$new_convenience,$conv\\\"; done; func_echo_all \\\"$new_convenience\\\"` ${wl}--no-whole-archive'\n\t      compiler_needs_object_CXX=yes\n\n\t      # Not sure whether something based on\n\t      # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1\n\t      # would be better.\n\t      output_verbose_link_cmd='func_echo_all'\n\n\t      # Archives containing C++ object files must be created using\n\t      # \"CC -xar\", where \"CC\" is the Sun C++ compiler.  This is\n\t      # necessary to make sure instantiated templates are included\n\t      # in the archive.\n\t      old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'\n\t      ;;\n\t    esac\n\t    ;;\n\tesac\n\t;;\n\n      lynxos*)\n        # FIXME: insert proper C++ library support\n\tld_shlibs_CXX=no\n\t;;\n\n      m88k*)\n        # FIXME: insert proper C++ library support\n        ld_shlibs_CXX=no\n\t;;\n\n      mvs*)\n        case $cc_basename in\n          cxx*)\n\t    # FIXME: insert proper C++ library support\n\t    ld_shlibs_CXX=no\n\t    ;;\n\t  *)\n\t    # FIXME: insert proper C++ library support\n\t    ld_shlibs_CXX=no\n\t    ;;\n\tesac\n\t;;\n\n      netbsd*)\n        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then\n\t  archive_cmds_CXX='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'\n\t  wlarc=\n\t  hardcode_libdir_flag_spec_CXX='-R$libdir'\n\t  hardcode_direct_CXX=yes\n\t  hardcode_shlibpath_var_CXX=no\n\tfi\n\t# Workaround some broken pre-1.5 toolchains\n\toutput_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e \"s:-lgcc -lc -lgcc::\"'\n\t;;\n\n      *nto* | *qnx*)\n        ld_shlibs_CXX=yes\n\t;;\n\n      openbsd2*)\n        # C++ shared libraries are fairly broken\n\tld_shlibs_CXX=no\n\t;;\n\n      openbsd*)\n\tif test -f /usr/libexec/ld.so; then\n\t  hardcode_direct_CXX=yes\n\t  hardcode_shlibpath_var_CXX=no\n\t  hardcode_direct_absolute_CXX=yes\n\t  archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'\n\t  hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'\n\t  if test -z \"`echo __ELF__ | $CC -E - | grep __ELF__`\" || test \"$host_os-$host_cpu\" = \"openbsd2.8-powerpc\"; then\n\t    archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'\n\t    export_dynamic_flag_spec_CXX='${wl}-E'\n\t    whole_archive_flag_spec_CXX=\"$wlarc\"'--whole-archive$convenience '\"$wlarc\"'--no-whole-archive'\n\t  fi\n\t  output_verbose_link_cmd=func_echo_all\n\telse\n\t  ld_shlibs_CXX=no\n\tfi\n\t;;\n\n      osf3* | osf4* | osf5*)\n        case $cc_basename in\n          KCC*)\n\t    # Kuck and Associates, Inc. (KAI) C++ Compiler\n\n\t    # KCC will only create a shared library if the output file\n\t    # ends with \".so\" (or \".sl\" for HP-UX), so rename the library\n\t    # to its proper name (with version) after linking.\n\t    archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\\''s/\\([^()0-9A-Za-z{}]\\)/\\\\\\\\\\1/g'\\''`; templib=`echo \"$lib\" | $SED -e \"s/\\${tempext}\\..*/.so/\"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \\$templib; mv \\$templib $lib'\n\n\t    hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'\n\t    hardcode_libdir_separator_CXX=:\n\n\t    # Archives containing C++ object files must be created using\n\t    # the KAI C++ compiler.\n\t    case $host in\n\t      osf3*) old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;;\n\t      *) old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;;\n\t    esac\n\t    ;;\n          RCC*)\n\t    # Rational C++ 2.4.1\n\t    # FIXME: insert proper C++ library support\n\t    ld_shlibs_CXX=no\n\t    ;;\n          cxx*)\n\t    case $host in\n\t      osf3*)\n\t        allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\\*'\n\t        archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n \"$verstring\" && func_echo_all \"${wl}-set_version $verstring\"` -update_registry ${output_objdir}/so_locations -o $lib'\n\t        hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'\n\t\t;;\n\t      *)\n\t        allow_undefined_flag_CXX=' -expect_unresolved \\*'\n\t        archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n \"$verstring\" && func_echo_all \"-set_version $verstring\"` -update_registry ${output_objdir}/so_locations -o $lib'\n\t        archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf \"%s %s\\\\n\" -exported_symbol \"\\$i\" >> $lib.exp; done~\n\t          echo \"-hidden\">> $lib.exp~\n\t          $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp  `test -n \"$verstring\" && $ECHO \"-set_version $verstring\"` -update_registry ${output_objdir}/so_locations -o $lib~\n\t          $RM $lib.exp'\n\t        hardcode_libdir_flag_spec_CXX='-rpath $libdir'\n\t\t;;\n\t    esac\n\n\t    hardcode_libdir_separator_CXX=:\n\n\t    # Commands to make compiler produce verbose output that lists\n\t    # what \"hidden\" libraries, object files and flags are used when\n\t    # linking a shared library.\n\t    #\n\t    # There doesn't appear to be a way to prevent this compiler from\n\t    # explicitly linking system object files so we need to strip them\n\t    # from the output so that they don't get included in the library\n\t    # dependencies.\n\t    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP \"ld\" | $GREP -v \"ld:\"`; templist=`func_echo_all \"$templist\" | $SED \"s/\\(^.*ld.*\\)\\( .*ld.*$\\)/\\1/\"`; list=\"\"; for z in $templist; do case $z in conftest.$objext) list=\"$list $z\";; *.$objext);; *) list=\"$list $z\";;esac; done; func_echo_all \"$list\"'\n\t    ;;\n\t  *)\n\t    if test \"$GXX\" = yes && test \"$with_gnu_ld\" = no; then\n\t      allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\\*'\n\t      case $host in\n\t        osf3*)\n\t          archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n \"$verstring\" && func_echo_all \"${wl}-set_version ${wl}$verstring\"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'\n\t\t  ;;\n\t        *)\n\t          archive_cmds_CXX='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n \"$verstring\" && func_echo_all \"${wl}-set_version ${wl}$verstring\"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'\n\t\t  ;;\n\t      esac\n\n\t      hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'\n\t      hardcode_libdir_separator_CXX=:\n\n\t      # Commands to make compiler produce verbose output that lists\n\t      # what \"hidden\" libraries, object files and flags are used when\n\t      # linking a shared library.\n\t      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v \"^Configured with:\" | $GREP \"\\-L\"'\n\n\t    else\n\t      # FIXME: insert proper C++ library support\n\t      ld_shlibs_CXX=no\n\t    fi\n\t    ;;\n        esac\n        ;;\n\n      psos*)\n        # FIXME: insert proper C++ library support\n        ld_shlibs_CXX=no\n        ;;\n\n      sunos4*)\n        case $cc_basename in\n          CC*)\n\t    # Sun C++ 4.x\n\t    # FIXME: insert proper C++ library support\n\t    ld_shlibs_CXX=no\n\t    ;;\n          lcc*)\n\t    # Lucid\n\t    # FIXME: insert proper C++ library support\n\t    ld_shlibs_CXX=no\n\t    ;;\n          *)\n\t    # FIXME: insert proper C++ library support\n\t    ld_shlibs_CXX=no\n\t    ;;\n        esac\n        ;;\n\n      solaris*)\n        case $cc_basename in\n          CC* | sunCC*)\n\t    # Sun C++ 4.2, 5.x and Centerline C++\n            archive_cmds_need_lc_CXX=yes\n\t    no_undefined_flag_CXX=' -zdefs'\n\t    archive_cmds_CXX='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'\n\t    archive_expsym_cmds_CXX='echo \"{ global:\" > $lib.exp~cat $export_symbols | $SED -e \"s/\\(.*\\)/\\1;/\" >> $lib.exp~echo \"local: *; };\" >> $lib.exp~\n\t      $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'\n\n\t    hardcode_libdir_flag_spec_CXX='-R$libdir'\n\t    hardcode_shlibpath_var_CXX=no\n\t    case $host_os in\n\t      solaris2.[0-5] | solaris2.[0-5].*) ;;\n\t      *)\n\t\t# The compiler driver will combine and reorder linker options,\n\t\t# but understands `-z linker_flag'.\n\t        # Supported since Solaris 2.6 (maybe 2.5.1?)\n\t\twhole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract'\n\t        ;;\n\t    esac\n\t    link_all_deplibs_CXX=yes\n\n\t    output_verbose_link_cmd='func_echo_all'\n\n\t    # Archives containing C++ object files must be created using\n\t    # \"CC -xar\", where \"CC\" is the Sun C++ compiler.  This is\n\t    # necessary to make sure instantiated templates are included\n\t    # in the archive.\n\t    old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'\n\t    ;;\n          gcx*)\n\t    # Green Hills C++ Compiler\n\t    archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'\n\n\t    # The C++ compiler must be used to create the archive.\n\t    old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs'\n\t    ;;\n          *)\n\t    # GNU C++ compiler with Solaris linker\n\t    if test \"$GXX\" = yes && test \"$with_gnu_ld\" = no; then\n\t      no_undefined_flag_CXX=' ${wl}-z ${wl}defs'\n\t      if $CC --version | $GREP -v '^2\\.7' > /dev/null; then\n\t        archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'\n\t        archive_expsym_cmds_CXX='echo \"{ global:\" > $lib.exp~cat $export_symbols | $SED -e \"s/\\(.*\\)/\\1;/\" >> $lib.exp~echo \"local: *; };\" >> $lib.exp~\n\t\t  $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'\n\n\t        # Commands to make compiler produce verbose output that lists\n\t        # what \"hidden\" libraries, object files and flags are used when\n\t        # linking a shared library.\n\t        output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v \"^Configured with:\" | $GREP \"\\-L\"'\n\t      else\n\t        # g++ 2.7 appears to require `-G' NOT `-shared' on this\n\t        # platform.\n\t        archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'\n\t        archive_expsym_cmds_CXX='echo \"{ global:\" > $lib.exp~cat $export_symbols | $SED -e \"s/\\(.*\\)/\\1;/\" >> $lib.exp~echo \"local: *; };\" >> $lib.exp~\n\t\t  $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'\n\n\t        # Commands to make compiler produce verbose output that lists\n\t        # what \"hidden\" libraries, object files and flags are used when\n\t        # linking a shared library.\n\t        output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v \"^Configured with:\" | $GREP \"\\-L\"'\n\t      fi\n\n\t      hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir'\n\t      case $host_os in\n\t\tsolaris2.[0-5] | solaris2.[0-5].*) ;;\n\t\t*)\n\t\t  whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'\n\t\t  ;;\n\t      esac\n\t    fi\n\t    ;;\n        esac\n        ;;\n\n    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)\n      no_undefined_flag_CXX='${wl}-z,text'\n      archive_cmds_need_lc_CXX=no\n      hardcode_shlibpath_var_CXX=no\n      runpath_var='LD_RUN_PATH'\n\n      case $cc_basename in\n        CC*)\n\t  archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'\n\t  archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'\n\t  ;;\n\t*)\n\t  archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'\n\t  archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'\n\t  ;;\n      esac\n      ;;\n\n      sysv5* | sco3.2v5* | sco5v6*)\n\t# Note: We can NOT use -z defs as we might desire, because we do not\n\t# link with -lc, and that would cause any symbols used from libc to\n\t# always be unresolved, which means just about no library would\n\t# ever link correctly.  If we're not using GNU ld we use -z text\n\t# though, which does catch some bad symbols but isn't as heavy-handed\n\t# as -z defs.\n\tno_undefined_flag_CXX='${wl}-z,text'\n\tallow_undefined_flag_CXX='${wl}-z,nodefs'\n\tarchive_cmds_need_lc_CXX=no\n\thardcode_shlibpath_var_CXX=no\n\thardcode_libdir_flag_spec_CXX='${wl}-R,$libdir'\n\thardcode_libdir_separator_CXX=':'\n\tlink_all_deplibs_CXX=yes\n\texport_dynamic_flag_spec_CXX='${wl}-Bexport'\n\trunpath_var='LD_RUN_PATH'\n\n\tcase $cc_basename in\n          CC*)\n\t    archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'\n\t    archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'\n\t    old_archive_cmds_CXX='$CC -Tprelink_objects $oldobjs~\n\t      '\"$old_archive_cmds_CXX\"\n\t    reload_cmds_CXX='$CC -Tprelink_objects $reload_objs~\n\t      '\"$reload_cmds_CXX\"\n\t    ;;\n\t  *)\n\t    archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'\n\t    archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'\n\t    ;;\n\tesac\n      ;;\n\n      tandem*)\n        case $cc_basename in\n          NCC*)\n\t    # NonStop-UX NCC 3.20\n\t    # FIXME: insert proper C++ library support\n\t    ld_shlibs_CXX=no\n\t    ;;\n          *)\n\t    # FIXME: insert proper C++ library support\n\t    ld_shlibs_CXX=no\n\t    ;;\n        esac\n        ;;\n\n      vxworks*)\n        # FIXME: insert proper C++ library support\n        ld_shlibs_CXX=no\n        ;;\n\n      *)\n        # FIXME: insert proper C++ library support\n        ld_shlibs_CXX=no\n        ;;\n    esac\n\n    { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX\" >&5\n$as_echo \"$ld_shlibs_CXX\" >&6; }\n    test \"$ld_shlibs_CXX\" = no && can_build_shared=no\n\n    GCC_CXX=\"$GXX\"\n    LD_CXX=\"$LD\"\n\n    ## CAVEAT EMPTOR:\n    ## There is no encapsulation within the following macros, do not change\n    ## the running order or otherwise move them around unless you know exactly\n    ## what you are doing...\n    # Dependencies to place before and after the object being linked:\npredep_objects_CXX=\npostdep_objects_CXX=\npredeps_CXX=\npostdeps_CXX=\ncompiler_lib_search_path_CXX=\n\ncat > conftest.$ac_ext <<_LT_EOF\nclass Foo\n{\npublic:\n  Foo (void) { a = 0; }\nprivate:\n  int a;\n};\n_LT_EOF\n\n\n_lt_libdeps_save_CFLAGS=$CFLAGS\ncase \"$CC $CFLAGS \" in #(\n*\\ -flto*\\ *) CFLAGS=\"$CFLAGS -fno-lto\" ;;\n*\\ -fwhopr*\\ *) CFLAGS=\"$CFLAGS -fno-whopr\" ;;\n*\\ -fuse-linker-plugin*\\ *) CFLAGS=\"$CFLAGS -fno-use-linker-plugin\" ;;\nesac\n\nif { { eval echo \"\\\"\\$as_me\\\":${as_lineno-$LINENO}: \\\"$ac_compile\\\"\"; } >&5\n  (eval $ac_compile) 2>&5\n  ac_status=$?\n  $as_echo \"$as_me:${as_lineno-$LINENO}: \\$? = $ac_status\" >&5\n  test $ac_status = 0; }; then\n  # Parse the compiler output and extract the necessary\n  # objects, libraries and library flags.\n\n  # Sentinel used to keep track of whether or not we are before\n  # the conftest object file.\n  pre_test_object_deps_done=no\n\n  for p in `eval \"$output_verbose_link_cmd\"`; do\n    case ${prev}${p} in\n\n    -L* | -R* | -l*)\n       # Some compilers place space between \"-{L,R}\" and the path.\n       # Remove the space.\n       if test $p = \"-L\" ||\n          test $p = \"-R\"; then\n\t prev=$p\n\t continue\n       fi\n\n       # Expand the sysroot to ease extracting the directories later.\n       if test -z \"$prev\"; then\n         case $p in\n         -L*) func_stripname_cnf '-L' '' \"$p\"; prev=-L; p=$func_stripname_result ;;\n         -R*) func_stripname_cnf '-R' '' \"$p\"; prev=-R; p=$func_stripname_result ;;\n         -l*) func_stripname_cnf '-l' '' \"$p\"; prev=-l; p=$func_stripname_result ;;\n         esac\n       fi\n       case $p in\n       =*) func_stripname_cnf '=' '' \"$p\"; p=$lt_sysroot$func_stripname_result ;;\n       esac\n       if test \"$pre_test_object_deps_done\" = no; then\n\t case ${prev} in\n\t -L | -R)\n\t   # Internal compiler library paths should come after those\n\t   # provided the user.  The postdeps already come after the\n\t   # user supplied libs so there is no need to process them.\n\t   if test -z \"$compiler_lib_search_path_CXX\"; then\n\t     compiler_lib_search_path_CXX=\"${prev}${p}\"\n\t   else\n\t     compiler_lib_search_path_CXX=\"${compiler_lib_search_path_CXX} ${prev}${p}\"\n\t   fi\n\t   ;;\n\t # The \"-l\" case would never come before the object being\n\t # linked, so don't bother handling this case.\n\t esac\n       else\n\t if test -z \"$postdeps_CXX\"; then\n\t   postdeps_CXX=\"${prev}${p}\"\n\t else\n\t   postdeps_CXX=\"${postdeps_CXX} ${prev}${p}\"\n\t fi\n       fi\n       prev=\n       ;;\n\n    *.lto.$objext) ;; # Ignore GCC LTO objects\n    *.$objext)\n       # This assumes that the test object file only shows up\n       # once in the compiler output.\n       if test \"$p\" = \"conftest.$objext\"; then\n\t pre_test_object_deps_done=yes\n\t continue\n       fi\n\n       if test \"$pre_test_object_deps_done\" = no; then\n\t if test -z \"$predep_objects_CXX\"; then\n\t   predep_objects_CXX=\"$p\"\n\t else\n\t   predep_objects_CXX=\"$predep_objects_CXX $p\"\n\t fi\n       else\n\t if test -z \"$postdep_objects_CXX\"; then\n\t   postdep_objects_CXX=\"$p\"\n\t else\n\t   postdep_objects_CXX=\"$postdep_objects_CXX $p\"\n\t fi\n       fi\n       ;;\n\n    *) ;; # Ignore the rest.\n\n    esac\n  done\n\n  # Clean up.\n  rm -f a.out a.exe\nelse\n  echo \"libtool.m4: error: problem compiling CXX test program\"\nfi\n\n$RM -f confest.$objext\nCFLAGS=$_lt_libdeps_save_CFLAGS\n\n# PORTME: override above test on systems where it is broken\ncase $host_os in\ninterix[3-9]*)\n  # Interix 3.5 installs completely hosed .la files for C++, so rather than\n  # hack all around it, let's just trust \"g++\" to DTRT.\n  predep_objects_CXX=\n  postdep_objects_CXX=\n  postdeps_CXX=\n  ;;\n\nlinux*)\n  case `$CC -V 2>&1 | sed 5q` in\n  *Sun\\ C*)\n    # Sun C++ 5.9\n\n    # The more standards-conforming stlport4 library is\n    # incompatible with the Cstd library. Avoid specifying\n    # it if it's in CXXFLAGS. Ignore libCrun as\n    # -library=stlport4 depends on it.\n    case \" $CXX $CXXFLAGS \" in\n    *\" -library=stlport4 \"*)\n      solaris_use_stlport4=yes\n      ;;\n    esac\n\n    if test \"$solaris_use_stlport4\" != yes; then\n      postdeps_CXX='-library=Cstd -library=Crun'\n    fi\n    ;;\n  esac\n  ;;\n\nsolaris*)\n  case $cc_basename in\n  CC* | sunCC*)\n    # The more standards-conforming stlport4 library is\n    # incompatible with the Cstd library. Avoid specifying\n    # it if it's in CXXFLAGS. Ignore libCrun as\n    # -library=stlport4 depends on it.\n    case \" $CXX $CXXFLAGS \" in\n    *\" -library=stlport4 \"*)\n      solaris_use_stlport4=yes\n      ;;\n    esac\n\n    # Adding this requires a known-good setup of shared libraries for\n    # Sun compiler versions before 5.6, else PIC objects from an old\n    # archive will be linked into the output, leading to subtle bugs.\n    if test \"$solaris_use_stlport4\" != yes; then\n      postdeps_CXX='-library=Cstd -library=Crun'\n    fi\n    ;;\n  esac\n  ;;\nesac\n\n\ncase \" $postdeps_CXX \" in\n*\" -lc \"*) archive_cmds_need_lc_CXX=no ;;\nesac\n compiler_lib_search_dirs_CXX=\nif test -n \"${compiler_lib_search_path_CXX}\"; then\n compiler_lib_search_dirs_CXX=`echo \" ${compiler_lib_search_path_CXX}\" | ${SED} -e 's! -L! !g' -e 's!^ !!'`\nfi\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n    lt_prog_compiler_wl_CXX=\nlt_prog_compiler_pic_CXX=\nlt_prog_compiler_static_CXX=\n\n\n  # C++ specific cases for pic, static, wl, etc.\n  if test \"$GXX\" = yes; then\n    lt_prog_compiler_wl_CXX='-Wl,'\n    lt_prog_compiler_static_CXX='-static'\n\n    case $host_os in\n    aix*)\n      # All AIX code is PIC.\n      if test \"$host_cpu\" = ia64; then\n\t# AIX 5 now supports IA64 processor\n\tlt_prog_compiler_static_CXX='-Bstatic'\n      fi\n      ;;\n\n    amigaos*)\n      case $host_cpu in\n      powerpc)\n            # see comment about AmigaOS4 .so support\n            lt_prog_compiler_pic_CXX='-fPIC'\n        ;;\n      m68k)\n            # FIXME: we need at least 68020 code to build shared libraries, but\n            # adding the `-m68020' flag to GCC prevents building anything better,\n            # like `-m68040'.\n            lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4'\n        ;;\n      esac\n      ;;\n\n    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)\n      # PIC is the default for these OSes.\n      ;;\n    mingw* | cygwin* | os2* | pw32* | cegcc*)\n      # This hack is so that the source file can tell whether it is being\n      # built for inclusion in a dll (and should export symbols for example).\n      # Although the cygwin gcc ignores -fPIC, still need this for old-style\n      # (--disable-auto-import) libraries\n      lt_prog_compiler_pic_CXX='-DDLL_EXPORT'\n      ;;\n    darwin* | rhapsody*)\n      # PIC is the default on this platform\n      # Common symbols not allowed in MH_DYLIB files\n      lt_prog_compiler_pic_CXX='-fno-common'\n      ;;\n    *djgpp*)\n      # DJGPP does not support shared libraries at all\n      lt_prog_compiler_pic_CXX=\n      ;;\n    haiku*)\n      # PIC is the default for Haiku.\n      # The \"-static\" flag exists, but is broken.\n      lt_prog_compiler_static_CXX=\n      ;;\n    interix[3-9]*)\n      # Interix 3.x gcc -fpic/-fPIC options generate broken code.\n      # Instead, we relocate shared libraries at runtime.\n      ;;\n    sysv4*MP*)\n      if test -d /usr/nec; then\n\tlt_prog_compiler_pic_CXX=-Kconform_pic\n      fi\n      ;;\n    hpux*)\n      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit\n      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag\n      # sets the default TLS model and affects inlining.\n      case $host_cpu in\n      hppa*64*)\n\t;;\n      *)\n\tlt_prog_compiler_pic_CXX='-fPIC'\n\t;;\n      esac\n      ;;\n    *qnx* | *nto*)\n      # QNX uses GNU C++, but need to define -shared option too, otherwise\n      # it will coredump.\n      lt_prog_compiler_pic_CXX='-fPIC -shared'\n      ;;\n    *)\n      lt_prog_compiler_pic_CXX='-fPIC'\n      ;;\n    esac\n  else\n    case $host_os in\n      aix[4-9]*)\n\t# All AIX code is PIC.\n\tif test \"$host_cpu\" = ia64; then\n\t  # AIX 5 now supports IA64 processor\n\t  lt_prog_compiler_static_CXX='-Bstatic'\n\telse\n\t  lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp'\n\tfi\n\t;;\n      chorus*)\n\tcase $cc_basename in\n\tcxch68*)\n\t  # Green Hills C++ Compiler\n\t  # _LT_TAGVAR(lt_prog_compiler_static, CXX)=\"--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a\"\n\t  ;;\n\tesac\n\t;;\n      mingw* | cygwin* | os2* | pw32* | cegcc*)\n\t# This hack is so that the source file can tell whether it is being\n\t# built for inclusion in a dll (and should export symbols for example).\n\tlt_prog_compiler_pic_CXX='-DDLL_EXPORT'\n\t;;\n      dgux*)\n\tcase $cc_basename in\n\t  ec++*)\n\t    lt_prog_compiler_pic_CXX='-KPIC'\n\t    ;;\n\t  ghcx*)\n\t    # Green Hills C++ Compiler\n\t    lt_prog_compiler_pic_CXX='-pic'\n\t    ;;\n\t  *)\n\t    ;;\n\tesac\n\t;;\n      freebsd* | dragonfly*)\n\t# FreeBSD uses GNU C++\n\t;;\n      hpux9* | hpux10* | hpux11*)\n\tcase $cc_basename in\n\t  CC*)\n\t    lt_prog_compiler_wl_CXX='-Wl,'\n\t    lt_prog_compiler_static_CXX='${wl}-a ${wl}archive'\n\t    if test \"$host_cpu\" != ia64; then\n\t      lt_prog_compiler_pic_CXX='+Z'\n\t    fi\n\t    ;;\n\t  aCC*)\n\t    lt_prog_compiler_wl_CXX='-Wl,'\n\t    lt_prog_compiler_static_CXX='${wl}-a ${wl}archive'\n\t    case $host_cpu in\n\t    hppa*64*|ia64*)\n\t      # +Z the default\n\t      ;;\n\t    *)\n\t      lt_prog_compiler_pic_CXX='+Z'\n\t      ;;\n\t    esac\n\t    ;;\n\t  *)\n\t    ;;\n\tesac\n\t;;\n      interix*)\n\t# This is c89, which is MS Visual C++ (no shared libs)\n\t# Anyone wants to do a port?\n\t;;\n      irix5* | irix6* | nonstopux*)\n\tcase $cc_basename in\n\t  CC*)\n\t    lt_prog_compiler_wl_CXX='-Wl,'\n\t    lt_prog_compiler_static_CXX='-non_shared'\n\t    # CC pic flag -KPIC is the default.\n\t    ;;\n\t  *)\n\t    ;;\n\tesac\n\t;;\n      linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)\n\tcase $cc_basename in\n\t  KCC*)\n\t    # KAI C++ Compiler\n\t    lt_prog_compiler_wl_CXX='--backend -Wl,'\n\t    lt_prog_compiler_pic_CXX='-fPIC'\n\t    ;;\n\t  ecpc* )\n\t    # old Intel C++ for x86_64 which still supported -KPIC.\n\t    lt_prog_compiler_wl_CXX='-Wl,'\n\t    lt_prog_compiler_pic_CXX='-KPIC'\n\t    lt_prog_compiler_static_CXX='-static'\n\t    ;;\n\t  icpc* )\n\t    # Intel C++, used to be incompatible with GCC.\n\t    # ICC 10 doesn't accept -KPIC any more.\n\t    lt_prog_compiler_wl_CXX='-Wl,'\n\t    lt_prog_compiler_pic_CXX='-fPIC'\n\t    lt_prog_compiler_static_CXX='-static'\n\t    ;;\n\t  pgCC* | pgcpp*)\n\t    # Portland Group C++ compiler\n\t    lt_prog_compiler_wl_CXX='-Wl,'\n\t    lt_prog_compiler_pic_CXX='-fpic'\n\t    lt_prog_compiler_static_CXX='-Bstatic'\n\t    ;;\n\t  cxx*)\n\t    # Compaq C++\n\t    # Make sure the PIC flag is empty.  It appears that all Alpha\n\t    # Linux and Compaq Tru64 Unix objects are PIC.\n\t    lt_prog_compiler_pic_CXX=\n\t    lt_prog_compiler_static_CXX='-non_shared'\n\t    ;;\n\t  xlc* | xlC* | bgxl[cC]* | mpixl[cC]*)\n\t    # IBM XL 8.0, 9.0 on PPC and BlueGene\n\t    lt_prog_compiler_wl_CXX='-Wl,'\n\t    lt_prog_compiler_pic_CXX='-qpic'\n\t    lt_prog_compiler_static_CXX='-qstaticlink'\n\t    ;;\n\t  *)\n\t    case `$CC -V 2>&1 | sed 5q` in\n\t    *Sun\\ C*)\n\t      # Sun C++ 5.9\n\t      lt_prog_compiler_pic_CXX='-KPIC'\n\t      lt_prog_compiler_static_CXX='-Bstatic'\n\t      lt_prog_compiler_wl_CXX='-Qoption ld '\n\t      ;;\n\t    esac\n\t    ;;\n\tesac\n\t;;\n      lynxos*)\n\t;;\n      m88k*)\n\t;;\n      mvs*)\n\tcase $cc_basename in\n\t  cxx*)\n\t    lt_prog_compiler_pic_CXX='-W c,exportall'\n\t    ;;\n\t  *)\n\t    ;;\n\tesac\n\t;;\n      netbsd* | netbsdelf*-gnu)\n\t;;\n      *qnx* | *nto*)\n        # QNX uses GNU C++, but need to define -shared option too, otherwise\n        # it will coredump.\n        lt_prog_compiler_pic_CXX='-fPIC -shared'\n        ;;\n      osf3* | osf4* | osf5*)\n\tcase $cc_basename in\n\t  KCC*)\n\t    lt_prog_compiler_wl_CXX='--backend -Wl,'\n\t    ;;\n\t  RCC*)\n\t    # Rational C++ 2.4.1\n\t    lt_prog_compiler_pic_CXX='-pic'\n\t    ;;\n\t  cxx*)\n\t    # Digital/Compaq C++\n\t    lt_prog_compiler_wl_CXX='-Wl,'\n\t    # Make sure the PIC flag is empty.  It appears that all Alpha\n\t    # Linux and Compaq Tru64 Unix objects are PIC.\n\t    lt_prog_compiler_pic_CXX=\n\t    lt_prog_compiler_static_CXX='-non_shared'\n\t    ;;\n\t  *)\n\t    ;;\n\tesac\n\t;;\n      psos*)\n\t;;\n      solaris*)\n\tcase $cc_basename in\n\t  CC* | sunCC*)\n\t    # Sun C++ 4.2, 5.x and Centerline C++\n\t    lt_prog_compiler_pic_CXX='-KPIC'\n\t    lt_prog_compiler_static_CXX='-Bstatic'\n\t    lt_prog_compiler_wl_CXX='-Qoption ld '\n\t    ;;\n\t  gcx*)\n\t    # Green Hills C++ Compiler\n\t    lt_prog_compiler_pic_CXX='-PIC'\n\t    ;;\n\t  *)\n\t    ;;\n\tesac\n\t;;\n      sunos4*)\n\tcase $cc_basename in\n\t  CC*)\n\t    # Sun C++ 4.x\n\t    lt_prog_compiler_pic_CXX='-pic'\n\t    lt_prog_compiler_static_CXX='-Bstatic'\n\t    ;;\n\t  lcc*)\n\t    # Lucid\n\t    lt_prog_compiler_pic_CXX='-pic'\n\t    ;;\n\t  *)\n\t    ;;\n\tesac\n\t;;\n      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)\n\tcase $cc_basename in\n\t  CC*)\n\t    lt_prog_compiler_wl_CXX='-Wl,'\n\t    lt_prog_compiler_pic_CXX='-KPIC'\n\t    lt_prog_compiler_static_CXX='-Bstatic'\n\t    ;;\n\tesac\n\t;;\n      tandem*)\n\tcase $cc_basename in\n\t  NCC*)\n\t    # NonStop-UX NCC 3.20\n\t    lt_prog_compiler_pic_CXX='-KPIC'\n\t    ;;\n\t  *)\n\t    ;;\n\tesac\n\t;;\n      vxworks*)\n\t;;\n      *)\n\tlt_prog_compiler_can_build_shared_CXX=no\n\t;;\n    esac\n  fi\n\ncase $host_os in\n  # For platforms which do not support PIC, -DPIC is meaningless:\n  *djgpp*)\n    lt_prog_compiler_pic_CXX=\n    ;;\n  *)\n    lt_prog_compiler_pic_CXX=\"$lt_prog_compiler_pic_CXX -DPIC\"\n    ;;\nesac\n\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC\" >&5\n$as_echo_n \"checking for $compiler option to produce PIC... \" >&6; }\nif ${lt_cv_prog_compiler_pic_CXX+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  lt_cv_prog_compiler_pic_CXX=$lt_prog_compiler_pic_CXX\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_CXX\" >&5\n$as_echo \"$lt_cv_prog_compiler_pic_CXX\" >&6; }\nlt_prog_compiler_pic_CXX=$lt_cv_prog_compiler_pic_CXX\n\n#\n# Check to make sure the PIC flag actually works.\n#\nif test -n \"$lt_prog_compiler_pic_CXX\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works\" >&5\n$as_echo_n \"checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... \" >&6; }\nif ${lt_cv_prog_compiler_pic_works_CXX+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  lt_cv_prog_compiler_pic_works_CXX=no\n   ac_outfile=conftest.$ac_objext\n   echo \"$lt_simple_compile_test_code\" > conftest.$ac_ext\n   lt_compiler_flag=\"$lt_prog_compiler_pic_CXX -DPIC\"\n   # Insert the option either (1) after the last *FLAGS variable, or\n   # (2) before a word containing \"conftest.\", or (3) at the end.\n   # Note that $ac_compile itself does not contain backslashes and begins\n   # with a dollar sign (not a hyphen), so the echo should work correctly.\n   # The option is referenced via a variable to avoid confusing sed.\n   lt_compile=`echo \"$ac_compile\" | $SED \\\n   -e 's:.*FLAGS}\\{0,1\\} :&$lt_compiler_flag :; t' \\\n   -e 's: [^ ]*conftest\\.: $lt_compiler_flag&:; t' \\\n   -e 's:$: $lt_compiler_flag:'`\n   (eval echo \"\\\"\\$as_me:$LINENO: $lt_compile\\\"\" >&5)\n   (eval \"$lt_compile\" 2>conftest.err)\n   ac_status=$?\n   cat conftest.err >&5\n   echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n   if (exit $ac_status) && test -s \"$ac_outfile\"; then\n     # The compiler can only warn and ignore the option if not recognized\n     # So say no if there are warnings other than the usual output.\n     $ECHO \"$_lt_compiler_boilerplate\" | $SED '/^$/d' >conftest.exp\n     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2\n     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then\n       lt_cv_prog_compiler_pic_works_CXX=yes\n     fi\n   fi\n   $RM conftest*\n\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX\" >&5\n$as_echo \"$lt_cv_prog_compiler_pic_works_CXX\" >&6; }\n\nif test x\"$lt_cv_prog_compiler_pic_works_CXX\" = xyes; then\n    case $lt_prog_compiler_pic_CXX in\n     \"\" | \" \"*) ;;\n     *) lt_prog_compiler_pic_CXX=\" $lt_prog_compiler_pic_CXX\" ;;\n     esac\nelse\n    lt_prog_compiler_pic_CXX=\n     lt_prog_compiler_can_build_shared_CXX=no\nfi\n\nfi\n\n\n\n\n\n#\n# Check to make sure the static flag actually works.\n#\nwl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\\\"$lt_prog_compiler_static_CXX\\\"\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works\" >&5\n$as_echo_n \"checking if $compiler static flag $lt_tmp_static_flag works... \" >&6; }\nif ${lt_cv_prog_compiler_static_works_CXX+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  lt_cv_prog_compiler_static_works_CXX=no\n   save_LDFLAGS=\"$LDFLAGS\"\n   LDFLAGS=\"$LDFLAGS $lt_tmp_static_flag\"\n   echo \"$lt_simple_link_test_code\" > conftest.$ac_ext\n   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then\n     # The linker can only warn and ignore the option if not recognized\n     # So say no if there are warnings\n     if test -s conftest.err; then\n       # Append any errors to the config.log.\n       cat conftest.err 1>&5\n       $ECHO \"$_lt_linker_boilerplate\" | $SED '/^$/d' > conftest.exp\n       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2\n       if diff conftest.exp conftest.er2 >/dev/null; then\n         lt_cv_prog_compiler_static_works_CXX=yes\n       fi\n     else\n       lt_cv_prog_compiler_static_works_CXX=yes\n     fi\n   fi\n   $RM -r conftest*\n   LDFLAGS=\"$save_LDFLAGS\"\n\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX\" >&5\n$as_echo \"$lt_cv_prog_compiler_static_works_CXX\" >&6; }\n\nif test x\"$lt_cv_prog_compiler_static_works_CXX\" = xyes; then\n    :\nelse\n    lt_prog_compiler_static_CXX=\nfi\n\n\n\n\n    { $as_echo \"$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext\" >&5\n$as_echo_n \"checking if $compiler supports -c -o file.$ac_objext... \" >&6; }\nif ${lt_cv_prog_compiler_c_o_CXX+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  lt_cv_prog_compiler_c_o_CXX=no\n   $RM -r conftest 2>/dev/null\n   mkdir conftest\n   cd conftest\n   mkdir out\n   echo \"$lt_simple_compile_test_code\" > conftest.$ac_ext\n\n   lt_compiler_flag=\"-o out/conftest2.$ac_objext\"\n   # Insert the option either (1) after the last *FLAGS variable, or\n   # (2) before a word containing \"conftest.\", or (3) at the end.\n   # Note that $ac_compile itself does not contain backslashes and begins\n   # with a dollar sign (not a hyphen), so the echo should work correctly.\n   lt_compile=`echo \"$ac_compile\" | $SED \\\n   -e 's:.*FLAGS}\\{0,1\\} :&$lt_compiler_flag :; t' \\\n   -e 's: [^ ]*conftest\\.: $lt_compiler_flag&:; t' \\\n   -e 's:$: $lt_compiler_flag:'`\n   (eval echo \"\\\"\\$as_me:$LINENO: $lt_compile\\\"\" >&5)\n   (eval \"$lt_compile\" 2>out/conftest.err)\n   ac_status=$?\n   cat out/conftest.err >&5\n   echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n   if (exit $ac_status) && test -s out/conftest2.$ac_objext\n   then\n     # The compiler can only warn and ignore the option if not recognized\n     # So say no if there are warnings\n     $ECHO \"$_lt_compiler_boilerplate\" | $SED '/^$/d' > out/conftest.exp\n     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2\n     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then\n       lt_cv_prog_compiler_c_o_CXX=yes\n     fi\n   fi\n   chmod u+w . 2>&5\n   $RM conftest*\n   # SGI C++ compiler will create directory out/ii_files/ for\n   # template instantiation\n   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files\n   $RM out/* && rmdir out\n   cd ..\n   $RM -r conftest\n   $RM conftest*\n\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX\" >&5\n$as_echo \"$lt_cv_prog_compiler_c_o_CXX\" >&6; }\n\n\n\n    { $as_echo \"$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext\" >&5\n$as_echo_n \"checking if $compiler supports -c -o file.$ac_objext... \" >&6; }\nif ${lt_cv_prog_compiler_c_o_CXX+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  lt_cv_prog_compiler_c_o_CXX=no\n   $RM -r conftest 2>/dev/null\n   mkdir conftest\n   cd conftest\n   mkdir out\n   echo \"$lt_simple_compile_test_code\" > conftest.$ac_ext\n\n   lt_compiler_flag=\"-o out/conftest2.$ac_objext\"\n   # Insert the option either (1) after the last *FLAGS variable, or\n   # (2) before a word containing \"conftest.\", or (3) at the end.\n   # Note that $ac_compile itself does not contain backslashes and begins\n   # with a dollar sign (not a hyphen), so the echo should work correctly.\n   lt_compile=`echo \"$ac_compile\" | $SED \\\n   -e 's:.*FLAGS}\\{0,1\\} :&$lt_compiler_flag :; t' \\\n   -e 's: [^ ]*conftest\\.: $lt_compiler_flag&:; t' \\\n   -e 's:$: $lt_compiler_flag:'`\n   (eval echo \"\\\"\\$as_me:$LINENO: $lt_compile\\\"\" >&5)\n   (eval \"$lt_compile\" 2>out/conftest.err)\n   ac_status=$?\n   cat out/conftest.err >&5\n   echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n   if (exit $ac_status) && test -s out/conftest2.$ac_objext\n   then\n     # The compiler can only warn and ignore the option if not recognized\n     # So say no if there are warnings\n     $ECHO \"$_lt_compiler_boilerplate\" | $SED '/^$/d' > out/conftest.exp\n     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2\n     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then\n       lt_cv_prog_compiler_c_o_CXX=yes\n     fi\n   fi\n   chmod u+w . 2>&5\n   $RM conftest*\n   # SGI C++ compiler will create directory out/ii_files/ for\n   # template instantiation\n   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files\n   $RM out/* && rmdir out\n   cd ..\n   $RM -r conftest\n   $RM conftest*\n\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX\" >&5\n$as_echo \"$lt_cv_prog_compiler_c_o_CXX\" >&6; }\n\n\n\n\nhard_links=\"nottested\"\nif test \"$lt_cv_prog_compiler_c_o_CXX\" = no && test \"$need_locks\" != no; then\n  # do not overwrite the value of need_locks provided by the user\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links\" >&5\n$as_echo_n \"checking if we can lock with hard links... \" >&6; }\n  hard_links=yes\n  $RM conftest*\n  ln conftest.a conftest.b 2>/dev/null && hard_links=no\n  touch conftest.a\n  ln conftest.a conftest.b 2>&5 || hard_links=no\n  ln conftest.a conftest.b 2>/dev/null && hard_links=no\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $hard_links\" >&5\n$as_echo \"$hard_links\" >&6; }\n  if test \"$hard_links\" = no; then\n    { $as_echo \"$as_me:${as_lineno-$LINENO}: WARNING: \\`$CC' does not support \\`-c -o', so \\`make -j' may be unsafe\" >&5\n$as_echo \"$as_me: WARNING: \\`$CC' does not support \\`-c -o', so \\`make -j' may be unsafe\" >&2;}\n    need_locks=warn\n  fi\nelse\n  need_locks=no\nfi\n\n\n\n    { $as_echo \"$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries\" >&5\n$as_echo_n \"checking whether the $compiler linker ($LD) supports shared libraries... \" >&6; }\n\n  export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\\''s/.* //'\\'' | sort | uniq > $export_symbols'\n  exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'\n  case $host_os in\n  aix[4-9]*)\n    # If we're using GNU nm, then we don't want the \"-C\" option.\n    # -C means demangle to AIX nm, but means don't demangle with GNU nm\n    # Also, AIX nm treats weak defined symbols like other global defined\n    # symbols, whereas GNU nm marks them as \"W\".\n    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then\n      export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\\''{ if (((\\$ 2 == \"T\") || (\\$ 2 == \"D\") || (\\$ 2 == \"B\") || (\\$ 2 == \"W\")) && (substr(\\$ 3,1,1) != \".\")) { print \\$ 3 } }'\\'' | sort -u > $export_symbols'\n    else\n      export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\\''{ if (((\\$ 2 == \"T\") || (\\$ 2 == \"D\") || (\\$ 2 == \"B\")) && (substr(\\$ 3,1,1) != \".\")) { print \\$ 3 } }'\\'' | sort -u > $export_symbols'\n    fi\n    ;;\n  pw32*)\n    export_symbols_cmds_CXX=\"$ltdll_cmds\"\n    ;;\n  cygwin* | mingw* | cegcc*)\n    case $cc_basename in\n    cl*)\n      exclude_expsyms_CXX='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'\n      ;;\n    *)\n      export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\\''/^[BCDGRS][ ]/s/.*[ ]\\([^ ]*\\)/\\1 DATA/;s/^.*[ ]__nm__\\([^ ]*\\)[ ][^ ]*/\\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\\'' | sort | uniq > $export_symbols'\n      exclude_expsyms_CXX='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'\n      ;;\n    esac\n    ;;\n  linux* | k*bsd*-gnu | gnu*)\n    link_all_deplibs_CXX=no\n    ;;\n  *)\n    export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\\''s/.* //'\\'' | sort | uniq > $export_symbols'\n    ;;\n  esac\n\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX\" >&5\n$as_echo \"$ld_shlibs_CXX\" >&6; }\ntest \"$ld_shlibs_CXX\" = no && can_build_shared=no\n\nwith_gnu_ld_CXX=$with_gnu_ld\n\n\n\n\n\n\n#\n# Do we need to explicitly link libc?\n#\ncase \"x$archive_cmds_need_lc_CXX\" in\nx|xyes)\n  # Assume -lc should be added\n  archive_cmds_need_lc_CXX=yes\n\n  if test \"$enable_shared\" = yes && test \"$GCC\" = yes; then\n    case $archive_cmds_CXX in\n    *'~'*)\n      # FIXME: we may have to deal with multi-command sequences.\n      ;;\n    '$CC '*)\n      # Test whether the compiler implicitly links with -lc since on some\n      # systems, -lgcc has to come before -lc. If gcc already passes -lc\n      # to ld, don't add -lc before -lgcc.\n      { $as_echo \"$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in\" >&5\n$as_echo_n \"checking whether -lc should be explicitly linked in... \" >&6; }\nif ${lt_cv_archive_cmds_need_lc_CXX+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  $RM conftest*\n\techo \"$lt_simple_compile_test_code\" > conftest.$ac_ext\n\n\tif { { eval echo \"\\\"\\$as_me\\\":${as_lineno-$LINENO}: \\\"$ac_compile\\\"\"; } >&5\n  (eval $ac_compile) 2>&5\n  ac_status=$?\n  $as_echo \"$as_me:${as_lineno-$LINENO}: \\$? = $ac_status\" >&5\n  test $ac_status = 0; } 2>conftest.err; then\n\t  soname=conftest\n\t  lib=conftest\n\t  libobjs=conftest.$ac_objext\n\t  deplibs=\n\t  wl=$lt_prog_compiler_wl_CXX\n\t  pic_flag=$lt_prog_compiler_pic_CXX\n\t  compiler_flags=-v\n\t  linker_flags=-v\n\t  verstring=\n\t  output_objdir=.\n\t  libname=conftest\n\t  lt_save_allow_undefined_flag=$allow_undefined_flag_CXX\n\t  allow_undefined_flag_CXX=\n\t  if { { eval echo \"\\\"\\$as_me\\\":${as_lineno-$LINENO}: \\\"$archive_cmds_CXX 2\\>\\&1 \\| $GREP \\\" -lc \\\" \\>/dev/null 2\\>\\&1\\\"\"; } >&5\n  (eval $archive_cmds_CXX 2\\>\\&1 \\| $GREP \\\" -lc \\\" \\>/dev/null 2\\>\\&1) 2>&5\n  ac_status=$?\n  $as_echo \"$as_me:${as_lineno-$LINENO}: \\$? = $ac_status\" >&5\n  test $ac_status = 0; }\n\t  then\n\t    lt_cv_archive_cmds_need_lc_CXX=no\n\t  else\n\t    lt_cv_archive_cmds_need_lc_CXX=yes\n\t  fi\n\t  allow_undefined_flag_CXX=$lt_save_allow_undefined_flag\n\telse\n\t  cat conftest.err 1>&5\n\tfi\n\t$RM conftest*\n\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_CXX\" >&5\n$as_echo \"$lt_cv_archive_cmds_need_lc_CXX\" >&6; }\n      archive_cmds_need_lc_CXX=$lt_cv_archive_cmds_need_lc_CXX\n      ;;\n    esac\n  fi\n  ;;\nesac\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n    { $as_echo \"$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics\" >&5\n$as_echo_n \"checking dynamic linker characteristics... \" >&6; }\n\nlibrary_names_spec=\nlibname_spec='lib$name'\nsoname_spec=\nshrext_cmds=\".so\"\npostinstall_cmds=\npostuninstall_cmds=\nfinish_cmds=\nfinish_eval=\nshlibpath_var=\nshlibpath_overrides_runpath=unknown\nversion_type=none\ndynamic_linker=\"$host_os ld.so\"\nsys_lib_dlsearch_path_spec=\"/lib /usr/lib\"\nneed_lib_prefix=unknown\nhardcode_into_libs=no\n\n# when you set need_version to no, make sure it does not cause -set_version\n# flags to be left without arguments\nneed_version=unknown\n\ncase $host_os in\naix3*)\n  version_type=linux # correct to gnu/linux during the next big refactor\n  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'\n  shlibpath_var=LIBPATH\n\n  # AIX 3 has no versioning support, so we append a major version to the name.\n  soname_spec='${libname}${release}${shared_ext}$major'\n  ;;\n\naix[4-9]*)\n  version_type=linux # correct to gnu/linux during the next big refactor\n  need_lib_prefix=no\n  need_version=no\n  hardcode_into_libs=yes\n  if test \"$host_cpu\" = ia64; then\n    # AIX 5 supports IA64\n    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'\n    shlibpath_var=LD_LIBRARY_PATH\n  else\n    # With GCC up to 2.95.x, collect2 would create an import file\n    # for dependence libraries.  The import file would start with\n    # the line `#! .'.  This would cause the generated library to\n    # depend on `.', always an invalid library.  This was fixed in\n    # development snapshots of GCC prior to 3.0.\n    case $host_os in\n      aix4 | aix4.[01] | aix4.[01].*)\n      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'\n\t   echo ' yes '\n\t   echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then\n\t:\n      else\n\tcan_build_shared=no\n      fi\n      ;;\n    esac\n    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct\n    # soname into executable. Probably we can add versioning support to\n    # collect2, so additional links can be useful in future.\n    if test \"$aix_use_runtimelinking\" = yes; then\n      # If using run time linking (on AIX 4.2 or later) use lib<name>.so\n      # instead of lib<name>.a to let people know that these are not\n      # typical AIX shared libraries.\n      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n    else\n      # We preserve .a as extension for shared libraries through AIX4.2\n      # and later when we are not doing run time linking.\n      library_names_spec='${libname}${release}.a $libname.a'\n      soname_spec='${libname}${release}${shared_ext}$major'\n    fi\n    shlibpath_var=LIBPATH\n  fi\n  ;;\n\namigaos*)\n  case $host_cpu in\n  powerpc)\n    # Since July 2007 AmigaOS4 officially supports .so libraries.\n    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.\n    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n    ;;\n  m68k)\n    library_names_spec='$libname.ixlibrary $libname.a'\n    # Create ${libname}_ixlibrary.a entries in /sys/libs.\n    finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all \"$lib\" | $SED '\\''s%^.*/\\([^/]*\\)\\.ixlibrary$%\\1%'\\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show \"cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a\"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'\n    ;;\n  esac\n  ;;\n\nbeos*)\n  library_names_spec='${libname}${shared_ext}'\n  dynamic_linker=\"$host_os ld.so\"\n  shlibpath_var=LIBRARY_PATH\n  ;;\n\nbsdi[45]*)\n  version_type=linux # correct to gnu/linux during the next big refactor\n  need_version=no\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  finish_cmds='PATH=\"\\$PATH:/sbin\" ldconfig $libdir'\n  shlibpath_var=LD_LIBRARY_PATH\n  sys_lib_search_path_spec=\"/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib\"\n  sys_lib_dlsearch_path_spec=\"/shlib /usr/lib /usr/local/lib\"\n  # the default ld.so.conf also contains /usr/contrib/lib and\n  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow\n  # libtool to hard-code these into programs\n  ;;\n\ncygwin* | mingw* | pw32* | cegcc*)\n  version_type=windows\n  shrext_cmds=\".dll\"\n  need_version=no\n  need_lib_prefix=no\n\n  case $GCC,$cc_basename in\n  yes,*)\n    # gcc\n    library_names_spec='$libname.dll.a'\n    # DLL is installed to $(libdir)/../bin by postinstall_cmds\n    postinstall_cmds='base_file=`basename \\${file}`~\n      dlpath=`$SHELL 2>&1 -c '\\''. $dir/'\\''\\${base_file}'\\''i; echo \\$dlname'\\''`~\n      dldir=$destdir/`dirname \\$dlpath`~\n      test -d \\$dldir || mkdir -p \\$dldir~\n      $install_prog $dir/$dlname \\$dldir/$dlname~\n      chmod a+x \\$dldir/$dlname~\n      if test -n '\\''$stripme'\\'' && test -n '\\''$striplib'\\''; then\n        eval '\\''$striplib \\$dldir/$dlname'\\'' || exit \\$?;\n      fi'\n    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\\''. $file; echo \\$dlname'\\''`~\n      dlpath=$dir/\\$dldll~\n       $RM \\$dlpath'\n    shlibpath_overrides_runpath=yes\n\n    case $host_os in\n    cygwin*)\n      # Cygwin DLLs use 'cyg' prefix rather than 'lib'\n      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'\n\n      ;;\n    mingw* | cegcc*)\n      # MinGW DLLs use traditional 'lib' prefix\n      soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'\n      ;;\n    pw32*)\n      # pw32 DLLs use 'pw' prefix rather than 'lib'\n      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'\n      ;;\n    esac\n    dynamic_linker='Win32 ld.exe'\n    ;;\n\n  *,cl*)\n    # Native MSVC\n    libname_spec='$name'\n    soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'\n    library_names_spec='${libname}.dll.lib'\n\n    case $build_os in\n    mingw*)\n      sys_lib_search_path_spec=\n      lt_save_ifs=$IFS\n      IFS=';'\n      for lt_path in $LIB\n      do\n        IFS=$lt_save_ifs\n        # Let DOS variable expansion print the short 8.3 style file name.\n        lt_path=`cd \"$lt_path\" 2>/dev/null && cmd //C \"for %i in (\".\") do @echo %~si\"`\n        sys_lib_search_path_spec=\"$sys_lib_search_path_spec $lt_path\"\n      done\n      IFS=$lt_save_ifs\n      # Convert to MSYS style.\n      sys_lib_search_path_spec=`$ECHO \"$sys_lib_search_path_spec\" | sed -e 's|\\\\\\\\|/|g' -e 's| \\\\([a-zA-Z]\\\\):| /\\\\1|g' -e 's|^ ||'`\n      ;;\n    cygwin*)\n      # Convert to unix form, then to dos form, then back to unix form\n      # but this time dos style (no spaces!) so that the unix form looks\n      # like /cygdrive/c/PROGRA~1:/cygdr...\n      sys_lib_search_path_spec=`cygpath --path --unix \"$LIB\"`\n      sys_lib_search_path_spec=`cygpath --path --dos \"$sys_lib_search_path_spec\" 2>/dev/null`\n      sys_lib_search_path_spec=`cygpath --path --unix \"$sys_lib_search_path_spec\" | $SED -e \"s/$PATH_SEPARATOR/ /g\"`\n      ;;\n    *)\n      sys_lib_search_path_spec=\"$LIB\"\n      if $ECHO \"$sys_lib_search_path_spec\" | $GREP ';[c-zC-Z]:/' >/dev/null; then\n        # It is most probably a Windows format PATH.\n        sys_lib_search_path_spec=`$ECHO \"$sys_lib_search_path_spec\" | $SED -e 's/;/ /g'`\n      else\n        sys_lib_search_path_spec=`$ECHO \"$sys_lib_search_path_spec\" | $SED -e \"s/$PATH_SEPARATOR/ /g\"`\n      fi\n      # FIXME: find the short name or the path components, as spaces are\n      # common. (e.g. \"Program Files\" -> \"PROGRA~1\")\n      ;;\n    esac\n\n    # DLL is installed to $(libdir)/../bin by postinstall_cmds\n    postinstall_cmds='base_file=`basename \\${file}`~\n      dlpath=`$SHELL 2>&1 -c '\\''. $dir/'\\''\\${base_file}'\\''i; echo \\$dlname'\\''`~\n      dldir=$destdir/`dirname \\$dlpath`~\n      test -d \\$dldir || mkdir -p \\$dldir~\n      $install_prog $dir/$dlname \\$dldir/$dlname'\n    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\\''. $file; echo \\$dlname'\\''`~\n      dlpath=$dir/\\$dldll~\n       $RM \\$dlpath'\n    shlibpath_overrides_runpath=yes\n    dynamic_linker='Win32 link.exe'\n    ;;\n\n  *)\n    # Assume MSVC wrapper\n    library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'\n    dynamic_linker='Win32 ld.exe'\n    ;;\n  esac\n  # FIXME: first we should search . and the directory the executable is in\n  shlibpath_var=PATH\n  ;;\n\ndarwin* | rhapsody*)\n  dynamic_linker=\"$host_os dyld\"\n  version_type=darwin\n  need_lib_prefix=no\n  need_version=no\n  library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'\n  soname_spec='${libname}${release}${major}$shared_ext'\n  shlibpath_overrides_runpath=yes\n  shlibpath_var=DYLD_LIBRARY_PATH\n  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'\n\n  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'\n  ;;\n\ndgux*)\n  version_type=linux # correct to gnu/linux during the next big refactor\n  need_lib_prefix=no\n  need_version=no\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  shlibpath_var=LD_LIBRARY_PATH\n  ;;\n\nfreebsd* | dragonfly*)\n  # DragonFly does not have aout.  When/if they implement a new\n  # versioning mechanism, adjust this.\n  if test -x /usr/bin/objformat; then\n    objformat=`/usr/bin/objformat`\n  else\n    case $host_os in\n    freebsd[23].*) objformat=aout ;;\n    *) objformat=elf ;;\n    esac\n  fi\n  version_type=freebsd-$objformat\n  case $version_type in\n    freebsd-elf*)\n      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'\n      need_version=no\n      need_lib_prefix=no\n      ;;\n    freebsd-*)\n      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'\n      need_version=yes\n      ;;\n  esac\n  shlibpath_var=LD_LIBRARY_PATH\n  case $host_os in\n  freebsd2.*)\n    shlibpath_overrides_runpath=yes\n    ;;\n  freebsd3.[01]* | freebsdelf3.[01]*)\n    shlibpath_overrides_runpath=yes\n    hardcode_into_libs=yes\n    ;;\n  freebsd3.[2-9]* | freebsdelf3.[2-9]* | \\\n  freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)\n    shlibpath_overrides_runpath=no\n    hardcode_into_libs=yes\n    ;;\n  *) # from 4.6 on, and DragonFly\n    shlibpath_overrides_runpath=yes\n    hardcode_into_libs=yes\n    ;;\n  esac\n  ;;\n\nhaiku*)\n  version_type=linux # correct to gnu/linux during the next big refactor\n  need_lib_prefix=no\n  need_version=no\n  dynamic_linker=\"$host_os runtime_loader\"\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  shlibpath_var=LIBRARY_PATH\n  shlibpath_overrides_runpath=yes\n  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'\n  hardcode_into_libs=yes\n  ;;\n\nhpux9* | hpux10* | hpux11*)\n  # Give a soname corresponding to the major version so that dld.sl refuses to\n  # link against other versions.\n  version_type=sunos\n  need_lib_prefix=no\n  need_version=no\n  case $host_cpu in\n  ia64*)\n    shrext_cmds='.so'\n    hardcode_into_libs=yes\n    dynamic_linker=\"$host_os dld.so\"\n    shlibpath_var=LD_LIBRARY_PATH\n    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.\n    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n    soname_spec='${libname}${release}${shared_ext}$major'\n    if test \"X$HPUX_IA64_MODE\" = X32; then\n      sys_lib_search_path_spec=\"/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib\"\n    else\n      sys_lib_search_path_spec=\"/usr/lib/hpux64 /usr/local/lib/hpux64\"\n    fi\n    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec\n    ;;\n  hppa*64*)\n    shrext_cmds='.sl'\n    hardcode_into_libs=yes\n    dynamic_linker=\"$host_os dld.sl\"\n    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH\n    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.\n    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n    soname_spec='${libname}${release}${shared_ext}$major'\n    sys_lib_search_path_spec=\"/usr/lib/pa20_64 /usr/ccs/lib/pa20_64\"\n    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec\n    ;;\n  *)\n    shrext_cmds='.sl'\n    dynamic_linker=\"$host_os dld.sl\"\n    shlibpath_var=SHLIB_PATH\n    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH\n    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n    soname_spec='${libname}${release}${shared_ext}$major'\n    ;;\n  esac\n  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...\n  postinstall_cmds='chmod 555 $lib'\n  # or fails outright, so override atomically:\n  install_override_mode=555\n  ;;\n\ninterix[3-9]*)\n  version_type=linux # correct to gnu/linux during the next big refactor\n  need_lib_prefix=no\n  need_version=no\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'\n  shlibpath_var=LD_LIBRARY_PATH\n  shlibpath_overrides_runpath=no\n  hardcode_into_libs=yes\n  ;;\n\nirix5* | irix6* | nonstopux*)\n  case $host_os in\n    nonstopux*) version_type=nonstopux ;;\n    *)\n\tif test \"$lt_cv_prog_gnu_ld\" = yes; then\n\t\tversion_type=linux # correct to gnu/linux during the next big refactor\n\telse\n\t\tversion_type=irix\n\tfi ;;\n  esac\n  need_lib_prefix=no\n  need_version=no\n  soname_spec='${libname}${release}${shared_ext}$major'\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'\n  case $host_os in\n  irix5* | nonstopux*)\n    libsuff= shlibsuff=\n    ;;\n  *)\n    case $LD in # libtool.m4 will add one of these switches to LD\n    *-32|*\"-32 \"|*-melf32bsmip|*\"-melf32bsmip \")\n      libsuff= shlibsuff= libmagic=32-bit;;\n    *-n32|*\"-n32 \"|*-melf32bmipn32|*\"-melf32bmipn32 \")\n      libsuff=32 shlibsuff=N32 libmagic=N32;;\n    *-64|*\"-64 \"|*-melf64bmip|*\"-melf64bmip \")\n      libsuff=64 shlibsuff=64 libmagic=64-bit;;\n    *) libsuff= shlibsuff= libmagic=never-match;;\n    esac\n    ;;\n  esac\n  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH\n  shlibpath_overrides_runpath=no\n  sys_lib_search_path_spec=\"/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}\"\n  sys_lib_dlsearch_path_spec=\"/usr/lib${libsuff} /lib${libsuff}\"\n  hardcode_into_libs=yes\n  ;;\n\n# No shared lib support for Linux oldld, aout, or coff.\nlinux*oldld* | linux*aout* | linux*coff*)\n  dynamic_linker=no\n  ;;\n\n# This must be glibc/ELF.\nlinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)\n  version_type=linux # correct to gnu/linux during the next big refactor\n  need_lib_prefix=no\n  need_version=no\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  finish_cmds='PATH=\"\\$PATH:/sbin\" ldconfig -n $libdir'\n  shlibpath_var=LD_LIBRARY_PATH\n  shlibpath_overrides_runpath=no\n\n  # Some binutils ld are patched to set DT_RUNPATH\n  if ${lt_cv_shlibpath_overrides_runpath+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  lt_cv_shlibpath_overrides_runpath=no\n    save_LDFLAGS=$LDFLAGS\n    save_libdir=$libdir\n    eval \"libdir=/foo; wl=\\\"$lt_prog_compiler_wl_CXX\\\"; \\\n\t LDFLAGS=\\\"\\$LDFLAGS $hardcode_libdir_flag_spec_CXX\\\"\"\n    cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n\nint\nmain ()\n{\n\n  ;\n  return 0;\n}\n_ACEOF\nif ac_fn_cxx_try_link \"$LINENO\"; then :\n  if  ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep \"RUNPATH.*$libdir\" >/dev/null; then :\n  lt_cv_shlibpath_overrides_runpath=yes\nfi\nfi\nrm -f core conftest.err conftest.$ac_objext \\\n    conftest$ac_exeext conftest.$ac_ext\n    LDFLAGS=$save_LDFLAGS\n    libdir=$save_libdir\n\nfi\n\n  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath\n\n  # This implies no fast_install, which is unacceptable.\n  # Some rework will be needed to allow for fast_install\n  # before this can be enabled.\n  hardcode_into_libs=yes\n\n  # Append ld.so.conf contents to the search path\n  if test -f /etc/ld.so.conf; then\n    lt_ld_extra=`awk '/^include / { system(sprintf(\"cd /etc; cat %s 2>/dev/null\", \\$2)); skip = 1; } { if (!skip) print \\$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[\t ]*hwcap[\t ]/d;s/[:,\t]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/\"//g;/^$/d' | tr '\\n' ' '`\n    sys_lib_dlsearch_path_spec=\"/lib /usr/lib $lt_ld_extra\"\n  fi\n\n  # We used to test for /lib/ld.so.1 and disable shared libraries on\n  # powerpc, because MkLinux only supported shared libraries with the\n  # GNU dynamic linker.  Since this was broken with cross compilers,\n  # most powerpc-linux boxes support dynamic linking these days and\n  # people can always --disable-shared, the test was removed, and we\n  # assume the GNU/Linux dynamic linker is in use.\n  dynamic_linker='GNU/Linux ld.so'\n  ;;\n\nnetbsdelf*-gnu)\n  version_type=linux\n  need_lib_prefix=no\n  need_version=no\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  shlibpath_var=LD_LIBRARY_PATH\n  shlibpath_overrides_runpath=no\n  hardcode_into_libs=yes\n  dynamic_linker='NetBSD ld.elf_so'\n  ;;\n\nnetbsd*)\n  version_type=sunos\n  need_lib_prefix=no\n  need_version=no\n  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then\n    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'\n    finish_cmds='PATH=\"\\$PATH:/sbin\" ldconfig -m $libdir'\n    dynamic_linker='NetBSD (a.out) ld.so'\n  else\n    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'\n    soname_spec='${libname}${release}${shared_ext}$major'\n    dynamic_linker='NetBSD ld.elf_so'\n  fi\n  shlibpath_var=LD_LIBRARY_PATH\n  shlibpath_overrides_runpath=yes\n  hardcode_into_libs=yes\n  ;;\n\nnewsos6)\n  version_type=linux # correct to gnu/linux during the next big refactor\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n  shlibpath_var=LD_LIBRARY_PATH\n  shlibpath_overrides_runpath=yes\n  ;;\n\n*nto* | *qnx*)\n  version_type=qnx\n  need_lib_prefix=no\n  need_version=no\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  shlibpath_var=LD_LIBRARY_PATH\n  shlibpath_overrides_runpath=no\n  hardcode_into_libs=yes\n  dynamic_linker='ldqnx.so'\n  ;;\n\nopenbsd*)\n  version_type=sunos\n  sys_lib_dlsearch_path_spec=\"/usr/lib\"\n  need_lib_prefix=no\n  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.\n  case $host_os in\n    openbsd3.3 | openbsd3.3.*)\tneed_version=yes ;;\n    *)\t\t\t\tneed_version=no  ;;\n  esac\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'\n  finish_cmds='PATH=\"\\$PATH:/sbin\" ldconfig -m $libdir'\n  shlibpath_var=LD_LIBRARY_PATH\n  if test -z \"`echo __ELF__ | $CC -E - | $GREP __ELF__`\" || test \"$host_os-$host_cpu\" = \"openbsd2.8-powerpc\"; then\n    case $host_os in\n      openbsd2.[89] | openbsd2.[89].*)\n\tshlibpath_overrides_runpath=no\n\t;;\n      *)\n\tshlibpath_overrides_runpath=yes\n\t;;\n      esac\n  else\n    shlibpath_overrides_runpath=yes\n  fi\n  ;;\n\nos2*)\n  libname_spec='$name'\n  shrext_cmds=\".dll\"\n  need_lib_prefix=no\n  library_names_spec='$libname${shared_ext} $libname.a'\n  dynamic_linker='OS/2 ld.exe'\n  shlibpath_var=LIBPATH\n  ;;\n\nosf3* | osf4* | osf5*)\n  version_type=osf\n  need_lib_prefix=no\n  need_version=no\n  soname_spec='${libname}${release}${shared_ext}$major'\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n  shlibpath_var=LD_LIBRARY_PATH\n  sys_lib_search_path_spec=\"/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib\"\n  sys_lib_dlsearch_path_spec=\"$sys_lib_search_path_spec\"\n  ;;\n\nrdos*)\n  dynamic_linker=no\n  ;;\n\nsolaris*)\n  version_type=linux # correct to gnu/linux during the next big refactor\n  need_lib_prefix=no\n  need_version=no\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  shlibpath_var=LD_LIBRARY_PATH\n  shlibpath_overrides_runpath=yes\n  hardcode_into_libs=yes\n  # ldd complains unless libraries are executable\n  postinstall_cmds='chmod +x $lib'\n  ;;\n\nsunos4*)\n  version_type=sunos\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'\n  finish_cmds='PATH=\"\\$PATH:/usr/etc\" ldconfig $libdir'\n  shlibpath_var=LD_LIBRARY_PATH\n  shlibpath_overrides_runpath=yes\n  if test \"$with_gnu_ld\" = yes; then\n    need_lib_prefix=no\n  fi\n  need_version=yes\n  ;;\n\nsysv4 | sysv4.3*)\n  version_type=linux # correct to gnu/linux during the next big refactor\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  shlibpath_var=LD_LIBRARY_PATH\n  case $host_vendor in\n    sni)\n      shlibpath_overrides_runpath=no\n      need_lib_prefix=no\n      runpath_var=LD_RUN_PATH\n      ;;\n    siemens)\n      need_lib_prefix=no\n      ;;\n    motorola)\n      need_lib_prefix=no\n      need_version=no\n      shlibpath_overrides_runpath=no\n      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'\n      ;;\n  esac\n  ;;\n\nsysv4*MP*)\n  if test -d /usr/nec ;then\n    version_type=linux # correct to gnu/linux during the next big refactor\n    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'\n    soname_spec='$libname${shared_ext}.$major'\n    shlibpath_var=LD_LIBRARY_PATH\n  fi\n  ;;\n\nsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)\n  version_type=freebsd-elf\n  need_lib_prefix=no\n  need_version=no\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  shlibpath_var=LD_LIBRARY_PATH\n  shlibpath_overrides_runpath=yes\n  hardcode_into_libs=yes\n  if test \"$with_gnu_ld\" = yes; then\n    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'\n  else\n    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'\n    case $host_os in\n      sco3.2v5*)\n        sys_lib_search_path_spec=\"$sys_lib_search_path_spec /lib\"\n\t;;\n    esac\n  fi\n  sys_lib_dlsearch_path_spec='/usr/lib'\n  ;;\n\ntpf*)\n  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.\n  version_type=linux # correct to gnu/linux during the next big refactor\n  need_lib_prefix=no\n  need_version=no\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n  shlibpath_var=LD_LIBRARY_PATH\n  shlibpath_overrides_runpath=no\n  hardcode_into_libs=yes\n  ;;\n\nuts4*)\n  version_type=linux # correct to gnu/linux during the next big refactor\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  shlibpath_var=LD_LIBRARY_PATH\n  ;;\n\n*)\n  dynamic_linker=no\n  ;;\nesac\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $dynamic_linker\" >&5\n$as_echo \"$dynamic_linker\" >&6; }\ntest \"$dynamic_linker\" = no && can_build_shared=no\n\nvariables_saved_for_relink=\"PATH $shlibpath_var $runpath_var\"\nif test \"$GCC\" = yes; then\n  variables_saved_for_relink=\"$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH\"\nfi\n\nif test \"${lt_cv_sys_lib_search_path_spec+set}\" = set; then\n  sys_lib_search_path_spec=\"$lt_cv_sys_lib_search_path_spec\"\nfi\nif test \"${lt_cv_sys_lib_dlsearch_path_spec+set}\" = set; then\n  sys_lib_dlsearch_path_spec=\"$lt_cv_sys_lib_dlsearch_path_spec\"\nfi\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n    { $as_echo \"$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs\" >&5\n$as_echo_n \"checking how to hardcode library paths into programs... \" >&6; }\nhardcode_action_CXX=\nif test -n \"$hardcode_libdir_flag_spec_CXX\" ||\n   test -n \"$runpath_var_CXX\" ||\n   test \"X$hardcode_automatic_CXX\" = \"Xyes\" ; then\n\n  # We can hardcode non-existent directories.\n  if test \"$hardcode_direct_CXX\" != no &&\n     # If the only mechanism to avoid hardcoding is shlibpath_var, we\n     # have to relink, otherwise we might link with an installed library\n     # when we should be linking with a yet-to-be-installed one\n     ## test \"$_LT_TAGVAR(hardcode_shlibpath_var, CXX)\" != no &&\n     test \"$hardcode_minus_L_CXX\" != no; then\n    # Linking always hardcodes the temporary library directory.\n    hardcode_action_CXX=relink\n  else\n    # We can link without hardcoding, and we can hardcode nonexisting dirs.\n    hardcode_action_CXX=immediate\n  fi\nelse\n  # We cannot hardcode anything, or else we can only hardcode existing\n  # directories.\n  hardcode_action_CXX=unsupported\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX\" >&5\n$as_echo \"$hardcode_action_CXX\" >&6; }\n\nif test \"$hardcode_action_CXX\" = relink ||\n   test \"$inherit_rpath_CXX\" = yes; then\n  # Fast installation is not supported\n  enable_fast_install=no\nelif test \"$shlibpath_overrides_runpath\" = yes ||\n     test \"$enable_shared\" = no; then\n  # Fast installation is not necessary\n  enable_fast_install=needless\nfi\n\n\n\n\n\n\n\n  fi # test -n \"$compiler\"\n\n  CC=$lt_save_CC\n  CFLAGS=$lt_save_CFLAGS\n  LDCXX=$LD\n  LD=$lt_save_LD\n  GCC=$lt_save_GCC\n  with_gnu_ld=$lt_save_with_gnu_ld\n  lt_cv_path_LDCXX=$lt_cv_path_LD\n  lt_cv_path_LD=$lt_save_path_LD\n  lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld\n  lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld\nfi # test \"$_lt_caught_CXX_error\" != yes\n\nac_ext=c\nac_cpp='$CPP $CPPFLAGS'\nac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'\nac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'\nac_compiler_gnu=$ac_cv_c_compiler_gnu\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n        ac_config_commands=\"$ac_config_commands libtool\"\n\n\n\n\n# Only expand once:\n\n\n# Find a good install program.  We prefer a C program (faster),\n# so one script is as good as another.  But avoid the broken or\n# incompatible versions:\n# SysV /etc/install, /usr/sbin/install\n# SunOS /usr/etc/install\n# IRIX /sbin/install\n# AIX /bin/install\n# AmigaOS /C/install, which installs bootblocks on floppy discs\n# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag\n# AFS /usr/afsws/bin/install, which mishandles nonexistent args\n# SVR4 /usr/ucb/install, which tries to use the nonexistent group \"staff\"\n# OS/2's system install, which has a completely different semantic\n# ./install, which can be erroneously created by make from ./install.sh.\n# Reject install programs that cannot install multiple files.\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install\" >&5\n$as_echo_n \"checking for a BSD-compatible install... \" >&6; }\nif test -z \"$INSTALL\"; then\nif ${ac_cv_path_install+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    # Account for people who put trailing slashes in PATH elements.\ncase $as_dir/ in #((\n  ./ | .// | /[cC]/* | \\\n  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \\\n  ?:[\\\\/]os2[\\\\/]install[\\\\/]* | ?:[\\\\/]OS2[\\\\/]INSTALL[\\\\/]* | \\\n  /usr/ucb/* ) ;;\n  *)\n    # OSF1 and SCO ODT 3.0 have their own names for install.\n    # Don't use installbsd from OSF since it installs stuff as root\n    # by default.\n    for ac_prog in ginstall scoinst install; do\n      for ac_exec_ext in '' $ac_executable_extensions; do\n\tif as_fn_executable_p \"$as_dir/$ac_prog$ac_exec_ext\"; then\n\t  if test $ac_prog = install &&\n\t    grep dspmsg \"$as_dir/$ac_prog$ac_exec_ext\" >/dev/null 2>&1; then\n\t    # AIX install.  It has an incompatible calling convention.\n\t    :\n\t  elif test $ac_prog = install &&\n\t    grep pwplus \"$as_dir/$ac_prog$ac_exec_ext\" >/dev/null 2>&1; then\n\t    # program-specific install script used by HP pwplus--don't use.\n\t    :\n\t  else\n\t    rm -rf conftest.one conftest.two conftest.dir\n\t    echo one > conftest.one\n\t    echo two > conftest.two\n\t    mkdir conftest.dir\n\t    if \"$as_dir/$ac_prog$ac_exec_ext\" -c conftest.one conftest.two \"`pwd`/conftest.dir\" &&\n\t      test -s conftest.one && test -s conftest.two &&\n\t      test -s conftest.dir/conftest.one &&\n\t      test -s conftest.dir/conftest.two\n\t    then\n\t      ac_cv_path_install=\"$as_dir/$ac_prog$ac_exec_ext -c\"\n\t      break 3\n\t    fi\n\t  fi\n\tfi\n      done\n    done\n    ;;\nesac\n\n  done\nIFS=$as_save_IFS\n\nrm -rf conftest.one conftest.two conftest.dir\n\nfi\n  if test \"${ac_cv_path_install+set}\" = set; then\n    INSTALL=$ac_cv_path_install\n  else\n    # As a last resort, use the slow shell script.  Don't cache a\n    # value for INSTALL within a source directory, because that will\n    # break other packages using the cache if that directory is\n    # removed, or if the value is a relative name.\n    INSTALL=$ac_install_sh\n  fi\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $INSTALL\" >&5\n$as_echo \"$INSTALL\" >&6; }\n\n# Use test -z because SunOS4 sh mishandles braces in ${var-val}.\n# It thinks the first close brace ends the variable substitution.\ntest -z \"$INSTALL_PROGRAM\" && INSTALL_PROGRAM='${INSTALL}'\n\ntest -z \"$INSTALL_SCRIPT\" && INSTALL_SCRIPT='${INSTALL}'\n\ntest -z \"$INSTALL_DATA\" && INSTALL_DATA='${INSTALL} -m 644'\n\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking whether ln -s works\" >&5\n$as_echo_n \"checking whether ln -s works... \" >&6; }\nLN_S=$as_ln_s\nif test \"$LN_S\" = \"ln -s\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: yes\" >&5\n$as_echo \"yes\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no, using $LN_S\" >&5\n$as_echo \"no, using $LN_S\" >&6; }\nfi\n\n# Extract the first word of \"ar\", so it can be a program name with args.\nset dummy ar; ac_word=$2\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $ac_word\" >&5\n$as_echo_n \"checking for $ac_word... \" >&6; }\nif ${ac_cv_path_AR+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  case $AR in\n  [\\\\/]* | ?:[\\\\/]*)\n  ac_cv_path_AR=\"$AR\" # Let the user override the test with a path.\n  ;;\n  *)\n  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    for ac_exec_ext in '' $ac_executable_extensions; do\n  if as_fn_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_path_AR=\"$as_dir/$ac_word$ac_exec_ext\"\n    $as_echo \"$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\n  done\nIFS=$as_save_IFS\n\n  test -z \"$ac_cv_path_AR\" && ac_cv_path_AR=\"no\"\n  ;;\nesac\nfi\nAR=$ac_cv_path_AR\nif test -n \"$AR\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $AR\" >&5\n$as_echo \"$AR\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\nfi\n\n\nif [ $AR = \"no\" ] ; then\n    as_fn_error $? \"\\\"Could not find ar - needed to create a library\\\"\" \"$LINENO\" 5\nfi\n\n { $as_echo \"$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian\" >&5\n$as_echo_n \"checking whether byte ordering is bigendian... \" >&6; }\nif ${ac_cv_c_bigendian+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  ac_cv_c_bigendian=unknown\n    # See if we're dealing with a universal compiler.\n    cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n#ifndef __APPLE_CC__\n\t       not a universal capable compiler\n\t     #endif\n\t     typedef int dummy;\n\n_ACEOF\nif ac_fn_c_try_compile \"$LINENO\"; then :\n\n\t# Check for potential -arch flags.  It is not universal unless\n\t# there are at least two -arch flags with different values.\n\tac_arch=\n\tac_prev=\n\tfor ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do\n\t if test -n \"$ac_prev\"; then\n\t   case $ac_word in\n\t     i?86 | x86_64 | ppc | ppc64)\n\t       if test -z \"$ac_arch\" || test \"$ac_arch\" = \"$ac_word\"; then\n\t\t ac_arch=$ac_word\n\t       else\n\t\t ac_cv_c_bigendian=universal\n\t\t break\n\t       fi\n\t       ;;\n\t   esac\n\t   ac_prev=\n\t elif test \"x$ac_word\" = \"x-arch\"; then\n\t   ac_prev=arch\n\t fi\n       done\nfi\nrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext\n    if test $ac_cv_c_bigendian = unknown; then\n      # See if sys/param.h defines the BYTE_ORDER macro.\n      cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n#include <sys/types.h>\n\t     #include <sys/param.h>\n\nint\nmain ()\n{\n#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \\\n\t\t     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \\\n\t\t     && LITTLE_ENDIAN)\n\t      bogus endian macros\n\t     #endif\n\n  ;\n  return 0;\n}\n_ACEOF\nif ac_fn_c_try_compile \"$LINENO\"; then :\n  # It does; now see whether it defined to BIG_ENDIAN or not.\n\t cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n#include <sys/types.h>\n\t\t#include <sys/param.h>\n\nint\nmain ()\n{\n#if BYTE_ORDER != BIG_ENDIAN\n\t\t not big endian\n\t\t#endif\n\n  ;\n  return 0;\n}\n_ACEOF\nif ac_fn_c_try_compile \"$LINENO\"; then :\n  ac_cv_c_bigendian=yes\nelse\n  ac_cv_c_bigendian=no\nfi\nrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext\nfi\nrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext\n    fi\n    if test $ac_cv_c_bigendian = unknown; then\n      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).\n      cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n#include <limits.h>\n\nint\nmain ()\n{\n#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)\n\t      bogus endian macros\n\t     #endif\n\n  ;\n  return 0;\n}\n_ACEOF\nif ac_fn_c_try_compile \"$LINENO\"; then :\n  # It does; now see whether it defined to _BIG_ENDIAN or not.\n\t cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n#include <limits.h>\n\nint\nmain ()\n{\n#ifndef _BIG_ENDIAN\n\t\t not big endian\n\t\t#endif\n\n  ;\n  return 0;\n}\n_ACEOF\nif ac_fn_c_try_compile \"$LINENO\"; then :\n  ac_cv_c_bigendian=yes\nelse\n  ac_cv_c_bigendian=no\nfi\nrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext\nfi\nrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext\n    fi\n    if test $ac_cv_c_bigendian = unknown; then\n      # Compile a test program.\n      if test \"$cross_compiling\" = yes; then :\n  # Try to guess by grepping values from an object file.\n\t cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\nshort int ascii_mm[] =\n\t\t  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };\n\t\tshort int ascii_ii[] =\n\t\t  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };\n\t\tint use_ascii (int i) {\n\t\t  return ascii_mm[i] + ascii_ii[i];\n\t\t}\n\t\tshort int ebcdic_ii[] =\n\t\t  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };\n\t\tshort int ebcdic_mm[] =\n\t\t  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };\n\t\tint use_ebcdic (int i) {\n\t\t  return ebcdic_mm[i] + ebcdic_ii[i];\n\t\t}\n\t\textern int foo;\n\nint\nmain ()\n{\nreturn use_ascii (foo) == use_ebcdic (foo);\n  ;\n  return 0;\n}\n_ACEOF\nif ac_fn_c_try_compile \"$LINENO\"; then :\n  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then\n\t      ac_cv_c_bigendian=yes\n\t    fi\n\t    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then\n\t      if test \"$ac_cv_c_bigendian\" = unknown; then\n\t\tac_cv_c_bigendian=no\n\t      else\n\t\t# finding both strings is unlikely to happen, but who knows?\n\t\tac_cv_c_bigendian=unknown\n\t      fi\n\t    fi\nfi\nrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext\nelse\n  cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n$ac_includes_default\nint\nmain ()\n{\n\n\t     /* Are we little or big endian?  From Harbison&Steele.  */\n\t     union\n\t     {\n\t       long int l;\n\t       char c[sizeof (long int)];\n\t     } u;\n\t     u.l = 1;\n\t     return u.c[sizeof (long int) - 1] == 1;\n\n  ;\n  return 0;\n}\n_ACEOF\nif ac_fn_c_try_run \"$LINENO\"; then :\n  ac_cv_c_bigendian=no\nelse\n  ac_cv_c_bigendian=yes\nfi\nrm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \\\n  conftest.$ac_objext conftest.beam conftest.$ac_ext\nfi\n\n    fi\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian\" >&5\n$as_echo \"$ac_cv_c_bigendian\" >&6; }\n case $ac_cv_c_bigendian in #(\n   yes)\n     $as_echo \"#define WORDS_BIGENDIAN 1\" >>confdefs.h\n;; #(\n   no)\n      ;; #(\n   universal)\n\n$as_echo \"#define AC_APPLE_UNIVERSAL_BUILD 1\" >>confdefs.h\n\n     ;; #(\n   *)\n     as_fn_error $? \"unknown endianness\n presetting ac_cv_c_bigendian=no (or yes) will help\" \"$LINENO\" 5 ;;\n esac\n\n\n\nhave_alsa=no\nif test \"x$with_alsa\" != \"xno\"; then\n    { $as_echo \"$as_me:${as_lineno-$LINENO}: checking for snd_pcm_open in -lasound\" >&5\n$as_echo_n \"checking for snd_pcm_open in -lasound... \" >&6; }\nif ${ac_cv_lib_asound_snd_pcm_open+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  ac_check_lib_save_LIBS=$LIBS\nLIBS=\"-lasound  $LIBS\"\ncat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n\n/* Override any GCC internal prototype to avoid an error.\n   Use char because int might match the return type of a GCC\n   builtin and then its argument prototype would still apply.  */\n#ifdef __cplusplus\nextern \"C\"\n#endif\nchar snd_pcm_open ();\nint\nmain ()\n{\nreturn snd_pcm_open ();\n  ;\n  return 0;\n}\n_ACEOF\nif ac_fn_c_try_link \"$LINENO\"; then :\n  ac_cv_lib_asound_snd_pcm_open=yes\nelse\n  ac_cv_lib_asound_snd_pcm_open=no\nfi\nrm -f core conftest.err conftest.$ac_objext \\\n    conftest$ac_exeext conftest.$ac_ext\nLIBS=$ac_check_lib_save_LIBS\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_asound_snd_pcm_open\" >&5\n$as_echo \"$ac_cv_lib_asound_snd_pcm_open\" >&6; }\nif test \"x$ac_cv_lib_asound_snd_pcm_open\" = xyes; then :\n  have_alsa=yes\nelse\n  have_alsa=no\nfi\n\nfi\nhave_asihpi=no\nif test \"x$with_asihpi\" != \"xno\"; then\n    { $as_echo \"$as_me:${as_lineno-$LINENO}: checking for HPI_SubSysCreate in -lhpi\" >&5\n$as_echo_n \"checking for HPI_SubSysCreate in -lhpi... \" >&6; }\nif ${ac_cv_lib_hpi_HPI_SubSysCreate+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  ac_check_lib_save_LIBS=$LIBS\nLIBS=\"-lhpi -lm $LIBS\"\ncat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n\n/* Override any GCC internal prototype to avoid an error.\n   Use char because int might match the return type of a GCC\n   builtin and then its argument prototype would still apply.  */\n#ifdef __cplusplus\nextern \"C\"\n#endif\nchar HPI_SubSysCreate ();\nint\nmain ()\n{\nreturn HPI_SubSysCreate ();\n  ;\n  return 0;\n}\n_ACEOF\nif ac_fn_c_try_link \"$LINENO\"; then :\n  ac_cv_lib_hpi_HPI_SubSysCreate=yes\nelse\n  ac_cv_lib_hpi_HPI_SubSysCreate=no\nfi\nrm -f core conftest.err conftest.$ac_objext \\\n    conftest$ac_exeext conftest.$ac_ext\nLIBS=$ac_check_lib_save_LIBS\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hpi_HPI_SubSysCreate\" >&5\n$as_echo \"$ac_cv_lib_hpi_HPI_SubSysCreate\" >&6; }\nif test \"x$ac_cv_lib_hpi_HPI_SubSysCreate\" = xyes; then :\n  have_asihpi=yes\nelse\n  have_asihpi=no\nfi\n\nfi\nhave_libossaudio=no\nhave_oss=no\nif test \"x$with_oss\" != \"xno\"; then\n    for ac_header in sys/soundcard.h linux/soundcard.h machine/soundcard.h\ndo :\n  as_ac_Header=`$as_echo \"ac_cv_header_$ac_header\" | $as_tr_sh`\nac_fn_c_check_header_mongrel \"$LINENO\" \"$ac_header\" \"$as_ac_Header\" \"$ac_includes_default\"\nif eval test \\\"x\\$\"$as_ac_Header\"\\\" = x\"yes\"; then :\n  cat >>confdefs.h <<_ACEOF\n#define `$as_echo \"HAVE_$ac_header\" | $as_tr_cpp` 1\n_ACEOF\n have_oss=yes\nfi\n\ndone\n\n    if test \"x$have_oss\" = \"xyes\"; then\n        { $as_echo \"$as_me:${as_lineno-$LINENO}: checking for _oss_ioctl in -lossaudio\" >&5\n$as_echo_n \"checking for _oss_ioctl in -lossaudio... \" >&6; }\nif ${ac_cv_lib_ossaudio__oss_ioctl+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  ac_check_lib_save_LIBS=$LIBS\nLIBS=\"-lossaudio  $LIBS\"\ncat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n\n/* Override any GCC internal prototype to avoid an error.\n   Use char because int might match the return type of a GCC\n   builtin and then its argument prototype would still apply.  */\n#ifdef __cplusplus\nextern \"C\"\n#endif\nchar _oss_ioctl ();\nint\nmain ()\n{\nreturn _oss_ioctl ();\n  ;\n  return 0;\n}\n_ACEOF\nif ac_fn_c_try_link \"$LINENO\"; then :\n  ac_cv_lib_ossaudio__oss_ioctl=yes\nelse\n  ac_cv_lib_ossaudio__oss_ioctl=no\nfi\nrm -f core conftest.err conftest.$ac_objext \\\n    conftest$ac_exeext conftest.$ac_ext\nLIBS=$ac_check_lib_save_LIBS\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossaudio__oss_ioctl\" >&5\n$as_echo \"$ac_cv_lib_ossaudio__oss_ioctl\" >&6; }\nif test \"x$ac_cv_lib_ossaudio__oss_ioctl\" = xyes; then :\n  have_libossaudio=yes\nelse\n  have_libossaudio=no\nfi\n\n    fi\nfi\nhave_jack=no\nif test \"x$with_jack\" != \"xno\"; then\n\n\n\n\n\n\n\nif test \"x$ac_cv_env_PKG_CONFIG_set\" != \"xset\"; then\n\tif test -n \"$ac_tool_prefix\"; then\n  # Extract the first word of \"${ac_tool_prefix}pkg-config\", so it can be a program name with args.\nset dummy ${ac_tool_prefix}pkg-config; ac_word=$2\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $ac_word\" >&5\n$as_echo_n \"checking for $ac_word... \" >&6; }\nif ${ac_cv_path_PKG_CONFIG+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  case $PKG_CONFIG in\n  [\\\\/]* | ?:[\\\\/]*)\n  ac_cv_path_PKG_CONFIG=\"$PKG_CONFIG\" # Let the user override the test with a path.\n  ;;\n  *)\n  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    for ac_exec_ext in '' $ac_executable_extensions; do\n  if as_fn_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_path_PKG_CONFIG=\"$as_dir/$ac_word$ac_exec_ext\"\n    $as_echo \"$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\n  done\nIFS=$as_save_IFS\n\n  ;;\nesac\nfi\nPKG_CONFIG=$ac_cv_path_PKG_CONFIG\nif test -n \"$PKG_CONFIG\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG\" >&5\n$as_echo \"$PKG_CONFIG\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\nfi\n\n\nfi\nif test -z \"$ac_cv_path_PKG_CONFIG\"; then\n  ac_pt_PKG_CONFIG=$PKG_CONFIG\n  # Extract the first word of \"pkg-config\", so it can be a program name with args.\nset dummy pkg-config; ac_word=$2\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $ac_word\" >&5\n$as_echo_n \"checking for $ac_word... \" >&6; }\nif ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  case $ac_pt_PKG_CONFIG in\n  [\\\\/]* | ?:[\\\\/]*)\n  ac_cv_path_ac_pt_PKG_CONFIG=\"$ac_pt_PKG_CONFIG\" # Let the user override the test with a path.\n  ;;\n  *)\n  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    for ac_exec_ext in '' $ac_executable_extensions; do\n  if as_fn_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_path_ac_pt_PKG_CONFIG=\"$as_dir/$ac_word$ac_exec_ext\"\n    $as_echo \"$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\n  done\nIFS=$as_save_IFS\n\n  ;;\nesac\nfi\nac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG\nif test -n \"$ac_pt_PKG_CONFIG\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG\" >&5\n$as_echo \"$ac_pt_PKG_CONFIG\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\nfi\n\n  if test \"x$ac_pt_PKG_CONFIG\" = x; then\n    PKG_CONFIG=\"\"\n  else\n    case $cross_compiling:$ac_tool_warned in\nyes:)\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet\" >&5\n$as_echo \"$as_me: WARNING: using cross tools not prefixed with host triplet\" >&2;}\nac_tool_warned=yes ;;\nesac\n    PKG_CONFIG=$ac_pt_PKG_CONFIG\n  fi\nelse\n  PKG_CONFIG=\"$ac_cv_path_PKG_CONFIG\"\nfi\n\nfi\nif test -n \"$PKG_CONFIG\"; then\n\t_pkg_min_version=0.9.0\n\t{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version\" >&5\n$as_echo_n \"checking pkg-config is at least version $_pkg_min_version... \" >&6; }\n\tif $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then\n\t\t{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: yes\" >&5\n$as_echo \"yes\" >&6; }\n\telse\n\t\t{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\n\t\tPKG_CONFIG=\"\"\n\tfi\nfi\n\npkg_failed=no\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for JACK\" >&5\n$as_echo_n \"checking for JACK... \" >&6; }\n\nif test -n \"$JACK_CFLAGS\"; then\n    pkg_cv_JACK_CFLAGS=\"$JACK_CFLAGS\"\n elif test -n \"$PKG_CONFIG\"; then\n    if test -n \"$PKG_CONFIG\" && \\\n    { { $as_echo \"$as_me:${as_lineno-$LINENO}: \\$PKG_CONFIG --exists --print-errors \\\"jack\\\"\"; } >&5\n  ($PKG_CONFIG --exists --print-errors \"jack\") 2>&5\n  ac_status=$?\n  $as_echo \"$as_me:${as_lineno-$LINENO}: \\$? = $ac_status\" >&5\n  test $ac_status = 0; }; then\n  pkg_cv_JACK_CFLAGS=`$PKG_CONFIG --cflags \"jack\" 2>/dev/null`\n\t\t      test \"x$?\" != \"x0\" && pkg_failed=yes\nelse\n  pkg_failed=yes\nfi\n else\n    pkg_failed=untried\nfi\nif test -n \"$JACK_LIBS\"; then\n    pkg_cv_JACK_LIBS=\"$JACK_LIBS\"\n elif test -n \"$PKG_CONFIG\"; then\n    if test -n \"$PKG_CONFIG\" && \\\n    { { $as_echo \"$as_me:${as_lineno-$LINENO}: \\$PKG_CONFIG --exists --print-errors \\\"jack\\\"\"; } >&5\n  ($PKG_CONFIG --exists --print-errors \"jack\") 2>&5\n  ac_status=$?\n  $as_echo \"$as_me:${as_lineno-$LINENO}: \\$? = $ac_status\" >&5\n  test $ac_status = 0; }; then\n  pkg_cv_JACK_LIBS=`$PKG_CONFIG --libs \"jack\" 2>/dev/null`\n\t\t      test \"x$?\" != \"x0\" && pkg_failed=yes\nelse\n  pkg_failed=yes\nfi\n else\n    pkg_failed=untried\nfi\n\n\n\nif test $pkg_failed = yes; then\n   \t{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\n\nif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then\n        _pkg_short_errors_supported=yes\nelse\n        _pkg_short_errors_supported=no\nfi\n        if test $_pkg_short_errors_supported = yes; then\n\t        JACK_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs \"jack\" 2>&1`\n        else\n\t        JACK_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs \"jack\" 2>&1`\n        fi\n\t# Put the nasty error message in config.log where it belongs\n\techo \"$JACK_PKG_ERRORS\" >&5\n\n\thave_jack=no\nelif test $pkg_failed = untried; then\n     \t{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\n\thave_jack=no\nelse\n\tJACK_CFLAGS=$pkg_cv_JACK_CFLAGS\n\tJACK_LIBS=$pkg_cv_JACK_LIBS\n        { $as_echo \"$as_me:${as_lineno-$LINENO}: result: yes\" >&5\n$as_echo \"yes\" >&6; }\n\thave_jack=yes\nfi\nfi\n\n\n\n# The cast to long int works around a bug in the HP C Compiler\n# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects\n# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.\n# This bug is HP SR number 8606223364.\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking size of short\" >&5\n$as_echo_n \"checking size of short... \" >&6; }\nif ${ac_cv_sizeof_short+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if ac_fn_c_compute_int \"$LINENO\" \"(long int) (sizeof (short))\" \"ac_cv_sizeof_short\"        \"$ac_includes_default\"; then :\n\nelse\n  if test \"$ac_cv_type_short\" = yes; then\n     { { $as_echo \"$as_me:${as_lineno-$LINENO}: error: in \\`$ac_pwd':\" >&5\n$as_echo \"$as_me: error: in \\`$ac_pwd':\" >&2;}\nas_fn_error 77 \"cannot compute sizeof (short)\nSee \\`config.log' for more details\" \"$LINENO\" 5; }\n   else\n     ac_cv_sizeof_short=0\n   fi\nfi\n\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short\" >&5\n$as_echo \"$ac_cv_sizeof_short\" >&6; }\n\n\n\ncat >>confdefs.h <<_ACEOF\n#define SIZEOF_SHORT $ac_cv_sizeof_short\n_ACEOF\n\n\n# The cast to long int works around a bug in the HP C Compiler\n# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects\n# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.\n# This bug is HP SR number 8606223364.\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking size of int\" >&5\n$as_echo_n \"checking size of int... \" >&6; }\nif ${ac_cv_sizeof_int+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if ac_fn_c_compute_int \"$LINENO\" \"(long int) (sizeof (int))\" \"ac_cv_sizeof_int\"        \"$ac_includes_default\"; then :\n\nelse\n  if test \"$ac_cv_type_int\" = yes; then\n     { { $as_echo \"$as_me:${as_lineno-$LINENO}: error: in \\`$ac_pwd':\" >&5\n$as_echo \"$as_me: error: in \\`$ac_pwd':\" >&2;}\nas_fn_error 77 \"cannot compute sizeof (int)\nSee \\`config.log' for more details\" \"$LINENO\" 5; }\n   else\n     ac_cv_sizeof_int=0\n   fi\nfi\n\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int\" >&5\n$as_echo \"$ac_cv_sizeof_int\" >&6; }\n\n\n\ncat >>confdefs.h <<_ACEOF\n#define SIZEOF_INT $ac_cv_sizeof_int\n_ACEOF\n\n\n# The cast to long int works around a bug in the HP C Compiler\n# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects\n# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.\n# This bug is HP SR number 8606223364.\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking size of long\" >&5\n$as_echo_n \"checking size of long... \" >&6; }\nif ${ac_cv_sizeof_long+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if ac_fn_c_compute_int \"$LINENO\" \"(long int) (sizeof (long))\" \"ac_cv_sizeof_long\"        \"$ac_includes_default\"; then :\n\nelse\n  if test \"$ac_cv_type_long\" = yes; then\n     { { $as_echo \"$as_me:${as_lineno-$LINENO}: error: in \\`$ac_pwd':\" >&5\n$as_echo \"$as_me: error: in \\`$ac_pwd':\" >&2;}\nas_fn_error 77 \"cannot compute sizeof (long)\nSee \\`config.log' for more details\" \"$LINENO\" 5; }\n   else\n     ac_cv_sizeof_long=0\n   fi\nfi\n\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long\" >&5\n$as_echo \"$ac_cv_sizeof_long\" >&6; }\n\n\n\ncat >>confdefs.h <<_ACEOF\n#define SIZEOF_LONG $ac_cv_sizeof_long\n_ACEOF\n\n\n\nsave_LIBS=\"${LIBS}\"\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt\" >&5\n$as_echo_n \"checking for clock_gettime in -lrt... \" >&6; }\nif ${ac_cv_lib_rt_clock_gettime+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  ac_check_lib_save_LIBS=$LIBS\nLIBS=\"-lrt  $LIBS\"\ncat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n\n/* Override any GCC internal prototype to avoid an error.\n   Use char because int might match the return type of a GCC\n   builtin and then its argument prototype would still apply.  */\n#ifdef __cplusplus\nextern \"C\"\n#endif\nchar clock_gettime ();\nint\nmain ()\n{\nreturn clock_gettime ();\n  ;\n  return 0;\n}\n_ACEOF\nif ac_fn_c_try_link \"$LINENO\"; then :\n  ac_cv_lib_rt_clock_gettime=yes\nelse\n  ac_cv_lib_rt_clock_gettime=no\nfi\nrm -f core conftest.err conftest.$ac_objext \\\n    conftest$ac_exeext conftest.$ac_ext\nLIBS=$ac_check_lib_save_LIBS\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime\" >&5\n$as_echo \"$ac_cv_lib_rt_clock_gettime\" >&6; }\nif test \"x$ac_cv_lib_rt_clock_gettime\" = xyes; then :\n  rt_libs=\" -lrt\"\nfi\n\nLIBS=\"${LIBS}${rt_libs}\"\nDLL_LIBS=\"${DLL_LIBS}${rt_libs}\"\nfor ac_func in clock_gettime nanosleep\ndo :\n  as_ac_var=`$as_echo \"ac_cv_func_$ac_func\" | $as_tr_sh`\nac_fn_c_check_func \"$LINENO\" \"$ac_func\" \"$as_ac_var\"\nif eval test \\\"x\\$\"$as_ac_var\"\\\" = x\"yes\"; then :\n  cat >>confdefs.h <<_ACEOF\n#define `$as_echo \"HAVE_$ac_func\" | $as_tr_cpp` 1\n_ACEOF\n\nfi\ndone\n\nLIBS=\"${save_LIBS}\"\n\nLT_CURRENT=2\nLT_REVISION=0\nLT_AGE=0\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nif ( echo \"${host_os}\" | grep ^darwin >> /dev/null ) &&\n      [ \"$enable_mac_universal\" = \"yes\" ] &&\n       [ \"$enable_mac_debug\" != \"yes\" ] ; then\n   CFLAGS=\"-O2 -Wall -pedantic -pipe -fPIC -DNDEBUG\"\nelse\n   CFLAGS=${CFLAGS:-\"-g -O2 -Wall -pedantic -pipe -fPIC\"}\nfi\n\nif [ $ac_cv_c_bigendian = \"yes\" ] ; then\n   CFLAGS=\"$CFLAGS -DPA_BIG_ENDIAN\"\nelse\n   CFLAGS=\"$CFLAGS -DPA_LITTLE_ENDIAN\"\nfi\n\nadd_objects()\n{\n    for o in $@; do\n        test \"${OTHER_OBJS#*${o}*}\" = \"${OTHER_OBJS}\" && OTHER_OBJS=\"$OTHER_OBJS $o\"\n    done\n}\n\nINCLUDES=portaudio.h\n\nCFLAGS=\"$CFLAGS -I\\$(top_srcdir)/include -I\\$(top_srcdir)/src/common\"\n\ncase \"${host_os}\" in\n  darwin* )\n\n        $as_echo \"#define PA_USE_COREAUDIO 1\" >>confdefs.h\n\n\n        CFLAGS=\"$CFLAGS -I\\$(top_srcdir)/src/os/unix -Wno-deprecated -Werror\"\n        LIBS=\"-framework CoreAudio -framework AudioToolbox -framework AudioUnit -framework CoreFoundation -framework CoreServices\"\n\n        if test \"x$enable_mac_universal\" = \"xyes\" ; then\n           case `xcodebuild -version | sed -n 's/Xcode \\(.*\\)/\\1/p'` in\n\n           3.0|3.1)\n                                                                                                                              if [ -d /Developer/SDKs/MacOSX10.5.sdk ] ; then\n                 mac_version_min=\"-mmacosx-version-min=10.3\"\n                 mac_sysroot=\"-isysroot /Developer/SDKs/MacOSX10.5.sdk\"\n              else\n                 mac_version_min=\"-mmacosx-version-min=10.3\"\n                 mac_sysroot=\"-isysroot /Developer/SDKs/MacOSX10.4u.sdk\"\n              fi\n              ;;\n\n           *)\n                                                                                    if xcrun --sdk macosx10.5 --show-sdk-path >/dev/null 2>&1 ; then\n                 mac_version_min=\"-mmacosx-version-min=10.5\"\n                 mac_sysroot=\"-isysroot $(xcrun --sdk macosx10.5 --show-sdk-path)\"\n              else\n                 mac_version_min=\"-mmacosx-version-min=10.6\"\n                 mac_sysroot=\"-isysroot $(xcrun --sdk macosx --show-sdk-path)\"\n              fi\n           esac\n\n                                 mac_arches=\"\"\n           for arch in x86_64 arm64\n           do\n              save_CFLAGS=\"$CFLAGS\"\n              CFLAGS=\"$CFLAGS -arch $arch\"\n              cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n$PAMAC_TEST_PROGRAM\n_ACEOF\nif ac_fn_c_try_compile \"$LINENO\"; then :\n\n                    if [ -z \"$mac_arches\" ] ; then\n                       mac_arches=\"-arch $arch\"\n                    else\n                       mac_arches=\"$mac_arches -arch $arch\"\n                    fi\n\nfi\nrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext\n              CFLAGS=\"$save_CFLAGS\"\n           done\n        else\n           mac_arches=\"\"\n           mac_sysroot=\"\"\n           mac_version=\"\"\n        fi\n        SHARED_FLAGS=\"$LIBS -dynamiclib $mac_arches $mac_sysroot $mac_version_min\"\n        CFLAGS=\"-std=c99 $CFLAGS $mac_arches $mac_sysroot $mac_version_min\"\n        OTHER_OBJS=\"src/os/unix/pa_unix_hostapis.o src/os/unix/pa_unix_util.o src/hostapi/coreaudio/pa_mac_core.o src/hostapi/coreaudio/pa_mac_core_utilities.o src/hostapi/coreaudio/pa_mac_core_blocking.o src/common/pa_ringbuffer.o\"\n        PADLL=\"libportaudio.dylib\"\n        ;;\n\n  mingw* )\n\n        PADLL=\"portaudio.dll\"\n        THREAD_CFLAGS=\"-mthreads\"\n        SHARED_FLAGS=\"-shared\"\n        CFLAGS=\"$CFLAGS -I\\$(top_srcdir)/src/os/win -DPA_USE_WMME=0 -DPA_USE_ASIO=0 -DPA_USE_WDMKS=0 -DPA_USE_DS=0 -DPA_USE_WASAPI=0\"\n\n        if [ \"x$with_directx\" = \"xyes\" ]; then\n            DXDIR=\"$with_dxdir\"\n            add_objects src/hostapi/dsound/pa_win_ds.o src/hostapi/dsound/pa_win_ds_dynlink.o src/os/win/pa_win_hostapis.o src/os/win/pa_win_util.o src/os/win/pa_win_coinitialize.o src/os/win/pa_win_waveformat.o\n            LIBS=\"${LIBS} -lwinmm -lm -ldsound -lole32\"\n            DLL_LIBS=\"${DLL_LIBS} -lwinmm -lm -L$DXDIR/lib -ldsound -lole32\"\n            #VC98=\"\\\"/c/Program Files/Microsoft Visual Studio/VC98/Include\\\"\"\n            #CFLAGS=\"$CFLAGS -I$VC98 -DPA_NO_WMME -DPA_NO_ASIO\"\n            CFLAGS=\"$CFLAGS -I$DXDIR/include -UPA_USE_DS -DPA_USE_DS=1\"\n            INCLUDES=\"$INCLUDES pa_win_ds.h pa_win_waveformat.h\"\n        fi\n\n        if [ \"x$with_asio\" = \"xyes\" ]; then\n            ASIODIR=\"$with_asiodir\"\n            add_objects src/hostapi/asio/pa_asio.o src/common/pa_ringbuffer.o src/os/win/pa_win_hostapis.o src/os/win/pa_win_util.o src/os/win/pa_win_coinitialize.o src/hostapi/asio/iasiothiscallresolver.o $ASIODIR/common/asio.o $ASIODIR/host/asiodrivers.o $ASIODIR/host/pc/asiolist.o\n            LIBS=\"${LIBS} -lwinmm -lm -lole32 -luuid\"\n            DLL_LIBS=\"${DLL_LIBS} -lwinmm -lm -lole32 -luuid\"\n            CFLAGS=\"$CFLAGS -ffast-math -fomit-frame-pointer -I\\$(top_srcdir)/src/hostapi/asio -I$ASIODIR/host/pc -I$ASIODIR/common -I$ASIODIR/host -UPA_USE_ASIO -DPA_USE_ASIO=1 -DWINDOWS\"\n            INCLUDES=\"$INCLUDES pa_asio.h\"\n\n                                                            CFLAGS=\"$CFLAGS -D_WIN32_WINNT=0x0501 -DWINVER=0x0501\"\n\n            CXXFLAGS=\"$CFLAGS\"\n        fi\n\n        if [ \"x$with_wdmks\" = \"xyes\" ]; then\n            DXDIR=\"$with_dxdir\"\n            add_objects src/hostapi/wdmks/pa_win_wdmks.o src/common/pa_ringbuffer.o src/os/win/pa_win_hostapis.o src/os/win/pa_win_util.o src/os/win/pa_win_wdmks_utils.o src/os/win/pa_win_waveformat.o\n            LIBS=\"${LIBS} -lwinmm -lm -luuid -lsetupapi -lole32\"\n            DLL_LIBS=\"${DLL_LIBS} -lwinmm -lm -L$DXDIR/lib -luuid -lsetupapi -lole32\"\n            #VC98=\"\\\"/c/Program Files/Microsoft Visual Studio/VC98/Include\\\"\"\n            #CFLAGS=\"$CFLAGS -I$VC98 -DPA_NO_WMME -DPA_NO_ASIO\"\n            CFLAGS=\"$CFLAGS -I$DXDIR/include -UPA_USE_WDMKS -DPA_USE_WDMKS=1\"\n            INCLUDES=\"$INCLUDES pa_win_wdmks.h\"\n        fi\n\n        if [ \"x$with_wmme\" = \"xyes\" ]; then\n            add_objects src/hostapi/wmme/pa_win_wmme.o src/os/win/pa_win_hostapis.o src/os/win/pa_win_util.o src/os/win/pa_win_waveformat.o\n            LIBS=\"${LIBS} -lwinmm -lm -lole32 -luuid\"\n            DLL_LIBS=\"${DLL_LIBS} -lwinmm\"\n            CFLAGS=\"$CFLAGS -UPA_USE_WMME -DPA_USE_WMME=1\"\n            INCLUDES=\"$INCLUDES pa_win_wmme.h pa_win_waveformat.h\"\n        fi\n\n        if [ \"x$with_wasapi\" = \"xyes\" ]; then\n            add_objects src/hostapi/wasapi/pa_win_wasapi.o src/common/pa_ringbuffer.o src/os/win/pa_win_hostapis.o src/os/win/pa_win_util.o src/os/win/pa_win_coinitialize.o src/os/win/pa_win_waveformat.o\n            LIBS=\"${LIBS} -lwinmm -lm -lole32 -luuid\"\n            DLL_LIBS=\"${DLL_LIBS} -lwinmm -lole32\"\n            CFLAGS=\"$CFLAGS -UPA_USE_WASAPI -DPA_USE_WASAPI=1\"\n            INCLUDES=\"$INCLUDES pa_win_wasapi.h pa_win_waveformat.h\"\n        fi\n        ;;\n\n  cygwin* )\n\n        OTHER_OBJS=\"src/hostapi/wmme/pa_win_wmme.o src/os/win/pa_win_hostapis.o src/os/win/pa_win_util.o src/os/win/pa_win_waveformat.o\"\n        CFLAGS=\"$CFLAGS -I\\$(top_srcdir)/src/os/win -DPA_USE_DS=0 -DPA_USE_WDMKS=0 -DPA_USE_ASIO=0 -DPA_USE_WASAPI=0 -DPA_USE_WMME=1\"\n        LIBS=\"-lwinmm -lm\"\n        PADLL=\"portaudio.dll\"\n        THREAD_CFLAGS=\"-mthreads\"\n        SHARED_FLAGS=\"-shared\"\n        DLL_LIBS=\"${DLL_LIBS} -lwinmm\"\n        ;;\n\n  irix* )\n                                { $as_echo \"$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread\" >&5\n$as_echo_n \"checking for pthread_create in -lpthread... \" >&6; }\nif ${ac_cv_lib_pthread_pthread_create+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  ac_check_lib_save_LIBS=$LIBS\nLIBS=\"-lpthread  $LIBS\"\ncat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n\n/* Override any GCC internal prototype to avoid an error.\n   Use char because int might match the return type of a GCC\n   builtin and then its argument prototype would still apply.  */\n#ifdef __cplusplus\nextern \"C\"\n#endif\nchar pthread_create ();\nint\nmain ()\n{\nreturn pthread_create ();\n  ;\n  return 0;\n}\n_ACEOF\nif ac_fn_c_try_link \"$LINENO\"; then :\n  ac_cv_lib_pthread_pthread_create=yes\nelse\n  ac_cv_lib_pthread_pthread_create=no\nfi\nrm -f core conftest.err conftest.$ac_objext \\\n    conftest$ac_exeext conftest.$ac_ext\nLIBS=$ac_check_lib_save_LIBS\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_create\" >&5\n$as_echo \"$ac_cv_lib_pthread_pthread_create\" >&6; }\nif test \"x$ac_cv_lib_pthread_pthread_create\" = xyes; then :\n  cat >>confdefs.h <<_ACEOF\n#define HAVE_LIBPTHREAD 1\n_ACEOF\n\n  LIBS=\"-lpthread $LIBS\"\n\nelse\n  as_fn_error $? \"IRIX posix thread library not found!\" \"$LINENO\" 5\nfi\n\n        { $as_echo \"$as_me:${as_lineno-$LINENO}: checking for alOpenPort in -laudio\" >&5\n$as_echo_n \"checking for alOpenPort in -laudio... \" >&6; }\nif ${ac_cv_lib_audio_alOpenPort+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  ac_check_lib_save_LIBS=$LIBS\nLIBS=\"-laudio  $LIBS\"\ncat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n\n/* Override any GCC internal prototype to avoid an error.\n   Use char because int might match the return type of a GCC\n   builtin and then its argument prototype would still apply.  */\n#ifdef __cplusplus\nextern \"C\"\n#endif\nchar alOpenPort ();\nint\nmain ()\n{\nreturn alOpenPort ();\n  ;\n  return 0;\n}\n_ACEOF\nif ac_fn_c_try_link \"$LINENO\"; then :\n  ac_cv_lib_audio_alOpenPort=yes\nelse\n  ac_cv_lib_audio_alOpenPort=no\nfi\nrm -f core conftest.err conftest.$ac_objext \\\n    conftest$ac_exeext conftest.$ac_ext\nLIBS=$ac_check_lib_save_LIBS\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_audio_alOpenPort\" >&5\n$as_echo \"$ac_cv_lib_audio_alOpenPort\" >&6; }\nif test \"x$ac_cv_lib_audio_alOpenPort\" = xyes; then :\n  cat >>confdefs.h <<_ACEOF\n#define HAVE_LIBAUDIO 1\n_ACEOF\n\n  LIBS=\"-laudio $LIBS\"\n\nelse\n  as_fn_error $? \"IRIX audio library not found!\" \"$LINENO\" 5\nfi\n\n        { $as_echo \"$as_me:${as_lineno-$LINENO}: checking for dmGetUST in -ldmedia\" >&5\n$as_echo_n \"checking for dmGetUST in -ldmedia... \" >&6; }\nif ${ac_cv_lib_dmedia_dmGetUST+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  ac_check_lib_save_LIBS=$LIBS\nLIBS=\"-ldmedia  $LIBS\"\ncat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n\n/* Override any GCC internal prototype to avoid an error.\n   Use char because int might match the return type of a GCC\n   builtin and then its argument prototype would still apply.  */\n#ifdef __cplusplus\nextern \"C\"\n#endif\nchar dmGetUST ();\nint\nmain ()\n{\nreturn dmGetUST ();\n  ;\n  return 0;\n}\n_ACEOF\nif ac_fn_c_try_link \"$LINENO\"; then :\n  ac_cv_lib_dmedia_dmGetUST=yes\nelse\n  ac_cv_lib_dmedia_dmGetUST=no\nfi\nrm -f core conftest.err conftest.$ac_objext \\\n    conftest$ac_exeext conftest.$ac_ext\nLIBS=$ac_check_lib_save_LIBS\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dmedia_dmGetUST\" >&5\n$as_echo \"$ac_cv_lib_dmedia_dmGetUST\" >&6; }\nif test \"x$ac_cv_lib_dmedia_dmGetUST\" = xyes; then :\n  cat >>confdefs.h <<_ACEOF\n#define HAVE_LIBDMEDIA 1\n_ACEOF\n\n  LIBS=\"-ldmedia $LIBS\"\n\nelse\n  as_fn_error $? \"IRIX digital media library not found!\" \"$LINENO\" 5\nfi\n\n\n                                $as_echo \"#define PA_USE_SGI 1\" >>confdefs.h\n\n\n        CFLAGS=\"$CFLAGS -I\\$(top_srcdir)/src/os/unix\"\n\n                        THREAD_CFLAGS=\"-D_REENTRANT\"\n\n        OTHER_OBJS=\"pa_sgi/pa_sgi.o src/os/unix/pa_unix_hostapis.o src/os/unix/pa_unix_util.o\"\n\n                        LIBS=\"-lm -ldmedia -laudio -lpthread\"\n        PADLL=\"libportaudio.so\"\n        SHARED_FLAGS=\"\"\n        ;;\n\n  *)\n\n        CFLAGS=\"$CFLAGS -I\\$(top_srcdir)/src/os/unix\"\n\n        { $as_echo \"$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread\" >&5\n$as_echo_n \"checking for pthread_create in -lpthread... \" >&6; }\nif ${ac_cv_lib_pthread_pthread_create+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  ac_check_lib_save_LIBS=$LIBS\nLIBS=\"-lpthread  $LIBS\"\ncat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n\n/* Override any GCC internal prototype to avoid an error.\n   Use char because int might match the return type of a GCC\n   builtin and then its argument prototype would still apply.  */\n#ifdef __cplusplus\nextern \"C\"\n#endif\nchar pthread_create ();\nint\nmain ()\n{\nreturn pthread_create ();\n  ;\n  return 0;\n}\n_ACEOF\nif ac_fn_c_try_link \"$LINENO\"; then :\n  ac_cv_lib_pthread_pthread_create=yes\nelse\n  ac_cv_lib_pthread_pthread_create=no\nfi\nrm -f core conftest.err conftest.$ac_objext \\\n    conftest$ac_exeext conftest.$ac_ext\nLIBS=$ac_check_lib_save_LIBS\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_create\" >&5\n$as_echo \"$ac_cv_lib_pthread_pthread_create\" >&6; }\nif test \"x$ac_cv_lib_pthread_pthread_create\" = xyes; then :\n  have_pthread=\"yes\"\nelse\n  as_fn_error $? \"libpthread not found!\" \"$LINENO\" 5\nfi\n\n\n        if [ \"$have_alsa\" = \"yes\" ] && [ \"$with_alsa\" != \"no\" ] ; then\n           DLL_LIBS=\"$DLL_LIBS -lasound\"\n           LIBS=\"$LIBS -lasound\"\n           OTHER_OBJS=\"$OTHER_OBJS src/hostapi/alsa/pa_linux_alsa.o\"\n           INCLUDES=\"$INCLUDES pa_linux_alsa.h\"\n           $as_echo \"#define PA_USE_ALSA 1\" >>confdefs.h\n\n        fi\n\n        if [ \"$have_jack\" = \"yes\" ] && [ \"$with_jack\" != \"no\" ] ; then\n           DLL_LIBS=\"$DLL_LIBS $JACK_LIBS\"\n           CFLAGS=\"$CFLAGS $JACK_CFLAGS\"\n           OTHER_OBJS=\"$OTHER_OBJS src/hostapi/jack/pa_jack.o src/common/pa_ringbuffer.o\"\n           INCLUDES=\"$INCLUDES pa_jack.h\"\n           $as_echo \"#define PA_USE_JACK 1\" >>confdefs.h\n\n        fi\n\n        if [ \"$with_oss\" != \"no\" ] ; then\n           OTHER_OBJS=\"$OTHER_OBJS src/hostapi/oss/pa_unix_oss.o\"\n           if [ \"$have_libossaudio\" = \"yes\" ] ; then\n                   DLL_LIBS=\"$DLL_LIBS -lossaudio\"\n                   LIBS=\"$LIBS -lossaudio\"\n           fi\n           $as_echo \"#define PA_USE_OSS 1\" >>confdefs.h\n\n        fi\n\n        if [ \"$have_asihpi\" = \"yes\" ] && [ \"$with_asihpi\" != \"no\" ] ; then\n           LIBS=\"$LIBS -lhpi\"\n           DLL_LIBS=\"$DLL_LIBS -lhpi\"\n           OTHER_OBJS=\"$OTHER_OBJS src/hostapi/asihpi/pa_linux_asihpi.o\"\n           $as_echo \"#define PA_USE_ASIHPI 1\" >>confdefs.h\n\n        fi\n\n        DLL_LIBS=\"$DLL_LIBS -lm -lpthread\"\n        LIBS=\"$LIBS -lm -lpthread\"\n        PADLL=\"libportaudio.so\"\n\n        ## support sun cc compiler flags\n        case \"${host_os}\" in\n           solaris*)\n              SHARED_FLAGS=\"-G\"\n              THREAD_CFLAGS=\"-mt\"\n              ;;\n           *)\n              SHARED_FLAGS=\"-fPIC\"\n              THREAD_CFLAGS=\"-pthread\"\n              ;;\n        esac\n\n        OTHER_OBJS=\"$OTHER_OBJS src/os/unix/pa_unix_hostapis.o src/os/unix/pa_unix_util.o\"\nesac\nCFLAGS=\"$CFLAGS $THREAD_CFLAGS\"\n\ntest \"$enable_shared\" != \"yes\" && SHARED_FLAGS=\"\"\n\nif test \"$enable_cxx\" = \"yes\"; then\n\n\nsubdirs=\"$subdirs bindings/cpp\"\n\n   ENABLE_CXX_TRUE=\"\"\n   ENABLE_CXX_FALSE=\"#\"\nelse\n   ENABLE_CXX_TRUE=\"#\"\n   ENABLE_CXX_FALSE=\"\"\nfi\n\n\n\nif test \"x$with_asio\" = \"xyes\"; then\n   WITH_ASIO_TRUE=\"\"\n   WITH_ASIO_FALSE=\"@ #\"\nelse\n   WITH_ASIO_TRUE=\"@ #\"\n   WITH_ASIO_FALSE=\"\"\nfi\n\n\n\nac_config_files=\"$ac_config_files Makefile portaudio-2.0.pc\"\n\ncat >confcache <<\\_ACEOF\n# This file is a shell script that caches the results of configure\n# tests run on this system so they can be shared between configure\n# scripts and configure runs, see configure's option --config-cache.\n# It is not useful on other systems.  If it contains results you don't\n# want to keep, you may remove or edit it.\n#\n# config.status only pays attention to the cache file if you give it\n# the --recheck option to rerun configure.\n#\n# `ac_cv_env_foo' variables (set or unset) will be overridden when\n# loading this file, other *unset* `ac_cv_foo' will be assigned the\n# following values.\n\n_ACEOF\n\n# The following way of writing the cache mishandles newlines in values,\n# but we know of no workaround that is simple, portable, and efficient.\n# So, we kill variables containing newlines.\n# Ultrix sh set writes to stderr and can't be redirected directly,\n# and sets the high bit in the cache file unless we assign to the vars.\n(\n  for ac_var in `(set) 2>&1 | sed -n 's/^\\([a-zA-Z_][a-zA-Z0-9_]*\\)=.*/\\1/p'`; do\n    eval ac_val=\\$$ac_var\n    case $ac_val in #(\n    *${as_nl}*)\n      case $ac_var in #(\n      *_cv_*) { $as_echo \"$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline\" >&5\n$as_echo \"$as_me: WARNING: cache variable $ac_var contains a newline\" >&2;} ;;\n      esac\n      case $ac_var in #(\n      _ | IFS | as_nl) ;; #(\n      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(\n      *) { eval $ac_var=; unset $ac_var;} ;;\n      esac ;;\n    esac\n  done\n\n  (set) 2>&1 |\n    case $as_nl`(ac_space=' '; set) 2>&1` in #(\n    *${as_nl}ac_space=\\ *)\n      # `set' does not quote correctly, so add quotes: double-quote\n      # substitution turns \\\\\\\\ into \\\\, and sed turns \\\\ into \\.\n      sed -n \\\n\t\"s/'/'\\\\\\\\''/g;\n\t  s/^\\\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\\\)=\\\\(.*\\\\)/\\\\1='\\\\2'/p\"\n      ;; #(\n    *)\n      # `set' quotes correctly as required by POSIX, so do not add quotes.\n      sed -n \"/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p\"\n      ;;\n    esac |\n    sort\n) |\n  sed '\n     /^ac_cv_env_/b end\n     t clear\n     :clear\n     s/^\\([^=]*\\)=\\(.*[{}].*\\)$/test \"${\\1+set}\" = set || &/\n     t end\n     s/^\\([^=]*\\)=\\(.*\\)$/\\1=${\\1=\\2}/\n     :end' >>confcache\nif diff \"$cache_file\" confcache >/dev/null 2>&1; then :; else\n  if test -w \"$cache_file\"; then\n    if test \"x$cache_file\" != \"x/dev/null\"; then\n      { $as_echo \"$as_me:${as_lineno-$LINENO}: updating cache $cache_file\" >&5\n$as_echo \"$as_me: updating cache $cache_file\" >&6;}\n      if test ! -f \"$cache_file\" || test -h \"$cache_file\"; then\n\tcat confcache >\"$cache_file\"\n      else\n        case $cache_file in #(\n        */* | ?:*)\n\t  mv -f confcache \"$cache_file\"$$ &&\n\t  mv -f \"$cache_file\"$$ \"$cache_file\" ;; #(\n        *)\n\t  mv -f confcache \"$cache_file\" ;;\n\tesac\n      fi\n    fi\n  else\n    { $as_echo \"$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file\" >&5\n$as_echo \"$as_me: not updating unwritable cache $cache_file\" >&6;}\n  fi\nfi\nrm -f confcache\n\ntest \"x$prefix\" = xNONE && prefix=$ac_default_prefix\n# Let make expand exec_prefix.\ntest \"x$exec_prefix\" = xNONE && exec_prefix='${prefix}'\n\n# Transform confdefs.h into DEFS.\n# Protect against shell expansion while executing Makefile rules.\n# Protect against Makefile macro expansion.\n#\n# If the first sed substitution is executed (which looks for macros that\n# take arguments), then branch to the quote section.  Otherwise,\n# look for a macro that doesn't take arguments.\nac_script='\n:mline\n/\\\\$/{\n N\n s,\\\\\\n,,\n b mline\n}\nt clear\n:clear\ns/^[\t ]*#[\t ]*define[\t ][\t ]*\\([^\t (][^\t (]*([^)]*)\\)[\t ]*\\(.*\\)/-D\\1=\\2/g\nt quote\ns/^[\t ]*#[\t ]*define[\t ][\t ]*\\([^\t ][^\t ]*\\)[\t ]*\\(.*\\)/-D\\1=\\2/g\nt quote\nb any\n:quote\ns/[\t `~#$^&*(){}\\\\|;'\\''\"<>?]/\\\\&/g\ns/\\[/\\\\&/g\ns/\\]/\\\\&/g\ns/\\$/$$/g\nH\n:any\n${\n\tg\n\ts/^\\n//\n\ts/\\n/ /g\n\tp\n}\n'\nDEFS=`sed -n \"$ac_script\" confdefs.h`\n\n\nac_libobjs=\nac_ltlibobjs=\nU=\nfor ac_i in : $LIBOBJS; do test \"x$ac_i\" = x: && continue\n  # 1. Remove the extension, and $U if already installed.\n  ac_script='s/\\$U\\././;s/\\.o$//;s/\\.obj$//'\n  ac_i=`$as_echo \"$ac_i\" | sed \"$ac_script\"`\n  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR\n  #    will be set to the directory where LIBOBJS objects are built.\n  as_fn_append ac_libobjs \" \\${LIBOBJDIR}$ac_i\\$U.$ac_objext\"\n  as_fn_append ac_ltlibobjs \" \\${LIBOBJDIR}$ac_i\"'$U.lo'\ndone\nLIBOBJS=$ac_libobjs\n\nLTLIBOBJS=$ac_ltlibobjs\n\n\n\n\n: \"${CONFIG_STATUS=./config.status}\"\nac_write_fail=0\nac_clean_files_save=$ac_clean_files\nac_clean_files=\"$ac_clean_files $CONFIG_STATUS\"\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS\" >&5\n$as_echo \"$as_me: creating $CONFIG_STATUS\" >&6;}\nas_write_fail=0\ncat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1\n#! $SHELL\n# Generated by $as_me.\n# Run this file to recreate the current configuration.\n# Compiler output produced by configure, useful for debugging\n# configure, is in config.log if it exists.\n\ndebug=false\nac_cs_recheck=false\nac_cs_silent=false\n\nSHELL=\\${CONFIG_SHELL-$SHELL}\nexport SHELL\n_ASEOF\ncat >>$CONFIG_STATUS <<\\_ASEOF || as_write_fail=1\n## -------------------- ##\n## M4sh Initialization. ##\n## -------------------- ##\n\n# Be more Bourne compatible\nDUALCASE=1; export DUALCASE # for MKS sh\nif test -n \"${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :\n  emulate sh\n  NULLCMD=:\n  # Pre-4.2 versions of Zsh do word splitting on ${1+\"$@\"}, which\n  # is contrary to our usage.  Disable this feature.\n  alias -g '${1+\"$@\"}'='\"$@\"'\n  setopt NO_GLOB_SUBST\nelse\n  case `(set -o) 2>/dev/null` in #(\n  *posix*) :\n    set -o posix ;; #(\n  *) :\n     ;;\nesac\nfi\n\n\nas_nl='\n'\nexport as_nl\n# Printing a long string crashes Solaris 7 /usr/bin/printf.\nas_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'\nas_echo=$as_echo$as_echo$as_echo$as_echo$as_echo\nas_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo\n# Prefer a ksh shell builtin over an external printf program on Solaris,\n# but without wasting forks for bash or zsh.\nif test -z \"$BASH_VERSION$ZSH_VERSION\" \\\n    && (test \"X`print -r -- $as_echo`\" = \"X$as_echo\") 2>/dev/null; then\n  as_echo='print -r --'\n  as_echo_n='print -rn --'\nelif (test \"X`printf %s $as_echo`\" = \"X$as_echo\") 2>/dev/null; then\n  as_echo='printf %s\\n'\n  as_echo_n='printf %s'\nelse\n  if test \"X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`\" = \"X-n $as_echo\"; then\n    as_echo_body='eval /usr/ucb/echo -n \"$1$as_nl\"'\n    as_echo_n='/usr/ucb/echo -n'\n  else\n    as_echo_body='eval expr \"X$1\" : \"X\\\\(.*\\\\)\"'\n    as_echo_n_body='eval\n      arg=$1;\n      case $arg in #(\n      *\"$as_nl\"*)\n\texpr \"X$arg\" : \"X\\\\(.*\\\\)$as_nl\";\n\targ=`expr \"X$arg\" : \".*$as_nl\\\\(.*\\\\)\"`;;\n      esac;\n      expr \"X$arg\" : \"X\\\\(.*\\\\)\" | tr -d \"$as_nl\"\n    '\n    export as_echo_n_body\n    as_echo_n='sh -c $as_echo_n_body as_echo'\n  fi\n  export as_echo_body\n  as_echo='sh -c $as_echo_body as_echo'\nfi\n\n# The user is always right.\nif test \"${PATH_SEPARATOR+set}\" != set; then\n  PATH_SEPARATOR=:\n  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {\n    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||\n      PATH_SEPARATOR=';'\n  }\nfi\n\n\n# IFS\n# We need space, tab and new line, in precisely that order.  Quoting is\n# there to prevent editors from complaining about space-tab.\n# (If _AS_PATH_WALK were called with IFS unset, it would disable word\n# splitting by setting IFS to empty value.)\nIFS=\" \"\"\t$as_nl\"\n\n# Find who we are.  Look in the path if we contain no directory separator.\nas_myself=\ncase $0 in #((\n  *[\\\\/]* ) as_myself=$0 ;;\n  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    test -r \"$as_dir/$0\" && as_myself=$as_dir/$0 && break\n  done\nIFS=$as_save_IFS\n\n     ;;\nesac\n# We did not find ourselves, most probably we were run as `sh COMMAND'\n# in which case we are not to be found in the path.\nif test \"x$as_myself\" = x; then\n  as_myself=$0\nfi\nif test ! -f \"$as_myself\"; then\n  $as_echo \"$as_myself: error: cannot find myself; rerun with an absolute file name\" >&2\n  exit 1\nfi\n\n# Unset variables that we do not need and which cause bugs (e.g. in\n# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the \"|| exit 1\"\n# suppresses any \"Segmentation fault\" message there.  '((' could\n# trigger a bug in pdksh 5.2.14.\nfor as_var in BASH_ENV ENV MAIL MAILPATH\ndo eval test x\\${$as_var+set} = xset \\\n  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :\ndone\nPS1='$ '\nPS2='> '\nPS4='+ '\n\n# NLS nuisances.\nLC_ALL=C\nexport LC_ALL\nLANGUAGE=C\nexport LANGUAGE\n\n# CDPATH.\n(unset CDPATH) >/dev/null 2>&1 && unset CDPATH\n\n\n# as_fn_error STATUS ERROR [LINENO LOG_FD]\n# ----------------------------------------\n# Output \"`basename $0`: error: ERROR\" to stderr. If LINENO and LOG_FD are\n# provided, also output the error to LOG_FD, referencing LINENO. Then exit the\n# script with STATUS, using 1 if that was 0.\nas_fn_error ()\n{\n  as_status=$1; test $as_status -eq 0 && as_status=1\n  if test \"$4\"; then\n    as_lineno=${as_lineno-\"$3\"} as_lineno_stack=as_lineno_stack=$as_lineno_stack\n    $as_echo \"$as_me:${as_lineno-$LINENO}: error: $2\" >&$4\n  fi\n  $as_echo \"$as_me: error: $2\" >&2\n  as_fn_exit $as_status\n} # as_fn_error\n\n\n# as_fn_set_status STATUS\n# -----------------------\n# Set $? to STATUS, without forking.\nas_fn_set_status ()\n{\n  return $1\n} # as_fn_set_status\n\n# as_fn_exit STATUS\n# -----------------\n# Exit the shell with STATUS, even in a \"trap 0\" or \"set -e\" context.\nas_fn_exit ()\n{\n  set +e\n  as_fn_set_status $1\n  exit $1\n} # as_fn_exit\n\n# as_fn_unset VAR\n# ---------------\n# Portably unset VAR.\nas_fn_unset ()\n{\n  { eval $1=; unset $1;}\n}\nas_unset=as_fn_unset\n# as_fn_append VAR VALUE\n# ----------------------\n# Append the text in VALUE to the end of the definition contained in VAR. Take\n# advantage of any shell optimizations that allow amortized linear growth over\n# repeated appends, instead of the typical quadratic growth present in naive\n# implementations.\nif (eval \"as_var=1; as_var+=2; test x\\$as_var = x12\") 2>/dev/null; then :\n  eval 'as_fn_append ()\n  {\n    eval $1+=\\$2\n  }'\nelse\n  as_fn_append ()\n  {\n    eval $1=\\$$1\\$2\n  }\nfi # as_fn_append\n\n# as_fn_arith ARG...\n# ------------------\n# Perform arithmetic evaluation on the ARGs, and store the result in the\n# global $as_val. Take advantage of shells that can avoid forks. The arguments\n# must be portable across $(()) and expr.\nif (eval \"test \\$(( 1 + 1 )) = 2\") 2>/dev/null; then :\n  eval 'as_fn_arith ()\n  {\n    as_val=$(( $* ))\n  }'\nelse\n  as_fn_arith ()\n  {\n    as_val=`expr \"$@\" || test $? -eq 1`\n  }\nfi # as_fn_arith\n\n\nif expr a : '\\(a\\)' >/dev/null 2>&1 &&\n   test \"X`expr 00001 : '.*\\(...\\)'`\" = X001; then\n  as_expr=expr\nelse\n  as_expr=false\nfi\n\nif (basename -- /) >/dev/null 2>&1 && test \"X`basename -- / 2>&1`\" = \"X/\"; then\n  as_basename=basename\nelse\n  as_basename=false\nfi\n\nif (as_dir=`dirname -- /` && test \"X$as_dir\" = X/) >/dev/null 2>&1; then\n  as_dirname=dirname\nelse\n  as_dirname=false\nfi\n\nas_me=`$as_basename -- \"$0\" ||\n$as_expr X/\"$0\" : '.*/\\([^/][^/]*\\)/*$' \\| \\\n\t X\"$0\" : 'X\\(//\\)$' \\| \\\n\t X\"$0\" : 'X\\(/\\)' \\| . 2>/dev/null ||\n$as_echo X/\"$0\" |\n    sed '/^.*\\/\\([^/][^/]*\\)\\/*$/{\n\t    s//\\1/\n\t    q\n\t  }\n\t  /^X\\/\\(\\/\\/\\)$/{\n\t    s//\\1/\n\t    q\n\t  }\n\t  /^X\\/\\(\\/\\).*/{\n\t    s//\\1/\n\t    q\n\t  }\n\t  s/.*/./; q'`\n\n# Avoid depending upon Character Ranges.\nas_cr_letters='abcdefghijklmnopqrstuvwxyz'\nas_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'\nas_cr_Letters=$as_cr_letters$as_cr_LETTERS\nas_cr_digits='0123456789'\nas_cr_alnum=$as_cr_Letters$as_cr_digits\n\nECHO_C= ECHO_N= ECHO_T=\ncase `echo -n x` in #(((((\n-n*)\n  case `echo 'xy\\c'` in\n  *c*) ECHO_T='\t';;\t# ECHO_T is single tab character.\n  xy)  ECHO_C='\\c';;\n  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null\n       ECHO_T='\t';;\n  esac;;\n*)\n  ECHO_N='-n';;\nesac\n\nrm -f conf$$ conf$$.exe conf$$.file\nif test -d conf$$.dir; then\n  rm -f conf$$.dir/conf$$.file\nelse\n  rm -f conf$$.dir\n  mkdir conf$$.dir 2>/dev/null\nfi\nif (echo >conf$$.file) 2>/dev/null; then\n  if ln -s conf$$.file conf$$ 2>/dev/null; then\n    as_ln_s='ln -s'\n    # ... but there are two gotchas:\n    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.\n    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.\n    # In both cases, we have to default to `cp -pR'.\n    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||\n      as_ln_s='cp -pR'\n  elif ln conf$$.file conf$$ 2>/dev/null; then\n    as_ln_s=ln\n  else\n    as_ln_s='cp -pR'\n  fi\nelse\n  as_ln_s='cp -pR'\nfi\nrm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file\nrmdir conf$$.dir 2>/dev/null\n\n\n# as_fn_mkdir_p\n# -------------\n# Create \"$as_dir\" as a directory, including parents if necessary.\nas_fn_mkdir_p ()\n{\n\n  case $as_dir in #(\n  -*) as_dir=./$as_dir;;\n  esac\n  test -d \"$as_dir\" || eval $as_mkdir_p || {\n    as_dirs=\n    while :; do\n      case $as_dir in #(\n      *\\'*) as_qdir=`$as_echo \"$as_dir\" | sed \"s/'/'\\\\\\\\\\\\\\\\''/g\"`;; #'(\n      *) as_qdir=$as_dir;;\n      esac\n      as_dirs=\"'$as_qdir' $as_dirs\"\n      as_dir=`$as_dirname -- \"$as_dir\" ||\n$as_expr X\"$as_dir\" : 'X\\(.*[^/]\\)//*[^/][^/]*/*$' \\| \\\n\t X\"$as_dir\" : 'X\\(//\\)[^/]' \\| \\\n\t X\"$as_dir\" : 'X\\(//\\)$' \\| \\\n\t X\"$as_dir\" : 'X\\(/\\)' \\| . 2>/dev/null ||\n$as_echo X\"$as_dir\" |\n    sed '/^X\\(.*[^/]\\)\\/\\/*[^/][^/]*\\/*$/{\n\t    s//\\1/\n\t    q\n\t  }\n\t  /^X\\(\\/\\/\\)[^/].*/{\n\t    s//\\1/\n\t    q\n\t  }\n\t  /^X\\(\\/\\/\\)$/{\n\t    s//\\1/\n\t    q\n\t  }\n\t  /^X\\(\\/\\).*/{\n\t    s//\\1/\n\t    q\n\t  }\n\t  s/.*/./; q'`\n      test -d \"$as_dir\" && break\n    done\n    test -z \"$as_dirs\" || eval \"mkdir $as_dirs\"\n  } || test -d \"$as_dir\" || as_fn_error $? \"cannot create directory $as_dir\"\n\n\n} # as_fn_mkdir_p\nif mkdir -p . 2>/dev/null; then\n  as_mkdir_p='mkdir -p \"$as_dir\"'\nelse\n  test -d ./-p && rmdir ./-p\n  as_mkdir_p=false\nfi\n\n\n# as_fn_executable_p FILE\n# -----------------------\n# Test if FILE is an executable regular file.\nas_fn_executable_p ()\n{\n  test -f \"$1\" && test -x \"$1\"\n} # as_fn_executable_p\nas_test_x='test -x'\nas_executable_p=as_fn_executable_p\n\n# Sed expression to map a string onto a valid CPP name.\nas_tr_cpp=\"eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'\"\n\n# Sed expression to map a string onto a valid variable name.\nas_tr_sh=\"eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'\"\n\n\nexec 6>&1\n## ----------------------------------- ##\n## Main body of $CONFIG_STATUS script. ##\n## ----------------------------------- ##\n_ASEOF\ntest $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1\n\ncat >>$CONFIG_STATUS <<\\_ACEOF || ac_write_fail=1\n# Save the log message, to keep $0 and so on meaningful, and to\n# report actual input values of CONFIG_FILES etc. instead of their\n# values after options handling.\nac_log=\"\nThis file was extended by $as_me, which was\ngenerated by GNU Autoconf 2.69.  Invocation command line was\n\n  CONFIG_FILES    = $CONFIG_FILES\n  CONFIG_HEADERS  = $CONFIG_HEADERS\n  CONFIG_LINKS    = $CONFIG_LINKS\n  CONFIG_COMMANDS = $CONFIG_COMMANDS\n  $ $0 $@\n\non `(hostname || uname -n) 2>/dev/null | sed 1q`\n\"\n\n_ACEOF\n\ncase $ac_config_files in *\"\n\"*) set x $ac_config_files; shift; ac_config_files=$*;;\nesac\n\n\n\ncat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1\n# Files that config.status was made for.\nconfig_files=\"$ac_config_files\"\nconfig_commands=\"$ac_config_commands\"\n\n_ACEOF\n\ncat >>$CONFIG_STATUS <<\\_ACEOF || ac_write_fail=1\nac_cs_usage=\"\\\n\\`$as_me' instantiates files and other configuration actions\nfrom templates according to the current configuration.  Unless the files\nand actions are specified as TAGs, all are instantiated by default.\n\nUsage: $0 [OPTION]... [TAG]...\n\n  -h, --help       print this help, then exit\n  -V, --version    print version number and configuration settings, then exit\n      --config     print configuration, then exit\n  -q, --quiet, --silent\n                   do not print progress messages\n  -d, --debug      don't remove temporary files\n      --recheck    update $as_me by reconfiguring in the same conditions\n      --file=FILE[:TEMPLATE]\n                   instantiate the configuration file FILE\n\nConfiguration files:\n$config_files\n\nConfiguration commands:\n$config_commands\n\nReport bugs to the package provider.\"\n\n_ACEOF\ncat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1\nac_cs_config=\"`$as_echo \"$ac_configure_args\" | sed 's/^ //; s/[\\\\\"\"\\`\\$]/\\\\\\\\&/g'`\"\nac_cs_version=\"\\\\\nconfig.status\nconfigured by $0, generated by GNU Autoconf 2.69,\n  with options \\\\\"\\$ac_cs_config\\\\\"\n\nCopyright (C) 2012 Free Software Foundation, Inc.\nThis config.status script is free software; the Free Software Foundation\ngives unlimited permission to copy, distribute and modify it.\"\n\nac_pwd='$ac_pwd'\nsrcdir='$srcdir'\nINSTALL='$INSTALL'\nAWK='$AWK'\ntest -n \"\\$AWK\" || AWK=awk\n_ACEOF\n\ncat >>$CONFIG_STATUS <<\\_ACEOF || ac_write_fail=1\n# The default lists apply if the user does not specify any file.\nac_need_defaults=:\nwhile test $# != 0\ndo\n  case $1 in\n  --*=?*)\n    ac_option=`expr \"X$1\" : 'X\\([^=]*\\)='`\n    ac_optarg=`expr \"X$1\" : 'X[^=]*=\\(.*\\)'`\n    ac_shift=:\n    ;;\n  --*=)\n    ac_option=`expr \"X$1\" : 'X\\([^=]*\\)='`\n    ac_optarg=\n    ac_shift=:\n    ;;\n  *)\n    ac_option=$1\n    ac_optarg=$2\n    ac_shift=shift\n    ;;\n  esac\n\n  case $ac_option in\n  # Handling of the options.\n  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)\n    ac_cs_recheck=: ;;\n  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )\n    $as_echo \"$ac_cs_version\"; exit ;;\n  --config | --confi | --conf | --con | --co | --c )\n    $as_echo \"$ac_cs_config\"; exit ;;\n  --debug | --debu | --deb | --de | --d | -d )\n    debug=: ;;\n  --file | --fil | --fi | --f )\n    $ac_shift\n    case $ac_optarg in\n    *\\'*) ac_optarg=`$as_echo \"$ac_optarg\" | sed \"s/'/'\\\\\\\\\\\\\\\\''/g\"` ;;\n    '') as_fn_error $? \"missing file argument\" ;;\n    esac\n    as_fn_append CONFIG_FILES \" '$ac_optarg'\"\n    ac_need_defaults=false;;\n  --he | --h |  --help | --hel | -h )\n    $as_echo \"$ac_cs_usage\"; exit ;;\n  -q | -quiet | --quiet | --quie | --qui | --qu | --q \\\n  | -silent | --silent | --silen | --sile | --sil | --si | --s)\n    ac_cs_silent=: ;;\n\n  # This is an error.\n  -*) as_fn_error $? \"unrecognized option: \\`$1'\nTry \\`$0 --help' for more information.\" ;;\n\n  *) as_fn_append ac_config_targets \" $1\"\n     ac_need_defaults=false ;;\n\n  esac\n  shift\ndone\n\nac_configure_extra_args=\n\nif $ac_cs_silent; then\n  exec 6>/dev/null\n  ac_configure_extra_args=\"$ac_configure_extra_args --silent\"\nfi\n\n_ACEOF\ncat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1\nif \\$ac_cs_recheck; then\n  set X $SHELL '$0' $ac_configure_args \\$ac_configure_extra_args --no-create --no-recursion\n  shift\n  \\$as_echo \"running CONFIG_SHELL=$SHELL \\$*\" >&6\n  CONFIG_SHELL='$SHELL'\n  export CONFIG_SHELL\n  exec \"\\$@\"\nfi\n\n_ACEOF\ncat >>$CONFIG_STATUS <<\\_ACEOF || ac_write_fail=1\nexec 5>>config.log\n{\n  echo\n  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX\n## Running $as_me. ##\n_ASBOX\n  $as_echo \"$ac_log\"\n} >&5\n\n_ACEOF\ncat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1\n#\n# INIT-COMMANDS\n#\n\n\n# The HP-UX ksh and POSIX shell print the target directory to stdout\n# if CDPATH is set.\n(unset CDPATH) >/dev/null 2>&1 && unset CDPATH\n\nsed_quote_subst='$sed_quote_subst'\ndouble_quote_subst='$double_quote_subst'\ndelay_variable_subst='$delay_variable_subst'\nAS='`$ECHO \"$AS\" | $SED \"$delay_single_quote_subst\"`'\nDLLTOOL='`$ECHO \"$DLLTOOL\" | $SED \"$delay_single_quote_subst\"`'\nOBJDUMP='`$ECHO \"$OBJDUMP\" | $SED \"$delay_single_quote_subst\"`'\nmacro_version='`$ECHO \"$macro_version\" | $SED \"$delay_single_quote_subst\"`'\nmacro_revision='`$ECHO \"$macro_revision\" | $SED \"$delay_single_quote_subst\"`'\nenable_shared='`$ECHO \"$enable_shared\" | $SED \"$delay_single_quote_subst\"`'\nenable_static='`$ECHO \"$enable_static\" | $SED \"$delay_single_quote_subst\"`'\npic_mode='`$ECHO \"$pic_mode\" | $SED \"$delay_single_quote_subst\"`'\nenable_fast_install='`$ECHO \"$enable_fast_install\" | $SED \"$delay_single_quote_subst\"`'\nSHELL='`$ECHO \"$SHELL\" | $SED \"$delay_single_quote_subst\"`'\nECHO='`$ECHO \"$ECHO\" | $SED \"$delay_single_quote_subst\"`'\nPATH_SEPARATOR='`$ECHO \"$PATH_SEPARATOR\" | $SED \"$delay_single_quote_subst\"`'\nhost_alias='`$ECHO \"$host_alias\" | $SED \"$delay_single_quote_subst\"`'\nhost='`$ECHO \"$host\" | $SED \"$delay_single_quote_subst\"`'\nhost_os='`$ECHO \"$host_os\" | $SED \"$delay_single_quote_subst\"`'\nbuild_alias='`$ECHO \"$build_alias\" | $SED \"$delay_single_quote_subst\"`'\nbuild='`$ECHO \"$build\" | $SED \"$delay_single_quote_subst\"`'\nbuild_os='`$ECHO \"$build_os\" | $SED \"$delay_single_quote_subst\"`'\nSED='`$ECHO \"$SED\" | $SED \"$delay_single_quote_subst\"`'\nXsed='`$ECHO \"$Xsed\" | $SED \"$delay_single_quote_subst\"`'\nGREP='`$ECHO \"$GREP\" | $SED \"$delay_single_quote_subst\"`'\nEGREP='`$ECHO \"$EGREP\" | $SED \"$delay_single_quote_subst\"`'\nFGREP='`$ECHO \"$FGREP\" | $SED \"$delay_single_quote_subst\"`'\nLD='`$ECHO \"$LD\" | $SED \"$delay_single_quote_subst\"`'\nNM='`$ECHO \"$NM\" | $SED \"$delay_single_quote_subst\"`'\nLN_S='`$ECHO \"$LN_S\" | $SED \"$delay_single_quote_subst\"`'\nmax_cmd_len='`$ECHO \"$max_cmd_len\" | $SED \"$delay_single_quote_subst\"`'\nac_objext='`$ECHO \"$ac_objext\" | $SED \"$delay_single_quote_subst\"`'\nexeext='`$ECHO \"$exeext\" | $SED \"$delay_single_quote_subst\"`'\nlt_unset='`$ECHO \"$lt_unset\" | $SED \"$delay_single_quote_subst\"`'\nlt_SP2NL='`$ECHO \"$lt_SP2NL\" | $SED \"$delay_single_quote_subst\"`'\nlt_NL2SP='`$ECHO \"$lt_NL2SP\" | $SED \"$delay_single_quote_subst\"`'\nlt_cv_to_host_file_cmd='`$ECHO \"$lt_cv_to_host_file_cmd\" | $SED \"$delay_single_quote_subst\"`'\nlt_cv_to_tool_file_cmd='`$ECHO \"$lt_cv_to_tool_file_cmd\" | $SED \"$delay_single_quote_subst\"`'\nreload_flag='`$ECHO \"$reload_flag\" | $SED \"$delay_single_quote_subst\"`'\nreload_cmds='`$ECHO \"$reload_cmds\" | $SED \"$delay_single_quote_subst\"`'\ndeplibs_check_method='`$ECHO \"$deplibs_check_method\" | $SED \"$delay_single_quote_subst\"`'\nfile_magic_cmd='`$ECHO \"$file_magic_cmd\" | $SED \"$delay_single_quote_subst\"`'\nfile_magic_glob='`$ECHO \"$file_magic_glob\" | $SED \"$delay_single_quote_subst\"`'\nwant_nocaseglob='`$ECHO \"$want_nocaseglob\" | $SED \"$delay_single_quote_subst\"`'\nsharedlib_from_linklib_cmd='`$ECHO \"$sharedlib_from_linklib_cmd\" | $SED \"$delay_single_quote_subst\"`'\nAR='`$ECHO \"$AR\" | $SED \"$delay_single_quote_subst\"`'\nAR_FLAGS='`$ECHO \"$AR_FLAGS\" | $SED \"$delay_single_quote_subst\"`'\narchiver_list_spec='`$ECHO \"$archiver_list_spec\" | $SED \"$delay_single_quote_subst\"`'\nSTRIP='`$ECHO \"$STRIP\" | $SED \"$delay_single_quote_subst\"`'\nRANLIB='`$ECHO \"$RANLIB\" | $SED \"$delay_single_quote_subst\"`'\nold_postinstall_cmds='`$ECHO \"$old_postinstall_cmds\" | $SED \"$delay_single_quote_subst\"`'\nold_postuninstall_cmds='`$ECHO \"$old_postuninstall_cmds\" | $SED \"$delay_single_quote_subst\"`'\nold_archive_cmds='`$ECHO \"$old_archive_cmds\" | $SED \"$delay_single_quote_subst\"`'\nlock_old_archive_extraction='`$ECHO \"$lock_old_archive_extraction\" | $SED \"$delay_single_quote_subst\"`'\nCC='`$ECHO \"$CC\" | $SED \"$delay_single_quote_subst\"`'\nCFLAGS='`$ECHO \"$CFLAGS\" | $SED \"$delay_single_quote_subst\"`'\ncompiler='`$ECHO \"$compiler\" | $SED \"$delay_single_quote_subst\"`'\nGCC='`$ECHO \"$GCC\" | $SED \"$delay_single_quote_subst\"`'\nlt_cv_sys_global_symbol_pipe='`$ECHO \"$lt_cv_sys_global_symbol_pipe\" | $SED \"$delay_single_quote_subst\"`'\nlt_cv_sys_global_symbol_to_cdecl='`$ECHO \"$lt_cv_sys_global_symbol_to_cdecl\" | $SED \"$delay_single_quote_subst\"`'\nlt_cv_sys_global_symbol_to_c_name_address='`$ECHO \"$lt_cv_sys_global_symbol_to_c_name_address\" | $SED \"$delay_single_quote_subst\"`'\nlt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO \"$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix\" | $SED \"$delay_single_quote_subst\"`'\nnm_file_list_spec='`$ECHO \"$nm_file_list_spec\" | $SED \"$delay_single_quote_subst\"`'\nlt_sysroot='`$ECHO \"$lt_sysroot\" | $SED \"$delay_single_quote_subst\"`'\nobjdir='`$ECHO \"$objdir\" | $SED \"$delay_single_quote_subst\"`'\nMAGIC_CMD='`$ECHO \"$MAGIC_CMD\" | $SED \"$delay_single_quote_subst\"`'\nlt_prog_compiler_no_builtin_flag='`$ECHO \"$lt_prog_compiler_no_builtin_flag\" | $SED \"$delay_single_quote_subst\"`'\nlt_prog_compiler_pic='`$ECHO \"$lt_prog_compiler_pic\" | $SED \"$delay_single_quote_subst\"`'\nlt_prog_compiler_wl='`$ECHO \"$lt_prog_compiler_wl\" | $SED \"$delay_single_quote_subst\"`'\nlt_prog_compiler_static='`$ECHO \"$lt_prog_compiler_static\" | $SED \"$delay_single_quote_subst\"`'\nlt_cv_prog_compiler_c_o='`$ECHO \"$lt_cv_prog_compiler_c_o\" | $SED \"$delay_single_quote_subst\"`'\nneed_locks='`$ECHO \"$need_locks\" | $SED \"$delay_single_quote_subst\"`'\nMANIFEST_TOOL='`$ECHO \"$MANIFEST_TOOL\" | $SED \"$delay_single_quote_subst\"`'\nDSYMUTIL='`$ECHO \"$DSYMUTIL\" | $SED \"$delay_single_quote_subst\"`'\nNMEDIT='`$ECHO \"$NMEDIT\" | $SED \"$delay_single_quote_subst\"`'\nLIPO='`$ECHO \"$LIPO\" | $SED \"$delay_single_quote_subst\"`'\nOTOOL='`$ECHO \"$OTOOL\" | $SED \"$delay_single_quote_subst\"`'\nOTOOL64='`$ECHO \"$OTOOL64\" | $SED \"$delay_single_quote_subst\"`'\nlibext='`$ECHO \"$libext\" | $SED \"$delay_single_quote_subst\"`'\nshrext_cmds='`$ECHO \"$shrext_cmds\" | $SED \"$delay_single_quote_subst\"`'\nextract_expsyms_cmds='`$ECHO \"$extract_expsyms_cmds\" | $SED \"$delay_single_quote_subst\"`'\narchive_cmds_need_lc='`$ECHO \"$archive_cmds_need_lc\" | $SED \"$delay_single_quote_subst\"`'\nenable_shared_with_static_runtimes='`$ECHO \"$enable_shared_with_static_runtimes\" | $SED \"$delay_single_quote_subst\"`'\nexport_dynamic_flag_spec='`$ECHO \"$export_dynamic_flag_spec\" | $SED \"$delay_single_quote_subst\"`'\nwhole_archive_flag_spec='`$ECHO \"$whole_archive_flag_spec\" | $SED \"$delay_single_quote_subst\"`'\ncompiler_needs_object='`$ECHO \"$compiler_needs_object\" | $SED \"$delay_single_quote_subst\"`'\nold_archive_from_new_cmds='`$ECHO \"$old_archive_from_new_cmds\" | $SED \"$delay_single_quote_subst\"`'\nold_archive_from_expsyms_cmds='`$ECHO \"$old_archive_from_expsyms_cmds\" | $SED \"$delay_single_quote_subst\"`'\narchive_cmds='`$ECHO \"$archive_cmds\" | $SED \"$delay_single_quote_subst\"`'\narchive_expsym_cmds='`$ECHO \"$archive_expsym_cmds\" | $SED \"$delay_single_quote_subst\"`'\nmodule_cmds='`$ECHO \"$module_cmds\" | $SED \"$delay_single_quote_subst\"`'\nmodule_expsym_cmds='`$ECHO \"$module_expsym_cmds\" | $SED \"$delay_single_quote_subst\"`'\nwith_gnu_ld='`$ECHO \"$with_gnu_ld\" | $SED \"$delay_single_quote_subst\"`'\nallow_undefined_flag='`$ECHO \"$allow_undefined_flag\" | $SED \"$delay_single_quote_subst\"`'\nno_undefined_flag='`$ECHO \"$no_undefined_flag\" | $SED \"$delay_single_quote_subst\"`'\nhardcode_libdir_flag_spec='`$ECHO \"$hardcode_libdir_flag_spec\" | $SED \"$delay_single_quote_subst\"`'\nhardcode_libdir_separator='`$ECHO \"$hardcode_libdir_separator\" | $SED \"$delay_single_quote_subst\"`'\nhardcode_direct='`$ECHO \"$hardcode_direct\" | $SED \"$delay_single_quote_subst\"`'\nhardcode_direct_absolute='`$ECHO \"$hardcode_direct_absolute\" | $SED \"$delay_single_quote_subst\"`'\nhardcode_minus_L='`$ECHO \"$hardcode_minus_L\" | $SED \"$delay_single_quote_subst\"`'\nhardcode_shlibpath_var='`$ECHO \"$hardcode_shlibpath_var\" | $SED \"$delay_single_quote_subst\"`'\nhardcode_automatic='`$ECHO \"$hardcode_automatic\" | $SED \"$delay_single_quote_subst\"`'\ninherit_rpath='`$ECHO \"$inherit_rpath\" | $SED \"$delay_single_quote_subst\"`'\nlink_all_deplibs='`$ECHO \"$link_all_deplibs\" | $SED \"$delay_single_quote_subst\"`'\nalways_export_symbols='`$ECHO \"$always_export_symbols\" | $SED \"$delay_single_quote_subst\"`'\nexport_symbols_cmds='`$ECHO \"$export_symbols_cmds\" | $SED \"$delay_single_quote_subst\"`'\nexclude_expsyms='`$ECHO \"$exclude_expsyms\" | $SED \"$delay_single_quote_subst\"`'\ninclude_expsyms='`$ECHO \"$include_expsyms\" | $SED \"$delay_single_quote_subst\"`'\nprelink_cmds='`$ECHO \"$prelink_cmds\" | $SED \"$delay_single_quote_subst\"`'\npostlink_cmds='`$ECHO \"$postlink_cmds\" | $SED \"$delay_single_quote_subst\"`'\nfile_list_spec='`$ECHO \"$file_list_spec\" | $SED \"$delay_single_quote_subst\"`'\nvariables_saved_for_relink='`$ECHO \"$variables_saved_for_relink\" | $SED \"$delay_single_quote_subst\"`'\nneed_lib_prefix='`$ECHO \"$need_lib_prefix\" | $SED \"$delay_single_quote_subst\"`'\nneed_version='`$ECHO \"$need_version\" | $SED \"$delay_single_quote_subst\"`'\nversion_type='`$ECHO \"$version_type\" | $SED \"$delay_single_quote_subst\"`'\nrunpath_var='`$ECHO \"$runpath_var\" | $SED \"$delay_single_quote_subst\"`'\nshlibpath_var='`$ECHO \"$shlibpath_var\" | $SED \"$delay_single_quote_subst\"`'\nshlibpath_overrides_runpath='`$ECHO \"$shlibpath_overrides_runpath\" | $SED \"$delay_single_quote_subst\"`'\nlibname_spec='`$ECHO \"$libname_spec\" | $SED \"$delay_single_quote_subst\"`'\nlibrary_names_spec='`$ECHO \"$library_names_spec\" | $SED \"$delay_single_quote_subst\"`'\nsoname_spec='`$ECHO \"$soname_spec\" | $SED \"$delay_single_quote_subst\"`'\ninstall_override_mode='`$ECHO \"$install_override_mode\" | $SED \"$delay_single_quote_subst\"`'\npostinstall_cmds='`$ECHO \"$postinstall_cmds\" | $SED \"$delay_single_quote_subst\"`'\npostuninstall_cmds='`$ECHO \"$postuninstall_cmds\" | $SED \"$delay_single_quote_subst\"`'\nfinish_cmds='`$ECHO \"$finish_cmds\" | $SED \"$delay_single_quote_subst\"`'\nfinish_eval='`$ECHO \"$finish_eval\" | $SED \"$delay_single_quote_subst\"`'\nhardcode_into_libs='`$ECHO \"$hardcode_into_libs\" | $SED \"$delay_single_quote_subst\"`'\nsys_lib_search_path_spec='`$ECHO \"$sys_lib_search_path_spec\" | $SED \"$delay_single_quote_subst\"`'\nsys_lib_dlsearch_path_spec='`$ECHO \"$sys_lib_dlsearch_path_spec\" | $SED \"$delay_single_quote_subst\"`'\nhardcode_action='`$ECHO \"$hardcode_action\" | $SED \"$delay_single_quote_subst\"`'\nenable_dlopen='`$ECHO \"$enable_dlopen\" | $SED \"$delay_single_quote_subst\"`'\nenable_dlopen_self='`$ECHO \"$enable_dlopen_self\" | $SED \"$delay_single_quote_subst\"`'\nenable_dlopen_self_static='`$ECHO \"$enable_dlopen_self_static\" | $SED \"$delay_single_quote_subst\"`'\nold_striplib='`$ECHO \"$old_striplib\" | $SED \"$delay_single_quote_subst\"`'\nstriplib='`$ECHO \"$striplib\" | $SED \"$delay_single_quote_subst\"`'\ncompiler_lib_search_dirs='`$ECHO \"$compiler_lib_search_dirs\" | $SED \"$delay_single_quote_subst\"`'\npredep_objects='`$ECHO \"$predep_objects\" | $SED \"$delay_single_quote_subst\"`'\npostdep_objects='`$ECHO \"$postdep_objects\" | $SED \"$delay_single_quote_subst\"`'\npredeps='`$ECHO \"$predeps\" | $SED \"$delay_single_quote_subst\"`'\npostdeps='`$ECHO \"$postdeps\" | $SED \"$delay_single_quote_subst\"`'\ncompiler_lib_search_path='`$ECHO \"$compiler_lib_search_path\" | $SED \"$delay_single_quote_subst\"`'\nLD_CXX='`$ECHO \"$LD_CXX\" | $SED \"$delay_single_quote_subst\"`'\nreload_flag_CXX='`$ECHO \"$reload_flag_CXX\" | $SED \"$delay_single_quote_subst\"`'\nreload_cmds_CXX='`$ECHO \"$reload_cmds_CXX\" | $SED \"$delay_single_quote_subst\"`'\nold_archive_cmds_CXX='`$ECHO \"$old_archive_cmds_CXX\" | $SED \"$delay_single_quote_subst\"`'\ncompiler_CXX='`$ECHO \"$compiler_CXX\" | $SED \"$delay_single_quote_subst\"`'\nGCC_CXX='`$ECHO \"$GCC_CXX\" | $SED \"$delay_single_quote_subst\"`'\nlt_prog_compiler_no_builtin_flag_CXX='`$ECHO \"$lt_prog_compiler_no_builtin_flag_CXX\" | $SED \"$delay_single_quote_subst\"`'\nlt_prog_compiler_pic_CXX='`$ECHO \"$lt_prog_compiler_pic_CXX\" | $SED \"$delay_single_quote_subst\"`'\nlt_prog_compiler_wl_CXX='`$ECHO \"$lt_prog_compiler_wl_CXX\" | $SED \"$delay_single_quote_subst\"`'\nlt_prog_compiler_static_CXX='`$ECHO \"$lt_prog_compiler_static_CXX\" | $SED \"$delay_single_quote_subst\"`'\nlt_cv_prog_compiler_c_o_CXX='`$ECHO \"$lt_cv_prog_compiler_c_o_CXX\" | $SED \"$delay_single_quote_subst\"`'\narchive_cmds_need_lc_CXX='`$ECHO \"$archive_cmds_need_lc_CXX\" | $SED \"$delay_single_quote_subst\"`'\nenable_shared_with_static_runtimes_CXX='`$ECHO \"$enable_shared_with_static_runtimes_CXX\" | $SED \"$delay_single_quote_subst\"`'\nexport_dynamic_flag_spec_CXX='`$ECHO \"$export_dynamic_flag_spec_CXX\" | $SED \"$delay_single_quote_subst\"`'\nwhole_archive_flag_spec_CXX='`$ECHO \"$whole_archive_flag_spec_CXX\" | $SED \"$delay_single_quote_subst\"`'\ncompiler_needs_object_CXX='`$ECHO \"$compiler_needs_object_CXX\" | $SED \"$delay_single_quote_subst\"`'\nold_archive_from_new_cmds_CXX='`$ECHO \"$old_archive_from_new_cmds_CXX\" | $SED \"$delay_single_quote_subst\"`'\nold_archive_from_expsyms_cmds_CXX='`$ECHO \"$old_archive_from_expsyms_cmds_CXX\" | $SED \"$delay_single_quote_subst\"`'\narchive_cmds_CXX='`$ECHO \"$archive_cmds_CXX\" | $SED \"$delay_single_quote_subst\"`'\narchive_expsym_cmds_CXX='`$ECHO \"$archive_expsym_cmds_CXX\" | $SED \"$delay_single_quote_subst\"`'\nmodule_cmds_CXX='`$ECHO \"$module_cmds_CXX\" | $SED \"$delay_single_quote_subst\"`'\nmodule_expsym_cmds_CXX='`$ECHO \"$module_expsym_cmds_CXX\" | $SED \"$delay_single_quote_subst\"`'\nwith_gnu_ld_CXX='`$ECHO \"$with_gnu_ld_CXX\" | $SED \"$delay_single_quote_subst\"`'\nallow_undefined_flag_CXX='`$ECHO \"$allow_undefined_flag_CXX\" | $SED \"$delay_single_quote_subst\"`'\nno_undefined_flag_CXX='`$ECHO \"$no_undefined_flag_CXX\" | $SED \"$delay_single_quote_subst\"`'\nhardcode_libdir_flag_spec_CXX='`$ECHO \"$hardcode_libdir_flag_spec_CXX\" | $SED \"$delay_single_quote_subst\"`'\nhardcode_libdir_separator_CXX='`$ECHO \"$hardcode_libdir_separator_CXX\" | $SED \"$delay_single_quote_subst\"`'\nhardcode_direct_CXX='`$ECHO \"$hardcode_direct_CXX\" | $SED \"$delay_single_quote_subst\"`'\nhardcode_direct_absolute_CXX='`$ECHO \"$hardcode_direct_absolute_CXX\" | $SED \"$delay_single_quote_subst\"`'\nhardcode_minus_L_CXX='`$ECHO \"$hardcode_minus_L_CXX\" | $SED \"$delay_single_quote_subst\"`'\nhardcode_shlibpath_var_CXX='`$ECHO \"$hardcode_shlibpath_var_CXX\" | $SED \"$delay_single_quote_subst\"`'\nhardcode_automatic_CXX='`$ECHO \"$hardcode_automatic_CXX\" | $SED \"$delay_single_quote_subst\"`'\ninherit_rpath_CXX='`$ECHO \"$inherit_rpath_CXX\" | $SED \"$delay_single_quote_subst\"`'\nlink_all_deplibs_CXX='`$ECHO \"$link_all_deplibs_CXX\" | $SED \"$delay_single_quote_subst\"`'\nalways_export_symbols_CXX='`$ECHO \"$always_export_symbols_CXX\" | $SED \"$delay_single_quote_subst\"`'\nexport_symbols_cmds_CXX='`$ECHO \"$export_symbols_cmds_CXX\" | $SED \"$delay_single_quote_subst\"`'\nexclude_expsyms_CXX='`$ECHO \"$exclude_expsyms_CXX\" | $SED \"$delay_single_quote_subst\"`'\ninclude_expsyms_CXX='`$ECHO \"$include_expsyms_CXX\" | $SED \"$delay_single_quote_subst\"`'\nprelink_cmds_CXX='`$ECHO \"$prelink_cmds_CXX\" | $SED \"$delay_single_quote_subst\"`'\npostlink_cmds_CXX='`$ECHO \"$postlink_cmds_CXX\" | $SED \"$delay_single_quote_subst\"`'\nfile_list_spec_CXX='`$ECHO \"$file_list_spec_CXX\" | $SED \"$delay_single_quote_subst\"`'\nhardcode_action_CXX='`$ECHO \"$hardcode_action_CXX\" | $SED \"$delay_single_quote_subst\"`'\ncompiler_lib_search_dirs_CXX='`$ECHO \"$compiler_lib_search_dirs_CXX\" | $SED \"$delay_single_quote_subst\"`'\npredep_objects_CXX='`$ECHO \"$predep_objects_CXX\" | $SED \"$delay_single_quote_subst\"`'\npostdep_objects_CXX='`$ECHO \"$postdep_objects_CXX\" | $SED \"$delay_single_quote_subst\"`'\npredeps_CXX='`$ECHO \"$predeps_CXX\" | $SED \"$delay_single_quote_subst\"`'\npostdeps_CXX='`$ECHO \"$postdeps_CXX\" | $SED \"$delay_single_quote_subst\"`'\ncompiler_lib_search_path_CXX='`$ECHO \"$compiler_lib_search_path_CXX\" | $SED \"$delay_single_quote_subst\"`'\n\nLTCC='$LTCC'\nLTCFLAGS='$LTCFLAGS'\ncompiler='$compiler_DEFAULT'\n\n# A function that is used when there is no print builtin or printf.\nfunc_fallback_echo ()\n{\n  eval 'cat <<_LTECHO_EOF\n\\$1\n_LTECHO_EOF'\n}\n\n# Quote evaled strings.\nfor var in AS \\\nDLLTOOL \\\nOBJDUMP \\\nSHELL \\\nECHO \\\nPATH_SEPARATOR \\\nSED \\\nGREP \\\nEGREP \\\nFGREP \\\nLD \\\nNM \\\nLN_S \\\nlt_SP2NL \\\nlt_NL2SP \\\nreload_flag \\\ndeplibs_check_method \\\nfile_magic_cmd \\\nfile_magic_glob \\\nwant_nocaseglob \\\nsharedlib_from_linklib_cmd \\\nAR \\\nAR_FLAGS \\\narchiver_list_spec \\\nSTRIP \\\nRANLIB \\\nCC \\\nCFLAGS \\\ncompiler \\\nlt_cv_sys_global_symbol_pipe \\\nlt_cv_sys_global_symbol_to_cdecl \\\nlt_cv_sys_global_symbol_to_c_name_address \\\nlt_cv_sys_global_symbol_to_c_name_address_lib_prefix \\\nnm_file_list_spec \\\nlt_prog_compiler_no_builtin_flag \\\nlt_prog_compiler_pic \\\nlt_prog_compiler_wl \\\nlt_prog_compiler_static \\\nlt_cv_prog_compiler_c_o \\\nneed_locks \\\nMANIFEST_TOOL \\\nDSYMUTIL \\\nNMEDIT \\\nLIPO \\\nOTOOL \\\nOTOOL64 \\\nshrext_cmds \\\nexport_dynamic_flag_spec \\\nwhole_archive_flag_spec \\\ncompiler_needs_object \\\nwith_gnu_ld \\\nallow_undefined_flag \\\nno_undefined_flag \\\nhardcode_libdir_flag_spec \\\nhardcode_libdir_separator \\\nexclude_expsyms \\\ninclude_expsyms \\\nfile_list_spec \\\nvariables_saved_for_relink \\\nlibname_spec \\\nlibrary_names_spec \\\nsoname_spec \\\ninstall_override_mode \\\nfinish_eval \\\nold_striplib \\\nstriplib \\\ncompiler_lib_search_dirs \\\npredep_objects \\\npostdep_objects \\\npredeps \\\npostdeps \\\ncompiler_lib_search_path \\\nLD_CXX \\\nreload_flag_CXX \\\ncompiler_CXX \\\nlt_prog_compiler_no_builtin_flag_CXX \\\nlt_prog_compiler_pic_CXX \\\nlt_prog_compiler_wl_CXX \\\nlt_prog_compiler_static_CXX \\\nlt_cv_prog_compiler_c_o_CXX \\\nexport_dynamic_flag_spec_CXX \\\nwhole_archive_flag_spec_CXX \\\ncompiler_needs_object_CXX \\\nwith_gnu_ld_CXX \\\nallow_undefined_flag_CXX \\\nno_undefined_flag_CXX \\\nhardcode_libdir_flag_spec_CXX \\\nhardcode_libdir_separator_CXX \\\nexclude_expsyms_CXX \\\ninclude_expsyms_CXX \\\nfile_list_spec_CXX \\\ncompiler_lib_search_dirs_CXX \\\npredep_objects_CXX \\\npostdep_objects_CXX \\\npredeps_CXX \\\npostdeps_CXX \\\ncompiler_lib_search_path_CXX; do\n    case \\`eval \\\\\\\\\\$ECHO \\\\\\\\\"\"\\\\\\\\\\$\\$var\"\\\\\\\\\"\\` in\n    *[\\\\\\\\\\\\\\`\\\\\"\\\\\\$]*)\n      eval \"lt_\\$var=\\\\\\\\\\\\\"\\\\\\`\\\\\\$ECHO \\\\\"\\\\\\$\\$var\\\\\" | \\\\\\$SED \\\\\"\\\\\\$sed_quote_subst\\\\\"\\\\\\`\\\\\\\\\\\\\"\"\n      ;;\n    *)\n      eval \"lt_\\$var=\\\\\\\\\\\\\"\\\\\\$\\$var\\\\\\\\\\\\\"\"\n      ;;\n    esac\ndone\n\n# Double-quote double-evaled strings.\nfor var in reload_cmds \\\nold_postinstall_cmds \\\nold_postuninstall_cmds \\\nold_archive_cmds \\\nextract_expsyms_cmds \\\nold_archive_from_new_cmds \\\nold_archive_from_expsyms_cmds \\\narchive_cmds \\\narchive_expsym_cmds \\\nmodule_cmds \\\nmodule_expsym_cmds \\\nexport_symbols_cmds \\\nprelink_cmds \\\npostlink_cmds \\\npostinstall_cmds \\\npostuninstall_cmds \\\nfinish_cmds \\\nsys_lib_search_path_spec \\\nsys_lib_dlsearch_path_spec \\\nreload_cmds_CXX \\\nold_archive_cmds_CXX \\\nold_archive_from_new_cmds_CXX \\\nold_archive_from_expsyms_cmds_CXX \\\narchive_cmds_CXX \\\narchive_expsym_cmds_CXX \\\nmodule_cmds_CXX \\\nmodule_expsym_cmds_CXX \\\nexport_symbols_cmds_CXX \\\nprelink_cmds_CXX \\\npostlink_cmds_CXX; do\n    case \\`eval \\\\\\\\\\$ECHO \\\\\\\\\"\"\\\\\\\\\\$\\$var\"\\\\\\\\\"\\` in\n    *[\\\\\\\\\\\\\\`\\\\\"\\\\\\$]*)\n      eval \"lt_\\$var=\\\\\\\\\\\\\"\\\\\\`\\\\\\$ECHO \\\\\"\\\\\\$\\$var\\\\\" | \\\\\\$SED -e \\\\\"\\\\\\$double_quote_subst\\\\\" -e \\\\\"\\\\\\$sed_quote_subst\\\\\" -e \\\\\"\\\\\\$delay_variable_subst\\\\\"\\\\\\`\\\\\\\\\\\\\"\"\n      ;;\n    *)\n      eval \"lt_\\$var=\\\\\\\\\\\\\"\\\\\\$\\$var\\\\\\\\\\\\\"\"\n      ;;\n    esac\ndone\n\nac_aux_dir='$ac_aux_dir'\nxsi_shell='$xsi_shell'\nlt_shell_append='$lt_shell_append'\n\n# See if we are running on zsh, and set the options which allow our\n# commands through without removal of \\ escapes INIT.\nif test -n \"\\${ZSH_VERSION+set}\" ; then\n   setopt NO_GLOB_SUBST\nfi\n\n\n    PACKAGE='$PACKAGE'\n    VERSION='$VERSION'\n    TIMESTAMP='$TIMESTAMP'\n    RM='$RM'\n    ofile='$ofile'\n\n\n\n\n\n\n_ACEOF\n\ncat >>$CONFIG_STATUS <<\\_ACEOF || ac_write_fail=1\n\n# Handling of arguments.\nfor ac_config_target in $ac_config_targets\ndo\n  case $ac_config_target in\n    \"libtool\") CONFIG_COMMANDS=\"$CONFIG_COMMANDS libtool\" ;;\n    \"Makefile\") CONFIG_FILES=\"$CONFIG_FILES Makefile\" ;;\n    \"portaudio-2.0.pc\") CONFIG_FILES=\"$CONFIG_FILES portaudio-2.0.pc\" ;;\n\n  *) as_fn_error $? \"invalid argument: \\`$ac_config_target'\" \"$LINENO\" 5;;\n  esac\ndone\n\n\n# If the user did not use the arguments to specify the items to instantiate,\n# then the envvar interface is used.  Set only those that are not.\n# We use the long form for the default assignment because of an extremely\n# bizarre bug on SunOS 4.1.3.\nif $ac_need_defaults; then\n  test \"${CONFIG_FILES+set}\" = set || CONFIG_FILES=$config_files\n  test \"${CONFIG_COMMANDS+set}\" = set || CONFIG_COMMANDS=$config_commands\nfi\n\n# Have a temporary directory for convenience.  Make it in the build tree\n# simply because there is no reason against having it here, and in addition,\n# creating and moving files from /tmp can sometimes cause problems.\n# Hook for its removal unless debugging.\n# Note that there is a small window in which the directory will not be cleaned:\n# after its creation but before its name has been assigned to `$tmp'.\n$debug ||\n{\n  tmp= ac_tmp=\n  trap 'exit_status=$?\n  : \"${ac_tmp:=$tmp}\"\n  { test ! -d \"$ac_tmp\" || rm -fr \"$ac_tmp\"; } && exit $exit_status\n' 0\n  trap 'as_fn_exit 1' 1 2 13 15\n}\n# Create a (secure) tmp directory for tmp files.\n\n{\n  tmp=`(umask 077 && mktemp -d \"./confXXXXXX\") 2>/dev/null` &&\n  test -d \"$tmp\"\n}  ||\n{\n  tmp=./conf$$-$RANDOM\n  (umask 077 && mkdir \"$tmp\")\n} || as_fn_error $? \"cannot create a temporary directory in .\" \"$LINENO\" 5\nac_tmp=$tmp\n\n# Set up the scripts for CONFIG_FILES section.\n# No need to generate them if there are no CONFIG_FILES.\n# This happens for instance with `./config.status config.h'.\nif test -n \"$CONFIG_FILES\"; then\n\n\nac_cr=`echo X | tr X '\\015'`\n# On cygwin, bash can eat \\r inside `` if the user requested igncr.\n# But we know of no other shell where ac_cr would be empty at this\n# point, so we can use a bashism as a fallback.\nif test \"x$ac_cr\" = x; then\n  eval ac_cr=\\$\\'\\\\r\\'\nfi\nac_cs_awk_cr=`$AWK 'BEGIN { print \"a\\rb\" }' </dev/null 2>/dev/null`\nif test \"$ac_cs_awk_cr\" = \"a${ac_cr}b\"; then\n  ac_cs_awk_cr='\\\\r'\nelse\n  ac_cs_awk_cr=$ac_cr\nfi\n\necho 'BEGIN {' >\"$ac_tmp/subs1.awk\" &&\n_ACEOF\n\n\n{\n  echo \"cat >conf$$subs.awk <<_ACEOF\" &&\n  echo \"$ac_subst_vars\" | sed 's/.*/&!$&$ac_delim/' &&\n  echo \"_ACEOF\"\n} >conf$$subs.sh ||\n  as_fn_error $? \"could not make $CONFIG_STATUS\" \"$LINENO\" 5\nac_delim_num=`echo \"$ac_subst_vars\" | grep -c '^'`\nac_delim='%!_!# '\nfor ac_last_try in false false false false false :; do\n  . ./conf$$subs.sh ||\n    as_fn_error $? \"could not make $CONFIG_STATUS\" \"$LINENO\" 5\n\n  ac_delim_n=`sed -n \"s/.*$ac_delim\\$/X/p\" conf$$subs.awk | grep -c X`\n  if test $ac_delim_n = $ac_delim_num; then\n    break\n  elif $ac_last_try; then\n    as_fn_error $? \"could not make $CONFIG_STATUS\" \"$LINENO\" 5\n  else\n    ac_delim=\"$ac_delim!$ac_delim _$ac_delim!! \"\n  fi\ndone\nrm -f conf$$subs.sh\n\ncat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1\ncat >>\"\\$ac_tmp/subs1.awk\" <<\\\\_ACAWK &&\n_ACEOF\nsed -n '\nh\ns/^/S[\"/; s/!.*/\"]=/\np\ng\ns/^[^!]*!//\n:repl\nt repl\ns/'\"$ac_delim\"'$//\nt delim\n:nl\nh\ns/\\(.\\{148\\}\\)..*/\\1/\nt more1\ns/[\"\\\\]/\\\\&/g; s/^/\"/; s/$/\\\\n\"\\\\/\np\nn\nb repl\n:more1\ns/[\"\\\\]/\\\\&/g; s/^/\"/; s/$/\"\\\\/\np\ng\ns/.\\{148\\}//\nt nl\n:delim\nh\ns/\\(.\\{148\\}\\)..*/\\1/\nt more2\ns/[\"\\\\]/\\\\&/g; s/^/\"/; s/$/\"/\np\nb\n:more2\ns/[\"\\\\]/\\\\&/g; s/^/\"/; s/$/\"\\\\/\np\ng\ns/.\\{148\\}//\nt delim\n' <conf$$subs.awk | sed '\n/^[^\"\"]/{\n  N\n  s/\\n//\n}\n' >>$CONFIG_STATUS || ac_write_fail=1\nrm -f conf$$subs.awk\ncat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1\n_ACAWK\ncat >>\"\\$ac_tmp/subs1.awk\" <<_ACAWK &&\n  for (key in S) S_is_set[key] = 1\n  FS = \"\u0007\"\n\n}\n{\n  line = $ 0\n  nfields = split(line, field, \"@\")\n  substed = 0\n  len = length(field[1])\n  for (i = 2; i < nfields; i++) {\n    key = field[i]\n    keylen = length(key)\n    if (S_is_set[key]) {\n      value = S[key]\n      line = substr(line, 1, len) \"\" value \"\" substr(line, len + keylen + 3)\n      len += length(value) + length(field[++i])\n      substed = 1\n    } else\n      len += 1 + keylen\n  }\n\n  print line\n}\n\n_ACAWK\n_ACEOF\ncat >>$CONFIG_STATUS <<\\_ACEOF || ac_write_fail=1\nif sed \"s/$ac_cr//\" < /dev/null > /dev/null 2>&1; then\n  sed \"s/$ac_cr\\$//; s/$ac_cr/$ac_cs_awk_cr/g\"\nelse\n  cat\nfi < \"$ac_tmp/subs1.awk\" > \"$ac_tmp/subs.awk\" \\\n  || as_fn_error $? \"could not setup config files machinery\" \"$LINENO\" 5\n_ACEOF\n\n# VPATH may cause trouble with some makes, so we remove sole $(srcdir),\n# ${srcdir} and @srcdir@ entries from VPATH if srcdir is \".\", strip leading and\n# trailing colons and then remove the whole line if VPATH becomes empty\n# (actually we leave an empty line to preserve line numbers).\nif test \"x$srcdir\" = x.; then\n  ac_vpsub='/^[\t ]*VPATH[\t ]*=[\t ]*/{\nh\ns///\ns/^/:/\ns/[\t ]*$/:/\ns/:\\$(srcdir):/:/g\ns/:\\${srcdir}:/:/g\ns/:@srcdir@:/:/g\ns/^:*//\ns/:*$//\nx\ns/\\(=[\t ]*\\).*/\\1/\nG\ns/\\n//\ns/^[^=]*=[\t ]*$//\n}'\nfi\n\ncat >>$CONFIG_STATUS <<\\_ACEOF || ac_write_fail=1\nfi # test -n \"$CONFIG_FILES\"\n\n\neval set X \"  :F $CONFIG_FILES      :C $CONFIG_COMMANDS\"\nshift\nfor ac_tag\ndo\n  case $ac_tag in\n  :[FHLC]) ac_mode=$ac_tag; continue;;\n  esac\n  case $ac_mode$ac_tag in\n  :[FHL]*:*);;\n  :L* | :C*:*) as_fn_error $? \"invalid tag \\`$ac_tag'\" \"$LINENO\" 5;;\n  :[FH]-) ac_tag=-:-;;\n  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;\n  esac\n  ac_save_IFS=$IFS\n  IFS=:\n  set x $ac_tag\n  IFS=$ac_save_IFS\n  shift\n  ac_file=$1\n  shift\n\n  case $ac_mode in\n  :L) ac_source=$1;;\n  :[FH])\n    ac_file_inputs=\n    for ac_f\n    do\n      case $ac_f in\n      -) ac_f=\"$ac_tmp/stdin\";;\n      *) # Look for the file first in the build tree, then in the source tree\n\t # (if the path is not absolute).  The absolute path cannot be DOS-style,\n\t # because $ac_f cannot contain `:'.\n\t test -f \"$ac_f\" ||\n\t   case $ac_f in\n\t   [\\\\/$]*) false;;\n\t   *) test -f \"$srcdir/$ac_f\" && ac_f=\"$srcdir/$ac_f\";;\n\t   esac ||\n\t   as_fn_error 1 \"cannot find input file: \\`$ac_f'\" \"$LINENO\" 5;;\n      esac\n      case $ac_f in *\\'*) ac_f=`$as_echo \"$ac_f\" | sed \"s/'/'\\\\\\\\\\\\\\\\''/g\"`;; esac\n      as_fn_append ac_file_inputs \" '$ac_f'\"\n    done\n\n    # Let's still pretend it is `configure' which instantiates (i.e., don't\n    # use $as_me), people would be surprised to read:\n    #    /* config.h.  Generated by config.status.  */\n    configure_input='Generated from '`\n\t  $as_echo \"$*\" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'\n\t`' by configure.'\n    if test x\"$ac_file\" != x-; then\n      configure_input=\"$ac_file.  $configure_input\"\n      { $as_echo \"$as_me:${as_lineno-$LINENO}: creating $ac_file\" >&5\n$as_echo \"$as_me: creating $ac_file\" >&6;}\n    fi\n    # Neutralize special characters interpreted by sed in replacement strings.\n    case $configure_input in #(\n    *\\&* | *\\|* | *\\\\* )\n       ac_sed_conf_input=`$as_echo \"$configure_input\" |\n       sed 's/[\\\\\\\\&|]/\\\\\\\\&/g'`;; #(\n    *) ac_sed_conf_input=$configure_input;;\n    esac\n\n    case $ac_tag in\n    *:-:* | *:-) cat >\"$ac_tmp/stdin\" \\\n      || as_fn_error $? \"could not create $ac_file\" \"$LINENO\" 5 ;;\n    esac\n    ;;\n  esac\n\n  ac_dir=`$as_dirname -- \"$ac_file\" ||\n$as_expr X\"$ac_file\" : 'X\\(.*[^/]\\)//*[^/][^/]*/*$' \\| \\\n\t X\"$ac_file\" : 'X\\(//\\)[^/]' \\| \\\n\t X\"$ac_file\" : 'X\\(//\\)$' \\| \\\n\t X\"$ac_file\" : 'X\\(/\\)' \\| . 2>/dev/null ||\n$as_echo X\"$ac_file\" |\n    sed '/^X\\(.*[^/]\\)\\/\\/*[^/][^/]*\\/*$/{\n\t    s//\\1/\n\t    q\n\t  }\n\t  /^X\\(\\/\\/\\)[^/].*/{\n\t    s//\\1/\n\t    q\n\t  }\n\t  /^X\\(\\/\\/\\)$/{\n\t    s//\\1/\n\t    q\n\t  }\n\t  /^X\\(\\/\\).*/{\n\t    s//\\1/\n\t    q\n\t  }\n\t  s/.*/./; q'`\n  as_dir=\"$ac_dir\"; as_fn_mkdir_p\n  ac_builddir=.\n\ncase \"$ac_dir\" in\n.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;\n*)\n  ac_dir_suffix=/`$as_echo \"$ac_dir\" | sed 's|^\\.[\\\\/]||'`\n  # A \"..\" for each directory in $ac_dir_suffix.\n  ac_top_builddir_sub=`$as_echo \"$ac_dir_suffix\" | sed 's|/[^\\\\/]*|/..|g;s|/||'`\n  case $ac_top_builddir_sub in\n  \"\") ac_top_builddir_sub=. ac_top_build_prefix= ;;\n  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;\n  esac ;;\nesac\nac_abs_top_builddir=$ac_pwd\nac_abs_builddir=$ac_pwd$ac_dir_suffix\n# for backward compatibility:\nac_top_builddir=$ac_top_build_prefix\n\ncase $srcdir in\n  .)  # We are building in place.\n    ac_srcdir=.\n    ac_top_srcdir=$ac_top_builddir_sub\n    ac_abs_top_srcdir=$ac_pwd ;;\n  [\\\\/]* | ?:[\\\\/]* )  # Absolute name.\n    ac_srcdir=$srcdir$ac_dir_suffix;\n    ac_top_srcdir=$srcdir\n    ac_abs_top_srcdir=$srcdir ;;\n  *) # Relative name.\n    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix\n    ac_top_srcdir=$ac_top_build_prefix$srcdir\n    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;\nesac\nac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix\n\n\n  case $ac_mode in\n  :F)\n  #\n  # CONFIG_FILE\n  #\n\n  case $INSTALL in\n  [\\\\/$]* | ?:[\\\\/]* ) ac_INSTALL=$INSTALL ;;\n  *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;\n  esac\n_ACEOF\n\ncat >>$CONFIG_STATUS <<\\_ACEOF || ac_write_fail=1\n# If the template does not know about datarootdir, expand it.\n# FIXME: This hack should be removed a few years after 2.60.\nac_datarootdir_hack=; ac_datarootdir_seen=\nac_sed_dataroot='\n/datarootdir/ {\n  p\n  q\n}\n/@datadir@/p\n/@docdir@/p\n/@infodir@/p\n/@localedir@/p\n/@mandir@/p'\ncase `eval \"sed -n \\\"\\$ac_sed_dataroot\\\" $ac_file_inputs\"` in\n*datarootdir*) ac_datarootdir_seen=yes;;\n*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting\" >&5\n$as_echo \"$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting\" >&2;}\n_ACEOF\ncat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1\n  ac_datarootdir_hack='\n  s&@datadir@&$datadir&g\n  s&@docdir@&$docdir&g\n  s&@infodir@&$infodir&g\n  s&@localedir@&$localedir&g\n  s&@mandir@&$mandir&g\n  s&\\\\\\${datarootdir}&$datarootdir&g' ;;\nesac\n_ACEOF\n\n# Neutralize VPATH when `$srcdir' = `.'.\n# Shell code in configure.ac might set extrasub.\n# FIXME: do we really want to maintain this feature?\ncat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1\nac_sed_extra=\"$ac_vpsub\n$extrasub\n_ACEOF\ncat >>$CONFIG_STATUS <<\\_ACEOF || ac_write_fail=1\n:t\n/@[a-zA-Z_][a-zA-Z_0-9]*@/!b\ns|@configure_input@|$ac_sed_conf_input|;t t\ns&@top_builddir@&$ac_top_builddir_sub&;t t\ns&@top_build_prefix@&$ac_top_build_prefix&;t t\ns&@srcdir@&$ac_srcdir&;t t\ns&@abs_srcdir@&$ac_abs_srcdir&;t t\ns&@top_srcdir@&$ac_top_srcdir&;t t\ns&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t\ns&@builddir@&$ac_builddir&;t t\ns&@abs_builddir@&$ac_abs_builddir&;t t\ns&@abs_top_builddir@&$ac_abs_top_builddir&;t t\ns&@INSTALL@&$ac_INSTALL&;t t\n$ac_datarootdir_hack\n\"\neval sed \\\"\\$ac_sed_extra\\\" \"$ac_file_inputs\" | $AWK -f \"$ac_tmp/subs.awk\" \\\n  >$ac_tmp/out || as_fn_error $? \"could not create $ac_file\" \"$LINENO\" 5\n\ntest -z \"$ac_datarootdir_hack$ac_datarootdir_seen\" &&\n  { ac_out=`sed -n '/\\${datarootdir}/p' \"$ac_tmp/out\"`; test -n \"$ac_out\"; } &&\n  { ac_out=`sed -n '/^[\t ]*datarootdir[\t ]*:*=/p' \\\n      \"$ac_tmp/out\"`; test -z \"$ac_out\"; } &&\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \\`datarootdir'\nwhich seems to be undefined.  Please make sure it is defined\" >&5\n$as_echo \"$as_me: WARNING: $ac_file contains a reference to the variable \\`datarootdir'\nwhich seems to be undefined.  Please make sure it is defined\" >&2;}\n\n  rm -f \"$ac_tmp/stdin\"\n  case $ac_file in\n  -) cat \"$ac_tmp/out\" && rm -f \"$ac_tmp/out\";;\n  *) rm -f \"$ac_file\" && mv \"$ac_tmp/out\" \"$ac_file\";;\n  esac \\\n  || as_fn_error $? \"could not create $ac_file\" \"$LINENO\" 5\n ;;\n\n\n  :C)  { $as_echo \"$as_me:${as_lineno-$LINENO}: executing $ac_file commands\" >&5\n$as_echo \"$as_me: executing $ac_file commands\" >&6;}\n ;;\n  esac\n\n\n  case $ac_file$ac_mode in\n    \"libtool\":C)\n\n    # See if we are running on zsh, and set the options which allow our\n    # commands through without removal of \\ escapes.\n    if test -n \"${ZSH_VERSION+set}\" ; then\n      setopt NO_GLOB_SUBST\n    fi\n\n    cfgfile=\"${ofile}T\"\n    trap \"$RM \\\"$cfgfile\\\"; exit 1\" 1 2 15\n    $RM \"$cfgfile\"\n\n    cat <<_LT_EOF >> \"$cfgfile\"\n#! $SHELL\n\n# `$ECHO \"$ofile\" | sed 's%^.*/%%'` - Provide generalized library-building support services.\n# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION\n# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:\n# NOTE: Changes made to this file will be lost: look at ltmain.sh.\n#\n#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,\n#                 2006, 2007, 2008, 2009, 2010, 2011 Free Software\n#                 Foundation, Inc.\n#   Written by Gordon Matzigkeit, 1996\n#\n#   This file is part of GNU Libtool.\n#\n# GNU Libtool is free software; you can redistribute it and/or\n# modify it under the terms of the GNU General Public License as\n# published by the Free Software Foundation; either version 2 of\n# the License, or (at your option) any later version.\n#\n# As a special exception to the GNU General Public License,\n# if you distribute this file as part of a program or library that\n# is built using GNU Libtool, you may include this file under the\n# same distribution terms that you use for the rest of that program.\n#\n# GNU Libtool is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n# GNU General Public License for more details.\n#\n# You should have received a copy of the GNU General Public License\n# along with GNU Libtool; see the file COPYING.  If not, a copy\n# can be downloaded from http://www.gnu.org/licenses/gpl.html, or\n# obtained by writing to the Free Software Foundation, Inc.,\n# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n\n\n# The names of the tagged configurations supported by this script.\navailable_tags=\"CXX \"\n\n# ### BEGIN LIBTOOL CONFIG\n\n# Assembler program.\nAS=$lt_AS\n\n# DLL creation program.\nDLLTOOL=$lt_DLLTOOL\n\n# Object dumper program.\nOBJDUMP=$lt_OBJDUMP\n\n# Which release of libtool.m4 was used?\nmacro_version=$macro_version\nmacro_revision=$macro_revision\n\n# Whether or not to build shared libraries.\nbuild_libtool_libs=$enable_shared\n\n# Whether or not to build static libraries.\nbuild_old_libs=$enable_static\n\n# What type of objects to build.\npic_mode=$pic_mode\n\n# Whether or not to optimize for fast installation.\nfast_install=$enable_fast_install\n\n# Shell to use when invoking shell scripts.\nSHELL=$lt_SHELL\n\n# An echo program that protects backslashes.\nECHO=$lt_ECHO\n\n# The PATH separator for the build system.\nPATH_SEPARATOR=$lt_PATH_SEPARATOR\n\n# The host system.\nhost_alias=$host_alias\nhost=$host\nhost_os=$host_os\n\n# The build system.\nbuild_alias=$build_alias\nbuild=$build\nbuild_os=$build_os\n\n# A sed program that does not truncate output.\nSED=$lt_SED\n\n# Sed that helps us avoid accidentally triggering echo(1) options like -n.\nXsed=\"\\$SED -e 1s/^X//\"\n\n# A grep program that handles long lines.\nGREP=$lt_GREP\n\n# An ERE matcher.\nEGREP=$lt_EGREP\n\n# A literal string matcher.\nFGREP=$lt_FGREP\n\n# A BSD- or MS-compatible name lister.\nNM=$lt_NM\n\n# Whether we need soft or hard links.\nLN_S=$lt_LN_S\n\n# What is the maximum length of a command?\nmax_cmd_len=$max_cmd_len\n\n# Object file suffix (normally \"o\").\nobjext=$ac_objext\n\n# Executable file suffix (normally \"\").\nexeext=$exeext\n\n# whether the shell understands \"unset\".\nlt_unset=$lt_unset\n\n# turn spaces into newlines.\nSP2NL=$lt_lt_SP2NL\n\n# turn newlines into spaces.\nNL2SP=$lt_lt_NL2SP\n\n# convert \\$build file names to \\$host format.\nto_host_file_cmd=$lt_cv_to_host_file_cmd\n\n# convert \\$build files to toolchain format.\nto_tool_file_cmd=$lt_cv_to_tool_file_cmd\n\n# Method to check whether dependent libraries are shared objects.\ndeplibs_check_method=$lt_deplibs_check_method\n\n# Command to use when deplibs_check_method = \"file_magic\".\nfile_magic_cmd=$lt_file_magic_cmd\n\n# How to find potential files when deplibs_check_method = \"file_magic\".\nfile_magic_glob=$lt_file_magic_glob\n\n# Find potential files using nocaseglob when deplibs_check_method = \"file_magic\".\nwant_nocaseglob=$lt_want_nocaseglob\n\n# Command to associate shared and link libraries.\nsharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd\n\n# The archiver.\nAR=$lt_AR\n\n# Flags to create an archive.\nAR_FLAGS=$lt_AR_FLAGS\n\n# How to feed a file listing to the archiver.\narchiver_list_spec=$lt_archiver_list_spec\n\n# A symbol stripping program.\nSTRIP=$lt_STRIP\n\n# Commands used to install an old-style archive.\nRANLIB=$lt_RANLIB\nold_postinstall_cmds=$lt_old_postinstall_cmds\nold_postuninstall_cmds=$lt_old_postuninstall_cmds\n\n# Whether to use a lock for old archive extraction.\nlock_old_archive_extraction=$lock_old_archive_extraction\n\n# A C compiler.\nLTCC=$lt_CC\n\n# LTCC compiler flags.\nLTCFLAGS=$lt_CFLAGS\n\n# Take the output of nm and produce a listing of raw symbols and C names.\nglobal_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe\n\n# Transform the output of nm in a proper C declaration.\nglobal_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl\n\n# Transform the output of nm in a C name address pair.\nglobal_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address\n\n# Transform the output of nm in a C name address pair when lib prefix is needed.\nglobal_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix\n\n# Specify filename containing input files for \\$NM.\nnm_file_list_spec=$lt_nm_file_list_spec\n\n# The root where to search for dependent libraries,and in which our libraries should be installed.\nlt_sysroot=$lt_sysroot\n\n# The name of the directory that contains temporary libtool files.\nobjdir=$objdir\n\n# Used to examine libraries when file_magic_cmd begins with \"file\".\nMAGIC_CMD=$MAGIC_CMD\n\n# Must we lock files when doing compilation?\nneed_locks=$lt_need_locks\n\n# Manifest tool.\nMANIFEST_TOOL=$lt_MANIFEST_TOOL\n\n# Tool to manipulate archived DWARF debug symbol files on Mac OS X.\nDSYMUTIL=$lt_DSYMUTIL\n\n# Tool to change global to local symbols on Mac OS X.\nNMEDIT=$lt_NMEDIT\n\n# Tool to manipulate fat objects and archives on Mac OS X.\nLIPO=$lt_LIPO\n\n# ldd/readelf like tool for Mach-O binaries on Mac OS X.\nOTOOL=$lt_OTOOL\n\n# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4.\nOTOOL64=$lt_OTOOL64\n\n# Old archive suffix (normally \"a\").\nlibext=$libext\n\n# Shared library suffix (normally \".so\").\nshrext_cmds=$lt_shrext_cmds\n\n# The commands to extract the exported symbol list from a shared archive.\nextract_expsyms_cmds=$lt_extract_expsyms_cmds\n\n# Variables whose values should be saved in libtool wrapper scripts and\n# restored at link time.\nvariables_saved_for_relink=$lt_variables_saved_for_relink\n\n# Do we need the \"lib\" prefix for modules?\nneed_lib_prefix=$need_lib_prefix\n\n# Do we need a version for libraries?\nneed_version=$need_version\n\n# Library versioning type.\nversion_type=$version_type\n\n# Shared library runtime path variable.\nrunpath_var=$runpath_var\n\n# Shared library path variable.\nshlibpath_var=$shlibpath_var\n\n# Is shlibpath searched before the hard-coded library search path?\nshlibpath_overrides_runpath=$shlibpath_overrides_runpath\n\n# Format of library name prefix.\nlibname_spec=$lt_libname_spec\n\n# List of archive names.  First name is the real one, the rest are links.\n# The last name is the one that the linker finds with -lNAME\nlibrary_names_spec=$lt_library_names_spec\n\n# The coded name of the library, if different from the real name.\nsoname_spec=$lt_soname_spec\n\n# Permission mode override for installation of shared libraries.\ninstall_override_mode=$lt_install_override_mode\n\n# Command to use after installation of a shared archive.\npostinstall_cmds=$lt_postinstall_cmds\n\n# Command to use after uninstallation of a shared archive.\npostuninstall_cmds=$lt_postuninstall_cmds\n\n# Commands used to finish a libtool library installation in a directory.\nfinish_cmds=$lt_finish_cmds\n\n# As \"finish_cmds\", except a single script fragment to be evaled but\n# not shown.\nfinish_eval=$lt_finish_eval\n\n# Whether we should hardcode library paths into libraries.\nhardcode_into_libs=$hardcode_into_libs\n\n# Compile-time system search path for libraries.\nsys_lib_search_path_spec=$lt_sys_lib_search_path_spec\n\n# Run-time system search path for libraries.\nsys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec\n\n# Whether dlopen is supported.\ndlopen_support=$enable_dlopen\n\n# Whether dlopen of programs is supported.\ndlopen_self=$enable_dlopen_self\n\n# Whether dlopen of statically linked programs is supported.\ndlopen_self_static=$enable_dlopen_self_static\n\n# Commands to strip libraries.\nold_striplib=$lt_old_striplib\nstriplib=$lt_striplib\n\n\n# The linker used to build libraries.\nLD=$lt_LD\n\n# How to create reloadable object files.\nreload_flag=$lt_reload_flag\nreload_cmds=$lt_reload_cmds\n\n# Commands used to build an old-style archive.\nold_archive_cmds=$lt_old_archive_cmds\n\n# A language specific compiler.\nCC=$lt_compiler\n\n# Is the compiler the GNU compiler?\nwith_gcc=$GCC\n\n# Compiler flag to turn off builtin functions.\nno_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag\n\n# Additional compiler flags for building library objects.\npic_flag=$lt_lt_prog_compiler_pic\n\n# How to pass a linker flag through the compiler.\nwl=$lt_lt_prog_compiler_wl\n\n# Compiler flag to prevent dynamic linking.\nlink_static_flag=$lt_lt_prog_compiler_static\n\n# Does compiler simultaneously support -c and -o options?\ncompiler_c_o=$lt_lt_cv_prog_compiler_c_o\n\n# Whether or not to add -lc for building shared libraries.\nbuild_libtool_need_lc=$archive_cmds_need_lc\n\n# Whether or not to disallow shared libs when runtime libs are static.\nallow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes\n\n# Compiler flag to allow reflexive dlopens.\nexport_dynamic_flag_spec=$lt_export_dynamic_flag_spec\n\n# Compiler flag to generate shared objects directly from archives.\nwhole_archive_flag_spec=$lt_whole_archive_flag_spec\n\n# Whether the compiler copes with passing no objects directly.\ncompiler_needs_object=$lt_compiler_needs_object\n\n# Create an old-style archive from a shared archive.\nold_archive_from_new_cmds=$lt_old_archive_from_new_cmds\n\n# Create a temporary old-style archive to link instead of a shared archive.\nold_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds\n\n# Commands used to build a shared archive.\narchive_cmds=$lt_archive_cmds\narchive_expsym_cmds=$lt_archive_expsym_cmds\n\n# Commands used to build a loadable module if different from building\n# a shared archive.\nmodule_cmds=$lt_module_cmds\nmodule_expsym_cmds=$lt_module_expsym_cmds\n\n# Whether we are building with GNU ld or not.\nwith_gnu_ld=$lt_with_gnu_ld\n\n# Flag that allows shared libraries with undefined symbols to be built.\nallow_undefined_flag=$lt_allow_undefined_flag\n\n# Flag that enforces no undefined symbols.\nno_undefined_flag=$lt_no_undefined_flag\n\n# Flag to hardcode \\$libdir into a binary during linking.\n# This must work even if \\$libdir does not exist\nhardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec\n\n# Whether we need a single \"-rpath\" flag with a separated argument.\nhardcode_libdir_separator=$lt_hardcode_libdir_separator\n\n# Set to \"yes\" if using DIR/libNAME\\${shared_ext} during linking hardcodes\n# DIR into the resulting binary.\nhardcode_direct=$hardcode_direct\n\n# Set to \"yes\" if using DIR/libNAME\\${shared_ext} during linking hardcodes\n# DIR into the resulting binary and the resulting library dependency is\n# \"absolute\",i.e impossible to change by setting \\${shlibpath_var} if the\n# library is relocated.\nhardcode_direct_absolute=$hardcode_direct_absolute\n\n# Set to \"yes\" if using the -LDIR flag during linking hardcodes DIR\n# into the resulting binary.\nhardcode_minus_L=$hardcode_minus_L\n\n# Set to \"yes\" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR\n# into the resulting binary.\nhardcode_shlibpath_var=$hardcode_shlibpath_var\n\n# Set to \"yes\" if building a shared library automatically hardcodes DIR\n# into the library and all subsequent libraries and executables linked\n# against it.\nhardcode_automatic=$hardcode_automatic\n\n# Set to yes if linker adds runtime paths of dependent libraries\n# to runtime path list.\ninherit_rpath=$inherit_rpath\n\n# Whether libtool must link a program against all its dependency libraries.\nlink_all_deplibs=$link_all_deplibs\n\n# Set to \"yes\" if exported symbols are required.\nalways_export_symbols=$always_export_symbols\n\n# The commands to list exported symbols.\nexport_symbols_cmds=$lt_export_symbols_cmds\n\n# Symbols that should not be listed in the preloaded symbols.\nexclude_expsyms=$lt_exclude_expsyms\n\n# Symbols that must always be exported.\ninclude_expsyms=$lt_include_expsyms\n\n# Commands necessary for linking programs (against libraries) with templates.\nprelink_cmds=$lt_prelink_cmds\n\n# Commands necessary for finishing linking programs.\npostlink_cmds=$lt_postlink_cmds\n\n# Specify filename containing input files.\nfile_list_spec=$lt_file_list_spec\n\n# How to hardcode a shared library path into an executable.\nhardcode_action=$hardcode_action\n\n# The directories searched by this compiler when creating a shared library.\ncompiler_lib_search_dirs=$lt_compiler_lib_search_dirs\n\n# Dependencies to place before and after the objects being linked to\n# create a shared library.\npredep_objects=$lt_predep_objects\npostdep_objects=$lt_postdep_objects\npredeps=$lt_predeps\npostdeps=$lt_postdeps\n\n# The library search path used internally by the compiler when linking\n# a shared library.\ncompiler_lib_search_path=$lt_compiler_lib_search_path\n\n# ### END LIBTOOL CONFIG\n\n_LT_EOF\n\n  case $host_os in\n  aix3*)\n    cat <<\\_LT_EOF >> \"$cfgfile\"\n# AIX sometimes has problems with the GCC collect2 program.  For some\n# reason, if we set the COLLECT_NAMES environment variable, the problems\n# vanish in a puff of smoke.\nif test \"X${COLLECT_NAMES+set}\" != Xset; then\n  COLLECT_NAMES=\n  export COLLECT_NAMES\nfi\n_LT_EOF\n    ;;\n  esac\n\n\nltmain=\"$ac_aux_dir/ltmain.sh\"\n\n\n  # We use sed instead of cat because bash on DJGPP gets confused if\n  # if finds mixed CR/LF and LF-only lines.  Since sed operates in\n  # text mode, it properly converts lines to CR/LF.  This bash problem\n  # is reportedly fixed, but why not run on old versions too?\n  sed '$q' \"$ltmain\" >> \"$cfgfile\" \\\n     || (rm -f \"$cfgfile\"; exit 1)\n\n  if test x\"$xsi_shell\" = xyes; then\n  sed -e '/^func_dirname ()$/,/^} # func_dirname /c\\\nfunc_dirname ()\\\n{\\\n\\    case ${1} in\\\n\\      */*) func_dirname_result=\"${1%/*}${2}\" ;;\\\n\\      *  ) func_dirname_result=\"${3}\" ;;\\\n\\    esac\\\n} # Extended-shell func_dirname implementation' \"$cfgfile\" > $cfgfile.tmp \\\n  && mv -f \"$cfgfile.tmp\" \"$cfgfile\" \\\n    || (rm -f \"$cfgfile\" && cp \"$cfgfile.tmp\" \"$cfgfile\" && rm -f \"$cfgfile.tmp\")\ntest 0 -eq $? || _lt_function_replace_fail=:\n\n\n  sed -e '/^func_basename ()$/,/^} # func_basename /c\\\nfunc_basename ()\\\n{\\\n\\    func_basename_result=\"${1##*/}\"\\\n} # Extended-shell func_basename implementation' \"$cfgfile\" > $cfgfile.tmp \\\n  && mv -f \"$cfgfile.tmp\" \"$cfgfile\" \\\n    || (rm -f \"$cfgfile\" && cp \"$cfgfile.tmp\" \"$cfgfile\" && rm -f \"$cfgfile.tmp\")\ntest 0 -eq $? || _lt_function_replace_fail=:\n\n\n  sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\\\nfunc_dirname_and_basename ()\\\n{\\\n\\    case ${1} in\\\n\\      */*) func_dirname_result=\"${1%/*}${2}\" ;;\\\n\\      *  ) func_dirname_result=\"${3}\" ;;\\\n\\    esac\\\n\\    func_basename_result=\"${1##*/}\"\\\n} # Extended-shell func_dirname_and_basename implementation' \"$cfgfile\" > $cfgfile.tmp \\\n  && mv -f \"$cfgfile.tmp\" \"$cfgfile\" \\\n    || (rm -f \"$cfgfile\" && cp \"$cfgfile.tmp\" \"$cfgfile\" && rm -f \"$cfgfile.tmp\")\ntest 0 -eq $? || _lt_function_replace_fail=:\n\n\n  sed -e '/^func_stripname ()$/,/^} # func_stripname /c\\\nfunc_stripname ()\\\n{\\\n\\    # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\\\n\\    # positional parameters, so assign one to ordinary parameter first.\\\n\\    func_stripname_result=${3}\\\n\\    func_stripname_result=${func_stripname_result#\"${1}\"}\\\n\\    func_stripname_result=${func_stripname_result%\"${2}\"}\\\n} # Extended-shell func_stripname implementation' \"$cfgfile\" > $cfgfile.tmp \\\n  && mv -f \"$cfgfile.tmp\" \"$cfgfile\" \\\n    || (rm -f \"$cfgfile\" && cp \"$cfgfile.tmp\" \"$cfgfile\" && rm -f \"$cfgfile.tmp\")\ntest 0 -eq $? || _lt_function_replace_fail=:\n\n\n  sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\\\nfunc_split_long_opt ()\\\n{\\\n\\    func_split_long_opt_name=${1%%=*}\\\n\\    func_split_long_opt_arg=${1#*=}\\\n} # Extended-shell func_split_long_opt implementation' \"$cfgfile\" > $cfgfile.tmp \\\n  && mv -f \"$cfgfile.tmp\" \"$cfgfile\" \\\n    || (rm -f \"$cfgfile\" && cp \"$cfgfile.tmp\" \"$cfgfile\" && rm -f \"$cfgfile.tmp\")\ntest 0 -eq $? || _lt_function_replace_fail=:\n\n\n  sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\\\nfunc_split_short_opt ()\\\n{\\\n\\    func_split_short_opt_arg=${1#??}\\\n\\    func_split_short_opt_name=${1%\"$func_split_short_opt_arg\"}\\\n} # Extended-shell func_split_short_opt implementation' \"$cfgfile\" > $cfgfile.tmp \\\n  && mv -f \"$cfgfile.tmp\" \"$cfgfile\" \\\n    || (rm -f \"$cfgfile\" && cp \"$cfgfile.tmp\" \"$cfgfile\" && rm -f \"$cfgfile.tmp\")\ntest 0 -eq $? || _lt_function_replace_fail=:\n\n\n  sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\\\nfunc_lo2o ()\\\n{\\\n\\    case ${1} in\\\n\\      *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\\\n\\      *)    func_lo2o_result=${1} ;;\\\n\\    esac\\\n} # Extended-shell func_lo2o implementation' \"$cfgfile\" > $cfgfile.tmp \\\n  && mv -f \"$cfgfile.tmp\" \"$cfgfile\" \\\n    || (rm -f \"$cfgfile\" && cp \"$cfgfile.tmp\" \"$cfgfile\" && rm -f \"$cfgfile.tmp\")\ntest 0 -eq $? || _lt_function_replace_fail=:\n\n\n  sed -e '/^func_xform ()$/,/^} # func_xform /c\\\nfunc_xform ()\\\n{\\\n    func_xform_result=${1%.*}.lo\\\n} # Extended-shell func_xform implementation' \"$cfgfile\" > $cfgfile.tmp \\\n  && mv -f \"$cfgfile.tmp\" \"$cfgfile\" \\\n    || (rm -f \"$cfgfile\" && cp \"$cfgfile.tmp\" \"$cfgfile\" && rm -f \"$cfgfile.tmp\")\ntest 0 -eq $? || _lt_function_replace_fail=:\n\n\n  sed -e '/^func_arith ()$/,/^} # func_arith /c\\\nfunc_arith ()\\\n{\\\n    func_arith_result=$(( $* ))\\\n} # Extended-shell func_arith implementation' \"$cfgfile\" > $cfgfile.tmp \\\n  && mv -f \"$cfgfile.tmp\" \"$cfgfile\" \\\n    || (rm -f \"$cfgfile\" && cp \"$cfgfile.tmp\" \"$cfgfile\" && rm -f \"$cfgfile.tmp\")\ntest 0 -eq $? || _lt_function_replace_fail=:\n\n\n  sed -e '/^func_len ()$/,/^} # func_len /c\\\nfunc_len ()\\\n{\\\n    func_len_result=${#1}\\\n} # Extended-shell func_len implementation' \"$cfgfile\" > $cfgfile.tmp \\\n  && mv -f \"$cfgfile.tmp\" \"$cfgfile\" \\\n    || (rm -f \"$cfgfile\" && cp \"$cfgfile.tmp\" \"$cfgfile\" && rm -f \"$cfgfile.tmp\")\ntest 0 -eq $? || _lt_function_replace_fail=:\n\nfi\n\nif test x\"$lt_shell_append\" = xyes; then\n  sed -e '/^func_append ()$/,/^} # func_append /c\\\nfunc_append ()\\\n{\\\n    eval \"${1}+=\\\\${2}\"\\\n} # Extended-shell func_append implementation' \"$cfgfile\" > $cfgfile.tmp \\\n  && mv -f \"$cfgfile.tmp\" \"$cfgfile\" \\\n    || (rm -f \"$cfgfile\" && cp \"$cfgfile.tmp\" \"$cfgfile\" && rm -f \"$cfgfile.tmp\")\ntest 0 -eq $? || _lt_function_replace_fail=:\n\n\n  sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\\\nfunc_append_quoted ()\\\n{\\\n\\    func_quote_for_eval \"${2}\"\\\n\\    eval \"${1}+=\\\\\\\\ \\\\$func_quote_for_eval_result\"\\\n} # Extended-shell func_append_quoted implementation' \"$cfgfile\" > $cfgfile.tmp \\\n  && mv -f \"$cfgfile.tmp\" \"$cfgfile\" \\\n    || (rm -f \"$cfgfile\" && cp \"$cfgfile.tmp\" \"$cfgfile\" && rm -f \"$cfgfile.tmp\")\ntest 0 -eq $? || _lt_function_replace_fail=:\n\n\n  # Save a `func_append' function call where possible by direct use of '+='\n  sed -e 's%func_append \\([a-zA-Z_]\\{1,\\}\\) \"%\\1+=\"%g' $cfgfile > $cfgfile.tmp \\\n    && mv -f \"$cfgfile.tmp\" \"$cfgfile\" \\\n      || (rm -f \"$cfgfile\" && cp \"$cfgfile.tmp\" \"$cfgfile\" && rm -f \"$cfgfile.tmp\")\n  test 0 -eq $? || _lt_function_replace_fail=:\nelse\n  # Save a `func_append' function call even when '+=' is not available\n  sed -e 's%func_append \\([a-zA-Z_]\\{1,\\}\\) \"%\\1=\"$\\1%g' $cfgfile > $cfgfile.tmp \\\n    && mv -f \"$cfgfile.tmp\" \"$cfgfile\" \\\n      || (rm -f \"$cfgfile\" && cp \"$cfgfile.tmp\" \"$cfgfile\" && rm -f \"$cfgfile.tmp\")\n  test 0 -eq $? || _lt_function_replace_fail=:\nfi\n\nif test x\"$_lt_function_replace_fail\" = x\":\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile\" >&5\n$as_echo \"$as_me: WARNING: Unable to substitute extended shell functions in $ofile\" >&2;}\nfi\n\n\n   mv -f \"$cfgfile\" \"$ofile\" ||\n    (rm -f \"$ofile\" && cp \"$cfgfile\" \"$ofile\" && rm -f \"$cfgfile\")\n  chmod +x \"$ofile\"\n\n\n    cat <<_LT_EOF >> \"$ofile\"\n\n# ### BEGIN LIBTOOL TAG CONFIG: CXX\n\n# The linker used to build libraries.\nLD=$lt_LD_CXX\n\n# How to create reloadable object files.\nreload_flag=$lt_reload_flag_CXX\nreload_cmds=$lt_reload_cmds_CXX\n\n# Commands used to build an old-style archive.\nold_archive_cmds=$lt_old_archive_cmds_CXX\n\n# A language specific compiler.\nCC=$lt_compiler_CXX\n\n# Is the compiler the GNU compiler?\nwith_gcc=$GCC_CXX\n\n# Compiler flag to turn off builtin functions.\nno_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX\n\n# Additional compiler flags for building library objects.\npic_flag=$lt_lt_prog_compiler_pic_CXX\n\n# How to pass a linker flag through the compiler.\nwl=$lt_lt_prog_compiler_wl_CXX\n\n# Compiler flag to prevent dynamic linking.\nlink_static_flag=$lt_lt_prog_compiler_static_CXX\n\n# Does compiler simultaneously support -c and -o options?\ncompiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX\n\n# Whether or not to add -lc for building shared libraries.\nbuild_libtool_need_lc=$archive_cmds_need_lc_CXX\n\n# Whether or not to disallow shared libs when runtime libs are static.\nallow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX\n\n# Compiler flag to allow reflexive dlopens.\nexport_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX\n\n# Compiler flag to generate shared objects directly from archives.\nwhole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX\n\n# Whether the compiler copes with passing no objects directly.\ncompiler_needs_object=$lt_compiler_needs_object_CXX\n\n# Create an old-style archive from a shared archive.\nold_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX\n\n# Create a temporary old-style archive to link instead of a shared archive.\nold_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX\n\n# Commands used to build a shared archive.\narchive_cmds=$lt_archive_cmds_CXX\narchive_expsym_cmds=$lt_archive_expsym_cmds_CXX\n\n# Commands used to build a loadable module if different from building\n# a shared archive.\nmodule_cmds=$lt_module_cmds_CXX\nmodule_expsym_cmds=$lt_module_expsym_cmds_CXX\n\n# Whether we are building with GNU ld or not.\nwith_gnu_ld=$lt_with_gnu_ld_CXX\n\n# Flag that allows shared libraries with undefined symbols to be built.\nallow_undefined_flag=$lt_allow_undefined_flag_CXX\n\n# Flag that enforces no undefined symbols.\nno_undefined_flag=$lt_no_undefined_flag_CXX\n\n# Flag to hardcode \\$libdir into a binary during linking.\n# This must work even if \\$libdir does not exist\nhardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX\n\n# Whether we need a single \"-rpath\" flag with a separated argument.\nhardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX\n\n# Set to \"yes\" if using DIR/libNAME\\${shared_ext} during linking hardcodes\n# DIR into the resulting binary.\nhardcode_direct=$hardcode_direct_CXX\n\n# Set to \"yes\" if using DIR/libNAME\\${shared_ext} during linking hardcodes\n# DIR into the resulting binary and the resulting library dependency is\n# \"absolute\",i.e impossible to change by setting \\${shlibpath_var} if the\n# library is relocated.\nhardcode_direct_absolute=$hardcode_direct_absolute_CXX\n\n# Set to \"yes\" if using the -LDIR flag during linking hardcodes DIR\n# into the resulting binary.\nhardcode_minus_L=$hardcode_minus_L_CXX\n\n# Set to \"yes\" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR\n# into the resulting binary.\nhardcode_shlibpath_var=$hardcode_shlibpath_var_CXX\n\n# Set to \"yes\" if building a shared library automatically hardcodes DIR\n# into the library and all subsequent libraries and executables linked\n# against it.\nhardcode_automatic=$hardcode_automatic_CXX\n\n# Set to yes if linker adds runtime paths of dependent libraries\n# to runtime path list.\ninherit_rpath=$inherit_rpath_CXX\n\n# Whether libtool must link a program against all its dependency libraries.\nlink_all_deplibs=$link_all_deplibs_CXX\n\n# Set to \"yes\" if exported symbols are required.\nalways_export_symbols=$always_export_symbols_CXX\n\n# The commands to list exported symbols.\nexport_symbols_cmds=$lt_export_symbols_cmds_CXX\n\n# Symbols that should not be listed in the preloaded symbols.\nexclude_expsyms=$lt_exclude_expsyms_CXX\n\n# Symbols that must always be exported.\ninclude_expsyms=$lt_include_expsyms_CXX\n\n# Commands necessary for linking programs (against libraries) with templates.\nprelink_cmds=$lt_prelink_cmds_CXX\n\n# Commands necessary for finishing linking programs.\npostlink_cmds=$lt_postlink_cmds_CXX\n\n# Specify filename containing input files.\nfile_list_spec=$lt_file_list_spec_CXX\n\n# How to hardcode a shared library path into an executable.\nhardcode_action=$hardcode_action_CXX\n\n# The directories searched by this compiler when creating a shared library.\ncompiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX\n\n# Dependencies to place before and after the objects being linked to\n# create a shared library.\npredep_objects=$lt_predep_objects_CXX\npostdep_objects=$lt_postdep_objects_CXX\npredeps=$lt_predeps_CXX\npostdeps=$lt_postdeps_CXX\n\n# The library search path used internally by the compiler when linking\n# a shared library.\ncompiler_lib_search_path=$lt_compiler_lib_search_path_CXX\n\n# ### END LIBTOOL TAG CONFIG: CXX\n_LT_EOF\n\n ;;\n\n  esac\ndone # for ac_tag\n\n\nas_fn_exit 0\n_ACEOF\nac_clean_files=$ac_clean_files_save\n\ntest $ac_write_fail = 0 ||\n  as_fn_error $? \"write failure creating $CONFIG_STATUS\" \"$LINENO\" 5\n\n\n# configure is writing to config.log, and then calls config.status.\n# config.status does its own redirection, appending to config.log.\n# Unfortunately, on DOS this fails, as config.log is still kept open\n# by configure, so config.status won't be able to write to it; its\n# output is simply discarded.  So we exec the FD to /dev/null,\n# effectively closing config.log, so it can be properly (re)opened and\n# appended to by config.status.  When coming back to configure, we\n# need to make the FD available again.\nif test \"$no_create\" != yes; then\n  ac_cs_success=:\n  ac_config_status_args=\n  test \"$silent\" = yes &&\n    ac_config_status_args=\"$ac_config_status_args --quiet\"\n  exec 5>/dev/null\n  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false\n  exec 5>>config.log\n  # Use ||, not &&, to avoid exiting from the if with $? = 1, which\n  # would make configure fail if this is the last instruction.\n  $ac_cs_success || as_fn_exit 1\nfi\n\n#\n# CONFIG_SUBDIRS section.\n#\nif test \"$no_recursion\" != yes; then\n\n  # Remove --cache-file, --srcdir, and --disable-option-checking arguments\n  # so they do not pile up.\n  ac_sub_configure_args=\n  ac_prev=\n  eval \"set x $ac_configure_args\"\n  shift\n  for ac_arg\n  do\n    if test -n \"$ac_prev\"; then\n      ac_prev=\n      continue\n    fi\n    case $ac_arg in\n    -cache-file | --cache-file | --cache-fil | --cache-fi \\\n    | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)\n      ac_prev=cache_file ;;\n    -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \\\n    | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \\\n    | --c=*)\n      ;;\n    --config-cache | -C)\n      ;;\n    -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)\n      ac_prev=srcdir ;;\n    -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)\n      ;;\n    -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)\n      ac_prev=prefix ;;\n    -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)\n      ;;\n    --disable-option-checking)\n      ;;\n    *)\n      case $ac_arg in\n      *\\'*) ac_arg=`$as_echo \"$ac_arg\" | sed \"s/'/'\\\\\\\\\\\\\\\\''/g\"` ;;\n      esac\n      as_fn_append ac_sub_configure_args \" '$ac_arg'\" ;;\n    esac\n  done\n\n  # Always prepend --prefix to ensure using the same prefix\n  # in subdir configurations.\n  ac_arg=\"--prefix=$prefix\"\n  case $ac_arg in\n  *\\'*) ac_arg=`$as_echo \"$ac_arg\" | sed \"s/'/'\\\\\\\\\\\\\\\\''/g\"` ;;\n  esac\n  ac_sub_configure_args=\"'$ac_arg' $ac_sub_configure_args\"\n\n  # Pass --silent\n  if test \"$silent\" = yes; then\n    ac_sub_configure_args=\"--silent $ac_sub_configure_args\"\n  fi\n\n  # Always prepend --disable-option-checking to silence warnings, since\n  # different subdirs can have different --enable and --with options.\n  ac_sub_configure_args=\"--disable-option-checking $ac_sub_configure_args\"\n\n  ac_popdir=`pwd`\n  for ac_dir in : $subdirs; do test \"x$ac_dir\" = x: && continue\n\n    # Do not complain, so a configure script can configure whichever\n    # parts of a large source tree are present.\n    test -d \"$srcdir/$ac_dir\" || continue\n\n    ac_msg=\"=== configuring in $ac_dir (`pwd`/$ac_dir)\"\n    $as_echo \"$as_me:${as_lineno-$LINENO}: $ac_msg\" >&5\n    $as_echo \"$ac_msg\" >&6\n    as_dir=\"$ac_dir\"; as_fn_mkdir_p\n    ac_builddir=.\n\ncase \"$ac_dir\" in\n.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;\n*)\n  ac_dir_suffix=/`$as_echo \"$ac_dir\" | sed 's|^\\.[\\\\/]||'`\n  # A \"..\" for each directory in $ac_dir_suffix.\n  ac_top_builddir_sub=`$as_echo \"$ac_dir_suffix\" | sed 's|/[^\\\\/]*|/..|g;s|/||'`\n  case $ac_top_builddir_sub in\n  \"\") ac_top_builddir_sub=. ac_top_build_prefix= ;;\n  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;\n  esac ;;\nesac\nac_abs_top_builddir=$ac_pwd\nac_abs_builddir=$ac_pwd$ac_dir_suffix\n# for backward compatibility:\nac_top_builddir=$ac_top_build_prefix\n\ncase $srcdir in\n  .)  # We are building in place.\n    ac_srcdir=.\n    ac_top_srcdir=$ac_top_builddir_sub\n    ac_abs_top_srcdir=$ac_pwd ;;\n  [\\\\/]* | ?:[\\\\/]* )  # Absolute name.\n    ac_srcdir=$srcdir$ac_dir_suffix;\n    ac_top_srcdir=$srcdir\n    ac_abs_top_srcdir=$srcdir ;;\n  *) # Relative name.\n    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix\n    ac_top_srcdir=$ac_top_build_prefix$srcdir\n    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;\nesac\nac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix\n\n\n    cd \"$ac_dir\"\n\n    # Check for guested configure; otherwise get Cygnus style configure.\n    if test -f \"$ac_srcdir/configure.gnu\"; then\n      ac_sub_configure=$ac_srcdir/configure.gnu\n    elif test -f \"$ac_srcdir/configure\"; then\n      ac_sub_configure=$ac_srcdir/configure\n    elif test -f \"$ac_srcdir/configure.in\"; then\n      # This should be Cygnus configure.\n      ac_sub_configure=$ac_aux_dir/configure\n    else\n      { $as_echo \"$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir\" >&5\n$as_echo \"$as_me: WARNING: no configuration information is in $ac_dir\" >&2;}\n      ac_sub_configure=\n    fi\n\n    # The recursion is here.\n    if test -n \"$ac_sub_configure\"; then\n      # Make the cache file name correct relative to the subdirectory.\n      case $cache_file in\n      [\\\\/]* | ?:[\\\\/]* ) ac_sub_cache_file=$cache_file ;;\n      *) # Relative name.\n\tac_sub_cache_file=$ac_top_build_prefix$cache_file ;;\n      esac\n\n      { $as_echo \"$as_me:${as_lineno-$LINENO}: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir\" >&5\n$as_echo \"$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir\" >&6;}\n      # The eval makes quoting arguments work.\n      eval \"\\$SHELL \\\"\\$ac_sub_configure\\\" $ac_sub_configure_args \\\n\t   --cache-file=\\\"\\$ac_sub_cache_file\\\" --srcdir=\\\"\\$ac_srcdir\\\"\" ||\n\tas_fn_error $? \"$ac_sub_configure failed for $ac_dir\" \"$LINENO\" 5\n    fi\n\n    cd \"$ac_popdir\"\n  done\nfi\nif test -n \"$ac_unrecognized_opts\" && test \"$enable_option_checking\" != no; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts\" >&5\n$as_echo \"$as_me: WARNING: unrecognized options: $ac_unrecognized_opts\" >&2;}\nfi\n\n\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result:\nConfiguration summary:\n\n  Target ...................... $target\n  C++ bindings ................ $enable_cxx\n  Debug output ................ $debug_output\" >&5\n$as_echo \"\nConfiguration summary:\n\n  Target ...................... $target\n  C++ bindings ................ $enable_cxx\n  Debug output ................ $debug_output\" >&6; }\n\ncase \"$target_os\" in *linux*)\n    { $as_echo \"$as_me:${as_lineno-$LINENO}: result:\n  ALSA ........................ $have_alsa\n  ASIHPI ...................... $have_asihpi\" >&5\n$as_echo \"\n  ALSA ........................ $have_alsa\n  ASIHPI ...................... $have_asihpi\" >&6; }\n    ;;\nesac\ncase \"$target_os\" in\n    *mingw* | *cygwin*)\n        test \"x$with_directx\" = \"xyes\" && with_directx=\"$with_directx (${with_dxdir})\"\n        test \"x$with_wdmks\" = \"xyes\" && with_wdmks=\"$with_wdmks (${with_dxdir})\"\n        test \"x$with_asio\" = \"xyes\" && with_asio=\"$with_asio (${with_asiodir})\"\n        test \"x$with_wasapi\" = \"xyes\"\n        { $as_echo \"$as_me:${as_lineno-$LINENO}: result:\n  WMME ........................ $with_wmme\n  DSound ...................... $with_directx\n  ASIO ........................ $with_asio\n  WASAPI ...................... $with_wasapi\n  WDMKS ....................... $with_wdmks\n\" >&5\n$as_echo \"\n  WMME ........................ $with_wmme\n  DSound ...................... $with_directx\n  ASIO ........................ $with_asio\n  WASAPI ...................... $with_wasapi\n  WDMKS ....................... $with_wdmks\n\" >&6; }\n        ;;\n    *darwin*)\n        { $as_echo \"$as_me:${as_lineno-$LINENO}: result:\n  Mac debug flags ............. $enable_mac_debug\n\" >&5\n$as_echo \"\n  Mac debug flags ............. $enable_mac_debug\n\" >&6; }\n        ;;\n     *)\n\t{ $as_echo \"$as_me:${as_lineno-$LINENO}: result:\n  OSS ......................... $have_oss\n  JACK ........................ $have_jack\n\" >&5\n$as_echo \"\n  OSS ......................... $have_oss\n  JACK ........................ $have_jack\n\" >&6; }\n        ;;\nesac\n"
  },
  {
    "path": "thirdparty/portaudio/configure.in",
    "content": "dnl\ndnl portaudio V19 configure.in script\ndnl\ndnl Dominic Mazzoni, Arve Knudsen, Stelios Bounanos\ndnl\n\ndnl Require autoconf >= 2.13\nAC_PREREQ(2.13)\n\ndnl Init autoconf and make sure configure is being called\ndnl from the right directory\nAC_INIT([include/portaudio.h])\n\ndnl This is is for testing compilation on Mac OS\nPAMAC_TEST_PROGRAM=\"\n  /* cdefs.h checks for supported architectures. */\n  #include <sys/cdefs.h>\n  int main() {\n      return 0;\n  }\n\"\n\ndnl Define build, build_cpu, build_vendor, build_os\nAC_CANONICAL_BUILD\ndnl Define host, host_cpu, host_vendor, host_os\nAC_CANONICAL_HOST\ndnl Define target, target_cpu, target_vendor, target_os\nAC_CANONICAL_TARGET\n\ndnl Specify options\n\nAC_ARG_WITH(alsa,\n            AS_HELP_STRING([--with-alsa], [Enable support for ALSA @<:@autodetect@:>@]),\n            [with_alsa=$withval])\n\nAC_ARG_WITH(jack,\n            AS_HELP_STRING([--with-jack], [Enable support for JACK @<:@autodetect@:>@]),\n            [with_jack=$withval])\n\nAC_ARG_WITH(oss,\n            AS_HELP_STRING([--with-oss], [Enable support for OSS @<:@autodetect@:>@]),\n            [with_oss=$withval])\n\nAC_ARG_WITH(asihpi,\n            AS_HELP_STRING([--with-asihpi], [Enable support for ASIHPI @<:@autodetect@:>@]),\n            [with_asihpi=$withval])\n\nAC_ARG_WITH(winapi,\n            AS_HELP_STRING([--with-winapi],\n                           [Select Windows API support (@<:@wmme|directx|asio|wasapi|wdmks@:>@@<:@,...@:>@) @<:@wmme@:>@]),\n            [with_winapi=$withval], [with_winapi=\"wmme\"])\ncase \"$target_os\" in *mingw* | *cygwin*)\n     with_wmme=no\n     with_directx=no\n     with_asio=no\n     with_wasapi=no\n     with_wdmks=no\n     for api in $(echo $with_winapi | sed 's/,/ /g'); do\n         case \"$api\" in\n             wmme|directx|asio|wasapi|wdmks)\n                 eval with_$api=yes\n                 ;;\n             *)\n                 AC_MSG_ERROR([unknown Windows API \\\"$api\\\" (do you need --help?)])\n                 ;;\n         esac\n     done\n     ;;\nesac\n\nAC_ARG_WITH(asiodir,\n            AS_HELP_STRING([--with-asiodir], [ASIO directory @<:@/usr/local/asiosdk2@:>@]),\n            with_asiodir=$withval, with_asiodir=\"/usr/local/asiosdk2\")\n\nAC_ARG_WITH(dxdir,\n            AS_HELP_STRING([--with-dxdir], [DirectX directory @<:@/usr/local/dx7sdk@:>@]),\n            with_dxdir=$withval, with_dxdir=\"/usr/local/dx7sdk\")\n\ndebug_output=no\nAC_ARG_ENABLE(debug-output,\n              AS_HELP_STRING([--enable-debug-output], [Enable debug output @<:@no@:>@]),\n              [if test \"x$enableval\" != \"xno\" ; then\n                  AC_DEFINE(PA_ENABLE_DEBUG_OUTPUT,,[Enable debugging messages])\n                  debug_output=yes\n               fi\n              ])\n\nAC_ARG_ENABLE(cxx,\n              AS_HELP_STRING([--enable-cxx], [Enable C++ bindings @<:@no@:>@]),\n              enable_cxx=$enableval, enable_cxx=\"no\")\n\nAC_ARG_ENABLE(mac-debug,\n              AS_HELP_STRING([--enable-mac-debug], [Enable Mac debug @<:@no@:>@]),\n              enable_mac_debug=$enableval, enable_mac_debug=\"no\")\n\nAC_ARG_ENABLE(mac-universal,\n              AS_HELP_STRING([--enable-mac-universal], [Build Mac universal binaries @<:@yes@:>@]),\n              enable_mac_universal=$enableval, enable_mac_universal=\"yes\")\n\ndnl Continue to accept --host_os for compatibility but do not document\ndnl it (the correct way to change host_os is with --host=...).  Moved\ndnl here because the empty help string generates a blank line which we\ndnl can use to separate PA options from libtool options.\nAC_ARG_WITH(host_os, [], host_os=$withval)\n\ndnl Checks for programs.\n\nAC_PROG_CC\ndnl ASIO and CXX bindings need a C++ compiler\nif [[ \"$with_asio\" = \"yes\" ] || [ \"$enable_cxx\" = \"yes\" ]] ; then\n       AC_PROG_CXX\nfi\nAC_LIBTOOL_WIN32_DLL\nAC_PROG_LIBTOOL\nAC_PROG_INSTALL\nAC_PROG_LN_S\nAC_PATH_PROG(AR, ar, no)\nif [[ $AR = \"no\" ]] ; then\n    AC_MSG_ERROR(\"Could not find ar - needed to create a library\")\nfi\n\ndnl This must be one of the first tests we do or it will fail...\nAC_C_BIGENDIAN\n\ndnl checks for various host APIs and arguments to configure that\ndnl turn them on or off\n\nhave_alsa=no\nif test \"x$with_alsa\" != \"xno\"; then\n    AC_CHECK_LIB(asound, snd_pcm_open, have_alsa=yes, have_alsa=no)\nfi\nhave_asihpi=no\nif test \"x$with_asihpi\" != \"xno\"; then\n    AC_CHECK_LIB(hpi, HPI_SubSysCreate, have_asihpi=yes, have_asihpi=no, -lm)\nfi\nhave_libossaudio=no\nhave_oss=no\nif test \"x$with_oss\" != \"xno\"; then\n    AC_CHECK_HEADERS([sys/soundcard.h linux/soundcard.h machine/soundcard.h], [have_oss=yes])\n    if test \"x$have_oss\" = \"xyes\"; then\n        AC_CHECK_LIB(ossaudio, _oss_ioctl, have_libossaudio=yes, have_libossaudio=no)\n    fi\nfi\nhave_jack=no\nif test \"x$with_jack\" != \"xno\"; then\n    PKG_CHECK_MODULES(JACK, jack, have_jack=yes, have_jack=no)\nfi\n\n\ndnl sizeof checks: we will need a 16-bit and a 32-bit type\n\nAC_CHECK_SIZEOF(short)\nAC_CHECK_SIZEOF(int)\nAC_CHECK_SIZEOF(long)\n\nsave_LIBS=\"${LIBS}\"\nAC_CHECK_LIB(rt, clock_gettime, [rt_libs=\" -lrt\"])\nLIBS=\"${LIBS}${rt_libs}\"\nDLL_LIBS=\"${DLL_LIBS}${rt_libs}\"\nAC_CHECK_FUNCS([clock_gettime nanosleep])\nLIBS=\"${save_LIBS}\"\n\ndnl LT_RELEASE=19\nLT_CURRENT=2\nLT_REVISION=0\nLT_AGE=0\n\nAC_SUBST(LT_CURRENT)\nAC_SUBST(LT_REVISION)\nAC_SUBST(LT_AGE)\n\ndnl extra variables\nAC_SUBST(OTHER_OBJS)\nAC_SUBST(PADLL)\nAC_SUBST(SHARED_FLAGS)\nAC_SUBST(THREAD_CFLAGS)\nAC_SUBST(DLL_LIBS)\nAC_SUBST(CXXFLAGS)\nAC_SUBST(NASM)\nAC_SUBST(NASMOPT)\nAC_SUBST(INCLUDES)\n\ndnl -g is optional on darwin\nif ( echo \"${host_os}\" | grep ^darwin >> /dev/null ) &&\n      [[ \"$enable_mac_universal\" = \"yes\" ] &&\n       [ \"$enable_mac_debug\" != \"yes\" ]] ; then\n   CFLAGS=\"-O2 -Wall -pedantic -pipe -fPIC -DNDEBUG\"\nelse\n   CFLAGS=${CFLAGS:-\"-g -O2 -Wall -pedantic -pipe -fPIC\"}\nfi\n\nif [[ $ac_cv_c_bigendian = \"yes\" ]] ; then\n   CFLAGS=\"$CFLAGS -DPA_BIG_ENDIAN\"\nelse\n   CFLAGS=\"$CFLAGS -DPA_LITTLE_ENDIAN\"\nfi\n\nadd_objects()\n{\n    for o in $@; do\n        test \"${OTHER_OBJS#*${o}*}\" = \"${OTHER_OBJS}\" && OTHER_OBJS=\"$OTHER_OBJS $o\"\n    done\n}\n\nINCLUDES=portaudio.h\n\ndnl Include directories needed by all implementations\nCFLAGS=\"$CFLAGS -I\\$(top_srcdir)/include -I\\$(top_srcdir)/src/common\"\n\ncase \"${host_os}\" in\n  darwin* )\n        dnl Mac OS X configuration\n\n        AC_DEFINE(PA_USE_COREAUDIO,1)\n\n        CFLAGS=\"$CFLAGS -I\\$(top_srcdir)/src/os/unix -Wno-deprecated -Werror\"\n        LIBS=\"-framework CoreAudio -framework AudioToolbox -framework AudioUnit -framework CoreFoundation -framework CoreServices\"\n\n        if test \"x$enable_mac_universal\" = \"xyes\" ; then\n           case `xcodebuild -version | sed -n 's/Xcode \\(.*\\)/\\1/p'` in\n\n           3.0|3.1)\n              dnl In pre-3.2 versions of Xcode, xcodebuild doesn't\n              dnl support -sdk, so we can't use that to look for\n              dnl SDKs.  However, in those versions of Xcode, the\n              dnl SDKs are under /Developer/SDKs, so we can just look\n              dnl there.  Also, we assume they had no SDKs later\n              dnl than 10.5, as 3.2 was the version that came with\n              dnl 10.6, at least if the Wikipedia page for Xcode\n              dnl is to be believed.\n              if [[ -d /Developer/SDKs/MacOSX10.5.sdk ]] ; then\n                 mac_version_min=\"-mmacosx-version-min=10.3\"\n                 mac_sysroot=\"-isysroot /Developer/SDKs/MacOSX10.5.sdk\"\n              else\n                 mac_version_min=\"-mmacosx-version-min=10.3\"\n                 mac_sysroot=\"-isysroot /Developer/SDKs/MacOSX10.4u.sdk\"\n              fi\n              ;;\n\n           *)\n              dnl In 3.2 and later, xcodebuild supports -sdk, and, in\n              dnl 4.3 and later, the SDKs aren't under /Developer/SDKs\n              dnl as there *is* no /Developer, so we use -sdk to check\n              dnl what SDKs are available and to get the full path of\n              dnl the SDKs.\n              if xcrun --sdk macosx10.5 --show-sdk-path >/dev/null 2>&1 ; then\n                 mac_version_min=\"-mmacosx-version-min=10.5\"\n                 mac_sysroot=\"-isysroot $(xcrun --sdk macosx10.5 --show-sdk-path)\"\n              else\n                 mac_version_min=\"-mmacosx-version-min=10.6\"\n                 mac_sysroot=\"-isysroot $(xcrun --sdk macosx --show-sdk-path)\"\n              fi\n           esac\n\n           dnl Pick which architectures to build for based on what\n           dnl the compiler and SDK supports.\n           mac_arches=\"\"\n           for arch in x86_64 arm64\n           do\n              save_CFLAGS=\"$CFLAGS\"\n              CFLAGS=\"$CFLAGS -arch $arch\"\n              AC_COMPILE_IFELSE(\n                 [AC_LANG_SOURCE([$PAMAC_TEST_PROGRAM])],\n                 [\n                    if [[ -z \"$mac_arches\" ]] ; then\n                       mac_arches=\"-arch $arch\"\n                    else\n                       mac_arches=\"$mac_arches -arch $arch\"\n                    fi\n                 ])\n              CFLAGS=\"$save_CFLAGS\"\n           done\n        else\n           mac_arches=\"\"\n           mac_sysroot=\"\"\n           mac_version=\"\"\n        fi\n        SHARED_FLAGS=\"$LIBS -dynamiclib $mac_arches $mac_sysroot $mac_version_min\"\n        CFLAGS=\"-std=c99 $CFLAGS $mac_arches $mac_sysroot $mac_version_min\"\n        OTHER_OBJS=\"src/os/unix/pa_unix_hostapis.o src/os/unix/pa_unix_util.o src/hostapi/coreaudio/pa_mac_core.o src/hostapi/coreaudio/pa_mac_core_utilities.o src/hostapi/coreaudio/pa_mac_core_blocking.o src/common/pa_ringbuffer.o\"\n        PADLL=\"libportaudio.dylib\"\n        ;;\n\n  mingw* )\n        dnl MingW configuration\n\n        PADLL=\"portaudio.dll\"\n        THREAD_CFLAGS=\"-mthreads\"\n        SHARED_FLAGS=\"-shared\"\n        CFLAGS=\"$CFLAGS -I\\$(top_srcdir)/src/os/win -DPA_USE_WMME=0 -DPA_USE_ASIO=0 -DPA_USE_WDMKS=0 -DPA_USE_DS=0 -DPA_USE_WASAPI=0\"\n\n        if [[ \"x$with_directx\" = \"xyes\" ]]; then\n            DXDIR=\"$with_dxdir\"\n            add_objects src/hostapi/dsound/pa_win_ds.o src/hostapi/dsound/pa_win_ds_dynlink.o src/os/win/pa_win_hostapis.o src/os/win/pa_win_util.o src/os/win/pa_win_coinitialize.o src/os/win/pa_win_waveformat.o\n            LIBS=\"${LIBS} -lwinmm -lm -ldsound -lole32\"\n            DLL_LIBS=\"${DLL_LIBS} -lwinmm -lm -L$DXDIR/lib -ldsound -lole32\"\n            #VC98=\"\\\"/c/Program Files/Microsoft Visual Studio/VC98/Include\\\"\"\n            #CFLAGS=\"$CFLAGS -I$VC98 -DPA_NO_WMME -DPA_NO_ASIO\"\n            CFLAGS=\"$CFLAGS -I$DXDIR/include -UPA_USE_DS -DPA_USE_DS=1\"\n            INCLUDES=\"$INCLUDES pa_win_ds.h pa_win_waveformat.h\"\n        fi\n\n        if [[ \"x$with_asio\" = \"xyes\" ]]; then\n            ASIODIR=\"$with_asiodir\"\n            add_objects src/hostapi/asio/pa_asio.o src/common/pa_ringbuffer.o src/os/win/pa_win_hostapis.o src/os/win/pa_win_util.o src/os/win/pa_win_coinitialize.o src/hostapi/asio/iasiothiscallresolver.o $ASIODIR/common/asio.o $ASIODIR/host/asiodrivers.o $ASIODIR/host/pc/asiolist.o\n            LIBS=\"${LIBS} -lwinmm -lm -lole32 -luuid\"\n            DLL_LIBS=\"${DLL_LIBS} -lwinmm -lm -lole32 -luuid\"\n            CFLAGS=\"$CFLAGS -ffast-math -fomit-frame-pointer -I\\$(top_srcdir)/src/hostapi/asio -I$ASIODIR/host/pc -I$ASIODIR/common -I$ASIODIR/host -UPA_USE_ASIO -DPA_USE_ASIO=1 -DWINDOWS\"\n            INCLUDES=\"$INCLUDES pa_asio.h\"\n\n            dnl Setting the windows version flags below resolves a conflict between Interlocked*\n            dnl definitions in mingw winbase.h and Interlocked* hacks in ASIO SDK combase.h\n            dnl combase.h is included by asiodrvr.h\n            dnl PortAudio does not actually require Win XP (winver 501) APIs\n            CFLAGS=\"$CFLAGS -D_WIN32_WINNT=0x0501 -DWINVER=0x0501\"\n\n            CXXFLAGS=\"$CFLAGS\"\n        fi\n\n        if [[ \"x$with_wdmks\" = \"xyes\" ]]; then\n            DXDIR=\"$with_dxdir\"\n            add_objects src/hostapi/wdmks/pa_win_wdmks.o src/common/pa_ringbuffer.o src/os/win/pa_win_hostapis.o src/os/win/pa_win_util.o src/os/win/pa_win_wdmks_utils.o src/os/win/pa_win_waveformat.o\n            LIBS=\"${LIBS} -lwinmm -lm -luuid -lsetupapi -lole32\"\n            DLL_LIBS=\"${DLL_LIBS} -lwinmm -lm -L$DXDIR/lib -luuid -lsetupapi -lole32\"\n            #VC98=\"\\\"/c/Program Files/Microsoft Visual Studio/VC98/Include\\\"\"\n            #CFLAGS=\"$CFLAGS -I$VC98 -DPA_NO_WMME -DPA_NO_ASIO\"\n            CFLAGS=\"$CFLAGS -I$DXDIR/include -UPA_USE_WDMKS -DPA_USE_WDMKS=1\"\n            INCLUDES=\"$INCLUDES pa_win_wdmks.h\"\n        fi\n\n        if [[ \"x$with_wmme\" = \"xyes\" ]]; then\n            add_objects src/hostapi/wmme/pa_win_wmme.o src/os/win/pa_win_hostapis.o src/os/win/pa_win_util.o src/os/win/pa_win_waveformat.o\n            LIBS=\"${LIBS} -lwinmm -lm -lole32 -luuid\"\n            DLL_LIBS=\"${DLL_LIBS} -lwinmm\"\n            CFLAGS=\"$CFLAGS -UPA_USE_WMME -DPA_USE_WMME=1\"\n            INCLUDES=\"$INCLUDES pa_win_wmme.h pa_win_waveformat.h\"\n        fi\n\n        if [[ \"x$with_wasapi\" = \"xyes\" ]]; then\n            add_objects src/hostapi/wasapi/pa_win_wasapi.o src/common/pa_ringbuffer.o src/os/win/pa_win_hostapis.o src/os/win/pa_win_util.o src/os/win/pa_win_coinitialize.o src/os/win/pa_win_waveformat.o\n            LIBS=\"${LIBS} -lwinmm -lm -lole32 -luuid\"\n            DLL_LIBS=\"${DLL_LIBS} -lwinmm -lole32\"\n            CFLAGS=\"$CFLAGS -UPA_USE_WASAPI -DPA_USE_WASAPI=1\"\n            INCLUDES=\"$INCLUDES pa_win_wasapi.h pa_win_waveformat.h\"\n        fi\n        ;;\n\n  cygwin* )\n        dnl Cygwin configuration\n\n        OTHER_OBJS=\"src/hostapi/wmme/pa_win_wmme.o src/os/win/pa_win_hostapis.o src/os/win/pa_win_util.o src/os/win/pa_win_waveformat.o\"\n        CFLAGS=\"$CFLAGS -I\\$(top_srcdir)/src/os/win -DPA_USE_DS=0 -DPA_USE_WDMKS=0 -DPA_USE_ASIO=0 -DPA_USE_WASAPI=0 -DPA_USE_WMME=1\"\n        LIBS=\"-lwinmm -lm\"\n        PADLL=\"portaudio.dll\"\n        THREAD_CFLAGS=\"-mthreads\"\n        SHARED_FLAGS=\"-shared\"\n        DLL_LIBS=\"${DLL_LIBS} -lwinmm\"\n        ;;\n\n  irix* )\n        dnl SGI IRIX audio library (AL) configuration (Pieter, oct 2-13, 2003).\n        dnl The 'dmedia' library is needed to read the Unadjusted System Time (UST).\n        dnl\n        AC_CHECK_LIB(pthread, pthread_create, , AC_MSG_ERROR([IRIX posix thread library not found!]))\n        AC_CHECK_LIB(audio,   alOpenPort,     , AC_MSG_ERROR([IRIX audio library not found!]))\n        AC_CHECK_LIB(dmedia,  dmGetUST,       , AC_MSG_ERROR([IRIX digital media library not found!]))\n\n        dnl See the '#ifdef PA_USE_SGI' in file pa_unix/pa_unix_hostapis.c\n        dnl which selects the appropriate PaXXX_Initialize() function.\n        dnl\n        AC_DEFINE(PA_USE_SGI,1)\n\n        CFLAGS=\"$CFLAGS -I\\$(top_srcdir)/src/os/unix\"\n\n        dnl The _REENTRANT option for pthread safety. Perhaps not necessary but it 'll do no harm.\n        dnl\n        THREAD_CFLAGS=\"-D_REENTRANT\"\n\n        OTHER_OBJS=\"pa_sgi/pa_sgi.o src/os/unix/pa_unix_hostapis.o src/os/unix/pa_unix_util.o\"\n\n        dnl SGI books say -lpthread should be the last of the libs mentioned.\n        dnl\n        LIBS=\"-lm -ldmedia -laudio -lpthread\"\n        PADLL=\"libportaudio.so\"\n        SHARED_FLAGS=\"\"\n        ;;\n\n  *)\n        dnl Unix configuration\n\n        CFLAGS=\"$CFLAGS -I\\$(top_srcdir)/src/os/unix\"\n\n        AC_CHECK_LIB(pthread, pthread_create,[have_pthread=\"yes\"],\n                AC_MSG_ERROR([libpthread not found!]))\n\n        if [[ \"$have_alsa\" = \"yes\" ] && [ \"$with_alsa\" != \"no\" ]] ; then\n           DLL_LIBS=\"$DLL_LIBS -lasound\"\n           LIBS=\"$LIBS -lasound\"\n           OTHER_OBJS=\"$OTHER_OBJS src/hostapi/alsa/pa_linux_alsa.o\"\n           INCLUDES=\"$INCLUDES pa_linux_alsa.h\"\n           AC_DEFINE(PA_USE_ALSA,1)\n        fi\n\n        if [[ \"$have_jack\" = \"yes\" ] && [ \"$with_jack\" != \"no\" ]] ; then\n           DLL_LIBS=\"$DLL_LIBS $JACK_LIBS\"\n           CFLAGS=\"$CFLAGS $JACK_CFLAGS\"\n           OTHER_OBJS=\"$OTHER_OBJS src/hostapi/jack/pa_jack.o src/common/pa_ringbuffer.o\"\n           INCLUDES=\"$INCLUDES pa_jack.h\"\n           AC_DEFINE(PA_USE_JACK,1)\n        fi\n\n        if [[ \"$with_oss\" != \"no\" ]] ; then\n           OTHER_OBJS=\"$OTHER_OBJS src/hostapi/oss/pa_unix_oss.o\"\n           if [[ \"$have_libossaudio\" = \"yes\" ]] ; then\n                   DLL_LIBS=\"$DLL_LIBS -lossaudio\"\n                   LIBS=\"$LIBS -lossaudio\"\n           fi\n           AC_DEFINE(PA_USE_OSS,1)\n        fi\n\n        if [[ \"$have_asihpi\" = \"yes\" ] && [ \"$with_asihpi\" != \"no\" ]] ; then\n           LIBS=\"$LIBS -lhpi\"\n           DLL_LIBS=\"$DLL_LIBS -lhpi\"\n           OTHER_OBJS=\"$OTHER_OBJS src/hostapi/asihpi/pa_linux_asihpi.o\"\n           AC_DEFINE(PA_USE_ASIHPI,1)\n        fi\n\n        DLL_LIBS=\"$DLL_LIBS -lm -lpthread\"\n        LIBS=\"$LIBS -lm -lpthread\"\n        PADLL=\"libportaudio.so\"\n\n        ## support sun cc compiler flags\n        case \"${host_os}\" in\n           solaris*)\n              SHARED_FLAGS=\"-G\"\n              THREAD_CFLAGS=\"-mt\"\n              ;;\n           *)\n              SHARED_FLAGS=\"-fPIC\"\n              THREAD_CFLAGS=\"-pthread\"\n              ;;\n        esac\n\n        OTHER_OBJS=\"$OTHER_OBJS src/os/unix/pa_unix_hostapis.o src/os/unix/pa_unix_util.o\"\nesac\nCFLAGS=\"$CFLAGS $THREAD_CFLAGS\"\n\ntest \"$enable_shared\" != \"yes\" && SHARED_FLAGS=\"\"\n\nif test \"$enable_cxx\" = \"yes\"; then\n   AC_CONFIG_SUBDIRS([bindings/cpp])\n   ENABLE_CXX_TRUE=\"\"\n   ENABLE_CXX_FALSE=\"#\"\nelse\n   ENABLE_CXX_TRUE=\"#\"\n   ENABLE_CXX_FALSE=\"\"\nfi\nAC_SUBST(ENABLE_CXX_TRUE)\nAC_SUBST(ENABLE_CXX_FALSE)\n\nif test \"x$with_asio\" = \"xyes\"; then\n   WITH_ASIO_TRUE=\"\"\n   WITH_ASIO_FALSE=\"@ #\"\nelse\n   WITH_ASIO_TRUE=\"@ #\"\n   WITH_ASIO_FALSE=\"\"\nfi\nAC_SUBST(WITH_ASIO_TRUE)\nAC_SUBST(WITH_ASIO_FALSE)\n\nAC_OUTPUT([Makefile portaudio-2.0.pc])\n\nAC_MSG_RESULT([\nConfiguration summary:\n\n  Target ...................... $target\n  C++ bindings ................ $enable_cxx\n  Debug output ................ $debug_output])\n\ncase \"$target_os\" in *linux*)\n    AC_MSG_RESULT([\n  ALSA ........................ $have_alsa\n  ASIHPI ...................... $have_asihpi])\n    ;;\nesac\ncase \"$target_os\" in\n    *mingw* | *cygwin*)\n        test \"x$with_directx\" = \"xyes\" && with_directx=\"$with_directx (${with_dxdir})\"\n        test \"x$with_wdmks\" = \"xyes\" && with_wdmks=\"$with_wdmks (${with_dxdir})\"\n        test \"x$with_asio\" = \"xyes\" && with_asio=\"$with_asio (${with_asiodir})\"\n        test \"x$with_wasapi\" = \"xyes\"\n        AC_MSG_RESULT([\n  WMME ........................ $with_wmme\n  DSound ...................... $with_directx\n  ASIO ........................ $with_asio\n  WASAPI ...................... $with_wasapi\n  WDMKS ....................... $with_wdmks\n])\n        ;;\n    *darwin*)\n        AC_MSG_RESULT([\n  Mac debug flags ............. $enable_mac_debug\n])\n        ;;\n     *)\n\tAC_MSG_RESULT([\n  OSS ......................... $have_oss\n  JACK ........................ $have_jack\n])\n        ;;\nesac\n"
  },
  {
    "path": "thirdparty/portaudio/depcomp",
    "content": "#! /bin/sh\n# depcomp - compile a program generating dependencies as side-effects\n\nscriptversion=2013-05-30.07; # UTC\n\n# Copyright (C) 1999-2013 Free Software Foundation, Inc.\n\n# This program is free software; you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation; either version 2, or (at your option)\n# any later version.\n\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n# GNU General Public License for more details.\n\n# You should have received a copy of the GNU General Public License\n# along with this program.  If not, see <http://www.gnu.org/licenses/>.\n\n# As a special exception to the GNU General Public License, if you\n# distribute this file as part of a program that contains a\n# configuration script generated by Autoconf, you may include it under\n# the same distribution terms that you use for the rest of that program.\n\n# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.\n\ncase $1 in\n  '')\n    echo \"$0: No command.  Try '$0 --help' for more information.\" 1>&2\n    exit 1;\n    ;;\n  -h | --h*)\n    cat <<\\EOF\nUsage: depcomp [--help] [--version] PROGRAM [ARGS]\n\nRun PROGRAMS ARGS to compile a file, generating dependencies\nas side-effects.\n\nEnvironment variables:\n  depmode     Dependency tracking mode.\n  source      Source file read by 'PROGRAMS ARGS'.\n  object      Object file output by 'PROGRAMS ARGS'.\n  DEPDIR      directory where to store dependencies.\n  depfile     Dependency file to output.\n  tmpdepfile  Temporary file to use when outputting dependencies.\n  libtool     Whether libtool is used (yes/no).\n\nReport bugs to <bug-automake@gnu.org>.\nEOF\n    exit $?\n    ;;\n  -v | --v*)\n    echo \"depcomp $scriptversion\"\n    exit $?\n    ;;\nesac\n\n# Get the directory component of the given path, and save it in the\n# global variables '$dir'.  Note that this directory component will\n# be either empty or ending with a '/' character.  This is deliberate.\nset_dir_from ()\n{\n  case $1 in\n    */*) dir=`echo \"$1\" | sed -e 's|/[^/]*$|/|'`;;\n      *) dir=;;\n  esac\n}\n\n# Get the suffix-stripped basename of the given path, and save it the\n# global variable '$base'.\nset_base_from ()\n{\n  base=`echo \"$1\" | sed -e 's|^.*/||' -e 's/\\.[^.]*$//'`\n}\n\n# If no dependency file was actually created by the compiler invocation,\n# we still have to create a dummy depfile, to avoid errors with the\n# Makefile \"include basename.Plo\" scheme.\nmake_dummy_depfile ()\n{\n  echo \"#dummy\" > \"$depfile\"\n}\n\n# Factor out some common post-processing of the generated depfile.\n# Requires the auxiliary global variable '$tmpdepfile' to be set.\naix_post_process_depfile ()\n{\n  # If the compiler actually managed to produce a dependency file,\n  # post-process it.\n  if test -f \"$tmpdepfile\"; then\n    # Each line is of the form 'foo.o: dependency.h'.\n    # Do two passes, one to just change these to\n    #   $object: dependency.h\n    # and one to simply output\n    #   dependency.h:\n    # which is needed to avoid the deleted-header problem.\n    { sed -e \"s,^.*\\.[$lower]*:,$object:,\" < \"$tmpdepfile\"\n      sed -e \"s,^.*\\.[$lower]*:[$tab ]*,,\" -e 's,$,:,' < \"$tmpdepfile\"\n    } > \"$depfile\"\n    rm -f \"$tmpdepfile\"\n  else\n    make_dummy_depfile\n  fi\n}\n\n# A tabulation character.\ntab='\t'\n# A newline character.\nnl='\n'\n# Character ranges might be problematic outside the C locale.\n# These definitions help.\nupper=ABCDEFGHIJKLMNOPQRSTUVWXYZ\nlower=abcdefghijklmnopqrstuvwxyz\ndigits=0123456789\nalpha=${upper}${lower}\n\nif test -z \"$depmode\" || test -z \"$source\" || test -z \"$object\"; then\n  echo \"depcomp: Variables source, object and depmode must be set\" 1>&2\n  exit 1\nfi\n\n# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.\ndepfile=${depfile-`echo \"$object\" |\n  sed 's|[^\\\\/]*$|'${DEPDIR-.deps}'/&|;s|\\.\\([^.]*\\)$|.P\\1|;s|Pobj$|Po|'`}\ntmpdepfile=${tmpdepfile-`echo \"$depfile\" | sed 's/\\.\\([^.]*\\)$/.T\\1/'`}\n\nrm -f \"$tmpdepfile\"\n\n# Avoid interferences from the environment.\ngccflag= dashmflag=\n\n# Some modes work just like other modes, but use different flags.  We\n# parameterize here, but still list the modes in the big case below,\n# to make depend.m4 easier to write.  Note that we *cannot* use a case\n# here, because this file can only contain one case statement.\nif test \"$depmode\" = hp; then\n  # HP compiler uses -M and no extra arg.\n  gccflag=-M\n  depmode=gcc\nfi\n\nif test \"$depmode\" = dashXmstdout; then\n  # This is just like dashmstdout with a different argument.\n  dashmflag=-xM\n  depmode=dashmstdout\nfi\n\ncygpath_u=\"cygpath -u -f -\"\nif test \"$depmode\" = msvcmsys; then\n  # This is just like msvisualcpp but w/o cygpath translation.\n  # Just convert the backslash-escaped backslashes to single forward\n  # slashes to satisfy depend.m4\n  cygpath_u='sed s,\\\\\\\\,/,g'\n  depmode=msvisualcpp\nfi\n\nif test \"$depmode\" = msvc7msys; then\n  # This is just like msvc7 but w/o cygpath translation.\n  # Just convert the backslash-escaped backslashes to single forward\n  # slashes to satisfy depend.m4\n  cygpath_u='sed s,\\\\\\\\,/,g'\n  depmode=msvc7\nfi\n\nif test \"$depmode\" = xlc; then\n  # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information.\n  gccflag=-qmakedep=gcc,-MF\n  depmode=gcc\nfi\n\ncase \"$depmode\" in\ngcc3)\n## gcc 3 implements dependency tracking that does exactly what\n## we want.  Yay!  Note: for some reason libtool 1.4 doesn't like\n## it if -MD -MP comes after the -MF stuff.  Hmm.\n## Unfortunately, FreeBSD c89 acceptance of flags depends upon\n## the command line argument order; so add the flags where they\n## appear in depend2.am.  Note that the slowdown incurred here\n## affects only configure: in makefiles, %FASTDEP% shortcuts this.\n  for arg\n  do\n    case $arg in\n    -c) set fnord \"$@\" -MT \"$object\" -MD -MP -MF \"$tmpdepfile\" \"$arg\" ;;\n    *)  set fnord \"$@\" \"$arg\" ;;\n    esac\n    shift # fnord\n    shift # $arg\n  done\n  \"$@\"\n  stat=$?\n  if test $stat -ne 0; then\n    rm -f \"$tmpdepfile\"\n    exit $stat\n  fi\n  mv \"$tmpdepfile\" \"$depfile\"\n  ;;\n\ngcc)\n## Note that this doesn't just cater to obsosete pre-3.x GCC compilers.\n## but also to in-use compilers like IMB xlc/xlC and the HP C compiler.\n## (see the conditional assignment to $gccflag above).\n## There are various ways to get dependency output from gcc.  Here's\n## why we pick this rather obscure method:\n## - Don't want to use -MD because we'd like the dependencies to end\n##   up in a subdir.  Having to rename by hand is ugly.\n##   (We might end up doing this anyway to support other compilers.)\n## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like\n##   -MM, not -M (despite what the docs say).  Also, it might not be\n##   supported by the other compilers which use the 'gcc' depmode.\n## - Using -M directly means running the compiler twice (even worse\n##   than renaming).\n  if test -z \"$gccflag\"; then\n    gccflag=-MD,\n  fi\n  \"$@\" -Wp,\"$gccflag$tmpdepfile\"\n  stat=$?\n  if test $stat -ne 0; then\n    rm -f \"$tmpdepfile\"\n    exit $stat\n  fi\n  rm -f \"$depfile\"\n  echo \"$object : \\\\\" > \"$depfile\"\n  # The second -e expression handles DOS-style file names with drive\n  # letters.\n  sed -e 's/^[^:]*: / /' \\\n      -e 's/^['$alpha']:\\/[^:]*: / /' < \"$tmpdepfile\" >> \"$depfile\"\n## This next piece of magic avoids the \"deleted header file\" problem.\n## The problem is that when a header file which appears in a .P file\n## is deleted, the dependency causes make to die (because there is\n## typically no way to rebuild the header).  We avoid this by adding\n## dummy dependencies for each header file.  Too bad gcc doesn't do\n## this for us directly.\n## Some versions of gcc put a space before the ':'.  On the theory\n## that the space means something, we add a space to the output as\n## well.  hp depmode also adds that space, but also prefixes the VPATH\n## to the object.  Take care to not repeat it in the output.\n## Some versions of the HPUX 10.20 sed can't process this invocation\n## correctly.  Breaking it into two sed invocations is a workaround.\n  tr ' ' \"$nl\" < \"$tmpdepfile\" \\\n    | sed -e 's/^\\\\$//' -e '/^$/d' -e \"s|.*$object$||\" -e '/:$/d' \\\n    | sed -e 's/$/ :/' >> \"$depfile\"\n  rm -f \"$tmpdepfile\"\n  ;;\n\nhp)\n  # This case exists only to let depend.m4 do its work.  It works by\n  # looking at the text of this script.  This case will never be run,\n  # since it is checked for above.\n  exit 1\n  ;;\n\nsgi)\n  if test \"$libtool\" = yes; then\n    \"$@\" \"-Wp,-MDupdate,$tmpdepfile\"\n  else\n    \"$@\" -MDupdate \"$tmpdepfile\"\n  fi\n  stat=$?\n  if test $stat -ne 0; then\n    rm -f \"$tmpdepfile\"\n    exit $stat\n  fi\n  rm -f \"$depfile\"\n\n  if test -f \"$tmpdepfile\"; then  # yes, the sourcefile depend on other files\n    echo \"$object : \\\\\" > \"$depfile\"\n    # Clip off the initial element (the dependent).  Don't try to be\n    # clever and replace this with sed code, as IRIX sed won't handle\n    # lines with more than a fixed number of characters (4096 in\n    # IRIX 6.2 sed, 8192 in IRIX 6.5).  We also remove comment lines;\n    # the IRIX cc adds comments like '#:fec' to the end of the\n    # dependency line.\n    tr ' ' \"$nl\" < \"$tmpdepfile\" \\\n      | sed -e 's/^.*\\.o://' -e 's/#.*$//' -e '/^$/ d' \\\n      | tr \"$nl\" ' ' >> \"$depfile\"\n    echo >> \"$depfile\"\n    # The second pass generates a dummy entry for each header file.\n    tr ' ' \"$nl\" < \"$tmpdepfile\" \\\n      | sed -e 's/^.*\\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \\\n      >> \"$depfile\"\n  else\n    make_dummy_depfile\n  fi\n  rm -f \"$tmpdepfile\"\n  ;;\n\nxlc)\n  # This case exists only to let depend.m4 do its work.  It works by\n  # looking at the text of this script.  This case will never be run,\n  # since it is checked for above.\n  exit 1\n  ;;\n\naix)\n  # The C for AIX Compiler uses -M and outputs the dependencies\n  # in a .u file.  In older versions, this file always lives in the\n  # current directory.  Also, the AIX compiler puts '$object:' at the\n  # start of each line; $object doesn't have directory information.\n  # Version 6 uses the directory in both cases.\n  set_dir_from \"$object\"\n  set_base_from \"$object\"\n  if test \"$libtool\" = yes; then\n    tmpdepfile1=$dir$base.u\n    tmpdepfile2=$base.u\n    tmpdepfile3=$dir.libs/$base.u\n    \"$@\" -Wc,-M\n  else\n    tmpdepfile1=$dir$base.u\n    tmpdepfile2=$dir$base.u\n    tmpdepfile3=$dir$base.u\n    \"$@\" -M\n  fi\n  stat=$?\n  if test $stat -ne 0; then\n    rm -f \"$tmpdepfile1\" \"$tmpdepfile2\" \"$tmpdepfile3\"\n    exit $stat\n  fi\n\n  for tmpdepfile in \"$tmpdepfile1\" \"$tmpdepfile2\" \"$tmpdepfile3\"\n  do\n    test -f \"$tmpdepfile\" && break\n  done\n  aix_post_process_depfile\n  ;;\n\ntcc)\n  # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26\n  # FIXME: That version still under development at the moment of writing.\n  #        Make that this statement remains true also for stable, released\n  #        versions.\n  # It will wrap lines (doesn't matter whether long or short) with a\n  # trailing '\\', as in:\n  #\n  #   foo.o : \\\n  #    foo.c \\\n  #    foo.h \\\n  #\n  # It will put a trailing '\\' even on the last line, and will use leading\n  # spaces rather than leading tabs (at least since its commit 0394caf7\n  # \"Emit spaces for -MD\").\n  \"$@\" -MD -MF \"$tmpdepfile\"\n  stat=$?\n  if test $stat -ne 0; then\n    rm -f \"$tmpdepfile\"\n    exit $stat\n  fi\n  rm -f \"$depfile\"\n  # Each non-empty line is of the form 'foo.o : \\' or ' dep.h \\'.\n  # We have to change lines of the first kind to '$object: \\'.\n  sed -e \"s|.*:|$object :|\" < \"$tmpdepfile\" > \"$depfile\"\n  # And for each line of the second kind, we have to emit a 'dep.h:'\n  # dummy dependency, to avoid the deleted-header problem.\n  sed -n -e 's|^  *\\(.*\\) *\\\\$|\\1:|p' < \"$tmpdepfile\" >> \"$depfile\"\n  rm -f \"$tmpdepfile\"\n  ;;\n\n## The order of this option in the case statement is important, since the\n## shell code in configure will try each of these formats in the order\n## listed in this file.  A plain '-MD' option would be understood by many\n## compilers, so we must ensure this comes after the gcc and icc options.\npgcc)\n  # Portland's C compiler understands '-MD'.\n  # Will always output deps to 'file.d' where file is the root name of the\n  # source file under compilation, even if file resides in a subdirectory.\n  # The object file name does not affect the name of the '.d' file.\n  # pgcc 10.2 will output\n  #    foo.o: sub/foo.c sub/foo.h\n  # and will wrap long lines using '\\' :\n  #    foo.o: sub/foo.c ... \\\n  #     sub/foo.h ... \\\n  #     ...\n  set_dir_from \"$object\"\n  # Use the source, not the object, to determine the base name, since\n  # that's sadly what pgcc will do too.\n  set_base_from \"$source\"\n  tmpdepfile=$base.d\n\n  # For projects that build the same source file twice into different object\n  # files, the pgcc approach of using the *source* file root name can cause\n  # problems in parallel builds.  Use a locking strategy to avoid stomping on\n  # the same $tmpdepfile.\n  lockdir=$base.d-lock\n  trap \"\n    echo '$0: caught signal, cleaning up...' >&2\n    rmdir '$lockdir'\n    exit 1\n  \" 1 2 13 15\n  numtries=100\n  i=$numtries\n  while test $i -gt 0; do\n    # mkdir is a portable test-and-set.\n    if mkdir \"$lockdir\" 2>/dev/null; then\n      # This process acquired the lock.\n      \"$@\" -MD\n      stat=$?\n      # Release the lock.\n      rmdir \"$lockdir\"\n      break\n    else\n      # If the lock is being held by a different process, wait\n      # until the winning process is done or we timeout.\n      while test -d \"$lockdir\" && test $i -gt 0; do\n        sleep 1\n        i=`expr $i - 1`\n      done\n    fi\n    i=`expr $i - 1`\n  done\n  trap - 1 2 13 15\n  if test $i -le 0; then\n    echo \"$0: failed to acquire lock after $numtries attempts\" >&2\n    echo \"$0: check lockdir '$lockdir'\" >&2\n    exit 1\n  fi\n\n  if test $stat -ne 0; then\n    rm -f \"$tmpdepfile\"\n    exit $stat\n  fi\n  rm -f \"$depfile\"\n  # Each line is of the form `foo.o: dependent.h',\n  # or `foo.o: dep1.h dep2.h \\', or ` dep3.h dep4.h \\'.\n  # Do two passes, one to just change these to\n  # `$object: dependent.h' and one to simply `dependent.h:'.\n  sed \"s,^[^:]*:,$object :,\" < \"$tmpdepfile\" > \"$depfile\"\n  # Some versions of the HPUX 10.20 sed can't process this invocation\n  # correctly.  Breaking it into two sed invocations is a workaround.\n  sed 's,^[^:]*: \\(.*\\)$,\\1,;s/^\\\\$//;/^$/d;/:$/d' < \"$tmpdepfile\" \\\n    | sed -e 's/$/ :/' >> \"$depfile\"\n  rm -f \"$tmpdepfile\"\n  ;;\n\nhp2)\n  # The \"hp\" stanza above does not work with aCC (C++) and HP's ia64\n  # compilers, which have integrated preprocessors.  The correct option\n  # to use with these is +Maked; it writes dependencies to a file named\n  # 'foo.d', which lands next to the object file, wherever that\n  # happens to be.\n  # Much of this is similar to the tru64 case; see comments there.\n  set_dir_from  \"$object\"\n  set_base_from \"$object\"\n  if test \"$libtool\" = yes; then\n    tmpdepfile1=$dir$base.d\n    tmpdepfile2=$dir.libs/$base.d\n    \"$@\" -Wc,+Maked\n  else\n    tmpdepfile1=$dir$base.d\n    tmpdepfile2=$dir$base.d\n    \"$@\" +Maked\n  fi\n  stat=$?\n  if test $stat -ne 0; then\n     rm -f \"$tmpdepfile1\" \"$tmpdepfile2\"\n     exit $stat\n  fi\n\n  for tmpdepfile in \"$tmpdepfile1\" \"$tmpdepfile2\"\n  do\n    test -f \"$tmpdepfile\" && break\n  done\n  if test -f \"$tmpdepfile\"; then\n    sed -e \"s,^.*\\.[$lower]*:,$object:,\" \"$tmpdepfile\" > \"$depfile\"\n    # Add 'dependent.h:' lines.\n    sed -ne '2,${\n               s/^ *//\n               s/ \\\\*$//\n               s/$/:/\n               p\n             }' \"$tmpdepfile\" >> \"$depfile\"\n  else\n    make_dummy_depfile\n  fi\n  rm -f \"$tmpdepfile\" \"$tmpdepfile2\"\n  ;;\n\ntru64)\n  # The Tru64 compiler uses -MD to generate dependencies as a side\n  # effect.  'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'.\n  # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put\n  # dependencies in 'foo.d' instead, so we check for that too.\n  # Subdirectories are respected.\n  set_dir_from  \"$object\"\n  set_base_from \"$object\"\n\n  if test \"$libtool\" = yes; then\n    # Libtool generates 2 separate objects for the 2 libraries.  These\n    # two compilations output dependencies in $dir.libs/$base.o.d and\n    # in $dir$base.o.d.  We have to check for both files, because\n    # one of the two compilations can be disabled.  We should prefer\n    # $dir$base.o.d over $dir.libs/$base.o.d because the latter is\n    # automatically cleaned when .libs/ is deleted, while ignoring\n    # the former would cause a distcleancheck panic.\n    tmpdepfile1=$dir$base.o.d          # libtool 1.5\n    tmpdepfile2=$dir.libs/$base.o.d    # Likewise.\n    tmpdepfile3=$dir.libs/$base.d      # Compaq CCC V6.2-504\n    \"$@\" -Wc,-MD\n  else\n    tmpdepfile1=$dir$base.d\n    tmpdepfile2=$dir$base.d\n    tmpdepfile3=$dir$base.d\n    \"$@\" -MD\n  fi\n\n  stat=$?\n  if test $stat -ne 0; then\n    rm -f \"$tmpdepfile1\" \"$tmpdepfile2\" \"$tmpdepfile3\"\n    exit $stat\n  fi\n\n  for tmpdepfile in \"$tmpdepfile1\" \"$tmpdepfile2\" \"$tmpdepfile3\"\n  do\n    test -f \"$tmpdepfile\" && break\n  done\n  # Same post-processing that is required for AIX mode.\n  aix_post_process_depfile\n  ;;\n\nmsvc7)\n  if test \"$libtool\" = yes; then\n    showIncludes=-Wc,-showIncludes\n  else\n    showIncludes=-showIncludes\n  fi\n  \"$@\" $showIncludes > \"$tmpdepfile\"\n  stat=$?\n  grep -v '^Note: including file: ' \"$tmpdepfile\"\n  if test $stat -ne 0; then\n    rm -f \"$tmpdepfile\"\n    exit $stat\n  fi\n  rm -f \"$depfile\"\n  echo \"$object : \\\\\" > \"$depfile\"\n  # The first sed program below extracts the file names and escapes\n  # backslashes for cygpath.  The second sed program outputs the file\n  # name when reading, but also accumulates all include files in the\n  # hold buffer in order to output them again at the end.  This only\n  # works with sed implementations that can handle large buffers.\n  sed < \"$tmpdepfile\" -n '\n/^Note: including file:  *\\(.*\\)/ {\n  s//\\1/\n  s/\\\\/\\\\\\\\/g\n  p\n}' | $cygpath_u | sort -u | sed -n '\ns/ /\\\\ /g\ns/\\(.*\\)/'\"$tab\"'\\1 \\\\/p\ns/.\\(.*\\) \\\\/\\1:/\nH\n$ {\n  s/.*/'\"$tab\"'/\n  G\n  p\n}' >> \"$depfile\"\n  echo >> \"$depfile\" # make sure the fragment doesn't end with a backslash\n  rm -f \"$tmpdepfile\"\n  ;;\n\nmsvc7msys)\n  # This case exists only to let depend.m4 do its work.  It works by\n  # looking at the text of this script.  This case will never be run,\n  # since it is checked for above.\n  exit 1\n  ;;\n\n#nosideeffect)\n  # This comment above is used by automake to tell side-effect\n  # dependency tracking mechanisms from slower ones.\n\ndashmstdout)\n  # Important note: in order to support this mode, a compiler *must*\n  # always write the preprocessed file to stdout, regardless of -o.\n  \"$@\" || exit $?\n\n  # Remove the call to Libtool.\n  if test \"$libtool\" = yes; then\n    while test \"X$1\" != 'X--mode=compile'; do\n      shift\n    done\n    shift\n  fi\n\n  # Remove '-o $object'.\n  IFS=\" \"\n  for arg\n  do\n    case $arg in\n    -o)\n      shift\n      ;;\n    $object)\n      shift\n      ;;\n    *)\n      set fnord \"$@\" \"$arg\"\n      shift # fnord\n      shift # $arg\n      ;;\n    esac\n  done\n\n  test -z \"$dashmflag\" && dashmflag=-M\n  # Require at least two characters before searching for ':'\n  # in the target name.  This is to cope with DOS-style filenames:\n  # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise.\n  \"$@\" $dashmflag |\n    sed \"s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |\" > \"$tmpdepfile\"\n  rm -f \"$depfile\"\n  cat < \"$tmpdepfile\" > \"$depfile\"\n  # Some versions of the HPUX 10.20 sed can't process this sed invocation\n  # correctly.  Breaking it into two sed invocations is a workaround.\n  tr ' ' \"$nl\" < \"$tmpdepfile\" \\\n    | sed -e 's/^\\\\$//' -e '/^$/d' -e '/:$/d' \\\n    | sed -e 's/$/ :/' >> \"$depfile\"\n  rm -f \"$tmpdepfile\"\n  ;;\n\ndashXmstdout)\n  # This case only exists to satisfy depend.m4.  It is never actually\n  # run, as this mode is specially recognized in the preamble.\n  exit 1\n  ;;\n\nmakedepend)\n  \"$@\" || exit $?\n  # Remove any Libtool call\n  if test \"$libtool\" = yes; then\n    while test \"X$1\" != 'X--mode=compile'; do\n      shift\n    done\n    shift\n  fi\n  # X makedepend\n  shift\n  cleared=no eat=no\n  for arg\n  do\n    case $cleared in\n    no)\n      set \"\"; shift\n      cleared=yes ;;\n    esac\n    if test $eat = yes; then\n      eat=no\n      continue\n    fi\n    case \"$arg\" in\n    -D*|-I*)\n      set fnord \"$@\" \"$arg\"; shift ;;\n    # Strip any option that makedepend may not understand.  Remove\n    # the object too, otherwise makedepend will parse it as a source file.\n    -arch)\n      eat=yes ;;\n    -*|$object)\n      ;;\n    *)\n      set fnord \"$@\" \"$arg\"; shift ;;\n    esac\n  done\n  obj_suffix=`echo \"$object\" | sed 's/^.*\\././'`\n  touch \"$tmpdepfile\"\n  ${MAKEDEPEND-makedepend} -o\"$obj_suffix\" -f\"$tmpdepfile\" \"$@\"\n  rm -f \"$depfile\"\n  # makedepend may prepend the VPATH from the source file name to the object.\n  # No need to regex-escape $object, excess matching of '.' is harmless.\n  sed \"s|^.*\\($object *:\\)|\\1|\" \"$tmpdepfile\" > \"$depfile\"\n  # Some versions of the HPUX 10.20 sed can't process the last invocation\n  # correctly.  Breaking it into two sed invocations is a workaround.\n  sed '1,2d' \"$tmpdepfile\" \\\n    | tr ' ' \"$nl\" \\\n    | sed -e 's/^\\\\$//' -e '/^$/d' -e '/:$/d' \\\n    | sed -e 's/$/ :/' >> \"$depfile\"\n  rm -f \"$tmpdepfile\" \"$tmpdepfile\".bak\n  ;;\n\ncpp)\n  # Important note: in order to support this mode, a compiler *must*\n  # always write the preprocessed file to stdout.\n  \"$@\" || exit $?\n\n  # Remove the call to Libtool.\n  if test \"$libtool\" = yes; then\n    while test \"X$1\" != 'X--mode=compile'; do\n      shift\n    done\n    shift\n  fi\n\n  # Remove '-o $object'.\n  IFS=\" \"\n  for arg\n  do\n    case $arg in\n    -o)\n      shift\n      ;;\n    $object)\n      shift\n      ;;\n    *)\n      set fnord \"$@\" \"$arg\"\n      shift # fnord\n      shift # $arg\n      ;;\n    esac\n  done\n\n  \"$@\" -E \\\n    | sed -n -e '/^# [0-9][0-9]* \"\\([^\"]*\\)\".*/ s:: \\1 \\\\:p' \\\n             -e '/^#line [0-9][0-9]* \"\\([^\"]*\\)\".*/ s:: \\1 \\\\:p' \\\n    | sed '$ s: \\\\$::' > \"$tmpdepfile\"\n  rm -f \"$depfile\"\n  echo \"$object : \\\\\" > \"$depfile\"\n  cat < \"$tmpdepfile\" >> \"$depfile\"\n  sed < \"$tmpdepfile\" '/^$/d;s/^ //;s/ \\\\$//;s/$/ :/' >> \"$depfile\"\n  rm -f \"$tmpdepfile\"\n  ;;\n\nmsvisualcpp)\n  # Important note: in order to support this mode, a compiler *must*\n  # always write the preprocessed file to stdout.\n  \"$@\" || exit $?\n\n  # Remove the call to Libtool.\n  if test \"$libtool\" = yes; then\n    while test \"X$1\" != 'X--mode=compile'; do\n      shift\n    done\n    shift\n  fi\n\n  IFS=\" \"\n  for arg\n  do\n    case \"$arg\" in\n    -o)\n      shift\n      ;;\n    $object)\n      shift\n      ;;\n    \"-Gm\"|\"/Gm\"|\"-Gi\"|\"/Gi\"|\"-ZI\"|\"/ZI\")\n        set fnord \"$@\"\n        shift\n        shift\n        ;;\n    *)\n        set fnord \"$@\" \"$arg\"\n        shift\n        shift\n        ;;\n    esac\n  done\n  \"$@\" -E 2>/dev/null |\n  sed -n '/^#line [0-9][0-9]* \"\\([^\"]*\\)\"/ s::\\1:p' | $cygpath_u | sort -u > \"$tmpdepfile\"\n  rm -f \"$depfile\"\n  echo \"$object : \\\\\" > \"$depfile\"\n  sed < \"$tmpdepfile\" -n -e 's% %\\\\ %g' -e '/^\\(.*\\)$/ s::'\"$tab\"'\\1 \\\\:p' >> \"$depfile\"\n  echo \"$tab\" >> \"$depfile\"\n  sed < \"$tmpdepfile\" -n -e 's% %\\\\ %g' -e '/^\\(.*\\)$/ s::\\1\\::p' >> \"$depfile\"\n  rm -f \"$tmpdepfile\"\n  ;;\n\nmsvcmsys)\n  # This case exists only to let depend.m4 do its work.  It works by\n  # looking at the text of this script.  This case will never be run,\n  # since it is checked for above.\n  exit 1\n  ;;\n\nnone)\n  exec \"$@\"\n  ;;\n\n*)\n  echo \"Unknown depmode $depmode\" 1>&2\n  exit 1\n  ;;\nesac\n\nexit 0\n\n# Local Variables:\n# mode: shell-script\n# sh-indentation: 2\n# eval: (add-hook 'write-file-hooks 'time-stamp)\n# time-stamp-start: \"scriptversion=\"\n# time-stamp-format: \"%:y-%02m-%02d.%02H\"\n# time-stamp-time-zone: \"UTC\"\n# time-stamp-end: \"; # UTC\"\n# End:\n"
  },
  {
    "path": "thirdparty/portaudio/doc/src/api_overview.dox",
    "content": "/** @page api_overview PortAudio API Overview\n\nThis page provides a top-down overview of the entire PortAudio API. It describes how all of the PortAudio data types and functions fit together. It provides links to the documentation for each function and data type. You can find all of the detailed documentation for each API function and data type on the portaudio.h page.\n\n@section introduction Introduction\n\nPortAudio provides a uniform application programming interface (API) across all supported platforms. You can think of the PortAudio library as a wrapper that converts calls to the PortAudio API into calls to platform-specific native audio APIs. Operating systems often offer more than one native audio API and some APIs (such as JACK) may be available on multiple target operating systems. PortAudio supports all the major native audio APIs on each supported platform. The diagram below illustrates the relationship between your application, PortAudio, and the supported native audio APIs:\n\n@image html portaudio-external-architecture-diagram.png\n\nPortAudio provides a uniform interface to native audio APIs. However, it doesn't always provide totally uniform functionality. There are cases where PortAudio is limited by the capabilities of the underlying native audio API. For example, PortAudio doesn't provide sample rate conversion if you request a sample rate that is not supported by the native audio API. Another example is that the ASIO SDK only allows one device to be open at a time, so PortAudio/ASIO doesn't currently support opening multiple ASIO devices simultaneously.\n\n@section key_abstractions Key abstractions: Host APIs, Devices and Streams\n\nThe PortAudio processing model includes three main abstractions: <i>Host APIs</i>, audio <i>Devices</i> and audio <i>Streams</i>.\n\nHost APIs represent platform-specific native audio APIs. Some examples of Host APIs are Core Audio on Mac OS, WMME and DirectSound on Windows and OSS and ALSA on Linux. The diagram in the previous section shows many of the supported native APIs. Sometimes it's useful to know which Host APIs you're dealing with, but it is easy to use PortAudio without ever interacting directly with the Host API abstraction.\n\nDevices represent individual hardware audio interfaces or audio ports on the host platform. Devices have names and certain capabilities such as supported sample rates and the number of supported input and output channels. PortAudio provides functions to enumerate available Devices and to query for Device capabilities.\n\nStreams manage active audio input and output from and to Devices. Streams may be half duplex (input or output) or full duplex (simultaneous input and output). Streams operate at a specific sample rate with particular sample formats, buffer sizes and internal buffering latencies. You specify these parameters when you open the Stream. Audio data is communicated between a Stream and your application via a user provided asynchronous callback function or by invoking synchronous read and write functions.\n\nPortAudio supports audio input and output in a variety of sample formats: 8, 16, 24 and 32 bit integer formats and 32 bit floating point, irrespective of the formats supported by the native audio API.  PortAudio also supports multichannel buffers in both interleaved and non-interleaved (separate buffer per channel) formats and automatically performs conversion when necessary. If requested, PortAudio can clamp out-of range samples and/or dither to a native format.\n\nThe PortAudio API offers the following functionality:\n- Initialize and terminate the library\n- Enumerate available Host APIs\n- Enumerate available Devices either globally, or within each Host API\n- Discover default or recommended Devices and Device settings\n- Discover Device capabilities such as supported audio data formats and sample rates\n- Create and control audio Streams to acquire audio from and output audio to Devices\n- Provide Stream timing information to support synchronising audio with other parts of your application\n- Retrieve version and error information.\n\nThese functions are described in more detail below.\n\n\n@section top_level_functions Initialization, termination and utility functions\n\nThe PortAudio library must be initialized before it can be used and terminated to clean up afterwards. You initialize PortAudio by calling Pa_Initialize() and clean up by calling Pa_Terminate(). \n\nYou can query PortAudio for version information using Pa_GetVersion() to get a numeric version number and Pa_GetVersionText() to get a string.\n\nThe size in bytes of the various sample formats represented by the @ref PaSampleFormat enumeration can be obtained using Pa_GetSampleSize().\n\nPa_Sleep() sleeps for a specified number of milliseconds. This isn't intended for use in production systems; it's provided only as a simple portable way to implement tests and examples where the main thread sleeps while audio is acquired or played by an asynchronous callback function.\n\n@section host_apis Host APIs\n\nA Host API acts as a top-level grouping for all of the Devices offered by a single native platform audio API. Each Host API has a unique type identifier, a name, zero or more Devices, and nominated default input and output Devices. \n\nHost APIs are usually referenced by index: an integer of type @ref PaHostApiIndex that ranges between zero and Pa_GetHostApiCount() - 1. You can enumerate all available Host APIs by counting across this range.\n\nYou can retrieve the index of the default Host API by calling Pa_GetDefaultHostApi().\n\nInformation about a Host API, such as it's name and default devices, is stored in a @ref PaHostApiInfo structure. You can retrieve a pointer to a particular Host API's @ref PaHostApiInfo structure by calling Pa_GetHostApiInfo() with the Host API's index as a parameter.\n\nMost PortAudio functions reference Host APIs by @ref PaHostApiIndex indices. Each Host API also has a unique type identifier defined in the @ref PaHostApiTypeId enumeration.\nYou can call Pa_HostApiTypeIdToHostApiIndex() to retrieve the current @ref PaHostApiIndex for a particular @ref PaHostApiTypeId.\n\n@section devices Devices\n\nA Device represents an audio endpoint provided by a particular native audio API. This usually corresponds to a specific input or output port on a hardware audio interface, or to the interface as a whole. Each Host API operates independently, so a single physical audio port may be addressable via different Devices exposed by different Host APIs.\n\nA Device has a name, is associated with a Host API, and has a maximum number of supported input and output channels. PortAudio provides recommended default latency values and a default sample rate for each Device. To obtain more detailed information about device capabilities you can call Pa_IsFormatSupported() to query whether it is possible to open a Stream using particular Devices, parameters and sample rate.\n\nAlthough each Device conceptually belongs to a specific Host API, most PortAudio functions and data structures refer to Devices using a global, Host API-independent index of type @ref PaDeviceIndex &ndash; an integer of that ranges between zero and Pa_GetDeviceCount() - 1. The reasons for this are partly historical but it also makes it easy for applications to ignore the Host API abstraction and just work with Devices and Streams.\n\nIf you want to enumerate Devices belonging to a particular Host API you can count between 0 and PaHostApiInfo::deviceCount - 1. You can convert this Host API-specific index value to a global @ref PaDeviceIndex value by calling Pa_HostApiDeviceIndexToDeviceIndex().\n\nInformation about a Device is stored in a @ref PaDeviceInfo structure. You can retrieve a pointer to a Devices's @ref PaDeviceInfo structure by calling Pa_GetDeviceInfo() with the Device's index as a parameter.\n\nYou can retrieve the indices of the global default input and output devices using Pa_GetDefaultInputDevice() and Pa_GetDefaultOutputDevice(). Default Devices for each Host API are stored in the Host API's @ref PaHostApiInfo structures.\n\nFor an example of enumerating devices and printing information about their capabilities see the pa_devs.c program in the test directory of the PortAudio distribution.\n\n@section streams Streams\n\nA Stream represents an active flow of audio data between your application and one or more audio Devices. A Stream operates at a specific sample rate with specific sample formats and buffer sizes.\n\n@subsection io_methods I/O Methods: callback and read/write\n\nPortAudio offers two methods for communicating audio data between an open Stream and your Application: (1) an asynchronous callback interface, where PortAudio calls a user defined callback function when new audio data is available or required, and (2) synchronous read and write functions which can be used in a blocking or non-blocking manner. You choose between the two methods when you open a Stream. The two methods are discussed in more detail below.\n\n@subsection opening_and_closing_streams Opening and Closing Streams\n\nYou call Pa_OpenStream() to open a Stream, specifying the Device(s) to use, the number of input and output channels, sample formats, suggested latency values and flags that control dithering, clipping and overflow handling. You specify many of these parameters in two PaStreamParameters structures, one for input and one for output. If you're using the callback I/O method you also pass a callback buffer size, callback function pointer and user data pointer. \n\nDevices may be full duplex (supporting simultaneous input and output) or half duplex (supporting input or output) &ndash; usually this reflects the structure of the underlying native audio API. When opening a Stream you can specify one full duplex Device for both input and output, or two different Devices for input and output. Some Host APIs only support full-duplex operation with a full-duplex device (e.g. ASIO) but most are able to aggregate two half duplex devices into a full duplex Stream. PortAudio requires that all devices specified in a call to Pa_OpenStream() belong to the same Host API.\n\nA successful call to Pa_OpenStream() creates a pointer to a @ref PaStream &ndash; an opaque handle representing the open Stream. All PortAudio API functions that operate on open Streams take a pointer to a @ref PaStream as their first parameter.\n\nPortAudio also provides Pa_OpenDefaultStream() &ndash; a simpler alternative to Pa_OpenStream() which you can use when you want to open the default audio Device(s) with default latency parameters.\n\nYou call Pa_CloseStream() to close a Stream when you've finished using it.\n\n@subsection starting_and_stopping_streams Starting and Stopping Streams\n\nNewly opened Streams are initially stopped. You call Pa_StartStream() to start a Stream. You can stop a running Stream using Pa_StopStream() or Pa_AbortStream() (the Stop function plays out all internally queued audio data, while Abort tries to stop as quickly as possible). An open Stream can be started and stopped multiple times. You can call Pa_IsStreamStopped() to query whether a Stream is running or stopped.\n\nBy calling Pa_SetStreamFinishedCallback() it is possible to register a special @ref PaStreamFinishedCallback that will be called when the Stream has completed playing any internally queued buffers. This can be used in conjunction with the @ref paComplete stream callback return value (see below) to avoid blocking on a call to Pa_StopStream() while queued audio data is still playing.\n\n@subsection callback_io_method The Callback I/O Method\n\nSo-called 'callback Streams' operate by periodically invoking a callback function you supply to Pa_OpenStream(). The callback function must implement the @ref PaStreamCallback signature. It gets called by PortAudio every time PortAudio needs your application to consume or produce audio data. The callback is passed pointers to buffers containing the audio to process. The format (interleave, sample data type) and size of these buffers is determined by the parameters passed to Pa_OpenStream() when the Stream was opened.\n\nStream callbacks usually return @ref paContinue to indicate that PortAudio should keep the stream running. It is possible to deactivate a Stream from the stream callback by returning either @ref paComplete or @ref paAbort. In this case the Stream enters a deactivated state after the last buffer has finished playing (@ref paComplete) or as soon as possible (@ref paAbort). You can detect the deactivated state by calling Pa_IsStreamActive() or by using Pa_SetStreamFinishedCallback() to subscribe to a stream finished notification. Note that even if the stream callback returns @ref paComplete it's still necessary to call Pa_StopStream() or Pa_AbortStream() to enter the stopped state.\n\nMany of the tests in the /tests directory of the PortAudio distribution implement PortAudio stream callbacks. For example see: patest_sine.c (audio output), patest_record.c (audio input), patest_wire.c (audio pass-through) and pa_fuzz.c (simple audio effects processing).\n\n<strong>IMPORTANT:</strong> The stream callback function often needs to operate with very high or real-time priority. As a result there are strict requirements placed on the type of code that can be executed in a stream callback. In general this means avoiding any code that might block, including: acquiring locks, calling OS API functions including allocating memory. With the exception of Pa_GetStreamCpuLoad() you may not call PortAudio API functions from within the stream callback.\n\n@subsection read_write_io_method The Read/Write I/O Method\n\nAs an alternative to the callback I/O method, PortAudio provides a synchronous read/write interface for acquiring and playing audio. This can be useful for applications that don't require the lowest possibly latency, or don't warrant the increased complexity of synchronising with an asynchronous callback function. This I/O method is also useful when calling PortAudio from programming languages that don't support asynchronous callbacks. \n\nTo open a Stream in read/write mode you pass a NULL stream callback function pointer to Pa_OpenStream().\n\nTo write audio data to a Stream call Pa_WriteStream() and to read data call Pa_ReadStream(). These functions will block if the internal buffers are full, making them safe to call in a tight loop. If you want to avoid blocking you can query the amount of available read or write space using Pa_GetStreamReadAvailable() or Pa_GetStreamWriteAvailable() and use the returned values to limit the amount of data you read or write.\n\nFor examples of the read/write I/O method see the following examples in the /tests directory of the PortAudio distribution: patest_read_record.c (audio input), patest_write_sine.c (audio output), patest_read_write_wire.c (audio pass-through).\n\n@subsection stream_info Retrieving Stream Information\n\nYou can retrieve information about an open Stream by calling Pa_GetStreamInfo(). This returns a @ref PaStreamInfo structure containing the actual input and output latency and sample rate of the stream. It's possible for these values to be different from the suggested values passed to Pa_OpenStream().\n\nWhen using a callback stream you can call Pa_GetStreamCpuLoad() to retrieve a rough estimate of the amount of CPU time your callback function is using.\n\n@subsection stream_timing Stream Timing Information\n\nWhen using the callback I/O method your stream callback function receives timing information via a pointer to a PaStreamCallbackTimeInfo structure. This structure contains the current time along with the estimated hardware capture and playback time of the first sample of the input and output buffers. All times are measured in seconds relative to a Stream-specific clock. The current Stream clock time can be retrieved using Pa_GetStreamTime().\n\nYou can use the stream callback @ref PaStreamCallbackTimeInfo times in conjunction with timestamps returned by Pa_GetStreamTime() to implement time synchronization schemes such as time aligning your GUI display with rendered audio, or maintaining synchronization between MIDI and audio playback.\n\n@section error_handling Error Handling\n\nMost PortAudio functions return error codes using values from the @ref PaError enumeration. All error codes are negative values. Some functions return values greater than or equal to zero for normal results and a negative error code in case of error.\n\nYou can convert @ref PaError error codes to human readable text by calling Pa_GetErrorText().\n\nPortAudio usually tries to translate error conditions into portable @ref PaError error codes. However if an unexpected error is encountered the @ref paUnanticipatedHostError code may be returned. In this case a further mechanism is provided to query for Host API-specific error information. If PortAudio returns @ref paUnanticipatedHostError you can call Pa_GetLastHostErrorInfo() to retrieve a pointer to a @ref PaHostErrorInfo structure that provides more information, including the Host API that encountered the error, a native API error code and error text. \n\n@section host_api_extensions Host API and Platform-specific Extensions\n\nThe public PortAudio API only exposes functionality that can be provided across all target platforms. In some cases individual native audio APIs offer unique functionality. Some PortAudio Host APIs expose this functionality via Host API-specific extensions. Examples include access to low-level buffering and priority parameters, opening a Stream with only a subset of a Device's channels, or accessing channel metadata such as channel names.\n\nHost API-specific extensions are provided in the form of additional functions and data structures defined in Host API-specific header files found in the /include directory.\n\nThe @ref PaStreamParameters structure passed to Pa_IsFormatSupported() and Pa_OpenStream() has a field named @ref PaStreamParameters::hostApiSpecificStreamInfo that is sometimes used to pass low level information when opening a Stream.\n\nSee the documentation for the individual Host API-specific header files for details of the extended functionality they expose:\n\n- pa_asio.h\n- pa_jack.h\n- pa_linux_alsa.h\n- pa_mac_core.h\n- pa_win_ds.h\n- pa_win_wasapi.h\n- pa_win_wmme.h\n- pa_win_waveformat.h\n\n*/"
  },
  {
    "path": "thirdparty/portaudio/doc/src/license.dox",
    "content": "/** @page License PortAudio License\n\nPortAudio Portable Real-Time Audio Library <br>\nCopyright (c) 1999-2011 Ross Bencina, Phil Burk\n\n\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files\n(the \"Software\"), to deal in the Software without restriction,\nincluding without limitation the rights to use, copy, modify, merge,\npublish, distribute, sublicense, and/or sell copies of the Software,\nand to permit persons to whom the Software is furnished to do so,\nsubject to the following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\nANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\nCONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n<br>\n\nThe text above constitutes the entire PortAudio license; however, \nthe PortAudio community also makes the following non-binding requests:\n\nAny person wishing to distribute modifications to the Software is\nrequested to send the modifications to the original developer so that\nthey can be incorporated into the canonical version. It is also \nrequested that these non-binding requests be included along with the \nlicense above.\n\n*/"
  },
  {
    "path": "thirdparty/portaudio/doc/src/mainpage.dox",
    "content": "/* doxygen index page */\n/** @mainpage\n\n@section overview Overview\n\nPortAudio is a cross-platform, open-source C language library for real-time audio input and output.\nThe library provides functions that allow your software to acquire and output real-time audio streams from your computer's hardware audio interfaces. It is designed to simplify writing cross-platform audio applications, and also to simplify the development of audio software in general by hiding the complexities of dealing directly with each native audio API. PortAudio is used to implement sound recording, editing and mixing applications, software synthesizers, effects processors, music players, internet telephony applications, software defined radios and more. Supported platforms include MS Windows, Mac OS X and Linux. Third-party language bindings make it possible to call PortAudio from other programming languages including @ref java_binding \"Java\", C++, C#, Python, PureBasic, FreePascal and Lazarus.\n\n@section start_here Start here\n\n- @ref api_overview <br>\nA top-down view of the PortAudio API, its capabilities, functions and data structures\n\n- @ref tutorial_start <br> \nGet started writing code with PortAudio tutorials\n\n- @ref examples_src \"Examples\"<br>\nSimple example programs demonstrating PortAudio usage\n\n- @ref License <br>\nPortAudio is licenced under the MIT Expat open source licence. We make a non-binding request for you to contribute your changes back to the project.\n\n\n@section reference API Reference\n\n- portaudio.h Portable API<br>\nDetailed documentation for each portable API function and data type\n\n- @ref public_header \"Host API Specific Extensions\"<br>\nDocumentation for non-portable platform-specific host API extensions\n\n\n@section resources Resources\n\n- <a href=\"http://www.portaudio.com\">The PortAudio website</a>\n\n- <a href=\"http://www.portaudio.com/contacts.html\">Our mailing list for users and developers</a><br>\n\n- <a href=\"https://github.com/PortAudio/portaudio/wiki\">The PortAudio wiki</a>\n\n@section developer_resources Developer Resources\n\n@if INTERNAL\n- @ref srcguide\n@endif\n\n- <a href=\"https://github.com/PortAudio/portaudio/\">Our repository on GitHub</a>\n\n- <a href=\"https://github.com/PortAudio/portaudio/wiki/DeveloperGuidelines\">Developer guidelines</a>\n\n- <a href=\"https://github.com/PortAudio/portaudio/wiki/ImplementationStyleGuidelines\">Implementation style guidelines</a>\n\nIf you're interested in helping out with PortAudio development we're more than happy for you to be involved.\nJust drop by the PortAudio mailing list and ask how you can help.\nOr check out these <a href=\"https://github.com/PortAudio/portaudio/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22\">\nrecommended starter issues</a>.\n\n@section older_api_versions Older API Versions\n\nThis documentation covers the current API version: PortAudio V19, API version 2.0. API 2.0 differs in a number of ways from previous versions (most often encountered in PortAudio V18), please consult the enhancement proposals for details of what was added/changed for V19:\nhttp://www.portaudio.com/docs/proposals/index.html\n\n*/\n"
  },
  {
    "path": "thirdparty/portaudio/doc/src/srcguide.dox",
    "content": "/*\n define all of the file groups used to structure the documentation.\n*/\n\n/**\n @defgroup public_header Public API definitions for users of PortAudio \n*/\n\n/**\n @internal\n @defgroup common_src Source code common to all implementations\n*/\n\n/**\n @internal\n @defgroup win_src Source code common to all Windows implementations\n*/\n\n/**\n @internal\n @defgroup unix_src Source code common to all Unix implementations\n*/\n\n/**\n @internal\n @defgroup macosx_src Source code common to all Macintosh implementations\n*/\n\n/**\n @internal\n @defgroup hostapi_src Source code for specific Host APIs\n*/\n\n/**\n @internal\n @defgroup test_src Test programs\n*/\n\n/**\n @defgroup examples_src Example programs demonstrating PortAudio usage\n*/\n\n/**\n @internal\n @page srcguide A guide to the PortAudio sources\n\n - \\ref public_header\n - \\ref examples_src\n - \\ref common_src\n - \\ref win_src\n - \\ref unix_src\n - \\ref macosx_src\n - \\ref hostapi_src\n - \\ref test_src\n*/"
  },
  {
    "path": "thirdparty/portaudio/doc/src/tutorial/blocking_read_write.dox",
    "content": "/** @page blocking_read_write Blocking Read/Write Functions\n@ingroup tutorial\n\nPortAudio V19 adds a huge advance over previous versions with a feature called Blocking I/O. Although it may have lower performance that the callback method described earlier in this tutorial, blocking I/O is easier to understand and is, in some cases, more compatible with third party systems than the callback method. Most people starting audio programming also find Blocking I/O easier to learn.\n\nBlocking I/O works in much the same way as the callback method except that instead of providing a function to provide (or consume) audio data, you must feed data to (or consume data from) PortAudio at regular intervals, usually inside a loop. The example below, excepted from patest_read_write_wire.c, shows how to open the default device, and pass data from its input to its output for a set period of time. Note that we use the default high latency values to help avoid underruns since we are usually reading and writing audio data from a relatively low priority thread, and there is usually extra buffering required to make blocking I/O work.\n\nNote that not all API's implement Blocking I/O at this point, so for maximum portability or performance, you'll still want to use callbacks.\n\n@code\n    /* -- initialize PortAudio -- */\n    err = Pa_Initialize();\n    if( err != paNoError ) goto error;\n\n    /* -- setup input and output -- */\n    inputParameters.device = Pa_GetDefaultInputDevice(); /* default input device */\n    inputParameters.channelCount = NUM_CHANNELS;\n    inputParameters.sampleFormat = PA_SAMPLE_TYPE;\n    inputParameters.suggestedLatency = Pa_GetDeviceInfo( inputParameters.device )->defaultHighInputLatency ;\n    inputParameters.hostApiSpecificStreamInfo = NULL;\n\n    outputParameters.device = Pa_GetDefaultOutputDevice(); /* default output device */\n    outputParameters.channelCount = NUM_CHANNELS;\n    outputParameters.sampleFormat = PA_SAMPLE_TYPE;\n    outputParameters.suggestedLatency = Pa_GetDeviceInfo( outputParameters.device )->defaultHighOutputLatency;\n    outputParameters.hostApiSpecificStreamInfo = NULL;\n\n    /* -- setup stream -- */\n    err = Pa_OpenStream(\n              &stream,\n              &inputParameters,\n              &outputParameters,\n              SAMPLE_RATE,\n              FRAMES_PER_BUFFER,\n              paClipOff,      /* we won't output out of range samples so don't bother clipping them */\n              NULL, /* no callback, use blocking API */\n              NULL ); /* no callback, so no callback userData */\n    if( err != paNoError ) goto error;\n\n    /* -- start stream -- */\n    err = Pa_StartStream( stream );\n    if( err != paNoError ) goto error;\n    printf(\"Wire on. Will run one minute.\\n\"); fflush(stdout);\n\n    /* -- Here's the loop where we pass data from input to output -- */\n    for( i=0; i<(60*SAMPLE_RATE)/FRAMES_PER_BUFFER; ++i )\n    {\n       err = Pa_WriteStream( stream, sampleBlock, FRAMES_PER_BUFFER );\n       if( err ) goto xrun;\n       err = Pa_ReadStream( stream, sampleBlock, FRAMES_PER_BUFFER );\n       if( err ) goto xrun;\n    }\n    /* -- Now we stop the stream -- */\n    err = Pa_StopStream( stream );\n    if( err != paNoError ) goto error;\n\n    /* -- don't forget to cleanup! -- */\n    err = Pa_CloseStream( stream );\n    if( err != paNoError ) goto error;\n\n    Pa_Terminate();\n    return 0;\n@endcode\n\n\nPrevious: \\ref querying_devices | Next: \\ref exploring\n\n*/"
  },
  {
    "path": "thirdparty/portaudio/doc/src/tutorial/compile_cmake.dox",
    "content": "/** @page compile_cmake PortAudio on Windows, OS X or Linux via. CMake\n@ingroup tutorial\n\n@section cmake_building Building PortAudio stand-alone on Windows, OS X or Linux\n\nCMake can be used to generate Visual Studio solutions on Windows, Makefiles (on Linux and OS X) and build metadata for other build systems for PortAudio. You should obtain a recent version of CMake from [http://www.cmake.org] if you do not have one already. If you are unfamiliar with CMake, this section will provide some information on using CMake to build PortAudio.\n\nOn Linux, CMake serves a very similar purpose to an autotools \"configure\" script - except it can generate build metadata apart from Makefiles. The equivalent of the following on POSIX'y systems:\n\n    build_path> {portaudio path}/configure --prefix=/install_location\n    build_path> make\n    build_path> make install\n\nWould be:\n\n    build_path> cmake {portaudio path} -G \"Unix Makefiles\" -DCMAKE_INSTALL_PREFIX=/install_location\n    build_path> make\n    build_path> make install\n\nThe \"-G\" option specifies the type of build metadata which will be generated. You can obtain a list of supported build metadata formats by invoking (on any platform):\n\n    cmake -G\n\n\"make install\" should install the same set of files that are installed using the usual configure script included with PortAudio along with a few extra files (similar to pkg-config metadata files) which make it easier for other CMake projects to use the installed libraries.\n\nOn Windows, you can use CMake to generate Visual Studio project files which can be used to create the PortAudio libraries. The following serves as an example (and should be done from a directory outside the PortAudio tree) which will create Visual Studio 2015 project files targeting a 64-bit build:\n\n    C:\\PABUILD> cmake {portaudio path} -G \"Visual Studio 14 2015 Win64\"\n\nAfter executing the above, you can either open the generated solution with Visual Studio or use CMake to invoke the build process. The following shows an example of how to build a release configuration (assuming the above command was executed previously in the same directory):\n\n    C:\\PABUILD> cmake --build . --config Release\n\nIf you want ASIO support you need to obtain the ASIO2 SDK from Steinberg and place it according to \\ref compile_windows_asio_msvc. Both ASIO and the DirectX SDK are automatically searched for by the CMake script - if they are found, they will be enabled by default.\n\n@section cmake_using Using PortAudio in your CMake project\n\nPortAudio defines the following CMake targets:\n\n - \"portaudio_static\" for a static library and\n - \"portaudio\" for a dynamic library\n\nIf you installed PortAudio as described above in \\ref cmake_building and the install prefix you used (CMAKE_INSTALL_PREFIX) is in your system PATH or CMAKE_MODULE_PATH CMake variable, you should be able to use:\n\n    find_package(portaudio)\n\nTo define the \"portaudio_static\" and \"portaudio\" targets in your CMake project.\n\nIf you do not want to install portaudio into your system but would rather just have it get built as part of your own project (which may be particularly convenient on Windows), you may also use:\n\n    add_subdirectory(\"path to PortAudio location\" \"some binary directory\" EXCLUDE_FROM_ALL)\n\nEXCLUDE_FROM_ALL is not strictly necessary, but will ensure that targets which you don't use in your project won't get built.\n\nBack to \\ref tutorial_start\n\n*/"
  },
  {
    "path": "thirdparty/portaudio/doc/src/tutorial/compile_linux.dox",
    "content": "/** @page compile_linux Building Portaudio for Linux\n@ingroup tutorial\n\n<i>Note: this page has not been reviewed, and may contain errors.</i>\n\n@section comp_linux1 Installing ALSA Development Kit\n\nThe OSS sound API is very old and not well supported. It is recommended that you use the ALSA sound API.\nThe PortAudio configure script will look for the ALSA SDK. You can install the ALSA SDK on Ubuntu using:\n\n@code\nsudo apt-get install libasound-dev\n@endcode\n\nYou might need to use yum, or some other package manager, instead of apt-get on your machine.\nIf you do not install ALSA then you might get a message when testing that says you have no audio devices.\n\nYou can find out more about ALSA here: http://www.alsa-project.org/\n\n@section comp_linux2 Configuring and Compiling PortAudio\n\nYou can build PortAudio in Linux Environments using the standard configure/make tools:\n\n@code\n./configure && make\n@endcode\n\nThat will build PortAudio using Jack, ALSA and OSS in whatever combination they are found on your system. For example, if you have Jack and OSS but not ALSA, it will build using Jack and OSS but not ALSA. This step also builds a number of tests, which can be found in the bin directory of PortAudio. It's a good idea to run some of these tests to make sure PortAudio is working correctly.\n\n@section comp_linux3 Using PortAudio in your Projects\n\nTo use PortAudio in your apps, you can simply install the .so files:\n\n@code\nsudo make install\n@endcode\n\nProjects built this way will expect PortAudio to be installed on target systems in order to run. If you want to build a more self-contained binary, you may use the libportaudio.a file:\n\n@code\ncp lib/.libs/libportaudio.a /YOUR/PROJECT/DIR\n@endcode\n\nOn some systems you may need to use:\n\n@code\ncp /usr/local/lib/libportaudio.a /YOUR/PROJECT/DIR\n@endcode\n\nYou may also need to copy portaudio.h, located in the include/ directory of PortAudio into your project. Note that you will usually need to link with the appropriate libraries that you used, such as ALSA and JACK, as well as with librt and libpthread. For example:\n\n@code\ngcc main.c libportaudio.a -lrt -lm -lasound -ljack -pthread -o YOUR_BINARY\n@endcode\n\n@section comp_linux4 Linux Extensions\n\nNote that the ALSA PortAudio back-end adds a few extensions to the standard API that you may take advantage of. To use these functions be sure to include the pa_linux_alsa.h file found in the include file in the PortAudio folder. This file contains further documentation on the following functions:\n\n PaAlsaStreamInfo/PaAlsa_InitializeStreamInfo::\n  Objects of the !PaAlsaStreamInfo type may be used for the !hostApiSpecificStreamInfo attribute of a !PaStreamParameters object, in order to specify the name of an ALSA device to open directly. Specify the device via !PaAlsaStreamInfo.deviceString, after initializing the object with PaAlsa_InitializeStreamInfo.\n \n PaAlsa_EnableRealtimeScheduling::\n  PA ALSA supports real-time scheduling of the audio callback thread (using the FIFO pthread scheduling policy), via the extension PaAlsa_EnableRealtimeScheduling. Call this on the stream before starting it with the <i>enableScheduling</i> parameter set to true or false, to enable or disable this behaviour respectively.\n \n PaAlsa_GetStreamInputCard::\n  Use this function to get the ALSA-lib card index of the stream's input device.\n \n PaAlsa_GetStreamOutputCard::\n  Use this function to get the ALSA-lib card index of the stream's output device.\n\nOf particular importance is PaAlsa_EnableRealtimeScheduling, which allows ALSA to run at a high priority to prevent ordinary processes on the system from preempting audio playback. Without this, low latency audio playback will be irregular and will contain frequent drop-outs.\n\n@section comp_linux5 Linux Debugging\n\nEliot Blennerhassett writes:\n\nOn linux build, use e.g. \"libtool gdb bin/patest_sine8\" to debug that program.\nThis is because on linux bin/patest_sine8 is a libtool shell script that wraps \nbin/.libs/patest_sine8  and allows it to find the appropriate libraries within \nthe build tree.\n\n*/"
  },
  {
    "path": "thirdparty/portaudio/doc/src/tutorial/compile_mac_coreaudio.dox",
    "content": "/** @page compile_mac_coreaudio Building Portaudio for Mac OS X\n@ingroup tutorial\n\n@section comp_mac_ca_1 Requirements\n\n* OS X 10.4 or later. PortAudio v19 currently only compiles and runs on OS X version 10.4 or later. Because of its heavy reliance on memory barriers, it's not clear how easy it would be to back-port PortAudio to OS X version 10.3. Leopard support requires the 2007 snapshot or later.\n\n* Apple's Xcode and its related tools installed in the default location. There is no Xcode project for PortAudio.\n\n* Mac 10.4 SDK. Look for \"/Developer/SDKs/MacOSX10.4u.sdk\" folder on your system. It may be installed with XCode. If not then you can download it from Apple Developer Connection. http://connect.apple.com/\n\n@section comp_mac_ca_2 Building\n\nTo build PortAudio, simply use the Unix-style \"./configure && make\":\n\n@code\n ./configure && make\n@endcode\n\nYou do <b>not</b> need to do \"make install\", and we don't recommend it; however, you may be using software that instructs you to do so, in which case you should follow those instructions. (Note from Phil: I had to do \"sudo make install\" after the command above, otherwise XCode complained that it could not find \"/usr/local/lib/libportaudio.dylib\" when I compiled an example.)\n\nThe result of these steps will be a file named \"libportaudio.dylib\" in the directory \"usr/local/lib/\".\n\nBy default, this will create universal binaries and therefore requires the Universal SDK from Apple, included with XCode 2.1 and higher. \n\n@section comp_mac_ca_3 Other Build Options\n\nThere are a variety of other options for building PortAudio. The default described above is recommended as it is the most supported and tested; however, your needs may differ and require other options, which are described below.\n\n@subsection comp_mac_ca_3.1 Building Non-Universal Libraries\n\nBy default, PortAudio is built as a universal binary. This includes 64-bit versions if you are compiling on 10.5, Leopard. If you want a \"thin\", or single architecture library, you have two options:\n\n * build a non-universal library using configure options.\n * use lipo(1) on whatever part of the library you plan to use.\n\nNote that the first option may require an extremely recent version of PortAudio (February 5th '08 at least).\n\n@subsection comp_mac_ca_3.2 Building with <i>--disable-mac-universal</i>\n\nTo build a non-universal library for the host architecture, simply use the <i>--disable-mac-universal</i> option with configure.\n\n@code\n ./configure --disable-mac-universal && make\n@endcode\n\nThe <i>--disable-mac-universal</i> option may also be used in conjunction with environment variables to give you more control over the universal binary build process. For example, to build a universal binary for the i386 and ppc architectures using the 10.4u sdk (which is the default on 10.4, but not 10.5), you might specify this configure command line:\n\n@code\n CFLAGS=\"-O2 -g -Wall -arch i386 -arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.3\" \\\n   LDFLAGS=\"-arch i386 -arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.3\" \\\n   ./configure --disable-mac-universal --disable-dependency-tracking\n@endcode\n\nFor more info, see Apple's documentation on the matter:\n\n * http://developer.apple.com/technotes/tn2005/tn2137.html\n * http://developer.apple.com/documentation/Porting/Conceptual/PortingUnix/intro/chapter_1_section_1.html\n\n@subsection comp_mac_ca_3.3 Using lipo\n\nThe second option is to build normally, and use lipo (1) to extract the architectures you want. For example, if you want a \"thin\", i386 library only:\n\n@code\n lipo lib/.libs/libportaudio.a -thin i386 -output libportaudio.a\n@endcode\n\nor if you want to extract a single architecture fat file:\n\n@code\n lipo lib/.libs/libportaudio.a -extract i386 -output libportaudio.a\n@endcode\n\n@subsection comp_mac_ca_3.4 Building With Debug Options\n\nBy default, PortAudio on the mac is built without any debugging options. This is because asserts are generally inappropriate for a production environment and debugging information has been suspected, though not proven, to cause trouble with some interfaces. If you would like to compile with debugging, you must run configure with the appropriate flags. For example:\n\n@code\n ./configure --enable-mac-debug && make\n@endcode\n\nThis will enable -g and disable -DNDEBUG which will effectively enable asserts.\n\n@section comp_mac_ca_4 Using the Library in XCode Projects\n\nIf you are planning to follow the rest of the tutorial, several project types will work. You can create a \"Standard Tool\" under \"Command Line Utility\". If you are not following the rest of the tutorial, any type of project should work with PortAudio, but these instructions may not work perfectly.\n\nOnce you've compiled PortAudio, the easiest and recommended way to use PortAudio in your XCode project is to add \"<portaudio>/include/portaudio.h\" and \"<portaudio>/lib/.libs/libportaudio.a\" to your project. Because \"<portaudio>/lib/.libs/\" is a hidden directory, you won't be able to navigate to it using the finder or the standard Mac OS file dialogs by clicking on files and folders. You can use command-shift-G in the finder to specify the exact path, or, from the shell, if you are in the portaudio directory, you can enter this command:\n\n@code\n open lib/.libs\n@endcode\n\nThen drag the \"libportaudio.a\" file into your XCode project and place it in the \"External Frameworks and Libraries\" group, if the project type has it. If not you can simply add it to the top level folder of the project.\n\nYou will need to add the following frameworks to your XCode project:\n\n - CoreAudio.framework\n - AudioToolbox.framework\n - AudioUnit.framework\n - CoreServices.framework\n - CoreFoundation.framework\n\n@section comp_mac_ca_5 Using the Library in Other Projects\n\nFor gcc/Make style projects, include \"include/portaudio.h\" and link \"libportaudio.a\", and use the frameworks listed in the previous section. How you do so depends on your build.\n\n@section comp_mac_ca_6 Using Mac-only Extensions to PortAudio\n\nFor additional, Mac-only extensions to the PortAudio interface, you may also want to grab \"include/pa_mac_core.h\". This file contains some special, mac-only features relating to sample-rate conversion, channel mapping, performance and device hogging. See \"src/hostapi/coreaudio/notes.txt\" for more details on these features.\n\n@section comp_mac_ca_7 What Happened to Makefile.darwin?\n\nNote, there used to be a special makefile just for darwin. This is no longer supported because you can build universal binaries from the standard configure routine. If you find this file in your directory structure it means you have an outdated version of PortAudio.\n\n@code\n make -f Makefile.darwin\n@endcode\n\nBack to the Tutorial: \\ref tutorial_start\n\n*/\n"
  },
  {
    "path": "thirdparty/portaudio/doc/src/tutorial/compile_windows.dox",
    "content": "/** @page compile_windows Building PortAudio for Windows using Microsoft Visual Studio\n@ingroup tutorial\n\nBelow is a list of steps to build PortAudio into a dll and lib file. The resulting dll file may contain all five current win32 PortAudio APIs: MME, DirectSound, WASAPI, WDM/KS and ASIO, depending on the preprocessor definitions set in step 9 below.\n\nPortAudio can be compiled using Visual C++ Express Edition which is available free from Microsoft. If you do not already have a C++ development environment, simply download and install. These instructions have been observed to succeed using Visual Studio 2010 as well.\n\n1) Building PortAudio with DirectSound support requires the files <i>dsound.h</i> and <i>dsconf.h</i>. Download and install the DirectX SDK from http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=3021d52b-514e-41d3-ad02-438a3ba730ba to obtain these files. If you installed the DirectX SDK then the DirectSound libraries and header files should be found automatically by Visual Studio/Visual C++. If you get an error saying dsound.h or dsconf.h is missing, you will need to add an extra include path to the Visual Studio project file referencing the DirectX includes directory.\n\n2) For ASIO support, download the ASIO SDK from Steinberg at http://www.steinberg.net/en/company/developer.html . The SDK is free, but you will need to set up a developer account with Steinberg. To use the Visual Studio projects mentioned below, copy the entire ASIOSDK2 folder into src\\\\hostapi\\\\asio\\\\. Rename it from ASIOSDK2 to ASIOSDK. To build without ASIO (or other host API) see the \"Building without ASIO support\" section below.\n\n3) If you have Visual Studio 6.0, 7.0(VC.NET/2001) or 7.1(VC.2003), open portaudio.dsp and convert if needed.\n\n4) If you have Visual Studio 2005, Visual C++ 2008 Express Edition or Visual Studio 2010, open the portaudio.sln file located in build\\\\msvc\\\\. Doing so will open Visual Studio or Visual C++. Click \"Finish\" if a conversion wizard appears. The sln file contains four configurations: Win32 and Win64 in both Release and Debug variants.\n\n@section comp_win1 For Visual Studio 2005, Visual C++ 2008 Express Edition or Visual Studio 2010\n\nThe steps below describe settings for recent versions of Visual Studio. Similar settings can be set in earlier versions of Visual Studio.\n\n5) Open Project -> portaudio Properties and select \"Configuration Properties\" in the tree view.\n\n6) Select \"all configurations\" in the \"Configurations\" combo box above. Select \"All Platforms\" in the \"Platforms\" combo box.\n\n7) Now set a few options:\n\nRequired:\n\nC/C++ -> Code Generation -> Runtime library = /MT\n\nOptional:\n\nC/C++ -> Optimization -> Omit frame pointers = Yes\n\nOptional: C/C++ -> Code Generation -> Floating point model = fast\n\nNOTE: When using PortAudio from C/C++ it is not usually necessary to explicitly set the structure member alignment; the default should work fine. However some languages require, for example, 4-byte alignment. If you are having problems with portaudio.h structure members not being properly read or written to, it may be necessary to explicitly set this value by going to C/C++ -> Code Generation -> Struct member alignment and setting it to an appropriate value (four is a common value). If your compiler is configurable, you should ensure that it is set to use the same structure member alignment value as used for the PortAudio build.\n\nClick \"Ok\" when you have finished setting these parameters.\n\n@section comp_win2 Preprocessor Definitions\n\nSince the preprocessor definitions are different for each configuration and platform, you'll need to edit these individually for each configuration/platform combination that you want to modify using the \"Configurations\" and \"Platforms\" combo boxes.\n\n8) To suppress PortAudio runtime debug console output, go to Project -> Properties -> Configuration Properties -> C/C++ -> Preprocessor. In the field 'Preprocessor Definitions', find PA_ENABLE_DEBUG_OUTPUT and remove it. The console will not output debug messages.\n\n9) Also in the preprocessor definitions you need to explicitly define the native audio APIs you wish to use. For Windows the available API definitions are:\n\nPA_USE_ASIO<br>\nPA_USE_DS (DirectSound)<br>\nPA_USE_WMME (MME)<br>\nPA_USE_WASAPI<br>\nPA_USE_WDMKS<br>\nPA_USE_SKELETON\n\nFor each of these, the value of 0 indicates that support for this API should not be included. The value 1 indicates that support for this API should be included. (PA_USE_SKELETON is not usually used, it is a code sample for developers wanting to support a new API).\n\n@section comp_win3 Building\n\nAs when setting Preprocessor definitions, building is a per-configuration per-platform process. Follow these instructions for each configuration/platform combination that you're interested in.\n\n10) From the Build menu click Build -> Build solution. For 32-bit compilations, the dll file created by this process (portaudio_x86.dll) can be found in the directory build\\\\msvc\\\\Win32\\\\Release. For 64-bit compilations, the dll file is called portaudio_x64.dll, and is found in the directory build\\\\msvc\\\\x64\\\\Release.\n\n11) Now, any project that requires portaudio can be linked with portaudio_x86.lib (or _x64) and include the relevant headers (portaudio.h, and/or pa_asio.h , pa_x86_plain_converters.h) You may want to add/remove some DLL entry points. At the time of writing the following 6 entries are not part of the official PortAudio API defined in portaudio.h:\n\n(from portaudio.def)\n@code\n...\nPaAsio_GetAvailableLatencyValues    @50\nPaAsio_ShowControlPanel             @51\nPaUtil_InitializeX86PlainConverters @52\nPaAsio_GetInputChannelName          @53\nPaAsio_GetOutputChannelName         @54\nPaUtil_SetLogPrintFunction          @55\n@endcode\n\n@section comp_win4 Building without ASIO support\n\nTo build PortAudio without ASIO support you need to:\n\n1) Make sure your project doesn't try to build any ASIO SDK files. If you're using one of the shipped projects, remove the ASIO related files from the project. In the shipped projects you can find them in the project tree under portaudio > Source Files > hostapi > ASIO > ASIOSDK\n\n2) Make sure your project doesn't try to build the PortAudio ASIO implementation files:\n\n@code\nsrc\\\\hostapi\\\\pa_asio.cpp\nsrc\\\\hostapi\\\\iasiothiscallresolver.cpp\n@endcode\n\nIf you're using one of the shipped projects, remove them from the project. In the shipped projects you can find them in the project tree under portaudio > Source Files > hostapi > ASIO\n\n3) Define the preprocessor symbols in the project properties as described in step 9 above. In VS2005 this can be accomplished by selecting\nProject Properties -> Configuration Properties -> C/C++ -> Preprocessor -> Preprocessor Definitions. Omitting PA_USE_ASIO or setting it to 0 stops src\\\\os\\\\win\\\\pa_win_hostapis.c from trying to initialize the PortAudio ASIO implementation.\n\n4) Remove PaAsio_* entry points from portaudio.def\n\n\n-----\nDavid Viens, davidv@plogue.com\n\nUpdated by Chris on 5/26/2011\n\nImprovements by John Clements on 12/15/2011\n\nEdits by Ross on 1/20/2014\n\nBack to the Tutorial: \\ref tutorial_start\n\n*/"
  },
  {
    "path": "thirdparty/portaudio/doc/src/tutorial/compile_windows_asio_msvc.dox",
    "content": "/** @page compile_windows_asio_msvc Building Portaudio for Windows with ASIO support using MSVC\n@ingroup tutorial\n\n@section comp_win_asiomsvc1 Portaudio Windows ASIO with MSVC\n\nThis tutorial describes how to build PortAudio with ASIO support using MSVC *from scratch*, without an existing Visual Studio project. For instructions for building PortAudio (including ASIO support) using the bundled Visual Studio project file see the compiling instructions for \\ref compile_windows.\n\nASIO is a low latency audio API from Steinberg. To compile an ASIO\napplication, you must first download the ASIO SDK from Steinberg. You also\nneed to obtain ASIO drivers for your audio device. Download the ASIO SDK from Steinberg at http://www.steinberg.net/en/company/developer.html . The SDK is free but you will need to set up a developer account with Steinberg.\n\nThis tutorial assumes that you have 3 directories set up at the same level (side by side), one containing PortAudio, one containing the ASIO SDK and one containing your Visual Studio project:\n\n@code\n/ASIOSDK2 \n/portaudio\n/DirContainingYourVisualStudioProject  (should directly contain the .sln, .vcproj or .vcprojx etc.)\n@endcode\n\nFirst, make sure that the Steinberg SDK and the portaudio files are \"side by side\" in the same directory.\n\nOpen Microsoft Visual C++ and create a new blank Console exe Project/Workspace in that same directory.\n\nFor example, the paths for all three groups might read like this:\n\n@code\nC:\\Program Files\\Microsoft Visual Studio\\VC98\\My Projects\\ASIOSDK2\nC:\\Program Files\\Microsoft Visual Studio\\VC98\\My Projects\\portaudio\nC:\\Program Files\\Microsoft Visual Studio\\VC98\\My Projects\\Sawtooth\n@endcode\n\n\nNext, add the following Steinberg ASIO SDK files to the project Source Files: \n\n@code\nasio.cpp                        (ASIOSDK2\\common)\nasiodrivers.cpp                 (ASIOSDK2\\host)\nasiolist.cpp                    (ASIOSDK2\\host\\pc)\n@endcode\n\n\nThen, add the following PortAudio files to the project Source Files:\n\n@code\npa_asio.cpp                     (portaudio\\src\\hostapi\\asio)\npa_allocation.c                 (portaudio\\src\\common)\npa_converters.c                 (portaudio\\src\\common)\npa_cpuload.c                    (portaudio\\src\\common)\npa_dither.c                     (portaudio\\src\\common)\npa_front.c                      (portaudio\\src\\common)\npa_process.c                    (portaudio\\src\\common)\npa_ringbuffer.c                 (portaudio\\src\\common)\npa_stream.c                     (portaudio\\src\\common)\npa_trace.c                      (portaudio\\src\\common)\npa_win_hostapis.c               (portaudio\\src\\os\\win)\npa_win_util.c                   (portaudio\\src\\os\\win)\npa_win_coinitialize.c           (portaudio\\src\\os\\win)\npa_win_waveformat.c             (portaudio\\src\\os\\win)\npa_x86_plain_converters.c       (portaudio\\src\\os\\win)\npaex_saw.c                      (portaudio\\examples)  (Or another file containing main() \n                                                      for the console exe to be built.)\n@endcode\n\n\nAlthough not strictly necessary, you may also want to add the following files to the project Header Files:\n\n@code\nportaudio.h                     (portaudio\\include)\npa_asio.h                       (portaudio\\include)\n@endcode\n\nThese header files define the interfaces to the PortAudio API.\n\n\nNext, go to Project Settings > All Configurations > C/C++ > Preprocessor > Preprocessor Definitions and add\nPA_USE_ASIO=1 to any entries that might be there.\n\neg: WIN32;_CONSOLE;_MBCS   changes to    WIN32;_CONSOLE,_MBCS;PA_USE_ASIO=1\n\nThen, on the same Project Settings tab, go down to Additional Include Directories (in VS2010 you'll find this setting under C/C++ > General) and enter the following relative include paths:\n\n@code\n..\\portaudio\\include;..\\portaudio\\src\\common;..\\portaudio\\src\\os\\win;..\\asiosdk2\\common;..\\asiosdk2\\host;..\\asiosdk2\\host\\pc\n@endcode\n\nYou'll need to make sure the relative paths are correct for the particular directory layout you're using. The above should work fine if you use the side-by-side layout we recommended earlier.\n\nSome source code in the ASIO SDK is not compatible with the Win32 API UNICODE mode (The ASIO SDK expects the non-Unicode Win32 API). Therefore you need to make sure your project is set to not use Unicode. You do this by setting the project Character Set to \"Use Multi-Byte Character Set\" (NOT \"Use Unicode Character Set\"). In VS2010 the Character Set option can be found at Configuration Properties > General > Character Set. (An alternative to setting the project to non-Unicode is to patch asiolist.cpp to work when UNICODE is defined: put #undef UNICODE at the top of the file before windows.h is included.)\n\nYou should now be able to build any of the test executables in the portaudio\\\\examples directory.\nWe suggest that you start with paex_saw.c because it's one of the simplest example files.\n\n--- Chris Share, Tom McCandless, Ross Bencina\n\nBack to the Tutorial: \\ref tutorial_start\n\n*/"
  },
  {
    "path": "thirdparty/portaudio/doc/src/tutorial/compile_windows_mingw.dox",
    "content": "/** @page compile_windows_mingw Building Portaudio for Windows with MinGW\n@ingroup tutorial\n\n@section comp_mingw1 Portaudio for Windows With MinGW\n\n<strong>This document contains old or out-of-date information. Please see\na draft of new MinGW information on our\nWiki: <a href=\"https://github.com/PortAudio/portaudio/wiki/Notes_about_building_PortAudio_with_MinGW\">\nPortAudio Wiki: Notes about building PortAudio with MinGW</a></strong>\n\n= MinGW/MSYS =\n\nFrom the [http://www.mingw.org MinGW projectpage]:\n\nMinGW: A collection of freely available and freely distributable\nWindows specific header files and import libraries, augmenting\nthe GNU Compiler Collection, (GCC), and its associated\ntools, (GNU binutils). MinGW provides a complete Open Source\nprogramming tool set which is suitable for the development of\nnative Windows programs that do not depend on any 3rd-party C\nruntime DLLs.\n\nMSYS: A Minimal SYStem providing a POSIX compatible Bourne shell\nenvironment, with a small collection of UNIX command line\ntools. Primarily developed as a means to execute the configure\nscripts and Makefiles used to build Open Source software, but\nalso useful as a general purpose command line interface to\nreplace Windows cmd.exe.\n\nMinGW provides a compiler/linker toolchain while MSYS is required\nto actually run the PortAudio configure script.\n\nOnce MinGW and MSYS are installed (see the [http://www.mingw.org/MinGWiki MinGW-Wiki]) open an MSYS shell and run the famous:\n\n@code\n./configure\nmake\nmake install\n@endcode\n\nThe above should create a working version though you might want to\nprovide '--prefix=<path-to-install-dir>' to configure.\n\n'./configure --help' gives details as to what can be tinkered with.\n\n--- Mikael Magnusson\n\nTo update your copy or check out a fresh copy of the source\n\n[wiki:UsingThePortAudioSvnRepository  SVN instructions]\n\n--- Bob !McGwier\n\nBack to the Tutorial: \\ref tutorial_start\n\n*/\n"
  },
  {
    "path": "thirdparty/portaudio/doc/src/tutorial/exploring.dox",
    "content": "/** @page exploring Exploring PortAudio\n@ingroup tutorial\n\nNow that you have a good idea of how PortAudio works, you can try out the example programs. You'll find them in the examples/ directory in the PortAudio distribution.\n\nFor an example of playing a sine wave, see examples/paex_sine.c. \n\nFor an example of recording and playing back a sound, see  examples/paex_record.c. \n\nI also encourage you to examine the source for the PortAudio libraries. If you have suggestions on ways to improve them, please let us know. If you want to implement PortAudio on a new platform, please let us know as well so we can coordinate people's efforts.\n\n\nPrevious: \\ref blocking_read_write | Next: This is the end of the tutorial.\n\n*/"
  },
  {
    "path": "thirdparty/portaudio/doc/src/tutorial/initializing_portaudio.dox",
    "content": "/** @page initializing_portaudio Initializing PortAudio\n@ingroup tutorial\n\n@section tut_init1 Initializing PortAudio\n\nBefore making any other calls to PortAudio, you 'must' call Pa_Initialize(). This will trigger a scan of available devices which can be queried later. Like most PA functions, it will return a result of type paError. If the result is not paNoError, then an error has occurred.\n@code\nerr = Pa_Initialize();\nif( err != paNoError ) goto error;\n@endcode\n\nYou can get a text message that explains the error message by passing it to Pa_GetErrorText( err ). For Example:\n\n@code\nprintf(  \"PortAudio error: %s\\n\", Pa_GetErrorText( err ) );\n@endcode\n\nIt is also important, when you are done with PortAudio, to Terminate it:\n\n@code\nerr = Pa_Terminate();\nif( err != paNoError )\n   printf(  \"PortAudio error: %s\\n\", Pa_GetErrorText( err ) );\n@endcode\n\n\nPrevious: \\ref writing_a_callback | Next: \\ref open_default_stream\n\n*/"
  },
  {
    "path": "thirdparty/portaudio/doc/src/tutorial/open_default_stream.dox",
    "content": "/** @page open_default_stream Opening a Stream Using Defaults\n@ingroup tutorial\n\nThe next step is to open a stream, which is similar to opening a file. You can specify whether you want audio input and/or output, how many channels, the data format, sample rate, etc. Opening a ''default'' stream means opening the default input and output devices, which saves you the trouble of getting a list of devices and choosing one from the list. (We'll see how to do that later.)\n@code\n#define SAMPLE_RATE (44100)\nstatic paTestData data;\n\n.....\n\n    PaStream *stream;\n    PaError err;\n\n    /* Open an audio I/O stream. */\n    err = Pa_OpenDefaultStream( &stream,\n                                0,          /* no input channels */\n                                2,          /* stereo output */\n                                paFloat32,  /* 32 bit floating point output */\n                                SAMPLE_RATE,\n                                256,        /* frames per buffer, i.e. the number\n                                                   of sample frames that PortAudio will\n                                                   request from the callback. Many apps\n                                                   may want to use\n                                                   paFramesPerBufferUnspecified, which\n                                                   tells PortAudio to pick the best,\n                                                   possibly changing, buffer size.*/\n                                patestCallback, /* this is your callback function */\n                                &data ); /*This is a pointer that will be passed to\n                                                   your callback*/\n    if( err != paNoError ) goto error;\n@endcode\n\nThe data structure and callback are described in \\ref writing_a_callback.\n\nThe above example opens the stream for writing, which is sufficient for playback. It is also possible to open a stream for reading, to do recording, or both reading and writing, for simultaneous recording and playback or even real-time audio processing. If you plan to do playback and recording at the same time, open only one stream with valid input and output parameters.\n\nThere are some caveats to note about simultaneous read/write:\n\n - Some platforms can only open a read/write stream using the same device.\n - Although multiple streams can be opened, it is difficult to synchronize them.\n - Some platforms don't support opening multiple streams on the same device.\n - Using multiple streams may not be as well tested as other features.\n - The PortAudio library calls must be made from the same thread or synchronized by the user.\n\n\nPrevious: \\ref initializing_portaudio | Next: \\ref start_stop_abort\n\n*/"
  },
  {
    "path": "thirdparty/portaudio/doc/src/tutorial/querying_devices.dox",
    "content": "/** @page querying_devices Enumerating and Querying PortAudio Devices\n@ingroup tutorial\n\n@section tut_query1 Querying Devices\n\nIt is often fine to use the default device as we did previously in this tutorial, but there are times when you'll want to explicitly choose the device from a list of available devices on the system. To see a working example of this, check out pa_devs.c in the tests/ directory of the PortAudio source code. To do so, you'll need to first initialize PortAudio and Query for the number of Devices:\n\n@code\n    int numDevices;\n\n    numDevices = Pa_GetDeviceCount();\n    if( numDevices < 0 )\n    {\n        printf( \"ERROR: Pa_CountDevices returned 0x%x\\n\", numDevices );\n        err = numDevices;\n        goto error;\n    }\n@endcode\n\n\nIf you want to get information about each device, simply loop through as follows:\n\n@code\n    const   PaDeviceInfo *deviceInfo;\n\n    for( i=0; i<numDevices; i++ )\n    {\n        deviceInfo = Pa_GetDeviceInfo( i );\n        ...\n    }\n@endcode\n\nThe Pa_DeviceInfo structure contains a wealth of information such as the name of the devices, the default latency associated with the devices and more. The structure has the following fields:\n\n@code\nint \tstructVersion\nconst char * \tname\nPaHostApiIndex \thostApi\nint \tmaxInputChannels\nint \tmaxOutputChannels\nPaTime \tdefaultLowInputLatency\nPaTime \tdefaultLowOutputLatency\nPaTime \tdefaultHighInputLatency\nPaTime \tdefaultHighOutputLatency\ndouble \tdefaultSampleRate\n@endcode\n\nYou may notice that you can't determine, from this information alone, whether or not a particular sample rate is supported. This is because some devices support ranges of sample rates, others support, a list of sample rates, and still others support some sample rates and number of channels combinations but not others. To get around this, PortAudio offers a function for testing a particular device with a given format:\n\n@code\n    const PaStreamParameters *inputParameters;\n    const PaStreamParameters *outputParameters;\n    double desiredSampleRate;\n    ...\n    PaError err;\n\n    err = Pa_IsFormatSupported( inputParameters, outputParameters, desiredSampleRate );\n    if( err == paFormatIsSupported )\n    {\n       printf( \"Hooray!\\n\");\n    }\n    else\n    {\n       printf(\"Too Bad.\\n\");\n    }\n@endcode\n\nFilling in the inputParameters and outputParameters fields is shown in a moment.\n\nOnce you've found a configuration you like, or one you'd like to go ahead and try, you can open the stream by filling in the PaStreamParameters structures, and calling Pa_OpenStream:\n\n@code\n    double srate = ... ;\n    PaStream *stream;\n    unsigned long framesPerBuffer = ... ; //could be paFramesPerBufferUnspecified, in which case PortAudio will do its best to manage it for you, but, on some platforms, the framesPerBuffer will change in each call to the callback\n    PaStreamParameters outputParameters;\n    PaStreamParameters inputParameters;\n\n    bzero( &inputParameters, sizeof( inputParameters ) ); //not necessary if you are filling in all the fields\n    inputParameters.channelCount = inChan;\n    inputParameters.device = inDevNum;\n    inputParameters.hostApiSpecificStreamInfo = NULL;\n    inputParameters.sampleFormat = paFloat32;\n    inputParameters.suggestedLatency = Pa_GetDeviceInfo(inDevNum)->defaultLowInputLatency ;\n    inputParameters.hostApiSpecificStreamInfo = NULL; //See you specific host's API docs for info on using this field\n\n\n    bzero( &outputParameters, sizeof( outputParameters ) ); //not necessary if you are filling in all the fields\n    outputParameters.channelCount = outChan;\n    outputParameters.device = outDevNum;\n    outputParameters.hostApiSpecificStreamInfo = NULL;\n    outputParameters.sampleFormat = paFloat32;\n    outputParameters.suggestedLatency = Pa_GetDeviceInfo(outDevNum)->defaultLowOutputLatency ;\n    outputParameters.hostApiSpecificStreamInfo = NULL; //See you specific host's API docs for info on using this field\n\n    err = Pa_OpenStream(\n                    &stream,\n                    &inputParameters,\n                    &outputParameters,\n                    srate,\n                    framesPerBuffer,\n                    paNoFlag, //flags that can be used to define dither, clip settings and more\n                    portAudioCallback, //your callback function\n                    (void *)this ); //data to be passed to callback. In C++, it is frequently (void *)this\n    //don't forget to check errors!\n@endcode\n\n\nPrevious: \\ref utility_functions | Next: \\ref blocking_read_write\n\n*/"
  },
  {
    "path": "thirdparty/portaudio/doc/src/tutorial/start_stop_abort.dox",
    "content": "/** @page start_stop_abort Starting, Stopping and Aborting a Stream\n@ingroup tutorial\n\n@section tut_startstop1 Starting, Stopping and Aborting a Stream\n\nPortAudio will not start playing back audio until you start the stream. After calling Pa_StartStream(), PortAudio will start calling your callback function to perform the audio processing.\n\n@code\n    err = Pa_StartStream( stream );\n    if( err != paNoError ) goto error;\n@endcode\n\nYou can communicate with your callback routine through the data structure you passed in on the open call, or through global variables, or using other interprocess communication techniques, but please be aware that your callback function may be called at interrupt time when your foreground process is least expecting it. So avoid sharing complex data structures that are easily corrupted like double linked lists, and avoid using locks such as mutexes as this may cause your callback function to block and therefore drop audio. Such techniques may even cause deadlock on some platforms.\n\nPortAudio will continue to call your callback and process audio until you stop the stream. This can be done in one of several ways, but, before we do so, we'll want to see that some of our audio gets processed by sleeping for a few seconds. This is easy to do with Pa_Sleep(), which is used by many of the examples in the patests/ directory for exactly this purpose. Note that, for a variety of reasons, you can not rely on this function for accurate scheduling, so your stream may not run for exactly the same amount of time as you expect, but it's good enough for our example.\n\n@code\n    /* Sleep for several seconds. */\n    Pa_Sleep(NUM_SECONDS*1000);\n@endcode\n\nNow we need to stop playback. There are several ways to do this, the simplest of which is to call Pa_StopStream():\n\n@code\n    err = Pa_StopStream( stream );\n    if( err != paNoError ) goto error;\n@endcode\n\nPa_StopStream() is designed to make sure that the buffers you've processed in your callback are all played, which may cause some delay. Alternatively, you could call Pa_AbortStream(). On some platforms, aborting the stream is much faster and may cause some data processed by your callback not to be played.\n\nAnother way to stop the stream is to return either paComplete, or paAbort from your callback. paComplete ensures that the last buffer is played whereas paAbort stops the stream as soon as possible. If you stop the stream using this technique, you will need to call Pa_StopStream() before starting the stream again.\n\nPrevious: \\ref open_default_stream | Next: \\ref terminating_portaudio\n\n*/"
  },
  {
    "path": "thirdparty/portaudio/doc/src/tutorial/terminating_portaudio.dox",
    "content": "/** @page terminating_portaudio Closing a Stream and Terminating PortAudio\n@ingroup tutorial\n\nWhen you are done with a stream, you should close it to free up resources:\n\n@code\n    err = Pa_CloseStream( stream );\n    if( err != paNoError ) goto error;\n@endcode\n\nWe've already mentioned this in \\ref initializing_portaudio, but in case you forgot, be sure to terminate PortAudio when you are done:\n\n@code\n    err = Pa_Terminate( );\n    if( err != paNoError ) goto error;\n@endcode\n\nPrevious: \\ref start_stop_abort | Next: \\ref utility_functions\n\n*/"
  },
  {
    "path": "thirdparty/portaudio/doc/src/tutorial/tutorial_start.dox",
    "content": "/** @page tutorial_start PortAudio Tutorials\n@ingroup tutorial\n\nThese tutorials takes you through a hands-on example of using PortAudio to make sound. If you'd prefer to start with a top-down overview of the PortAudio API, check out the @ref api_overview.\n\n@section tut_start1 Downloading\n\nFirst thing you need to do is download the PortAudio source code either <a href=\"http://www.portaudio.com/download.html\">as a tarball from the website</a>, or <a href=\"http://www.portaudio.com/usingsvn.html\">from the Subversion Repository</a>.\n\n@section tut_start2 Compiling\n\nOnce you've downloaded PortAudio you'll need to compile it, which of course, depends on your environment:\n\n - Windows\n   - \\ref compile_windows\n   - \\ref compile_windows_mingw\n   - \\ref compile_windows_asio_msvc\n - Mac OS X\n   - \\ref compile_mac_coreaudio\n - POSIX\n   - \\ref compile_linux\n\nYou can also use CMake to generate project files for PortAudio on Windows, OS X or Linux or include PortAudio easily in your own CMake project. See \\ref compile_cmake.\n\nMany platforms with GCC/make can use the simple ./configure && make combination and simply use the resulting libraries in their code.\n\n@section tut_start3 Programming with PortAudio\n\nBelow are the steps to writing a PortAudio application using the callback technique:\n\n - Write a callback function that will be called by PortAudio when audio processing is needed.\n - Initialize the PA library and open a stream for audio I/O.\n - Start the stream. Your callback function will be now be called repeatedly by PA in the background.\n - In your callback you can read audio data from the inputBuffer and/or write data to the outputBuffer.\n - Stop the stream by returning 1 from your callback, or by calling a stop function.\n - Close the stream and terminate the library.\n\nIn addition to this \"Callback\" architecture, V19 also supports a \"Blocking I/O\" model which uses read and write calls which may be more familiar to non-audio programmers. Note that at this time, not all APIs support this functionality.\n\nIn this tutorial, we'll show how to use the callback architecture to play a sawtooth wave. Much of the tutorial is taken from the file paex_saw.c, which is part of the PortAudio distribution. When you're done with this tutorial, you'll be armed with the basic knowledge you need to write an audio program. If you need more sample code, look in the \"examples\" and \"test\" directory of the PortAudio distribution. Another great source of info is the portaudio.h Doxygen page, which documents the entire V19 API.\nAlso see the page for <a href=\"https://github.com/PortAudio/portaudio/wiki/Tips\">tips on programming PortAudio</a>\non the PortAudio wiki.\n\n@section tut_start4 Programming Tutorial Contents\n\n- \\ref writing_a_callback\n- \\ref initializing_portaudio\n- \\ref open_default_stream\n- \\ref start_stop_abort\n- \\ref terminating_portaudio\n- \\ref utility_functions\n- \\ref querying_devices\n- \\ref blocking_read_write\n\nIf you are upgrading from V18, you may want to look at the <a href=\"http://www.portaudio.com/docs/proposals/index.html\">Proposed Enhancements to PortAudio</a>, which describes the differences between V18 and V19.\n\nOnce you have a basic understanding of how to use PortAudio, you might be interested in \\ref exploring.\n\nNext: \\ref writing_a_callback\n\n*/\n"
  },
  {
    "path": "thirdparty/portaudio/doc/src/tutorial/utility_functions.dox",
    "content": "/** @page utility_functions Utility Functions\n@ingroup tutorial\n\nIn addition to the functions described elsewhere in this tutorial, PortAudio provides a number of Utility functions that are useful in a variety of circumstances. \nYou'll want to read the portaudio.h reference, which documents the entire V19 API for details, but we'll try to cover the basics here.\n\n@section tut_util2 Version Information\n\nPortAudio offers two functions to determine the PortAudio Version. This is most useful when you are using PortAudio as a dynamic library, but it may also be useful at other times.\n\n@code\nint             Pa_GetVersion (void)\nconst char *    Pa_GetVersionText (void)\n@endcode\n\n@section tut_util3 Error Text\n\nPortAudio allows you to get error text from an error number.\n\n@code\nconst char *    Pa_GetErrorText (PaError errorCode)\n@endcode\n\n@section tut_util4 Stream State\n\nPortAudio Streams exist in 3 states: Active, Stopped, and Callback Stopped. If a stream is in callback stopped state, you'll need to stop it before you can start it again. If you need to query the state of a PortAudio stream, there are two functions for doing so:\n\n@code\nPaError     Pa_IsStreamStopped (PaStream *stream)\nPaError     Pa_IsStreamActive (PaStream *stream)\n@endcode\n\n@section tut_util5 Stream Info\n\nIf you need to retrieve info about a given stream, such as latency, and sample rate info, there's a function for that too:\n\n@code\nconst PaStreamInfo *    Pa_GetStreamInfo (PaStream *stream)\n@endcode\n\n@section tut_util6 Stream Time\n\nIf you need to synchronise other activities such as display updates or MIDI output with the PortAudio callback you need to know the current time according to the same timebase used by the stream callback timestamps.\n\n@code\nPaTime  Pa_GetStreamTime (PaStream *stream)\n@endcode\n\n@section tut_util6CPU Usage\n\nTo determine how much CPU is being used by the callback, use these:\n\n@code\ndouble  Pa_GetStreamCpuLoad (PaStream *stream)\n@endcode\n\n@section tut_util7 Other utilities\n\nThese functions allow you to determine the size of a sample from its format and sleep for a given amount of time. The sleep function should not be used for precise timing or synchronization because it makes few guarantees about the exact length of time it waits. It is most useful for testing.\n\n@code\nPaError Pa_GetSampleSize (PaSampleFormat format)\nvoid    Pa_Sleep (long msec)\n@endcode\n\n\nPrevious: \\ref terminating_portaudio | Next: \\ref querying_devices\n\n*/"
  },
  {
    "path": "thirdparty/portaudio/doc/src/tutorial/writing_a_callback.dox",
    "content": "/** @page writing_a_callback Writing a Callback Function\n@ingroup tutorial\n\nTo write a program using PortAudio, you must include the \"portaudio.h\" include file. You may wish to read \"portaudio.h\" because it contains a complete description of the PortAudio functions and constants. Alternatively, you could browse the [http://www.portaudio.com/docs/v19-doxydocs/portaudio_8h.html \"portaudio.h\" Doxygen page]\n@code\n#include \"portaudio.h\"\n@endcode\nThe next task is to write your own \"callback\" function. The \"callback\" is a function that is called by the PortAudio engine whenever it has captured audio data, or when it needs more audio data for output.\n\nBefore we begin, it's important to realize that the callback is a delicate place. This is because some systems perform the callback in a special thread, or interrupt handler, and it is rarely treated the same as the rest of your code.\nFor most modern systems, you won't be able to cause crashes by making disallowed calls in the callback, but if you want your code to produce glitch-free audio, you will have to make sure you avoid function calls that may take an unbounded amount of time\nto execute. Exactly what these are depend on your platform but almost certainly include the following:  memory allocation/deallocation, I/O (including file I/O as well as console I/O, such as printf()), context switching (such as exec() or\nyield()), mutex operations, or anything else that might rely on the OS. If you think short critical sections are safe please go read about priority inversion. Windows and Mac OS schedulers have no real-time safe priority inversion prevention. Other platforms require special mutex flags. In addition, it is not safe to call any PortAudio API functions in the callback except as explicitly permitted in the documentation.\n\n\nYour callback function must return an int and accept the exact parameters specified in this typedef:\n\n@code\ntypedef int PaStreamCallback( const void *input,\n                                      void *output,\n                                      unsigned long frameCount,\n                                      const PaStreamCallbackTimeInfo* timeInfo,\n                                      PaStreamCallbackFlags statusFlags,\n                                      void *userData ) ;\n@endcode\nHere is an example callback function from the test file \"patests/patest_saw.c\". It calculates a simple left and right sawtooth signal and writes it to the output buffer. Notice that in this example, the signals are of float data type. The signals must be between -1.0 and +1.0. You can also use 16 bit integers or other formats which are specified during setup, but floats are easiest to work with. You can pass a pointer to your data structure through PortAudio which will appear as userData.\n\n@code\ntypedef struct\n{\n    float left_phase;\n    float right_phase;\n}   \npaTestData;\n\n/* This routine will be called by the PortAudio engine when audio is needed.\n** It may called at interrupt level on some machines so don't do anything\n** that could mess up the system like calling malloc() or free().\n*/ \nstatic int patestCallback( const void *inputBuffer, void *outputBuffer,\n                           unsigned long framesPerBuffer,\n                           const PaStreamCallbackTimeInfo* timeInfo,\n                           PaStreamCallbackFlags statusFlags,\n                           void *userData )\n{\n    /* Cast data passed through stream to our structure. */\n    paTestData *data = (paTestData*)userData; \n    float *out = (float*)outputBuffer;\n    unsigned int i;\n    (void) inputBuffer; /* Prevent unused variable warning. */\n    \n    for( i=0; i<framesPerBuffer; i++ )\n    {\n        *out++ = data->left_phase;  /* left */\n        *out++ = data->right_phase;  /* right */\n        /* Generate simple sawtooth phaser that ranges between -1.0 and 1.0. */\n        data->left_phase += 0.01f;\n        /* When signal reaches top, drop back down. */\n        if( data->left_phase >= 1.0f ) data->left_phase -= 2.0f;\n        /* higher pitch so we can distinguish left and right. */\n        data->right_phase += 0.03f;\n        if( data->right_phase >= 1.0f ) data->right_phase -= 2.0f;\n    }\n    return 0;\n}\n@endcode\n\nPrevious: \\ref tutorial_start | Next: \\ref initializing_portaudio\n\n*/\n"
  },
  {
    "path": "thirdparty/portaudio/doc/utils/checkfiledocs.py",
    "content": "import os\nimport os.path\nimport string\n\npaRootDirectory = '../../'\npaHtmlDocDirectory = os.path.join( paRootDirectory, \"doc\", \"html\" )\n\n## Script to check documentation status\n## this script assumes that html doxygen documentation has been generated\n##\n## it then walks the entire portaudio source tree and check that\n## - every source file (.c,.h,.cpp) has a doxygen comment block containing\n##\t- a @file directive\n##\t- a @brief directive\n##\t- a @ingroup directive\n## - it also checks that a corresponding html documentation file has been generated.\n##\n## This can be used as a first-level check to make sure the documentation is in order.\n##\n## The idea is to get a list of which files are missing doxygen documentation.\n##\n## How to run:\n##  $ cd doc/utils\n##  $ python checkfiledocs.py\n\ndef oneOf_a_in_b(a, b):\n    for x in a:\n        if x in b:\n            return True\n    return False\n\n# recurse from top and return a list of all with the given\n# extensions. ignore .svn directories. return absolute paths\ndef recursiveFindFiles( top, extensions, dirBlacklist, includePaths ):\n    result = []\n    for (dirpath, dirnames, filenames) in os.walk(top):\n        if not oneOf_a_in_b(dirBlacklist, dirpath):\n            for f in filenames:\n                if os.path.splitext(f)[1] in extensions:\n                    if includePaths:\n                        result.append( os.path.abspath( os.path.join( dirpath, f ) ) )\n                    else:\n                        result.append( f )\n    return result\n\n# generate the html file name that doxygen would use for\n# a particular source file. this is a brittle conversion\n# which i worked out by trial and error\ndef doxygenHtmlDocFileName( sourceFile ):\n    return sourceFile.replace( '_', '__' ).replace( '.', '_8' ) + '.html'\n\n\nsourceFiles = recursiveFindFiles( os.path.join(paRootDirectory,'src'), [ '.c', '.h', '.cpp' ], ['.svn', 'mingw-include'], True );\nsourceFiles += recursiveFindFiles( os.path.join(paRootDirectory,'include'), [ '.c', '.h', '.cpp' ], ['.svn'], True );\ndocFiles = recursiveFindFiles( paHtmlDocDirectory, [ '.html' ], ['.svn'], False );\n\n\n\ncurrentFile = \"\"\n\ndef printError( f, message ):\n    global currentFile\n    if f != currentFile:\n        currentFile = f\n        print f, \":\"\n    print \"\\t!\", message\n\n\nfor f in sourceFiles:\n    if not doxygenHtmlDocFileName( os.path.basename(f) ) in docFiles:\n        printError( f, \"no doxygen generated doc page\" )\n\n    s = file( f, 'rt' ).read()\n\n    if not '/**' in s:\n        printError( f, \"no doxygen /** block\" )  \n    \n    if not '@file' in s:\n        printError( f, \"no doxygen @file tag\" )\n\n    if not '@brief' in s:\n        printError( f, \"no doxygen @brief tag\" )\n        \n    if not '@ingroup' in s:\n        printError( f, \"no doxygen @ingroup tag\" )\n        \n\n"
  },
  {
    "path": "thirdparty/portaudio/examples/CMakeLists.txt",
    "content": "# Example projects\n\nMACRO(ADD_EXAMPLE appl_name)\n  ADD_EXECUTABLE(${appl_name} \"${appl_name}.c\")\n  TARGET_LINK_LIBRARIES(${appl_name} portaudio_static)\n  SET_TARGET_PROPERTIES(${appl_name} PROPERTIES FOLDER \"Examples C\")\n  IF(WIN32)\n    SET_PROPERTY(TARGET ${appl_name} APPEND_STRING PROPERTY COMPILE_DEFINITIONS _CRT_SECURE_NO_WARNINGS)\n  ENDIF()\nENDMACRO(ADD_EXAMPLE)\n\nMACRO(ADD_EXAMPLE_CPP appl_name)\n  ADD_EXECUTABLE(${appl_name} \"${appl_name}.cpp\")\n  TARGET_LINK_LIBRARIES(${appl_name} portaudio_static)\n  SET_TARGET_PROPERTIES(${appl_name} PROPERTIES FOLDER \"Examples C++\")\n  IF(WIN32)\n    SET_PROPERTY(TARGET ${appl_name} APPEND_STRING PROPERTY COMPILE_DEFINITIONS _CRT_SECURE_NO_WARNINGS)\n  ENDIF()\nENDMACRO(ADD_EXAMPLE_CPP)\n\nADD_EXAMPLE(pa_devs)\nADD_EXAMPLE(pa_fuzz)\nIF(PA_USE_ASIO AND WIN32)\n  ADD_EXAMPLE(paex_mono_asio_channel_select)\nENDIF()\nADD_EXAMPLE(paex_ocean_shore)\nTARGET_INCLUDE_DIRECTORIES(paex_ocean_shore PRIVATE ../src/common)\nADD_EXAMPLE(paex_pink)\nADD_EXAMPLE(paex_read_write_wire)\nADD_EXAMPLE(paex_record)\nADD_EXAMPLE(paex_record_file)\nTARGET_INCLUDE_DIRECTORIES(paex_record_file PRIVATE ../src/common)\nADD_EXAMPLE(paex_saw)\nADD_EXAMPLE(paex_sine)\nADD_EXAMPLE_CPP(paex_sine_c++)\nIF(PA_USE_WMME AND WIN32)\n  ADD_EXAMPLE(paex_wmme_ac3)\n  ADD_EXAMPLE(paex_wmme_surround)\nENDIF()\nADD_EXAMPLE(paex_write_sine)\nADD_EXAMPLE(paex_write_sine_nonint)\n"
  },
  {
    "path": "thirdparty/portaudio/examples/pa_devs.c",
    "content": "/** @file pa_devs.c\n    @ingroup examples_src\n    @brief List available devices, including device information.\n    @author Phil Burk http://www.softsynth.com\n\n    @note Define PA_USE_ASIO=0 to compile this code on Windows without\n        ASIO support.\n*/\n/*\n * $Id$\n *\n * This program uses the PortAudio Portable Audio Library.\n * For more information see: http://www.portaudio.com\n * Copyright (c) 1999-2000 Ross Bencina and Phil Burk\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n#include <stdio.h>\n#include <math.h>\n#include \"portaudio.h\"\n\n#ifdef WIN32\n#include <windows.h>\n\n#if PA_USE_ASIO\n#include \"pa_asio.h\"\n#endif\n#endif\n\n/*******************************************************************/\nstatic void PrintSupportedStandardSampleRates(\n        const PaStreamParameters *inputParameters,\n        const PaStreamParameters *outputParameters )\n{\n    static double standardSampleRates[] = {\n        8000.0, 9600.0, 11025.0, 12000.0, 16000.0, 22050.0, 24000.0, 32000.0,\n        44100.0, 48000.0, 88200.0, 96000.0, 192000.0, -1 /* negative terminated  list */\n    };\n    int     i, printCount;\n    PaError err;\n\n    printCount = 0;\n    for( i=0; standardSampleRates[i] > 0; i++ )\n    {\n        err = Pa_IsFormatSupported( inputParameters, outputParameters, standardSampleRates[i] );\n        if( err == paFormatIsSupported )\n        {\n            if( printCount == 0 )\n            {\n                printf( \"\\t%8.2f\", standardSampleRates[i] );\n                printCount = 1;\n            }\n            else if( printCount == 4 )\n            {\n                printf( \",\\n\\t%8.2f\", standardSampleRates[i] );\n                printCount = 1;\n            }\n            else\n            {\n                printf( \", %8.2f\", standardSampleRates[i] );\n                ++printCount;\n            }\n        }\n    }\n    if( !printCount )\n        printf( \"None\\n\" );\n    else\n        printf( \"\\n\" );\n}\n\n/*******************************************************************/\nint main(void);\nint main(void)\n{\n    int     i, numDevices, defaultDisplayed;\n    const   PaDeviceInfo *deviceInfo;\n    PaStreamParameters inputParameters, outputParameters;\n    PaError err;\n\n\n    err = Pa_Initialize();\n    if( err != paNoError )\n    {\n        printf( \"ERROR: Pa_Initialize returned 0x%x\\n\", err );\n        goto error;\n    }\n\n    printf( \"PortAudio version: 0x%08X\\n\", Pa_GetVersion());\n    printf( \"Version text: '%s'\\n\", Pa_GetVersionInfo()->versionText );\n\n    numDevices = Pa_GetDeviceCount();\n    if( numDevices < 0 )\n    {\n        printf( \"ERROR: Pa_GetDeviceCount returned 0x%x\\n\", numDevices );\n        err = numDevices;\n        goto error;\n    }\n\n    printf( \"Number of devices = %d\\n\", numDevices );\n    for( i=0; i<numDevices; i++ )\n    {\n        deviceInfo = Pa_GetDeviceInfo( i );\n        printf( \"--------------------------------------- device #%d\\n\", i );\n\n    /* Mark global and API specific default devices */\n        defaultDisplayed = 0;\n        if( i == Pa_GetDefaultInputDevice() )\n        {\n            printf( \"[ Default Input\" );\n            defaultDisplayed = 1;\n        }\n        else if( i == Pa_GetHostApiInfo( deviceInfo->hostApi )->defaultInputDevice )\n        {\n            const PaHostApiInfo *hostInfo = Pa_GetHostApiInfo( deviceInfo->hostApi );\n            printf( \"[ Default %s Input\", hostInfo->name );\n            defaultDisplayed = 1;\n        }\n\n        if( i == Pa_GetDefaultOutputDevice() )\n        {\n            printf( (defaultDisplayed ? \",\" : \"[\") );\n            printf( \" Default Output\" );\n            defaultDisplayed = 1;\n        }\n        else if( i == Pa_GetHostApiInfo( deviceInfo->hostApi )->defaultOutputDevice )\n        {\n            const PaHostApiInfo *hostInfo = Pa_GetHostApiInfo( deviceInfo->hostApi );\n            printf( (defaultDisplayed ? \",\" : \"[\") );\n            printf( \" Default %s Output\", hostInfo->name );\n            defaultDisplayed = 1;\n        }\n\n        if( defaultDisplayed )\n            printf( \" ]\\n\" );\n\n    /* print device info fields */\n#ifdef WIN32\n        {   /* Use wide char on windows, so we can show UTF-8 encoded device names */\n            wchar_t wideName[MAX_PATH];\n            MultiByteToWideChar(CP_UTF8, 0, deviceInfo->name, -1, wideName, MAX_PATH-1);\n            wprintf( L\"Name                        = %s\\n\", wideName );\n        }\n#else\n        printf( \"Name                        = %s\\n\", deviceInfo->name );\n#endif\n        printf( \"Host API                    = %s\\n\",  Pa_GetHostApiInfo( deviceInfo->hostApi )->name );\n        printf( \"Max inputs = %d\", deviceInfo->maxInputChannels  );\n        printf( \", Max outputs = %d\\n\", deviceInfo->maxOutputChannels  );\n\n        printf( \"Default low input latency   = %8.4f\\n\", deviceInfo->defaultLowInputLatency  );\n        printf( \"Default low output latency  = %8.4f\\n\", deviceInfo->defaultLowOutputLatency  );\n        printf( \"Default high input latency  = %8.4f\\n\", deviceInfo->defaultHighInputLatency  );\n        printf( \"Default high output latency = %8.4f\\n\", deviceInfo->defaultHighOutputLatency  );\n\n#ifdef WIN32\n#if PA_USE_ASIO\n/* ASIO specific latency information */\n        if( Pa_GetHostApiInfo( deviceInfo->hostApi )->type == paASIO ){\n            long minLatency, maxLatency, preferredLatency, granularity;\n\n            err = PaAsio_GetAvailableLatencyValues( i,\n                    &minLatency, &maxLatency, &preferredLatency, &granularity );\n\n            printf( \"ASIO minimum buffer size    = %ld\\n\", minLatency  );\n            printf( \"ASIO maximum buffer size    = %ld\\n\", maxLatency  );\n            printf( \"ASIO preferred buffer size  = %ld\\n\", preferredLatency  );\n\n            if( granularity == -1 )\n                printf( \"ASIO buffer granularity     = power of 2\\n\" );\n            else\n                printf( \"ASIO buffer granularity     = %ld\\n\", granularity  );\n        }\n#endif /* PA_USE_ASIO */\n#endif /* WIN32 */\n\n        printf( \"Default sample rate         = %8.2f\\n\", deviceInfo->defaultSampleRate );\n\n    /* poll for standard sample rates */\n        inputParameters.device = i;\n        inputParameters.channelCount = deviceInfo->maxInputChannels;\n        inputParameters.sampleFormat = paInt16;\n        inputParameters.suggestedLatency = 0; /* ignored by Pa_IsFormatSupported() */\n        inputParameters.hostApiSpecificStreamInfo = NULL;\n\n        outputParameters.device = i;\n        outputParameters.channelCount = deviceInfo->maxOutputChannels;\n        outputParameters.sampleFormat = paInt16;\n        outputParameters.suggestedLatency = 0; /* ignored by Pa_IsFormatSupported() */\n        outputParameters.hostApiSpecificStreamInfo = NULL;\n\n        if( inputParameters.channelCount > 0 )\n        {\n            printf(\"Supported standard sample rates\\n for half-duplex 16 bit %d channel input = \\n\",\n                    inputParameters.channelCount );\n            PrintSupportedStandardSampleRates( &inputParameters, NULL );\n        }\n\n        if( outputParameters.channelCount > 0 )\n        {\n            printf(\"Supported standard sample rates\\n for half-duplex 16 bit %d channel output = \\n\",\n                    outputParameters.channelCount );\n            PrintSupportedStandardSampleRates( NULL, &outputParameters );\n        }\n\n        if( inputParameters.channelCount > 0 && outputParameters.channelCount > 0 )\n        {\n            printf(\"Supported standard sample rates\\n for full-duplex 16 bit %d channel input, %d channel output = \\n\",\n                    inputParameters.channelCount, outputParameters.channelCount );\n            PrintSupportedStandardSampleRates( &inputParameters, &outputParameters );\n        }\n    }\n\n    Pa_Terminate();\n\n    printf(\"----------------------------------------------\\n\");\n    return 0;\n\nerror:\n    Pa_Terminate();\n    fprintf( stderr, \"Error number: %d\\n\", err );\n    fprintf( stderr, \"Error message: %s\\n\", Pa_GetErrorText( err ) );\n    return err;\n}\n"
  },
  {
    "path": "thirdparty/portaudio/examples/pa_fuzz.c",
    "content": "/** @file pa_fuzz.c\n    @ingroup examples_src\n    @brief Distort input like a fuzz box.\n    @author Phil Burk  http://www.softsynth.com\n*/\n/*\n * $Id$\n *\n * This program uses the PortAudio Portable Audio Library.\n * For more information see: http://www.portaudio.com\n * Copyright (c) 1999-2000 Ross Bencina and Phil Burk\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n#include <stdio.h>\n#include <math.h>\n#include \"portaudio.h\"\n/*\n** Note that many of the older ISA sound cards on PCs do NOT support\n** full duplex audio (simultaneous record and playback).\n** And some only support full duplex at lower sample rates.\n*/\n#define SAMPLE_RATE         (44100)\n#define PA_SAMPLE_TYPE      paFloat32\n#define FRAMES_PER_BUFFER   (64)\n\ntypedef float SAMPLE;\n\nfloat CubicAmplifier( float input );\nstatic int fuzzCallback( const void *inputBuffer, void *outputBuffer,\n                         unsigned long framesPerBuffer,\n                         const PaStreamCallbackTimeInfo* timeInfo,\n                         PaStreamCallbackFlags statusFlags,\n                         void *userData );\n\n/* Non-linear amplifier with soft distortion curve. */\nfloat CubicAmplifier( float input )\n{\n    float output, temp;\n    if( input < 0.0 )\n    {\n        temp = input + 1.0f;\n        output = (temp * temp * temp) - 1.0f;\n    }\n    else\n    {\n        temp = input - 1.0f;\n        output = (temp * temp * temp) + 1.0f;\n    }\n\n    return output;\n}\n#define FUZZ(x) CubicAmplifier(CubicAmplifier(CubicAmplifier(CubicAmplifier(x))))\n\nstatic int gNumNoInputs = 0;\n/* This routine will be called by the PortAudio engine when audio is needed.\n** It may be called at interrupt level on some machines so don't do anything\n** that could mess up the system like calling malloc() or free().\n*/\nstatic int fuzzCallback( const void *inputBuffer, void *outputBuffer,\n                         unsigned long framesPerBuffer,\n                         const PaStreamCallbackTimeInfo* timeInfo,\n                         PaStreamCallbackFlags statusFlags,\n                         void *userData )\n{\n    SAMPLE *out = (SAMPLE*)outputBuffer;\n    const SAMPLE *in = (const SAMPLE*)inputBuffer;\n    unsigned int i;\n    (void) timeInfo; /* Prevent unused variable warnings. */\n    (void) statusFlags;\n    (void) userData;\n\n    if( inputBuffer == NULL )\n    {\n        for( i=0; i<framesPerBuffer; i++ )\n        {\n            *out++ = 0;  /* left - silent */\n            *out++ = 0;  /* right - silent */\n        }\n        gNumNoInputs += 1;\n    }\n    else\n    {\n        for( i=0; i<framesPerBuffer; i++ )\n        {\n            *out++ = FUZZ(*in++);  /* left - distorted */\n            *out++ = *in++;          /* right - clean */\n        }\n    }\n\n    return paContinue;\n}\n\n/*******************************************************************/\nint main(void);\nint main(void)\n{\n    PaStreamParameters inputParameters, outputParameters;\n    PaStream *stream;\n    PaError err;\n\n    err = Pa_Initialize();\n    if( err != paNoError ) goto error;\n\n    inputParameters.device = Pa_GetDefaultInputDevice(); /* default input device */\n    if (inputParameters.device == paNoDevice) {\n        fprintf(stderr,\"Error: No default input device.\\n\");\n        goto error;\n    }\n    inputParameters.channelCount = 2;       /* stereo input */\n    inputParameters.sampleFormat = PA_SAMPLE_TYPE;\n    inputParameters.suggestedLatency = Pa_GetDeviceInfo( inputParameters.device )->defaultLowInputLatency;\n    inputParameters.hostApiSpecificStreamInfo = NULL;\n\n    outputParameters.device = Pa_GetDefaultOutputDevice(); /* default output device */\n    if (outputParameters.device == paNoDevice) {\n        fprintf(stderr,\"Error: No default output device.\\n\");\n        goto error;\n    }\n    outputParameters.channelCount = 2;       /* stereo output */\n    outputParameters.sampleFormat = PA_SAMPLE_TYPE;\n    outputParameters.suggestedLatency = Pa_GetDeviceInfo( outputParameters.device )->defaultLowOutputLatency;\n    outputParameters.hostApiSpecificStreamInfo = NULL;\n\n    err = Pa_OpenStream(\n              &stream,\n              &inputParameters,\n              &outputParameters,\n              SAMPLE_RATE,\n              FRAMES_PER_BUFFER,\n              0, /* paClipOff, */  /* we won't output out of range samples so don't bother clipping them */\n              fuzzCallback,\n              NULL );\n    if( err != paNoError ) goto error;\n\n    err = Pa_StartStream( stream );\n    if( err != paNoError ) goto error;\n\n    printf(\"Hit ENTER to stop program.\\n\");\n    getchar();\n    err = Pa_CloseStream( stream );\n    if( err != paNoError ) goto error;\n\n    printf(\"Finished. gNumNoInputs = %d\\n\", gNumNoInputs );\n    Pa_Terminate();\n    return 0;\n\nerror:\n    Pa_Terminate();\n    fprintf( stderr, \"An error occurred while using the portaudio stream\\n\" );\n    fprintf( stderr, \"Error number: %d\\n\", err );\n    fprintf( stderr, \"Error message: %s\\n\", Pa_GetErrorText( err ) );\n    return -1;\n}\n"
  },
  {
    "path": "thirdparty/portaudio/examples/paex_mono_asio_channel_select.c",
    "content": "/** @file paex_mono_asio_channel_select.c\n    @ingroup examples_src\n    @brief Play a monophonic sine wave on a specific ASIO channel.\n    @author Ross Bencina <rossb@audiomulch.com>\n    @author Phil Burk <philburk@softsynth.com>\n*/\n/*\n * $Id$\n *\n * Authors:\n *    Ross Bencina <rossb@audiomulch.com>\n *    Phil Burk <philburk@softsynth.com>\n *\n * This program uses the PortAudio Portable Audio Library.\n * For more information see: http://www.portaudio.com\n * Copyright (c) 1999-2000 Ross Bencina and Phil Burk\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n#include <stdio.h>\n#include <math.h>\n#include \"portaudio.h\"\n#include \"pa_asio.h\"\n\n#define NUM_SECONDS   (10)\n#define SAMPLE_RATE   (44100)\n#define AMPLITUDE     (0.8)\n#define FRAMES_PER_BUFFER  (64)\n#define OUTPUT_DEVICE Pa_GetDefaultOutputDevice()\n\n#ifndef M_PI\n#define M_PI  (3.14159265)\n#endif\n\n#define TABLE_SIZE   (200)\ntypedef struct\n{\n    float sine[TABLE_SIZE];\n    int phase;\n}\npaTestData;\n\n/* This routine will be called by the PortAudio engine when audio is needed.\n** It may called at interrupt level on some machines so don't do anything\n** that could mess up the system like calling malloc() or free().\n*/\nstatic int patestCallback( const void *inputBuffer, void *outputBuffer,\n                            unsigned long framesPerBuffer,\n                            const PaStreamCallbackTimeInfo* timeInfo,\n                            PaStreamCallbackFlags statusFlags,\n                            void *userData )\n{\n    paTestData *data = (paTestData*)userData;\n    float *out = (float*)outputBuffer;\n    unsigned long i;\n    int finished = 0;\n    /* avoid unused variable warnings */\n    (void) inputBuffer;\n    (void) timeInfo;\n    (void) statusFlags;\n    for( i=0; i<framesPerBuffer; i++ )\n    {\n        *out++ = data->sine[data->phase];  /* left */\n        data->phase += 1;\n        if( data->phase >= TABLE_SIZE ) data->phase -= TABLE_SIZE;\n    }\n    return finished;\n}\n\n/*******************************************************************/\nint main(void);\nint main(void)\n{\n    PaStreamParameters outputParameters;\n    PaAsioStreamInfo asioOutputInfo;\n    PaStream *stream;\n    PaError err;\n    paTestData data;\n    int outputChannelSelectors[1];\n    int i;\n    printf(\"PortAudio Test: output MONO sine wave. SR = %d, BufSize = %d\\n\", SAMPLE_RATE, FRAMES_PER_BUFFER);\n    /* initialise sinusoidal wavetable */\n    for( i=0; i<TABLE_SIZE; i++ )\n    {\n        data.sine[i] = (float) (AMPLITUDE * sin( ((double)i/(double)TABLE_SIZE) * M_PI * 2. ));\n    }\n    data.phase = 0;\n\n    err = Pa_Initialize();\n    if( err != paNoError ) goto error;\n\n    outputParameters.device = OUTPUT_DEVICE;\n    outputParameters.channelCount = 1;       /* MONO output */\n    outputParameters.sampleFormat = paFloat32; /* 32 bit floating point output */\n    outputParameters.suggestedLatency = Pa_GetDeviceInfo( outputParameters.device )->defaultLowOutputLatency;\n\n    /* Use an ASIO specific structure. WARNING - this is not portable. */\n    asioOutputInfo.size = sizeof(PaAsioStreamInfo);\n    asioOutputInfo.hostApiType = paASIO;\n    asioOutputInfo.version = 1;\n    asioOutputInfo.flags = paAsioUseChannelSelectors;\n    outputChannelSelectors[0] = 1; /* skip channel 0 and use the second (right) ASIO device channel */\n    asioOutputInfo.channelSelectors = outputChannelSelectors;\n    outputParameters.hostApiSpecificStreamInfo = &asioOutputInfo;\n\n    err = Pa_OpenStream(\n              &stream,\n              NULL, /* no input */\n              &outputParameters,\n              SAMPLE_RATE,\n              FRAMES_PER_BUFFER,\n              paClipOff,      /* we won't output out of range samples so don't bother clipping them */\n              patestCallback,\n              &data );\n    if( err != paNoError ) goto error;\n\n    err = Pa_StartStream( stream );\n    if( err != paNoError ) goto error;\n\n    printf(\"Play for %d seconds.\\n\", NUM_SECONDS ); fflush(stdout);\n    Pa_Sleep( NUM_SECONDS * 1000 );\n\n    err = Pa_StopStream( stream );\n    if( err != paNoError ) goto error;\n\n    err = Pa_CloseStream( stream );\n    if( err != paNoError ) goto error;\n\n    Pa_Terminate();\n    printf(\"Test finished.\\n\");\n    return err;\nerror:\n    Pa_Terminate();\n    fprintf( stderr, \"An error occurred while using the portaudio stream\\n\" );\n    fprintf( stderr, \"Error number: %d\\n\", err );\n    fprintf( stderr, \"Error message: %s\\n\", Pa_GetErrorText( err ) );\n    return err;\n}\n"
  },
  {
    "path": "thirdparty/portaudio/examples/paex_ocean_shore.c",
    "content": "/** @file paex_ocean_shore.c\n    @ingroup examples_src\n    @brief Generate Pink Noise using Gardner method, and make \"waves\". Provides an example of how to\n           post stuff to/from the audio callback using lock-free FIFOs implemented by the PA ringbuffer.\n\n    Optimization suggested by James McCartney uses a tree\n    to select which random value to replace.\n<pre>\n    x x x x x x x x x x x x x x x x\n    x   x   x   x   x   x   x   x\n    x       x       x       x\n     x               x\n       x\n</pre>\n    Tree is generated by counting trailing zeros in an increasing index.\n    When the index is zero, no random number is selected.\n\n    @author Phil Burk  http://www.softsynth.com\n            Robert Bielik\n*/\n/*\n * $Id$\n *\n * This program uses the PortAudio Portable Audio Library.\n * For more information see: http://www.portaudio.com\n * Copyright (c) 1999-2000 Ross Bencina and Phil Burk\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <math.h>\n#include <time.h>\n\n#include \"portaudio.h\"\n#include \"pa_ringbuffer.h\"\n#include \"pa_util.h\"\n\n#define PINK_MAX_RANDOM_ROWS   (30)\n#define PINK_RANDOM_BITS       (24)\n#define PINK_RANDOM_SHIFT      ((sizeof(long)*8)-PINK_RANDOM_BITS)\n\ntypedef struct\n{\n    long      pink_Rows[PINK_MAX_RANDOM_ROWS];\n    long      pink_RunningSum;   /* Used to optimize summing of generators. */\n    int       pink_Index;        /* Incremented each sample. */\n    int       pink_IndexMask;    /* Index wrapped by ANDing with this mask. */\n    float     pink_Scalar;       /* Used to scale within range of -1.0 to +1.0 */\n}\nPinkNoise;\n\ntypedef struct\n{\n    float       bq_b0;\n    float       bq_b1;\n    float       bq_b2;\n    float       bq_a1;\n    float       bq_a2;\n} BiQuad;\n\ntypedef enum\n{\n    State_kAttack,\n    State_kPreDecay,\n    State_kDecay,\n    State_kCnt,\n} EnvState;\n\ntypedef struct\n{\n    PinkNoise   wave_left;\n    PinkNoise   wave_right;\n\n    BiQuad      wave_bq_coeffs;\n    float       wave_bq_left[2];\n    float       wave_bq_right[2];\n\n    EnvState    wave_envelope_state;\n    float       wave_envelope_level;\n    float       wave_envelope_max_level;\n    float       wave_pan_left;\n    float       wave_pan_right;\n    float       wave_attack_incr;\n    float       wave_decay_incr;\n\n} OceanWave;\n\n/* Prototypes */\nstatic unsigned long GenerateRandomNumber( void );\nvoid InitializePinkNoise( PinkNoise *pink, int numRows );\nfloat GeneratePinkNoise( PinkNoise *pink );\nunsigned GenerateWave( OceanWave* wave, float* output, unsigned noOfFrames);\n\n/************************************************************/\n/* Calculate pseudo-random 32 bit number based on linear congruential method. */\nstatic unsigned long GenerateRandomNumber( void )\n{\n    /* Change this seed for different random sequences. */\n    static unsigned long randSeed = 22222;\n    randSeed = (randSeed * 196314165) + 907633515;\n    return randSeed;\n}\n\n/************************************************************/\n/* Setup PinkNoise structure for N rows of generators. */\nvoid InitializePinkNoise( PinkNoise *pink, int numRows )\n{\n    int i;\n    long pmax;\n    pink->pink_Index = 0;\n    pink->pink_IndexMask = (1<<numRows) - 1;\n    /* Calculate maximum possible signed random value. Extra 1 for white noise always added. */\n    pmax = (numRows + 1) * (1<<(PINK_RANDOM_BITS-1));\n    pink->pink_Scalar = 1.0f / pmax;\n    /* Initialize rows. */\n    for( i=0; i<numRows; i++ ) pink->pink_Rows[i] = 0;\n    pink->pink_RunningSum = 0;\n}\n\n/* Generate Pink noise values between -1.0 and +1.0 */\nfloat GeneratePinkNoise( PinkNoise *pink )\n{\n    long newRandom;\n    long sum;\n    float output;\n    /* Increment and mask index. */\n    pink->pink_Index = (pink->pink_Index + 1) & pink->pink_IndexMask;\n    /* If index is zero, don't update any random values. */\n    if( pink->pink_Index != 0 )\n    {\n        /* Determine how many trailing zeros in PinkIndex. */\n        /* This algorithm will hang if n==0 so test first. */\n        int numZeros = 0;\n        int n = pink->pink_Index;\n        while( (n & 1) == 0 )\n        {\n            n = n >> 1;\n            numZeros++;\n        }\n        /* Replace the indexed ROWS random value.\n         * Subtract and add back to RunningSum instead of adding all the random\n         * values together. Only one changes each time.\n         */\n        pink->pink_RunningSum -= pink->pink_Rows[numZeros];\n        newRandom = ((long)GenerateRandomNumber()) >> PINK_RANDOM_SHIFT;\n        pink->pink_RunningSum += newRandom;\n        pink->pink_Rows[numZeros] = newRandom;\n    }\n\n    /* Add extra white noise value. */\n    newRandom = ((long)GenerateRandomNumber()) >> PINK_RANDOM_SHIFT;\n    sum = pink->pink_RunningSum + newRandom;\n    /* Scale to range of -1.0 to 0.9999. */\n    output = pink->pink_Scalar * sum;\n    return output;\n}\n\nfloat ProcessBiquad(const BiQuad* coeffs, float* memory, float input)\n{\n    float w = input - coeffs->bq_a1 * memory[0] - coeffs->bq_a2 * memory[1];\n    float out = coeffs->bq_b1 * memory[0] + coeffs->bq_b2 * memory[1] + coeffs->bq_b0 * w;\n    memory[1] = memory[0];\n    memory[0] = w;\n    return out;\n}\n\nstatic const float one_over_2Q_LP = 0.3f;\nstatic const float one_over_2Q_HP = 1.0f;\n\nunsigned GenerateWave( OceanWave* wave, float* output, unsigned noOfFrames )\n{\n    unsigned retval=0,i;\n    float targetLevel, levelIncr, currentLevel;\n    switch (wave->wave_envelope_state)\n    {\n    case State_kAttack:\n        targetLevel = noOfFrames * wave->wave_attack_incr + wave->wave_envelope_level;\n        if (targetLevel >= wave->wave_envelope_max_level)\n        {\n            /* Go to decay state */\n            wave->wave_envelope_state = State_kPreDecay;\n            targetLevel = wave->wave_envelope_max_level;\n        }\n        /* Calculate lowpass biquad coeffs\n\n            alpha = sin(w0)/(2*Q)\n\n                b0 =  (1 - cos(w0))/2\n                b1 =   1 - cos(w0)\n                b2 =  (1 - cos(w0))/2\n                a0 =   1 + alpha\n                a1 =  -2*cos(w0)\n                a2 =   1 - alpha\n\n            w0 = [0 - pi[\n        */\n        {\n            const float w0 = 3.141592654f * targetLevel / wave->wave_envelope_max_level;\n            const float alpha = sinf(w0) * one_over_2Q_LP;\n            const float cosw0 = cosf(w0);\n            const float a0_fact = 1.0f / (1.0f + alpha);\n            wave->wave_bq_coeffs.bq_b1 = (1.0f - cosw0) * a0_fact;\n            wave->wave_bq_coeffs.bq_b0 = wave->wave_bq_coeffs.bq_b1 * 0.5f;\n            wave->wave_bq_coeffs.bq_b2 = wave->wave_bq_coeffs.bq_b0;\n            wave->wave_bq_coeffs.bq_a2 = (1.0f - alpha) * a0_fact;\n            wave->wave_bq_coeffs.bq_a1 = -2.0f * cosw0 * a0_fact;\n        }\n        break;\n\n    case State_kPreDecay:\n        /* Reset biquad state */\n        memset(wave->wave_bq_left, 0, 2 * sizeof(float));\n        memset(wave->wave_bq_right, 0, 2 * sizeof(float));\n        wave->wave_envelope_state = State_kDecay;\n\n        /* Deliberate fall-through */\n\n    case State_kDecay:\n        targetLevel = noOfFrames * wave->wave_decay_incr + wave->wave_envelope_level;\n        if (targetLevel < 0.001f)\n        {\n            /* < -60 dB, we're done */\n            wave->wave_envelope_state = 3;\n            retval = 1;\n        }\n        /* Calculate highpass biquad coeffs\n\n            alpha = sin(w0)/(2*Q)\n\n            b0 =  (1 + cos(w0))/2\n            b1 = -(1 + cos(w0))\n            b2 =  (1 + cos(w0))/2\n            a0 =   1 + alpha\n            a1 =  -2*cos(w0)\n            a2 =   1 - alpha\n\n            w0 = [0 - pi/2[\n        */\n        {\n            const float v = targetLevel / wave->wave_envelope_max_level;\n            const float w0 = 1.5707963f * (1.0f - (v*v));\n            const float alpha = sinf(w0) * one_over_2Q_HP;\n            const float cosw0 = cosf(w0);\n            const float a0_fact = 1.0f / (1.0f + alpha);\n            wave->wave_bq_coeffs.bq_b1 = (float)(- (1 + cosw0) * a0_fact);\n            wave->wave_bq_coeffs.bq_b0 = -wave->wave_bq_coeffs.bq_b1 * 0.5f;\n            wave->wave_bq_coeffs.bq_b2 = wave->wave_bq_coeffs.bq_b0;\n            wave->wave_bq_coeffs.bq_a2 = (float)((1.0 - alpha) * a0_fact);\n            wave->wave_bq_coeffs.bq_a1 = (float)(-2.0 * cosw0 * a0_fact);\n        }\n        break;\n\n    default:\n        break;\n    }\n\n    currentLevel = wave->wave_envelope_level;\n    wave->wave_envelope_level = targetLevel;\n    levelIncr = (targetLevel - currentLevel) / noOfFrames;\n\n    for (i = 0; i < noOfFrames; ++i, currentLevel += levelIncr)\n    {\n        (*output++) += ProcessBiquad(&wave->wave_bq_coeffs, wave->wave_bq_left, (GeneratePinkNoise(&wave->wave_left))) * currentLevel * wave->wave_pan_left;\n        (*output++) += ProcessBiquad(&wave->wave_bq_coeffs, wave->wave_bq_right, (GeneratePinkNoise(&wave->wave_right))) * currentLevel * wave->wave_pan_right;\n    }\n\n    return retval;\n}\n\n\n/*******************************************************************/\n\n/* Context for callback routine. */\ntypedef struct\n{\n    OceanWave*          waves[16];      /* Maximum 16 waves */\n    unsigned            noOfActiveWaves;\n\n    /* Ring buffer (FIFO) for \"communicating\" towards audio callback */\n    PaUtilRingBuffer    rBufToRT;\n    void*               rBufToRTData;\n\n    /* Ring buffer (FIFO) for \"communicating\" from audio callback */\n    PaUtilRingBuffer    rBufFromRT;\n    void*               rBufFromRTData;\n}\npaTestData;\n\n/* This routine will be called by the PortAudio engine when audio is needed.\n** It may called at interrupt level on some machines so don't do anything\n** that could mess up the system like calling malloc() or free().\n*/\nstatic int patestCallback(const void*                     inputBuffer,\n                          void*                           outputBuffer,\n                          unsigned long                   framesPerBuffer,\n                          const PaStreamCallbackTimeInfo* timeInfo,\n                          PaStreamCallbackFlags           statusFlags,\n                          void*                           userData)\n{\n    int i;\n    paTestData *data = (paTestData*)userData;\n    float *out = (float*)outputBuffer;\n    (void) inputBuffer; /* Prevent \"unused variable\" warnings. */\n\n    /* Reset output data first */\n    memset(out, 0, framesPerBuffer * 2 * sizeof(float));\n\n    for (i = 0; i < 16; ++i)\n    {\n        /* Consume the input queue */\n        if (data->waves[i] == 0 && PaUtil_GetRingBufferReadAvailable(&data->rBufToRT))\n        {\n            OceanWave* ptr = 0;\n            PaUtil_ReadRingBuffer(&data->rBufToRT, &ptr, 1);\n            data->waves[i] = ptr;\n        }\n\n        if (data->waves[i] != 0)\n        {\n            if (GenerateWave(data->waves[i], out, framesPerBuffer))\n            {\n                /* If wave is \"done\", post it back to the main thread for deletion */\n                PaUtil_WriteRingBuffer(&data->rBufFromRT, &data->waves[i], 1);\n                data->waves[i] = 0;\n            }\n        }\n    }\n    return paContinue;\n}\n\n#define NEW_ROW_SIZE (12 + (8*rand())/RAND_MAX)\n\nOceanWave* InitializeWave(double SR, float attackInSeconds, float maxLevel, float positionLeftRight)\n{\n    OceanWave* wave = NULL;\n    static unsigned lastNoOfRows = 12;\n    unsigned newNoOfRows;\n\n    wave = (OceanWave*)PaUtil_AllocateMemory(sizeof(OceanWave));\n    if (wave != NULL)\n    {\n        InitializePinkNoise(&wave->wave_left, lastNoOfRows);\n        while ((newNoOfRows = NEW_ROW_SIZE) == lastNoOfRows);\n        InitializePinkNoise(&wave->wave_right, newNoOfRows);\n        lastNoOfRows = newNoOfRows;\n\n        wave->wave_envelope_state = State_kAttack;\n        wave->wave_envelope_level = 0.f;\n        wave->wave_envelope_max_level = maxLevel;\n        wave->wave_attack_incr = wave->wave_envelope_max_level / (attackInSeconds * (float)SR);\n        wave->wave_decay_incr = - wave->wave_envelope_max_level / (attackInSeconds * 4 * (float)SR);\n\n        wave->wave_pan_left = sqrtf(1.0f - positionLeftRight);\n        wave->wave_pan_right = sqrtf(positionLeftRight);\n    }\n    return wave;\n}\n\nstatic float GenerateFloatRandom(float minValue, float maxValue)\n{\n    return minValue + ((maxValue - minValue) * rand()) / RAND_MAX;\n}\n\n/*******************************************************************/\nint main(void);\nint main(void)\n{\n    PaStream*           stream;\n    PaError             err;\n    paTestData          data = {0};\n    PaStreamParameters  outputParameters;\n    double              tstamp;\n    double              tstart;\n    double              tdelta = 0;\n    static const double SR  = 44100.0;\n    static const int    FPB = 128; /* Frames per buffer: 2.9 ms buffers. */\n\n    /* Initialize communication buffers (queues) */\n    data.rBufToRTData = PaUtil_AllocateMemory(sizeof(OceanWave*) * 256);\n    if (data.rBufToRTData == NULL)\n    {\n        return 1;\n    }\n    PaUtil_InitializeRingBuffer(&data.rBufToRT, sizeof(OceanWave*), 256, data.rBufToRTData);\n\n    data.rBufFromRTData = PaUtil_AllocateMemory(sizeof(OceanWave*) * 256);\n    if (data.rBufFromRTData == NULL)\n    {\n        return 1;\n    }\n    PaUtil_InitializeRingBuffer(&data.rBufFromRT, sizeof(OceanWave*), 256, data.rBufFromRTData);\n\n    err = Pa_Initialize();\n    if( err != paNoError ) goto error;\n\n    /* Open a stereo PortAudio stream so we can hear the result. */\n    outputParameters.device = Pa_GetDefaultOutputDevice(); /* Take the default output device. */\n    if (outputParameters.device == paNoDevice) {\n        fprintf(stderr,\"Error: No default output device.\\n\");\n        goto error;\n    }\n    outputParameters.channelCount = 2;                     /* Stereo output, most likely supported. */\n    outputParameters.hostApiSpecificStreamInfo = NULL;\n    outputParameters.sampleFormat = paFloat32;             /* 32 bit floating point output. */\n    outputParameters.suggestedLatency = Pa_GetDeviceInfo(outputParameters.device)->defaultLowOutputLatency;\n    err = Pa_OpenStream(&stream,\n                        NULL,                              /* No input. */\n                        &outputParameters,\n                        SR,                                /* Sample rate. */\n                        FPB,                               /* Frames per buffer. */\n                        paDitherOff,                       /* Clip but don't dither */\n                        patestCallback,\n                        &data);\n    if( err != paNoError ) goto error;\n\n    err = Pa_StartStream( stream );\n    if( err != paNoError ) goto error;\n\n    printf(\"Stereo \\\"ocean waves\\\" for one minute...\\n\");\n\n    tstart = PaUtil_GetTime();\n    tstamp = tstart;\n    srand( (unsigned)time(NULL) );\n\n    while( ( err = Pa_IsStreamActive( stream ) ) == 1 )\n    {\n        const double tcurrent = PaUtil_GetTime();\n\n        /* Delete \"waves\" that the callback is finished with */\n        while (PaUtil_GetRingBufferReadAvailable(&data.rBufFromRT) > 0)\n        {\n            OceanWave* ptr = 0;\n            PaUtil_ReadRingBuffer(&data.rBufFromRT, &ptr, 1);\n            if (ptr != 0)\n            {\n                printf(\"Wave is deleted...\\n\");\n                PaUtil_FreeMemory(ptr);\n                --data.noOfActiveWaves;\n            }\n        }\n\n        if (tcurrent - tstart < 60.0) /* Only start new \"waves\" during one minute */\n        {\n            if (tcurrent >= tstamp)\n            {\n                double tdelta = GenerateFloatRandom(1.0f, 4.0f);\n                tstamp += tdelta;\n\n                if (data.noOfActiveWaves<16)\n                {\n                    const float attackTime = GenerateFloatRandom(2.0f, 6.0f);\n                    const float level = GenerateFloatRandom(0.1f, 1.0f);\n                    const float pos = GenerateFloatRandom(0.0f, 1.0f);\n                    OceanWave* p = InitializeWave(SR, attackTime, level, pos);\n                    if (p != NULL)\n                    {\n                        /* Post wave to audio callback */\n                        PaUtil_WriteRingBuffer(&data.rBufToRT, &p, 1);\n                        ++data.noOfActiveWaves;\n\n                        printf(\"Starting wave at level = %.2f, attack = %.2lf, pos = %.2lf\\n\", level, attackTime, pos);\n                    }\n                }\n            }\n        }\n        else\n        {\n            if (data.noOfActiveWaves == 0)\n            {\n                printf(\"All waves finished!\\n\");\n                break;\n            }\n        }\n\n        Pa_Sleep(100);\n    }\n    if( err < 0 ) goto error;\n\n    err = Pa_CloseStream( stream );\n    if( err != paNoError ) goto error;\n\n    if (data.rBufToRTData)\n    {\n        PaUtil_FreeMemory(data.rBufToRTData);\n    }\n    if (data.rBufFromRTData)\n    {\n        PaUtil_FreeMemory(data.rBufFromRTData);\n    }\n\n    Pa_Sleep(1000);\n\n    Pa_Terminate();\n    return 0;\n\nerror:\n    Pa_Terminate();\n    fprintf( stderr, \"An error occurred while using the portaudio stream\\n\" );\n    fprintf( stderr, \"Error number: %d\\n\", err );\n    fprintf( stderr, \"Error message: %s\\n\", Pa_GetErrorText( err ) );\n    return 0;\n}\n"
  },
  {
    "path": "thirdparty/portaudio/examples/paex_pink.c",
    "content": "/** @file paex_pink.c\n    @ingroup examples_src\n    @brief Generate Pink Noise using Gardner method.\n\n    Optimization suggested by James McCartney uses a tree\n    to select which random value to replace.\n<pre>\n    x x x x x x x x x x x x x x x x\n    x   x   x   x   x   x   x   x\n    x       x       x       x\n     x               x\n       x\n</pre>\n    Tree is generated by counting trailing zeros in an increasing index.\n    When the index is zero, no random number is selected.\n\n    @author Phil Burk  http://www.softsynth.com\n*/\n/*\n * $Id$\n *\n * This program uses the PortAudio Portable Audio Library.\n * For more information see: http://www.portaudio.com\n * Copyright (c) 1999-2000 Ross Bencina and Phil Burk\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n#include <stdio.h>\n#include <math.h>\n#include \"portaudio.h\"\n\n#define PINK_MAX_RANDOM_ROWS   (30)\n#define PINK_RANDOM_BITS       (24)\n#define PINK_RANDOM_SHIFT      ((sizeof(long)*8)-PINK_RANDOM_BITS)\n\ntypedef struct\n{\n    long      pink_Rows[PINK_MAX_RANDOM_ROWS];\n    long      pink_RunningSum;   /* Used to optimize summing of generators. */\n    int       pink_Index;        /* Incremented each sample. */\n    int       pink_IndexMask;    /* Index wrapped by ANDing with this mask. */\n    float     pink_Scalar;       /* Used to scale within range of -1.0 to +1.0 */\n}\nPinkNoise;\n\n/* Prototypes */\nstatic unsigned long GenerateRandomNumber( void );\nvoid InitializePinkNoise( PinkNoise *pink, int numRows );\nfloat GeneratePinkNoise( PinkNoise *pink );\n\n/************************************************************/\n/* Calculate pseudo-random 32 bit number based on linear congruential method. */\nstatic unsigned long GenerateRandomNumber( void )\n{\n    /* Change this seed for different random sequences. */\n    static unsigned long randSeed = 22222;\n    randSeed = (randSeed * 196314165) + 907633515;\n    return randSeed;\n}\n\n/************************************************************/\n/* Setup PinkNoise structure for N rows of generators. */\nvoid InitializePinkNoise( PinkNoise *pink, int numRows )\n{\n    int i;\n    long pmax;\n    pink->pink_Index = 0;\n    pink->pink_IndexMask = (1<<numRows) - 1;\n    /* Calculate maximum possible signed random value. Extra 1 for white noise always added. */\n    pmax = (numRows + 1) * (1<<(PINK_RANDOM_BITS-1));\n    pink->pink_Scalar = 1.0f / pmax;\n    /* Initialize rows. */\n    for( i=0; i<numRows; i++ ) pink->pink_Rows[i] = 0;\n    pink->pink_RunningSum = 0;\n}\n\n#define PINK_MEASURE\n#ifdef PINK_MEASURE\nfloat pinkMax = -999.0;\nfloat pinkMin =  999.0;\n#endif\n\n/* Generate Pink noise values between -1.0 and +1.0 */\nfloat GeneratePinkNoise( PinkNoise *pink )\n{\n    long newRandom;\n    long sum;\n    float output;\n    /* Increment and mask index. */\n    pink->pink_Index = (pink->pink_Index + 1) & pink->pink_IndexMask;\n    /* If index is zero, don't update any random values. */\n    if( pink->pink_Index != 0 )\n    {\n        /* Determine how many trailing zeros in PinkIndex. */\n        /* This algorithm will hang if n==0 so test first. */\n        int numZeros = 0;\n        int n = pink->pink_Index;\n        while( (n & 1) == 0 )\n        {\n            n = n >> 1;\n            numZeros++;\n        }\n        /* Replace the indexed ROWS random value.\n         * Subtract and add back to RunningSum instead of adding all the random\n         * values together. Only one changes each time.\n         */\n        pink->pink_RunningSum -= pink->pink_Rows[numZeros];\n        newRandom = ((long)GenerateRandomNumber()) >> PINK_RANDOM_SHIFT;\n        pink->pink_RunningSum += newRandom;\n        pink->pink_Rows[numZeros] = newRandom;\n    }\n\n    /* Add extra white noise value. */\n    newRandom = ((long)GenerateRandomNumber()) >> PINK_RANDOM_SHIFT;\n    sum = pink->pink_RunningSum + newRandom;\n    /* Scale to range of -1.0 to 0.9999. */\n    output = pink->pink_Scalar * sum;\n#ifdef PINK_MEASURE\n    /* Check Min/Max */\n    if( output > pinkMax ) pinkMax = output;\n    else if( output < pinkMin ) pinkMin = output;\n#endif\n    return output;\n}\n\n/*******************************************************************/\n#define PINK_TEST\n#ifdef PINK_TEST\n\n/* Context for callback routine. */\ntypedef struct\n{\n    PinkNoise   leftPink;\n    PinkNoise   rightPink;\n    unsigned int sampsToGo;\n}\npaTestData;\n\n/* This routine will be called by the PortAudio engine when audio is needed.\n** It may called at interrupt level on some machines so don't do anything\n** that could mess up the system like calling malloc() or free().\n*/\nstatic int patestCallback(const void*                     inputBuffer,\n                          void*                           outputBuffer,\n                          unsigned long                   framesPerBuffer,\n                          const PaStreamCallbackTimeInfo* timeInfo,\n                          PaStreamCallbackFlags           statusFlags,\n                          void*                           userData)\n{\n    int finished;\n    int i;\n    int numFrames;\n    paTestData *data = (paTestData*)userData;\n    float *out = (float*)outputBuffer;\n    (void) inputBuffer; /* Prevent \"unused variable\" warnings. */\n\n    /* Are we almost at end. */\n    if( data->sampsToGo < framesPerBuffer )\n    {\n        numFrames = data->sampsToGo;\n        finished = 1;\n    }\n    else\n    {\n        numFrames = framesPerBuffer;\n        finished = 0;\n    }\n    for( i=0; i<numFrames; i++ )\n    {\n        *out++ = GeneratePinkNoise( &data->leftPink );\n        *out++ = GeneratePinkNoise( &data->rightPink );\n    }\n    data->sampsToGo -= numFrames;\n    return finished;\n}\n\n/*******************************************************************/\nint main(void);\nint main(void)\n{\n    PaStream*           stream;\n    PaError             err;\n    paTestData          data;\n    PaStreamParameters  outputParameters;\n    int                 totalSamps;\n    static const double SR  = 44100.0;\n    static const int    FPB = 2048; /* Frames per buffer: 46 ms buffers. */\n\n    /* Initialize two pink noise signals with different numbers of rows. */\n    InitializePinkNoise( &data.leftPink,  12 );\n    InitializePinkNoise( &data.rightPink, 16 );\n\n    /* Look at a few values. */\n    {\n        int i;\n        float pink;\n        for( i=0; i<20; i++ )\n        {\n            pink = GeneratePinkNoise( &data.leftPink );\n            printf(\"Pink = %f\\n\", pink );\n        }\n    }\n\n    data.sampsToGo = totalSamps = (int)(60.0 * SR);   /* Play a whole minute. */\n    err = Pa_Initialize();\n    if( err != paNoError ) goto error;\n\n    /* Open a stereo PortAudio stream so we can hear the result. */\n    outputParameters.device = Pa_GetDefaultOutputDevice(); /* Take the default output device. */\n    if (outputParameters.device == paNoDevice) {\n        fprintf(stderr,\"Error: No default output device.\\n\");\n        goto error;\n    }\n    outputParameters.channelCount = 2;                     /* Stereo output, most likely supported. */\n    outputParameters.hostApiSpecificStreamInfo = NULL;\n    outputParameters.sampleFormat = paFloat32;             /* 32 bit floating point output. */\n    outputParameters.suggestedLatency =\n                     Pa_GetDeviceInfo(outputParameters.device)->defaultLowOutputLatency;\n    err = Pa_OpenStream(&stream,\n                        NULL,                              /* No input. */\n                        &outputParameters,\n                        SR,                                /* Sample rate. */\n                        FPB,                               /* Frames per buffer. */\n                        paClipOff, /* we won't output out of range samples so don't bother clipping them */\n                        patestCallback,\n                        &data);\n    if( err != paNoError ) goto error;\n\n    err = Pa_StartStream( stream );\n    if( err != paNoError ) goto error;\n\n    printf(\"Stereo pink noise for one minute...\\n\");\n\n    while( ( err = Pa_IsStreamActive( stream ) ) == 1 ) Pa_Sleep(100);\n    if( err < 0 ) goto error;\n\n    err = Pa_CloseStream( stream );\n    if( err != paNoError ) goto error;\n#ifdef PINK_MEASURE\n    printf(\"Pink min = %f, max = %f\\n\", pinkMin, pinkMax );\n#endif\n    Pa_Terminate();\n    return 0;\nerror:\n    Pa_Terminate();\n    fprintf( stderr, \"An error occurred while using the portaudio stream\\n\" );\n    fprintf( stderr, \"Error number: %d\\n\", err );\n    fprintf( stderr, \"Error message: %s\\n\", Pa_GetErrorText( err ) );\n    return 0;\n}\n#endif /* PINK_TEST */\n"
  },
  {
    "path": "thirdparty/portaudio/examples/paex_read_write_wire.c",
    "content": "/** @file paex_read_write_wire.c\n    @ingroup examples_src\n    @brief Tests full duplex blocking I/O by passing input straight to output.\n    @author Bjorn Roche. XO Audio LLC for Z-Systems Engineering.\n    @author based on code by: Phil Burk  http://www.softsynth.com\n    @author based on code by: Ross Bencina rossb@audiomulch.com\n*/\n/*\n * $Id: patest_read_record.c 757 2004-02-13 07:48:10Z rossbencina $\n *\n * This program uses the PortAudio Portable Audio Library.\n * For more information see: http://www.portaudio.com\n * Copyright (c) 1999-2000 Ross Bencina and Phil Burk\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include \"portaudio.h\"\n\n/* #define SAMPLE_RATE  (17932) // Test failure to open with this value. */\n#define SAMPLE_RATE       (44100)\n#define FRAMES_PER_BUFFER   (512)\n#define NUM_SECONDS          (10)\n/* #define DITHER_FLAG     (paDitherOff)  */\n#define DITHER_FLAG           (0)\n\n/* Select sample format. */\n#if 1\n#define PA_SAMPLE_TYPE  paFloat32\n#define SAMPLE_SIZE (4)\n#define SAMPLE_SILENCE  (0.0f)\n#define PRINTF_S_FORMAT \"%.8f\"\n#elif 0\n#define PA_SAMPLE_TYPE  paInt16\n#define SAMPLE_SIZE (2)\n#define SAMPLE_SILENCE  (0)\n#define PRINTF_S_FORMAT \"%d\"\n#elif 0\n#define PA_SAMPLE_TYPE  paInt24\n#define SAMPLE_SIZE (3)\n#define SAMPLE_SILENCE  (0)\n#define PRINTF_S_FORMAT \"%d\"\n#elif 0\n#define PA_SAMPLE_TYPE  paInt8\n#define SAMPLE_SIZE (1)\n#define SAMPLE_SILENCE  (0)\n#define PRINTF_S_FORMAT \"%d\"\n#else\n#define PA_SAMPLE_TYPE  paUInt8\n#define SAMPLE_SIZE (1)\n#define SAMPLE_SILENCE  (128)\n#define PRINTF_S_FORMAT \"%d\"\n#endif\n\n/*******************************************************************/\nint main(void);\nint main(void)\n{\n    PaStreamParameters inputParameters, outputParameters;\n    PaStream *stream = NULL;\n    PaError err;\n    const PaDeviceInfo* inputInfo;\n    const PaDeviceInfo* outputInfo;\n    char *sampleBlock = NULL;\n    int i;\n    int numBytes;\n    int numChannels;\n\n    printf(\"patest_read_write_wire.c\\n\"); fflush(stdout);\n    printf(\"sizeof(int) = %lu\\n\", sizeof(int)); fflush(stdout);\n    printf(\"sizeof(long) = %lu\\n\", sizeof(long)); fflush(stdout);\n\n    err = Pa_Initialize();\n    if( err != paNoError ) goto error2;\n\n    inputParameters.device = Pa_GetDefaultInputDevice(); /* default input device */\n    printf( \"Input device # %d.\\n\", inputParameters.device );\n    inputInfo = Pa_GetDeviceInfo( inputParameters.device );\n    printf( \"    Name: %s\\n\", inputInfo->name );\n    printf( \"      LL: %g s\\n\", inputInfo->defaultLowInputLatency );\n    printf( \"      HL: %g s\\n\", inputInfo->defaultHighInputLatency );\n\n    outputParameters.device = Pa_GetDefaultOutputDevice(); /* default output device */\n    printf( \"Output device # %d.\\n\", outputParameters.device );\n    outputInfo = Pa_GetDeviceInfo( outputParameters.device );\n    printf( \"   Name: %s\\n\", outputInfo->name );\n    printf( \"     LL: %g s\\n\", outputInfo->defaultLowOutputLatency );\n    printf( \"     HL: %g s\\n\", outputInfo->defaultHighOutputLatency );\n\n    numChannels = inputInfo->maxInputChannels < outputInfo->maxOutputChannels\n            ? inputInfo->maxInputChannels : outputInfo->maxOutputChannels;\n    printf( \"Num channels = %d.\\n\", numChannels );\n\n    inputParameters.channelCount = numChannels;\n    inputParameters.sampleFormat = PA_SAMPLE_TYPE;\n    inputParameters.suggestedLatency = inputInfo->defaultHighInputLatency ;\n    inputParameters.hostApiSpecificStreamInfo = NULL;\n\n    outputParameters.channelCount = numChannels;\n    outputParameters.sampleFormat = PA_SAMPLE_TYPE;\n    outputParameters.suggestedLatency = outputInfo->defaultHighOutputLatency;\n    outputParameters.hostApiSpecificStreamInfo = NULL;\n\n    /* -- setup -- */\n\n    err = Pa_OpenStream(\n              &stream,\n              &inputParameters,\n              &outputParameters,\n              SAMPLE_RATE,\n              FRAMES_PER_BUFFER,\n              paClipOff,      /* we won't output out of range samples so don't bother clipping them */\n              NULL, /* no callback, use blocking API */\n              NULL ); /* no callback, so no callback userData */\n    if( err != paNoError ) goto error2;\n\n    numBytes = FRAMES_PER_BUFFER * numChannels * SAMPLE_SIZE ;\n    sampleBlock = (char *) malloc( numBytes );\n    if( sampleBlock == NULL )\n    {\n        printf(\"Could not allocate record array.\\n\");\n        goto error1;\n    }\n    memset( sampleBlock, SAMPLE_SILENCE, numBytes );\n\n    err = Pa_StartStream( stream );\n    if( err != paNoError ) goto error1;\n    printf(\"Wire on. Will run %d seconds.\\n\", NUM_SECONDS); fflush(stdout);\n\n    for( i=0; i<(NUM_SECONDS*SAMPLE_RATE)/FRAMES_PER_BUFFER; ++i )\n    {\n        // You may get underruns or overruns if the output is not primed by PortAudio.\n        err = Pa_WriteStream( stream, sampleBlock, FRAMES_PER_BUFFER );\n        if( err ) goto xrun;\n        err = Pa_ReadStream( stream, sampleBlock, FRAMES_PER_BUFFER );\n        if( err ) goto xrun;\n    }\n    printf(\"Wire off.\\n\"); fflush(stdout);\n\n    err = Pa_StopStream( stream );\n    if( err != paNoError ) goto error1;\n\n    free( sampleBlock );\n\n    Pa_Terminate();\n    return 0;\n\nxrun:\n    printf(\"err = %d\\n\", err); fflush(stdout);\n    if( stream ) {\n        Pa_AbortStream( stream );\n        Pa_CloseStream( stream );\n    }\n    free( sampleBlock );\n    Pa_Terminate();\n    if( err & paInputOverflow )\n        fprintf( stderr, \"Input Overflow.\\n\" );\n    if( err & paOutputUnderflow )\n        fprintf( stderr, \"Output Underflow.\\n\" );\n    return -2;\nerror1:\n    free( sampleBlock );\nerror2:\n    if( stream ) {\n        Pa_AbortStream( stream );\n        Pa_CloseStream( stream );\n    }\n    Pa_Terminate();\n    fprintf( stderr, \"An error occurred while using the portaudio stream\\n\" );\n    fprintf( stderr, \"Error number: %d\\n\", err );\n    fprintf( stderr, \"Error message: %s\\n\", Pa_GetErrorText( err ) );\n    return -1;\n}\n"
  },
  {
    "path": "thirdparty/portaudio/examples/paex_record.c",
    "content": "/** @file paex_record.c\n    @ingroup examples_src\n    @brief Record input into an array; Save array to a file; Playback recorded data.\n    @author Phil Burk  http://www.softsynth.com\n*/\n/*\n * $Id$\n *\n * This program uses the PortAudio Portable Audio Library.\n * For more information see: http://www.portaudio.com\n * Copyright (c) 1999-2000 Ross Bencina and Phil Burk\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n#include <stdio.h>\n#include <stdlib.h>\n#include \"portaudio.h\"\n\n/* #define SAMPLE_RATE  (17932) // Test failure to open with this value. */\n#define SAMPLE_RATE  (44100)\n#define FRAMES_PER_BUFFER (512)\n#define NUM_SECONDS     (5)\n#define NUM_CHANNELS    (2)\n/* #define DITHER_FLAG     (paDitherOff) */\n#define DITHER_FLAG     (0) /**/\n/** Set to 1 if you want to capture the recording to a file. */\n#define WRITE_TO_FILE   (0)\n\n/* Select sample format. */\n#if 1\n#define PA_SAMPLE_TYPE  paFloat32\ntypedef float SAMPLE;\n#define SAMPLE_SILENCE  (0.0f)\n#define PRINTF_S_FORMAT \"%.8f\"\n#elif 1\n#define PA_SAMPLE_TYPE  paInt16\ntypedef short SAMPLE;\n#define SAMPLE_SILENCE  (0)\n#define PRINTF_S_FORMAT \"%d\"\n#elif 0\n#define PA_SAMPLE_TYPE  paInt8\ntypedef char SAMPLE;\n#define SAMPLE_SILENCE  (0)\n#define PRINTF_S_FORMAT \"%d\"\n#else\n#define PA_SAMPLE_TYPE  paUInt8\ntypedef unsigned char SAMPLE;\n#define SAMPLE_SILENCE  (128)\n#define PRINTF_S_FORMAT \"%d\"\n#endif\n\ntypedef struct\n{\n    int          frameIndex;  /* Index into sample array. */\n    int          maxFrameIndex;\n    SAMPLE      *recordedSamples;\n}\npaTestData;\n\n/* This routine will be called by the PortAudio engine when audio is needed.\n** It may be called at interrupt level on some machines so don't do anything\n** that could mess up the system like calling malloc() or free().\n*/\nstatic int recordCallback( const void *inputBuffer, void *outputBuffer,\n                           unsigned long framesPerBuffer,\n                           const PaStreamCallbackTimeInfo* timeInfo,\n                           PaStreamCallbackFlags statusFlags,\n                           void *userData )\n{\n    paTestData *data = (paTestData*)userData;\n    const SAMPLE *rptr = (const SAMPLE*)inputBuffer;\n    SAMPLE *wptr = &data->recordedSamples[data->frameIndex * NUM_CHANNELS];\n    long framesToCalc;\n    long i;\n    int finished;\n    unsigned long framesLeft = data->maxFrameIndex - data->frameIndex;\n\n    (void) outputBuffer; /* Prevent unused variable warnings. */\n    (void) timeInfo;\n    (void) statusFlags;\n    (void) userData;\n\n    if( framesLeft < framesPerBuffer )\n    {\n        framesToCalc = framesLeft;\n        finished = paComplete;\n    }\n    else\n    {\n        framesToCalc = framesPerBuffer;\n        finished = paContinue;\n    }\n\n    if( inputBuffer == NULL )\n    {\n        for( i=0; i<framesToCalc; i++ )\n        {\n            *wptr++ = SAMPLE_SILENCE;  /* left */\n            if( NUM_CHANNELS == 2 ) *wptr++ = SAMPLE_SILENCE;  /* right */\n        }\n    }\n    else\n    {\n        for( i=0; i<framesToCalc; i++ )\n        {\n            *wptr++ = *rptr++;  /* left */\n            if( NUM_CHANNELS == 2 ) *wptr++ = *rptr++;  /* right */\n        }\n    }\n    data->frameIndex += framesToCalc;\n    return finished;\n}\n\n/* This routine will be called by the PortAudio engine when audio is needed.\n** It may be called at interrupt level on some machines so don't do anything\n** that could mess up the system like calling malloc() or free().\n*/\nstatic int playCallback( const void *inputBuffer, void *outputBuffer,\n                         unsigned long framesPerBuffer,\n                         const PaStreamCallbackTimeInfo* timeInfo,\n                         PaStreamCallbackFlags statusFlags,\n                         void *userData )\n{\n    paTestData *data = (paTestData*)userData;\n    SAMPLE *rptr = &data->recordedSamples[data->frameIndex * NUM_CHANNELS];\n    SAMPLE *wptr = (SAMPLE*)outputBuffer;\n    unsigned int i;\n    int finished;\n    unsigned int framesLeft = data->maxFrameIndex - data->frameIndex;\n\n    (void) inputBuffer; /* Prevent unused variable warnings. */\n    (void) timeInfo;\n    (void) statusFlags;\n    (void) userData;\n\n    if( framesLeft < framesPerBuffer )\n    {\n        /* final buffer... */\n        for( i=0; i<framesLeft; i++ )\n        {\n            *wptr++ = *rptr++;  /* left */\n            if( NUM_CHANNELS == 2 ) *wptr++ = *rptr++;  /* right */\n        }\n        for( ; i<framesPerBuffer; i++ )\n        {\n            *wptr++ = 0;  /* left */\n            if( NUM_CHANNELS == 2 ) *wptr++ = 0;  /* right */\n        }\n        data->frameIndex += framesLeft;\n        finished = paComplete;\n    }\n    else\n    {\n        for( i=0; i<framesPerBuffer; i++ )\n        {\n            *wptr++ = *rptr++;  /* left */\n            if( NUM_CHANNELS == 2 ) *wptr++ = *rptr++;  /* right */\n        }\n        data->frameIndex += framesPerBuffer;\n        finished = paContinue;\n    }\n    return finished;\n}\n\n/*******************************************************************/\nint main(void);\nint main(void)\n{\n    PaStreamParameters  inputParameters,\n                        outputParameters;\n    PaStream*           stream;\n    PaError             err = paNoError;\n    paTestData          data;\n    int                 i;\n    int                 totalFrames;\n    int                 numSamples;\n    int                 numBytes;\n    SAMPLE              max, val;\n    double              average;\n\n    printf(\"patest_record.c\\n\"); fflush(stdout);\n\n    data.maxFrameIndex = totalFrames = NUM_SECONDS * SAMPLE_RATE; /* Record for a few seconds. */\n    data.frameIndex = 0;\n    numSamples = totalFrames * NUM_CHANNELS;\n    numBytes = numSamples * sizeof(SAMPLE);\n    data.recordedSamples = (SAMPLE *) malloc( numBytes ); /* From now on, recordedSamples is initialised. */\n    if( data.recordedSamples == NULL )\n    {\n        printf(\"Could not allocate record array.\\n\");\n        goto done;\n    }\n    for( i=0; i<numSamples; i++ ) data.recordedSamples[i] = 0;\n\n    err = Pa_Initialize();\n    if( err != paNoError ) goto done;\n\n    inputParameters.device = Pa_GetDefaultInputDevice(); /* default input device */\n    if (inputParameters.device == paNoDevice) {\n        fprintf(stderr,\"Error: No default input device.\\n\");\n        goto done;\n    }\n    inputParameters.channelCount = 2;                    /* stereo input */\n    inputParameters.sampleFormat = PA_SAMPLE_TYPE;\n    inputParameters.suggestedLatency = Pa_GetDeviceInfo( inputParameters.device )->defaultLowInputLatency;\n    inputParameters.hostApiSpecificStreamInfo = NULL;\n\n    /* Record some audio. -------------------------------------------- */\n    err = Pa_OpenStream(\n              &stream,\n              &inputParameters,\n              NULL,                  /* &outputParameters, */\n              SAMPLE_RATE,\n              FRAMES_PER_BUFFER,\n              paClipOff,      /* we won't output out of range samples so don't bother clipping them */\n              recordCallback,\n              &data );\n    if( err != paNoError ) goto done;\n\n    err = Pa_StartStream( stream );\n    if( err != paNoError ) goto done;\n    printf(\"\\n=== Now recording!! Please speak into the microphone. ===\\n\"); fflush(stdout);\n\n    while( ( err = Pa_IsStreamActive( stream ) ) == 1 )\n    {\n        Pa_Sleep(1000);\n        printf(\"index = %d\\n\", data.frameIndex ); fflush(stdout);\n    }\n    if( err < 0 ) goto done;\n\n    err = Pa_CloseStream( stream );\n    if( err != paNoError ) goto done;\n\n    /* Measure maximum peak amplitude. */\n    max = 0;\n    average = 0.0;\n    for( i=0; i<numSamples; i++ )\n    {\n        val = data.recordedSamples[i];\n        if( val < 0 ) val = -val; /* ABS */\n        if( val > max )\n        {\n            max = val;\n        }\n        average += val;\n    }\n\n    average = average / (double)numSamples;\n\n    printf(\"sample max amplitude = \"PRINTF_S_FORMAT\"\\n\", max );\n    printf(\"sample average = %lf\\n\", average );\n\n    /* Write recorded data to a file. */\n#if WRITE_TO_FILE\n    {\n        FILE  *fid;\n        fid = fopen(\"recorded.raw\", \"wb\");\n        if( fid == NULL )\n        {\n            printf(\"Could not open file.\");\n        }\n        else\n        {\n            fwrite( data.recordedSamples, NUM_CHANNELS * sizeof(SAMPLE), totalFrames, fid );\n            fclose( fid );\n            printf(\"Wrote data to 'recorded.raw'\\n\");\n        }\n    }\n#endif\n\n    /* Playback recorded data.  -------------------------------------------- */\n    data.frameIndex = 0;\n\n    outputParameters.device = Pa_GetDefaultOutputDevice(); /* default output device */\n    if (outputParameters.device == paNoDevice) {\n        fprintf(stderr,\"Error: No default output device.\\n\");\n        goto done;\n    }\n    outputParameters.channelCount = 2;                     /* stereo output */\n    outputParameters.sampleFormat =  PA_SAMPLE_TYPE;\n    outputParameters.suggestedLatency = Pa_GetDeviceInfo( outputParameters.device )->defaultLowOutputLatency;\n    outputParameters.hostApiSpecificStreamInfo = NULL;\n\n    printf(\"\\n=== Now playing back. ===\\n\"); fflush(stdout);\n    err = Pa_OpenStream(\n              &stream,\n              NULL, /* no input */\n              &outputParameters,\n              SAMPLE_RATE,\n              FRAMES_PER_BUFFER,\n              paClipOff,      /* we won't output out of range samples so don't bother clipping them */\n              playCallback,\n              &data );\n    if( err != paNoError ) goto done;\n\n    if( stream )\n    {\n        err = Pa_StartStream( stream );\n        if( err != paNoError ) goto done;\n\n        printf(\"Waiting for playback to finish.\\n\"); fflush(stdout);\n\n        while( ( err = Pa_IsStreamActive( stream ) ) == 1 ) Pa_Sleep(100);\n        if( err < 0 ) goto done;\n\n        err = Pa_CloseStream( stream );\n        if( err != paNoError ) goto done;\n\n        printf(\"Done.\\n\"); fflush(stdout);\n    }\n\ndone:\n    Pa_Terminate();\n    if( data.recordedSamples )       /* Sure it is NULL or valid. */\n        free( data.recordedSamples );\n    if( err != paNoError )\n    {\n        fprintf( stderr, \"An error occurred while using the portaudio stream\\n\" );\n        fprintf( stderr, \"Error number: %d\\n\", err );\n        fprintf( stderr, \"Error message: %s\\n\", Pa_GetErrorText( err ) );\n        err = 1;          /* Always return 0 or 1, but no other return codes. */\n    }\n    return err;\n}\n"
  },
  {
    "path": "thirdparty/portaudio/examples/paex_record_file.c",
    "content": "/** @file paex_record_file.c\n    @ingroup examples_src\n    @brief Record input into a file, then playback recorded data from file (Windows only at the moment)\n    @author Robert Bielik\n*/\n/*\n * $Id: paex_record_file.c 1752 2011-09-08 03:21:55Z philburk $\n *\n * This program uses the PortAudio Portable Audio Library.\n * For more information see: http://www.portaudio.com\n * Copyright (c) 1999-2000 Ross Bencina and Phil Burk\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n#include <stdio.h>\n#include <stdlib.h>\n#include \"portaudio.h\"\n#include \"pa_ringbuffer.h\"\n#include \"pa_util.h\"\n\n#ifdef _WIN32\n#include <windows.h>\n#include <process.h>\n#endif\n\nstatic ring_buffer_size_t rbs_min(ring_buffer_size_t a, ring_buffer_size_t b)\n{\n    return (a < b) ? a : b;\n}\n\n/* #define SAMPLE_RATE  (17932) // Test failure to open with this value. */\n#define FILE_NAME       \"audio_data.raw\"\n#define SAMPLE_RATE  (44100)\n#define FRAMES_PER_BUFFER (512)\n#define NUM_SECONDS     (10)\n#define NUM_CHANNELS    (2)\n#define NUM_WRITES_PER_BUFFER   (4)\n/* #define DITHER_FLAG     (paDitherOff) */\n#define DITHER_FLAG     (0) /**/\n\n\n/* Select sample format. */\n#if 1\n#define PA_SAMPLE_TYPE  paFloat32\ntypedef float SAMPLE;\n#define SAMPLE_SILENCE  (0.0f)\n#define PRINTF_S_FORMAT \"%.8f\"\n#elif 1\n#define PA_SAMPLE_TYPE  paInt16\ntypedef short SAMPLE;\n#define SAMPLE_SILENCE  (0)\n#define PRINTF_S_FORMAT \"%d\"\n#elif 0\n#define PA_SAMPLE_TYPE  paInt8\ntypedef char SAMPLE;\n#define SAMPLE_SILENCE  (0)\n#define PRINTF_S_FORMAT \"%d\"\n#else\n#define PA_SAMPLE_TYPE  paUInt8\ntypedef unsigned char SAMPLE;\n#define SAMPLE_SILENCE  (128)\n#define PRINTF_S_FORMAT \"%d\"\n#endif\n\ntypedef struct\n{\n    unsigned            frameIndex;\n    int                 threadSyncFlag;\n    SAMPLE             *ringBufferData;\n    PaUtilRingBuffer    ringBuffer;\n    FILE               *file;\n    void               *threadHandle;\n}\npaTestData;\n\n/* This routine is run in a separate thread to write data from the ring buffer into a file (during Recording) */\nstatic int threadFunctionWriteToRawFile(void* ptr)\n{\n    paTestData* pData = (paTestData*)ptr;\n\n    /* Mark thread started */\n    pData->threadSyncFlag = 0;\n\n    while (1)\n    {\n        ring_buffer_size_t elementsInBuffer = PaUtil_GetRingBufferReadAvailable(&pData->ringBuffer);\n        if ( (elementsInBuffer >= pData->ringBuffer.bufferSize / NUM_WRITES_PER_BUFFER) ||\n             pData->threadSyncFlag )\n        {\n            void* ptr[2] = {0};\n            ring_buffer_size_t sizes[2] = {0};\n\n            /* By using PaUtil_GetRingBufferReadRegions, we can read directly from the ring buffer */\n            ring_buffer_size_t elementsRead = PaUtil_GetRingBufferReadRegions(&pData->ringBuffer, elementsInBuffer, ptr + 0, sizes + 0, ptr + 1, sizes + 1);\n            if (elementsRead > 0)\n            {\n                int i;\n                for (i = 0; i < 2 && ptr[i] != NULL; ++i)\n                {\n                    fwrite(ptr[i], pData->ringBuffer.elementSizeBytes, sizes[i], pData->file);\n                }\n                PaUtil_AdvanceRingBufferReadIndex(&pData->ringBuffer, elementsRead);\n            }\n\n            if (pData->threadSyncFlag)\n            {\n                break;\n            }\n        }\n\n        /* Sleep a little while... */\n        Pa_Sleep(20);\n    }\n\n    pData->threadSyncFlag = 0;\n\n    return 0;\n}\n\n/* This routine is run in a separate thread to read data from file into the ring buffer (during Playback). When the file\n   has reached EOF, a flag is set so that the play PA callback can return paComplete */\nstatic int threadFunctionReadFromRawFile(void* ptr)\n{\n    paTestData* pData = (paTestData*)ptr;\n\n    while (1)\n    {\n        ring_buffer_size_t elementsInBuffer = PaUtil_GetRingBufferWriteAvailable(&pData->ringBuffer);\n\n        if (elementsInBuffer >= pData->ringBuffer.bufferSize / NUM_WRITES_PER_BUFFER)\n        {\n            void* ptr[2] = {0};\n            ring_buffer_size_t sizes[2] = {0};\n\n            /* By using PaUtil_GetRingBufferWriteRegions, we can write directly into the ring buffer */\n            PaUtil_GetRingBufferWriteRegions(&pData->ringBuffer, elementsInBuffer, ptr + 0, sizes + 0, ptr + 1, sizes + 1);\n\n            if (!feof(pData->file))\n            {\n                ring_buffer_size_t itemsReadFromFile = 0;\n                int i;\n                for (i = 0; i < 2 && ptr[i] != NULL; ++i)\n                {\n                    itemsReadFromFile += (ring_buffer_size_t)fread(ptr[i], pData->ringBuffer.elementSizeBytes, sizes[i], pData->file);\n                }\n                PaUtil_AdvanceRingBufferWriteIndex(&pData->ringBuffer, itemsReadFromFile);\n\n                /* Mark thread started here, that way we \"prime\" the ring buffer before playback */\n                pData->threadSyncFlag = 0;\n            }\n            else\n            {\n                /* No more data to read */\n                pData->threadSyncFlag = 1;\n                break;\n            }\n        }\n\n        /* Sleep a little while... */\n        Pa_Sleep(20);\n    }\n\n    return 0;\n}\n\ntypedef int (*ThreadFunctionType)(void*);\n\n/* Start up a new thread in the given function, at the moment only Windows, but should be very easy to extend\n   to posix type OSs (Linux/Mac) */\nstatic PaError startThread( paTestData* pData, ThreadFunctionType fn )\n{\n#ifdef _WIN32\n    typedef unsigned (__stdcall* WinThreadFunctionType)(void*);\n    pData->threadHandle = (void*)_beginthreadex(NULL, 0, (WinThreadFunctionType)fn, pData, CREATE_SUSPENDED, NULL);\n    if (pData->threadHandle == NULL) return paUnanticipatedHostError;\n\n    /* Set file thread to a little higher prio than normal */\n    SetThreadPriority(pData->threadHandle, THREAD_PRIORITY_ABOVE_NORMAL);\n\n    /* Start it up */\n    pData->threadSyncFlag = 1;\n    ResumeThread(pData->threadHandle);\n\n#endif\n\n    /* Wait for thread to startup */\n    while (pData->threadSyncFlag) {\n        Pa_Sleep(10);\n    }\n\n    return paNoError;\n}\n\nstatic int stopThread( paTestData* pData )\n{\n    pData->threadSyncFlag = 1;\n    /* Wait for thread to stop */\n    while (pData->threadSyncFlag) {\n        Pa_Sleep(10);\n    }\n#ifdef _WIN32\n    CloseHandle(pData->threadHandle);\n    pData->threadHandle = 0;\n#endif\n\n    return paNoError;\n}\n\n\n/* This routine will be called by the PortAudio engine when audio is needed.\n** It may be called at interrupt level on some machines so don't do anything\n** that could mess up the system like calling malloc() or free().\n*/\nstatic int recordCallback( const void *inputBuffer, void *outputBuffer,\n                           unsigned long framesPerBuffer,\n                           const PaStreamCallbackTimeInfo* timeInfo,\n                           PaStreamCallbackFlags statusFlags,\n                           void *userData )\n{\n    paTestData *data = (paTestData*)userData;\n    ring_buffer_size_t elementsWriteable = PaUtil_GetRingBufferWriteAvailable(&data->ringBuffer);\n    ring_buffer_size_t elementsToWrite = rbs_min(elementsWriteable, (ring_buffer_size_t)(framesPerBuffer * NUM_CHANNELS));\n    const SAMPLE *rptr = (const SAMPLE*)inputBuffer;\n\n    (void) outputBuffer; /* Prevent unused variable warnings. */\n    (void) timeInfo;\n    (void) statusFlags;\n    (void) userData;\n\n    data->frameIndex += PaUtil_WriteRingBuffer(&data->ringBuffer, rptr, elementsToWrite);\n\n    return paContinue;\n}\n\n/* This routine will be called by the PortAudio engine when audio is needed.\n** It may be called at interrupt level on some machines so don't do anything\n** that could mess up the system like calling malloc() or free().\n*/\nstatic int playCallback( const void *inputBuffer, void *outputBuffer,\n                         unsigned long framesPerBuffer,\n                         const PaStreamCallbackTimeInfo* timeInfo,\n                         PaStreamCallbackFlags statusFlags,\n                         void *userData )\n{\n    paTestData *data = (paTestData*)userData;\n    ring_buffer_size_t elementsToPlay = PaUtil_GetRingBufferReadAvailable(&data->ringBuffer);\n    ring_buffer_size_t elementsToRead = rbs_min(elementsToPlay, (ring_buffer_size_t)(framesPerBuffer * NUM_CHANNELS));\n    SAMPLE* wptr = (SAMPLE*)outputBuffer;\n\n    (void) inputBuffer; /* Prevent unused variable warnings. */\n    (void) timeInfo;\n    (void) statusFlags;\n    (void) userData;\n\n    data->frameIndex += PaUtil_ReadRingBuffer(&data->ringBuffer, wptr, elementsToRead);\n\n    return data->threadSyncFlag ? paComplete : paContinue;\n}\n\nstatic unsigned NextPowerOf2(unsigned val)\n{\n    val--;\n    val = (val >> 1) | val;\n    val = (val >> 2) | val;\n    val = (val >> 4) | val;\n    val = (val >> 8) | val;\n    val = (val >> 16) | val;\n    return ++val;\n}\n\n/*******************************************************************/\nint main(void);\nint main(void)\n{\n    PaStreamParameters  inputParameters,\n                        outputParameters;\n    PaStream*           stream;\n    PaError             err = paNoError;\n    paTestData          data = {0};\n    unsigned            delayCntr;\n    unsigned            numSamples;\n    unsigned            numBytes;\n\n    printf(\"patest_record.c\\n\"); fflush(stdout);\n\n    /* We set the ring buffer size to about 500 ms */\n    numSamples = NextPowerOf2((unsigned)(SAMPLE_RATE * 0.5 * NUM_CHANNELS));\n    numBytes = numSamples * sizeof(SAMPLE);\n    data.ringBufferData = (SAMPLE *) PaUtil_AllocateMemory( numBytes );\n    if( data.ringBufferData == NULL )\n    {\n        printf(\"Could not allocate ring buffer data.\\n\");\n        goto done;\n    }\n\n    if (PaUtil_InitializeRingBuffer(&data.ringBuffer, sizeof(SAMPLE), numSamples, data.ringBufferData) < 0)\n    {\n        printf(\"Failed to initialize ring buffer. Size is not power of 2 ??\\n\");\n        goto done;\n    }\n\n    err = Pa_Initialize();\n    if( err != paNoError ) goto done;\n\n    inputParameters.device = Pa_GetDefaultInputDevice(); /* default input device */\n    if (inputParameters.device == paNoDevice) {\n        fprintf(stderr,\"Error: No default input device.\\n\");\n        goto done;\n    }\n    inputParameters.channelCount = 2;                    /* stereo input */\n    inputParameters.sampleFormat = PA_SAMPLE_TYPE;\n    inputParameters.suggestedLatency = Pa_GetDeviceInfo( inputParameters.device )->defaultLowInputLatency;\n    inputParameters.hostApiSpecificStreamInfo = NULL;\n\n    /* Record some audio. -------------------------------------------- */\n    err = Pa_OpenStream(\n              &stream,\n              &inputParameters,\n              NULL,                  /* &outputParameters, */\n              SAMPLE_RATE,\n              FRAMES_PER_BUFFER,\n              paClipOff,      /* we won't output out of range samples so don't bother clipping them */\n              recordCallback,\n              &data );\n    if( err != paNoError ) goto done;\n\n    /* Open the raw audio 'cache' file... */\n    data.file = fopen(FILE_NAME, \"wb\");\n    if (data.file == 0) goto done;\n\n    /* Start the file writing thread */\n    err = startThread(&data, threadFunctionWriteToRawFile);\n    if( err != paNoError ) goto done;\n\n    err = Pa_StartStream( stream );\n    if( err != paNoError ) goto done;\n    printf(\"\\n=== Now recording to '\" FILE_NAME \"' for %d seconds!! Please speak into the microphone. ===\\n\", NUM_SECONDS); fflush(stdout);\n\n    /* Note that the RECORDING part is limited with TIME, not size of the file and/or buffer, so you can\n       increase NUM_SECONDS until you run out of disk */\n    delayCntr = 0;\n    while( delayCntr++ < NUM_SECONDS )\n    {\n        printf(\"index = %d\\n\", data.frameIndex ); fflush(stdout);\n        Pa_Sleep(1000);\n    }\n    if( err < 0 ) goto done;\n\n    err = Pa_CloseStream( stream );\n    if( err != paNoError ) goto done;\n\n    /* Stop the thread */\n    err = stopThread(&data);\n    if( err != paNoError ) goto done;\n\n    /* Close file */\n    fclose(data.file);\n    data.file = 0;\n\n    /* Playback recorded data.  -------------------------------------------- */\n    data.frameIndex = 0;\n\n    outputParameters.device = Pa_GetDefaultOutputDevice(); /* default output device */\n    if (outputParameters.device == paNoDevice) {\n        fprintf(stderr,\"Error: No default output device.\\n\");\n        goto done;\n    }\n    outputParameters.channelCount = 2;                     /* stereo output */\n    outputParameters.sampleFormat =  PA_SAMPLE_TYPE;\n    outputParameters.suggestedLatency = Pa_GetDeviceInfo( outputParameters.device )->defaultLowOutputLatency;\n    outputParameters.hostApiSpecificStreamInfo = NULL;\n\n    printf(\"\\n=== Now playing back from file '\" FILE_NAME \"' until end-of-file is reached ===\\n\"); fflush(stdout);\n    err = Pa_OpenStream(\n              &stream,\n              NULL, /* no input */\n              &outputParameters,\n              SAMPLE_RATE,\n              FRAMES_PER_BUFFER,\n              paClipOff,      /* we won't output out of range samples so don't bother clipping them */\n              playCallback,\n              &data );\n    if( err != paNoError ) goto done;\n\n    if( stream )\n    {\n        /* Open file again for reading */\n        data.file = fopen(FILE_NAME, \"rb\");\n        if (data.file != 0)\n        {\n            /* Start the file reading thread */\n            err = startThread(&data, threadFunctionReadFromRawFile);\n            if( err != paNoError ) goto done;\n\n            err = Pa_StartStream( stream );\n            if( err != paNoError ) goto done;\n\n            printf(\"Waiting for playback to finish.\\n\"); fflush(stdout);\n\n            /* The playback will end when EOF is reached */\n            while( ( err = Pa_IsStreamActive( stream ) ) == 1 ) {\n                printf(\"index = %d\\n\", data.frameIndex ); fflush(stdout);\n                Pa_Sleep(1000);\n            }\n            if( err < 0 ) goto done;\n        }\n\n        err = Pa_CloseStream( stream );\n        if( err != paNoError ) goto done;\n\n        fclose(data.file);\n\n        printf(\"Done.\\n\"); fflush(stdout);\n    }\n\ndone:\n    Pa_Terminate();\n    if( data.ringBufferData )       /* Sure it is NULL or valid. */\n        PaUtil_FreeMemory( data.ringBufferData );\n    if( err != paNoError )\n    {\n        fprintf( stderr, \"An error occurred while using the portaudio stream\\n\" );\n        fprintf( stderr, \"Error number: %d\\n\", err );\n        fprintf( stderr, \"Error message: %s\\n\", Pa_GetErrorText( err ) );\n        err = 1;          /* Always return 0 or 1, but no other return codes. */\n    }\n    return err;\n}\n"
  },
  {
    "path": "thirdparty/portaudio/examples/paex_saw.c",
    "content": "/** @file paex_saw.c\n    @ingroup examples_src\n    @brief Play a simple (aliasing) sawtooth wave.\n    @author Phil Burk  http://www.softsynth.com\n*/\n/*\n * $Id$\n *\n * This program uses the PortAudio Portable Audio Library.\n * For more information see: http://www.portaudio.com\n * Copyright (c) 1999-2000 Ross Bencina and Phil Burk\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n#include <stdio.h>\n#include <math.h>\n#include \"portaudio.h\"\n#define NUM_SECONDS   (4)\n#define SAMPLE_RATE   (44100)\n\ntypedef struct\n{\n    float left_phase;\n    float right_phase;\n}\npaTestData;\n\n/* This routine will be called by the PortAudio engine when audio is needed.\n** It may called at interrupt level on some machines so don't do anything\n** that could mess up the system like calling malloc() or free().\n*/\nstatic int patestCallback( const void *inputBuffer, void *outputBuffer,\n                           unsigned long framesPerBuffer,\n                           const PaStreamCallbackTimeInfo* timeInfo,\n                           PaStreamCallbackFlags statusFlags,\n                           void *userData )\n{\n    /* Cast data passed through stream to our structure. */\n    paTestData *data = (paTestData*)userData;\n    float *out = (float*)outputBuffer;\n    unsigned int i;\n    (void) inputBuffer; /* Prevent unused variable warning. */\n\n    for( i=0; i<framesPerBuffer; i++ )\n    {\n        *out++ = data->left_phase;  /* left */\n        *out++ = data->right_phase;  /* right */\n        /* Generate simple sawtooth phaser that ranges between -1.0 and 1.0. */\n        data->left_phase += 0.01f;\n        /* When signal reaches top, drop back down. */\n        if( data->left_phase >= 1.0f ) data->left_phase -= 2.0f;\n        /* higher pitch so we can distinguish left and right. */\n        data->right_phase += 0.03f;\n        if( data->right_phase >= 1.0f ) data->right_phase -= 2.0f;\n    }\n    return 0;\n}\n\n/*******************************************************************/\nstatic paTestData data;\nint main(void);\nint main(void)\n{\n    PaStream *stream;\n    PaError err;\n\n    printf(\"PortAudio Test: output sawtooth wave.\\n\");\n    /* Initialize our data for use by callback. */\n    data.left_phase = data.right_phase = 0.0;\n    /* Initialize library before making any other calls. */\n    err = Pa_Initialize();\n    if( err != paNoError ) goto error;\n\n    /* Open an audio I/O stream. */\n    err = Pa_OpenDefaultStream( &stream,\n                                0,          /* no input channels */\n                                2,          /* stereo output */\n                                paFloat32,  /* 32 bit floating point output */\n                                SAMPLE_RATE,\n                                256,        /* frames per buffer */\n                                patestCallback,\n                                &data );\n    if( err != paNoError ) goto error;\n\n    err = Pa_StartStream( stream );\n    if( err != paNoError ) goto error;\n\n    /* Sleep for several seconds. */\n    Pa_Sleep(NUM_SECONDS*1000);\n\n    err = Pa_StopStream( stream );\n    if( err != paNoError ) goto error;\n    err = Pa_CloseStream( stream );\n    if( err != paNoError ) goto error;\n    Pa_Terminate();\n    printf(\"Test finished.\\n\");\n    return err;\nerror:\n    Pa_Terminate();\n    fprintf( stderr, \"An error occurred while using the portaudio stream\\n\" );\n    fprintf( stderr, \"Error number: %d\\n\", err );\n    fprintf( stderr, \"Error message: %s\\n\", Pa_GetErrorText( err ) );\n    return err;\n}\n"
  },
  {
    "path": "thirdparty/portaudio/examples/paex_sine.c",
    "content": "/** @file paex_sine.c\n    @ingroup examples_src\n    @brief Play a sine wave for several seconds.\n    @author Ross Bencina <rossb@audiomulch.com>\n    @author Phil Burk <philburk@softsynth.com>\n*/\n/*\n * $Id$\n *\n * This program uses the PortAudio Portable Audio Library.\n * For more information see: http://www.portaudio.com/\n * Copyright (c) 1999-2000 Ross Bencina and Phil Burk\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n#include <stdio.h>\n#include <math.h>\n#include \"portaudio.h\"\n\n#define NUM_SECONDS   (5)\n#define SAMPLE_RATE   (44100)\n#define FRAMES_PER_BUFFER  (64)\n\n#ifndef M_PI\n#define M_PI  (3.14159265)\n#endif\n\n#define TABLE_SIZE   (200)\ntypedef struct\n{\n    float sine[TABLE_SIZE];\n    int left_phase;\n    int right_phase;\n    char message[20];\n}\npaTestData;\n\n/* This routine will be called by the PortAudio engine when audio is needed.\n** It may called at interrupt level on some machines so don't do anything\n** that could mess up the system like calling malloc() or free().\n*/\nstatic int patestCallback( const void *inputBuffer, void *outputBuffer,\n                            unsigned long framesPerBuffer,\n                            const PaStreamCallbackTimeInfo* timeInfo,\n                            PaStreamCallbackFlags statusFlags,\n                            void *userData )\n{\n    paTestData *data = (paTestData*)userData;\n    float *out = (float*)outputBuffer;\n    unsigned long i;\n\n    (void) timeInfo; /* Prevent unused variable warnings. */\n    (void) statusFlags;\n    (void) inputBuffer;\n\n    for( i=0; i<framesPerBuffer; i++ )\n    {\n        *out++ = data->sine[data->left_phase];  /* left */\n        *out++ = data->sine[data->right_phase];  /* right */\n        data->left_phase += 1;\n        if( data->left_phase >= TABLE_SIZE ) data->left_phase -= TABLE_SIZE;\n        data->right_phase += 3; /* higher pitch so we can distinguish left and right. */\n        if( data->right_phase >= TABLE_SIZE ) data->right_phase -= TABLE_SIZE;\n    }\n\n    return paContinue;\n}\n\n/*\n * This routine is called by portaudio when playback is done.\n */\nstatic void StreamFinished( void* userData )\n{\n    paTestData *data = (paTestData *) userData;\n    printf( \"Stream Completed: %s\\n\", data->message );\n}\n\n/*******************************************************************/\nint main(void);\nint main(void)\n{\n    PaStreamParameters outputParameters;\n    PaStream *stream;\n    PaError err;\n    paTestData data;\n    int i;\n\n    printf(\"PortAudio Test: output sine wave. SR = %d, BufSize = %d\\n\", SAMPLE_RATE, FRAMES_PER_BUFFER);\n\n    /* initialise sinusoidal wavetable */\n    for( i=0; i<TABLE_SIZE; i++ )\n    {\n        data.sine[i] = (float) sin( ((double)i/(double)TABLE_SIZE) * M_PI * 2. );\n    }\n    data.left_phase = data.right_phase = 0;\n\n    err = Pa_Initialize();\n    if( err != paNoError ) goto error;\n\n    outputParameters.device = Pa_GetDefaultOutputDevice(); /* default output device */\n    if (outputParameters.device == paNoDevice) {\n        fprintf(stderr,\"Error: No default output device.\\n\");\n        goto error;\n    }\n    outputParameters.channelCount = 2;       /* stereo output */\n    outputParameters.sampleFormat = paFloat32; /* 32 bit floating point output */\n    outputParameters.suggestedLatency = Pa_GetDeviceInfo( outputParameters.device )->defaultLowOutputLatency;\n    outputParameters.hostApiSpecificStreamInfo = NULL;\n\n    err = Pa_OpenStream(\n              &stream,\n              NULL, /* no input */\n              &outputParameters,\n              SAMPLE_RATE,\n              FRAMES_PER_BUFFER,\n              paClipOff,      /* we won't output out of range samples so don't bother clipping them */\n              patestCallback,\n              &data );\n    if( err != paNoError ) goto error;\n\n    sprintf( data.message, \"No Message\" );\n    err = Pa_SetStreamFinishedCallback( stream, &StreamFinished );\n    if( err != paNoError ) goto error;\n\n    err = Pa_StartStream( stream );\n    if( err != paNoError ) goto error;\n\n    printf(\"Play for %d seconds.\\n\", NUM_SECONDS );\n    Pa_Sleep( NUM_SECONDS * 1000 );\n\n    err = Pa_StopStream( stream );\n    if( err != paNoError ) goto error;\n\n    err = Pa_CloseStream( stream );\n    if( err != paNoError ) goto error;\n\n    Pa_Terminate();\n    printf(\"Test finished.\\n\");\n\n    return err;\nerror:\n    Pa_Terminate();\n    fprintf( stderr, \"An error occurred while using the portaudio stream\\n\" );\n    fprintf( stderr, \"Error number: %d\\n\", err );\n    fprintf( stderr, \"Error message: %s\\n\", Pa_GetErrorText( err ) );\n    return err;\n}\n"
  },
  {
    "path": "thirdparty/portaudio/examples/paex_sine_c++.cpp",
    "content": "/** @file paex_sine.c\n    @ingroup examples_src\n    @brief Play a sine wave for several seconds.\n    @author Ross Bencina <rossb@audiomulch.com>\n    @author Phil Burk <philburk@softsynth.com>\n*/\n/*\n * $Id: paex_sine.c 1752 2011-09-08 03:21:55Z philburk $\n *\n * This program uses the PortAudio Portable Audio Library.\n * For more information see: http://www.portaudio.com/\n * Copyright (c) 1999-2000 Ross Bencina and Phil Burk\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n#include <stdio.h>\n#include <math.h>\n#include \"portaudio.h\"\n\n#define NUM_SECONDS   (5)\n#define SAMPLE_RATE   (44100)\n#define FRAMES_PER_BUFFER  (64)\n\n#ifndef M_PI\n#define M_PI  (3.14159265)\n#endif\n\n#define TABLE_SIZE   (200)\n\nclass Sine\n{\npublic:\n    Sine() : stream(0), left_phase(0), right_phase(0)\n    {\n        /* initialise sinusoidal wavetable */\n        for( int i=0; i<TABLE_SIZE; i++ )\n        {\n            sine[i] = (float) sin( ((double)i/(double)TABLE_SIZE) * M_PI * 2. );\n        }\n\n        sprintf( message, \"No Message\" );\n    }\n\n    bool open(PaDeviceIndex index)\n    {\n        PaStreamParameters outputParameters;\n\n        outputParameters.device = index;\n        if (outputParameters.device == paNoDevice) {\n            return false;\n        }\n\n        const PaDeviceInfo* pInfo = Pa_GetDeviceInfo(index);\n        if (pInfo != 0)\n        {\n            printf(\"Output device name: '%s'\\r\", pInfo->name);\n        }\n\n        outputParameters.channelCount = 2;       /* stereo output */\n        outputParameters.sampleFormat = paFloat32; /* 32 bit floating point output */\n        outputParameters.suggestedLatency = Pa_GetDeviceInfo( outputParameters.device )->defaultLowOutputLatency;\n        outputParameters.hostApiSpecificStreamInfo = NULL;\n\n        PaError err = Pa_OpenStream(\n            &stream,\n            NULL, /* no input */\n            &outputParameters,\n            SAMPLE_RATE,\n            paFramesPerBufferUnspecified,\n            paClipOff,      /* we won't output out of range samples so don't bother clipping them */\n            &Sine::paCallback,\n            this            /* Using 'this' for userData so we can cast to Sine* in paCallback method */\n            );\n\n        if (err != paNoError)\n        {\n            /* Failed to open stream to device !!! */\n            return false;\n        }\n\n        err = Pa_SetStreamFinishedCallback( stream, &Sine::paStreamFinished );\n\n        if (err != paNoError)\n        {\n            Pa_CloseStream( stream );\n            stream = 0;\n\n            return false;\n        }\n\n        return true;\n    }\n\n    bool close()\n    {\n        if (stream == 0)\n            return false;\n\n        PaError err = Pa_CloseStream( stream );\n        stream = 0;\n\n        return (err == paNoError);\n    }\n\n\n    bool start()\n    {\n        if (stream == 0)\n            return false;\n\n        PaError err = Pa_StartStream( stream );\n\n        return (err == paNoError);\n    }\n\n    bool stop()\n    {\n        if (stream == 0)\n            return false;\n\n        PaError err = Pa_StopStream( stream );\n\n        return (err == paNoError);\n    }\n\nprivate:\n    /* The instance callback, where we have access to every method/variable in object of class Sine */\n    int paCallbackMethod(const void *inputBuffer, void *outputBuffer,\n        unsigned long framesPerBuffer,\n        const PaStreamCallbackTimeInfo* timeInfo,\n        PaStreamCallbackFlags statusFlags)\n    {\n        float *out = (float*)outputBuffer;\n        unsigned long i;\n\n        (void) timeInfo; /* Prevent unused variable warnings. */\n        (void) statusFlags;\n        (void) inputBuffer;\n\n        for( i=0; i<framesPerBuffer; i++ )\n        {\n            *out++ = sine[left_phase];  /* left */\n            *out++ = sine[right_phase];  /* right */\n            left_phase += 1;\n            if( left_phase >= TABLE_SIZE ) left_phase -= TABLE_SIZE;\n            right_phase += 3; /* higher pitch so we can distinguish left and right. */\n            if( right_phase >= TABLE_SIZE ) right_phase -= TABLE_SIZE;\n        }\n\n        return paContinue;\n\n    }\n\n    /* This routine will be called by the PortAudio engine when audio is needed.\n    ** It may called at interrupt level on some machines so don't do anything\n    ** that could mess up the system like calling malloc() or free().\n    */\n    static int paCallback( const void *inputBuffer, void *outputBuffer,\n        unsigned long framesPerBuffer,\n        const PaStreamCallbackTimeInfo* timeInfo,\n        PaStreamCallbackFlags statusFlags,\n        void *userData )\n    {\n        /* Here we cast userData to Sine* type so we can call the instance method paCallbackMethod, we can do that since\n           we called Pa_OpenStream with 'this' for userData */\n        return ((Sine*)userData)->paCallbackMethod(inputBuffer, outputBuffer,\n            framesPerBuffer,\n            timeInfo,\n            statusFlags);\n    }\n\n\n    void paStreamFinishedMethod()\n    {\n        printf( \"Stream Completed: %s\\n\", message );\n    }\n\n    /*\n     * This routine is called by portaudio when playback is done.\n     */\n    static void paStreamFinished(void* userData)\n    {\n        return ((Sine*)userData)->paStreamFinishedMethod();\n    }\n\n    PaStream *stream;\n    float sine[TABLE_SIZE];\n    int left_phase;\n    int right_phase;\n    char message[20];\n};\n\nclass ScopedPaHandler\n{\npublic:\n    ScopedPaHandler()\n        : _result(Pa_Initialize())\n    {\n    }\n    ~ScopedPaHandler()\n    {\n        if (_result == paNoError)\n        {\n            Pa_Terminate();\n        }\n    }\n\n    PaError result() const { return _result; }\n\nprivate:\n    PaError _result;\n};\n\n\n/*******************************************************************/\nint main(void);\nint main(void)\n{\n    Sine sine;\n\n    printf(\"PortAudio Test: output sine wave. SR = %d, BufSize = %d\\n\", SAMPLE_RATE, FRAMES_PER_BUFFER);\n\n    ScopedPaHandler paInit;\n    if( paInit.result() != paNoError ) goto error;\n\n    if (sine.open(Pa_GetDefaultOutputDevice()))\n    {\n        if (sine.start())\n        {\n            printf(\"Play for %d seconds.\\n\", NUM_SECONDS );\n            Pa_Sleep( NUM_SECONDS * 1000 );\n\n            sine.stop();\n        }\n\n        sine.close();\n    }\n\n    printf(\"Test finished.\\n\");\n    return paNoError;\n\nerror:\n    fprintf( stderr, \"An error occurred while using the portaudio stream\\n\" );\n    fprintf( stderr, \"Error number: %d\\n\", paInit.result() );\n    fprintf( stderr, \"Error message: %s\\n\", Pa_GetErrorText( paInit.result() ) );\n    return 1;\n}\n"
  },
  {
    "path": "thirdparty/portaudio/examples/paex_wmme_ac3.c",
    "content": "/** @file paex_wmme_ac3.c\n    @ingroup examples_src\n    @brief Use WMME-specific interface to send raw AC3 data to a S/PDIF output.\n    @author Ross Bencina <rossb@audiomulch.com>\n*/\n/*\n * $Id: $\n * Portable Audio I/O Library\n * Windows MME ac3 sound output test\n *\n * Copyright (c) 2009 Ross Bencina\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n#include <stdio.h>\n#include <math.h>\n\n#include <windows.h>    /* required when using pa_win_wmme.h */\n#include <mmsystem.h>   /* required when using pa_win_wmme.h */\n\n#include \"portaudio.h\"\n#include \"pa_win_wmme.h\"\n\n#define NUM_SECONDS         (20)\n#define SAMPLE_RATE         (48000)\n#define FRAMES_PER_BUFFER   (64)\n\n#ifndef M_PI\n#define M_PI  (3.14159265)\n#endif\n\n#define TABLE_SIZE          (100)\n\n#define CHANNEL_COUNT       (2)\n\n\n\ntypedef struct\n{\n    short *buffer;\n    int bufferSampleCount;\n    int playbackIndex;\n}\npaTestData;\n\n/* This routine will be called by the PortAudio engine when audio is needed.\n** It may called at interrupt level on some machines so don't do anything\n** that could mess up the system like calling malloc() or free().\n*/\nstatic int patestCallback( const void *inputBuffer, void *outputBuffer,\n                            unsigned long framesPerBuffer,\n                            const PaStreamCallbackTimeInfo* timeInfo,\n                            PaStreamCallbackFlags statusFlags,\n                            void *userData )\n{\n    paTestData *data = (paTestData*)userData;\n    short *out = (short*)outputBuffer;\n    unsigned long i,j;\n\n    (void) timeInfo; /* Prevent unused variable warnings. */\n    (void) statusFlags;\n    (void) inputBuffer;\n\n    /* stream out contents of data->buffer looping at end */\n\n    for( i=0; i<framesPerBuffer; i++ )\n    {\n        for( j = 0; j < CHANNEL_COUNT; ++j ){\n            *out++ = data->buffer[ data->playbackIndex++ ];\n\n            if( data->playbackIndex >= data->bufferSampleCount )\n                data->playbackIndex = 0; /* loop at end of buffer */\n        }\n    }\n\n    return paContinue;\n}\n\n/*******************************************************************/\nint main(int argc, char* argv[])\n{\n    PaStreamParameters outputParameters;\n    PaWinMmeStreamInfo wmmeStreamInfo;\n    PaStream *stream;\n    PaError err;\n    paTestData data;\n    int deviceIndex;\n    FILE *fp;\n    const char *fileName = \"c:\\\\test_48k.ac3.spdif\";\n    data.buffer = NULL;\n\n    printf(\"usage: patest_wmme_ac3 fileName [paDeviceIndex]\\n\");\n    printf(\"**IMPORTANT*** The provided file must include the spdif preamble at the start of every AC-3 frame. Using a normal ac3 file won't work.\\n\");\n    printf(\"PortAudio Test: output a raw spdif ac3 stream. SR = %d, BufSize = %d, Chans = %d\\n\",\n            SAMPLE_RATE, FRAMES_PER_BUFFER, CHANNEL_COUNT);\n\n\n    if( argc >= 2 )\n        fileName = argv[1];\n\n    printf( \"reading spdif ac3 raw stream file %s\\n\", fileName );\n\n    fp = fopen( fileName, \"rb\" );\n    if( !fp ){\n        fprintf( stderr, \"error opening spdif ac3 file.\\n\" );\n        return -1;\n    }\n    /* get file size */\n    fseek( fp, 0, SEEK_END );\n    data.bufferSampleCount = ftell( fp ) / sizeof(short);\n    fseek( fp, 0, SEEK_SET );\n\n    /* allocate buffer, read the whole file into memory */\n    data.buffer = (short*)malloc( data.bufferSampleCount * sizeof(short) );\n    if( !data.buffer ){\n        fprintf( stderr, \"error allocating buffer.\\n\" );\n        return -1;\n    }\n\n    fread( data.buffer, sizeof(short), data.bufferSampleCount, fp );\n    fclose( fp );\n\n    data.playbackIndex = 0;\n\n    err = Pa_Initialize();\n    if( err != paNoError ) goto error;\n\n    deviceIndex = Pa_GetHostApiInfo( Pa_HostApiTypeIdToHostApiIndex( paMME ) )->defaultOutputDevice;\n    if( argc >= 3 ){\n        sscanf( argv[1], \"%d\", &deviceIndex );\n    }\n\n    printf( \"using device id %d (%s)\\n\", deviceIndex, Pa_GetDeviceInfo(deviceIndex)->name );\n\n\n    outputParameters.device = deviceIndex;\n    outputParameters.channelCount = CHANNEL_COUNT;\n    outputParameters.sampleFormat = paInt16; /* IMPORTANT must use paInt16 for WMME AC3 */\n    outputParameters.suggestedLatency = Pa_GetDeviceInfo( outputParameters.device )->defaultLowOutputLatency;\n    outputParameters.hostApiSpecificStreamInfo = NULL;\n\n    wmmeStreamInfo.size = sizeof(PaWinMmeStreamInfo);\n    wmmeStreamInfo.hostApiType = paMME;\n    wmmeStreamInfo.version = 1;\n    wmmeStreamInfo.flags = paWinMmeWaveFormatDolbyAc3Spdif;\n    outputParameters.hostApiSpecificStreamInfo = &wmmeStreamInfo;\n\n\n    if( Pa_IsFormatSupported( 0, &outputParameters, SAMPLE_RATE ) == paFormatIsSupported  ){\n        printf( \"Pa_IsFormatSupported reports device will support %d channels.\\n\", CHANNEL_COUNT );\n    }else{\n        printf( \"Pa_IsFormatSupported reports device will not support %d channels.\\n\", CHANNEL_COUNT );\n    }\n\n    err = Pa_OpenStream(\n              &stream,\n              NULL, /* no input */\n              &outputParameters,\n              SAMPLE_RATE,\n              FRAMES_PER_BUFFER,\n              0,\n              patestCallback,\n              &data );\n    if( err != paNoError ) goto error;\n\n    err = Pa_StartStream( stream );\n    if( err != paNoError ) goto error;\n\n    printf(\"Play for %d seconds.\\n\", NUM_SECONDS );\n    Pa_Sleep( NUM_SECONDS * 1000 );\n\n    err = Pa_StopStream( stream );\n    if( err != paNoError ) goto error;\n\n    err = Pa_CloseStream( stream );\n    if( err != paNoError ) goto error;\n\n    Pa_Terminate();\n    free( data.buffer );\n    printf(\"Test finished.\\n\");\n\n    return err;\nerror:\n    Pa_Terminate();\n    free( data.buffer );\n\n    fprintf( stderr, \"An error occurred while using the portaudio stream\\n\" );\n    fprintf( stderr, \"Error number: %d\\n\", err );\n    fprintf( stderr, \"Error message: %s\\n\", Pa_GetErrorText( err ) );\n    return err;\n}\n"
  },
  {
    "path": "thirdparty/portaudio/examples/paex_wmme_surround.c",
    "content": "/** @file paex_wmme_surround.c\n    @ingroup examples_src\n    @brief Use WMME-specific channelMask to request 5.1 surround sound output.\n    @author Ross Bencina <rossb@audiomulch.com>\n*/\n/*\n * $Id: $\n * Portable Audio I/O Library\n * Windows MME surround sound output test\n *\n * Copyright (c) 2007 Ross Bencina\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n#include <stdio.h>\n#include <math.h>\n\n#include <windows.h>    /* required when using pa_win_wmme.h */\n#include <mmsystem.h>   /* required when using pa_win_wmme.h */\n\n#include \"portaudio.h\"\n#include \"pa_win_wmme.h\"\n\n#define NUM_SECONDS         (12)\n#define SAMPLE_RATE         (44100)\n#define FRAMES_PER_BUFFER   (64)\n\n#ifndef M_PI\n#define M_PI  (3.14159265)\n#endif\n\n#define TABLE_SIZE          (100)\n\n#define CHANNEL_COUNT       (6)\n\n\n\ntypedef struct\n{\n    float sine[TABLE_SIZE];\n    int phase;\n    int currentChannel;\n    int cycleCount;\n}\npaTestData;\n\n/* This routine will be called by the PortAudio engine when audio is needed.\n** It may called at interrupt level on some machines so don't do anything\n** that could mess up the system like calling malloc() or free().\n*/\nstatic int patestCallback( const void *inputBuffer, void *outputBuffer,\n                            unsigned long framesPerBuffer,\n                            const PaStreamCallbackTimeInfo* timeInfo,\n                            PaStreamCallbackFlags statusFlags,\n                            void *userData )\n{\n    paTestData *data = (paTestData*)userData;\n    float *out = (float*)outputBuffer;\n    unsigned long i,j;\n\n    (void) timeInfo; /* Prevent unused variable warnings. */\n    (void) statusFlags;\n    (void) inputBuffer;\n\n    for( i=0; i<framesPerBuffer; i++ )\n    {\n        for( j = 0; j < CHANNEL_COUNT; ++j ){\n            if( j == data->currentChannel && data->cycleCount < 4410 ){\n                *out++ = data->sine[data->phase];\n                data->phase += 1 + j;    // play each channel at a different pitch so they can be distinguished\n                if( data->phase >= TABLE_SIZE ){\n                    data->phase -= TABLE_SIZE;\n                }\n            }else{\n                *out++ = 0;\n            }\n        }\n\n        data->cycleCount++;\n        if( data->cycleCount > 44100 ){\n            data->cycleCount = 0;\n\n            ++data->currentChannel;\n            if( data->currentChannel >= CHANNEL_COUNT )\n                data->currentChannel -= CHANNEL_COUNT;\n        }\n    }\n\n    return paContinue;\n}\n\n/*******************************************************************/\nint main(int argc, char* argv[])\n{\n    PaStreamParameters outputParameters;\n    PaWinMmeStreamInfo wmmeStreamInfo;\n    PaStream *stream;\n    PaError err;\n    paTestData data;\n    int i;\n    int deviceIndex;\n\n    printf(\"PortAudio Test: output a sine blip on each channel. SR = %d, BufSize = %d, Chans = %d\\n\", SAMPLE_RATE, FRAMES_PER_BUFFER, CHANNEL_COUNT);\n\n    err = Pa_Initialize();\n    if( err != paNoError ) goto error;\n\n    deviceIndex = Pa_GetHostApiInfo( Pa_HostApiTypeIdToHostApiIndex( paMME ) )->defaultOutputDevice;\n    if( argc == 2 ){\n        sscanf( argv[1], \"%d\", &deviceIndex );\n    }\n\n    printf( \"using device id %d (%s)\\n\", deviceIndex, Pa_GetDeviceInfo(deviceIndex)->name );\n\n    /* initialise sinusoidal wavetable */\n    for( i=0; i<TABLE_SIZE; i++ )\n    {\n        data.sine[i] = (float) sin( ((double)i/(double)TABLE_SIZE) * M_PI * 2. );\n    }\n\n    data.phase = 0;\n    data.currentChannel = 0;\n    data.cycleCount = 0;\n\n    outputParameters.device = deviceIndex;\n    outputParameters.channelCount = CHANNEL_COUNT;\n    outputParameters.sampleFormat = paFloat32; /* 32 bit floating point processing */\n    outputParameters.suggestedLatency = Pa_GetDeviceInfo( outputParameters.device )->defaultLowOutputLatency;\n    outputParameters.hostApiSpecificStreamInfo = NULL;\n\n    /* it's not strictly necessary to provide a channelMask for surround sound\n       output. But if you want to be sure which channel mask PortAudio will use\n       then you should supply one */\n    wmmeStreamInfo.size = sizeof(PaWinMmeStreamInfo);\n    wmmeStreamInfo.hostApiType = paMME;\n    wmmeStreamInfo.version = 1;\n    wmmeStreamInfo.flags = paWinMmeUseChannelMask;\n    wmmeStreamInfo.channelMask = PAWIN_SPEAKER_5POINT1; /* request 5.1 output format */\n    outputParameters.hostApiSpecificStreamInfo = &wmmeStreamInfo;\n\n\n    if( Pa_IsFormatSupported( 0, &outputParameters, SAMPLE_RATE ) == paFormatIsSupported  ){\n        printf( \"Pa_IsFormatSupported reports device will support %d channels.\\n\", CHANNEL_COUNT );\n    }else{\n        printf( \"Pa_IsFormatSupported reports device will not support %d channels.\\n\", CHANNEL_COUNT );\n    }\n\n    err = Pa_OpenStream(\n              &stream,\n              NULL, /* no input */\n              &outputParameters,\n              SAMPLE_RATE,\n              FRAMES_PER_BUFFER,\n              paClipOff,      /* we won't output out of range samples so don't bother clipping them */\n              patestCallback,\n              &data );\n    if( err != paNoError ) goto error;\n\n    err = Pa_StartStream( stream );\n    if( err != paNoError ) goto error;\n\n    printf(\"Play for %d seconds.\\n\", NUM_SECONDS );\n    Pa_Sleep( NUM_SECONDS * 1000 );\n\n    err = Pa_StopStream( stream );\n    if( err != paNoError ) goto error;\n\n    err = Pa_CloseStream( stream );\n    if( err != paNoError ) goto error;\n\n    Pa_Terminate();\n    printf(\"Test finished.\\n\");\n\n    return err;\nerror:\n    Pa_Terminate();\n    fprintf( stderr, \"An error occurred while using the portaudio stream\\n\" );\n    fprintf( stderr, \"Error number: %d\\n\", err );\n    fprintf( stderr, \"Error message: %s\\n\", Pa_GetErrorText( err ) );\n    return err;\n}\n"
  },
  {
    "path": "thirdparty/portaudio/examples/paex_write_sine.c",
    "content": "/** @file paex_write_sine.c\n    @ingroup examples_src\n    @brief Play a sine wave for several seconds using the blocking API (Pa_WriteStream())\n    @author Ross Bencina <rossb@audiomulch.com>\n    @author Phil Burk <philburk@softsynth.com>\n*/\n/*\n * $Id$\n *\n * This program uses the PortAudio Portable Audio Library.\n * For more information see: http://www.portaudio.com/\n * Copyright (c) 1999-2000 Ross Bencina and Phil Burk\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n#include <stdio.h>\n#include <math.h>\n#include \"portaudio.h\"\n\n#define NUM_SECONDS         (5)\n#define SAMPLE_RATE         (44100)\n#define FRAMES_PER_BUFFER   (1024)\n\n#ifndef M_PI\n#define M_PI  (3.14159265)\n#endif\n\n#define TABLE_SIZE   (200)\n\n\nint main(void);\nint main(void)\n{\n    PaStreamParameters outputParameters;\n    PaStream *stream;\n    PaError err;\n    float buffer[FRAMES_PER_BUFFER][2]; /* stereo output buffer */\n    float sine[TABLE_SIZE]; /* sine wavetable */\n    int left_phase = 0;\n    int right_phase = 0;\n    int left_inc = 1;\n    int right_inc = 3; /* higher pitch so we can distinguish left and right. */\n    int i, j, k;\n    int bufferCount;\n\n    printf(\"PortAudio Test: output sine wave. SR = %d, BufSize = %d\\n\", SAMPLE_RATE, FRAMES_PER_BUFFER);\n\n    /* initialise sinusoidal wavetable */\n    for( i=0; i<TABLE_SIZE; i++ )\n    {\n        sine[i] = (float) sin( ((double)i/(double)TABLE_SIZE) * M_PI * 2. );\n    }\n\n\n    err = Pa_Initialize();\n    if( err != paNoError ) goto error;\n\n    outputParameters.device = Pa_GetDefaultOutputDevice(); /* default output device */\n    if (outputParameters.device == paNoDevice) {\n        fprintf(stderr,\"Error: No default output device.\\n\");\n        goto error;\n    }\n    outputParameters.channelCount = 2;       /* stereo output */\n    outputParameters.sampleFormat = paFloat32; /* 32 bit floating point output */\n    outputParameters.suggestedLatency = 0.050; // Pa_GetDeviceInfo( outputParameters.device )->defaultLowOutputLatency;\n    outputParameters.hostApiSpecificStreamInfo = NULL;\n\n    err = Pa_OpenStream(\n              &stream,\n              NULL, /* no input */\n              &outputParameters,\n              SAMPLE_RATE,\n              FRAMES_PER_BUFFER,\n              paClipOff,      /* we won't output out of range samples so don't bother clipping them */\n              NULL, /* no callback, use blocking API */\n              NULL ); /* no callback, so no callback userData */\n    if( err != paNoError ) goto error;\n\n\n    printf( \"Play 3 times, higher each time.\\n\" );\n\n    for( k=0; k < 3; ++k )\n    {\n        err = Pa_StartStream( stream );\n        if( err != paNoError ) goto error;\n\n        printf(\"Play for %d seconds.\\n\", NUM_SECONDS );\n\n        bufferCount = ((NUM_SECONDS * SAMPLE_RATE) / FRAMES_PER_BUFFER);\n\n        for( i=0; i < bufferCount; i++ )\n        {\n            for( j=0; j < FRAMES_PER_BUFFER; j++ )\n            {\n                buffer[j][0] = sine[left_phase];  /* left */\n                buffer[j][1] = sine[right_phase];  /* right */\n                left_phase += left_inc;\n                if( left_phase >= TABLE_SIZE ) left_phase -= TABLE_SIZE;\n                right_phase += right_inc;\n                if( right_phase >= TABLE_SIZE ) right_phase -= TABLE_SIZE;\n            }\n\n            err = Pa_WriteStream( stream, buffer, FRAMES_PER_BUFFER );\n            if( err != paNoError ) goto error;\n        }\n\n        err = Pa_StopStream( stream );\n        if( err != paNoError ) goto error;\n\n        ++left_inc;\n        ++right_inc;\n\n        Pa_Sleep( 1000 );\n    }\n\n    err = Pa_CloseStream( stream );\n    if( err != paNoError ) goto error;\n\n    Pa_Terminate();\n    printf(\"Test finished.\\n\");\n\n    return err;\n\nerror:\n    fprintf( stderr, \"An error occurred while using the portaudio stream\\n\" );\n    fprintf( stderr, \"Error number: %d\\n\", err );\n    fprintf( stderr, \"Error message: %s\\n\", Pa_GetErrorText( err ) );\n    // Print more information about the error.\n    if( err == paUnanticipatedHostError )\n    {\n        const PaHostErrorInfo *hostErrorInfo = Pa_GetLastHostErrorInfo();\n        fprintf( stderr, \"Host API error = #%ld, hostApiType = %d\\n\", hostErrorInfo->errorCode, hostErrorInfo->hostApiType );\n        fprintf( stderr, \"Host API error = %s\\n\", hostErrorInfo->errorText );\n    }\n    Pa_Terminate();\n    return err;\n}\n"
  },
  {
    "path": "thirdparty/portaudio/examples/paex_write_sine_nonint.c",
    "content": "/** @file paex_write_sine_nonint.c\n    @ingroup examples_src\n    @brief Play a non-interleaved sine wave using the blocking API (Pa_WriteStream())\n    @author Ross Bencina <rossb@audiomulch.com>\n    @author Phil Burk <philburk@softsynth.com>\n*/\n/*\n * $Id: patest_write_sine.c 1368 2008-03-01 00:38:27Z rossb $\n *\n * This program uses the PortAudio Portable Audio Library.\n * For more information see: http://www.portaudio.com/\n * Copyright (c) 1999-2000 Ross Bencina and Phil Burk\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n#include <stdio.h>\n#include <math.h>\n#include \"portaudio.h\"\n\n#define NUM_SECONDS         (5)\n#define SAMPLE_RATE         (44100)\n#define FRAMES_PER_BUFFER   (1024)\n\n#ifndef M_PI\n#define M_PI  (3.14159265)\n#endif\n\n#define TABLE_SIZE   (200)\n\n\nint main(void);\nint main(void)\n{\n    PaStreamParameters outputParameters;\n    PaStream *stream;\n    PaError err;\n\n    float leftBuffer[FRAMES_PER_BUFFER];\n    float rightBuffer[FRAMES_PER_BUFFER];\n    void *buffers[2]; /* points to both non-interleaved buffers. */\n\n    float sine[TABLE_SIZE]; /* sine wavetable */\n    int left_phase = 0;\n    int right_phase = 0;\n    int left_inc = 1;\n    int right_inc = 3; /* higher pitch so we can distinguish left and right. */\n    int i, j, k;\n    int bufferCount;\n\n\n    printf(\"PortAudio Test: output sine wave NON-INTERLEAVED. SR = %d, BufSize = %d\\n\", SAMPLE_RATE, FRAMES_PER_BUFFER);\n\n    /* initialise sinusoidal wavetable */\n    for( i=0; i<TABLE_SIZE; i++ )\n    {\n        sine[i] = (float) sin( ((double)i/(double)TABLE_SIZE) * M_PI * 2. );\n    }\n\n\n    err = Pa_Initialize();\n    if( err != paNoError ) goto error;\n\n    outputParameters.device = Pa_GetDefaultOutputDevice(); /* default output device */\n    if (outputParameters.device == paNoDevice) {\n        fprintf(stderr,\"Error: No default output device.\\n\");\n        goto error;\n    }\n    outputParameters.channelCount = 2;       /* stereo output */\n    outputParameters.sampleFormat = paFloat32 | paNonInterleaved; /* 32 bit floating point output NON-INTERLEAVED */\n    outputParameters.suggestedLatency = Pa_GetDeviceInfo( outputParameters.device )->defaultLowOutputLatency;\n    outputParameters.hostApiSpecificStreamInfo = NULL;\n\n    err = Pa_OpenStream(\n              &stream,\n              NULL, /* no input */\n              &outputParameters,\n              SAMPLE_RATE,\n              FRAMES_PER_BUFFER,\n              paClipOff,      /* we won't output out of range samples so don't bother clipping them */\n              NULL, /* no callback, use blocking API */\n              NULL ); /* no callback, so no callback userData */\n    if( err != paNoError ) goto error;\n\n\n    printf( \"Play 3 times, higher each time.\\n\" );\n\n    /* Set up array of buffer pointers for Pa_WriteStream */\n    buffers[0] = leftBuffer;\n    buffers[1] = rightBuffer;\n\n    for( k=0; k < 3; ++k )\n    {\n        err = Pa_StartStream( stream );\n        if( err != paNoError ) goto error;\n\n        printf(\"Play for %d seconds.\\n\", NUM_SECONDS );\n\n        bufferCount = ((NUM_SECONDS * SAMPLE_RATE) / FRAMES_PER_BUFFER);\n\n        for( i=0; i < bufferCount; i++ )\n        {\n            for( j=0; j < FRAMES_PER_BUFFER; j++ )\n            {\n                leftBuffer[j] = sine[left_phase];  /* left */\n                rightBuffer[j] = sine[right_phase];  /* right */\n                left_phase += left_inc;\n                if( left_phase >= TABLE_SIZE ) left_phase -= TABLE_SIZE;\n                right_phase += right_inc;\n                if( right_phase >= TABLE_SIZE ) right_phase -= TABLE_SIZE;\n            }\n\n            err = Pa_WriteStream( stream, buffers, FRAMES_PER_BUFFER );\n            if( err != paNoError ) goto error;\n        }\n\n        err = Pa_StopStream( stream );\n        if( err != paNoError ) goto error;\n\n        ++left_inc;\n        ++right_inc;\n\n        Pa_Sleep( 1000 );\n    }\n\n    err = Pa_CloseStream( stream );\n    if( err != paNoError ) goto error;\n\n    Pa_Terminate();\n    printf(\"Test finished.\\n\");\n\n    return err;\nerror:\n    Pa_Terminate();\n    fprintf( stderr, \"An error occurred while using the portaudio stream\\n\" );\n    fprintf( stderr, \"Error number: %d\\n\", err );\n    fprintf( stderr, \"Error message: %s\\n\", Pa_GetErrorText( err ) );\n    return err;\n}\n"
  },
  {
    "path": "thirdparty/portaudio/i686-w64-mingw32.cmake",
    "content": "# CMake Toolchain file for cross-compiling PortAudio to i686-w64-mingw32\n# Inspired from: https://gitlab.kitware.com/cmake/community/-/wikis/doc/cmake/cross_compiling/Mingw\n# Example usage: $ cmake -DCMAKE_TOOLCHAIN_FILE=i686-w64-mingw32.cmake .\n# i686-w64-mingw32 needs to be installed for this to work. On Debian-based\n# distributions the package is typically named `mingw-w64`.\n\nSET(CMAKE_SYSTEM_NAME Windows)\n\nSET(CMAKE_C_COMPILER i686-w64-mingw32-gcc)\nSET(CMAKE_CXX_COMPILER i686-w64-mingw32-g++)\nSET(CMAKE_RC_COMPILER i686-w64-mingw32-windres)\n\nSET(CMAKE_FIND_ROOT_PATH /usr/i686-w64-mingw32)\n\nset(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)\nset(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)\nset(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)\n"
  },
  {
    "path": "thirdparty/portaudio/include/pa_asio.h",
    "content": "#ifndef PA_ASIO_H\n#define PA_ASIO_H\n/*\n * $Id$\n * PortAudio Portable Real-Time Audio Library\n * ASIO specific extensions\n *\n * Copyright (c) 1999-2000 Ross Bencina and Phil Burk\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n\n/** @file\n @ingroup public_header\n @brief ASIO-specific PortAudio API extension header file.\n*/\n\n#include \"portaudio.h\"\n\n#ifdef __cplusplus\nextern \"C\"\n{\n#endif /* __cplusplus */\n\n\n/** Retrieve legal native buffer sizes for the specified device, in sample frames.\n\n @param device The global index of the device about which the query is being made.\n @param minBufferSizeFrames A pointer to the location which will receive the minimum buffer size value.\n @param maxBufferSizeFrames A pointer to the location which will receive the maximum buffer size value.\n @param preferredBufferSizeFrames A pointer to the location which will receive the preferred buffer size value.\n @param granularity A pointer to the location which will receive the \"granularity\". This value determines\n the step size used to compute the legal values between minBufferSizeFrames and maxBufferSizeFrames.\n If granularity is -1 then available buffer size values are powers of two.\n\n @see ASIOGetBufferSize in the ASIO SDK.\n\n @note: this function used to be called PaAsio_GetAvailableLatencyValues. There is a\n #define that maps PaAsio_GetAvailableLatencyValues to this function for backwards compatibility.\n*/\nPaError PaAsio_GetAvailableBufferSizes( PaDeviceIndex device,\n        long *minBufferSizeFrames, long *maxBufferSizeFrames, long *preferredBufferSizeFrames, long *granularity );\n\n\n/** Backwards compatibility alias for PaAsio_GetAvailableBufferSizes\n\n @see PaAsio_GetAvailableBufferSizes\n*/\n#define PaAsio_GetAvailableLatencyValues PaAsio_GetAvailableBufferSizes\n\n\n/** Display the ASIO control panel for the specified device.\n\n  @param device The global index of the device whose control panel is to be displayed.\n  @param systemSpecific On Windows, the calling application's main window handle,\n  on Macintosh this value should be zero.\n*/\nPaError PaAsio_ShowControlPanel( PaDeviceIndex device, void* systemSpecific );\n\n\n\n\n/** Retrieve a pointer to a string containing the name of the specified\n input channel. The string is valid until Pa_Terminate is called.\n\n The string will be no longer than 32 characters including the null terminator.\n*/\nPaError PaAsio_GetInputChannelName( PaDeviceIndex device, int channelIndex,\n        const char** channelName );\n\n\n/** Retrieve a pointer to a string containing the name of the specified\n input channel. The string is valid until Pa_Terminate is called.\n\n The string will be no longer than 32 characters including the null terminator.\n*/\nPaError PaAsio_GetOutputChannelName( PaDeviceIndex device, int channelIndex,\n        const char** channelName );\n\n\n/** Set the sample rate of an open paASIO stream.\n\n @param stream The stream to operate on.\n @param sampleRate The new sample rate.\n\n Note that this function may fail if the stream is already running and the\n ASIO driver does not support switching the sample rate of a running stream.\n\n Returns paIncompatibleStreamHostApi if stream is not a paASIO stream.\n*/\nPaError PaAsio_SetStreamSampleRate( PaStream* stream, double sampleRate );\n\n\n#define paAsioUseChannelSelectors      (0x01)\n\ntypedef struct PaAsioStreamInfo{\n    unsigned long size;             /**< sizeof(PaAsioStreamInfo) */\n    PaHostApiTypeId hostApiType;    /**< paASIO */\n    unsigned long version;          /**< 1 */\n\n    unsigned long flags;\n\n    /* Support for opening only specific channels of an ASIO device.\n        If the paAsioUseChannelSelectors flag is set, channelSelectors is a\n        pointer to an array of integers specifying the device channels to use.\n        When used, the length of the channelSelectors array must match the\n        corresponding channelCount parameter to Pa_OpenStream() otherwise a\n        crash may result.\n        The values in the selectors array must specify channels within the\n        range of supported channels for the device or paInvalidChannelCount will\n        result.\n    */\n    int *channelSelectors;\n}PaAsioStreamInfo;\n\n\n#ifdef __cplusplus\n}\n#endif /* __cplusplus */\n\n#endif /* PA_ASIO_H */\n"
  },
  {
    "path": "thirdparty/portaudio/include/pa_jack.h",
    "content": "#ifndef PA_JACK_H\n#define PA_JACK_H\n\n/*\n * $Id:\n * PortAudio Portable Real-Time Audio Library\n * JACK-specific extensions\n *\n * Copyright (c) 1999-2000 Ross Bencina and Phil Burk\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n/** @file\n *  @ingroup public_header\n *  @brief JACK-specific PortAudio API extension header file.\n */\n\n#include \"portaudio.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/** Set the JACK client name.\n *\n * During Pa_Initialize, When PA JACK connects as a client of the JACK server, it requests a certain\n * name, which is for instance prepended to port names. By default this name is \"PortAudio\". The\n * JACK server may append a suffix to the client name, in order to avoid clashes among clients that\n * try to connect with the same name (e.g., different PA JACK clients).\n *\n * This function must be called before Pa_Initialize, otherwise it won't have any effect. Note that\n * the string is not copied, but instead referenced directly, so it must not be freed for as long as\n * PA might need it.\n * @sa PaJack_GetClientName\n */\nPaError PaJack_SetClientName( const char* name );\n\n/** Get the JACK client name used by PA JACK.\n *\n * The caller is responsible for freeing the returned pointer.\n */\nPaError PaJack_GetClientName(const char** clientName);\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif\n"
  },
  {
    "path": "thirdparty/portaudio/include/pa_linux_alsa.h",
    "content": "#ifndef PA_LINUX_ALSA_H\n#define PA_LINUX_ALSA_H\n\n/*\n * $Id$\n * PortAudio Portable Real-Time Audio Library\n * ALSA-specific extensions\n *\n * Copyright (c) 1999-2000 Ross Bencina and Phil Burk\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n/** @file\n *  @ingroup public_header\n *  @brief ALSA-specific PortAudio API extension header file.\n */\n\n#include \"portaudio.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\ntypedef struct PaAlsaStreamInfo\n{\n    unsigned long size;\n    PaHostApiTypeId hostApiType;\n    unsigned long version;\n\n    const char *deviceString;\n}\nPaAlsaStreamInfo;\n\n/** Initialize host API specific structure, call this before setting relevant attributes. */\nvoid PaAlsa_InitializeStreamInfo( PaAlsaStreamInfo *info );\n\n/** Instruct whether to enable real-time priority when starting the audio thread.\n *\n * If this is turned on by the stream is started, the audio callback thread will be created\n * with the FIFO scheduling policy, which is suitable for realtime operation.\n **/\nvoid PaAlsa_EnableRealtimeScheduling( PaStream *s, int enable );\n\n#if 0\nvoid PaAlsa_EnableWatchdog( PaStream *s, int enable );\n#endif\n\n/** Get the ALSA-lib card index of this stream's input device. */\nPaError PaAlsa_GetStreamInputCard( PaStream *s, int *card );\n\n/** Get the ALSA-lib card index of this stream's output device. */\nPaError PaAlsa_GetStreamOutputCard( PaStream *s, int *card );\n\n/** Set the number of periods (buffer fragments) to configure devices with.\n *\n * By default the number of periods is 4, this is the lowest number of periods that works well on\n * the author's soundcard.\n * @param numPeriods The number of periods.\n */\nPaError PaAlsa_SetNumPeriods( int numPeriods );\n\n/** Set the maximum number of times to retry opening busy device (sleeping for a\n * short interval inbetween).\n */\nPaError PaAlsa_SetRetriesBusy( int retries );\n\n/** Set the path and name of ALSA library file if PortAudio is configured to load it dynamically (see\n *  PA_ALSA_DYNAMIC). This setting will overwrite the default name set by PA_ALSA_PATHNAME define.\n * @param pathName Full path with filename. Only filename can be used, but dlopen() will lookup default\n *                 searchable directories (/usr/lib;/usr/local/lib) then.\n */\nvoid PaAlsa_SetLibraryPathName( const char *pathName );\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif\n"
  },
  {
    "path": "thirdparty/portaudio/include/pa_mac_core.h",
    "content": "#ifndef PA_MAC_CORE_H\n#define PA_MAC_CORE_H\n/*\n * PortAudio Portable Real-Time Audio Library\n * Macintosh Core Audio specific extensions\n * portaudio.h should be included before this file.\n *\n * Copyright (c) 2005-2006 Bjorn Roche\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n/** @file\n *  @ingroup public_header\n *  @brief CoreAudio-specific PortAudio API extension header file.\n */\n\n#include \"portaudio.h\"\n\n#include <AudioUnit/AudioUnit.h>\n#include <AudioToolbox/AudioToolbox.h>\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n\n/**\n * A pointer to a paMacCoreStreamInfo may be passed as\n * the hostApiSpecificStreamInfo in the PaStreamParameters struct\n * when opening a stream or querying the format. Use NULL, for the\n * defaults. Note that for duplex streams, flags for input and output\n * should be the same or behaviour is undefined.\n */\ntypedef struct\n{\n    unsigned long size;           /**size of whole structure including this header */\n    PaHostApiTypeId hostApiType;  /**host API for which this data is intended */\n    unsigned long version;        /**structure version */\n    unsigned long flags;          /** flags to modify behaviour */\n    SInt32 const * channelMap;    /** Channel map for HAL channel mapping , if not needed, use NULL;*/\n    unsigned long channelMapSize; /** Channel map size for HAL channel mapping , if not needed, use 0;*/\n} PaMacCoreStreamInfo;\n\n/**\n * Functions\n */\n\n\n/** Use this function to initialize a paMacCoreStreamInfo struct\n * using the requested flags. Note that channel mapping is turned\n * off after a call to this function.\n * @param data The datastructure to initialize\n * @param flags The flags to initialize the datastructure with.\n*/\nvoid PaMacCore_SetupStreamInfo( PaMacCoreStreamInfo *data, unsigned long flags );\n\n/** call this after pa_SetupMacCoreStreamInfo to use channel mapping as described in notes.txt.\n * @param data The stream info structure to assign a channel mapping to\n * @param channelMap The channel map array, as described in notes.txt. This array pointer will be used directly (ie the underlying data will not be copied), so the caller should not free the array until after the stream has been opened.\n * @param channelMapSize The size of the channel map array.\n */\nvoid PaMacCore_SetupChannelMap( PaMacCoreStreamInfo *data, const SInt32 * const channelMap, unsigned long channelMapSize );\n\n/**\n * Retrieve the AudioDeviceID of the input device assigned to an open stream\n *\n * @param s The stream to query.\n *\n * @return A valid AudioDeviceID, or NULL if an error occurred.\n */\nAudioDeviceID PaMacCore_GetStreamInputDevice( PaStream* s );\n\n/**\n * Retrieve the AudioDeviceID of the output device assigned to an open stream\n *\n * @param s The stream to query.\n *\n * @return A valid AudioDeviceID, or NULL if an error occurred.\n */\nAudioDeviceID PaMacCore_GetStreamOutputDevice( PaStream* s );\n\n/**\n * Returns a statically allocated string with the device's name\n * for the given channel. NULL will be returned on failure.\n *\n * This function's implementation is not complete!\n *\n * @param device The PortAudio device index.\n * @param channel The channel number who's name is requested.\n * @return a statically allocated string with the name of the device.\n *         Because this string is statically allocated, it must be\n *         copied if it is to be saved and used by the user after\n *         another call to this function.\n *\n */\nconst char *PaMacCore_GetChannelName( int device, int channelIndex, bool input );\n\n\n/** Retrieve the range of legal native buffer sizes for the specified device, in sample frames.\n\n @param device The global index of the PortAudio device about which the query is being made.\n @param minBufferSizeFrames A pointer to the location which will receive the minimum buffer size value.\n @param maxBufferSizeFrames A pointer to the location which will receive the maximum buffer size value.\n\n @see kAudioDevicePropertyBufferFrameSizeRange in the CoreAudio SDK.\n */\nPaError PaMacCore_GetBufferSizeRange( PaDeviceIndex device,\n                                       long *minBufferSizeFrames, long *maxBufferSizeFrames );\n\n\n/**\n * Flags\n */\n\n/**\n * The following flags alter the behaviour of PA on the mac platform.\n * they can be ORed together. These should work both for opening and\n * checking a device.\n */\n\n/** Allows PortAudio to change things like the device's frame size,\n * which allows for much lower latency, but might disrupt the device\n * if other programs are using it, even when you are just Querying\n * the device. */\n#define paMacCoreChangeDeviceParameters (0x01)\n\n/** In combination with the above flag,\n * causes the stream opening to fail, unless the exact sample rates\n * are supported by the device. */\n#define paMacCoreFailIfConversionRequired (0x02)\n\n/** These flags set the SR conversion quality, if required. The weird ordering\n * allows Maximum Quality to be the default.*/\n#define paMacCoreConversionQualityMin    (0x0100)\n#define paMacCoreConversionQualityMedium (0x0200)\n#define paMacCoreConversionQualityLow    (0x0300)\n#define paMacCoreConversionQualityHigh   (0x0400)\n#define paMacCoreConversionQualityMax    (0x0000)\n\n/**\n * Here are some \"preset\" combinations of flags (above) to get to some\n * common configurations. THIS IS OVERKILL, but if more flags are added\n * it won't be.\n */\n\n/**This is the default setting: do as much sample rate conversion as possible\n * and as little mucking with the device as possible. */\n#define paMacCorePlayNice                    (0x00)\n/**This setting is tuned for pro audio apps. It allows SR conversion on input\n  and output, but it tries to set the appropriate SR on the device.*/\n#define paMacCorePro                         (0x01)\n/**This is a setting to minimize CPU usage and still play nice.*/\n#define paMacCoreMinimizeCPUButPlayNice      (0x0100)\n/**This is a setting to minimize CPU usage, even if that means interrupting the device. */\n#define paMacCoreMinimizeCPU                 (0x0101)\n\n\n#ifdef __cplusplus\n}\n#endif /** __cplusplus */\n\n#endif /** PA_MAC_CORE_H */\n"
  },
  {
    "path": "thirdparty/portaudio/include/pa_win_ds.h",
    "content": "#ifndef PA_WIN_DS_H\n#define PA_WIN_DS_H\n/*\n * $Id:  $\n * PortAudio Portable Real-Time Audio Library\n * DirectSound specific extensions\n *\n * Copyright (c) 1999-2007 Ross Bencina and Phil Burk\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n/** @file\n @ingroup public_header\n @brief DirectSound-specific PortAudio API extension header file.\n*/\n\n#include \"portaudio.h\"\n#include \"pa_win_waveformat.h\"\n\n#ifdef __cplusplus\nextern \"C\"\n{\n#endif /* __cplusplus */\n\n\n#define paWinDirectSoundUseLowLevelLatencyParameters            (0x01)\n#define paWinDirectSoundUseChannelMask                          (0x04)\n\n\ntypedef struct PaWinDirectSoundStreamInfo{\n    unsigned long size;             /**< sizeof(PaWinDirectSoundStreamInfo) */\n    PaHostApiTypeId hostApiType;    /**< paDirectSound */\n    unsigned long version;          /**< 2 */\n\n    unsigned long flags;            /**< enable other features of this struct */\n\n    /**\n       low-level latency setting support\n       Sets the size of the DirectSound host buffer.\n       When flags contains the paWinDirectSoundUseLowLevelLatencyParameters\n       this size will be used instead of interpreting the generic latency\n       parameters to Pa_OpenStream(). If the flag is not set this value is ignored.\n\n       If the stream is a full duplex stream the implementation requires that\n       the values of framesPerBuffer for input and output match (if both are specified).\n    */\n    unsigned long framesPerBuffer;\n\n    /**\n        support for WAVEFORMATEXTENSIBLE channel masks. If flags contains\n        paWinDirectSoundUseChannelMask this allows you to specify which speakers\n        to address in a multichannel stream. Constants for channelMask\n        are specified in pa_win_waveformat.h\n\n    */\n    PaWinWaveFormatChannelMask channelMask;\n\n}PaWinDirectSoundStreamInfo;\n\n\n\n#ifdef __cplusplus\n}\n#endif /* __cplusplus */\n\n#endif /* PA_WIN_DS_H */\n"
  },
  {
    "path": "thirdparty/portaudio/include/pa_win_wasapi.h",
    "content": "#ifndef PA_WIN_WASAPI_H\n#define PA_WIN_WASAPI_H\n/*\n * $Id:  $\n * PortAudio Portable Real-Time Audio Library\n * WASAPI specific extensions\n *\n * Copyright (c) 1999-2018 Ross Bencina and Phil Burk\n * Copyright (c) 2006-2010 David Viens\n * Copyright (c) 2010-2018 Dmitry Kostjuchenko\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n/** @file\n @ingroup public_header\n @brief WASAPI-specific PortAudio API extension header file.\n*/\n\n#include \"portaudio.h\"\n#include \"pa_win_waveformat.h\"\n\n#ifdef __cplusplus\nextern \"C\"\n{\n#endif /* __cplusplus */\n\n\n/* Stream setup flags. */\ntypedef enum PaWasapiFlags\n{\n    /* put WASAPI into exclusive mode */\n    paWinWasapiExclusive                = (1 << 0),\n\n    /* allow to skip internal PA processing completely */\n    paWinWasapiRedirectHostProcessor    = (1 << 1),\n\n    /* assign custom channel mask */\n    paWinWasapiUseChannelMask           = (1 << 2),\n\n    /* select non-Event driven method of data read/write\n       Note: WASAPI Event driven core is capable of 2ms latency!!!, but Polling\n             method can only provide 15-20ms latency. */\n    paWinWasapiPolling                  = (1 << 3),\n\n    /* force custom thread priority setting, must be used if PaWasapiStreamInfo::threadPriority\n       is set to a custom value */\n    paWinWasapiThreadPriority           = (1 << 4),\n\n    /* force explicit sample format and do not allow PA to select suitable working format, API will\n       fail if provided sample format is not supported by audio hardware in Exclusive mode\n       or system mixer in Shared mode */\n    paWinWasapiExplicitSampleFormat     = (1 << 5),\n\n    /* allow API to insert system-level channel matrix mixer and sample rate converter to allow\n       playback formats that do not match the current configured system settings.\n       this is in particular required for streams not matching the system mixer sample rate.\n       only applies in Shared mode. */\n    paWinWasapiAutoConvert              = (1 << 6)\n}\nPaWasapiFlags;\n#define paWinWasapiExclusive             (paWinWasapiExclusive)\n#define paWinWasapiRedirectHostProcessor (paWinWasapiRedirectHostProcessor)\n#define paWinWasapiUseChannelMask        (paWinWasapiUseChannelMask)\n#define paWinWasapiPolling               (paWinWasapiPolling)\n#define paWinWasapiThreadPriority        (paWinWasapiThreadPriority)\n#define paWinWasapiExplicitSampleFormat  (paWinWasapiExplicitSampleFormat)\n#define paWinWasapiAutoConvert           (paWinWasapiAutoConvert)\n\n\n/* Stream state.\n\n @note Multiple states can be united into a bitmask.\n @see  PaWasapiStreamStateCallback, PaWasapi_SetStreamStateHandler\n*/\ntypedef enum PaWasapiStreamState\n{\n    /* state change was caused by the error:\n\n       Example:\n       1) If thread execution stopped due to AUDCLNT_E_RESOURCES_INVALIDATED then state\n          value will contain paWasapiStreamStateError|paWasapiStreamStateThreadStop.\n    */\n    paWasapiStreamStateError         = (1 << 0),\n\n    /* processing thread is preparing to start execution */\n    paWasapiStreamStateThreadPrepare = (1 << 1),\n\n    /* processing thread started execution (enters its loop) */\n    paWasapiStreamStateThreadStart   = (1 << 2),\n\n    /* processing thread stopped execution */\n    paWasapiStreamStateThreadStop    = (1 << 3)\n}\nPaWasapiStreamState;\n#define paWasapiStreamStateError         (paWasapiStreamStateError)\n#define paWasapiStreamStateThreadPrepare (paWasapiStreamStateThreadPrepare)\n#define paWasapiStreamStateThreadStart   (paWasapiStreamStateThreadStart)\n#define paWasapiStreamStateThreadStop    (paWasapiStreamStateThreadStop)\n\n\n/* Host processor.\n\n   Allows to skip internal PA processing completely. paWinWasapiRedirectHostProcessor flag\n   must be set to the PaWasapiStreamInfo::flags member in order to have host processor\n   redirected to this callback.\n\n   Use with caution! inputFrames and outputFrames depend solely on final device setup.\n   To query max values of inputFrames/outputFrames use PaWasapi_GetFramesPerHostBuffer.\n*/\ntypedef void (*PaWasapiHostProcessorCallback) (void *inputBuffer, long inputFrames,\n    void *outputBuffer, long outputFrames, void *userData);\n\n\n/* Stream state handler.\n\n @param pStream    Pointer to PaStream object.\n @param stateFlags State flags, a collection of values from PaWasapiStreamState enum.\n @param errorId    Error id provided by system API (HRESULT).\n @param userData   Pointer to user data.\n\n @see   PaWasapiStreamState\n*/\ntypedef void (*PaWasapiStreamStateCallback) (PaStream *pStream, unsigned int stateFlags,\n    unsigned int errorId, void *pUserData);\n\n\n/* Device role. */\ntypedef enum PaWasapiDeviceRole\n{\n    eRoleRemoteNetworkDevice = 0,\n    eRoleSpeakers,\n    eRoleLineLevel,\n    eRoleHeadphones,\n    eRoleMicrophone,\n    eRoleHeadset,\n    eRoleHandset,\n    eRoleUnknownDigitalPassthrough,\n    eRoleSPDIF,\n    eRoleHDMI,\n    eRoleUnknownFormFactor\n}\nPaWasapiDeviceRole;\n\n\n/* Jack connection type. */\ntypedef enum PaWasapiJackConnectionType\n{\n    eJackConnTypeUnknown,\n    eJackConnType3Point5mm,\n    eJackConnTypeQuarter,\n    eJackConnTypeAtapiInternal,\n    eJackConnTypeRCA,\n    eJackConnTypeOptical,\n    eJackConnTypeOtherDigital,\n    eJackConnTypeOtherAnalog,\n    eJackConnTypeMultichannelAnalogDIN,\n    eJackConnTypeXlrProfessional,\n    eJackConnTypeRJ11Modem,\n    eJackConnTypeCombination\n}\nPaWasapiJackConnectionType;\n\n\n/* Jack geometric location. */\ntypedef enum PaWasapiJackGeoLocation\n{\n    eJackGeoLocUnk = 0,\n    eJackGeoLocRear = 0x1, /* matches EPcxGeoLocation::eGeoLocRear */\n    eJackGeoLocFront,\n    eJackGeoLocLeft,\n    eJackGeoLocRight,\n    eJackGeoLocTop,\n    eJackGeoLocBottom,\n    eJackGeoLocRearPanel,\n    eJackGeoLocRiser,\n    eJackGeoLocInsideMobileLid,\n    eJackGeoLocDrivebay,\n    eJackGeoLocHDMI,\n    eJackGeoLocOutsideMobileLid,\n    eJackGeoLocATAPI,\n    eJackGeoLocReserved5,\n    eJackGeoLocReserved6,\n}\nPaWasapiJackGeoLocation;\n\n\n/* Jack general location. */\ntypedef enum PaWasapiJackGenLocation\n{\n    eJackGenLocPrimaryBox = 0,\n    eJackGenLocInternal,\n    eJackGenLocSeparate,\n    eJackGenLocOther\n}\nPaWasapiJackGenLocation;\n\n\n/* Jack's type of port. */\ntypedef enum PaWasapiJackPortConnection\n{\n    eJackPortConnJack = 0,\n    eJackPortConnIntegratedDevice,\n    eJackPortConnBothIntegratedAndJack,\n    eJackPortConnUnknown\n}\nPaWasapiJackPortConnection;\n\n\n/* Thread priority. */\ntypedef enum PaWasapiThreadPriority\n{\n    eThreadPriorityNone = 0,\n    eThreadPriorityAudio,           //!< Default for Shared mode.\n    eThreadPriorityCapture,\n    eThreadPriorityDistribution,\n    eThreadPriorityGames,\n    eThreadPriorityPlayback,\n    eThreadPriorityProAudio,        //!< Default for Exclusive mode.\n    eThreadPriorityWindowManager\n}\nPaWasapiThreadPriority;\n\n\n/* Stream descriptor. */\ntypedef struct PaWasapiJackDescription\n{\n    unsigned long              channelMapping;\n    unsigned long              color; /* derived from macro: #define RGB(r,g,b) ((COLORREF)(((BYTE)(r)|((WORD)((BYTE)(g))<<8))|(((DWORD)(BYTE)(b))<<16))) */\n    PaWasapiJackConnectionType connectionType;\n    PaWasapiJackGeoLocation    geoLocation;\n    PaWasapiJackGenLocation    genLocation;\n    PaWasapiJackPortConnection portConnection;\n    unsigned int               isConnected;\n}\nPaWasapiJackDescription;\n\n\n/** Stream category.\n   Note:\n    - values are equal to WASAPI AUDIO_STREAM_CATEGORY enum\n    - supported since Windows 8.0, noop on earlier versions\n    - values 1,2 are deprecated on Windows 10 and not included into enumeration\n\n @version Available as of 19.6.0\n*/\ntypedef enum PaWasapiStreamCategory\n{\n    eAudioCategoryOther           = 0,\n    eAudioCategoryCommunications  = 3,\n    eAudioCategoryAlerts          = 4,\n    eAudioCategorySoundEffects    = 5,\n    eAudioCategoryGameEffects     = 6,\n    eAudioCategoryGameMedia       = 7,\n    eAudioCategoryGameChat        = 8,\n    eAudioCategorySpeech          = 9,\n    eAudioCategoryMovie           = 10,\n    eAudioCategoryMedia           = 11\n}\nPaWasapiStreamCategory;\n\n\n/** Stream option.\n   Note:\n    - values are equal to WASAPI AUDCLNT_STREAMOPTIONS enum\n    - supported since Windows 8.1, noop on earlier versions\n\n @version Available as of 19.6.0\n*/\ntypedef enum PaWasapiStreamOption\n{\n    eStreamOptionNone        = 0, //!< default\n    eStreamOptionRaw         = 1, //!< bypass WASAPI Audio Engine DSP effects, supported since Windows 8.1\n    eStreamOptionMatchFormat = 2  //!< force WASAPI Audio Engine into a stream format, supported since Windows 10\n}\nPaWasapiStreamOption;\n\n\n/* Stream descriptor. */\ntypedef struct PaWasapiStreamInfo\n{\n    unsigned long size;             /**< sizeof(PaWasapiStreamInfo) */\n    PaHostApiTypeId hostApiType;    /**< paWASAPI */\n    unsigned long version;          /**< 1 */\n\n    unsigned long flags;            /**< collection of PaWasapiFlags */\n\n    /** Support for WAVEFORMATEXTENSIBLE channel masks. If flags contains\n       paWinWasapiUseChannelMask this allows you to specify which speakers\n       to address in a multichannel stream. Constants for channelMask\n       are specified in pa_win_waveformat.h. Will be used only if\n       paWinWasapiUseChannelMask flag is specified.\n    */\n    PaWinWaveFormatChannelMask channelMask;\n\n    /** Delivers raw data to callback obtained from GetBuffer() methods skipping\n       internal PortAudio processing inventory completely. userData parameter will\n       be the same that was passed to Pa_OpenStream method. Will be used only if\n       paWinWasapiRedirectHostProcessor flag is specified.\n    */\n    PaWasapiHostProcessorCallback hostProcessorOutput;\n    PaWasapiHostProcessorCallback hostProcessorInput;\n\n    /** Specifies thread priority explicitly. Will be used only if paWinWasapiThreadPriority flag\n       is specified.\n\n       Please note, if Input/Output streams are opened simultaneously (Full-Duplex mode)\n       you shall specify same value for threadPriority or othervise one of the values will be used\n       to setup thread priority.\n    */\n    PaWasapiThreadPriority threadPriority;\n\n    /** Stream category.\n     @see PaWasapiStreamCategory\n     @version Available as of 19.6.0\n    */\n    PaWasapiStreamCategory streamCategory;\n\n    /** Stream option.\n     @see PaWasapiStreamOption\n     @version Available as of 19.6.0\n    */\n    PaWasapiStreamOption streamOption;\n}\nPaWasapiStreamInfo;\n\n\n/** Returns pointer to WASAPI's IAudioClient object of the stream.\n\n @param pStream      Pointer to PaStream object.\n @param pAudioClient Pointer to pointer of IAudioClient.\n @param bOutput      TRUE (1) for output stream, FALSE (0) for input stream.\n\n @return Error code indicating success or failure.\n*/\nPaError PaWasapi_GetAudioClient( PaStream *pStream, void **pAudioClient, int bOutput );\n\n\n/** Update device list.\n\n    This function is available if PA_WASAPI_MAX_CONST_DEVICE_COUNT is defined during compile time\n    with maximum constant WASAPI device count (recommended value - 32).\n    If PA_WASAPI_MAX_CONST_DEVICE_COUNT is set to 0 (or not defined) during compile time the implementation\n    will not define PaWasapi_UpdateDeviceList() and thus updating device list can only be possible by calling\n    Pa_Terminate() and then Pa_Initialize().\n\n @return Error code indicating success or failure.\n*/\nPaError PaWasapi_UpdateDeviceList();\n\n\n/** Get current audio format of the device assigned to the opened stream.\n\n    Format is represented by PaWinWaveFormat or WAVEFORMATEXTENSIBLE structure.\n    Use this function to reconfirm format if PA's processor is overridden and\n    paWinWasapiRedirectHostProcessor flag is specified.\n\n @param pStream    Pointer to PaStream object.\n @param pFormat    Pointer to PaWinWaveFormat or WAVEFORMATEXTENSIBLE structure.\n @param formatSize Size of PaWinWaveFormat or WAVEFORMATEXTENSIBLE structure in bytes.\n @param bOutput    TRUE (1) for output stream, FALSE (0) for input stream.\n\n @return Non-negative value indicating the number of bytes copied into format descriptor\n         or, a PaErrorCode (which is always negative) if PortAudio is not initialized\n         or an error is encountered.\n*/\nint PaWasapi_GetDeviceCurrentFormat( PaStream *pStream, void *pFormat, unsigned int formatSize, int bOutput );\n\n\n/** Get default audio format for the device in Shared Mode.\n\n    Format is represented by PaWinWaveFormat or WAVEFORMATEXTENSIBLE structure and obtained\n    by getting the device property with a PKEY_AudioEngine_DeviceFormat key.\n\n @param  pFormat    Pointer to PaWinWaveFormat or WAVEFORMATEXTENSIBLE structure.\n @param  formatSize Size of PaWinWaveFormat or WAVEFORMATEXTENSIBLE structure in bytes.\n @param  device     Device index.\n\n @return Non-negative value indicating the number of bytes copied into format descriptor\n         or, a PaErrorCode (which is always negative) if PortAudio is not initialized\n         or an error is encountered.\n*/\nint PaWasapi_GetDeviceDefaultFormat( void *pFormat, unsigned int formatSize, PaDeviceIndex device );\n\n\n/** Get mix audio format for the device in Shared Mode.\n\n    Format is represented by PaWinWaveFormat or WAVEFORMATEXTENSIBLE structureand obtained by\n    IAudioClient::GetMixFormat.\n\n @param  pFormat    Pointer to PaWinWaveFormat or WAVEFORMATEXTENSIBLE structure.\n @param  formatSize Size of PaWinWaveFormat or WAVEFORMATEXTENSIBLE structure in bytes.\n @param  device     Device index.\n\n @return Non-negative value indicating the number of bytes copied into format descriptor\n         or, a PaErrorCode (which is always negative) if PortAudio is not initialized\n         or an error is encountered.\n*/\nint PaWasapi_GetDeviceMixFormat( void *pFormat, unsigned int formatSize, PaDeviceIndex device );\n\n\n/** Get device role (PaWasapiDeviceRole enum).\n\n @param  device Device index.\n\n @return Non-negative value indicating device role or, a PaErrorCode (which is always negative)\n         if PortAudio is not initialized or an error is encountered.\n*/\nint/*PaWasapiDeviceRole*/ PaWasapi_GetDeviceRole( PaDeviceIndex device );\n\n\n/** Get device IMMDevice pointer\n\n @param device Device index.\n @param pAudioClient Pointer to pointer of IMMDevice.\n\n @return Error code indicating success or failure.\n*/\nPaError PaWasapi_GetIMMDevice( PaDeviceIndex device, void **pIMMDevice );\n\n\n/** Boost thread priority of calling thread (MMCSS).\n\n    Use it for Blocking Interface only inside the thread which makes calls to Pa_WriteStream/Pa_ReadStream.\n\n @param  pTask          Handle to pointer to priority task. Must be used with PaWasapi_RevertThreadPriority\n                        method to revert thread priority to initial state.\n\n @param  priorityClass  Id of thread priority of PaWasapiThreadPriority type. Specifying\n                        eThreadPriorityNone does nothing.\n\n @return Error code indicating success or failure.\n @see    PaWasapi_RevertThreadPriority\n*/\nPaError PaWasapi_ThreadPriorityBoost( void **pTask, PaWasapiThreadPriority priorityClass );\n\n\n/** Boost thread priority of calling thread (MMCSS).\n\n    Use it for Blocking Interface only inside the thread which makes calls to Pa_WriteStream/Pa_ReadStream.\n\n @param  pTask Task handle obtained by PaWasapi_BoostThreadPriority method.\n\n @return Error code indicating success or failure.\n @see    PaWasapi_BoostThreadPriority\n*/\nPaError PaWasapi_ThreadPriorityRevert( void *pTask );\n\n\n/** Get number of frames per host buffer.\n\n    It is max value of frames of WASAPI buffer which can be locked for operations.\n    Use this method as helper to find out max values of inputFrames/outputFrames\n    of PaWasapiHostProcessorCallback.\n\n @param  pStream Pointer to PaStream object.\n @param  pInput  Pointer to variable to receive number of input frames. Can be NULL.\n @param  pOutput Pointer to variable to receive number of output frames. Can be NULL.\n\n @return Error code indicating success or failure.\n @see    PaWasapiHostProcessorCallback\n*/\nPaError PaWasapi_GetFramesPerHostBuffer( PaStream *pStream, unsigned int *pInput, unsigned int *pOutput );\n\n\n/** Get number of jacks associated with a WASAPI device.\n\n    Use this method to determine if there are any jacks associated with the provided WASAPI device.\n    Not all audio devices will support this capability. This is valid for both input and output devices.\n\n @note   Not available on UWP platform.\n\n @param  device     Device index.\n @param  pJackCount Pointer to variable to receive number of jacks.\n\n @return Error code indicating success or failure.\n @see    PaWasapi_GetJackDescription\n */\nPaError PaWasapi_GetJackCount( PaDeviceIndex device, int *pJackCount );\n\n\n/** Get the jack description associated with a WASAPI device and jack number.\n\n    Before this function is called, use PaWasapi_GetJackCount to determine the\n    number of jacks associated with device.  If jcount is greater than zero, then\n    each jack from 0 to jcount can be queried with this function to get the jack\n    description.\n\n @note   Not available on UWP platform.\n\n @param  device           Device index.\n @param  jackIndex        Jack index.\n @param  pJackDescription Pointer to PaWasapiJackDescription.\n\n @return Error code indicating success or failure.\n @see PaWasapi_GetJackCount\n */\nPaError PaWasapi_GetJackDescription( PaDeviceIndex device, int jackIndex, PaWasapiJackDescription *pJackDescription );\n\n\n/** Set stream state handler.\n\n @param  pStream        Pointer to PaStream object.\n @param  fnStateHandler Pointer to state handling function.\n @param  pUserData      Pointer to user data.\n\n @return Error code indicating success or failure.\n*/\nPaError PaWasapi_SetStreamStateHandler( PaStream *pStream, PaWasapiStreamStateCallback fnStateHandler, void *pUserData );\n\n\n/** Set default device Id.\n\n    By default implementation will use the DEVINTERFACE_AUDIO_RENDER and\n    DEVINTERFACE_AUDIO_CAPTURE Ids if device Id is not provided explicitly. These default Ids\n    will not allow to use Exclusive mode on UWP/WinRT platform and thus you must provide\n    device Id explicitly via this API before calling the Pa_OpenStream().\n\n    Device Ids on UWP platform are obtainable via:\n    Windows::Media::Devices::MediaDevice::GetDefaultAudioRenderId() or\n    Windows::Media::Devices::MediaDevice::GetDefaultAudioCaptureId() API.\n\n    After the call completes, memory referenced by pointers can be freed, as implementation keeps its own copy.\n\n    Call this function before calling Pa_IsFormatSupported() when Exclusive mode is requested.\n\n    See an example in the IMPORTANT notes.\n\n @note   UWP/WinRT platform only.\n\n @param  pId     Device Id, pointer to the 16-bit Unicode string (WCHAR). If NULL then device Id\n                 will be reset to the default, e.g. DEVINTERFACE_AUDIO_RENDER or DEVINTERFACE_AUDIO_CAPTURE.\n @param  bOutput TRUE (1) for output (render), FALSE (0) for input (capture).\n\n @return Error code indicating success or failure. Will return paIncompatibleStreamHostApi if library is not compiled\n         for UWP/WinRT platform. If Id is longer than PA_WASAPI_DEVICE_ID_LEN characters paBufferTooBig will\n         be returned.\n*/\nPaError PaWasapiWinrt_SetDefaultDeviceId( const unsigned short *pId, int bOutput );\n\n\n/** Populate the device list.\n\n    By default the implementation will rely on DEVINTERFACE_AUDIO_RENDER and DEVINTERFACE_AUDIO_CAPTURE as\n    default devices. If device Id is provided by PaWasapiWinrt_SetDefaultDeviceId() then those\n    device Ids will be used as default and only devices for the device list.\n\n    By populating the device list you can provide an additional available audio devices of the system to PA\n    which are obtainable by:\n    Windows::Devices::Enumeration::DeviceInformation::FindAllAsync(selector) where selector is obtainable by\n    Windows::Media::Devices::MediaDevice::GetAudioRenderSelector() or\n    Windows::Media::Devices::MediaDevice::GetAudioCaptureSelector() API.\n\n    After the call completes, memory referenced by pointers can be freed, as implementation keeps its own copy.\n\n    You must call PaWasapi_UpdateDeviceList() to update the internal device list of the implementation after\n    calling this function.\n\n    See an example in the IMPORTANT notes.\n\n @note   UWP/WinRT platform only.\n\n @param  pId     Array of device Ids, pointer to the array of pointers of 16-bit Unicode string (WCHAR). If NULL\n                 and count is also 0 then device Ids will be reset to the default. Required.\n @param  pName   Array of device Names, pointer to the array of pointers of 16-bit Unicode string (WCHAR). Optional.\n @param  pRole   Array of device Roles, see PaWasapiDeviceRole and PaWasapi_GetDeviceRole() for more details. Optional.\n @param  count   Number of devices, the number of array elements (pId, pName, pRole). Maximum count of devices\n                 is limited by PA_WASAPI_DEVICE_MAX_COUNT.\n @param  bOutput TRUE (1) for output (render), FALSE (0) for input (capture).\n\n @return Error code indicating success or failure. Will return paIncompatibleStreamHostApi if library is not compiled\n         for UWP/WinRT platform. If Id is longer than PA_WASAPI_DEVICE_ID_LEN characters paBufferTooBig will\n         be returned. If Name is longer than PA_WASAPI_DEVICE_NAME_LEN characters paBufferTooBig will\n         be returned.\n*/\nPaError PaWasapiWinrt_PopulateDeviceList( const unsigned short **pId, const unsigned short **pName,\n    const PaWasapiDeviceRole *pRole, unsigned int count, int bOutput );\n\n\n/*\n    IMPORTANT:\n\n    WASAPI is implemented for Callback and Blocking interfaces. It supports Shared and Exclusive\n    share modes.\n\n    Exclusive Mode:\n\n        Exclusive mode allows to deliver audio data directly to hardware bypassing\n        software mixing.\n        Exclusive mode is specified by 'paWinWasapiExclusive' flag.\n\n    Callback Interface:\n\n        Provides best audio quality with low latency. Callback interface is implemented in\n        two versions:\n\n        1) Event-Driven:\n        This is the most powerful WASAPI implementation which provides glitch-free\n        audio at around 3ms latency in Exclusive mode. Lowest possible latency for this mode is\n        3 ms for HD Audio class audio chips. For the Shared mode latency can not be\n        lower than 20 ms.\n\n        2) Poll-Driven:\n        Polling is another 2-nd method to operate with WASAPI. It is less efficient than Event-Driven\n        and provides latency at around 10-13ms. Polling must be used to overcome a system bug\n        under Windows Vista x64 when application is WOW64(32-bit) and Event-Driven method simply\n        times out (event handle is never signalled on buffer completion). Please note, such WOW64 bug\n        does not exist in Vista x86 or Windows 7.\n        Polling can be setup by specifying 'paWinWasapiPolling' flag. Our WASAPI implementation detects\n        WOW64 bug and sets 'paWinWasapiPolling' automatically.\n\n    Thread priority:\n\n        Normally thread priority is set automatically and does not require modification. Although\n        if user wants some tweaking thread priority can be modified by setting 'paWinWasapiThreadPriority'\n        flag and specifying 'PaWasapiStreamInfo::threadPriority' with value from PaWasapiThreadPriority\n        enum.\n\n    Blocking Interface:\n\n        Blocking interface is implemented but due to above described Poll-Driven method can not\n        deliver lowest possible latency. Specifying too low latency in Shared mode will result in\n        distorted audio although Exclusive mode adds stability.\n\n    8.24 format:\n\n        If paCustomFormat is specified as sample format then the implementation will understand it\n        as valid 24-bits inside 32-bit container (e.g. wBitsPerSample = 32, Samples.wValidBitsPerSample = 24).\n\n        By using paCustomFormat there will be small optimization when samples are be copied\n        with Copy_24_To_24 by PA processor instead of conversion from packed 3-byte (24-bit) data\n        with Int24_To_Int32.\n\n    Pa_IsFormatSupported:\n\n        To check format with correct Share Mode (Exclusive/Shared) you must supply PaWasapiStreamInfo\n        with flags paWinWasapiExclusive set through member of PaStreamParameters::hostApiSpecificStreamInfo\n        structure.\n\n        If paWinWasapiExplicitSampleFormat flag is provided then implementation will not try to select\n        suitable close format and will return an error instead of paFormatIsSupported. By specifying\n        paWinWasapiExplicitSampleFormat flag it is possible to find out what sample formats are\n        supported by Exclusive or Shared modes.\n\n    Pa_OpenStream:\n\n        To set desired Share Mode (Exclusive/Shared) you must supply\n        PaWasapiStreamInfo with flags paWinWasapiExclusive set through member of\n        PaStreamParameters::hostApiSpecificStreamInfo structure.\n\n    Coding style for parameters and structure members of the public API:\n\n        1) bXXX - boolean, [1 (TRUE), 0 (FALSE)]\n        2) pXXX - pointer\n        3) fnXXX - pointer to function\n        4) structure members are never prefixed with a type distinguisher\n\n\n    UWP/WinRT:\n\n        This platform has number of limitations which do not allow to enumerate audio devices without\n        an additional external help. Enumeration is possible though from C++/CX, check the related API\n        Windows::Devices::Enumeration::DeviceInformation::FindAllAsync().\n\n        The main limitation is an absence of the device enumeration from inside the PA's implementation.\n        This problem can be solved by using the following functions:\n\n        PaWasapiWinrt_SetDefaultDeviceId() - to set default input/output device,\n        PaWasapiWinrt_PopulateDeviceList() - to populate device list with devices.\n\n        Here is an example of populating the device list which can also be updated dynamically depending on\n        whether device was removed from or added to the system:\n\n        ----------------\n\n        std::vector<const UINT16 *> ids, names;\n        std::vector<PaWasapiDeviceRole> role;\n\n        ids.resize(count);\n        names.resize(count);\n        role.resize(count);\n\n        for (UINT32 i = 0; i < count; ++i)\n        {\n            ids[i]   = (const UINT16 *)device_ids[i].c_str();\n            names[i] = (const UINT16 *)device_names[i].c_str();\n            role[i]  = eRoleUnknownFormFactor;\n        }\n\n        PaWasapiWinrt_SetDefaultDeviceId((const UINT16 *)default_device_id.c_str(), !capture);\n        PaWasapiWinrt_PopulateDeviceList(ids.data(), names.data(), role.data(), count, !capture);\n        PaWasapi_UpdateDeviceList();\n\n        ----------------\n*/\n\n#ifdef __cplusplus\n}\n#endif /* __cplusplus */\n\n#endif /* PA_WIN_WASAPI_H */\n"
  },
  {
    "path": "thirdparty/portaudio/include/pa_win_waveformat.h",
    "content": "#ifndef PA_WIN_WAVEFORMAT_H\n#define PA_WIN_WAVEFORMAT_H\n\n/*\n * PortAudio Portable Real-Time Audio Library\n * Windows WAVEFORMAT* data structure utilities\n * portaudio.h should be included before this file.\n *\n * Copyright (c) 2007 Ross Bencina\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n/** @file\n @ingroup public_header\n @brief Windows specific PortAudio API extension and utilities header file.\n*/\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/*\n    The following #defines for speaker channel masks are the same\n    as those in ksmedia.h, except with PAWIN_ prepended, KSAUDIO_ removed\n    in some cases, and casts to PaWinWaveFormatChannelMask added.\n*/\n\ntypedef unsigned long PaWinWaveFormatChannelMask;\n\n/* Speaker Positions: */\n#define PAWIN_SPEAKER_FRONT_LEFT                ((PaWinWaveFormatChannelMask)0x1)\n#define PAWIN_SPEAKER_FRONT_RIGHT               ((PaWinWaveFormatChannelMask)0x2)\n#define PAWIN_SPEAKER_FRONT_CENTER              ((PaWinWaveFormatChannelMask)0x4)\n#define PAWIN_SPEAKER_LOW_FREQUENCY             ((PaWinWaveFormatChannelMask)0x8)\n#define PAWIN_SPEAKER_BACK_LEFT                 ((PaWinWaveFormatChannelMask)0x10)\n#define PAWIN_SPEAKER_BACK_RIGHT                ((PaWinWaveFormatChannelMask)0x20)\n#define PAWIN_SPEAKER_FRONT_LEFT_OF_CENTER      ((PaWinWaveFormatChannelMask)0x40)\n#define PAWIN_SPEAKER_FRONT_RIGHT_OF_CENTER     ((PaWinWaveFormatChannelMask)0x80)\n#define PAWIN_SPEAKER_BACK_CENTER               ((PaWinWaveFormatChannelMask)0x100)\n#define PAWIN_SPEAKER_SIDE_LEFT                 ((PaWinWaveFormatChannelMask)0x200)\n#define PAWIN_SPEAKER_SIDE_RIGHT                ((PaWinWaveFormatChannelMask)0x400)\n#define PAWIN_SPEAKER_TOP_CENTER                ((PaWinWaveFormatChannelMask)0x800)\n#define PAWIN_SPEAKER_TOP_FRONT_LEFT            ((PaWinWaveFormatChannelMask)0x1000)\n#define PAWIN_SPEAKER_TOP_FRONT_CENTER          ((PaWinWaveFormatChannelMask)0x2000)\n#define PAWIN_SPEAKER_TOP_FRONT_RIGHT           ((PaWinWaveFormatChannelMask)0x4000)\n#define PAWIN_SPEAKER_TOP_BACK_LEFT             ((PaWinWaveFormatChannelMask)0x8000)\n#define PAWIN_SPEAKER_TOP_BACK_CENTER           ((PaWinWaveFormatChannelMask)0x10000)\n#define PAWIN_SPEAKER_TOP_BACK_RIGHT            ((PaWinWaveFormatChannelMask)0x20000)\n\n/* Bit mask locations reserved for future use */\n#define PAWIN_SPEAKER_RESERVED                  ((PaWinWaveFormatChannelMask)0x7FFC0000)\n\n/* Used to specify that any possible permutation of speaker configurations */\n#define PAWIN_SPEAKER_ALL                       ((PaWinWaveFormatChannelMask)0x80000000)\n\n/* DirectSound Speaker Config */\n#define PAWIN_SPEAKER_DIRECTOUT                 0\n#define PAWIN_SPEAKER_MONO                      (PAWIN_SPEAKER_FRONT_CENTER)\n#define PAWIN_SPEAKER_STEREO                    (PAWIN_SPEAKER_FRONT_LEFT | PAWIN_SPEAKER_FRONT_RIGHT)\n#define PAWIN_SPEAKER_QUAD                      (PAWIN_SPEAKER_FRONT_LEFT | PAWIN_SPEAKER_FRONT_RIGHT | \\\n                                                    PAWIN_SPEAKER_BACK_LEFT  | PAWIN_SPEAKER_BACK_RIGHT)\n#define PAWIN_SPEAKER_SURROUND                  (PAWIN_SPEAKER_FRONT_LEFT | PAWIN_SPEAKER_FRONT_RIGHT | \\\n                                                    PAWIN_SPEAKER_FRONT_CENTER | PAWIN_SPEAKER_BACK_CENTER)\n#define PAWIN_SPEAKER_5POINT1                   (PAWIN_SPEAKER_FRONT_LEFT | PAWIN_SPEAKER_FRONT_RIGHT | \\\n                                                    PAWIN_SPEAKER_FRONT_CENTER | PAWIN_SPEAKER_LOW_FREQUENCY | \\\n                                                    PAWIN_SPEAKER_BACK_LEFT  | PAWIN_SPEAKER_BACK_RIGHT)\n#define PAWIN_SPEAKER_7POINT1                   (PAWIN_SPEAKER_FRONT_LEFT | PAWIN_SPEAKER_FRONT_RIGHT | \\\n                                                    PAWIN_SPEAKER_FRONT_CENTER | PAWIN_SPEAKER_LOW_FREQUENCY | \\\n                                                    PAWIN_SPEAKER_BACK_LEFT | PAWIN_SPEAKER_BACK_RIGHT | \\\n                                                    PAWIN_SPEAKER_FRONT_LEFT_OF_CENTER | PAWIN_SPEAKER_FRONT_RIGHT_OF_CENTER)\n#define PAWIN_SPEAKER_5POINT1_SURROUND          (PAWIN_SPEAKER_FRONT_LEFT | PAWIN_SPEAKER_FRONT_RIGHT | \\\n                                                    PAWIN_SPEAKER_FRONT_CENTER | PAWIN_SPEAKER_LOW_FREQUENCY | \\\n                                                    PAWIN_SPEAKER_SIDE_LEFT  | PAWIN_SPEAKER_SIDE_RIGHT)\n#define PAWIN_SPEAKER_7POINT1_SURROUND          (PAWIN_SPEAKER_FRONT_LEFT | PAWIN_SPEAKER_FRONT_RIGHT | \\\n                                                    PAWIN_SPEAKER_FRONT_CENTER | PAWIN_SPEAKER_LOW_FREQUENCY | \\\n                                                    PAWIN_SPEAKER_BACK_LEFT | PAWIN_SPEAKER_BACK_RIGHT | \\\n                                                    PAWIN_SPEAKER_SIDE_LEFT | PAWIN_SPEAKER_SIDE_RIGHT)\n/*\n According to the Microsoft documentation:\n The following are obsolete 5.1 and 7.1 settings (they lack side speakers).  Note this means\n that the default 5.1 and 7.1 settings (KSAUDIO_SPEAKER_5POINT1 and KSAUDIO_SPEAKER_7POINT1 are\n similarly obsolete but are unchanged for compatibility reasons).\n*/\n#define PAWIN_SPEAKER_5POINT1_BACK              PAWIN_SPEAKER_5POINT1\n#define PAWIN_SPEAKER_7POINT1_WIDE              PAWIN_SPEAKER_7POINT1\n\n/* DVD Speaker Positions */\n#define PAWIN_SPEAKER_GROUND_FRONT_LEFT         PAWIN_SPEAKER_FRONT_LEFT\n#define PAWIN_SPEAKER_GROUND_FRONT_CENTER       PAWIN_SPEAKER_FRONT_CENTER\n#define PAWIN_SPEAKER_GROUND_FRONT_RIGHT        PAWIN_SPEAKER_FRONT_RIGHT\n#define PAWIN_SPEAKER_GROUND_REAR_LEFT          PAWIN_SPEAKER_BACK_LEFT\n#define PAWIN_SPEAKER_GROUND_REAR_RIGHT         PAWIN_SPEAKER_BACK_RIGHT\n#define PAWIN_SPEAKER_TOP_MIDDLE                PAWIN_SPEAKER_TOP_CENTER\n#define PAWIN_SPEAKER_SUPER_WOOFER              PAWIN_SPEAKER_LOW_FREQUENCY\n\n\n/*\n    PaWinWaveFormat is defined here to provide compatibility with\n    compilation environments which don't have headers defining\n    WAVEFORMATEXTENSIBLE (e.g. older versions of MSVC, Borland C++ etc.\n\n    The fields for WAVEFORMATEX and WAVEFORMATEXTENSIBLE are declared as an\n    unsigned char array here to avoid clients who include this file having\n    a dependency on windows.h and mmsystem.h, and also to to avoid having\n    to write separate packing pragmas for each compiler.\n*/\n#define PAWIN_SIZEOF_WAVEFORMATEX   18\n#define PAWIN_SIZEOF_WAVEFORMATEXTENSIBLE (PAWIN_SIZEOF_WAVEFORMATEX + 22)\n\ntypedef struct{\n    unsigned char fields[ PAWIN_SIZEOF_WAVEFORMATEXTENSIBLE ];\n    unsigned long extraLongForAlignment; /* ensure that compiler aligns struct to DWORD */\n} PaWinWaveFormat;\n\n/*\n    WAVEFORMATEXTENSIBLE fields:\n\n    union  {\n        WORD  wValidBitsPerSample;\n        WORD  wSamplesPerBlock;\n        WORD  wReserved;\n    } Samples;\n    DWORD  dwChannelMask;\n    GUID  SubFormat;\n*/\n\n#define PAWIN_INDEXOF_WVALIDBITSPERSAMPLE       (PAWIN_SIZEOF_WAVEFORMATEX+0)\n#define PAWIN_INDEXOF_DWCHANNELMASK             (PAWIN_SIZEOF_WAVEFORMATEX+2)\n#define PAWIN_INDEXOF_SUBFORMAT                 (PAWIN_SIZEOF_WAVEFORMATEX+6)\n\n\n/*\n    Valid values to pass for the waveFormatTag PaWin_InitializeWaveFormatEx and\n    PaWin_InitializeWaveFormatExtensible functions below. These must match\n    the standard Windows WAVE_FORMAT_* values.\n*/\n#define PAWIN_WAVE_FORMAT_PCM                   (1)\n#define PAWIN_WAVE_FORMAT_IEEE_FLOAT            (3)\n#define PAWIN_WAVE_FORMAT_DOLBY_AC3_SPDIF       (0x0092)\n#define PAWIN_WAVE_FORMAT_WMA_SPDIF             (0x0164)\n\n\n/*\n    returns PAWIN_WAVE_FORMAT_PCM or PAWIN_WAVE_FORMAT_IEEE_FLOAT\n    depending on the sampleFormat parameter.\n*/\nint PaWin_SampleFormatToLinearWaveFormatTag( PaSampleFormat sampleFormat );\n\n/*\n    Use the following two functions to initialize the waveformat structure.\n*/\n\nvoid PaWin_InitializeWaveFormatEx( PaWinWaveFormat *waveFormat,\n        int numChannels, PaSampleFormat sampleFormat, int waveFormatTag, double sampleRate );\n\n\nvoid PaWin_InitializeWaveFormatExtensible( PaWinWaveFormat *waveFormat,\n        int numChannels, PaSampleFormat sampleFormat, int waveFormatTag, double sampleRate,\n        PaWinWaveFormatChannelMask channelMask );\n\n\n/* Map a channel count to a speaker channel mask */\nPaWinWaveFormatChannelMask PaWin_DefaultChannelMask( int numChannels );\n\n\n#ifdef __cplusplus\n}\n#endif /* __cplusplus */\n\n#endif /* PA_WIN_WAVEFORMAT_H */\n"
  },
  {
    "path": "thirdparty/portaudio/include/pa_win_wdmks.h",
    "content": "#ifndef PA_WIN_WDMKS_H\n#define PA_WIN_WDMKS_H\n/*\n * $Id$\n * PortAudio Portable Real-Time Audio Library\n * WDM/KS specific extensions\n *\n * Copyright (c) 1999-2007 Ross Bencina and Phil Burk\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n/** @file\n @ingroup public_header\n @brief WDM Kernel Streaming-specific PortAudio API extension header file.\n*/\n\n\n#include \"portaudio.h\"\n\n#include <windows.h>\n\n#ifdef __cplusplus\nextern \"C\"\n{\n#endif /* __cplusplus */\n\n    /** Flags to indicate valid fields in PaWinWDMKSInfo.\n     @see PaWinWDMKSInfo\n     @version Available as of 19.5.0.\n    */\n    typedef enum PaWinWDMKSFlags\n    {\n        /** Makes WDMKS use the supplied latency figures instead of relying on the frame size reported\n         by the WaveCyclic device. Use at own risk!\n        */\n        paWinWDMKSOverrideFramesize   = (1 << 0),\n\n        /** Makes WDMKS (output stream) use the given channelMask instead of the default.\n          @version Available as of 19.5.0.\n        */\n        paWinWDMKSUseGivenChannelMask = (1 << 1),\n\n    } PaWinWDMKSFlags;\n\n    typedef struct PaWinWDMKSInfo{\n        unsigned long size;             /**< sizeof(PaWinWDMKSInfo) */\n        PaHostApiTypeId hostApiType;    /**< paWDMKS */\n        unsigned long version;          /**< 1 */\n\n        /** Flags indicate which fields are valid.\n         @see PaWinWDMKSFlags\n         @version Available as of 19.5.0.\n        */\n        unsigned long flags;\n\n        /** The number of packets to use for WaveCyclic devices, range is [2, 8]. Set to zero for default value of 2. */\n        unsigned noOfPackets;\n\n        /** If paWinWDMKSUseGivenChannelMask bit is set in flags, use this as channelMask instead of default.\n         @see PaWinWDMKSFlags\n         @version Available as of 19.5.0.\n        */\n        unsigned channelMask;\n    } PaWinWDMKSInfo;\n\n    typedef enum PaWDMKSType\n    {\n        Type_kNotUsed,\n        Type_kWaveCyclic,\n        Type_kWaveRT,\n        Type_kCnt,\n    } PaWDMKSType;\n\n    typedef enum PaWDMKSSubType\n    {\n        SubType_kUnknown,\n        SubType_kNotification,\n        SubType_kPolled,\n        SubType_kCnt,\n    } PaWDMKSSubType;\n\n    typedef struct PaWinWDMKSDeviceInfo {\n        wchar_t filterPath[MAX_PATH];     /**< KS filter path in Unicode! */\n        wchar_t topologyPath[MAX_PATH];   /**< Topology filter path in Unicode! */\n        PaWDMKSType streamingType;\n        GUID deviceProductGuid;           /**< The product GUID of the device (if supported) */\n    } PaWinWDMKSDeviceInfo;\n\n    typedef struct PaWDMKSDirectionSpecificStreamInfo\n    {\n        PaDeviceIndex device;\n        unsigned channels;                  /**< No of channels the device is opened with */\n        unsigned framesPerHostBuffer;       /**< No of frames of the device buffer */\n        int endpointPinId;                  /**< Endpoint pin ID (on topology filter if topologyName is not empty) */\n        int muxNodeId;                      /**< Only valid for input */\n        PaWDMKSSubType streamingSubType;       /**< Not known until device is opened for streaming */\n    } PaWDMKSDirectionSpecificStreamInfo;\n\n    typedef struct PaWDMKSSpecificStreamInfo {\n        PaWDMKSDirectionSpecificStreamInfo input;\n        PaWDMKSDirectionSpecificStreamInfo output;\n    } PaWDMKSSpecificStreamInfo;\n\n#ifdef __cplusplus\n}\n#endif /* __cplusplus */\n\n#endif /* PA_WIN_DS_H */\n"
  },
  {
    "path": "thirdparty/portaudio/include/pa_win_wmme.h",
    "content": "#ifndef PA_WIN_WMME_H\n#define PA_WIN_WMME_H\n/*\n * $Id$\n * PortAudio Portable Real-Time Audio Library\n * MME specific extensions\n *\n * Copyright (c) 1999-2000 Ross Bencina and Phil Burk\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n/** @file\n @ingroup public_header\n @brief WMME-specific PortAudio API extension header file.\n*/\n\n#include \"portaudio.h\"\n#include \"pa_win_waveformat.h\"\n\n#ifdef __cplusplus\nextern \"C\"\n{\n#endif /* __cplusplus */\n\n\n/* The following are flags which can be set in\n  PaWinMmeStreamInfo's flags field.\n*/\n\n#define paWinMmeUseLowLevelLatencyParameters            (0x01)\n#define paWinMmeUseMultipleDevices                      (0x02)  /* use mme specific multiple device feature */\n#define paWinMmeUseChannelMask                          (0x04)\n\n/* By default, the mme implementation drops the processing thread's priority\n    to THREAD_PRIORITY_NORMAL and sleeps the thread if the CPU load exceeds 100%\n    This flag disables any priority throttling. The processing thread will always\n    run at THREAD_PRIORITY_TIME_CRITICAL.\n*/\n#define paWinMmeDontThrottleOverloadedProcessingThread  (0x08)\n\n/*  Flags for non-PCM spdif passthrough.\n*/\n#define paWinMmeWaveFormatDolbyAc3Spdif                 (0x10)\n#define paWinMmeWaveFormatWmaSpdif                      (0x20)\n\n\ntypedef struct PaWinMmeDeviceAndChannelCount{\n    PaDeviceIndex device;\n    int channelCount;\n}PaWinMmeDeviceAndChannelCount;\n\n\ntypedef struct PaWinMmeStreamInfo{\n    unsigned long size;             /**< sizeof(PaWinMmeStreamInfo) */\n    PaHostApiTypeId hostApiType;    /**< paMME */\n    unsigned long version;          /**< 1 */\n\n    unsigned long flags;\n\n    /* low-level latency setting support\n        These settings control the number and size of host buffers in order\n        to set latency. They will be used instead of the generic parameters\n        to Pa_OpenStream() if flags contains the PaWinMmeUseLowLevelLatencyParameters\n        flag.\n\n        If PaWinMmeStreamInfo structures with PaWinMmeUseLowLevelLatencyParameters\n        are supplied for both input and output in a full duplex stream, then the\n        input and output framesPerBuffer must be the same, or the larger of the\n        two must be a multiple of the smaller, otherwise a\n        paIncompatibleHostApiSpecificStreamInfo error will be returned from\n        Pa_OpenStream().\n    */\n    unsigned long framesPerBuffer;\n    unsigned long bufferCount;  /* formerly numBuffers */\n\n    /* multiple devices per direction support\n        If flags contains the PaWinMmeUseMultipleDevices flag,\n        this functionality will be used, otherwise the device parameter to\n        Pa_OpenStream() will be used instead.\n        If devices are specified here, the corresponding device parameter\n        to Pa_OpenStream() should be set to paUseHostApiSpecificDeviceSpecification,\n        otherwise an paInvalidDevice error will result.\n        The total number of channels across all specified devices\n        must agree with the corresponding channelCount parameter to\n        Pa_OpenStream() otherwise a paInvalidChannelCount error will result.\n    */\n    PaWinMmeDeviceAndChannelCount *devices;\n    unsigned long deviceCount;\n\n    /*\n        support for WAVEFORMATEXTENSIBLE channel masks. If flags contains\n        paWinMmeUseChannelMask this allows you to specify which speakers\n        to address in a multichannel stream. Constants for channelMask\n        are specified in pa_win_waveformat.h\n\n    */\n    PaWinWaveFormatChannelMask channelMask;\n\n}PaWinMmeStreamInfo;\n\n\n/** Retrieve the number of wave in handles used by a PortAudio WinMME stream.\n Returns zero if the stream is output only.\n\n @return A non-negative value indicating the number of wave in handles\n or, a PaErrorCode (which are always negative) if PortAudio is not initialized\n or an error is encountered.\n\n @see PaWinMME_GetStreamInputHandle\n*/\nint PaWinMME_GetStreamInputHandleCount( PaStream* stream );\n\n\n/** Retrieve a wave in handle used by a PortAudio WinMME stream.\n\n @param stream The stream to query.\n @param handleIndex The zero based index of the wave in handle to retrieve. This\n    should be in the range [0, PaWinMME_GetStreamInputHandleCount(stream)-1].\n\n @return A valid wave in handle, or NULL if an error occurred.\n\n @see PaWinMME_GetStreamInputHandle\n*/\nHWAVEIN PaWinMME_GetStreamInputHandle( PaStream* stream, int handleIndex );\n\n\n/** Retrieve the number of wave out handles used by a PortAudio WinMME stream.\n Returns zero if the stream is input only.\n\n @return A non-negative value indicating the number of wave out handles\n or, a PaErrorCode (which are always negative) if PortAudio is not initialized\n or an error is encountered.\n\n @see PaWinMME_GetStreamOutputHandle\n*/\nint PaWinMME_GetStreamOutputHandleCount( PaStream* stream );\n\n\n/** Retrieve a wave out handle used by a PortAudio WinMME stream.\n\n @param stream The stream to query.\n @param handleIndex The zero based index of the wave out handle to retrieve.\n    This should be in the range [0, PaWinMME_GetStreamOutputHandleCount(stream)-1].\n\n @return A valid wave out handle, or NULL if an error occurred.\n\n @see PaWinMME_GetStreamOutputHandleCount\n*/\nHWAVEOUT PaWinMME_GetStreamOutputHandle( PaStream* stream, int handleIndex );\n\n\n#ifdef __cplusplus\n}\n#endif /* __cplusplus */\n\n#endif /* PA_WIN_WMME_H */\n"
  },
  {
    "path": "thirdparty/portaudio/include/portaudio.h",
    "content": "#ifndef PORTAUDIO_H\n#define PORTAUDIO_H\n/*\n * $Id$\n * PortAudio Portable Real-Time Audio Library\n * PortAudio API Header File\n * Latest version available at: http://www.portaudio.com/\n *\n * Copyright (c) 1999-2002 Ross Bencina and Phil Burk\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n/** @file\n @ingroup public_header\n @brief The portable PortAudio API.\n*/\n\n\n#ifdef __cplusplus\nextern \"C\"\n{\n#endif /* __cplusplus */\n\n/** Retrieve the release number of the currently running PortAudio build.\n For example, for version \"19.5.1\" this will return 0x00130501.\n\n @see paMakeVersionNumber\n*/\nint Pa_GetVersion( void );\n\n/** Retrieve a textual description of the current PortAudio build,\n e.g. \"PortAudio V19.5.0-devel, revision 1952M\".\n The format of the text may change in the future. Do not try to parse the\n returned string.\n\n @deprecated As of 19.5.0, use Pa_GetVersionInfo()->versionText instead.\n*/\nconst char* Pa_GetVersionText( void );\n\n/**\n Generate a packed integer version number in the same format used\n by Pa_GetVersion(). Use this to compare a specified version number with\n the currently running version. For example:\n\n @code\n     if( Pa_GetVersion() < paMakeVersionNumber(19,5,1) ) {}\n @endcode\n\n @see Pa_GetVersion, Pa_GetVersionInfo\n @version Available as of 19.5.0.\n*/\n#define paMakeVersionNumber(major, minor, subminor) \\\n    (((major)&0xFF)<<16 | ((minor)&0xFF)<<8 | ((subminor)&0xFF))\n\n\n/**\n A structure containing PortAudio API version information.\n @see Pa_GetVersionInfo, paMakeVersionNumber\n @version Available as of 19.5.0.\n*/\ntypedef struct PaVersionInfo {\n    int versionMajor;\n    int versionMinor;\n    int versionSubMinor;\n    /**\n     This is currently the Git revision hash but may change in the future.\n     The versionControlRevision is updated by running a script before compiling the library.\n     If the update does not occur, this value may refer to an earlier revision.\n    */\n    const char *versionControlRevision;\n    /** Version as a string, for example \"PortAudio V19.5.0-devel, revision 1952M\" */\n    const char *versionText;\n} PaVersionInfo;\n\n/** Retrieve version information for the currently running PortAudio build.\n @return A pointer to an immutable PaVersionInfo structure.\n\n @note This function can be called at any time. It does not require PortAudio\n to be initialized. The structure pointed to is statically allocated. Do not\n attempt to free it or modify it.\n\n @see PaVersionInfo, paMakeVersionNumber\n @version Available as of 19.5.0.\n*/\nconst PaVersionInfo* Pa_GetVersionInfo( void );\n\n\n/** Error codes returned by PortAudio functions.\n Note that with the exception of paNoError, all PaErrorCodes are negative.\n*/\n\ntypedef int PaError;\ntypedef enum PaErrorCode\n{\n    paNoError = 0,\n\n    paNotInitialized = -10000,\n    paUnanticipatedHostError,\n    paInvalidChannelCount,\n    paInvalidSampleRate,\n    paInvalidDevice,\n    paInvalidFlag,\n    paSampleFormatNotSupported,\n    paBadIODeviceCombination,\n    paInsufficientMemory,\n    paBufferTooBig,\n    paBufferTooSmall,\n    paNullCallback,\n    paBadStreamPtr,\n    paTimedOut,\n    paInternalError,\n    paDeviceUnavailable,\n    paIncompatibleHostApiSpecificStreamInfo,\n    paStreamIsStopped,\n    paStreamIsNotStopped,\n    paInputOverflowed,\n    paOutputUnderflowed,\n    paHostApiNotFound,\n    paInvalidHostApi,\n    paCanNotReadFromACallbackStream,\n    paCanNotWriteToACallbackStream,\n    paCanNotReadFromAnOutputOnlyStream,\n    paCanNotWriteToAnInputOnlyStream,\n    paIncompatibleStreamHostApi,\n    paBadBufferPtr\n} PaErrorCode;\n\n\n/** Translate the supplied PortAudio error code into a human readable\n message.\n*/\nconst char *Pa_GetErrorText( PaError errorCode );\n\n\n/** Library initialization function - call this before using PortAudio.\n This function initializes internal data structures and prepares underlying\n host APIs for use.  With the exception of Pa_GetVersion(), Pa_GetVersionText(),\n and Pa_GetErrorText(), this function MUST be called before using any other\n PortAudio API functions.\n\n If Pa_Initialize() is called multiple times, each successful\n call must be matched with a corresponding call to Pa_Terminate().\n Pairs of calls to Pa_Initialize()/Pa_Terminate() may overlap, and are not\n required to be fully nested.\n\n Note that if Pa_Initialize() returns an error code, Pa_Terminate() should\n NOT be called.\n\n @return paNoError if successful, otherwise an error code indicating the cause\n of failure.\n\n @see Pa_Terminate\n*/\nPaError Pa_Initialize( void );\n\n\n/** Library termination function - call this when finished using PortAudio.\n This function deallocates all resources allocated by PortAudio since it was\n initialized by a call to Pa_Initialize(). In cases where Pa_Initialise() has\n been called multiple times, each call must be matched with a corresponding call\n to Pa_Terminate(). The final matching call to Pa_Terminate() will automatically\n close any PortAudio streams that are still open.\n\n Pa_Terminate() MUST be called before exiting a program which uses PortAudio.\n Failure to do so may result in serious resource leaks, such as audio devices\n not being available until the next reboot.\n\n @return paNoError if successful, otherwise an error code indicating the cause\n of failure.\n\n @see Pa_Initialize\n*/\nPaError Pa_Terminate( void );\n\n\n\n/** The type used to refer to audio devices. Values of this type usually\n range from 0 to (Pa_GetDeviceCount()-1), and may also take on the PaNoDevice\n and paUseHostApiSpecificDeviceSpecification values.\n\n @see Pa_GetDeviceCount, paNoDevice, paUseHostApiSpecificDeviceSpecification\n*/\ntypedef int PaDeviceIndex;\n\n\n/** A special PaDeviceIndex value indicating that no device is available,\n or should be used.\n\n @see PaDeviceIndex\n*/\n#define paNoDevice ((PaDeviceIndex)-1)\n\n\n/** A special PaDeviceIndex value indicating that the device(s) to be used\n are specified in the host api specific stream info structure.\n\n @see PaDeviceIndex\n*/\n#define paUseHostApiSpecificDeviceSpecification ((PaDeviceIndex)-2)\n\n\n/* Host API enumeration mechanism */\n\n/** The type used to enumerate to host APIs at runtime. Values of this type\n range from 0 to (Pa_GetHostApiCount()-1).\n\n @see Pa_GetHostApiCount\n*/\ntypedef int PaHostApiIndex;\n\n\n/** Retrieve the number of available host APIs. Even if a host API is\n available it may have no devices available.\n\n @return A non-negative value indicating the number of available host APIs\n or, a PaErrorCode (which are always negative) if PortAudio is not initialized\n or an error is encountered.\n\n @see PaHostApiIndex\n*/\nPaHostApiIndex Pa_GetHostApiCount( void );\n\n\n/** Retrieve the index of the default host API. The default host API will be\n the lowest common denominator host API on the current platform and is\n unlikely to provide the best performance.\n\n @return A non-negative value ranging from 0 to (Pa_GetHostApiCount()-1)\n indicating the default host API index or, a PaErrorCode (which are always\n negative) if PortAudio is not initialized or an error is encountered.\n*/\nPaHostApiIndex Pa_GetDefaultHostApi( void );\n\n\n/** Unchanging unique identifiers for each supported host API. This type\n is used in the PaHostApiInfo structure. The values are guaranteed to be\n unique and to never change, thus allowing code to be written that\n conditionally uses host API specific extensions.\n\n New type ids will be allocated when support for a host API reaches\n \"public alpha\" status, prior to that developers should use the\n paInDevelopment type id.\n\n @see PaHostApiInfo\n*/\ntypedef enum PaHostApiTypeId\n{\n    paInDevelopment=0, /* use while developing support for a new host API */\n    paDirectSound=1,\n    paMME=2,\n    paASIO=3,\n    paSoundManager=4,\n    paCoreAudio=5,\n    paOSS=7,\n    paALSA=8,\n    paAL=9,\n    paBeOS=10,\n    paWDMKS=11,\n    paJACK=12,\n    paWASAPI=13,\n    paAudioScienceHPI=14\n} PaHostApiTypeId;\n\n\n/** A structure containing information about a particular host API. */\n\ntypedef struct PaHostApiInfo\n{\n    /** this is struct version 1 */\n    int structVersion;\n    /** The well known unique identifier of this host API @see PaHostApiTypeId */\n    PaHostApiTypeId type;\n    /** A textual description of the host API for display on user interfaces. */\n    const char *name;\n\n    /**  The number of devices belonging to this host API. This field may be\n     used in conjunction with Pa_HostApiDeviceIndexToDeviceIndex() to enumerate\n     all devices for this host API.\n     @see Pa_HostApiDeviceIndexToDeviceIndex\n    */\n    int deviceCount;\n\n    /** The default input device for this host API. The value will be a\n     device index ranging from 0 to (Pa_GetDeviceCount()-1), or paNoDevice\n     if no default input device is available.\n    */\n    PaDeviceIndex defaultInputDevice;\n\n    /** The default output device for this host API. The value will be a\n     device index ranging from 0 to (Pa_GetDeviceCount()-1), or paNoDevice\n     if no default output device is available.\n    */\n    PaDeviceIndex defaultOutputDevice;\n\n} PaHostApiInfo;\n\n\n/** Retrieve a pointer to a structure containing information about a specific\n host Api.\n\n @param hostApi A valid host API index ranging from 0 to (Pa_GetHostApiCount()-1)\n\n @return A pointer to an immutable PaHostApiInfo structure describing\n a specific host API. If the hostApi parameter is out of range or an error\n is encountered, the function returns NULL.\n\n The returned structure is owned by the PortAudio implementation and must not\n be manipulated or freed. The pointer is only guaranteed to be valid between\n calls to Pa_Initialize() and Pa_Terminate().\n*/\nconst PaHostApiInfo * Pa_GetHostApiInfo( PaHostApiIndex hostApi );\n\n\n/** Convert a static host API unique identifier, into a runtime\n host API index.\n\n @param type A unique host API identifier belonging to the PaHostApiTypeId\n enumeration.\n\n @return A valid PaHostApiIndex ranging from 0 to (Pa_GetHostApiCount()-1) or,\n a PaErrorCode (which are always negative) if PortAudio is not initialized\n or an error is encountered.\n\n The paHostApiNotFound error code indicates that the host API specified by the\n type parameter is not available.\n\n @see PaHostApiTypeId\n*/\nPaHostApiIndex Pa_HostApiTypeIdToHostApiIndex( PaHostApiTypeId type );\n\n\n/** Convert a host-API-specific device index to standard PortAudio device index.\n This function may be used in conjunction with the deviceCount field of\n PaHostApiInfo to enumerate all devices for the specified host API.\n\n @param hostApi A valid host API index ranging from 0 to (Pa_GetHostApiCount()-1)\n\n @param hostApiDeviceIndex A valid per-host device index in the range\n 0 to (Pa_GetHostApiInfo(hostApi)->deviceCount-1)\n\n @return A non-negative PaDeviceIndex ranging from 0 to (Pa_GetDeviceCount()-1)\n or, a PaErrorCode (which are always negative) if PortAudio is not initialized\n or an error is encountered.\n\n A paInvalidHostApi error code indicates that the host API index specified by\n the hostApi parameter is out of range.\n\n A paInvalidDevice error code indicates that the hostApiDeviceIndex parameter\n is out of range.\n\n @see PaHostApiInfo\n*/\nPaDeviceIndex Pa_HostApiDeviceIndexToDeviceIndex( PaHostApiIndex hostApi,\n        int hostApiDeviceIndex );\n\n\n\n/** Structure used to return information about a host error condition.\n*/\ntypedef struct PaHostErrorInfo{\n    PaHostApiTypeId hostApiType;    /**< the host API which returned the error code */\n    long errorCode;                 /**< the error code returned */\n    const char *errorText;          /**< a textual description of the error if available, otherwise a zero-length string */\n}PaHostErrorInfo;\n\n\n/** Return information about the last host error encountered. The error\n information returned by Pa_GetLastHostErrorInfo() will never be modified\n asynchronously by errors occurring in other PortAudio owned threads\n (such as the thread that manages the stream callback.)\n\n This function is provided as a last resort, primarily to enhance debugging\n by providing clients with access to all available error information.\n\n @return A pointer to an immutable structure constraining information about\n the host error. The values in this structure will only be valid if a\n PortAudio function has previously returned the paUnanticipatedHostError\n error code.\n*/\nconst PaHostErrorInfo* Pa_GetLastHostErrorInfo( void );\n\n\n\n/* Device enumeration and capabilities */\n\n/** Retrieve the number of available devices. The number of available devices\n may be zero.\n\n @return A non-negative value indicating the number of available devices or,\n a PaErrorCode (which are always negative) if PortAudio is not initialized\n or an error is encountered.\n*/\nPaDeviceIndex Pa_GetDeviceCount( void );\n\n\n/** Retrieve the index of the default input device. The result can be\n used in the inputDevice parameter to Pa_OpenStream().\n\n @return The default input device index for the default host API, or paNoDevice\n if no default input device is available or an error was encountered.\n*/\nPaDeviceIndex Pa_GetDefaultInputDevice( void );\n\n\n/** Retrieve the index of the default output device. The result can be\n used in the outputDevice parameter to Pa_OpenStream().\n\n @return The default output device index for the default host API, or paNoDevice\n if no default output device is available or an error was encountered.\n\n @note\n On the PC, the user can specify a default device by\n setting an environment variable. For example, to use device #1.\n<pre>\n set PA_RECOMMENDED_OUTPUT_DEVICE=1\n</pre>\n The user should first determine the available device ids by using\n the supplied application \"pa_devs\".\n*/\nPaDeviceIndex Pa_GetDefaultOutputDevice( void );\n\n\n/** The type used to represent monotonic time in seconds. PaTime is\n used for the fields of the PaStreamCallbackTimeInfo argument to the\n PaStreamCallback and as the result of Pa_GetStreamTime().\n\n PaTime values have unspecified origin.\n\n @see PaStreamCallback, PaStreamCallbackTimeInfo, Pa_GetStreamTime\n*/\ntypedef double PaTime;\n\n\n/** A type used to specify one or more sample formats. Each value indicates\n a possible format for sound data passed to and from the stream callback,\n Pa_ReadStream and Pa_WriteStream.\n\n The standard formats paFloat32, paInt16, paInt32, paInt24, paInt8\n and aUInt8 are usually implemented by all implementations.\n\n The floating point representation (paFloat32) uses +1.0 and -1.0 as the\n maximum and minimum respectively.\n\n paUInt8 is an unsigned 8 bit format where 128 is considered \"ground\"\n\n The paNonInterleaved flag indicates that audio data is passed as an array\n of pointers to separate buffers, one buffer for each channel. Usually,\n when this flag is not used, audio data is passed as a single buffer with\n all channels interleaved.\n\n @see Pa_OpenStream, Pa_OpenDefaultStream, PaDeviceInfo\n @see paFloat32, paInt16, paInt32, paInt24, paInt8\n @see paUInt8, paCustomFormat, paNonInterleaved\n*/\ntypedef unsigned long PaSampleFormat;\n\n\n#define paFloat32        ((PaSampleFormat) 0x00000001) /**< @see PaSampleFormat */\n#define paInt32          ((PaSampleFormat) 0x00000002) /**< @see PaSampleFormat */\n#define paInt24          ((PaSampleFormat) 0x00000004) /**< Packed 24 bit format. @see PaSampleFormat */\n#define paInt16          ((PaSampleFormat) 0x00000008) /**< @see PaSampleFormat */\n#define paInt8           ((PaSampleFormat) 0x00000010) /**< @see PaSampleFormat */\n#define paUInt8          ((PaSampleFormat) 0x00000020) /**< @see PaSampleFormat */\n#define paCustomFormat   ((PaSampleFormat) 0x00010000) /**< @see PaSampleFormat */\n\n#define paNonInterleaved ((PaSampleFormat) 0x80000000) /**< @see PaSampleFormat */\n\n/** A structure providing information and capabilities of PortAudio devices.\n Devices may support input, output or both input and output.\n*/\ntypedef struct PaDeviceInfo\n{\n    int structVersion;  /* this is struct version 2 */\n    const char *name;\n    PaHostApiIndex hostApi; /**< note this is a host API index, not a type id*/\n\n    int maxInputChannels;\n    int maxOutputChannels;\n\n    /** Default latency values for interactive performance. */\n    PaTime defaultLowInputLatency;\n    PaTime defaultLowOutputLatency;\n    /** Default latency values for robust non-interactive applications (eg. playing sound files). */\n    PaTime defaultHighInputLatency;\n    PaTime defaultHighOutputLatency;\n\n    double defaultSampleRate;\n} PaDeviceInfo;\n\n\n/** Retrieve a pointer to a PaDeviceInfo structure containing information\n about the specified device.\n @return A pointer to an immutable PaDeviceInfo structure. If the device\n parameter is out of range the function returns NULL.\n\n @param device A valid device index in the range 0 to (Pa_GetDeviceCount()-1)\n\n @note PortAudio manages the memory referenced by the returned pointer,\n the client must not manipulate or free the memory. The pointer is only\n guaranteed to be valid between calls to Pa_Initialize() and Pa_Terminate().\n\n @see PaDeviceInfo, PaDeviceIndex\n*/\nconst PaDeviceInfo* Pa_GetDeviceInfo( PaDeviceIndex device );\n\n\n/** Parameters for one direction (input or output) of a stream.\n*/\ntypedef struct PaStreamParameters\n{\n    /** A valid device index in the range 0 to (Pa_GetDeviceCount()-1)\n     specifying the device to be used or the special constant\n     paUseHostApiSpecificDeviceSpecification which indicates that the actual\n     device(s) to use are specified in hostApiSpecificStreamInfo.\n     This field must not be set to paNoDevice.\n    */\n    PaDeviceIndex device;\n\n    /** The number of channels of sound to be delivered to the\n     stream callback or accessed by Pa_ReadStream() or Pa_WriteStream().\n     It can range from 1 to the value of maxInputChannels in the\n     PaDeviceInfo record for the device specified by the device parameter.\n    */\n    int channelCount;\n\n    /** The sample format of the buffer provided to the stream callback,\n     a_ReadStream() or Pa_WriteStream(). It may be any of the formats described\n     by the PaSampleFormat enumeration.\n    */\n    PaSampleFormat sampleFormat;\n\n    /** The desired latency in seconds. Where practical, implementations should\n     configure their latency based on these parameters, otherwise they may\n     choose the closest viable latency instead. Unless the suggested latency\n     is greater than the absolute upper limit for the device implementations\n     should round the suggestedLatency up to the next practical value - ie to\n     provide an equal or higher latency than suggestedLatency wherever possible.\n     Actual latency values for an open stream may be retrieved using the\n     inputLatency and outputLatency fields of the PaStreamInfo structure\n     returned by Pa_GetStreamInfo().\n     @see default*Latency in PaDeviceInfo, *Latency in PaStreamInfo\n    */\n    PaTime suggestedLatency;\n\n    /** An optional pointer to a host api specific data structure\n     containing additional information for device setup and/or stream processing.\n     hostApiSpecificStreamInfo is never required for correct operation,\n     if not used it should be set to NULL.\n    */\n    void *hostApiSpecificStreamInfo;\n\n} PaStreamParameters;\n\n\n/** Return code for Pa_IsFormatSupported indicating success. */\n#define paFormatIsSupported (0)\n\n/** Determine whether it would be possible to open a stream with the specified\n parameters.\n\n @param inputParameters A structure that describes the input parameters used to\n open a stream. The suggestedLatency field is ignored. See PaStreamParameters\n for a description of these parameters. inputParameters must be NULL for\n output-only streams.\n\n @param outputParameters A structure that describes the output parameters used\n to open a stream. The suggestedLatency field is ignored. See PaStreamParameters\n for a description of these parameters. outputParameters must be NULL for\n input-only streams.\n\n @param sampleRate The required sampleRate. For full-duplex streams it is the\n sample rate for both input and output\n\n @return Returns 0 if the format is supported, and an error code indicating why\n the format is not supported otherwise. The constant paFormatIsSupported is\n provided to compare with the return value for success.\n\n @see paFormatIsSupported, PaStreamParameters\n*/\nPaError Pa_IsFormatSupported( const PaStreamParameters *inputParameters,\n                              const PaStreamParameters *outputParameters,\n                              double sampleRate );\n\n\n\n/* Streaming types and functions */\n\n\n/**\n A single PaStream can provide multiple channels of real-time\n streaming audio input and output to a client application. A stream\n provides access to audio hardware represented by one or more\n PaDevices. Depending on the underlying Host API, it may be possible\n to open multiple streams using the same device, however this behavior\n is implementation defined. Portable applications should assume that\n a PaDevice may be simultaneously used by at most one PaStream.\n\n Pointers to PaStream objects are passed between PortAudio functions that\n operate on streams.\n\n @see Pa_OpenStream, Pa_OpenDefaultStream, Pa_OpenDefaultStream, Pa_CloseStream,\n Pa_StartStream, Pa_StopStream, Pa_AbortStream, Pa_IsStreamActive,\n Pa_GetStreamTime, Pa_GetStreamCpuLoad\n\n*/\ntypedef void PaStream;\n\n\n/** Can be passed as the framesPerBuffer parameter to Pa_OpenStream()\n or Pa_OpenDefaultStream() to indicate that the stream callback will\n accept buffers of any size.\n*/\n#define paFramesPerBufferUnspecified  (0)\n\n\n/** Flags used to control the behavior of a stream. They are passed as\n parameters to Pa_OpenStream or Pa_OpenDefaultStream. Multiple flags may be\n ORed together.\n\n @see Pa_OpenStream, Pa_OpenDefaultStream\n @see paNoFlag, paClipOff, paDitherOff, paNeverDropInput,\n  paPrimeOutputBuffersUsingStreamCallback, paPlatformSpecificFlags\n*/\ntypedef unsigned long PaStreamFlags;\n\n/** @see PaStreamFlags */\n#define   paNoFlag          ((PaStreamFlags) 0)\n\n/** Disable default clipping of out of range samples.\n @see PaStreamFlags\n*/\n#define   paClipOff         ((PaStreamFlags) 0x00000001)\n\n/** Disable default dithering.\n @see PaStreamFlags\n*/\n#define   paDitherOff       ((PaStreamFlags) 0x00000002)\n\n/** Flag requests that where possible a full duplex stream will not discard\n overflowed input samples without calling the stream callback. This flag is\n only valid for full duplex callback streams and only when used in combination\n with the paFramesPerBufferUnspecified (0) framesPerBuffer parameter. Using\n this flag incorrectly results in a paInvalidFlag error being returned from\n Pa_OpenStream and Pa_OpenDefaultStream.\n\n @see PaStreamFlags, paFramesPerBufferUnspecified\n*/\n#define   paNeverDropInput  ((PaStreamFlags) 0x00000004)\n\n/** Call the stream callback to fill initial output buffers, rather than the\n default behavior of priming the buffers with zeros (silence). This flag has\n no effect for input-only and blocking read/write streams.\n\n @see PaStreamFlags\n*/\n#define   paPrimeOutputBuffersUsingStreamCallback ((PaStreamFlags) 0x00000008)\n\n/** A mask specifying the platform specific bits.\n @see PaStreamFlags\n*/\n#define   paPlatformSpecificFlags ((PaStreamFlags)0xFFFF0000)\n\n/**\n Timing information for the buffers passed to the stream callback.\n\n Time values are expressed in seconds and are synchronised with the time base used by Pa_GetStreamTime() for the associated stream.\n\n @see PaStreamCallback, Pa_GetStreamTime\n*/\ntypedef struct PaStreamCallbackTimeInfo{\n    PaTime inputBufferAdcTime;  /**< The time when the first sample of the input buffer was captured at the ADC input */\n    PaTime currentTime;         /**< The time when the stream callback was invoked */\n    PaTime outputBufferDacTime; /**< The time when the first sample of the output buffer will output the DAC */\n} PaStreamCallbackTimeInfo;\n\n\n/**\n Flag bit constants for the statusFlags to PaStreamCallback.\n\n @see paInputUnderflow, paInputOverflow, paOutputUnderflow, paOutputOverflow,\n paPrimingOutput\n*/\ntypedef unsigned long PaStreamCallbackFlags;\n\n/** In a stream opened with paFramesPerBufferUnspecified, indicates that\n input data is all silence (zeros) because no real data is available. In a\n stream opened without paFramesPerBufferUnspecified, it indicates that one or\n more zero samples have been inserted into the input buffer to compensate\n for an input underflow.\n @see PaStreamCallbackFlags\n*/\n#define paInputUnderflow   ((PaStreamCallbackFlags) 0x00000001)\n\n/** In a stream opened with paFramesPerBufferUnspecified, indicates that data\n prior to the first sample of the input buffer was discarded due to an\n overflow, possibly because the stream callback is using too much CPU time.\n Otherwise indicates that data prior to one or more samples in the\n input buffer was discarded.\n @see PaStreamCallbackFlags\n*/\n#define paInputOverflow    ((PaStreamCallbackFlags) 0x00000002)\n\n/** Indicates that output data (or a gap) was inserted, possibly because the\n stream callback is using too much CPU time.\n @see PaStreamCallbackFlags\n*/\n#define paOutputUnderflow  ((PaStreamCallbackFlags) 0x00000004)\n\n/** Indicates that output data will be discarded because no room is available.\n @see PaStreamCallbackFlags\n*/\n#define paOutputOverflow   ((PaStreamCallbackFlags) 0x00000008)\n\n/** Some of all of the output data will be used to prime the stream, input\n data may be zero.\n @see PaStreamCallbackFlags\n*/\n#define paPrimingOutput    ((PaStreamCallbackFlags) 0x00000010)\n\n/**\n Allowable return values for the PaStreamCallback.\n @see PaStreamCallback\n*/\ntypedef enum PaStreamCallbackResult\n{\n    paContinue=0,   /**< Signal that the stream should continue invoking the callback and processing audio. */\n    paComplete=1,   /**< Signal that the stream should stop invoking the callback and finish once all output samples have played. */\n    paAbort=2       /**< Signal that the stream should stop invoking the callback and finish as soon as possible. */\n} PaStreamCallbackResult;\n\n\n/**\n Functions of type PaStreamCallback are implemented by PortAudio clients.\n They consume, process or generate audio in response to requests from an\n active PortAudio stream.\n\n When a stream is running, PortAudio calls the stream callback periodically.\n The callback function is responsible for processing buffers of audio samples\n passed via the input and output parameters.\n\n The PortAudio stream callback runs at very high or real-time priority.\n It is required to consistently meet its time deadlines. Do not allocate\n memory, access the file system, call library functions or call other functions\n from the stream callback that may block or take an unpredictable amount of\n time to complete.\n\n In order for a stream to maintain glitch-free operation the callback\n must consume and return audio data faster than it is recorded and/or\n played. PortAudio anticipates that each callback invocation may execute for\n a duration approaching the duration of frameCount audio frames at the stream\n sample rate. It is reasonable to expect to be able to utilise 70% or more of\n the available CPU time in the PortAudio callback. However, due to buffer size\n adaption and other factors, not all host APIs are able to guarantee audio\n stability under heavy CPU load with arbitrary fixed callback buffer sizes.\n When high callback CPU utilisation is required the most robust behavior\n can be achieved by using paFramesPerBufferUnspecified as the\n Pa_OpenStream() framesPerBuffer parameter.\n\n @param input and @param output are either arrays of interleaved samples or;\n if non-interleaved samples were requested using the paNonInterleaved sample\n format flag, an array of buffer pointers, one non-interleaved buffer for\n each channel.\n\n The format, packing and number of channels used by the buffers are\n determined by parameters to Pa_OpenStream().\n\n @param frameCount The number of sample frames to be processed by\n the stream callback.\n\n @param timeInfo Timestamps indicating the ADC capture time of the first sample\n in the input buffer, the DAC output time of the first sample in the output buffer\n and the time the callback was invoked.\n See PaStreamCallbackTimeInfo and Pa_GetStreamTime()\n\n @param statusFlags Flags indicating whether input and/or output buffers\n have been inserted or will be dropped to overcome underflow or overflow\n conditions.\n\n @param userData The value of a user supplied pointer passed to\n Pa_OpenStream() intended for storing synthesis data etc.\n\n @return\n The stream callback should return one of the values in the\n ::PaStreamCallbackResult enumeration. To ensure that the callback continues\n to be called, it should return paContinue (0). Either paComplete or paAbort\n can be returned to finish stream processing, after either of these values is\n returned the callback will not be called again. If paAbort is returned the\n stream will finish as soon as possible. If paComplete is returned, the stream\n will continue until all buffers generated by the callback have been played.\n This may be useful in applications such as soundfile players where a specific\n duration of output is required. However, it is not necessary to utilize this\n mechanism as Pa_StopStream(), Pa_AbortStream() or Pa_CloseStream() can also\n be used to stop the stream. The callback must always fill the entire output\n buffer irrespective of its return value.\n\n @see Pa_OpenStream, Pa_OpenDefaultStream\n\n @note With the exception of Pa_GetStreamCpuLoad() it is not permissible to call\n PortAudio API functions from within the stream callback.\n*/\ntypedef int PaStreamCallback(\n    const void *input, void *output,\n    unsigned long frameCount,\n    const PaStreamCallbackTimeInfo* timeInfo,\n    PaStreamCallbackFlags statusFlags,\n    void *userData );\n\n\n/** Opens a stream for either input, output or both.\n\n @param stream The address of a PaStream pointer which will receive\n a pointer to the newly opened stream.\n\n @param inputParameters A structure that describes the input parameters used by\n the opened stream. See PaStreamParameters for a description of these parameters.\n inputParameters must be NULL for output-only streams.\n\n @param outputParameters A structure that describes the output parameters used by\n the opened stream. See PaStreamParameters for a description of these parameters.\n outputParameters must be NULL for input-only streams.\n\n @param sampleRate The desired sampleRate. For full-duplex streams it is the\n sample rate for both input and output. Note that the actual sampleRate\n may differ very slightly from the desired rate because of hardware limitations.\n The exact rate can be queried using Pa_GetStreamInfo(). If nothing close\n to the desired sampleRate is available then the open will fail and return an error.\n\n @param framesPerBuffer The number of frames passed to the stream callback\n function, or the preferred block granularity for a blocking read/write stream.\n The special value paFramesPerBufferUnspecified (0) may be used to request that\n the stream callback will receive an optimal (and possibly varying) number of\n frames based on host requirements and the requested latency settings.\n Note: With some host APIs, the use of non-zero framesPerBuffer for a callback\n stream may introduce an additional layer of buffering which could introduce\n additional latency. PortAudio guarantees that the additional latency\n will be kept to the theoretical minimum however, it is strongly recommended\n that a non-zero framesPerBuffer value only be used when your algorithm\n requires a fixed number of frames per stream callback.\n\n @param streamFlags Flags which modify the behavior of the streaming process.\n This parameter may contain a combination of flags ORed together. Some flags may\n only be relevant to certain buffer formats.\n\n @param streamCallback A pointer to a client supplied function that is responsible\n for processing and filling input and output buffers. If this parameter is NULL\n the stream will be opened in 'blocking read/write' mode. In blocking mode,\n the client can receive sample data using Pa_ReadStream and write sample data\n using Pa_WriteStream, the number of samples that may be read or written\n without blocking is returned by Pa_GetStreamReadAvailable and\n Pa_GetStreamWriteAvailable respectively.\n\n @param userData A client supplied pointer which is passed to the stream callback\n function. It could for example, contain a pointer to instance data necessary\n for processing the audio buffers. This parameter is ignored if streamCallback\n is NULL.\n\n @return\n Upon success Pa_OpenStream() returns paNoError and places a pointer to a\n valid PaStream in the stream argument. The stream is inactive (stopped).\n If a call to Pa_OpenStream() fails, a non-zero error code is returned (see\n PaError for possible error codes) and the value of stream is invalid.\n\n @see PaStreamParameters, PaStreamCallback, Pa_ReadStream, Pa_WriteStream,\n Pa_GetStreamReadAvailable, Pa_GetStreamWriteAvailable\n*/\nPaError Pa_OpenStream( PaStream** stream,\n                       const PaStreamParameters *inputParameters,\n                       const PaStreamParameters *outputParameters,\n                       double sampleRate,\n                       unsigned long framesPerBuffer,\n                       PaStreamFlags streamFlags,\n                       PaStreamCallback *streamCallback,\n                       void *userData );\n\n\n/** A simplified version of Pa_OpenStream() that opens the default input\n and/or output devices.\n\n @param stream The address of a PaStream pointer which will receive\n a pointer to the newly opened stream.\n\n @param numInputChannels  The number of channels of sound that will be supplied\n to the stream callback or returned by Pa_ReadStream. It can range from 1 to\n the value of maxInputChannels in the PaDeviceInfo record for the default input\n device. If 0 the stream is opened as an output-only stream.\n\n @param numOutputChannels The number of channels of sound to be delivered to the\n stream callback or passed to Pa_WriteStream. It can range from 1 to the value\n of maxOutputChannels in the PaDeviceInfo record for the default output device.\n If 0 the stream is opened as an output-only stream.\n\n @param sampleFormat The sample format of both the input and output buffers\n provided to the callback or passed to and from Pa_ReadStream and Pa_WriteStream.\n sampleFormat may be any of the formats described by the PaSampleFormat\n enumeration.\n\n @param sampleRate Same as Pa_OpenStream parameter of the same name.\n @param framesPerBuffer Same as Pa_OpenStream parameter of the same name.\n @param streamCallback Same as Pa_OpenStream parameter of the same name.\n @param userData Same as Pa_OpenStream parameter of the same name.\n\n @return As for Pa_OpenStream\n\n @see Pa_OpenStream, PaStreamCallback\n*/\nPaError Pa_OpenDefaultStream( PaStream** stream,\n                              int numInputChannels,\n                              int numOutputChannels,\n                              PaSampleFormat sampleFormat,\n                              double sampleRate,\n                              unsigned long framesPerBuffer,\n                              PaStreamCallback *streamCallback,\n                              void *userData );\n\n\n/** Closes an audio stream. If the audio stream is active it\n discards any pending buffers as if Pa_AbortStream() had been called.\n*/\nPaError Pa_CloseStream( PaStream *stream );\n\n\n/** Functions of type PaStreamFinishedCallback are implemented by PortAudio\n clients. They can be registered with a stream using the Pa_SetStreamFinishedCallback\n function. Once registered they are called when the stream becomes inactive\n (ie once a call to Pa_StopStream() will not block).\n A stream will become inactive after the stream callback returns non-zero,\n or when Pa_StopStream or Pa_AbortStream is called. For a stream providing audio\n output, if the stream callback returns paComplete, or Pa_StopStream() is called,\n the stream finished callback will not be called until all generated sample data\n has been played.\n\n @param userData The userData parameter supplied to Pa_OpenStream()\n\n @see Pa_SetStreamFinishedCallback\n*/\ntypedef void PaStreamFinishedCallback( void *userData );\n\n\n/** Register a stream finished callback function which will be called when the\n stream becomes inactive. See the description of PaStreamFinishedCallback for\n further details about when the callback will be called.\n\n @param stream a pointer to a PaStream that is in the stopped state - if the\n stream is not stopped, the stream's finished callback will remain unchanged\n and an error code will be returned.\n\n @param streamFinishedCallback a pointer to a function with the same signature\n as PaStreamFinishedCallback, that will be called when the stream becomes\n inactive. Passing NULL for this parameter will un-register a previously\n registered stream finished callback function.\n\n @return on success returns paNoError, otherwise an error code indicating the cause\n of the error.\n\n @see PaStreamFinishedCallback\n*/\nPaError Pa_SetStreamFinishedCallback( PaStream *stream, PaStreamFinishedCallback* streamFinishedCallback );\n\n\n/** Commences audio processing.\n*/\nPaError Pa_StartStream( PaStream *stream );\n\n\n/** Terminates audio processing. It waits until all pending\n audio buffers have been played before it returns.\n*/\nPaError Pa_StopStream( PaStream *stream );\n\n\n/** Terminates audio processing immediately without waiting for pending\n buffers to complete.\n*/\nPaError Pa_AbortStream( PaStream *stream );\n\n\n/** Determine whether the stream is stopped.\n A stream is considered to be stopped prior to a successful call to\n Pa_StartStream and after a successful call to Pa_StopStream or Pa_AbortStream.\n If a stream callback returns a value other than paContinue the stream is NOT\n considered to be stopped.\n\n @return Returns one (1) when the stream is stopped, zero (0) when\n the stream is running or, a PaErrorCode (which are always negative) if\n PortAudio is not initialized or an error is encountered.\n\n @see Pa_StopStream, Pa_AbortStream, Pa_IsStreamActive\n*/\nPaError Pa_IsStreamStopped( PaStream *stream );\n\n\n/** Determine whether the stream is active.\n A stream is active after a successful call to Pa_StartStream(), until it\n becomes inactive either as a result of a call to Pa_StopStream() or\n Pa_AbortStream(), or as a result of a return value other than paContinue from\n the stream callback. In the latter case, the stream is considered inactive\n after the last buffer has finished playing.\n\n @return Returns one (1) when the stream is active (ie playing or recording\n audio), zero (0) when not playing or, a PaErrorCode (which are always negative)\n if PortAudio is not initialized or an error is encountered.\n\n @see Pa_StopStream, Pa_AbortStream, Pa_IsStreamStopped\n*/\nPaError Pa_IsStreamActive( PaStream *stream );\n\n\n\n/** A structure containing unchanging information about an open stream.\n @see Pa_GetStreamInfo\n*/\n\ntypedef struct PaStreamInfo\n{\n    /** this is struct version 1 */\n    int structVersion;\n\n    /** The input latency of the stream in seconds. This value provides the most\n     accurate estimate of input latency available to the implementation. It may\n     differ significantly from the suggestedLatency value passed to Pa_OpenStream().\n     The value of this field will be zero (0.) for output-only streams.\n     @see PaTime\n    */\n    PaTime inputLatency;\n\n    /** The output latency of the stream in seconds. This value provides the most\n     accurate estimate of output latency available to the implementation. It may\n     differ significantly from the suggestedLatency value passed to Pa_OpenStream().\n     The value of this field will be zero (0.) for input-only streams.\n     @see PaTime\n    */\n    PaTime outputLatency;\n\n    /** The sample rate of the stream in Hertz (samples per second). In cases\n     where the hardware sample rate is inaccurate and PortAudio is aware of it,\n     the value of this field may be different from the sampleRate parameter\n     passed to Pa_OpenStream(). If information about the actual hardware sample\n     rate is not available, this field will have the same value as the sampleRate\n     parameter passed to Pa_OpenStream().\n    */\n    double sampleRate;\n\n} PaStreamInfo;\n\n\n/** Retrieve a pointer to a PaStreamInfo structure containing information\n about the specified stream.\n @return A pointer to an immutable PaStreamInfo structure. If the stream\n parameter is invalid, or an error is encountered, the function returns NULL.\n\n @param stream A pointer to an open stream previously created with Pa_OpenStream.\n\n @note PortAudio manages the memory referenced by the returned pointer,\n the client must not manipulate or free the memory. The pointer is only\n guaranteed to be valid until the specified stream is closed.\n\n @see PaStreamInfo\n*/\nconst PaStreamInfo* Pa_GetStreamInfo( PaStream *stream );\n\n\n/** Returns the current time in seconds for a stream according to the same clock used\n to generate callback PaStreamCallbackTimeInfo timestamps. The time values are\n monotonically increasing and have unspecified origin.\n\n Pa_GetStreamTime returns valid time values for the entire life of the stream,\n from when the stream is opened until it is closed. Starting and stopping the stream\n does not affect the passage of time returned by Pa_GetStreamTime.\n\n This time may be used for synchronizing other events to the audio stream, for\n example synchronizing audio to MIDI.\n\n @return The stream's current time in seconds, or 0 if an error occurred.\n\n @see PaTime, PaStreamCallback, PaStreamCallbackTimeInfo\n*/\nPaTime Pa_GetStreamTime( PaStream *stream );\n\n\n/** Retrieve CPU usage information for the specified stream.\n The \"CPU Load\" is a fraction of total CPU time consumed by a callback stream's\n audio processing routines including, but not limited to the client supplied\n stream callback. This function does not work with blocking read/write streams.\n\n This function may be called from the stream callback function or the\n application.\n\n @return\n A floating point value, typically between 0.0 and 1.0, where 1.0 indicates\n that the stream callback is consuming the maximum number of CPU cycles possible\n to maintain real-time operation. A value of 0.5 would imply that PortAudio and\n the stream callback was consuming roughly 50% of the available CPU time. The\n return value may exceed 1.0. A value of 0.0 will always be returned for a\n blocking read/write stream, or if an error occurs.\n*/\ndouble Pa_GetStreamCpuLoad( PaStream* stream );\n\n\n/** Read samples from an input stream. The function doesn't return until\n the entire buffer has been filled - this may involve waiting for the operating\n system to supply the data.\n\n @param stream A pointer to an open stream previously created with Pa_OpenStream.\n\n @param buffer A pointer to a buffer of sample frames. The buffer contains\n samples in the format specified by the inputParameters->sampleFormat field\n used to open the stream, and the number of channels specified by\n inputParameters->numChannels. If non-interleaved samples were requested using\n the paNonInterleaved sample format flag, buffer is a pointer to the first element\n of an array of buffer pointers, one non-interleaved buffer for each channel.\n\n @param frames The number of frames to be read into buffer. This parameter\n is not constrained to a specific range, however high performance applications\n will want to match this parameter to the framesPerBuffer parameter used\n when opening the stream.\n\n @return On success PaNoError will be returned, or PaInputOverflowed if input\n data was discarded by PortAudio after the previous call and before this call.\n*/\nPaError Pa_ReadStream( PaStream* stream,\n                       void *buffer,\n                       unsigned long frames );\n\n\n/** Write samples to an output stream. This function doesn't return until the\n entire buffer has been written - this may involve waiting for the operating\n system to consume the data.\n\n @param stream A pointer to an open stream previously created with Pa_OpenStream.\n\n @param buffer A pointer to a buffer of sample frames. The buffer contains\n samples in the format specified by the outputParameters->sampleFormat field\n used to open the stream, and the number of channels specified by\n outputParameters->numChannels. If non-interleaved samples were requested using\n the paNonInterleaved sample format flag, buffer is a pointer to the first element\n of an array of buffer pointers, one non-interleaved buffer for each channel.\n\n @param frames The number of frames to be written from buffer. This parameter\n is not constrained to a specific range, however high performance applications\n will want to match this parameter to the framesPerBuffer parameter used\n when opening the stream.\n\n @return On success PaNoError will be returned, or paOutputUnderflowed if\n additional output data was inserted after the previous call and before this\n call.\n*/\nPaError Pa_WriteStream( PaStream* stream,\n                        const void *buffer,\n                        unsigned long frames );\n\n\n/** Retrieve the number of frames that can be read from the stream without\n waiting.\n\n @return Returns a non-negative value representing the maximum number of frames\n that can be read from the stream without blocking or busy waiting or, a\n PaErrorCode (which are always negative) if PortAudio is not initialized or an\n error is encountered.\n*/\nsigned long Pa_GetStreamReadAvailable( PaStream* stream );\n\n\n/** Retrieve the number of frames that can be written to the stream without\n waiting.\n\n @return Returns a non-negative value representing the maximum number of frames\n that can be written to the stream without blocking or busy waiting or, a\n PaErrorCode (which are always negative) if PortAudio is not initialized or an\n error is encountered.\n*/\nsigned long Pa_GetStreamWriteAvailable( PaStream* stream );\n\n\n/* Miscellaneous utilities */\n\n\n/** Retrieve the size of a given sample format in bytes.\n\n @return The size in bytes of a single sample in the specified format,\n or paSampleFormatNotSupported if the format is not supported.\n*/\nPaError Pa_GetSampleSize( PaSampleFormat format );\n\n\n/** Put the caller to sleep for at least 'msec' milliseconds. This function is\n provided only as a convenience for authors of portable code (such as the tests\n and examples in the PortAudio distribution.)\n\n The function may sleep longer than requested so don't rely on this for accurate\n musical timing.\n*/\nvoid Pa_Sleep( long msec );\n\n\n\n#ifdef __cplusplus\n}\n#endif /* __cplusplus */\n#endif /* PORTAUDIO_H */\n"
  },
  {
    "path": "thirdparty/portaudio/install-sh",
    "content": "#!/bin/sh\n# install - install a program, script, or datafile\n\nscriptversion=2011-11-20.07; # UTC\n\n# This originates from X11R5 (mit/util/scripts/install.sh), which was\n# later released in X11R6 (xc/config/util/install.sh) with the\n# following copyright and license.\n#\n# Copyright (C) 1994 X Consortium\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to\n# deal in the Software without restriction, including without limitation the\n# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n# sell copies of the Software, and to permit persons to whom the Software is\n# furnished to do so, subject to the following conditions:\n#\n# The above copyright notice and this permission notice shall be included in\n# all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE\n# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN\n# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-\n# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n#\n# Except as contained in this notice, the name of the X Consortium shall not\n# be used in advertising or otherwise to promote the sale, use or other deal-\n# ings in this Software without prior written authorization from the X Consor-\n# tium.\n#\n#\n# FSF changes to this file are in the public domain.\n#\n# Calling this script install-sh is preferred over install.sh, to prevent\n# 'make' implicit rules from creating a file called install from it\n# when there is no Makefile.\n#\n# This script is compatible with the BSD install script, but was written\n# from scratch.\n\nnl='\n'\nIFS=\" \"\"\t$nl\"\n\n# set DOITPROG to echo to test this script\n\n# Don't use :- since 4.3BSD and earlier shells don't like it.\ndoit=${DOITPROG-}\nif test -z \"$doit\"; then\n  doit_exec=exec\nelse\n  doit_exec=$doit\nfi\n\n# Put in absolute file names if you don't have them in your path;\n# or use environment vars.\n\nchgrpprog=${CHGRPPROG-chgrp}\nchmodprog=${CHMODPROG-chmod}\nchownprog=${CHOWNPROG-chown}\ncmpprog=${CMPPROG-cmp}\ncpprog=${CPPROG-cp}\nmkdirprog=${MKDIRPROG-mkdir}\nmvprog=${MVPROG-mv}\nrmprog=${RMPROG-rm}\nstripprog=${STRIPPROG-strip}\n\nposix_glob='?'\ninitialize_posix_glob='\n  test \"$posix_glob\" != \"?\" || {\n    if (set -f) 2>/dev/null; then\n      posix_glob=\n    else\n      posix_glob=:\n    fi\n  }\n'\n\nposix_mkdir=\n\n# Desired mode of installed file.\nmode=0755\n\nchgrpcmd=\nchmodcmd=$chmodprog\nchowncmd=\nmvcmd=$mvprog\nrmcmd=\"$rmprog -f\"\nstripcmd=\n\nsrc=\ndst=\ndir_arg=\ndst_arg=\n\ncopy_on_change=false\nno_target_directory=\n\nusage=\"\\\nUsage: $0 [OPTION]... [-T] SRCFILE DSTFILE\n   or: $0 [OPTION]... SRCFILES... DIRECTORY\n   or: $0 [OPTION]... -t DIRECTORY SRCFILES...\n   or: $0 [OPTION]... -d DIRECTORIES...\n\nIn the 1st form, copy SRCFILE to DSTFILE.\nIn the 2nd and 3rd, copy all SRCFILES to DIRECTORY.\nIn the 4th, create DIRECTORIES.\n\nOptions:\n     --help     display this help and exit.\n     --version  display version info and exit.\n\n  -c            (ignored)\n  -C            install only if different (preserve the last data modification time)\n  -d            create directories instead of installing files.\n  -g GROUP      $chgrpprog installed files to GROUP.\n  -m MODE       $chmodprog installed files to MODE.\n  -o USER       $chownprog installed files to USER.\n  -s            $stripprog installed files.\n  -t DIRECTORY  install into DIRECTORY.\n  -T            report an error if DSTFILE is a directory.\n\nEnvironment variables override the default commands:\n  CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG\n  RMPROG STRIPPROG\n\"\n\nwhile test $# -ne 0; do\n  case $1 in\n    -c) ;;\n\n    -C) copy_on_change=true;;\n\n    -d) dir_arg=true;;\n\n    -g) chgrpcmd=\"$chgrpprog $2\"\n\tshift;;\n\n    --help) echo \"$usage\"; exit $?;;\n\n    -m) mode=$2\n\tcase $mode in\n\t  *' '* | *'\t'* | *'\n'*\t  | *'*'* | *'?'* | *'['*)\n\t    echo \"$0: invalid mode: $mode\" >&2\n\t    exit 1;;\n\tesac\n\tshift;;\n\n    -o) chowncmd=\"$chownprog $2\"\n\tshift;;\n\n    -s) stripcmd=$stripprog;;\n\n    -t) dst_arg=$2\n\t# Protect names problematic for 'test' and other utilities.\n\tcase $dst_arg in\n\t  -* | [=\\(\\)!]) dst_arg=./$dst_arg;;\n\tesac\n\tshift;;\n\n    -T) no_target_directory=true;;\n\n    --version) echo \"$0 $scriptversion\"; exit $?;;\n\n    --)\tshift\n\tbreak;;\n\n    -*)\techo \"$0: invalid option: $1\" >&2\n\texit 1;;\n\n    *)  break;;\n  esac\n  shift\ndone\n\nif test $# -ne 0 && test -z \"$dir_arg$dst_arg\"; then\n  # When -d is used, all remaining arguments are directories to create.\n  # When -t is used, the destination is already specified.\n  # Otherwise, the last argument is the destination.  Remove it from $@.\n  for arg\n  do\n    if test -n \"$dst_arg\"; then\n      # $@ is not empty: it contains at least $arg.\n      set fnord \"$@\" \"$dst_arg\"\n      shift # fnord\n    fi\n    shift # arg\n    dst_arg=$arg\n    # Protect names problematic for 'test' and other utilities.\n    case $dst_arg in\n      -* | [=\\(\\)!]) dst_arg=./$dst_arg;;\n    esac\n  done\nfi\n\nif test $# -eq 0; then\n  if test -z \"$dir_arg\"; then\n    echo \"$0: no input file specified.\" >&2\n    exit 1\n  fi\n  # It's OK to call 'install-sh -d' without argument.\n  # This can happen when creating conditional directories.\n  exit 0\nfi\n\nif test -z \"$dir_arg\"; then\n  do_exit='(exit $ret); exit $ret'\n  trap \"ret=129; $do_exit\" 1\n  trap \"ret=130; $do_exit\" 2\n  trap \"ret=141; $do_exit\" 13\n  trap \"ret=143; $do_exit\" 15\n\n  # Set umask so as not to create temps with too-generous modes.\n  # However, 'strip' requires both read and write access to temps.\n  case $mode in\n    # Optimize common cases.\n    *644) cp_umask=133;;\n    *755) cp_umask=22;;\n\n    *[0-7])\n      if test -z \"$stripcmd\"; then\n\tu_plus_rw=\n      else\n\tu_plus_rw='% 200'\n      fi\n      cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;\n    *)\n      if test -z \"$stripcmd\"; then\n\tu_plus_rw=\n      else\n\tu_plus_rw=,u+rw\n      fi\n      cp_umask=$mode$u_plus_rw;;\n  esac\nfi\n\nfor src\ndo\n  # Protect names problematic for 'test' and other utilities.\n  case $src in\n    -* | [=\\(\\)!]) src=./$src;;\n  esac\n\n  if test -n \"$dir_arg\"; then\n    dst=$src\n    dstdir=$dst\n    test -d \"$dstdir\"\n    dstdir_status=$?\n  else\n\n    # Waiting for this to be detected by the \"$cpprog $src $dsttmp\" command\n    # might cause directories to be created, which would be especially bad\n    # if $src (and thus $dsttmp) contains '*'.\n    if test ! -f \"$src\" && test ! -d \"$src\"; then\n      echo \"$0: $src does not exist.\" >&2\n      exit 1\n    fi\n\n    if test -z \"$dst_arg\"; then\n      echo \"$0: no destination specified.\" >&2\n      exit 1\n    fi\n    dst=$dst_arg\n\n    # If destination is a directory, append the input filename; won't work\n    # if double slashes aren't ignored.\n    if test -d \"$dst\"; then\n      if test -n \"$no_target_directory\"; then\n\techo \"$0: $dst_arg: Is a directory\" >&2\n\texit 1\n      fi\n      dstdir=$dst\n      dst=$dstdir/`basename \"$src\"`\n      dstdir_status=0\n    else\n      # Prefer dirname, but fall back on a substitute if dirname fails.\n      dstdir=`\n\t(dirname \"$dst\") 2>/dev/null ||\n\texpr X\"$dst\" : 'X\\(.*[^/]\\)//*[^/][^/]*/*$' \\| \\\n\t     X\"$dst\" : 'X\\(//\\)[^/]' \\| \\\n\t     X\"$dst\" : 'X\\(//\\)$' \\| \\\n\t     X\"$dst\" : 'X\\(/\\)' \\| . 2>/dev/null ||\n\techo X\"$dst\" |\n\t    sed '/^X\\(.*[^/]\\)\\/\\/*[^/][^/]*\\/*$/{\n\t\t   s//\\1/\n\t\t   q\n\t\t }\n\t\t /^X\\(\\/\\/\\)[^/].*/{\n\t\t   s//\\1/\n\t\t   q\n\t\t }\n\t\t /^X\\(\\/\\/\\)$/{\n\t\t   s//\\1/\n\t\t   q\n\t\t }\n\t\t /^X\\(\\/\\).*/{\n\t\t   s//\\1/\n\t\t   q\n\t\t }\n\t\t s/.*/./; q'\n      `\n\n      test -d \"$dstdir\"\n      dstdir_status=$?\n    fi\n  fi\n\n  obsolete_mkdir_used=false\n\n  if test $dstdir_status != 0; then\n    case $posix_mkdir in\n      '')\n\t# Create intermediate dirs using mode 755 as modified by the umask.\n\t# This is like FreeBSD 'install' as of 1997-10-28.\n\tumask=`umask`\n\tcase $stripcmd.$umask in\n\t  # Optimize common cases.\n\t  *[2367][2367]) mkdir_umask=$umask;;\n\t  .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;\n\n\t  *[0-7])\n\t    mkdir_umask=`expr $umask + 22 \\\n\t      - $umask % 100 % 40 + $umask % 20 \\\n\t      - $umask % 10 % 4 + $umask % 2\n\t    `;;\n\t  *) mkdir_umask=$umask,go-w;;\n\tesac\n\n\t# With -d, create the new directory with the user-specified mode.\n\t# Otherwise, rely on $mkdir_umask.\n\tif test -n \"$dir_arg\"; then\n\t  mkdir_mode=-m$mode\n\telse\n\t  mkdir_mode=\n\tfi\n\n\tposix_mkdir=false\n\tcase $umask in\n\t  *[123567][0-7][0-7])\n\t    # POSIX mkdir -p sets u+wx bits regardless of umask, which\n\t    # is incompatible with FreeBSD 'install' when (umask & 300) != 0.\n\t    ;;\n\t  *)\n\t    tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$\n\t    trap 'ret=$?; rmdir \"$tmpdir/d\" \"$tmpdir\" 2>/dev/null; exit $ret' 0\n\n\t    if (umask $mkdir_umask &&\n\t\texec $mkdirprog $mkdir_mode -p -- \"$tmpdir/d\") >/dev/null 2>&1\n\t    then\n\t      if test -z \"$dir_arg\" || {\n\t\t   # Check for POSIX incompatibilities with -m.\n\t\t   # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or\n\t\t   # other-writable bit of parent directory when it shouldn't.\n\t\t   # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.\n\t\t   ls_ld_tmpdir=`ls -ld \"$tmpdir\"`\n\t\t   case $ls_ld_tmpdir in\n\t\t     d????-?r-*) different_mode=700;;\n\t\t     d????-?--*) different_mode=755;;\n\t\t     *) false;;\n\t\t   esac &&\n\t\t   $mkdirprog -m$different_mode -p -- \"$tmpdir\" && {\n\t\t     ls_ld_tmpdir_1=`ls -ld \"$tmpdir\"`\n\t\t     test \"$ls_ld_tmpdir\" = \"$ls_ld_tmpdir_1\"\n\t\t   }\n\t\t }\n\t      then posix_mkdir=:\n\t      fi\n\t      rmdir \"$tmpdir/d\" \"$tmpdir\"\n\t    else\n\t      # Remove any dirs left behind by ancient mkdir implementations.\n\t      rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null\n\t    fi\n\t    trap '' 0;;\n\tesac;;\n    esac\n\n    if\n      $posix_mkdir && (\n\tumask $mkdir_umask &&\n\t$doit_exec $mkdirprog $mkdir_mode -p -- \"$dstdir\"\n      )\n    then :\n    else\n\n      # The umask is ridiculous, or mkdir does not conform to POSIX,\n      # or it failed possibly due to a race condition.  Create the\n      # directory the slow way, step by step, checking for races as we go.\n\n      case $dstdir in\n\t/*) prefix='/';;\n\t[-=\\(\\)!]*) prefix='./';;\n\t*)  prefix='';;\n      esac\n\n      eval \"$initialize_posix_glob\"\n\n      oIFS=$IFS\n      IFS=/\n      $posix_glob set -f\n      set fnord $dstdir\n      shift\n      $posix_glob set +f\n      IFS=$oIFS\n\n      prefixes=\n\n      for d\n      do\n\ttest X\"$d\" = X && continue\n\n\tprefix=$prefix$d\n\tif test -d \"$prefix\"; then\n\t  prefixes=\n\telse\n\t  if $posix_mkdir; then\n\t    (umask=$mkdir_umask &&\n\t     $doit_exec $mkdirprog $mkdir_mode -p -- \"$dstdir\") && break\n\t    # Don't fail if two instances are running concurrently.\n\t    test -d \"$prefix\" || exit 1\n\t  else\n\t    case $prefix in\n\t      *\\'*) qprefix=`echo \"$prefix\" | sed \"s/'/'\\\\\\\\\\\\\\\\''/g\"`;;\n\t      *) qprefix=$prefix;;\n\t    esac\n\t    prefixes=\"$prefixes '$qprefix'\"\n\t  fi\n\tfi\n\tprefix=$prefix/\n      done\n\n      if test -n \"$prefixes\"; then\n\t# Don't fail if two instances are running concurrently.\n\t(umask $mkdir_umask &&\n\t eval \"\\$doit_exec \\$mkdirprog $prefixes\") ||\n\t  test -d \"$dstdir\" || exit 1\n\tobsolete_mkdir_used=true\n      fi\n    fi\n  fi\n\n  if test -n \"$dir_arg\"; then\n    { test -z \"$chowncmd\" || $doit $chowncmd \"$dst\"; } &&\n    { test -z \"$chgrpcmd\" || $doit $chgrpcmd \"$dst\"; } &&\n    { test \"$obsolete_mkdir_used$chowncmd$chgrpcmd\" = false ||\n      test -z \"$chmodcmd\" || $doit $chmodcmd $mode \"$dst\"; } || exit 1\n  else\n\n    # Make a couple of temp file names in the proper directory.\n    dsttmp=$dstdir/_inst.$$_\n    rmtmp=$dstdir/_rm.$$_\n\n    # Trap to clean up those temp files at exit.\n    trap 'ret=$?; rm -f \"$dsttmp\" \"$rmtmp\" && exit $ret' 0\n\n    # Copy the file name to the temp name.\n    (umask $cp_umask && $doit_exec $cpprog \"$src\" \"$dsttmp\") &&\n\n    # and set any options; do chmod last to preserve setuid bits.\n    #\n    # If any of these fail, we abort the whole thing.  If we want to\n    # ignore errors from any of these, just make sure not to ignore\n    # errors from the above \"$doit $cpprog $src $dsttmp\" command.\n    #\n    { test -z \"$chowncmd\" || $doit $chowncmd \"$dsttmp\"; } &&\n    { test -z \"$chgrpcmd\" || $doit $chgrpcmd \"$dsttmp\"; } &&\n    { test -z \"$stripcmd\" || $doit $stripcmd \"$dsttmp\"; } &&\n    { test -z \"$chmodcmd\" || $doit $chmodcmd $mode \"$dsttmp\"; } &&\n\n    # If -C, don't bother to copy if it wouldn't change the file.\n    if $copy_on_change &&\n       old=`LC_ALL=C ls -dlL \"$dst\"\t2>/dev/null` &&\n       new=`LC_ALL=C ls -dlL \"$dsttmp\"\t2>/dev/null` &&\n\n       eval \"$initialize_posix_glob\" &&\n       $posix_glob set -f &&\n       set X $old && old=:$2:$4:$5:$6 &&\n       set X $new && new=:$2:$4:$5:$6 &&\n       $posix_glob set +f &&\n\n       test \"$old\" = \"$new\" &&\n       $cmpprog \"$dst\" \"$dsttmp\" >/dev/null 2>&1\n    then\n      rm -f \"$dsttmp\"\n    else\n      # Rename the file to the real destination.\n      $doit $mvcmd -f \"$dsttmp\" \"$dst\" 2>/dev/null ||\n\n      # The rename failed, perhaps because mv can't rename something else\n      # to itself, or perhaps because mv is so ancient that it does not\n      # support -f.\n      {\n\t# Now remove or move aside any old file at destination location.\n\t# We try this two ways since rm can't unlink itself on some\n\t# systems and the destination file might be busy for other\n\t# reasons.  In this case, the final cleanup might fail but the new\n\t# file should still install successfully.\n\t{\n\t  test ! -f \"$dst\" ||\n\t  $doit $rmcmd -f \"$dst\" 2>/dev/null ||\n\t  { $doit $mvcmd -f \"$dst\" \"$rmtmp\" 2>/dev/null &&\n\t    { $doit $rmcmd -f \"$rmtmp\" 2>/dev/null; :; }\n\t  } ||\n\t  { echo \"$0: cannot unlink or rename $dst\" >&2\n\t    (exit 1); exit 1\n\t  }\n\t} &&\n\n\t# Now rename the file to the real destination.\n\t$doit $mvcmd \"$dsttmp\" \"$dst\"\n      }\n    fi || exit 1\n\n    trap '' 0\n  fi\ndone\n\n# Local variables:\n# eval: (add-hook 'write-file-hooks 'time-stamp)\n# time-stamp-start: \"scriptversion=\"\n# time-stamp-format: \"%:y-%02m-%02d.%02H\"\n# time-stamp-time-zone: \"UTC\"\n# time-stamp-end: \"; # UTC\"\n# End:\n"
  },
  {
    "path": "thirdparty/portaudio/ltmain.sh",
    "content": "\n# libtool (GNU libtool) 2.4.2\n# Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996\n\n# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006,\n# 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.\n# This is free software; see the source for copying conditions.  There is NO\n# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n# GNU Libtool is free software; you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation; either version 2 of the License, or\n# (at your option) any later version.\n#\n# As a special exception to the GNU General Public License,\n# if you distribute this file as part of a program or library that\n# is built using GNU Libtool, you may include this file under the\n# same distribution terms that you use for the rest of that program.\n#\n# GNU Libtool is distributed in the hope that it will be useful, but\n# WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n# General Public License for more details.\n#\n# You should have received a copy of the GNU General Public License\n# along with GNU Libtool; see the file COPYING.  If not, a copy\n# can be downloaded from http://www.gnu.org/licenses/gpl.html,\n# or obtained by writing to the Free Software Foundation, Inc.,\n# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n\n# Usage: $progname [OPTION]... [MODE-ARG]...\n#\n# Provide generalized library-building support services.\n#\n#       --config             show all configuration variables\n#       --debug              enable verbose shell tracing\n#   -n, --dry-run            display commands without modifying any files\n#       --features           display basic configuration information and exit\n#       --mode=MODE          use operation mode MODE\n#       --preserve-dup-deps  don't remove duplicate dependency libraries\n#       --quiet, --silent    don't print informational messages\n#       --no-quiet, --no-silent\n#                            print informational messages (default)\n#       --no-warn            don't display warning messages\n#       --tag=TAG            use configuration variables from tag TAG\n#   -v, --verbose            print more informational messages than default\n#       --no-verbose         don't print the extra informational messages\n#       --version            print version information\n#   -h, --help, --help-all   print short, long, or detailed help message\n#\n# MODE must be one of the following:\n#\n#         clean              remove files from the build directory\n#         compile            compile a source file into a libtool object\n#         execute            automatically set library path, then run a program\n#         finish             complete the installation of libtool libraries\n#         install            install libraries or executables\n#         link               create a library or an executable\n#         uninstall          remove libraries from an installed directory\n#\n# MODE-ARGS vary depending on the MODE.  When passed as first option,\n# `--mode=MODE' may be abbreviated as `MODE' or a unique abbreviation of that.\n# Try `$progname --help --mode=MODE' for a more detailed description of MODE.\n#\n# When reporting a bug, please describe a test case to reproduce it and\n# include the following information:\n#\n#         host-triplet:\t$host\n#         shell:\t\t$SHELL\n#         compiler:\t\t$LTCC\n#         compiler flags:\t\t$LTCFLAGS\n#         linker:\t\t$LD (gnu? $with_gnu_ld)\n#         $progname:\t(GNU libtool) 2.4.2 Debian-2.4.2-1.7ubuntu1\n#         automake:\t$automake_version\n#         autoconf:\t$autoconf_version\n#\n# Report bugs to <bug-libtool@gnu.org>.\n# GNU libtool home page: <http://www.gnu.org/software/libtool/>.\n# General help using GNU software: <http://www.gnu.org/gethelp/>.\n\nPROGRAM=libtool\nPACKAGE=libtool\nVERSION=\"2.4.2 Debian-2.4.2-1.7ubuntu1\"\nTIMESTAMP=\"\"\npackage_revision=1.3337\n\n# Be Bourne compatible\nif test -n \"${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then\n  emulate sh\n  NULLCMD=:\n  # Zsh 3.x and 4.x performs word splitting on ${1+\"$@\"}, which\n  # is contrary to our usage.  Disable this feature.\n  alias -g '${1+\"$@\"}'='\"$@\"'\n  setopt NO_GLOB_SUBST\nelse\n  case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac\nfi\nBIN_SH=xpg4; export BIN_SH # for Tru64\nDUALCASE=1; export DUALCASE # for MKS sh\n\n# A function that is used when there is no print builtin or printf.\nfunc_fallback_echo ()\n{\n  eval 'cat <<_LTECHO_EOF\n$1\n_LTECHO_EOF'\n}\n\n# NLS nuisances: We save the old values to restore during execute mode.\nlt_user_locale=\nlt_safe_locale=\nfor lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES\ndo\n  eval \"if test \\\"\\${$lt_var+set}\\\" = set; then\n          save_$lt_var=\\$$lt_var\n          $lt_var=C\n\t  export $lt_var\n\t  lt_user_locale=\\\"$lt_var=\\\\\\$save_\\$lt_var; \\$lt_user_locale\\\"\n\t  lt_safe_locale=\\\"$lt_var=C; \\$lt_safe_locale\\\"\n\tfi\"\ndone\nLC_ALL=C\nLANGUAGE=C\nexport LANGUAGE LC_ALL\n\n$lt_unset CDPATH\n\n\n# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh\n# is ksh but when the shell is invoked as \"sh\" and the current value of\n# the _XPG environment variable is not equal to 1 (one), the special\n# positional parameter $0, within a function call, is the name of the\n# function.\nprogpath=\"$0\"\n\n\n\n: ${CP=\"cp -f\"}\ntest \"${ECHO+set}\" = set || ECHO=${as_echo-'printf %s\\n'}\n: ${MAKE=\"make\"}\n: ${MKDIR=\"mkdir\"}\n: ${MV=\"mv -f\"}\n: ${RM=\"rm -f\"}\n: ${SHELL=\"${CONFIG_SHELL-/bin/sh}\"}\n: ${Xsed=\"$SED -e 1s/^X//\"}\n\n# Global variables:\nEXIT_SUCCESS=0\nEXIT_FAILURE=1\nEXIT_MISMATCH=63  # $? = 63 is used to indicate version mismatch to missing.\nEXIT_SKIP=77\t  # $? = 77 is used to indicate a skipped test to automake.\n\nexit_status=$EXIT_SUCCESS\n\n# Make sure IFS has a sensible default\nlt_nl='\n'\nIFS=\" \t$lt_nl\"\n\ndirname=\"s,/[^/]*$,,\"\nbasename=\"s,^.*/,,\"\n\n# func_dirname file append nondir_replacement\n# Compute the dirname of FILE.  If nonempty, add APPEND to the result,\n# otherwise set result to NONDIR_REPLACEMENT.\nfunc_dirname ()\n{\n    func_dirname_result=`$ECHO \"${1}\" | $SED \"$dirname\"`\n    if test \"X$func_dirname_result\" = \"X${1}\"; then\n      func_dirname_result=\"${3}\"\n    else\n      func_dirname_result=\"$func_dirname_result${2}\"\n    fi\n} # func_dirname may be replaced by extended shell implementation\n\n\n# func_basename file\nfunc_basename ()\n{\n    func_basename_result=`$ECHO \"${1}\" | $SED \"$basename\"`\n} # func_basename may be replaced by extended shell implementation\n\n\n# func_dirname_and_basename file append nondir_replacement\n# perform func_basename and func_dirname in a single function\n# call:\n#   dirname:  Compute the dirname of FILE.  If nonempty,\n#             add APPEND to the result, otherwise set result\n#             to NONDIR_REPLACEMENT.\n#             value returned in \"$func_dirname_result\"\n#   basename: Compute filename of FILE.\n#             value returned in \"$func_basename_result\"\n# Implementation must be kept synchronized with func_dirname\n# and func_basename. For efficiency, we do not delegate to\n# those functions but instead duplicate the functionality here.\nfunc_dirname_and_basename ()\n{\n    # Extract subdirectory from the argument.\n    func_dirname_result=`$ECHO \"${1}\" | $SED -e \"$dirname\"`\n    if test \"X$func_dirname_result\" = \"X${1}\"; then\n      func_dirname_result=\"${3}\"\n    else\n      func_dirname_result=\"$func_dirname_result${2}\"\n    fi\n    func_basename_result=`$ECHO \"${1}\" | $SED -e \"$basename\"`\n} # func_dirname_and_basename may be replaced by extended shell implementation\n\n\n# func_stripname prefix suffix name\n# strip PREFIX and SUFFIX off of NAME.\n# PREFIX and SUFFIX must not contain globbing or regex special\n# characters, hashes, percent signs, but SUFFIX may contain a leading\n# dot (in which case that matches only a dot).\n# func_strip_suffix prefix name\nfunc_stripname ()\n{\n    case ${2} in\n      .*) func_stripname_result=`$ECHO \"${3}\" | $SED \"s%^${1}%%; s%\\\\\\\\${2}\\$%%\"`;;\n      *)  func_stripname_result=`$ECHO \"${3}\" | $SED \"s%^${1}%%; s%${2}\\$%%\"`;;\n    esac\n} # func_stripname may be replaced by extended shell implementation\n\n\n# These SED scripts presuppose an absolute path with a trailing slash.\npathcar='s,^/\\([^/]*\\).*$,\\1,'\npathcdr='s,^/[^/]*,,'\nremovedotparts=':dotsl\n\t\ts@/\\./@/@g\n\t\tt dotsl\n\t\ts,/\\.$,/,'\ncollapseslashes='s@/\\{1,\\}@/@g'\nfinalslash='s,/*$,/,'\n\n# func_normal_abspath PATH\n# Remove doubled-up and trailing slashes, \".\" path components,\n# and cancel out any \"..\" path components in PATH after making\n# it an absolute path.\n#             value returned in \"$func_normal_abspath_result\"\nfunc_normal_abspath ()\n{\n  # Start from root dir and reassemble the path.\n  func_normal_abspath_result=\n  func_normal_abspath_tpath=$1\n  func_normal_abspath_altnamespace=\n  case $func_normal_abspath_tpath in\n    \"\")\n      # Empty path, that just means $cwd.\n      func_stripname '' '/' \"`pwd`\"\n      func_normal_abspath_result=$func_stripname_result\n      return\n    ;;\n    # The next three entries are used to spot a run of precisely\n    # two leading slashes without using negated character classes;\n    # we take advantage of case's first-match behaviour.\n    ///*)\n      # Unusual form of absolute path, do nothing.\n    ;;\n    //*)\n      # Not necessarily an ordinary path; POSIX reserves leading '//'\n      # and for example Cygwin uses it to access remote file shares\n      # over CIFS/SMB, so we conserve a leading double slash if found.\n      func_normal_abspath_altnamespace=/\n    ;;\n    /*)\n      # Absolute path, do nothing.\n    ;;\n    *)\n      # Relative path, prepend $cwd.\n      func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath\n    ;;\n  esac\n  # Cancel out all the simple stuff to save iterations.  We also want\n  # the path to end with a slash for ease of parsing, so make sure\n  # there is one (and only one) here.\n  func_normal_abspath_tpath=`$ECHO \"$func_normal_abspath_tpath\" | $SED \\\n        -e \"$removedotparts\" -e \"$collapseslashes\" -e \"$finalslash\"`\n  while :; do\n    # Processed it all yet?\n    if test \"$func_normal_abspath_tpath\" = / ; then\n      # If we ascended to the root using \"..\" the result may be empty now.\n      if test -z \"$func_normal_abspath_result\" ; then\n        func_normal_abspath_result=/\n      fi\n      break\n    fi\n    func_normal_abspath_tcomponent=`$ECHO \"$func_normal_abspath_tpath\" | $SED \\\n        -e \"$pathcar\"`\n    func_normal_abspath_tpath=`$ECHO \"$func_normal_abspath_tpath\" | $SED \\\n        -e \"$pathcdr\"`\n    # Figure out what to do with it\n    case $func_normal_abspath_tcomponent in\n      \"\")\n        # Trailing empty path component, ignore it.\n      ;;\n      ..)\n        # Parent dir; strip last assembled component from result.\n        func_dirname \"$func_normal_abspath_result\"\n        func_normal_abspath_result=$func_dirname_result\n      ;;\n      *)\n        # Actual path component, append it.\n        func_normal_abspath_result=$func_normal_abspath_result/$func_normal_abspath_tcomponent\n      ;;\n    esac\n  done\n  # Restore leading double-slash if one was found on entry.\n  func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result\n}\n\n# func_relative_path SRCDIR DSTDIR\n# generates a relative path from SRCDIR to DSTDIR, with a trailing\n# slash if non-empty, suitable for immediately appending a filename\n# without needing to append a separator.\n#             value returned in \"$func_relative_path_result\"\nfunc_relative_path ()\n{\n  func_relative_path_result=\n  func_normal_abspath \"$1\"\n  func_relative_path_tlibdir=$func_normal_abspath_result\n  func_normal_abspath \"$2\"\n  func_relative_path_tbindir=$func_normal_abspath_result\n\n  # Ascend the tree starting from libdir\n  while :; do\n    # check if we have found a prefix of bindir\n    case $func_relative_path_tbindir in\n      $func_relative_path_tlibdir)\n        # found an exact match\n        func_relative_path_tcancelled=\n        break\n        ;;\n      $func_relative_path_tlibdir*)\n        # found a matching prefix\n        func_stripname \"$func_relative_path_tlibdir\" '' \"$func_relative_path_tbindir\"\n        func_relative_path_tcancelled=$func_stripname_result\n        if test -z \"$func_relative_path_result\"; then\n          func_relative_path_result=.\n        fi\n        break\n        ;;\n      *)\n        func_dirname $func_relative_path_tlibdir\n        func_relative_path_tlibdir=${func_dirname_result}\n        if test \"x$func_relative_path_tlibdir\" = x ; then\n          # Have to descend all the way to the root!\n          func_relative_path_result=../$func_relative_path_result\n          func_relative_path_tcancelled=$func_relative_path_tbindir\n          break\n        fi\n        func_relative_path_result=../$func_relative_path_result\n        ;;\n    esac\n  done\n\n  # Now calculate path; take care to avoid doubling-up slashes.\n  func_stripname '' '/' \"$func_relative_path_result\"\n  func_relative_path_result=$func_stripname_result\n  func_stripname '/' '/' \"$func_relative_path_tcancelled\"\n  if test \"x$func_stripname_result\" != x ; then\n    func_relative_path_result=${func_relative_path_result}/${func_stripname_result}\n  fi\n\n  # Normalisation. If bindir is libdir, return empty string,\n  # else relative path ending with a slash; either way, target\n  # file name can be directly appended.\n  if test ! -z \"$func_relative_path_result\"; then\n    func_stripname './' '' \"$func_relative_path_result/\"\n    func_relative_path_result=$func_stripname_result\n  fi\n}\n\n# The name of this program:\nfunc_dirname_and_basename \"$progpath\"\nprogname=$func_basename_result\n\n# Make sure we have an absolute path for reexecution:\ncase $progpath in\n  [\\\\/]*|[A-Za-z]:\\\\*) ;;\n  *[\\\\/]*)\n     progdir=$func_dirname_result\n     progdir=`cd \"$progdir\" && pwd`\n     progpath=\"$progdir/$progname\"\n     ;;\n  *)\n     save_IFS=\"$IFS\"\n     IFS=${PATH_SEPARATOR-:}\n     for progdir in $PATH; do\n       IFS=\"$save_IFS\"\n       test -x \"$progdir/$progname\" && break\n     done\n     IFS=\"$save_IFS\"\n     test -n \"$progdir\" || progdir=`pwd`\n     progpath=\"$progdir/$progname\"\n     ;;\nesac\n\n# Sed substitution that helps us do robust quoting.  It backslashifies\n# metacharacters that are still active within double-quoted strings.\nXsed=\"${SED}\"' -e 1s/^X//'\nsed_quote_subst='s/\\([`\"$\\\\]\\)/\\\\\\1/g'\n\n# Same as above, but do not quote variable references.\ndouble_quote_subst='s/\\([\"`\\\\]\\)/\\\\\\1/g'\n\n# Sed substitution that turns a string into a regex matching for the\n# string literally.\nsed_make_literal_regex='s,[].[^$\\\\*\\/],\\\\&,g'\n\n# Sed substitution that converts a w32 file name or path\n# which contains forward slashes, into one that contains\n# (escaped) backslashes.  A very naive implementation.\nlt_sed_naive_backslashify='s|\\\\\\\\*|\\\\|g;s|/|\\\\|g;s|\\\\|\\\\\\\\|g'\n\n# Re-`\\' parameter expansions in output of double_quote_subst that were\n# `\\'-ed in input to the same.  If an odd number of `\\' preceded a '$'\n# in input to double_quote_subst, that '$' was protected from expansion.\n# Since each input `\\' is now two `\\'s, look for any number of runs of\n# four `\\'s followed by two `\\'s and then a '$'.  `\\' that '$'.\nbs='\\\\'\nbs2='\\\\\\\\'\nbs4='\\\\\\\\\\\\\\\\'\ndollar='\\$'\nsed_double_backslash=\"\\\n  s/$bs4/&\\\\\n/g\n  s/^$bs2$dollar/$bs&/\n  s/\\\\([^$bs]\\\\)$bs2$dollar/\\\\1$bs2$bs$dollar/g\n  s/\\n//g\"\n\n# Standard options:\nopt_dry_run=false\nopt_help=false\nopt_quiet=false\nopt_verbose=false\nopt_warning=:\n\n# func_echo arg...\n# Echo program name prefixed message, along with the current mode\n# name if it has been set yet.\nfunc_echo ()\n{\n    $ECHO \"$progname: ${opt_mode+$opt_mode: }$*\"\n}\n\n# func_verbose arg...\n# Echo program name prefixed message in verbose mode only.\nfunc_verbose ()\n{\n    $opt_verbose && func_echo ${1+\"$@\"}\n\n    # A bug in bash halts the script if the last line of a function\n    # fails when set -e is in force, so we need another command to\n    # work around that:\n    :\n}\n\n# func_echo_all arg...\n# Invoke $ECHO with all args, space-separated.\nfunc_echo_all ()\n{\n    $ECHO \"$*\"\n}\n\n# func_error arg...\n# Echo program name prefixed message to standard error.\nfunc_error ()\n{\n    $ECHO \"$progname: ${opt_mode+$opt_mode: }\"${1+\"$@\"} 1>&2\n}\n\n# func_warning arg...\n# Echo program name prefixed warning message to standard error.\nfunc_warning ()\n{\n    $opt_warning && $ECHO \"$progname: ${opt_mode+$opt_mode: }warning: \"${1+\"$@\"} 1>&2\n\n    # bash bug again:\n    :\n}\n\n# func_fatal_error arg...\n# Echo program name prefixed message to standard error, and exit.\nfunc_fatal_error ()\n{\n    func_error ${1+\"$@\"}\n    exit $EXIT_FAILURE\n}\n\n# func_fatal_help arg...\n# Echo program name prefixed message to standard error, followed by\n# a help hint, and exit.\nfunc_fatal_help ()\n{\n    func_error ${1+\"$@\"}\n    func_fatal_error \"$help\"\n}\nhelp=\"Try \\`$progname --help' for more information.\"  ## default\n\n\n# func_grep expression filename\n# Check whether EXPRESSION matches any line of FILENAME, without output.\nfunc_grep ()\n{\n    $GREP \"$1\" \"$2\" >/dev/null 2>&1\n}\n\n\n# func_mkdir_p directory-path\n# Make sure the entire path to DIRECTORY-PATH is available.\nfunc_mkdir_p ()\n{\n    my_directory_path=\"$1\"\n    my_dir_list=\n\n    if test -n \"$my_directory_path\" && test \"$opt_dry_run\" != \":\"; then\n\n      # Protect directory names starting with `-'\n      case $my_directory_path in\n        -*) my_directory_path=\"./$my_directory_path\" ;;\n      esac\n\n      # While some portion of DIR does not yet exist...\n      while test ! -d \"$my_directory_path\"; do\n        # ...make a list in topmost first order.  Use a colon delimited\n\t# list incase some portion of path contains whitespace.\n        my_dir_list=\"$my_directory_path:$my_dir_list\"\n\n        # If the last portion added has no slash in it, the list is done\n        case $my_directory_path in */*) ;; *) break ;; esac\n\n        # ...otherwise throw away the child directory and loop\n        my_directory_path=`$ECHO \"$my_directory_path\" | $SED -e \"$dirname\"`\n      done\n      my_dir_list=`$ECHO \"$my_dir_list\" | $SED 's,:*$,,'`\n\n      save_mkdir_p_IFS=\"$IFS\"; IFS=':'\n      for my_dir in $my_dir_list; do\n\tIFS=\"$save_mkdir_p_IFS\"\n        # mkdir can fail with a `File exist' error if two processes\n        # try to create one of the directories concurrently.  Don't\n        # stop in that case!\n        $MKDIR \"$my_dir\" 2>/dev/null || :\n      done\n      IFS=\"$save_mkdir_p_IFS\"\n\n      # Bail out if we (or some other process) failed to create a directory.\n      test -d \"$my_directory_path\" || \\\n        func_fatal_error \"Failed to create \\`$1'\"\n    fi\n}\n\n\n# func_mktempdir [string]\n# Make a temporary directory that won't clash with other running\n# libtool processes, and avoids race conditions if possible.  If\n# given, STRING is the basename for that directory.\nfunc_mktempdir ()\n{\n    my_template=\"${TMPDIR-/tmp}/${1-$progname}\"\n\n    if test \"$opt_dry_run\" = \":\"; then\n      # Return a directory name, but don't create it in dry-run mode\n      my_tmpdir=\"${my_template}-$$\"\n    else\n\n      # If mktemp works, use that first and foremost\n      my_tmpdir=`mktemp -d \"${my_template}-XXXXXXXX\" 2>/dev/null`\n\n      if test ! -d \"$my_tmpdir\"; then\n        # Failing that, at least try and use $RANDOM to avoid a race\n        my_tmpdir=\"${my_template}-${RANDOM-0}$$\"\n\n        save_mktempdir_umask=`umask`\n        umask 0077\n        $MKDIR \"$my_tmpdir\"\n        umask $save_mktempdir_umask\n      fi\n\n      # If we're not in dry-run mode, bomb out on failure\n      test -d \"$my_tmpdir\" || \\\n        func_fatal_error \"cannot create temporary directory \\`$my_tmpdir'\"\n    fi\n\n    $ECHO \"$my_tmpdir\"\n}\n\n\n# func_quote_for_eval arg\n# Aesthetically quote ARG to be evaled later.\n# This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT\n# is double-quoted, suitable for a subsequent eval, whereas\n# FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters\n# which are still active within double quotes backslashified.\nfunc_quote_for_eval ()\n{\n    case $1 in\n      *[\\\\\\`\\\"\\$]*)\n\tfunc_quote_for_eval_unquoted_result=`$ECHO \"$1\" | $SED \"$sed_quote_subst\"` ;;\n      *)\n        func_quote_for_eval_unquoted_result=\"$1\" ;;\n    esac\n\n    case $func_quote_for_eval_unquoted_result in\n      # Double-quote args containing shell metacharacters to delay\n      # word splitting, command substitution and variable\n      # expansion for a subsequent eval.\n      # Many Bourne shells cannot handle close brackets correctly\n      # in scan sets, so we specify it separately.\n      *[\\[\\~\\#\\^\\&\\*\\(\\)\\{\\}\\|\\;\\<\\>\\?\\'\\ \\\t]*|*]*|\"\")\n        func_quote_for_eval_result=\"\\\"$func_quote_for_eval_unquoted_result\\\"\"\n        ;;\n      *)\n        func_quote_for_eval_result=\"$func_quote_for_eval_unquoted_result\"\n    esac\n}\n\n\n# func_quote_for_expand arg\n# Aesthetically quote ARG to be evaled later; same as above,\n# but do not quote variable references.\nfunc_quote_for_expand ()\n{\n    case $1 in\n      *[\\\\\\`\\\"]*)\n\tmy_arg=`$ECHO \"$1\" | $SED \\\n\t    -e \"$double_quote_subst\" -e \"$sed_double_backslash\"` ;;\n      *)\n        my_arg=\"$1\" ;;\n    esac\n\n    case $my_arg in\n      # Double-quote args containing shell metacharacters to delay\n      # word splitting and command substitution for a subsequent eval.\n      # Many Bourne shells cannot handle close brackets correctly\n      # in scan sets, so we specify it separately.\n      *[\\[\\~\\#\\^\\&\\*\\(\\)\\{\\}\\|\\;\\<\\>\\?\\'\\ \\\t]*|*]*|\"\")\n        my_arg=\"\\\"$my_arg\\\"\"\n        ;;\n    esac\n\n    func_quote_for_expand_result=\"$my_arg\"\n}\n\n\n# func_show_eval cmd [fail_exp]\n# Unless opt_silent is true, then output CMD.  Then, if opt_dryrun is\n# not true, evaluate CMD.  If the evaluation of CMD fails, and FAIL_EXP\n# is given, then evaluate it.\nfunc_show_eval ()\n{\n    my_cmd=\"$1\"\n    my_fail_exp=\"${2-:}\"\n\n    ${opt_silent-false} || {\n      func_quote_for_expand \"$my_cmd\"\n      eval \"func_echo $func_quote_for_expand_result\"\n    }\n\n    if ${opt_dry_run-false}; then :; else\n      eval \"$my_cmd\"\n      my_status=$?\n      if test \"$my_status\" -eq 0; then :; else\n\teval \"(exit $my_status); $my_fail_exp\"\n      fi\n    fi\n}\n\n\n# func_show_eval_locale cmd [fail_exp]\n# Unless opt_silent is true, then output CMD.  Then, if opt_dryrun is\n# not true, evaluate CMD.  If the evaluation of CMD fails, and FAIL_EXP\n# is given, then evaluate it.  Use the saved locale for evaluation.\nfunc_show_eval_locale ()\n{\n    my_cmd=\"$1\"\n    my_fail_exp=\"${2-:}\"\n\n    ${opt_silent-false} || {\n      func_quote_for_expand \"$my_cmd\"\n      eval \"func_echo $func_quote_for_expand_result\"\n    }\n\n    if ${opt_dry_run-false}; then :; else\n      eval \"$lt_user_locale\n\t    $my_cmd\"\n      my_status=$?\n      eval \"$lt_safe_locale\"\n      if test \"$my_status\" -eq 0; then :; else\n\teval \"(exit $my_status); $my_fail_exp\"\n      fi\n    fi\n}\n\n# func_tr_sh\n# Turn $1 into a string suitable for a shell variable name.\n# Result is stored in $func_tr_sh_result.  All characters\n# not in the set a-zA-Z0-9_ are replaced with '_'. Further,\n# if $1 begins with a digit, a '_' is prepended as well.\nfunc_tr_sh ()\n{\n  case $1 in\n  [0-9]* | *[!a-zA-Z0-9_]*)\n    func_tr_sh_result=`$ECHO \"$1\" | $SED 's/^\\([0-9]\\)/_\\1/; s/[^a-zA-Z0-9_]/_/g'`\n    ;;\n  * )\n    func_tr_sh_result=$1\n    ;;\n  esac\n}\n\n\n# func_version\n# Echo version message to standard output and exit.\nfunc_version ()\n{\n    $opt_debug\n\n    $SED -n '/(C)/!b go\n\t:more\n\t/\\./!{\n\t  N\n\t  s/\\n# / /\n\t  b more\n\t}\n\t:go\n\t/^# '$PROGRAM' (GNU /,/# warranty; / {\n        s/^# //\n\ts/^# *$//\n        s/\\((C)\\)[ 0-9,-]*\\( [1-9][0-9]*\\)/\\1\\2/\n        p\n     }' < \"$progpath\"\n     exit $?\n}\n\n# func_usage\n# Echo short help message to standard output and exit.\nfunc_usage ()\n{\n    $opt_debug\n\n    $SED -n '/^# Usage:/,/^#  *.*--help/ {\n        s/^# //\n\ts/^# *$//\n\ts/\\$progname/'$progname'/\n\tp\n    }' < \"$progpath\"\n    echo\n    $ECHO \"run \\`$progname --help | more' for full usage\"\n    exit $?\n}\n\n# func_help [NOEXIT]\n# Echo long help message to standard output and exit,\n# unless 'noexit' is passed as argument.\nfunc_help ()\n{\n    $opt_debug\n\n    $SED -n '/^# Usage:/,/# Report bugs to/ {\n\t:print\n        s/^# //\n\ts/^# *$//\n\ts*\\$progname*'$progname'*\n\ts*\\$host*'\"$host\"'*\n\ts*\\$SHELL*'\"$SHELL\"'*\n\ts*\\$LTCC*'\"$LTCC\"'*\n\ts*\\$LTCFLAGS*'\"$LTCFLAGS\"'*\n\ts*\\$LD*'\"$LD\"'*\n\ts/\\$with_gnu_ld/'\"$with_gnu_ld\"'/\n\ts/\\$automake_version/'\"`(${AUTOMAKE-automake} --version) 2>/dev/null |$SED 1q`\"'/\n\ts/\\$autoconf_version/'\"`(${AUTOCONF-autoconf} --version) 2>/dev/null |$SED 1q`\"'/\n\tp\n\td\n     }\n     /^# .* home page:/b print\n     /^# General help using/b print\n     ' < \"$progpath\"\n    ret=$?\n    if test -z \"$1\"; then\n      exit $ret\n    fi\n}\n\n# func_missing_arg argname\n# Echo program name prefixed message to standard error and set global\n# exit_cmd.\nfunc_missing_arg ()\n{\n    $opt_debug\n\n    func_error \"missing argument for $1.\"\n    exit_cmd=exit\n}\n\n\n# func_split_short_opt shortopt\n# Set func_split_short_opt_name and func_split_short_opt_arg shell\n# variables after splitting SHORTOPT after the 2nd character.\nfunc_split_short_opt ()\n{\n    my_sed_short_opt='1s/^\\(..\\).*$/\\1/;q'\n    my_sed_short_rest='1s/^..\\(.*\\)$/\\1/;q'\n\n    func_split_short_opt_name=`$ECHO \"$1\" | $SED \"$my_sed_short_opt\"`\n    func_split_short_opt_arg=`$ECHO \"$1\" | $SED \"$my_sed_short_rest\"`\n} # func_split_short_opt may be replaced by extended shell implementation\n\n\n# func_split_long_opt longopt\n# Set func_split_long_opt_name and func_split_long_opt_arg shell\n# variables after splitting LONGOPT at the `=' sign.\nfunc_split_long_opt ()\n{\n    my_sed_long_opt='1s/^\\(--[^=]*\\)=.*/\\1/;q'\n    my_sed_long_arg='1s/^--[^=]*=//'\n\n    func_split_long_opt_name=`$ECHO \"$1\" | $SED \"$my_sed_long_opt\"`\n    func_split_long_opt_arg=`$ECHO \"$1\" | $SED \"$my_sed_long_arg\"`\n} # func_split_long_opt may be replaced by extended shell implementation\n\nexit_cmd=:\n\n\n\n\n\nmagic=\"%%%MAGIC variable%%%\"\nmagic_exe=\"%%%MAGIC EXE variable%%%\"\n\n# Global variables.\nnonopt=\npreserve_args=\nlo2o=\"s/\\\\.lo\\$/.${objext}/\"\no2lo=\"s/\\\\.${objext}\\$/.lo/\"\nextracted_archives=\nextracted_serial=0\n\n# If this variable is set in any of the actions, the command in it\n# will be execed at the end.  This prevents here-documents from being\n# left over by shells.\nexec_cmd=\n\n# func_append var value\n# Append VALUE to the end of shell variable VAR.\nfunc_append ()\n{\n    eval \"${1}=\\$${1}\\${2}\"\n} # func_append may be replaced by extended shell implementation\n\n# func_append_quoted var value\n# Quote VALUE and append to the end of shell variable VAR, separated\n# by a space.\nfunc_append_quoted ()\n{\n    func_quote_for_eval \"${2}\"\n    eval \"${1}=\\$${1}\\\\ \\$func_quote_for_eval_result\"\n} # func_append_quoted may be replaced by extended shell implementation\n\n\n# func_arith arithmetic-term...\nfunc_arith ()\n{\n    func_arith_result=`expr \"${@}\"`\n} # func_arith may be replaced by extended shell implementation\n\n\n# func_len string\n# STRING may not start with a hyphen.\nfunc_len ()\n{\n    func_len_result=`expr \"${1}\" : \".*\" 2>/dev/null || echo $max_cmd_len`\n} # func_len may be replaced by extended shell implementation\n\n\n# func_lo2o object\nfunc_lo2o ()\n{\n    func_lo2o_result=`$ECHO \"${1}\" | $SED \"$lo2o\"`\n} # func_lo2o may be replaced by extended shell implementation\n\n\n# func_xform libobj-or-source\nfunc_xform ()\n{\n    func_xform_result=`$ECHO \"${1}\" | $SED 's/\\.[^.]*$/.lo/'`\n} # func_xform may be replaced by extended shell implementation\n\n\n# func_fatal_configuration arg...\n# Echo program name prefixed message to standard error, followed by\n# a configuration failure hint, and exit.\nfunc_fatal_configuration ()\n{\n    func_error ${1+\"$@\"}\n    func_error \"See the $PACKAGE documentation for more information.\"\n    func_fatal_error \"Fatal configuration error.\"\n}\n\n\n# func_config\n# Display the configuration for all the tags in this script.\nfunc_config ()\n{\n    re_begincf='^# ### BEGIN LIBTOOL'\n    re_endcf='^# ### END LIBTOOL'\n\n    # Default configuration.\n    $SED \"1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\\$d\" < \"$progpath\"\n\n    # Now print the configurations for the tags.\n    for tagname in $taglist; do\n      $SED -n \"/$re_begincf TAG CONFIG: $tagname\\$/,/$re_endcf TAG CONFIG: $tagname\\$/p\" < \"$progpath\"\n    done\n\n    exit $?\n}\n\n# func_features\n# Display the features supported by this script.\nfunc_features ()\n{\n    echo \"host: $host\"\n    if test \"$build_libtool_libs\" = yes; then\n      echo \"enable shared libraries\"\n    else\n      echo \"disable shared libraries\"\n    fi\n    if test \"$build_old_libs\" = yes; then\n      echo \"enable static libraries\"\n    else\n      echo \"disable static libraries\"\n    fi\n\n    exit $?\n}\n\n# func_enable_tag tagname\n# Verify that TAGNAME is valid, and either flag an error and exit, or\n# enable the TAGNAME tag.  We also add TAGNAME to the global $taglist\n# variable here.\nfunc_enable_tag ()\n{\n  # Global variable:\n  tagname=\"$1\"\n\n  re_begincf=\"^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\\$\"\n  re_endcf=\"^# ### END LIBTOOL TAG CONFIG: $tagname\\$\"\n  sed_extractcf=\"/$re_begincf/,/$re_endcf/p\"\n\n  # Validate tagname.\n  case $tagname in\n    *[!-_A-Za-z0-9,/]*)\n      func_fatal_error \"invalid tag name: $tagname\"\n      ;;\n  esac\n\n  # Don't test for the \"default\" C tag, as we know it's\n  # there but not specially marked.\n  case $tagname in\n    CC) ;;\n    *)\n      if $GREP \"$re_begincf\" \"$progpath\" >/dev/null 2>&1; then\n\ttaglist=\"$taglist $tagname\"\n\n\t# Evaluate the configuration.  Be careful to quote the path\n\t# and the sed script, to avoid splitting on whitespace, but\n\t# also don't use non-portable quotes within backquotes within\n\t# quotes we have to do it in 2 steps:\n\textractedcf=`$SED -n -e \"$sed_extractcf\" < \"$progpath\"`\n\teval \"$extractedcf\"\n      else\n\tfunc_error \"ignoring unknown tag $tagname\"\n      fi\n      ;;\n  esac\n}\n\n# func_check_version_match\n# Ensure that we are using m4 macros, and libtool script from the same\n# release of libtool.\nfunc_check_version_match ()\n{\n  if test \"$package_revision\" != \"$macro_revision\"; then\n    if test \"$VERSION\" != \"$macro_version\"; then\n      if test -z \"$macro_version\"; then\n        cat >&2 <<_LT_EOF\n$progname: Version mismatch error.  This is $PACKAGE $VERSION, but the\n$progname: definition of this LT_INIT comes from an older release.\n$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION\n$progname: and run autoconf again.\n_LT_EOF\n      else\n        cat >&2 <<_LT_EOF\n$progname: Version mismatch error.  This is $PACKAGE $VERSION, but the\n$progname: definition of this LT_INIT comes from $PACKAGE $macro_version.\n$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION\n$progname: and run autoconf again.\n_LT_EOF\n      fi\n    else\n      cat >&2 <<_LT_EOF\n$progname: Version mismatch error.  This is $PACKAGE $VERSION, revision $package_revision,\n$progname: but the definition of this LT_INIT comes from revision $macro_revision.\n$progname: You should recreate aclocal.m4 with macros from revision $package_revision\n$progname: of $PACKAGE $VERSION and run autoconf again.\n_LT_EOF\n    fi\n\n    exit $EXIT_MISMATCH\n  fi\n}\n\n\n# Shorthand for --mode=foo, only valid as the first argument\ncase $1 in\nclean|clea|cle|cl)\n  shift; set dummy --mode clean ${1+\"$@\"}; shift\n  ;;\ncompile|compil|compi|comp|com|co|c)\n  shift; set dummy --mode compile ${1+\"$@\"}; shift\n  ;;\nexecute|execut|execu|exec|exe|ex|e)\n  shift; set dummy --mode execute ${1+\"$@\"}; shift\n  ;;\nfinish|finis|fini|fin|fi|f)\n  shift; set dummy --mode finish ${1+\"$@\"}; shift\n  ;;\ninstall|instal|insta|inst|ins|in|i)\n  shift; set dummy --mode install ${1+\"$@\"}; shift\n  ;;\nlink|lin|li|l)\n  shift; set dummy --mode link ${1+\"$@\"}; shift\n  ;;\nuninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)\n  shift; set dummy --mode uninstall ${1+\"$@\"}; shift\n  ;;\nesac\n\n\n\n# Option defaults:\nopt_debug=:\nopt_dry_run=false\nopt_config=false\nopt_preserve_dup_deps=false\nopt_features=false\nopt_finish=false\nopt_help=false\nopt_help_all=false\nopt_silent=:\nopt_warning=:\nopt_verbose=:\nopt_silent=false\nopt_verbose=false\n\n\n# Parse options once, thoroughly.  This comes as soon as possible in the\n# script to make things like `--version' happen as quickly as we can.\n{\n  # this just eases exit handling\n  while test $# -gt 0; do\n    opt=\"$1\"\n    shift\n    case $opt in\n      --debug|-x)\topt_debug='set -x'\n\t\t\tfunc_echo \"enabling shell trace mode\"\n\t\t\t$opt_debug\n\t\t\t;;\n      --dry-run|--dryrun|-n)\n\t\t\topt_dry_run=:\n\t\t\t;;\n      --config)\n\t\t\topt_config=:\nfunc_config\n\t\t\t;;\n      --dlopen|-dlopen)\n\t\t\toptarg=\"$1\"\n\t\t\topt_dlopen=\"${opt_dlopen+$opt_dlopen\n}$optarg\"\n\t\t\tshift\n\t\t\t;;\n      --preserve-dup-deps)\n\t\t\topt_preserve_dup_deps=:\n\t\t\t;;\n      --features)\n\t\t\topt_features=:\nfunc_features\n\t\t\t;;\n      --finish)\n\t\t\topt_finish=:\nset dummy --mode finish ${1+\"$@\"}; shift\n\t\t\t;;\n      --help)\n\t\t\topt_help=:\n\t\t\t;;\n      --help-all)\n\t\t\topt_help_all=:\nopt_help=': help-all'\n\t\t\t;;\n      --mode)\n\t\t\ttest $# = 0 && func_missing_arg $opt && break\n\t\t\toptarg=\"$1\"\n\t\t\topt_mode=\"$optarg\"\ncase $optarg in\n  # Valid mode arguments:\n  clean|compile|execute|finish|install|link|relink|uninstall) ;;\n\n  # Catch anything else as an error\n  *) func_error \"invalid argument for $opt\"\n     exit_cmd=exit\n     break\n     ;;\nesac\n\t\t\tshift\n\t\t\t;;\n      --no-silent|--no-quiet)\n\t\t\topt_silent=false\nfunc_append preserve_args \" $opt\"\n\t\t\t;;\n      --no-warning|--no-warn)\n\t\t\topt_warning=false\nfunc_append preserve_args \" $opt\"\n\t\t\t;;\n      --no-verbose)\n\t\t\topt_verbose=false\nfunc_append preserve_args \" $opt\"\n\t\t\t;;\n      --silent|--quiet)\n\t\t\topt_silent=:\nfunc_append preserve_args \" $opt\"\n        opt_verbose=false\n\t\t\t;;\n      --verbose|-v)\n\t\t\topt_verbose=:\nfunc_append preserve_args \" $opt\"\nopt_silent=false\n\t\t\t;;\n      --tag)\n\t\t\ttest $# = 0 && func_missing_arg $opt && break\n\t\t\toptarg=\"$1\"\n\t\t\topt_tag=\"$optarg\"\nfunc_append preserve_args \" $opt $optarg\"\nfunc_enable_tag \"$optarg\"\n\t\t\tshift\n\t\t\t;;\n\n      -\\?|-h)\t\tfunc_usage\t\t\t\t;;\n      --help)\t\tfunc_help\t\t\t\t;;\n      --version)\tfunc_version\t\t\t\t;;\n\n      # Separate optargs to long options:\n      --*=*)\n\t\t\tfunc_split_long_opt \"$opt\"\n\t\t\tset dummy \"$func_split_long_opt_name\" \"$func_split_long_opt_arg\" ${1+\"$@\"}\n\t\t\tshift\n\t\t\t;;\n\n      # Separate non-argument short options:\n      -\\?*|-h*|-n*|-v*)\n\t\t\tfunc_split_short_opt \"$opt\"\n\t\t\tset dummy \"$func_split_short_opt_name\" \"-$func_split_short_opt_arg\" ${1+\"$@\"}\n\t\t\tshift\n\t\t\t;;\n\n      --)\t\tbreak\t\t\t\t\t;;\n      -*)\t\tfunc_fatal_help \"unrecognized option \\`$opt'\" ;;\n      *)\t\tset dummy \"$opt\" ${1+\"$@\"};\tshift; break  ;;\n    esac\n  done\n\n  # Validate options:\n\n  # save first non-option argument\n  if test \"$#\" -gt 0; then\n    nonopt=\"$opt\"\n    shift\n  fi\n\n  # preserve --debug\n  test \"$opt_debug\" = : || func_append preserve_args \" --debug\"\n\n  case $host in\n    *cygwin* | *mingw* | *pw32* | *cegcc*)\n      # don't eliminate duplications in $postdeps and $predeps\n      opt_duplicate_compiler_generated_deps=:\n      ;;\n    *)\n      opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps\n      ;;\n  esac\n\n  $opt_help || {\n    # Sanity checks first:\n    func_check_version_match\n\n    if test \"$build_libtool_libs\" != yes && test \"$build_old_libs\" != yes; then\n      func_fatal_configuration \"not configured to build any kind of library\"\n    fi\n\n    # Darwin sucks\n    eval std_shrext=\\\"$shrext_cmds\\\"\n\n    # Only execute mode is allowed to have -dlopen flags.\n    if test -n \"$opt_dlopen\" && test \"$opt_mode\" != execute; then\n      func_error \"unrecognized option \\`-dlopen'\"\n      $ECHO \"$help\" 1>&2\n      exit $EXIT_FAILURE\n    fi\n\n    # Change the help message to a mode-specific one.\n    generic_help=\"$help\"\n    help=\"Try \\`$progname --help --mode=$opt_mode' for more information.\"\n  }\n\n\n  # Bail if the options were screwed\n  $exit_cmd $EXIT_FAILURE\n}\n\n\n\n\n## ----------- ##\n##    Main.    ##\n## ----------- ##\n\n# func_lalib_p file\n# True iff FILE is a libtool `.la' library or `.lo' object file.\n# This function is only a basic sanity check; it will hardly flush out\n# determined imposters.\nfunc_lalib_p ()\n{\n    test -f \"$1\" &&\n      $SED -e 4q \"$1\" 2>/dev/null \\\n        | $GREP \"^# Generated by .*$PACKAGE\" > /dev/null 2>&1\n}\n\n# func_lalib_unsafe_p file\n# True iff FILE is a libtool `.la' library or `.lo' object file.\n# This function implements the same check as func_lalib_p without\n# resorting to external programs.  To this end, it redirects stdin and\n# closes it afterwards, without saving the original file descriptor.\n# As a safety measure, use it only where a negative result would be\n# fatal anyway.  Works if `file' does not exist.\nfunc_lalib_unsafe_p ()\n{\n    lalib_p=no\n    if test -f \"$1\" && test -r \"$1\" && exec 5<&0 <\"$1\"; then\n\tfor lalib_p_l in 1 2 3 4\n\tdo\n\t    read lalib_p_line\n\t    case \"$lalib_p_line\" in\n\t\t\\#\\ Generated\\ by\\ *$PACKAGE* ) lalib_p=yes; break;;\n\t    esac\n\tdone\n\texec 0<&5 5<&-\n    fi\n    test \"$lalib_p\" = yes\n}\n\n# func_ltwrapper_script_p file\n# True iff FILE is a libtool wrapper script\n# This function is only a basic sanity check; it will hardly flush out\n# determined imposters.\nfunc_ltwrapper_script_p ()\n{\n    func_lalib_p \"$1\"\n}\n\n# func_ltwrapper_executable_p file\n# True iff FILE is a libtool wrapper executable\n# This function is only a basic sanity check; it will hardly flush out\n# determined imposters.\nfunc_ltwrapper_executable_p ()\n{\n    func_ltwrapper_exec_suffix=\n    case $1 in\n    *.exe) ;;\n    *) func_ltwrapper_exec_suffix=.exe ;;\n    esac\n    $GREP \"$magic_exe\" \"$1$func_ltwrapper_exec_suffix\" >/dev/null 2>&1\n}\n\n# func_ltwrapper_scriptname file\n# Assumes file is an ltwrapper_executable\n# uses $file to determine the appropriate filename for a\n# temporary ltwrapper_script.\nfunc_ltwrapper_scriptname ()\n{\n    func_dirname_and_basename \"$1\" \"\" \".\"\n    func_stripname '' '.exe' \"$func_basename_result\"\n    func_ltwrapper_scriptname_result=\"$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper\"\n}\n\n# func_ltwrapper_p file\n# True iff FILE is a libtool wrapper script or wrapper executable\n# This function is only a basic sanity check; it will hardly flush out\n# determined imposters.\nfunc_ltwrapper_p ()\n{\n    func_ltwrapper_script_p \"$1\" || func_ltwrapper_executable_p \"$1\"\n}\n\n\n# func_execute_cmds commands fail_cmd\n# Execute tilde-delimited COMMANDS.\n# If FAIL_CMD is given, eval that upon failure.\n# FAIL_CMD may read-access the current command in variable CMD!\nfunc_execute_cmds ()\n{\n    $opt_debug\n    save_ifs=$IFS; IFS='~'\n    for cmd in $1; do\n      IFS=$save_ifs\n      eval cmd=\\\"$cmd\\\"\n      func_show_eval \"$cmd\" \"${2-:}\"\n    done\n    IFS=$save_ifs\n}\n\n\n# func_source file\n# Source FILE, adding directory component if necessary.\n# Note that it is not necessary on cygwin/mingw to append a dot to\n# FILE even if both FILE and FILE.exe exist: automatic-append-.exe\n# behavior happens only for exec(3), not for open(2)!  Also, sourcing\n# `FILE.' does not work on cygwin managed mounts.\nfunc_source ()\n{\n    $opt_debug\n    case $1 in\n    */* | *\\\\*)\t. \"$1\" ;;\n    *)\t\t. \"./$1\" ;;\n    esac\n}\n\n\n# func_resolve_sysroot PATH\n# Replace a leading = in PATH with a sysroot.  Store the result into\n# func_resolve_sysroot_result\nfunc_resolve_sysroot ()\n{\n  func_resolve_sysroot_result=$1\n  case $func_resolve_sysroot_result in\n  =*)\n    func_stripname '=' '' \"$func_resolve_sysroot_result\"\n    func_resolve_sysroot_result=$lt_sysroot$func_stripname_result\n    ;;\n  esac\n}\n\n# func_replace_sysroot PATH\n# If PATH begins with the sysroot, replace it with = and\n# store the result into func_replace_sysroot_result.\nfunc_replace_sysroot ()\n{\n  case \"$lt_sysroot:$1\" in\n  ?*:\"$lt_sysroot\"*)\n    func_stripname \"$lt_sysroot\" '' \"$1\"\n    func_replace_sysroot_result=\"=$func_stripname_result\"\n    ;;\n  *)\n    # Including no sysroot.\n    func_replace_sysroot_result=$1\n    ;;\n  esac\n}\n\n# func_infer_tag arg\n# Infer tagged configuration to use if any are available and\n# if one wasn't chosen via the \"--tag\" command line option.\n# Only attempt this if the compiler in the base compile\n# command doesn't match the default compiler.\n# arg is usually of the form 'gcc ...'\nfunc_infer_tag ()\n{\n    $opt_debug\n    if test -n \"$available_tags\" && test -z \"$tagname\"; then\n      CC_quoted=\n      for arg in $CC; do\n\tfunc_append_quoted CC_quoted \"$arg\"\n      done\n      CC_expanded=`func_echo_all $CC`\n      CC_quoted_expanded=`func_echo_all $CC_quoted`\n      case $@ in\n      # Blanks in the command may have been stripped by the calling shell,\n      # but not from the CC environment variable when configure was run.\n      \" $CC \"* | \"$CC \"* | \" $CC_expanded \"* | \"$CC_expanded \"* | \\\n      \" $CC_quoted\"* | \"$CC_quoted \"* | \" $CC_quoted_expanded \"* | \"$CC_quoted_expanded \"*) ;;\n      # Blanks at the start of $base_compile will cause this to fail\n      # if we don't check for them as well.\n      *)\n\tfor z in $available_tags; do\n\t  if $GREP \"^# ### BEGIN LIBTOOL TAG CONFIG: $z$\" < \"$progpath\" > /dev/null; then\n\t    # Evaluate the configuration.\n\t    eval \"`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`\"\n\t    CC_quoted=\n\t    for arg in $CC; do\n\t      # Double-quote args containing other shell metacharacters.\n\t      func_append_quoted CC_quoted \"$arg\"\n\t    done\n\t    CC_expanded=`func_echo_all $CC`\n\t    CC_quoted_expanded=`func_echo_all $CC_quoted`\n\t    case \"$@ \" in\n\t    \" $CC \"* | \"$CC \"* | \" $CC_expanded \"* | \"$CC_expanded \"* | \\\n\t    \" $CC_quoted\"* | \"$CC_quoted \"* | \" $CC_quoted_expanded \"* | \"$CC_quoted_expanded \"*)\n\t      # The compiler in the base compile command matches\n\t      # the one in the tagged configuration.\n\t      # Assume this is the tagged configuration we want.\n\t      tagname=$z\n\t      break\n\t      ;;\n\t    esac\n\t  fi\n\tdone\n\t# If $tagname still isn't set, then no tagged configuration\n\t# was found and let the user know that the \"--tag\" command\n\t# line option must be used.\n\tif test -z \"$tagname\"; then\n\t  func_echo \"unable to infer tagged configuration\"\n\t  func_fatal_error \"specify a tag with \\`--tag'\"\n#\telse\n#\t  func_verbose \"using $tagname tagged configuration\"\n\tfi\n\t;;\n      esac\n    fi\n}\n\n\n\n# func_write_libtool_object output_name pic_name nonpic_name\n# Create a libtool object file (analogous to a \".la\" file),\n# but don't create it if we're doing a dry run.\nfunc_write_libtool_object ()\n{\n    write_libobj=${1}\n    if test \"$build_libtool_libs\" = yes; then\n      write_lobj=\\'${2}\\'\n    else\n      write_lobj=none\n    fi\n\n    if test \"$build_old_libs\" = yes; then\n      write_oldobj=\\'${3}\\'\n    else\n      write_oldobj=none\n    fi\n\n    $opt_dry_run || {\n      cat >${write_libobj}T <<EOF\n# $write_libobj - a libtool object file\n# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION\n#\n# Please DO NOT delete this file!\n# It is necessary for linking the library.\n\n# Name of the PIC object.\npic_object=$write_lobj\n\n# Name of the non-PIC object\nnon_pic_object=$write_oldobj\n\nEOF\n      $MV \"${write_libobj}T\" \"${write_libobj}\"\n    }\n}\n\n\n##################################################\n# FILE NAME AND PATH CONVERSION HELPER FUNCTIONS #\n##################################################\n\n# func_convert_core_file_wine_to_w32 ARG\n# Helper function used by file name conversion functions when $build is *nix,\n# and $host is mingw, cygwin, or some other w32 environment. Relies on a\n# correctly configured wine environment available, with the winepath program\n# in $build's $PATH.\n#\n# ARG is the $build file name to be converted to w32 format.\n# Result is available in $func_convert_core_file_wine_to_w32_result, and will\n# be empty on error (or when ARG is empty)\nfunc_convert_core_file_wine_to_w32 ()\n{\n  $opt_debug\n  func_convert_core_file_wine_to_w32_result=\"$1\"\n  if test -n \"$1\"; then\n    # Unfortunately, winepath does not exit with a non-zero error code, so we\n    # are forced to check the contents of stdout. On the other hand, if the\n    # command is not found, the shell will set an exit code of 127 and print\n    # *an error message* to stdout. So we must check for both error code of\n    # zero AND non-empty stdout, which explains the odd construction:\n    func_convert_core_file_wine_to_w32_tmp=`winepath -w \"$1\" 2>/dev/null`\n    if test \"$?\" -eq 0 && test -n \"${func_convert_core_file_wine_to_w32_tmp}\"; then\n      func_convert_core_file_wine_to_w32_result=`$ECHO \"$func_convert_core_file_wine_to_w32_tmp\" |\n        $SED -e \"$lt_sed_naive_backslashify\"`\n    else\n      func_convert_core_file_wine_to_w32_result=\n    fi\n  fi\n}\n# end: func_convert_core_file_wine_to_w32\n\n\n# func_convert_core_path_wine_to_w32 ARG\n# Helper function used by path conversion functions when $build is *nix, and\n# $host is mingw, cygwin, or some other w32 environment. Relies on a correctly\n# configured wine environment available, with the winepath program in $build's\n# $PATH. Assumes ARG has no leading or trailing path separator characters.\n#\n# ARG is path to be converted from $build format to win32.\n# Result is available in $func_convert_core_path_wine_to_w32_result.\n# Unconvertible file (directory) names in ARG are skipped; if no directory names\n# are convertible, then the result may be empty.\nfunc_convert_core_path_wine_to_w32 ()\n{\n  $opt_debug\n  # unfortunately, winepath doesn't convert paths, only file names\n  func_convert_core_path_wine_to_w32_result=\"\"\n  if test -n \"$1\"; then\n    oldIFS=$IFS\n    IFS=:\n    for func_convert_core_path_wine_to_w32_f in $1; do\n      IFS=$oldIFS\n      func_convert_core_file_wine_to_w32 \"$func_convert_core_path_wine_to_w32_f\"\n      if test -n \"$func_convert_core_file_wine_to_w32_result\" ; then\n        if test -z \"$func_convert_core_path_wine_to_w32_result\"; then\n          func_convert_core_path_wine_to_w32_result=\"$func_convert_core_file_wine_to_w32_result\"\n        else\n          func_append func_convert_core_path_wine_to_w32_result \";$func_convert_core_file_wine_to_w32_result\"\n        fi\n      fi\n    done\n    IFS=$oldIFS\n  fi\n}\n# end: func_convert_core_path_wine_to_w32\n\n\n# func_cygpath ARGS...\n# Wrapper around calling the cygpath program via LT_CYGPATH. This is used when\n# when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2)\n# $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or\n# (2), returns the Cygwin file name or path in func_cygpath_result (input\n# file name or path is assumed to be in w32 format, as previously converted\n# from $build's *nix or MSYS format). In case (3), returns the w32 file name\n# or path in func_cygpath_result (input file name or path is assumed to be in\n# Cygwin format). Returns an empty string on error.\n#\n# ARGS are passed to cygpath, with the last one being the file name or path to\n# be converted.\n#\n# Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH\n# environment variable; do not put it in $PATH.\nfunc_cygpath ()\n{\n  $opt_debug\n  if test -n \"$LT_CYGPATH\" && test -f \"$LT_CYGPATH\"; then\n    func_cygpath_result=`$LT_CYGPATH \"$@\" 2>/dev/null`\n    if test \"$?\" -ne 0; then\n      # on failure, ensure result is empty\n      func_cygpath_result=\n    fi\n  else\n    func_cygpath_result=\n    func_error \"LT_CYGPATH is empty or specifies non-existent file: \\`$LT_CYGPATH'\"\n  fi\n}\n#end: func_cygpath\n\n\n# func_convert_core_msys_to_w32 ARG\n# Convert file name or path ARG from MSYS format to w32 format.  Return\n# result in func_convert_core_msys_to_w32_result.\nfunc_convert_core_msys_to_w32 ()\n{\n  $opt_debug\n  # awkward: cmd appends spaces to result\n  func_convert_core_msys_to_w32_result=`( cmd //c echo \"$1\" ) 2>/dev/null |\n    $SED -e 's/[ ]*$//' -e \"$lt_sed_naive_backslashify\"`\n}\n#end: func_convert_core_msys_to_w32\n\n\n# func_convert_file_check ARG1 ARG2\n# Verify that ARG1 (a file name in $build format) was converted to $host\n# format in ARG2. Otherwise, emit an error message, but continue (resetting\n# func_to_host_file_result to ARG1).\nfunc_convert_file_check ()\n{\n  $opt_debug\n  if test -z \"$2\" && test -n \"$1\" ; then\n    func_error \"Could not determine host file name corresponding to\"\n    func_error \"  \\`$1'\"\n    func_error \"Continuing, but uninstalled executables may not work.\"\n    # Fallback:\n    func_to_host_file_result=\"$1\"\n  fi\n}\n# end func_convert_file_check\n\n\n# func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH\n# Verify that FROM_PATH (a path in $build format) was converted to $host\n# format in TO_PATH. Otherwise, emit an error message, but continue, resetting\n# func_to_host_file_result to a simplistic fallback value (see below).\nfunc_convert_path_check ()\n{\n  $opt_debug\n  if test -z \"$4\" && test -n \"$3\"; then\n    func_error \"Could not determine the host path corresponding to\"\n    func_error \"  \\`$3'\"\n    func_error \"Continuing, but uninstalled executables may not work.\"\n    # Fallback.  This is a deliberately simplistic \"conversion\" and\n    # should not be \"improved\".  See libtool.info.\n    if test \"x$1\" != \"x$2\"; then\n      lt_replace_pathsep_chars=\"s|$1|$2|g\"\n      func_to_host_path_result=`echo \"$3\" |\n        $SED -e \"$lt_replace_pathsep_chars\"`\n    else\n      func_to_host_path_result=\"$3\"\n    fi\n  fi\n}\n# end func_convert_path_check\n\n\n# func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG\n# Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT\n# and appending REPL if ORIG matches BACKPAT.\nfunc_convert_path_front_back_pathsep ()\n{\n  $opt_debug\n  case $4 in\n  $1 ) func_to_host_path_result=\"$3$func_to_host_path_result\"\n    ;;\n  esac\n  case $4 in\n  $2 ) func_append func_to_host_path_result \"$3\"\n    ;;\n  esac\n}\n# end func_convert_path_front_back_pathsep\n\n\n##################################################\n# $build to $host FILE NAME CONVERSION FUNCTIONS #\n##################################################\n# invoked via `$to_host_file_cmd ARG'\n#\n# In each case, ARG is the path to be converted from $build to $host format.\n# Result will be available in $func_to_host_file_result.\n\n\n# func_to_host_file ARG\n# Converts the file name ARG from $build format to $host format. Return result\n# in func_to_host_file_result.\nfunc_to_host_file ()\n{\n  $opt_debug\n  $to_host_file_cmd \"$1\"\n}\n# end func_to_host_file\n\n\n# func_to_tool_file ARG LAZY\n# converts the file name ARG from $build format to toolchain format. Return\n# result in func_to_tool_file_result.  If the conversion in use is listed\n# in (the comma separated) LAZY, no conversion takes place.\nfunc_to_tool_file ()\n{\n  $opt_debug\n  case ,$2, in\n    *,\"$to_tool_file_cmd\",*)\n      func_to_tool_file_result=$1\n      ;;\n    *)\n      $to_tool_file_cmd \"$1\"\n      func_to_tool_file_result=$func_to_host_file_result\n      ;;\n  esac\n}\n# end func_to_tool_file\n\n\n# func_convert_file_noop ARG\n# Copy ARG to func_to_host_file_result.\nfunc_convert_file_noop ()\n{\n  func_to_host_file_result=\"$1\"\n}\n# end func_convert_file_noop\n\n\n# func_convert_file_msys_to_w32 ARG\n# Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic\n# conversion to w32 is not available inside the cwrapper.  Returns result in\n# func_to_host_file_result.\nfunc_convert_file_msys_to_w32 ()\n{\n  $opt_debug\n  func_to_host_file_result=\"$1\"\n  if test -n \"$1\"; then\n    func_convert_core_msys_to_w32 \"$1\"\n    func_to_host_file_result=\"$func_convert_core_msys_to_w32_result\"\n  fi\n  func_convert_file_check \"$1\" \"$func_to_host_file_result\"\n}\n# end func_convert_file_msys_to_w32\n\n\n# func_convert_file_cygwin_to_w32 ARG\n# Convert file name ARG from Cygwin to w32 format.  Returns result in\n# func_to_host_file_result.\nfunc_convert_file_cygwin_to_w32 ()\n{\n  $opt_debug\n  func_to_host_file_result=\"$1\"\n  if test -n \"$1\"; then\n    # because $build is cygwin, we call \"the\" cygpath in $PATH; no need to use\n    # LT_CYGPATH in this case.\n    func_to_host_file_result=`cygpath -m \"$1\"`\n  fi\n  func_convert_file_check \"$1\" \"$func_to_host_file_result\"\n}\n# end func_convert_file_cygwin_to_w32\n\n\n# func_convert_file_nix_to_w32 ARG\n# Convert file name ARG from *nix to w32 format.  Requires a wine environment\n# and a working winepath. Returns result in func_to_host_file_result.\nfunc_convert_file_nix_to_w32 ()\n{\n  $opt_debug\n  func_to_host_file_result=\"$1\"\n  if test -n \"$1\"; then\n    func_convert_core_file_wine_to_w32 \"$1\"\n    func_to_host_file_result=\"$func_convert_core_file_wine_to_w32_result\"\n  fi\n  func_convert_file_check \"$1\" \"$func_to_host_file_result\"\n}\n# end func_convert_file_nix_to_w32\n\n\n# func_convert_file_msys_to_cygwin ARG\n# Convert file name ARG from MSYS to Cygwin format.  Requires LT_CYGPATH set.\n# Returns result in func_to_host_file_result.\nfunc_convert_file_msys_to_cygwin ()\n{\n  $opt_debug\n  func_to_host_file_result=\"$1\"\n  if test -n \"$1\"; then\n    func_convert_core_msys_to_w32 \"$1\"\n    func_cygpath -u \"$func_convert_core_msys_to_w32_result\"\n    func_to_host_file_result=\"$func_cygpath_result\"\n  fi\n  func_convert_file_check \"$1\" \"$func_to_host_file_result\"\n}\n# end func_convert_file_msys_to_cygwin\n\n\n# func_convert_file_nix_to_cygwin ARG\n# Convert file name ARG from *nix to Cygwin format.  Requires Cygwin installed\n# in a wine environment, working winepath, and LT_CYGPATH set.  Returns result\n# in func_to_host_file_result.\nfunc_convert_file_nix_to_cygwin ()\n{\n  $opt_debug\n  func_to_host_file_result=\"$1\"\n  if test -n \"$1\"; then\n    # convert from *nix to w32, then use cygpath to convert from w32 to cygwin.\n    func_convert_core_file_wine_to_w32 \"$1\"\n    func_cygpath -u \"$func_convert_core_file_wine_to_w32_result\"\n    func_to_host_file_result=\"$func_cygpath_result\"\n  fi\n  func_convert_file_check \"$1\" \"$func_to_host_file_result\"\n}\n# end func_convert_file_nix_to_cygwin\n\n\n#############################################\n# $build to $host PATH CONVERSION FUNCTIONS #\n#############################################\n# invoked via `$to_host_path_cmd ARG'\n#\n# In each case, ARG is the path to be converted from $build to $host format.\n# The result will be available in $func_to_host_path_result.\n#\n# Path separators are also converted from $build format to $host format.  If\n# ARG begins or ends with a path separator character, it is preserved (but\n# converted to $host format) on output.\n#\n# All path conversion functions are named using the following convention:\n#   file name conversion function    : func_convert_file_X_to_Y ()\n#   path conversion function         : func_convert_path_X_to_Y ()\n# where, for any given $build/$host combination the 'X_to_Y' value is the\n# same.  If conversion functions are added for new $build/$host combinations,\n# the two new functions must follow this pattern, or func_init_to_host_path_cmd\n# will break.\n\n\n# func_init_to_host_path_cmd\n# Ensures that function \"pointer\" variable $to_host_path_cmd is set to the\n# appropriate value, based on the value of $to_host_file_cmd.\nto_host_path_cmd=\nfunc_init_to_host_path_cmd ()\n{\n  $opt_debug\n  if test -z \"$to_host_path_cmd\"; then\n    func_stripname 'func_convert_file_' '' \"$to_host_file_cmd\"\n    to_host_path_cmd=\"func_convert_path_${func_stripname_result}\"\n  fi\n}\n\n\n# func_to_host_path ARG\n# Converts the path ARG from $build format to $host format. Return result\n# in func_to_host_path_result.\nfunc_to_host_path ()\n{\n  $opt_debug\n  func_init_to_host_path_cmd\n  $to_host_path_cmd \"$1\"\n}\n# end func_to_host_path\n\n\n# func_convert_path_noop ARG\n# Copy ARG to func_to_host_path_result.\nfunc_convert_path_noop ()\n{\n  func_to_host_path_result=\"$1\"\n}\n# end func_convert_path_noop\n\n\n# func_convert_path_msys_to_w32 ARG\n# Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic\n# conversion to w32 is not available inside the cwrapper.  Returns result in\n# func_to_host_path_result.\nfunc_convert_path_msys_to_w32 ()\n{\n  $opt_debug\n  func_to_host_path_result=\"$1\"\n  if test -n \"$1\"; then\n    # Remove leading and trailing path separator characters from ARG.  MSYS\n    # behavior is inconsistent here; cygpath turns them into '.;' and ';.';\n    # and winepath ignores them completely.\n    func_stripname : : \"$1\"\n    func_to_host_path_tmp1=$func_stripname_result\n    func_convert_core_msys_to_w32 \"$func_to_host_path_tmp1\"\n    func_to_host_path_result=\"$func_convert_core_msys_to_w32_result\"\n    func_convert_path_check : \";\" \\\n      \"$func_to_host_path_tmp1\" \"$func_to_host_path_result\"\n    func_convert_path_front_back_pathsep \":*\" \"*:\" \";\" \"$1\"\n  fi\n}\n# end func_convert_path_msys_to_w32\n\n\n# func_convert_path_cygwin_to_w32 ARG\n# Convert path ARG from Cygwin to w32 format.  Returns result in\n# func_to_host_file_result.\nfunc_convert_path_cygwin_to_w32 ()\n{\n  $opt_debug\n  func_to_host_path_result=\"$1\"\n  if test -n \"$1\"; then\n    # See func_convert_path_msys_to_w32:\n    func_stripname : : \"$1\"\n    func_to_host_path_tmp1=$func_stripname_result\n    func_to_host_path_result=`cygpath -m -p \"$func_to_host_path_tmp1\"`\n    func_convert_path_check : \";\" \\\n      \"$func_to_host_path_tmp1\" \"$func_to_host_path_result\"\n    func_convert_path_front_back_pathsep \":*\" \"*:\" \";\" \"$1\"\n  fi\n}\n# end func_convert_path_cygwin_to_w32\n\n\n# func_convert_path_nix_to_w32 ARG\n# Convert path ARG from *nix to w32 format.  Requires a wine environment and\n# a working winepath.  Returns result in func_to_host_file_result.\nfunc_convert_path_nix_to_w32 ()\n{\n  $opt_debug\n  func_to_host_path_result=\"$1\"\n  if test -n \"$1\"; then\n    # See func_convert_path_msys_to_w32:\n    func_stripname : : \"$1\"\n    func_to_host_path_tmp1=$func_stripname_result\n    func_convert_core_path_wine_to_w32 \"$func_to_host_path_tmp1\"\n    func_to_host_path_result=\"$func_convert_core_path_wine_to_w32_result\"\n    func_convert_path_check : \";\" \\\n      \"$func_to_host_path_tmp1\" \"$func_to_host_path_result\"\n    func_convert_path_front_back_pathsep \":*\" \"*:\" \";\" \"$1\"\n  fi\n}\n# end func_convert_path_nix_to_w32\n\n\n# func_convert_path_msys_to_cygwin ARG\n# Convert path ARG from MSYS to Cygwin format.  Requires LT_CYGPATH set.\n# Returns result in func_to_host_file_result.\nfunc_convert_path_msys_to_cygwin ()\n{\n  $opt_debug\n  func_to_host_path_result=\"$1\"\n  if test -n \"$1\"; then\n    # See func_convert_path_msys_to_w32:\n    func_stripname : : \"$1\"\n    func_to_host_path_tmp1=$func_stripname_result\n    func_convert_core_msys_to_w32 \"$func_to_host_path_tmp1\"\n    func_cygpath -u -p \"$func_convert_core_msys_to_w32_result\"\n    func_to_host_path_result=\"$func_cygpath_result\"\n    func_convert_path_check : : \\\n      \"$func_to_host_path_tmp1\" \"$func_to_host_path_result\"\n    func_convert_path_front_back_pathsep \":*\" \"*:\" : \"$1\"\n  fi\n}\n# end func_convert_path_msys_to_cygwin\n\n\n# func_convert_path_nix_to_cygwin ARG\n# Convert path ARG from *nix to Cygwin format.  Requires Cygwin installed in a\n# a wine environment, working winepath, and LT_CYGPATH set.  Returns result in\n# func_to_host_file_result.\nfunc_convert_path_nix_to_cygwin ()\n{\n  $opt_debug\n  func_to_host_path_result=\"$1\"\n  if test -n \"$1\"; then\n    # Remove leading and trailing path separator characters from\n    # ARG. msys behavior is inconsistent here, cygpath turns them\n    # into '.;' and ';.', and winepath ignores them completely.\n    func_stripname : : \"$1\"\n    func_to_host_path_tmp1=$func_stripname_result\n    func_convert_core_path_wine_to_w32 \"$func_to_host_path_tmp1\"\n    func_cygpath -u -p \"$func_convert_core_path_wine_to_w32_result\"\n    func_to_host_path_result=\"$func_cygpath_result\"\n    func_convert_path_check : : \\\n      \"$func_to_host_path_tmp1\" \"$func_to_host_path_result\"\n    func_convert_path_front_back_pathsep \":*\" \"*:\" : \"$1\"\n  fi\n}\n# end func_convert_path_nix_to_cygwin\n\n\n# func_mode_compile arg...\nfunc_mode_compile ()\n{\n    $opt_debug\n    # Get the compilation command and the source file.\n    base_compile=\n    srcfile=\"$nonopt\"  #  always keep a non-empty value in \"srcfile\"\n    suppress_opt=yes\n    suppress_output=\n    arg_mode=normal\n    libobj=\n    later=\n    pie_flag=\n\n    for arg\n    do\n      case $arg_mode in\n      arg  )\n\t# do not \"continue\".  Instead, add this to base_compile\n\tlastarg=\"$arg\"\n\targ_mode=normal\n\t;;\n\n      target )\n\tlibobj=\"$arg\"\n\targ_mode=normal\n\tcontinue\n\t;;\n\n      normal )\n\t# Accept any command-line options.\n\tcase $arg in\n\t-o)\n\t  test -n \"$libobj\" && \\\n\t    func_fatal_error \"you cannot specify \\`-o' more than once\"\n\t  arg_mode=target\n\t  continue\n\t  ;;\n\n\t-pie | -fpie | -fPIE)\n          func_append pie_flag \" $arg\"\n\t  continue\n\t  ;;\n\n\t-shared | -static | -prefer-pic | -prefer-non-pic)\n\t  func_append later \" $arg\"\n\t  continue\n\t  ;;\n\n\t-no-suppress)\n\t  suppress_opt=no\n\t  continue\n\t  ;;\n\n\t-Xcompiler)\n\t  arg_mode=arg  #  the next one goes into the \"base_compile\" arg list\n\t  continue      #  The current \"srcfile\" will either be retained or\n\t  ;;            #  replaced later.  I would guess that would be a bug.\n\n\t-Wc,*)\n\t  func_stripname '-Wc,' '' \"$arg\"\n\t  args=$func_stripname_result\n\t  lastarg=\n\t  save_ifs=\"$IFS\"; IFS=','\n\t  for arg in $args; do\n\t    IFS=\"$save_ifs\"\n\t    func_append_quoted lastarg \"$arg\"\n\t  done\n\t  IFS=\"$save_ifs\"\n\t  func_stripname ' ' '' \"$lastarg\"\n\t  lastarg=$func_stripname_result\n\n\t  # Add the arguments to base_compile.\n\t  func_append base_compile \" $lastarg\"\n\t  continue\n\t  ;;\n\n\t*)\n\t  # Accept the current argument as the source file.\n\t  # The previous \"srcfile\" becomes the current argument.\n\t  #\n\t  lastarg=\"$srcfile\"\n\t  srcfile=\"$arg\"\n\t  ;;\n\tesac  #  case $arg\n\t;;\n      esac    #  case $arg_mode\n\n      # Aesthetically quote the previous argument.\n      func_append_quoted base_compile \"$lastarg\"\n    done # for arg\n\n    case $arg_mode in\n    arg)\n      func_fatal_error \"you must specify an argument for -Xcompile\"\n      ;;\n    target)\n      func_fatal_error \"you must specify a target with \\`-o'\"\n      ;;\n    *)\n      # Get the name of the library object.\n      test -z \"$libobj\" && {\n\tfunc_basename \"$srcfile\"\n\tlibobj=\"$func_basename_result\"\n      }\n      ;;\n    esac\n\n    # Recognize several different file suffixes.\n    # If the user specifies -o file.o, it is replaced with file.lo\n    case $libobj in\n    *.[cCFSifmso] | \\\n    *.ada | *.adb | *.ads | *.asm | \\\n    *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \\\n    *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup)\n      func_xform \"$libobj\"\n      libobj=$func_xform_result\n      ;;\n    esac\n\n    case $libobj in\n    *.lo) func_lo2o \"$libobj\"; obj=$func_lo2o_result ;;\n    *)\n      func_fatal_error \"cannot determine name of library object from \\`$libobj'\"\n      ;;\n    esac\n\n    func_infer_tag $base_compile\n\n    for arg in $later; do\n      case $arg in\n      -shared)\n\ttest \"$build_libtool_libs\" != yes && \\\n\t  func_fatal_configuration \"can not build a shared library\"\n\tbuild_old_libs=no\n\tcontinue\n\t;;\n\n      -static)\n\tbuild_libtool_libs=no\n\tbuild_old_libs=yes\n\tcontinue\n\t;;\n\n      -prefer-pic)\n\tpic_mode=yes\n\tcontinue\n\t;;\n\n      -prefer-non-pic)\n\tpic_mode=no\n\tcontinue\n\t;;\n      esac\n    done\n\n    func_quote_for_eval \"$libobj\"\n    test \"X$libobj\" != \"X$func_quote_for_eval_result\" \\\n      && $ECHO \"X$libobj\" | $GREP '[]~#^*{};<>?\"'\"'\"'\t &()|`$[]' \\\n      && func_warning \"libobj name \\`$libobj' may not contain shell special characters.\"\n    func_dirname_and_basename \"$obj\" \"/\" \"\"\n    objname=\"$func_basename_result\"\n    xdir=\"$func_dirname_result\"\n    lobj=${xdir}$objdir/$objname\n\n    test -z \"$base_compile\" && \\\n      func_fatal_help \"you must specify a compilation command\"\n\n    # Delete any leftover library objects.\n    if test \"$build_old_libs\" = yes; then\n      removelist=\"$obj $lobj $libobj ${libobj}T\"\n    else\n      removelist=\"$lobj $libobj ${libobj}T\"\n    fi\n\n    # On Cygwin there's no \"real\" PIC flag so we must build both object types\n    case $host_os in\n    cygwin* | mingw* | pw32* | os2* | cegcc*)\n      pic_mode=default\n      ;;\n    esac\n    if test \"$pic_mode\" = no && test \"$deplibs_check_method\" != pass_all; then\n      # non-PIC code in shared libraries is not supported\n      pic_mode=default\n    fi\n\n    # Calculate the filename of the output object if compiler does\n    # not support -o with -c\n    if test \"$compiler_c_o\" = no; then\n      output_obj=`$ECHO \"$srcfile\" | $SED 's%^.*/%%; s%\\.[^.]*$%%'`.${objext}\n      lockfile=\"$output_obj.lock\"\n    else\n      output_obj=\n      need_locks=no\n      lockfile=\n    fi\n\n    # Lock this critical section if it is needed\n    # We use this script file to make the link, it avoids creating a new file\n    if test \"$need_locks\" = yes; then\n      until $opt_dry_run || ln \"$progpath\" \"$lockfile\" 2>/dev/null; do\n\tfunc_echo \"Waiting for $lockfile to be removed\"\n\tsleep 2\n      done\n    elif test \"$need_locks\" = warn; then\n      if test -f \"$lockfile\"; then\n\t$ECHO \"\\\n*** ERROR, $lockfile exists and contains:\n`cat $lockfile 2>/dev/null`\n\nThis indicates that another process is trying to use the same\ntemporary object file, and libtool could not work around it because\nyour compiler does not support \\`-c' and \\`-o' together.  If you\nrepeat this compilation, it may succeed, by chance, but you had better\navoid parallel builds (make -j) in this platform, or get a better\ncompiler.\"\n\n\t$opt_dry_run || $RM $removelist\n\texit $EXIT_FAILURE\n      fi\n      func_append removelist \" $output_obj\"\n      $ECHO \"$srcfile\" > \"$lockfile\"\n    fi\n\n    $opt_dry_run || $RM $removelist\n    func_append removelist \" $lockfile\"\n    trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15\n\n    func_to_tool_file \"$srcfile\" func_convert_file_msys_to_w32\n    srcfile=$func_to_tool_file_result\n    func_quote_for_eval \"$srcfile\"\n    qsrcfile=$func_quote_for_eval_result\n\n    # Only build a PIC object if we are building libtool libraries.\n    if test \"$build_libtool_libs\" = yes; then\n      # Without this assignment, base_compile gets emptied.\n      fbsd_hideous_sh_bug=$base_compile\n\n      if test \"$pic_mode\" != no; then\n\tcommand=\"$base_compile $qsrcfile $pic_flag\"\n      else\n\t# Don't build PIC code\n\tcommand=\"$base_compile $qsrcfile\"\n      fi\n\n      func_mkdir_p \"$xdir$objdir\"\n\n      if test -z \"$output_obj\"; then\n\t# Place PIC objects in $objdir\n\tfunc_append command \" -o $lobj\"\n      fi\n\n      func_show_eval_locale \"$command\"\t\\\n          'test -n \"$output_obj\" && $RM $removelist; exit $EXIT_FAILURE'\n\n      if test \"$need_locks\" = warn &&\n\t test \"X`cat $lockfile 2>/dev/null`\" != \"X$srcfile\"; then\n\t$ECHO \"\\\n*** ERROR, $lockfile contains:\n`cat $lockfile 2>/dev/null`\n\nbut it should contain:\n$srcfile\n\nThis indicates that another process is trying to use the same\ntemporary object file, and libtool could not work around it because\nyour compiler does not support \\`-c' and \\`-o' together.  If you\nrepeat this compilation, it may succeed, by chance, but you had better\navoid parallel builds (make -j) in this platform, or get a better\ncompiler.\"\n\n\t$opt_dry_run || $RM $removelist\n\texit $EXIT_FAILURE\n      fi\n\n      # Just move the object if needed, then go on to compile the next one\n      if test -n \"$output_obj\" && test \"X$output_obj\" != \"X$lobj\"; then\n\tfunc_show_eval '$MV \"$output_obj\" \"$lobj\"' \\\n\t  'error=$?; $opt_dry_run || $RM $removelist; exit $error'\n      fi\n\n      # Allow error messages only from the first compilation.\n      if test \"$suppress_opt\" = yes; then\n\tsuppress_output=' >/dev/null 2>&1'\n      fi\n    fi\n\n    # Only build a position-dependent object if we build old libraries.\n    if test \"$build_old_libs\" = yes; then\n      if test \"$pic_mode\" != yes; then\n\t# Don't build PIC code\n\tcommand=\"$base_compile $qsrcfile$pie_flag\"\n      else\n\tcommand=\"$base_compile $qsrcfile $pic_flag\"\n      fi\n      if test \"$compiler_c_o\" = yes; then\n\tfunc_append command \" -o $obj\"\n      fi\n\n      # Suppress compiler output if we already did a PIC compilation.\n      func_append command \"$suppress_output\"\n      func_show_eval_locale \"$command\" \\\n        '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE'\n\n      if test \"$need_locks\" = warn &&\n\t test \"X`cat $lockfile 2>/dev/null`\" != \"X$srcfile\"; then\n\t$ECHO \"\\\n*** ERROR, $lockfile contains:\n`cat $lockfile 2>/dev/null`\n\nbut it should contain:\n$srcfile\n\nThis indicates that another process is trying to use the same\ntemporary object file, and libtool could not work around it because\nyour compiler does not support \\`-c' and \\`-o' together.  If you\nrepeat this compilation, it may succeed, by chance, but you had better\navoid parallel builds (make -j) in this platform, or get a better\ncompiler.\"\n\n\t$opt_dry_run || $RM $removelist\n\texit $EXIT_FAILURE\n      fi\n\n      # Just move the object if needed\n      if test -n \"$output_obj\" && test \"X$output_obj\" != \"X$obj\"; then\n\tfunc_show_eval '$MV \"$output_obj\" \"$obj\"' \\\n\t  'error=$?; $opt_dry_run || $RM $removelist; exit $error'\n      fi\n    fi\n\n    $opt_dry_run || {\n      func_write_libtool_object \"$libobj\" \"$objdir/$objname\" \"$objname\"\n\n      # Unlock the critical section if it was locked\n      if test \"$need_locks\" != no; then\n\tremovelist=$lockfile\n        $RM \"$lockfile\"\n      fi\n    }\n\n    exit $EXIT_SUCCESS\n}\n\n$opt_help || {\n  test \"$opt_mode\" = compile && func_mode_compile ${1+\"$@\"}\n}\n\nfunc_mode_help ()\n{\n    # We need to display help for each of the modes.\n    case $opt_mode in\n      \"\")\n        # Generic help is extracted from the usage comments\n        # at the start of this file.\n        func_help\n        ;;\n\n      clean)\n        $ECHO \\\n\"Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE...\n\nRemove files from the build directory.\n\nRM is the name of the program to use to delete files associated with each FILE\n(typically \\`/bin/rm').  RM-OPTIONS are options (such as \\`-f') to be passed\nto RM.\n\nIf FILE is a libtool library, object or program, all the files associated\nwith it are deleted. Otherwise, only FILE itself is deleted using RM.\"\n        ;;\n\n      compile)\n      $ECHO \\\n\"Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE\n\nCompile a source file into a libtool library object.\n\nThis mode accepts the following additional options:\n\n  -o OUTPUT-FILE    set the output file name to OUTPUT-FILE\n  -no-suppress      do not suppress compiler output for multiple passes\n  -prefer-pic       try to build PIC objects only\n  -prefer-non-pic   try to build non-PIC objects only\n  -shared           do not build a \\`.o' file suitable for static linking\n  -static           only build a \\`.o' file suitable for static linking\n  -Wc,FLAG          pass FLAG directly to the compiler\n\nCOMPILE-COMMAND is a command to be used in creating a \\`standard' object file\nfrom the given SOURCEFILE.\n\nThe output file name is determined by removing the directory component from\nSOURCEFILE, then substituting the C source code suffix \\`.c' with the\nlibrary object suffix, \\`.lo'.\"\n        ;;\n\n      execute)\n        $ECHO \\\n\"Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]...\n\nAutomatically set library path, then run a program.\n\nThis mode accepts the following additional options:\n\n  -dlopen FILE      add the directory containing FILE to the library path\n\nThis mode sets the library path environment variable according to \\`-dlopen'\nflags.\n\nIf any of the ARGS are libtool executable wrappers, then they are translated\ninto their corresponding uninstalled binary, and any of their required library\ndirectories are added to the library path.\n\nThen, COMMAND is executed, with ARGS as arguments.\"\n        ;;\n\n      finish)\n        $ECHO \\\n\"Usage: $progname [OPTION]... --mode=finish [LIBDIR]...\n\nComplete the installation of libtool libraries.\n\nEach LIBDIR is a directory that contains libtool libraries.\n\nThe commands that this mode executes may require superuser privileges.  Use\nthe \\`--dry-run' option if you just want to see what would be executed.\"\n        ;;\n\n      install)\n        $ECHO \\\n\"Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND...\n\nInstall executables or libraries.\n\nINSTALL-COMMAND is the installation command.  The first component should be\neither the \\`install' or \\`cp' program.\n\nThe following components of INSTALL-COMMAND are treated specially:\n\n  -inst-prefix-dir PREFIX-DIR  Use PREFIX-DIR as a staging area for installation\n\nThe rest of the components are interpreted as arguments to that command (only\nBSD-compatible install options are recognized).\"\n        ;;\n\n      link)\n        $ECHO \\\n\"Usage: $progname [OPTION]... --mode=link LINK-COMMAND...\n\nLink object files or libraries together to form another library, or to\ncreate an executable program.\n\nLINK-COMMAND is a command using the C compiler that you would use to create\na program from several object files.\n\nThe following components of LINK-COMMAND are treated specially:\n\n  -all-static       do not do any dynamic linking at all\n  -avoid-version    do not add a version suffix if possible\n  -bindir BINDIR    specify path to binaries directory (for systems where\n                    libraries must be found in the PATH setting at runtime)\n  -dlopen FILE      \\`-dlpreopen' FILE if it cannot be dlopened at runtime\n  -dlpreopen FILE   link in FILE and add its symbols to lt_preloaded_symbols\n  -export-dynamic   allow symbols from OUTPUT-FILE to be resolved with dlsym(3)\n  -export-symbols SYMFILE\n                    try to export only the symbols listed in SYMFILE\n  -export-symbols-regex REGEX\n                    try to export only the symbols matching REGEX\n  -LLIBDIR          search LIBDIR for required installed libraries\n  -lNAME            OUTPUT-FILE requires the installed library libNAME\n  -module           build a library that can dlopened\n  -no-fast-install  disable the fast-install mode\n  -no-install       link a not-installable executable\n  -no-undefined     declare that a library does not refer to external symbols\n  -o OUTPUT-FILE    create OUTPUT-FILE from the specified objects\n  -objectlist FILE  Use a list of object files found in FILE to specify objects\n  -precious-files-regex REGEX\n                    don't remove output files matching REGEX\n  -release RELEASE  specify package release information\n  -rpath LIBDIR     the created library will eventually be installed in LIBDIR\n  -R[ ]LIBDIR       add LIBDIR to the runtime path of programs and libraries\n  -shared           only do dynamic linking of libtool libraries\n  -shrext SUFFIX    override the standard shared library file extension\n  -static           do not do any dynamic linking of uninstalled libtool libraries\n  -static-libtool-libs\n                    do not do any dynamic linking of libtool libraries\n  -version-info CURRENT[:REVISION[:AGE]]\n                    specify library version info [each variable defaults to 0]\n  -weak LIBNAME     declare that the target provides the LIBNAME interface\n  -Wc,FLAG\n  -Xcompiler FLAG   pass linker-specific FLAG directly to the compiler\n  -Wl,FLAG\n  -Xlinker FLAG     pass linker-specific FLAG directly to the linker\n  -XCClinker FLAG   pass link-specific FLAG to the compiler driver (CC)\n\nAll other options (arguments beginning with \\`-') are ignored.\n\nEvery other argument is treated as a filename.  Files ending in \\`.la' are\ntreated as uninstalled libtool libraries, other files are standard or library\nobject files.\n\nIf the OUTPUT-FILE ends in \\`.la', then a libtool library is created,\nonly library objects (\\`.lo' files) may be specified, and \\`-rpath' is\nrequired, except when creating a convenience library.\n\nIf OUTPUT-FILE ends in \\`.a' or \\`.lib', then a standard library is created\nusing \\`ar' and \\`ranlib', or on Windows using \\`lib'.\n\nIf OUTPUT-FILE ends in \\`.lo' or \\`.${objext}', then a reloadable object file\nis created, otherwise an executable program is created.\"\n        ;;\n\n      uninstall)\n        $ECHO \\\n\"Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...\n\nRemove libraries from an installation directory.\n\nRM is the name of the program to use to delete files associated with each FILE\n(typically \\`/bin/rm').  RM-OPTIONS are options (such as \\`-f') to be passed\nto RM.\n\nIf FILE is a libtool library, all the files associated with it are deleted.\nOtherwise, only FILE itself is deleted using RM.\"\n        ;;\n\n      *)\n        func_fatal_help \"invalid operation mode \\`$opt_mode'\"\n        ;;\n    esac\n\n    echo\n    $ECHO \"Try \\`$progname --help' for more information about other modes.\"\n}\n\n# Now that we've collected a possible --mode arg, show help if necessary\nif $opt_help; then\n  if test \"$opt_help\" = :; then\n    func_mode_help\n  else\n    {\n      func_help noexit\n      for opt_mode in compile link execute install finish uninstall clean; do\n\tfunc_mode_help\n      done\n    } | sed -n '1p; 2,$s/^Usage:/  or: /p'\n    {\n      func_help noexit\n      for opt_mode in compile link execute install finish uninstall clean; do\n\techo\n\tfunc_mode_help\n      done\n    } |\n    sed '1d\n      /^When reporting/,/^Report/{\n\tH\n\td\n      }\n      $x\n      /information about other modes/d\n      /more detailed .*MODE/d\n      s/^Usage:.*--mode=\\([^ ]*\\) .*/Description of \\1 mode:/'\n  fi\n  exit $?\nfi\n\n\n# func_mode_execute arg...\nfunc_mode_execute ()\n{\n    $opt_debug\n    # The first argument is the command name.\n    cmd=\"$nonopt\"\n    test -z \"$cmd\" && \\\n      func_fatal_help \"you must specify a COMMAND\"\n\n    # Handle -dlopen flags immediately.\n    for file in $opt_dlopen; do\n      test -f \"$file\" \\\n\t|| func_fatal_help \"\\`$file' is not a file\"\n\n      dir=\n      case $file in\n      *.la)\n\tfunc_resolve_sysroot \"$file\"\n\tfile=$func_resolve_sysroot_result\n\n\t# Check to see that this really is a libtool archive.\n\tfunc_lalib_unsafe_p \"$file\" \\\n\t  || func_fatal_help \"\\`$lib' is not a valid libtool archive\"\n\n\t# Read the libtool library.\n\tdlname=\n\tlibrary_names=\n\tfunc_source \"$file\"\n\n\t# Skip this library if it cannot be dlopened.\n\tif test -z \"$dlname\"; then\n\t  # Warn if it was a shared library.\n\t  test -n \"$library_names\" && \\\n\t    func_warning \"\\`$file' was not linked with \\`-export-dynamic'\"\n\t  continue\n\tfi\n\n\tfunc_dirname \"$file\" \"\" \".\"\n\tdir=\"$func_dirname_result\"\n\n\tif test -f \"$dir/$objdir/$dlname\"; then\n\t  func_append dir \"/$objdir\"\n\telse\n\t  if test ! -f \"$dir/$dlname\"; then\n\t    func_fatal_error \"cannot find \\`$dlname' in \\`$dir' or \\`$dir/$objdir'\"\n\t  fi\n\tfi\n\t;;\n\n      *.lo)\n\t# Just add the directory containing the .lo file.\n\tfunc_dirname \"$file\" \"\" \".\"\n\tdir=\"$func_dirname_result\"\n\t;;\n\n      *)\n\tfunc_warning \"\\`-dlopen' is ignored for non-libtool libraries and objects\"\n\tcontinue\n\t;;\n      esac\n\n      # Get the absolute pathname.\n      absdir=`cd \"$dir\" && pwd`\n      test -n \"$absdir\" && dir=\"$absdir\"\n\n      # Now add the directory to shlibpath_var.\n      if eval \"test -z \\\"\\$$shlibpath_var\\\"\"; then\n\teval \"$shlibpath_var=\\\"\\$dir\\\"\"\n      else\n\teval \"$shlibpath_var=\\\"\\$dir:\\$$shlibpath_var\\\"\"\n      fi\n    done\n\n    # This variable tells wrapper scripts just to set shlibpath_var\n    # rather than running their programs.\n    libtool_execute_magic=\"$magic\"\n\n    # Check if any of the arguments is a wrapper script.\n    args=\n    for file\n    do\n      case $file in\n      -* | *.la | *.lo ) ;;\n      *)\n\t# Do a test to see if this is really a libtool program.\n\tif func_ltwrapper_script_p \"$file\"; then\n\t  func_source \"$file\"\n\t  # Transform arg to wrapped name.\n\t  file=\"$progdir/$program\"\n\telif func_ltwrapper_executable_p \"$file\"; then\n\t  func_ltwrapper_scriptname \"$file\"\n\t  func_source \"$func_ltwrapper_scriptname_result\"\n\t  # Transform arg to wrapped name.\n\t  file=\"$progdir/$program\"\n\tfi\n\t;;\n      esac\n      # Quote arguments (to preserve shell metacharacters).\n      func_append_quoted args \"$file\"\n    done\n\n    if test \"X$opt_dry_run\" = Xfalse; then\n      if test -n \"$shlibpath_var\"; then\n\t# Export the shlibpath_var.\n\teval \"export $shlibpath_var\"\n      fi\n\n      # Restore saved environment variables\n      for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES\n      do\n\teval \"if test \\\"\\${save_$lt_var+set}\\\" = set; then\n                $lt_var=\\$save_$lt_var; export $lt_var\n\t      else\n\t\t$lt_unset $lt_var\n\t      fi\"\n      done\n\n      # Now prepare to actually exec the command.\n      exec_cmd=\"\\$cmd$args\"\n    else\n      # Display what would be done.\n      if test -n \"$shlibpath_var\"; then\n\teval \"\\$ECHO \\\"\\$shlibpath_var=\\$$shlibpath_var\\\"\"\n\techo \"export $shlibpath_var\"\n      fi\n      $ECHO \"$cmd$args\"\n      exit $EXIT_SUCCESS\n    fi\n}\n\ntest \"$opt_mode\" = execute && func_mode_execute ${1+\"$@\"}\n\n\n# func_mode_finish arg...\nfunc_mode_finish ()\n{\n    $opt_debug\n    libs=\n    libdirs=\n    admincmds=\n\n    for opt in \"$nonopt\" ${1+\"$@\"}\n    do\n      if test -d \"$opt\"; then\n\tfunc_append libdirs \" $opt\"\n\n      elif test -f \"$opt\"; then\n\tif func_lalib_unsafe_p \"$opt\"; then\n\t  func_append libs \" $opt\"\n\telse\n\t  func_warning \"\\`$opt' is not a valid libtool archive\"\n\tfi\n\n      else\n\tfunc_fatal_error \"invalid argument \\`$opt'\"\n      fi\n    done\n\n    if test -n \"$libs\"; then\n      if test -n \"$lt_sysroot\"; then\n        sysroot_regex=`$ECHO \"$lt_sysroot\" | $SED \"$sed_make_literal_regex\"`\n        sysroot_cmd=\"s/\\([ ']\\)$sysroot_regex/\\1/g;\"\n      else\n        sysroot_cmd=\n      fi\n\n      # Remove sysroot references\n      if $opt_dry_run; then\n        for lib in $libs; do\n          echo \"removing references to $lt_sysroot and \\`=' prefixes from $lib\"\n        done\n      else\n        tmpdir=`func_mktempdir`\n        for lib in $libs; do\n\t  sed -e \"${sysroot_cmd} s/\\([ ']-[LR]\\)=/\\1/g; s/\\([ ']\\)=/\\1/g\" $lib \\\n\t    > $tmpdir/tmp-la\n\t  mv -f $tmpdir/tmp-la $lib\n\tdone\n        ${RM}r \"$tmpdir\"\n      fi\n    fi\n\n    if test -n \"$finish_cmds$finish_eval\" && test -n \"$libdirs\"; then\n      for libdir in $libdirs; do\n\tif test -n \"$finish_cmds\"; then\n\t  # Do each command in the finish commands.\n\t  func_execute_cmds \"$finish_cmds\" 'admincmds=\"$admincmds\n'\"$cmd\"'\"'\n\tfi\n\tif test -n \"$finish_eval\"; then\n\t  # Do the single finish_eval.\n\t  eval cmds=\\\"$finish_eval\\\"\n\t  $opt_dry_run || eval \"$cmds\" || func_append admincmds \"\n       $cmds\"\n\tfi\n      done\n    fi\n\n    # Exit here if they wanted silent mode.\n    $opt_silent && exit $EXIT_SUCCESS\n\n    if test -n \"$finish_cmds$finish_eval\" && test -n \"$libdirs\"; then\n      echo \"----------------------------------------------------------------------\"\n      echo \"Libraries have been installed in:\"\n      for libdir in $libdirs; do\n\t$ECHO \"   $libdir\"\n      done\n      echo\n      echo \"If you ever happen to want to link against installed libraries\"\n      echo \"in a given directory, LIBDIR, you must either use libtool, and\"\n      echo \"specify the full pathname of the library, or use the \\`-LLIBDIR'\"\n      echo \"flag during linking and do at least one of the following:\"\n      if test -n \"$shlibpath_var\"; then\n\techo \"   - add LIBDIR to the \\`$shlibpath_var' environment variable\"\n\techo \"     during execution\"\n      fi\n      if test -n \"$runpath_var\"; then\n\techo \"   - add LIBDIR to the \\`$runpath_var' environment variable\"\n\techo \"     during linking\"\n      fi\n      if test -n \"$hardcode_libdir_flag_spec\"; then\n\tlibdir=LIBDIR\n\teval flag=\\\"$hardcode_libdir_flag_spec\\\"\n\n\t$ECHO \"   - use the \\`$flag' linker flag\"\n      fi\n      if test -n \"$admincmds\"; then\n\t$ECHO \"   - have your system administrator run these commands:$admincmds\"\n      fi\n      if test -f /etc/ld.so.conf; then\n\techo \"   - have your system administrator add LIBDIR to \\`/etc/ld.so.conf'\"\n      fi\n      echo\n\n      echo \"See any operating system documentation about shared libraries for\"\n      case $host in\n\tsolaris2.[6789]|solaris2.1[0-9])\n\t  echo \"more information, such as the ld(1), crle(1) and ld.so(8) manual\"\n\t  echo \"pages.\"\n\t  ;;\n\t*)\n\t  echo \"more information, such as the ld(1) and ld.so(8) manual pages.\"\n\t  ;;\n      esac\n      echo \"----------------------------------------------------------------------\"\n    fi\n    exit $EXIT_SUCCESS\n}\n\ntest \"$opt_mode\" = finish && func_mode_finish ${1+\"$@\"}\n\n\n# func_mode_install arg...\nfunc_mode_install ()\n{\n    $opt_debug\n    # There may be an optional sh(1) argument at the beginning of\n    # install_prog (especially on Windows NT).\n    if test \"$nonopt\" = \"$SHELL\" || test \"$nonopt\" = /bin/sh ||\n       # Allow the use of GNU shtool's install command.\n       case $nonopt in *shtool*) :;; *) false;; esac; then\n      # Aesthetically quote it.\n      func_quote_for_eval \"$nonopt\"\n      install_prog=\"$func_quote_for_eval_result \"\n      arg=$1\n      shift\n    else\n      install_prog=\n      arg=$nonopt\n    fi\n\n    # The real first argument should be the name of the installation program.\n    # Aesthetically quote it.\n    func_quote_for_eval \"$arg\"\n    func_append install_prog \"$func_quote_for_eval_result\"\n    install_shared_prog=$install_prog\n    case \" $install_prog \" in\n      *[\\\\\\ /]cp\\ *) install_cp=: ;;\n      *) install_cp=false ;;\n    esac\n\n    # We need to accept at least all the BSD install flags.\n    dest=\n    files=\n    opts=\n    prev=\n    install_type=\n    isdir=no\n    stripme=\n    no_mode=:\n    for arg\n    do\n      arg2=\n      if test -n \"$dest\"; then\n\tfunc_append files \" $dest\"\n\tdest=$arg\n\tcontinue\n      fi\n\n      case $arg in\n      -d) isdir=yes ;;\n      -f)\n\tif $install_cp; then :; else\n\t  prev=$arg\n\tfi\n\t;;\n      -g | -m | -o)\n\tprev=$arg\n\t;;\n      -s)\n\tstripme=\" -s\"\n\tcontinue\n\t;;\n      -*)\n\t;;\n      *)\n\t# If the previous option needed an argument, then skip it.\n\tif test -n \"$prev\"; then\n\t  if test \"x$prev\" = x-m && test -n \"$install_override_mode\"; then\n\t    arg2=$install_override_mode\n\t    no_mode=false\n\t  fi\n\t  prev=\n\telse\n\t  dest=$arg\n\t  continue\n\tfi\n\t;;\n      esac\n\n      # Aesthetically quote the argument.\n      func_quote_for_eval \"$arg\"\n      func_append install_prog \" $func_quote_for_eval_result\"\n      if test -n \"$arg2\"; then\n\tfunc_quote_for_eval \"$arg2\"\n      fi\n      func_append install_shared_prog \" $func_quote_for_eval_result\"\n    done\n\n    test -z \"$install_prog\" && \\\n      func_fatal_help \"you must specify an install program\"\n\n    test -n \"$prev\" && \\\n      func_fatal_help \"the \\`$prev' option requires an argument\"\n\n    if test -n \"$install_override_mode\" && $no_mode; then\n      if $install_cp; then :; else\n\tfunc_quote_for_eval \"$install_override_mode\"\n\tfunc_append install_shared_prog \" -m $func_quote_for_eval_result\"\n      fi\n    fi\n\n    if test -z \"$files\"; then\n      if test -z \"$dest\"; then\n\tfunc_fatal_help \"no file or destination specified\"\n      else\n\tfunc_fatal_help \"you must specify a destination\"\n      fi\n    fi\n\n    # Strip any trailing slash from the destination.\n    func_stripname '' '/' \"$dest\"\n    dest=$func_stripname_result\n\n    # Check to see that the destination is a directory.\n    test -d \"$dest\" && isdir=yes\n    if test \"$isdir\" = yes; then\n      destdir=\"$dest\"\n      destname=\n    else\n      func_dirname_and_basename \"$dest\" \"\" \".\"\n      destdir=\"$func_dirname_result\"\n      destname=\"$func_basename_result\"\n\n      # Not a directory, so check to see that there is only one file specified.\n      set dummy $files; shift\n      test \"$#\" -gt 1 && \\\n\tfunc_fatal_help \"\\`$dest' is not a directory\"\n    fi\n    case $destdir in\n    [\\\\/]* | [A-Za-z]:[\\\\/]*) ;;\n    *)\n      for file in $files; do\n\tcase $file in\n\t*.lo) ;;\n\t*)\n\t  func_fatal_help \"\\`$destdir' must be an absolute directory name\"\n\t  ;;\n\tesac\n      done\n      ;;\n    esac\n\n    # This variable tells wrapper scripts just to set variables rather\n    # than running their programs.\n    libtool_install_magic=\"$magic\"\n\n    staticlibs=\n    future_libdirs=\n    current_libdirs=\n    for file in $files; do\n\n      # Do each installation.\n      case $file in\n      *.$libext)\n\t# Do the static libraries later.\n\tfunc_append staticlibs \" $file\"\n\t;;\n\n      *.la)\n\tfunc_resolve_sysroot \"$file\"\n\tfile=$func_resolve_sysroot_result\n\n\t# Check to see that this really is a libtool archive.\n\tfunc_lalib_unsafe_p \"$file\" \\\n\t  || func_fatal_help \"\\`$file' is not a valid libtool archive\"\n\n\tlibrary_names=\n\told_library=\n\trelink_command=\n\tfunc_source \"$file\"\n\n\t# Add the libdir to current_libdirs if it is the destination.\n\tif test \"X$destdir\" = \"X$libdir\"; then\n\t  case \"$current_libdirs \" in\n\t  *\" $libdir \"*) ;;\n\t  *) func_append current_libdirs \" $libdir\" ;;\n\t  esac\n\telse\n\t  # Note the libdir as a future libdir.\n\t  case \"$future_libdirs \" in\n\t  *\" $libdir \"*) ;;\n\t  *) func_append future_libdirs \" $libdir\" ;;\n\t  esac\n\tfi\n\n\tfunc_dirname \"$file\" \"/\" \"\"\n\tdir=\"$func_dirname_result\"\n\tfunc_append dir \"$objdir\"\n\n\tif test -n \"$relink_command\"; then\n\t  # Determine the prefix the user has applied to our future dir.\n\t  inst_prefix_dir=`$ECHO \"$destdir\" | $SED -e \"s%$libdir\\$%%\"`\n\n\t  # Don't allow the user to place us outside of our expected\n\t  # location b/c this prevents finding dependent libraries that\n\t  # are installed to the same prefix.\n\t  # At present, this check doesn't affect windows .dll's that\n\t  # are installed into $libdir/../bin (currently, that works fine)\n\t  # but it's something to keep an eye on.\n\t  test \"$inst_prefix_dir\" = \"$destdir\" && \\\n\t    func_fatal_error \"error: cannot install \\`$file' to a directory not ending in $libdir\"\n\n\t  if test -n \"$inst_prefix_dir\"; then\n\t    # Stick the inst_prefix_dir data into the link command.\n\t    relink_command=`$ECHO \"$relink_command\" | $SED \"s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%\"`\n\t  else\n\t    relink_command=`$ECHO \"$relink_command\" | $SED \"s%@inst_prefix_dir@%%\"`\n\t  fi\n\n\t  func_warning \"relinking \\`$file'\"\n\t  func_show_eval \"$relink_command\" \\\n\t    'func_fatal_error \"error: relink \\`$file'\\'' with the above command before installing it\"'\n\tfi\n\n\t# See the names of the shared library.\n\tset dummy $library_names; shift\n\tif test -n \"$1\"; then\n\t  realname=\"$1\"\n\t  shift\n\n\t  srcname=\"$realname\"\n\t  test -n \"$relink_command\" && srcname=\"$realname\"T\n\n\t  # Install the shared library and build the symlinks.\n\t  func_show_eval \"$install_shared_prog $dir/$srcname $destdir/$realname\" \\\n\t      'exit $?'\n\t  tstripme=\"$stripme\"\n\t  case $host_os in\n\t  cygwin* | mingw* | pw32* | cegcc*)\n\t    case $realname in\n\t    *.dll.a)\n\t      tstripme=\"\"\n\t      ;;\n\t    esac\n\t    ;;\n\t  esac\n\t  if test -n \"$tstripme\" && test -n \"$striplib\"; then\n\t    func_show_eval \"$striplib $destdir/$realname\" 'exit $?'\n\t  fi\n\n\t  if test \"$#\" -gt 0; then\n\t    # Delete the old symlinks, and create new ones.\n\t    # Try `ln -sf' first, because the `ln' binary might depend on\n\t    # the symlink we replace!  Solaris /bin/ln does not understand -f,\n\t    # so we also need to try rm && ln -s.\n\t    for linkname\n\t    do\n\t      test \"$linkname\" != \"$realname\" \\\n\t\t&& func_show_eval \"(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })\"\n\t    done\n\t  fi\n\n\t  # Do each command in the postinstall commands.\n\t  lib=\"$destdir/$realname\"\n\t  func_execute_cmds \"$postinstall_cmds\" 'exit $?'\n\tfi\n\n\t# Install the pseudo-library for information purposes.\n\tfunc_basename \"$file\"\n\tname=\"$func_basename_result\"\n\tinstname=\"$dir/$name\"i\n\tfunc_show_eval \"$install_prog $instname $destdir/$name\" 'exit $?'\n\n\t# Maybe install the static library, too.\n\ttest -n \"$old_library\" && func_append staticlibs \" $dir/$old_library\"\n\t;;\n\n      *.lo)\n\t# Install (i.e. copy) a libtool object.\n\n\t# Figure out destination file name, if it wasn't already specified.\n\tif test -n \"$destname\"; then\n\t  destfile=\"$destdir/$destname\"\n\telse\n\t  func_basename \"$file\"\n\t  destfile=\"$func_basename_result\"\n\t  destfile=\"$destdir/$destfile\"\n\tfi\n\n\t# Deduce the name of the destination old-style object file.\n\tcase $destfile in\n\t*.lo)\n\t  func_lo2o \"$destfile\"\n\t  staticdest=$func_lo2o_result\n\t  ;;\n\t*.$objext)\n\t  staticdest=\"$destfile\"\n\t  destfile=\n\t  ;;\n\t*)\n\t  func_fatal_help \"cannot copy a libtool object to \\`$destfile'\"\n\t  ;;\n\tesac\n\n\t# Install the libtool object if requested.\n\ttest -n \"$destfile\" && \\\n\t  func_show_eval \"$install_prog $file $destfile\" 'exit $?'\n\n\t# Install the old object if enabled.\n\tif test \"$build_old_libs\" = yes; then\n\t  # Deduce the name of the old-style object file.\n\t  func_lo2o \"$file\"\n\t  staticobj=$func_lo2o_result\n\t  func_show_eval \"$install_prog \\$staticobj \\$staticdest\" 'exit $?'\n\tfi\n\texit $EXIT_SUCCESS\n\t;;\n\n      *)\n\t# Figure out destination file name, if it wasn't already specified.\n\tif test -n \"$destname\"; then\n\t  destfile=\"$destdir/$destname\"\n\telse\n\t  func_basename \"$file\"\n\t  destfile=\"$func_basename_result\"\n\t  destfile=\"$destdir/$destfile\"\n\tfi\n\n\t# If the file is missing, and there is a .exe on the end, strip it\n\t# because it is most likely a libtool script we actually want to\n\t# install\n\tstripped_ext=\"\"\n\tcase $file in\n\t  *.exe)\n\t    if test ! -f \"$file\"; then\n\t      func_stripname '' '.exe' \"$file\"\n\t      file=$func_stripname_result\n\t      stripped_ext=\".exe\"\n\t    fi\n\t    ;;\n\tesac\n\n\t# Do a test to see if this is really a libtool program.\n\tcase $host in\n\t*cygwin* | *mingw*)\n\t    if func_ltwrapper_executable_p \"$file\"; then\n\t      func_ltwrapper_scriptname \"$file\"\n\t      wrapper=$func_ltwrapper_scriptname_result\n\t    else\n\t      func_stripname '' '.exe' \"$file\"\n\t      wrapper=$func_stripname_result\n\t    fi\n\t    ;;\n\t*)\n\t    wrapper=$file\n\t    ;;\n\tesac\n\tif func_ltwrapper_script_p \"$wrapper\"; then\n\t  notinst_deplibs=\n\t  relink_command=\n\n\t  func_source \"$wrapper\"\n\n\t  # Check the variables that should have been set.\n\t  test -z \"$generated_by_libtool_version\" && \\\n\t    func_fatal_error \"invalid libtool wrapper script \\`$wrapper'\"\n\n\t  finalize=yes\n\t  for lib in $notinst_deplibs; do\n\t    # Check to see that each library is installed.\n\t    libdir=\n\t    if test -f \"$lib\"; then\n\t      func_source \"$lib\"\n\t    fi\n\t    libfile=\"$libdir/\"`$ECHO \"$lib\" | $SED 's%^.*/%%g'` ### testsuite: skip nested quoting test\n\t    if test -n \"$libdir\" && test ! -f \"$libfile\"; then\n\t      func_warning \"\\`$lib' has not been installed in \\`$libdir'\"\n\t      finalize=no\n\t    fi\n\t  done\n\n\t  relink_command=\n\t  func_source \"$wrapper\"\n\n\t  outputname=\n\t  if test \"$fast_install\" = no && test -n \"$relink_command\"; then\n\t    $opt_dry_run || {\n\t      if test \"$finalize\" = yes; then\n\t        tmpdir=`func_mktempdir`\n\t\tfunc_basename \"$file$stripped_ext\"\n\t\tfile=\"$func_basename_result\"\n\t        outputname=\"$tmpdir/$file\"\n\t        # Replace the output file specification.\n\t        relink_command=`$ECHO \"$relink_command\" | $SED 's%@OUTPUT@%'\"$outputname\"'%g'`\n\n\t        $opt_silent || {\n\t          func_quote_for_expand \"$relink_command\"\n\t\t  eval \"func_echo $func_quote_for_expand_result\"\n\t        }\n\t        if eval \"$relink_command\"; then :\n\t          else\n\t\t  func_error \"error: relink \\`$file' with the above command before installing it\"\n\t\t  $opt_dry_run || ${RM}r \"$tmpdir\"\n\t\t  continue\n\t        fi\n\t        file=\"$outputname\"\n\t      else\n\t        func_warning \"cannot relink \\`$file'\"\n\t      fi\n\t    }\n\t  else\n\t    # Install the binary that we compiled earlier.\n\t    file=`$ECHO \"$file$stripped_ext\" | $SED \"s%\\([^/]*\\)$%$objdir/\\1%\"`\n\t  fi\n\tfi\n\n\t# remove .exe since cygwin /usr/bin/install will append another\n\t# one anyway\n\tcase $install_prog,$host in\n\t*/usr/bin/install*,*cygwin*)\n\t  case $file:$destfile in\n\t  *.exe:*.exe)\n\t    # this is ok\n\t    ;;\n\t  *.exe:*)\n\t    destfile=$destfile.exe\n\t    ;;\n\t  *:*.exe)\n\t    func_stripname '' '.exe' \"$destfile\"\n\t    destfile=$func_stripname_result\n\t    ;;\n\t  esac\n\t  ;;\n\tesac\n\tfunc_show_eval \"$install_prog\\$stripme \\$file \\$destfile\" 'exit $?'\n\t$opt_dry_run || if test -n \"$outputname\"; then\n\t  ${RM}r \"$tmpdir\"\n\tfi\n\t;;\n      esac\n    done\n\n    for file in $staticlibs; do\n      func_basename \"$file\"\n      name=\"$func_basename_result\"\n\n      # Set up the ranlib parameters.\n      oldlib=\"$destdir/$name\"\n      func_to_tool_file \"$oldlib\" func_convert_file_msys_to_w32\n      tool_oldlib=$func_to_tool_file_result\n\n      func_show_eval \"$install_prog \\$file \\$oldlib\" 'exit $?'\n\n      if test -n \"$stripme\" && test -n \"$old_striplib\"; then\n\tfunc_show_eval \"$old_striplib $tool_oldlib\" 'exit $?'\n      fi\n\n      # Do each command in the postinstall commands.\n      func_execute_cmds \"$old_postinstall_cmds\" 'exit $?'\n    done\n\n    test -n \"$future_libdirs\" && \\\n      func_warning \"remember to run \\`$progname --finish$future_libdirs'\"\n\n    if test -n \"$current_libdirs\"; then\n      # Maybe just do a dry run.\n      $opt_dry_run && current_libdirs=\" -n$current_libdirs\"\n      exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'\n    else\n      exit $EXIT_SUCCESS\n    fi\n}\n\ntest \"$opt_mode\" = install && func_mode_install ${1+\"$@\"}\n\n\n# func_generate_dlsyms outputname originator pic_p\n# Extract symbols from dlprefiles and create ${outputname}S.o with\n# a dlpreopen symbol table.\nfunc_generate_dlsyms ()\n{\n    $opt_debug\n    my_outputname=\"$1\"\n    my_originator=\"$2\"\n    my_pic_p=\"${3-no}\"\n    my_prefix=`$ECHO \"$my_originator\" | sed 's%[^a-zA-Z0-9]%_%g'`\n    my_dlsyms=\n\n    if test -n \"$dlfiles$dlprefiles\" || test \"$dlself\" != no; then\n      if test -n \"$NM\" && test -n \"$global_symbol_pipe\"; then\n\tmy_dlsyms=\"${my_outputname}S.c\"\n      else\n\tfunc_error \"not configured to extract global symbols from dlpreopened files\"\n      fi\n    fi\n\n    if test -n \"$my_dlsyms\"; then\n      case $my_dlsyms in\n      \"\") ;;\n      *.c)\n\t# Discover the nlist of each of the dlfiles.\n\tnlist=\"$output_objdir/${my_outputname}.nm\"\n\n\tfunc_show_eval \"$RM $nlist ${nlist}S ${nlist}T\"\n\n\t# Parse the name list into a source file.\n\tfunc_verbose \"creating $output_objdir/$my_dlsyms\"\n\n\t$opt_dry_run || $ECHO > \"$output_objdir/$my_dlsyms\" \"\\\n/* $my_dlsyms - symbol resolution table for \\`$my_outputname' dlsym emulation. */\n/* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */\n\n#ifdef __cplusplus\nextern \\\"C\\\" {\n#endif\n\n#if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4))\n#pragma GCC diagnostic ignored \\\"-Wstrict-prototypes\\\"\n#endif\n\n/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */\n#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)\n/* DATA imports from DLLs on WIN32 con't be const, because runtime\n   relocations are performed -- see ld's documentation on pseudo-relocs.  */\n# define LT_DLSYM_CONST\n#elif defined(__osf__)\n/* This system does not cope well with relocations in const data.  */\n# define LT_DLSYM_CONST\n#else\n# define LT_DLSYM_CONST const\n#endif\n\n/* External symbol declarations for the compiler. */\\\n\"\n\n\tif test \"$dlself\" = yes; then\n\t  func_verbose \"generating symbol list for \\`$output'\"\n\n\t  $opt_dry_run || echo ': @PROGRAM@ ' > \"$nlist\"\n\n\t  # Add our own program objects to the symbol list.\n\t  progfiles=`$ECHO \"$objs$old_deplibs\" | $SP2NL | $SED \"$lo2o\" | $NL2SP`\n\t  for progfile in $progfiles; do\n\t    func_to_tool_file \"$progfile\" func_convert_file_msys_to_w32\n\t    func_verbose \"extracting global C symbols from \\`$func_to_tool_file_result'\"\n\t    $opt_dry_run || eval \"$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'\"\n\t  done\n\n\t  if test -n \"$exclude_expsyms\"; then\n\t    $opt_dry_run || {\n\t      eval '$EGREP -v \" ($exclude_expsyms)$\" \"$nlist\" > \"$nlist\"T'\n\t      eval '$MV \"$nlist\"T \"$nlist\"'\n\t    }\n\t  fi\n\n\t  if test -n \"$export_symbols_regex\"; then\n\t    $opt_dry_run || {\n\t      eval '$EGREP -e \"$export_symbols_regex\" \"$nlist\" > \"$nlist\"T'\n\t      eval '$MV \"$nlist\"T \"$nlist\"'\n\t    }\n\t  fi\n\n\t  # Prepare the list of exported symbols\n\t  if test -z \"$export_symbols\"; then\n\t    export_symbols=\"$output_objdir/$outputname.exp\"\n\t    $opt_dry_run || {\n\t      $RM $export_symbols\n\t      eval \"${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \\(.*\\)$/\\1/p' \"'< \"$nlist\" > \"$export_symbols\"'\n\t      case $host in\n\t      *cygwin* | *mingw* | *cegcc* )\n                eval \"echo EXPORTS \"'> \"$output_objdir/$outputname.def\"'\n                eval 'cat \"$export_symbols\" >> \"$output_objdir/$outputname.def\"'\n\t        ;;\n\t      esac\n\t    }\n\t  else\n\t    $opt_dry_run || {\n\t      eval \"${SED} -e 's/\\([].[*^$]\\)/\\\\\\\\\\1/g' -e 's/^/ /' -e 's/$/$/'\"' < \"$export_symbols\" > \"$output_objdir/$outputname.exp\"'\n\t      eval '$GREP -f \"$output_objdir/$outputname.exp\" < \"$nlist\" > \"$nlist\"T'\n\t      eval '$MV \"$nlist\"T \"$nlist\"'\n\t      case $host in\n\t        *cygwin* | *mingw* | *cegcc* )\n\t          eval \"echo EXPORTS \"'> \"$output_objdir/$outputname.def\"'\n\t          eval 'cat \"$nlist\" >> \"$output_objdir/$outputname.def\"'\n\t          ;;\n\t      esac\n\t    }\n\t  fi\n\tfi\n\n\tfor dlprefile in $dlprefiles; do\n\t  func_verbose \"extracting global C symbols from \\`$dlprefile'\"\n\t  func_basename \"$dlprefile\"\n\t  name=\"$func_basename_result\"\n          case $host in\n\t    *cygwin* | *mingw* | *cegcc* )\n\t      # if an import library, we need to obtain dlname\n\t      if func_win32_import_lib_p \"$dlprefile\"; then\n\t        func_tr_sh \"$dlprefile\"\n\t        eval \"curr_lafile=\\$libfile_$func_tr_sh_result\"\n\t        dlprefile_dlbasename=\"\"\n\t        if test -n \"$curr_lafile\" && func_lalib_p \"$curr_lafile\"; then\n\t          # Use subshell, to avoid clobbering current variable values\n\t          dlprefile_dlname=`source \"$curr_lafile\" && echo \"$dlname\"`\n\t          if test -n \"$dlprefile_dlname\" ; then\n\t            func_basename \"$dlprefile_dlname\"\n\t            dlprefile_dlbasename=\"$func_basename_result\"\n\t          else\n\t            # no lafile. user explicitly requested -dlpreopen <import library>.\n\t            $sharedlib_from_linklib_cmd \"$dlprefile\"\n\t            dlprefile_dlbasename=$sharedlib_from_linklib_result\n\t          fi\n\t        fi\n\t        $opt_dry_run || {\n\t          if test -n \"$dlprefile_dlbasename\" ; then\n\t            eval '$ECHO \": $dlprefile_dlbasename\" >> \"$nlist\"'\n\t          else\n\t            func_warning \"Could not compute DLL name from $name\"\n\t            eval '$ECHO \": $name \" >> \"$nlist\"'\n\t          fi\n\t          func_to_tool_file \"$dlprefile\" func_convert_file_msys_to_w32\n\t          eval \"$NM \\\"$func_to_tool_file_result\\\" 2>/dev/null | $global_symbol_pipe |\n\t            $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'\"\n\t        }\n\t      else # not an import lib\n\t        $opt_dry_run || {\n\t          eval '$ECHO \": $name \" >> \"$nlist\"'\n\t          func_to_tool_file \"$dlprefile\" func_convert_file_msys_to_w32\n\t          eval \"$NM \\\"$func_to_tool_file_result\\\" 2>/dev/null | $global_symbol_pipe >> '$nlist'\"\n\t        }\n\t      fi\n\t    ;;\n\t    *)\n\t      $opt_dry_run || {\n\t        eval '$ECHO \": $name \" >> \"$nlist\"'\n\t        func_to_tool_file \"$dlprefile\" func_convert_file_msys_to_w32\n\t        eval \"$NM \\\"$func_to_tool_file_result\\\" 2>/dev/null | $global_symbol_pipe >> '$nlist'\"\n\t      }\n\t    ;;\n          esac\n\tdone\n\n\t$opt_dry_run || {\n\t  # Make sure we have at least an empty file.\n\t  test -f \"$nlist\" || : > \"$nlist\"\n\n\t  if test -n \"$exclude_expsyms\"; then\n\t    $EGREP -v \" ($exclude_expsyms)$\" \"$nlist\" > \"$nlist\"T\n\t    $MV \"$nlist\"T \"$nlist\"\n\t  fi\n\n\t  # Try sorting and uniquifying the output.\n\t  if $GREP -v \"^: \" < \"$nlist\" |\n\t      if sort -k 3 </dev/null >/dev/null 2>&1; then\n\t\tsort -k 3\n\t      else\n\t\tsort +2\n\t      fi |\n\t      uniq > \"$nlist\"S; then\n\t    :\n\t  else\n\t    $GREP -v \"^: \" < \"$nlist\" > \"$nlist\"S\n\t  fi\n\n\t  if test -f \"$nlist\"S; then\n\t    eval \"$global_symbol_to_cdecl\"' < \"$nlist\"S >> \"$output_objdir/$my_dlsyms\"'\n\t  else\n\t    echo '/* NONE */' >> \"$output_objdir/$my_dlsyms\"\n\t  fi\n\n\t  echo >> \"$output_objdir/$my_dlsyms\" \"\\\n\n/* The mapping between symbol names and symbols.  */\ntypedef struct {\n  const char *name;\n  void *address;\n} lt_dlsymlist;\nextern LT_DLSYM_CONST lt_dlsymlist\nlt_${my_prefix}_LTX_preloaded_symbols[];\nLT_DLSYM_CONST lt_dlsymlist\nlt_${my_prefix}_LTX_preloaded_symbols[] =\n{\\\n  { \\\"$my_originator\\\", (void *) 0 },\"\n\n\t  case $need_lib_prefix in\n\t  no)\n\t    eval \"$global_symbol_to_c_name_address\" < \"$nlist\" >> \"$output_objdir/$my_dlsyms\"\n\t    ;;\n\t  *)\n\t    eval \"$global_symbol_to_c_name_address_lib_prefix\" < \"$nlist\" >> \"$output_objdir/$my_dlsyms\"\n\t    ;;\n\t  esac\n\t  echo >> \"$output_objdir/$my_dlsyms\" \"\\\n  {0, (void *) 0}\n};\n\n/* This works around a problem in FreeBSD linker */\n#ifdef FREEBSD_WORKAROUND\nstatic const void *lt_preloaded_setup() {\n  return lt_${my_prefix}_LTX_preloaded_symbols;\n}\n#endif\n\n#ifdef __cplusplus\n}\n#endif\\\n\"\n\t} # !$opt_dry_run\n\n\tpic_flag_for_symtable=\n\tcase \"$compile_command \" in\n\t*\" -static \"*) ;;\n\t*)\n\t  case $host in\n\t  # compiling the symbol table file with pic_flag works around\n\t  # a FreeBSD bug that causes programs to crash when -lm is\n\t  # linked before any other PIC object.  But we must not use\n\t  # pic_flag when linking with -static.  The problem exists in\n\t  # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.\n\t  *-*-freebsd2.*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)\n\t    pic_flag_for_symtable=\" $pic_flag -DFREEBSD_WORKAROUND\" ;;\n\t  *-*-hpux*)\n\t    pic_flag_for_symtable=\" $pic_flag\"  ;;\n\t  *)\n\t    if test \"X$my_pic_p\" != Xno; then\n\t      pic_flag_for_symtable=\" $pic_flag\"\n\t    fi\n\t    ;;\n\t  esac\n\t  ;;\n\tesac\n\tsymtab_cflags=\n\tfor arg in $LTCFLAGS; do\n\t  case $arg in\n\t  -pie | -fpie | -fPIE) ;;\n\t  *) func_append symtab_cflags \" $arg\" ;;\n\t  esac\n\tdone\n\n\t# Now compile the dynamic symbol file.\n\tfunc_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable \"$my_dlsyms\")' 'exit $?'\n\n\t# Clean up the generated files.\n\tfunc_show_eval '$RM \"$output_objdir/$my_dlsyms\" \"$nlist\" \"${nlist}S\" \"${nlist}T\"'\n\n\t# Transform the symbol file into the correct name.\n\tsymfileobj=\"$output_objdir/${my_outputname}S.$objext\"\n\tcase $host in\n\t*cygwin* | *mingw* | *cegcc* )\n\t  if test -f \"$output_objdir/$my_outputname.def\"; then\n\t    compile_command=`$ECHO \"$compile_command\" | $SED \"s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%\"`\n\t    finalize_command=`$ECHO \"$finalize_command\" | $SED \"s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%\"`\n\t  else\n\t    compile_command=`$ECHO \"$compile_command\" | $SED \"s%@SYMFILE@%$symfileobj%\"`\n\t    finalize_command=`$ECHO \"$finalize_command\" | $SED \"s%@SYMFILE@%$symfileobj%\"`\n\t  fi\n\t  ;;\n\t*)\n\t  compile_command=`$ECHO \"$compile_command\" | $SED \"s%@SYMFILE@%$symfileobj%\"`\n\t  finalize_command=`$ECHO \"$finalize_command\" | $SED \"s%@SYMFILE@%$symfileobj%\"`\n\t  ;;\n\tesac\n\t;;\n      *)\n\tfunc_fatal_error \"unknown suffix for \\`$my_dlsyms'\"\n\t;;\n      esac\n    else\n      # We keep going just in case the user didn't refer to\n      # lt_preloaded_symbols.  The linker will fail if global_symbol_pipe\n      # really was required.\n\n      # Nullify the symbol file.\n      compile_command=`$ECHO \"$compile_command\" | $SED \"s% @SYMFILE@%%\"`\n      finalize_command=`$ECHO \"$finalize_command\" | $SED \"s% @SYMFILE@%%\"`\n    fi\n}\n\n# func_win32_libid arg\n# return the library type of file 'arg'\n#\n# Need a lot of goo to handle *both* DLLs and import libs\n# Has to be a shell function in order to 'eat' the argument\n# that is supplied when $file_magic_command is called.\n# Despite the name, also deal with 64 bit binaries.\nfunc_win32_libid ()\n{\n  $opt_debug\n  win32_libid_type=\"unknown\"\n  win32_fileres=`file -L $1 2>/dev/null`\n  case $win32_fileres in\n  *ar\\ archive\\ import\\ library*) # definitely import\n    win32_libid_type=\"x86 archive import\"\n    ;;\n  *ar\\ archive*) # could be an import, or static\n    # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD.\n    if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null |\n       $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then\n      func_to_tool_file \"$1\" func_convert_file_msys_to_w32\n      win32_nmres=`eval $NM -f posix -A \\\"$func_to_tool_file_result\\\" |\n\t$SED -n -e '\n\t    1,100{\n\t\t/ I /{\n\t\t    s,.*,import,\n\t\t    p\n\t\t    q\n\t\t}\n\t    }'`\n      case $win32_nmres in\n      import*)  win32_libid_type=\"x86 archive import\";;\n      *)        win32_libid_type=\"x86 archive static\";;\n      esac\n    fi\n    ;;\n  *DLL*)\n    win32_libid_type=\"x86 DLL\"\n    ;;\n  *executable*) # but shell scripts are \"executable\" too...\n    case $win32_fileres in\n    *MS\\ Windows\\ PE\\ Intel*)\n      win32_libid_type=\"x86 DLL\"\n      ;;\n    esac\n    ;;\n  esac\n  $ECHO \"$win32_libid_type\"\n}\n\n# func_cygming_dll_for_implib ARG\n#\n# Platform-specific function to extract the\n# name of the DLL associated with the specified\n# import library ARG.\n# Invoked by eval'ing the libtool variable\n#    $sharedlib_from_linklib_cmd\n# Result is available in the variable\n#    $sharedlib_from_linklib_result\nfunc_cygming_dll_for_implib ()\n{\n  $opt_debug\n  sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify \"$1\"`\n}\n\n# func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs\n#\n# The is the core of a fallback implementation of a\n# platform-specific function to extract the name of the\n# DLL associated with the specified import library LIBNAME.\n#\n# SECTION_NAME is either .idata$6 or .idata$7, depending\n# on the platform and compiler that created the implib.\n#\n# Echos the name of the DLL associated with the\n# specified import library.\nfunc_cygming_dll_for_implib_fallback_core ()\n{\n  $opt_debug\n  match_literal=`$ECHO \"$1\" | $SED \"$sed_make_literal_regex\"`\n  $OBJDUMP -s --section \"$1\" \"$2\" 2>/dev/null |\n    $SED '/^Contents of section '\"$match_literal\"':/{\n      # Place marker at beginning of archive member dllname section\n      s/.*/====MARK====/\n      p\n      d\n    }\n    # These lines can sometimes be longer than 43 characters, but\n    # are always uninteresting\n    /:[\t ]*file format pe[i]\\{,1\\}-/d\n    /^In archive [^:]*:/d\n    # Ensure marker is printed\n    /^====MARK====/p\n    # Remove all lines with less than 43 characters\n    /^.\\{43\\}/!d\n    # From remaining lines, remove first 43 characters\n    s/^.\\{43\\}//' |\n    $SED -n '\n      # Join marker and all lines until next marker into a single line\n      /^====MARK====/ b para\n      H\n      $ b para\n      b\n      :para\n      x\n      s/\\n//g\n      # Remove the marker\n      s/^====MARK====//\n      # Remove trailing dots and whitespace\n      s/[\\. \\t]*$//\n      # Print\n      /./p' |\n    # we now have a list, one entry per line, of the stringified\n    # contents of the appropriate section of all members of the\n    # archive which possess that section. Heuristic: eliminate\n    # all those which have a first or second character that is\n    # a '.' (that is, objdump's representation of an unprintable\n    # character.) This should work for all archives with less than\n    # 0x302f exports -- but will fail for DLLs whose name actually\n    # begins with a literal '.' or a single character followed by\n    # a '.'.\n    #\n    # Of those that remain, print the first one.\n    $SED -e '/^\\./d;/^.\\./d;q'\n}\n\n# func_cygming_gnu_implib_p ARG\n# This predicate returns with zero status (TRUE) if\n# ARG is a GNU/binutils-style import library. Returns\n# with nonzero status (FALSE) otherwise.\nfunc_cygming_gnu_implib_p ()\n{\n  $opt_debug\n  func_to_tool_file \"$1\" func_convert_file_msys_to_w32\n  func_cygming_gnu_implib_tmp=`$NM \"$func_to_tool_file_result\" | eval \"$global_symbol_pipe\" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'`\n  test -n \"$func_cygming_gnu_implib_tmp\"\n}\n\n# func_cygming_ms_implib_p ARG\n# This predicate returns with zero status (TRUE) if\n# ARG is an MS-style import library. Returns\n# with nonzero status (FALSE) otherwise.\nfunc_cygming_ms_implib_p ()\n{\n  $opt_debug\n  func_to_tool_file \"$1\" func_convert_file_msys_to_w32\n  func_cygming_ms_implib_tmp=`$NM \"$func_to_tool_file_result\" | eval \"$global_symbol_pipe\" | $GREP '_NULL_IMPORT_DESCRIPTOR'`\n  test -n \"$func_cygming_ms_implib_tmp\"\n}\n\n# func_cygming_dll_for_implib_fallback ARG\n# Platform-specific function to extract the\n# name of the DLL associated with the specified\n# import library ARG.\n#\n# This fallback implementation is for use when $DLLTOOL\n# does not support the --identify-strict option.\n# Invoked by eval'ing the libtool variable\n#    $sharedlib_from_linklib_cmd\n# Result is available in the variable\n#    $sharedlib_from_linklib_result\nfunc_cygming_dll_for_implib_fallback ()\n{\n  $opt_debug\n  if func_cygming_gnu_implib_p \"$1\" ; then\n    # binutils import library\n    sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' \"$1\"`\n  elif func_cygming_ms_implib_p \"$1\" ; then\n    # ms-generated import library\n    sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' \"$1\"`\n  else\n    # unknown\n    sharedlib_from_linklib_result=\"\"\n  fi\n}\n\n\n# func_extract_an_archive dir oldlib\nfunc_extract_an_archive ()\n{\n    $opt_debug\n    f_ex_an_ar_dir=\"$1\"; shift\n    f_ex_an_ar_oldlib=\"$1\"\n    if test \"$lock_old_archive_extraction\" = yes; then\n      lockfile=$f_ex_an_ar_oldlib.lock\n      until $opt_dry_run || ln \"$progpath\" \"$lockfile\" 2>/dev/null; do\n\tfunc_echo \"Waiting for $lockfile to be removed\"\n\tsleep 2\n      done\n    fi\n    func_show_eval \"(cd \\$f_ex_an_ar_dir && $AR x \\\"\\$f_ex_an_ar_oldlib\\\")\" \\\n\t\t   'stat=$?; rm -f \"$lockfile\"; exit $stat'\n    if test \"$lock_old_archive_extraction\" = yes; then\n      $opt_dry_run || rm -f \"$lockfile\"\n    fi\n    if ($AR t \"$f_ex_an_ar_oldlib\" | sort | sort -uc >/dev/null 2>&1); then\n     :\n    else\n      func_fatal_error \"object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib\"\n    fi\n}\n\n\n# func_extract_archives gentop oldlib ...\nfunc_extract_archives ()\n{\n    $opt_debug\n    my_gentop=\"$1\"; shift\n    my_oldlibs=${1+\"$@\"}\n    my_oldobjs=\"\"\n    my_xlib=\"\"\n    my_xabs=\"\"\n    my_xdir=\"\"\n\n    for my_xlib in $my_oldlibs; do\n      # Extract the objects.\n      case $my_xlib in\n\t[\\\\/]* | [A-Za-z]:[\\\\/]*) my_xabs=\"$my_xlib\" ;;\n\t*) my_xabs=`pwd`\"/$my_xlib\" ;;\n      esac\n      func_basename \"$my_xlib\"\n      my_xlib=\"$func_basename_result\"\n      my_xlib_u=$my_xlib\n      while :; do\n        case \" $extracted_archives \" in\n\t*\" $my_xlib_u \"*)\n\t  func_arith $extracted_serial + 1\n\t  extracted_serial=$func_arith_result\n\t  my_xlib_u=lt$extracted_serial-$my_xlib ;;\n\t*) break ;;\n\tesac\n      done\n      extracted_archives=\"$extracted_archives $my_xlib_u\"\n      my_xdir=\"$my_gentop/$my_xlib_u\"\n\n      func_mkdir_p \"$my_xdir\"\n\n      case $host in\n      *-darwin*)\n\tfunc_verbose \"Extracting $my_xabs\"\n\t# Do not bother doing anything if just a dry run\n\t$opt_dry_run || {\n\t  darwin_orig_dir=`pwd`\n\t  cd $my_xdir || exit $?\n\t  darwin_archive=$my_xabs\n\t  darwin_curdir=`pwd`\n\t  darwin_base_archive=`basename \"$darwin_archive\"`\n\t  darwin_arches=`$LIPO -info \"$darwin_archive\" 2>/dev/null | $GREP Architectures 2>/dev/null || true`\n\t  if test -n \"$darwin_arches\"; then\n\t    darwin_arches=`$ECHO \"$darwin_arches\" | $SED -e 's/.*are://'`\n\t    darwin_arch=\n\t    func_verbose \"$darwin_base_archive has multiple architectures $darwin_arches\"\n\t    for darwin_arch in  $darwin_arches ; do\n\t      func_mkdir_p \"unfat-$$/${darwin_base_archive}-${darwin_arch}\"\n\t      $LIPO -thin $darwin_arch -output \"unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}\" \"${darwin_archive}\"\n\t      cd \"unfat-$$/${darwin_base_archive}-${darwin_arch}\"\n\t      func_extract_an_archive \"`pwd`\" \"${darwin_base_archive}\"\n\t      cd \"$darwin_curdir\"\n\t      $RM \"unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}\"\n\t    done # $darwin_arches\n            ## Okay now we've a bunch of thin objects, gotta fatten them up :)\n\t    darwin_filelist=`find unfat-$$ -type f -name \\*.o -print -o -name \\*.lo -print | $SED -e \"$basename\" | sort -u`\n\t    darwin_file=\n\t    darwin_files=\n\t    for darwin_file in $darwin_filelist; do\n\t      darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP`\n\t      $LIPO -create -output \"$darwin_file\" $darwin_files\n\t    done # $darwin_filelist\n\t    $RM -rf unfat-$$\n\t    cd \"$darwin_orig_dir\"\n\t  else\n\t    cd $darwin_orig_dir\n\t    func_extract_an_archive \"$my_xdir\" \"$my_xabs\"\n\t  fi # $darwin_arches\n\t} # !$opt_dry_run\n\t;;\n      *)\n        func_extract_an_archive \"$my_xdir\" \"$my_xabs\"\n\t;;\n      esac\n      my_oldobjs=\"$my_oldobjs \"`find $my_xdir -name \\*.$objext -print -o -name \\*.lo -print | sort | $NL2SP`\n    done\n\n    func_extract_archives_result=\"$my_oldobjs\"\n}\n\n\n# func_emit_wrapper [arg=no]\n#\n# Emit a libtool wrapper script on stdout.\n# Don't directly open a file because we may want to\n# incorporate the script contents within a cygwin/mingw\n# wrapper executable.  Must ONLY be called from within\n# func_mode_link because it depends on a number of variables\n# set therein.\n#\n# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\n# variable will take.  If 'yes', then the emitted script\n# will assume that the directory in which it is stored is\n# the $objdir directory.  This is a cygwin/mingw-specific\n# behavior.\nfunc_emit_wrapper ()\n{\n\tfunc_emit_wrapper_arg1=${1-no}\n\n\t$ECHO \"\\\n#! $SHELL\n\n# $output - temporary wrapper script for $objdir/$outputname\n# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION\n#\n# The $output program cannot be directly executed until all the libtool\n# libraries that it depends on are installed.\n#\n# This wrapper script should never be moved out of the build directory.\n# If it is, it will not operate correctly.\n\n# Sed substitution that helps us do robust quoting.  It backslashifies\n# metacharacters that are still active within double-quoted strings.\nsed_quote_subst='$sed_quote_subst'\n\n# Be Bourne compatible\nif test -n \\\"\\${ZSH_VERSION+set}\\\" && (emulate sh) >/dev/null 2>&1; then\n  emulate sh\n  NULLCMD=:\n  # Zsh 3.x and 4.x performs word splitting on \\${1+\\\"\\$@\\\"}, which\n  # is contrary to our usage.  Disable this feature.\n  alias -g '\\${1+\\\"\\$@\\\"}'='\\\"\\$@\\\"'\n  setopt NO_GLOB_SUBST\nelse\n  case \\`(set -o) 2>/dev/null\\` in *posix*) set -o posix;; esac\nfi\nBIN_SH=xpg4; export BIN_SH # for Tru64\nDUALCASE=1; export DUALCASE # for MKS sh\n\n# The HP-UX ksh and POSIX shell print the target directory to stdout\n# if CDPATH is set.\n(unset CDPATH) >/dev/null 2>&1 && unset CDPATH\n\nrelink_command=\\\"$relink_command\\\"\n\n# This environment variable determines our operation mode.\nif test \\\"\\$libtool_install_magic\\\" = \\\"$magic\\\"; then\n  # install mode needs the following variables:\n  generated_by_libtool_version='$macro_version'\n  notinst_deplibs='$notinst_deplibs'\nelse\n  # When we are sourced in execute mode, \\$file and \\$ECHO are already set.\n  if test \\\"\\$libtool_execute_magic\\\" != \\\"$magic\\\"; then\n    file=\\\"\\$0\\\"\"\n\n    qECHO=`$ECHO \"$ECHO\" | $SED \"$sed_quote_subst\"`\n    $ECHO \"\\\n\n# A function that is used when there is no print builtin or printf.\nfunc_fallback_echo ()\n{\n  eval 'cat <<_LTECHO_EOF\n\\$1\n_LTECHO_EOF'\n}\n    ECHO=\\\"$qECHO\\\"\n  fi\n\n# Very basic option parsing. These options are (a) specific to\n# the libtool wrapper, (b) are identical between the wrapper\n# /script/ and the wrapper /executable/ which is used only on\n# windows platforms, and (c) all begin with the string \"--lt-\"\n# (application programs are unlikely to have options which match\n# this pattern).\n#\n# There are only two supported options: --lt-debug and\n# --lt-dump-script. There is, deliberately, no --lt-help.\n#\n# The first argument to this parsing function should be the\n# script's $0 value, followed by \"$@\".\nlt_option_debug=\nfunc_parse_lt_options ()\n{\n  lt_script_arg0=\\$0\n  shift\n  for lt_opt\n  do\n    case \\\"\\$lt_opt\\\" in\n    --lt-debug) lt_option_debug=1 ;;\n    --lt-dump-script)\n        lt_dump_D=\\`\\$ECHO \\\"X\\$lt_script_arg0\\\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\\`\n        test \\\"X\\$lt_dump_D\\\" = \\\"X\\$lt_script_arg0\\\" && lt_dump_D=.\n        lt_dump_F=\\`\\$ECHO \\\"X\\$lt_script_arg0\\\" | $SED -e 's/^X//' -e 's%^.*/%%'\\`\n        cat \\\"\\$lt_dump_D/\\$lt_dump_F\\\"\n        exit 0\n      ;;\n    --lt-*)\n        \\$ECHO \\\"Unrecognized --lt- option: '\\$lt_opt'\\\" 1>&2\n        exit 1\n      ;;\n    esac\n  done\n\n  # Print the debug banner immediately:\n  if test -n \\\"\\$lt_option_debug\\\"; then\n    echo \\\"${outputname}:${output}:\\${LINENO}: libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\\\" 1>&2\n  fi\n}\n\n# Used when --lt-debug. Prints its arguments to stdout\n# (redirection is the responsibility of the caller)\nfunc_lt_dump_args ()\n{\n  lt_dump_args_N=1;\n  for lt_arg\n  do\n    \\$ECHO \\\"${outputname}:${output}:\\${LINENO}: newargv[\\$lt_dump_args_N]: \\$lt_arg\\\"\n    lt_dump_args_N=\\`expr \\$lt_dump_args_N + 1\\`\n  done\n}\n\n# Core function for launching the target application\nfunc_exec_program_core ()\n{\n\"\n  case $host in\n  # Backslashes separate directories on plain windows\n  *-*-mingw | *-*-os2* | *-cegcc*)\n    $ECHO \"\\\n      if test -n \\\"\\$lt_option_debug\\\"; then\n        \\$ECHO \\\"${outputname}:${output}:\\${LINENO}: newargv[0]: \\$progdir\\\\\\\\\\$program\\\" 1>&2\n        func_lt_dump_args \\${1+\\\"\\$@\\\"} 1>&2\n      fi\n      exec \\\"\\$progdir\\\\\\\\\\$program\\\" \\${1+\\\"\\$@\\\"}\n\"\n    ;;\n\n  *)\n    $ECHO \"\\\n      if test -n \\\"\\$lt_option_debug\\\"; then\n        \\$ECHO \\\"${outputname}:${output}:\\${LINENO}: newargv[0]: \\$progdir/\\$program\\\" 1>&2\n        func_lt_dump_args \\${1+\\\"\\$@\\\"} 1>&2\n      fi\n      exec \\\"\\$progdir/\\$program\\\" \\${1+\\\"\\$@\\\"}\n\"\n    ;;\n  esac\n  $ECHO \"\\\n      \\$ECHO \\\"\\$0: cannot exec \\$program \\$*\\\" 1>&2\n      exit 1\n}\n\n# A function to encapsulate launching the target application\n# Strips options in the --lt-* namespace from \\$@ and\n# launches target application with the remaining arguments.\nfunc_exec_program ()\n{\n  case \\\" \\$* \\\" in\n  *\\\\ --lt-*)\n    for lt_wr_arg\n    do\n      case \\$lt_wr_arg in\n      --lt-*) ;;\n      *) set x \\\"\\$@\\\" \\\"\\$lt_wr_arg\\\"; shift;;\n      esac\n      shift\n    done ;;\n  esac\n  func_exec_program_core \\${1+\\\"\\$@\\\"}\n}\n\n  # Parse options\n  func_parse_lt_options \\\"\\$0\\\" \\${1+\\\"\\$@\\\"}\n\n  # Find the directory that this script lives in.\n  thisdir=\\`\\$ECHO \\\"\\$file\\\" | $SED 's%/[^/]*$%%'\\`\n  test \\\"x\\$thisdir\\\" = \\\"x\\$file\\\" && thisdir=.\n\n  # Follow symbolic links until we get to the real thisdir.\n  file=\\`ls -ld \\\"\\$file\\\" | $SED -n 's/.*-> //p'\\`\n  while test -n \\\"\\$file\\\"; do\n    destdir=\\`\\$ECHO \\\"\\$file\\\" | $SED 's%/[^/]*\\$%%'\\`\n\n    # If there was a directory component, then change thisdir.\n    if test \\\"x\\$destdir\\\" != \\\"x\\$file\\\"; then\n      case \\\"\\$destdir\\\" in\n      [\\\\\\\\/]* | [A-Za-z]:[\\\\\\\\/]*) thisdir=\\\"\\$destdir\\\" ;;\n      *) thisdir=\\\"\\$thisdir/\\$destdir\\\" ;;\n      esac\n    fi\n\n    file=\\`\\$ECHO \\\"\\$file\\\" | $SED 's%^.*/%%'\\`\n    file=\\`ls -ld \\\"\\$thisdir/\\$file\\\" | $SED -n 's/.*-> //p'\\`\n  done\n\n  # Usually 'no', except on cygwin/mingw when embedded into\n  # the cwrapper.\n  WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1\n  if test \\\"\\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\\\" = \\\"yes\\\"; then\n    # special case for '.'\n    if test \\\"\\$thisdir\\\" = \\\".\\\"; then\n      thisdir=\\`pwd\\`\n    fi\n    # remove .libs from thisdir\n    case \\\"\\$thisdir\\\" in\n    *[\\\\\\\\/]$objdir ) thisdir=\\`\\$ECHO \\\"\\$thisdir\\\" | $SED 's%[\\\\\\\\/][^\\\\\\\\/]*$%%'\\` ;;\n    $objdir )   thisdir=. ;;\n    esac\n  fi\n\n  # Try to get the absolute directory name.\n  absdir=\\`cd \\\"\\$thisdir\\\" && pwd\\`\n  test -n \\\"\\$absdir\\\" && thisdir=\\\"\\$absdir\\\"\n\"\n\n\tif test \"$fast_install\" = yes; then\n\t  $ECHO \"\\\n  program=lt-'$outputname'$exeext\n  progdir=\\\"\\$thisdir/$objdir\\\"\n\n  if test ! -f \\\"\\$progdir/\\$program\\\" ||\n     { file=\\`ls -1dt \\\"\\$progdir/\\$program\\\" \\\"\\$progdir/../\\$program\\\" 2>/dev/null | ${SED} 1q\\`; \\\\\n       test \\\"X\\$file\\\" != \\\"X\\$progdir/\\$program\\\"; }; then\n\n    file=\\\"\\$\\$-\\$program\\\"\n\n    if test ! -d \\\"\\$progdir\\\"; then\n      $MKDIR \\\"\\$progdir\\\"\n    else\n      $RM \\\"\\$progdir/\\$file\\\"\n    fi\"\n\n\t  $ECHO \"\\\n\n    # relink executable if necessary\n    if test -n \\\"\\$relink_command\\\"; then\n      if relink_command_output=\\`eval \\$relink_command 2>&1\\`; then :\n      else\n\t$ECHO \\\"\\$relink_command_output\\\" >&2\n\t$RM \\\"\\$progdir/\\$file\\\"\n\texit 1\n      fi\n    fi\n\n    $MV \\\"\\$progdir/\\$file\\\" \\\"\\$progdir/\\$program\\\" 2>/dev/null ||\n    { $RM \\\"\\$progdir/\\$program\\\";\n      $MV \\\"\\$progdir/\\$file\\\" \\\"\\$progdir/\\$program\\\"; }\n    $RM \\\"\\$progdir/\\$file\\\"\n  fi\"\n\telse\n\t  $ECHO \"\\\n  program='$outputname'\n  progdir=\\\"\\$thisdir/$objdir\\\"\n\"\n\tfi\n\n\t$ECHO \"\\\n\n  if test -f \\\"\\$progdir/\\$program\\\"; then\"\n\n\t# fixup the dll searchpath if we need to.\n\t#\n\t# Fix the DLL searchpath if we need to.  Do this before prepending\n\t# to shlibpath, because on Windows, both are PATH and uninstalled\n\t# libraries must come first.\n\tif test -n \"$dllsearchpath\"; then\n\t  $ECHO \"\\\n    # Add the dll search path components to the executable PATH\n    PATH=$dllsearchpath:\\$PATH\n\"\n\tfi\n\n\t# Export our shlibpath_var if we have one.\n\tif test \"$shlibpath_overrides_runpath\" = yes && test -n \"$shlibpath_var\" && test -n \"$temp_rpath\"; then\n\t  $ECHO \"\\\n    # Add our own library path to $shlibpath_var\n    $shlibpath_var=\\\"$temp_rpath\\$$shlibpath_var\\\"\n\n    # Some systems cannot cope with colon-terminated $shlibpath_var\n    # The second colon is a workaround for a bug in BeOS R4 sed\n    $shlibpath_var=\\`\\$ECHO \\\"\\$$shlibpath_var\\\" | $SED 's/::*\\$//'\\`\n\n    export $shlibpath_var\n\"\n\tfi\n\n\t$ECHO \"\\\n    if test \\\"\\$libtool_execute_magic\\\" != \\\"$magic\\\"; then\n      # Run the actual program with our arguments.\n      func_exec_program \\${1+\\\"\\$@\\\"}\n    fi\n  else\n    # The program doesn't exist.\n    \\$ECHO \\\"\\$0: error: \\\\\\`\\$progdir/\\$program' does not exist\\\" 1>&2\n    \\$ECHO \\\"This script is just a wrapper for \\$program.\\\" 1>&2\n    \\$ECHO \\\"See the $PACKAGE documentation for more information.\\\" 1>&2\n    exit 1\n  fi\nfi\\\n\"\n}\n\n\n# func_emit_cwrapperexe_src\n# emit the source code for a wrapper executable on stdout\n# Must ONLY be called from within func_mode_link because\n# it depends on a number of variable set therein.\nfunc_emit_cwrapperexe_src ()\n{\n\tcat <<EOF\n\n/* $cwrappersource - temporary wrapper executable for $objdir/$outputname\n   Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION\n\n   The $output program cannot be directly executed until all the libtool\n   libraries that it depends on are installed.\n\n   This wrapper executable should never be moved out of the build directory.\n   If it is, it will not operate correctly.\n*/\nEOF\n\t    cat <<\"EOF\"\n#ifdef _MSC_VER\n# define _CRT_SECURE_NO_DEPRECATE 1\n#endif\n#include <stdio.h>\n#include <stdlib.h>\n#ifdef _MSC_VER\n# include <direct.h>\n# include <process.h>\n# include <io.h>\n#else\n# include <unistd.h>\n# include <stdint.h>\n# ifdef __CYGWIN__\n#  include <io.h>\n# endif\n#endif\n#include <malloc.h>\n#include <stdarg.h>\n#include <assert.h>\n#include <string.h>\n#include <ctype.h>\n#include <errno.h>\n#include <fcntl.h>\n#include <sys/stat.h>\n\n/* declarations of non-ANSI functions */\n#if defined(__MINGW32__)\n# ifdef __STRICT_ANSI__\nint _putenv (const char *);\n# endif\n#elif defined(__CYGWIN__)\n# ifdef __STRICT_ANSI__\nchar *realpath (const char *, char *);\nint putenv (char *);\nint setenv (const char *, const char *, int);\n# endif\n/* #elif defined (other platforms) ... */\n#endif\n\n/* portability defines, excluding path handling macros */\n#if defined(_MSC_VER)\n# define setmode _setmode\n# define stat    _stat\n# define chmod   _chmod\n# define getcwd  _getcwd\n# define putenv  _putenv\n# define S_IXUSR _S_IEXEC\n# ifndef _INTPTR_T_DEFINED\n#  define _INTPTR_T_DEFINED\n#  define intptr_t int\n# endif\n#elif defined(__MINGW32__)\n# define setmode _setmode\n# define stat    _stat\n# define chmod   _chmod\n# define getcwd  _getcwd\n# define putenv  _putenv\n#elif defined(__CYGWIN__)\n# define HAVE_SETENV\n# define FOPEN_WB \"wb\"\n/* #elif defined (other platforms) ... */\n#endif\n\n#if defined(PATH_MAX)\n# define LT_PATHMAX PATH_MAX\n#elif defined(MAXPATHLEN)\n# define LT_PATHMAX MAXPATHLEN\n#else\n# define LT_PATHMAX 1024\n#endif\n\n#ifndef S_IXOTH\n# define S_IXOTH 0\n#endif\n#ifndef S_IXGRP\n# define S_IXGRP 0\n#endif\n\n/* path handling portability macros */\n#ifndef DIR_SEPARATOR\n# define DIR_SEPARATOR '/'\n# define PATH_SEPARATOR ':'\n#endif\n\n#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \\\n  defined (__OS2__)\n# define HAVE_DOS_BASED_FILE_SYSTEM\n# define FOPEN_WB \"wb\"\n# ifndef DIR_SEPARATOR_2\n#  define DIR_SEPARATOR_2 '\\\\'\n# endif\n# ifndef PATH_SEPARATOR_2\n#  define PATH_SEPARATOR_2 ';'\n# endif\n#endif\n\n#ifndef DIR_SEPARATOR_2\n# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)\n#else /* DIR_SEPARATOR_2 */\n# define IS_DIR_SEPARATOR(ch) \\\n\t(((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))\n#endif /* DIR_SEPARATOR_2 */\n\n#ifndef PATH_SEPARATOR_2\n# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR)\n#else /* PATH_SEPARATOR_2 */\n# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2)\n#endif /* PATH_SEPARATOR_2 */\n\n#ifndef FOPEN_WB\n# define FOPEN_WB \"w\"\n#endif\n#ifndef _O_BINARY\n# define _O_BINARY 0\n#endif\n\n#define XMALLOC(type, num)      ((type *) xmalloc ((num) * sizeof(type)))\n#define XFREE(stale) do { \\\n  if (stale) { free ((void *) stale); stale = 0; } \\\n} while (0)\n\n#if defined(LT_DEBUGWRAPPER)\nstatic int lt_debug = 1;\n#else\nstatic int lt_debug = 0;\n#endif\n\nconst char *program_name = \"libtool-wrapper\"; /* in case xstrdup fails */\n\nvoid *xmalloc (size_t num);\nchar *xstrdup (const char *string);\nconst char *base_name (const char *name);\nchar *find_executable (const char *wrapper);\nchar *chase_symlinks (const char *pathspec);\nint make_executable (const char *path);\nint check_executable (const char *path);\nchar *strendzap (char *str, const char *pat);\nvoid lt_debugprintf (const char *file, int line, const char *fmt, ...);\nvoid lt_fatal (const char *file, int line, const char *message, ...);\nstatic const char *nonnull (const char *s);\nstatic const char *nonempty (const char *s);\nvoid lt_setenv (const char *name, const char *value);\nchar *lt_extend_str (const char *orig_value, const char *add, int to_end);\nvoid lt_update_exe_path (const char *name, const char *value);\nvoid lt_update_lib_path (const char *name, const char *value);\nchar **prepare_spawn (char **argv);\nvoid lt_dump_script (FILE *f);\nEOF\n\n\t    cat <<EOF\nvolatile const char * MAGIC_EXE = \"$magic_exe\";\nconst char * LIB_PATH_VARNAME = \"$shlibpath_var\";\nEOF\n\n\t    if test \"$shlibpath_overrides_runpath\" = yes && test -n \"$shlibpath_var\" && test -n \"$temp_rpath\"; then\n              func_to_host_path \"$temp_rpath\"\n\t      cat <<EOF\nconst char * LIB_PATH_VALUE   = \"$func_to_host_path_result\";\nEOF\n\t    else\n\t      cat <<\"EOF\"\nconst char * LIB_PATH_VALUE   = \"\";\nEOF\n\t    fi\n\n\t    if test -n \"$dllsearchpath\"; then\n              func_to_host_path \"$dllsearchpath:\"\n\t      cat <<EOF\nconst char * EXE_PATH_VARNAME = \"PATH\";\nconst char * EXE_PATH_VALUE   = \"$func_to_host_path_result\";\nEOF\n\t    else\n\t      cat <<\"EOF\"\nconst char * EXE_PATH_VARNAME = \"\";\nconst char * EXE_PATH_VALUE   = \"\";\nEOF\n\t    fi\n\n\t    if test \"$fast_install\" = yes; then\n\t      cat <<EOF\nconst char * TARGET_PROGRAM_NAME = \"lt-$outputname\"; /* hopefully, no .exe */\nEOF\n\t    else\n\t      cat <<EOF\nconst char * TARGET_PROGRAM_NAME = \"$outputname\"; /* hopefully, no .exe */\nEOF\n\t    fi\n\n\n\t    cat <<\"EOF\"\n\n#define LTWRAPPER_OPTION_PREFIX         \"--lt-\"\n\nstatic const char *ltwrapper_option_prefix = LTWRAPPER_OPTION_PREFIX;\nstatic const char *dumpscript_opt       = LTWRAPPER_OPTION_PREFIX \"dump-script\";\nstatic const char *debug_opt            = LTWRAPPER_OPTION_PREFIX \"debug\";\n\nint\nmain (int argc, char *argv[])\n{\n  char **newargz;\n  int  newargc;\n  char *tmp_pathspec;\n  char *actual_cwrapper_path;\n  char *actual_cwrapper_name;\n  char *target_name;\n  char *lt_argv_zero;\n  intptr_t rval = 127;\n\n  int i;\n\n  program_name = (char *) xstrdup (base_name (argv[0]));\n  newargz = XMALLOC (char *, argc + 1);\n\n  /* very simple arg parsing; don't want to rely on getopt\n   * also, copy all non cwrapper options to newargz, except\n   * argz[0], which is handled differently\n   */\n  newargc=0;\n  for (i = 1; i < argc; i++)\n    {\n      if (strcmp (argv[i], dumpscript_opt) == 0)\n\t{\nEOF\n\t    case \"$host\" in\n\t      *mingw* | *cygwin* )\n\t\t# make stdout use \"unix\" line endings\n\t\techo \"          setmode(1,_O_BINARY);\"\n\t\t;;\n\t      esac\n\n\t    cat <<\"EOF\"\n\t  lt_dump_script (stdout);\n\t  return 0;\n\t}\n      if (strcmp (argv[i], debug_opt) == 0)\n\t{\n          lt_debug = 1;\n          continue;\n\t}\n      if (strcmp (argv[i], ltwrapper_option_prefix) == 0)\n        {\n          /* however, if there is an option in the LTWRAPPER_OPTION_PREFIX\n             namespace, but it is not one of the ones we know about and\n             have already dealt with, above (including dump-script), then\n             report an error. Otherwise, targets might begin to believe\n             they are allowed to use options in the LTWRAPPER_OPTION_PREFIX\n             namespace. The first time any user complains about this, we'll\n             need to make LTWRAPPER_OPTION_PREFIX a configure-time option\n             or a configure.ac-settable value.\n           */\n          lt_fatal (__FILE__, __LINE__,\n\t\t    \"unrecognized %s option: '%s'\",\n                    ltwrapper_option_prefix, argv[i]);\n        }\n      /* otherwise ... */\n      newargz[++newargc] = xstrdup (argv[i]);\n    }\n  newargz[++newargc] = NULL;\n\nEOF\n\t    cat <<EOF\n  /* The GNU banner must be the first non-error debug message */\n  lt_debugprintf (__FILE__, __LINE__, \"libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\\n\");\nEOF\n\t    cat <<\"EOF\"\n  lt_debugprintf (__FILE__, __LINE__, \"(main) argv[0]: %s\\n\", argv[0]);\n  lt_debugprintf (__FILE__, __LINE__, \"(main) program_name: %s\\n\", program_name);\n\n  tmp_pathspec = find_executable (argv[0]);\n  if (tmp_pathspec == NULL)\n    lt_fatal (__FILE__, __LINE__, \"couldn't find %s\", argv[0]);\n  lt_debugprintf (__FILE__, __LINE__,\n                  \"(main) found exe (before symlink chase) at: %s\\n\",\n\t\t  tmp_pathspec);\n\n  actual_cwrapper_path = chase_symlinks (tmp_pathspec);\n  lt_debugprintf (__FILE__, __LINE__,\n                  \"(main) found exe (after symlink chase) at: %s\\n\",\n\t\t  actual_cwrapper_path);\n  XFREE (tmp_pathspec);\n\n  actual_cwrapper_name = xstrdup (base_name (actual_cwrapper_path));\n  strendzap (actual_cwrapper_path, actual_cwrapper_name);\n\n  /* wrapper name transforms */\n  strendzap (actual_cwrapper_name, \".exe\");\n  tmp_pathspec = lt_extend_str (actual_cwrapper_name, \".exe\", 1);\n  XFREE (actual_cwrapper_name);\n  actual_cwrapper_name = tmp_pathspec;\n  tmp_pathspec = 0;\n\n  /* target_name transforms -- use actual target program name; might have lt- prefix */\n  target_name = xstrdup (base_name (TARGET_PROGRAM_NAME));\n  strendzap (target_name, \".exe\");\n  tmp_pathspec = lt_extend_str (target_name, \".exe\", 1);\n  XFREE (target_name);\n  target_name = tmp_pathspec;\n  tmp_pathspec = 0;\n\n  lt_debugprintf (__FILE__, __LINE__,\n\t\t  \"(main) libtool target name: %s\\n\",\n\t\t  target_name);\nEOF\n\n\t    cat <<EOF\n  newargz[0] =\n    XMALLOC (char, (strlen (actual_cwrapper_path) +\n\t\t    strlen (\"$objdir\") + 1 + strlen (actual_cwrapper_name) + 1));\n  strcpy (newargz[0], actual_cwrapper_path);\n  strcat (newargz[0], \"$objdir\");\n  strcat (newargz[0], \"/\");\nEOF\n\n\t    cat <<\"EOF\"\n  /* stop here, and copy so we don't have to do this twice */\n  tmp_pathspec = xstrdup (newargz[0]);\n\n  /* do NOT want the lt- prefix here, so use actual_cwrapper_name */\n  strcat (newargz[0], actual_cwrapper_name);\n\n  /* DO want the lt- prefix here if it exists, so use target_name */\n  lt_argv_zero = lt_extend_str (tmp_pathspec, target_name, 1);\n  XFREE (tmp_pathspec);\n  tmp_pathspec = NULL;\nEOF\n\n\t    case $host_os in\n\t      mingw*)\n\t    cat <<\"EOF\"\n  {\n    char* p;\n    while ((p = strchr (newargz[0], '\\\\')) != NULL)\n      {\n\t*p = '/';\n      }\n    while ((p = strchr (lt_argv_zero, '\\\\')) != NULL)\n      {\n\t*p = '/';\n      }\n  }\nEOF\n\t    ;;\n\t    esac\n\n\t    cat <<\"EOF\"\n  XFREE (target_name);\n  XFREE (actual_cwrapper_path);\n  XFREE (actual_cwrapper_name);\n\n  lt_setenv (\"BIN_SH\", \"xpg4\"); /* for Tru64 */\n  lt_setenv (\"DUALCASE\", \"1\");  /* for MSK sh */\n  /* Update the DLL searchpath.  EXE_PATH_VALUE ($dllsearchpath) must\n     be prepended before (that is, appear after) LIB_PATH_VALUE ($temp_rpath)\n     because on Windows, both *_VARNAMEs are PATH but uninstalled\n     libraries must come first. */\n  lt_update_exe_path (EXE_PATH_VARNAME, EXE_PATH_VALUE);\n  lt_update_lib_path (LIB_PATH_VARNAME, LIB_PATH_VALUE);\n\n  lt_debugprintf (__FILE__, __LINE__, \"(main) lt_argv_zero: %s\\n\",\n\t\t  nonnull (lt_argv_zero));\n  for (i = 0; i < newargc; i++)\n    {\n      lt_debugprintf (__FILE__, __LINE__, \"(main) newargz[%d]: %s\\n\",\n\t\t      i, nonnull (newargz[i]));\n    }\n\nEOF\n\n\t    case $host_os in\n\t      mingw*)\n\t\tcat <<\"EOF\"\n  /* execv doesn't actually work on mingw as expected on unix */\n  newargz = prepare_spawn (newargz);\n  rval = _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz);\n  if (rval == -1)\n    {\n      /* failed to start process */\n      lt_debugprintf (__FILE__, __LINE__,\n\t\t      \"(main) failed to launch target \\\"%s\\\": %s\\n\",\n\t\t      lt_argv_zero, nonnull (strerror (errno)));\n      return 127;\n    }\n  return rval;\nEOF\n\t\t;;\n\t      *)\n\t\tcat <<\"EOF\"\n  execv (lt_argv_zero, newargz);\n  return rval; /* =127, but avoids unused variable warning */\nEOF\n\t\t;;\n\t    esac\n\n\t    cat <<\"EOF\"\n}\n\nvoid *\nxmalloc (size_t num)\n{\n  void *p = (void *) malloc (num);\n  if (!p)\n    lt_fatal (__FILE__, __LINE__, \"memory exhausted\");\n\n  return p;\n}\n\nchar *\nxstrdup (const char *string)\n{\n  return string ? strcpy ((char *) xmalloc (strlen (string) + 1),\n\t\t\t  string) : NULL;\n}\n\nconst char *\nbase_name (const char *name)\n{\n  const char *base;\n\n#if defined (HAVE_DOS_BASED_FILE_SYSTEM)\n  /* Skip over the disk name in MSDOS pathnames. */\n  if (isalpha ((unsigned char) name[0]) && name[1] == ':')\n    name += 2;\n#endif\n\n  for (base = name; *name; name++)\n    if (IS_DIR_SEPARATOR (*name))\n      base = name + 1;\n  return base;\n}\n\nint\ncheck_executable (const char *path)\n{\n  struct stat st;\n\n  lt_debugprintf (__FILE__, __LINE__, \"(check_executable): %s\\n\",\n                  nonempty (path));\n  if ((!path) || (!*path))\n    return 0;\n\n  if ((stat (path, &st) >= 0)\n      && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH)))\n    return 1;\n  else\n    return 0;\n}\n\nint\nmake_executable (const char *path)\n{\n  int rval = 0;\n  struct stat st;\n\n  lt_debugprintf (__FILE__, __LINE__, \"(make_executable): %s\\n\",\n                  nonempty (path));\n  if ((!path) || (!*path))\n    return 0;\n\n  if (stat (path, &st) >= 0)\n    {\n      rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR);\n    }\n  return rval;\n}\n\n/* Searches for the full path of the wrapper.  Returns\n   newly allocated full path name if found, NULL otherwise\n   Does not chase symlinks, even on platforms that support them.\n*/\nchar *\nfind_executable (const char *wrapper)\n{\n  int has_slash = 0;\n  const char *p;\n  const char *p_next;\n  /* static buffer for getcwd */\n  char tmp[LT_PATHMAX + 1];\n  int tmp_len;\n  char *concat_name;\n\n  lt_debugprintf (__FILE__, __LINE__, \"(find_executable): %s\\n\",\n                  nonempty (wrapper));\n\n  if ((wrapper == NULL) || (*wrapper == '\\0'))\n    return NULL;\n\n  /* Absolute path? */\n#if defined (HAVE_DOS_BASED_FILE_SYSTEM)\n  if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':')\n    {\n      concat_name = xstrdup (wrapper);\n      if (check_executable (concat_name))\n\treturn concat_name;\n      XFREE (concat_name);\n    }\n  else\n    {\n#endif\n      if (IS_DIR_SEPARATOR (wrapper[0]))\n\t{\n\t  concat_name = xstrdup (wrapper);\n\t  if (check_executable (concat_name))\n\t    return concat_name;\n\t  XFREE (concat_name);\n\t}\n#if defined (HAVE_DOS_BASED_FILE_SYSTEM)\n    }\n#endif\n\n  for (p = wrapper; *p; p++)\n    if (*p == '/')\n      {\n\thas_slash = 1;\n\tbreak;\n      }\n  if (!has_slash)\n    {\n      /* no slashes; search PATH */\n      const char *path = getenv (\"PATH\");\n      if (path != NULL)\n\t{\n\t  for (p = path; *p; p = p_next)\n\t    {\n\t      const char *q;\n\t      size_t p_len;\n\t      for (q = p; *q; q++)\n\t\tif (IS_PATH_SEPARATOR (*q))\n\t\t  break;\n\t      p_len = q - p;\n\t      p_next = (*q == '\\0' ? q : q + 1);\n\t      if (p_len == 0)\n\t\t{\n\t\t  /* empty path: current directory */\n\t\t  if (getcwd (tmp, LT_PATHMAX) == NULL)\n\t\t    lt_fatal (__FILE__, __LINE__, \"getcwd failed: %s\",\n                              nonnull (strerror (errno)));\n\t\t  tmp_len = strlen (tmp);\n\t\t  concat_name =\n\t\t    XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);\n\t\t  memcpy (concat_name, tmp, tmp_len);\n\t\t  concat_name[tmp_len] = '/';\n\t\t  strcpy (concat_name + tmp_len + 1, wrapper);\n\t\t}\n\t      else\n\t\t{\n\t\t  concat_name =\n\t\t    XMALLOC (char, p_len + 1 + strlen (wrapper) + 1);\n\t\t  memcpy (concat_name, p, p_len);\n\t\t  concat_name[p_len] = '/';\n\t\t  strcpy (concat_name + p_len + 1, wrapper);\n\t\t}\n\t      if (check_executable (concat_name))\n\t\treturn concat_name;\n\t      XFREE (concat_name);\n\t    }\n\t}\n      /* not found in PATH; assume curdir */\n    }\n  /* Relative path | not found in path: prepend cwd */\n  if (getcwd (tmp, LT_PATHMAX) == NULL)\n    lt_fatal (__FILE__, __LINE__, \"getcwd failed: %s\",\n              nonnull (strerror (errno)));\n  tmp_len = strlen (tmp);\n  concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);\n  memcpy (concat_name, tmp, tmp_len);\n  concat_name[tmp_len] = '/';\n  strcpy (concat_name + tmp_len + 1, wrapper);\n\n  if (check_executable (concat_name))\n    return concat_name;\n  XFREE (concat_name);\n  return NULL;\n}\n\nchar *\nchase_symlinks (const char *pathspec)\n{\n#ifndef S_ISLNK\n  return xstrdup (pathspec);\n#else\n  char buf[LT_PATHMAX];\n  struct stat s;\n  char *tmp_pathspec = xstrdup (pathspec);\n  char *p;\n  int has_symlinks = 0;\n  while (strlen (tmp_pathspec) && !has_symlinks)\n    {\n      lt_debugprintf (__FILE__, __LINE__,\n\t\t      \"checking path component for symlinks: %s\\n\",\n\t\t      tmp_pathspec);\n      if (lstat (tmp_pathspec, &s) == 0)\n\t{\n\t  if (S_ISLNK (s.st_mode) != 0)\n\t    {\n\t      has_symlinks = 1;\n\t      break;\n\t    }\n\n\t  /* search backwards for last DIR_SEPARATOR */\n\t  p = tmp_pathspec + strlen (tmp_pathspec) - 1;\n\t  while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p)))\n\t    p--;\n\t  if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p)))\n\t    {\n\t      /* no more DIR_SEPARATORS left */\n\t      break;\n\t    }\n\t  *p = '\\0';\n\t}\n      else\n\t{\n\t  lt_fatal (__FILE__, __LINE__,\n\t\t    \"error accessing file \\\"%s\\\": %s\",\n\t\t    tmp_pathspec, nonnull (strerror (errno)));\n\t}\n    }\n  XFREE (tmp_pathspec);\n\n  if (!has_symlinks)\n    {\n      return xstrdup (pathspec);\n    }\n\n  tmp_pathspec = realpath (pathspec, buf);\n  if (tmp_pathspec == 0)\n    {\n      lt_fatal (__FILE__, __LINE__,\n\t\t\"could not follow symlinks for %s\", pathspec);\n    }\n  return xstrdup (tmp_pathspec);\n#endif\n}\n\nchar *\nstrendzap (char *str, const char *pat)\n{\n  size_t len, patlen;\n\n  assert (str != NULL);\n  assert (pat != NULL);\n\n  len = strlen (str);\n  patlen = strlen (pat);\n\n  if (patlen <= len)\n    {\n      str += len - patlen;\n      if (strcmp (str, pat) == 0)\n\t*str = '\\0';\n    }\n  return str;\n}\n\nvoid\nlt_debugprintf (const char *file, int line, const char *fmt, ...)\n{\n  va_list args;\n  if (lt_debug)\n    {\n      (void) fprintf (stderr, \"%s:%s:%d: \", program_name, file, line);\n      va_start (args, fmt);\n      (void) vfprintf (stderr, fmt, args);\n      va_end (args);\n    }\n}\n\nstatic void\nlt_error_core (int exit_status, const char *file,\n\t       int line, const char *mode,\n\t       const char *message, va_list ap)\n{\n  fprintf (stderr, \"%s:%s:%d: %s: \", program_name, file, line, mode);\n  vfprintf (stderr, message, ap);\n  fprintf (stderr, \".\\n\");\n\n  if (exit_status >= 0)\n    exit (exit_status);\n}\n\nvoid\nlt_fatal (const char *file, int line, const char *message, ...)\n{\n  va_list ap;\n  va_start (ap, message);\n  lt_error_core (EXIT_FAILURE, file, line, \"FATAL\", message, ap);\n  va_end (ap);\n}\n\nstatic const char *\nnonnull (const char *s)\n{\n  return s ? s : \"(null)\";\n}\n\nstatic const char *\nnonempty (const char *s)\n{\n  return (s && !*s) ? \"(empty)\" : nonnull (s);\n}\n\nvoid\nlt_setenv (const char *name, const char *value)\n{\n  lt_debugprintf (__FILE__, __LINE__,\n\t\t  \"(lt_setenv) setting '%s' to '%s'\\n\",\n                  nonnull (name), nonnull (value));\n  {\n#ifdef HAVE_SETENV\n    /* always make a copy, for consistency with !HAVE_SETENV */\n    char *str = xstrdup (value);\n    setenv (name, str, 1);\n#else\n    int len = strlen (name) + 1 + strlen (value) + 1;\n    char *str = XMALLOC (char, len);\n    sprintf (str, \"%s=%s\", name, value);\n    if (putenv (str) != EXIT_SUCCESS)\n      {\n        XFREE (str);\n      }\n#endif\n  }\n}\n\nchar *\nlt_extend_str (const char *orig_value, const char *add, int to_end)\n{\n  char *new_value;\n  if (orig_value && *orig_value)\n    {\n      int orig_value_len = strlen (orig_value);\n      int add_len = strlen (add);\n      new_value = XMALLOC (char, add_len + orig_value_len + 1);\n      if (to_end)\n        {\n          strcpy (new_value, orig_value);\n          strcpy (new_value + orig_value_len, add);\n        }\n      else\n        {\n          strcpy (new_value, add);\n          strcpy (new_value + add_len, orig_value);\n        }\n    }\n  else\n    {\n      new_value = xstrdup (add);\n    }\n  return new_value;\n}\n\nvoid\nlt_update_exe_path (const char *name, const char *value)\n{\n  lt_debugprintf (__FILE__, __LINE__,\n\t\t  \"(lt_update_exe_path) modifying '%s' by prepending '%s'\\n\",\n                  nonnull (name), nonnull (value));\n\n  if (name && *name && value && *value)\n    {\n      char *new_value = lt_extend_str (getenv (name), value, 0);\n      /* some systems can't cope with a ':'-terminated path #' */\n      int len = strlen (new_value);\n      while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1]))\n        {\n          new_value[len-1] = '\\0';\n        }\n      lt_setenv (name, new_value);\n      XFREE (new_value);\n    }\n}\n\nvoid\nlt_update_lib_path (const char *name, const char *value)\n{\n  lt_debugprintf (__FILE__, __LINE__,\n\t\t  \"(lt_update_lib_path) modifying '%s' by prepending '%s'\\n\",\n                  nonnull (name), nonnull (value));\n\n  if (name && *name && value && *value)\n    {\n      char *new_value = lt_extend_str (getenv (name), value, 0);\n      lt_setenv (name, new_value);\n      XFREE (new_value);\n    }\n}\n\nEOF\n\t    case $host_os in\n\t      mingw*)\n\t\tcat <<\"EOF\"\n\n/* Prepares an argument vector before calling spawn().\n   Note that spawn() does not by itself call the command interpreter\n     (getenv (\"COMSPEC\") != NULL ? getenv (\"COMSPEC\") :\n      ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);\n         GetVersionEx(&v);\n         v.dwPlatformId == VER_PLATFORM_WIN32_NT;\n      }) ? \"cmd.exe\" : \"command.com\").\n   Instead it simply concatenates the arguments, separated by ' ', and calls\n   CreateProcess().  We must quote the arguments since Win32 CreateProcess()\n   interprets characters like ' ', '\\t', '\\\\', '\"' (but not '<' and '>') in a\n   special way:\n   - Space and tab are interpreted as delimiters. They are not treated as\n     delimiters if they are surrounded by double quotes: \"...\".\n   - Unescaped double quotes are removed from the input. Their only effect is\n     that within double quotes, space and tab are treated like normal\n     characters.\n   - Backslashes not followed by double quotes are not special.\n   - But 2*n+1 backslashes followed by a double quote become\n     n backslashes followed by a double quote (n >= 0):\n       \\\" -> \"\n       \\\\\\\" -> \\\"\n       \\\\\\\\\\\" -> \\\\\"\n */\n#define SHELL_SPECIAL_CHARS \"\\\"\\\\ \\001\\002\\003\\004\\005\\006\\007\\010\\011\\012\\013\\014\\015\\016\\017\\020\\021\\022\\023\\024\\025\\026\\027\\030\\031\\032\\033\\034\\035\\036\\037\"\n#define SHELL_SPACE_CHARS \" \\001\\002\\003\\004\\005\\006\\007\\010\\011\\012\\013\\014\\015\\016\\017\\020\\021\\022\\023\\024\\025\\026\\027\\030\\031\\032\\033\\034\\035\\036\\037\"\nchar **\nprepare_spawn (char **argv)\n{\n  size_t argc;\n  char **new_argv;\n  size_t i;\n\n  /* Count number of arguments.  */\n  for (argc = 0; argv[argc] != NULL; argc++)\n    ;\n\n  /* Allocate new argument vector.  */\n  new_argv = XMALLOC (char *, argc + 1);\n\n  /* Put quoted arguments into the new argument vector.  */\n  for (i = 0; i < argc; i++)\n    {\n      const char *string = argv[i];\n\n      if (string[0] == '\\0')\n\tnew_argv[i] = xstrdup (\"\\\"\\\"\");\n      else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL)\n\t{\n\t  int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL);\n\t  size_t length;\n\t  unsigned int backslashes;\n\t  const char *s;\n\t  char *quoted_string;\n\t  char *p;\n\n\t  length = 0;\n\t  backslashes = 0;\n\t  if (quote_around)\n\t    length++;\n\t  for (s = string; *s != '\\0'; s++)\n\t    {\n\t      char c = *s;\n\t      if (c == '\"')\n\t\tlength += backslashes + 1;\n\t      length++;\n\t      if (c == '\\\\')\n\t\tbackslashes++;\n\t      else\n\t\tbackslashes = 0;\n\t    }\n\t  if (quote_around)\n\t    length += backslashes + 1;\n\n\t  quoted_string = XMALLOC (char, length + 1);\n\n\t  p = quoted_string;\n\t  backslashes = 0;\n\t  if (quote_around)\n\t    *p++ = '\"';\n\t  for (s = string; *s != '\\0'; s++)\n\t    {\n\t      char c = *s;\n\t      if (c == '\"')\n\t\t{\n\t\t  unsigned int j;\n\t\t  for (j = backslashes + 1; j > 0; j--)\n\t\t    *p++ = '\\\\';\n\t\t}\n\t      *p++ = c;\n\t      if (c == '\\\\')\n\t\tbackslashes++;\n\t      else\n\t\tbackslashes = 0;\n\t    }\n\t  if (quote_around)\n\t    {\n\t      unsigned int j;\n\t      for (j = backslashes; j > 0; j--)\n\t\t*p++ = '\\\\';\n\t      *p++ = '\"';\n\t    }\n\t  *p = '\\0';\n\n\t  new_argv[i] = quoted_string;\n\t}\n      else\n\tnew_argv[i] = (char *) string;\n    }\n  new_argv[argc] = NULL;\n\n  return new_argv;\n}\nEOF\n\t\t;;\n\t    esac\n\n            cat <<\"EOF\"\nvoid lt_dump_script (FILE* f)\n{\nEOF\n\t    func_emit_wrapper yes |\n\t      $SED -n -e '\ns/^\\(.\\{79\\}\\)\\(..*\\)/\\1\\\n\\2/\nh\ns/\\([\\\\\"]\\)/\\\\\\1/g\ns/$/\\\\n/\ns/\\([^\\n]*\\).*/  fputs (\"\\1\", f);/p\ng\nD'\n            cat <<\"EOF\"\n}\nEOF\n}\n# end: func_emit_cwrapperexe_src\n\n# func_win32_import_lib_p ARG\n# True if ARG is an import lib, as indicated by $file_magic_cmd\nfunc_win32_import_lib_p ()\n{\n    $opt_debug\n    case `eval $file_magic_cmd \\\"\\$1\\\" 2>/dev/null | $SED -e 10q` in\n    *import*) : ;;\n    *) false ;;\n    esac\n}\n\n# func_mode_link arg...\nfunc_mode_link ()\n{\n    $opt_debug\n    case $host in\n    *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)\n      # It is impossible to link a dll without this setting, and\n      # we shouldn't force the makefile maintainer to figure out\n      # which system we are compiling for in order to pass an extra\n      # flag for every libtool invocation.\n      # allow_undefined=no\n\n      # FIXME: Unfortunately, there are problems with the above when trying\n      # to make a dll which has undefined symbols, in which case not\n      # even a static library is built.  For now, we need to specify\n      # -no-undefined on the libtool link line when we can be certain\n      # that all symbols are satisfied, otherwise we get a static library.\n      allow_undefined=yes\n      ;;\n    *)\n      allow_undefined=yes\n      ;;\n    esac\n    libtool_args=$nonopt\n    base_compile=\"$nonopt $@\"\n    compile_command=$nonopt\n    finalize_command=$nonopt\n\n    compile_rpath=\n    finalize_rpath=\n    compile_shlibpath=\n    finalize_shlibpath=\n    convenience=\n    old_convenience=\n    deplibs=\n    old_deplibs=\n    compiler_flags=\n    linker_flags=\n    dllsearchpath=\n    lib_search_path=`pwd`\n    inst_prefix_dir=\n    new_inherited_linker_flags=\n\n    avoid_version=no\n    bindir=\n    dlfiles=\n    dlprefiles=\n    dlself=no\n    export_dynamic=no\n    export_symbols=\n    export_symbols_regex=\n    generated=\n    libobjs=\n    ltlibs=\n    module=no\n    no_install=no\n    objs=\n    non_pic_objects=\n    precious_files_regex=\n    prefer_static_libs=no\n    preload=no\n    prev=\n    prevarg=\n    release=\n    rpath=\n    xrpath=\n    perm_rpath=\n    temp_rpath=\n    thread_safe=no\n    vinfo=\n    vinfo_number=no\n    weak_libs=\n    single_module=\"${wl}-single_module\"\n    func_infer_tag $base_compile\n\n    # We need to know -static, to get the right output filenames.\n    for arg\n    do\n      case $arg in\n      -shared)\n\ttest \"$build_libtool_libs\" != yes && \\\n\t  func_fatal_configuration \"can not build a shared library\"\n\tbuild_old_libs=no\n\tbreak\n\t;;\n      -all-static | -static | -static-libtool-libs)\n\tcase $arg in\n\t-all-static)\n\t  if test \"$build_libtool_libs\" = yes && test -z \"$link_static_flag\"; then\n\t    func_warning \"complete static linking is impossible in this configuration\"\n\t  fi\n\t  if test -n \"$link_static_flag\"; then\n\t    dlopen_self=$dlopen_self_static\n\t  fi\n\t  prefer_static_libs=yes\n\t  ;;\n\t-static)\n\t  if test -z \"$pic_flag\" && test -n \"$link_static_flag\"; then\n\t    dlopen_self=$dlopen_self_static\n\t  fi\n\t  prefer_static_libs=built\n\t  ;;\n\t-static-libtool-libs)\n\t  if test -z \"$pic_flag\" && test -n \"$link_static_flag\"; then\n\t    dlopen_self=$dlopen_self_static\n\t  fi\n\t  prefer_static_libs=yes\n\t  ;;\n\tesac\n\tbuild_libtool_libs=no\n\tbuild_old_libs=yes\n\tbreak\n\t;;\n      esac\n    done\n\n    # See if our shared archives depend on static archives.\n    test -n \"$old_archive_from_new_cmds\" && build_old_libs=yes\n\n    # Go through the arguments, transforming them on the way.\n    while test \"$#\" -gt 0; do\n      arg=\"$1\"\n      shift\n      func_quote_for_eval \"$arg\"\n      qarg=$func_quote_for_eval_unquoted_result\n      func_append libtool_args \" $func_quote_for_eval_result\"\n\n      # If the previous option needs an argument, assign it.\n      if test -n \"$prev\"; then\n\tcase $prev in\n\toutput)\n\t  func_append compile_command \" @OUTPUT@\"\n\t  func_append finalize_command \" @OUTPUT@\"\n\t  ;;\n\tesac\n\n\tcase $prev in\n\tbindir)\n\t  bindir=\"$arg\"\n\t  prev=\n\t  continue\n\t  ;;\n\tdlfiles|dlprefiles)\n\t  if test \"$preload\" = no; then\n\t    # Add the symbol object into the linking commands.\n\t    func_append compile_command \" @SYMFILE@\"\n\t    func_append finalize_command \" @SYMFILE@\"\n\t    preload=yes\n\t  fi\n\t  case $arg in\n\t  *.la | *.lo) ;;  # We handle these cases below.\n\t  force)\n\t    if test \"$dlself\" = no; then\n\t      dlself=needless\n\t      export_dynamic=yes\n\t    fi\n\t    prev=\n\t    continue\n\t    ;;\n\t  self)\n\t    if test \"$prev\" = dlprefiles; then\n\t      dlself=yes\n\t    elif test \"$prev\" = dlfiles && test \"$dlopen_self\" != yes; then\n\t      dlself=yes\n\t    else\n\t      dlself=needless\n\t      export_dynamic=yes\n\t    fi\n\t    prev=\n\t    continue\n\t    ;;\n\t  *)\n\t    if test \"$prev\" = dlfiles; then\n\t      func_append dlfiles \" $arg\"\n\t    else\n\t      func_append dlprefiles \" $arg\"\n\t    fi\n\t    prev=\n\t    continue\n\t    ;;\n\t  esac\n\t  ;;\n\texpsyms)\n\t  export_symbols=\"$arg\"\n\t  test -f \"$arg\" \\\n\t    || func_fatal_error \"symbol file \\`$arg' does not exist\"\n\t  prev=\n\t  continue\n\t  ;;\n\texpsyms_regex)\n\t  export_symbols_regex=\"$arg\"\n\t  prev=\n\t  continue\n\t  ;;\n\tframework)\n\t  case $host in\n\t    *-*-darwin*)\n\t      case \"$deplibs \" in\n\t\t*\" $qarg.ltframework \"*) ;;\n\t\t*) func_append deplibs \" $qarg.ltframework\" # this is fixed later\n\t\t   ;;\n\t      esac\n\t      ;;\n\t  esac\n\t  prev=\n\t  continue\n\t  ;;\n\tinst_prefix)\n\t  inst_prefix_dir=\"$arg\"\n\t  prev=\n\t  continue\n\t  ;;\n\tobjectlist)\n\t  if test -f \"$arg\"; then\n\t    save_arg=$arg\n\t    moreargs=\n\t    for fil in `cat \"$save_arg\"`\n\t    do\n#\t      func_append moreargs \" $fil\"\n\t      arg=$fil\n\t      # A libtool-controlled object.\n\n\t      # Check to see that this really is a libtool object.\n\t      if func_lalib_unsafe_p \"$arg\"; then\n\t\tpic_object=\n\t\tnon_pic_object=\n\n\t\t# Read the .lo file\n\t\tfunc_source \"$arg\"\n\n\t\tif test -z \"$pic_object\" ||\n\t\t   test -z \"$non_pic_object\" ||\n\t\t   test \"$pic_object\" = none &&\n\t\t   test \"$non_pic_object\" = none; then\n\t\t  func_fatal_error \"cannot find name of object for \\`$arg'\"\n\t\tfi\n\n\t\t# Extract subdirectory from the argument.\n\t\tfunc_dirname \"$arg\" \"/\" \"\"\n\t\txdir=\"$func_dirname_result\"\n\n\t\tif test \"$pic_object\" != none; then\n\t\t  # Prepend the subdirectory the object is found in.\n\t\t  pic_object=\"$xdir$pic_object\"\n\n\t\t  if test \"$prev\" = dlfiles; then\n\t\t    if test \"$build_libtool_libs\" = yes && test \"$dlopen_support\" = yes; then\n\t\t      func_append dlfiles \" $pic_object\"\n\t\t      prev=\n\t\t      continue\n\t\t    else\n\t\t      # If libtool objects are unsupported, then we need to preload.\n\t\t      prev=dlprefiles\n\t\t    fi\n\t\t  fi\n\n\t\t  # CHECK ME:  I think I busted this.  -Ossama\n\t\t  if test \"$prev\" = dlprefiles; then\n\t\t    # Preload the old-style object.\n\t\t    func_append dlprefiles \" $pic_object\"\n\t\t    prev=\n\t\t  fi\n\n\t\t  # A PIC object.\n\t\t  func_append libobjs \" $pic_object\"\n\t\t  arg=\"$pic_object\"\n\t\tfi\n\n\t\t# Non-PIC object.\n\t\tif test \"$non_pic_object\" != none; then\n\t\t  # Prepend the subdirectory the object is found in.\n\t\t  non_pic_object=\"$xdir$non_pic_object\"\n\n\t\t  # A standard non-PIC object\n\t\t  func_append non_pic_objects \" $non_pic_object\"\n\t\t  if test -z \"$pic_object\" || test \"$pic_object\" = none ; then\n\t\t    arg=\"$non_pic_object\"\n\t\t  fi\n\t\telse\n\t\t  # If the PIC object exists, use it instead.\n\t\t  # $xdir was prepended to $pic_object above.\n\t\t  non_pic_object=\"$pic_object\"\n\t\t  func_append non_pic_objects \" $non_pic_object\"\n\t\tfi\n\t      else\n\t\t# Only an error if not doing a dry-run.\n\t\tif $opt_dry_run; then\n\t\t  # Extract subdirectory from the argument.\n\t\t  func_dirname \"$arg\" \"/\" \"\"\n\t\t  xdir=\"$func_dirname_result\"\n\n\t\t  func_lo2o \"$arg\"\n\t\t  pic_object=$xdir$objdir/$func_lo2o_result\n\t\t  non_pic_object=$xdir$func_lo2o_result\n\t\t  func_append libobjs \" $pic_object\"\n\t\t  func_append non_pic_objects \" $non_pic_object\"\n\t        else\n\t\t  func_fatal_error \"\\`$arg' is not a valid libtool object\"\n\t\tfi\n\t      fi\n\t    done\n\t  else\n\t    func_fatal_error \"link input file \\`$arg' does not exist\"\n\t  fi\n\t  arg=$save_arg\n\t  prev=\n\t  continue\n\t  ;;\n\tprecious_regex)\n\t  precious_files_regex=\"$arg\"\n\t  prev=\n\t  continue\n\t  ;;\n\trelease)\n\t  release=\"-$arg\"\n\t  prev=\n\t  continue\n\t  ;;\n\trpath | xrpath)\n\t  # We need an absolute path.\n\t  case $arg in\n\t  [\\\\/]* | [A-Za-z]:[\\\\/]*) ;;\n\t  *)\n\t    func_fatal_error \"only absolute run-paths are allowed\"\n\t    ;;\n\t  esac\n\t  if test \"$prev\" = rpath; then\n\t    case \"$rpath \" in\n\t    *\" $arg \"*) ;;\n\t    *) func_append rpath \" $arg\" ;;\n\t    esac\n\t  else\n\t    case \"$xrpath \" in\n\t    *\" $arg \"*) ;;\n\t    *) func_append xrpath \" $arg\" ;;\n\t    esac\n\t  fi\n\t  prev=\n\t  continue\n\t  ;;\n\tshrext)\n\t  shrext_cmds=\"$arg\"\n\t  prev=\n\t  continue\n\t  ;;\n\tweak)\n\t  func_append weak_libs \" $arg\"\n\t  prev=\n\t  continue\n\t  ;;\n\txcclinker)\n\t  func_append linker_flags \" $qarg\"\n\t  func_append compiler_flags \" $qarg\"\n\t  prev=\n\t  func_append compile_command \" $qarg\"\n\t  func_append finalize_command \" $qarg\"\n\t  continue\n\t  ;;\n\txcompiler)\n\t  func_append compiler_flags \" $qarg\"\n\t  prev=\n\t  func_append compile_command \" $qarg\"\n\t  func_append finalize_command \" $qarg\"\n\t  continue\n\t  ;;\n\txlinker)\n\t  func_append linker_flags \" $qarg\"\n\t  func_append compiler_flags \" $wl$qarg\"\n\t  prev=\n\t  func_append compile_command \" $wl$qarg\"\n\t  func_append finalize_command \" $wl$qarg\"\n\t  continue\n\t  ;;\n\t*)\n\t  eval \"$prev=\\\"\\$arg\\\"\"\n\t  prev=\n\t  continue\n\t  ;;\n\tesac\n      fi # test -n \"$prev\"\n\n      prevarg=\"$arg\"\n\n      case $arg in\n      -all-static)\n\tif test -n \"$link_static_flag\"; then\n\t  # See comment for -static flag below, for more details.\n\t  func_append compile_command \" $link_static_flag\"\n\t  func_append finalize_command \" $link_static_flag\"\n\tfi\n\tcontinue\n\t;;\n\n      -allow-undefined)\n\t# FIXME: remove this flag sometime in the future.\n\tfunc_fatal_error \"\\`-allow-undefined' must not be used because it is the default\"\n\t;;\n\n      -avoid-version)\n\tavoid_version=yes\n\tcontinue\n\t;;\n\n      -bindir)\n\tprev=bindir\n\tcontinue\n\t;;\n\n      -dlopen)\n\tprev=dlfiles\n\tcontinue\n\t;;\n\n      -dlpreopen)\n\tprev=dlprefiles\n\tcontinue\n\t;;\n\n      -export-dynamic)\n\texport_dynamic=yes\n\tcontinue\n\t;;\n\n      -export-symbols | -export-symbols-regex)\n\tif test -n \"$export_symbols\" || test -n \"$export_symbols_regex\"; then\n\t  func_fatal_error \"more than one -exported-symbols argument is not allowed\"\n\tfi\n\tif test \"X$arg\" = \"X-export-symbols\"; then\n\t  prev=expsyms\n\telse\n\t  prev=expsyms_regex\n\tfi\n\tcontinue\n\t;;\n\n      -framework)\n\tprev=framework\n\tcontinue\n\t;;\n\n      -inst-prefix-dir)\n\tprev=inst_prefix\n\tcontinue\n\t;;\n\n      # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*\n      # so, if we see these flags be careful not to treat them like -L\n      -L[A-Z][A-Z]*:*)\n\tcase $with_gcc/$host in\n\tno/*-*-irix* | /*-*-irix*)\n\t  func_append compile_command \" $arg\"\n\t  func_append finalize_command \" $arg\"\n\t  ;;\n\tesac\n\tcontinue\n\t;;\n\n      -L*)\n\tfunc_stripname \"-L\" '' \"$arg\"\n\tif test -z \"$func_stripname_result\"; then\n\t  if test \"$#\" -gt 0; then\n\t    func_fatal_error \"require no space between \\`-L' and \\`$1'\"\n\t  else\n\t    func_fatal_error \"need path for \\`-L' option\"\n\t  fi\n\tfi\n\tfunc_resolve_sysroot \"$func_stripname_result\"\n\tdir=$func_resolve_sysroot_result\n\t# We need an absolute path.\n\tcase $dir in\n\t[\\\\/]* | [A-Za-z]:[\\\\/]*) ;;\n\t*)\n\t  absdir=`cd \"$dir\" && pwd`\n\t  test -z \"$absdir\" && \\\n\t    func_fatal_error \"cannot determine absolute directory name of \\`$dir'\"\n\t  dir=\"$absdir\"\n\t  ;;\n\tesac\n\tcase \"$deplibs \" in\n\t*\" -L$dir \"* | *\" $arg \"*)\n\t  # Will only happen for absolute or sysroot arguments\n\t  ;;\n\t*)\n\t  # Preserve sysroot, but never include relative directories\n\t  case $dir in\n\t    [\\\\/]* | [A-Za-z]:[\\\\/]* | =*) func_append deplibs \" $arg\" ;;\n\t    *) func_append deplibs \" -L$dir\" ;;\n\t  esac\n\t  func_append lib_search_path \" $dir\"\n\t  ;;\n\tesac\n\tcase $host in\n\t*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)\n\t  testbindir=`$ECHO \"$dir\" | $SED 's*/lib$*/bin*'`\n\t  case :$dllsearchpath: in\n\t  *\":$dir:\"*) ;;\n\t  ::) dllsearchpath=$dir;;\n\t  *) func_append dllsearchpath \":$dir\";;\n\t  esac\n\t  case :$dllsearchpath: in\n\t  *\":$testbindir:\"*) ;;\n\t  ::) dllsearchpath=$testbindir;;\n\t  *) func_append dllsearchpath \":$testbindir\";;\n\t  esac\n\t  ;;\n\tesac\n\tcontinue\n\t;;\n\n      -l*)\n\tif test \"X$arg\" = \"X-lc\" || test \"X$arg\" = \"X-lm\"; then\n\t  case $host in\n\t  *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*)\n\t    # These systems don't actually have a C or math library (as such)\n\t    continue\n\t    ;;\n\t  *-*-os2*)\n\t    # These systems don't actually have a C library (as such)\n\t    test \"X$arg\" = \"X-lc\" && continue\n\t    ;;\n\t  *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)\n\t    # Do not include libc due to us having libc/libc_r.\n\t    test \"X$arg\" = \"X-lc\" && continue\n\t    ;;\n\t  *-*-rhapsody* | *-*-darwin1.[012])\n\t    # Rhapsody C and math libraries are in the System framework\n\t    func_append deplibs \" System.ltframework\"\n\t    continue\n\t    ;;\n\t  *-*-sco3.2v5* | *-*-sco5v6*)\n\t    # Causes problems with __ctype\n\t    test \"X$arg\" = \"X-lc\" && continue\n\t    ;;\n\t  *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)\n\t    # Compiler inserts libc in the correct place for threads to work\n\t    test \"X$arg\" = \"X-lc\" && continue\n\t    ;;\n\t  esac\n\telif test \"X$arg\" = \"X-lc_r\"; then\n\t case $host in\n\t *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)\n\t   # Do not include libc_r directly, use -pthread flag.\n\t   continue\n\t   ;;\n\t esac\n\tfi\n\tfunc_append deplibs \" $arg\"\n\tcontinue\n\t;;\n\n      -module)\n\tmodule=yes\n\tcontinue\n\t;;\n\n      # Tru64 UNIX uses -model [arg] to determine the layout of C++\n      # classes, name mangling, and exception handling.\n      # Darwin uses the -arch flag to determine output architecture.\n      -model|-arch|-isysroot|--sysroot)\n\tfunc_append compiler_flags \" $arg\"\n\tfunc_append compile_command \" $arg\"\n\tfunc_append finalize_command \" $arg\"\n\tprev=xcompiler\n\tcontinue\n\t;;\n\n      -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \\\n      |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)\n\tfunc_append compiler_flags \" $arg\"\n\tfunc_append compile_command \" $arg\"\n\tfunc_append finalize_command \" $arg\"\n\tcase \"$new_inherited_linker_flags \" in\n\t    *\" $arg \"*) ;;\n\t    * ) func_append new_inherited_linker_flags \" $arg\" ;;\n\tesac\n\tcontinue\n\t;;\n\n      -multi_module)\n\tsingle_module=\"${wl}-multi_module\"\n\tcontinue\n\t;;\n\n      -no-fast-install)\n\tfast_install=no\n\tcontinue\n\t;;\n\n      -no-install)\n\tcase $host in\n\t*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*)\n\t  # The PATH hackery in wrapper scripts is required on Windows\n\t  # and Darwin in order for the loader to find any dlls it needs.\n\t  func_warning \"\\`-no-install' is ignored for $host\"\n\t  func_warning \"assuming \\`-no-fast-install' instead\"\n\t  fast_install=no\n\t  ;;\n\t*) no_install=yes ;;\n\tesac\n\tcontinue\n\t;;\n\n      -no-undefined)\n\tallow_undefined=no\n\tcontinue\n\t;;\n\n      -objectlist)\n\tprev=objectlist\n\tcontinue\n\t;;\n\n      -o) prev=output ;;\n\n      -precious-files-regex)\n\tprev=precious_regex\n\tcontinue\n\t;;\n\n      -release)\n\tprev=release\n\tcontinue\n\t;;\n\n      -rpath)\n\tprev=rpath\n\tcontinue\n\t;;\n\n      -R)\n\tprev=xrpath\n\tcontinue\n\t;;\n\n      -R*)\n\tfunc_stripname '-R' '' \"$arg\"\n\tdir=$func_stripname_result\n\t# We need an absolute path.\n\tcase $dir in\n\t[\\\\/]* | [A-Za-z]:[\\\\/]*) ;;\n\t=*)\n\t  func_stripname '=' '' \"$dir\"\n\t  dir=$lt_sysroot$func_stripname_result\n\t  ;;\n\t*)\n\t  func_fatal_error \"only absolute run-paths are allowed\"\n\t  ;;\n\tesac\n\tcase \"$xrpath \" in\n\t*\" $dir \"*) ;;\n\t*) func_append xrpath \" $dir\" ;;\n\tesac\n\tcontinue\n\t;;\n\n      -shared)\n\t# The effects of -shared are defined in a previous loop.\n\tcontinue\n\t;;\n\n      -shrext)\n\tprev=shrext\n\tcontinue\n\t;;\n\n      -static | -static-libtool-libs)\n\t# The effects of -static are defined in a previous loop.\n\t# We used to do the same as -all-static on platforms that\n\t# didn't have a PIC flag, but the assumption that the effects\n\t# would be equivalent was wrong.  It would break on at least\n\t# Digital Unix and AIX.\n\tcontinue\n\t;;\n\n      -thread-safe)\n\tthread_safe=yes\n\tcontinue\n\t;;\n\n      -version-info)\n\tprev=vinfo\n\tcontinue\n\t;;\n\n      -version-number)\n\tprev=vinfo\n\tvinfo_number=yes\n\tcontinue\n\t;;\n\n      -weak)\n        prev=weak\n\tcontinue\n\t;;\n\n      -Wc,*)\n\tfunc_stripname '-Wc,' '' \"$arg\"\n\targs=$func_stripname_result\n\targ=\n\tsave_ifs=\"$IFS\"; IFS=','\n\tfor flag in $args; do\n\t  IFS=\"$save_ifs\"\n          func_quote_for_eval \"$flag\"\n\t  func_append arg \" $func_quote_for_eval_result\"\n\t  func_append compiler_flags \" $func_quote_for_eval_result\"\n\tdone\n\tIFS=\"$save_ifs\"\n\tfunc_stripname ' ' '' \"$arg\"\n\targ=$func_stripname_result\n\t;;\n\n      -Wl,*)\n\tfunc_stripname '-Wl,' '' \"$arg\"\n\targs=$func_stripname_result\n\targ=\n\tsave_ifs=\"$IFS\"; IFS=','\n\tfor flag in $args; do\n\t  IFS=\"$save_ifs\"\n          func_quote_for_eval \"$flag\"\n\t  func_append arg \" $wl$func_quote_for_eval_result\"\n\t  func_append compiler_flags \" $wl$func_quote_for_eval_result\"\n\t  func_append linker_flags \" $func_quote_for_eval_result\"\n\tdone\n\tIFS=\"$save_ifs\"\n\tfunc_stripname ' ' '' \"$arg\"\n\targ=$func_stripname_result\n\t;;\n\n      -Xcompiler)\n\tprev=xcompiler\n\tcontinue\n\t;;\n\n      -Xlinker)\n\tprev=xlinker\n\tcontinue\n\t;;\n\n      -XCClinker)\n\tprev=xcclinker\n\tcontinue\n\t;;\n\n      # -msg_* for osf cc\n      -msg_*)\n\tfunc_quote_for_eval \"$arg\"\n\targ=\"$func_quote_for_eval_result\"\n\t;;\n\n      # Flags to be passed through unchanged, with rationale:\n      # -64, -mips[0-9]      enable 64-bit mode for the SGI compiler\n      # -r[0-9][0-9]*        specify processor for the SGI compiler\n      # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler\n      # +DA*, +DD*           enable 64-bit mode for the HP compiler\n      # -q*                  compiler args for the IBM compiler\n      # -m*, -t[45]*, -txscale* architecture-specific flags for GCC\n      # -F/path              path to uninstalled frameworks, gcc on darwin\n      # -p, -pg, --coverage, -fprofile-*  profiling flags for GCC\n      # @file                GCC response files\n      # -tp=*                Portland pgcc target processor selection\n      # --sysroot=*          for sysroot support\n      # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization\n      -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \\\n      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \\\n      -O*|-flto*|-fwhopr*|-fuse-linker-plugin)\n        func_quote_for_eval \"$arg\"\n\targ=\"$func_quote_for_eval_result\"\n        func_append compile_command \" $arg\"\n        func_append finalize_command \" $arg\"\n        func_append compiler_flags \" $arg\"\n        continue\n        ;;\n\n      # Some other compiler flag.\n      -* | +*)\n        func_quote_for_eval \"$arg\"\n\targ=\"$func_quote_for_eval_result\"\n\t;;\n\n      *.$objext)\n\t# A standard object.\n\tfunc_append objs \" $arg\"\n\t;;\n\n      *.lo)\n\t# A libtool-controlled object.\n\n\t# Check to see that this really is a libtool object.\n\tif func_lalib_unsafe_p \"$arg\"; then\n\t  pic_object=\n\t  non_pic_object=\n\n\t  # Read the .lo file\n\t  func_source \"$arg\"\n\n\t  if test -z \"$pic_object\" ||\n\t     test -z \"$non_pic_object\" ||\n\t     test \"$pic_object\" = none &&\n\t     test \"$non_pic_object\" = none; then\n\t    func_fatal_error \"cannot find name of object for \\`$arg'\"\n\t  fi\n\n\t  # Extract subdirectory from the argument.\n\t  func_dirname \"$arg\" \"/\" \"\"\n\t  xdir=\"$func_dirname_result\"\n\n\t  if test \"$pic_object\" != none; then\n\t    # Prepend the subdirectory the object is found in.\n\t    pic_object=\"$xdir$pic_object\"\n\n\t    if test \"$prev\" = dlfiles; then\n\t      if test \"$build_libtool_libs\" = yes && test \"$dlopen_support\" = yes; then\n\t\tfunc_append dlfiles \" $pic_object\"\n\t\tprev=\n\t\tcontinue\n\t      else\n\t\t# If libtool objects are unsupported, then we need to preload.\n\t\tprev=dlprefiles\n\t      fi\n\t    fi\n\n\t    # CHECK ME:  I think I busted this.  -Ossama\n\t    if test \"$prev\" = dlprefiles; then\n\t      # Preload the old-style object.\n\t      func_append dlprefiles \" $pic_object\"\n\t      prev=\n\t    fi\n\n\t    # A PIC object.\n\t    func_append libobjs \" $pic_object\"\n\t    arg=\"$pic_object\"\n\t  fi\n\n\t  # Non-PIC object.\n\t  if test \"$non_pic_object\" != none; then\n\t    # Prepend the subdirectory the object is found in.\n\t    non_pic_object=\"$xdir$non_pic_object\"\n\n\t    # A standard non-PIC object\n\t    func_append non_pic_objects \" $non_pic_object\"\n\t    if test -z \"$pic_object\" || test \"$pic_object\" = none ; then\n\t      arg=\"$non_pic_object\"\n\t    fi\n\t  else\n\t    # If the PIC object exists, use it instead.\n\t    # $xdir was prepended to $pic_object above.\n\t    non_pic_object=\"$pic_object\"\n\t    func_append non_pic_objects \" $non_pic_object\"\n\t  fi\n\telse\n\t  # Only an error if not doing a dry-run.\n\t  if $opt_dry_run; then\n\t    # Extract subdirectory from the argument.\n\t    func_dirname \"$arg\" \"/\" \"\"\n\t    xdir=\"$func_dirname_result\"\n\n\t    func_lo2o \"$arg\"\n\t    pic_object=$xdir$objdir/$func_lo2o_result\n\t    non_pic_object=$xdir$func_lo2o_result\n\t    func_append libobjs \" $pic_object\"\n\t    func_append non_pic_objects \" $non_pic_object\"\n\t  else\n\t    func_fatal_error \"\\`$arg' is not a valid libtool object\"\n\t  fi\n\tfi\n\t;;\n\n      *.$libext)\n\t# An archive.\n\tfunc_append deplibs \" $arg\"\n\tfunc_append old_deplibs \" $arg\"\n\tcontinue\n\t;;\n\n      *.la)\n\t# A libtool-controlled library.\n\n\tfunc_resolve_sysroot \"$arg\"\n\tif test \"$prev\" = dlfiles; then\n\t  # This library was specified with -dlopen.\n\t  func_append dlfiles \" $func_resolve_sysroot_result\"\n\t  prev=\n\telif test \"$prev\" = dlprefiles; then\n\t  # The library was specified with -dlpreopen.\n\t  func_append dlprefiles \" $func_resolve_sysroot_result\"\n\t  prev=\n\telse\n\t  func_append deplibs \" $func_resolve_sysroot_result\"\n\tfi\n\tcontinue\n\t;;\n\n      # Some other compiler argument.\n      *)\n\t# Unknown arguments in both finalize_command and compile_command need\n\t# to be aesthetically quoted because they are evaled later.\n\tfunc_quote_for_eval \"$arg\"\n\targ=\"$func_quote_for_eval_result\"\n\t;;\n      esac # arg\n\n      # Now actually substitute the argument into the commands.\n      if test -n \"$arg\"; then\n\tfunc_append compile_command \" $arg\"\n\tfunc_append finalize_command \" $arg\"\n      fi\n    done # argument parsing loop\n\n    test -n \"$prev\" && \\\n      func_fatal_help \"the \\`$prevarg' option requires an argument\"\n\n    if test \"$export_dynamic\" = yes && test -n \"$export_dynamic_flag_spec\"; then\n      eval arg=\\\"$export_dynamic_flag_spec\\\"\n      func_append compile_command \" $arg\"\n      func_append finalize_command \" $arg\"\n    fi\n\n    oldlibs=\n    # calculate the name of the file, without its directory\n    func_basename \"$output\"\n    outputname=\"$func_basename_result\"\n    libobjs_save=\"$libobjs\"\n\n    if test -n \"$shlibpath_var\"; then\n      # get the directories listed in $shlibpath_var\n      eval shlib_search_path=\\`\\$ECHO \\\"\\${$shlibpath_var}\\\" \\| \\$SED \\'s/:/ /g\\'\\`\n    else\n      shlib_search_path=\n    fi\n    eval sys_lib_search_path=\\\"$sys_lib_search_path_spec\\\"\n    eval sys_lib_dlsearch_path=\\\"$sys_lib_dlsearch_path_spec\\\"\n\n    func_dirname \"$output\" \"/\" \"\"\n    output_objdir=\"$func_dirname_result$objdir\"\n    func_to_tool_file \"$output_objdir/\"\n    tool_output_objdir=$func_to_tool_file_result\n    # Create the object directory.\n    func_mkdir_p \"$output_objdir\"\n\n    # Determine the type of output\n    case $output in\n    \"\")\n      func_fatal_help \"you must specify an output file\"\n      ;;\n    *.$libext) linkmode=oldlib ;;\n    *.lo | *.$objext) linkmode=obj ;;\n    *.la) linkmode=lib ;;\n    *) linkmode=prog ;; # Anything else should be a program.\n    esac\n\n    specialdeplibs=\n\n    libs=\n    # Find all interdependent deplibs by searching for libraries\n    # that are linked more than once (e.g. -la -lb -la)\n    for deplib in $deplibs; do\n      if $opt_preserve_dup_deps ; then\n\tcase \"$libs \" in\n\t*\" $deplib \"*) func_append specialdeplibs \" $deplib\" ;;\n\tesac\n      fi\n      func_append libs \" $deplib\"\n    done\n\n    if test \"$linkmode\" = lib; then\n      libs=\"$predeps $libs $compiler_lib_search_path $postdeps\"\n\n      # Compute libraries that are listed more than once in $predeps\n      # $postdeps and mark them as special (i.e., whose duplicates are\n      # not to be eliminated).\n      pre_post_deps=\n      if $opt_duplicate_compiler_generated_deps; then\n\tfor pre_post_dep in $predeps $postdeps; do\n\t  case \"$pre_post_deps \" in\n\t  *\" $pre_post_dep \"*) func_append specialdeplibs \" $pre_post_deps\" ;;\n\t  esac\n\t  func_append pre_post_deps \" $pre_post_dep\"\n\tdone\n      fi\n      pre_post_deps=\n    fi\n\n    deplibs=\n    newdependency_libs=\n    newlib_search_path=\n    need_relink=no # whether we're linking any uninstalled libtool libraries\n    notinst_deplibs= # not-installed libtool libraries\n    notinst_path= # paths that contain not-installed libtool libraries\n\n    case $linkmode in\n    lib)\n\tpasses=\"conv dlpreopen link\"\n\tfor file in $dlfiles $dlprefiles; do\n\t  case $file in\n\t  *.la) ;;\n\t  *)\n\t    func_fatal_help \"libraries can \\`-dlopen' only libtool libraries: $file\"\n\t    ;;\n\t  esac\n\tdone\n\t;;\n    prog)\n\tcompile_deplibs=\n\tfinalize_deplibs=\n\talldeplibs=no\n\tnewdlfiles=\n\tnewdlprefiles=\n\tpasses=\"conv scan dlopen dlpreopen link\"\n\t;;\n    *)  passes=\"conv\"\n\t;;\n    esac\n\n    for pass in $passes; do\n      # The preopen pass in lib mode reverses $deplibs; put it back here\n      # so that -L comes before libs that need it for instance...\n      if test \"$linkmode,$pass\" = \"lib,link\"; then\n\t## FIXME: Find the place where the list is rebuilt in the wrong\n\t##        order, and fix it there properly\n        tmp_deplibs=\n\tfor deplib in $deplibs; do\n\t  tmp_deplibs=\"$deplib $tmp_deplibs\"\n\tdone\n\tdeplibs=\"$tmp_deplibs\"\n      fi\n\n      if test \"$linkmode,$pass\" = \"lib,link\" ||\n\t test \"$linkmode,$pass\" = \"prog,scan\"; then\n\tlibs=\"$deplibs\"\n\tdeplibs=\n      fi\n      if test \"$linkmode\" = prog; then\n\tcase $pass in\n\tdlopen) libs=\"$dlfiles\" ;;\n\tdlpreopen) libs=\"$dlprefiles\" ;;\n\tlink)\n\t  libs=\"$deplibs %DEPLIBS%\"\n\t  test \"X$link_all_deplibs\" != Xno && libs=\"$libs $dependency_libs\"\n\t  ;;\n\tesac\n      fi\n      if test \"$linkmode,$pass\" = \"lib,dlpreopen\"; then\n\t# Collect and forward deplibs of preopened libtool libs\n\tfor lib in $dlprefiles; do\n\t  # Ignore non-libtool-libs\n\t  dependency_libs=\n\t  func_resolve_sysroot \"$lib\"\n\t  case $lib in\n\t  *.la)\tfunc_source \"$func_resolve_sysroot_result\" ;;\n\t  esac\n\n\t  # Collect preopened libtool deplibs, except any this library\n\t  # has declared as weak libs\n\t  for deplib in $dependency_libs; do\n\t    func_basename \"$deplib\"\n            deplib_base=$func_basename_result\n\t    case \" $weak_libs \" in\n\t    *\" $deplib_base \"*) ;;\n\t    *) func_append deplibs \" $deplib\" ;;\n\t    esac\n\t  done\n\tdone\n\tlibs=\"$dlprefiles\"\n      fi\n      if test \"$pass\" = dlopen; then\n\t# Collect dlpreopened libraries\n\tsave_deplibs=\"$deplibs\"\n\tdeplibs=\n      fi\n\n      for deplib in $libs; do\n\tlib=\n\tfound=no\n\tcase $deplib in\n\t-mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \\\n        |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)\n\t  if test \"$linkmode,$pass\" = \"prog,link\"; then\n\t    compile_deplibs=\"$deplib $compile_deplibs\"\n\t    finalize_deplibs=\"$deplib $finalize_deplibs\"\n\t  else\n\t    func_append compiler_flags \" $deplib\"\n\t    if test \"$linkmode\" = lib ; then\n\t\tcase \"$new_inherited_linker_flags \" in\n\t\t    *\" $deplib \"*) ;;\n\t\t    * ) func_append new_inherited_linker_flags \" $deplib\" ;;\n\t\tesac\n\t    fi\n\t  fi\n\t  continue\n\t  ;;\n\t-l*)\n\t  if test \"$linkmode\" != lib && test \"$linkmode\" != prog; then\n\t    func_warning \"\\`-l' is ignored for archives/objects\"\n\t    continue\n\t  fi\n\t  func_stripname '-l' '' \"$deplib\"\n\t  name=$func_stripname_result\n\t  if test \"$linkmode\" = lib; then\n\t    searchdirs=\"$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path\"\n\t  else\n\t    searchdirs=\"$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path\"\n\t  fi\n\t  for searchdir in $searchdirs; do\n\t    for search_ext in .la $std_shrext .so .a; do\n\t      # Search the libtool library\n\t      lib=\"$searchdir/lib${name}${search_ext}\"\n\t      if test -f \"$lib\"; then\n\t\tif test \"$search_ext\" = \".la\"; then\n\t\t  found=yes\n\t\telse\n\t\t  found=no\n\t\tfi\n\t\tbreak 2\n\t      fi\n\t    done\n\t  done\n\t  if test \"$found\" != yes; then\n\t    # deplib doesn't seem to be a libtool library\n\t    if test \"$linkmode,$pass\" = \"prog,link\"; then\n\t      compile_deplibs=\"$deplib $compile_deplibs\"\n\t      finalize_deplibs=\"$deplib $finalize_deplibs\"\n\t    else\n\t      deplibs=\"$deplib $deplibs\"\n\t      test \"$linkmode\" = lib && newdependency_libs=\"$deplib $newdependency_libs\"\n\t    fi\n\t    continue\n\t  else # deplib is a libtool library\n\t    # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,\n\t    # We need to do some special things here, and not later.\n\t    if test \"X$allow_libtool_libs_with_static_runtimes\" = \"Xyes\" ; then\n\t      case \" $predeps $postdeps \" in\n\t      *\" $deplib \"*)\n\t\tif func_lalib_p \"$lib\"; then\n\t\t  library_names=\n\t\t  old_library=\n\t\t  func_source \"$lib\"\n\t\t  for l in $old_library $library_names; do\n\t\t    ll=\"$l\"\n\t\t  done\n\t\t  if test \"X$ll\" = \"X$old_library\" ; then # only static version available\n\t\t    found=no\n\t\t    func_dirname \"$lib\" \"\" \".\"\n\t\t    ladir=\"$func_dirname_result\"\n\t\t    lib=$ladir/$old_library\n\t\t    if test \"$linkmode,$pass\" = \"prog,link\"; then\n\t\t      compile_deplibs=\"$deplib $compile_deplibs\"\n\t\t      finalize_deplibs=\"$deplib $finalize_deplibs\"\n\t\t    else\n\t\t      deplibs=\"$deplib $deplibs\"\n\t\t      test \"$linkmode\" = lib && newdependency_libs=\"$deplib $newdependency_libs\"\n\t\t    fi\n\t\t    continue\n\t\t  fi\n\t\tfi\n\t\t;;\n\t      *) ;;\n\t      esac\n\t    fi\n\t  fi\n\t  ;; # -l\n\t*.ltframework)\n\t  if test \"$linkmode,$pass\" = \"prog,link\"; then\n\t    compile_deplibs=\"$deplib $compile_deplibs\"\n\t    finalize_deplibs=\"$deplib $finalize_deplibs\"\n\t  else\n\t    deplibs=\"$deplib $deplibs\"\n\t    if test \"$linkmode\" = lib ; then\n\t\tcase \"$new_inherited_linker_flags \" in\n\t\t    *\" $deplib \"*) ;;\n\t\t    * ) func_append new_inherited_linker_flags \" $deplib\" ;;\n\t\tesac\n\t    fi\n\t  fi\n\t  continue\n\t  ;;\n\t-L*)\n\t  case $linkmode in\n\t  lib)\n\t    deplibs=\"$deplib $deplibs\"\n\t    test \"$pass\" = conv && continue\n\t    newdependency_libs=\"$deplib $newdependency_libs\"\n\t    func_stripname '-L' '' \"$deplib\"\n\t    func_resolve_sysroot \"$func_stripname_result\"\n\t    func_append newlib_search_path \" $func_resolve_sysroot_result\"\n\t    ;;\n\t  prog)\n\t    if test \"$pass\" = conv; then\n\t      deplibs=\"$deplib $deplibs\"\n\t      continue\n\t    fi\n\t    if test \"$pass\" = scan; then\n\t      deplibs=\"$deplib $deplibs\"\n\t    else\n\t      compile_deplibs=\"$deplib $compile_deplibs\"\n\t      finalize_deplibs=\"$deplib $finalize_deplibs\"\n\t    fi\n\t    func_stripname '-L' '' \"$deplib\"\n\t    func_resolve_sysroot \"$func_stripname_result\"\n\t    func_append newlib_search_path \" $func_resolve_sysroot_result\"\n\t    ;;\n\t  *)\n\t    func_warning \"\\`-L' is ignored for archives/objects\"\n\t    ;;\n\t  esac # linkmode\n\t  continue\n\t  ;; # -L\n\t-R*)\n\t  if test \"$pass\" = link; then\n\t    func_stripname '-R' '' \"$deplib\"\n\t    func_resolve_sysroot \"$func_stripname_result\"\n\t    dir=$func_resolve_sysroot_result\n\t    # Make sure the xrpath contains only unique directories.\n\t    case \"$xrpath \" in\n\t    *\" $dir \"*) ;;\n\t    *) func_append xrpath \" $dir\" ;;\n\t    esac\n\t  fi\n\t  deplibs=\"$deplib $deplibs\"\n\t  continue\n\t  ;;\n\t*.la)\n\t  func_resolve_sysroot \"$deplib\"\n\t  lib=$func_resolve_sysroot_result\n\t  ;;\n\t*.$libext)\n\t  if test \"$pass\" = conv; then\n\t    deplibs=\"$deplib $deplibs\"\n\t    continue\n\t  fi\n\t  case $linkmode in\n\t  lib)\n\t    # Linking convenience modules into shared libraries is allowed,\n\t    # but linking other static libraries is non-portable.\n\t    case \" $dlpreconveniencelibs \" in\n\t    *\" $deplib \"*) ;;\n\t    *)\n\t      valid_a_lib=no\n\t      case $deplibs_check_method in\n\t\tmatch_pattern*)\n\t\t  set dummy $deplibs_check_method; shift\n\t\t  match_pattern_regex=`expr \"$deplibs_check_method\" : \"$1 \\(.*\\)\"`\n\t\t  if eval \"\\$ECHO \\\"$deplib\\\"\" 2>/dev/null | $SED 10q \\\n\t\t    | $EGREP \"$match_pattern_regex\" > /dev/null; then\n\t\t    valid_a_lib=yes\n\t\t  fi\n\t\t;;\n\t\tpass_all)\n\t\t  valid_a_lib=yes\n\t\t;;\n\t      esac\n\t      if test \"$valid_a_lib\" != yes; then\n\t\techo\n\t\t$ECHO \"*** Warning: Trying to link with static lib archive $deplib.\"\n\t\techo \"*** I have the capability to make that library automatically link in when\"\n\t\techo \"*** you link to this library.  But I can only do this if you have a\"\n\t\techo \"*** shared version of the library, which you do not appear to have\"\n\t\techo \"*** because the file extensions .$libext of this argument makes me believe\"\n\t\techo \"*** that it is just a static archive that I should not use here.\"\n\t      else\n\t\techo\n\t\t$ECHO \"*** Warning: Linking the shared library $output against the\"\n\t\t$ECHO \"*** static library $deplib is not portable!\"\n\t\tdeplibs=\"$deplib $deplibs\"\n\t      fi\n\t      ;;\n\t    esac\n\t    continue\n\t    ;;\n\t  prog)\n\t    if test \"$pass\" != link; then\n\t      deplibs=\"$deplib $deplibs\"\n\t    else\n\t      compile_deplibs=\"$deplib $compile_deplibs\"\n\t      finalize_deplibs=\"$deplib $finalize_deplibs\"\n\t    fi\n\t    continue\n\t    ;;\n\t  esac # linkmode\n\t  ;; # *.$libext\n\t*.lo | *.$objext)\n\t  if test \"$pass\" = conv; then\n\t    deplibs=\"$deplib $deplibs\"\n\t  elif test \"$linkmode\" = prog; then\n\t    if test \"$pass\" = dlpreopen || test \"$dlopen_support\" != yes || test \"$build_libtool_libs\" = no; then\n\t      # If there is no dlopen support or we're linking statically,\n\t      # we need to preload.\n\t      func_append newdlprefiles \" $deplib\"\n\t      compile_deplibs=\"$deplib $compile_deplibs\"\n\t      finalize_deplibs=\"$deplib $finalize_deplibs\"\n\t    else\n\t      func_append newdlfiles \" $deplib\"\n\t    fi\n\t  fi\n\t  continue\n\t  ;;\n\t%DEPLIBS%)\n\t  alldeplibs=yes\n\t  continue\n\t  ;;\n\tesac # case $deplib\n\n\tif test \"$found\" = yes || test -f \"$lib\"; then :\n\telse\n\t  func_fatal_error \"cannot find the library \\`$lib' or unhandled argument \\`$deplib'\"\n\tfi\n\n\t# Check to see that this really is a libtool archive.\n\tfunc_lalib_unsafe_p \"$lib\" \\\n\t  || func_fatal_error \"\\`$lib' is not a valid libtool archive\"\n\n\tfunc_dirname \"$lib\" \"\" \".\"\n\tladir=\"$func_dirname_result\"\n\n\tdlname=\n\tdlopen=\n\tdlpreopen=\n\tlibdir=\n\tlibrary_names=\n\told_library=\n\tinherited_linker_flags=\n\t# If the library was installed with an old release of libtool,\n\t# it will not redefine variables installed, or shouldnotlink\n\tinstalled=yes\n\tshouldnotlink=no\n\tavoidtemprpath=\n\n\n\t# Read the .la file\n\tfunc_source \"$lib\"\n\n\t# Convert \"-framework foo\" to \"foo.ltframework\"\n\tif test -n \"$inherited_linker_flags\"; then\n\t  tmp_inherited_linker_flags=`$ECHO \"$inherited_linker_flags\" | $SED 's/-framework \\([^ $]*\\)/\\1.ltframework/g'`\n\t  for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do\n\t    case \" $new_inherited_linker_flags \" in\n\t      *\" $tmp_inherited_linker_flag \"*) ;;\n\t      *) func_append new_inherited_linker_flags \" $tmp_inherited_linker_flag\";;\n\t    esac\n\t  done\n\tfi\n\tdependency_libs=`$ECHO \" $dependency_libs\" | $SED 's% \\([^ $]*\\).ltframework% -framework \\1%g'`\n\tif test \"$linkmode,$pass\" = \"lib,link\" ||\n\t   test \"$linkmode,$pass\" = \"prog,scan\" ||\n\t   { test \"$linkmode\" != prog && test \"$linkmode\" != lib; }; then\n\t  test -n \"$dlopen\" && func_append dlfiles \" $dlopen\"\n\t  test -n \"$dlpreopen\" && func_append dlprefiles \" $dlpreopen\"\n\tfi\n\n\tif test \"$pass\" = conv; then\n\t  # Only check for convenience libraries\n\t  deplibs=\"$lib $deplibs\"\n\t  if test -z \"$libdir\"; then\n\t    if test -z \"$old_library\"; then\n\t      func_fatal_error \"cannot find name of link library for \\`$lib'\"\n\t    fi\n\t    # It is a libtool convenience library, so add in its objects.\n\t    func_append convenience \" $ladir/$objdir/$old_library\"\n\t    func_append old_convenience \" $ladir/$objdir/$old_library\"\n\t    tmp_libs=\n\t    for deplib in $dependency_libs; do\n\t      deplibs=\"$deplib $deplibs\"\n\t      if $opt_preserve_dup_deps ; then\n\t\tcase \"$tmp_libs \" in\n\t\t*\" $deplib \"*) func_append specialdeplibs \" $deplib\" ;;\n\t\tesac\n\t      fi\n\t      func_append tmp_libs \" $deplib\"\n\t    done\n\t  elif test \"$linkmode\" != prog && test \"$linkmode\" != lib; then\n\t    func_fatal_error \"\\`$lib' is not a convenience library\"\n\t  fi\n\t  continue\n\tfi # $pass = conv\n\n\n\t# Get the name of the library we link against.\n\tlinklib=\n\tif test -n \"$old_library\" &&\n\t   { test \"$prefer_static_libs\" = yes ||\n\t     test \"$prefer_static_libs,$installed\" = \"built,no\"; }; then\n\t  linklib=$old_library\n\telse\n\t  for l in $old_library $library_names; do\n\t    linklib=\"$l\"\n\t  done\n\tfi\n\tif test -z \"$linklib\"; then\n\t  func_fatal_error \"cannot find name of link library for \\`$lib'\"\n\tfi\n\n\t# This library was specified with -dlopen.\n\tif test \"$pass\" = dlopen; then\n\t  if test -z \"$libdir\"; then\n\t    func_fatal_error \"cannot -dlopen a convenience library: \\`$lib'\"\n\t  fi\n\t  if test -z \"$dlname\" ||\n\t     test \"$dlopen_support\" != yes ||\n\t     test \"$build_libtool_libs\" = no; then\n\t    # If there is no dlname, no dlopen support or we're linking\n\t    # statically, we need to preload.  We also need to preload any\n\t    # dependent libraries so libltdl's deplib preloader doesn't\n\t    # bomb out in the load deplibs phase.\n\t    func_append dlprefiles \" $lib $dependency_libs\"\n\t  else\n\t    func_append newdlfiles \" $lib\"\n\t  fi\n\t  continue\n\tfi # $pass = dlopen\n\n\t# We need an absolute path.\n\tcase $ladir in\n\t[\\\\/]* | [A-Za-z]:[\\\\/]*) abs_ladir=\"$ladir\" ;;\n\t*)\n\t  abs_ladir=`cd \"$ladir\" && pwd`\n\t  if test -z \"$abs_ladir\"; then\n\t    func_warning \"cannot determine absolute directory name of \\`$ladir'\"\n\t    func_warning \"passing it literally to the linker, although it might fail\"\n\t    abs_ladir=\"$ladir\"\n\t  fi\n\t  ;;\n\tesac\n\tfunc_basename \"$lib\"\n\tlaname=\"$func_basename_result\"\n\n\t# Find the relevant object directory and library name.\n\tif test \"X$installed\" = Xyes; then\n\t  if test ! -f \"$lt_sysroot$libdir/$linklib\" && test -f \"$abs_ladir/$linklib\"; then\n\t    func_warning \"library \\`$lib' was moved.\"\n\t    dir=\"$ladir\"\n\t    absdir=\"$abs_ladir\"\n\t    libdir=\"$abs_ladir\"\n\t  else\n\t    dir=\"$lt_sysroot$libdir\"\n\t    absdir=\"$lt_sysroot$libdir\"\n\t  fi\n\t  test \"X$hardcode_automatic\" = Xyes && avoidtemprpath=yes\n\telse\n\t  if test ! -f \"$ladir/$objdir/$linklib\" && test -f \"$abs_ladir/$linklib\"; then\n\t    dir=\"$ladir\"\n\t    absdir=\"$abs_ladir\"\n\t    # Remove this search path later\n\t    func_append notinst_path \" $abs_ladir\"\n\t  else\n\t    dir=\"$ladir/$objdir\"\n\t    absdir=\"$abs_ladir/$objdir\"\n\t    # Remove this search path later\n\t    func_append notinst_path \" $abs_ladir\"\n\t  fi\n\tfi # $installed = yes\n\tfunc_stripname 'lib' '.la' \"$laname\"\n\tname=$func_stripname_result\n\n\t# This library was specified with -dlpreopen.\n\tif test \"$pass\" = dlpreopen; then\n\t  if test -z \"$libdir\" && test \"$linkmode\" = prog; then\n\t    func_fatal_error \"only libraries may -dlpreopen a convenience library: \\`$lib'\"\n\t  fi\n\t  case \"$host\" in\n\t    # special handling for platforms with PE-DLLs.\n\t    *cygwin* | *mingw* | *cegcc* )\n\t      # Linker will automatically link against shared library if both\n\t      # static and shared are present.  Therefore, ensure we extract\n\t      # symbols from the import library if a shared library is present\n\t      # (otherwise, the dlopen module name will be incorrect).  We do\n\t      # this by putting the import library name into $newdlprefiles.\n\t      # We recover the dlopen module name by 'saving' the la file\n\t      # name in a special purpose variable, and (later) extracting the\n\t      # dlname from the la file.\n\t      if test -n \"$dlname\"; then\n\t        func_tr_sh \"$dir/$linklib\"\n\t        eval \"libfile_$func_tr_sh_result=\\$abs_ladir/\\$laname\"\n\t        func_append newdlprefiles \" $dir/$linklib\"\n\t      else\n\t        func_append newdlprefiles \" $dir/$old_library\"\n\t        # Keep a list of preopened convenience libraries to check\n\t        # that they are being used correctly in the link pass.\n\t        test -z \"$libdir\" && \\\n\t          func_append dlpreconveniencelibs \" $dir/$old_library\"\n\t      fi\n\t    ;;\n\t    * )\n\t      # Prefer using a static library (so that no silly _DYNAMIC symbols\n\t      # are required to link).\n\t      if test -n \"$old_library\"; then\n\t        func_append newdlprefiles \" $dir/$old_library\"\n\t        # Keep a list of preopened convenience libraries to check\n\t        # that they are being used correctly in the link pass.\n\t        test -z \"$libdir\" && \\\n\t          func_append dlpreconveniencelibs \" $dir/$old_library\"\n\t      # Otherwise, use the dlname, so that lt_dlopen finds it.\n\t      elif test -n \"$dlname\"; then\n\t        func_append newdlprefiles \" $dir/$dlname\"\n\t      else\n\t        func_append newdlprefiles \" $dir/$linklib\"\n\t      fi\n\t    ;;\n\t  esac\n\tfi # $pass = dlpreopen\n\n\tif test -z \"$libdir\"; then\n\t  # Link the convenience library\n\t  if test \"$linkmode\" = lib; then\n\t    deplibs=\"$dir/$old_library $deplibs\"\n\t  elif test \"$linkmode,$pass\" = \"prog,link\"; then\n\t    compile_deplibs=\"$dir/$old_library $compile_deplibs\"\n\t    finalize_deplibs=\"$dir/$old_library $finalize_deplibs\"\n\t  else\n\t    deplibs=\"$lib $deplibs\" # used for prog,scan pass\n\t  fi\n\t  continue\n\tfi\n\n\n\tif test \"$linkmode\" = prog && test \"$pass\" != link; then\n\t  func_append newlib_search_path \" $ladir\"\n\t  deplibs=\"$lib $deplibs\"\n\n\t  linkalldeplibs=no\n\t  if test \"$link_all_deplibs\" != no || test -z \"$library_names\" ||\n\t     test \"$build_libtool_libs\" = no; then\n\t    linkalldeplibs=yes\n\t  fi\n\n\t  tmp_libs=\n\t  for deplib in $dependency_libs; do\n\t    case $deplib in\n\t    -L*) func_stripname '-L' '' \"$deplib\"\n\t         func_resolve_sysroot \"$func_stripname_result\"\n\t         func_append newlib_search_path \" $func_resolve_sysroot_result\"\n\t\t ;;\n\t    esac\n\t    # Need to link against all dependency_libs?\n\t    if test \"$linkalldeplibs\" = yes; then\n\t      deplibs=\"$deplib $deplibs\"\n\t    else\n\t      # Need to hardcode shared library paths\n\t      # or/and link against static libraries\n\t      newdependency_libs=\"$deplib $newdependency_libs\"\n\t    fi\n\t    if $opt_preserve_dup_deps ; then\n\t      case \"$tmp_libs \" in\n\t      *\" $deplib \"*) func_append specialdeplibs \" $deplib\" ;;\n\t      esac\n\t    fi\n\t    func_append tmp_libs \" $deplib\"\n\t  done # for deplib\n\t  continue\n\tfi # $linkmode = prog...\n\n\tif test \"$linkmode,$pass\" = \"prog,link\"; then\n\t  if test -n \"$library_names\" &&\n\t     { { test \"$prefer_static_libs\" = no ||\n\t         test \"$prefer_static_libs,$installed\" = \"built,yes\"; } ||\n\t       test -z \"$old_library\"; }; then\n\t    # We need to hardcode the library path\n\t    if test -n \"$shlibpath_var\" && test -z \"$avoidtemprpath\" ; then\n\t      # Make sure the rpath contains only unique directories.\n\t      case \"$temp_rpath:\" in\n\t      *\"$absdir:\"*) ;;\n\t      *) func_append temp_rpath \"$absdir:\" ;;\n\t      esac\n\t    fi\n\n\t    # Hardcode the library path.\n\t    # Skip directories that are in the system default run-time\n\t    # search path.\n\t    case \" $sys_lib_dlsearch_path \" in\n\t    *\" $absdir \"*) ;;\n\t    *)\n\t      case \"$compile_rpath \" in\n\t      *\" $absdir \"*) ;;\n\t      *) func_append compile_rpath \" $absdir\" ;;\n\t      esac\n\t      ;;\n\t    esac\n\t    case \" $sys_lib_dlsearch_path \" in\n\t    *\" $libdir \"*) ;;\n\t    *)\n\t      case \"$finalize_rpath \" in\n\t      *\" $libdir \"*) ;;\n\t      *) func_append finalize_rpath \" $libdir\" ;;\n\t      esac\n\t      ;;\n\t    esac\n\t  fi # $linkmode,$pass = prog,link...\n\n\t  if test \"$alldeplibs\" = yes &&\n\t     { test \"$deplibs_check_method\" = pass_all ||\n\t       { test \"$build_libtool_libs\" = yes &&\n\t\t test -n \"$library_names\"; }; }; then\n\t    # We only need to search for static libraries\n\t    continue\n\t  fi\n\tfi\n\n\tlink_static=no # Whether the deplib will be linked statically\n\tuse_static_libs=$prefer_static_libs\n\tif test \"$use_static_libs\" = built && test \"$installed\" = yes; then\n\t  use_static_libs=no\n\tfi\n\tif test -n \"$library_names\" &&\n\t   { test \"$use_static_libs\" = no || test -z \"$old_library\"; }; then\n\t  case $host in\n\t  *cygwin* | *mingw* | *cegcc*)\n\t      # No point in relinking DLLs because paths are not encoded\n\t      func_append notinst_deplibs \" $lib\"\n\t      need_relink=no\n\t    ;;\n\t  *)\n\t    if test \"$installed\" = no; then\n\t      func_append notinst_deplibs \" $lib\"\n\t      need_relink=yes\n\t    fi\n\t    ;;\n\t  esac\n\t  # This is a shared library\n\n\t  # Warn about portability, can't link against -module's on some\n\t  # systems (darwin).  Don't bleat about dlopened modules though!\n\t  dlopenmodule=\"\"\n\t  for dlpremoduletest in $dlprefiles; do\n\t    if test \"X$dlpremoduletest\" = \"X$lib\"; then\n\t      dlopenmodule=\"$dlpremoduletest\"\n\t      break\n\t    fi\n\t  done\n\t  if test -z \"$dlopenmodule\" && test \"$shouldnotlink\" = yes && test \"$pass\" = link; then\n\t    echo\n\t    if test \"$linkmode\" = prog; then\n\t      $ECHO \"*** Warning: Linking the executable $output against the loadable module\"\n\t    else\n\t      $ECHO \"*** Warning: Linking the shared library $output against the loadable module\"\n\t    fi\n\t    $ECHO \"*** $linklib is not portable!\"\n\t  fi\n\t  if test \"$linkmode\" = lib &&\n\t     test \"$hardcode_into_libs\" = yes; then\n\t    # Hardcode the library path.\n\t    # Skip directories that are in the system default run-time\n\t    # search path.\n\t    case \" $sys_lib_dlsearch_path \" in\n\t    *\" $absdir \"*) ;;\n\t    *)\n\t      case \"$compile_rpath \" in\n\t      *\" $absdir \"*) ;;\n\t      *) func_append compile_rpath \" $absdir\" ;;\n\t      esac\n\t      ;;\n\t    esac\n\t    case \" $sys_lib_dlsearch_path \" in\n\t    *\" $libdir \"*) ;;\n\t    *)\n\t      case \"$finalize_rpath \" in\n\t      *\" $libdir \"*) ;;\n\t      *) func_append finalize_rpath \" $libdir\" ;;\n\t      esac\n\t      ;;\n\t    esac\n\t  fi\n\n\t  if test -n \"$old_archive_from_expsyms_cmds\"; then\n\t    # figure out the soname\n\t    set dummy $library_names\n\t    shift\n\t    realname=\"$1\"\n\t    shift\n\t    libname=`eval \"\\\\$ECHO \\\"$libname_spec\\\"\"`\n\t    # use dlname if we got it. it's perfectly good, no?\n\t    if test -n \"$dlname\"; then\n\t      soname=\"$dlname\"\n\t    elif test -n \"$soname_spec\"; then\n\t      # bleh windows\n\t      case $host in\n\t      *cygwin* | mingw* | *cegcc*)\n\t        func_arith $current - $age\n\t\tmajor=$func_arith_result\n\t\tversuffix=\"-$major\"\n\t\t;;\n\t      esac\n\t      eval soname=\\\"$soname_spec\\\"\n\t    else\n\t      soname=\"$realname\"\n\t    fi\n\n\t    # Make a new name for the extract_expsyms_cmds to use\n\t    soroot=\"$soname\"\n\t    func_basename \"$soroot\"\n\t    soname=\"$func_basename_result\"\n\t    func_stripname 'lib' '.dll' \"$soname\"\n\t    newlib=libimp-$func_stripname_result.a\n\n\t    # If the library has no export list, then create one now\n\t    if test -f \"$output_objdir/$soname-def\"; then :\n\t    else\n\t      func_verbose \"extracting exported symbol list from \\`$soname'\"\n\t      func_execute_cmds \"$extract_expsyms_cmds\" 'exit $?'\n\t    fi\n\n\t    # Create $newlib\n\t    if test -f \"$output_objdir/$newlib\"; then :; else\n\t      func_verbose \"generating import library for \\`$soname'\"\n\t      func_execute_cmds \"$old_archive_from_expsyms_cmds\" 'exit $?'\n\t    fi\n\t    # make sure the library variables are pointing to the new library\n\t    dir=$output_objdir\n\t    linklib=$newlib\n\t  fi # test -n \"$old_archive_from_expsyms_cmds\"\n\n\t  if test \"$linkmode\" = prog || test \"$opt_mode\" != relink; then\n\t    add_shlibpath=\n\t    add_dir=\n\t    add=\n\t    lib_linked=yes\n\t    case $hardcode_action in\n\t    immediate | unsupported)\n\t      if test \"$hardcode_direct\" = no; then\n\t\tadd=\"$dir/$linklib\"\n\t\tcase $host in\n\t\t  *-*-sco3.2v5.0.[024]*) add_dir=\"-L$dir\" ;;\n\t\t  *-*-sysv4*uw2*) add_dir=\"-L$dir\" ;;\n\t\t  *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \\\n\t\t    *-*-unixware7*) add_dir=\"-L$dir\" ;;\n\t\t  *-*-darwin* )\n\t\t    # if the lib is a (non-dlopened) module then we can not\n\t\t    # link against it, someone is ignoring the earlier warnings\n\t\t    if /usr/bin/file -L $add 2> /dev/null |\n\t\t\t $GREP \": [^:]* bundle\" >/dev/null ; then\n\t\t      if test \"X$dlopenmodule\" != \"X$lib\"; then\n\t\t\t$ECHO \"*** Warning: lib $linklib is a module, not a shared library\"\n\t\t\tif test -z \"$old_library\" ; then\n\t\t\t  echo\n\t\t\t  echo \"*** And there doesn't seem to be a static archive available\"\n\t\t\t  echo \"*** The link will probably fail, sorry\"\n\t\t\telse\n\t\t\t  add=\"$dir/$old_library\"\n\t\t\tfi\n\t\t      elif test -n \"$old_library\"; then\n\t\t\tadd=\"$dir/$old_library\"\n\t\t      fi\n\t\t    fi\n\t\tesac\n\t      elif test \"$hardcode_minus_L\" = no; then\n\t\tcase $host in\n\t\t*-*-sunos*) add_shlibpath=\"$dir\" ;;\n\t\tesac\n\t\tadd_dir=\"-L$dir\"\n\t\tadd=\"-l$name\"\n\t      elif test \"$hardcode_shlibpath_var\" = no; then\n\t\tadd_shlibpath=\"$dir\"\n\t\tadd=\"-l$name\"\n\t      else\n\t\tlib_linked=no\n\t      fi\n\t      ;;\n\t    relink)\n\t      if test \"$hardcode_direct\" = yes &&\n\t         test \"$hardcode_direct_absolute\" = no; then\n\t\tadd=\"$dir/$linklib\"\n\t      elif test \"$hardcode_minus_L\" = yes; then\n\t\tadd_dir=\"-L$absdir\"\n\t\t# Try looking first in the location we're being installed to.\n\t\tif test -n \"$inst_prefix_dir\"; then\n\t\t  case $libdir in\n\t\t    [\\\\/]*)\n\t\t      func_append add_dir \" -L$inst_prefix_dir$libdir\"\n\t\t      ;;\n\t\t  esac\n\t\tfi\n\t\tadd=\"-l$name\"\n\t      elif test \"$hardcode_shlibpath_var\" = yes; then\n\t\tadd_shlibpath=\"$dir\"\n\t\tadd=\"-l$name\"\n\t      else\n\t\tlib_linked=no\n\t      fi\n\t      ;;\n\t    *) lib_linked=no ;;\n\t    esac\n\n\t    if test \"$lib_linked\" != yes; then\n\t      func_fatal_configuration \"unsupported hardcode properties\"\n\t    fi\n\n\t    if test -n \"$add_shlibpath\"; then\n\t      case :$compile_shlibpath: in\n\t      *\":$add_shlibpath:\"*) ;;\n\t      *) func_append compile_shlibpath \"$add_shlibpath:\" ;;\n\t      esac\n\t    fi\n\t    if test \"$linkmode\" = prog; then\n\t      test -n \"$add_dir\" && compile_deplibs=\"$add_dir $compile_deplibs\"\n\t      test -n \"$add\" && compile_deplibs=\"$add $compile_deplibs\"\n\t    else\n\t      test -n \"$add_dir\" && deplibs=\"$add_dir $deplibs\"\n\t      test -n \"$add\" && deplibs=\"$add $deplibs\"\n\t      if test \"$hardcode_direct\" != yes &&\n\t\t test \"$hardcode_minus_L\" != yes &&\n\t\t test \"$hardcode_shlibpath_var\" = yes; then\n\t\tcase :$finalize_shlibpath: in\n\t\t*\":$libdir:\"*) ;;\n\t\t*) func_append finalize_shlibpath \"$libdir:\" ;;\n\t\tesac\n\t      fi\n\t    fi\n\t  fi\n\n\t  if test \"$linkmode\" = prog || test \"$opt_mode\" = relink; then\n\t    add_shlibpath=\n\t    add_dir=\n\t    add=\n\t    # Finalize command for both is simple: just hardcode it.\n\t    if test \"$hardcode_direct\" = yes &&\n\t       test \"$hardcode_direct_absolute\" = no; then\n\t      add=\"$libdir/$linklib\"\n\t    elif test \"$hardcode_minus_L\" = yes; then\n\t      add_dir=\"-L$libdir\"\n\t      add=\"-l$name\"\n\t    elif test \"$hardcode_shlibpath_var\" = yes; then\n\t      case :$finalize_shlibpath: in\n\t      *\":$libdir:\"*) ;;\n\t      *) func_append finalize_shlibpath \"$libdir:\" ;;\n\t      esac\n\t      add=\"-l$name\"\n\t    elif test \"$hardcode_automatic\" = yes; then\n\t      if test -n \"$inst_prefix_dir\" &&\n\t\t test -f \"$inst_prefix_dir$libdir/$linklib\" ; then\n\t\tadd=\"$inst_prefix_dir$libdir/$linklib\"\n\t      else\n\t\tadd=\"$libdir/$linklib\"\n\t      fi\n\t    else\n\t      # We cannot seem to hardcode it, guess we'll fake it.\n\t      add_dir=\"-L$libdir\"\n\t      # Try looking first in the location we're being installed to.\n\t      if test -n \"$inst_prefix_dir\"; then\n\t\tcase $libdir in\n\t\t  [\\\\/]*)\n\t\t    func_append add_dir \" -L$inst_prefix_dir$libdir\"\n\t\t    ;;\n\t\tesac\n\t      fi\n\t      add=\"-l$name\"\n\t    fi\n\n\t    if test \"$linkmode\" = prog; then\n\t      test -n \"$add_dir\" && finalize_deplibs=\"$add_dir $finalize_deplibs\"\n\t      test -n \"$add\" && finalize_deplibs=\"$add $finalize_deplibs\"\n\t    else\n\t      test -n \"$add_dir\" && deplibs=\"$add_dir $deplibs\"\n\t      test -n \"$add\" && deplibs=\"$add $deplibs\"\n\t    fi\n\t  fi\n\telif test \"$linkmode\" = prog; then\n\t  # Here we assume that one of hardcode_direct or hardcode_minus_L\n\t  # is not unsupported.  This is valid on all known static and\n\t  # shared platforms.\n\t  if test \"$hardcode_direct\" != unsupported; then\n\t    test -n \"$old_library\" && linklib=\"$old_library\"\n\t    compile_deplibs=\"$dir/$linklib $compile_deplibs\"\n\t    finalize_deplibs=\"$dir/$linklib $finalize_deplibs\"\n\t  else\n\t    compile_deplibs=\"-l$name -L$dir $compile_deplibs\"\n\t    finalize_deplibs=\"-l$name -L$dir $finalize_deplibs\"\n\t  fi\n\telif test \"$build_libtool_libs\" = yes; then\n\t  # Not a shared library\n\t  if test \"$deplibs_check_method\" != pass_all; then\n\t    # We're trying link a shared library against a static one\n\t    # but the system doesn't support it.\n\n\t    # Just print a warning and add the library to dependency_libs so\n\t    # that the program can be linked against the static library.\n\t    echo\n\t    $ECHO \"*** Warning: This system can not link to static lib archive $lib.\"\n\t    echo \"*** I have the capability to make that library automatically link in when\"\n\t    echo \"*** you link to this library.  But I can only do this if you have a\"\n\t    echo \"*** shared version of the library, which you do not appear to have.\"\n\t    if test \"$module\" = yes; then\n\t      echo \"*** But as you try to build a module library, libtool will still create \"\n\t      echo \"*** a static module, that should work as long as the dlopening application\"\n\t      echo \"*** is linked with the -dlopen flag to resolve symbols at runtime.\"\n\t      if test -z \"$global_symbol_pipe\"; then\n\t\techo\n\t\techo \"*** However, this would only work if libtool was able to extract symbol\"\n\t\techo \"*** lists from a program, using \\`nm' or equivalent, but libtool could\"\n\t\techo \"*** not find such a program.  So, this module is probably useless.\"\n\t\techo \"*** \\`nm' from GNU binutils and a full rebuild may help.\"\n\t      fi\n\t      if test \"$build_old_libs\" = no; then\n\t\tbuild_libtool_libs=module\n\t\tbuild_old_libs=yes\n\t      else\n\t\tbuild_libtool_libs=no\n\t      fi\n\t    fi\n\t  else\n\t    deplibs=\"$dir/$old_library $deplibs\"\n\t    link_static=yes\n\t  fi\n\tfi # link shared/static library?\n\n\tif test \"$linkmode\" = lib; then\n\t  if test -n \"$dependency_libs\" &&\n\t     { test \"$hardcode_into_libs\" != yes ||\n\t       test \"$build_old_libs\" = yes ||\n\t       test \"$link_static\" = yes; }; then\n\t    # Extract -R from dependency_libs\n\t    temp_deplibs=\n\t    for libdir in $dependency_libs; do\n\t      case $libdir in\n\t      -R*) func_stripname '-R' '' \"$libdir\"\n\t           temp_xrpath=$func_stripname_result\n\t\t   case \" $xrpath \" in\n\t\t   *\" $temp_xrpath \"*) ;;\n\t\t   *) func_append xrpath \" $temp_xrpath\";;\n\t\t   esac;;\n\t      *) func_append temp_deplibs \" $libdir\";;\n\t      esac\n\t    done\n\t    dependency_libs=\"$temp_deplibs\"\n\t  fi\n\n\t  func_append newlib_search_path \" $absdir\"\n\t  # Link against this library\n\t  test \"$link_static\" = no && newdependency_libs=\"$abs_ladir/$laname $newdependency_libs\"\n\t  # ... and its dependency_libs\n\t  tmp_libs=\n\t  for deplib in $dependency_libs; do\n\t    newdependency_libs=\"$deplib $newdependency_libs\"\n\t    case $deplib in\n              -L*) func_stripname '-L' '' \"$deplib\"\n                   func_resolve_sysroot \"$func_stripname_result\";;\n              *) func_resolve_sysroot \"$deplib\" ;;\n            esac\n\t    if $opt_preserve_dup_deps ; then\n\t      case \"$tmp_libs \" in\n\t      *\" $func_resolve_sysroot_result \"*)\n                func_append specialdeplibs \" $func_resolve_sysroot_result\" ;;\n\t      esac\n\t    fi\n\t    func_append tmp_libs \" $func_resolve_sysroot_result\"\n\t  done\n\n\t  if test \"$link_all_deplibs\" != no; then\n\t    # Add the search paths of all dependency libraries\n\t    for deplib in $dependency_libs; do\n\t      path=\n\t      case $deplib in\n\t      -L*) path=\"$deplib\" ;;\n\t      *.la)\n\t        func_resolve_sysroot \"$deplib\"\n\t        deplib=$func_resolve_sysroot_result\n\t        func_dirname \"$deplib\" \"\" \".\"\n\t\tdir=$func_dirname_result\n\t\t# We need an absolute path.\n\t\tcase $dir in\n\t\t[\\\\/]* | [A-Za-z]:[\\\\/]*) absdir=\"$dir\" ;;\n\t\t*)\n\t\t  absdir=`cd \"$dir\" && pwd`\n\t\t  if test -z \"$absdir\"; then\n\t\t    func_warning \"cannot determine absolute directory name of \\`$dir'\"\n\t\t    absdir=\"$dir\"\n\t\t  fi\n\t\t  ;;\n\t\tesac\n\t\tif $GREP \"^installed=no\" $deplib > /dev/null; then\n\t\tcase $host in\n\t\t*-*-darwin*)\n\t\t  depdepl=\n\t\t  eval deplibrary_names=`${SED} -n -e 's/^library_names=\\(.*\\)$/\\1/p' $deplib`\n\t\t  if test -n \"$deplibrary_names\" ; then\n\t\t    for tmp in $deplibrary_names ; do\n\t\t      depdepl=$tmp\n\t\t    done\n\t\t    if test -f \"$absdir/$objdir/$depdepl\" ; then\n\t\t      depdepl=\"$absdir/$objdir/$depdepl\"\n\t\t      darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`\n                      if test -z \"$darwin_install_name\"; then\n                          darwin_install_name=`${OTOOL64} -L $depdepl  | awk '{if (NR == 2) {print $1;exit}}'`\n                      fi\n\t\t      func_append compiler_flags \" ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}\"\n\t\t      func_append linker_flags \" -dylib_file ${darwin_install_name}:${depdepl}\"\n\t\t      path=\n\t\t    fi\n\t\t  fi\n\t\t  ;;\n\t\t*)\n\t\t  path=\"-L$absdir/$objdir\"\n\t\t  ;;\n\t\tesac\n\t\telse\n\t\t  eval libdir=`${SED} -n -e 's/^libdir=\\(.*\\)$/\\1/p' $deplib`\n\t\t  test -z \"$libdir\" && \\\n\t\t    func_fatal_error \"\\`$deplib' is not a valid libtool archive\"\n\t\t  test \"$absdir\" != \"$libdir\" && \\\n\t\t    func_warning \"\\`$deplib' seems to be moved\"\n\n\t\t  path=\"-L$absdir\"\n\t\tfi\n\t\t;;\n\t      esac\n\t      case \" $deplibs \" in\n\t      *\" $path \"*) ;;\n\t      *) deplibs=\"$path $deplibs\" ;;\n\t      esac\n\t    done\n\t  fi # link_all_deplibs != no\n\tfi # linkmode = lib\n      done # for deplib in $libs\n      if test \"$pass\" = link; then\n\tif test \"$linkmode\" = \"prog\"; then\n\t  compile_deplibs=\"$new_inherited_linker_flags $compile_deplibs\"\n\t  finalize_deplibs=\"$new_inherited_linker_flags $finalize_deplibs\"\n\telse\n\t  compiler_flags=\"$compiler_flags \"`$ECHO \" $new_inherited_linker_flags\" | $SED 's% \\([^ $]*\\).ltframework% -framework \\1%g'`\n\tfi\n      fi\n      dependency_libs=\"$newdependency_libs\"\n      if test \"$pass\" = dlpreopen; then\n\t# Link the dlpreopened libraries before other libraries\n\tfor deplib in $save_deplibs; do\n\t  deplibs=\"$deplib $deplibs\"\n\tdone\n      fi\n      if test \"$pass\" != dlopen; then\n\tif test \"$pass\" != conv; then\n\t  # Make sure lib_search_path contains only unique directories.\n\t  lib_search_path=\n\t  for dir in $newlib_search_path; do\n\t    case \"$lib_search_path \" in\n\t    *\" $dir \"*) ;;\n\t    *) func_append lib_search_path \" $dir\" ;;\n\t    esac\n\t  done\n\t  newlib_search_path=\n\tfi\n\n\tif test \"$linkmode,$pass\" != \"prog,link\"; then\n\t  vars=\"deplibs\"\n\telse\n\t  vars=\"compile_deplibs finalize_deplibs\"\n\tfi\n\tfor var in $vars dependency_libs; do\n\t  # Add libraries to $var in reverse order\n\t  eval tmp_libs=\\\"\\$$var\\\"\n\t  new_libs=\n\t  for deplib in $tmp_libs; do\n\t    # FIXME: Pedantically, this is the right thing to do, so\n\t    #        that some nasty dependency loop isn't accidentally\n\t    #        broken:\n\t    #new_libs=\"$deplib $new_libs\"\n\t    # Pragmatically, this seems to cause very few problems in\n\t    # practice:\n\t    case $deplib in\n\t    -L*) new_libs=\"$deplib $new_libs\" ;;\n\t    -R*) ;;\n\t    *)\n\t      # And here is the reason: when a library appears more\n\t      # than once as an explicit dependence of a library, or\n\t      # is implicitly linked in more than once by the\n\t      # compiler, it is considered special, and multiple\n\t      # occurrences thereof are not removed.  Compare this\n\t      # with having the same library being listed as a\n\t      # dependency of multiple other libraries: in this case,\n\t      # we know (pedantically, we assume) the library does not\n\t      # need to be listed more than once, so we keep only the\n\t      # last copy.  This is not always right, but it is rare\n\t      # enough that we require users that really mean to play\n\t      # such unportable linking tricks to link the library\n\t      # using -Wl,-lname, so that libtool does not consider it\n\t      # for duplicate removal.\n\t      case \" $specialdeplibs \" in\n\t      *\" $deplib \"*) new_libs=\"$deplib $new_libs\" ;;\n\t      *)\n\t\tcase \" $new_libs \" in\n\t\t*\" $deplib \"*) ;;\n\t\t*) new_libs=\"$deplib $new_libs\" ;;\n\t\tesac\n\t\t;;\n\t      esac\n\t      ;;\n\t    esac\n\t  done\n\t  tmp_libs=\n\t  for deplib in $new_libs; do\n\t    case $deplib in\n\t    -L*)\n\t      case \" $tmp_libs \" in\n\t      *\" $deplib \"*) ;;\n\t      *) func_append tmp_libs \" $deplib\" ;;\n\t      esac\n\t      ;;\n\t    *) func_append tmp_libs \" $deplib\" ;;\n\t    esac\n\t  done\n\t  eval $var=\\\"$tmp_libs\\\"\n\tdone # for var\n      fi\n      # Last step: remove runtime libs from dependency_libs\n      # (they stay in deplibs)\n      tmp_libs=\n      for i in $dependency_libs ; do\n\tcase \" $predeps $postdeps $compiler_lib_search_path \" in\n\t*\" $i \"*)\n\t  i=\"\"\n\t  ;;\n\tesac\n\tif test -n \"$i\" ; then\n\t  func_append tmp_libs \" $i\"\n\tfi\n      done\n      dependency_libs=$tmp_libs\n    done # for pass\n    if test \"$linkmode\" = prog; then\n      dlfiles=\"$newdlfiles\"\n    fi\n    if test \"$linkmode\" = prog || test \"$linkmode\" = lib; then\n      dlprefiles=\"$newdlprefiles\"\n    fi\n\n    case $linkmode in\n    oldlib)\n      if test -n \"$dlfiles$dlprefiles\" || test \"$dlself\" != no; then\n\tfunc_warning \"\\`-dlopen' is ignored for archives\"\n      fi\n\n      case \" $deplibs\" in\n      *\\ -l* | *\\ -L*)\n\tfunc_warning \"\\`-l' and \\`-L' are ignored for archives\" ;;\n      esac\n\n      test -n \"$rpath\" && \\\n\tfunc_warning \"\\`-rpath' is ignored for archives\"\n\n      test -n \"$xrpath\" && \\\n\tfunc_warning \"\\`-R' is ignored for archives\"\n\n      test -n \"$vinfo\" && \\\n\tfunc_warning \"\\`-version-info/-version-number' is ignored for archives\"\n\n      test -n \"$release\" && \\\n\tfunc_warning \"\\`-release' is ignored for archives\"\n\n      test -n \"$export_symbols$export_symbols_regex\" && \\\n\tfunc_warning \"\\`-export-symbols' is ignored for archives\"\n\n      # Now set the variables for building old libraries.\n      build_libtool_libs=no\n      oldlibs=\"$output\"\n      func_append objs \"$old_deplibs\"\n      ;;\n\n    lib)\n      # Make sure we only generate libraries of the form `libNAME.la'.\n      case $outputname in\n      lib*)\n\tfunc_stripname 'lib' '.la' \"$outputname\"\n\tname=$func_stripname_result\n\teval shared_ext=\\\"$shrext_cmds\\\"\n\teval libname=\\\"$libname_spec\\\"\n\t;;\n      *)\n\ttest \"$module\" = no && \\\n\t  func_fatal_help \"libtool library \\`$output' must begin with \\`lib'\"\n\n\tif test \"$need_lib_prefix\" != no; then\n\t  # Add the \"lib\" prefix for modules if required\n\t  func_stripname '' '.la' \"$outputname\"\n\t  name=$func_stripname_result\n\t  eval shared_ext=\\\"$shrext_cmds\\\"\n\t  eval libname=\\\"$libname_spec\\\"\n\telse\n\t  func_stripname '' '.la' \"$outputname\"\n\t  libname=$func_stripname_result\n\tfi\n\t;;\n      esac\n\n      if test -n \"$objs\"; then\n\tif test \"$deplibs_check_method\" != pass_all; then\n\t  func_fatal_error \"cannot build libtool library \\`$output' from non-libtool objects on this host:$objs\"\n\telse\n\t  echo\n\t  $ECHO \"*** Warning: Linking the shared library $output against the non-libtool\"\n\t  $ECHO \"*** objects $objs is not portable!\"\n\t  func_append libobjs \" $objs\"\n\tfi\n      fi\n\n      test \"$dlself\" != no && \\\n\tfunc_warning \"\\`-dlopen self' is ignored for libtool libraries\"\n\n      set dummy $rpath\n      shift\n      test \"$#\" -gt 1 && \\\n\tfunc_warning \"ignoring multiple \\`-rpath's for a libtool library\"\n\n      install_libdir=\"$1\"\n\n      oldlibs=\n      if test -z \"$rpath\"; then\n\tif test \"$build_libtool_libs\" = yes; then\n\t  # Building a libtool convenience library.\n\t  # Some compilers have problems with a `.al' extension so\n\t  # convenience libraries should have the same extension an\n\t  # archive normally would.\n\t  oldlibs=\"$output_objdir/$libname.$libext $oldlibs\"\n\t  build_libtool_libs=convenience\n\t  build_old_libs=yes\n\tfi\n\n\ttest -n \"$vinfo\" && \\\n\t  func_warning \"\\`-version-info/-version-number' is ignored for convenience libraries\"\n\n\ttest -n \"$release\" && \\\n\t  func_warning \"\\`-release' is ignored for convenience libraries\"\n      else\n\n\t# Parse the version information argument.\n\tsave_ifs=\"$IFS\"; IFS=':'\n\tset dummy $vinfo 0 0 0\n\tshift\n\tIFS=\"$save_ifs\"\n\n\ttest -n \"$7\" && \\\n\t  func_fatal_help \"too many parameters to \\`-version-info'\"\n\n\t# convert absolute version numbers to libtool ages\n\t# this retains compatibility with .la files and attempts\n\t# to make the code below a bit more comprehensible\n\n\tcase $vinfo_number in\n\tyes)\n\t  number_major=\"$1\"\n\t  number_minor=\"$2\"\n\t  number_revision=\"$3\"\n\t  #\n\t  # There are really only two kinds -- those that\n\t  # use the current revision as the major version\n\t  # and those that subtract age and use age as\n\t  # a minor version.  But, then there is irix\n\t  # which has an extra 1 added just for fun\n\t  #\n\t  case $version_type in\n\t  # correct linux to gnu/linux during the next big refactor\n\t  darwin|linux|osf|windows|none)\n\t    func_arith $number_major + $number_minor\n\t    current=$func_arith_result\n\t    age=\"$number_minor\"\n\t    revision=\"$number_revision\"\n\t    ;;\n\t  freebsd-aout|freebsd-elf|qnx|sunos)\n\t    current=\"$number_major\"\n\t    revision=\"$number_minor\"\n\t    age=\"0\"\n\t    ;;\n\t  irix|nonstopux)\n\t    func_arith $number_major + $number_minor\n\t    current=$func_arith_result\n\t    age=\"$number_minor\"\n\t    revision=\"$number_minor\"\n\t    lt_irix_increment=no\n\t    ;;\n\t  *)\n\t    func_fatal_configuration \"$modename: unknown library version type \\`$version_type'\"\n\t    ;;\n\t  esac\n\t  ;;\n\tno)\n\t  current=\"$1\"\n\t  revision=\"$2\"\n\t  age=\"$3\"\n\t  ;;\n\tesac\n\n\t# Check that each of the things are valid numbers.\n\tcase $current in\n\t0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;\n\t*)\n\t  func_error \"CURRENT \\`$current' must be a nonnegative integer\"\n\t  func_fatal_error \"\\`$vinfo' is not valid version information\"\n\t  ;;\n\tesac\n\n\tcase $revision in\n\t0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;\n\t*)\n\t  func_error \"REVISION \\`$revision' must be a nonnegative integer\"\n\t  func_fatal_error \"\\`$vinfo' is not valid version information\"\n\t  ;;\n\tesac\n\n\tcase $age in\n\t0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;\n\t*)\n\t  func_error \"AGE \\`$age' must be a nonnegative integer\"\n\t  func_fatal_error \"\\`$vinfo' is not valid version information\"\n\t  ;;\n\tesac\n\n\tif test \"$age\" -gt \"$current\"; then\n\t  func_error \"AGE \\`$age' is greater than the current interface number \\`$current'\"\n\t  func_fatal_error \"\\`$vinfo' is not valid version information\"\n\tfi\n\n\t# Calculate the version variables.\n\tmajor=\n\tversuffix=\n\tverstring=\n\tcase $version_type in\n\tnone) ;;\n\n\tdarwin)\n\t  # Like Linux, but with the current version available in\n\t  # verstring for coding it into the library header\n\t  func_arith $current - $age\n\t  major=.$func_arith_result\n\t  versuffix=\"$major.$age.$revision\"\n\t  # Darwin ld doesn't like 0 for these options...\n\t  func_arith $current + 1\n\t  minor_current=$func_arith_result\n\t  xlcverstring=\"${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision\"\n\t  verstring=\"-compatibility_version $minor_current -current_version $minor_current.$revision\"\n\t  ;;\n\n\tfreebsd-aout)\n\t  major=\".$current\"\n\t  versuffix=\".$current.$revision\";\n\t  ;;\n\n\tfreebsd-elf)\n\t  major=\".$current\"\n\t  versuffix=\".$current\"\n\t  ;;\n\n\tirix | nonstopux)\n\t  if test \"X$lt_irix_increment\" = \"Xno\"; then\n\t    func_arith $current - $age\n\t  else\n\t    func_arith $current - $age + 1\n\t  fi\n\t  major=$func_arith_result\n\n\t  case $version_type in\n\t    nonstopux) verstring_prefix=nonstopux ;;\n\t    *)         verstring_prefix=sgi ;;\n\t  esac\n\t  verstring=\"$verstring_prefix$major.$revision\"\n\n\t  # Add in all the interfaces that we are compatible with.\n\t  loop=$revision\n\t  while test \"$loop\" -ne 0; do\n\t    func_arith $revision - $loop\n\t    iface=$func_arith_result\n\t    func_arith $loop - 1\n\t    loop=$func_arith_result\n\t    verstring=\"$verstring_prefix$major.$iface:$verstring\"\n\t  done\n\n\t  # Before this point, $major must not contain `.'.\n\t  major=.$major\n\t  versuffix=\"$major.$revision\"\n\t  ;;\n\n\tlinux) # correct to gnu/linux during the next big refactor\n\t  func_arith $current - $age\n\t  major=.$func_arith_result\n\t  versuffix=\"$major.$age.$revision\"\n\t  ;;\n\n\tosf)\n\t  func_arith $current - $age\n\t  major=.$func_arith_result\n\t  versuffix=\".$current.$age.$revision\"\n\t  verstring=\"$current.$age.$revision\"\n\n\t  # Add in all the interfaces that we are compatible with.\n\t  loop=$age\n\t  while test \"$loop\" -ne 0; do\n\t    func_arith $current - $loop\n\t    iface=$func_arith_result\n\t    func_arith $loop - 1\n\t    loop=$func_arith_result\n\t    verstring=\"$verstring:${iface}.0\"\n\t  done\n\n\t  # Make executables depend on our current version.\n\t  func_append verstring \":${current}.0\"\n\t  ;;\n\n\tqnx)\n\t  major=\".$current\"\n\t  versuffix=\".$current\"\n\t  ;;\n\n\tsunos)\n\t  major=\".$current\"\n\t  versuffix=\".$current.$revision\"\n\t  ;;\n\n\twindows)\n\t  # Use '-' rather than '.', since we only want one\n\t  # extension on DOS 8.3 filesystems.\n\t  func_arith $current - $age\n\t  major=$func_arith_result\n\t  versuffix=\"-$major\"\n\t  ;;\n\n\t*)\n\t  func_fatal_configuration \"unknown library version type \\`$version_type'\"\n\t  ;;\n\tesac\n\n\t# Clear the version info if we defaulted, and they specified a release.\n\tif test -z \"$vinfo\" && test -n \"$release\"; then\n\t  major=\n\t  case $version_type in\n\t  darwin)\n\t    # we can't check for \"0.0\" in archive_cmds due to quoting\n\t    # problems, so we reset it completely\n\t    verstring=\n\t    ;;\n\t  *)\n\t    verstring=\"0.0\"\n\t    ;;\n\t  esac\n\t  if test \"$need_version\" = no; then\n\t    versuffix=\n\t  else\n\t    versuffix=\".0.0\"\n\t  fi\n\tfi\n\n\t# Remove version info from name if versioning should be avoided\n\tif test \"$avoid_version\" = yes && test \"$need_version\" = no; then\n\t  major=\n\t  versuffix=\n\t  verstring=\"\"\n\tfi\n\n\t# Check to see if the archive will have undefined symbols.\n\tif test \"$allow_undefined\" = yes; then\n\t  if test \"$allow_undefined_flag\" = unsupported; then\n\t    func_warning \"undefined symbols not allowed in $host shared libraries\"\n\t    build_libtool_libs=no\n\t    build_old_libs=yes\n\t  fi\n\telse\n\t  # Don't allow undefined symbols.\n\t  allow_undefined_flag=\"$no_undefined_flag\"\n\tfi\n\n      fi\n\n      func_generate_dlsyms \"$libname\" \"$libname\" \"yes\"\n      func_append libobjs \" $symfileobj\"\n      test \"X$libobjs\" = \"X \" && libobjs=\n\n      if test \"$opt_mode\" != relink; then\n\t# Remove our outputs, but don't remove object files since they\n\t# may have been created when compiling PIC objects.\n\tremovelist=\n\ttempremovelist=`$ECHO \"$output_objdir/*\"`\n\tfor p in $tempremovelist; do\n\t  case $p in\n\t    *.$objext | *.gcno)\n\t       ;;\n\t    $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*)\n\t       if test \"X$precious_files_regex\" != \"X\"; then\n\t\t if $ECHO \"$p\" | $EGREP -e \"$precious_files_regex\" >/dev/null 2>&1\n\t\t then\n\t\t   continue\n\t\t fi\n\t       fi\n\t       func_append removelist \" $p\"\n\t       ;;\n\t    *) ;;\n\t  esac\n\tdone\n\ttest -n \"$removelist\" && \\\n\t  func_show_eval \"${RM}r \\$removelist\"\n      fi\n\n      # Now set the variables for building old libraries.\n      if test \"$build_old_libs\" = yes && test \"$build_libtool_libs\" != convenience ; then\n\tfunc_append oldlibs \" $output_objdir/$libname.$libext\"\n\n\t# Transform .lo files to .o files.\n\toldobjs=\"$objs \"`$ECHO \"$libobjs\" | $SP2NL | $SED \"/\\.${libext}$/d; $lo2o\" | $NL2SP`\n      fi\n\n      # Eliminate all temporary directories.\n      #for path in $notinst_path; do\n      #\tlib_search_path=`$ECHO \"$lib_search_path \" | $SED \"s% $path % %g\"`\n      #\tdeplibs=`$ECHO \"$deplibs \" | $SED \"s% -L$path % %g\"`\n      #\tdependency_libs=`$ECHO \"$dependency_libs \" | $SED \"s% -L$path % %g\"`\n      #done\n\n      if test -n \"$xrpath\"; then\n\t# If the user specified any rpath flags, then add them.\n\ttemp_xrpath=\n\tfor libdir in $xrpath; do\n\t  func_replace_sysroot \"$libdir\"\n\t  func_append temp_xrpath \" -R$func_replace_sysroot_result\"\n\t  case \"$finalize_rpath \" in\n\t  *\" $libdir \"*) ;;\n\t  *) func_append finalize_rpath \" $libdir\" ;;\n\t  esac\n\tdone\n\tif test \"$hardcode_into_libs\" != yes || test \"$build_old_libs\" = yes; then\n\t  dependency_libs=\"$temp_xrpath $dependency_libs\"\n\tfi\n      fi\n\n      # Make sure dlfiles contains only unique files that won't be dlpreopened\n      old_dlfiles=\"$dlfiles\"\n      dlfiles=\n      for lib in $old_dlfiles; do\n\tcase \" $dlprefiles $dlfiles \" in\n\t*\" $lib \"*) ;;\n\t*) func_append dlfiles \" $lib\" ;;\n\tesac\n      done\n\n      # Make sure dlprefiles contains only unique files\n      old_dlprefiles=\"$dlprefiles\"\n      dlprefiles=\n      for lib in $old_dlprefiles; do\n\tcase \"$dlprefiles \" in\n\t*\" $lib \"*) ;;\n\t*) func_append dlprefiles \" $lib\" ;;\n\tesac\n      done\n\n      if test \"$build_libtool_libs\" = yes; then\n\tif test -n \"$rpath\"; then\n\t  case $host in\n\t  *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*)\n\t    # these systems don't actually have a c library (as such)!\n\t    ;;\n\t  *-*-rhapsody* | *-*-darwin1.[012])\n\t    # Rhapsody C library is in the System framework\n\t    func_append deplibs \" System.ltframework\"\n\t    ;;\n\t  *-*-netbsd*)\n\t    # Don't link with libc until the a.out ld.so is fixed.\n\t    ;;\n\t  *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)\n\t    # Do not include libc due to us having libc/libc_r.\n\t    ;;\n\t  *-*-sco3.2v5* | *-*-sco5v6*)\n\t    # Causes problems with __ctype\n\t    ;;\n\t  *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)\n\t    # Compiler inserts libc in the correct place for threads to work\n\t    ;;\n\t  *)\n\t    # Add libc to deplibs on all other systems if necessary.\n\t    if test \"$build_libtool_need_lc\" = \"yes\"; then\n\t      func_append deplibs \" -lc\"\n\t    fi\n\t    ;;\n\t  esac\n\tfi\n\n\t# Transform deplibs into only deplibs that can be linked in shared.\n\tname_save=$name\n\tlibname_save=$libname\n\trelease_save=$release\n\tversuffix_save=$versuffix\n\tmajor_save=$major\n\t# I'm not sure if I'm treating the release correctly.  I think\n\t# release should show up in the -l (ie -lgmp5) so we don't want to\n\t# add it in twice.  Is that correct?\n\trelease=\"\"\n\tversuffix=\"\"\n\tmajor=\"\"\n\tnewdeplibs=\n\tdroppeddeps=no\n\tcase $deplibs_check_method in\n\tpass_all)\n\t  # Don't check for shared/static.  Everything works.\n\t  # This might be a little naive.  We might want to check\n\t  # whether the library exists or not.  But this is on\n\t  # osf3 & osf4 and I'm not really sure... Just\n\t  # implementing what was already the behavior.\n\t  newdeplibs=$deplibs\n\t  ;;\n\ttest_compile)\n\t  # This code stresses the \"libraries are programs\" paradigm to its\n\t  # limits. Maybe even breaks it.  We compile a program, linking it\n\t  # against the deplibs as a proxy for the library.  Then we can check\n\t  # whether they linked in statically or dynamically with ldd.\n\t  $opt_dry_run || $RM conftest.c\n\t  cat > conftest.c <<EOF\n\t  int main() { return 0; }\nEOF\n\t  $opt_dry_run || $RM conftest\n\t  if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then\n\t    ldd_output=`ldd conftest`\n\t    for i in $deplibs; do\n\t      case $i in\n\t      -l*)\n\t\tfunc_stripname -l '' \"$i\"\n\t\tname=$func_stripname_result\n\t\tif test \"X$allow_libtool_libs_with_static_runtimes\" = \"Xyes\" ; then\n\t\t  case \" $predeps $postdeps \" in\n\t\t  *\" $i \"*)\n\t\t    func_append newdeplibs \" $i\"\n\t\t    i=\"\"\n\t\t    ;;\n\t\t  esac\n\t\tfi\n\t\tif test -n \"$i\" ; then\n\t\t  libname=`eval \"\\\\$ECHO \\\"$libname_spec\\\"\"`\n\t\t  deplib_matches=`eval \"\\\\$ECHO \\\"$library_names_spec\\\"\"`\n\t\t  set dummy $deplib_matches; shift\n\t\t  deplib_match=$1\n\t\t  if test `expr \"$ldd_output\" : \".*$deplib_match\"` -ne 0 ; then\n\t\t    func_append newdeplibs \" $i\"\n\t\t  else\n\t\t    droppeddeps=yes\n\t\t    echo\n\t\t    $ECHO \"*** Warning: dynamic linker does not accept needed library $i.\"\n\t\t    echo \"*** I have the capability to make that library automatically link in when\"\n\t\t    echo \"*** you link to this library.  But I can only do this if you have a\"\n\t\t    echo \"*** shared version of the library, which I believe you do not have\"\n\t\t    echo \"*** because a test_compile did reveal that the linker did not use it for\"\n\t\t    echo \"*** its dynamic dependency list that programs get resolved with at runtime.\"\n\t\t  fi\n\t\tfi\n\t\t;;\n\t      *)\n\t\tfunc_append newdeplibs \" $i\"\n\t\t;;\n\t      esac\n\t    done\n\t  else\n\t    # Error occurred in the first compile.  Let's try to salvage\n\t    # the situation: Compile a separate program for each library.\n\t    for i in $deplibs; do\n\t      case $i in\n\t      -l*)\n\t\tfunc_stripname -l '' \"$i\"\n\t\tname=$func_stripname_result\n\t\t$opt_dry_run || $RM conftest\n\t\tif $LTCC $LTCFLAGS -o conftest conftest.c $i; then\n\t\t  ldd_output=`ldd conftest`\n\t\t  if test \"X$allow_libtool_libs_with_static_runtimes\" = \"Xyes\" ; then\n\t\t    case \" $predeps $postdeps \" in\n\t\t    *\" $i \"*)\n\t\t      func_append newdeplibs \" $i\"\n\t\t      i=\"\"\n\t\t      ;;\n\t\t    esac\n\t\t  fi\n\t\t  if test -n \"$i\" ; then\n\t\t    libname=`eval \"\\\\$ECHO \\\"$libname_spec\\\"\"`\n\t\t    deplib_matches=`eval \"\\\\$ECHO \\\"$library_names_spec\\\"\"`\n\t\t    set dummy $deplib_matches; shift\n\t\t    deplib_match=$1\n\t\t    if test `expr \"$ldd_output\" : \".*$deplib_match\"` -ne 0 ; then\n\t\t      func_append newdeplibs \" $i\"\n\t\t    else\n\t\t      droppeddeps=yes\n\t\t      echo\n\t\t      $ECHO \"*** Warning: dynamic linker does not accept needed library $i.\"\n\t\t      echo \"*** I have the capability to make that library automatically link in when\"\n\t\t      echo \"*** you link to this library.  But I can only do this if you have a\"\n\t\t      echo \"*** shared version of the library, which you do not appear to have\"\n\t\t      echo \"*** because a test_compile did reveal that the linker did not use this one\"\n\t\t      echo \"*** as a dynamic dependency that programs can get resolved with at runtime.\"\n\t\t    fi\n\t\t  fi\n\t\telse\n\t\t  droppeddeps=yes\n\t\t  echo\n\t\t  $ECHO \"*** Warning!  Library $i is needed by this library but I was not able to\"\n\t\t  echo \"*** make it link in!  You will probably need to install it or some\"\n\t\t  echo \"*** library that it depends on before this library will be fully\"\n\t\t  echo \"*** functional.  Installing it before continuing would be even better.\"\n\t\tfi\n\t\t;;\n\t      *)\n\t\tfunc_append newdeplibs \" $i\"\n\t\t;;\n\t      esac\n\t    done\n\t  fi\n\t  ;;\n\tfile_magic*)\n\t  set dummy $deplibs_check_method; shift\n\t  file_magic_regex=`expr \"$deplibs_check_method\" : \"$1 \\(.*\\)\"`\n\t  for a_deplib in $deplibs; do\n\t    case $a_deplib in\n\t    -l*)\n\t      func_stripname -l '' \"$a_deplib\"\n\t      name=$func_stripname_result\n\t      if test \"X$allow_libtool_libs_with_static_runtimes\" = \"Xyes\" ; then\n\t\tcase \" $predeps $postdeps \" in\n\t\t*\" $a_deplib \"*)\n\t\t  func_append newdeplibs \" $a_deplib\"\n\t\t  a_deplib=\"\"\n\t\t  ;;\n\t\tesac\n\t      fi\n\t      if test -n \"$a_deplib\" ; then\n\t\tlibname=`eval \"\\\\$ECHO \\\"$libname_spec\\\"\"`\n\t\tif test -n \"$file_magic_glob\"; then\n\t\t  libnameglob=`func_echo_all \"$libname\" | $SED -e $file_magic_glob`\n\t\telse\n\t\t  libnameglob=$libname\n\t\tfi\n\t\ttest \"$want_nocaseglob\" = yes && nocaseglob=`shopt -p nocaseglob`\n\t\tfor i in $lib_search_path $sys_lib_search_path $shlib_search_path; do\n\t\t  if test \"$want_nocaseglob\" = yes; then\n\t\t    shopt -s nocaseglob\n\t\t    potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null`\n\t\t    $nocaseglob\n\t\t  else\n\t\t    potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null`\n\t\t  fi\n\t\t  for potent_lib in $potential_libs; do\n\t\t      # Follow soft links.\n\t\t      if ls -lLd \"$potent_lib\" 2>/dev/null |\n\t\t\t $GREP \" -> \" >/dev/null; then\n\t\t\tcontinue\n\t\t      fi\n\t\t      # The statement above tries to avoid entering an\n\t\t      # endless loop below, in case of cyclic links.\n\t\t      # We might still enter an endless loop, since a link\n\t\t      # loop can be closed while we follow links,\n\t\t      # but so what?\n\t\t      potlib=\"$potent_lib\"\n\t\t      while test -h \"$potlib\" 2>/dev/null; do\n\t\t\tpotliblink=`ls -ld $potlib | ${SED} 's/.* -> //'`\n\t\t\tcase $potliblink in\n\t\t\t[\\\\/]* | [A-Za-z]:[\\\\/]*) potlib=\"$potliblink\";;\n\t\t\t*) potlib=`$ECHO \"$potlib\" | $SED 's,[^/]*$,,'`\"$potliblink\";;\n\t\t\tesac\n\t\t      done\n\t\t      if eval $file_magic_cmd \\\"\\$potlib\\\" 2>/dev/null |\n\t\t\t $SED -e 10q |\n\t\t\t $EGREP \"$file_magic_regex\" > /dev/null; then\n\t\t\tfunc_append newdeplibs \" $a_deplib\"\n\t\t\ta_deplib=\"\"\n\t\t\tbreak 2\n\t\t      fi\n\t\t  done\n\t\tdone\n\t      fi\n\t      if test -n \"$a_deplib\" ; then\n\t\tdroppeddeps=yes\n\t\techo\n\t\t$ECHO \"*** Warning: linker path does not have real file for library $a_deplib.\"\n\t\techo \"*** I have the capability to make that library automatically link in when\"\n\t\techo \"*** you link to this library.  But I can only do this if you have a\"\n\t\techo \"*** shared version of the library, which you do not appear to have\"\n\t\techo \"*** because I did check the linker path looking for a file starting\"\n\t\tif test -z \"$potlib\" ; then\n\t\t  $ECHO \"*** with $libname but no candidates were found. (...for file magic test)\"\n\t\telse\n\t\t  $ECHO \"*** with $libname and none of the candidates passed a file format test\"\n\t\t  $ECHO \"*** using a file magic. Last file checked: $potlib\"\n\t\tfi\n\t      fi\n\t      ;;\n\t    *)\n\t      # Add a -L argument.\n\t      func_append newdeplibs \" $a_deplib\"\n\t      ;;\n\t    esac\n\t  done # Gone through all deplibs.\n\t  ;;\n\tmatch_pattern*)\n\t  set dummy $deplibs_check_method; shift\n\t  match_pattern_regex=`expr \"$deplibs_check_method\" : \"$1 \\(.*\\)\"`\n\t  for a_deplib in $deplibs; do\n\t    case $a_deplib in\n\t    -l*)\n\t      func_stripname -l '' \"$a_deplib\"\n\t      name=$func_stripname_result\n\t      if test \"X$allow_libtool_libs_with_static_runtimes\" = \"Xyes\" ; then\n\t\tcase \" $predeps $postdeps \" in\n\t\t*\" $a_deplib \"*)\n\t\t  func_append newdeplibs \" $a_deplib\"\n\t\t  a_deplib=\"\"\n\t\t  ;;\n\t\tesac\n\t      fi\n\t      if test -n \"$a_deplib\" ; then\n\t\tlibname=`eval \"\\\\$ECHO \\\"$libname_spec\\\"\"`\n\t\tfor i in $lib_search_path $sys_lib_search_path $shlib_search_path; do\n\t\t  potential_libs=`ls $i/$libname[.-]* 2>/dev/null`\n\t\t  for potent_lib in $potential_libs; do\n\t\t    potlib=\"$potent_lib\" # see symlink-check above in file_magic test\n\t\t    if eval \"\\$ECHO \\\"$potent_lib\\\"\" 2>/dev/null | $SED 10q | \\\n\t\t       $EGREP \"$match_pattern_regex\" > /dev/null; then\n\t\t      func_append newdeplibs \" $a_deplib\"\n\t\t      a_deplib=\"\"\n\t\t      break 2\n\t\t    fi\n\t\t  done\n\t\tdone\n\t      fi\n\t      if test -n \"$a_deplib\" ; then\n\t\tdroppeddeps=yes\n\t\techo\n\t\t$ECHO \"*** Warning: linker path does not have real file for library $a_deplib.\"\n\t\techo \"*** I have the capability to make that library automatically link in when\"\n\t\techo \"*** you link to this library.  But I can only do this if you have a\"\n\t\techo \"*** shared version of the library, which you do not appear to have\"\n\t\techo \"*** because I did check the linker path looking for a file starting\"\n\t\tif test -z \"$potlib\" ; then\n\t\t  $ECHO \"*** with $libname but no candidates were found. (...for regex pattern test)\"\n\t\telse\n\t\t  $ECHO \"*** with $libname and none of the candidates passed a file format test\"\n\t\t  $ECHO \"*** using a regex pattern. Last file checked: $potlib\"\n\t\tfi\n\t      fi\n\t      ;;\n\t    *)\n\t      # Add a -L argument.\n\t      func_append newdeplibs \" $a_deplib\"\n\t      ;;\n\t    esac\n\t  done # Gone through all deplibs.\n\t  ;;\n\tnone | unknown | *)\n\t  newdeplibs=\"\"\n\t  tmp_deplibs=`$ECHO \" $deplibs\" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'`\n\t  if test \"X$allow_libtool_libs_with_static_runtimes\" = \"Xyes\" ; then\n\t    for i in $predeps $postdeps ; do\n\t      # can't use Xsed below, because $i might contain '/'\n\t      tmp_deplibs=`$ECHO \" $tmp_deplibs\" | $SED \"s,$i,,\"`\n\t    done\n\t  fi\n\t  case $tmp_deplibs in\n\t  *[!\\\t\\ ]*)\n\t    echo\n\t    if test \"X$deplibs_check_method\" = \"Xnone\"; then\n\t      echo \"*** Warning: inter-library dependencies are not supported in this platform.\"\n\t    else\n\t      echo \"*** Warning: inter-library dependencies are not known to be supported.\"\n\t    fi\n\t    echo \"*** All declared inter-library dependencies are being dropped.\"\n\t    droppeddeps=yes\n\t    ;;\n\t  esac\n\t  ;;\n\tesac\n\tversuffix=$versuffix_save\n\tmajor=$major_save\n\trelease=$release_save\n\tlibname=$libname_save\n\tname=$name_save\n\n\tcase $host in\n\t*-*-rhapsody* | *-*-darwin1.[012])\n\t  # On Rhapsody replace the C library with the System framework\n\t  newdeplibs=`$ECHO \" $newdeplibs\" | $SED 's/ -lc / System.ltframework /'`\n\t  ;;\n\tesac\n\n\tif test \"$droppeddeps\" = yes; then\n\t  if test \"$module\" = yes; then\n\t    echo\n\t    echo \"*** Warning: libtool could not satisfy all declared inter-library\"\n\t    $ECHO \"*** dependencies of module $libname.  Therefore, libtool will create\"\n\t    echo \"*** a static module, that should work as long as the dlopening\"\n\t    echo \"*** application is linked with the -dlopen flag.\"\n\t    if test -z \"$global_symbol_pipe\"; then\n\t      echo\n\t      echo \"*** However, this would only work if libtool was able to extract symbol\"\n\t      echo \"*** lists from a program, using \\`nm' or equivalent, but libtool could\"\n\t      echo \"*** not find such a program.  So, this module is probably useless.\"\n\t      echo \"*** \\`nm' from GNU binutils and a full rebuild may help.\"\n\t    fi\n\t    if test \"$build_old_libs\" = no; then\n\t      oldlibs=\"$output_objdir/$libname.$libext\"\n\t      build_libtool_libs=module\n\t      build_old_libs=yes\n\t    else\n\t      build_libtool_libs=no\n\t    fi\n\t  else\n\t    echo \"*** The inter-library dependencies that have been dropped here will be\"\n\t    echo \"*** automatically added whenever a program is linked with this library\"\n\t    echo \"*** or is declared to -dlopen it.\"\n\n\t    if test \"$allow_undefined\" = no; then\n\t      echo\n\t      echo \"*** Since this library must not contain undefined symbols,\"\n\t      echo \"*** because either the platform does not support them or\"\n\t      echo \"*** it was explicitly requested with -no-undefined,\"\n\t      echo \"*** libtool will only create a static version of it.\"\n\t      if test \"$build_old_libs\" = no; then\n\t\toldlibs=\"$output_objdir/$libname.$libext\"\n\t\tbuild_libtool_libs=module\n\t\tbuild_old_libs=yes\n\t      else\n\t\tbuild_libtool_libs=no\n\t      fi\n\t    fi\n\t  fi\n\tfi\n\t# Done checking deplibs!\n\tdeplibs=$newdeplibs\n      fi\n      # Time to change all our \"foo.ltframework\" stuff back to \"-framework foo\"\n      case $host in\n\t*-*-darwin*)\n\t  newdeplibs=`$ECHO \" $newdeplibs\" | $SED 's% \\([^ $]*\\).ltframework% -framework \\1%g'`\n\t  new_inherited_linker_flags=`$ECHO \" $new_inherited_linker_flags\" | $SED 's% \\([^ $]*\\).ltframework% -framework \\1%g'`\n\t  deplibs=`$ECHO \" $deplibs\" | $SED 's% \\([^ $]*\\).ltframework% -framework \\1%g'`\n\t  ;;\n      esac\n\n      # move library search paths that coincide with paths to not yet\n      # installed libraries to the beginning of the library search list\n      new_libs=\n      for path in $notinst_path; do\n\tcase \" $new_libs \" in\n\t*\" -L$path/$objdir \"*) ;;\n\t*)\n\t  case \" $deplibs \" in\n\t  *\" -L$path/$objdir \"*)\n\t    func_append new_libs \" -L$path/$objdir\" ;;\n\t  esac\n\t  ;;\n\tesac\n      done\n      for deplib in $deplibs; do\n\tcase $deplib in\n\t-L*)\n\t  case \" $new_libs \" in\n\t  *\" $deplib \"*) ;;\n\t  *) func_append new_libs \" $deplib\" ;;\n\t  esac\n\t  ;;\n\t*) func_append new_libs \" $deplib\" ;;\n\tesac\n      done\n      deplibs=\"$new_libs\"\n\n      # All the library-specific variables (install_libdir is set above).\n      library_names=\n      old_library=\n      dlname=\n\n      # Test again, we may have decided not to build it any more\n      if test \"$build_libtool_libs\" = yes; then\n\t# Remove ${wl} instances when linking with ld.\n\t# FIXME: should test the right _cmds variable.\n\tcase $archive_cmds in\n\t  *\\$LD\\ *) wl= ;;\n        esac\n\tif test \"$hardcode_into_libs\" = yes; then\n\t  # Hardcode the library paths\n\t  hardcode_libdirs=\n\t  dep_rpath=\n\t  rpath=\"$finalize_rpath\"\n\t  test \"$opt_mode\" != relink && rpath=\"$compile_rpath$rpath\"\n\t  for libdir in $rpath; do\n\t    if test -n \"$hardcode_libdir_flag_spec\"; then\n\t      if test -n \"$hardcode_libdir_separator\"; then\n\t\tfunc_replace_sysroot \"$libdir\"\n\t\tlibdir=$func_replace_sysroot_result\n\t\tif test -z \"$hardcode_libdirs\"; then\n\t\t  hardcode_libdirs=\"$libdir\"\n\t\telse\n\t\t  # Just accumulate the unique libdirs.\n\t\t  case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in\n\t\t  *\"$hardcode_libdir_separator$libdir$hardcode_libdir_separator\"*)\n\t\t    ;;\n\t\t  *)\n\t\t    func_append hardcode_libdirs \"$hardcode_libdir_separator$libdir\"\n\t\t    ;;\n\t\t  esac\n\t\tfi\n\t      else\n\t\teval flag=\\\"$hardcode_libdir_flag_spec\\\"\n\t\tfunc_append dep_rpath \" $flag\"\n\t      fi\n\t    elif test -n \"$runpath_var\"; then\n\t      case \"$perm_rpath \" in\n\t      *\" $libdir \"*) ;;\n\t      *) func_append perm_rpath \" $libdir\" ;;\n\t      esac\n\t    fi\n\t  done\n\t  # Substitute the hardcoded libdirs into the rpath.\n\t  if test -n \"$hardcode_libdir_separator\" &&\n\t     test -n \"$hardcode_libdirs\"; then\n\t    libdir=\"$hardcode_libdirs\"\n\t    eval \"dep_rpath=\\\"$hardcode_libdir_flag_spec\\\"\"\n\t  fi\n\t  if test -n \"$runpath_var\" && test -n \"$perm_rpath\"; then\n\t    # We should set the runpath_var.\n\t    rpath=\n\t    for dir in $perm_rpath; do\n\t      func_append rpath \"$dir:\"\n\t    done\n\t    eval \"$runpath_var='$rpath\\$$runpath_var'; export $runpath_var\"\n\t  fi\n\t  test -n \"$dep_rpath\" && deplibs=\"$dep_rpath $deplibs\"\n\tfi\n\n\tshlibpath=\"$finalize_shlibpath\"\n\ttest \"$opt_mode\" != relink && shlibpath=\"$compile_shlibpath$shlibpath\"\n\tif test -n \"$shlibpath\"; then\n\t  eval \"$shlibpath_var='$shlibpath\\$$shlibpath_var'; export $shlibpath_var\"\n\tfi\n\n\t# Get the real and link names of the library.\n\teval shared_ext=\\\"$shrext_cmds\\\"\n\teval library_names=\\\"$library_names_spec\\\"\n\tset dummy $library_names\n\tshift\n\trealname=\"$1\"\n\tshift\n\n\tif test -n \"$soname_spec\"; then\n\t  eval soname=\\\"$soname_spec\\\"\n\telse\n\t  soname=\"$realname\"\n\tfi\n\tif test -z \"$dlname\"; then\n\t  dlname=$soname\n\tfi\n\n\tlib=\"$output_objdir/$realname\"\n\tlinknames=\n\tfor link\n\tdo\n\t  func_append linknames \" $link\"\n\tdone\n\n\t# Use standard objects if they are pic\n\ttest -z \"$pic_flag\" && libobjs=`$ECHO \"$libobjs\" | $SP2NL | $SED \"$lo2o\" | $NL2SP`\n\ttest \"X$libobjs\" = \"X \" && libobjs=\n\n\tdelfiles=\n\tif test -n \"$export_symbols\" && test -n \"$include_expsyms\"; then\n\t  $opt_dry_run || cp \"$export_symbols\" \"$output_objdir/$libname.uexp\"\n\t  export_symbols=\"$output_objdir/$libname.uexp\"\n\t  func_append delfiles \" $export_symbols\"\n\tfi\n\n\torig_export_symbols=\n\tcase $host_os in\n\tcygwin* | mingw* | cegcc*)\n\t  if test -n \"$export_symbols\" && test -z \"$export_symbols_regex\"; then\n\t    # exporting using user supplied symfile\n\t    if test \"x`$SED 1q $export_symbols`\" != xEXPORTS; then\n\t      # and it's NOT already a .def file. Must figure out\n\t      # which of the given symbols are data symbols and tag\n\t      # them as such. So, trigger use of export_symbols_cmds.\n\t      # export_symbols gets reassigned inside the \"prepare\n\t      # the list of exported symbols\" if statement, so the\n\t      # include_expsyms logic still works.\n\t      orig_export_symbols=\"$export_symbols\"\n\t      export_symbols=\n\t      always_export_symbols=yes\n\t    fi\n\t  fi\n\t  ;;\n\tesac\n\n\t# Prepare the list of exported symbols\n\tif test -z \"$export_symbols\"; then\n\t  if test \"$always_export_symbols\" = yes || test -n \"$export_symbols_regex\"; then\n\t    func_verbose \"generating symbol list for \\`$libname.la'\"\n\t    export_symbols=\"$output_objdir/$libname.exp\"\n\t    $opt_dry_run || $RM $export_symbols\n\t    cmds=$export_symbols_cmds\n\t    save_ifs=\"$IFS\"; IFS='~'\n\t    for cmd1 in $cmds; do\n\t      IFS=\"$save_ifs\"\n\t      # Take the normal branch if the nm_file_list_spec branch\n\t      # doesn't work or if tool conversion is not needed.\n\t      case $nm_file_list_spec~$to_tool_file_cmd in\n\t\t*~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*)\n\t\t  try_normal_branch=yes\n\t\t  eval cmd=\\\"$cmd1\\\"\n\t\t  func_len \" $cmd\"\n\t\t  len=$func_len_result\n\t\t  ;;\n\t\t*)\n\t\t  try_normal_branch=no\n\t\t  ;;\n\t      esac\n\t      if test \"$try_normal_branch\" = yes \\\n\t\t && { test \"$len\" -lt \"$max_cmd_len\" \\\n\t\t      || test \"$max_cmd_len\" -le -1; }\n\t      then\n\t\tfunc_show_eval \"$cmd\" 'exit $?'\n\t\tskipped_export=false\n\t      elif test -n \"$nm_file_list_spec\"; then\n\t\tfunc_basename \"$output\"\n\t\toutput_la=$func_basename_result\n\t\tsave_libobjs=$libobjs\n\t\tsave_output=$output\n\t\toutput=${output_objdir}/${output_la}.nm\n\t\tfunc_to_tool_file \"$output\"\n\t\tlibobjs=$nm_file_list_spec$func_to_tool_file_result\n\t\tfunc_append delfiles \" $output\"\n\t\tfunc_verbose \"creating $NM input file list: $output\"\n\t\tfor obj in $save_libobjs; do\n\t\t  func_to_tool_file \"$obj\"\n\t\t  $ECHO \"$func_to_tool_file_result\"\n\t\tdone > \"$output\"\n\t\teval cmd=\\\"$cmd1\\\"\n\t\tfunc_show_eval \"$cmd\" 'exit $?'\n\t\toutput=$save_output\n\t\tlibobjs=$save_libobjs\n\t\tskipped_export=false\n\t      else\n\t\t# The command line is too long to execute in one step.\n\t\tfunc_verbose \"using reloadable object file for export list...\"\n\t\tskipped_export=:\n\t\t# Break out early, otherwise skipped_export may be\n\t\t# set to false by a later but shorter cmd.\n\t\tbreak\n\t      fi\n\t    done\n\t    IFS=\"$save_ifs\"\n\t    if test -n \"$export_symbols_regex\" && test \"X$skipped_export\" != \"X:\"; then\n\t      func_show_eval '$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\"'\n\t      func_show_eval '$MV \"${export_symbols}T\" \"$export_symbols\"'\n\t    fi\n\t  fi\n\tfi\n\n\tif test -n \"$export_symbols\" && test -n \"$include_expsyms\"; then\n\t  tmp_export_symbols=\"$export_symbols\"\n\t  test -n \"$orig_export_symbols\" && tmp_export_symbols=\"$orig_export_symbols\"\n\t  $opt_dry_run || eval '$ECHO \"$include_expsyms\" | $SP2NL >> \"$tmp_export_symbols\"'\n\tfi\n\n\tif test \"X$skipped_export\" != \"X:\" && test -n \"$orig_export_symbols\"; then\n\t  # The given exports_symbols file has to be filtered, so filter it.\n\t  func_verbose \"filter symbol list for \\`$libname.la' to tag DATA exports\"\n\t  # FIXME: $output_objdir/$libname.filter potentially contains lots of\n\t  # 's' commands which not all seds can handle. GNU sed should be fine\n\t  # though. Also, the filter scales superlinearly with the number of\n\t  # global variables. join(1) would be nice here, but unfortunately\n\t  # isn't a blessed tool.\n\t  $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\\(.*\\)\\([ \\,].*\\),s|^\\1$|\\1\\2|,' < $export_symbols > $output_objdir/$libname.filter\n\t  func_append delfiles \" $export_symbols $output_objdir/$libname.filter\"\n\t  export_symbols=$output_objdir/$libname.def\n\t  $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols\n\tfi\n\n\ttmp_deplibs=\n\tfor test_deplib in $deplibs; do\n\t  case \" $convenience \" in\n\t  *\" $test_deplib \"*) ;;\n\t  *)\n\t    func_append tmp_deplibs \" $test_deplib\"\n\t    ;;\n\t  esac\n\tdone\n\tdeplibs=\"$tmp_deplibs\"\n\n\tif test -n \"$convenience\"; then\n\t  if test -n \"$whole_archive_flag_spec\" &&\n\t    test \"$compiler_needs_object\" = yes &&\n\t    test -z \"$libobjs\"; then\n\t    # extract the archives, so we have objects to list.\n\t    # TODO: could optimize this to just extract one archive.\n\t    whole_archive_flag_spec=\n\t  fi\n\t  if test -n \"$whole_archive_flag_spec\"; then\n\t    save_libobjs=$libobjs\n\t    eval libobjs=\\\"\\$libobjs $whole_archive_flag_spec\\\"\n\t    test \"X$libobjs\" = \"X \" && libobjs=\n\t  else\n\t    gentop=\"$output_objdir/${outputname}x\"\n\t    func_append generated \" $gentop\"\n\n\t    func_extract_archives $gentop $convenience\n\t    func_append libobjs \" $func_extract_archives_result\"\n\t    test \"X$libobjs\" = \"X \" && libobjs=\n\t  fi\n\tfi\n\n\tif test \"$thread_safe\" = yes && test -n \"$thread_safe_flag_spec\"; then\n\t  eval flag=\\\"$thread_safe_flag_spec\\\"\n\t  func_append linker_flags \" $flag\"\n\tfi\n\n\t# Make a backup of the uninstalled library when relinking\n\tif test \"$opt_mode\" = relink; then\n\t  $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $?\n\tfi\n\n\t# Do each of the archive commands.\n\tif test \"$module\" = yes && test -n \"$module_cmds\" ; then\n\t  if test -n \"$export_symbols\" && test -n \"$module_expsym_cmds\"; then\n\t    eval test_cmds=\\\"$module_expsym_cmds\\\"\n\t    cmds=$module_expsym_cmds\n\t  else\n\t    eval test_cmds=\\\"$module_cmds\\\"\n\t    cmds=$module_cmds\n\t  fi\n\telse\n\t  if test -n \"$export_symbols\" && test -n \"$archive_expsym_cmds\"; then\n\t    eval test_cmds=\\\"$archive_expsym_cmds\\\"\n\t    cmds=$archive_expsym_cmds\n\t  else\n\t    eval test_cmds=\\\"$archive_cmds\\\"\n\t    cmds=$archive_cmds\n\t  fi\n\tfi\n\n\tif test \"X$skipped_export\" != \"X:\" &&\n\t   func_len \" $test_cmds\" &&\n\t   len=$func_len_result &&\n\t   test \"$len\" -lt \"$max_cmd_len\" || test \"$max_cmd_len\" -le -1; then\n\t  :\n\telse\n\t  # The command line is too long to link in one step, link piecewise\n\t  # or, if using GNU ld and skipped_export is not :, use a linker\n\t  # script.\n\n\t  # Save the value of $output and $libobjs because we want to\n\t  # use them later.  If we have whole_archive_flag_spec, we\n\t  # want to use save_libobjs as it was before\n\t  # whole_archive_flag_spec was expanded, because we can't\n\t  # assume the linker understands whole_archive_flag_spec.\n\t  # This may have to be revisited, in case too many\n\t  # convenience libraries get linked in and end up exceeding\n\t  # the spec.\n\t  if test -z \"$convenience\" || test -z \"$whole_archive_flag_spec\"; then\n\t    save_libobjs=$libobjs\n\t  fi\n\t  save_output=$output\n\t  func_basename \"$output\"\n\t  output_la=$func_basename_result\n\n\t  # Clear the reloadable object creation command queue and\n\t  # initialize k to one.\n\t  test_cmds=\n\t  concat_cmds=\n\t  objlist=\n\t  last_robj=\n\t  k=1\n\n\t  if test -n \"$save_libobjs\" && test \"X$skipped_export\" != \"X:\" && test \"$with_gnu_ld\" = yes; then\n\t    output=${output_objdir}/${output_la}.lnkscript\n\t    func_verbose \"creating GNU ld script: $output\"\n\t    echo 'INPUT (' > $output\n\t    for obj in $save_libobjs\n\t    do\n\t      func_to_tool_file \"$obj\"\n\t      $ECHO \"$func_to_tool_file_result\" >> $output\n\t    done\n\t    echo ')' >> $output\n\t    func_append delfiles \" $output\"\n\t    func_to_tool_file \"$output\"\n\t    output=$func_to_tool_file_result\n\t  elif test -n \"$save_libobjs\" && test \"X$skipped_export\" != \"X:\" && test \"X$file_list_spec\" != X; then\n\t    output=${output_objdir}/${output_la}.lnk\n\t    func_verbose \"creating linker input file list: $output\"\n\t    : > $output\n\t    set x $save_libobjs\n\t    shift\n\t    firstobj=\n\t    if test \"$compiler_needs_object\" = yes; then\n\t      firstobj=\"$1 \"\n\t      shift\n\t    fi\n\t    for obj\n\t    do\n\t      func_to_tool_file \"$obj\"\n\t      $ECHO \"$func_to_tool_file_result\" >> $output\n\t    done\n\t    func_append delfiles \" $output\"\n\t    func_to_tool_file \"$output\"\n\t    output=$firstobj\\\"$file_list_spec$func_to_tool_file_result\\\"\n\t  else\n\t    if test -n \"$save_libobjs\"; then\n\t      func_verbose \"creating reloadable object files...\"\n\t      output=$output_objdir/$output_la-${k}.$objext\n\t      eval test_cmds=\\\"$reload_cmds\\\"\n\t      func_len \" $test_cmds\"\n\t      len0=$func_len_result\n\t      len=$len0\n\n\t      # Loop over the list of objects to be linked.\n\t      for obj in $save_libobjs\n\t      do\n\t\tfunc_len \" $obj\"\n\t\tfunc_arith $len + $func_len_result\n\t\tlen=$func_arith_result\n\t\tif test \"X$objlist\" = X ||\n\t\t   test \"$len\" -lt \"$max_cmd_len\"; then\n\t\t  func_append objlist \" $obj\"\n\t\telse\n\t\t  # The command $test_cmds is almost too long, add a\n\t\t  # command to the queue.\n\t\t  if test \"$k\" -eq 1 ; then\n\t\t    # The first file doesn't have a previous command to add.\n\t\t    reload_objs=$objlist\n\t\t    eval concat_cmds=\\\"$reload_cmds\\\"\n\t\t  else\n\t\t    # All subsequent reloadable object files will link in\n\t\t    # the last one created.\n\t\t    reload_objs=\"$objlist $last_robj\"\n\t\t    eval concat_cmds=\\\"\\$concat_cmds~$reload_cmds~\\$RM $last_robj\\\"\n\t\t  fi\n\t\t  last_robj=$output_objdir/$output_la-${k}.$objext\n\t\t  func_arith $k + 1\n\t\t  k=$func_arith_result\n\t\t  output=$output_objdir/$output_la-${k}.$objext\n\t\t  objlist=\" $obj\"\n\t\t  func_len \" $last_robj\"\n\t\t  func_arith $len0 + $func_len_result\n\t\t  len=$func_arith_result\n\t\tfi\n\t      done\n\t      # Handle the remaining objects by creating one last\n\t      # reloadable object file.  All subsequent reloadable object\n\t      # files will link in the last one created.\n\t      test -z \"$concat_cmds\" || concat_cmds=$concat_cmds~\n\t      reload_objs=\"$objlist $last_robj\"\n\t      eval concat_cmds=\\\"\\${concat_cmds}$reload_cmds\\\"\n\t      if test -n \"$last_robj\"; then\n\t        eval concat_cmds=\\\"\\${concat_cmds}~\\$RM $last_robj\\\"\n\t      fi\n\t      func_append delfiles \" $output\"\n\n\t    else\n\t      output=\n\t    fi\n\n\t    if ${skipped_export-false}; then\n\t      func_verbose \"generating symbol list for \\`$libname.la'\"\n\t      export_symbols=\"$output_objdir/$libname.exp\"\n\t      $opt_dry_run || $RM $export_symbols\n\t      libobjs=$output\n\t      # Append the command to create the export file.\n\t      test -z \"$concat_cmds\" || concat_cmds=$concat_cmds~\n\t      eval concat_cmds=\\\"\\$concat_cmds$export_symbols_cmds\\\"\n\t      if test -n \"$last_robj\"; then\n\t\teval concat_cmds=\\\"\\$concat_cmds~\\$RM $last_robj\\\"\n\t      fi\n\t    fi\n\n\t    test -n \"$save_libobjs\" &&\n\t      func_verbose \"creating a temporary reloadable object file: $output\"\n\n\t    # Loop through the commands generated above and execute them.\n\t    save_ifs=\"$IFS\"; IFS='~'\n\t    for cmd in $concat_cmds; do\n\t      IFS=\"$save_ifs\"\n\t      $opt_silent || {\n\t\t  func_quote_for_expand \"$cmd\"\n\t\t  eval \"func_echo $func_quote_for_expand_result\"\n\t      }\n\t      $opt_dry_run || eval \"$cmd\" || {\n\t\tlt_exit=$?\n\n\t\t# Restore the uninstalled library and exit\n\t\tif test \"$opt_mode\" = relink; then\n\t\t  ( cd \"$output_objdir\" && \\\n\t\t    $RM \"${realname}T\" && \\\n\t\t    $MV \"${realname}U\" \"$realname\" )\n\t\tfi\n\n\t\texit $lt_exit\n\t      }\n\t    done\n\t    IFS=\"$save_ifs\"\n\n\t    if test -n \"$export_symbols_regex\" && ${skipped_export-false}; then\n\t      func_show_eval '$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\"'\n\t      func_show_eval '$MV \"${export_symbols}T\" \"$export_symbols\"'\n\t    fi\n\t  fi\n\n          if ${skipped_export-false}; then\n\t    if test -n \"$export_symbols\" && test -n \"$include_expsyms\"; then\n\t      tmp_export_symbols=\"$export_symbols\"\n\t      test -n \"$orig_export_symbols\" && tmp_export_symbols=\"$orig_export_symbols\"\n\t      $opt_dry_run || eval '$ECHO \"$include_expsyms\" | $SP2NL >> \"$tmp_export_symbols\"'\n\t    fi\n\n\t    if test -n \"$orig_export_symbols\"; then\n\t      # The given exports_symbols file has to be filtered, so filter it.\n\t      func_verbose \"filter symbol list for \\`$libname.la' to tag DATA exports\"\n\t      # FIXME: $output_objdir/$libname.filter potentially contains lots of\n\t      # 's' commands which not all seds can handle. GNU sed should be fine\n\t      # though. Also, the filter scales superlinearly with the number of\n\t      # global variables. join(1) would be nice here, but unfortunately\n\t      # isn't a blessed tool.\n\t      $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\\(.*\\)\\([ \\,].*\\),s|^\\1$|\\1\\2|,' < $export_symbols > $output_objdir/$libname.filter\n\t      func_append delfiles \" $export_symbols $output_objdir/$libname.filter\"\n\t      export_symbols=$output_objdir/$libname.def\n\t      $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols\n\t    fi\n\t  fi\n\n\t  libobjs=$output\n\t  # Restore the value of output.\n\t  output=$save_output\n\n\t  if test -n \"$convenience\" && test -n \"$whole_archive_flag_spec\"; then\n\t    eval libobjs=\\\"\\$libobjs $whole_archive_flag_spec\\\"\n\t    test \"X$libobjs\" = \"X \" && libobjs=\n\t  fi\n\t  # Expand the library linking commands again to reset the\n\t  # value of $libobjs for piecewise linking.\n\n\t  # Do each of the archive commands.\n\t  if test \"$module\" = yes && test -n \"$module_cmds\" ; then\n\t    if test -n \"$export_symbols\" && test -n \"$module_expsym_cmds\"; then\n\t      cmds=$module_expsym_cmds\n\t    else\n\t      cmds=$module_cmds\n\t    fi\n\t  else\n\t    if test -n \"$export_symbols\" && test -n \"$archive_expsym_cmds\"; then\n\t      cmds=$archive_expsym_cmds\n\t    else\n\t      cmds=$archive_cmds\n\t    fi\n\t  fi\n\tfi\n\n\tif test -n \"$delfiles\"; then\n\t  # Append the command to remove temporary files to $cmds.\n\t  eval cmds=\\\"\\$cmds~\\$RM $delfiles\\\"\n\tfi\n\n\t# Add any objects from preloaded convenience libraries\n\tif test -n \"$dlprefiles\"; then\n\t  gentop=\"$output_objdir/${outputname}x\"\n\t  func_append generated \" $gentop\"\n\n\t  func_extract_archives $gentop $dlprefiles\n\t  func_append libobjs \" $func_extract_archives_result\"\n\t  test \"X$libobjs\" = \"X \" && libobjs=\n\tfi\n\n\tsave_ifs=\"$IFS\"; IFS='~'\n\tfor cmd in $cmds; do\n\t  IFS=\"$save_ifs\"\n\t  eval cmd=\\\"$cmd\\\"\n\t  $opt_silent || {\n\t    func_quote_for_expand \"$cmd\"\n\t    eval \"func_echo $func_quote_for_expand_result\"\n\t  }\n\t  $opt_dry_run || eval \"$cmd\" || {\n\t    lt_exit=$?\n\n\t    # Restore the uninstalled library and exit\n\t    if test \"$opt_mode\" = relink; then\n\t      ( cd \"$output_objdir\" && \\\n\t        $RM \"${realname}T\" && \\\n\t\t$MV \"${realname}U\" \"$realname\" )\n\t    fi\n\n\t    exit $lt_exit\n\t  }\n\tdone\n\tIFS=\"$save_ifs\"\n\n\t# Restore the uninstalled library and exit\n\tif test \"$opt_mode\" = relink; then\n\t  $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $?\n\n\t  if test -n \"$convenience\"; then\n\t    if test -z \"$whole_archive_flag_spec\"; then\n\t      func_show_eval '${RM}r \"$gentop\"'\n\t    fi\n\t  fi\n\n\t  exit $EXIT_SUCCESS\n\tfi\n\n\t# Create links to the real library.\n\tfor linkname in $linknames; do\n\t  if test \"$realname\" != \"$linkname\"; then\n\t    func_show_eval '(cd \"$output_objdir\" && $RM \"$linkname\" && $LN_S \"$realname\" \"$linkname\")' 'exit $?'\n\t  fi\n\tdone\n\n\t# If -module or -export-dynamic was specified, set the dlname.\n\tif test \"$module\" = yes || test \"$export_dynamic\" = yes; then\n\t  # On all known operating systems, these are identical.\n\t  dlname=\"$soname\"\n\tfi\n      fi\n      ;;\n\n    obj)\n      if test -n \"$dlfiles$dlprefiles\" || test \"$dlself\" != no; then\n\tfunc_warning \"\\`-dlopen' is ignored for objects\"\n      fi\n\n      case \" $deplibs\" in\n      *\\ -l* | *\\ -L*)\n\tfunc_warning \"\\`-l' and \\`-L' are ignored for objects\" ;;\n      esac\n\n      test -n \"$rpath\" && \\\n\tfunc_warning \"\\`-rpath' is ignored for objects\"\n\n      test -n \"$xrpath\" && \\\n\tfunc_warning \"\\`-R' is ignored for objects\"\n\n      test -n \"$vinfo\" && \\\n\tfunc_warning \"\\`-version-info' is ignored for objects\"\n\n      test -n \"$release\" && \\\n\tfunc_warning \"\\`-release' is ignored for objects\"\n\n      case $output in\n      *.lo)\n\ttest -n \"$objs$old_deplibs\" && \\\n\t  func_fatal_error \"cannot build library object \\`$output' from non-libtool objects\"\n\n\tlibobj=$output\n\tfunc_lo2o \"$libobj\"\n\tobj=$func_lo2o_result\n\t;;\n      *)\n\tlibobj=\n\tobj=\"$output\"\n\t;;\n      esac\n\n      # Delete the old objects.\n      $opt_dry_run || $RM $obj $libobj\n\n      # Objects from convenience libraries.  This assumes\n      # single-version convenience libraries.  Whenever we create\n      # different ones for PIC/non-PIC, this we'll have to duplicate\n      # the extraction.\n      reload_conv_objs=\n      gentop=\n      # reload_cmds runs $LD directly, so let us get rid of\n      # -Wl from whole_archive_flag_spec and hope we can get by with\n      # turning comma into space..\n      wl=\n\n      if test -n \"$convenience\"; then\n\tif test -n \"$whole_archive_flag_spec\"; then\n\t  eval tmp_whole_archive_flags=\\\"$whole_archive_flag_spec\\\"\n\t  reload_conv_objs=$reload_objs\\ `$ECHO \"$tmp_whole_archive_flags\" | $SED 's|,| |g'`\n\telse\n\t  gentop=\"$output_objdir/${obj}x\"\n\t  func_append generated \" $gentop\"\n\n\t  func_extract_archives $gentop $convenience\n\t  reload_conv_objs=\"$reload_objs $func_extract_archives_result\"\n\tfi\n      fi\n\n      # If we're not building shared, we need to use non_pic_objs\n      test \"$build_libtool_libs\" != yes && libobjs=\"$non_pic_objects\"\n\n      # Create the old-style object.\n      reload_objs=\"$objs$old_deplibs \"`$ECHO \"$libobjs\" | $SP2NL | $SED \"/\\.${libext}$/d; /\\.lib$/d; $lo2o\" | $NL2SP`\" $reload_conv_objs\" ### testsuite: skip nested quoting test\n\n      output=\"$obj\"\n      func_execute_cmds \"$reload_cmds\" 'exit $?'\n\n      # Exit if we aren't doing a library object file.\n      if test -z \"$libobj\"; then\n\tif test -n \"$gentop\"; then\n\t  func_show_eval '${RM}r \"$gentop\"'\n\tfi\n\n\texit $EXIT_SUCCESS\n      fi\n\n      if test \"$build_libtool_libs\" != yes; then\n\tif test -n \"$gentop\"; then\n\t  func_show_eval '${RM}r \"$gentop\"'\n\tfi\n\n\t# Create an invalid libtool object if no PIC, so that we don't\n\t# accidentally link it into a program.\n\t# $show \"echo timestamp > $libobj\"\n\t# $opt_dry_run || eval \"echo timestamp > $libobj\" || exit $?\n\texit $EXIT_SUCCESS\n      fi\n\n      if test -n \"$pic_flag\" || test \"$pic_mode\" != default; then\n\t# Only do commands if we really have different PIC objects.\n\treload_objs=\"$libobjs $reload_conv_objs\"\n\toutput=\"$libobj\"\n\tfunc_execute_cmds \"$reload_cmds\" 'exit $?'\n      fi\n\n      if test -n \"$gentop\"; then\n\tfunc_show_eval '${RM}r \"$gentop\"'\n      fi\n\n      exit $EXIT_SUCCESS\n      ;;\n\n    prog)\n      case $host in\n\t*cygwin*) func_stripname '' '.exe' \"$output\"\n\t          output=$func_stripname_result.exe;;\n      esac\n      test -n \"$vinfo\" && \\\n\tfunc_warning \"\\`-version-info' is ignored for programs\"\n\n      test -n \"$release\" && \\\n\tfunc_warning \"\\`-release' is ignored for programs\"\n\n      test \"$preload\" = yes \\\n        && test \"$dlopen_support\" = unknown \\\n\t&& test \"$dlopen_self\" = unknown \\\n\t&& test \"$dlopen_self_static\" = unknown && \\\n\t  func_warning \"\\`LT_INIT([dlopen])' not used. Assuming no dlopen support.\"\n\n      case $host in\n      *-*-rhapsody* | *-*-darwin1.[012])\n\t# On Rhapsody replace the C library is the System framework\n\tcompile_deplibs=`$ECHO \" $compile_deplibs\" | $SED 's/ -lc / System.ltframework /'`\n\tfinalize_deplibs=`$ECHO \" $finalize_deplibs\" | $SED 's/ -lc / System.ltframework /'`\n\t;;\n      esac\n\n      case $host in\n      *-*-darwin*)\n\t# Don't allow lazy linking, it breaks C++ global constructors\n\t# But is supposedly fixed on 10.4 or later (yay!).\n\tif test \"$tagname\" = CXX ; then\n\t  case ${MACOSX_DEPLOYMENT_TARGET-10.0} in\n\t    10.[0123])\n\t      func_append compile_command \" ${wl}-bind_at_load\"\n\t      func_append finalize_command \" ${wl}-bind_at_load\"\n\t    ;;\n\t  esac\n\tfi\n\t# Time to change all our \"foo.ltframework\" stuff back to \"-framework foo\"\n\tcompile_deplibs=`$ECHO \" $compile_deplibs\" | $SED 's% \\([^ $]*\\).ltframework% -framework \\1%g'`\n\tfinalize_deplibs=`$ECHO \" $finalize_deplibs\" | $SED 's% \\([^ $]*\\).ltframework% -framework \\1%g'`\n\t;;\n      esac\n\n\n      # move library search paths that coincide with paths to not yet\n      # installed libraries to the beginning of the library search list\n      new_libs=\n      for path in $notinst_path; do\n\tcase \" $new_libs \" in\n\t*\" -L$path/$objdir \"*) ;;\n\t*)\n\t  case \" $compile_deplibs \" in\n\t  *\" -L$path/$objdir \"*)\n\t    func_append new_libs \" -L$path/$objdir\" ;;\n\t  esac\n\t  ;;\n\tesac\n      done\n      for deplib in $compile_deplibs; do\n\tcase $deplib in\n\t-L*)\n\t  case \" $new_libs \" in\n\t  *\" $deplib \"*) ;;\n\t  *) func_append new_libs \" $deplib\" ;;\n\t  esac\n\t  ;;\n\t*) func_append new_libs \" $deplib\" ;;\n\tesac\n      done\n      compile_deplibs=\"$new_libs\"\n\n\n      func_append compile_command \" $compile_deplibs\"\n      func_append finalize_command \" $finalize_deplibs\"\n\n      if test -n \"$rpath$xrpath\"; then\n\t# If the user specified any rpath flags, then add them.\n\tfor libdir in $rpath $xrpath; do\n\t  # This is the magic to use -rpath.\n\t  case \"$finalize_rpath \" in\n\t  *\" $libdir \"*) ;;\n\t  *) func_append finalize_rpath \" $libdir\" ;;\n\t  esac\n\tdone\n      fi\n\n      # Now hardcode the library paths\n      rpath=\n      hardcode_libdirs=\n      for libdir in $compile_rpath $finalize_rpath; do\n\tif test -n \"$hardcode_libdir_flag_spec\"; then\n\t  if test -n \"$hardcode_libdir_separator\"; then\n\t    if test -z \"$hardcode_libdirs\"; then\n\t      hardcode_libdirs=\"$libdir\"\n\t    else\n\t      # Just accumulate the unique libdirs.\n\t      case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in\n\t      *\"$hardcode_libdir_separator$libdir$hardcode_libdir_separator\"*)\n\t\t;;\n\t      *)\n\t\tfunc_append hardcode_libdirs \"$hardcode_libdir_separator$libdir\"\n\t\t;;\n\t      esac\n\t    fi\n\t  else\n\t    eval flag=\\\"$hardcode_libdir_flag_spec\\\"\n\t    func_append rpath \" $flag\"\n\t  fi\n\telif test -n \"$runpath_var\"; then\n\t  case \"$perm_rpath \" in\n\t  *\" $libdir \"*) ;;\n\t  *) func_append perm_rpath \" $libdir\" ;;\n\t  esac\n\tfi\n\tcase $host in\n\t*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)\n\t  testbindir=`${ECHO} \"$libdir\" | ${SED} -e 's*/lib$*/bin*'`\n\t  case :$dllsearchpath: in\n\t  *\":$libdir:\"*) ;;\n\t  ::) dllsearchpath=$libdir;;\n\t  *) func_append dllsearchpath \":$libdir\";;\n\t  esac\n\t  case :$dllsearchpath: in\n\t  *\":$testbindir:\"*) ;;\n\t  ::) dllsearchpath=$testbindir;;\n\t  *) func_append dllsearchpath \":$testbindir\";;\n\t  esac\n\t  ;;\n\tesac\n      done\n      # Substitute the hardcoded libdirs into the rpath.\n      if test -n \"$hardcode_libdir_separator\" &&\n\t test -n \"$hardcode_libdirs\"; then\n\tlibdir=\"$hardcode_libdirs\"\n\teval rpath=\\\" $hardcode_libdir_flag_spec\\\"\n      fi\n      compile_rpath=\"$rpath\"\n\n      rpath=\n      hardcode_libdirs=\n      for libdir in $finalize_rpath; do\n\tif test -n \"$hardcode_libdir_flag_spec\"; then\n\t  if test -n \"$hardcode_libdir_separator\"; then\n\t    if test -z \"$hardcode_libdirs\"; then\n\t      hardcode_libdirs=\"$libdir\"\n\t    else\n\t      # Just accumulate the unique libdirs.\n\t      case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in\n\t      *\"$hardcode_libdir_separator$libdir$hardcode_libdir_separator\"*)\n\t\t;;\n\t      *)\n\t\tfunc_append hardcode_libdirs \"$hardcode_libdir_separator$libdir\"\n\t\t;;\n\t      esac\n\t    fi\n\t  else\n\t    eval flag=\\\"$hardcode_libdir_flag_spec\\\"\n\t    func_append rpath \" $flag\"\n\t  fi\n\telif test -n \"$runpath_var\"; then\n\t  case \"$finalize_perm_rpath \" in\n\t  *\" $libdir \"*) ;;\n\t  *) func_append finalize_perm_rpath \" $libdir\" ;;\n\t  esac\n\tfi\n      done\n      # Substitute the hardcoded libdirs into the rpath.\n      if test -n \"$hardcode_libdir_separator\" &&\n\t test -n \"$hardcode_libdirs\"; then\n\tlibdir=\"$hardcode_libdirs\"\n\teval rpath=\\\" $hardcode_libdir_flag_spec\\\"\n      fi\n      finalize_rpath=\"$rpath\"\n\n      if test -n \"$libobjs\" && test \"$build_old_libs\" = yes; then\n\t# Transform all the library objects into standard objects.\n\tcompile_command=`$ECHO \"$compile_command\" | $SP2NL | $SED \"$lo2o\" | $NL2SP`\n\tfinalize_command=`$ECHO \"$finalize_command\" | $SP2NL | $SED \"$lo2o\" | $NL2SP`\n      fi\n\n      func_generate_dlsyms \"$outputname\" \"@PROGRAM@\" \"no\"\n\n      # template prelinking step\n      if test -n \"$prelink_cmds\"; then\n\tfunc_execute_cmds \"$prelink_cmds\" 'exit $?'\n      fi\n\n      wrappers_required=yes\n      case $host in\n      *cegcc* | *mingw32ce*)\n        # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway.\n        wrappers_required=no\n        ;;\n      *cygwin* | *mingw* )\n        if test \"$build_libtool_libs\" != yes; then\n          wrappers_required=no\n        fi\n        ;;\n      *)\n        if test \"$need_relink\" = no || test \"$build_libtool_libs\" != yes; then\n          wrappers_required=no\n        fi\n        ;;\n      esac\n      if test \"$wrappers_required\" = no; then\n\t# Replace the output file specification.\n\tcompile_command=`$ECHO \"$compile_command\" | $SED 's%@OUTPUT@%'\"$output\"'%g'`\n\tlink_command=\"$compile_command$compile_rpath\"\n\n\t# We have no uninstalled library dependencies, so finalize right now.\n\texit_status=0\n\tfunc_show_eval \"$link_command\" 'exit_status=$?'\n\n\tif test -n \"$postlink_cmds\"; then\n\t  func_to_tool_file \"$output\"\n\t  postlink_cmds=`func_echo_all \"$postlink_cmds\" | $SED -e 's%@OUTPUT@%'\"$output\"'%g' -e 's%@TOOL_OUTPUT@%'\"$func_to_tool_file_result\"'%g'`\n\t  func_execute_cmds \"$postlink_cmds\" 'exit $?'\n\tfi\n\n\t# Delete the generated files.\n\tif test -f \"$output_objdir/${outputname}S.${objext}\"; then\n\t  func_show_eval '$RM \"$output_objdir/${outputname}S.${objext}\"'\n\tfi\n\n\texit $exit_status\n      fi\n\n      if test -n \"$compile_shlibpath$finalize_shlibpath\"; then\n\tcompile_command=\"$shlibpath_var=\\\"$compile_shlibpath$finalize_shlibpath\\$$shlibpath_var\\\" $compile_command\"\n      fi\n      if test -n \"$finalize_shlibpath\"; then\n\tfinalize_command=\"$shlibpath_var=\\\"$finalize_shlibpath\\$$shlibpath_var\\\" $finalize_command\"\n      fi\n\n      compile_var=\n      finalize_var=\n      if test -n \"$runpath_var\"; then\n\tif test -n \"$perm_rpath\"; then\n\t  # We should set the runpath_var.\n\t  rpath=\n\t  for dir in $perm_rpath; do\n\t    func_append rpath \"$dir:\"\n\t  done\n\t  compile_var=\"$runpath_var=\\\"$rpath\\$$runpath_var\\\" \"\n\tfi\n\tif test -n \"$finalize_perm_rpath\"; then\n\t  # We should set the runpath_var.\n\t  rpath=\n\t  for dir in $finalize_perm_rpath; do\n\t    func_append rpath \"$dir:\"\n\t  done\n\t  finalize_var=\"$runpath_var=\\\"$rpath\\$$runpath_var\\\" \"\n\tfi\n      fi\n\n      if test \"$no_install\" = yes; then\n\t# We don't need to create a wrapper script.\n\tlink_command=\"$compile_var$compile_command$compile_rpath\"\n\t# Replace the output file specification.\n\tlink_command=`$ECHO \"$link_command\" | $SED 's%@OUTPUT@%'\"$output\"'%g'`\n\t# Delete the old output file.\n\t$opt_dry_run || $RM $output\n\t# Link the executable and exit\n\tfunc_show_eval \"$link_command\" 'exit $?'\n\n\tif test -n \"$postlink_cmds\"; then\n\t  func_to_tool_file \"$output\"\n\t  postlink_cmds=`func_echo_all \"$postlink_cmds\" | $SED -e 's%@OUTPUT@%'\"$output\"'%g' -e 's%@TOOL_OUTPUT@%'\"$func_to_tool_file_result\"'%g'`\n\t  func_execute_cmds \"$postlink_cmds\" 'exit $?'\n\tfi\n\n\texit $EXIT_SUCCESS\n      fi\n\n      if test \"$hardcode_action\" = relink; then\n\t# Fast installation is not supported\n\tlink_command=\"$compile_var$compile_command$compile_rpath\"\n\trelink_command=\"$finalize_var$finalize_command$finalize_rpath\"\n\n\tfunc_warning \"this platform does not like uninstalled shared libraries\"\n\tfunc_warning \"\\`$output' will be relinked during installation\"\n      else\n\tif test \"$fast_install\" != no; then\n\t  link_command=\"$finalize_var$compile_command$finalize_rpath\"\n\t  if test \"$fast_install\" = yes; then\n\t    relink_command=`$ECHO \"$compile_var$compile_command$compile_rpath\" | $SED 's%@OUTPUT@%\\$progdir/\\$file%g'`\n\t  else\n\t    # fast_install is set to needless\n\t    relink_command=\n\t  fi\n\telse\n\t  link_command=\"$compile_var$compile_command$compile_rpath\"\n\t  relink_command=\"$finalize_var$finalize_command$finalize_rpath\"\n\tfi\n      fi\n\n      # Replace the output file specification.\n      link_command=`$ECHO \"$link_command\" | $SED 's%@OUTPUT@%'\"$output_objdir/$outputname\"'%g'`\n\n      # Delete the old output files.\n      $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname\n\n      func_show_eval \"$link_command\" 'exit $?'\n\n      if test -n \"$postlink_cmds\"; then\n\tfunc_to_tool_file \"$output_objdir/$outputname\"\n\tpostlink_cmds=`func_echo_all \"$postlink_cmds\" | $SED -e 's%@OUTPUT@%'\"$output_objdir/$outputname\"'%g' -e 's%@TOOL_OUTPUT@%'\"$func_to_tool_file_result\"'%g'`\n\tfunc_execute_cmds \"$postlink_cmds\" 'exit $?'\n      fi\n\n      # Now create the wrapper script.\n      func_verbose \"creating $output\"\n\n      # Quote the relink command for shipping.\n      if test -n \"$relink_command\"; then\n\t# Preserve any variables that may affect compiler behavior\n\tfor var in $variables_saved_for_relink; do\n\t  if eval test -z \\\"\\${$var+set}\\\"; then\n\t    relink_command=\"{ test -z \\\"\\${$var+set}\\\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command\"\n\t  elif eval var_value=\\$$var; test -z \"$var_value\"; then\n\t    relink_command=\"$var=; export $var; $relink_command\"\n\t  else\n\t    func_quote_for_eval \"$var_value\"\n\t    relink_command=\"$var=$func_quote_for_eval_result; export $var; $relink_command\"\n\t  fi\n\tdone\n\trelink_command=\"(cd `pwd`; $relink_command)\"\n\trelink_command=`$ECHO \"$relink_command\" | $SED \"$sed_quote_subst\"`\n      fi\n\n      # Only actually do things if not in dry run mode.\n      $opt_dry_run || {\n\t# win32 will think the script is a binary if it has\n\t# a .exe suffix, so we strip it off here.\n\tcase $output in\n\t  *.exe) func_stripname '' '.exe' \"$output\"\n\t         output=$func_stripname_result ;;\n\tesac\n\t# test for cygwin because mv fails w/o .exe extensions\n\tcase $host in\n\t  *cygwin*)\n\t    exeext=.exe\n\t    func_stripname '' '.exe' \"$outputname\"\n\t    outputname=$func_stripname_result ;;\n\t  *) exeext= ;;\n\tesac\n\tcase $host in\n\t  *cygwin* | *mingw* )\n\t    func_dirname_and_basename \"$output\" \"\" \".\"\n\t    output_name=$func_basename_result\n\t    output_path=$func_dirname_result\n\t    cwrappersource=\"$output_path/$objdir/lt-$output_name.c\"\n\t    cwrapper=\"$output_path/$output_name.exe\"\n\t    $RM $cwrappersource $cwrapper\n\t    trap \"$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE\" 1 2 15\n\n\t    func_emit_cwrapperexe_src > $cwrappersource\n\n\t    # The wrapper executable is built using the $host compiler,\n\t    # because it contains $host paths and files. If cross-\n\t    # compiling, it, like the target executable, must be\n\t    # executed on the $host or under an emulation environment.\n\t    $opt_dry_run || {\n\t      $LTCC $LTCFLAGS -o $cwrapper $cwrappersource\n\t      $STRIP $cwrapper\n\t    }\n\n\t    # Now, create the wrapper script for func_source use:\n\t    func_ltwrapper_scriptname $cwrapper\n\t    $RM $func_ltwrapper_scriptname_result\n\t    trap \"$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE\" 1 2 15\n\t    $opt_dry_run || {\n\t      # note: this script will not be executed, so do not chmod.\n\t      if test \"x$build\" = \"x$host\" ; then\n\t\t$cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result\n\t      else\n\t\tfunc_emit_wrapper no > $func_ltwrapper_scriptname_result\n\t      fi\n\t    }\n\t  ;;\n\t  * )\n\t    $RM $output\n\t    trap \"$RM $output; exit $EXIT_FAILURE\" 1 2 15\n\n\t    func_emit_wrapper no > $output\n\t    chmod +x $output\n\t  ;;\n\tesac\n      }\n      exit $EXIT_SUCCESS\n      ;;\n    esac\n\n    # See if we need to build an old-fashioned archive.\n    for oldlib in $oldlibs; do\n\n      if test \"$build_libtool_libs\" = convenience; then\n\toldobjs=\"$libobjs_save $symfileobj\"\n\taddlibs=\"$convenience\"\n\tbuild_libtool_libs=no\n      else\n\tif test \"$build_libtool_libs\" = module; then\n\t  oldobjs=\"$libobjs_save\"\n\t  build_libtool_libs=no\n\telse\n\t  oldobjs=\"$old_deplibs $non_pic_objects\"\n\t  if test \"$preload\" = yes && test -f \"$symfileobj\"; then\n\t    func_append oldobjs \" $symfileobj\"\n\t  fi\n\tfi\n\taddlibs=\"$old_convenience\"\n      fi\n\n      if test -n \"$addlibs\"; then\n\tgentop=\"$output_objdir/${outputname}x\"\n\tfunc_append generated \" $gentop\"\n\n\tfunc_extract_archives $gentop $addlibs\n\tfunc_append oldobjs \" $func_extract_archives_result\"\n      fi\n\n      # Do each command in the archive commands.\n      if test -n \"$old_archive_from_new_cmds\" && test \"$build_libtool_libs\" = yes; then\n\tcmds=$old_archive_from_new_cmds\n      else\n\n\t# Add any objects from preloaded convenience libraries\n\tif test -n \"$dlprefiles\"; then\n\t  gentop=\"$output_objdir/${outputname}x\"\n\t  func_append generated \" $gentop\"\n\n\t  func_extract_archives $gentop $dlprefiles\n\t  func_append oldobjs \" $func_extract_archives_result\"\n\tfi\n\n\t# POSIX demands no paths to be encoded in archives.  We have\n\t# to avoid creating archives with duplicate basenames if we\n\t# might have to extract them afterwards, e.g., when creating a\n\t# static archive out of a convenience library, or when linking\n\t# the entirety of a libtool archive into another (currently\n\t# not supported by libtool).\n\tif (for obj in $oldobjs\n\t    do\n\t      func_basename \"$obj\"\n\t      $ECHO \"$func_basename_result\"\n\t    done | sort | sort -uc >/dev/null 2>&1); then\n\t  :\n\telse\n\t  echo \"copying selected object files to avoid basename conflicts...\"\n\t  gentop=\"$output_objdir/${outputname}x\"\n\t  func_append generated \" $gentop\"\n\t  func_mkdir_p \"$gentop\"\n\t  save_oldobjs=$oldobjs\n\t  oldobjs=\n\t  counter=1\n\t  for obj in $save_oldobjs\n\t  do\n\t    func_basename \"$obj\"\n\t    objbase=\"$func_basename_result\"\n\t    case \" $oldobjs \" in\n\t    \" \") oldobjs=$obj ;;\n\t    *[\\ /]\"$objbase \"*)\n\t      while :; do\n\t\t# Make sure we don't pick an alternate name that also\n\t\t# overlaps.\n\t\tnewobj=lt$counter-$objbase\n\t\tfunc_arith $counter + 1\n\t\tcounter=$func_arith_result\n\t\tcase \" $oldobjs \" in\n\t\t*[\\ /]\"$newobj \"*) ;;\n\t\t*) if test ! -f \"$gentop/$newobj\"; then break; fi ;;\n\t\tesac\n\t      done\n\t      func_show_eval \"ln $obj $gentop/$newobj || cp $obj $gentop/$newobj\"\n\t      func_append oldobjs \" $gentop/$newobj\"\n\t      ;;\n\t    *) func_append oldobjs \" $obj\" ;;\n\t    esac\n\t  done\n\tfi\n\tfunc_to_tool_file \"$oldlib\" func_convert_file_msys_to_w32\n\ttool_oldlib=$func_to_tool_file_result\n\teval cmds=\\\"$old_archive_cmds\\\"\n\n\tfunc_len \" $cmds\"\n\tlen=$func_len_result\n\tif test \"$len\" -lt \"$max_cmd_len\" || test \"$max_cmd_len\" -le -1; then\n\t  cmds=$old_archive_cmds\n\telif test -n \"$archiver_list_spec\"; then\n\t  func_verbose \"using command file archive linking...\"\n\t  for obj in $oldobjs\n\t  do\n\t    func_to_tool_file \"$obj\"\n\t    $ECHO \"$func_to_tool_file_result\"\n\t  done > $output_objdir/$libname.libcmd\n\t  func_to_tool_file \"$output_objdir/$libname.libcmd\"\n\t  oldobjs=\" $archiver_list_spec$func_to_tool_file_result\"\n\t  cmds=$old_archive_cmds\n\telse\n\t  # the command line is too long to link in one step, link in parts\n\t  func_verbose \"using piecewise archive linking...\"\n\t  save_RANLIB=$RANLIB\n\t  RANLIB=:\n\t  objlist=\n\t  concat_cmds=\n\t  save_oldobjs=$oldobjs\n\t  oldobjs=\n\t  # Is there a better way of finding the last object in the list?\n\t  for obj in $save_oldobjs\n\t  do\n\t    last_oldobj=$obj\n\t  done\n\t  eval test_cmds=\\\"$old_archive_cmds\\\"\n\t  func_len \" $test_cmds\"\n\t  len0=$func_len_result\n\t  len=$len0\n\t  for obj in $save_oldobjs\n\t  do\n\t    func_len \" $obj\"\n\t    func_arith $len + $func_len_result\n\t    len=$func_arith_result\n\t    func_append objlist \" $obj\"\n\t    if test \"$len\" -lt \"$max_cmd_len\"; then\n\t      :\n\t    else\n\t      # the above command should be used before it gets too long\n\t      oldobjs=$objlist\n\t      if test \"$obj\" = \"$last_oldobj\" ; then\n\t\tRANLIB=$save_RANLIB\n\t      fi\n\t      test -z \"$concat_cmds\" || concat_cmds=$concat_cmds~\n\t      eval concat_cmds=\\\"\\${concat_cmds}$old_archive_cmds\\\"\n\t      objlist=\n\t      len=$len0\n\t    fi\n\t  done\n\t  RANLIB=$save_RANLIB\n\t  oldobjs=$objlist\n\t  if test \"X$oldobjs\" = \"X\" ; then\n\t    eval cmds=\\\"\\$concat_cmds\\\"\n\t  else\n\t    eval cmds=\\\"\\$concat_cmds~\\$old_archive_cmds\\\"\n\t  fi\n\tfi\n      fi\n      func_execute_cmds \"$cmds\" 'exit $?'\n    done\n\n    test -n \"$generated\" && \\\n      func_show_eval \"${RM}r$generated\"\n\n    # Now create the libtool archive.\n    case $output in\n    *.la)\n      old_library=\n      test \"$build_old_libs\" = yes && old_library=\"$libname.$libext\"\n      func_verbose \"creating $output\"\n\n      # Preserve any variables that may affect compiler behavior\n      for var in $variables_saved_for_relink; do\n\tif eval test -z \\\"\\${$var+set}\\\"; then\n\t  relink_command=\"{ test -z \\\"\\${$var+set}\\\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command\"\n\telif eval var_value=\\$$var; test -z \"$var_value\"; then\n\t  relink_command=\"$var=; export $var; $relink_command\"\n\telse\n\t  func_quote_for_eval \"$var_value\"\n\t  relink_command=\"$var=$func_quote_for_eval_result; export $var; $relink_command\"\n\tfi\n      done\n      # Quote the link command for shipping.\n      relink_command=\"(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)\"\n      relink_command=`$ECHO \"$relink_command\" | $SED \"$sed_quote_subst\"`\n      if test \"$hardcode_automatic\" = yes ; then\n\trelink_command=\n      fi\n\n      # Only create the output if not a dry run.\n      $opt_dry_run || {\n\tfor installed in no yes; do\n\t  if test \"$installed\" = yes; then\n\t    if test -z \"$install_libdir\"; then\n\t      break\n\t    fi\n\t    output=\"$output_objdir/$outputname\"i\n\t    # Replace all uninstalled libtool libraries with the installed ones\n\t    newdependency_libs=\n\t    for deplib in $dependency_libs; do\n\t      case $deplib in\n\t      *.la)\n\t\tfunc_basename \"$deplib\"\n\t\tname=\"$func_basename_result\"\n\t\tfunc_resolve_sysroot \"$deplib\"\n\t\teval libdir=`${SED} -n -e 's/^libdir=\\(.*\\)$/\\1/p' $func_resolve_sysroot_result`\n\t\ttest -z \"$libdir\" && \\\n\t\t  func_fatal_error \"\\`$deplib' is not a valid libtool archive\"\n\t\tfunc_append newdependency_libs \" ${lt_sysroot:+=}$libdir/$name\"\n\t\t;;\n\t      -L*)\n\t\tfunc_stripname -L '' \"$deplib\"\n\t\tfunc_replace_sysroot \"$func_stripname_result\"\n\t\tfunc_append newdependency_libs \" -L$func_replace_sysroot_result\"\n\t\t;;\n\t      -R*)\n\t\tfunc_stripname -R '' \"$deplib\"\n\t\tfunc_replace_sysroot \"$func_stripname_result\"\n\t\tfunc_append newdependency_libs \" -R$func_replace_sysroot_result\"\n\t\t;;\n\t      *) func_append newdependency_libs \" $deplib\" ;;\n\t      esac\n\t    done\n\t    dependency_libs=\"$newdependency_libs\"\n\t    newdlfiles=\n\n\t    for lib in $dlfiles; do\n\t      case $lib in\n\t      *.la)\n\t        func_basename \"$lib\"\n\t\tname=\"$func_basename_result\"\n\t\teval libdir=`${SED} -n -e 's/^libdir=\\(.*\\)$/\\1/p' $lib`\n\t\ttest -z \"$libdir\" && \\\n\t\t  func_fatal_error \"\\`$lib' is not a valid libtool archive\"\n\t\tfunc_append newdlfiles \" ${lt_sysroot:+=}$libdir/$name\"\n\t\t;;\n\t      *) func_append newdlfiles \" $lib\" ;;\n\t      esac\n\t    done\n\t    dlfiles=\"$newdlfiles\"\n\t    newdlprefiles=\n\t    for lib in $dlprefiles; do\n\t      case $lib in\n\t      *.la)\n\t\t# Only pass preopened files to the pseudo-archive (for\n\t\t# eventual linking with the app. that links it) if we\n\t\t# didn't already link the preopened objects directly into\n\t\t# the library:\n\t\tfunc_basename \"$lib\"\n\t\tname=\"$func_basename_result\"\n\t\teval libdir=`${SED} -n -e 's/^libdir=\\(.*\\)$/\\1/p' $lib`\n\t\ttest -z \"$libdir\" && \\\n\t\t  func_fatal_error \"\\`$lib' is not a valid libtool archive\"\n\t\tfunc_append newdlprefiles \" ${lt_sysroot:+=}$libdir/$name\"\n\t\t;;\n\t      esac\n\t    done\n\t    dlprefiles=\"$newdlprefiles\"\n\t  else\n\t    newdlfiles=\n\t    for lib in $dlfiles; do\n\t      case $lib in\n\t\t[\\\\/]* | [A-Za-z]:[\\\\/]*) abs=\"$lib\" ;;\n\t\t*) abs=`pwd`\"/$lib\" ;;\n\t      esac\n\t      func_append newdlfiles \" $abs\"\n\t    done\n\t    dlfiles=\"$newdlfiles\"\n\t    newdlprefiles=\n\t    for lib in $dlprefiles; do\n\t      case $lib in\n\t\t[\\\\/]* | [A-Za-z]:[\\\\/]*) abs=\"$lib\" ;;\n\t\t*) abs=`pwd`\"/$lib\" ;;\n\t      esac\n\t      func_append newdlprefiles \" $abs\"\n\t    done\n\t    dlprefiles=\"$newdlprefiles\"\n\t  fi\n\t  $RM $output\n\t  # place dlname in correct position for cygwin\n\t  # In fact, it would be nice if we could use this code for all target\n\t  # systems that can't hard-code library paths into their executables\n\t  # and that have no shared library path variable independent of PATH,\n\t  # but it turns out we can't easily determine that from inspecting\n\t  # libtool variables, so we have to hard-code the OSs to which it\n\t  # applies here; at the moment, that means platforms that use the PE\n\t  # object format with DLL files.  See the long comment at the top of\n\t  # tests/bindir.at for full details.\n\t  tdlname=$dlname\n\t  case $host,$output,$installed,$module,$dlname in\n\t    *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll)\n\t      # If a -bindir argument was supplied, place the dll there.\n\t      if test \"x$bindir\" != x ;\n\t      then\n\t\tfunc_relative_path \"$install_libdir\" \"$bindir\"\n\t\ttdlname=$func_relative_path_result$dlname\n\t      else\n\t\t# Otherwise fall back on heuristic.\n\t\ttdlname=../bin/$dlname\n\t      fi\n\t      ;;\n\t  esac\n\t  $ECHO > $output \"\\\n# $outputname - a libtool library file\n# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION\n#\n# Please DO NOT delete this file!\n# It is necessary for linking the library.\n\n# The name that we can dlopen(3).\ndlname='$tdlname'\n\n# Names of this library.\nlibrary_names='$library_names'\n\n# The name of the static archive.\nold_library='$old_library'\n\n# Linker flags that can not go in dependency_libs.\ninherited_linker_flags='$new_inherited_linker_flags'\n\n# Libraries that this one depends upon.\ndependency_libs='$dependency_libs'\n\n# Names of additional weak libraries provided by this library\nweak_library_names='$weak_libs'\n\n# Version information for $libname.\ncurrent=$current\nage=$age\nrevision=$revision\n\n# Is this an already installed library?\ninstalled=$installed\n\n# Should we warn about portability when linking against -modules?\nshouldnotlink=$module\n\n# Files to dlopen/dlpreopen\ndlopen='$dlfiles'\ndlpreopen='$dlprefiles'\n\n# Directory that this library needs to be installed in:\nlibdir='$install_libdir'\"\n\t  if test \"$installed\" = no && test \"$need_relink\" = yes; then\n\t    $ECHO >> $output \"\\\nrelink_command=\\\"$relink_command\\\"\"\n\t  fi\n\tdone\n      }\n\n      # Do a symbolic link so that the libtool archive can be found in\n      # LD_LIBRARY_PATH before the program is installed.\n      func_show_eval '( cd \"$output_objdir\" && $RM \"$outputname\" && $LN_S \"../$outputname\" \"$outputname\" )' 'exit $?'\n      ;;\n    esac\n    exit $EXIT_SUCCESS\n}\n\n{ test \"$opt_mode\" = link || test \"$opt_mode\" = relink; } &&\n    func_mode_link ${1+\"$@\"}\n\n\n# func_mode_uninstall arg...\nfunc_mode_uninstall ()\n{\n    $opt_debug\n    RM=\"$nonopt\"\n    files=\n    rmforce=\n    exit_status=0\n\n    # This variable tells wrapper scripts just to set variables rather\n    # than running their programs.\n    libtool_install_magic=\"$magic\"\n\n    for arg\n    do\n      case $arg in\n      -f) func_append RM \" $arg\"; rmforce=yes ;;\n      -*) func_append RM \" $arg\" ;;\n      *) func_append files \" $arg\" ;;\n      esac\n    done\n\n    test -z \"$RM\" && \\\n      func_fatal_help \"you must specify an RM program\"\n\n    rmdirs=\n\n    for file in $files; do\n      func_dirname \"$file\" \"\" \".\"\n      dir=\"$func_dirname_result\"\n      if test \"X$dir\" = X.; then\n\todir=\"$objdir\"\n      else\n\todir=\"$dir/$objdir\"\n      fi\n      func_basename \"$file\"\n      name=\"$func_basename_result\"\n      test \"$opt_mode\" = uninstall && odir=\"$dir\"\n\n      # Remember odir for removal later, being careful to avoid duplicates\n      if test \"$opt_mode\" = clean; then\n\tcase \" $rmdirs \" in\n\t  *\" $odir \"*) ;;\n\t  *) func_append rmdirs \" $odir\" ;;\n\tesac\n      fi\n\n      # Don't error if the file doesn't exist and rm -f was used.\n      if { test -L \"$file\"; } >/dev/null 2>&1 ||\n\t { test -h \"$file\"; } >/dev/null 2>&1 ||\n\t test -f \"$file\"; then\n\t:\n      elif test -d \"$file\"; then\n\texit_status=1\n\tcontinue\n      elif test \"$rmforce\" = yes; then\n\tcontinue\n      fi\n\n      rmfiles=\"$file\"\n\n      case $name in\n      *.la)\n\t# Possibly a libtool archive, so verify it.\n\tif func_lalib_p \"$file\"; then\n\t  func_source $dir/$name\n\n\t  # Delete the libtool libraries and symlinks.\n\t  for n in $library_names; do\n\t    func_append rmfiles \" $odir/$n\"\n\t  done\n\t  test -n \"$old_library\" && func_append rmfiles \" $odir/$old_library\"\n\n\t  case \"$opt_mode\" in\n\t  clean)\n\t    case \" $library_names \" in\n\t    *\" $dlname \"*) ;;\n\t    *) test -n \"$dlname\" && func_append rmfiles \" $odir/$dlname\" ;;\n\t    esac\n\t    test -n \"$libdir\" && func_append rmfiles \" $odir/$name $odir/${name}i\"\n\t    ;;\n\t  uninstall)\n\t    if test -n \"$library_names\"; then\n\t      # Do each command in the postuninstall commands.\n\t      func_execute_cmds \"$postuninstall_cmds\" 'test \"$rmforce\" = yes || exit_status=1'\n\t    fi\n\n\t    if test -n \"$old_library\"; then\n\t      # Do each command in the old_postuninstall commands.\n\t      func_execute_cmds \"$old_postuninstall_cmds\" 'test \"$rmforce\" = yes || exit_status=1'\n\t    fi\n\t    # FIXME: should reinstall the best remaining shared library.\n\t    ;;\n\t  esac\n\tfi\n\t;;\n\n      *.lo)\n\t# Possibly a libtool object, so verify it.\n\tif func_lalib_p \"$file\"; then\n\n\t  # Read the .lo file\n\t  func_source $dir/$name\n\n\t  # Add PIC object to the list of files to remove.\n\t  if test -n \"$pic_object\" &&\n\t     test \"$pic_object\" != none; then\n\t    func_append rmfiles \" $dir/$pic_object\"\n\t  fi\n\n\t  # Add non-PIC object to the list of files to remove.\n\t  if test -n \"$non_pic_object\" &&\n\t     test \"$non_pic_object\" != none; then\n\t    func_append rmfiles \" $dir/$non_pic_object\"\n\t  fi\n\tfi\n\t;;\n\n      *)\n\tif test \"$opt_mode\" = clean ; then\n\t  noexename=$name\n\t  case $file in\n\t  *.exe)\n\t    func_stripname '' '.exe' \"$file\"\n\t    file=$func_stripname_result\n\t    func_stripname '' '.exe' \"$name\"\n\t    noexename=$func_stripname_result\n\t    # $file with .exe has already been added to rmfiles,\n\t    # add $file without .exe\n\t    func_append rmfiles \" $file\"\n\t    ;;\n\t  esac\n\t  # Do a test to see if this is a libtool program.\n\t  if func_ltwrapper_p \"$file\"; then\n\t    if func_ltwrapper_executable_p \"$file\"; then\n\t      func_ltwrapper_scriptname \"$file\"\n\t      relink_command=\n\t      func_source $func_ltwrapper_scriptname_result\n\t      func_append rmfiles \" $func_ltwrapper_scriptname_result\"\n\t    else\n\t      relink_command=\n\t      func_source $dir/$noexename\n\t    fi\n\n\t    # note $name still contains .exe if it was in $file originally\n\t    # as does the version of $file that was added into $rmfiles\n\t    func_append rmfiles \" $odir/$name $odir/${name}S.${objext}\"\n\t    if test \"$fast_install\" = yes && test -n \"$relink_command\"; then\n\t      func_append rmfiles \" $odir/lt-$name\"\n\t    fi\n\t    if test \"X$noexename\" != \"X$name\" ; then\n\t      func_append rmfiles \" $odir/lt-${noexename}.c\"\n\t    fi\n\t  fi\n\tfi\n\t;;\n      esac\n      func_show_eval \"$RM $rmfiles\" 'exit_status=1'\n    done\n\n    # Try to remove the ${objdir}s in the directories where we deleted files\n    for dir in $rmdirs; do\n      if test -d \"$dir\"; then\n\tfunc_show_eval \"rmdir $dir >/dev/null 2>&1\"\n      fi\n    done\n\n    exit $exit_status\n}\n\n{ test \"$opt_mode\" = uninstall || test \"$opt_mode\" = clean; } &&\n    func_mode_uninstall ${1+\"$@\"}\n\ntest -z \"$opt_mode\" && {\n  help=\"$generic_help\"\n  func_fatal_help \"you must specify a MODE\"\n}\n\ntest -z \"$exec_cmd\" && \\\n  func_fatal_help \"invalid operation mode \\`$opt_mode'\"\n\nif test -n \"$exec_cmd\"; then\n  eval exec \"$exec_cmd\"\n  exit $EXIT_FAILURE\nfi\n\nexit $exit_status\n\n\n# The TAGs below are defined such that we never get into a situation\n# in which we disable both kinds of libraries.  Given conflicting\n# choices, we go for a static library, that is the most portable,\n# since we can't tell whether shared libraries were disabled because\n# the user asked for that or because the platform doesn't support\n# them.  This is particularly important on AIX, because we don't\n# support having both static and shared libraries enabled at the same\n# time on that platform, so we default to a shared-only configuration.\n# If a disable-shared tag is given, we'll fallback to a static-only\n# configuration.  But we'll never go from static-only to shared-only.\n\n# ### BEGIN LIBTOOL TAG CONFIG: disable-shared\nbuild_libtool_libs=no\nbuild_old_libs=yes\n# ### END LIBTOOL TAG CONFIG: disable-shared\n\n# ### BEGIN LIBTOOL TAG CONFIG: disable-static\nbuild_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`\n# ### END LIBTOOL TAG CONFIG: disable-static\n\n# Local Variables:\n# mode:shell-script\n# sh-indentation:2\n# End:\n# vi:sw=2\n\n"
  },
  {
    "path": "thirdparty/portaudio/missing",
    "content": "#! /bin/sh\n# Common wrapper for a few potentially missing GNU programs.\n\nscriptversion=2013-10-28.13; # UTC\n\n# Copyright (C) 1996-2013 Free Software Foundation, Inc.\n# Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.\n\n# This program is free software; you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation; either version 2, or (at your option)\n# any later version.\n\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n# GNU General Public License for more details.\n\n# You should have received a copy of the GNU General Public License\n# along with this program.  If not, see <http://www.gnu.org/licenses/>.\n\n# As a special exception to the GNU General Public License, if you\n# distribute this file as part of a program that contains a\n# configuration script generated by Autoconf, you may include it under\n# the same distribution terms that you use for the rest of that program.\n\nif test $# -eq 0; then\n  echo 1>&2 \"Try '$0 --help' for more information\"\n  exit 1\nfi\n\ncase $1 in\n\n  --is-lightweight)\n    # Used by our autoconf macros to check whether the available missing\n    # script is modern enough.\n    exit 0\n    ;;\n\n  --run)\n    # Back-compat with the calling convention used by older automake.\n    shift\n    ;;\n\n  -h|--h|--he|--hel|--help)\n    echo \"\\\n$0 [OPTION]... PROGRAM [ARGUMENT]...\n\nRun 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due\nto PROGRAM being missing or too old.\n\nOptions:\n  -h, --help      display this help and exit\n  -v, --version   output version information and exit\n\nSupported PROGRAM values:\n  aclocal   autoconf  autoheader   autom4te  automake  makeinfo\n  bison     yacc      flex         lex       help2man\n\nVersion suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and\n'g' are ignored when checking the name.\n\nSend bug reports to <bug-automake@gnu.org>.\"\n    exit $?\n    ;;\n\n  -v|--v|--ve|--ver|--vers|--versi|--versio|--version)\n    echo \"missing $scriptversion (GNU Automake)\"\n    exit $?\n    ;;\n\n  -*)\n    echo 1>&2 \"$0: unknown '$1' option\"\n    echo 1>&2 \"Try '$0 --help' for more information\"\n    exit 1\n    ;;\n\nesac\n\n# Run the given program, remember its exit status.\n\"$@\"; st=$?\n\n# If it succeeded, we are done.\ntest $st -eq 0 && exit 0\n\n# Also exit now if we it failed (or wasn't found), and '--version' was\n# passed; such an option is passed most likely to detect whether the\n# program is present and works.\ncase $2 in --version|--help) exit $st;; esac\n\n# Exit code 63 means version mismatch.  This often happens when the user\n# tries to use an ancient version of a tool on a file that requires a\n# minimum version.\nif test $st -eq 63; then\n  msg=\"probably too old\"\nelif test $st -eq 127; then\n  # Program was missing.\n  msg=\"missing on your system\"\nelse\n  # Program was found and executed, but failed.  Give up.\n  exit $st\nfi\n\nperl_URL=http://www.perl.org/\nflex_URL=http://flex.sourceforge.net/\ngnu_software_URL=http://www.gnu.org/software\n\nprogram_details ()\n{\n  case $1 in\n    aclocal|automake)\n      echo \"The '$1' program is part of the GNU Automake package:\"\n      echo \"<$gnu_software_URL/automake>\"\n      echo \"It also requires GNU Autoconf, GNU m4 and Perl in order to run:\"\n      echo \"<$gnu_software_URL/autoconf>\"\n      echo \"<$gnu_software_URL/m4/>\"\n      echo \"<$perl_URL>\"\n      ;;\n    autoconf|autom4te|autoheader)\n      echo \"The '$1' program is part of the GNU Autoconf package:\"\n      echo \"<$gnu_software_URL/autoconf/>\"\n      echo \"It also requires GNU m4 and Perl in order to run:\"\n      echo \"<$gnu_software_URL/m4/>\"\n      echo \"<$perl_URL>\"\n      ;;\n  esac\n}\n\ngive_advice ()\n{\n  # Normalize program name to check for.\n  normalized_program=`echo \"$1\" | sed '\n    s/^gnu-//; t\n    s/^gnu//; t\n    s/^g//; t'`\n\n  printf '%s\\n' \"'$1' is $msg.\"\n\n  configure_deps=\"'configure.ac' or m4 files included by 'configure.ac'\"\n  case $normalized_program in\n    autoconf*)\n      echo \"You should only need it if you modified 'configure.ac',\"\n      echo \"or m4 files included by it.\"\n      program_details 'autoconf'\n      ;;\n    autoheader*)\n      echo \"You should only need it if you modified 'acconfig.h' or\"\n      echo \"$configure_deps.\"\n      program_details 'autoheader'\n      ;;\n    automake*)\n      echo \"You should only need it if you modified 'Makefile.am' or\"\n      echo \"$configure_deps.\"\n      program_details 'automake'\n      ;;\n    aclocal*)\n      echo \"You should only need it if you modified 'acinclude.m4' or\"\n      echo \"$configure_deps.\"\n      program_details 'aclocal'\n      ;;\n   autom4te*)\n      echo \"You might have modified some maintainer files that require\"\n      echo \"the 'autom4te' program to be rebuilt.\"\n      program_details 'autom4te'\n      ;;\n    bison*|yacc*)\n      echo \"You should only need it if you modified a '.y' file.\"\n      echo \"You may want to install the GNU Bison package:\"\n      echo \"<$gnu_software_URL/bison/>\"\n      ;;\n    lex*|flex*)\n      echo \"You should only need it if you modified a '.l' file.\"\n      echo \"You may want to install the Fast Lexical Analyzer package:\"\n      echo \"<$flex_URL>\"\n      ;;\n    help2man*)\n      echo \"You should only need it if you modified a dependency\" \\\n           \"of a man page.\"\n      echo \"You may want to install the GNU Help2man package:\"\n      echo \"<$gnu_software_URL/help2man/>\"\n    ;;\n    makeinfo*)\n      echo \"You should only need it if you modified a '.texi' file, or\"\n      echo \"any other file indirectly affecting the aspect of the manual.\"\n      echo \"You might want to install the Texinfo package:\"\n      echo \"<$gnu_software_URL/texinfo/>\"\n      echo \"The spurious makeinfo call might also be the consequence of\"\n      echo \"using a buggy 'make' (AIX, DU, IRIX), in which case you might\"\n      echo \"want to install GNU make:\"\n      echo \"<$gnu_software_URL/make/>\"\n      ;;\n    *)\n      echo \"You might have modified some files without having the proper\"\n      echo \"tools for further handling them.  Check the 'README' file, it\"\n      echo \"often tells you about the needed prerequisites for installing\"\n      echo \"this package.  You may also peek at any GNU archive site, in\"\n      echo \"case some other package contains this missing '$1' program.\"\n      ;;\n  esac\n}\n\ngive_advice \"$1\" | sed -e '1s/^/WARNING: /' \\\n                       -e '2,$s/^/         /' >&2\n\n# Propagate the correct exit status (expected to be 127 for a program\n# not found, 63 for a program that failed due to version mismatch).\nexit $st\n\n# Local variables:\n# eval: (add-hook 'write-file-hooks 'time-stamp)\n# time-stamp-start: \"scriptversion=\"\n# time-stamp-format: \"%:y-%02m-%02d.%02H\"\n# time-stamp-time-zone: \"UTC\"\n# time-stamp-end: \"; # UTC\"\n# End:\n"
  },
  {
    "path": "thirdparty/portaudio/pablio/README.txt",
    "content": "README for PABLIO\nPortable Audio Blocking I/O Library\nAuthor: Phil Burk\n\nPABLIO is a simplified interface to PortAudio that provides\nread/write style blocking I/O.\n\nPABLIO is DEPRECATED. We recommend that people use the blocking I/O calls\nthat are now part of the PortAudio API. These are Pa_ReadStream() and\nPa_WriteStream().\n\nhttp://portaudio.com/docs/v19-doxydocs/blocking_read_write.html\n\n/*\n * More information on PortAudio at: http://www.portaudio.com\n * Copyright (c) 1999-2000 Phil Burk\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however, \n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also \n * requested that these non-binding requests be included along with the \n * license above.\n */\n\n\n"
  },
  {
    "path": "thirdparty/portaudio/pablio/pablio.c",
    "content": "/*\n * $Id$\n * pablio.c\n * Portable Audio Blocking Input/Output utility.\n *\n * Author: Phil Burk, http://www.softsynth.com\n *\n * This program uses the PortAudio Portable Audio Library.\n * For more information see: http://www.portaudio.com\n * Copyright (c) 1999-2000 Ross Bencina and Phil Burk\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however, \n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also \n * requested that these non-binding requests be included along with the \n * license above.\n */\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <math.h>\n#include \"portaudio.h\"\n#include \"pa_ringbuffer.h\"\n#include \"pablio.h\"\n#include <string.h>\n\n/************************************************************************/\n/******** Constants *****************************************************/\n/************************************************************************/\n\n#define FRAMES_PER_BUFFER    (256)\n\n/************************************************************************/\n/******** Prototypes ****************************************************/\n/************************************************************************/\n\nstatic int blockingIOCallback( void *inputBuffer, void *outputBuffer,\n                               unsigned long framesPerBuffer,\n                               PaTimestamp outTime, void *userData );\nstatic PaError PABLIO_InitFIFO( RingBuffer *rbuf, long numFrames, long bytesPerFrame );\nstatic PaError PABLIO_TermFIFO( RingBuffer *rbuf );\n\n/************************************************************************/\n/******** Functions *****************************************************/\n/************************************************************************/\n\n/* Called from PortAudio.\n * Read and write data only if there is room in FIFOs.\n */\nstatic int blockingIOCallback( void *inputBuffer, void *outputBuffer,\n                               unsigned long framesPerBuffer,\n                               PaTimestamp outTime, void *userData )\n{\n    PABLIO_Stream *data = (PABLIO_Stream*)userData;\n    long numBytes = data->bytesPerFrame * framesPerBuffer;\n    (void) outTime;\n\n    /* This may get called with NULL inputBuffer during initial setup. */\n    if( inputBuffer != NULL )\n    {\n        PaUtil_WriteRingBuffer( &data->inFIFO, inputBuffer, numBytes );\n    }\n    if( outputBuffer != NULL )\n    {\n        int i;\n        int numRead = PaUtil_ReadRingBuffer( &data->outFIFO, outputBuffer, numBytes );\n        /* Zero out remainder of buffer if we run out of data. */\n        for( i=numRead; i<numBytes; i++ )\n        {\n            ((char *)outputBuffer)[i] = 0;\n        }\n    }\n\n    return 0;\n}\n\n/* Allocate buffer. */\nstatic PaError PABLIO_InitFIFO( RingBuffer *rbuf, long numFrames, long bytesPerFrame )\n{\n    long numBytes = numFrames * bytesPerFrame;\n    char *buffer = (char *) malloc( numBytes );\n    if( buffer == NULL ) return paInsufficientMemory;\n    memset( buffer, 0, numBytes );\n    return (PaError) PaUtil_InitializeRingBuffer( rbuf, numBytes, buffer );\n}\n\n/* Free buffer. */\nstatic PaError PABLIO_TermFIFO( RingBuffer *rbuf )\n{\n    if( rbuf->buffer ) free( rbuf->buffer );\n    rbuf->buffer = NULL;\n    return paNoError;\n}\n\n/************************************************************\n * Write data to ring buffer.\n * Will not return until all the data has been written.\n */\nlong WriteAudioStream( PABLIO_Stream *aStream, void *data, long numFrames )\n{\n    long bytesWritten;\n    char *p = (char *) data;\n    long numBytes = aStream->bytesPerFrame * numFrames;\n    while( numBytes > 0)\n    {\n        bytesWritten = PaUtil_WriteRingBuffer( &aStream->outFIFO, p, numBytes );\n        numBytes -= bytesWritten;\n        p += bytesWritten;\n        if( numBytes > 0) Pa_Sleep(10);\n    }\n    return numFrames;\n}\n\n/************************************************************\n * Read data from ring buffer.\n * Will not return until all the data has been read.\n */\nlong ReadAudioStream( PABLIO_Stream *aStream, void *data, long numFrames )\n{\n    long bytesRead;\n    char *p = (char *) data;\n    long numBytes = aStream->bytesPerFrame * numFrames;\n    while( numBytes > 0)\n    {\n        bytesRead = PaUtil_ReadRingBuffer( &aStream->inFIFO, p, numBytes );\n        numBytes -= bytesRead;\n        p += bytesRead;\n        if( numBytes > 0) Pa_Sleep(10);\n    }\n    return numFrames;\n}\n\n/************************************************************\n * Return the number of frames that could be written to the stream without\n * having to wait.\n */\nlong GetAudioStreamWriteable( PABLIO_Stream *aStream )\n{\n    int bytesEmpty = PaUtil_GetRingBufferWriteAvailable( &aStream->outFIFO );\n    return bytesEmpty / aStream->bytesPerFrame;\n}\n\n/************************************************************\n * Return the number of frames that are available to be read from the\n * stream without having to wait.\n */\nlong GetAudioStreamReadable( PABLIO_Stream *aStream )\n{\n    int bytesFull = PaUtil_GetRingBufferReadAvailable( &aStream->inFIFO );\n    return bytesFull / aStream->bytesPerFrame;\n}\n\n/************************************************************/\nstatic unsigned long RoundUpToNextPowerOf2( unsigned long n )\n{\n    long numBits = 0;\n    if( ((n-1) & n) == 0) return n; /* Already Power of two. */\n    while( n > 0 )\n    {\n        n= n>>1;\n        numBits++;\n    }\n    return (1<<numBits);\n}\n\n/************************************************************\n * Opens a PortAudio stream with default characteristics.\n * Allocates PABLIO_Stream structure.\n *\n * flags parameter can be an ORed combination of:\n *    PABLIO_READ, PABLIO_WRITE, or PABLIO_READ_WRITE,\n *    and either PABLIO_MONO or PABLIO_STEREO\n */\nPaError OpenAudioStream( PABLIO_Stream **rwblPtr, double sampleRate,\n                         PaSampleFormat format, long flags )\n{\n    long   bytesPerSample;\n    long   doRead = 0;\n    long   doWrite = 0;\n    PaError err;\n    PABLIO_Stream *aStream;\n    long   minNumBuffers;\n    long   numFrames;\n\n    /* Allocate PABLIO_Stream structure for caller. */\n    aStream = (PABLIO_Stream *) malloc( sizeof(PABLIO_Stream) );\n    if( aStream == NULL ) return paInsufficientMemory;\n    memset( aStream, 0, sizeof(PABLIO_Stream) );\n\n    /* Determine size of a sample. */\n    bytesPerSample = Pa_GetSampleSize( format );\n    if( bytesPerSample < 0 )\n    {\n        err = (PaError) bytesPerSample;\n        goto error;\n    }\n    aStream->samplesPerFrame = ((flags&PABLIO_MONO) != 0) ? 1 : 2;\n    aStream->bytesPerFrame = bytesPerSample * aStream->samplesPerFrame;\n\n    /* Initialize PortAudio  */\n    err = Pa_Initialize();\n    if( err != paNoError ) goto error;\n\n    /* Warning: numFrames must be larger than amount of data processed per interrupt\n     *    inside PA to prevent glitches. Just to be safe, adjust size upwards.\n     */\n    minNumBuffers = 2 * Pa_GetMinNumBuffers( FRAMES_PER_BUFFER, sampleRate );\n    numFrames = minNumBuffers * FRAMES_PER_BUFFER;\n    numFrames = RoundUpToNextPowerOf2( numFrames );\n\n    /* Initialize Ring Buffers */\n    doRead = ((flags & PABLIO_READ) != 0);\n    doWrite = ((flags & PABLIO_WRITE) != 0);\n    if(doRead)\n    {\n        err = PABLIO_InitFIFO( &aStream->inFIFO, numFrames, aStream->bytesPerFrame );\n        if( err != paNoError ) goto error;\n    }\n    if(doWrite)\n    {\n        long numBytes;\n        err = PABLIO_InitFIFO( &aStream->outFIFO, numFrames, aStream->bytesPerFrame );\n        if( err != paNoError ) goto error;\n        /* Make Write FIFO appear full initially. */\n        numBytes = PaUtil_GetRingBufferWriteAvailable( &aStream->outFIFO );\n        PaUtil_AdvanceRingBufferWriteIndex( &aStream->outFIFO, numBytes );\n    }\n\n    /* Open a PortAudio stream that we will use to communicate with the underlying\n     * audio drivers. */\n    err = Pa_OpenStream(\n              &aStream->stream,\n              (doRead ? Pa_GetDefaultInputDeviceID() : paNoDevice),\n              (doRead ? aStream->samplesPerFrame : 0 ),\n              format,\n              NULL,\n              (doWrite ? Pa_GetDefaultOutputDeviceID() : paNoDevice),\n              (doWrite ? aStream->samplesPerFrame : 0 ),\n              format,\n              NULL,\n              sampleRate,\n              FRAMES_PER_BUFFER,\n              minNumBuffers,\n              paClipOff,       /* we won't output out of range samples so don't bother clipping them */\n              blockingIOCallback,\n              aStream );\n    if( err != paNoError ) goto error;\n\n    err = Pa_StartStream( aStream->stream );\n    if( err != paNoError ) goto error;\n\n    *rwblPtr = aStream;\n    return paNoError;\n\nerror:\n    CloseAudioStream( aStream );\n    *rwblPtr = NULL;\n    return err;\n}\n\n/************************************************************/\nPaError CloseAudioStream( PABLIO_Stream *aStream )\n{\n    PaError err;\n    int bytesEmpty;\n    int byteSize = aStream->outFIFO.bufferSize;\n\n    /* If we are writing data, make sure we play everything written. */\n    if( byteSize > 0 )\n    {\n        bytesEmpty = PaUtil_GetRingBufferWriteAvailable( &aStream->outFIFO );\n        while( bytesEmpty < byteSize )\n        {\n            Pa_Sleep( 10 );\n            bytesEmpty = PaUtil_GetRingBufferWriteAvailable( &aStream->outFIFO );\n        }\n    }\n\n    err = Pa_StopStream( aStream->stream );\n    if( err != paNoError ) goto error;\n    err = Pa_CloseStream( aStream->stream );\n    if( err != paNoError ) goto error;\n    Pa_Terminate();\n\nerror:\n    PABLIO_TermFIFO( &aStream->inFIFO );\n    PABLIO_TermFIFO( &aStream->outFIFO );\n    free( aStream );\n    return err;\n}\n"
  },
  {
    "path": "thirdparty/portaudio/pablio/pablio.def",
    "content": "LIBRARY      PABLIO\r\nDESCRIPTION  'PABLIO   Portable Audio Blocking I/O'\r\n\r\nEXPORTS\r\n    ; Explicit exports can go here\r\n\tPa_Initialize                   @1\r\n\tPa_Terminate                    @2\r\n\tPa_GetHostError                 @3\r\n\tPa_GetErrorText                 @4\r\n\tPa_CountDevices                 @5\r\n\tPa_GetDefaultInputDeviceID      @6\r\n\tPa_GetDefaultOutputDeviceID     @7\r\n\tPa_GetDeviceInfo                @8\r\n\tPa_OpenStream                   @9\r\n\tPa_OpenDefaultStream            @10\r\n\tPa_CloseStream                  @11\r\n\tPa_StartStream                  @12\r\n\tPa_StopStream                   @13\r\n\tPa_StreamActive                 @14\r\n\tPa_StreamTime                   @15\r\n\tPa_GetCPULoad                   @16\r\n\tPa_GetMinNumBuffers             @17\r\n\tPa_Sleep                        @18\r\n\r\n\tOpenAudioStream                 @19\r\n\tCloseAudioStream                @20\r\n\tWriteAudioStream                @21\r\n\tReadAudioStream                 @22\r\n\r\n\tPa_GetSampleSize                @23\r\n\r\n   ;123456789012345678901234567890123456\r\n   ;000000000111111111122222222223333333\r\n\r\n\r\n"
  },
  {
    "path": "thirdparty/portaudio/pablio/pablio.h",
    "content": "#ifndef _PABLIO_H\n#define _PABLIO_H\n\n#ifdef __cplusplus\nextern \"C\"\n{\n#endif /* __cplusplus */\n\n/*\n * $Id$\n * PABLIO.h\n * Portable Audio Blocking read/write utility.\n *\n * Author: Phil Burk, http://www.softsynth.com/portaudio/\n *\n * Include file for PABLIO, the Portable Audio Blocking I/O Library.\n * PABLIO is built on top of PortAudio, the Portable Audio Library.\n * For more information see: http://www.portaudio.com\n * Copyright (c) 1999-2000 Ross Bencina and Phil Burk\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however, \n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also \n * requested that these non-binding requests be included along with the \n * license above.\n */\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <math.h>\n#include \"portaudio.h\"\n#include \"pa_ringbuffer.h\"\n#include <string.h>\n\ntypedef struct\n{\n    RingBuffer   inFIFO;\n    RingBuffer   outFIFO;\n    PortAudioStream *stream;\n    int          bytesPerFrame;\n    int          samplesPerFrame;\n}\nPABLIO_Stream;\n\n/* Values for flags for OpenAudioStream(). */\n#define PABLIO_READ     (1<<0)\n#define PABLIO_WRITE    (1<<1)\n#define PABLIO_READ_WRITE    (PABLIO_READ|PABLIO_WRITE)\n#define PABLIO_MONO     (1<<2)\n#define PABLIO_STEREO   (1<<3)\n\n/************************************************************\n * Write data to ring buffer.\n * Will not return until all the data has been written.\n */\nlong WriteAudioStream( PABLIO_Stream *aStream, void *data, long numFrames );\n\n/************************************************************\n * Read data from ring buffer.\n * Will not return until all the data has been read.\n */\nlong ReadAudioStream( PABLIO_Stream *aStream, void *data, long numFrames );\n\n/************************************************************\n * Return the number of frames that could be written to the stream without\n * having to wait.\n */\nlong GetAudioStreamWriteable( PABLIO_Stream *aStream );\n\n/************************************************************\n * Return the number of frames that are available to be read from the\n * stream without having to wait.\n */\nlong GetAudioStreamReadable( PABLIO_Stream *aStream );\n\n/************************************************************\n * Opens a PortAudio stream with default characteristics.\n * Allocates PABLIO_Stream structure.\n *\n * flags parameter can be an ORed combination of:\n *    PABLIO_READ, PABLIO_WRITE, or PABLIO_READ_WRITE,\n *    and either PABLIO_MONO or PABLIO_STEREO\n */\nPaError OpenAudioStream( PABLIO_Stream **aStreamPtr, double sampleRate,\n                         PaSampleFormat format, long flags );\n\nPaError CloseAudioStream( PABLIO_Stream *aStream );\n\n#ifdef __cplusplus\n}\n#endif /* __cplusplus */\n#endif /* _PABLIO_H */\n"
  },
  {
    "path": "thirdparty/portaudio/pablio/test_rw.c",
    "content": "/*\n * $Id$\n * test_rw.c\n * Read input from one stream and write it to another.\n *\n * Author: Phil Burk, http://www.softsynth.com/portaudio/\n *\n * This program uses PABLIO, the Portable Audio Blocking I/O Library.\n * PABLIO is built on top of PortAudio, the Portable Audio Library.\n * For more information see: http://www.portaudio.com\n * Copyright (c) 1999-2000 Ross Bencina and Phil Burk\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however, \n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also \n * requested that these non-binding requests be included along with the \n * license above.\n */\n\n#include <stdio.h>\n#include <stdlib.h>\n#include \"pablio.h\"\n\n/*\n** Note that many of the older ISA sound cards on PCs do NOT support\n** full duplex audio (simultaneous record and playback).\n** And some only support full duplex at lower sample rates.\n*/\n#define SAMPLE_RATE          (44100)\n#define NUM_SECONDS              (5)\n#define SAMPLES_PER_FRAME        (2)\n#define FRAMES_PER_BLOCK        (64)\n\n/* Select whether we will use floats or shorts. */\n#if 1\n#define SAMPLE_TYPE  paFloat32\ntypedef float SAMPLE;\n#else\n#define SAMPLE_TYPE  paInt16\ntypedef short SAMPLE;\n#endif\n\n/*******************************************************************/\nint main(void);\nint main(void)\n{\n    int      i;\n    SAMPLE   samples[SAMPLES_PER_FRAME * FRAMES_PER_BLOCK];\n    PaError  err;\n    PABLIO_Stream     *aStream;\n\n    printf(\"Full duplex sound test using PortAudio and RingBuffers\\n\");\n    fflush(stdout);\n\n    /* Open simplified blocking I/O layer on top of PortAudio. */\n    err = OpenAudioStream( &aStream, SAMPLE_RATE, SAMPLE_TYPE,\n                           (PABLIO_READ_WRITE | PABLIO_STEREO) );\n    if( err != paNoError ) goto error;\n\n    /* Process samples in the foreground. */\n    for( i=0; i<(NUM_SECONDS * SAMPLE_RATE); i += FRAMES_PER_BLOCK )\n    {\n        /* Read one block of data into sample array from audio input. */\n        ReadAudioStream( aStream, samples, FRAMES_PER_BLOCK );\n        /* Write that same block of data to output. */\n        WriteAudioStream( aStream, samples, FRAMES_PER_BLOCK );\n    }\n\n    CloseAudioStream( aStream );\n\n    printf(\"Full duplex sound test complete.\\n\" );\n    fflush(stdout);\n    return 0;\n\nerror:\n    Pa_Terminate();\n    fprintf( stderr, \"An error occurred while using the portaudio stream\\n\" );\n    fprintf( stderr, \"Error number: %d\\n\", err );\n    fprintf( stderr, \"Error message: %s\\n\", Pa_GetErrorText( err ) );\n    return -1;\n}\n"
  },
  {
    "path": "thirdparty/portaudio/pablio/test_rw_echo.c",
    "content": "/*\n * $Id$\n * test_rw_echo.c\n * Echo delayed input to output.\n *\n * Author: Phil Burk, http://www.softsynth.com/portaudio/\n *\n * This program uses PABLIO, the Portable Audio Blocking I/O Library.\n * PABLIO is built on top of PortAudio, the Portable Audio Library.\n *\n * Note that if you need low latency, you should not use PABLIO.\n * Use the PA_OpenStream callback technique which is lower level\n * than PABLIO.\n *\n * For more information see: http://www.portaudio.com\n * Copyright (c) 1999-2000 Ross Bencina and Phil Burk\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however, \n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also \n * requested that these non-binding requests be included along with the \n * license above.\n */\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <math.h>\n#include \"pablio.h\"\n#include <string.h>\n\n/*\n** Note that many of the older ISA sound cards on PCs do NOT support\n** full duplex audio (simultaneous record and playback).\n** And some only support full duplex at lower sample rates.\n*/\n#define SAMPLE_RATE         (22050)\n#define NUM_SECONDS            (20)\n#define SAMPLES_PER_FRAME       (2)\n\n/* Select whether we will use floats or shorts. */\n#if 1\n#define SAMPLE_TYPE  paFloat32\ntypedef float SAMPLE;\n#else\n#define SAMPLE_TYPE  paInt16\ntypedef short SAMPLE;\n#endif\n\n#define NUM_ECHO_FRAMES   (2*SAMPLE_RATE)\nSAMPLE   samples[NUM_ECHO_FRAMES][SAMPLES_PER_FRAME] = {0.0};\n\n/*******************************************************************/\nint main(void);\nint main(void)\n{\n    int      i;\n    PaError  err;\n    PABLIO_Stream     *aInStream;\n    PABLIO_Stream     *aOutStream;\n    int      index;\n\n    printf(\"Full duplex sound test using PABLIO\\n\");\n    fflush(stdout);\n\n    /* Open simplified blocking I/O layer on top of PortAudio. */\n    /* Open input first so it can start to fill buffers. */\n    err = OpenAudioStream( &aInStream, SAMPLE_RATE, SAMPLE_TYPE,\n                           (PABLIO_READ | PABLIO_STEREO) );\n    if( err != paNoError ) goto error;\n    /* printf(\"opened input\\n\");  fflush(stdout); /**/\n\n    err = OpenAudioStream( &aOutStream, SAMPLE_RATE, SAMPLE_TYPE,\n                           (PABLIO_WRITE | PABLIO_STEREO) );\n    if( err != paNoError ) goto error;\n    /* printf(\"opened output\\n\");  fflush(stdout); /**/\n\n    /* Process samples in the foreground. */\n    index = 0;\n    for( i=0; i<(NUM_SECONDS * SAMPLE_RATE); i++ )\n    {\n        /* Write old frame of data to output. */\n        /* samples[index][1] = (i&256) * (1.0f/256.0f); /* sawtooth */\n        WriteAudioStream( aOutStream, &samples[index][0], 1 );\n\n        /* Read one frame of data into sample array for later output. */\n        ReadAudioStream( aInStream, &samples[index][0], 1 );\n        index += 1;\n        if( index >= NUM_ECHO_FRAMES ) index = 0;\n\n        if( (i & 0xFFFF) == 0 ) printf(\"i = %d\\n\", i ); fflush(stdout); /**/\n    }\n\n    CloseAudioStream( aOutStream );\n    CloseAudioStream( aInStream );\n\n    printf(\"R/W echo sound test complete.\\n\" );\n    fflush(stdout);\n    return 0;\n\nerror:\n    fprintf( stderr, \"An error occurred while using PortAudio\\n\" );\n    fprintf( stderr, \"Error number: %d\\n\", err );\n    fprintf( stderr, \"Error message: %s\\n\", Pa_GetErrorText( err ) );\n    return -1;\n}\n"
  },
  {
    "path": "thirdparty/portaudio/pablio/test_w_saw.c",
    "content": "/*\n * $Id$\n * test_w_saw.c\n * Generate stereo sawtooth waveforms.\n *\n * Author: Phil Burk, http://www.softsynth.com\n *\n * This program uses PABLIO, the Portable Audio Blocking I/O Library.\n * PABLIO is built on top of PortAudio, the Portable Audio Library.\n *\n * For more information see: http://www.portaudio.com\n * Copyright (c) 1999-2000 Ross Bencina and Phil Burk\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however, \n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also \n * requested that these non-binding requests be included along with the \n * license above.\n */\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <math.h>\n#include \"pablio.h\"\n#include <string.h>\n\n#define SAMPLE_RATE         (44100)\n#define NUM_SECONDS             (6)\n#define SAMPLES_PER_FRAME       (2)\n\n#define FREQUENCY           (220.0f)\n#define PHASE_INCREMENT     (2.0f * FREQUENCY / SAMPLE_RATE)\n#define FRAMES_PER_BLOCK    (100)\n\nfloat   samples[FRAMES_PER_BLOCK][SAMPLES_PER_FRAME];\nfloat   phases[SAMPLES_PER_FRAME];\n\n/*******************************************************************/\nint main(void);\nint main(void)\n{\n    int             i,j;\n    PaError         err;\n    PABLIO_Stream  *aOutStream;\n\n    printf(\"Generate sawtooth waves using PABLIO.\\n\");\n    fflush(stdout);\n\n    /* Open simplified blocking I/O layer on top of PortAudio. */\n    err = OpenAudioStream( &aOutStream, SAMPLE_RATE, paFloat32,\n                           (PABLIO_WRITE | PABLIO_STEREO) );\n    if( err != paNoError ) goto error;\n\n    /* Initialize oscillator phases. */\n    phases[0] = 0.0;\n    phases[1] = 0.0;\n\n    for( i=0; i<(NUM_SECONDS * SAMPLE_RATE); i += FRAMES_PER_BLOCK )\n    {\n        /* Generate sawtooth waveforms in a block for efficiency. */\n        for( j=0; j<FRAMES_PER_BLOCK; j++ )\n        {\n            /* Generate a sawtooth wave by incrementing a variable. */\n            phases[0] += PHASE_INCREMENT;\n            /* The signal range is -1.0 to +1.0 so wrap around if we go over. */\n            if( phases[0] > 1.0f ) phases[0] -= 2.0f;\n            samples[j][0] = phases[0];\n\n            /* On the second channel, generate a sawtooth wave a fifth higher. */\n            phases[1] += PHASE_INCREMENT * (3.0f / 2.0f);\n            if( phases[1] > 1.0f ) phases[1] -= 2.0f;\n            samples[j][1] = phases[1];\n        }\n\n        /* Write samples to output. */\n        WriteAudioStream( aOutStream, samples, FRAMES_PER_BLOCK );\n    }\n\n    CloseAudioStream( aOutStream );\n\n    printf(\"Sawtooth sound test complete.\\n\" );\n    fflush(stdout);\n    return 0;\n\nerror:\n    fprintf( stderr, \"An error occurred while using PABLIO\\n\" );\n    fprintf( stderr, \"Error number: %d\\n\", err );\n    fprintf( stderr, \"Error message: %s\\n\", Pa_GetErrorText( err ) );\n    return -1;\n}\n"
  },
  {
    "path": "thirdparty/portaudio/pablio/test_w_saw8.c",
    "content": "/*\n * $Id$\n * test_w_saw8.c\n * Generate stereo 8 bit sawtooth waveforms.\n *\n * Author: Phil Burk, http://www.softsynth.com\n *\n * This program uses PABLIO, the Portable Audio Blocking I/O Library.\n * PABLIO is built on top of PortAudio, the Portable Audio Library.\n *\n * For more information see: http://www.portaudio.com\n * Copyright (c) 1999-2000 Ross Bencina and Phil Burk\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however, \n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also \n * requested that these non-binding requests be included along with the \n * license above.\n */\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <math.h>\n#include \"pablio.h\"\n#include <string.h>\n\n#define SAMPLE_RATE         (22050)\n#define NUM_SECONDS             (6)\n#define SAMPLES_PER_FRAME       (2)\n\n\n#define FRAMES_PER_BLOCK    (100)\n\nunsigned char   samples[FRAMES_PER_BLOCK][SAMPLES_PER_FRAME];\nunsigned char   phases[SAMPLES_PER_FRAME];\n\n/*******************************************************************/\nint main(void);\nint main(void)\n{\n    int             i,j;\n    PaError         err;\n    PABLIO_Stream  *aOutStream;\n\n    printf(\"Generate unsigned 8 bit sawtooth waves using PABLIO.\\n\");\n    fflush(stdout);\n\n    /* Open simplified blocking I/O layer on top of PortAudio. */\n    err = OpenAudioStream( &aOutStream, SAMPLE_RATE, paUInt8,\n                           (PABLIO_WRITE | PABLIO_STEREO) );\n    if( err != paNoError ) goto error;\n\n    /* Initialize oscillator phases to \"ground\" level for paUInt8. */\n    phases[0] = 128;\n    phases[1] = 128;\n\n    for( i=0; i<(NUM_SECONDS * SAMPLE_RATE); i += FRAMES_PER_BLOCK )\n    {\n        /* Generate sawtooth waveforms in a block for efficiency. */\n        for( j=0; j<FRAMES_PER_BLOCK; j++ )\n        {\n            /* Generate a sawtooth wave by incrementing a variable. */\n            phases[0] += 1;\n            /* We don't have to do anything special to wrap when using paUint8 because\n             * 8 bit arithmetic automatically wraps. */\n            samples[j][0] = phases[0];\n\n            /* On the second channel, generate a higher sawtooth wave. */\n            phases[1] += 3;\n            samples[j][1] = phases[1];\n        }\n\n        /* Write samples to output. */\n        WriteAudioStream( aOutStream, samples, FRAMES_PER_BLOCK );\n    }\n\n    CloseAudioStream( aOutStream );\n\n    printf(\"Sawtooth sound test complete.\\n\" );\n    fflush(stdout);\n    return 0;\n\nerror:\n    fprintf( stderr, \"An error occurred while using PABLIO\\n\" );\n    fprintf( stderr, \"Error number: %d\\n\", err );\n    fprintf( stderr, \"Error message: %s\\n\", Pa_GetErrorText( err ) );\n    return -1;\n}\n"
  },
  {
    "path": "thirdparty/portaudio/portaudio-2.0.pc.in",
    "content": "prefix=@prefix@\nexec_prefix=@exec_prefix@\nlibdir=@libdir@\nincludedir=@includedir@\n\nName: PortAudio\nDescription: Portable audio I/O\nRequires:\nVersion: 19\n\nLibs: -L${libdir} -lportaudio @LIBS@\nCflags: -I${includedir} @THREAD_CFLAGS@\n"
  },
  {
    "path": "thirdparty/portaudio/qa/loopback/README.txt",
    "content": "README for PortAudio Loopback Test\n\nCopyright (c) 1999-2010 Phil Burk and Ross Bencina\nSee complete license at end of file.\n\nThis folder contains code for a single executable that does a standalone test of PortAudio.\nIt does not require a human to listen to the result. Instead it listens to itself using\na loopback cable connected between the audio output and the audio input. Special pop detectors\nand phase analysers can detect errors in the audio stream.\n\nThis test can be run from a script as part of a nightly build and test.\n\n--- How to Build the Loopback Test ---\n\nThe loopback test is not normally built by the makefile.\nTo build the loopback test, enter:\n\n  ./configure && make loopback\n  \nThis will build the \"bin/paloopback\" executable.\n  \n--- How To Run Test ---\n\nConnect stereo cables from one or more output audio devices to audio input devices. \nThe test will scan all the ports and find the cables.\n\nAdjust the volume levels of the hardware so you get a decent signal that will not clip.\n\nRun the test from the command line with the following options:\n\n  -i# Input device ID. Will scan for loopback if not specified.\n  -o# Output device ID. Will scan for loopback if not specified.\n  -r# Sample Rate in Hz. Will use multiple common rates if not specified.\n  -s# Size of callback buffer in frames, framesPerBuffer.\n  -w  Save bad recordings in a WAV file.\n  -dDir  Path for Directory for WAV files. Default is current directory.\n  -m  Just test the DSP Math code and not the audio devices.\n\nIf the -w option is set then any tests that fail will save the recording of the broken\nchannel in a WAV file. The files will be numbered and shown in the report.\n\n--- ToDo ---\n\n* Add check for harmonic and enharmonic distortion.\n* Measure min/max peak values.\n* Detect DC bias.\n* Test against matrix of devices/APIs and settings.\n* Detect mono vs stereo loopback.\n* More command line options\n   --quick\n   --latency\n   --duration\n* Automated build and test script with cron job.\n* Test on Windows.\n\n\n/*\n * PortAudio Portable Real-Time Audio Library\n * Latest Version at: http://www.portaudio.com\n *\n * Copyright (c) 1999-2008 Phil Burk and Ross Bencina\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however, \n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also \n * requested that these non-binding requests be included along with the \n * license above.\n */\n"
  },
  {
    "path": "thirdparty/portaudio/qa/loopback/src/audio_analyzer.c",
    "content": "\n/*\n * PortAudio Portable Real-Time Audio Library\n * Latest Version at: http://www.portaudio.com\n *\n * Copyright (c) 1999-2010 Phil Burk and Ross Bencina\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <assert.h>\n#include <math.h>\n#include \"qa_tools.h\"\n#include \"audio_analyzer.h\"\n#include \"write_wav.h\"\n\n#define PAQA_POP_THRESHOLD  (0.04)\n\n/*==========================================================================================*/\ndouble PaQa_GetNthFrequency( double baseFrequency, int index )\n{\n    // Use 13 tone equal tempered scale because it does not generate harmonic ratios.\n    return baseFrequency * pow( 2.0, index / 13.0 );\n}\n\n/*==========================================================================================*/\nvoid PaQa_EraseBuffer( float *buffer, int numFrames, int samplesPerFrame )\n{\n    int i;\n    int numSamples = numFrames * samplesPerFrame;\n    for( i=0; i<numSamples; i++ )\n    {\n        *buffer++ = 0.0;\n    }\n}\n\n/*==========================================================================================*/\nvoid PaQa_SetupSineGenerator( PaQaSineGenerator *generator, double frequency, double amplitude, double frameRate )\n{\n    generator->phase = 0.0;\n    generator->amplitude = amplitude;\n    generator->frequency = frequency;\n    generator->phaseIncrement = 2.0 * frequency * MATH_PI / frameRate;\n}\n\n/*==========================================================================================*/\nvoid PaQa_MixSine( PaQaSineGenerator *generator, float *buffer, int numSamples, int stride )\n{\n    int i;\n    for( i=0; i<numSamples; i++ )\n    {\n        float value = sinf( (float) generator->phase ) * generator->amplitude;\n        *buffer += value; // Mix with existing value.\n        buffer += stride;\n        // Advance phase and wrap around.\n        generator->phase += generator->phaseIncrement;\n        if (generator->phase > MATH_TWO_PI)\n        {\n            generator->phase -= MATH_TWO_PI;\n        }\n    }\n}\n\n/*==========================================================================================*/\nvoid PaQa_GenerateCrackDISABLED( float *buffer, int numSamples, int stride )\n{\n    int i;\n    int offset = numSamples/2;\n    for( i=0; i<numSamples; i++ )\n    {\n        float phase = (MATH_TWO_PI * 0.5 * (i - offset)) / numSamples;\n        float cosp = cosf( phase );\n        float cos2 = cosp * cosp;\n        // invert second half of signal\n        float value = (i < offset) ? cos2 : (0-cos2);\n        *buffer = value;\n        buffer += stride;\n    }\n}\n\n\n/*==========================================================================================*/\nint PaQa_InitializeRecording( PaQaRecording *recording, int maxFrames, int frameRate )\n{\n    int numBytes = maxFrames * sizeof(float);\n    recording->buffer = (float*)malloc(numBytes);\n    QA_ASSERT_TRUE( \"Allocate recording buffer.\", (recording->buffer != NULL) );\n    recording->maxFrames = maxFrames;    recording->sampleRate = frameRate;\n    recording->numFrames = 0;\n    return 0;\nerror:\n    return 1;\n}\n\n/*==========================================================================================*/\nvoid PaQa_TerminateRecording( PaQaRecording *recording )\n{\n    if (recording->buffer != NULL)\n    {\n        free( recording->buffer );\n        recording->buffer = NULL;\n    }\n    recording->maxFrames = 0;\n}\n\n/*==========================================================================================*/\nint PaQa_WriteRecording( PaQaRecording *recording, float *buffer, int numFrames, int stride )\n{\n    int i;\n    int framesToWrite;\n    float *data = &recording->buffer[recording->numFrames];\n\n    framesToWrite = numFrames;\n    if ((framesToWrite + recording->numFrames) > recording->maxFrames)\n    {\n        framesToWrite = recording->maxFrames - recording->numFrames;\n    }\n\n    for( i=0; i<framesToWrite; i++ )\n    {\n        *data++ = *buffer;\n        buffer += stride;\n    }\n    recording->numFrames += framesToWrite;\n    return (recording->numFrames >= recording->maxFrames);\n}\n\n/*==========================================================================================*/\nint PaQa_WriteSilence( PaQaRecording *recording, int numFrames )\n{\n    int i;\n    int framesToRecord;\n    float *data = &recording->buffer[recording->numFrames];\n\n    framesToRecord = numFrames;\n    if ((framesToRecord + recording->numFrames) > recording->maxFrames)\n    {\n        framesToRecord = recording->maxFrames - recording->numFrames;\n    }\n\n    for( i=0; i<framesToRecord; i++ )\n    {\n        *data++ = 0.0f;\n    }\n    recording->numFrames += framesToRecord;\n    return (recording->numFrames >= recording->maxFrames);\n}\n\n/*==========================================================================================*/\nint PaQa_RecordFreeze( PaQaRecording *recording, int numFrames )\n{\n    int i;\n    int framesToRecord;\n    float *data = &recording->buffer[recording->numFrames];\n\n    framesToRecord = numFrames;\n    if ((framesToRecord + recording->numFrames) > recording->maxFrames)\n    {\n        framesToRecord = recording->maxFrames - recording->numFrames;\n    }\n\n    for( i=0; i<framesToRecord; i++ )\n    {\n        // Copy old value forward as if the signal had frozen.\n        data[i] = data[i-1];\n    }\n    recording->numFrames += framesToRecord;\n    return (recording->numFrames >= recording->maxFrames);\n}\n\n/*==========================================================================================*/\n/**\n * Write recording to WAV file.\n */\nint PaQa_SaveRecordingToWaveFile( PaQaRecording *recording, const char *filename )\n{\n    WAV_Writer writer;\n    int result = 0;\n#define NUM_SAMPLES  (200)\n    short data[NUM_SAMPLES];\n    const int samplesPerFrame = 1;\n    int numLeft = recording->numFrames;\n    float *buffer = &recording->buffer[0];\n\n    result =  Audio_WAV_OpenWriter( &writer, filename, recording->sampleRate, samplesPerFrame );\n    if( result < 0 ) goto error;\n\n    while( numLeft > 0 )\n    {\n        int i;\n        int numToSave = (numLeft > NUM_SAMPLES) ? NUM_SAMPLES : numLeft;\n        // Convert double samples to shorts.\n        for( i=0; i<numToSave; i++ )\n        {\n            double fval = *buffer++;\n            // Convert float to int and clip to short range.\n            int ival = fval * 32768.0;\n            if( ival > 32767 ) ival = 32767;\n            else if( ival < -32768 ) ival = -32768;\n            data[i] = ival;\n        }\n        result =  Audio_WAV_WriteShorts( &writer, data, numToSave );\n        if( result < 0 ) goto error;\n        numLeft -= numToSave;\n    }\n\n    result =  Audio_WAV_CloseWriter( &writer );\n    if( result < 0 ) goto error;\n\n    return 0;\n\nerror:\n    printf(\"ERROR: result = %d\\n\", result );\n    return result;\n#undef NUM_SAMPLES\n}\n\n/*==========================================================================================*/\n\ndouble PaQa_MeasureCrossingSlope( float *buffer, int numFrames )\n{\n    int i;\n    double slopeTotal = 0.0;\n    int slopeCount = 0;\n    float previous;\n    double averageSlope = 0.0;\n\n    previous = buffer[0];\n    for( i=1; i<numFrames; i++ )\n    {\n        float current = buffer[i];\n        if( (current > 0.0) && (previous < 0.0) )\n        {\n            double delta = current - previous;\n            slopeTotal += delta;\n            slopeCount += 1;\n        }\n        previous = current;\n    }\n    if( slopeCount > 0 )\n    {\n        averageSlope = slopeTotal / slopeCount;\n    }\n    return averageSlope;\n}\n\n/*==========================================================================================*/\n/*\n * We can't just measure the peaks cuz they may be clipped.\n * But the zero crossing should be intact.\n * The measured slope of a sine wave at zero should be:\n *\n *   slope = sin( 2PI * frequency / sampleRate )\n *\n */\ndouble PaQa_MeasureSineAmplitudeBySlope( PaQaRecording *recording,\n                                         double frequency, double frameRate,\n                                         int startFrame, int numFrames )\n{\n    float *buffer = &recording->buffer[startFrame];\n    double measuredSlope = PaQa_MeasureCrossingSlope( buffer, numFrames );\n    double unitySlope = sin( MATH_TWO_PI * frequency / frameRate );\n    double estimatedAmplitude = measuredSlope / unitySlope;\n    return estimatedAmplitude;\n}\n\n/*==========================================================================================*/\ndouble PaQa_CorrelateSine( PaQaRecording *recording, double frequency, double frameRate,\n                           int startFrame, int numFrames, double *phasePtr )\n{\n    double magnitude = 0.0;\n    int numLeft = numFrames;\n    double phase = 0.0;\n    double phaseIncrement = 2.0 * MATH_PI * frequency / frameRate;\n    double sinAccumulator = 0.0;\n    double cosAccumulator = 0.0;\n    float *data = &recording->buffer[startFrame];\n\n    QA_ASSERT_TRUE( \"startFrame out of bounds\", (startFrame < recording->numFrames) );\n    QA_ASSERT_TRUE( \"numFrames out of bounds\", ((startFrame+numFrames) <= recording->numFrames) );\n\n    while( numLeft > 0 )\n    {\n        double sample = (double) *data++;\n        sinAccumulator += sample * sin( phase );\n        cosAccumulator += sample * cos( phase );\n        phase += phaseIncrement;\n        if (phase > MATH_TWO_PI)\n        {\n            phase -= MATH_TWO_PI;\n        }\n        numLeft -= 1;\n    }\n    sinAccumulator = sinAccumulator / numFrames;\n    cosAccumulator = cosAccumulator / numFrames;\n    // TODO Why do I have to multiply by 2.0? Need it to make result come out right.\n    magnitude = 2.0 * sqrt( (sinAccumulator * sinAccumulator) + (cosAccumulator * cosAccumulator ));\n    if( phasePtr != NULL )\n    {\n        double phase = atan2( cosAccumulator, sinAccumulator );\n        *phasePtr = phase;\n    }\n    return magnitude;\nerror:\n    return -1.0;\n}\n\n/*==========================================================================================*/\nvoid PaQa_FilterRecording( PaQaRecording *input, PaQaRecording *output, BiquadFilter *filter )\n{\n    int numToFilter = (input->numFrames > output->maxFrames) ? output->maxFrames : input->numFrames;\n    BiquadFilter_Filter( filter, &input->buffer[0], &output->buffer[0], numToFilter );\n    output->numFrames = numToFilter;\n}\n\n/*==========================================================================================*/\n/** Scan until we get a correlation of a single that goes over the tolerance level,\n * peaks then drops to half the peak.\n * Look for inverse correlation as well.\n */\ndouble PaQa_FindFirstMatch( PaQaRecording *recording, float *buffer, int numFrames, double threshold  )\n{\n    int ic,is;\n    // How many buffers will fit in the recording?\n    int maxCorrelations = recording->numFrames - numFrames;\n    double maxSum = 0.0;\n    int peakIndex = -1;\n    double inverseMaxSum = 0.0;\n    int inversePeakIndex = -1;\n    double location = -1.0;\n\n    QA_ASSERT_TRUE( \"numFrames out of bounds\", (numFrames < recording->numFrames) );\n\n    for( ic=0; ic<maxCorrelations; ic++ )\n    {\n        int pastPeak;\n        int inversePastPeak;\n\n        double sum = 0.0;\n        // Correlate buffer against the recording.\n        float *recorded = &recording->buffer[ ic ];\n        for( is=0; is<numFrames; is++ )\n        {\n            float s1 = buffer[is];\n            float s2 = *recorded++;\n            sum += s1 * s2;\n        }\n        if( (sum > maxSum) )\n        {\n            maxSum = sum;\n            peakIndex = ic;\n        }\n        if( ((-sum) > inverseMaxSum) )\n        {\n            inverseMaxSum = -sum;\n            inversePeakIndex = ic;\n        }\n        pastPeak = (maxSum > threshold) && (sum < 0.5*maxSum);\n        inversePastPeak = (inverseMaxSum > threshold) && ((-sum) < 0.5*inverseMaxSum);\n        //printf(\"PaQa_FindFirstMatch: ic = %4d, sum = %8f, maxSum = %8f, inverseMaxSum = %8f\\n\", ic, sum, maxSum, inverseMaxSum );\n        if( pastPeak && inversePastPeak )\n        {\n            if( maxSum > inverseMaxSum )\n            {\n                location = peakIndex;\n            }\n            else\n            {\n                location = inversePeakIndex;\n            }\n            break;\n        }\n\n    }\n    //printf(\"PaQa_FindFirstMatch: location = %4d\\n\", (int)location );\n    return location;\nerror:\n    return -1.0;\n}\n\n/*==========================================================================================*/\n// Measure the area under the curve by summing absolute value of each value.\ndouble PaQa_MeasureArea( float *buffer, int numFrames, int stride  )\n{\n    int is;\n    double area = 0.0;\n    for( is=0; is<numFrames; is++ )\n    {\n        area += fabs( *buffer );\n        buffer += stride;\n    }\n    return area;\n}\n\n/*==========================================================================================*/\n// Measure the area under the curve by summing absolute value of each value.\ndouble PaQa_MeasureRootMeanSquare( float *buffer, int numFrames )\n{\n    int is;\n    double area = 0.0;\n    double root;\n    for( is=0; is<numFrames; is++ )\n    {\n        float value = *buffer++;\n        area += value * value;\n    }\n    root = sqrt( area );\n    return root / numFrames;\n}\n\n\n/*==========================================================================================*/\n// Compare the amplitudes of these two signals.\n// Return ratio of recorded signal over buffer signal.\n\ndouble PaQa_CompareAmplitudes( PaQaRecording *recording, int startAt, float *buffer, int numFrames )\n{\n    QA_ASSERT_TRUE( \"startAt+numFrames out of bounds\", ((startAt+numFrames) < recording->numFrames) );\n\n    {\n        double recordedArea = PaQa_MeasureArea( &recording->buffer[startAt], numFrames, 1 );\n        double bufferArea = PaQa_MeasureArea( buffer, numFrames, 1 );\n        if( bufferArea == 0.0 ) return 100000000.0;\n        return recordedArea / bufferArea;\n    }\nerror:\n    return -1.0;\n}\n\n\n/*==========================================================================================*/\ndouble PaQa_ComputePhaseDifference( double phase1, double phase2 )\n{\n    double delta = phase1 - phase2;\n    while( delta > MATH_PI )\n    {\n        delta -= MATH_TWO_PI;\n    }\n    while( delta < -MATH_PI )\n    {\n        delta += MATH_TWO_PI;\n    }\n    return delta;\n}\n\n/*==========================================================================================*/\nint PaQa_MeasureLatency( PaQaRecording *recording, PaQaTestTone *testTone, PaQaAnalysisResult *analysisResult )\n{\n    double threshold;\n    PaQaSineGenerator generator;\n#define MAX_BUFFER_SIZE 2048\n    float buffer[MAX_BUFFER_SIZE];\n    double period = testTone->sampleRate / testTone->frequency;\n    int cycleSize = (int) (period + 0.5);\n    //printf(\"PaQa_AnalyseRecording: frequency = %8f, frameRate = %8f, period = %8f, cycleSize = %8d\\n\",\n    //       testTone->frequency, testTone->sampleRate, period, cycleSize );\n    analysisResult->latency = -1;\n    analysisResult->valid = (0);\n\n    // Set up generator to find matching first cycle.\n    QA_ASSERT_TRUE( \"cycleSize out of bounds\", (cycleSize < MAX_BUFFER_SIZE) );\n    PaQa_SetupSineGenerator( &generator, testTone->frequency, testTone->amplitude, testTone->sampleRate );\n    PaQa_EraseBuffer( buffer, cycleSize, testTone->samplesPerFrame );\n    PaQa_MixSine( &generator, buffer, cycleSize, testTone->samplesPerFrame );\n\n    threshold = cycleSize * 0.02;\n    analysisResult->latency = PaQa_FindFirstMatch( recording, buffer, cycleSize, threshold );\n    QA_ASSERT_TRUE( \"Could not find the start of the signal.\", (analysisResult->latency >= 0) );\n    analysisResult->amplitudeRatio = PaQa_CompareAmplitudes( recording, analysisResult->latency, buffer, cycleSize );\n    return 0;\nerror:\n    return -1;\n}\n\n/*==========================================================================================*/\n// Apply cosine squared window.\nvoid PaQa_FadeInRecording( PaQaRecording *recording, int startFrame, int count )\n{\n    int is;\n    double phase = 0.5 * MATH_PI;\n    // Advance a quarter wave\n    double phaseIncrement = 0.25 * 2.0 * MATH_PI / count;\n\n    assert( startFrame >= 0 );\n    assert( count > 0 );\n\n    /* Zero out initial part of the recording. */\n    for( is=0; is<startFrame; is++ )\n    {\n        recording->buffer[ is ] = 0.0f;\n    }\n    /* Fade in where signal begins. */\n    for( is=0; is<count; is++ )\n    {\n        double c = cos( phase );\n        double w = c * c;\n        float x = recording->buffer[ is + startFrame ];\n        float y = x * w;\n        //printf(\"FADE %d : w=%f, x=%f, y=%f\\n\", is, w, x, y );\n        recording->buffer[ is + startFrame ] = y;\n\n        phase += phaseIncrement;\n    }\n}\n\n\n/*==========================================================================================*/\n/** Apply notch filter and high pass filter then detect remaining energy.\n */\nint PaQa_DetectPop( PaQaRecording *recording, PaQaTestTone *testTone, PaQaAnalysisResult *analysisResult )\n{\n    int result = 0;\n    int i;\n    double maxAmplitude;\n    int maxPosition;\n\n    PaQaRecording     notchOutput = { 0 };\n    BiquadFilter      notchFilter;\n\n    PaQaRecording     hipassOutput = { 0 };\n    BiquadFilter      hipassFilter;\n\n    int frameRate = (int) recording->sampleRate;\n\n    analysisResult->popPosition = -1;\n    analysisResult->popAmplitude = 0.0;\n\n    result = PaQa_InitializeRecording( &notchOutput, recording->numFrames, frameRate );\n    QA_ASSERT_EQUALS( \"PaQa_InitializeRecording failed\", 0, result );\n\n    result = PaQa_InitializeRecording( &hipassOutput, recording->numFrames, frameRate );\n    QA_ASSERT_EQUALS( \"PaQa_InitializeRecording failed\", 0, result );\n\n    // Use notch filter to remove test tone.\n    BiquadFilter_SetupNotch( &notchFilter, testTone->frequency / frameRate, 0.5 );\n    PaQa_FilterRecording( recording, &notchOutput, &notchFilter );\n    //result = PaQa_SaveRecordingToWaveFile( &notchOutput, \"notch_output.wav\" );\n    //QA_ASSERT_EQUALS( \"PaQa_SaveRecordingToWaveFile failed\", 0, result );\n\n    // Apply fade-in window.\n    PaQa_FadeInRecording( &notchOutput, (int) analysisResult->latency, 500 );\n\n    // Use high pass to accentuate the edges of a pop. At higher frequency!\n    BiquadFilter_SetupHighPass( &hipassFilter, 2.0 * testTone->frequency / frameRate, 0.5 );\n    PaQa_FilterRecording( &notchOutput, &hipassOutput, &hipassFilter );\n    //result = PaQa_SaveRecordingToWaveFile( &hipassOutput, \"hipass_output.wav\" );\n    //QA_ASSERT_EQUALS( \"PaQa_SaveRecordingToWaveFile failed\", 0, result );\n\n    // Scan remaining signal looking for peak.\n    maxAmplitude = 0.0;\n    maxPosition = -1;\n    for( i=(int) analysisResult->latency; i<hipassOutput.numFrames; i++ )\n    {\n        float x = hipassOutput.buffer[i];\n        float mag = fabs( x );\n        if( mag > maxAmplitude )\n        {\n            maxAmplitude = mag;\n            maxPosition = i;\n        }\n    }\n\n    if( maxAmplitude > PAQA_POP_THRESHOLD )\n    {\n        analysisResult->popPosition = maxPosition;\n        analysisResult->popAmplitude = maxAmplitude;\n    }\n\n    PaQa_TerminateRecording( &notchOutput );\n    PaQa_TerminateRecording( &hipassOutput );\n    return 0;\n\nerror:\n    PaQa_TerminateRecording( &notchOutput );\n    PaQa_TerminateRecording( &hipassOutput );\n    return -1;\n}\n\n/*==========================================================================================*/\nint PaQa_DetectPhaseError( PaQaRecording *recording, PaQaTestTone *testTone, PaQaAnalysisResult *analysisResult )\n{\n    int i;\n    double period = testTone->sampleRate / testTone->frequency;\n    int cycleSize = (int) (period + 0.5);\n\n    double maxAddedFrames = 0.0;\n    double maxDroppedFrames = 0.0;\n\n    double previousPhase = 0.0;\n    double previousFrameError = 0;\n    int loopCount = 0;\n    int skip = cycleSize;\n    int windowSize = cycleSize;\n\n    // Scan recording starting with first cycle, looking for phase errors.\n    analysisResult->numDroppedFrames = 0.0;\n    analysisResult->numAddedFrames = 0.0;\n    analysisResult->droppedFramesPosition = -1.0;\n    analysisResult->addedFramesPosition = -1.0;\n\n    for( i=analysisResult->latency; i<(recording->numFrames - windowSize); i += skip )\n    {\n        double expectedPhase = previousPhase + (skip * MATH_TWO_PI / period);\n        double expectedPhaseIncrement = PaQa_ComputePhaseDifference( expectedPhase, previousPhase );\n\n        double phase = 666.0;\n        double mag = PaQa_CorrelateSine( recording, testTone->frequency, testTone->sampleRate, i, windowSize, &phase );\n        if( (loopCount > 1) && (mag > 0.0) )\n        {\n            double phaseDelta = PaQa_ComputePhaseDifference( phase, previousPhase );\n            double phaseError = PaQa_ComputePhaseDifference( phaseDelta, expectedPhaseIncrement );\n            // Convert phaseError to equivalent number of frames.\n            double frameError = period * phaseError / MATH_TWO_PI;\n            double consecutiveFrameError = frameError + previousFrameError;\n//            if( fabs(frameError) > 0.01 )\n//            {\n//                printf(\"FFFFFFFFFFFFF frameError = %f, at %d\\n\", frameError, i );\n//            }\n            if( consecutiveFrameError > 0.8 )\n            {\n                double droppedFrames = consecutiveFrameError;\n                if (droppedFrames > (maxDroppedFrames * 1.001))\n                {\n                    analysisResult->numDroppedFrames = droppedFrames;\n                    analysisResult->droppedFramesPosition = i + (windowSize/2);\n                    maxDroppedFrames = droppedFrames;\n                }\n            }\n            else if( consecutiveFrameError < -0.8 )\n            {\n                double addedFrames = 0 - consecutiveFrameError;\n                if (addedFrames > (maxAddedFrames * 1.001))\n                {\n                    analysisResult->numAddedFrames = addedFrames;\n                    analysisResult->addedFramesPosition = i + (windowSize/2);\n                    maxAddedFrames = addedFrames;\n                }\n            }\n            previousFrameError = frameError;\n\n\n            //if( i<8000 )\n            //{\n            //    printf(\"%d: phase = %8f, expected = %8f, delta = %8f, frameError = %8f\\n\", i, phase, expectedPhaseIncrement, phaseDelta, frameError );\n            //}\n        }\n        previousPhase = phase;\n        loopCount += 1;\n    }\n    return 0;\n}\n\n/*==========================================================================================*/\nint PaQa_AnalyseRecording( PaQaRecording *recording, PaQaTestTone *testTone, PaQaAnalysisResult *analysisResult )\n{\n    int result = 0;\n\n    memset( analysisResult, 0, sizeof(PaQaAnalysisResult) );\n    result = PaQa_MeasureLatency( recording, testTone, analysisResult );\n    QA_ASSERT_EQUALS( \"latency measurement\", 0, result );\n\n    if( (analysisResult->latency >= 0) && (analysisResult->amplitudeRatio > 0.1) )\n    {\n        analysisResult->valid = (1);\n\n        result = PaQa_DetectPop( recording, testTone, analysisResult );\n        QA_ASSERT_EQUALS( \"detect pop\", 0, result );\n\n        result = PaQa_DetectPhaseError( recording, testTone, analysisResult );\n        QA_ASSERT_EQUALS( \"detect phase error\", 0, result );\n    }\n    return 0;\nerror:\n    return -1;\n}\n"
  },
  {
    "path": "thirdparty/portaudio/qa/loopback/src/audio_analyzer.h",
    "content": "\n/*\n * PortAudio Portable Real-Time Audio Library\n * Latest Version at: http://www.portaudio.com\n *\n * Copyright (c) 1999-2010 Phil Burk and Ross Bencina\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n#ifndef _AUDIO_ANALYZER_H\n#define _AUDIO_ANALYZER_H\n\n#include \"biquad_filter.h\"\n\n#define MATH_PI  (3.141592653589793238462643)\n#define MATH_TWO_PI  (2.0 * MATH_PI)\n\ntypedef struct PaQaSineGenerator_s\n{\n    double    phase;\n    double    phaseIncrement;\n    double    frequency;\n    double    amplitude;\n} PaQaSineGenerator;\n\n/** Container for a monophonic audio sample in memory. */\ntypedef struct PaQaRecording_s\n{\n    /** Maximum number of frames that can fit in the allocated buffer. */\n    int       maxFrames;\n    float    *buffer;\n    /** Actual number of valid frames in the buffer. */\n    int       numFrames;\n    int       sampleRate;\n} PaQaRecording;\n\ntypedef struct PaQaTestTone_s\n{\n    int       samplesPerFrame;\n    int       startDelay;\n    double    sampleRate;\n    double    frequency;\n    double    amplitude;\n} PaQaTestTone;\n\ntypedef struct PaQaAnalysisResult_s\n{\n    int       valid;\n    /** Latency in samples from output to input. */\n    double    latency;\n    double    amplitudeRatio;\n    double    popAmplitude;\n    double    popPosition;\n    double    numDroppedFrames;\n    double    droppedFramesPosition;\n    double    numAddedFrames;\n    double    addedFramesPosition;\n} PaQaAnalysisResult;\n\n\n/*================================================================*/\n/*================= General DSP Tools ============================*/\n/*================================================================*/\n/**\n * Calculate Nth frequency of a series for use in testing multiple channels.\n * Series should avoid harmonic overlap between channels.\n */\ndouble PaQa_GetNthFrequency( double baseFrequency, int index );\n\nvoid PaQa_EraseBuffer( float *buffer, int numFrames, int samplesPerFrame );\n\nvoid PaQa_MixSine( PaQaSineGenerator *generator, float *buffer, int numSamples, int stride );\n\nvoid PaQa_WriteSine( float *buffer, int numSamples, int stride,\n                     double frequency, double amplitude );\n\n/**\n * Generate a signal with a sharp edge in the middle that can be recognized despite some phase shift.\n */\nvoid PaQa_GenerateCrack( float *buffer, int numSamples, int stride );\n\ndouble PaQa_ComputePhaseDifference( double phase1, double phase2 );\n\n/**\n * Measure the area under the curve by summing absolute value of each value.\n */\ndouble PaQa_MeasureArea( float *buffer, int numFrames, int stride  );\n\n/**\n * Measure slope of the positive zero crossings.\n */\ndouble PaQa_MeasureCrossingSlope( float *buffer, int numFrames );\n\n\n/**\n * Prepare an oscillator that can generate a sine tone for testing.\n */\nvoid PaQa_SetupSineGenerator( PaQaSineGenerator *generator, double frequency, double amplitude, double frameRate );\n\n/*================================================================*/\n/*================= Recordings ===================================*/\n/*================================================================*/\n/**\n * Allocate memory for containing a mono audio signal. Set up recording for writing.\n */\n int PaQa_InitializeRecording( PaQaRecording *recording, int maxSamples, int sampleRate );\n\n/**\n* Free memory allocated by PaQa_InitializeRecording.\n */\n void PaQa_TerminateRecording( PaQaRecording *recording );\n\n/**\n * Apply a biquad filter to the audio from the input recording and write it to the output recording.\n */\nvoid PaQa_FilterRecording( PaQaRecording *input, PaQaRecording *output, BiquadFilter *filter );\n\n\nint PaQa_SaveRecordingToWaveFile( PaQaRecording *recording, const char *filename );\n\n/**\n * @param stride is the spacing of samples to skip in the input buffer. To use every samples pass 1. To use every other sample pass 2.\n */\nint PaQa_WriteRecording( PaQaRecording *recording, float *buffer, int numSamples, int stride );\n\n/** Write zeros into a recording. */\nint PaQa_WriteSilence( PaQaRecording *recording, int numSamples );\n\nint PaQa_RecordFreeze( PaQaRecording *recording, int numSamples );\n\ndouble PaQa_CorrelateSine( PaQaRecording *recording, double frequency, double frameRate,\n                           int startFrame, int numSamples, double *phasePtr );\n\ndouble PaQa_FindFirstMatch( PaQaRecording *recording, float *buffer, int numSamples, double tolerance  );\n\n/**\n * Estimate the original amplitude of a clipped sine wave by measuring\n * its average slope at the zero crossings.\n */\ndouble PaQa_MeasureSineAmplitudeBySlope( PaQaRecording *recording,\n                                         double frequency, double frameRate,\n                                         int startFrame, int numFrames );\n\ndouble PaQa_MeasureRootMeanSquare( float *buffer, int numFrames );\n\n/**\n * Compare the amplitudes of these two signals.\n * Return ratio of recorded signal over buffer signal.\n */\ndouble PaQa_CompareAmplitudes( PaQaRecording *recording, int startAt, float *buffer, int numSamples );\n\n/**\n * Analyse a recording of a sine wave.\n * Measure latency and look for dropped frames, etc.\n */\nint PaQa_AnalyseRecording( PaQaRecording *recording, PaQaTestTone *testTone, PaQaAnalysisResult *analysisResult );\n\n#endif /* _AUDIO_ANALYZER_H */\n"
  },
  {
    "path": "thirdparty/portaudio/qa/loopback/src/biquad_filter.c",
    "content": "#include <math.h>\n#include <string.h>\n\n#include \"biquad_filter.h\"\n\n/**\n *  Unit_BiquadFilter implements a second order IIR filter.\n *\n *  Here is the equation that we use for this filter:\n *      y(n) = a0*x(n) + a1*x(n-1)  + a2*x(n-2) - b1*y(n-1)  - b2*y(n-2)\n *\n * @author (C) 2002 Phil Burk, SoftSynth.com, All Rights Reserved\n */\n\n#define FILTER_PI  (3.141592653589793238462643)\n/***********************************************************\n** Calculate coefficients common to many parametric biquad filters.\n*/\nstatic void BiquadFilter_CalculateCommon( BiquadFilter *filter, double ratio, double Q )\n{\n    double omega;\n\n    memset( filter, 0, sizeof(BiquadFilter) );\n\n/* Don't let frequency get too close to Nyquist or filter will blow up. */\n    if( ratio >= 0.499 ) ratio = 0.499;\n    omega = 2.0 * (double)FILTER_PI * ratio;\n\n    filter->cos_omega = (double) cos( omega );\n    filter->sin_omega = (double) sin( omega );\n    filter->alpha = filter->sin_omega / (2.0 * Q);\n}\n\n/*********************************************************************************\n ** Calculate coefficients for Highpass filter.\n */\nvoid BiquadFilter_SetupHighPass( BiquadFilter *filter, double ratio, double Q )\n{\n    double    scalar, opc;\n\n    if( ratio  < BIQUAD_MIN_RATIO )  ratio  = BIQUAD_MIN_RATIO;\n    if( Q < BIQUAD_MIN_Q ) Q = BIQUAD_MIN_Q;\n\n    BiquadFilter_CalculateCommon( filter, ratio, Q );\n\n    scalar = 1.0 / (1.0 + filter->alpha);\n    opc = (1.0 + filter->cos_omega);\n\n    filter->a0 = opc * 0.5 * scalar;\n    filter->a1 =  - opc * scalar;\n    filter->a2 = filter->a0;\n    filter->b1 = -2.0 * filter->cos_omega * scalar;\n    filter->b2 = (1.0 - filter->alpha) * scalar;\n}\n\n\n/*********************************************************************************\n ** Calculate coefficients for Notch filter.\n */\nvoid BiquadFilter_SetupNotch( BiquadFilter *filter, double ratio, double Q )\n{\n    double    scalar, opc;\n\n    if( ratio  < BIQUAD_MIN_RATIO )  ratio  = BIQUAD_MIN_RATIO;\n    if( Q < BIQUAD_MIN_Q ) Q = BIQUAD_MIN_Q;\n\n    BiquadFilter_CalculateCommon( filter, ratio, Q );\n\n    scalar = 1.0 / (1.0 + filter->alpha);\n    opc = (1.0 + filter->cos_omega);\n\n    filter->a0 = scalar;\n    filter->a1 =  -2.0 * filter->cos_omega * scalar;\n    filter->a2 = filter->a0;\n    filter->b1 = filter->a1;\n    filter->b2 = (1.0 - filter->alpha) * scalar;\n}\n\n/*****************************************************************\n** Perform core IIR filter calculation without permutation.\n*/\nvoid BiquadFilter_Filter( BiquadFilter *filter, float *inputs, float *outputs, int numSamples )\n{\n    int i;\n    double xn, yn;\n    // Pull values from structure to speed up the calculation.\n    double a0 = filter->a0;\n    double a1 = filter->a1;\n    double a2 = filter->a2;\n    double b1 = filter->b1;\n    double b2 = filter->b2;\n    double xn1 = filter->xn1;\n    double xn2 = filter->xn2;\n    double yn1 = filter->yn1;\n    double yn2 = filter->yn2;\n\n    for( i=0; i<numSamples; i++)\n    {\n        // Generate outputs by filtering inputs.\n        xn = inputs[i];\n        yn = (a0 * xn) + (a1 * xn1) + (a2 * xn2) - (b1 * yn1) - (b2 * yn2);\n        outputs[i] = yn;\n\n        // Delay input and output values.\n        xn2 = xn1;\n        xn1 = xn;\n        yn2 = yn1;\n        yn1 = yn;\n\n        if( (i & 7) == 0 )\n        {\n            // Apply a small bipolar impulse to filter to prevent arithmetic underflow.\n            // Underflows can cause the FPU to interrupt the CPU.\n            yn1 += (double) 1.0E-26;\n            yn2 -= (double) 1.0E-26;\n        }\n    }\n\n    filter->xn1 = xn1;\n    filter->xn2 = xn2;\n    filter->yn1 = yn1;\n    filter->yn2 = yn2;\n}\n"
  },
  {
    "path": "thirdparty/portaudio/qa/loopback/src/biquad_filter.h",
    "content": "#ifndef _BIQUADFILTER_H\n#define _BIQUADFILTER_H\n\n\n/**\n * Unit_BiquadFilter implements a second order IIR filter.\n *\n * @author (C) 2002 Phil Burk, SoftSynth.com, All Rights Reserved\n */\n\n#define BIQUAD_MIN_RATIO     (0.000001)\n#define BIQUAD_MIN_Q         (0.00001)\n\ntypedef struct BiquadFilter_s\n{\n    double      xn1;    // storage for delayed signals\n    double      xn2;\n    double      yn1;\n    double      yn2;\n\n    double      a0;     // coefficients\n    double      a1;\n    double      a2;\n\n    double      b1;\n    double      b2;\n\n    double      cos_omega;\n    double      sin_omega;\n    double      alpha;\n} BiquadFilter;\n\nvoid BiquadFilter_SetupHighPass( BiquadFilter *filter, double ratio, double Q );\nvoid BiquadFilter_SetupNotch( BiquadFilter *filter, double ratio, double Q );\n\nvoid BiquadFilter_Filter( BiquadFilter *filter, float *inputs, float *outputs, int numSamples );\n\n#endif\n"
  },
  {
    "path": "thirdparty/portaudio/qa/loopback/src/paqa.c",
    "content": "\n/*\n * PortAudio Portable Real-Time Audio Library\n * Latest Version at: http://www.portaudio.com\n *\n * Copyright (c) 1999-2010 Phil Burk and Ross Bencina\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <memory.h>\n#include <math.h>\n#include <string.h>\n\n#include \"portaudio.h\"\n\n#include \"qa_tools.h\"\n\n#include \"paqa_tools.h\"\n#include \"audio_analyzer.h\"\n#include \"test_audio_analyzer.h\"\n\n/** Accumulate counts for how many tests pass or fail. */\nint g_testsPassed = 0;\nint g_testsFailed = 0;\n\n#define MAX_NUM_GENERATORS                   (8)\n#define MAX_NUM_RECORDINGS                   (8)\n#define MAX_BACKGROUND_NOISE_RMS             (0.0004)\n#define LOOPBACK_DETECTION_DURATION_SECONDS  (0.8)\n#define DEFAULT_FRAMES_PER_BUFFER            (0)\n#define PAQA_WAIT_STREAM_MSEC                (100)\n#define PAQA_TEST_DURATION                   (1.2)\n\n// Use two separate streams instead of one full duplex stream.\n#define PAQA_FLAG_TWO_STREAMS       (1<<0)\n// Use bloching read/write for loopback.\n#define PAQA_FLAG_USE_BLOCKING_IO   (1<<1)\n\nconst char * s_FlagOnNames[] =\n{\n    \"Two Streams (Half Duplex)\",\n    \"Blocking Read/Write\"\n};\n\nconst char * s_FlagOffNames[] =\n{\n    \"One Stream (Full Duplex)\",\n    \"Callback\"\n};\n\n\n/** Parameters that describe a single test run. */\ntypedef struct TestParameters_s\n{\n    PaStreamParameters inputParameters;\n    PaStreamParameters outputParameters;\n    double             sampleRate;\n    int                samplesPerFrame;\n    int                framesPerBuffer;\n    int                maxFrames;\n    double             baseFrequency;\n    double             amplitude;\n    PaStreamFlags      streamFlags;  // paClipOff, etc\n    int                flags;        // PAQA_FLAG_TWO_STREAMS, PAQA_FLAG_USE_BLOCKING_IO\n} TestParameters;\n\ntypedef struct LoopbackContext_s\n{\n    // Generate a unique signal on each channel.\n    PaQaSineGenerator  generators[MAX_NUM_GENERATORS];\n    // Record each channel individually.\n    PaQaRecording      recordings[MAX_NUM_RECORDINGS];\n\n    // Reported by the stream after it's opened\n    PaTime             streamInfoInputLatency;\n    PaTime             streamInfoOutputLatency;\n\n    // Measured at runtime.\n    volatile int       callbackCount; // incremented for each callback\n    volatile int       inputBufferCount; // incremented if input buffer not NULL\n    int                inputUnderflowCount;\n    int                inputOverflowCount;\n\n    volatile int       outputBufferCount; // incremented if output buffer not NULL\n    int                outputOverflowCount;\n    int                outputUnderflowCount;\n\n    // Measure whether input or output is lagging behind.\n    volatile int       minInputOutputDelta;\n    volatile int       maxInputOutputDelta;\n\n    int                minFramesPerBuffer;\n    int                maxFramesPerBuffer;\n    int                primingCount;\n    TestParameters    *test;\n    volatile int       done;\n} LoopbackContext;\n\ntypedef struct UserOptions_s\n{\n    int           sampleRate;\n    int           framesPerBuffer;\n    int           inputLatency;\n    int           outputLatency;\n    int           saveBadWaves;\n    int           verbose;\n    int           waveFileCount;\n    const char   *waveFilePath;\n    PaDeviceIndex inputDevice;\n    PaDeviceIndex outputDevice;\n} UserOptions;\n\n#define BIG_BUFFER_SIZE  (sizeof(float) * 2 * 2 * 1024)\nstatic unsigned char g_ReadWriteBuffer[BIG_BUFFER_SIZE];\n\n#define MAX_CONVERSION_SAMPLES   (2 * 32 * 1024)\n#define CONVERSION_BUFFER_SIZE  (sizeof(float) * 2 * MAX_CONVERSION_SAMPLES)\nstatic unsigned char g_ConversionBuffer[CONVERSION_BUFFER_SIZE];\n\n/*******************************************************************/\nstatic int RecordAndPlaySinesCallback( const void *inputBuffer, void *outputBuffer,\n                        unsigned long framesPerBuffer,\n                        const PaStreamCallbackTimeInfo* timeInfo,\n                        PaStreamCallbackFlags statusFlags,\n                        void *userData )\n{\n    int i;\n    LoopbackContext *loopbackContext = (LoopbackContext *) userData;\n\n\n    loopbackContext->callbackCount += 1;\n    if( statusFlags & paInputUnderflow ) loopbackContext->inputUnderflowCount += 1;\n    if( statusFlags & paInputOverflow ) loopbackContext->inputOverflowCount += 1;\n    if( statusFlags & paOutputUnderflow ) loopbackContext->outputUnderflowCount += 1;\n    if( statusFlags & paOutputOverflow ) loopbackContext->outputOverflowCount += 1;\n    if( statusFlags & paPrimingOutput ) loopbackContext->primingCount += 1;\n    if( framesPerBuffer > loopbackContext->maxFramesPerBuffer )\n    {\n        loopbackContext->maxFramesPerBuffer = framesPerBuffer;\n    }\n    if( framesPerBuffer < loopbackContext->minFramesPerBuffer )\n    {\n        loopbackContext->minFramesPerBuffer = framesPerBuffer;\n    }\n\n    /* This may get called with NULL inputBuffer during initial setup.\n     * We may also use the same callback with output only streams.\n     */\n    if( inputBuffer != NULL)\n    {\n        int channelsPerFrame = loopbackContext->test->inputParameters.channelCount;\n        float *in = (float *)inputBuffer;\n        PaSampleFormat inFormat = loopbackContext->test->inputParameters.sampleFormat;\n\n        loopbackContext->inputBufferCount += 1;\n\n        if( inFormat != paFloat32 )\n        {\n            int samplesToConvert = framesPerBuffer * channelsPerFrame;\n            in = (float *) g_ConversionBuffer;\n            if( samplesToConvert > MAX_CONVERSION_SAMPLES )\n            {\n                // Hack to prevent buffer overflow.\n                // @todo Loop with small buffer instead of failing.\n                printf(\"Format conversion buffer too small!\\n\");\n                return paComplete;\n            }\n            PaQa_ConvertToFloat( inputBuffer, samplesToConvert, inFormat, (float *) g_ConversionBuffer );\n        }\n\n        // Read each channel from the buffer.\n        for( i=0; i<channelsPerFrame; i++ )\n        {\n            loopbackContext->done |= PaQa_WriteRecording( &loopbackContext->recordings[i],\n                                        in + i,\n                                        framesPerBuffer,\n                                        channelsPerFrame );\n        }\n    }\n\n    if( outputBuffer != NULL )\n    {\n        int channelsPerFrame = loopbackContext->test->outputParameters.channelCount;\n        float *out = (float *)outputBuffer;\n        PaSampleFormat outFormat = loopbackContext->test->outputParameters.sampleFormat;\n\n        loopbackContext->outputBufferCount += 1;\n\n        if( outFormat != paFloat32 )\n        {\n            // If we need to convert then mix to the g_ConversionBuffer and then convert into the PA outputBuffer.\n            out = (float *) g_ConversionBuffer;\n        }\n\n        PaQa_EraseBuffer( out, framesPerBuffer, channelsPerFrame );\n        for( i=0; i<channelsPerFrame; i++ )\n        {\n            PaQa_MixSine( &loopbackContext->generators[i],\n                         out + i,\n                         framesPerBuffer,\n                         channelsPerFrame );\n        }\n\n        if( outFormat != paFloat32 )\n        {\n            int samplesToConvert = framesPerBuffer * channelsPerFrame;\n            if( samplesToConvert > MAX_CONVERSION_SAMPLES )\n            {\n                printf(\"Format conversion buffer too small!\\n\");\n                return paComplete;\n            }\n            PaQa_ConvertFromFloat( out, framesPerBuffer * channelsPerFrame, outFormat, outputBuffer );\n        }\n\n    }\n\n    // Measure whether the input or output are lagging behind.\n    // Don't measure lag at end.\n    if( !loopbackContext->done )\n    {\n        int inputOutputDelta = loopbackContext->inputBufferCount - loopbackContext->outputBufferCount;\n        if( loopbackContext->maxInputOutputDelta < inputOutputDelta )\n        {\n            loopbackContext->maxInputOutputDelta = inputOutputDelta;\n        }\n        if( loopbackContext->minInputOutputDelta > inputOutputDelta )\n        {\n            loopbackContext->minInputOutputDelta = inputOutputDelta;\n        }\n    }\n\n    return loopbackContext->done ? paComplete : paContinue;\n}\n\nstatic void CopyStreamInfoToLoopbackContext( LoopbackContext *loopbackContext, PaStream *inputStream, PaStream *outputStream )\n{\n    const PaStreamInfo *inputStreamInfo = Pa_GetStreamInfo( inputStream );\n    const PaStreamInfo *outputStreamInfo = Pa_GetStreamInfo( outputStream );\n\n    loopbackContext->streamInfoInputLatency = inputStreamInfo ? inputStreamInfo->inputLatency : -1;\n    loopbackContext->streamInfoOutputLatency = outputStreamInfo ? outputStreamInfo->outputLatency : -1;\n}\n\n/*******************************************************************/\n/**\n * Open a full duplex audio stream.\n * Generate sine waves on the output channels and record the input channels.\n * Then close the stream.\n * @return 0 if OK or negative error.\n */\nint PaQa_RunLoopbackFullDuplex( LoopbackContext *loopbackContext )\n{\n    PaStream *stream = NULL;\n    PaError err = 0;\n    TestParameters *test = loopbackContext->test;\n    loopbackContext->done = 0;\n    // Use one full duplex stream.\n    err = Pa_OpenStream(\n                    &stream,\n                    &test->inputParameters,\n                    &test->outputParameters,\n                    test->sampleRate,\n                    test->framesPerBuffer,\n                    paClipOff, /* we won't output out of range samples so don't bother clipping them */\n                    RecordAndPlaySinesCallback,\n                    loopbackContext );\n    if( err != paNoError ) goto error;\n\n    CopyStreamInfoToLoopbackContext( loopbackContext, stream, stream );\n\n    err = Pa_StartStream( stream );\n    if( err != paNoError ) goto error;\n\n    // Wait for stream to finish.\n    while( loopbackContext->done == 0 )\n    {\n        Pa_Sleep(PAQA_WAIT_STREAM_MSEC);\n    }\n\n    err = Pa_StopStream( stream );\n    if( err != paNoError ) goto error;\n\n    err = Pa_CloseStream( stream );\n    if( err != paNoError ) goto error;\n\n    return 0;\n\nerror:\n    return err;\n}\n\n/*******************************************************************/\n/**\n * Open two audio streams, one for input and one for output.\n * Generate sine waves on the output channels and record the input channels.\n * Then close the stream.\n * @return 0 if OK or paTimedOut.\n */\n\nint PaQa_WaitForStream( LoopbackContext *loopbackContext )\n{\n    int timeoutMSec = 1000 * PAQA_TEST_DURATION * 2;\n\n    // Wait for stream to finish or timeout.\n    while( (loopbackContext->done == 0) && (timeoutMSec > 0) )\n    {\n        Pa_Sleep(PAQA_WAIT_STREAM_MSEC);\n        timeoutMSec -= PAQA_WAIT_STREAM_MSEC;\n    }\n\n    if( loopbackContext->done == 0 )\n    {\n        printf(\"ERROR - stream completion timed out!\");\n        return paTimedOut;\n    }\n    return 0;\n}\n\n/*******************************************************************/\n/**\n * Open two audio streams, one for input and one for output.\n * Generate sine waves on the output channels and record the input channels.\n * Then close the stream.\n * @return 0 if OK or negative error.\n */\nint PaQa_RunLoopbackHalfDuplex( LoopbackContext *loopbackContext )\n{\n    PaStream *inStream = NULL;\n    PaStream *outStream = NULL;\n    PaError err = 0;\n    int timedOut = 0;\n    TestParameters *test = loopbackContext->test;\n    loopbackContext->done = 0;\n\n    // Use two half duplex streams.\n    err = Pa_OpenStream(\n                        &inStream,\n                        &test->inputParameters,\n                        NULL,\n                        test->sampleRate,\n                        test->framesPerBuffer,\n                        test->streamFlags,\n                        RecordAndPlaySinesCallback,\n                        loopbackContext );\n    if( err != paNoError ) goto error;\n    err = Pa_OpenStream(\n                        &outStream,\n                        NULL,\n                        &test->outputParameters,\n                        test->sampleRate,\n                        test->framesPerBuffer,\n                        test->streamFlags,\n                        RecordAndPlaySinesCallback,\n                        loopbackContext );\n    if( err != paNoError ) goto error;\n\n    CopyStreamInfoToLoopbackContext( loopbackContext, inStream, outStream );\n\n    err = Pa_StartStream( inStream );\n    if( err != paNoError ) goto error;\n\n    // Start output later so we catch the beginning of the waveform.\n    err = Pa_StartStream( outStream );\n    if( err != paNoError ) goto error;\n\n    timedOut = PaQa_WaitForStream( loopbackContext );\n\n    err = Pa_StopStream( inStream );\n    if( err != paNoError ) goto error;\n\n    err = Pa_StopStream( outStream );\n    if( err != paNoError ) goto error;\n\n    err = Pa_CloseStream( inStream );\n    if( err != paNoError ) goto error;\n\n    err = Pa_CloseStream( outStream );\n    if( err != paNoError ) goto error;\n\n    return timedOut;\n\nerror:\n    return err;\n}\n\n\n/*******************************************************************/\n/**\n * Open one audio streams, just for input.\n * Record background level.\n * Then close the stream.\n * @return 0 if OK or negative error.\n */\nint PaQa_RunInputOnly( LoopbackContext *loopbackContext )\n{\n    PaStream *inStream = NULL;\n    PaError err = 0;\n    int timedOut = 0;\n    TestParameters *test = loopbackContext->test;\n    loopbackContext->done = 0;\n\n    // Just open an input stream.\n    err = Pa_OpenStream(\n                        &inStream,\n                        &test->inputParameters,\n                        NULL,\n                        test->sampleRate,\n                        test->framesPerBuffer,\n                        paClipOff, /* We won't output out of range samples so don't bother clipping them. */\n                        RecordAndPlaySinesCallback,\n                        loopbackContext );\n    if( err != paNoError ) goto error;\n\n    err = Pa_StartStream( inStream );\n    if( err != paNoError ) goto error;\n\n    timedOut = PaQa_WaitForStream( loopbackContext );\n\n    err = Pa_StopStream( inStream );\n    if( err != paNoError ) goto error;\n\n    err = Pa_CloseStream( inStream );\n    if( err != paNoError ) goto error;\n\n    return timedOut;\n\nerror:\n    return err;\n}\n\n/*******************************************************************/\nstatic int RecordAndPlayBlockingIO( PaStream *inStream,\n                                      PaStream *outStream,\n                                      LoopbackContext *loopbackContext\n                                      )\n{\n    int i;\n    float *in = (float *)g_ReadWriteBuffer;\n    float *out = (float *)g_ReadWriteBuffer;\n    PaError err;\n    int done = 0;\n    long available;\n    const long maxPerBuffer = 64;\n    TestParameters *test = loopbackContext->test;\n    long framesPerBuffer = test->framesPerBuffer;\n    if( framesPerBuffer <= 0 )\n    {\n        framesPerBuffer = maxPerBuffer; // bigger values might run past end of recording\n    }\n\n    // Read in audio.\n    err = Pa_ReadStream( inStream, in, framesPerBuffer );\n    // Ignore an overflow on the first read.\n    //if( !((loopbackContext->callbackCount == 0) && (err == paInputOverflowed)) )\n    if( err != paInputOverflowed )\n    {\n        QA_ASSERT_EQUALS( \"Pa_ReadStream failed\", paNoError, err );\n    }\n    else\n    {\n        loopbackContext->inputOverflowCount += 1;\n    }\n\n\n    // Save in a recording.\n    for( i=0; i<loopbackContext->test->inputParameters.channelCount; i++ )\n    {\n        done |= PaQa_WriteRecording( &loopbackContext->recordings[i],\n                 in + i,\n                 framesPerBuffer,\n                 loopbackContext->test->inputParameters.channelCount );\n    }\n\n    // Synthesize audio.\n    available = Pa_GetStreamWriteAvailable( outStream );\n    if( available > (2*framesPerBuffer) ) available = (2*framesPerBuffer);\n    PaQa_EraseBuffer( out, available, loopbackContext->test->outputParameters.channelCount );\n    for( i=0; i<loopbackContext->test->outputParameters.channelCount; i++ )\n    {\n        PaQa_MixSine( &loopbackContext->generators[i],\n                  out + i,\n                  available,\n                  loopbackContext->test->outputParameters.channelCount );\n    }\n\n    // Write out audio.\n    err = Pa_WriteStream( outStream, out, available );\n    // Ignore an underflow on the first write.\n    //if( !((loopbackContext->callbackCount == 0) && (err == paOutputUnderflowed)) )\n    if( err != paOutputUnderflowed )\n    {\n        QA_ASSERT_EQUALS( \"Pa_WriteStream failed\", paNoError, err );\n    }\n    else\n    {\n        loopbackContext->outputUnderflowCount += 1;\n    }\n\n\n    loopbackContext->callbackCount += 1;\n\n    return done;\nerror:\n    return err;\n}\n\n\n/*******************************************************************/\n/**\n * Open two audio streams with non-blocking IO.\n * Generate sine waves on the output channels and record the input channels.\n * Then close the stream.\n * @return 0 if OK or negative error.\n */\nint PaQa_RunLoopbackHalfDuplexBlockingIO( LoopbackContext *loopbackContext )\n{\n    PaStream *inStream = NULL;\n    PaStream *outStream = NULL;\n    PaError err = 0;\n    TestParameters *test = loopbackContext->test;\n\n    // Use two half duplex streams.\n    err = Pa_OpenStream(\n                        &inStream,\n                        &test->inputParameters,\n                        NULL,\n                        test->sampleRate,\n                        test->framesPerBuffer,\n                        paClipOff, /* we won't output out of range samples so don't bother clipping them */\n                        NULL, // causes non-blocking IO\n                        NULL );\n    if( err != paNoError ) goto error1;\n    err = Pa_OpenStream(\n                        &outStream,\n                        NULL,\n                        &test->outputParameters,\n                        test->sampleRate,\n                        test->framesPerBuffer,\n                        paClipOff, /* we won't output out of range samples so don't bother clipping them */\n                        NULL, // causes non-blocking IO\n                        NULL );\n    if( err != paNoError ) goto error2;\n\n    CopyStreamInfoToLoopbackContext( loopbackContext, inStream, outStream );\n\n    err = Pa_StartStream( outStream );\n    if( err != paNoError ) goto error3;\n\n    err = Pa_StartStream( inStream );\n    if( err != paNoError ) goto error3;\n\n    while( err == 0 )\n    {\n        err = RecordAndPlayBlockingIO( inStream, outStream, loopbackContext );\n        if( err < 0 ) goto error3;\n    }\n\n    err = Pa_StopStream( inStream );\n    if( err != paNoError ) goto error3;\n\n    err = Pa_StopStream( outStream );\n    if( err != paNoError ) goto error3;\n\n    err = Pa_CloseStream( outStream );\n    if( err != paNoError ) goto error2;\n\n    err = Pa_CloseStream( inStream );\n    if( err != paNoError ) goto error1;\n\n\n    return 0;\n\nerror3:\n    Pa_CloseStream( outStream );\nerror2:\n    Pa_CloseStream( inStream );\nerror1:\n    return err;\n}\n\n\n/*******************************************************************/\n/**\n * Open one audio stream with non-blocking IO.\n * Generate sine waves on the output channels and record the input channels.\n * Then close the stream.\n * @return 0 if OK or negative error.\n */\nint PaQa_RunLoopbackFullDuplexBlockingIO( LoopbackContext *loopbackContext )\n{\n    PaStream *stream = NULL;\n    PaError err = 0;\n    TestParameters *test = loopbackContext->test;\n\n    // Use one full duplex stream.\n    err = Pa_OpenStream(\n                        &stream,\n                        &test->inputParameters,\n                        &test->outputParameters,\n                        test->sampleRate,\n                        test->framesPerBuffer,\n                        paClipOff, /* we won't output out of range samples so don't bother clipping them */\n                        NULL, // causes non-blocking IO\n                        NULL );\n    if( err != paNoError ) goto error1;\n\n    CopyStreamInfoToLoopbackContext( loopbackContext, stream, stream );\n\n    err = Pa_StartStream( stream );\n    if( err != paNoError ) goto error2;\n\n    while( err == 0 )\n    {\n        err = RecordAndPlayBlockingIO( stream, stream, loopbackContext );\n        if( err < 0 ) goto error2;\n    }\n\n    err = Pa_StopStream( stream );\n    if( err != paNoError ) goto error2;\n\n\n    err = Pa_CloseStream( stream );\n    if( err != paNoError ) goto error1;\n\n\n    return 0;\n\nerror2:\n    Pa_CloseStream( stream );\nerror1:\n    return err;\n}\n\n\n/*******************************************************************/\n/**\n * Run some kind of loopback test.\n * @return 0 if OK or negative error.\n */\nint PaQa_RunLoopback( LoopbackContext *loopbackContext )\n{\n    PaError err = 0;\n    TestParameters *test = loopbackContext->test;\n\n\n    if( test->flags & PAQA_FLAG_TWO_STREAMS )\n    {\n        if( test->flags & PAQA_FLAG_USE_BLOCKING_IO )\n        {\n            err = PaQa_RunLoopbackHalfDuplexBlockingIO( loopbackContext );\n        }\n        else\n        {\n            err = PaQa_RunLoopbackHalfDuplex( loopbackContext );\n        }\n    }\n    else\n    {\n        if( test->flags & PAQA_FLAG_USE_BLOCKING_IO )\n        {\n            err = PaQa_RunLoopbackFullDuplexBlockingIO( loopbackContext );\n        }\n        else\n        {\n            err = PaQa_RunLoopbackFullDuplex( loopbackContext );\n        }\n    }\n\n    if( err != paNoError )\n    {\n        printf(\"PortAudio error = %s\\n\", Pa_GetErrorText( err ) );\n    }\n    return err;\n}\n\n/*******************************************************************/\nstatic int PaQa_SaveTestResultToWaveFile( UserOptions *userOptions, PaQaRecording *recording )\n{\n    if( userOptions->saveBadWaves )\n    {\n        char filename[256];\n#ifdef WIN32\n        _snprintf( filename, sizeof(filename), \"%s\\\\paloopback_%d.wav\", userOptions->waveFilePath, userOptions->waveFileCount++ );\n#else\n        snprintf( filename, sizeof(filename), \"%s/paloopback_%d.wav\", userOptions->waveFilePath, userOptions->waveFileCount++ );\n#endif\n        printf( \"\\\"%s\\\", \", filename );\n        return PaQa_SaveRecordingToWaveFile( recording, filename );\n    }\n    return 0;\n}\n\n/*******************************************************************/\nstatic int PaQa_SetupLoopbackContext( LoopbackContext *loopbackContextPtr, TestParameters *testParams )\n{\n    int i;\n    // Setup loopback context.\n    memset( loopbackContextPtr, 0, sizeof(LoopbackContext) );\n    loopbackContextPtr->test = testParams;\n    for( i=0; i<testParams->samplesPerFrame; i++ )\n    {\n        int err = PaQa_InitializeRecording( &loopbackContextPtr->recordings[i], testParams->maxFrames, testParams->sampleRate );\n        QA_ASSERT_EQUALS( \"PaQa_InitializeRecording failed\", paNoError, err );\n    }\n    for( i=0; i<testParams->samplesPerFrame; i++ )\n    {\n        PaQa_SetupSineGenerator( &loopbackContextPtr->generators[i], PaQa_GetNthFrequency( testParams->baseFrequency, i ),\n                                testParams->amplitude, testParams->sampleRate );\n    }\n    loopbackContextPtr->minFramesPerBuffer = 0x0FFFFFFF;\n    return 0;\nerror:\n    return -1;\n}\n\n/*******************************************************************/\nstatic void PaQa_TeardownLoopbackContext( LoopbackContext *loopbackContextPtr )\n{\n    int i;\n    if( loopbackContextPtr->test != NULL )\n    {\n        for( i=0; i<loopbackContextPtr->test->samplesPerFrame; i++ )\n        {\n            PaQa_TerminateRecording( &loopbackContextPtr->recordings[i] );\n        }\n    }\n}\n\n/*******************************************************************/\nstatic void PaQa_PrintShortErrorReport( PaQaAnalysisResult *analysisResultPtr, int channel )\n{\n    printf(\"channel %d \", channel);\n    if( analysisResultPtr->popPosition > 0 )\n    {\n        printf(\"POP %0.3f at %d, \", (double)analysisResultPtr->popAmplitude, (int)analysisResultPtr->popPosition );\n    }\n    else\n    {\n        if( analysisResultPtr->addedFramesPosition > 0 )\n        {\n            printf(\"ADD %d at %d \", (int)analysisResultPtr->numAddedFrames, (int)analysisResultPtr->addedFramesPosition );\n        }\n\n        if( analysisResultPtr->droppedFramesPosition > 0 )\n        {\n            printf(\"DROP %d at %d \", (int)analysisResultPtr->numDroppedFrames, (int)analysisResultPtr->droppedFramesPosition );\n        }\n    }\n}\n\n/*******************************************************************/\nstatic void PaQa_PrintFullErrorReport( PaQaAnalysisResult *analysisResultPtr, int channel )\n{\n    printf(\"\\n=== Loopback Analysis ===================\\n\");\n    printf(\"             channel: %d\\n\", channel );\n    printf(\"             latency: %10.3f\\n\", analysisResultPtr->latency );\n    printf(\"      amplitudeRatio: %10.3f\\n\", (double)analysisResultPtr->amplitudeRatio );\n    printf(\"         popPosition: %10.3f\\n\", (double)analysisResultPtr->popPosition );\n    printf(\"        popAmplitude: %10.3f\\n\", (double)analysisResultPtr->popAmplitude );\n    printf(\"    num added frames: %10.3f\\n\", analysisResultPtr->numAddedFrames );\n    printf(\"     added frames at: %10.3f\\n\", analysisResultPtr->addedFramesPosition );\n    printf(\"  num dropped frames: %10.3f\\n\", analysisResultPtr->numDroppedFrames );\n    printf(\"   dropped frames at: %10.3f\\n\", analysisResultPtr->droppedFramesPosition );\n}\n\n/*******************************************************************/\n/**\n * Test loopback connection using the given parameters.\n * @return number of channels with glitches, or negative error.\n */\nstatic int PaQa_SingleLoopBackTest( UserOptions *userOptions, TestParameters *testParams )\n{\n    int i;\n    LoopbackContext loopbackContext;\n    PaError err = paNoError;\n    PaQaTestTone testTone;\n    PaQaAnalysisResult analysisResult;\n    int numBadChannels = 0;\n\n    printf(\"| %5d | %6d | \", ((int)(testParams->sampleRate+0.5)), testParams->framesPerBuffer );\n    fflush(stdout);\n\n    testTone.samplesPerFrame = testParams->samplesPerFrame;\n    testTone.sampleRate = testParams->sampleRate;\n    testTone.amplitude = testParams->amplitude;\n    testTone.startDelay = 0;\n\n    err = PaQa_SetupLoopbackContext( &loopbackContext, testParams );\n    if( err ) return err;\n\n    err = PaQa_RunLoopback( &loopbackContext );\n    QA_ASSERT_TRUE(\"loopback did not run\", (loopbackContext.callbackCount > 1) );\n\n    printf( \"%7.2f %7.2f %7.2f | \",\n           loopbackContext.streamInfoInputLatency * 1000.0,\n           loopbackContext.streamInfoOutputLatency * 1000.0,\n           (loopbackContext.streamInfoInputLatency + loopbackContext.streamInfoOutputLatency) * 1000.0\n           );\n\n    printf( \"%4d/%4d/%4d, %4d/%4d/%4d | \",\n           loopbackContext.inputOverflowCount,\n           loopbackContext.inputUnderflowCount,\n           loopbackContext.inputBufferCount,\n           loopbackContext.outputOverflowCount,\n           loopbackContext.outputUnderflowCount,\n           loopbackContext.outputBufferCount\n           );\n\n    // Analyse recording to detect glitches.\n    for( i=0; i<testParams->samplesPerFrame; i++ )\n    {\n        double freq = PaQa_GetNthFrequency( testParams->baseFrequency, i );\n        testTone.frequency = freq;\n\n        PaQa_AnalyseRecording(  &loopbackContext.recordings[i], &testTone, &analysisResult );\n\n        if( i==0 )\n        {\n            double latencyMSec;\n\n            printf( \"%4d-%4d | \",\n                   loopbackContext.minFramesPerBuffer,\n                   loopbackContext.maxFramesPerBuffer\n                   );\n\n            latencyMSec = 1000.0 * analysisResult.latency / testParams->sampleRate;\n            printf(\"%7.2f | \", latencyMSec );\n\n        }\n\n        if( analysisResult.valid )\n        {\n            int badChannel = ( (analysisResult.popPosition > 0)\n                       || (analysisResult.addedFramesPosition > 0)\n                       || (analysisResult.droppedFramesPosition > 0) );\n\n            if( badChannel )\n            {\n                if( userOptions->verbose )\n                {\n                    PaQa_PrintFullErrorReport( &analysisResult, i );\n                }\n                else\n                {\n                    PaQa_PrintShortErrorReport( &analysisResult, i );\n                }\n                PaQa_SaveTestResultToWaveFile( userOptions, &loopbackContext.recordings[i] );\n            }\n            numBadChannels += badChannel;\n        }\n        else\n        {\n            printf( \"[%d] No or low signal, ampRatio = %f\", i, analysisResult.amplitudeRatio );\n            numBadChannels += 1;\n        }\n\n    }\n    if( numBadChannels == 0 )\n    {\n        printf( \"OK\" );\n    }\n\n    // Print the # errors so far to make it easier to see where the error occurred.\n    printf( \" - #errs = %d\\n\", g_testsFailed );\n\n    PaQa_TeardownLoopbackContext( &loopbackContext );\n    if( numBadChannels > 0 )\n    {\n        g_testsFailed += 1;\n    }\n    return numBadChannels;\n\nerror:\n    PaQa_TeardownLoopbackContext( &loopbackContext );\n    printf( \"\\n\" );\n    g_testsFailed += 1;\n    return err;\n}\n\n/*******************************************************************/\nstatic void PaQa_SetDefaultTestParameters( TestParameters *testParamsPtr, PaDeviceIndex inputDevice, PaDeviceIndex outputDevice )\n{\n    memset( testParamsPtr, 0, sizeof(TestParameters) );\n\n    testParamsPtr->samplesPerFrame = 2;\n    testParamsPtr->amplitude = 0.5;\n    testParamsPtr->sampleRate = 44100;\n    testParamsPtr->maxFrames = (int) (PAQA_TEST_DURATION * testParamsPtr->sampleRate);\n    testParamsPtr->framesPerBuffer = DEFAULT_FRAMES_PER_BUFFER;\n    testParamsPtr->baseFrequency = 200.0;\n    testParamsPtr->flags = PAQA_FLAG_TWO_STREAMS;\n    testParamsPtr->streamFlags = paClipOff; /* we won't output out of range samples so don't bother clipping them */\n\n    testParamsPtr->inputParameters.device = inputDevice;\n    testParamsPtr->inputParameters.sampleFormat = paFloat32;\n    testParamsPtr->inputParameters.channelCount = testParamsPtr->samplesPerFrame;\n    testParamsPtr->inputParameters.suggestedLatency = Pa_GetDeviceInfo( inputDevice )->defaultLowInputLatency;\n    //testParamsPtr->inputParameters.suggestedLatency = Pa_GetDeviceInfo( inputDevice )->defaultHighInputLatency;\n\n    testParamsPtr->outputParameters.device = outputDevice;\n    testParamsPtr->outputParameters.sampleFormat = paFloat32;\n    testParamsPtr->outputParameters.channelCount = testParamsPtr->samplesPerFrame;\n    testParamsPtr->outputParameters.suggestedLatency = Pa_GetDeviceInfo( outputDevice )->defaultLowOutputLatency;\n    //testParamsPtr->outputParameters.suggestedLatency = Pa_GetDeviceInfo( outputDevice )->defaultHighOutputLatency;\n}\n\n/*******************************************************************/\nstatic void PaQa_OverrideTestParameters( TestParameters *testParamsPtr,  UserOptions *userOptions )\n{\n    // Check to see if a specific value was requested.\n    if( userOptions->sampleRate >= 0 )\n    {\n        testParamsPtr->sampleRate = userOptions->sampleRate;\n        testParamsPtr->maxFrames = (int) (PAQA_TEST_DURATION * testParamsPtr->sampleRate);\n    }\n    if( userOptions->framesPerBuffer >= 0 )\n    {\n        testParamsPtr->framesPerBuffer = userOptions->framesPerBuffer;\n    }\n    if( userOptions->inputLatency >= 0 )\n    {\n        testParamsPtr->inputParameters.suggestedLatency = userOptions->inputLatency * 0.001;\n    }\n    if( userOptions->outputLatency >= 0 )\n    {\n        testParamsPtr->outputParameters.suggestedLatency = userOptions->outputLatency * 0.001;\n    }\n    printf( \"   Running with suggested latency (msec): input = %5.2f, out = %5.2f\\n\",\n        (testParamsPtr->inputParameters.suggestedLatency * 1000.0),\n        (testParamsPtr->outputParameters.suggestedLatency * 1000.0) );\n}\n\n/*******************************************************************/\n/**\n * Run a series of tests on this loopback connection.\n * @return number of bad channel results\n */\nstatic int PaQa_AnalyzeLoopbackConnection( UserOptions *userOptions, PaDeviceIndex inputDevice, PaDeviceIndex outputDevice )\n{\n    int iFlags;\n    int iRate;\n    int iSize;\n    int iFormat;\n    int savedValue;\n    TestParameters testParams;\n    const PaDeviceInfo *inputDeviceInfo = Pa_GetDeviceInfo( inputDevice );\n    const PaDeviceInfo *outputDeviceInfo = Pa_GetDeviceInfo( outputDevice );\n    int totalBadChannels = 0;\n\n    // test half duplex first because it is more likely to work.\n    int flagSettings[] = { PAQA_FLAG_TWO_STREAMS, 0 };\n    int numFlagSettings = (sizeof(flagSettings)/sizeof(int));\n\n    double sampleRates[] = { 8000.0, 11025.0, 16000.0, 22050.0, 32000.0, 44100.0, 48000.0, 96000.0 };\n    int numRates = (sizeof(sampleRates)/sizeof(double));\n\n    // framesPerBuffer==0 means PA decides on the buffer size.\n    int framesPerBuffers[] = { 0, 16, 32, 40, 64, 100, 128, 256, 512, 1024 };\n    int numBufferSizes = (sizeof(framesPerBuffers)/sizeof(int));\n\n    PaSampleFormat sampleFormats[] = { paFloat32, paUInt8, paInt8, paInt16, paInt32 };\n    const char *sampleFormatNames[] = { \"paFloat32\", \"paUInt8\", \"paInt8\", \"paInt16\", \"paInt32\" };\n    int numSampleFormats = (sizeof(sampleFormats)/sizeof(PaSampleFormat));\n\n    printf( \"=============== Analysing Loopback %d to %d =====================\\n\", outputDevice, inputDevice  );\n    printf( \"   Devices: %s => %s\\n\", outputDeviceInfo->name, inputDeviceInfo->name);\n\n    PaQa_SetDefaultTestParameters( &testParams, inputDevice, outputDevice );\n\n    PaQa_OverrideTestParameters( &testParams, userOptions );\n\n    // Loop though combinations of audio parameters.\n    for( iFlags=0; iFlags<numFlagSettings; iFlags++ )\n    {\n        int numRuns = 0;\n\n        testParams.flags = flagSettings[iFlags];\n        printf( \"\\n************ Mode = %s ************\\n\",\n               (( testParams.flags & 1 ) ? s_FlagOnNames[0] : s_FlagOffNames[0]) );\n\n        printf(\"|-   requested  -|-  stream info latency  -|- measured ------------------------------\\n\");\n        printf(\"|-sRate-|-fr/buf-|- in    - out   - total -|- over/under/calls for in, out -|- frm/buf -|-latency-|- channel results -\\n\");\n\n        // Loop though various sample rates.\n        if( userOptions->sampleRate < 0 )\n        {\n            savedValue = testParams.sampleRate;\n            for( iRate=0; iRate<numRates; iRate++ )\n            {\n                int numBadChannels;\n\n                // SAMPLE RATE\n                testParams.sampleRate = sampleRates[iRate];\n                testParams.maxFrames = (int) (PAQA_TEST_DURATION * testParams.sampleRate);\n\n                numBadChannels = PaQa_SingleLoopBackTest( userOptions, &testParams );\n                totalBadChannels += numBadChannels;\n            }\n            testParams.sampleRate = savedValue;\n            testParams.maxFrames = (int) (PAQA_TEST_DURATION * testParams.sampleRate);\n            printf( \"\\n\" );\n            numRuns += 1;\n        }\n\n        // Loop through various buffer sizes.\n        if( userOptions->framesPerBuffer < 0 )\n        {\n            savedValue = testParams.framesPerBuffer;\n            for( iSize=0; iSize<numBufferSizes; iSize++ )\n            {\n                int numBadChannels;\n\n                // BUFFER SIZE\n                testParams.framesPerBuffer = framesPerBuffers[iSize];\n\n                numBadChannels = PaQa_SingleLoopBackTest( userOptions, &testParams );\n                totalBadChannels += numBadChannels;\n            }\n            testParams.framesPerBuffer = savedValue;\n            printf( \"\\n\" );\n            numRuns += 1;\n        }\n        // Run one with single parameters in case we did not do a series.\n        if( numRuns == 0 )\n        {\n            int numBadChannels = PaQa_SingleLoopBackTest( userOptions, &testParams );\n            totalBadChannels += numBadChannels;\n        }\n    }\n\n    printf(\"\\nTest Sample Formats using Half Duplex IO -----\\n\" );\n\n    PaQa_SetDefaultTestParameters( &testParams, inputDevice, outputDevice );\n    testParams.flags = PAQA_FLAG_TWO_STREAMS;\n    for( iFlags= 0; iFlags<4; iFlags++ )\n    {\n        // Cycle through combinations of flags.\n        testParams.streamFlags = 0;\n        if( iFlags & 1 ) testParams.streamFlags |= paClipOff;\n        if( iFlags & 2 ) testParams.streamFlags |= paDitherOff;\n\n        for( iFormat=0; iFormat<numSampleFormats; iFormat++ )\n        {\n            int numBadChannels;\n            PaSampleFormat format = sampleFormats[ iFormat ];\n            testParams.inputParameters.sampleFormat = format;\n            testParams.outputParameters.sampleFormat = format;\n            printf(\"Sample format = %d = %s, PaStreamFlags = 0x%02X\\n\", (int) format, sampleFormatNames[iFormat], (unsigned int) testParams.streamFlags );\n            numBadChannels = PaQa_SingleLoopBackTest( userOptions, &testParams );\n            totalBadChannels += numBadChannels;\n        }\n    }\n    printf( \"\\n\" );\n    printf( \"****************************************\\n\");\n\n    return totalBadChannels;\n}\n\n/*******************************************************************/\nint PaQa_CheckForClippedLoopback( LoopbackContext *loopbackContextPtr )\n{\n    int clipped = 0;\n    TestParameters *testParamsPtr = loopbackContextPtr->test;\n\n    // Start in the middle assuming past latency.\n    int startFrame = testParamsPtr->maxFrames/2;\n    int numFrames = testParamsPtr->maxFrames/2;\n\n    // Check to see if the signal is clipped.\n    double amplitudeLeft = PaQa_MeasureSineAmplitudeBySlope( &loopbackContextPtr->recordings[0],\n                                                            testParamsPtr->baseFrequency, testParamsPtr->sampleRate,\n                                                            startFrame, numFrames );\n    double gainLeft = amplitudeLeft / testParamsPtr->amplitude;\n    double amplitudeRight = PaQa_MeasureSineAmplitudeBySlope( &loopbackContextPtr->recordings[1],\n                                                             testParamsPtr->baseFrequency, testParamsPtr->sampleRate,\n                                                             startFrame, numFrames );\n    double gainRight = amplitudeLeft / testParamsPtr->amplitude;\n    printf(\"   Loop gain: left = %f, right = %f\\n\", gainLeft, gainRight );\n\n    if( (amplitudeLeft > 1.0 ) || (amplitudeRight > 1.0) )\n    {\n        printf(\"ERROR - loop gain is too high. Should be around than 1.0. Please lower output level and/or input gain.\\n\" );\n        clipped = 1;\n    }\n    return clipped;\n}\n\n/*******************************************************************/\nint PaQa_MeasureBackgroundNoise( LoopbackContext *loopbackContextPtr, double *rmsPtr )\n{\n    int result = 0;\n    *rmsPtr = 0.0;\n    // Rewind so we can record some input.\n    loopbackContextPtr->recordings[0].numFrames = 0;\n    loopbackContextPtr->recordings[1].numFrames = 0;\n    result = PaQa_RunInputOnly( loopbackContextPtr );\n    if( result == 0 )\n    {\n        double leftRMS = PaQa_MeasureRootMeanSquare( loopbackContextPtr->recordings[0].buffer,\n                                                    loopbackContextPtr->recordings[0].numFrames );\n        double rightRMS = PaQa_MeasureRootMeanSquare( loopbackContextPtr->recordings[1].buffer,\n                                                     loopbackContextPtr->recordings[1].numFrames );\n        *rmsPtr = (leftRMS + rightRMS) / 2.0;\n    }\n    return result;\n}\n\n/*******************************************************************/\n/**\n * Output a sine wave then try to detect it on input.\n *\n * @return 1 if loopback connected, 0 if not, or negative error.\n */\nint PaQa_CheckForLoopBack( UserOptions *userOptions, PaDeviceIndex inputDevice, PaDeviceIndex outputDevice )\n{\n    TestParameters testParams;\n    LoopbackContext loopbackContext;\n    const PaDeviceInfo *inputDeviceInfo;\n    const PaDeviceInfo *outputDeviceInfo;\n    PaError err = paNoError;\n    double minAmplitude;\n    int loopbackIsConnected;\n    int startFrame, numFrames;\n    double magLeft, magRight;\n\n    inputDeviceInfo = Pa_GetDeviceInfo( inputDevice );\n    if( inputDeviceInfo == NULL )\n    {\n        printf(\"ERROR - Pa_GetDeviceInfo for input returned NULL.\\n\");\n        return paInvalidDevice;\n    }\n    if( inputDeviceInfo->maxInputChannels < 2 )\n    {\n        return 0;\n    }\n\n    outputDeviceInfo = Pa_GetDeviceInfo( outputDevice );\n    if( outputDeviceInfo == NULL )\n    {\n        printf(\"ERROR - Pa_GetDeviceInfo for output returned NULL.\\n\");\n        return paInvalidDevice;\n    }\n    if( outputDeviceInfo->maxOutputChannels < 2 )\n    {\n        return 0;\n    }\n\n    printf( \"Look for loopback cable between \\\"%s\\\" => \\\"%s\\\"\\n\", outputDeviceInfo->name, inputDeviceInfo->name);\n\n    printf( \"   Default suggested input latency (msec): low = %5.2f, high = %5.2f\\n\",\n        (inputDeviceInfo->defaultLowInputLatency * 1000.0),\n        (inputDeviceInfo->defaultHighInputLatency * 1000.0) );\n    printf( \"   Default suggested output latency (msec): low = %5.2f, high = %5.2f\\n\",\n        (outputDeviceInfo->defaultLowOutputLatency * 1000.0),\n        (outputDeviceInfo->defaultHighOutputLatency * 1000.0) );\n\n    PaQa_SetDefaultTestParameters( &testParams, inputDevice, outputDevice );\n\n    PaQa_OverrideTestParameters( &testParams, userOptions );\n\n    testParams.maxFrames = (int) (LOOPBACK_DETECTION_DURATION_SECONDS * testParams.sampleRate);\n    minAmplitude = testParams.amplitude / 4.0;\n\n    // Check to see if the selected formats are supported.\n    if( Pa_IsFormatSupported( &testParams.inputParameters, NULL, testParams.sampleRate ) != paFormatIsSupported )\n    {\n        printf( \"Input not supported for this format!\\n\" );\n        return 0;\n    }\n    if( Pa_IsFormatSupported( NULL, &testParams.outputParameters, testParams.sampleRate ) != paFormatIsSupported )\n    {\n        printf( \"Output not supported for this format!\\n\" );\n        return 0;\n    }\n\n    PaQa_SetupLoopbackContext( &loopbackContext, &testParams );\n\n    if( inputDevice == outputDevice )\n    {\n        // Use full duplex if checking for loopback on one device.\n        testParams.flags &= ~PAQA_FLAG_TWO_STREAMS;\n    }\n    else\n    {\n        // Use half duplex if checking for loopback on two different device.\n        testParams.flags = PAQA_FLAG_TWO_STREAMS;\n    }\n    err = PaQa_RunLoopback( &loopbackContext );\n    QA_ASSERT_TRUE(\"loopback detection callback did not run\", (loopbackContext.callbackCount > 1) );\n\n    // Analyse recording to see if we captured the output.\n    // Start in the middle assuming past latency.\n    startFrame = testParams.maxFrames/2;\n    numFrames = testParams.maxFrames/2;\n    magLeft = PaQa_CorrelateSine( &loopbackContext.recordings[0],\n                                    loopbackContext.generators[0].frequency,\n                                    testParams.sampleRate,\n                                    startFrame, numFrames, NULL );\n    magRight = PaQa_CorrelateSine( &loopbackContext.recordings[1],\n                                    loopbackContext.generators[1].frequency,\n                                    testParams.sampleRate,\n                                    startFrame, numFrames, NULL );\n    printf(\"   Amplitudes: left = %f, right = %f\\n\", magLeft, magRight );\n\n    // Check for backwards cable.\n    loopbackIsConnected = ((magLeft > minAmplitude) && (magRight > minAmplitude));\n\n    if( !loopbackIsConnected )\n    {\n        double magLeftReverse = PaQa_CorrelateSine( &loopbackContext.recordings[0],\n                                                   loopbackContext.generators[1].frequency,\n                                                   testParams.sampleRate,\n                                                   startFrame, numFrames, NULL );\n\n        double magRightReverse = PaQa_CorrelateSine( &loopbackContext.recordings[1],\n                                                    loopbackContext.generators[0].frequency,\n                                                    testParams.sampleRate,\n                                                    startFrame, numFrames, NULL );\n\n        if ((magLeftReverse > minAmplitude) && (magRightReverse>minAmplitude))\n        {\n            printf(\"ERROR - You seem to have the left and right channels swapped on the loopback cable!\\n\");\n        }\n    }\n    else\n    {\n        double rms = 0.0;\n        if( PaQa_CheckForClippedLoopback( &loopbackContext ) )\n        {\n            // Clipped so don't use this loopback.\n            loopbackIsConnected = 0;\n        }\n\n        err = PaQa_MeasureBackgroundNoise( &loopbackContext, &rms );\n        printf(\"   Background noise = %f\\n\", rms );\n        if( err )\n        {\n            printf(\"ERROR - Could not measure background noise on this input!\\n\");\n            loopbackIsConnected = 0;\n        }\n        else if( rms > MAX_BACKGROUND_NOISE_RMS )\n        {\n            printf(\"ERROR - There is too much background noise on this input!\\n\");\n            loopbackIsConnected = 0;\n        }\n    }\n\n    PaQa_TeardownLoopbackContext( &loopbackContext );\n    return loopbackIsConnected;\n\nerror:\n    PaQa_TeardownLoopbackContext( &loopbackContext );\n    return err;\n}\n\n/*******************************************************************/\n/**\n * If there is a loopback connection then run the analysis.\n */\nstatic int CheckLoopbackAndScan( UserOptions *userOptions,\n                                PaDeviceIndex iIn, PaDeviceIndex iOut )\n{\n    int loopbackConnected = PaQa_CheckForLoopBack( userOptions, iIn, iOut );\n    if( loopbackConnected > 0 )\n    {\n        PaQa_AnalyzeLoopbackConnection( userOptions, iIn, iOut );\n        return 1;\n    }\n    return 0;\n}\n\n/*******************************************************************/\n/**\n * Scan every combination of output to input device.\n * If a loopback is found the analyse the combination.\n * The scan can be overridden using the -i and -o command line options.\n */\nstatic int ScanForLoopback(UserOptions *userOptions)\n{\n    PaDeviceIndex iIn,iOut;\n    int  numLoopbacks = 0;\n    int  numDevices;\n    numDevices = Pa_GetDeviceCount();\n\n    // If both devices are specified then just use that combination.\n    if ((userOptions->inputDevice >= 0) && (userOptions->outputDevice >= 0))\n    {\n        numLoopbacks += CheckLoopbackAndScan( userOptions, userOptions->inputDevice, userOptions->outputDevice );\n    }\n    else if (userOptions->inputDevice >= 0)\n    {\n        // Just scan for output.\n        for( iOut=0; iOut<numDevices; iOut++ )\n        {\n            numLoopbacks += CheckLoopbackAndScan( userOptions, userOptions->inputDevice, iOut );\n        }\n    }\n    else if (userOptions->outputDevice >= 0)\n    {\n        // Just scan for input.\n        for( iIn=0; iIn<numDevices; iIn++ )\n        {\n            numLoopbacks += CheckLoopbackAndScan( userOptions, iIn, userOptions->outputDevice );\n        }\n    }\n    else\n    {\n        // Scan both.\n        for( iOut=0; iOut<numDevices; iOut++ )\n        {\n            for( iIn=0; iIn<numDevices; iIn++ )\n            {\n                numLoopbacks += CheckLoopbackAndScan( userOptions, iIn, iOut );\n            }\n        }\n    }\n    QA_ASSERT_TRUE( \"No good loopback cable found.\", (numLoopbacks > 0) );\n    return numLoopbacks;\n\nerror:\n    return -1;\n}\n\n/*==========================================================================================*/\nint TestSampleFormatConversion( void )\n{\n    int i;\n    const float floatInput[] = { 1.0, 0.5, -0.5, -1.0 };\n\n    const char charInput[] = { 127, 64, -64, -128 };\n    const unsigned char ucharInput[] = { 255, 128+64, 64, 0 };\n    const short shortInput[] = { 32767, 32768/2, -32768/2, -32768 };\n    const int intInput[] = { 2147483647, 2147483647/2, -1073741824 /*-2147483648/2 doesn't work in msvc*/, -2147483648 };\n\n    float floatOutput[4];\n    short shortOutput[4];\n    int intOutput[4];\n    unsigned char ucharOutput[4];\n    char charOutput[4];\n\n    QA_ASSERT_EQUALS(\"int must be 32-bit\", 4, (int) sizeof(int) );\n    QA_ASSERT_EQUALS(\"short must be 16-bit\", 2, (int) sizeof(short) );\n\n    // from Float ======\n    PaQa_ConvertFromFloat( floatInput, 4, paUInt8, ucharOutput );\n    for( i=0; i<4; i++ )\n    {\n        QA_ASSERT_CLOSE_INT( \"paFloat32 -> paUInt8 -> error\", ucharInput[i], ucharOutput[i], 1 );\n    }\n\n    PaQa_ConvertFromFloat( floatInput, 4, paInt8, charOutput );\n    for( i=0; i<4; i++ )\n    {\n        QA_ASSERT_CLOSE_INT( \"paFloat32 -> paInt8 -> error\", charInput[i], charOutput[i], 1 );\n    }\n\n    PaQa_ConvertFromFloat( floatInput, 4, paInt16, shortOutput );\n    for( i=0; i<4; i++ )\n    {\n        QA_ASSERT_CLOSE_INT( \"paFloat32 -> paInt16 error\", shortInput[i], shortOutput[i], 1 );\n    }\n\n    PaQa_ConvertFromFloat( floatInput, 4, paInt32, intOutput );\n    for( i=0; i<4; i++ )\n    {\n        QA_ASSERT_CLOSE_INT( \"paFloat32 -> paInt32 error\", intInput[i], intOutput[i], 0x00010000 );\n    }\n\n\n    // to Float ======\n    memset( floatOutput, 0, sizeof(floatOutput) );\n    PaQa_ConvertToFloat( ucharInput, 4, paUInt8, floatOutput );\n    for( i=0; i<4; i++ )\n    {\n        QA_ASSERT_CLOSE( \"paUInt8 -> paFloat32 error\", floatInput[i], floatOutput[i], 0.01 );\n    }\n\n    memset( floatOutput, 0, sizeof(floatOutput) );\n    PaQa_ConvertToFloat( charInput, 4, paInt8, floatOutput );\n    for( i=0; i<4; i++ )\n    {\n        QA_ASSERT_CLOSE( \"paInt8 -> paFloat32 error\", floatInput[i], floatOutput[i], 0.01 );\n    }\n\n    memset( floatOutput, 0, sizeof(floatOutput) );\n    PaQa_ConvertToFloat( shortInput, 4, paInt16, floatOutput );\n    for( i=0; i<4; i++ )\n    {\n        QA_ASSERT_CLOSE( \"paInt16 -> paFloat32 error\", floatInput[i], floatOutput[i], 0.001 );\n    }\n\n    memset( floatOutput, 0, sizeof(floatOutput) );\n    PaQa_ConvertToFloat( intInput, 4, paInt32, floatOutput );\n    for( i=0; i<4; i++ )\n    {\n        QA_ASSERT_CLOSE( \"paInt32 -> paFloat32 error\", floatInput[i], floatOutput[i], 0.00001 );\n    }\n\n    return 0;\n\nerror:\n    return -1;\n}\n\n\n/*******************************************************************/\nvoid usage( const char *name )\n{\n    printf(\"%s [-i# -o# -l# -r# -s# -m -w -dDir]\\n\", name);\n    printf(\"  -i# - Input device ID. Will scan for loopback cable if not specified.\\n\");\n    printf(\"  -o# - Output device ID. Will scan for loopback if not specified.\\n\");\n    printf(\"  -l# - Latency for both input and output in milliseconds.\\n\");\n    printf(\"  --inputLatency # Input latency in milliseconds.\\n\");\n    printf(\"  --outputLatency # Output latency in milliseconds.\\n\");\n    printf(\"  -r# - Sample Rate in Hz.  Will use multiple common rates if not specified.\\n\");\n    printf(\"  -s# - Size of callback buffer in frames, framesPerBuffer. Will use common values if not specified.\\n\");\n    printf(\"  -w  - Save bad recordings in a WAV file.\\n\");\n    printf(\"  -dDir - Path for Directory for WAV files. Default is current directory.\\n\");\n    printf(\"  -m  - Just test the DSP Math code and not the audio devices.\\n\");\n    printf(\"  -v  - Verbose reports.\\n\");\n}\n\n/*******************************************************************/\nint main( int argc, char **argv )\n{\n    int i;\n    UserOptions userOptions;\n    int result = 0;\n    int justMath = 0;\n    char *executableName = argv[0];\n\n    printf(\"PortAudio LoopBack Test built \" __DATE__ \" at \" __TIME__ \"\\n\");\n\n    if( argc > 1 ){\n        printf(\"running with arguments:\");\n        for(i=1; i < argc; ++i )\n            printf(\" %s\", argv[i] );\n        printf(\"\\n\");\n    }else{\n        printf(\"running with no arguments\\n\");\n    }\n\n    memset(&userOptions, 0, sizeof(userOptions));\n    userOptions.inputDevice = paNoDevice;\n    userOptions.outputDevice = paNoDevice;\n    userOptions.sampleRate = -1;\n    userOptions.framesPerBuffer = -1;\n    userOptions.inputLatency = -1;\n    userOptions.outputLatency = -1;\n    userOptions.waveFilePath = \".\";\n\n    // Process arguments. Skip name of executable.\n    i = 1;\n    while( i<argc )\n    {\n        char *arg = argv[i];\n        if( arg[0] == '-' )\n        {\n            switch(arg[1])\n            {\n                case 'i':\n                    userOptions.inputDevice = atoi(&arg[2]);\n                    break;\n                case 'o':\n                    userOptions.outputDevice = atoi(&arg[2]);\n                    break;\n                case 'l':\n                    userOptions.inputLatency = userOptions.outputLatency = atoi(&arg[2]);\n                    break;\n                case 'r':\n                    userOptions.sampleRate = atoi(&arg[2]);\n                    break;\n                case 's':\n                    userOptions.framesPerBuffer = atoi(&arg[2]);\n                    break;\n\n                case 'm':\n                    printf(\"Option -m set so just testing math and not the audio devices.\\n\");\n                    justMath = 1;\n                    break;\n\n                case 'w':\n                    userOptions.saveBadWaves = 1;\n                    break;\n                case 'd':\n                    userOptions.waveFilePath = &arg[2];\n                    break;\n\n                case 'v':\n                    userOptions.verbose = 1;\n                    break;\n\n                case 'h':\n                    usage( executableName );\n                    exit(0);\n                    break;\n\n                case '-':\n                {\n                    if( strcmp( &arg[2], \"inputLatency\" ) == 0 )\n                    {\n                        i += 1;\n                        userOptions.inputLatency = atoi(argv[i]);\n                    }\n                    else if( strcmp( &arg[2], \"outputLatency\" ) == 0 )\n                    {\n                        i += 1;\n                        userOptions.outputLatency = atoi(argv[i]);\n                    }\n                    else\n                    {\n                        printf(\"Illegal option: %s\\n\", arg);\n                        usage( executableName );\n                        exit(1);\n                    }\n\n                }\n                    break;\n\n\n                default:\n                    printf(\"Illegal option: %s\\n\", arg);\n                    usage( executableName );\n                    exit(1);\n                    break;\n            }\n        }\n        else\n        {\n            printf(\"Illegal argument: %s\\n\", arg);\n            usage( executableName );\n            exit(1);\n\n        }\n        i += 1;\n    }\n\n    result = PaQa_TestAnalyzer();\n\n    // Test sample format conversion tool.\n    result = TestSampleFormatConversion();\n\n    if( (result == 0) && (justMath == 0) )\n    {\n        Pa_Initialize();\n        printf( \"PortAudio version number = %d\\nPortAudio version text = '%s'\\n\",\n               Pa_GetVersion(), Pa_GetVersionText() );\n        printf( \"=============== PortAudio Devices ========================\\n\" );\n        PaQa_ListAudioDevices();\n        if( Pa_GetDeviceCount() == 0 )\n            printf( \"no devices found.\\n\" );\n\n        printf( \"=============== Detect Loopback ==========================\\n\" );\n        ScanForLoopback(&userOptions);\n\n        Pa_Terminate();\n    }\n\n    if (g_testsFailed == 0)\n    {\n        printf(\"PortAudio QA SUCCEEDED! %d tests passed, %d tests failed\\n\", g_testsPassed, g_testsFailed );\n        return 0;\n\n    }\n    else\n    {\n        printf(\"PortAudio QA FAILED! %d tests passed, %d tests failed\\n\", g_testsPassed, g_testsFailed );\n        return 1;\n    }\n}\n"
  },
  {
    "path": "thirdparty/portaudio/qa/loopback/src/paqa_tools.c",
    "content": "\n/*\n * PortAudio Portable Real-Time Audio Library\n * Latest Version at: http://www.portaudio.com\n *\n * Copyright (c) 1999-2010 Phil Burk and Ross Bencina\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n#include \"paqa_tools.h\"\n\n\n/*******************************************************************/\nvoid PaQa_ListAudioDevices(void)\n{\n    int     i, numDevices;\n    const   PaDeviceInfo *deviceInfo;\n    numDevices = Pa_GetDeviceCount();\n    for( i=0; i<numDevices; i++ )\n    {\n        deviceInfo = Pa_GetDeviceInfo( i );\n        printf( \"#%d: \", i );\n        printf( \"%2d in\", deviceInfo->maxInputChannels  );\n        printf( \", %2d out\", deviceInfo->maxOutputChannels  );\n        printf( \",  %s\", deviceInfo->name );\n        printf( \", on %s\\n\",  Pa_GetHostApiInfo( deviceInfo->hostApi )->name );\n    }\n}\n\n/*******************************************************************/\nvoid PaQa_ConvertToFloat( const void *input, int numSamples, PaSampleFormat inFormat, float *output )\n{\n    int i;\n    switch( inFormat )\n    {\n        case paUInt8:\n        {\n            unsigned char *data = (unsigned char *)input;\n            for( i=0; i<numSamples; i++ )\n            {\n                int value = *data++;\n                value -= 128;\n                *output++ = value / 128.0f;\n            }\n        }\n            break;\n\n        case paInt8:\n        {\n            char *data = (char *)input;\n            for( i=0; i<numSamples; i++ )\n            {\n                int value = *data++;\n                *output++ = value / 128.0f;\n            }\n        }\n            break;\n\n        case paInt16:\n        {\n            short *data = (short *)input;\n            for( i=0; i<numSamples; i++ )\n            {\n                *output++ = *data++ / 32768.0f;\n            }\n        }\n            break;\n\n        case paInt32:\n        {\n            int *data = (int *)input;\n            for( i=0; i<numSamples; i++ )\n            {\n                int value = (*data++) >> 8;\n                float fval = (float) (value / ((double) 0x00800000));\n                *output++ = fval;\n            }\n        }\n            break;\n    }\n\n}\n\n/*******************************************************************/\nvoid PaQa_ConvertFromFloat( const float *input, int numSamples, PaSampleFormat outFormat, void *output )\n{\n    int i;\n    switch( outFormat )\n    {\n        case paUInt8:\n        {\n            unsigned char *data = (unsigned char *)output;\n            for( i=0; i<numSamples; i++ )\n            {\n                float value = *input++;\n                int byte = ((int) (value * 127)) + 128;\n                *data++ = (unsigned char) byte;\n            }\n        }\n            break;\n\n        case paInt8:\n        {\n            char *data = (char *)output;\n            for( i=0; i<numSamples; i++ )\n            {\n                float value = *input++;\n                int byte = (int) (value * 127);\n                *data++ = (char) byte;\n            }\n        }\n            break;\n\n        case paInt16:\n        {\n            short *data = (short *)output;\n            for( i=0; i<numSamples; i++ )\n            {\n                float value = *input++;\n                // Use asymmetric conversion to avoid clipping.\n                short sval = value * 32767.0;\n                *data++ = sval;\n            }\n        }\n            break;\n\n        case paInt32:\n        {\n            int *data = (int *)output;\n            for( i=0; i<numSamples; i++ )\n            {\n                float value = *input++;\n                // Use asymmetric conversion to avoid clipping.\n                int ival = value * ((double) 0x007FFFF0);\n                ival = ival << 8;\n                *data++ = ival;\n            }\n        }\n            break;\n    }\n\n}\n"
  },
  {
    "path": "thirdparty/portaudio/qa/loopback/src/paqa_tools.h",
    "content": "\n/*\n * PortAudio Portable Real-Time Audio Library\n * Latest Version at: http://www.portaudio.com\n *\n * Copyright (c) 1999-2010 Phil Burk and Ross Bencina\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n#ifndef _PAQA_TOOLS_H\n#define _PAQA_TOOLS_H\n\n\n#include <stdio.h>\n#include \"portaudio.h\"\n\nvoid PaQa_ListAudioDevices(void);\n\nvoid PaQa_ConvertToFloat( const void *input, int numSamples, PaSampleFormat inFormat, float *output );\n\nvoid PaQa_ConvertFromFloat( const float *input, int numSamples, PaSampleFormat outFormat, void *output );\n\n#endif /* _PAQA_TOOLS_H */\n"
  },
  {
    "path": "thirdparty/portaudio/qa/loopback/src/qa_tools.h",
    "content": "\n/*\n * PortAudio Portable Real-Time Audio Library\n * Latest Version at: http://www.portaudio.com\n *\n * Copyright (c) 1999-2010 Phil Burk and Ross Bencina\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n#ifndef _QA_TOOLS_H\n#define _QA_TOOLS_H\n\nextern int g_testsPassed;\nextern int g_testsFailed;\n\n#define QA_ASSERT_TRUE( message, flag ) \\\n    if( !(flag) ) \\\n    { \\\n        printf( \"%s:%d - ERROR - %s\\n\", __FILE__, __LINE__, message ); \\\n        g_testsFailed++; \\\n        goto error; \\\n    } \\\n    else g_testsPassed++;\n\n\n#define QA_ASSERT_EQUALS( message, expected, actual ) \\\n    if( ((expected) != (actual)) ) \\\n    { \\\n        printf( \"%s:%d - ERROR - %s, expected %d, got %d\\n\", __FILE__, __LINE__, message, expected, actual ); \\\n        g_testsFailed++; \\\n        goto error; \\\n    } \\\n    else g_testsPassed++;\n\n#define QA_ASSERT_CLOSE( message, expected, actual, tolerance ) \\\n    if (fabs((expected)-(actual))>(tolerance)) \\\n    { \\\n        printf( \"%s:%d - ERROR - %s, expected %f, got %f, tol=%f\\n\", __FILE__, __LINE__, message, ((double)(expected)), ((double)(actual)), ((double)(tolerance)) ); \\\n        g_testsFailed++; \\\n        goto error; \\\n    } \\\n    else g_testsPassed++;\n\n#define QA_ASSERT_CLOSE_INT( message, expected, actual, tolerance ) \\\n    if (abs((expected)-(actual))>(tolerance)) \\\n    { \\\n        printf( \"%s:%d - ERROR - %s, expected %d, got %d, tol=%d\\n\", __FILE__, __LINE__, message, ((int)(expected)), ((int)(actual)), ((int)(tolerance)) ); \\\n        g_testsFailed++; \\\n        goto error; \\\n    } \\\n    else g_testsPassed++;\n\n\n#endif\n"
  },
  {
    "path": "thirdparty/portaudio/qa/loopback/src/test_audio_analyzer.c",
    "content": "\n/*\n * PortAudio Portable Real-Time Audio Library\n * Latest Version at: http://www.portaudio.com\n *\n * Copyright (c) 1999-2010 Phil Burk and Ross Bencina\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <math.h>\n#include \"qa_tools.h\"\n#include \"audio_analyzer.h\"\n#include \"test_audio_analyzer.h\"\n#include \"write_wav.h\"\n#include \"biquad_filter.h\"\n\n#define FRAMES_PER_BLOCK  (64)\n#define PRINT_REPORTS  0\n\n#define TEST_SAVED_WAVE  (0)\n\n/*==========================================================================================*/\n/**\n * Detect a single tone.\n */\nstatic int TestSingleMonoTone( void )\n{\n    int result = 0;\n    PaQaSineGenerator generator;\n    PaQaRecording     recording;\n    float buffer[FRAMES_PER_BLOCK];\n    double sampleRate = 44100.0;\n    int maxFrames = ((int)sampleRate) * 1;\n    int samplesPerFrame = 1;\n    int stride = 1;\n    int done = 0;\n\n    double freq = 234.5;\n    double amp = 0.5;\n\n    double mag1, mag2;\n\n    // Setup a sine oscillator.\n    PaQa_SetupSineGenerator( &generator, freq, amp, sampleRate );\n\n    result = PaQa_InitializeRecording( &recording, maxFrames, (int) sampleRate );\n    QA_ASSERT_EQUALS( \"PaQa_InitializeRecording failed\", 0, result );\n\n    done = 0;\n    while (!done)\n    {\n        PaQa_EraseBuffer( buffer, FRAMES_PER_BLOCK, samplesPerFrame );\n        PaQa_MixSine( &generator, buffer, FRAMES_PER_BLOCK, stride );\n        done = PaQa_WriteRecording( &recording, buffer, FRAMES_PER_BLOCK, samplesPerFrame );\n    }\n\n    mag1 = PaQa_CorrelateSine( &recording, freq, sampleRate, 0, recording.numFrames, NULL );\n    QA_ASSERT_CLOSE( \"exact frequency match\", amp, mag1, 0.01 );\n\n    mag2 = PaQa_CorrelateSine( &recording, freq * 1.23, sampleRate, 0, recording.numFrames, NULL );\n    QA_ASSERT_CLOSE( \"wrong frequency\", 0.0, mag2, 0.01 );\n\n    PaQa_TerminateRecording( &recording );\n    return 0;\n\nerror:\n    PaQa_TerminateRecording( &recording);\n    return 1;\n\n}\n\n/*==========================================================================================*/\n/**\n * Mix multiple tones and then detect them.\n */\n\nstatic int TestMixedMonoTones( void )\n{\n    int i;\n    int result = 0;\n#define NUM_TONES (5)\n    PaQaSineGenerator generators[NUM_TONES];\n    PaQaRecording     recording;\n    float buffer[FRAMES_PER_BLOCK];\n    double sampleRate = 44100.0;\n    int maxFrames = ((int)sampleRate) * 1;\n    int samplesPerFrame = 1;\n\n    double baseFreq = 234.5;\n    double amp = 0.1;\n\n    double mag2;\n\n    int stride = samplesPerFrame;\n    int done = 0;\n\n    // Setup a sine oscillator.\n    for( i=0; i<NUM_TONES; i++ )\n    {\n        PaQa_SetupSineGenerator( &generators[i], PaQa_GetNthFrequency( baseFreq, i ), amp, sampleRate );\n    }\n\n    result = PaQa_InitializeRecording( &recording, maxFrames, (int) sampleRate );\n    QA_ASSERT_EQUALS( \"PaQa_InitializeRecording failed\", 0, result );\n\n    done = 0;\n    while (!done)\n    {\n        PaQa_EraseBuffer( buffer, FRAMES_PER_BLOCK, samplesPerFrame );\n        for( i=0; i<NUM_TONES; i++ )\n        {\n            PaQa_MixSine( &generators[i], buffer, FRAMES_PER_BLOCK, stride );\n        }\n        done = PaQa_WriteRecording( &recording, buffer, FRAMES_PER_BLOCK, samplesPerFrame );\n    }\n\n    for( i=0; i<NUM_TONES; i++ )\n    {\n        double mag = PaQa_CorrelateSine( &recording, PaQa_GetNthFrequency( baseFreq, i), sampleRate, 0, recording.numFrames, NULL );\n        QA_ASSERT_CLOSE( \"exact frequency match\", amp, mag, 0.01 );\n    }\n\n    mag2 = PaQa_CorrelateSine( &recording, baseFreq * 0.87, sampleRate, 0, recording.numFrames, NULL );\n    QA_ASSERT_CLOSE( \"wrong frequency\", 0.0, mag2, 0.01 );\n\n    PaQa_TerminateRecording( &recording );\n    return 0;\n\nerror:\n    PaQa_TerminateRecording( &recording);\n    return 1;\n\n}\n\n\n/*==========================================================================================*/\n/**\n * Generate a recording with added or dropped frames.\n */\n\nstatic void MakeRecordingWithAddedFrames( PaQaRecording *recording, PaQaTestTone *testTone, int glitchPosition, int framesToAdd )\n{\n    PaQaSineGenerator generator;\n#define BUFFER_SIZE 512\n    float buffer[BUFFER_SIZE];\n\n    int frameCounter = testTone->startDelay;\n\n    int stride = 1;\n    // Record some initial silence.\n    int done = PaQa_WriteSilence( recording, testTone->startDelay );\n\n    // Setup a sine oscillator.\n    PaQa_SetupSineGenerator( &generator, testTone->frequency, testTone->amplitude, testTone->sampleRate );\n\n    while (!done)\n    {\n        int framesThisLoop = BUFFER_SIZE;\n\n        if( frameCounter == glitchPosition )\n        {\n            if( framesToAdd > 0 )\n            {\n                // Record some frozen data without advancing the sine generator.\n                done = PaQa_RecordFreeze( recording, framesToAdd );\n                frameCounter += framesToAdd;\n            }\n            else if( framesToAdd < 0 )\n            {\n                // Advance sine generator a few frames.\n                PaQa_MixSine( &generator, buffer, 0 - framesToAdd, stride );\n            }\n\n        }\n        else if( (frameCounter < glitchPosition) && ((frameCounter + framesThisLoop) > glitchPosition) )\n        {\n            // Go right up to the glitchPosition.\n            framesThisLoop = glitchPosition - frameCounter;\n        }\n\n        if( framesThisLoop > 0 )\n        {\n            PaQa_EraseBuffer( buffer, framesThisLoop, testTone->samplesPerFrame );\n            PaQa_MixSine( &generator, buffer, framesThisLoop, stride );\n            done = PaQa_WriteRecording( recording, buffer, framesThisLoop, testTone->samplesPerFrame );\n        }\n        frameCounter += framesThisLoop;\n    }\n}\n\n\n/*==========================================================================================*/\n/**\n * Generate a clean recording.\n */\n\nstatic void MakeCleanRecording( PaQaRecording *recording, PaQaTestTone *testTone )\n{\n    PaQaSineGenerator generator;\n#define BUFFER_SIZE 512\n    float buffer[BUFFER_SIZE];\n\n    int stride = 1;\n    // Record some initial silence.\n    int done = PaQa_WriteSilence( recording, testTone->startDelay );\n\n    // Setup a sine oscillator.\n    PaQa_SetupSineGenerator( &generator, testTone->frequency, testTone->amplitude, testTone->sampleRate );\n\n    // Generate recording with good phase.\n    while (!done)\n    {\n        PaQa_EraseBuffer( buffer, BUFFER_SIZE, testTone->samplesPerFrame );\n        PaQa_MixSine( &generator, buffer, BUFFER_SIZE, stride );\n        done = PaQa_WriteRecording( recording, buffer, BUFFER_SIZE, testTone->samplesPerFrame );\n    }\n}\n\n/*==========================================================================================*/\n/**\n * Generate a recording with pop.\n */\n\nstatic void MakeRecordingWithPop( PaQaRecording *recording, PaQaTestTone *testTone, int popPosition, int popWidth, double popAmplitude )\n{\n    int i;\n\n    MakeCleanRecording( recording, testTone );\n\n    // Apply glitch to good recording.\n    if( (popPosition + popWidth) >= recording->numFrames )\n    {\n        popWidth = (recording->numFrames - popPosition) - 1;\n    }\n\n    for( i=0; i<popWidth; i++ )\n    {\n        float good = recording->buffer[i+popPosition];\n        float bad = (good > 0.0) ? (good - popAmplitude) : (good + popAmplitude);\n        recording->buffer[i+popPosition] = bad;\n    }\n}\n\n/*==========================================================================================*/\n/**\n * Detect one phase error in a recording.\n */\nstatic int TestDetectSinglePhaseError( double sampleRate, int cycleSize, int latencyFrames, int glitchPosition, int framesAdded )\n{\n    int result = 0;\n    PaQaRecording     recording;\n    PaQaTestTone testTone;\n    PaQaAnalysisResult analysisResult = { 0.0 };\n    int framesDropped = 0;\n    int maxFrames = ((int)sampleRate) * 2;\n\n    testTone.samplesPerFrame = 1;\n    testTone.sampleRate = sampleRate;\n    testTone.frequency = sampleRate / cycleSize;\n    testTone.amplitude = 0.5;\n    testTone.startDelay = latencyFrames;\n\n    result = PaQa_InitializeRecording( &recording, maxFrames, (int) sampleRate );\n    QA_ASSERT_EQUALS( \"PaQa_InitializeRecording failed\", 0, result );\n\n    MakeRecordingWithAddedFrames( &recording, &testTone, glitchPosition, framesAdded );\n\n    PaQa_AnalyseRecording( &recording, &testTone, &analysisResult );\n\n    if( framesAdded < 0 )\n    {\n        framesDropped = -framesAdded;\n        framesAdded = 0;\n    }\n\n#if PRINT_REPORTS\n    printf(\"\\n=== Dropped Frame Analysis ===================\\n\");\n    printf(\"                        expected      actual\\n\");\n    printf(\"             latency: %10.3f  %10.3f\\n\", (double)latencyFrames, analysisResult.latency );\n    printf(\"    num added frames: %10.3f  %10.3f\\n\", (double)framesAdded, analysisResult.numAddedFrames );\n    printf(\"     added frames at: %10.3f  %10.3f\\n\", (double)glitchPosition, analysisResult.addedFramesPosition );\n    printf(\"  num dropped frames: %10.3f  %10.3f\\n\", (double)framesDropped, analysisResult.numDroppedFrames );\n    printf(\"   dropped frames at: %10.3f  %10.3f\\n\", (double)glitchPosition, analysisResult.droppedFramesPosition );\n#endif\n\n    QA_ASSERT_CLOSE( \"PaQa_AnalyseRecording latency\", latencyFrames, analysisResult.latency, 0.5 );\n    QA_ASSERT_CLOSE( \"PaQa_AnalyseRecording framesAdded\", framesAdded, analysisResult.numAddedFrames, 1.0 );\n    QA_ASSERT_CLOSE( \"PaQa_AnalyseRecording framesDropped\", framesDropped, analysisResult.numDroppedFrames, 1.0 );\n//    QA_ASSERT_CLOSE( \"PaQa_AnalyseRecording glitchPosition\", glitchPosition, analysisResult.glitchPosition, cycleSize );\n\n    PaQa_TerminateRecording( &recording );\n    return 0;\n\nerror:\n    PaQa_TerminateRecording( &recording);\n    return 1;\n}\n\n/*==========================================================================================*/\n/**\n * Test various dropped sample scenarios.\n */\nstatic int TestDetectPhaseErrors( void )\n{\n    int result;\n\n    result = TestDetectSinglePhaseError( 44100, 200, 477, -1, 0 );\n    if( result < 0 ) return result;\n/*\n    result = TestDetectSinglePhaseError( 44100, 200, 77, -1, 0 );\n    if( result < 0 ) return result;\n\n    result = TestDetectSinglePhaseError( 44100, 200, 83, 3712, 9 );\n    if( result < 0 ) return result;\n\n    result = TestDetectSinglePhaseError( 44100, 280, 83, 3712, 27 );\n    if( result < 0 ) return result;\n\n    result = TestDetectSinglePhaseError( 44100, 200, 234, 3712, -9 );\n    if( result < 0 ) return result;\n\n    result = TestDetectSinglePhaseError( 44100, 200, 2091, 8923, -2 );\n    if( result < 0 ) return result;\n\n    result = TestDetectSinglePhaseError( 44100, 120, 1782, 5772, -18 );\n    if( result < 0 ) return result;\n\n    // Note that if the frequency is too high then it is hard to detect single dropped frames.\n    result = TestDetectSinglePhaseError( 44100, 200, 500, 4251, -1 );\n    if( result < 0 ) return result;\n*/\n    return 0;\n}\n\n/*==========================================================================================*/\n/**\n * Detect one pop in a recording.\n */\nstatic int TestDetectSinglePop( double sampleRate, int cycleSize, int latencyFrames, int popPosition, int popWidth, double popAmplitude )\n{\n    int result = 0;\n    PaQaRecording     recording;\n    PaQaTestTone testTone;\n    PaQaAnalysisResult analysisResult = { 0.0 };\n    int maxFrames = ((int)sampleRate) * 2;\n\n    testTone.samplesPerFrame = 1;\n    testTone.sampleRate = sampleRate;\n    testTone.frequency = sampleRate / cycleSize;\n    testTone.amplitude = 0.5;\n    testTone.startDelay = latencyFrames;\n\n    result = PaQa_InitializeRecording( &recording, maxFrames, (int) sampleRate );\n    QA_ASSERT_EQUALS( \"PaQa_InitializeRecording failed\", 0, result );\n\n    MakeRecordingWithPop( &recording, &testTone, popPosition, popWidth, popAmplitude );\n\n    PaQa_AnalyseRecording( &recording, &testTone, &analysisResult );\n\n#if PRINT_REPORTS\n    printf(\"\\n=== Pop Analysis ===================\\n\");\n    printf(\"                        expected      actual\\n\");\n    printf(\"             latency: %10.3f  %10.3f\\n\", (double)latencyFrames, analysisResult.latency );\n    printf(\"         popPosition: %10.3f  %10.3f\\n\", (double)popPosition, analysisResult.popPosition );\n    printf(\"        popAmplitude: %10.3f  %10.3f\\n\", popAmplitude, analysisResult.popAmplitude );\n    printf(\"           cycleSize: %6d\\n\", cycleSize );\n    printf(\"    num added frames: %10.3f\\n\", analysisResult.numAddedFrames );\n    printf(\"     added frames at: %10.3f\\n\", analysisResult.addedFramesPosition );\n    printf(\"  num dropped frames: %10.3f\\n\", analysisResult.numDroppedFrames );\n    printf(\"   dropped frames at: %10.3f\\n\", analysisResult.droppedFramesPosition );\n#endif\n\n    QA_ASSERT_CLOSE( \"PaQa_AnalyseRecording latency\", latencyFrames, analysisResult.latency, 0.5 );\n    QA_ASSERT_CLOSE( \"PaQa_AnalyseRecording popPosition\", popPosition, analysisResult.popPosition, 10 );\n    if( popWidth > 0 )\n    {\n        QA_ASSERT_CLOSE( \"PaQa_AnalyseRecording popAmplitude\", popAmplitude, analysisResult.popAmplitude, 0.1 * popAmplitude  );\n    }\n\n    PaQa_TerminateRecording( &recording );\n    return 0;\n\nerror:\n    PaQa_SaveRecordingToWaveFile( &recording, \"bad_recording.wav\" );\n    PaQa_TerminateRecording( &recording);\n    return 1;\n}\n\n/*==========================================================================================*/\n/**\n * Analyse recording with a DC offset.\n */\nstatic int TestSingleInitialSpike( double sampleRate, int stepPosition, int cycleSize, int latencyFrames, double stepAmplitude )\n{\n    int i;\n    int result = 0;\n    // Account for highpass filter offset.\n    int expectedLatency = latencyFrames + 1;\n    PaQaRecording     recording;\n\n    PaQaRecording     hipassOutput = { 0 };\n    BiquadFilter      hipassFilter;\n\n    PaQaTestTone testTone;\n    PaQaAnalysisResult analysisResult = { 0.0 };\n    int maxFrames = ((int)sampleRate) * 2;\n\n    testTone.samplesPerFrame = 1;\n    testTone.sampleRate = sampleRate;\n    testTone.frequency = sampleRate / cycleSize;\n    testTone.amplitude = -0.5;\n    testTone.startDelay = latencyFrames;\n\n    result = PaQa_InitializeRecording( &recording, maxFrames, (int) sampleRate );\n    QA_ASSERT_EQUALS( \"PaQa_InitializeRecording failed\", 0, result );\n\n    result = PaQa_InitializeRecording( &hipassOutput, maxFrames, (int) sampleRate );\n    QA_ASSERT_EQUALS( \"PaQa_InitializeRecording failed\", 0, result );\n\n    MakeCleanRecording( &recording, &testTone );\n\n    // Apply DC step.\n    for( i=stepPosition; i<recording.numFrames; i++ )\n    {\n        recording.buffer[i] += stepAmplitude;\n    }\n\n    // Use high pass as a DC blocker!\n    BiquadFilter_SetupHighPass( &hipassFilter, 10.0 / sampleRate, 0.5 );\n    PaQa_FilterRecording( &recording, &hipassOutput, &hipassFilter );\n\n    testTone.amplitude = 0.5;\n    PaQa_AnalyseRecording( &hipassOutput, &testTone, &analysisResult );\n\n#if PRINT_REPORTS\n    printf(\"\\n=== InitialSpike Analysis ===================\\n\");\n    printf(\"                        expected      actual\\n\");\n    printf(\"             latency: %10.3f  %10.3f\\n\", (double)expectedLatency, analysisResult.latency );\n    printf(\"         popPosition: %10.3f\\n\", analysisResult.popPosition );\n    printf(\"        popAmplitude: %10.3f\\n\", analysisResult.popAmplitude );\n    printf(\"      amplitudeRatio: %10.3f\\n\", analysisResult.amplitudeRatio );\n    printf(\"           cycleSize: %6d\\n\", cycleSize );\n    printf(\"    num added frames: %10.3f\\n\", analysisResult.numAddedFrames );\n    printf(\"     added frames at: %10.3f\\n\", analysisResult.addedFramesPosition );\n    printf(\"  num dropped frames: %10.3f\\n\", analysisResult.numDroppedFrames );\n    printf(\"   dropped frames at: %10.3f\\n\", analysisResult.droppedFramesPosition );\n#endif\n\n    QA_ASSERT_CLOSE( \"PaQa_AnalyseRecording latency\", expectedLatency, analysisResult.latency, 4.0 );\n    QA_ASSERT_EQUALS( \"PaQa_AnalyseRecording no pop from step\", -1, (int) analysisResult.popPosition );\n    PaQa_TerminateRecording( &recording );\n    PaQa_TerminateRecording( &hipassOutput );\n    return 0;\n\nerror:\n    PaQa_SaveRecordingToWaveFile( &recording, \"bad_step_original.wav\" );\n    PaQa_SaveRecordingToWaveFile( &hipassOutput, \"bad_step_hipass.wav\" );\n    PaQa_TerminateRecording( &recording);\n    PaQa_TerminateRecording( &hipassOutput );\n    return 1;\n}\n\n/*==========================================================================================*/\n/**\n * Test various dropped sample scenarios.\n */\nstatic int TestDetectPops( void )\n{\n    int result;\n\n    // No pop.\n    result = TestDetectSinglePop( 44100, 200, 477, -1, 0, 0.0 );\n    if( result < 0 ) return result;\n\n    // short pop\n    result = TestDetectSinglePop( 44100, 300, 810, 3987, 1, 0.5 );\n    if( result < 0 ) return result;\n\n    // medium long pop\n    result = TestDetectSinglePop( 44100, 300, 810, 9876, 5, 0.5 );\n    if( result < 0 ) return result;\n\n    // short tiny pop\n    result = TestDetectSinglePop( 44100, 250, 810, 5672, 1, 0.05 );\n    if( result < 0 ) return result;\n\n\n    return 0;\n}\n\n/*==========================================================================================*/\n/**\n * Test analysis when there is a DC offset step before the sine signal.\n */\nstatic int TestInitialSpike( void )\n{\n    int result;\n\n//( double sampleRate, int stepPosition, int cycleSize, int latencyFrames, double stepAmplitude )\n    // No spike.\n    result = TestSingleInitialSpike( 44100, 32, 100, 537, 0.0 );\n    if( result < 0 ) return result;\n\n    // Small spike.\n    result = TestSingleInitialSpike( 44100, 32, 100, 537, 0.1 );\n    if( result < 0 ) return result;\n\n    // short pop like Ross's error.\n    result = TestSingleInitialSpike( 8000, 32, 42, 2000, 0.1 );\n    if( result < 0 ) return result;\n\n    // Medium spike.\n    result = TestSingleInitialSpike( 44100, 40, 190, 3000, 0.5 );\n    if( result < 0 ) return result;\n\n    // Spike near sine.\n    //result = TestSingleInitialSpike( 44100, 2900, 140, 3000, 0.1 );\n    if( result < 0 ) return result;\n\n\n    return 0;\n}\n\n\n#if TEST_SAVED_WAVE\n/*==========================================================================================*/\n/**\n * Simple test that writes a sawtooth waveform to a file.\n */\nstatic int TestSavedWave()\n{\n    int i,j;\n    WAV_Writer writer;\n    int result = 0;\n#define NUM_SAMPLES  (200)\n    short data[NUM_SAMPLES];\n    short saw = 0;\n\n\n    result =  Audio_WAV_OpenWriter( &writer, \"test_sawtooth.wav\", 44100, 1 );\n    if( result < 0 ) goto error;\n\n    for( i=0; i<15; i++ )\n    {\n        for( j=0; j<NUM_SAMPLES; j++ )\n        {\n            data[j] = saw;\n            saw += 293;\n        }\n        result =  Audio_WAV_WriteShorts( &writer, data, NUM_SAMPLES );\n        if( result < 0 ) goto error;\n    }\n\n    result =  Audio_WAV_CloseWriter( &writer );\n    if( result < 0 ) goto error;\n\n\n    return 0;\n\nerror:\n    printf(\"ERROR: result = %d\\n\", result );\n    return result;\n}\n#endif /* TEST_SAVED_WAVE */\n\n/*==========================================================================================*/\n/**\n * Easy way to generate a sine tone recording.\n */\nvoid PaQa_FillWithSine( PaQaRecording *recording, double sampleRate, double freq, double amp )\n{\n    PaQaSineGenerator generator;\n    float buffer[FRAMES_PER_BLOCK];\n    int samplesPerFrame = 1;\n    int stride = 1;\n    int done = 0;\n\n    // Setup a sine oscillator.\n    PaQa_SetupSineGenerator( &generator, freq, amp, sampleRate );\n\n    done = 0;\n    while (!done)\n    {\n        PaQa_EraseBuffer( buffer, FRAMES_PER_BLOCK, samplesPerFrame );\n        PaQa_MixSine( &generator, buffer, FRAMES_PER_BLOCK, stride );\n        done = PaQa_WriteRecording( recording, buffer, FRAMES_PER_BLOCK, samplesPerFrame );\n    }\n\n}\n\n/*==========================================================================================*/\n/**\n * Generate a tone then knock it out using a filter.\n * Also check using filter slightly off tune to see if some energy gets through.\n */\nstatic int TestNotchFilter( void )\n{\n    int result = 0;\n    PaQaRecording     original = { 0 };\n    PaQaRecording     filtered = { 0 };\n    BiquadFilter      notchFilter;\n    double sampleRate = 44100.0;\n    int maxFrames = ((int)sampleRate) * 1;\n\n    double freq = 234.5;\n    double amp = 0.5;\n\n    double mag1, mag2, mag3;\n\n    result = PaQa_InitializeRecording( &original, maxFrames, (int) sampleRate );\n    QA_ASSERT_EQUALS( \"PaQa_InitializeRecording failed\", 0, result );\n\n    PaQa_FillWithSine( &original, sampleRate, freq, amp );\n\n    //result = PaQa_SaveRecordingToWaveFile( &original, \"original.wav\" );\n    //QA_ASSERT_EQUALS( \"PaQa_SaveRecordingToWaveFile failed\", 0, result );\n\n    mag1 = PaQa_CorrelateSine( &original, freq, sampleRate, 0, original.numFrames, NULL );\n    QA_ASSERT_CLOSE( \"exact frequency match\", amp, mag1, 0.01 );\n\n    // Filter with exact frequency.\n    result = PaQa_InitializeRecording( &filtered, maxFrames, (int) sampleRate );\n    QA_ASSERT_EQUALS( \"PaQa_InitializeRecording failed\", 0, result );\n\n    BiquadFilter_SetupNotch( &notchFilter, freq / sampleRate, 0.5 );\n    PaQa_FilterRecording( &original, &filtered, &notchFilter );\n    result = PaQa_SaveRecordingToWaveFile( &filtered, \"filtered1.wav\" );\n    QA_ASSERT_EQUALS( \"PaQa_SaveRecordingToWaveFile failed\", 0, result );\n\n    mag2 = PaQa_CorrelateSine( &filtered, freq, sampleRate, 0, filtered.numFrames, NULL );\n    QA_ASSERT_CLOSE( \"should eliminate tone\", 0.0, mag2, 0.01 );\n\n    // Filter with mismatched frequency.\n    BiquadFilter_SetupNotch( &notchFilter, 1.07 * freq / sampleRate, 2.0 );\n    PaQa_FilterRecording( &original, &filtered, &notchFilter );\n\n    //result = PaQa_SaveRecordingToWaveFile( &filtered, \"badfiltered.wav\" );\n    //QA_ASSERT_EQUALS( \"PaQa_SaveRecordingToWaveFile failed\", 0, result );\n\n    mag3 = PaQa_CorrelateSine( &filtered, freq, sampleRate, 0, filtered.numFrames, NULL );\n    QA_ASSERT_CLOSE( \"should eliminate tone\", amp*0.26, mag3, 0.01 );\n\n\n    PaQa_TerminateRecording( &original );\n    PaQa_TerminateRecording( &filtered );\n    return 0;\n\nerror:\n    PaQa_TerminateRecording( &original);\n    PaQa_TerminateRecording( &filtered );\n    return 1;\n\n}\n\n/*==========================================================================================*/\n/**\n */\nint PaQa_TestAnalyzer( void )\n{\n    int result;\n\n#if TEST_SAVED_WAVE\n    // Write a simple wave file.\n    if ((result = TestSavedWave()) != 0) return result;\n#endif /* TEST_SAVED_WAVE */\n\n    // Generate single tone and verify presence.\n    if ((result = TestSingleMonoTone()) != 0) return result;\n\n    // Generate prime series of tones and verify presence.\n    if ((result = TestMixedMonoTones()) != 0) return result;\n\n    // Detect dropped or added samples in a sine wave recording.\n    if ((result = TestDetectPhaseErrors()) != 0) return result;\n\n    // Test to see if notch filter can knock out the test tone.\n    if ((result = TestNotchFilter()) != 0) return result;\n\n    // Detect pops that get back in phase.\n    if ((result = TestDetectPops()) != 0) return result;\n\n    // Test to see if the latency detector can be tricked like it was on Ross' Windows machine.\n    if ((result = TestInitialSpike()) != 0) return result;\n\n\n    return 0;\n}\n"
  },
  {
    "path": "thirdparty/portaudio/qa/loopback/src/test_audio_analyzer.h",
    "content": "\n/*\n * PortAudio Portable Real-Time Audio Library\n * Latest Version at: http://www.portaudio.com\n *\n * Copyright (c) 1999-2010 Phil Burk and Ross Bencina\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n#ifndef _TEST_AUDIO_ANALYZER_H\n#define _TEST_AUDIO_ANALYZER_H\n\n/** Test the audio analyzer by itself without any PortAudio calls. */\nint PaQa_TestAnalyzer( void );\n\n\n#endif /* _TEST_AUDIO_ANALYZER_H */\n"
  },
  {
    "path": "thirdparty/portaudio/qa/loopback/src/write_wav.c",
    "content": "/*\n * PortAudio Portable Real-Time Audio Library\n * Latest Version at: http://www.portaudio.com\n *\n * Copyright (c) 1999-2010 Phil Burk and Ross Bencina\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n/**\n  * Very simple WAV file writer for saving captured audio.\n  */\n\n#include <stdio.h>\n#include <stdlib.h>\n#include \"write_wav.h\"\n\n\n/* Write long word data to a little endian format byte array. */\nstatic void WriteLongLE( unsigned char **addrPtr, unsigned long data )\n{\n    unsigned char *addr = *addrPtr;\n    *addr++ =  (unsigned char) data;\n    *addr++ =  (unsigned char) (data>>8);\n    *addr++ =  (unsigned char) (data>>16);\n    *addr++ =  (unsigned char) (data>>24);\n    *addrPtr = addr;\n}\n\n/* Write short word data to a little endian format byte array. */\nstatic void WriteShortLE( unsigned char **addrPtr,  unsigned short data )\n{\n    unsigned char *addr = *addrPtr;\n    *addr++ =  (unsigned char) data;\n    *addr++ =  (unsigned char) (data>>8);\n    *addrPtr = addr;\n}\n\n/* Write IFF ChunkType data to a byte array. */\nstatic void WriteChunkType( unsigned char **addrPtr, unsigned long cktyp )\n{\n    unsigned char *addr = *addrPtr;\n    *addr++ =  (unsigned char) (cktyp>>24);\n    *addr++ =  (unsigned char) (cktyp>>16);\n    *addr++ =  (unsigned char) (cktyp>>8);\n    *addr++ =  (unsigned char) cktyp;\n    *addrPtr = addr;\n}\n\n#define WAV_HEADER_SIZE (4 + 4 + 4 + /* RIFF+size+WAVE */ \\\n        4 + 4 + 16 + /* fmt chunk */ \\\n        4 + 4 ) /* data chunk */\n\n\n/*********************************************************************************\n * Open named file and write WAV header to the file.\n * The header includes the DATA chunk type and size.\n * Returns number of bytes written to file or negative error code.\n */\nlong Audio_WAV_OpenWriter( WAV_Writer *writer, const char *fileName, int frameRate, int samplesPerFrame )\n{\n    unsigned int  bytesPerSecond;\n    unsigned char header[ WAV_HEADER_SIZE ];\n    unsigned char *addr = header;\n    int numWritten;\n\n    writer->dataSize = 0;\n    writer->dataSizeOffset = 0;\n\n    writer->fid = fopen( fileName, \"wb\" );\n    if( writer->fid == NULL )\n    {\n        return -1;\n    }\n\n/* Write RIFF header. */\n    WriteChunkType( &addr, RIFF_ID );\n\n/* Write RIFF size as zero for now. Will patch later. */\n    WriteLongLE( &addr, 0 );\n\n/* Write WAVE form ID. */\n    WriteChunkType( &addr, WAVE_ID );\n\n/* Write format chunk based on AudioSample structure. */\n    WriteChunkType( &addr, FMT_ID );\n    WriteLongLE( &addr, 16 );\n    WriteShortLE( &addr, WAVE_FORMAT_PCM );\n        bytesPerSecond = frameRate * samplesPerFrame * sizeof( short);\n    WriteShortLE( &addr, (short) samplesPerFrame );\n    WriteLongLE( &addr, frameRate );\n    WriteLongLE( &addr,  bytesPerSecond );\n    WriteShortLE( &addr, (short) (samplesPerFrame * sizeof( short)) ); /* bytesPerBlock */\n    WriteShortLE( &addr, (short) 16 ); /* bits per sample */\n\n/* Write ID and size for 'data' chunk. */\n    WriteChunkType( &addr, DATA_ID );\n/* Save offset so we can patch it later. */\n    writer->dataSizeOffset = (int) (addr - header);\n    WriteLongLE( &addr, 0 );\n\n    numWritten = fwrite( header, 1, sizeof(header), writer->fid );\n    if( numWritten != sizeof(header) ) return -1;\n\n    return (int) numWritten;\n}\n\n/*********************************************************************************\n * Write to the data chunk portion of a WAV file.\n * Returns bytes written or negative error code.\n */\nlong Audio_WAV_WriteShorts( WAV_Writer *writer,\n        short *samples,\n        int numSamples\n        )\n{\n    unsigned char buffer[2];\n    unsigned char *bufferPtr;\n    int i;\n    short *p = samples;\n    int numWritten;\n    int bytesWritten;\n    if( numSamples <= 0 )\n    {\n        return -1;\n    }\n\n    for( i=0; i<numSamples; i++ )\n    {\n        bufferPtr = buffer;\n        WriteShortLE( &bufferPtr, *p++ );\n        numWritten = fwrite( buffer, 1, sizeof( buffer), writer->fid );\n        if( numWritten != sizeof(buffer) ) return -1;\n    }\n    bytesWritten = numSamples * sizeof(short);\n    writer->dataSize += bytesWritten;\n    return (int) bytesWritten;\n}\n\n/*********************************************************************************\n * Close WAV file.\n * Update chunk sizes so it can be read by audio applications.\n */\nlong Audio_WAV_CloseWriter( WAV_Writer *writer )\n{\n    unsigned char buffer[4];\n    unsigned char *bufferPtr;\n    int numWritten;\n    int riffSize;\n\n    /* Go back to beginning of file and update DATA size */\n    int result = fseek( writer->fid, writer->dataSizeOffset, SEEK_SET );\n    if( result < 0 ) return result;\n\n    bufferPtr = buffer;\n    WriteLongLE( &bufferPtr, writer->dataSize );\n    numWritten = fwrite( buffer, 1, sizeof( buffer), writer->fid );\n    if( numWritten != sizeof(buffer) ) return -1;\n\n    /* Update RIFF size */\n    result = fseek( writer->fid, 4, SEEK_SET );\n    if( result < 0 ) return result;\n\n    riffSize = writer->dataSize + (WAV_HEADER_SIZE - 8);\n    bufferPtr = buffer;\n    WriteLongLE( &bufferPtr, riffSize );\n    numWritten = fwrite( buffer, 1, sizeof( buffer), writer->fid );\n    if( numWritten != sizeof(buffer) ) return -1;\n\n    fclose( writer->fid );\n    writer->fid = NULL;\n    return writer->dataSize;\n}\n\n/*********************************************************************************\n * Simple test that write a sawtooth waveform to a file.\n */\n#if 0\nint main( void )\n{\n    int i;\n    WAV_Writer writer;\n    int result;\n#define NUM_SAMPLES  (200)\n    short data[NUM_SAMPLES];\n    short saw = 0;\n\n    for( i=0; i<NUM_SAMPLES; i++ )\n    {\n        data[i] = saw;\n        saw += 293;\n    }\n\n\n    result =  Audio_WAV_OpenWriter( &writer, \"rendered_midi.wav\", 44100, 1 );\n    if( result < 0 ) goto error;\n\n    for( i=0; i<15; i++ )\n    {\n        result =  Audio_WAV_WriteShorts( &writer, data, NUM_SAMPLES );\n        if( result < 0 ) goto error;\n    }\n\n    result =  Audio_WAV_CloseWriter( &writer );\n    if( result < 0 ) goto error;\n\n\n    return 0;\n\nerror:\n    printf(\"ERROR: result = %d\\n\", result );\n    return result;\n}\n#endif\n"
  },
  {
    "path": "thirdparty/portaudio/qa/loopback/src/write_wav.h",
    "content": "/*\n * PortAudio Portable Real-Time Audio Library\n * Latest Version at: http://www.portaudio.com\n *\n * Copyright (c) 1999-2010 Phil Burk and Ross Bencina\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n#ifndef _WAV_WRITER_H\n#define _WAV_WRITER_H\n\n/*\n * WAV file writer.\n *\n * Author: Phil Burk\n */\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/* Define WAV Chunk and FORM types as 4 byte integers. */\n#define RIFF_ID   (('R'<<24) | ('I'<<16) | ('F'<<8) | 'F')\n#define WAVE_ID   (('W'<<24) | ('A'<<16) | ('V'<<8) | 'E')\n#define FMT_ID    (('f'<<24) | ('m'<<16) | ('t'<<8) | ' ')\n#define DATA_ID   (('d'<<24) | ('a'<<16) | ('t'<<8) | 'a')\n#define FACT_ID   (('f'<<24) | ('a'<<16) | ('c'<<8) | 't')\n\n/* Errors returned by Audio_ParseSampleImage_WAV */\n#define WAV_ERR_CHUNK_SIZE     (-1)   /* Chunk size is illegal or past file size. */\n#define WAV_ERR_FILE_TYPE      (-2)   /* Not a WAV file. */\n#define WAV_ERR_ILLEGAL_VALUE  (-3)   /* Illegal or unsupported value. Eg. 927 bits/sample */\n#define WAV_ERR_FORMAT_TYPE    (-4)   /* Unsupported format, eg. compressed. */\n#define WAV_ERR_TRUNCATED      (-5)   /* End of file missing. */\n\n/* WAV PCM data format ID */\n#define WAVE_FORMAT_PCM        (1)\n#define WAVE_FORMAT_IMA_ADPCM  (0x0011)\n\n\ntypedef struct WAV_Writer_s\n{\n    FILE *fid;\n    /* Offset in file for data size. */\n    int   dataSizeOffset;\n    int   dataSize;\n} WAV_Writer;\n\n/*********************************************************************************\n * Open named file and write WAV header to the file.\n * The header includes the DATA chunk type and size.\n * Returns number of bytes written to file or negative error code.\n */\nlong Audio_WAV_OpenWriter( WAV_Writer *writer, const char *fileName, int frameRate, int samplesPerFrame );\n\n/*********************************************************************************\n * Write to the data chunk portion of a WAV file.\n * Returns bytes written or negative error code.\n */\nlong Audio_WAV_WriteShorts( WAV_Writer *writer,\n        short *samples,\n        int numSamples\n        );\n\n/*********************************************************************************\n * Close WAV file.\n * Update chunk sizes so it can be read by audio applications.\n */\nlong Audio_WAV_CloseWriter( WAV_Writer *writer );\n\n#ifdef __cplusplus\n};\n#endif\n\n#endif /* _WAV_WRITER_H */\n"
  },
  {
    "path": "thirdparty/portaudio/qa/paqa_devs.c",
    "content": "/** @file paqa_devs.c\n    @ingroup qa_src\n    @brief Self Testing Quality Assurance app for PortAudio\n    Try to open devices and run through all possible configurations.\n    By default, open only the default devices. Command line options support\n    opening every device, or all input devices, or all output devices.\n    This test does not verify that the configuration works well.\n    It just verifies that it does not crash. It requires a human to\n    listen to the sine wave outputs.\n\n    @author Phil Burk  http://www.softsynth.com\n\n    Pieter adapted to V19 API. Test now relies heavily on\n    Pa_IsFormatSupported(). Uses same 'standard' sample rates\n    as in test pa_devs.c.\n*/\n/*\n * $Id$\n *\n * This program uses the PortAudio Portable Audio Library.\n * For more information see: http://www.portaudio.com\n * Copyright (c) 1999-2000 Ross Bencina and Phil Burk\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <math.h>\n#include \"portaudio.h\"\n#include \"pa_trace.h\"\n\n/****************************************** Definitions ***********/\n#define MODE_INPUT         (0)\n#define MODE_OUTPUT        (1)\n#define MAX_TEST_CHANNELS  (4)\n#define LOWEST_FREQUENCY   (300.0)\n#define LOWEST_SAMPLE_RATE (8000.0)\n#define PHASE_INCREMENT    (2.0 * M_PI * LOWEST_FREQUENCY / LOWEST_SAMPLE_RATE)\n#define SINE_AMPLITUDE     (0.2)\n\ntypedef struct PaQaData\n{\n    unsigned long  framesLeft;\n    int            numChannels;\n    int            bytesPerSample;\n    int            mode;\n    float          phase;\n    PaSampleFormat format;\n}\nPaQaData;\n\n/****************************************** Prototypes ***********/\nstatic void TestDevices( int mode, int allDevices );\nstatic void TestFormats( int mode, PaDeviceIndex deviceID, double sampleRate,\n                         int numChannels );\nstatic int TestAdvance( int mode, PaDeviceIndex deviceID, double sampleRate,\n                        int numChannels, PaSampleFormat format );\nstatic int QaCallback( const void *inputBuffer, void *outputBuffer,\n                       unsigned long framesPerBuffer,\n                       const PaStreamCallbackTimeInfo* timeInfo,\n                       PaStreamCallbackFlags statusFlags,\n                       void *userData );\n\n/****************************************** Globals ***********/\nstatic int gNumPassed = 0;\nstatic int gNumFailed = 0;\n\n/****************************************** Macros ***********/\n/* Print ERROR if it fails. Tally success or failure. */\n/* Odd do-while wrapper seems to be needed for some compilers. */\n#define EXPECT(_exp) \\\n    do \\\n    { \\\n        if ((_exp)) {\\\n            /* printf(\"SUCCESS for %s\\n\", #_exp ); */ \\\n            gNumPassed++; \\\n        } \\\n        else { \\\n            printf(\"ERROR - 0x%x - %s for %s\\n\", result, \\\n                    ((result == 0) ? \"-\" : Pa_GetErrorText(result)), \\\n                    #_exp ); \\\n            gNumFailed++; \\\n            goto error; \\\n        } \\\n    } while(0)\n\nstatic float NextSineSample( PaQaData *data )\n{\n    float phase = data->phase + PHASE_INCREMENT;\n    if( phase > M_PI ) phase -= 2.0 * M_PI;\n    data->phase = phase;\n    return sinf(phase) * SINE_AMPLITUDE;\n}\n\n/*******************************************************************/\n/* This routine will be called by the PortAudio engine when audio is needed.\n** It may be called at interrupt level on some machines so don't do anything\n** that could mess up the system like calling malloc() or free().\n*/\nstatic int QaCallback( const void *inputBuffer, void *outputBuffer,\n                       unsigned long framesPerBuffer,\n                       const PaStreamCallbackTimeInfo* timeInfo,\n                       PaStreamCallbackFlags statusFlags,\n                       void *userData )\n{\n    unsigned long frameIndex;\n    unsigned long channelIndex;\n    float sample;\n    PaQaData *data = (PaQaData *) userData;\n    (void) inputBuffer;\n\n    /* Play simple sine wave. */\n    if( data->mode == MODE_OUTPUT )\n    {\n        switch( data->format )\n        {\n        case paFloat32:\n            {\n                float *out =  (float *) outputBuffer;\n                for( frameIndex = 0; frameIndex < framesPerBuffer; frameIndex++ )\n                {\n                    sample = NextSineSample( data );\n                    for( channelIndex = 0; channelIndex < data->numChannels; channelIndex++ )\n                    {\n                        *out++ = sample;\n                    }\n                }\n            }\n            break;\n\n        case paInt32:\n            {\n                int *out =  (int *) outputBuffer;\n                for( frameIndex = 0; frameIndex < framesPerBuffer; frameIndex++ )\n                {\n                    sample = NextSineSample( data );\n                    for( channelIndex = 0; channelIndex < data->numChannels; channelIndex++ )\n                    {\n                        *out++ = ((int)(sample * 0x00800000)) << 8;\n                    }\n                }\n            }\n            break;\n\n        case paInt16:\n            {\n                short *out =  (short *) outputBuffer;\n                for( frameIndex = 0; frameIndex < framesPerBuffer; frameIndex++ )\n                {\n                    sample = NextSineSample( data );\n                    for( channelIndex = 0; channelIndex < data->numChannels; channelIndex++ )\n                    {\n                        *out++ = (short)(sample * 32767);\n                    }\n                }\n            }\n            break;\n\n        default:\n            {\n                unsigned char *out =  (unsigned char *) outputBuffer;\n                unsigned long numBytes = framesPerBuffer * data->numChannels * data->bytesPerSample;\n                memset(out, 0, numBytes);\n            }\n            break;\n        }\n    }\n    /* Are we through yet? */\n    if( data->framesLeft > framesPerBuffer )\n    {\n        PaUtil_AddTraceMessage(\"QaCallback: running. framesLeft\", data->framesLeft );\n        data->framesLeft -= framesPerBuffer;\n        return 0;\n    }\n    else\n    {\n        PaUtil_AddTraceMessage(\"QaCallback: DONE! framesLeft\", data->framesLeft );\n        data->framesLeft = 0;\n        return 1;\n    }\n}\n\n/*******************************************************************/\nstatic void usage( const char *name )\n{\n    printf(\"%s [-a]\\n\", name);\n    printf(\"  -a - Test ALL devices, otherwise just the default devices.\\n\");\n    printf(\"  -i - Test INPUT only.\\n\");\n    printf(\"  -o - Test OUTPUT only.\\n\");\n    printf(\"  -? - Help\\n\");\n}\n\n/*******************************************************************/\nint main( int argc, char **argv );\nint main( int argc, char **argv )\n{\n    int     i;\n    PaError result;\n    int     allDevices = 0;\n    int     testOutput = 1;\n    int     testInput = 1;\n    char   *executableName = argv[0];\n\n    /* Parse command line parameters. */\n    i = 1;\n    while( i<argc )\n    {\n        char *arg = argv[i];\n        if( arg[0] == '-' )\n        {\n            switch(arg[1])\n            {\n                case 'a':\n                    allDevices = 1;\n                    break;\n                case 'i':\n                    testOutput = 0;\n                    break;\n                case 'o':\n                    testInput = 0;\n                    break;\n\n                default:\n                    printf(\"Illegal option: %s\\n\", arg);\n                case '?':\n                    usage( executableName );\n                    exit(1);\n                    break;\n            }\n        }\n        else\n        {\n            printf(\"Illegal argument: %s\\n\", arg);\n            usage( executableName );\n            return 1;\n\n        }\n        i += 1;\n    }\n\n    EXPECT(sizeof(short) == 2); /* The callback assumes we have 16-bit shorts. */\n    EXPECT(sizeof(int) == 4); /* The callback assumes we have 32-bit ints. */\n    EXPECT( ((result=Pa_Initialize()) == 0) );\n\n    if( testOutput )\n    {\n        printf(\"\\n---- Test OUTPUT ---------------\\n\");\n        TestDevices( MODE_OUTPUT, allDevices );\n    }\n    if( testInput )\n    {\n        printf(\"\\n---- Test INPUT ---------------\\n\");\n        TestDevices( MODE_INPUT, allDevices );\n    }\n\nerror:\n    Pa_Terminate();\n    printf(\"QA Report: %d passed, %d failed.\\n\", gNumPassed, gNumFailed );\n    return (gNumFailed > 0) ? 1 : 0;\n}\n\n/*******************************************************************\n* Try each output device, through its full range of capabilities. */\nstatic void TestDevices( int mode, int allDevices )\n{\n    int id, jc, i;\n    int maxChannels;\n    int isDefault;\n    const PaDeviceInfo *pdi;\n    static double standardSampleRates[] = {  8000.0,  9600.0, 11025.0, 12000.0,\n                                            16000.0,          22050.0, 24000.0,\n                                            32000.0,          44100.0, 48000.0,\n                                                              88200.0, 96000.0,\n                                               -1.0 }; /* Negative terminated list. */\n    int numDevices = Pa_GetDeviceCount();\n    for( id=0; id<numDevices; id++ )            /* Iterate through all devices. */\n    {\n        pdi = Pa_GetDeviceInfo( id );\n\n        if( mode == MODE_INPUT ) {\n            maxChannels = pdi->maxInputChannels;\n            isDefault = ( id == Pa_GetDefaultInputDevice());\n        } else {\n            maxChannels = pdi->maxOutputChannels;\n            isDefault = ( id == Pa_GetDefaultOutputDevice());\n        }\n        if( maxChannels > MAX_TEST_CHANNELS )\n            maxChannels = MAX_TEST_CHANNELS;\n\n        if (!allDevices && !isDefault) continue; // skip this device\n\n        for( jc=1; jc<=maxChannels; jc++ )\n        {\n            printf(\"\\n===========================================================\\n\");\n            printf(\"            Device = %s\\n\", pdi->name );\n            printf(\"===========================================================\\n\");\n            /* Try each standard sample rate. */\n            for( i=0; standardSampleRates[i] > 0; i++ )\n            {\n                TestFormats( mode, (PaDeviceIndex)id, standardSampleRates[i], jc );\n            }\n        }\n    }\n}\n\n/*******************************************************************/\nstatic void TestFormats( int mode, PaDeviceIndex deviceID, double sampleRate,\n                         int numChannels )\n{\n    TestAdvance( mode, deviceID, sampleRate, numChannels, paFloat32 );\n    TestAdvance( mode, deviceID, sampleRate, numChannels, paInt16 );\n    TestAdvance( mode, deviceID, sampleRate, numChannels, paInt32 );\n    /* TestAdvance( mode, deviceID, sampleRate, numChannels, paInt24 ); */\n}\n\n/*******************************************************************/\nstatic int TestAdvance( int mode, PaDeviceIndex deviceID, double sampleRate,\n                        int numChannels, PaSampleFormat format )\n{\n    PaStreamParameters inputParameters, outputParameters, *ipp, *opp;\n    PaStream *stream = NULL;\n    PaError result = paNoError;\n    PaQaData myData;\n    #define FRAMES_PER_BUFFER  (64)\n    const int kNumSeconds = 100;\n\n    /* Setup data for synthesis thread. */\n    myData.framesLeft = (unsigned long) (sampleRate * kNumSeconds);\n    myData.numChannels = numChannels;\n    myData.mode = mode;\n    myData.format = format;\n    switch( format )\n    {\n    case paFloat32:\n    case paInt32:\n    case paInt24:\n        myData.bytesPerSample = 4;\n        break;\n/*  case paPackedInt24:\n        myData.bytesPerSample = 3;\n        break; */\n    default:\n        myData.bytesPerSample = 2;\n        break;\n    }\n\n    if( mode == MODE_INPUT )\n    {\n        inputParameters.device       = deviceID;\n        inputParameters.channelCount = numChannels;\n        inputParameters.sampleFormat = format;\n        inputParameters.suggestedLatency =\n                Pa_GetDeviceInfo( inputParameters.device )->defaultLowInputLatency;\n        inputParameters.hostApiSpecificStreamInfo = NULL;\n        ipp = &inputParameters;\n    }\n    else\n    {\n        ipp = NULL;\n    }\n\n    if( mode == MODE_OUTPUT )\n    {\n        outputParameters.device       = deviceID;\n        outputParameters.channelCount = numChannels;\n        outputParameters.sampleFormat = format;\n        outputParameters.suggestedLatency =\n                Pa_GetDeviceInfo( outputParameters.device )->defaultLowOutputLatency;\n        outputParameters.hostApiSpecificStreamInfo = NULL;\n        opp = &outputParameters;\n    }\n    else\n    {\n        opp = NULL;\n    }\n\n    if(paFormatIsSupported == Pa_IsFormatSupported( ipp, opp, sampleRate ))\n    {\n        printf(\"------ TestAdvance: %s, device = %d, rate = %g\"\n               \", numChannels = %d, format = %lu -------\\n\",\n                ( mode == MODE_INPUT ) ? \"INPUT\" : \"OUTPUT\",\n                deviceID, sampleRate, numChannels, (unsigned long)format);\n        EXPECT( ((result = Pa_OpenStream( &stream,\n                                          ipp,\n                                          opp,\n                                          sampleRate,\n                                          FRAMES_PER_BUFFER,\n                                          paClipOff,  /* we won't output out of range samples so don't bother clipping them */\n                                          QaCallback,\n                                          &myData ) ) == 0) );\n        if( stream )\n        {\n            PaTime oldStamp, newStamp;\n            unsigned long oldFrames;\n            int minDelay = ( mode == MODE_INPUT ) ? 1000 : 400;\n            /* Was:\n            int minNumBuffers = Pa_GetMinNumBuffers( FRAMES_PER_BUFFER, sampleRate );\n            int msec = (int) ((minNumBuffers * 3 * 1000.0 * FRAMES_PER_BUFFER) / sampleRate);\n            */\n            int msec = (int)( 3.0 *\n                       (( mode == MODE_INPUT ) ? inputParameters.suggestedLatency : outputParameters.suggestedLatency ));\n            if( msec < minDelay ) msec = minDelay;\n            printf(\"msec = %d\\n\", msec);  /**/\n            EXPECT( ((result=Pa_StartStream( stream )) == 0) );\n            /* Check to make sure PortAudio is advancing timeStamp. */\n            oldStamp = Pa_GetStreamTime(stream);\n            Pa_Sleep(msec);\n            newStamp = Pa_GetStreamTime(stream);\n            printf(\"oldStamp  = %9.6f, newStamp = %9.6f\\n\", oldStamp, newStamp ); /**/\n            EXPECT( (oldStamp < newStamp) );\n            /* Check to make sure callback is decrementing framesLeft. */\n            oldFrames = myData.framesLeft;\n            Pa_Sleep(msec);\n            printf(\"oldFrames = %lu, myData.framesLeft = %lu\\n\", oldFrames,  myData.framesLeft ); /**/\n            EXPECT( (oldFrames > myData.framesLeft) );\n            EXPECT( ((result=Pa_CloseStream( stream )) == 0) );\n            stream = NULL;\n        }\n    }\n    return 0;\nerror:\n    if( stream != NULL ) Pa_CloseStream( stream );\n    return -1;\n}\n"
  },
  {
    "path": "thirdparty/portaudio/qa/paqa_errs.c",
    "content": "/** @file paqa_errs.c\n    @ingroup qa_src\n    @brief Self Testing Quality Assurance app for PortAudio\n    Do lots of bad things to test error reporting.\n    @author Phil Burk  http://www.softsynth.com\n    Pieter Suurmond adapted to V19 API.\n*/\n/*\n * $Id$\n *\n * This program uses the PortAudio Portable Audio Library.\n * For more information see: http://www.portaudio.com\n * Copyright (c) 1999-2000 Ross Bencina and Phil Burk\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n#include <stdio.h>\n#include <math.h>\n\n#include \"portaudio.h\"\n\n/*--------- Definitions ---------*/\n#define MODE_INPUT        (0)\n#define MODE_OUTPUT       (1)\n#define FRAMES_PER_BUFFER (64)\n#define SAMPLE_RATE       (44100.0)\n\ntypedef struct PaQaData\n{\n    unsigned long  framesLeft;\n    int            numChannels;\n    int            bytesPerSample;\n    int            mode;\n}\nPaQaData;\n\nstatic int gNumPassed = 0; /* Two globals */\nstatic int gNumFailed = 0;\n\n/*------------------- Macros ------------------------------*/\n/* Print ERROR if it fails. Tally success or failure. Odd  */\n/* do-while wrapper seems to be needed for some compilers. */\n\n#define EXPECT(_exp) \\\n    do \\\n    { \\\n        if ((_exp)) {\\\n            gNumPassed++; \\\n        } \\\n        else { \\\n            printf(\"\\nERROR - 0x%x - %s for %s\\n\", result, Pa_GetErrorText(result), #_exp ); \\\n            gNumFailed++; \\\n            goto error; \\\n        } \\\n    } while(0)\n\n#define HOPEFOR(_exp) \\\n    do \\\n    { \\\n        if ((_exp)) {\\\n            gNumPassed++; \\\n        } \\\n        else { \\\n            printf(\"\\nERROR - 0x%x - %s for %s\\n\", result, Pa_GetErrorText(result), #_exp ); \\\n            gNumFailed++; \\\n        } \\\n    } while(0)\n\n/*-------------------------------------------------------------------------*/\n/* This routine will be called by the PortAudio engine when audio is needed.\n   It may be called at interrupt level on some machines so don't do anything\n   that could mess up the system like calling malloc() or free().\n*/\nstatic int QaCallback( const void*                      inputBuffer,\n                       void*                            outputBuffer,\n                       unsigned long                    framesPerBuffer,\n                       const PaStreamCallbackTimeInfo*  timeInfo,\n                       PaStreamCallbackFlags            statusFlags,\n                       void*                            userData )\n{\n    unsigned long   i;\n    unsigned char*  out = (unsigned char *) outputBuffer;\n    PaQaData*       data = (PaQaData *) userData;\n\n    (void)inputBuffer; /* Prevent \"unused variable\" warnings. */\n\n    /* Zero out buffer so we don't hear terrible noise. */\n    if( data->mode == MODE_OUTPUT )\n    {\n        unsigned long numBytes = framesPerBuffer * data->numChannels * data->bytesPerSample;\n        for( i=0; i<numBytes; i++ )\n        {\n            *out++ = 0;\n        }\n    }\n    /* Are we through yet? */\n    if( data->framesLeft > framesPerBuffer )\n    {\n        data->framesLeft -= framesPerBuffer;\n        return 0;\n    }\n    else\n    {\n        data->framesLeft = 0;\n        return 1;\n    }\n}\n\nstatic PaDeviceIndex FindInputOnlyDevice(void)\n{\n    PaDeviceIndex result = Pa_GetDefaultInputDevice();\n    if( result != paNoDevice && Pa_GetDeviceInfo(result)->maxOutputChannels == 0 )\n        return result;\n\n    for( result = 0; result < Pa_GetDeviceCount(); ++result )\n    {\n        if( Pa_GetDeviceInfo(result)->maxOutputChannels == 0 )\n            return result;\n    }\n\n    return paNoDevice;\n}\n\nstatic PaDeviceIndex FindOutputOnlyDevice(void)\n{\n    PaDeviceIndex result = Pa_GetDefaultOutputDevice();\n    if( result != paNoDevice && Pa_GetDeviceInfo(result)->maxInputChannels == 0 )\n        return result;\n\n    for( result = 0; result < Pa_GetDeviceCount(); ++result )\n    {\n        if( Pa_GetDeviceInfo(result)->maxInputChannels == 0 )\n            return result;\n    }\n\n    return paNoDevice;\n}\n\n/*-------------------------------------------------------------------------------------------------*/\nstatic int TestBadOpens( void )\n{\n    PaStream*           stream = NULL;\n    PaError             result;\n    PaQaData            myData;\n    PaStreamParameters  ipp, opp;\n    const PaDeviceInfo* info = NULL;\n\n\n    /* Setup data for synthesis thread. */\n    myData.framesLeft = (unsigned long) (SAMPLE_RATE * 100); /* 100 seconds */\n    myData.numChannels = 1;\n    myData.mode = MODE_OUTPUT;\n\n    /*----------------------------- No devices specified: */\n    ipp.device                    = opp.device                    = paNoDevice;\n    ipp.channelCount              = opp.channelCount              = 0; /* Also no channels. */\n    ipp.hostApiSpecificStreamInfo = opp.hostApiSpecificStreamInfo = NULL;\n    ipp.sampleFormat              = opp.sampleFormat              = paFloat32;\n    /* Take the low latency of the default device for all subsequent tests. */\n    info = Pa_GetDeviceInfo(Pa_GetDefaultInputDevice());\n    ipp.suggestedLatency          = info ? info->defaultLowInputLatency : 0.100;\n    info = Pa_GetDeviceInfo(Pa_GetDefaultOutputDevice());\n    opp.suggestedLatency          = info ? info->defaultLowOutputLatency : 0.100;\n    HOPEFOR(((result = Pa_OpenStream(&stream, &ipp, &opp,\n                                     SAMPLE_RATE, FRAMES_PER_BUFFER,\n                                     paClipOff, QaCallback, &myData )) == paInvalidDevice));\n\n    /*----------------------------- No devices specified #2: */\n    HOPEFOR(((result = Pa_OpenStream(&stream, NULL, NULL,\n                                     SAMPLE_RATE, FRAMES_PER_BUFFER,\n                                     paClipOff, QaCallback, &myData )) == paInvalidDevice));\n\n    /*----------------------------- Out of range input device specified: */\n    ipp.hostApiSpecificStreamInfo = opp.hostApiSpecificStreamInfo = NULL;\n    ipp.sampleFormat              = opp.sampleFormat              = paFloat32;\n    ipp.channelCount = 0;           ipp.device = Pa_GetDeviceCount(); /* And no output device, and no channels. */\n    opp.channelCount = 0;           opp.device = paNoDevice;\n    HOPEFOR(((result = Pa_OpenStream(&stream, &ipp, NULL,\n                                     SAMPLE_RATE, FRAMES_PER_BUFFER,\n                                     paClipOff, QaCallback, &myData )) == paInvalidDevice));\n\n    /*----------------------------- Out of range output device specified: */\n    ipp.hostApiSpecificStreamInfo = opp.hostApiSpecificStreamInfo = NULL;\n    ipp.sampleFormat              = opp.sampleFormat              = paFloat32;\n    ipp.channelCount = 0;           ipp.device = paNoDevice; /* And no input device, and no channels. */\n    opp.channelCount = 0;           opp.device = Pa_GetDeviceCount();\n    HOPEFOR(((result = Pa_OpenStream(&stream, NULL, &opp,\n                                     SAMPLE_RATE, FRAMES_PER_BUFFER,\n                                     paClipOff, QaCallback, &myData )) == paInvalidDevice));\n\n    if (Pa_GetDefaultInputDevice() != paNoDevice) {\n        /*----------------------------- Zero input channels: */\n        ipp.hostApiSpecificStreamInfo = opp.hostApiSpecificStreamInfo = NULL;\n        ipp.sampleFormat              = opp.sampleFormat              = paFloat32;\n        ipp.channelCount = 0;           ipp.device = Pa_GetDefaultInputDevice();\n        opp.channelCount = 0;           opp.device = paNoDevice;    /* And no output device, and no output channels. */\n        HOPEFOR(((result = Pa_OpenStream(&stream, &ipp, NULL,\n                                         SAMPLE_RATE, FRAMES_PER_BUFFER,\n                                         paClipOff, QaCallback, &myData )) == paInvalidChannelCount));\n    }\n\n    if (Pa_GetDefaultOutputDevice() != paNoDevice) {\n        /*----------------------------- Zero output channels: */\n        ipp.hostApiSpecificStreamInfo = opp.hostApiSpecificStreamInfo = NULL;\n        ipp.sampleFormat              = opp.sampleFormat              = paFloat32;\n        ipp.channelCount = 0;           ipp.device = paNoDevice; /* And no input device, and no input channels. */\n        opp.channelCount = 0;           opp.device = Pa_GetDefaultOutputDevice();\n        HOPEFOR(((result = Pa_OpenStream(&stream, NULL, &opp,\n                                         SAMPLE_RATE, FRAMES_PER_BUFFER,\n                                         paClipOff, QaCallback, &myData )) == paInvalidChannelCount));\n    }\n    /*----------------------------- Nonzero input and output channels but no output device: */\n    ipp.hostApiSpecificStreamInfo = opp.hostApiSpecificStreamInfo = NULL;\n    ipp.sampleFormat              = opp.sampleFormat              = paFloat32;\n    ipp.channelCount = 2;           ipp.device = Pa_GetDefaultInputDevice();        /* Both stereo. */\n    opp.channelCount = 2;           opp.device = paNoDevice;\n    HOPEFOR(((result = Pa_OpenStream(&stream, &ipp, &opp,\n                                     SAMPLE_RATE, FRAMES_PER_BUFFER,\n                                     paClipOff, QaCallback, &myData )) == paInvalidDevice));\n\n    /*----------------------------- Nonzero input and output channels but no input device: */\n    ipp.hostApiSpecificStreamInfo = opp.hostApiSpecificStreamInfo = NULL;\n    ipp.sampleFormat              = opp.sampleFormat              = paFloat32;\n    ipp.channelCount = 2;           ipp.device = paNoDevice;\n    opp.channelCount = 2;           opp.device = Pa_GetDefaultOutputDevice();\n    HOPEFOR(((result = Pa_OpenStream(&stream, &ipp, &opp,\n                                     SAMPLE_RATE, FRAMES_PER_BUFFER,\n                                     paClipOff, QaCallback, &myData )) == paInvalidDevice));\n\n    if (Pa_GetDefaultOutputDevice() != paNoDevice) {\n        /*----------------------------- NULL stream pointer: */\n        ipp.hostApiSpecificStreamInfo = opp.hostApiSpecificStreamInfo = NULL;\n        ipp.sampleFormat              = opp.sampleFormat              = paFloat32;\n        ipp.channelCount = 0;           ipp.device = paNoDevice;           /* Output is more likely than input. */\n        opp.channelCount = 2;           opp.device = Pa_GetDefaultOutputDevice();    /* Only 2 output channels. */\n        HOPEFOR(((result = Pa_OpenStream(NULL, &ipp, &opp,\n                                         SAMPLE_RATE, FRAMES_PER_BUFFER,\n                                         paClipOff, QaCallback, &myData )) == paBadStreamPtr));\n\n        /*----------------------------- Low sample rate: */\n        ipp.hostApiSpecificStreamInfo = opp.hostApiSpecificStreamInfo = NULL;\n        ipp.sampleFormat              = opp.sampleFormat              = paFloat32;\n        ipp.channelCount = 0;           ipp.device = paNoDevice;\n        opp.channelCount = 2;           opp.device = Pa_GetDefaultOutputDevice();\n        HOPEFOR(((result = Pa_OpenStream(&stream, NULL, &opp,\n                                         1.0, FRAMES_PER_BUFFER, /* 1 cycle per second (1 Hz) is too low. */\n                                         paClipOff, QaCallback, &myData )) == paInvalidSampleRate));\n\n        /*----------------------------- High sample rate: */\n        ipp.hostApiSpecificStreamInfo = opp.hostApiSpecificStreamInfo = NULL;\n        ipp.sampleFormat              = opp.sampleFormat              = paFloat32;\n        ipp.channelCount = 0;           ipp.device = paNoDevice;\n        opp.channelCount = 2;           opp.device = Pa_GetDefaultOutputDevice();\n        HOPEFOR(((result = Pa_OpenStream(&stream, NULL, &opp,\n                                         10000000.0, FRAMES_PER_BUFFER, /* 10^6 cycles per second (10 MHz) is too high. */\n                                         paClipOff, QaCallback, &myData )) == paInvalidSampleRate));\n\n        /*----------------------------- NULL callback: */\n        /* NULL callback is valid in V19 -- it means use blocking read/write stream\n\n        ipp.hostApiSpecificStreamInfo = opp.hostApiSpecificStreamInfo = NULL;\n        ipp.sampleFormat              = opp.sampleFormat              = paFloat32;\n        ipp.channelCount = 0;           ipp.device = paNoDevice;\n        opp.channelCount = 2;           opp.device = Pa_GetDefaultOutputDevice();\n        HOPEFOR(((result = Pa_OpenStream(&stream, NULL, &opp,\n                                         SAMPLE_RATE, FRAMES_PER_BUFFER,\n                                         paClipOff,\n                                         NULL,\n                                         &myData )) == paNullCallback));\n        */\n\n        /*----------------------------- Bad flag: */\n        ipp.hostApiSpecificStreamInfo = opp.hostApiSpecificStreamInfo = NULL;\n        ipp.sampleFormat              = opp.sampleFormat              = paFloat32;\n        ipp.channelCount = 0;           ipp.device = paNoDevice;\n        opp.channelCount = 2;           opp.device = Pa_GetDefaultOutputDevice();\n        HOPEFOR(((result = Pa_OpenStream(&stream, NULL, &opp,\n                                         SAMPLE_RATE, FRAMES_PER_BUFFER,\n                                         255,                      /* Is 8 maybe legal V19 API? */\n                                         QaCallback, &myData )) == paInvalidFlag));\n    }\n\n    /*----------------------------- using input device as output device: */\n    if( FindInputOnlyDevice() != paNoDevice )\n    {\n        ipp.hostApiSpecificStreamInfo = opp.hostApiSpecificStreamInfo = NULL;\n        ipp.sampleFormat              = opp.sampleFormat              = paFloat32;\n        ipp.channelCount = 0;           ipp.device = paNoDevice; /* And no input device, and no channels. */\n        opp.channelCount = 2;           opp.device = FindInputOnlyDevice();\n        HOPEFOR(((result = Pa_OpenStream(&stream, NULL, &opp,\n                                         SAMPLE_RATE, FRAMES_PER_BUFFER,\n                                         paClipOff, QaCallback, &myData )) == paInvalidChannelCount));\n    }\n\n    /*----------------------------- using output device as input device: */\n    if( FindOutputOnlyDevice() != paNoDevice )\n    {\n        ipp.hostApiSpecificStreamInfo = opp.hostApiSpecificStreamInfo = NULL;\n        ipp.sampleFormat              = opp.sampleFormat              = paFloat32;\n        ipp.channelCount = 2;           ipp.device = FindOutputOnlyDevice();\n        opp.channelCount = 0;           opp.device = paNoDevice;  /* And no output device, and no channels. */\n        HOPEFOR(((result = Pa_OpenStream(&stream, &ipp, NULL,\n                                         SAMPLE_RATE, FRAMES_PER_BUFFER,\n                                         paClipOff, QaCallback, &myData )) == paInvalidChannelCount));\n\n    }\n\n    if( stream != NULL ) Pa_CloseStream( stream );\n    return result;\n}\n\n/*-----------------------------------------------------------------------------------------*/\nstatic int TestBadActions( void )\n{\n    PaStream*           stream = NULL;\n    const PaDeviceInfo* deviceInfo = NULL;\n    PaError             result = 0;\n    PaQaData            myData;\n    PaStreamParameters  opp;\n    const PaDeviceInfo* info = NULL;\n\n    /* Setup data for synthesis thread. */\n    myData.framesLeft = (unsigned long)(SAMPLE_RATE * 100); /* 100 seconds */\n    myData.numChannels = 1;\n    myData.mode = MODE_OUTPUT;\n\n    opp.device                    = Pa_GetDefaultOutputDevice(); /* Default output. */\n    opp.channelCount              = 2;                           /* Stereo output.  */\n    opp.hostApiSpecificStreamInfo = NULL;\n    opp.sampleFormat              = paFloat32;\n    info = Pa_GetDeviceInfo(opp.device);\n    opp.suggestedLatency          = info ? info->defaultLowOutputLatency : 0.100;\n\n    if (opp.device != paNoDevice) {\n        HOPEFOR(((result = Pa_OpenStream(&stream, NULL, /* Take NULL as input parame-     */\n                                         &opp,          /* ters, meaning try only output. */\n                                         SAMPLE_RATE, FRAMES_PER_BUFFER,\n                                         paClipOff, QaCallback, &myData )) == paNoError));\n    }\n\n    HOPEFOR(((deviceInfo = Pa_GetDeviceInfo(paNoDevice))    == NULL));\n    HOPEFOR(((deviceInfo = Pa_GetDeviceInfo(87654))    == NULL));\n    HOPEFOR(((result = Pa_StartStream(NULL))    == paBadStreamPtr));\n    HOPEFOR(((result = Pa_StopStream(NULL))     == paBadStreamPtr));\n    HOPEFOR(((result = Pa_IsStreamStopped(NULL)) == paBadStreamPtr));\n    HOPEFOR(((result = Pa_IsStreamActive(NULL)) == paBadStreamPtr));\n    HOPEFOR(((result = Pa_CloseStream(NULL))    == paBadStreamPtr));\n    HOPEFOR(((result = Pa_SetStreamFinishedCallback(NULL, NULL)) == paBadStreamPtr));\n    HOPEFOR(((result = !Pa_GetStreamInfo(NULL))));\n    HOPEFOR(((result = Pa_GetStreamTime(NULL))  == 0.0));\n    HOPEFOR(((result = Pa_GetStreamCpuLoad(NULL))  == 0.0));\n    HOPEFOR(((result = Pa_ReadStream(NULL, NULL, 0))  == paBadStreamPtr));\n    HOPEFOR(((result = Pa_WriteStream(NULL, NULL, 0))  == paBadStreamPtr));\n\n    /** @todo test Pa_GetStreamReadAvailable and Pa_GetStreamWriteAvailable */\n\n    if (stream != NULL) Pa_CloseStream(stream);\n    return result;\n}\n\n/*---------------------------------------------------------------------*/\nint main(void);\nint main(void)\n{\n    PaError result;\n\n    EXPECT(((result = Pa_Initialize()) == paNoError));\n    TestBadOpens();\n    TestBadActions();\nerror:\n    Pa_Terminate();\n    printf(\"QA Report: %d passed, %d failed.\\n\", gNumPassed, gNumFailed);\n    return 0;\n}\n"
  },
  {
    "path": "thirdparty/portaudio/qa/paqa_latency.c",
    "content": "/** @file paqa_latency.c\n    @ingroup qa_src\n    @brief Test latency estimates.\n    @author Ross Bencina <rossb@audiomulch.com>\n    @author Phil Burk <philburk@softsynth.com>\n*/\n/*\n * $Id: patest_sine.c 1368 2008-03-01 00:38:27Z rossb $\n *\n * This program uses the PortAudio Portable Audio Library.\n * For more information see: http://www.portaudio.com/\n * Copyright (c) 1999-2000 Ross Bencina and Phil Burk\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n#include <stdio.h>\n#include <math.h>\n#include \"portaudio.h\"\n#include \"loopback/src/qa_tools.h\"\n\n#define NUM_SECONDS   (5)\n#define SAMPLE_RATE   (44100)\n#define FRAMES_PER_BUFFER  (64)\n\n#ifndef M_PI\n#define M_PI  (3.14159265)\n#endif\n\n#define TABLE_SIZE   (200)\ntypedef struct\n{\n    float sine[TABLE_SIZE];\n    int left_phase;\n    int right_phase;\n    char message[20];\n    int minFramesPerBuffer;\n    int maxFramesPerBuffer;\n    int callbackCount;\n    PaTime minDeltaDacTime;\n    PaTime maxDeltaDacTime;\n    PaStreamCallbackTimeInfo previousTimeInfo;\n}\npaTestData;\n\n/* Used to tally the results of the QA tests. */\nint g_testsPassed = 0;\nint g_testsFailed = 0;\n\n/* This routine will be called by the PortAudio engine when audio is needed.\n** It may called at interrupt level on some machines so don't do anything\n** that could mess up the system like calling malloc() or free().\n*/\nstatic int patestCallback( const void *inputBuffer, void *outputBuffer,\n                            unsigned long framesPerBuffer,\n                            const PaStreamCallbackTimeInfo* timeInfo,\n                            PaStreamCallbackFlags statusFlags,\n                            void *userData )\n{\n    paTestData *data = (paTestData*)userData;\n    float *out = (float*)outputBuffer;\n    unsigned long i;\n\n    (void) timeInfo; /* Prevent unused variable warnings. */\n    (void) statusFlags;\n    (void) inputBuffer;\n\n    if( data->minFramesPerBuffer > framesPerBuffer )\n    {\n        data->minFramesPerBuffer = framesPerBuffer;\n    }\n    if( data->maxFramesPerBuffer < framesPerBuffer )\n    {\n        data->maxFramesPerBuffer = framesPerBuffer;\n    }\n\n    /* Measure min and max output time stamp delta. */\n    if( data->callbackCount > 0 )\n    {\n        PaTime delta = timeInfo->outputBufferDacTime - data->previousTimeInfo.outputBufferDacTime;\n        if( data->minDeltaDacTime > delta )\n        {\n            data->minDeltaDacTime = delta;\n        }\n        if( data->maxDeltaDacTime < delta )\n        {\n            data->maxDeltaDacTime = delta;\n        }\n    }\n    data->previousTimeInfo = *timeInfo;\n\n    for( i=0; i<framesPerBuffer; i++ )\n    {\n        *out++ = data->sine[data->left_phase];  /* left */\n        *out++ = data->sine[data->right_phase];  /* right */\n        data->left_phase += 1;\n        if( data->left_phase >= TABLE_SIZE ) data->left_phase -= TABLE_SIZE;\n        data->right_phase += 3; /* higher pitch so we can distinguish left and right. */\n        if( data->right_phase >= TABLE_SIZE ) data->right_phase -= TABLE_SIZE;\n    }\n\n    data->callbackCount += 1;\n    return paContinue;\n}\n\nPaError paqaCheckLatency( PaStreamParameters *outputParamsPtr,\n                         paTestData *dataPtr, double sampleRate, unsigned long framesPerBuffer )\n{\n    PaError err;\n    PaStream *stream;\n    const PaStreamInfo* streamInfo;\n\n    dataPtr->minFramesPerBuffer = 9999999;\n    dataPtr->maxFramesPerBuffer = 0;\n    dataPtr->minDeltaDacTime = 9999999.0;\n    dataPtr->maxDeltaDacTime = 0.0;\n    dataPtr->callbackCount = 0;\n\n    printf(\"Stream parameter: suggestedOutputLatency = %g\\n\", outputParamsPtr->suggestedLatency );\n    if( framesPerBuffer == paFramesPerBufferUnspecified ){\n        printf(\"Stream parameter: user framesPerBuffer = paFramesPerBufferUnspecified\\n\" );\n    }else{\n        printf(\"Stream parameter: user framesPerBuffer = %lu\\n\", framesPerBuffer );\n    }\n    err = Pa_OpenStream(\n                        &stream,\n                        NULL, /* no input */\n                        outputParamsPtr,\n                        sampleRate,\n                        framesPerBuffer,\n                        paClipOff,      /* we won't output out of range samples so don't bother clipping them */\n                        patestCallback,\n                        dataPtr );\n    if( err != paNoError ) goto error1;\n\n    streamInfo = Pa_GetStreamInfo( stream );\n    printf(\"Stream info: inputLatency  = %g\\n\", streamInfo->inputLatency );\n    printf(\"Stream info: outputLatency = %g\\n\", streamInfo->outputLatency );\n\n    err = Pa_StartStream( stream );\n    if( err != paNoError ) goto error2;\n\n    printf(\"Play for %d seconds.\\n\", NUM_SECONDS );\n    Pa_Sleep( NUM_SECONDS * 1000 );\n\n    printf(\"  minFramesPerBuffer = %4d\\n\", dataPtr->minFramesPerBuffer );\n    printf(\"  maxFramesPerBuffer = %4d\\n\", dataPtr->maxFramesPerBuffer );\n    printf(\"  minDeltaDacTime = %f\\n\", dataPtr->minDeltaDacTime );\n    printf(\"  maxDeltaDacTime = %f\\n\", dataPtr->maxDeltaDacTime );\n\n    err = Pa_StopStream( stream );\n    if( err != paNoError ) goto error2;\n\n    err = Pa_CloseStream( stream );\n    Pa_Sleep( 1 * 1000 );\n\n\n    printf(\"-------------------------------------\\n\");\n    return err;\nerror2:\n    Pa_CloseStream( stream );\nerror1:\n    printf(\"-------------------------------------\\n\");\n    return err;\n}\n\n\n/*******************************************************************/\nstatic int paqaNoopCallback( const void *inputBuffer, void *outputBuffer,\n                          unsigned long framesPerBuffer,\n                          const PaStreamCallbackTimeInfo* timeInfo,\n                          PaStreamCallbackFlags statusFlags,\n                          void *userData )\n{\n    (void)inputBuffer;\n    (void)outputBuffer;\n    (void)framesPerBuffer;\n    (void)timeInfo;\n    (void)statusFlags;\n    (void)userData;\n    return paContinue;\n}\n\n/*******************************************************************/\nstatic int paqaCheckMultipleSuggested( PaDeviceIndex deviceIndex, int isInput )\n{\n    int i;\n    int numLoops = 10;\n    PaError err;\n    PaStream *stream;\n    PaStreamParameters streamParameters;\n    const PaStreamInfo* streamInfo;\n    double lowLatency;\n    double highLatency;\n    double finalLatency;\n    double sampleRate = SAMPLE_RATE;\n    const PaDeviceInfo *pdi = Pa_GetDeviceInfo( deviceIndex );\n    double previousLatency = 0.0;\n    int numChannels = 1;\n    float toleranceRatio = 1.0;\n\n    printf(\"------------------------ paqaCheckMultipleSuggested - %s\\n\",\n           (isInput ? \"INPUT\" : \"OUTPUT\") );\n    if( isInput )\n    {\n        lowLatency = pdi->defaultLowInputLatency;\n        highLatency = pdi->defaultHighInputLatency;\n        numChannels = (pdi->maxInputChannels < 2) ? 1 : 2;\n    }\n    else\n    {\n        lowLatency = pdi->defaultLowOutputLatency;\n        highLatency = pdi->defaultHighOutputLatency;\n        numChannels = (pdi->maxOutputChannels < 2) ? 1 : 2;\n    }\n    streamParameters.channelCount = numChannels;\n    streamParameters.device = deviceIndex;\n    streamParameters.hostApiSpecificStreamInfo = NULL;\n    streamParameters.sampleFormat = paFloat32;\n    sampleRate = pdi->defaultSampleRate;\n\n    printf(\" lowLatency  = %g\\n\", lowLatency );\n    printf(\" highLatency = %g\\n\", highLatency );\n    printf(\" numChannels = %d\\n\", numChannels );\n    printf(\" sampleRate  = %g\\n\", sampleRate );\n\n    if( (highLatency - lowLatency) < 0.001 )\n    {\n        numLoops = 1;\n    }\n\n    for( i=0; i<numLoops; i++ )\n    {\n        if( numLoops == 1 )\n            streamParameters.suggestedLatency = lowLatency;\n        else\n            streamParameters.suggestedLatency = lowLatency + ((highLatency - lowLatency) * i /(numLoops - 1));\n\n        printf(\"   suggestedLatency[%d] = %6.4f\\n\", i, streamParameters.suggestedLatency );\n\n        err = Pa_OpenStream(\n                            &stream,\n                            (isInput ? &streamParameters : NULL),\n                            (isInput ? NULL : &streamParameters),\n                            sampleRate,\n                            paFramesPerBufferUnspecified,\n                            paClipOff,      /* we won't output out of range samples so don't bother clipping them */\n                            paqaNoopCallback,\n                            NULL );\n        if( err != paNoError ) goto error;\n\n        streamInfo = Pa_GetStreamInfo( stream );\n\n        err = Pa_CloseStream( stream );\n\n        if( isInput )\n        {\n            finalLatency = streamInfo->inputLatency;\n        }\n        else\n        {\n            finalLatency = streamInfo->outputLatency;\n        }\n        printf(\"          finalLatency = %6.4f\\n\", finalLatency );\n        /* For the default low & high latency values, expect quite close; for other requested\n         * values, at worst the next power-of-2 may result (eg 513 -> 1024) */\n        toleranceRatio = ( (i == 0) || (i == ( numLoops - 1 )) ) ? 0.1 : 1.0;\n        QA_ASSERT_CLOSE( \"final latency should be close to suggested latency\",\n                        streamParameters.suggestedLatency, finalLatency, (streamParameters.suggestedLatency * toleranceRatio) );\n        if( i == 0 )\n        {\n            previousLatency = finalLatency;\n        }\n    }\n\n    if( numLoops > 1 )\n    {\n        QA_ASSERT_TRUE( \" final latency should increase with suggested latency\", (finalLatency > previousLatency) );\n    }\n\n    return 0;\nerror:\n    return -1;\n}\n\n/*******************************************************************/\nstatic int paqaVerifySuggestedLatency( void )\n{\n    PaDeviceIndex id;\n    int result = 0;\n    const PaDeviceInfo *pdi;\n    int numDevices = Pa_GetDeviceCount();\n\n    printf(\"\\n ------------------------ paqaVerifySuggestedLatency\\n\");\n    for( id=0; id<numDevices; id++ )            /* Iterate through all devices. */\n    {\n        pdi = Pa_GetDeviceInfo( id );\n        printf(\"\\nUsing device #%d: '%s' (%s)\\n\", id, pdi->name, Pa_GetHostApiInfo(pdi->hostApi)->name);\n        if( pdi->maxOutputChannels > 0 )\n        {\n            if( paqaCheckMultipleSuggested( id, 0 ) < 0 )\n            {\n                printf(\"OUTPUT CHECK FAILED !!! #%d: '%s'\\n\", id, pdi->name);\n                result -= 1;\n            }\n        }\n        if( pdi->maxInputChannels > 0 )\n        {\n            if( paqaCheckMultipleSuggested( id, 1 ) < 0 )\n            {\n                printf(\"INPUT CHECK FAILED !!! #%d: '%s'\\n\", id, pdi->name);\n                result -= 1;\n            }\n        }\n    }\n    return result;\n}\n\n/*******************************************************************/\nstatic int paqaVerifyDeviceInfoLatency( void )\n{\n    PaDeviceIndex id;\n    const PaDeviceInfo *pdi;\n    int numDevices = Pa_GetDeviceCount();\n\n    printf(\"\\n ------------------------ paqaVerifyDeviceInfoLatency\\n\");\n    for( id=0; id<numDevices; id++ ) /* Iterate through all devices. */\n    {\n        pdi = Pa_GetDeviceInfo( id );\n        printf(\"Using device #%d: '%s' (%s)\\n\", id, pdi->name, Pa_GetHostApiInfo(pdi->hostApi)->name);\n        if( pdi->maxOutputChannels > 0 )\n        {\n            printf(\"  Output defaultLowOutputLatency  = %f seconds\\n\", pdi->defaultLowOutputLatency);\n            printf(\"  Output defaultHighOutputLatency = %f seconds\\n\", pdi->defaultHighOutputLatency);\n            QA_ASSERT_TRUE( \"defaultLowOutputLatency should be > 0\", (pdi->defaultLowOutputLatency > 0.0) );\n            QA_ASSERT_TRUE( \"defaultHighOutputLatency should be > 0\", (pdi->defaultHighOutputLatency > 0.0) );\n            QA_ASSERT_TRUE( \"defaultHighOutputLatency should be >= Low\", (pdi->defaultHighOutputLatency >= pdi->defaultLowOutputLatency) );\n        }\n        if( pdi->maxInputChannels > 0 )\n        {\n            printf(\"  Input defaultLowInputLatency  = %f seconds\\n\", pdi->defaultLowInputLatency);\n            printf(\"  Input defaultHighInputLatency = %f seconds\\n\", pdi->defaultHighInputLatency);\n            QA_ASSERT_TRUE( \"defaultLowInputLatency should be > 0\", (pdi->defaultLowInputLatency > 0.0) );\n            QA_ASSERT_TRUE( \"defaultHighInputLatency should be > 0\", (pdi->defaultHighInputLatency > 0.0) );\n            QA_ASSERT_TRUE( \"defaultHighInputLatency should be >= Low\", (pdi->defaultHighInputLatency >= pdi->defaultLowInputLatency) );\n        }\n    }\n    return 0;\nerror:\n    return -1;\n}\n\n\n\n/*******************************************************************/\nint main(void);\nint main(void)\n{\n    PaStreamParameters outputParameters;\n    PaError err;\n    paTestData data;\n    const PaDeviceInfo *deviceInfo;\n    int i;\n    int framesPerBuffer;\n    double sampleRate = SAMPLE_RATE;\n\n    printf(\"\\nPortAudio QA: investigate output latency.\\n\");\n\n    /* initialise sinusoidal wavetable */\n    for( i=0; i<TABLE_SIZE; i++ )\n    {\n        data.sine[i] = (float) sin( ((double)i/(double)TABLE_SIZE) * M_PI * 2. );\n    }\n    data.left_phase = data.right_phase = 0;\n\n    err = Pa_Initialize();\n    if( err != paNoError ) goto error;\n\n    /* Run self tests. */\n    if( paqaVerifyDeviceInfoLatency() < 0 ) goto error;\n\n    if( paqaVerifySuggestedLatency() < 0 ) goto error;\n\n    outputParameters.device = Pa_GetDefaultOutputDevice(); /* default output device */\n    if (outputParameters.device == paNoDevice) {\n        fprintf(stderr,\"Error: No default output device.\\n\");\n        goto error;\n    }\n\n    printf(\"\\n\\nNow running Audio Output Tests...\\n\");\n    printf(\"-------------------------------------\\n\");\n\n    outputParameters.channelCount = 2;       /* stereo output */\n    outputParameters.sampleFormat = paFloat32; /* 32 bit floating point output */\n    deviceInfo = Pa_GetDeviceInfo( outputParameters.device );\n    printf(\"Using device #%d: '%s' (%s)\\n\", outputParameters.device, deviceInfo->name, Pa_GetHostApiInfo(deviceInfo->hostApi)->name);\n    printf(\"Device info: defaultLowOutputLatency  = %f seconds\\n\", deviceInfo->defaultLowOutputLatency);\n    printf(\"Device info: defaultHighOutputLatency = %f seconds\\n\", deviceInfo->defaultHighOutputLatency);\n    sampleRate = deviceInfo->defaultSampleRate;\n    printf(\"Sample Rate for following tests: %g\\n\", sampleRate);\n    outputParameters.hostApiSpecificStreamInfo = NULL;\n    printf(\"-------------------------------------\\n\");\n\n    // Try to use a small buffer that is smaller than we think the device can handle.\n    // Try to force combining multiple user buffers into a host buffer.\n    printf(\"------------- Try a very small buffer.\\n\");\n    framesPerBuffer = 9;\n    outputParameters.suggestedLatency = deviceInfo->defaultLowOutputLatency;\n    err = paqaCheckLatency( &outputParameters, &data, sampleRate, framesPerBuffer );\n    if( err != paNoError ) goto error;\n\n    printf(\"------------- 64 frame buffer with 1.1 * defaultLow latency.\\n\");\n    framesPerBuffer = 64;\n    outputParameters.suggestedLatency = deviceInfo->defaultLowOutputLatency * 1.1;\n    err = paqaCheckLatency( &outputParameters, &data, sampleRate, framesPerBuffer );\n    if( err != paNoError ) goto error;\n\n    // Try to create a huge buffer that is bigger than the allowed device maximum.\n    printf(\"------------- Try a huge buffer.\\n\");\n    framesPerBuffer = 16*1024;\n    outputParameters.suggestedLatency = ((double)framesPerBuffer) / sampleRate; // approximate\n    err = paqaCheckLatency( &outputParameters, &data, sampleRate, framesPerBuffer );\n    if( err != paNoError ) goto error;\n\n    printf(\"------------- Try suggestedLatency = 0.0\\n\");\n    outputParameters.suggestedLatency = 0.0;\n    err = paqaCheckLatency( &outputParameters, &data, sampleRate, paFramesPerBufferUnspecified );\n    if( err != paNoError ) goto error;\n\n    printf(\"------------- Try suggestedLatency = defaultLowOutputLatency\\n\");\n    outputParameters.suggestedLatency = deviceInfo->defaultLowOutputLatency;\n    err = paqaCheckLatency( &outputParameters, &data, sampleRate, paFramesPerBufferUnspecified );\n    if( err != paNoError ) goto error;\n\n    printf(\"------------- Try suggestedLatency = defaultHighOutputLatency\\n\");\n    outputParameters.suggestedLatency = deviceInfo->defaultHighOutputLatency;\n    err = paqaCheckLatency( &outputParameters, &data, sampleRate, paFramesPerBufferUnspecified );\n    if( err != paNoError ) goto error;\n\n    printf(\"------------- Try suggestedLatency = defaultHighOutputLatency * 4\\n\");\n    outputParameters.suggestedLatency = deviceInfo->defaultHighOutputLatency * 4;\n    err = paqaCheckLatency( &outputParameters, &data, sampleRate, paFramesPerBufferUnspecified );\n    if( err != paNoError ) goto error;\n\n    Pa_Terminate();\n    printf(\"SUCCESS - test finished.\\n\");\n    return err;\n\nerror:\n    Pa_Terminate();\n    fprintf( stderr, \"ERROR - test failed.\\n\" );\n    fprintf( stderr, \"Error number: %d\\n\", err );\n    fprintf( stderr, \"Error message: %s\\n\", Pa_GetErrorText( err ) );\n    return err;\n}\n"
  },
  {
    "path": "thirdparty/portaudio/src/SConscript",
    "content": "import os.path, copy, sys\n\ndef checkSymbol(conf, header, library=None, symbol=None, autoAdd=True, critical=False, pkgName=None):\n    \"\"\" Check for symbol in library, optionally look only for header.\n    @param conf: Configure instance.\n    @param header: The header file where the symbol is declared.\n    @param library: The library in which the symbol exists, if None it is taken to be the standard C library.\n    @param symbol: The symbol to look for, if None only the header will be looked up.\n    @param autoAdd: Automatically link with this library if check is positive.\n    @param critical: Raise on error?\n    @param pkgName: Optional name of pkg-config entry for library, to determine build parameters.\n    @return: True/False\n    \"\"\"\n    origEnv = conf.env.Copy() # Copy unmodified environment so we can restore it upon error\n    env = conf.env\n    if library is None:\n        library = \"c\"   # Standard library\n        autoAdd = False\n\n    if pkgName is not None:\n        origLibs = copy.copy(env.get(\"LIBS\", None))\n\n        try: env.ParseConfig(\"pkg-config --silence-errors %s --cflags --libs\" % pkgName)\n        except: pass\n        else:\n            # I see no other way of checking that the parsing succeeded, if it did add no more linking parameters\n            if env.get(\"LIBS\", None) != origLibs:\n                autoAdd = False\n\n    try:\n        if not conf.CheckCHeader(header, include_quotes=\"<>\"):\n            raise ConfigurationError(\"missing header %s\" % header)\n        if symbol is not None and not conf.CheckLib(library, symbol, language=\"C\", autoadd=autoAdd):\n            raise ConfigurationError(\"missing symbol %s in library %s\" % (symbol, library))\n    except ConfigurationError:\n        conf.env = origEnv\n        if not critical:\n            return False\n        raise\n\n    return True\n\nimport SCons.Errors\n\n# Import common variables\n\n# Could use '#' to refer to top-level SConstruct directory, but looks like env.SConsignFile doesn't interpret this at least :(\nsconsDir = os.path.abspath(os.path.join(\"build\", \"scons\"))\n\ntry:\n    Import(\"Platform\", \"Posix\", \"ConfigurationError\", \"ApiVer\")\nexcept SCons.Errors.UserError:\n    # The common objects must be exported first\n    SConscript(os.path.join(sconsDir, \"SConscript_common\"))\n    Import(\"Platform\", \"Posix\", \"ConfigurationError\", \"ApiVer\")\n\nImport(\"env\")\n\n# This will be manipulated\nenv = env.Copy()\n\n# We operate with a set of needed libraries and optional libraries, the latter stemming from host API implementations.\n# For libraries of both types we record a set of values that is used to look for the library in question, during\n# configuration. If the corresponding library for a host API implementation isn't found, the implementation is left out.\nneededLibs = []\noptionalImpls = {}\nif Platform in Posix:\n    env.Append(CPPPATH=os.path.join(\"os\", \"unix\"))\n    neededLibs += [(\"pthread\", \"pthread.h\", \"pthread_create\"), (\"m\", \"math.h\", \"sin\")]\n    if env[\"useALSA\"]:\n        optionalImpls[\"ALSA\"] = (\"asound\", \"alsa/asoundlib.h\", \"snd_pcm_open\")\n    if env[\"useJACK\"]:\n        optionalImpls[\"JACK\"] = (\"jack\", \"jack/jack.h\", \"jack_client_new\")\n    if env[\"useOSS\"]:\n        # TODO: It looks like the prefix for soundcard.h depends on the platform\n        optionalImpls[\"OSS\"] = (\"oss\", \"sys/soundcard.h\", None)\n\tif Platform == 'netbsd':\n\t        optionalImpls[\"OSS\"] = (\"ossaudio\", \"sys/soundcard.h\", \"_oss_ioctl\")\n    if env[\"useASIHPI\"]:\n        optionalImpls[\"ASIHPI\"] = (\"hpi\", \"asihpi/hpi.h\", \"HPI_SubSysCreate\")\n    if env[\"useCOREAUDIO\"]:\n        optionalImpls[\"COREAUDIO\"] = (\"CoreAudio\", \"CoreAudio/CoreAudio.h\", None)\nelse:\n    raise ConfigurationError(\"unknown platform %s\" % Platform)\n\nif Platform == \"darwin\":\n    env.Append(LINKFLAGS=\"-framework CoreFoundation -framework CoreServices -framework CoreAudio -framework AudioToolBox -framework AudioUnit\")\nelif Platform == \"cygwin\":\n    env.Append(LIBS=[\"winmm\"])\nelif Platform == \"irix\":\n    neededLibs +=  [(\"audio\", \"dmedia/audio.h\", \"alOpenPort\"), (\"dmedia\", \"dmedia/dmedia.h\", \"dmGetUST\")]\n    env.Append(CPPDEFINES=[\"PA_USE_SGI\"])\n\ndef CheckCTypeSize(context, tp):\n    \"\"\" Check size of C type.\n    @param context: A configuration context.\n    @param tp: The type to check.\n    @return: Size of type, in bytes.\n    \"\"\"\n    context.Message(\"Checking the size of C type %s...\" % tp)\n    ret = context.TryRun(\"\"\"\n#include <stdio.h>\n\nint main() {\n    printf(\"%%d\", sizeof(%s));\n    return 0;\n}\n\"\"\" % tp, \".c\")\n    if not ret[0]:\n        context.Result(\" Couldn't obtain size of type %s!\" % tp)\n        return None\n\n    assert ret[1]\n    sz = int(ret[1])\n    context.Result(\"%d\" % sz)\n    return sz\n\n\"\"\"\nif sys.byteorder == \"little\":\n    env.Append(CPPDEFINES=[\"PA_LITTLE_ENDIAN\"])\nelif sys.byteorder == \"big\":\n    env.Append(CPPDEFINES=[\"PA_BIG_ENDIAN\"])\nelse:\n    raise ConfigurationError(\"unknown byte order: %s\" % sys.byteorder)\n\"\"\"\nif env[\"enableDebugOutput\"]:\n    env.Append(CPPDEFINES=[\"PA_ENABLE_DEBUG_OUTPUT\"])\n\n# Start configuration\n\n# Use an absolute path for conf_dir, otherwise it gets created both relative to current directory and build directory\nconf = env.Configure(log_file=os.path.join(sconsDir, \"sconf.log\"), custom_tests={\"CheckCTypeSize\": CheckCTypeSize},\n        conf_dir=os.path.join(sconsDir, \".sconf_temp\"))\nconf.env.Append(CPPDEFINES=[\"SIZEOF_SHORT=%d\" % conf.CheckCTypeSize(\"short\")])\nconf.env.Append(CPPDEFINES=[\"SIZEOF_INT=%d\" % conf.CheckCTypeSize(\"int\")])\nconf.env.Append(CPPDEFINES=[\"SIZEOF_LONG=%d\" % conf.CheckCTypeSize(\"long\")])\nif checkSymbol(conf, \"time.h\", \"rt\", \"clock_gettime\"):\n    conf.env.Append(CPPDEFINES=[\"HAVE_CLOCK_GETTIME\"])\nif checkSymbol(conf, \"time.h\", symbol=\"nanosleep\"):\n    conf.env.Append(CPPDEFINES=[\"HAVE_NANOSLEEP\"])\nif conf.CheckCHeader(\"sys/soundcard.h\"):\n    conf.env.Append(CPPDEFINES=[\"HAVE_SYS_SOUNDCARD_H\"])\nif conf.CheckCHeader(\"linux/soundcard.h\"):\n    conf.env.Append(CPPDEFINES=[\"HAVE_LINUX_SOUNDCARD_H\"])\nif conf.CheckCHeader(\"machine/soundcard.h\"):\n    conf.env.Append(CPPDEFINES=[\"HAVE_MACHINE_SOUNDCARD_H\"])\n\n# Look for needed libraries and link with them\nfor lib, hdr, sym in neededLibs:\n    checkSymbol(conf, hdr, lib, sym, critical=True)\n# Look for host API libraries, if a library isn't found disable corresponding host API implementation.\nfor name, val in optionalImpls.items():\n    lib, hdr, sym = val\n    if checkSymbol(conf, hdr, lib, sym, critical=False, pkgName=name.lower()):\n        conf.env.Append(CPPDEFINES=[\"PA_USE_%s=1\" % name.upper()])\n    else:\n        del optionalImpls[name]\n\n# Configuration finished\nenv = conf.Finish()\n\n# PA infrastructure\nCommonSources = [os.path.join(\"common\", f) for f in \"pa_allocation.c pa_converters.c pa_cpuload.c pa_dither.c pa_front.c \\\n        pa_process.c pa_stream.c pa_trace.c pa_debugprint.c pa_ringbuffer.c\".split()]\nCommonSources.append(os.path.join(\"hostapi\", \"skeleton\", \"pa_hostapi_skeleton.c\"))\n\n# Host APIs implementations\nImplSources = []\nif Platform in Posix:\n    ImplSources += [os.path.join(\"os\", \"unix\", f) for f in \"pa_unix_hostapis.c pa_unix_util.c\".split()]\n\nif \"ALSA\" in optionalImpls:\n    ImplSources.append(os.path.join(\"hostapi\", \"alsa\", \"pa_linux_alsa.c\"))\nif \"JACK\" in optionalImpls:\n    ImplSources.append(os.path.join(\"hostapi\", \"jack\", \"pa_jack.c\"))\nif \"OSS\" in optionalImpls:\n    ImplSources.append(os.path.join(\"hostapi\", \"oss\", \"pa_unix_oss.c\"))\nif \"ASIHPI\" in optionalImpls:\n    ImplSources.append(os.path.join(\"hostapi\", \"asihpi\", \"pa_linux_asihpi.c\"))\nif \"COREAUDIO\" in optionalImpls:\n    ImplSources.append([os.path.join(\"hostapi\", \"coreaudio\", f) for f in \"\"\"\n\tpa_mac_core.c  pa_mac_core_blocking.c  pa_mac_core_utilities.c \n    \"\"\".split()])\n\n\nsources = CommonSources + ImplSources\n\nsharedLibEnv = env.Copy()\nif Platform in Posix:\n    # Add soname to library, this is so a reference is made to the versioned library in programs linking against libportaudio.so\n    if Platform != 'darwin':\n        sharedLibEnv.AppendUnique(SHLINKFLAGS=\"-Wl,-soname=libportaudio.so.%d\" % int(ApiVer.split(\".\")[0]))\nsharedLib = sharedLibEnv.SharedLibrary(target=\"portaudio\", source=sources)\n\nstaticLib = env.StaticLibrary(target=\"portaudio\", source=sources)\n\nif Platform in Posix:\n    prefix = env[\"prefix\"]\n    includeDir = os.path.join(prefix, \"include\")\n    libDir = os.path.join(prefix, \"lib\")\n\ntestNames = [\"patest_sine\", \"paqa_devs\", \"paqa_errs\", \"patest1\", \"patest_buffer\", \"patest_callbackstop\", \"patest_clip\", \\\n        \"patest_dither\", \"patest_hang\", \"patest_in_overflow\", \"patest_latency\", \"patest_leftright\", \"patest_longsine\", \\\n        \"patest_many\", \"patest_maxsines\", \"patest_multi_sine\", \"patest_out_underflow\", \"patest_pink\", \"patest_prime\", \\\n        \"patest_read_record\", \"patest_record\", \"patest_ringmix\", \"patest_saw\", \"patest_sine8\", \"patest_sine\", \\\n        \"patest_sine_time\", \"patest_start_stop\", \"patest_stop\", \"patest_sync\", \"patest_toomanysines\", \\\n        \"patest_underflow\", \"patest_wire\", \"patest_write_sine\", \"pa_devs\", \"pa_fuzz\", \"pa_minlat\", \\\n        \"patest_sine_channelmaps\",]\n\n# The test directory (\"bin\") should be in the top-level PA directory\ntests = [env.Program(target=os.path.join(\"#\", \"bin\", name), source=[os.path.join(\"#\", \"test\", name + \".c\"),\n        staticLib]) for name in testNames]\n\n# Detect host APIs\nhostApis = []\nfor cppdef in env[\"CPPDEFINES\"]:\n    if cppdef.startswith(\"PA_USE_\"):\n        hostApis.append(cppdef[7:-2])\n\nReturn(\"sources\", \"sharedLib\", \"staticLib\", \"tests\", \"env\", \"hostApis\")\n"
  },
  {
    "path": "thirdparty/portaudio/src/common/pa_allocation.c",
    "content": "/*\n * $Id$\n * Portable Audio I/O Library allocation group implementation\n * memory allocation group for tracking allocation groups\n *\n * Based on the Open Source API proposed by Ross Bencina\n * Copyright (c) 1999-2002 Ross Bencina, Phil Burk\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n/** @file\n @ingroup common_src\n\n @brief Allocation Group implementation.\n*/\n\n\n#include \"pa_allocation.h\"\n#include \"pa_util.h\"\n\n\n/*\n    Maintain 3 singly linked lists...\n    linkBlocks: the buffers used to allocate the links\n    spareLinks: links available for use in the allocations list\n    allocations: the buffers currently allocated using PaUtil_ContextAllocateMemory()\n\n    Link block size is doubled every time new links are allocated.\n*/\n\n\n#define PA_INITIAL_LINK_COUNT_    16\n\nstruct PaUtilAllocationGroupLink\n{\n    struct PaUtilAllocationGroupLink *next;\n    void *buffer;\n};\n\n/*\n    Allocate a block of links. The first link will have it's buffer member\n    pointing to the block, and it's next member set to <nextBlock>. The remaining\n    links will have NULL buffer members, and each link will point to\n    the next link except the last, which will point to <nextSpare>\n*/\nstatic struct PaUtilAllocationGroupLink *AllocateLinks( long count,\n        struct PaUtilAllocationGroupLink *nextBlock,\n        struct PaUtilAllocationGroupLink *nextSpare )\n{\n    struct PaUtilAllocationGroupLink *result;\n    int i;\n\n    result = (struct PaUtilAllocationGroupLink *)PaUtil_AllocateMemory(\n            sizeof(struct PaUtilAllocationGroupLink) * count );\n    if( result )\n    {\n        /* the block link */\n        result[0].buffer = result;\n        result[0].next = nextBlock;\n\n        /* the spare links */\n        for( i=1; i<count; ++i )\n        {\n            result[i].buffer = 0;\n            result[i].next = &result[i+1];\n        }\n        result[count-1].next = nextSpare;\n    }\n\n    return result;\n}\n\n\nPaUtilAllocationGroup* PaUtil_CreateAllocationGroup( void )\n{\n    PaUtilAllocationGroup* result = 0;\n    struct PaUtilAllocationGroupLink *links;\n\n\n    links = AllocateLinks( PA_INITIAL_LINK_COUNT_, 0, 0 );\n    if( links != 0 )\n    {\n        result = (PaUtilAllocationGroup*)PaUtil_AllocateMemory( sizeof(PaUtilAllocationGroup) );\n        if( result )\n        {\n            result->linkCount = PA_INITIAL_LINK_COUNT_;\n            result->linkBlocks = &links[0];\n            result->spareLinks = &links[1];\n            result->allocations = 0;\n        }\n        else\n        {\n            PaUtil_FreeMemory( links );\n        }\n    }\n\n    return result;\n}\n\n\nvoid PaUtil_DestroyAllocationGroup( PaUtilAllocationGroup* group )\n{\n    struct PaUtilAllocationGroupLink *current = group->linkBlocks;\n    struct PaUtilAllocationGroupLink *next;\n\n    while( current )\n    {\n        next = current->next;\n        PaUtil_FreeMemory( current->buffer );\n        current = next;\n    }\n\n    PaUtil_FreeMemory( group );\n}\n\n\nvoid* PaUtil_GroupAllocateMemory( PaUtilAllocationGroup* group, long size )\n{\n    struct PaUtilAllocationGroupLink *links, *link;\n    void *result = 0;\n\n    /* allocate more links if necessary */\n    if( !group->spareLinks )\n    {\n        /* double the link count on each block allocation */\n        links = AllocateLinks( group->linkCount, group->linkBlocks, group->spareLinks );\n        if( links )\n        {\n            group->linkCount += group->linkCount;\n            group->linkBlocks = &links[0];\n            group->spareLinks = &links[1];\n        }\n    }\n\n    if( group->spareLinks )\n    {\n        result = PaUtil_AllocateMemory( size );\n        if( result )\n        {\n            link = group->spareLinks;\n            group->spareLinks = link->next;\n\n            link->buffer = result;\n            link->next = group->allocations;\n\n            group->allocations = link;\n        }\n    }\n\n    return result;\n}\n\n\nvoid PaUtil_GroupFreeMemory( PaUtilAllocationGroup* group, void *buffer )\n{\n    struct PaUtilAllocationGroupLink *current = group->allocations;\n    struct PaUtilAllocationGroupLink *previous = 0;\n\n    if( buffer == 0 )\n        return;\n\n    /* find the right link and remove it */\n    while( current )\n    {\n        if( current->buffer == buffer )\n        {\n            if( previous )\n            {\n                previous->next = current->next;\n            }\n            else\n            {\n                group->allocations = current->next;\n            }\n\n            current->buffer = 0;\n            current->next = group->spareLinks;\n            group->spareLinks = current;\n\n            break;\n        }\n\n        previous = current;\n        current = current->next;\n    }\n\n    PaUtil_FreeMemory( buffer ); /* free the memory whether we found it in the list or not */\n}\n\n\nvoid PaUtil_FreeAllAllocations( PaUtilAllocationGroup* group )\n{\n    struct PaUtilAllocationGroupLink *current = group->allocations;\n    struct PaUtilAllocationGroupLink *previous = 0;\n\n    /* free all buffers in the allocations list */\n    while( current )\n    {\n        PaUtil_FreeMemory( current->buffer );\n        current->buffer = 0;\n\n        previous = current;\n        current = current->next;\n    }\n\n    /* link the former allocations list onto the front of the spareLinks list */\n    if( previous )\n    {\n        previous->next = group->spareLinks;\n        group->spareLinks = group->allocations;\n        group->allocations = 0;\n    }\n}\n"
  },
  {
    "path": "thirdparty/portaudio/src/common/pa_allocation.h",
    "content": "#ifndef PA_ALLOCATION_H\n#define PA_ALLOCATION_H\n/*\n * $Id$\n * Portable Audio I/O Library allocation context header\n * memory allocation context for tracking allocation groups\n *\n * Based on the Open Source API proposed by Ross Bencina\n * Copyright (c) 1999-2008 Ross Bencina, Phil Burk\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n/** @file\n @ingroup common_src\n\n @brief Allocation Group prototypes. An Allocation Group makes it easy to\n allocate multiple blocks of memory and free them all at once.\n\n An allocation group is useful for keeping track of multiple blocks\n of memory which are allocated at the same time (such as during initialization)\n and need to be deallocated at the same time. The allocation group maintains\n a list of allocated blocks, and can free all allocations at once. This\n can be useful for cleaning up after a partially initialized object fails.\n\n The allocation group implementation is built on top of the lower\n level allocation functions defined in pa_util.h\n*/\n\n\n#ifdef __cplusplus\nextern \"C\"\n{\n#endif /* __cplusplus */\n\n\ntypedef struct\n{\n    long linkCount;\n    struct PaUtilAllocationGroupLink *linkBlocks;\n    struct PaUtilAllocationGroupLink *spareLinks;\n    struct PaUtilAllocationGroupLink *allocations;\n}PaUtilAllocationGroup;\n\n\n\n/** Create an allocation group.\n*/\nPaUtilAllocationGroup* PaUtil_CreateAllocationGroup( void );\n\n/** Destroy an allocation group, but not the memory allocated through the group.\n*/\nvoid PaUtil_DestroyAllocationGroup( PaUtilAllocationGroup* group );\n\n/** Allocate a block of memory though an allocation group.\n*/\nvoid* PaUtil_GroupAllocateMemory( PaUtilAllocationGroup* group, long size );\n\n/** Free a block of memory that was previously allocated though an allocation\n group. Calling this function is a relatively time consuming operation.\n Under normal circumstances clients should call PaUtil_FreeAllAllocations to\n free all allocated blocks simultaneously.\n @see PaUtil_FreeAllAllocations\n*/\nvoid PaUtil_GroupFreeMemory( PaUtilAllocationGroup* group, void *buffer );\n\n/** Free all blocks of memory which have been allocated through the allocation\n group. This function doesn't destroy the group itself.\n*/\nvoid PaUtil_FreeAllAllocations( PaUtilAllocationGroup* group );\n\n\n#ifdef __cplusplus\n}\n#endif /* __cplusplus */\n#endif /* PA_ALLOCATION_H */\n"
  },
  {
    "path": "thirdparty/portaudio/src/common/pa_converters.c",
    "content": "/*\n * $Id$\n * Portable Audio I/O Library sample conversion mechanism\n *\n * Based on the Open Source API proposed by Ross Bencina\n * Copyright (c) 1999-2002 Phil Burk, Ross Bencina\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n/** @file\n @ingroup common_src\n\n @brief Conversion function implementations.\n\n If the C9x function lrintf() is available, define PA_USE_C99_LRINTF to use it\n\n @todo Consider whether functions which dither but don't clip should exist,\n V18 automatically enabled clipping whenever dithering was selected. Perhaps\n we should do the same.\n    see: \"require clipping for dithering sample conversion functions?\"\n    http://www.portaudio.com/trac/ticket/112\n\n @todo implement the converters marked IMPLEMENT ME: Int32_To_Int24_Dither,\n Int32_To_UInt8_Dither, Int24_To_Int16_Dither, Int24_To_Int8_Dither,\n Int24_To_UInt8_Dither, Int16_To_Int8_Dither, Int16_To_UInt8_Dither\n    see: \"some conversion functions are not implemented in pa_converters.c\"\n    http://www.portaudio.com/trac/ticket/35\n\n @todo review the converters marked REVIEW: Float32_To_Int32,\n Float32_To_Int32_Dither, Float32_To_Int32_Clip, Float32_To_Int32_DitherClip,\n Int32_To_Int16_Dither, Int32_To_Int8_Dither, Int16_To_Int32\n*/\n\n\n#include \"pa_converters.h\"\n#include \"pa_dither.h\"\n#include \"pa_endianness.h\"\n#include \"pa_types.h\"\n\n\nPaSampleFormat PaUtil_SelectClosestAvailableFormat(\n        PaSampleFormat availableFormats, PaSampleFormat format )\n{\n    PaSampleFormat result;\n\n    format &= ~paNonInterleaved;\n    availableFormats &= ~paNonInterleaved;\n\n    if( (format & availableFormats) == 0 )\n    {\n        /* NOTE: this code depends on the sample format constants being in\n            descending order of quality - ie best quality is 0\n            FIXME: should write an assert which checks that all of the\n            known constants conform to that requirement.\n        */\n\n        if( format != 0x01 )\n        {\n            /* scan for better formats */\n            result = format;\n            do\n            {\n                result >>= 1;\n            }\n            while( (result & availableFormats) == 0 && result != 0 );\n        }\n        else\n        {\n            result = 0;\n        }\n\n        if( result == 0 ){\n            /* scan for worse formats */\n            result = format;\n            do\n            {\n                result <<= 1;\n            }\n            while( (result & availableFormats) == 0 && result != paCustomFormat );\n\n            if( (result & availableFormats) == 0 )\n                result = paSampleFormatNotSupported;\n        }\n\n    }else{\n        result = format;\n    }\n\n    return result;\n}\n\n/* -------------------------------------------------------------------------- */\n\n#define PA_SELECT_FORMAT_( format, float32, int32, int24, int16, int8, uint8 ) \\\n    switch( format & ~paNonInterleaved ){                                      \\\n    case paFloat32:                                                            \\\n        float32                                                                \\\n    case paInt32:                                                              \\\n        int32                                                                  \\\n    case paInt24:                                                              \\\n        int24                                                                  \\\n    case paInt16:                                                              \\\n        int16                                                                  \\\n    case paInt8:                                                               \\\n        int8                                                                   \\\n    case paUInt8:                                                              \\\n        uint8                                                                  \\\n    default: return 0;                                                         \\\n    }\n\n/* -------------------------------------------------------------------------- */\n\n#define PA_SELECT_CONVERTER_DITHER_CLIP_( flags, source, destination )         \\\n    if( flags & paClipOff ){ /* no clip */                                     \\\n        if( flags & paDitherOff ){ /* no dither */                             \\\n            return paConverters. source ## _To_ ## destination;                \\\n        }else{ /* dither */                                                    \\\n            return paConverters. source ## _To_ ## destination ## _Dither;     \\\n        }                                                                      \\\n    }else{ /* clip */                                                          \\\n        if( flags & paDitherOff ){ /* no dither */                             \\\n            return paConverters. source ## _To_ ## destination ## _Clip;       \\\n        }else{ /* dither */                                                    \\\n            return paConverters. source ## _To_ ## destination ## _DitherClip; \\\n        }                                                                      \\\n    }\n\n/* -------------------------------------------------------------------------- */\n\n#define PA_SELECT_CONVERTER_DITHER_( flags, source, destination )              \\\n    if( flags & paDitherOff ){ /* no dither */                                 \\\n        return paConverters. source ## _To_ ## destination;                    \\\n    }else{ /* dither */                                                        \\\n        return paConverters. source ## _To_ ## destination ## _Dither;         \\\n    }\n\n/* -------------------------------------------------------------------------- */\n\n#define PA_USE_CONVERTER_( source, destination )\\\n    return paConverters. source ## _To_ ## destination;\n\n/* -------------------------------------------------------------------------- */\n\n#define PA_UNITY_CONVERSION_( wordlength )\\\n    return paConverters. Copy_ ## wordlength ## _To_ ## wordlength;\n\n/* -------------------------------------------------------------------------- */\n\nPaUtilConverter* PaUtil_SelectConverter( PaSampleFormat sourceFormat,\n        PaSampleFormat destinationFormat, PaStreamFlags flags )\n{\n    PA_SELECT_FORMAT_( sourceFormat,\n                       /* paFloat32: */\n                       PA_SELECT_FORMAT_( destinationFormat,\n                                          /* paFloat32: */        PA_UNITY_CONVERSION_( 32 ),\n                                          /* paInt32: */          PA_SELECT_CONVERTER_DITHER_CLIP_( flags, Float32, Int32 ),\n                                          /* paInt24: */          PA_SELECT_CONVERTER_DITHER_CLIP_( flags, Float32, Int24 ),\n                                          /* paInt16: */          PA_SELECT_CONVERTER_DITHER_CLIP_( flags, Float32, Int16 ),\n                                          /* paInt8: */           PA_SELECT_CONVERTER_DITHER_CLIP_( flags, Float32, Int8 ),\n                                          /* paUInt8: */          PA_SELECT_CONVERTER_DITHER_CLIP_( flags, Float32, UInt8 )\n                                        ),\n                       /* paInt32: */\n                       PA_SELECT_FORMAT_( destinationFormat,\n                                          /* paFloat32: */        PA_USE_CONVERTER_( Int32, Float32 ),\n                                          /* paInt32: */          PA_UNITY_CONVERSION_( 32 ),\n                                          /* paInt24: */          PA_SELECT_CONVERTER_DITHER_( flags, Int32, Int24 ),\n                                          /* paInt16: */          PA_SELECT_CONVERTER_DITHER_( flags, Int32, Int16 ),\n                                          /* paInt8: */           PA_SELECT_CONVERTER_DITHER_( flags, Int32, Int8 ),\n                                          /* paUInt8: */          PA_SELECT_CONVERTER_DITHER_( flags, Int32, UInt8 )\n                                        ),\n                       /* paInt24: */\n                       PA_SELECT_FORMAT_( destinationFormat,\n                                          /* paFloat32: */        PA_USE_CONVERTER_( Int24, Float32 ),\n                                          /* paInt32: */          PA_USE_CONVERTER_( Int24, Int32 ),\n                                          /* paInt24: */          PA_UNITY_CONVERSION_( 24 ),\n                                          /* paInt16: */          PA_SELECT_CONVERTER_DITHER_( flags, Int24, Int16 ),\n                                          /* paInt8: */           PA_SELECT_CONVERTER_DITHER_( flags, Int24, Int8 ),\n                                          /* paUInt8: */          PA_SELECT_CONVERTER_DITHER_( flags, Int24, UInt8 )\n                                        ),\n                       /* paInt16: */\n                       PA_SELECT_FORMAT_( destinationFormat,\n                                          /* paFloat32: */        PA_USE_CONVERTER_( Int16, Float32 ),\n                                          /* paInt32: */          PA_USE_CONVERTER_( Int16, Int32 ),\n                                          /* paInt24: */          PA_USE_CONVERTER_( Int16, Int24 ),\n                                          /* paInt16: */          PA_UNITY_CONVERSION_( 16 ),\n                                          /* paInt8: */           PA_SELECT_CONVERTER_DITHER_( flags, Int16, Int8 ),\n                                          /* paUInt8: */          PA_SELECT_CONVERTER_DITHER_( flags, Int16, UInt8 )\n                                        ),\n                       /* paInt8: */\n                       PA_SELECT_FORMAT_( destinationFormat,\n                                          /* paFloat32: */        PA_USE_CONVERTER_( Int8, Float32 ),\n                                          /* paInt32: */          PA_USE_CONVERTER_( Int8, Int32 ),\n                                          /* paInt24: */          PA_USE_CONVERTER_( Int8, Int24 ),\n                                          /* paInt16: */          PA_USE_CONVERTER_( Int8, Int16 ),\n                                          /* paInt8: */           PA_UNITY_CONVERSION_( 8 ),\n                                          /* paUInt8: */          PA_USE_CONVERTER_( Int8, UInt8 )\n                                        ),\n                       /* paUInt8: */\n                       PA_SELECT_FORMAT_( destinationFormat,\n                                          /* paFloat32: */        PA_USE_CONVERTER_( UInt8, Float32 ),\n                                          /* paInt32: */          PA_USE_CONVERTER_( UInt8, Int32 ),\n                                          /* paInt24: */          PA_USE_CONVERTER_( UInt8, Int24 ),\n                                          /* paInt16: */          PA_USE_CONVERTER_( UInt8, Int16 ),\n                                          /* paInt8: */           PA_USE_CONVERTER_( UInt8, Int8 ),\n                                          /* paUInt8: */          PA_UNITY_CONVERSION_( 8 )\n                                        )\n                     )\n}\n\n/* -------------------------------------------------------------------------- */\n\n#ifdef PA_NO_STANDARD_CONVERTERS\n\n/* -------------------------------------------------------------------------- */\n\nPaUtilConverterTable paConverters = {\n    0, /* PaUtilConverter *Float32_To_Int32; */\n    0, /* PaUtilConverter *Float32_To_Int32_Dither; */\n    0, /* PaUtilConverter *Float32_To_Int32_Clip; */\n    0, /* PaUtilConverter *Float32_To_Int32_DitherClip; */\n\n    0, /* PaUtilConverter *Float32_To_Int24; */\n    0, /* PaUtilConverter *Float32_To_Int24_Dither; */\n    0, /* PaUtilConverter *Float32_To_Int24_Clip; */\n    0, /* PaUtilConverter *Float32_To_Int24_DitherClip; */\n\n    0, /* PaUtilConverter *Float32_To_Int16; */\n    0, /* PaUtilConverter *Float32_To_Int16_Dither; */\n    0, /* PaUtilConverter *Float32_To_Int16_Clip; */\n    0, /* PaUtilConverter *Float32_To_Int16_DitherClip; */\n\n    0, /* PaUtilConverter *Float32_To_Int8; */\n    0, /* PaUtilConverter *Float32_To_Int8_Dither; */\n    0, /* PaUtilConverter *Float32_To_Int8_Clip; */\n    0, /* PaUtilConverter *Float32_To_Int8_DitherClip; */\n\n    0, /* PaUtilConverter *Float32_To_UInt8; */\n    0, /* PaUtilConverter *Float32_To_UInt8_Dither; */\n    0, /* PaUtilConverter *Float32_To_UInt8_Clip; */\n    0, /* PaUtilConverter *Float32_To_UInt8_DitherClip; */\n\n    0, /* PaUtilConverter *Int32_To_Float32; */\n    0, /* PaUtilConverter *Int32_To_Int24; */\n    0, /* PaUtilConverter *Int32_To_Int24_Dither; */\n    0, /* PaUtilConverter *Int32_To_Int16; */\n    0, /* PaUtilConverter *Int32_To_Int16_Dither; */\n    0, /* PaUtilConverter *Int32_To_Int8; */\n    0, /* PaUtilConverter *Int32_To_Int8_Dither; */\n    0, /* PaUtilConverter *Int32_To_UInt8; */\n    0, /* PaUtilConverter *Int32_To_UInt8_Dither; */\n\n    0, /* PaUtilConverter *Int24_To_Float32; */\n    0, /* PaUtilConverter *Int24_To_Int32; */\n    0, /* PaUtilConverter *Int24_To_Int16; */\n    0, /* PaUtilConverter *Int24_To_Int16_Dither; */\n    0, /* PaUtilConverter *Int24_To_Int8; */\n    0, /* PaUtilConverter *Int24_To_Int8_Dither; */\n    0, /* PaUtilConverter *Int24_To_UInt8; */\n    0, /* PaUtilConverter *Int24_To_UInt8_Dither; */\n\n    0, /* PaUtilConverter *Int16_To_Float32; */\n    0, /* PaUtilConverter *Int16_To_Int32; */\n    0, /* PaUtilConverter *Int16_To_Int24; */\n    0, /* PaUtilConverter *Int16_To_Int8; */\n    0, /* PaUtilConverter *Int16_To_Int8_Dither; */\n    0, /* PaUtilConverter *Int16_To_UInt8; */\n    0, /* PaUtilConverter *Int16_To_UInt8_Dither; */\n\n    0, /* PaUtilConverter *Int8_To_Float32; */\n    0, /* PaUtilConverter *Int8_To_Int32; */\n    0, /* PaUtilConverter *Int8_To_Int24 */\n    0, /* PaUtilConverter *Int8_To_Int16; */\n    0, /* PaUtilConverter *Int8_To_UInt8; */\n\n    0, /* PaUtilConverter *UInt8_To_Float32; */\n    0, /* PaUtilConverter *UInt8_To_Int32; */\n    0, /* PaUtilConverter *UInt8_To_Int24; */\n    0, /* PaUtilConverter *UInt8_To_Int16; */\n    0, /* PaUtilConverter *UInt8_To_Int8; */\n\n    0, /* PaUtilConverter *Copy_8_To_8; */\n    0, /* PaUtilConverter *Copy_16_To_16; */\n    0, /* PaUtilConverter *Copy_24_To_24; */\n    0  /* PaUtilConverter *Copy_32_To_32; */\n};\n\n/* -------------------------------------------------------------------------- */\n\n#else /* PA_NO_STANDARD_CONVERTERS is not defined */\n\n/* -------------------------------------------------------------------------- */\n\n#define PA_CLIP_( val, min, max )\\\n    { val = ((val) < (min)) ? (min) : (((val) > (max)) ? (max) : (val)); }\n\n\nstatic const float const_1_div_128_ = 1.0f / 128.0f;  /* 8 bit multiplier */\n\nstatic const float const_1_div_32768_ = 1.0f / 32768.f; /* 16 bit multiplier */\n\nstatic const double const_1_div_2147483648_ = 1.0 / 2147483648.0; /* 32 bit multiplier */\n\n/* -------------------------------------------------------------------------- */\n\nstatic void Float32_To_Int32(\n    void *destinationBuffer, signed int destinationStride,\n    void *sourceBuffer, signed int sourceStride,\n    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )\n{\n    float *src = (float*)sourceBuffer;\n    PaInt32 *dest =  (PaInt32*)destinationBuffer;\n    (void)ditherGenerator; /* unused parameter */\n\n    while( count-- )\n    {\n        /* REVIEW */\n#ifdef PA_USE_C99_LRINTF\n        float scaled = *src * 0x7FFFFFFF;\n        *dest = lrintf(scaled-0.5f);\n#else\n        double scaled = *src * 0x7FFFFFFF;\n        *dest = (PaInt32) scaled;\n#endif\n\n        src += sourceStride;\n        dest += destinationStride;\n    }\n}\n\n/* -------------------------------------------------------------------------- */\n\nstatic void Float32_To_Int32_Dither(\n    void *destinationBuffer, signed int destinationStride,\n    void *sourceBuffer, signed int sourceStride,\n    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )\n{\n    float *src = (float*)sourceBuffer;\n    PaInt32 *dest =  (PaInt32*)destinationBuffer;\n\n    while( count-- )\n    {\n        /* REVIEW */\n#ifdef PA_USE_C99_LRINTF\n        float dither  = PaUtil_GenerateFloatTriangularDither( ditherGenerator );\n        /* use smaller scaler to prevent overflow when we add the dither */\n        float dithered = ((float)*src * (2147483646.0f)) + dither;\n        *dest = lrintf(dithered - 0.5f);\n#else\n        double dither  = PaUtil_GenerateFloatTriangularDither( ditherGenerator );\n        /* use smaller scaler to prevent overflow when we add the dither */\n        double dithered = ((double)*src * (2147483646.0)) + dither;\n        *dest = (PaInt32) dithered;\n#endif\n        src += sourceStride;\n        dest += destinationStride;\n    }\n}\n\n/* -------------------------------------------------------------------------- */\n\nstatic void Float32_To_Int32_Clip(\n    void *destinationBuffer, signed int destinationStride,\n    void *sourceBuffer, signed int sourceStride,\n    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )\n{\n    float *src = (float*)sourceBuffer;\n    PaInt32 *dest =  (PaInt32*)destinationBuffer;\n    (void) ditherGenerator; /* unused parameter */\n\n    while( count-- )\n    {\n        /* REVIEW */\n#ifdef PA_USE_C99_LRINTF\n        float scaled = *src * 0x7FFFFFFF;\n        PA_CLIP_( scaled, -2147483648.f, 2147483647.f  );\n        *dest = lrintf(scaled-0.5f);\n#else\n        double scaled = *src * 0x7FFFFFFF;\n        PA_CLIP_( scaled, -2147483648., 2147483647.  );\n        *dest = (PaInt32) scaled;\n#endif\n\n        src += sourceStride;\n        dest += destinationStride;\n    }\n}\n\n/* -------------------------------------------------------------------------- */\n\nstatic void Float32_To_Int32_DitherClip(\n    void *destinationBuffer, signed int destinationStride,\n    void *sourceBuffer, signed int sourceStride,\n    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )\n{\n    float *src = (float*)sourceBuffer;\n    PaInt32 *dest =  (PaInt32*)destinationBuffer;\n\n    while( count-- )\n    {\n        /* REVIEW */\n#ifdef PA_USE_C99_LRINTF\n        float dither  = PaUtil_GenerateFloatTriangularDither( ditherGenerator );\n        /* use smaller scaler to prevent overflow when we add the dither */\n        float dithered = ((float)*src * (2147483646.0f)) + dither;\n        PA_CLIP_( dithered, -2147483648.f, 2147483647.f  );\n        *dest = lrintf(dithered-0.5f);\n#else\n        double dither  = PaUtil_GenerateFloatTriangularDither( ditherGenerator );\n        /* use smaller scaler to prevent overflow when we add the dither */\n        double dithered = ((double)*src * (2147483646.0)) + dither;\n        PA_CLIP_( dithered, -2147483648., 2147483647.  );\n        *dest = (PaInt32) dithered;\n#endif\n\n        src += sourceStride;\n        dest += destinationStride;\n    }\n}\n\n/* -------------------------------------------------------------------------- */\n\nstatic void Float32_To_Int24(\n    void *destinationBuffer, signed int destinationStride,\n    void *sourceBuffer, signed int sourceStride,\n    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )\n{\n    float *src = (float*)sourceBuffer;\n    unsigned char *dest = (unsigned char*)destinationBuffer;\n    PaInt32 temp;\n\n    (void) ditherGenerator; /* unused parameter */\n\n    while( count-- )\n    {\n        /* convert to 32 bit and drop the low 8 bits */\n        double scaled = (double)(*src) * 2147483647.0;\n        temp = (PaInt32) scaled;\n\n#if defined(PA_LITTLE_ENDIAN)\n        dest[0] = (unsigned char)(temp >> 8);\n        dest[1] = (unsigned char)(temp >> 16);\n        dest[2] = (unsigned char)(temp >> 24);\n#elif defined(PA_BIG_ENDIAN)\n        dest[0] = (unsigned char)(temp >> 24);\n        dest[1] = (unsigned char)(temp >> 16);\n        dest[2] = (unsigned char)(temp >> 8);\n#endif\n\n        src += sourceStride;\n        dest += destinationStride * 3;\n    }\n}\n\n/* -------------------------------------------------------------------------- */\n\nstatic void Float32_To_Int24_Dither(\n    void *destinationBuffer, signed int destinationStride,\n    void *sourceBuffer, signed int sourceStride,\n    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )\n{\n    float *src = (float*)sourceBuffer;\n    unsigned char *dest = (unsigned char*)destinationBuffer;\n    PaInt32 temp;\n\n    while( count-- )\n    {\n        /* convert to 32 bit and drop the low 8 bits */\n\n        double dither  = PaUtil_GenerateFloatTriangularDither( ditherGenerator );\n        /* use smaller scaler to prevent overflow when we add the dither */\n        double dithered = ((double)*src * (2147483646.0)) + dither;\n\n        temp = (PaInt32) dithered;\n\n#if defined(PA_LITTLE_ENDIAN)\n        dest[0] = (unsigned char)(temp >> 8);\n        dest[1] = (unsigned char)(temp >> 16);\n        dest[2] = (unsigned char)(temp >> 24);\n#elif defined(PA_BIG_ENDIAN)\n        dest[0] = (unsigned char)(temp >> 24);\n        dest[1] = (unsigned char)(temp >> 16);\n        dest[2] = (unsigned char)(temp >> 8);\n#endif\n\n        src += sourceStride;\n        dest += destinationStride * 3;\n    }\n}\n\n/* -------------------------------------------------------------------------- */\n\nstatic void Float32_To_Int24_Clip(\n    void *destinationBuffer, signed int destinationStride,\n    void *sourceBuffer, signed int sourceStride,\n    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )\n{\n    float *src = (float*)sourceBuffer;\n    unsigned char *dest = (unsigned char*)destinationBuffer;\n    PaInt32 temp;\n\n    (void) ditherGenerator; /* unused parameter */\n\n    while( count-- )\n    {\n        /* convert to 32 bit and drop the low 8 bits */\n        double scaled = *src * 0x7FFFFFFF;\n        PA_CLIP_( scaled, -2147483648., 2147483647.  );\n        temp = (PaInt32) scaled;\n\n#if defined(PA_LITTLE_ENDIAN)\n        dest[0] = (unsigned char)(temp >> 8);\n        dest[1] = (unsigned char)(temp >> 16);\n        dest[2] = (unsigned char)(temp >> 24);\n#elif defined(PA_BIG_ENDIAN)\n        dest[0] = (unsigned char)(temp >> 24);\n        dest[1] = (unsigned char)(temp >> 16);\n        dest[2] = (unsigned char)(temp >> 8);\n#endif\n\n        src += sourceStride;\n        dest += destinationStride * 3;\n    }\n}\n\n/* -------------------------------------------------------------------------- */\n\nstatic void Float32_To_Int24_DitherClip(\n    void *destinationBuffer, signed int destinationStride,\n    void *sourceBuffer, signed int sourceStride,\n    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )\n{\n    float *src = (float*)sourceBuffer;\n    unsigned char *dest = (unsigned char*)destinationBuffer;\n    PaInt32 temp;\n\n    while( count-- )\n    {\n        /* convert to 32 bit and drop the low 8 bits */\n\n        double dither  = PaUtil_GenerateFloatTriangularDither( ditherGenerator );\n        /* use smaller scaler to prevent overflow when we add the dither */\n        double dithered = ((double)*src * (2147483646.0)) + dither;\n        PA_CLIP_( dithered, -2147483648., 2147483647.  );\n\n        temp = (PaInt32) dithered;\n\n#if defined(PA_LITTLE_ENDIAN)\n        dest[0] = (unsigned char)(temp >> 8);\n        dest[1] = (unsigned char)(temp >> 16);\n        dest[2] = (unsigned char)(temp >> 24);\n#elif defined(PA_BIG_ENDIAN)\n        dest[0] = (unsigned char)(temp >> 24);\n        dest[1] = (unsigned char)(temp >> 16);\n        dest[2] = (unsigned char)(temp >> 8);\n#endif\n\n        src += sourceStride;\n        dest += destinationStride * 3;\n    }\n}\n\n/* -------------------------------------------------------------------------- */\n\nstatic void Float32_To_Int16(\n    void *destinationBuffer, signed int destinationStride,\n    void *sourceBuffer, signed int sourceStride,\n    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )\n{\n    float *src = (float*)sourceBuffer;\n    PaInt16 *dest =  (PaInt16*)destinationBuffer;\n    (void)ditherGenerator; /* unused parameter */\n\n    while( count-- )\n    {\n#ifdef PA_USE_C99_LRINTF\n        float tempf = (*src * (32767.0f)) ;\n        *dest = lrintf(tempf-0.5f);\n#else\n        short samp = (short) (*src * (32767.0f));\n        *dest = samp;\n#endif\n\n        src += sourceStride;\n        dest += destinationStride;\n    }\n}\n\n/* -------------------------------------------------------------------------- */\n\nstatic void Float32_To_Int16_Dither(\n    void *destinationBuffer, signed int destinationStride,\n    void *sourceBuffer, signed int sourceStride,\n    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )\n{\n    float *src = (float*)sourceBuffer;\n    PaInt16 *dest = (PaInt16*)destinationBuffer;\n\n    while( count-- )\n    {\n\n        float dither  = PaUtil_GenerateFloatTriangularDither( ditherGenerator );\n        /* use smaller scaler to prevent overflow when we add the dither */\n        float dithered = (*src * (32766.0f)) + dither;\n\n#ifdef PA_USE_C99_LRINTF\n        *dest = lrintf(dithered-0.5f);\n#else\n        *dest = (PaInt16) dithered;\n#endif\n\n        src += sourceStride;\n        dest += destinationStride;\n    }\n}\n\n/* -------------------------------------------------------------------------- */\n\nstatic void Float32_To_Int16_Clip(\n    void *destinationBuffer, signed int destinationStride,\n    void *sourceBuffer, signed int sourceStride,\n    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )\n{\n    float *src = (float*)sourceBuffer;\n    PaInt16 *dest =  (PaInt16*)destinationBuffer;\n    (void)ditherGenerator; /* unused parameter */\n\n    while( count-- )\n    {\n#ifdef PA_USE_C99_LRINTF\n        long samp = lrintf((*src * (32767.0f)) -0.5f);\n#else\n        long samp = (PaInt32) (*src * (32767.0f));\n#endif\n        PA_CLIP_( samp, -0x8000, 0x7FFF );\n        *dest = (PaInt16) samp;\n\n        src += sourceStride;\n        dest += destinationStride;\n    }\n}\n\n/* -------------------------------------------------------------------------- */\n\nstatic void Float32_To_Int16_DitherClip(\n    void *destinationBuffer, signed int destinationStride,\n    void *sourceBuffer, signed int sourceStride,\n    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )\n{\n    float *src = (float*)sourceBuffer;\n    PaInt16 *dest =  (PaInt16*)destinationBuffer;\n    (void)ditherGenerator; /* unused parameter */\n\n    while( count-- )\n    {\n\n        float dither  = PaUtil_GenerateFloatTriangularDither( ditherGenerator );\n        /* use smaller scaler to prevent overflow when we add the dither */\n        float dithered = (*src * (32766.0f)) + dither;\n        PaInt32 samp = (PaInt32) dithered;\n        PA_CLIP_( samp, -0x8000, 0x7FFF );\n#ifdef PA_USE_C99_LRINTF\n        *dest = lrintf(samp-0.5f);\n#else\n        *dest = (PaInt16) samp;\n#endif\n\n        src += sourceStride;\n        dest += destinationStride;\n    }\n}\n\n/* -------------------------------------------------------------------------- */\n\nstatic void Float32_To_Int8(\n    void *destinationBuffer, signed int destinationStride,\n    void *sourceBuffer, signed int sourceStride,\n    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )\n{\n    float *src = (float*)sourceBuffer;\n    signed char *dest =  (signed char*)destinationBuffer;\n    (void)ditherGenerator; /* unused parameter */\n\n    while( count-- )\n    {\n        signed char samp = (signed char) (*src * (127.0f));\n        *dest = samp;\n\n        src += sourceStride;\n        dest += destinationStride;\n    }\n}\n\n/* -------------------------------------------------------------------------- */\n\nstatic void Float32_To_Int8_Dither(\n    void *destinationBuffer, signed int destinationStride,\n    void *sourceBuffer, signed int sourceStride,\n    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )\n{\n    float *src = (float*)sourceBuffer;\n    signed char *dest =  (signed char*)destinationBuffer;\n\n    while( count-- )\n    {\n        float dither  = PaUtil_GenerateFloatTriangularDither( ditherGenerator );\n        /* use smaller scaler to prevent overflow when we add the dither */\n        float dithered = (*src * (126.0f)) + dither;\n        PaInt32 samp = (PaInt32) dithered;\n        *dest = (signed char) samp;\n\n        src += sourceStride;\n        dest += destinationStride;\n    }\n}\n\n/* -------------------------------------------------------------------------- */\n\nstatic void Float32_To_Int8_Clip(\n    void *destinationBuffer, signed int destinationStride,\n    void *sourceBuffer, signed int sourceStride,\n    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )\n{\n    float *src = (float*)sourceBuffer;\n    signed char *dest =  (signed char*)destinationBuffer;\n    (void)ditherGenerator; /* unused parameter */\n\n    while( count-- )\n    {\n        PaInt32 samp = (PaInt32)(*src * (127.0f));\n        PA_CLIP_( samp, -0x80, 0x7F );\n        *dest = (signed char) samp;\n\n        src += sourceStride;\n        dest += destinationStride;\n    }\n}\n\n/* -------------------------------------------------------------------------- */\n\nstatic void Float32_To_Int8_DitherClip(\n    void *destinationBuffer, signed int destinationStride,\n    void *sourceBuffer, signed int sourceStride,\n    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )\n{\n    float *src = (float*)sourceBuffer;\n    signed char *dest =  (signed char*)destinationBuffer;\n    (void)ditherGenerator; /* unused parameter */\n\n    while( count-- )\n    {\n        float dither  = PaUtil_GenerateFloatTriangularDither( ditherGenerator );\n        /* use smaller scaler to prevent overflow when we add the dither */\n        float dithered = (*src * (126.0f)) + dither;\n        PaInt32 samp = (PaInt32) dithered;\n        PA_CLIP_( samp, -0x80, 0x7F );\n        *dest = (signed char) samp;\n\n        src += sourceStride;\n        dest += destinationStride;\n    }\n}\n\n/* -------------------------------------------------------------------------- */\n\nstatic void Float32_To_UInt8(\n    void *destinationBuffer, signed int destinationStride,\n    void *sourceBuffer, signed int sourceStride,\n    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )\n{\n    float *src = (float*)sourceBuffer;\n    unsigned char *dest =  (unsigned char*)destinationBuffer;\n    (void)ditherGenerator; /* unused parameter */\n\n    while( count-- )\n    {\n        unsigned char samp = (unsigned char)(128 + ((unsigned char) (*src * (127.0f))));\n        *dest = samp;\n\n        src += sourceStride;\n        dest += destinationStride;\n    }\n}\n\n/* -------------------------------------------------------------------------- */\n\nstatic void Float32_To_UInt8_Dither(\n    void *destinationBuffer, signed int destinationStride,\n    void *sourceBuffer, signed int sourceStride,\n    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )\n{\n    float *src = (float*)sourceBuffer;\n    unsigned char *dest =  (unsigned char*)destinationBuffer;\n\n    while( count-- )\n    {\n        float dither  = PaUtil_GenerateFloatTriangularDither( ditherGenerator );\n        /* use smaller scaler to prevent overflow when we add the dither */\n        float dithered = (*src * (126.0f)) + dither;\n        PaInt32 samp = (PaInt32) dithered;\n        *dest = (unsigned char) (128 + samp);\n\n        src += sourceStride;\n        dest += destinationStride;\n    }\n}\n\n/* -------------------------------------------------------------------------- */\n\nstatic void Float32_To_UInt8_Clip(\n    void *destinationBuffer, signed int destinationStride,\n    void *sourceBuffer, signed int sourceStride,\n    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )\n{\n    float *src = (float*)sourceBuffer;\n    unsigned char *dest =  (unsigned char*)destinationBuffer;\n    (void)ditherGenerator; /* unused parameter */\n\n    while( count-- )\n    {\n        PaInt32 samp = 128 + (PaInt32)(*src * (127.0f));\n        PA_CLIP_( samp, 0x0000, 0x00FF );\n        *dest = (unsigned char) samp;\n\n        src += sourceStride;\n        dest += destinationStride;\n    }\n}\n\n/* -------------------------------------------------------------------------- */\n\nstatic void Float32_To_UInt8_DitherClip(\n    void *destinationBuffer, signed int destinationStride,\n    void *sourceBuffer, signed int sourceStride,\n    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )\n{\n    float *src = (float*)sourceBuffer;\n    unsigned char *dest =  (unsigned char*)destinationBuffer;\n    (void)ditherGenerator; /* unused parameter */\n\n    while( count-- )\n    {\n        float dither  = PaUtil_GenerateFloatTriangularDither( ditherGenerator );\n        /* use smaller scaler to prevent overflow when we add the dither */\n        float dithered = (*src * (126.0f)) + dither;\n        PaInt32 samp = 128 + (PaInt32) dithered;\n        PA_CLIP_( samp, 0x0000, 0x00FF );\n        *dest = (unsigned char) samp;\n\n        src += sourceStride;\n        dest += destinationStride;\n    }\n}\n\n/* -------------------------------------------------------------------------- */\n\nstatic void Int32_To_Float32(\n    void *destinationBuffer, signed int destinationStride,\n    void *sourceBuffer, signed int sourceStride,\n    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )\n{\n    PaInt32 *src = (PaInt32*)sourceBuffer;\n    float *dest =  (float*)destinationBuffer;\n    (void)ditherGenerator; /* unused parameter */\n\n    while( count-- )\n    {\n        *dest = (float) ((double)*src * const_1_div_2147483648_);\n\n        src += sourceStride;\n        dest += destinationStride;\n    }\n}\n\n/* -------------------------------------------------------------------------- */\n\nstatic void Int32_To_Int24(\n    void *destinationBuffer, signed int destinationStride,\n    void *sourceBuffer, signed int sourceStride,\n    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )\n{\n    PaInt32 *src    = (PaInt32*)sourceBuffer;\n    unsigned char *dest = (unsigned char*)destinationBuffer;\n    (void) ditherGenerator; /* unused parameter */\n\n    while( count-- )\n    {\n        /* REVIEW */\n#if defined(PA_LITTLE_ENDIAN)\n        dest[0] = (unsigned char)(*src >> 8);\n        dest[1] = (unsigned char)(*src >> 16);\n        dest[2] = (unsigned char)(*src >> 24);\n#elif defined(PA_BIG_ENDIAN)\n        dest[0] = (unsigned char)(*src >> 24);\n        dest[1] = (unsigned char)(*src >> 16);\n        dest[2] = (unsigned char)(*src >> 8);\n#endif\n        src += sourceStride;\n        dest += destinationStride * 3;\n    }\n}\n\n/* -------------------------------------------------------------------------- */\n\nstatic void Int32_To_Int24_Dither(\n    void *destinationBuffer, signed int destinationStride,\n    void *sourceBuffer, signed int sourceStride,\n    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )\n{\n    (void) destinationBuffer; /* unused parameters */\n    (void) destinationStride; /* unused parameters */\n    (void) sourceBuffer; /* unused parameters */\n    (void) sourceStride; /* unused parameters */\n    (void) count; /* unused parameters */\n    (void) ditherGenerator; /* unused parameters */\n    /* IMPLEMENT ME */\n}\n\n/* -------------------------------------------------------------------------- */\n\nstatic void Int32_To_Int16(\n    void *destinationBuffer, signed int destinationStride,\n    void *sourceBuffer, signed int sourceStride,\n    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )\n{\n    PaInt32 *src = (PaInt32*)sourceBuffer;\n    PaInt16 *dest =  (PaInt16*)destinationBuffer;\n    (void)ditherGenerator; /* unused parameter */\n\n    while( count-- )\n    {\n        *dest = (PaInt16) ((*src) >> 16);\n\n        src += sourceStride;\n        dest += destinationStride;\n    }\n}\n\n/* -------------------------------------------------------------------------- */\n\nstatic void Int32_To_Int16_Dither(\n    void *destinationBuffer, signed int destinationStride,\n    void *sourceBuffer, signed int sourceStride,\n    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )\n{\n    PaInt32 *src = (PaInt32*)sourceBuffer;\n    PaInt16 *dest =  (PaInt16*)destinationBuffer;\n    PaInt32 dither;\n\n    while( count-- )\n    {\n        /* REVIEW */\n        dither = PaUtil_Generate16BitTriangularDither( ditherGenerator );\n        *dest = (PaInt16) ((((*src)>>1) + dither) >> 15);\n\n        src += sourceStride;\n        dest += destinationStride;\n    }\n}\n\n/* -------------------------------------------------------------------------- */\n\nstatic void Int32_To_Int8(\n    void *destinationBuffer, signed int destinationStride,\n    void *sourceBuffer, signed int sourceStride,\n    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )\n{\n    PaInt32 *src = (PaInt32*)sourceBuffer;\n    signed char *dest =  (signed char*)destinationBuffer;\n    (void)ditherGenerator; /* unused parameter */\n\n    while( count-- )\n    {\n        *dest = (signed char) ((*src) >> 24);\n\n        src += sourceStride;\n        dest += destinationStride;\n    }\n}\n\n/* -------------------------------------------------------------------------- */\n\nstatic void Int32_To_Int8_Dither(\n    void *destinationBuffer, signed int destinationStride,\n    void *sourceBuffer, signed int sourceStride,\n    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )\n{\n    PaInt32 *src = (PaInt32*)sourceBuffer;\n    signed char *dest =  (signed char*)destinationBuffer;\n    PaInt32 dither;\n\n    while( count-- )\n    {\n        /* REVIEW */\n        dither = PaUtil_Generate16BitTriangularDither( ditherGenerator );\n        *dest = (signed char) ((((*src)>>1) + dither) >> 23);\n\n        src += sourceStride;\n        dest += destinationStride;\n    }\n}\n\n/* -------------------------------------------------------------------------- */\n\nstatic void Int32_To_UInt8(\n    void *destinationBuffer, signed int destinationStride,\n    void *sourceBuffer, signed int sourceStride,\n    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )\n{\n    PaInt32 *src = (PaInt32*)sourceBuffer;\n    unsigned char *dest =  (unsigned char*)destinationBuffer;\n    (void)ditherGenerator; /* unused parameter */\n\n    while( count-- )\n    {\n        (*dest) = (unsigned char)(((*src) >> 24) + 128);\n\n        src += sourceStride;\n        dest += destinationStride;\n    }\n}\n\n/* -------------------------------------------------------------------------- */\n\nstatic void Int32_To_UInt8_Dither(\n    void *destinationBuffer, signed int destinationStride,\n    void *sourceBuffer, signed int sourceStride,\n    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )\n{\n    PaInt32 *src = (PaInt32*)sourceBuffer;\n    unsigned char *dest =  (unsigned char*)destinationBuffer;\n    (void)ditherGenerator; /* unused parameter */\n\n    while( count-- )\n    {\n        /* IMPLEMENT ME */\n\n        src += sourceStride;\n        dest += destinationStride;\n    }\n}\n\n/* -------------------------------------------------------------------------- */\n\nstatic void Int24_To_Float32(\n    void *destinationBuffer, signed int destinationStride,\n    void *sourceBuffer, signed int sourceStride,\n    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )\n{\n    unsigned char *src = (unsigned char*)sourceBuffer;\n    float *dest = (float*)destinationBuffer;\n    PaInt32 temp;\n\n    (void) ditherGenerator; /* unused parameter */\n\n    while( count-- )\n    {\n\n#if defined(PA_LITTLE_ENDIAN)\n        temp = (((PaInt32)src[0]) << 8);\n        temp = temp | (((PaInt32)src[1]) << 16);\n        temp = temp | (((PaInt32)src[2]) << 24);\n#elif defined(PA_BIG_ENDIAN)\n        temp = (((PaInt32)src[0]) << 24);\n        temp = temp | (((PaInt32)src[1]) << 16);\n        temp = temp | (((PaInt32)src[2]) << 8);\n#endif\n\n        *dest = (float) ((double)temp * const_1_div_2147483648_);\n\n        src += sourceStride * 3;\n        dest += destinationStride;\n    }\n}\n\n/* -------------------------------------------------------------------------- */\n\nstatic void Int24_To_Int32(\n    void *destinationBuffer, signed int destinationStride,\n    void *sourceBuffer, signed int sourceStride,\n    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )\n{\n    unsigned char *src  = (unsigned char*)sourceBuffer;\n    PaInt32 *dest = (PaInt32*)  destinationBuffer;\n    PaInt32 temp;\n\n    (void) ditherGenerator; /* unused parameter */\n\n    while( count-- )\n    {\n\n#if defined(PA_LITTLE_ENDIAN)\n        temp = (((PaInt32)src[0]) << 8);\n        temp = temp | (((PaInt32)src[1]) << 16);\n        temp = temp | (((PaInt32)src[2]) << 24);\n#elif defined(PA_BIG_ENDIAN)\n        temp = (((PaInt32)src[0]) << 24);\n        temp = temp | (((PaInt32)src[1]) << 16);\n        temp = temp | (((PaInt32)src[2]) << 8);\n#endif\n\n        *dest = temp;\n\n        src += sourceStride * 3;\n        dest += destinationStride;\n    }\n}\n\n/* -------------------------------------------------------------------------- */\n\nstatic void Int24_To_Int16(\n    void *destinationBuffer, signed int destinationStride,\n    void *sourceBuffer, signed int sourceStride,\n    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )\n{\n    unsigned char *src = (unsigned char*)sourceBuffer;\n    PaInt16 *dest = (PaInt16*)destinationBuffer;\n\n    PaInt16 temp;\n\n    (void) ditherGenerator; /* unused parameter */\n\n    while( count-- )\n    {\n\n#if defined(PA_LITTLE_ENDIAN)\n        /* src[0] is discarded */\n        temp = (((PaInt16)src[1]));\n        temp = temp | (PaInt16)(((PaInt16)src[2]) << 8);\n#elif defined(PA_BIG_ENDIAN)\n        /* src[2] is discarded */\n        temp = (PaInt16)(((PaInt16)src[0]) << 8);\n        temp = temp | (((PaInt16)src[1]));\n#endif\n\n        *dest = temp;\n\n        src += sourceStride * 3;\n        dest += destinationStride;\n    }\n}\n\n/* -------------------------------------------------------------------------- */\n\nstatic void Int24_To_Int16_Dither(\n    void *destinationBuffer, signed int destinationStride,\n    void *sourceBuffer, signed int sourceStride,\n    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )\n{\n    unsigned char *src = (unsigned char*)sourceBuffer;\n    PaInt16 *dest = (PaInt16*)destinationBuffer;\n\n    PaInt32 temp, dither;\n\n    while( count-- )\n    {\n\n#if defined(PA_LITTLE_ENDIAN)\n        temp = (((PaInt32)src[0]) << 8);\n        temp = temp | (((PaInt32)src[1]) << 16);\n        temp = temp | (((PaInt32)src[2]) << 24);\n#elif defined(PA_BIG_ENDIAN)\n        temp = (((PaInt32)src[0]) << 24);\n        temp = temp | (((PaInt32)src[1]) << 16);\n        temp = temp | (((PaInt32)src[2]) << 8);\n#endif\n\n        /* REVIEW */\n        dither = PaUtil_Generate16BitTriangularDither( ditherGenerator );\n        *dest = (PaInt16) (((temp >> 1) + dither) >> 15);\n\n        src  += sourceStride * 3;\n        dest += destinationStride;\n    }\n}\n\n/* -------------------------------------------------------------------------- */\n\nstatic void Int24_To_Int8(\n    void *destinationBuffer, signed int destinationStride,\n    void *sourceBuffer, signed int sourceStride,\n    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )\n{\n    unsigned char *src = (unsigned char*)sourceBuffer;\n    signed char  *dest = (signed char*)destinationBuffer;\n\n    (void) ditherGenerator; /* unused parameter */\n\n    while( count-- )\n    {\n\n#if defined(PA_LITTLE_ENDIAN)\n        /* src[0] is discarded */\n        /* src[1] is discarded */\n        *dest = src[2];\n#elif defined(PA_BIG_ENDIAN)\n        /* src[2] is discarded */\n        /* src[1] is discarded */\n        *dest = src[0];\n#endif\n\n        src += sourceStride * 3;\n        dest += destinationStride;\n    }\n}\n\n/* -------------------------------------------------------------------------- */\n\nstatic void Int24_To_Int8_Dither(\n    void *destinationBuffer, signed int destinationStride,\n    void *sourceBuffer, signed int sourceStride,\n    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )\n{\n    unsigned char *src = (unsigned char*)sourceBuffer;\n    signed char  *dest = (signed char*)destinationBuffer;\n\n    PaInt32 temp, dither;\n\n    while( count-- )\n    {\n\n#if defined(PA_LITTLE_ENDIAN)\n        temp = (((PaInt32)src[0]) << 8);\n        temp = temp | (((PaInt32)src[1]) << 16);\n        temp = temp | (((PaInt32)src[2]) << 24);\n#elif defined(PA_BIG_ENDIAN)\n        temp = (((PaInt32)src[0]) << 24);\n        temp = temp | (((PaInt32)src[1]) << 16);\n        temp = temp | (((PaInt32)src[2]) << 8);\n#endif\n\n        /* REVIEW */\n        dither = PaUtil_Generate16BitTriangularDither( ditherGenerator );\n        *dest = (signed char) (((temp >> 1) + dither) >> 23);\n\n        src += sourceStride * 3;\n        dest += destinationStride;\n    }\n}\n\n/* -------------------------------------------------------------------------- */\n\nstatic void Int24_To_UInt8(\n    void *destinationBuffer, signed int destinationStride,\n    void *sourceBuffer, signed int sourceStride,\n    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )\n{\n    unsigned char *src = (unsigned char*)sourceBuffer;\n    unsigned char *dest = (unsigned char*)destinationBuffer;\n\n    (void) ditherGenerator; /* unused parameter */\n\n    while( count-- )\n    {\n\n#if defined(PA_LITTLE_ENDIAN)\n        /* src[0] is discarded */\n        /* src[1] is discarded */\n        *dest = (unsigned char)(src[2] + 128);\n#elif defined(PA_BIG_ENDIAN)\n        *dest = (unsigned char)(src[0] + 128);\n        /* src[1] is discarded */\n        /* src[2] is discarded */\n#endif\n\n        src += sourceStride * 3;\n        dest += destinationStride;\n    }\n}\n\n/* -------------------------------------------------------------------------- */\n\nstatic void Int24_To_UInt8_Dither(\n    void *destinationBuffer, signed int destinationStride,\n    void *sourceBuffer, signed int sourceStride,\n    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )\n{\n    (void) destinationBuffer; /* unused parameters */\n    (void) destinationStride; /* unused parameters */\n    (void) sourceBuffer; /* unused parameters */\n    (void) sourceStride; /* unused parameters */\n    (void) count; /* unused parameters */\n    (void) ditherGenerator; /* unused parameters */\n    /* IMPLEMENT ME */\n}\n\n/* -------------------------------------------------------------------------- */\n\nstatic void Int16_To_Float32(\n    void *destinationBuffer, signed int destinationStride,\n    void *sourceBuffer, signed int sourceStride,\n    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )\n{\n    PaInt16 *src = (PaInt16*)sourceBuffer;\n    float *dest =  (float*)destinationBuffer;\n    (void)ditherGenerator; /* unused parameter */\n\n    while( count-- )\n    {\n        float samp = *src * const_1_div_32768_; /* FIXME: i'm concerned about this being asymmetrical with float->int16 -rb */\n        *dest = samp;\n\n        src += sourceStride;\n        dest += destinationStride;\n    }\n}\n\n/* -------------------------------------------------------------------------- */\n\nstatic void Int16_To_Int32(\n    void *destinationBuffer, signed int destinationStride,\n    void *sourceBuffer, signed int sourceStride,\n    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )\n{\n    PaInt16 *src = (PaInt16*)sourceBuffer;\n    PaInt32 *dest =  (PaInt32*)destinationBuffer;\n    (void)ditherGenerator; /* unused parameter */\n\n    while( count-- )\n    {\n        /* REVIEW: we should consider something like\n            (*src << 16) | (*src & 0xFFFF)\n        */\n\n        *dest = *src << 16;\n\n        src += sourceStride;\n        dest += destinationStride;\n    }\n}\n\n/* -------------------------------------------------------------------------- */\n\nstatic void Int16_To_Int24(\n    void *destinationBuffer, signed int destinationStride,\n    void *sourceBuffer, signed int sourceStride,\n    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )\n{\n    PaInt16 *src   = (PaInt16*) sourceBuffer;\n    unsigned char *dest = (unsigned char*)destinationBuffer;\n    PaInt16 temp;\n\n    (void) ditherGenerator; /* unused parameter */\n\n    while( count-- )\n    {\n        temp = *src;\n\n#if defined(PA_LITTLE_ENDIAN)\n        dest[0] = 0;\n        dest[1] = (unsigned char)(temp);\n        dest[2] = (unsigned char)(temp >> 8);\n#elif defined(PA_BIG_ENDIAN)\n        dest[0] = (unsigned char)(temp >> 8);\n        dest[1] = (unsigned char)(temp);\n        dest[2] = 0;\n#endif\n\n        src += sourceStride;\n        dest += destinationStride * 3;\n    }\n}\n\n/* -------------------------------------------------------------------------- */\n\nstatic void Int16_To_Int8(\n    void *destinationBuffer, signed int destinationStride,\n    void *sourceBuffer, signed int sourceStride,\n    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )\n{\n    PaInt16 *src = (PaInt16*)sourceBuffer;\n    signed char *dest =  (signed char*)destinationBuffer;\n    (void)ditherGenerator; /* unused parameter */\n\n    while( count-- )\n    {\n        (*dest) = (signed char)((*src) >> 8);\n\n        src += sourceStride;\n        dest += destinationStride;\n    }\n}\n\n/* -------------------------------------------------------------------------- */\n\nstatic void Int16_To_Int8_Dither(\n    void *destinationBuffer, signed int destinationStride,\n    void *sourceBuffer, signed int sourceStride,\n    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )\n{\n    PaInt16 *src = (PaInt16*)sourceBuffer;\n    signed char *dest =  (signed char*)destinationBuffer;\n    (void)ditherGenerator; /* unused parameter */\n\n    while( count-- )\n    {\n        /* IMPLEMENT ME */\n\n        src += sourceStride;\n        dest += destinationStride;\n    }\n}\n\n/* -------------------------------------------------------------------------- */\n\nstatic void Int16_To_UInt8(\n    void *destinationBuffer, signed int destinationStride,\n    void *sourceBuffer, signed int sourceStride,\n    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )\n{\n    PaInt16 *src = (PaInt16*)sourceBuffer;\n    unsigned char *dest =  (unsigned char*)destinationBuffer;\n    (void)ditherGenerator; /* unused parameter */\n\n    while( count-- )\n    {\n        (*dest) = (unsigned char)(((*src) >> 8) + 128);\n\n        src += sourceStride;\n        dest += destinationStride;\n    }\n}\n\n/* -------------------------------------------------------------------------- */\n\nstatic void Int16_To_UInt8_Dither(\n    void *destinationBuffer, signed int destinationStride,\n    void *sourceBuffer, signed int sourceStride,\n    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )\n{\n    PaInt16 *src = (PaInt16*)sourceBuffer;\n    unsigned char *dest =  (unsigned char*)destinationBuffer;\n    (void)ditherGenerator; /* unused parameter */\n\n    while( count-- )\n    {\n        /* IMPLEMENT ME */\n\n        src += sourceStride;\n        dest += destinationStride;\n    }\n}\n\n/* -------------------------------------------------------------------------- */\n\nstatic void Int8_To_Float32(\n    void *destinationBuffer, signed int destinationStride,\n    void *sourceBuffer, signed int sourceStride,\n    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )\n{\n    signed char *src = (signed char*)sourceBuffer;\n    float *dest =  (float*)destinationBuffer;\n    (void)ditherGenerator; /* unused parameter */\n\n    while( count-- )\n    {\n        float samp = *src * const_1_div_128_;\n        *dest = samp;\n\n        src += sourceStride;\n        dest += destinationStride;\n    }\n}\n\n/* -------------------------------------------------------------------------- */\n\nstatic void Int8_To_Int32(\n    void *destinationBuffer, signed int destinationStride,\n    void *sourceBuffer, signed int sourceStride,\n    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )\n{\n    signed char *src = (signed char*)sourceBuffer;\n    PaInt32 *dest =  (PaInt32*)destinationBuffer;\n    (void)ditherGenerator; /* unused parameter */\n\n    while( count-- )\n    {\n        (*dest) = (*src) << 24;\n\n        src += sourceStride;\n        dest += destinationStride;\n    }\n}\n\n/* -------------------------------------------------------------------------- */\n\nstatic void Int8_To_Int24(\n    void *destinationBuffer, signed int destinationStride,\n    void *sourceBuffer, signed int sourceStride,\n    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )\n{\n    signed char *src = (signed char*)sourceBuffer;\n    unsigned char *dest =  (unsigned char*)destinationBuffer;\n    (void)ditherGenerator; /* unused parameter */\n\n    while( count-- )\n    {\n\n#if defined(PA_LITTLE_ENDIAN)\n        dest[0] = 0;\n        dest[1] = 0;\n        dest[2] = (*src);\n#elif defined(PA_BIG_ENDIAN)\n        dest[0] = (*src);\n        dest[1] = 0;\n        dest[2] = 0;\n#endif\n\n        src += sourceStride;\n        dest += destinationStride * 3;\n    }\n}\n\n/* -------------------------------------------------------------------------- */\n\nstatic void Int8_To_Int16(\n    void *destinationBuffer, signed int destinationStride,\n    void *sourceBuffer, signed int sourceStride,\n    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )\n{\n    signed char *src = (signed char*)sourceBuffer;\n    PaInt16 *dest =  (PaInt16*)destinationBuffer;\n    (void)ditherGenerator; /* unused parameter */\n\n    while( count-- )\n    {\n        (*dest) = (PaInt16)((*src) << 8);\n\n        src += sourceStride;\n        dest += destinationStride;\n    }\n}\n\n/* -------------------------------------------------------------------------- */\n\nstatic void Int8_To_UInt8(\n    void *destinationBuffer, signed int destinationStride,\n    void *sourceBuffer, signed int sourceStride,\n    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )\n{\n    signed char *src = (signed char*)sourceBuffer;\n    unsigned char *dest =  (unsigned char*)destinationBuffer;\n    (void)ditherGenerator; /* unused parameter */\n\n    while( count-- )\n    {\n        (*dest) = (unsigned char)(*src + 128);\n\n        src += sourceStride;\n        dest += destinationStride;\n    }\n}\n\n/* -------------------------------------------------------------------------- */\n\nstatic void UInt8_To_Float32(\n    void *destinationBuffer, signed int destinationStride,\n    void *sourceBuffer, signed int sourceStride,\n    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )\n{\n    unsigned char *src = (unsigned char*)sourceBuffer;\n    float *dest =  (float*)destinationBuffer;\n    (void)ditherGenerator; /* unused parameter */\n\n    while( count-- )\n    {\n        float samp = (*src - 128) * const_1_div_128_;\n        *dest = samp;\n\n        src += sourceStride;\n        dest += destinationStride;\n    }\n}\n\n/* -------------------------------------------------------------------------- */\n\nstatic void UInt8_To_Int32(\n    void *destinationBuffer, signed int destinationStride,\n    void *sourceBuffer, signed int sourceStride,\n    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )\n{\n    unsigned char *src = (unsigned char*)sourceBuffer;\n    PaInt32 *dest = (PaInt32*)destinationBuffer;\n    (void)ditherGenerator; /* unused parameter */\n\n    while( count-- )\n    {\n        (*dest) = (*src - 128) << 24;\n\n        src += sourceStride;\n        dest += destinationStride;\n    }\n}\n\n/* -------------------------------------------------------------------------- */\n\nstatic void UInt8_To_Int24(\n    void *destinationBuffer, signed int destinationStride,\n    void *sourceBuffer, signed int sourceStride,\n    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )\n{\n    unsigned char *src  = (unsigned char*)sourceBuffer;\n    unsigned char *dest = (unsigned char*)destinationBuffer;\n    (void) ditherGenerator; /* unused parameters */\n\n    while( count-- )\n    {\n\n#if defined(PA_LITTLE_ENDIAN)\n        dest[0] = 0;\n        dest[1] = 0;\n        dest[2] = (unsigned char)(*src - 128);\n#elif defined(PA_BIG_ENDIAN)\n        dest[0] = (unsigned char)(*src - 128);\n        dest[1] = 0;\n        dest[2] = 0;\n#endif\n\n        src += sourceStride;\n        dest += destinationStride * 3;\n    }\n}\n\n/* -------------------------------------------------------------------------- */\n\nstatic void UInt8_To_Int16(\n    void *destinationBuffer, signed int destinationStride,\n    void *sourceBuffer, signed int sourceStride,\n    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )\n{\n    unsigned char *src = (unsigned char*)sourceBuffer;\n    PaInt16 *dest =  (PaInt16*)destinationBuffer;\n    (void)ditherGenerator; /* unused parameter */\n\n    while( count-- )\n    {\n        (*dest) = (PaInt16)((*src - 128) << 8);\n\n        src += sourceStride;\n        dest += destinationStride;\n    }\n}\n\n/* -------------------------------------------------------------------------- */\n\nstatic void UInt8_To_Int8(\n    void *destinationBuffer, signed int destinationStride,\n    void *sourceBuffer, signed int sourceStride,\n    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )\n{\n    unsigned char *src = (unsigned char*)sourceBuffer;\n    signed char  *dest = (signed char*)destinationBuffer;\n    (void)ditherGenerator; /* unused parameter */\n\n    while( count-- )\n    {\n        (*dest) = (signed char)(*src - 128);\n\n        src += sourceStride;\n        dest += destinationStride;\n    }\n}\n\n/* -------------------------------------------------------------------------- */\n\nstatic void Copy_8_To_8(\n    void *destinationBuffer, signed int destinationStride,\n    void *sourceBuffer, signed int sourceStride,\n    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )\n{\n    unsigned char *src = (unsigned char*)sourceBuffer;\n    unsigned char *dest = (unsigned char*)destinationBuffer;\n\n    (void) ditherGenerator; /* unused parameter */\n\n    while( count-- )\n    {\n        *dest = *src;\n\n        src += sourceStride;\n        dest += destinationStride;\n    }\n}\n\n/* -------------------------------------------------------------------------- */\n\nstatic void Copy_16_To_16(\n    void *destinationBuffer, signed int destinationStride,\n    void *sourceBuffer, signed int sourceStride,\n    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )\n{\n    PaUint16 *src = (PaUint16 *)sourceBuffer;\n    PaUint16 *dest = (PaUint16 *)destinationBuffer;\n\n    (void) ditherGenerator; /* unused parameter */\n\n    while( count-- )\n    {\n        *dest = *src;\n\n        src += sourceStride;\n        dest += destinationStride;\n    }\n}\n\n/* -------------------------------------------------------------------------- */\n\nstatic void Copy_24_To_24(\n    void *destinationBuffer, signed int destinationStride,\n    void *sourceBuffer, signed int sourceStride,\n    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )\n{\n    unsigned char *src = (unsigned char*)sourceBuffer;\n    unsigned char *dest = (unsigned char*)destinationBuffer;\n\n    (void) ditherGenerator; /* unused parameter */\n\n    while( count-- )\n    {\n        dest[0] = src[0];\n        dest[1] = src[1];\n        dest[2] = src[2];\n\n        src += sourceStride * 3;\n        dest += destinationStride * 3;\n    }\n}\n\n/* -------------------------------------------------------------------------- */\n\nstatic void Copy_32_To_32(\n    void *destinationBuffer, signed int destinationStride,\n    void *sourceBuffer, signed int sourceStride,\n    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )\n{\n    PaUint32 *dest = (PaUint32 *)destinationBuffer;\n    PaUint32 *src = (PaUint32 *)sourceBuffer;\n\n    (void) ditherGenerator; /* unused parameter */\n\n    while( count-- )\n    {\n        *dest = *src;\n\n        src += sourceStride;\n        dest += destinationStride;\n    }\n}\n\n/* -------------------------------------------------------------------------- */\n\nPaUtilConverterTable paConverters = {\n    Float32_To_Int32,              /* PaUtilConverter *Float32_To_Int32; */\n    Float32_To_Int32_Dither,       /* PaUtilConverter *Float32_To_Int32_Dither; */\n    Float32_To_Int32_Clip,         /* PaUtilConverter *Float32_To_Int32_Clip; */\n    Float32_To_Int32_DitherClip,   /* PaUtilConverter *Float32_To_Int32_DitherClip; */\n\n    Float32_To_Int24,              /* PaUtilConverter *Float32_To_Int24; */\n    Float32_To_Int24_Dither,       /* PaUtilConverter *Float32_To_Int24_Dither; */\n    Float32_To_Int24_Clip,         /* PaUtilConverter *Float32_To_Int24_Clip; */\n    Float32_To_Int24_DitherClip,   /* PaUtilConverter *Float32_To_Int24_DitherClip; */\n\n    Float32_To_Int16,              /* PaUtilConverter *Float32_To_Int16; */\n    Float32_To_Int16_Dither,       /* PaUtilConverter *Float32_To_Int16_Dither; */\n    Float32_To_Int16_Clip,         /* PaUtilConverter *Float32_To_Int16_Clip; */\n    Float32_To_Int16_DitherClip,   /* PaUtilConverter *Float32_To_Int16_DitherClip; */\n\n    Float32_To_Int8,               /* PaUtilConverter *Float32_To_Int8; */\n    Float32_To_Int8_Dither,        /* PaUtilConverter *Float32_To_Int8_Dither; */\n    Float32_To_Int8_Clip,          /* PaUtilConverter *Float32_To_Int8_Clip; */\n    Float32_To_Int8_DitherClip,    /* PaUtilConverter *Float32_To_Int8_DitherClip; */\n\n    Float32_To_UInt8,              /* PaUtilConverter *Float32_To_UInt8; */\n    Float32_To_UInt8_Dither,       /* PaUtilConverter *Float32_To_UInt8_Dither; */\n    Float32_To_UInt8_Clip,         /* PaUtilConverter *Float32_To_UInt8_Clip; */\n    Float32_To_UInt8_DitherClip,   /* PaUtilConverter *Float32_To_UInt8_DitherClip; */\n\n    Int32_To_Float32,              /* PaUtilConverter *Int32_To_Float32; */\n    Int32_To_Int24,                /* PaUtilConverter *Int32_To_Int24; */\n    Int32_To_Int24_Dither,         /* PaUtilConverter *Int32_To_Int24_Dither; */\n    Int32_To_Int16,                /* PaUtilConverter *Int32_To_Int16; */\n    Int32_To_Int16_Dither,         /* PaUtilConverter *Int32_To_Int16_Dither; */\n    Int32_To_Int8,                 /* PaUtilConverter *Int32_To_Int8; */\n    Int32_To_Int8_Dither,          /* PaUtilConverter *Int32_To_Int8_Dither; */\n    Int32_To_UInt8,                /* PaUtilConverter *Int32_To_UInt8; */\n    Int32_To_UInt8_Dither,         /* PaUtilConverter *Int32_To_UInt8_Dither; */\n\n    Int24_To_Float32,              /* PaUtilConverter *Int24_To_Float32; */\n    Int24_To_Int32,                /* PaUtilConverter *Int24_To_Int32; */\n    Int24_To_Int16,                /* PaUtilConverter *Int24_To_Int16; */\n    Int24_To_Int16_Dither,         /* PaUtilConverter *Int24_To_Int16_Dither; */\n    Int24_To_Int8,                 /* PaUtilConverter *Int24_To_Int8; */\n    Int24_To_Int8_Dither,          /* PaUtilConverter *Int24_To_Int8_Dither; */\n    Int24_To_UInt8,                /* PaUtilConverter *Int24_To_UInt8; */\n    Int24_To_UInt8_Dither,         /* PaUtilConverter *Int24_To_UInt8_Dither; */\n\n    Int16_To_Float32,              /* PaUtilConverter *Int16_To_Float32; */\n    Int16_To_Int32,                /* PaUtilConverter *Int16_To_Int32; */\n    Int16_To_Int24,                /* PaUtilConverter *Int16_To_Int24; */\n    Int16_To_Int8,                 /* PaUtilConverter *Int16_To_Int8; */\n    Int16_To_Int8_Dither,          /* PaUtilConverter *Int16_To_Int8_Dither; */\n    Int16_To_UInt8,                /* PaUtilConverter *Int16_To_UInt8; */\n    Int16_To_UInt8_Dither,         /* PaUtilConverter *Int16_To_UInt8_Dither; */\n\n    Int8_To_Float32,               /* PaUtilConverter *Int8_To_Float32; */\n    Int8_To_Int32,                 /* PaUtilConverter *Int8_To_Int32; */\n    Int8_To_Int24,                 /* PaUtilConverter *Int8_To_Int24 */\n    Int8_To_Int16,                 /* PaUtilConverter *Int8_To_Int16; */\n    Int8_To_UInt8,                 /* PaUtilConverter *Int8_To_UInt8; */\n\n    UInt8_To_Float32,              /* PaUtilConverter *UInt8_To_Float32; */\n    UInt8_To_Int32,                /* PaUtilConverter *UInt8_To_Int32; */\n    UInt8_To_Int24,                /* PaUtilConverter *UInt8_To_Int24; */\n    UInt8_To_Int16,                /* PaUtilConverter *UInt8_To_Int16; */\n    UInt8_To_Int8,                 /* PaUtilConverter *UInt8_To_Int8; */\n\n    Copy_8_To_8,                   /* PaUtilConverter *Copy_8_To_8; */\n    Copy_16_To_16,                 /* PaUtilConverter *Copy_16_To_16; */\n    Copy_24_To_24,                 /* PaUtilConverter *Copy_24_To_24; */\n    Copy_32_To_32                  /* PaUtilConverter *Copy_32_To_32; */\n};\n\n/* -------------------------------------------------------------------------- */\n\n#endif /* PA_NO_STANDARD_CONVERTERS */\n\n/* -------------------------------------------------------------------------- */\n\nPaUtilZeroer* PaUtil_SelectZeroer( PaSampleFormat destinationFormat )\n{\n    switch( destinationFormat & ~paNonInterleaved ){\n    case paFloat32:\n        return paZeroers.Zero32;\n    case paInt32:\n        return paZeroers.Zero32;\n    case paInt24:\n        return paZeroers.Zero24;\n    case paInt16:\n        return paZeroers.Zero16;\n    case paInt8:\n        return paZeroers.Zero8;\n    case paUInt8:\n        return paZeroers.ZeroU8;\n    default: return 0;\n    }\n}\n\n/* -------------------------------------------------------------------------- */\n\n#ifdef PA_NO_STANDARD_ZEROERS\n\n/* -------------------------------------------------------------------------- */\n\nPaUtilZeroerTable paZeroers = {\n    0,  /* PaUtilZeroer *ZeroU8; */\n    0,  /* PaUtilZeroer *Zero8; */\n    0,  /* PaUtilZeroer *Zero16; */\n    0,  /* PaUtilZeroer *Zero24; */\n    0,  /* PaUtilZeroer *Zero32; */\n};\n\n/* -------------------------------------------------------------------------- */\n\n#else /* PA_NO_STANDARD_ZEROERS is not defined */\n\n/* -------------------------------------------------------------------------- */\n\nstatic void ZeroU8( void *destinationBuffer, signed int destinationStride,\n        unsigned int count )\n{\n    unsigned char *dest = (unsigned char*)destinationBuffer;\n\n    while( count-- )\n    {\n        *dest = 128;\n\n        dest += destinationStride;\n    }\n}\n\n/* -------------------------------------------------------------------------- */\n\nstatic void Zero8( void *destinationBuffer, signed int destinationStride,\n        unsigned int count )\n{\n    unsigned char *dest = (unsigned char*)destinationBuffer;\n\n    while( count-- )\n    {\n        *dest = 0;\n\n        dest += destinationStride;\n    }\n}\n\n/* -------------------------------------------------------------------------- */\n\nstatic void Zero16( void *destinationBuffer, signed int destinationStride,\n        unsigned int count )\n{\n    PaUint16 *dest = (PaUint16 *)destinationBuffer;\n\n    while( count-- )\n    {\n        *dest = 0;\n\n        dest += destinationStride;\n    }\n}\n\n/* -------------------------------------------------------------------------- */\n\nstatic void Zero24( void *destinationBuffer, signed int destinationStride,\n        unsigned int count )\n{\n    unsigned char *dest = (unsigned char*)destinationBuffer;\n\n    while( count-- )\n    {\n        dest[0] = 0;\n        dest[1] = 0;\n        dest[2] = 0;\n\n        dest += destinationStride * 3;\n    }\n}\n\n/* -------------------------------------------------------------------------- */\n\nstatic void Zero32( void *destinationBuffer, signed int destinationStride,\n        unsigned int count )\n{\n    PaUint32 *dest = (PaUint32 *)destinationBuffer;\n\n    while( count-- )\n    {\n        *dest = 0;\n\n        dest += destinationStride;\n    }\n}\n\n/* -------------------------------------------------------------------------- */\n\nPaUtilZeroerTable paZeroers = {\n    ZeroU8,  /* PaUtilZeroer *ZeroU8; */\n    Zero8,  /* PaUtilZeroer *Zero8; */\n    Zero16,  /* PaUtilZeroer *Zero16; */\n    Zero24,  /* PaUtilZeroer *Zero24; */\n    Zero32,  /* PaUtilZeroer *Zero32; */\n};\n\n/* -------------------------------------------------------------------------- */\n\n#endif /* PA_NO_STANDARD_ZEROERS */\n"
  },
  {
    "path": "thirdparty/portaudio/src/common/pa_converters.h",
    "content": "#ifndef PA_CONVERTERS_H\n#define PA_CONVERTERS_H\n/*\n * $Id$\n * Portable Audio I/O Library sample conversion mechanism\n *\n * Based on the Open Source API proposed by Ross Bencina\n * Copyright (c) 1999-2002 Phil Burk, Ross Bencina\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n/** @file\n @ingroup common_src\n\n @brief Conversion functions used to convert buffers of samples from one\n format to another.\n*/\n\n\n#include \"portaudio.h\"  /* for PaSampleFormat */\n\n#ifdef __cplusplus\nextern \"C\"\n{\n#endif /* __cplusplus */\n\n\nstruct PaUtilTriangularDitherGenerator;\n\n\n/** Choose an available sample format which is most appropriate for\n representing the requested format. If the requested format is not available\n higher quality formats are considered before lower quality formats.\n @param availableFormats A variable containing the logical OR of all available\n formats.\n @param format The desired format.\n @return The most appropriate available format for representing the requested\n format.\n*/\nPaSampleFormat PaUtil_SelectClosestAvailableFormat(\n        PaSampleFormat availableFormats, PaSampleFormat format );\n\n\n/* high level conversions functions for use by implementations */\n\n\n/** The generic sample converter prototype. Sample converters convert count\n    samples from sourceBuffer to destinationBuffer. The actual type of the data\n    pointed to by these parameters varys for different converter functions.\n    @param destinationBuffer A pointer to the first sample of the destination.\n    @param destinationStride An offset between successive destination samples\n    expressed in samples (not bytes.) It may be negative.\n    @param sourceBuffer A pointer to the first sample of the source.\n    @param sourceStride An offset between successive source samples\n    expressed in samples (not bytes.) It may be negative.\n    @param count The number of samples to convert.\n    @param ditherState State information used to calculate dither. Converters\n    that do not perform dithering will ignore this parameter, in which case\n    NULL or invalid dither state may be passed.\n*/\ntypedef void PaUtilConverter(\n    void *destinationBuffer, signed int destinationStride,\n    void *sourceBuffer, signed int sourceStride,\n    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator );\n\n\n/** Find a sample converter function for the given source and destinations\n    formats and flags (clip and dither.)\n    @return\n    A pointer to a PaUtilConverter which will perform the requested\n    conversion, or NULL if the given format conversion is not supported.\n    For conversions where clipping or dithering is not necessary, the\n    clip and dither flags are ignored and a non-clipping or dithering\n    version is returned.\n    If the source and destination formats are the same, a function which\n    copies data of the appropriate size will be returned.\n*/\nPaUtilConverter* PaUtil_SelectConverter( PaSampleFormat sourceFormat,\n        PaSampleFormat destinationFormat, PaStreamFlags flags );\n\n\n/** The generic buffer zeroer prototype. Buffer zeroers copy count zeros to\n    destinationBuffer. The actual type of the data pointed to varys for\n    different zeroer functions.\n    @param destinationBuffer A pointer to the first sample of the destination.\n    @param destinationStride An offset between successive destination samples\n    expressed in samples (not bytes.) It may be negative.\n    @param count The number of samples to zero.\n*/\ntypedef void PaUtilZeroer(\n    void *destinationBuffer, signed int destinationStride, unsigned int count );\n\n\n/** Find a buffer zeroer function for the given destination format.\n    @return\n    A pointer to a PaUtilZeroer which will perform the requested\n    zeroing.\n*/\nPaUtilZeroer* PaUtil_SelectZeroer( PaSampleFormat destinationFormat );\n\n/*----------------------------------------------------------------------------*/\n/* low level functions and data structures which may be used for\n    substituting conversion functions */\n\n\n/** The type used to store all sample conversion functions.\n    @see paConverters;\n*/\ntypedef struct{\n    PaUtilConverter *Float32_To_Int32;\n    PaUtilConverter *Float32_To_Int32_Dither;\n    PaUtilConverter *Float32_To_Int32_Clip;\n    PaUtilConverter *Float32_To_Int32_DitherClip;\n\n    PaUtilConverter *Float32_To_Int24;\n    PaUtilConverter *Float32_To_Int24_Dither;\n    PaUtilConverter *Float32_To_Int24_Clip;\n    PaUtilConverter *Float32_To_Int24_DitherClip;\n\n    PaUtilConverter *Float32_To_Int16;\n    PaUtilConverter *Float32_To_Int16_Dither;\n    PaUtilConverter *Float32_To_Int16_Clip;\n    PaUtilConverter *Float32_To_Int16_DitherClip;\n\n    PaUtilConverter *Float32_To_Int8;\n    PaUtilConverter *Float32_To_Int8_Dither;\n    PaUtilConverter *Float32_To_Int8_Clip;\n    PaUtilConverter *Float32_To_Int8_DitherClip;\n\n    PaUtilConverter *Float32_To_UInt8;\n    PaUtilConverter *Float32_To_UInt8_Dither;\n    PaUtilConverter *Float32_To_UInt8_Clip;\n    PaUtilConverter *Float32_To_UInt8_DitherClip;\n\n    PaUtilConverter *Int32_To_Float32;\n    PaUtilConverter *Int32_To_Int24;\n    PaUtilConverter *Int32_To_Int24_Dither;\n    PaUtilConverter *Int32_To_Int16;\n    PaUtilConverter *Int32_To_Int16_Dither;\n    PaUtilConverter *Int32_To_Int8;\n    PaUtilConverter *Int32_To_Int8_Dither;\n    PaUtilConverter *Int32_To_UInt8;\n    PaUtilConverter *Int32_To_UInt8_Dither;\n\n    PaUtilConverter *Int24_To_Float32;\n    PaUtilConverter *Int24_To_Int32;\n    PaUtilConverter *Int24_To_Int16;\n    PaUtilConverter *Int24_To_Int16_Dither;\n    PaUtilConverter *Int24_To_Int8;\n    PaUtilConverter *Int24_To_Int8_Dither;\n    PaUtilConverter *Int24_To_UInt8;\n    PaUtilConverter *Int24_To_UInt8_Dither;\n\n    PaUtilConverter *Int16_To_Float32;\n    PaUtilConverter *Int16_To_Int32;\n    PaUtilConverter *Int16_To_Int24;\n    PaUtilConverter *Int16_To_Int8;\n    PaUtilConverter *Int16_To_Int8_Dither;\n    PaUtilConverter *Int16_To_UInt8;\n    PaUtilConverter *Int16_To_UInt8_Dither;\n\n    PaUtilConverter *Int8_To_Float32;\n    PaUtilConverter *Int8_To_Int32;\n    PaUtilConverter *Int8_To_Int24;\n    PaUtilConverter *Int8_To_Int16;\n    PaUtilConverter *Int8_To_UInt8;\n\n    PaUtilConverter *UInt8_To_Float32;\n    PaUtilConverter *UInt8_To_Int32;\n    PaUtilConverter *UInt8_To_Int24;\n    PaUtilConverter *UInt8_To_Int16;\n    PaUtilConverter *UInt8_To_Int8;\n\n    PaUtilConverter *Copy_8_To_8;       /* copy without any conversion */\n    PaUtilConverter *Copy_16_To_16;     /* copy without any conversion */\n    PaUtilConverter *Copy_24_To_24;     /* copy without any conversion */\n    PaUtilConverter *Copy_32_To_32;     /* copy without any conversion */\n} PaUtilConverterTable;\n\n\n/** A table of pointers to all required converter functions.\n    PaUtil_SelectConverter() uses this table to lookup the appropriate\n    conversion functions. The fields of this structure are initialized\n    with default conversion functions. Fields may be NULL, indicating that\n    no conversion function is available. User code may substitute optimised\n    conversion functions by assigning different function pointers to\n    these fields.\n\n    @note\n    If the PA_NO_STANDARD_CONVERTERS preprocessor variable is defined,\n    PortAudio's standard converters will not be compiled, and all fields\n    of this structure will be initialized to NULL. In such cases, users\n    should supply their own conversion functions if the require PortAudio\n    to open a stream that requires sample conversion.\n\n    @see PaUtilConverterTable, PaUtilConverter, PaUtil_SelectConverter\n*/\nextern PaUtilConverterTable paConverters;\n\n\n/** The type used to store all buffer zeroing functions.\n    @see paZeroers;\n*/\ntypedef struct{\n    PaUtilZeroer *ZeroU8; /* unsigned 8 bit, zero == 128 */\n    PaUtilZeroer *Zero8;\n    PaUtilZeroer *Zero16;\n    PaUtilZeroer *Zero24;\n    PaUtilZeroer *Zero32;\n} PaUtilZeroerTable;\n\n\n/** A table of pointers to all required zeroer functions.\n    PaUtil_SelectZeroer() uses this table to lookup the appropriate\n    conversion functions. The fields of this structure are initialized\n    with default conversion functions. User code may substitute optimised\n    conversion functions by assigning different function pointers to\n    these fields.\n\n    @note\n    If the PA_NO_STANDARD_ZEROERS preprocessor variable is defined,\n    PortAudio's standard zeroers will not be compiled, and all fields\n    of this structure will be initialized to NULL. In such cases, users\n    should supply their own zeroing functions for the sample sizes which\n    they intend to use.\n\n    @see PaUtilZeroerTable, PaUtilZeroer, PaUtil_SelectZeroer\n*/\nextern PaUtilZeroerTable paZeroers;\n\n#ifdef __cplusplus\n}\n#endif /* __cplusplus */\n#endif /* PA_CONVERTERS_H */\n"
  },
  {
    "path": "thirdparty/portaudio/src/common/pa_cpuload.c",
    "content": "/*\n * $Id$\n * Portable Audio I/O Library CPU Load measurement functions\n * Portable CPU load measurement facility.\n *\n * Based on the Open Source API proposed by Ross Bencina\n * Copyright (c) 2002 Ross Bencina\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n/** @file\n @ingroup common_src\n\n @brief Functions to assist in measuring the CPU utilization of a callback\n stream. Used to implement the Pa_GetStreamCpuLoad() function.\n\n @todo Dynamically calculate the coefficients used to smooth the CPU Load\n Measurements over time to provide a uniform characterisation of CPU Load\n independent of rate at which PaUtil_BeginCpuLoadMeasurement /\n PaUtil_EndCpuLoadMeasurement are called. see http://www.portaudio.com/trac/ticket/113\n*/\n\n\n#include \"pa_cpuload.h\"\n\n#include <assert.h>\n\n#include \"pa_util.h\"   /* for PaUtil_GetTime() */\n\n\nvoid PaUtil_InitializeCpuLoadMeasurer( PaUtilCpuLoadMeasurer* measurer, double sampleRate )\n{\n    assert( sampleRate > 0 );\n\n    measurer->samplingPeriod = 1. / sampleRate;\n    measurer->averageLoad = 0.;\n}\n\nvoid PaUtil_ResetCpuLoadMeasurer( PaUtilCpuLoadMeasurer* measurer )\n{\n    measurer->averageLoad = 0.;\n}\n\nvoid PaUtil_BeginCpuLoadMeasurement( PaUtilCpuLoadMeasurer* measurer )\n{\n    measurer->measurementStartTime = PaUtil_GetTime();\n}\n\n\nvoid PaUtil_EndCpuLoadMeasurement( PaUtilCpuLoadMeasurer* measurer, unsigned long framesProcessed )\n{\n    double measurementEndTime, secondsFor100Percent, measuredLoad;\n\n    if( framesProcessed > 0 ){\n        measurementEndTime = PaUtil_GetTime();\n\n        assert( framesProcessed > 0 );\n        secondsFor100Percent = framesProcessed * measurer->samplingPeriod;\n\n        measuredLoad = (measurementEndTime - measurer->measurementStartTime) / secondsFor100Percent;\n\n        /* Low pass filter the calculated CPU load to reduce jitter using a simple IIR low pass filter. */\n        /** FIXME @todo these coefficients shouldn't be hardwired see: http://www.portaudio.com/trac/ticket/113 */\n#define LOWPASS_COEFFICIENT_0   (0.9)\n#define LOWPASS_COEFFICIENT_1   (0.99999 - LOWPASS_COEFFICIENT_0)\n\n        measurer->averageLoad = (LOWPASS_COEFFICIENT_0 * measurer->averageLoad) +\n                                (LOWPASS_COEFFICIENT_1 * measuredLoad);\n    }\n}\n\n\ndouble PaUtil_GetCpuLoad( PaUtilCpuLoadMeasurer* measurer )\n{\n    return measurer->averageLoad;\n}\n"
  },
  {
    "path": "thirdparty/portaudio/src/common/pa_cpuload.h",
    "content": "#ifndef PA_CPULOAD_H\n#define PA_CPULOAD_H\n/*\n * $Id$\n * Portable Audio I/O Library CPU Load measurement functions\n * Portable CPU load measurement facility.\n *\n * Based on the Open Source API proposed by Ross Bencina\n * Copyright (c) 2002 Ross Bencina\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n/** @file\n @ingroup common_src\n\n @brief Functions to assist in measuring the CPU utilization of a callback\n stream. Used to implement the Pa_GetStreamCpuLoad() function.\n*/\n\n\n#ifdef __cplusplus\nextern \"C\"\n{\n#endif /* __cplusplus */\n\n\ntypedef struct {\n    double samplingPeriod;\n    double measurementStartTime;\n    double averageLoad;\n} PaUtilCpuLoadMeasurer; /**< @todo need better name than measurer */\n\nvoid PaUtil_InitializeCpuLoadMeasurer( PaUtilCpuLoadMeasurer* measurer, double sampleRate );\nvoid PaUtil_BeginCpuLoadMeasurement( PaUtilCpuLoadMeasurer* measurer );\nvoid PaUtil_EndCpuLoadMeasurement( PaUtilCpuLoadMeasurer* measurer, unsigned long framesProcessed );\nvoid PaUtil_ResetCpuLoadMeasurer( PaUtilCpuLoadMeasurer* measurer );\ndouble PaUtil_GetCpuLoad( PaUtilCpuLoadMeasurer* measurer );\n\n\n#ifdef __cplusplus\n}\n#endif /* __cplusplus */\n#endif /* PA_CPULOAD_H */\n"
  },
  {
    "path": "thirdparty/portaudio/src/common/pa_debugprint.c",
    "content": "/*\n * $Id: pa_log.c $\n * Portable Audio I/O Library Multi-Host API front end\n * Validate function parameters and manage multiple host APIs.\n *\n * Based on the Open Source API proposed by Ross Bencina\n * Copyright (c) 1999-2006 Ross Bencina, Phil Burk\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n/** @file\n @ingroup common_src\n\n @brief Implements log function.\n\n    PaUtil_SetLogPrintFunction can be user called to replace the provided\n    DefaultLogPrint function, which writes to stderr.\n    One can NOT pass var_args across compiler/dll boundaries as it is not\n    \"byte code/abi portable\". So the technique used here is to allocate a local\n    a static array, write in it, then callback the user with a pointer to its\n    start.\n*/\n\n#include <stdio.h>\n#include <stdarg.h>\n\n#include \"pa_debugprint.h\"\n\n// for OutputDebugStringA\n#if defined(_MSC_VER) && defined(PA_ENABLE_MSVC_DEBUG_OUTPUT)\n    #define WIN32_LEAN_AND_MEAN // exclude rare headers\n    #include \"windows.h\"\n#endif\n\n// User callback\nstatic PaUtilLogCallback userCB = NULL;\n\n// Sets user callback\nvoid PaUtil_SetDebugPrintFunction(PaUtilLogCallback cb)\n{\n    userCB = cb;\n}\n\n/*\n If your platform doesn't have vsnprintf, you are stuck with a\n VERY dangerous alternative, vsprintf (with no n)\n*/\n#if _MSC_VER\n    /* Some Windows Mobile SDKs don't define vsnprintf but all define _vsnprintf (hopefully).\n       According to MSDN \"vsnprintf is identical to _vsnprintf\". So we use _vsnprintf with MSC.\n    */\n    #define VSNPRINTF  _vsnprintf\n#else\n    #define VSNPRINTF  vsnprintf\n#endif\n\n#define PA_LOG_BUF_SIZE 2048\n\nvoid PaUtil_DebugPrint( const char *format, ... )\n{\n    // Optional logging into Output console of Visual Studio\n#if defined(_MSC_VER) && defined(PA_ENABLE_MSVC_DEBUG_OUTPUT)\n    {\n        char buf[PA_LOG_BUF_SIZE];\n        va_list ap;\n        va_start(ap, format);\n        VSNPRINTF(buf, sizeof(buf), format, ap);\n        buf[sizeof(buf)-1] = 0;\n        OutputDebugStringA(buf);\n        va_end(ap);\n    }\n#endif\n\n    // Output to User-Callback\n    if (userCB != NULL)\n    {\n        char strdump[PA_LOG_BUF_SIZE];\n        va_list ap;\n        va_start(ap, format);\n        VSNPRINTF(strdump, sizeof(strdump), format, ap);\n        strdump[sizeof(strdump)-1] = 0;\n        userCB(strdump);\n        va_end(ap);\n    }\n    else\n    // Standard output to stderr\n    {\n        va_list ap;\n        va_start(ap, format);\n        vfprintf(stderr, format, ap);\n        va_end(ap);\n        fflush(stderr);\n    }\n}\n"
  },
  {
    "path": "thirdparty/portaudio/src/common/pa_debugprint.h",
    "content": "#ifndef PA_LOG_H\n#define PA_LOG_H\n/*\n * Log file redirector function\n * Copyright (c) 1999-2006 Ross Bencina, Phil Burk\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n/** @file\n @ingroup common_src\n*/\n\n\n#ifdef __cplusplus\nextern \"C\"\n{\n#endif /* __cplusplus */\n\n\n\nvoid PaUtil_DebugPrint( const char *format, ... );\n\n\n/*\n    The basic format for log messages is described below. If you need to\n    add any log messages, please follow this format.\n\n    Function entry (void function):\n\n        \"FunctionName called.\\n\"\n\n    Function entry (non void function):\n\n        \"FunctionName called:\\n\"\n        \"\\tParam1Type param1: param1Value\\n\"\n        \"\\tParam2Type param2: param2Value\\n\"      (etc...)\n\n\n    Function exit (no return value):\n\n        \"FunctionName returned.\\n\"\n\n    Function exit (simple return value):\n\n        \"FunctionName returned:\\n\"\n        \"\\tReturnType: returnValue\\n\"\n\n    If the return type is an error code, the error text is displayed in ()\n\n    If the return type is not an error code, but has taken a special value\n    because an error occurred, then the reason for the error is shown in []\n\n    If the return type is a struct ptr, the struct is dumped.\n\n    See the code below for examples\n*/\n\n/** PA_DEBUG() provides a simple debug message printing facility. The macro\n passes it's argument to a printf-like function called PaUtil_DebugPrint()\n which prints to stderr and always flushes the stream after printing.\n Because preprocessor macros cannot directly accept variable length argument\n lists, calls to the macro must include an additional set of parenthesis, eg:\n PA_DEBUG((\"errorno: %d\", 1001 ));\n*/\n\n\n#ifdef PA_ENABLE_DEBUG_OUTPUT\n#define PA_DEBUG(x) PaUtil_DebugPrint x ;\n#else\n#define PA_DEBUG(x)\n#endif\n\n\n#ifdef PA_LOG_API_CALLS\n#define PA_LOGAPI(x) PaUtil_DebugPrint x\n\n#define PA_LOGAPI_ENTER(functionName) PaUtil_DebugPrint( functionName \" called.\\n\" )\n\n#define PA_LOGAPI_ENTER_PARAMS(functionName) PaUtil_DebugPrint( functionName \" called:\\n\" )\n\n#define PA_LOGAPI_EXIT(functionName) PaUtil_DebugPrint( functionName \" returned.\\n\" )\n\n#define PA_LOGAPI_EXIT_PAERROR( functionName, result ) \\\n    PaUtil_DebugPrint( functionName \" returned:\\n\" ); \\\n    PaUtil_DebugPrint(\"\\tPaError: %d ( %s )\\n\", result, Pa_GetErrorText( result ) )\n\n#define PA_LOGAPI_EXIT_T( functionName, resultFormatString, result ) \\\n    PaUtil_DebugPrint( functionName \" returned:\\n\" ); \\\n    PaUtil_DebugPrint(\"\\t\" resultFormatString \"\\n\", result )\n\n#define PA_LOGAPI_EXIT_PAERROR_OR_T_RESULT( functionName, positiveResultFormatString, result ) \\\n    PaUtil_DebugPrint( functionName \" returned:\\n\" ); \\\n    if( result > 0 ) \\\n        PaUtil_DebugPrint(\"\\t\" positiveResultFormatString \"\\n\", result ); \\\n    else \\\n        PaUtil_DebugPrint(\"\\tPaError: %d ( %s )\\n\", result, Pa_GetErrorText( result ) )\n#else\n#define PA_LOGAPI(x)\n#define PA_LOGAPI_ENTER(functionName)\n#define PA_LOGAPI_ENTER_PARAMS(functionName)\n#define PA_LOGAPI_EXIT(functionName)\n#define PA_LOGAPI_EXIT_PAERROR( functionName, result )\n#define PA_LOGAPI_EXIT_T( functionName, resultFormatString, result )\n#define PA_LOGAPI_EXIT_PAERROR_OR_T_RESULT( functionName, positiveResultFormatString, result )\n#endif\n\n\ntypedef void (*PaUtilLogCallback ) (const char *log);\n\n/**\n    Install user provided log function\n*/\nvoid PaUtil_SetDebugPrintFunction(PaUtilLogCallback  cb);\n\n\n\n#ifdef __cplusplus\n}\n#endif /* __cplusplus */\n#endif /* PA_LOG_H */\n"
  },
  {
    "path": "thirdparty/portaudio/src/common/pa_dither.c",
    "content": "/*\n * $Id$\n * Portable Audio I/O Library triangular dither generator\n *\n * Based on the Open Source API proposed by Ross Bencina\n * Copyright (c) 1999-2002 Phil Burk, Ross Bencina\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n/** @file\n @ingroup common_src\n\n @brief Functions for generating dither noise\n*/\n\n#include \"pa_types.h\"\n#include \"pa_dither.h\"\n\n\n/* Note that the linear congruential algorithm requires 32 bit integers\n * because it uses arithmetic overflow. So use PaUint32 instead of\n * unsigned long so it will work on 64 bit systems.\n */\n\n#define PA_DITHER_BITS_   (15)\n\n\nvoid PaUtil_InitializeTriangularDitherState( PaUtilTriangularDitherGenerator *state )\n{\n    state->previous = 0;\n    state->randSeed1 = 22222;\n    state->randSeed2 = 5555555;\n}\n\n\nPaInt32 PaUtil_Generate16BitTriangularDither( PaUtilTriangularDitherGenerator *state )\n{\n    PaInt32 current, highPass;\n\n    /* Generate two random numbers. */\n    state->randSeed1 = (state->randSeed1 * 196314165) + 907633515;\n    state->randSeed2 = (state->randSeed2 * 196314165) + 907633515;\n\n    /* Generate triangular distribution about 0.\n     * Shift before adding to prevent overflow which would skew the distribution.\n     * Also shift an extra bit for the high pass filter.\n     */\n#define DITHER_SHIFT_  ((sizeof(PaInt32)*8 - PA_DITHER_BITS_) + 1)\n\n    current = (((PaInt32)state->randSeed1)>>DITHER_SHIFT_) +\n              (((PaInt32)state->randSeed2)>>DITHER_SHIFT_);\n\n    /* High pass filter to reduce audibility. */\n    highPass = current - state->previous;\n    state->previous = current;\n    return highPass;\n}\n\n\n/* Multiply by PA_FLOAT_DITHER_SCALE_ to get a float between -2.0 and +1.99999 */\n#define PA_FLOAT_DITHER_SCALE_  (1.0f / ((1<<PA_DITHER_BITS_)-1))\nstatic const float const_float_dither_scale_ = PA_FLOAT_DITHER_SCALE_;\n\nfloat PaUtil_GenerateFloatTriangularDither( PaUtilTriangularDitherGenerator *state )\n{\n    PaInt32 current, highPass;\n\n    /* Generate two random numbers. */\n    state->randSeed1 = (state->randSeed1 * 196314165) + 907633515;\n    state->randSeed2 = (state->randSeed2 * 196314165) + 907633515;\n\n    /* Generate triangular distribution about 0.\n     * Shift before adding to prevent overflow which would skew the distribution.\n     * Also shift an extra bit for the high pass filter.\n     */\n    current = (((PaInt32)state->randSeed1)>>DITHER_SHIFT_) +\n              (((PaInt32)state->randSeed2)>>DITHER_SHIFT_);\n\n    /* High pass filter to reduce audibility. */\n    highPass = current - state->previous;\n    state->previous = current;\n    return ((float)highPass) * const_float_dither_scale_;\n}\n\n\n/*\nThe following alternate dither algorithms (from musicdsp.org) could be\nconsidered\n*/\n\n/*Noise shaped dither  (March 2000)\n-------------------\n\nThis is a simple implementation of highpass triangular-PDF dither with\n2nd-order noise shaping, for use when truncating floating point audio\ndata to fixed point.\n\nThe noise shaping lowers the noise floor by 11dB below 5kHz (@ 44100Hz\nsample rate) compared to triangular-PDF dither. The code below assumes\ninput data is in the range +1 to -1 and doesn't check for overloads!\n\nTo save time when generating dither for multiple channels you can do\nthings like this:  r3=(r1 & 0x7F)<<8; instead of calling rand() again.\n\n\n\n  int   r1, r2;                //rectangular-PDF random numbers\n  float s1, s2;                //error feedback buffers\n  float s = 0.5f;              //set to 0.0f for no noise shaping\n  float w = pow(2.0,bits-1);   //word length (usually bits=16)\n  float wi= 1.0f/w;\n  float d = wi / RAND_MAX;     //dither amplitude (2 lsb)\n  float o = wi * 0.5f;         //remove dc offset\n  float in, tmp;\n  int   out;\n\n\n//for each sample...\n\n  r2=r1;                               //can make HP-TRI dither by\n  r1=rand();                           //subtracting previous rand()\n\n  in += s * (s1 + s1 - s2);            //error feedback\n  tmp = in + o + d * (float)(r1 - r2); //dc offset and dither\n\n  out = (int)(w * tmp);                //truncate downwards\n  if(tmp<0.0f) out--;                  //this is faster than floor()\n\n  s2 = s1;\n  s1 = in - wi * (float)out;           //error\n\n\n\n--\npaul.kellett@maxim.abel.co.uk\nhttp://www.maxim.abel.co.uk\n*/\n\n\n/*\n16-to-8-bit first-order dither\n\nType : First order error feedforward dithering code\nReferences : Posted by Jon Watte\n\nNotes :\nThis is about as simple a dithering algorithm as you can implement, but it's\nlikely to sound better than just truncating to N bits.\n\nNote that you might not want to carry forward the full difference for infinity.\nIt's probably likely that the worst performance hit comes from the saturation\nconditionals, which can be avoided with appropriate instructions on many DSPs\nand integer SIMD type instructions, or CMOV.\n\nLast, if sound quality is paramount (such as when going from > 16 bits to 16\nbits) you probably want to use a higher-order dither function found elsewhere\non this site.\n\n\nCode :\n// This code will down-convert and dither a 16-bit signed short\n// mono signal into an 8-bit unsigned char signal, using a first\n// order forward-feeding error term dither.\n\n#define uchar unsigned char\n\nvoid dither_one_channel_16_to_8( short * input, uchar * output, int count, int * memory )\n{\n  int m = *memory;\n  while( count-- > 0 ) {\n    int i = *input++;\n    i += m;\n    int j = i + 32768 - 128;\n    uchar o;\n    if( j < 0 ) {\n      o = 0;\n    }\n    else if( j > 65535 ) {\n      o = 255;\n    }\n    else {\n      o = (uchar)((j>>8)&0xff);\n    }\n    m = ((j-32768+128)-i);\n    *output++ = o;\n  }\n  *memory = m;\n}\n*/\n"
  },
  {
    "path": "thirdparty/portaudio/src/common/pa_dither.h",
    "content": "#ifndef PA_DITHER_H\n#define PA_DITHER_H\n/*\n * $Id$\n * Portable Audio I/O Library triangular dither generator\n *\n * Based on the Open Source API proposed by Ross Bencina\n * Copyright (c) 1999-2002 Phil Burk, Ross Bencina\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n/** @file\n @ingroup common_src\n\n @brief Functions for generating dither noise\n*/\n\n#include \"pa_types.h\"\n\n\n#ifdef __cplusplus\nextern \"C\"\n{\n#endif /* __cplusplus */\n\n/* Note that the linear congruential algorithm requires 32 bit integers\n * because it uses arithmetic overflow. So use PaUint32 instead of\n * unsigned long so it will work on 64 bit systems.\n */\n\n/** @brief State needed to generate a dither signal */\ntypedef struct PaUtilTriangularDitherGenerator{\n    PaUint32 previous;\n    PaUint32 randSeed1;\n    PaUint32 randSeed2;\n} PaUtilTriangularDitherGenerator;\n\n\n/** @brief Initialize dither state */\nvoid PaUtil_InitializeTriangularDitherState( PaUtilTriangularDitherGenerator *ditherState );\n\n\n/**\n @brief Calculate 2 LSB dither signal with a triangular distribution.\n Ranged for adding to a 1 bit right-shifted 32 bit integer\n prior to >>15. eg:\n<pre>\n    signed long in = *\n    signed long dither = PaUtil_Generate16BitTriangularDither( ditherState );\n    signed short out = (signed short)(((in>>1) + dither) >> 15);\n</pre>\n @return\n A signed 32-bit integer with a range of +32767 to -32768\n*/\nPaInt32 PaUtil_Generate16BitTriangularDither( PaUtilTriangularDitherGenerator *ditherState );\n\n\n/**\n @brief Calculate 2 LSB dither signal with a triangular distribution.\n Ranged for adding to a pre-scaled float.\n<pre>\n    float in = *\n    float dither = PaUtil_GenerateFloatTriangularDither( ditherState );\n    // use smaller scaler to prevent overflow when we add the dither\n    signed short out = (signed short)(in*(32766.0f) + dither );\n</pre>\n @return\n A float with a range of -2.0 to +1.99999.\n*/\nfloat PaUtil_GenerateFloatTriangularDither( PaUtilTriangularDitherGenerator *ditherState );\n\n\n\n#ifdef __cplusplus\n}\n#endif /* __cplusplus */\n#endif /* PA_DITHER_H */\n"
  },
  {
    "path": "thirdparty/portaudio/src/common/pa_endianness.h",
    "content": "#ifndef PA_ENDIANNESS_H\n#define PA_ENDIANNESS_H\n/*\n * $Id$\n * Portable Audio I/O Library current platform endianness macros\n *\n * Based on the Open Source API proposed by Ross Bencina\n * Copyright (c) 1999-2002 Phil Burk, Ross Bencina\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n/** @file\n @ingroup common_src\n\n @brief Configure endianness symbols for the target processor.\n\n Arrange for either the PA_LITTLE_ENDIAN or PA_BIG_ENDIAN preprocessor symbols\n to be defined. The one that is defined reflects the endianness of the target\n platform and may be used to implement conditional compilation of byte-order\n dependent code.\n\n If either PA_LITTLE_ENDIAN or PA_BIG_ENDIAN is defined already, then no attempt\n is made to override that setting. This may be useful if you have a better way\n of determining the platform's endianness. The autoconf mechanism uses this for\n example.\n\n A PA_VALIDATE_ENDIANNESS macro is provided to compare the compile time\n and runtime endianness and raise an assertion if they don't match.\n*/\n\n\n#ifdef __cplusplus\nextern \"C\"\n{\n#endif /* __cplusplus */\n\n/* If this is an apple, we need to do detect endianness this way */\n#if defined(__APPLE__)\n    /* we need to do some endian detection that is sensitive to hardware arch */\n    #if defined(__LITTLE_ENDIAN__)\n        #if !defined( PA_LITTLE_ENDIAN )\n            #define PA_LITTLE_ENDIAN\n        #endif\n        #if defined( PA_BIG_ENDIAN )\n            #undef PA_BIG_ENDIAN\n        #endif\n    #else\n        #if !defined( PA_BIG_ENDIAN )\n            #define PA_BIG_ENDIAN\n        #endif\n        #if defined( PA_LITTLE_ENDIAN )\n            #undef PA_LITTLE_ENDIAN\n        #endif\n    #endif\n#else\n    /* this is not an apple, so first check the existing defines, and, failing that,\n       detect well-known architectures. */\n\n    #if defined(PA_LITTLE_ENDIAN) || defined(PA_BIG_ENDIAN)\n        /* endianness define has been set externally, such as by autoconf */\n\n        #if defined(PA_LITTLE_ENDIAN) && defined(PA_BIG_ENDIAN)\n        #error both PA_LITTLE_ENDIAN and PA_BIG_ENDIAN have been defined externally to pa_endianness.h - only one endianness at a time please\n        #endif\n\n    #else\n        /* endianness define has not been set externally */\n\n        /* set PA_LITTLE_ENDIAN or PA_BIG_ENDIAN by testing well known platform specific defines */\n\n        #if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__) || defined(LITTLE_ENDIAN) || defined(__i386) || defined(_M_IX86) || defined(__x86_64__)\n            #define PA_LITTLE_ENDIAN /* win32, assume intel byte order */\n        #else\n            #define PA_BIG_ENDIAN\n        #endif\n    #endif\n\n    #if !defined(PA_LITTLE_ENDIAN) && !defined(PA_BIG_ENDIAN)\n        /*\n         If the following error is raised, you either need to modify the code above\n         to automatically determine the endianness from other symbols defined on your\n         platform, or define either PA_LITTLE_ENDIAN or PA_BIG_ENDIAN externally.\n        */\n        #error pa_endianness.h was unable to automatically determine the endianness of the target platform\n    #endif\n\n#endif\n\n\n/* PA_VALIDATE_ENDIANNESS compares the compile time and runtime endianness,\n and raises an assertion if they don't match. <assert.h> must be included in\n the context in which this macro is used.\n*/\n#if defined(NDEBUG)\n    #define PA_VALIDATE_ENDIANNESS\n#else\n    #if defined(PA_LITTLE_ENDIAN)\n        #define PA_VALIDATE_ENDIANNESS \\\n        { \\\n            const long nativeOne = 1; \\\n            assert( \"PortAudio: compile time and runtime endianness don't match\" && (((char *)&nativeOne)[0]) == 1 ); \\\n        }\n    #elif defined(PA_BIG_ENDIAN)\n        #define PA_VALIDATE_ENDIANNESS \\\n        { \\\n            const long nativeOne = 1; \\\n            assert( \"PortAudio: compile time and runtime endianness don't match\" && (((char *)&nativeOne)[0]) == 0 ); \\\n        }\n    #endif\n#endif\n\n\n#ifdef __cplusplus\n}\n#endif /* __cplusplus */\n#endif /* PA_ENDIANNESS_H */\n"
  },
  {
    "path": "thirdparty/portaudio/src/common/pa_front.c",
    "content": "/*\n * $Id$\n * Portable Audio I/O Library Multi-Host API front end\n * Validate function parameters and manage multiple host APIs.\n *\n * Based on the Open Source API proposed by Ross Bencina\n * Copyright (c) 1999-2008 Ross Bencina, Phil Burk\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n/** @file\n @ingroup common_src\n\n @brief Implements PortAudio API functions defined in portaudio.h, checks\n some errors, delegates platform-specific behavior to host API implementations.\n\n Implements the functions defined in the PortAudio API (portaudio.h),\n validates some parameters and checks for state inconsistencies before\n forwarding API requests to specific Host API implementations (via the\n interface declared in pa_hostapi.h), and Streams (via the interface\n declared in pa_stream.h).\n\n This file manages initialization and termination of Host API\n implementations via initializer functions stored in the paHostApiInitializers\n global array (usually defined in an os-specific pa_[os]_hostapis.c file).\n\n This file maintains a list of all open streams and closes them at Pa_Terminate().\n\n Some utility functions declared in pa_util.h are implemented in this file.\n\n All PortAudio API functions can be conditionally compiled with logging code.\n To compile with logging, define the PA_LOG_API_CALLS precompiler symbol.\n*/\n\n\n#include <stdio.h>\n#include <memory.h>\n#include <string.h>\n#include <stdlib.h> /* needed for strtol() */\n#include <assert.h> /* needed by PA_VALIDATE_ENDIANNESS */\n\n#include \"portaudio.h\"\n#include \"pa_util.h\"\n#include \"pa_endianness.h\"\n#include \"pa_types.h\"\n#include \"pa_hostapi.h\"\n#include \"pa_stream.h\"\n#include \"pa_trace.h\" /* still useful?*/\n#include \"pa_debugprint.h\"\n\n#ifndef PA_GIT_REVISION\n#include \"pa_gitrevision.h\"\n#endif\n\n/**\n * This is incremented if we make incompatible API changes.\n * This version scheme is based loosely on http://semver.org/\n */\n#define paVersionMajor     19\n\n/**\n * This is incremented when we add functionality in a backwards-compatible manner.\n * Or it is set to zero when paVersionMajor is incremented.\n */\n#define paVersionMinor      7\n\n/**\n * This is incremented when we make backwards-compatible bug fixes.\n * Or it is set to zero when paVersionMinor changes.\n */\n#define paVersionSubMinor   0\n\n/**\n * This is a combination of paVersionMajor, paVersionMinor and paVersionSubMinor.\n * It will always increase so that version numbers can be compared as integers to\n * see which is later.\n */\n#define paVersion  paMakeVersionNumber(paVersionMajor, paVersionMinor, paVersionSubMinor)\n\n#define STRINGIFY(x) #x\n#define TOSTRING(x) STRINGIFY(x)\n\n#define PA_VERSION_STRING_ TOSTRING(paVersionMajor) \".\" TOSTRING(paVersionMinor) \".\" TOSTRING(paVersionSubMinor)\n#define PA_VERSION_TEXT_   \"PortAudio V\" PA_VERSION_STRING_ \"-devel, revision \" TOSTRING(PA_GIT_REVISION)\n\nint Pa_GetVersion( void )\n{\n    return paVersion;\n}\n\nconst char* Pa_GetVersionText( void )\n{\n    return PA_VERSION_TEXT_;\n}\n\nstatic PaVersionInfo versionInfo_ = {\n    /*.versionMajor =*/ paVersionMajor,\n    /*.versionMinor =*/ paVersionMinor,\n    /*.versionSubMinor =*/ paVersionSubMinor,\n    /*.versionControlRevision =*/ TOSTRING(PA_GIT_REVISION),\n    /*.versionText =*/ PA_VERSION_TEXT_\n};\n\nconst PaVersionInfo* Pa_GetVersionInfo( void )\n{\n    return &versionInfo_;\n}\n\n#define PA_LAST_HOST_ERROR_TEXT_LENGTH_  1024\n\nstatic char lastHostErrorText_[ PA_LAST_HOST_ERROR_TEXT_LENGTH_ + 1 ] = {0};\n\nstatic PaHostErrorInfo lastHostErrorInfo_ = { (PaHostApiTypeId)-1, 0, lastHostErrorText_ };\n\n\nvoid PaUtil_SetLastHostErrorInfo( PaHostApiTypeId hostApiType, long errorCode,\n        const char *errorText )\n{\n    lastHostErrorInfo_.hostApiType = hostApiType;\n    lastHostErrorInfo_.errorCode = errorCode;\n\n    strncpy( lastHostErrorText_, errorText, PA_LAST_HOST_ERROR_TEXT_LENGTH_ );\n}\n\n\n\nstatic PaUtilHostApiRepresentation **hostApis_ = 0;\nstatic int hostApisCount_ = 0;\nstatic int defaultHostApiIndex_ = 0;\nstatic int initializationCount_ = 0;\nstatic int deviceCount_ = 0;\n\nPaUtilStreamRepresentation *firstOpenStream_ = NULL;\n\n\n#define PA_IS_INITIALISED_ (initializationCount_ != 0)\n\n\nstatic int CountHostApiInitializers( void )\n{\n    int result = 0;\n\n    while( paHostApiInitializers[ result ] != 0 )\n        ++result;\n    return result;\n}\n\n\nstatic void TerminateHostApis( void )\n{\n    /* terminate in reverse order from initialization */\n    PA_DEBUG((\"TerminateHostApis in \\n\"));\n\n    while( hostApisCount_ > 0 )\n    {\n        --hostApisCount_;\n        hostApis_[hostApisCount_]->Terminate( hostApis_[hostApisCount_] );\n    }\n    hostApisCount_ = 0;\n    defaultHostApiIndex_ = 0;\n    deviceCount_ = 0;\n\n    if( hostApis_ != 0 )\n        PaUtil_FreeMemory( hostApis_ );\n    hostApis_ = 0;\n\n    PA_DEBUG((\"TerminateHostApis out\\n\"));\n}\n\n\nstatic PaError InitializeHostApis( void )\n{\n    PaError result = paNoError;\n    int i, initializerCount, baseDeviceIndex;\n\n    initializerCount = CountHostApiInitializers();\n\n    hostApis_ = (PaUtilHostApiRepresentation**)PaUtil_AllocateMemory(\n            sizeof(PaUtilHostApiRepresentation*) * initializerCount );\n    if( !hostApis_ )\n    {\n        result = paInsufficientMemory;\n        goto error;\n    }\n\n    hostApisCount_ = 0;\n    defaultHostApiIndex_ = -1; /* indicates that we haven't determined the default host API yet */\n    deviceCount_ = 0;\n    baseDeviceIndex = 0;\n\n    for( i=0; i< initializerCount; ++i )\n    {\n        hostApis_[hostApisCount_] = NULL;\n\n        PA_DEBUG(( \"before paHostApiInitializers[%d].\\n\",i));\n\n        result = paHostApiInitializers[i]( &hostApis_[hostApisCount_], hostApisCount_ );\n        if( result != paNoError )\n            goto error;\n\n        PA_DEBUG(( \"after paHostApiInitializers[%d].\\n\",i));\n\n        if( hostApis_[hostApisCount_] )\n        {\n            PaUtilHostApiRepresentation* hostApi = hostApis_[hostApisCount_];\n            assert( hostApi->info.defaultInputDevice < hostApi->info.deviceCount );\n            assert( hostApi->info.defaultOutputDevice < hostApi->info.deviceCount );\n\n            /* the first successfully initialized host API with a default input *or*\n               output device is used as the default host API.\n            */\n            if( (defaultHostApiIndex_ == -1) &&\n                    ( hostApi->info.defaultInputDevice != paNoDevice\n                        || hostApi->info.defaultOutputDevice != paNoDevice ) )\n            {\n                defaultHostApiIndex_ = hostApisCount_;\n            }\n\n            hostApi->privatePaFrontInfo.baseDeviceIndex = baseDeviceIndex;\n\n            if( hostApi->info.defaultInputDevice != paNoDevice )\n                hostApi->info.defaultInputDevice += baseDeviceIndex;\n\n            if( hostApi->info.defaultOutputDevice != paNoDevice )\n                hostApi->info.defaultOutputDevice += baseDeviceIndex;\n\n            baseDeviceIndex += hostApi->info.deviceCount;\n            deviceCount_ += hostApi->info.deviceCount;\n\n            ++hostApisCount_;\n        }\n    }\n\n    /* if no host APIs have devices, the default host API is the first initialized host API */\n    if( defaultHostApiIndex_ == -1 )\n        defaultHostApiIndex_ = 0;\n\n    return result;\n\nerror:\n    TerminateHostApis();\n    return result;\n}\n\n\n/*\n    FindHostApi() finds the index of the host api to which\n    <device> belongs and returns it. if <hostSpecificDeviceIndex> is\n    non-null, the host specific device index is returned in it.\n    returns -1 if <device> is out of range.\n\n*/\nstatic int FindHostApi( PaDeviceIndex device, int *hostSpecificDeviceIndex )\n{\n    int i=0;\n\n    if( !PA_IS_INITIALISED_ )\n        return -1;\n\n    if( device < 0 )\n        return -1;\n\n    while( i < hostApisCount_\n            && device >= hostApis_[i]->info.deviceCount )\n    {\n\n        device -= hostApis_[i]->info.deviceCount;\n        ++i;\n    }\n\n    if( i >= hostApisCount_ )\n        return -1;\n\n    if( hostSpecificDeviceIndex )\n        *hostSpecificDeviceIndex = device;\n\n    return i;\n}\n\n\nstatic void AddOpenStream( PaStream* stream )\n{\n    ((PaUtilStreamRepresentation*)stream)->nextOpenStream = firstOpenStream_;\n    firstOpenStream_ = (PaUtilStreamRepresentation*)stream;\n}\n\n\nstatic void RemoveOpenStream( PaStream* stream )\n{\n    PaUtilStreamRepresentation *previous = NULL;\n    PaUtilStreamRepresentation *current = firstOpenStream_;\n\n    while( current != NULL )\n    {\n        if( ((PaStream*)current) == stream )\n        {\n            if( previous == NULL )\n            {\n                firstOpenStream_ = current->nextOpenStream;\n            }\n            else\n            {\n                previous->nextOpenStream = current->nextOpenStream;\n            }\n            return;\n        }\n        else\n        {\n            previous = current;\n            current = current->nextOpenStream;\n        }\n    }\n}\n\n\nstatic void CloseOpenStreams( void )\n{\n    /* we call Pa_CloseStream() here to ensure that the same destruction\n        logic is used for automatically closed streams */\n\n    while( firstOpenStream_ != NULL )\n        Pa_CloseStream( firstOpenStream_ );\n}\n\n\nPaError Pa_Initialize( void )\n{\n    PaError result;\n\n    PA_LOGAPI_ENTER( \"Pa_Initialize\" );\n\n    if( PA_IS_INITIALISED_ )\n    {\n        ++initializationCount_;\n        result = paNoError;\n    }\n    else\n    {\n        PA_VALIDATE_TYPE_SIZES;\n        PA_VALIDATE_ENDIANNESS;\n\n        PaUtil_InitializeClock();\n        PaUtil_ResetTraceMessages();\n\n        result = InitializeHostApis();\n        if( result == paNoError )\n            ++initializationCount_;\n    }\n\n    PA_LOGAPI_EXIT_PAERROR( \"Pa_Initialize\", result );\n\n    return result;\n}\n\n\nPaError Pa_Terminate( void )\n{\n    PaError result;\n\n    PA_LOGAPI_ENTER( \"Pa_Terminate\" );\n\n    if( PA_IS_INITIALISED_ )\n    {\n        // leave initializationCount_>0 so that Pa_CloseStream() can execute\n        if( initializationCount_ == 1 )\n        {\n            CloseOpenStreams();\n\n            TerminateHostApis();\n\n            PaUtil_DumpTraceMessages();\n        }\n        --initializationCount_;\n        result = paNoError;\n    }\n    else\n    {\n        result=  paNotInitialized;\n    }\n\n    PA_LOGAPI_EXIT_PAERROR( \"Pa_Terminate\", result );\n\n    return result;\n}\n\n\nconst PaHostErrorInfo* Pa_GetLastHostErrorInfo( void )\n{\n    return &lastHostErrorInfo_;\n}\n\n\nconst char *Pa_GetErrorText( PaError errorCode )\n{\n    const char *result;\n\n    switch( errorCode )\n    {\n    case paNoError:                  result = \"Success\"; break;\n    case paNotInitialized:           result = \"PortAudio not initialized\"; break;\n    /** @todo could catenate the last host error text to result in the case of paUnanticipatedHostError. see: http://www.portaudio.com/trac/ticket/114 */\n    case paUnanticipatedHostError:   result = \"Unanticipated host error\"; break;\n    case paInvalidChannelCount:      result = \"Invalid number of channels\"; break;\n    case paInvalidSampleRate:        result = \"Invalid sample rate\"; break;\n    case paInvalidDevice:            result = \"Invalid device\"; break;\n    case paInvalidFlag:              result = \"Invalid flag\"; break;\n    case paSampleFormatNotSupported: result = \"Sample format not supported\"; break;\n    case paBadIODeviceCombination:   result = \"Illegal combination of I/O devices\"; break;\n    case paInsufficientMemory:       result = \"Insufficient memory\"; break;\n    case paBufferTooBig:             result = \"Buffer too big\"; break;\n    case paBufferTooSmall:           result = \"Buffer too small\"; break;\n    case paNullCallback:             result = \"No callback routine specified\"; break;\n    case paBadStreamPtr:             result = \"Invalid stream pointer\"; break;\n    case paTimedOut:                 result = \"Wait timed out\"; break;\n    case paInternalError:            result = \"Internal PortAudio error\"; break;\n    case paDeviceUnavailable:        result = \"Device unavailable\"; break;\n    case paIncompatibleHostApiSpecificStreamInfo:   result = \"Incompatible host API specific stream info\"; break;\n    case paStreamIsStopped:          result = \"Stream is stopped\"; break;\n    case paStreamIsNotStopped:       result = \"Stream is not stopped\"; break;\n    case paInputOverflowed:          result = \"Input overflowed\"; break;\n    case paOutputUnderflowed:        result = \"Output underflowed\"; break;\n    case paHostApiNotFound:          result = \"Host API not found\"; break;\n    case paInvalidHostApi:           result = \"Invalid host API\"; break;\n    case paCanNotReadFromACallbackStream:       result = \"Can't read from a callback stream\"; break;\n    case paCanNotWriteToACallbackStream:        result = \"Can't write to a callback stream\"; break;\n    case paCanNotReadFromAnOutputOnlyStream:    result = \"Can't read from an output only stream\"; break;\n    case paCanNotWriteToAnInputOnlyStream:      result = \"Can't write to an input only stream\"; break;\n    case paIncompatibleStreamHostApi: result = \"Incompatible stream host API\"; break;\n    case paBadBufferPtr:             result = \"Bad buffer pointer\"; break;\n    default:\n        if( errorCode > 0 )\n            result = \"Invalid error code (value greater than zero)\";\n        else\n            result = \"Invalid error code\";\n        break;\n    }\n    return result;\n}\n\n\nPaHostApiIndex Pa_HostApiTypeIdToHostApiIndex( PaHostApiTypeId type )\n{\n    PaHostApiIndex result;\n    int i;\n\n    PA_LOGAPI_ENTER_PARAMS( \"Pa_HostApiTypeIdToHostApiIndex\" );\n    PA_LOGAPI((\"\\tPaHostApiTypeId type: %d\\n\", type ));\n\n    if( !PA_IS_INITIALISED_ )\n    {\n        result = paNotInitialized;\n    }\n    else\n    {\n        result = paHostApiNotFound;\n\n        for( i=0; i < hostApisCount_; ++i )\n        {\n            if( hostApis_[i]->info.type == type )\n            {\n                result = i;\n                break;\n            }\n        }\n    }\n\n    PA_LOGAPI_EXIT_PAERROR_OR_T_RESULT( \"Pa_HostApiTypeIdToHostApiIndex\", \"PaHostApiIndex: %d\", result );\n\n    return result;\n}\n\n\nPaError PaUtil_GetHostApiRepresentation( struct PaUtilHostApiRepresentation **hostApi,\n        PaHostApiTypeId type )\n{\n    PaError result;\n    int i;\n\n    if( !PA_IS_INITIALISED_ )\n    {\n        result = paNotInitialized;\n    }\n    else\n    {\n        result = paHostApiNotFound;\n\n        for( i=0; i < hostApisCount_; ++i )\n        {\n            if( hostApis_[i]->info.type == type )\n            {\n                *hostApi = hostApis_[i];\n                result = paNoError;\n                break;\n            }\n        }\n    }\n\n    return result;\n}\n\n\nPaError PaUtil_DeviceIndexToHostApiDeviceIndex(\n        PaDeviceIndex *hostApiDevice, PaDeviceIndex device, struct PaUtilHostApiRepresentation *hostApi )\n{\n    PaError result;\n    PaDeviceIndex x;\n\n    x = device - hostApi->privatePaFrontInfo.baseDeviceIndex;\n\n    if( x < 0 || x >= hostApi->info.deviceCount )\n    {\n        result = paInvalidDevice;\n    }\n    else\n    {\n        *hostApiDevice = x;\n        result = paNoError;\n    }\n\n    return result;\n}\n\n\nPaHostApiIndex Pa_GetHostApiCount( void )\n{\n    int result;\n\n    PA_LOGAPI_ENTER( \"Pa_GetHostApiCount\" );\n\n    if( !PA_IS_INITIALISED_ )\n    {\n        result = paNotInitialized;\n    }\n    else\n    {\n        result = hostApisCount_;\n    }\n\n    PA_LOGAPI_EXIT_PAERROR_OR_T_RESULT( \"Pa_GetHostApiCount\", \"PaHostApiIndex: %d\", result );\n\n    return result;\n}\n\n\nPaHostApiIndex Pa_GetDefaultHostApi( void )\n{\n    int result;\n\n    PA_LOGAPI_ENTER( \"Pa_GetDefaultHostApi\" );\n\n    if( !PA_IS_INITIALISED_ )\n    {\n        result = paNotInitialized;\n    }\n    else\n    {\n        result = defaultHostApiIndex_;\n\n        /* internal consistency check: make sure that the default host api\n         index is within range */\n\n        if( result < 0 || result >= hostApisCount_ )\n        {\n            result = paInternalError;\n        }\n    }\n\n    PA_LOGAPI_EXIT_PAERROR_OR_T_RESULT( \"Pa_GetDefaultHostApi\", \"PaHostApiIndex: %d\", result );\n\n    return result;\n}\n\n\nconst PaHostApiInfo* Pa_GetHostApiInfo( PaHostApiIndex hostApi )\n{\n    PaHostApiInfo *info;\n\n    PA_LOGAPI_ENTER_PARAMS( \"Pa_GetHostApiInfo\" );\n    PA_LOGAPI((\"\\tPaHostApiIndex hostApi: %d\\n\", hostApi ));\n\n    if( !PA_IS_INITIALISED_ )\n    {\n        info = NULL;\n\n        PA_LOGAPI((\"Pa_GetHostApiInfo returned:\\n\" ));\n        PA_LOGAPI((\"\\tPaHostApiInfo*: NULL [ PortAudio not initialized ]\\n\" ));\n\n    }\n    else if( hostApi < 0 || hostApi >= hostApisCount_ )\n    {\n        info = NULL;\n\n        PA_LOGAPI((\"Pa_GetHostApiInfo returned:\\n\" ));\n        PA_LOGAPI((\"\\tPaHostApiInfo*: NULL [ hostApi out of range ]\\n\" ));\n\n    }\n    else\n    {\n        info = &hostApis_[hostApi]->info;\n\n        PA_LOGAPI((\"Pa_GetHostApiInfo returned:\\n\" ));\n        PA_LOGAPI((\"\\tPaHostApiInfo*: 0x%p\\n\", info ));\n        PA_LOGAPI((\"\\t{\\n\" ));\n        PA_LOGAPI((\"\\t\\tint structVersion: %d\\n\", info->structVersion ));\n        PA_LOGAPI((\"\\t\\tPaHostApiTypeId type: %d\\n\", info->type ));\n        PA_LOGAPI((\"\\t\\tconst char *name: %s\\n\", info->name ));\n        PA_LOGAPI((\"\\t}\\n\" ));\n\n    }\n\n    return info;\n}\n\n\nPaDeviceIndex Pa_HostApiDeviceIndexToDeviceIndex( PaHostApiIndex hostApi, int hostApiDeviceIndex )\n{\n    PaDeviceIndex result;\n\n    PA_LOGAPI_ENTER_PARAMS( \"Pa_HostApiDeviceIndexToPaDeviceIndex\" );\n    PA_LOGAPI((\"\\tPaHostApiIndex hostApi: %d\\n\", hostApi ));\n    PA_LOGAPI((\"\\tint hostApiDeviceIndex: %d\\n\", hostApiDeviceIndex ));\n\n    if( !PA_IS_INITIALISED_ )\n    {\n        result = paNotInitialized;\n    }\n    else\n    {\n        if( hostApi < 0 || hostApi >= hostApisCount_ )\n        {\n            result = paInvalidHostApi;\n        }\n        else\n        {\n            if( hostApiDeviceIndex < 0 ||\n                    hostApiDeviceIndex >= hostApis_[hostApi]->info.deviceCount )\n            {\n                result = paInvalidDevice;\n            }\n            else\n            {\n                result = hostApis_[hostApi]->privatePaFrontInfo.baseDeviceIndex + hostApiDeviceIndex;\n            }\n        }\n    }\n\n    PA_LOGAPI_EXIT_PAERROR_OR_T_RESULT( \"Pa_HostApiDeviceIndexToPaDeviceIndex\", \"PaDeviceIndex: %d\", result );\n\n    return result;\n}\n\n\nPaDeviceIndex Pa_GetDeviceCount( void )\n{\n    PaDeviceIndex result;\n\n    PA_LOGAPI_ENTER( \"Pa_GetDeviceCount\" );\n\n    if( !PA_IS_INITIALISED_ )\n    {\n        result = paNotInitialized;\n    }\n    else\n    {\n        result = deviceCount_;\n    }\n\n    PA_LOGAPI_EXIT_PAERROR_OR_T_RESULT( \"Pa_GetDeviceCount\", \"PaDeviceIndex: %d\", result );\n\n    return result;\n}\n\n\nPaDeviceIndex Pa_GetDefaultInputDevice( void )\n{\n    PaHostApiIndex hostApi;\n    PaDeviceIndex result;\n\n    PA_LOGAPI_ENTER( \"Pa_GetDefaultInputDevice\" );\n\n    hostApi = Pa_GetDefaultHostApi();\n    if( hostApi < 0 )\n    {\n        result = paNoDevice;\n    }\n    else\n    {\n        result = hostApis_[hostApi]->info.defaultInputDevice;\n    }\n\n    PA_LOGAPI_EXIT_T( \"Pa_GetDefaultInputDevice\", \"PaDeviceIndex: %d\", result );\n\n    return result;\n}\n\n\nPaDeviceIndex Pa_GetDefaultOutputDevice( void )\n{\n    PaHostApiIndex hostApi;\n    PaDeviceIndex result;\n\n    PA_LOGAPI_ENTER( \"Pa_GetDefaultOutputDevice\" );\n\n    hostApi = Pa_GetDefaultHostApi();\n    if( hostApi < 0 )\n    {\n        result = paNoDevice;\n    }\n    else\n    {\n        result = hostApis_[hostApi]->info.defaultOutputDevice;\n    }\n\n    PA_LOGAPI_EXIT_T( \"Pa_GetDefaultOutputDevice\", \"PaDeviceIndex: %d\", result );\n\n    return result;\n}\n\n\nconst PaDeviceInfo* Pa_GetDeviceInfo( PaDeviceIndex device )\n{\n    int hostSpecificDeviceIndex;\n    int hostApiIndex = FindHostApi( device, &hostSpecificDeviceIndex );\n    PaDeviceInfo *result;\n\n\n    PA_LOGAPI_ENTER_PARAMS( \"Pa_GetDeviceInfo\" );\n    PA_LOGAPI((\"\\tPaDeviceIndex device: %d\\n\", device ));\n\n    if( hostApiIndex < 0 )\n    {\n        result = NULL;\n\n        PA_LOGAPI((\"Pa_GetDeviceInfo returned:\\n\" ));\n        PA_LOGAPI((\"\\tPaDeviceInfo* NULL [ invalid device index ]\\n\" ));\n\n    }\n    else\n    {\n        result = hostApis_[hostApiIndex]->deviceInfos[ hostSpecificDeviceIndex ];\n\n        PA_LOGAPI((\"Pa_GetDeviceInfo returned:\\n\" ));\n        PA_LOGAPI((\"\\tPaDeviceInfo*: 0x%p:\\n\", result ));\n        PA_LOGAPI((\"\\t{\\n\" ));\n\n        PA_LOGAPI((\"\\t\\tint structVersion: %d\\n\", result->structVersion ));\n        PA_LOGAPI((\"\\t\\tconst char *name: %s\\n\", result->name ));\n        PA_LOGAPI((\"\\t\\tPaHostApiIndex hostApi: %d\\n\", result->hostApi ));\n        PA_LOGAPI((\"\\t\\tint maxInputChannels: %d\\n\", result->maxInputChannels ));\n        PA_LOGAPI((\"\\t\\tint maxOutputChannels: %d\\n\", result->maxOutputChannels ));\n        PA_LOGAPI((\"\\t}\\n\" ));\n\n    }\n\n    return result;\n}\n\n\n/*\n    SampleFormatIsValid() returns 1 if sampleFormat is a sample format\n    defined in portaudio.h, or 0 otherwise.\n*/\nstatic int SampleFormatIsValid( PaSampleFormat format )\n{\n    switch( format & ~paNonInterleaved )\n    {\n    case paFloat32: return 1;\n    case paInt16: return 1;\n    case paInt32: return 1;\n    case paInt24: return 1;\n    case paInt8: return 1;\n    case paUInt8: return 1;\n    case paCustomFormat: return 1;\n    default: return 0;\n    }\n}\n\n/*\n    NOTE: make sure this validation list is kept synchronised with the one in\n            pa_hostapi.h\n\n    ValidateOpenStreamParameters() checks that parameters to Pa_OpenStream()\n    conform to the expected values as described below. This function is\n    also designed to be used with the proposed Pa_IsFormatSupported() function.\n\n    There are basically two types of validation that could be performed:\n    Generic conformance validation, and device capability mismatch\n    validation. This function performs only generic conformance validation.\n    Validation that would require knowledge of device capabilities is\n    not performed because of potentially complex relationships between\n    combinations of parameters - for example, even if the sampleRate\n    seems ok, it might not be for a duplex stream - we have no way of\n    checking this in an API-neutral way, so we don't try.\n\n    On success the function returns PaNoError and fills in hostApi,\n    hostApiInputDeviceID, and hostApiOutputDeviceID fields. On failure\n    the function returns an error code indicating the first encountered\n    parameter error.\n\n\n    If ValidateOpenStreamParameters() returns paNoError, the following\n    assertions are guaranteed to be true.\n\n    - at least one of inputParameters & outputParmeters is valid (not NULL)\n\n    - if inputParameters & outputParameters are both valid, that\n        inputParameters->device & outputParameters->device  both use the same host api\n\n    PaDeviceIndex inputParameters->device\n        - is within range (0 to Pa_GetDeviceCount-1) Or:\n        - is paUseHostApiSpecificDeviceSpecification and\n            inputParameters->hostApiSpecificStreamInfo is non-NULL and refers\n            to a valid host api\n\n    int inputParameters->channelCount\n        - if inputParameters->device is not paUseHostApiSpecificDeviceSpecification, channelCount is > 0\n        - upper bound is NOT validated against device capabilities\n\n    PaSampleFormat inputParameters->sampleFormat\n        - is one of the sample formats defined in portaudio.h\n\n    void *inputParameters->hostApiSpecificStreamInfo\n        - if supplied its hostApi field matches the input device's host Api\n\n    PaDeviceIndex outputParmeters->device\n        - is within range (0 to Pa_GetDeviceCount-1)\n\n    int outputParmeters->channelCount\n        - if inputDevice is valid, channelCount is > 0\n        - upper bound is NOT validated against device capabilities\n\n    PaSampleFormat outputParmeters->sampleFormat\n        - is one of the sample formats defined in portaudio.h\n\n    void *outputParmeters->hostApiSpecificStreamInfo\n        - if supplied its hostApi field matches the output device's host Api\n\n    double sampleRate\n        - is not an 'absurd' rate (less than 1000. or greater than 384000.)\n        - sampleRate is NOT validated against device capabilities\n\n    PaStreamFlags streamFlags\n        - unused platform neutral flags are zero\n        - paNeverDropInput is only used for full-duplex callback streams with\n            variable buffer size (paFramesPerBufferUnspecified)\n*/\nstatic PaError ValidateOpenStreamParameters(\n    const PaStreamParameters *inputParameters,\n    const PaStreamParameters *outputParameters,\n    double sampleRate,\n    unsigned long framesPerBuffer,\n    PaStreamFlags streamFlags,\n    PaStreamCallback *streamCallback,\n    PaUtilHostApiRepresentation **hostApi,\n    PaDeviceIndex *hostApiInputDevice,\n    PaDeviceIndex *hostApiOutputDevice )\n{\n    int inputHostApiIndex  = -1;    /* Suppress uninitialised var warnings: compiler does */\n    int outputHostApiIndex = -1;    /* not see that if inputParameters and outputParameters  */\n                                    /* are both nonzero, these indices are set. */\n\n    if( (inputParameters == NULL) && (outputParameters == NULL) )\n    {\n        return paInvalidDevice; /** @todo should be a new error code \"invalid device parameters\" or something */\n    }\n    else\n    {\n        if( inputParameters == NULL )\n        {\n            *hostApiInputDevice = paNoDevice;\n        }\n        else if( inputParameters->device == paUseHostApiSpecificDeviceSpecification )\n        {\n            if( inputParameters->hostApiSpecificStreamInfo )\n            {\n                inputHostApiIndex = Pa_HostApiTypeIdToHostApiIndex(\n                        ((PaUtilHostApiSpecificStreamInfoHeader*)inputParameters->hostApiSpecificStreamInfo)->hostApiType );\n\n                if( inputHostApiIndex != -1 )\n                {\n                    *hostApiInputDevice = paUseHostApiSpecificDeviceSpecification;\n                    *hostApi = hostApis_[inputHostApiIndex];\n                }\n                else\n                {\n                    return paInvalidDevice;\n                }\n            }\n            else\n            {\n                return paInvalidDevice;\n            }\n        }\n        else\n        {\n            if( inputParameters->device < 0 || inputParameters->device >= deviceCount_ )\n                return paInvalidDevice;\n\n            inputHostApiIndex = FindHostApi( inputParameters->device, hostApiInputDevice );\n            if( inputHostApiIndex < 0 )\n                return paInternalError;\n\n            *hostApi = hostApis_[inputHostApiIndex];\n\n            if( inputParameters->channelCount <= 0 )\n                return paInvalidChannelCount;\n\n            if( !SampleFormatIsValid( inputParameters->sampleFormat ) )\n                return paSampleFormatNotSupported;\n\n            if( inputParameters->hostApiSpecificStreamInfo != NULL )\n            {\n                if( ((PaUtilHostApiSpecificStreamInfoHeader*)inputParameters->hostApiSpecificStreamInfo)->hostApiType\n                        != (*hostApi)->info.type )\n                    return paIncompatibleHostApiSpecificStreamInfo;\n            }\n        }\n\n        if( outputParameters == NULL )\n        {\n            *hostApiOutputDevice = paNoDevice;\n        }\n        else if( outputParameters->device == paUseHostApiSpecificDeviceSpecification  )\n        {\n            if( outputParameters->hostApiSpecificStreamInfo )\n            {\n                outputHostApiIndex = Pa_HostApiTypeIdToHostApiIndex(\n                        ((PaUtilHostApiSpecificStreamInfoHeader*)outputParameters->hostApiSpecificStreamInfo)->hostApiType );\n\n                if( outputHostApiIndex != -1 )\n                {\n                    *hostApiOutputDevice = paUseHostApiSpecificDeviceSpecification;\n                    *hostApi = hostApis_[outputHostApiIndex];\n                }\n                else\n                {\n                    return paInvalidDevice;\n                }\n            }\n            else\n            {\n                return paInvalidDevice;\n            }\n        }\n        else\n        {\n            if( outputParameters->device < 0 || outputParameters->device >= deviceCount_ )\n                return paInvalidDevice;\n\n            outputHostApiIndex = FindHostApi( outputParameters->device, hostApiOutputDevice );\n            if( outputHostApiIndex < 0 )\n                return paInternalError;\n\n            *hostApi = hostApis_[outputHostApiIndex];\n\n            if( outputParameters->channelCount <= 0 )\n                return paInvalidChannelCount;\n\n            if( !SampleFormatIsValid( outputParameters->sampleFormat ) )\n                return paSampleFormatNotSupported;\n\n            if( outputParameters->hostApiSpecificStreamInfo != NULL )\n            {\n                if( ((PaUtilHostApiSpecificStreamInfoHeader*)outputParameters->hostApiSpecificStreamInfo)->hostApiType\n                        != (*hostApi)->info.type )\n                    return paIncompatibleHostApiSpecificStreamInfo;\n            }\n        }\n\n        if( (inputParameters != NULL) && (outputParameters != NULL) )\n        {\n            /* ensure that both devices use the same API */\n            if( inputHostApiIndex != outputHostApiIndex )\n                return paBadIODeviceCombination;\n        }\n    }\n\n\n    /* Check for absurd sample rates. */\n    if( (sampleRate < 1000.0) || (sampleRate > 384000.0) )\n        return paInvalidSampleRate;\n\n    if( ((streamFlags & ~paPlatformSpecificFlags) & ~(paClipOff | paDitherOff | paNeverDropInput | paPrimeOutputBuffersUsingStreamCallback ) ) != 0 )\n        return paInvalidFlag;\n\n    if( streamFlags & paNeverDropInput )\n    {\n        /* must be a callback stream */\n        if( !streamCallback )\n            return paInvalidFlag;\n\n        /* must be a full duplex stream */\n        if( (inputParameters == NULL) || (outputParameters == NULL) )\n            return paInvalidFlag;\n\n        /* must use paFramesPerBufferUnspecified */\n        if( framesPerBuffer != paFramesPerBufferUnspecified )\n            return paInvalidFlag;\n    }\n\n    return paNoError;\n}\n\n\nPaError Pa_IsFormatSupported( const PaStreamParameters *inputParameters,\n                              const PaStreamParameters *outputParameters,\n                              double sampleRate )\n{\n    PaError result;\n    PaUtilHostApiRepresentation *hostApi = 0;\n    PaDeviceIndex hostApiInputDevice = paNoDevice, hostApiOutputDevice = paNoDevice;\n    PaStreamParameters hostApiInputParameters, hostApiOutputParameters;\n    PaStreamParameters *hostApiInputParametersPtr, *hostApiOutputParametersPtr;\n\n\n#ifdef PA_LOG_API_CALLS\n    PA_LOGAPI_ENTER_PARAMS( \"Pa_IsFormatSupported\" );\n\n    if( inputParameters == NULL ){\n        PA_LOGAPI((\"\\tPaStreamParameters *inputParameters: NULL\\n\" ));\n    }else{\n        PA_LOGAPI((\"\\tPaStreamParameters *inputParameters: 0x%p\\n\", inputParameters ));\n        PA_LOGAPI((\"\\tPaDeviceIndex inputParameters->device: %d\\n\", inputParameters->device ));\n        PA_LOGAPI((\"\\tint inputParameters->channelCount: %d\\n\", inputParameters->channelCount ));\n        PA_LOGAPI((\"\\tPaSampleFormat inputParameters->sampleFormat: %d\\n\", inputParameters->sampleFormat ));\n        PA_LOGAPI((\"\\tPaTime inputParameters->suggestedLatency: %f\\n\", inputParameters->suggestedLatency ));\n        PA_LOGAPI((\"\\tvoid *inputParameters->hostApiSpecificStreamInfo: 0x%p\\n\", inputParameters->hostApiSpecificStreamInfo ));\n    }\n\n    if( outputParameters == NULL ){\n        PA_LOGAPI((\"\\tPaStreamParameters *outputParameters: NULL\\n\" ));\n    }else{\n        PA_LOGAPI((\"\\tPaStreamParameters *outputParameters: 0x%p\\n\", outputParameters ));\n        PA_LOGAPI((\"\\tPaDeviceIndex outputParameters->device: %d\\n\", outputParameters->device ));\n        PA_LOGAPI((\"\\tint outputParameters->channelCount: %d\\n\", outputParameters->channelCount ));\n        PA_LOGAPI((\"\\tPaSampleFormat outputParameters->sampleFormat: %d\\n\", outputParameters->sampleFormat ));\n        PA_LOGAPI((\"\\tPaTime outputParameters->suggestedLatency: %f\\n\", outputParameters->suggestedLatency ));\n        PA_LOGAPI((\"\\tvoid *outputParameters->hostApiSpecificStreamInfo: 0x%p\\n\", outputParameters->hostApiSpecificStreamInfo ));\n    }\n\n    PA_LOGAPI((\"\\tdouble sampleRate: %g\\n\", sampleRate ));\n#endif\n\n    if( !PA_IS_INITIALISED_ )\n    {\n        result = paNotInitialized;\n\n        PA_LOGAPI_EXIT_PAERROR( \"Pa_IsFormatSupported\", result );\n        return result;\n    }\n\n    result = ValidateOpenStreamParameters( inputParameters,\n                                           outputParameters,\n                                           sampleRate, 0, paNoFlag, 0,\n                                           &hostApi,\n                                           &hostApiInputDevice,\n                                           &hostApiOutputDevice );\n    if( result != paNoError )\n    {\n        PA_LOGAPI_EXIT_PAERROR( \"Pa_IsFormatSupported\", result );\n        return result;\n    }\n\n\n    if( inputParameters )\n    {\n        hostApiInputParameters.device = hostApiInputDevice;\n        hostApiInputParameters.channelCount = inputParameters->channelCount;\n        hostApiInputParameters.sampleFormat = inputParameters->sampleFormat;\n        hostApiInputParameters.suggestedLatency = inputParameters->suggestedLatency;\n        hostApiInputParameters.hostApiSpecificStreamInfo = inputParameters->hostApiSpecificStreamInfo;\n        hostApiInputParametersPtr = &hostApiInputParameters;\n    }\n    else\n    {\n        hostApiInputParametersPtr = NULL;\n    }\n\n    if( outputParameters )\n    {\n        hostApiOutputParameters.device = hostApiOutputDevice;\n        hostApiOutputParameters.channelCount = outputParameters->channelCount;\n        hostApiOutputParameters.sampleFormat = outputParameters->sampleFormat;\n        hostApiOutputParameters.suggestedLatency = outputParameters->suggestedLatency;\n        hostApiOutputParameters.hostApiSpecificStreamInfo = outputParameters->hostApiSpecificStreamInfo;\n        hostApiOutputParametersPtr = &hostApiOutputParameters;\n    }\n    else\n    {\n        hostApiOutputParametersPtr = NULL;\n    }\n\n    result = hostApi->IsFormatSupported( hostApi,\n                                  hostApiInputParametersPtr, hostApiOutputParametersPtr,\n                                  sampleRate );\n\n#ifdef PA_LOG_API_CALLS\n    PA_LOGAPI((\"Pa_OpenStream returned:\\n\" ));\n    if( result == paFormatIsSupported )\n        PA_LOGAPI((\"\\tPaError: 0 [ paFormatIsSupported ]\\n\" ));\n    else\n        PA_LOGAPI((\"\\tPaError: %d ( %s )\\n\", result, Pa_GetErrorText( result ) ));\n#endif\n\n    return result;\n}\n\n\nPaError Pa_OpenStream( PaStream** stream,\n                       const PaStreamParameters *inputParameters,\n                       const PaStreamParameters *outputParameters,\n                       double sampleRate,\n                       unsigned long framesPerBuffer,\n                       PaStreamFlags streamFlags,\n                       PaStreamCallback *streamCallback,\n                       void *userData )\n{\n    PaError result;\n    PaUtilHostApiRepresentation *hostApi = 0;\n    PaDeviceIndex hostApiInputDevice = paNoDevice, hostApiOutputDevice = paNoDevice;\n    PaStreamParameters hostApiInputParameters, hostApiOutputParameters;\n    PaStreamParameters *hostApiInputParametersPtr, *hostApiOutputParametersPtr;\n\n\n#ifdef PA_LOG_API_CALLS\n    PA_LOGAPI_ENTER_PARAMS( \"Pa_OpenStream\" );\n    PA_LOGAPI((\"\\tPaStream** stream: 0x%p\\n\", stream ));\n\n    if( inputParameters == NULL ){\n        PA_LOGAPI((\"\\tPaStreamParameters *inputParameters: NULL\\n\" ));\n    }else{\n        PA_LOGAPI((\"\\tPaStreamParameters *inputParameters: 0x%p\\n\", inputParameters ));\n        PA_LOGAPI((\"\\tPaDeviceIndex inputParameters->device: %d\\n\", inputParameters->device ));\n        PA_LOGAPI((\"\\tint inputParameters->channelCount: %d\\n\", inputParameters->channelCount ));\n        PA_LOGAPI((\"\\tPaSampleFormat inputParameters->sampleFormat: %d\\n\", inputParameters->sampleFormat ));\n        PA_LOGAPI((\"\\tPaTime inputParameters->suggestedLatency: %f\\n\", inputParameters->suggestedLatency ));\n        PA_LOGAPI((\"\\tvoid *inputParameters->hostApiSpecificStreamInfo: 0x%p\\n\", inputParameters->hostApiSpecificStreamInfo ));\n    }\n\n    if( outputParameters == NULL ){\n        PA_LOGAPI((\"\\tPaStreamParameters *outputParameters: NULL\\n\" ));\n    }else{\n        PA_LOGAPI((\"\\tPaStreamParameters *outputParameters: 0x%p\\n\", outputParameters ));\n        PA_LOGAPI((\"\\tPaDeviceIndex outputParameters->device: %d\\n\", outputParameters->device ));\n        PA_LOGAPI((\"\\tint outputParameters->channelCount: %d\\n\", outputParameters->channelCount ));\n        PA_LOGAPI((\"\\tPaSampleFormat outputParameters->sampleFormat: %d\\n\", outputParameters->sampleFormat ));\n        PA_LOGAPI((\"\\tPaTime outputParameters->suggestedLatency: %f\\n\", outputParameters->suggestedLatency ));\n        PA_LOGAPI((\"\\tvoid *outputParameters->hostApiSpecificStreamInfo: 0x%p\\n\", outputParameters->hostApiSpecificStreamInfo ));\n    }\n\n    PA_LOGAPI((\"\\tdouble sampleRate: %g\\n\", sampleRate ));\n    PA_LOGAPI((\"\\tunsigned long framesPerBuffer: %d\\n\", framesPerBuffer ));\n    PA_LOGAPI((\"\\tPaStreamFlags streamFlags: 0x%x\\n\", streamFlags ));\n    PA_LOGAPI((\"\\tPaStreamCallback *streamCallback: 0x%p\\n\", streamCallback ));\n    PA_LOGAPI((\"\\tvoid *userData: 0x%p\\n\", userData ));\n#endif\n\n    if( !PA_IS_INITIALISED_ )\n    {\n        result = paNotInitialized;\n\n        PA_LOGAPI((\"Pa_OpenStream returned:\\n\" ));\n        PA_LOGAPI((\"\\t*(PaStream** stream): undefined\\n\" ));\n        PA_LOGAPI((\"\\tPaError: %d ( %s )\\n\", result, Pa_GetErrorText( result ) ));\n        return result;\n    }\n\n    /* Check for parameter errors.\n        NOTE: make sure this validation list is kept synchronised with the one\n        in pa_hostapi.h\n    */\n\n    if( stream == NULL )\n    {\n        result = paBadStreamPtr;\n\n        PA_LOGAPI((\"Pa_OpenStream returned:\\n\" ));\n        PA_LOGAPI((\"\\t*(PaStream** stream): undefined\\n\" ));\n        PA_LOGAPI((\"\\tPaError: %d ( %s )\\n\", result, Pa_GetErrorText( result ) ));\n        return result;\n    }\n\n    result = ValidateOpenStreamParameters( inputParameters,\n                                           outputParameters,\n                                           sampleRate, framesPerBuffer,\n                                           streamFlags, streamCallback,\n                                           &hostApi,\n                                           &hostApiInputDevice,\n                                           &hostApiOutputDevice );\n    if( result != paNoError )\n    {\n        PA_LOGAPI((\"Pa_OpenStream returned:\\n\" ));\n        PA_LOGAPI((\"\\t*(PaStream** stream): undefined\\n\" ));\n        PA_LOGAPI((\"\\tPaError: %d ( %s )\\n\", result, Pa_GetErrorText( result ) ));\n        return result;\n    }\n\n\n    if( inputParameters )\n    {\n        hostApiInputParameters.device = hostApiInputDevice;\n        hostApiInputParameters.channelCount = inputParameters->channelCount;\n        hostApiInputParameters.sampleFormat = inputParameters->sampleFormat;\n        hostApiInputParameters.suggestedLatency = inputParameters->suggestedLatency;\n        hostApiInputParameters.hostApiSpecificStreamInfo = inputParameters->hostApiSpecificStreamInfo;\n        hostApiInputParametersPtr = &hostApiInputParameters;\n    }\n    else\n    {\n        hostApiInputParametersPtr = NULL;\n    }\n\n    if( outputParameters )\n    {\n        hostApiOutputParameters.device = hostApiOutputDevice;\n        hostApiOutputParameters.channelCount = outputParameters->channelCount;\n        hostApiOutputParameters.sampleFormat = outputParameters->sampleFormat;\n        hostApiOutputParameters.suggestedLatency = outputParameters->suggestedLatency;\n        hostApiOutputParameters.hostApiSpecificStreamInfo = outputParameters->hostApiSpecificStreamInfo;\n        hostApiOutputParametersPtr = &hostApiOutputParameters;\n    }\n    else\n    {\n        hostApiOutputParametersPtr = NULL;\n    }\n\n    result = hostApi->OpenStream( hostApi, stream,\n                                  hostApiInputParametersPtr, hostApiOutputParametersPtr,\n                                  sampleRate, framesPerBuffer, streamFlags, streamCallback, userData );\n\n    if( result == paNoError )\n        AddOpenStream( *stream );\n\n\n    PA_LOGAPI((\"Pa_OpenStream returned:\\n\" ));\n    PA_LOGAPI((\"\\t*(PaStream** stream): 0x%p\\n\", *stream ));\n    PA_LOGAPI((\"\\tPaError: %d ( %s )\\n\", result, Pa_GetErrorText( result ) ));\n\n    return result;\n}\n\n\nPaError Pa_OpenDefaultStream( PaStream** stream,\n                              int inputChannelCount,\n                              int outputChannelCount,\n                              PaSampleFormat sampleFormat,\n                              double sampleRate,\n                              unsigned long framesPerBuffer,\n                              PaStreamCallback *streamCallback,\n                              void *userData )\n{\n    PaError result;\n    PaStreamParameters hostApiInputParameters, hostApiOutputParameters;\n    PaStreamParameters *hostApiInputParametersPtr, *hostApiOutputParametersPtr;\n\n    PA_LOGAPI_ENTER_PARAMS( \"Pa_OpenDefaultStream\" );\n    PA_LOGAPI((\"\\tPaStream** stream: 0x%p\\n\", stream ));\n    PA_LOGAPI((\"\\tint inputChannelCount: %d\\n\", inputChannelCount ));\n    PA_LOGAPI((\"\\tint outputChannelCount: %d\\n\", outputChannelCount ));\n    PA_LOGAPI((\"\\tPaSampleFormat sampleFormat: %d\\n\", sampleFormat ));\n    PA_LOGAPI((\"\\tdouble sampleRate: %g\\n\", sampleRate ));\n    PA_LOGAPI((\"\\tunsigned long framesPerBuffer: %d\\n\", framesPerBuffer ));\n    PA_LOGAPI((\"\\tPaStreamCallback *streamCallback: 0x%p\\n\", streamCallback ));\n    PA_LOGAPI((\"\\tvoid *userData: 0x%p\\n\", userData ));\n\n\n    if( inputChannelCount > 0 )\n    {\n        hostApiInputParameters.device = Pa_GetDefaultInputDevice();\n        if( hostApiInputParameters.device == paNoDevice )\n            return paDeviceUnavailable;\n\n        hostApiInputParameters.channelCount = inputChannelCount;\n        hostApiInputParameters.sampleFormat = sampleFormat;\n        /* defaultHighInputLatency is used below instead of\n           defaultLowInputLatency because it is more important for the default\n           stream to work reliably than it is for it to work with the lowest\n           latency.\n         */\n        hostApiInputParameters.suggestedLatency =\n             Pa_GetDeviceInfo( hostApiInputParameters.device )->defaultHighInputLatency;\n        hostApiInputParameters.hostApiSpecificStreamInfo = NULL;\n        hostApiInputParametersPtr = &hostApiInputParameters;\n    }\n    else\n    {\n        hostApiInputParametersPtr = NULL;\n    }\n\n    if( outputChannelCount > 0 )\n    {\n        hostApiOutputParameters.device = Pa_GetDefaultOutputDevice();\n        if( hostApiOutputParameters.device == paNoDevice )\n            return paDeviceUnavailable;\n\n        hostApiOutputParameters.channelCount = outputChannelCount;\n        hostApiOutputParameters.sampleFormat = sampleFormat;\n        /* defaultHighOutputLatency is used below instead of\n           defaultLowOutputLatency because it is more important for the default\n           stream to work reliably than it is for it to work with the lowest\n           latency.\n         */\n        hostApiOutputParameters.suggestedLatency =\n             Pa_GetDeviceInfo( hostApiOutputParameters.device )->defaultHighOutputLatency;\n        hostApiOutputParameters.hostApiSpecificStreamInfo = NULL;\n        hostApiOutputParametersPtr = &hostApiOutputParameters;\n    }\n    else\n    {\n        hostApiOutputParametersPtr = NULL;\n    }\n\n\n    result = Pa_OpenStream(\n                 stream, hostApiInputParametersPtr, hostApiOutputParametersPtr,\n                 sampleRate, framesPerBuffer, paNoFlag, streamCallback, userData );\n\n    PA_LOGAPI((\"Pa_OpenDefaultStream returned:\\n\" ));\n    PA_LOGAPI((\"\\t*(PaStream** stream): 0x%p\", *stream ));\n    PA_LOGAPI((\"\\tPaError: %d ( %s )\\n\", result, Pa_GetErrorText( result ) ));\n\n    return result;\n}\n\n\nPaError PaUtil_ValidateStreamPointer( PaStream* stream )\n{\n    if( !PA_IS_INITIALISED_ ) return paNotInitialized;\n\n    if( stream == NULL ) return paBadStreamPtr;\n\n    if( ((PaUtilStreamRepresentation*)stream)->magic != PA_STREAM_MAGIC )\n        return paBadStreamPtr;\n\n    return paNoError;\n}\n\n\nPaError Pa_CloseStream( PaStream* stream )\n{\n    PaUtilStreamInterface *interface;\n    PaError result = PaUtil_ValidateStreamPointer( stream );\n\n    PA_LOGAPI_ENTER_PARAMS( \"Pa_CloseStream\" );\n    PA_LOGAPI((\"\\tPaStream* stream: 0x%p\\n\", stream ));\n\n    /* always remove the open stream from our list, even if this function\n        eventually returns an error. Otherwise CloseOpenStreams() will\n        get stuck in an infinite loop */\n    RemoveOpenStream( stream ); /* be sure to call this _before_ closing the stream */\n\n    if( result == paNoError )\n    {\n        interface = PA_STREAM_INTERFACE(stream);\n\n        /* abort the stream if it isn't stopped */\n        result = interface->IsStopped( stream );\n        if( result == 1 )\n            result = paNoError;\n        else if( result == 0 )\n            result = interface->Abort( stream );\n\n        if( result == paNoError )                 /** @todo REVIEW: shouldn't we close anyway? see: http://www.portaudio.com/trac/ticket/115 */\n            result = interface->Close( stream );\n    }\n\n    PA_LOGAPI_EXIT_PAERROR( \"Pa_CloseStream\", result );\n\n    return result;\n}\n\n\nPaError Pa_SetStreamFinishedCallback( PaStream *stream, PaStreamFinishedCallback* streamFinishedCallback )\n{\n    PaError result = PaUtil_ValidateStreamPointer( stream );\n\n    PA_LOGAPI_ENTER_PARAMS( \"Pa_SetStreamFinishedCallback\" );\n    PA_LOGAPI((\"\\tPaStream* stream: 0x%p\\n\", stream ));\n    PA_LOGAPI((\"\\tPaStreamFinishedCallback* streamFinishedCallback: 0x%p\\n\", streamFinishedCallback ));\n\n    if( result == paNoError )\n    {\n        result = PA_STREAM_INTERFACE(stream)->IsStopped( stream );\n        if( result == 0 )\n        {\n            result = paStreamIsNotStopped ;\n        }\n        if( result == 1 )\n        {\n            PA_STREAM_REP( stream )->streamFinishedCallback = streamFinishedCallback;\n            result = paNoError;\n        }\n    }\n\n    PA_LOGAPI_EXIT_PAERROR( \"Pa_SetStreamFinishedCallback\", result );\n\n    return result;\n\n}\n\n\nPaError Pa_StartStream( PaStream *stream )\n{\n    PaError result = PaUtil_ValidateStreamPointer( stream );\n\n    PA_LOGAPI_ENTER_PARAMS( \"Pa_StartStream\" );\n    PA_LOGAPI((\"\\tPaStream* stream: 0x%p\\n\", stream ));\n\n    if( result == paNoError )\n    {\n        result = PA_STREAM_INTERFACE(stream)->IsStopped( stream );\n        if( result == 0 )\n        {\n            result = paStreamIsNotStopped ;\n        }\n        else if( result == 1 )\n        {\n            result = PA_STREAM_INTERFACE(stream)->Start( stream );\n        }\n    }\n\n    PA_LOGAPI_EXIT_PAERROR( \"Pa_StartStream\", result );\n\n    return result;\n}\n\n\nPaError Pa_StopStream( PaStream *stream )\n{\n    PaError result = PaUtil_ValidateStreamPointer( stream );\n\n    PA_LOGAPI_ENTER_PARAMS( \"Pa_StopStream\" );\n    PA_LOGAPI((\"\\tPaStream* stream: 0x%p\\n\", stream ));\n\n    if( result == paNoError )\n    {\n        result = PA_STREAM_INTERFACE(stream)->IsStopped( stream );\n        if( result == 0 )\n        {\n            result = PA_STREAM_INTERFACE(stream)->Stop( stream );\n        }\n        else if( result == 1 )\n        {\n            result = paStreamIsStopped;\n        }\n    }\n\n    PA_LOGAPI_EXIT_PAERROR( \"Pa_StopStream\", result );\n\n    return result;\n}\n\n\nPaError Pa_AbortStream( PaStream *stream )\n{\n    PaError result = PaUtil_ValidateStreamPointer( stream );\n\n    PA_LOGAPI_ENTER_PARAMS( \"Pa_AbortStream\" );\n    PA_LOGAPI((\"\\tPaStream* stream: 0x%p\\n\", stream ));\n\n    if( result == paNoError )\n    {\n        result = PA_STREAM_INTERFACE(stream)->IsStopped( stream );\n        if( result == 0 )\n        {\n            result = PA_STREAM_INTERFACE(stream)->Abort( stream );\n        }\n        else if( result == 1 )\n        {\n            result = paStreamIsStopped;\n        }\n    }\n\n    PA_LOGAPI_EXIT_PAERROR( \"Pa_AbortStream\", result );\n\n    return result;\n}\n\n\nPaError Pa_IsStreamStopped( PaStream *stream )\n{\n    PaError result = PaUtil_ValidateStreamPointer( stream );\n\n    PA_LOGAPI_ENTER_PARAMS( \"Pa_IsStreamStopped\" );\n    PA_LOGAPI((\"\\tPaStream* stream: 0x%p\\n\", stream ));\n\n    if( result == paNoError )\n        result = PA_STREAM_INTERFACE(stream)->IsStopped( stream );\n\n    PA_LOGAPI_EXIT_PAERROR( \"Pa_IsStreamStopped\", result );\n\n    return result;\n}\n\n\nPaError Pa_IsStreamActive( PaStream *stream )\n{\n    PaError result = PaUtil_ValidateStreamPointer( stream );\n\n    PA_LOGAPI_ENTER_PARAMS( \"Pa_IsStreamActive\" );\n    PA_LOGAPI((\"\\tPaStream* stream: 0x%p\\n\", stream ));\n\n    if( result == paNoError )\n        result = PA_STREAM_INTERFACE(stream)->IsActive( stream );\n\n\n    PA_LOGAPI_EXIT_PAERROR( \"Pa_IsStreamActive\", result );\n\n    return result;\n}\n\n\nconst PaStreamInfo* Pa_GetStreamInfo( PaStream *stream )\n{\n    PaError error = PaUtil_ValidateStreamPointer( stream );\n    const PaStreamInfo *result;\n\n    PA_LOGAPI_ENTER_PARAMS( \"Pa_GetStreamInfo\" );\n    PA_LOGAPI((\"\\tPaStream* stream: 0x%p\\n\", stream ));\n\n    if( error != paNoError )\n    {\n        result = 0;\n\n        PA_LOGAPI((\"Pa_GetStreamInfo returned:\\n\" ));\n        PA_LOGAPI((\"\\tconst PaStreamInfo*: 0 [PaError error:%d ( %s )]\\n\", error, Pa_GetErrorText( error ) ));\n\n    }\n    else\n    {\n        result = &PA_STREAM_REP( stream )->streamInfo;\n\n        PA_LOGAPI((\"Pa_GetStreamInfo returned:\\n\" ));\n        PA_LOGAPI((\"\\tconst PaStreamInfo*: 0x%p:\\n\", result ));\n        PA_LOGAPI((\"\\t{\" ));\n\n        PA_LOGAPI((\"\\t\\tint structVersion: %d\\n\", result->structVersion ));\n        PA_LOGAPI((\"\\t\\tPaTime inputLatency: %f\\n\", result->inputLatency ));\n        PA_LOGAPI((\"\\t\\tPaTime outputLatency: %f\\n\", result->outputLatency ));\n        PA_LOGAPI((\"\\t\\tdouble sampleRate: %f\\n\", result->sampleRate ));\n        PA_LOGAPI((\"\\t}\\n\" ));\n\n    }\n\n    return result;\n}\n\n\nPaTime Pa_GetStreamTime( PaStream *stream )\n{\n    PaError error = PaUtil_ValidateStreamPointer( stream );\n    PaTime result;\n\n    PA_LOGAPI_ENTER_PARAMS( \"Pa_GetStreamTime\" );\n    PA_LOGAPI((\"\\tPaStream* stream: 0x%p\\n\", stream ));\n\n    if( error != paNoError )\n    {\n        result = 0;\n\n        PA_LOGAPI((\"Pa_GetStreamTime returned:\\n\" ));\n        PA_LOGAPI((\"\\tPaTime: 0 [PaError error:%d ( %s )]\\n\", result, error, Pa_GetErrorText( error ) ));\n\n    }\n    else\n    {\n        result = PA_STREAM_INTERFACE(stream)->GetTime( stream );\n\n        PA_LOGAPI((\"Pa_GetStreamTime returned:\\n\" ));\n        PA_LOGAPI((\"\\tPaTime: %g\\n\", result ));\n\n    }\n\n    return result;\n}\n\n\ndouble Pa_GetStreamCpuLoad( PaStream* stream )\n{\n    PaError error = PaUtil_ValidateStreamPointer( stream );\n    double result;\n\n    PA_LOGAPI_ENTER_PARAMS( \"Pa_GetStreamCpuLoad\" );\n    PA_LOGAPI((\"\\tPaStream* stream: 0x%p\\n\", stream ));\n\n    if( error != paNoError )\n    {\n\n        result = 0.0;\n\n        PA_LOGAPI((\"Pa_GetStreamCpuLoad returned:\\n\" ));\n        PA_LOGAPI((\"\\tdouble: 0.0 [PaError error: %d ( %s )]\\n\", error, Pa_GetErrorText( error ) ));\n\n    }\n    else\n    {\n        result = PA_STREAM_INTERFACE(stream)->GetCpuLoad( stream );\n\n        PA_LOGAPI((\"Pa_GetStreamCpuLoad returned:\\n\" ));\n        PA_LOGAPI((\"\\tdouble: %g\\n\", result ));\n\n    }\n\n    return result;\n}\n\n\nPaError Pa_ReadStream( PaStream* stream,\n                       void *buffer,\n                       unsigned long frames )\n{\n    PaError result = PaUtil_ValidateStreamPointer( stream );\n\n    PA_LOGAPI_ENTER_PARAMS( \"Pa_ReadStream\" );\n    PA_LOGAPI((\"\\tPaStream* stream: 0x%p\\n\", stream ));\n\n    if( result == paNoError )\n    {\n        if( frames == 0 )\n        {\n            /* @todo Should we not allow the implementation to signal any overflow condition? see: http://www.portaudio.com/trac/ticket/116*/\n            result = paNoError;\n        }\n        else if( buffer == 0 )\n        {\n            result = paBadBufferPtr;\n        }\n        else\n        {\n            result = PA_STREAM_INTERFACE(stream)->IsStopped( stream );\n            if( result == 0 )\n            {\n                result = PA_STREAM_INTERFACE(stream)->Read( stream, buffer, frames );\n            }\n            else if( result == 1 )\n            {\n                result = paStreamIsStopped;\n            }\n        }\n    }\n\n    PA_LOGAPI_EXIT_PAERROR( \"Pa_ReadStream\", result );\n\n    return result;\n}\n\n\nPaError Pa_WriteStream( PaStream* stream,\n                        const void *buffer,\n                        unsigned long frames )\n{\n    PaError result = PaUtil_ValidateStreamPointer( stream );\n\n    PA_LOGAPI_ENTER_PARAMS( \"Pa_WriteStream\" );\n    PA_LOGAPI((\"\\tPaStream* stream: 0x%p\\n\", stream ));\n\n    if( result == paNoError )\n    {\n        if( frames == 0 )\n        {\n            /* @todo Should we not allow the implementation to signal any underflow condition? see: http://www.portaudio.com/trac/ticket/116*/\n            result = paNoError;\n        }\n        else if( buffer == 0 )\n        {\n            result = paBadBufferPtr;\n        }\n        else\n        {\n            result = PA_STREAM_INTERFACE(stream)->IsStopped( stream );\n            if( result == 0 )\n            {\n                result = PA_STREAM_INTERFACE(stream)->Write( stream, buffer, frames );\n            }\n            else if( result == 1 )\n            {\n                result = paStreamIsStopped;\n            }\n        }\n    }\n\n    PA_LOGAPI_EXIT_PAERROR( \"Pa_WriteStream\", result );\n\n    return result;\n}\n\nsigned long Pa_GetStreamReadAvailable( PaStream* stream )\n{\n    PaError error = PaUtil_ValidateStreamPointer( stream );\n    signed long result;\n\n    PA_LOGAPI_ENTER_PARAMS( \"Pa_GetStreamReadAvailable\" );\n    PA_LOGAPI((\"\\tPaStream* stream: 0x%p\\n\", stream ));\n\n    if( error != paNoError )\n    {\n        result = 0;\n\n        PA_LOGAPI((\"Pa_GetStreamReadAvailable returned:\\n\" ));\n        PA_LOGAPI((\"\\tunsigned long: 0 [ PaError error: %d ( %s ) ]\\n\", error, Pa_GetErrorText( error ) ));\n\n    }\n    else\n    {\n        result = PA_STREAM_INTERFACE(stream)->GetReadAvailable( stream );\n\n        PA_LOGAPI((\"Pa_GetStreamReadAvailable returned:\\n\" ));\n        PA_LOGAPI((\"\\tPaError: %d ( %s )\\n\", result, Pa_GetErrorText( result ) ));\n\n    }\n\n    return result;\n}\n\n\nsigned long Pa_GetStreamWriteAvailable( PaStream* stream )\n{\n    PaError error = PaUtil_ValidateStreamPointer( stream );\n    signed long result;\n\n    PA_LOGAPI_ENTER_PARAMS( \"Pa_GetStreamWriteAvailable\" );\n    PA_LOGAPI((\"\\tPaStream* stream: 0x%p\\n\", stream ));\n\n    if( error != paNoError )\n    {\n        result = 0;\n\n        PA_LOGAPI((\"Pa_GetStreamWriteAvailable returned:\\n\" ));\n        PA_LOGAPI((\"\\tunsigned long: 0 [ PaError error: %d ( %s ) ]\\n\", error, Pa_GetErrorText( error ) ));\n\n    }\n    else\n    {\n        result = PA_STREAM_INTERFACE(stream)->GetWriteAvailable( stream );\n\n        PA_LOGAPI((\"Pa_GetStreamWriteAvailable returned:\\n\" ));\n        PA_LOGAPI((\"\\tPaError: %d ( %s )\\n\", result, Pa_GetErrorText( result ) ));\n\n    }\n\n    return result;\n}\n\n\nPaError Pa_GetSampleSize( PaSampleFormat format )\n{\n    int result;\n\n    PA_LOGAPI_ENTER_PARAMS( \"Pa_GetSampleSize\" );\n    PA_LOGAPI((\"\\tPaSampleFormat format: %d\\n\", format ));\n\n    switch( format & ~paNonInterleaved )\n    {\n\n    case paUInt8:\n    case paInt8:\n        result = 1;\n        break;\n\n    case paInt16:\n        result = 2;\n        break;\n\n    case paInt24:\n        result = 3;\n        break;\n\n    case paFloat32:\n    case paInt32:\n        result = 4;\n        break;\n\n    default:\n        result = paSampleFormatNotSupported;\n        break;\n    }\n\n    PA_LOGAPI_EXIT_PAERROR_OR_T_RESULT( \"Pa_GetSampleSize\", \"int: %d\", result );\n\n    return (PaError) result;\n}\n"
  },
  {
    "path": "thirdparty/portaudio/src/common/pa_gitrevision.h",
    "content": "#define PA_GIT_REVISION 147dd722548358763a8b649b3e4b41dfffbcfbb6\n"
  },
  {
    "path": "thirdparty/portaudio/src/common/pa_hostapi.h",
    "content": "#ifndef PA_HOSTAPI_H\n#define PA_HOSTAPI_H\n/*\n * $Id$\n * Portable Audio I/O Library\n * host api representation\n *\n * Based on the Open Source API proposed by Ross Bencina\n * Copyright (c) 1999-2008 Ross Bencina, Phil Burk\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n/** @file\n @ingroup common_src\n\n @brief Interfaces and representation structures used by pa_front.c\n to manage and communicate with host API implementations.\n*/\n\n#include \"portaudio.h\"\n\n/**\nThe PA_NO_* host API macros are now deprecated in favor of PA_USE_* macros.\nPA_USE_* indicates whether a particular host API will be initialized by PortAudio.\nAn undefined or 0 value indicates that the host API will not be used. A value of 1\nindicates that the host API will be used. PA_USE_* macros should be left undefined\nor defined to either 0 or 1.\n\nThe code below ensures that PA_USE_* macros are always defined and have value\n0 or 1. Undefined symbols are defaulted to 0. Symbols that are neither 0 nor 1\nare defaulted to 1.\n*/\n\n#ifndef PA_USE_SKELETON\n#define PA_USE_SKELETON 0\n#elif (PA_USE_SKELETON != 0) && (PA_USE_SKELETON != 1)\n#undef PA_USE_SKELETON\n#define PA_USE_SKELETON 1\n#endif\n\n#if defined(PA_NO_ASIO) || defined(PA_NO_DS) || defined(PA_NO_WMME) || defined(PA_NO_WASAPI) || defined(PA_NO_WDMKS)\n#error \"Portaudio: PA_NO_<APINAME> is no longer supported, please remove definition and use PA_USE_<APINAME> instead\"\n#endif\n\n#ifndef PA_USE_ASIO\n#define PA_USE_ASIO 0\n#elif (PA_USE_ASIO != 0) && (PA_USE_ASIO != 1)\n#undef PA_USE_ASIO\n#define PA_USE_ASIO 1\n#endif\n\n#ifndef PA_USE_DS\n#define PA_USE_DS 0\n#elif (PA_USE_DS != 0) && (PA_USE_DS != 1)\n#undef PA_USE_DS\n#define PA_USE_DS 1\n#endif\n\n#ifndef PA_USE_WMME\n#define PA_USE_WMME 0\n#elif (PA_USE_WMME != 0) && (PA_USE_WMME != 1)\n#undef PA_USE_WMME\n#define PA_USE_WMME 1\n#endif\n\n#ifndef PA_USE_WASAPI\n#define PA_USE_WASAPI 0\n#elif (PA_USE_WASAPI != 0) && (PA_USE_WASAPI != 1)\n#undef PA_USE_WASAPI\n#define PA_USE_WASAPI 1\n#endif\n\n#ifndef PA_USE_WDMKS\n#define PA_USE_WDMKS 0\n#elif (PA_USE_WDMKS != 0) && (PA_USE_WDMKS != 1)\n#undef PA_USE_WDMKS\n#define PA_USE_WDMKS 1\n#endif\n\n/* Set default values for Unix based APIs. */\n#if defined(PA_NO_OSS) || defined(PA_NO_ALSA) || defined(PA_NO_JACK) || defined(PA_NO_COREAUDIO) || defined(PA_NO_SGI) || defined(PA_NO_ASIHPI)\n#error \"Portaudio: PA_NO_<APINAME> is no longer supported, please remove definition and use PA_USE_<APINAME> instead\"\n#endif\n\n#ifndef PA_USE_OSS\n#define PA_USE_OSS 0\n#elif (PA_USE_OSS != 0) && (PA_USE_OSS != 1)\n#undef PA_USE_OSS\n#define PA_USE_OSS 1\n#endif\n\n#ifndef PA_USE_ALSA\n#define PA_USE_ALSA 0\n#elif (PA_USE_ALSA != 0) && (PA_USE_ALSA != 1)\n#undef PA_USE_ALSA\n#define PA_USE_ALSA 1\n#endif\n\n#ifndef PA_USE_JACK\n#define PA_USE_JACK 0\n#elif (PA_USE_JACK != 0) && (PA_USE_JACK != 1)\n#undef PA_USE_JACK\n#define PA_USE_JACK 1\n#endif\n\n#ifndef PA_USE_SGI\n#define PA_USE_SGI 0\n#elif (PA_USE_SGI != 0) && (PA_USE_SGI != 1)\n#undef PA_USE_SGI\n#define PA_USE_SGI 1\n#endif\n\n#ifndef PA_USE_COREAUDIO\n#define PA_USE_COREAUDIO 0\n#elif (PA_USE_COREAUDIO != 0) && (PA_USE_COREAUDIO != 1)\n#undef PA_USE_COREAUDIO\n#define PA_USE_COREAUDIO 1\n#endif\n\n#ifndef PA_USE_ASIHPI\n#define PA_USE_ASIHPI 0\n#elif (PA_USE_ASIHPI != 0) && (PA_USE_ASIHPI != 1)\n#undef PA_USE_ASIHPI\n#define PA_USE_ASIHPI 1\n#endif\n\n#ifdef __cplusplus\nextern \"C\"\n{\n#endif /* __cplusplus */\n\n\n/** **FOR THE USE OF pa_front.c ONLY**\n    Do NOT use fields in this structure, they my change at any time.\n    Use functions defined in pa_util.h if you think you need functionality\n    which can be derived from here.\n*/\ntypedef struct PaUtilPrivatePaFrontHostApiInfo {\n\n\n    unsigned long baseDeviceIndex;\n}PaUtilPrivatePaFrontHostApiInfo;\n\n\n/** The common header for all data structures whose pointers are passed through\n the hostApiSpecificStreamInfo field of the PaStreamParameters structure.\n Note that in order to keep the public PortAudio interface clean, this structure\n is not used explicitly when declaring hostApiSpecificStreamInfo data structures.\n However, some code in pa_front depends on the first 3 members being equivalent\n with this structure.\n @see PaStreamParameters\n*/\ntypedef struct PaUtilHostApiSpecificStreamInfoHeader\n{\n    unsigned long size;             /**< size of whole structure including this header */\n    PaHostApiTypeId hostApiType;    /**< host API for which this data is intended */\n    unsigned long version;          /**< structure version */\n} PaUtilHostApiSpecificStreamInfoHeader;\n\n\n\n/** A structure representing the interface to a host API. Contains both\n concrete data and pointers to functions which implement the interface.\n*/\ntypedef struct PaUtilHostApiRepresentation {\n    PaUtilPrivatePaFrontHostApiInfo privatePaFrontInfo;\n\n    /** The host api implementation should populate the info field. In the\n        case of info.defaultInputDevice and info.defaultOutputDevice the\n        values stored should be 0 based indices within the host api's own\n        device index range (0 to deviceCount). These values will be converted\n        to global device indices by pa_front after PaUtilHostApiInitializer()\n        returns.\n    */\n    PaHostApiInfo info;\n\n    PaDeviceInfo** deviceInfos;\n\n    /**\n        (*Terminate)() is guaranteed to be called with a valid <hostApi>\n        parameter, which was previously returned from the same implementation's\n        initializer.\n    */\n    void (*Terminate)( struct PaUtilHostApiRepresentation *hostApi );\n\n    /**\n        The inputParameters and outputParameters pointers should not be saved\n        as they will not remain valid after OpenStream is called.\n\n\n        The following guarantees are made about parameters to (*OpenStream)():\n\n            [NOTE: the following list up to *END PA FRONT VALIDATIONS* should be\n                kept in sync with the one for ValidateOpenStreamParameters and\n                Pa_OpenStream in pa_front.c]\n\n            PaHostApiRepresentation *hostApi\n                - is valid for this implementation\n\n            PaStream** stream\n                - is non-null\n\n            - at least one of inputParameters & outputParmeters is valid (not NULL)\n\n            - if inputParameters & outputParmeters are both valid, that\n                inputParameters->device & outputParmeters->device  both use the same host api\n\n            PaDeviceIndex inputParameters->device\n                - is within range (0 to Pa_CountDevices-1) Or:\n                - is paUseHostApiSpecificDeviceSpecification and\n                    inputParameters->hostApiSpecificStreamInfo is non-NULL and refers\n                    to a valid host api\n\n            int inputParameters->numChannels\n                - if inputParameters->device is not paUseHostApiSpecificDeviceSpecification, numInputChannels is > 0\n                - upper bound is NOT validated against device capabilities\n\n            PaSampleFormat inputParameters->sampleFormat\n                - is one of the sample formats defined in portaudio.h\n\n            void *inputParameters->hostApiSpecificStreamInfo\n                - if supplied its hostApi field matches the input device's host Api\n\n            PaDeviceIndex outputParmeters->device\n                - is within range (0 to Pa_CountDevices-1)\n\n            int outputParmeters->numChannels\n                - if inputDevice is valid, numInputChannels is > 0\n                - upper bound is NOT validated against device capabilities\n\n            PaSampleFormat outputParmeters->sampleFormat\n                - is one of the sample formats defined in portaudio.h\n\n            void *outputParmeters->hostApiSpecificStreamInfo\n                - if supplied its hostApi field matches the output device's host Api\n\n            double sampleRate\n                - is not an 'absurd' rate (less than 1000. or greater than 384000.)\n                - sampleRate is NOT validated against device capabilities\n\n            PaStreamFlags streamFlags\n                - unused platform neutral flags are zero\n                - paNeverDropInput is only used for full-duplex callback streams\n                    with variable buffer size (paFramesPerBufferUnspecified)\n\n            [*END PA FRONT VALIDATIONS*]\n\n\n        The following validations MUST be performed by (*OpenStream)():\n\n            - check that input device can support numInputChannels\n\n            - check that input device can support inputSampleFormat, or that\n                we have the capability to convert from outputSampleFormat to\n                a native format\n\n            - if inputStreamInfo is supplied, validate its contents,\n                or return an error if no inputStreamInfo is expected\n\n            - check that output device can support numOutputChannels\n\n            - check that output device can support outputSampleFormat, or that\n                we have the capability to convert from outputSampleFormat to\n                a native format\n\n            - if outputStreamInfo is supplied, validate its contents,\n                or return an error if no outputStreamInfo is expected\n\n            - if a full duplex stream is requested, check that the combination\n                of input and output parameters is supported\n\n            - check that the device supports sampleRate\n\n            - alter sampleRate to a close allowable rate if necessary\n\n            - validate inputLatency and outputLatency\n\n            - validate any platform specific flags, if flags are supplied they\n                must be valid.\n    */\n    PaError (*OpenStream)( struct PaUtilHostApiRepresentation *hostApi,\n                           PaStream** stream,\n                           const PaStreamParameters *inputParameters,\n                           const PaStreamParameters *outputParameters,\n                           double sampleRate,\n                           unsigned long framesPerCallback,\n                           PaStreamFlags streamFlags,\n                           PaStreamCallback *streamCallback,\n                           void *userData );\n\n\n    PaError (*IsFormatSupported)( struct PaUtilHostApiRepresentation *hostApi,\n                                  const PaStreamParameters *inputParameters,\n                                  const PaStreamParameters *outputParameters,\n                                  double sampleRate );\n} PaUtilHostApiRepresentation;\n\n\n/** Prototype for the initialization function which must be implemented by every\n host API.\n\n This function should only return an error other than paNoError if it encounters\n an unexpected and fatal error (memory allocation error for example). In general,\n there may be conditions under which it returns a NULL interface pointer and also\n returns paNoError. For example, if the ASIO implementation detects that ASIO is\n not installed, it should return a NULL interface, and paNoError.\n\n @see paHostApiInitializers\n*/\ntypedef PaError PaUtilHostApiInitializer( PaUtilHostApiRepresentation**, PaHostApiIndex );\n\n\n/** paHostApiInitializers is a NULL-terminated array of host API initialization\n functions. These functions are called by pa_front.c to initialize the host APIs\n when the client calls Pa_Initialize().\n\n The initialization functions are invoked in order.\n\n The first successfully initialized host API that has a default input *or* output\n device is used as the default PortAudio host API. This is based on the logic that\n there is only one default host API, and it must contain the default input and output\n devices (if defined).\n\n There is a platform specific file that defines paHostApiInitializers for that\n platform, pa_win/pa_win_hostapis.c contains the Win32 definitions for example.\n*/\nextern PaUtilHostApiInitializer *paHostApiInitializers[];\n\n\n#ifdef __cplusplus\n}\n#endif /* __cplusplus */\n#endif /* PA_HOSTAPI_H */\n"
  },
  {
    "path": "thirdparty/portaudio/src/common/pa_memorybarrier.h",
    "content": "/*\n * $Id: pa_memorybarrier.h 1240 2007-07-17 13:05:07Z bjornroche $\n * Portable Audio I/O Library\n * Memory barrier utilities\n *\n * Author: Bjorn Roche, XO Audio, LLC\n *\n * This program uses the PortAudio Portable Audio Library.\n * For more information see: http://www.portaudio.com\n * Copyright (c) 1999-2000 Ross Bencina and Phil Burk\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n/**\n @file pa_memorybarrier.h\n @ingroup common_src\n*/\n\n/****************\n * Some memory barrier primitives based on the system.\n * right now only OS X, FreeBSD, and Linux are supported. In addition to providing\n * memory barriers, these functions should ensure that data cached in registers\n * is written out to cache where it can be snooped by other CPUs. (ie, the volatile\n * keyword should not be required)\n *\n * the primitives that must be defined are:\n *\n * PaUtil_FullMemoryBarrier()\n * PaUtil_ReadMemoryBarrier()\n * PaUtil_WriteMemoryBarrier()\n *\n ****************/\n\n#if defined(__APPLE__)\n#   include <libkern/OSAtomic.h>\n    /* Here are the memory barrier functions. Mac OS X only provides\n       full memory barriers, so the three types of barriers are the same,\n       however, these barriers are superior to compiler-based ones. */\n#   define PaUtil_FullMemoryBarrier()  OSMemoryBarrier()\n#   define PaUtil_ReadMemoryBarrier()  OSMemoryBarrier()\n#   define PaUtil_WriteMemoryBarrier() OSMemoryBarrier()\n#elif defined(__GNUC__)\n    /* GCC >= 4.1 has built-in intrinsics. We'll use those */\n#   if (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 1)\n#       define PaUtil_FullMemoryBarrier()  __sync_synchronize()\n#       define PaUtil_ReadMemoryBarrier()  __sync_synchronize()\n#       define PaUtil_WriteMemoryBarrier() __sync_synchronize()\n    /* as a fallback, GCC understands volatile asm and \"memory\" to mean it\n     * should not reorder memory read/writes */\n    /* Note that it is not clear that any compiler actually defines __PPC__,\n     * it can probably removed safely. */\n#   elif defined( __ppc__ ) || defined( __powerpc__) || defined( __PPC__ )\n#       define PaUtil_FullMemoryBarrier()  asm volatile(\"sync\":::\"memory\")\n#       define PaUtil_ReadMemoryBarrier()  asm volatile(\"sync\":::\"memory\")\n#       define PaUtil_WriteMemoryBarrier() asm volatile(\"sync\":::\"memory\")\n#   elif defined( __i386__ ) || defined( __i486__ ) || defined( __i586__ ) || \\\n            defined( __i686__ ) || defined( __x86_64__ )\n#       define PaUtil_FullMemoryBarrier()  asm volatile(\"mfence\":::\"memory\")\n#       define PaUtil_ReadMemoryBarrier()  asm volatile(\"lfence\":::\"memory\")\n#       define PaUtil_WriteMemoryBarrier() asm volatile(\"sfence\":::\"memory\")\n#   else\n#       ifdef ALLOW_SMP_DANGERS\n#           warning Memory barriers not defined on this system or system unknown\n#           warning For SMP safety, you should fix this.\n#           define PaUtil_FullMemoryBarrier()\n#           define PaUtil_ReadMemoryBarrier()\n#           define PaUtil_WriteMemoryBarrier()\n#       else\n#           error Memory barriers are not defined on this system. You can still compile by defining ALLOW_SMP_DANGERS, but SMP safety will not be guaranteed.\n#       endif\n#   endif\n#elif (_MSC_VER >= 1400) && !defined(_WIN32_WCE)\n#   include <intrin.h>\n#   pragma intrinsic(_ReadWriteBarrier)\n#   pragma intrinsic(_ReadBarrier)\n#   pragma intrinsic(_WriteBarrier)\n/* note that MSVC intrinsics _ReadWriteBarrier(), _ReadBarrier(), _WriteBarrier() are just compiler barriers *not* memory barriers */\n#   define PaUtil_FullMemoryBarrier()  _ReadWriteBarrier()\n#   define PaUtil_ReadMemoryBarrier()  _ReadBarrier()\n#   define PaUtil_WriteMemoryBarrier() _WriteBarrier()\n#elif defined(_WIN32_WCE)\n#   define PaUtil_FullMemoryBarrier()\n#   define PaUtil_ReadMemoryBarrier()\n#   define PaUtil_WriteMemoryBarrier()\n#elif defined(_MSC_VER) || defined(__BORLANDC__)\n#   define PaUtil_FullMemoryBarrier()  _asm { lock add    [esp], 0 }\n#   define PaUtil_ReadMemoryBarrier()  _asm { lock add    [esp], 0 }\n#   define PaUtil_WriteMemoryBarrier() _asm { lock add    [esp], 0 }\n#else\n#   ifdef ALLOW_SMP_DANGERS\n#       warning Memory barriers not defined on this system or system unknown\n#       warning For SMP safety, you should fix this.\n#       define PaUtil_FullMemoryBarrier()\n#       define PaUtil_ReadMemoryBarrier()\n#       define PaUtil_WriteMemoryBarrier()\n#   else\n#       error Memory barriers are not defined on this system. You can still compile by defining ALLOW_SMP_DANGERS, but SMP safety will not be guaranteed.\n#   endif\n#endif\n"
  },
  {
    "path": "thirdparty/portaudio/src/common/pa_process.c",
    "content": "/*\n * $Id$\n * Portable Audio I/O Library\n * streamCallback <-> host buffer processing adapter\n *\n * Based on the Open Source API proposed by Ross Bencina\n * Copyright (c) 1999-2002 Ross Bencina, Phil Burk\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n/** @file\n @ingroup common_src\n\n @brief Buffer Processor implementation.\n*/\n\n\n#include <assert.h>\n#include <string.h> /* memset() */\n\n#include \"pa_process.h\"\n#include \"pa_util.h\"\n\n\n#define PA_FRAMES_PER_TEMP_BUFFER_WHEN_HOST_BUFFER_SIZE_IS_UNKNOWN_    1024\n\n#define PA_MIN_( a, b ) ( ((a)<(b)) ? (a) : (b) )\n\n\n/* greatest common divisor - PGCD in French */\nstatic unsigned long GCD( unsigned long a, unsigned long b )\n{\n    return (b==0) ? a : GCD( b, a%b);\n}\n\n/* least common multiple - PPCM in French */\nstatic unsigned long LCM( unsigned long a, unsigned long b )\n{\n    return (a*b) / GCD(a,b);\n}\n\n#define PA_MAX_( a, b ) (((a) > (b)) ? (a) : (b))\n\nstatic unsigned long CalculateFrameShift( unsigned long M, unsigned long N )\n{\n    unsigned long result = 0;\n    unsigned long i;\n    unsigned long lcm;\n\n    assert( M > 0 );\n    assert( N > 0 );\n\n    lcm = LCM( M, N );\n    for( i = M; i < lcm; i += M )\n        result = PA_MAX_( result, i % N );\n\n    return result;\n}\n\n\nPaError PaUtil_InitializeBufferProcessor( PaUtilBufferProcessor* bp,\n        int inputChannelCount, PaSampleFormat userInputSampleFormat,\n        PaSampleFormat hostInputSampleFormat,\n        int outputChannelCount, PaSampleFormat userOutputSampleFormat,\n        PaSampleFormat hostOutputSampleFormat,\n        double sampleRate,\n        PaStreamFlags streamFlags,\n        unsigned long framesPerUserBuffer,\n        unsigned long framesPerHostBuffer,\n        PaUtilHostBufferSizeMode hostBufferSizeMode,\n        PaStreamCallback *streamCallback, void *userData )\n{\n    PaError result = paNoError;\n    PaError bytesPerSample;\n    unsigned long tempInputBufferSize, tempOutputBufferSize;\n    PaStreamFlags tempInputStreamFlags;\n\n    if( streamFlags & paNeverDropInput )\n    {\n        /* paNeverDropInput is only valid for full-duplex callback streams, with an unspecified number of frames per buffer. */\n        if( !streamCallback || !(inputChannelCount > 0 && outputChannelCount > 0) ||\n                framesPerUserBuffer != paFramesPerBufferUnspecified )\n            return paInvalidFlag;\n    }\n\n    /* initialize buffer ptrs to zero so they can be freed if necessary in error */\n    bp->tempInputBuffer = 0;\n    bp->tempInputBufferPtrs = 0;\n    bp->tempOutputBuffer = 0;\n    bp->tempOutputBufferPtrs = 0;\n\n    bp->framesPerUserBuffer = framesPerUserBuffer;\n    bp->framesPerHostBuffer = framesPerHostBuffer;\n\n    bp->inputChannelCount = inputChannelCount;\n    bp->outputChannelCount = outputChannelCount;\n\n    bp->hostBufferSizeMode = hostBufferSizeMode;\n\n    bp->hostInputChannels[0] = bp->hostInputChannels[1] = 0;\n    bp->hostOutputChannels[0] = bp->hostOutputChannels[1] = 0;\n\n    if( framesPerUserBuffer == 0 ) /* streamCallback will accept any buffer size */\n    {\n        bp->useNonAdaptingProcess = 1;\n        bp->initialFramesInTempInputBuffer = 0;\n        bp->initialFramesInTempOutputBuffer = 0;\n\n        if( hostBufferSizeMode == paUtilFixedHostBufferSize\n                || hostBufferSizeMode == paUtilBoundedHostBufferSize )\n        {\n            bp->framesPerTempBuffer = framesPerHostBuffer;\n        }\n        else /* unknown host buffer size */\n        {\n            bp->framesPerTempBuffer = PA_FRAMES_PER_TEMP_BUFFER_WHEN_HOST_BUFFER_SIZE_IS_UNKNOWN_;\n        }\n    }\n    else\n    {\n        bp->framesPerTempBuffer = framesPerUserBuffer;\n\n        if( hostBufferSizeMode == paUtilFixedHostBufferSize\n                && framesPerHostBuffer % framesPerUserBuffer == 0 )\n        {\n            bp->useNonAdaptingProcess = 1;\n            bp->initialFramesInTempInputBuffer = 0;\n            bp->initialFramesInTempOutputBuffer = 0;\n        }\n        else\n        {\n            bp->useNonAdaptingProcess = 0;\n\n            if( inputChannelCount > 0 && outputChannelCount > 0 )\n            {\n                /* full duplex */\n                if( hostBufferSizeMode == paUtilFixedHostBufferSize )\n                {\n                    unsigned long frameShift =\n                        CalculateFrameShift( framesPerHostBuffer, framesPerUserBuffer );\n\n                    if( framesPerUserBuffer > framesPerHostBuffer )\n                    {\n                        bp->initialFramesInTempInputBuffer = frameShift;\n                        bp->initialFramesInTempOutputBuffer = 0;\n                    }\n                    else\n                    {\n                        bp->initialFramesInTempInputBuffer = 0;\n                        bp->initialFramesInTempOutputBuffer = frameShift;\n                    }\n                }\n                else /* variable host buffer size, add framesPerUserBuffer latency */\n                {\n                    bp->initialFramesInTempInputBuffer = 0;\n                    bp->initialFramesInTempOutputBuffer = framesPerUserBuffer;\n                }\n            }\n            else\n            {\n                /* half duplex */\n                bp->initialFramesInTempInputBuffer = 0;\n                bp->initialFramesInTempOutputBuffer = 0;\n            }\n        }\n    }\n\n\n    bp->framesInTempInputBuffer = bp->initialFramesInTempInputBuffer;\n    bp->framesInTempOutputBuffer = bp->initialFramesInTempOutputBuffer;\n\n\n    if( inputChannelCount > 0 )\n    {\n        bytesPerSample = Pa_GetSampleSize( hostInputSampleFormat );\n        if( bytesPerSample > 0 )\n        {\n            bp->bytesPerHostInputSample = bytesPerSample;\n        }\n        else\n        {\n            result = bytesPerSample;\n            goto error;\n        }\n\n        bytesPerSample = Pa_GetSampleSize( userInputSampleFormat );\n        if( bytesPerSample > 0 )\n        {\n            bp->bytesPerUserInputSample = bytesPerSample;\n        }\n        else\n        {\n            result = bytesPerSample;\n            goto error;\n        }\n\n        /* Under the assumption that no ADC in existence delivers better than 24bits resolution,\n            we disable dithering when host input format is paInt32 and user format is paInt24,\n            since the host samples will just be padded with zeros anyway. */\n\n        tempInputStreamFlags = streamFlags;\n        if( !(tempInputStreamFlags & paDitherOff) /* dither is on */\n                && (hostInputSampleFormat & paInt32) /* host input format is int32 */\n                && (userInputSampleFormat & paInt24) /* user requested format is int24 */ ){\n\n            tempInputStreamFlags = tempInputStreamFlags | paDitherOff;\n        }\n\n        bp->inputConverter =\n            PaUtil_SelectConverter( hostInputSampleFormat, userInputSampleFormat, tempInputStreamFlags );\n\n        bp->inputZeroer = PaUtil_SelectZeroer( userInputSampleFormat );\n\n        bp->userInputIsInterleaved = (userInputSampleFormat & paNonInterleaved)?0:1;\n\n        bp->hostInputIsInterleaved = (hostInputSampleFormat & paNonInterleaved)?0:1;\n\n        bp->userInputSampleFormatIsEqualToHost = ((userInputSampleFormat & ~paNonInterleaved) == (hostInputSampleFormat & ~paNonInterleaved));\n\n        tempInputBufferSize =\n            bp->framesPerTempBuffer * bp->bytesPerUserInputSample * inputChannelCount;\n\n        bp->tempInputBuffer = PaUtil_AllocateMemory( tempInputBufferSize );\n        if( bp->tempInputBuffer == 0 )\n        {\n            result = paInsufficientMemory;\n            goto error;\n        }\n\n        if( bp->framesInTempInputBuffer > 0 )\n            memset( bp->tempInputBuffer, 0, tempInputBufferSize );\n\n        if( userInputSampleFormat & paNonInterleaved )\n        {\n            bp->tempInputBufferPtrs =\n                (void **)PaUtil_AllocateMemory( sizeof(void*)*inputChannelCount );\n            if( bp->tempInputBufferPtrs == 0 )\n            {\n                result = paInsufficientMemory;\n                goto error;\n            }\n        }\n\n        bp->hostInputChannels[0] = (PaUtilChannelDescriptor*)\n                PaUtil_AllocateMemory( sizeof(PaUtilChannelDescriptor) * inputChannelCount * 2);\n        if( bp->hostInputChannels[0] == 0 )\n        {\n            result = paInsufficientMemory;\n            goto error;\n        }\n\n        bp->hostInputChannels[1] = &bp->hostInputChannels[0][inputChannelCount];\n    }\n\n    if( outputChannelCount > 0 )\n    {\n        bytesPerSample = Pa_GetSampleSize( hostOutputSampleFormat );\n        if( bytesPerSample > 0 )\n        {\n            bp->bytesPerHostOutputSample = bytesPerSample;\n        }\n        else\n        {\n            result = bytesPerSample;\n            goto error;\n        }\n\n        bytesPerSample = Pa_GetSampleSize( userOutputSampleFormat );\n        if( bytesPerSample > 0 )\n        {\n            bp->bytesPerUserOutputSample = bytesPerSample;\n        }\n        else\n        {\n            result = bytesPerSample;\n            goto error;\n        }\n\n        bp->outputConverter =\n            PaUtil_SelectConverter( userOutputSampleFormat, hostOutputSampleFormat, streamFlags );\n\n        bp->outputZeroer = PaUtil_SelectZeroer( hostOutputSampleFormat );\n\n        bp->userOutputIsInterleaved = (userOutputSampleFormat & paNonInterleaved)?0:1;\n\n        bp->hostOutputIsInterleaved = (hostOutputSampleFormat & paNonInterleaved)?0:1;\n\n        bp->userOutputSampleFormatIsEqualToHost = ((userOutputSampleFormat & ~paNonInterleaved) == (hostOutputSampleFormat & ~paNonInterleaved));\n\n        tempOutputBufferSize =\n                bp->framesPerTempBuffer * bp->bytesPerUserOutputSample * outputChannelCount;\n\n        bp->tempOutputBuffer = PaUtil_AllocateMemory( tempOutputBufferSize );\n        if( bp->tempOutputBuffer == 0 )\n        {\n            result = paInsufficientMemory;\n            goto error;\n        }\n\n        if( bp->framesInTempOutputBuffer > 0 )\n            memset( bp->tempOutputBuffer, 0, tempOutputBufferSize );\n\n        if( userOutputSampleFormat & paNonInterleaved )\n        {\n            bp->tempOutputBufferPtrs =\n                (void **)PaUtil_AllocateMemory( sizeof(void*)*outputChannelCount );\n            if( bp->tempOutputBufferPtrs == 0 )\n            {\n                result = paInsufficientMemory;\n                goto error;\n            }\n        }\n\n        bp->hostOutputChannels[0] = (PaUtilChannelDescriptor*)\n                PaUtil_AllocateMemory( sizeof(PaUtilChannelDescriptor)*outputChannelCount * 2 );\n        if( bp->hostOutputChannels[0] == 0 )\n        {\n            result = paInsufficientMemory;\n            goto error;\n        }\n\n        bp->hostOutputChannels[1] = &bp->hostOutputChannels[0][outputChannelCount];\n    }\n\n    PaUtil_InitializeTriangularDitherState( &bp->ditherGenerator );\n\n    bp->samplePeriod = 1. / sampleRate;\n\n    bp->streamCallback = streamCallback;\n    bp->userData = userData;\n\n    return result;\n\nerror:\n    if( bp->tempInputBuffer )\n        PaUtil_FreeMemory( bp->tempInputBuffer );\n\n    if( bp->tempInputBufferPtrs )\n        PaUtil_FreeMemory( bp->tempInputBufferPtrs );\n\n    if( bp->hostInputChannels[0] )\n        PaUtil_FreeMemory( bp->hostInputChannels[0] );\n\n    if( bp->tempOutputBuffer )\n        PaUtil_FreeMemory( bp->tempOutputBuffer );\n\n    if( bp->tempOutputBufferPtrs )\n        PaUtil_FreeMemory( bp->tempOutputBufferPtrs );\n\n    if( bp->hostOutputChannels[0] )\n        PaUtil_FreeMemory( bp->hostOutputChannels[0] );\n\n    return result;\n}\n\n\nvoid PaUtil_TerminateBufferProcessor( PaUtilBufferProcessor* bp )\n{\n    if( bp->tempInputBuffer )\n        PaUtil_FreeMemory( bp->tempInputBuffer );\n\n    if( bp->tempInputBufferPtrs )\n        PaUtil_FreeMemory( bp->tempInputBufferPtrs );\n\n    if( bp->hostInputChannels[0] )\n        PaUtil_FreeMemory( bp->hostInputChannels[0] );\n\n    if( bp->tempOutputBuffer )\n        PaUtil_FreeMemory( bp->tempOutputBuffer );\n\n    if( bp->tempOutputBufferPtrs )\n        PaUtil_FreeMemory( bp->tempOutputBufferPtrs );\n\n    if( bp->hostOutputChannels[0] )\n        PaUtil_FreeMemory( bp->hostOutputChannels[0] );\n}\n\n\nvoid PaUtil_ResetBufferProcessor( PaUtilBufferProcessor* bp )\n{\n    unsigned long tempInputBufferSize, tempOutputBufferSize;\n\n    bp->framesInTempInputBuffer = bp->initialFramesInTempInputBuffer;\n    bp->framesInTempOutputBuffer = bp->initialFramesInTempOutputBuffer;\n\n    if( bp->framesInTempInputBuffer > 0 )\n    {\n        tempInputBufferSize =\n            bp->framesPerTempBuffer * bp->bytesPerUserInputSample * bp->inputChannelCount;\n        memset( bp->tempInputBuffer, 0, tempInputBufferSize );\n    }\n\n    if( bp->framesInTempOutputBuffer > 0 )\n    {\n        tempOutputBufferSize =\n            bp->framesPerTempBuffer * bp->bytesPerUserOutputSample * bp->outputChannelCount;\n        memset( bp->tempOutputBuffer, 0, tempOutputBufferSize );\n    }\n}\n\n\nunsigned long PaUtil_GetBufferProcessorInputLatencyFrames( PaUtilBufferProcessor* bp )\n{\n    return bp->initialFramesInTempInputBuffer;\n}\n\n\nunsigned long PaUtil_GetBufferProcessorOutputLatencyFrames( PaUtilBufferProcessor* bp )\n{\n    return bp->initialFramesInTempOutputBuffer;\n}\n\n\nvoid PaUtil_SetInputFrameCount( PaUtilBufferProcessor* bp,\n        unsigned long frameCount )\n{\n    if( frameCount == 0 )\n        bp->hostInputFrameCount[0] = bp->framesPerHostBuffer;\n    else\n        bp->hostInputFrameCount[0] = frameCount;\n}\n\n\nvoid PaUtil_SetNoInput( PaUtilBufferProcessor* bp )\n{\n    assert( bp->inputChannelCount > 0 );\n\n    bp->hostInputChannels[0][0].data = 0;\n}\n\n\nvoid PaUtil_SetInputChannel( PaUtilBufferProcessor* bp,\n        unsigned int channel, void *data, unsigned int stride )\n{\n    assert( channel < bp->inputChannelCount );\n\n    bp->hostInputChannels[0][channel].data = data;\n    bp->hostInputChannels[0][channel].stride = stride;\n}\n\n\nvoid PaUtil_SetInterleavedInputChannels( PaUtilBufferProcessor* bp,\n        unsigned int firstChannel, void *data, unsigned int channelCount )\n{\n    unsigned int i;\n    unsigned int channel = firstChannel;\n    unsigned char *p = (unsigned char*)data;\n\n    if( channelCount == 0 )\n        channelCount = bp->inputChannelCount;\n\n    assert( firstChannel < bp->inputChannelCount );\n    assert( firstChannel + channelCount <= bp->inputChannelCount );\n    assert( bp->hostInputIsInterleaved );\n\n    for( i=0; i< channelCount; ++i )\n    {\n        bp->hostInputChannels[0][channel+i].data = p;\n        p += bp->bytesPerHostInputSample;\n        bp->hostInputChannels[0][channel+i].stride = channelCount;\n    }\n}\n\n\nvoid PaUtil_SetNonInterleavedInputChannel( PaUtilBufferProcessor* bp,\n        unsigned int channel, void *data )\n{\n    assert( channel < bp->inputChannelCount );\n    assert( !bp->hostInputIsInterleaved );\n\n    bp->hostInputChannels[0][channel].data = data;\n    bp->hostInputChannels[0][channel].stride = 1;\n}\n\n\nvoid PaUtil_Set2ndInputFrameCount( PaUtilBufferProcessor* bp,\n        unsigned long frameCount )\n{\n    bp->hostInputFrameCount[1] = frameCount;\n}\n\n\nvoid PaUtil_Set2ndInputChannel( PaUtilBufferProcessor* bp,\n        unsigned int channel, void *data, unsigned int stride )\n{\n    assert( channel < bp->inputChannelCount );\n\n    bp->hostInputChannels[1][channel].data = data;\n    bp->hostInputChannels[1][channel].stride = stride;\n}\n\n\nvoid PaUtil_Set2ndInterleavedInputChannels( PaUtilBufferProcessor* bp,\n        unsigned int firstChannel, void *data, unsigned int channelCount )\n{\n    unsigned int i;\n    unsigned int channel = firstChannel;\n    unsigned char *p = (unsigned char*)data;\n\n    if( channelCount == 0 )\n        channelCount = bp->inputChannelCount;\n\n    assert( firstChannel < bp->inputChannelCount );\n    assert( firstChannel + channelCount <= bp->inputChannelCount );\n    assert( bp->hostInputIsInterleaved );\n\n    for( i=0; i< channelCount; ++i )\n    {\n        bp->hostInputChannels[1][channel+i].data = p;\n        p += bp->bytesPerHostInputSample;\n        bp->hostInputChannels[1][channel+i].stride = channelCount;\n    }\n}\n\n\nvoid PaUtil_Set2ndNonInterleavedInputChannel( PaUtilBufferProcessor* bp,\n        unsigned int channel, void *data )\n{\n    assert( channel < bp->inputChannelCount );\n    assert( !bp->hostInputIsInterleaved );\n\n    bp->hostInputChannels[1][channel].data = data;\n    bp->hostInputChannels[1][channel].stride = 1;\n}\n\n\nvoid PaUtil_SetOutputFrameCount( PaUtilBufferProcessor* bp,\n        unsigned long frameCount )\n{\n    if( frameCount == 0 )\n        bp->hostOutputFrameCount[0] = bp->framesPerHostBuffer;\n    else\n        bp->hostOutputFrameCount[0] = frameCount;\n}\n\n\nvoid PaUtil_SetNoOutput( PaUtilBufferProcessor* bp )\n{\n    assert( bp->outputChannelCount > 0 );\n\n    bp->hostOutputChannels[0][0].data = 0;\n\n    /* note that only NonAdaptingProcess is able to deal with no output at this stage. not implemented for AdaptingProcess */\n}\n\n\nvoid PaUtil_SetOutputChannel( PaUtilBufferProcessor* bp,\n        unsigned int channel, void *data, unsigned int stride )\n{\n    assert( channel < bp->outputChannelCount );\n    assert( data != NULL );\n\n    bp->hostOutputChannels[0][channel].data = data;\n    bp->hostOutputChannels[0][channel].stride = stride;\n}\n\n\nvoid PaUtil_SetInterleavedOutputChannels( PaUtilBufferProcessor* bp,\n        unsigned int firstChannel, void *data, unsigned int channelCount )\n{\n    unsigned int i;\n    unsigned int channel = firstChannel;\n    unsigned char *p = (unsigned char*)data;\n\n    if( channelCount == 0 )\n        channelCount = bp->outputChannelCount;\n\n    assert( firstChannel < bp->outputChannelCount );\n    assert( firstChannel + channelCount <= bp->outputChannelCount );\n    assert( bp->hostOutputIsInterleaved );\n\n    for( i=0; i< channelCount; ++i )\n    {\n        PaUtil_SetOutputChannel( bp, channel + i, p, channelCount );\n        p += bp->bytesPerHostOutputSample;\n    }\n}\n\n\nvoid PaUtil_SetNonInterleavedOutputChannel( PaUtilBufferProcessor* bp,\n        unsigned int channel, void *data )\n{\n    assert( channel < bp->outputChannelCount );\n    assert( !bp->hostOutputIsInterleaved );\n\n    PaUtil_SetOutputChannel( bp, channel, data, 1 );\n}\n\n\nvoid PaUtil_Set2ndOutputFrameCount( PaUtilBufferProcessor* bp,\n        unsigned long frameCount )\n{\n    bp->hostOutputFrameCount[1] = frameCount;\n}\n\n\nvoid PaUtil_Set2ndOutputChannel( PaUtilBufferProcessor* bp,\n        unsigned int channel, void *data, unsigned int stride )\n{\n    assert( channel < bp->outputChannelCount );\n    assert( data != NULL );\n\n    bp->hostOutputChannels[1][channel].data = data;\n    bp->hostOutputChannels[1][channel].stride = stride;\n}\n\n\nvoid PaUtil_Set2ndInterleavedOutputChannels( PaUtilBufferProcessor* bp,\n        unsigned int firstChannel, void *data, unsigned int channelCount )\n{\n    unsigned int i;\n    unsigned int channel = firstChannel;\n    unsigned char *p = (unsigned char*)data;\n\n    if( channelCount == 0 )\n        channelCount = bp->outputChannelCount;\n\n    assert( firstChannel < bp->outputChannelCount );\n    assert( firstChannel + channelCount <= bp->outputChannelCount );\n    assert( bp->hostOutputIsInterleaved );\n\n    for( i=0; i< channelCount; ++i )\n    {\n        PaUtil_Set2ndOutputChannel( bp, channel + i, p, channelCount );\n        p += bp->bytesPerHostOutputSample;\n    }\n}\n\n\nvoid PaUtil_Set2ndNonInterleavedOutputChannel( PaUtilBufferProcessor* bp,\n        unsigned int channel, void *data )\n{\n    assert( channel < bp->outputChannelCount );\n    assert( !bp->hostOutputIsInterleaved );\n\n    PaUtil_Set2ndOutputChannel( bp, channel, data, 1 );\n}\n\n\nvoid PaUtil_BeginBufferProcessing( PaUtilBufferProcessor* bp,\n        PaStreamCallbackTimeInfo* timeInfo, PaStreamCallbackFlags callbackStatusFlags )\n{\n    bp->timeInfo = timeInfo;\n\n    /* the first streamCallback will be called to process samples which are\n        currently in the input buffer before the ones starting at the timeInfo time */\n\n    bp->timeInfo->inputBufferAdcTime -= bp->framesInTempInputBuffer * bp->samplePeriod;\n\n    /* We just pass through timeInfo->currentTime provided by the caller. This is\n        not strictly conformant to the word of the spec, since the buffer processor\n        might call the callback multiple times, and we never refresh currentTime. */\n\n    /* the first streamCallback will be called to generate samples which will be\n        outputted after the frames currently in the output buffer have been\n        outputted. */\n    bp->timeInfo->outputBufferDacTime += bp->framesInTempOutputBuffer * bp->samplePeriod;\n\n    bp->callbackStatusFlags = callbackStatusFlags;\n\n    bp->hostInputFrameCount[1] = 0;\n    bp->hostOutputFrameCount[1] = 0;\n}\n\n\n/*\n    NonAdaptingProcess() is a simple buffer copying adaptor that can handle\n    both full and half duplex copies. It processes framesToProcess frames,\n    broken into blocks bp->framesPerTempBuffer long.\n    This routine can be used when the streamCallback doesn't care what length\n    the buffers are, or when framesToProcess is an integer multiple of\n    bp->framesPerTempBuffer, in which case streamCallback will always be called\n    with bp->framesPerTempBuffer samples.\n*/\nstatic unsigned long NonAdaptingProcess( PaUtilBufferProcessor *bp,\n        int *streamCallbackResult,\n        PaUtilChannelDescriptor *hostInputChannels,\n        PaUtilChannelDescriptor *hostOutputChannels,\n        unsigned long framesToProcess )\n{\n    void *userInput, *userOutput;\n    unsigned char *srcBytePtr, *destBytePtr;\n    unsigned int srcSampleStrideSamples; /* stride from one sample to the next within a channel, in samples */\n    unsigned int srcChannelStrideBytes; /* stride from one channel to the next, in bytes */\n    unsigned int destSampleStrideSamples; /* stride from one sample to the next within a channel, in samples */\n    unsigned int destChannelStrideBytes; /* stride from one channel to the next, in bytes */\n    unsigned int i;\n    unsigned long frameCount;\n    unsigned long framesToGo = framesToProcess;\n    unsigned long framesProcessed = 0;\n    int skipOutputConvert = 0;\n    int skipInputConvert = 0;\n\n\n    if( *streamCallbackResult == paContinue )\n    {\n        do\n        {\n            frameCount = PA_MIN_( bp->framesPerTempBuffer, framesToGo );\n\n            /* configure user input buffer and convert input data (host -> user) */\n            if( bp->inputChannelCount == 0 )\n            {\n                /* no input */\n                userInput = 0;\n            }\n            else /* there are input channels */\n            {\n\n                destBytePtr = (unsigned char *)bp->tempInputBuffer;\n\n                if( bp->userInputIsInterleaved )\n                {\n                    destSampleStrideSamples = bp->inputChannelCount;\n                    destChannelStrideBytes = bp->bytesPerUserInputSample;\n\n                    /* process host buffer directly, or use temp buffer if formats differ or host buffer non-interleaved,\n                     * or if num channels differs between the host (set in stride) and the user (eg with some Alsa hw:) */\n                    if( bp->userInputSampleFormatIsEqualToHost && bp->hostInputIsInterleaved\n                        && bp->hostInputChannels[0][0].data && bp->inputChannelCount == hostInputChannels[0].stride )\n                    {\n                        userInput = hostInputChannels[0].data;\n                        destBytePtr = (unsigned char *)hostInputChannels[0].data;\n                        skipInputConvert = 1;\n                    }\n                    else\n                    {\n                        userInput = bp->tempInputBuffer;\n                    }\n                }\n                else /* user input is not interleaved */\n                {\n                    destSampleStrideSamples = 1;\n                    destChannelStrideBytes = frameCount * bp->bytesPerUserInputSample;\n\n                    /* setup non-interleaved ptrs */\n                    if( bp->userInputSampleFormatIsEqualToHost && !bp->hostInputIsInterleaved && bp->hostInputChannels[0][0].data )\n                    {\n                        for( i=0; i<bp->inputChannelCount; ++i )\n                        {\n                            bp->tempInputBufferPtrs[i] = hostInputChannels[i].data;\n                        }\n                        skipInputConvert = 1;\n                    }\n                    else\n                    {\n                        for( i=0; i<bp->inputChannelCount; ++i )\n                        {\n                            bp->tempInputBufferPtrs[i] = ((unsigned char*)bp->tempInputBuffer) +\n                                i * bp->bytesPerUserInputSample * frameCount;\n                        }\n                    }\n\n                    userInput = bp->tempInputBufferPtrs;\n                }\n\n                if( !bp->hostInputChannels[0][0].data )\n                {\n                    /* no input was supplied (see PaUtil_SetNoInput), so\n                        zero the input buffer */\n\n                    for( i=0; i<bp->inputChannelCount; ++i )\n                    {\n                        bp->inputZeroer( destBytePtr, destSampleStrideSamples, frameCount );\n                        destBytePtr += destChannelStrideBytes;  /* skip to next destination channel */\n                    }\n                }\n                else\n                {\n                    if( skipInputConvert )\n                    {\n                        for( i=0; i<bp->inputChannelCount; ++i )\n                        {\n                            /* advance src ptr for next iteration */\n                            hostInputChannels[i].data = ((unsigned char*)hostInputChannels[i].data) +\n                                    frameCount * hostInputChannels[i].stride * bp->bytesPerHostInputSample;\n                        }\n                    }\n                    else\n                    {\n                        for( i=0; i<bp->inputChannelCount; ++i )\n                        {\n                            bp->inputConverter( destBytePtr, destSampleStrideSamples,\n                                                    hostInputChannels[i].data,\n                                                    hostInputChannels[i].stride,\n                                                    frameCount, &bp->ditherGenerator );\n\n                            destBytePtr += destChannelStrideBytes;  /* skip to next destination channel */\n\n                            /* advance src ptr for next iteration */\n                            hostInputChannels[i].data = ((unsigned char*)hostInputChannels[i].data) +\n                                    frameCount * hostInputChannels[i].stride * bp->bytesPerHostInputSample;\n                        }\n                    }\n                }\n            }\n\n            /* configure user output buffer */\n            if( bp->outputChannelCount == 0 )\n            {\n                /* no output */\n                userOutput = 0;\n            }\n            else /* there are output channels */\n            {\n                if( bp->userOutputIsInterleaved )\n                {\n                    /* process host buffer directly, or use temp buffer if formats differ or host buffer non-interleaved,\n                     * or if num channels differs between the host (set in stride) and the user (eg with some Alsa hw:) */\n                    if( bp->userOutputSampleFormatIsEqualToHost && bp->hostOutputIsInterleaved\n                            && bp->outputChannelCount == hostOutputChannels[0].stride )\n                    {\n                        userOutput = hostOutputChannels[0].data;\n                        skipOutputConvert = 1;\n                    }\n                    else\n                    {\n                        userOutput = bp->tempOutputBuffer;\n                    }\n                }\n                else /* user output is not interleaved */\n                {\n                    if( bp->userOutputSampleFormatIsEqualToHost && !bp->hostOutputIsInterleaved )\n                    {\n                        for( i=0; i<bp->outputChannelCount; ++i )\n                        {\n                            bp->tempOutputBufferPtrs[i] = hostOutputChannels[i].data;\n                        }\n                        skipOutputConvert = 1;\n                    }\n                    else\n                    {\n                        for( i=0; i<bp->outputChannelCount; ++i )\n                        {\n                            bp->tempOutputBufferPtrs[i] = ((unsigned char*)bp->tempOutputBuffer) +\n                                i * bp->bytesPerUserOutputSample * frameCount;\n                        }\n                    }\n\n                    userOutput = bp->tempOutputBufferPtrs;\n                }\n            }\n\n            *streamCallbackResult = bp->streamCallback( userInput, userOutput,\n                    frameCount, bp->timeInfo, bp->callbackStatusFlags, bp->userData );\n\n            if( *streamCallbackResult == paAbort )\n            {\n                /* callback returned paAbort, don't advance framesProcessed\n                        and framesToGo, they will be handled below */\n            }\n            else\n            {\n                bp->timeInfo->inputBufferAdcTime += frameCount * bp->samplePeriod;\n                bp->timeInfo->outputBufferDacTime += frameCount * bp->samplePeriod;\n\n                /* convert output data (user -> host) */\n\n                if( bp->outputChannelCount != 0 && bp->hostOutputChannels[0][0].data )\n                {\n                    if( skipOutputConvert )\n                    {\n                        for( i=0; i<bp->outputChannelCount; ++i )\n                        {\n                            /* advance dest ptr for next iteration */\n                            hostOutputChannels[i].data = ((unsigned char*)hostOutputChannels[i].data) +\n                                    frameCount * hostOutputChannels[i].stride * bp->bytesPerHostOutputSample;\n                        }\n                    }\n                    else\n                    {\n\n                        srcBytePtr = (unsigned char *)bp->tempOutputBuffer;\n\n                        if( bp->userOutputIsInterleaved )\n                        {\n                            srcSampleStrideSamples = bp->outputChannelCount;\n                            srcChannelStrideBytes = bp->bytesPerUserOutputSample;\n                        }\n                        else /* user output is not interleaved */\n                        {\n                            srcSampleStrideSamples = 1;\n                            srcChannelStrideBytes = frameCount * bp->bytesPerUserOutputSample;\n                        }\n\n                        for( i=0; i<bp->outputChannelCount; ++i )\n                        {\n                            bp->outputConverter(    hostOutputChannels[i].data,\n                                                    hostOutputChannels[i].stride,\n                                                    srcBytePtr, srcSampleStrideSamples,\n                                                    frameCount, &bp->ditherGenerator );\n\n                            srcBytePtr += srcChannelStrideBytes;  /* skip to next source channel */\n\n                            /* advance dest ptr for next iteration */\n                            hostOutputChannels[i].data = ((unsigned char*)hostOutputChannels[i].data) +\n                                        frameCount * hostOutputChannels[i].stride * bp->bytesPerHostOutputSample;\n                        }\n                    }\n                }\n\n                framesProcessed += frameCount;\n\n                framesToGo -= frameCount;\n            }\n        }\n        while( framesToGo > 0  && *streamCallbackResult == paContinue );\n    }\n\n    if( framesToGo > 0 )\n    {\n        /* zero any remaining frames output. There will only be remaining frames\n            if the callback has returned paComplete or paAbort */\n\n        frameCount = framesToGo;\n\n        if( bp->outputChannelCount != 0 && bp->hostOutputChannels[0][0].data )\n        {\n            for( i=0; i<bp->outputChannelCount; ++i )\n            {\n                bp->outputZeroer(   hostOutputChannels[i].data,\n                                    hostOutputChannels[i].stride,\n                                    frameCount );\n\n                /* advance dest ptr for next iteration */\n                hostOutputChannels[i].data = ((unsigned char*)hostOutputChannels[i].data) +\n                        frameCount * hostOutputChannels[i].stride * bp->bytesPerHostOutputSample;\n            }\n        }\n\n        framesProcessed += frameCount;\n    }\n\n    return framesProcessed;\n}\n\n\n/*\n    AdaptingInputOnlyProcess() is a half duplex input buffer processor. It\n    converts data from the input buffers into the temporary input buffer,\n    when the temporary input buffer is full, it calls the streamCallback.\n*/\nstatic unsigned long AdaptingInputOnlyProcess( PaUtilBufferProcessor *bp,\n        int *streamCallbackResult,\n        PaUtilChannelDescriptor *hostInputChannels,\n        unsigned long framesToProcess )\n{\n    void *userInput, *userOutput;\n    unsigned char *destBytePtr;\n    unsigned int destSampleStrideSamples; /* stride from one sample to the next within a channel, in samples */\n    unsigned int destChannelStrideBytes; /* stride from one channel to the next, in bytes */\n    unsigned int i;\n    unsigned long frameCount;\n    unsigned long framesToGo = framesToProcess;\n    unsigned long framesProcessed = 0;\n\n    userOutput = 0;\n\n    do\n    {\n        frameCount = ( bp->framesInTempInputBuffer + framesToGo > bp->framesPerUserBuffer )\n                ? ( bp->framesPerUserBuffer - bp->framesInTempInputBuffer )\n                : framesToGo;\n\n        /* convert frameCount samples into temp buffer */\n\n        if( bp->userInputIsInterleaved )\n        {\n            destBytePtr = ((unsigned char*)bp->tempInputBuffer) +\n                    bp->bytesPerUserInputSample * bp->inputChannelCount *\n                    bp->framesInTempInputBuffer;\n\n            destSampleStrideSamples = bp->inputChannelCount;\n            destChannelStrideBytes = bp->bytesPerUserInputSample;\n\n            userInput = bp->tempInputBuffer;\n        }\n        else /* user input is not interleaved */\n        {\n            destBytePtr = ((unsigned char*)bp->tempInputBuffer) +\n                    bp->bytesPerUserInputSample * bp->framesInTempInputBuffer;\n\n            destSampleStrideSamples = 1;\n            destChannelStrideBytes = bp->framesPerUserBuffer * bp->bytesPerUserInputSample;\n\n            /* setup non-interleaved ptrs */\n            for( i=0; i<bp->inputChannelCount; ++i )\n            {\n                bp->tempInputBufferPtrs[i] = ((unsigned char*)bp->tempInputBuffer) +\n                    i * bp->bytesPerUserInputSample * bp->framesPerUserBuffer;\n            }\n\n            userInput = bp->tempInputBufferPtrs;\n        }\n\n        for( i=0; i<bp->inputChannelCount; ++i )\n        {\n            bp->inputConverter( destBytePtr, destSampleStrideSamples,\n                                    hostInputChannels[i].data,\n                                    hostInputChannels[i].stride,\n                                    frameCount, &bp->ditherGenerator );\n\n            destBytePtr += destChannelStrideBytes;  /* skip to next destination channel */\n\n            /* advance src ptr for next iteration */\n            hostInputChannels[i].data = ((unsigned char*)hostInputChannels[i].data) +\n                    frameCount * hostInputChannels[i].stride * bp->bytesPerHostInputSample;\n        }\n\n        bp->framesInTempInputBuffer += frameCount;\n\n        if( bp->framesInTempInputBuffer == bp->framesPerUserBuffer )\n        {\n            /**\n            @todo (non-critical optimisation)\n            The conditional below implements the continue/complete/abort mechanism\n            simply by continuing on iterating through the input buffer, but not\n            passing the data to the callback. With care, the outer loop could be\n            terminated earlier, thus some unneeded conversion cycles would be\n            saved.\n            */\n            if( *streamCallbackResult == paContinue )\n            {\n                bp->timeInfo->outputBufferDacTime = 0;\n\n                *streamCallbackResult = bp->streamCallback( userInput, userOutput,\n                        bp->framesPerUserBuffer, bp->timeInfo,\n                        bp->callbackStatusFlags, bp->userData );\n\n                bp->timeInfo->inputBufferAdcTime += bp->framesPerUserBuffer * bp->samplePeriod;\n            }\n\n            bp->framesInTempInputBuffer = 0;\n        }\n\n        framesProcessed += frameCount;\n\n        framesToGo -= frameCount;\n    }while( framesToGo > 0 );\n\n    return framesProcessed;\n}\n\n\n/*\n    AdaptingOutputOnlyProcess() is a half duplex output buffer processor.\n    It converts data from the temporary output buffer, to the output buffers,\n    when the temporary output buffer is empty, it calls the streamCallback.\n*/\nstatic unsigned long AdaptingOutputOnlyProcess( PaUtilBufferProcessor *bp,\n        int *streamCallbackResult,\n        PaUtilChannelDescriptor *hostOutputChannels,\n        unsigned long framesToProcess )\n{\n    void *userInput, *userOutput;\n    unsigned char *srcBytePtr;\n    unsigned int srcSampleStrideSamples; /* stride from one sample to the next within a channel, in samples */\n    unsigned int srcChannelStrideBytes;  /* stride from one channel to the next, in bytes */\n    unsigned int i;\n    unsigned long frameCount;\n    unsigned long framesToGo = framesToProcess;\n    unsigned long framesProcessed = 0;\n\n    do\n    {\n        if( bp->framesInTempOutputBuffer == 0 && *streamCallbackResult == paContinue )\n        {\n            userInput = 0;\n\n            /* setup userOutput */\n            if( bp->userOutputIsInterleaved )\n            {\n                userOutput = bp->tempOutputBuffer;\n            }\n            else /* user output is not interleaved */\n            {\n                for( i = 0; i < bp->outputChannelCount; ++i )\n                {\n                    bp->tempOutputBufferPtrs[i] = ((unsigned char*)bp->tempOutputBuffer) +\n                            i * bp->framesPerUserBuffer * bp->bytesPerUserOutputSample;\n                }\n\n                userOutput = bp->tempOutputBufferPtrs;\n            }\n\n            bp->timeInfo->inputBufferAdcTime = 0;\n\n            *streamCallbackResult = bp->streamCallback( userInput, userOutput,\n                    bp->framesPerUserBuffer, bp->timeInfo,\n                    bp->callbackStatusFlags, bp->userData );\n\n            if( *streamCallbackResult == paAbort )\n            {\n                /* if the callback returned paAbort, we disregard its output */\n            }\n            else\n            {\n                bp->timeInfo->outputBufferDacTime += bp->framesPerUserBuffer * bp->samplePeriod;\n\n                bp->framesInTempOutputBuffer = bp->framesPerUserBuffer;\n            }\n        }\n\n        if( bp->framesInTempOutputBuffer > 0 )\n        {\n            /* convert frameCount frames from user buffer to host buffer */\n\n            frameCount = PA_MIN_( bp->framesInTempOutputBuffer, framesToGo );\n\n            if( bp->userOutputIsInterleaved )\n            {\n                srcBytePtr = ((unsigned char*)bp->tempOutputBuffer) +\n                        bp->bytesPerUserOutputSample * bp->outputChannelCount *\n                        (bp->framesPerUserBuffer - bp->framesInTempOutputBuffer);\n\n                srcSampleStrideSamples = bp->outputChannelCount;\n                srcChannelStrideBytes = bp->bytesPerUserOutputSample;\n            }\n            else /* user output is not interleaved */\n            {\n                srcBytePtr = ((unsigned char*)bp->tempOutputBuffer) +\n                        bp->bytesPerUserOutputSample *\n                        (bp->framesPerUserBuffer - bp->framesInTempOutputBuffer);\n\n                srcSampleStrideSamples = 1;\n                srcChannelStrideBytes = bp->framesPerUserBuffer * bp->bytesPerUserOutputSample;\n            }\n\n            for( i=0; i<bp->outputChannelCount; ++i )\n            {\n                bp->outputConverter(    hostOutputChannels[i].data,\n                                        hostOutputChannels[i].stride,\n                                        srcBytePtr, srcSampleStrideSamples,\n                                        frameCount, &bp->ditherGenerator );\n\n                srcBytePtr += srcChannelStrideBytes;  /* skip to next source channel */\n\n                /* advance dest ptr for next iteration */\n                hostOutputChannels[i].data = ((unsigned char*)hostOutputChannels[i].data) +\n                        frameCount * hostOutputChannels[i].stride * bp->bytesPerHostOutputSample;\n            }\n\n            bp->framesInTempOutputBuffer -= frameCount;\n        }\n        else\n        {\n            /* no more user data is available because the callback has returned\n                paComplete or paAbort. Fill the remainder of the host buffer\n                with zeros.\n            */\n\n            frameCount = framesToGo;\n\n            for( i=0; i<bp->outputChannelCount; ++i )\n            {\n                bp->outputZeroer(   hostOutputChannels[i].data,\n                                    hostOutputChannels[i].stride,\n                                    frameCount );\n\n                /* advance dest ptr for next iteration */\n                hostOutputChannels[i].data = ((unsigned char*)hostOutputChannels[i].data) +\n                        frameCount * hostOutputChannels[i].stride * bp->bytesPerHostOutputSample;\n            }\n        }\n\n        framesProcessed += frameCount;\n\n        framesToGo -= frameCount;\n\n    }while( framesToGo > 0 );\n\n    return framesProcessed;\n}\n\n/* CopyTempOutputBuffersToHostOutputBuffers is called from AdaptingProcess to copy frames from\n    tempOutputBuffer to hostOutputChannels. This includes data conversion\n    and interleaving.\n*/\nstatic void CopyTempOutputBuffersToHostOutputBuffers( PaUtilBufferProcessor *bp)\n{\n    unsigned long maxFramesToCopy;\n    PaUtilChannelDescriptor *hostOutputChannels;\n    unsigned int frameCount;\n    unsigned char *srcBytePtr;\n    unsigned int srcSampleStrideSamples; /* stride from one sample to the next within a channel, in samples */\n    unsigned int srcChannelStrideBytes; /* stride from one channel to the next, in bytes */\n    unsigned int i;\n\n    /* copy frames from user to host output buffers */\n    while( bp->framesInTempOutputBuffer > 0 &&\n            ((bp->hostOutputFrameCount[0] + bp->hostOutputFrameCount[1]) > 0) )\n    {\n        maxFramesToCopy = bp->framesInTempOutputBuffer;\n\n        /* select the output buffer set (1st or 2nd) */\n        if( bp->hostOutputFrameCount[0] > 0 )\n        {\n            hostOutputChannels = bp->hostOutputChannels[0];\n            frameCount = PA_MIN_( bp->hostOutputFrameCount[0], maxFramesToCopy );\n        }\n        else\n        {\n            hostOutputChannels = bp->hostOutputChannels[1];\n            frameCount = PA_MIN_( bp->hostOutputFrameCount[1], maxFramesToCopy );\n        }\n\n        if( bp->userOutputIsInterleaved )\n        {\n            srcBytePtr = ((unsigned char*)bp->tempOutputBuffer) +\n                    bp->bytesPerUserOutputSample * bp->outputChannelCount *\n                    (bp->framesPerUserBuffer - bp->framesInTempOutputBuffer);\n\n            srcSampleStrideSamples = bp->outputChannelCount;\n            srcChannelStrideBytes = bp->bytesPerUserOutputSample;\n        }\n        else /* user output is not interleaved */\n        {\n            srcBytePtr = ((unsigned char*)bp->tempOutputBuffer) +\n                    bp->bytesPerUserOutputSample *\n                    (bp->framesPerUserBuffer - bp->framesInTempOutputBuffer);\n\n            srcSampleStrideSamples = 1;\n            srcChannelStrideBytes = bp->framesPerUserBuffer * bp->bytesPerUserOutputSample;\n        }\n\n        for( i=0; i<bp->outputChannelCount; ++i )\n        {\n            assert( hostOutputChannels[i].data != NULL );\n            bp->outputConverter(    hostOutputChannels[i].data,\n                                    hostOutputChannels[i].stride,\n                                    srcBytePtr, srcSampleStrideSamples,\n                                    frameCount, &bp->ditherGenerator );\n\n            srcBytePtr += srcChannelStrideBytes;  /* skip to next source channel */\n\n            /* advance dest ptr for next iteration */\n            hostOutputChannels[i].data = ((unsigned char*)hostOutputChannels[i].data) +\n                    frameCount * hostOutputChannels[i].stride * bp->bytesPerHostOutputSample;\n        }\n\n        if( bp->hostOutputFrameCount[0] > 0 )\n            bp->hostOutputFrameCount[0] -= frameCount;\n        else\n            bp->hostOutputFrameCount[1] -= frameCount;\n\n        bp->framesInTempOutputBuffer -= frameCount;\n    }\n}\n\n/*\n    AdaptingProcess is a full duplex adapting buffer processor. It converts\n    data from the temporary output buffer into the host output buffers, then\n    from the host input buffers into the temporary input buffers. Calling the\n    streamCallback when necessary.\n    When processPartialUserBuffers is 0, all available input data will be\n    consumed and all available output space will be filled. When\n    processPartialUserBuffers is non-zero, as many full user buffers\n    as possible will be processed, but partial buffers will not be consumed.\n*/\nstatic unsigned long AdaptingProcess( PaUtilBufferProcessor *bp,\n        int *streamCallbackResult, int processPartialUserBuffers )\n{\n    void *userInput, *userOutput;\n    unsigned long framesProcessed = 0;\n    unsigned long framesAvailable;\n    unsigned long endProcessingMinFrameCount;\n    unsigned long maxFramesToCopy;\n    PaUtilChannelDescriptor *hostInputChannels, *hostOutputChannels;\n    unsigned int frameCount;\n    unsigned char *destBytePtr;\n    unsigned int destSampleStrideSamples; /* stride from one sample to the next within a channel, in samples */\n    unsigned int destChannelStrideBytes; /* stride from one channel to the next, in bytes */\n    unsigned int i, j;\n\n\n    framesAvailable = bp->hostInputFrameCount[0] + bp->hostInputFrameCount[1];/* this is assumed to be the same as the output buffer's frame count */\n\n    if( processPartialUserBuffers )\n        endProcessingMinFrameCount = 0;\n    else\n        endProcessingMinFrameCount = (bp->framesPerUserBuffer - 1);\n\n    /* Fill host output with remaining frames in user output (tempOutputBuffer) */\n    CopyTempOutputBuffersToHostOutputBuffers( bp );\n\n    while( framesAvailable > endProcessingMinFrameCount )\n    {\n\n        if( bp->framesInTempOutputBuffer == 0 && *streamCallbackResult != paContinue )\n        {\n            /* the callback will not be called any more, so zero what remains\n                of the host output buffers */\n\n            for( i=0; i<2; ++i )\n            {\n                frameCount = bp->hostOutputFrameCount[i];\n                if( frameCount > 0 )\n                {\n                    hostOutputChannels = bp->hostOutputChannels[i];\n\n                    for( j=0; j<bp->outputChannelCount; ++j )\n                    {\n                        bp->outputZeroer(   hostOutputChannels[j].data,\n                                            hostOutputChannels[j].stride,\n                                            frameCount );\n\n                        /* advance dest ptr for next iteration  */\n                        hostOutputChannels[j].data = ((unsigned char*)hostOutputChannels[j].data) +\n                                frameCount * hostOutputChannels[j].stride * bp->bytesPerHostOutputSample;\n                    }\n                    bp->hostOutputFrameCount[i] = 0;\n                }\n            }\n        }\n\n\n        /* copy frames from host to user input buffers */\n        while( bp->framesInTempInputBuffer < bp->framesPerUserBuffer &&\n                ((bp->hostInputFrameCount[0] + bp->hostInputFrameCount[1]) > 0) )\n        {\n            maxFramesToCopy = bp->framesPerUserBuffer - bp->framesInTempInputBuffer;\n\n            /* select the input buffer set (1st or 2nd) */\n            if( bp->hostInputFrameCount[0] > 0 )\n            {\n                hostInputChannels = bp->hostInputChannels[0];\n                frameCount = PA_MIN_( bp->hostInputFrameCount[0], maxFramesToCopy );\n            }\n            else\n            {\n                hostInputChannels = bp->hostInputChannels[1];\n                frameCount = PA_MIN_( bp->hostInputFrameCount[1], maxFramesToCopy );\n            }\n\n            /* configure conversion destination pointers */\n            if( bp->userInputIsInterleaved )\n            {\n                destBytePtr = ((unsigned char*)bp->tempInputBuffer) +\n                        bp->bytesPerUserInputSample * bp->inputChannelCount *\n                        bp->framesInTempInputBuffer;\n\n                destSampleStrideSamples = bp->inputChannelCount;\n                destChannelStrideBytes = bp->bytesPerUserInputSample;\n            }\n            else /* user input is not interleaved */\n            {\n                destBytePtr = ((unsigned char*)bp->tempInputBuffer) +\n                        bp->bytesPerUserInputSample * bp->framesInTempInputBuffer;\n\n                destSampleStrideSamples = 1;\n                destChannelStrideBytes = bp->framesPerUserBuffer * bp->bytesPerUserInputSample;\n            }\n\n            for( i=0; i<bp->inputChannelCount; ++i )\n            {\n                bp->inputConverter( destBytePtr, destSampleStrideSamples,\n                                        hostInputChannels[i].data,\n                                        hostInputChannels[i].stride,\n                                        frameCount, &bp->ditherGenerator );\n\n                destBytePtr += destChannelStrideBytes;  /* skip to next destination channel */\n\n                /* advance src ptr for next iteration */\n                hostInputChannels[i].data = ((unsigned char*)hostInputChannels[i].data) +\n                        frameCount * hostInputChannels[i].stride * bp->bytesPerHostInputSample;\n            }\n\n            if( bp->hostInputFrameCount[0] > 0 )\n                bp->hostInputFrameCount[0] -= frameCount;\n            else\n                bp->hostInputFrameCount[1] -= frameCount;\n\n            bp->framesInTempInputBuffer += frameCount;\n\n            /* update framesAvailable and framesProcessed based on input consumed\n                unless something is very wrong this will also correspond to the\n                amount of output generated */\n            framesAvailable -= frameCount;\n            framesProcessed += frameCount;\n        }\n\n        /* call streamCallback */\n        if( bp->framesInTempInputBuffer == bp->framesPerUserBuffer &&\n            bp->framesInTempOutputBuffer == 0 )\n        {\n            if( *streamCallbackResult == paContinue )\n            {\n                /* setup userInput */\n                if( bp->userInputIsInterleaved )\n                {\n                    userInput = bp->tempInputBuffer;\n                }\n                else /* user input is not interleaved */\n                {\n                    for( i = 0; i < bp->inputChannelCount; ++i )\n                    {\n                        bp->tempInputBufferPtrs[i] = ((unsigned char*)bp->tempInputBuffer) +\n                                i * bp->framesPerUserBuffer * bp->bytesPerUserInputSample;\n                    }\n\n                    userInput = bp->tempInputBufferPtrs;\n                }\n\n                /* setup userOutput */\n                if( bp->userOutputIsInterleaved )\n                {\n                    userOutput = bp->tempOutputBuffer;\n                }\n                else /* user output is not interleaved */\n                {\n                    for( i = 0; i < bp->outputChannelCount; ++i )\n                    {\n                        bp->tempOutputBufferPtrs[i] = ((unsigned char*)bp->tempOutputBuffer) +\n                                i * bp->framesPerUserBuffer * bp->bytesPerUserOutputSample;\n                    }\n\n                    userOutput = bp->tempOutputBufferPtrs;\n                }\n\n                /* call streamCallback */\n\n                *streamCallbackResult = bp->streamCallback( userInput, userOutput,\n                        bp->framesPerUserBuffer, bp->timeInfo,\n                        bp->callbackStatusFlags, bp->userData );\n\n                bp->timeInfo->inputBufferAdcTime += bp->framesPerUserBuffer * bp->samplePeriod;\n                bp->timeInfo->outputBufferDacTime += bp->framesPerUserBuffer * bp->samplePeriod;\n\n                bp->framesInTempInputBuffer = 0;\n\n                if( *streamCallbackResult == paAbort )\n                    bp->framesInTempOutputBuffer = 0;\n                else\n                    bp->framesInTempOutputBuffer = bp->framesPerUserBuffer;\n            }\n            else\n            {\n                /* paComplete or paAbort has already been called. */\n\n                bp->framesInTempInputBuffer = 0;\n            }\n        }\n\n        /* copy frames from user (tempOutputBuffer) to host output buffers (hostOutputChannels)\n           Means to process the user output provided by the callback. Has to be called after\n            each callback. */\n        CopyTempOutputBuffersToHostOutputBuffers( bp );\n\n    }\n\n    return framesProcessed;\n}\n\n\nunsigned long PaUtil_EndBufferProcessing( PaUtilBufferProcessor* bp, int *streamCallbackResult )\n{\n    unsigned long framesToProcess, framesToGo;\n    unsigned long framesProcessed = 0;\n\n    if( bp->inputChannelCount != 0 && bp->outputChannelCount != 0\n            && bp->hostInputChannels[0][0].data /* input was supplied (see PaUtil_SetNoInput) */\n            && bp->hostOutputChannels[0][0].data /* output was supplied (see PaUtil_SetNoOutput) */ )\n    {\n        assert( (bp->hostInputFrameCount[0] + bp->hostInputFrameCount[1]) ==\n                (bp->hostOutputFrameCount[0] + bp->hostOutputFrameCount[1]) );\n    }\n\n    assert( *streamCallbackResult == paContinue\n            || *streamCallbackResult == paComplete\n            || *streamCallbackResult == paAbort ); /* don't forget to pass in a valid callback result value */\n\n    if( bp->useNonAdaptingProcess )\n    {\n        if( bp->inputChannelCount != 0 && bp->outputChannelCount != 0 )\n        {\n            /* full duplex non-adapting process, splice buffers if they are\n                different lengths */\n\n            framesToGo = bp->hostOutputFrameCount[0] + bp->hostOutputFrameCount[1]; /* relies on assert above for input/output equivalence */\n\n            do{\n                unsigned long noInputInputFrameCount;\n                unsigned long *hostInputFrameCount;\n                PaUtilChannelDescriptor *hostInputChannels;\n                unsigned long noOutputOutputFrameCount;\n                unsigned long *hostOutputFrameCount;\n                PaUtilChannelDescriptor *hostOutputChannels;\n                unsigned long framesProcessedThisIteration;\n\n                if( !bp->hostInputChannels[0][0].data )\n                {\n                    /* no input was supplied (see PaUtil_SetNoInput)\n                        NonAdaptingProcess knows how to deal with this\n                    */\n                    noInputInputFrameCount = framesToGo;\n                    hostInputFrameCount = &noInputInputFrameCount;\n                    hostInputChannels = 0;\n                }\n                else if( bp->hostInputFrameCount[0] != 0 )\n                {\n                    hostInputFrameCount = &bp->hostInputFrameCount[0];\n                    hostInputChannels = bp->hostInputChannels[0];\n                }\n                else\n                {\n                    hostInputFrameCount = &bp->hostInputFrameCount[1];\n                    hostInputChannels = bp->hostInputChannels[1];\n                }\n\n                if( !bp->hostOutputChannels[0][0].data )\n                {\n                    /* no output was supplied (see PaUtil_SetNoOutput)\n                        NonAdaptingProcess knows how to deal with this\n                    */\n                    noOutputOutputFrameCount = framesToGo;\n                    hostOutputFrameCount = &noOutputOutputFrameCount;\n                    hostOutputChannels = 0;\n                }\n                if( bp->hostOutputFrameCount[0] != 0 )\n                {\n                    hostOutputFrameCount = &bp->hostOutputFrameCount[0];\n                    hostOutputChannels = bp->hostOutputChannels[0];\n                }\n                else\n                {\n                    hostOutputFrameCount = &bp->hostOutputFrameCount[1];\n                    hostOutputChannels = bp->hostOutputChannels[1];\n                }\n\n                framesToProcess = PA_MIN_( *hostInputFrameCount,\n                                       *hostOutputFrameCount );\n\n                assert( framesToProcess != 0 );\n\n                framesProcessedThisIteration = NonAdaptingProcess( bp, streamCallbackResult,\n                        hostInputChannels, hostOutputChannels,\n                        framesToProcess );\n\n                *hostInputFrameCount -= framesProcessedThisIteration;\n                *hostOutputFrameCount -= framesProcessedThisIteration;\n\n                framesProcessed += framesProcessedThisIteration;\n                framesToGo -= framesProcessedThisIteration;\n\n            }while( framesToGo > 0 );\n        }\n        else\n        {\n            /* half duplex non-adapting process, just process 1st and 2nd buffer */\n            /* process first buffer */\n\n            framesToProcess = (bp->inputChannelCount != 0)\n                            ? bp->hostInputFrameCount[0]\n                            : bp->hostOutputFrameCount[0];\n\n            framesProcessed = NonAdaptingProcess( bp, streamCallbackResult,\n                        bp->hostInputChannels[0], bp->hostOutputChannels[0],\n                        framesToProcess );\n\n            /* process second buffer if provided */\n\n            framesToProcess = (bp->inputChannelCount != 0)\n                            ? bp->hostInputFrameCount[1]\n                            : bp->hostOutputFrameCount[1];\n            if( framesToProcess > 0 )\n            {\n                framesProcessed += NonAdaptingProcess( bp, streamCallbackResult,\n                    bp->hostInputChannels[1], bp->hostOutputChannels[1],\n                    framesToProcess );\n            }\n        }\n    }\n    else /* block adaption necessary*/\n    {\n\n        if( bp->inputChannelCount != 0 && bp->outputChannelCount != 0 )\n        {\n            /* full duplex */\n\n            if( bp->hostBufferSizeMode == paUtilVariableHostBufferSizePartialUsageAllowed  )\n            {\n                framesProcessed = AdaptingProcess( bp, streamCallbackResult,\n                        0 /* dont process partial user buffers */ );\n            }\n            else\n            {\n                framesProcessed = AdaptingProcess( bp, streamCallbackResult,\n                        1 /* process partial user buffers */ );\n            }\n        }\n        else if( bp->inputChannelCount != 0 )\n        {\n            /* input only */\n            framesToProcess = bp->hostInputFrameCount[0];\n\n            framesProcessed = AdaptingInputOnlyProcess( bp, streamCallbackResult,\n                        bp->hostInputChannels[0], framesToProcess );\n\n            framesToProcess = bp->hostInputFrameCount[1];\n            if( framesToProcess > 0 )\n            {\n                framesProcessed += AdaptingInputOnlyProcess( bp, streamCallbackResult,\n                        bp->hostInputChannels[1], framesToProcess );\n            }\n        }\n        else\n        {\n            /* output only */\n            framesToProcess = bp->hostOutputFrameCount[0];\n\n            framesProcessed = AdaptingOutputOnlyProcess( bp, streamCallbackResult,\n                        bp->hostOutputChannels[0], framesToProcess );\n\n            framesToProcess = bp->hostOutputFrameCount[1];\n            if( framesToProcess > 0 )\n            {\n                framesProcessed += AdaptingOutputOnlyProcess( bp, streamCallbackResult,\n                        bp->hostOutputChannels[1], framesToProcess );\n            }\n        }\n    }\n\n    return framesProcessed;\n}\n\n\nint PaUtil_IsBufferProcessorOutputEmpty( PaUtilBufferProcessor* bp )\n{\n    return (bp->framesInTempOutputBuffer) ? 0 : 1;\n}\n\n\nunsigned long PaUtil_CopyInput( PaUtilBufferProcessor* bp,\n        void **buffer, unsigned long frameCount )\n{\n    PaUtilChannelDescriptor *hostInputChannels;\n    unsigned int framesToCopy;\n    unsigned char *destBytePtr;\n    void **nonInterleavedDestPtrs;\n    unsigned int destSampleStrideSamples; /* stride from one sample to the next within a channel, in samples */\n    unsigned int destChannelStrideBytes; /* stride from one channel to the next, in bytes */\n    unsigned int i;\n\n    hostInputChannels = bp->hostInputChannels[0];\n    framesToCopy = PA_MIN_( bp->hostInputFrameCount[0], frameCount );\n\n    if( bp->userInputIsInterleaved )\n    {\n        destBytePtr = (unsigned char*)*buffer;\n\n        destSampleStrideSamples = bp->inputChannelCount;\n        destChannelStrideBytes = bp->bytesPerUserInputSample;\n\n        for( i=0; i<bp->inputChannelCount; ++i )\n        {\n            bp->inputConverter( destBytePtr, destSampleStrideSamples,\n                                hostInputChannels[i].data,\n                                hostInputChannels[i].stride,\n                                framesToCopy, &bp->ditherGenerator );\n\n            destBytePtr += destChannelStrideBytes;  /* skip to next dest channel */\n\n            /* advance source ptr for next iteration */\n            hostInputChannels[i].data = ((unsigned char*)hostInputChannels[i].data) +\n                    framesToCopy * hostInputChannels[i].stride * bp->bytesPerHostInputSample;\n        }\n\n        /* advance callers dest pointer (buffer) */\n        *buffer = ((unsigned char *)*buffer) +\n                framesToCopy * bp->inputChannelCount * bp->bytesPerUserInputSample;\n    }\n    else\n    {\n        /* user input is not interleaved */\n\n        nonInterleavedDestPtrs = (void**)*buffer;\n\n        destSampleStrideSamples = 1;\n\n        for( i=0; i<bp->inputChannelCount; ++i )\n        {\n            destBytePtr = (unsigned char*)nonInterleavedDestPtrs[i];\n\n            bp->inputConverter( destBytePtr, destSampleStrideSamples,\n                                hostInputChannels[i].data,\n                                hostInputChannels[i].stride,\n                                framesToCopy, &bp->ditherGenerator );\n\n            /* advance callers dest pointer (nonInterleavedDestPtrs[i]) */\n            destBytePtr += bp->bytesPerUserInputSample * framesToCopy;\n            nonInterleavedDestPtrs[i] = destBytePtr;\n\n            /* advance source ptr for next iteration */\n            hostInputChannels[i].data = ((unsigned char*)hostInputChannels[i].data) +\n                    framesToCopy * hostInputChannels[i].stride * bp->bytesPerHostInputSample;\n        }\n    }\n\n    bp->hostInputFrameCount[0] -= framesToCopy;\n\n    return framesToCopy;\n}\n\nunsigned long PaUtil_CopyOutput( PaUtilBufferProcessor* bp,\n        const void ** buffer, unsigned long frameCount )\n{\n    PaUtilChannelDescriptor *hostOutputChannels;\n    unsigned int framesToCopy;\n    unsigned char *srcBytePtr;\n    void **nonInterleavedSrcPtrs;\n    unsigned int srcSampleStrideSamples; /* stride from one sample to the next within a channel, in samples */\n    unsigned int srcChannelStrideBytes; /* stride from one channel to the next, in bytes */\n    unsigned int i;\n\n    hostOutputChannels = bp->hostOutputChannels[0];\n    framesToCopy = PA_MIN_( bp->hostOutputFrameCount[0], frameCount );\n\n    if( bp->userOutputIsInterleaved )\n    {\n        srcBytePtr = (unsigned char*)*buffer;\n\n        srcSampleStrideSamples = bp->outputChannelCount;\n        srcChannelStrideBytes = bp->bytesPerUserOutputSample;\n\n        for( i=0; i<bp->outputChannelCount; ++i )\n        {\n            bp->outputConverter(    hostOutputChannels[i].data,\n                                    hostOutputChannels[i].stride,\n                                    srcBytePtr, srcSampleStrideSamples,\n                                    framesToCopy, &bp->ditherGenerator );\n\n            srcBytePtr += srcChannelStrideBytes;  /* skip to next source channel */\n\n            /* advance dest ptr for next iteration */\n            hostOutputChannels[i].data = ((unsigned char*)hostOutputChannels[i].data) +\n                    framesToCopy * hostOutputChannels[i].stride * bp->bytesPerHostOutputSample;\n        }\n\n        /* advance callers source pointer (buffer) */\n        *buffer = ((unsigned char *)*buffer) +\n                framesToCopy * bp->outputChannelCount * bp->bytesPerUserOutputSample;\n\n    }\n    else\n    {\n        /* user output is not interleaved */\n\n        nonInterleavedSrcPtrs = (void**)*buffer;\n\n        srcSampleStrideSamples = 1;\n\n        for( i=0; i<bp->outputChannelCount; ++i )\n        {\n            srcBytePtr = (unsigned char*)nonInterleavedSrcPtrs[i];\n\n            bp->outputConverter(    hostOutputChannels[i].data,\n                                    hostOutputChannels[i].stride,\n                                    srcBytePtr, srcSampleStrideSamples,\n                                    framesToCopy, &bp->ditherGenerator );\n\n\n            /* advance callers source pointer (nonInterleavedSrcPtrs[i]) */\n            srcBytePtr += bp->bytesPerUserOutputSample * framesToCopy;\n            nonInterleavedSrcPtrs[i] = srcBytePtr;\n\n            /* advance dest ptr for next iteration */\n            hostOutputChannels[i].data = ((unsigned char*)hostOutputChannels[i].data) +\n                    framesToCopy * hostOutputChannels[i].stride * bp->bytesPerHostOutputSample;\n        }\n    }\n\n    bp->hostOutputFrameCount[0] += framesToCopy;\n\n    return framesToCopy;\n}\n\n\nunsigned long PaUtil_ZeroOutput( PaUtilBufferProcessor* bp, unsigned long frameCount )\n{\n    PaUtilChannelDescriptor *hostOutputChannels;\n    unsigned int framesToZero;\n    unsigned int i;\n\n    hostOutputChannels = bp->hostOutputChannels[0];\n    framesToZero = PA_MIN_( bp->hostOutputFrameCount[0], frameCount );\n\n    for( i=0; i<bp->outputChannelCount; ++i )\n    {\n        bp->outputZeroer(   hostOutputChannels[i].data,\n                            hostOutputChannels[i].stride,\n                            framesToZero );\n\n\n        /* advance dest ptr for next iteration */\n        hostOutputChannels[i].data = ((unsigned char*)hostOutputChannels[i].data) +\n                framesToZero * hostOutputChannels[i].stride * bp->bytesPerHostOutputSample;\n    }\n\n    bp->hostOutputFrameCount[0] += framesToZero;\n\n    return framesToZero;\n}\n"
  },
  {
    "path": "thirdparty/portaudio/src/common/pa_process.h",
    "content": "#ifndef PA_PROCESS_H\n#define PA_PROCESS_H\n/*\n * $Id$\n * Portable Audio I/O Library callback buffer processing adapters\n *\n * Based on the Open Source API proposed by Ross Bencina\n * Copyright (c) 1999-2002 Phil Burk, Ross Bencina\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n/** @file\n @ingroup common_src\n\n @brief Buffer Processor prototypes. A Buffer Processor performs buffer length\n adaption, coordinates sample format conversion, and interleaves/deinterleaves\n channels.\n\n <h3>Overview</h3>\n\n The \"Buffer Processor\" (PaUtilBufferProcessor) manages conversion of audio\n data from host buffers to user buffers and back again. Where required, the\n buffer processor takes care of converting between host and user sample formats,\n interleaving and deinterleaving multichannel buffers, and adapting between host\n and user buffers with different lengths. The buffer processor may be used with\n full and half duplex streams, for both callback streams and blocking read/write\n streams.\n\n One of the important capabilities provided by the buffer processor is\n the ability to adapt between user and host buffer sizes of different lengths\n with minimum latency. Although this task is relatively easy to perform when\n the host buffer size is an integer multiple of the user buffer size, the\n problem is more complicated when this is not the case - especially for\n full-duplex callback streams. Where necessary the adaption is implemented by\n internally buffering some input and/or output data. The buffer adation\n algorithm used by the buffer processor was originally implemented by\n Stephan Letz for the ASIO version of PortAudio, and is described in his\n Callback_adaption_.pdf which is included in the distribution.\n\n The buffer processor performs sample conversion using the functions provided\n by pa_converters.c.\n\n The following sections provide an overview of how to use the buffer processor.\n Interested readers are advised to consult the host API implementations for\n examples of buffer processor usage.\n\n\n <h4>Initialization, resetting and termination</h4>\n\n When a stream is opened, the buffer processor should be initialized using\n PaUtil_InitializeBufferProcessor. This function initializes internal state\n and allocates temporary buffers as necessary according to the supplied\n configuration parameters. Some of the parameters correspond to those requested\n by the user in their call to Pa_OpenStream(), others reflect the requirements\n of the host API implementation - they indicate host buffer sizes, formats,\n and the type of buffering which the Host API uses. The buffer processor should\n be initialized for callback streams and blocking read/write streams.\n\n Call PaUtil_ResetBufferProcessor to clear any sample data which is present\n in the buffer processor before starting to use it (for example when\n Pa_StartStream is called).\n\n When the buffer processor is no longer used call\n PaUtil_TerminateBufferProcessor.\n\n\n <h4>Using the buffer processor for a callback stream</h4>\n\n The buffer processor's role in a callback stream is to take host input buffers\n process them with the stream callback, and fill host output buffers. For a\n full duplex stream, the buffer processor handles input and output simultaneously\n due to the requirements of the minimum-latency buffer adation algorithm.\n\n When a host buffer becomes available, the implementation should call\n the buffer processor to process the buffer. The buffer processor calls the\n stream callback to consume and/or produce audio data as necessary. The buffer\n processor will convert sample formats, interleave/deinterleave channels,\n and slice or chunk the data to the appropriate buffer lengths according to\n the requirements of the stream callback and the host API.\n\n To process a host buffer (or a pair of host buffers for a full-duplex stream)\n use the following calling sequence:\n\n -# Call PaUtil_BeginBufferProcessing\n -# For a stream which takes input:\n    - Call PaUtil_SetInputFrameCount with the number of frames in the host input\n        buffer.\n    - Call one of the following functions one or more times to tell the\n        buffer processor about the host input buffer(s): PaUtil_SetInputChannel,\n        PaUtil_SetInterleavedInputChannels, PaUtil_SetNonInterleavedInputChannel.\n        Which function you call will depend on whether the host buffer(s) are\n        interleaved or not.\n    - If the available host data is split across two buffers (for example a\n        data range at the end of a circular buffer and another range at the\n        beginning of the circular buffer), also call\n        PaUtil_Set2ndInputFrameCount, PaUtil_Set2ndInputChannel,\n        PaUtil_Set2ndInterleavedInputChannels,\n        PaUtil_Set2ndNonInterleavedInputChannel as necessary to tell the buffer\n        processor about the second buffer.\n -# For a stream which generates output:\n    - Call PaUtil_SetOutputFrameCount with the number of frames in the host\n        output buffer.\n    - Call one of the following functions one or more times to tell the\n        buffer processor about the host output buffer(s): PaUtil_SetOutputChannel,\n        PaUtil_SetInterleavedOutputChannels, PaUtil_SetNonInterleavedOutputChannel.\n        Which function you call will depend on whether the host buffer(s) are\n        interleaved or not.\n    - If the available host output buffer space is split across two buffers\n        (for example a data range at the end of a circular buffer and another\n        range at the beginning of the circular buffer), call\n        PaUtil_Set2ndOutputFrameCount, PaUtil_Set2ndOutputChannel,\n        PaUtil_Set2ndInterleavedOutputChannels,\n        PaUtil_Set2ndNonInterleavedOutputChannel as necessary to tell the buffer\n        processor about the second buffer.\n -# Call PaUtil_EndBufferProcessing, this function performs the actual data\n    conversion and processing.\n\n\n <h4>Using the buffer processor for a blocking read/write stream</h4>\n\n Blocking read/write streams use the buffer processor to convert and copy user\n output data to a host buffer, and to convert and copy host input data to\n the user's buffer. The buffer processor does not perform any buffer adaption.\n When using the buffer processor in a blocking read/write stream the input and\n output conversion are performed separately by the PaUtil_CopyInput and\n PaUtil_CopyOutput functions.\n\n To copy data from a host input buffer to the buffer(s) which the user supplies\n to Pa_ReadStream, use the following calling sequence.\n\n - Repeat the following three steps until the user buffer(s) have been filled\n    with samples from the host input buffers:\n     -# Call PaUtil_SetInputFrameCount with the number of frames in the host\n        input buffer.\n     -# Call one of the following functions one or more times to tell the\n        buffer processor about the host input buffer(s): PaUtil_SetInputChannel,\n        PaUtil_SetInterleavedInputChannels, PaUtil_SetNonInterleavedInputChannel.\n        Which function you call will depend on whether the host buffer(s) are\n        interleaved or not.\n     -# Call PaUtil_CopyInput with the user buffer pointer (or a copy of the\n        array of buffer pointers for a non-interleaved stream) passed to\n        Pa_ReadStream, along with the number of frames in the user buffer(s).\n        Be careful to pass a <i>copy</i> of the user buffer pointers to\n        PaUtil_CopyInput because PaUtil_CopyInput advances the pointers to\n        the start of the next region to copy.\n - PaUtil_CopyInput will not copy more data than is available in the\n    host buffer(s), so the above steps need to be repeated until the user\n    buffer(s) are full.\n\n\n To copy data to the host output buffer from the user buffers(s) supplied\n to Pa_WriteStream use the following calling sequence.\n\n - Repeat the following three steps until all frames from the user buffer(s)\n    have been copied to the host API:\n     -# Call PaUtil_SetOutputFrameCount with the number of frames in the host\n        output buffer.\n     -# Call one of the following functions one or more times to tell the\n        buffer processor about the host output buffer(s): PaUtil_SetOutputChannel,\n        PaUtil_SetInterleavedOutputChannels, PaUtil_SetNonInterleavedOutputChannel.\n        Which function you call will depend on whether the host buffer(s) are\n        interleaved or not.\n     -# Call PaUtil_CopyOutput with the user buffer pointer (or a copy of the\n        array of buffer pointers for a non-interleaved stream) passed to\n        Pa_WriteStream, along with the number of frames in the user buffer(s).\n        Be careful to pass a <i>copy</i> of the user buffer pointers to\n        PaUtil_CopyOutput because PaUtil_CopyOutput advances the pointers to\n        the start of the next region to copy.\n - PaUtil_CopyOutput will not copy more data than fits in the host buffer(s),\n    so the above steps need to be repeated until all user data is copied.\n*/\n\n\n#include \"portaudio.h\"\n#include \"pa_converters.h\"\n#include \"pa_dither.h\"\n\n#ifdef __cplusplus\nextern \"C\"\n{\n#endif /* __cplusplus */\n\n\n/** @brief Mode flag passed to PaUtil_InitializeBufferProcessor indicating the type\n of buffering that the host API uses.\n\n The mode used depends on whether the host API or the implementation manages\n the buffers, and how these buffers are used (scatter gather, circular buffer).\n*/\ntypedef enum {\n/** The host buffer size is a fixed known size. */\n    paUtilFixedHostBufferSize,\n\n/** The host buffer size may vary, but has a known maximum size. */\n    paUtilBoundedHostBufferSize,\n\n/** Nothing is known about the host buffer size. */\n    paUtilUnknownHostBufferSize,\n\n/** The host buffer size varies, and the client does not require the buffer\n processor to consume all of the input and fill all of the output buffer. This\n is useful when the implementation has access to the host API's circular buffer\n and only needs to consume/fill some of it, not necessarily all of it, with each\n call to the buffer processor. This is the only mode where\n PaUtil_EndBufferProcessing() may not consume the whole buffer.\n*/\n    paUtilVariableHostBufferSizePartialUsageAllowed\n}PaUtilHostBufferSizeMode;\n\n\n/** @brief An auxiliary data structure used internally by the buffer processor\n to represent host input and output buffers. */\ntypedef struct PaUtilChannelDescriptor{\n    void *data;\n    unsigned int stride;  /**< stride in samples, not bytes */\n}PaUtilChannelDescriptor;\n\n\n/** @brief The main buffer processor data structure.\n\n Allocate one of these, initialize it with PaUtil_InitializeBufferProcessor\n and terminate it with PaUtil_TerminateBufferProcessor.\n*/\ntypedef struct {\n    unsigned long framesPerUserBuffer;\n    unsigned long framesPerHostBuffer;\n\n    PaUtilHostBufferSizeMode hostBufferSizeMode;\n    int useNonAdaptingProcess;\n    int userOutputSampleFormatIsEqualToHost;\n    int userInputSampleFormatIsEqualToHost;\n    unsigned long framesPerTempBuffer;\n\n    unsigned int inputChannelCount;\n    unsigned int bytesPerHostInputSample;\n    unsigned int bytesPerUserInputSample;\n    int userInputIsInterleaved;\n    PaUtilConverter *inputConverter;\n    PaUtilZeroer *inputZeroer;\n\n    unsigned int outputChannelCount;\n    unsigned int bytesPerHostOutputSample;\n    unsigned int bytesPerUserOutputSample;\n    int userOutputIsInterleaved;\n    PaUtilConverter *outputConverter;\n    PaUtilZeroer *outputZeroer;\n\n    unsigned long initialFramesInTempInputBuffer;\n    unsigned long initialFramesInTempOutputBuffer;\n\n    void *tempInputBuffer;          /**< used for slips, block adaption, and conversion. */\n    void **tempInputBufferPtrs;     /**< storage for non-interleaved buffer pointers, NULL for interleaved user input */\n    unsigned long framesInTempInputBuffer; /**< frames remaining in input buffer from previous adaption iteration */\n\n    void *tempOutputBuffer;         /**< used for slips, block adaption, and conversion. */\n    void **tempOutputBufferPtrs;    /**< storage for non-interleaved buffer pointers, NULL for interleaved user output */\n    unsigned long framesInTempOutputBuffer; /**< frames remaining in input buffer from previous adaption iteration */\n\n    PaStreamCallbackTimeInfo *timeInfo;\n\n    PaStreamCallbackFlags callbackStatusFlags;\n\n    int hostInputIsInterleaved;\n    unsigned long hostInputFrameCount[2];\n    PaUtilChannelDescriptor *hostInputChannels[2]; /**< pointers to arrays of channel descriptors.\n                                                        pointers are NULL for half-duplex output processing.\n                                                        hostInputChannels[i].data is NULL when the caller\n                                                        calls PaUtil_SetNoInput()\n                                                        */\n    int hostOutputIsInterleaved;\n    unsigned long hostOutputFrameCount[2];\n    PaUtilChannelDescriptor *hostOutputChannels[2]; /**< pointers to arrays of channel descriptors.\n                                                         pointers are NULL for half-duplex input processing.\n                                                         hostOutputChannels[i].data is NULL when the caller\n                                                         calls PaUtil_SetNoOutput()\n                                                         */\n\n    PaUtilTriangularDitherGenerator ditherGenerator;\n\n    double samplePeriod;\n\n    PaStreamCallback *streamCallback;\n    void *userData;\n} PaUtilBufferProcessor;\n\n\n/** @name Initialization, termination, resetting and info */\n/*@{*/\n\n/** Initialize a buffer processor's representation stored in a\n PaUtilBufferProcessor structure. Be sure to call\n PaUtil_TerminateBufferProcessor after finishing with a buffer processor.\n\n @param bufferProcessor The buffer processor structure to initialize.\n\n @param inputChannelCount The number of input channels as passed to\n Pa_OpenStream or 0 for an output-only stream.\n\n @param userInputSampleFormat Format of user input samples, as passed to\n Pa_OpenStream. This parameter is ignored for ouput-only streams.\n\n @param hostInputSampleFormat Format of host input samples. This parameter is\n ignored for output-only streams. See note about host buffer interleave below.\n\n @param outputChannelCount The number of output channels as passed to\n Pa_OpenStream or 0 for an input-only stream.\n\n @param userOutputSampleFormat Format of user output samples, as passed to\n Pa_OpenStream. This parameter is ignored for input-only streams.\n\n @param hostOutputSampleFormat Format of host output samples. This parameter is\n ignored for input-only streams. See note about host buffer interleave below.\n\n @param sampleRate Sample rate of the stream. The more accurate this is the\n better - it is used for updating time stamps when adapting buffers.\n\n @param streamFlags Stream flags as passed to Pa_OpenStream, this parameter is\n used for selecting special sample conversion options such as clipping and\n dithering.\n\n @param framesPerUserBuffer Number of frames per user buffer, as requested\n by the framesPerBuffer parameter to Pa_OpenStream. This parameter may be\n zero to indicate that the user will accept any (and varying) buffer sizes.\n\n @param framesPerHostBuffer Specifies the number of frames per host buffer\n for the fixed buffer size mode, and the maximum number of frames\n per host buffer for the bounded host buffer size mode. It is ignored for\n the other modes.\n\n @param hostBufferSizeMode A mode flag indicating the size variability of\n host buffers that will be passed to the buffer processor. See\n PaUtilHostBufferSizeMode for further details.\n\n @param streamCallback The user stream callback passed to Pa_OpenStream.\n\n @param userData The user data field passed to Pa_OpenStream.\n\n @note The interleave flag is ignored for host buffer formats. Host\n interleave is determined by the use of different SetInput and SetOutput\n functions.\n\n @return An error code indicating whether the initialization was successful.\n If the error code is not PaNoError, the buffer processor was not initialized\n and should not be used.\n\n @see Pa_OpenStream, PaUtilHostBufferSizeMode, PaUtil_TerminateBufferProcessor\n*/\nPaError PaUtil_InitializeBufferProcessor( PaUtilBufferProcessor* bufferProcessor,\n            int inputChannelCount, PaSampleFormat userInputSampleFormat,\n            PaSampleFormat hostInputSampleFormat,\n            int outputChannelCount, PaSampleFormat userOutputSampleFormat,\n            PaSampleFormat hostOutputSampleFormat,\n            double sampleRate,\n            PaStreamFlags streamFlags,\n            unsigned long framesPerUserBuffer, /* 0 indicates don't care */\n            unsigned long framesPerHostBuffer,\n            PaUtilHostBufferSizeMode hostBufferSizeMode,\n            PaStreamCallback *streamCallback, void *userData );\n\n\n/** Terminate a buffer processor's representation. Deallocates any temporary\n buffers allocated by PaUtil_InitializeBufferProcessor.\n\n @param bufferProcessor The buffer processor structure to terminate.\n\n @see PaUtil_InitializeBufferProcessor.\n*/\nvoid PaUtil_TerminateBufferProcessor( PaUtilBufferProcessor* bufferProcessor );\n\n\n/** Clear any internally buffered data. If you call\n PaUtil_InitializeBufferProcessor in your OpenStream routine, make sure you\n call PaUtil_ResetBufferProcessor in your StartStream call.\n\n @param bufferProcessor The buffer processor to reset.\n*/\nvoid PaUtil_ResetBufferProcessor( PaUtilBufferProcessor* bufferProcessor );\n\n\n/** Retrieve the input latency of a buffer processor, in frames.\n\n @param bufferProcessor The buffer processor examine.\n\n @return The input latency introduced by the buffer processor, in frames.\n\n @see PaUtil_GetBufferProcessorOutputLatencyFrames\n*/\nunsigned long PaUtil_GetBufferProcessorInputLatencyFrames( PaUtilBufferProcessor* bufferProcessor );\n\n/** Retrieve the output latency of a buffer processor, in frames.\n\n @param bufferProcessor The buffer processor examine.\n\n @return The output latency introduced by the buffer processor, in frames.\n\n @see PaUtil_GetBufferProcessorInputLatencyFrames\n*/\nunsigned long PaUtil_GetBufferProcessorOutputLatencyFrames( PaUtilBufferProcessor* bufferProcessor );\n\n/*@}*/\n\n\n/** @name Host buffer pointer configuration\n\n Functions to set host input and output buffers, used by both callback streams\n and blocking read/write streams.\n*/\n/*@{*/\n\n\n/** Set the number of frames in the input host buffer(s) specified by the\n PaUtil_Set*InputChannel functions.\n\n @param bufferProcessor The buffer processor.\n\n @param frameCount The number of host input frames. A 0 frameCount indicates to\n use the framesPerHostBuffer value passed to PaUtil_InitializeBufferProcessor.\n\n @see PaUtil_SetNoInput, PaUtil_SetInputChannel,\n PaUtil_SetInterleavedInputChannels, PaUtil_SetNonInterleavedInputChannel\n*/\nvoid PaUtil_SetInputFrameCount( PaUtilBufferProcessor* bufferProcessor,\n        unsigned long frameCount );\n\n\n/** Indicate that no input is available. This function should be used when\n priming the output of a full-duplex stream opened with the\n paPrimeOutputBuffersUsingStreamCallback flag. Note that it is not necessary\n to call this or any other PaUtil_Set*Input* functions for ouput-only streams.\n\n @param bufferProcessor The buffer processor.\n*/\nvoid PaUtil_SetNoInput( PaUtilBufferProcessor* bufferProcessor );\n\n\n/** Provide the buffer processor with a pointer to a host input channel.\n\n @param bufferProcessor The buffer processor.\n @param channel The channel number.\n @param data The buffer.\n @param stride The stride from one sample to the next, in samples. For\n interleaved host buffers, the stride will usually be the same as the number of\n channels in the buffer.\n*/\nvoid PaUtil_SetInputChannel( PaUtilBufferProcessor* bufferProcessor,\n        unsigned int channel, void *data, unsigned int stride );\n\n\n/** Provide the buffer processor with a pointer to an number of interleaved\n host input channels.\n\n @param bufferProcessor The buffer processor.\n @param firstChannel The first channel number.\n @param data The buffer.\n @param channelCount The number of interleaved channels in the buffer. If\n channelCount is zero, the number of channels specified to\n PaUtil_InitializeBufferProcessor will be used.\n*/\nvoid PaUtil_SetInterleavedInputChannels( PaUtilBufferProcessor* bufferProcessor,\n        unsigned int firstChannel, void *data, unsigned int channelCount );\n\n\n/** Provide the buffer processor with a pointer to one non-interleaved host\n output channel.\n\n @param bufferProcessor The buffer processor.\n @param channel The channel number.\n @param data The buffer.\n*/\nvoid PaUtil_SetNonInterleavedInputChannel( PaUtilBufferProcessor* bufferProcessor,\n        unsigned int channel, void *data );\n\n\n/** Use for the second buffer half when the input buffer is split in two halves.\n @see PaUtil_SetInputFrameCount\n*/\nvoid PaUtil_Set2ndInputFrameCount( PaUtilBufferProcessor* bufferProcessor,\n        unsigned long frameCount );\n\n/** Use for the second buffer half when the input buffer is split in two halves.\n @see PaUtil_SetInputChannel\n*/\nvoid PaUtil_Set2ndInputChannel( PaUtilBufferProcessor* bufferProcessor,\n        unsigned int channel, void *data, unsigned int stride );\n\n/** Use for the second buffer half when the input buffer is split in two halves.\n @see PaUtil_SetInterleavedInputChannels\n*/\nvoid PaUtil_Set2ndInterleavedInputChannels( PaUtilBufferProcessor* bufferProcessor,\n        unsigned int firstChannel, void *data, unsigned int channelCount );\n\n/** Use for the second buffer half when the input buffer is split in two halves.\n @see PaUtil_SetNonInterleavedInputChannel\n*/\nvoid PaUtil_Set2ndNonInterleavedInputChannel( PaUtilBufferProcessor* bufferProcessor,\n        unsigned int channel, void *data );\n\n\n/** Set the number of frames in the output host buffer(s) specified by the\n PaUtil_Set*OutputChannel functions.\n\n @param bufferProcessor The buffer processor.\n\n @param frameCount The number of host output frames. A 0 frameCount indicates to\n use the framesPerHostBuffer value passed to PaUtil_InitializeBufferProcessor.\n\n @see PaUtil_SetOutputChannel, PaUtil_SetInterleavedOutputChannels,\n PaUtil_SetNonInterleavedOutputChannel\n*/\nvoid PaUtil_SetOutputFrameCount( PaUtilBufferProcessor* bufferProcessor,\n        unsigned long frameCount );\n\n\n/** Indicate that the output will be discarded. This function should be used\n when implementing the paNeverDropInput mode for full duplex streams.\n\n @param bufferProcessor The buffer processor.\n*/\nvoid PaUtil_SetNoOutput( PaUtilBufferProcessor* bufferProcessor );\n\n\n/** Provide the buffer processor with a pointer to a host output channel.\n\n @param bufferProcessor The buffer processor.\n @param channel The channel number.\n @param data The buffer.\n @param stride The stride from one sample to the next, in samples. For\n interleaved host buffers, the stride will usually be the same as the number of\n channels in the buffer.\n*/\nvoid PaUtil_SetOutputChannel( PaUtilBufferProcessor* bufferProcessor,\n        unsigned int channel, void *data, unsigned int stride );\n\n\n/** Provide the buffer processor with a pointer to a number of interleaved\n host output channels.\n\n @param bufferProcessor The buffer processor.\n @param firstChannel The first channel number.\n @param data The buffer.\n @param channelCount The number of interleaved channels in the buffer. If\n channelCount is zero, the number of channels specified to\n PaUtil_InitializeBufferProcessor will be used.\n*/\nvoid PaUtil_SetInterleavedOutputChannels( PaUtilBufferProcessor* bufferProcessor,\n        unsigned int firstChannel, void *data, unsigned int channelCount );\n\n\n/** Provide the buffer processor with a pointer to one non-interleaved host\n output channel.\n\n @param bufferProcessor The buffer processor.\n @param channel The channel number.\n @param data The buffer.\n*/\nvoid PaUtil_SetNonInterleavedOutputChannel( PaUtilBufferProcessor* bufferProcessor,\n        unsigned int channel, void *data );\n\n\n/** Use for the second buffer half when the output buffer is split in two halves.\n @see PaUtil_SetOutputFrameCount\n*/\nvoid PaUtil_Set2ndOutputFrameCount( PaUtilBufferProcessor* bufferProcessor,\n        unsigned long frameCount );\n\n/** Use for the second buffer half when the output buffer is split in two halves.\n @see PaUtil_SetOutputChannel\n*/\nvoid PaUtil_Set2ndOutputChannel( PaUtilBufferProcessor* bufferProcessor,\n        unsigned int channel, void *data, unsigned int stride );\n\n/** Use for the second buffer half when the output buffer is split in two halves.\n @see PaUtil_SetInterleavedOutputChannels\n*/\nvoid PaUtil_Set2ndInterleavedOutputChannels( PaUtilBufferProcessor* bufferProcessor,\n        unsigned int firstChannel, void *data, unsigned int channelCount );\n\n/** Use for the second buffer half when the output buffer is split in two halves.\n @see PaUtil_SetNonInterleavedOutputChannel\n*/\nvoid PaUtil_Set2ndNonInterleavedOutputChannel( PaUtilBufferProcessor* bufferProcessor,\n        unsigned int channel, void *data );\n\n/*@}*/\n\n\n/** @name Buffer processing functions for callback streams\n*/\n/*@{*/\n\n/** Commence processing a host buffer (or a pair of host buffers in the\n full-duplex case) for a callback stream.\n\n @param bufferProcessor The buffer processor.\n\n @param timeInfo Timing information for the first sample of the host\n buffer(s). This information may be adjusted when buffer adaption is being\n performed.\n\n @param callbackStatusFlags Flags indicating whether underruns and overruns\n have occurred since the last time the buffer processor was called.\n*/\nvoid PaUtil_BeginBufferProcessing( PaUtilBufferProcessor* bufferProcessor,\n        PaStreamCallbackTimeInfo* timeInfo, PaStreamCallbackFlags callbackStatusFlags );\n\n\n/** Finish processing a host buffer (or a pair of host buffers in the\n full-duplex case) for a callback stream.\n\n @param bufferProcessor The buffer processor.\n\n @param callbackResult On input, indicates a previous callback result, and on\n exit, the result of the user stream callback, if it is called.\n On entry callbackResult should contain one of { paContinue, paComplete, or\n paAbort}. If paComplete is passed, the stream callback will not be called\n but any audio that was generated by previous stream callbacks will be copied\n to the output buffer(s). You can check whether the buffer processor's internal\n buffer is empty by calling PaUtil_IsBufferProcessorOutputEmpty.\n\n If the stream callback is called its result is stored in *callbackResult. If\n the stream callback returns paComplete or paAbort, all output buffers will be\n full of valid data - some of which may be zeros to account for data that\n wasn't generated by the terminating callback.\n\n @return The number of frames processed. This usually corresponds to the\n number of frames specified by the PaUtil_Set*FrameCount functions, except in\n the paUtilVariableHostBufferSizePartialUsageAllowed buffer size mode when a\n smaller value may be returned.\n*/\nunsigned long PaUtil_EndBufferProcessing( PaUtilBufferProcessor* bufferProcessor,\n        int *callbackResult );\n\n\n/** Determine whether any callback generated output remains in the buffer\n processor's internal buffers. This method may be used to determine when to\n continue calling PaUtil_EndBufferProcessing() after the callback has returned\n a callbackResult of paComplete.\n\n @param bufferProcessor The buffer processor.\n\n @return Returns non-zero when callback generated output remains in the internal\n buffer and zero (0) when there internal buffer contains no callback generated\n data.\n*/\nint PaUtil_IsBufferProcessorOutputEmpty( PaUtilBufferProcessor* bufferProcessor );\n\n/*@}*/\n\n\n/** @name Buffer processing functions for blocking read/write streams\n*/\n/*@{*/\n\n/** Copy samples from host input channels set up by the PaUtil_Set*InputChannels\n functions to a user supplied buffer. This function is intended for use with\n blocking read/write streams. Copies the minimum of the number of\n user frames (specified by the frameCount parameter) and the number of available\n host frames (specified in a previous call to SetInputFrameCount()).\n\n @param bufferProcessor The buffer processor.\n\n @param buffer A pointer to the user buffer pointer, or a pointer to a pointer\n to an array of user buffer pointers for a non-interleaved stream. It is\n important that this parameter points to a copy of the user buffer pointers,\n not to the actual user buffer pointers, because this function updates the\n pointers before returning.\n\n @param frameCount The number of frames of data in the buffer(s) pointed to by\n the buffer parameter.\n\n @return The number of frames copied. The buffer pointer(s) pointed to by the\n buffer parameter are advanced to point to the frame(s) following the last one\n filled.\n*/\nunsigned long PaUtil_CopyInput( PaUtilBufferProcessor* bufferProcessor,\n        void **buffer, unsigned long frameCount );\n\n\n/* Copy samples from a user supplied buffer to host output channels set up by\n the PaUtil_Set*OutputChannels functions. This function is intended for use with\n blocking read/write streams. Copies the minimum of the number of\n user frames (specified by the frameCount parameter) and the number of\n host frames (specified in a previous call to SetOutputFrameCount()).\n\n @param bufferProcessor The buffer processor.\n\n @param buffer A pointer to the user buffer pointer, or a pointer to a pointer\n to an array of user buffer pointers for a non-interleaved stream. It is\n important that this parameter points to a copy of the user buffer pointers,\n not to the actual user buffer pointers, because this function updates the\n pointers before returning.\n\n @param frameCount The number of frames of data in the buffer(s) pointed to by\n the buffer parameter.\n\n @return The number of frames copied. The buffer pointer(s) pointed to by the\n buffer parameter are advanced to point to the frame(s) following the last one\n copied.\n*/\nunsigned long PaUtil_CopyOutput( PaUtilBufferProcessor* bufferProcessor,\n        const void ** buffer, unsigned long frameCount );\n\n\n/* Zero samples in host output channels set up by the PaUtil_Set*OutputChannels\n functions. This function is useful for flushing streams.\n Zeros the minimum of frameCount and the number of host frames specified in a\n previous call to SetOutputFrameCount().\n\n @param bufferProcessor The buffer processor.\n\n @param frameCount The maximum number of frames to zero.\n\n @return The number of frames zeroed.\n*/\nunsigned long PaUtil_ZeroOutput( PaUtilBufferProcessor* bufferProcessor,\n        unsigned long frameCount );\n\n\n/*@}*/\n\n\n#ifdef __cplusplus\n}\n#endif /* __cplusplus */\n#endif /* PA_PROCESS_H */\n"
  },
  {
    "path": "thirdparty/portaudio/src/common/pa_ringbuffer.c",
    "content": "/*\n * $Id$\n * Portable Audio I/O Library\n * Ring Buffer utility.\n *\n * Author: Phil Burk, http://www.softsynth.com\n * modified for SMP safety on Mac OS X by Bjorn Roche\n * modified for SMP safety on Linux by Leland Lucius\n * also, allowed for const where possible\n * modified for multiple-byte-sized data elements by Sven Fischer\n *\n * Note that this is safe only for a single-thread reader and a\n * single-thread writer.\n *\n * This program uses the PortAudio Portable Audio Library.\n * For more information see: http://www.portaudio.com\n * Copyright (c) 1999-2000 Ross Bencina and Phil Burk\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n/**\n @file\n @ingroup common_src\n*/\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <math.h>\n#include \"pa_ringbuffer.h\"\n#include <string.h>\n#include \"pa_memorybarrier.h\"\n\n/***************************************************************************\n * Initialize FIFO.\n * elementCount must be power of 2, returns -1 if not.\n */\nring_buffer_size_t PaUtil_InitializeRingBuffer( PaUtilRingBuffer *rbuf, ring_buffer_size_t elementSizeBytes, ring_buffer_size_t elementCount, void *dataPtr )\n{\n    if( ((elementCount-1) & elementCount) != 0) return -1; /* Not Power of two. */\n    rbuf->bufferSize = elementCount;\n    rbuf->buffer = (char *)dataPtr;\n    PaUtil_FlushRingBuffer( rbuf );\n    rbuf->bigMask = (elementCount*2)-1;\n    rbuf->smallMask = (elementCount)-1;\n    rbuf->elementSizeBytes = elementSizeBytes;\n    return 0;\n}\n\n/***************************************************************************\n** Return number of elements available for reading. */\nring_buffer_size_t PaUtil_GetRingBufferReadAvailable( const PaUtilRingBuffer *rbuf )\n{\n    return ( (rbuf->writeIndex - rbuf->readIndex) & rbuf->bigMask );\n}\n/***************************************************************************\n** Return number of elements available for writing. */\nring_buffer_size_t PaUtil_GetRingBufferWriteAvailable( const PaUtilRingBuffer *rbuf )\n{\n    return ( rbuf->bufferSize - PaUtil_GetRingBufferReadAvailable(rbuf));\n}\n\n/***************************************************************************\n** Clear buffer. Should only be called when buffer is NOT being read or written. */\nvoid PaUtil_FlushRingBuffer( PaUtilRingBuffer *rbuf )\n{\n    rbuf->writeIndex = rbuf->readIndex = 0;\n}\n\n/***************************************************************************\n** Get address of region(s) to which we can write data.\n** If the region is contiguous, size2 will be zero.\n** If non-contiguous, size2 will be the size of second region.\n** Returns room available to be written or elementCount, whichever is smaller.\n*/\nring_buffer_size_t PaUtil_GetRingBufferWriteRegions( PaUtilRingBuffer *rbuf, ring_buffer_size_t elementCount,\n                                       void **dataPtr1, ring_buffer_size_t *sizePtr1,\n                                       void **dataPtr2, ring_buffer_size_t *sizePtr2 )\n{\n    ring_buffer_size_t   index;\n    ring_buffer_size_t   available = PaUtil_GetRingBufferWriteAvailable( rbuf );\n    if( elementCount > available ) elementCount = available;\n    /* Check to see if write is not contiguous. */\n    index = rbuf->writeIndex & rbuf->smallMask;\n    if( (index + elementCount) > rbuf->bufferSize )\n    {\n        /* Write data in two blocks that wrap the buffer. */\n        ring_buffer_size_t   firstHalf = rbuf->bufferSize - index;\n        *dataPtr1 = &rbuf->buffer[index*rbuf->elementSizeBytes];\n        *sizePtr1 = firstHalf;\n        *dataPtr2 = &rbuf->buffer[0];\n        *sizePtr2 = elementCount - firstHalf;\n    }\n    else\n    {\n        *dataPtr1 = &rbuf->buffer[index*rbuf->elementSizeBytes];\n        *sizePtr1 = elementCount;\n        *dataPtr2 = NULL;\n        *sizePtr2 = 0;\n    }\n\n    if( available )\n        PaUtil_FullMemoryBarrier(); /* (write-after-read) => full barrier */\n\n    return elementCount;\n}\n\n\n/***************************************************************************\n*/\nring_buffer_size_t PaUtil_AdvanceRingBufferWriteIndex( PaUtilRingBuffer *rbuf, ring_buffer_size_t elementCount )\n{\n    /* ensure that previous writes are seen before we update the write index\n       (write after write)\n    */\n    PaUtil_WriteMemoryBarrier();\n    return rbuf->writeIndex = (rbuf->writeIndex + elementCount) & rbuf->bigMask;\n}\n\n/***************************************************************************\n** Get address of region(s) from which we can read data.\n** If the region is contiguous, size2 will be zero.\n** If non-contiguous, size2 will be the size of second region.\n** Returns room available to be read or elementCount, whichever is smaller.\n*/\nring_buffer_size_t PaUtil_GetRingBufferReadRegions( PaUtilRingBuffer *rbuf, ring_buffer_size_t elementCount,\n                                void **dataPtr1, ring_buffer_size_t *sizePtr1,\n                                void **dataPtr2, ring_buffer_size_t *sizePtr2 )\n{\n    ring_buffer_size_t   index;\n    ring_buffer_size_t   available = PaUtil_GetRingBufferReadAvailable( rbuf ); /* doesn't use memory barrier */\n    if( elementCount > available ) elementCount = available;\n    /* Check to see if read is not contiguous. */\n    index = rbuf->readIndex & rbuf->smallMask;\n    if( (index + elementCount) > rbuf->bufferSize )\n    {\n        /* Write data in two blocks that wrap the buffer. */\n        ring_buffer_size_t firstHalf = rbuf->bufferSize - index;\n        *dataPtr1 = &rbuf->buffer[index*rbuf->elementSizeBytes];\n        *sizePtr1 = firstHalf;\n        *dataPtr2 = &rbuf->buffer[0];\n        *sizePtr2 = elementCount - firstHalf;\n    }\n    else\n    {\n        *dataPtr1 = &rbuf->buffer[index*rbuf->elementSizeBytes];\n        *sizePtr1 = elementCount;\n        *dataPtr2 = NULL;\n        *sizePtr2 = 0;\n    }\n\n    if( available )\n        PaUtil_ReadMemoryBarrier(); /* (read-after-read) => read barrier */\n\n    return elementCount;\n}\n/***************************************************************************\n*/\nring_buffer_size_t PaUtil_AdvanceRingBufferReadIndex( PaUtilRingBuffer *rbuf, ring_buffer_size_t elementCount )\n{\n    /* ensure that previous reads (copies out of the ring buffer) are always completed before updating (writing) the read index.\n       (write-after-read) => full barrier\n    */\n    PaUtil_FullMemoryBarrier();\n    return rbuf->readIndex = (rbuf->readIndex + elementCount) & rbuf->bigMask;\n}\n\n/***************************************************************************\n** Return elements written. */\nring_buffer_size_t PaUtil_WriteRingBuffer( PaUtilRingBuffer *rbuf, const void *data, ring_buffer_size_t elementCount )\n{\n    ring_buffer_size_t size1, size2, numWritten;\n    void *data1, *data2;\n    numWritten = PaUtil_GetRingBufferWriteRegions( rbuf, elementCount, &data1, &size1, &data2, &size2 );\n    if( size2 > 0 )\n    {\n\n        memcpy( data1, data, size1*rbuf->elementSizeBytes );\n        data = ((char *)data) + size1*rbuf->elementSizeBytes;\n        memcpy( data2, data, size2*rbuf->elementSizeBytes );\n    }\n    else\n    {\n        memcpy( data1, data, size1*rbuf->elementSizeBytes );\n    }\n    PaUtil_AdvanceRingBufferWriteIndex( rbuf, numWritten );\n    return numWritten;\n}\n\n/***************************************************************************\n** Return elements read. */\nring_buffer_size_t PaUtil_ReadRingBuffer( PaUtilRingBuffer *rbuf, void *data, ring_buffer_size_t elementCount )\n{\n    ring_buffer_size_t size1, size2, numRead;\n    void *data1, *data2;\n    numRead = PaUtil_GetRingBufferReadRegions( rbuf, elementCount, &data1, &size1, &data2, &size2 );\n    if( size2 > 0 )\n    {\n        memcpy( data, data1, size1*rbuf->elementSizeBytes );\n        data = ((char *)data) + size1*rbuf->elementSizeBytes;\n        memcpy( data, data2, size2*rbuf->elementSizeBytes );\n    }\n    else\n    {\n        memcpy( data, data1, size1*rbuf->elementSizeBytes );\n    }\n    PaUtil_AdvanceRingBufferReadIndex( rbuf, numRead );\n    return numRead;\n}\n"
  },
  {
    "path": "thirdparty/portaudio/src/common/pa_ringbuffer.h",
    "content": "#ifndef PA_RINGBUFFER_H\n#define PA_RINGBUFFER_H\n/*\n * $Id$\n * Portable Audio I/O Library\n * Ring Buffer utility.\n *\n * Author: Phil Burk, http://www.softsynth.com\n * modified for SMP safety on OS X by Bjorn Roche.\n * also allowed for const where possible.\n * modified for multiple-byte-sized data elements by Sven Fischer\n *\n * Note that this is safe only for a single-thread reader\n * and a single-thread writer.\n *\n * This program is distributed with the PortAudio Portable Audio Library.\n * For more information see: http://www.portaudio.com\n * Copyright (c) 1999-2000 Ross Bencina and Phil Burk\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n/** @file\n @ingroup common_src\n @brief Single-reader single-writer lock-free ring buffer\n\n PaUtilRingBuffer is a ring buffer used to transport samples between\n different execution contexts (threads, OS callbacks, interrupt handlers)\n without requiring the use of any locks. This only works when there is\n a single reader and a single writer (ie. one thread or callback writes\n to the ring buffer, another thread or callback reads from it).\n\n The PaUtilRingBuffer structure manages a ring buffer containing N\n elements, where N must be a power of two. An element may be any size\n (specified in bytes).\n\n The memory area used to store the buffer elements must be allocated by\n the client prior to calling PaUtil_InitializeRingBuffer() and must outlive\n the use of the ring buffer.\n\n @note The ring buffer functions are not normally exposed in the PortAudio libraries.\n If you want to call them then you will need to add pa_ringbuffer.c to your application source code.\n*/\n\n#if defined(__APPLE__)\n#include <sys/types.h>\ntypedef int32_t ring_buffer_size_t;\n#elif defined( __GNUC__ )\ntypedef long ring_buffer_size_t;\n#elif (_MSC_VER >= 1400)\ntypedef long ring_buffer_size_t;\n#elif defined(_MSC_VER) || defined(__BORLANDC__)\ntypedef long ring_buffer_size_t;\n#else\ntypedef long ring_buffer_size_t;\n#endif\n\n\n\n#ifdef __cplusplus\nextern \"C\"\n{\n#endif /* __cplusplus */\n\ntypedef struct PaUtilRingBuffer\n{\n    ring_buffer_size_t  bufferSize; /**< Number of elements in FIFO. Power of 2. Set by PaUtil_InitRingBuffer. */\n    volatile ring_buffer_size_t  writeIndex; /**< Index of next writable element. Set by PaUtil_AdvanceRingBufferWriteIndex. */\n    volatile ring_buffer_size_t  readIndex;  /**< Index of next readable element. Set by PaUtil_AdvanceRingBufferReadIndex. */\n    ring_buffer_size_t  bigMask;    /**< Used for wrapping indices with extra bit to distinguish full/empty. */\n    ring_buffer_size_t  smallMask;  /**< Used for fitting indices to buffer. */\n    ring_buffer_size_t  elementSizeBytes; /**< Number of bytes per element. */\n    char  *buffer;    /**< Pointer to the buffer containing the actual data. */\n}PaUtilRingBuffer;\n\n/** Initialize Ring Buffer to empty state ready to have elements written to it.\n\n @param rbuf The ring buffer.\n\n @param elementSizeBytes The size of a single data element in bytes.\n\n @param elementCount The number of elements in the buffer (must be a power of 2).\n\n @param dataPtr A pointer to a previously allocated area where the data\n will be maintained.  It must be elementCount*elementSizeBytes long.\n\n @return -1 if elementCount is not a power of 2, otherwise 0.\n*/\nring_buffer_size_t PaUtil_InitializeRingBuffer( PaUtilRingBuffer *rbuf, ring_buffer_size_t elementSizeBytes, ring_buffer_size_t elementCount, void *dataPtr );\n\n/** Reset buffer to empty. Should only be called when buffer is NOT being read or written.\n\n @param rbuf The ring buffer.\n*/\nvoid PaUtil_FlushRingBuffer( PaUtilRingBuffer *rbuf );\n\n/** Retrieve the number of elements available in the ring buffer for writing.\n\n @param rbuf The ring buffer.\n\n @return The number of elements available for writing.\n*/\nring_buffer_size_t PaUtil_GetRingBufferWriteAvailable( const PaUtilRingBuffer *rbuf );\n\n/** Retrieve the number of elements available in the ring buffer for reading.\n\n @param rbuf The ring buffer.\n\n @return The number of elements available for reading.\n*/\nring_buffer_size_t PaUtil_GetRingBufferReadAvailable( const PaUtilRingBuffer *rbuf );\n\n/** Write data to the ring buffer.\n\n @param rbuf The ring buffer.\n\n @param data The address of new data to write to the buffer.\n\n @param elementCount The number of elements to be written.\n\n @return The number of elements written.\n*/\nring_buffer_size_t PaUtil_WriteRingBuffer( PaUtilRingBuffer *rbuf, const void *data, ring_buffer_size_t elementCount );\n\n/** Read data from the ring buffer.\n\n @param rbuf The ring buffer.\n\n @param data The address where the data should be stored.\n\n @param elementCount The number of elements to be read.\n\n @return The number of elements read.\n*/\nring_buffer_size_t PaUtil_ReadRingBuffer( PaUtilRingBuffer *rbuf, void *data, ring_buffer_size_t elementCount );\n\n/** Get address of region(s) to which we can write data.\n\n @param rbuf The ring buffer.\n\n @param elementCount The number of elements desired.\n\n @param dataPtr1 The address where the first (or only) region pointer will be\n stored.\n\n @param sizePtr1 The address where the first (or only) region length will be\n stored.\n\n @param dataPtr2 The address where the second region pointer will be stored if\n the first region is too small to satisfy elementCount.\n\n @param sizePtr2 The address where the second region length will be stored if\n the first region is too small to satisfy elementCount.\n\n @return The room available to be written or elementCount, whichever is smaller.\n*/\nring_buffer_size_t PaUtil_GetRingBufferWriteRegions( PaUtilRingBuffer *rbuf, ring_buffer_size_t elementCount,\n                                       void **dataPtr1, ring_buffer_size_t *sizePtr1,\n                                       void **dataPtr2, ring_buffer_size_t *sizePtr2 );\n\n/** Advance the write index to the next location to be written.\n\n @param rbuf The ring buffer.\n\n @param elementCount The number of elements to advance.\n\n @return The new position.\n*/\nring_buffer_size_t PaUtil_AdvanceRingBufferWriteIndex( PaUtilRingBuffer *rbuf, ring_buffer_size_t elementCount );\n\n/** Get address of region(s) from which we can read data.\n\n @param rbuf The ring buffer.\n\n @param elementCount The number of elements desired.\n\n @param dataPtr1 The address where the first (or only) region pointer will be\n stored.\n\n @param sizePtr1 The address where the first (or only) region length will be\n stored.\n\n @param dataPtr2 The address where the second region pointer will be stored if\n the first region is too small to satisfy elementCount.\n\n @param sizePtr2 The address where the second region length will be stored if\n the first region is too small to satisfy elementCount.\n\n @return The number of elements available for reading.\n*/\nring_buffer_size_t PaUtil_GetRingBufferReadRegions( PaUtilRingBuffer *rbuf, ring_buffer_size_t elementCount,\n                                      void **dataPtr1, ring_buffer_size_t *sizePtr1,\n                                      void **dataPtr2, ring_buffer_size_t *sizePtr2 );\n\n/** Advance the read index to the next location to be read.\n\n @param rbuf The ring buffer.\n\n @param elementCount The number of elements to advance.\n\n @return The new position.\n*/\nring_buffer_size_t PaUtil_AdvanceRingBufferReadIndex( PaUtilRingBuffer *rbuf, ring_buffer_size_t elementCount );\n\n#ifdef __cplusplus\n}\n#endif /* __cplusplus */\n#endif /* PA_RINGBUFFER_H */\n"
  },
  {
    "path": "thirdparty/portaudio/src/common/pa_stream.c",
    "content": "/*\n * $Id$\n * Portable Audio I/O Library\n * stream interface\n *\n * Based on the Open Source API proposed by Ross Bencina\n * Copyright (c) 2008 Ross Bencina\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n/** @file\n @ingroup common_src\n\n @brief Stream interfaces, representation structures and helper functions\n used to interface between pa_front.c host API implementations.\n*/\n\n\n#include \"pa_stream.h\"\n\n\nvoid PaUtil_InitializeStreamInterface( PaUtilStreamInterface *streamInterface,\n                                       PaError (*Close)( PaStream* ),\n                                       PaError (*Start)( PaStream* ),\n                                       PaError (*Stop)( PaStream* ),\n                                       PaError (*Abort)( PaStream* ),\n                                       PaError (*IsStopped)( PaStream* ),\n                                       PaError (*IsActive)( PaStream* ),\n                                       PaTime (*GetTime)( PaStream* ),\n                                       double (*GetCpuLoad)( PaStream* ),\n                                       PaError (*Read)( PaStream*, void *, unsigned long ),\n                                       PaError (*Write)( PaStream*, const void *, unsigned long ),\n                                       signed long (*GetReadAvailable)( PaStream* ),\n                                       signed long (*GetWriteAvailable)( PaStream* )  )\n{\n    streamInterface->Close = Close;\n    streamInterface->Start = Start;\n    streamInterface->Stop = Stop;\n    streamInterface->Abort = Abort;\n    streamInterface->IsStopped = IsStopped;\n    streamInterface->IsActive = IsActive;\n    streamInterface->GetTime = GetTime;\n    streamInterface->GetCpuLoad = GetCpuLoad;\n    streamInterface->Read = Read;\n    streamInterface->Write = Write;\n    streamInterface->GetReadAvailable = GetReadAvailable;\n    streamInterface->GetWriteAvailable = GetWriteAvailable;\n}\n\n\nvoid PaUtil_InitializeStreamRepresentation( PaUtilStreamRepresentation *streamRepresentation,\n        PaUtilStreamInterface *streamInterface,\n        PaStreamCallback *streamCallback,\n        void *userData )\n{\n    streamRepresentation->magic = PA_STREAM_MAGIC;\n    streamRepresentation->nextOpenStream = 0;\n    streamRepresentation->streamInterface = streamInterface;\n    streamRepresentation->streamCallback = streamCallback;\n    streamRepresentation->streamFinishedCallback = 0;\n\n    streamRepresentation->userData = userData;\n\n    streamRepresentation->streamInfo.inputLatency = 0.;\n    streamRepresentation->streamInfo.outputLatency = 0.;\n    streamRepresentation->streamInfo.sampleRate = 0.;\n}\n\n\nvoid PaUtil_TerminateStreamRepresentation( PaUtilStreamRepresentation *streamRepresentation )\n{\n    streamRepresentation->magic = 0;\n}\n\n\nPaError PaUtil_DummyRead( PaStream* stream,\n                               void *buffer,\n                               unsigned long frames )\n{\n    (void)stream; /* unused parameter */\n    (void)buffer; /* unused parameter */\n    (void)frames; /* unused parameter */\n\n    return paCanNotReadFromACallbackStream;\n}\n\n\nPaError PaUtil_DummyWrite( PaStream* stream,\n                               const void *buffer,\n                               unsigned long frames )\n{\n    (void)stream; /* unused parameter */\n    (void)buffer; /* unused parameter */\n    (void)frames; /* unused parameter */\n\n    return paCanNotWriteToACallbackStream;\n}\n\n\nsigned long PaUtil_DummyGetReadAvailable( PaStream* stream )\n{\n    (void)stream; /* unused parameter */\n\n    return paCanNotReadFromACallbackStream;\n}\n\n\nsigned long PaUtil_DummyGetWriteAvailable( PaStream* stream )\n{\n    (void)stream; /* unused parameter */\n\n    return paCanNotWriteToACallbackStream;\n}\n\n\ndouble PaUtil_DummyGetCpuLoad( PaStream* stream )\n{\n    (void)stream; /* unused parameter */\n\n    return 0.0;\n}\n"
  },
  {
    "path": "thirdparty/portaudio/src/common/pa_stream.h",
    "content": "#ifndef PA_STREAM_H\n#define PA_STREAM_H\n/*\n * $Id$\n * Portable Audio I/O Library\n * stream interface\n *\n * Based on the Open Source API proposed by Ross Bencina\n * Copyright (c) 1999-2008 Ross Bencina, Phil Burk\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n/** @file\n @ingroup common_src\n\n @brief Stream interfaces, representation structures and helper functions\n used to interface between pa_front.c host API implementations.\n*/\n\n\n#include \"portaudio.h\"\n\n#ifdef __cplusplus\nextern \"C\"\n{\n#endif /* __cplusplus */\n\n\n#define PA_STREAM_MAGIC (0x18273645)\n\n\n/** A structure representing an (abstract) interface to a host API. Contains\n pointers to functions which implement the interface.\n\n All PaStreamInterface functions are guaranteed to be called with a non-null,\n valid stream parameter.\n*/\ntypedef struct {\n    PaError (*Close)( PaStream* stream );\n    PaError (*Start)( PaStream *stream );\n    PaError (*Stop)( PaStream *stream );\n    PaError (*Abort)( PaStream *stream );\n    PaError (*IsStopped)( PaStream *stream );\n    PaError (*IsActive)( PaStream *stream );\n    PaTime (*GetTime)( PaStream *stream );\n    double (*GetCpuLoad)( PaStream* stream );\n    PaError (*Read)( PaStream* stream, void *buffer, unsigned long frames );\n    PaError (*Write)( PaStream* stream, const void *buffer, unsigned long frames );\n    signed long (*GetReadAvailable)( PaStream* stream );\n    signed long (*GetWriteAvailable)( PaStream* stream );\n} PaUtilStreamInterface;\n\n\n/** Initialize the fields of a PaUtilStreamInterface structure.\n*/\nvoid PaUtil_InitializeStreamInterface( PaUtilStreamInterface *streamInterface,\n    PaError (*Close)( PaStream* ),\n    PaError (*Start)( PaStream* ),\n    PaError (*Stop)( PaStream* ),\n    PaError (*Abort)( PaStream* ),\n    PaError (*IsStopped)( PaStream* ),\n    PaError (*IsActive)( PaStream* ),\n    PaTime (*GetTime)( PaStream* ),\n    double (*GetCpuLoad)( PaStream* ),\n    PaError (*Read)( PaStream* stream, void *buffer, unsigned long frames ),\n    PaError (*Write)( PaStream* stream, const void *buffer, unsigned long frames ),\n    signed long (*GetReadAvailable)( PaStream* stream ),\n    signed long (*GetWriteAvailable)( PaStream* stream ) );\n\n\n/** Dummy Read function for use in interfaces to a callback based streams.\n Pass to the Read parameter of PaUtil_InitializeStreamInterface.\n @return An error code indicating that the function has no effect\n because the stream is a callback stream.\n*/\nPaError PaUtil_DummyRead( PaStream* stream,\n                       void *buffer,\n                       unsigned long frames );\n\n\n/** Dummy Write function for use in an interfaces to callback based streams.\n Pass to the Write parameter of PaUtil_InitializeStreamInterface.\n @return An error code indicating that the function has no effect\n because the stream is a callback stream.\n*/\nPaError PaUtil_DummyWrite( PaStream* stream,\n                       const void *buffer,\n                       unsigned long frames );\n\n\n/** Dummy GetReadAvailable function for use in interfaces to callback based\n streams. Pass to the GetReadAvailable parameter of PaUtil_InitializeStreamInterface.\n @return An error code indicating that the function has no effect\n because the stream is a callback stream.\n*/\nsigned long PaUtil_DummyGetReadAvailable( PaStream* stream );\n\n\n/** Dummy GetWriteAvailable function for use in interfaces to callback based\n streams. Pass to the GetWriteAvailable parameter of PaUtil_InitializeStreamInterface.\n @return An error code indicating that the function has no effect\n because the stream is a callback stream.\n*/\nsigned long PaUtil_DummyGetWriteAvailable( PaStream* stream );\n\n\n\n/** Dummy GetCpuLoad function for use in an interface to a read/write stream.\n Pass to the GetCpuLoad parameter of PaUtil_InitializeStreamInterface.\n @return Returns 0.\n*/\ndouble PaUtil_DummyGetCpuLoad( PaStream* stream );\n\n\n/** Non host specific data for a stream. This data is used by pa_front to\n forward to the appropriate functions in the streamInterface structure.\n*/\ntypedef struct PaUtilStreamRepresentation {\n    unsigned long magic;    /**< set to PA_STREAM_MAGIC */\n    struct PaUtilStreamRepresentation *nextOpenStream; /**< field used by multi-api code */\n    PaUtilStreamInterface *streamInterface;\n    PaStreamCallback *streamCallback;\n    PaStreamFinishedCallback *streamFinishedCallback;\n    void *userData;\n    PaStreamInfo streamInfo;\n} PaUtilStreamRepresentation;\n\n\n/** Initialize a PaUtilStreamRepresentation structure.\n\n @see PaUtil_InitializeStreamRepresentation\n*/\nvoid PaUtil_InitializeStreamRepresentation(\n        PaUtilStreamRepresentation *streamRepresentation,\n        PaUtilStreamInterface *streamInterface,\n        PaStreamCallback *streamCallback,\n        void *userData );\n\n\n/** Clean up a PaUtilStreamRepresentation structure previously initialized\n by a call to PaUtil_InitializeStreamRepresentation.\n\n @see PaUtil_InitializeStreamRepresentation\n*/\nvoid PaUtil_TerminateStreamRepresentation( PaUtilStreamRepresentation *streamRepresentation );\n\n\n/** Check that the stream pointer is valid.\n\n @return Returns paNoError if the stream pointer appears to be OK, otherwise\n returns an error indicating the cause of failure.\n*/\nPaError PaUtil_ValidateStreamPointer( PaStream *stream );\n\n\n/** Cast an opaque stream pointer into a pointer to a PaUtilStreamRepresentation.\n\n @see PaUtilStreamRepresentation\n*/\n#define PA_STREAM_REP( stream )\\\n    ((PaUtilStreamRepresentation*) (stream) )\n\n\n/** Cast an opaque stream pointer into a pointer to a PaUtilStreamInterface.\n\n @see PaUtilStreamRepresentation, PaUtilStreamInterface\n*/\n#define PA_STREAM_INTERFACE( stream )\\\n    PA_STREAM_REP( (stream) )->streamInterface\n\n\n\n#ifdef __cplusplus\n}\n#endif /* __cplusplus */\n#endif /* PA_STREAM_H */\n"
  },
  {
    "path": "thirdparty/portaudio/src/common/pa_trace.c",
    "content": "/*\n * $Id$\n * Portable Audio I/O Library Trace Facility\n * Store trace information in real-time for later printing.\n *\n * Based on the Open Source API proposed by Ross Bencina\n * Copyright (c) 1999-2000 Phil Burk\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n/** @file\n @ingroup common_src\n\n @brief Real-time safe event trace logging facility for debugging.\n*/\n\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <stdarg.h>\n#include <string.h>\n#include <assert.h>\n#include \"pa_trace.h\"\n#include \"pa_util.h\"\n#include \"pa_debugprint.h\"\n\n#if PA_TRACE_REALTIME_EVENTS\n\nstatic char const *traceTextArray[PA_MAX_TRACE_RECORDS];\nstatic int traceIntArray[PA_MAX_TRACE_RECORDS];\nstatic int traceIndex = 0;\nstatic int traceBlock = 0;\n\n/*********************************************************************/\nvoid PaUtil_ResetTraceMessages()\n{\n    traceIndex = 0;\n}\n\n/*********************************************************************/\nvoid PaUtil_DumpTraceMessages()\n{\n    int i;\n    int messageCount = (traceIndex < PA_MAX_TRACE_RECORDS) ? traceIndex : PA_MAX_TRACE_RECORDS;\n\n    printf(\"DumpTraceMessages: traceIndex = %d\\n\", traceIndex );\n    for( i=0; i<messageCount; i++ )\n    {\n        printf(\"%3d: %s = 0x%08X\\n\",\n               i, traceTextArray[i], traceIntArray[i] );\n    }\n    PaUtil_ResetTraceMessages();\n    fflush(stdout);\n}\n\n/*********************************************************************/\nvoid PaUtil_AddTraceMessage( const char *msg, int data )\n{\n    if( (traceIndex == PA_MAX_TRACE_RECORDS) && (traceBlock == 0) )\n    {\n        traceBlock = 1;\n        /*  PaUtil_DumpTraceMessages(); */\n    }\n    else if( traceIndex < PA_MAX_TRACE_RECORDS )\n    {\n        traceTextArray[traceIndex] = msg;\n        traceIntArray[traceIndex] = data;\n        traceIndex++;\n    }\n}\n\n/************************************************************************/\n/* High performance log alternative                                     */\n/************************************************************************/\n\ntypedef unsigned long long  PaUint64;\n\ntypedef struct __PaHighPerformanceLog\n{\n    unsigned    magik;\n    int         writePtr;\n    int         readPtr;\n    int         size;\n    double      refTime;\n    char*       data;\n} PaHighPerformanceLog;\n\nstatic const unsigned kMagik = 0xcafebabe;\n\n#define USEC_PER_SEC    (1000000ULL)\n\nint PaUtil_InitializeHighSpeedLog( LogHandle* phLog, unsigned maxSizeInBytes )\n{\n    PaHighPerformanceLog* pLog = (PaHighPerformanceLog*)PaUtil_AllocateMemory(sizeof(PaHighPerformanceLog));\n    if (pLog == 0)\n    {\n        return paInsufficientMemory;\n    }\n    assert(phLog != 0);\n    *phLog = pLog;\n\n    pLog->data = (char*)PaUtil_AllocateMemory(maxSizeInBytes);\n    if (pLog->data == 0)\n    {\n        PaUtil_FreeMemory(pLog);\n        return paInsufficientMemory;\n    }\n    pLog->magik = kMagik;\n    pLog->size = maxSizeInBytes;\n    pLog->refTime = PaUtil_GetTime();\n    return paNoError;\n}\n\nvoid PaUtil_ResetHighSpeedLogTimeRef( LogHandle hLog )\n{\n    PaHighPerformanceLog* pLog = (PaHighPerformanceLog*)hLog;\n    assert(pLog->magik == kMagik);\n    pLog->refTime = PaUtil_GetTime();\n}\n\ntypedef struct __PaLogEntryHeader\n{\n    int    size;\n    double timeStamp;\n} PaLogEntryHeader;\n\n#ifdef __APPLE__\n#define _vsnprintf vsnprintf\n#define min(a,b) ((a)<(b)?(a):(b))\n#endif\n\n\nint PaUtil_AddHighSpeedLogMessage( LogHandle hLog, const char* fmt, ... )\n{\n    va_list l;\n    int n = 0;\n    PaHighPerformanceLog* pLog = (PaHighPerformanceLog*)hLog;\n    if (pLog != 0)\n    {\n        PaLogEntryHeader* pHeader;\n        char* p;\n        int maxN;\n        assert(pLog->magik == kMagik);\n        pHeader = (PaLogEntryHeader*)( pLog->data + pLog->writePtr );\n        p = (char*)( pHeader + 1 );\n        maxN = pLog->size - pLog->writePtr - 2 * sizeof(PaLogEntryHeader);\n\n        pHeader->timeStamp = PaUtil_GetTime() - pLog->refTime;\n        if (maxN > 0)\n        {\n            if (maxN > 32)\n            {\n                va_start(l, fmt);\n                n = _vsnprintf(p, min(1024, maxN), fmt, l);\n                va_end(l);\n            }\n            else {\n                n = sprintf(p, \"End of log...\");\n            }\n            n = ((n + sizeof(unsigned)) & ~(sizeof(unsigned)-1)) + sizeof(PaLogEntryHeader);\n            pHeader->size = n;\n#if 0\n            PaUtil_DebugPrint(\"%05u.%03u: %s\\n\", pHeader->timeStamp/1000, pHeader->timeStamp%1000, p);\n#endif\n            pLog->writePtr += n;\n        }\n    }\n    return n;\n}\n\nvoid PaUtil_DumpHighSpeedLog( LogHandle hLog, const char* fileName )\n{\n    FILE* f = (fileName != NULL) ? fopen(fileName, \"w\") : stdout;\n    unsigned localWritePtr;\n    PaHighPerformanceLog* pLog = (PaHighPerformanceLog*)hLog;\n    assert(pLog->magik == kMagik);\n    localWritePtr = pLog->writePtr;\n    while (pLog->readPtr != localWritePtr)\n    {\n        const PaLogEntryHeader* pHeader = (const PaLogEntryHeader*)( pLog->data + pLog->readPtr );\n        const char* p = (const char*)( pHeader + 1 );\n        const PaUint64 ts = (const PaUint64)( pHeader->timeStamp * USEC_PER_SEC );\n        assert(pHeader->size < (1024+sizeof(unsigned)+sizeof(PaLogEntryHeader)));\n        fprintf(f, \"%05u.%03u: %s\\n\", (unsigned)(ts/1000), (unsigned)(ts%1000), p);\n        pLog->readPtr += pHeader->size;\n    }\n    if (f != stdout)\n    {\n        fclose(f);\n    }\n}\n\nvoid PaUtil_DiscardHighSpeedLog( LogHandle hLog )\n{\n    PaHighPerformanceLog* pLog = (PaHighPerformanceLog*)hLog;\n    assert(pLog->magik == kMagik);\n    PaUtil_FreeMemory(pLog->data);\n    PaUtil_FreeMemory(pLog);\n}\n\n#else\n/* This stub was added so that this file will generate a symbol.\n * Otherwise linker/archiver programs will complain.\n */\nint PaUtil_TraceStubToSatisfyLinker(void)\n{\n    return 0;\n}\n#endif /* TRACE_REALTIME_EVENTS */\n"
  },
  {
    "path": "thirdparty/portaudio/src/common/pa_trace.h",
    "content": "#ifndef PA_TRACE_H\n#define PA_TRACE_H\n/*\n * $Id$\n * Portable Audio I/O Library Trace Facility\n * Store trace information in real-time for later printing.\n *\n * Based on the Open Source API proposed by Ross Bencina\n * Copyright (c) 1999-2000 Phil Burk\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n/** @file\n @ingroup common_src\n\n @brief Real-time safe event trace logging facility for debugging.\n\n Allows data to be logged to a fixed size trace buffer in a real-time\n execution context (such as at interrupt time). Each log entry consists\n of a message comprising a string pointer and an int.  The trace buffer\n may be dumped to stdout later.\n\n This facility is only active if PA_TRACE_REALTIME_EVENTS is set to 1,\n otherwise the trace functions expand to no-ops.\n\n @fn PaUtil_ResetTraceMessages\n @brief Clear the trace buffer.\n\n @fn PaUtil_AddTraceMessage\n @brief Add a message to the trace buffer. A message consists of string and an int.\n @param msg The string pointer must remain valid until PaUtil_DumpTraceMessages\n    is called. As a result, usually only string literals should be passed as\n    the msg parameter.\n\n @fn PaUtil_DumpTraceMessages\n @brief Print all messages in the trace buffer to stdout and clear the trace buffer.\n*/\n\n#ifndef PA_TRACE_REALTIME_EVENTS\n#define PA_TRACE_REALTIME_EVENTS     (0)   /**< Set to 1 to enable logging using the trace functions defined below */\n#endif\n\n#ifndef PA_MAX_TRACE_RECORDS\n#define PA_MAX_TRACE_RECORDS      (2048)   /**< Maximum number of records stored in trace buffer */\n#endif\n\n#ifdef __cplusplus\nextern \"C\"\n{\n#endif /* __cplusplus */\n\n\n#if PA_TRACE_REALTIME_EVENTS\n\nvoid PaUtil_ResetTraceMessages();\nvoid PaUtil_AddTraceMessage( const char *msg, int data );\nvoid PaUtil_DumpTraceMessages();\n\n/* Alternative interface */\n\ntypedef void* LogHandle;\n\nint PaUtil_InitializeHighSpeedLog(LogHandle* phLog, unsigned maxSizeInBytes);\nvoid PaUtil_ResetHighSpeedLogTimeRef(LogHandle hLog);\nint PaUtil_AddHighSpeedLogMessage(LogHandle hLog, const char* fmt, ...);\nvoid PaUtil_DumpHighSpeedLog(LogHandle hLog, const char* fileName);\nvoid PaUtil_DiscardHighSpeedLog(LogHandle hLog);\n\n#else\n\n#define PaUtil_ResetTraceMessages() /* noop */\n#define PaUtil_AddTraceMessage(msg,data) /* noop */\n#define PaUtil_DumpTraceMessages() /* noop */\n\n#define PaUtil_InitializeHighSpeedLog(phLog, maxSizeInBytes)  (0)\n#define PaUtil_ResetHighSpeedLogTimeRef(hLog)\n#define PaUtil_AddHighSpeedLogMessage(...)   (0)\n#define PaUtil_DumpHighSpeedLog(hLog, fileName)\n#define PaUtil_DiscardHighSpeedLog(hLog)\n\n#endif\n\n\n#ifdef __cplusplus\n}\n#endif /* __cplusplus */\n\n#endif /* PA_TRACE_H */\n"
  },
  {
    "path": "thirdparty/portaudio/src/common/pa_types.h",
    "content": "#ifndef PA_TYPES_H\n#define PA_TYPES_H\n\n/*\n * Portable Audio I/O Library\n * integer type definitions\n *\n * Based on the Open Source API proposed by Ross Bencina\n * Copyright (c) 1999-2006 Ross Bencina, Phil Burk\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n/** @file\n @ingroup common_src\n\n @brief Definition of 16 and 32 bit integer types (PaInt16, PaInt32 etc)\n\n SIZEOF_SHORT, SIZEOF_INT and SIZEOF_LONG are set by the configure script\n when it is used. Otherwise we default to the common 32 bit values, if your\n platform doesn't use configure, and doesn't use the default values below\n you will need to explicitly define these symbols in your make file.\n\n A PA_VALIDATE_SIZES macro is provided to assert that the values set in this\n file are correct.\n*/\n\n#ifndef SIZEOF_SHORT\n#define SIZEOF_SHORT 2\n#endif\n\n#ifndef SIZEOF_INT\n#define SIZEOF_INT 4\n#endif\n\n#ifndef SIZEOF_LONG\n#define SIZEOF_LONG 4\n#endif\n\n\n#if SIZEOF_SHORT == 2\ntypedef signed short PaInt16;\ntypedef unsigned short PaUint16;\n#elif SIZEOF_INT == 2\ntypedef signed int PaInt16;\ntypedef unsigned int PaUint16;\n#else\n#error pa_types.h was unable to determine which type to use for 16bit integers on the target platform\n#endif\n\n#if SIZEOF_SHORT == 4\ntypedef signed short PaInt32;\ntypedef unsigned short PaUint32;\n#elif SIZEOF_INT == 4\ntypedef signed int PaInt32;\ntypedef unsigned int PaUint32;\n#elif SIZEOF_LONG == 4\ntypedef signed long PaInt32;\ntypedef unsigned long PaUint32;\n#else\n#error pa_types.h was unable to determine which type to use for 32bit integers on the target platform\n#endif\n\n\n/* PA_VALIDATE_TYPE_SIZES compares the size of the integer types at runtime to\n ensure that PortAudio was configured correctly, and raises an assertion if\n they don't match the expected values. <assert.h> must be included in the\n context in which this macro is used.\n*/\n#define PA_VALIDATE_TYPE_SIZES \\\n    { \\\n        assert( \"PortAudio: type sizes are not correct in pa_types.h\" && sizeof( PaUint16 ) == 2 ); \\\n        assert( \"PortAudio: type sizes are not correct in pa_types.h\" && sizeof( PaInt16 ) == 2 ); \\\n        assert( \"PortAudio: type sizes are not correct in pa_types.h\" && sizeof( PaUint32 ) == 4 ); \\\n        assert( \"PortAudio: type sizes are not correct in pa_types.h\" && sizeof( PaInt32 ) == 4 ); \\\n    }\n\n\n#endif /* PA_TYPES_H */\n"
  },
  {
    "path": "thirdparty/portaudio/src/common/pa_util.h",
    "content": "#ifndef PA_UTIL_H\n#define PA_UTIL_H\n/*\n * $Id$\n * Portable Audio I/O Library implementation utilities header\n * common implementation utilities and interfaces\n *\n * Based on the Open Source API proposed by Ross Bencina\n * Copyright (c) 1999-2008 Ross Bencina, Phil Burk\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n/** @file\n @ingroup common_src\n\n    @brief Prototypes for utility functions used by PortAudio implementations.\n\n    Some functions declared here are defined in pa_front.c while others\n    are implemented separately for each platform.\n*/\n\n\n#include \"portaudio.h\"\n\n#ifdef __cplusplus\nextern \"C\"\n{\n#endif /* __cplusplus */\n\n\nstruct PaUtilHostApiRepresentation;\n\n\n/** Retrieve a specific host API representation. This function can be used\n by implementations to retrieve a pointer to their representation in\n host api specific extension functions which aren't passed a rep pointer\n by pa_front.c.\n\n @param hostApi A pointer to a host API representation pointer. Upon success\n this will receive the requested representation pointer.\n\n @param type A valid host API type identifier.\n\n @returns An error code. If the result is PaNoError then a pointer to the\n requested host API representation will be stored in *hostApi. If the host API\n specified by type is not found, this function returns paHostApiNotFound.\n*/\nPaError PaUtil_GetHostApiRepresentation( struct PaUtilHostApiRepresentation **hostApi,\n        PaHostApiTypeId type );\n\n\n/** Convert a PortAudio device index into a host API specific device index.\n @param hostApiDevice Pointer to a device index, on success this will receive the\n converted device index value.\n @param device The PortAudio device index to convert.\n @param hostApi The host api which the index should be converted for.\n\n @returns On success returns PaNoError and places the converted index in the\n hostApiDevice parameter.\n*/\nPaError PaUtil_DeviceIndexToHostApiDeviceIndex(\n        PaDeviceIndex *hostApiDevice, PaDeviceIndex device,\n        struct PaUtilHostApiRepresentation *hostApi );\n\n\n/** Set the host error information returned by Pa_GetLastHostErrorInfo. This\n function and the paUnanticipatedHostError error code should be used as a\n last resort.  Implementors should use existing PA error codes where possible,\n or nominate new ones. Note that at it is always better to use\n PaUtil_SetLastHostErrorInfo() and paUnanticipatedHostError than to return an\n ambiguous or inaccurate PaError code.\n\n @param hostApiType  The host API which encountered the error (ie of the caller)\n\n @param errorCode The error code returned by the native API function.\n\n @param errorText A string describing the error. PaUtil_SetLastHostErrorInfo\n makes a copy of the string, so it is not necessary for the pointer to remain\n valid after the call to PaUtil_SetLastHostErrorInfo() returns.\n\n*/\nvoid PaUtil_SetLastHostErrorInfo( PaHostApiTypeId hostApiType, long errorCode,\n        const char *errorText );\n\n\n\n/* the following functions are implemented in a platform platform specific\n .c file\n*/\n\n/** Allocate size bytes, guaranteed to be aligned to a FIXME byte boundary */\nvoid *PaUtil_AllocateMemory( long size );\n\n\n/** Release block if non-NULL. block may be NULL */\nvoid PaUtil_FreeMemory( void *block );\n\n\n/** Return the number of currently allocated blocks. This function can be\n used for detecting memory leaks.\n\n @note Allocations will only be tracked if PA_TRACK_MEMORY is #defined. If\n it isn't, this function will always return 0.\n*/\nint PaUtil_CountCurrentlyAllocatedBlocks( void );\n\n\n/** Initialize the clock used by PaUtil_GetTime(). Call this before calling\n PaUtil_GetTime.\n\n @see PaUtil_GetTime\n*/\nvoid PaUtil_InitializeClock( void );\n\n\n/** Return the system time in seconds. Used to implement CPU load functions\n\n @see PaUtil_InitializeClock\n*/\ndouble PaUtil_GetTime( void );\n\n\n/* void Pa_Sleep( long msec );  must also be implemented in per-platform .c file */\n\n\n\n#ifdef __cplusplus\n}\n#endif /* __cplusplus */\n#endif /* PA_UTIL_H */\n"
  },
  {
    "path": "thirdparty/portaudio/src/hostapi/alsa/pa_linux_alsa.c",
    "content": "/*\n * $Id$\n * PortAudio Portable Real-Time Audio Library\n * Latest Version at: http://www.portaudio.com\n * ALSA implementation by Joshua Haberman and Arve Knudsen\n *\n * Copyright (c) 2002 Joshua Haberman <joshua@haberman.com>\n * Copyright (c) 2005-2009 Arve Knudsen <arve.knudsen@gmail.com>\n * Copyright (c) 2008 Kevin Kofler <kevin.kofler@chello.at>\n *\n * Based on the Open Source API proposed by Ross Bencina\n * Copyright (c) 1999-2002 Ross Bencina, Phil Burk\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n/**\n @file\n @ingroup hostapi_src\n*/\n\n#define ALSA_PCM_NEW_HW_PARAMS_API\n#define ALSA_PCM_NEW_SW_PARAMS_API\n#include <alsa/asoundlib.h>\n#undef ALSA_PCM_NEW_HW_PARAMS_API\n#undef ALSA_PCM_NEW_SW_PARAMS_API\n\n#include <sys/poll.h>\n#include <string.h> /* strlen() */\n#include <limits.h>\n#include <math.h>\n#include <pthread.h>\n#include <signal.h>\n#include <time.h>\n#include <sys/mman.h>\n#include <signal.h> /* For sig_atomic_t */\n#ifdef PA_ALSA_DYNAMIC\n    #include <dlfcn.h> /* For dlXXX functions */\n#endif\n\n#include \"portaudio.h\"\n#include \"pa_util.h\"\n#include \"pa_unix_util.h\"\n#include \"pa_allocation.h\"\n#include \"pa_hostapi.h\"\n#include \"pa_stream.h\"\n#include \"pa_cpuload.h\"\n#include \"pa_process.h\"\n#include \"pa_endianness.h\"\n#include \"pa_debugprint.h\"\n\n#include \"pa_linux_alsa.h\"\n\n/* Add missing define (for compatibility with older ALSA versions) */\n#ifndef SND_PCM_TSTAMP_ENABLE\n    #define SND_PCM_TSTAMP_ENABLE SND_PCM_TSTAMP_MMAP\n#endif\n\n/* Combine version elements into a single (unsigned) integer */\n#define ALSA_VERSION_INT(major, minor, subminor)  ((major << 16) | (minor << 8) | subminor)\n\n/* The acceptable tolerance of sample rate set, to that requested (as a ratio, eg 50 is 2%, 100 is 1%) */\n#define RATE_MAX_DEVIATE_RATIO 100\n\n/* Defines Alsa function types and pointers to these functions. */\n#define _PA_DEFINE_FUNC(x)  typedef typeof(x) x##_ft; static x##_ft *alsa_##x = 0\n\n/* Alloca helper. */\n#define __alsa_snd_alloca(ptr,type) do { size_t __alsa_alloca_size = alsa_##type##_sizeof(); (*ptr) = (type##_t *) alloca(__alsa_alloca_size); memset(*ptr, 0, __alsa_alloca_size); } while (0)\n\n_PA_DEFINE_FUNC(snd_pcm_open);\n_PA_DEFINE_FUNC(snd_pcm_close);\n_PA_DEFINE_FUNC(snd_pcm_nonblock);\n_PA_DEFINE_FUNC(snd_pcm_frames_to_bytes);\n_PA_DEFINE_FUNC(snd_pcm_prepare);\n_PA_DEFINE_FUNC(snd_pcm_start);\n_PA_DEFINE_FUNC(snd_pcm_resume);\n_PA_DEFINE_FUNC(snd_pcm_wait);\n_PA_DEFINE_FUNC(snd_pcm_state);\n_PA_DEFINE_FUNC(snd_pcm_avail_update);\n_PA_DEFINE_FUNC(snd_pcm_areas_silence);\n_PA_DEFINE_FUNC(snd_pcm_mmap_begin);\n_PA_DEFINE_FUNC(snd_pcm_mmap_commit);\n_PA_DEFINE_FUNC(snd_pcm_readi);\n_PA_DEFINE_FUNC(snd_pcm_readn);\n_PA_DEFINE_FUNC(snd_pcm_writei);\n_PA_DEFINE_FUNC(snd_pcm_writen);\n_PA_DEFINE_FUNC(snd_pcm_drain);\n_PA_DEFINE_FUNC(snd_pcm_recover);\n_PA_DEFINE_FUNC(snd_pcm_drop);\n_PA_DEFINE_FUNC(snd_pcm_area_copy);\n_PA_DEFINE_FUNC(snd_pcm_poll_descriptors);\n_PA_DEFINE_FUNC(snd_pcm_poll_descriptors_count);\n_PA_DEFINE_FUNC(snd_pcm_poll_descriptors_revents);\n_PA_DEFINE_FUNC(snd_pcm_format_size);\n_PA_DEFINE_FUNC(snd_pcm_link);\n_PA_DEFINE_FUNC(snd_pcm_delay);\n\n_PA_DEFINE_FUNC(snd_pcm_hw_params_sizeof);\n_PA_DEFINE_FUNC(snd_pcm_hw_params_malloc);\n_PA_DEFINE_FUNC(snd_pcm_hw_params_free);\n_PA_DEFINE_FUNC(snd_pcm_hw_params_any);\n_PA_DEFINE_FUNC(snd_pcm_hw_params_set_access);\n_PA_DEFINE_FUNC(snd_pcm_hw_params_set_format);\n_PA_DEFINE_FUNC(snd_pcm_hw_params_set_channels);\n//_PA_DEFINE_FUNC(snd_pcm_hw_params_set_periods_near);\n_PA_DEFINE_FUNC(snd_pcm_hw_params_set_rate_near); //!!!\n_PA_DEFINE_FUNC(snd_pcm_hw_params_set_rate);\n_PA_DEFINE_FUNC(snd_pcm_hw_params_set_rate_resample);\n//_PA_DEFINE_FUNC(snd_pcm_hw_params_set_buffer_time_near);\n_PA_DEFINE_FUNC(snd_pcm_hw_params_set_buffer_size);\n_PA_DEFINE_FUNC(snd_pcm_hw_params_set_buffer_size_near); //!!!\n_PA_DEFINE_FUNC(snd_pcm_hw_params_set_buffer_size_min);\n//_PA_DEFINE_FUNC(snd_pcm_hw_params_set_period_time_near);\n_PA_DEFINE_FUNC(snd_pcm_hw_params_set_period_size_near);\n_PA_DEFINE_FUNC(snd_pcm_hw_params_set_periods_integer);\n_PA_DEFINE_FUNC(snd_pcm_hw_params_set_periods_min);\n\n_PA_DEFINE_FUNC(snd_pcm_hw_params_get_buffer_size);\n//_PA_DEFINE_FUNC(snd_pcm_hw_params_get_period_size);\n//_PA_DEFINE_FUNC(snd_pcm_hw_params_get_access);\n//_PA_DEFINE_FUNC(snd_pcm_hw_params_get_periods);\n//_PA_DEFINE_FUNC(snd_pcm_hw_params_get_rate);\n_PA_DEFINE_FUNC(snd_pcm_hw_params_get_channels_min);\n_PA_DEFINE_FUNC(snd_pcm_hw_params_get_channels_max);\n\n_PA_DEFINE_FUNC(snd_pcm_hw_params_test_period_size);\n_PA_DEFINE_FUNC(snd_pcm_hw_params_test_format);\n_PA_DEFINE_FUNC(snd_pcm_hw_params_test_access);\n_PA_DEFINE_FUNC(snd_pcm_hw_params_dump);\n_PA_DEFINE_FUNC(snd_pcm_hw_params);\n\n_PA_DEFINE_FUNC(snd_pcm_hw_params_get_periods_min);\n_PA_DEFINE_FUNC(snd_pcm_hw_params_get_periods_max);\n_PA_DEFINE_FUNC(snd_pcm_hw_params_set_period_size);\n_PA_DEFINE_FUNC(snd_pcm_hw_params_get_period_size_min);\n_PA_DEFINE_FUNC(snd_pcm_hw_params_get_period_size_max);\n_PA_DEFINE_FUNC(snd_pcm_hw_params_get_buffer_size_max);\n_PA_DEFINE_FUNC(snd_pcm_hw_params_get_rate_min);\n_PA_DEFINE_FUNC(snd_pcm_hw_params_get_rate_max);\n_PA_DEFINE_FUNC(snd_pcm_hw_params_get_rate_numden);\n#define alsa_snd_pcm_hw_params_alloca(ptr) __alsa_snd_alloca(ptr, snd_pcm_hw_params)\n\n_PA_DEFINE_FUNC(snd_pcm_sw_params_sizeof);\n_PA_DEFINE_FUNC(snd_pcm_sw_params_malloc);\n_PA_DEFINE_FUNC(snd_pcm_sw_params_current);\n_PA_DEFINE_FUNC(snd_pcm_sw_params_set_avail_min);\n_PA_DEFINE_FUNC(snd_pcm_sw_params);\n_PA_DEFINE_FUNC(snd_pcm_sw_params_free);\n_PA_DEFINE_FUNC(snd_pcm_sw_params_set_start_threshold);\n_PA_DEFINE_FUNC(snd_pcm_sw_params_set_stop_threshold);\n_PA_DEFINE_FUNC(snd_pcm_sw_params_get_boundary);\n_PA_DEFINE_FUNC(snd_pcm_sw_params_set_silence_threshold);\n_PA_DEFINE_FUNC(snd_pcm_sw_params_set_silence_size);\n_PA_DEFINE_FUNC(snd_pcm_sw_params_set_xfer_align);\n_PA_DEFINE_FUNC(snd_pcm_sw_params_set_tstamp_mode);\n#define alsa_snd_pcm_sw_params_alloca(ptr) __alsa_snd_alloca(ptr, snd_pcm_sw_params)\n\n_PA_DEFINE_FUNC(snd_pcm_info);\n_PA_DEFINE_FUNC(snd_pcm_info_sizeof);\n_PA_DEFINE_FUNC(snd_pcm_info_malloc);\n_PA_DEFINE_FUNC(snd_pcm_info_free);\n_PA_DEFINE_FUNC(snd_pcm_info_set_device);\n_PA_DEFINE_FUNC(snd_pcm_info_set_subdevice);\n_PA_DEFINE_FUNC(snd_pcm_info_set_stream);\n_PA_DEFINE_FUNC(snd_pcm_info_get_name);\n_PA_DEFINE_FUNC(snd_pcm_info_get_card);\n#define alsa_snd_pcm_info_alloca(ptr) __alsa_snd_alloca(ptr, snd_pcm_info)\n\n_PA_DEFINE_FUNC(snd_ctl_pcm_next_device);\n_PA_DEFINE_FUNC(snd_ctl_pcm_info);\n_PA_DEFINE_FUNC(snd_ctl_open);\n_PA_DEFINE_FUNC(snd_ctl_close);\n_PA_DEFINE_FUNC(snd_ctl_card_info_malloc);\n_PA_DEFINE_FUNC(snd_ctl_card_info_free);\n_PA_DEFINE_FUNC(snd_ctl_card_info);\n_PA_DEFINE_FUNC(snd_ctl_card_info_sizeof);\n_PA_DEFINE_FUNC(snd_ctl_card_info_get_name);\n#define alsa_snd_ctl_card_info_alloca(ptr) __alsa_snd_alloca(ptr, snd_ctl_card_info)\n\n_PA_DEFINE_FUNC(snd_config);\n_PA_DEFINE_FUNC(snd_config_update);\n_PA_DEFINE_FUNC(snd_config_search);\n_PA_DEFINE_FUNC(snd_config_iterator_entry);\n_PA_DEFINE_FUNC(snd_config_iterator_first);\n_PA_DEFINE_FUNC(snd_config_iterator_end);\n_PA_DEFINE_FUNC(snd_config_iterator_next);\n_PA_DEFINE_FUNC(snd_config_get_string);\n_PA_DEFINE_FUNC(snd_config_get_id);\n_PA_DEFINE_FUNC(snd_config_update_free_global);\n\n_PA_DEFINE_FUNC(snd_pcm_status);\n_PA_DEFINE_FUNC(snd_pcm_status_sizeof);\n_PA_DEFINE_FUNC(snd_pcm_status_get_tstamp);\n_PA_DEFINE_FUNC(snd_pcm_status_get_state);\n_PA_DEFINE_FUNC(snd_pcm_status_get_trigger_tstamp);\n_PA_DEFINE_FUNC(snd_pcm_status_get_delay);\n#define alsa_snd_pcm_status_alloca(ptr) __alsa_snd_alloca(ptr, snd_pcm_status)\n\n_PA_DEFINE_FUNC(snd_card_next);\n_PA_DEFINE_FUNC(snd_asoundlib_version);\n_PA_DEFINE_FUNC(snd_strerror);\n_PA_DEFINE_FUNC(snd_output_stdio_attach);\n\n#define alsa_snd_config_for_each(pos, next, node)\\\n    for (pos = alsa_snd_config_iterator_first(node),\\\n         next = alsa_snd_config_iterator_next(pos);\\\n         pos != alsa_snd_config_iterator_end(node); pos = next, next = alsa_snd_config_iterator_next(pos))\n\n#undef _PA_DEFINE_FUNC\n\n/* Redefine 'PA_ALSA_PATHNAME' to a different Alsa library name if desired. */\n#ifndef PA_ALSA_PATHNAME\n    #define PA_ALSA_PATHNAME \"libasound.so\"\n#endif\nstatic const char *g_AlsaLibName = PA_ALSA_PATHNAME;\n\n/* Handle to dynamically loaded library. */\nstatic void *g_AlsaLib = NULL;\n\n#ifdef PA_ALSA_DYNAMIC\n\n#define _PA_LOCAL_IMPL(x) __pa_local_##x\n\nint _PA_LOCAL_IMPL(snd_pcm_hw_params_set_rate_near) (snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val, int *dir)\n{\n    int ret;\n\n    if(( ret = alsa_snd_pcm_hw_params_set_rate(pcm, params, (*val), (*dir)) ) < 0 )\n        return ret;\n\n    return 0;\n}\n\nint _PA_LOCAL_IMPL(snd_pcm_hw_params_set_buffer_size_near) (snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_uframes_t *val)\n{\n    int ret;\n\n    if(( ret = alsa_snd_pcm_hw_params_set_buffer_size(pcm, params, (*val)) ) < 0 )\n        return ret;\n\n    return 0;\n}\n\nint _PA_LOCAL_IMPL(snd_pcm_hw_params_set_period_size_near) (snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_uframes_t *val, int *dir)\n{\n    int ret;\n\n    if(( ret = alsa_snd_pcm_hw_params_set_period_size(pcm, params, (*val), (*dir)) ) < 0 )\n        return ret;\n\n    return 0;\n}\n\nint _PA_LOCAL_IMPL(snd_pcm_hw_params_get_channels_min) (const snd_pcm_hw_params_t *params, unsigned int *val)\n{\n    (*val) = 1;\n    return 0;\n}\n\nint _PA_LOCAL_IMPL(snd_pcm_hw_params_get_channels_max) (const snd_pcm_hw_params_t *params, unsigned int *val)\n{\n    (*val) = 2;\n    return 0;\n}\n\nint _PA_LOCAL_IMPL(snd_pcm_hw_params_get_periods_min) (const snd_pcm_hw_params_t *params, unsigned int *val, int *dir)\n{\n    (*val) = 2;\n    return 0;\n}\n\nint _PA_LOCAL_IMPL(snd_pcm_hw_params_get_periods_max) (const snd_pcm_hw_params_t *params, unsigned int *val, int *dir)\n{\n    (*val) = 8;\n    return 0;\n}\n\nint _PA_LOCAL_IMPL(snd_pcm_hw_params_get_period_size_min) (const snd_pcm_hw_params_t *params, snd_pcm_uframes_t *frames, int *dir)\n{\n    (*frames) = 64;\n    return 0;\n}\n\nint _PA_LOCAL_IMPL(snd_pcm_hw_params_get_period_size_max) (const snd_pcm_hw_params_t *params, snd_pcm_uframes_t *frames, int *dir)\n{\n    (*frames) = 512;\n    return 0;\n}\n\nint _PA_LOCAL_IMPL(snd_pcm_hw_params_get_buffer_size_max) (const snd_pcm_hw_params_t *params, snd_pcm_uframes_t *val)\n{\n    int ret;\n    int dir                = 0;\n    snd_pcm_uframes_t pmax = 0;\n    unsigned int      pcnt = 0;\n\n    dir = 0;\n    if(( ret = _PA_LOCAL_IMPL(snd_pcm_hw_params_get_period_size_max)(params, &pmax, &dir) ) < 0 )\n        return ret;\n    dir = 0;\n    if(( ret = _PA_LOCAL_IMPL(snd_pcm_hw_params_get_periods_max)(params, &pcnt, &dir) ) < 0 )\n        return ret;\n\n    (*val) = pmax * pcnt;\n    return 0;\n}\n\nint _PA_LOCAL_IMPL(snd_pcm_hw_params_get_rate_min) (const snd_pcm_hw_params_t *params, unsigned int *val, int *dir)\n{\n    (*val) = 44100;\n    return 0;\n}\n\nint _PA_LOCAL_IMPL(snd_pcm_hw_params_get_rate_max) (const snd_pcm_hw_params_t *params, unsigned int *val, int *dir)\n{\n    (*val) = 44100;\n    return 0;\n}\n\n#endif // PA_ALSA_DYNAMIC\n\n/* Trying to load Alsa library dynamically if 'PA_ALSA_DYNAMIC' is defined, othervise\n   will link during compilation.\n*/\nstatic int PaAlsa_LoadLibrary()\n{\n#ifdef PA_ALSA_DYNAMIC\n\n    PA_DEBUG(( \"%s: loading ALSA library file - %s\\n\", __FUNCTION__, g_AlsaLibName ));\n\n    dlerror();\n    g_AlsaLib = dlopen(g_AlsaLibName, (RTLD_NOW|RTLD_GLOBAL) );\n    if (g_AlsaLib == NULL)\n    {\n        PA_DEBUG(( \"%s: failed dlopen() ALSA library file - %s, error: %s\\n\", __FUNCTION__, g_AlsaLibName, dlerror() ));\n        return 0;\n    }\n\n    PA_DEBUG(( \"%s: loading ALSA API\\n\", __FUNCTION__ ));\n\n    #define _PA_LOAD_FUNC(x) do {             \\\n        alsa_##x = dlsym( g_AlsaLib, #x );      \\\n        if( alsa_##x == NULL ) {               \\\n            PA_DEBUG(( \"%s: symbol [%s] not found in - %s, error: %s\\n\", __FUNCTION__, #x, g_AlsaLibName, dlerror() )); }\\\n        } while(0)\n\n#else\n\n    #define _PA_LOAD_FUNC(x) alsa_##x = &x\n\n#endif\n\n    _PA_LOAD_FUNC(snd_pcm_open);\n    _PA_LOAD_FUNC(snd_pcm_close);\n    _PA_LOAD_FUNC(snd_pcm_nonblock);\n    _PA_LOAD_FUNC(snd_pcm_frames_to_bytes);\n    _PA_LOAD_FUNC(snd_pcm_prepare);\n    _PA_LOAD_FUNC(snd_pcm_start);\n    _PA_LOAD_FUNC(snd_pcm_resume);\n    _PA_LOAD_FUNC(snd_pcm_wait);\n    _PA_LOAD_FUNC(snd_pcm_state);\n    _PA_LOAD_FUNC(snd_pcm_avail_update);\n    _PA_LOAD_FUNC(snd_pcm_areas_silence);\n    _PA_LOAD_FUNC(snd_pcm_mmap_begin);\n    _PA_LOAD_FUNC(snd_pcm_mmap_commit);\n    _PA_LOAD_FUNC(snd_pcm_readi);\n    _PA_LOAD_FUNC(snd_pcm_readn);\n    _PA_LOAD_FUNC(snd_pcm_writei);\n    _PA_LOAD_FUNC(snd_pcm_writen);\n    _PA_LOAD_FUNC(snd_pcm_drain);\n    _PA_LOAD_FUNC(snd_pcm_recover);\n    _PA_LOAD_FUNC(snd_pcm_drop);\n    _PA_LOAD_FUNC(snd_pcm_area_copy);\n    _PA_LOAD_FUNC(snd_pcm_poll_descriptors);\n    _PA_LOAD_FUNC(snd_pcm_poll_descriptors_count);\n    _PA_LOAD_FUNC(snd_pcm_poll_descriptors_revents);\n    _PA_LOAD_FUNC(snd_pcm_format_size);\n    _PA_LOAD_FUNC(snd_pcm_link);\n    _PA_LOAD_FUNC(snd_pcm_delay);\n\n    _PA_LOAD_FUNC(snd_pcm_hw_params_sizeof);\n    _PA_LOAD_FUNC(snd_pcm_hw_params_malloc);\n    _PA_LOAD_FUNC(snd_pcm_hw_params_free);\n    _PA_LOAD_FUNC(snd_pcm_hw_params_any);\n    _PA_LOAD_FUNC(snd_pcm_hw_params_set_access);\n    _PA_LOAD_FUNC(snd_pcm_hw_params_set_format);\n    _PA_LOAD_FUNC(snd_pcm_hw_params_set_channels);\n//    _PA_LOAD_FUNC(snd_pcm_hw_params_set_periods_near);\n    _PA_LOAD_FUNC(snd_pcm_hw_params_set_rate_near);\n    _PA_LOAD_FUNC(snd_pcm_hw_params_set_rate);\n    _PA_LOAD_FUNC(snd_pcm_hw_params_set_rate_resample);\n//    _PA_LOAD_FUNC(snd_pcm_hw_params_set_buffer_time_near);\n    _PA_LOAD_FUNC(snd_pcm_hw_params_set_buffer_size);\n    _PA_LOAD_FUNC(snd_pcm_hw_params_set_buffer_size_near);\n    _PA_LOAD_FUNC(snd_pcm_hw_params_set_buffer_size_min);\n//    _PA_LOAD_FUNC(snd_pcm_hw_params_set_period_time_near);\n    _PA_LOAD_FUNC(snd_pcm_hw_params_set_period_size_near);\n    _PA_LOAD_FUNC(snd_pcm_hw_params_set_periods_integer);\n    _PA_LOAD_FUNC(snd_pcm_hw_params_set_periods_min);\n\n    _PA_LOAD_FUNC(snd_pcm_hw_params_get_buffer_size);\n//    _PA_LOAD_FUNC(snd_pcm_hw_params_get_period_size);\n//    _PA_LOAD_FUNC(snd_pcm_hw_params_get_access);\n//    _PA_LOAD_FUNC(snd_pcm_hw_params_get_periods);\n//    _PA_LOAD_FUNC(snd_pcm_hw_params_get_rate);\n    _PA_LOAD_FUNC(snd_pcm_hw_params_get_channels_min);\n    _PA_LOAD_FUNC(snd_pcm_hw_params_get_channels_max);\n\n    _PA_LOAD_FUNC(snd_pcm_hw_params_test_period_size);\n    _PA_LOAD_FUNC(snd_pcm_hw_params_test_format);\n    _PA_LOAD_FUNC(snd_pcm_hw_params_test_access);\n    _PA_LOAD_FUNC(snd_pcm_hw_params_dump);\n    _PA_LOAD_FUNC(snd_pcm_hw_params);\n\n    _PA_LOAD_FUNC(snd_pcm_hw_params_get_periods_min);\n    _PA_LOAD_FUNC(snd_pcm_hw_params_get_periods_max);\n    _PA_LOAD_FUNC(snd_pcm_hw_params_set_period_size);\n    _PA_LOAD_FUNC(snd_pcm_hw_params_get_period_size_min);\n    _PA_LOAD_FUNC(snd_pcm_hw_params_get_period_size_max);\n    _PA_LOAD_FUNC(snd_pcm_hw_params_get_buffer_size_max);\n    _PA_LOAD_FUNC(snd_pcm_hw_params_get_rate_min);\n    _PA_LOAD_FUNC(snd_pcm_hw_params_get_rate_max);\n    _PA_LOAD_FUNC(snd_pcm_hw_params_get_rate_numden);\n\n    _PA_LOAD_FUNC(snd_pcm_sw_params_sizeof);\n    _PA_LOAD_FUNC(snd_pcm_sw_params_malloc);\n    _PA_LOAD_FUNC(snd_pcm_sw_params_current);\n    _PA_LOAD_FUNC(snd_pcm_sw_params_set_avail_min);\n    _PA_LOAD_FUNC(snd_pcm_sw_params);\n    _PA_LOAD_FUNC(snd_pcm_sw_params_free);\n    _PA_LOAD_FUNC(snd_pcm_sw_params_set_start_threshold);\n    _PA_LOAD_FUNC(snd_pcm_sw_params_set_stop_threshold);\n    _PA_LOAD_FUNC(snd_pcm_sw_params_get_boundary);\n    _PA_LOAD_FUNC(snd_pcm_sw_params_set_silence_threshold);\n    _PA_LOAD_FUNC(snd_pcm_sw_params_set_silence_size);\n    _PA_LOAD_FUNC(snd_pcm_sw_params_set_xfer_align);\n    _PA_LOAD_FUNC(snd_pcm_sw_params_set_tstamp_mode);\n\n    _PA_LOAD_FUNC(snd_pcm_info);\n    _PA_LOAD_FUNC(snd_pcm_info_sizeof);\n    _PA_LOAD_FUNC(snd_pcm_info_malloc);\n    _PA_LOAD_FUNC(snd_pcm_info_free);\n    _PA_LOAD_FUNC(snd_pcm_info_set_device);\n    _PA_LOAD_FUNC(snd_pcm_info_set_subdevice);\n    _PA_LOAD_FUNC(snd_pcm_info_set_stream);\n    _PA_LOAD_FUNC(snd_pcm_info_get_name);\n    _PA_LOAD_FUNC(snd_pcm_info_get_card);\n\n    _PA_LOAD_FUNC(snd_ctl_pcm_next_device);\n    _PA_LOAD_FUNC(snd_ctl_pcm_info);\n    _PA_LOAD_FUNC(snd_ctl_open);\n    _PA_LOAD_FUNC(snd_ctl_close);\n    _PA_LOAD_FUNC(snd_ctl_card_info_malloc);\n    _PA_LOAD_FUNC(snd_ctl_card_info_free);\n    _PA_LOAD_FUNC(snd_ctl_card_info);\n    _PA_LOAD_FUNC(snd_ctl_card_info_sizeof);\n    _PA_LOAD_FUNC(snd_ctl_card_info_get_name);\n\n    _PA_LOAD_FUNC(snd_config);\n    _PA_LOAD_FUNC(snd_config_update);\n    _PA_LOAD_FUNC(snd_config_search);\n    _PA_LOAD_FUNC(snd_config_iterator_entry);\n    _PA_LOAD_FUNC(snd_config_iterator_first);\n    _PA_LOAD_FUNC(snd_config_iterator_end);\n    _PA_LOAD_FUNC(snd_config_iterator_next);\n    _PA_LOAD_FUNC(snd_config_get_string);\n    _PA_LOAD_FUNC(snd_config_get_id);\n    _PA_LOAD_FUNC(snd_config_update_free_global);\n\n    _PA_LOAD_FUNC(snd_pcm_status);\n    _PA_LOAD_FUNC(snd_pcm_status_sizeof);\n    _PA_LOAD_FUNC(snd_pcm_status_get_tstamp);\n    _PA_LOAD_FUNC(snd_pcm_status_get_state);\n    _PA_LOAD_FUNC(snd_pcm_status_get_trigger_tstamp);\n    _PA_LOAD_FUNC(snd_pcm_status_get_delay);\n\n    _PA_LOAD_FUNC(snd_card_next);\n    _PA_LOAD_FUNC(snd_asoundlib_version);\n    _PA_LOAD_FUNC(snd_strerror);\n    _PA_LOAD_FUNC(snd_output_stdio_attach);\n#undef _PA_LOAD_FUNC\n\n#ifdef PA_ALSA_DYNAMIC\n    PA_DEBUG(( \"%s: loaded ALSA API - ok\\n\", __FUNCTION__ ));\n\n#define _PA_VALIDATE_LOAD_REPLACEMENT(x)\\\n    do {\\\n        if( alsa_##x == NULL )\\\n        {\\\n            alsa_##x = &_PA_LOCAL_IMPL(x);\\\n            PA_DEBUG(( \"%s: replacing [%s] with local implementation\\n\", __FUNCTION__, #x ));\\\n        }\\\n    } while (0)\n\n    _PA_VALIDATE_LOAD_REPLACEMENT(snd_pcm_hw_params_set_rate_near);\n    _PA_VALIDATE_LOAD_REPLACEMENT(snd_pcm_hw_params_set_buffer_size_near);\n    _PA_VALIDATE_LOAD_REPLACEMENT(snd_pcm_hw_params_set_period_size_near);\n    _PA_VALIDATE_LOAD_REPLACEMENT(snd_pcm_hw_params_get_channels_min);\n    _PA_VALIDATE_LOAD_REPLACEMENT(snd_pcm_hw_params_get_channels_max);\n    _PA_VALIDATE_LOAD_REPLACEMENT(snd_pcm_hw_params_get_periods_min);\n    _PA_VALIDATE_LOAD_REPLACEMENT(snd_pcm_hw_params_get_periods_max);\n    _PA_VALIDATE_LOAD_REPLACEMENT(snd_pcm_hw_params_get_period_size_min);\n    _PA_VALIDATE_LOAD_REPLACEMENT(snd_pcm_hw_params_get_period_size_max);\n    _PA_VALIDATE_LOAD_REPLACEMENT(snd_pcm_hw_params_get_buffer_size_max);\n    _PA_VALIDATE_LOAD_REPLACEMENT(snd_pcm_hw_params_get_rate_min);\n    _PA_VALIDATE_LOAD_REPLACEMENT(snd_pcm_hw_params_get_rate_max);\n\n#undef _PA_LOCAL_IMPL\n#undef _PA_VALIDATE_LOAD_REPLACEMENT\n\n#endif // PA_ALSA_DYNAMIC\n\n    return 1;\n}\n\nvoid PaAlsa_SetLibraryPathName( const char *pathName )\n{\n#ifdef PA_ALSA_DYNAMIC\n    g_AlsaLibName = pathName;\n#else\n    (void)pathName;\n#endif\n}\n\n/* Close handle to Alsa library. */\nstatic void PaAlsa_CloseLibrary()\n{\n#ifdef PA_ALSA_DYNAMIC\n    dlclose(g_AlsaLib);\n    g_AlsaLib = NULL;\n#endif\n}\n\n/* Check return value of ALSA function, and map it to PaError */\n#define ENSURE_(expr, code) \\\n    do { \\\n        int __pa_unsure_error_id;\\\n        if( UNLIKELY( (__pa_unsure_error_id = (expr)) < 0 ) ) \\\n        { \\\n            /* PaUtil_SetLastHostErrorInfo should only be used in the main thread */ \\\n            if( (code) == paUnanticipatedHostError && pthread_equal( pthread_self(), paUnixMainThread) ) \\\n            { \\\n                PaUtil_SetLastHostErrorInfo( paALSA, __pa_unsure_error_id, alsa_snd_strerror( __pa_unsure_error_id ) ); \\\n            } \\\n            PaUtil_DebugPrint( \"Expression '\" #expr \"' failed in '\" __FILE__ \"', line: \" STRINGIZE( __LINE__ ) \"\\n\" ); \\\n            if( (code) == paUnanticipatedHostError ) \\\n                PA_DEBUG(( \"Host error description: %s\\n\", alsa_snd_strerror( __pa_unsure_error_id ) )); \\\n            result = (code); \\\n            goto error; \\\n        } \\\n    } while (0)\n\n#define ASSERT_CALL_(expr, success) \\\n    do {\\\n        int __pa_assert_error_id;\\\n        __pa_assert_error_id = (expr);\\\n        assert( success == __pa_assert_error_id );\\\n    } while (0)\n\nstatic int numPeriods_ = 4;\nstatic int busyRetries_ = 100;\n\nint PaAlsa_SetNumPeriods( int numPeriods )\n{\n    numPeriods_ = numPeriods;\n    return paNoError;\n}\n\ntypedef enum\n{\n    StreamDirection_In,\n    StreamDirection_Out\n} StreamDirection;\n\ntypedef struct\n{\n    PaSampleFormat hostSampleFormat;\n    int numUserChannels, numHostChannels;\n    int userInterleaved, hostInterleaved;\n    int canMmap;\n    void *nonMmapBuffer;\n    unsigned int nonMmapBufferSize;\n    PaDeviceIndex device;     /* Keep the device index */\n    int deviceIsPlug; /* Distinguish plug types from direct 'hw:' devices */\n    int useReventFix; /* Alsa older than 1.0.16, plug devices need a fix */\n\n    snd_pcm_t *pcm;\n    snd_pcm_uframes_t framesPerPeriod, alsaBufferSize;\n    snd_pcm_format_t nativeFormat;\n    unsigned int nfds;\n    int ready;  /* Marked ready from poll */\n    void **userBuffers;\n    snd_pcm_uframes_t offset;\n    StreamDirection streamDir;\n\n    snd_pcm_channel_area_t *channelAreas;  /* Needed for channel adaption */\n} PaAlsaStreamComponent;\n\n/* Implementation specific stream structure */\ntypedef struct PaAlsaStream\n{\n    PaUtilStreamRepresentation streamRepresentation;\n    PaUtilCpuLoadMeasurer cpuLoadMeasurer;\n    PaUtilBufferProcessor bufferProcessor;\n    PaUnixThread thread;\n\n    unsigned long framesPerUserBuffer, maxFramesPerHostBuffer;\n\n    int primeBuffers;\n    int callbackMode;              /* bool: are we running in callback mode? */\n    int pcmsSynced;                /* Have we successfully synced pcms */\n    int rtSched;\n\n    /* the callback thread uses these to poll the sound device(s), waiting\n     * for data to be ready/available */\n    struct pollfd* pfds;\n    int pollTimeout;\n\n    /* Used in communication between threads */\n    volatile sig_atomic_t callback_finished; /* bool: are we in the \"callback finished\" state? */\n    volatile sig_atomic_t callbackAbort;    /* Drop frames? */\n    volatile sig_atomic_t isActive;         /* Is stream in active state? (Between StartStream and StopStream || !paContinue) */\n    PaUnixMutex stateMtx;                   /* Used to synchronize access to stream state */\n\n    int neverDropInput;\n\n    PaTime underrun;\n    PaTime overrun;\n\n    PaAlsaStreamComponent capture, playback;\n}\nPaAlsaStream;\n\n/* PaAlsaHostApiRepresentation - host api datastructure specific to this implementation */\n\ntypedef struct PaAlsaHostApiRepresentation\n{\n    PaUtilHostApiRepresentation baseHostApiRep;\n    PaUtilStreamInterface callbackStreamInterface;\n    PaUtilStreamInterface blockingStreamInterface;\n\n    PaUtilAllocationGroup *allocations;\n\n    PaHostApiIndex hostApiIndex;\n    PaUint32 alsaLibVersion; /* Retrieved from the library at run-time */\n}\nPaAlsaHostApiRepresentation;\n\ntypedef struct PaAlsaDeviceInfo\n{\n    PaDeviceInfo baseDeviceInfo;\n    char *alsaName;\n    int isPlug;\n    int minInputChannels;\n    int minOutputChannels;\n}\nPaAlsaDeviceInfo;\n\n/* prototypes for functions declared in this file */\n\nstatic void Terminate( struct PaUtilHostApiRepresentation *hostApi );\nstatic PaError IsFormatSupported( struct PaUtilHostApiRepresentation *hostApi,\n                                  const PaStreamParameters *inputParameters,\n                                  const PaStreamParameters *outputParameters,\n                                  double sampleRate );\nstatic PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,\n                           PaStream** s,\n                           const PaStreamParameters *inputParameters,\n                           const PaStreamParameters *outputParameters,\n                           double sampleRate,\n                           unsigned long framesPerBuffer,\n                           PaStreamFlags streamFlags,\n                           PaStreamCallback *callback,\n                           void *userData );\nstatic PaError CloseStream( PaStream* stream );\nstatic PaError StartStream( PaStream *stream );\nstatic PaError StopStream( PaStream *stream );\nstatic PaError AbortStream( PaStream *stream );\nstatic PaError IsStreamStopped( PaStream *s );\nstatic PaError IsStreamActive( PaStream *stream );\nstatic PaTime GetStreamTime( PaStream *stream );\nstatic double GetStreamCpuLoad( PaStream* stream );\nstatic PaError BuildDeviceList( PaAlsaHostApiRepresentation *hostApi );\nstatic int SetApproximateSampleRate( snd_pcm_t *pcm, snd_pcm_hw_params_t *hwParams, double sampleRate );\nstatic int GetExactSampleRate( snd_pcm_hw_params_t *hwParams, double *sampleRate );\nstatic PaUint32 PaAlsaVersionNum(void);\n\n/* Callback prototypes */\nstatic void *CallbackThreadFunc( void *userData );\n\n/* Blocking prototypes */\nstatic signed long GetStreamReadAvailable( PaStream* s );\nstatic signed long GetStreamWriteAvailable( PaStream* s );\nstatic PaError ReadStream( PaStream* stream, void *buffer, unsigned long frames );\nstatic PaError WriteStream( PaStream* stream, const void *buffer, unsigned long frames );\n\n\nstatic const PaAlsaDeviceInfo *GetDeviceInfo( const PaUtilHostApiRepresentation *hostApi, int device )\n{\n    return (const PaAlsaDeviceInfo *)hostApi->deviceInfos[device];\n}\n\n/** Uncommented because AlsaErrorHandler is unused for anything good yet. If AlsaErrorHandler is\n    to be used, do not forget to register this callback in PaAlsa_Initialize, and unregister in Terminate.\n*/\n/*static void AlsaErrorHandler(const char *file, int line, const char *function, int err, const char *fmt, ...)\n{\n}*/\n\nPaError PaAlsa_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex hostApiIndex )\n{\n    PaError result = paNoError;\n    PaAlsaHostApiRepresentation *alsaHostApi = NULL;\n\n    /* Try loading Alsa library. */\n    if (!PaAlsa_LoadLibrary())\n        return paHostApiNotFound;\n\n    PA_UNLESS( alsaHostApi = (PaAlsaHostApiRepresentation*) PaUtil_AllocateMemory(\n                sizeof(PaAlsaHostApiRepresentation) ), paInsufficientMemory );\n    PA_UNLESS( alsaHostApi->allocations = PaUtil_CreateAllocationGroup(), paInsufficientMemory );\n    alsaHostApi->hostApiIndex = hostApiIndex;\n    alsaHostApi->alsaLibVersion = PaAlsaVersionNum();\n\n    *hostApi = (PaUtilHostApiRepresentation*)alsaHostApi;\n    (*hostApi)->info.structVersion = 1;\n    (*hostApi)->info.type = paALSA;\n    (*hostApi)->info.name = \"ALSA\";\n\n    (*hostApi)->Terminate = Terminate;\n    (*hostApi)->OpenStream = OpenStream;\n    (*hostApi)->IsFormatSupported = IsFormatSupported;\n\n    /** If AlsaErrorHandler is to be used, do not forget to unregister callback pointer in\n        Terminate function.\n    */\n    /*ENSURE_( snd_lib_error_set_handler(AlsaErrorHandler), paUnanticipatedHostError );*/\n\n    PA_ENSURE( BuildDeviceList( alsaHostApi ) );\n\n    PaUtil_InitializeStreamInterface( &alsaHostApi->callbackStreamInterface,\n                                      CloseStream, StartStream,\n                                      StopStream, AbortStream,\n                                      IsStreamStopped, IsStreamActive,\n                                      GetStreamTime, GetStreamCpuLoad,\n                                      PaUtil_DummyRead, PaUtil_DummyWrite,\n                                      PaUtil_DummyGetReadAvailable,\n                                      PaUtil_DummyGetWriteAvailable );\n\n    PaUtil_InitializeStreamInterface( &alsaHostApi->blockingStreamInterface,\n                                      CloseStream, StartStream,\n                                      StopStream, AbortStream,\n                                      IsStreamStopped, IsStreamActive,\n                                      GetStreamTime, PaUtil_DummyGetCpuLoad,\n                                      ReadStream, WriteStream,\n                                      GetStreamReadAvailable,\n                                      GetStreamWriteAvailable );\n\n    PA_ENSURE( PaUnixThreading_Initialize() );\n\n    return result;\n\nerror:\n    if( alsaHostApi )\n    {\n        if( alsaHostApi->allocations )\n        {\n            PaUtil_FreeAllAllocations( alsaHostApi->allocations );\n            PaUtil_DestroyAllocationGroup( alsaHostApi->allocations );\n        }\n\n        PaUtil_FreeMemory( alsaHostApi );\n    }\n\n    return result;\n}\n\nstatic void Terminate( struct PaUtilHostApiRepresentation *hostApi )\n{\n    PaAlsaHostApiRepresentation *alsaHostApi = (PaAlsaHostApiRepresentation*)hostApi;\n\n    assert( hostApi );\n\n    /** See AlsaErrorHandler and PaAlsa_Initialize for details.\n    */\n    /*snd_lib_error_set_handler(NULL);*/\n\n    if( alsaHostApi->allocations )\n    {\n        PaUtil_FreeAllAllocations( alsaHostApi->allocations );\n        PaUtil_DestroyAllocationGroup( alsaHostApi->allocations );\n    }\n\n    PaUtil_FreeMemory( alsaHostApi );\n    alsa_snd_config_update_free_global();\n\n    /* Close Alsa library. */\n    PaAlsa_CloseLibrary();\n}\n\n/** Determine max channels and default latencies.\n *\n * This function provides functionality to grope an opened (might be opened for capture or playback) pcm device for\n * traits like max channels, suitable default latencies and default sample rate. Upon error, max channels is set to zero,\n * and a suitable result returned. The device is closed before returning.\n */\nstatic PaError GropeDevice( snd_pcm_t* pcm, int isPlug, StreamDirection mode, int openBlocking,\n        PaAlsaDeviceInfo* devInfo )\n{\n    PaError result = paNoError;\n    snd_pcm_hw_params_t *hwParams;\n    snd_pcm_uframes_t alsaBufferFrames, alsaPeriodFrames;\n    unsigned int minChans, maxChans;\n    int* minChannels, * maxChannels;\n    double * defaultLowLatency, * defaultHighLatency, * defaultSampleRate =\n        &devInfo->baseDeviceInfo.defaultSampleRate;\n    double defaultSr = *defaultSampleRate;\n\n    assert( pcm );\n\n    PA_DEBUG(( \"%s: collecting info ..\\n\", __FUNCTION__ ));\n\n    if( StreamDirection_In == mode )\n    {\n        minChannels = &devInfo->minInputChannels;\n        maxChannels = &devInfo->baseDeviceInfo.maxInputChannels;\n        defaultLowLatency = &devInfo->baseDeviceInfo.defaultLowInputLatency;\n        defaultHighLatency = &devInfo->baseDeviceInfo.defaultHighInputLatency;\n    }\n    else\n    {\n        minChannels = &devInfo->minOutputChannels;\n        maxChannels = &devInfo->baseDeviceInfo.maxOutputChannels;\n        defaultLowLatency = &devInfo->baseDeviceInfo.defaultLowOutputLatency;\n        defaultHighLatency = &devInfo->baseDeviceInfo.defaultHighOutputLatency;\n    }\n\n    ENSURE_( alsa_snd_pcm_nonblock( pcm, 0 ), paUnanticipatedHostError );\n\n    alsa_snd_pcm_hw_params_alloca( &hwParams );\n    alsa_snd_pcm_hw_params_any( pcm, hwParams );\n\n    if( defaultSr >= 0 )\n    {\n        /* Could be that the device opened in one mode supports samplerates that the other mode wont have,\n         * so try again .. */\n        if( SetApproximateSampleRate( pcm, hwParams, defaultSr ) < 0 )\n        {\n            defaultSr = -1.;\n            alsa_snd_pcm_hw_params_any( pcm, hwParams ); /* Clear any params (rate) that might have been set */\n            PA_DEBUG(( \"%s: Original default samplerate failed, trying again ..\\n\", __FUNCTION__ ));\n        }\n    }\n\n    if( defaultSr < 0. )           /* Default sample rate not set */\n    {\n        unsigned int sampleRate = 44100;        /* Will contain approximate rate returned by alsa-lib */\n\n        /* Don't allow rate resampling when probing for the default rate (but ignore if this call fails) */\n        alsa_snd_pcm_hw_params_set_rate_resample( pcm, hwParams, 0 );\n        if( alsa_snd_pcm_hw_params_set_rate_near( pcm, hwParams, &sampleRate, NULL ) < 0 )\n        {\n            result = paUnanticipatedHostError;\n            goto error;\n        }\n        ENSURE_( GetExactSampleRate( hwParams, &defaultSr ), paUnanticipatedHostError );\n    }\n\n    ENSURE_( alsa_snd_pcm_hw_params_get_channels_min( hwParams, &minChans ), paUnanticipatedHostError );\n    ENSURE_( alsa_snd_pcm_hw_params_get_channels_max( hwParams, &maxChans ), paUnanticipatedHostError );\n    assert( maxChans <= INT_MAX );\n    assert( maxChans > 0 );    /* Weird linking issue could cause wrong version of ALSA symbols to be called,\n                                   resulting in zeroed values */\n\n    /* XXX: Limit to sensible number (ALSA plugins accept a crazy amount of channels)? */\n    if( isPlug && maxChans > 128 )\n    {\n        maxChans = 128;\n        PA_DEBUG(( \"%s: Limiting number of plugin channels to %u\\n\", __FUNCTION__, maxChans ));\n    }\n\n    /* TWEAKME:\n     * Giving values for default min and max latency is not straightforward.\n     *  * for low latency, we want to give the lowest value that will work reliably.\n     *      This varies based on the sound card, kernel, CPU, etc.  Better to give\n     *      sub-optimal latency than to give a number too low and cause dropouts.\n     *  * for high latency we want to give a large enough value that dropouts are basically impossible.\n     *      This doesn't really require as much tweaking, since providing too large a number will\n     *      just cause us to select the nearest setting that will work at stream config time.\n     */\n    /* Try low latency values, (sometimes the buffer & period that result are larger) */\n    alsaBufferFrames = 512;\n    alsaPeriodFrames = 128;\n    ENSURE_( alsa_snd_pcm_hw_params_set_buffer_size_near( pcm, hwParams, &alsaBufferFrames ), paUnanticipatedHostError );\n    ENSURE_( alsa_snd_pcm_hw_params_set_period_size_near( pcm, hwParams, &alsaPeriodFrames, NULL ), paUnanticipatedHostError );\n    *defaultLowLatency = (double) (alsaBufferFrames - alsaPeriodFrames) / defaultSr;\n\n    /* Base the high latency case on values four times larger */\n    alsaBufferFrames = 2048;\n    alsaPeriodFrames = 512;\n    /* Have to reset hwParams, to set new buffer size; need to also set sample rate again */\n    ENSURE_( alsa_snd_pcm_hw_params_any( pcm, hwParams ), paUnanticipatedHostError );\n    ENSURE_( SetApproximateSampleRate( pcm, hwParams, defaultSr ), paUnanticipatedHostError );\n    ENSURE_( alsa_snd_pcm_hw_params_set_buffer_size_near( pcm, hwParams, &alsaBufferFrames ), paUnanticipatedHostError );\n    ENSURE_( alsa_snd_pcm_hw_params_set_period_size_near( pcm, hwParams, &alsaPeriodFrames, NULL ), paUnanticipatedHostError );\n    *defaultHighLatency = (double) (alsaBufferFrames - alsaPeriodFrames) / defaultSr;\n\n    *minChannels = (int)minChans;\n    *maxChannels = (int)maxChans;\n    *defaultSampleRate = defaultSr;\n\nend:\n    alsa_snd_pcm_close( pcm );\n    return result;\n\nerror:\n    goto end;\n}\n\n/* Initialize device info with invalid values (maxInputChannels and maxOutputChannels are set to zero since these indicate\n * whether input/output is available) */\nstatic void InitializeDeviceInfo( PaDeviceInfo *deviceInfo )\n{\n    deviceInfo->structVersion = -1;\n    deviceInfo->name = NULL;\n    deviceInfo->hostApi = -1;\n    deviceInfo->maxInputChannels = 0;\n    deviceInfo->maxOutputChannels = 0;\n    deviceInfo->defaultLowInputLatency = -1.;\n    deviceInfo->defaultLowOutputLatency = -1.;\n    deviceInfo->defaultHighInputLatency = -1.;\n    deviceInfo->defaultHighOutputLatency = -1.;\n    deviceInfo->defaultSampleRate = -1.;\n}\n\n\n/* Retrieve the version of the runtime Alsa-lib, as a single number equivalent to\n * SND_LIB_VERSION.  Only a version string is available (\"a.b.c\") so this has to be converted.\n * Assume 'a' and 'b' are single digits only.\n */\nstatic PaUint32 PaAlsaVersionNum(void)\n{\n    char* verStr;\n    PaUint32 verNum;\n\n    verStr = (char*) alsa_snd_asoundlib_version();\n    verNum = ALSA_VERSION_INT( atoi(verStr), atoi(verStr + 2), atoi(verStr + 4) );\n    PA_DEBUG(( \"ALSA version (build): \" SND_LIB_VERSION_STR \"\\nALSA version (runtime): %s\\n\", verStr ));\n\n    return verNum;\n}\n\n\n/* Helper struct */\ntypedef struct\n{\n    char *alsaName;\n    char *name;\n    int isPlug;\n    int hasPlayback;\n    int hasCapture;\n} HwDevInfo;\n\n\nHwDevInfo predefinedNames[] = {\n    { \"center_lfe\", NULL, 0, 1, 0 },\n/* { \"default\", NULL, 0, 1, 1 }, */\n    { \"dmix\", NULL, 0, 1, 0 },\n/* { \"dpl\", NULL, 0, 1, 0 }, */\n/* { \"dsnoop\", NULL, 0, 0, 1 }, */\n    { \"front\", NULL, 0, 1, 0 },\n    { \"iec958\", NULL, 0, 1, 0 },\n/* { \"modem\", NULL, 0, 1, 0 }, */\n    { \"rear\", NULL, 0, 1, 0 },\n    { \"side\", NULL, 0, 1, 0 },\n/*     { \"spdif\", NULL, 0, 0, 0 }, */\n    { \"surround40\", NULL, 0, 1, 0 },\n    { \"surround41\", NULL, 0, 1, 0 },\n    { \"surround50\", NULL, 0, 1, 0 },\n    { \"surround51\", NULL, 0, 1, 0 },\n    { \"surround71\", NULL, 0, 1, 0 },\n\n    { \"AndroidPlayback_Earpiece_normal\",         NULL, 0, 1, 0 },\n    { \"AndroidPlayback_Speaker_normal\",          NULL, 0, 1, 0 },\n    { \"AndroidPlayback_Bluetooth_normal\",        NULL, 0, 1, 0 },\n    { \"AndroidPlayback_Headset_normal\",          NULL, 0, 1, 0 },\n    { \"AndroidPlayback_Speaker_Headset_normal\",  NULL, 0, 1, 0 },\n    { \"AndroidPlayback_Bluetooth-A2DP_normal\",   NULL, 0, 1, 0 },\n    { \"AndroidPlayback_ExtraDockSpeaker_normal\", NULL, 0, 1, 0 },\n    { \"AndroidPlayback_TvOut_normal\",            NULL, 0, 1, 0 },\n\n    { \"AndroidRecord_Microphone\",                NULL, 0, 0, 1 },\n    { \"AndroidRecord_Earpiece_normal\",           NULL, 0, 0, 1 },\n    { \"AndroidRecord_Speaker_normal\",            NULL, 0, 0, 1 },\n    { \"AndroidRecord_Headset_normal\",            NULL, 0, 0, 1 },\n    { \"AndroidRecord_Bluetooth_normal\",          NULL, 0, 0, 1 },\n    { \"AndroidRecord_Speaker_Headset_normal\",    NULL, 0, 0, 1 },\n\n    { NULL, NULL, 0, 1, 0 }\n};\n\nstatic const HwDevInfo *FindDeviceName( const char *name )\n{\n    int i;\n\n    for( i = 0; predefinedNames[i].alsaName; i++ )\n    {\n        if( strcmp( name, predefinedNames[i].alsaName ) == 0 )\n        {\n            return &predefinedNames[i];\n        }\n    }\n\n    return NULL;\n}\n\nstatic PaError PaAlsa_StrDup( PaAlsaHostApiRepresentation *alsaApi,\n        char **dst,\n        const char *src)\n{\n    PaError result = paNoError;\n    int len = strlen( src ) + 1;\n\n    /* PA_DEBUG((\"PaStrDup %s %d\\n\", src, len)); */\n\n    PA_UNLESS( *dst = (char *)PaUtil_GroupAllocateMemory( alsaApi->allocations, len ),\n            paInsufficientMemory );\n    strncpy( *dst, src, len );\n\nerror:\n    return result;\n}\n\n/* Disregard some standard plugins\n */\nstatic int IgnorePlugin( const char *pluginId )\n{\n    static const char *ignoredPlugins[] = {\"hw\", \"plughw\", \"plug\", \"dsnoop\", \"tee\",\n        \"file\", \"null\", \"shm\", \"cards\", \"rate_convert\", NULL};\n    int i = 0;\n\n    if( getenv( \"PA_ALSA_IGNORE_ALL_PLUGINS\" ) && atoi( getenv( \"PA_ALSA_IGNORE_ALL_PLUGINS\") ) )\n        return 1;\n\n    while( ignoredPlugins[i] )\n    {\n        if( !strcmp( pluginId, ignoredPlugins[i] ) )\n        {\n            return 1;\n        }\n        ++i;\n    }\n\n    return 0;\n}\n\n/* Skip past parts at the beginning of a (pcm) info name that are already in the card name, to avoid duplication */\nstatic char *SkipCardDetailsInName( char *infoSkipName, char *cardRefName )\n{\n    char *lastSpacePosn = infoSkipName;\n\n    /* Skip matching chars; but only in chunks separated by ' ' (not part words etc), so track lastSpacePosn */\n    while( *cardRefName )\n    {\n        while( *infoSkipName && *cardRefName && *infoSkipName == *cardRefName)\n        {\n            infoSkipName++;\n            cardRefName++;\n            if( *infoSkipName == ' ' || *infoSkipName == '\\0' )\n                lastSpacePosn = infoSkipName;\n        }\n        infoSkipName = lastSpacePosn;\n        /* Look for another chunk; post-increment means ends pointing to next char */\n        while( *cardRefName && ( *cardRefName++ != ' ' ));\n    }\n    if( *infoSkipName == '\\0' )\n        return \"-\"; /* The 2 names were identical; instead of a nul-string, return a marker string */\n\n    /* Now want to move to the first char after any spaces */\n    while( *lastSpacePosn && *lastSpacePosn == ' ' )\n        lastSpacePosn++;\n    /* Skip a single separator char if present in the remaining pcm name; (pa will add its own) */\n    if(( *lastSpacePosn == '-' || *lastSpacePosn == ':' ) && *(lastSpacePosn + 1) == ' ' )\n        lastSpacePosn += 2;\n\n    return lastSpacePosn;\n}\n\n/** Open PCM device.\n *\n * Wrapper around alsa_snd_pcm_open which may repeatedly retry opening a device if it is busy, for\n * a certain time. This is because dmix may temporarily hold on to a device after it (dmix)\n * has been opened and closed.\n * @param mode: Open mode (e.g., SND_PCM_BLOCKING).\n * @param waitOnBusy: Retry opening busy device for up to one second?\n **/\nstatic int OpenPcm( snd_pcm_t **pcmp, const char *name, snd_pcm_stream_t stream, int mode, int waitOnBusy )\n{\n    int ret, tries = 0, maxTries = waitOnBusy ? busyRetries_ : 0;\n\n    ret = alsa_snd_pcm_open( pcmp, name, stream, mode );\n\n    for( tries = 0; tries < maxTries && -EBUSY == ret; ++tries )\n    {\n        Pa_Sleep( 10 );\n        ret = alsa_snd_pcm_open( pcmp, name, stream, mode );\n        if( -EBUSY != ret )\n        {\n            PA_DEBUG(( \"%s: Successfully opened initially busy device after %d tries\\n\", __FUNCTION__, tries ));\n        }\n    }\n    if( -EBUSY == ret )\n    {\n        PA_DEBUG(( \"%s: Failed to open busy device '%s'\\n\", __FUNCTION__, name ));\n    }\n    else\n    {\n        if( ret < 0 )\n            PA_DEBUG(( \"%s: Opened device '%s' ptr[%p] - result: [%d:%s]\\n\", __FUNCTION__, name, *pcmp, ret, alsa_snd_strerror(ret) ));\n    }\n\n    return ret;\n}\n\nstatic PaError FillInDevInfo( PaAlsaHostApiRepresentation *alsaApi, HwDevInfo* deviceHwInfo, int blocking,\n        PaAlsaDeviceInfo* devInfo, int* devIdx )\n{\n    PaError result = 0;\n    PaDeviceInfo *baseDeviceInfo = &devInfo->baseDeviceInfo;\n    snd_pcm_t *pcm = NULL;\n    PaUtilHostApiRepresentation *baseApi = &alsaApi->baseHostApiRep;\n\n    PA_DEBUG(( \"%s: Filling device info for: %s\\n\", __FUNCTION__, deviceHwInfo->name ));\n\n    /* Zero fields */\n    InitializeDeviceInfo( baseDeviceInfo );\n\n    /* To determine device capabilities, we must open the device and query the\n     * hardware parameter configuration space */\n\n    /* Query capture */\n    if( deviceHwInfo->hasCapture &&\n        OpenPcm( &pcm, deviceHwInfo->alsaName, SND_PCM_STREAM_CAPTURE, blocking, 0 ) >= 0 )\n    {\n        if( GropeDevice( pcm, deviceHwInfo->isPlug, StreamDirection_In, blocking, devInfo ) != paNoError )\n        {\n            /* Error */\n            PA_DEBUG(( \"%s: Failed groping %s for capture\\n\", __FUNCTION__, deviceHwInfo->alsaName ));\n            goto end;\n        }\n    }\n\n    /* Query playback */\n    if( deviceHwInfo->hasPlayback &&\n        OpenPcm( &pcm, deviceHwInfo->alsaName, SND_PCM_STREAM_PLAYBACK, blocking, 0 ) >= 0 )\n    {\n        if( GropeDevice( pcm, deviceHwInfo->isPlug, StreamDirection_Out, blocking, devInfo ) != paNoError )\n        {\n            /* Error */\n            PA_DEBUG(( \"%s: Failed groping %s for playback\\n\", __FUNCTION__, deviceHwInfo->alsaName ));\n            goto end;\n        }\n    }\n\n    baseDeviceInfo->structVersion = 2;\n    baseDeviceInfo->hostApi = alsaApi->hostApiIndex;\n    baseDeviceInfo->name = deviceHwInfo->name;\n    devInfo->alsaName = deviceHwInfo->alsaName;\n    devInfo->isPlug = deviceHwInfo->isPlug;\n\n    /* A: Storing pointer to PaAlsaDeviceInfo object as pointer to PaDeviceInfo object.\n     * Should now be safe to add device info, unless the device supports neither capture nor playback\n     */\n    if( baseDeviceInfo->maxInputChannels > 0 || baseDeviceInfo->maxOutputChannels > 0 )\n    {\n        /* Make device default if there isn't already one or it is the ALSA \"default\" device */\n        if( ( baseApi->info.defaultInputDevice == paNoDevice ||\n            !strcmp( deviceHwInfo->alsaName, \"default\" ) ) && baseDeviceInfo->maxInputChannels > 0 )\n        {\n            baseApi->info.defaultInputDevice = *devIdx;\n            PA_DEBUG(( \"Default input device: %s\\n\", deviceHwInfo->name ));\n        }\n        if( ( baseApi->info.defaultOutputDevice == paNoDevice ||\n            !strcmp( deviceHwInfo->alsaName, \"default\" ) ) && baseDeviceInfo->maxOutputChannels > 0 )\n        {\n            baseApi->info.defaultOutputDevice = *devIdx;\n            PA_DEBUG(( \"Default output device: %s\\n\", deviceHwInfo->name ));\n        }\n        PA_DEBUG(( \"%s: Adding device %s: %d\\n\", __FUNCTION__, deviceHwInfo->name, *devIdx ));\n        baseApi->deviceInfos[*devIdx] = (PaDeviceInfo *) devInfo;\n        (*devIdx) += 1;\n    }\n    else\n    {\n        PA_DEBUG(( \"%s: Skipped device: %s, all channels == 0\\n\", __FUNCTION__, deviceHwInfo->name ));\n    }\n\nend:\n    return result;\n}\n\n/* Build PaDeviceInfo list, ignore devices for which we cannot determine capabilities (possibly busy, sigh) */\nstatic PaError BuildDeviceList( PaAlsaHostApiRepresentation *alsaApi )\n{\n    PaUtilHostApiRepresentation *baseApi = &alsaApi->baseHostApiRep;\n    PaAlsaDeviceInfo *deviceInfoArray;\n    int cardIdx = -1, devIdx = 0;\n    snd_ctl_card_info_t *cardInfo;\n    PaError result = paNoError;\n    size_t numDeviceNames = 0, maxDeviceNames = 1, i;\n    HwDevInfo *hwDevInfos = NULL;\n    snd_config_t *topNode = NULL;\n    snd_pcm_info_t *pcmInfo;\n    int res;\n    int blocking = SND_PCM_NONBLOCK;\n    int usePlughw = 0;\n    char *hwPrefix = \"\";\n    char alsaCardName[50];\n#ifdef PA_ENABLE_DEBUG_OUTPUT\n    PaTime startTime = PaUtil_GetTime();\n#endif\n\n    if( getenv( \"PA_ALSA_INITIALIZE_BLOCK\" ) && atoi( getenv( \"PA_ALSA_INITIALIZE_BLOCK\" ) ) )\n        blocking = 0;\n\n    /* If PA_ALSA_PLUGHW is 1 (non-zero), use the plughw: pcm throughout instead of hw: */\n    if( getenv( \"PA_ALSA_PLUGHW\" ) && atoi( getenv( \"PA_ALSA_PLUGHW\" ) ) )\n    {\n        usePlughw = 1;\n        hwPrefix = \"plug\";\n        PA_DEBUG(( \"%s: Using Plughw\\n\", __FUNCTION__ ));\n    }\n\n    /* These two will be set to the first working input and output device, respectively */\n    baseApi->info.defaultInputDevice = paNoDevice;\n    baseApi->info.defaultOutputDevice = paNoDevice;\n\n    /* Gather info about hw devices\n\n     * alsa_snd_card_next() modifies the integer passed to it to be:\n     *      the index of the first card if the parameter is -1\n     *      the index of the next card if the parameter is the index of a card\n     *      -1 if there are no more cards\n     *\n     * The function itself returns 0 if it succeeded. */\n    cardIdx = -1;\n    alsa_snd_ctl_card_info_alloca( &cardInfo );\n    alsa_snd_pcm_info_alloca( &pcmInfo );\n    while( alsa_snd_card_next( &cardIdx ) == 0 && cardIdx >= 0 )\n    {\n        char *cardName;\n        int devIdx = -1;\n        snd_ctl_t *ctl;\n        char buf[50];\n\n        snprintf( alsaCardName, sizeof (alsaCardName), \"hw:%d\", cardIdx );\n\n        /* Acquire name of card */\n        if( alsa_snd_ctl_open( &ctl, alsaCardName, 0 ) < 0 )\n        {\n            /* Unable to open card :( */\n            PA_DEBUG(( \"%s: Unable to open device %s\\n\", __FUNCTION__, alsaCardName ));\n            continue;\n        }\n        alsa_snd_ctl_card_info( ctl, cardInfo );\n\n        PA_ENSURE( PaAlsa_StrDup( alsaApi, &cardName, alsa_snd_ctl_card_info_get_name( cardInfo )) );\n\n        while( alsa_snd_ctl_pcm_next_device( ctl, &devIdx ) == 0 && devIdx >= 0 )\n        {\n            char *alsaDeviceName, *deviceName, *infoName;\n            size_t len;\n            int hasPlayback = 0, hasCapture = 0;\n\n            snprintf( buf, sizeof (buf), \"%s%s,%d\", hwPrefix, alsaCardName, devIdx );\n\n            /* Obtain info about this particular device */\n            alsa_snd_pcm_info_set_device( pcmInfo, devIdx );\n            alsa_snd_pcm_info_set_subdevice( pcmInfo, 0 );\n            alsa_snd_pcm_info_set_stream( pcmInfo, SND_PCM_STREAM_CAPTURE );\n            if( alsa_snd_ctl_pcm_info( ctl, pcmInfo ) >= 0 )\n            {\n                hasCapture = 1;\n            }\n\n            alsa_snd_pcm_info_set_stream( pcmInfo, SND_PCM_STREAM_PLAYBACK );\n            if( alsa_snd_ctl_pcm_info( ctl, pcmInfo ) >= 0 )\n            {\n                hasPlayback = 1;\n            }\n\n            if( !hasPlayback && !hasCapture )\n            {\n                /* Error */\n                continue;\n            }\n\n            infoName = SkipCardDetailsInName( (char *)alsa_snd_pcm_info_get_name( pcmInfo ), cardName );\n\n            /* The length of the string written by snprintf plus terminating 0 */\n            len = snprintf( NULL, 0, \"%s: %s (%s)\", cardName, infoName, buf ) + 1;\n            PA_UNLESS( deviceName = (char *)PaUtil_GroupAllocateMemory( alsaApi->allocations, len ),\n                    paInsufficientMemory );\n            snprintf( deviceName, len, \"%s: %s (%s)\", cardName, infoName, buf );\n\n            PA_DEBUG(( \"%s: Found device [%d]: %s\\n\", __FUNCTION__, numDeviceNames, deviceName ));\n\n            ++numDeviceNames;\n            if( !hwDevInfos || numDeviceNames > maxDeviceNames )\n            {\n                maxDeviceNames *= 2;\n                PA_UNLESS( hwDevInfos = (HwDevInfo *) realloc( hwDevInfos, maxDeviceNames * sizeof (HwDevInfo) ),\n                        paInsufficientMemory );\n            }\n\n            PA_ENSURE( PaAlsa_StrDup( alsaApi, &alsaDeviceName, buf ) );\n\n            hwDevInfos[ numDeviceNames - 1 ].alsaName = alsaDeviceName;\n            hwDevInfos[ numDeviceNames - 1 ].name = deviceName;\n            hwDevInfos[ numDeviceNames - 1 ].isPlug = usePlughw;\n            hwDevInfos[ numDeviceNames - 1 ].hasPlayback = hasPlayback;\n            hwDevInfos[ numDeviceNames - 1 ].hasCapture = hasCapture;\n        }\n        alsa_snd_ctl_close( ctl );\n    }\n\n    /* Iterate over plugin devices */\n    if( NULL == (*alsa_snd_config) )\n    {\n        /* alsa_snd_config_update is called implicitly by some functions, if this hasn't happened snd_config will be NULL (bleh) */\n        ENSURE_( alsa_snd_config_update(), paUnanticipatedHostError );\n        PA_DEBUG(( \"Updating snd_config\\n\" ));\n    }\n    assert( *alsa_snd_config );\n    if( ( res = alsa_snd_config_search( *alsa_snd_config, \"pcm\", &topNode ) ) >= 0 )\n    {\n        snd_config_iterator_t i, next;\n\n        alsa_snd_config_for_each( i, next, topNode )\n        {\n            const char *tpStr = \"unknown\", *idStr = NULL;\n            int err = 0;\n\n            char *alsaDeviceName, *deviceName;\n            const HwDevInfo *predefined = NULL;\n            snd_config_t *n = alsa_snd_config_iterator_entry( i ), * tp = NULL;;\n\n            if( (err = alsa_snd_config_search( n, \"type\", &tp )) < 0 )\n            {\n                if( -ENOENT != err )\n                {\n                    ENSURE_(err, paUnanticipatedHostError);\n                }\n            }\n            else\n            {\n                ENSURE_( alsa_snd_config_get_string( tp, &tpStr ), paUnanticipatedHostError );\n            }\n            ENSURE_( alsa_snd_config_get_id( n, &idStr ), paUnanticipatedHostError );\n            if( IgnorePlugin( idStr ) )\n            {\n                PA_DEBUG(( \"%s: Ignoring ALSA plugin device [%s] of type [%s]\\n\", __FUNCTION__, idStr, tpStr ));\n                continue;\n            }\n            PA_DEBUG(( \"%s: Found plugin [%s] of type [%s]\\n\", __FUNCTION__, idStr, tpStr ));\n\n            PA_UNLESS( alsaDeviceName = (char*)PaUtil_GroupAllocateMemory( alsaApi->allocations,\n                                                            strlen(idStr) + 6 ), paInsufficientMemory );\n            strcpy( alsaDeviceName, idStr );\n            PA_UNLESS( deviceName = (char*)PaUtil_GroupAllocateMemory( alsaApi->allocations,\n                                                            strlen(idStr) + 1 ), paInsufficientMemory );\n            strcpy( deviceName, idStr );\n\n            ++numDeviceNames;\n            if( !hwDevInfos || numDeviceNames > maxDeviceNames )\n            {\n                maxDeviceNames *= 2;\n                PA_UNLESS( hwDevInfos = (HwDevInfo *) realloc( hwDevInfos, maxDeviceNames * sizeof (HwDevInfo) ),\n                        paInsufficientMemory );\n            }\n\n            predefined = FindDeviceName( alsaDeviceName );\n\n            hwDevInfos[numDeviceNames - 1].alsaName = alsaDeviceName;\n            hwDevInfos[numDeviceNames - 1].name     = deviceName;\n            hwDevInfos[numDeviceNames - 1].isPlug   = 1;\n\n            if( predefined )\n            {\n                hwDevInfos[numDeviceNames - 1].hasPlayback = predefined->hasPlayback;\n                hwDevInfos[numDeviceNames - 1].hasCapture  = predefined->hasCapture;\n            }\n            else\n            {\n                hwDevInfos[numDeviceNames - 1].hasPlayback = 1;\n                hwDevInfos[numDeviceNames - 1].hasCapture  = 1;\n            }\n        }\n    }\n    else\n        PA_DEBUG(( \"%s: Iterating over ALSA plugins failed: %s\\n\", __FUNCTION__, alsa_snd_strerror( res ) ));\n\n    /* allocate deviceInfo memory based on the number of devices */\n    PA_UNLESS( baseApi->deviceInfos = (PaDeviceInfo**)PaUtil_GroupAllocateMemory(\n            alsaApi->allocations, sizeof(PaDeviceInfo*) * (numDeviceNames) ), paInsufficientMemory );\n\n    /* allocate all device info structs in a contiguous block */\n    PA_UNLESS( deviceInfoArray = (PaAlsaDeviceInfo*)PaUtil_GroupAllocateMemory(\n            alsaApi->allocations, sizeof(PaAlsaDeviceInfo) * numDeviceNames ), paInsufficientMemory );\n\n    /* Loop over list of cards, filling in info. If a device is deemed unavailable (can't get name),\n     * it's ignored.\n     *\n     * Note that we do this in two stages. This is a workaround owing to the fact that the 'dmix'\n     * plugin may cause the underlying hardware device to be busy for a short while even after it\n     * (dmix) is closed. The 'default' plugin may also point to the dmix plugin, so the same goes\n     * for this.\n     */\n    PA_DEBUG(( \"%s: Filling device info for %d devices\\n\", __FUNCTION__, numDeviceNames ));\n    for( i = 0, devIdx = 0; i < numDeviceNames; ++i )\n    {\n        PaAlsaDeviceInfo* devInfo = &deviceInfoArray[i];\n        HwDevInfo* hwInfo = &hwDevInfos[i];\n        if( !strcmp( hwInfo->name, \"dmix\" ) || !strcmp( hwInfo->name, \"default\" ) )\n        {\n            continue;\n        }\n\n        PA_ENSURE( FillInDevInfo( alsaApi, hwInfo, blocking, devInfo, &devIdx ) );\n    }\n    assert( devIdx <= numDeviceNames );\n    /* Now inspect 'dmix' and 'default' plugins */\n    for( i = 0; i < numDeviceNames; ++i )\n    {\n        PaAlsaDeviceInfo* devInfo = &deviceInfoArray[i];\n        HwDevInfo* hwInfo = &hwDevInfos[i];\n        if( strcmp( hwInfo->name, \"dmix\" ) && strcmp( hwInfo->name, \"default\" ) )\n        {\n            continue;\n        }\n\n        PA_ENSURE( FillInDevInfo( alsaApi, hwInfo, blocking, devInfo, &devIdx ) );\n    }\n    free( hwDevInfos );\n\n    baseApi->info.deviceCount = devIdx;   /* Number of successfully queried devices */\n\n#ifdef PA_ENABLE_DEBUG_OUTPUT\n    PA_DEBUG(( \"%s: Building device list took %f seconds\\n\", __FUNCTION__, PaUtil_GetTime() - startTime ));\n#endif\n\nend:\n    return result;\n\nerror:\n    /* No particular action */\n    goto end;\n}\n\n/* Check against known device capabilities */\nstatic PaError ValidateParameters( const PaStreamParameters *parameters, PaUtilHostApiRepresentation *hostApi, StreamDirection mode )\n{\n    PaError result = paNoError;\n    int maxChans;\n    const PaAlsaDeviceInfo *deviceInfo = NULL;\n    assert( parameters );\n\n    if( parameters->device != paUseHostApiSpecificDeviceSpecification )\n    {\n        assert( parameters->device < hostApi->info.deviceCount );\n        PA_UNLESS( parameters->hostApiSpecificStreamInfo == NULL, paBadIODeviceCombination );\n        deviceInfo = GetDeviceInfo( hostApi, parameters->device );\n    }\n    else\n    {\n        const PaAlsaStreamInfo *streamInfo = parameters->hostApiSpecificStreamInfo;\n\n        PA_UNLESS( parameters->device == paUseHostApiSpecificDeviceSpecification, paInvalidDevice );\n        PA_UNLESS( streamInfo->size == sizeof (PaAlsaStreamInfo) && streamInfo->version == 1,\n                paIncompatibleHostApiSpecificStreamInfo );\n        PA_UNLESS( streamInfo->deviceString != NULL, paInvalidDevice );\n\n        /* Skip further checking */\n        return paNoError;\n    }\n\n    assert( deviceInfo );\n    assert( parameters->hostApiSpecificStreamInfo == NULL );\n    maxChans = ( StreamDirection_In == mode ? deviceInfo->baseDeviceInfo.maxInputChannels :\n        deviceInfo->baseDeviceInfo.maxOutputChannels );\n    PA_UNLESS( parameters->channelCount <= maxChans, paInvalidChannelCount );\n\nerror:\n    return result;\n}\n\n/* Given an open stream, what sample formats are available? */\nstatic PaSampleFormat GetAvailableFormats( snd_pcm_t *pcm )\n{\n    PaSampleFormat available = 0;\n    snd_pcm_hw_params_t *hwParams;\n    alsa_snd_pcm_hw_params_alloca( &hwParams );\n\n    alsa_snd_pcm_hw_params_any( pcm, hwParams );\n\n    if( alsa_snd_pcm_hw_params_test_format( pcm, hwParams, SND_PCM_FORMAT_FLOAT ) >= 0)\n        available |= paFloat32;\n\n    if( alsa_snd_pcm_hw_params_test_format( pcm, hwParams, SND_PCM_FORMAT_S32 ) >= 0)\n        available |= paInt32;\n\n#ifdef PA_LITTLE_ENDIAN\n    if( alsa_snd_pcm_hw_params_test_format( pcm, hwParams, SND_PCM_FORMAT_S24_3LE ) >= 0)\n        available |= paInt24;\n#elif defined PA_BIG_ENDIAN\n    if( alsa_snd_pcm_hw_params_test_format( pcm, hwParams, SND_PCM_FORMAT_S24_3BE ) >= 0)\n        available |= paInt24;\n#endif\n\n    if( alsa_snd_pcm_hw_params_test_format( pcm, hwParams, SND_PCM_FORMAT_S16 ) >= 0)\n        available |= paInt16;\n\n    if( alsa_snd_pcm_hw_params_test_format( pcm, hwParams, SND_PCM_FORMAT_U8 ) >= 0)\n        available |= paUInt8;\n\n    if( alsa_snd_pcm_hw_params_test_format( pcm, hwParams, SND_PCM_FORMAT_S8 ) >= 0)\n        available |= paInt8;\n\n    return available;\n}\n\n/* Output to console all formats supported by device */\nstatic void LogAllAvailableFormats( snd_pcm_t *pcm )\n{\n    PaSampleFormat available = 0;\n    snd_pcm_hw_params_t *hwParams;\n    alsa_snd_pcm_hw_params_alloca( &hwParams );\n\n    alsa_snd_pcm_hw_params_any( pcm, hwParams );\n\n    PA_DEBUG(( \" --- Supported Formats ---\\n\" ));\n\n    if( alsa_snd_pcm_hw_params_test_format( pcm, hwParams, SND_PCM_FORMAT_S8 ) >= 0)\n        PA_DEBUG(( \"SND_PCM_FORMAT_S8\\n\" ));\n    if( alsa_snd_pcm_hw_params_test_format( pcm, hwParams, SND_PCM_FORMAT_U8 ) >= 0)\n        PA_DEBUG(( \"SND_PCM_FORMAT_U8\\n\" ));\n\n    if( alsa_snd_pcm_hw_params_test_format( pcm, hwParams, SND_PCM_FORMAT_S16_LE ) >= 0)\n        PA_DEBUG(( \"SND_PCM_FORMAT_S16_LE\\n\" ));\n    if( alsa_snd_pcm_hw_params_test_format( pcm, hwParams, SND_PCM_FORMAT_S16_BE ) >= 0)\n        PA_DEBUG(( \"SND_PCM_FORMAT_S16_BE\\n\" ));\n\n    if( alsa_snd_pcm_hw_params_test_format( pcm, hwParams, SND_PCM_FORMAT_U16_LE ) >= 0)\n        PA_DEBUG(( \"SND_PCM_FORMAT_U16_LE\\n\" ));\n    if( alsa_snd_pcm_hw_params_test_format( pcm, hwParams, SND_PCM_FORMAT_U16_BE ) >= 0)\n        PA_DEBUG(( \"SND_PCM_FORMAT_U16_BE\\n\" ));\n\n    if( alsa_snd_pcm_hw_params_test_format( pcm, hwParams, SND_PCM_FORMAT_S24_LE ) >= 0)\n        PA_DEBUG(( \"SND_PCM_FORMAT_S24_LE\\n\" ));\n    if( alsa_snd_pcm_hw_params_test_format( pcm, hwParams, SND_PCM_FORMAT_S24_BE ) >= 0)\n        PA_DEBUG(( \"SND_PCM_FORMAT_S24_BE\\n\" ));\n\n    if( alsa_snd_pcm_hw_params_test_format( pcm, hwParams, SND_PCM_FORMAT_U24_LE ) >= 0)\n        PA_DEBUG(( \"SND_PCM_FORMAT_U24_LE\\n\" ));\n    if( alsa_snd_pcm_hw_params_test_format( pcm, hwParams, SND_PCM_FORMAT_U24_BE ) >= 0)\n        PA_DEBUG(( \"SND_PCM_FORMAT_U24_BE\\n\" ));\n\n    if( alsa_snd_pcm_hw_params_test_format( pcm, hwParams, SND_PCM_FORMAT_FLOAT_LE ) >= 0)\n        PA_DEBUG(( \"SND_PCM_FORMAT_FLOAT_LE\\n\" ));\n    if( alsa_snd_pcm_hw_params_test_format( pcm, hwParams, SND_PCM_FORMAT_FLOAT_BE ) >= 0)\n        PA_DEBUG(( \"SND_PCM_FORMAT_FLOAT_BE\\n\" ));\n\n    if( alsa_snd_pcm_hw_params_test_format( pcm, hwParams, SND_PCM_FORMAT_FLOAT64_LE ) >= 0)\n        PA_DEBUG(( \"SND_PCM_FORMAT_FLOAT64_LE\\n\" ));\n    if( alsa_snd_pcm_hw_params_test_format( pcm, hwParams, SND_PCM_FORMAT_FLOAT64_BE ) >= 0)\n        PA_DEBUG(( \"SND_PCM_FORMAT_FLOAT64_BE\\n\" ));\n\n    if( alsa_snd_pcm_hw_params_test_format( pcm, hwParams, SND_PCM_FORMAT_IEC958_SUBFRAME_LE ) >= 0)\n        PA_DEBUG(( \"SND_PCM_FORMAT_IEC958_SUBFRAME_LE\\n\" ));\n    if( alsa_snd_pcm_hw_params_test_format( pcm, hwParams, SND_PCM_FORMAT_IEC958_SUBFRAME_BE ) >= 0)\n        PA_DEBUG(( \"SND_PCM_FORMAT_IEC958_SUBFRAME_BE\\n\" ));\n\n    if( alsa_snd_pcm_hw_params_test_format( pcm, hwParams, SND_PCM_FORMAT_MU_LAW ) >= 0)\n        PA_DEBUG(( \"SND_PCM_FORMAT_MU_LAW\\n\" ));\n    if( alsa_snd_pcm_hw_params_test_format( pcm, hwParams, SND_PCM_FORMAT_A_LAW ) >= 0)\n        PA_DEBUG(( \"SND_PCM_FORMAT_A_LAW\\n\" ));\n\n    if( alsa_snd_pcm_hw_params_test_format( pcm, hwParams, SND_PCM_FORMAT_IMA_ADPCM ) >= 0)\n        PA_DEBUG(( \"SND_PCM_FORMAT_IMA_ADPCM\\n\" ));\n    if( alsa_snd_pcm_hw_params_test_format( pcm, hwParams, SND_PCM_FORMAT_MPEG ) >= 0)\n        PA_DEBUG(( \"SND_PCM_FORMAT_MPEG\\n\" ));\n\n    if( alsa_snd_pcm_hw_params_test_format( pcm, hwParams, SND_PCM_FORMAT_GSM ) >= 0)\n        PA_DEBUG(( \"SND_PCM_FORMAT_GSM\\n\" ));\n    if( alsa_snd_pcm_hw_params_test_format( pcm, hwParams, SND_PCM_FORMAT_SPECIAL ) >= 0)\n        PA_DEBUG(( \"SND_PCM_FORMAT_SPECIAL\\n\" ));\n\n    if( alsa_snd_pcm_hw_params_test_format( pcm, hwParams, SND_PCM_FORMAT_S24_3LE ) >= 0)\n        PA_DEBUG(( \"SND_PCM_FORMAT_S24_3LE\\n\" ));\n    if( alsa_snd_pcm_hw_params_test_format( pcm, hwParams, SND_PCM_FORMAT_S24_3BE ) >= 0)\n        PA_DEBUG(( \"SND_PCM_FORMAT_S24_3BE\\n\" ));\n\n    if( alsa_snd_pcm_hw_params_test_format( pcm, hwParams, SND_PCM_FORMAT_U24_3LE ) >= 0)\n        PA_DEBUG(( \"SND_PCM_FORMAT_U24_3LE\\n\" ));\n    if( alsa_snd_pcm_hw_params_test_format( pcm, hwParams, SND_PCM_FORMAT_U24_3BE ) >= 0)\n        PA_DEBUG(( \"SND_PCM_FORMAT_U24_3BE\\n\" ));\n\n    if( alsa_snd_pcm_hw_params_test_format( pcm, hwParams, SND_PCM_FORMAT_S20_3LE ) >= 0)\n        PA_DEBUG(( \"SND_PCM_FORMAT_S20_3LE\\n\" ));\n    if( alsa_snd_pcm_hw_params_test_format( pcm, hwParams, SND_PCM_FORMAT_S20_3BE ) >= 0)\n        PA_DEBUG(( \"SND_PCM_FORMAT_S20_3BE\\n\" ));\n\n    if( alsa_snd_pcm_hw_params_test_format( pcm, hwParams, SND_PCM_FORMAT_U20_3LE ) >= 0)\n        PA_DEBUG(( \"SND_PCM_FORMAT_U20_3LE\\n\" ));\n    if( alsa_snd_pcm_hw_params_test_format( pcm, hwParams, SND_PCM_FORMAT_U20_3BE ) >= 0)\n        PA_DEBUG(( \"SND_PCM_FORMAT_U20_3BE\\n\" ));\n\n    if( alsa_snd_pcm_hw_params_test_format( pcm, hwParams, SND_PCM_FORMAT_S18_3LE ) >= 0)\n        PA_DEBUG(( \"SND_PCM_FORMAT_S18_3LE\\n\" ));\n    if( alsa_snd_pcm_hw_params_test_format( pcm, hwParams, SND_PCM_FORMAT_S18_3BE ) >= 0)\n        PA_DEBUG(( \"SND_PCM_FORMAT_S18_3BE\\n\" ));\n\n    if( alsa_snd_pcm_hw_params_test_format( pcm, hwParams, SND_PCM_FORMAT_U18_3LE ) >= 0)\n        PA_DEBUG(( \"SND_PCM_FORMAT_U18_3LE\\n\" ));\n    if( alsa_snd_pcm_hw_params_test_format( pcm, hwParams, SND_PCM_FORMAT_U18_3BE ) >= 0)\n        PA_DEBUG(( \"SND_PCM_FORMAT_U18_3BE\\n\" ));\n\n    if( alsa_snd_pcm_hw_params_test_format( pcm, hwParams, SND_PCM_FORMAT_S16 ) >= 0)\n        PA_DEBUG(( \"SND_PCM_FORMAT_S16\\n\" ));\n    if( alsa_snd_pcm_hw_params_test_format( pcm, hwParams, SND_PCM_FORMAT_U16 ) >= 0)\n        PA_DEBUG(( \"SND_PCM_FORMAT_U16\\n\" ));\n\n    if( alsa_snd_pcm_hw_params_test_format( pcm, hwParams, SND_PCM_FORMAT_S24 ) >= 0)\n        PA_DEBUG(( \"SND_PCM_FORMAT_S24\\n\" ));\n    if( alsa_snd_pcm_hw_params_test_format( pcm, hwParams, SND_PCM_FORMAT_U24 ) >= 0)\n        PA_DEBUG(( \"SND_PCM_FORMAT_U24\\n\" ));\n\n    if( alsa_snd_pcm_hw_params_test_format( pcm, hwParams, SND_PCM_FORMAT_S32 ) >= 0)\n        PA_DEBUG(( \"SND_PCM_FORMAT_S32\\n\" ));\n    if( alsa_snd_pcm_hw_params_test_format( pcm, hwParams, SND_PCM_FORMAT_U32 ) >= 0)\n        PA_DEBUG(( \"SND_PCM_FORMAT_U32\\n\" ));\n\n    if( alsa_snd_pcm_hw_params_test_format( pcm, hwParams, SND_PCM_FORMAT_FLOAT ) >= 0)\n        PA_DEBUG(( \"SND_PCM_FORMAT_FLOAT\\n\" ));\n    if( alsa_snd_pcm_hw_params_test_format( pcm, hwParams, SND_PCM_FORMAT_FLOAT64 ) >= 0)\n        PA_DEBUG(( \"SND_PCM_FORMAT_FLOAT64\\n\" ));\n\n    if( alsa_snd_pcm_hw_params_test_format( pcm, hwParams, SND_PCM_FORMAT_IEC958_SUBFRAME ) >= 0)\n        PA_DEBUG(( \"SND_PCM_FORMAT_IEC958_SUBFRAME\\n\" ));\n\n    PA_DEBUG(( \" -------------------------\\n\" ));\n}\n\nstatic snd_pcm_format_t Pa2AlsaFormat( PaSampleFormat paFormat )\n{\n    switch( paFormat )\n    {\n        case paFloat32:\n            return SND_PCM_FORMAT_FLOAT;\n\n        case paInt16:\n            return SND_PCM_FORMAT_S16;\n\n        case paInt24:\n#ifdef PA_LITTLE_ENDIAN\n            return SND_PCM_FORMAT_S24_3LE;\n#elif defined PA_BIG_ENDIAN\n            return SND_PCM_FORMAT_S24_3BE;\n#endif\n\n        case paInt32:\n            return SND_PCM_FORMAT_S32;\n\n        case paInt8:\n            return SND_PCM_FORMAT_S8;\n\n        case paUInt8:\n            return SND_PCM_FORMAT_U8;\n\n        default:\n            return SND_PCM_FORMAT_UNKNOWN;\n    }\n}\n\n/** Open an ALSA pcm handle.\n *\n * The device to be open can be specified by name in a custom PaAlsaStreamInfo struct, or it will be by\n * the Portaudio device number supplied in the stream parameters.\n */\nstatic PaError AlsaOpen( const PaUtilHostApiRepresentation *hostApi, const PaStreamParameters *params, StreamDirection\n        streamDir, snd_pcm_t **pcm )\n{\n    PaError result = paNoError;\n    int ret;\n    const char* deviceName = \"\";\n    const PaAlsaDeviceInfo *deviceInfo = NULL;\n    PaAlsaStreamInfo *streamInfo = (PaAlsaStreamInfo *)params->hostApiSpecificStreamInfo;\n\n    if( !streamInfo )\n    {\n        deviceInfo = GetDeviceInfo( hostApi, params->device );\n        deviceName = deviceInfo->alsaName;\n    }\n    else\n        deviceName = streamInfo->deviceString;\n\n    PA_DEBUG(( \"%s: Opening device %s\\n\", __FUNCTION__, deviceName ));\n    if( (ret = OpenPcm( pcm, deviceName, streamDir == StreamDirection_In ? SND_PCM_STREAM_CAPTURE : SND_PCM_STREAM_PLAYBACK,\n                    SND_PCM_NONBLOCK, 1 )) < 0 )\n    {\n        /* Not to be closed */\n        *pcm = NULL;\n        ENSURE_( ret, -EBUSY == ret ? paDeviceUnavailable : paBadIODeviceCombination );\n    }\n    ENSURE_( alsa_snd_pcm_nonblock( *pcm, 0 ), paUnanticipatedHostError );\n\nend:\n    return result;\n\nerror:\n    goto end;\n}\n\nstatic PaError TestParameters( const PaUtilHostApiRepresentation *hostApi, const PaStreamParameters *parameters,\n        double sampleRate, StreamDirection streamDir )\n{\n    PaError result = paNoError;\n    snd_pcm_t *pcm = NULL;\n    PaSampleFormat availableFormats;\n    /* We are able to adapt to a number of channels less than what the device supports */\n    unsigned int numHostChannels;\n    PaSampleFormat hostFormat;\n    snd_pcm_hw_params_t *hwParams;\n    alsa_snd_pcm_hw_params_alloca( &hwParams );\n\n    if( !parameters->hostApiSpecificStreamInfo )\n    {\n        const PaAlsaDeviceInfo *devInfo = GetDeviceInfo( hostApi, parameters->device );\n        numHostChannels = PA_MAX( parameters->channelCount, StreamDirection_In == streamDir ?\n                devInfo->minInputChannels : devInfo->minOutputChannels );\n    }\n    else\n        numHostChannels = parameters->channelCount;\n\n    PA_ENSURE( AlsaOpen( hostApi, parameters, streamDir, &pcm ) );\n\n    alsa_snd_pcm_hw_params_any( pcm, hwParams );\n\n    if( SetApproximateSampleRate( pcm, hwParams, sampleRate ) < 0 )\n    {\n        result = paInvalidSampleRate;\n        goto error;\n    }\n\n    if( alsa_snd_pcm_hw_params_set_channels( pcm, hwParams, numHostChannels ) < 0 )\n    {\n        result = paInvalidChannelCount;\n        goto error;\n    }\n\n    /* See if we can find a best possible match */\n    availableFormats = GetAvailableFormats( pcm );\n    PA_ENSURE( hostFormat = PaUtil_SelectClosestAvailableFormat( availableFormats, parameters->sampleFormat ) );\n\n    /* Some specific hardware (reported: Audio8 DJ) can fail with assertion during this step. */\n    ENSURE_( alsa_snd_pcm_hw_params_set_format( pcm, hwParams, Pa2AlsaFormat( hostFormat ) ), paUnanticipatedHostError );\n\n    {\n        /* It happens that this call fails because the device is busy */\n        int ret = 0;\n        if( ( ret = alsa_snd_pcm_hw_params( pcm, hwParams ) ) < 0 )\n        {\n            if( -EINVAL == ret )\n            {\n                /* Don't know what to return here */\n                result = paBadIODeviceCombination;\n                goto error;\n            }\n            else if( -EBUSY == ret )\n            {\n                result = paDeviceUnavailable;\n                PA_DEBUG(( \"%s: Device is busy\\n\", __FUNCTION__ ));\n            }\n            else\n            {\n                result = paUnanticipatedHostError;\n            }\n\n            ENSURE_( ret, result );\n        }\n    }\n\nend:\n    if( pcm )\n    {\n        alsa_snd_pcm_close( pcm );\n    }\n    return result;\n\nerror:\n    goto end;\n}\n\nstatic PaError IsFormatSupported( struct PaUtilHostApiRepresentation *hostApi,\n                                  const PaStreamParameters *inputParameters,\n                                  const PaStreamParameters *outputParameters,\n                                  double sampleRate )\n{\n    int inputChannelCount = 0, outputChannelCount = 0;\n    PaSampleFormat inputSampleFormat, outputSampleFormat;\n    PaError result = paFormatIsSupported;\n\n    if( inputParameters )\n    {\n        PA_ENSURE( ValidateParameters( inputParameters, hostApi, StreamDirection_In ) );\n\n        inputChannelCount = inputParameters->channelCount;\n        inputSampleFormat = inputParameters->sampleFormat;\n    }\n\n    if( outputParameters )\n    {\n        PA_ENSURE( ValidateParameters( outputParameters, hostApi, StreamDirection_Out ) );\n\n        outputChannelCount = outputParameters->channelCount;\n        outputSampleFormat = outputParameters->sampleFormat;\n    }\n\n    if( inputChannelCount )\n    {\n        if( ( result = TestParameters( hostApi, inputParameters, sampleRate, StreamDirection_In ) )\n                != paNoError )\n            goto error;\n    }\n    if ( outputChannelCount )\n    {\n        if( ( result = TestParameters( hostApi, outputParameters, sampleRate, StreamDirection_Out ) )\n                != paNoError )\n            goto error;\n    }\n\n    return paFormatIsSupported;\n\nerror:\n    return result;\n}\n\n\nstatic PaError PaAlsaStreamComponent_Initialize( PaAlsaStreamComponent *self, PaAlsaHostApiRepresentation *alsaApi,\n        const PaStreamParameters *params, StreamDirection streamDir, int callbackMode )\n{\n    PaError result = paNoError;\n    PaSampleFormat userSampleFormat = params->sampleFormat, hostSampleFormat = paNoError;\n    assert( params->channelCount > 0 );\n\n    /* Make sure things have an initial value */\n    memset( self, 0, sizeof (PaAlsaStreamComponent) );\n\n    if( NULL == params->hostApiSpecificStreamInfo )\n    {\n        const PaAlsaDeviceInfo *devInfo = GetDeviceInfo( &alsaApi->baseHostApiRep, params->device );\n        self->numHostChannels = PA_MAX( params->channelCount, StreamDirection_In == streamDir ? devInfo->minInputChannels\n                : devInfo->minOutputChannels );\n        self->deviceIsPlug = devInfo->isPlug;\n        PA_DEBUG(( \"%s: Host Chans %c %i\\n\", __FUNCTION__, streamDir == StreamDirection_In ? 'C' : 'P', self->numHostChannels ));\n    }\n    else\n    {\n        /* We're blissfully unaware of the minimum channelCount */\n        self->numHostChannels = params->channelCount;\n        /* Check if device name does not start with hw: to determine if it is a 'plug' device */\n        if( strncmp( \"hw:\", ((PaAlsaStreamInfo *)params->hostApiSpecificStreamInfo)->deviceString, 3 ) != 0  )\n            self->deviceIsPlug = 1; /* An Alsa plug device, not a direct hw device */\n    }\n    if( self->deviceIsPlug && alsaApi->alsaLibVersion < ALSA_VERSION_INT( 1, 0, 16 ) )\n        self->useReventFix = 1; /* Prior to Alsa1.0.16, plug devices may stutter without this fix */\n\n    self->device = params->device;\n\n    PA_ENSURE( AlsaOpen( &alsaApi->baseHostApiRep, params, streamDir, &self->pcm ) );\n    self->nfds = alsa_snd_pcm_poll_descriptors_count( self->pcm );\n\n    PA_ENSURE( hostSampleFormat = PaUtil_SelectClosestAvailableFormat( GetAvailableFormats( self->pcm ), userSampleFormat ) );\n\n    self->hostSampleFormat = hostSampleFormat;\n    self->nativeFormat = Pa2AlsaFormat( hostSampleFormat );\n    self->hostInterleaved = self->userInterleaved = !( userSampleFormat & paNonInterleaved );\n    self->numUserChannels = params->channelCount;\n    self->streamDir = streamDir;\n    self->canMmap = 0;\n    self->nonMmapBuffer = NULL;\n    self->nonMmapBufferSize = 0;\n\n    if( !callbackMode && !self->userInterleaved )\n    {\n        /* Pre-allocate non-interleaved user provided buffers */\n        PA_UNLESS( self->userBuffers = PaUtil_AllocateMemory( sizeof (void *) * self->numUserChannels ),\n                paInsufficientMemory );\n    }\n\nerror:\n\n    /* Log all available formats. */\n    if ( hostSampleFormat == paSampleFormatNotSupported )\n    {\n        LogAllAvailableFormats( self->pcm );\n        PA_DEBUG(( \"%s: Please provide the log output to PortAudio developers, your hardware does not have any sample format implemented yet.\\n\", __FUNCTION__ ));\n    }\n\n    return result;\n}\n\nstatic void PaAlsaStreamComponent_Terminate( PaAlsaStreamComponent *self )\n{\n    alsa_snd_pcm_close( self->pcm );\n    PaUtil_FreeMemory( self->userBuffers ); /* (Ptr can be NULL; PaUtil_FreeMemory includes a NULL check) */\n    PaUtil_FreeMemory( self->nonMmapBuffer );\n}\n\n/*\nstatic int nearbyint_(float value) {\n    if(  value - (int)value > .5 )\n        return (int)ceil( value );\n    return (int)floor( value );\n}\n*/\n\n/** Initiate configuration, preparing for determining a period size suitable for both capture and playback components.\n *\n */\nstatic PaError PaAlsaStreamComponent_InitialConfigure( PaAlsaStreamComponent *self, const PaStreamParameters *params,\n        int primeBuffers, snd_pcm_hw_params_t *hwParams, double *sampleRate )\n{\n    /* Configuration consists of setting all of ALSA's parameters.\n     * These parameters come in two flavors: hardware parameters\n     * and software parameters.  Hardware parameters will affect\n     * the way the device is initialized, software parameters\n     * affect the way ALSA interacts with me, the user-level client.\n     */\n\n    PaError result = paNoError;\n    snd_pcm_access_t accessMode, alternateAccessMode;\n    int dir = 0;\n    snd_pcm_t *pcm = self->pcm;\n    double sr = *sampleRate;\n    unsigned int minPeriods = 2;\n\n    /* self->framesPerPeriod = framesPerHostBuffer; */\n\n    /* ... fill up the configuration space with all possible\n     * combinations of parameters this device will accept */\n    ENSURE_( alsa_snd_pcm_hw_params_any( pcm, hwParams ), paUnanticipatedHostError );\n\n    ENSURE_( alsa_snd_pcm_hw_params_set_periods_integer( pcm, hwParams ), paUnanticipatedHostError );\n    /* I think there should be at least 2 periods (even though ALSA doesn't appear to enforce this) */\n    dir = 0;\n    ENSURE_( alsa_snd_pcm_hw_params_set_periods_min( pcm, hwParams, &minPeriods, &dir ), paUnanticipatedHostError );\n\n    if( self->userInterleaved )\n    {\n        accessMode          = SND_PCM_ACCESS_MMAP_INTERLEAVED;\n        alternateAccessMode = SND_PCM_ACCESS_MMAP_NONINTERLEAVED;\n\n        /* test if MMAP supported */\n        self->canMmap = alsa_snd_pcm_hw_params_test_access( pcm, hwParams, accessMode ) >= 0 ||\n                        alsa_snd_pcm_hw_params_test_access( pcm, hwParams, alternateAccessMode ) >= 0;\n\n        PA_DEBUG(( \"%s: device MMAP SND_PCM_ACCESS_MMAP_INTERLEAVED: %s\\n\", __FUNCTION__, ( alsa_snd_pcm_hw_params_test_access( pcm, hwParams, accessMode ) >= 0 ? \"YES\" : \"NO\" ) ));\n        PA_DEBUG(( \"%s: device MMAP SND_PCM_ACCESS_MMAP_NONINTERLEAVED: %s\\n\", __FUNCTION__, ( alsa_snd_pcm_hw_params_test_access( pcm, hwParams, alternateAccessMode ) >= 0 ? \"YES\" : \"NO\" ) ));\n\n        if( !self->canMmap )\n        {\n            accessMode          = SND_PCM_ACCESS_RW_INTERLEAVED;\n            alternateAccessMode = SND_PCM_ACCESS_RW_NONINTERLEAVED;\n        }\n    }\n    else\n    {\n        accessMode          = SND_PCM_ACCESS_MMAP_NONINTERLEAVED;\n        alternateAccessMode = SND_PCM_ACCESS_MMAP_INTERLEAVED;\n\n        /* test if MMAP supported */\n        self->canMmap = alsa_snd_pcm_hw_params_test_access( pcm, hwParams, accessMode ) >= 0 ||\n                        alsa_snd_pcm_hw_params_test_access( pcm, hwParams, alternateAccessMode ) >= 0;\n\n        PA_DEBUG((\" %s: device MMAP SND_PCM_ACCESS_MMAP_NONINTERLEAVED: %s\\n\", __FUNCTION__, ( alsa_snd_pcm_hw_params_test_access( pcm, hwParams, accessMode ) >= 0 ? \"YES\" : \"NO\" ) ));\n        PA_DEBUG(( \"%s: device MMAP SND_PCM_ACCESS_MMAP_INTERLEAVED: %s\\n\", __FUNCTION__, ( alsa_snd_pcm_hw_params_test_access( pcm, hwParams, alternateAccessMode ) >= 0 ? \"YES\" : \"NO\" ) ));\n\n        if( !self->canMmap )\n        {\n            accessMode          = SND_PCM_ACCESS_RW_NONINTERLEAVED;\n            alternateAccessMode = SND_PCM_ACCESS_RW_INTERLEAVED;\n        }\n    }\n\n    PA_DEBUG(( \"%s: device can MMAP: %s\\n\", __FUNCTION__, ( self->canMmap ? \"YES\" : \"NO\" ) ));\n\n    /* If requested access mode fails, try alternate mode */\n    if( alsa_snd_pcm_hw_params_set_access( pcm, hwParams, accessMode ) < 0 )\n    {\n        int err = 0;\n        if( ( err = alsa_snd_pcm_hw_params_set_access( pcm, hwParams, alternateAccessMode )) < 0 )\n        {\n            result = paUnanticipatedHostError;\n            PaUtil_SetLastHostErrorInfo( paALSA, err, alsa_snd_strerror( err ) );\n            goto error;\n        }\n        /* Flip mode */\n        self->hostInterleaved = !self->userInterleaved;\n    }\n\n    /* Some specific hardware (reported: Audio8 DJ) can fail with assertion during this step. */\n    ENSURE_( alsa_snd_pcm_hw_params_set_format( pcm, hwParams, self->nativeFormat ), paUnanticipatedHostError );\n\n    if( ( result = SetApproximateSampleRate( pcm, hwParams, sr )) != paUnanticipatedHostError )\n    {\n        ENSURE_( GetExactSampleRate( hwParams, &sr ), paUnanticipatedHostError );\n        if( result == paInvalidSampleRate ) /* From the SetApproximateSampleRate() call above */\n        { /* The sample rate was returned as 'out of tolerance' of the one requested */\n            PA_DEBUG(( \"%s: Wanted %.3f, closest sample rate was %.3f\\n\", __FUNCTION__, sampleRate, sr ));\n            PA_ENSURE( paInvalidSampleRate );\n        }\n    }\n    else\n    {\n        PA_ENSURE( paUnanticipatedHostError );\n    }\n\n    ENSURE_( alsa_snd_pcm_hw_params_set_channels( pcm, hwParams, self->numHostChannels ), paInvalidChannelCount );\n\n    *sampleRate = sr;\n\nend:\n    return result;\n\nerror:\n    /* No particular action */\n    goto end;\n}\n\n/** Finish the configuration of the component's ALSA device.\n *\n * As part of this method, the component's alsaBufferSize attribute will be set.\n * @param latency: The latency for this component.\n */\nstatic PaError PaAlsaStreamComponent_FinishConfigure( PaAlsaStreamComponent *self, snd_pcm_hw_params_t* hwParams,\n        const PaStreamParameters *params, int primeBuffers, double sampleRate, PaTime* latency )\n{\n    PaError result = paNoError;\n    snd_pcm_sw_params_t* swParams;\n    snd_pcm_uframes_t bufSz = 0;\n    *latency = -1.;\n\n    alsa_snd_pcm_sw_params_alloca( &swParams );\n\n    bufSz = params->suggestedLatency * sampleRate + self->framesPerPeriod;\n    ENSURE_( alsa_snd_pcm_hw_params_set_buffer_size_near( self->pcm, hwParams, &bufSz ), paUnanticipatedHostError );\n\n    /* Set the parameters! */\n    {\n        int r = alsa_snd_pcm_hw_params( self->pcm, hwParams );\n#ifdef PA_ENABLE_DEBUG_OUTPUT\n        if( r < 0 )\n        {\n            snd_output_t *output = NULL;\n            alsa_snd_output_stdio_attach( &output, stderr, 0 );\n            alsa_snd_pcm_hw_params_dump( hwParams, output );\n        }\n#endif\n        ENSURE_( r, paUnanticipatedHostError );\n    }\n    if( alsa_snd_pcm_hw_params_get_buffer_size != NULL )\n    {\n        ENSURE_( alsa_snd_pcm_hw_params_get_buffer_size( hwParams, &self->alsaBufferSize ), paUnanticipatedHostError );\n    }\n    else\n    {\n        self->alsaBufferSize = bufSz;\n    }\n\n    /* Latency in seconds */\n    *latency = (self->alsaBufferSize - self->framesPerPeriod) / sampleRate;\n\n    /* Now software parameters... */\n    ENSURE_( alsa_snd_pcm_sw_params_current( self->pcm, swParams ), paUnanticipatedHostError );\n\n    ENSURE_( alsa_snd_pcm_sw_params_set_start_threshold( self->pcm, swParams, self->framesPerPeriod ), paUnanticipatedHostError );\n    ENSURE_( alsa_snd_pcm_sw_params_set_stop_threshold( self->pcm, swParams, self->alsaBufferSize ), paUnanticipatedHostError );\n\n    /* Silence buffer in the case of underrun */\n    if( !primeBuffers ) /* XXX: Make sense? */\n    {\n        snd_pcm_uframes_t boundary;\n        ENSURE_( alsa_snd_pcm_sw_params_get_boundary( swParams, &boundary ), paUnanticipatedHostError );\n        ENSURE_( alsa_snd_pcm_sw_params_set_silence_threshold( self->pcm, swParams, 0 ), paUnanticipatedHostError );\n        ENSURE_( alsa_snd_pcm_sw_params_set_silence_size( self->pcm, swParams, boundary ), paUnanticipatedHostError );\n    }\n\n    ENSURE_( alsa_snd_pcm_sw_params_set_avail_min( self->pcm, swParams, self->framesPerPeriod ), paUnanticipatedHostError );\n    ENSURE_( alsa_snd_pcm_sw_params_set_xfer_align( self->pcm, swParams, 1 ), paUnanticipatedHostError );\n    ENSURE_( alsa_snd_pcm_sw_params_set_tstamp_mode( self->pcm, swParams, SND_PCM_TSTAMP_ENABLE ), paUnanticipatedHostError );\n\n    /* Set the parameters! */\n    ENSURE_( alsa_snd_pcm_sw_params( self->pcm, swParams ), paUnanticipatedHostError );\n\nerror:\n    return result;\n}\n\nstatic PaError PaAlsaStream_Initialize( PaAlsaStream *self, PaAlsaHostApiRepresentation *alsaApi, const PaStreamParameters *inParams,\n        const PaStreamParameters *outParams, double sampleRate, unsigned long framesPerUserBuffer, PaStreamCallback callback,\n        PaStreamFlags streamFlags, void *userData )\n{\n    PaError result = paNoError;\n    assert( self );\n\n    memset( self, 0, sizeof( PaAlsaStream ) );\n\n    if( NULL != callback )\n    {\n        PaUtil_InitializeStreamRepresentation( &self->streamRepresentation,\n                                               &alsaApi->callbackStreamInterface,\n                                               callback, userData );\n        self->callbackMode = 1;\n    }\n    else\n    {\n        PaUtil_InitializeStreamRepresentation( &self->streamRepresentation,\n                                               &alsaApi->blockingStreamInterface,\n                                               NULL, userData );\n    }\n\n    self->framesPerUserBuffer = framesPerUserBuffer;\n    self->neverDropInput = streamFlags & paNeverDropInput;\n    /* XXX: Ignore paPrimeOutputBuffersUsingStreamCallback until buffer priming is fully supported in pa_process.c */\n    /*\n    if( outParams & streamFlags & paPrimeOutputBuffersUsingStreamCallback )\n        self->primeBuffers = 1;\n        */\n    memset( &self->capture, 0, sizeof (PaAlsaStreamComponent) );\n    memset( &self->playback, 0, sizeof (PaAlsaStreamComponent) );\n    if( inParams )\n    {\n        PA_ENSURE( PaAlsaStreamComponent_Initialize( &self->capture, alsaApi, inParams, StreamDirection_In, NULL != callback ) );\n    }\n    if( outParams )\n    {\n        PA_ENSURE( PaAlsaStreamComponent_Initialize( &self->playback, alsaApi, outParams, StreamDirection_Out, NULL != callback ) );\n    }\n\n    assert( self->capture.nfds || self->playback.nfds );\n\n    PA_UNLESS( self->pfds = (struct pollfd*)PaUtil_AllocateMemory( ( self->capture.nfds +\n                    self->playback.nfds ) * sizeof( struct pollfd ) ), paInsufficientMemory );\n\n    PaUtil_InitializeCpuLoadMeasurer( &self->cpuLoadMeasurer, sampleRate );\n    ASSERT_CALL_( PaUnixMutex_Initialize( &self->stateMtx ), paNoError );\n\nerror:\n    return result;\n}\n\n/** Free resources associated with stream, and eventually stream itself.\n *\n * Frees allocated memory, and terminates individual StreamComponents.\n */\nstatic void PaAlsaStream_Terminate( PaAlsaStream *self )\n{\n    assert( self );\n\n    if( self->capture.pcm )\n    {\n        PaAlsaStreamComponent_Terminate( &self->capture );\n    }\n    if( self->playback.pcm )\n    {\n        PaAlsaStreamComponent_Terminate( &self->playback );\n    }\n\n    PaUtil_FreeMemory( self->pfds );\n    ASSERT_CALL_( PaUnixMutex_Terminate( &self->stateMtx ), paNoError );\n\n    PaUtil_FreeMemory( self );\n}\n\n/** Calculate polling timeout\n *\n * @param frames Time to wait\n * @return Polling timeout in milliseconds\n */\nstatic int CalculatePollTimeout( const PaAlsaStream *stream, unsigned long frames )\n{\n    assert( stream->streamRepresentation.streamInfo.sampleRate > 0.0 );\n    /* Period in msecs, rounded up */\n    return (int)ceil( 1000 * frames / stream->streamRepresentation.streamInfo.sampleRate );\n}\n\n/** Align value in backward direction.\n *\n * @param v: Value to align.\n * @param align: Alignment.\n */\nstatic unsigned long PaAlsa_AlignBackward(unsigned long v, unsigned long align)\n{\n    return ( v - ( align ? v % align : 0 ) );\n}\n\n/** Align value in forward direction.\n *\n * @param v: Value to align.\n * @param align: Alignment.\n */\nstatic unsigned long PaAlsa_AlignForward(unsigned long v, unsigned long align)\n{\n    unsigned long remainder = ( align ? ( v % align ) : 0);\n    return ( remainder != 0 ? v + ( align - remainder ) : v );\n}\n\n/** Get size of host buffer maintained from the number of user frames, sample rate and suggested latency. Minimum double buffering\n *  is maintained to allow 100% CPU usage inside user callback.\n *\n * @param userFramesPerBuffer: User buffer size in number of frames.\n * @param suggestedLatency: User provided desired latency.\n * @param sampleRate: Sample rate.\n */\nstatic unsigned long PaAlsa_GetFramesPerHostBuffer(unsigned long userFramesPerBuffer, PaTime suggestedLatency, double sampleRate)\n{\n    unsigned long frames = userFramesPerBuffer + PA_MAX( userFramesPerBuffer, (unsigned long)( suggestedLatency * sampleRate ) );\n    return frames;\n}\n\n/** Determine size per host buffer.\n *\n * During this method call, the component's framesPerPeriod attribute gets computed, and the corresponding period size\n * gets configured for the device.\n * @param accurate: If the configured period size is non-integer, this will be set to 0.\n */\nstatic PaError PaAlsaStreamComponent_DetermineFramesPerBuffer( PaAlsaStreamComponent* self, const PaStreamParameters* params,\n        unsigned long framesPerUserBuffer, double sampleRate, snd_pcm_hw_params_t* hwParams, int* accurate )\n{\n    PaError result = paNoError;\n    unsigned long bufferSize, framesPerHostBuffer;\n    int dir = 0;\n\n    /* Calculate host buffer size */\n    bufferSize = PaAlsa_GetFramesPerHostBuffer(framesPerUserBuffer, params->suggestedLatency, sampleRate);\n\n    /* Log */\n    PA_DEBUG(( \"%s: user-buffer (frames)           = %lu\\n\", __FUNCTION__, framesPerUserBuffer ));\n    PA_DEBUG(( \"%s: user-buffer (sec)              = %f\\n\",  __FUNCTION__, (double)(framesPerUserBuffer / sampleRate) ));\n    PA_DEBUG(( \"%s: suggested latency (sec)        = %f\\n\",  __FUNCTION__, params->suggestedLatency ));\n    PA_DEBUG(( \"%s: suggested host buffer (frames) = %lu\\n\", __FUNCTION__, bufferSize ));\n    PA_DEBUG(( \"%s: suggested host buffer (sec)    = %f\\n\",  __FUNCTION__, (double)(bufferSize / sampleRate) ));\n\n#ifdef PA_ALSA_USE_OBSOLETE_HOST_BUFFER_CALC\n\n    if( framesPerUserBuffer != paFramesPerBufferUnspecified )\n    {\n        /* Preferably the host buffer size should be a multiple of the user buffer size */\n\n        if( bufferSize > framesPerUserBuffer )\n        {\n            snd_pcm_uframes_t remainder = bufferSize % framesPerUserBuffer;\n            if( remainder > framesPerUserBuffer / 2. )\n                bufferSize += framesPerUserBuffer - remainder;\n            else\n                bufferSize -= remainder;\n\n            assert( bufferSize % framesPerUserBuffer == 0 );\n        }\n        else if( framesPerUserBuffer % bufferSize != 0 )\n        {\n            /*  Find a good compromise between user specified latency and buffer size */\n            if( bufferSize > framesPerUserBuffer * .75 )\n            {\n                bufferSize = framesPerUserBuffer;\n            }\n            else\n            {\n                snd_pcm_uframes_t newSz = framesPerUserBuffer;\n                while( newSz / 2 >= bufferSize )\n                {\n                    if( framesPerUserBuffer % (newSz / 2) != 0 )\n                    {\n                        /* No use dividing any further */\n                        break;\n                    }\n                    newSz /= 2;\n                }\n                bufferSize = newSz;\n            }\n\n            assert( framesPerUserBuffer % bufferSize == 0 );\n        }\n    }\n\n#endif\n\n    {\n        unsigned numPeriods = numPeriods_, maxPeriods = 0, minPeriods = numPeriods_;\n\n        /* It may be that the device only supports 2 periods for instance */\n        dir = 0;\n        ENSURE_( alsa_snd_pcm_hw_params_get_periods_min( hwParams, &minPeriods, &dir ), paUnanticipatedHostError );\n        dir = 0;\n        ENSURE_( alsa_snd_pcm_hw_params_get_periods_max( hwParams, &maxPeriods, &dir ), paUnanticipatedHostError );\n        assert( maxPeriods > 1 );\n\n        /* Clamp to min/max */\n        numPeriods = PA_MIN(maxPeriods, PA_MAX(minPeriods, numPeriods));\n\n        PA_DEBUG(( \"%s: periods min = %lu, max = %lu, req = %lu \\n\", __FUNCTION__, minPeriods, maxPeriods, numPeriods ));\n\n#ifndef PA_ALSA_USE_OBSOLETE_HOST_BUFFER_CALC\n\n        /* Calculate period size */\n        framesPerHostBuffer = (bufferSize / numPeriods);\n\n        /* Align & test size */\n        if( framesPerUserBuffer != paFramesPerBufferUnspecified )\n        {\n            /* Align to user buffer size */\n            framesPerHostBuffer = PaAlsa_AlignForward(framesPerHostBuffer, framesPerUserBuffer);\n\n            /* Test (borrowed from older implementation) */\n            if( framesPerHostBuffer < framesPerUserBuffer )\n            {\n                assert( framesPerUserBuffer % framesPerHostBuffer == 0 );\n                if( alsa_snd_pcm_hw_params_test_period_size( self->pcm, hwParams, framesPerHostBuffer, 0 ) < 0 )\n                {\n                    if( alsa_snd_pcm_hw_params_test_period_size( self->pcm, hwParams, framesPerHostBuffer * 2, 0 ) == 0 )\n                        framesPerHostBuffer *= 2;\n                    else if( alsa_snd_pcm_hw_params_test_period_size( self->pcm, hwParams, framesPerHostBuffer / 2, 0 ) == 0 )\n                        framesPerHostBuffer /= 2;\n                }\n            }\n            else\n            {\n                assert( framesPerHostBuffer % framesPerUserBuffer == 0 );\n                if( alsa_snd_pcm_hw_params_test_period_size( self->pcm, hwParams, framesPerHostBuffer, 0 ) < 0 )\n                {\n                    if( alsa_snd_pcm_hw_params_test_period_size( self->pcm, hwParams, framesPerHostBuffer + framesPerUserBuffer, 0 ) == 0 )\n                        framesPerHostBuffer += framesPerUserBuffer;\n                    else if( alsa_snd_pcm_hw_params_test_period_size( self->pcm, hwParams, framesPerHostBuffer - framesPerUserBuffer, 0 ) == 0 )\n                        framesPerHostBuffer -= framesPerUserBuffer;\n                }\n            }\n        }\n#endif\n\n#ifdef PA_ALSA_USE_OBSOLETE_HOST_BUFFER_CALC\n\n        if( framesPerUserBuffer != paFramesPerBufferUnspecified )\n        {\n            /* Try to get a power-of-two of the user buffer size. */\n            framesPerHostBuffer = framesPerUserBuffer;\n            if( framesPerHostBuffer < bufferSize )\n            {\n                while( bufferSize / framesPerHostBuffer > numPeriods )\n                {\n                    framesPerHostBuffer *= 2;\n                }\n                /* One extra period is preferable to one less (should be more robust) */\n                if( bufferSize / framesPerHostBuffer < numPeriods )\n                {\n                    framesPerHostBuffer /= 2;\n                }\n            }\n            else\n            {\n                while( bufferSize / framesPerHostBuffer < numPeriods )\n                {\n                    if( framesPerUserBuffer % ( framesPerHostBuffer / 2 ) != 0 )\n                    {\n                        /* Can't be divided any further */\n                        break;\n                    }\n                    framesPerHostBuffer /= 2;\n                }\n            }\n\n            if( framesPerHostBuffer < framesPerUserBuffer )\n            {\n                assert( framesPerUserBuffer % framesPerHostBuffer == 0 );\n                if( alsa_snd_pcm_hw_params_test_period_size( self->pcm, hwParams, framesPerHostBuffer, 0 ) < 0 )\n                {\n                    if( alsa_snd_pcm_hw_params_test_period_size( self->pcm, hwParams, framesPerHostBuffer * 2, 0 ) == 0 )\n                        framesPerHostBuffer *= 2;\n                    else if( alsa_snd_pcm_hw_params_test_period_size( self->pcm, hwParams, framesPerHostBuffer / 2, 0 ) == 0 )\n                        framesPerHostBuffer /= 2;\n                }\n            }\n            else\n            {\n                assert( framesPerHostBuffer % framesPerUserBuffer == 0 );\n                if( alsa_snd_pcm_hw_params_test_period_size( self->pcm, hwParams, framesPerHostBuffer, 0 ) < 0 )\n                {\n                    if( alsa_snd_pcm_hw_params_test_period_size( self->pcm, hwParams, framesPerHostBuffer + framesPerUserBuffer, 0 ) == 0 )\n                        framesPerHostBuffer += framesPerUserBuffer;\n                    else if( alsa_snd_pcm_hw_params_test_period_size( self->pcm, hwParams, framesPerHostBuffer - framesPerUserBuffer, 0 ) == 0 )\n                        framesPerHostBuffer -= framesPerUserBuffer;\n                }\n            }\n        }\n        else\n        {\n            framesPerHostBuffer = bufferSize / numPeriods;\n        }\n\n        /* non-mmap mode needs a reasonably-sized buffer or it'll stutter */\n        if( !self->canMmap && framesPerHostBuffer < 2048 )\n            framesPerHostBuffer = 2048;\n#endif\n        PA_DEBUG(( \"%s: suggested host buffer period   = %lu \\n\", __FUNCTION__, framesPerHostBuffer ));\n    }\n\n    {\n        /* Get min/max period sizes and adjust our chosen */\n        snd_pcm_uframes_t min = 0, max = 0, minmax_diff;\n        ENSURE_( alsa_snd_pcm_hw_params_get_period_size_min( hwParams, &min, NULL ), paUnanticipatedHostError );\n        ENSURE_( alsa_snd_pcm_hw_params_get_period_size_max( hwParams, &max, NULL ), paUnanticipatedHostError );\n        minmax_diff = max - min;\n\n        if( framesPerHostBuffer < min )\n        {\n            PA_DEBUG(( \"%s: The determined period size (%lu) is less than minimum (%lu)\\n\", __FUNCTION__, framesPerHostBuffer, min ));\n            framesPerHostBuffer = (( minmax_diff == 2 ) ? min + 1 : min );\n        }\n        else if( framesPerHostBuffer > max )\n        {\n            PA_DEBUG(( \"%s: The determined period size (%lu) is greater than maximum (%lu)\\n\", __FUNCTION__, framesPerHostBuffer, max ));\n            framesPerHostBuffer = (( minmax_diff == 2 ) ? max - 1 : max );\n        }\n\n        PA_DEBUG(( \"%s: device period minimum          = %lu\\n\", __FUNCTION__, min ));\n        PA_DEBUG(( \"%s: device period maximum          = %lu\\n\", __FUNCTION__, max ));\n        PA_DEBUG(( \"%s: host buffer period             = %lu\\n\", __FUNCTION__, framesPerHostBuffer ));\n        PA_DEBUG(( \"%s: host buffer period latency     = %f\\n\", __FUNCTION__, (double)( framesPerHostBuffer / sampleRate ) ));\n\n        /* Try setting period size */\n        dir = 0;\n        ENSURE_( alsa_snd_pcm_hw_params_set_period_size_near( self->pcm, hwParams, &framesPerHostBuffer, &dir ), paUnanticipatedHostError );\n        if( dir != 0 )\n        {\n            PA_DEBUG(( \"%s: The configured period size is non-integer.\\n\", __FUNCTION__, dir ));\n            *accurate = 0;\n        }\n    }\n\n    /* Set result */\n    self->framesPerPeriod = framesPerHostBuffer;\n\nerror:\n    return result;\n}\n\n/* We need to determine how many frames per host buffer (period) to use.  Our\n * goals are to provide the best possible performance, but also to\n * honor the requested latency settings as closely as we can. Therefore this\n * decision is based on:\n *\n *   - the period sizes that playback and/or capture support.  The\n *     host buffer size has to be one of these.\n *   - the number of periods that playback and/or capture support.\n *\n * We want to make period_size*(num_periods-1) to be as close as possible\n * to latency*rate for both playback and capture.\n *\n * This method will determine suitable period sizes for capture and playback handles, and report the maximum number of\n * frames per host buffer. The latter is relevant, in case we should be so unfortunate that the period size differs\n * between capture and playback. If this should happen, the stream's hostBufferSizeMode attribute will be set to\n * paUtilBoundedHostBufferSize, because the best we can do is limit the size of individual host buffers to the upper\n * bound. The size of host buffers scheduled for processing should only matter if the user has specified a buffer size,\n * but when he/she does we must strive for an optimal configuration. By default we'll opt for a fixed host buffer size,\n * which should be fine if the period size is the same for capture and playback. In general, if there is a specified user\n * buffer size, this method tries it best to determine a period size which is a multiple of the user buffer size.\n *\n * The framesPerPeriod attributes of the individual capture and playback components of the stream are set to corresponding\n * values determined here. Since these should be reported as\n *\n * This is one of those blocks of code that will just take a lot of\n * refinement to be any good.\n *\n * In the full-duplex case it is possible that the routine was unable\n * to find a number of frames per buffer acceptable to both devices\n * TODO: Implement an algorithm to find the value closest to acceptance\n * by both devices, to minimize difference between period sizes?\n *\n * @param determinedFramesPerHostBuffer: The determined host buffer size.\n */\nstatic PaError PaAlsaStream_DetermineFramesPerBuffer( PaAlsaStream* self, double sampleRate, const PaStreamParameters* inputParameters,\n        const PaStreamParameters* outputParameters, unsigned long framesPerUserBuffer, snd_pcm_hw_params_t* hwParamsCapture,\n        snd_pcm_hw_params_t* hwParamsPlayback, PaUtilHostBufferSizeMode* hostBufferSizeMode )\n{\n    PaError result = paNoError;\n    unsigned long framesPerHostBuffer = 0;\n    int dir = 0;\n    int accurate = 1;\n    unsigned numPeriods = numPeriods_;\n\n    if( self->capture.pcm && self->playback.pcm )\n    {\n        if( framesPerUserBuffer == paFramesPerBufferUnspecified )\n        {\n            /* Come up with a common desired latency */\n            snd_pcm_uframes_t desiredBufSz, e, minPeriodSize, maxPeriodSize, optimalPeriodSize, periodSize,\n                              minCapture, minPlayback, maxCapture, maxPlayback;\n\n            dir = 0;\n            ENSURE_( alsa_snd_pcm_hw_params_get_period_size_min( hwParamsCapture, &minCapture, &dir ), paUnanticipatedHostError );\n            dir = 0;\n            ENSURE_( alsa_snd_pcm_hw_params_get_period_size_min( hwParamsPlayback, &minPlayback, &dir ), paUnanticipatedHostError );\n            dir = 0;\n            ENSURE_( alsa_snd_pcm_hw_params_get_period_size_max( hwParamsCapture, &maxCapture, &dir ), paUnanticipatedHostError );\n            dir = 0;\n            ENSURE_( alsa_snd_pcm_hw_params_get_period_size_max( hwParamsPlayback, &maxPlayback, &dir ), paUnanticipatedHostError );\n            minPeriodSize = PA_MAX( minPlayback, minCapture );\n            maxPeriodSize = PA_MIN( maxPlayback, maxCapture );\n            PA_UNLESS( minPeriodSize <= maxPeriodSize, paBadIODeviceCombination );\n\n            desiredBufSz = (snd_pcm_uframes_t)( PA_MIN( outputParameters->suggestedLatency, inputParameters->suggestedLatency )\n                    * sampleRate );\n            /* Clamp desiredBufSz */\n            {\n                snd_pcm_uframes_t maxBufferSize;\n                snd_pcm_uframes_t maxBufferSizeCapture, maxBufferSizePlayback;\n                ENSURE_( alsa_snd_pcm_hw_params_get_buffer_size_max( hwParamsCapture, &maxBufferSizeCapture ), paUnanticipatedHostError );\n                ENSURE_( alsa_snd_pcm_hw_params_get_buffer_size_max( hwParamsPlayback, &maxBufferSizePlayback ), paUnanticipatedHostError );\n                maxBufferSize = PA_MIN( maxBufferSizeCapture, maxBufferSizePlayback );\n\n                desiredBufSz = PA_MIN( desiredBufSz, maxBufferSize );\n            }\n\n            /* Find the closest power of 2 */\n            e = ilogb( minPeriodSize );\n            if( minPeriodSize & ( minPeriodSize - 1 ) )\n                e += 1;\n            periodSize = (snd_pcm_uframes_t)pow( 2, e );\n\n            while( periodSize <= maxPeriodSize )\n            {\n                if( alsa_snd_pcm_hw_params_test_period_size( self->playback.pcm, hwParamsPlayback, periodSize, 0 ) >= 0 &&\n                        alsa_snd_pcm_hw_params_test_period_size( self->capture.pcm, hwParamsCapture, periodSize, 0 ) >= 0 )\n                {\n                    /* OK! */\n                    break;\n                }\n\n                periodSize *= 2;\n            }\n\n            optimalPeriodSize = PA_MAX( desiredBufSz / numPeriods, minPeriodSize );\n            optimalPeriodSize = PA_MIN( optimalPeriodSize, maxPeriodSize );\n\n            /* Find the closest power of 2 */\n            e = ilogb( optimalPeriodSize );\n            if( optimalPeriodSize & (optimalPeriodSize - 1) )\n                e += 1;\n            optimalPeriodSize = (snd_pcm_uframes_t)pow( 2, e );\n\n            while( optimalPeriodSize >= periodSize )\n            {\n                if( alsa_snd_pcm_hw_params_test_period_size( self->capture.pcm, hwParamsCapture, optimalPeriodSize, 0 )\n                        >= 0 && alsa_snd_pcm_hw_params_test_period_size( self->playback.pcm, hwParamsPlayback,\n                            optimalPeriodSize, 0 ) >= 0 )\n                {\n                    break;\n                }\n                optimalPeriodSize /= 2;\n            }\n\n            if( optimalPeriodSize > periodSize )\n                periodSize = optimalPeriodSize;\n\n            if( periodSize <= maxPeriodSize )\n            {\n                /* Looks good, the periodSize _should_ be acceptable by both devices */\n                ENSURE_( alsa_snd_pcm_hw_params_set_period_size( self->capture.pcm, hwParamsCapture, periodSize, 0 ),\n                        paUnanticipatedHostError );\n                ENSURE_( alsa_snd_pcm_hw_params_set_period_size( self->playback.pcm, hwParamsPlayback, periodSize, 0 ),\n                        paUnanticipatedHostError );\n                self->capture.framesPerPeriod = self->playback.framesPerPeriod = periodSize;\n                framesPerHostBuffer = periodSize;\n            }\n            else\n            {\n                /* Unable to find a common period size, oh well */\n                optimalPeriodSize = PA_MAX( desiredBufSz / numPeriods, minPeriodSize );\n                optimalPeriodSize = PA_MIN( optimalPeriodSize, maxPeriodSize );\n\n                self->capture.framesPerPeriod = optimalPeriodSize;\n                dir = 0;\n                ENSURE_( alsa_snd_pcm_hw_params_set_period_size_near( self->capture.pcm, hwParamsCapture, &self->capture.framesPerPeriod, &dir ),\n                        paUnanticipatedHostError );\n                self->playback.framesPerPeriod = optimalPeriodSize;\n                dir = 0;\n                ENSURE_( alsa_snd_pcm_hw_params_set_period_size_near( self->playback.pcm, hwParamsPlayback, &self->playback.framesPerPeriod, &dir ),\n                        paUnanticipatedHostError );\n                framesPerHostBuffer = PA_MAX( self->capture.framesPerPeriod, self->playback.framesPerPeriod );\n                *hostBufferSizeMode = paUtilBoundedHostBufferSize;\n            }\n        }\n        else\n        {\n            /* We choose the simple route and determine a suitable number of frames per buffer for one component of\n             * the stream, then we hope that this will work for the other component too (it should!).\n             */\n\n            unsigned maxPeriods = 0;\n            PaAlsaStreamComponent* first = &self->capture, * second = &self->playback;\n            const PaStreamParameters* firstStreamParams = inputParameters;\n            snd_pcm_hw_params_t* firstHwParams = hwParamsCapture, * secondHwParams = hwParamsPlayback;\n\n            dir = 0;\n            ENSURE_( alsa_snd_pcm_hw_params_get_periods_max( hwParamsPlayback, &maxPeriods, &dir ), paUnanticipatedHostError );\n            if( maxPeriods < numPeriods )\n            {\n                /* The playback component is trickier to get right, try that first */\n                first = &self->playback;\n                second = &self->capture;\n                firstStreamParams = outputParameters;\n                firstHwParams = hwParamsPlayback;\n                secondHwParams = hwParamsCapture;\n            }\n\n            PA_ENSURE( PaAlsaStreamComponent_DetermineFramesPerBuffer( first, firstStreamParams, framesPerUserBuffer,\n                        sampleRate, firstHwParams, &accurate ) );\n\n            second->framesPerPeriod = first->framesPerPeriod;\n            dir = 0;\n            ENSURE_( alsa_snd_pcm_hw_params_set_period_size_near( second->pcm, secondHwParams, &second->framesPerPeriod, &dir ),\n                    paUnanticipatedHostError );\n            if( self->capture.framesPerPeriod == self->playback.framesPerPeriod )\n            {\n                framesPerHostBuffer = self->capture.framesPerPeriod;\n            }\n            else\n            {\n                framesPerHostBuffer = PA_MAX( self->capture.framesPerPeriod, self->playback.framesPerPeriod );\n                *hostBufferSizeMode = paUtilBoundedHostBufferSize;\n            }\n        }\n    }\n    else    /* half-duplex is a slightly simpler case */\n    {\n        if( self->capture.pcm )\n        {\n            PA_ENSURE( PaAlsaStreamComponent_DetermineFramesPerBuffer( &self->capture, inputParameters, framesPerUserBuffer,\n                        sampleRate, hwParamsCapture, &accurate) );\n            framesPerHostBuffer = self->capture.framesPerPeriod;\n        }\n        else\n        {\n            assert( self->playback.pcm );\n            PA_ENSURE( PaAlsaStreamComponent_DetermineFramesPerBuffer( &self->playback, outputParameters, framesPerUserBuffer,\n                        sampleRate, hwParamsPlayback, &accurate ) );\n            framesPerHostBuffer = self->playback.framesPerPeriod;\n        }\n    }\n\n    PA_UNLESS( framesPerHostBuffer != 0, paInternalError );\n    self->maxFramesPerHostBuffer = framesPerHostBuffer;\n\n    if( !self->playback.canMmap || !accurate )\n    {\n        /* Don't know the exact size per host buffer */\n        *hostBufferSizeMode = paUtilBoundedHostBufferSize;\n        /* Raise upper bound */\n        if( !accurate )\n            ++self->maxFramesPerHostBuffer;\n    }\n\nerror:\n    return result;\n}\n\n/** Set up ALSA stream parameters.\n *\n */\nstatic PaError PaAlsaStream_Configure( PaAlsaStream *self, const PaStreamParameters *inParams, const PaStreamParameters*\n        outParams, double sampleRate, unsigned long framesPerUserBuffer, double* inputLatency, double* outputLatency,\n        PaUtilHostBufferSizeMode* hostBufferSizeMode )\n{\n    PaError result = paNoError;\n    double realSr = sampleRate;\n    snd_pcm_hw_params_t* hwParamsCapture, * hwParamsPlayback;\n\n    alsa_snd_pcm_hw_params_alloca( &hwParamsCapture );\n    alsa_snd_pcm_hw_params_alloca( &hwParamsPlayback );\n\n    if( self->capture.pcm )\n        PA_ENSURE( PaAlsaStreamComponent_InitialConfigure( &self->capture, inParams, self->primeBuffers, hwParamsCapture,\n                    &realSr ) );\n    if( self->playback.pcm )\n        PA_ENSURE( PaAlsaStreamComponent_InitialConfigure( &self->playback, outParams, self->primeBuffers, hwParamsPlayback,\n                    &realSr ) );\n\n    PA_ENSURE( PaAlsaStream_DetermineFramesPerBuffer( self, realSr, inParams, outParams, framesPerUserBuffer,\n                hwParamsCapture, hwParamsPlayback, hostBufferSizeMode ) );\n\n    if( self->capture.pcm )\n    {\n        assert( self->capture.framesPerPeriod != 0 );\n        PA_ENSURE( PaAlsaStreamComponent_FinishConfigure( &self->capture, hwParamsCapture, inParams, self->primeBuffers, realSr,\n                    inputLatency ) );\n        PA_DEBUG(( \"%s: Capture period size: %lu, latency: %f\\n\", __FUNCTION__, self->capture.framesPerPeriod, *inputLatency ));\n    }\n    if( self->playback.pcm )\n    {\n        assert( self->playback.framesPerPeriod != 0 );\n        PA_ENSURE( PaAlsaStreamComponent_FinishConfigure( &self->playback, hwParamsPlayback, outParams, self->primeBuffers, realSr,\n                    outputLatency ) );\n        PA_DEBUG(( \"%s: Playback period size: %lu, latency: %f\\n\", __FUNCTION__, self->playback.framesPerPeriod, *outputLatency ));\n    }\n\n    /* Should be exact now */\n    self->streamRepresentation.streamInfo.sampleRate = realSr;\n\n    /* this will cause the two streams to automatically start/stop/prepare in sync.\n     * We only need to execute these operations on one of the pair.\n     * A: We don't want to do this on a blocking stream.\n     */\n    if( self->callbackMode && self->capture.pcm && self->playback.pcm )\n    {\n        int err = alsa_snd_pcm_link( self->capture.pcm, self->playback.pcm );\n        if( err == 0 )\n            self->pcmsSynced = 1;\n        else\n            PA_DEBUG(( \"%s: Unable to sync pcms: %s\\n\", __FUNCTION__, alsa_snd_strerror( err ) ));\n    }\n\n    {\n        unsigned long minFramesPerHostBuffer = PA_MIN( self->capture.pcm ? self->capture.framesPerPeriod : ULONG_MAX,\n            self->playback.pcm ? self->playback.framesPerPeriod : ULONG_MAX );\n        self->pollTimeout = CalculatePollTimeout( self, minFramesPerHostBuffer );    /* Period in msecs, rounded up */\n\n        /* Time before watchdog unthrottles realtime thread == 1/4 of period time in msecs */\n        /* self->threading.throttledSleepTime = (unsigned long) (minFramesPerHostBuffer / sampleRate / 4 * 1000); */\n    }\n\n    if( self->callbackMode )\n    {\n        /* If the user expects a certain number of frames per callback we will either have to rely on block adaption\n         * (framesPerHostBuffer is not an integer multiple of framesPerPeriod) or we can simply align the number\n         * of host buffer frames with what the user specified */\n        if( self->framesPerUserBuffer != paFramesPerBufferUnspecified )\n        {\n            /* self->alignFrames = 1; */\n\n            /* Unless the ratio between number of host and user buffer frames is an integer we will have to rely\n             * on block adaption */\n        /*\n            if( framesPerHostBuffer % framesPerPeriod != 0 || (self->capture.pcm && self->playback.pcm &&\n                        self->capture.framesPerPeriod != self->playback.framesPerPeriod) )\n                self->useBlockAdaption = 1;\n            else\n                self->alignFrames = 1;\n        */\n        }\n    }\n\nerror:\n    return result;\n}\n\nstatic PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,\n                           PaStream** s,\n                           const PaStreamParameters *inputParameters,\n                           const PaStreamParameters *outputParameters,\n                           double sampleRate,\n                           unsigned long framesPerBuffer,\n                           PaStreamFlags streamFlags,\n                           PaStreamCallback* callback,\n                           void *userData )\n{\n    PaError result = paNoError;\n    PaAlsaHostApiRepresentation *alsaHostApi = (PaAlsaHostApiRepresentation*)hostApi;\n    PaAlsaStream *stream = NULL;\n    PaSampleFormat hostInputSampleFormat = 0, hostOutputSampleFormat = 0;\n    PaSampleFormat inputSampleFormat = 0, outputSampleFormat = 0;\n    int numInputChannels = 0, numOutputChannels = 0;\n    PaTime inputLatency, outputLatency;\n    /* Operate with fixed host buffer size by default, since other modes will invariably lead to block adaption */\n    /* XXX: Use Bounded by default? Output tends to get stuttery with Fixed ... */\n    PaUtilHostBufferSizeMode hostBufferSizeMode = paUtilFixedHostBufferSize;\n\n    if( ( streamFlags & paPlatformSpecificFlags ) != 0 )\n        return paInvalidFlag;\n\n    if( inputParameters )\n    {\n        PA_ENSURE( ValidateParameters( inputParameters, hostApi, StreamDirection_In ) );\n\n        numInputChannels = inputParameters->channelCount;\n        inputSampleFormat = inputParameters->sampleFormat;\n    }\n    if( outputParameters )\n    {\n        PA_ENSURE( ValidateParameters( outputParameters, hostApi, StreamDirection_Out ) );\n\n        numOutputChannels = outputParameters->channelCount;\n        outputSampleFormat = outputParameters->sampleFormat;\n    }\n\n    /* XXX: Why do we support this anyway? */\n    if( framesPerBuffer == paFramesPerBufferUnspecified && getenv( \"PA_ALSA_PERIODSIZE\" ) != NULL )\n    {\n        PA_DEBUG(( \"%s: Getting framesPerBuffer (Alsa period-size) from environment\\n\", __FUNCTION__ ));\n        framesPerBuffer = atoi( getenv(\"PA_ALSA_PERIODSIZE\") );\n    }\n\n    PA_UNLESS( stream = (PaAlsaStream*)PaUtil_AllocateMemory( sizeof(PaAlsaStream) ), paInsufficientMemory );\n    PA_ENSURE( PaAlsaStream_Initialize( stream, alsaHostApi, inputParameters, outputParameters, sampleRate,\n                framesPerBuffer, callback, streamFlags, userData ) );\n\n    PA_ENSURE( PaAlsaStream_Configure( stream, inputParameters, outputParameters, sampleRate, framesPerBuffer,\n                &inputLatency, &outputLatency, &hostBufferSizeMode ) );\n    hostInputSampleFormat = stream->capture.hostSampleFormat | (!stream->capture.hostInterleaved ? paNonInterleaved : 0);\n    hostOutputSampleFormat = stream->playback.hostSampleFormat | (!stream->playback.hostInterleaved ? paNonInterleaved : 0);\n\n    PA_ENSURE( PaUtil_InitializeBufferProcessor( &stream->bufferProcessor,\n                    numInputChannels, inputSampleFormat, hostInputSampleFormat,\n                    numOutputChannels, outputSampleFormat, hostOutputSampleFormat,\n                    sampleRate, streamFlags, framesPerBuffer, stream->maxFramesPerHostBuffer,\n                    hostBufferSizeMode, callback, userData ) );\n\n    /* Ok, buffer processor is initialized, now we can deduce it's latency */\n    if( numInputChannels > 0 )\n        stream->streamRepresentation.streamInfo.inputLatency = inputLatency + (PaTime)(\n                PaUtil_GetBufferProcessorInputLatencyFrames( &stream->bufferProcessor ) / sampleRate);\n    if( numOutputChannels > 0 )\n        stream->streamRepresentation.streamInfo.outputLatency = outputLatency + (PaTime)(\n                PaUtil_GetBufferProcessorOutputLatencyFrames( &stream->bufferProcessor ) / sampleRate);\n\n    PA_DEBUG(( \"%s: Stream: framesPerBuffer = %lu, maxFramesPerHostBuffer = %lu, latency i=%f, o=%f\\n\", __FUNCTION__, framesPerBuffer, stream->maxFramesPerHostBuffer, stream->streamRepresentation.streamInfo.inputLatency, stream->streamRepresentation.streamInfo.outputLatency));\n\n    *s = (PaStream*)stream;\n\n    return result;\n\nerror:\n    if( stream )\n    {\n        PA_DEBUG(( \"%s: Stream in error, terminating\\n\", __FUNCTION__ ));\n        PaAlsaStream_Terminate( stream );\n    }\n\n    return result;\n}\n\nstatic PaError CloseStream( PaStream* s )\n{\n    PaError result = paNoError;\n    PaAlsaStream *stream = (PaAlsaStream*)s;\n\n    PaUtil_TerminateBufferProcessor( &stream->bufferProcessor );\n    PaUtil_TerminateStreamRepresentation( &stream->streamRepresentation );\n\n    PaAlsaStream_Terminate( stream );\n\n    return result;\n}\n\nstatic void SilenceBuffer( PaAlsaStream *stream )\n{\n    const snd_pcm_channel_area_t *areas;\n    snd_pcm_uframes_t frames = (snd_pcm_uframes_t)alsa_snd_pcm_avail_update( stream->playback.pcm ), offset;\n\n    alsa_snd_pcm_mmap_begin( stream->playback.pcm, &areas, &offset, &frames );\n    alsa_snd_pcm_areas_silence( areas, offset, stream->playback.numHostChannels, frames, stream->playback.nativeFormat );\n    alsa_snd_pcm_mmap_commit( stream->playback.pcm, offset, frames );\n}\n\n/** Start/prepare pcm(s) for streaming.\n *\n * Depending on whether the stream is in callback or blocking mode, we will respectively start or simply\n * prepare the playback pcm. If the buffer has _not_ been primed, we will in callback mode prepare and\n * silence the buffer before starting playback. In blocking mode we simply prepare, as the playback will\n * be started automatically as the user writes to output.\n *\n * The capture pcm, however, will simply be prepared and started.\n */\nstatic PaError AlsaStart( PaAlsaStream *stream, int priming )\n{\n    PaError result = paNoError;\n\n    if( stream->playback.pcm )\n    {\n        if( stream->callbackMode )\n        {\n            if( !priming )\n            {\n                /* Buffer isn't primed, so prepare and silence */\n                ENSURE_( alsa_snd_pcm_prepare( stream->playback.pcm ), paUnanticipatedHostError );\n                if( stream->playback.canMmap )\n                    SilenceBuffer( stream );\n            }\n            if( stream->playback.canMmap )\n                ENSURE_( alsa_snd_pcm_start( stream->playback.pcm ), paUnanticipatedHostError );\n        }\n        else\n            ENSURE_( alsa_snd_pcm_prepare( stream->playback.pcm ), paUnanticipatedHostError );\n    }\n    if( stream->capture.pcm && !stream->pcmsSynced )\n    {\n        ENSURE_( alsa_snd_pcm_prepare( stream->capture.pcm ), paUnanticipatedHostError );\n        /* For a blocking stream we want to start capture as well, since nothing will happen otherwise */\n        ENSURE_( alsa_snd_pcm_start( stream->capture.pcm ), paUnanticipatedHostError );\n    }\n\nend:\n    return result;\nerror:\n    goto end;\n}\n\n/** Utility function for determining if pcms are in running state.\n *\n */\n#if 0\nstatic int IsRunning( PaAlsaStream *stream )\n{\n    int result = 0;\n\n    PA_ENSURE( PaUnixMutex_Lock( &stream->stateMtx ) );\n    if( stream->capture.pcm )\n    {\n        snd_pcm_state_t capture_state = alsa_snd_pcm_state( stream->capture.pcm );\n\n        if( capture_state == SND_PCM_STATE_RUNNING || capture_state == SND_PCM_STATE_XRUN\n                || capture_state == SND_PCM_STATE_DRAINING )\n        {\n            result = 1;\n            goto end;\n        }\n    }\n\n    if( stream->playback.pcm )\n    {\n        snd_pcm_state_t playback_state = alsa_snd_pcm_state( stream->playback.pcm );\n\n        if( playback_state == SND_PCM_STATE_RUNNING || playback_state == SND_PCM_STATE_XRUN\n                || playback_state == SND_PCM_STATE_DRAINING )\n        {\n            result = 1;\n            goto end;\n        }\n    }\n\nend:\n    ASSERT_CALL_( PaUnixMutex_Unlock( &stream->stateMtx ), paNoError );\n    return result;\nerror:\n    goto error;\n}\n#endif\n\nstatic PaError StartStream( PaStream *s )\n{\n    PaError result = paNoError;\n    PaAlsaStream* stream = (PaAlsaStream*)s;\n    int streamStarted = 0;  /* So we can know whether we need to take the stream down */\n\n    /* Ready the processor */\n    PaUtil_ResetBufferProcessor( &stream->bufferProcessor );\n\n    /* Set now, so we can test for activity further down */\n    stream->isActive = 1;\n\n    if( stream->callbackMode )\n    {\n        PA_ENSURE( PaUnixThread_New( &stream->thread, &CallbackThreadFunc, stream, 1., stream->rtSched ) );\n    }\n    else\n    {\n        PA_ENSURE( AlsaStart( stream, 0 ) );\n        streamStarted = 1;\n    }\n\nend:\n    return result;\nerror:\n    if( streamStarted )\n    {\n        AbortStream( stream );\n    }\n    stream->isActive = 0;\n\n    goto end;\n}\n\n/** Stop PCM handle, either softly or abruptly.\n */\nstatic PaError AlsaStop( PaAlsaStream *stream, int abort )\n{\n    PaError result = paNoError;\n    /* XXX: alsa_snd_pcm_drain tends to lock up, avoid it until we find out more */\n    abort = 1;\n    /*\n    if( stream->capture.pcm && !strcmp( Pa_GetDeviceInfo( stream->capture.device )->name,\n                \"dmix\" ) )\n    {\n        abort = 1;\n    }\n    else if( stream->playback.pcm && !strcmp( Pa_GetDeviceInfo( stream->playback.device )->name,\n                \"dmix\" ) )\n    {\n        abort = 1;\n    }\n    */\n\n    if( abort )\n    {\n        if( stream->playback.pcm )\n        {\n            ENSURE_( alsa_snd_pcm_drop( stream->playback.pcm ), paUnanticipatedHostError );\n        }\n        if( stream->capture.pcm && !stream->pcmsSynced )\n        {\n            ENSURE_( alsa_snd_pcm_drop( stream->capture.pcm ), paUnanticipatedHostError );\n        }\n\n        PA_DEBUG(( \"%s: Dropped frames\\n\", __FUNCTION__ ));\n    }\n    else\n    {\n        if( stream->playback.pcm )\n        {\n            ENSURE_( alsa_snd_pcm_nonblock( stream->playback.pcm, 0 ), paUnanticipatedHostError );\n            if( alsa_snd_pcm_drain( stream->playback.pcm ) < 0 )\n            {\n                PA_DEBUG(( \"%s: Draining playback handle failed!\\n\", __FUNCTION__ ));\n            }\n        }\n        if( stream->capture.pcm && !stream->pcmsSynced )\n        {\n            /* We don't need to retrieve any remaining frames */\n            if( alsa_snd_pcm_drain( stream->capture.pcm ) < 0 )\n            {\n                PA_DEBUG(( \"%s: Draining capture handle failed!\\n\", __FUNCTION__ ));\n            }\n        }\n    }\n\nend:\n    return result;\nerror:\n    goto end;\n}\n\n/** Stop or abort stream.\n *\n * If a stream is in callback mode we will have to inspect whether the background thread has\n * finished, or we will have to take it out. In either case we join the thread before\n * returning. In blocking mode, we simply tell ALSA to stop abruptly (abort) or finish\n * buffers (drain)\n *\n * Stream will be considered inactive (!PaAlsaStream::isActive) after a call to this function\n */\nstatic PaError RealStop( PaAlsaStream *stream, int abort )\n{\n    PaError result = paNoError;\n\n    /* First deal with the callback thread, cancelling and/or joining\n     * it if necessary\n     */\n    if( stream->callbackMode )\n    {\n        PaError threadRes;\n        stream->callbackAbort = abort;\n\n        if( !abort )\n        {\n            PA_DEBUG(( \"Stopping callback\\n\" ));\n        }\n        PA_ENSURE( PaUnixThread_Terminate( &stream->thread, !abort, &threadRes ) );\n        if( threadRes != paNoError )\n        {\n            PA_DEBUG(( \"Callback thread returned: %d\\n\", threadRes ));\n        }\n#if 0\n        if( watchdogRes != paNoError )\n            PA_DEBUG(( \"Watchdog thread returned: %d\\n\", watchdogRes ));\n#endif\n\n        stream->callback_finished = 0;\n    }\n    else\n    {\n        PA_ENSURE( AlsaStop( stream, abort ) );\n    }\n\n    stream->isActive = 0;\n\nend:\n    return result;\n\nerror:\n    goto end;\n}\n\nstatic PaError StopStream( PaStream *s )\n{\n    return RealStop( (PaAlsaStream *) s, 0 );\n}\n\nstatic PaError AbortStream( PaStream *s )\n{\n    return RealStop( (PaAlsaStream * ) s, 1 );\n}\n\n/** The stream is considered stopped before StartStream, or AFTER a call to Abort/StopStream (callback\n * returning !paContinue is not considered)\n *\n */\nstatic PaError IsStreamStopped( PaStream *s )\n{\n    PaAlsaStream *stream = (PaAlsaStream *)s;\n\n    /* callback_finished indicates we need to join callback thread (ie. in Abort/StopStream) */\n    return !IsStreamActive( s ) && !stream->callback_finished;\n}\n\nstatic PaError IsStreamActive( PaStream *s )\n{\n    PaAlsaStream *stream = (PaAlsaStream*)s;\n    return stream->isActive;\n}\n\nstatic PaTime GetStreamTime( PaStream *s )\n{\n    PaAlsaStream *stream = (PaAlsaStream*)s;\n\n    snd_timestamp_t timestamp;\n    snd_pcm_status_t* status;\n    alsa_snd_pcm_status_alloca( &status );\n\n    /* TODO: what if we have both?  does it really matter? */\n\n    /* TODO: if running in callback mode, this will mean\n     * libasound routines are being called from multiple threads.\n     * need to verify that libasound is thread-safe. */\n\n    if( stream->capture.pcm )\n    {\n        alsa_snd_pcm_status( stream->capture.pcm, status );\n    }\n    else if( stream->playback.pcm )\n    {\n        alsa_snd_pcm_status( stream->playback.pcm, status );\n    }\n\n    alsa_snd_pcm_status_get_tstamp( status, &timestamp );\n    return timestamp.tv_sec + (PaTime)timestamp.tv_usec / 1e6;\n}\n\nstatic double GetStreamCpuLoad( PaStream* s )\n{\n    PaAlsaStream *stream = (PaAlsaStream*)s;\n\n    return PaUtil_GetCpuLoad( &stream->cpuLoadMeasurer );\n}\n\n/* Set the stream sample rate to a nominal value requested; allow only a defined tolerance range */\nstatic int SetApproximateSampleRate( snd_pcm_t *pcm, snd_pcm_hw_params_t *hwParams, double sampleRate )\n{\n    PaError result = paNoError;\n    unsigned int reqRate, setRate, deviation;\n\n    assert( pcm && hwParams );\n\n    /* The Alsa sample rate is set by integer value; also the actual rate may differ */\n    reqRate = setRate = (unsigned int) sampleRate;\n\n    ENSURE_( alsa_snd_pcm_hw_params_set_rate_near( pcm, hwParams, &setRate, NULL ), paUnanticipatedHostError );\n    /* The value actually set will be put in 'setRate' (may be way off); check the deviation as a proportion\n     * of the requested-rate with reference to the max-deviate-ratio (larger values allow less deviation) */\n    deviation = abs( (int)setRate - (int)reqRate );\n    if( deviation > 0 && deviation * RATE_MAX_DEVIATE_RATIO > reqRate )\n        result = paInvalidSampleRate;\n\nend:\n    return result;\n\nerror:\n    /* Log */\n    {\n        unsigned int _min = 0, _max = 0;\n        int _dir = 0;\n        ENSURE_( alsa_snd_pcm_hw_params_get_rate_min( hwParams, &_min, &_dir ), paUnanticipatedHostError );\n        _dir = 0;\n        ENSURE_( alsa_snd_pcm_hw_params_get_rate_max( hwParams, &_max, &_dir ), paUnanticipatedHostError );\n        PA_DEBUG(( \"%s: SR min = %u, max = %u, req = %u\\n\", __FUNCTION__, _min, _max, reqRate ));\n    }\n    goto end;\n}\n\n/* Return exact sample rate in param sampleRate */\nstatic int GetExactSampleRate( snd_pcm_hw_params_t *hwParams, double *sampleRate )\n{\n    unsigned int num, den = 1;\n    int err;\n\n    assert( hwParams );\n\n    err = alsa_snd_pcm_hw_params_get_rate_numden( hwParams, &num, &den );\n    *sampleRate = (double) num / den;\n\n    return err;\n}\n\n/* Utility functions for blocking/callback interfaces */\n\n/* Atomic restart of stream (we don't want the intermediate state visible) */\nstatic PaError AlsaRestart( PaAlsaStream *stream )\n{\n    PaError result = paNoError;\n\n    PA_ENSURE( PaUnixMutex_Lock( &stream->stateMtx ) );\n    PA_ENSURE( AlsaStop( stream, 0 ) );\n    PA_ENSURE( AlsaStart( stream, 0 ) );\n\n    PA_DEBUG(( \"%s: Restarted audio\\n\", __FUNCTION__ ));\n\nerror:\n    PA_ENSURE( PaUnixMutex_Unlock( &stream->stateMtx ) );\n\n    return result;\n}\n\n/** Recover from xrun state.\n *\n */\nstatic PaError PaAlsaStream_HandleXrun( PaAlsaStream *self )\n{\n    PaError result = paNoError;\n    snd_pcm_status_t *st;\n    PaTime now = PaUtil_GetTime();\n    snd_timestamp_t t;\n    int restartAlsa = 0; /* do not restart Alsa by default */\n\n    alsa_snd_pcm_status_alloca( &st );\n\n    if( self->playback.pcm )\n    {\n        alsa_snd_pcm_status( self->playback.pcm, st );\n        if( alsa_snd_pcm_status_get_state( st ) == SND_PCM_STATE_XRUN )\n        {\n            alsa_snd_pcm_status_get_trigger_tstamp( st, &t );\n            self->underrun = now * 1000 - ( (PaTime)t.tv_sec * 1000 + (PaTime)t.tv_usec / 1000 );\n\n            if( !self->playback.canMmap )\n            {\n                if( alsa_snd_pcm_recover( self->playback.pcm, -EPIPE, 0 ) < 0 )\n                {\n                    PA_DEBUG(( \"%s: [playback] non-MMAP-PCM failed recovering from XRUN, will restart Alsa\\n\", __FUNCTION__ ));\n                    ++ restartAlsa; /* did not manage to recover */\n                }\n            }\n            else\n                ++ restartAlsa; /* always restart MMAPed device */\n        }\n    }\n    if( self->capture.pcm )\n    {\n        alsa_snd_pcm_status( self->capture.pcm, st );\n        if( alsa_snd_pcm_status_get_state( st ) == SND_PCM_STATE_XRUN )\n        {\n            alsa_snd_pcm_status_get_trigger_tstamp( st, &t );\n            self->overrun = now * 1000 - ((PaTime) t.tv_sec * 1000 + (PaTime) t.tv_usec / 1000);\n\n            if (!self->capture.canMmap)\n            {\n                if (alsa_snd_pcm_recover( self->capture.pcm, -EPIPE, 0 ) < 0)\n                {\n                    PA_DEBUG(( \"%s: [capture] non-MMAP-PCM failed recovering from XRUN, will restart Alsa\\n\", __FUNCTION__ ));\n                    ++ restartAlsa; /* did not manage to recover */\n                }\n            }\n            else\n                ++ restartAlsa; /* always restart MMAPed device */\n        }\n    }\n\n    if( restartAlsa )\n    {\n        PA_DEBUG(( \"%s: restarting Alsa to recover from XRUN\\n\", __FUNCTION__ ));\n        PA_ENSURE( AlsaRestart( self ) );\n    }\n\nend:\n    return result;\nerror:\n    goto end;\n}\n\n/** Decide if we should continue polling for specified direction, eventually adjust the poll timeout.\n *\n */\nstatic PaError ContinuePoll( const PaAlsaStream *stream, StreamDirection streamDir, int *pollTimeout, int *continuePoll )\n{\n    PaError result = paNoError;\n    snd_pcm_sframes_t delay, margin;\n    int err;\n    const PaAlsaStreamComponent *component = NULL, *otherComponent = NULL;\n\n    *continuePoll = 1;\n\n    if( StreamDirection_In == streamDir )\n    {\n        component = &stream->capture;\n        otherComponent = &stream->playback;\n    }\n    else\n    {\n        component = &stream->playback;\n        otherComponent = &stream->capture;\n    }\n\n    /* ALSA docs say that negative delay should indicate xrun, but in my experience alsa_snd_pcm_delay returns -EPIPE */\n    if( ( err = alsa_snd_pcm_delay( otherComponent->pcm, &delay ) ) < 0 )\n    {\n        if( err == -EPIPE )\n        {\n            /* Xrun */\n            *continuePoll = 0;\n            goto error;\n        }\n\n        ENSURE_( err, paUnanticipatedHostError );\n    }\n\n    if( StreamDirection_Out == streamDir )\n    {\n        /* Number of eligible frames before capture overrun */\n        delay = otherComponent->alsaBufferSize - delay;\n    }\n    margin = delay - otherComponent->framesPerPeriod / 2;\n\n    if( margin < 0 )\n    {\n        PA_DEBUG(( \"%s: Stopping poll for %s\\n\", __FUNCTION__, StreamDirection_In == streamDir ? \"capture\" : \"playback\" ));\n        *continuePoll = 0;\n    }\n    else if( margin < otherComponent->framesPerPeriod )\n    {\n        *pollTimeout = CalculatePollTimeout( stream, margin );\n        PA_DEBUG(( \"%s: Trying to poll again for %s frames, pollTimeout: %d\\n\",\n                    __FUNCTION__, StreamDirection_In == streamDir ? \"capture\" : \"playback\", *pollTimeout ));\n    }\n\nerror:\n    return result;\n}\n\n/* Callback interface */\n\nstatic void OnExit( void *data )\n{\n    PaAlsaStream *stream = (PaAlsaStream *) data;\n\n    assert( data );\n\n    PaUtil_ResetCpuLoadMeasurer( &stream->cpuLoadMeasurer );\n\n    stream->callback_finished = 1;  /* Let the outside world know stream was stopped in callback */\n    PA_DEBUG(( \"%s: Stopping ALSA handles\\n\", __FUNCTION__ ));\n    AlsaStop( stream, stream->callbackAbort );\n\n    PA_DEBUG(( \"%s: Stoppage\\n\", __FUNCTION__ ));\n\n    /* Eventually notify user all buffers have played */\n    if( stream->streamRepresentation.streamFinishedCallback )\n    {\n        stream->streamRepresentation.streamFinishedCallback( stream->streamRepresentation.userData );\n    }\n    stream->isActive = 0;\n}\n\nstatic void CalculateTimeInfo( PaAlsaStream *stream, PaStreamCallbackTimeInfo *timeInfo )\n{\n    snd_pcm_status_t *capture_status, *playback_status;\n    snd_timestamp_t capture_timestamp, playback_timestamp;\n    PaTime capture_time = 0., playback_time = 0.;\n\n    alsa_snd_pcm_status_alloca( &capture_status );\n    alsa_snd_pcm_status_alloca( &playback_status );\n\n    if( stream->capture.pcm )\n    {\n        snd_pcm_sframes_t capture_delay;\n\n        alsa_snd_pcm_status( stream->capture.pcm, capture_status );\n        alsa_snd_pcm_status_get_tstamp( capture_status, &capture_timestamp );\n\n        capture_time = capture_timestamp.tv_sec +\n            ( (PaTime)capture_timestamp.tv_usec / 1000000.0 );\n        timeInfo->currentTime = capture_time;\n\n        capture_delay = alsa_snd_pcm_status_get_delay( capture_status );\n        timeInfo->inputBufferAdcTime = timeInfo->currentTime -\n            (PaTime)capture_delay / stream->streamRepresentation.streamInfo.sampleRate;\n    }\n    if( stream->playback.pcm )\n    {\n        snd_pcm_sframes_t playback_delay;\n\n        alsa_snd_pcm_status( stream->playback.pcm, playback_status );\n        alsa_snd_pcm_status_get_tstamp( playback_status, &playback_timestamp );\n\n        playback_time = playback_timestamp.tv_sec +\n            ((PaTime)playback_timestamp.tv_usec / 1000000.0);\n\n        if( stream->capture.pcm ) /* Full duplex */\n        {\n            /* Hmm, we have both a playback and a capture timestamp.\n             * Hopefully they are the same... */\n            if( fabs( capture_time - playback_time ) > 0.01 )\n                PA_DEBUG(( \"Capture time and playback time differ by %f\\n\", fabs( capture_time-playback_time ) ));\n        }\n        else\n            timeInfo->currentTime = playback_time;\n\n        playback_delay = alsa_snd_pcm_status_get_delay( playback_status );\n        timeInfo->outputBufferDacTime = timeInfo->currentTime +\n            (PaTime)playback_delay / stream->streamRepresentation.streamInfo.sampleRate;\n    }\n}\n\n/** Called after buffer processing is finished.\n *\n * A number of mmapped frames is committed, it is possible that an xrun has occurred in the meantime.\n *\n * @param numFrames The number of frames that has been processed\n * @param xrun Return whether an xrun has occurred\n */\nstatic PaError PaAlsaStreamComponent_EndProcessing( PaAlsaStreamComponent *self, unsigned long numFrames, int *xrun )\n{\n    PaError result = paNoError;\n    int res = 0;\n\n    /* @concern FullDuplex It is possible that only one direction is marked ready after polling, and processed\n     * afterwards\n     */\n    if( !self->ready )\n        goto end;\n\n    if( !self->canMmap && StreamDirection_Out == self->streamDir )\n    {\n        /* Play sound */\n        if( self->hostInterleaved )\n            res = alsa_snd_pcm_writei( self->pcm, self->nonMmapBuffer, numFrames );\n        else\n        {\n            void *bufs[self->numHostChannels];\n            int bufsize = alsa_snd_pcm_format_size( self->nativeFormat, self->framesPerPeriod + 1 );\n            unsigned char *buffer = self->nonMmapBuffer;\n            int i;\n            for( i = 0; i < self->numHostChannels; ++i )\n            {\n                bufs[i] = buffer;\n                buffer += bufsize;\n            }\n            res = alsa_snd_pcm_writen( self->pcm, bufs, numFrames );\n        }\n    }\n\n    if( self->canMmap )\n        res = alsa_snd_pcm_mmap_commit( self->pcm, self->offset, numFrames );\n\n    if( res == -EPIPE || res == -ESTRPIPE )\n    {\n        *xrun = 1;\n    }\n    else\n    {\n        ENSURE_( res, paUnanticipatedHostError );\n    }\n\nend:\nerror:\n    return result;\n}\n\n/* Extract buffer from channel area */\nstatic unsigned char *ExtractAddress( const snd_pcm_channel_area_t *area, snd_pcm_uframes_t offset )\n{\n    return (unsigned char *) area->addr + ( area->first + offset * area->step ) / 8;\n}\n\n/** Do necessary adaption between user and host channels.\n *\n    @concern ChannelAdaption Adapting between user and host channels can involve silencing unused channels and\n    duplicating mono information if host outputs come in pairs.\n */\nstatic PaError PaAlsaStreamComponent_DoChannelAdaption( PaAlsaStreamComponent *self, PaUtilBufferProcessor *bp, int numFrames )\n{\n    PaError result = paNoError;\n    unsigned char *p;\n    int i;\n    int unusedChans = self->numHostChannels - self->numUserChannels;\n    unsigned char *src, *dst;\n    int convertMono = ( self->numHostChannels % 2 ) == 0 && ( self->numUserChannels % 2 ) != 0;\n\n    assert( StreamDirection_Out == self->streamDir );\n\n    if( self->hostInterleaved )\n    {\n        int swidth = alsa_snd_pcm_format_size( self->nativeFormat, 1 );\n        unsigned char *buffer = self->canMmap ? ExtractAddress( self->channelAreas, self->offset ) : self->nonMmapBuffer;\n\n        /* Start after the last user channel */\n        p = buffer + self->numUserChannels * swidth;\n\n        if( convertMono )\n        {\n            /* Convert the last user channel into stereo pair */\n            src = buffer + ( self->numUserChannels - 1 ) * swidth;\n            for( i = 0; i < numFrames; ++i )\n            {\n                dst = src + swidth;\n                memcpy( dst, src, swidth );\n                src += self->numHostChannels * swidth;\n            }\n\n            /* Don't touch the channel we just wrote to */\n            p += swidth;\n            --unusedChans;\n        }\n\n        if( unusedChans > 0 )\n        {\n            /* Silence unused output channels */\n            for( i = 0; i < numFrames; ++i )\n            {\n                memset( p, 0, swidth * unusedChans );\n                p += self->numHostChannels * swidth;\n            }\n        }\n    }\n    else\n    {\n        /* We extract the last user channel */\n        if( convertMono )\n        {\n            ENSURE_( alsa_snd_pcm_area_copy( self->channelAreas + self->numUserChannels, self->offset, self->channelAreas +\n                    ( self->numUserChannels - 1 ), self->offset, numFrames, self->nativeFormat ), paUnanticipatedHostError );\n            --unusedChans;\n        }\n        if( unusedChans > 0 )\n        {\n            alsa_snd_pcm_areas_silence( self->channelAreas + ( self->numHostChannels - unusedChans ), self->offset, unusedChans, numFrames,\n                    self->nativeFormat );\n        }\n    }\n\nerror:\n    return result;\n}\n\nstatic PaError PaAlsaStream_EndProcessing( PaAlsaStream *self, unsigned long numFrames, int *xrunOccurred )\n{\n    PaError result = paNoError;\n    int xrun = 0;\n\n    if( self->capture.pcm )\n    {\n        PA_ENSURE( PaAlsaStreamComponent_EndProcessing( &self->capture, numFrames, &xrun ) );\n    }\n    if( self->playback.pcm )\n    {\n        if( self->playback.numHostChannels > self->playback.numUserChannels )\n        {\n            PA_ENSURE( PaAlsaStreamComponent_DoChannelAdaption( &self->playback, &self->bufferProcessor, numFrames ) );\n        }\n        PA_ENSURE( PaAlsaStreamComponent_EndProcessing( &self->playback, numFrames, &xrun ) );\n    }\n\nerror:\n    *xrunOccurred = xrun;\n    return result;\n}\n\n/** Update the number of available frames.\n *\n */\nstatic PaError PaAlsaStreamComponent_GetAvailableFrames( PaAlsaStreamComponent *self, unsigned long *numFrames, int *xrunOccurred )\n{\n    PaError result = paNoError;\n    snd_pcm_sframes_t framesAvail = alsa_snd_pcm_avail_update( self->pcm );\n    *xrunOccurred = 0;\n\n    if( -EPIPE == framesAvail )\n    {\n        *xrunOccurred = 1;\n        framesAvail = 0;\n    }\n    else\n    {\n        ENSURE_( framesAvail, paUnanticipatedHostError );\n    }\n\n    *numFrames = framesAvail;\n\nerror:\n    return result;\n}\n\n/** Fill in pollfd objects.\n */\nstatic PaError PaAlsaStreamComponent_BeginPolling( PaAlsaStreamComponent* self, struct pollfd* pfds )\n{\n    int nfds = alsa_snd_pcm_poll_descriptors( self->pcm, pfds, self->nfds );\n    /* If alsa returns anything else, like -EPIPE return */\n    if( nfds != self->nfds )\n    {\n        return paUnanticipatedHostError;\n    }\n    self->ready = 0;\n\n    return paNoError;\n}\n\n/** Examine results from poll().\n *\n * @param pfds pollfds to inspect\n * @param shouldPoll Should we continue to poll\n * @param xrun Has an xrun occurred\n */\nstatic PaError PaAlsaStreamComponent_EndPolling( PaAlsaStreamComponent* self, struct pollfd* pfds, int* shouldPoll, int* xrun )\n{\n    PaError result = paNoError;\n    unsigned short revents;\n\n    ENSURE_( alsa_snd_pcm_poll_descriptors_revents( self->pcm, pfds, self->nfds, &revents ), paUnanticipatedHostError );\n    if( revents != 0 )\n    {\n        if( revents & POLLERR )\n        {\n            *xrun = 1;\n        }\n        else if( revents & POLLHUP )\n        {\n            *xrun = 1;\n            PA_DEBUG(( \"%s: revents has POLLHUP, processing as XRUN\\n\", __FUNCTION__ ));\n        }\n        else\n            self->ready = 1;\n\n        *shouldPoll = 0;\n    }\n    else /* (A zero revent occurred) */\n        /* Work around an issue with Alsa older than 1.0.16 using some plugins (eg default with plug + dmix) where\n         * POLLIN or POLLOUT are zeroed by Alsa-lib if _mmap_avail() is a few frames short of avail_min at period\n         * boundary, possibly due to erratic dma interrupts at period boundary?  Treat as a valid event.\n         */\n        if( self->useReventFix )\n        {\n            self->ready = 1;\n            *shouldPoll = 0;\n        }\n\nerror:\n    return result;\n}\n\n/** Return the number of available frames for this stream.\n *\n * @concern FullDuplex The minimum available for the two directions is calculated, it might be desirable to ignore\n * one direction however (not marked ready from poll), so this is controlled by queryCapture and queryPlayback.\n *\n * @param queryCapture Check available for capture\n * @param queryPlayback Check available for playback\n * @param available The returned number of frames\n * @param xrunOccurred Return whether an xrun has occurred\n */\nstatic PaError PaAlsaStream_GetAvailableFrames( PaAlsaStream *self, int queryCapture, int queryPlayback, unsigned long\n        *available, int *xrunOccurred )\n{\n    PaError result = paNoError;\n    unsigned long captureFrames, playbackFrames;\n    *xrunOccurred = 0;\n\n    assert( queryCapture || queryPlayback );\n\n    if( queryCapture )\n    {\n        assert( self->capture.pcm );\n        PA_ENSURE( PaAlsaStreamComponent_GetAvailableFrames( &self->capture, &captureFrames, xrunOccurred ) );\n        if( *xrunOccurred )\n        {\n            goto end;\n        }\n    }\n    if( queryPlayback )\n    {\n        assert( self->playback.pcm );\n        PA_ENSURE( PaAlsaStreamComponent_GetAvailableFrames( &self->playback, &playbackFrames, xrunOccurred ) );\n        if( *xrunOccurred )\n        {\n            goto end;\n        }\n    }\n\n    if( queryCapture && queryPlayback )\n    {\n        *available = PA_MIN( captureFrames, playbackFrames );\n        /*PA_DEBUG((\"capture: %lu, playback: %lu, combined: %lu\\n\", captureFrames, playbackFrames, *available));*/\n    }\n    else if( queryCapture )\n    {\n        *available = captureFrames;\n    }\n    else\n    {\n        *available = playbackFrames;\n    }\n\nend:\nerror:\n    return result;\n}\n\n/** Wait for and report available buffer space from ALSA.\n *\n * Unless ALSA reports a minimum of frames available for I/O, we poll the ALSA filedescriptors for more.\n * Both of these operations can uncover xrun conditions.\n *\n * @concern Xruns Both polling and querying available frames can report an xrun condition.\n *\n * @param framesAvail Return the number of available frames\n * @param xrunOccurred Return whether an xrun has occurred\n */\nstatic PaError PaAlsaStream_WaitForFrames( PaAlsaStream *self, unsigned long *framesAvail, int *xrunOccurred )\n{\n    PaError result = paNoError;\n    int pollPlayback = self->playback.pcm != NULL, pollCapture = self->capture.pcm != NULL;\n    int pollTimeout = self->pollTimeout;\n    int xrun = 0, timeouts = 0;\n    int pollResults;\n\n    assert( self );\n    assert( framesAvail );\n\n    if( !self->callbackMode )\n    {\n        /* In blocking mode we will only wait if necessary */\n        PA_ENSURE( PaAlsaStream_GetAvailableFrames( self, self->capture.pcm != NULL, self->playback.pcm != NULL,\n                    framesAvail, &xrun ) );\n        if( xrun )\n        {\n            goto end;\n        }\n\n        if( *framesAvail > 0 )\n        {\n            /* Mark pcms ready from poll */\n            if( self->capture.pcm )\n                self->capture.ready = 1;\n            if( self->playback.pcm )\n                self->playback.ready = 1;\n\n            goto end;\n        }\n    }\n\n    while( pollPlayback || pollCapture )\n    {\n        int totalFds = 0;\n        struct pollfd *capturePfds = NULL, *playbackPfds = NULL;\n\n#ifdef PTHREAD_CANCELED\n        pthread_testcancel();\n#endif\n        if( pollCapture )\n        {\n            capturePfds = self->pfds;\n            PaError res = PaAlsaStreamComponent_BeginPolling( &self->capture, capturePfds );\n            if( res != paNoError)\n            {\n                xrun = 1;\n                goto end;\n            }\n            totalFds += self->capture.nfds;\n        }\n        if( pollPlayback )\n        {\n            /* self->pfds is in effect an array of fds; if necessary, index past the capture fds */\n            playbackPfds = self->pfds + (pollCapture ? self->capture.nfds : 0);\n            PaError res = PaAlsaStreamComponent_BeginPolling( &self->playback, playbackPfds );\n            if( res != paNoError)\n            {\n                xrun = 1;\n                goto end;\n            }\n            totalFds += self->playback.nfds;\n        }\n\n#ifdef PTHREAD_CANCELED\n        if( self->callbackMode )\n        {\n            /* To allow 'Abort' to terminate the callback thread, enable cancelability just for poll() (& disable after) */\n            pthread_setcancelstate( PTHREAD_CANCEL_ENABLE, NULL );\n        }\n#endif\n\n        pollResults = poll( self->pfds, totalFds, pollTimeout );\n\n#ifdef PTHREAD_CANCELED\n        if( self->callbackMode )\n        {\n            pthread_setcancelstate( PTHREAD_CANCEL_DISABLE, NULL );\n        }\n#endif\n\n        if( pollResults < 0 )\n        {\n            /*  XXX: Depend on preprocessor condition? */\n            if( errno == EINTR )\n            {\n                /* gdb */\n                Pa_Sleep( 1 ); /* avoid hot loop */\n                continue;\n            }\n\n            /* TODO: Add macro for checking system calls */\n            PA_ENSURE( paInternalError );\n        }\n        else if( pollResults == 0 )\n        {\n           /* Suspended, paused or failed device can provide 0 poll results. To avoid deadloop in such situation\n            * we simply run counter 'timeouts' which detects 0 poll result and accumulates. As soon as 2048 timouts (around 2 seconds)\n            * are achieved we simply fail function with paTimedOut to notify waiting methods that device is not capable\n            * of providing audio data anymore and needs some corresponding recovery action.\n            * Note that 'timeouts' is reset to 0 if poll() managed to return non 0 results.\n            */\n\n            /*PA_DEBUG(( \"%s: poll == 0 results, timed out, %d times left\\n\", __FUNCTION__, 2048 - timeouts ));*/\n            ++ timeouts;\n            if( timeouts > 1 ) /* sometimes device times out, but normally once, so we do not sleep any time */\n            {\n                Pa_Sleep( 1 ); /* avoid hot loop */\n            }\n            /* not else ! */\n            if( timeouts >= 2048 ) /* audio device not working, shall return error to notify waiters */\n            {\n                *framesAvail = 0; /* no frames available for processing */\n                xrun = 1; /* try recovering device */\n\n                PA_DEBUG(( \"%s: poll timed out\\n\", __FUNCTION__, timeouts ));\n                goto end;/*PA_ENSURE( paTimedOut );*/\n            }\n        }\n        else if( pollResults > 0 )\n        {\n            /* reset timouts counter */\n            timeouts = 0;\n\n            /* check the return status of our pfds */\n            if( pollCapture )\n            {\n                PA_ENSURE( PaAlsaStreamComponent_EndPolling( &self->capture, capturePfds, &pollCapture, &xrun ) );\n            }\n            if( pollPlayback )\n            {\n                PA_ENSURE( PaAlsaStreamComponent_EndPolling( &self->playback, playbackPfds, &pollPlayback, &xrun ) );\n            }\n            if( xrun )\n            {\n                break;\n            }\n        }\n\n        /* @concern FullDuplex If only one of two pcms is ready we may want to compromise between the two.\n         * If there is less than half a period's worth of samples left of frames in the other pcm's buffer we will\n         * stop polling.\n         */\n        if( self->capture.pcm && self->playback.pcm )\n        {\n            if( pollCapture && !pollPlayback )\n            {\n                PA_ENSURE( ContinuePoll( self, StreamDirection_In, &pollTimeout, &pollCapture ) );\n            }\n            else if( pollPlayback && !pollCapture )\n            {\n                PA_ENSURE( ContinuePoll( self, StreamDirection_Out, &pollTimeout, &pollPlayback ) );\n            }\n        }\n    }\n\n    if( !xrun )\n    {\n        /* Get the number of available frames for the pcms that are marked ready.\n         * @concern FullDuplex If only one direction is marked ready (from poll), the number of frames available for\n         * the other direction is returned. Output is normally preferred over capture however, so capture frames may be\n         * discarded to avoid overrun unless paNeverDropInput is specified.\n         */\n        int captureReady = self->capture.pcm ? self->capture.ready : 0,\n            playbackReady = self->playback.pcm ? self->playback.ready : 0;\n        PA_ENSURE( PaAlsaStream_GetAvailableFrames( self, captureReady, playbackReady, framesAvail, &xrun ) );\n\n        if( self->capture.pcm && self->playback.pcm )\n        {\n            if( !self->playback.ready && !self->neverDropInput )\n            {\n                /* Drop input, a period's worth */\n                assert( self->capture.ready );\n                PaAlsaStreamComponent_EndProcessing( &self->capture, PA_MIN( self->capture.framesPerPeriod,\n                            *framesAvail ), &xrun );\n                *framesAvail = 0;\n                self->capture.ready = 0;\n            }\n        }\n        else if( self->capture.pcm )\n            assert( self->capture.ready );\n        else\n            assert( self->playback.ready );\n    }\n\nend:\nerror:\n    if( xrun )\n    {\n        /* Recover from the xrun state */\n        PA_ENSURE( PaAlsaStream_HandleXrun( self ) );\n        *framesAvail = 0;\n    }\n    else\n    {\n        if( 0 != *framesAvail )\n        {\n            /* If we're reporting frames eligible for processing, one of the handles better be ready */\n            PA_UNLESS( self->capture.ready || self->playback.ready, paInternalError );\n        }\n    }\n    *xrunOccurred = xrun;\n\n    return result;\n}\n\n/** Register per-channel ALSA buffer information with buffer processor.\n *\n * Mmapped buffer space is acquired from ALSA, and registered with the buffer processor. Differences between the\n * number of host and user channels is taken into account.\n *\n * @param numFrames On entrance the number of requested frames, on exit the number of contiguously accessible frames.\n */\nstatic PaError PaAlsaStreamComponent_RegisterChannels( PaAlsaStreamComponent* self, PaUtilBufferProcessor* bp,\n        unsigned long* numFrames, int* xrun )\n{\n    PaError result = paNoError;\n    const snd_pcm_channel_area_t *areas, *area;\n    void (*setChannel)(PaUtilBufferProcessor *, unsigned int, void *, unsigned int) =\n        StreamDirection_In == self->streamDir ? PaUtil_SetInputChannel : PaUtil_SetOutputChannel;\n    unsigned char *buffer, *p;\n    int i;\n    unsigned long framesAvail;\n\n    /* This _must_ be called before mmap_begin */\n    PA_ENSURE( PaAlsaStreamComponent_GetAvailableFrames( self, &framesAvail, xrun ) );\n    if( *xrun )\n    {\n        *numFrames = 0;\n        goto end;\n    }\n\n    if( self->canMmap )\n    {\n        ENSURE_( alsa_snd_pcm_mmap_begin( self->pcm, &areas, &self->offset, numFrames ), paUnanticipatedHostError );\n        /* @concern ChannelAdaption Buffer address is recorded so we can do some channel adaption later */\n        self->channelAreas = (snd_pcm_channel_area_t *)areas;\n    }\n    else\n    {\n        unsigned int bufferSize = self->numHostChannels * alsa_snd_pcm_format_size( self->nativeFormat, *numFrames );\n        if( bufferSize > self->nonMmapBufferSize )\n        {\n            self->nonMmapBuffer = realloc( self->nonMmapBuffer, ( self->nonMmapBufferSize = bufferSize ) );\n            if( !self->nonMmapBuffer )\n            {\n                result = paInsufficientMemory;\n                goto error;\n            }\n        }\n    }\n\n    if( self->hostInterleaved )\n    {\n        int swidth = alsa_snd_pcm_format_size( self->nativeFormat, 1 );\n\n        p = buffer = self->canMmap ? ExtractAddress( areas, self->offset ) : self->nonMmapBuffer;\n        for( i = 0; i < self->numUserChannels; ++i )\n        {\n            /* We're setting the channels up to userChannels, but the stride will be hostChannels samples */\n            setChannel( bp, i, p, self->numHostChannels );\n            p += swidth;\n        }\n    }\n    else\n    {\n        if( self->canMmap )\n        {\n            for( i = 0; i < self->numUserChannels; ++i )\n            {\n                area = areas + i;\n                buffer = ExtractAddress( area, self->offset );\n                setChannel( bp, i, buffer, 1 );\n            }\n        }\n        else\n        {\n            unsigned int buf_per_ch_size = self->nonMmapBufferSize / self->numHostChannels;\n            buffer = self->nonMmapBuffer;\n            for( i = 0; i < self->numUserChannels; ++i )\n            {\n                setChannel( bp, i, buffer, 1 );\n                buffer += buf_per_ch_size;\n            }\n        }\n    }\n\n    if( !self->canMmap && StreamDirection_In == self->streamDir )\n    {\n        /* Read sound */\n        int res;\n        if( self->hostInterleaved )\n            res = alsa_snd_pcm_readi( self->pcm, self->nonMmapBuffer, *numFrames );\n        else\n        {\n            void *bufs[self->numHostChannels];\n            unsigned int buf_per_ch_size = self->nonMmapBufferSize / self->numHostChannels;\n            unsigned char *buffer = self->nonMmapBuffer;\n            int i;\n            for( i = 0; i < self->numHostChannels; ++i )\n            {\n                bufs[i] = buffer;\n                buffer += buf_per_ch_size;\n            }\n            res = alsa_snd_pcm_readn( self->pcm, bufs, *numFrames );\n        }\n        if( res == -EPIPE || res == -ESTRPIPE )\n        {\n            *xrun = 1;\n            *numFrames = 0;\n        }\n    }\n\nend:\nerror:\n    return result;\n}\n\n/** Initiate buffer processing.\n *\n * ALSA buffers are registered with the PA buffer processor and the buffer size (in frames) set.\n *\n * @concern FullDuplex If both directions are being processed, the minimum amount of frames for the two directions is\n * calculated.\n *\n * @param numFrames On entrance the number of available frames, on exit the number of received frames\n * @param xrunOccurred Return whether an xrun has occurred\n */\nstatic PaError PaAlsaStream_SetUpBuffers( PaAlsaStream* self, unsigned long* numFrames, int* xrunOccurred )\n{\n    PaError result = paNoError;\n    unsigned long captureFrames = ULONG_MAX, playbackFrames = ULONG_MAX, commonFrames = 0;\n    int xrun = 0;\n\n    if( *xrunOccurred )\n    {\n        *numFrames = 0;\n        return result;\n    }\n    /* If we got here at least one of the pcm's should be marked ready */\n    PA_UNLESS( self->capture.ready || self->playback.ready, paInternalError );\n\n    /* Extract per-channel ALSA buffer pointers and register them with the buffer processor.\n     * It is possible that a direction is not marked ready however, because it is out of sync with the other.\n     */\n    if( self->capture.pcm && self->capture.ready )\n    {\n        captureFrames = *numFrames;\n        PA_ENSURE( PaAlsaStreamComponent_RegisterChannels( &self->capture, &self->bufferProcessor, &captureFrames,\n                    &xrun ) );\n    }\n    if( self->playback.pcm && self->playback.ready )\n    {\n        playbackFrames = *numFrames;\n        PA_ENSURE( PaAlsaStreamComponent_RegisterChannels( &self->playback, &self->bufferProcessor, &playbackFrames,\n                    &xrun ) );\n    }\n    if( xrun )\n    {\n        /* Nothing more to do */\n        assert( 0 == commonFrames );\n        goto end;\n    }\n\n    commonFrames = PA_MIN( captureFrames, playbackFrames );\n    /* assert( commonFrames <= *numFrames ); */\n    if( commonFrames > *numFrames )\n    {\n        /* Hmmm ... how come there are more frames available than we requested!? Blah. */\n        PA_DEBUG(( \"%s: Common available frames are reported to be more than number requested: %lu, %lu, callbackMode: %d\\n\", __FUNCTION__,\n                    commonFrames, *numFrames, self->callbackMode ));\n        if( self->capture.pcm )\n        {\n            PA_DEBUG(( \"%s: captureFrames: %lu, capture.ready: %d\\n\", __FUNCTION__, captureFrames, self->capture.ready ));\n        }\n        if( self->playback.pcm )\n        {\n            PA_DEBUG(( \"%s: playbackFrames: %lu, playback.ready: %d\\n\", __FUNCTION__, playbackFrames, self->playback.ready ));\n        }\n\n        commonFrames = 0;\n        goto end;\n    }\n\n    /* Inform PortAudio of the number of frames we got.\n     * @concern FullDuplex We might be experiencing underflow in either end; if its an input underflow, we go on\n     * with output. If its output underflow however, depending on the paNeverDropInput flag, we may want to simply\n     * discard the excess input or call the callback with paOutputOverflow flagged.\n     */\n    if( self->capture.pcm )\n    {\n        if( self->capture.ready )\n        {\n            PaUtil_SetInputFrameCount( &self->bufferProcessor, commonFrames );\n        }\n        else\n        {\n            /* We have input underflow */\n            PaUtil_SetNoInput( &self->bufferProcessor );\n        }\n    }\n    if( self->playback.pcm )\n    {\n        if( self->playback.ready )\n        {\n            PaUtil_SetOutputFrameCount( &self->bufferProcessor, commonFrames );\n        }\n        else\n        {\n            /* We have output underflow, but keeping input data (paNeverDropInput) */\n            assert( self->neverDropInput );\n            assert( self->capture.pcm != NULL );\n            PA_DEBUG(( \"%s: Setting output buffers to NULL\\n\", __FUNCTION__ ));\n            PaUtil_SetNoOutput( &self->bufferProcessor );\n        }\n    }\n\nend:\n    *numFrames = commonFrames;\nerror:\n    if( xrun )\n    {\n        PA_ENSURE( PaAlsaStream_HandleXrun( self ) );\n        *numFrames = 0;\n    }\n    *xrunOccurred = xrun;\n\n    return result;\n}\n\n/** Callback thread's function.\n *\n * Roughly, the workflow can be described in the following way: The number of available frames that can be processed\n * directly is obtained from ALSA, we then request as much directly accessible memory as possible within this amount\n * from ALSA. The buffer memory is registered with the PA buffer processor and processing is carried out with\n * PaUtil_EndBufferProcessing. Finally, the number of processed frames is reported to ALSA. The processing can\n * happen in several iterations until we have consumed the known number of available frames (or an xrun is detected).\n */\nstatic void *CallbackThreadFunc( void *userData )\n{\n    PaError result = paNoError;\n    PaAlsaStream *stream = (PaAlsaStream*) userData;\n    PaStreamCallbackTimeInfo timeInfo = {0, 0, 0};\n    snd_pcm_sframes_t startThreshold = 0;\n    int callbackResult = paContinue;\n    PaStreamCallbackFlags cbFlags = 0;  /* We might want to keep state across iterations */\n    int streamStarted = 0;\n\n    assert( stream );\n    /* Not implemented */\n    assert( !stream->primeBuffers );\n\n    /* Execute OnExit when exiting */\n    pthread_cleanup_push( &OnExit, stream );\n#ifdef PTHREAD_CANCELED\n    /* 'Abort' will use thread cancellation to terminate the callback thread, but the Alsa-lib functions\n     * are NOT cancel-safe, (and can end up in an inconsistent state).  So, disable cancelability for\n     * the thread here, and just re-enable it for the poll() in PaAlsaStream_WaitForFrames(). */\n    pthread_testcancel();\n    pthread_setcancelstate( PTHREAD_CANCEL_DISABLE, NULL );\n#endif\n\n    /* @concern StreamStart If the output is being primed the output pcm needs to be prepared, otherwise the\n     * stream is started immediately. The latter involves signaling the waiting main thread.\n     */\n    if( stream->primeBuffers )\n    {\n        snd_pcm_sframes_t avail;\n\n        if( stream->playback.pcm )\n            ENSURE_( alsa_snd_pcm_prepare( stream->playback.pcm ), paUnanticipatedHostError );\n        if( stream->capture.pcm && !stream->pcmsSynced )\n            ENSURE_( alsa_snd_pcm_prepare( stream->capture.pcm ), paUnanticipatedHostError );\n\n        /* We can't be certain that the whole ring buffer is available for priming, but there should be\n         * at least one period */\n        avail = alsa_snd_pcm_avail_update( stream->playback.pcm );\n        startThreshold = avail - (avail % stream->playback.framesPerPeriod);\n        assert( startThreshold >= stream->playback.framesPerPeriod );\n    }\n    else\n    {\n        PA_ENSURE( PaUnixThread_PrepareNotify( &stream->thread ) );\n        /* Buffer will be zeroed */\n        PA_ENSURE( AlsaStart( stream, 0 ) );\n        PA_ENSURE( PaUnixThread_NotifyParent( &stream->thread ) );\n\n        streamStarted = 1;\n    }\n\n    while( 1 )\n    {\n        unsigned long framesAvail, framesGot;\n        int xrun = 0;\n\n#ifdef PTHREAD_CANCELED\n        pthread_testcancel();\n#endif\n\n        /* @concern StreamStop if the main thread has requested a stop and the stream has not been effectively\n         * stopped we signal this condition by modifying callbackResult (we'll want to flush buffered output).\n         */\n        if( PaUnixThread_StopRequested( &stream->thread ) && paContinue == callbackResult )\n        {\n            PA_DEBUG(( \"Setting callbackResult to paComplete\\n\" ));\n            callbackResult = paComplete;\n        }\n\n        if( paContinue != callbackResult )\n        {\n            stream->callbackAbort = ( paAbort == callbackResult );\n            if( stream->callbackAbort ||\n                    /** @concern BlockAdaption: Go on if adaption buffers are empty */\n                    PaUtil_IsBufferProcessorOutputEmpty( &stream->bufferProcessor ) )\n            {\n                goto end;\n            }\n\n            PA_DEBUG(( \"%s: Flushing buffer processor\\n\", __FUNCTION__ ));\n            /* There is still buffered output that needs to be processed */\n        }\n\n        /* Wait for data to become available, this comes down to polling the ALSA file descriptors until we have\n         * a number of available frames.\n         */\n        PA_ENSURE( PaAlsaStream_WaitForFrames( stream, &framesAvail, &xrun ) );\n        if( xrun )\n        {\n            assert( 0 == framesAvail );\n            continue;\n\n            /* XXX: Report xruns to the user? A situation is conceivable where the callback is never invoked due\n             * to constant xruns, it might be desirable to notify the user of this.\n             */\n        }\n\n        /* Consume buffer space. Once we have a number of frames available for consumption we must retrieve the\n         * mmapped buffers from ALSA, this is contiguously accessible memory however, so we may receive smaller\n         * portions at a time than is available as a whole. Therefore we should be prepared to process several\n         * chunks successively. The buffers are passed to the PA buffer processor.\n         */\n        while( framesAvail > 0 )\n        {\n            xrun = 0;\n\n            /** @concern Xruns Under/overflows are to be reported to the callback */\n            if( stream->underrun > 0.0 )\n            {\n                cbFlags |= paOutputUnderflow;\n                stream->underrun = 0.0;\n            }\n            if( stream->overrun > 0.0 )\n            {\n                cbFlags |= paInputOverflow;\n                stream->overrun = 0.0;\n            }\n            if( stream->capture.pcm && stream->playback.pcm )\n            {\n                /** @concern FullDuplex It's possible that only one direction is being processed to avoid an\n                 * under- or overflow, this should be reported correspondingly */\n                if( !stream->capture.ready )\n                {\n                    cbFlags |= paInputUnderflow;\n                    PA_DEBUG(( \"%s: Input underflow\\n\", __FUNCTION__ ));\n                }\n                else if( !stream->playback.ready )\n                {\n                    cbFlags |= paOutputOverflow;\n                    PA_DEBUG(( \"%s: Output overflow\\n\", __FUNCTION__ ));\n                }\n            }\n\n#if 0\n            CallbackUpdate( &stream->threading );\n#endif\n\n            CalculateTimeInfo( stream, &timeInfo );\n            PaUtil_BeginBufferProcessing( &stream->bufferProcessor, &timeInfo, cbFlags );\n            cbFlags = 0;\n\n            /* CPU load measurement should include processing activity external to the stream callback */\n            PaUtil_BeginCpuLoadMeasurement( &stream->cpuLoadMeasurer );\n\n            framesGot = framesAvail;\n            if( paUtilFixedHostBufferSize == stream->bufferProcessor.hostBufferSizeMode )\n            {\n                /* We've committed to a fixed host buffer size, stick to that */\n                framesGot = framesGot >= stream->maxFramesPerHostBuffer ? stream->maxFramesPerHostBuffer : 0;\n            }\n            else\n            {\n                /* We've committed to an upper bound on the size of host buffers */\n                assert( paUtilBoundedHostBufferSize == stream->bufferProcessor.hostBufferSizeMode );\n                framesGot = PA_MIN( framesGot, stream->maxFramesPerHostBuffer );\n            }\n            PA_ENSURE( PaAlsaStream_SetUpBuffers( stream, &framesGot, &xrun ) );\n            /* Check the host buffer size against the buffer processor configuration */\n            framesAvail -= framesGot;\n\n            if( framesGot > 0 )\n            {\n                assert( !xrun );\n                PaUtil_EndBufferProcessing( &stream->bufferProcessor, &callbackResult );\n                PA_ENSURE( PaAlsaStream_EndProcessing( stream, framesGot, &xrun ) );\n            }\n            PaUtil_EndCpuLoadMeasurement( &stream->cpuLoadMeasurer, framesGot );\n\n            if( 0 == framesGot )\n            {\n                /* Go back to polling for more frames */\n                break;\n            }\n\n            if( paContinue != callbackResult )\n                break;\n        }\n    }\n\nend:\n    ; /* Hack to fix \"label at end of compound statement\" error caused by pthread_cleanup_pop(1) macro. */\n    /* Match pthread_cleanup_push */\n    pthread_cleanup_pop( 1 );\n\n    PA_DEBUG(( \"%s: Thread %d exiting\\n \", __FUNCTION__, pthread_self() ));\n    PaUnixThreading_EXIT( result );\n\nerror:\n    PA_DEBUG(( \"%s: Thread %d is canceled due to error %d\\n \", __FUNCTION__, pthread_self(), result ));\n    goto end;\n}\n\n/* Blocking interface */\n\nstatic PaError ReadStream( PaStream* s, void *buffer, unsigned long frames )\n{\n    PaError result = paNoError;\n    PaAlsaStream *stream = (PaAlsaStream*)s;\n    unsigned long framesGot, framesAvail;\n    void *userBuffer;\n    snd_pcm_t *save = stream->playback.pcm;\n\n    assert( stream );\n\n    PA_UNLESS( stream->capture.pcm, paCanNotReadFromAnOutputOnlyStream );\n\n    /* Disregard playback */\n    stream->playback.pcm = NULL;\n\n    if( stream->overrun > 0. )\n    {\n        result = paInputOverflowed;\n        stream->overrun = 0.0;\n    }\n\n    if( stream->capture.userInterleaved )\n    {\n        userBuffer = buffer;\n    }\n    else\n    {\n        /* Copy channels into local array */\n        userBuffer = stream->capture.userBuffers;\n        memcpy( userBuffer, buffer, sizeof (void *) * stream->capture.numUserChannels );\n    }\n\n    /* Start stream if in prepared state */\n    if( alsa_snd_pcm_state( stream->capture.pcm ) == SND_PCM_STATE_PREPARED )\n    {\n        ENSURE_( alsa_snd_pcm_start( stream->capture.pcm ), paUnanticipatedHostError );\n    }\n\n    while( frames > 0 )\n    {\n        int xrun = 0;\n        PA_ENSURE( PaAlsaStream_WaitForFrames( stream, &framesAvail, &xrun ) );\n        framesGot = PA_MIN( framesAvail, frames );\n\n        PA_ENSURE( PaAlsaStream_SetUpBuffers( stream, &framesGot, &xrun ) );\n        if( framesGot > 0 )\n        {\n            framesGot = PaUtil_CopyInput( &stream->bufferProcessor, &userBuffer, framesGot );\n            PA_ENSURE( PaAlsaStream_EndProcessing( stream, framesGot, &xrun ) );\n            frames -= framesGot;\n        }\n    }\n\nend:\n    stream->playback.pcm = save;\n    return result;\nerror:\n    goto end;\n}\n\nstatic PaError WriteStream( PaStream* s, const void *buffer, unsigned long frames )\n{\n    PaError result = paNoError;\n    signed long err;\n    PaAlsaStream *stream = (PaAlsaStream*)s;\n    snd_pcm_uframes_t framesGot, framesAvail;\n    const void *userBuffer;\n    snd_pcm_t *save = stream->capture.pcm;\n\n    assert( stream );\n\n    PA_UNLESS( stream->playback.pcm, paCanNotWriteToAnInputOnlyStream );\n\n    /* Disregard capture */\n    stream->capture.pcm = NULL;\n\n    if( stream->underrun > 0. )\n    {\n        result = paOutputUnderflowed;\n        stream->underrun = 0.0;\n    }\n\n    if( stream->playback.userInterleaved )\n        userBuffer = buffer;\n    else /* Copy channels into local array */\n    {\n        userBuffer = stream->playback.userBuffers;\n        memcpy( (void *)userBuffer, buffer, sizeof (void *) * stream->playback.numUserChannels );\n    }\n\n    while( frames > 0 )\n    {\n        int xrun = 0;\n        snd_pcm_uframes_t hwAvail;\n\n        PA_ENSURE( PaAlsaStream_WaitForFrames( stream, &framesAvail, &xrun ) );\n        framesGot = PA_MIN( framesAvail, frames );\n\n        PA_ENSURE( PaAlsaStream_SetUpBuffers( stream, &framesGot, &xrun ) );\n        if( framesGot > 0 )\n        {\n            framesGot = PaUtil_CopyOutput( &stream->bufferProcessor, &userBuffer, framesGot );\n            PA_ENSURE( PaAlsaStream_EndProcessing( stream, framesGot, &xrun ) );\n            frames -= framesGot;\n        }\n\n        /* Start stream after one period of samples worth */\n\n        /* Frames residing in buffer */\n        PA_ENSURE( err = GetStreamWriteAvailable( stream ) );\n        framesAvail = err;\n        hwAvail = stream->playback.alsaBufferSize - framesAvail;\n\n        if( alsa_snd_pcm_state( stream->playback.pcm ) == SND_PCM_STATE_PREPARED &&\n                hwAvail >= stream->playback.framesPerPeriod )\n        {\n            ENSURE_( alsa_snd_pcm_start( stream->playback.pcm ), paUnanticipatedHostError );\n        }\n    }\n\nend:\n    stream->capture.pcm = save;\n    return result;\nerror:\n    goto end;\n}\n\n/* Return frames available for reading. In the event of an overflow, the capture pcm will be restarted */\nstatic signed long GetStreamReadAvailable( PaStream* s )\n{\n    PaError result = paNoError;\n    PaAlsaStream *stream = (PaAlsaStream*)s;\n    unsigned long avail;\n    int xrun;\n\n    PA_ENSURE( PaAlsaStreamComponent_GetAvailableFrames( &stream->capture, &avail, &xrun ) );\n    if( xrun )\n    {\n        PA_ENSURE( PaAlsaStream_HandleXrun( stream ) );\n        PA_ENSURE( PaAlsaStreamComponent_GetAvailableFrames( &stream->capture, &avail, &xrun ) );\n        if( xrun )\n            PA_ENSURE( paInputOverflowed );\n    }\n\n    return (signed long)avail;\n\nerror:\n    return result;\n}\n\nstatic signed long GetStreamWriteAvailable( PaStream* s )\n{\n    PaError result = paNoError;\n    PaAlsaStream *stream = (PaAlsaStream*)s;\n    unsigned long avail;\n    int xrun;\n\n    PA_ENSURE( PaAlsaStreamComponent_GetAvailableFrames( &stream->playback, &avail, &xrun ) );\n    if( xrun )\n    {\n        snd_pcm_sframes_t savail;\n\n        PA_ENSURE( PaAlsaStream_HandleXrun( stream ) );\n        savail = alsa_snd_pcm_avail_update( stream->playback.pcm );\n\n        /* savail should not contain -EPIPE now, since PaAlsaStream_HandleXrun will only prepare the pcm */\n        ENSURE_( savail, paUnanticipatedHostError );\n\n        avail = (unsigned long) savail;\n    }\n\n    return (signed long)avail;\n\nerror:\n    return result;\n}\n\n/* Extensions */\n\nvoid PaAlsa_InitializeStreamInfo( PaAlsaStreamInfo *info )\n{\n    info->size = sizeof (PaAlsaStreamInfo);\n    info->hostApiType = paALSA;\n    info->version = 1;\n    info->deviceString = NULL;\n}\n\nvoid PaAlsa_EnableRealtimeScheduling( PaStream *s, int enable )\n{\n    PaAlsaStream *stream = (PaAlsaStream *) s;\n    stream->rtSched = enable;\n}\n\n#if 0\nvoid PaAlsa_EnableWatchdog( PaStream *s, int enable )\n{\n    PaAlsaStream *stream = (PaAlsaStream *) s;\n    stream->thread.useWatchdog = enable;\n}\n#endif\n\nstatic PaError GetAlsaStreamPointer( PaStream* s, PaAlsaStream** stream )\n{\n    PaError result = paNoError;\n    PaUtilHostApiRepresentation* hostApi;\n    PaAlsaHostApiRepresentation* alsaHostApi;\n\n    PA_ENSURE( PaUtil_ValidateStreamPointer( s ) );\n    PA_ENSURE( PaUtil_GetHostApiRepresentation( &hostApi, paALSA ) );\n    alsaHostApi = (PaAlsaHostApiRepresentation*)hostApi;\n\n    PA_UNLESS( PA_STREAM_REP( s )->streamInterface == &alsaHostApi->callbackStreamInterface\n            || PA_STREAM_REP( s )->streamInterface == &alsaHostApi->blockingStreamInterface,\n        paIncompatibleStreamHostApi );\n\n    *stream = (PaAlsaStream*)s;\nerror:\n    return paNoError;\n}\n\nPaError PaAlsa_GetStreamInputCard( PaStream* s, int* card )\n{\n    PaAlsaStream *stream;\n    PaError result = paNoError;\n    snd_pcm_info_t* pcmInfo;\n\n    PA_ENSURE( GetAlsaStreamPointer( s, &stream ) );\n\n    /* XXX: More descriptive error? */\n    PA_UNLESS( stream->capture.pcm, paDeviceUnavailable );\n\n    alsa_snd_pcm_info_alloca( &pcmInfo );\n    PA_ENSURE( alsa_snd_pcm_info( stream->capture.pcm, pcmInfo ) );\n    *card = alsa_snd_pcm_info_get_card( pcmInfo );\n\nerror:\n    return result;\n}\n\nPaError PaAlsa_GetStreamOutputCard( PaStream* s, int* card )\n{\n    PaAlsaStream *stream;\n    PaError result = paNoError;\n    snd_pcm_info_t* pcmInfo;\n\n    PA_ENSURE( GetAlsaStreamPointer( s, &stream ) );\n\n    /* XXX: More descriptive error? */\n    PA_UNLESS( stream->playback.pcm, paDeviceUnavailable );\n\n    alsa_snd_pcm_info_alloca( &pcmInfo );\n    PA_ENSURE( alsa_snd_pcm_info( stream->playback.pcm, pcmInfo ) );\n    *card = alsa_snd_pcm_info_get_card( pcmInfo );\n\nerror:\n    return result;\n}\n\nPaError PaAlsa_SetRetriesBusy( int retries )\n{\n    busyRetries_ = retries;\n    return paNoError;\n}\n"
  },
  {
    "path": "thirdparty/portaudio/src/hostapi/asihpi/pa_linux_asihpi.c",
    "content": "/*\n * $Id:$\n * PortAudio Portable Real-Time Audio Library\n * Latest Version at: http://www.portaudio.com\n * AudioScience HPI implementation by Fred Gleason, Ludwig Schwardt and\n * Eliot Blennerhassett\n *\n * Copyright (c) 2003 Fred Gleason <fredg@salemradiolabs.com>\n * Copyright (c) 2005,2006 Ludwig Schwardt <schwardt@sun.ac.za>\n * Copyright (c) 2011 Eliot Blennerhassett <eblennerhassett@audioscience.com>\n *\n * Based on the Open Source API proposed by Ross Bencina\n * Copyright (c) 1999-2008 Ross Bencina, Phil Burk\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n/*\n * Modification History\n * 12/2003 - Initial version\n * 09/2005 - v19 version [rewrite]\n */\n\n/** @file\n @ingroup hostapi_src\n @brief Host API implementation supporting AudioScience cards\n        via the Linux HPI interface.\n\n <h3>Overview</h3>\n\n This is a PortAudio implementation for the AudioScience HPI Audio API\n on the Linux platform. AudioScience makes a range of audio adapters customised\n for the broadcasting industry, with support for both Windows and Linux.\n More information on their products can be found on their website:\n\n     http://www.audioscience.com\n\n Documentation for the HPI API can be found at:\n\n     http://www.audioscience.com/internet/download/sdk/hpi_usermanual_html/html/index.html\n\n The Linux HPI driver itself (a kernel module + library) can be downloaded from:\n\n     http://www.audioscience.com/internet/download/linux_drivers.htm\n\n <h3>Implementation strategy</h3>\n\n *Note* Ideally, AudioScience cards should be handled by the PortAudio ALSA\n implementation on Linux, as ALSA is the preferred Linux soundcard API. The existence\n of this host API implementation might therefore seem a bit flawed. Unfortunately, at\n the time of the creation of this implementation (June 2006), the PA ALSA implementation\n could not make use of the existing AudioScience ALSA driver. PA ALSA uses the\n \"memory-mapped\" (mmap) ALSA access mode to interact with the ALSA library, while the\n AudioScience ALSA driver only supports the \"read-write\" access mode. The appropriate\n solution to this problem is to add \"read-write\" support to PortAudio ALSA, thereby\n extending the range of soundcards it supports (AudioScience cards are not the only\n ones with this problem). Given the author's limited knowledge of ALSA and the\n simplicity of the HPI API, the second-best solution was born...\n\n The following mapping between HPI and PA was followed:\n HPI subsystem => PortAudio host API\n HPI adapter => nothing specific\n HPI stream => PortAudio device\n\n Each HPI stream is either input or output (not both), and can support\n different channel counts, sampling rates and sample formats. It is therefore\n a more natural fit to a PA device. A PA stream can therefore combine two\n HPI streams (one input and one output) into a \"full-duplex\" stream. These\n HPI streams can even be on different physical adapters. The two streams ought to be\n sample-synchronised when they reside on the same adapter, as most AudioScience adapters\n derive their ADC and DAC clocks from one master clock. When combining two adapters\n into one full-duplex stream, however, the use of a word clock connection between the\n adapters is strongly recommended.\n\n The HPI interface is inherently blocking, making use of read and write calls to\n transfer data between user buffers and driver buffers. The callback interface therefore\n requires a helper thread (\"callback engine\") which periodically transfers data (one thread\n per PA stream, in fact). The current implementation explicitly sleeps via Pa_Sleep() until\n enough samples can be transferred (select() or poll() would be better, but currently seems\n impossible...). The thread implementation makes use of the Unix thread helper functions\n and some pthread calls here and there. If a unified PA thread exists, this host API\n implementation might also compile on Windows, as this is the only real Linux-specific\n part of the code.\n\n There is no inherent fixed buffer size in the HPI interface, as in some other host APIs.\n The PortAudio implementation contains a buffer that is allocated during OpenStream and\n used to transfer data between the callback and the HPI driver buffer. The size of this\n buffer is quite flexible and is derived from latency suggestions and matched to the\n requested callback buffer size as far as possible. It can become quite huge, as the\n AudioScience cards are typically geared towards higher-latency applications and contain\n large hardware buffers.\n\n The HPI interface natively supports most common sample formats and sample rates (some\n conversion is done on the adapter itself).\n\n Stream time is measured based on the number of processed frames, which is adjusted by the\n number of frames currently buffered by the HPI driver.\n\n There is basic support for detecting overflow and underflow. The HPI interface does not\n explicitly indicate this, so thresholds on buffer levels are used in combination with\n stream state. Recovery from overflow and underflow is left to the PA client.\n\n Blocking streams are also implemented. It makes use of the same polling routines that\n the callback interface uses, in order to prevent the allocation of variable-sized\n buffers during reading and writing. The framesPerBuffer parameter is therefore still\n relevant, and this can be increased in the blocking case to improve efficiency.\n\n The implementation contains extensive reporting macros (slightly modified PA_ENSURE and\n PA_UNLESS versions) and a useful stream dump routine to provide debugging feedback.\n\n Output buffer priming via the user callback (i.e. paPrimeOutputBuffersUsingStreamCallback\n and friends) is not implemented yet. All output is primed with silence.\n */\n\n#include <unistd.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>          /* strlen() */\n#include <pthread.h>         /* pthreads and friends */\n#include <assert.h>          /* assert */\n#include <math.h>            /* ceil, floor */\n\n#include <asihpi/hpi.h>      /* HPI API */\n\n#include \"portaudio.h\"       /* PortAudio API */\n#include \"pa_util.h\"         /* PA_DEBUG, other small utilities */\n#include \"pa_unix_util.h\"    /* Unix threading utilities */\n#include \"pa_allocation.h\"   /* Group memory allocation */\n#include \"pa_hostapi.h\"      /* Host API structs */\n#include \"pa_stream.h\"       /* Stream interface structs */\n#include \"pa_cpuload.h\"      /* CPU load measurer */\n#include \"pa_process.h\"      /* Buffer processor */\n#include \"pa_converters.h\"   /* PaUtilZeroer */\n#include \"pa_debugprint.h\"\n\n/* -------------------------------------------------------------------------- */\n\n/*\n * Defines\n */\n\n/* Error reporting and assertions */\n\n/** Evaluate expression, and return on any PortAudio errors */\n#define PA_ENSURE_(expr) \\\n    do { \\\n        PaError paError = (expr); \\\n        if( UNLIKELY( paError < paNoError ) ) \\\n        { \\\n            PA_DEBUG(( \"Expression '\" #expr \"' failed in '\" __FILE__ \"', line: \" STRINGIZE( __LINE__ ) \"\\n\" )); \\\n            result = paError; \\\n            goto error; \\\n        } \\\n    } while (0);\n\n/** Assert expression, else return the provided PaError */\n#define PA_UNLESS_(expr, paError) \\\n    do { \\\n        if( UNLIKELY( (expr) == 0 ) ) \\\n        { \\\n            PA_DEBUG(( \"Expression '\" #expr \"' failed in '\" __FILE__ \"', line: \" STRINGIZE( __LINE__ ) \"\\n\" )); \\\n            result = (paError); \\\n            goto error; \\\n        } \\\n    } while( 0 );\n\n/** Check return value of HPI function, and map it to PaError */\n#define PA_ASIHPI_UNLESS_(expr, paError) \\\n    do { \\\n        hpi_err_t hpiError = (expr); \\\n        /* If HPI error occurred */ \\\n        if( UNLIKELY( hpiError ) ) \\\n        { \\\n        char szError[256]; \\\n        HPI_GetErrorText( hpiError, szError ); \\\n        PA_DEBUG(( \"HPI error %d occurred: %s\\n\", hpiError, szError )); \\\n        /* This message will always be displayed, even if debug info is disabled */ \\\n            PA_DEBUG(( \"Expression '\" #expr \"' failed in '\" __FILE__ \"', line: \" STRINGIZE( __LINE__ ) \"\\n\" )); \\\n            if( (paError) == paUnanticipatedHostError ) \\\n        { \\\n            PA_DEBUG(( \"Host error description: %s\\n\", szError )); \\\n            /* PaUtil_SetLastHostErrorInfo should only be used in the main thread */ \\\n            if( pthread_equal( pthread_self(), paUnixMainThread ) ) \\\n                { \\\n            PaUtil_SetLastHostErrorInfo( paInDevelopment, hpiError, szError ); \\\n                } \\\n        } \\\n        /* If paNoError is specified, continue as usual */ \\\n            /* (useful if you only want to print out the debug messages above) */ \\\n        if( (paError) < 0 ) \\\n        { \\\n            result = (paError); \\\n            goto error; \\\n        } \\\n        } \\\n    } while( 0 );\n\n/** Report HPI error code and text */\n#define PA_ASIHPI_REPORT_ERROR_(hpiErrorCode) \\\n    do { \\\n        char szError[256]; \\\n        HPI_GetErrorText( hpiError, szError ); \\\n        PA_DEBUG(( \"HPI error %d occurred: %s\\n\", hpiError, szError )); \\\n        /* PaUtil_SetLastHostErrorInfo should only be used in the main thread */ \\\n        if( pthread_equal( pthread_self(), paUnixMainThread ) ) \\\n    { \\\n        PaUtil_SetLastHostErrorInfo( paInDevelopment, (hpiErrorCode), szError ); \\\n    } \\\n    } while( 0 );\n\n/* Defaults */\n\n/** Sample formats available natively on AudioScience hardware */\n#define PA_ASIHPI_AVAILABLE_FORMATS_ (paFloat32 | paInt32 | paInt24 | paInt16 | paUInt8)\n/** Enable background bus mastering (BBM) for buffer transfers, if available (see HPI docs) */\n#define PA_ASIHPI_USE_BBM_ 1\n/** Minimum number of frames in HPI buffer (for either data or available space).\n If buffer contains less data/space, it indicates xrun or completion. */\n#define PA_ASIHPI_MIN_FRAMES_ 1152\n/** Minimum polling interval in milliseconds, which determines minimum host buffer size */\n#define PA_ASIHPI_MIN_POLLING_INTERVAL_ 10\n\n/* -------------------------------------------------------------------------- */\n\n/*\n * Structures\n */\n\n/** Host API global data */\ntypedef struct PaAsiHpiHostApiRepresentation\n{\n    /* PortAudio \"base class\" - keep the baseRep first! (C-style inheritance) */\n    PaUtilHostApiRepresentation baseHostApiRep;\n    PaUtilStreamInterface callbackStreamInterface;\n    PaUtilStreamInterface blockingStreamInterface;\n\n    PaUtilAllocationGroup *allocations;\n\n    /* implementation specific data goes here */\n\n    PaHostApiIndex hostApiIndex;\n}\nPaAsiHpiHostApiRepresentation;\n\n\n/** Device data */\ntypedef struct PaAsiHpiDeviceInfo\n{\n    /* PortAudio \"base class\" - keep the baseRep first! (C-style inheritance) */\n    /** Common PortAudio device information */\n    PaDeviceInfo baseDeviceInfo;\n\n    /* implementation specific data goes here */\n\n    /** Adapter index */\n    uint16_t adapterIndex;\n    /** Adapter model number (hex) */\n    uint16_t adapterType;\n    /** Adapter HW/SW version */\n    uint16_t adapterVersion;\n    /** Adapter serial number */\n    uint32_t adapterSerialNumber;\n    /** Stream number */\n    uint16_t streamIndex;\n    /** 0=Input, 1=Output (HPI streams are either input or output but not both) */\n    uint16_t streamIsOutput;\n}\nPaAsiHpiDeviceInfo;\n\n\n/** Stream state as defined by PortAudio.\n It seems that the host API implementation has to keep track of the PortAudio stream state.\n Please note that this is NOT the same as the state of the underlying HPI stream. By separating\n these two concepts, a lot of flexibility is gained. There is a rough match between the two,\n of course, but forcing a precise match is difficult. For example, HPI_STATE_DRAINED can occur\n during the Active state of PortAudio (due to underruns) and also during CallBackFinished in\n the case of an output stream. Similarly, HPI_STATE_STOPPED mostly coincides with the Stopped\n PortAudio state, by may also occur in the CallbackFinished state when recording is finished.\n\n Here is a rough match-up:\n\n PortAudio state   =>     HPI state\n ---------------          ---------\n Active            =>     HPI_STATE_RECORDING, HPI_STATE_PLAYING, (HPI_STATE_DRAINED)\n Stopped           =>     HPI_STATE_STOPPED\n CallbackFinished  =>     HPI_STATE_STOPPED, HPI_STATE_DRAINED */\ntypedef enum PaAsiHpiStreamState\n{\n    paAsiHpiStoppedState=0,\n    paAsiHpiActiveState=1,\n    paAsiHpiCallbackFinishedState=2\n}\nPaAsiHpiStreamState;\n\n\n/** Stream component data (associated with one direction, i.e. either input or output) */\ntypedef struct PaAsiHpiStreamComponent\n{\n    /** Device information (HPI handles, etc) */\n    PaAsiHpiDeviceInfo *hpiDevice;\n    /** Stream handle, as passed to HPI interface. */\n    hpi_handle_t hpiStream;\n    /** Stream format, as passed to HPI interface */\n    struct hpi_format hpiFormat;\n    /** Number of bytes per frame, derived from hpiFormat and saved for convenience */\n    uint32_t bytesPerFrame;\n    /** Size of hardware (on-card) buffer of stream in bytes */\n    uint32_t hardwareBufferSize;\n    /** Size of host (BBM) buffer of stream in bytes (if used) */\n    uint32_t hostBufferSize;\n    /** Upper limit on the utilization of output stream buffer (both hardware and host).\n     This prevents large latencies in an output-only stream with a potentially huge buffer\n     and a fast data generator, which would otherwise keep the hardware buffer filled to\n     capacity. See also the \"Hardware Buffering=off\" option in the AudioScience WAV driver. */\n    uint32_t outputBufferCap;\n    /** Sample buffer (halfway station between HPI and buffer processor) */\n    uint8_t *tempBuffer;\n    /** Sample buffer size, in bytes */\n    uint32_t tempBufferSize;\n}\nPaAsiHpiStreamComponent;\n\n\n/** Stream data */\ntypedef struct PaAsiHpiStream\n{\n    /* PortAudio \"base class\" - keep the baseRep first! (C-style inheritance) */\n    PaUtilStreamRepresentation baseStreamRep;\n    PaUtilCpuLoadMeasurer cpuLoadMeasurer;\n    PaUtilBufferProcessor bufferProcessor;\n\n    PaUtilAllocationGroup *allocations;\n\n    /* implementation specific data goes here */\n\n    /** Separate structs for input and output sides of stream */\n    PaAsiHpiStreamComponent *input, *output;\n\n    /** Polling interval (in milliseconds) */\n    uint32_t pollingInterval;\n    /** Are we running in callback mode? */\n    int callbackMode;\n    /** Number of frames to transfer at a time to/from HPI */\n    unsigned long maxFramesPerHostBuffer;\n    /** Indicates that the stream is in the paNeverDropInput mode */\n    int neverDropInput;\n    /** Contains copy of user buffers, used by blocking interface to transfer non-interleaved data.\n     It went here instead of to each stream component, as the stream component buffer setup in\n     PaAsiHpi_SetupBuffers doesn't know the stream details such as callbackMode.\n     (Maybe a problem later if ReadStream and WriteStream happens concurrently on same stream.) */\n    void **blockingUserBufferCopy;\n\n    /* Thread-related variables */\n\n    /** Helper thread which will deliver data to user callback */\n    PaUnixThread thread;\n    /** PortAudio stream state (Active/Stopped/CallbackFinished) */\n    volatile sig_atomic_t state;\n    /** Hard abort, i.e. drop frames? */\n    volatile sig_atomic_t callbackAbort;\n    /** True if stream stopped via exiting callback with paComplete/paAbort flag\n     (as opposed to explicit call to StopStream/AbortStream) */\n    volatile sig_atomic_t callbackFinished;\n}\nPaAsiHpiStream;\n\n\n/** Stream state information, collected together for convenience */\ntypedef struct PaAsiHpiStreamInfo\n{\n    /** HPI stream state (HPI_STATE_STOPPED, HPI_STATE_PLAYING, etc.) */\n    uint16_t state;\n    /** Size (in bytes) of recording/playback data buffer in HPI driver */\n    uint32_t bufferSize;\n    /** Amount of data (in bytes) available in the buffer */\n    uint32_t dataSize;\n    /** Number of frames played/recorded since last stream reset */\n    uint32_t frameCounter;\n    /** Amount of data (in bytes) in hardware (on-card) buffer.\n     This differs from dataSize if bus mastering (BBM) is used, which introduces another\n     driver-level buffer to which dataSize/bufferSize then refers. */\n    uint32_t auxDataSize;\n    /** Total number of data frames currently buffered by HPI driver (host + hw buffers) */\n    uint32_t totalBufferedData;\n    /** Size of immediately available data (for input) or space (for output) in frames.\n     This only checks the first-level buffer (typically host buffer). This amount can be\n     transferred immediately. */\n    uint32_t availableFrames;\n    /** Indicates that hardware buffer is getting too full */\n    int overflow;\n    /** Indicates that hardware buffer is getting too empty */\n    int underflow;\n}\nPaAsiHpiStreamInfo;\n\n/* -------------------------------------------------------------------------- */\n\n/*\n * Function prototypes\n */\n\n#ifdef __cplusplus\nextern \"C\"\n{\n#endif /* __cplusplus */\n\n    /* The only exposed function in the entire host API implementation */\n    PaError PaAsiHpi_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index );\n\n#ifdef __cplusplus\n}\n#endif /* __cplusplus */\n\nstatic void Terminate( struct PaUtilHostApiRepresentation *hostApi );\nstatic PaError IsFormatSupported( struct PaUtilHostApiRepresentation *hostApi,\n                                  const PaStreamParameters *inputParameters,\n                                  const PaStreamParameters *outputParameters,\n                                  double sampleRate );\n\n/* Stream prototypes */\nstatic PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,\n                           PaStream **s,\n                           const PaStreamParameters *inputParameters,\n                           const PaStreamParameters *outputParameters,\n                           double sampleRate,\n                           unsigned long framesPerBuffer,\n                           PaStreamFlags streamFlags,\n                           PaStreamCallback *streamCallback,\n                           void *userData );\nstatic PaError CloseStream( PaStream *s );\nstatic PaError StartStream( PaStream *s );\nstatic PaError StopStream( PaStream *s );\nstatic PaError AbortStream( PaStream *s );\nstatic PaError IsStreamStopped( PaStream *s );\nstatic PaError IsStreamActive( PaStream *s );\nstatic PaTime GetStreamTime( PaStream *s );\nstatic double GetStreamCpuLoad( PaStream *s );\n\n/* Blocking prototypes */\nstatic PaError ReadStream( PaStream *s, void *buffer, unsigned long frames );\nstatic PaError WriteStream( PaStream *s, const void *buffer, unsigned long frames );\nstatic signed long GetStreamReadAvailable( PaStream *s );\nstatic signed long GetStreamWriteAvailable( PaStream *s );\n\n/* Callback prototypes */\nstatic void *CallbackThreadFunc( void *userData );\n\n/* Functions specific to this API */\nstatic PaError PaAsiHpi_BuildDeviceList( PaAsiHpiHostApiRepresentation *hpiHostApi );\nstatic uint16_t PaAsiHpi_PaToHpiFormat( PaSampleFormat paFormat );\nstatic PaSampleFormat PaAsiHpi_HpiToPaFormat( uint16_t hpiFormat );\nstatic PaError PaAsiHpi_CreateFormat( struct PaUtilHostApiRepresentation *hostApi,\n                                      const PaStreamParameters *parameters, double sampleRate,\n                                      PaAsiHpiDeviceInfo **hpiDevice, struct hpi_format *hpiFormat );\nstatic PaError PaAsiHpi_OpenInput( struct PaUtilHostApiRepresentation *hostApi,\n                                   const PaAsiHpiDeviceInfo *hpiDevice, const struct hpi_format *hpiFormat,\n                                   hpi_handle_t *hpiStream );\nstatic PaError PaAsiHpi_OpenOutput( struct PaUtilHostApiRepresentation *hostApi,\n                                    const PaAsiHpiDeviceInfo *hpiDevice, const struct hpi_format *hpiFormat,\n                                    hpi_handle_t *hpiStream );\nstatic PaError PaAsiHpi_GetStreamInfo( PaAsiHpiStreamComponent *streamComp, PaAsiHpiStreamInfo *info );\nstatic void PaAsiHpi_StreamComponentDump( PaAsiHpiStreamComponent *streamComp, PaAsiHpiStream *stream );\nstatic void PaAsiHpi_StreamDump( PaAsiHpiStream *stream );\nstatic PaError PaAsiHpi_SetupBuffers( PaAsiHpiStreamComponent *streamComp, uint32_t pollingInterval,\n                                      unsigned long framesPerPaHostBuffer, PaTime suggestedLatency );\nstatic PaError PaAsiHpi_PrimeOutputWithSilence( PaAsiHpiStream *stream );\nstatic PaError PaAsiHpi_StartStream( PaAsiHpiStream *stream, int outputPrimed );\nstatic PaError PaAsiHpi_StopStream( PaAsiHpiStream *stream, int abort );\nstatic PaError PaAsiHpi_ExplicitStop( PaAsiHpiStream *stream, int abort );\nstatic void PaAsiHpi_OnThreadExit( void *userData );\nstatic PaError PaAsiHpi_WaitForFrames( PaAsiHpiStream *stream, unsigned long *framesAvail,\n                                       PaStreamCallbackFlags *cbFlags );\nstatic void PaAsiHpi_CalculateTimeInfo( PaAsiHpiStream *stream, PaStreamCallbackTimeInfo *timeInfo );\nstatic PaError PaAsiHpi_BeginProcessing( PaAsiHpiStream* stream, unsigned long* numFrames,\n        PaStreamCallbackFlags *cbFlags );\nstatic PaError PaAsiHpi_EndProcessing( PaAsiHpiStream *stream, unsigned long numFrames,\n                                       PaStreamCallbackFlags *cbFlags );\n\n/* ==========================================================================\n * ============================= IMPLEMENTATION =============================\n * ========================================================================== */\n\n/* --------------------------- Host API Interface --------------------------- */\n\n/** Enumerate all PA devices (= HPI streams).\n This compiles a list of all HPI adapters, and registers a PA device for each input and\n output stream it finds. Most errors are ignored, as missing or erroneous devices are\n simply skipped.\n\n @param hpiHostApi Pointer to HPI host API struct\n\n @return PortAudio error code (only paInsufficientMemory in practice)\n */\nstatic PaError PaAsiHpi_BuildDeviceList( PaAsiHpiHostApiRepresentation *hpiHostApi )\n{\n    PaError result = paNoError;\n    PaUtilHostApiRepresentation *hostApi = &hpiHostApi->baseHostApiRep;\n    PaHostApiInfo *baseApiInfo = &hostApi->info;\n    PaAsiHpiDeviceInfo *hpiDeviceList;\n    int numAdapters;\n    hpi_err_t hpiError = 0;\n    int i, j, deviceCount = 0, deviceIndex = 0;\n\n    assert( hpiHostApi );\n\n    /* Errors not considered critical here (subsystem may report 0 devices), but report them */\n    /* in debug mode. */\n    PA_ASIHPI_UNLESS_( HPI_SubSysGetNumAdapters( NULL, &numAdapters), paNoError );\n\n    for( i=0; i < numAdapters; ++i )\n    {\n        uint16_t inStreams, outStreams;\n        uint16_t version;\n        uint32_t serial;\n        uint16_t type;\n        uint32_t idx;\n\n        hpiError = HPI_SubSysGetAdapter(NULL, i, &idx, &type);\n        if (hpiError)\n            continue;\n\n        /* Try to open adapter */\n        hpiError = HPI_AdapterOpen( NULL, idx );\n        /* Report error and skip to next device on failure */\n        if( hpiError )\n        {\n            PA_ASIHPI_REPORT_ERROR_( hpiError );\n            continue;\n        }\n        hpiError = HPI_AdapterGetInfo( NULL, idx, &outStreams, &inStreams,\n                                       &version, &serial, &type );\n        /* Skip to next device on failure */\n        if( hpiError )\n        {\n            PA_ASIHPI_REPORT_ERROR_( hpiError );\n            continue;\n        }\n        else\n        {\n            /* Assign default devices if available and increment device count */\n            if( (baseApiInfo->defaultInputDevice == paNoDevice) && (inStreams > 0) )\n                baseApiInfo->defaultInputDevice = deviceCount;\n            deviceCount += inStreams;\n            if( (baseApiInfo->defaultOutputDevice == paNoDevice) && (outStreams > 0) )\n                baseApiInfo->defaultOutputDevice = deviceCount;\n            deviceCount += outStreams;\n        }\n    }\n\n    /* Register any discovered devices */\n    if( deviceCount > 0 )\n    {\n        /* Memory allocation */\n        PA_UNLESS_( hostApi->deviceInfos = (PaDeviceInfo**) PaUtil_GroupAllocateMemory(\n                                               hpiHostApi->allocations, sizeof(PaDeviceInfo*) * deviceCount ),\n                    paInsufficientMemory );\n        /* Allocate all device info structs in a contiguous block */\n        PA_UNLESS_( hpiDeviceList = (PaAsiHpiDeviceInfo*) PaUtil_GroupAllocateMemory(\n                                        hpiHostApi->allocations, sizeof(PaAsiHpiDeviceInfo) * deviceCount ),\n                    paInsufficientMemory );\n\n        /* Now query devices again for information */\n        for( i=0; i < numAdapters; ++i )\n        {\n            uint16_t inStreams, outStreams;\n            uint16_t version;\n            uint32_t serial;\n            uint16_t type;\n            uint32_t idx;\n\n            hpiError = HPI_SubSysGetAdapter( NULL, i, &idx, &type );\n            if (hpiError)\n                continue;\n\n            /* Assume adapter is still open from previous round */\n            hpiError = HPI_AdapterGetInfo( NULL, idx,\n                                           &outStreams, &inStreams, &version, &serial, &type );\n            /* Report error and skip to next device on failure */\n            if( hpiError )\n            {\n                PA_ASIHPI_REPORT_ERROR_( hpiError );\n                continue;\n            }\n            else\n            {\n                PA_DEBUG(( \"Found HPI Adapter ID=%4X Idx=%d #In=%d #Out=%d S/N=%d HWver=%c%d DSPver=%03d\\n\",\n                           type, idx, inStreams, outStreams, serial,\n                           ((version>>3)&0xf)+'A',                  /* Hw version major */\n                           version&0x7,                             /* Hw version minor */\n                           ((version>>13)*100)+((version>>7)&0x3f)  /* DSP code version */\n                         ));\n            }\n\n            /* First add all input streams as devices */\n            for( j=0; j < inStreams; ++j )\n            {\n                PaAsiHpiDeviceInfo *hpiDevice = &hpiDeviceList[deviceIndex];\n                PaDeviceInfo *baseDeviceInfo = &hpiDevice->baseDeviceInfo;\n                char srcName[72];\n                char *deviceName;\n\n                memset( hpiDevice, 0, sizeof(PaAsiHpiDeviceInfo) );\n                /* Set implementation-specific device details */\n                hpiDevice->adapterIndex = idx;\n                hpiDevice->adapterType = type;\n                hpiDevice->adapterVersion = version;\n                hpiDevice->adapterSerialNumber = serial;\n                hpiDevice->streamIndex = j;\n                hpiDevice->streamIsOutput = 0;\n                /* Set common PortAudio device stats */\n                baseDeviceInfo->structVersion = 2;\n                /* Make sure name string is owned by API info structure */\n                sprintf( srcName,\n                         \"Adapter %d (%4X) - Input Stream %d\", i+1, type, j+1 );\n                PA_UNLESS_( deviceName = (char *) PaUtil_GroupAllocateMemory(\n                                             hpiHostApi->allocations, strlen(srcName) + 1 ), paInsufficientMemory );\n                strcpy( deviceName, srcName );\n                baseDeviceInfo->name = deviceName;\n                baseDeviceInfo->hostApi = hpiHostApi->hostApiIndex;\n                baseDeviceInfo->maxInputChannels = HPI_MAX_CHANNELS;\n                baseDeviceInfo->maxOutputChannels = 0;\n                /* Default latency values for interactive performance */\n                baseDeviceInfo->defaultLowInputLatency = 0.01;\n                baseDeviceInfo->defaultLowOutputLatency = -1.0;\n                /* Default latency values for robust non-interactive applications (eg. playing sound files) */\n                baseDeviceInfo->defaultHighInputLatency = 0.2;\n                baseDeviceInfo->defaultHighOutputLatency = -1.0;\n                /* HPI interface can actually handle any sampling rate to 1 Hz accuracy,\n                * so this default is as good as any */\n                baseDeviceInfo->defaultSampleRate = 44100;\n\n                /* Store device in global PortAudio list */\n                hostApi->deviceInfos[deviceIndex++] = (PaDeviceInfo *) hpiDevice;\n            }\n\n            /* Now add all output streams as devices (I know, the repetition is painful) */\n            for( j=0; j < outStreams; ++j )\n            {\n                PaAsiHpiDeviceInfo *hpiDevice = &hpiDeviceList[deviceIndex];\n                PaDeviceInfo *baseDeviceInfo = &hpiDevice->baseDeviceInfo;\n                char srcName[72];\n                char *deviceName;\n\n                memset( hpiDevice, 0, sizeof(PaAsiHpiDeviceInfo) );\n                /* Set implementation-specific device details */\n                hpiDevice->adapterIndex = idx;\n                hpiDevice->adapterType = type;\n                hpiDevice->adapterVersion = version;\n                hpiDevice->adapterSerialNumber = serial;\n                hpiDevice->streamIndex = j;\n                hpiDevice->streamIsOutput = 1;\n                /* Set common PortAudio device stats */\n                baseDeviceInfo->structVersion = 2;\n                /* Make sure name string is owned by API info structure */\n                sprintf( srcName,\n                         \"Adapter %d (%4X) - Output Stream %d\", i+1, type, j+1 );\n                PA_UNLESS_( deviceName = (char *) PaUtil_GroupAllocateMemory(\n                                             hpiHostApi->allocations, strlen(srcName) + 1 ), paInsufficientMemory );\n                strcpy( deviceName, srcName );\n                baseDeviceInfo->name = deviceName;\n                baseDeviceInfo->hostApi = hpiHostApi->hostApiIndex;\n                baseDeviceInfo->maxInputChannels = 0;\n                baseDeviceInfo->maxOutputChannels = HPI_MAX_CHANNELS;\n                /* Default latency values for interactive performance. */\n                baseDeviceInfo->defaultLowInputLatency = -1.0;\n                baseDeviceInfo->defaultLowOutputLatency = 0.01;\n                /* Default latency values for robust non-interactive applications (eg. playing sound files). */\n                baseDeviceInfo->defaultHighInputLatency = -1.0;\n                baseDeviceInfo->defaultHighOutputLatency = 0.2;\n                /* HPI interface can actually handle any sampling rate to 1 Hz accuracy,\n                * so this default is as good as any */\n                baseDeviceInfo->defaultSampleRate = 44100;\n\n                /* Store device in global PortAudio list */\n                hostApi->deviceInfos[deviceIndex++] = (PaDeviceInfo *) hpiDevice;\n            }\n        }\n    }\n\n    /* Finally acknowledge checked devices */\n    baseApiInfo->deviceCount = deviceIndex;\n\nerror:\n    return result;\n}\n\n\n/** Initialize host API implementation.\n This is the only function exported beyond this file. It is called by PortAudio to initialize\n the host API. It stores API info, finds and registers all devices, and sets up callback and\n blocking interfaces.\n\n @param hostApi Pointer to host API struct\n\n @param hostApiIndex Index of current (HPI) host API\n\n @return PortAudio error code\n */\nPaError PaAsiHpi_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex hostApiIndex )\n{\n    PaError result = paNoError;\n    PaAsiHpiHostApiRepresentation *hpiHostApi = NULL;\n    PaHostApiInfo *baseApiInfo;\n\n    /* Try to initialize HPI subsystem */\n    if (!HPI_SubSysCreate())\n    {\n        /* the V19 development docs say that if an implementation\n         * detects that it cannot be used, it should return a NULL\n         * interface and paNoError */\n        PA_DEBUG(( \"Could not open HPI interface\\n\" ));\n\n        *hostApi = NULL;\n        return paNoError;\n    }\n    else\n    {\n        uint32_t hpiVersion;\n        PA_ASIHPI_UNLESS_( HPI_SubSysGetVersionEx( NULL, &hpiVersion ), paUnanticipatedHostError );\n        PA_DEBUG(( \"HPI interface v%d.%02d.%02d\\n\",\n                   hpiVersion >> 16,  (hpiVersion >> 8) & 0x0F, (hpiVersion & 0x0F) ));\n    }\n\n    /* Allocate host API structure */\n    PA_UNLESS_( hpiHostApi = (PaAsiHpiHostApiRepresentation*) PaUtil_AllocateMemory(\n                                 sizeof(PaAsiHpiHostApiRepresentation) ), paInsufficientMemory );\n    PA_UNLESS_( hpiHostApi->allocations = PaUtil_CreateAllocationGroup(), paInsufficientMemory );\n\n    hpiHostApi->hostApiIndex = hostApiIndex;\n\n    *hostApi = &hpiHostApi->baseHostApiRep;\n    baseApiInfo = &((*hostApi)->info);\n    /* Fill in common API details */\n    baseApiInfo->structVersion = 1;\n    baseApiInfo->type = paAudioScienceHPI;\n    baseApiInfo->name = \"AudioScience HPI\";\n    baseApiInfo->deviceCount = 0;\n    baseApiInfo->defaultInputDevice = paNoDevice;\n    baseApiInfo->defaultOutputDevice = paNoDevice;\n\n    PA_ENSURE_( PaAsiHpi_BuildDeviceList( hpiHostApi ) );\n\n    (*hostApi)->Terminate = Terminate;\n    (*hostApi)->OpenStream = OpenStream;\n    (*hostApi)->IsFormatSupported = IsFormatSupported;\n\n    PaUtil_InitializeStreamInterface( &hpiHostApi->callbackStreamInterface, CloseStream, StartStream,\n                                      StopStream, AbortStream, IsStreamStopped, IsStreamActive,\n                                      GetStreamTime, GetStreamCpuLoad,\n                                      PaUtil_DummyRead, PaUtil_DummyWrite,\n                                      PaUtil_DummyGetReadAvailable, PaUtil_DummyGetWriteAvailable );\n\n    PaUtil_InitializeStreamInterface( &hpiHostApi->blockingStreamInterface, CloseStream, StartStream,\n                                      StopStream, AbortStream, IsStreamStopped, IsStreamActive,\n                                      GetStreamTime, PaUtil_DummyGetCpuLoad,\n                                      ReadStream, WriteStream, GetStreamReadAvailable, GetStreamWriteAvailable );\n\n    /* Store identity of main thread */\n    PA_ENSURE_( PaUnixThreading_Initialize() );\n\n    return result;\nerror:\n    if (hpiHostApi)\n        PaUtil_FreeMemory( hpiHostApi );\n    return result;\n}\n\n\n/** Terminate host API implementation.\n This closes all HPI adapters and frees the HPI subsystem. It also frees the host API struct\n memory. It should be called once for every PaAsiHpi_Initialize call.\n\n @param Pointer to host API struct\n */\nstatic void Terminate( struct PaUtilHostApiRepresentation *hostApi )\n{\n    PaAsiHpiHostApiRepresentation *hpiHostApi = (PaAsiHpiHostApiRepresentation*)hostApi;\n    int i;\n    PaError result = paNoError;\n\n    if( hpiHostApi )\n    {\n        /* Get rid of HPI-specific structures */\n        uint16_t lastAdapterIndex = HPI_MAX_ADAPTERS;\n        /* Iterate through device list and close adapters */\n        for( i=0; i < hostApi->info.deviceCount; ++i )\n        {\n            PaAsiHpiDeviceInfo *hpiDevice = (PaAsiHpiDeviceInfo *) hostApi->deviceInfos[ i ];\n            /* Close adapter only if it differs from previous one */\n            if( hpiDevice->adapterIndex != lastAdapterIndex )\n            {\n                /* Ignore errors (report only during debugging) */\n                PA_ASIHPI_UNLESS_( HPI_AdapterClose( NULL,\n                                                     hpiDevice->adapterIndex ), paNoError );\n                lastAdapterIndex = hpiDevice->adapterIndex;\n            }\n        }\n        /* Finally dismantle HPI subsystem */\n        HPI_SubSysFree( NULL );\n\n        if( hpiHostApi->allocations )\n        {\n            PaUtil_FreeAllAllocations( hpiHostApi->allocations );\n            PaUtil_DestroyAllocationGroup( hpiHostApi->allocations );\n        }\n\n        PaUtil_FreeMemory( hpiHostApi );\n    }\nerror:\n    return;\n}\n\n\n/** Converts PortAudio sample format to equivalent HPI format.\n\n @param paFormat PortAudio sample format\n\n @return HPI sample format\n */\nstatic uint16_t PaAsiHpi_PaToHpiFormat( PaSampleFormat paFormat )\n{\n    /* Ignore interleaving flag */\n    switch( paFormat & ~paNonInterleaved )\n    {\n    case paFloat32:\n        return HPI_FORMAT_PCM32_FLOAT;\n\n    case paInt32:\n        return HPI_FORMAT_PCM32_SIGNED;\n\n    case paInt24:\n        return HPI_FORMAT_PCM24_SIGNED;\n\n    case paInt16:\n        return HPI_FORMAT_PCM16_SIGNED;\n\n    case paUInt8:\n        return HPI_FORMAT_PCM8_UNSIGNED;\n\n        /* Default is 16-bit signed */\n    case paInt8:\n    default:\n        return HPI_FORMAT_PCM16_SIGNED;\n    }\n}\n\n\n/** Converts HPI sample format to equivalent PortAudio format.\n\n @param paFormat HPI sample format\n\n @return PortAudio sample format\n */\nstatic PaSampleFormat PaAsiHpi_HpiToPaFormat( uint16_t hpiFormat )\n{\n    switch( hpiFormat )\n    {\n    case HPI_FORMAT_PCM32_FLOAT:\n        return paFloat32;\n\n    case HPI_FORMAT_PCM32_SIGNED:\n        return paInt32;\n\n    case HPI_FORMAT_PCM24_SIGNED:\n        return paInt24;\n\n    case HPI_FORMAT_PCM16_SIGNED:\n        return paInt16;\n\n    case HPI_FORMAT_PCM8_UNSIGNED:\n        return paUInt8;\n\n        /* Default is custom format (e.g. for HPI MP3 format) */\n    default:\n        return paCustomFormat;\n    }\n}\n\n\n/** Creates HPI format struct based on PortAudio parameters.\n This also does some checks to see whether the desired format is valid, and whether\n the device allows it. This only checks the format of one half (input or output) of the\n PortAudio stream.\n\n @param hostApi Pointer to host API struct\n\n @param parameters Pointer to stream parameter struct\n\n @param sampleRate Desired sample rate\n\n @param hpiDevice Pointer to HPI device struct\n\n @param hpiFormat Resulting HPI format returned here\n\n @return PortAudio error code (typically indicating a problem with stream format)\n */\nstatic PaError PaAsiHpi_CreateFormat( struct PaUtilHostApiRepresentation *hostApi,\n                                      const PaStreamParameters *parameters, double sampleRate,\n                                      PaAsiHpiDeviceInfo **hpiDevice, struct hpi_format *hpiFormat )\n{\n    int maxChannelCount = 0;\n    PaSampleFormat hostSampleFormat = 0;\n    hpi_err_t hpiError = 0;\n\n    /* Unless alternate device specification is supported, reject the use of\n       paUseHostApiSpecificDeviceSpecification */\n    if( parameters->device == paUseHostApiSpecificDeviceSpecification )\n        return paInvalidDevice;\n    else\n    {\n        assert( parameters->device < hostApi->info.deviceCount );\n        *hpiDevice = (PaAsiHpiDeviceInfo*) hostApi->deviceInfos[ parameters->device ];\n    }\n\n    /* Validate streamInfo - this implementation doesn't use custom stream info */\n    if( parameters->hostApiSpecificStreamInfo )\n        return paIncompatibleHostApiSpecificStreamInfo;\n\n    /* Check that device can support channel count */\n    if( (*hpiDevice)->streamIsOutput )\n    {\n        maxChannelCount = (*hpiDevice)->baseDeviceInfo.maxOutputChannels;\n    }\n    else\n    {\n        maxChannelCount = (*hpiDevice)->baseDeviceInfo.maxInputChannels;\n    }\n    if( (maxChannelCount == 0) || (parameters->channelCount > maxChannelCount) )\n        return paInvalidChannelCount;\n\n    /* All standard sample formats are supported by the buffer adapter,\n       and this implementation doesn't support any custom sample formats */\n    if( parameters->sampleFormat & paCustomFormat )\n        return paSampleFormatNotSupported;\n\n    /* Switch to closest HPI native format */\n    hostSampleFormat = PaUtil_SelectClosestAvailableFormat(PA_ASIHPI_AVAILABLE_FORMATS_,\n                       parameters->sampleFormat );\n    /* Setup format + info objects */\n    hpiError = HPI_FormatCreate( hpiFormat, (uint16_t)parameters->channelCount,\n                                 PaAsiHpi_PaToHpiFormat( hostSampleFormat ),\n                                 (uint32_t)sampleRate, 0, 0 );\n    if( hpiError )\n    {\n        PA_ASIHPI_REPORT_ERROR_( hpiError );\n        switch( hpiError )\n        {\n        case HPI_ERROR_INVALID_FORMAT:\n            return paSampleFormatNotSupported;\n\n        case HPI_ERROR_INVALID_SAMPLERATE:\n        case HPI_ERROR_INCOMPATIBLE_SAMPLERATE:\n            return paInvalidSampleRate;\n\n        case HPI_ERROR_INVALID_CHANNELS:\n            return paInvalidChannelCount;\n        }\n    }\n\n    return paNoError;\n}\n\n\n/** Open HPI input stream with given format.\n This attempts to open HPI input stream with desired format. If the format is not supported\n or the device is unavailable, the stream is closed and a PortAudio error code is returned.\n\n @param hostApi Pointer to host API struct\n\n @param hpiDevice Pointer to HPI device struct\n\n @param hpiFormat Pointer to HPI format struct\n\n @return PortAudio error code (typically indicating a problem with stream format or device)\n*/\nstatic PaError PaAsiHpi_OpenInput( struct PaUtilHostApiRepresentation *hostApi,\n                                   const PaAsiHpiDeviceInfo *hpiDevice, const struct hpi_format *hpiFormat,\n                                   hpi_handle_t *hpiStream )\n{\n    PaAsiHpiHostApiRepresentation *hpiHostApi = (PaAsiHpiHostApiRepresentation*)hostApi;\n    PaError result = paNoError;\n    hpi_err_t hpiError = 0;\n\n    /* Catch misplaced output devices, as they typically have 0 input channels */\n    PA_UNLESS_( !hpiDevice->streamIsOutput, paInvalidChannelCount );\n    /* Try to open input stream */\n    PA_ASIHPI_UNLESS_( HPI_InStreamOpen( NULL, hpiDevice->adapterIndex,\n                                         hpiDevice->streamIndex, hpiStream ), paDeviceUnavailable );\n    /* Set input format (checking it in the process) */\n    /* Could also use HPI_InStreamQueryFormat, but this economizes the process */\n    hpiError = HPI_InStreamSetFormat( NULL, *hpiStream, (struct hpi_format*)hpiFormat );\n    if( hpiError )\n    {\n        PA_ASIHPI_REPORT_ERROR_( hpiError );\n        PA_ASIHPI_UNLESS_( HPI_InStreamClose( NULL, *hpiStream ), paNoError );\n        switch( hpiError )\n        {\n        case HPI_ERROR_INVALID_FORMAT:\n            return paSampleFormatNotSupported;\n\n        case HPI_ERROR_INVALID_SAMPLERATE:\n        case HPI_ERROR_INCOMPATIBLE_SAMPLERATE:\n            return paInvalidSampleRate;\n\n        case HPI_ERROR_INVALID_CHANNELS:\n            return paInvalidChannelCount;\n\n        default:\n            /* In case anything else went wrong */\n            return paInvalidDevice;\n        }\n    }\n\nerror:\n    return result;\n}\n\n\n/** Open HPI output stream with given format.\n This attempts to open HPI output stream with desired format. If the format is not supported\n or the device is unavailable, the stream is closed and a PortAudio error code is returned.\n\n @param hostApi Pointer to host API struct\n\n @param hpiDevice Pointer to HPI device struct\n\n @param hpiFormat Pointer to HPI format struct\n\n @return PortAudio error code (typically indicating a problem with stream format or device)\n*/\nstatic PaError PaAsiHpi_OpenOutput( struct PaUtilHostApiRepresentation *hostApi,\n                                    const PaAsiHpiDeviceInfo *hpiDevice, const struct hpi_format *hpiFormat,\n                                    hpi_handle_t *hpiStream )\n{\n    PaAsiHpiHostApiRepresentation *hpiHostApi = (PaAsiHpiHostApiRepresentation*)hostApi;\n    PaError result = paNoError;\n    hpi_err_t hpiError = 0;\n\n    /* Catch misplaced input devices, as they typically have 0 output channels */\n    PA_UNLESS_( hpiDevice->streamIsOutput, paInvalidChannelCount );\n    /* Try to open output stream */\n    PA_ASIHPI_UNLESS_( HPI_OutStreamOpen( NULL, hpiDevice->adapterIndex,\n                                          hpiDevice->streamIndex, hpiStream ), paDeviceUnavailable );\n\n    /* Check output format (format is set on first write to output stream) */\n    hpiError = HPI_OutStreamQueryFormat( NULL, *hpiStream, (struct hpi_format*)hpiFormat );\n    if( hpiError )\n    {\n        PA_ASIHPI_REPORT_ERROR_( hpiError );\n        PA_ASIHPI_UNLESS_( HPI_OutStreamClose( NULL, *hpiStream ), paNoError );\n        switch( hpiError )\n        {\n        case HPI_ERROR_INVALID_FORMAT:\n            return paSampleFormatNotSupported;\n\n        case HPI_ERROR_INVALID_SAMPLERATE:\n        case HPI_ERROR_INCOMPATIBLE_SAMPLERATE:\n            return paInvalidSampleRate;\n\n        case HPI_ERROR_INVALID_CHANNELS:\n            return paInvalidChannelCount;\n\n        default:\n            /* In case anything else went wrong */\n            return paInvalidDevice;\n        }\n    }\n\nerror:\n    return result;\n}\n\n\n/** Checks whether the desired stream formats and devices are supported\n (for both input and output).\n This is done by actually opening the appropriate HPI streams and closing them again.\n\n @param hostApi Pointer to host API struct\n\n @param inputParameters Pointer to stream parameter struct for input side of stream\n\n @param outputParameters Pointer to stream parameter struct for output side of stream\n\n @param sampleRate Desired sample rate\n\n @return PortAudio error code (paFormatIsSupported on success)\n */\nstatic PaError IsFormatSupported( struct PaUtilHostApiRepresentation *hostApi,\n                                  const PaStreamParameters *inputParameters,\n                                  const PaStreamParameters *outputParameters,\n                                  double sampleRate )\n{\n    PaError result = paFormatIsSupported;\n    PaAsiHpiHostApiRepresentation *hpiHostApi = (PaAsiHpiHostApiRepresentation*)hostApi;\n    PaAsiHpiDeviceInfo *hpiDevice = NULL;\n    struct hpi_format hpiFormat;\n\n    /* Input stream */\n    if( inputParameters )\n    {\n        hpi_handle_t hpiStream;\n        PA_DEBUG(( \"%s: Checking input params: dev=%d, sr=%d, chans=%d, fmt=%d\\n\",\n                   __FUNCTION__, inputParameters->device, (int)sampleRate,\n                   inputParameters->channelCount, inputParameters->sampleFormat ));\n        /* Create and validate format */\n        PA_ENSURE_( PaAsiHpi_CreateFormat( hostApi, inputParameters, sampleRate,\n                                           &hpiDevice, &hpiFormat ) );\n        /* Open stream to further check format */\n        PA_ENSURE_( PaAsiHpi_OpenInput( hostApi, hpiDevice, &hpiFormat, &hpiStream ) );\n        /* Close stream again */\n        PA_ASIHPI_UNLESS_( HPI_InStreamClose( NULL, hpiStream ), paNoError );\n    }\n\n    /* Output stream */\n    if( outputParameters )\n    {\n        hpi_handle_t hpiStream;\n        PA_DEBUG(( \"%s: Checking output params: dev=%d, sr=%d, chans=%d, fmt=%d\\n\",\n                   __FUNCTION__, outputParameters->device, (int)sampleRate,\n                   outputParameters->channelCount, outputParameters->sampleFormat ));\n        /* Create and validate format */\n        PA_ENSURE_( PaAsiHpi_CreateFormat( hostApi, outputParameters, sampleRate,\n                                           &hpiDevice, &hpiFormat ) );\n        /* Open stream to further check format */\n        PA_ENSURE_( PaAsiHpi_OpenOutput( hostApi, hpiDevice, &hpiFormat, &hpiStream ) );\n        /* Close stream again */\n        PA_ASIHPI_UNLESS_( HPI_OutStreamClose( NULL, hpiStream ), paNoError );\n    }\n\nerror:\n    return result;\n}\n\n/* ---------------------------- Stream Interface ---------------------------- */\n\n/** Obtain HPI stream information.\n This obtains info such as stream state and available data/space in buffers. It also\n estimates whether an underflow or overflow occurred.\n\n @param streamComp Pointer to stream component (input or output) to query\n\n @param info Pointer to stream info struct that will contain result\n\n @return PortAudio error code (either paNoError, paDeviceUnavailable or paUnanticipatedHostError)\n */\nstatic PaError PaAsiHpi_GetStreamInfo( PaAsiHpiStreamComponent *streamComp, PaAsiHpiStreamInfo *info )\n{\n    PaError result = paDeviceUnavailable;\n    uint16_t state;\n    uint32_t bufferSize, dataSize, frameCounter, auxDataSize, threshold;\n    uint32_t hwBufferSize, hwDataSize;\n\n    assert( streamComp );\n    assert( info );\n\n    /* First blank the stream info struct, in case something goes wrong below.\n       This saves the caller from initializing the struct. */\n    info->state = 0;\n    info->bufferSize = 0;\n    info->dataSize = 0;\n    info->frameCounter = 0;\n    info->auxDataSize = 0;\n    info->totalBufferedData = 0;\n    info->availableFrames = 0;\n    info->underflow = 0;\n    info->overflow = 0;\n\n    if( streamComp->hpiDevice && streamComp->hpiStream )\n    {\n        /* Obtain detailed stream info (either input or output) */\n        if( streamComp->hpiDevice->streamIsOutput )\n        {\n            PA_ASIHPI_UNLESS_( HPI_OutStreamGetInfoEx( NULL,\n                               streamComp->hpiStream,\n                               &state, &bufferSize, &dataSize, &frameCounter,\n                               &auxDataSize ), paUnanticipatedHostError );\n        }\n        else\n        {\n            PA_ASIHPI_UNLESS_( HPI_InStreamGetInfoEx( NULL,\n                               streamComp->hpiStream,\n                               &state, &bufferSize, &dataSize, &frameCounter,\n                               &auxDataSize ), paUnanticipatedHostError );\n        }\n        /* Load stream info */\n        info->state = state;\n        info->bufferSize = bufferSize;\n        info->dataSize = dataSize;\n        info->frameCounter = frameCounter;\n        info->auxDataSize = auxDataSize;\n        /* Determine total buffered data */\n        info->totalBufferedData = dataSize;\n        if( streamComp->hostBufferSize > 0 )\n            info->totalBufferedData += auxDataSize;\n        info->totalBufferedData /= streamComp->bytesPerFrame;\n        /* Determine immediately available frames */\n        info->availableFrames = streamComp->hpiDevice->streamIsOutput ?\n                                bufferSize - dataSize : dataSize;\n        info->availableFrames /= streamComp->bytesPerFrame;\n        /* Minimum space/data required in buffers */\n        threshold = PA_MIN( streamComp->tempBufferSize,\n                            streamComp->bytesPerFrame * PA_ASIHPI_MIN_FRAMES_ );\n        /* Obtain hardware buffer stats first, to simplify things */\n        hwBufferSize = streamComp->hardwareBufferSize;\n        hwDataSize = streamComp->hostBufferSize > 0 ? auxDataSize : dataSize;\n        /* Underflow is a bit tricky */\n        info->underflow = streamComp->hpiDevice->streamIsOutput ?\n                          /* Stream seems to start in drained state sometimes, so ignore initial underflow */\n                          (frameCounter > 0) && ( (state == HPI_STATE_DRAINED) || (hwDataSize == 0) ) :\n                          /* Input streams check the first-level (host) buffer for underflow */\n                          (state != HPI_STATE_STOPPED) && (dataSize < threshold);\n        /* Check for overflow in second-level (hardware) buffer for both input and output */\n        info->overflow = (state != HPI_STATE_STOPPED) && (hwBufferSize - hwDataSize < threshold);\n\n        return paNoError;\n    }\n\nerror:\n    return result;\n}\n\n\n/** Display stream component information for debugging purposes.\n\n @param streamComp Pointer to stream component (input or output) to query\n\n @param stream Pointer to stream struct which contains the component above\n */\nstatic void PaAsiHpi_StreamComponentDump( PaAsiHpiStreamComponent *streamComp,\n        PaAsiHpiStream *stream )\n{\n    PaAsiHpiStreamInfo streamInfo;\n\n    assert( streamComp );\n    assert( stream );\n\n    /* Name of soundcard/device used by component */\n    PA_DEBUG(( \"device: %s\\n\", streamComp->hpiDevice->baseDeviceInfo.name ));\n    /* Unfortunately some overlap between input and output here */\n    if( streamComp->hpiDevice->streamIsOutput )\n    {\n        /* Settings on the user side (as experienced by user callback) */\n        PA_DEBUG(( \"user: %d-bit, %d \",\n                   8*stream->bufferProcessor.bytesPerUserOutputSample,\n                   stream->bufferProcessor.outputChannelCount));\n        if( stream->bufferProcessor.userOutputIsInterleaved )\n        {\n            PA_DEBUG(( \"interleaved channels, \" ));\n        }\n        else\n        {\n            PA_DEBUG(( \"non-interleaved channels, \" ));\n        }\n        PA_DEBUG(( \"%d frames/buffer, latency = %5.1f ms\\n\",\n                   stream->bufferProcessor.framesPerUserBuffer,\n                   1000*stream->baseStreamRep.streamInfo.outputLatency ));\n        /* Settings on the host side (internal to PortAudio host API) */\n        PA_DEBUG(( \"host: %d-bit, %d interleaved channels, %d frames/buffer \",\n                   8*stream->bufferProcessor.bytesPerHostOutputSample,\n                   stream->bufferProcessor.outputChannelCount,\n                   stream->bufferProcessor.framesPerHostBuffer ));\n    }\n    else\n    {\n        /* Settings on the user side (as experienced by user callback) */\n        PA_DEBUG(( \"user: %d-bit, %d \",\n                   8*stream->bufferProcessor.bytesPerUserInputSample,\n                   stream->bufferProcessor.inputChannelCount));\n        if( stream->bufferProcessor.userInputIsInterleaved )\n        {\n            PA_DEBUG(( \"interleaved channels, \" ));\n        }\n        else\n        {\n            PA_DEBUG(( \"non-interleaved channels, \" ));\n        }\n        PA_DEBUG(( \"%d frames/buffer, latency = %5.1f ms\\n\",\n                   stream->bufferProcessor.framesPerUserBuffer,\n                   1000*stream->baseStreamRep.streamInfo.inputLatency ));\n        /* Settings on the host side (internal to PortAudio host API) */\n        PA_DEBUG(( \"host: %d-bit, %d interleaved channels, %d frames/buffer \",\n                   8*stream->bufferProcessor.bytesPerHostInputSample,\n                   stream->bufferProcessor.inputChannelCount,\n                   stream->bufferProcessor.framesPerHostBuffer ));\n    }\n    switch( stream->bufferProcessor.hostBufferSizeMode )\n    {\n    case paUtilFixedHostBufferSize:\n        PA_DEBUG(( \"[fixed] \" ));\n        break;\n    case paUtilBoundedHostBufferSize:\n        PA_DEBUG(( \"[bounded] \" ));\n        break;\n    case paUtilUnknownHostBufferSize:\n        PA_DEBUG(( \"[unknown] \" ));\n        break;\n    case paUtilVariableHostBufferSizePartialUsageAllowed:\n        PA_DEBUG(( \"[variable] \" ));\n        break;\n    }\n    PA_DEBUG(( \"(%d max)\\n\", streamComp->tempBufferSize / streamComp->bytesPerFrame ));\n    /* HPI hardware settings */\n    PA_DEBUG(( \"HPI: adapter %d stream %d, %d-bit, %d-channel, %d Hz\\n\",\n               streamComp->hpiDevice->adapterIndex, streamComp->hpiDevice->streamIndex,\n               8 * streamComp->bytesPerFrame / streamComp->hpiFormat.wChannels,\n               streamComp->hpiFormat.wChannels,\n               streamComp->hpiFormat.dwSampleRate ));\n    /* Stream state and buffer levels */\n    PA_DEBUG(( \"HPI: \" ));\n    PaAsiHpi_GetStreamInfo( streamComp, &streamInfo );\n    switch( streamInfo.state )\n    {\n    case HPI_STATE_STOPPED:\n        PA_DEBUG(( \"[STOPPED] \" ));\n        break;\n    case HPI_STATE_PLAYING:\n        PA_DEBUG(( \"[PLAYING] \" ));\n        break;\n    case HPI_STATE_RECORDING:\n        PA_DEBUG(( \"[RECORDING] \" ));\n        break;\n    case HPI_STATE_DRAINED:\n        PA_DEBUG(( \"[DRAINED] \" ));\n        break;\n    default:\n        PA_DEBUG(( \"[unknown state] \" ));\n        break;\n    }\n    if( streamComp->hostBufferSize )\n    {\n        PA_DEBUG(( \"host = %d/%d B, \", streamInfo.dataSize, streamComp->hostBufferSize ));\n        PA_DEBUG(( \"hw = %d/%d (%d) B, \", streamInfo.auxDataSize,\n                   streamComp->hardwareBufferSize, streamComp->outputBufferCap ));\n    }\n    else\n    {\n        PA_DEBUG(( \"hw = %d/%d B, \", streamInfo.dataSize, streamComp->hardwareBufferSize ));\n    }\n    PA_DEBUG(( \"count = %d\", streamInfo.frameCounter ));\n    if( streamInfo.overflow )\n    {\n        PA_DEBUG(( \" [overflow]\" ));\n    }\n    else if( streamInfo.underflow )\n    {\n        PA_DEBUG(( \" [underflow]\" ));\n    }\n    PA_DEBUG(( \"\\n\" ));\n}\n\n\n/** Display stream information for debugging purposes.\n\n @param stream Pointer to stream to query\n */\nstatic void PaAsiHpi_StreamDump( PaAsiHpiStream *stream )\n{\n    assert( stream );\n\n    PA_DEBUG(( \"\\n------------------------- STREAM INFO FOR %p ---------------------------\\n\", stream ));\n    /* General stream info (input+output) */\n    if( stream->baseStreamRep.streamCallback )\n    {\n        PA_DEBUG(( \"[callback] \" ));\n    }\n    else\n    {\n        PA_DEBUG(( \"[blocking] \" ));\n    }\n    PA_DEBUG(( \"sr=%d Hz, poll=%d ms, max %d frames/buf \",\n               (int)stream->baseStreamRep.streamInfo.sampleRate,\n               stream->pollingInterval, stream->maxFramesPerHostBuffer ));\n    switch( stream->state )\n    {\n    case paAsiHpiStoppedState:\n        PA_DEBUG(( \"[stopped]\\n\" ));\n        break;\n    case paAsiHpiActiveState:\n        PA_DEBUG(( \"[active]\\n\" ));\n        break;\n    case paAsiHpiCallbackFinishedState:\n        PA_DEBUG(( \"[cb fin]\\n\" ));\n        break;\n    default:\n        PA_DEBUG(( \"[unknown state]\\n\" ));\n        break;\n    }\n    if( stream->callbackMode )\n    {\n        PA_DEBUG(( \"cb info: thread=%p, cbAbort=%d, cbFinished=%d\\n\",\n                   stream->thread.thread, stream->callbackAbort, stream->callbackFinished ));\n    }\n\n    PA_DEBUG(( \"----------------------------------- Input  ------------------------------------\\n\" ));\n    if( stream->input )\n    {\n        PaAsiHpi_StreamComponentDump( stream->input, stream );\n    }\n    else\n    {\n        PA_DEBUG(( \"*none*\\n\" ));\n    }\n\n    PA_DEBUG(( \"----------------------------------- Output ------------------------------------\\n\" ));\n    if( stream->output )\n    {\n        PaAsiHpi_StreamComponentDump( stream->output, stream );\n    }\n    else\n    {\n        PA_DEBUG(( \"*none*\\n\" ));\n    }\n    PA_DEBUG(( \"-------------------------------------------------------------------------------\\n\\n\" ));\n\n}\n\n\n/** Determine buffer sizes and allocate appropriate stream buffers.\n This attempts to allocate a BBM (host) buffer for the HPI stream component (either input\n or output, as both have similar buffer needs). Not all AudioScience adapters support BBM,\n in which case the hardware buffer has to suffice. The size of the HPI host buffer is chosen\n as a multiple of framesPerPaHostBuffer, and also influenced by the suggested latency and the\n estimated minimum polling interval. The HPI host and hardware buffer sizes are stored, and an\n appropriate cap for the hardware buffer is also calculated. Finally, the temporary stream\n buffer which serves as the PortAudio host buffer for this implementation is allocated.\n This buffer contains an integer number of user buffers, to simplify buffer adaption in the\n buffer processor. The function returns paBufferTooBig if the HPI interface cannot allocate\n an HPI host buffer of the desired size.\n\n @param streamComp Pointer to stream component struct\n\n @param pollingInterval Polling interval for stream, in milliseconds\n\n @param framesPerPaHostBuffer Size of PortAudio host buffer, in frames\n\n @param suggestedLatency Suggested latency for stream component, in seconds\n\n @return PortAudio error code (possibly paBufferTooBig or paInsufficientMemory)\n */\nstatic PaError PaAsiHpi_SetupBuffers( PaAsiHpiStreamComponent *streamComp, uint32_t pollingInterval,\n                                      unsigned long framesPerPaHostBuffer, PaTime suggestedLatency )\n{\n    PaError result = paNoError;\n    PaAsiHpiStreamInfo streamInfo;\n    unsigned long hpiBufferSize = 0, paHostBufferSize = 0;\n\n    assert( streamComp );\n    assert( streamComp->hpiDevice );\n\n    /* Obtain size of hardware buffer of HPI stream, since we will be activating BBM shortly\n       and afterwards the buffer size will refer to the BBM (host-side) buffer.\n       This is necessary to enable reliable detection of xruns. */\n    PA_ENSURE_( PaAsiHpi_GetStreamInfo( streamComp, &streamInfo ) );\n    streamComp->hardwareBufferSize = streamInfo.bufferSize;\n    hpiBufferSize = streamInfo.bufferSize;\n\n    /* Check if BBM (background bus mastering) is to be enabled */\n    if( PA_ASIHPI_USE_BBM_ )\n    {\n        uint32_t bbmBufferSize = 0, preLatencyBufferSize = 0;\n        hpi_err_t hpiError = 0;\n        PaTime pollingOverhead;\n\n        /* Check overhead of Pa_Sleep() call (minimum sleep duration in ms -> OS dependent) */\n        pollingOverhead = PaUtil_GetTime();\n        Pa_Sleep( 0 );\n        pollingOverhead = 1000*(PaUtil_GetTime() - pollingOverhead);\n        PA_DEBUG(( \"polling overhead = %f ms (length of 0-second sleep)\\n\", pollingOverhead ));\n        /* Obtain minimum recommended size for host buffer (in bytes) */\n        PA_ASIHPI_UNLESS_( HPI_StreamEstimateBufferSize( &streamComp->hpiFormat,\n                           pollingInterval + (uint32_t)ceil( pollingOverhead ),\n                           &bbmBufferSize ), paUnanticipatedHostError );\n        /* BBM places more stringent requirements on buffer size (see description */\n        /* of HPI_StreamEstimateBufferSize in HPI API document) */\n        bbmBufferSize *= 3;\n        /* Make sure the BBM buffer contains multiple PA host buffers */\n        if( bbmBufferSize < 3 * streamComp->bytesPerFrame * framesPerPaHostBuffer )\n            bbmBufferSize = 3 * streamComp->bytesPerFrame * framesPerPaHostBuffer;\n        /* Try to honor latency suggested by user by growing buffer (no decrease possible) */\n        if( suggestedLatency > 0.0 )\n        {\n            PaTime bufferDuration = ((PaTime)bbmBufferSize) / streamComp->bytesPerFrame\n                                    / streamComp->hpiFormat.dwSampleRate;\n            /* Don't decrease buffer */\n            if( bufferDuration < suggestedLatency )\n            {\n                /* Save old buffer size, to be retried if new size proves too big */\n                preLatencyBufferSize = bbmBufferSize;\n                bbmBufferSize = (uint32_t)ceil( suggestedLatency * streamComp->bytesPerFrame\n                                            * streamComp->hpiFormat.dwSampleRate );\n            }\n        }\n        /* Choose closest memory block boundary (HPI API document states that\n        \"a buffer size of Nx4096 - 20 makes the best use of memory\"\n        (under the entry for HPI_StreamEstimateBufferSize)) */\n        bbmBufferSize = ((uint32_t)ceil((bbmBufferSize + 20)/4096.0))*4096 - 20;\n        streamComp->hostBufferSize = bbmBufferSize;\n        /* Allocate BBM host buffer (this enables bus mastering transfers in background) */\n        if( streamComp->hpiDevice->streamIsOutput )\n            hpiError = HPI_OutStreamHostBufferAllocate( NULL,\n                       streamComp->hpiStream,\n                       bbmBufferSize );\n        else\n            hpiError = HPI_InStreamHostBufferAllocate( NULL,\n                       streamComp->hpiStream,\n                       bbmBufferSize );\n        if( hpiError )\n        {\n            /* Indicate that BBM is disabled */\n            streamComp->hostBufferSize = 0;\n            /* Retry with smaller buffer size (transfers will still work, but not via BBM) */\n            if( hpiError == HPI_ERROR_INVALID_DATASIZE )\n            {\n                /* Retry BBM allocation with smaller size if requested latency proved too big */\n                if( preLatencyBufferSize > 0 )\n                {\n                    PA_DEBUG(( \"Retrying BBM allocation with smaller size (%d vs. %d bytes)\\n\",\n                               preLatencyBufferSize, bbmBufferSize ));\n                    bbmBufferSize = preLatencyBufferSize;\n                    if( streamComp->hpiDevice->streamIsOutput )\n                        hpiError = HPI_OutStreamHostBufferAllocate( NULL,\n                                   streamComp->hpiStream,\n                                   bbmBufferSize );\n                    else\n                        hpiError = HPI_InStreamHostBufferAllocate( NULL,\n                                   streamComp->hpiStream,\n                                   bbmBufferSize );\n                    /* Another round of error checking */\n                    if( hpiError )\n                    {\n                        PA_ASIHPI_REPORT_ERROR_( hpiError );\n                        /* No escapes this time */\n                        if( hpiError == HPI_ERROR_INVALID_DATASIZE )\n                        {\n                            result = paBufferTooBig;\n                            goto error;\n                        }\n                        else if( hpiError != HPI_ERROR_INVALID_OPERATION )\n                        {\n                            result = paUnanticipatedHostError;\n                            goto error;\n                        }\n                    }\n                    else\n                    {\n                        streamComp->hostBufferSize = bbmBufferSize;\n                        hpiBufferSize = bbmBufferSize;\n                    }\n                }\n                else\n                {\n                    result = paBufferTooBig;\n                    goto error;\n                }\n            }\n            /* If BBM not supported, foreground transfers will be used, but not a show-stopper */\n            /* Anything else is an error */\n            else if (( hpiError != HPI_ERROR_INVALID_OPERATION ) &&\n                    ( hpiError != HPI_ERROR_INVALID_FUNC ))\n            {\n                PA_ASIHPI_REPORT_ERROR_( hpiError );\n                result = paUnanticipatedHostError;\n                goto error;\n            }\n        }\n        else\n        {\n            hpiBufferSize = bbmBufferSize;\n        }\n    }\n\n    /* Final check of buffer size */\n    paHostBufferSize = streamComp->bytesPerFrame * framesPerPaHostBuffer;\n    if( hpiBufferSize < 3*paHostBufferSize )\n    {\n        result = paBufferTooBig;\n        goto error;\n    }\n    /* Set cap on output buffer size, based on latency suggestions */\n    if( streamComp->hpiDevice->streamIsOutput )\n    {\n        PaTime latency = suggestedLatency > 0.0 ? suggestedLatency :\n                         streamComp->hpiDevice->baseDeviceInfo.defaultHighOutputLatency;\n        streamComp->outputBufferCap =\n            (uint32_t)ceil( latency * streamComp->bytesPerFrame * streamComp->hpiFormat.dwSampleRate );\n        /* The cap should not be too small, to prevent underflow */\n        if( streamComp->outputBufferCap < 4*paHostBufferSize )\n            streamComp->outputBufferCap = 4*paHostBufferSize;\n    }\n    else\n    {\n        streamComp->outputBufferCap = 0;\n    }\n    /* Temp buffer size should be multiple of PA host buffer size (or 1x, if using fixed blocks) */\n    streamComp->tempBufferSize = paHostBufferSize;\n    /* Allocate temp buffer */\n    PA_UNLESS_( streamComp->tempBuffer = (uint8_t *)PaUtil_AllocateMemory( streamComp->tempBufferSize ),\n                paInsufficientMemory );\nerror:\n    return result;\n}\n\n\n/** Opens PortAudio stream.\n This determines a suitable value for framesPerBuffer, if the user didn't specify it,\n based on the suggested latency. It then opens each requested stream direction with the\n appropriate stream format, and allocates the required stream buffers. It sets up the\n various PortAudio structures dealing with streams, and estimates the stream latency.\n\n See pa_hostapi.h for a list of validity guarantees made about OpenStream parameters.\n\n @param hostApi Pointer to host API struct\n\n @param s List of open streams, where successfully opened stream will go\n\n @param inputParameters Pointer to stream parameter struct for input side of stream\n\n @param outputParameters Pointer to stream parameter struct for output side of stream\n\n @param sampleRate Desired sample rate\n\n @param framesPerBuffer Desired number of frames per buffer passed to user callback\n                        (or chunk size for blocking stream)\n\n @param streamFlags Stream flags\n\n @param streamCallback Pointer to user callback function (zero for blocking interface)\n\n @param userData Pointer to user data that will be passed to callback function along with data\n\n @return PortAudio error code\n*/\nstatic PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,\n                           PaStream **s,\n                           const PaStreamParameters *inputParameters,\n                           const PaStreamParameters *outputParameters,\n                           double sampleRate,\n                           unsigned long framesPerBuffer,\n                           PaStreamFlags streamFlags,\n                           PaStreamCallback *streamCallback,\n                           void *userData )\n{\n    PaError result = paNoError;\n    PaAsiHpiHostApiRepresentation *hpiHostApi = (PaAsiHpiHostApiRepresentation*)hostApi;\n    PaAsiHpiStream *stream = NULL;\n    unsigned long framesPerHostBuffer = framesPerBuffer;\n    int inputChannelCount = 0, outputChannelCount = 0;\n    PaSampleFormat inputSampleFormat = 0, outputSampleFormat = 0;\n    PaSampleFormat hostInputSampleFormat = 0, hostOutputSampleFormat = 0;\n    PaTime maxSuggestedLatency = 0.0;\n\n    /* Validate platform-specific flags -> none expected for HPI */\n    if( (streamFlags & paPlatformSpecificFlags) != 0 )\n        return paInvalidFlag; /* unexpected platform-specific flag */\n\n    /* Create blank stream structure */\n    PA_UNLESS_( stream = (PaAsiHpiStream *)PaUtil_AllocateMemory( sizeof(PaAsiHpiStream) ),\n                paInsufficientMemory );\n    memset( stream, 0, sizeof(PaAsiHpiStream) );\n\n    /* If the number of frames per buffer is unspecified, we have to come up with one. */\n    if( framesPerHostBuffer == paFramesPerBufferUnspecified )\n    {\n        if( inputParameters )\n            maxSuggestedLatency = inputParameters->suggestedLatency;\n        if( outputParameters && (outputParameters->suggestedLatency > maxSuggestedLatency) )\n            maxSuggestedLatency = outputParameters->suggestedLatency;\n        /* Use suggested latency if available */\n        if( maxSuggestedLatency > 0.0 )\n            framesPerHostBuffer = (unsigned long)ceil( maxSuggestedLatency * sampleRate );\n        else\n            /* AudioScience cards like BIG buffers by default */\n            framesPerHostBuffer = 4096;\n    }\n    /* Lower bounds on host buffer size, due to polling and HPI constraints */\n    if( 1000.0*framesPerHostBuffer/sampleRate < PA_ASIHPI_MIN_POLLING_INTERVAL_ )\n        framesPerHostBuffer = (unsigned long)ceil( sampleRate * PA_ASIHPI_MIN_POLLING_INTERVAL_ / 1000.0 );\n    /*    if( framesPerHostBuffer < PA_ASIHPI_MIN_FRAMES_ )\n            framesPerHostBuffer = PA_ASIHPI_MIN_FRAMES_; */\n    /* Efficient if host buffer size is integer multiple of user buffer size */\n    if( framesPerBuffer > 0 )\n        framesPerHostBuffer = (unsigned long)ceil( (double)framesPerHostBuffer / framesPerBuffer ) * framesPerBuffer;\n    /* Buffer should always be a multiple of 4 bytes to facilitate 32-bit PCI transfers.\n     By keeping the frames a multiple of 4, this is ensured even for 8-bit mono sound. */\n    framesPerHostBuffer = (framesPerHostBuffer / 4) * 4;\n    /* Polling is based on time length (in milliseconds) of user-requested block size */\n    stream->pollingInterval = (uint32_t)ceil( 1000.0*framesPerHostBuffer/sampleRate );\n    assert( framesPerHostBuffer > 0 );\n\n    /* Open underlying streams, check formats and allocate buffers */\n    if( inputParameters )\n    {\n        /* Create blank stream component structure */\n        PA_UNLESS_( stream->input = (PaAsiHpiStreamComponent *)PaUtil_AllocateMemory( sizeof(PaAsiHpiStreamComponent) ),\n                    paInsufficientMemory );\n        memset( stream->input, 0, sizeof(PaAsiHpiStreamComponent) );\n        /* Create/validate format */\n        PA_ENSURE_( PaAsiHpi_CreateFormat( hostApi, inputParameters, sampleRate,\n                                           &stream->input->hpiDevice, &stream->input->hpiFormat ) );\n        /* Open stream and set format */\n        PA_ENSURE_( PaAsiHpi_OpenInput( hostApi, stream->input->hpiDevice, &stream->input->hpiFormat,\n                                        &stream->input->hpiStream ) );\n        inputChannelCount = inputParameters->channelCount;\n        inputSampleFormat = inputParameters->sampleFormat;\n        hostInputSampleFormat = PaAsiHpi_HpiToPaFormat( stream->input->hpiFormat.wFormat );\n        stream->input->bytesPerFrame = inputChannelCount * Pa_GetSampleSize( hostInputSampleFormat );\n        assert( stream->input->bytesPerFrame > 0 );\n        /* Allocate host and temp buffers of appropriate size */\n        PA_ENSURE_( PaAsiHpi_SetupBuffers( stream->input, stream->pollingInterval,\n                                           framesPerHostBuffer, inputParameters->suggestedLatency ) );\n    }\n    if( outputParameters )\n    {\n        /* Create blank stream component structure */\n        PA_UNLESS_( stream->output = (PaAsiHpiStreamComponent *)PaUtil_AllocateMemory( sizeof(PaAsiHpiStreamComponent) ),\n                    paInsufficientMemory );\n        memset( stream->output, 0, sizeof(PaAsiHpiStreamComponent) );\n        /* Create/validate format */\n        PA_ENSURE_( PaAsiHpi_CreateFormat( hostApi, outputParameters, sampleRate,\n                                           &stream->output->hpiDevice, &stream->output->hpiFormat ) );\n        /* Open stream and check format */\n        PA_ENSURE_( PaAsiHpi_OpenOutput( hostApi, stream->output->hpiDevice,\n                                         &stream->output->hpiFormat,\n                                         &stream->output->hpiStream ) );\n        outputChannelCount = outputParameters->channelCount;\n        outputSampleFormat = outputParameters->sampleFormat;\n        hostOutputSampleFormat = PaAsiHpi_HpiToPaFormat( stream->output->hpiFormat.wFormat );\n        stream->output->bytesPerFrame = outputChannelCount * Pa_GetSampleSize( hostOutputSampleFormat );\n        /* Allocate host and temp buffers of appropriate size */\n        PA_ENSURE_( PaAsiHpi_SetupBuffers( stream->output, stream->pollingInterval,\n                                           framesPerHostBuffer, outputParameters->suggestedLatency ) );\n    }\n\n    /* Determine maximum frames per host buffer (least common denominator of input/output) */\n    if( inputParameters && outputParameters )\n    {\n        stream->maxFramesPerHostBuffer = PA_MIN( stream->input->tempBufferSize / stream->input->bytesPerFrame,\n                                         stream->output->tempBufferSize / stream->output->bytesPerFrame );\n    }\n    else\n    {\n        stream->maxFramesPerHostBuffer = inputParameters ? stream->input->tempBufferSize / stream->input->bytesPerFrame\n                                         : stream->output->tempBufferSize / stream->output->bytesPerFrame;\n    }\n    assert( stream->maxFramesPerHostBuffer > 0 );\n    /* Initialize various other stream parameters */\n    stream->neverDropInput = streamFlags & paNeverDropInput;\n    stream->state = paAsiHpiStoppedState;\n\n    /* Initialize either callback or blocking interface */\n    if( streamCallback )\n    {\n        PaUtil_InitializeStreamRepresentation( &stream->baseStreamRep,\n                                               &hpiHostApi->callbackStreamInterface,\n                                               streamCallback, userData );\n        stream->callbackMode = 1;\n    }\n    else\n    {\n        PaUtil_InitializeStreamRepresentation( &stream->baseStreamRep,\n                                               &hpiHostApi->blockingStreamInterface,\n                                               streamCallback, userData );\n        /* Pre-allocate non-interleaved user buffer pointers for blocking interface */\n        PA_UNLESS_( stream->blockingUserBufferCopy =\n                        PaUtil_AllocateMemory( sizeof(void *) * PA_MAX( inputChannelCount, outputChannelCount ) ),\n                    paInsufficientMemory );\n        stream->callbackMode = 0;\n    }\n    PaUtil_InitializeCpuLoadMeasurer( &stream->cpuLoadMeasurer, sampleRate );\n\n    /* Following pa_linux_alsa's lead, we operate with fixed host buffer size by default, */\n    /* since other modes will invariably lead to block adaption (maybe Bounded better?) */\n    PA_ENSURE_( PaUtil_InitializeBufferProcessor( &stream->bufferProcessor,\n                inputChannelCount, inputSampleFormat, hostInputSampleFormat,\n                outputChannelCount, outputSampleFormat, hostOutputSampleFormat,\n                sampleRate, streamFlags,\n                framesPerBuffer, framesPerHostBuffer, paUtilFixedHostBufferSize,\n                streamCallback, userData ) );\n\n    stream->baseStreamRep.streamInfo.structVersion = 1;\n    stream->baseStreamRep.streamInfo.sampleRate = sampleRate;\n    /* Determine input latency from buffer processor and buffer sizes */\n    if( stream->input )\n    {\n        PaTime bufferDuration = ( stream->input->hostBufferSize + stream->input->hardwareBufferSize )\n                                / sampleRate / stream->input->bytesPerFrame;\n        stream->baseStreamRep.streamInfo.inputLatency =\n            bufferDuration +\n            ((PaTime)PaUtil_GetBufferProcessorInputLatencyFrames( &stream->bufferProcessor ) -\n                stream->maxFramesPerHostBuffer) / sampleRate;\n        assert( stream->baseStreamRep.streamInfo.inputLatency > 0.0 );\n    }\n    /* Determine output latency from buffer processor and buffer sizes */\n    if( stream->output )\n    {\n        PaTime bufferDuration = ( stream->output->hostBufferSize + stream->output->hardwareBufferSize )\n                                / sampleRate / stream->output->bytesPerFrame;\n        /* Take buffer size cap into account (see PaAsiHpi_WaitForFrames) */\n        if( !stream->input && (stream->output->outputBufferCap > 0) )\n        {\n            bufferDuration = PA_MIN( bufferDuration,\n                                     stream->output->outputBufferCap / sampleRate / stream->output->bytesPerFrame );\n        }\n        stream->baseStreamRep.streamInfo.outputLatency =\n            bufferDuration +\n            ((PaTime)PaUtil_GetBufferProcessorOutputLatencyFrames( &stream->bufferProcessor ) -\n                stream->maxFramesPerHostBuffer) / sampleRate;\n        assert( stream->baseStreamRep.streamInfo.outputLatency > 0.0 );\n    }\n\n    /* Report stream info, for debugging purposes */\n    PaAsiHpi_StreamDump( stream );\n\n    /* Save initialized stream to PA stream list */\n    *s = (PaStream*)stream;\n    return result;\n\nerror:\n    CloseStream( (PaStream*)stream );\n    return result;\n}\n\n\n/** Close PortAudio stream.\n When CloseStream() is called, the multi-api layer ensures that the stream has already\n been stopped or aborted. This closes the underlying HPI streams and deallocates stream\n buffers and structs.\n\n @param s Pointer to PortAudio stream\n\n @return PortAudio error code\n*/\nstatic PaError CloseStream( PaStream *s )\n{\n    PaError result = paNoError;\n    PaAsiHpiStream *stream = (PaAsiHpiStream*)s;\n\n    /* If stream is already gone, all is well */\n    if( stream == NULL )\n        return paNoError;\n\n    /* Generic stream cleanup */\n    PaUtil_TerminateBufferProcessor( &stream->bufferProcessor );\n    PaUtil_TerminateStreamRepresentation( &stream->baseStreamRep );\n\n    /* Implementation-specific details - close internal streams */\n    if( stream->input )\n    {\n        /* Close HPI stream (freeing BBM host buffer in the process, if used) */\n        if( stream->input->hpiStream )\n        {\n            PA_ASIHPI_UNLESS_( HPI_InStreamClose( NULL,\n                                                  stream->input->hpiStream ), paUnanticipatedHostError );\n        }\n        /* Free temp buffer and stream component */\n        PaUtil_FreeMemory( stream->input->tempBuffer );\n        PaUtil_FreeMemory( stream->input );\n    }\n    if( stream->output )\n    {\n        /* Close HPI stream (freeing BBM host buffer in the process, if used) */\n        if( stream->output->hpiStream )\n        {\n            PA_ASIHPI_UNLESS_( HPI_OutStreamClose( NULL,\n                                                   stream->output->hpiStream ), paUnanticipatedHostError );\n        }\n        /* Free temp buffer and stream component */\n        PaUtil_FreeMemory( stream->output->tempBuffer );\n        PaUtil_FreeMemory( stream->output );\n    }\n\n    PaUtil_FreeMemory( stream->blockingUserBufferCopy );\n    PaUtil_FreeMemory( stream );\n\nerror:\n    return result;\n}\n\n\n/** Prime HPI output stream with silence.\n This resets the output stream and uses PortAudio helper routines to fill the\n temp buffer with silence. It then writes two host buffers to the stream. This is supposed\n to be called before the stream is started. It has no effect on input-only streams.\n\n @param stream Pointer to stream struct\n\n @return PortAudio error code\n */\nstatic PaError PaAsiHpi_PrimeOutputWithSilence( PaAsiHpiStream *stream )\n{\n    PaError result = paNoError;\n    PaAsiHpiStreamComponent *out;\n    PaUtilZeroer *zeroer;\n    PaSampleFormat outputFormat;\n    assert( stream );\n    out = stream->output;\n    /* Only continue if stream has output channels */\n    if( !out )\n        return result;\n    assert( out->tempBuffer );\n\n    /* Clear all existing data in hardware playback buffer */\n    PA_ASIHPI_UNLESS_( HPI_OutStreamReset( NULL,\n                                           out->hpiStream ), paUnanticipatedHostError );\n    /* Fill temp buffer with silence */\n    outputFormat = PaAsiHpi_HpiToPaFormat( out->hpiFormat.wFormat );\n    zeroer = PaUtil_SelectZeroer( outputFormat );\n    zeroer(out->tempBuffer, 1, out->tempBufferSize / Pa_GetSampleSize(outputFormat) );\n    /* Write temp buffer to hardware fifo twice, to get started */\n    PA_ASIHPI_UNLESS_( HPI_OutStreamWriteBuf( NULL, out->hpiStream,\n                                              out->tempBuffer, out->tempBufferSize, &out->hpiFormat),\n                                              paUnanticipatedHostError );\n    PA_ASIHPI_UNLESS_( HPI_OutStreamWriteBuf( NULL, out->hpiStream,\n                                              out->tempBuffer, out->tempBufferSize, &out->hpiFormat),\n                                              paUnanticipatedHostError );\nerror:\n    return result;\n}\n\n\n/** Start HPI streams (both input + output).\n This starts all HPI streams in the PortAudio stream. Output streams are first primed with\n silence, if required. After this call the PA stream is in the Active state.\n\n @todo Implement priming via the user callback\n\n @param stream Pointer to stream struct\n\n @param outputPrimed True if output is already primed (if false, silence will be loaded before starting)\n\n @return PortAudio error code\n */\nstatic PaError PaAsiHpi_StartStream( PaAsiHpiStream *stream, int outputPrimed )\n{\n    PaError result = paNoError;\n\n    if( stream->input )\n    {\n        PA_ASIHPI_UNLESS_( HPI_InStreamStart( NULL,\n                                              stream->input->hpiStream ), paUnanticipatedHostError );\n    }\n    if( stream->output )\n    {\n        if( !outputPrimed )\n        {\n            /* Buffer isn't primed, so load stream with silence */\n            PA_ENSURE_( PaAsiHpi_PrimeOutputWithSilence( stream ) );\n        }\n        PA_ASIHPI_UNLESS_( HPI_OutStreamStart( NULL,\n                                               stream->output->hpiStream ), paUnanticipatedHostError );\n    }\n    stream->state = paAsiHpiActiveState;\n    stream->callbackFinished = 0;\n\n    /* Report stream info for debugging purposes */\n    /*    PaAsiHpi_StreamDump( stream );   */\n\nerror:\n    return result;\n}\n\n\n/** Start PortAudio stream.\n If the stream has a callback interface, this starts a helper thread to feed the user callback.\n The thread will then take care of starting the HPI streams, and this function will block\n until the streams actually start. In the case of a blocking interface, the HPI streams\n are simply started.\n\n @param s Pointer to PortAudio stream\n\n @return PortAudio error code\n*/\nstatic PaError StartStream( PaStream *s )\n{\n    PaError result = paNoError;\n    PaAsiHpiStream *stream = (PaAsiHpiStream*)s;\n\n    assert( stream );\n\n    /* Ready the processor */\n    PaUtil_ResetBufferProcessor( &stream->bufferProcessor );\n\n    if( stream->callbackMode )\n    {\n        /* Create and start callback engine thread */\n        /* Also waits 1 second for stream to be started by engine thread (otherwise aborts) */\n        PA_ENSURE_( PaUnixThread_New( &stream->thread, &CallbackThreadFunc, stream, 1., 0 /*rtSched*/ ) );\n    }\n    else\n    {\n        PA_ENSURE_( PaAsiHpi_StartStream( stream, 0 ) );\n    }\n\nerror:\n    return result;\n}\n\n\n/** Stop HPI streams (input + output), either softly or abruptly.\n If abort is false, the function blocks until the output stream is drained, otherwise it\n stops immediately and discards data in the stream hardware buffers.\n\n This function is safe to call from the callback engine thread as well as the main thread.\n\n @param stream Pointer to stream struct\n\n @param abort True if samples in output buffer should be discarded (otherwise blocks until stream is done)\n\n @return PortAudio error code\n\n */\nstatic PaError PaAsiHpi_StopStream( PaAsiHpiStream *stream, int abort )\n{\n    PaError result = paNoError;\n\n    assert( stream );\n\n    /* Input channels */\n    if( stream->input )\n    {\n        PA_ASIHPI_UNLESS_( HPI_InStreamReset( NULL,\n                                              stream->input->hpiStream ), paUnanticipatedHostError );\n    }\n    /* Output channels */\n    if( stream->output )\n    {\n        if( !abort )\n        {\n            /* Wait until HPI output stream is drained */\n            while( 1 )\n            {\n                PaAsiHpiStreamInfo streamInfo;\n                PaTime timeLeft;\n\n                /* Obtain number of samples waiting to be played */\n                PA_ENSURE_( PaAsiHpi_GetStreamInfo( stream->output, &streamInfo ) );\n                /* Check if stream is drained */\n                if( (streamInfo.state != HPI_STATE_PLAYING) &&\n                        (streamInfo.dataSize < stream->output->bytesPerFrame * PA_ASIHPI_MIN_FRAMES_) )\n                    break;\n                /* Sleep amount of time represented by remaining samples */\n                timeLeft = 1000.0 * streamInfo.dataSize / stream->output->bytesPerFrame\n                           / stream->baseStreamRep.streamInfo.sampleRate;\n                Pa_Sleep( (long)ceil( timeLeft ) );\n            }\n        }\n        PA_ASIHPI_UNLESS_( HPI_OutStreamReset( NULL,\n                                               stream->output->hpiStream ), paUnanticipatedHostError );\n    }\n\n    /* Report stream info for debugging purposes */\n    /*    PaAsiHpi_StreamDump( stream ); */\n\nerror:\n    return result;\n}\n\n\n/** Stop or abort PortAudio stream.\n\n This function is used to explicitly stop the PortAudio stream (via StopStream/AbortStream),\n as opposed to the situation when the callback finishes with a result other than paContinue.\n If a stream is in callback mode we will have to inspect whether the background thread has\n finished, or we will have to take it out. In either case we join the thread before returning.\n In blocking mode, we simply tell HPI to stop abruptly (abort) or finish buffers (drain).\n The PortAudio stream will be in the Stopped state after a call to this function.\n\n Don't call this from the callback engine thread!\n\n @param stream Pointer to stream struct\n\n @param abort True if samples in output buffer should be discarded (otherwise blocks until stream is done)\n\n @return PortAudio error code\n*/\nstatic PaError PaAsiHpi_ExplicitStop( PaAsiHpiStream *stream, int abort )\n{\n    PaError result = paNoError;\n\n    /* First deal with the callback thread, cancelling and/or joining it if necessary */\n    if( stream->callbackMode )\n    {\n        PaError threadRes;\n        stream->callbackAbort = abort;\n        if( abort )\n        {\n            PA_DEBUG(( \"Aborting callback\\n\" ));\n        }\n        else\n        {\n            PA_DEBUG(( \"Stopping callback\\n\" ));\n        }\n        PA_ENSURE_( PaUnixThread_Terminate( &stream->thread, !abort, &threadRes ) );\n        if( threadRes != paNoError )\n        {\n            PA_DEBUG(( \"Callback thread returned: %d\\n\", threadRes ));\n        }\n    }\n    else\n    {\n        PA_ENSURE_( PaAsiHpi_StopStream( stream, abort ) );\n    }\n\n    stream->state = paAsiHpiStoppedState;\n\nerror:\n    return result;\n}\n\n\n/** Stop PortAudio stream.\n This blocks until the output buffers are drained.\n\n @param s Pointer to PortAudio stream\n\n @return PortAudio error code\n*/\nstatic PaError StopStream( PaStream *s )\n{\n    return PaAsiHpi_ExplicitStop( (PaAsiHpiStream *) s, 0 );\n}\n\n\n/** Abort PortAudio stream.\n This discards any existing data in output buffers and stops the stream immediately.\n\n @param s Pointer to PortAudio stream\n\n @return PortAudio error code\n*/\nstatic PaError AbortStream( PaStream *s )\n{\n    return PaAsiHpi_ExplicitStop( (PaAsiHpiStream * ) s, 1 );\n}\n\n\n/** Determine whether the stream is stopped.\n A stream is considered to be stopped prior to a successful call to StartStream and after\n a successful call to StopStream or AbortStream. If a stream callback returns a value other\n than paContinue the stream is NOT considered to be stopped (it is in CallbackFinished state).\n\n @param s Pointer to PortAudio stream\n\n @return Returns one (1) when the stream is stopped, zero (0) when the stream is running, or\n         a PaErrorCode (which are always negative) if PortAudio is not initialized or an\n         error is encountered.\n*/\nstatic PaError IsStreamStopped( PaStream *s )\n{\n    PaAsiHpiStream *stream = (PaAsiHpiStream*)s;\n\n    assert( stream );\n    return stream->state == paAsiHpiStoppedState ? 1 : 0;\n}\n\n\n/** Determine whether the stream is active.\n A stream is active after a successful call to StartStream(), until it becomes inactive either\n as a result of a call to StopStream() or AbortStream(), or as a result of a return value\n other than paContinue from the stream callback. In the latter case, the stream is considered\n inactive after the last buffer has finished playing.\n\n @param s Pointer to PortAudio stream\n\n @return Returns one (1) when the stream is active (i.e. playing or recording audio),\n         zero (0) when not playing, or a PaErrorCode (which are always negative)\n         if PortAudio is not initialized or an error is encountered.\n*/\nstatic PaError IsStreamActive( PaStream *s )\n{\n    PaAsiHpiStream *stream = (PaAsiHpiStream*)s;\n\n    assert( stream );\n    return stream->state == paAsiHpiActiveState ? 1 : 0;\n}\n\n\n/** Returns current stream time.\n This corresponds to the system clock. The clock should run continuously while the stream\n is open, i.e. between calls to OpenStream() and CloseStream(), therefore a frame counter\n is not good enough.\n\n @param s Pointer to PortAudio stream\n\n @return Stream time, in seconds\n */\nstatic PaTime GetStreamTime( PaStream *s )\n{\n    return PaUtil_GetTime();\n}\n\n\n/** Returns CPU load.\n\n @param s Pointer to PortAudio stream\n\n @return CPU load (0.0 if blocking interface is used)\n */\nstatic double GetStreamCpuLoad( PaStream *s )\n{\n    PaAsiHpiStream *stream = (PaAsiHpiStream*)s;\n\n    return stream->callbackMode ? PaUtil_GetCpuLoad( &stream->cpuLoadMeasurer ) : 0.0;\n}\n\n/* --------------------------- Callback Interface --------------------------- */\n\n/** Exit routine which is called when callback thread quits.\n This takes care of stopping the HPI streams (either waiting for output to finish, or\n abruptly). It also calls the user-supplied StreamFinished callback, and sets the\n stream state to CallbackFinished if it was reached via a non-paContinue return from\n the user callback function.\n\n @param userData A pointer to an open stream previously created with Pa_OpenStream\n */\nstatic void PaAsiHpi_OnThreadExit( void *userData )\n{\n    PaAsiHpiStream *stream = (PaAsiHpiStream *) userData;\n\n    assert( stream );\n\n    PaUtil_ResetCpuLoadMeasurer( &stream->cpuLoadMeasurer );\n\n    PA_DEBUG(( \"%s: Stopping HPI streams\\n\", __FUNCTION__ ));\n    PaAsiHpi_StopStream( stream, stream->callbackAbort );\n    PA_DEBUG(( \"%s: Stoppage\\n\", __FUNCTION__ ));\n\n    /* Eventually notify user all buffers have played */\n    if( stream->baseStreamRep.streamFinishedCallback )\n    {\n        stream->baseStreamRep.streamFinishedCallback( stream->baseStreamRep.userData );\n    }\n\n    /* Unfortunately both explicit calls to Stop/AbortStream (leading to Stopped state)\n     and implicit stops via paComplete/paAbort (leading to CallbackFinished state)\n     end up here - need another flag to remind us which is the case */\n    if( stream->callbackFinished )\n        stream->state = paAsiHpiCallbackFinishedState;\n}\n\n\n/** Wait until there is enough frames to fill a host buffer.\n The routine attempts to sleep until at least a full host buffer can be retrieved from the\n input HPI stream and passed to the output HPI stream. It will first sleep until enough\n output space is available, as this is usually easily achievable. If it is an output-only\n stream, it will also sleep if the hardware buffer is too full, thereby throttling the\n filling of the output buffer and reducing output latency. The routine then blocks until\n enough input samples are available, unless this will cause an output underflow. In the\n process, input overflows and output underflows are indicated.\n\n @param stream Pointer to stream struct\n\n @param framesAvail Returns the number of available frames\n\n @param cbFlags Overflows and underflows indicated in here\n\n @return PortAudio error code (only paUnanticipatedHostError expected)\n */\nstatic PaError PaAsiHpi_WaitForFrames( PaAsiHpiStream *stream, unsigned long *framesAvail,\n                                       PaStreamCallbackFlags *cbFlags )\n{\n    PaError result = paNoError;\n    double sampleRate;\n    unsigned long framesTarget;\n    uint32_t outputData = 0, outputSpace = 0, inputData = 0, framesLeft = 0;\n\n    assert( stream );\n    assert( stream->input || stream->output );\n\n    sampleRate = stream->baseStreamRep.streamInfo.sampleRate;\n    /* We have to come up with this much frames on both input and output */\n    framesTarget = stream->bufferProcessor.framesPerHostBuffer;\n    assert( framesTarget > 0 );\n\n    while( 1 )\n    {\n        PaAsiHpiStreamInfo info;\n        /* Check output first, as this takes priority in the default full-duplex mode */\n        if( stream->output )\n        {\n            PA_ENSURE_( PaAsiHpi_GetStreamInfo( stream->output, &info ) );\n            /* Wait until enough space is available in output buffer to receive a full block */\n            if( info.availableFrames < framesTarget )\n            {\n                framesLeft = framesTarget - info.availableFrames;\n                Pa_Sleep( (long)ceil( 1000 * framesLeft / sampleRate ) );\n                continue;\n            }\n            /* Wait until the data in hardware buffer has dropped to a sensible level.\n             Without this, the hardware buffer quickly fills up in the absence of an input\n             stream to regulate its data rate (if data generation is fast). This leads to\n             large latencies, as the AudioScience hardware buffers are humongous.\n             This is similar to the default \"Hardware Buffering=off\" option in the\n             AudioScience WAV driver. */\n            if( !stream->input && (stream->output->outputBufferCap > 0) &&\n                    ( info.totalBufferedData > stream->output->outputBufferCap / stream->output->bytesPerFrame ) )\n            {\n                framesLeft = info.totalBufferedData - stream->output->outputBufferCap / stream->output->bytesPerFrame;\n                Pa_Sleep( (long)ceil( 1000 * framesLeft / sampleRate ) );\n                continue;\n            }\n            outputData = info.totalBufferedData;\n            outputSpace = info.availableFrames;\n            /* Report output underflow to callback */\n            if( info.underflow )\n            {\n                *cbFlags |= paOutputUnderflow;\n            }\n        }\n\n        /* Now check input side */\n        if( stream->input )\n        {\n            PA_ENSURE_( PaAsiHpi_GetStreamInfo( stream->input, &info ) );\n            /* If a full block of samples hasn't been recorded yet, wait for it if possible */\n            if( info.availableFrames < framesTarget )\n            {\n                framesLeft = framesTarget - info.availableFrames;\n                /* As long as output is not disrupted in the process, wait for a full\n                block of input samples */\n                if( !stream->output || (outputData > framesLeft) )\n                {\n                    Pa_Sleep( (long)ceil( 1000 * framesLeft / sampleRate ) );\n                    continue;\n                }\n            }\n            inputData = info.availableFrames;\n            /** @todo The paInputOverflow flag should be set in the callback containing the\n             first input sample following the overflow. That means the block currently sitting\n             at the fore-front of recording, i.e. typically the one containing the newest (last)\n             sample in the HPI buffer system. This is most likely not the same as the current\n             block of data being passed to the callback. The current overflow should ideally\n             be noted in an overflow list of sorts, with an indication of when it should be\n             reported. The trouble starts if there are several separate overflow incidents,\n             given a big input buffer. Oh well, something to try out later... */\n            if( info.overflow )\n            {\n                *cbFlags |= paInputOverflow;\n            }\n        }\n        break;\n    }\n    /* Full-duplex stream */\n    if( stream->input && stream->output )\n    {\n        if( outputSpace >= framesTarget )\n            *framesAvail = outputSpace;\n        /* If input didn't make the target, keep the output count instead (input underflow) */\n        if( (inputData >= framesTarget) && (inputData < outputSpace) )\n            *framesAvail = inputData;\n    }\n    else\n    {\n        *framesAvail = stream->input ? inputData : outputSpace;\n    }\n\nerror:\n    return result;\n}\n\n\n/** Obtain recording, current and playback timestamps of stream.\n The current time is determined by the system clock. This \"now\" timestamp occurs at the\n forefront of recording (and playback in the full-duplex case), which happens later than the\n input timestamp by an amount equal to the total number of recorded frames in the input buffer.\n The output timestamp indicates when the next generated sample will actually be played. This\n happens after all the samples currently in the output buffer are played. The output timestamp\n therefore follows the current timestamp by an amount equal to the number of frames yet to be\n played back in the output buffer.\n\n If the current timestamp is the present, the input timestamp is in the past and the output\n timestamp is in the future.\n\n @param stream Pointer to stream struct\n\n @param timeInfo Pointer to timeInfo struct that will contain timestamps\n */\nstatic void PaAsiHpi_CalculateTimeInfo( PaAsiHpiStream *stream, PaStreamCallbackTimeInfo *timeInfo )\n{\n    PaAsiHpiStreamInfo streamInfo;\n    double sampleRate;\n\n    assert( stream );\n    assert( timeInfo );\n    sampleRate = stream->baseStreamRep.streamInfo.sampleRate;\n\n    /* The current time (\"now\") is at the forefront of both recording and playback */\n    timeInfo->currentTime = GetStreamTime( (PaStream *)stream );\n    /* The last sample in the input buffer was recorded just now, so the first sample\n     happened (number of recorded samples)/sampleRate ago */\n    timeInfo->inputBufferAdcTime = timeInfo->currentTime;\n    if( stream->input )\n    {\n        PaAsiHpi_GetStreamInfo( stream->input, &streamInfo );\n        timeInfo->inputBufferAdcTime -= streamInfo.totalBufferedData / sampleRate;\n    }\n    /* The first of the outgoing samples will be played after all the samples in the output\n     buffer is done */\n    timeInfo->outputBufferDacTime = timeInfo->currentTime;\n    if( stream->output )\n    {\n        PaAsiHpi_GetStreamInfo( stream->output, &streamInfo );\n        timeInfo->outputBufferDacTime += streamInfo.totalBufferedData / sampleRate;\n    }\n}\n\n\n/** Read from HPI input stream and register buffers.\n This reads data from the HPI input stream (if it exists) and registers the temp stream\n buffers of both input and output streams with the buffer processor. In the process it also\n handles input underflows in the full-duplex case.\n\n @param stream Pointer to stream struct\n\n @param numFrames On entrance the number of available frames, on exit the number of\n                  received frames\n\n @param cbFlags Indicates overflows and underflows\n\n @return PortAudio error code\n */\nstatic PaError PaAsiHpi_BeginProcessing( PaAsiHpiStream *stream, unsigned long *numFrames,\n        PaStreamCallbackFlags *cbFlags )\n{\n    PaError result = paNoError;\n\n    assert( stream );\n    if( *numFrames > stream->maxFramesPerHostBuffer )\n        *numFrames = stream->maxFramesPerHostBuffer;\n\n    if( stream->input )\n    {\n        PaAsiHpiStreamInfo info;\n\n        uint32_t framesToGet = *numFrames;\n\n        /* Check for overflows and underflows yet again */\n        PA_ENSURE_( PaAsiHpi_GetStreamInfo( stream->input, &info ) );\n        if( info.overflow )\n        {\n            *cbFlags |= paInputOverflow;\n        }\n        /* Input underflow if less than expected number of samples pitch up */\n        if( framesToGet > info.availableFrames )\n        {\n            PaUtilZeroer *zeroer;\n            PaSampleFormat inputFormat;\n\n            /* Never call an input-only stream with InputUnderflow set */\n            if( stream->output )\n                *cbFlags |= paInputUnderflow;\n            framesToGet = info.availableFrames;\n            /* Fill temp buffer with silence (to make up for missing input samples) */\n            inputFormat = PaAsiHpi_HpiToPaFormat( stream->input->hpiFormat.wFormat );\n            zeroer = PaUtil_SelectZeroer( inputFormat );\n            zeroer(stream->input->tempBuffer, 1,\n                   stream->input->tempBufferSize / Pa_GetSampleSize(inputFormat) );\n        }\n\n        /* Read block of data into temp buffer */\n        PA_ASIHPI_UNLESS_( HPI_InStreamReadBuf( NULL,\n                                             stream->input->hpiStream,\n                                             stream->input->tempBuffer,\n                                             framesToGet * stream->input->bytesPerFrame),\n                           paUnanticipatedHostError );\n        /* Register temp buffer with buffer processor (always FULL buffer) */\n        PaUtil_SetInputFrameCount( &stream->bufferProcessor, *numFrames );\n        /* HPI interface only allows interleaved channels */\n        PaUtil_SetInterleavedInputChannels( &stream->bufferProcessor,\n                                            0, stream->input->tempBuffer,\n                                            stream->input->hpiFormat.wChannels );\n    }\n    if( stream->output )\n    {\n        /* Register temp buffer with buffer processor */\n        PaUtil_SetOutputFrameCount( &stream->bufferProcessor, *numFrames );\n        /* HPI interface only allows interleaved channels */\n        PaUtil_SetInterleavedOutputChannels( &stream->bufferProcessor,\n                                             0, stream->output->tempBuffer,\n                                             stream->output->hpiFormat.wChannels );\n    }\n\nerror:\n    return result;\n}\n\n\n/** Flush output buffers to HPI output stream.\n This completes the processing cycle by writing the temp buffer to the HPI interface.\n Additional output underflows are caught before data is written to the stream, as this\n action typically remedies the underflow and hides it in the process.\n\n @param stream Pointer to stream struct\n\n @param numFrames The number of frames to write to the output stream\n\n @param cbFlags Indicates overflows and underflows\n */\nstatic PaError PaAsiHpi_EndProcessing( PaAsiHpiStream *stream, unsigned long numFrames,\n                                       PaStreamCallbackFlags *cbFlags )\n{\n    PaError result = paNoError;\n\n    assert( stream );\n\n    if( stream->output )\n    {\n        PaAsiHpiStreamInfo info;\n        /* Check for underflows after the (potentially time-consuming) callback */\n        PA_ENSURE_( PaAsiHpi_GetStreamInfo( stream->output, &info ) );\n        if( info.underflow )\n        {\n            *cbFlags |= paOutputUnderflow;\n        }\n\n        /* Write temp buffer to HPI stream */\n        PA_ASIHPI_UNLESS_( HPI_OutStreamWriteBuf( NULL,\n                                           stream->output->hpiStream,\n                                           stream->output->tempBuffer,\n                                           numFrames * stream->output->bytesPerFrame,\n                                           &stream->output->hpiFormat),\n                           paUnanticipatedHostError );\n    }\n\nerror:\n    return result;\n}\n\n\n/** Main callback engine.\n This function runs in a separate thread and does all the work of fetching audio data from\n the AudioScience card via the HPI interface, feeding it to the user callback via the buffer\n processor, and delivering the resulting output data back to the card via HPI calls.\n It is started and terminated when the PortAudio stream is started and stopped, and starts\n the HPI streams on startup.\n\n @param userData A pointer to an open stream previously created with Pa_OpenStream.\n*/\nstatic void *CallbackThreadFunc( void *userData )\n{\n    PaError result = paNoError;\n    PaAsiHpiStream *stream = (PaAsiHpiStream *) userData;\n    int callbackResult = paContinue;\n\n    assert( stream );\n\n    /* Cleanup routine stops streams on thread exit */\n    pthread_cleanup_push( &PaAsiHpi_OnThreadExit, stream );\n\n    /* Start HPI streams and notify parent when we're done */\n    PA_ENSURE_( PaUnixThread_PrepareNotify( &stream->thread ) );\n    /* Buffer will be primed with silence */\n    PA_ENSURE_( PaAsiHpi_StartStream( stream, 0 ) );\n    PA_ENSURE_( PaUnixThread_NotifyParent( &stream->thread ) );\n\n    /* MAIN LOOP */\n    while( 1 )\n    {\n        PaStreamCallbackFlags cbFlags = 0;\n        unsigned long framesAvail, framesGot;\n\n        pthread_testcancel();\n\n        /** @concern StreamStop if the main thread has requested a stop and the stream has not\n        * been effectively stopped we signal this condition by modifying callbackResult\n        * (we'll want to flush buffered output). */\n        if( PaUnixThread_StopRequested( &stream->thread ) && (callbackResult == paContinue) )\n        {\n            PA_DEBUG(( \"Setting callbackResult to paComplete\\n\" ));\n            callbackResult = paComplete;\n        }\n\n        /* Start winding down thread if requested */\n        if( callbackResult != paContinue )\n        {\n            stream->callbackAbort = (callbackResult == paAbort);\n            if( stream->callbackAbort ||\n                    /** @concern BlockAdaption: Go on if adaption buffers are empty */\n                    PaUtil_IsBufferProcessorOutputEmpty( &stream->bufferProcessor ) )\n            {\n                goto end;\n            }\n            PA_DEBUG(( \"%s: Flushing buffer processor\\n\", __FUNCTION__ ));\n            /* There is still buffered output that needs to be processed */\n        }\n\n        /* SLEEP */\n        /* Wait for data (or buffer space) to become available. This basically sleeps and\n        polls the HPI interface until a full block of frames can be moved. */\n        PA_ENSURE_( PaAsiHpi_WaitForFrames( stream, &framesAvail, &cbFlags ) );\n\n        /* Consume buffer space. Once we have a number of frames available for consumption we\n        must retrieve the data from the HPI interface and pass it to the PA buffer processor.\n        We should be prepared to process several chunks successively. */\n        while( framesAvail > 0 )\n        {\n            PaStreamCallbackTimeInfo timeInfo = {0, 0, 0};\n\n            pthread_testcancel();\n\n            framesGot = framesAvail;\n            if( stream->bufferProcessor.hostBufferSizeMode == paUtilFixedHostBufferSize )\n            {\n                /* We've committed to a fixed host buffer size, stick to that */\n                framesGot = framesGot >= stream->maxFramesPerHostBuffer ? stream->maxFramesPerHostBuffer : 0;\n            }\n            else\n            {\n                /* We've committed to an upper bound on the size of host buffers */\n                assert( stream->bufferProcessor.hostBufferSizeMode == paUtilBoundedHostBufferSize );\n                framesGot = PA_MIN( framesGot, stream->maxFramesPerHostBuffer );\n            }\n\n            /* Obtain buffer timestamps */\n            PaAsiHpi_CalculateTimeInfo( stream, &timeInfo );\n            PaUtil_BeginBufferProcessing( &stream->bufferProcessor, &timeInfo, cbFlags );\n            /* CPU load measurement should include processing activivity external to the stream callback */\n            PaUtil_BeginCpuLoadMeasurement( &stream->cpuLoadMeasurer );\n            if( framesGot > 0 )\n            {\n                /* READ FROM HPI INPUT STREAM */\n                PA_ENSURE_( PaAsiHpi_BeginProcessing( stream, &framesGot, &cbFlags ) );\n                /* Input overflow in a full-duplex stream makes for interesting times */\n                if( stream->input && stream->output && (cbFlags & paInputOverflow) )\n                {\n                    /* Special full-duplex paNeverDropInput mode */\n                    if( stream->neverDropInput )\n                    {\n                        PaUtil_SetNoOutput( &stream->bufferProcessor );\n                        cbFlags |= paOutputOverflow;\n                    }\n                }\n                /* CALL USER CALLBACK WITH INPUT DATA, AND OBTAIN OUTPUT DATA */\n                PaUtil_EndBufferProcessing( &stream->bufferProcessor, &callbackResult );\n                /* Clear overflow and underflow information (but PaAsiHpi_EndProcessing might\n                still show up output underflow that will carry over to next round) */\n                cbFlags = 0;\n                /*  WRITE TO HPI OUTPUT STREAM */\n                PA_ENSURE_( PaAsiHpi_EndProcessing( stream, framesGot, &cbFlags ) );\n                /* Advance frame counter */\n                framesAvail -= framesGot;\n            }\n            PaUtil_EndCpuLoadMeasurement( &stream->cpuLoadMeasurer, framesGot );\n\n            if( framesGot == 0 )\n            {\n                /* Go back to polling for more frames */\n                break;\n\n            }\n            if( callbackResult != paContinue )\n                break;\n        }\n    }\n\n    /* This code is unreachable, but important to include regardless because it\n     * is possibly a macro with a closing brace to match the opening brace in\n     * pthread_cleanup_push() above.  The documentation states that they must\n     * always occur in pairs. */\n    pthread_cleanup_pop( 1 );\n\nend:\n    /* Indicates normal exit of callback, as opposed to the thread getting killed explicitly */\n    stream->callbackFinished = 1;\n    PA_DEBUG(( \"%s: Thread %d exiting (callbackResult = %d)\\n \",\n               __FUNCTION__, pthread_self(), callbackResult ));\n    /* Exit from thread and report any PortAudio error in the process */\n    PaUnixThreading_EXIT( result );\nerror:\n    goto end;\n}\n\n/* --------------------------- Blocking Interface --------------------------- */\n\n/* As separate stream interfaces are used for blocking and callback streams, the following\n functions can be guaranteed to only be called for blocking streams. */\n\n/** Read data from input stream.\n This reads the indicated number of frames into the supplied buffer from an input stream,\n and blocks until this is done.\n\n @param s Pointer to PortAudio stream\n\n @param buffer Pointer to buffer that will receive interleaved data (or an array of pointers\n               to a buffer for each non-interleaved channel)\n\n @param frames Number of frames to read from stream\n\n @return PortAudio error code (also indicates overflow via paInputOverflowed)\n */\nstatic PaError ReadStream( PaStream *s,\n                           void *buffer,\n                           unsigned long frames )\n{\n    PaError result = paNoError;\n    PaAsiHpiStream *stream = (PaAsiHpiStream*)s;\n    PaAsiHpiStreamInfo info;\n    void *userBuffer;\n\n    assert( stream );\n    PA_UNLESS_( stream->input, paCanNotReadFromAnOutputOnlyStream );\n\n    /* Check for input overflow since previous call to ReadStream */\n    PA_ENSURE_( PaAsiHpi_GetStreamInfo( stream->input, &info ) );\n    if( info.overflow )\n    {\n        result = paInputOverflowed;\n    }\n\n    /* NB Make copy of user buffer pointers, since they are advanced by buffer processor */\n    if( stream->bufferProcessor.userInputIsInterleaved )\n    {\n        userBuffer = buffer;\n    }\n    else\n    {\n        /* Copy channels into local array */\n        userBuffer = stream->blockingUserBufferCopy;\n        memcpy( userBuffer, buffer, sizeof (void *) * stream->input->hpiFormat.wChannels );\n    }\n\n    while( frames > 0 )\n    {\n        unsigned long framesGot, framesAvail;\n        PaStreamCallbackFlags cbFlags = 0;\n\n        PA_ENSURE_( PaAsiHpi_WaitForFrames( stream, &framesAvail, &cbFlags ) );\n        framesGot = PA_MIN( framesAvail, frames );\n        PA_ENSURE_( PaAsiHpi_BeginProcessing( stream, &framesGot, &cbFlags ) );\n\n        if( framesGot > 0 )\n        {\n            framesGot = PaUtil_CopyInput( &stream->bufferProcessor, &userBuffer, framesGot );\n            PA_ENSURE_( PaAsiHpi_EndProcessing( stream, framesGot, &cbFlags ) );\n            /* Advance frame counter */\n            frames -= framesGot;\n        }\n    }\n\nerror:\n    return result;\n}\n\n\n/** Write data to output stream.\n This writes the indicated number of frames from the supplied buffer to an output stream,\n and blocks until this is done.\n\n @param s Pointer to PortAudio stream\n\n @param buffer Pointer to buffer that provides interleaved data (or an array of pointers\n               to a buffer for each non-interleaved channel)\n\n @param frames Number of frames to write to stream\n\n @return PortAudio error code (also indicates underflow via paOutputUnderflowed)\n */\nstatic PaError WriteStream( PaStream *s,\n                            const void *buffer,\n                            unsigned long frames )\n{\n    PaError result = paNoError;\n    PaAsiHpiStream *stream = (PaAsiHpiStream*)s;\n    PaAsiHpiStreamInfo info;\n    const void *userBuffer;\n\n    assert( stream );\n    PA_UNLESS_( stream->output, paCanNotWriteToAnInputOnlyStream );\n\n    /* Check for output underflow since previous call to WriteStream */\n    PA_ENSURE_( PaAsiHpi_GetStreamInfo( stream->output, &info ) );\n    if( info.underflow )\n    {\n        result = paOutputUnderflowed;\n    }\n\n    /* NB Make copy of user buffer pointers, since they are advanced by buffer processor */\n    if( stream->bufferProcessor.userOutputIsInterleaved )\n    {\n        userBuffer = buffer;\n    }\n    else\n    {\n        /* Copy channels into local array */\n        userBuffer = stream->blockingUserBufferCopy;\n        memcpy( (void *)userBuffer, buffer, sizeof (void *) * stream->output->hpiFormat.wChannels );\n    }\n\n    while( frames > 0 )\n    {\n        unsigned long framesGot, framesAvail;\n        PaStreamCallbackFlags cbFlags = 0;\n\n        PA_ENSURE_( PaAsiHpi_WaitForFrames( stream, &framesAvail, &cbFlags ) );\n        framesGot = PA_MIN( framesAvail, frames );\n        PA_ENSURE_( PaAsiHpi_BeginProcessing( stream, &framesGot, &cbFlags ) );\n\n        if( framesGot > 0 )\n        {\n            framesGot = PaUtil_CopyOutput( &stream->bufferProcessor, &userBuffer, framesGot );\n            PA_ENSURE_( PaAsiHpi_EndProcessing( stream, framesGot, &cbFlags ) );\n            /* Advance frame counter */\n            frames -= framesGot;\n        }\n    }\n\nerror:\n    return result;\n}\n\n\n/** Number of frames that can be read from input stream without blocking.\n\n @param s Pointer to PortAudio stream\n\n @return Number of frames, or PortAudio error code\n */\nstatic signed long GetStreamReadAvailable( PaStream *s )\n{\n    PaError result = paNoError;\n    PaAsiHpiStream *stream = (PaAsiHpiStream*)s;\n    PaAsiHpiStreamInfo info;\n\n    assert( stream );\n    PA_UNLESS_( stream->input, paCanNotReadFromAnOutputOnlyStream );\n\n    PA_ENSURE_( PaAsiHpi_GetStreamInfo( stream->input, &info ) );\n    /* Round down to the nearest host buffer multiple */\n    result = (info.availableFrames / stream->maxFramesPerHostBuffer) * stream->maxFramesPerHostBuffer;\n    if( info.overflow )\n    {\n        result = paInputOverflowed;\n    }\n\nerror:\n    return result;\n}\n\n\n/** Number of frames that can be written to output stream without blocking.\n\n @param s Pointer to PortAudio stream\n\n @return Number of frames, or PortAudio error code\n */\nstatic signed long GetStreamWriteAvailable( PaStream *s )\n{\n    PaError result = paNoError;\n    PaAsiHpiStream *stream = (PaAsiHpiStream*)s;\n    PaAsiHpiStreamInfo info;\n\n    assert( stream );\n    PA_UNLESS_( stream->output, paCanNotWriteToAnInputOnlyStream );\n\n    PA_ENSURE_( PaAsiHpi_GetStreamInfo( stream->output, &info ) );\n    /* Round down to the nearest host buffer multiple */\n    result = (info.availableFrames / stream->maxFramesPerHostBuffer) * stream->maxFramesPerHostBuffer;\n    if( info.underflow )\n    {\n        result = paOutputUnderflowed;\n    }\n\nerror:\n    return result;\n}\n"
  },
  {
    "path": "thirdparty/portaudio/src/hostapi/asio/ASIO-README.txt",
    "content": "ASIO-README.txt\n\nThis document contains information to help you compile PortAudio with \nASIO support. If you find any omissions or errors in this document \nplease notify us on the PortAudio mailing list.\n\nNOTE: The Macintosh sections of this document are provided for historical\nreference. They refer to pre-OS X Macintosh. PortAudio no longer\nsupports pre-OS X Macintosh. Steinberg does not support ASIO on Mac OS X.\n\n\nBuilding PortAudio with ASIO support\n------------------------------------\n\nTo build PortAudio with ASIO support you need to compile and link with\npa_asio.c, and files from the ASIO SDK (see below), along with the common \nPortAudio files from src/common/ and platform specific files from \nsrc/os/win/ (for Win32).\n\nIf you are compiling with a non-Microsoft compiler on Windows, also \ncompile and link with iasiothiscallresolver.cpp (see below for \nan explanation).\n\nFor some platforms (MingW, Cygwin/MingW), you may simply\nbe able to type:\n\n./configure --with-host_os=mingw --with-winapi=asio [--with-asiodir=/usr/local/asiosdk2]\nmake\n\nand life will be good. Make sure you update the above with the correct local\npath to the ASIO SDK.\n\n\nFor Microsoft Visual C++ there is an build tutorial here:\nhttp://www.portaudio.com/trac/wiki/TutorialDir/Compile/WindowsASIOMSVC\n\n\n\nObtaining the ASIO SDK\n----------------------\n\nIn order to build PortAudio with ASIO support, you need to download \nthe ASIO SDK (version 2.0 or later) from Steinberg. Steinberg makes the ASIO \nSDK available to anyone free of charge, however they do not permit its \nsource code to be distributed.\n\nNOTE: In some cases the ASIO SDK may require patching, see below \nfor further details.\n\nhttp://www.steinberg.net/en/company/developer.html\n\nIf the above link is broken search Google for:\n\"download steinberg ASIO SDK\"\n\n\n\nBuilding the ASIO SDK on Windows\n--------------------------------\n\nTo build the ASIO SDK on Windows you need to compile and link with the \nfollowing files from the ASIO SDK:\n\nasio_sdk\\common\\asio.cpp\nasio_sdk\\host\\asiodrivers.cpp\nasio_sdk\\host\\pc\\asiolist.cpp\n\nYou may also need to adjust your include paths to support inclusion of \nheader files from the above directories.\n\nThe ASIO SDK depends on the following COM API functions: \nCoInitialize, CoUninitialize, CoCreateInstance, CLSIDFromString\nFor compilation with MinGW you will need to link with -lole32, for\nBorland compilers link with Import32.lib.\n\n\n\nNon-Microsoft (MSVC) Compilers on Windows including Borland and GCC\n-------------------------------------------------------------------\n\nSteinberg did not specify a calling convention in the IASIO interface \ndefinition. This causes the Microsoft compiler to use the proprietary \nthiscall convention which is not compatible with other compilers, such \nas compilers from Borland (BCC and C++Builder) and GNU (gcc). \nSteinberg's ASIO SDK will compile but crash on initialization if \ncompiled with a non-Microsoft compiler on Windows.\n\nPortAudio solves this problem using the iasiothiscallresolver library \nwhich is included in the distribution. When building ASIO support for\nnon-Microsoft compilers, be sure to compile and link with\niasiothiscallresolver.cpp. Note that iasiothiscallresolver includes\nconditional directives which cause it to have no effect if it is\ncompiled with a Microsoft compiler, or on the Macintosh.\n\nIf you use configure and make (see above), this should be handled\nautomatically for you.\n\nFor further information about the IASIO thiscall problem see this page:\nhttp://www.rossbencina.com/code/iasio-thiscall-resolver\n\n\n\nBuilding the ASIO SDK on (Pre-OS X) Macintosh\n---------------------------------------------\n\nTo build the ASIO SDK on Macintosh you need to compile and link with the \nfollowing files from the ASIO SDK:\n\nhost/asiodrivers.cpp \nhost/mac/asioshlib.cpp \nhost/mac/codefragements.cpp\n\nYou may also need to adjust your include paths to support inclusion of \nheader files from the above directories.\n\n\n\n(Pre-OS X) Macintosh ASIO SDK Bug Patch\n---------------------------------------\n\nThere is a bug in the ASIO SDK that causes the Macintosh version to \noften fail during initialization. Below is a patch that you can apply.\n\nIn codefragments.cpp replace getFrontProcessDirectory function with \nthe following one (GetFrontProcess replaced by GetCurrentProcess).\n\n\nbool CodeFragments::getFrontProcessDirectory(void *specs)\n{\n\tFSSpec *fss = (FSSpec *)specs;\n\tProcessInfoRec pif;\n\tProcessSerialNumber psn;\n\n\tmemset(&psn,0,(long)sizeof(ProcessSerialNumber));\n\t//  if(GetFrontProcess(&psn) == noErr)  // wrong !!!\n\tif(GetCurrentProcess(&psn) == noErr)  // correct !!!\n\t{\n\t\tpif.processName = 0;\n\t\tpif.processAppSpec = fss;\n\t\tpif.processInfoLength = sizeof(ProcessInfoRec);\n\t\tif(GetProcessInformation(&psn, &pif) == noErr)\n\t\t\t\treturn true;\n\t}\n\treturn false;\n}\n\n\n###\n"
  },
  {
    "path": "thirdparty/portaudio/src/hostapi/asio/iasiothiscallresolver.cpp",
    "content": "/*\n\tIASIOThiscallResolver.cpp see the comments in iasiothiscallresolver.h for\n    the top level description - this comment describes the technical details of\n    the implementation.\n\n    The latest version of this file is available from:\n    http://www.audiomulch.com/~rossb/code/calliasio\n\n    please email comments to Ross Bencina <rossb@audiomulch.com>\n\n    BACKGROUND\n\n    The IASIO interface declared in the Steinberg ASIO 2 SDK declares\n    functions with no explicit calling convention. This causes MSVC++ to default\n    to using the thiscall convention, which is a proprietary convention not\n    implemented by some non-microsoft compilers - notably borland BCC,\n    C++Builder, and gcc. MSVC++ is the defacto standard compiler used by\n    Steinberg. As a result of this situation, the ASIO sdk will compile with\n    any compiler, however attempting to execute the compiled code will cause a\n    crash due to different default calling conventions on non-Microsoft\n    compilers.\n\n    IASIOThiscallResolver solves the problem by providing an adapter class that\n    delegates to the IASIO interface using the correct calling convention\n    (thiscall). Due to the lack of support for thiscall in the Borland and GCC\n    compilers, the calls have been implemented in assembly language.\n\n    A number of macros are defined for thiscall function calls with different\n    numbers of parameters, with and without return values - it may be possible\n    to modify the format of these macros to make them work with other inline\n    assemblers.\n\n\n    THISCALL DEFINITION\n\n    A number of definitions of the thiscall calling convention are floating\n    around the internet. The following definition has been validated against\n    output from the MSVC++ compiler:\n\n    For non-vararg functions, thiscall works as follows: the object (this)\n    pointer is passed in ECX. All arguments are passed on the stack in\n    right to left order. The return value is placed in EAX. The callee\n    clears the passed arguments from the stack.\n\n\n    FINDING FUNCTION POINTERS FROM AN IASIO POINTER\n\n    The first field of a COM object is a pointer to its vtble. Thus a pointer\n    to an object implementing the IASIO interface also points to a pointer to\n    that object's vtbl. The vtble is a table of function pointers for all of\n    the virtual functions exposed by the implemented interfaces.\n\n    If we consider a variable declared as a pointer to IASO:\n\n    IASIO *theAsioDriver\n\n    theAsioDriver points to:\n\n    object implementing IASIO\n    {\n        IASIOvtbl *vtbl\n        other data\n    }\n\n    in other words, theAsioDriver points to a pointer to an IASIOvtbl\n\n    vtbl points to a table of function pointers:\n\n    IASIOvtbl ( interface IASIO : public IUnknown )\n    {\n    (IUnknown functions)\n    0   virtual HRESULT STDMETHODCALLTYPE (*QueryInterface)(REFIID riid, void **ppv) = 0;\n    4   virtual ULONG STDMETHODCALLTYPE (*AddRef)() = 0;\n    8   virtual ULONG STDMETHODCALLTYPE (*Release)() = 0;      \n\n    (IASIO functions)\n    12\tvirtual ASIOBool (*init)(void *sysHandle) = 0;\n    16\tvirtual void (*getDriverName)(char *name) = 0;\n    20\tvirtual long (*getDriverVersion)() = 0;\n    24\tvirtual void (*getErrorMessage)(char *string) = 0;\n    28\tvirtual ASIOError (*start)() = 0;\n    32\tvirtual ASIOError (*stop)() = 0;\n    36\tvirtual ASIOError (*getChannels)(long *numInputChannels, long *numOutputChannels) = 0;\n    40\tvirtual ASIOError (*getLatencies)(long *inputLatency, long *outputLatency) = 0;\n    44\tvirtual ASIOError (*getBufferSize)(long *minSize, long *maxSize,\n            long *preferredSize, long *granularity) = 0;\n    48\tvirtual ASIOError (*canSampleRate)(ASIOSampleRate sampleRate) = 0;\n    52\tvirtual ASIOError (*getSampleRate)(ASIOSampleRate *sampleRate) = 0;\n    56\tvirtual ASIOError (*setSampleRate)(ASIOSampleRate sampleRate) = 0;\n    60\tvirtual ASIOError (*getClockSources)(ASIOClockSource *clocks, long *numSources) = 0;\n    64\tvirtual ASIOError (*setClockSource)(long reference) = 0;\n    68\tvirtual ASIOError (*getSamplePosition)(ASIOSamples *sPos, ASIOTimeStamp *tStamp) = 0;\n    72\tvirtual ASIOError (*getChannelInfo)(ASIOChannelInfo *info) = 0;\n    76\tvirtual ASIOError (*createBuffers)(ASIOBufferInfo *bufferInfos, long numChannels,\n            long bufferSize, ASIOCallbacks *callbacks) = 0;\n    80\tvirtual ASIOError (*disposeBuffers)() = 0;\n    84\tvirtual ASIOError (*controlPanel)() = 0;\n    88\tvirtual ASIOError (*future)(long selector,void *opt) = 0;\n    92\tvirtual ASIOError (*outputReady)() = 0;\n    };\n\n    The numbers in the left column show the byte offset of each function ptr\n    from the beginning of the vtbl. These numbers are used in the code below\n    to select different functions.\n\n    In order to find the address of a particular function, theAsioDriver\n    must first be dereferenced to find the value of the vtbl pointer:\n\n    mov     eax, theAsioDriver\n    mov     edx, [theAsioDriver]  // edx now points to vtbl[0]\n\n    Then an offset must be added to the vtbl pointer to select a\n    particular function, for example vtbl+44 points to the slot containing\n    a pointer to the getBufferSize function.\n\n    Finally vtbl+x must be dereferenced to obtain the value of the function\n    pointer stored in that address:\n\n    call    [edx+44]    // call the function pointed to by\n                        // the value in the getBufferSize field of the vtbl\n\n\n    SEE ALSO\n\n    Martin Fay's OpenASIO DLL at http://www.martinfay.com solves the same\n    problem by providing a new COM interface which wraps IASIO with an\n    interface that uses portable calling conventions. OpenASIO must be compiled\n    with MSVC, and requires that you ship the OpenASIO DLL with your\n    application.\n\n    \n    ACKNOWLEDGEMENTS\n\n    Ross Bencina: worked out the thiscall details above, wrote the original\n    Borland asm macros, and a patch for asio.cpp (which is no longer needed).\n    Thanks to Martin Fay for introducing me to the issues discussed here,\n    and to Rene G. Ceballos for assisting with asm dumps from MSVC++.\n\n    Antti Silvast: converted the original calliasio to work with gcc and NASM\n    by implementing the asm code in a separate file.\n\n\tFraser Adams: modified the original calliasio containing the Borland inline\n    asm to add inline asm for gcc i.e. Intel syntax for Borland and AT&T syntax\n    for gcc. This seems a neater approach for gcc than to have a separate .asm\n    file and it means that we only need one version of the thiscall patch.\n\n    Fraser Adams: rewrote the original calliasio patch in the form of the\n    IASIOThiscallResolver class in order to avoid modifications to files from\n    the Steinberg SDK, which may have had potential licence issues.\n\n    Andrew Baldwin: contributed fixes for compatibility problems with more\n    recent versions of the gcc assembler.\n*/\n\n\n// We only need IASIOThiscallResolver at all if we are on Win32. For other\n// platforms we simply bypass the IASIOThiscallResolver definition to allow us\n// to be safely #include'd whatever the platform to keep client code portable\n#if (defined(WIN32) || defined(_WIN32) || defined(__WIN32__)) && !defined(_WIN64)\n\n\n// If microsoft compiler we can call IASIO directly so IASIOThiscallResolver\n// is not used.\n#if !defined(_MSC_VER)\n\n\n#include <new>\n#include <assert.h>\n\n// We have a mechanism in iasiothiscallresolver.h to ensure that asio.h is\n// #include'd before it in client code, we do NOT want to do this test here.\n#define iasiothiscallresolver_sourcefile 1\n#include \"iasiothiscallresolver.h\"\n#undef iasiothiscallresolver_sourcefile\n\n// iasiothiscallresolver.h redefines ASIOInit for clients, but we don't want\n// this macro defined in this translation unit.\n#undef ASIOInit\n\n\n// theAsioDriver is a global pointer to the current IASIO instance which the\n// ASIO SDK uses to perform all actions on the IASIO interface. We substitute\n// our own forwarding interface into this pointer.\nextern IASIO* theAsioDriver;\n\n\n// The following macros define the inline assembler for BORLAND first then gcc\n\n#if defined(__BCPLUSPLUS__) || defined(__BORLANDC__)          \n\n\n#define CALL_THISCALL_0( resultName, thisPtr, funcOffset )\\\n    void *this_ = (thisPtr);                                                \\\n    __asm {                                                                 \\\n        mov     ecx, this_            ;                                     \\\n        mov     eax, [ecx]            ;                                     \\\n        call    [eax+funcOffset]      ;                                     \\\n        mov     resultName, eax       ;                                     \\\n    }\n\n\n#define CALL_VOID_THISCALL_1( thisPtr, funcOffset, param1 )\\\n    void *this_ = (thisPtr);                                                \\\n    __asm {                                                                 \\\n        mov     eax, param1           ;                                     \\\n        push    eax                   ;                                     \\\n        mov     ecx, this_            ;                                     \\\n        mov     eax, [ecx]            ;                                     \\\n        call    [eax+funcOffset]      ;                                     \\\n    }\n\n\n#define CALL_THISCALL_1( resultName, thisPtr, funcOffset, param1 )\\\n    void *this_ = (thisPtr);                                                \\\n    __asm {                                                                 \\\n        mov     eax, param1           ;                                     \\\n        push    eax                   ;                                     \\\n        mov     ecx, this_            ;                                     \\\n        mov     eax, [ecx]            ;                                     \\\n        call    [eax+funcOffset]      ;                                     \\\n        mov     resultName, eax       ;                                     \\\n    }\n\n\n#define CALL_THISCALL_1_DOUBLE( resultName, thisPtr, funcOffset, param1 )\\\n    void *this_ = (thisPtr);                                                \\\n    void *doubleParamPtr_ (&param1);                                        \\\n    __asm {                                                                 \\\n        mov     eax, doubleParamPtr_  ;                                     \\\n        push    [eax+4]               ;                                     \\\n        push    [eax]                 ;                                     \\\n        mov     ecx, this_            ;                                     \\\n        mov     eax, [ecx]            ;                                     \\\n        call    [eax+funcOffset]      ;                                     \\\n        mov     resultName, eax       ;                                     \\\n    }\n\n\n#define CALL_THISCALL_2( resultName, thisPtr, funcOffset, param1, param2 )\\\n    void *this_ = (thisPtr);                                                \\\n    __asm {                                                                 \\\n        mov     eax, param2           ;                                     \\\n        push    eax                   ;                                     \\\n        mov     eax, param1           ;                                     \\\n        push    eax                   ;                                     \\\n        mov     ecx, this_            ;                                     \\\n        mov     eax, [ecx]            ;                                     \\\n        call    [eax+funcOffset]      ;                                     \\\n        mov     resultName, eax       ;                                     \\\n    }\n\n\n#define CALL_THISCALL_4( resultName, thisPtr, funcOffset, param1, param2, param3, param4 )\\\n    void *this_ = (thisPtr);                                                \\\n    __asm {                                                                 \\\n        mov     eax, param4           ;                                     \\\n        push    eax                   ;                                     \\\n        mov     eax, param3           ;                                     \\\n        push    eax                   ;                                     \\\n        mov     eax, param2           ;                                     \\\n        push    eax                   ;                                     \\\n        mov     eax, param1           ;                                     \\\n        push    eax                   ;                                     \\\n        mov     ecx, this_            ;                                     \\\n        mov     eax, [ecx]            ;                                     \\\n        call    [eax+funcOffset]      ;                                     \\\n        mov     resultName, eax       ;                                     \\\n    }\n\n\n#elif defined(__GNUC__)\n\n\n#define CALL_THISCALL_0( resultName, thisPtr, funcOffset )                  \\\n    __asm__ __volatile__ (\"movl (%1), %%edx\\n\\t\"                            \\\n                          \"call *\"#funcOffset\"(%%edx)\\n\\t\"                  \\\n                          :\"=a\"(resultName) /* Output Operands */           \\\n                          :\"c\"(thisPtr)     /* Input Operands */            \\\n                          : \"%edx\" /* Clobbered Registers */                \\\n                         );                                                 \\\n\n\n#define CALL_VOID_THISCALL_1( thisPtr, funcOffset, param1 )                 \\\n    __asm__ __volatile__ (\"pushl %0\\n\\t\"                                    \\\n                          \"movl (%1), %%edx\\n\\t\"                            \\\n                          \"call *\"#funcOffset\"(%%edx)\\n\\t\"                  \\\n                          :                 /* Output Operands */           \\\n                          :\"r\"(param1),     /* Input Operands */            \\\n                           \"c\"(thisPtr)                                     \\\n                          : \"%edx\" /* Clobbered Registers */                \\\n                         );                                                 \\\n\n\n#define CALL_THISCALL_1( resultName, thisPtr, funcOffset, param1 )          \\\n    __asm__ __volatile__ (\"pushl %1\\n\\t\"                                    \\\n                          \"movl (%2), %%edx\\n\\t\"                            \\\n                          \"call *\"#funcOffset\"(%%edx)\\n\\t\"                  \\\n                          :\"=a\"(resultName) /* Output Operands */           \\\n                          :\"r\"(param1),     /* Input Operands */            \\\n                           \"c\"(thisPtr)                                     \\\n                          : \"%edx\" /* Clobbered Registers */                \\\n                          );                                                \\\n\n\n#define CALL_THISCALL_1_DOUBLE( resultName, thisPtr, funcOffset, param1 )   \\\n    do {                                                                    \\\n    double param1f64 = param1; /* Cast explicitly to double */              \\\n    double *param1f64Ptr = &param1f64; /* Make pointer to address */        \\\n     __asm__ __volatile__ (\"pushl 4(%1)\\n\\t\"                                \\\n                           \"pushl (%1)\\n\\t\"                                 \\\n                           \"movl (%2), %%edx\\n\\t\"                           \\\n                           \"call *\"#funcOffset\"(%%edx);\\n\\t\"                \\\n                           : \"=a\"(resultName) /* Output Operands */         \\\n                           : \"r\"(param1f64Ptr),  /* Input Operands */       \\\n                           \"c\"(thisPtr),                                    \\\n                           \"m\"(*param1f64Ptr) /* Using address */           \\\n                           : \"%edx\" /* Clobbered Registers */               \\\n                           );                                               \\\n    } while (0);                                                            \\\n\n\n#define CALL_THISCALL_2( resultName, thisPtr, funcOffset, param1, param2 )  \\\n    __asm__ __volatile__ (\"pushl %1\\n\\t\"                                    \\\n                          \"pushl %2\\n\\t\"                                    \\\n                          \"movl (%3), %%edx\\n\\t\"                            \\\n                          \"call *\"#funcOffset\"(%%edx)\\n\\t\"                  \\\n                          :\"=a\"(resultName) /* Output Operands */           \\\n                          :\"r\"(param2),     /* Input Operands */            \\\n                           \"r\"(param1),                                     \\\n                           \"c\"(thisPtr)                                     \\\n                          : \"%edx\" /* Clobbered Registers */                \\\n                          );                                                \\\n\n\n#define CALL_THISCALL_4( resultName, thisPtr, funcOffset, param1, param2, param3, param4 )\\\n    __asm__ __volatile__ (\"pushl %1\\n\\t\"                                    \\\n                          \"pushl %2\\n\\t\"                                    \\\n                          \"pushl %3\\n\\t\"                                    \\\n                          \"pushl %4\\n\\t\"                                    \\\n                          \"movl (%5), %%edx\\n\\t\"                            \\\n                          \"call *\"#funcOffset\"(%%edx)\\n\\t\"                  \\\n                          :\"=a\"(resultName) /* Output Operands */           \\\n                          :\"r\"(param4),     /* Input Operands  */           \\\n                           \"r\"(param3),                                     \\\n                           \"r\"(param2),                                     \\\n                           \"r\"(param1),                                     \\\n                           \"c\"(thisPtr)                                     \\\n                          : \"%edx\" /* Clobbered Registers */                \\\n                          );                                                \\\n\n#endif\n\n\n\n// Our static singleton instance.\nIASIOThiscallResolver IASIOThiscallResolver::instance;\n\n// Constructor called to initialize static Singleton instance above. Note that\n// it is important not to clear that_ incase it has already been set by the call\n// to placement new in ASIOInit().\nIASIOThiscallResolver::IASIOThiscallResolver()\n{\n}\n\n// Constructor called from ASIOInit() below\nIASIOThiscallResolver::IASIOThiscallResolver(IASIO* that)\n: that_( that )\n{\n}\n\n// Implement IUnknown methods as assert(false). IASIOThiscallResolver is not\n// really a COM object, just a wrapper which will work with the ASIO SDK.\n// If you wanted to use ASIO without the SDK you might want to implement COM\n// aggregation in these methods.\nHRESULT STDMETHODCALLTYPE IASIOThiscallResolver::QueryInterface(REFIID riid, void **ppv)\n{\n    (void)riid;     // suppress unused variable warning\n\n    assert( false ); // this function should never be called by the ASIO SDK.\n\n    *ppv = NULL;\n    return E_NOINTERFACE;\n}\n\nULONG STDMETHODCALLTYPE IASIOThiscallResolver::AddRef()\n{\n    assert( false ); // this function should never be called by the ASIO SDK.\n\n    return 1;\n}\n\nULONG STDMETHODCALLTYPE IASIOThiscallResolver::Release()\n{\n    assert( false ); // this function should never be called by the ASIO SDK.\n    \n    return 1;\n}\n\n\n// Implement the IASIO interface methods by performing the vptr manipulation\n// described above then delegating to the real implementation.\nASIOBool IASIOThiscallResolver::init(void *sysHandle)\n{\n    ASIOBool result;\n    CALL_THISCALL_1( result, that_, 12, sysHandle );\n    return result;\n}\n\nvoid IASIOThiscallResolver::getDriverName(char *name)\n{\n    CALL_VOID_THISCALL_1( that_, 16, name );\n}\n\nlong IASIOThiscallResolver::getDriverVersion()\n{\n    ASIOBool result;\n    CALL_THISCALL_0( result, that_, 20 );\n    return result;\n}\n\nvoid IASIOThiscallResolver::getErrorMessage(char *string)\n{\n     CALL_VOID_THISCALL_1( that_, 24, string );\n}\n\nASIOError IASIOThiscallResolver::start()\n{\n    ASIOBool result;\n    CALL_THISCALL_0( result, that_, 28 );\n    return result;\n}\n\nASIOError IASIOThiscallResolver::stop()\n{\n    ASIOBool result;\n    CALL_THISCALL_0( result, that_, 32 );\n    return result;\n}\n\nASIOError IASIOThiscallResolver::getChannels(long *numInputChannels, long *numOutputChannels)\n{\n    ASIOBool result;\n    CALL_THISCALL_2( result, that_, 36, numInputChannels, numOutputChannels );\n    return result;\n}\n\nASIOError IASIOThiscallResolver::getLatencies(long *inputLatency, long *outputLatency)\n{\n    ASIOBool result;\n    CALL_THISCALL_2( result, that_, 40, inputLatency, outputLatency );\n    return result;\n}\n\nASIOError IASIOThiscallResolver::getBufferSize(long *minSize, long *maxSize,\n        long *preferredSize, long *granularity)\n{\n    ASIOBool result;\n    CALL_THISCALL_4( result, that_, 44, minSize, maxSize, preferredSize, granularity );\n    return result;\n}\n\nASIOError IASIOThiscallResolver::canSampleRate(ASIOSampleRate sampleRate)\n{\n    ASIOBool result;\n    CALL_THISCALL_1_DOUBLE( result, that_, 48, sampleRate );\n    return result;\n}\n\nASIOError IASIOThiscallResolver::getSampleRate(ASIOSampleRate *sampleRate)\n{\n    ASIOBool result;\n    CALL_THISCALL_1( result, that_, 52, sampleRate );\n    return result;\n}\n\nASIOError IASIOThiscallResolver::setSampleRate(ASIOSampleRate sampleRate)\n{    \n    ASIOBool result;\n    CALL_THISCALL_1_DOUBLE( result, that_, 56, sampleRate );\n    return result;\n}\n\nASIOError IASIOThiscallResolver::getClockSources(ASIOClockSource *clocks, long *numSources)\n{\n    ASIOBool result;\n    CALL_THISCALL_2( result, that_, 60, clocks, numSources );\n    return result;\n}\n\nASIOError IASIOThiscallResolver::setClockSource(long reference)\n{\n    ASIOBool result;\n    CALL_THISCALL_1( result, that_, 64, reference );\n    return result;\n}\n\nASIOError IASIOThiscallResolver::getSamplePosition(ASIOSamples *sPos, ASIOTimeStamp *tStamp)\n{\n    ASIOBool result;\n    CALL_THISCALL_2( result, that_, 68, sPos, tStamp );\n    return result;\n}\n\nASIOError IASIOThiscallResolver::getChannelInfo(ASIOChannelInfo *info)\n{\n    ASIOBool result;\n    CALL_THISCALL_1( result, that_, 72, info );\n    return result;\n}\n\nASIOError IASIOThiscallResolver::createBuffers(ASIOBufferInfo *bufferInfos,\n        long numChannels, long bufferSize, ASIOCallbacks *callbacks)\n{\n    ASIOBool result;\n    CALL_THISCALL_4( result, that_, 76, bufferInfos, numChannels, bufferSize, callbacks );\n    return result;\n}\n\nASIOError IASIOThiscallResolver::disposeBuffers()\n{\n    ASIOBool result;\n    CALL_THISCALL_0( result, that_, 80 );\n    return result;\n}\n\nASIOError IASIOThiscallResolver::controlPanel()\n{\n    ASIOBool result;\n    CALL_THISCALL_0( result, that_, 84 );\n    return result;\n}\n\nASIOError IASIOThiscallResolver::future(long selector,void *opt)\n{\n    ASIOBool result;\n    CALL_THISCALL_2( result, that_, 88, selector, opt );\n    return result;\n}\n\nASIOError IASIOThiscallResolver::outputReady()\n{\n    ASIOBool result;\n    CALL_THISCALL_0( result, that_, 92 );\n    return result;\n}\n\n\n// Implement our substitute ASIOInit() method\nASIOError IASIOThiscallResolver::ASIOInit(ASIODriverInfo *info)\n{\n    // To ensure that our instance's vptr is correctly constructed, even if\n    // ASIOInit is called prior to main(), we explicitly call its constructor\n    // (potentially over the top of an existing instance). Note that this is\n    // pretty ugly, and is only safe because IASIOThiscallResolver has no\n    // destructor and contains no objects with destructors.\n    new((void*)&instance) IASIOThiscallResolver( theAsioDriver );\n\n    // Interpose between ASIO client code and the real driver.\n    theAsioDriver = &instance;\n\n    // Note that we never need to switch theAsioDriver back to point to the\n    // real driver because theAsioDriver is reset to zero in ASIOExit().\n\n    // Delegate to the real ASIOInit\n\treturn ::ASIOInit(info);\n}\n\n\n#endif /* !defined(_MSC_VER) */\n\n#endif /* Win32 */\n\n"
  },
  {
    "path": "thirdparty/portaudio/src/hostapi/asio/iasiothiscallresolver.h",
    "content": "// ****************************************************************************\n// File:\t\t\tIASIOThiscallResolver.h\n// Description:     The IASIOThiscallResolver class implements the IASIO\n//\t\t\t\t\tinterface and acts as a proxy to the real IASIO interface by\n//                  calling through its vptr table using the thiscall calling\n//                  convention. To put it another way, we interpose\n//                  IASIOThiscallResolver between ASIO SDK code and the driver.\n//                  This is necessary because most non-Microsoft compilers don't\n//                  implement the thiscall calling convention used by IASIO.\n//\n//\t\t\t\t\tiasiothiscallresolver.cpp contains the background of this\n//\t\t\t\t\tproblem plus a technical description of the vptr\n//                  manipulations.\n//\n//\t\t\t\t\tIn order to use this mechanism one simply has to add\n//\t\t\t\t\tiasiothiscallresolver.cpp to the list of files to compile\n//                  and #include <iasiothiscallresolver.h>\n//\n//\t\t\t\t\tNote that this #include must come after the other ASIO SDK\n//                  #includes, for example:\n//\n//\t\t\t\t\t#include <windows.h>\n//\t\t\t\t\t#include <asiosys.h>\n//\t\t\t\t\t#include <asio.h>\n//\t\t\t\t\t#include <asiodrivers.h>\n//\t\t\t\t\t#include <iasiothiscallresolver.h>\n//\n//\t\t\t\t\tActually the important thing is to #include\n//                  <iasiothiscallresolver.h> after <asio.h>. We have\n//                  incorporated a test to enforce this ordering.\n//\n//\t\t\t\t\tThe code transparently takes care of the interposition by\n//                  using macro substitution to intercept calls to ASIOInit()\n//                  and ASIOExit(). We save the original ASIO global\n//                  \"theAsioDriver\" in our \"that\" variable, and then set\n//                  \"theAsioDriver\" to equal our IASIOThiscallResolver instance.\n//\n// \t\t\t\t\tWhilst this method of resolving the thiscall problem requires\n//\t\t\t\t\tthe addition of #include <iasiothiscallresolver.h> to client\n//                  code it has the advantage that it does not break the terms\n//                  of the ASIO licence by publishing it. We are NOT modifying\n//                  any Steinberg code here, we are merely implementing the IASIO\n//\t\t\t\t\tinterface in the same way that we would need to do if we\n//\t\t\t\t\twished to provide an open source ASIO driver.\n//\n//\t\t\t\t\tFor compilation with MinGW -lole32 needs to be added to the\n//                  linker options. For BORLAND, linking with Import32.lib is\n//                  sufficient.\n//\n//\t\t\t\t\tThe dependencies are with: CoInitialize, CoUninitialize,\n//\t\t\t\t\tCoCreateInstance, CLSIDFromString - used by asiolist.cpp\n//\t\t\t\t\tand are required on Windows whether ThiscallResolver is used\n//\t\t\t\t\tor not.\n//\n//\t\t\t\t\tSearching for the above strings in the root library path\n//\t\t\t\t\tof your compiler should enable the correct libraries to be\n//\t\t\t\t\tidentified if they aren't immediately obvious.\n//\n//                  Note that the current implementation of IASIOThiscallResolver\n//                  is not COM compliant - it does not correctly implement the\n//                  IUnknown interface. Implementing it is not necessary because\n//                  it is not called by parts of the ASIO SDK which call through\n//                  theAsioDriver ptr. The IUnknown methods are implemented as\n//                  assert(false) to ensure that the code fails if they are\n//                  ever called.\n// Restrictions:\tNone. Public Domain & Open Source distribute freely\n//\t\t\t\t\tYou may use IASIOThiscallResolver commercially as well as\n//                  privately.\n//\t\t\t\t\tYou the user assume the responsibility for the use of the\n//\t\t\t\t\tfiles, binary or text, and there is no guarantee or warranty,\n//\t\t\t\t\texpressed or implied, including but not limited to the\n//\t\t\t\t\timplied warranties of merchantability and fitness for a\n//\t\t\t\t\tparticular purpose. You assume all responsibility and agree\n//\t\t\t\t\tto hold no entity, copyright holder or distributors liable\n//\t\t\t\t\tfor any loss of data or inaccurate representations of data\n//\t\t\t\t\tas a result of using IASIOThiscallResolver.\n// Version:         1.4 Added separate macro CALL_THISCALL_1_DOUBLE from\n//                  Andrew Baldwin, and volatile for whole gcc asm blocks,\n//                  both for compatibility with newer gcc versions. Cleaned up\n//                  Borland asm to use one less register.\n//                  1.3 Switched to including assert.h for better compatibility.\n//                  Wrapped entire .h and .cpp contents with a check for\n//                  _MSC_VER to provide better compatibility with MS compilers.\n//                  Changed Singleton implementation to use static instance\n//                  instead of freestore allocated instance. Removed ASIOExit\n//                  macro as it is no longer needed.\n//                  1.2 Removed semicolons from ASIOInit and ASIOExit macros to\n//                  allow them to be embedded in expressions (if statements).\n//                  Cleaned up some comments. Removed combase.c dependency (it\n//                  doesn't compile with BCB anyway) by stubbing IUnknown.\n//                  1.1 Incorporated comments from Ross Bencina including things\n//\t\t\t\t\tsuch as changing name from ThiscallResolver to\n//\t\t\t\t\tIASIOThiscallResolver, tidying up the constructor, fixing\n//\t\t\t\t\ta bug in IASIOThiscallResolver::ASIOExit() and improving\n//\t\t\t\t\tportability through the use of conditional compilation\n//\t\t\t\t\t1.0 Initial working version.\n// Created:\t\t\t6/09/2003\n// Authors:         Fraser Adams\n//                  Ross Bencina\n//                  Rene G. Ceballos\n//                  Martin Fay\n//                  Antti Silvast\n//                  Andrew Baldwin\n//\n// ****************************************************************************\n\n\n#ifndef included_iasiothiscallresolver_h\n#define included_iasiothiscallresolver_h\n\n// We only need IASIOThiscallResolver at all if we are on Win32. For other\n// platforms we simply bypass the IASIOThiscallResolver definition to allow us\n// to be safely #include'd whatever the platform to keep client code portable\n#if (defined(WIN32) || defined(_WIN32) || defined(__WIN32__)) && !defined(_WIN64)\n\n\n// If microsoft compiler we can call IASIO directly so IASIOThiscallResolver\n// is not used.\n#if !defined(_MSC_VER)\n\n\n// The following is in order to ensure that this header is only included after\n// the other ASIO headers (except for the case of iasiothiscallresolver.cpp).\n// We need to do this because IASIOThiscallResolver works by eclipsing the\n// original definition of ASIOInit() with a macro (see below).\n#if !defined(iasiothiscallresolver_sourcefile)\n\t#if !defined(__ASIO_H)\n\t#error iasiothiscallresolver.h must be included AFTER asio.h\n\t#endif\n#endif\n\n#include <windows.h>\n#include <asiodrvr.h> /* From ASIO SDK */\n\n\nclass IASIOThiscallResolver : public IASIO {\nprivate:\n\tIASIO* that_; // Points to the real IASIO\n\n\tstatic IASIOThiscallResolver instance; // Singleton instance\n\n\t// Constructors - declared private so construction is limited to\n    // our Singleton instance\n    IASIOThiscallResolver();\n\tIASIOThiscallResolver(IASIO* that);\npublic:\n\n    // Methods from the IUnknown interface. We don't fully implement IUnknown\n    // because the ASIO SDK never calls these methods through theAsioDriver ptr.\n    // These methods are implemented as assert(false).\n    virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void **ppv);\n    virtual ULONG STDMETHODCALLTYPE AddRef();\n    virtual ULONG STDMETHODCALLTYPE Release();\n\n    // Methods from the IASIO interface, implemented as forwarning calls to that.\n\tvirtual ASIOBool init(void *sysHandle);\n\tvirtual void getDriverName(char *name);\n\tvirtual long getDriverVersion();\n\tvirtual void getErrorMessage(char *string);\n\tvirtual ASIOError start();\n\tvirtual ASIOError stop();\n\tvirtual ASIOError getChannels(long *numInputChannels, long *numOutputChannels);\n\tvirtual ASIOError getLatencies(long *inputLatency, long *outputLatency);\n\tvirtual ASIOError getBufferSize(long *minSize, long *maxSize, long *preferredSize, long *granularity);\n\tvirtual ASIOError canSampleRate(ASIOSampleRate sampleRate);\n\tvirtual ASIOError getSampleRate(ASIOSampleRate *sampleRate);\n\tvirtual ASIOError setSampleRate(ASIOSampleRate sampleRate);\n\tvirtual ASIOError getClockSources(ASIOClockSource *clocks, long *numSources);\n\tvirtual ASIOError setClockSource(long reference);\n\tvirtual ASIOError getSamplePosition(ASIOSamples *sPos, ASIOTimeStamp *tStamp);\n\tvirtual ASIOError getChannelInfo(ASIOChannelInfo *info);\n\tvirtual ASIOError createBuffers(ASIOBufferInfo *bufferInfos, long numChannels, long bufferSize, ASIOCallbacks *callbacks);\n\tvirtual ASIOError disposeBuffers();\n\tvirtual ASIOError controlPanel();\n\tvirtual ASIOError future(long selector,void *opt);\n\tvirtual ASIOError outputReady();\n\n    // Class method, see ASIOInit() macro below.\n    static ASIOError ASIOInit(ASIODriverInfo *info); // Delegates to ::ASIOInit\n};\n\n\n// Replace calls to ASIOInit with our interposing version.\n// This macro enables us to perform thiscall resolution simply by #including\n// <iasiothiscallresolver.h> after the asio #includes (this file _must_ be\n// included _after_ the asio #includes)\n\n#define ASIOInit(name) IASIOThiscallResolver::ASIOInit((name))\n\n\n#endif /* !defined(_MSC_VER) */\n\n#endif /* Win32 */\n\n#endif /* included_iasiothiscallresolver_h */\n\n\n"
  },
  {
    "path": "thirdparty/portaudio/src/hostapi/asio/pa_asio.cpp",
    "content": "/*\n * $Id$\n * Portable Audio I/O Library for ASIO Drivers\n *\n * Author: Stephane Letz\n * Based on the Open Source API proposed by Ross Bencina\n * Copyright (c) 2000-2002 Stephane Letz, Phil Burk, Ross Bencina\n * Blocking i/o implementation by Sven Fischer, Institute of Hearing\n * Technology and Audiology (www.hoertechnik-audiologie.de)\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n/* Modification History\n\n        08-03-01 First version : Stephane Letz\n        08-06-01 Tweaks for PC, use C++, buffer allocation, Float32 to Int32 conversion : Phil Burk\n        08-20-01 More conversion, PA_StreamTime, Pa_GetHostError : Stephane Letz\n        08-21-01 PaUInt8 bug correction, implementation of ASIOSTFloat32LSB and ASIOSTFloat32MSB native formats : Stephane Letz\n        08-24-01 MAX_INT32_FP hack, another Uint8 fix : Stephane and Phil\n        08-27-01 Implementation of hostBufferSize < userBufferSize case, better management of the output buffer when\n                 the stream is stopped : Stephane Letz\n        08-28-01 Check the stream pointer for null in bufferSwitchTimeInfo, correct bug in bufferSwitchTimeInfo when\n                 the stream is stopped : Stephane Letz\n        10-12-01 Correct the PaHost_CalcNumHostBuffers function: computes FramesPerHostBuffer to be the lowest that\n                 respect requested FramesPerUserBuffer and userBuffersPerHostBuffer : Stephane Letz\n        10-26-01 Management of hostBufferSize and userBufferSize of any size : Stephane Letz\n        10-27-01 Improve calculus of hostBufferSize to be multiple or divisor of userBufferSize if possible : Stephane and Phil\n        10-29-01 Change MAX_INT32_FP to (2147483520.0f) to prevent roundup to 0x80000000 : Phil Burk\n        10-31-01 Clear the output buffer and user buffers in PaHost_StartOutput, correct bug in GetFirstMultiple : Stephane Letz\n        11-06-01 Rename functions : Stephane Letz\n        11-08-01 New Pa_ASIO_Adaptor_Init function to init Callback adpatation variables, cleanup of Pa_ASIO_Callback_Input: Stephane Letz\n        11-29-01 Break apart device loading to debug random failure in Pa_ASIO_QueryDeviceInfo ; Phil Burk\n        01-03-02 Deallocate all resources in PaHost_Term for cases where Pa_CloseStream is not called properly :  Stephane Letz\n        02-01-02 Cleanup, test of multiple-stream opening : Stephane Letz\n        19-02-02 New Pa_ASIO_loadDriver that calls CoInitialize on each thread on Windows : Stephane Letz\n        09-04-02 Correct error code management in PaHost_Term, removes various compiler warning : Stephane Letz\n        12-04-02 Add Mac includes for <Devices.h> and <Timer.h> : Phil Burk\n        13-04-02 Removes another compiler warning : Stephane Letz\n        30-04-02 Pa_ASIO_QueryDeviceInfo bug correction, memory allocation checking, better error handling : D Viens, P Burk, S Letz\n        12-06-02 Rehashed into new multi-api infrastructure, added support for all ASIO sample formats : Ross Bencina\n        18-06-02 Added pa_asio.h, PaAsio_GetAvailableLatencyValues() : Ross B.\n        21-06-02 Added SelectHostBufferSize() which selects host buffer size based on user latency parameters : Ross Bencina\n        ** NOTE  maintenance history is now stored in CVS **\n*/\n\n/** @file\n    @ingroup hostapi_src\n\n    Note that specific support for paInputUnderflow, paOutputOverflow and\n    paNeverDropInput is not necessary or possible with this driver due to the\n    synchronous full duplex double-buffered architecture of ASIO.\n*/\n\n\n#include <stdio.h>\n#include <assert.h>\n#include <string.h>\n//#include <values.h>\n#include <new>\n\n#include <windows.h>\n#include <mmsystem.h>\n\n#include \"portaudio.h\"\n#include \"pa_asio.h\"\n#include \"pa_util.h\"\n#include \"pa_allocation.h\"\n#include \"pa_hostapi.h\"\n#include \"pa_stream.h\"\n#include \"pa_cpuload.h\"\n#include \"pa_process.h\"\n#include \"pa_debugprint.h\"\n#include \"pa_ringbuffer.h\"\n\n#include \"pa_win_coinitialize.h\"\n\n/* This version of pa_asio.cpp is currently only targeted at Win32,\n   It would require a few tweaks to work with pre-OS X Macintosh.\n   To make configuration easier, we define WIN32 here to make sure\n   that the ASIO SDK knows this is Win32.\n*/\n#ifndef WIN32\n#define WIN32\n#endif\n\n#include \"asiosys.h\"\n#include \"asio.h\"\n#include \"asiodrivers.h\"\n#include \"iasiothiscallresolver.h\"\n\n/*\n#if MAC\n#include <Devices.h>\n#include <Timer.h>\n#include <Math64.h>\n#else\n*/\n/*\n#include <math.h>\n#include <windows.h>\n#include <mmsystem.h>\n*/\n/*\n#endif\n*/\n\n\n/* winmm.lib is needed for timeGetTime() (this is in winmm.a if you're using gcc) */\n#if (defined(WIN32) && (defined(_MSC_VER) && (_MSC_VER >= 1200))) /* MSC version 6 and above */\n#pragma comment(lib, \"winmm.lib\")\n#endif\n\n\n/* external reference to ASIO SDK's asioDrivers.\n\n This is a bit messy because we want to explicitly manage\n allocation/deallocation of this structure, but some layers of the SDK\n which we currently use (eg the implementation in asio.cpp) still\n use this global version.\n\n For now we keep it in sync with our local instance in the host\n API representation structure, but later we should be able to remove\n all dependence on it.\n*/\nextern AsioDrivers* asioDrivers;\n\n\n/* We are trying to be compatible with CARBON but this has not been thoroughly tested. */\n/* not tested at all since new V19 code was introduced. */\n#define CARBON_COMPATIBLE  (0)\n\n\n/* prototypes for functions declared in this file */\n\nextern \"C\" PaError PaAsio_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex hostApiIndex );\nstatic void Terminate( struct PaUtilHostApiRepresentation *hostApi );\nstatic PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,\n                           PaStream** s,\n                           const PaStreamParameters *inputParameters,\n                           const PaStreamParameters *outputParameters,\n                           double sampleRate,\n                           unsigned long framesPerBuffer,\n                           PaStreamFlags streamFlags,\n                           PaStreamCallback *streamCallback,\n                           void *userData );\nstatic PaError IsFormatSupported( struct PaUtilHostApiRepresentation *hostApi,\n                                  const PaStreamParameters *inputParameters,\n                                  const PaStreamParameters *outputParameters,\n                                  double sampleRate );\nstatic PaError CloseStream( PaStream* stream );\nstatic PaError StartStream( PaStream *stream );\nstatic PaError StopStream( PaStream *stream );\nstatic PaError AbortStream( PaStream *stream );\nstatic PaError IsStreamStopped( PaStream *s );\nstatic PaError IsStreamActive( PaStream *stream );\nstatic PaTime GetStreamTime( PaStream *stream );\nstatic double GetStreamCpuLoad( PaStream* stream );\nstatic PaError ReadStream( PaStream* stream, void *buffer, unsigned long frames );\nstatic PaError WriteStream( PaStream* stream, const void *buffer, unsigned long frames );\nstatic signed long GetStreamReadAvailable( PaStream* stream );\nstatic signed long GetStreamWriteAvailable( PaStream* stream );\n\n/* Blocking i/o callback function. */\nstatic int BlockingIoPaCallback(const void                     *inputBuffer    ,\n                                      void                     *outputBuffer   ,\n                                      unsigned long             framesPerBuffer,\n                                const PaStreamCallbackTimeInfo *timeInfo       ,\n                                      PaStreamCallbackFlags     statusFlags    ,\n                                      void                     *userData       );\n\n/* our ASIO callback functions */\n\nstatic void bufferSwitch(long index, ASIOBool processNow);\nstatic ASIOTime *bufferSwitchTimeInfo(ASIOTime *timeInfo, long index, ASIOBool processNow);\nstatic void sampleRateChanged(ASIOSampleRate sRate);\nstatic long asioMessages(long selector, long value, void* message, double* opt);\n\nstatic ASIOCallbacks asioCallbacks_ =\n    { bufferSwitch, sampleRateChanged, asioMessages, bufferSwitchTimeInfo };\n\n\n#define PA_ASIO_SET_LAST_HOST_ERROR( errorCode, errorText ) \\\n    PaUtil_SetLastHostErrorInfo( paASIO, errorCode, errorText )\n\n\nstatic void PaAsio_SetLastSystemError( DWORD errorCode )\n{\n    LPVOID lpMsgBuf;\n    FormatMessage(\n        FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,\n        NULL,\n        errorCode,\n        MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),\n        (LPTSTR) &lpMsgBuf,\n        0,\n        NULL\n    );\n    PaUtil_SetLastHostErrorInfo( paASIO, errorCode, (const char*)lpMsgBuf );\n    LocalFree( lpMsgBuf );\n}\n\n#define PA_ASIO_SET_LAST_SYSTEM_ERROR( errorCode ) \\\n    PaAsio_SetLastSystemError( errorCode )\n\n\nstatic const char* PaAsio_GetAsioErrorText( ASIOError asioError )\n{\n    const char *result;\n\n    switch( asioError ){\n        case ASE_OK:\n        case ASE_SUCCESS:           result = \"Success\"; break;\n        case ASE_NotPresent:        result = \"Hardware input or output is not present or available\"; break;\n        case ASE_HWMalfunction:     result = \"Hardware is malfunctioning\"; break;\n        case ASE_InvalidParameter:  result = \"Input parameter invalid\"; break;\n        case ASE_InvalidMode:       result = \"Hardware is in a bad mode or used in a bad mode\"; break;\n        case ASE_SPNotAdvancing:    result = \"Hardware is not running when sample position is inquired\"; break;\n        case ASE_NoClock:           result = \"Sample clock or rate cannot be determined or is not present\"; break;\n        case ASE_NoMemory:          result = \"Not enough memory for completing the request\"; break;\n        default:                    result = \"Unknown ASIO error\"; break;\n    }\n\n    return result;\n}\n\n\n#define PA_ASIO_SET_LAST_ASIO_ERROR( asioError ) \\\n    PaUtil_SetLastHostErrorInfo( paASIO, asioError, PaAsio_GetAsioErrorText( asioError ) )\n\n\n\n\n// Atomic increment and decrement operations\n#if MAC\n    /* need to be implemented on Mac */\n    inline long PaAsio_AtomicIncrement(volatile long* v) {return ++(*const_cast<long*>(v));}\n    inline long PaAsio_AtomicDecrement(volatile long* v) {return --(*const_cast<long*>(v));}\n#elif WINDOWS\n    inline long PaAsio_AtomicIncrement(volatile long* v) {return InterlockedIncrement(const_cast<long*>(v));}\n    inline long PaAsio_AtomicDecrement(volatile long* v) {return InterlockedDecrement(const_cast<long*>(v));}\n#endif\n\n\n\ntypedef struct PaAsioDriverInfo\n{\n    ASIODriverInfo asioDriverInfo;\n    long inputChannelCount, outputChannelCount;\n    long bufferMinSize, bufferMaxSize, bufferPreferredSize, bufferGranularity;\n    bool postOutput;\n}\nPaAsioDriverInfo;\n\n\n/* PaAsioHostApiRepresentation - host api datastructure specific to this implementation */\n\ntypedef struct\n{\n    PaUtilHostApiRepresentation inheritedHostApiRep;\n    PaUtilStreamInterface callbackStreamInterface;\n    PaUtilStreamInterface blockingStreamInterface;\n\n    PaUtilAllocationGroup *allocations;\n\n    PaWinUtilComInitializationResult comInitializationResult;\n\n    AsioDrivers *asioDrivers;\n    void *systemSpecific;\n\n    /* the ASIO C API only allows one ASIO driver to be open at a time,\n        so we keep track of whether we have the driver open here, and\n        use this information to return errors from OpenStream if the\n        driver is already open.\n\n        openAsioDeviceIndex will be PaNoDevice if there is no device open\n        and a valid pa_asio (not global) device index otherwise.\n\n        openAsioDriverInfo is populated with the driver info for the\n        currently open device (if any)\n    */\n    PaDeviceIndex openAsioDeviceIndex;\n    PaAsioDriverInfo openAsioDriverInfo;\n}\nPaAsioHostApiRepresentation;\n\n\n/*\n    Retrieve <driverCount> driver names from ASIO, returned in a char**\n    allocated in <group>.\n*/\nstatic char **GetAsioDriverNames( PaAsioHostApiRepresentation *asioHostApi, PaUtilAllocationGroup *group, long driverCount )\n{\n    char **result = 0;\n    int i;\n\n    result =(char**)PaUtil_GroupAllocateMemory(\n            group, sizeof(char*) * driverCount );\n    if( !result )\n        goto error;\n\n    result[0] = (char*)PaUtil_GroupAllocateMemory(\n            group, 32 * driverCount );\n    if( !result[0] )\n        goto error;\n\n    for( i=0; i<driverCount; ++i )\n        result[i] = result[0] + (32 * i);\n\n    asioHostApi->asioDrivers->getDriverNames( result, driverCount );\n\nerror:\n    return result;\n}\n\n\nstatic PaSampleFormat AsioSampleTypeToPaNativeSampleFormat(ASIOSampleType type)\n{\n    switch (type) {\n        case ASIOSTInt16MSB:\n        case ASIOSTInt16LSB:\n                return paInt16;\n\n        case ASIOSTFloat32MSB:\n        case ASIOSTFloat32LSB:\n        case ASIOSTFloat64MSB:\n        case ASIOSTFloat64LSB:\n                return paFloat32;\n\n        case ASIOSTInt32MSB:\n        case ASIOSTInt32LSB:\n        case ASIOSTInt32MSB16:\n        case ASIOSTInt32LSB16:\n        case ASIOSTInt32MSB18:\n        case ASIOSTInt32MSB20:\n        case ASIOSTInt32MSB24:\n        case ASIOSTInt32LSB18:\n        case ASIOSTInt32LSB20:\n        case ASIOSTInt32LSB24:\n                return paInt32;\n\n        case ASIOSTInt24MSB:\n        case ASIOSTInt24LSB:\n                return paInt24;\n\n        default:\n                return paCustomFormat;\n    }\n}\n\nvoid AsioSampleTypeLOG(ASIOSampleType type)\n{\n    switch (type) {\n        case ASIOSTInt16MSB:  PA_DEBUG((\"ASIOSTInt16MSB\\n\"));  break;\n        case ASIOSTInt16LSB:  PA_DEBUG((\"ASIOSTInt16LSB\\n\"));  break;\n        case ASIOSTFloat32MSB:PA_DEBUG((\"ASIOSTFloat32MSB\\n\"));break;\n        case ASIOSTFloat32LSB:PA_DEBUG((\"ASIOSTFloat32LSB\\n\"));break;\n        case ASIOSTFloat64MSB:PA_DEBUG((\"ASIOSTFloat64MSB\\n\"));break;\n        case ASIOSTFloat64LSB:PA_DEBUG((\"ASIOSTFloat64LSB\\n\"));break;\n        case ASIOSTInt32MSB:  PA_DEBUG((\"ASIOSTInt32MSB\\n\"));  break;\n        case ASIOSTInt32LSB:  PA_DEBUG((\"ASIOSTInt32LSB\\n\"));  break;\n        case ASIOSTInt32MSB16:PA_DEBUG((\"ASIOSTInt32MSB16\\n\"));break;\n        case ASIOSTInt32LSB16:PA_DEBUG((\"ASIOSTInt32LSB16\\n\"));break;\n        case ASIOSTInt32MSB18:PA_DEBUG((\"ASIOSTInt32MSB18\\n\"));break;\n        case ASIOSTInt32MSB20:PA_DEBUG((\"ASIOSTInt32MSB20\\n\"));break;\n        case ASIOSTInt32MSB24:PA_DEBUG((\"ASIOSTInt32MSB24\\n\"));break;\n        case ASIOSTInt32LSB18:PA_DEBUG((\"ASIOSTInt32LSB18\\n\"));break;\n        case ASIOSTInt32LSB20:PA_DEBUG((\"ASIOSTInt32LSB20\\n\"));break;\n        case ASIOSTInt32LSB24:PA_DEBUG((\"ASIOSTInt32LSB24\\n\"));break;\n        case ASIOSTInt24MSB:  PA_DEBUG((\"ASIOSTInt24MSB\\n\"));  break;\n        case ASIOSTInt24LSB:  PA_DEBUG((\"ASIOSTInt24LSB\\n\"));  break;\n        default:              PA_DEBUG((\"Custom Format%d\\n\",type));break;\n\n    }\n}\n\nstatic int BytesPerAsioSample( ASIOSampleType sampleType )\n{\n    switch (sampleType) {\n        case ASIOSTInt16MSB:\n        case ASIOSTInt16LSB:\n            return 2;\n\n        case ASIOSTFloat64MSB:\n        case ASIOSTFloat64LSB:\n            return 8;\n\n        case ASIOSTFloat32MSB:\n        case ASIOSTFloat32LSB:\n        case ASIOSTInt32MSB:\n        case ASIOSTInt32LSB:\n        case ASIOSTInt32MSB16:\n        case ASIOSTInt32LSB16:\n        case ASIOSTInt32MSB18:\n        case ASIOSTInt32MSB20:\n        case ASIOSTInt32MSB24:\n        case ASIOSTInt32LSB18:\n        case ASIOSTInt32LSB20:\n        case ASIOSTInt32LSB24:\n            return 4;\n\n        case ASIOSTInt24MSB:\n        case ASIOSTInt24LSB:\n            return 3;\n\n        default:\n            return 0;\n    }\n}\n\n\nstatic void Swap16( void *buffer, long shift, long count )\n{\n    unsigned short *p = (unsigned short*)buffer;\n    unsigned short temp;\n    (void) shift; /* unused parameter */\n\n    while( count-- )\n    {\n        temp = *p;\n        *p++ = (unsigned short)((temp<<8) | (temp>>8));\n    }\n}\n\nstatic void Swap24( void *buffer, long shift, long count )\n{\n    unsigned char *p = (unsigned char*)buffer;\n    unsigned char temp;\n    (void) shift; /* unused parameter */\n\n    while( count-- )\n    {\n        temp = *p;\n        *p = *(p+2);\n        *(p+2) = temp;\n        p += 3;\n    }\n}\n\n#define PA_SWAP32_( x ) ((x>>24) | ((x>>8)&0xFF00) | ((x<<8)&0xFF0000) | (x<<24));\n\nstatic void Swap32( void *buffer, long shift, long count )\n{\n    unsigned long *p = (unsigned long*)buffer;\n    unsigned long temp;\n    (void) shift; /* unused parameter */\n\n    while( count-- )\n    {\n        temp = *p;\n        *p++ = PA_SWAP32_( temp);\n    }\n}\n\nstatic void SwapShiftLeft32( void *buffer, long shift, long count )\n{\n    unsigned long *p = (unsigned long*)buffer;\n    unsigned long temp;\n\n    while( count-- )\n    {\n        temp = *p;\n        temp = PA_SWAP32_( temp);\n        *p++ = temp << shift;\n    }\n}\n\nstatic void ShiftRightSwap32( void *buffer, long shift, long count )\n{\n    unsigned long *p = (unsigned long*)buffer;\n    unsigned long temp;\n\n    while( count-- )\n    {\n        temp = *p >> shift;\n        *p++ = PA_SWAP32_( temp);\n    }\n}\n\nstatic void ShiftLeft32( void *buffer, long shift, long count )\n{\n    unsigned long *p = (unsigned long*)buffer;\n    unsigned long temp;\n\n    while( count-- )\n    {\n        temp = *p;\n        *p++ = temp << shift;\n    }\n}\n\nstatic void ShiftRight32( void *buffer, long shift, long count )\n{\n    unsigned long *p = (unsigned long*)buffer;\n    unsigned long temp;\n\n    while( count-- )\n    {\n        temp = *p;\n        *p++ = temp >> shift;\n    }\n}\n\n#define PA_SWAP_( x, y ) temp=x; x = y; y = temp;\n\nstatic void Swap64ConvertFloat64ToFloat32( void *buffer, long shift, long count )\n{\n    double *in = (double*)buffer;\n    float *out = (float*)buffer;\n    unsigned char *p;\n    unsigned char temp;\n    (void) shift; /* unused parameter */\n\n    while( count-- )\n    {\n        p = (unsigned char*)in;\n        PA_SWAP_( p[0], p[7] );\n        PA_SWAP_( p[1], p[6] );\n        PA_SWAP_( p[2], p[5] );\n        PA_SWAP_( p[3], p[4] );\n\n        *out++ = (float) (*in++);\n    }\n}\n\nstatic void ConvertFloat64ToFloat32( void *buffer, long shift, long count )\n{\n    double *in = (double*)buffer;\n    float *out = (float*)buffer;\n    (void) shift; /* unused parameter */\n\n    while( count-- )\n        *out++ = (float) (*in++);\n}\n\nstatic void ConvertFloat32ToFloat64Swap64( void *buffer, long shift, long count )\n{\n    float *in = ((float*)buffer) + (count-1);\n    double *out = ((double*)buffer) + (count-1);\n    unsigned char *p;\n    unsigned char temp;\n    (void) shift; /* unused parameter */\n\n    while( count-- )\n    {\n        *out = *in--;\n\n        p = (unsigned char*)out;\n        PA_SWAP_( p[0], p[7] );\n        PA_SWAP_( p[1], p[6] );\n        PA_SWAP_( p[2], p[5] );\n        PA_SWAP_( p[3], p[4] );\n\n        out--;\n    }\n}\n\nstatic void ConvertFloat32ToFloat64( void *buffer, long shift, long count )\n{\n    float *in = ((float*)buffer) + (count-1);\n    double *out = ((double*)buffer) + (count-1);\n    (void) shift; /* unused parameter */\n\n    while( count-- )\n        *out-- = *in--;\n}\n\n#ifdef MAC\n#define PA_MSB_IS_NATIVE_\n#undef PA_LSB_IS_NATIVE_\n#endif\n\n#ifdef WINDOWS\n#undef PA_MSB_IS_NATIVE_\n#define PA_LSB_IS_NATIVE_\n#endif\n\ntypedef void PaAsioBufferConverter( void *, long, long );\n\nstatic void SelectAsioToPaConverter( ASIOSampleType type, PaAsioBufferConverter **converter, long *shift )\n{\n    *shift = 0;\n    *converter = 0;\n\n    switch (type) {\n        case ASIOSTInt16MSB:\n            /* dest: paInt16, no conversion necessary, possible byte swap*/\n            #ifdef PA_LSB_IS_NATIVE_\n                *converter = Swap16;\n            #endif\n            break;\n        case ASIOSTInt16LSB:\n            /* dest: paInt16, no conversion necessary, possible byte swap*/\n            #ifdef PA_MSB_IS_NATIVE_\n                *converter = Swap16;\n            #endif\n            break;\n        case ASIOSTFloat32MSB:\n            /* dest: paFloat32, no conversion necessary, possible byte swap*/\n            #ifdef PA_LSB_IS_NATIVE_\n                *converter = Swap32;\n            #endif\n            break;\n        case ASIOSTFloat32LSB:\n            /* dest: paFloat32, no conversion necessary, possible byte swap*/\n            #ifdef PA_MSB_IS_NATIVE_\n                *converter = Swap32;\n            #endif\n            break;\n        case ASIOSTFloat64MSB:\n            /* dest: paFloat32, in-place conversion to/from float32, possible byte swap*/\n            #ifdef PA_LSB_IS_NATIVE_\n                *converter = Swap64ConvertFloat64ToFloat32;\n            #else\n                *converter = ConvertFloat64ToFloat32;\n            #endif\n            break;\n        case ASIOSTFloat64LSB:\n            /* dest: paFloat32, in-place conversion to/from float32, possible byte swap*/\n            #ifdef PA_MSB_IS_NATIVE_\n                *converter = Swap64ConvertFloat64ToFloat32;\n            #else\n                *converter = ConvertFloat64ToFloat32;\n            #endif\n            break;\n        case ASIOSTInt32MSB:\n            /* dest: paInt32, no conversion necessary, possible byte swap */\n            #ifdef PA_LSB_IS_NATIVE_\n                *converter = Swap32;\n            #endif\n            break;\n        case ASIOSTInt32LSB:\n            /* dest: paInt32, no conversion necessary, possible byte swap */\n            #ifdef PA_MSB_IS_NATIVE_\n                *converter = Swap32;\n            #endif\n            break;\n        case ASIOSTInt32MSB16:\n            /* dest: paInt32, 16 bit shift, possible byte swap */\n            #ifdef PA_LSB_IS_NATIVE_\n                *converter = SwapShiftLeft32;\n            #else\n                *converter = ShiftLeft32;\n            #endif\n            *shift = 16;\n            break;\n        case ASIOSTInt32MSB18:\n            /* dest: paInt32, 14 bit shift, possible byte swap */\n            #ifdef PA_LSB_IS_NATIVE_\n                *converter = SwapShiftLeft32;\n            #else\n                *converter = ShiftLeft32;\n            #endif\n            *shift = 14;\n            break;\n        case ASIOSTInt32MSB20:\n            /* dest: paInt32, 12 bit shift, possible byte swap */\n            #ifdef PA_LSB_IS_NATIVE_\n                *converter = SwapShiftLeft32;\n            #else\n                *converter = ShiftLeft32;\n            #endif\n            *shift = 12;\n            break;\n        case ASIOSTInt32MSB24:\n            /* dest: paInt32, 8 bit shift, possible byte swap */\n            #ifdef PA_LSB_IS_NATIVE_\n                *converter = SwapShiftLeft32;\n            #else\n                *converter = ShiftLeft32;\n            #endif\n            *shift = 8;\n            break;\n        case ASIOSTInt32LSB16:\n            /* dest: paInt32, 16 bit shift, possible byte swap */\n            #ifdef PA_MSB_IS_NATIVE_\n                *converter = SwapShiftLeft32;\n            #else\n                *converter = ShiftLeft32;\n            #endif\n            *shift = 16;\n            break;\n        case ASIOSTInt32LSB18:\n            /* dest: paInt32, 14 bit shift, possible byte swap */\n            #ifdef PA_MSB_IS_NATIVE_\n                *converter = SwapShiftLeft32;\n            #else\n                *converter = ShiftLeft32;\n            #endif\n            *shift = 14;\n            break;\n        case ASIOSTInt32LSB20:\n            /* dest: paInt32, 12 bit shift, possible byte swap */\n            #ifdef PA_MSB_IS_NATIVE_\n                *converter = SwapShiftLeft32;\n            #else\n                *converter = ShiftLeft32;\n            #endif\n            *shift = 12;\n            break;\n        case ASIOSTInt32LSB24:\n            /* dest: paInt32, 8 bit shift, possible byte swap */\n            #ifdef PA_MSB_IS_NATIVE_\n                *converter = SwapShiftLeft32;\n            #else\n                *converter = ShiftLeft32;\n            #endif\n            *shift = 8;\n            break;\n        case ASIOSTInt24MSB:\n            /* dest: paInt24, no conversion necessary, possible byte swap */\n            #ifdef PA_LSB_IS_NATIVE_\n                *converter = Swap24;\n            #endif\n            break;\n        case ASIOSTInt24LSB:\n            /* dest: paInt24, no conversion necessary, possible byte swap */\n            #ifdef PA_MSB_IS_NATIVE_\n                *converter = Swap24;\n            #endif\n            break;\n    }\n}\n\n\nstatic void SelectPaToAsioConverter( ASIOSampleType type, PaAsioBufferConverter **converter, long *shift )\n{\n    *shift = 0;\n    *converter = 0;\n\n    switch (type) {\n        case ASIOSTInt16MSB:\n            /* src: paInt16, no conversion necessary, possible byte swap*/\n            #ifdef PA_LSB_IS_NATIVE_\n                *converter = Swap16;\n            #endif\n            break;\n        case ASIOSTInt16LSB:\n            /* src: paInt16, no conversion necessary, possible byte swap*/\n            #ifdef PA_MSB_IS_NATIVE_\n                *converter = Swap16;\n            #endif\n            break;\n        case ASIOSTFloat32MSB:\n            /* src: paFloat32, no conversion necessary, possible byte swap*/\n            #ifdef PA_LSB_IS_NATIVE_\n                *converter = Swap32;\n            #endif\n            break;\n        case ASIOSTFloat32LSB:\n            /* src: paFloat32, no conversion necessary, possible byte swap*/\n            #ifdef PA_MSB_IS_NATIVE_\n                *converter = Swap32;\n            #endif\n            break;\n        case ASIOSTFloat64MSB:\n            /* src: paFloat32, in-place conversion to/from float32, possible byte swap*/\n            #ifdef PA_LSB_IS_NATIVE_\n                *converter = ConvertFloat32ToFloat64Swap64;\n            #else\n                *converter = ConvertFloat32ToFloat64;\n            #endif\n            break;\n        case ASIOSTFloat64LSB:\n            /* src: paFloat32, in-place conversion to/from float32, possible byte swap*/\n            #ifdef PA_MSB_IS_NATIVE_\n                *converter = ConvertFloat32ToFloat64Swap64;\n            #else\n                *converter = ConvertFloat32ToFloat64;\n            #endif\n            break;\n        case ASIOSTInt32MSB:\n            /* src: paInt32, no conversion necessary, possible byte swap */\n            #ifdef PA_LSB_IS_NATIVE_\n                *converter = Swap32;\n            #endif\n            break;\n        case ASIOSTInt32LSB:\n            /* src: paInt32, no conversion necessary, possible byte swap */\n            #ifdef PA_MSB_IS_NATIVE_\n                *converter = Swap32;\n            #endif\n            break;\n        case ASIOSTInt32MSB16:\n            /* src: paInt32, 16 bit shift, possible byte swap */\n            #ifdef PA_LSB_IS_NATIVE_\n                *converter = ShiftRightSwap32;\n            #else\n                *converter = ShiftRight32;\n            #endif\n            *shift = 16;\n            break;\n        case ASIOSTInt32MSB18:\n            /* src: paInt32, 14 bit shift, possible byte swap */\n            #ifdef PA_LSB_IS_NATIVE_\n                *converter = ShiftRightSwap32;\n            #else\n                *converter = ShiftRight32;\n            #endif\n            *shift = 14;\n            break;\n        case ASIOSTInt32MSB20:\n            /* src: paInt32, 12 bit shift, possible byte swap */\n            #ifdef PA_LSB_IS_NATIVE_\n                *converter = ShiftRightSwap32;\n            #else\n                *converter = ShiftRight32;\n            #endif\n            *shift = 12;\n            break;\n        case ASIOSTInt32MSB24:\n            /* src: paInt32, 8 bit shift, possible byte swap */\n            #ifdef PA_LSB_IS_NATIVE_\n                *converter = ShiftRightSwap32;\n            #else\n                *converter = ShiftRight32;\n            #endif\n            *shift = 8;\n            break;\n        case ASIOSTInt32LSB16:\n            /* src: paInt32, 16 bit shift, possible byte swap */\n            #ifdef PA_MSB_IS_NATIVE_\n                *converter = ShiftRightSwap32;\n            #else\n                *converter = ShiftRight32;\n            #endif\n            *shift = 16;\n            break;\n        case ASIOSTInt32LSB18:\n            /* src: paInt32, 14 bit shift, possible byte swap */\n            #ifdef PA_MSB_IS_NATIVE_\n                *converter = ShiftRightSwap32;\n            #else\n                *converter = ShiftRight32;\n            #endif\n            *shift = 14;\n            break;\n        case ASIOSTInt32LSB20:\n            /* src: paInt32, 12 bit shift, possible byte swap */\n            #ifdef PA_MSB_IS_NATIVE_\n                *converter = ShiftRightSwap32;\n            #else\n                *converter = ShiftRight32;\n            #endif\n            *shift = 12;\n            break;\n        case ASIOSTInt32LSB24:\n            /* src: paInt32, 8 bit shift, possible byte swap */\n            #ifdef PA_MSB_IS_NATIVE_\n                *converter = ShiftRightSwap32;\n            #else\n                *converter = ShiftRight32;\n            #endif\n            *shift = 8;\n            break;\n        case ASIOSTInt24MSB:\n            /* src: paInt24, no conversion necessary, possible byte swap */\n            #ifdef PA_LSB_IS_NATIVE_\n                *converter = Swap24;\n            #endif\n            break;\n        case ASIOSTInt24LSB:\n            /* src: paInt24, no conversion necessary, possible byte swap */\n            #ifdef PA_MSB_IS_NATIVE_\n                *converter = Swap24;\n            #endif\n            break;\n    }\n}\n\n\ntypedef struct PaAsioDeviceInfo\n{\n    PaDeviceInfo commonDeviceInfo;\n    long minBufferSize;\n    long maxBufferSize;\n    long preferredBufferSize;\n    long bufferGranularity;\n\n    ASIOChannelInfo *asioChannelInfos;\n}\nPaAsioDeviceInfo;\n\n\nPaError PaAsio_GetAvailableBufferSizes( PaDeviceIndex device,\n        long *minBufferSizeFrames, long *maxBufferSizeFrames, long *preferredBufferSizeFrames, long *granularity )\n{\n    PaError result;\n    PaUtilHostApiRepresentation *hostApi;\n    PaDeviceIndex hostApiDevice;\n\n    result = PaUtil_GetHostApiRepresentation( &hostApi, paASIO );\n\n    if( result == paNoError )\n    {\n        result = PaUtil_DeviceIndexToHostApiDeviceIndex( &hostApiDevice, device, hostApi );\n\n        if( result == paNoError )\n        {\n            PaAsioDeviceInfo *asioDeviceInfo =\n                    (PaAsioDeviceInfo*)hostApi->deviceInfos[hostApiDevice];\n\n            *minBufferSizeFrames = asioDeviceInfo->minBufferSize;\n            *maxBufferSizeFrames = asioDeviceInfo->maxBufferSize;\n            *preferredBufferSizeFrames = asioDeviceInfo->preferredBufferSize;\n            *granularity = asioDeviceInfo->bufferGranularity;\n        }\n    }\n\n    return result;\n}\n\n/* Unload whatever we loaded in LoadAsioDriver().\n*/\nstatic void UnloadAsioDriver( void )\n{\n    ASIOExit();\n}\n\n/*\n    load the asio driver named by <driverName> and return statistics about\n    the driver in info. If no error occurred, the driver will remain open\n    and must be closed by the called by calling UnloadAsioDriver() - if an error\n    is returned the driver will already be unloaded.\n*/\nstatic PaError LoadAsioDriver( PaAsioHostApiRepresentation *asioHostApi, const char *driverName,\n        PaAsioDriverInfo *driverInfo, void *systemSpecific )\n{\n    PaError result = paNoError;\n    ASIOError asioError;\n    int asioIsInitialized = 0;\n\n    if( !asioHostApi->asioDrivers->loadDriver( const_cast<char*>(driverName) ) )\n    {\n        result = paUnanticipatedHostError;\n        PA_ASIO_SET_LAST_HOST_ERROR( 0, \"Failed to load ASIO driver\" );\n        goto error;\n    }\n\n    memset( &driverInfo->asioDriverInfo, 0, sizeof(ASIODriverInfo) );\n    driverInfo->asioDriverInfo.asioVersion = 2;\n    driverInfo->asioDriverInfo.sysRef = systemSpecific;\n    if( (asioError = ASIOInit( &driverInfo->asioDriverInfo )) != ASE_OK )\n    {\n        result = paUnanticipatedHostError;\n        PA_ASIO_SET_LAST_ASIO_ERROR( asioError );\n        goto error;\n    }\n    else\n    {\n        asioIsInitialized = 1;\n    }\n\n    if( (asioError = ASIOGetChannels(&driverInfo->inputChannelCount,\n            &driverInfo->outputChannelCount)) != ASE_OK )\n    {\n        result = paUnanticipatedHostError;\n        PA_ASIO_SET_LAST_ASIO_ERROR( asioError );\n        goto error;\n    }\n\n    if( (asioError = ASIOGetBufferSize(&driverInfo->bufferMinSize,\n            &driverInfo->bufferMaxSize, &driverInfo->bufferPreferredSize,\n            &driverInfo->bufferGranularity)) != ASE_OK )\n    {\n        result = paUnanticipatedHostError;\n        PA_ASIO_SET_LAST_ASIO_ERROR( asioError );\n        goto error;\n    }\n\n    if( ASIOOutputReady() == ASE_OK )\n        driverInfo->postOutput = true;\n    else\n        driverInfo->postOutput = false;\n\n    return result;\n\nerror:\n    if( asioIsInitialized )\n    {\n        ASIOExit();\n    }\n\n    return result;\n}\n\n\n#define PA_DEFAULTSAMPLERATESEARCHORDER_COUNT_     13   /* must be the same number of elements as in the array below */\nstatic ASIOSampleRate defaultSampleRateSearchOrder_[]\n     = {44100.0, 48000.0, 32000.0, 24000.0, 22050.0, 88200.0, 96000.0,\n        192000.0, 16000.0, 12000.0, 11025.0, 9600.0, 8000.0 };\n\n\nstatic PaError InitPaDeviceInfoFromAsioDriver( PaAsioHostApiRepresentation *asioHostApi,\n        const char *driverName, int driverIndex,\n        PaDeviceInfo *deviceInfo, PaAsioDeviceInfo *asioDeviceInfo )\n{\n    PaError result = paNoError;\n\n    /* Due to the headless design of the ASIO API, drivers are free to write over data given to them (like M-Audio\n       drivers f.i.). This is an attempt to overcome that. */\n    union _tag_local {\n        PaAsioDriverInfo info;\n        char _padding[4096];\n    } paAsioDriver;\n\n    asioDeviceInfo->asioChannelInfos = 0; /* we check this below to handle error cleanup */\n\n    result = LoadAsioDriver( asioHostApi, driverName, &paAsioDriver.info, asioHostApi->systemSpecific );\n    if( result == paNoError )\n    {\n        PA_DEBUG((\"PaAsio_Initialize: drv:%d name = %s\\n\",  driverIndex,deviceInfo->name));\n        PA_DEBUG((\"PaAsio_Initialize: drv:%d inputChannels       = %d\\n\", driverIndex, paAsioDriver.info.inputChannelCount));\n        PA_DEBUG((\"PaAsio_Initialize: drv:%d outputChannels      = %d\\n\", driverIndex, paAsioDriver.info.outputChannelCount));\n        PA_DEBUG((\"PaAsio_Initialize: drv:%d bufferMinSize       = %d\\n\", driverIndex, paAsioDriver.info.bufferMinSize));\n        PA_DEBUG((\"PaAsio_Initialize: drv:%d bufferMaxSize       = %d\\n\", driverIndex, paAsioDriver.info.bufferMaxSize));\n        PA_DEBUG((\"PaAsio_Initialize: drv:%d bufferPreferredSize = %d\\n\", driverIndex, paAsioDriver.info.bufferPreferredSize));\n        PA_DEBUG((\"PaAsio_Initialize: drv:%d bufferGranularity   = %d\\n\", driverIndex, paAsioDriver.info.bufferGranularity));\n\n        deviceInfo->maxInputChannels  = paAsioDriver.info.inputChannelCount;\n        deviceInfo->maxOutputChannels = paAsioDriver.info.outputChannelCount;\n\n        deviceInfo->defaultSampleRate = 0.;\n        bool foundDefaultSampleRate = false;\n        for( int j=0; j < PA_DEFAULTSAMPLERATESEARCHORDER_COUNT_; ++j )\n        {\n            ASIOError asioError = ASIOCanSampleRate( defaultSampleRateSearchOrder_[j] );\n            if( asioError != ASE_NoClock && asioError != ASE_NotPresent )\n            {\n                deviceInfo->defaultSampleRate = defaultSampleRateSearchOrder_[j];\n                foundDefaultSampleRate = true;\n                break;\n            }\n        }\n\n        PA_DEBUG((\"PaAsio_Initialize: drv:%d defaultSampleRate = %f\\n\", driverIndex, deviceInfo->defaultSampleRate));\n\n        if( foundDefaultSampleRate ){\n\n            /* calculate default latency values from bufferPreferredSize\n                for default low latency, and bufferMaxSize\n                for default high latency.\n                use the default sample rate to convert from samples to\n                seconds. Without knowing what sample rate the user will\n                use this is the best we can do.\n            */\n\n            double defaultLowLatency =\n                    paAsioDriver.info.bufferPreferredSize / deviceInfo->defaultSampleRate;\n\n            deviceInfo->defaultLowInputLatency = defaultLowLatency;\n            deviceInfo->defaultLowOutputLatency = defaultLowLatency;\n\n            double defaultHighLatency =\n                    paAsioDriver.info.bufferMaxSize / deviceInfo->defaultSampleRate;\n\n            if( defaultHighLatency < defaultLowLatency )\n                defaultHighLatency = defaultLowLatency; /* just in case the driver returns something strange */\n\n            deviceInfo->defaultHighInputLatency = defaultHighLatency;\n            deviceInfo->defaultHighOutputLatency = defaultHighLatency;\n\n        }else{\n\n            deviceInfo->defaultLowInputLatency = 0.;\n            deviceInfo->defaultLowOutputLatency = 0.;\n            deviceInfo->defaultHighInputLatency = 0.;\n            deviceInfo->defaultHighOutputLatency = 0.;\n        }\n\n        PA_DEBUG((\"PaAsio_Initialize: drv:%d defaultLowInputLatency = %f\\n\", driverIndex, deviceInfo->defaultLowInputLatency));\n        PA_DEBUG((\"PaAsio_Initialize: drv:%d defaultLowOutputLatency = %f\\n\", driverIndex, deviceInfo->defaultLowOutputLatency));\n        PA_DEBUG((\"PaAsio_Initialize: drv:%d defaultHighInputLatency = %f\\n\", driverIndex, deviceInfo->defaultHighInputLatency));\n        PA_DEBUG((\"PaAsio_Initialize: drv:%d defaultHighOutputLatency = %f\\n\", driverIndex, deviceInfo->defaultHighOutputLatency));\n\n        asioDeviceInfo->minBufferSize = paAsioDriver.info.bufferMinSize;\n        asioDeviceInfo->maxBufferSize = paAsioDriver.info.bufferMaxSize;\n        asioDeviceInfo->preferredBufferSize = paAsioDriver.info.bufferPreferredSize;\n        asioDeviceInfo->bufferGranularity = paAsioDriver.info.bufferGranularity;\n\n\n        asioDeviceInfo->asioChannelInfos = (ASIOChannelInfo*)PaUtil_GroupAllocateMemory(\n                asioHostApi->allocations,\n                sizeof(ASIOChannelInfo) * (deviceInfo->maxInputChannels\n                        + deviceInfo->maxOutputChannels) );\n        if( !asioDeviceInfo->asioChannelInfos )\n        {\n            result = paInsufficientMemory;\n            goto error_unload;\n        }\n\n        int a;\n\n        for( a=0; a < deviceInfo->maxInputChannels; ++a ){\n            asioDeviceInfo->asioChannelInfos[a].channel = a;\n            asioDeviceInfo->asioChannelInfos[a].isInput = ASIOTrue;\n            ASIOError asioError = ASIOGetChannelInfo( &asioDeviceInfo->asioChannelInfos[a] );\n            if( asioError != ASE_OK )\n            {\n                result = paUnanticipatedHostError;\n                PA_ASIO_SET_LAST_ASIO_ERROR( asioError );\n                goto error_unload;\n            }\n        }\n\n        for( a=0; a < deviceInfo->maxOutputChannels; ++a ){\n            int b = deviceInfo->maxInputChannels + a;\n            asioDeviceInfo->asioChannelInfos[b].channel = a;\n            asioDeviceInfo->asioChannelInfos[b].isInput = ASIOFalse;\n            ASIOError asioError = ASIOGetChannelInfo( &asioDeviceInfo->asioChannelInfos[b] );\n            if( asioError != ASE_OK )\n            {\n                result = paUnanticipatedHostError;\n                PA_ASIO_SET_LAST_ASIO_ERROR( asioError );\n                goto error_unload;\n            }\n        }\n\n        /* unload the driver */\n        UnloadAsioDriver();\n    }\n\n    return result;\n\nerror_unload:\n    UnloadAsioDriver();\n\n    if( asioDeviceInfo->asioChannelInfos ){\n        PaUtil_GroupFreeMemory( asioHostApi->allocations, asioDeviceInfo->asioChannelInfos );\n        asioDeviceInfo->asioChannelInfos = 0;\n    }\n\n    return result;\n}\n\n\n/* we look up IsDebuggerPresent at runtime incase it isn't present (on Win95 for example) */\ntypedef BOOL (WINAPI *IsDebuggerPresentPtr)(VOID);\nIsDebuggerPresentPtr IsDebuggerPresent_ = 0;\n//FARPROC IsDebuggerPresent_ = 0; // this is the current way to do it apparently according to davidv\n\nPaError PaAsio_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex hostApiIndex )\n{\n    PaError result = paNoError;\n    int i, driverCount;\n    PaAsioHostApiRepresentation *asioHostApi;\n    PaAsioDeviceInfo *deviceInfoArray;\n    char **names;\n    asioHostApi = (PaAsioHostApiRepresentation*)PaUtil_AllocateMemory( sizeof(PaAsioHostApiRepresentation) );\n    if( !asioHostApi )\n    {\n        result = paInsufficientMemory;\n        goto error;\n    }\n\n    memset( asioHostApi, 0, sizeof(PaAsioHostApiRepresentation) ); /* ensure all fields are zeroed. especially asioHostApi->allocations */\n\n    /*\n        We initialize COM ourselves here and uninitialize it in Terminate().\n        This should be the only COM initialization needed in this module.\n\n        The ASIO SDK may also initialize COM but since we want to reduce dependency\n        on the ASIO SDK we manage COM initialization ourselves.\n\n        There used to be code that initialized COM in other situations\n        such as when creating a Stream. This made PA work when calling Pa_CreateStream\n        from a non-main thread. However we currently consider initialization\n        of COM in non-main threads to be the caller's responsibility.\n    */\n    result = PaWinUtil_CoInitialize( paASIO, &asioHostApi->comInitializationResult );\n    if( result != paNoError )\n    {\n        goto error;\n    }\n\n    asioHostApi->asioDrivers = 0; /* avoid surprises in our error handler below */\n\n    asioHostApi->allocations = PaUtil_CreateAllocationGroup();\n    if( !asioHostApi->allocations )\n    {\n        result = paInsufficientMemory;\n        goto error;\n    }\n\n    /* Allocate the AsioDrivers() driver list (class from ASIO SDK) */\n    try\n    {\n        asioHostApi->asioDrivers = new AsioDrivers(); /* invokes CoInitialize(0) in AsioDriverList::AsioDriverList */\n    }\n    catch (std::bad_alloc)\n    {\n        asioHostApi->asioDrivers = 0;\n    }\n    /* some implementations of new (ie MSVC, see http://support.microsoft.com/?kbid=167733)\n       don't throw std::bad_alloc, so we also explicitly test for a null return. */\n    if( asioHostApi->asioDrivers == 0 )\n    {\n        result = paInsufficientMemory;\n        goto error;\n    }\n\n    asioDrivers = asioHostApi->asioDrivers; /* keep SDK global in sync until we stop depending on it */\n\n    asioHostApi->systemSpecific = 0;\n    asioHostApi->openAsioDeviceIndex = paNoDevice;\n\n    *hostApi = &asioHostApi->inheritedHostApiRep;\n    (*hostApi)->info.structVersion = 1;\n\n    (*hostApi)->info.type = paASIO;\n    (*hostApi)->info.name = \"ASIO\";\n    (*hostApi)->info.deviceCount = 0;\n\n    #ifdef WINDOWS\n        /* use desktop window as system specific ptr */\n        asioHostApi->systemSpecific = GetDesktopWindow();\n    #endif\n\n    /* driverCount is the number of installed drivers - not necessarily\n        the number of installed physical devices. */\n    #if MAC\n        driverCount = asioHostApi->asioDrivers->getNumFragments();\n    #elif WINDOWS\n        driverCount = asioHostApi->asioDrivers->asioGetNumDev();\n    #endif\n\n    if( driverCount > 0 )\n    {\n        names = GetAsioDriverNames( asioHostApi, asioHostApi->allocations, driverCount );\n        if( !names )\n        {\n            result = paInsufficientMemory;\n            goto error;\n        }\n\n\n        /* allocate enough space for all drivers, even if some aren't installed */\n\n        (*hostApi)->deviceInfos = (PaDeviceInfo**)PaUtil_GroupAllocateMemory(\n                asioHostApi->allocations, sizeof(PaDeviceInfo*) * driverCount );\n        if( !(*hostApi)->deviceInfos )\n        {\n            result = paInsufficientMemory;\n            goto error;\n        }\n\n        /* allocate all device info structs in a contiguous block */\n        deviceInfoArray = (PaAsioDeviceInfo*)PaUtil_GroupAllocateMemory(\n                asioHostApi->allocations, sizeof(PaAsioDeviceInfo) * driverCount );\n        if( !deviceInfoArray )\n        {\n            result = paInsufficientMemory;\n            goto error;\n        }\n\n        IsDebuggerPresent_ = (IsDebuggerPresentPtr)GetProcAddress( LoadLibraryA( \"Kernel32.dll\" ), \"IsDebuggerPresent\" );\n\n        for( i=0; i < driverCount; ++i )\n        {\n            PA_DEBUG((\"ASIO names[%d]:%s\\n\",i,names[i]));\n\n            // Since portaudio opens ALL ASIO drivers, and no one else does that,\n            // we face fact that some drivers were not meant for it, drivers which act\n            // like shells on top of REAL drivers, for instance.\n            // so we get duplicate handles, locks and other problems.\n            // so lets NOT try to load any such wrappers.\n            // The ones i [davidv] know of so far are:\n\n            if (   strcmp (names[i],\"ASIO DirectX Full Duplex Driver\") == 0\n                || strcmp (names[i],\"ASIO Multimedia Driver\")          == 0\n                || strncmp(names[i],\"Premiere\",8)                      == 0   //\"Premiere Elements Windows Sound 1.0\"\n                || strncmp(names[i],\"Adobe\",5)                         == 0   //\"Adobe Default Windows Sound 1.5\"\n               )\n            {\n                PA_DEBUG((\"BLACKLISTED!!!\\n\"));\n                continue;\n            }\n\n\n            if( IsDebuggerPresent_ && IsDebuggerPresent_() )\n            {\n                /* ASIO Digidesign Driver uses PACE copy protection which quits out\n                   if a debugger is running. So we don't load it if a debugger is running. */\n                if( strcmp(names[i], \"ASIO Digidesign Driver\") == 0 )\n                {\n                    PA_DEBUG((\"BLACKLISTED!!! ASIO Digidesign Driver would quit the debugger\\n\"));\n                    continue;\n                }\n            }\n\n\n            /* Attempt to init device info from the asio driver... */\n            {\n                PaAsioDeviceInfo *asioDeviceInfo = &deviceInfoArray[ (*hostApi)->info.deviceCount ];\n                PaDeviceInfo *deviceInfo = &asioDeviceInfo->commonDeviceInfo;\n\n                deviceInfo->structVersion = 2;\n                deviceInfo->hostApi = hostApiIndex;\n\n                deviceInfo->name = names[i];\n\n                if( InitPaDeviceInfoFromAsioDriver( asioHostApi, names[i], i, deviceInfo, asioDeviceInfo ) == paNoError )\n                {\n                    (*hostApi)->deviceInfos[ (*hostApi)->info.deviceCount ] = deviceInfo;\n                    ++(*hostApi)->info.deviceCount;\n                }\n                else\n                {\n                    PA_DEBUG((\"Skipping ASIO device:%s\\n\",names[i]));\n                    continue;\n                }\n            }\n        }\n    }\n\n    if( (*hostApi)->info.deviceCount > 0 )\n    {\n        (*hostApi)->info.defaultInputDevice = 0;\n        (*hostApi)->info.defaultOutputDevice = 0;\n    }\n    else\n    {\n        (*hostApi)->info.defaultInputDevice = paNoDevice;\n        (*hostApi)->info.defaultOutputDevice = paNoDevice;\n    }\n\n\n    (*hostApi)->Terminate = Terminate;\n    (*hostApi)->OpenStream = OpenStream;\n    (*hostApi)->IsFormatSupported = IsFormatSupported;\n\n    PaUtil_InitializeStreamInterface( &asioHostApi->callbackStreamInterface, CloseStream, StartStream,\n                                      StopStream, AbortStream, IsStreamStopped, IsStreamActive,\n                                      GetStreamTime, GetStreamCpuLoad,\n                                      PaUtil_DummyRead, PaUtil_DummyWrite,\n                                      PaUtil_DummyGetReadAvailable, PaUtil_DummyGetWriteAvailable );\n\n    PaUtil_InitializeStreamInterface( &asioHostApi->blockingStreamInterface, CloseStream, StartStream,\n                                      StopStream, AbortStream, IsStreamStopped, IsStreamActive,\n                                      GetStreamTime, PaUtil_DummyGetCpuLoad,\n                                      ReadStream, WriteStream, GetStreamReadAvailable, GetStreamWriteAvailable );\n\n    return result;\n\nerror:\n    if( asioHostApi )\n    {\n        if( asioHostApi->allocations )\n        {\n            PaUtil_FreeAllAllocations( asioHostApi->allocations );\n            PaUtil_DestroyAllocationGroup( asioHostApi->allocations );\n        }\n\n        delete asioHostApi->asioDrivers;\n        asioDrivers = 0; /* keep SDK global in sync until we stop depending on it */\n\n        PaWinUtil_CoUninitialize( paASIO, &asioHostApi->comInitializationResult );\n\n        PaUtil_FreeMemory( asioHostApi );\n    }\n\n    return result;\n}\n\n\nstatic void Terminate( struct PaUtilHostApiRepresentation *hostApi )\n{\n    PaAsioHostApiRepresentation *asioHostApi = (PaAsioHostApiRepresentation*)hostApi;\n\n    /*\n        IMPLEMENT ME:\n            - clean up any resources not handled by the allocation group (need to review if there are any)\n    */\n\n    if( asioHostApi->allocations )\n    {\n        PaUtil_FreeAllAllocations( asioHostApi->allocations );\n        PaUtil_DestroyAllocationGroup( asioHostApi->allocations );\n    }\n\n    delete asioHostApi->asioDrivers;\n    asioDrivers = 0; /* keep SDK global in sync until we stop depending on it */\n\n    PaWinUtil_CoUninitialize( paASIO, &asioHostApi->comInitializationResult );\n\n    PaUtil_FreeMemory( asioHostApi );\n}\n\n\nstatic PaError IsFormatSupported( struct PaUtilHostApiRepresentation *hostApi,\n                                  const PaStreamParameters *inputParameters,\n                                  const PaStreamParameters *outputParameters,\n                                  double sampleRate )\n{\n    PaError result = paNoError;\n    PaAsioHostApiRepresentation *asioHostApi = (PaAsioHostApiRepresentation*)hostApi;\n    PaAsioDriverInfo *driverInfo = &asioHostApi->openAsioDriverInfo;\n    int inputChannelCount, outputChannelCount;\n    PaSampleFormat inputSampleFormat, outputSampleFormat;\n    PaDeviceIndex asioDeviceIndex;\n    ASIOError asioError;\n\n    if( inputParameters && outputParameters )\n    {\n        /* full duplex ASIO stream must use the same device for input and output */\n\n        if( inputParameters->device != outputParameters->device )\n            return paBadIODeviceCombination;\n    }\n\n    if( inputParameters )\n    {\n        inputChannelCount = inputParameters->channelCount;\n        inputSampleFormat = inputParameters->sampleFormat;\n\n        /* all standard sample formats are supported by the buffer adapter,\n            this implementation doesn't support any custom sample formats */\n        if( inputSampleFormat & paCustomFormat )\n            return paSampleFormatNotSupported;\n\n        /* unless alternate device specification is supported, reject the use of\n            paUseHostApiSpecificDeviceSpecification */\n\n        if( inputParameters->device == paUseHostApiSpecificDeviceSpecification )\n            return paInvalidDevice;\n\n        asioDeviceIndex = inputParameters->device;\n\n        /* validate inputStreamInfo */\n        /** @todo do more validation here */\n        // if( inputParameters->hostApiSpecificStreamInfo )\n        //    return paIncompatibleHostApiSpecificStreamInfo; /* this implementation doesn't use custom stream info */\n    }\n    else\n    {\n        inputChannelCount = 0;\n    }\n\n    if( outputParameters )\n    {\n        outputChannelCount = outputParameters->channelCount;\n        outputSampleFormat = outputParameters->sampleFormat;\n\n        /* all standard sample formats are supported by the buffer adapter,\n            this implementation doesn't support any custom sample formats */\n        if( outputSampleFormat & paCustomFormat )\n            return paSampleFormatNotSupported;\n\n        /* unless alternate device specification is supported, reject the use of\n            paUseHostApiSpecificDeviceSpecification */\n\n        if( outputParameters->device == paUseHostApiSpecificDeviceSpecification )\n            return paInvalidDevice;\n\n        asioDeviceIndex = outputParameters->device;\n\n        /* validate outputStreamInfo */\n        /** @todo do more validation here */\n        // if( outputParameters->hostApiSpecificStreamInfo )\n        //    return paIncompatibleHostApiSpecificStreamInfo; /* this implementation doesn't use custom stream info */\n    }\n    else\n    {\n        outputChannelCount = 0;\n    }\n\n\n\n    /* if an ASIO device is open we can only get format information for the currently open device */\n\n    if( asioHostApi->openAsioDeviceIndex != paNoDevice\n            && asioHostApi->openAsioDeviceIndex != asioDeviceIndex )\n    {\n        return paDeviceUnavailable;\n    }\n\n\n    /* NOTE: we load the driver and use its current settings\n        rather than the ones in our device info structure which may be stale */\n\n    /* open the device if it's not already open */\n    if( asioHostApi->openAsioDeviceIndex == paNoDevice )\n    {\n        result = LoadAsioDriver( asioHostApi, asioHostApi->inheritedHostApiRep.deviceInfos[ asioDeviceIndex ]->name,\n                driverInfo, asioHostApi->systemSpecific );\n        if( result != paNoError )\n            return result;\n    }\n\n    /* check that input device can support inputChannelCount */\n    if( inputChannelCount > 0 )\n    {\n        if( inputChannelCount > driverInfo->inputChannelCount )\n        {\n            result = paInvalidChannelCount;\n            goto done;\n        }\n    }\n\n    /* check that output device can support outputChannelCount */\n    if( outputChannelCount )\n    {\n        if( outputChannelCount > driverInfo->outputChannelCount )\n        {\n            result = paInvalidChannelCount;\n            goto done;\n        }\n    }\n\n    /* query for sample rate support */\n    asioError = ASIOCanSampleRate( sampleRate );\n    if( asioError == ASE_NoClock || asioError == ASE_NotPresent )\n    {\n        result = paInvalidSampleRate;\n        goto done;\n    }\n\ndone:\n    /* close the device if it wasn't already open */\n    if( asioHostApi->openAsioDeviceIndex == paNoDevice )\n    {\n        UnloadAsioDriver(); /* not sure if we should check for errors here */\n    }\n\n    if( result == paNoError )\n        return paFormatIsSupported;\n    else\n        return result;\n}\n\n\n\n/** A data structure specifically for storing blocking i/o related data. */\ntypedef struct PaAsioStreamBlockingState\n{\n    int stopFlag; /**< Flag indicating that block processing is to be stopped. */\n\n    unsigned long writeBuffersRequested; /**< The number of available output buffers, requested by the #WriteStream() function. */\n    unsigned long readFramesRequested;   /**< The number of available input frames, requested by the #ReadStream() function. */\n\n    int writeBuffersRequestedFlag; /**< Flag to indicate that #WriteStream() has requested more output buffers to be available. */\n    int readFramesRequestedFlag;   /**< Flag to indicate that #ReadStream() requires more input frames to be available. */\n\n    HANDLE writeBuffersReadyEvent; /**< Event to signal that requested output buffers are available. */\n    HANDLE readFramesReadyEvent;   /**< Event to signal that requested input frames are available. */\n\n    void *writeRingBufferData; /**< The actual ring buffer memory, used by the output ring buffer. */\n    void *readRingBufferData;  /**< The actual ring buffer memory, used by the input ring buffer. */\n\n    PaUtilRingBuffer writeRingBuffer; /**< Frame-aligned blocking i/o ring buffer to store output data (interleaved user format). */\n    PaUtilRingBuffer readRingBuffer;  /**< Frame-aligned blocking i/o ring buffer to store input data (interleaved user format). */\n\n    long writeRingBufferInitialFrames; /**< The initial number of silent frames within the output ring buffer. */\n\n    const void **writeStreamBuffer; /**< Temp buffer, used by #WriteStream() for handling non-interleaved data. */\n    void **readStreamBuffer; /**< Temp buffer, used by #ReadStream() for handling non-interleaved data. */\n\n    PaUtilBufferProcessor bufferProcessor; /**< Buffer processor, used to handle the blocking i/o ring buffers. */\n\n    int outputUnderflowFlag; /**< Flag to signal an output underflow from within the callback function. */\n    int inputOverflowFlag; /**< Flag to signal an input overflow from within the callback function. */\n}\nPaAsioStreamBlockingState;\n\n\n\n/* PaAsioStream - a stream data structure specifically for this implementation */\n\ntypedef struct PaAsioStream\n{\n    PaUtilStreamRepresentation streamRepresentation;\n    PaUtilCpuLoadMeasurer cpuLoadMeasurer;\n    PaUtilBufferProcessor bufferProcessor;\n\n    PaAsioHostApiRepresentation *asioHostApi;\n    unsigned long framesPerHostCallback;\n\n    /* ASIO driver info  - these may not be needed for the life of the stream,\n        but store them here until we work out how format conversion is going\n        to work. */\n\n    ASIOBufferInfo *asioBufferInfos;\n    ASIOChannelInfo *asioChannelInfos;\n    long asioInputLatencyFrames, asioOutputLatencyFrames; // actual latencies returned by asio\n\n    long inputChannelCount, outputChannelCount;\n    bool postOutput;\n\n    void **bufferPtrs; /* this is carved up for inputBufferPtrs and outputBufferPtrs */\n    void **inputBufferPtrs[2];\n    void **outputBufferPtrs[2];\n\n    PaAsioBufferConverter *inputBufferConverter;\n    long inputShift;\n    PaAsioBufferConverter *outputBufferConverter;\n    long outputShift;\n\n    volatile bool stopProcessing;\n    int stopPlayoutCount;\n    HANDLE completedBuffersPlayedEvent;\n\n    bool streamFinishedCallbackCalled;\n    int isStopped;\n    volatile int isActive;\n    volatile bool zeroOutput; /* all future calls to the callback will output silence */\n\n    volatile long reenterCount;\n    volatile long reenterError;\n\n    PaStreamCallbackFlags callbackFlags;\n\n    PaAsioStreamBlockingState *blockingState; /**< Blocking i/o data struct, or NULL when using callback interface. */\n}\nPaAsioStream;\n\nstatic PaAsioStream *theAsioStream = 0; /* due to ASIO sdk limitations there can be only one stream */\n\n\nstatic void ZeroOutputBuffers( PaAsioStream *stream, long index )\n{\n    int i;\n\n    for( i=0; i < stream->outputChannelCount; ++i )\n    {\n        void *buffer = stream->asioBufferInfos[ i + stream->inputChannelCount ].buffers[index];\n\n        int bytesPerSample = BytesPerAsioSample( stream->asioChannelInfos[ i + stream->inputChannelCount ].type );\n\n        memset( buffer, 0, stream->framesPerHostCallback * bytesPerSample );\n    }\n}\n\n\n/* return the next power of two >= x.\n   Returns the input parameter if it is already a power of two.\n   http://stackoverflow.com/questions/364985/algorithm-for-finding-the-smallest-power-of-two-thats-greater-or-equal-to-a-giv\n*/\nstatic unsigned long NextPowerOfTwo( unsigned long x )\n{\n    --x;\n    x |= x >> 1;\n    x |= x >> 2;\n    x |= x >> 4;\n    x |= x >> 8;\n    x |= x >> 16;\n    /* If you needed to deal with numbers > 2^32 the following would be needed.\n       For latencies, we don't deal with values this large.\n     x |= x >> 16;\n    */\n\n    return x + 1;\n}\n\n\nstatic unsigned long SelectHostBufferSizeForUnspecifiedUserFramesPerBuffer(\n        unsigned long targetBufferingLatencyFrames, PaAsioDriverInfo *driverInfo )\n{\n    /* Choose a host buffer size based only on targetBufferingLatencyFrames and the\n       device's supported buffer sizes. Always returns a valid value.\n    */\n\n    unsigned long result;\n\n    if( targetBufferingLatencyFrames <= (unsigned long)driverInfo->bufferMinSize )\n    {\n        result = driverInfo->bufferMinSize;\n    }\n    else if( targetBufferingLatencyFrames >= (unsigned long)driverInfo->bufferMaxSize )\n    {\n        result = driverInfo->bufferMaxSize;\n    }\n    else\n    {\n        if( driverInfo->bufferGranularity == 0 ) /* single fixed host buffer size */\n        {\n            /* The documentation states that bufferGranularity should be zero\n               when bufferMinSize, bufferMaxSize and bufferPreferredSize are the\n               same. We assume that is the case.\n            */\n\n            result = driverInfo->bufferPreferredSize;\n        }\n        else if( driverInfo->bufferGranularity == -1 ) /* power-of-two */\n        {\n            /* We assume bufferMinSize and bufferMaxSize are powers of two. */\n\n            result = NextPowerOfTwo( targetBufferingLatencyFrames );\n\n            if( result < (unsigned long)driverInfo->bufferMinSize )\n                result = driverInfo->bufferMinSize;\n\n            if( result > (unsigned long)driverInfo->bufferMaxSize )\n                result = driverInfo->bufferMaxSize;\n        }\n        else /* modulo bufferGranularity */\n        {\n            /* round up to the next multiple of granularity */\n            unsigned long n = (targetBufferingLatencyFrames + driverInfo->bufferGranularity - 1)\n                    / driverInfo->bufferGranularity;\n\n            result = n * driverInfo->bufferGranularity;\n\n            if( result < (unsigned long)driverInfo->bufferMinSize )\n                result = driverInfo->bufferMinSize;\n\n            if( result > (unsigned long)driverInfo->bufferMaxSize )\n                result = driverInfo->bufferMaxSize;\n        }\n    }\n\n    return result;\n}\n\n\nstatic unsigned long SelectHostBufferSizeForSpecifiedUserFramesPerBuffer(\n        unsigned long targetBufferingLatencyFrames, unsigned long userFramesPerBuffer,\n        PaAsioDriverInfo *driverInfo )\n{\n    /* Select a host buffer size conforming to targetBufferingLatencyFrames\n       and the device's supported buffer sizes.\n       The return value will always be a multiple of userFramesPerBuffer.\n       If a valid buffer size can not be found the function returns 0.\n\n       The current implementation uses a simple iterative search for clarity.\n       Feel free to suggest a closed form solution.\n    */\n    unsigned long result = 0;\n\n    assert( userFramesPerBuffer != 0 );\n\n    if( driverInfo->bufferGranularity == 0 ) /* single fixed host buffer size */\n    {\n        /* The documentation states that bufferGranularity should be zero\n           when bufferMinSize, bufferMaxSize and bufferPreferredSize are the\n           same. We assume that is the case.\n        */\n\n        if( (driverInfo->bufferPreferredSize % userFramesPerBuffer) == 0 )\n            result = driverInfo->bufferPreferredSize;\n    }\n    else if( driverInfo->bufferGranularity == -1 ) /* power-of-two */\n    {\n        /* We assume bufferMinSize and bufferMaxSize are powers of two. */\n\n        /* Search all powers of two in the range [bufferMinSize,bufferMaxSize]\n           for multiples of userFramesPerBuffer. We prefer the first multiple\n           that is equal or greater than targetBufferingLatencyFrames, or\n           failing that, the largest multiple less than\n           targetBufferingLatencyFrames.\n        */\n        unsigned long x = (unsigned long)driverInfo->bufferMinSize;\n        do {\n            if( (x % userFramesPerBuffer) == 0 )\n            {\n                /* any multiple of userFramesPerBuffer is acceptable */\n                result = x;\n                if( result >= targetBufferingLatencyFrames )\n                    break; /* stop. a value >= to targetBufferingLatencyFrames is ideal. */\n            }\n\n            x *= 2;\n        } while( x <= (unsigned long)driverInfo->bufferMaxSize );\n    }\n    else /* modulo granularity */\n    {\n        /* We assume bufferMinSize is a multiple of bufferGranularity. */\n\n        /* Search all multiples of bufferGranularity in the range\n           [bufferMinSize,bufferMaxSize] for multiples of userFramesPerBuffer.\n           We prefer the first multiple that is equal or greater than\n           targetBufferingLatencyFrames, or failing that, the largest multiple\n           less than targetBufferingLatencyFrames.\n        */\n        unsigned long x = (unsigned long)driverInfo->bufferMinSize;\n        do {\n            if( (x % userFramesPerBuffer) == 0 )\n            {\n                /* any multiple of userFramesPerBuffer is acceptable */\n                result = x;\n                if( result >= targetBufferingLatencyFrames )\n                    break; /* stop. a value >= to targetBufferingLatencyFrames is ideal. */\n            }\n\n            x += driverInfo->bufferGranularity;\n        } while( x <= (unsigned long)driverInfo->bufferMaxSize );\n    }\n\n    return result;\n}\n\n\nstatic unsigned long SelectHostBufferSize(\n        unsigned long targetBufferingLatencyFrames,\n        unsigned long userFramesPerBuffer, PaAsioDriverInfo *driverInfo )\n{\n    unsigned long result = 0;\n\n    /* We select a host buffer size based on the following requirements\n       (in priority order):\n\n        1. The host buffer size must be permissible according to the ASIO\n           driverInfo buffer size constraints (min, max, granularity or\n           powers-of-two).\n\n        2. If the user specifies a non-zero framesPerBuffer parameter\n           (userFramesPerBuffer here) the host buffer should be a multiple of\n           this (subject to the constraints in (1) above).\n\n           [NOTE: Where no permissible host buffer size is a multiple of\n           userFramesPerBuffer, we choose a value as if userFramesPerBuffer were\n           zero (i.e. we ignore it). This strategy is open for review ~ perhaps\n           there are still \"more optimal\" buffer sizes related to\n           userFramesPerBuffer that we could use.]\n\n        3. The host buffer size should be greater than or equal to\n           targetBufferingLatencyFrames, subject to (1) and (2) above. Where it\n           is not possible to select a host buffer size equal or greater than\n           targetBufferingLatencyFrames, the highest buffer size conforming to\n           (1) and (2) should be chosen.\n    */\n\n    if( userFramesPerBuffer != 0 )\n    {\n        /* userFramesPerBuffer is specified, try to find a buffer size that's\n           a multiple of it */\n        result = SelectHostBufferSizeForSpecifiedUserFramesPerBuffer(\n                targetBufferingLatencyFrames, userFramesPerBuffer, driverInfo );\n    }\n\n    if( result == 0 )\n    {\n        /* either userFramesPerBuffer was not specified, or we couldn't find a\n           host buffer size that is a multiple of it. Select a host buffer size\n           according to targetBufferingLatencyFrames and the ASIO driverInfo\n           buffer size constraints.\n         */\n        result = SelectHostBufferSizeForUnspecifiedUserFramesPerBuffer(\n                targetBufferingLatencyFrames, driverInfo );\n    }\n\n    return result;\n}\n\n\n/* returns channelSelectors if present */\n\nstatic PaError ValidateAsioSpecificStreamInfo(\n        const PaStreamParameters *streamParameters,\n        const PaAsioStreamInfo *streamInfo,\n        int deviceChannelCount,\n        int **channelSelectors )\n{\n    if( streamInfo )\n    {\n        if( streamInfo->size != sizeof( PaAsioStreamInfo )\n                || streamInfo->version != 1 )\n        {\n            return paIncompatibleHostApiSpecificStreamInfo;\n        }\n\n        if( streamInfo->flags & paAsioUseChannelSelectors )\n            *channelSelectors = streamInfo->channelSelectors;\n\n        if( !(*channelSelectors) )\n            return paIncompatibleHostApiSpecificStreamInfo;\n\n        for( int i=0; i < streamParameters->channelCount; ++i ){\n            if( (*channelSelectors)[i] < 0\n                    || (*channelSelectors)[i] >= deviceChannelCount ){\n                return paInvalidChannelCount;\n            }\n        }\n    }\n\n    return paNoError;\n}\n\n\nstatic bool IsUsingExternalClockSource()\n{\n    bool result = false;\n    ASIOError asioError;\n    ASIOClockSource clocks[32];\n    long numSources=32;\n\n    /* davidv: listing ASIO Clock sources. there is an ongoing investigation by\n       me about whether or not to call ASIOSetSampleRate if an external Clock is\n       used. A few drivers expected different things here */\n\n    asioError = ASIOGetClockSources(clocks, &numSources);\n    if( asioError != ASE_OK ){\n        PA_DEBUG((\"ERROR: ASIOGetClockSources: %s\\n\", PaAsio_GetAsioErrorText(asioError) ));\n    }else{\n        PA_DEBUG((\"INFO ASIOGetClockSources listing %d clocks\\n\", numSources ));\n        for (int i=0;i<numSources;++i){\n            PA_DEBUG((\"ASIOClockSource%d %s current:%d\\n\", i, clocks[i].name, clocks[i].isCurrentSource ));\n\n            if (clocks[i].isCurrentSource)\n                result = true;\n        }\n    }\n\n    return result;\n}\n\n\nstatic PaError ValidateAndSetSampleRate( double sampleRate )\n{\n    PaError result = paNoError;\n    ASIOError asioError;\n\n    // check that the device supports the requested sample rate\n\n    asioError = ASIOCanSampleRate( sampleRate );\n    PA_DEBUG((\"ASIOCanSampleRate(%f):%d\\n\", sampleRate, asioError ));\n\n    if( asioError != ASE_OK )\n    {\n        result = paInvalidSampleRate;\n        PA_DEBUG((\"ERROR: ASIOCanSampleRate: %s\\n\", PaAsio_GetAsioErrorText(asioError) ));\n        goto error;\n    }\n\n    // retrieve the current sample rate, we only change to the requested\n    // sample rate if the device is not already in that rate.\n\n    ASIOSampleRate oldRate;\n    asioError = ASIOGetSampleRate(&oldRate);\n    if( asioError != ASE_OK )\n    {\n        result = paInvalidSampleRate;\n        PA_DEBUG((\"ERROR: ASIOGetSampleRate: %s\\n\", PaAsio_GetAsioErrorText(asioError) ));\n        goto error;\n    }\n    PA_DEBUG((\"ASIOGetSampleRate:%f\\n\",oldRate));\n\n    if (oldRate != sampleRate){\n        /* Set sample rate */\n\n        PA_DEBUG((\"before ASIOSetSampleRate(%f)\\n\",sampleRate));\n\n        /*\n            If you have problems with some drivers when externally clocked,\n            try switching on the following line and commenting out the one after it.\n            See IsUsingExternalClockSource() for more info.\n        */\n        //if( IsUsingExternalClockSource() ){\n        if( false ){\n            asioError = ASIOSetSampleRate( 0 );\n        }else{\n            asioError = ASIOSetSampleRate( sampleRate );\n        }\n        if( asioError != ASE_OK )\n        {\n            result = paInvalidSampleRate;\n            PA_DEBUG((\"ERROR: ASIOSetSampleRate: %s\\n\", PaAsio_GetAsioErrorText(asioError) ));\n            goto error;\n        }\n        PA_DEBUG((\"after ASIOSetSampleRate(%f)\\n\",sampleRate));\n    }\n    else\n    {\n        PA_DEBUG((\"No Need to change SR\\n\"));\n    }\n\nerror:\n    return result;\n}\n\n\n/* see pa_hostapi.h for a list of validity guarantees made about OpenStream  parameters */\n\nstatic PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,\n                           PaStream** s,\n                           const PaStreamParameters *inputParameters,\n                           const PaStreamParameters *outputParameters,\n                           double sampleRate,\n                           unsigned long framesPerBuffer,\n                           PaStreamFlags streamFlags,\n                           PaStreamCallback *streamCallback,\n                           void *userData )\n{\n    PaError result = paNoError;\n    PaAsioHostApiRepresentation *asioHostApi = (PaAsioHostApiRepresentation*)hostApi;\n    PaAsioStream *stream = 0;\n    PaAsioStreamInfo *inputStreamInfo, *outputStreamInfo;\n    unsigned long framesPerHostBuffer;\n    int inputChannelCount, outputChannelCount;\n    PaSampleFormat inputSampleFormat, outputSampleFormat;\n    PaSampleFormat hostInputSampleFormat, hostOutputSampleFormat;\n    unsigned long suggestedInputLatencyFrames;\n    unsigned long suggestedOutputLatencyFrames;\n    PaDeviceIndex asioDeviceIndex;\n    ASIOError asioError;\n    int asioIsInitialized = 0;\n    int asioBuffersCreated = 0;\n    int completedBuffersPlayedEventInited = 0;\n    int i;\n    PaAsioDriverInfo *driverInfo;\n    int *inputChannelSelectors = 0;\n    int *outputChannelSelectors = 0;\n\n    /* Are we using blocking i/o interface? */\n    int usingBlockingIo = ( !streamCallback ) ? TRUE : FALSE;\n    /* Blocking i/o stuff */\n    long lBlockingBufferSize     = 0; /* Desired ring buffer size in samples. */\n    long lBlockingBufferSizePow2 = 0; /* Power-of-2 rounded ring buffer size. */\n    long lBytesPerFrame          = 0; /* Number of bytes per input/output frame. */\n    int blockingWriteBuffersReadyEventInitialized = 0; /* Event init flag. */\n    int blockingReadFramesReadyEventInitialized   = 0; /* Event init flag. */\n\n    int callbackBufferProcessorInited = FALSE;\n    int blockingBufferProcessorInited = FALSE;\n\n    /* unless we move to using lower level ASIO calls, we can only have\n        one device open at a time */\n    if( asioHostApi->openAsioDeviceIndex != paNoDevice )\n    {\n        PA_DEBUG((\"OpenStream paDeviceUnavailable\\n\"));\n        return paDeviceUnavailable;\n    }\n\n    assert( theAsioStream == 0 );\n\n    if( inputParameters && outputParameters )\n    {\n        /* full duplex ASIO stream must use the same device for input and output */\n\n        if( inputParameters->device != outputParameters->device )\n        {\n            PA_DEBUG((\"OpenStream paBadIODeviceCombination\\n\"));\n            return paBadIODeviceCombination;\n        }\n    }\n\n    if( inputParameters )\n    {\n        inputChannelCount = inputParameters->channelCount;\n        inputSampleFormat = inputParameters->sampleFormat;\n        suggestedInputLatencyFrames = (unsigned long)((inputParameters->suggestedLatency * sampleRate)+0.5f);\n\n        /* unless alternate device specification is supported, reject the use of\n            paUseHostApiSpecificDeviceSpecification */\n        if( inputParameters->device == paUseHostApiSpecificDeviceSpecification )\n            return paInvalidDevice;\n\n        asioDeviceIndex = inputParameters->device;\n\n        PaAsioDeviceInfo *asioDeviceInfo = (PaAsioDeviceInfo*)hostApi->deviceInfos[asioDeviceIndex];\n\n        /* validate hostApiSpecificStreamInfo */\n        inputStreamInfo = (PaAsioStreamInfo*)inputParameters->hostApiSpecificStreamInfo;\n        result = ValidateAsioSpecificStreamInfo( inputParameters, inputStreamInfo,\n            asioDeviceInfo->commonDeviceInfo.maxInputChannels,\n            &inputChannelSelectors\n        );\n        if( result != paNoError ) return result;\n    }\n    else\n    {\n        inputChannelCount = 0;\n        inputSampleFormat = 0;\n        suggestedInputLatencyFrames = 0;\n    }\n\n    if( outputParameters )\n    {\n        outputChannelCount = outputParameters->channelCount;\n        outputSampleFormat = outputParameters->sampleFormat;\n        suggestedOutputLatencyFrames = (unsigned long)((outputParameters->suggestedLatency * sampleRate)+0.5f);\n\n        /* unless alternate device specification is supported, reject the use of\n            paUseHostApiSpecificDeviceSpecification */\n        if( outputParameters->device == paUseHostApiSpecificDeviceSpecification )\n            return paInvalidDevice;\n\n        asioDeviceIndex = outputParameters->device;\n\n        PaAsioDeviceInfo *asioDeviceInfo = (PaAsioDeviceInfo*)hostApi->deviceInfos[asioDeviceIndex];\n\n        /* validate hostApiSpecificStreamInfo */\n        outputStreamInfo = (PaAsioStreamInfo*)outputParameters->hostApiSpecificStreamInfo;\n        result = ValidateAsioSpecificStreamInfo( outputParameters, outputStreamInfo,\n            asioDeviceInfo->commonDeviceInfo.maxOutputChannels,\n            &outputChannelSelectors\n        );\n        if( result != paNoError ) return result;\n    }\n    else\n    {\n        outputChannelCount = 0;\n        outputSampleFormat = 0;\n        suggestedOutputLatencyFrames = 0;\n    }\n\n    driverInfo = &asioHostApi->openAsioDriverInfo;\n\n    /* NOTE: we load the driver and use its current settings\n        rather than the ones in our device info structure which may be stale */\n\n    result = LoadAsioDriver( asioHostApi, asioHostApi->inheritedHostApiRep.deviceInfos[ asioDeviceIndex ]->name,\n            driverInfo, asioHostApi->systemSpecific );\n    if( result == paNoError )\n        asioIsInitialized = 1;\n    else{\n        PA_DEBUG((\"OpenStream ERROR1 - LoadAsioDriver returned %d\\n\", result));\n        goto error;\n    }\n\n    /* check that input device can support inputChannelCount */\n    if( inputChannelCount > 0 )\n    {\n        if( inputChannelCount > driverInfo->inputChannelCount )\n        {\n            result = paInvalidChannelCount;\n            PA_DEBUG((\"OpenStream ERROR2\\n\"));\n            goto error;\n        }\n    }\n\n    /* check that output device can support outputChannelCount */\n    if( outputChannelCount )\n    {\n        if( outputChannelCount > driverInfo->outputChannelCount )\n        {\n            result = paInvalidChannelCount;\n            PA_DEBUG((\"OpenStream ERROR3\\n\"));\n            goto error;\n        }\n    }\n\n    result = ValidateAndSetSampleRate( sampleRate );\n    if( result != paNoError )\n        goto error;\n\n    /*\n        IMPLEMENT ME:\n            - if a full duplex stream is requested, check that the combination\n                of input and output parameters is supported\n    */\n\n    /* validate platform specific flags */\n    if( (streamFlags & paPlatformSpecificFlags) != 0 ){\n        PA_DEBUG((\"OpenStream invalid flags!!\\n\"));\n        return paInvalidFlag; /* unexpected platform specific flag */\n    }\n\n\n    stream = (PaAsioStream*)PaUtil_AllocateMemory( sizeof(PaAsioStream) );\n    if( !stream )\n    {\n        result = paInsufficientMemory;\n        PA_DEBUG((\"OpenStream ERROR5\\n\"));\n        goto error;\n    }\n    stream->blockingState = NULL; /* Blocking i/o not initialized, yet. */\n\n\n    stream->completedBuffersPlayedEvent = CreateEvent( NULL, TRUE, FALSE, NULL );\n    if( stream->completedBuffersPlayedEvent == NULL )\n    {\n        result = paUnanticipatedHostError;\n        PA_ASIO_SET_LAST_SYSTEM_ERROR( GetLastError() );\n        PA_DEBUG((\"OpenStream ERROR6\\n\"));\n        goto error;\n    }\n    completedBuffersPlayedEventInited = 1;\n\n\n    stream->asioBufferInfos = 0; /* for deallocation in error */\n    stream->asioChannelInfos = 0; /* for deallocation in error */\n    stream->bufferPtrs = 0; /* for deallocation in error */\n\n    /* Using blocking i/o interface... */\n    if( usingBlockingIo )\n    {\n        /* Blocking i/o is implemented by running callback mode, using a special blocking i/o callback. */\n        streamCallback = BlockingIoPaCallback; /* Setup PA to use the ASIO blocking i/o callback. */\n        userData       = &theAsioStream;       /* The callback user data will be the PA ASIO stream. */\n        PaUtil_InitializeStreamRepresentation( &stream->streamRepresentation,\n                                               &asioHostApi->blockingStreamInterface, streamCallback, userData );\n    }\n    else /* Using callback interface... */\n    {\n        PaUtil_InitializeStreamRepresentation( &stream->streamRepresentation,\n                                               &asioHostApi->callbackStreamInterface, streamCallback, userData );\n    }\n\n\n    PaUtil_InitializeCpuLoadMeasurer( &stream->cpuLoadMeasurer, sampleRate );\n\n\n    stream->asioBufferInfos = (ASIOBufferInfo*)PaUtil_AllocateMemory(\n            sizeof(ASIOBufferInfo) * (inputChannelCount + outputChannelCount) );\n    if( !stream->asioBufferInfos )\n    {\n        result = paInsufficientMemory;\n        PA_DEBUG((\"OpenStream ERROR7\\n\"));\n        goto error;\n    }\n\n\n    for( i=0; i < inputChannelCount; ++i )\n    {\n        ASIOBufferInfo *info = &stream->asioBufferInfos[i];\n\n        info->isInput = ASIOTrue;\n\n        if( inputChannelSelectors ){\n            // inputChannelSelectors values have already been validated in\n            // ValidateAsioSpecificStreamInfo() above\n            info->channelNum = inputChannelSelectors[i];\n        }else{\n            info->channelNum = i;\n        }\n\n        info->buffers[0] = info->buffers[1] = 0;\n    }\n\n    for( i=0; i < outputChannelCount; ++i ){\n        ASIOBufferInfo *info = &stream->asioBufferInfos[inputChannelCount+i];\n\n        info->isInput = ASIOFalse;\n\n        if( outputChannelSelectors ){\n            // outputChannelSelectors values have already been validated in\n            // ValidateAsioSpecificStreamInfo() above\n            info->channelNum = outputChannelSelectors[i];\n        }else{\n            info->channelNum = i;\n        }\n\n        info->buffers[0] = info->buffers[1] = 0;\n    }\n\n\n    /* Using blocking i/o interface... */\n    if( usingBlockingIo )\n    {\n/** @todo REVIEW selection of host buffer size for blocking i/o */\n\n        framesPerHostBuffer = SelectHostBufferSize( 0, framesPerBuffer, driverInfo );\n\n    }\n    else /* Using callback interface... */\n    {\n        /* Select the host buffer size based on user framesPerBuffer and the\n           maximum of suggestedInputLatencyFrames and\n           suggestedOutputLatencyFrames.\n\n           We should subtract any fixed known driver latency from\n           suggestedLatencyFrames before computing the host buffer size.\n           However, the ASIO API doesn't provide a method for determining fixed\n           latencies independent of the host buffer size. ASIOGetLatencies()\n           only returns latencies after the buffer size has been configured, so\n           we can't reliably use it to determine fixed latencies here.\n\n           We could set the preferred buffer size and then subtract it from\n           the values returned from ASIOGetLatencies, but this would not be 100%\n           reliable, so we don't do it.\n        */\n\n        unsigned long targetBufferingLatencyFrames =\n                (( suggestedInputLatencyFrames > suggestedOutputLatencyFrames )\n                ? suggestedInputLatencyFrames\n                : suggestedOutputLatencyFrames);\n\n        framesPerHostBuffer = SelectHostBufferSize( targetBufferingLatencyFrames,\n                framesPerBuffer, driverInfo );\n    }\n\n\n    PA_DEBUG((\"PaAsioOpenStream: framesPerHostBuffer :%d\\n\",  framesPerHostBuffer));\n\n    asioError = ASIOCreateBuffers( stream->asioBufferInfos,\n            inputChannelCount+outputChannelCount,\n            framesPerHostBuffer, &asioCallbacks_ );\n\n    if( asioError != ASE_OK\n            && framesPerHostBuffer != (unsigned long)driverInfo->bufferPreferredSize )\n    {\n        PA_DEBUG((\"ERROR: ASIOCreateBuffers: %s\\n\", PaAsio_GetAsioErrorText(asioError) ));\n        /*\n            Some buggy drivers (like the Hoontech DSP24) give incorrect\n            [min, preferred, max] values They should work with the preferred size\n            value, thus if Pa_ASIO_CreateBuffers fails with the hostBufferSize\n            computed in SelectHostBufferSize, we try again with the preferred size.\n        */\n\n        framesPerHostBuffer = driverInfo->bufferPreferredSize;\n\n        PA_DEBUG((\"PaAsioOpenStream: CORRECTED framesPerHostBuffer :%d\\n\",  framesPerHostBuffer));\n\n        ASIOError asioError2 = ASIOCreateBuffers( stream->asioBufferInfos,\n                inputChannelCount+outputChannelCount,\n                 framesPerHostBuffer, &asioCallbacks_ );\n        if( asioError2 == ASE_OK )\n            asioError = ASE_OK;\n    }\n\n    if( asioError != ASE_OK )\n    {\n        result = paUnanticipatedHostError;\n        PA_ASIO_SET_LAST_ASIO_ERROR( asioError );\n        PA_DEBUG((\"OpenStream ERROR9\\n\"));\n        goto error;\n    }\n\n    asioBuffersCreated = 1;\n\n    stream->asioChannelInfos = (ASIOChannelInfo*)PaUtil_AllocateMemory(\n            sizeof(ASIOChannelInfo) * (inputChannelCount + outputChannelCount) );\n    if( !stream->asioChannelInfos )\n    {\n        result = paInsufficientMemory;\n        PA_DEBUG((\"OpenStream ERROR10\\n\"));\n        goto error;\n    }\n\n    for( i=0; i < inputChannelCount + outputChannelCount; ++i )\n    {\n        stream->asioChannelInfos[i].channel = stream->asioBufferInfos[i].channelNum;\n        stream->asioChannelInfos[i].isInput = stream->asioBufferInfos[i].isInput;\n        asioError = ASIOGetChannelInfo( &stream->asioChannelInfos[i] );\n        if( asioError != ASE_OK )\n        {\n            result = paUnanticipatedHostError;\n            PA_ASIO_SET_LAST_ASIO_ERROR( asioError );\n            PA_DEBUG((\"OpenStream ERROR11\\n\"));\n            goto error;\n        }\n    }\n\n    stream->bufferPtrs = (void**)PaUtil_AllocateMemory(\n            2 * sizeof(void*) * (inputChannelCount + outputChannelCount) );\n    if( !stream->bufferPtrs )\n    {\n        result = paInsufficientMemory;\n        PA_DEBUG((\"OpenStream ERROR12\\n\"));\n        goto error;\n    }\n\n    if( inputChannelCount > 0 )\n    {\n        stream->inputBufferPtrs[0] = stream-> bufferPtrs;\n        stream->inputBufferPtrs[1] = &stream->bufferPtrs[inputChannelCount];\n\n        for( i=0; i<inputChannelCount; ++i )\n        {\n            stream->inputBufferPtrs[0][i] = stream->asioBufferInfos[i].buffers[0];\n            stream->inputBufferPtrs[1][i] = stream->asioBufferInfos[i].buffers[1];\n        }\n    }\n    else\n    {\n        stream->inputBufferPtrs[0] = 0;\n        stream->inputBufferPtrs[1] = 0;\n    }\n\n    if( outputChannelCount > 0 )\n    {\n        stream->outputBufferPtrs[0] = &stream->bufferPtrs[inputChannelCount*2];\n        stream->outputBufferPtrs[1] = &stream->bufferPtrs[inputChannelCount*2 + outputChannelCount];\n\n        for( i=0; i<outputChannelCount; ++i )\n        {\n            stream->outputBufferPtrs[0][i] = stream->asioBufferInfos[inputChannelCount+i].buffers[0];\n            stream->outputBufferPtrs[1][i] = stream->asioBufferInfos[inputChannelCount+i].buffers[1];\n        }\n    }\n    else\n    {\n        stream->outputBufferPtrs[0] = 0;\n        stream->outputBufferPtrs[1] = 0;\n    }\n\n    if( inputChannelCount > 0 )\n    {\n        /* FIXME: assume all channels use the same type for now\n\n            see: \"ASIO devices with multiple sample formats are unsupported\"\n            http://www.portaudio.com/trac/ticket/106\n        */\n        ASIOSampleType inputType = stream->asioChannelInfos[0].type;\n\n        PA_DEBUG((\"ASIO Input  type:%d\",inputType));\n        AsioSampleTypeLOG(inputType);\n        hostInputSampleFormat = AsioSampleTypeToPaNativeSampleFormat( inputType );\n\n        SelectAsioToPaConverter( inputType, &stream->inputBufferConverter, &stream->inputShift );\n    }\n    else\n    {\n        hostInputSampleFormat = 0;\n        stream->inputBufferConverter = 0;\n    }\n\n    if( outputChannelCount > 0 )\n    {\n        /* FIXME: assume all channels use the same type for now\n\n            see: \"ASIO devices with multiple sample formats are unsupported\"\n            http://www.portaudio.com/trac/ticket/106\n        */\n        ASIOSampleType outputType = stream->asioChannelInfos[inputChannelCount].type;\n\n        PA_DEBUG((\"ASIO Output type:%d\",outputType));\n        AsioSampleTypeLOG(outputType);\n        hostOutputSampleFormat = AsioSampleTypeToPaNativeSampleFormat( outputType );\n\n        SelectPaToAsioConverter( outputType, &stream->outputBufferConverter, &stream->outputShift );\n    }\n    else\n    {\n        hostOutputSampleFormat = 0;\n        stream->outputBufferConverter = 0;\n    }\n\n    /* Values returned by ASIOGetLatencies() include the latency introduced by\n       the ASIO double buffer. */\n    ASIOGetLatencies( &stream->asioInputLatencyFrames, &stream->asioOutputLatencyFrames );\n\n\n    /* Using blocking i/o interface... */\n    if( usingBlockingIo )\n    {\n        /* Allocate the blocking i/o input ring buffer memory. */\n        stream->blockingState = (PaAsioStreamBlockingState*)PaUtil_AllocateMemory( sizeof(PaAsioStreamBlockingState) );\n        if( !stream->blockingState )\n        {\n            result = paInsufficientMemory;\n            PA_DEBUG((\"ERROR! Blocking i/o interface struct allocation failed in OpenStream()\\n\"));\n            goto error;\n        }\n\n        /* Initialize blocking i/o interface struct. */\n        stream->blockingState->readFramesReadyEvent   = NULL; /* Uninitialized, yet. */\n        stream->blockingState->writeBuffersReadyEvent = NULL; /* Uninitialized, yet. */\n        stream->blockingState->readRingBufferData     = NULL; /* Uninitialized, yet. */\n        stream->blockingState->writeRingBufferData    = NULL; /* Uninitialized, yet. */\n        stream->blockingState->readStreamBuffer       = NULL; /* Uninitialized, yet. */\n        stream->blockingState->writeStreamBuffer      = NULL; /* Uninitialized, yet. */\n        stream->blockingState->stopFlag               = TRUE; /* Not started, yet. */\n\n\n        /* If the user buffer is unspecified */\n        if( framesPerBuffer == paFramesPerBufferUnspecified )\n        {\n            /* Make the user buffer the same size as the host buffer. */\n            framesPerBuffer = framesPerHostBuffer;\n        }\n\n\n        /* Initialize callback buffer processor. */\n        result = PaUtil_InitializeBufferProcessor( &stream->bufferProcessor               ,\n                                                    inputChannelCount                     ,\n                                                    inputSampleFormat & ~paNonInterleaved , /* Ring buffer. */\n                                                    (hostInputSampleFormat | paNonInterleaved), /* Host format. */\n                                                    outputChannelCount                    ,\n                                                    outputSampleFormat & ~paNonInterleaved, /* Ring buffer. */\n                                                    (hostOutputSampleFormat | paNonInterleaved), /* Host format. */\n                                                    sampleRate                            ,\n                                                    streamFlags                           ,\n                                                    framesPerBuffer                       , /* Frames per ring buffer block. */\n                                                    framesPerHostBuffer                   , /* Frames per asio buffer. */\n                                                    paUtilFixedHostBufferSize             ,\n                                                    streamCallback                        ,\n                                                    userData                               );\n        if( result != paNoError ){\n            PA_DEBUG((\"OpenStream ERROR13\\n\"));\n            goto error;\n        }\n        callbackBufferProcessorInited = TRUE;\n\n        /* Initialize the blocking i/o buffer processor. */\n        result = PaUtil_InitializeBufferProcessor(&stream->blockingState->bufferProcessor,\n                                                   inputChannelCount                     ,\n                                                   inputSampleFormat                     , /* User format. */\n                                                   inputSampleFormat & ~paNonInterleaved , /* Ring buffer. */\n                                                   outputChannelCount                    ,\n                                                   outputSampleFormat                    , /* User format. */\n                                                   outputSampleFormat & ~paNonInterleaved, /* Ring buffer. */\n                                                   sampleRate                            ,\n                                                   paClipOff | paDitherOff               , /* Don't use dither nor clipping. */\n                                                   framesPerBuffer                       , /* Frames per user buffer. */\n                                                   framesPerBuffer                       , /* Frames per ring buffer block. */\n                                                   paUtilBoundedHostBufferSize           ,\n                                                   NULL, NULL                            );/* No callback! */\n        if( result != paNoError ){\n            PA_DEBUG((\"ERROR! Blocking i/o buffer processor initialization failed in OpenStream()\\n\"));\n            goto error;\n        }\n        blockingBufferProcessorInited = TRUE;\n\n        /* If input is requested. */\n        if( inputChannelCount )\n        {\n            /* Create the callback sync-event. */\n            stream->blockingState->readFramesReadyEvent = CreateEvent( NULL, FALSE, FALSE, NULL );\n            if( stream->blockingState->readFramesReadyEvent == NULL )\n            {\n                result = paUnanticipatedHostError;\n                PA_ASIO_SET_LAST_SYSTEM_ERROR( GetLastError() );\n                PA_DEBUG((\"ERROR! Blocking i/o \\\"read frames ready\\\" event creation failed in OpenStream()\\n\"));\n                goto error;\n            }\n            blockingReadFramesReadyEventInitialized = 1;\n\n\n            /* Create pointer buffer to access non-interleaved data in ReadStream() */\n            stream->blockingState->readStreamBuffer = (void**)PaUtil_AllocateMemory( sizeof(void*) * inputChannelCount );\n            if( !stream->blockingState->readStreamBuffer )\n            {\n                result = paInsufficientMemory;\n                PA_DEBUG((\"ERROR! Blocking i/o read stream buffer allocation failed in OpenStream()\\n\"));\n                goto error;\n            }\n\n            /* The ring buffer should store as many data blocks as needed\n               to achieve the requested latency. Whereas it must be large\n               enough to store at least two complete data blocks.\n\n               1) Determine the amount of latency to be added to the\n                  preferred ASIO latency.\n               2) Make sure we have at lest one additional latency frame.\n               3) Divide the number of frames by the desired block size to\n                  get the number (rounded up to pure integer) of blocks to\n                  be stored in the buffer.\n               4) Add one additional block for block processing and convert\n                  to samples frames.\n               5) Get the next larger (or equal) power-of-two buffer size.\n             */\n            lBlockingBufferSize = suggestedInputLatencyFrames - stream->asioInputLatencyFrames;\n            lBlockingBufferSize = (lBlockingBufferSize > 0) ? lBlockingBufferSize : 1;\n            lBlockingBufferSize = (lBlockingBufferSize + framesPerBuffer - 1) / framesPerBuffer;\n            lBlockingBufferSize = (lBlockingBufferSize + 1) * framesPerBuffer;\n\n            /* Get the next larger or equal power-of-two buffersize. */\n            lBlockingBufferSizePow2 = 1;\n            while( lBlockingBufferSize > (lBlockingBufferSizePow2<<=1) );\n            lBlockingBufferSize = lBlockingBufferSizePow2;\n\n            /* Compute total input latency in seconds */\n            stream->streamRepresentation.streamInfo.inputLatency =\n                (double)( PaUtil_GetBufferProcessorInputLatencyFrames(&stream->bufferProcessor               )\n                        + PaUtil_GetBufferProcessorInputLatencyFrames(&stream->blockingState->bufferProcessor)\n                        + (lBlockingBufferSize / framesPerBuffer - 1) * framesPerBuffer\n                        + stream->asioInputLatencyFrames )\n                / sampleRate;\n\n            /* The code below prints the ASIO latency which doesn't include\n               the buffer processor latency nor the blocking i/o latency. It\n               reports the added latency separately.\n            */\n            PA_DEBUG((\"PaAsio : ASIO InputLatency = %ld (%ld ms),\\n         added buffProc:%ld (%ld ms),\\n         added blocking:%ld (%ld ms)\\n\",\n                stream->asioInputLatencyFrames,\n                (long)( stream->asioInputLatencyFrames * (1000.0 / sampleRate) ),\n                PaUtil_GetBufferProcessorInputLatencyFrames(&stream->bufferProcessor),\n                (long)( PaUtil_GetBufferProcessorInputLatencyFrames(&stream->bufferProcessor) * (1000.0 / sampleRate) ),\n                PaUtil_GetBufferProcessorInputLatencyFrames(&stream->blockingState->bufferProcessor) + (lBlockingBufferSize / framesPerBuffer - 1) * framesPerBuffer,\n                (long)( (PaUtil_GetBufferProcessorInputLatencyFrames(&stream->blockingState->bufferProcessor) + (lBlockingBufferSize / framesPerBuffer - 1) * framesPerBuffer) * (1000.0 / sampleRate) )\n                ));\n\n            /* Determine the size of ring buffer in bytes. */\n            lBytesPerFrame = inputChannelCount * Pa_GetSampleSize(inputSampleFormat );\n\n            /* Allocate the blocking i/o input ring buffer memory. */\n            stream->blockingState->readRingBufferData = (void*)PaUtil_AllocateMemory( lBlockingBufferSize * lBytesPerFrame );\n            if( !stream->blockingState->readRingBufferData )\n            {\n                result = paInsufficientMemory;\n                PA_DEBUG((\"ERROR! Blocking i/o input ring buffer allocation failed in OpenStream()\\n\"));\n                goto error;\n            }\n\n            /* Initialize the input ring buffer struct. */\n            PaUtil_InitializeRingBuffer( &stream->blockingState->readRingBuffer    ,\n                                          lBytesPerFrame                           ,\n                                          lBlockingBufferSize                      ,\n                                          stream->blockingState->readRingBufferData );\n        }\n\n        /* If output is requested. */\n        if( outputChannelCount )\n        {\n            stream->blockingState->writeBuffersReadyEvent = CreateEvent( NULL, FALSE, FALSE, NULL );\n            if( stream->blockingState->writeBuffersReadyEvent == NULL )\n            {\n                result = paUnanticipatedHostError;\n                PA_ASIO_SET_LAST_SYSTEM_ERROR( GetLastError() );\n                PA_DEBUG((\"ERROR! Blocking i/o \\\"write buffers ready\\\" event creation failed in OpenStream()\\n\"));\n                goto error;\n            }\n            blockingWriteBuffersReadyEventInitialized = 1;\n\n            /* Create pointer buffer to access non-interleaved data in WriteStream() */\n            stream->blockingState->writeStreamBuffer = (const void**)PaUtil_AllocateMemory( sizeof(const void*) * outputChannelCount );\n            if( !stream->blockingState->writeStreamBuffer )\n            {\n                result = paInsufficientMemory;\n                PA_DEBUG((\"ERROR! Blocking i/o write stream buffer allocation failed in OpenStream()\\n\"));\n                goto error;\n            }\n\n            /* The ring buffer should store as many data blocks as needed\n               to achieve the requested latency. Whereas it must be large\n               enough to store at least two complete data blocks.\n\n               1) Determine the amount of latency to be added to the\n                  preferred ASIO latency.\n               2) Make sure we have at lest one additional latency frame.\n               3) Divide the number of frames by the desired block size to\n                  get the number (rounded up to pure integer) of blocks to\n                  be stored in the buffer.\n               4) Add one additional block for block processing and convert\n                  to samples frames.\n               5) Get the next larger (or equal) power-of-two buffer size.\n             */\n            lBlockingBufferSize = suggestedOutputLatencyFrames - stream->asioOutputLatencyFrames;\n            lBlockingBufferSize = (lBlockingBufferSize > 0) ? lBlockingBufferSize : 1;\n            lBlockingBufferSize = (lBlockingBufferSize + framesPerBuffer - 1) / framesPerBuffer;\n            lBlockingBufferSize = (lBlockingBufferSize + 1) * framesPerBuffer;\n\n            /* The buffer size (without the additional block) corresponds\n               to the initial number of silent samples in the output ring\n               buffer. */\n            stream->blockingState->writeRingBufferInitialFrames = lBlockingBufferSize - framesPerBuffer;\n\n            /* Get the next larger or equal power-of-two buffersize. */\n            lBlockingBufferSizePow2 = 1;\n            while( lBlockingBufferSize > (lBlockingBufferSizePow2<<=1) );\n            lBlockingBufferSize = lBlockingBufferSizePow2;\n\n            /* Compute total output latency in seconds */\n            stream->streamRepresentation.streamInfo.outputLatency =\n                (double)( PaUtil_GetBufferProcessorOutputLatencyFrames(&stream->bufferProcessor)\n                        + PaUtil_GetBufferProcessorOutputLatencyFrames(&stream->blockingState->bufferProcessor)\n                        + (lBlockingBufferSize / framesPerBuffer - 1) * framesPerBuffer\n                        + stream->asioOutputLatencyFrames )\n                / sampleRate;\n\n            /* The code below prints the ASIO latency which doesn't include\n               the buffer processor latency nor the blocking i/o latency. It\n               reports the added latency separately.\n            */\n            PA_DEBUG((\"PaAsio : ASIO OutputLatency = %ld (%ld ms),\\n         added buffProc:%ld (%ld ms),\\n         added blocking:%ld (%ld ms)\\n\",\n                stream->asioOutputLatencyFrames,\n                (long)( stream->asioOutputLatencyFrames * (1000.0 / sampleRate) ),\n                PaUtil_GetBufferProcessorOutputLatencyFrames(&stream->bufferProcessor),\n                (long)( PaUtil_GetBufferProcessorOutputLatencyFrames(&stream->bufferProcessor) * (1000.0 / sampleRate) ),\n                PaUtil_GetBufferProcessorOutputLatencyFrames(&stream->blockingState->bufferProcessor) + (lBlockingBufferSize / framesPerBuffer - 1) * framesPerBuffer,\n                (long)( (PaUtil_GetBufferProcessorOutputLatencyFrames(&stream->blockingState->bufferProcessor) + (lBlockingBufferSize / framesPerBuffer - 1) * framesPerBuffer) * (1000.0 / sampleRate) )\n                ));\n\n            /* Determine the size of ring buffer in bytes. */\n            lBytesPerFrame = outputChannelCount * Pa_GetSampleSize(outputSampleFormat);\n\n            /* Allocate the blocking i/o output ring buffer memory. */\n            stream->blockingState->writeRingBufferData = (void*)PaUtil_AllocateMemory( lBlockingBufferSize * lBytesPerFrame );\n            if( !stream->blockingState->writeRingBufferData )\n            {\n                result = paInsufficientMemory;\n                PA_DEBUG((\"ERROR! Blocking i/o output ring buffer allocation failed in OpenStream()\\n\"));\n                goto error;\n            }\n\n            /* Initialize the output ring buffer struct. */\n            PaUtil_InitializeRingBuffer( &stream->blockingState->writeRingBuffer    ,\n                                          lBytesPerFrame                            ,\n                                          lBlockingBufferSize                       ,\n                                          stream->blockingState->writeRingBufferData );\n        }\n\n        stream->streamRepresentation.streamInfo.sampleRate = sampleRate;\n\n\n    }\n    else /* Using callback interface... */\n    {\n        result =  PaUtil_InitializeBufferProcessor( &stream->bufferProcessor,\n                        inputChannelCount, inputSampleFormat, (hostInputSampleFormat | paNonInterleaved),\n                        outputChannelCount, outputSampleFormat, (hostOutputSampleFormat | paNonInterleaved),\n                        sampleRate, streamFlags, framesPerBuffer,\n                        framesPerHostBuffer, paUtilFixedHostBufferSize,\n                        streamCallback, userData );\n        if( result != paNoError ){\n            PA_DEBUG((\"OpenStream ERROR13\\n\"));\n            goto error;\n        }\n        callbackBufferProcessorInited = TRUE;\n\n        stream->streamRepresentation.streamInfo.inputLatency =\n                (double)( PaUtil_GetBufferProcessorInputLatencyFrames(&stream->bufferProcessor)\n                    + stream->asioInputLatencyFrames) / sampleRate;   // seconds\n        stream->streamRepresentation.streamInfo.outputLatency =\n                (double)( PaUtil_GetBufferProcessorOutputLatencyFrames(&stream->bufferProcessor)\n                    + stream->asioOutputLatencyFrames) / sampleRate; // seconds\n        stream->streamRepresentation.streamInfo.sampleRate = sampleRate;\n\n        // the code below prints the ASIO latency which doesn't include the\n        // buffer processor latency. it reports the added latency separately\n        PA_DEBUG((\"PaAsio : ASIO InputLatency = %ld (%ld ms), added buffProc:%ld (%ld ms)\\n\",\n                stream->asioInputLatencyFrames,\n                (long)((stream->asioInputLatencyFrames*1000)/ sampleRate),\n                PaUtil_GetBufferProcessorInputLatencyFrames(&stream->bufferProcessor),\n                (long)((PaUtil_GetBufferProcessorInputLatencyFrames(&stream->bufferProcessor)*1000)/ sampleRate)\n                ));\n\n        PA_DEBUG((\"PaAsio : ASIO OuputLatency = %ld (%ld ms), added buffProc:%ld (%ld ms)\\n\",\n                stream->asioOutputLatencyFrames,\n                (long)((stream->asioOutputLatencyFrames*1000)/ sampleRate),\n                PaUtil_GetBufferProcessorOutputLatencyFrames(&stream->bufferProcessor),\n                (long)((PaUtil_GetBufferProcessorOutputLatencyFrames(&stream->bufferProcessor)*1000)/ sampleRate)\n                ));\n    }\n\n    stream->asioHostApi = asioHostApi;\n    stream->framesPerHostCallback = framesPerHostBuffer;\n\n    stream->inputChannelCount = inputChannelCount;\n    stream->outputChannelCount = outputChannelCount;\n    stream->postOutput = driverInfo->postOutput;\n    stream->isStopped = 1;\n    stream->isActive = 0;\n\n    asioHostApi->openAsioDeviceIndex = asioDeviceIndex;\n\n    theAsioStream = stream;\n    *s = (PaStream*)stream;\n\n    return result;\n\nerror:\n    PA_DEBUG((\"goto errored\\n\"));\n    if( stream )\n    {\n        if( stream->blockingState )\n        {\n            if( blockingBufferProcessorInited )\n                PaUtil_TerminateBufferProcessor( &stream->blockingState->bufferProcessor );\n\n            if( stream->blockingState->writeRingBufferData )\n                PaUtil_FreeMemory( stream->blockingState->writeRingBufferData );\n            if( stream->blockingState->writeStreamBuffer )\n                PaUtil_FreeMemory( stream->blockingState->writeStreamBuffer );\n            if( blockingWriteBuffersReadyEventInitialized )\n                CloseHandle( stream->blockingState->writeBuffersReadyEvent );\n\n            if( stream->blockingState->readRingBufferData )\n                PaUtil_FreeMemory( stream->blockingState->readRingBufferData );\n            if( stream->blockingState->readStreamBuffer )\n                PaUtil_FreeMemory( stream->blockingState->readStreamBuffer );\n            if( blockingReadFramesReadyEventInitialized )\n                CloseHandle( stream->blockingState->readFramesReadyEvent );\n\n            PaUtil_FreeMemory( stream->blockingState );\n        }\n\n        if( callbackBufferProcessorInited )\n            PaUtil_TerminateBufferProcessor( &stream->bufferProcessor );\n\n        if( completedBuffersPlayedEventInited )\n            CloseHandle( stream->completedBuffersPlayedEvent );\n\n        if( stream->asioBufferInfos )\n            PaUtil_FreeMemory( stream->asioBufferInfos );\n\n        if( stream->asioChannelInfos )\n            PaUtil_FreeMemory( stream->asioChannelInfos );\n\n        if( stream->bufferPtrs )\n            PaUtil_FreeMemory( stream->bufferPtrs );\n\n        PaUtil_FreeMemory( stream );\n    }\n\n    if( asioBuffersCreated )\n        ASIODisposeBuffers();\n\n    if( asioIsInitialized )\n    {\n        UnloadAsioDriver();\n    }\n    return result;\n}\n\n\n/*\n    When CloseStream() is called, the multi-api layer ensures that\n    the stream has already been stopped or aborted.\n*/\nstatic PaError CloseStream( PaStream* s )\n{\n    PaError result = paNoError;\n    PaAsioStream *stream = (PaAsioStream*)s;\n\n    /*\n        IMPLEMENT ME:\n            - additional stream closing + cleanup\n    */\n\n    PaUtil_TerminateBufferProcessor( &stream->bufferProcessor );\n    PaUtil_TerminateStreamRepresentation( &stream->streamRepresentation );\n\n    stream->asioHostApi->openAsioDeviceIndex = paNoDevice;\n\n    CloseHandle( stream->completedBuffersPlayedEvent );\n\n    /* Using blocking i/o interface... */\n    if( stream->blockingState )\n    {\n        PaUtil_TerminateBufferProcessor( &stream->blockingState->bufferProcessor );\n\n        if( stream->inputChannelCount ) {\n            PaUtil_FreeMemory( stream->blockingState->readRingBufferData );\n            PaUtil_FreeMemory( stream->blockingState->readStreamBuffer  );\n            CloseHandle( stream->blockingState->readFramesReadyEvent );\n        }\n        if( stream->outputChannelCount ) {\n            PaUtil_FreeMemory( stream->blockingState->writeRingBufferData );\n            PaUtil_FreeMemory( stream->blockingState->writeStreamBuffer );\n            CloseHandle( stream->blockingState->writeBuffersReadyEvent );\n        }\n\n        PaUtil_FreeMemory( stream->blockingState );\n    }\n\n    PaUtil_FreeMemory( stream->asioBufferInfos );\n    PaUtil_FreeMemory( stream->asioChannelInfos );\n    PaUtil_FreeMemory( stream->bufferPtrs );\n    PaUtil_FreeMemory( stream );\n\n    ASIODisposeBuffers();\n    UnloadAsioDriver();\n\n    theAsioStream = 0;\n\n    return result;\n}\n\n\nstatic void bufferSwitch(long index, ASIOBool directProcess)\n{\n//TAKEN FROM THE ASIO SDK\n\n    // the actual processing callback.\n    // Beware that this is normally in a separate thread, hence be sure that\n    // you take care about thread synchronization. This is omitted here for\n    // simplicity.\n\n    // as this is a \"back door\" into the bufferSwitchTimeInfo a timeInfo needs\n    // to be created though it will only set the timeInfo.samplePosition and\n    // timeInfo.systemTime fields and the according flags\n\n    ASIOTime  timeInfo;\n    memset( &timeInfo, 0, sizeof (timeInfo) );\n\n    // get the time stamp of the buffer, not necessary if no\n    // synchronization to other media is required\n    if( ASIOGetSamplePosition(&timeInfo.timeInfo.samplePosition, &timeInfo.timeInfo.systemTime) == ASE_OK)\n            timeInfo.timeInfo.flags = kSystemTimeValid | kSamplePositionValid;\n\n    // Call the real callback\n    bufferSwitchTimeInfo( &timeInfo, index, directProcess );\n}\n\n\n// conversion from 64 bit ASIOSample/ASIOTimeStamp to double float\n#if NATIVE_INT64\n    #define ASIO64toDouble(a)  (a)\n#else\n    const double twoRaisedTo32 = 4294967296.;\n    #define ASIO64toDouble(a)  ((a).lo + (a).hi * twoRaisedTo32)\n#endif\n\nstatic ASIOTime *bufferSwitchTimeInfo( ASIOTime *timeInfo, long index, ASIOBool directProcess )\n{\n    // the actual processing callback.\n    // Beware that this is normally in a separate thread, hence be sure that\n    // you take care about thread synchronization.\n\n\n    /* The SDK says the following about the directProcess flag:\n        suggests to the host whether it should immediately start processing\n        (directProcess == ASIOTrue), or whether its process should be deferred\n        because the call comes from a very low level (for instance, a high level\n        priority interrupt), and direct processing would cause timing instabilities for\n        the rest of the system. If in doubt, directProcess should be set to ASIOFalse.\n\n        We just ignore directProcess. This could cause incompatibilities with\n        drivers which really don't want the audio processing to occur in this\n        callback, but none have been identified yet.\n    */\n\n    (void) directProcess; /* suppress unused parameter warning */\n\n#if 0\n    // store the timeInfo for later use\n    asioDriverInfo.tInfo = *timeInfo;\n\n    // get the time stamp of the buffer, not necessary if no\n    // synchronization to other media is required\n\n    if (timeInfo->timeInfo.flags & kSystemTimeValid)\n            asioDriverInfo.nanoSeconds = ASIO64toDouble(timeInfo->timeInfo.systemTime);\n    else\n            asioDriverInfo.nanoSeconds = 0;\n\n    if (timeInfo->timeInfo.flags & kSamplePositionValid)\n            asioDriverInfo.samples = ASIO64toDouble(timeInfo->timeInfo.samplePosition);\n    else\n            asioDriverInfo.samples = 0;\n\n    if (timeInfo->timeCode.flags & kTcValid)\n            asioDriverInfo.tcSamples = ASIO64toDouble(timeInfo->timeCode.timeCodeSamples);\n    else\n            asioDriverInfo.tcSamples = 0;\n\n    // get the system reference time\n    asioDriverInfo.sysRefTime = get_sys_reference_time();\n#endif\n\n#if 0\n    // a few debug messages for the Windows device driver developer\n    // tells you the time when driver got its interrupt and the delay until the app receives\n    // the event notification.\n    static double last_samples = 0;\n    char tmp[128];\n    sprintf (tmp, \"diff: %d / %d ms / %d ms / %d samples                 \\n\", asioDriverInfo.sysRefTime - (long)(asioDriverInfo.nanoSeconds / 1000000.0), asioDriverInfo.sysRefTime, (long)(asioDriverInfo.nanoSeconds / 1000000.0), (long)(asioDriverInfo.samples - last_samples));\n    OutputDebugString (tmp);\n    last_samples = asioDriverInfo.samples;\n#endif\n\n\n    if( !theAsioStream )\n        return 0L;\n\n    // protect against reentrancy\n    if( PaAsio_AtomicIncrement(&theAsioStream->reenterCount) )\n    {\n        theAsioStream->reenterError++;\n        //DBUG((\"bufferSwitchTimeInfo : reentrancy detection = %d\\n\", asioDriverInfo.reenterError));\n        return 0L;\n    }\n\n    int buffersDone = 0;\n\n    do\n    {\n        if( buffersDone > 0 )\n        {\n            // this is a reentered buffer, we missed processing it on time\n            // set the input overflow and output underflow flags as appropriate\n\n            if( theAsioStream->inputChannelCount > 0 )\n                theAsioStream->callbackFlags |= paInputOverflow;\n\n            if( theAsioStream->outputChannelCount > 0 )\n                theAsioStream->callbackFlags |= paOutputUnderflow;\n        }\n        else\n        {\n            if( theAsioStream->zeroOutput )\n            {\n                ZeroOutputBuffers( theAsioStream, index );\n\n                // Finally if the driver supports the ASIOOutputReady() optimization,\n                // do it here, all data are in place\n                if( theAsioStream->postOutput )\n                    ASIOOutputReady();\n\n                if( theAsioStream->stopProcessing )\n                {\n                    if( theAsioStream->stopPlayoutCount < 2 )\n                    {\n                        ++theAsioStream->stopPlayoutCount;\n                        if( theAsioStream->stopPlayoutCount == 2 )\n                        {\n                            theAsioStream->isActive = 0;\n                            if( theAsioStream->streamRepresentation.streamFinishedCallback != 0 )\n                                theAsioStream->streamRepresentation.streamFinishedCallback( theAsioStream->streamRepresentation.userData );\n                            theAsioStream->streamFinishedCallbackCalled = true;\n                            SetEvent( theAsioStream->completedBuffersPlayedEvent );\n                        }\n                    }\n                }\n            }\n            else\n            {\n\n#if 0\n/*\n    see: \"ASIO callback underflow/overflow buffer slip detection doesn't work\"\n    http://www.portaudio.com/trac/ticket/110\n*/\n\n// test code to try to detect slip conditions... these may work on some systems\n// but neither of them work on the RME Digi96\n\n// check that sample delta matches buffer size (otherwise we must have skipped\n// a buffer.\nstatic double last_samples = -512;\ndouble samples;\n//if( timeInfo->timeCode.flags & kTcValid )\n//    samples = ASIO64toDouble(timeInfo->timeCode.timeCodeSamples);\n//else\n    samples = ASIO64toDouble(timeInfo->timeInfo.samplePosition);\nint delta = samples - last_samples;\n//printf( \"%d\\n\", delta);\nlast_samples = samples;\n\nif( delta > theAsioStream->framesPerHostCallback )\n{\n    if( theAsioStream->inputChannelCount > 0 )\n        theAsioStream->callbackFlags |= paInputOverflow;\n\n    if( theAsioStream->outputChannelCount > 0 )\n        theAsioStream->callbackFlags |= paOutputUnderflow;\n}\n\n// check that the buffer index is not the previous index (which would indicate\n// that a buffer was skipped.\nstatic int previousIndex = 1;\nif( index == previousIndex )\n{\n    if( theAsioStream->inputChannelCount > 0 )\n        theAsioStream->callbackFlags |= paInputOverflow;\n\n    if( theAsioStream->outputChannelCount > 0 )\n        theAsioStream->callbackFlags |= paOutputUnderflow;\n}\npreviousIndex = index;\n#endif\n\n                int i;\n\n                PaUtil_BeginCpuLoadMeasurement( &theAsioStream->cpuLoadMeasurer );\n\n                PaStreamCallbackTimeInfo paTimeInfo;\n\n                // asio systemTime is supposed to be measured according to the same\n                // clock as timeGetTime\n                paTimeInfo.currentTime = (ASIO64toDouble( timeInfo->timeInfo.systemTime ) * .000000001);\n\n                /* patch from Paul Boege */\n                paTimeInfo.inputBufferAdcTime = paTimeInfo.currentTime -\n                    ((double)theAsioStream->asioInputLatencyFrames/theAsioStream->streamRepresentation.streamInfo.sampleRate);\n\n                paTimeInfo.outputBufferDacTime = paTimeInfo.currentTime +\n                    ((double)theAsioStream->asioOutputLatencyFrames/theAsioStream->streamRepresentation.streamInfo.sampleRate);\n\n                /* old version is buggy because the buffer processor also adds in its latency to the time parameters\n                paTimeInfo.inputBufferAdcTime = paTimeInfo.currentTime - theAsioStream->streamRepresentation.streamInfo.inputLatency;\n                paTimeInfo.outputBufferDacTime = paTimeInfo.currentTime + theAsioStream->streamRepresentation.streamInfo.outputLatency;\n                */\n\n/* Disabled! Stopping and re-starting the stream causes an input overflow / output underflow. S.Fischer */\n#if 0\n// detect underflows by checking inter-callback time > 2 buffer period\nstatic double previousTime = -1;\nif( previousTime > 0 ){\n\n    double delta = paTimeInfo.currentTime - previousTime;\n\n    if( delta >= 2. * (theAsioStream->framesPerHostCallback / theAsioStream->streamRepresentation.streamInfo.sampleRate) ){\n        if( theAsioStream->inputChannelCount > 0 )\n            theAsioStream->callbackFlags |= paInputOverflow;\n\n        if( theAsioStream->outputChannelCount > 0 )\n            theAsioStream->callbackFlags |= paOutputUnderflow;\n    }\n}\npreviousTime = paTimeInfo.currentTime;\n#endif\n\n                // note that the above input and output times do not need to be\n                // adjusted for the latency of the buffer processor -- the buffer\n                // processor handles that.\n\n                if( theAsioStream->inputBufferConverter )\n                {\n                    for( i=0; i<theAsioStream->inputChannelCount; i++ )\n                    {\n                        theAsioStream->inputBufferConverter( theAsioStream->inputBufferPtrs[index][i],\n                                theAsioStream->inputShift, theAsioStream->framesPerHostCallback );\n                    }\n                }\n\n                PaUtil_BeginBufferProcessing( &theAsioStream->bufferProcessor, &paTimeInfo, theAsioStream->callbackFlags );\n\n                /* reset status flags once they've been passed to the callback */\n                theAsioStream->callbackFlags = 0;\n\n                PaUtil_SetInputFrameCount( &theAsioStream->bufferProcessor, 0 /* default to host buffer size */ );\n                for( i=0; i<theAsioStream->inputChannelCount; ++i )\n                    PaUtil_SetNonInterleavedInputChannel( &theAsioStream->bufferProcessor, i, theAsioStream->inputBufferPtrs[index][i] );\n\n                PaUtil_SetOutputFrameCount( &theAsioStream->bufferProcessor, 0 /* default to host buffer size */ );\n                for( i=0; i<theAsioStream->outputChannelCount; ++i )\n                    PaUtil_SetNonInterleavedOutputChannel( &theAsioStream->bufferProcessor, i, theAsioStream->outputBufferPtrs[index][i] );\n\n                int callbackResult;\n                if( theAsioStream->stopProcessing )\n                    callbackResult = paComplete;\n                else\n                    callbackResult = paContinue;\n                unsigned long framesProcessed = PaUtil_EndBufferProcessing( &theAsioStream->bufferProcessor, &callbackResult );\n\n                if( theAsioStream->outputBufferConverter )\n                {\n                    for( i=0; i<theAsioStream->outputChannelCount; i++ )\n                    {\n                        theAsioStream->outputBufferConverter( theAsioStream->outputBufferPtrs[index][i],\n                                theAsioStream->outputShift, theAsioStream->framesPerHostCallback );\n                    }\n                }\n\n                PaUtil_EndCpuLoadMeasurement( &theAsioStream->cpuLoadMeasurer, framesProcessed );\n\n                // Finally if the driver supports the ASIOOutputReady() optimization,\n                // do it here, all data are in place\n                if( theAsioStream->postOutput )\n                    ASIOOutputReady();\n\n                if( callbackResult == paContinue )\n                {\n                    /* nothing special to do */\n                }\n                else if( callbackResult == paAbort )\n                {\n                    /* finish playback immediately  */\n                    theAsioStream->isActive = 0;\n                    if( theAsioStream->streamRepresentation.streamFinishedCallback != 0 )\n                        theAsioStream->streamRepresentation.streamFinishedCallback( theAsioStream->streamRepresentation.userData );\n                    theAsioStream->streamFinishedCallbackCalled = true;\n                    SetEvent( theAsioStream->completedBuffersPlayedEvent );\n                    theAsioStream->zeroOutput = true;\n                }\n                else /* paComplete or other non-zero value indicating complete */\n                {\n                    /* Finish playback once currently queued audio has completed. */\n                    theAsioStream->stopProcessing = true;\n\n                    if( PaUtil_IsBufferProcessorOutputEmpty( &theAsioStream->bufferProcessor ) )\n                    {\n                        theAsioStream->zeroOutput = true;\n                        theAsioStream->stopPlayoutCount = 0;\n                    }\n                }\n            }\n        }\n\n        ++buffersDone;\n    }while( PaAsio_AtomicDecrement(&theAsioStream->reenterCount) >= 0 );\n\n    return 0L;\n}\n\n\nstatic void sampleRateChanged(ASIOSampleRate sRate)\n{\n    // TAKEN FROM THE ASIO SDK\n    // do whatever you need to do if the sample rate changed\n    // usually this only happens during external sync.\n    // Audio processing is not stopped by the driver, actual sample rate\n    // might not have even changed, maybe only the sample rate status of an\n    // AES/EBU or S/PDIF digital input at the audio device.\n    // You might have to update time/sample related conversion routines, etc.\n\n    (void) sRate; /* unused parameter */\n    PA_DEBUG( (\"sampleRateChanged : %d \\n\", sRate));\n}\n\nstatic long asioMessages(long selector, long value, void* message, double* opt)\n{\n// TAKEN FROM THE ASIO SDK\n    // currently the parameters \"value\", \"message\" and \"opt\" are not used.\n    long ret = 0;\n\n    (void) message; /* unused parameters */\n    (void) opt;\n\n    PA_DEBUG( (\"asioMessages : %d , %d \\n\", selector, value));\n\n    switch(selector)\n    {\n        case kAsioSelectorSupported:\n            if(value == kAsioResetRequest\n            || value == kAsioEngineVersion\n            || value == kAsioResyncRequest\n            || value == kAsioLatenciesChanged\n            // the following three were added for ASIO 2.0, you don't necessarily have to support them\n            || value == kAsioSupportsTimeInfo\n            || value == kAsioSupportsTimeCode\n            || value == kAsioSupportsInputMonitor)\n                    ret = 1L;\n            break;\n\n        case kAsioBufferSizeChange:\n            //printf(\"kAsioBufferSizeChange \\n\");\n            break;\n\n        case kAsioResetRequest:\n            // defer the task and perform the reset of the driver during the next \"safe\" situation\n            // You cannot reset the driver right now, as this code is called from the driver.\n            // Reset the driver is done by completely destruct is. I.e. ASIOStop(), ASIODisposeBuffers(), Destruction\n            // Afterwards you initialize the driver again.\n\n            /*FIXME: commented the next line out\n\n                see: \"PA/ASIO ignores some driver notifications it probably shouldn't\"\n                http://www.portaudio.com/trac/ticket/108\n            */\n            //asioDriverInfo.stopped;  // In this sample the processing will just stop\n            ret = 1L;\n            break;\n\n        case kAsioResyncRequest:\n            // This informs the application, that the driver encountered some non fatal data loss.\n            // It is used for synchronization purposes of different media.\n            // Added mainly to work around the Win16Mutex problems in Windows 95/98 with the\n            // Windows Multimedia system, which could loose data because the Mutex was hold too long\n            // by another thread.\n            // However a driver can issue it in other situations, too.\n            ret = 1L;\n            break;\n\n        case kAsioLatenciesChanged:\n            // This will inform the host application that the drivers were latencies changed.\n            // Beware, it this does not mean that the buffer sizes have changed!\n            // You might need to update internal delay data.\n            ret = 1L;\n            //printf(\"kAsioLatenciesChanged \\n\");\n            break;\n\n        case kAsioEngineVersion:\n            // return the supported ASIO version of the host application\n            // If a host applications does not implement this selector, ASIO 1.0 is assumed\n            // by the driver\n            ret = 2L;\n            break;\n\n        case kAsioSupportsTimeInfo:\n            // informs the driver whether the asioCallbacks.bufferSwitchTimeInfo() callback\n            // is supported.\n            // For compatibility with ASIO 1.0 drivers the host application should always support\n            // the \"old\" bufferSwitch method, too.\n            ret = 1;\n            break;\n\n        case kAsioSupportsTimeCode:\n            // informs the driver whether application is interested in time code info.\n            // If an application does not need to know about time code, the driver has less work\n            // to do.\n            ret = 0;\n            break;\n    }\n    return ret;\n}\n\n\nstatic PaError StartStream( PaStream *s )\n{\n    PaError result = paNoError;\n    PaAsioStream *stream = (PaAsioStream*)s;\n    PaAsioStreamBlockingState *blockingState = stream->blockingState;\n    ASIOError asioError;\n\n    if( stream->outputChannelCount > 0 )\n    {\n        ZeroOutputBuffers( stream, 0 );\n        ZeroOutputBuffers( stream, 1 );\n    }\n\n    PaUtil_ResetBufferProcessor( &stream->bufferProcessor );\n    stream->stopProcessing = false;\n    stream->zeroOutput = false;\n\n    /* Reentrancy counter initialisation */\n    stream->reenterCount = -1;\n    stream->reenterError = 0;\n\n    stream->callbackFlags = 0;\n\n    if( ResetEvent( stream->completedBuffersPlayedEvent ) == 0 )\n    {\n        result = paUnanticipatedHostError;\n        PA_ASIO_SET_LAST_SYSTEM_ERROR( GetLastError() );\n    }\n\n\n    /* Using blocking i/o interface... */\n    if( blockingState )\n    {\n        /* Reset blocking i/o buffer processor. */\n        PaUtil_ResetBufferProcessor( &blockingState->bufferProcessor );\n\n        /* If we're about to process some input data. */\n        if( stream->inputChannelCount )\n        {\n            /* Reset callback-ReadStream sync event. */\n            if( ResetEvent( blockingState->readFramesReadyEvent ) == 0 )\n            {\n                result = paUnanticipatedHostError;\n                PA_ASIO_SET_LAST_SYSTEM_ERROR( GetLastError() );\n            }\n\n            /* Flush blocking i/o ring buffer. */\n            PaUtil_FlushRingBuffer( &blockingState->readRingBuffer );\n            (*blockingState->bufferProcessor.inputZeroer)( blockingState->readRingBuffer.buffer, 1, blockingState->bufferProcessor.inputChannelCount * blockingState->readRingBuffer.bufferSize );\n        }\n\n        /* If we're about to process some output data. */\n        if( stream->outputChannelCount )\n        {\n            /* Reset callback-WriteStream sync event. */\n            if( ResetEvent( blockingState->writeBuffersReadyEvent ) == 0 )\n            {\n                result = paUnanticipatedHostError;\n                PA_ASIO_SET_LAST_SYSTEM_ERROR( GetLastError() );\n            }\n\n            /* Flush blocking i/o ring buffer. */\n            PaUtil_FlushRingBuffer( &blockingState->writeRingBuffer );\n            (*blockingState->bufferProcessor.outputZeroer)( blockingState->writeRingBuffer.buffer, 1, blockingState->bufferProcessor.outputChannelCount * blockingState->writeRingBuffer.bufferSize );\n\n            /* Initialize the output ring buffer to \"silence\". */\n            PaUtil_AdvanceRingBufferWriteIndex( &blockingState->writeRingBuffer, blockingState->writeRingBufferInitialFrames );\n        }\n\n        /* Clear requested frames / buffers count. */\n        blockingState->writeBuffersRequested     = 0;\n        blockingState->readFramesRequested       = 0;\n        blockingState->writeBuffersRequestedFlag = FALSE;\n        blockingState->readFramesRequestedFlag   = FALSE;\n        blockingState->outputUnderflowFlag       = FALSE;\n        blockingState->inputOverflowFlag         = FALSE;\n        blockingState->stopFlag                  = FALSE;\n    }\n\n\n    if( result == paNoError )\n    {\n        assert( theAsioStream == stream ); /* theAsioStream should be set correctly in OpenStream */\n\n        /* initialize these variables before the callback has a chance to be invoked */\n        stream->isStopped = 0;\n        stream->isActive = 1;\n        stream->streamFinishedCallbackCalled = false;\n\n        asioError = ASIOStart();\n        if( asioError != ASE_OK )\n        {\n            stream->isStopped = 1;\n            stream->isActive = 0;\n\n            result = paUnanticipatedHostError;\n            PA_ASIO_SET_LAST_ASIO_ERROR( asioError );\n        }\n    }\n\n    return result;\n}\n\nstatic void EnsureCallbackHasCompleted( PaAsioStream *stream )\n{\n    // make sure that the callback is not still in-flight after ASIOStop()\n    // returns. This has been observed to happen on the Hoontech DSP24 for\n    // example.\n    int count = 2000;  // only wait for 2 seconds, rather than hanging.\n    while( stream->reenterCount != -1 && count > 0 )\n    {\n        Sleep(1);\n        --count;\n    }\n}\n\nstatic PaError StopStream( PaStream *s )\n{\n    PaError result = paNoError;\n    PaAsioStream *stream = (PaAsioStream*)s;\n    PaAsioStreamBlockingState *blockingState = stream->blockingState;\n    ASIOError asioError;\n\n    if( stream->isActive )\n    {\n        /* If blocking i/o output is in use */\n        if( blockingState && stream->outputChannelCount )\n        {\n            /* Request the whole output buffer to be available. */\n            blockingState->writeBuffersRequested = blockingState->writeRingBuffer.bufferSize;\n            /* Signalize that additional buffers are need. */\n            blockingState->writeBuffersRequestedFlag = TRUE;\n            /* Set flag to indicate the playback is to be stopped. */\n            blockingState->stopFlag = TRUE;\n\n            /* Wait until requested number of buffers has been freed. Time\n               out after twice the blocking i/o output buffer could have\n               been consumed. */\n            DWORD timeout = (DWORD)( 2 * blockingState->writeRingBuffer.bufferSize * 1000\n                                       / stream->streamRepresentation.streamInfo.sampleRate );\n            DWORD waitResult = WaitForSingleObject( blockingState->writeBuffersReadyEvent, timeout );\n\n            /* If something seriously went wrong... */\n            if( waitResult == WAIT_FAILED )\n            {\n                PA_DEBUG((\"WaitForSingleObject() failed in StopStream()\\n\"));\n                result = paUnanticipatedHostError;\n                PA_ASIO_SET_LAST_SYSTEM_ERROR( GetLastError() );\n            }\n            else if( waitResult == WAIT_TIMEOUT )\n            {\n                PA_DEBUG((\"WaitForSingleObject() timed out in StopStream()\\n\"));\n                result = paTimedOut;\n            }\n        }\n\n        stream->stopProcessing = true;\n\n        /* wait for the stream to finish playing out enqueued buffers.\n            timeout after four times the stream latency.\n\n            @todo should use a better time out value - if the user buffer\n            length is longer than the asio buffer size then that should\n            be taken into account.\n        */\n        if( WaitForSingleObject( stream->completedBuffersPlayedEvent,\n                (DWORD)(stream->streamRepresentation.streamInfo.outputLatency * 1000. * 4.) )\n                    == WAIT_TIMEOUT )\n        {\n            PA_DEBUG((\"WaitForSingleObject() timed out in StopStream()\\n\" ));\n        }\n    }\n\n    asioError = ASIOStop();\n    if( asioError == ASE_OK )\n    {\n        EnsureCallbackHasCompleted( stream );\n    }\n    else\n    {\n        result = paUnanticipatedHostError;\n        PA_ASIO_SET_LAST_ASIO_ERROR( asioError );\n    }\n\n    stream->isStopped = 1;\n    stream->isActive = 0;\n\n    if( !stream->streamFinishedCallbackCalled )\n    {\n        if( stream->streamRepresentation.streamFinishedCallback != 0 )\n            stream->streamRepresentation.streamFinishedCallback( stream->streamRepresentation.userData );\n    }\n\n    return result;\n}\n\nstatic PaError AbortStream( PaStream *s )\n{\n    PaError result = paNoError;\n    PaAsioStream *stream = (PaAsioStream*)s;\n    ASIOError asioError;\n\n    stream->zeroOutput = true;\n\n    asioError = ASIOStop();\n    if( asioError == ASE_OK )\n    {\n        EnsureCallbackHasCompleted( stream );\n    }\n    else\n    {\n        result = paUnanticipatedHostError;\n        PA_ASIO_SET_LAST_ASIO_ERROR( asioError );\n    }\n\n    stream->isStopped = 1;\n    stream->isActive = 0;\n\n    if( !stream->streamFinishedCallbackCalled )\n    {\n        if( stream->streamRepresentation.streamFinishedCallback != 0 )\n            stream->streamRepresentation.streamFinishedCallback( stream->streamRepresentation.userData );\n    }\n\n    return result;\n}\n\n\nstatic PaError IsStreamStopped( PaStream *s )\n{\n    PaAsioStream *stream = (PaAsioStream*)s;\n\n    return stream->isStopped;\n}\n\n\nstatic PaError IsStreamActive( PaStream *s )\n{\n    PaAsioStream *stream = (PaAsioStream*)s;\n\n    return stream->isActive;\n}\n\n\nstatic PaTime GetStreamTime( PaStream *s )\n{\n    (void) s; /* unused parameter */\n\n    return (double)timeGetTime() * .001;\n}\n\n\nstatic double GetStreamCpuLoad( PaStream* s )\n{\n    PaAsioStream *stream = (PaAsioStream*)s;\n\n    return PaUtil_GetCpuLoad( &stream->cpuLoadMeasurer );\n}\n\n\n/*\n    As separate stream interfaces are used for blocking and callback\n    streams, the following functions can be guaranteed to only be called\n    for blocking streams.\n*/\n\nstatic PaError ReadStream( PaStream      *s     ,\n                           void          *buffer,\n                           unsigned long  frames )\n{\n    PaError result = paNoError; /* Initial return value. */\n    PaAsioStream *stream = (PaAsioStream*)s; /* The PA ASIO stream. */\n\n    /* Pointer to the blocking i/o data struct. */\n    PaAsioStreamBlockingState *blockingState = stream->blockingState;\n\n    /* Get blocking i/o buffer processor and ring buffer pointers. */\n    PaUtilBufferProcessor *pBp = &blockingState->bufferProcessor;\n    PaUtilRingBuffer      *pRb = &blockingState->readRingBuffer;\n\n    /* Ring buffer segment(s) used for writing. */\n    void *pRingBufferData1st = NULL; /* First segment. (Mandatory) */\n    void *pRingBufferData2nd = NULL; /* Second segment. (Optional) */\n\n    /* Number of frames per ring buffer segment. */\n    long lRingBufferSize1st = 0; /* First segment. (Mandatory) */\n    long lRingBufferSize2nd = 0; /* Second segment. (Optional) */\n\n    /* Get number of frames to be processed per data block. */\n    unsigned long lFramesPerBlock = stream->bufferProcessor.framesPerUserBuffer;\n    /* Actual number of frames that has been copied into the ring buffer. */\n    unsigned long lFramesCopied = 0;\n    /* The number of remaining unprocessed dtat frames. */\n    unsigned long lFramesRemaining = frames;\n\n    /* Copy the input argument to avoid pointer increment! */\n    const void *userBuffer;\n    unsigned int i; /* Just a counter. */\n\n    /* About the time, needed to process 8 data blocks. */\n    DWORD timeout = (DWORD)( 8 * lFramesPerBlock * 1000 / stream->streamRepresentation.streamInfo.sampleRate );\n    DWORD waitResult = 0;\n\n\n    /* Check if the stream is still available ready to gather new data. */\n    if( blockingState->stopFlag || !stream->isActive )\n    {\n        PA_DEBUG((\"Warning! Stream no longer available for reading in ReadStream()\\n\"));\n        result = paStreamIsStopped;\n        return result;\n    }\n\n    /* If the stream is a input stream. */\n    if( stream->inputChannelCount )\n    {\n        /* Prepare buffer access. */\n        if( !pBp->userOutputIsInterleaved )\n        {\n            userBuffer = blockingState->readStreamBuffer;\n            for( i = 0; i<pBp->inputChannelCount; ++i )\n            {\n                ((void**)userBuffer)[i] = ((void**)buffer)[i];\n            }\n        } /* Use the unchanged buffer. */\n        else { userBuffer = buffer; }\n\n        do /* Internal block processing for too large user data buffers. */\n        {\n            /* Get the size of the current data block to be processed. */\n            lFramesPerBlock =(lFramesPerBlock < lFramesRemaining)\n                            ? lFramesPerBlock : lFramesRemaining;\n            /* Use predefined block size for as long there are enough\n               buffers available, thereafter reduce the processing block\n               size to match the number of remaining buffers. So the final\n               data block is processed although it may be incomplete. */\n\n            /* If the available amount of data frames is insufficient. */\n            if( PaUtil_GetRingBufferReadAvailable(pRb) < (long) lFramesPerBlock )\n            {\n                /* Make sure, the event isn't already set! */\n                /* ResetEvent( blockingState->readFramesReadyEvent ); */\n\n                /* Set the number of requested buffers. */\n                blockingState->readFramesRequested = lFramesPerBlock;\n\n                /* Signalize that additional buffers are need. */\n                blockingState->readFramesRequestedFlag = TRUE;\n\n                /* Wait until requested number of buffers has been freed. */\n                waitResult = WaitForSingleObject( blockingState->readFramesReadyEvent, timeout );\n\n                /* If something seriously went wrong... */\n                if( waitResult == WAIT_FAILED )\n                {\n                    PA_DEBUG((\"WaitForSingleObject() failed in ReadStream()\\n\"));\n                    result = paUnanticipatedHostError;\n                    PA_ASIO_SET_LAST_SYSTEM_ERROR( GetLastError() );\n                    return result;\n                }\n                else if( waitResult == WAIT_TIMEOUT )\n                {\n                    PA_DEBUG((\"WaitForSingleObject() timed out in ReadStream()\\n\"));\n\n                    /* If block processing has stopped, abort! */\n                    if( blockingState->stopFlag ) { return result = paStreamIsStopped; }\n\n                    /* If a timeout is encountered, give up eventually. */\n                    return result = paTimedOut;\n                }\n            }\n            /* Now, the ring buffer contains the required amount of data\n               frames.\n               (Therefor we don't need to check the return argument of\n               PaUtil_GetRingBufferReadRegions(). ;-) )\n            */\n\n            /* Retrieve pointer(s) to the ring buffer's current write\n               position(s). If the first buffer segment is too small to\n               store the requested number of bytes, an additional second\n               segment is returned. Otherwise, i.e. if the first segment\n               is large enough, the second segment's pointer will be NULL.\n            */\n            PaUtil_GetRingBufferReadRegions(pRb                ,\n                                            lFramesPerBlock    ,\n                                            &pRingBufferData1st,\n                                            &lRingBufferSize1st,\n                                            &pRingBufferData2nd,\n                                            &lRingBufferSize2nd);\n\n            /* Set number of frames to be copied from the ring buffer. */\n            PaUtil_SetInputFrameCount( pBp, lRingBufferSize1st );\n            /* Setup ring buffer access. */\n            PaUtil_SetInterleavedInputChannels(pBp               ,  /* Buffer processor. */\n                                               0                 ,  /* The first channel's index. */\n                                               pRingBufferData1st,  /* First ring buffer segment. */\n                                               0                 ); /* Use all available channels. */\n\n            /* If a second ring buffer segment is required. */\n            if( lRingBufferSize2nd ) {\n                /* Set number of frames to be copied from the ring buffer. */\n                PaUtil_Set2ndInputFrameCount( pBp, lRingBufferSize2nd );\n                /* Setup ring buffer access. */\n                PaUtil_Set2ndInterleavedInputChannels(pBp               ,  /* Buffer processor. */\n                                                      0                 ,  /* The first channel's index. */\n                                                      pRingBufferData2nd,  /* Second ring buffer segment. */\n                                                      0                 ); /* Use all available channels. */\n            }\n\n            /* Let the buffer processor handle \"copy and conversion\" and\n               update the ring buffer indices manually. */\n            lFramesCopied = PaUtil_CopyInput( pBp, &buffer, lFramesPerBlock );\n            PaUtil_AdvanceRingBufferReadIndex( pRb, lFramesCopied );\n\n            /* Decrease number of unprocessed frames. */\n            lFramesRemaining -= lFramesCopied;\n\n        } /* Continue with the next data chunk. */\n        while( lFramesRemaining );\n\n\n        /* If there has been an input overflow within the callback */\n        if( blockingState->inputOverflowFlag )\n        {\n            blockingState->inputOverflowFlag = FALSE;\n\n            /* Return the corresponding error code. */\n            result = paInputOverflowed;\n        }\n\n    } /* If this is not an input stream. */\n    else {\n        result = paCanNotReadFromAnOutputOnlyStream;\n    }\n\n    return result;\n}\n\nstatic PaError WriteStream( PaStream      *s     ,\n                            const void    *buffer,\n                            unsigned long  frames )\n{\n    PaError result = paNoError; /* Initial return value. */\n    PaAsioStream *stream = (PaAsioStream*)s; /* The PA ASIO stream. */\n\n    /* Pointer to the blocking i/o data struct. */\n    PaAsioStreamBlockingState *blockingState = stream->blockingState;\n\n    /* Get blocking i/o buffer processor and ring buffer pointers. */\n    PaUtilBufferProcessor *pBp = &blockingState->bufferProcessor;\n    PaUtilRingBuffer      *pRb = &blockingState->writeRingBuffer;\n\n    /* Ring buffer segment(s) used for writing. */\n    void *pRingBufferData1st = NULL; /* First segment. (Mandatory) */\n    void *pRingBufferData2nd = NULL; /* Second segment. (Optional) */\n\n    /* Number of frames per ring buffer segment. */\n    long lRingBufferSize1st = 0; /* First segment. (Mandatory) */\n    long lRingBufferSize2nd = 0; /* Second segment. (Optional) */\n\n    /* Get number of frames to be processed per data block. */\n    unsigned long lFramesPerBlock = stream->bufferProcessor.framesPerUserBuffer;\n    /* Actual number of frames that has been copied into the ring buffer. */\n    unsigned long lFramesCopied = 0;\n    /* The number of remaining unprocessed dtat frames. */\n    unsigned long lFramesRemaining = frames;\n\n    /* About the time, needed to process 8 data blocks. */\n    DWORD timeout = (DWORD)( 8 * lFramesPerBlock * 1000 / stream->streamRepresentation.streamInfo.sampleRate );\n    DWORD waitResult = 0;\n\n    /* Copy the input argument to avoid pointer increment! */\n    const void *userBuffer;\n    unsigned int i; /* Just a counter. */\n\n\n    /* Check if the stream is still available ready to receive new data. */\n    if( blockingState->stopFlag || !stream->isActive )\n    {\n        PA_DEBUG((\"Warning! Stream no longer available for writing in WriteStream()\\n\"));\n        result = paStreamIsStopped;\n        return result;\n    }\n\n    /* If the stream is a output stream. */\n    if( stream->outputChannelCount )\n    {\n        /* Prepare buffer access. */\n        if( !pBp->userOutputIsInterleaved )\n        {\n            userBuffer = blockingState->writeStreamBuffer;\n            for( i = 0; i<pBp->outputChannelCount; ++i )\n            {\n                ((const void**)userBuffer)[i] = ((const void**)buffer)[i];\n            }\n        } /* Use the unchanged buffer. */\n        else { userBuffer = buffer; }\n\n\n        do /* Internal block processing for too large user data buffers. */\n        {\n            /* Get the size of the current data block to be processed. */\n            lFramesPerBlock =(lFramesPerBlock < lFramesRemaining)\n                            ? lFramesPerBlock : lFramesRemaining;\n            /* Use predefined block size for as long there are enough\n               frames available, thereafter reduce the processing block\n               size to match the number of remaining frames. So the final\n               data block is processed although it may be incomplete. */\n\n            /* If the available amount of buffers is insufficient. */\n            if( PaUtil_GetRingBufferWriteAvailable(pRb) < (long) lFramesPerBlock )\n            {\n                /* Make sure, the event isn't already set! */\n                /* ResetEvent( blockingState->writeBuffersReadyEvent ); */\n\n                /* Set the number of requested buffers. */\n                blockingState->writeBuffersRequested = lFramesPerBlock;\n\n                /* Signalize that additional buffers are need. */\n                blockingState->writeBuffersRequestedFlag = TRUE;\n\n                /* Wait until requested number of buffers has been freed. */\n                waitResult = WaitForSingleObject( blockingState->writeBuffersReadyEvent, timeout );\n\n                /* If something seriously went wrong... */\n                if( waitResult == WAIT_FAILED )\n                {\n                    PA_DEBUG((\"WaitForSingleObject() failed in WriteStream()\\n\"));\n                    result = paUnanticipatedHostError;\n                    PA_ASIO_SET_LAST_SYSTEM_ERROR( GetLastError() );\n                    return result;\n                }\n                else if( waitResult == WAIT_TIMEOUT )\n                {\n                    PA_DEBUG((\"WaitForSingleObject() timed out in WriteStream()\\n\"));\n\n                    /* If block processing has stopped, abort! */\n                    if( blockingState->stopFlag ) { return result = paStreamIsStopped; }\n\n                    /* If a timeout is encountered, give up eventually. */\n                    return result = paTimedOut;\n                }\n            }\n            /* Now, the ring buffer contains the required amount of free\n               space to store the provided number of data frames.\n               (Therefor we don't need to check the return argument of\n               PaUtil_GetRingBufferWriteRegions(). ;-) )\n            */\n\n            /* Retrieve pointer(s) to the ring buffer's current write\n               position(s). If the first buffer segment is too small to\n               store the requested number of bytes, an additional second\n               segment is returned. Otherwise, i.e. if the first segment\n               is large enough, the second segment's pointer will be NULL.\n            */\n            PaUtil_GetRingBufferWriteRegions(pRb                ,\n                                             lFramesPerBlock    ,\n                                             &pRingBufferData1st,\n                                             &lRingBufferSize1st,\n                                             &pRingBufferData2nd,\n                                             &lRingBufferSize2nd);\n\n            /* Set number of frames to be copied to the ring buffer. */\n            PaUtil_SetOutputFrameCount( pBp, lRingBufferSize1st );\n            /* Setup ring buffer access. */\n            PaUtil_SetInterleavedOutputChannels(pBp               ,  /* Buffer processor. */\n                                                0                 ,  /* The first channel's index. */\n                                                pRingBufferData1st,  /* First ring buffer segment. */\n                                                0                 ); /* Use all available channels. */\n\n            /* If a second ring buffer segment is required. */\n            if( lRingBufferSize2nd ) {\n                /* Set number of frames to be copied to the ring buffer. */\n                PaUtil_Set2ndOutputFrameCount( pBp, lRingBufferSize2nd );\n                /* Setup ring buffer access. */\n                PaUtil_Set2ndInterleavedOutputChannels(pBp               ,  /* Buffer processor. */\n                                                       0                 ,  /* The first channel's index. */\n                                                       pRingBufferData2nd,  /* Second ring buffer segment. */\n                                                       0                 ); /* Use all available channels. */\n            }\n\n            /* Let the buffer processor handle \"copy and conversion\" and\n               update the ring buffer indices manually. */\n            lFramesCopied = PaUtil_CopyOutput( pBp, &userBuffer, lFramesPerBlock );\n            PaUtil_AdvanceRingBufferWriteIndex( pRb, lFramesCopied );\n\n            /* Decrease number of unprocessed frames. */\n            lFramesRemaining -= lFramesCopied;\n\n        } /* Continue with the next data chunk. */\n        while( lFramesRemaining );\n\n\n        /* If there has been an output underflow within the callback */\n        if( blockingState->outputUnderflowFlag )\n        {\n            blockingState->outputUnderflowFlag = FALSE;\n\n            /* Return the corresponding error code. */\n            result = paOutputUnderflowed;\n        }\n\n    } /* If this is not an output stream. */\n    else\n    {\n        result = paCanNotWriteToAnInputOnlyStream;\n    }\n\n    return result;\n}\n\n\nstatic signed long GetStreamReadAvailable( PaStream* s )\n{\n    PaAsioStream *stream = (PaAsioStream*)s;\n\n    /* Call buffer utility routine to get the number of available frames. */\n    return PaUtil_GetRingBufferReadAvailable( &stream->blockingState->readRingBuffer );\n}\n\n\nstatic signed long GetStreamWriteAvailable( PaStream* s )\n{\n    PaAsioStream *stream = (PaAsioStream*)s;\n\n    /* Call buffer utility routine to get the number of empty buffers. */\n    return PaUtil_GetRingBufferWriteAvailable( &stream->blockingState->writeRingBuffer );\n}\n\n\n/* This routine will be called by the PortAudio engine when audio is needed.\n** It may called at interrupt level on some machines so don't do anything\n** that could mess up the system like calling malloc() or free().\n*/\nstatic int BlockingIoPaCallback(const void                     *inputBuffer    ,\n                                      void                     *outputBuffer   ,\n                                      unsigned long             framesPerBuffer,\n                                const PaStreamCallbackTimeInfo *timeInfo       ,\n                                      PaStreamCallbackFlags     statusFlags    ,\n                                      void                     *userData       )\n{\n    PaError result = paNoError; /* Initial return value. */\n    PaAsioStream *stream = *(PaAsioStream**)userData; /* The PA ASIO stream. */\n    PaAsioStreamBlockingState *blockingState = stream->blockingState; /* Persume blockingState is valid, otherwise the callback wouldn't be running. */\n\n    /* Get a pointer to the stream's blocking i/o buffer processor. */\n    PaUtilBufferProcessor *pBp = &blockingState->bufferProcessor;\n    PaUtilRingBuffer      *pRb = NULL;\n\n    /* If output data has been requested. */\n    if( stream->outputChannelCount )\n    {\n        /* If the callback input argument signalizes a output underflow,\n           make sure the WriteStream() function knows about it, too! */\n        if( statusFlags & paOutputUnderflowed ) {\n            blockingState->outputUnderflowFlag = TRUE;\n        }\n\n        /* Access the corresponding ring buffer. */\n        pRb = &blockingState->writeRingBuffer;\n\n        /* If the blocking i/o buffer contains enough output data, */\n        if( PaUtil_GetRingBufferReadAvailable(pRb) >= (long) framesPerBuffer )\n        {\n            /* Extract the requested data from the ring buffer. */\n            PaUtil_ReadRingBuffer( pRb, outputBuffer, framesPerBuffer );\n        }\n        else /* If no output data is available :-( */\n        {\n            /* Signalize a write-buffer underflow. */\n            blockingState->outputUnderflowFlag = TRUE;\n\n            /* Fill the output buffer with silence. */\n            (*pBp->outputZeroer)( outputBuffer, 1, pBp->outputChannelCount * framesPerBuffer );\n\n            /* If playback is to be stopped */\n            if( blockingState->stopFlag && PaUtil_GetRingBufferReadAvailable(pRb) < (long) framesPerBuffer )\n            {\n                /* Extract all the remaining data from the ring buffer,\n                   whether it is a complete data block or not. */\n                PaUtil_ReadRingBuffer( pRb, outputBuffer, PaUtil_GetRingBufferReadAvailable(pRb) );\n            }\n        }\n\n        /* Set blocking i/o event? */\n        if( blockingState->writeBuffersRequestedFlag && PaUtil_GetRingBufferWriteAvailable(pRb) >= (long) blockingState->writeBuffersRequested )\n        {\n            /* Reset buffer request. */\n            blockingState->writeBuffersRequestedFlag = FALSE;\n            blockingState->writeBuffersRequested     = 0;\n            /* Signalize that requested buffers are ready. */\n            SetEvent( blockingState->writeBuffersReadyEvent );\n            /* What do we do if SetEvent() returns zero, i.e. the event\n               could not be set? How to return errors from within the\n               callback? - S.Fischer */\n        }\n    }\n\n    /* If input data has been supplied. */\n    if( stream->inputChannelCount )\n    {\n        /* If the callback input argument signalizes a input overflow,\n           make sure the ReadStream() function knows about it, too! */\n        if( statusFlags & paInputOverflowed ) {\n            blockingState->inputOverflowFlag = TRUE;\n        }\n\n        /* Access the corresponding ring buffer. */\n        pRb = &blockingState->readRingBuffer;\n\n        /* If the blocking i/o buffer contains not enough input buffers */\n        if( PaUtil_GetRingBufferWriteAvailable(pRb) < (long) framesPerBuffer )\n        {\n            /* Signalize a read-buffer overflow. */\n            blockingState->inputOverflowFlag = TRUE;\n\n            /* Remove some old data frames from the buffer. */\n            PaUtil_AdvanceRingBufferReadIndex( pRb, framesPerBuffer );\n        }\n\n        /* Insert the current input data into the ring buffer. */\n        PaUtil_WriteRingBuffer( pRb, inputBuffer, framesPerBuffer );\n\n        /* Set blocking i/o event? */\n        if( blockingState->readFramesRequestedFlag && PaUtil_GetRingBufferReadAvailable(pRb) >= (long) blockingState->readFramesRequested )\n        {\n            /* Reset buffer request. */\n            blockingState->readFramesRequestedFlag = FALSE;\n            blockingState->readFramesRequested     = 0;\n            /* Signalize that requested buffers are ready. */\n            SetEvent( blockingState->readFramesReadyEvent );\n            /* What do we do if SetEvent() returns zero, i.e. the event\n               could not be set? How to return errors from within the\n               callback? - S.Fischer */\n            /** @todo report an error with PA_DEBUG */\n        }\n    }\n\n    return paContinue;\n}\n\n\nPaError PaAsio_ShowControlPanel( PaDeviceIndex device, void* systemSpecific )\n{\n    PaError result = paNoError;\n    PaUtilHostApiRepresentation *hostApi;\n    PaDeviceIndex hostApiDevice;\n    ASIODriverInfo asioDriverInfo;\n    ASIOError asioError;\n    int asioIsInitialized = 0;\n    PaAsioHostApiRepresentation *asioHostApi;\n    PaAsioDeviceInfo *asioDeviceInfo;\n    PaWinUtilComInitializationResult comInitializationResult;\n\n    /* initialize COM again here, we might be in another thread */\n    result = PaWinUtil_CoInitialize( paASIO, &comInitializationResult );\n    if( result != paNoError )\n        return result;\n\n    result = PaUtil_GetHostApiRepresentation( &hostApi, paASIO );\n    if( result != paNoError )\n        goto error;\n\n    result = PaUtil_DeviceIndexToHostApiDeviceIndex( &hostApiDevice, device, hostApi );\n    if( result != paNoError )\n        goto error;\n\n    /*\n        In theory we could proceed if the currently open device was the same\n        one for which the control panel was requested, however  because the\n        window pointer is not available until this function is called we\n        currently need to call ASIOInit() again here, which of course can't be\n        done safely while a stream is open.\n    */\n\n    asioHostApi = (PaAsioHostApiRepresentation*)hostApi;\n    if( asioHostApi->openAsioDeviceIndex != paNoDevice )\n    {\n        result = paDeviceUnavailable;\n        goto error;\n    }\n\n    asioDeviceInfo = (PaAsioDeviceInfo*)hostApi->deviceInfos[hostApiDevice];\n\n    if( !asioHostApi->asioDrivers->loadDriver( const_cast<char*>(asioDeviceInfo->commonDeviceInfo.name) ) )\n    {\n        result = paUnanticipatedHostError;\n        goto error;\n    }\n\n    /* CRUCIAL!!! */\n    memset( &asioDriverInfo, 0, sizeof(ASIODriverInfo) );\n    asioDriverInfo.asioVersion = 2;\n    asioDriverInfo.sysRef = systemSpecific;\n    asioError = ASIOInit( &asioDriverInfo );\n    if( asioError != ASE_OK )\n    {\n        result = paUnanticipatedHostError;\n        PA_ASIO_SET_LAST_ASIO_ERROR( asioError );\n        goto error;\n    }\n    else\n    {\n        asioIsInitialized = 1;\n    }\n\nPA_DEBUG((\"PaAsio_ShowControlPanel: ASIOInit(): %s\\n\", PaAsio_GetAsioErrorText(asioError) ));\nPA_DEBUG((\"asioVersion: ASIOInit(): %ld\\n\",   asioDriverInfo.asioVersion ));\nPA_DEBUG((\"driverVersion: ASIOInit(): %ld\\n\", asioDriverInfo.driverVersion ));\nPA_DEBUG((\"Name: ASIOInit(): %s\\n\",           asioDriverInfo.name ));\nPA_DEBUG((\"ErrorMessage: ASIOInit(): %s\\n\",   asioDriverInfo.errorMessage ));\n\n    asioError = ASIOControlPanel();\n    if( asioError != ASE_OK )\n    {\n        PA_DEBUG((\"PaAsio_ShowControlPanel: ASIOControlPanel(): %s\\n\", PaAsio_GetAsioErrorText(asioError) ));\n        result = paUnanticipatedHostError;\n        PA_ASIO_SET_LAST_ASIO_ERROR( asioError );\n        goto error;\n    }\n\nPA_DEBUG((\"PaAsio_ShowControlPanel: ASIOControlPanel(): %s\\n\", PaAsio_GetAsioErrorText(asioError) ));\n\n    asioError = ASIOExit();\n    if( asioError != ASE_OK )\n    {\n        result = paUnanticipatedHostError;\n        PA_ASIO_SET_LAST_ASIO_ERROR( asioError );\n        asioIsInitialized = 0;\n        goto error;\n    }\n\nPA_DEBUG((\"PaAsio_ShowControlPanel: ASIOExit(): %s\\n\", PaAsio_GetAsioErrorText(asioError) ));\n\n    return result;\n\nerror:\n    if( asioIsInitialized )\n    {\n        ASIOExit();\n    }\n\n    PaWinUtil_CoUninitialize( paASIO, &comInitializationResult );\n\n    return result;\n}\n\n\nPaError PaAsio_GetInputChannelName( PaDeviceIndex device, int channelIndex,\n        const char** channelName )\n{\n    PaError result = paNoError;\n    PaUtilHostApiRepresentation *hostApi;\n    PaDeviceIndex hostApiDevice;\n    PaAsioDeviceInfo *asioDeviceInfo;\n\n\n    result = PaUtil_GetHostApiRepresentation( &hostApi, paASIO );\n    if( result != paNoError )\n        goto error;\n\n    result = PaUtil_DeviceIndexToHostApiDeviceIndex( &hostApiDevice, device, hostApi );\n    if( result != paNoError )\n        goto error;\n\n    asioDeviceInfo = (PaAsioDeviceInfo*)hostApi->deviceInfos[hostApiDevice];\n\n    if( channelIndex < 0 || channelIndex >= asioDeviceInfo->commonDeviceInfo.maxInputChannels ){\n        result = paInvalidChannelCount;\n        goto error;\n    }\n\n    *channelName = asioDeviceInfo->asioChannelInfos[channelIndex].name;\n\n    return paNoError;\n\nerror:\n    return result;\n}\n\n\nPaError PaAsio_GetOutputChannelName( PaDeviceIndex device, int channelIndex,\n        const char** channelName )\n{\n    PaError result = paNoError;\n    PaUtilHostApiRepresentation *hostApi;\n    PaDeviceIndex hostApiDevice;\n    PaAsioDeviceInfo *asioDeviceInfo;\n\n\n    result = PaUtil_GetHostApiRepresentation( &hostApi, paASIO );\n    if( result != paNoError )\n        goto error;\n\n    result = PaUtil_DeviceIndexToHostApiDeviceIndex( &hostApiDevice, device, hostApi );\n    if( result != paNoError )\n        goto error;\n\n    asioDeviceInfo = (PaAsioDeviceInfo*)hostApi->deviceInfos[hostApiDevice];\n\n    if( channelIndex < 0 || channelIndex >= asioDeviceInfo->commonDeviceInfo.maxOutputChannels ){\n        result = paInvalidChannelCount;\n        goto error;\n    }\n\n    *channelName = asioDeviceInfo->asioChannelInfos[\n            asioDeviceInfo->commonDeviceInfo.maxInputChannels + channelIndex].name;\n\n    return paNoError;\n\nerror:\n    return result;\n}\n\n\n/* NOTE: the following functions are ASIO-stream specific, and are called directly\n    by client code. We need to check for many more error conditions here because\n    we don't have the benefit of pa_front.c's parameter checking.\n*/\n\nstatic PaError GetAsioStreamPointer( PaAsioStream **stream, PaStream *s )\n{\n    PaError result;\n    PaUtilHostApiRepresentation *hostApi;\n    PaAsioHostApiRepresentation *asioHostApi;\n\n    result = PaUtil_ValidateStreamPointer( s );\n    if( result != paNoError )\n        return result;\n\n    result = PaUtil_GetHostApiRepresentation( &hostApi, paASIO );\n    if( result != paNoError )\n        return result;\n\n    asioHostApi = (PaAsioHostApiRepresentation*)hostApi;\n\n    if( PA_STREAM_REP( s )->streamInterface == &asioHostApi->callbackStreamInterface\n            || PA_STREAM_REP( s )->streamInterface == &asioHostApi->blockingStreamInterface )\n    {\n        /* s is an ASIO  stream */\n        *stream = (PaAsioStream *)s;\n        return paNoError;\n    }\n    else\n    {\n        return paIncompatibleStreamHostApi;\n    }\n}\n\n\nPaError PaAsio_SetStreamSampleRate( PaStream* s, double sampleRate )\n{\n    PaAsioStream *stream;\n    PaError result = GetAsioStreamPointer( &stream, s );\n    if( result != paNoError )\n        return result;\n\n    if( stream != theAsioStream )\n        return paBadStreamPtr;\n\n    return ValidateAndSetSampleRate( sampleRate );\n}\n"
  },
  {
    "path": "thirdparty/portaudio/src/hostapi/coreaudio/notes.txt",
    "content": "Notes on status of CoreAudio Implementation of PortAudio\n\nDocument Last Updated December 9, 2005\n\nThere are currently two implementations of PortAudio for Mac Core Audio.\n\nThe original is in pa_mac_core_old.c, and the newer, default implementation\nis in pa_mac_core.c.\nOnly pa_mac_core.c is currently developed and supported as it uses apple's\ncurrent core audio technology. To select use the old implementation, replace\npa_mac_core.c with pa_mac_core_old.c (eg. \"cp pa_mac_core_auhal.c\npa_mac_core.c\"), then run configure and make as usual.\n\n-------------------------------------------\n\nNotes on Newer/Default AUHAL implementation:\n\nby Bjorn Roche\n\nLast Updated December 9, 2005\n\nPrinciple of Operation:\n\nThis implementation uses AUHAL for audio I/O. To some extent, it also\noperates at the \"HAL\" Layer, though this behavior can be limited by\nplatform specific flags (see pa_mac_core.h for details). The default\nsettings should be reasonable: they don't change the SR of the device and\ndon't cause interruptions if other devices are using the device.\n\nMajor Software Elements Used: Apple's HAL AUs provide output SR\nconversion transparently, however, only on output, so this\nimplementation uses AudioConverters to convert the sample rate on input.\nA PortAudio ring buffer is used to buffer input when sample rate\nconversion is required or when separate audio units are used for duplex\nIO. Finally, a PortAudio buffer processor is used to convert formats and\nprovide additional buffers if needed. Internally, interleaved floating\npoint data streams are used exclusively - the audio unit converts from\nthe audio hardware's native format to interleaved float PCM and\nPortAudio's Buffer processor is used for conversion to user formats.\n\nSimplex Input: Simplex input uses a single callback. If sample rate\nconversion is required, a ring buffer and AudioConverter are used as\nwell.\n\nSimplex output: Simplex output uses a single callback. No ring buffer or\naudio converter is used because AUHAL does its own output SR conversion.\n\nDuplex, one device (no SR conversion): When one device is used, a single\ncallback is used. This achieves very low latency.\n\nDuplex, separate devices or SR conversion: When SR conversion is\nrequired, data must be buffered before it is converted and data is not\nalways available at the same times on input and output, so SR conversion\nrequires the same treatment as separate devices. The input callback\nreads data and puts it in the ring buffer. The output callback reads the\ndata off the ring buffer, into an audio converter and finally to the\nbuffer processor.\n\nPlatform Specific Options:\n\nBy using the flags in pa_mac_core.h, the user may specify several options.\nFor example, the user can specify the sample-rate conversion quality, and\nthe extent to which PA will attempt to \"play nice\" and to what extent it\nwill interrupt other apps to improve performance. For example, if 44100 Hz\nsample rate is requested but the device is set at 48000 Hz, PA can either\nchange the device for optimal playback (\"Pro\" mode), which may interrupt\nother programs playing back audio, or simple use a sample-rate conversion,\nwhich allows for friendlier sharing of the device (\"Play Nice\" mode).\n\nAdditionally, the user may define a \"channel mapping\" by calling\npaSetupMacCoreChannelMap() on their stream info structure before opening\nthe stream with it. See below for creating a channel map.\n\nKnown issues:\n\n- Buffering: No buffering beyond that provided by core audio is provided\nexcept where absolutely needed for the implementation to work. This may cause\nissues with large framesPerBuffer settings and it also means that no additional\nlatency will be provided even if a large latency setting is selected.\n\n- Latency: Latency settings are generally ignored. They may be used as a\nhint for buffer size in paHostFramesPerBufferUnspecified, or the value may\nbe used in cases where additional buffering is needed, such as doing input and\noutput on separate devices. Latency settings are always automatically bound\nto \"safe\" values, however, so setting extreme values here should not be\nan issue.\n\n- Buffer Size: paHostFramesPerBufferUnspecified and specific host buffer sizes\nare supported. paHostFramesPerBufferUnspecified works best in \"pro\" mode,\nwhere the buffer size and sample rate of the audio device is most likely\nto match the expected values. In the case of paHostFramesPerBuffer, an\nappropriate framesPerBuffer value will be used that guarantees minimum\nrequested latency if that's possible.\n\n- Timing info. It reports on stream time, but I'm probably doing something\nwrong since patest_sine_time often reports negative latency numbers. Also,\nthere are currently issues with some devices whehn plugging/unplugging\ndevices.\n\n- xrun detection: The only xrun detection performed is when reading\nand writing the ring buffer. There is probably more that can be done.\n\n- abort/stop issues: stopping a stream is always a complete operation,\nbut latency should be low enough to make the lack of a separate abort\nunnecessary. Apple clarifies its AudioOutputUnitStop() call here:\nhttp://lists.apple.com/archives/coreaudio-api/2005/Dec/msg00055.html\n\n- blocking interface: should work fine.\n\n- multichannel: It has been tested successfully on multichannel hardware\nfrom MOTU: traveler and 896HD. Also Presonus firepod and others. It is\nbelieved to work with all Core Audio devices, including virtual devices\nsuch as soundflower.\n\n- sample rate conversion quality: By default, SR conversion is the maximum\navailable. This can be tweaked using flags pa_mac_core.h. Note that the AU\nrender quyality property is used to set the sample rate conversion quality\nas \"documented\" here:\nhttp://lists.apple.com/archives/coreaudio-api/2004/Jan/msg00141.html\n\n- x86/Universal Binary: Universal binaries can be build.\n\n\n\nCreating a channel map:\n\nHow to create the map array -  Text taken From AUHAL.rtfd :\n[3] Channel Maps\nClients can tell the AUHAL units which channels of the device they are interested in.  For example, the client may be processing stereo data, but outputting to a six-channel device.  This is done by using the kAudioOutputUnitProperty_ChannelMap property.  To use this property:\n\nFor Output:\nCreate an array of SInt32 that is the size of the number of channels of the device (Get the Format of the AUHAL's output Element == 0)\nInitialize each of the array's values to -1 (-1 indicates that that channel is NOT to be presented in the conversion.)\n\nNext, for each channel of your app's output, set:\nchannelMapArray[deviceOutputChannel] = desiredAppOutputChannel.\n\nFor example: we have a 6 channel output device and our application has a stereo source it wants to provide to the device.  Suppose we want that stereo source to go to the 3rd and 4th channels of the device. The channel map would look like this: { -1, -1, 0, 1, -1, -1 }\n\nWhere the formats are:\nInput Element == 0: 2 channels (- client format - settable)\nOutput Element == 0: 6 channels (- device format - NOT settable)\n\nSo channel 2 (zero-based) of the device will take the first channel of output and channel 3 will take the second channel of output. (This translates to the 3rd and 4th plugs of the 6 output plugs of the device of course!)\n\nFor Input:\nCreate an array of SInt32 that is the size of the number of channels of the format you require for input.  Get (or Set in this case as needed) the AUHAL's output Element == 1.\n\nNext, for each channel of input you require, set:\nchannelMapArray[desiredAppInputChannel] = deviceOutputChannel;\n\nFor example: we have a 6 channel input device from which we wish to receive stereo input from the 3rd and 4th channels. The channel map looks like this: { 2, 3 }\n\nWhere the formats are:\nInput Element == 0: 2 channels (- device format - NOT settable)\nOutput Element == 0: 6 channels (- client format - settable)\n\n\n\n----------------------------------------\n\nNotes on Original implementation:\n\nby Phil Burk and Darren Gibbs\n\nLast updated March 20, 2002\n\nWHAT WORKS\n\nOutput with very low latency, <10 msec.\nHalf duplex input or output.\nFull duplex on the same CoreAudio device.\nThe paFLoat32, paInt16, paInt8, paUInt8 sample formats.\nPa_GetCPULoad()\nPa_StreamTime()\n\nKNOWN BUGS OR LIMITATIONS\n\nWe do not yet support simultaneous input and output on different \ndevices. Note that some CoreAudio devices like the Roland UH30 look \nlike one device but are actually two different CoreAudio devices. The \nBuilt-In audio is typically one CoreAudio device.\n\nMono doesn't work.\n\nDEVICE MAPPING\n\nCoreAudio devices can support both input and output. But the sample \nrates supported may be different. So we have map one or two PortAudio \ndevice to each CoreAudio device depending on whether it supports \ninput, output or both.\n\nWhen we query devices, we first get a list of CoreAudio devices. Then \nwe scan the list and add a PortAudio device for each CoreAudio device \nthat supports input. Then we make a scan for output devices.\n\n"
  },
  {
    "path": "thirdparty/portaudio/src/hostapi/coreaudio/pa_mac_core.c",
    "content": "/*\n * Implementation of the PortAudio API for Apple AUHAL\n *\n * PortAudio Portable Real-Time Audio Library\n * Latest Version at: http://www.portaudio.com\n *\n * Written by Bjorn Roche of XO Audio LLC, from PA skeleton code.\n * Portions copied from code by Dominic Mazzoni (who wrote a HAL implementation)\n *\n * Dominic's code was based on code by Phil Burk, Darren Gibbs,\n * Gord Peters, Stephane Letz, and Greg Pfiel.\n *\n * The following people also deserve acknowledgements:\n *\n * Olivier Tristan for feedback and testing\n * Glenn Zelniker and Z-Systems engineering for sponsoring the Blocking I/O\n * interface.\n *\n *\n * Based on the Open Source API proposed by Ross Bencina\n * Copyright (c) 1999-2002 Ross Bencina, Phil Burk\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n/**\n @file pa_mac_core\n @ingroup hostapi_src\n @author Bjorn Roche\n @brief AUHAL implementation of PortAudio\n*/\n\n/* FIXME: not all error conditions call PaUtil_SetLastHostErrorInfo()\n * PaMacCore_SetError() will do this.\n */\n\n#include \"pa_mac_core_internal.h\"\n\n#include <string.h> /* strlen(), memcmp() etc. */\n#include <libkern/OSAtomic.h>\n\n#include \"pa_mac_core.h\"\n#include \"pa_mac_core_utilities.h\"\n#include \"pa_mac_core_blocking.h\"\n\n#ifndef MAC_OS_X_VERSION_10_6\n#define MAC_OS_X_VERSION_10_6 1060\n#endif\n\n\n#ifdef __cplusplus\nextern \"C\"\n{\n#endif /* __cplusplus */\n\n/* This is a reasonable size for a small buffer based on experience. */\n#define PA_MAC_SMALL_BUFFER_SIZE    (64)\n\n/* prototypes for functions declared in this file */\nPaError PaMacCore_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index );\n\n/*\n * Function declared in pa_mac_core.h. Sets up a PaMacCoreStreamInfoStruct\n * with the requested flags and initializes channel map.\n */\nvoid PaMacCore_SetupStreamInfo(  PaMacCoreStreamInfo *data, const unsigned long flags )\n{\n    bzero( data, sizeof( PaMacCoreStreamInfo ) );\n    data->size = sizeof( PaMacCoreStreamInfo );\n    data->hostApiType = paCoreAudio;\n    data->version = 0x01;\n    data->flags = flags;\n    data->channelMap = NULL;\n    data->channelMapSize = 0;\n}\n\n/*\n * Function declared in pa_mac_core.h. Adds channel mapping to a PaMacCoreStreamInfoStruct\n */\nvoid PaMacCore_SetupChannelMap( PaMacCoreStreamInfo *data, const SInt32 * const channelMap, const unsigned long channelMapSize )\n{\n    data->channelMap = channelMap;\n    data->channelMapSize = channelMapSize;\n}\nstatic char *channelName = NULL;\nstatic int channelNameSize = 0;\nstatic bool ensureChannelNameSize( int size )\n{\n    if( size >= channelNameSize ) {\n        free( channelName );\n        channelName = (char *) malloc( ( channelNameSize = size ) + 1 );\n        if( !channelName ) {\n            channelNameSize = 0;\n            return false;\n        }\n    }\n    return true;\n}\n/*\n * Function declared in pa_mac_core.h. retrieves channel names.\n */\nconst char *PaMacCore_GetChannelName( int device, int channelIndex, bool input )\n{\n    struct PaUtilHostApiRepresentation *hostApi;\n    PaError err;\n    OSStatus error;\n    err = PaUtil_GetHostApiRepresentation( &hostApi, paCoreAudio );\n    assert(err == paNoError);\n    if( err != paNoError )\n        return NULL;\n    PaMacAUHAL *macCoreHostApi = (PaMacAUHAL*)hostApi;\n    AudioDeviceID hostApiDevice = macCoreHostApi->devIds[device];\n    CFStringRef nameRef;\n\n    /* First try with CFString */\n    UInt32 size = sizeof(nameRef);\n    error = PaMacCore_AudioDeviceGetProperty( hostApiDevice,\n                                              channelIndex + 1,\n                                              input,\n                                              kAudioDevicePropertyChannelNameCFString,\n                                              &size,\n                                              &nameRef );\n    if( error )\n    {\n        /* try the C String */\n        size = 0;\n        error = PaMacCore_AudioDeviceGetPropertySize( hostApiDevice,\n                                                      channelIndex + 1,\n                                                      input,\n                                                      kAudioDevicePropertyChannelName,\n                                                      &size );\n        if( !error )\n        {\n            if( !ensureChannelNameSize( size ) )\n                return NULL;\n\n            error = PaMacCore_AudioDeviceGetProperty( hostApiDevice,\n                                                      channelIndex + 1,\n                                                      input,\n                                                      kAudioDevicePropertyChannelName,\n                                                      &size,\n                                                      channelName );\n\n\n            if( !error )\n                return channelName;\n        }\n\n        /* as a last-ditch effort, we use the device name and append the channel number. */\n        nameRef = CFStringCreateWithFormat( NULL, NULL, CFSTR( \"%s: %d\"), hostApi->deviceInfos[device]->name, channelIndex + 1 );\n\n\n        size = CFStringGetMaximumSizeForEncoding(CFStringGetLength(nameRef), kCFStringEncodingUTF8);;\n        if( !ensureChannelNameSize( size ) )\n        {\n            CFRelease( nameRef );\n            return NULL;\n        }\n        CFStringGetCString( nameRef, channelName, size+1, kCFStringEncodingUTF8 );\n        CFRelease( nameRef );\n    }\n    else\n    {\n        size = CFStringGetMaximumSizeForEncoding(CFStringGetLength(nameRef), kCFStringEncodingUTF8);;\n        if( !ensureChannelNameSize( size ) )\n        {\n            CFRelease( nameRef );\n            return NULL;\n        }\n        CFStringGetCString( nameRef, channelName, size+1, kCFStringEncodingUTF8 );\n        CFRelease( nameRef );\n    }\n\n    return channelName;\n}\n\n\nPaError PaMacCore_GetBufferSizeRange( PaDeviceIndex device,\n                                      long *minBufferSizeFrames, long *maxBufferSizeFrames )\n{\n    PaError result;\n    PaUtilHostApiRepresentation *hostApi;\n\n    result = PaUtil_GetHostApiRepresentation( &hostApi, paCoreAudio );\n\n    if( result == paNoError )\n    {\n        PaDeviceIndex hostApiDeviceIndex;\n        result = PaUtil_DeviceIndexToHostApiDeviceIndex( &hostApiDeviceIndex, device, hostApi );\n        if( result == paNoError )\n        {\n            PaMacAUHAL *macCoreHostApi = (PaMacAUHAL*)hostApi;\n            AudioDeviceID macCoreDeviceId = macCoreHostApi->devIds[hostApiDeviceIndex];\n            AudioValueRange audioRange;\n            UInt32 propSize = sizeof( audioRange );\n\n            // return the size range for the output scope unless we only have inputs\n            Boolean isInput = 0;\n            if( macCoreHostApi->inheritedHostApiRep.deviceInfos[hostApiDeviceIndex]->maxOutputChannels == 0 )\n                isInput = 1;\n\n            result = WARNING(PaMacCore_AudioDeviceGetProperty( macCoreDeviceId, 0, isInput, kAudioDevicePropertyBufferFrameSizeRange, &propSize, &audioRange ) );\n\n            *minBufferSizeFrames = audioRange.mMinimum;\n            *maxBufferSizeFrames = audioRange.mMaximum;\n        }\n    }\n\n    return result;\n}\n\n\nAudioDeviceID PaMacCore_GetStreamInputDevice( PaStream* s )\n{\n    PaMacCoreStream *stream = (PaMacCoreStream*)s;\n    VVDBUG((\"PaMacCore_GetStreamInputHandle()\\n\"));\n\n    return ( stream->inputDevice );\n}\n\nAudioDeviceID PaMacCore_GetStreamOutputDevice( PaStream* s )\n{\n    PaMacCoreStream *stream = (PaMacCoreStream*)s;\n    VVDBUG((\"PaMacCore_GetStreamOutputHandle()\\n\"));\n\n    return ( stream->outputDevice );\n}\n\n#ifdef __cplusplus\n}\n#endif /* __cplusplus */\n\n#define RING_BUFFER_ADVANCE_DENOMINATOR (4)\n\nstatic void Terminate( struct PaUtilHostApiRepresentation *hostApi );\nstatic PaError IsFormatSupported( struct PaUtilHostApiRepresentation *hostApi,\n                                  const PaStreamParameters *inputParameters,\n                                  const PaStreamParameters *outputParameters,\n                                  double sampleRate );\nstatic PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,\n                           PaStream** s,\n                           const PaStreamParameters *inputParameters,\n                           const PaStreamParameters *outputParameters,\n                           double sampleRate,\n                           unsigned long framesPerBuffer,\n                           PaStreamFlags streamFlags,\n                           PaStreamCallback *streamCallback,\n                           void *userData );\nstatic PaError CloseStream( PaStream* stream );\nstatic PaError StartStream( PaStream *stream );\nstatic PaError StopStream( PaStream *stream );\nstatic PaError AbortStream( PaStream *stream );\nstatic PaError IsStreamStopped( PaStream *s );\nstatic PaError IsStreamActive( PaStream *stream );\nstatic PaTime GetStreamTime( PaStream *stream );\nstatic OSStatus AudioIOProc( void *inRefCon,\n                             AudioUnitRenderActionFlags *ioActionFlags,\n                             const AudioTimeStamp *inTimeStamp,\n                             UInt32 inBusNumber,\n                             UInt32 inNumberFrames,\n                             AudioBufferList *ioData );\nstatic double GetStreamCpuLoad( PaStream* stream );\n\nstatic PaError GetChannelInfo( PaMacAUHAL *auhalHostApi,\n                               PaDeviceInfo *deviceInfo,\n                               AudioDeviceID macCoreDeviceId,\n                               int isInput);\n\nstatic PaError OpenAndSetupOneAudioUnit( const PaMacCoreStream *stream,\n                                         const PaStreamParameters *inStreamParams,\n                                         const PaStreamParameters *outStreamParams,\n                                         const UInt32 requestedFramesPerBuffer,\n                                         UInt32 *actualInputFramesPerBuffer,\n                                         UInt32 *actualOutputFramesPerBuffer,\n                                         const PaMacAUHAL *auhalHostApi,\n                                         AudioUnit *audioUnit,\n                                         AudioConverterRef *srConverter,\n                                         AudioDeviceID *audioDevice,\n                                         const double sampleRate,\n                                         void *refCon );\n\n/* for setting errors. */\n#define PA_AUHAL_SET_LAST_HOST_ERROR( errorCode, errorText ) \\\n    PaUtil_SetLastHostErrorInfo( paCoreAudio, errorCode, errorText )\n\n/*\n * Callback called when starting or stopping a stream.\n */\nstatic void startStopCallback(\n    void *               inRefCon,\n    AudioUnit            ci,\n    AudioUnitPropertyID  inID,\n    AudioUnitScope       inScope,\n    AudioUnitElement     inElement )\n{\n    PaMacCoreStream *stream = (PaMacCoreStream *) inRefCon;\n    UInt32 isRunning;\n    UInt32 size = sizeof( isRunning );\n    OSStatus err;\n    err = AudioUnitGetProperty( ci, kAudioOutputUnitProperty_IsRunning, inScope, inElement, &isRunning, &size );\n    assert( !err );\n    if( err )\n        isRunning = false; //it's very unclear what to do in case of error here. There's no real way to notify the user, and crashing seems unreasonable.\n    if( isRunning )\n        return; //We are only interested in when we are stopping\n    // -- if we are using 2 I/O units, we only need one notification!\n    if( stream->inputUnit && stream->outputUnit && stream->inputUnit != stream->outputUnit && ci == stream->inputUnit )\n        return;\n    PaStreamFinishedCallback *sfc = stream->streamRepresentation.streamFinishedCallback;\n    if( stream->state == STOPPING )\n        stream->state = STOPPED ;\n    if( sfc )\n        sfc( stream->streamRepresentation.userData );\n}\n\n\n/*currently, this is only used in initialization, but it might be modified\n  to be used when the list of devices changes.*/\nstatic PaError gatherDeviceInfo(PaMacAUHAL *auhalHostApi)\n{\n    UInt32 size;\n    UInt32 propsize;\n    VVDBUG((\"gatherDeviceInfo()\\n\"));\n    /* -- free any previous allocations -- */\n    if( auhalHostApi->devIds )\n        PaUtil_GroupFreeMemory(auhalHostApi->allocations, auhalHostApi->devIds);\n    auhalHostApi->devIds = NULL;\n\n    /* -- figure out how many devices there are -- */\n    PaMacCore_AudioHardwareGetPropertySize( kAudioHardwarePropertyDevices,\n                                            &propsize);\n    auhalHostApi->devCount = propsize / sizeof( AudioDeviceID );\n\n    VDBUG( ( \"Found %ld device(s).\\n\", auhalHostApi->devCount ) );\n\n    /* -- copy the device IDs -- */\n    auhalHostApi->devIds = (AudioDeviceID *)PaUtil_GroupAllocateMemory(\n                               auhalHostApi->allocations,\n                               propsize );\n    if( !auhalHostApi->devIds )\n        return paInsufficientMemory;\n    PaMacCore_AudioHardwareGetProperty( kAudioHardwarePropertyDevices,\n                                        &propsize,\n                                        auhalHostApi->devIds );\n#ifdef MAC_CORE_VERBOSE_DEBUG\n    {\n        int i;\n        for( i=0; i<auhalHostApi->devCount; ++i )\n            printf( \"Device %d\\t: %ld\\n\", i, (long)auhalHostApi->devIds[i] );\n    }\n#endif\n\n    size = sizeof(AudioDeviceID);\n    auhalHostApi->defaultIn  = kAudioDeviceUnknown;\n    auhalHostApi->defaultOut = kAudioDeviceUnknown;\n\n    /* determine the default device. */\n    /* I am not sure how these calls to AudioHardwareGetProperty()\n       could fail, but in case they do, we use the first available\n       device as the default. */\n    if( 0 != PaMacCore_AudioHardwareGetProperty(kAudioHardwarePropertyDefaultInputDevice,\n            &size,\n            &auhalHostApi->defaultIn) ) {\n        int i;\n        auhalHostApi->defaultIn  = kAudioDeviceUnknown;\n        VDBUG((\"Failed to get default input device from OS.\"));\n        VDBUG((\" I will substitute the first available input Device.\"));\n        for( i=0; i<auhalHostApi->devCount; ++i ) {\n            PaDeviceInfo devInfo;\n            if( 0 != GetChannelInfo( auhalHostApi, &devInfo,\n                                     auhalHostApi->devIds[i], TRUE ) )\n                if( devInfo.maxInputChannels ) {\n                    auhalHostApi->defaultIn = auhalHostApi->devIds[i];\n                    break;\n                }\n        }\n    }\n    if( 0 != PaMacCore_AudioHardwareGetProperty(kAudioHardwarePropertyDefaultOutputDevice,\n            &size,\n            &auhalHostApi->defaultOut) ) {\n        int i;\n        auhalHostApi->defaultIn  = kAudioDeviceUnknown;\n        VDBUG((\"Failed to get default output device from OS.\"));\n        VDBUG((\" I will substitute the first available output Device.\"));\n        for( i=0; i<auhalHostApi->devCount; ++i ) {\n            PaDeviceInfo devInfo;\n            if( 0 != GetChannelInfo( auhalHostApi, &devInfo,\n                                     auhalHostApi->devIds[i], FALSE ) )\n                if( devInfo.maxOutputChannels ) {\n                    auhalHostApi->defaultOut = auhalHostApi->devIds[i];\n                    break;\n                }\n        }\n    }\n\n    VDBUG( ( \"Default in : %ld\\n\", (long)auhalHostApi->defaultIn  ) );\n    VDBUG( ( \"Default out: %ld\\n\", (long)auhalHostApi->defaultOut ) );\n\n    return paNoError;\n}\n\n/* =================================================================================================== */\n/**\n * @internal\n * @brief Clip the desired size against the allowed IO buffer size range for the device.\n */\nstatic PaError ClipToDeviceBufferSize( AudioDeviceID macCoreDeviceId,\n                                       int isInput, UInt32 desiredSize, UInt32 *allowedSize )\n{\n    UInt32 resultSize = desiredSize;\n    AudioValueRange audioRange;\n    UInt32 propSize = sizeof( audioRange );\n    PaError err = WARNING(PaMacCore_AudioDeviceGetProperty( macCoreDeviceId, 0, isInput, kAudioDevicePropertyBufferFrameSizeRange, &propSize, &audioRange ) );\n    resultSize = MAX( resultSize, audioRange.mMinimum );\n    resultSize = MIN( resultSize, audioRange.mMaximum );\n    *allowedSize = resultSize;\n    return err;\n}\n\n/* =================================================================================================== */\n#if 0\nstatic void DumpDeviceProperties( AudioDeviceID macCoreDeviceId,\n                                  int isInput )\n{\n    PaError err;\n    int i;\n    UInt32 propSize;\n    UInt32 deviceLatency;\n    UInt32 streamLatency;\n    UInt32 bufferFrames;\n    UInt32 safetyOffset;\n    AudioStreamID streamIDs[128];\n\n    printf(\"\\n======= latency query : macCoreDeviceId = %d, isInput %d =======\\n\", (int)macCoreDeviceId, isInput );\n\n    propSize = sizeof(UInt32);\n    err = WARNING(AudioDeviceGetProperty(macCoreDeviceId, 0, isInput, kAudioDevicePropertyBufferFrameSize, &propSize, &bufferFrames));\n    printf(\"kAudioDevicePropertyBufferFrameSize: err = %d, propSize = %d, value = %d\\n\", err, propSize, bufferFrames );\n\n    propSize = sizeof(UInt32);\n    err = WARNING(AudioDeviceGetProperty(macCoreDeviceId, 0, isInput, kAudioDevicePropertySafetyOffset, &propSize, &safetyOffset));\n    printf(\"kAudioDevicePropertySafetyOffset: err = %d, propSize = %d, value = %d\\n\", err, propSize, safetyOffset );\n\n    propSize = sizeof(UInt32);\n    err = WARNING(AudioDeviceGetProperty(macCoreDeviceId, 0, isInput, kAudioDevicePropertyLatency, &propSize, &deviceLatency));\n    printf(\"kAudioDevicePropertyLatency: err = %d, propSize = %d, value = %d\\n\", err, propSize, deviceLatency );\n\n    AudioValueRange audioRange;\n    propSize = sizeof( audioRange );\n    err = WARNING(AudioDeviceGetProperty( macCoreDeviceId, 0, isInput, kAudioDevicePropertyBufferFrameSizeRange, &propSize, &audioRange ) );\n    printf(\"kAudioDevicePropertyBufferFrameSizeRange: err = %d, propSize = %u, minimum = %g\\n\", err, propSize, audioRange.mMinimum);\n    printf(\"kAudioDevicePropertyBufferFrameSizeRange: err = %d, propSize = %u, maximum = %g\\n\", err, propSize, audioRange.mMaximum );\n\n    /* Get the streams from the device and query their latency. */\n    propSize = sizeof(streamIDs);\n    err  = WARNING(AudioDeviceGetProperty(macCoreDeviceId, 0, isInput, kAudioDevicePropertyStreams, &propSize, &streamIDs[0]));\n    int numStreams = propSize / sizeof(AudioStreamID);\n    for( i=0; i<numStreams; i++ )\n    {\n        printf(\"Stream #%d = %d---------------------- \\n\", i, streamIDs[i] );\n\n        propSize = sizeof(UInt32);\n        err  = WARNING(PaMacCore_AudioStreamGetProperty(streamIDs[i], 0, kAudioStreamPropertyLatency, &propSize, &streamLatency));\n        printf(\"  kAudioStreamPropertyLatency: err = %d, propSize = %d, value = %d\\n\", err, propSize, streamLatency );\n    }\n}\n#endif\n\n/* =================================================================================================== */\n/**\n * @internal\n * Calculate the fixed latency from the system and the device.\n * Sum of kAudioStreamPropertyLatency +\n *        kAudioDevicePropertySafetyOffset +\n *        kAudioDevicePropertyLatency\n *\n * Some useful info from Jeff Moore on latency.\n * http://osdir.com/ml/coreaudio-api/2010-01/msg00046.html\n * http://osdir.com/ml/coreaudio-api/2009-07/msg00140.html\n */\nstatic PaError CalculateFixedDeviceLatency( AudioDeviceID macCoreDeviceId, int isInput, UInt32 *fixedLatencyPtr )\n{\n    PaError err;\n    UInt32 propSize;\n    UInt32 deviceLatency;\n    UInt32 streamLatency;\n    UInt32 safetyOffset;\n    AudioStreamID streamIDs[1];\n\n    // To get stream latency we have to get a streamID from the device.\n    // We are only going to look at the first stream so only fetch one stream.\n    propSize = sizeof(streamIDs);\n    err  = WARNING(PaMacCore_AudioDeviceGetProperty(macCoreDeviceId, 0, isInput, kAudioDevicePropertyStreams, &propSize, &streamIDs[0]));\n    if( err != paNoError ) goto error;\n    if( propSize == sizeof(AudioStreamID) )\n    {\n        propSize = sizeof(UInt32);\n        err  = WARNING(PaMacCore_AudioStreamGetProperty(streamIDs[0], 0, kAudioStreamPropertyLatency, &propSize, &streamLatency));\n    }\n\n    propSize = sizeof(UInt32);\n    err = WARNING(PaMacCore_AudioDeviceGetProperty(macCoreDeviceId, 0, isInput, kAudioDevicePropertySafetyOffset, &propSize, &safetyOffset));\n    if( err != paNoError ) goto error;\n\n    propSize = sizeof(UInt32);\n    err = WARNING(PaMacCore_AudioDeviceGetProperty(macCoreDeviceId, 0, isInput, kAudioDevicePropertyLatency, &propSize, &deviceLatency));\n    if( err != paNoError ) goto error;\n\n    *fixedLatencyPtr = deviceLatency + streamLatency + safetyOffset;\n    return err;\nerror:\n    return err;\n}\n\n/* =================================================================================================== */\nstatic PaError CalculateDefaultDeviceLatencies( AudioDeviceID macCoreDeviceId,\n                                                int isInput, UInt32 *lowLatencyFramesPtr,\n                                                UInt32 *highLatencyFramesPtr )\n{\n    UInt32 propSize;\n    UInt32 bufferFrames = 0;\n    UInt32 fixedLatency = 0;\n    UInt32 clippedMinBufferSize = 0;\n\n    //DumpDeviceProperties( macCoreDeviceId, isInput );\n\n    PaError err = CalculateFixedDeviceLatency( macCoreDeviceId, isInput, &fixedLatency );\n    if( err != paNoError ) goto error;\n\n    // For low latency use a small fixed size buffer clipped to the device range.\n    err = ClipToDeviceBufferSize( macCoreDeviceId, isInput, PA_MAC_SMALL_BUFFER_SIZE, &clippedMinBufferSize );\n    if( err != paNoError ) goto error;\n\n    // For high latency use the default device buffer size.\n    propSize = sizeof(UInt32);\n    err = WARNING(PaMacCore_AudioDeviceGetProperty(macCoreDeviceId, 0, isInput, kAudioDevicePropertyBufferFrameSize, &propSize, &bufferFrames));\n    if( err != paNoError ) goto error;\n\n    *lowLatencyFramesPtr = fixedLatency + clippedMinBufferSize;\n    *highLatencyFramesPtr = fixedLatency + bufferFrames;\n\n    return err;\nerror:\n    return err;\n}\n\n/* =================================================================================================== */\n\nstatic PaError GetChannelInfo( PaMacAUHAL *auhalHostApi,\n                               PaDeviceInfo *deviceInfo,\n                               AudioDeviceID macCoreDeviceId,\n                               int isInput)\n{\n    UInt32 propSize;\n    PaError err = paNoError;\n    UInt32 i;\n    int numChannels = 0;\n    AudioBufferList *buflist = NULL;\n\n    VVDBUG((\"GetChannelInfo()\\n\"));\n\n    /* Get the number of channels from the stream configuration.\n       Fail if we can't get this. */\n\n    err = ERR(PaMacCore_AudioDeviceGetPropertySize(macCoreDeviceId, 0, isInput, kAudioDevicePropertyStreamConfiguration, &propSize));\n    if (err)\n        return err;\n\n    buflist = PaUtil_AllocateMemory(propSize);\n    if( !buflist )\n        return paInsufficientMemory;\n    err = ERR(PaMacCore_AudioDeviceGetProperty(macCoreDeviceId, 0, isInput, kAudioDevicePropertyStreamConfiguration, &propSize, buflist));\n    if (err)\n        goto error;\n\n    for (i = 0; i < buflist->mNumberBuffers; ++i)\n        numChannels += buflist->mBuffers[i].mNumberChannels;\n\n    if (isInput)\n        deviceInfo->maxInputChannels = numChannels;\n    else\n        deviceInfo->maxOutputChannels = numChannels;\n\n    if (numChannels > 0) /* do not try to retrieve the latency if there are no channels. */\n    {\n        /* Get the latency.  Don't fail if we can't get this. */\n        /* default to something reasonable */\n        deviceInfo->defaultLowInputLatency = .01;\n        deviceInfo->defaultHighInputLatency = .10;\n        deviceInfo->defaultLowOutputLatency = .01;\n        deviceInfo->defaultHighOutputLatency = .10;\n        UInt32 lowLatencyFrames = 0;\n        UInt32 highLatencyFrames = 0;\n        err = CalculateDefaultDeviceLatencies( macCoreDeviceId, isInput, &lowLatencyFrames, &highLatencyFrames );\n        if( err == 0 )\n        {\n\n            double lowLatencySeconds = lowLatencyFrames / deviceInfo->defaultSampleRate;\n            double highLatencySeconds = highLatencyFrames / deviceInfo->defaultSampleRate;\n            if (isInput)\n            {\n                deviceInfo->defaultLowInputLatency = lowLatencySeconds;\n                deviceInfo->defaultHighInputLatency = highLatencySeconds;\n            }\n            else\n            {\n                deviceInfo->defaultLowOutputLatency = lowLatencySeconds;\n                deviceInfo->defaultHighOutputLatency = highLatencySeconds;\n            }\n        }\n    }\n    PaUtil_FreeMemory( buflist );\n    return paNoError;\nerror:\n    PaUtil_FreeMemory( buflist );\n    return err;\n}\n\n/* =================================================================================================== */\nstatic PaError InitializeDeviceInfo( PaMacAUHAL *auhalHostApi,\n                                     PaDeviceInfo *deviceInfo,\n                                     AudioDeviceID macCoreDeviceId,\n                                     PaHostApiIndex hostApiIndex )\n{\n    Float64 sampleRate;\n    char *name;\n    PaError err = paNoError;\n    CFStringRef nameRef;\n    UInt32 propSize;\n\n    VVDBUG((\"InitializeDeviceInfo(): macCoreDeviceId=%ld\\n\", macCoreDeviceId));\n\n    memset(deviceInfo, 0, sizeof(PaDeviceInfo));\n\n    deviceInfo->structVersion = 2;\n    deviceInfo->hostApi = hostApiIndex;\n\n    /* Get the device name using CFString */\n    propSize = sizeof(nameRef);\n    err = ERR(PaMacCore_AudioDeviceGetProperty(macCoreDeviceId, 0, 0, kAudioDevicePropertyDeviceNameCFString, &propSize, &nameRef));\n    if (err)\n    {\n        /* Get the device name using c string.  Fail if we can't get it. */\n        err = ERR(PaMacCore_AudioDeviceGetPropertySize(macCoreDeviceId, 0, 0, kAudioDevicePropertyDeviceName, &propSize));\n        if (err)\n            return err;\n\n        name = PaUtil_GroupAllocateMemory(auhalHostApi->allocations,propSize+1);\n        if ( !name )\n            return paInsufficientMemory;\n        err = ERR(PaMacCore_AudioDeviceGetProperty(macCoreDeviceId, 0, 0, kAudioDevicePropertyDeviceName, &propSize, name));\n        if (err)\n            return err;\n    }\n    else\n    {\n        /* valid CFString so we just allocate a c string big enough to contain the data */\n        propSize = CFStringGetMaximumSizeForEncoding(CFStringGetLength(nameRef), kCFStringEncodingUTF8);\n        name = PaUtil_GroupAllocateMemory(auhalHostApi->allocations, propSize+1);\n        if ( !name )\n        {\n            CFRelease(nameRef);\n            return paInsufficientMemory;\n        }\n        CFStringGetCString(nameRef, name, propSize+1, kCFStringEncodingUTF8);\n        CFRelease(nameRef);\n    }\n    deviceInfo->name = name;\n\n    /* Try to get the default sample rate.  Don't fail if we can't get this. */\n    propSize = sizeof(Float64);\n    err = ERR(PaMacCore_AudioDeviceGetProperty(macCoreDeviceId, 0, 0, kAudioDevicePropertyNominalSampleRate, &propSize, &sampleRate));\n    if (err)\n        deviceInfo->defaultSampleRate = 0.0;\n    else\n        deviceInfo->defaultSampleRate = sampleRate;\n\n    /* Get the maximum number of input and output channels.  Fail if we can't get this. */\n\n    err = GetChannelInfo(auhalHostApi, deviceInfo, macCoreDeviceId, 1);\n    if (err)\n        return err;\n\n    err = GetChannelInfo(auhalHostApi, deviceInfo, macCoreDeviceId, 0);\n    if (err)\n        return err;\n\n    return paNoError;\n}\n\nPaError PaMacCore_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex hostApiIndex )\n{\n    PaError result = paNoError;\n    int i;\n    PaMacAUHAL *auhalHostApi = NULL;\n    PaDeviceInfo *deviceInfoArray;\n    int unixErr;\n\n    VVDBUG((\"PaMacCore_Initialize(): hostApiIndex=%d\\n\", hostApiIndex));\n\n    SInt32 major;\n    SInt32 minor;\n    Gestalt(gestaltSystemVersionMajor, &major);\n    Gestalt(gestaltSystemVersionMinor, &minor);\n\n    // Starting with 10.6 systems, the HAL notification thread is created internally\n    if ( major > 10 || (major == 10 && minor >= 6) ) {\n        CFRunLoopRef theRunLoop = NULL;\n        AudioObjectPropertyAddress theAddress = { kAudioHardwarePropertyRunLoop, kAudioObjectPropertyScopeGlobal, kAudioObjectPropertyElementMaster };\n        OSStatus osErr = AudioObjectSetPropertyData (kAudioObjectSystemObject, &theAddress, 0, NULL, sizeof(CFRunLoopRef), &theRunLoop);\n        if (osErr != noErr) {\n            goto error;\n        }\n    }\n\n    unixErr = initializeXRunListenerList();\n    if( 0 != unixErr ) {\n        return UNIX_ERR(unixErr);\n    }\n\n    auhalHostApi = (PaMacAUHAL*)PaUtil_AllocateMemory( sizeof(PaMacAUHAL) );\n    if( !auhalHostApi )\n    {\n        result = paInsufficientMemory;\n        goto error;\n    }\n\n    auhalHostApi->allocations = PaUtil_CreateAllocationGroup();\n    if( !auhalHostApi->allocations )\n    {\n        result = paInsufficientMemory;\n        goto error;\n    }\n\n    auhalHostApi->devIds = NULL;\n    auhalHostApi->devCount = 0;\n\n    /* get the info we need about the devices */\n    result = gatherDeviceInfo( auhalHostApi );\n    if( result != paNoError )\n        goto error;\n\n    *hostApi = &auhalHostApi->inheritedHostApiRep;\n    (*hostApi)->info.structVersion = 1;\n    (*hostApi)->info.type = paCoreAudio;\n    (*hostApi)->info.name = \"Core Audio\";\n\n    (*hostApi)->info.defaultInputDevice = paNoDevice;\n    (*hostApi)->info.defaultOutputDevice = paNoDevice;\n\n    (*hostApi)->info.deviceCount = 0;\n\n    if( auhalHostApi->devCount > 0 )\n    {\n        (*hostApi)->deviceInfos = (PaDeviceInfo**)PaUtil_GroupAllocateMemory(\n                auhalHostApi->allocations, sizeof(PaDeviceInfo*) * auhalHostApi->devCount);\n        if( !(*hostApi)->deviceInfos )\n        {\n            result = paInsufficientMemory;\n            goto error;\n        }\n\n        /* allocate all device info structs in a contiguous block */\n        deviceInfoArray = (PaDeviceInfo*)PaUtil_GroupAllocateMemory(\n                auhalHostApi->allocations, sizeof(PaDeviceInfo) * auhalHostApi->devCount );\n        if( !deviceInfoArray )\n        {\n            result = paInsufficientMemory;\n            goto error;\n        }\n\n        for( i=0; i < auhalHostApi->devCount; ++i )\n        {\n            int err;\n            err = InitializeDeviceInfo( auhalHostApi, &deviceInfoArray[i],\n                                        auhalHostApi->devIds[i],\n                                        hostApiIndex );\n            if (err == paNoError)\n            {   /* copy some info and set the defaults */\n                (*hostApi)->deviceInfos[(*hostApi)->info.deviceCount] = &deviceInfoArray[i];\n                if (auhalHostApi->devIds[i] == auhalHostApi->defaultIn)\n                    (*hostApi)->info.defaultInputDevice = (*hostApi)->info.deviceCount;\n                if (auhalHostApi->devIds[i] == auhalHostApi->defaultOut)\n                    (*hostApi)->info.defaultOutputDevice = (*hostApi)->info.deviceCount;\n                (*hostApi)->info.deviceCount++;\n            }\n            else\n            {   /* there was an error. we need to shift the devices down, so we ignore this one */\n                int j;\n                auhalHostApi->devCount--;\n                for( j=i; j<auhalHostApi->devCount; ++j )\n                    auhalHostApi->devIds[j] = auhalHostApi->devIds[j+1];\n                i--;\n            }\n        }\n    }\n\n    (*hostApi)->Terminate = Terminate;\n    (*hostApi)->OpenStream = OpenStream;\n    (*hostApi)->IsFormatSupported = IsFormatSupported;\n\n    PaUtil_InitializeStreamInterface( &auhalHostApi->callbackStreamInterface,\n                                      CloseStream, StartStream,\n                                      StopStream, AbortStream, IsStreamStopped,\n                                      IsStreamActive,\n                                      GetStreamTime, GetStreamCpuLoad,\n                                      PaUtil_DummyRead, PaUtil_DummyWrite,\n                                      PaUtil_DummyGetReadAvailable,\n                                      PaUtil_DummyGetWriteAvailable );\n\n    PaUtil_InitializeStreamInterface( &auhalHostApi->blockingStreamInterface,\n                                      CloseStream, StartStream,\n                                      StopStream, AbortStream, IsStreamStopped,\n                                      IsStreamActive,\n                                      GetStreamTime, PaUtil_DummyGetCpuLoad,\n                                      ReadStream, WriteStream,\n                                      GetStreamReadAvailable,\n                                      GetStreamWriteAvailable );\n\n    return result;\n\nerror:\n    if( auhalHostApi )\n    {\n        if( auhalHostApi->allocations )\n        {\n            PaUtil_FreeAllAllocations( auhalHostApi->allocations );\n            PaUtil_DestroyAllocationGroup( auhalHostApi->allocations );\n        }\n\n        PaUtil_FreeMemory( auhalHostApi );\n    }\n    return result;\n}\n\n\nstatic void Terminate( struct PaUtilHostApiRepresentation *hostApi )\n{\n    int unixErr;\n\n    PaMacAUHAL *auhalHostApi = (PaMacAUHAL*)hostApi;\n\n    VVDBUG((\"Terminate()\\n\"));\n\n    unixErr = destroyXRunListenerList();\n    if( 0 != unixErr )\n        UNIX_ERR(unixErr);\n\n    /*\n        IMPLEMENT ME:\n            - clean up any resources not handled by the allocation group\n        TODO: Double check that everything is handled by alloc group\n    */\n\n    if( auhalHostApi->allocations )\n    {\n        PaUtil_FreeAllAllocations( auhalHostApi->allocations );\n        PaUtil_DestroyAllocationGroup( auhalHostApi->allocations );\n    }\n\n    PaUtil_FreeMemory( auhalHostApi );\n}\n\n\nstatic PaError IsFormatSupported( struct PaUtilHostApiRepresentation *hostApi,\n                                  const PaStreamParameters *inputParameters,\n                                  const PaStreamParameters *outputParameters,\n                                  double sampleRate )\n{\n    int inputChannelCount, outputChannelCount;\n    PaSampleFormat inputSampleFormat, outputSampleFormat;\n\n    VVDBUG((\"IsFormatSupported(): in chan=%d, in fmt=%ld, out chan=%d, out fmt=%ld sampleRate=%g\\n\",\n            inputParameters  ? inputParameters->channelCount  : -1,\n            inputParameters  ? inputParameters->sampleFormat  : -1,\n            outputParameters ? outputParameters->channelCount : -1,\n            outputParameters ? outputParameters->sampleFormat : -1,\n            (float) sampleRate ));\n\n    /** These first checks are standard PA checks. We do some fancier checks\n        later. */\n    if( inputParameters )\n    {\n        inputChannelCount = inputParameters->channelCount;\n        inputSampleFormat = inputParameters->sampleFormat;\n\n        /* all standard sample formats are supported by the buffer adapter,\n            this implementation doesn't support any custom sample formats */\n        if( inputSampleFormat & paCustomFormat )\n            return paSampleFormatNotSupported;\n\n        /* unless alternate device specification is supported, reject the use of\n            paUseHostApiSpecificDeviceSpecification */\n\n        if( inputParameters->device == paUseHostApiSpecificDeviceSpecification )\n            return paInvalidDevice;\n\n        /* check that input device can support inputChannelCount */\n        if( inputChannelCount > hostApi->deviceInfos[ inputParameters->device ]->maxInputChannels )\n            return paInvalidChannelCount;\n    }\n    else\n    {\n        inputChannelCount = 0;\n    }\n\n    if( outputParameters )\n    {\n        outputChannelCount = outputParameters->channelCount;\n        outputSampleFormat = outputParameters->sampleFormat;\n\n        /* all standard sample formats are supported by the buffer adapter,\n            this implementation doesn't support any custom sample formats */\n        if( outputSampleFormat & paCustomFormat )\n            return paSampleFormatNotSupported;\n\n        /* unless alternate device specification is supported, reject the use of\n            paUseHostApiSpecificDeviceSpecification */\n\n        if( outputParameters->device == paUseHostApiSpecificDeviceSpecification )\n            return paInvalidDevice;\n\n        /* check that output device can support outputChannelCount */\n        if( outputChannelCount > hostApi->deviceInfos[ outputParameters->device ]->maxOutputChannels )\n            return paInvalidChannelCount;\n\n    }\n    else\n    {\n        outputChannelCount = 0;\n    }\n\n    /* FEEDBACK */\n    /*        I think the only way to check a given format SR combo is     */\n    /*        to try opening it. This could be disruptive, is that Okay?   */\n    /*        The alternative is to just read off available sample rates,  */\n    /*        but this will not work %100 of the time (eg, a device that   */\n    /*        supports N output at one rate but only N/2 at a higher rate.)*/\n\n    /* The following code opens the device with the requested parameters to\n       see if it works. */\n    {\n        PaError err;\n        PaStream *s;\n        err = OpenStream( hostApi, &s, inputParameters, outputParameters,\n                          sampleRate, 1024, 0, (PaStreamCallback *)1, NULL );\n        if( err != paNoError && err != paInvalidSampleRate )\n            DBUG( ( \"OpenStream @ %g returned: %d: %s\\n\",\n                    (float) sampleRate, err, Pa_GetErrorText( err ) ) );\n        if( err )\n            return err;\n        err = CloseStream( s );\n        if( err ) {\n            /* FEEDBACK: is this more serious? should we assert? */\n            DBUG( ( \"WARNING: could not close Stream. %d: %s\\n\",\n                    err, Pa_GetErrorText( err ) ) );\n        }\n    }\n\n    return paFormatIsSupported;\n}\n\n/* ================================================================================= */\nstatic void InitializeDeviceProperties( PaMacCoreDeviceProperties *deviceProperties )\n{\n    memset( deviceProperties, 0, sizeof(PaMacCoreDeviceProperties) );\n    deviceProperties->sampleRate = 1.0; // Better than random. Overwritten by actual values later on.\n    deviceProperties->samplePeriod = 1.0 / deviceProperties->sampleRate;\n}\n\nstatic Float64 CalculateSoftwareLatencyFromProperties( PaMacCoreStream *stream, PaMacCoreDeviceProperties *deviceProperties )\n{\n    UInt32 latencyFrames = deviceProperties->bufferFrameSize + deviceProperties->deviceLatency + deviceProperties->safetyOffset;\n    return latencyFrames * deviceProperties->samplePeriod; // same as dividing by sampleRate but faster\n}\n\nstatic Float64 CalculateHardwareLatencyFromProperties( PaMacCoreStream *stream, PaMacCoreDeviceProperties *deviceProperties )\n{\n    return deviceProperties->deviceLatency * deviceProperties->samplePeriod; // same as dividing by sampleRate but faster\n}\n\n/* Calculate values used to convert Apple timestamps into PA timestamps\n * from the device properties. The final results of this calculation\n * will be used in the audio callback function.\n */\nstatic void UpdateTimeStampOffsets( PaMacCoreStream *stream )\n{\n    Float64 inputSoftwareLatency = 0.0;\n    Float64 inputHardwareLatency = 0.0;\n    Float64 outputSoftwareLatency = 0.0;\n    Float64 outputHardwareLatency = 0.0;\n\n    if( stream->inputUnit != NULL )\n    {\n        inputSoftwareLatency = CalculateSoftwareLatencyFromProperties( stream, &stream->inputProperties );\n        inputHardwareLatency = CalculateHardwareLatencyFromProperties( stream, &stream->inputProperties );\n    }\n    if( stream->outputUnit != NULL )\n    {\n        outputSoftwareLatency = CalculateSoftwareLatencyFromProperties( stream, &stream->outputProperties );\n        outputHardwareLatency = CalculateHardwareLatencyFromProperties( stream, &stream->outputProperties );\n    }\n\n    /* We only need a mutex around setting these variables as a group. */\n    pthread_mutex_lock( &stream->timingInformationMutex );\n    stream->timestampOffsetCombined = inputSoftwareLatency + outputSoftwareLatency;\n    stream->timestampOffsetInputDevice = inputHardwareLatency;\n    stream->timestampOffsetOutputDevice = outputHardwareLatency;\n    pthread_mutex_unlock( &stream->timingInformationMutex );\n}\n\n/* ================================================================================= */\n\n/* can be used to update from nominal or actual sample rate */\nstatic OSStatus UpdateSampleRateFromDeviceProperty( PaMacCoreStream *stream, AudioDeviceID deviceID,\n                                                    Boolean isInput, AudioDevicePropertyID sampleRatePropertyID )\n{\n    PaMacCoreDeviceProperties * deviceProperties = isInput ? &stream->inputProperties : &stream->outputProperties;\n\n    Float64 sampleRate = 0.0;\n    UInt32 propSize = sizeof(Float64);\n    OSStatus osErr = PaMacCore_AudioDeviceGetProperty( deviceID, 0, isInput, sampleRatePropertyID, &propSize, &sampleRate);\n    if( (osErr == noErr) && (sampleRate > 1000.0) ) /* avoid divide by zero if there's an error */\n    {\n        deviceProperties->sampleRate = sampleRate;\n        deviceProperties->samplePeriod = 1.0 / sampleRate;\n    }\n    return osErr;\n}\n\nstatic OSStatus AudioDevicePropertyActualSampleRateListenerProc( AudioObjectID inDevice, UInt32 inNumberAddresses,\n                                                                 const AudioObjectPropertyAddress * inAddresses, void * inClientData )\n{\n    PaMacCoreStream *stream = (PaMacCoreStream*)inClientData;\n    bool isInput = inAddresses->mScope == kAudioDevicePropertyScopeInput;\n\n    // Make sure the callback is operating on a stream that is still valid!\n    assert( stream->streamRepresentation.magic == PA_STREAM_MAGIC );\n\n    OSStatus osErr = UpdateSampleRateFromDeviceProperty( stream, inDevice, isInput, kAudioDevicePropertyActualSampleRate );\n    if( osErr == noErr )\n    {\n        UpdateTimeStampOffsets( stream );\n    }\n    return osErr;\n}\n\n/* ================================================================================= */\nstatic OSStatus QueryUInt32DeviceProperty( AudioDeviceID deviceID, Boolean isInput, AudioDevicePropertyID propertyID, UInt32 *outValue )\n{\n    UInt32 propertyValue = 0;\n    UInt32 propertySize = sizeof(UInt32);\n    OSStatus osErr = PaMacCore_AudioDeviceGetProperty( deviceID, 0, isInput, propertyID, &propertySize, &propertyValue);\n    if( osErr == noErr )\n    {\n        *outValue = propertyValue;\n    }\n    return osErr;\n}\n\nstatic OSStatus AudioDevicePropertyGenericListenerProc( AudioObjectID inDevice, UInt32 inNumberAddresses,\n                                                        const AudioObjectPropertyAddress * inAddresses, void * inClientData )\n{\n    OSStatus osErr = noErr;\n    PaMacCoreStream *stream = (PaMacCoreStream*)inClientData;\n    bool isInput = inAddresses->mScope == kAudioDevicePropertyScopeInput;\n    AudioDevicePropertyID inPropertyID = inAddresses->mSelector;\n\n    // Make sure the callback is operating on a stream that is still valid!\n    assert( stream->streamRepresentation.magic == PA_STREAM_MAGIC );\n\n    PaMacCoreDeviceProperties *deviceProperties = isInput ? &stream->inputProperties : &stream->outputProperties;\n    UInt32 *valuePtr = NULL;\n    switch( inPropertyID )\n    {\n    case kAudioDevicePropertySafetyOffset:\n        valuePtr = &deviceProperties->safetyOffset;\n        break;\n\n    case kAudioDevicePropertyLatency:\n        valuePtr = &deviceProperties->deviceLatency;\n        break;\n\n    case kAudioDevicePropertyBufferFrameSize:\n        valuePtr = &deviceProperties->bufferFrameSize;\n        break;\n    }\n    if( valuePtr != NULL )\n    {\n        osErr = QueryUInt32DeviceProperty( inDevice, isInput, inPropertyID, valuePtr );\n        if( osErr == noErr )\n        {\n            UpdateTimeStampOffsets( stream );\n        }\n    }\n    return osErr;\n}\n\n/* ================================================================================= */\n/*\n * Setup listeners in case device properties change during the run. */\nstatic OSStatus SetupDevicePropertyListeners( PaMacCoreStream *stream, AudioDeviceID deviceID, Boolean isInput )\n{\n    OSStatus osErr = noErr;\n    PaMacCoreDeviceProperties *deviceProperties = isInput ? &stream->inputProperties : &stream->outputProperties;\n\n    if( (osErr = QueryUInt32DeviceProperty( deviceID, isInput,\n                                            kAudioDevicePropertyLatency, &deviceProperties->deviceLatency )) != noErr ) return osErr;\n    if( (osErr = QueryUInt32DeviceProperty( deviceID, isInput,\n                                            kAudioDevicePropertyBufferFrameSize, &deviceProperties->bufferFrameSize )) != noErr ) return osErr;\n    if( (osErr = QueryUInt32DeviceProperty( deviceID, isInput,\n                                            kAudioDevicePropertySafetyOffset, &deviceProperties->safetyOffset )) != noErr ) return osErr;\n\n    PaMacCore_AudioDeviceAddPropertyListener( deviceID, 0, isInput, kAudioDevicePropertyActualSampleRate,\n            AudioDevicePropertyActualSampleRateListenerProc, stream );\n\n    PaMacCore_AudioDeviceAddPropertyListener( deviceID, 0, isInput, kAudioStreamPropertyLatency,\n            AudioDevicePropertyGenericListenerProc, stream );\n    PaMacCore_AudioDeviceAddPropertyListener( deviceID, 0, isInput, kAudioDevicePropertyBufferFrameSize,\n            AudioDevicePropertyGenericListenerProc, stream );\n    PaMacCore_AudioDeviceAddPropertyListener( deviceID, 0, isInput, kAudioDevicePropertySafetyOffset,\n            AudioDevicePropertyGenericListenerProc, stream );\n\n    return osErr;\n}\n\nstatic void CleanupDevicePropertyListeners( PaMacCoreStream *stream, AudioDeviceID deviceID, Boolean isInput )\n{\n    PaMacCore_AudioDeviceRemovePropertyListener( deviceID, 0, isInput, kAudioDevicePropertyActualSampleRate,\n            AudioDevicePropertyActualSampleRateListenerProc, stream );\n\n    PaMacCore_AudioDeviceRemovePropertyListener( deviceID, 0, isInput, kAudioDevicePropertyLatency,\n            AudioDevicePropertyGenericListenerProc, stream );\n    PaMacCore_AudioDeviceRemovePropertyListener( deviceID, 0, isInput, kAudioDevicePropertyBufferFrameSize,\n            AudioDevicePropertyGenericListenerProc, stream );\n    PaMacCore_AudioDeviceRemovePropertyListener( deviceID, 0, isInput, kAudioDevicePropertySafetyOffset,\n            AudioDevicePropertyGenericListenerProc, stream );\n}\n\n/* ================================================================================= */\nstatic PaError OpenAndSetupOneAudioUnit(\n        const PaMacCoreStream *stream,\n        const PaStreamParameters *inStreamParams,\n        const PaStreamParameters *outStreamParams,\n        const UInt32 requestedFramesPerBuffer,\n        UInt32 *actualInputFramesPerBuffer,\n        UInt32 *actualOutputFramesPerBuffer,\n        const PaMacAUHAL *auhalHostApi,\n        AudioUnit *audioUnit,\n        AudioConverterRef *srConverter,\n        AudioDeviceID *audioDevice,\n        const double sampleRate,\n        void *refCon )\n{\n#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6\n    AudioComponentDescription desc;\n    AudioComponent comp;\n#else\n    ComponentDescription desc;\n    Component comp;\n#endif\n    /*An Apple TN suggests using CAStreamBasicDescription, but that is C++*/\n    AudioStreamBasicDescription desiredFormat;\n    OSStatus result = noErr;\n    PaError paResult = paNoError;\n    int line = 0;\n    UInt32 callbackKey;\n    AURenderCallbackStruct rcbs;\n    unsigned long macInputStreamFlags  = paMacCorePlayNice;\n    unsigned long macOutputStreamFlags = paMacCorePlayNice;\n    SInt32 const *inChannelMap = NULL;\n    SInt32 const *outChannelMap = NULL;\n    unsigned long inChannelMapSize = 0;\n    unsigned long outChannelMapSize = 0;\n\n    VVDBUG((\"OpenAndSetupOneAudioUnit(): in chan=%d, in fmt=%ld, out chan=%d, out fmt=%ld, requestedFramesPerBuffer=%ld\\n\",\n            inStreamParams  ? inStreamParams->channelCount  : -1,\n            inStreamParams  ? inStreamParams->sampleFormat  : -1,\n            outStreamParams ? outStreamParams->channelCount : -1,\n            outStreamParams ? outStreamParams->sampleFormat : -1,\n            requestedFramesPerBuffer ));\n\n    /* -- handle the degenerate case  -- */\n    if( !inStreamParams && !outStreamParams ) {\n        *audioUnit = NULL;\n        *audioDevice = kAudioDeviceUnknown;\n        return paNoError;\n    }\n\n    /* -- get the user's api specific info, if they set any -- */\n    if( inStreamParams && inStreamParams->hostApiSpecificStreamInfo )\n    {\n        macInputStreamFlags=\n            ((PaMacCoreStreamInfo*)inStreamParams->hostApiSpecificStreamInfo)\n            ->flags;\n        inChannelMap = ((PaMacCoreStreamInfo*)inStreamParams->hostApiSpecificStreamInfo)->channelMap;\n        inChannelMapSize = ((PaMacCoreStreamInfo*)inStreamParams->hostApiSpecificStreamInfo)->channelMapSize;\n    }\n    if( outStreamParams && outStreamParams->hostApiSpecificStreamInfo )\n    {\n        macOutputStreamFlags=\n            ((PaMacCoreStreamInfo*)outStreamParams->hostApiSpecificStreamInfo)\n            ->flags;\n        outChannelMap = ((PaMacCoreStreamInfo*)outStreamParams->hostApiSpecificStreamInfo)->channelMap;\n        outChannelMapSize = ((PaMacCoreStreamInfo*)outStreamParams->hostApiSpecificStreamInfo)->channelMapSize;\n    }\n    /* Override user's flags here, if desired for testing. */\n\n    /*\n     * The HAL AU is a Mac OS style \"component\".\n     * the first few steps deal with that.\n     * Later steps work on a combination of Mac OS\n     * components and the slightly lower level\n     * HAL.\n     */\n\n    /* -- describe the output type AudioUnit -- */\n    /*  Note: for the default AudioUnit, we could use the\n     *  componentSubType value kAudioUnitSubType_DefaultOutput;\n     *  but I don't think that's relevant here.\n     */\n    desc.componentType         = kAudioUnitType_Output;\n    desc.componentSubType      = kAudioUnitSubType_HALOutput;\n    desc.componentManufacturer = kAudioUnitManufacturer_Apple;\n    desc.componentFlags        = 0;\n    desc.componentFlagsMask    = 0;\n    /* -- find the component -- */\n#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6\n    comp = AudioComponentFindNext( NULL, &desc );\n#else\n    comp = FindNextComponent( NULL, &desc );\n#endif\n    if( !comp )\n    {\n        DBUG( ( \"AUHAL component not found.\" ) );\n        *audioUnit = NULL;\n        *audioDevice = kAudioDeviceUnknown;\n        return paUnanticipatedHostError;\n    }\n    /* -- open it -- */\n#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6\n    result = AudioComponentInstanceNew( comp, audioUnit );\n#else\n    result = OpenAComponent( comp, audioUnit );\n#endif\n    if( result )\n    {\n        DBUG( ( \"Failed to open AUHAL component.\" ) );\n        *audioUnit = NULL;\n        *audioDevice = kAudioDeviceUnknown;\n        return ERR( result );\n    }\n    /* -- prepare a little error handling logic / hackery -- */\n#define ERR_WRAP(mac_err) do { result = mac_err ; line = __LINE__ ; if ( result != noErr ) goto error ; } while(0)\n\n    /* -- if there is input, we have to explicitly enable input -- */\n    if( inStreamParams )\n    {\n        UInt32 enableIO = 1;\n        ERR_WRAP( AudioUnitSetProperty( *audioUnit,\n                                        kAudioOutputUnitProperty_EnableIO,\n                                        kAudioUnitScope_Input,\n                                        INPUT_ELEMENT,\n                                        &enableIO,\n                                        sizeof(enableIO) ) );\n    }\n    /* -- if there is no output, we must explicitly disable output -- */\n    if( !outStreamParams )\n    {\n        UInt32 enableIO = 0;\n        ERR_WRAP( AudioUnitSetProperty( *audioUnit,\n                                        kAudioOutputUnitProperty_EnableIO,\n                                        kAudioUnitScope_Output,\n                                        OUTPUT_ELEMENT,\n                                        &enableIO,\n                                        sizeof(enableIO) ) );\n    }\n\n    /* -- set the devices -- */\n    /* make sure input and output are the same device if we are doing input and\n       output. */\n    if( inStreamParams && outStreamParams )\n    {\n        assert( outStreamParams->device == inStreamParams->device );\n    }\n    if( inStreamParams )\n    {\n        *audioDevice = auhalHostApi->devIds[inStreamParams->device] ;\n        ERR_WRAP( AudioUnitSetProperty( *audioUnit,\n                                        kAudioOutputUnitProperty_CurrentDevice,\n                                        kAudioUnitScope_Global,\n                                        INPUT_ELEMENT,\n                                        audioDevice,\n                                        sizeof(AudioDeviceID) ) );\n    }\n    if( outStreamParams && outStreamParams != inStreamParams )\n    {\n        *audioDevice = auhalHostApi->devIds[outStreamParams->device] ;\n        ERR_WRAP( AudioUnitSetProperty( *audioUnit,\n                                        kAudioOutputUnitProperty_CurrentDevice,\n                                        kAudioUnitScope_Global,\n                                        OUTPUT_ELEMENT,\n                                        audioDevice,\n                                        sizeof(AudioDeviceID) ) );\n    }\n    /* -- add listener for dropouts -- */\n    result = PaMacCore_AudioDeviceAddPropertyListener( *audioDevice,\n                                                       0,\n                                                       outStreamParams ? false : true,\n                                                       kAudioDeviceProcessorOverload,\n                                                       xrunCallback,\n                                                       addToXRunListenerList( (void *)stream ) ) ;\n    if( result == kAudioHardwareIllegalOperationError ) {\n        // -- already registered, we're good\n    } else {\n        // -- not already registered, just check for errors\n        ERR_WRAP( result );\n    }\n    /* -- listen for stream start and stop -- */\n    ERR_WRAP( AudioUnitAddPropertyListener( *audioUnit,\n                                            kAudioOutputUnitProperty_IsRunning,\n                                            startStopCallback,\n                                            (void *)stream ) );\n\n    /* -- set format -- */\n    bzero( &desiredFormat, sizeof(desiredFormat) );\n    desiredFormat.mFormatID         = kAudioFormatLinearPCM ;\n    desiredFormat.mFormatFlags      = kAudioFormatFlagsNativeFloatPacked;\n    desiredFormat.mFramesPerPacket  = 1;\n    desiredFormat.mBitsPerChannel   = sizeof( float ) * 8;\n\n    result = 0;\n    /*  set device format first, but only touch the device if the user asked */\n    if( inStreamParams ) {\n        /*The callback never calls back if we don't set the FPB */\n        /*This seems weird, because I would think setting anything on the device\n          would be disruptive.*/\n        paResult = setBestFramesPerBuffer( *audioDevice, FALSE,\n                                           requestedFramesPerBuffer,\n                                           actualInputFramesPerBuffer );\n        if( paResult ) goto error;\n        if( macInputStreamFlags & paMacCoreChangeDeviceParameters ) {\n            bool requireExact;\n            requireExact=macInputStreamFlags & paMacCoreFailIfConversionRequired;\n            paResult = setBestSampleRateForDevice( *audioDevice, FALSE,\n                                                   requireExact, sampleRate );\n            if( paResult ) goto error;\n        }\n        if( actualInputFramesPerBuffer && actualOutputFramesPerBuffer )\n            *actualOutputFramesPerBuffer = *actualInputFramesPerBuffer ;\n    }\n    if( outStreamParams && !inStreamParams ) {\n        /*The callback never calls back if we don't set the FPB */\n        /*This seems weird, because I would think setting anything on the device\n          would be disruptive.*/\n        paResult = setBestFramesPerBuffer( *audioDevice, TRUE,\n                                           requestedFramesPerBuffer,\n                                           actualOutputFramesPerBuffer );\n        if( paResult ) goto error;\n        if( macOutputStreamFlags & paMacCoreChangeDeviceParameters ) {\n            bool requireExact;\n            requireExact=macOutputStreamFlags & paMacCoreFailIfConversionRequired;\n            paResult = setBestSampleRateForDevice( *audioDevice, TRUE,\n                                                   requireExact, sampleRate );\n            if( paResult ) goto error;\n        }\n    }\n\n    /* -- set the quality of the output converter -- */\n    if( outStreamParams ) {\n        UInt32 value = kAudioConverterQuality_Max;\n        switch( macOutputStreamFlags & 0x0700 ) {\n        case 0x0100: /*paMacCore_ConversionQualityMin:*/\n            value=kRenderQuality_Min;\n            break;\n        case 0x0200: /*paMacCore_ConversionQualityLow:*/\n            value=kRenderQuality_Low;\n            break;\n        case 0x0300: /*paMacCore_ConversionQualityMedium:*/\n            value=kRenderQuality_Medium;\n            break;\n        case 0x0400: /*paMacCore_ConversionQualityHigh:*/\n            value=kRenderQuality_High;\n            break;\n        }\n        ERR_WRAP( AudioUnitSetProperty( *audioUnit,\n                                        kAudioUnitProperty_RenderQuality,\n                                        kAudioUnitScope_Global,\n                                        OUTPUT_ELEMENT,\n                                        &value,\n                                        sizeof(value) ) );\n    }\n    /* now set the format on the Audio Units. */\n    if( outStreamParams )\n    {\n        desiredFormat.mSampleRate    =sampleRate;\n        desiredFormat.mBytesPerPacket=sizeof(float)*outStreamParams->channelCount;\n        desiredFormat.mBytesPerFrame =sizeof(float)*outStreamParams->channelCount;\n        desiredFormat.mChannelsPerFrame = outStreamParams->channelCount;\n        ERR_WRAP( AudioUnitSetProperty( *audioUnit,\n                                        kAudioUnitProperty_StreamFormat,\n                                        kAudioUnitScope_Input,\n                                        OUTPUT_ELEMENT,\n                                        &desiredFormat,\n                                        sizeof(AudioStreamBasicDescription) ) );\n    }\n    if( inStreamParams )\n    {\n        AudioStreamBasicDescription sourceFormat;\n        UInt32 size = sizeof( AudioStreamBasicDescription );\n\n        /* keep the sample rate of the device, or we confuse AUHAL */\n        ERR_WRAP( AudioUnitGetProperty( *audioUnit,\n                                        kAudioUnitProperty_StreamFormat,\n                                        kAudioUnitScope_Input,\n                                        INPUT_ELEMENT,\n                                        &sourceFormat,\n                                        &size ) );\n        desiredFormat.mSampleRate = sourceFormat.mSampleRate;\n        desiredFormat.mBytesPerPacket=sizeof(float)*inStreamParams->channelCount;\n        desiredFormat.mBytesPerFrame =sizeof(float)*inStreamParams->channelCount;\n        desiredFormat.mChannelsPerFrame = inStreamParams->channelCount;\n        ERR_WRAP( AudioUnitSetProperty( *audioUnit,\n                                        kAudioUnitProperty_StreamFormat,\n                                        kAudioUnitScope_Output,\n                                        INPUT_ELEMENT,\n                                        &desiredFormat,\n                                        sizeof(AudioStreamBasicDescription) ) );\n    }\n    /* set the maximumFramesPerSlice */\n    /* not doing this causes real problems\n       (eg. the callback might not be called). The idea of setting both this\n       and the frames per buffer on the device is that we'll be most likely\n       to actually get the frame size we requested in the callback with the\n       minimum latency. */\n    if( outStreamParams ) {\n        UInt32 size = sizeof( *actualOutputFramesPerBuffer );\n        ERR_WRAP( AudioUnitSetProperty( *audioUnit,\n                                        kAudioUnitProperty_MaximumFramesPerSlice,\n                                        kAudioUnitScope_Input,\n                                        OUTPUT_ELEMENT,\n                                        actualOutputFramesPerBuffer,\n                                        sizeof(*actualOutputFramesPerBuffer) ) );\n        ERR_WRAP( AudioUnitGetProperty( *audioUnit,\n                                        kAudioUnitProperty_MaximumFramesPerSlice,\n                                        kAudioUnitScope_Global,\n                                        OUTPUT_ELEMENT,\n                                        actualOutputFramesPerBuffer,\n                                        &size ) );\n    }\n    if( inStreamParams ) {\n        /*UInt32 size = sizeof( *actualInputFramesPerBuffer );*/\n        ERR_WRAP( AudioUnitSetProperty( *audioUnit,\n                                        kAudioUnitProperty_MaximumFramesPerSlice,\n                                        kAudioUnitScope_Output,\n                                        INPUT_ELEMENT,\n                                        actualInputFramesPerBuffer,\n                                        sizeof(*actualInputFramesPerBuffer) ) );\n        /* Don't know why this causes problems\n               ERR_WRAP( AudioUnitGetProperty( *audioUnit,\n                                    kAudioUnitProperty_MaximumFramesPerSlice,\n                                    kAudioUnitScope_Global, //Output,\n                                    INPUT_ELEMENT,\n                                    actualInputFramesPerBuffer,\n                                    &size ) );\n        */\n    }\n\n    /* -- if we have input, we may need to setup an SR converter -- */\n    /* even if we got the sample rate we asked for, we need to do\n       the conversion in case another program changes the underlying SR. */\n    /* FIXME: I think we need to monitor stream and change the converter if the incoming format changes. */\n    if( inStreamParams ) {\n        AudioStreamBasicDescription desiredFormat;\n        AudioStreamBasicDescription sourceFormat;\n        UInt32 sourceSize = sizeof( sourceFormat );\n        bzero( &desiredFormat, sizeof(desiredFormat) );\n        desiredFormat.mSampleRate       = sampleRate;\n        desiredFormat.mFormatID         = kAudioFormatLinearPCM ;\n        desiredFormat.mFormatFlags      = kAudioFormatFlagsNativeFloatPacked;\n        desiredFormat.mFramesPerPacket  = 1;\n        desiredFormat.mBitsPerChannel   = sizeof( float ) * 8;\n        desiredFormat.mBytesPerPacket=sizeof(float)*inStreamParams->channelCount;\n        desiredFormat.mBytesPerFrame =sizeof(float)*inStreamParams->channelCount;\n        desiredFormat.mChannelsPerFrame = inStreamParams->channelCount;\n\n        /* get the source format */\n        ERR_WRAP( AudioUnitGetProperty( *audioUnit,\n                                        kAudioUnitProperty_StreamFormat,\n                                        kAudioUnitScope_Output,\n                                        INPUT_ELEMENT,\n                                        &sourceFormat,\n                                        &sourceSize ) );\n\n        if( desiredFormat.mSampleRate != sourceFormat.mSampleRate )\n        {\n            UInt32 value = kAudioConverterQuality_Max;\n            switch( macInputStreamFlags & 0x0700 ) {\n            case 0x0100: /*paMacCore_ConversionQualityMin:*/\n                value=kAudioConverterQuality_Min;\n                break;\n            case 0x0200: /*paMacCore_ConversionQualityLow:*/\n                value=kAudioConverterQuality_Low;\n                break;\n            case 0x0300: /*paMacCore_ConversionQualityMedium:*/\n                value=kAudioConverterQuality_Medium;\n                break;\n            case 0x0400: /*paMacCore_ConversionQualityHigh:*/\n                value=kAudioConverterQuality_High;\n                break;\n            }\n            VDBUG(( \"Creating sample rate converter for input\"\n                    \" to convert from %g to %g\\n\",\n                    (float)sourceFormat.mSampleRate,\n                    (float)desiredFormat.mSampleRate ) );\n            /* create our converter */\n            ERR_WRAP( AudioConverterNew( &sourceFormat,\n                                         &desiredFormat,\n                                         srConverter ) );\n            /* Set quality */\n            ERR_WRAP( AudioConverterSetProperty( *srConverter,\n                                                 kAudioConverterSampleRateConverterQuality,\n                                                 sizeof( value ),\n                                                 &value ) );\n        }\n    }\n    /* -- set IOProc (callback) -- */\n    callbackKey = outStreamParams ? kAudioUnitProperty_SetRenderCallback\n                  : kAudioOutputUnitProperty_SetInputCallback ;\n    rcbs.inputProc = AudioIOProc;\n    rcbs.inputProcRefCon = refCon;\n    ERR_WRAP( AudioUnitSetProperty( *audioUnit,\n                                    callbackKey,\n                                    kAudioUnitScope_Output,\n                                    outStreamParams ? OUTPUT_ELEMENT : INPUT_ELEMENT,\n                                    &rcbs,\n                                    sizeof(rcbs)) );\n\n    if( inStreamParams && outStreamParams && *srConverter )\n        ERR_WRAP( AudioUnitSetProperty( *audioUnit,\n                                        kAudioOutputUnitProperty_SetInputCallback,\n                                        kAudioUnitScope_Output,\n                                        INPUT_ELEMENT,\n                                        &rcbs,\n                                        sizeof(rcbs)) );\n\n    /* channel mapping. */\n    if(inChannelMap)\n    {\n        UInt32 mapSize = inChannelMapSize *sizeof(SInt32);\n\n        //for each channel of desired input, map the channel from\n        //the device's output channel.\n        ERR_WRAP( AudioUnitSetProperty( *audioUnit,\n                                        kAudioOutputUnitProperty_ChannelMap,\n                                        kAudioUnitScope_Output,\n                                        INPUT_ELEMENT,\n                                        inChannelMap,\n                                        mapSize) );\n    }\n    if(outChannelMap)\n    {\n        UInt32 mapSize = outChannelMapSize *sizeof(SInt32);\n\n        //for each channel of desired output, map the channel from\n        //the device's output channel.\n        ERR_WRAP(AudioUnitSetProperty( *audioUnit,\n                                       kAudioOutputUnitProperty_ChannelMap,\n                                       kAudioUnitScope_Output,\n                                       OUTPUT_ELEMENT,\n                                       outChannelMap,\n                                       mapSize) );\n    }\n    /* initialize the audio unit */\n    ERR_WRAP( AudioUnitInitialize(*audioUnit) );\n\n    if( inStreamParams && outStreamParams )\n    {\n        VDBUG( (\"Opened device %ld for input and output.\\n\", (long)*audioDevice ) );\n    }\n    else if( inStreamParams )\n    {\n        VDBUG( (\"Opened device %ld for input.\\n\", (long)*audioDevice ) );\n    }\n    else if( outStreamParams )\n    {\n        VDBUG( (\"Opened device %ld for output.\\n\", (long)*audioDevice ) );\n    }\n    return paNoError;\n#undef ERR_WRAP\n\nerror:\n\n#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6\n    AudioComponentInstanceDispose( *audioUnit );\n#else\n    CloseComponent( *audioUnit );\n#endif\n    *audioUnit = NULL;\n    if( result )\n        return PaMacCore_SetError( result, line, 1 );\n    return paResult;\n}\n\n/* =================================================================================================== */\n\nstatic UInt32 CalculateOptimalBufferSize( PaMacAUHAL *auhalHostApi,\n                                          const PaStreamParameters *inputParameters,\n                                          const PaStreamParameters *outputParameters,\n                                          UInt32 fixedInputLatency,\n                                          UInt32 fixedOutputLatency,\n                                          double sampleRate,\n                                          UInt32 requestedFramesPerBuffer )\n{\n    UInt32 resultBufferSizeFrames = 0;\n    // Use maximum of suggested input and output latencies.\n    if( inputParameters )\n    {\n        UInt32 suggestedLatencyFrames = inputParameters->suggestedLatency * sampleRate;\n        // Calculate a buffer size assuming we are double buffered.\n        SInt32 variableLatencyFrames = suggestedLatencyFrames - fixedInputLatency;\n        // Prevent negative latency.\n        variableLatencyFrames = MAX( variableLatencyFrames, 0 );\n        resultBufferSizeFrames = MAX( resultBufferSizeFrames, (UInt32) variableLatencyFrames );\n    }\n    if( outputParameters )\n    {\n        UInt32 suggestedLatencyFrames = outputParameters->suggestedLatency * sampleRate;\n        SInt32 variableLatencyFrames = suggestedLatencyFrames - fixedOutputLatency;\n        variableLatencyFrames = MAX( variableLatencyFrames, 0 );\n        resultBufferSizeFrames = MAX( resultBufferSizeFrames, (UInt32) variableLatencyFrames );\n    }\n\n    // can't have zero frames. code to round up to next user buffer requires non-zero\n    resultBufferSizeFrames = MAX( resultBufferSizeFrames, 1 );\n\n    if( requestedFramesPerBuffer != paFramesPerBufferUnspecified )\n    {\n        // make host buffer the next highest integer multiple of user frames per buffer\n        UInt32 n = (resultBufferSizeFrames + requestedFramesPerBuffer - 1) / requestedFramesPerBuffer;\n        resultBufferSizeFrames = n * requestedFramesPerBuffer;\n\n\n        // FIXME: really we should be searching for a multiple of requestedFramesPerBuffer\n        // that is >= suggested latency and also fits within device buffer min/max\n\n    } else {\n        VDBUG( (\"Block Size unspecified. Based on Latency, the user wants a Block Size near: %ld.\\n\",\n                (long)resultBufferSizeFrames ) );\n    }\n\n    // Clip to the capabilities of the device.\n    if( inputParameters )\n    {\n        ClipToDeviceBufferSize( auhalHostApi->devIds[inputParameters->device],\n                                true, // In the old code isInput was false!\n                                resultBufferSizeFrames, &resultBufferSizeFrames );\n    }\n    if( outputParameters )\n    {\n        ClipToDeviceBufferSize( auhalHostApi->devIds[outputParameters->device],\n                                false, resultBufferSizeFrames, &resultBufferSizeFrames );\n    }\n    VDBUG((\"After querying hardware, setting block size to %ld.\\n\", (long)resultBufferSizeFrames));\n\n    return resultBufferSizeFrames;\n}\n\n/* =================================================================================================== */\n/* see pa_hostapi.h for a list of validity guarantees made about OpenStream parameters */\nstatic PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,\n                           PaStream** s,\n                           const PaStreamParameters *inputParameters,\n                           const PaStreamParameters *outputParameters,\n                           double sampleRate,\n                           unsigned long requestedFramesPerBuffer,\n                           PaStreamFlags streamFlags,\n                           PaStreamCallback *streamCallback,\n                           void *userData )\n{\n    PaError result = paNoError;\n    PaMacAUHAL *auhalHostApi = (PaMacAUHAL*)hostApi;\n    PaMacCoreStream *stream = 0;\n    int inputChannelCount, outputChannelCount;\n    PaSampleFormat inputSampleFormat, outputSampleFormat;\n    PaSampleFormat hostInputSampleFormat, hostOutputSampleFormat;\n    UInt32 fixedInputLatency = 0;\n    UInt32 fixedOutputLatency = 0;\n    // Accumulate contributions to latency in these variables.\n    UInt32 inputLatencyFrames = 0;\n    UInt32 outputLatencyFrames = 0;\n    UInt32 suggestedLatencyFramesPerBuffer = requestedFramesPerBuffer;\n\n    VVDBUG((\"OpenStream(): in chan=%d, in fmt=%ld, out chan=%d, out fmt=%ld SR=%g, FPB=%ld\\n\",\n            inputParameters  ? inputParameters->channelCount  : -1,\n            inputParameters  ? inputParameters->sampleFormat  : -1,\n            outputParameters ? outputParameters->channelCount : -1,\n            outputParameters ? outputParameters->sampleFormat : -1,\n            (float) sampleRate,\n            requestedFramesPerBuffer ));\n    VDBUG( (\"Opening Stream.\\n\") );\n\n    /* These first few bits of code are from paSkeleton with few modifications. */\n    if( inputParameters )\n    {\n        inputChannelCount = inputParameters->channelCount;\n        inputSampleFormat = inputParameters->sampleFormat;\n\n        /* @todo Blocking read/write on Mac is not yet supported. */\n        if( !streamCallback && inputSampleFormat & paNonInterleaved )\n        {\n            return paSampleFormatNotSupported;\n        }\n\n        /* unless alternate device specification is supported, reject the use of\n            paUseHostApiSpecificDeviceSpecification */\n\n        if( inputParameters->device == paUseHostApiSpecificDeviceSpecification )\n            return paInvalidDevice;\n\n        /* check that input device can support inputChannelCount */\n        if( inputChannelCount > hostApi->deviceInfos[ inputParameters->device ]->maxInputChannels )\n            return paInvalidChannelCount;\n\n        /* Host supports interleaved float32 */\n        hostInputSampleFormat = paFloat32;\n    }\n    else\n    {\n        inputChannelCount = 0;\n        inputSampleFormat = hostInputSampleFormat = paFloat32; /* Suppress 'uninitialised var' warnings. */\n    }\n\n    if( outputParameters )\n    {\n        outputChannelCount = outputParameters->channelCount;\n        outputSampleFormat = outputParameters->sampleFormat;\n\n        /* @todo Blocking read/write on Mac is not yet supported. */\n        if( !streamCallback && outputSampleFormat & paNonInterleaved )\n        {\n            return paSampleFormatNotSupported;\n        }\n\n        /* unless alternate device specification is supported, reject the use of\n            paUseHostApiSpecificDeviceSpecification */\n\n        if( outputParameters->device == paUseHostApiSpecificDeviceSpecification )\n            return paInvalidDevice;\n\n        /* check that output device can support inputChannelCount */\n        if( outputChannelCount > hostApi->deviceInfos[ outputParameters->device ]->maxOutputChannels )\n            return paInvalidChannelCount;\n\n        /* Host supports interleaved float32 */\n        hostOutputSampleFormat = paFloat32;\n    }\n    else\n    {\n        outputChannelCount = 0;\n        outputSampleFormat = hostOutputSampleFormat = paFloat32; /* Suppress 'uninitialized var' warnings. */\n    }\n\n    /* validate platform specific flags */\n    if( (streamFlags & paPlatformSpecificFlags) != 0 )\n        return paInvalidFlag; /* unexpected platform specific flag */\n\n    stream = (PaMacCoreStream*)PaUtil_AllocateMemory( sizeof(PaMacCoreStream) );\n    if( !stream )\n    {\n        result = paInsufficientMemory;\n        goto error;\n    }\n\n    /* If we fail after this point, we my be left in a bad state, with\n       some data structures setup and others not. So, first thing we\n       do is initialize everything so that if we fail, we know what hasn't\n       been touched.\n     */\n    bzero( stream, sizeof( PaMacCoreStream ) );\n\n    /*\n    stream->blio.inputRingBuffer.buffer = NULL;\n    stream->blio.outputRingBuffer.buffer = NULL;\n    stream->blio.inputSampleFormat = inputParameters?inputParameters->sampleFormat:0;\n    stream->blio.inputSampleSize = computeSampleSizeFromFormat(stream->blio.inputSampleFormat);\n    stream->blio.outputSampleFormat=outputParameters?outputParameters->sampleFormat:0;\n    stream->blio.outputSampleSize = computeSampleSizeFromFormat(stream->blio.outputSampleFormat);\n    */\n\n    /* assert( streamCallback ) ; */ /* only callback mode is implemented */\n    if( streamCallback )\n    {\n        PaUtil_InitializeStreamRepresentation( &stream->streamRepresentation,\n                                               &auhalHostApi->callbackStreamInterface,\n                                               streamCallback, userData );\n    }\n    else\n    {\n        PaUtil_InitializeStreamRepresentation( &stream->streamRepresentation,\n                                               &auhalHostApi->blockingStreamInterface,\n                                               BlioCallback, &stream->blio );\n    }\n\n    PaUtil_InitializeCpuLoadMeasurer( &stream->cpuLoadMeasurer, sampleRate );\n\n\n    if( inputParameters )\n    {\n        CalculateFixedDeviceLatency( auhalHostApi->devIds[inputParameters->device], true, &fixedInputLatency );\n        inputLatencyFrames += fixedInputLatency;\n    }\n    if( outputParameters )\n    {\n        CalculateFixedDeviceLatency( auhalHostApi->devIds[outputParameters->device], false, &fixedOutputLatency );\n        outputLatencyFrames += fixedOutputLatency;\n\n    }\n\n    suggestedLatencyFramesPerBuffer = CalculateOptimalBufferSize( auhalHostApi, inputParameters, outputParameters,\n                                                                  fixedInputLatency, fixedOutputLatency,\n                                                                  sampleRate, requestedFramesPerBuffer );\n    if( requestedFramesPerBuffer == paFramesPerBufferUnspecified )\n    {\n        requestedFramesPerBuffer = suggestedLatencyFramesPerBuffer;\n    }\n\n    /* -- Now we actually open and setup streams. -- */\n    if( inputParameters && outputParameters && outputParameters->device == inputParameters->device )\n    {   /* full duplex. One device. */\n        UInt32 inputFramesPerBuffer  = (UInt32) stream->inputFramesPerBuffer;\n        UInt32 outputFramesPerBuffer = (UInt32) stream->outputFramesPerBuffer;\n        result = OpenAndSetupOneAudioUnit( stream,\n                                           inputParameters,\n                                           outputParameters,\n                                           suggestedLatencyFramesPerBuffer,\n                                           &inputFramesPerBuffer,\n                                           &outputFramesPerBuffer,\n                                           auhalHostApi,\n                                           &(stream->inputUnit),\n                                           &(stream->inputSRConverter),\n                                           &(stream->inputDevice),\n                                           sampleRate,\n                                           stream );\n        stream->inputFramesPerBuffer = inputFramesPerBuffer;\n        stream->outputFramesPerBuffer = outputFramesPerBuffer;\n        stream->outputUnit = stream->inputUnit;\n        stream->outputDevice = stream->inputDevice;\n        if( result != paNoError )\n            goto error;\n    }\n    else\n    {   /* full duplex, different devices OR simplex */\n        UInt32 outputFramesPerBuffer = (UInt32) stream->outputFramesPerBuffer;\n        UInt32 inputFramesPerBuffer  = (UInt32) stream->inputFramesPerBuffer;\n        result = OpenAndSetupOneAudioUnit( stream,\n                                           NULL,\n                                           outputParameters,\n                                           suggestedLatencyFramesPerBuffer,\n                                           NULL,\n                                           &outputFramesPerBuffer,\n                                           auhalHostApi,\n                                           &(stream->outputUnit),\n                                           NULL,\n                                           &(stream->outputDevice),\n                                           sampleRate,\n                                           stream );\n        if( result != paNoError )\n            goto error;\n        result = OpenAndSetupOneAudioUnit( stream,\n                                           inputParameters,\n                                           NULL,\n                                           suggestedLatencyFramesPerBuffer,\n                                           &inputFramesPerBuffer,\n                                           NULL,\n                                           auhalHostApi,\n                                           &(stream->inputUnit),\n                                           &(stream->inputSRConverter),\n                                           &(stream->inputDevice),\n                                           sampleRate,\n                                           stream );\n        if( result != paNoError )\n            goto error;\n        stream->inputFramesPerBuffer = inputFramesPerBuffer;\n        stream->outputFramesPerBuffer = outputFramesPerBuffer;\n    }\n\n    inputLatencyFrames += stream->inputFramesPerBuffer;\n    outputLatencyFrames += stream->outputFramesPerBuffer;\n\n    if( stream->inputUnit ) {\n        const size_t szfl = sizeof(float);\n        /* setup the AudioBufferList used for input */\n        bzero( &stream->inputAudioBufferList, sizeof( AudioBufferList ) );\n        stream->inputAudioBufferList.mNumberBuffers = 1;\n        stream->inputAudioBufferList.mBuffers[0].mNumberChannels\n            = inputChannelCount;\n        stream->inputAudioBufferList.mBuffers[0].mDataByteSize\n            = stream->inputFramesPerBuffer*inputChannelCount*szfl;\n        stream->inputAudioBufferList.mBuffers[0].mData\n            = (float *) calloc(\n                  stream->inputFramesPerBuffer*inputChannelCount,\n                  szfl );\n        if( !stream->inputAudioBufferList.mBuffers[0].mData )\n        {\n            result = paInsufficientMemory;\n            goto error;\n        }\n\n        /*\n         * If input and output devs are different or we are doing SR conversion,\n         * we also need a ring buffer to store input data while waiting for\n         * output data.\n         */\n        if( (stream->outputUnit && (stream->inputUnit != stream->outputUnit))\n                || stream->inputSRConverter )\n        {\n            /* May want the ringSize or initial position in\n               ring buffer to depend somewhat on sample rate change */\n\n            void *data;\n            long ringSize;\n\n            ringSize = computeRingBufferSize( inputParameters,\n                                              outputParameters,\n                                              stream->inputFramesPerBuffer,\n                                              stream->outputFramesPerBuffer,\n                                              sampleRate );\n            /*ringSize <<= 4; *//*16x bigger, for testing */\n\n\n            /*now, we need to allocate memory for the ring buffer*/\n            data = calloc( ringSize, szfl*inputParameters->channelCount );\n            if( !data )\n            {\n                result = paInsufficientMemory;\n                goto error;\n            }\n\n            /* now we can initialize the ring buffer */\n            result = PaUtil_InitializeRingBuffer( &stream->inputRingBuffer, szfl*inputParameters->channelCount, ringSize, data );\n            if( result != 0 )\n            {\n                /* The only reason this should fail is if ringSize is not a power of 2, which we do not anticipate happening. */\n                result = paUnanticipatedHostError;\n                free(data);\n                goto error;\n            }\n\n            /* advance the read point a little, so we are reading from the\n               middle of the buffer */\n            if( stream->outputUnit )\n                PaUtil_AdvanceRingBufferWriteIndex( &stream->inputRingBuffer, ringSize / RING_BUFFER_ADVANCE_DENOMINATOR );\n\n            // Just adds to input latency between input device and PA full duplex callback.\n            inputLatencyFrames += ringSize;\n        }\n    }\n\n    /* -- initialize Blio Buffer Processors -- */\n    if( !streamCallback )\n    {\n        long ringSize;\n\n        ringSize = computeRingBufferSize( inputParameters,\n                                          outputParameters,\n                                          stream->inputFramesPerBuffer,\n                                          stream->outputFramesPerBuffer,\n                                          sampleRate );\n        result = initializeBlioRingBuffers( &stream->blio,\n                                            inputParameters ? inputParameters->sampleFormat : 0,\n                                            outputParameters ? outputParameters->sampleFormat : 0,\n                                            ringSize,\n                                            inputParameters ? inputChannelCount : 0,\n                                            outputParameters ? outputChannelCount : 0 );\n        if( result != paNoError )\n            goto error;\n\n        inputLatencyFrames += ringSize;\n        outputLatencyFrames += ringSize;\n\n    }\n\n    /* -- initialize Buffer Processor -- */\n    {\n        unsigned long maxHostFrames = stream->inputFramesPerBuffer;\n        if( stream->outputFramesPerBuffer > maxHostFrames )\n            maxHostFrames = stream->outputFramesPerBuffer;\n        result = PaUtil_InitializeBufferProcessor( &stream->bufferProcessor,\n                                                   inputChannelCount, inputSampleFormat,\n                                                   hostInputSampleFormat,\n                                                   outputChannelCount, outputSampleFormat,\n                                                   hostOutputSampleFormat,\n                                                   sampleRate,\n                                                   streamFlags,\n                                                   requestedFramesPerBuffer,\n                                                   /* If sample rate conversion takes place, the buffer size\n                                                      will not be known. */\n                                                   maxHostFrames,\n                                                   stream->inputSRConverter\n                                                   ? paUtilUnknownHostBufferSize\n                                                   : paUtilBoundedHostBufferSize,\n                                                   streamCallback ? streamCallback : BlioCallback,\n                                                   streamCallback ? userData : &stream->blio );\n        if( result != paNoError )\n            goto error;\n    }\n    stream->bufferProcessorIsInitialized = TRUE;\n\n    // Calculate actual latency from the sum of individual latencies.\n    if( inputParameters )\n    {\n        inputLatencyFrames += PaUtil_GetBufferProcessorInputLatencyFrames(&stream->bufferProcessor);\n        stream->streamRepresentation.streamInfo.inputLatency = inputLatencyFrames / sampleRate;\n    }\n    else\n    {\n        stream->streamRepresentation.streamInfo.inputLatency = 0.0;\n    }\n\n    if( outputParameters )\n    {\n        outputLatencyFrames += PaUtil_GetBufferProcessorOutputLatencyFrames(&stream->bufferProcessor);\n        stream->streamRepresentation.streamInfo.outputLatency = outputLatencyFrames / sampleRate;\n    }\n    else\n    {\n        stream->streamRepresentation.streamInfo.outputLatency = 0.0;\n    }\n\n    stream->streamRepresentation.streamInfo.sampleRate = sampleRate;\n\n    stream->sampleRate = sampleRate;\n\n    stream->userInChan  = inputChannelCount;\n    stream->userOutChan = outputChannelCount;\n\n    // Setup property listeners for timestamp and latency calculations.\n    pthread_mutex_init( &stream->timingInformationMutex, NULL );\n    stream->timingInformationMutexIsInitialized = 1;\n    InitializeDeviceProperties( &stream->inputProperties );     // zeros the struct. doesn't actually init it to useful values\n    InitializeDeviceProperties( &stream->outputProperties );    // zeros the struct. doesn't actually init it to useful values\n    if( stream->outputUnit )\n    {\n        Boolean isInput = FALSE;\n\n        // Start with the current values for the device properties.\n        // Init with nominal sample rate. Use actual sample rate where available\n\n        result = ERR( UpdateSampleRateFromDeviceProperty(\n                          stream, stream->outputDevice, isInput, kAudioDevicePropertyNominalSampleRate )  );\n        if( result )\n            goto error; /* fail if we can't even get a nominal device sample rate */\n\n        UpdateSampleRateFromDeviceProperty( stream, stream->outputDevice, isInput, kAudioDevicePropertyActualSampleRate );\n\n        SetupDevicePropertyListeners( stream, stream->outputDevice, isInput );\n    }\n    if( stream->inputUnit )\n    {\n        Boolean isInput = TRUE;\n\n        // as above\n        result = ERR( UpdateSampleRateFromDeviceProperty(\n                          stream, stream->inputDevice, isInput, kAudioDevicePropertyNominalSampleRate )  );\n        if( result )\n            goto error;\n\n        UpdateSampleRateFromDeviceProperty( stream, stream->inputDevice, isInput, kAudioDevicePropertyActualSampleRate );\n\n        SetupDevicePropertyListeners( stream, stream->inputDevice, isInput );\n    }\n    UpdateTimeStampOffsets( stream );\n    // Setup timestamp copies to be used by audio callback.\n    stream->timestampOffsetCombined_ioProcCopy = stream->timestampOffsetCombined;\n    stream->timestampOffsetInputDevice_ioProcCopy = stream->timestampOffsetInputDevice;\n    stream->timestampOffsetOutputDevice_ioProcCopy = stream->timestampOffsetOutputDevice;\n\n    stream->state = STOPPED;\n    stream->xrunFlags = 0;\n\n    *s = (PaStream*)stream;\n\n    return result;\n\nerror:\n    CloseStream( stream );\n    return result;\n}\n\n\n#define HOST_TIME_TO_PA_TIME( x ) ( AudioConvertHostTimeToNanos( (x) ) * 1.0E-09) /* convert to nanoseconds and then to seconds */\n\nPaTime GetStreamTime( PaStream *s )\n{\n    return HOST_TIME_TO_PA_TIME( AudioGetCurrentHostTime() );\n}\n\n#define RING_BUFFER_EMPTY (1000)\n\nstatic OSStatus ringBufferIOProc(\n    AudioConverterRef              inAudioConverter,\n    UInt32*                        ioNumberDataPackets,\n    AudioBufferList*               ioData,\n    AudioStreamPacketDescription** outDataPacketDescription,\n    void*                          inUserData)\n{\n    VVDBUG((\"ringBufferIOProc()\\n\"));\n\n    PaUtilRingBuffer *rb = (PaUtilRingBuffer *) inUserData;\n\n    if( PaUtil_GetRingBufferReadAvailable( rb ) == 0 ) {\n        ioData->mBuffers[0].mData = NULL;\n        ioData->mBuffers[0].mDataByteSize = 0;\n        *ioNumberDataPackets = 0;\n        VVDBUG((\"Ring buffer empty!\\n\"));\n        return RING_BUFFER_EMPTY;\n    }\n\n    UInt32 packetSize = sizeof(float) * ioData->mBuffers[0].mNumberChannels;\n    UInt32 dataSize = *ioNumberDataPackets * packetSize;\n    assert(dataSize % rb->elementSizeBytes == 0);\n    UInt32 rbElements = dataSize / rb->elementSizeBytes;\n    ring_buffer_size_t rbElementsRead = rbElements;\n    void *dummyData;\n    ring_buffer_size_t dummySize;\n    PaUtil_GetRingBufferReadRegions( rb, rbElements,\n                                     &ioData->mBuffers[0].mData, &rbElementsRead,\n                                     &dummyData, &dummySize );\n    assert(rbElementsRead > 0);\n    VVDBUG((\"RingBuffer read elements %u of %u\\n\", rbElementsRead, rbElements));\n    PaUtil_AdvanceRingBufferReadIndex( rb, rbElementsRead );\n\n    UInt32 bytesRead = rbElementsRead * rb->elementSizeBytes;\n    ioData->mBuffers[0].mDataByteSize = bytesRead;\n    *ioNumberDataPackets = bytesRead / packetSize;\n\n    return noErr;\n}\n\n/*\n * Called by the AudioUnit API to process audio from the sound card.\n * This is where the magic happens.\n */\n/* FEEDBACK: there is a lot of redundant code here because of how all the cases differ. This makes it hard to maintain, so if there are suggestinos for cleaning it up, I'm all ears. */\nstatic OSStatus AudioIOProc( void *inRefCon,\n                             AudioUnitRenderActionFlags *ioActionFlags,\n                             const AudioTimeStamp *inTimeStamp,\n                             UInt32 inBusNumber,\n                             UInt32 inNumberFrames,\n                             AudioBufferList *ioData )\n{\n    unsigned long framesProcessed     = 0;\n    PaStreamCallbackTimeInfo timeInfo = {0,0,0};\n    PaMacCoreStream *stream           = (PaMacCoreStream*)inRefCon;\n    const bool isRender               = inBusNumber == OUTPUT_ELEMENT;\n    int callbackResult                = paContinue ;\n    double hostTimeStampInPaTime      = HOST_TIME_TO_PA_TIME(inTimeStamp->mHostTime);\n\n    VVDBUG((\"AudioIOProc()\\n\"));\n\n    PaUtil_BeginCpuLoadMeasurement( &stream->cpuLoadMeasurer );\n\n    /* -----------------------------------------------------------------*\\\n       This output may be useful for debugging,\n       But printing during the callback is a bad enough idea that\n       this is not enabled by enabling the usual debugging calls.\n    \\* -----------------------------------------------------------------*/\n    /*\n    static int renderCount = 0;\n    static int inputCount = 0;\n    printf( \"-------------------  starting render/input\\n\" );\n    if( isRender )\n       printf(\"Render callback (%d):\\t\", ++renderCount);\n    else\n       printf(\"Input callback  (%d):\\t\", ++inputCount);\n    printf( \"Call totals: %d (input), %d (render)\\n\", inputCount, renderCount );\n\n    printf( \"--- inBusNumber: %lu\\n\", inBusNumber );\n    printf( \"--- inNumberFrames: %lu\\n\", inNumberFrames );\n    printf( \"--- %x ioData\\n\", (unsigned) ioData );\n    if( ioData )\n    {\n       int i=0;\n       printf( \"--- ioData.mNumBuffers %lu: \\n\", ioData->mNumberBuffers );\n       for( i=0; i<ioData->mNumberBuffers; ++i )\n          printf( \"--- ioData buffer %d size: %lu.\\n\", i, ioData->mBuffers[i].mDataByteSize );\n    }\n       ----------------------------------------------------------------- */\n\n    /* compute PaStreamCallbackTimeInfo */\n\n    if( pthread_mutex_trylock( &stream->timingInformationMutex ) == 0 ) {\n        /* snapshot the ioproc copy of timing information */\n        stream->timestampOffsetCombined_ioProcCopy = stream->timestampOffsetCombined;\n        stream->timestampOffsetInputDevice_ioProcCopy = stream->timestampOffsetInputDevice;\n        stream->timestampOffsetOutputDevice_ioProcCopy = stream->timestampOffsetOutputDevice;\n        pthread_mutex_unlock( &stream->timingInformationMutex );\n    }\n\n    /* For timeInfo.currentTime we could calculate current time backwards from the HAL audio\n     output time to give a more accurate impression of the current timeslice but it doesn't\n     seem worth it at the moment since other PA host APIs don't do any better.\n     */\n    timeInfo.currentTime = HOST_TIME_TO_PA_TIME( AudioGetCurrentHostTime() );\n\n    /*\n     For an input HAL AU, inTimeStamp is the time the samples are received from the hardware,\n     for an output HAL AU inTimeStamp is the time the samples are sent to the hardware.\n     PA expresses timestamps in terms of when the samples enter the ADC or leave the DAC\n     so we add or subtract kAudioDevicePropertyLatency below.\n     */\n\n    /* FIXME: not sure what to do below if the host timestamps aren't valid (kAudioTimeStampHostTimeValid isn't set)\n     Could ask on CA mailing list if it is possible for it not to be set. If so, could probably grab a now timestamp\n     at the top and compute from there (modulo scheduling jitter) or ask on mailing list for other options. */\n\n    if( isRender )\n    {\n        if( stream->inputUnit ) /* full duplex */\n        {\n            if( stream->inputUnit == stream->outputUnit ) /* full duplex AUHAL IOProc */\n            {\n                // Ross and Phil agreed that the following calculation is correct based on an email from Jeff Moore:\n                // http://osdir.com/ml/coreaudio-api/2009-07/msg00140.html\n                // Basically the difference between the Apple output timestamp and the PA timestamp is kAudioDevicePropertyLatency.\n                timeInfo.inputBufferAdcTime = hostTimeStampInPaTime -\n                                              (stream->timestampOffsetCombined_ioProcCopy + stream->timestampOffsetInputDevice_ioProcCopy);\n                timeInfo.outputBufferDacTime = hostTimeStampInPaTime + stream->timestampOffsetOutputDevice_ioProcCopy;\n            }\n            else /* full duplex with ring-buffer from a separate input AUHAL ioproc */\n            {\n                /* FIXME: take the ring buffer latency into account */\n                timeInfo.inputBufferAdcTime = hostTimeStampInPaTime -\n                                              (stream->timestampOffsetCombined_ioProcCopy + stream->timestampOffsetInputDevice_ioProcCopy);\n                timeInfo.outputBufferDacTime = hostTimeStampInPaTime + stream->timestampOffsetOutputDevice_ioProcCopy;\n            }\n        }\n        else /* output only */\n        {\n            timeInfo.inputBufferAdcTime = 0;\n            timeInfo.outputBufferDacTime = hostTimeStampInPaTime + stream->timestampOffsetOutputDevice_ioProcCopy;\n        }\n    }\n    else /* input only */\n    {\n        timeInfo.inputBufferAdcTime = hostTimeStampInPaTime - stream->timestampOffsetInputDevice_ioProcCopy;\n        timeInfo.outputBufferDacTime = 0;\n    }\n\n    //printf( \"---%g, %g, %g\\n\", timeInfo.inputBufferAdcTime, timeInfo.currentTime, timeInfo.outputBufferDacTime );\n\n    if( isRender && stream->inputUnit == stream->outputUnit\n            && !stream->inputSRConverter )\n    {\n        /* --------- Full Duplex, One Device, no SR Conversion -------\n         *\n         * This is the lowest latency case, and also the simplest.\n         * Input data and output data are available at the same time.\n         * we do not use the input SR converter or the input ring buffer.\n         *\n         */\n        OSStatus err = 0;\n        unsigned long frames;\n        long bytesPerFrame = sizeof( float ) * ioData->mBuffers[0].mNumberChannels;\n\n        /* -- start processing -- */\n        PaUtil_BeginBufferProcessing( &(stream->bufferProcessor),\n                                      &timeInfo,\n                                      stream->xrunFlags );\n        stream->xrunFlags = 0; //FIXME: this flag also gets set outside by a callback, which calls the xrunCallback function. It should be in the same thread as the main audio callback, but the apple docs just use the word \"usually\" so it may be possible to loose an xrun notification, if that callback happens here.\n\n        /* -- compute frames. do some checks -- */\n        assert( ioData->mNumberBuffers == 1 );\n        assert( ioData->mBuffers[0].mNumberChannels == stream->userOutChan );\n\n        frames = ioData->mBuffers[0].mDataByteSize / bytesPerFrame;\n        /* -- copy and process input data -- */\n        err= AudioUnitRender( stream->inputUnit,\n                              ioActionFlags,\n                              inTimeStamp,\n                              INPUT_ELEMENT,\n                              inNumberFrames,\n                              &stream->inputAudioBufferList );\n        if(err != noErr)\n        {\n            goto stop_stream;\n        }\n\n        PaUtil_SetInputFrameCount( &(stream->bufferProcessor), frames );\n        PaUtil_SetInterleavedInputChannels( &(stream->bufferProcessor),\n                                            0,\n                                            stream->inputAudioBufferList.mBuffers[0].mData,\n                                            stream->inputAudioBufferList.mBuffers[0].mNumberChannels );\n        /* -- Copy and process output data -- */\n        PaUtil_SetOutputFrameCount( &(stream->bufferProcessor), frames );\n        PaUtil_SetInterleavedOutputChannels( &(stream->bufferProcessor),\n                                             0,\n                                             ioData->mBuffers[0].mData,\n                                             ioData->mBuffers[0].mNumberChannels );\n        /* -- complete processing -- */\n        framesProcessed =\n            PaUtil_EndBufferProcessing( &(stream->bufferProcessor),\n                                        &callbackResult );\n    }\n    else if( isRender )\n    {\n        /* -------- Output Side of Full Duplex (Separate Devices or SR Conversion)\n         *       -- OR Simplex Output\n         *\n         * This case handles output data as in the full duplex case,\n         * and, if there is input data, reads it off the ring buffer\n         * and into the PA buffer processor. If sample rate conversion\n         * is required on input, that is done here as well.\n         */\n        unsigned long frames;\n        long bytesPerFrame = sizeof( float ) * ioData->mBuffers[0].mNumberChannels;\n\n        /* Sometimes, when stopping a duplex stream we get erroneous\n           xrun flags, so if this is our last run, clear the flags. */\n        int xrunFlags = stream->xrunFlags;\n        /*\n              if( xrunFlags & paInputUnderflow )\n                 printf( \"input underflow.\\n\" );\n              if( xrunFlags & paInputOverflow )\n                 printf( \"input overflow.\\n\" );\n        */\n        if( stream->state == STOPPING || stream->state == CALLBACK_STOPPED )\n            xrunFlags = 0;\n\n        /* -- start processing -- */\n        PaUtil_BeginBufferProcessing( &(stream->bufferProcessor),\n                                      &timeInfo,\n                                      xrunFlags );\n        stream->xrunFlags = 0; /* FEEDBACK: we only send flags to Buf Proc once */\n\n        /* -- Copy and process output data -- */\n        assert( ioData->mNumberBuffers == 1 );\n        frames = ioData->mBuffers[0].mDataByteSize / bytesPerFrame;\n        assert( ioData->mBuffers[0].mNumberChannels == stream->userOutChan );\n        PaUtil_SetOutputFrameCount( &(stream->bufferProcessor), frames );\n        PaUtil_SetInterleavedOutputChannels( &(stream->bufferProcessor),\n                                             0,\n                                             ioData->mBuffers[0].mData,\n                                             ioData->mBuffers[0].mNumberChannels );\n\n        /* -- copy and process input data, and complete processing -- */\n        if( stream->inputUnit ) {\n            const int flsz = sizeof( float );\n            /* Here, we read the data out of the ring buffer, through the\n               audio converter. */\n            int inChan = stream->inputAudioBufferList.mBuffers[0].mNumberChannels;\n            long bytesPerFrame = flsz * inChan;\n\n            if( stream->inputSRConverter )\n            {\n                OSStatus err;\n                float data[ inChan * frames ];\n                AudioBufferList bufferList;\n                bufferList.mNumberBuffers = 1;\n                bufferList.mBuffers[0].mNumberChannels = inChan;\n                bufferList.mBuffers[0].mDataByteSize = sizeof( data );\n                bufferList.mBuffers[0].mData = data;\n                UInt32 packets = frames;\n                err = AudioConverterFillComplexBuffer(\n                        stream->inputSRConverter,\n                        ringBufferIOProc,\n                        &stream->inputRingBuffer,\n                        &packets,\n                        &bufferList,\n                        NULL);\n                if( err == RING_BUFFER_EMPTY )\n                {   /* the ring buffer callback underflowed */\n                    err = 0;\n                    UInt32 size = packets * bytesPerFrame;\n                    bzero( ((char *)data) + size, sizeof(data)-size );\n                    /* The ring buffer can underflow normally when the stream is stopping.\n                     * So only report an error if the stream is active. */\n                    if( stream->state == ACTIVE )\n                    {\n                        stream->xrunFlags |= paInputUnderflow;\n                    }\n                }\n                ERR( err );\n                if(err != noErr)\n                {\n                    goto stop_stream;\n                }\n\n                PaUtil_SetInputFrameCount( &(stream->bufferProcessor), frames );\n                PaUtil_SetInterleavedInputChannels( &(stream->bufferProcessor),\n                                                    0,\n                                                    data,\n                                                    inChan );\n                framesProcessed =\n                    PaUtil_EndBufferProcessing( &(stream->bufferProcessor),\n                                                &callbackResult );\n            }\n            else\n            {\n                /* Without the AudioConverter is actually a bit more complex\n                   because we have to do a little buffer processing that the\n                   AudioConverter would otherwise handle for us. */\n                void *data1, *data2;\n                ring_buffer_size_t size1, size2;\n                ring_buffer_size_t framesReadable = PaUtil_GetRingBufferReadRegions( &stream->inputRingBuffer,\n                                                                                     frames,\n                                                                                     &data1, &size1,\n                                                                                     &data2, &size2 );\n                if( size1 == frames ) {\n                    /* simplest case: all in first buffer */\n                    PaUtil_SetInputFrameCount( &(stream->bufferProcessor), frames );\n                    PaUtil_SetInterleavedInputChannels( &(stream->bufferProcessor),\n                                                        0,\n                                                        data1,\n                                                        inChan );\n                    framesProcessed =\n                        PaUtil_EndBufferProcessing( &(stream->bufferProcessor),\n                                                    &callbackResult );\n                    PaUtil_AdvanceRingBufferReadIndex(&stream->inputRingBuffer, size1 );\n                } else if( framesReadable < frames ) {\n\n                    long sizeBytes1 = size1 * bytesPerFrame;\n                    long sizeBytes2 = size2 * bytesPerFrame;\n                    /*we underflowed. take what data we can, zero the rest.*/\n                    unsigned char data[ frames * bytesPerFrame ];\n                    if( size1 > 0 )\n                    {\n                        memcpy( data, data1, sizeBytes1 );\n                    }\n                    if( size2 > 0 )\n                    {\n                        memcpy( data+sizeBytes1, data2, sizeBytes2 );\n                    }\n                    bzero( data+sizeBytes1+sizeBytes2, (frames*bytesPerFrame) - sizeBytes1 - sizeBytes2 );\n\n                    PaUtil_SetInputFrameCount( &(stream->bufferProcessor), frames );\n                    PaUtil_SetInterleavedInputChannels( &(stream->bufferProcessor),\n                                                        0,\n                                                        data,\n                                                        inChan );\n                    framesProcessed =\n                        PaUtil_EndBufferProcessing( &(stream->bufferProcessor),\n                                                    &callbackResult );\n                    PaUtil_AdvanceRingBufferReadIndex( &stream->inputRingBuffer,\n                                                       framesReadable );\n                    /* flag underflow */\n                    stream->xrunFlags |= paInputUnderflow;\n                } else {\n                    /*we got all the data, but split between buffers*/\n                    PaUtil_SetInputFrameCount( &(stream->bufferProcessor), size1 );\n                    PaUtil_SetInterleavedInputChannels( &(stream->bufferProcessor),\n                                                        0,\n                                                        data1,\n                                                        inChan );\n                    PaUtil_Set2ndInputFrameCount( &(stream->bufferProcessor), size2 );\n                    PaUtil_Set2ndInterleavedInputChannels( &(stream->bufferProcessor),\n                                                           0,\n                                                           data2,\n                                                           inChan );\n                    framesProcessed =\n                        PaUtil_EndBufferProcessing( &(stream->bufferProcessor),\n                                                    &callbackResult );\n                    PaUtil_AdvanceRingBufferReadIndex(&stream->inputRingBuffer, framesReadable );\n                }\n            }\n        } else {\n            framesProcessed =\n                PaUtil_EndBufferProcessing( &(stream->bufferProcessor),\n                                            &callbackResult );\n        }\n\n    }\n    else\n    {\n        /* ------------------ Input\n         *\n         * First, we read off the audio data and put it in the ring buffer.\n         * if this is an input-only stream, we need to process it more,\n         * otherwise, we let the output case deal with it.\n         */\n        OSStatus err = 0;\n        int chan = stream->inputAudioBufferList.mBuffers[0].mNumberChannels ;\n        /* FIXME: looping here may not actually be necessary, but it was something I tried in testing. */\n        do {\n            err= AudioUnitRender( stream->inputUnit,\n                                  ioActionFlags,\n                                  inTimeStamp,\n                                  INPUT_ELEMENT,\n                                  inNumberFrames,\n                                  &stream->inputAudioBufferList );\n            if( err == -10874 )\n                inNumberFrames /= 2;\n        } while( err == -10874 && inNumberFrames > 1 );\n        ERR( err );\n        if(err != noErr)\n        {\n            goto stop_stream;\n        }\n\n        if( stream->inputSRConverter || stream->outputUnit )\n        {\n            /* If this is duplex or we use a converter, put the data\n               into the ring buffer. */\n            ring_buffer_size_t framesWritten = PaUtil_WriteRingBuffer( &stream->inputRingBuffer,\n                                                                       stream->inputAudioBufferList.mBuffers[0].mData,\n                                                                       inNumberFrames );\n            if( framesWritten != inNumberFrames )\n            {\n                stream->xrunFlags |= paInputOverflow ;\n            }\n        }\n        else\n        {\n            /* for simplex input w/o SR conversion,\n               just pop the data into the buffer processor.*/\n            PaUtil_BeginBufferProcessing( &(stream->bufferProcessor),\n                                          &timeInfo,\n                                          stream->xrunFlags );\n            stream->xrunFlags = 0;\n\n            PaUtil_SetInputFrameCount( &(stream->bufferProcessor), inNumberFrames);\n            PaUtil_SetInterleavedInputChannels( &(stream->bufferProcessor),\n                                                0,\n                                                stream->inputAudioBufferList.mBuffers[0].mData,\n                                                chan );\n            framesProcessed =\n                PaUtil_EndBufferProcessing( &(stream->bufferProcessor),\n                                            &callbackResult );\n        }\n        if( !stream->outputUnit && stream->inputSRConverter )\n        {\n            /* ------------------ Simplex Input w/ SR Conversion\n             *\n             * if this is a simplex input stream, we need to read off the buffer,\n             * do our sample rate conversion and pass the results to the buffer\n             * processor.\n             * The logic here is complicated somewhat by the fact that we don't\n             * know how much data is available, so we loop on reasonably sized\n             * chunks, and let the BufferProcessor deal with the rest.\n             *\n             */\n            /* This might be too big or small depending on SR conversion. */\n            float data[ chan * inNumberFrames ];\n            OSStatus err;\n            do\n            {   /* Run the buffer processor until we are out of data. */\n                AudioBufferList bufferList;\n                bufferList.mNumberBuffers = 1;\n                bufferList.mBuffers[0].mNumberChannels = chan;\n                bufferList.mBuffers[0].mDataByteSize = sizeof( data );\n                bufferList.mBuffers[0].mData = data;\n                UInt32 packets = inNumberFrames;\n                err = AudioConverterFillComplexBuffer(\n                        stream->inputSRConverter,\n                        ringBufferIOProc,\n                        &stream->inputRingBuffer,\n                        &packets,\n                        &bufferList,\n                        NULL);\n                if( err != RING_BUFFER_EMPTY )\n                    ERR( err );\n                if( err != noErr && err != RING_BUFFER_EMPTY )\n                {\n                    goto stop_stream;\n                }\n\n                PaUtil_SetInputFrameCount( &(stream->bufferProcessor), packets );\n                if( packets > 0 )\n                {\n                    PaUtil_BeginBufferProcessing( &(stream->bufferProcessor),\n                                                  &timeInfo,\n                                                  stream->xrunFlags );\n                    stream->xrunFlags = 0;\n\n                    PaUtil_SetInterleavedInputChannels( &(stream->bufferProcessor),\n                                                        0,\n                                                        data,\n                                                        chan );\n                    framesProcessed =\n                        PaUtil_EndBufferProcessing( &(stream->bufferProcessor),\n                                                    &callbackResult );\n                }\n            } while( callbackResult == paContinue && !err );\n        }\n    }\n\n    // Should we return successfully or fall through to stopping the stream?\n    if( callbackResult == paContinue )\n    {\n        PaUtil_EndCpuLoadMeasurement( &stream->cpuLoadMeasurer, framesProcessed );\n        return noErr;\n    }\n\nstop_stream:\n    stream->state = CALLBACK_STOPPED ;\n    if( stream->outputUnit )\n        AudioOutputUnitStop(stream->outputUnit);\n    if( stream->inputUnit )\n        AudioOutputUnitStop(stream->inputUnit);\n\n    PaUtil_EndCpuLoadMeasurement( &stream->cpuLoadMeasurer, framesProcessed );\n    return noErr;\n}\n\n/*\n    When CloseStream() is called, the multi-api layer ensures that\n    the stream has already been stopped or aborted.\n*/\nstatic PaError CloseStream( PaStream* s )\n{\n    /* This may be called from a failed OpenStream.\n       Therefore, each piece of info is treated separately. */\n    PaError result = paNoError;\n    PaMacCoreStream *stream = (PaMacCoreStream*)s;\n\n    VVDBUG((\"CloseStream()\\n\"));\n    VDBUG( ( \"Closing stream.\\n\" ) );\n\n    if( stream ) {\n\n        if( stream->outputUnit )\n        {\n            Boolean isInput = FALSE;\n            CleanupDevicePropertyListeners( stream, stream->outputDevice, isInput );\n        }\n\n        if( stream->inputUnit )\n        {\n            Boolean isInput = TRUE;\n            CleanupDevicePropertyListeners( stream, stream->inputDevice, isInput );\n        }\n\n        if( stream->outputUnit ) {\n            int count = removeFromXRunListenerList( stream );\n            if( count == 0 )\n                PaMacCore_AudioDeviceRemovePropertyListener( stream->outputDevice,\n                        0,\n                        false,\n                        kAudioDeviceProcessorOverload,\n                        xrunCallback, NULL ); //no need to pass actual node\n        }\n        if( stream->inputUnit && stream->outputUnit != stream->inputUnit ) {\n            int count = removeFromXRunListenerList( stream );\n            if( count == 0 )\n                PaMacCore_AudioDeviceRemovePropertyListener( stream->inputDevice,\n                        0,\n                        true,\n                        kAudioDeviceProcessorOverload,\n                        xrunCallback, NULL ); //no need to pass actual node\n        }\n        if( stream->outputUnit && stream->outputUnit != stream->inputUnit ) {\n            AudioUnitUninitialize( stream->outputUnit );\n#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6\n            AudioComponentInstanceDispose( stream->outputUnit );\n#else\n            CloseComponent( stream->outputUnit );\n#endif\n        }\n        stream->outputUnit = NULL;\n        if( stream->inputUnit )\n        {\n            AudioUnitUninitialize( stream->inputUnit );\n#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6\n            AudioComponentInstanceDispose( stream->inputUnit );\n#else\n            CloseComponent( stream->inputUnit );\n#endif\n            stream->inputUnit = NULL;\n        }\n        if( stream->inputRingBuffer.buffer )\n            free( (void *) stream->inputRingBuffer.buffer );\n        stream->inputRingBuffer.buffer = NULL;\n        /*TODO: is there more that needs to be done on error\n                from AudioConverterDispose?*/\n        if( stream->inputSRConverter )\n            ERR( AudioConverterDispose( stream->inputSRConverter ) );\n        stream->inputSRConverter = NULL;\n        if( stream->inputAudioBufferList.mBuffers[0].mData )\n            free( stream->inputAudioBufferList.mBuffers[0].mData );\n        stream->inputAudioBufferList.mBuffers[0].mData = NULL;\n\n        result = destroyBlioRingBuffers( &stream->blio );\n        if( result )\n            return result;\n        if( stream->bufferProcessorIsInitialized )\n            PaUtil_TerminateBufferProcessor( &stream->bufferProcessor );\n\n        if( stream->timingInformationMutexIsInitialized )\n            pthread_mutex_destroy( &stream->timingInformationMutex );\n\n        PaUtil_TerminateStreamRepresentation( &stream->streamRepresentation );\n        PaUtil_FreeMemory( stream );\n    }\n\n    return result;\n}\n\nstatic PaError StartStream( PaStream *s )\n{\n    PaMacCoreStream *stream = (PaMacCoreStream*)s;\n    OSStatus result = noErr;\n    VVDBUG((\"StartStream()\\n\"));\n    VDBUG( ( \"Starting stream.\\n\" ) );\n\n#define ERR_WRAP(mac_err) do { result = mac_err ; if ( result != noErr ) return ERR(result) ; } while(0)\n\n    /*FIXME: maybe want to do this on close/abort for faster start? */\n    PaUtil_ResetBufferProcessor( &stream->bufferProcessor );\n    if(  stream->inputSRConverter )\n        ERR_WRAP( AudioConverterReset( stream->inputSRConverter ) );\n\n    /* -- start -- */\n    stream->state = ACTIVE;\n    if( stream->inputUnit ) {\n        ERR_WRAP( AudioOutputUnitStart(stream->inputUnit) );\n    }\n    if( stream->outputUnit && stream->outputUnit != stream->inputUnit ) {\n        ERR_WRAP( AudioOutputUnitStart(stream->outputUnit) );\n    }\n\n    return paNoError;\n#undef ERR_WRAP\n}\n\n// it's not clear from appl's docs that this really waits\n// until all data is flushed.\nstatic ComponentResult BlockWhileAudioUnitIsRunning( AudioUnit audioUnit, AudioUnitElement element )\n{\n    Boolean isRunning = 1;\n    while( isRunning ) {\n        UInt32 s = sizeof( isRunning );\n        ComponentResult err = AudioUnitGetProperty( audioUnit, kAudioOutputUnitProperty_IsRunning, kAudioUnitScope_Global, element,  &isRunning, &s );\n        if( err )\n            return err;\n        Pa_Sleep( 100 );\n    }\n    return noErr;\n}\n\nstatic PaError FinishStoppingStream( PaMacCoreStream *stream )\n{\n    OSStatus result = noErr;\n    PaError paErr;\n\n#define ERR_WRAP(mac_err) do { result = mac_err ; if ( result != noErr ) return ERR(result) ; } while(0)\n    /* -- stop and reset -- */\n    if( stream->inputUnit == stream->outputUnit && stream->inputUnit )\n    {\n        ERR_WRAP( AudioOutputUnitStop(stream->inputUnit) );\n        ERR_WRAP( BlockWhileAudioUnitIsRunning(stream->inputUnit,0) );\n        ERR_WRAP( BlockWhileAudioUnitIsRunning(stream->inputUnit,1) );\n        ERR_WRAP( AudioUnitReset(stream->inputUnit, kAudioUnitScope_Global, 1) );\n        ERR_WRAP( AudioUnitReset(stream->inputUnit, kAudioUnitScope_Global, 0) );\n    }\n    else\n    {\n        if( stream->inputUnit )\n        {\n            ERR_WRAP(AudioOutputUnitStop(stream->inputUnit) );\n            ERR_WRAP( BlockWhileAudioUnitIsRunning(stream->inputUnit,1) );\n            ERR_WRAP(AudioUnitReset(stream->inputUnit,kAudioUnitScope_Global,1));\n        }\n        if( stream->outputUnit )\n        {\n            ERR_WRAP(AudioOutputUnitStop(stream->outputUnit));\n            ERR_WRAP( BlockWhileAudioUnitIsRunning(stream->outputUnit,0) );\n            ERR_WRAP(AudioUnitReset(stream->outputUnit,kAudioUnitScope_Global,0));\n        }\n    }\n    if( stream->inputRingBuffer.buffer ) {\n        PaUtil_FlushRingBuffer( &stream->inputRingBuffer );\n        bzero( (void *)stream->inputRingBuffer.buffer,\n               stream->inputRingBuffer.bufferSize );\n        /* advance the write point a little, so we are reading from the\n           middle of the buffer. We'll need extra at the end because\n           testing has shown that this helps. */\n        if( stream->outputUnit )\n            PaUtil_AdvanceRingBufferWriteIndex( &stream->inputRingBuffer,\n                                                stream->inputRingBuffer.bufferSize\n                                                / RING_BUFFER_ADVANCE_DENOMINATOR );\n    }\n\n    stream->xrunFlags = 0;\n    stream->state = STOPPED;\n\n    paErr = resetBlioRingBuffers( &stream->blio );\n    if( paErr )\n        return paErr;\n\n    VDBUG( ( \"Stream Stopped.\\n\" ) );\n    return paNoError;\n#undef ERR_WRAP\n}\n\n/* Block until buffer is empty then stop the stream. */\nstatic PaError StopStream( PaStream *s )\n{\n    PaError paErr;\n    PaMacCoreStream *stream = (PaMacCoreStream*)s;\n    VVDBUG((\"StopStream()\\n\"));\n\n    /* Tell WriteStream to stop filling the buffer. */\n    stream->state = STOPPING;\n\n    if( stream->userOutChan > 0 ) /* Does this stream do output? */\n    {\n        size_t maxHostFrames = MAX( stream->inputFramesPerBuffer, stream->outputFramesPerBuffer );\n        VDBUG( (\"Waiting for write buffer to be drained.\\n\") );\n        paErr = waitUntilBlioWriteBufferIsEmpty( &stream->blio, stream->sampleRate,\n                maxHostFrames );\n        VDBUG( ( \"waitUntilBlioWriteBufferIsEmpty returned %d\\n\", paErr ) );\n    }\n    return FinishStoppingStream( stream );\n}\n\n/* Immediately stop the stream. */\nstatic PaError AbortStream( PaStream *s )\n{\n    PaMacCoreStream *stream = (PaMacCoreStream*)s;\n    VDBUG( ( \"AbortStream()\\n\" ) );\n    stream->state = STOPPING;\n    return FinishStoppingStream( stream );\n}\n\n\nstatic PaError IsStreamStopped( PaStream *s )\n{\n    PaMacCoreStream *stream = (PaMacCoreStream*)s;\n    VVDBUG((\"IsStreamStopped()\\n\"));\n\n    return stream->state == STOPPED ? 1 : 0;\n}\n\n\nstatic PaError IsStreamActive( PaStream *s )\n{\n    PaMacCoreStream *stream = (PaMacCoreStream*)s;\n    VVDBUG((\"IsStreamActive()\\n\"));\n    return ( stream->state == ACTIVE || stream->state == STOPPING );\n}\n\n\nstatic double GetStreamCpuLoad( PaStream* s )\n{\n    PaMacCoreStream *stream = (PaMacCoreStream*)s;\n    VVDBUG((\"GetStreamCpuLoad()\\n\"));\n\n    return PaUtil_GetCpuLoad( &stream->cpuLoadMeasurer );\n}\n"
  },
  {
    "path": "thirdparty/portaudio/src/hostapi/coreaudio/pa_mac_core_blocking.c",
    "content": "/*\n * Implementation of the PortAudio API for Apple AUHAL\n *\n * PortAudio Portable Real-Time Audio Library\n * Latest Version at: http://www.portaudio.com\n *\n * Written by Bjorn Roche of XO Audio LLC, from PA skeleton code.\n * Portions copied from code by Dominic Mazzoni (who wrote a HAL implementation)\n *\n * Dominic's code was based on code by Phil Burk, Darren Gibbs,\n * Gord Peters, Stephane Letz, and Greg Pfiel.\n *\n * The following people also deserve acknowledgements:\n *\n * Olivier Tristan for feedback and testing\n * Glenn Zelniker and Z-Systems engineering for sponsoring the Blocking I/O\n * interface.\n *\n *\n * Based on the Open Source API proposed by Ross Bencina\n * Copyright (c) 1999-2002 Ross Bencina, Phil Burk\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n/**\n @file\n @ingroup hostapi_src\n\n This file contains the implementation\n required for blocking I/O. It is separated from pa_mac_core.c simply to ease\n development.\n*/\n\n#include \"pa_mac_core_blocking.h\"\n#include \"pa_mac_core_internal.h\"\n#include <assert.h>\n#ifdef MOSX_USE_NON_ATOMIC_FLAG_BITS\n# define OSAtomicOr32( a, b ) ( (*(b)) |= (a) )\n# define OSAtomicAnd32( a, b ) ( (*(b)) &= (a) )\n#else\n# include <libkern/OSAtomic.h>\n#endif\n\n/*\n * This function determines the size of a particular sample format.\n * if the format is not recognized, this returns zero.\n */\nstatic size_t computeSampleSizeFromFormat( PaSampleFormat format )\n{\n    switch( format & (~paNonInterleaved) ) {\n    case paFloat32: return 4;\n    case paInt32:   return 4;\n    case paInt24:   return 3;\n    case paInt16:   return 2;\n    case paInt8:\n    case paUInt8:   return 1;\n    default:        return 0;\n    }\n}\n\n/*\n * Same as computeSampleSizeFromFormat, except that if\n * the size is not a power of two, it returns the next power of two up\n */\nstatic size_t computeSampleSizeFromFormatPow2( PaSampleFormat format )\n{\n    switch( format & (~paNonInterleaved) ) {\n    case paFloat32: return 4;\n    case paInt32:   return 4;\n    case paInt24:   return 4;\n    case paInt16:   return 2;\n    case paInt8:\n    case paUInt8:   return 1;\n    default:        return 0;\n    }\n}\n\n\n/*\n * Functions for initializing, resetting, and destroying BLIO structures.\n *\n */\n\n/**\n * This should be called with the relevant info when initializing a stream for callback.\n *\n * @param ringBufferSizeInFrames must be a power of 2\n */\nPaError initializeBlioRingBuffers(\n        PaMacBlio *blio,\n        PaSampleFormat inputSampleFormat,\n        PaSampleFormat outputSampleFormat,\n        long ringBufferSizeInFrames,\n        int inChan,\n        int outChan )\n{\n    void *data;\n    int result;\n    OSStatus err;\n\n    /* zeroify things */\n    bzero( blio, sizeof( PaMacBlio ) );\n    /* this is redundant, but the buffers are used to check\n       if the buffers have been initialized, so we do it explicitly. */\n    blio->inputRingBuffer.buffer = NULL;\n    blio->outputRingBuffer.buffer = NULL;\n\n    /* initialize simple data */\n    blio->ringBufferFrames = ringBufferSizeInFrames;\n    blio->inputSampleFormat = inputSampleFormat;\n    blio->inputSampleSizeActual = computeSampleSizeFromFormat(inputSampleFormat);\n    blio->inputSampleSizePow2 = computeSampleSizeFromFormatPow2(inputSampleFormat); // FIXME: WHY?\n    blio->outputSampleFormat = outputSampleFormat;\n    blio->outputSampleSizeActual = computeSampleSizeFromFormat(outputSampleFormat);\n    blio->outputSampleSizePow2 = computeSampleSizeFromFormatPow2(outputSampleFormat);\n\n    blio->inChan = inChan;\n    blio->outChan = outChan;\n    blio->statusFlags = 0;\n    blio->errors = paNoError;\n#ifdef PA_MAC_BLIO_MUTEX\n    blio->isInputEmpty = false;\n    blio->isOutputFull = false;\n#endif\n\n    /* setup ring buffers */\n#ifdef PA_MAC_BLIO_MUTEX\n    result = PaMacCore_SetUnixError( pthread_mutex_init(&(blio->inputMutex),NULL), 0 );\n    if( result )\n        goto error;\n    result = UNIX_ERR( pthread_cond_init( &(blio->inputCond), NULL ) );\n    if( result )\n        goto error;\n    result = UNIX_ERR( pthread_mutex_init(&(blio->outputMutex),NULL) );\n    if( result )\n        goto error;\n    result = UNIX_ERR( pthread_cond_init( &(blio->outputCond), NULL ) );\n#endif\n    if( inChan ) {\n        data = calloc( ringBufferSizeInFrames, blio->inputSampleSizePow2 * inChan );\n        if( !data )\n        {\n            result = paInsufficientMemory;\n            goto error;\n        }\n\n        err = PaUtil_InitializeRingBuffer(\n                &blio->inputRingBuffer,\n                blio->inputSampleSizePow2 * inChan,\n                ringBufferSizeInFrames,\n                data );\n        assert( !err );\n    }\n    if( outChan ) {\n        data = calloc( ringBufferSizeInFrames, blio->outputSampleSizePow2 * outChan );\n        if( !data )\n        {\n            result = paInsufficientMemory;\n            goto error;\n        }\n\n        err = PaUtil_InitializeRingBuffer(\n                &blio->outputRingBuffer,\n                blio->outputSampleSizePow2 * outChan,\n                ringBufferSizeInFrames,\n                data );\n        assert( !err );\n    }\n\n    result = resetBlioRingBuffers( blio );\n    if( result )\n        goto error;\n\n    return 0;\n\nerror:\n    destroyBlioRingBuffers( blio );\n    return result;\n}\n\n#ifdef PA_MAC_BLIO_MUTEX\nPaError blioSetIsInputEmpty( PaMacBlio *blio, bool isEmpty )\n{\n    PaError result = paNoError;\n    if( isEmpty == blio->isInputEmpty )\n        goto done;\n\n    /* we need to update the value. Here's what we do:\n     * - Lock the mutex, so no one else can write.\n     * - update the value.\n     * - unlock.\n     * - broadcast to all listeners.\n     */\n    result = UNIX_ERR( pthread_mutex_lock( &blio->inputMutex ) );\n    if( result )\n        goto done;\n    blio->isInputEmpty = isEmpty;\n    result = UNIX_ERR( pthread_mutex_unlock( &blio->inputMutex ) );\n    if( result )\n        goto done;\n    result = UNIX_ERR( pthread_cond_broadcast( &blio->inputCond ) );\n    if( result )\n        goto done;\n\ndone:\n    return result;\n}\nPaError blioSetIsOutputFull( PaMacBlio *blio, bool isFull )\n{\n    PaError result = paNoError;\n    if( isFull == blio->isOutputFull )\n        goto done;\n\n    /* we need to update the value. Here's what we do:\n     * - Lock the mutex, so no one else can write.\n     * - update the value.\n     * - unlock.\n     * - broadcast to all listeners.\n     */\n    result = UNIX_ERR( pthread_mutex_lock( &blio->outputMutex ) );\n    if( result )\n        goto done;\n    blio->isOutputFull = isFull;\n    result = UNIX_ERR( pthread_mutex_unlock( &blio->outputMutex ) );\n    if( result )\n        goto done;\n    result = UNIX_ERR( pthread_cond_broadcast( &blio->outputCond ) );\n    if( result )\n        goto done;\n\ndone:\n    return result;\n}\n#endif\n\n/* This should be called after stopping or aborting the stream, so that on next\n   start, the buffers will be ready. */\nPaError resetBlioRingBuffers( PaMacBlio *blio )\n{\n#ifdef PA_MAC__BLIO_MUTEX\n    int result;\n#endif\n    blio->statusFlags = 0;\n    if( blio->outputRingBuffer.buffer ) {\n        PaUtil_FlushRingBuffer( &blio->outputRingBuffer );\n        /* Fill the buffer with zeros. */\n        bzero( blio->outputRingBuffer.buffer,\n               blio->outputRingBuffer.bufferSize * blio->outputRingBuffer.elementSizeBytes );\n        PaUtil_AdvanceRingBufferWriteIndex( &blio->outputRingBuffer, blio->ringBufferFrames );\n\n        /* Update isOutputFull. */\n#ifdef PA_MAC__BLIO_MUTEX\n        result = blioSetIsOutputFull( blio, toAdvance == blio->outputRingBuffer.bufferSize );\n        if( result )\n            goto error;\n#endif\n        /*\n              printf( \"------%d\\n\" ,  blio->outChan );\n              printf( \"------%d\\n\" ,  blio->outputSampleSize );\n        */\n    }\n    if( blio->inputRingBuffer.buffer ) {\n        PaUtil_FlushRingBuffer( &blio->inputRingBuffer );\n        bzero( blio->inputRingBuffer.buffer,\n               blio->inputRingBuffer.bufferSize * blio->inputRingBuffer.elementSizeBytes );\n        /* Update isInputEmpty. */\n#ifdef PA_MAC__BLIO_MUTEX\n        result = blioSetIsInputEmpty( blio, true );\n        if( result )\n            goto error;\n#endif\n    }\n    return paNoError;\n#ifdef PA_MAC__BLIO_MUTEX\nerror:\n    return result;\n#endif\n}\n\n/*This should be called when you are done with the blio. It can safely be called\n  multiple times if there are no exceptions. */\nPaError destroyBlioRingBuffers( PaMacBlio *blio )\n{\n    PaError result = paNoError;\n    if( blio->inputRingBuffer.buffer ) {\n        free( blio->inputRingBuffer.buffer );\n#ifdef PA_MAC__BLIO_MUTEX\n        result = UNIX_ERR( pthread_mutex_destroy( & blio->inputMutex ) );\n        if( result ) return result;\n        result = UNIX_ERR( pthread_cond_destroy( & blio->inputCond ) );\n        if( result ) return result;\n#endif\n    }\n    blio->inputRingBuffer.buffer = NULL;\n    if( blio->outputRingBuffer.buffer ) {\n        free( blio->outputRingBuffer.buffer );\n#ifdef PA_MAC__BLIO_MUTEX\n        result = UNIX_ERR( pthread_mutex_destroy( & blio->outputMutex ) );\n        if( result ) return result;\n        result = UNIX_ERR( pthread_cond_destroy( & blio->outputCond ) );\n        if( result ) return result;\n#endif\n    }\n    blio->outputRingBuffer.buffer = NULL;\n\n    return result;\n}\n\n/*\n * this is the BlioCallback function. It expects to receive a PaMacBlio Object\n * pointer as userData.\n *\n */\nint BlioCallback( const void *input, void *output, unsigned long frameCount,\n                  const PaStreamCallbackTimeInfo* timeInfo,\n                  PaStreamCallbackFlags statusFlags,\n                  void *userData )\n{\n    PaMacBlio *blio = (PaMacBlio*)userData;\n    ring_buffer_size_t framesAvailable;\n    ring_buffer_size_t framesToTransfer;\n    ring_buffer_size_t framesTransferred;\n\n    /* set flags returned by OS: */\n    OSAtomicOr32( statusFlags, &blio->statusFlags ) ;\n\n    /* --- Handle Input Buffer --- */\n    if( blio->inChan ) {\n        framesAvailable = PaUtil_GetRingBufferWriteAvailable( &blio->inputRingBuffer );\n\n        /* check for underflow */\n        if( framesAvailable < frameCount )\n        {\n            OSAtomicOr32( paInputOverflow, &blio->statusFlags );\n            framesToTransfer = framesAvailable;\n        }\n        else\n        {\n            framesToTransfer = (ring_buffer_size_t)frameCount;\n        }\n\n        /* Copy the data from the audio input to the application ring buffer. */\n        /*printf( \"reading %d\\n\", toRead );*/\n        framesTransferred = PaUtil_WriteRingBuffer( &blio->inputRingBuffer, input, framesToTransfer );\n        assert( framesToTransfer == framesTransferred );\n#ifdef PA_MAC__BLIO_MUTEX\n        /* Priority inversion. See notes below. */\n        blioSetIsInputEmpty( blio, false );\n#endif\n    }\n\n\n    /* --- Handle Output Buffer --- */\n    if( blio->outChan ) {\n        framesAvailable = PaUtil_GetRingBufferReadAvailable( &blio->outputRingBuffer );\n\n        /* check for underflow */\n        if( framesAvailable < frameCount )\n        {\n            /* zero out the end of the output buffer that we do not have data for */\n            framesToTransfer = framesAvailable;\n\n            size_t bytesPerFrame = blio->outputSampleSizeActual * blio->outChan;\n            size_t offsetInBytes = framesToTransfer * bytesPerFrame;\n            size_t countInBytes = (frameCount - framesToTransfer) * bytesPerFrame;\n            bzero( ((char *)output) + offsetInBytes, countInBytes );\n\n            OSAtomicOr32( paOutputUnderflow, &blio->statusFlags );\n            framesToTransfer = framesAvailable;\n        }\n        else\n        {\n            framesToTransfer = (ring_buffer_size_t)frameCount;\n        }\n\n        /* copy the data */\n        /*printf( \"writing %d\\n\", toWrite );*/\n        framesTransferred = PaUtil_ReadRingBuffer( &blio->outputRingBuffer, output, framesToTransfer );\n        assert( framesToTransfer == framesTransferred );\n#ifdef PA_MAC__BLIO_MUTEX\n        /* We have a priority inversion here. However, we will only have to\n           wait if this was true and is now false, which means we've got\n           some room in the buffer.\n           Hopefully problems will be minimized. */\n        blioSetIsOutputFull( blio, false );\n#endif\n    }\n\n    return paContinue;\n}\n\nPaError ReadStream( PaStream* stream,\n                    void *buffer,\n                    unsigned long framesRequested )\n{\n    PaMacBlio *blio = & ((PaMacCoreStream*)stream) -> blio;\n    char *cbuf = (char *) buffer;\n    PaError ret = paNoError;\n    VVDBUG((\"ReadStream()\\n\"));\n\n    while( framesRequested > 0 ) {\n        ring_buffer_size_t framesAvailable;\n        ring_buffer_size_t framesToTransfer;\n        ring_buffer_size_t framesTransferred;\n        do {\n            framesAvailable = PaUtil_GetRingBufferReadAvailable( &blio->inputRingBuffer );\n            /*\n                      printf( \"Read Buffer is %%%g full: %ld of %ld.\\n\",\n                              100 * (float)avail / (float) blio->inputRingBuffer.bufferSize,\n                              framesAvailable, blio->inputRingBuffer.bufferSize );\n            */\n            if( framesAvailable == 0 ) {\n#ifdef PA_MAC_BLIO_MUTEX\n                /**block when empty*/\n                ret = UNIX_ERR( pthread_mutex_lock( &blio->inputMutex ) );\n                if( ret )\n                    return ret;\n                while( blio->isInputEmpty ) {\n                    ret = UNIX_ERR( pthread_cond_wait( &blio->inputCond, &blio->inputMutex ) );\n                    if( ret )\n                        return ret;\n                }\n                ret = UNIX_ERR( pthread_mutex_unlock( &blio->inputMutex ) );\n                if( ret )\n                    return ret;\n#else\n                Pa_Sleep( PA_MAC_BLIO_BUSY_WAIT_SLEEP_INTERVAL );\n#endif\n            }\n        } while( framesAvailable == 0 );\n        framesToTransfer = (ring_buffer_size_t) MIN( framesAvailable, framesRequested );\n        framesTransferred = PaUtil_ReadRingBuffer( &blio->inputRingBuffer, (void *)cbuf, framesToTransfer );\n        cbuf += framesTransferred * blio->inputSampleSizeActual * blio->inChan;\n        framesRequested -= framesTransferred;\n\n        if( framesToTransfer == framesAvailable ) {\n#ifdef PA_MAC_BLIO_MUTEX\n            /* we just emptied the buffer, so we need to mark it as empty. */\n            ret = blioSetIsInputEmpty( blio, true );\n            if( ret )\n                return ret;\n            /* of course, in the meantime, the callback may have put some sats\n               in, so\n               so check for that, too, to avoid a race condition. */\n            /* FIXME - this does not seem to fix any race condition. */\n            if( PaUtil_GetRingBufferReadAvailable( &blio->inputRingBuffer ) ) {\n                blioSetIsInputEmpty( blio, false );\n                /* FIXME - why check? ret has not been set? */\n                if( ret )\n                    return ret;\n            }\n#endif\n        }\n    }\n\n    /*   Report either paNoError or paInputOverflowed. */\n    /*   may also want to report other errors, but this is non-standard. */\n    /* FIXME should not clobber ret, use if(blio->statusFlags & paInputOverflow) */\n    ret = blio->statusFlags & paInputOverflow;\n\n    /* report underflow only once: */\n    if( ret ) {\n        OSAtomicAnd32( (uint32_t)(~paInputOverflow), &blio->statusFlags );\n        ret = paInputOverflowed;\n    }\n\n    return ret;\n}\n\n\nPaError WriteStream( PaStream* stream,\n                     const void *buffer,\n                     unsigned long framesRequested )\n{\n    PaMacCoreStream *macStream = (PaMacCoreStream*)stream;\n    PaMacBlio *blio = &macStream->blio;\n    char *cbuf = (char *) buffer;\n    PaError ret = paNoError;\n    VVDBUG((\"WriteStream()\\n\"));\n\n    while( framesRequested > 0 && macStream->state != STOPPING ) {\n        ring_buffer_size_t framesAvailable;\n        ring_buffer_size_t framesToTransfer;\n        ring_buffer_size_t framesTransferred;\n\n        do {\n            framesAvailable = PaUtil_GetRingBufferWriteAvailable( &blio->outputRingBuffer );\n            /*\n                      printf( \"Write Buffer is %%%g full: %ld of %ld.\\n\",\n                              100 - 100 * (float)avail / (float) blio->outputRingBuffer.bufferSize,\n                              framesAvailable, blio->outputRingBuffer.bufferSize );\n            */\n            if( framesAvailable == 0 ) {\n#ifdef PA_MAC_BLIO_MUTEX\n                /*block while full*/\n                ret = UNIX_ERR( pthread_mutex_lock( &blio->outputMutex ) );\n                if( ret )\n                    return ret;\n                while( blio->isOutputFull ) {\n                    ret = UNIX_ERR( pthread_cond_wait( &blio->outputCond, &blio->outputMutex ) );\n                    if( ret )\n                        return ret;\n                }\n                ret = UNIX_ERR( pthread_mutex_unlock( &blio->outputMutex ) );\n                if( ret )\n                    return ret;\n#else\n                Pa_Sleep( PA_MAC_BLIO_BUSY_WAIT_SLEEP_INTERVAL );\n#endif\n            }\n        } while( framesAvailable == 0 && macStream->state != STOPPING );\n\n        if( macStream->state == STOPPING )\n        {\n            break;\n        }\n\n        framesToTransfer = MIN( framesAvailable, framesRequested );\n        framesTransferred = PaUtil_WriteRingBuffer( &blio->outputRingBuffer, (void *)cbuf, framesToTransfer );\n        cbuf += framesTransferred * blio->outputSampleSizeActual * blio->outChan;\n        framesRequested -= framesTransferred;\n\n#ifdef PA_MAC_BLIO_MUTEX\n        if( framesToTransfer == framesAvailable ) {\n            /* we just filled up the buffer, so we need to mark it as filled. */\n            ret = blioSetIsOutputFull( blio, true );\n            if( ret )\n                return ret;\n            /* of course, in the meantime, we may have emptied the buffer, so\n               so check for that, too, to avoid a race condition. */\n            if( PaUtil_GetRingBufferWriteAvailable( &blio->outputRingBuffer ) ) {\n                blioSetIsOutputFull( blio, false );\n                /* FIXME remove or review this code, does not fix race, ret not set! */\n                if( ret )\n                    return ret;\n            }\n        }\n#endif\n    }\n\n    if ( macStream->state == STOPPING )\n    {\n        ret = paInternalError;\n    }\n    else if (ret == paNoError )\n    {\n        /*   Test for underflow. */\n        ret = blio->statusFlags & paOutputUnderflow;\n\n        /* report underflow only once: */\n        if( ret )\n        {\n            OSAtomicAnd32( (uint32_t)(~paOutputUnderflow), &blio->statusFlags );\n            ret = paOutputUnderflowed;\n        }\n    }\n\n    return ret;\n}\n\n/*\n * Wait until the data in the buffer has finished playing.\n */\nPaError waitUntilBlioWriteBufferIsEmpty( PaMacBlio *blio, double sampleRate,\n        size_t framesPerBuffer )\n{\n    PaError result = paNoError;\n    if( blio->outputRingBuffer.buffer ) {\n        ring_buffer_size_t framesLeft = PaUtil_GetRingBufferReadAvailable( &blio->outputRingBuffer );\n\n        /* Calculate when we should give up waiting. To be safe wait for two extra periods. */\n        PaTime now = PaUtil_GetTime();\n        PaTime startTime = now;\n        PaTime timeoutTime = startTime + (framesLeft + (2 * framesPerBuffer)) / sampleRate;\n\n        long msecPerBuffer = 1 + (long)( 1000.0 * framesPerBuffer / sampleRate);\n        while( framesLeft > 0 && now < timeoutTime ) {\n            VDBUG(( \"waitUntilBlioWriteBufferIsFlushed: framesLeft = %d, framesPerBuffer = %ld\\n\",\n                    framesLeft, framesPerBuffer ));\n            Pa_Sleep( msecPerBuffer );\n            framesLeft = PaUtil_GetRingBufferReadAvailable( &blio->outputRingBuffer );\n            now = PaUtil_GetTime();\n        }\n\n        if( framesLeft > 0 )\n        {\n            VDBUG(( \"waitUntilBlioWriteBufferIsFlushed: TIMED OUT - framesLeft = %d\\n\", framesLeft ));\n            result = paTimedOut;\n        }\n    }\n    return result;\n}\n\nsigned long GetStreamReadAvailable( PaStream* stream )\n{\n    PaMacBlio *blio = & ((PaMacCoreStream*)stream) -> blio;\n    VVDBUG((\"GetStreamReadAvailable()\\n\"));\n\n    return PaUtil_GetRingBufferReadAvailable( &blio->inputRingBuffer );\n}\n\n\nsigned long GetStreamWriteAvailable( PaStream* stream )\n{\n    PaMacBlio *blio = & ((PaMacCoreStream*)stream) -> blio;\n    VVDBUG((\"GetStreamWriteAvailable()\\n\"));\n\n    return PaUtil_GetRingBufferWriteAvailable( &blio->outputRingBuffer );\n}\n"
  },
  {
    "path": "thirdparty/portaudio/src/hostapi/coreaudio/pa_mac_core_blocking.h",
    "content": "/*\n * Internal blocking interfaces for PortAudio Apple AUHAL implementation\n *\n * PortAudio Portable Real-Time Audio Library\n * Latest Version at: http://www.portaudio.com\n *\n * Written by Bjorn Roche of XO Audio LLC, from PA skeleton code.\n * Portions copied from code by Dominic Mazzoni (who wrote a HAL implementation)\n *\n * Dominic's code was based on code by Phil Burk, Darren Gibbs,\n * Gord Peters, Stephane Letz, and Greg Pfiel.\n *\n * The following people also deserve acknowledgements:\n *\n * Olivier Tristan for feedback and testing\n * Glenn Zelniker and Z-Systems engineering for sponsoring the Blocking I/O\n * interface.\n *\n *\n * Based on the Open Source API proposed by Ross Bencina\n * Copyright (c) 1999-2002 Ross Bencina, Phil Burk\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n/**\n @file\n @ingroup hostapi_src\n*/\n\n#ifndef PA_MAC_CORE_BLOCKING_H_\n#define PA_MAC_CORE_BLOCKING_H_\n\n#include \"pa_ringbuffer.h\"\n#include \"portaudio.h\"\n#include \"pa_mac_core_utilities.h\"\n\n/*\n * Number of milliseconds to busy wait while waiting for data in blocking calls.\n */\n#define PA_MAC_BLIO_BUSY_WAIT_SLEEP_INTERVAL (5)\n/*\n * Define exactly one of these blocking methods\n * PA_MAC_BLIO_MUTEX is not actively maintained.\n */\n#define PA_MAC_BLIO_BUSY_WAIT\n/*\n#define PA_MAC_BLIO_MUTEX\n*/\n\ntypedef struct {\n    PaUtilRingBuffer inputRingBuffer;\n    PaUtilRingBuffer outputRingBuffer;\n    ring_buffer_size_t ringBufferFrames;\n    PaSampleFormat inputSampleFormat;\n    size_t inputSampleSizeActual;\n    size_t inputSampleSizePow2;\n    PaSampleFormat outputSampleFormat;\n    size_t outputSampleSizeActual;\n    size_t outputSampleSizePow2;\n\n    int inChan;\n    int outChan;\n\n    //PaStreamCallbackFlags statusFlags;\n    uint32_t statusFlags;\n    PaError errors;\n\n    /* Here we handle blocking, using condition variables. */\n#ifdef  PA_MAC_BLIO_MUTEX\n    volatile bool isInputEmpty;\n    pthread_mutex_t inputMutex;\n    pthread_cond_t inputCond;\n\n    volatile bool isOutputFull;\n    pthread_mutex_t outputMutex;\n    pthread_cond_t outputCond;\n#endif\n}\nPaMacBlio;\n\n/*\n * These functions operate on condition and related variables.\n */\n\nPaError initializeBlioRingBuffers(\n        PaMacBlio *blio,\n        PaSampleFormat inputSampleFormat,\n        PaSampleFormat outputSampleFormat,\n        long ringBufferSizeInFrames,\n        int inChan,\n        int outChan );\nPaError destroyBlioRingBuffers( PaMacBlio *blio );\nPaError resetBlioRingBuffers( PaMacBlio *blio );\n\nint BlioCallback(\n        const void *input, void *output,\n        unsigned long frameCount,\n        const PaStreamCallbackTimeInfo* timeInfo,\n        PaStreamCallbackFlags statusFlags,\n        void *userData );\n\nPaError waitUntilBlioWriteBufferIsEmpty( PaMacBlio *blio, double sampleRate,\n        size_t framesPerBuffer );\n\n#endif /*PA_MAC_CORE_BLOCKING_H_*/\n"
  },
  {
    "path": "thirdparty/portaudio/src/hostapi/coreaudio/pa_mac_core_internal.h",
    "content": "/*\n * Internal interfaces for PortAudio Apple AUHAL implementation\n *\n * PortAudio Portable Real-Time Audio Library\n * Latest Version at: http://www.portaudio.com\n *\n * Written by Bjorn Roche of XO Audio LLC, from PA skeleton code.\n * Portions copied from code by Dominic Mazzoni (who wrote a HAL implementation)\n *\n * Dominic's code was based on code by Phil Burk, Darren Gibbs,\n * Gord Peters, Stephane Letz, and Greg Pfiel.\n *\n * The following people also deserve acknowledgements:\n *\n * Olivier Tristan for feedback and testing\n * Glenn Zelniker and Z-Systems engineering for sponsoring the Blocking I/O\n * interface.\n *\n *\n * Based on the Open Source API proposed by Ross Bencina\n * Copyright (c) 1999-2002 Ross Bencina, Phil Burk\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n/**\n @file pa_mac_core\n @ingroup hostapi_src\n @author Bjorn Roche\n @brief AUHAL implementation of PortAudio\n*/\n\n#ifndef PA_MAC_CORE_INTERNAL_H__\n#define PA_MAC_CORE_INTERNAL_H__\n\n#include <CoreAudio/CoreAudio.h>\n#include <CoreServices/CoreServices.h>\n#include <AudioUnit/AudioUnit.h>\n#include <AudioToolbox/AudioToolbox.h>\n\n#include \"portaudio.h\"\n#include \"pa_util.h\"\n#include \"pa_hostapi.h\"\n#include \"pa_stream.h\"\n#include \"pa_allocation.h\"\n#include \"pa_cpuload.h\"\n#include \"pa_process.h\"\n#include \"pa_ringbuffer.h\"\n\n#include \"pa_mac_core_blocking.h\"\n\n/* function prototypes */\n\n#ifdef __cplusplus\nextern \"C\"\n{\n#endif /* __cplusplus */\n\nPaError PaMacCore_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index );\n\n#ifdef __cplusplus\n}\n#endif /* __cplusplus */\n\n#define RING_BUFFER_ADVANCE_DENOMINATOR (4)\n\nPaError ReadStream( PaStream* stream, void *buffer, unsigned long frames );\nPaError WriteStream( PaStream* stream, const void *buffer, unsigned long frames );\nsigned long GetStreamReadAvailable( PaStream* stream );\nsigned long GetStreamWriteAvailable( PaStream* stream );\n/* PaMacAUHAL - host api datastructure specific to this implementation */\ntypedef struct\n{\n    PaUtilHostApiRepresentation inheritedHostApiRep;\n    PaUtilStreamInterface callbackStreamInterface;\n    PaUtilStreamInterface blockingStreamInterface;\n\n    PaUtilAllocationGroup *allocations;\n\n    /* implementation specific data goes here */\n    long devCount;\n    AudioDeviceID *devIds; /*array of all audio devices*/\n    AudioDeviceID defaultIn;\n    AudioDeviceID defaultOut;\n}\nPaMacAUHAL;\n\ntypedef struct PaMacCoreDeviceProperties\n{\n    /* Values in Frames from property queries. */\n    UInt32 safetyOffset;\n    UInt32 bufferFrameSize;\n    // UInt32 streamLatency; // Seems to be the same as deviceLatency!?\n    UInt32 deviceLatency;\n    /* Current device sample rate. May change!\n       These are initialized to the nominal device sample rate,\n       and updated with the actual sample rate, when/where available.\n       Note that these are the *device* sample rates, prior to any required\n       SR conversion. */\n    Float64 sampleRate;\n    Float64 samplePeriod; // reciprocal\n}\nPaMacCoreDeviceProperties;\n\n/* stream data structure specifically for this implementation */\ntypedef struct PaMacCoreStream\n{\n    PaUtilStreamRepresentation streamRepresentation;\n    PaUtilCpuLoadMeasurer cpuLoadMeasurer;\n    PaUtilBufferProcessor bufferProcessor;\n\n    /* implementation specific data goes here */\n    bool bufferProcessorIsInitialized;\n    AudioUnit inputUnit;\n    AudioUnit outputUnit;\n    AudioDeviceID inputDevice;\n    AudioDeviceID outputDevice;\n    size_t userInChan;\n    size_t userOutChan;\n    size_t inputFramesPerBuffer;\n    size_t outputFramesPerBuffer;\n    PaMacBlio blio;\n    /* We use this ring buffer when input and out devs are different. */\n    PaUtilRingBuffer inputRingBuffer;\n    /* We may need to do SR conversion on input. */\n    AudioConverterRef inputSRConverter;\n    /* We need to preallocate an inputBuffer for reading data. */\n    AudioBufferList inputAudioBufferList;\n    AudioTimeStamp startTime;\n    /* FIXME: instead of volatile, these should be properly memory barriered */\n    volatile uint32_t xrunFlags; /*PaStreamCallbackFlags*/\n    volatile enum {\n        STOPPED          = 0, /* playback is completely stopped,\n                                and the user has called StopStream(). */\n        CALLBACK_STOPPED = 1, /* callback has requested stop,\n                                but user has not yet called StopStream(). */\n        STOPPING         = 2, /* The stream is in the process of closing\n                                because the user has called StopStream.\n                                This state is just used internally;\n                                externally it is indistinguishable from\n                                ACTIVE.*/\n        ACTIVE           = 3  /* The stream is active and running. */\n    } state;\n    double sampleRate;\n    PaMacCoreDeviceProperties  inputProperties;\n    PaMacCoreDeviceProperties  outputProperties;\n\n    /* data updated by main thread and notifications, protected by timingInformationMutex */\n    int timingInformationMutexIsInitialized;\n    pthread_mutex_t timingInformationMutex;\n\n    /* These are written by the PA thread or from CoreAudio callbacks. Protected by the mutex. */\n    Float64 timestampOffsetCombined;\n    Float64 timestampOffsetInputDevice;\n    Float64 timestampOffsetOutputDevice;\n\n    /* Offsets in seconds to be applied to Apple timestamps to convert them to PA timestamps.\n     * While the io proc is active, the following values are only accessed and manipulated by the ioproc */\n    Float64 timestampOffsetCombined_ioProcCopy;\n    Float64 timestampOffsetInputDevice_ioProcCopy;\n    Float64 timestampOffsetOutputDevice_ioProcCopy;\n}\nPaMacCoreStream;\n\n#endif /* PA_MAC_CORE_INTERNAL_H__ */\n"
  },
  {
    "path": "thirdparty/portaudio/src/hostapi/coreaudio/pa_mac_core_utilities.c",
    "content": "/*\n * Helper and utility functions for pa_mac_core.c (Apple AUHAL implementation)\n *\n * PortAudio Portable Real-Time Audio Library\n * Latest Version at: http://www.portaudio.com\n *\n * Written by Bjorn Roche of XO Audio LLC, from PA skeleton code.\n * Portions copied from code by Dominic Mazzoni (who wrote a HAL implementation)\n *\n * Dominic's code was based on code by Phil Burk, Darren Gibbs,\n * Gord Peters, Stephane Letz, and Greg Pfiel.\n *\n * The following people also deserve acknowledgements:\n *\n * Olivier Tristan for feedback and testing\n * Glenn Zelniker and Z-Systems engineering for sponsoring the Blocking I/O\n * interface.\n *\n *\n * Based on the Open Source API proposed by Ross Bencina\n * Copyright (c) 1999-2002 Ross Bencina, Phil Burk\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n/**\n @file\n @ingroup hostapi_src\n*/\n\n#include \"pa_mac_core_utilities.h\"\n#include \"pa_mac_core_internal.h\"\n#include <libkern/OSAtomic.h>\n#include <strings.h>\n#include <pthread.h>\n#include <sys/time.h>\n\nOSStatus PaMacCore_AudioHardwareGetProperty(\n        AudioHardwarePropertyID inPropertyID,\n        UInt32*                 ioPropertyDataSize,\n        void*                   outPropertyData )\n{\n    AudioObjectPropertyAddress address = { inPropertyID, kAudioObjectPropertyScopeGlobal, kAudioObjectPropertyElementMaster };\n    return AudioObjectGetPropertyData(kAudioObjectSystemObject, &address, 0, NULL, ioPropertyDataSize, outPropertyData);\n}\n\nOSStatus PaMacCore_AudioHardwareGetPropertySize(\n        AudioHardwarePropertyID inPropertyID,\n        UInt32*                 outSize )\n{\n    AudioObjectPropertyAddress address = { inPropertyID, kAudioObjectPropertyScopeGlobal, kAudioObjectPropertyElementMaster };\n    return AudioObjectGetPropertyDataSize(kAudioObjectSystemObject, &address, 0, NULL, outSize);\n}\n\nOSStatus PaMacCore_AudioDeviceGetProperty(\n        AudioDeviceID         inDevice,\n        UInt32                inChannel,\n        Boolean               isInput,\n        AudioDevicePropertyID inPropertyID,\n        UInt32*               ioPropertyDataSize,\n        void*                 outPropertyData )\n{\n    AudioObjectPropertyScope scope = isInput ? kAudioDevicePropertyScopeInput : kAudioDevicePropertyScopeOutput;\n    AudioObjectPropertyAddress address = { inPropertyID, scope, inChannel };\n    return AudioObjectGetPropertyData(inDevice, &address, 0, NULL, ioPropertyDataSize, outPropertyData);\n}\n\nOSStatus PaMacCore_AudioDeviceSetProperty(\n        AudioDeviceID         inDevice,\n        const AudioTimeStamp* inWhen,\n        UInt32                inChannel,\n        Boolean               isInput,\n        AudioDevicePropertyID inPropertyID,\n        UInt32                inPropertyDataSize,\n        const void*           inPropertyData )\n{\n    AudioObjectPropertyScope scope = isInput ? kAudioDevicePropertyScopeInput : kAudioDevicePropertyScopeOutput;\n    AudioObjectPropertyAddress address = { inPropertyID, scope, inChannel };\n    return AudioObjectSetPropertyData(inDevice, &address, 0, NULL, inPropertyDataSize, inPropertyData);\n}\n\nOSStatus PaMacCore_AudioDeviceGetPropertySize(\n        AudioDeviceID         inDevice,\n        UInt32                inChannel,\n        Boolean               isInput,\n        AudioDevicePropertyID inPropertyID,\n        UInt32*               outSize )\n{\n    AudioObjectPropertyScope scope = isInput ? kAudioDevicePropertyScopeInput : kAudioDevicePropertyScopeOutput;\n    AudioObjectPropertyAddress address = { inPropertyID, scope, inChannel };\n    return AudioObjectGetPropertyDataSize(inDevice, &address, 0, NULL, outSize);\n}\n\nOSStatus PaMacCore_AudioDeviceAddPropertyListener(\n        AudioDeviceID                   inDevice,\n        UInt32                          inChannel,\n        Boolean                         isInput,\n        AudioDevicePropertyID           inPropertyID,\n        AudioObjectPropertyListenerProc inProc,\n        void*                           inClientData )\n{\n    AudioObjectPropertyScope scope = isInput ? kAudioDevicePropertyScopeInput : kAudioDevicePropertyScopeOutput;\n    AudioObjectPropertyAddress address = { inPropertyID, scope, inChannel };\n    return AudioObjectAddPropertyListener(inDevice, &address, inProc, inClientData);\n}\n\nOSStatus PaMacCore_AudioDeviceRemovePropertyListener(\n        AudioDeviceID                   inDevice,\n        UInt32                          inChannel,\n        Boolean                         isInput,\n        AudioDevicePropertyID           inPropertyID,\n        AudioObjectPropertyListenerProc inProc,\n        void*                           inClientData )\n{\n    AudioObjectPropertyScope scope = isInput ? kAudioDevicePropertyScopeInput : kAudioDevicePropertyScopeOutput;\n    AudioObjectPropertyAddress address = { inPropertyID, scope, inChannel };\n    return AudioObjectRemovePropertyListener(inDevice, &address, inProc, inClientData);\n}\n\nOSStatus PaMacCore_AudioStreamGetProperty(\n        AudioStreamID         inStream,\n        UInt32                inChannel,\n        AudioDevicePropertyID inPropertyID,\n        UInt32*               ioPropertyDataSize,\n        void*                 outPropertyData )\n{\n    AudioObjectPropertyAddress address = { inPropertyID, kAudioObjectPropertyScopeGlobal, kAudioObjectPropertyElementMaster };\n    return AudioObjectGetPropertyData(inStream, &address, 0, NULL, ioPropertyDataSize, outPropertyData);\n}\n\nPaError PaMacCore_SetUnixError( int err, int line )\n{\n    PaError ret;\n    const char *errorText;\n\n    if( err == 0 )\n    {\n        return paNoError;\n    }\n\n    ret = paNoError;\n    errorText = strerror( err );\n\n    /** Map Unix error to PaError. Pretty much the only one that maps\n        is ENOMEM. */\n    if( err == ENOMEM )\n        ret = paInsufficientMemory;\n    else\n        ret = paInternalError;\n\n    DBUG((\"%d on line %d: msg='%s'\\n\", err, line, errorText));\n    PaUtil_SetLastHostErrorInfo( paCoreAudio, err, errorText );\n\n    return ret;\n}\n\n/*\n * Translates MacOS generated errors into PaErrors\n */\nPaError PaMacCore_SetError(OSStatus error, int line, int isError)\n{\n    /*FIXME: still need to handle possible ComponentResult values.*/\n    /*       unfortunately, they don't seem to be documented anywhere.*/\n    PaError result;\n    const char *errorType;\n    const char *errorText;\n\n    switch (error) {\n    case kAudioHardwareNoError:\n        return paNoError;\n    case kAudioHardwareNotRunningError:\n        errorText = \"Audio Hardware Not Running\";\n        result = paInternalError;\n        break;\n    case kAudioHardwareUnspecifiedError:\n        errorText = \"Unspecified Audio Hardware Error\";\n        result = paInternalError;\n        break;\n    case kAudioHardwareUnknownPropertyError:\n        errorText = \"Audio Hardware: Unknown Property\";\n        result = paInternalError;\n        break;\n    case kAudioHardwareBadPropertySizeError:\n        errorText = \"Audio Hardware: Bad Property Size\";\n        result = paInternalError;\n        break;\n    case kAudioHardwareIllegalOperationError:\n        errorText = \"Audio Hardware: Illegal Operation\";\n        result = paInternalError;\n        break;\n    case kAudioHardwareBadDeviceError:\n        errorText = \"Audio Hardware: Bad Device\";\n        result = paInvalidDevice;\n        break;\n    case kAudioHardwareBadStreamError:\n        errorText = \"Audio Hardware: BadStream\";\n        result = paBadStreamPtr;\n        break;\n    case kAudioHardwareUnsupportedOperationError:\n        errorText = \"Audio Hardware: Unsupported Operation\";\n        result = paInternalError;\n        break;\n    case kAudioDeviceUnsupportedFormatError:\n        errorText = \"Audio Device: Unsupported Format\";\n        result = paSampleFormatNotSupported;\n        break;\n    case kAudioDevicePermissionsError:\n        errorText = \"Audio Device: Permissions Error\";\n        result = paDeviceUnavailable;\n        break;\n    /* Audio Unit Errors: http://developer.apple.com/documentation/MusicAudio/Reference/CoreAudio/audio_units/chapter_5_section_3.html */\n    case kAudioUnitErr_InvalidProperty:\n        errorText = \"Audio Unit: Invalid Property\";\n        result = paInternalError;\n        break;\n    case kAudioUnitErr_InvalidParameter:\n        errorText = \"Audio Unit: Invalid Parameter\";\n        result = paInternalError;\n        break;\n    case kAudioUnitErr_NoConnection:\n        errorText = \"Audio Unit: No Connection\";\n        result = paInternalError;\n        break;\n    case kAudioUnitErr_FailedInitialization:\n        errorText = \"Audio Unit: Initialization Failed\";\n        result = paInternalError;\n        break;\n    case kAudioUnitErr_TooManyFramesToProcess:\n        errorText = \"Audio Unit: Too Many Frames\";\n        result = paInternalError;\n        break;\n    case kAudioUnitErr_InvalidFile:\n        errorText = \"Audio Unit: Invalid File\";\n        result = paInternalError;\n        break;\n    case kAudioUnitErr_UnknownFileType:\n        errorText = \"Audio Unit: Unknown File Type\";\n        result = paInternalError;\n        break;\n    case kAudioUnitErr_FileNotSpecified:\n        errorText = \"Audio Unit: File Not Specified\";\n        result = paInternalError;\n        break;\n    case kAudioUnitErr_FormatNotSupported:\n        errorText = \"Audio Unit: Format Not Supported\";\n        result = paInternalError;\n        break;\n    case kAudioUnitErr_Uninitialized:\n        errorText = \"Audio Unit: Uninitialized\";\n        result = paInternalError;\n        break;\n    case kAudioUnitErr_InvalidScope:\n        errorText = \"Audio Unit: Invalid Scope\";\n        result = paInternalError;\n        break;\n    case kAudioUnitErr_PropertyNotWritable:\n        errorText = \"Audio Unit: PropertyNotWritable\";\n        result = paInternalError;\n        break;\n    case kAudioUnitErr_InvalidPropertyValue:\n        errorText = \"Audio Unit: Invalid Property Value\";\n        result = paInternalError;\n        break;\n    case kAudioUnitErr_PropertyNotInUse:\n        errorText = \"Audio Unit: Property Not In Use\";\n        result = paInternalError;\n        break;\n    case kAudioUnitErr_Initialized:\n        errorText = \"Audio Unit: Initialized\";\n        result = paInternalError;\n        break;\n    case kAudioUnitErr_InvalidOfflineRender:\n        errorText = \"Audio Unit: Invalid Offline Render\";\n        result = paInternalError;\n        break;\n    case kAudioUnitErr_Unauthorized:\n        errorText = \"Audio Unit: Unauthorized\";\n        result = paInternalError;\n        break;\n    case kAudioUnitErr_CannotDoInCurrentContext:\n        errorText = \"Audio Unit: cannot do in current context\";\n        result = paInternalError;\n        break;\n    default:\n        errorText = \"Unknown Error\";\n        result = paInternalError;\n    }\n\n    if (isError)\n        errorType = \"Error\";\n    else\n        errorType = \"Warning\";\n\n    char str[20];\n    // see if it appears to be a 4-char-code\n    *(UInt32 *)(str + 1) = CFSwapInt32HostToBig(error);\n    if (isprint(str[1]) && isprint(str[2]) && isprint(str[3]) && isprint(str[4]))\n    {\n        str[0] = str[5] = '\\'';\n        str[6] = '\\0';\n    } else {\n        // no, format it as an integer\n        sprintf(str, \"%d\", (int)error);\n    }\n\n    DBUG((\"%s on line %d: err='%s', msg=%s\\n\", errorType, line, str, errorText));\n\n    PaUtil_SetLastHostErrorInfo( paCoreAudio, error, errorText );\n\n    return result;\n}\n\n/*\n * This function computes an appropriate ring buffer size given\n * a requested latency (in seconds), sample rate and framesPerBuffer.\n *\n * The returned ringBufferSize is computed using the following\n * constraints:\n *   - it must be at least 4.\n *   - it must be at least 3x framesPerBuffer.\n *   - it must be at least 2x the suggestedLatency.\n *   - it must be a power of 2.\n * This function attempts to compute the minimum such size.\n *\n * FEEDBACK: too liberal/conservative/another way?\n */\nlong computeRingBufferSize( const PaStreamParameters *inputParameters,\n                            const PaStreamParameters *outputParameters,\n                            long inputFramesPerBuffer,\n                            long outputFramesPerBuffer,\n                            double sampleRate )\n{\n    long ringSize;\n    int index;\n    int i;\n    double latency ;\n    long framesPerBuffer ;\n\n    VVDBUG(( \"computeRingBufferSize()\\n\" ));\n\n    assert( inputParameters || outputParameters );\n\n    if( outputParameters && inputParameters )\n    {\n        latency = MAX( inputParameters->suggestedLatency, outputParameters->suggestedLatency );\n        framesPerBuffer = MAX( inputFramesPerBuffer, outputFramesPerBuffer );\n    }\n    else if( outputParameters )\n    {\n        latency = outputParameters->suggestedLatency;\n        framesPerBuffer = outputFramesPerBuffer ;\n    }\n    else /* we have inputParameters  */\n    {\n        latency = inputParameters->suggestedLatency;\n        framesPerBuffer = inputFramesPerBuffer ;\n    }\n\n    ringSize = (long) ( latency * sampleRate * 2 + .5);\n    VDBUG( ( \"suggested latency : %d\\n\", (int) (latency*sampleRate) ) );\n    if( ringSize < framesPerBuffer * 3 )\n        ringSize = framesPerBuffer * 3 ;\n    VDBUG((\"framesPerBuffer:%d\\n\",(int)framesPerBuffer));\n    VDBUG((\"Ringbuffer size (1): %d\\n\", (int)ringSize ));\n\n    /* make sure it's at least 4 */\n    ringSize = MAX( ringSize, 4 );\n\n    /* round up to the next power of 2 */\n    index = -1;\n    for( i=0; i<sizeof(long)*8; ++i )\n        if( ringSize >> i & 0x01 )\n            index = i;\n    assert( index > 0 );\n    if( ringSize <= ( 0x01 << index ) )\n        ringSize = 0x01 << index ;\n    else\n        ringSize = 0x01 << ( index + 1 );\n\n    VDBUG(( \"Final Ringbuffer size (2): %d\\n\", (int)ringSize ));\n    return ringSize;\n}\n\n\n/*\n * During testing of core audio, I found that serious crashes could occur\n * if properties such as sample rate were changed multiple times in rapid\n * succession. The function below could be used to with a condition variable.\n * to prevent propertychanges from happening until the last property\n * change is acknowledged. Instead, I implemented a busy-wait, which is simpler\n * to implement b/c in second round of testing (nov '09) property changes occurred\n * quickly and so there was no real way to test the condition variable implementation.\n * therefore, this function is not used, but it is aluded to in commented code below,\n * since it represents a theoretically better implementation.\n */\n\nOSStatus propertyProc(\n        AudioObjectID inObjectID,\n        UInt32 inNumberAddresses,\n        const AudioObjectPropertyAddress* inAddresses,\n        void* inClientData )\n{\n    // this is where we would set the condition variable\n    return noErr;\n}\n\n/* sets the value of the given property and waits for the change to\n   be acknowledged, and returns the final value, which is not guaranteed\n   by this function to be the same as the desired value. Obviously, this\n   function can only be used for data whose input and output are the\n   same size and format, and their size and format are known in advance.\n   whether or not the call succeeds, if the data is successfully read,\n   it is returned in outPropertyData. If it is not read successfully,\n   outPropertyData is zeroed, which may or may not be useful in\n   determining if the property was read. */\nPaError AudioDeviceSetPropertyNowAndWaitForChange(\n        AudioDeviceID inDevice,\n        UInt32 inChannel,\n        Boolean isInput,\n        AudioDevicePropertyID inPropertyID,\n        UInt32 inPropertyDataSize,\n        const void *inPropertyData,\n        void *outPropertyData )\n{\n    OSStatus macErr;\n    UInt32 outPropertyDataSize = inPropertyDataSize;\n\n    /* First, see if it already has that value. If so, return. */\n    macErr = PaMacCore_AudioDeviceGetProperty( inDevice, inChannel,\n                                               isInput, inPropertyID,\n                                               &outPropertyDataSize, outPropertyData );\n    if( macErr ) {\n        memset( outPropertyData, 0, inPropertyDataSize );\n        goto failMac;\n    }\n    if( inPropertyDataSize!=outPropertyDataSize )\n        return paInternalError;\n    if( 0==memcmp( outPropertyData, inPropertyData, outPropertyDataSize ) )\n        return paNoError;\n\n    /* Ideally, we'd use a condition variable to determine changes.\n       we could set that up here. */\n\n    /* If we were using a cond variable, we'd do something useful here,\n       but for now, this is just to make 10.6 happy. */\n    macErr = PaMacCore_AudioDeviceAddPropertyListener( inDevice, inChannel, isInput,\n                                                       inPropertyID, propertyProc,\n             NULL );\n    if( macErr )\n        /* we couldn't add a listener. */\n        goto failMac;\n\n    /* set property */\n    macErr = PaMacCore_AudioDeviceSetProperty( inDevice, NULL, inChannel,\n                                               isInput, inPropertyID,\n                                               inPropertyDataSize, inPropertyData );\n    if( macErr )\n        goto failMac;\n\n    /* busy-wait up to 30 seconds for the property to change */\n    /* busy-wait is justified here only because the correct alternative (condition variable)\n       was hard to test, since most of the waiting ended up being for setting rather than\n       getting in OS X 10.5. This was not the case in earlier OS versions. */\n    struct timeval tv1, tv2;\n    gettimeofday( &tv1, NULL );\n    memcpy( &tv2, &tv1, sizeof( struct timeval ) );\n    while( tv2.tv_sec - tv1.tv_sec < 30 ) {\n        /* now read the property back out */\n        macErr = PaMacCore_AudioDeviceGetProperty( inDevice, inChannel,\n                 isInput, inPropertyID,\n                 &outPropertyDataSize, outPropertyData );\n        if( macErr ) {\n            memset( outPropertyData, 0, inPropertyDataSize );\n            goto failMac;\n        }\n        /* and compare... */\n        if( 0==memcmp( outPropertyData, inPropertyData, outPropertyDataSize ) ) {\n            PaMacCore_AudioDeviceRemovePropertyListener( inDevice, inChannel, isInput, inPropertyID, propertyProc, NULL);\n            return paNoError;\n        }\n        /* No match yet, so let's sleep and try again. */\n        Pa_Sleep( 100 );\n        gettimeofday( &tv2, NULL );\n    }\n    DBUG( (\"Timeout waiting for device setting.\\n\" ) );\n\n    PaMacCore_AudioDeviceRemovePropertyListener( inDevice, inChannel, isInput, inPropertyID, propertyProc, NULL );\n    return paNoError;\n\nfailMac:\n    PaMacCore_AudioDeviceRemovePropertyListener( inDevice, inChannel, isInput, inPropertyID, propertyProc, NULL );\n    return ERR( macErr );\n}\n\n/*\n * Sets the sample rate the HAL device.\n * if requireExact: set the sample rate or fail.\n *\n * otherwise      : set the exact sample rate.\n *             If that fails, check for available sample rates, and choose one\n *             higher than the requested rate. If there isn't a higher one,\n *             just use the highest available.\n */\nPaError setBestSampleRateForDevice( const AudioDeviceID device,\n                                    const bool isOutput,\n                                    const bool requireExact,\n                                    const Float64 desiredSrate )\n{\n    const bool isInput = isOutput ? 0 : 1;\n    Float64 srate;\n    UInt32 propsize = sizeof( Float64 );\n    OSErr err;\n    AudioValueRange *ranges;\n    int i=0;\n    Float64 max  = -1; /*the maximum rate available*/\n    Float64 best = -1; /*the lowest sample rate still greater than desired rate*/\n    VDBUG((\"Setting sample rate for device %ld to %g.\\n\",(long)device,(float)desiredSrate));\n\n    /* -- try setting the sample rate -- */\n    srate = 0;\n    err = AudioDeviceSetPropertyNowAndWaitForChange(\n            device, 0, isInput,\n            kAudioDevicePropertyNominalSampleRate,\n            propsize, &desiredSrate, &srate );\n\n    /* -- if the rate agrees, and was changed, we are done -- */\n    if( srate != 0 && srate == desiredSrate )\n        return paNoError;\n    /* -- if the rate agrees, and we got no errors, we are done -- */\n    if( !err && srate == desiredSrate )\n        return paNoError;\n    /* -- we've failed if the rates disagree and we are setting input -- */\n    if( requireExact )\n        return paInvalidSampleRate;\n\n    /* -- generate a list of available sample rates -- */\n    err = PaMacCore_AudioDeviceGetPropertySize( device, 0, isInput,\n            kAudioDevicePropertyAvailableNominalSampleRates,\n            &propsize );\n    if( err )\n        return ERR( err );\n    ranges = (AudioValueRange *)calloc( 1, propsize );\n    if( !ranges )\n        return paInsufficientMemory;\n    err = PaMacCore_AudioDeviceGetProperty( device, 0, isInput,\n                                            kAudioDevicePropertyAvailableNominalSampleRates,\n                                            &propsize, ranges );\n    if( err )\n    {\n        free( ranges );\n        return ERR( err );\n    }\n    VDBUG((\"Requested sample rate of %g was not available.\\n\", (float)desiredSrate));\n    VDBUG((\"%lu Available Sample Rates are:\\n\",propsize/sizeof(AudioValueRange)));\n#ifdef MAC_CORE_VERBOSE_DEBUG\n    for( i=0; i<propsize/sizeof(AudioValueRange); ++i )\n        VDBUG( (\"\\t%g-%g\\n\",\n                (float) ranges[i].mMinimum,\n                (float) ranges[i].mMaximum ) );\n#endif\n    VDBUG((\"-----\\n\"));\n\n    /* -- now pick the best available sample rate -- */\n    for( i=0; i<propsize/sizeof(AudioValueRange); ++i )\n    {\n        if( ranges[i].mMaximum > max ) max = ranges[i].mMaximum;\n        if( ranges[i].mMinimum > desiredSrate ) {\n            if( best < 0 )\n                best = ranges[i].mMinimum;\n            else if( ranges[i].mMinimum < best )\n                best = ranges[i].mMinimum;\n        }\n    }\n    if( best < 0 )\n        best = max;\n    VDBUG( (\"Maximum Rate %g. best is %g.\\n\", max, best ) );\n    free( ranges );\n\n    /* -- set the sample rate -- */\n    propsize = sizeof( best );\n    srate = 0;\n    err = AudioDeviceSetPropertyNowAndWaitForChange(\n            device, 0, isInput,\n            kAudioDevicePropertyNominalSampleRate,\n            propsize, &best, &srate );\n\n    /* -- if the set rate matches, we are done -- */\n    if( srate != 0 && srate == best )\n        return paNoError;\n\n    if( err )\n        return ERR( err );\n\n    /* -- otherwise, something weird happened: we didn't set the rate, and we got no errors. Just bail. */\n    return paInternalError;\n}\n\n\n/*\n   Attempts to set the requestedFramesPerBuffer. If it can't set the exact\n   value, it settles for something smaller if available. If nothing smaller\n   is available, it uses the smallest available size.\n   actualFramesPerBuffer will be set to the actual value on successful return.\n   OK to pass NULL to actualFramesPerBuffer.\n   The logic is very similar too setBestSampleRate only failure here is\n   not usually catastrophic.\n*/\nPaError setBestFramesPerBuffer( const AudioDeviceID device,\n                                const bool isOutput,\n                                UInt32 requestedFramesPerBuffer,\n                                UInt32 *actualFramesPerBuffer )\n{\n    UInt32 afpb;\n    const bool isInput = !isOutput;\n    UInt32 propsize = sizeof(UInt32);\n    OSErr err;\n    AudioValueRange range;\n\n    if( actualFramesPerBuffer == NULL )\n    {\n        actualFramesPerBuffer = &afpb;\n    }\n\n    /* -- try and set exact FPB -- */\n    err = PaMacCore_AudioDeviceSetProperty( device, NULL, 0, isInput,\n                                            kAudioDevicePropertyBufferFrameSize,\n                                            propsize, &requestedFramesPerBuffer);\n    err = PaMacCore_AudioDeviceGetProperty( device, 0, isInput,\n                                            kAudioDevicePropertyBufferFrameSize,\n                                            &propsize, actualFramesPerBuffer);\n    if( err )\n    {\n        return ERR( err );\n    }\n    // Did we get the size we asked for?\n    if( *actualFramesPerBuffer == requestedFramesPerBuffer )\n    {\n        return paNoError; /* we are done */\n    }\n\n    // Clip requested value against legal range for the device.\n    propsize = sizeof(AudioValueRange);\n    err = PaMacCore_AudioDeviceGetProperty( device, 0, isInput,\n                                            kAudioDevicePropertyBufferFrameSizeRange,\n                                            &propsize, &range );\n    if( err )\n    {\n        return ERR( err );\n    }\n    if( requestedFramesPerBuffer < range.mMinimum )\n    {\n        requestedFramesPerBuffer = range.mMinimum;\n    }\n    else if( requestedFramesPerBuffer > range.mMaximum )\n    {\n        requestedFramesPerBuffer = range.mMaximum;\n    }\n\n    /* --- set the buffer size (ignore errors) -- */\n    propsize = sizeof( UInt32 );\n    err = PaMacCore_AudioDeviceSetProperty( device, NULL, 0, isInput,\n                                            kAudioDevicePropertyBufferFrameSize,\n                                            propsize, &requestedFramesPerBuffer );\n    /* --- read the property to check that it was set -- */\n    err = PaMacCore_AudioDeviceGetProperty( device, 0, isInput,\n                                            kAudioDevicePropertyBufferFrameSize,\n                                            &propsize, actualFramesPerBuffer );\n\n    if( err )\n        return ERR( err );\n\n    return paNoError;\n}\n\n/**********************\n *\n * XRun stuff\n *\n **********************/\n\nstruct PaMacXRunListNode_s {\n    PaMacCoreStream *stream;\n    struct PaMacXRunListNode_s *next;\n} ;\n\ntypedef struct PaMacXRunListNode_s PaMacXRunListNode;\n\n/** Always empty, so that it can always be the one returned by\n    addToXRunListenerList. note that it's not a pointer. */\nstatic PaMacXRunListNode firstXRunListNode;\nstatic int xRunListSize;\nstatic pthread_mutex_t xrunMutex;\n\nOSStatus xrunCallback(\n    AudioObjectID inDevice,\n    UInt32 inNumberAddresses,\n    const AudioObjectPropertyAddress* inAddresses,\n    void * inClientData)\n{\n    PaMacXRunListNode *node = (PaMacXRunListNode *) inClientData;\n    bool isInput = inAddresses->mScope == kAudioDevicePropertyScopeInput;\n\n    int ret = pthread_mutex_trylock( &xrunMutex ) ;\n\n    if( ret == 0 ) {\n\n        node = node->next ; //skip the first node\n\n        for( ; node; node=node->next ) {\n            PaMacCoreStream *stream = node->stream;\n\n            if( stream->state != ACTIVE )\n                continue; //if the stream isn't active, we don't care if the device is dropping\n\n            if( isInput ) {\n                if( stream->inputDevice == inDevice )\n                    OSAtomicOr32( paInputOverflow, &stream->xrunFlags );\n            } else {\n                if( stream->outputDevice == inDevice )\n                    OSAtomicOr32( paOutputUnderflow, &stream->xrunFlags );\n            }\n        }\n\n        pthread_mutex_unlock( &xrunMutex );\n    }\n\n    return 0;\n}\n\nint initializeXRunListenerList( void )\n{\n    xRunListSize = 0;\n    bzero( (void *) &firstXRunListNode, sizeof(firstXRunListNode) );\n    return pthread_mutex_init( &xrunMutex, NULL );\n}\nint destroyXRunListenerList( void )\n{\n    PaMacXRunListNode *node;\n    node = firstXRunListNode.next;\n    while( node ) {\n        PaMacXRunListNode *tmp = node;\n        node = node->next;\n        free( tmp );\n    }\n    xRunListSize = 0;\n    return pthread_mutex_destroy( &xrunMutex );\n}\n\nvoid *addToXRunListenerList( void *stream )\n{\n    pthread_mutex_lock( &xrunMutex );\n    PaMacXRunListNode *newNode;\n    // setup new node:\n    newNode = (PaMacXRunListNode *) malloc( sizeof( PaMacXRunListNode ) );\n    newNode->stream = (PaMacCoreStream *) stream;\n    newNode->next = firstXRunListNode.next;\n    // insert:\n    firstXRunListNode.next = newNode;\n    pthread_mutex_unlock( &xrunMutex );\n\n    return &firstXRunListNode;\n}\n\nint removeFromXRunListenerList( void *stream )\n{\n    pthread_mutex_lock( &xrunMutex );\n    PaMacXRunListNode *node, *prev;\n    prev = &firstXRunListNode;\n    node = firstXRunListNode.next;\n    while( node ) {\n        if( node->stream == stream ) {\n            //found it:\n            --xRunListSize;\n            prev->next = node->next;\n            free( node );\n            pthread_mutex_unlock( &xrunMutex );\n            return xRunListSize;\n        }\n        prev = prev->next;\n        node = node->next;\n    }\n\n    pthread_mutex_unlock( &xrunMutex );\n    // failure\n    return xRunListSize;\n}\n"
  },
  {
    "path": "thirdparty/portaudio/src/hostapi/coreaudio/pa_mac_core_utilities.h",
    "content": "/*\n * Helper and utility functions for pa_mac_core.c (Apple AUHAL implementation)\n *\n * PortAudio Portable Real-Time Audio Library\n * Latest Version at: http://www.portaudio.com\n *\n * Written by Bjorn Roche of XO Audio LLC, from PA skeleton code.\n * Portions copied from code by Dominic Mazzoni (who wrote a HAL implementation)\n *\n * Dominic's code was based on code by Phil Burk, Darren Gibbs,\n * Gord Peters, Stephane Letz, and Greg Pfiel.\n *\n * The following people also deserve acknowledgements:\n *\n * Olivier Tristan for feedback and testing\n * Glenn Zelniker and Z-Systems engineering for sponsoring the Blocking I/O\n * interface.\n *\n *\n * Based on the Open Source API proposed by Ross Bencina\n * Copyright (c) 1999-2002 Ross Bencina, Phil Burk\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n/**\n @file\n @ingroup hostapi_src\n*/\n\n#ifndef PA_MAC_CORE_UTILITIES_H__\n#define PA_MAC_CORE_UTILITIES_H__\n\n#include <pthread.h>\n#include \"portaudio.h\"\n#include \"pa_util.h\"\n#include <AudioUnit/AudioUnit.h>\n#include <AudioToolbox/AudioToolbox.h>\n\n#ifndef MIN\n#define MIN(a, b)  (((a)<(b))?(a):(b))\n#endif\n\n#ifndef MAX\n#define MAX(a, b)  (((a)<(b))?(b):(a))\n#endif\n\n#define ERR(mac_error) PaMacCore_SetError(mac_error, __LINE__, 1 )\n#define WARNING(mac_error) PaMacCore_SetError(mac_error, __LINE__, 0 )\n\n\n/* Help keep track of AUHAL element numbers */\n#define INPUT_ELEMENT  (1)\n#define OUTPUT_ELEMENT (0)\n\n/* Normal level of debugging: fine for most apps that don't mind the occasional warning being printf'ed */\n/*\n */\n#define MAC_CORE_DEBUG\n#ifdef MAC_CORE_DEBUG\n# define DBUG(MSG) do { printf(\"||PaMacCore (AUHAL)|| \"); printf MSG ; fflush(stdout); } while(0)\n#else\n# define DBUG(MSG)\n#endif\n\n/* Verbose Debugging: useful for development */\n/*\n#define MAC_CORE_VERBOSE_DEBUG\n*/\n#ifdef MAC_CORE_VERBOSE_DEBUG\n# define VDBUG(MSG) do { printf(\"||PaMacCore (v )|| \"); printf MSG ; fflush(stdout); } while(0)\n#else\n# define VDBUG(MSG)\n#endif\n\n/* Very Verbose Debugging: Traces every call. */\n/*\n#define MAC_CORE_VERY_VERBOSE_DEBUG\n */\n#ifdef MAC_CORE_VERY_VERBOSE_DEBUG\n# define VVDBUG(MSG) do { printf(\"||PaMacCore (vv)|| \"); printf MSG ; fflush(stdout); } while(0)\n#else\n# define VVDBUG(MSG)\n#endif\n\nOSStatus PaMacCore_AudioHardwareGetProperty(\n    AudioHardwarePropertyID inPropertyID,\n    UInt32*                 ioPropertyDataSize,\n    void*                   outPropertyData );\n\nOSStatus PaMacCore_AudioHardwareGetPropertySize(\n    AudioHardwarePropertyID inPropertyID,\n    UInt32*                 outSize );\n\nOSStatus PaMacCore_AudioDeviceGetProperty(\n    AudioDeviceID         inDevice,\n    UInt32                inChannel,\n    Boolean               isInput,\n    AudioDevicePropertyID inPropertyID,\n    UInt32*               ioPropertyDataSize,\n    void*                 outPropertyData );\n\nOSStatus PaMacCore_AudioDeviceSetProperty(\n    AudioDeviceID         inDevice,\n    const AudioTimeStamp* inWhen,\n    UInt32                inChannel,\n    Boolean               isInput,\n    AudioDevicePropertyID inPropertyID,\n    UInt32                inPropertyDataSize,\n    const void*           inPropertyData );\n\nOSStatus PaMacCore_AudioDeviceGetPropertySize(\n    AudioDeviceID         inDevice,\n    UInt32                inChannel,\n    Boolean               isInput,\n    AudioDevicePropertyID inPropertyID,\n    UInt32*               outSize );\n\nOSStatus PaMacCore_AudioDeviceAddPropertyListener(\n    AudioDeviceID                   inDevice,\n    UInt32                          inChannel,\n    Boolean                         isInput,\n    AudioDevicePropertyID           inPropertyID,\n    AudioObjectPropertyListenerProc inProc,\n    void*                           inClientData );\n\nOSStatus PaMacCore_AudioDeviceRemovePropertyListener(\n    AudioDeviceID                   inDevice,\n    UInt32                          inChannel,\n    Boolean                         isInput,\n    AudioDevicePropertyID           inPropertyID,\n    AudioObjectPropertyListenerProc inProc,\n    void*                           inClientData );\n\nOSStatus PaMacCore_AudioStreamGetProperty(\n    AudioStreamID         inStream,\n    UInt32                inChannel,\n    AudioDevicePropertyID inPropertyID,\n    UInt32*               ioPropertyDataSize,\n    void*                 outPropertyData );\n\n#define UNIX_ERR(err) PaMacCore_SetUnixError( err, __LINE__ )\n\nPaError PaMacCore_SetUnixError( int err, int line );\n\n/*\n * Translates MacOS generated errors into PaErrors\n */\nPaError PaMacCore_SetError(OSStatus error, int line, int isError);\n\n/*\n * This function computes an appropriate ring buffer size given\n * a requested latency (in seconds), sample rate and framesPerBuffer.\n *\n * The returned ringBufferSize is computed using the following\n * constraints:\n *   - it must be at least 4.\n *   - it must be at least 3x framesPerBuffer.\n *   - it must be at least 2x the suggestedLatency.\n *   - it must be a power of 2.\n * This function attempts to compute the minimum such size.\n *\n */\nlong computeRingBufferSize( const PaStreamParameters *inputParameters,\n                            const PaStreamParameters *outputParameters,\n                            long inputFramesPerBuffer,\n                            long outputFramesPerBuffer,\n                            double sampleRate );\n\nOSStatus propertyProc(\n        AudioObjectID inObjectID,\n        UInt32 inNumberAddresses,\n        const AudioObjectPropertyAddress* inAddresses,\n        void* inClientData );\n\n/* sets the value of the given property and waits for the change to\n   be acknowledged, and returns the final value, which is not guaranteed\n   by this function to be the same as the desired value. Obviously, this\n   function can only be used for data whose input and output are the\n   same size and format, and their size and format are known in advance.*/\nPaError AudioDeviceSetPropertyNowAndWaitForChange(\n        AudioDeviceID inDevice,\n        UInt32 inChannel,\n        Boolean isInput,\n        AudioDevicePropertyID inPropertyID,\n        UInt32 inPropertyDataSize,\n        const void *inPropertyData,\n        void *outPropertyData );\n\n/*\n * Sets the sample rate the HAL device.\n * if requireExact: set the sample rate or fail.\n *\n * otherwise      : set the exact sample rate.\n *             If that fails, check for available sample rates, and choose one\n *             higher than the requested rate. If there isn't a higher one,\n *             just use the highest available.\n */\nPaError setBestSampleRateForDevice( const AudioDeviceID device,\n                                    const bool isOutput,\n                                    const bool requireExact,\n                                    const Float64 desiredSrate );\n/*\n   Attempts to set the requestedFramesPerBuffer. If it can't set the exact\n   value, it settles for something smaller if available. If nothing smaller\n   is available, it uses the smallest available size.\n   actualFramesPerBuffer will be set to the actual value on successful return.\n   OK to pass NULL to actualFramesPerBuffer.\n   The logic is very similar too setBestSampleRate only failure here is\n   not usually catastrophic.\n*/\nPaError setBestFramesPerBuffer( const AudioDeviceID device,\n                                const bool isOutput,\n                                UInt32 requestedFramesPerBuffer,\n                                UInt32 *actualFramesPerBuffer );\n\n\n/*********************\n *\n *  xrun handling\n *\n *********************/\n\nOSStatus xrunCallback(\n        AudioObjectID inObjectID,\n        UInt32 inNumberAddresses,\n        const AudioObjectPropertyAddress* inAddresses,\n        void * inClientData );\n\n/** returns zero on success or a unix style error code. */\nint initializeXRunListenerList( void );\n/** returns zero on success or a unix style error code. */\nint destroyXRunListenerList( void );\n\n/**Returns the list, so that it can be passed to CorAudio.*/\nvoid *addToXRunListenerList( void *stream );\n/**Returns the number of Listeners in the list remaining.*/\nint removeFromXRunListenerList( void *stream );\n\n#endif /* PA_MAC_CORE_UTILITIES_H__*/\n"
  },
  {
    "path": "thirdparty/portaudio/src/hostapi/dsound/pa_win_ds.c",
    "content": "/*\n * $Id$\n * Portable Audio I/O Library DirectSound implementation\n *\n * Authors: Phil Burk, Robert Marsanyi & Ross Bencina\n * Based on the Open Source API proposed by Ross Bencina\n * Copyright (c) 1999-2007 Ross Bencina, Phil Burk, Robert Marsanyi\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n/** @file\n @ingroup hostapi_src\n*/\n\n/* Until May 2011 PA/DS has used a multimedia timer to perform the callback.\n   We're replacing this with a new implementation using a thread and a different timer mechanism.\n   Defining PA_WIN_DS_USE_WMME_TIMER uses the old (pre-May 2011) behavior.\n*/\n//#define PA_WIN_DS_USE_WMME_TIMER\n\n#include <assert.h>\n#include <stdio.h>\n#include <string.h> /* strlen() */\n\n#define _WIN32_WINNT 0x0400 /* required to get waitable timer APIs */\n#include <initguid.h> /* make sure ds guids get defined */\n#include <windows.h>\n#include <objbase.h>\n\n\n/*\n  Use the earliest version of DX required, no need to pollute the namespace\n*/\n#ifdef PAWIN_USE_DIRECTSOUNDFULLDUPLEXCREATE\n#define DIRECTSOUND_VERSION 0x0800\n#else\n#define DIRECTSOUND_VERSION 0x0300\n#endif\n#include <dsound.h>\n#ifdef PAWIN_USE_WDMKS_DEVICE_INFO\n#include <dsconf.h>\n#endif /* PAWIN_USE_WDMKS_DEVICE_INFO */\n#ifndef PA_WIN_DS_USE_WMME_TIMER\n#ifndef UNDER_CE\n#include <process.h>\n#endif\n#endif\n\n#include \"pa_util.h\"\n#include \"pa_allocation.h\"\n#include \"pa_hostapi.h\"\n#include \"pa_stream.h\"\n#include \"pa_cpuload.h\"\n#include \"pa_process.h\"\n#include \"pa_debugprint.h\"\n\n#include \"pa_win_ds.h\"\n#include \"pa_win_ds_dynlink.h\"\n#include \"pa_win_waveformat.h\"\n#include \"pa_win_wdmks_utils.h\"\n#include \"pa_win_coinitialize.h\"\n\n#if (defined(WIN32) && (defined(_MSC_VER) && (_MSC_VER >= 1200))) /* MSC version 6 and above */\n#pragma comment( lib, \"dsound.lib\" )\n#pragma comment( lib, \"winmm.lib\" )\n#pragma comment( lib, \"kernel32.lib\" )\n#endif\n\n/* use CreateThread for CYGWIN, _beginthreadex for all others */\n#ifndef PA_WIN_DS_USE_WMME_TIMER\n\n#if !defined(__CYGWIN__) && !defined(UNDER_CE)\n#define CREATE_THREAD (HANDLE)_beginthreadex\n#undef CLOSE_THREAD_HANDLE /* as per documentation we don't call CloseHandle on a thread created with _beginthreadex */\n#define PA_THREAD_FUNC static unsigned WINAPI\n#define PA_THREAD_ID unsigned\n#else\n#define CREATE_THREAD CreateThread\n#define CLOSE_THREAD_HANDLE CloseHandle\n#define PA_THREAD_FUNC static DWORD WINAPI\n#define PA_THREAD_ID DWORD\n#endif\n\n#if (defined(UNDER_CE))\n#pragma comment(lib, \"Coredll.lib\")\n#elif (defined(WIN32) && (defined(_MSC_VER) && (_MSC_VER >= 1200))) /* MSC version 6 and above */\n#pragma comment(lib, \"winmm.lib\")\n#endif\n\nPA_THREAD_FUNC ProcessingThreadProc( void *pArg );\n\n#if !defined(UNDER_CE)\n#define PA_WIN_DS_USE_WAITABLE_TIMER_OBJECT /* use waitable timer where possible, otherwise we use a WaitForSingleObject timeout */\n#endif\n\n#endif /* !PA_WIN_DS_USE_WMME_TIMER */\n\n\n/*\n provided in newer platform sdks and x64\n */\n#ifndef DWORD_PTR\n    #if defined(_WIN64)\n        #define DWORD_PTR unsigned __int64\n    #else\n        #define DWORD_PTR unsigned long\n    #endif\n#endif\n\n#define PRINT(x) PA_DEBUG(x);\n#define ERR_RPT(x) PRINT(x)\n#define DBUG(x)   PRINT(x)\n#define DBUGX(x)  PRINT(x)\n\n#define PA_USE_HIGH_LATENCY   (0)\n#if PA_USE_HIGH_LATENCY\n#define PA_DS_WIN_9X_DEFAULT_LATENCY_     (.500)\n#define PA_DS_WIN_NT_DEFAULT_LATENCY_     (.600)\n#else\n#define PA_DS_WIN_9X_DEFAULT_LATENCY_     (.140)\n#define PA_DS_WIN_NT_DEFAULT_LATENCY_     (.280)\n#endif\n\n#define PA_DS_WIN_WDM_DEFAULT_LATENCY_    (.120)\n\n/* we allow the polling period to range between 1 and 100ms.\n   prior to August 2011 we limited the minimum polling period to 10ms.\n*/\n#define PA_DS_MINIMUM_POLLING_PERIOD_SECONDS    (0.001) /* 1ms */\n#define PA_DS_MAXIMUM_POLLING_PERIOD_SECONDS    (0.100) /* 100ms */\n#define PA_DS_POLLING_JITTER_SECONDS            (0.001) /* 1ms */\n\n#define SECONDS_PER_MSEC      (0.001)\n#define MSECS_PER_SECOND       (1000)\n\n/* prototypes for functions declared in this file */\n\n#ifdef __cplusplus\nextern \"C\"\n{\n#endif /* __cplusplus */\n\nPaError PaWinDs_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index );\n\n#ifdef __cplusplus\n}\n#endif /* __cplusplus */\n\nstatic void Terminate( struct PaUtilHostApiRepresentation *hostApi );\nstatic PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,\n                           PaStream** s,\n                           const PaStreamParameters *inputParameters,\n                           const PaStreamParameters *outputParameters,\n                           double sampleRate,\n                           unsigned long framesPerBuffer,\n                           PaStreamFlags streamFlags,\n                           PaStreamCallback *streamCallback,\n                           void *userData );\nstatic PaError IsFormatSupported( struct PaUtilHostApiRepresentation *hostApi,\n                                  const PaStreamParameters *inputParameters,\n                                  const PaStreamParameters *outputParameters,\n                                  double sampleRate );\nstatic PaError CloseStream( PaStream* stream );\nstatic PaError StartStream( PaStream *stream );\nstatic PaError StopStream( PaStream *stream );\nstatic PaError AbortStream( PaStream *stream );\nstatic PaError IsStreamStopped( PaStream *s );\nstatic PaError IsStreamActive( PaStream *stream );\nstatic PaTime GetStreamTime( PaStream *stream );\nstatic double GetStreamCpuLoad( PaStream* stream );\nstatic PaError ReadStream( PaStream* stream, void *buffer, unsigned long frames );\nstatic PaError WriteStream( PaStream* stream, const void *buffer, unsigned long frames );\nstatic signed long GetStreamReadAvailable( PaStream* stream );\nstatic signed long GetStreamWriteAvailable( PaStream* stream );\n\n\n/* FIXME: should convert hr to a string */\n#define PA_DS_SET_LAST_DIRECTSOUND_ERROR( hr ) \\\n    PaUtil_SetLastHostErrorInfo( paDirectSound, hr, \"DirectSound error\" )\n\n/************************************************* DX Prototypes **********/\nstatic BOOL CALLBACK CollectGUIDsProcW(LPGUID lpGUID,\n                                     LPCWSTR lpszDesc,\n                                     LPCWSTR lpszDrvName,\n                                     LPVOID lpContext );\n\n/************************************************************************************/\n/********************** Structures **************************************************/\n/************************************************************************************/\n/* PaWinDsHostApiRepresentation - host api datastructure specific to this implementation */\n\ntypedef struct PaWinDsDeviceInfo\n{\n    PaDeviceInfo        inheritedDeviceInfo;\n    GUID                guid;\n    GUID                *lpGUID;\n    double              sampleRates[3];\n    char deviceInputChannelCountIsKnown; /**<< if the system returns 0xFFFF then we don't really know the number of supported channels (1=>known, 0=>unknown)*/\n    char deviceOutputChannelCountIsKnown; /**<< if the system returns 0xFFFF then we don't really know the number of supported channels (1=>known, 0=>unknown)*/\n} PaWinDsDeviceInfo;\n\ntypedef struct\n{\n    PaUtilHostApiRepresentation inheritedHostApiRep;\n    PaUtilStreamInterface    callbackStreamInterface;\n    PaUtilStreamInterface    blockingStreamInterface;\n\n    PaUtilAllocationGroup   *allocations;\n\n    /* implementation specific data goes here */\n\n    PaWinUtilComInitializationResult comInitializationResult;\n\n} PaWinDsHostApiRepresentation;\n\n\n/* PaWinDsStream - a stream data structure specifically for this implementation */\n\ntypedef struct PaWinDsStream\n{\n    PaUtilStreamRepresentation streamRepresentation;\n    PaUtilCpuLoadMeasurer cpuLoadMeasurer;\n    PaUtilBufferProcessor bufferProcessor;\n\n/* DirectSound specific data. */\n#ifdef PAWIN_USE_DIRECTSOUNDFULLDUPLEXCREATE\n    LPDIRECTSOUNDFULLDUPLEX8 pDirectSoundFullDuplex8;\n#endif\n\n/* Output */\n    LPDIRECTSOUND        pDirectSound;\n    LPDIRECTSOUNDBUFFER  pDirectSoundPrimaryBuffer;\n    LPDIRECTSOUNDBUFFER  pDirectSoundOutputBuffer;\n    DWORD                outputBufferWriteOffsetBytes;     /* last write position */\n    INT                  outputBufferSizeBytes;\n    INT                  outputFrameSizeBytes;\n    /* Try to detect play buffer underflows. */\n    LARGE_INTEGER        perfCounterTicksPerBuffer; /* counter ticks it should take to play a full buffer */\n    LARGE_INTEGER        previousPlayTime;\n    DWORD                previousPlayCursor;\n    UINT                 outputUnderflowCount;\n    BOOL                 outputIsRunning;\n    INT                  finalZeroBytesWritten; /* used to determine when we've flushed the whole buffer */\n\n/* Input */\n    LPDIRECTSOUNDCAPTURE pDirectSoundCapture;\n    LPDIRECTSOUNDCAPTUREBUFFER   pDirectSoundInputBuffer;\n    INT                  inputFrameSizeBytes;\n    UINT                 readOffset;      /* last read position */\n    UINT                 inputBufferSizeBytes;\n\n\n    int              hostBufferSizeFrames; /* input and output host ringbuffers have the same number of frames */\n    double           framesWritten;\n    double           secondsPerHostByte; /* Used to optimize latency calculation for outTime */\n    double           pollingPeriodSeconds;\n\n    PaStreamCallbackFlags callbackFlags;\n\n    PaStreamFlags    streamFlags;\n    int              callbackResult;\n    HANDLE           processingCompleted;\n\n/* FIXME - move all below to PaUtilStreamRepresentation */\n    volatile int     isStarted;\n    volatile int     isActive;\n    volatile int     stopProcessing; /* stop thread once existing buffers have been returned */\n    volatile int     abortProcessing; /* stop thread immediately */\n\n    UINT             systemTimerResolutionPeriodMs; /* set to 0 if we were unable to set the timer period */\n\n#ifdef PA_WIN_DS_USE_WMME_TIMER\n    MMRESULT         timerID;\n#else\n\n#ifdef PA_WIN_DS_USE_WAITABLE_TIMER_OBJECT\n    HANDLE           waitableTimer;\n#endif\n    HANDLE           processingThread;\n    PA_THREAD_ID     processingThreadId;\n    HANDLE           processingThreadCompleted;\n#endif\n\n} PaWinDsStream;\n\n\n/* Set minimal latency based on the current OS version.\n * NT has higher latency.\n */\nstatic double PaWinDS_GetMinSystemLatencySeconds( void )\n{\n/*\nNOTE: GetVersionEx() is deprecated as of Windows 8.1 and can not be used to reliably detect\nversions of Windows higher than Windows 8 (due to manifest requirements for reporting higher versions).\nMicrosoft recommends switching to VerifyVersionInfo (available on Win 2k and later), however GetVersionEx\nis faster, for now we just disable the deprecation warning.\nSee: https://msdn.microsoft.com/en-us/library/windows/desktop/ms724451(v=vs.85).aspx\nSee: http://www.codeproject.com/Articles/678606/Part-Overcoming-Windows-s-deprecation-of-GetVe\n*/\n#pragma warning (disable : 4996) /* use of GetVersionEx */\n\n    double minLatencySeconds;\n    /* Set minimal latency based on whether NT or other OS.\n     * NT has higher latency.\n     */\n\n    OSVERSIONINFO osvi;\n    osvi.dwOSVersionInfoSize = sizeof( osvi );\n    GetVersionEx( &osvi );\n    DBUG((\"PA - PlatformId = 0x%x\\n\", osvi.dwPlatformId ));\n    DBUG((\"PA - MajorVersion = 0x%x\\n\", osvi.dwMajorVersion ));\n    DBUG((\"PA - MinorVersion = 0x%x\\n\", osvi.dwMinorVersion ));\n    /* Check for NT */\n    if( (osvi.dwMajorVersion == 4) && (osvi.dwPlatformId == 2) )\n    {\n        minLatencySeconds = PA_DS_WIN_NT_DEFAULT_LATENCY_;\n    }\n    else if(osvi.dwMajorVersion >= 5)\n    {\n        minLatencySeconds = PA_DS_WIN_WDM_DEFAULT_LATENCY_;\n    }\n    else\n    {\n        minLatencySeconds = PA_DS_WIN_9X_DEFAULT_LATENCY_;\n    }\n    return minLatencySeconds;\n\n#pragma warning (default : 4996)\n}\n\n\n/*************************************************************************\n** Return minimum workable latency required for this host. This is returned\n** As the default stream latency in PaDeviceInfo.\n** Latency can be optionally set by user by setting an environment variable.\n** For example, to set latency to 200 msec, put:\n**\n**    set PA_MIN_LATENCY_MSEC=200\n**\n** in the AUTOEXEC.BAT file and reboot.\n** If the environment variable is not set, then the latency will be determined\n** based on the OS. Windows NT has higher latency than Win95.\n*/\n#define PA_LATENCY_ENV_NAME  (\"PA_MIN_LATENCY_MSEC\")\n#define PA_ENV_BUF_SIZE  (32)\n\nstatic double PaWinDs_GetMinLatencySeconds( double sampleRate )\n{\n    char      envbuf[PA_ENV_BUF_SIZE];\n    DWORD     hresult;\n    double    minLatencySeconds = 0;\n\n    /* Let user determine minimal latency by setting environment variable. */\n    hresult = GetEnvironmentVariableA( PA_LATENCY_ENV_NAME, envbuf, PA_ENV_BUF_SIZE );\n    if( (hresult > 0) && (hresult < PA_ENV_BUF_SIZE) )\n    {\n        minLatencySeconds = atoi( envbuf ) * SECONDS_PER_MSEC;\n    }\n    else\n    {\n        minLatencySeconds = PaWinDS_GetMinSystemLatencySeconds();\n#if PA_USE_HIGH_LATENCY\n        PRINT((\"PA - Minimum Latency set to %f msec!\\n\", minLatencySeconds * MSECS_PER_SECOND ));\n#endif\n    }\n\n    return minLatencySeconds;\n}\n\n\n/************************************************************************************\n** Duplicate and convert the input string using the group allocations allocator.\n** A NULL string is converted to a zero length string.\n** If memory cannot be allocated, NULL is returned.\n**/\nstatic char *DuplicateDeviceNameString( PaUtilAllocationGroup *allocations, const wchar_t* src )\n{\n    char *result = 0;\n\n    if( src != NULL )\n    {\n        size_t len = WideCharToMultiByte(CP_UTF8, 0, src, -1, NULL, 0, NULL, NULL);\n\n        result = (char*)PaUtil_GroupAllocateMemory( allocations, (long)(len + 1) );\n        if( result ) {\n            if (WideCharToMultiByte(CP_UTF8, 0, src, -1, result, (int)len, NULL, NULL) == 0) {\n                result = 0;\n            }\n        }\n    }\n    else\n    {\n        result = (char*)PaUtil_GroupAllocateMemory( allocations, 1 );\n        if( result )\n            result[0] = '\\0';\n    }\n\n    return result;\n}\n\n/************************************************************************************\n** DSDeviceNameAndGUID, DSDeviceNameAndGUIDVector used for collecting preliminary\n** information during device enumeration.\n*/\ntypedef struct DSDeviceNameAndGUID{\n    char *name; // allocated from parent's allocations, never deleted by this structure\n    GUID guid;\n    LPGUID lpGUID;\n    void *pnpInterface;  // wchar_t* interface path, allocated using the DS host api's allocation group\n} DSDeviceNameAndGUID;\n\ntypedef struct DSDeviceNameAndGUIDVector{\n    PaUtilAllocationGroup *allocations;\n    PaError enumerationError;\n\n    int count;\n    int free;\n    DSDeviceNameAndGUID *items; // Allocated using LocalAlloc()\n} DSDeviceNameAndGUIDVector;\n\ntypedef struct DSDeviceNamesAndGUIDs{\n    PaWinDsHostApiRepresentation *winDsHostApi;\n    DSDeviceNameAndGUIDVector inputNamesAndGUIDs;\n    DSDeviceNameAndGUIDVector outputNamesAndGUIDs;\n} DSDeviceNamesAndGUIDs;\n\nstatic PaError InitializeDSDeviceNameAndGUIDVector(\n        DSDeviceNameAndGUIDVector *guidVector, PaUtilAllocationGroup *allocations )\n{\n    PaError result = paNoError;\n\n    guidVector->allocations = allocations;\n    guidVector->enumerationError = paNoError;\n\n    guidVector->count = 0;\n    guidVector->free = 8;\n    guidVector->items = (DSDeviceNameAndGUID*)LocalAlloc( LMEM_FIXED, sizeof(DSDeviceNameAndGUID) * guidVector->free );\n    if( guidVector->items == NULL )\n        result = paInsufficientMemory;\n\n    return result;\n}\n\nstatic PaError ExpandDSDeviceNameAndGUIDVector( DSDeviceNameAndGUIDVector *guidVector )\n{\n    PaError result = paNoError;\n    DSDeviceNameAndGUID *newItems;\n    int i;\n\n    /* double size of vector */\n    int size = guidVector->count + guidVector->free;\n    guidVector->free += size;\n\n    newItems = (DSDeviceNameAndGUID*)LocalAlloc( LMEM_FIXED, sizeof(DSDeviceNameAndGUID) * size * 2 );\n    if( newItems == NULL )\n    {\n        result = paInsufficientMemory;\n    }\n    else\n    {\n        for( i=0; i < guidVector->count; ++i )\n        {\n            newItems[i].name = guidVector->items[i].name;\n            if( guidVector->items[i].lpGUID == NULL )\n            {\n                newItems[i].lpGUID = NULL;\n            }\n            else\n            {\n                newItems[i].lpGUID = &newItems[i].guid;\n                memcpy( &newItems[i].guid, guidVector->items[i].lpGUID, sizeof(GUID) );\n            }\n            newItems[i].pnpInterface = guidVector->items[i].pnpInterface;\n        }\n\n        LocalFree( guidVector->items );\n        guidVector->items = newItems;\n    }\n\n    return result;\n}\n\n/*\n    it's safe to call DSDeviceNameAndGUIDVector multiple times\n*/\nstatic PaError TerminateDSDeviceNameAndGUIDVector( DSDeviceNameAndGUIDVector *guidVector )\n{\n    PaError result = paNoError;\n\n    if( guidVector->items != NULL )\n    {\n        if( LocalFree( guidVector->items ) != NULL )\n            result = paInsufficientMemory;              /** @todo this isn't the correct error to return from a deallocation failure */\n\n        guidVector->items = NULL;\n    }\n\n    return result;\n}\n\n/************************************************************************************\n** Collect preliminary device information during DirectSound enumeration\n*/\nstatic BOOL CALLBACK CollectGUIDsProcW(LPGUID lpGUID,\n                                     LPCWSTR lpszDesc,\n                                     LPCWSTR lpszDrvName,\n                                     LPVOID lpContext )\n{\n    DSDeviceNameAndGUIDVector *namesAndGUIDs = (DSDeviceNameAndGUIDVector*)lpContext;\n    PaError error;\n\n    (void) lpszDrvName; /* unused variable */\n\n    if( namesAndGUIDs->free == 0 )\n    {\n        error = ExpandDSDeviceNameAndGUIDVector( namesAndGUIDs );\n        if( error != paNoError )\n        {\n            namesAndGUIDs->enumerationError = error;\n            return FALSE;\n        }\n    }\n\n    /* Set GUID pointer, copy GUID to storage in DSDeviceNameAndGUIDVector. */\n    if( lpGUID == NULL )\n    {\n        namesAndGUIDs->items[namesAndGUIDs->count].lpGUID = NULL;\n    }\n    else\n    {\n        namesAndGUIDs->items[namesAndGUIDs->count].lpGUID =\n                &namesAndGUIDs->items[namesAndGUIDs->count].guid;\n\n        memcpy( &namesAndGUIDs->items[namesAndGUIDs->count].guid, lpGUID, sizeof(GUID) );\n    }\n\n    namesAndGUIDs->items[namesAndGUIDs->count].name =\n            DuplicateDeviceNameString( namesAndGUIDs->allocations, lpszDesc );\n    if( namesAndGUIDs->items[namesAndGUIDs->count].name == NULL )\n    {\n        namesAndGUIDs->enumerationError = paInsufficientMemory;\n        return FALSE;\n    }\n\n    namesAndGUIDs->items[namesAndGUIDs->count].pnpInterface = 0;\n\n    ++namesAndGUIDs->count;\n    --namesAndGUIDs->free;\n\n    return TRUE;\n}\n\n\n#ifdef PAWIN_USE_WDMKS_DEVICE_INFO\n\nstatic void *DuplicateWCharString( PaUtilAllocationGroup *allocations, wchar_t *source )\n{\n    size_t len;\n    wchar_t *result;\n\n    len = wcslen( source );\n    result = (wchar_t*)PaUtil_GroupAllocateMemory( allocations, (long) ((len+1) * sizeof(wchar_t)) );\n    wcscpy( result, source );\n    return result;\n}\n\nstatic BOOL CALLBACK KsPropertySetEnumerateCallback( PDSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_W_DATA data, LPVOID context )\n{\n    int i;\n    DSDeviceNamesAndGUIDs *deviceNamesAndGUIDs = (DSDeviceNamesAndGUIDs*)context;\n\n    /*\n        Apparently data->Interface can be NULL in some cases.\n        Possibly virtual devices without hardware.\n        So we check for NULLs now. See mailing list message November 10, 2012:\n        \"[Portaudio] portaudio initialization crash in KsPropertySetEnumerateCallback(pa_win_ds.c)\"\n    */\n    if( data->Interface )\n    {\n        if( data->DataFlow == DIRECTSOUNDDEVICE_DATAFLOW_RENDER )\n        {\n            for( i=0; i < deviceNamesAndGUIDs->outputNamesAndGUIDs.count; ++i )\n            {\n                if( deviceNamesAndGUIDs->outputNamesAndGUIDs.items[i].lpGUID\n                    && memcmp( &data->DeviceId, deviceNamesAndGUIDs->outputNamesAndGUIDs.items[i].lpGUID, sizeof(GUID) ) == 0 )\n                {\n                    deviceNamesAndGUIDs->outputNamesAndGUIDs.items[i].pnpInterface =\n                        (char*)DuplicateWCharString( deviceNamesAndGUIDs->winDsHostApi->allocations, data->Interface );\n                    break;\n                }\n            }\n        }\n        else if( data->DataFlow == DIRECTSOUNDDEVICE_DATAFLOW_CAPTURE )\n        {\n            for( i=0; i < deviceNamesAndGUIDs->inputNamesAndGUIDs.count; ++i )\n            {\n                if( deviceNamesAndGUIDs->inputNamesAndGUIDs.items[i].lpGUID\n                    && memcmp( &data->DeviceId, deviceNamesAndGUIDs->inputNamesAndGUIDs.items[i].lpGUID, sizeof(GUID) ) == 0 )\n                {\n                    deviceNamesAndGUIDs->inputNamesAndGUIDs.items[i].pnpInterface =\n                        (char*)DuplicateWCharString( deviceNamesAndGUIDs->winDsHostApi->allocations, data->Interface );\n                    break;\n                }\n            }\n        }\n    }\n\n    return TRUE;\n}\n\n\nstatic GUID pawin_CLSID_DirectSoundPrivate =\n{ 0x11ab3ec0, 0x25ec, 0x11d1, 0xa4, 0xd8, 0x00, 0xc0, 0x4f, 0xc2, 0x8a, 0xca };\n\nstatic GUID pawin_DSPROPSETID_DirectSoundDevice =\n{ 0x84624f82, 0x25ec, 0x11d1, 0xa4, 0xd8, 0x00, 0xc0, 0x4f, 0xc2, 0x8a, 0xca };\n\nstatic GUID pawin_IID_IKsPropertySet =\n{ 0x31efac30, 0x515c, 0x11d0, 0xa9, 0xaa, 0x00, 0xaa, 0x00, 0x61, 0xbe, 0x93 };\n\n\n/*\n    FindDevicePnpInterfaces fills in the pnpInterface fields in deviceNamesAndGUIDs\n    with UNICODE file paths to the devices. The DS documentation mentions\n    at least two techniques by which these Interface paths can be found using IKsPropertySet on\n    the DirectSound class object. One is using the DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION\n    property, and the other is using DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE.\n    I tried both methods and only the second worked. I found two postings on the\n    net from people who had the same problem with the first method, so I think the method used here is\n    more common/likely to work. The problem is that IKsPropertySet_Get returns S_OK\n    but the fields of the device description are not filled in.\n\n    The mechanism we use works by registering an enumeration callback which is called for\n    every DSound device. Our callback searches for a device in our deviceNamesAndGUIDs list\n    with the matching GUID and copies the pointer to the Interface path.\n    Note that we could have used this enumeration callback to perform the original\n    device enumeration, however we choose not to so we can disable this step easily.\n\n    Apparently the IKsPropertySet mechanism was added in DirectSound 9c 2004\n    http://www.tech-archive.net/Archive/Development/microsoft.public.win32.programmer.mmedia/2004-12/0099.html\n\n        -- rossb\n*/\nstatic void FindDevicePnpInterfaces( DSDeviceNamesAndGUIDs *deviceNamesAndGUIDs )\n{\n    IClassFactory *pClassFactory;\n\n    if( paWinDsDSoundEntryPoints.DllGetClassObject(&pawin_CLSID_DirectSoundPrivate, &IID_IClassFactory, (PVOID *) &pClassFactory) == S_OK ){\n        IKsPropertySet *pPropertySet;\n        if( pClassFactory->lpVtbl->CreateInstance( pClassFactory, NULL, &pawin_IID_IKsPropertySet, (PVOID *) &pPropertySet) == S_OK ){\n\n            DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_W_DATA data;\n            ULONG bytesReturned;\n\n            data.Callback = KsPropertySetEnumerateCallback;\n            data.Context = deviceNamesAndGUIDs;\n\n            IKsPropertySet_Get( pPropertySet,\n                &pawin_DSPROPSETID_DirectSoundDevice,\n                DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_W,\n                NULL,\n                0,\n                &data,\n                sizeof(data),\n                &bytesReturned\n            );\n\n            IKsPropertySet_Release( pPropertySet );\n        }\n        pClassFactory->lpVtbl->Release( pClassFactory );\n    }\n\n    /*\n        The following code fragment, which I chose not to use, queries for the\n        device interface for a device with a specific GUID:\n\n        ULONG BytesReturned;\n        DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_W_DATA Property;\n\n        memset (&Property, 0, sizeof(Property));\n        Property.DataFlow = DIRECTSOUNDDEVICE_DATAFLOW_RENDER;\n        Property.DeviceId = *lpGUID;\n\n        hr = IKsPropertySet_Get( pPropertySet,\n            &pawin_DSPROPSETID_DirectSoundDevice,\n            DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_W,\n            NULL,\n            0,\n            &Property,\n            sizeof(Property),\n            &BytesReturned\n        );\n\n        if( hr == S_OK )\n        {\n            //pnpInterface = Property.Interface;\n        }\n    */\n}\n#endif /* PAWIN_USE_WDMKS_DEVICE_INFO */\n\n\n/*\n    GUIDs for emulated devices which we blacklist below.\n    are there more than two of them??\n*/\n\nGUID IID_IRolandVSCEmulated1 = {0xc2ad1800, 0xb243, 0x11ce, 0xa8, 0xa4, 0x00, 0xaa, 0x00, 0x6c, 0x45, 0x01};\nGUID IID_IRolandVSCEmulated2 = {0xc2ad1800, 0xb243, 0x11ce, 0xa8, 0xa4, 0x00, 0xaa, 0x00, 0x6c, 0x45, 0x02};\n\n\n#define PA_DEFAULTSAMPLERATESEARCHORDER_COUNT_  (13) /* must match array length below */\nstatic double defaultSampleRateSearchOrder_[] =\n    { 44100.0, 48000.0, 32000.0, 24000.0, 22050.0, 88200.0, 96000.0, 192000.0,\n        16000.0, 12000.0, 11025.0, 9600.0, 8000.0 };\n\n/************************************************************************************\n** Extract capabilities from an output device, and add it to the device info list\n** if successful. This function assumes that there is enough room in the\n** device info list to accommodate all entries.\n**\n** The device will not be added to the device list if any errors are encountered.\n*/\nstatic PaError AddOutputDeviceInfoFromDirectSound(\n        PaWinDsHostApiRepresentation *winDsHostApi, char *name, LPGUID lpGUID, char *pnpInterface )\n{\n    PaUtilHostApiRepresentation  *hostApi = &winDsHostApi->inheritedHostApiRep;\n    PaWinDsDeviceInfo            *winDsDeviceInfo = (PaWinDsDeviceInfo*) hostApi->deviceInfos[hostApi->info.deviceCount];\n    PaDeviceInfo                 *deviceInfo = &winDsDeviceInfo->inheritedDeviceInfo;\n    HRESULT                       hr;\n    LPDIRECTSOUND                 lpDirectSound;\n    DSCAPS                        caps;\n    int                           deviceOK = TRUE;\n    PaError                       result = paNoError;\n    int                           i;\n\n    /* Copy GUID to the device info structure. Set pointer. */\n    if( lpGUID == NULL )\n    {\n        winDsDeviceInfo->lpGUID = NULL;\n    }\n    else\n    {\n        memcpy( &winDsDeviceInfo->guid, lpGUID, sizeof(GUID) );\n        winDsDeviceInfo->lpGUID = &winDsDeviceInfo->guid;\n    }\n\n    if( lpGUID )\n    {\n        if (IsEqualGUID (&IID_IRolandVSCEmulated1,lpGUID) ||\n            IsEqualGUID (&IID_IRolandVSCEmulated2,lpGUID) )\n        {\n            PA_DEBUG((\"BLACKLISTED: %s \\n\",name));\n            return paNoError;\n        }\n    }\n\n    /* Create a DirectSound object for the specified GUID\n        Note that using CoCreateInstance doesn't work on windows CE.\n    */\n    hr = paWinDsDSoundEntryPoints.DirectSoundCreate( lpGUID, &lpDirectSound, NULL );\n\n    /** try using CoCreateInstance because DirectSoundCreate was hanging under\n        some circumstances - note this was probably related to the\n        #define BOOL short bug which has now been fixed\n        @todo delete this comment and the following code once we've ensured\n        there is no bug.\n    */\n    /*\n    hr = CoCreateInstance( &CLSID_DirectSound, NULL, CLSCTX_INPROC_SERVER,\n            &IID_IDirectSound, (void**)&lpDirectSound );\n\n    if( hr == S_OK )\n    {\n        hr = IDirectSound_Initialize( lpDirectSound, lpGUID );\n    }\n    */\n\n    if( hr != DS_OK )\n    {\n        if (hr == DSERR_ALLOCATED)\n            PA_DEBUG((\"AddOutputDeviceInfoFromDirectSound %s DSERR_ALLOCATED\\n\",name));\n        DBUG((\"Cannot create DirectSound for %s. Result = 0x%x\\n\", name, hr ));\n        if (lpGUID)\n            DBUG((\"%s's GUID: {0x%x,0x%x,0x%x,0x%x,0x%x,0x%x,0x%x,0x%x,0x%x,0x%x, 0x%x} \\n\",\n                 name,\n                 lpGUID->Data1,\n                 lpGUID->Data2,\n                 lpGUID->Data3,\n                 lpGUID->Data4[0],\n                 lpGUID->Data4[1],\n                 lpGUID->Data4[2],\n                 lpGUID->Data4[3],\n                 lpGUID->Data4[4],\n                 lpGUID->Data4[5],\n                 lpGUID->Data4[6],\n                 lpGUID->Data4[7]));\n\n        deviceOK = FALSE;\n    }\n    else\n    {\n        /* Query device characteristics. */\n        memset( &caps, 0, sizeof(caps) );\n        caps.dwSize = sizeof(caps);\n        hr = IDirectSound_GetCaps( lpDirectSound, &caps );\n        if( hr != DS_OK )\n        {\n            DBUG((\"Cannot GetCaps() for DirectSound device %s. Result = 0x%x\\n\", name, hr ));\n            deviceOK = FALSE;\n        }\n        else\n        {\n\n#if PA_USE_WMME\n            if( caps.dwFlags & DSCAPS_EMULDRIVER )\n            {\n                /* If WMME supported, then reject Emulated drivers because they are lousy. */\n                deviceOK = FALSE;\n            }\n#endif\n\n            if( deviceOK )\n            {\n                deviceInfo->maxInputChannels = 0;\n                winDsDeviceInfo->deviceInputChannelCountIsKnown = 1;\n\n                /* DS output capabilities only indicate supported number of channels\n                   using two flags which indicate mono and/or stereo.\n                   We assume that stereo devices may support more than 2 channels\n                   (as is the case with 5.1 devices for example) and so\n                   set deviceOutputChannelCountIsKnown to 0 (unknown).\n                   In this case OpenStream will try to open the device\n                   when the user requests more than 2 channels, rather than\n                   returning an error.\n                */\n                if( caps.dwFlags & DSCAPS_PRIMARYSTEREO )\n                {\n                    deviceInfo->maxOutputChannels = 2;\n                    winDsDeviceInfo->deviceOutputChannelCountIsKnown = 0;\n                }\n                else\n                {\n                    deviceInfo->maxOutputChannels = 1;\n                    winDsDeviceInfo->deviceOutputChannelCountIsKnown = 1;\n                }\n\n                /* Guess channels count from speaker configuration. We do it only when\n                   pnpInterface is NULL or when PAWIN_USE_WDMKS_DEVICE_INFO is undefined.\n                */\n#ifdef PAWIN_USE_WDMKS_DEVICE_INFO\n                if( !pnpInterface )\n#endif\n                {\n                    DWORD spkrcfg;\n                    if( SUCCEEDED(IDirectSound_GetSpeakerConfig( lpDirectSound, &spkrcfg )) )\n                    {\n                        int count = 0;\n                        switch (DSSPEAKER_CONFIG(spkrcfg))\n                        {\n                            case DSSPEAKER_HEADPHONE:        count = 2; break;\n                            case DSSPEAKER_MONO:             count = 1; break;\n                            case DSSPEAKER_QUAD:             count = 4; break;\n                            case DSSPEAKER_STEREO:           count = 2; break;\n                            case DSSPEAKER_SURROUND:         count = 4; break;\n                            case DSSPEAKER_5POINT1:          count = 6; break;\n#ifndef DSSPEAKER_7POINT1\n#define DSSPEAKER_7POINT1 0x00000007\n#endif\n                            case DSSPEAKER_7POINT1:          count = 8; break;\n#ifndef DSSPEAKER_7POINT1_SURROUND\n#define DSSPEAKER_7POINT1_SURROUND 0x00000008\n#endif\n                            case DSSPEAKER_7POINT1_SURROUND: count = 8; break;\n#ifndef DSSPEAKER_5POINT1_SURROUND\n#define DSSPEAKER_5POINT1_SURROUND 0x00000009\n#endif\n                            case DSSPEAKER_5POINT1_SURROUND: count = 6; break;\n                        }\n                        if( count )\n                        {\n                            deviceInfo->maxOutputChannels = count;\n                            winDsDeviceInfo->deviceOutputChannelCountIsKnown = 1;\n                        }\n                    }\n                }\n\n#ifdef PAWIN_USE_WDMKS_DEVICE_INFO\n                if( pnpInterface )\n                {\n                    int count = PaWin_WDMKS_QueryFilterMaximumChannelCount( pnpInterface, /* isInput= */ 0  );\n                    if( count > 0 )\n                    {\n                        deviceInfo->maxOutputChannels = count;\n                        winDsDeviceInfo->deviceOutputChannelCountIsKnown = 1;\n                    }\n                }\n#endif /* PAWIN_USE_WDMKS_DEVICE_INFO */\n\n                /* initialize defaultSampleRate */\n\n                if( caps.dwFlags & DSCAPS_CONTINUOUSRATE )\n                {\n                    /* initialize to caps.dwMaxSecondarySampleRate incase none of the standard rates match */\n                    deviceInfo->defaultSampleRate = caps.dwMaxSecondarySampleRate;\n\n                    for( i = 0; i < PA_DEFAULTSAMPLERATESEARCHORDER_COUNT_; ++i )\n                    {\n                        if( defaultSampleRateSearchOrder_[i] >= caps.dwMinSecondarySampleRate\n                                && defaultSampleRateSearchOrder_[i] <= caps.dwMaxSecondarySampleRate )\n                        {\n                            deviceInfo->defaultSampleRate = defaultSampleRateSearchOrder_[i];\n                            break;\n                        }\n                    }\n                }\n                else if( caps.dwMinSecondarySampleRate == caps.dwMaxSecondarySampleRate )\n                {\n                    if( caps.dwMinSecondarySampleRate == 0 )\n                    {\n                        /*\n                        ** On my Thinkpad 380Z, DirectSoundV6 returns min-max=0 !!\n                        ** But it supports continuous sampling.\n                        ** So fake range of rates, and hope it really supports it.\n                        */\n                        deviceInfo->defaultSampleRate = 48000.0f;  /* assume 48000 as the default */\n\n                        DBUG((\"PA - Reported rates both zero. Setting to fake values for device #%s\\n\", name ));\n                    }\n                    else\n                    {\n                        deviceInfo->defaultSampleRate = caps.dwMaxSecondarySampleRate;\n                    }\n                }\n                else if( (caps.dwMinSecondarySampleRate < 1000.0) && (caps.dwMaxSecondarySampleRate > 50000.0) )\n                {\n                    /* The EWS88MT drivers lie, lie, lie. The say they only support two rates, 100 & 100000.\n                    ** But we know that they really support a range of rates!\n                    ** So when we see a ridiculous set of rates, assume it is a range.\n                    */\n                  deviceInfo->defaultSampleRate = 48000.0f;  /* assume 48000 as the default */\n                  DBUG((\"PA - Sample rate range used instead of two odd values for device #%s\\n\", name ));\n                }\n                else deviceInfo->defaultSampleRate = caps.dwMaxSecondarySampleRate;\n\n                //printf( \"min %d max %d\\n\", caps.dwMinSecondarySampleRate, caps.dwMaxSecondarySampleRate );\n                // dwFlags | DSCAPS_CONTINUOUSRATE\n\n                deviceInfo->defaultLowInputLatency = 0.;\n                deviceInfo->defaultHighInputLatency = 0.;\n\n                deviceInfo->defaultLowOutputLatency = PaWinDs_GetMinLatencySeconds( deviceInfo->defaultSampleRate );\n                deviceInfo->defaultHighOutputLatency = deviceInfo->defaultLowOutputLatency * 2;\n            }\n        }\n\n        IDirectSound_Release( lpDirectSound );\n    }\n\n    if( deviceOK )\n    {\n        deviceInfo->name = name;\n\n        if( lpGUID == NULL )\n            hostApi->info.defaultOutputDevice = hostApi->info.deviceCount;\n\n        hostApi->info.deviceCount++;\n    }\n\n    return result;\n}\n\n\n/************************************************************************************\n** Extract capabilities from an input device, and add it to the device info list\n** if successful. This function assumes that there is enough room in the\n** device info list to accommodate all entries.\n**\n** The device will not be added to the device list if any errors are encountered.\n*/\nstatic PaError AddInputDeviceInfoFromDirectSoundCapture(\n        PaWinDsHostApiRepresentation *winDsHostApi, char *name, LPGUID lpGUID, char *pnpInterface )\n{\n    PaUtilHostApiRepresentation  *hostApi = &winDsHostApi->inheritedHostApiRep;\n    PaWinDsDeviceInfo            *winDsDeviceInfo = (PaWinDsDeviceInfo*) hostApi->deviceInfos[hostApi->info.deviceCount];\n    PaDeviceInfo                 *deviceInfo = &winDsDeviceInfo->inheritedDeviceInfo;\n    HRESULT                       hr;\n    LPDIRECTSOUNDCAPTURE          lpDirectSoundCapture;\n    DSCCAPS                       caps;\n    int                           deviceOK = TRUE;\n    PaError                       result = paNoError;\n\n    /* Copy GUID to the device info structure. Set pointer. */\n    if( lpGUID == NULL )\n    {\n        winDsDeviceInfo->lpGUID = NULL;\n    }\n    else\n    {\n        winDsDeviceInfo->lpGUID = &winDsDeviceInfo->guid;\n        memcpy( &winDsDeviceInfo->guid, lpGUID, sizeof(GUID) );\n    }\n\n    hr = paWinDsDSoundEntryPoints.DirectSoundCaptureCreate( lpGUID, &lpDirectSoundCapture, NULL );\n\n    /** try using CoCreateInstance because DirectSoundCreate was hanging under\n        some circumstances - note this was probably related to the\n        #define BOOL short bug which has now been fixed\n        @todo delete this comment and the following code once we've ensured\n        there is no bug.\n    */\n    /*\n    hr = CoCreateInstance( &CLSID_DirectSoundCapture, NULL, CLSCTX_INPROC_SERVER,\n            &IID_IDirectSoundCapture, (void**)&lpDirectSoundCapture );\n    */\n    if( hr != DS_OK )\n    {\n        DBUG((\"Cannot create Capture for %s. Result = 0x%x\\n\", name, hr ));\n        deviceOK = FALSE;\n    }\n    else\n    {\n        /* Query device characteristics. */\n        memset( &caps, 0, sizeof(caps) );\n        caps.dwSize = sizeof(caps);\n        hr = IDirectSoundCapture_GetCaps( lpDirectSoundCapture, &caps );\n        if( hr != DS_OK )\n        {\n            DBUG((\"Cannot GetCaps() for Capture device %s. Result = 0x%x\\n\", name, hr ));\n            deviceOK = FALSE;\n        }\n        else\n        {\n#if PA_USE_WMME\n            if( caps.dwFlags & DSCAPS_EMULDRIVER )\n            {\n                /* If WMME supported, then reject Emulated drivers because they are lousy. */\n                deviceOK = FALSE;\n            }\n#endif\n\n            if( deviceOK )\n            {\n                deviceInfo->maxInputChannels = caps.dwChannels;\n                winDsDeviceInfo->deviceInputChannelCountIsKnown = 1;\n\n                deviceInfo->maxOutputChannels = 0;\n                winDsDeviceInfo->deviceOutputChannelCountIsKnown = 1;\n\n#ifdef PAWIN_USE_WDMKS_DEVICE_INFO\n                if( pnpInterface )\n                {\n                    int count = PaWin_WDMKS_QueryFilterMaximumChannelCount( pnpInterface, /* isInput= */ 1  );\n                    if( count > 0 )\n                    {\n                        deviceInfo->maxInputChannels = count;\n                        winDsDeviceInfo->deviceInputChannelCountIsKnown = 1;\n                    }\n                }\n#endif /* PAWIN_USE_WDMKS_DEVICE_INFO */\n\n/*  constants from a WINE patch by Francois Gouget, see:\n    http://www.winehq.com/hypermail/wine-patches/2003/01/0290.html\n\n    ---\n    Date: Fri, 14 May 2004 10:38:12 +0200 (CEST)\n    From: Francois Gouget <fgouget@ ... .fr>\n    To: Ross Bencina <rbencina@ ... .au>\n    Subject: Re: Permission to use wine 48/96 wave patch in BSD licensed library\n\n    [snip]\n\n    I give you permission to use the patch below under the BSD license.\n    http://www.winehq.com/hypermail/wine-patches/2003/01/0290.html\n\n    [snip]\n*/\n#ifndef WAVE_FORMAT_48M08\n#define WAVE_FORMAT_48M08      0x00001000    /* 48     kHz, Mono,   8-bit  */\n#define WAVE_FORMAT_48S08      0x00002000    /* 48     kHz, Stereo, 8-bit  */\n#define WAVE_FORMAT_48M16      0x00004000    /* 48     kHz, Mono,   16-bit */\n#define WAVE_FORMAT_48S16      0x00008000    /* 48     kHz, Stereo, 16-bit */\n#define WAVE_FORMAT_96M08      0x00010000    /* 96     kHz, Mono,   8-bit  */\n#define WAVE_FORMAT_96S08      0x00020000    /* 96     kHz, Stereo, 8-bit  */\n#define WAVE_FORMAT_96M16      0x00040000    /* 96     kHz, Mono,   16-bit */\n#define WAVE_FORMAT_96S16      0x00080000    /* 96     kHz, Stereo, 16-bit */\n#endif\n\n                /* defaultSampleRate */\n                if( caps.dwChannels == 2 )\n                {\n                    if( caps.dwFormats & WAVE_FORMAT_4S16 )\n                        deviceInfo->defaultSampleRate = 44100.0;\n                    else if( caps.dwFormats & WAVE_FORMAT_48S16 )\n                        deviceInfo->defaultSampleRate = 48000.0;\n                    else if( caps.dwFormats & WAVE_FORMAT_2S16 )\n                        deviceInfo->defaultSampleRate = 22050.0;\n                    else if( caps.dwFormats & WAVE_FORMAT_1S16 )\n                        deviceInfo->defaultSampleRate = 11025.0;\n                    else if( caps.dwFormats & WAVE_FORMAT_96S16 )\n                        deviceInfo->defaultSampleRate = 96000.0;\n                    else\n                        deviceInfo->defaultSampleRate = 48000.0; /* assume 48000 as the default */\n                }\n                else if( caps.dwChannels == 1 )\n                {\n                    if( caps.dwFormats & WAVE_FORMAT_4M16 )\n                        deviceInfo->defaultSampleRate = 44100.0;\n                    else if( caps.dwFormats & WAVE_FORMAT_48M16 )\n                        deviceInfo->defaultSampleRate = 48000.0;\n                    else if( caps.dwFormats & WAVE_FORMAT_2M16 )\n                        deviceInfo->defaultSampleRate = 22050.0;\n                    else if( caps.dwFormats & WAVE_FORMAT_1M16 )\n                        deviceInfo->defaultSampleRate = 11025.0;\n                    else if( caps.dwFormats & WAVE_FORMAT_96M16 )\n                        deviceInfo->defaultSampleRate = 96000.0;\n                    else\n                        deviceInfo->defaultSampleRate = 48000.0; /* assume 48000 as the default */\n                }\n                else deviceInfo->defaultSampleRate = 48000.0; /* assume 48000 as the default */\n\n                deviceInfo->defaultLowInputLatency = PaWinDs_GetMinLatencySeconds( deviceInfo->defaultSampleRate );\n                deviceInfo->defaultHighInputLatency = deviceInfo->defaultLowInputLatency * 2;\n\n                deviceInfo->defaultLowOutputLatency = 0.;\n                deviceInfo->defaultHighOutputLatency = 0.;\n            }\n        }\n\n        IDirectSoundCapture_Release( lpDirectSoundCapture );\n    }\n\n    if( deviceOK )\n    {\n        deviceInfo->name = name;\n\n        if( lpGUID == NULL )\n            hostApi->info.defaultInputDevice = hostApi->info.deviceCount;\n\n        hostApi->info.deviceCount++;\n    }\n\n    return result;\n}\n\n\n/***********************************************************************************/\nPaError PaWinDs_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex hostApiIndex )\n{\n    PaError result = paNoError;\n    int i, deviceCount;\n    PaWinDsHostApiRepresentation *winDsHostApi;\n    DSDeviceNamesAndGUIDs deviceNamesAndGUIDs;\n    PaWinDsDeviceInfo *deviceInfoArray;\n\n    PaWinDs_InitializeDSoundEntryPoints();\n\n    /* initialise guid vectors so they can be safely deleted on error */\n    deviceNamesAndGUIDs.winDsHostApi = NULL;\n    deviceNamesAndGUIDs.inputNamesAndGUIDs.items = NULL;\n    deviceNamesAndGUIDs.outputNamesAndGUIDs.items = NULL;\n\n    winDsHostApi = (PaWinDsHostApiRepresentation*)PaUtil_AllocateMemory( sizeof(PaWinDsHostApiRepresentation) );\n    if( !winDsHostApi )\n    {\n        result = paInsufficientMemory;\n        goto error;\n    }\n\n    memset( winDsHostApi, 0, sizeof(PaWinDsHostApiRepresentation) ); /* ensure all fields are zeroed. especially winDsHostApi->allocations */\n\n    result = PaWinUtil_CoInitialize( paDirectSound, &winDsHostApi->comInitializationResult );\n    if( result != paNoError )\n    {\n        goto error;\n    }\n\n    winDsHostApi->allocations = PaUtil_CreateAllocationGroup();\n    if( !winDsHostApi->allocations )\n    {\n        result = paInsufficientMemory;\n        goto error;\n    }\n\n    *hostApi = &winDsHostApi->inheritedHostApiRep;\n    (*hostApi)->info.structVersion = 1;\n    (*hostApi)->info.type = paDirectSound;\n    (*hostApi)->info.name = \"Windows DirectSound\";\n\n    (*hostApi)->info.deviceCount = 0;\n    (*hostApi)->info.defaultInputDevice = paNoDevice;\n    (*hostApi)->info.defaultOutputDevice = paNoDevice;\n\n\n/* DSound - enumerate devices to count them and to gather their GUIDs */\n\n    result = InitializeDSDeviceNameAndGUIDVector( &deviceNamesAndGUIDs.inputNamesAndGUIDs, winDsHostApi->allocations );\n    if( result != paNoError )\n        goto error;\n\n    result = InitializeDSDeviceNameAndGUIDVector( &deviceNamesAndGUIDs.outputNamesAndGUIDs, winDsHostApi->allocations );\n    if( result != paNoError )\n        goto error;\n\n    paWinDsDSoundEntryPoints.DirectSoundCaptureEnumerateW( (LPDSENUMCALLBACKW)CollectGUIDsProcW, (void *)&deviceNamesAndGUIDs.inputNamesAndGUIDs );\n\n    paWinDsDSoundEntryPoints.DirectSoundEnumerateW( (LPDSENUMCALLBACKW)CollectGUIDsProcW, (void *)&deviceNamesAndGUIDs.outputNamesAndGUIDs );\n\n    if( deviceNamesAndGUIDs.inputNamesAndGUIDs.enumerationError != paNoError )\n    {\n        result = deviceNamesAndGUIDs.inputNamesAndGUIDs.enumerationError;\n        goto error;\n    }\n\n    if( deviceNamesAndGUIDs.outputNamesAndGUIDs.enumerationError != paNoError )\n    {\n        result = deviceNamesAndGUIDs.outputNamesAndGUIDs.enumerationError;\n        goto error;\n    }\n\n    deviceCount = deviceNamesAndGUIDs.inputNamesAndGUIDs.count + deviceNamesAndGUIDs.outputNamesAndGUIDs.count;\n\n#ifdef PAWIN_USE_WDMKS_DEVICE_INFO\n    if( deviceCount > 0 )\n    {\n        deviceNamesAndGUIDs.winDsHostApi = winDsHostApi;\n        FindDevicePnpInterfaces( &deviceNamesAndGUIDs );\n    }\n#endif /* PAWIN_USE_WDMKS_DEVICE_INFO */\n\n    if( deviceCount > 0 )\n    {\n        /* allocate array for pointers to PaDeviceInfo structs */\n        (*hostApi)->deviceInfos = (PaDeviceInfo**)PaUtil_GroupAllocateMemory(\n                winDsHostApi->allocations, sizeof(PaDeviceInfo*) * deviceCount );\n        if( !(*hostApi)->deviceInfos )\n        {\n            result = paInsufficientMemory;\n            goto error;\n        }\n\n        /* allocate all PaDeviceInfo structs in a contiguous block */\n        deviceInfoArray = (PaWinDsDeviceInfo*)PaUtil_GroupAllocateMemory(\n                winDsHostApi->allocations, sizeof(PaWinDsDeviceInfo) * deviceCount );\n        if( !deviceInfoArray )\n        {\n            result = paInsufficientMemory;\n            goto error;\n        }\n\n        for( i=0; i < deviceCount; ++i )\n        {\n            PaDeviceInfo *deviceInfo = &deviceInfoArray[i].inheritedDeviceInfo;\n            deviceInfo->structVersion = 2;\n            deviceInfo->hostApi = hostApiIndex;\n            deviceInfo->name = 0;\n            (*hostApi)->deviceInfos[i] = deviceInfo;\n        }\n\n        for( i=0; i < deviceNamesAndGUIDs.inputNamesAndGUIDs.count; ++i )\n        {\n            result = AddInputDeviceInfoFromDirectSoundCapture( winDsHostApi,\n                    deviceNamesAndGUIDs.inputNamesAndGUIDs.items[i].name,\n                    deviceNamesAndGUIDs.inputNamesAndGUIDs.items[i].lpGUID,\n                    deviceNamesAndGUIDs.inputNamesAndGUIDs.items[i].pnpInterface );\n            if( result != paNoError )\n                goto error;\n        }\n\n        for( i=0; i < deviceNamesAndGUIDs.outputNamesAndGUIDs.count; ++i )\n        {\n            result = AddOutputDeviceInfoFromDirectSound( winDsHostApi,\n                    deviceNamesAndGUIDs.outputNamesAndGUIDs.items[i].name,\n                    deviceNamesAndGUIDs.outputNamesAndGUIDs.items[i].lpGUID,\n                    deviceNamesAndGUIDs.outputNamesAndGUIDs.items[i].pnpInterface );\n            if( result != paNoError )\n                goto error;\n        }\n    }\n\n    result = TerminateDSDeviceNameAndGUIDVector( &deviceNamesAndGUIDs.inputNamesAndGUIDs );\n    if( result != paNoError )\n        goto error;\n\n    result = TerminateDSDeviceNameAndGUIDVector( &deviceNamesAndGUIDs.outputNamesAndGUIDs );\n    if( result != paNoError )\n        goto error;\n\n\n    (*hostApi)->Terminate = Terminate;\n    (*hostApi)->OpenStream = OpenStream;\n    (*hostApi)->IsFormatSupported = IsFormatSupported;\n\n    PaUtil_InitializeStreamInterface( &winDsHostApi->callbackStreamInterface, CloseStream, StartStream,\n                                      StopStream, AbortStream, IsStreamStopped, IsStreamActive,\n                                      GetStreamTime, GetStreamCpuLoad,\n                                      PaUtil_DummyRead, PaUtil_DummyWrite,\n                                      PaUtil_DummyGetReadAvailable, PaUtil_DummyGetWriteAvailable );\n\n    PaUtil_InitializeStreamInterface( &winDsHostApi->blockingStreamInterface, CloseStream, StartStream,\n                                      StopStream, AbortStream, IsStreamStopped, IsStreamActive,\n                                      GetStreamTime, PaUtil_DummyGetCpuLoad,\n                                      ReadStream, WriteStream, GetStreamReadAvailable, GetStreamWriteAvailable );\n\n    return result;\n\nerror:\n    TerminateDSDeviceNameAndGUIDVector( &deviceNamesAndGUIDs.inputNamesAndGUIDs );\n    TerminateDSDeviceNameAndGUIDVector( &deviceNamesAndGUIDs.outputNamesAndGUIDs );\n\n    Terminate( (struct PaUtilHostApiRepresentation *)winDsHostApi );\n\n    return result;\n}\n\n\n/***********************************************************************************/\nstatic void Terminate( struct PaUtilHostApiRepresentation *hostApi )\n{\n    PaWinDsHostApiRepresentation *winDsHostApi = (PaWinDsHostApiRepresentation*)hostApi;\n\n    if( winDsHostApi ){\n        if( winDsHostApi->allocations )\n        {\n            PaUtil_FreeAllAllocations( winDsHostApi->allocations );\n            PaUtil_DestroyAllocationGroup( winDsHostApi->allocations );\n        }\n\n        PaWinUtil_CoUninitialize( paDirectSound, &winDsHostApi->comInitializationResult );\n\n        PaUtil_FreeMemory( winDsHostApi );\n    }\n\n    PaWinDs_TerminateDSoundEntryPoints();\n}\n\nstatic PaError ValidateWinDirectSoundSpecificStreamInfo(\n        const PaStreamParameters *streamParameters,\n        const PaWinDirectSoundStreamInfo *streamInfo )\n{\n    if( streamInfo )\n    {\n        if( streamInfo->size != sizeof( PaWinDirectSoundStreamInfo )\n                || streamInfo->version != 2 )\n        {\n            return paIncompatibleHostApiSpecificStreamInfo;\n        }\n\n        if( streamInfo->flags & paWinDirectSoundUseLowLevelLatencyParameters )\n        {\n            if( streamInfo->framesPerBuffer <= 0 )\n                return paIncompatibleHostApiSpecificStreamInfo;\n\n        }\n    }\n\n    return paNoError;\n}\n\n/***********************************************************************************/\nstatic PaError IsFormatSupported( struct PaUtilHostApiRepresentation *hostApi,\n                                  const PaStreamParameters *inputParameters,\n                                  const PaStreamParameters *outputParameters,\n                                  double sampleRate )\n{\n    PaError result;\n    PaWinDsDeviceInfo *inputWinDsDeviceInfo, *outputWinDsDeviceInfo;\n    PaDeviceInfo *inputDeviceInfo, *outputDeviceInfo;\n    int inputChannelCount, outputChannelCount;\n    PaSampleFormat inputSampleFormat, outputSampleFormat;\n    PaWinDirectSoundStreamInfo *inputStreamInfo, *outputStreamInfo;\n\n    if( inputParameters )\n    {\n        inputWinDsDeviceInfo = (PaWinDsDeviceInfo*) hostApi->deviceInfos[ inputParameters->device ];\n        inputDeviceInfo = &inputWinDsDeviceInfo->inheritedDeviceInfo;\n\n        inputChannelCount = inputParameters->channelCount;\n        inputSampleFormat = inputParameters->sampleFormat;\n\n        /* unless alternate device specification is supported, reject the use of\n            paUseHostApiSpecificDeviceSpecification */\n\n        if( inputParameters->device == paUseHostApiSpecificDeviceSpecification )\n            return paInvalidDevice;\n\n        /* check that input device can support inputChannelCount */\n        if( inputWinDsDeviceInfo->deviceInputChannelCountIsKnown\n                && inputChannelCount > inputDeviceInfo->maxInputChannels )\n            return paInvalidChannelCount;\n\n        /* validate inputStreamInfo */\n        inputStreamInfo = (PaWinDirectSoundStreamInfo*)inputParameters->hostApiSpecificStreamInfo;\n        result = ValidateWinDirectSoundSpecificStreamInfo( inputParameters, inputStreamInfo );\n        if( result != paNoError ) return result;\n    }\n    else\n    {\n        inputChannelCount = 0;\n    }\n\n    if( outputParameters )\n    {\n        outputWinDsDeviceInfo = (PaWinDsDeviceInfo*) hostApi->deviceInfos[ outputParameters->device ];\n        outputDeviceInfo = &outputWinDsDeviceInfo->inheritedDeviceInfo;\n\n        outputChannelCount = outputParameters->channelCount;\n        outputSampleFormat = outputParameters->sampleFormat;\n\n        /* unless alternate device specification is supported, reject the use of\n            paUseHostApiSpecificDeviceSpecification */\n\n        if( outputParameters->device == paUseHostApiSpecificDeviceSpecification )\n            return paInvalidDevice;\n\n        /* check that output device can support inputChannelCount */\n        if( outputWinDsDeviceInfo->deviceOutputChannelCountIsKnown\n                && outputChannelCount > outputDeviceInfo->maxOutputChannels )\n            return paInvalidChannelCount;\n\n        /* validate outputStreamInfo */\n        outputStreamInfo = (PaWinDirectSoundStreamInfo*)outputParameters->hostApiSpecificStreamInfo;\n        result = ValidateWinDirectSoundSpecificStreamInfo( outputParameters, outputStreamInfo );\n        if( result != paNoError ) return result;\n    }\n    else\n    {\n        outputChannelCount = 0;\n    }\n\n    /*\n        IMPLEMENT ME:\n\n            - if a full duplex stream is requested, check that the combination\n                of input and output parameters is supported if necessary\n\n            - check that the device supports sampleRate\n\n        Because the buffer adapter handles conversion between all standard\n        sample formats, the following checks are only required if paCustomFormat\n        is implemented, or under some other unusual conditions.\n\n            - check that input device can support inputSampleFormat, or that\n                we have the capability to convert from outputSampleFormat to\n                a native format\n\n            - check that output device can support outputSampleFormat, or that\n                we have the capability to convert from outputSampleFormat to\n                a native format\n    */\n\n    return paFormatIsSupported;\n}\n\n\n#ifdef PAWIN_USE_DIRECTSOUNDFULLDUPLEXCREATE\nstatic HRESULT InitFullDuplexInputOutputBuffers( PaWinDsStream *stream,\n                                       PaWinDsDeviceInfo *inputDevice,\n                                       PaSampleFormat hostInputSampleFormat,\n                                       WORD inputChannelCount,\n                                       int bytesPerInputBuffer,\n                                       PaWinWaveFormatChannelMask inputChannelMask,\n                                       PaWinDsDeviceInfo *outputDevice,\n                                       PaSampleFormat hostOutputSampleFormat,\n                                       WORD outputChannelCount,\n                                       int bytesPerOutputBuffer,\n                                       PaWinWaveFormatChannelMask outputChannelMask,\n                                       unsigned long nFrameRate\n                                        )\n{\n    HRESULT hr;\n    DSCBUFFERDESC  captureDesc;\n    PaWinWaveFormat captureWaveFormat;\n    DSBUFFERDESC   secondaryRenderDesc;\n    PaWinWaveFormat renderWaveFormat;\n    LPDIRECTSOUNDBUFFER8 pRenderBuffer8;\n    LPDIRECTSOUNDCAPTUREBUFFER8 pCaptureBuffer8;\n\n    // capture buffer description\n\n    // only try wave format extensible. assume it's available on all ds 8 systems\n    PaWin_InitializeWaveFormatExtensible( &captureWaveFormat, inputChannelCount,\n                hostInputSampleFormat, PaWin_SampleFormatToLinearWaveFormatTag( hostInputSampleFormat ),\n                nFrameRate, inputChannelMask );\n\n    ZeroMemory(&captureDesc, sizeof(DSCBUFFERDESC));\n    captureDesc.dwSize = sizeof(DSCBUFFERDESC);\n    captureDesc.dwFlags = 0;\n    captureDesc.dwBufferBytes = bytesPerInputBuffer;\n    captureDesc.lpwfxFormat = (WAVEFORMATEX*)&captureWaveFormat;\n\n    // render buffer description\n\n    PaWin_InitializeWaveFormatExtensible( &renderWaveFormat, outputChannelCount,\n                hostOutputSampleFormat, PaWin_SampleFormatToLinearWaveFormatTag( hostOutputSampleFormat ),\n                nFrameRate, outputChannelMask );\n\n    ZeroMemory(&secondaryRenderDesc, sizeof(DSBUFFERDESC));\n    secondaryRenderDesc.dwSize = sizeof(DSBUFFERDESC);\n    secondaryRenderDesc.dwFlags = DSBCAPS_GLOBALFOCUS | DSBCAPS_GETCURRENTPOSITION2;\n    secondaryRenderDesc.dwBufferBytes = bytesPerOutputBuffer;\n    secondaryRenderDesc.lpwfxFormat = (WAVEFORMATEX*)&renderWaveFormat;\n\n    /* note that we don't create a primary buffer here at all */\n\n    hr = paWinDsDSoundEntryPoints.DirectSoundFullDuplexCreate8(\n            inputDevice->lpGUID, outputDevice->lpGUID,\n            &captureDesc, &secondaryRenderDesc,\n            GetDesktopWindow(), /* see InitOutputBuffer() for a discussion of whether this is a good idea */\n            DSSCL_EXCLUSIVE,\n            &stream->pDirectSoundFullDuplex8,\n            &pCaptureBuffer8,\n            &pRenderBuffer8,\n            NULL /* pUnkOuter must be NULL */\n        );\n\n    if( hr == DS_OK )\n    {\n        PA_DEBUG((\"DirectSoundFullDuplexCreate succeeded!\\n\"));\n\n        /* retrieve the pre ds 8 buffer interfaces which are used by the rest of the code */\n\n        hr = IUnknown_QueryInterface( pCaptureBuffer8, &IID_IDirectSoundCaptureBuffer, (LPVOID *)&stream->pDirectSoundInputBuffer );\n\n        if( hr == DS_OK )\n            hr = IUnknown_QueryInterface( pRenderBuffer8, &IID_IDirectSoundBuffer, (LPVOID *)&stream->pDirectSoundOutputBuffer );\n\n        /* release the ds 8 interfaces, we don't need them */\n        IUnknown_Release( pCaptureBuffer8 );\n        IUnknown_Release( pRenderBuffer8 );\n\n        if( !stream->pDirectSoundInputBuffer || !stream->pDirectSoundOutputBuffer ){\n            /* couldn't get pre ds 8 interfaces for some reason. clean up. */\n            if( stream->pDirectSoundInputBuffer )\n            {\n                IUnknown_Release( stream->pDirectSoundInputBuffer );\n                stream->pDirectSoundInputBuffer = NULL;\n            }\n\n            if( stream->pDirectSoundOutputBuffer )\n            {\n                IUnknown_Release( stream->pDirectSoundOutputBuffer );\n                stream->pDirectSoundOutputBuffer = NULL;\n            }\n\n            IUnknown_Release( stream->pDirectSoundFullDuplex8 );\n            stream->pDirectSoundFullDuplex8 = NULL;\n        }\n    }\n    else\n    {\n        PA_DEBUG((\"DirectSoundFullDuplexCreate failed. hr=%d\\n\", hr));\n    }\n\n    return hr;\n}\n#endif /* PAWIN_USE_DIRECTSOUNDFULLDUPLEXCREATE */\n\n\nstatic HRESULT InitInputBuffer( PaWinDsStream *stream,\n                               PaWinDsDeviceInfo *device,\n                               PaSampleFormat sampleFormat,\n                               unsigned long nFrameRate,\n                               WORD nChannels,\n                               int bytesPerBuffer,\n                               PaWinWaveFormatChannelMask channelMask )\n{\n    DSCBUFFERDESC  captureDesc;\n    PaWinWaveFormat waveFormat;\n    HRESULT        result;\n\n    if( (result = paWinDsDSoundEntryPoints.DirectSoundCaptureCreate(\n            device->lpGUID, &stream->pDirectSoundCapture, NULL) ) != DS_OK ){\n        ERR_RPT((\"PortAudio: DirectSoundCaptureCreate() failed!\\n\"));\n        return result;\n    }\n\n    // Setup the secondary buffer description\n    ZeroMemory(&captureDesc, sizeof(DSCBUFFERDESC));\n    captureDesc.dwSize = sizeof(DSCBUFFERDESC);\n    captureDesc.dwFlags = 0;\n    captureDesc.dwBufferBytes = bytesPerBuffer;\n    captureDesc.lpwfxFormat = (WAVEFORMATEX*)&waveFormat;\n\n    // Create the capture buffer\n\n    // first try WAVEFORMATEXTENSIBLE. if this fails, fall back to WAVEFORMATEX\n    PaWin_InitializeWaveFormatExtensible( &waveFormat, nChannels,\n                sampleFormat, PaWin_SampleFormatToLinearWaveFormatTag( sampleFormat ),\n                nFrameRate, channelMask );\n\n    if( IDirectSoundCapture_CreateCaptureBuffer( stream->pDirectSoundCapture,\n                  &captureDesc, &stream->pDirectSoundInputBuffer, NULL) != DS_OK )\n    {\n        PaWin_InitializeWaveFormatEx( &waveFormat, nChannels, sampleFormat,\n                PaWin_SampleFormatToLinearWaveFormatTag( sampleFormat ), nFrameRate );\n\n        if ((result = IDirectSoundCapture_CreateCaptureBuffer( stream->pDirectSoundCapture,\n                    &captureDesc, &stream->pDirectSoundInputBuffer, NULL)) != DS_OK) return result;\n    }\n\n    stream->readOffset = 0;  // reset last read position to start of buffer\n    return DS_OK;\n}\n\n\nstatic HRESULT InitOutputBuffer( PaWinDsStream *stream, PaWinDsDeviceInfo *device,\n                                PaSampleFormat sampleFormat, unsigned long nFrameRate,\n                                WORD nChannels, int bytesPerBuffer,\n                                PaWinWaveFormatChannelMask channelMask )\n{\n    HRESULT        result;\n    HWND           hWnd;\n    HRESULT        hr;\n    PaWinWaveFormat waveFormat;\n    DSBUFFERDESC   primaryDesc;\n    DSBUFFERDESC   secondaryDesc;\n\n    if( (hr = paWinDsDSoundEntryPoints.DirectSoundCreate(\n                device->lpGUID, &stream->pDirectSound, NULL )) != DS_OK ){\n        ERR_RPT((\"PortAudio: DirectSoundCreate() failed!\\n\"));\n        return hr;\n    }\n\n    // We were using getForegroundWindow() but sometimes the ForegroundWindow may not be the\n    // applications's window. Also if that window is closed before the Buffer is closed\n    // then DirectSound can crash. (Thanks for Scott Patterson for reporting this.)\n    // So we will use GetDesktopWindow() which was suggested by Miller Puckette.\n    // hWnd = GetForegroundWindow();\n    //\n    //  FIXME: The example code I have on the net creates a hidden window that\n    //      is managed by our code - I think we should do that - one hidden\n    //      window for the whole of Pa_DS\n    //\n    hWnd = GetDesktopWindow();\n\n    // Set cooperative level to DSSCL_EXCLUSIVE so that we can get 16 bit output, 44.1 KHz.\n    // exclusive also prevents unexpected sounds from other apps during a performance.\n    if ((hr = IDirectSound_SetCooperativeLevel( stream->pDirectSound,\n              hWnd, DSSCL_EXCLUSIVE)) != DS_OK)\n    {\n        return hr;\n    }\n\n    // -----------------------------------------------------------------------\n    // Create primary buffer and set format just so we can specify our custom format.\n    // Otherwise we would be stuck with the default which might be 8 bit or 22050 Hz.\n    // Setup the primary buffer description\n    ZeroMemory(&primaryDesc, sizeof(DSBUFFERDESC));\n    primaryDesc.dwSize        = sizeof(DSBUFFERDESC);\n    primaryDesc.dwFlags       = DSBCAPS_PRIMARYBUFFER; // all panning, mixing, etc done by synth\n    primaryDesc.dwBufferBytes = 0;\n    primaryDesc.lpwfxFormat   = NULL;\n    // Create the buffer\n    if ((result = IDirectSound_CreateSoundBuffer( stream->pDirectSound,\n                  &primaryDesc, &stream->pDirectSoundPrimaryBuffer, NULL)) != DS_OK)\n        goto error;\n\n    // Set the primary buffer's format\n\n    // first try WAVEFORMATEXTENSIBLE. if this fails, fall back to WAVEFORMATEX\n    PaWin_InitializeWaveFormatExtensible( &waveFormat, nChannels,\n                sampleFormat, PaWin_SampleFormatToLinearWaveFormatTag( sampleFormat ),\n                nFrameRate, channelMask );\n\n    if( IDirectSoundBuffer_SetFormat( stream->pDirectSoundPrimaryBuffer, (WAVEFORMATEX*)&waveFormat) != DS_OK )\n    {\n        PaWin_InitializeWaveFormatEx( &waveFormat, nChannels, sampleFormat,\n                PaWin_SampleFormatToLinearWaveFormatTag( sampleFormat ), nFrameRate );\n\n        if((result = IDirectSoundBuffer_SetFormat( stream->pDirectSoundPrimaryBuffer, (WAVEFORMATEX*)&waveFormat)) != DS_OK)\n            goto error;\n    }\n\n    // ----------------------------------------------------------------------\n    // Setup the secondary buffer description\n    ZeroMemory(&secondaryDesc, sizeof(DSBUFFERDESC));\n    secondaryDesc.dwSize = sizeof(DSBUFFERDESC);\n    secondaryDesc.dwFlags = DSBCAPS_GLOBALFOCUS | DSBCAPS_GETCURRENTPOSITION2;\n    secondaryDesc.dwBufferBytes = bytesPerBuffer;\n    secondaryDesc.lpwfxFormat = (WAVEFORMATEX*)&waveFormat; /* waveFormat contains whatever format was negotiated for the primary buffer above */\n    // Create the secondary buffer\n    if ((result = IDirectSound_CreateSoundBuffer( stream->pDirectSound,\n                  &secondaryDesc, &stream->pDirectSoundOutputBuffer, NULL)) != DS_OK)\n        goto error;\n\n    return DS_OK;\n\nerror:\n\n    if( stream->pDirectSoundPrimaryBuffer )\n    {\n        IDirectSoundBuffer_Release( stream->pDirectSoundPrimaryBuffer );\n        stream->pDirectSoundPrimaryBuffer = NULL;\n    }\n\n    return result;\n}\n\n\nstatic void CalculateBufferSettings( unsigned long *hostBufferSizeFrames,\n                                    unsigned long *pollingPeriodFrames,\n                                    int isFullDuplex,\n                                    unsigned long suggestedInputLatencyFrames,\n                                    unsigned long suggestedOutputLatencyFrames,\n                                    double sampleRate, unsigned long userFramesPerBuffer )\n{\n    unsigned long minimumPollingPeriodFrames = (unsigned long)(sampleRate * PA_DS_MINIMUM_POLLING_PERIOD_SECONDS);\n    unsigned long maximumPollingPeriodFrames = (unsigned long)(sampleRate * PA_DS_MAXIMUM_POLLING_PERIOD_SECONDS);\n    unsigned long pollingJitterFrames = (unsigned long)(sampleRate * PA_DS_POLLING_JITTER_SECONDS);\n\n    if( userFramesPerBuffer == paFramesPerBufferUnspecified )\n    {\n        unsigned long targetBufferingLatencyFrames = max( suggestedInputLatencyFrames, suggestedOutputLatencyFrames );\n\n        *pollingPeriodFrames = targetBufferingLatencyFrames / 4;\n        if( *pollingPeriodFrames < minimumPollingPeriodFrames )\n        {\n            *pollingPeriodFrames = minimumPollingPeriodFrames;\n        }\n        else if( *pollingPeriodFrames > maximumPollingPeriodFrames )\n        {\n            *pollingPeriodFrames = maximumPollingPeriodFrames;\n        }\n\n        *hostBufferSizeFrames = *pollingPeriodFrames\n                + max( *pollingPeriodFrames + pollingJitterFrames, targetBufferingLatencyFrames);\n    }\n    else\n    {\n        unsigned long targetBufferingLatencyFrames = suggestedInputLatencyFrames;\n        if( isFullDuplex )\n        {\n            /* In full duplex streams we know that the buffer adapter adds userFramesPerBuffer\n               extra fixed latency. so we subtract it here as a fixed latency before computing\n               the buffer size. being careful not to produce an unrepresentable negative result.\n\n               Note: this only works as expected if output latency is greater than input latency.\n               Otherwise we use input latency anyway since we do max(in,out).\n            */\n\n            if( userFramesPerBuffer < suggestedOutputLatencyFrames )\n            {\n                unsigned long adjustedSuggestedOutputLatencyFrames =\n                        suggestedOutputLatencyFrames - userFramesPerBuffer;\n\n                /* maximum of input and adjusted output suggested latency */\n                if( adjustedSuggestedOutputLatencyFrames > targetBufferingLatencyFrames )\n                    targetBufferingLatencyFrames = adjustedSuggestedOutputLatencyFrames;\n            }\n        }\n        else\n        {\n            /* maximum of input and output suggested latency */\n            if( suggestedOutputLatencyFrames > suggestedInputLatencyFrames )\n                targetBufferingLatencyFrames = suggestedOutputLatencyFrames;\n        }\n\n        *hostBufferSizeFrames = userFramesPerBuffer\n                + max( userFramesPerBuffer + pollingJitterFrames, targetBufferingLatencyFrames);\n\n        *pollingPeriodFrames = max( max(1, userFramesPerBuffer / 4), targetBufferingLatencyFrames / 16 );\n\n        if( *pollingPeriodFrames > maximumPollingPeriodFrames )\n        {\n            *pollingPeriodFrames = maximumPollingPeriodFrames;\n        }\n    }\n}\n\n\nstatic void CalculatePollingPeriodFrames( unsigned long hostBufferSizeFrames,\n                                    unsigned long *pollingPeriodFrames,\n                                    double sampleRate, unsigned long userFramesPerBuffer )\n{\n    unsigned long minimumPollingPeriodFrames = (unsigned long)(sampleRate * PA_DS_MINIMUM_POLLING_PERIOD_SECONDS);\n    unsigned long maximumPollingPeriodFrames = (unsigned long)(sampleRate * PA_DS_MAXIMUM_POLLING_PERIOD_SECONDS);\n    unsigned long pollingJitterFrames = (unsigned long)(sampleRate * PA_DS_POLLING_JITTER_SECONDS);\n\n    *pollingPeriodFrames = max( max(1, userFramesPerBuffer / 4), hostBufferSizeFrames / 16 );\n\n    if( *pollingPeriodFrames > maximumPollingPeriodFrames )\n    {\n        *pollingPeriodFrames = maximumPollingPeriodFrames;\n    }\n}\n\n\nstatic void SetStreamInfoLatencies( PaWinDsStream *stream,\n                                   unsigned long userFramesPerBuffer,\n                                   unsigned long pollingPeriodFrames,\n                                   double sampleRate )\n{\n    /* compute the stream info actual latencies based on framesPerBuffer, polling period, hostBufferSizeFrames,\n    and the configuration of the buffer processor */\n\n    unsigned long effectiveFramesPerBuffer = (userFramesPerBuffer == paFramesPerBufferUnspecified)\n                                             ? pollingPeriodFrames\n                                             : userFramesPerBuffer;\n\n    if( stream->bufferProcessor.inputChannelCount > 0 )\n    {\n        /* stream info input latency is the minimum buffering latency\n           (unlike suggested and default which are *maximums*) */\n        stream->streamRepresentation.streamInfo.inputLatency =\n                (double)(PaUtil_GetBufferProcessorInputLatencyFrames(&stream->bufferProcessor)\n                    + effectiveFramesPerBuffer) / sampleRate;\n    }\n    else\n    {\n        stream->streamRepresentation.streamInfo.inputLatency = 0;\n    }\n\n    if( stream->bufferProcessor.outputChannelCount > 0 )\n    {\n        stream->streamRepresentation.streamInfo.outputLatency =\n                (double)(PaUtil_GetBufferProcessorOutputLatencyFrames(&stream->bufferProcessor)\n                    + (stream->hostBufferSizeFrames - effectiveFramesPerBuffer)) / sampleRate;\n    }\n    else\n    {\n        stream->streamRepresentation.streamInfo.outputLatency = 0;\n    }\n}\n\n\n/***********************************************************************************/\n/* see pa_hostapi.h for a list of validity guarantees made about OpenStream parameters */\n\nstatic PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,\n                           PaStream** s,\n                           const PaStreamParameters *inputParameters,\n                           const PaStreamParameters *outputParameters,\n                           double sampleRate,\n                           unsigned long framesPerBuffer,\n                           PaStreamFlags streamFlags,\n                           PaStreamCallback *streamCallback,\n                           void *userData )\n{\n    PaError result = paNoError;\n    PaWinDsHostApiRepresentation *winDsHostApi = (PaWinDsHostApiRepresentation*)hostApi;\n    PaWinDsStream *stream = 0;\n    int bufferProcessorIsInitialized = 0;\n    int streamRepresentationIsInitialized = 0;\n    PaWinDsDeviceInfo *inputWinDsDeviceInfo, *outputWinDsDeviceInfo;\n    PaDeviceInfo *inputDeviceInfo, *outputDeviceInfo;\n    int inputChannelCount, outputChannelCount;\n    PaSampleFormat inputSampleFormat, outputSampleFormat;\n    PaSampleFormat hostInputSampleFormat, hostOutputSampleFormat;\n    int userRequestedHostInputBufferSizeFrames = 0;\n    int userRequestedHostOutputBufferSizeFrames = 0;\n    unsigned long suggestedInputLatencyFrames, suggestedOutputLatencyFrames;\n    PaWinDirectSoundStreamInfo *inputStreamInfo, *outputStreamInfo;\n    PaWinWaveFormatChannelMask inputChannelMask, outputChannelMask;\n    unsigned long pollingPeriodFrames = 0;\n\n    if( inputParameters )\n    {\n        inputWinDsDeviceInfo = (PaWinDsDeviceInfo*) hostApi->deviceInfos[ inputParameters->device ];\n        inputDeviceInfo = &inputWinDsDeviceInfo->inheritedDeviceInfo;\n\n        inputChannelCount = inputParameters->channelCount;\n        inputSampleFormat = inputParameters->sampleFormat;\n        suggestedInputLatencyFrames = (unsigned long)(inputParameters->suggestedLatency * sampleRate);\n\n        /* IDEA: the following 3 checks could be performed by default by pa_front\n            unless some flag indicated otherwise */\n\n        /* unless alternate device specification is supported, reject the use of\n            paUseHostApiSpecificDeviceSpecification */\n        if( inputParameters->device == paUseHostApiSpecificDeviceSpecification )\n            return paInvalidDevice;\n\n        /* check that input device can support inputChannelCount */\n        if( inputWinDsDeviceInfo->deviceInputChannelCountIsKnown\n                && inputChannelCount > inputDeviceInfo->maxInputChannels )\n            return paInvalidChannelCount;\n\n        /* validate hostApiSpecificStreamInfo */\n        inputStreamInfo = (PaWinDirectSoundStreamInfo*)inputParameters->hostApiSpecificStreamInfo;\n        result = ValidateWinDirectSoundSpecificStreamInfo( inputParameters, inputStreamInfo );\n        if( result != paNoError ) return result;\n\n        if( inputStreamInfo && inputStreamInfo->flags & paWinDirectSoundUseLowLevelLatencyParameters )\n            userRequestedHostInputBufferSizeFrames = inputStreamInfo->framesPerBuffer;\n\n        if( inputStreamInfo && inputStreamInfo->flags & paWinDirectSoundUseChannelMask )\n            inputChannelMask = inputStreamInfo->channelMask;\n        else\n            inputChannelMask = PaWin_DefaultChannelMask( inputChannelCount );\n    }\n    else\n    {\n        inputChannelCount = 0;\n        inputSampleFormat = 0;\n        suggestedInputLatencyFrames = 0;\n    }\n\n\n    if( outputParameters )\n    {\n        outputWinDsDeviceInfo = (PaWinDsDeviceInfo*) hostApi->deviceInfos[ outputParameters->device ];\n        outputDeviceInfo = &outputWinDsDeviceInfo->inheritedDeviceInfo;\n\n        outputChannelCount = outputParameters->channelCount;\n        outputSampleFormat = outputParameters->sampleFormat;\n        suggestedOutputLatencyFrames = (unsigned long)(outputParameters->suggestedLatency * sampleRate);\n\n        /* unless alternate device specification is supported, reject the use of\n            paUseHostApiSpecificDeviceSpecification */\n        if( outputParameters->device == paUseHostApiSpecificDeviceSpecification )\n            return paInvalidDevice;\n\n        /* check that output device can support outputChannelCount */\n        if( outputWinDsDeviceInfo->deviceOutputChannelCountIsKnown\n                && outputChannelCount > outputDeviceInfo->maxOutputChannels )\n            return paInvalidChannelCount;\n\n        /* validate hostApiSpecificStreamInfo */\n        outputStreamInfo = (PaWinDirectSoundStreamInfo*)outputParameters->hostApiSpecificStreamInfo;\n        result = ValidateWinDirectSoundSpecificStreamInfo( outputParameters, outputStreamInfo );\n        if( result != paNoError ) return result;\n\n        if( outputStreamInfo && outputStreamInfo->flags & paWinDirectSoundUseLowLevelLatencyParameters )\n            userRequestedHostOutputBufferSizeFrames = outputStreamInfo->framesPerBuffer;\n\n        if( outputStreamInfo && outputStreamInfo->flags & paWinDirectSoundUseChannelMask )\n            outputChannelMask = outputStreamInfo->channelMask;\n        else\n            outputChannelMask = PaWin_DefaultChannelMask( outputChannelCount );\n    }\n    else\n    {\n        outputChannelCount = 0;\n        outputSampleFormat = 0;\n        suggestedOutputLatencyFrames = 0;\n    }\n\n    /*\n        If low level host buffer size is specified for both input and output\n        the current code requires the sizes to match.\n    */\n\n    if( (userRequestedHostInputBufferSizeFrames > 0 && userRequestedHostOutputBufferSizeFrames > 0)\n            && userRequestedHostInputBufferSizeFrames != userRequestedHostOutputBufferSizeFrames )\n        return paIncompatibleHostApiSpecificStreamInfo;\n\n\n\n    /*\n        IMPLEMENT ME:\n\n        ( the following two checks are taken care of by PaUtil_InitializeBufferProcessor() )\n\n            - check that input device can support inputSampleFormat, or that\n                we have the capability to convert from outputSampleFormat to\n                a native format\n\n            - check that output device can support outputSampleFormat, or that\n                we have the capability to convert from outputSampleFormat to\n                a native format\n\n            - if a full duplex stream is requested, check that the combination\n                of input and output parameters is supported\n\n            - check that the device supports sampleRate\n\n            - alter sampleRate to a close allowable rate if possible / necessary\n\n            - validate suggestedInputLatency and suggestedOutputLatency parameters,\n                use default values where necessary\n    */\n\n\n    /* validate platform specific flags */\n    if( (streamFlags & paPlatformSpecificFlags) != 0 )\n        return paInvalidFlag; /* unexpected platform specific flag */\n\n\n    stream = (PaWinDsStream*)PaUtil_AllocateMemory( sizeof(PaWinDsStream) );\n    if( !stream )\n    {\n        result = paInsufficientMemory;\n        goto error;\n    }\n\n    memset( stream, 0, sizeof(PaWinDsStream) ); /* initialize all stream variables to 0 */\n\n    if( streamCallback )\n    {\n        PaUtil_InitializeStreamRepresentation( &stream->streamRepresentation,\n                                               &winDsHostApi->callbackStreamInterface, streamCallback, userData );\n    }\n    else\n    {\n        PaUtil_InitializeStreamRepresentation( &stream->streamRepresentation,\n                                               &winDsHostApi->blockingStreamInterface, streamCallback, userData );\n    }\n\n    streamRepresentationIsInitialized = 1;\n\n    stream->streamFlags = streamFlags;\n\n    PaUtil_InitializeCpuLoadMeasurer( &stream->cpuLoadMeasurer, sampleRate );\n\n\n    if( inputParameters )\n    {\n        /* IMPLEMENT ME - establish which  host formats are available */\n        PaSampleFormat nativeInputFormats = paInt16;\n        /* PaSampleFormat nativeFormats = paUInt8 | paInt16 | paInt24 | paInt32 | paFloat32; */\n\n        hostInputSampleFormat =\n            PaUtil_SelectClosestAvailableFormat( nativeInputFormats, inputParameters->sampleFormat );\n    }\n    else\n    {\n        hostInputSampleFormat = 0;\n    }\n\n    if( outputParameters )\n    {\n        /* IMPLEMENT ME - establish which  host formats are available */\n        PaSampleFormat nativeOutputFormats = paInt16;\n        /* PaSampleFormat nativeOutputFormats = paUInt8 | paInt16 | paInt24 | paInt32 | paFloat32; */\n\n        hostOutputSampleFormat =\n            PaUtil_SelectClosestAvailableFormat( nativeOutputFormats, outputParameters->sampleFormat );\n    }\n    else\n    {\n        hostOutputSampleFormat = 0;\n    }\n\n    result =  PaUtil_InitializeBufferProcessor( &stream->bufferProcessor,\n                    inputChannelCount, inputSampleFormat, hostInputSampleFormat,\n                    outputChannelCount, outputSampleFormat, hostOutputSampleFormat,\n                    sampleRate, streamFlags, framesPerBuffer,\n                    0, /* ignored in paUtilVariableHostBufferSizePartialUsageAllowed mode. */\n                /* This next mode is required because DS can split the host buffer when it wraps around. */\n                    paUtilVariableHostBufferSizePartialUsageAllowed,\n                    streamCallback, userData );\n    if( result != paNoError )\n        goto error;\n\n    bufferProcessorIsInitialized = 1;\n\n\n/* DirectSound specific initialization */\n    {\n        HRESULT          hr;\n        unsigned long    integerSampleRate = (unsigned long) (sampleRate + 0.5);\n\n        stream->processingCompleted = CreateEvent( NULL, /* bManualReset = */ TRUE, /* bInitialState = */ FALSE, NULL );\n        if( stream->processingCompleted == NULL )\n        {\n            result = paInsufficientMemory;\n            goto error;\n        }\n\n#ifdef PA_WIN_DS_USE_WMME_TIMER\n        stream->timerID = 0;\n#endif\n\n#ifdef PA_WIN_DS_USE_WAITABLE_TIMER_OBJECT\n        stream->waitableTimer = (HANDLE)CreateWaitableTimer( 0, FALSE, NULL );\n        if( stream->waitableTimer == NULL )\n        {\n            result = paUnanticipatedHostError;\n            PA_DS_SET_LAST_DIRECTSOUND_ERROR( GetLastError() );\n            goto error;\n        }\n#endif\n\n#ifndef PA_WIN_DS_USE_WMME_TIMER\n        stream->processingThreadCompleted = CreateEvent( NULL, /* bManualReset = */ TRUE, /* bInitialState = */ FALSE, NULL );\n        if( stream->processingThreadCompleted == NULL )\n        {\n            result = paUnanticipatedHostError;\n            PA_DS_SET_LAST_DIRECTSOUND_ERROR( GetLastError() );\n            goto error;\n        }\n#endif\n\n        /* set up i/o parameters */\n\n        if( userRequestedHostInputBufferSizeFrames > 0 || userRequestedHostOutputBufferSizeFrames > 0 )\n        {\n            /* use low level parameters */\n\n            /* since we use the same host buffer size for input and output\n               we choose the highest user specified value.\n            */\n            stream->hostBufferSizeFrames = max( userRequestedHostInputBufferSizeFrames, userRequestedHostOutputBufferSizeFrames );\n\n            CalculatePollingPeriodFrames(\n                    stream->hostBufferSizeFrames, &pollingPeriodFrames,\n                    sampleRate, framesPerBuffer );\n        }\n        else\n        {\n            CalculateBufferSettings( (unsigned long*)&stream->hostBufferSizeFrames, &pollingPeriodFrames,\n                    /* isFullDuplex = */ (inputParameters && outputParameters),\n                    suggestedInputLatencyFrames,\n                    suggestedOutputLatencyFrames,\n                    sampleRate, framesPerBuffer );\n        }\n\n        stream->pollingPeriodSeconds = pollingPeriodFrames / sampleRate;\n\n        DBUG((\"DirectSound host buffer size frames: %d, polling period seconds: %f, @ sr: %f\\n\",\n                stream->hostBufferSizeFrames, stream->pollingPeriodSeconds, sampleRate ));\n\n\n        /* ------------------ OUTPUT */\n        if( outputParameters )\n        {\n            LARGE_INTEGER  counterFrequency;\n\n            /*\n            PaDeviceInfo *deviceInfo = hostApi->deviceInfos[ outputParameters->device ];\n            DBUG((\"PaHost_OpenStream: deviceID = 0x%x\\n\", outputParameters->device));\n            */\n\n            int sampleSizeBytes = Pa_GetSampleSize(hostOutputSampleFormat);\n            stream->outputFrameSizeBytes = outputParameters->channelCount * sampleSizeBytes;\n\n            stream->outputBufferSizeBytes = stream->hostBufferSizeFrames * stream->outputFrameSizeBytes;\n            if( stream->outputBufferSizeBytes < DSBSIZE_MIN )\n            {\n                result = paBufferTooSmall;\n                goto error;\n            }\n            else if( stream->outputBufferSizeBytes > DSBSIZE_MAX )\n            {\n                result = paBufferTooBig;\n                goto error;\n            }\n\n            /* Calculate value used in latency calculation to avoid real-time divides. */\n            stream->secondsPerHostByte = 1.0 /\n                (stream->bufferProcessor.bytesPerHostOutputSample *\n                outputChannelCount * sampleRate);\n\n            stream->outputIsRunning = FALSE;\n            stream->outputUnderflowCount = 0;\n\n            /* perfCounterTicksPerBuffer is used by QueryOutputSpace for overflow detection */\n            if( QueryPerformanceFrequency( &counterFrequency ) )\n            {\n                stream->perfCounterTicksPerBuffer.QuadPart = (counterFrequency.QuadPart * stream->hostBufferSizeFrames) / integerSampleRate;\n            }\n            else\n            {\n                stream->perfCounterTicksPerBuffer.QuadPart = 0;\n            }\n        }\n\n        /* ------------------ INPUT */\n        if( inputParameters )\n        {\n            /*\n            PaDeviceInfo *deviceInfo = hostApi->deviceInfos[ inputParameters->device ];\n            DBUG((\"PaHost_OpenStream: deviceID = 0x%x\\n\", inputParameters->device));\n            */\n\n            int sampleSizeBytes = Pa_GetSampleSize(hostInputSampleFormat);\n            stream->inputFrameSizeBytes = inputParameters->channelCount * sampleSizeBytes;\n\n            stream->inputBufferSizeBytes = stream->hostBufferSizeFrames * stream->inputFrameSizeBytes;\n            if( stream->inputBufferSizeBytes < DSBSIZE_MIN )\n            {\n                result = paBufferTooSmall;\n                goto error;\n            }\n            else if( stream->inputBufferSizeBytes > DSBSIZE_MAX )\n            {\n                result = paBufferTooBig;\n                goto error;\n            }\n        }\n\n        /* open/create the DirectSound buffers */\n\n        /* interface ptrs should be zeroed when stream is zeroed. */\n        assert( stream->pDirectSoundCapture == NULL );\n        assert( stream->pDirectSoundInputBuffer == NULL );\n        assert( stream->pDirectSound == NULL );\n        assert( stream->pDirectSoundPrimaryBuffer == NULL );\n        assert( stream->pDirectSoundOutputBuffer == NULL );\n\n\n        if( inputParameters && outputParameters )\n        {\n#ifdef PAWIN_USE_DIRECTSOUNDFULLDUPLEXCREATE\n            /* try to use the full-duplex DX8 API to create the buffers.\n                if that fails we fall back to the half-duplex API below */\n\n            hr = InitFullDuplexInputOutputBuffers( stream,\n                                       (PaWinDsDeviceInfo*)hostApi->deviceInfos[inputParameters->device],\n                                       hostInputSampleFormat,\n                                       (WORD)inputParameters->channelCount, stream->inputBufferSizeBytes,\n                                       inputChannelMask,\n                                       (PaWinDsDeviceInfo*)hostApi->deviceInfos[outputParameters->device],\n                                       hostOutputSampleFormat,\n                                       (WORD)outputParameters->channelCount, stream->outputBufferSizeBytes,\n                                       outputChannelMask,\n                                       integerSampleRate\n                                        );\n            DBUG((\"InitFullDuplexInputOutputBuffers() returns %x\\n\", hr));\n            /* ignore any error returned by InitFullDuplexInputOutputBuffers.\n                we retry opening the buffers below */\n#endif /* PAWIN_USE_DIRECTSOUNDFULLDUPLEXCREATE */\n        }\n\n        /*  create half duplex buffers. also used for full-duplex streams which didn't\n            succeed when using the full duplex API. that could happen because\n            DX8 or greater isn't installed, the i/o devices aren't the same\n            physical device. etc.\n        */\n\n        if( outputParameters && !stream->pDirectSoundOutputBuffer )\n        {\n            hr = InitOutputBuffer( stream,\n                                       (PaWinDsDeviceInfo*)hostApi->deviceInfos[outputParameters->device],\n                                       hostOutputSampleFormat,\n                                       integerSampleRate,\n                                       (WORD)outputParameters->channelCount, stream->outputBufferSizeBytes,\n                                       outputChannelMask );\n            DBUG((\"InitOutputBuffer() returns %x\\n\", hr));\n            if( hr != DS_OK )\n            {\n                result = paUnanticipatedHostError;\n                PA_DS_SET_LAST_DIRECTSOUND_ERROR( hr );\n                goto error;\n            }\n        }\n\n        if( inputParameters && !stream->pDirectSoundInputBuffer )\n        {\n            hr = InitInputBuffer( stream,\n                                      (PaWinDsDeviceInfo*)hostApi->deviceInfos[inputParameters->device],\n                                      hostInputSampleFormat,\n                                      integerSampleRate,\n                                      (WORD)inputParameters->channelCount, stream->inputBufferSizeBytes,\n                                      inputChannelMask );\n            DBUG((\"InitInputBuffer() returns %x\\n\", hr));\n            if( hr != DS_OK )\n            {\n                ERR_RPT((\"PortAudio: DSW_InitInputBuffer() returns %x\\n\", hr));\n                result = paUnanticipatedHostError;\n                PA_DS_SET_LAST_DIRECTSOUND_ERROR( hr );\n                goto error;\n            }\n        }\n    }\n\n    SetStreamInfoLatencies( stream, framesPerBuffer, pollingPeriodFrames, sampleRate );\n\n    stream->streamRepresentation.streamInfo.sampleRate = sampleRate;\n\n    *s = (PaStream*)stream;\n\n    return result;\n\nerror:\n    if( stream )\n    {\n        if( stream->processingCompleted != NULL )\n            CloseHandle( stream->processingCompleted );\n\n#ifdef PA_WIN_DS_USE_WAITABLE_TIMER_OBJECT\n        if( stream->waitableTimer != NULL )\n            CloseHandle( stream->waitableTimer );\n#endif\n\n#ifndef PA_WIN_DS_USE_WMME_TIMER\n        if( stream->processingThreadCompleted != NULL )\n            CloseHandle( stream->processingThreadCompleted );\n#endif\n\n        if( stream->pDirectSoundOutputBuffer )\n        {\n            IDirectSoundBuffer_Stop( stream->pDirectSoundOutputBuffer );\n            IDirectSoundBuffer_Release( stream->pDirectSoundOutputBuffer );\n            stream->pDirectSoundOutputBuffer = NULL;\n        }\n\n        if( stream->pDirectSoundPrimaryBuffer )\n        {\n            IDirectSoundBuffer_Release( stream->pDirectSoundPrimaryBuffer );\n            stream->pDirectSoundPrimaryBuffer = NULL;\n        }\n\n        if( stream->pDirectSoundInputBuffer )\n        {\n            IDirectSoundCaptureBuffer_Stop( stream->pDirectSoundInputBuffer );\n            IDirectSoundCaptureBuffer_Release( stream->pDirectSoundInputBuffer );\n            stream->pDirectSoundInputBuffer = NULL;\n        }\n\n        if( stream->pDirectSoundCapture )\n        {\n            IDirectSoundCapture_Release( stream->pDirectSoundCapture );\n            stream->pDirectSoundCapture = NULL;\n        }\n\n        if( stream->pDirectSound )\n        {\n            IDirectSound_Release( stream->pDirectSound );\n            stream->pDirectSound = NULL;\n        }\n\n#ifdef PAWIN_USE_DIRECTSOUNDFULLDUPLEXCREATE\n        if( stream->pDirectSoundFullDuplex8 )\n        {\n            IDirectSoundFullDuplex_Release( stream->pDirectSoundFullDuplex8 );\n            stream->pDirectSoundFullDuplex8 = NULL;\n        }\n#endif\n        if( bufferProcessorIsInitialized )\n            PaUtil_TerminateBufferProcessor( &stream->bufferProcessor );\n\n        if( streamRepresentationIsInitialized )\n            PaUtil_TerminateStreamRepresentation( &stream->streamRepresentation );\n\n        PaUtil_FreeMemory( stream );\n    }\n\n    return result;\n}\n\n\n/************************************************************************************\n * Determine how much space can be safely written to in DS buffer.\n * Detect underflows and overflows.\n * Does not allow writing into safety gap maintained by DirectSound.\n */\nstatic HRESULT QueryOutputSpace( PaWinDsStream *stream, long *bytesEmpty )\n{\n    HRESULT hr;\n    DWORD   playCursor;\n    DWORD   writeCursor;\n    long    numBytesEmpty;\n    long    playWriteGap;\n    // Query to see how much room is in buffer.\n    hr = IDirectSoundBuffer_GetCurrentPosition( stream->pDirectSoundOutputBuffer,\n            &playCursor, &writeCursor );\n    if( hr != DS_OK )\n    {\n        return hr;\n    }\n\n    // Determine size of gap between playIndex and WriteIndex that we cannot write into.\n    playWriteGap = writeCursor - playCursor;\n    if( playWriteGap < 0 ) playWriteGap += stream->outputBufferSizeBytes; // unwrap\n\n    /* DirectSound doesn't have a large enough playCursor so we cannot detect wrap-around. */\n    /* Attempt to detect playCursor wrap-around and correct it. */\n    if( stream->outputIsRunning && (stream->perfCounterTicksPerBuffer.QuadPart != 0) )\n    {\n        /* How much time has elapsed since last check. */\n        LARGE_INTEGER   currentTime;\n        LARGE_INTEGER   elapsedTime;\n        long            bytesPlayed;\n        long            bytesExpected;\n        long            buffersWrapped;\n\n        QueryPerformanceCounter( &currentTime );\n        elapsedTime.QuadPart = currentTime.QuadPart - stream->previousPlayTime.QuadPart;\n        stream->previousPlayTime = currentTime;\n\n        /* How many bytes does DirectSound say have been played. */\n        bytesPlayed = playCursor - stream->previousPlayCursor;\n        if( bytesPlayed < 0 ) bytesPlayed += stream->outputBufferSizeBytes; // unwrap\n        stream->previousPlayCursor = playCursor;\n\n        /* Calculate how many bytes we would have expected to been played by now. */\n        bytesExpected = (long) ((elapsedTime.QuadPart * stream->outputBufferSizeBytes) / stream->perfCounterTicksPerBuffer.QuadPart);\n        buffersWrapped = (bytesExpected - bytesPlayed) / stream->outputBufferSizeBytes;\n        if( buffersWrapped > 0 )\n        {\n            playCursor += (buffersWrapped * stream->outputBufferSizeBytes);\n            bytesPlayed += (buffersWrapped * stream->outputBufferSizeBytes);\n        }\n    }\n    numBytesEmpty = playCursor - stream->outputBufferWriteOffsetBytes;\n    if( numBytesEmpty < 0 ) numBytesEmpty += stream->outputBufferSizeBytes; // unwrap offset\n\n    /* Have we underflowed? */\n    if( numBytesEmpty > (stream->outputBufferSizeBytes - playWriteGap) )\n    {\n        if( stream->outputIsRunning )\n        {\n            stream->outputUnderflowCount += 1;\n        }\n\n        /*\n            From MSDN:\n                The write cursor indicates the position at which it is safe\n            to write new data to the buffer. The write cursor always leads the\n            play cursor, typically by about 15 milliseconds' worth of audio\n            data.\n                It is always safe to change data that is behind the position\n            indicated by the lpdwCurrentPlayCursor parameter.\n        */\n\n        stream->outputBufferWriteOffsetBytes = writeCursor;\n        numBytesEmpty = stream->outputBufferSizeBytes - playWriteGap;\n    }\n    *bytesEmpty = numBytesEmpty;\n    return hr;\n}\n\n/***********************************************************************************/\nstatic int TimeSlice( PaWinDsStream *stream )\n{\n    long              numFrames = 0;\n    long              bytesEmpty = 0;\n    long              bytesFilled = 0;\n    long              bytesToXfer = 0;\n    long              framesToXfer = 0; /* the number of frames we'll process this tick */\n    long              numInFramesReady = 0;\n    long              numOutFramesReady = 0;\n    long              bytesProcessed;\n    HRESULT           hresult;\n    double            outputLatency = 0;\n    double            inputLatency = 0;\n    PaStreamCallbackTimeInfo timeInfo = {0,0,0};\n\n/* Input */\n    LPBYTE            lpInBuf1 = NULL;\n    LPBYTE            lpInBuf2 = NULL;\n    DWORD             dwInSize1 = 0;\n    DWORD             dwInSize2 = 0;\n/* Output */\n    LPBYTE            lpOutBuf1 = NULL;\n    LPBYTE            lpOutBuf2 = NULL;\n    DWORD             dwOutSize1 = 0;\n    DWORD             dwOutSize2 = 0;\n\n    /* How much input data is available? */\n    if( stream->bufferProcessor.inputChannelCount > 0 )\n    {\n        HRESULT hr;\n        DWORD capturePos;\n        DWORD readPos;\n        long  filled = 0;\n        // Query to see how much data is in buffer.\n        // We don't need the capture position but sometimes DirectSound doesn't handle NULLS correctly\n        // so let's pass a pointer just to be safe.\n        hr = IDirectSoundCaptureBuffer_GetCurrentPosition( stream->pDirectSoundInputBuffer, &capturePos, &readPos );\n        if( hr == DS_OK )\n        {\n            filled = readPos - stream->readOffset;\n            if( filled < 0 ) filled += stream->inputBufferSizeBytes; // unwrap offset\n            bytesFilled = filled;\n\n            inputLatency = ((double)bytesFilled) * stream->secondsPerHostByte;\n        }\n            // FIXME: what happens if IDirectSoundCaptureBuffer_GetCurrentPosition fails?\n\n        framesToXfer = numInFramesReady = bytesFilled / stream->inputFrameSizeBytes;\n\n        /** @todo Check for overflow */\n    }\n\n    /* How much output room is available? */\n    if( stream->bufferProcessor.outputChannelCount > 0 )\n    {\n        UINT previousUnderflowCount = stream->outputUnderflowCount;\n        QueryOutputSpace( stream, &bytesEmpty );\n        framesToXfer = numOutFramesReady = bytesEmpty / stream->outputFrameSizeBytes;\n\n        /* Check for underflow */\n        /* FIXME QueryOutputSpace should not adjust underflow count as a side effect.\n            A query function should be a const operator on the stream and return a flag on underflow. */\n        if( stream->outputUnderflowCount != previousUnderflowCount )\n            stream->callbackFlags |= paOutputUnderflow;\n\n        /* We are about to compute audio into the first byte of empty space in the output buffer.\n           This audio will reach the DAC after all of the current (non-empty) audio\n           in the buffer has played. Therefore the output time is the current time\n           plus the time it takes to play the non-empty bytes in the buffer,\n           computed here:\n        */\n        outputLatency = ((double)(stream->outputBufferSizeBytes - bytesEmpty)) * stream->secondsPerHostByte;\n    }\n\n    /* if it's a full duplex stream, set framesToXfer to the minimum of input and output frames ready */\n    if( stream->bufferProcessor.inputChannelCount > 0 && stream->bufferProcessor.outputChannelCount > 0 )\n    {\n        framesToXfer = (numOutFramesReady < numInFramesReady) ? numOutFramesReady : numInFramesReady;\n    }\n\n    if( framesToXfer > 0 )\n    {\n        PaUtil_BeginCpuLoadMeasurement( &stream->cpuLoadMeasurer );\n\n    /* The outputBufferDacTime parameter should indicates the time at which\n        the first sample of the output buffer is heard at the DACs. */\n        timeInfo.currentTime = PaUtil_GetTime();\n\n        PaUtil_BeginBufferProcessing( &stream->bufferProcessor, &timeInfo, stream->callbackFlags );\n        stream->callbackFlags = 0;\n\n    /* Input */\n        if( stream->bufferProcessor.inputChannelCount > 0 )\n        {\n            timeInfo.inputBufferAdcTime = timeInfo.currentTime - inputLatency;\n\n            bytesToXfer = framesToXfer * stream->inputFrameSizeBytes;\n            hresult = IDirectSoundCaptureBuffer_Lock ( stream->pDirectSoundInputBuffer,\n                stream->readOffset, bytesToXfer,\n                (void **) &lpInBuf1, &dwInSize1,\n                (void **) &lpInBuf2, &dwInSize2, 0);\n            if (hresult != DS_OK)\n            {\n                ERR_RPT((\"DirectSound IDirectSoundCaptureBuffer_Lock failed, hresult = 0x%x\\n\",hresult));\n                /* PA_DS_SET_LAST_DIRECTSOUND_ERROR( hresult ); */\n                PaUtil_ResetBufferProcessor( &stream->bufferProcessor ); /* flush the buffer processor */\n                stream->callbackResult = paComplete;\n                goto error2;\n            }\n\n            numFrames = dwInSize1 / stream->inputFrameSizeBytes;\n            PaUtil_SetInputFrameCount( &stream->bufferProcessor, numFrames );\n            PaUtil_SetInterleavedInputChannels( &stream->bufferProcessor, 0, lpInBuf1, 0 );\n        /* Is input split into two regions. */\n            if( dwInSize2 > 0 )\n            {\n                numFrames = dwInSize2 / stream->inputFrameSizeBytes;\n                PaUtil_Set2ndInputFrameCount( &stream->bufferProcessor, numFrames );\n                PaUtil_Set2ndInterleavedInputChannels( &stream->bufferProcessor, 0, lpInBuf2, 0 );\n            }\n        }\n\n    /* Output */\n        if( stream->bufferProcessor.outputChannelCount > 0 )\n        {\n            /*\n            We don't currently add outputLatency here because it appears to produce worse\n            results than not adding it. Need to do more testing to verify this.\n            */\n            /* timeInfo.outputBufferDacTime = timeInfo.currentTime + outputLatency; */\n            timeInfo.outputBufferDacTime = timeInfo.currentTime;\n\n            bytesToXfer = framesToXfer * stream->outputFrameSizeBytes;\n            hresult = IDirectSoundBuffer_Lock ( stream->pDirectSoundOutputBuffer,\n                stream->outputBufferWriteOffsetBytes, bytesToXfer,\n                (void **) &lpOutBuf1, &dwOutSize1,\n                (void **) &lpOutBuf2, &dwOutSize2, 0);\n            if (hresult != DS_OK)\n            {\n                ERR_RPT((\"DirectSound IDirectSoundBuffer_Lock failed, hresult = 0x%x\\n\",hresult));\n                /* PA_DS_SET_LAST_DIRECTSOUND_ERROR( hresult ); */\n                PaUtil_ResetBufferProcessor( &stream->bufferProcessor ); /* flush the buffer processor */\n                stream->callbackResult = paComplete;\n                goto error1;\n            }\n\n            numFrames = dwOutSize1 / stream->outputFrameSizeBytes;\n            PaUtil_SetOutputFrameCount( &stream->bufferProcessor, numFrames );\n            PaUtil_SetInterleavedOutputChannels( &stream->bufferProcessor, 0, lpOutBuf1, 0 );\n\n        /* Is output split into two regions. */\n            if( dwOutSize2 > 0 )\n            {\n                numFrames = dwOutSize2 / stream->outputFrameSizeBytes;\n                PaUtil_Set2ndOutputFrameCount( &stream->bufferProcessor, numFrames );\n                PaUtil_Set2ndInterleavedOutputChannels( &stream->bufferProcessor, 0, lpOutBuf2, 0 );\n            }\n        }\n\n        numFrames = PaUtil_EndBufferProcessing( &stream->bufferProcessor, &stream->callbackResult );\n        stream->framesWritten += numFrames;\n\n        if( stream->bufferProcessor.outputChannelCount > 0 )\n        {\n        /* FIXME: an underflow could happen here */\n\n        /* Update our buffer offset and unlock sound buffer */\n            bytesProcessed = numFrames * stream->outputFrameSizeBytes;\n            stream->outputBufferWriteOffsetBytes = (stream->outputBufferWriteOffsetBytes + bytesProcessed) % stream->outputBufferSizeBytes;\n            IDirectSoundBuffer_Unlock( stream->pDirectSoundOutputBuffer, lpOutBuf1, dwOutSize1, lpOutBuf2, dwOutSize2);\n        }\n\nerror1:\n        if( stream->bufferProcessor.inputChannelCount > 0 )\n        {\n        /* FIXME: an overflow could happen here */\n\n        /* Update our buffer offset and unlock sound buffer */\n            bytesProcessed = numFrames * stream->inputFrameSizeBytes;\n            stream->readOffset = (stream->readOffset + bytesProcessed) % stream->inputBufferSizeBytes;\n            IDirectSoundCaptureBuffer_Unlock( stream->pDirectSoundInputBuffer, lpInBuf1, dwInSize1, lpInBuf2, dwInSize2);\n        }\nerror2:\n\n        PaUtil_EndCpuLoadMeasurement( &stream->cpuLoadMeasurer, numFrames );\n    }\n\n    if( stream->callbackResult == paComplete && !PaUtil_IsBufferProcessorOutputEmpty( &stream->bufferProcessor ) )\n    {\n        /* don't return completed until the buffer processor has been drained */\n        return paContinue;\n    }\n    else\n    {\n        return stream->callbackResult;\n    }\n}\n/*******************************************************************/\n\nstatic HRESULT ZeroAvailableOutputSpace( PaWinDsStream *stream )\n{\n    HRESULT hr;\n    LPBYTE lpbuf1 = NULL;\n    LPBYTE lpbuf2 = NULL;\n    DWORD dwsize1 = 0;\n    DWORD dwsize2 = 0;\n    long  bytesEmpty;\n    hr = QueryOutputSpace( stream, &bytesEmpty );\n    if (hr != DS_OK) return hr;\n    if( bytesEmpty == 0 ) return DS_OK;\n    // Lock free space in the DS\n    hr = IDirectSoundBuffer_Lock( stream->pDirectSoundOutputBuffer, stream->outputBufferWriteOffsetBytes,\n                                    bytesEmpty, (void **) &lpbuf1, &dwsize1,\n                                    (void **) &lpbuf2, &dwsize2, 0);\n    if (hr == DS_OK)\n    {\n        // Copy the buffer into the DS\n        ZeroMemory(lpbuf1, dwsize1);\n        if(lpbuf2 != NULL)\n        {\n            ZeroMemory(lpbuf2, dwsize2);\n        }\n        // Update our buffer offset and unlock sound buffer\n        stream->outputBufferWriteOffsetBytes = (stream->outputBufferWriteOffsetBytes + dwsize1 + dwsize2) % stream->outputBufferSizeBytes;\n        IDirectSoundBuffer_Unlock( stream->pDirectSoundOutputBuffer, lpbuf1, dwsize1, lpbuf2, dwsize2);\n\n        stream->finalZeroBytesWritten += dwsize1 + dwsize2;\n    }\n    return hr;\n}\n\n\nstatic void CALLBACK TimerCallback(UINT uID, UINT uMsg, DWORD_PTR dwUser, DWORD dw1, DWORD dw2)\n{\n    PaWinDsStream *stream;\n    int isFinished = 0;\n\n    /* suppress unused variable warnings */\n    (void) uID;\n    (void) uMsg;\n    (void) dw1;\n    (void) dw2;\n\n    stream = (PaWinDsStream *) dwUser;\n    if( stream == NULL ) return;\n\n    if( stream->isActive )\n    {\n        if( stream->abortProcessing )\n        {\n            isFinished = 1;\n        }\n        else if( stream->stopProcessing )\n        {\n            if( stream->bufferProcessor.outputChannelCount > 0 )\n            {\n                ZeroAvailableOutputSpace( stream );\n                if( stream->finalZeroBytesWritten >= stream->outputBufferSizeBytes )\n                {\n                    /* once we've flushed the whole output buffer with zeros we know all data has been played */\n                    isFinished = 1;\n                }\n            }\n            else\n            {\n                isFinished = 1;\n            }\n        }\n        else\n        {\n            int callbackResult = TimeSlice( stream );\n            if( callbackResult != paContinue )\n            {\n                /* FIXME implement handling of paComplete and paAbort if possible\n                   At the moment this should behave as if paComplete was called and\n                   flush the buffer.\n                */\n\n                stream->stopProcessing = 1;\n            }\n        }\n\n        if( isFinished )\n        {\n            if( stream->streamRepresentation.streamFinishedCallback != 0 )\n                stream->streamRepresentation.streamFinishedCallback( stream->streamRepresentation.userData );\n\n            stream->isActive = 0; /* don't set this until the stream really is inactive */\n            SetEvent( stream->processingCompleted );\n        }\n    }\n}\n\n#ifndef PA_WIN_DS_USE_WMME_TIMER\n\n#ifdef PA_WIN_DS_USE_WAITABLE_TIMER_OBJECT\n\nstatic void CALLBACK WaitableTimerAPCProc(\n   LPVOID lpArg,               // Data value\n   DWORD dwTimerLowValue,      // Timer low value\n   DWORD dwTimerHighValue )    // Timer high value\n\n{\n    (void)dwTimerLowValue;\n    (void)dwTimerHighValue;\n\n    TimerCallback( 0, 0, (DWORD_PTR)lpArg, 0, 0 );\n}\n\n#endif /* PA_WIN_DS_USE_WAITABLE_TIMER_OBJECT */\n\n\nPA_THREAD_FUNC ProcessingThreadProc( void *pArg )\n{\n    PaWinDsStream *stream = (PaWinDsStream *)pArg;\n    LARGE_INTEGER dueTime;\n    int timerPeriodMs;\n\n    timerPeriodMs = (int)(stream->pollingPeriodSeconds * MSECS_PER_SECOND);\n    if( timerPeriodMs < 1 )\n        timerPeriodMs = 1;\n\n#ifdef PA_WIN_DS_USE_WAITABLE_TIMER_OBJECT\n    assert( stream->waitableTimer != NULL );\n\n    /* invoke first timeout immediately */\n    dueTime.LowPart = timerPeriodMs * 1000 * 10;\n    dueTime.HighPart = 0;\n\n    /* tick using waitable timer */\n    if( SetWaitableTimer( stream->waitableTimer, &dueTime, timerPeriodMs, WaitableTimerAPCProc, pArg, FALSE ) != 0 )\n    {\n        DWORD wfsoResult = 0;\n        do\n        {\n            /* wait for processingCompleted to be signaled or our timer APC to be called */\n            wfsoResult = WaitForSingleObjectEx( stream->processingCompleted, timerPeriodMs * 10, /* alertable = */ TRUE );\n\n        }while( wfsoResult == WAIT_TIMEOUT || wfsoResult == WAIT_IO_COMPLETION );\n    }\n\n    CancelWaitableTimer( stream->waitableTimer );\n\n#else\n\n    /* tick using WaitForSingleObject timeout */\n    while ( WaitForSingleObject( stream->processingCompleted, timerPeriodMs ) == WAIT_TIMEOUT )\n    {\n        TimerCallback( 0, 0, (DWORD_PTR)pArg, 0, 0 );\n    }\n#endif /* PA_WIN_DS_USE_WAITABLE_TIMER_OBJECT */\n\n    SetEvent( stream->processingThreadCompleted );\n\n    return 0;\n}\n\n#endif /* !PA_WIN_DS_USE_WMME_TIMER */\n\n/***********************************************************************************\n    When CloseStream() is called, the multi-api layer ensures that\n    the stream has already been stopped or aborted.\n*/\nstatic PaError CloseStream( PaStream* s )\n{\n    PaError result = paNoError;\n    PaWinDsStream *stream = (PaWinDsStream*)s;\n\n    CloseHandle( stream->processingCompleted );\n\n#ifdef PA_WIN_DS_USE_WAITABLE_TIMER_OBJECT\n    if( stream->waitableTimer != NULL )\n        CloseHandle( stream->waitableTimer );\n#endif\n\n#ifndef PA_WIN_DS_USE_WMME_TIMER\n    CloseHandle( stream->processingThreadCompleted );\n#endif\n\n    // Cleanup the sound buffers\n    if( stream->pDirectSoundOutputBuffer )\n    {\n        IDirectSoundBuffer_Stop( stream->pDirectSoundOutputBuffer );\n        IDirectSoundBuffer_Release( stream->pDirectSoundOutputBuffer );\n        stream->pDirectSoundOutputBuffer = NULL;\n    }\n\n    if( stream->pDirectSoundPrimaryBuffer )\n    {\n        IDirectSoundBuffer_Release( stream->pDirectSoundPrimaryBuffer );\n        stream->pDirectSoundPrimaryBuffer = NULL;\n    }\n\n    if( stream->pDirectSoundInputBuffer )\n    {\n        IDirectSoundCaptureBuffer_Stop( stream->pDirectSoundInputBuffer );\n        IDirectSoundCaptureBuffer_Release( stream->pDirectSoundInputBuffer );\n        stream->pDirectSoundInputBuffer = NULL;\n    }\n\n    if( stream->pDirectSoundCapture )\n    {\n        IDirectSoundCapture_Release( stream->pDirectSoundCapture );\n        stream->pDirectSoundCapture = NULL;\n    }\n\n    if( stream->pDirectSound )\n    {\n        IDirectSound_Release( stream->pDirectSound );\n        stream->pDirectSound = NULL;\n    }\n\n#ifdef PAWIN_USE_DIRECTSOUNDFULLDUPLEXCREATE\n    if( stream->pDirectSoundFullDuplex8 )\n    {\n        IDirectSoundFullDuplex_Release( stream->pDirectSoundFullDuplex8 );\n        stream->pDirectSoundFullDuplex8 = NULL;\n    }\n#endif\n\n    PaUtil_TerminateBufferProcessor( &stream->bufferProcessor );\n    PaUtil_TerminateStreamRepresentation( &stream->streamRepresentation );\n    PaUtil_FreeMemory( stream );\n\n    return result;\n}\n\n/***********************************************************************************/\nstatic HRESULT ClearOutputBuffer( PaWinDsStream *stream )\n{\n    PaError          result = paNoError;\n    unsigned char*   pDSBuffData;\n    DWORD            dwDataLen;\n    HRESULT          hr;\n\n    hr = IDirectSoundBuffer_SetCurrentPosition( stream->pDirectSoundOutputBuffer, 0 );\n    DBUG((\"PaHost_ClearOutputBuffer: IDirectSoundBuffer_SetCurrentPosition returned = 0x%X.\\n\", hr));\n    if( hr != DS_OK )\n        return hr;\n\n    // Lock the DS buffer\n    if ((hr = IDirectSoundBuffer_Lock( stream->pDirectSoundOutputBuffer, 0, stream->outputBufferSizeBytes, (LPVOID*)&pDSBuffData,\n                                           &dwDataLen, NULL, 0, 0)) != DS_OK )\n        return hr;\n\n    // Zero the DS buffer\n    ZeroMemory(pDSBuffData, dwDataLen);\n    // Unlock the DS buffer\n    if ((hr = IDirectSoundBuffer_Unlock( stream->pDirectSoundOutputBuffer, pDSBuffData, dwDataLen, NULL, 0)) != DS_OK)\n        return hr;\n\n    // Let DSound set the starting write position because if we set it to zero, it looks like the\n    // buffer is full to begin with. This causes a long pause before sound starts when using large buffers.\n    if ((hr = IDirectSoundBuffer_GetCurrentPosition( stream->pDirectSoundOutputBuffer,\n            &stream->previousPlayCursor, &stream->outputBufferWriteOffsetBytes )) != DS_OK)\n        return hr;\n\n    /* printf(\"DSW_InitOutputBuffer: playCursor = %d, writeCursor = %d\\n\", playCursor, dsw->dsw_WriteOffset ); */\n\n    return DS_OK;\n}\n\nstatic PaError StartStream( PaStream *s )\n{\n    PaError          result = paNoError;\n    PaWinDsStream   *stream = (PaWinDsStream*)s;\n    HRESULT          hr;\n\n    stream->callbackResult = paContinue;\n    PaUtil_ResetBufferProcessor( &stream->bufferProcessor );\n\n    ResetEvent( stream->processingCompleted );\n\n#ifndef PA_WIN_DS_USE_WMME_TIMER\n    ResetEvent( stream->processingThreadCompleted );\n#endif\n\n    if( stream->bufferProcessor.inputChannelCount > 0 )\n    {\n        // Start the buffer capture\n        if( stream->pDirectSoundInputBuffer != NULL ) // FIXME: not sure this check is necessary\n        {\n            hr = IDirectSoundCaptureBuffer_Start( stream->pDirectSoundInputBuffer, DSCBSTART_LOOPING );\n        }\n\n        DBUG((\"StartStream: DSW_StartInput returned = 0x%X.\\n\", hr));\n        if( hr != DS_OK )\n        {\n            result = paUnanticipatedHostError;\n            PA_DS_SET_LAST_DIRECTSOUND_ERROR( hr );\n            goto error;\n        }\n    }\n\n    stream->framesWritten = 0;\n    stream->callbackFlags = 0;\n\n    stream->abortProcessing = 0;\n    stream->stopProcessing = 0;\n\n    if( stream->bufferProcessor.outputChannelCount > 0 )\n    {\n        QueryPerformanceCounter( &stream->previousPlayTime );\n        stream->finalZeroBytesWritten = 0;\n\n        hr = ClearOutputBuffer( stream );\n        if( hr != DS_OK )\n        {\n            result = paUnanticipatedHostError;\n            PA_DS_SET_LAST_DIRECTSOUND_ERROR( hr );\n            goto error;\n        }\n\n        if( stream->streamRepresentation.streamCallback && (stream->streamFlags & paPrimeOutputBuffersUsingStreamCallback) )\n        {\n            stream->callbackFlags = paPrimingOutput;\n\n            TimeSlice( stream );\n            /* we ignore the return value from TimeSlice here and start the stream as usual.\n                The first timer callback will detect if the callback has completed. */\n\n            stream->callbackFlags = 0;\n        }\n\n        // Start the buffer playback in a loop.\n        if( stream->pDirectSoundOutputBuffer != NULL ) // FIXME: not sure this needs to be checked here\n        {\n            hr = IDirectSoundBuffer_Play( stream->pDirectSoundOutputBuffer, 0, 0, DSBPLAY_LOOPING );\n            DBUG((\"PaHost_StartOutput: IDirectSoundBuffer_Play returned = 0x%X.\\n\", hr));\n            if( hr != DS_OK )\n            {\n                result = paUnanticipatedHostError;\n                PA_DS_SET_LAST_DIRECTSOUND_ERROR( hr );\n                goto error;\n            }\n            stream->outputIsRunning = TRUE;\n        }\n    }\n\n    if( stream->streamRepresentation.streamCallback )\n    {\n        TIMECAPS timecaps;\n        int timerPeriodMs = (int)(stream->pollingPeriodSeconds * MSECS_PER_SECOND);\n        if( timerPeriodMs < 1 )\n            timerPeriodMs = 1;\n\n        /* set windows scheduler granularity only as fine as needed, no finer */\n        /* Although this is not fully documented by MS, it appears that\n           timeBeginPeriod() affects the scheduling granulatity of all timers\n           including Waitable Timer Objects. So we always call timeBeginPeriod, whether\n           we're using an MM timer callback via timeSetEvent or not.\n        */\n        assert( stream->systemTimerResolutionPeriodMs == 0 );\n        if( timeGetDevCaps( &timecaps, sizeof(TIMECAPS) ) == MMSYSERR_NOERROR && timecaps.wPeriodMin > 0 )\n        {\n            /* aim for resolution 4 times higher than polling rate */\n            stream->systemTimerResolutionPeriodMs = (UINT)((stream->pollingPeriodSeconds * MSECS_PER_SECOND) * .25);\n            if( stream->systemTimerResolutionPeriodMs < timecaps.wPeriodMin )\n                stream->systemTimerResolutionPeriodMs = timecaps.wPeriodMin;\n            if( stream->systemTimerResolutionPeriodMs > timecaps.wPeriodMax )\n                stream->systemTimerResolutionPeriodMs = timecaps.wPeriodMax;\n\n            if( timeBeginPeriod( stream->systemTimerResolutionPeriodMs ) != MMSYSERR_NOERROR )\n                stream->systemTimerResolutionPeriodMs = 0; /* timeBeginPeriod failed, so we don't need to call timeEndPeriod() later */\n        }\n\n\n#ifdef PA_WIN_DS_USE_WMME_TIMER\n        /* Create timer that will wake us up so we can fill the DSound buffer. */\n        /* We have deprecated timeSetEvent because all MM timer callbacks\n           are serialised onto a single thread. Which creates problems with multiple\n           PA streams, or when also using timers for other time critical tasks\n        */\n        stream->timerID = timeSetEvent( timerPeriodMs, stream->systemTimerResolutionPeriodMs, (LPTIMECALLBACK) TimerCallback,\n                                             (DWORD_PTR) stream, TIME_PERIODIC | TIME_KILL_SYNCHRONOUS );\n\n        if( stream->timerID == 0 )\n        {\n            stream->isActive = 0;\n            result = paUnanticipatedHostError;\n            PA_DS_SET_LAST_DIRECTSOUND_ERROR( GetLastError() );\n            goto error;\n        }\n#else\n        /* Create processing thread which calls TimerCallback */\n\n        stream->processingThread = CREATE_THREAD( 0, 0, ProcessingThreadProc, stream, 0, &stream->processingThreadId );\n        if( !stream->processingThread )\n        {\n            result = paUnanticipatedHostError;\n            PA_DS_SET_LAST_DIRECTSOUND_ERROR( GetLastError() );\n            goto error;\n        }\n\n        if( !SetThreadPriority( stream->processingThread, THREAD_PRIORITY_TIME_CRITICAL ) )\n        {\n            result = paUnanticipatedHostError;\n            PA_DS_SET_LAST_DIRECTSOUND_ERROR( GetLastError() );\n            goto error;\n        }\n#endif\n    }\n\n    stream->isActive = 1;\n    stream->isStarted = 1;\n\n    assert( result == paNoError );\n    return result;\n\nerror:\n\n    if( stream->pDirectSoundOutputBuffer != NULL && stream->outputIsRunning )\n        IDirectSoundBuffer_Stop( stream->pDirectSoundOutputBuffer );\n    stream->outputIsRunning = FALSE;\n\n#ifndef PA_WIN_DS_USE_WMME_TIMER\n    if( stream->processingThread )\n    {\n#ifdef CLOSE_THREAD_HANDLE\n        CLOSE_THREAD_HANDLE( stream->processingThread ); /* Delete thread. */\n#endif\n        stream->processingThread = NULL;\n    }\n#endif\n\n    return result;\n}\n\n\n/***********************************************************************************/\nstatic PaError StopStream( PaStream *s )\n{\n    PaError result = paNoError;\n    PaWinDsStream *stream = (PaWinDsStream*)s;\n    HRESULT          hr;\n    int timeoutMsec;\n\n    if( stream->streamRepresentation.streamCallback )\n    {\n        stream->stopProcessing = 1;\n\n        /* Set timeout at 4 times maximum time we might wait. */\n        timeoutMsec = (int) (4 * MSECS_PER_SECOND * (stream->hostBufferSizeFrames / stream->streamRepresentation.streamInfo.sampleRate));\n\n        WaitForSingleObject( stream->processingCompleted, timeoutMsec );\n    }\n\n#ifdef PA_WIN_DS_USE_WMME_TIMER\n    if( stream->timerID != 0 )\n    {\n        timeKillEvent(stream->timerID);  /* Stop callback timer. */\n        stream->timerID = 0;\n    }\n#else\n    if( stream->processingThread )\n    {\n        if( WaitForSingleObject( stream->processingThreadCompleted, 30*100 ) == WAIT_TIMEOUT )\n            return paUnanticipatedHostError;\n\n#ifdef CLOSE_THREAD_HANDLE\n        CloseHandle( stream->processingThread ); /* Delete thread. */\n        stream->processingThread = NULL;\n#endif\n\n    }\n#endif\n\n    if( stream->systemTimerResolutionPeriodMs > 0 ){\n        timeEndPeriod( stream->systemTimerResolutionPeriodMs );\n        stream->systemTimerResolutionPeriodMs = 0;\n    }\n\n    if( stream->bufferProcessor.outputChannelCount > 0 )\n    {\n        // Stop the buffer playback\n        if( stream->pDirectSoundOutputBuffer != NULL )\n        {\n            stream->outputIsRunning = FALSE;\n            // FIXME: what happens if IDirectSoundBuffer_Stop returns an error?\n            hr = IDirectSoundBuffer_Stop( stream->pDirectSoundOutputBuffer );\n\n            if( stream->pDirectSoundPrimaryBuffer )\n                IDirectSoundBuffer_Stop( stream->pDirectSoundPrimaryBuffer ); /* FIXME we never started the primary buffer so I'm not sure we need to stop it */\n        }\n    }\n\n    if( stream->bufferProcessor.inputChannelCount > 0 )\n    {\n        // Stop the buffer capture\n        if( stream->pDirectSoundInputBuffer != NULL )\n        {\n            // FIXME: what happens if IDirectSoundCaptureBuffer_Stop returns an error?\n            hr = IDirectSoundCaptureBuffer_Stop( stream->pDirectSoundInputBuffer );\n        }\n    }\n\n    stream->isStarted = 0;\n\n    return result;\n}\n\n\n/***********************************************************************************/\nstatic PaError AbortStream( PaStream *s )\n{\n    PaWinDsStream *stream = (PaWinDsStream*)s;\n\n    stream->abortProcessing = 1;\n    return StopStream( s );\n}\n\n\n/***********************************************************************************/\nstatic PaError IsStreamStopped( PaStream *s )\n{\n    PaWinDsStream *stream = (PaWinDsStream*)s;\n\n    return !stream->isStarted;\n}\n\n\n/***********************************************************************************/\nstatic PaError IsStreamActive( PaStream *s )\n{\n    PaWinDsStream *stream = (PaWinDsStream*)s;\n\n    return stream->isActive;\n}\n\n/***********************************************************************************/\nstatic PaTime GetStreamTime( PaStream *s )\n{\n    /* suppress unused variable warnings */\n    (void) s;\n\n    return PaUtil_GetTime();\n}\n\n\n/***********************************************************************************/\nstatic double GetStreamCpuLoad( PaStream* s )\n{\n    PaWinDsStream *stream = (PaWinDsStream*)s;\n\n    return PaUtil_GetCpuLoad( &stream->cpuLoadMeasurer );\n}\n\n\n/***********************************************************************************\n    As separate stream interfaces are used for blocking and callback\n    streams, the following functions can be guaranteed to only be called\n    for blocking streams.\n*/\n\nstatic PaError ReadStream( PaStream* s,\n                           void *buffer,\n                           unsigned long frames )\n{\n    PaWinDsStream *stream = (PaWinDsStream*)s;\n\n    /* suppress unused variable warnings */\n    (void) buffer;\n    (void) frames;\n    (void) stream;\n\n    /* IMPLEMENT ME, see portaudio.h for required behavior*/\n\n    return paNoError;\n}\n\n\n/***********************************************************************************/\nstatic PaError WriteStream( PaStream* s,\n                            const void *buffer,\n                            unsigned long frames )\n{\n    PaWinDsStream *stream = (PaWinDsStream*)s;\n\n    /* suppress unused variable warnings */\n    (void) buffer;\n    (void) frames;\n    (void) stream;\n\n    /* IMPLEMENT ME, see portaudio.h for required behavior*/\n\n    return paNoError;\n}\n\n\n/***********************************************************************************/\nstatic signed long GetStreamReadAvailable( PaStream* s )\n{\n    PaWinDsStream *stream = (PaWinDsStream*)s;\n\n    /* suppress unused variable warnings */\n    (void) stream;\n\n    /* IMPLEMENT ME, see portaudio.h for required behavior*/\n\n    return 0;\n}\n\n\n/***********************************************************************************/\nstatic signed long GetStreamWriteAvailable( PaStream* s )\n{\n    PaWinDsStream *stream = (PaWinDsStream*)s;\n\n    /* suppress unused variable warnings */\n    (void) stream;\n\n    /* IMPLEMENT ME, see portaudio.h for required behavior*/\n\n    return 0;\n}\n"
  },
  {
    "path": "thirdparty/portaudio/src/hostapi/dsound/pa_win_ds_dynlink.c",
    "content": "/*\n * Interface for dynamically loading directsound and providing a dummy\n * implementation if it isn't present.\n *\n * Author: Ross Bencina (some portions Phil Burk & Robert Marsanyi)\n *\n * For PortAudio Portable Real-Time Audio Library\n * For more information see: http://www.portaudio.com\n * Copyright (c) 1999-2006 Phil Burk, Robert Marsanyi and Ross Bencina\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n/**\n @file\n @ingroup hostapi_src\n*/\n\n#include \"pa_win_ds_dynlink.h\"\n#include \"pa_debugprint.h\"\n\nPaWinDsDSoundEntryPoints paWinDsDSoundEntryPoints = { 0, 0, 0, 0, 0, 0, 0 };\n\n\nstatic HRESULT WINAPI DummyDllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)\n{\n    (void)rclsid; /* unused parameter */\n    (void)riid; /* unused parameter */\n    (void)ppv; /* unused parameter */\n    return CLASS_E_CLASSNOTAVAILABLE;\n}\n\nstatic HRESULT WINAPI DummyDirectSoundCreate(LPGUID lpcGuidDevice, LPDIRECTSOUND *ppDS, LPUNKNOWN pUnkOuter)\n{\n    (void)lpcGuidDevice; /* unused parameter */\n    (void)ppDS; /* unused parameter */\n    (void)pUnkOuter; /* unused parameter */\n    return E_NOTIMPL;\n}\n\nstatic HRESULT WINAPI DummyDirectSoundEnumerateW(LPDSENUMCALLBACKW lpDSEnumCallback, LPVOID lpContext)\n{\n    (void)lpDSEnumCallback; /* unused parameter */\n    (void)lpContext; /* unused parameter */\n    return E_NOTIMPL;\n}\n\nstatic HRESULT WINAPI DummyDirectSoundEnumerateA(LPDSENUMCALLBACKA lpDSEnumCallback, LPVOID lpContext)\n{\n    (void)lpDSEnumCallback; /* unused parameter */\n    (void)lpContext; /* unused parameter */\n    return E_NOTIMPL;\n}\n\nstatic HRESULT WINAPI DummyDirectSoundCaptureCreate(LPGUID lpcGUID, LPDIRECTSOUNDCAPTURE *lplpDSC, LPUNKNOWN pUnkOuter)\n{\n    (void)lpcGUID; /* unused parameter */\n    (void)lplpDSC; /* unused parameter */\n    (void)pUnkOuter; /* unused parameter */\n    return E_NOTIMPL;\n}\n\nstatic HRESULT WINAPI DummyDirectSoundCaptureEnumerateW(LPDSENUMCALLBACKW lpDSCEnumCallback, LPVOID lpContext)\n{\n    (void)lpDSCEnumCallback; /* unused parameter */\n    (void)lpContext; /* unused parameter */\n    return E_NOTIMPL;\n}\n\nstatic HRESULT WINAPI DummyDirectSoundCaptureEnumerateA(LPDSENUMCALLBACKA lpDSCEnumCallback, LPVOID lpContext)\n{\n    (void)lpDSCEnumCallback; /* unused parameter */\n    (void)lpContext; /* unused parameter */\n    return E_NOTIMPL;\n}\n\n#ifdef PAWIN_USE_DIRECTSOUNDFULLDUPLEXCREATE\nstatic HRESULT WINAPI DummyDirectSoundFullDuplexCreate8(\n         LPCGUID pcGuidCaptureDevice,\n         LPCGUID pcGuidRenderDevice,\n         LPCDSCBUFFERDESC pcDSCBufferDesc,\n         LPCDSBUFFERDESC pcDSBufferDesc,\n         HWND hWnd,\n         DWORD dwLevel,\n         LPDIRECTSOUNDFULLDUPLEX * ppDSFD,\n         LPDIRECTSOUNDCAPTUREBUFFER8 * ppDSCBuffer8,\n         LPDIRECTSOUNDBUFFER8 * ppDSBuffer8,\n         LPUNKNOWN pUnkOuter)\n{\n    (void)pcGuidCaptureDevice; /* unused parameter */\n    (void)pcGuidRenderDevice; /* unused parameter */\n    (void)pcDSCBufferDesc; /* unused parameter */\n    (void)pcDSBufferDesc; /* unused parameter */\n    (void)hWnd; /* unused parameter */\n    (void)dwLevel; /* unused parameter */\n    (void)ppDSFD; /* unused parameter */\n    (void)ppDSCBuffer8; /* unused parameter */\n    (void)ppDSBuffer8; /* unused parameter */\n    (void)pUnkOuter; /* unused parameter */\n\n    return E_NOTIMPL;\n}\n#endif /* PAWIN_USE_DIRECTSOUNDFULLDUPLEXCREATE */\n\nvoid PaWinDs_InitializeDSoundEntryPoints(void)\n{\n    paWinDsDSoundEntryPoints.hInstance_ = LoadLibraryA(\"dsound.dll\");\n    if( paWinDsDSoundEntryPoints.hInstance_ != NULL )\n    {\n        paWinDsDSoundEntryPoints.DllGetClassObject =\n                (HRESULT (WINAPI *)(REFCLSID, REFIID , LPVOID *))\n                GetProcAddress( paWinDsDSoundEntryPoints.hInstance_, \"DllGetClassObject\" );\n        if( paWinDsDSoundEntryPoints.DllGetClassObject == NULL )\n            paWinDsDSoundEntryPoints.DllGetClassObject = DummyDllGetClassObject;\n\n        paWinDsDSoundEntryPoints.DirectSoundCreate =\n                (HRESULT (WINAPI *)(LPGUID, LPDIRECTSOUND *, LPUNKNOWN))\n                GetProcAddress( paWinDsDSoundEntryPoints.hInstance_, \"DirectSoundCreate\" );\n        if( paWinDsDSoundEntryPoints.DirectSoundCreate == NULL )\n            paWinDsDSoundEntryPoints.DirectSoundCreate = DummyDirectSoundCreate;\n\n        paWinDsDSoundEntryPoints.DirectSoundEnumerateW =\n                (HRESULT (WINAPI *)(LPDSENUMCALLBACKW, LPVOID))\n                GetProcAddress( paWinDsDSoundEntryPoints.hInstance_, \"DirectSoundEnumerateW\" );\n        if( paWinDsDSoundEntryPoints.DirectSoundEnumerateW == NULL )\n            paWinDsDSoundEntryPoints.DirectSoundEnumerateW = DummyDirectSoundEnumerateW;\n\n        paWinDsDSoundEntryPoints.DirectSoundEnumerateA =\n                (HRESULT (WINAPI *)(LPDSENUMCALLBACKA, LPVOID))\n                GetProcAddress( paWinDsDSoundEntryPoints.hInstance_, \"DirectSoundEnumerateA\" );\n        if( paWinDsDSoundEntryPoints.DirectSoundEnumerateA == NULL )\n            paWinDsDSoundEntryPoints.DirectSoundEnumerateA = DummyDirectSoundEnumerateA;\n\n        paWinDsDSoundEntryPoints.DirectSoundCaptureCreate =\n                (HRESULT (WINAPI *)(LPGUID, LPDIRECTSOUNDCAPTURE *, LPUNKNOWN))\n                GetProcAddress( paWinDsDSoundEntryPoints.hInstance_, \"DirectSoundCaptureCreate\" );\n        if( paWinDsDSoundEntryPoints.DirectSoundCaptureCreate == NULL )\n            paWinDsDSoundEntryPoints.DirectSoundCaptureCreate = DummyDirectSoundCaptureCreate;\n\n        paWinDsDSoundEntryPoints.DirectSoundCaptureEnumerateW =\n                (HRESULT (WINAPI *)(LPDSENUMCALLBACKW, LPVOID))\n                GetProcAddress( paWinDsDSoundEntryPoints.hInstance_, \"DirectSoundCaptureEnumerateW\" );\n        if( paWinDsDSoundEntryPoints.DirectSoundCaptureEnumerateW == NULL )\n            paWinDsDSoundEntryPoints.DirectSoundCaptureEnumerateW = DummyDirectSoundCaptureEnumerateW;\n\n        paWinDsDSoundEntryPoints.DirectSoundCaptureEnumerateA =\n                (HRESULT (WINAPI *)(LPDSENUMCALLBACKA, LPVOID))\n                GetProcAddress( paWinDsDSoundEntryPoints.hInstance_, \"DirectSoundCaptureEnumerateA\" );\n        if( paWinDsDSoundEntryPoints.DirectSoundCaptureEnumerateA == NULL )\n            paWinDsDSoundEntryPoints.DirectSoundCaptureEnumerateA = DummyDirectSoundCaptureEnumerateA;\n\n#ifdef PAWIN_USE_DIRECTSOUNDFULLDUPLEXCREATE\n        paWinDsDSoundEntryPoints.DirectSoundFullDuplexCreate8 =\n                (HRESULT (WINAPI *)(LPCGUID, LPCGUID, LPCDSCBUFFERDESC, LPCDSBUFFERDESC,\n                                    HWND, DWORD, LPDIRECTSOUNDFULLDUPLEX *, LPDIRECTSOUNDCAPTUREBUFFER8 *,\n                                    LPDIRECTSOUNDBUFFER8 *, LPUNKNOWN))\n                GetProcAddress( paWinDsDSoundEntryPoints.hInstance_, \"DirectSoundFullDuplexCreate\" );\n        if( paWinDsDSoundEntryPoints.DirectSoundFullDuplexCreate8 == NULL )\n            paWinDsDSoundEntryPoints.DirectSoundFullDuplexCreate8 = DummyDirectSoundFullDuplexCreate8;\n#endif\n    }\n    else\n    {\n        DWORD errorCode = GetLastError(); // 126 (0x7E) == ERROR_MOD_NOT_FOUND\n        PA_DEBUG((\"Couldn't load dsound.dll error code: %d \\n\",errorCode));\n\n        /* initialize with dummy entry points to make live easy when ds isn't present */\n        paWinDsDSoundEntryPoints.DirectSoundCreate = DummyDirectSoundCreate;\n        paWinDsDSoundEntryPoints.DirectSoundEnumerateW = DummyDirectSoundEnumerateW;\n        paWinDsDSoundEntryPoints.DirectSoundEnumerateA = DummyDirectSoundEnumerateA;\n        paWinDsDSoundEntryPoints.DirectSoundCaptureCreate = DummyDirectSoundCaptureCreate;\n        paWinDsDSoundEntryPoints.DirectSoundCaptureEnumerateW = DummyDirectSoundCaptureEnumerateW;\n        paWinDsDSoundEntryPoints.DirectSoundCaptureEnumerateA = DummyDirectSoundCaptureEnumerateA;\n#ifdef PAWIN_USE_DIRECTSOUNDFULLDUPLEXCREATE\n        paWinDsDSoundEntryPoints.DirectSoundFullDuplexCreate8 = DummyDirectSoundFullDuplexCreate8;\n#endif\n    }\n}\n\n\nvoid PaWinDs_TerminateDSoundEntryPoints(void)\n{\n    if( paWinDsDSoundEntryPoints.hInstance_ != NULL )\n    {\n        /* ensure that we crash reliably if the entry points aren't initialised */\n        paWinDsDSoundEntryPoints.DirectSoundCreate = 0;\n        paWinDsDSoundEntryPoints.DirectSoundEnumerateW = 0;\n        paWinDsDSoundEntryPoints.DirectSoundEnumerateA = 0;\n        paWinDsDSoundEntryPoints.DirectSoundCaptureCreate = 0;\n        paWinDsDSoundEntryPoints.DirectSoundCaptureEnumerateW = 0;\n        paWinDsDSoundEntryPoints.DirectSoundCaptureEnumerateA = 0;\n\n        FreeLibrary( paWinDsDSoundEntryPoints.hInstance_ );\n        paWinDsDSoundEntryPoints.hInstance_ = NULL;\n    }\n}\n"
  },
  {
    "path": "thirdparty/portaudio/src/hostapi/dsound/pa_win_ds_dynlink.h",
    "content": "/*\n * Interface for dynamically loading directsound and providing a dummy\n * implementation if it isn't present.\n *\n * Author: Ross Bencina (some portions Phil Burk & Robert Marsanyi)\n *\n * For PortAudio Portable Real-Time Audio Library\n * For more information see: http://www.portaudio.com\n * Copyright (c) 1999-2006 Phil Burk, Robert Marsanyi and Ross Bencina\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n/**\n @file\n @ingroup hostapi_src\n*/\n\n#ifndef INCLUDED_PA_DSOUND_DYNLINK_H\n#define INCLUDED_PA_DSOUND_DYNLINK_H\n\n/* on Borland compilers, WIN32 doesn't seem to be defined by default, which\n    breaks dsound.h. Adding the define here fixes the problem. - rossb. */\n#ifdef __BORLANDC__\n#if !defined(WIN32)\n#define WIN32\n#endif\n#endif\n\n/*\n  Use the earliest version of DX required, no need to pollute the namespace\n*/\n#ifdef PAWIN_USE_DIRECTSOUNDFULLDUPLEXCREATE\n#define DIRECTSOUND_VERSION 0x0800\n#else\n#define DIRECTSOUND_VERSION 0x0300\n#endif\n#include <dsound.h>\n\n#ifdef __cplusplus\nextern \"C\"\n{\n#endif /* __cplusplus */\n\n\ntypedef struct\n{\n    HINSTANCE hInstance_;\n\n    HRESULT (WINAPI *DllGetClassObject)(REFCLSID , REFIID , LPVOID *);\n\n    HRESULT (WINAPI *DirectSoundCreate)(LPGUID, LPDIRECTSOUND *, LPUNKNOWN);\n    HRESULT (WINAPI *DirectSoundEnumerateW)(LPDSENUMCALLBACKW, LPVOID);\n    HRESULT (WINAPI *DirectSoundEnumerateA)(LPDSENUMCALLBACKA, LPVOID);\n\n    HRESULT (WINAPI *DirectSoundCaptureCreate)(LPGUID, LPDIRECTSOUNDCAPTURE *, LPUNKNOWN);\n    HRESULT (WINAPI *DirectSoundCaptureEnumerateW)(LPDSENUMCALLBACKW, LPVOID);\n    HRESULT (WINAPI *DirectSoundCaptureEnumerateA)(LPDSENUMCALLBACKA, LPVOID);\n\n#ifdef PAWIN_USE_DIRECTSOUNDFULLDUPLEXCREATE\n    HRESULT (WINAPI *DirectSoundFullDuplexCreate8)(\n                LPCGUID, LPCGUID, LPCDSCBUFFERDESC, LPCDSBUFFERDESC,\n                HWND, DWORD, LPDIRECTSOUNDFULLDUPLEX *, LPDIRECTSOUNDCAPTUREBUFFER8 *,\n                LPDIRECTSOUNDBUFFER8 *, LPUNKNOWN );\n#endif\n}PaWinDsDSoundEntryPoints;\n\nextern PaWinDsDSoundEntryPoints paWinDsDSoundEntryPoints;\n\nvoid PaWinDs_InitializeDSoundEntryPoints(void);\nvoid PaWinDs_TerminateDSoundEntryPoints(void);\n\n\n#ifdef __cplusplus\n}\n#endif /* __cplusplus */\n\n#endif /* INCLUDED_PA_DSOUND_DYNLINK_H */\n"
  },
  {
    "path": "thirdparty/portaudio/src/hostapi/jack/pa_jack.c",
    "content": "/*\n * $Id$\n * PortAudio Portable Real-Time Audio Library\n * Latest Version at: http://www.portaudio.com\n * JACK Implementation by Joshua Haberman\n *\n * Copyright (c) 2004 Stefan Westerfeld <stefan@space.twc.de>\n * Copyright (c) 2004 Arve Knudsen <aknuds-1@broadpark.no>\n * Copyright (c) 2002 Joshua Haberman <joshua@haberman.com>\n *\n * Based on the Open Source API proposed by Ross Bencina\n * Copyright (c) 1999-2002 Ross Bencina, Phil Burk\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n/**\n @file\n @ingroup hostapi_src\n*/\n\n#include <string.h>\n#include <regex.h>\n#include <stdlib.h>\n#include <stdio.h>\n#include <assert.h>\n#include <sys/types.h>\n#include <unistd.h>\n#include <errno.h>  /* EBUSY */\n#include <signal.h> /* sig_atomic_t */\n#include <math.h>\n#include <semaphore.h>\n\n#include <jack/types.h>\n#include <jack/jack.h>\n\n#include \"pa_util.h\"\n#include \"pa_hostapi.h\"\n#include \"pa_stream.h\"\n#include \"pa_process.h\"\n#include \"pa_allocation.h\"\n#include \"pa_cpuload.h\"\n#include \"pa_ringbuffer.h\"\n#include \"pa_debugprint.h\"\n\n#include \"pa_jack.h\"\n\nstatic pthread_t mainThread_;\nstatic char *jackErr_ = NULL;\nstatic const char* clientName_ = \"PortAudio\";\nstatic const char* port_regex_suffix = \":.*\";\n\n#define STRINGIZE_HELPER(expr) #expr\n#define STRINGIZE(expr) STRINGIZE_HELPER(expr)\n\n/* Check PaError */\n#define ENSURE_PA(expr) \\\n    do { \\\n        PaError paErr; \\\n        if( (paErr = (expr)) < paNoError ) \\\n        { \\\n            if( (paErr) == paUnanticipatedHostError && pthread_self() == mainThread_ ) \\\n            { \\\n                const char *err = jackErr_; \\\n                if (! err ) err = \"unknown error\"; \\\n                PaUtil_SetLastHostErrorInfo( paJACK, -1, err ); \\\n            } \\\n            PaUtil_DebugPrint(( \"Expression '\" #expr \"' failed in '\" __FILE__ \"', line: \" STRINGIZE( __LINE__ ) \"\\n\" )); \\\n            result = paErr; \\\n            goto error; \\\n        } \\\n    } while( 0 )\n\n#define UNLESS(expr, code) \\\n    do { \\\n        if( (expr) == 0 ) \\\n        { \\\n            if( (code) == paUnanticipatedHostError && pthread_self() == mainThread_ ) \\\n            { \\\n                const char *err = jackErr_; \\\n                if (!err) err = \"unknown error\"; \\\n                PaUtil_SetLastHostErrorInfo( paJACK, -1, err ); \\\n            } \\\n            PaUtil_DebugPrint(( \"Expression '\" #expr \"' failed in '\" __FILE__ \"', line: \" STRINGIZE( __LINE__ ) \"\\n\" )); \\\n            result = (code); \\\n            goto error; \\\n        } \\\n    } while( 0 )\n\n#define ASSERT_CALL(expr, success) \\\n    do { \\\n        int err = (expr); \\\n        assert( err == success ); \\\n    } while( 0 )\n\n/*\n * Functions that directly map to the PortAudio stream interface\n */\n\nstatic void Terminate( struct PaUtilHostApiRepresentation *hostApi );\nstatic PaError IsFormatSupported( struct PaUtilHostApiRepresentation *hostApi,\n                                  const PaStreamParameters *inputParameters,\n                                  const PaStreamParameters *outputParameters,\n                                  double sampleRate );\nstatic PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,\n                           PaStream** s,\n                           const PaStreamParameters *inputParameters,\n                           const PaStreamParameters *outputParameters,\n                           double sampleRate,\n                           unsigned long framesPerBuffer,\n                           PaStreamFlags streamFlags,\n                           PaStreamCallback *streamCallback,\n                           void *userData );\nstatic PaError CloseStream( PaStream* stream );\nstatic PaError StartStream( PaStream *stream );\nstatic PaError StopStream( PaStream *stream );\nstatic PaError AbortStream( PaStream *stream );\nstatic PaError IsStreamStopped( PaStream *s );\nstatic PaError IsStreamActive( PaStream *stream );\n/*static PaTime GetStreamInputLatency( PaStream *stream );*/\n/*static PaTime GetStreamOutputLatency( PaStream *stream );*/\nstatic PaTime GetStreamTime( PaStream *stream );\nstatic double GetStreamCpuLoad( PaStream* stream );\n\n\n/*\n * Data specific to this API\n */\n\nstruct PaJackStream;\n\ntypedef struct\n{\n    PaUtilHostApiRepresentation commonHostApiRep;\n    PaUtilStreamInterface callbackStreamInterface;\n    PaUtilStreamInterface blockingStreamInterface;\n\n    PaUtilAllocationGroup *deviceInfoMemory;\n\n    jack_client_t *jack_client;\n    int jack_buffer_size;\n    PaHostApiIndex hostApiIndex;\n\n    pthread_mutex_t mtx;\n    pthread_cond_t cond;\n    unsigned long inputBase, outputBase;\n\n    /* For dealing with the process thread */\n    volatile int xrun;     /* Received xrun notification from JACK? */\n    struct PaJackStream * volatile toAdd, * volatile toRemove;\n    struct PaJackStream *processQueue;\n    volatile sig_atomic_t jackIsDown;\n}\nPaJackHostApiRepresentation;\n\n/* PaJackStream - a stream data structure specifically for this implementation */\n\ntypedef struct PaJackStream\n{\n    PaUtilStreamRepresentation streamRepresentation;\n    PaUtilBufferProcessor bufferProcessor;\n    PaUtilCpuLoadMeasurer cpuLoadMeasurer;\n    PaJackHostApiRepresentation *hostApi;\n\n    /* our input and output ports */\n    jack_port_t **local_input_ports;\n    jack_port_t **local_output_ports;\n\n    /* the input and output ports of the client we are connecting to */\n    jack_port_t **remote_input_ports;\n    jack_port_t **remote_output_ports;\n\n    int num_incoming_connections;\n    int num_outgoing_connections;\n\n    jack_client_t *jack_client;\n\n    /* The stream is running if it's still producing samples.\n     * The stream is active if samples it produced are still being heard.\n     */\n    volatile sig_atomic_t is_running;\n    volatile sig_atomic_t is_active;\n    /* Used to signal processing thread that stream should start or stop, respectively */\n    volatile sig_atomic_t doStart, doStop, doAbort;\n\n    jack_nframes_t t0;\n\n    PaUtilAllocationGroup *stream_memory;\n\n    /* These are useful in the process callback */\n\n    int callbackResult;\n    int isSilenced;\n    int xrun;\n\n    /* These are useful for the blocking API */\n\n    int                     isBlockingStream;\n    PaUtilRingBuffer        inFIFO;\n    PaUtilRingBuffer        outFIFO;\n    volatile sig_atomic_t   data_available;\n    sem_t                   data_semaphore;\n    int                     bytesPerFrame;\n    int                     samplesPerFrame;\n\n    struct PaJackStream *next;\n}\nPaJackStream;\n\n/* In calls to jack_get_ports() this filter expression is used instead of \"\"\n * to prevent any other types (eg Midi ports etc) being listed */\n#define JACK_PORT_TYPE_FILTER \"audio\"\n\n#define TRUE 1\n#define FALSE 0\n\n/*\n * Functions specific to this API\n */\n\nstatic int JackCallback( jack_nframes_t frames, void *userData );\n\n\n/*\n *\n * Implementation\n *\n */\n\n/* ---- blocking emulation layer ---- */\n\n/* Allocate buffer. */\nstatic PaError BlockingInitFIFO( PaUtilRingBuffer *rbuf, long numFrames, long bytesPerFrame )\n{\n    long numBytes = numFrames * bytesPerFrame;\n    char *buffer = (char *) malloc( numBytes );\n    if( buffer == NULL ) return paInsufficientMemory;\n    memset( buffer, 0, numBytes );\n    return (PaError) PaUtil_InitializeRingBuffer( rbuf, 1, numBytes, buffer );\n}\n\n/* Free buffer. */\nstatic PaError BlockingTermFIFO( PaUtilRingBuffer *rbuf )\n{\n    if( rbuf->buffer ) free( rbuf->buffer );\n    rbuf->buffer = NULL;\n    return paNoError;\n}\n\nstatic int\nBlockingCallback( const void                      *inputBuffer,\n                  void                            *outputBuffer,\n                  unsigned long                    framesPerBuffer,\n                  const PaStreamCallbackTimeInfo*  timeInfo,\n                  PaStreamCallbackFlags            statusFlags,\n                  void                             *userData )\n{\n    struct PaJackStream *stream = (PaJackStream *)userData;\n    long numBytes = stream->bytesPerFrame * framesPerBuffer;\n\n    /* This may get called with NULL inputBuffer during initial setup. */\n    if( inputBuffer != NULL )\n    {\n        PaUtil_WriteRingBuffer( &stream->inFIFO, inputBuffer, numBytes );\n    }\n    if( outputBuffer != NULL )\n    {\n        int numRead = PaUtil_ReadRingBuffer( &stream->outFIFO, outputBuffer, numBytes );\n        /* Zero out remainder of buffer if we run out of data. */\n        memset( (char *)outputBuffer + numRead, 0, numBytes - numRead );\n    }\n\n    if( !stream->data_available )\n    {\n        stream->data_available = 1;\n        sem_post( &stream->data_semaphore );\n    }\n    return paContinue;\n}\n\nstatic PaError\nBlockingBegin( PaJackStream *stream, int minimum_buffer_size )\n{\n    long    doRead = 0;\n    long    doWrite = 0;\n    PaError result = paNoError;\n    long    numFrames;\n\n    doRead = stream->local_input_ports != NULL;\n    doWrite = stream->local_output_ports != NULL;\n    /* <FIXME> */\n    stream->samplesPerFrame = 2;\n    stream->bytesPerFrame = sizeof(float) * stream->samplesPerFrame;\n    /* </FIXME> */\n    numFrames = 32;\n    while (numFrames < minimum_buffer_size)\n        numFrames *= 2;\n\n    if( doRead )\n    {\n        ENSURE_PA( BlockingInitFIFO( &stream->inFIFO, numFrames, stream->bytesPerFrame ) );\n    }\n    if( doWrite )\n    {\n        long numBytes;\n\n        ENSURE_PA( BlockingInitFIFO( &stream->outFIFO, numFrames, stream->bytesPerFrame ) );\n\n        /* Make Write FIFO appear full initially. */\n        numBytes = PaUtil_GetRingBufferWriteAvailable( &stream->outFIFO );\n        PaUtil_AdvanceRingBufferWriteIndex( &stream->outFIFO, numBytes );\n    }\n\n    stream->data_available = 0;\n    sem_init( &stream->data_semaphore, 0, 0 );\n\nerror:\n    return result;\n}\n\nstatic void\nBlockingEnd( PaJackStream *stream )\n{\n    BlockingTermFIFO( &stream->inFIFO );\n    BlockingTermFIFO( &stream->outFIFO );\n\n    sem_destroy( &stream->data_semaphore );\n}\n\nstatic PaError BlockingReadStream( PaStream* s, void *data, unsigned long numFrames )\n{\n    PaError result = paNoError;\n    PaJackStream *stream = (PaJackStream *)s;\n\n    long bytesRead;\n    char *p = (char *) data;\n    long numBytes = stream->bytesPerFrame * numFrames;\n    while( numBytes > 0 )\n    {\n        bytesRead = PaUtil_ReadRingBuffer( &stream->inFIFO, p, numBytes );\n        numBytes -= bytesRead;\n        p += bytesRead;\n        if( numBytes > 0 )\n        {\n            /* see write for an explanation */\n            if( stream->data_available )\n                stream->data_available = 0;\n            else\n                sem_wait( &stream->data_semaphore );\n        }\n    }\n\n    return result;\n}\n\nstatic PaError BlockingWriteStream( PaStream* s, const void *data, unsigned long numFrames )\n{\n    PaError result = paNoError;\n    PaJackStream *stream = (PaJackStream *)s;\n    long bytesWritten;\n    char *p = (char *) data;\n    long numBytes = stream->bytesPerFrame * numFrames;\n    while( numBytes > 0 )\n    {\n        bytesWritten = PaUtil_WriteRingBuffer( &stream->outFIFO, p, numBytes );\n        numBytes -= bytesWritten;\n        p += bytesWritten;\n        if( numBytes > 0 )\n        {\n            /* we use the following algorithm:\n             *   (1) write data\n             *   (2) if some data didn't fit into the ringbuffer, set data_available to 0\n             *       to indicate to the audio that if space becomes available, we want to know\n             *   (3) retry to write data (because it might be that between (1) and (2)\n             *       new space in the buffer became available)\n             *   (4) if this failed, we are sure that the buffer is really empty and\n             *       we will definitely receive a notification when it becomes available\n             *       thus we can safely sleep\n             *\n             * if the algorithm bailed out in step (3) before, it leaks a count of 1\n             * on the semaphore; however, it doesn't matter, because if we block in (4),\n             * we also do it in a loop\n             */\n            if( stream->data_available )\n                stream->data_available = 0;\n            else\n                sem_wait( &stream->data_semaphore );\n        }\n    }\n\n    return result;\n}\n\nstatic signed long\nBlockingGetStreamReadAvailable( PaStream* s )\n{\n    PaJackStream *stream = (PaJackStream *)s;\n\n    int bytesFull = PaUtil_GetRingBufferReadAvailable( &stream->inFIFO );\n    return bytesFull / stream->bytesPerFrame;\n}\n\nstatic signed long\nBlockingGetStreamWriteAvailable( PaStream* s )\n{\n    PaJackStream *stream = (PaJackStream *)s;\n\n    int bytesEmpty = PaUtil_GetRingBufferWriteAvailable( &stream->outFIFO );\n    return bytesEmpty / stream->bytesPerFrame;\n}\n\nstatic PaError\nBlockingWaitEmpty( PaStream *s )\n{\n    PaJackStream *stream = (PaJackStream *)s;\n\n    while( PaUtil_GetRingBufferReadAvailable( &stream->outFIFO ) > 0 )\n    {\n        stream->data_available = 0;\n        sem_wait( &stream->data_semaphore );\n    }\n    return 0;\n}\n\n/* ---- jack driver ---- */\n\n/* copy null terminated string source to destination, escaping regex characters with '\\\\' in the process */\nstatic void copy_string_and_escape_regex_chars( char *destination, const char *source, size_t destbuffersize )\n{\n    assert( destination != source );\n    assert( destbuffersize > 0 );\n\n    char *dest = destination;\n    /* dest_stop is the last location that we can null-terminate the string */\n    char *dest_stop = destination + (destbuffersize - 1);\n\n    const char *src = source;\n\n    while ( *src != '\\0' && dest != dest_stop )\n    {\n        const char c = *src;\n        if ( strchr( \"\\\\()[]{}*+?|$^.\", c ) != NULL )\n        {\n            if( (dest + 1) == dest_stop )\n                break; /* only proceed if we can write both c and the escape */\n\n            *dest = '\\\\';\n            dest++;\n        }\n        *dest = c;\n        dest++;\n\n        src++;\n    }\n\n    *dest = '\\0';\n}\n\n/* BuildDeviceList():\n *\n * The process of determining a list of PortAudio \"devices\" from\n * JACK's client/port system is fairly involved, so it is separated\n * into its own routine.\n */\n\nstatic PaError BuildDeviceList( PaJackHostApiRepresentation *jackApi )\n{\n    /* Utility macros for the repetitive process of allocating memory */\n\n    /* JACK has no concept of a device.  To JACK, there are clients\n     * which have an arbitrary number of ports.  To make this\n     * intelligible to PortAudio clients, we will group each JACK client\n     * into a device, and make each port of that client a channel */\n\n    PaError result = paNoError;\n    PaUtilHostApiRepresentation *commonApi = &jackApi->commonHostApiRep;\n\n    const char **jack_ports = NULL;\n    char **client_names = NULL;\n    char *port_regex_string = NULL;\n    // In the worst case scenario, every character would be escaped, doubling the string size.\n    // Add 1 for null terminator.\n    size_t device_name_regex_escaped_size = jack_client_name_size() * 2 + 1;\n    size_t port_regex_size = device_name_regex_escaped_size + strlen(port_regex_suffix);\n    int port_index, client_index, i;\n    double globalSampleRate;\n    regex_t port_regex;\n    unsigned long numClients = 0, numPorts = 0;\n    char *tmp_client_name = NULL;\n\n    commonApi->info.defaultInputDevice = paNoDevice;\n    commonApi->info.defaultOutputDevice = paNoDevice;\n    commonApi->info.deviceCount = 0;\n\n    /* Parse the list of ports, using a regex to grab the client names */\n    ASSERT_CALL( regcomp( &port_regex, \"^[^:]*\", REG_EXTENDED ), 0 );\n\n    /* since we are rebuilding the list of devices, free all memory\n     * associated with the previous list */\n    PaUtil_FreeAllAllocations( jackApi->deviceInfoMemory );\n\n    port_regex_string = PaUtil_GroupAllocateMemory( jackApi->deviceInfoMemory, port_regex_size );\n    tmp_client_name = PaUtil_GroupAllocateMemory( jackApi->deviceInfoMemory, jack_client_name_size() );\n\n    /* We can only retrieve the list of clients indirectly, by first\n     * asking for a list of all ports, then parsing the port names\n     * according to the client_name:port_name convention (which is\n     * enforced by jackd)\n     * A: If jack_get_ports returns NULL, there's nothing for us to do */\n    UNLESS( (jack_ports = jack_get_ports( jackApi->jack_client, \"\", JACK_PORT_TYPE_FILTER, 0 )) && jack_ports[0], paNoError );\n    /* Find number of ports */\n    while( jack_ports[numPorts] )\n        ++numPorts;\n    /* At least there will be one port per client :) */\n    UNLESS( client_names = PaUtil_GroupAllocateMemory( jackApi->deviceInfoMemory, numPorts *\n                sizeof (char *) ), paInsufficientMemory );\n\n    /* Build a list of clients from the list of ports */\n    for( numClients = 0, port_index = 0; jack_ports[port_index] != NULL; port_index++ )\n    {\n        int client_seen = FALSE;\n        regmatch_t match_info;\n        const char *port = jack_ports[port_index];\n        PA_DEBUG(( \"JACK port found: %s\\n\", port ));\n\n        /* extract the client name from the port name, using a regex\n         * that parses the clientname:portname syntax */\n        UNLESS( !regexec( &port_regex, port, 1, &match_info, 0 ), paInternalError );\n        assert(match_info.rm_eo - match_info.rm_so < jack_client_name_size());\n        memcpy( tmp_client_name, port + match_info.rm_so,\n                match_info.rm_eo - match_info.rm_so );\n        tmp_client_name[match_info.rm_eo - match_info.rm_so] = '\\0';\n\n        /* do we know about this port's client yet? */\n        for( i = 0; i < numClients; i++ )\n        {\n            if( strcmp( tmp_client_name, client_names[i] ) == 0 )\n                client_seen = TRUE;\n        }\n\n        if (client_seen)\n            continue;   /* A: Nothing to see here, move along */\n\n        UNLESS( client_names[numClients] = (char*)PaUtil_GroupAllocateMemory( jackApi->deviceInfoMemory,\n                    strlen(tmp_client_name) + 1), paInsufficientMemory );\n\n        /* The alsa_pcm client should go in spot 0.  If this\n         * is the alsa_pcm client AND we are NOT about to put\n         * it in spot 0 put it in spot 0 and move whatever\n         * was already in spot 0 to the end. */\n        if( strcmp( \"alsa_pcm\", tmp_client_name ) == 0 && numClients > 0 )\n        {\n            /* alsa_pcm goes in spot 0 */\n            strcpy( client_names[ numClients ], client_names[0] );\n            strcpy( client_names[0], tmp_client_name );\n        }\n        else\n        {\n            /* put the new client at the end of the client list */\n            strcpy( client_names[ numClients ], tmp_client_name );\n        }\n        ++numClients;\n    }\n\n    /* Now we have a list of clients, which will become the list of\n     * PortAudio devices. */\n\n    /* there is one global sample rate all clients must conform to */\n\n    globalSampleRate = jack_get_sample_rate( jackApi->jack_client );\n    UNLESS( commonApi->deviceInfos = (PaDeviceInfo**)PaUtil_GroupAllocateMemory( jackApi->deviceInfoMemory,\n                sizeof(PaDeviceInfo*) * numClients ), paInsufficientMemory );\n\n    assert( commonApi->info.deviceCount == 0 );\n\n    /* Create a PaDeviceInfo structure for every client */\n    for( client_index = 0; client_index < numClients; client_index++ )\n    {\n        PaDeviceInfo *curDevInfo;\n        const char **clientPorts = NULL;\n\n        UNLESS( curDevInfo = (PaDeviceInfo*)PaUtil_GroupAllocateMemory( jackApi->deviceInfoMemory,\n                    sizeof(PaDeviceInfo) ), paInsufficientMemory );\n        UNLESS( curDevInfo->name = (char*)PaUtil_GroupAllocateMemory( jackApi->deviceInfoMemory,\n                    strlen(client_names[client_index]) + 1 ), paInsufficientMemory );\n        strcpy( (char *)curDevInfo->name, client_names[client_index] );\n\n        curDevInfo->structVersion = 2;\n        curDevInfo->hostApi = jackApi->hostApiIndex;\n\n        /* JACK is very inflexible: there is one sample rate the whole\n         * system must run at, and all clients must speak IEEE float. */\n        curDevInfo->defaultSampleRate = globalSampleRate;\n\n        /* To determine how many input and output channels are available,\n         * we re-query jackd with more specific parameters. */\n        copy_string_and_escape_regex_chars( port_regex_string,\n                            client_names[client_index],\n                            device_name_regex_escaped_size );\n        strncat( port_regex_string, port_regex_suffix, port_regex_size );\n\n        /* ... what are your output ports (that we could input from)? */\n        clientPorts = jack_get_ports( jackApi->jack_client, port_regex_string,\n                                     JACK_PORT_TYPE_FILTER, JackPortIsOutput);\n        curDevInfo->maxInputChannels = 0;\n        curDevInfo->defaultLowInputLatency = 0.;\n        curDevInfo->defaultHighInputLatency = 0.;\n        if( clientPorts )\n        {\n            jack_port_t *p = jack_port_by_name( jackApi->jack_client, clientPorts[0] );\n            curDevInfo->defaultLowInputLatency = curDevInfo->defaultHighInputLatency =\n                jack_port_get_latency( p ) / globalSampleRate;\n\n            for( i = 0; clientPorts[i] != NULL; i++)\n            {\n                /* The number of ports returned is the number of output channels.\n                 * We don't care what they are, we just care how many */\n                curDevInfo->maxInputChannels++;\n            }\n            free(clientPorts);\n        }\n\n        /* ... what are your input ports (that we could output to)? */\n        clientPorts = jack_get_ports( jackApi->jack_client, port_regex_string,\n                                     JACK_PORT_TYPE_FILTER, JackPortIsInput);\n        curDevInfo->maxOutputChannels = 0;\n        curDevInfo->defaultLowOutputLatency = 0.;\n        curDevInfo->defaultHighOutputLatency = 0.;\n        if( clientPorts )\n        {\n            jack_port_t *p = jack_port_by_name( jackApi->jack_client, clientPorts[0] );\n            curDevInfo->defaultLowOutputLatency = curDevInfo->defaultHighOutputLatency =\n                jack_port_get_latency( p ) / globalSampleRate;\n\n            for( i = 0; clientPorts[i] != NULL; i++)\n            {\n                /* The number of ports returned is the number of input channels.\n                 * We don't care what they are, we just care how many */\n                curDevInfo->maxOutputChannels++;\n            }\n            free(clientPorts);\n        }\n\n        PA_DEBUG(( \"Adding JACK device %s with %d input channels and %d output channels\\n\",\n                   client_names[client_index],\n                   curDevInfo->maxInputChannels,\n                   curDevInfo->maxOutputChannels ));\n\n        /* Add this client to the list of devices */\n        commonApi->deviceInfos[client_index] = curDevInfo;\n        ++commonApi->info.deviceCount;\n        if( commonApi->info.defaultInputDevice == paNoDevice && curDevInfo->maxInputChannels > 0 )\n            commonApi->info.defaultInputDevice = client_index;\n        if( commonApi->info.defaultOutputDevice == paNoDevice && curDevInfo->maxOutputChannels > 0 )\n            commonApi->info.defaultOutputDevice = client_index;\n    }\n\nerror:\n    regfree( &port_regex );\n    free( jack_ports );\n    return result;\n}\n\nstatic void UpdateSampleRate( PaJackStream *stream, double sampleRate )\n{\n    /* XXX: Maybe not the cleanest way of going about this? */\n    stream->cpuLoadMeasurer.samplingPeriod = stream->bufferProcessor.samplePeriod = 1. / sampleRate;\n    stream->streamRepresentation.streamInfo.sampleRate = sampleRate;\n}\n\nstatic void JackErrorCallback( const char *msg )\n{\n    if( pthread_self() == mainThread_ )\n    {\n        assert( msg );\n        jackErr_ = realloc( jackErr_, strlen( msg ) + 1 );\n        strcpy( jackErr_, msg );\n    }\n}\n\nstatic void JackOnShutdown( void *arg )\n{\n    PaJackHostApiRepresentation *jackApi = (PaJackHostApiRepresentation *)arg;\n    PaJackStream *stream = jackApi->processQueue;\n\n    PA_DEBUG(( \"%s: JACK server is shutting down\\n\", __FUNCTION__ ));\n    for( ; stream; stream = stream->next )\n    {\n        stream->is_active = 0;\n    }\n\n    /* Make sure that the main thread doesn't get stuck waiting on the condition */\n    ASSERT_CALL( pthread_mutex_lock( &jackApi->mtx ), 0 );\n    jackApi->jackIsDown = 1;\n    ASSERT_CALL( pthread_cond_signal( &jackApi->cond ), 0 );\n    ASSERT_CALL( pthread_mutex_unlock( &jackApi->mtx ), 0 );\n\n}\n\nstatic int JackSrCb( jack_nframes_t nframes, void *arg )\n{\n    PaJackHostApiRepresentation *jackApi = (PaJackHostApiRepresentation *)arg;\n    double sampleRate = (double)nframes;\n    PaJackStream *stream = jackApi->processQueue;\n\n    /* Update all streams in process queue */\n    PA_DEBUG(( \"%s: Acting on change in JACK samplerate: %f\\n\", __FUNCTION__, sampleRate ));\n    for( ; stream; stream = stream->next )\n    {\n        if( stream->streamRepresentation.streamInfo.sampleRate != sampleRate )\n        {\n            PA_DEBUG(( \"%s: Updating samplerate\\n\", __FUNCTION__ ));\n            UpdateSampleRate( stream, sampleRate );\n        }\n    }\n\n    return 0;\n}\n\nstatic int JackXRunCb(void *arg) {\n    PaJackHostApiRepresentation *hostApi = (PaJackHostApiRepresentation *)arg;\n    assert( hostApi );\n    hostApi->xrun = TRUE;\n    PA_DEBUG(( \"%s: JACK signalled xrun\\n\", __FUNCTION__ ));\n    return 0;\n}\n\nPaError PaJack_Initialize( PaUtilHostApiRepresentation **hostApi,\n                           PaHostApiIndex hostApiIndex )\n{\n    PaError result = paNoError;\n    PaJackHostApiRepresentation *jackHostApi;\n    int activated = 0;\n    jack_status_t jackStatus = 0;\n    *hostApi = NULL;    /* Initialize to NULL */\n\n    UNLESS( jackHostApi = (PaJackHostApiRepresentation*)\n        PaUtil_AllocateMemory( sizeof(PaJackHostApiRepresentation) ), paInsufficientMemory );\n    UNLESS( jackHostApi->deviceInfoMemory = PaUtil_CreateAllocationGroup(), paInsufficientMemory );\n\n    mainThread_ = pthread_self();\n    ASSERT_CALL( pthread_mutex_init( &jackHostApi->mtx, NULL ), 0 );\n    ASSERT_CALL( pthread_cond_init( &jackHostApi->cond, NULL ), 0 );\n\n    /* Try to become a client of the JACK server.  If we cannot do\n     * this, then this API cannot be used.\n     *\n     * Without the JackNoStartServer option, the jackd server is started\n     * automatically which we do not want.\n     */\n\n    jackHostApi->jack_client = jack_client_open( clientName_, JackNoStartServer, &jackStatus );\n    if( !jackHostApi->jack_client )\n    {\n        /* the V19 development docs say that if an implementation\n         * detects that it cannot be used, it should return a NULL\n         * interface and paNoError */\n        PA_DEBUG(( \"%s: Couldn't connect to JACK, status: %d\\n\", __FUNCTION__, jackStatus ));\n        result = paNoError;\n        goto error;\n    }\n\n    jackHostApi->hostApiIndex = hostApiIndex;\n\n    *hostApi = &jackHostApi->commonHostApiRep;\n    (*hostApi)->info.structVersion = 1;\n    (*hostApi)->info.type = paJACK;\n    (*hostApi)->info.name = \"JACK Audio Connection Kit\";\n\n    /* Build a device list by querying the JACK server */\n    ENSURE_PA( BuildDeviceList( jackHostApi ) );\n\n    /* Register functions */\n\n    (*hostApi)->Terminate = Terminate;\n    (*hostApi)->OpenStream = OpenStream;\n    (*hostApi)->IsFormatSupported = IsFormatSupported;\n\n    PaUtil_InitializeStreamInterface( &jackHostApi->callbackStreamInterface,\n                                      CloseStream, StartStream,\n                                      StopStream, AbortStream,\n                                      IsStreamStopped, IsStreamActive,\n                                      GetStreamTime, GetStreamCpuLoad,\n                                      PaUtil_DummyRead, PaUtil_DummyWrite,\n                                      PaUtil_DummyGetReadAvailable,\n                                      PaUtil_DummyGetWriteAvailable );\n\n    PaUtil_InitializeStreamInterface( &jackHostApi->blockingStreamInterface, CloseStream, StartStream,\n                                      StopStream, AbortStream, IsStreamStopped, IsStreamActive,\n                                      GetStreamTime, PaUtil_DummyGetCpuLoad,\n                                      BlockingReadStream, BlockingWriteStream,\n                                      BlockingGetStreamReadAvailable, BlockingGetStreamWriteAvailable );\n\n    jackHostApi->inputBase = jackHostApi->outputBase = 0;\n    jackHostApi->xrun = 0;\n    jackHostApi->toAdd = jackHostApi->toRemove = NULL;\n    jackHostApi->processQueue = NULL;\n    jackHostApi->jackIsDown = 0;\n\n    jack_on_shutdown( jackHostApi->jack_client, JackOnShutdown, jackHostApi );\n    jack_set_error_function( JackErrorCallback );\n    jackHostApi->jack_buffer_size = jack_get_buffer_size ( jackHostApi->jack_client );\n    /* Don't check for error, may not be supported (deprecated in at least jackdmp) */\n    jack_set_sample_rate_callback( jackHostApi->jack_client, JackSrCb, jackHostApi );\n    UNLESS( !jack_set_xrun_callback( jackHostApi->jack_client, JackXRunCb, jackHostApi ), paUnanticipatedHostError );\n    UNLESS( !jack_set_process_callback( jackHostApi->jack_client, JackCallback, jackHostApi ), paUnanticipatedHostError );\n    UNLESS( !jack_activate( jackHostApi->jack_client ), paUnanticipatedHostError );\n    activated = 1;\n\n    return result;\n\nerror:\n    if( activated )\n        ASSERT_CALL( jack_deactivate( jackHostApi->jack_client ), 0 );\n\n    if( jackHostApi )\n    {\n        if( jackHostApi->jack_client )\n            ASSERT_CALL( jack_client_close( jackHostApi->jack_client ), 0 );\n\n        if( jackHostApi->deviceInfoMemory )\n        {\n            PaUtil_FreeAllAllocations( jackHostApi->deviceInfoMemory );\n            PaUtil_DestroyAllocationGroup( jackHostApi->deviceInfoMemory );\n        }\n\n        PaUtil_FreeMemory( jackHostApi );\n    }\n    return result;\n}\n\n\nstatic void Terminate( struct PaUtilHostApiRepresentation *hostApi )\n{\n    PaJackHostApiRepresentation *jackHostApi = (PaJackHostApiRepresentation*)hostApi;\n\n    /* note: this automatically disconnects all ports, since a deactivated\n     * client is not allowed to have any ports connected */\n    ASSERT_CALL( jack_deactivate( jackHostApi->jack_client ), 0 );\n\n    ASSERT_CALL( pthread_mutex_destroy( &jackHostApi->mtx ), 0 );\n    ASSERT_CALL( pthread_cond_destroy( &jackHostApi->cond ), 0 );\n\n    ASSERT_CALL( jack_client_close( jackHostApi->jack_client ), 0 );\n\n    if( jackHostApi->deviceInfoMemory )\n    {\n        PaUtil_FreeAllAllocations( jackHostApi->deviceInfoMemory );\n        PaUtil_DestroyAllocationGroup( jackHostApi->deviceInfoMemory );\n    }\n\n    PaUtil_FreeMemory( jackHostApi );\n\n    free( jackErr_ );\n    jackErr_ = NULL;\n}\n\nstatic PaError IsFormatSupported( struct PaUtilHostApiRepresentation *hostApi,\n                                  const PaStreamParameters *inputParameters,\n                                  const PaStreamParameters *outputParameters,\n                                  double sampleRate )\n{\n    int inputChannelCount = 0, outputChannelCount = 0;\n    PaSampleFormat inputSampleFormat, outputSampleFormat;\n\n    if( inputParameters )\n    {\n        inputChannelCount = inputParameters->channelCount;\n        inputSampleFormat = inputParameters->sampleFormat;\n\n        /* unless alternate device specification is supported, reject the use of\n            paUseHostApiSpecificDeviceSpecification */\n\n        if( inputParameters->device == paUseHostApiSpecificDeviceSpecification )\n            return paInvalidDevice;\n\n        /* check that input device can support inputChannelCount */\n        if( inputChannelCount > hostApi->deviceInfos[ inputParameters->device ]->maxInputChannels )\n            return paInvalidChannelCount;\n\n        /* validate inputStreamInfo */\n        if( inputParameters->hostApiSpecificStreamInfo )\n            return paIncompatibleHostApiSpecificStreamInfo; /* this implementation doesn't use custom stream info */\n    }\n    else\n    {\n        inputChannelCount = 0;\n    }\n\n    if( outputParameters )\n    {\n        outputChannelCount = outputParameters->channelCount;\n        outputSampleFormat = outputParameters->sampleFormat;\n\n        /* unless alternate device specification is supported, reject the use of\n            paUseHostApiSpecificDeviceSpecification */\n\n        if( outputParameters->device == paUseHostApiSpecificDeviceSpecification )\n            return paInvalidDevice;\n\n        /* check that output device can support inputChannelCount */\n        if( outputChannelCount > hostApi->deviceInfos[ outputParameters->device ]->maxOutputChannels )\n            return paInvalidChannelCount;\n\n        /* validate outputStreamInfo */\n        if( outputParameters->hostApiSpecificStreamInfo )\n            return paIncompatibleHostApiSpecificStreamInfo; /* this implementation doesn't use custom stream info */\n    }\n    else\n    {\n        outputChannelCount = 0;\n    }\n\n    /*\n        The following check is not necessary for JACK.\n\n            - if a full duplex stream is requested, check that the combination\n                of input and output parameters is supported\n\n\n        Because the buffer adapter handles conversion between all standard\n        sample formats, the following checks are only required if paCustomFormat\n        is implemented, or under some other unusual conditions.\n\n            - check that input device can support inputSampleFormat, or that\n                we have the capability to convert from outputSampleFormat to\n                a native format\n\n            - check that output device can support outputSampleFormat, or that\n                we have the capability to convert from outputSampleFormat to\n                a native format\n    */\n\n    /* check that the device supports sampleRate */\n\n#define ABS(x) ( (x) > 0 ? (x) : -(x) )\n    if( ABS(sampleRate - jack_get_sample_rate(((PaJackHostApiRepresentation *) hostApi)->jack_client )) > 1 )\n        return paInvalidSampleRate;\n#undef ABS\n\n    return paFormatIsSupported;\n}\n\n/* Basic stream initialization */\nstatic PaError InitializeStream( PaJackStream *stream, PaJackHostApiRepresentation *hostApi, int numInputChannels,\n        int numOutputChannels )\n{\n    PaError result = paNoError;\n    assert( stream );\n\n    memset( stream, 0, sizeof (PaJackStream) );\n    UNLESS( stream->stream_memory = PaUtil_CreateAllocationGroup(), paInsufficientMemory );\n    stream->jack_client = hostApi->jack_client;\n    stream->hostApi = hostApi;\n\n    if( numInputChannels > 0 )\n    {\n        UNLESS( stream->local_input_ports =\n                (jack_port_t**) PaUtil_GroupAllocateMemory( stream->stream_memory, sizeof(jack_port_t*) * numInputChannels ),\n                paInsufficientMemory );\n        memset( stream->local_input_ports, 0, sizeof(jack_port_t*) * numInputChannels );\n        UNLESS( stream->remote_output_ports =\n                (jack_port_t**) PaUtil_GroupAllocateMemory( stream->stream_memory, sizeof(jack_port_t*) * numInputChannels ),\n                paInsufficientMemory );\n        memset( stream->remote_output_ports, 0, sizeof(jack_port_t*) * numInputChannels );\n    }\n    if( numOutputChannels > 0 )\n    {\n        UNLESS( stream->local_output_ports =\n                (jack_port_t**) PaUtil_GroupAllocateMemory( stream->stream_memory, sizeof(jack_port_t*) * numOutputChannels ),\n                paInsufficientMemory );\n        memset( stream->local_output_ports, 0, sizeof(jack_port_t*) * numOutputChannels );\n        UNLESS( stream->remote_input_ports =\n                (jack_port_t**) PaUtil_GroupAllocateMemory( stream->stream_memory, sizeof(jack_port_t*) * numOutputChannels ),\n                paInsufficientMemory );\n        memset( stream->remote_input_ports, 0, sizeof(jack_port_t*) * numOutputChannels );\n    }\n\n    stream->num_incoming_connections = numInputChannels;\n    stream->num_outgoing_connections = numOutputChannels;\n\nerror:\n    return result;\n}\n\n/*!\n * Free resources associated with stream, and eventually stream itself.\n *\n * Frees allocated memory, and closes opened pcms.\n */\nstatic void CleanUpStream( PaJackStream *stream, int terminateStreamRepresentation, int terminateBufferProcessor )\n{\n    int i;\n    assert( stream );\n\n    if( stream->isBlockingStream )\n        BlockingEnd( stream );\n\n    for( i = 0; i < stream->num_incoming_connections; ++i )\n    {\n        if( stream->local_input_ports[i] )\n            ASSERT_CALL( jack_port_unregister( stream->jack_client, stream->local_input_ports[i] ), 0 );\n    }\n    for( i = 0; i < stream->num_outgoing_connections; ++i )\n    {\n        if( stream->local_output_ports[i] )\n            ASSERT_CALL( jack_port_unregister( stream->jack_client, stream->local_output_ports[i] ), 0 );\n    }\n\n    if( terminateStreamRepresentation )\n        PaUtil_TerminateStreamRepresentation( &stream->streamRepresentation );\n    if( terminateBufferProcessor )\n        PaUtil_TerminateBufferProcessor( &stream->bufferProcessor );\n\n    if( stream->stream_memory )\n    {\n        PaUtil_FreeAllAllocations( stream->stream_memory );\n        PaUtil_DestroyAllocationGroup( stream->stream_memory );\n    }\n    PaUtil_FreeMemory( stream );\n}\n\nstatic PaError WaitCondition( PaJackHostApiRepresentation *hostApi )\n{\n    PaError result = paNoError;\n    int err = 0;\n    PaTime pt = PaUtil_GetTime();\n    struct timespec ts;\n\n    ts.tv_sec = (time_t) floor( pt + 10 * 60 /* 10 minutes */ );\n    ts.tv_nsec = (long) ((pt - floor( pt )) * 1000000000);\n    /* XXX: Best enclose in loop, in case of spurious wakeups? */\n    err = pthread_cond_timedwait( &hostApi->cond, &hostApi->mtx, &ts );\n\n    /* Make sure we didn't time out */\n    UNLESS( err != ETIMEDOUT, paTimedOut );\n    UNLESS( !err, paInternalError );\n\nerror:\n    return result;\n}\n\nstatic PaError AddStream( PaJackStream *stream )\n{\n    PaError result = paNoError;\n    PaJackHostApiRepresentation *hostApi = stream->hostApi;\n    /* Add to queue of streams that should be processed */\n    ASSERT_CALL( pthread_mutex_lock( &hostApi->mtx ), 0 );\n    if( !hostApi->jackIsDown )\n    {\n        hostApi->toAdd = stream;\n        /* Unlock mutex and await signal from processing thread */\n        result = WaitCondition( stream->hostApi );\n    }\n    ASSERT_CALL( pthread_mutex_unlock( &hostApi->mtx ), 0 );\n    ENSURE_PA( result );\n\n    UNLESS( !hostApi->jackIsDown, paDeviceUnavailable );\n\nerror:\n    return result;\n}\n\n/* Remove stream from processing queue */\nstatic PaError RemoveStream( PaJackStream *stream )\n{\n    PaError result = paNoError;\n    PaJackHostApiRepresentation *hostApi = stream->hostApi;\n\n    /* Add to queue over streams that should be processed */\n    ASSERT_CALL( pthread_mutex_lock( &hostApi->mtx ), 0 );\n    if( !hostApi->jackIsDown )\n    {\n        hostApi->toRemove = stream;\n        /* Unlock mutex and await signal from processing thread */\n        result = WaitCondition( stream->hostApi );\n    }\n    ASSERT_CALL( pthread_mutex_unlock( &hostApi->mtx ), 0 );\n    ENSURE_PA( result );\n\nerror:\n    return result;\n}\n\n/* Add stream to JACK callback processing queue */\nstatic PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,\n                           PaStream** s,\n                           const PaStreamParameters *inputParameters,\n                           const PaStreamParameters *outputParameters,\n                           double sampleRate,\n                           unsigned long framesPerBuffer,\n                           PaStreamFlags streamFlags,\n                           PaStreamCallback *streamCallback,\n                           void *userData )\n{\n    PaError result = paNoError;\n    PaJackHostApiRepresentation *jackHostApi = (PaJackHostApiRepresentation*)hostApi;\n    PaJackStream *stream = NULL;\n    char *port_string = PaUtil_GroupAllocateMemory( jackHostApi->deviceInfoMemory, jack_port_name_size() );\n    // In the worst case every character would be escaped which would double the string length.\n    // Add 1 for null terminator\n    size_t regex_escaped_client_name_size = jack_client_name_size() * 2 + 1;\n    unsigned long regex_size = regex_escaped_client_name_size + strlen(port_regex_suffix);\n    char *regex_pattern = PaUtil_GroupAllocateMemory( jackHostApi->deviceInfoMemory, regex_size );\n    const char **jack_ports = NULL;\n    /* int jack_max_buffer_size = jack_get_buffer_size( jackHostApi->jack_client ); */\n    int i;\n    int inputChannelCount, outputChannelCount;\n    const double jackSr = jack_get_sample_rate( jackHostApi->jack_client );\n    PaSampleFormat inputSampleFormat = 0, outputSampleFormat = 0;\n    int bpInitialized = 0, srInitialized = 0;   /* Initialized buffer processor and stream representation? */\n    unsigned long ofs;\n\n    /* validate platform specific flags */\n    if( (streamFlags & paPlatformSpecificFlags) != 0 )\n        return paInvalidFlag; /* unexpected platform specific flag */\n    if( (streamFlags & paPrimeOutputBuffersUsingStreamCallback) != 0 )\n    {\n        streamFlags &= ~paPrimeOutputBuffersUsingStreamCallback;\n        /*return paInvalidFlag;*/   /* This implementation does not support buffer priming */\n    }\n\n    if( framesPerBuffer != paFramesPerBufferUnspecified )\n    {\n        /* Jack operates with power of two buffers, and we don't support non-integer buffer adaption (yet) */\n        /*UNLESS( !(framesPerBuffer & (framesPerBuffer - 1)), paBufferTooBig );*/  /* TODO: Add descriptive error code? */\n    }\n\n    /* Preliminary checks */\n\n    if( inputParameters )\n    {\n        inputChannelCount = inputParameters->channelCount;\n        inputSampleFormat = inputParameters->sampleFormat;\n\n        /* unless alternate device specification is supported, reject the use of\n            paUseHostApiSpecificDeviceSpecification */\n\n        if( inputParameters->device == paUseHostApiSpecificDeviceSpecification )\n            return paInvalidDevice;\n\n        /* check that input device can support inputChannelCount */\n        if( inputChannelCount > hostApi->deviceInfos[ inputParameters->device ]->maxInputChannels )\n            return paInvalidChannelCount;\n\n        /* validate inputStreamInfo */\n        if( inputParameters->hostApiSpecificStreamInfo )\n            return paIncompatibleHostApiSpecificStreamInfo; /* this implementation doesn't use custom stream info */\n    }\n    else\n    {\n        inputChannelCount = 0;\n    }\n\n    if( outputParameters )\n    {\n        outputChannelCount = outputParameters->channelCount;\n        outputSampleFormat = outputParameters->sampleFormat;\n\n        /* unless alternate device specification is supported, reject the use of\n            paUseHostApiSpecificDeviceSpecification */\n\n        if( outputParameters->device == paUseHostApiSpecificDeviceSpecification )\n            return paInvalidDevice;\n\n        /* check that output device can support inputChannelCount */\n        if( outputChannelCount > hostApi->deviceInfos[ outputParameters->device ]->maxOutputChannels )\n            return paInvalidChannelCount;\n\n        /* validate outputStreamInfo */\n        if( outputParameters->hostApiSpecificStreamInfo )\n            return paIncompatibleHostApiSpecificStreamInfo; /* this implementation doesn't use custom stream info */\n    }\n    else\n    {\n        outputChannelCount = 0;\n    }\n\n    /* ... check that the sample rate exactly matches the ONE acceptable rate\n     * A: This rate isn't necessarily constant though? */\n\n#define ABS(x) ( (x) > 0 ? (x) : -(x) )\n    if( ABS(sampleRate - jackSr) > 1 )\n        return paInvalidSampleRate;\n#undef ABS\n\n    UNLESS( stream = (PaJackStream*)PaUtil_AllocateMemory( sizeof(PaJackStream) ), paInsufficientMemory );\n    ENSURE_PA( InitializeStream( stream, jackHostApi, inputChannelCount, outputChannelCount ) );\n\n    /* the blocking emulation, if necessary */\n    stream->isBlockingStream = !streamCallback;\n    if( stream->isBlockingStream )\n    {\n        float latency = 0.001; /* 1ms is the absolute minimum we support */\n        int   minimum_buffer_frames = 0;\n\n        if( inputParameters && inputParameters->suggestedLatency > latency )\n            latency = inputParameters->suggestedLatency;\n        else if( outputParameters && outputParameters->suggestedLatency > latency )\n            latency = outputParameters->suggestedLatency;\n\n        /* the latency the user asked for indicates the minimum buffer size in frames */\n        minimum_buffer_frames = (int) (latency * jack_get_sample_rate( jackHostApi->jack_client ));\n\n        /* we also need to be able to store at least three full jack buffers to avoid dropouts */\n        if( jackHostApi->jack_buffer_size * 3 > minimum_buffer_frames )\n            minimum_buffer_frames = jackHostApi->jack_buffer_size * 3;\n\n        /* setup blocking API data structures (FIXME: can fail) */\n        BlockingBegin( stream, minimum_buffer_frames );\n\n        /* install our own callback for the blocking API */\n        streamCallback = BlockingCallback;\n        userData = stream;\n\n        PaUtil_InitializeStreamRepresentation( &stream->streamRepresentation,\n                                               &jackHostApi->blockingStreamInterface, streamCallback, userData );\n    }\n    else\n    {\n        PaUtil_InitializeStreamRepresentation( &stream->streamRepresentation,\n                                               &jackHostApi->callbackStreamInterface, streamCallback, userData );\n    }\n    srInitialized = 1;\n    PaUtil_InitializeCpuLoadMeasurer( &stream->cpuLoadMeasurer, jackSr );\n\n    /* create the JACK ports.  We cannot connect them until audio\n     * processing begins */\n\n    /* Register a unique set of ports for this stream\n     * TODO: Robust allocation of new port names */\n\n    ofs = jackHostApi->inputBase;\n    for( i = 0; i < inputChannelCount; i++ )\n    {\n        snprintf( port_string, jack_port_name_size(), \"in_%lu\", ofs + i );\n        UNLESS( stream->local_input_ports[i] = jack_port_register(\n              jackHostApi->jack_client, port_string,\n              JACK_DEFAULT_AUDIO_TYPE, JackPortIsInput, 0 ), paInsufficientMemory );\n    }\n    jackHostApi->inputBase += inputChannelCount;\n\n    ofs = jackHostApi->outputBase;\n    for( i = 0; i < outputChannelCount; i++ )\n    {\n        snprintf( port_string, jack_port_name_size(), \"out_%lu\", ofs + i );\n        UNLESS( stream->local_output_ports[i] = jack_port_register(\n             jackHostApi->jack_client, port_string,\n             JACK_DEFAULT_AUDIO_TYPE, JackPortIsOutput, 0 ), paInsufficientMemory );\n    }\n    jackHostApi->outputBase += outputChannelCount;\n\n    /* look up the jack_port_t's for the remote ports.  We could do\n     * this at stream start time, but doing it here ensures the\n     * name lookup only happens once. */\n\n    if( inputChannelCount > 0 )\n    {\n        int err = 0;\n\n        /* Get output ports of our capture device */\n        copy_string_and_escape_regex_chars( regex_pattern,\n                 hostApi->deviceInfos[ inputParameters->device ]->name,\n                 regex_escaped_client_name_size );\n        strncat( regex_pattern, port_regex_suffix, regex_size );\n        UNLESS( jack_ports = jack_get_ports( jackHostApi->jack_client, regex_pattern,\n                                     JACK_PORT_TYPE_FILTER, JackPortIsOutput ), paUnanticipatedHostError );\n        for( i = 0; i < inputChannelCount && jack_ports[i]; i++ )\n        {\n            if( (stream->remote_output_ports[i] = jack_port_by_name(\n                 jackHostApi->jack_client, jack_ports[i] )) == NULL )\n            {\n                err = 1;\n                break;\n            }\n        }\n        free( jack_ports );\n        UNLESS( !err, paInsufficientMemory );\n\n        /* Fewer ports than expected? */\n        UNLESS( i == inputChannelCount, paInternalError );\n    }\n\n    if( outputChannelCount > 0 )\n    {\n        int err = 0;\n\n        /* Get input ports of our playback device */\n        copy_string_and_escape_regex_chars( regex_pattern,\n                 hostApi->deviceInfos[ outputParameters->device ]->name,\n                 regex_escaped_client_name_size );\n        strncat( regex_pattern, port_regex_suffix, regex_size );\n        UNLESS( jack_ports = jack_get_ports( jackHostApi->jack_client, regex_pattern,\n                                     JACK_PORT_TYPE_FILTER, JackPortIsInput ), paUnanticipatedHostError );\n        for( i = 0; i < outputChannelCount && jack_ports[i]; i++ )\n        {\n            if( (stream->remote_input_ports[i] = jack_port_by_name(\n                 jackHostApi->jack_client, jack_ports[i] )) == 0 )\n            {\n                err = 1;\n                break;\n            }\n        }\n        free( jack_ports );\n        UNLESS( !err , paInsufficientMemory );\n\n        /* Fewer ports than expected? */\n        UNLESS( i == outputChannelCount, paInternalError );\n    }\n\n    ENSURE_PA( PaUtil_InitializeBufferProcessor(\n                  &stream->bufferProcessor,\n                  inputChannelCount,\n                  inputSampleFormat,\n                  paFloat32 | paNonInterleaved, /* hostInputSampleFormat */\n                  outputChannelCount,\n                  outputSampleFormat,\n                  paFloat32 | paNonInterleaved, /* hostOutputSampleFormat */\n                  jackSr,\n                  streamFlags,\n                  framesPerBuffer,\n                  0,                            /* Ignored */\n                  paUtilUnknownHostBufferSize,  /* Buffer size may vary on JACK's discretion */\n                  streamCallback,\n                  userData ) );\n    bpInitialized = 1;\n\n    if( stream->num_incoming_connections > 0 )\n        stream->streamRepresentation.streamInfo.inputLatency = (jack_port_get_latency( stream->remote_output_ports[0] )\n                - jack_get_buffer_size( jackHostApi->jack_client )  /* One buffer is not counted as latency */\n            + PaUtil_GetBufferProcessorInputLatencyFrames( &stream->bufferProcessor )) / sampleRate;\n    if( stream->num_outgoing_connections > 0 )\n        stream->streamRepresentation.streamInfo.outputLatency = (jack_port_get_latency( stream->remote_input_ports[0] )\n                - jack_get_buffer_size( jackHostApi->jack_client )  /* One buffer is not counted as latency */\n            + PaUtil_GetBufferProcessorOutputLatencyFrames( &stream->bufferProcessor )) / sampleRate;\n\n    stream->streamRepresentation.streamInfo.sampleRate = jackSr;\n    stream->t0 = jack_frame_time( jackHostApi->jack_client );   /* A: Time should run from Pa_OpenStream */\n\n    /* Add to queue of opened streams */\n    ENSURE_PA( AddStream( stream ) );\n\n    *s = (PaStream*)stream;\n\n    return result;\n\nerror:\n    if( stream )\n        CleanUpStream( stream, srInitialized, bpInitialized );\n\n    return result;\n}\n\n/*\n    When CloseStream() is called, the multi-api layer ensures that\n    the stream has already been stopped or aborted.\n*/\nstatic PaError CloseStream( PaStream* s )\n{\n    PaError result = paNoError;\n    PaJackStream *stream = (PaJackStream*)s;\n\n    /* Remove this stream from the processing queue */\n    ENSURE_PA( RemoveStream( stream ) );\n\nerror:\n    CleanUpStream( stream, 1, 1 );\n    return result;\n}\n\nstatic PaError RealProcess( PaJackStream *stream, jack_nframes_t frames )\n{\n    PaError result = paNoError;\n    PaStreamCallbackTimeInfo timeInfo = {0,0,0};\n    int chn;\n    int framesProcessed;\n    const double sr = jack_get_sample_rate( stream->jack_client );    /* Shouldn't change during the process callback */\n    PaStreamCallbackFlags cbFlags = 0;\n\n    /* If the user has returned !paContinue from the callback we'll want to flush the internal buffers,\n     * when these are empty we can finally mark the stream as inactive */\n    if( stream->callbackResult != paContinue &&\n            PaUtil_IsBufferProcessorOutputEmpty( &stream->bufferProcessor ) )\n    {\n        stream->is_active = 0;\n        if( stream->streamRepresentation.streamFinishedCallback )\n            stream->streamRepresentation.streamFinishedCallback( stream->streamRepresentation.userData );\n        PA_DEBUG(( \"%s: Callback finished\\n\", __FUNCTION__ ));\n\n        goto end;\n    }\n\n    timeInfo.currentTime = (jack_frame_time( stream->jack_client ) - stream->t0) / sr;\n    if( stream->num_incoming_connections > 0 )\n        timeInfo.inputBufferAdcTime = timeInfo.currentTime - jack_port_get_latency( stream->remote_output_ports[0] )\n            / sr;\n    if( stream->num_outgoing_connections > 0 )\n        timeInfo.outputBufferDacTime = timeInfo.currentTime + jack_port_get_latency( stream->remote_input_ports[0] )\n            / sr;\n\n    PaUtil_BeginCpuLoadMeasurement( &stream->cpuLoadMeasurer );\n\n    if( stream->xrun )\n    {\n        /* XXX: Any way to tell which of these occurred? */\n        cbFlags = paOutputUnderflow | paInputOverflow;\n        stream->xrun = FALSE;\n    }\n    PaUtil_BeginBufferProcessing( &stream->bufferProcessor, &timeInfo,\n            cbFlags );\n\n    if( stream->num_incoming_connections > 0 )\n        PaUtil_SetInputFrameCount( &stream->bufferProcessor, frames );\n    if( stream->num_outgoing_connections > 0 )\n        PaUtil_SetOutputFrameCount( &stream->bufferProcessor, frames );\n\n    for( chn = 0; chn < stream->num_incoming_connections; chn++ )\n    {\n        jack_default_audio_sample_t *channel_buf = (jack_default_audio_sample_t*)\n            jack_port_get_buffer( stream->local_input_ports[chn],\n                    frames );\n\n        PaUtil_SetNonInterleavedInputChannel( &stream->bufferProcessor,\n                chn,\n                channel_buf );\n    }\n\n    for( chn = 0; chn < stream->num_outgoing_connections; chn++ )\n    {\n        jack_default_audio_sample_t *channel_buf = (jack_default_audio_sample_t*)\n            jack_port_get_buffer( stream->local_output_ports[chn],\n                    frames );\n\n        PaUtil_SetNonInterleavedOutputChannel( &stream->bufferProcessor,\n                chn,\n                channel_buf );\n    }\n\n    framesProcessed = PaUtil_EndBufferProcessing( &stream->bufferProcessor,\n            &stream->callbackResult );\n    /* We've specified a host buffer size mode where every frame should be consumed by the buffer processor */\n    assert( framesProcessed == frames );\n\n    PaUtil_EndCpuLoadMeasurement( &stream->cpuLoadMeasurer, framesProcessed );\n\nend:\n    return result;\n}\n\n/* Update the JACK callback's stream processing queue. */\nstatic PaError UpdateQueue( PaJackHostApiRepresentation *hostApi )\n{\n    PaError result = paNoError;\n    int queueModified = 0;\n    const double jackSr = jack_get_sample_rate( hostApi->jack_client );\n    int err;\n\n    if( (err = pthread_mutex_trylock( &hostApi->mtx )) != 0 )\n    {\n        assert( err == EBUSY );\n        return paNoError;\n    }\n\n    if( hostApi->toAdd )\n    {\n        if( hostApi->processQueue )\n        {\n            PaJackStream *node = hostApi->processQueue;\n            /* Advance to end of queue */\n            while( node->next )\n                node = node->next;\n\n            node->next = hostApi->toAdd;\n        }\n        else\n        {\n            /* The only queue entry. */\n            hostApi->processQueue = (PaJackStream *)hostApi->toAdd;\n        }\n\n        /* If necessary, update stream state */\n        if( hostApi->toAdd->streamRepresentation.streamInfo.sampleRate != jackSr )\n            UpdateSampleRate( hostApi->toAdd, jackSr );\n\n        hostApi->toAdd = NULL;\n        queueModified = 1;\n    }\n    if( hostApi->toRemove )\n    {\n        int removed = 0;\n        PaJackStream *node = hostApi->processQueue, *prev = NULL;\n        assert( hostApi->processQueue );\n\n        while( node )\n        {\n            if( node == hostApi->toRemove )\n            {\n                if( prev )\n                    prev->next = node->next;\n                else\n                    hostApi->processQueue = (PaJackStream *)node->next;\n\n                removed = 1;\n                break;\n            }\n\n            prev = node;\n            node = node->next;\n        }\n        UNLESS( removed, paInternalError );\n        hostApi->toRemove = NULL;\n        PA_DEBUG(( \"%s: Removed stream from processing queue\\n\", __FUNCTION__ ));\n        queueModified = 1;\n    }\n\n    if( queueModified )\n    {\n        /* Signal that we've done what was asked of us */\n        ASSERT_CALL( pthread_cond_signal( &hostApi->cond ), 0 );\n    }\n\nerror:\n    ASSERT_CALL( pthread_mutex_unlock( &hostApi->mtx ), 0 );\n\n    return result;\n}\n\n/* Audio processing callback invoked periodically from JACK. */\nstatic int JackCallback( jack_nframes_t frames, void *userData )\n{\n    PaError result = paNoError;\n    PaJackHostApiRepresentation *hostApi = (PaJackHostApiRepresentation *)userData;\n    PaJackStream *stream = NULL;\n    int xrun = hostApi->xrun;\n    hostApi->xrun = 0;\n\n    assert( hostApi );\n\n    ENSURE_PA( UpdateQueue( hostApi ) );\n\n    /* Process each stream */\n    stream = hostApi->processQueue;\n    for( ; stream; stream = stream->next )\n    {\n        if( xrun )  /* Don't override if already set */\n            stream->xrun = 1;\n\n        /* See if this stream is to be started */\n        if( stream->doStart )\n        {\n            /* If we can't obtain a lock, we'll try next time */\n            int err = pthread_mutex_trylock( &stream->hostApi->mtx );\n            if( !err )\n            {\n                if( stream->doStart )   /* Could potentially change before obtaining the lock */\n                {\n                    stream->is_active = 1;\n                    stream->doStart = 0;\n                    PA_DEBUG(( \"%s: Starting stream\\n\", __FUNCTION__ ));\n                    ASSERT_CALL( pthread_cond_signal( &stream->hostApi->cond ), 0 );\n                    stream->callbackResult = paContinue;\n                    stream->isSilenced = 0;\n                }\n\n                ASSERT_CALL( pthread_mutex_unlock( &stream->hostApi->mtx ), 0 );\n            }\n            else\n                assert( err == EBUSY );\n        }\n        else if( stream->doStop || stream->doAbort )    /* Should we stop/abort stream? */\n        {\n            if( stream->callbackResult == paContinue )     /* Ok, make it stop */\n            {\n                PA_DEBUG(( \"%s: Stopping stream\\n\", __FUNCTION__ ));\n                stream->callbackResult = stream->doStop ? paComplete : paAbort;\n            }\n        }\n\n        if( stream->is_active )\n            ENSURE_PA( RealProcess( stream, frames ) );\n        /* If we have just entered inactive state, silence output */\n        if( !stream->is_active && !stream->isSilenced )\n        {\n            int i;\n\n            /* Silence buffer after entering inactive state */\n            PA_DEBUG(( \"Silencing the output\\n\" ));\n            for( i = 0; i < stream->num_outgoing_connections; ++i )\n            {\n                jack_default_audio_sample_t *buffer = jack_port_get_buffer( stream->local_output_ports[i], frames );\n                memset( buffer, 0, sizeof (jack_default_audio_sample_t) * frames );\n            }\n\n            stream->isSilenced = 1;\n        }\n\n        if( stream->doStop || stream->doAbort )\n        {\n            /* See if RealProcess has acted on the request */\n            if( !stream->is_active )   /* Ok, signal to the main thread that we've carried out the operation */\n            {\n                /* If we can't obtain a lock, we'll try next time */\n                int err = pthread_mutex_trylock( &stream->hostApi->mtx );\n                if( !err )\n                {\n                    stream->doStop = stream->doAbort = 0;\n                    ASSERT_CALL( pthread_cond_signal( &stream->hostApi->cond ), 0 );\n                    ASSERT_CALL( pthread_mutex_unlock( &stream->hostApi->mtx ), 0 );\n                }\n                else\n                    assert( err == EBUSY );\n            }\n        }\n    }\n\n    return 0;\nerror:\n    return -1;\n}\n\nstatic PaError StartStream( PaStream *s )\n{\n    PaError result = paNoError;\n    PaJackStream *stream = (PaJackStream*)s;\n    int i;\n\n    /* Ready the processor */\n    PaUtil_ResetBufferProcessor( &stream->bufferProcessor );\n\n    /* Connect the ports. Note that the ports may already have been connected by someone else in\n     * the meantime, in which case JACK returns EEXIST. */\n\n    if( stream->num_incoming_connections > 0 )\n    {\n        for( i = 0; i < stream->num_incoming_connections; i++ )\n        {\n            int r = jack_connect( stream->jack_client, jack_port_name( stream->remote_output_ports[i] ),\n                    jack_port_name( stream->local_input_ports[i] ) );\n            UNLESS( 0 == r || EEXIST == r, paUnanticipatedHostError );\n        }\n    }\n\n    if( stream->num_outgoing_connections > 0 )\n    {\n        for( i = 0; i < stream->num_outgoing_connections; i++ )\n        {\n            int r = jack_connect( stream->jack_client, jack_port_name( stream->local_output_ports[i] ),\n                    jack_port_name( stream->remote_input_ports[i] ) );\n            UNLESS( 0 == r || EEXIST == r, paUnanticipatedHostError );\n        }\n    }\n\n    stream->xrun = FALSE;\n\n    /* Enable processing */\n\n    ASSERT_CALL( pthread_mutex_lock( &stream->hostApi->mtx ), 0 );\n    stream->doStart = 1;\n\n    /* Wait for stream to be started */\n    result = WaitCondition( stream->hostApi );\n    /*\n    do\n    {\n        err = pthread_cond_timedwait( &stream->hostApi->cond, &stream->hostApi->mtx, &ts );\n    } while( !stream->is_active && !err );\n    */\n    if( result != paNoError )   /* Something went wrong, call off the stream start */\n    {\n        stream->doStart = 0;\n        stream->is_active = 0;  /* Cancel any processing */\n    }\n    ASSERT_CALL( pthread_mutex_unlock( &stream->hostApi->mtx ), 0 );\n\n    ENSURE_PA( result );\n\n    stream->is_running = TRUE;\n    PA_DEBUG(( \"%s: Stream started\\n\", __FUNCTION__ ));\n\nerror:\n    return result;\n}\n\nstatic PaError RealStop( PaJackStream *stream, int abort )\n{\n    PaError result = paNoError;\n    int i;\n\n    if( stream->isBlockingStream )\n        BlockingWaitEmpty ( stream );\n\n    ASSERT_CALL( pthread_mutex_lock( &stream->hostApi->mtx ), 0 );\n    if( abort )\n        stream->doAbort = 1;\n    else\n        stream->doStop = 1;\n\n    /* Wait for stream to be stopped */\n    result = WaitCondition( stream->hostApi );\n    ASSERT_CALL( pthread_mutex_unlock( &stream->hostApi->mtx ), 0 );\n    ENSURE_PA( result );\n\n    UNLESS( !stream->is_active, paInternalError );\n\n    PA_DEBUG(( \"%s: Stream stopped\\n\", __FUNCTION__ ));\n\nerror:\n    stream->is_running = FALSE;\n\n    /* Disconnect ports belonging to this stream */\n\n    if( !stream->hostApi->jackIsDown )  /* XXX: Well? */\n    {\n        for( i = 0; i < stream->num_incoming_connections; i++ )\n        {\n            if( jack_port_connected( stream->local_input_ports[i] ) )\n            {\n                UNLESS( !jack_port_disconnect( stream->jack_client, stream->local_input_ports[i] ),\n                        paUnanticipatedHostError );\n            }\n        }\n        for( i = 0; i < stream->num_outgoing_connections; i++ )\n        {\n            if( jack_port_connected( stream->local_output_ports[i] ) )\n            {\n                UNLESS( !jack_port_disconnect( stream->jack_client, stream->local_output_ports[i] ),\n                        paUnanticipatedHostError );\n            }\n        }\n    }\n\n    return result;\n}\n\nstatic PaError StopStream( PaStream *s )\n{\n    assert(s);\n    return RealStop( (PaJackStream *)s, 0 );\n}\n\nstatic PaError AbortStream( PaStream *s )\n{\n    assert(s);\n    return RealStop( (PaJackStream *)s, 1 );\n}\n\nstatic PaError IsStreamStopped( PaStream *s )\n{\n    PaJackStream *stream = (PaJackStream*)s;\n    return !stream->is_running;\n}\n\n\nstatic PaError IsStreamActive( PaStream *s )\n{\n    PaJackStream *stream = (PaJackStream*)s;\n    return stream->is_active;\n}\n\n\nstatic PaTime GetStreamTime( PaStream *s )\n{\n    PaJackStream *stream = (PaJackStream*)s;\n\n    /* A: Is this relevant?? --> TODO: what if we're recording-only? */\n    return (jack_frame_time( stream->jack_client ) - stream->t0) / (PaTime)jack_get_sample_rate( stream->jack_client );\n}\n\n\nstatic double GetStreamCpuLoad( PaStream* s )\n{\n    PaJackStream *stream = (PaJackStream*)s;\n    return PaUtil_GetCpuLoad( &stream->cpuLoadMeasurer );\n}\n\nPaError PaJack_SetClientName( const char* name )\n{\n    if( strlen( name ) > jack_client_name_size() )\n    {\n        /* OK, I don't know any better error code */\n        return paInvalidFlag;\n    }\n    clientName_ = name;\n    return paNoError;\n}\n\nPaError PaJack_GetClientName(const char** clientName)\n{\n    PaError result = paNoError;\n    PaJackHostApiRepresentation* jackHostApi = NULL;\n    PaJackHostApiRepresentation** ref = &jackHostApi;\n    ENSURE_PA( PaUtil_GetHostApiRepresentation( (PaUtilHostApiRepresentation**)ref, paJACK ) );\n    *clientName = jack_get_client_name( jackHostApi->jack_client );\n\nerror:\n    return result;\n}\n\n"
  },
  {
    "path": "thirdparty/portaudio/src/hostapi/oss/pa_unix_oss.c",
    "content": "/*\n * $Id$\n * PortAudio Portable Real-Time Audio Library\n * Latest Version at: http://www.portaudio.com\n * OSS implementation by:\n *   Douglas Repetto\n *   Phil Burk\n *   Dominic Mazzoni\n *   Arve Knudsen\n *\n * Based on the Open Source API proposed by Ross Bencina\n * Copyright (c) 1999-2002 Ross Bencina, Phil Burk\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n/**\n @file\n @ingroup hostapi_src\n*/\n\n#include <stdio.h>\n#include <string.h>\n#include <math.h>\n#include <fcntl.h>\n#include <sys/ioctl.h>\n#include <unistd.h>\n#include <pthread.h>\n#include <stdlib.h>\n#include <assert.h>\n#include <errno.h>\n#include <sys/types.h>\n#include <sys/stat.h>\n#include <sys/poll.h>\n#include <limits.h>\n#include <semaphore.h>\n\n#ifdef HAVE_SYS_SOUNDCARD_H\n# include <sys/soundcard.h>\n# ifdef __NetBSD__\n#  define DEVICE_NAME_BASE           \"/dev/audio\"\n# else\n#  define DEVICE_NAME_BASE           \"/dev/dsp\"\n# endif\n#elif defined(HAVE_LINUX_SOUNDCARD_H)\n# include <linux/soundcard.h>\n# define DEVICE_NAME_BASE            \"/dev/dsp\"\n#elif defined(HAVE_MACHINE_SOUNDCARD_H)\n# include <machine/soundcard.h> /* JH20010905 */\n# define DEVICE_NAME_BASE            \"/dev/audio\"\n#else\n# error No sound card header file\n#endif\n\n#include \"portaudio.h\"\n#include \"pa_util.h\"\n#include \"pa_allocation.h\"\n#include \"pa_hostapi.h\"\n#include \"pa_stream.h\"\n#include \"pa_cpuload.h\"\n#include \"pa_process.h\"\n#include \"pa_unix_util.h\"\n#include \"pa_debugprint.h\"\n\nstatic int sysErr_;\nstatic pthread_t mainThread_;\n\n/* Check return value of system call, and map it to PaError */\n#define ENSURE_(expr, code) \\\n    do { \\\n        if( UNLIKELY( (sysErr_ = (expr)) < 0 ) ) \\\n        { \\\n            /* PaUtil_SetLastHostErrorInfo should only be used in the main thread */ \\\n            if( (code) == paUnanticipatedHostError && pthread_self() == mainThread_ ) \\\n            { \\\n                PaUtil_SetLastHostErrorInfo( paOSS, sysErr_, strerror( errno ) ); \\\n            } \\\n            \\\n            PaUtil_DebugPrint(( \"Expression '\" #expr \"' failed in '\" __FILE__ \"', line: \" STRINGIZE( __LINE__ ) \"\\n\" )); \\\n            result = (code); \\\n            goto error; \\\n        } \\\n    } while( 0 );\n\n#ifndef AFMT_S16_NE\n#define AFMT_S16_NE  Get_AFMT_S16_NE()\n/*********************************************************************\n * Some versions of OSS do not define AFMT_S16_NE. So check CPU.\n * PowerPC is Big Endian. X86 is Little Endian.\n */\nstatic int Get_AFMT_S16_NE( void )\n{\n    long testData = 1;\n    char *ptr = (char *) &testData;\n    int isLittle = ( *ptr == 1 ); /* Does address point to least significant byte? */\n    return isLittle ? AFMT_S16_LE : AFMT_S16_BE;\n}\n#endif\n\n/* PaOSSHostApiRepresentation - host api datastructure specific to this implementation */\n\ntypedef struct\n{\n    PaUtilHostApiRepresentation inheritedHostApiRep;\n    PaUtilStreamInterface callbackStreamInterface;\n    PaUtilStreamInterface blockingStreamInterface;\n\n    PaUtilAllocationGroup *allocations;\n\n    PaHostApiIndex hostApiIndex;\n}\nPaOSSHostApiRepresentation;\n\n/** Per-direction structure for PaOssStream.\n *\n * Aspect StreamChannels: In case the user requests to open the same device for both capture and playback,\n * but with different number of channels we will have to adapt between the number of user and host\n * channels for at least one direction, since the configuration space is the same for both directions\n * of an OSS device.\n */\ntypedef struct\n{\n    int fd;\n    const char *devName;\n    int userChannelCount, hostChannelCount;\n    int userInterleaved;\n    void *buffer;\n    PaSampleFormat userFormat, hostFormat;\n    double latency;\n    unsigned long hostFrames, numBufs;\n    void **userBuffers; /* For non-interleaved blocking */\n} PaOssStreamComponent;\n\n/** Implementation specific representation of a PaStream.\n *\n */\ntypedef struct PaOssStream\n{\n    PaUtilStreamRepresentation streamRepresentation;\n    PaUtilCpuLoadMeasurer cpuLoadMeasurer;\n    PaUtilBufferProcessor bufferProcessor;\n\n    PaUtilThreading threading;\n\n    int sharedDevice;\n    unsigned long framesPerHostBuffer;\n    int triggered;  /* Have the devices been triggered yet (first start) */\n\n    int isActive;\n    int isStopped;\n\n    int lastPosPtr;\n    double lastStreamBytes;\n\n    int framesProcessed;\n\n    double sampleRate;\n\n    int callbackMode;\n    volatile int callbackStop, callbackAbort;\n\n    PaOssStreamComponent *capture, *playback;\n    unsigned long pollTimeout;\n    sem_t semaphore;\n}\nPaOssStream;\n\ntypedef enum {\n    StreamMode_In,\n    StreamMode_Out\n} StreamMode;\n\n/* prototypes for functions declared in this file */\n\nstatic void Terminate( struct PaUtilHostApiRepresentation *hostApi );\nstatic PaError IsFormatSupported( struct PaUtilHostApiRepresentation *hostApi,\n                                  const PaStreamParameters *inputParameters,\n                                  const PaStreamParameters *outputParameters,\n                                  double sampleRate );\nstatic PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,\n                           PaStream** s,\n                           const PaStreamParameters *inputParameters,\n                           const PaStreamParameters *outputParameters,\n                           double sampleRate,\n                           unsigned long framesPerBuffer,\n                           PaStreamFlags streamFlags,\n                           PaStreamCallback *streamCallback,\n                           void *userData );\nstatic PaError CloseStream( PaStream* stream );\nstatic PaError StartStream( PaStream *stream );\nstatic PaError StopStream( PaStream *stream );\nstatic PaError AbortStream( PaStream *stream );\nstatic PaError IsStreamStopped( PaStream *s );\nstatic PaError IsStreamActive( PaStream *stream );\nstatic PaTime GetStreamTime( PaStream *stream );\nstatic double GetStreamCpuLoad( PaStream* stream );\nstatic PaError ReadStream( PaStream* stream, void *buffer, unsigned long frames );\nstatic PaError WriteStream( PaStream* stream, const void *buffer, unsigned long frames );\nstatic signed long GetStreamReadAvailable( PaStream* stream );\nstatic signed long GetStreamWriteAvailable( PaStream* stream );\nstatic PaError BuildDeviceList( PaOSSHostApiRepresentation *hostApi );\n\n\n/** Initialize the OSS API implementation.\n *\n * This function will initialize host API datastructures and query host devices for information.\n *\n * Aspect DeviceCapabilities: Enumeration of host API devices is initiated from here\n *\n * Aspect FreeResources: If an error is encountered under way we have to free each resource allocated in this function,\n * this happens with the usual \"error\" label.\n */\nPaError PaOSS_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex hostApiIndex )\n{\n    PaError result = paNoError;\n    PaOSSHostApiRepresentation *ossHostApi = NULL;\n\n    PA_UNLESS( ossHostApi = (PaOSSHostApiRepresentation*)PaUtil_AllocateMemory( sizeof(PaOSSHostApiRepresentation) ),\n            paInsufficientMemory );\n    PA_UNLESS( ossHostApi->allocations = PaUtil_CreateAllocationGroup(), paInsufficientMemory );\n    ossHostApi->hostApiIndex = hostApiIndex;\n\n    /* Initialize host API structure */\n    *hostApi = &ossHostApi->inheritedHostApiRep;\n    (*hostApi)->info.structVersion = 1;\n    (*hostApi)->info.type = paOSS;\n    (*hostApi)->info.name = \"OSS\";\n    (*hostApi)->Terminate = Terminate;\n    (*hostApi)->OpenStream = OpenStream;\n    (*hostApi)->IsFormatSupported = IsFormatSupported;\n\n    PA_ENSURE( BuildDeviceList( ossHostApi ) );\n\n    PaUtil_InitializeStreamInterface( &ossHostApi->callbackStreamInterface, CloseStream, StartStream,\n                                      StopStream, AbortStream, IsStreamStopped, IsStreamActive,\n                                      GetStreamTime, GetStreamCpuLoad,\n                                      PaUtil_DummyRead, PaUtil_DummyWrite,\n                                      PaUtil_DummyGetReadAvailable,\n                                      PaUtil_DummyGetWriteAvailable );\n\n    PaUtil_InitializeStreamInterface( &ossHostApi->blockingStreamInterface, CloseStream, StartStream,\n                                      StopStream, AbortStream, IsStreamStopped, IsStreamActive,\n                                      GetStreamTime, PaUtil_DummyGetCpuLoad,\n                                      ReadStream, WriteStream, GetStreamReadAvailable, GetStreamWriteAvailable );\n\n    mainThread_ = pthread_self();\n\n    return result;\n\nerror:\n    if( ossHostApi )\n    {\n        if( ossHostApi->allocations )\n        {\n            PaUtil_FreeAllAllocations( ossHostApi->allocations );\n            PaUtil_DestroyAllocationGroup( ossHostApi->allocations );\n        }\n\n        PaUtil_FreeMemory( ossHostApi );\n    }\n    return result;\n}\n\nPaError PaUtil_InitializeDeviceInfo( PaDeviceInfo *deviceInfo, const char *name, PaHostApiIndex hostApiIndex, int maxInputChannels,\n        int maxOutputChannels, PaTime defaultLowInputLatency, PaTime defaultLowOutputLatency, PaTime defaultHighInputLatency,\n        PaTime defaultHighOutputLatency, double defaultSampleRate, PaUtilAllocationGroup *allocations  )\n{\n    PaError result = paNoError;\n\n    deviceInfo->structVersion = 2;\n    if( allocations )\n    {\n        size_t len = strlen( name ) + 1;\n        PA_UNLESS( deviceInfo->name = PaUtil_GroupAllocateMemory( allocations, len ), paInsufficientMemory );\n        strncpy( (char *)deviceInfo->name, name, len );\n    }\n    else\n        deviceInfo->name = name;\n\n    deviceInfo->hostApi = hostApiIndex;\n    deviceInfo->maxInputChannels = maxInputChannels;\n    deviceInfo->maxOutputChannels = maxOutputChannels;\n    deviceInfo->defaultLowInputLatency = defaultLowInputLatency;\n    deviceInfo->defaultLowOutputLatency = defaultLowOutputLatency;\n    deviceInfo->defaultHighInputLatency = defaultHighInputLatency;\n    deviceInfo->defaultHighOutputLatency = defaultHighOutputLatency;\n    deviceInfo->defaultSampleRate = defaultSampleRate;\n\nerror:\n    return result;\n}\n\nstatic int CalcHigherLogTwo( int n )\n{\n    int log2 = 0;\n    while( (1<<log2) < n ) log2++;\n    return log2;\n}\n\nstatic PaError QueryDirection( const char *deviceName, StreamMode mode, double *defaultSampleRate, int *maxChannelCount,\n        double *defaultLowLatency, double *defaultHighLatency )\n{\n    PaError result = paNoError;\n    int numChannels, maxNumChannels;\n    int busy = 0;\n    int devHandle = -1;\n    int sr;\n    *maxChannelCount = 0;  /* Default value in case this fails */\n    int temp, frgmt;\n    unsigned long fragFrames;\n\n    if ( (devHandle = open( deviceName, (mode == StreamMode_In ? O_RDONLY : O_WRONLY) | O_NONBLOCK ))  < 0 )\n    {\n        if( errno == EBUSY || errno == EAGAIN )\n        {\n            PA_DEBUG(( \"%s: Device %s busy\\n\", __FUNCTION__, deviceName ));\n        }\n        else\n        {\n            /* Ignore ENOENT, which means we've tried a non-existent device */\n            if( errno != ENOENT )\n            {\n                PA_DEBUG(( \"%s: Can't access device %s: %s\\n\", __FUNCTION__, deviceName, strerror( errno ) ));\n            }\n        }\n\n        return paDeviceUnavailable;\n    }\n\n    /* Negotiate for the maximum number of channels for this device. PLB20010927\n     * Consider up to 16 as the upper number of channels.\n     * Variable maxNumChannels should contain the actual upper limit after the call.\n     * Thanks to John Lazzaro and Heiko Purnhagen for suggestions.\n     */\n    maxNumChannels = 0;\n    for( numChannels = 1; numChannels <= 16; numChannels++ )\n    {\n        temp = numChannels;\n        if( ioctl( devHandle, SNDCTL_DSP_CHANNELS, &temp ) < 0 )\n        {\n            busy = EAGAIN == errno || EBUSY == errno;\n            /* ioctl() failed so bail out if we already have stereo */\n            if( maxNumChannels >= 2 )\n                break;\n        }\n        else\n        {\n            /* ioctl() worked but bail out if it does not support numChannels.\n             * We don't want to leave gaps in the numChannels supported.\n             */\n            if( (numChannels > 2) && (temp != numChannels) )\n                break;\n            if( temp > maxNumChannels )\n                maxNumChannels = temp; /* Save maximum. */\n        }\n    }\n    /* A: We're able to open a device for capture if it's busy playing back and vice versa,\n     * but we can't configure anything */\n    if( 0 == maxNumChannels && busy )\n    {\n        result = paDeviceUnavailable;\n        goto error;\n    }\n\n    /* The above negotiation may fail for an old driver so try this older technique. */\n    if( maxNumChannels < 1 )\n    {\n        int stereo = 1;\n        if( ioctl( devHandle, SNDCTL_DSP_STEREO, &stereo ) < 0 )\n        {\n            maxNumChannels = 1;\n        }\n        else\n        {\n            maxNumChannels = (stereo) ? 2 : 1;\n        }\n        PA_DEBUG(( \"%s: use SNDCTL_DSP_STEREO, maxNumChannels = %d\\n\", __FUNCTION__, maxNumChannels ));\n    }\n\n    /* During channel negotiation, the last ioctl() may have failed. This can\n     * also cause sample rate negotiation to fail. Hence the following, to return\n     * to a supported number of channels. SG20011005 */\n    {\n        /* use most reasonable default value */\n        numChannels = PA_MIN( maxNumChannels, 2 );\n        ENSURE_( ioctl( devHandle, SNDCTL_DSP_CHANNELS, &numChannels ), paUnanticipatedHostError );\n    }\n\n    /* Get supported sample rate closest to 44100 Hz */\n    if( *defaultSampleRate < 0 )\n    {\n        sr = 44100;\n        ENSURE_( ioctl( devHandle, SNDCTL_DSP_SPEED, &sr ), paUnanticipatedHostError );\n\n        *defaultSampleRate = sr;\n    }\n\n    *maxChannelCount = maxNumChannels;\n\n    /* Attempt to set low latency with 4 frags-per-buffer, 128 frames-per-frag (total buffer 512 frames)\n     * since the ioctl sets bytes, multiply by numChannels, and base on 2 bytes-per-sample, */\n    fragFrames = 128;\n    frgmt = (4 << 16) + (CalcHigherLogTwo( fragFrames * numChannels * 2 ) & 0xffff);\n    ENSURE_( ioctl( devHandle, SNDCTL_DSP_SETFRAGMENT, &frgmt ), paUnanticipatedHostError );\n\n    /* Use the value set by the ioctl to give the latency achieved */\n    fragFrames = pow( 2, frgmt & 0xffff ) / (numChannels * 2);\n    *defaultLowLatency = ((frgmt >> 16) - 1) * fragFrames / *defaultSampleRate;\n\n    /* Cannot now try setting a high latency (device would need closing and opening again).  Make\n     * high-latency 4 times the low unless the fragFrames are significantly more than requested 128 */\n    temp = (fragFrames < 256) ? 4 : (fragFrames < 512) ? 2 : 1;\n    *defaultHighLatency = temp * *defaultLowLatency;\n\nerror:\n    if( devHandle >= 0 )\n        close( devHandle );\n\n    return result;\n}\n\n/** Query OSS device.\n *\n * This is where PaDeviceInfo objects are constructed and filled in with relevant information.\n *\n * Aspect DeviceCapabilities: The inferred device capabilities are recorded in a PaDeviceInfo object that is constructed\n * in place.\n */\nstatic PaError QueryDevice( char *deviceName, PaOSSHostApiRepresentation *ossApi, PaDeviceInfo **deviceInfo )\n{\n    PaError result = paNoError;\n    double sampleRate = -1.;\n    int maxInputChannels, maxOutputChannels;\n    PaTime defaultLowInputLatency, defaultLowOutputLatency, defaultHighInputLatency, defaultHighOutputLatency;\n    PaError tmpRes = paNoError;\n    int busy = 0;\n    *deviceInfo = NULL;\n\n    /* douglas:\n       we have to do this querying in a slightly different order. apparently\n       some sound cards will give you different info based on their settings.\n       e.g. a card might give you stereo at 22kHz but only mono at 44kHz.\n       the correct order for OSS is: format, channels, sample rate\n    */\n\n    /* Aspect StreamChannels: The number of channels supported for a device may depend on the mode it is\n     * opened in, it may have more channels available for capture than playback and vice versa. Therefore\n     * we will open the device in both read- and write-only mode to determine the supported number.\n     */\n    if( (tmpRes = QueryDirection( deviceName, StreamMode_In, &sampleRate, &maxInputChannels, &defaultLowInputLatency,\n                &defaultHighInputLatency )) != paNoError )\n    {\n        if( tmpRes != paDeviceUnavailable )\n        {\n            PA_DEBUG(( \"%s: Querying device %s for capture failed!\\n\", __FUNCTION__, deviceName ));\n            /* PA_ENSURE( tmpRes ); */\n        }\n        ++busy;\n    }\n    if( (tmpRes = QueryDirection( deviceName, StreamMode_Out, &sampleRate, &maxOutputChannels, &defaultLowOutputLatency,\n                &defaultHighOutputLatency )) != paNoError )\n    {\n        if( tmpRes != paDeviceUnavailable )\n        {\n            PA_DEBUG(( \"%s: Querying device %s for playback failed!\\n\", __FUNCTION__, deviceName ));\n            /* PA_ENSURE( tmpRes ); */\n        }\n        ++busy;\n    }\n    assert( 0 <= busy && busy <= 2 );\n    if( 2 == busy )     /* Both directions are unavailable to us */\n    {\n        result = paDeviceUnavailable;\n        goto error;\n    }\n\n    PA_UNLESS( *deviceInfo = PaUtil_GroupAllocateMemory( ossApi->allocations, sizeof (PaDeviceInfo) ), paInsufficientMemory );\n    PA_ENSURE( PaUtil_InitializeDeviceInfo( *deviceInfo, deviceName, ossApi->hostApiIndex, maxInputChannels, maxOutputChannels,\n                defaultLowInputLatency, defaultLowOutputLatency, defaultHighInputLatency, defaultHighOutputLatency, sampleRate,\n                ossApi->allocations ) );\n\nerror:\n    return result;\n}\n\n/** Query host devices.\n *\n * Loop over host devices and query their capabilitiesu\n *\n * Aspect DeviceCapabilities: This function calls QueryDevice on each device entry and receives a filled in PaDeviceInfo object\n * per device, these are placed in the host api representation's deviceInfos array.\n */\nstatic PaError BuildDeviceList( PaOSSHostApiRepresentation *ossApi )\n{\n    PaError result = paNoError;\n    PaUtilHostApiRepresentation *commonApi = &ossApi->inheritedHostApiRep;\n    int i;\n    int numDevices = 0, maxDeviceInfos = 1;\n    PaDeviceInfo **deviceInfos = NULL;\n\n    /* These two will be set to the first working input and output device, respectively */\n    commonApi->info.defaultInputDevice = paNoDevice;\n    commonApi->info.defaultOutputDevice = paNoDevice;\n\n    /* Find devices by calling QueryDevice on each\n     * potential device names.  When we find a valid one,\n     * add it to a linked list.\n     * A: Set an arbitrary of 100 devices, should probably be a smarter way. */\n\n    for( i = -1; i < 100; i++ )\n    {\n        char deviceName[32];\n        PaDeviceInfo *deviceInfo;\n        int testResult;\n\n        if( i == -1 )\n            snprintf(deviceName, sizeof (deviceName), \"%s\", DEVICE_NAME_BASE);\n        else\n            snprintf(deviceName, sizeof (deviceName), \"%s%d\", DEVICE_NAME_BASE, i);\n\n        /* PA_DEBUG((\"%s: trying device %s\\n\", __FUNCTION__, deviceName )); */\n        if( (testResult = QueryDevice( deviceName, ossApi, &deviceInfo )) != paNoError )\n        {\n            if( testResult != paDeviceUnavailable )\n                PA_ENSURE( testResult );\n\n            continue;\n        }\n\n        ++numDevices;\n        if( !deviceInfos || numDevices > maxDeviceInfos )\n        {\n            maxDeviceInfos *= 2;\n            PA_UNLESS( deviceInfos = (PaDeviceInfo **) realloc( deviceInfos, maxDeviceInfos * sizeof (PaDeviceInfo *) ),\n                    paInsufficientMemory );\n        }\n        {\n            int devIdx = numDevices - 1;\n            deviceInfos[devIdx] = deviceInfo;\n\n            if( commonApi->info.defaultInputDevice == paNoDevice && deviceInfo->maxInputChannels > 0 )\n                commonApi->info.defaultInputDevice = devIdx;\n            if( commonApi->info.defaultOutputDevice == paNoDevice && deviceInfo->maxOutputChannels > 0 )\n                commonApi->info.defaultOutputDevice = devIdx;\n        }\n    }\n\n    /* Make an array of PaDeviceInfo pointers out of the linked list */\n\n    PA_DEBUG((\"PaOSS %s: Total number of devices found: %d\\n\", __FUNCTION__, numDevices));\n\n    commonApi->deviceInfos = (PaDeviceInfo**)PaUtil_GroupAllocateMemory(\n        ossApi->allocations, sizeof(PaDeviceInfo*) * numDevices );\n    memcpy( commonApi->deviceInfos, deviceInfos, numDevices * sizeof (PaDeviceInfo *) );\n\n    commonApi->info.deviceCount = numDevices;\n\nerror:\n    free( deviceInfos );\n\n    return result;\n}\n\nstatic void Terminate( struct PaUtilHostApiRepresentation *hostApi )\n{\n    PaOSSHostApiRepresentation *ossHostApi = (PaOSSHostApiRepresentation*)hostApi;\n\n    if( ossHostApi->allocations )\n    {\n        PaUtil_FreeAllAllocations( ossHostApi->allocations );\n        PaUtil_DestroyAllocationGroup( ossHostApi->allocations );\n    }\n\n    PaUtil_FreeMemory( ossHostApi );\n}\n\nstatic PaError IsFormatSupported( struct PaUtilHostApiRepresentation *hostApi,\n                                  const PaStreamParameters *inputParameters,\n                                  const PaStreamParameters *outputParameters,\n                                  double sampleRate )\n{\n    PaError result = paNoError;\n    PaDeviceIndex device;\n    PaDeviceInfo *deviceInfo;\n    char *deviceName;\n    int inputChannelCount, outputChannelCount;\n    int tempDevHandle = -1;\n    int flags;\n    PaSampleFormat inputSampleFormat, outputSampleFormat;\n\n    if( inputParameters )\n    {\n        inputChannelCount = inputParameters->channelCount;\n        inputSampleFormat = inputParameters->sampleFormat;\n\n        /* unless alternate device specification is supported, reject the use of\n            paUseHostApiSpecificDeviceSpecification */\n\n        if( inputParameters->device == paUseHostApiSpecificDeviceSpecification )\n            return paInvalidDevice;\n\n        /* check that input device can support inputChannelCount */\n        if( inputChannelCount > hostApi->deviceInfos[ inputParameters->device ]->maxInputChannels )\n            return paInvalidChannelCount;\n\n        /* validate inputStreamInfo */\n        if( inputParameters->hostApiSpecificStreamInfo )\n            return paIncompatibleHostApiSpecificStreamInfo; /* this implementation doesn't use custom stream info */\n    }\n    else\n    {\n        inputChannelCount = 0;\n    }\n\n    if( outputParameters )\n    {\n        outputChannelCount = outputParameters->channelCount;\n        outputSampleFormat = outputParameters->sampleFormat;\n\n        /* unless alternate device specification is supported, reject the use of\n            paUseHostApiSpecificDeviceSpecification */\n\n        if( outputParameters->device == paUseHostApiSpecificDeviceSpecification )\n            return paInvalidDevice;\n\n        /* check that output device can support inputChannelCount */\n        if( outputChannelCount > hostApi->deviceInfos[ outputParameters->device ]->maxOutputChannels )\n            return paInvalidChannelCount;\n\n        /* validate outputStreamInfo */\n        if( outputParameters->hostApiSpecificStreamInfo )\n            return paIncompatibleHostApiSpecificStreamInfo; /* this implementation doesn't use custom stream info */\n    }\n    else\n    {\n        outputChannelCount = 0;\n    }\n\n    if (inputChannelCount == 0 && outputChannelCount == 0)\n        return paInvalidChannelCount;\n\n    /* if full duplex, make sure that they're the same device */\n\n    if (inputChannelCount > 0 && outputChannelCount > 0 &&\n            inputParameters->device != outputParameters->device)\n        return paInvalidDevice;\n\n    /* if full duplex, also make sure that they're the same number of channels */\n\n    if (inputChannelCount > 0 && outputChannelCount > 0 &&\n            inputChannelCount != outputChannelCount)\n        return paInvalidChannelCount;\n\n    /* open the device so we can do more tests */\n\n    if( inputChannelCount > 0 )\n    {\n        result = PaUtil_DeviceIndexToHostApiDeviceIndex(&device, inputParameters->device, hostApi);\n        if (result != paNoError)\n            return result;\n    }\n    else\n    {\n        result = PaUtil_DeviceIndexToHostApiDeviceIndex(&device, outputParameters->device, hostApi);\n        if (result != paNoError)\n            return result;\n    }\n\n    deviceInfo = hostApi->deviceInfos[device];\n    deviceName = (char *)deviceInfo->name;\n\n    flags = O_NONBLOCK;\n    if (inputChannelCount > 0 && outputChannelCount > 0)\n        flags |= O_RDWR;\n    else if (inputChannelCount > 0)\n        flags |= O_RDONLY;\n    else\n        flags |= O_WRONLY;\n\n    ENSURE_( tempDevHandle = open( deviceInfo->name, flags ), paDeviceUnavailable );\n\n    /* PaOssStream_Configure will do the rest of the checking for us */\n    /* PA_ENSURE( PaOssStream_Configure( tempDevHandle, deviceName, outputChannelCount, &sampleRate ) ); */\n\n    /* everything succeeded! */\n\nerror:\n    if( tempDevHandle >= 0 )\n        close( tempDevHandle );\n\n    return result;\n}\n\n/** Validate stream parameters.\n *\n * Aspect StreamChannels: We verify that the number of channels is within the allowed range for the device\n */\nstatic PaError ValidateParameters( const PaStreamParameters *parameters, const PaDeviceInfo *deviceInfo, StreamMode mode )\n{\n    int maxChans;\n\n    assert( parameters );\n\n    if( parameters->device == paUseHostApiSpecificDeviceSpecification )\n    {\n        return paInvalidDevice;\n    }\n\n    maxChans = (mode == StreamMode_In ? deviceInfo->maxInputChannels : deviceInfo->maxOutputChannels);\n    if( parameters->channelCount > maxChans )\n    {\n        return paInvalidChannelCount;\n    }\n\n    return paNoError;\n}\n\nstatic PaError PaOssStreamComponent_Initialize( PaOssStreamComponent *component, const PaStreamParameters *parameters,\n        int callbackMode, int fd, const char *deviceName )\n{\n    PaError result = paNoError;\n    assert( component );\n\n    memset( component, 0, sizeof (PaOssStreamComponent) );\n\n    component->fd = fd;\n    component->devName = deviceName;\n    component->userChannelCount = parameters->channelCount;\n    component->userFormat = parameters->sampleFormat;\n    component->latency = parameters->suggestedLatency;\n    component->userInterleaved = !(parameters->sampleFormat & paNonInterleaved);\n\n    if( !callbackMode && !component->userInterleaved )\n    {\n        /* Pre-allocate non-interleaved user provided buffers */\n        PA_UNLESS( component->userBuffers = PaUtil_AllocateMemory( sizeof (void *) * component->userChannelCount ),\n                paInsufficientMemory );\n    }\n\nerror:\n    return result;\n}\n\nstatic void PaOssStreamComponent_Terminate( PaOssStreamComponent *component )\n{\n    assert( component );\n\n    if( component->fd >= 0 )\n        close( component->fd );\n    if( component->buffer )\n        PaUtil_FreeMemory( component->buffer );\n\n    if( component->userBuffers )\n        PaUtil_FreeMemory( component->userBuffers );\n\n    PaUtil_FreeMemory( component );\n}\n\nstatic PaError ModifyBlocking( int fd, int blocking )\n{\n    PaError result = paNoError;\n    int fflags;\n\n    ENSURE_( fflags = fcntl( fd, F_GETFL ), paUnanticipatedHostError );\n\n    if( blocking )\n        fflags &= ~O_NONBLOCK;\n    else\n        fflags |= O_NONBLOCK;\n\n    ENSURE_( fcntl( fd, F_SETFL, fflags ), paUnanticipatedHostError );\n\nerror:\n    return result;\n}\n\n/** Open input and output devices.\n *\n * @param idev: Returned input device file descriptor.\n * @param odev: Returned output device file descriptor.\n */\nstatic PaError OpenDevices( const char *idevName, const char *odevName, int *idev, int *odev )\n{\n    PaError result = paNoError;\n    int flags = O_NONBLOCK, duplex = 0;\n    *idev = *odev = -1;\n\n    if( idevName && odevName )\n    {\n        duplex = 1;\n        flags |= O_RDWR;\n    }\n    else if( idevName )\n        flags |= O_RDONLY;\n    else\n        flags |= O_WRONLY;\n\n    /* open first in nonblocking mode, in case it's busy...\n     * A: then unset the non-blocking attribute */\n    assert( flags & O_NONBLOCK );\n    if( idevName )\n    {\n        ENSURE_( *idev = open( idevName, flags ), paDeviceUnavailable );\n        PA_ENSURE( ModifyBlocking( *idev, 1 ) ); /* Blocking */\n    }\n    if( odevName )\n    {\n        if( !idevName )\n        {\n            ENSURE_( *odev = open( odevName, flags ), paDeviceUnavailable );\n            PA_ENSURE( ModifyBlocking( *odev, 1 ) ); /* Blocking */\n        }\n        else\n        {\n            ENSURE_( *odev = dup( *idev ), paUnanticipatedHostError );\n        }\n    }\n\nerror:\n    return result;\n}\n\nstatic PaError PaOssStream_Initialize( PaOssStream *stream, const PaStreamParameters *inputParameters, const PaStreamParameters *outputParameters,\n        PaStreamCallback callback, void *userData, PaStreamFlags streamFlags,\n        PaOSSHostApiRepresentation *ossApi )\n{\n    PaError result = paNoError;\n    int idev, odev;\n    PaUtilHostApiRepresentation *hostApi = &ossApi->inheritedHostApiRep;\n    const char *idevName = NULL, *odevName = NULL;\n\n    assert( stream );\n\n    memset( stream, 0, sizeof (PaOssStream) );\n    stream->isStopped = 1;\n\n    PA_ENSURE( PaUtil_InitializeThreading( &stream->threading ) );\n\n    if( inputParameters && outputParameters )\n    {\n        if( inputParameters->device == outputParameters->device )\n            stream->sharedDevice = 1;\n    }\n\n    if( inputParameters )\n        idevName = hostApi->deviceInfos[inputParameters->device]->name;\n    if( outputParameters )\n        odevName = hostApi->deviceInfos[outputParameters->device]->name;\n    PA_ENSURE( OpenDevices( idevName, odevName, &idev, &odev ) );\n    if( inputParameters )\n    {\n        PA_UNLESS( stream->capture = PaUtil_AllocateMemory( sizeof (PaOssStreamComponent) ), paInsufficientMemory );\n        PA_ENSURE( PaOssStreamComponent_Initialize( stream->capture, inputParameters, callback != NULL, idev, idevName ) );\n    }\n    if( outputParameters )\n    {\n        PA_UNLESS( stream->playback = PaUtil_AllocateMemory( sizeof (PaOssStreamComponent) ), paInsufficientMemory );\n        PA_ENSURE( PaOssStreamComponent_Initialize( stream->playback, outputParameters, callback != NULL, odev, odevName ) );\n    }\n\n    if( callback != NULL )\n    {\n        PaUtil_InitializeStreamRepresentation( &stream->streamRepresentation,\n                                               &ossApi->callbackStreamInterface, callback, userData );\n        stream->callbackMode = 1;\n    }\n    else\n    {\n        PaUtil_InitializeStreamRepresentation( &stream->streamRepresentation,\n                                               &ossApi->blockingStreamInterface, callback, userData );\n    }\n\n    ENSURE_( sem_init( &stream->semaphore, 0, 0 ), paInternalError );\n\nerror:\n    return result;\n}\n\nstatic void PaOssStream_Terminate( PaOssStream *stream )\n{\n    assert( stream );\n\n    PaUtil_TerminateStreamRepresentation( &stream->streamRepresentation );\n    PaUtil_TerminateThreading( &stream->threading );\n\n    if( stream->capture )\n        PaOssStreamComponent_Terminate( stream->capture );\n    if( stream->playback )\n        PaOssStreamComponent_Terminate( stream->playback );\n\n    sem_destroy( &stream->semaphore );\n\n    PaUtil_FreeMemory( stream );\n}\n\n/** Translate from PA format to OSS native.\n *\n */\nstatic PaError Pa2OssFormat( PaSampleFormat paFormat, int *ossFormat )\n{\n    switch( paFormat )\n    {\n        case paUInt8:\n            *ossFormat = AFMT_U8;\n            break;\n        case paInt8:\n            *ossFormat = AFMT_S8;\n            break;\n        case paInt16:\n            *ossFormat = AFMT_S16_NE;\n            break;\n#ifdef AFMT_S32_NE\n        case paInt32:\n            *ossFormat = AFMT_S32_NE;\n            break;\n#endif\n        default:\n            return paInternalError;     /* This shouldn't happen */\n    }\n\n    return paNoError;\n}\n\n/** Return the PA-compatible formats that this device can support.\n *\n */\nstatic PaError GetAvailableFormats( PaOssStreamComponent *component, PaSampleFormat *availableFormats )\n{\n    PaError result = paNoError;\n    int mask = 0;\n    PaSampleFormat frmts = 0;\n\n    ENSURE_( ioctl( component->fd, SNDCTL_DSP_GETFMTS, &mask ), paUnanticipatedHostError );\n    if( mask & AFMT_U8 )\n        frmts |= paUInt8;\n    if( mask & AFMT_S8 )\n        frmts |= paInt8;\n    if( mask & AFMT_S16_NE )\n        frmts |= paInt16;\n#ifdef AFMT_S32_NE\n    if( mask & AFMT_S32_NE )\n        frmts |= paInt32;\n#endif\n    if( frmts == 0 )\n        result = paSampleFormatNotSupported;\n\n    *availableFormats = frmts;\n\nerror:\n    return result;\n}\n\nstatic unsigned int PaOssStreamComponent_FrameSize( PaOssStreamComponent *component )\n{\n    return Pa_GetSampleSize( component->hostFormat ) * component->hostChannelCount;\n}\n\n/** Buffer size in bytes.\n *\n */\nstatic unsigned long PaOssStreamComponent_BufferSize( PaOssStreamComponent *component )\n{\n    return PaOssStreamComponent_FrameSize( component ) * component->hostFrames * component->numBufs;\n}\n\n/** Configure stream component device parameters.\n */\nstatic PaError PaOssStreamComponent_Configure( PaOssStreamComponent *component, double sampleRate, unsigned long\n        framesPerBuffer, StreamMode streamMode, PaOssStreamComponent *master )\n{\n    PaError result = paNoError;\n    int temp, nativeFormat;\n    int sr = (int)sampleRate;\n    PaSampleFormat availableFormats = 0, hostFormat = 0;\n    int chans = component->userChannelCount;\n    int frgmt;\n    int numBufs;\n    int bytesPerBuf;\n    unsigned long bufSz;\n    unsigned long fragSz;\n    audio_buf_info bufInfo;\n\n    /* We may have a situation where only one component (the master) is configured, if both point to the same device.\n     * In that case, the second component will copy settings from the other */\n    if( !master )\n    {\n        /* Aspect BufferSettings: If framesPerBuffer is unspecified we have to infer a suitable fragment size.\n         * The hardware need not respect the requested fragment size, so we may have to adapt.\n         */\n        if( framesPerBuffer == paFramesPerBufferUnspecified )\n        {\n            /* Aim for 4 fragments in the complete buffer; the latency comes from 3 of these */\n            fragSz = (unsigned long)(component->latency * sampleRate / 3);\n            bufSz = fragSz * 4;\n        }\n        else\n        {\n            fragSz = framesPerBuffer;\n            bufSz = (unsigned long)(component->latency * sampleRate) + fragSz; /* Latency + 1 buffer */\n        }\n\n        PA_ENSURE( GetAvailableFormats( component, &availableFormats ) );\n        hostFormat = PaUtil_SelectClosestAvailableFormat( availableFormats, component->userFormat );\n\n        /* OSS demands at least 2 buffers, and 16 bytes per buffer */\n        numBufs = (int)PA_MAX( bufSz / fragSz, 2 );\n        bytesPerBuf = PA_MAX( fragSz * Pa_GetSampleSize( hostFormat ) * chans, 16 );\n\n        /* The fragment parameters are encoded like this:\n         * Most significant byte: number of fragments\n         * Least significant byte: exponent of fragment size (i.e., for 256, 8)\n         */\n        frgmt = (numBufs << 16) + (CalcHigherLogTwo( bytesPerBuf ) & 0xffff);\n        ENSURE_( ioctl( component->fd, SNDCTL_DSP_SETFRAGMENT, &frgmt ), paUnanticipatedHostError );\n\n        /* A: according to the OSS programmer's guide parameters should be set in this order:\n         * format, channels, rate */\n\n        /* This format should be deemed good before we get this far */\n        PA_ENSURE( Pa2OssFormat( hostFormat, &temp ) );\n        nativeFormat = temp;\n        ENSURE_( ioctl( component->fd, SNDCTL_DSP_SETFMT, &temp ), paUnanticipatedHostError );\n        PA_UNLESS( temp == nativeFormat, paInternalError );\n\n        /* try to set the number of channels */\n        ENSURE_( ioctl( component->fd, SNDCTL_DSP_CHANNELS, &chans ), paSampleFormatNotSupported );   /* XXX: Should be paInvalidChannelCount? */\n        /* It's possible that the minimum number of host channels is greater than what the user requested */\n        PA_UNLESS( chans >= component->userChannelCount, paInvalidChannelCount );\n\n        /* try to set the sample rate */\n        ENSURE_( ioctl( component->fd, SNDCTL_DSP_SPEED, &sr ), paInvalidSampleRate );\n\n        /* reject if there's no sample rate within 1% of the one requested */\n        if( (fabs( sampleRate - sr ) / sampleRate) > 0.01 )\n        {\n            PA_DEBUG((\"%s: Wanted %f, closest sample rate was %d\\n\", __FUNCTION__, sampleRate, sr ));\n            PA_ENSURE( paInvalidSampleRate );\n        }\n\n        ENSURE_( ioctl( component->fd, streamMode == StreamMode_In ? SNDCTL_DSP_GETISPACE : SNDCTL_DSP_GETOSPACE, &bufInfo ),\n                paUnanticipatedHostError );\n        component->numBufs = bufInfo.fragstotal;\n\n        /* This needs to be the last ioctl call before the first read/write, according to the OSS programmer's guide */\n        ENSURE_( ioctl( component->fd, SNDCTL_DSP_GETBLKSIZE, &bytesPerBuf ), paUnanticipatedHostError );\n\n        component->hostFrames = bytesPerBuf / Pa_GetSampleSize( hostFormat ) / chans;\n        component->hostChannelCount = chans;\n        component->hostFormat = hostFormat;\n    }\n    else\n    {\n        component->hostFormat = master->hostFormat;\n        component->hostFrames = master->hostFrames;\n        component->hostChannelCount = master->hostChannelCount;\n        component->numBufs = master->numBufs;\n    }\n\n    PA_UNLESS( component->buffer = PaUtil_AllocateMemory( PaOssStreamComponent_BufferSize( component ) ),\n            paInsufficientMemory );\n\nerror:\n    return result;\n}\n\nstatic PaError PaOssStreamComponent_Read( PaOssStreamComponent *component, unsigned long *frames )\n{\n    PaError result = paNoError;\n    size_t len = *frames * PaOssStreamComponent_FrameSize( component );\n    ssize_t bytesRead;\n\n    ENSURE_( bytesRead = read( component->fd, component->buffer, len ), paUnanticipatedHostError );\n    *frames = bytesRead / PaOssStreamComponent_FrameSize( component );\n    /* TODO: Handle condition where number of frames read doesn't equal number of frames requested */\n\nerror:\n    return result;\n}\n\nstatic PaError PaOssStreamComponent_Write( PaOssStreamComponent *component, unsigned long *frames )\n{\n    PaError result = paNoError;\n    size_t len = *frames * PaOssStreamComponent_FrameSize( component );\n    ssize_t bytesWritten;\n\n    ENSURE_( bytesWritten = write( component->fd, component->buffer, len ), paUnanticipatedHostError );\n    *frames = bytesWritten / PaOssStreamComponent_FrameSize( component );\n    /* TODO: Handle condition where number of frames written doesn't equal number of frames requested */\n\nerror:\n    return result;\n}\n\n/** Configure the stream according to input/output parameters.\n *\n * Aspect StreamChannels: The minimum number of channels supported by the device may exceed that requested by\n * the user, if so we'll record the actual number of host channels and adapt later.\n */\nstatic PaError PaOssStream_Configure( PaOssStream *stream, double sampleRate, unsigned long framesPerBuffer,\n        double *inputLatency, double *outputLatency )\n{\n    PaError result = paNoError;\n    int duplex = stream->capture && stream->playback;\n    unsigned long framesPerHostBuffer = 0;\n\n    /* We should request full duplex first thing after opening the device */\n    if( duplex && stream->sharedDevice )\n        ENSURE_( ioctl( stream->capture->fd, SNDCTL_DSP_SETDUPLEX, 0 ), paUnanticipatedHostError );\n\n    if( stream->capture )\n    {\n        PaOssStreamComponent *component = stream->capture;\n        PA_ENSURE( PaOssStreamComponent_Configure( component, sampleRate, framesPerBuffer, StreamMode_In,\n                    NULL ) );\n\n        assert( component->hostChannelCount > 0 );\n        assert( component->hostFrames > 0 );\n\n        *inputLatency = (component->hostFrames * (component->numBufs - 1)) / sampleRate;\n    }\n    if( stream->playback )\n    {\n        PaOssStreamComponent *component = stream->playback, *master = stream->sharedDevice ? stream->capture : NULL;\n        PA_ENSURE( PaOssStreamComponent_Configure( component, sampleRate, framesPerBuffer, StreamMode_Out,\n                    master ) );\n\n        assert( component->hostChannelCount > 0 );\n        assert( component->hostFrames > 0 );\n\n        *outputLatency = (component->hostFrames * (component->numBufs - 1)) / sampleRate;\n    }\n\n    if( duplex )\n        framesPerHostBuffer = PA_MIN( stream->capture->hostFrames, stream->playback->hostFrames );\n    else if( stream->capture )\n        framesPerHostBuffer = stream->capture->hostFrames;\n    else if( stream->playback )\n        framesPerHostBuffer = stream->playback->hostFrames;\n\n    stream->framesPerHostBuffer = framesPerHostBuffer;\n    stream->pollTimeout = (int) ceil( 1e6 * framesPerHostBuffer / sampleRate );    /* Period in usecs, rounded up */\n\n    stream->sampleRate = stream->streamRepresentation.streamInfo.sampleRate = sampleRate;\n\nerror:\n    return result;\n}\n\n/* see pa_hostapi.h for a list of validity guarantees made about OpenStream parameters */\n\n/** Open a PA OSS stream.\n *\n * Aspect StreamChannels: The number of channels is specified per direction (in/out), and can differ between the\n * two. However, OSS doesn't support separate configuration spaces for capture and playback so if both\n * directions are the same device we will demand the same number of channels. The number of channels can range\n * from 1 to the maximum supported by the device.\n *\n * Aspect BufferSettings: If framesPerBuffer != paFramesPerBufferUnspecified the number of frames per callback\n * must reflect this, in addition the host latency per device should approximate the corresponding\n * suggestedLatency. Based on these constraints we need to determine a number of frames per host buffer that\n * both capture and playback can agree on (they can be different devices), the buffer processor can adapt\n * between host and user buffer size, but the ratio should preferably be integral.\n */\nstatic PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,\n                           PaStream** s,\n                           const PaStreamParameters *inputParameters,\n                           const PaStreamParameters *outputParameters,\n                           double sampleRate,\n                           unsigned long framesPerBuffer,\n                           PaStreamFlags streamFlags,\n                           PaStreamCallback *streamCallback,\n                           void *userData )\n{\n    PaError result = paNoError;\n    PaOSSHostApiRepresentation *ossHostApi = (PaOSSHostApiRepresentation*)hostApi;\n    PaOssStream *stream = NULL;\n    int inputChannelCount = 0, outputChannelCount = 0;\n    PaSampleFormat inputSampleFormat = 0, outputSampleFormat = 0, inputHostFormat = 0, outputHostFormat = 0;\n    const PaDeviceInfo *inputDeviceInfo = 0, *outputDeviceInfo = 0;\n    int bpInitialized = 0;\n    double inLatency = 0., outLatency = 0.;\n    int i = 0;\n\n    /* validate platform specific flags */\n    if( (streamFlags & paPlatformSpecificFlags) != 0 )\n        return paInvalidFlag; /* unexpected platform specific flag */\n\n    if( inputParameters )\n    {\n        /* unless alternate device specification is supported, reject the use of\n            paUseHostApiSpecificDeviceSpecification */\n        inputDeviceInfo = hostApi->deviceInfos[inputParameters->device];\n        PA_ENSURE( ValidateParameters( inputParameters, inputDeviceInfo, StreamMode_In ) );\n\n        inputChannelCount = inputParameters->channelCount;\n        inputSampleFormat = inputParameters->sampleFormat;\n    }\n    if( outputParameters )\n    {\n        outputDeviceInfo = hostApi->deviceInfos[outputParameters->device];\n        PA_ENSURE( ValidateParameters( outputParameters, outputDeviceInfo, StreamMode_Out ) );\n\n        outputChannelCount = outputParameters->channelCount;\n        outputSampleFormat = outputParameters->sampleFormat;\n    }\n\n    /* Aspect StreamChannels: We currently demand that number of input and output channels are the same, if the same\n     * device is opened for both directions\n     */\n    if( inputChannelCount > 0 && outputChannelCount > 0 )\n    {\n        if( inputParameters->device == outputParameters->device )\n        {\n            if( inputParameters->channelCount != outputParameters->channelCount )\n                return paInvalidChannelCount;\n        }\n    }\n\n    /* Round framesPerBuffer to the next power-of-two to make OSS happy. */\n    if( framesPerBuffer != paFramesPerBufferUnspecified )\n    {\n        framesPerBuffer &= INT_MAX;\n        for (i = 1; framesPerBuffer > i; i <<= 1) ;\n        framesPerBuffer = i;\n    }\n\n    /* allocate and do basic initialization of the stream structure */\n    PA_UNLESS( stream = (PaOssStream*)PaUtil_AllocateMemory( sizeof(PaOssStream) ), paInsufficientMemory );\n    PA_ENSURE( PaOssStream_Initialize( stream, inputParameters, outputParameters, streamCallback, userData, streamFlags, ossHostApi ) );\n\n    PA_ENSURE( PaOssStream_Configure( stream, sampleRate, framesPerBuffer, &inLatency, &outLatency ) );\n\n    PaUtil_InitializeCpuLoadMeasurer( &stream->cpuLoadMeasurer, sampleRate );\n\n    if( inputParameters )\n    {\n        inputHostFormat = stream->capture->hostFormat;\n        stream->streamRepresentation.streamInfo.inputLatency = inLatency +\n            PaUtil_GetBufferProcessorInputLatencyFrames( &stream->bufferProcessor ) / sampleRate;\n    }\n    if( outputParameters )\n    {\n        outputHostFormat = stream->playback->hostFormat;\n        stream->streamRepresentation.streamInfo.outputLatency = outLatency +\n            PaUtil_GetBufferProcessorOutputLatencyFrames( &stream->bufferProcessor ) / sampleRate;\n    }\n\n    /* Initialize buffer processor with fixed host buffer size.\n     * Aspect StreamSampleFormat: Here we commit the user and host sample formats, PA infrastructure will\n     * convert between the two.\n     */\n    PA_ENSURE( PaUtil_InitializeBufferProcessor( &stream->bufferProcessor,\n              inputChannelCount, inputSampleFormat, inputHostFormat, outputChannelCount, outputSampleFormat,\n              outputHostFormat, sampleRate, streamFlags, framesPerBuffer, stream->framesPerHostBuffer,\n              paUtilFixedHostBufferSize, streamCallback, userData ) );\n    bpInitialized = 1;\n\n    *s = (PaStream*)stream;\n\n    return result;\n\nerror:\n    if( bpInitialized )\n        PaUtil_TerminateBufferProcessor( &stream->bufferProcessor );\n    if( stream )\n        PaOssStream_Terminate( stream );\n\n    return result;\n}\n\n/*! Poll on I/O filedescriptors.\n\n  Poll till we've determined there's data for read or write. In the full-duplex case,\n  we don't want to hang around forever waiting for either input or output frames, so\n  whenever we have a timed out filedescriptor we check if we're nearing under/overrun\n  for the other direction (critical limit set at one buffer). If so, we exit the waiting\n  state, and go on with what we got. We align the number of frames on a host buffer\n  boundary because it is possible that the buffer size differs for the two directions and\n  the host buffer size is a compromise between the two.\n  */\nstatic PaError PaOssStream_WaitForFrames( PaOssStream *stream, unsigned long *frames )\n{\n    PaError result = paNoError;\n    int pollPlayback = 0, pollCapture = 0;\n    int captureAvail = INT_MAX, playbackAvail = INT_MAX, commonAvail;\n    audio_buf_info bufInfo;\n    /* int ofs = 0, nfds = stream->nfds; */\n    fd_set readFds, writeFds;\n    int nfds = 0;\n    struct timeval selectTimeval = {0, 0};\n    unsigned long timeout = stream->pollTimeout;    /* In usecs */\n    int captureFd = -1, playbackFd = -1;\n\n    assert( stream );\n    assert( frames );\n\n    if( stream->capture )\n    {\n        pollCapture = 1;\n        captureFd = stream->capture->fd;\n        /* stream->capture->pfd->events = POLLIN; */\n    }\n    if( stream->playback )\n    {\n        pollPlayback = 1;\n        playbackFd = stream->playback->fd;\n        /* stream->playback->pfd->events = POLLOUT; */\n    }\n\n    FD_ZERO( &readFds );\n    FD_ZERO( &writeFds );\n\n    while( pollPlayback || pollCapture )\n    {\n#ifdef PTHREAD_CANCELED\n        pthread_testcancel();\n#else\n        /* avoid indefinite waiting on thread not supporting cancellation */\n        if( stream->callbackStop || stream->callbackAbort )\n        {\n            PA_DEBUG(( \"Cancelling PaOssStream_WaitForFrames\\n\" ));\n            (*frames) = 0;\n            return paNoError;\n        }\n#endif\n\n        /* select may modify the timeout parameter */\n        selectTimeval.tv_usec = timeout;\n        nfds = 0;\n\n        if( pollCapture )\n        {\n            FD_SET( captureFd, &readFds );\n            nfds = captureFd + 1;\n        }\n        if( pollPlayback )\n        {\n            FD_SET( playbackFd, &writeFds );\n            nfds = PA_MAX( nfds, playbackFd + 1 );\n        }\n        ENSURE_( select( nfds, &readFds, &writeFds, NULL, &selectTimeval ), paUnanticipatedHostError );\n        /*\n        if( poll( stream->pfds + ofs, nfds, stream->pollTimeout ) < 0 )\n        {\n\n            ENSURE_( -1, paUnanticipatedHostError );\n        }\n        */\n#ifdef PTHREAD_CANCELED\n        pthread_testcancel();\n#else\n        /* avoid indefinite waiting on thread not supporting cancellation */\n        if( stream->callbackStop || stream->callbackAbort )\n        {\n            PA_DEBUG(( \"Cancelling PaOssStream_WaitForFrames\\n\" ));\n            (*frames) = 0;\n            return paNoError;\n        }\n#endif\n        if( pollCapture )\n        {\n            if( FD_ISSET( captureFd, &readFds ) )\n            {\n                FD_CLR( captureFd, &readFds );\n                pollCapture = 0;\n            }\n            /*\n            if( stream->capture->pfd->revents & POLLIN )\n            {\n                --nfds;\n                ++ofs;\n                pollCapture = 0;\n            }\n            */\n            else if( stream->playback ) /* Timed out, go on with playback? */\n            {\n                /*PA_DEBUG(( \"%s: Trying to poll again for capture frames, pollTimeout: %d\\n\",\n                            __FUNCTION__, stream->pollTimeout ));*/\n            }\n        }\n        if( pollPlayback )\n        {\n            if( FD_ISSET( playbackFd, &writeFds ) )\n            {\n                FD_CLR( playbackFd, &writeFds );\n                pollPlayback = 0;\n            }\n            /*\n            if( stream->playback->pfd->revents & POLLOUT )\n            {\n                --nfds;\n                pollPlayback = 0;\n            }\n            */\n            else if( stream->capture )  /* Timed out, go on with capture? */\n            {\n                /*PA_DEBUG(( \"%s: Trying to poll again for playback frames, pollTimeout: %d\\n\\n\",\n                            __FUNCTION__, stream->pollTimeout ));*/\n            }\n        }\n    }\n\n    if( stream->capture )\n    {\n        ENSURE_( ioctl( captureFd, SNDCTL_DSP_GETISPACE, &bufInfo ), paUnanticipatedHostError );\n        captureAvail = bufInfo.fragments * stream->capture->hostFrames;\n        if( !captureAvail )\n            PA_DEBUG(( \"%s: captureAvail: 0\\n\", __FUNCTION__ ));\n\n        captureAvail = captureAvail == 0 ? INT_MAX : captureAvail;      /* Disregard if zero */\n    }\n    if( stream->playback )\n    {\n        ENSURE_( ioctl( playbackFd, SNDCTL_DSP_GETOSPACE, &bufInfo ), paUnanticipatedHostError );\n        playbackAvail = bufInfo.fragments * stream->playback->hostFrames;\n        if( !playbackAvail )\n        {\n            PA_DEBUG(( \"%s: playbackAvail: 0\\n\", __FUNCTION__ ));\n        }\n\n        playbackAvail = playbackAvail == 0 ? INT_MAX : playbackAvail;      /* Disregard if zero */\n    }\n\n    commonAvail = PA_MIN( captureAvail, playbackAvail );\n    if( commonAvail == INT_MAX )\n        commonAvail = 0;\n    commonAvail -= commonAvail % stream->framesPerHostBuffer;\n\n    assert( commonAvail != INT_MAX );\n    assert( commonAvail >= 0 );\n    *frames = commonAvail;\n\nerror:\n    return result;\n}\n\n/** Prepare stream for capture/playback.\n *\n * In order to synchronize capture and playback properly we use the SETTRIGGER command.\n */\nstatic PaError PaOssStream_Prepare( PaOssStream *stream )\n{\n    PaError result = paNoError;\n    int enableBits = 0;\n\n    if( stream->triggered )\n        return result;\n\n    /* The OSS reference instructs us to clear direction bits before setting them.*/\n    if( stream->playback )\n        ENSURE_( ioctl( stream->playback->fd, SNDCTL_DSP_SETTRIGGER, &enableBits ), paUnanticipatedHostError );\n    if( stream->capture )\n        ENSURE_( ioctl( stream->capture->fd, SNDCTL_DSP_SETTRIGGER, &enableBits ), paUnanticipatedHostError );\n\n    if( stream->playback )\n    {\n        size_t bufSz = PaOssStreamComponent_BufferSize( stream->playback );\n        memset( stream->playback->buffer, 0, bufSz );\n\n        /* Looks like we have to turn off blocking before we try this, but if we don't fill the buffer\n         * OSS will complain. */\n        PA_ENSURE( ModifyBlocking( stream->playback->fd, 0 ) );\n        while (1)\n        {\n            if( write( stream->playback->fd, stream->playback->buffer, bufSz ) < 0 )\n                break;\n        }\n        PA_ENSURE( ModifyBlocking( stream->playback->fd, 1 ) );\n    }\n\n    if( stream->sharedDevice )\n    {\n        enableBits = PCM_ENABLE_INPUT | PCM_ENABLE_OUTPUT;\n        ENSURE_( ioctl( stream->capture->fd, SNDCTL_DSP_SETTRIGGER, &enableBits ), paUnanticipatedHostError );\n    }\n    else\n    {\n        if( stream->capture )\n        {\n            enableBits = PCM_ENABLE_INPUT;\n            ENSURE_( ioctl( stream->capture->fd, SNDCTL_DSP_SETTRIGGER, &enableBits ), paUnanticipatedHostError );\n        }\n        if( stream->playback )\n        {\n            enableBits = PCM_ENABLE_OUTPUT;\n            ENSURE_( ioctl( stream->playback->fd, SNDCTL_DSP_SETTRIGGER, &enableBits ), paUnanticipatedHostError );\n        }\n    }\n\n    /* Ok, we have triggered the stream */\n    stream->triggered = 1;\n\nerror:\n    return result;\n}\n\n/** Stop audio processing\n *\n */\nstatic PaError PaOssStream_Stop( PaOssStream *stream, int abort )\n{\n    PaError result = paNoError;\n\n    /* Looks like the only safe way to stop audio without reopening the device is SNDCTL_DSP_POST.\n     * Also disable capture/playback till the stream is started again.\n     */\n    int captureErr = 0, playbackErr = 0;\n    if( stream->capture )\n    {\n        if( (captureErr = ioctl( stream->capture->fd, SNDCTL_DSP_POST, 0 )) < 0 )\n        {\n            PA_DEBUG(( \"%s: Failed to stop capture device, error: %d\\n\", __FUNCTION__, captureErr ));\n        }\n    }\n    if( stream->playback && !stream->sharedDevice )\n    {\n        if( (playbackErr = ioctl( stream->playback->fd, SNDCTL_DSP_POST, 0 )) < 0 )\n        {\n            PA_DEBUG(( \"%s: Failed to stop playback device, error: %d\\n\", __FUNCTION__, playbackErr ));\n        }\n    }\n\n    if( captureErr || playbackErr )\n    {\n        result = paUnanticipatedHostError;\n    }\n\n    return result;\n}\n\n/** Clean up after thread exit.\n *\n * Aspect StreamState: If the user has registered a streamFinishedCallback it will be called here\n */\nstatic void OnExit( void *data )\n{\n    PaOssStream *stream = (PaOssStream *) data;\n    assert( data );\n\n    PaUtil_ResetCpuLoadMeasurer( &stream->cpuLoadMeasurer );\n\n    PaOssStream_Stop( stream, stream->callbackAbort );\n\n    PA_DEBUG(( \"OnExit: Stoppage\\n\" ));\n\n    /* Eventually notify user all buffers have played */\n    if( stream->streamRepresentation.streamFinishedCallback )\n        stream->streamRepresentation.streamFinishedCallback( stream->streamRepresentation.userData );\n\n    stream->callbackAbort = 0;      /* Clear state */\n    stream->isActive = 0;\n}\n\nstatic PaError SetUpBuffers( PaOssStream *stream, unsigned long framesAvail )\n{\n    PaError result = paNoError;\n\n    if( stream->capture )\n    {\n        PaUtil_SetInterleavedInputChannels( &stream->bufferProcessor, 0, stream->capture->buffer,\n                stream->capture->hostChannelCount );\n        PaUtil_SetInputFrameCount( &stream->bufferProcessor, framesAvail );\n    }\n    if( stream->playback )\n    {\n        PaUtil_SetInterleavedOutputChannels( &stream->bufferProcessor, 0, stream->playback->buffer,\n                stream->playback->hostChannelCount );\n        PaUtil_SetOutputFrameCount( &stream->bufferProcessor, framesAvail );\n    }\n\n    return result;\n}\n\n/** Thread procedure for callback processing.\n *\n * Aspect StreamState: StartStream will wait on this to initiate audio processing, useful in case the\n * callback should be used for buffer priming. When the stream is cancelled a separate function will\n * take care of the transition to the Callback Finished state (the stream isn't considered Stopped\n * before StopStream() or AbortStream() are called).\n */\nstatic void *PaOSS_AudioThreadProc( void *userData )\n{\n    PaError result = paNoError;\n    PaOssStream *stream = (PaOssStream*)userData;\n    unsigned long framesAvail = 0, framesProcessed = 0;\n    int callbackResult = paContinue;\n    int triggered = stream->triggered;  /* See if SNDCTL_DSP_TRIGGER has been issued already */\n    int initiateProcessing = triggered;    /* Already triggered? */\n    PaStreamCallbackFlags cbFlags = 0;  /* We might want to keep state across iterations */\n    PaStreamCallbackTimeInfo timeInfo = {0,0,0}; /* TODO: IMPLEMENT ME */\n\n    /*\n#if ( SOUND_VERSION > 0x030904 )\n        audio_errinfo errinfo;\n#endif\n*/\n\n    assert( stream );\n\n    pthread_cleanup_push( &OnExit, stream );    /* Execute OnExit when exiting */\n\n    /* The first time the stream is started we use SNDCTL_DSP_TRIGGER to accurately start capture and\n     * playback in sync, when the stream is restarted after being stopped we simply start by reading/\n     * writing.\n     */\n    PA_ENSURE( PaOssStream_Prepare( stream ) );\n\n    /* If we are to initiate processing implicitly by reading/writing data, we start off in blocking mode */\n    if( initiateProcessing )\n    {\n        /* Make sure devices are in blocking mode */\n        if( stream->capture )\n            ModifyBlocking( stream->capture->fd, 1 );\n        if( stream->playback )\n            ModifyBlocking( stream->playback->fd, 1 );\n    }\n\n    while( 1 )\n    {\n#ifdef PTHREAD_CANCELED\n        pthread_testcancel();\n#else\n        if( stream->callbackAbort ) /* avoid indefinite waiting on thread not supporting cancellation */\n        {\n            PA_DEBUG(( \"Aborting callback thread\\n\" ));\n            break;\n        }\n#endif\n        if( stream->callbackStop && callbackResult == paContinue )\n        {\n            PA_DEBUG(( \"Setting callbackResult to paComplete\\n\" ));\n            callbackResult = paComplete;\n        }\n\n        /* Aspect StreamState: Because of the messy OSS scheme we can't explicitly trigger device start unless\n         * the stream has been recently started, we will have to go right ahead and read/write in blocking\n         * fashion to trigger operation. Therefore we begin with processing one host buffer before we switch\n         * to non-blocking mode.\n         */\n        if( !initiateProcessing )\n        {\n            /* Wait on available frames */\n            PA_ENSURE( PaOssStream_WaitForFrames( stream, &framesAvail ) );\n            assert( framesAvail % stream->framesPerHostBuffer == 0 );\n        }\n        else\n        {\n            framesAvail = stream->framesPerHostBuffer;\n        }\n\n        while( framesAvail > 0 )\n        {\n            unsigned long frames = framesAvail;\n\n#ifdef PTHREAD_CANCELED\n            pthread_testcancel();\n#else\n            if( stream->callbackStop )\n            {\n                PA_DEBUG(( \"Setting callbackResult to paComplete\\n\" ));\n                callbackResult = paComplete;\n            }\n\n            if( stream->callbackAbort ) /* avoid indefinite waiting on thread not supporting cancellation */\n            {\n                PA_DEBUG(( \"Aborting callback thread\\n\" ));\n                break;\n            }\n#endif\n            PaUtil_BeginCpuLoadMeasurement( &stream->cpuLoadMeasurer );\n\n            /* Read data */\n            if ( stream->capture )\n            {\n                PA_ENSURE( PaOssStreamComponent_Read( stream->capture, &frames ) );\n                if( frames < framesAvail )\n                {\n                    PA_DEBUG(( \"Read %lu less frames than requested\\n\", framesAvail - frames ));\n                    framesAvail = frames;\n                }\n            }\n\n#if ( SOUND_VERSION >= 0x030904 )\n            /*\n               Check with OSS to see if there have been any under/overruns\n               since last time we checked.\n               */\n            /*\n            if( ioctl( stream->deviceHandle, SNDCTL_DSP_GETERROR, &errinfo ) >= 0 )\n            {\n                if( errinfo.play_underruns )\n                    cbFlags |= paOutputUnderflow ;\n                if( errinfo.record_underruns )\n                    cbFlags |= paInputUnderflow ;\n            }\n            else\n                PA_DEBUG(( \"SNDCTL_DSP_GETERROR command failed: %s\\n\", strerror( errno ) ));\n                */\n#endif\n\n            PaUtil_BeginBufferProcessing( &stream->bufferProcessor, &timeInfo,\n                    cbFlags );\n            cbFlags = 0;\n            PA_ENSURE( SetUpBuffers( stream, framesAvail ) );\n\n            framesProcessed = PaUtil_EndBufferProcessing( &stream->bufferProcessor,\n                    &callbackResult );\n            assert( framesProcessed == framesAvail );\n            PaUtil_EndCpuLoadMeasurement( &stream->cpuLoadMeasurer, framesProcessed );\n\n            if ( stream->playback )\n            {\n                frames = framesAvail;\n\n                PA_ENSURE( PaOssStreamComponent_Write( stream->playback, &frames ) );\n                if( frames < framesAvail )\n                {\n                    /* TODO: handle bytesWritten != bytesRequested (slippage?) */\n                    PA_DEBUG(( \"Wrote %lu less frames than requested\\n\", framesAvail - frames ));\n                }\n            }\n\n            framesAvail -= framesProcessed;\n            stream->framesProcessed += framesProcessed;\n\n            if( callbackResult != paContinue )\n                break;\n        }\n\n        if( initiateProcessing || !triggered )\n        {\n            /* Non-blocking */\n            if( stream->capture )\n                PA_ENSURE( ModifyBlocking( stream->capture->fd, 0 ) );\n            if( stream->playback && !stream->sharedDevice )\n                PA_ENSURE( ModifyBlocking( stream->playback->fd, 0 ) );\n\n            initiateProcessing = 0;\n            sem_post( &stream->semaphore );\n        }\n\n        if( callbackResult != paContinue )\n        {\n            stream->callbackAbort = callbackResult == paAbort;\n            if( stream->callbackAbort || PaUtil_IsBufferProcessorOutputEmpty( &stream->bufferProcessor ) )\n                break;\n        }\n    }\n\n    pthread_cleanup_pop( 1 );\n\nerror:\n    pthread_exit( NULL );\n}\n\n/** Close the stream.\n *\n */\nstatic PaError CloseStream( PaStream* s )\n{\n    PaError result = paNoError;\n    PaOssStream *stream = (PaOssStream*)s;\n\n    assert( stream );\n\n    PaUtil_TerminateBufferProcessor( &stream->bufferProcessor );\n    PaOssStream_Terminate( stream );\n\n    return result;\n}\n\n/** Start the stream.\n *\n * Aspect StreamState: After returning, the stream shall be in the Active state, implying that an eventual\n * callback will be repeatedly called in a separate thread. If a separate thread is started this function\n * will block until it has started processing audio, otherwise audio processing is started directly.\n */\nstatic PaError StartStream( PaStream *s )\n{\n    PaError result = paNoError;\n    PaOssStream *stream = (PaOssStream*)s;\n\n    stream->isActive = 1;\n    stream->isStopped = 0;\n    stream->lastPosPtr = 0;\n    stream->lastStreamBytes = 0;\n    stream->framesProcessed = 0;\n\n    /* only use the thread for callback streams */\n    if( stream->bufferProcessor.streamCallback )\n    {\n        PA_ENSURE( PaUtil_StartThreading( &stream->threading, &PaOSS_AudioThreadProc, stream ) );\n        sem_wait( &stream->semaphore );\n    }\n    else\n        PA_ENSURE( PaOssStream_Prepare( stream ) );\n\nerror:\n    return result;\n}\n\nstatic PaError RealStop( PaOssStream *stream, int abort )\n{\n    PaError result = paNoError;\n\n    if( stream->callbackMode )\n    {\n        if( abort )\n            stream->callbackAbort = 1;\n        else\n            stream->callbackStop = 1;\n\n        PA_ENSURE( PaUtil_CancelThreading( &stream->threading, !abort, NULL ) );\n\n        stream->callbackStop = stream->callbackAbort = 0;\n    }\n    else\n        PA_ENSURE( PaOssStream_Stop( stream, abort ) );\n\n    stream->isStopped = 1;\n\nerror:\n    return result;\n}\n\n/** Stop the stream.\n *\n * Aspect StreamState: This will cause the stream to transition to the Stopped state, playing all enqueued\n * buffers.\n */\nstatic PaError StopStream( PaStream *s )\n{\n    return RealStop( (PaOssStream *)s, 0 );\n}\n\n/** Abort the stream.\n *\n * Aspect StreamState: This will cause the stream to transition to the Stopped state, discarding all enqueued\n * buffers. Note that the buffers are not currently correctly discarded, this is difficult without closing\n * the OSS device.\n */\nstatic PaError AbortStream( PaStream *s )\n{\n    return RealStop( (PaOssStream *)s, 1 );\n}\n\n/** Is the stream in the Stopped state.\n *\n */\nstatic PaError IsStreamStopped( PaStream *s )\n{\n    PaOssStream *stream = (PaOssStream*)s;\n\n    return (stream->isStopped);\n}\n\n/** Is the stream in the Active state.\n *\n */\nstatic PaError IsStreamActive( PaStream *s )\n{\n    PaOssStream *stream = (PaOssStream*)s;\n\n    return (stream->isActive);\n}\n\nstatic PaTime GetStreamTime( PaStream *s )\n{\n    PaOssStream *stream = (PaOssStream*)s;\n    count_info info;\n    int delta;\n\n    if( stream->playback ) {\n        if( ioctl( stream->playback->fd, SNDCTL_DSP_GETOPTR, &info) == 0 ) {\n            delta = ( info.bytes - stream->lastPosPtr ) /* & 0x000FFFFF*/;\n            return (float)(stream->lastStreamBytes + delta) / PaOssStreamComponent_FrameSize( stream->playback ) / stream->sampleRate;\n        }\n    }\n    else {\n        if (ioctl( stream->capture->fd, SNDCTL_DSP_GETIPTR, &info) == 0) {\n            delta = (info.bytes - stream->lastPosPtr) /*& 0x000FFFFF*/;\n            return (float)(stream->lastStreamBytes + delta) / PaOssStreamComponent_FrameSize( stream->capture ) / stream->sampleRate;\n        }\n    }\n\n    /* the ioctl failed, but we can still give a coarse estimate */\n\n    return stream->framesProcessed / stream->sampleRate;\n}\n\n\nstatic double GetStreamCpuLoad( PaStream* s )\n{\n    PaOssStream *stream = (PaOssStream*)s;\n\n    return PaUtil_GetCpuLoad( &stream->cpuLoadMeasurer );\n}\n\n\n/*\n    As separate stream interfaces are used for blocking and callback\n    streams, the following functions can be guaranteed to only be called\n    for blocking streams.\n*/\n\n\nstatic PaError ReadStream( PaStream* s,\n                           void *buffer,\n                           unsigned long frames )\n{\n    PaError result = paNoError;\n    PaOssStream *stream = (PaOssStream*)s;\n    int bytesRequested, bytesRead;\n    unsigned long framesRequested;\n    void *userBuffer;\n\n    /* If user input is non-interleaved, PaUtil_CopyInput will manipulate the channel pointers,\n     * so we copy the user provided pointers */\n    if( stream->bufferProcessor.userInputIsInterleaved )\n        userBuffer = buffer;\n    else /* Copy channels into local array */\n    {\n        userBuffer = stream->capture->userBuffers;\n        memcpy( (void *)userBuffer, buffer, sizeof (void *) * stream->capture->userChannelCount );\n    }\n\n    while( frames )\n    {\n        framesRequested = PA_MIN( frames, stream->capture->hostFrames );\n\n        bytesRequested = framesRequested * PaOssStreamComponent_FrameSize( stream->capture );\n        ENSURE_( (bytesRead = read( stream->capture->fd, stream->capture->buffer, bytesRequested )),\n                    paUnanticipatedHostError );\n        if ( bytesRequested != bytesRead )\n        {\n            PA_DEBUG(( \"Requested %d bytes, read %d\\n\", bytesRequested, bytesRead ));\n            return paUnanticipatedHostError;\n        }\n\n        PaUtil_SetInputFrameCount( &stream->bufferProcessor, stream->capture->hostFrames );\n        PaUtil_SetInterleavedInputChannels( &stream->bufferProcessor, 0, stream->capture->buffer, stream->capture->hostChannelCount );\n        PaUtil_CopyInput( &stream->bufferProcessor, &userBuffer, framesRequested );\n        frames -= framesRequested;\n    }\n\nerror:\n    return result;\n}\n\n\nstatic PaError WriteStream( PaStream *s, const void *buffer, unsigned long frames )\n{\n    PaError result = paNoError;\n    PaOssStream *stream = (PaOssStream*)s;\n    int bytesRequested, bytesWritten;\n    unsigned long framesConverted;\n    const void *userBuffer;\n\n    /* If user output is non-interleaved, PaUtil_CopyOutput will manipulate the channel pointers,\n     * so we copy the user provided pointers */\n    if( stream->bufferProcessor.userOutputIsInterleaved )\n        userBuffer = buffer;\n    else\n    {\n        /* Copy channels into local array */\n        userBuffer = stream->playback->userBuffers;\n        memcpy( (void *)userBuffer, buffer, sizeof (void *) * stream->playback->userChannelCount );\n    }\n\n    while( frames )\n    {\n        PaUtil_SetOutputFrameCount( &stream->bufferProcessor, stream->playback->hostFrames );\n        PaUtil_SetInterleavedOutputChannels( &stream->bufferProcessor, 0, stream->playback->buffer, stream->playback->hostChannelCount );\n\n        framesConverted = PaUtil_CopyOutput( &stream->bufferProcessor, &userBuffer, frames );\n        frames -= framesConverted;\n\n        bytesRequested = framesConverted * PaOssStreamComponent_FrameSize( stream->playback );\n        ENSURE_( (bytesWritten = write( stream->playback->fd, stream->playback->buffer, bytesRequested )),\n                    paUnanticipatedHostError );\n\n        if ( bytesRequested != bytesWritten )\n        {\n            PA_DEBUG(( \"Requested %d bytes, wrote %d\\n\", bytesRequested, bytesWritten ));\n            return paUnanticipatedHostError;\n        }\n    }\n\nerror:\n    return result;\n}\n\n\nstatic signed long GetStreamReadAvailable( PaStream* s )\n{\n    PaError result = paNoError;\n    PaOssStream *stream = (PaOssStream*)s;\n    audio_buf_info info;\n\n    ENSURE_( ioctl( stream->capture->fd, SNDCTL_DSP_GETISPACE, &info ), paUnanticipatedHostError );\n    return info.fragments * stream->capture->hostFrames;\n\nerror:\n    return result;\n}\n\n\n/* TODO: Compute number of allocated bytes somewhere else, can we use ODELAY with capture */\nstatic signed long GetStreamWriteAvailable( PaStream* s )\n{\n    PaError result = paNoError;\n    PaOssStream *stream = (PaOssStream*)s;\n    int delay = 0;\n#ifdef SNDCTL_DSP_GETODELAY\n    ENSURE_( ioctl( stream->playback->fd, SNDCTL_DSP_GETODELAY, &delay ), paUnanticipatedHostError );\n#endif\n    return (PaOssStreamComponent_BufferSize( stream->playback ) - delay) / PaOssStreamComponent_FrameSize( stream->playback );\n\n/* Conditionally compile this to avoid warning about unused label */\n#ifdef SNDCTL_DSP_GETODELAY\nerror:\n    return result;\n#endif\n}\n"
  },
  {
    "path": "thirdparty/portaudio/src/hostapi/oss/recplay.c",
    "content": "/*\n * recplay.c\n * Phil Burk\n * Minimal record and playback test.\n *\n */\n#include <stdio.h>\n#include <unistd.h>\n#include <stdlib.h>\n#ifndef __STDC__\n/* #include <getopt.h> */\n#endif /* __STDC__ */\n#include <fcntl.h>\n#ifdef __STDC__\n#include <string.h>\n#else /* __STDC__ */\n#include <strings.h>\n#endif /* __STDC__ */\n#include <sys/soundcard.h>\n\n#define NUM_BYTES   (64*1024)\n#define BLOCK_SIZE   (4*1024)\n\n#define AUDIO \"/dev/dsp\"\n\nchar buffer[NUM_BYTES];\n\nint audioDev = 0;\n\nmain (int argc, char *argv[])\n{\n    int   numLeft;\n    char *ptr;\n    int   num;\n    int   samplesize;\n\n    /********** RECORD ********************/\n    /* Open audio device. */\n    audioDev = open (AUDIO, O_RDONLY, 0);\n    if (audioDev == -1)\n    {\n        perror (AUDIO);\n        exit (-1);\n    }\n\n    /* Set to 16 bit samples. */\n    samplesize = 16;\n    ioctl(audioDev, SNDCTL_DSP_SAMPLESIZE, &samplesize);\n    if (samplesize != 16)\n    {\n        perror(\"Unable to set the sample size.\");\n        exit(-1);\n    }\n\n    /* Record in blocks */\n    printf(\"Begin recording.\\n\");\n    numLeft = NUM_BYTES;\n    ptr = buffer;\n    while( numLeft >= BLOCK_SIZE )\n    {\n        if ( (num = read (audioDev, ptr, BLOCK_SIZE)) < 0 )\n        {\n            perror (AUDIO);\n            exit (-1);\n        }\n        else\n        {\n            printf(\"Read %d bytes\\n\", num);\n            ptr += num;\n            numLeft -= num;\n        }\n    }\n\n    close( audioDev );\n\n    /********** PLAYBACK ********************/\n    /* Open audio device for writing. */\n    audioDev = open (AUDIO, O_WRONLY, 0);\n    if (audioDev == -1)\n    {\n        perror (AUDIO);\n        exit (-1);\n    }\n\n    /* Set to 16 bit samples. */\n    samplesize = 16;\n    ioctl(audioDev, SNDCTL_DSP_SAMPLESIZE, &samplesize);\n    if (samplesize != 16)\n    {\n        perror(\"Unable to set the sample size.\");\n        exit(-1);\n    }\n\n    /* Play in blocks */\n    printf(\"Begin playing.\\n\");\n    numLeft = NUM_BYTES;\n    ptr = buffer;\n    while( numLeft >= BLOCK_SIZE )\n    {\n        if ( (num = write (audioDev, ptr, BLOCK_SIZE)) < 0 )\n        {\n            perror (AUDIO);\n            exit (-1);\n        }\n        else\n        {\n            printf(\"Wrote %d bytes\\n\", num);\n            ptr += num;\n            numLeft -= num;\n        }\n    }\n\n    close( audioDev );\n}\n"
  },
  {
    "path": "thirdparty/portaudio/src/hostapi/skeleton/README.txt",
    "content": "pa_hostapi_skeleton.c provides a starting point for implementing support for a new host API with PortAudio. The idea is that you copy it to a new directory inside /hostapi and start editing."
  },
  {
    "path": "thirdparty/portaudio/src/hostapi/skeleton/pa_hostapi_skeleton.c",
    "content": "/*\n * $Id$\n * Portable Audio I/O Library skeleton implementation\n * demonstrates how to use the common functions to implement support\n * for a host API\n *\n * Based on the Open Source API proposed by Ross Bencina\n * Copyright (c) 1999-2002 Ross Bencina, Phil Burk\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n/** @file\n @ingroup common_src\n\n @brief Skeleton implementation of support for a host API.\n\n This file is provided as a starting point for implementing support for\n a new host API. It provides examples of how the common code can be used.\n\n @note IMPLEMENT ME comments are used to indicate functionality\n which much be customised for each implementation.\n*/\n\n\n#include <string.h> /* strlen() */\n\n#include \"pa_util.h\"\n#include \"pa_allocation.h\"\n#include \"pa_hostapi.h\"\n#include \"pa_stream.h\"\n#include \"pa_cpuload.h\"\n#include \"pa_process.h\"\n\n\n/* prototypes for functions declared in this file */\n\n#ifdef __cplusplus\nextern \"C\"\n{\n#endif /* __cplusplus */\n\nPaError PaSkeleton_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index );\n\n#ifdef __cplusplus\n}\n#endif /* __cplusplus */\n\n\nstatic void Terminate( struct PaUtilHostApiRepresentation *hostApi );\nstatic PaError IsFormatSupported( struct PaUtilHostApiRepresentation *hostApi,\n                                  const PaStreamParameters *inputParameters,\n                                  const PaStreamParameters *outputParameters,\n                                  double sampleRate );\nstatic PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,\n                           PaStream** s,\n                           const PaStreamParameters *inputParameters,\n                           const PaStreamParameters *outputParameters,\n                           double sampleRate,\n                           unsigned long framesPerBuffer,\n                           PaStreamFlags streamFlags,\n                           PaStreamCallback *streamCallback,\n                           void *userData );\nstatic PaError CloseStream( PaStream* stream );\nstatic PaError StartStream( PaStream *stream );\nstatic PaError StopStream( PaStream *stream );\nstatic PaError AbortStream( PaStream *stream );\nstatic PaError IsStreamStopped( PaStream *s );\nstatic PaError IsStreamActive( PaStream *stream );\nstatic PaTime GetStreamTime( PaStream *stream );\nstatic double GetStreamCpuLoad( PaStream* stream );\nstatic PaError ReadStream( PaStream* stream, void *buffer, unsigned long frames );\nstatic PaError WriteStream( PaStream* stream, const void *buffer, unsigned long frames );\nstatic signed long GetStreamReadAvailable( PaStream* stream );\nstatic signed long GetStreamWriteAvailable( PaStream* stream );\n\n\n/* IMPLEMENT ME: a macro like the following one should be used for reporting\n host errors */\n#define PA_SKELETON_SET_LAST_HOST_ERROR( errorCode, errorText ) \\\n    PaUtil_SetLastHostErrorInfo( paInDevelopment, errorCode, errorText )\n\n/* PaSkeletonHostApiRepresentation - host api datastructure specific to this implementation */\n\ntypedef struct\n{\n    PaUtilHostApiRepresentation inheritedHostApiRep;\n    PaUtilStreamInterface callbackStreamInterface;\n    PaUtilStreamInterface blockingStreamInterface;\n\n    PaUtilAllocationGroup *allocations;\n\n    /* implementation specific data goes here */\n}\nPaSkeletonHostApiRepresentation;  /* IMPLEMENT ME: rename this */\n\n\nPaError PaSkeleton_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex hostApiIndex )\n{\n    PaError result = paNoError;\n    int i, deviceCount;\n    PaSkeletonHostApiRepresentation *skeletonHostApi;\n    PaDeviceInfo *deviceInfoArray;\n\n    skeletonHostApi = (PaSkeletonHostApiRepresentation*)PaUtil_AllocateMemory( sizeof(PaSkeletonHostApiRepresentation) );\n    if( !skeletonHostApi )\n    {\n        result = paInsufficientMemory;\n        goto error;\n    }\n\n    skeletonHostApi->allocations = PaUtil_CreateAllocationGroup();\n    if( !skeletonHostApi->allocations )\n    {\n        result = paInsufficientMemory;\n        goto error;\n    }\n\n    *hostApi = &skeletonHostApi->inheritedHostApiRep;\n    (*hostApi)->info.structVersion = 1;\n    (*hostApi)->info.type = paInDevelopment;            /* IMPLEMENT ME: change to correct type id */\n    (*hostApi)->info.name = \"skeleton implementation\";  /* IMPLEMENT ME: change to correct name */\n\n    (*hostApi)->info.defaultInputDevice = paNoDevice;  /* IMPLEMENT ME */\n    (*hostApi)->info.defaultOutputDevice = paNoDevice; /* IMPLEMENT ME */\n\n    (*hostApi)->info.deviceCount = 0;\n\n    deviceCount = 0; /* IMPLEMENT ME */\n\n    if( deviceCount > 0 )\n    {\n        (*hostApi)->deviceInfos = (PaDeviceInfo**)PaUtil_GroupAllocateMemory(\n                skeletonHostApi->allocations, sizeof(PaDeviceInfo*) * deviceCount );\n        if( !(*hostApi)->deviceInfos )\n        {\n            result = paInsufficientMemory;\n            goto error;\n        }\n\n        /* allocate all device info structs in a contiguous block */\n        deviceInfoArray = (PaDeviceInfo*)PaUtil_GroupAllocateMemory(\n                skeletonHostApi->allocations, sizeof(PaDeviceInfo) * deviceCount );\n        if( !deviceInfoArray )\n        {\n            result = paInsufficientMemory;\n            goto error;\n        }\n\n        for( i=0; i < deviceCount; ++i )\n        {\n            PaDeviceInfo *deviceInfo = &deviceInfoArray[i];\n            deviceInfo->structVersion = 2;\n            deviceInfo->hostApi = hostApiIndex;\n            deviceInfo->name = 0; /* IMPLEMENT ME: allocate block and copy name eg:\n                deviceName = (char*)PaUtil_GroupAllocateMemory( skeletonHostApi->allocations, strlen(srcName) + 1 );\n                if( !deviceName )\n                {\n                    result = paInsufficientMemory;\n                    goto error;\n                }\n                strcpy( deviceName, srcName );\n                deviceInfo->name = deviceName;\n            */\n\n            deviceInfo->maxInputChannels = 0;  /* IMPLEMENT ME */\n            deviceInfo->maxOutputChannels = 0;  /* IMPLEMENT ME */\n\n            deviceInfo->defaultLowInputLatency = 0.;  /* IMPLEMENT ME */\n            deviceInfo->defaultLowOutputLatency = 0.;  /* IMPLEMENT ME */\n            deviceInfo->defaultHighInputLatency = 0.;  /* IMPLEMENT ME */\n            deviceInfo->defaultHighOutputLatency = 0.;  /* IMPLEMENT ME */\n\n            deviceInfo->defaultSampleRate = 0.; /* IMPLEMENT ME */\n\n            (*hostApi)->deviceInfos[i] = deviceInfo;\n            ++(*hostApi)->info.deviceCount;\n        }\n    }\n\n    (*hostApi)->Terminate = Terminate;\n    (*hostApi)->OpenStream = OpenStream;\n    (*hostApi)->IsFormatSupported = IsFormatSupported;\n\n    PaUtil_InitializeStreamInterface( &skeletonHostApi->callbackStreamInterface, CloseStream, StartStream,\n                                      StopStream, AbortStream, IsStreamStopped, IsStreamActive,\n                                      GetStreamTime, GetStreamCpuLoad,\n                                      PaUtil_DummyRead, PaUtil_DummyWrite,\n                                      PaUtil_DummyGetReadAvailable, PaUtil_DummyGetWriteAvailable );\n\n    PaUtil_InitializeStreamInterface( &skeletonHostApi->blockingStreamInterface, CloseStream, StartStream,\n                                      StopStream, AbortStream, IsStreamStopped, IsStreamActive,\n                                      GetStreamTime, PaUtil_DummyGetCpuLoad,\n                                      ReadStream, WriteStream, GetStreamReadAvailable, GetStreamWriteAvailable );\n\n    return result;\n\nerror:\n    if( skeletonHostApi )\n    {\n        if( skeletonHostApi->allocations )\n        {\n            PaUtil_FreeAllAllocations( skeletonHostApi->allocations );\n            PaUtil_DestroyAllocationGroup( skeletonHostApi->allocations );\n        }\n\n        PaUtil_FreeMemory( skeletonHostApi );\n    }\n    return result;\n}\n\n\nstatic void Terminate( struct PaUtilHostApiRepresentation *hostApi )\n{\n    PaSkeletonHostApiRepresentation *skeletonHostApi = (PaSkeletonHostApiRepresentation*)hostApi;\n\n    /*\n        IMPLEMENT ME:\n            - clean up any resources not handled by the allocation group\n    */\n\n    if( skeletonHostApi->allocations )\n    {\n        PaUtil_FreeAllAllocations( skeletonHostApi->allocations );\n        PaUtil_DestroyAllocationGroup( skeletonHostApi->allocations );\n    }\n\n    PaUtil_FreeMemory( skeletonHostApi );\n}\n\n\nstatic PaError IsFormatSupported( struct PaUtilHostApiRepresentation *hostApi,\n                                  const PaStreamParameters *inputParameters,\n                                  const PaStreamParameters *outputParameters,\n                                  double sampleRate )\n{\n    int inputChannelCount, outputChannelCount;\n    PaSampleFormat inputSampleFormat, outputSampleFormat;\n\n    if( inputParameters )\n    {\n        inputChannelCount = inputParameters->channelCount;\n        inputSampleFormat = inputParameters->sampleFormat;\n\n        /* all standard sample formats are supported by the buffer adapter,\n            this implementation doesn't support any custom sample formats */\n        if( inputSampleFormat & paCustomFormat )\n            return paSampleFormatNotSupported;\n\n        /* unless alternate device specification is supported, reject the use of\n            paUseHostApiSpecificDeviceSpecification */\n\n        if( inputParameters->device == paUseHostApiSpecificDeviceSpecification )\n            return paInvalidDevice;\n\n        /* check that input device can support inputChannelCount */\n        if( inputChannelCount > hostApi->deviceInfos[ inputParameters->device ]->maxInputChannels )\n            return paInvalidChannelCount;\n\n        /* validate inputStreamInfo */\n        if( inputParameters->hostApiSpecificStreamInfo )\n            return paIncompatibleHostApiSpecificStreamInfo; /* this implementation doesn't use custom stream info */\n    }\n    else\n    {\n        inputChannelCount = 0;\n    }\n\n    if( outputParameters )\n    {\n        outputChannelCount = outputParameters->channelCount;\n        outputSampleFormat = outputParameters->sampleFormat;\n\n        /* all standard sample formats are supported by the buffer adapter,\n            this implementation doesn't support any custom sample formats */\n        if( outputSampleFormat & paCustomFormat )\n            return paSampleFormatNotSupported;\n\n        /* unless alternate device specification is supported, reject the use of\n            paUseHostApiSpecificDeviceSpecification */\n\n        if( outputParameters->device == paUseHostApiSpecificDeviceSpecification )\n            return paInvalidDevice;\n\n        /* check that output device can support outputChannelCount */\n        if( outputChannelCount > hostApi->deviceInfos[ outputParameters->device ]->maxOutputChannels )\n            return paInvalidChannelCount;\n\n        /* validate outputStreamInfo */\n        if( outputParameters->hostApiSpecificStreamInfo )\n            return paIncompatibleHostApiSpecificStreamInfo; /* this implementation doesn't use custom stream info */\n    }\n    else\n    {\n        outputChannelCount = 0;\n    }\n\n    /*\n        IMPLEMENT ME:\n\n            - if a full duplex stream is requested, check that the combination\n                of input and output parameters is supported if necessary\n\n            - check that the device supports sampleRate\n\n        Because the buffer adapter handles conversion between all standard\n        sample formats, the following checks are only required if paCustomFormat\n        is implemented, or under some other unusual conditions.\n\n            - check that input device can support inputSampleFormat, or that\n                we have the capability to convert from inputSampleFormat to\n                a native format\n\n            - check that output device can support outputSampleFormat, or that\n                we have the capability to convert from outputSampleFormat to\n                a native format\n    */\n\n\n    /* suppress unused variable warnings */\n    (void) sampleRate;\n\n    return paFormatIsSupported;\n}\n\n/* PaSkeletonStream - a stream data structure specifically for this implementation */\n\ntypedef struct PaSkeletonStream\n{ /* IMPLEMENT ME: rename this */\n    PaUtilStreamRepresentation streamRepresentation;\n    PaUtilCpuLoadMeasurer cpuLoadMeasurer;\n    PaUtilBufferProcessor bufferProcessor;\n\n    /* IMPLEMENT ME:\n            - implementation specific data goes here\n    */\n    unsigned long framesPerHostCallback; /* just an example */\n}\nPaSkeletonStream;\n\n/* see pa_hostapi.h for a list of validity guarantees made about OpenStream parameters */\n\nstatic PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,\n                           PaStream** s,\n                           const PaStreamParameters *inputParameters,\n                           const PaStreamParameters *outputParameters,\n                           double sampleRate,\n                           unsigned long framesPerBuffer,\n                           PaStreamFlags streamFlags,\n                           PaStreamCallback *streamCallback,\n                           void *userData )\n{\n    PaError result = paNoError;\n    PaSkeletonHostApiRepresentation *skeletonHostApi = (PaSkeletonHostApiRepresentation*)hostApi;\n    PaSkeletonStream *stream = 0;\n    unsigned long framesPerHostBuffer = framesPerBuffer; /* these may not be equivalent for all implementations */\n    int inputChannelCount, outputChannelCount;\n    PaSampleFormat inputSampleFormat, outputSampleFormat;\n    PaSampleFormat hostInputSampleFormat, hostOutputSampleFormat;\n\n\n    if( inputParameters )\n    {\n        inputChannelCount = inputParameters->channelCount;\n        inputSampleFormat = inputParameters->sampleFormat;\n\n        /* unless alternate device specification is supported, reject the use of\n            paUseHostApiSpecificDeviceSpecification */\n\n        if( inputParameters->device == paUseHostApiSpecificDeviceSpecification )\n            return paInvalidDevice;\n\n        /* check that input device can support inputChannelCount */\n        if( inputChannelCount > hostApi->deviceInfos[ inputParameters->device ]->maxInputChannels )\n            return paInvalidChannelCount;\n\n        /* validate inputStreamInfo */\n        if( inputParameters->hostApiSpecificStreamInfo )\n            return paIncompatibleHostApiSpecificStreamInfo; /* this implementation doesn't use custom stream info */\n\n        /* IMPLEMENT ME - establish which  host formats are available */\n        hostInputSampleFormat =\n            PaUtil_SelectClosestAvailableFormat( paInt16 /* native formats */, inputSampleFormat );\n    }\n    else\n    {\n        inputChannelCount = 0;\n        inputSampleFormat = hostInputSampleFormat = paInt16; /* Suppress 'uninitialised var' warnings. */\n    }\n\n    if( outputParameters )\n    {\n        outputChannelCount = outputParameters->channelCount;\n        outputSampleFormat = outputParameters->sampleFormat;\n\n        /* unless alternate device specification is supported, reject the use of\n            paUseHostApiSpecificDeviceSpecification */\n\n        if( outputParameters->device == paUseHostApiSpecificDeviceSpecification )\n            return paInvalidDevice;\n\n        /* check that output device can support inputChannelCount */\n        if( outputChannelCount > hostApi->deviceInfos[ outputParameters->device ]->maxOutputChannels )\n            return paInvalidChannelCount;\n\n        /* validate outputStreamInfo */\n        if( outputParameters->hostApiSpecificStreamInfo )\n            return paIncompatibleHostApiSpecificStreamInfo; /* this implementation doesn't use custom stream info */\n\n        /* IMPLEMENT ME - establish which  host formats are available */\n        hostOutputSampleFormat =\n            PaUtil_SelectClosestAvailableFormat( paInt16 /* native formats */, outputSampleFormat );\n    }\n    else\n    {\n        outputChannelCount = 0;\n        outputSampleFormat = hostOutputSampleFormat = paInt16; /* Suppress 'uninitialized var' warnings. */\n    }\n\n    /*\n        IMPLEMENT ME:\n\n        ( the following two checks are taken care of by PaUtil_InitializeBufferProcessor() FIXME - checks needed? )\n\n            - check that input device can support inputSampleFormat, or that\n                we have the capability to convert from outputSampleFormat to\n                a native format\n\n            - check that output device can support outputSampleFormat, or that\n                we have the capability to convert from outputSampleFormat to\n                a native format\n\n            - if a full duplex stream is requested, check that the combination\n                of input and output parameters is supported\n\n            - check that the device supports sampleRate\n\n            - alter sampleRate to a close allowable rate if possible / necessary\n\n            - validate suggestedInputLatency and suggestedOutputLatency parameters,\n                use default values where necessary\n    */\n\n\n\n\n    /* validate platform specific flags */\n    if( (streamFlags & paPlatformSpecificFlags) != 0 )\n        return paInvalidFlag; /* unexpected platform specific flag */\n\n\n    stream = (PaSkeletonStream*)PaUtil_AllocateMemory( sizeof(PaSkeletonStream) );\n    if( !stream )\n    {\n        result = paInsufficientMemory;\n        goto error;\n    }\n\n    if( streamCallback )\n    {\n        PaUtil_InitializeStreamRepresentation( &stream->streamRepresentation,\n                                               &skeletonHostApi->callbackStreamInterface, streamCallback, userData );\n    }\n    else\n    {\n        PaUtil_InitializeStreamRepresentation( &stream->streamRepresentation,\n                                               &skeletonHostApi->blockingStreamInterface, streamCallback, userData );\n    }\n\n    PaUtil_InitializeCpuLoadMeasurer( &stream->cpuLoadMeasurer, sampleRate );\n\n\n    /* we assume a fixed host buffer size in this example, but the buffer processor\n        can also support bounded and unknown host buffer sizes by passing\n        paUtilBoundedHostBufferSize or paUtilUnknownHostBufferSize instead of\n        paUtilFixedHostBufferSize below. */\n\n    result =  PaUtil_InitializeBufferProcessor( &stream->bufferProcessor,\n              inputChannelCount, inputSampleFormat, hostInputSampleFormat,\n              outputChannelCount, outputSampleFormat, hostOutputSampleFormat,\n              sampleRate, streamFlags, framesPerBuffer,\n              framesPerHostBuffer, paUtilFixedHostBufferSize,\n              streamCallback, userData );\n    if( result != paNoError )\n        goto error;\n\n\n    /*\n        IMPLEMENT ME: initialise the following fields with estimated or actual\n        values.\n    */\n    stream->streamRepresentation.streamInfo.inputLatency =\n            (PaTime)PaUtil_GetBufferProcessorInputLatencyFrames(&stream->bufferProcessor) / sampleRate; /* inputLatency is specified in _seconds_ */\n    stream->streamRepresentation.streamInfo.outputLatency =\n            (PaTime)PaUtil_GetBufferProcessorOutputLatencyFrames(&stream->bufferProcessor) / sampleRate; /* outputLatency is specified in _seconds_ */\n    stream->streamRepresentation.streamInfo.sampleRate = sampleRate;\n\n\n    /*\n        IMPLEMENT ME:\n            - additional stream setup + opening\n    */\n\n    stream->framesPerHostCallback = framesPerHostBuffer;\n\n    *s = (PaStream*)stream;\n\n    return result;\n\nerror:\n    if( stream )\n        PaUtil_FreeMemory( stream );\n\n    return result;\n}\n\n/*\n    ExampleHostProcessingLoop() illustrates the kind of processing which may\n    occur in a host implementation.\n\n*/\nstatic void ExampleHostProcessingLoop( void *inputBuffer, void *outputBuffer, void *userData )\n{\n    PaSkeletonStream *stream = (PaSkeletonStream*)userData;\n    PaStreamCallbackTimeInfo timeInfo = {0,0,0}; /* IMPLEMENT ME */\n    int callbackResult;\n    unsigned long framesProcessed;\n\n    PaUtil_BeginCpuLoadMeasurement( &stream->cpuLoadMeasurer );\n\n    /*\n        IMPLEMENT ME:\n            - generate timing information\n            - handle buffer slips\n    */\n\n    /*\n        If you need to byte swap or shift inputBuffer to convert it into a\n        portaudio format, do it here.\n    */\n\n\n\n    PaUtil_BeginBufferProcessing( &stream->bufferProcessor, &timeInfo, 0 /* IMPLEMENT ME: pass underflow/overflow flags when necessary */ );\n\n    /*\n        depending on whether the host buffers are interleaved, non-interleaved\n        or a mixture, you will want to call PaUtil_SetInterleaved*Channels(),\n        PaUtil_SetNonInterleaved*Channel() or PaUtil_Set*Channel() here.\n    */\n\n    PaUtil_SetInputFrameCount( &stream->bufferProcessor, 0 /* default to host buffer size */ );\n    PaUtil_SetInterleavedInputChannels( &stream->bufferProcessor,\n            0, /* first channel of inputBuffer is channel 0 */\n            inputBuffer,\n            0 ); /* 0 - use inputChannelCount passed to init buffer processor */\n\n    PaUtil_SetOutputFrameCount( &stream->bufferProcessor, 0 /* default to host buffer size */ );\n    PaUtil_SetInterleavedOutputChannels( &stream->bufferProcessor,\n            0, /* first channel of outputBuffer is channel 0 */\n            outputBuffer,\n            0 ); /* 0 - use outputChannelCount passed to init buffer processor */\n\n    /* you must pass a valid value of callback result to PaUtil_EndBufferProcessing()\n        in general you would pass paContinue for normal operation, and\n        paComplete to drain the buffer processor's internal output buffer.\n        You can check whether the buffer processor's output buffer is empty\n        using PaUtil_IsBufferProcessorOuputEmpty( bufferProcessor )\n    */\n    callbackResult = paContinue;\n    framesProcessed = PaUtil_EndBufferProcessing( &stream->bufferProcessor, &callbackResult );\n\n\n    /*\n        If you need to byte swap or shift outputBuffer to convert it to\n        host format, do it here.\n    */\n\n    PaUtil_EndCpuLoadMeasurement( &stream->cpuLoadMeasurer, framesProcessed );\n\n\n    if( callbackResult == paContinue )\n    {\n        /* nothing special to do */\n    }\n    else if( callbackResult == paAbort )\n    {\n        /* IMPLEMENT ME - finish playback immediately  */\n\n        /* once finished, call the finished callback */\n        if( stream->streamRepresentation.streamFinishedCallback != 0 )\n            stream->streamRepresentation.streamFinishedCallback( stream->streamRepresentation.userData );\n    }\n    else\n    {\n        /* User callback has asked us to stop with paComplete or other non-zero value */\n\n        /* IMPLEMENT ME - finish playback once currently queued audio has completed  */\n\n        /* once finished, call the finished callback */\n        if( stream->streamRepresentation.streamFinishedCallback != 0 )\n            stream->streamRepresentation.streamFinishedCallback( stream->streamRepresentation.userData );\n    }\n}\n\n\n/*\n    When CloseStream() is called, the multi-api layer ensures that\n    the stream has already been stopped or aborted.\n*/\nstatic PaError CloseStream( PaStream* s )\n{\n    PaError result = paNoError;\n    PaSkeletonStream *stream = (PaSkeletonStream*)s;\n\n    /*\n        IMPLEMENT ME:\n            - additional stream closing + cleanup\n    */\n\n    PaUtil_TerminateBufferProcessor( &stream->bufferProcessor );\n    PaUtil_TerminateStreamRepresentation( &stream->streamRepresentation );\n    PaUtil_FreeMemory( stream );\n\n    return result;\n}\n\n\nstatic PaError StartStream( PaStream *s )\n{\n    PaError result = paNoError;\n    PaSkeletonStream *stream = (PaSkeletonStream*)s;\n\n    PaUtil_ResetBufferProcessor( &stream->bufferProcessor );\n\n    /* IMPLEMENT ME, see portaudio.h for required behavior */\n\n    /* suppress unused function warning. the code in ExampleHostProcessingLoop or\n       something similar should be implemented to feed samples to and from the\n       host after StartStream() is called.\n    */\n    (void) ExampleHostProcessingLoop;\n\n    return result;\n}\n\n\nstatic PaError StopStream( PaStream *s )\n{\n    PaError result = paNoError;\n    PaSkeletonStream *stream = (PaSkeletonStream*)s;\n\n    /* suppress unused variable warnings */\n    (void) stream;\n\n    /* IMPLEMENT ME, see portaudio.h for required behavior */\n\n    return result;\n}\n\n\nstatic PaError AbortStream( PaStream *s )\n{\n    PaError result = paNoError;\n    PaSkeletonStream *stream = (PaSkeletonStream*)s;\n\n    /* suppress unused variable warnings */\n    (void) stream;\n\n    /* IMPLEMENT ME, see portaudio.h for required behavior */\n\n    return result;\n}\n\n\nstatic PaError IsStreamStopped( PaStream *s )\n{\n    PaSkeletonStream *stream = (PaSkeletonStream*)s;\n\n    /* suppress unused variable warnings */\n    (void) stream;\n\n    /* IMPLEMENT ME, see portaudio.h for required behavior */\n\n    return 0;\n}\n\n\nstatic PaError IsStreamActive( PaStream *s )\n{\n    PaSkeletonStream *stream = (PaSkeletonStream*)s;\n\n    /* suppress unused variable warnings */\n    (void) stream;\n\n    /* IMPLEMENT ME, see portaudio.h for required behavior */\n\n    return 0;\n}\n\n\nstatic PaTime GetStreamTime( PaStream *s )\n{\n    PaSkeletonStream *stream = (PaSkeletonStream*)s;\n\n    /* suppress unused variable warnings */\n    (void) stream;\n\n    /* IMPLEMENT ME, see portaudio.h for required behavior*/\n\n    return 0;\n}\n\n\nstatic double GetStreamCpuLoad( PaStream* s )\n{\n    PaSkeletonStream *stream = (PaSkeletonStream*)s;\n\n    return PaUtil_GetCpuLoad( &stream->cpuLoadMeasurer );\n}\n\n\n/*\n    As separate stream interfaces are used for blocking and callback\n    streams, the following functions can be guaranteed to only be called\n    for blocking streams.\n*/\n\nstatic PaError ReadStream( PaStream* s,\n                           void *buffer,\n                           unsigned long frames )\n{\n    PaSkeletonStream *stream = (PaSkeletonStream*)s;\n\n    /* suppress unused variable warnings */\n    (void) buffer;\n    (void) frames;\n    (void) stream;\n\n    /* IMPLEMENT ME, see portaudio.h for required behavior*/\n\n    return paNoError;\n}\n\n\nstatic PaError WriteStream( PaStream* s,\n                            const void *buffer,\n                            unsigned long frames )\n{\n    PaSkeletonStream *stream = (PaSkeletonStream*)s;\n\n    /* suppress unused variable warnings */\n    (void) buffer;\n    (void) frames;\n    (void) stream;\n\n    /* IMPLEMENT ME, see portaudio.h for required behavior*/\n\n    return paNoError;\n}\n\n\nstatic signed long GetStreamReadAvailable( PaStream* s )\n{\n    PaSkeletonStream *stream = (PaSkeletonStream*)s;\n\n    /* suppress unused variable warnings */\n    (void) stream;\n\n    /* IMPLEMENT ME, see portaudio.h for required behavior*/\n\n    return 0;\n}\n\n\nstatic signed long GetStreamWriteAvailable( PaStream* s )\n{\n    PaSkeletonStream *stream = (PaSkeletonStream*)s;\n\n    /* suppress unused variable warnings */\n    (void) stream;\n\n    /* IMPLEMENT ME, see portaudio.h for required behavior*/\n\n    return 0;\n}\n"
  },
  {
    "path": "thirdparty/portaudio/src/hostapi/wasapi/mingw-include/AudioSessionTypes.h",
    "content": "/**\n * This file is part of the mingw-w64 runtime package.\n * No warranty is given; refer to the file DISCLAIMER within this package.\n */\n\n#include <winapifamily.h>\n\n#ifndef __AUDIOSESSIONTYPES__\n#define __AUDIOSESSIONTYPES__\n\n#if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_APP)\n#if defined (__WIDL__)\n#define MIDL_SIZE_IS(x) [size_is (x)]\n#define MIDL_STRING [string]\n#define MIDL_ANYSIZE_ARRAY\n#else\n#define MIDL_SIZE_IS(x)\n#define MIDL_STRING\n#define MIDL_ANYSIZE_ARRAY ANYSIZE_ARRAY\n#endif\n\ntypedef enum _AudioSessionState {\n  AudioSessionStateInactive = 0,\n  AudioSessionStateActive = 1,\n  AudioSessionStateExpired = 2\n} AudioSessionState;\n\ntypedef enum _AUDCLNT_SHAREMODE {\n  AUDCLNT_SHAREMODE_SHARED,\n  AUDCLNT_SHAREMODE_EXCLUSIVE\n} AUDCLNT_SHAREMODE;\n\ntypedef enum _AUDIO_STREAM_CATEGORY {\n  AudioCategory_Other = 0,\n  AudioCategory_ForegroundOnlyMedia,\n  AudioCategory_BackgroundCapableMedia,\n  AudioCategory_Communications,\n  AudioCategory_Alerts,\n  AudioCategory_SoundEffects,\n  AudioCategory_GameEffects,\n  AudioCategory_GameMedia,\n  AudioCategory_GameChat,\n  AudioCategory_Speech,\n  AudioCategory_Movie,\n  AudioCategory_Media\n} AUDIO_STREAM_CATEGORY;\n\n#define AUDCLNT_STREAMFLAGS_CROSSPROCESS 0x00010000\n#define AUDCLNT_STREAMFLAGS_LOOPBACK 0x00020000\n#define AUDCLNT_STREAMFLAGS_EVENTCALLBACK 0x00040000\n#define AUDCLNT_STREAMFLAGS_NOPERSIST 0x00080000\n#define AUDCLNT_STREAMFLAGS_RATEADJUST 0x00100000\n#define AUDCLNT_SESSIONFLAGS_EXPIREWHENUNOWNED 0x10000000\n#define AUDCLNT_SESSIONFLAGS_DISPLAY_HIDE 0x20000000\n#define AUDCLNT_SESSIONFLAGS_DISPLAY_HIDEWHENEXPIRED 0x40000000\n\n#endif\n#endif\n"
  },
  {
    "path": "thirdparty/portaudio/src/hostapi/wasapi/mingw-include/PropIdl.h",
    "content": "/**\n * This file has no copyright assigned and is placed in the Public Domain.\n * This file is part of the PortAudio library.\n */\n#ifndef _INC_PROPIDL_PA\n#define _INC_PROPIDL_PA\n\n#ifndef COM_NO_WINDOWS_H\n#include \"windows.h\"\n#include \"ole2.h\"\n#endif\n\ntypedef const PROPVARIANT *REFPROPVARIANT;\n\n#define PropVariantInit(VAR) memset((VAR), 0, sizeof(PROPVARIANT))\nWINOLEAPI PropVariantClear(PROPVARIANT *pvar);\n\n#endif /* _INC_PROPIDL_PA */\n\n"
  },
  {
    "path": "thirdparty/portaudio/src/hostapi/wasapi/mingw-include/ShTypes.h",
    "content": "/*** Autogenerated by WIDL 4.5 from shtypes.idl - Do not edit ***/\n\n#ifdef _WIN32\n#ifndef __REQUIRED_RPCNDR_H_VERSION__\n#define __REQUIRED_RPCNDR_H_VERSION__ 475\n#endif\n#include <rpc.h>\n#include <rpcndr.h>\n#endif\n\n#ifndef COM_NO_WINDOWS_H\n#include <windows.h>\n#include <ole2.h>\n#endif\n\n#ifndef __shtypes_h__\n#define __shtypes_h__\n\n/* Forward declarations */\n\n/* Headers for imported files */\n\n#include <unknwn.h>\n#include <wtypes.h>\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/**\n * This file is part of the mingw-w64 runtime package.\n * No warranty is given; refer to the file DISCLAIMER within this package.\n */\n\n\n#ifndef DUMMYUNIONNAME\n#ifdef NONAMELESSUNION\n#define DUMMYUNIONNAME   u\n#define DUMMYUNIONNAME2  u2\n#define DUMMYUNIONNAME3  u3\n#define DUMMYUNIONNAME4  u4\n#define DUMMYUNIONNAME5  u5\n#else\n#define DUMMYUNIONNAME\n#define DUMMYUNIONNAME2\n#define DUMMYUNIONNAME3\n#define DUMMYUNIONNAME4\n#define DUMMYUNIONNAME5\n#endif\n#endif\n\n#include <pshpack1.h>\ntypedef struct _SHITEMID {\n    USHORT cb;\n    BYTE abID[1];\n} SHITEMID;\n#include <poppack.h>\n\n#if (defined(_X86_) && !defined(__x86_64))\n#undef __unaligned\n#define __unaligned\n#endif\n\ntypedef SHITEMID *LPSHITEMID;\ntypedef const SHITEMID *LPCSHITEMID;\n\n#include <pshpack1.h>\ntypedef struct _ITEMIDLIST {\n    SHITEMID mkid;\n} ITEMIDLIST;\n\n#if defined(STRICT_TYPED_ITEMIDS) && defined(__cplusplus)\n  typedef struct _ITEMIDLIST_RELATIVE : ITEMIDLIST { } ITEMIDLIST_RELATIVE;\n  typedef struct _ITEMID_CHILD : ITEMIDLIST_RELATIVE { } ITEMID_CHILD;\n  typedef struct _ITEMIDLIST_ABSOLUTE : ITEMIDLIST_RELATIVE { } ITEMIDLIST_ABSOLUTE;\n#else\ntypedef ITEMIDLIST ITEMIDLIST_RELATIVE;\ntypedef ITEMIDLIST ITEMID_CHILD;\ntypedef ITEMIDLIST ITEMIDLIST_ABSOLUTE;\n#endif\n#include <poppack.h>\n\ntypedef BYTE_BLOB *wirePIDL;\ntypedef ITEMIDLIST *LPITEMIDLIST;\ntypedef const ITEMIDLIST *LPCITEMIDLIST;\n#if defined(STRICT_TYPED_ITEMIDS) && defined(__cplusplus)\ntypedef ITEMIDLIST_ABSOLUTE *PIDLIST_ABSOLUTE;\ntypedef const ITEMIDLIST_ABSOLUTE *PCIDLIST_ABSOLUTE;\ntypedef const ITEMIDLIST_ABSOLUTE *PCUIDLIST_ABSOLUTE;\ntypedef ITEMIDLIST_RELATIVE *PIDLIST_RELATIVE;\ntypedef const ITEMIDLIST_RELATIVE *PCIDLIST_RELATIVE;\ntypedef ITEMIDLIST_RELATIVE *PUIDLIST_RELATIVE;\ntypedef const ITEMIDLIST_RELATIVE *PCUIDLIST_RELATIVE;\ntypedef ITEMID_CHILD *PITEMID_CHILD;\ntypedef const ITEMID_CHILD *PCITEMID_CHILD;\ntypedef ITEMID_CHILD *PUITEMID_CHILD;\ntypedef const ITEMID_CHILD *PCUITEMID_CHILD;\ntypedef const PCUITEMID_CHILD *PCUITEMID_CHILD_ARRAY;\ntypedef const PCUIDLIST_RELATIVE *PCUIDLIST_RELATIVE_ARRAY;\ntypedef const PCIDLIST_ABSOLUTE *PCIDLIST_ABSOLUTE_ARRAY;\ntypedef const PCUIDLIST_ABSOLUTE *PCUIDLIST_ABSOLUTE_ARRAY;\n#else\n#define PIDLIST_ABSOLUTE LPITEMIDLIST\n#define PCIDLIST_ABSOLUTE LPCITEMIDLIST\n#define PCUIDLIST_ABSOLUTE LPCITEMIDLIST\n#define PIDLIST_RELATIVE LPITEMIDLIST\n#define PCIDLIST_RELATIVE LPCITEMIDLIST\n#define PUIDLIST_RELATIVE LPITEMIDLIST\n#define PCUIDLIST_RELATIVE LPCITEMIDLIST\n#define PITEMID_CHILD LPITEMIDLIST\n#define PCITEMID_CHILD LPCITEMIDLIST\n#define PUITEMID_CHILD LPITEMIDLIST\n#define PCUITEMID_CHILD LPCITEMIDLIST\n#define PCUITEMID_CHILD_ARRAY LPCITEMIDLIST *\n#define PCUIDLIST_RELATIVE_ARRAY LPCITEMIDLIST *\n#define PCIDLIST_ABSOLUTE_ARRAY LPCITEMIDLIST *\n#define PCUIDLIST_ABSOLUTE_ARRAY LPCITEMIDLIST *\n#endif\n\n#if 0\ntypedef struct _WIN32_FIND_DATAA {\n    DWORD dwFileAttributes;\n    FILETIME ftCreationTime;\n    FILETIME ftLastAccessTime;\n    FILETIME ftLastWriteTime;\n    DWORD nFileSizeHigh;\n    DWORD nFileSizeLow;\n    DWORD dwReserved0;\n    DWORD dwReserved1;\n    CHAR cFileName[260];\n    CHAR cAlternateFileName[14];\n} WIN32_FIND_DATAA;\ntypedef struct _WIN32_FIND_DATAA *PWIN32_FIND_DATAA;\ntypedef struct _WIN32_FIND_DATAA *LPWIN32_FIND_DATAA;\n\ntypedef struct _WIN32_FIND_DATAW {\n    DWORD dwFileAttributes;\n    FILETIME ftCreationTime;\n    FILETIME ftLastAccessTime;\n    FILETIME ftLastWriteTime;\n    DWORD nFileSizeHigh;\n    DWORD nFileSizeLow;\n    DWORD dwReserved0;\n    DWORD dwReserved1;\n    WCHAR cFileName[260];\n    WCHAR cAlternateFileName[14];\n} WIN32_FIND_DATAW;\ntypedef struct _WIN32_FIND_DATAW *PWIN32_FIND_DATAW;\ntypedef struct _WIN32_FIND_DATAW *LPWIN32_FIND_DATAW;\n#endif\n\ntypedef enum tagSTRRET_TYPE {\n    STRRET_WSTR = 0x0,\n    STRRET_OFFSET = 0x1,\n    STRRET_CSTR = 0x2\n} STRRET_TYPE;\n\n#include <pshpack8.h>\ntypedef struct _STRRET {\n    UINT uType;\n    __C89_NAMELESS union {\n        LPWSTR pOleStr;\n        UINT uOffset;\n        char cStr[260];\n    } __C89_NAMELESSUNIONNAME;\n} STRRET;\n#include <poppack.h>\n\ntypedef STRRET *LPSTRRET;\n\n#include <pshpack1.h>\ntypedef struct _SHELLDETAILS {\n    int fmt;\n    int cxChar;\n    STRRET str;\n} SHELLDETAILS;\ntypedef struct _SHELLDETAILS *LPSHELLDETAILS;\n#include <poppack.h>\n\n#if _WIN32_IE >= _WIN32_IE_IE60SP2\ntypedef enum tagPERCEIVED {\n    PERCEIVED_TYPE_FIRST = -3,\n    PERCEIVED_TYPE_CUSTOM = -3,\n    PERCEIVED_TYPE_UNSPECIFIED = -2,\n    PERCEIVED_TYPE_FOLDER = -1,\n    PERCEIVED_TYPE_UNKNOWN = 0,\n    PERCEIVED_TYPE_TEXT = 1,\n    PERCEIVED_TYPE_IMAGE = 2,\n    PERCEIVED_TYPE_AUDIO = 3,\n    PERCEIVED_TYPE_VIDEO = 4,\n    PERCEIVED_TYPE_COMPRESSED = 5,\n    PERCEIVED_TYPE_DOCUMENT = 6,\n    PERCEIVED_TYPE_SYSTEM = 7,\n    PERCEIVED_TYPE_APPLICATION = 8,\n    PERCEIVED_TYPE_GAMEMEDIA = 9,\n    PERCEIVED_TYPE_CONTACTS = 10,\n    PERCEIVED_TYPE_LAST = 10\n} PERCEIVED;\n\n#define PERCEIVEDFLAG_UNDEFINED 0x0000\n#define PERCEIVEDFLAG_SOFTCODED 0x0001\n#define PERCEIVEDFLAG_HARDCODED 0x0002\n#define PERCEIVEDFLAG_NATIVESUPPORT 0x0004\n#define PERCEIVEDFLAG_GDIPLUS 0x0010\n#define PERCEIVEDFLAG_WMSDK 0x0020\n#define PERCEIVEDFLAG_ZIPFOLDER 0x0040\n\ntypedef DWORD PERCEIVEDFLAG;\n#endif\n\ntypedef struct _COMDLG_FILTERSPEC {\n    LPCWSTR pszName;\n    LPCWSTR pszSpec;\n} COMDLG_FILTERSPEC;\n\ntypedef GUID KNOWNFOLDERID;\n\n#if 0\ntypedef KNOWNFOLDERID *REFKNOWNFOLDERID;\n#endif\n\n#ifdef __cplusplus\n#define REFKNOWNFOLDERID const KNOWNFOLDERID &\n#else\n#define REFKNOWNFOLDERID const KNOWNFOLDERID * __MIDL_CONST\n#endif\n\ntypedef DWORD KF_REDIRECT_FLAGS;\n\ntypedef GUID FOLDERTYPEID;\n\n#if 0\ntypedef FOLDERTYPEID *REFFOLDERTYPEID;\n#endif\n\n#ifdef __cplusplus\n#define REFFOLDERTYPEID const FOLDERTYPEID &\n#else\n#define REFFOLDERTYPEID const FOLDERTYPEID * __MIDL_CONST\n#endif\n\ntypedef GUID TASKOWNERID;\n\n#if 0\ntypedef TASKOWNERID *REFTASKOWNERID;\n#endif\n\n#ifdef __cplusplus\n#define REFTASKOWNERID const TASKOWNERID &\n#else\n#define REFTASKOWNERID const TASKOWNERID * __MIDL_CONST\n#endif\n\ntypedef GUID ELEMENTID;\n\n#if 0\ntypedef ELEMENTID *REFELEMENTID;\n#endif\n\n#ifdef __cplusplus\n#define REFELEMENTID const ELEMENTID &\n#else\n#define REFELEMENTID const ELEMENTID * __MIDL_CONST\n#endif\n\n#ifndef LF_FACESIZE\ntypedef struct tagLOGFONTA {\n    LONG lfHeight;\n    LONG lfWidth;\n    LONG lfEscapement;\n    LONG lfOrientation;\n    LONG lfWeight;\n    BYTE lfItalic;\n    BYTE lfUnderline;\n    BYTE lfStrikeOut;\n    BYTE lfCharSet;\n    BYTE lfOutPrecision;\n    BYTE lfClipPrecision;\n    BYTE lfQuality;\n    BYTE lfPitchAndFamily;\n    CHAR lfFaceName[32];\n} LOGFONTA;\n\ntypedef struct tagLOGFONTW {\n    LONG lfHeight;\n    LONG lfWidth;\n    LONG lfEscapement;\n    LONG lfOrientation;\n    LONG lfWeight;\n    BYTE lfItalic;\n    BYTE lfUnderline;\n    BYTE lfStrikeOut;\n    BYTE lfCharSet;\n    BYTE lfOutPrecision;\n    BYTE lfClipPrecision;\n    BYTE lfQuality;\n    BYTE lfPitchAndFamily;\n    WCHAR lfFaceName[32];\n} LOGFONTW;\n\ntypedef LOGFONTA LOGFONT;\n#endif\n\ntypedef enum tagSHCOLSTATE {\n    SHCOLSTATE_DEFAULT = 0x0,\n    SHCOLSTATE_TYPE_STR = 0x1,\n    SHCOLSTATE_TYPE_INT = 0x2,\n    SHCOLSTATE_TYPE_DATE = 0x3,\n    SHCOLSTATE_TYPEMASK = 0xf,\n    SHCOLSTATE_ONBYDEFAULT = 0x10,\n    SHCOLSTATE_SLOW = 0x20,\n    SHCOLSTATE_EXTENDED = 0x40,\n    SHCOLSTATE_SECONDARYUI = 0x80,\n    SHCOLSTATE_HIDDEN = 0x100,\n    SHCOLSTATE_PREFER_VARCMP = 0x200,\n    SHCOLSTATE_PREFER_FMTCMP = 0x400,\n    SHCOLSTATE_NOSORTBYFOLDERNESS = 0x800,\n    SHCOLSTATE_VIEWONLY = 0x10000,\n    SHCOLSTATE_BATCHREAD = 0x20000,\n    SHCOLSTATE_NO_GROUPBY = 0x40000,\n    SHCOLSTATE_FIXED_WIDTH = 0x1000,\n    SHCOLSTATE_NODPISCALE = 0x2000,\n    SHCOLSTATE_FIXED_RATIO = 0x4000,\n    SHCOLSTATE_DISPLAYMASK = 0xf000\n} SHCOLSTATE;\n\ntypedef DWORD SHCOLSTATEF;\ntypedef PROPERTYKEY SHCOLUMNID;\ntypedef const SHCOLUMNID *LPCSHCOLUMNID;\n\ntypedef enum DEVICE_SCALE_FACTOR {\n    DEVICE_SCALE_FACTOR_INVALID = 0,\n    SCALE_100_PERCENT = 100,\n    SCALE_120_PERCENT = 120,\n    SCALE_125_PERCENT = 125,\n    SCALE_140_PERCENT = 140,\n    SCALE_150_PERCENT = 150,\n    SCALE_160_PERCENT = 160,\n    SCALE_175_PERCENT = 175,\n    SCALE_180_PERCENT = 180,\n    SCALE_200_PERCENT = 200,\n    SCALE_225_PERCENT = 225,\n    SCALE_250_PERCENT = 250,\n    SCALE_300_PERCENT = 300,\n    SCALE_350_PERCENT = 350,\n    SCALE_400_PERCENT = 400,\n    SCALE_450_PERCENT = 450,\n    SCALE_500_PERCENT = 500\n} DEVICE_SCALE_FACTOR;\n/* Begin additional prototypes for all interfaces */\n\n\n/* End additional prototypes */\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif /* __shtypes_h__ */\n"
  },
  {
    "path": "thirdparty/portaudio/src/hostapi/wasapi/mingw-include/audioclient.h",
    "content": "\n\n/* this ALWAYS GENERATED file contains the definitions for the interfaces */\n\n\n /* File created by MIDL compiler version 7.00.0499 */\n/* Compiler settings for audioclient.idl:\n    Oicf, W1, Zp8, env=Win32 (32b run)\n    protocol : dce , ms_ext, c_ext, robust\n    error checks: allocation ref bounds_check enum stub_data \n    VC __declspec() decoration level: \n         __declspec(uuid()), __declspec(selectany), __declspec(novtable)\n         DECLSPEC_UUID(), MIDL_INTERFACE()\n*/\n//@@MIDL_FILE_HEADING(  )\n\n#pragma warning( disable: 4049 )  /* more than 64k source lines */\n\n\n/* verify that the <rpcndr.h> version is high enough to compile this file*/\n#ifndef __REQUIRED_RPCNDR_H_VERSION__\n#define __REQUIRED_RPCNDR_H_VERSION__ 475\n#endif\n\n/* verify that the <rpcsal.h> version is high enough to compile this file*/\n#ifndef __REQUIRED_RPCSAL_H_VERSION__\n#define __REQUIRED_RPCSAL_H_VERSION__ 100\n#endif\n\n#include \"rpc.h\"\n#include \"rpcndr.h\"\n\n#ifndef __RPCNDR_H_VERSION__\n#error this stub requires an updated version of <rpcndr.h>\n#endif // __RPCNDR_H_VERSION__\n\n#ifndef COM_NO_WINDOWS_H\n#include \"windows.h\"\n#include \"ole2.h\"\n#endif /*COM_NO_WINDOWS_H*/\n\n#ifndef __audioclient_h__\n#define __audioclient_h__\n\n#if defined(_MSC_VER) && (_MSC_VER >= 1020)\n#pragma once\n#endif\n\n/* Forward Declarations */ \n\n#ifndef __IAudioClient_FWD_DEFINED__\n#define __IAudioClient_FWD_DEFINED__\ntypedef interface IAudioClient IAudioClient;\n#endif \t/* __IAudioClient_FWD_DEFINED__ */\n\n\n#ifndef __IAudioRenderClient_FWD_DEFINED__\n#define __IAudioRenderClient_FWD_DEFINED__\ntypedef interface IAudioRenderClient IAudioRenderClient;\n#endif \t/* __IAudioRenderClient_FWD_DEFINED__ */\n\n\n#ifndef __IAudioCaptureClient_FWD_DEFINED__\n#define __IAudioCaptureClient_FWD_DEFINED__\ntypedef interface IAudioCaptureClient IAudioCaptureClient;\n#endif \t/* __IAudioCaptureClient_FWD_DEFINED__ */\n\n\n#ifndef __IAudioClock_FWD_DEFINED__\n#define __IAudioClock_FWD_DEFINED__\ntypedef interface IAudioClock IAudioClock;\n#endif \t/* __IAudioClock_FWD_DEFINED__ */\n\n\n#ifndef __ISimpleAudioVolume_FWD_DEFINED__\n#define __ISimpleAudioVolume_FWD_DEFINED__\ntypedef interface ISimpleAudioVolume ISimpleAudioVolume;\n#endif \t/* __ISimpleAudioVolume_FWD_DEFINED__ */\n\n\n#ifndef __IAudioStreamVolume_FWD_DEFINED__\n#define __IAudioStreamVolume_FWD_DEFINED__\ntypedef interface IAudioStreamVolume IAudioStreamVolume;\n#endif \t/* __IAudioStreamVolume_FWD_DEFINED__ */\n\n\n#ifndef __IChannelAudioVolume_FWD_DEFINED__\n#define __IChannelAudioVolume_FWD_DEFINED__\ntypedef interface IChannelAudioVolume IChannelAudioVolume;\n#endif \t/* __IChannelAudioVolume_FWD_DEFINED__ */\n\n\n/* header files for imported files */\n#include \"wtypes.h\"\n#include \"unknwn.h\"\n#include \"AudioSessionTypes.h\"\n\n#ifdef __cplusplus\nextern \"C\"{\n#endif \n\n\n/* interface __MIDL_itf_audioclient_0000_0000 */\n/* [local] */ \n\n#if 0\ntypedef /* [hidden][restricted] */ struct WAVEFORMATEX\n    {\n    WORD wFormatTag;\n    WORD nChannels;\n    DWORD nSamplesPerSec;\n    DWORD nAvgBytesPerSec;\n    WORD nBlockAlign;\n    WORD wBitsPerSample;\n    WORD cbSize;\n    } \tWAVEFORMATEX;\n\n#else\n#include <mmreg.h>\n#endif\n#if 0\ntypedef /* [hidden][restricted] */ LONGLONG REFERENCE_TIME;\n\n#else\n#define _IKsControl_\n#include <ks.h>\n#include <ksmedia.h>\n#endif\n\nenum _AUDCLNT_BUFFERFLAGS\n    {\tAUDCLNT_BUFFERFLAGS_DATA_DISCONTINUITY\t= 0x1,\n\tAUDCLNT_BUFFERFLAGS_SILENT\t= 0x2,\n\tAUDCLNT_BUFFERFLAGS_TIMESTAMP_ERROR\t= 0x4\n    } ;\n\n\nextern RPC_IF_HANDLE __MIDL_itf_audioclient_0000_0000_v0_0_c_ifspec;\nextern RPC_IF_HANDLE __MIDL_itf_audioclient_0000_0000_v0_0_s_ifspec;\n\n#ifndef __IAudioClient_INTERFACE_DEFINED__\n#define __IAudioClient_INTERFACE_DEFINED__\n\n/* interface IAudioClient */\n/* [local][unique][uuid][object] */ \n\n\nEXTERN_C const IID IID_IAudioClient;\n\n#if defined(__cplusplus) && !defined(CINTERFACE)\n    \n    MIDL_INTERFACE(\"1CB9AD4C-DBFA-4c32-B178-C2F568A703B2\")\n    IAudioClient : public IUnknown\n    {\n    public:\n        virtual HRESULT STDMETHODCALLTYPE Initialize( \n            /* [in] */ \n            __in  AUDCLNT_SHAREMODE ShareMode,\n            /* [in] */ \n            __in  DWORD StreamFlags,\n            /* [in] */ \n            __in  REFERENCE_TIME hnsBufferDuration,\n            /* [in] */ \n            __in  REFERENCE_TIME hnsPeriodicity,\n            /* [in] */ \n            __in  const WAVEFORMATEX *pFormat,\n            /* [in] */ \n            __in_opt  LPCGUID AudioSessionGuid) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE GetBufferSize( \n            /* [out] */ \n            __out  UINT32 *pNumBufferFrames) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE GetStreamLatency( \n            /* [out] */ \n            __out  REFERENCE_TIME *phnsLatency) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE GetCurrentPadding( \n            /* [out] */ \n            __out  UINT32 *pNumPaddingFrames) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE IsFormatSupported( \n            /* [in] */ \n            __in  AUDCLNT_SHAREMODE ShareMode,\n            /* [in] */ \n            __in  const WAVEFORMATEX *pFormat,\n            /* [unique][out] */ \n            __out_opt  WAVEFORMATEX **ppClosestMatch) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE GetMixFormat( \n            /* [out] */ \n            __out  WAVEFORMATEX **ppDeviceFormat) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE GetDevicePeriod( \n            /* [out] */ \n            __out_opt  REFERENCE_TIME *phnsDefaultDevicePeriod,\n            /* [out] */ \n            __out_opt  REFERENCE_TIME *phnsMinimumDevicePeriod) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE Start( void) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE Stop( void) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE Reset( void) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE SetEventHandle( \n            /* [in] */ HANDLE eventHandle) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE GetService( \n            /* [in] */ \n            __in  REFIID riid,\n            /* [iid_is][out] */ \n            __out  void **ppv) = 0;\n        \n    };\n    \n#else \t/* C style interface */\n\n    typedef struct IAudioClientVtbl\n    {\n        BEGIN_INTERFACE\n        \n        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \n            IAudioClient * This,\n            /* [in] */ REFIID riid,\n            /* [iid_is][out] */ \n            __RPC__deref_out  void **ppvObject);\n        \n        ULONG ( STDMETHODCALLTYPE *AddRef )( \n            IAudioClient * This);\n        \n        ULONG ( STDMETHODCALLTYPE *Release )( \n            IAudioClient * This);\n        \n        HRESULT ( STDMETHODCALLTYPE *Initialize )( \n            IAudioClient * This,\n            /* [in] */ \n            __in  AUDCLNT_SHAREMODE ShareMode,\n            /* [in] */ \n            __in  DWORD StreamFlags,\n            /* [in] */ \n            __in  REFERENCE_TIME hnsBufferDuration,\n            /* [in] */ \n            __in  REFERENCE_TIME hnsPeriodicity,\n            /* [in] */ \n            __in  const WAVEFORMATEX *pFormat,\n            /* [in] */ \n            __in_opt  LPCGUID AudioSessionGuid);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetBufferSize )( \n            IAudioClient * This,\n            /* [out] */ \n            __out  UINT32 *pNumBufferFrames);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetStreamLatency )( \n            IAudioClient * This,\n            /* [out] */ \n            __out  REFERENCE_TIME *phnsLatency);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetCurrentPadding )( \n            IAudioClient * This,\n            /* [out] */ \n            __out  UINT32 *pNumPaddingFrames);\n        \n        HRESULT ( STDMETHODCALLTYPE *IsFormatSupported )( \n            IAudioClient * This,\n            /* [in] */ \n            __in  AUDCLNT_SHAREMODE ShareMode,\n            /* [in] */ \n            __in  const WAVEFORMATEX *pFormat,\n            /* [unique][out] */ \n            __out_opt  WAVEFORMATEX **ppClosestMatch);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetMixFormat )( \n            IAudioClient * This,\n            /* [out] */ \n            __out  WAVEFORMATEX **ppDeviceFormat);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetDevicePeriod )( \n            IAudioClient * This,\n            /* [out] */ \n            __out_opt  REFERENCE_TIME *phnsDefaultDevicePeriod,\n            /* [out] */ \n            __out_opt  REFERENCE_TIME *phnsMinimumDevicePeriod);\n        \n        HRESULT ( STDMETHODCALLTYPE *Start )( \n            IAudioClient * This);\n        \n        HRESULT ( STDMETHODCALLTYPE *Stop )( \n            IAudioClient * This);\n        \n        HRESULT ( STDMETHODCALLTYPE *Reset )( \n            IAudioClient * This);\n        \n        HRESULT ( STDMETHODCALLTYPE *SetEventHandle )( \n            IAudioClient * This,\n            /* [in] */ HANDLE eventHandle);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetService )( \n            IAudioClient * This,\n            /* [in] */ \n            __in  REFIID riid,\n            /* [iid_is][out] */ \n            __out  void **ppv);\n        \n        END_INTERFACE\n    } IAudioClientVtbl;\n\n    interface IAudioClient\n    {\n        CONST_VTBL struct IAudioClientVtbl *lpVtbl;\n    };\n\n    \n\n#ifdef COBJMACROS\n\n\n#define IAudioClient_QueryInterface(This,riid,ppvObject)\t\\\n    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \n\n#define IAudioClient_AddRef(This)\t\\\n    ( (This)->lpVtbl -> AddRef(This) ) \n\n#define IAudioClient_Release(This)\t\\\n    ( (This)->lpVtbl -> Release(This) ) \n\n\n#define IAudioClient_Initialize(This,ShareMode,StreamFlags,hnsBufferDuration,hnsPeriodicity,pFormat,AudioSessionGuid)\t\\\n    ( (This)->lpVtbl -> Initialize(This,ShareMode,StreamFlags,hnsBufferDuration,hnsPeriodicity,pFormat,AudioSessionGuid) ) \n\n#define IAudioClient_GetBufferSize(This,pNumBufferFrames)\t\\\n    ( (This)->lpVtbl -> GetBufferSize(This,pNumBufferFrames) ) \n\n#define IAudioClient_GetStreamLatency(This,phnsLatency)\t\\\n    ( (This)->lpVtbl -> GetStreamLatency(This,phnsLatency) ) \n\n#define IAudioClient_GetCurrentPadding(This,pNumPaddingFrames)\t\\\n    ( (This)->lpVtbl -> GetCurrentPadding(This,pNumPaddingFrames) ) \n\n#define IAudioClient_IsFormatSupported(This,ShareMode,pFormat,ppClosestMatch)\t\\\n    ( (This)->lpVtbl -> IsFormatSupported(This,ShareMode,pFormat,ppClosestMatch) ) \n\n#define IAudioClient_GetMixFormat(This,ppDeviceFormat)\t\\\n    ( (This)->lpVtbl -> GetMixFormat(This,ppDeviceFormat) ) \n\n#define IAudioClient_GetDevicePeriod(This,phnsDefaultDevicePeriod,phnsMinimumDevicePeriod)\t\\\n    ( (This)->lpVtbl -> GetDevicePeriod(This,phnsDefaultDevicePeriod,phnsMinimumDevicePeriod) ) \n\n#define IAudioClient_Start(This)\t\\\n    ( (This)->lpVtbl -> Start(This) ) \n\n#define IAudioClient_Stop(This)\t\\\n    ( (This)->lpVtbl -> Stop(This) ) \n\n#define IAudioClient_Reset(This)\t\\\n    ( (This)->lpVtbl -> Reset(This) ) \n\n#define IAudioClient_SetEventHandle(This,eventHandle)\t\\\n    ( (This)->lpVtbl -> SetEventHandle(This,eventHandle) ) \n\n#define IAudioClient_GetService(This,riid,ppv)\t\\\n    ( (This)->lpVtbl -> GetService(This,riid,ppv) ) \n\n#endif /* COBJMACROS */\n\n\n#endif \t/* C style interface */\n\n\n\n\n#endif \t/* __IAudioClient_INTERFACE_DEFINED__ */\n\n\n#ifndef __IAudioRenderClient_INTERFACE_DEFINED__\n#define __IAudioRenderClient_INTERFACE_DEFINED__\n\n/* interface IAudioRenderClient */\n/* [local][unique][helpstring][uuid][object] */ \n\n\nEXTERN_C const IID IID_IAudioRenderClient;\n\n#if defined(__cplusplus) && !defined(CINTERFACE)\n    \n    MIDL_INTERFACE(\"F294ACFC-3146-4483-A7BF-ADDCA7C260E2\")\n    IAudioRenderClient : public IUnknown\n    {\n    public:\n        virtual HRESULT STDMETHODCALLTYPE GetBuffer( \n            /* [in] */ \n            __in  UINT32 NumFramesRequested,\n            /* [out] */ \n            __out  BYTE **ppData) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE ReleaseBuffer( \n            /* [in] */ \n            __in  UINT32 NumFramesWritten,\n            /* [in] */ \n            __in  DWORD dwFlags) = 0;\n        \n    };\n    \n#else \t/* C style interface */\n\n    typedef struct IAudioRenderClientVtbl\n    {\n        BEGIN_INTERFACE\n        \n        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \n            IAudioRenderClient * This,\n            /* [in] */ REFIID riid,\n            /* [iid_is][out] */ \n            __RPC__deref_out  void **ppvObject);\n        \n        ULONG ( STDMETHODCALLTYPE *AddRef )( \n            IAudioRenderClient * This);\n        \n        ULONG ( STDMETHODCALLTYPE *Release )( \n            IAudioRenderClient * This);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetBuffer )( \n            IAudioRenderClient * This,\n            /* [in] */ \n            __in  UINT32 NumFramesRequested,\n            /* [out] */ \n            __out  BYTE **ppData);\n        \n        HRESULT ( STDMETHODCALLTYPE *ReleaseBuffer )( \n            IAudioRenderClient * This,\n            /* [in] */ \n            __in  UINT32 NumFramesWritten,\n            /* [in] */ \n            __in  DWORD dwFlags);\n        \n        END_INTERFACE\n    } IAudioRenderClientVtbl;\n\n    interface IAudioRenderClient\n    {\n        CONST_VTBL struct IAudioRenderClientVtbl *lpVtbl;\n    };\n\n    \n\n#ifdef COBJMACROS\n\n\n#define IAudioRenderClient_QueryInterface(This,riid,ppvObject)\t\\\n    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \n\n#define IAudioRenderClient_AddRef(This)\t\\\n    ( (This)->lpVtbl -> AddRef(This) ) \n\n#define IAudioRenderClient_Release(This)\t\\\n    ( (This)->lpVtbl -> Release(This) ) \n\n\n#define IAudioRenderClient_GetBuffer(This,NumFramesRequested,ppData)\t\\\n    ( (This)->lpVtbl -> GetBuffer(This,NumFramesRequested,ppData) ) \n\n#define IAudioRenderClient_ReleaseBuffer(This,NumFramesWritten,dwFlags)\t\\\n    ( (This)->lpVtbl -> ReleaseBuffer(This,NumFramesWritten,dwFlags) ) \n\n#endif /* COBJMACROS */\n\n\n#endif \t/* C style interface */\n\n\n\n\n#endif \t/* __IAudioRenderClient_INTERFACE_DEFINED__ */\n\n\n#ifndef __IAudioCaptureClient_INTERFACE_DEFINED__\n#define __IAudioCaptureClient_INTERFACE_DEFINED__\n\n/* interface IAudioCaptureClient */\n/* [local][unique][helpstring][uuid][object] */ \n\n\nEXTERN_C const IID IID_IAudioCaptureClient;\n\n#if defined(__cplusplus) && !defined(CINTERFACE)\n    \n    MIDL_INTERFACE(\"C8ADBD64-E71E-48a0-A4DE-185C395CD317\")\n    IAudioCaptureClient : public IUnknown\n    {\n    public:\n        virtual HRESULT STDMETHODCALLTYPE GetBuffer( \n            /* [out] */ \n            __out  BYTE **ppData,\n            /* [out] */ \n            __out  UINT32 *pNumFramesToRead,\n            /* [out] */ \n            __out  DWORD *pdwFlags,\n            /* [unique][out] */ \n            __out_opt  UINT64 *pu64DevicePosition,\n            /* [unique][out] */ \n            __out_opt  UINT64 *pu64QPCPosition) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE ReleaseBuffer( \n            /* [in] */ \n            __in  UINT32 NumFramesRead) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE GetNextPacketSize( \n            /* [out] */ \n            __out  UINT32 *pNumFramesInNextPacket) = 0;\n        \n    };\n    \n#else \t/* C style interface */\n\n    typedef struct IAudioCaptureClientVtbl\n    {\n        BEGIN_INTERFACE\n        \n        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \n            IAudioCaptureClient * This,\n            /* [in] */ REFIID riid,\n            /* [iid_is][out] */ \n            __RPC__deref_out  void **ppvObject);\n        \n        ULONG ( STDMETHODCALLTYPE *AddRef )( \n            IAudioCaptureClient * This);\n        \n        ULONG ( STDMETHODCALLTYPE *Release )( \n            IAudioCaptureClient * This);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetBuffer )( \n            IAudioCaptureClient * This,\n            /* [out] */ \n            __out  BYTE **ppData,\n            /* [out] */ \n            __out  UINT32 *pNumFramesToRead,\n            /* [out] */ \n            __out  DWORD *pdwFlags,\n            /* [unique][out] */ \n            __out_opt  UINT64 *pu64DevicePosition,\n            /* [unique][out] */ \n            __out_opt  UINT64 *pu64QPCPosition);\n        \n        HRESULT ( STDMETHODCALLTYPE *ReleaseBuffer )( \n            IAudioCaptureClient * This,\n            /* [in] */ \n            __in  UINT32 NumFramesRead);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetNextPacketSize )( \n            IAudioCaptureClient * This,\n            /* [out] */ \n            __out  UINT32 *pNumFramesInNextPacket);\n        \n        END_INTERFACE\n    } IAudioCaptureClientVtbl;\n\n    interface IAudioCaptureClient\n    {\n        CONST_VTBL struct IAudioCaptureClientVtbl *lpVtbl;\n    };\n\n    \n\n#ifdef COBJMACROS\n\n\n#define IAudioCaptureClient_QueryInterface(This,riid,ppvObject)\t\\\n    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \n\n#define IAudioCaptureClient_AddRef(This)\t\\\n    ( (This)->lpVtbl -> AddRef(This) ) \n\n#define IAudioCaptureClient_Release(This)\t\\\n    ( (This)->lpVtbl -> Release(This) ) \n\n\n#define IAudioCaptureClient_GetBuffer(This,ppData,pNumFramesToRead,pdwFlags,pu64DevicePosition,pu64QPCPosition)\t\\\n    ( (This)->lpVtbl -> GetBuffer(This,ppData,pNumFramesToRead,pdwFlags,pu64DevicePosition,pu64QPCPosition) ) \n\n#define IAudioCaptureClient_ReleaseBuffer(This,NumFramesRead)\t\\\n    ( (This)->lpVtbl -> ReleaseBuffer(This,NumFramesRead) ) \n\n#define IAudioCaptureClient_GetNextPacketSize(This,pNumFramesInNextPacket)\t\\\n    ( (This)->lpVtbl -> GetNextPacketSize(This,pNumFramesInNextPacket) ) \n\n#endif /* COBJMACROS */\n\n\n#endif \t/* C style interface */\n\n\n\n\n#endif \t/* __IAudioCaptureClient_INTERFACE_DEFINED__ */\n\n\n/* interface __MIDL_itf_audioclient_0000_0003 */\n/* [local] */ \n\n#define AUDIOCLOCK_CHARACTERISTIC_FIXED_FREQ  0x00000001\n\n\nextern RPC_IF_HANDLE __MIDL_itf_audioclient_0000_0003_v0_0_c_ifspec;\nextern RPC_IF_HANDLE __MIDL_itf_audioclient_0000_0003_v0_0_s_ifspec;\n\n#ifndef __IAudioClock_INTERFACE_DEFINED__\n#define __IAudioClock_INTERFACE_DEFINED__\n\n/* interface IAudioClock */\n/* [local][unique][uuid][object] */ \n\n\nEXTERN_C const IID IID_IAudioClock;\n\n#if defined(__cplusplus) && !defined(CINTERFACE)\n    \n    MIDL_INTERFACE(\"CD63314F-3FBA-4a1b-812C-EF96358728E7\")\n    IAudioClock : public IUnknown\n    {\n    public:\n        virtual HRESULT STDMETHODCALLTYPE GetFrequency( \n            /* [out] */ \n            __out  UINT64 *pu64Frequency) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE GetPosition( \n            /* [out] */ \n            __out  UINT64 *pu64Position,\n            /* [unique][out] */ \n            __out_opt  UINT64 *pu64QPCPosition) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE GetCharacteristics( \n            /* [out] */ \n            __out  DWORD *pdwCharacteristics) = 0;\n        \n    };\n    \n#else \t/* C style interface */\n\n    typedef struct IAudioClockVtbl\n    {\n        BEGIN_INTERFACE\n        \n        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \n            IAudioClock * This,\n            /* [in] */ REFIID riid,\n            /* [iid_is][out] */ \n            __RPC__deref_out  void **ppvObject);\n        \n        ULONG ( STDMETHODCALLTYPE *AddRef )( \n            IAudioClock * This);\n        \n        ULONG ( STDMETHODCALLTYPE *Release )( \n            IAudioClock * This);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetFrequency )( \n            IAudioClock * This,\n            /* [out] */ \n            __out  UINT64 *pu64Frequency);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetPosition )( \n            IAudioClock * This,\n            /* [out] */ \n            __out  UINT64 *pu64Position,\n            /* [unique][out] */ \n            __out_opt  UINT64 *pu64QPCPosition);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetCharacteristics )( \n            IAudioClock * This,\n            /* [out] */ \n            __out  DWORD *pdwCharacteristics);\n        \n        END_INTERFACE\n    } IAudioClockVtbl;\n\n    interface IAudioClock\n    {\n        CONST_VTBL struct IAudioClockVtbl *lpVtbl;\n    };\n\n    \n\n#ifdef COBJMACROS\n\n\n#define IAudioClock_QueryInterface(This,riid,ppvObject)\t\\\n    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \n\n#define IAudioClock_AddRef(This)\t\\\n    ( (This)->lpVtbl -> AddRef(This) ) \n\n#define IAudioClock_Release(This)\t\\\n    ( (This)->lpVtbl -> Release(This) ) \n\n\n#define IAudioClock_GetFrequency(This,pu64Frequency)\t\\\n    ( (This)->lpVtbl -> GetFrequency(This,pu64Frequency) ) \n\n#define IAudioClock_GetPosition(This,pu64Position,pu64QPCPosition)\t\\\n    ( (This)->lpVtbl -> GetPosition(This,pu64Position,pu64QPCPosition) ) \n\n#define IAudioClock_GetCharacteristics(This,pdwCharacteristics)\t\\\n    ( (This)->lpVtbl -> GetCharacteristics(This,pdwCharacteristics) ) \n\n#endif /* COBJMACROS */\n\n\n#endif \t/* C style interface */\n\n\n\n\n#endif \t/* __IAudioClock_INTERFACE_DEFINED__ */\n\n\n#ifndef __ISimpleAudioVolume_INTERFACE_DEFINED__\n#define __ISimpleAudioVolume_INTERFACE_DEFINED__\n\n/* interface ISimpleAudioVolume */\n/* [local][unique][uuid][object] */ \n\n\nEXTERN_C const IID IID_ISimpleAudioVolume;\n\n#if defined(__cplusplus) && !defined(CINTERFACE)\n    \n    MIDL_INTERFACE(\"87CE5498-68D6-44E5-9215-6DA47EF883D8\")\n    ISimpleAudioVolume : public IUnknown\n    {\n    public:\n        virtual HRESULT STDMETHODCALLTYPE SetMasterVolume( \n            /* [in] */ \n            __in  float fLevel,\n            /* [unique][in] */ LPCGUID EventContext) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE GetMasterVolume( \n            /* [out] */ \n            __out  float *pfLevel) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE SetMute( \n            /* [in] */ \n            __in  const BOOL bMute,\n            /* [unique][in] */ LPCGUID EventContext) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE GetMute( \n            /* [out] */ \n            __out  BOOL *pbMute) = 0;\n        \n    };\n    \n#else \t/* C style interface */\n\n    typedef struct ISimpleAudioVolumeVtbl\n    {\n        BEGIN_INTERFACE\n        \n        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \n            ISimpleAudioVolume * This,\n            /* [in] */ REFIID riid,\n            /* [iid_is][out] */ \n            __RPC__deref_out  void **ppvObject);\n        \n        ULONG ( STDMETHODCALLTYPE *AddRef )( \n            ISimpleAudioVolume * This);\n        \n        ULONG ( STDMETHODCALLTYPE *Release )( \n            ISimpleAudioVolume * This);\n        \n        HRESULT ( STDMETHODCALLTYPE *SetMasterVolume )( \n            ISimpleAudioVolume * This,\n            /* [in] */ \n            __in  float fLevel,\n            /* [unique][in] */ LPCGUID EventContext);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetMasterVolume )( \n            ISimpleAudioVolume * This,\n            /* [out] */ \n            __out  float *pfLevel);\n        \n        HRESULT ( STDMETHODCALLTYPE *SetMute )( \n            ISimpleAudioVolume * This,\n            /* [in] */ \n            __in  const BOOL bMute,\n            /* [unique][in] */ LPCGUID EventContext);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetMute )( \n            ISimpleAudioVolume * This,\n            /* [out] */ \n            __out  BOOL *pbMute);\n        \n        END_INTERFACE\n    } ISimpleAudioVolumeVtbl;\n\n    interface ISimpleAudioVolume\n    {\n        CONST_VTBL struct ISimpleAudioVolumeVtbl *lpVtbl;\n    };\n\n    \n\n#ifdef COBJMACROS\n\n\n#define ISimpleAudioVolume_QueryInterface(This,riid,ppvObject)\t\\\n    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \n\n#define ISimpleAudioVolume_AddRef(This)\t\\\n    ( (This)->lpVtbl -> AddRef(This) ) \n\n#define ISimpleAudioVolume_Release(This)\t\\\n    ( (This)->lpVtbl -> Release(This) ) \n\n\n#define ISimpleAudioVolume_SetMasterVolume(This,fLevel,EventContext)\t\\\n    ( (This)->lpVtbl -> SetMasterVolume(This,fLevel,EventContext) ) \n\n#define ISimpleAudioVolume_GetMasterVolume(This,pfLevel)\t\\\n    ( (This)->lpVtbl -> GetMasterVolume(This,pfLevel) ) \n\n#define ISimpleAudioVolume_SetMute(This,bMute,EventContext)\t\\\n    ( (This)->lpVtbl -> SetMute(This,bMute,EventContext) ) \n\n#define ISimpleAudioVolume_GetMute(This,pbMute)\t\\\n    ( (This)->lpVtbl -> GetMute(This,pbMute) ) \n\n#endif /* COBJMACROS */\n\n\n#endif \t/* C style interface */\n\n\n\n\n#endif \t/* __ISimpleAudioVolume_INTERFACE_DEFINED__ */\n\n\n#ifndef __IAudioStreamVolume_INTERFACE_DEFINED__\n#define __IAudioStreamVolume_INTERFACE_DEFINED__\n\n/* interface IAudioStreamVolume */\n/* [local][unique][uuid][object] */ \n\n\nEXTERN_C const IID IID_IAudioStreamVolume;\n\n#if defined(__cplusplus) && !defined(CINTERFACE)\n    \n    MIDL_INTERFACE(\"93014887-242D-4068-8A15-CF5E93B90FE3\")\n    IAudioStreamVolume : public IUnknown\n    {\n    public:\n        virtual HRESULT STDMETHODCALLTYPE GetChannelCount( \n            /* [out] */ \n            __out  UINT32 *pdwCount) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE SetChannelVolume( \n            /* [in] */ \n            __in  UINT32 dwIndex,\n            /* [in] */ \n            __in  const float fLevel) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE GetChannelVolume( \n            /* [in] */ \n            __in  UINT32 dwIndex,\n            /* [out] */ \n            __out  float *pfLevel) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE SetAllVolumes( \n            /* [in] */ \n            __in  UINT32 dwCount,\n            /* [size_is][in] */ \n            __in_ecount(dwCount)  const float *pfVolumes) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE GetAllVolumes( \n            /* [in] */ \n            __in  UINT32 dwCount,\n            /* [size_is][out] */ \n            __out_ecount(dwCount)  float *pfVolumes) = 0;\n        \n    };\n    \n#else \t/* C style interface */\n\n    typedef struct IAudioStreamVolumeVtbl\n    {\n        BEGIN_INTERFACE\n        \n        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \n            IAudioStreamVolume * This,\n            /* [in] */ REFIID riid,\n            /* [iid_is][out] */ \n            __RPC__deref_out  void **ppvObject);\n        \n        ULONG ( STDMETHODCALLTYPE *AddRef )( \n            IAudioStreamVolume * This);\n        \n        ULONG ( STDMETHODCALLTYPE *Release )( \n            IAudioStreamVolume * This);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetChannelCount )( \n            IAudioStreamVolume * This,\n            /* [out] */ \n            __out  UINT32 *pdwCount);\n        \n        HRESULT ( STDMETHODCALLTYPE *SetChannelVolume )( \n            IAudioStreamVolume * This,\n            /* [in] */ \n            __in  UINT32 dwIndex,\n            /* [in] */ \n            __in  const float fLevel);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetChannelVolume )( \n            IAudioStreamVolume * This,\n            /* [in] */ \n            __in  UINT32 dwIndex,\n            /* [out] */ \n            __out  float *pfLevel);\n        \n        HRESULT ( STDMETHODCALLTYPE *SetAllVolumes )( \n            IAudioStreamVolume * This,\n            /* [in] */ \n            __in  UINT32 dwCount,\n            /* [size_is][in] */ \n            __in_ecount(dwCount)  const float *pfVolumes);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetAllVolumes )( \n            IAudioStreamVolume * This,\n            /* [in] */ \n            __in  UINT32 dwCount,\n            /* [size_is][out] */ \n            __out_ecount(dwCount)  float *pfVolumes);\n        \n        END_INTERFACE\n    } IAudioStreamVolumeVtbl;\n\n    interface IAudioStreamVolume\n    {\n        CONST_VTBL struct IAudioStreamVolumeVtbl *lpVtbl;\n    };\n\n    \n\n#ifdef COBJMACROS\n\n\n#define IAudioStreamVolume_QueryInterface(This,riid,ppvObject)\t\\\n    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \n\n#define IAudioStreamVolume_AddRef(This)\t\\\n    ( (This)->lpVtbl -> AddRef(This) ) \n\n#define IAudioStreamVolume_Release(This)\t\\\n    ( (This)->lpVtbl -> Release(This) ) \n\n\n#define IAudioStreamVolume_GetChannelCount(This,pdwCount)\t\\\n    ( (This)->lpVtbl -> GetChannelCount(This,pdwCount) ) \n\n#define IAudioStreamVolume_SetChannelVolume(This,dwIndex,fLevel)\t\\\n    ( (This)->lpVtbl -> SetChannelVolume(This,dwIndex,fLevel) ) \n\n#define IAudioStreamVolume_GetChannelVolume(This,dwIndex,pfLevel)\t\\\n    ( (This)->lpVtbl -> GetChannelVolume(This,dwIndex,pfLevel) ) \n\n#define IAudioStreamVolume_SetAllVolumes(This,dwCount,pfVolumes)\t\\\n    ( (This)->lpVtbl -> SetAllVolumes(This,dwCount,pfVolumes) ) \n\n#define IAudioStreamVolume_GetAllVolumes(This,dwCount,pfVolumes)\t\\\n    ( (This)->lpVtbl -> GetAllVolumes(This,dwCount,pfVolumes) ) \n\n#endif /* COBJMACROS */\n\n\n#endif \t/* C style interface */\n\n\n\n\n#endif \t/* __IAudioStreamVolume_INTERFACE_DEFINED__ */\n\n\n#ifndef __IChannelAudioVolume_INTERFACE_DEFINED__\n#define __IChannelAudioVolume_INTERFACE_DEFINED__\n\n/* interface IChannelAudioVolume */\n/* [local][unique][uuid][object] */ \n\n\nEXTERN_C const IID IID_IChannelAudioVolume;\n\n#if defined(__cplusplus) && !defined(CINTERFACE)\n    \n    MIDL_INTERFACE(\"1C158861-B533-4B30-B1CF-E853E51C59B8\")\n    IChannelAudioVolume : public IUnknown\n    {\n    public:\n        virtual HRESULT STDMETHODCALLTYPE GetChannelCount( \n            /* [out] */ \n            __out  UINT32 *pdwCount) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE SetChannelVolume( \n            /* [in] */ \n            __in  UINT32 dwIndex,\n            /* [in] */ \n            __in  const float fLevel,\n            /* [unique][in] */ LPCGUID EventContext) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE GetChannelVolume( \n            /* [in] */ \n            __in  UINT32 dwIndex,\n            /* [out] */ \n            __out  float *pfLevel) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE SetAllVolumes( \n            /* [in] */ \n            __in  UINT32 dwCount,\n            /* [size_is][in] */ \n            __in_ecount(dwCount)  const float *pfVolumes,\n            /* [unique][in] */ LPCGUID EventContext) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE GetAllVolumes( \n            /* [in] */ \n            __in  UINT32 dwCount,\n            /* [size_is][out] */ \n            __out_ecount(dwCount)  float *pfVolumes) = 0;\n        \n    };\n    \n#else \t/* C style interface */\n\n    typedef struct IChannelAudioVolumeVtbl\n    {\n        BEGIN_INTERFACE\n        \n        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \n            IChannelAudioVolume * This,\n            /* [in] */ REFIID riid,\n            /* [iid_is][out] */ \n            __RPC__deref_out  void **ppvObject);\n        \n        ULONG ( STDMETHODCALLTYPE *AddRef )( \n            IChannelAudioVolume * This);\n        \n        ULONG ( STDMETHODCALLTYPE *Release )( \n            IChannelAudioVolume * This);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetChannelCount )( \n            IChannelAudioVolume * This,\n            /* [out] */ \n            __out  UINT32 *pdwCount);\n        \n        HRESULT ( STDMETHODCALLTYPE *SetChannelVolume )( \n            IChannelAudioVolume * This,\n            /* [in] */ \n            __in  UINT32 dwIndex,\n            /* [in] */ \n            __in  const float fLevel,\n            /* [unique][in] */ LPCGUID EventContext);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetChannelVolume )( \n            IChannelAudioVolume * This,\n            /* [in] */ \n            __in  UINT32 dwIndex,\n            /* [out] */ \n            __out  float *pfLevel);\n        \n        HRESULT ( STDMETHODCALLTYPE *SetAllVolumes )( \n            IChannelAudioVolume * This,\n            /* [in] */ \n            __in  UINT32 dwCount,\n            /* [size_is][in] */ \n            __in_ecount(dwCount)  const float *pfVolumes,\n            /* [unique][in] */ LPCGUID EventContext);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetAllVolumes )( \n            IChannelAudioVolume * This,\n            /* [in] */ \n            __in  UINT32 dwCount,\n            /* [size_is][out] */ \n            __out_ecount(dwCount)  float *pfVolumes);\n        \n        END_INTERFACE\n    } IChannelAudioVolumeVtbl;\n\n    interface IChannelAudioVolume\n    {\n        CONST_VTBL struct IChannelAudioVolumeVtbl *lpVtbl;\n    };\n\n    \n\n#ifdef COBJMACROS\n\n\n#define IChannelAudioVolume_QueryInterface(This,riid,ppvObject)\t\\\n    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \n\n#define IChannelAudioVolume_AddRef(This)\t\\\n    ( (This)->lpVtbl -> AddRef(This) ) \n\n#define IChannelAudioVolume_Release(This)\t\\\n    ( (This)->lpVtbl -> Release(This) ) \n\n\n#define IChannelAudioVolume_GetChannelCount(This,pdwCount)\t\\\n    ( (This)->lpVtbl -> GetChannelCount(This,pdwCount) ) \n\n#define IChannelAudioVolume_SetChannelVolume(This,dwIndex,fLevel,EventContext)\t\\\n    ( (This)->lpVtbl -> SetChannelVolume(This,dwIndex,fLevel,EventContext) ) \n\n#define IChannelAudioVolume_GetChannelVolume(This,dwIndex,pfLevel)\t\\\n    ( (This)->lpVtbl -> GetChannelVolume(This,dwIndex,pfLevel) ) \n\n#define IChannelAudioVolume_SetAllVolumes(This,dwCount,pfVolumes,EventContext)\t\\\n    ( (This)->lpVtbl -> SetAllVolumes(This,dwCount,pfVolumes,EventContext) ) \n\n#define IChannelAudioVolume_GetAllVolumes(This,dwCount,pfVolumes)\t\\\n    ( (This)->lpVtbl -> GetAllVolumes(This,dwCount,pfVolumes) ) \n\n#endif /* COBJMACROS */\n\n\n#endif \t/* C style interface */\n\n\n\n\n#endif \t/* __IChannelAudioVolume_INTERFACE_DEFINED__ */\n\n\n/* interface __MIDL_itf_audioclient_0000_0007 */\n/* [local] */ \n\n#define FACILITY_AUDCLNT 0x889\n#define AUDCLNT_ERR(n) MAKE_HRESULT(SEVERITY_ERROR, FACILITY_AUDCLNT, n)\n#define AUDCLNT_SUCCESS(n) MAKE_SCODE(SEVERITY_SUCCESS, FACILITY_AUDCLNT, n)\n#define AUDCLNT_E_NOT_INITIALIZED            AUDCLNT_ERR(0x001)\n#define AUDCLNT_E_ALREADY_INITIALIZED        AUDCLNT_ERR(0x002)\n#define AUDCLNT_E_WRONG_ENDPOINT_TYPE        AUDCLNT_ERR(0x003)\n#define AUDCLNT_E_DEVICE_INVALIDATED         AUDCLNT_ERR(0x004)\n#define AUDCLNT_E_NOT_STOPPED                AUDCLNT_ERR(0x005)\n#define AUDCLNT_E_BUFFER_TOO_LARGE           AUDCLNT_ERR(0x006)\n#define AUDCLNT_E_OUT_OF_ORDER               AUDCLNT_ERR(0x007)\n#define AUDCLNT_E_UNSUPPORTED_FORMAT         AUDCLNT_ERR(0x008)\n#define AUDCLNT_E_INVALID_SIZE               AUDCLNT_ERR(0x009)\n#define AUDCLNT_E_DEVICE_IN_USE              AUDCLNT_ERR(0x00a)\n#define AUDCLNT_E_BUFFER_OPERATION_PENDING   AUDCLNT_ERR(0x00b)\n#define AUDCLNT_E_THREAD_NOT_REGISTERED      AUDCLNT_ERR(0x00c)\n#define AUDCLNT_E_EXCLUSIVE_MODE_NOT_ALLOWED AUDCLNT_ERR(0x00e)\n#define AUDCLNT_E_ENDPOINT_CREATE_FAILED     AUDCLNT_ERR(0x00f)\n#define AUDCLNT_E_SERVICE_NOT_RUNNING        AUDCLNT_ERR(0x010)\n#define AUDCLNT_E_EVENTHANDLE_NOT_EXPECTED     AUDCLNT_ERR(0x011)\n#define AUDCLNT_E_EXCLUSIVE_MODE_ONLY          AUDCLNT_ERR(0x012)\n#define AUDCLNT_E_BUFDURATION_PERIOD_NOT_EQUAL AUDCLNT_ERR(0x013)\n#define AUDCLNT_E_EVENTHANDLE_NOT_SET          AUDCLNT_ERR(0x014)\n#define AUDCLNT_E_INCORRECT_BUFFER_SIZE        AUDCLNT_ERR(0x015)\n#define AUDCLNT_E_BUFFER_SIZE_ERROR            AUDCLNT_ERR(0x016)\n#define AUDCLNT_E_CPUUSAGE_EXCEEDED            AUDCLNT_ERR(0x017)\n#define AUDCLNT_S_BUFFER_EMPTY              AUDCLNT_SUCCESS(0x001)\n#define AUDCLNT_S_THREAD_ALREADY_REGISTERED AUDCLNT_SUCCESS(0x002)\n#define AUDCLNT_S_POSITION_STALLED\t\t   AUDCLNT_SUCCESS(0x003)\n\n\nextern RPC_IF_HANDLE __MIDL_itf_audioclient_0000_0007_v0_0_c_ifspec;\nextern RPC_IF_HANDLE __MIDL_itf_audioclient_0000_0007_v0_0_s_ifspec;\n\n/* Additional Prototypes for ALL interfaces */\n\n/* end of Additional Prototypes */\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif\n\n\n\n"
  },
  {
    "path": "thirdparty/portaudio/src/hostapi/wasapi/mingw-include/devicetopology.h",
    "content": "\n\n/* this ALWAYS GENERATED file contains the definitions for the interfaces */\n\n\n /* File created by MIDL compiler version 7.00.0499 */\n/* Compiler settings for devicetopology.idl:\n    Oicf, W1, Zp8, env=Win32 (32b run)\n    protocol : dce , ms_ext, c_ext, robust\n    error checks: allocation ref bounds_check enum stub_data \n    VC __declspec() decoration level: \n         __declspec(uuid()), __declspec(selectany), __declspec(novtable)\n         DECLSPEC_UUID(), MIDL_INTERFACE()\n*/\n//@@MIDL_FILE_HEADING(  )\n\n#pragma warning( disable: 4049 )  /* more than 64k source lines */\n\n\n/* verify that the <rpcndr.h> version is high enough to compile this file*/\n#ifndef __REQUIRED_RPCNDR_H_VERSION__\n#define __REQUIRED_RPCNDR_H_VERSION__ 500\n#endif\n\n/* verify that the <rpcsal.h> version is high enough to compile this file*/\n#ifndef __REQUIRED_RPCSAL_H_VERSION__\n#define __REQUIRED_RPCSAL_H_VERSION__ 100\n#endif\n\n#include \"rpc.h\"\n#include \"rpcndr.h\"\n\n#ifndef __RPCNDR_H_VERSION__\n#error this stub requires an updated version of <rpcndr.h>\n#endif // __RPCNDR_H_VERSION__\n\n#ifndef COM_NO_WINDOWS_H\n#include \"windows.h\"\n#include \"ole2.h\"\n#endif /*COM_NO_WINDOWS_H*/\n\n#ifndef __devicetopology_h__\n#define __devicetopology_h__\n\n#if defined(_MSC_VER) && (_MSC_VER >= 1020)\n#pragma once\n#endif\n\n/* Forward Declarations */ \n\n#ifndef __IKsControl_FWD_DEFINED__\n#define __IKsControl_FWD_DEFINED__\ntypedef interface IKsControl IKsControl;\n#endif \t/* __IKsControl_FWD_DEFINED__ */\n\n\n#ifndef __IPerChannelDbLevel_FWD_DEFINED__\n#define __IPerChannelDbLevel_FWD_DEFINED__\ntypedef interface IPerChannelDbLevel IPerChannelDbLevel;\n#endif \t/* __IPerChannelDbLevel_FWD_DEFINED__ */\n\n\n#ifndef __IAudioVolumeLevel_FWD_DEFINED__\n#define __IAudioVolumeLevel_FWD_DEFINED__\ntypedef interface IAudioVolumeLevel IAudioVolumeLevel;\n#endif \t/* __IAudioVolumeLevel_FWD_DEFINED__ */\n\n\n#ifndef __IAudioChannelConfig_FWD_DEFINED__\n#define __IAudioChannelConfig_FWD_DEFINED__\ntypedef interface IAudioChannelConfig IAudioChannelConfig;\n#endif \t/* __IAudioChannelConfig_FWD_DEFINED__ */\n\n\n#ifndef __IAudioLoudness_FWD_DEFINED__\n#define __IAudioLoudness_FWD_DEFINED__\ntypedef interface IAudioLoudness IAudioLoudness;\n#endif \t/* __IAudioLoudness_FWD_DEFINED__ */\n\n\n#ifndef __IAudioInputSelector_FWD_DEFINED__\n#define __IAudioInputSelector_FWD_DEFINED__\ntypedef interface IAudioInputSelector IAudioInputSelector;\n#endif \t/* __IAudioInputSelector_FWD_DEFINED__ */\n\n\n#ifndef __IAudioOutputSelector_FWD_DEFINED__\n#define __IAudioOutputSelector_FWD_DEFINED__\ntypedef interface IAudioOutputSelector IAudioOutputSelector;\n#endif \t/* __IAudioOutputSelector_FWD_DEFINED__ */\n\n\n#ifndef __IAudioMute_FWD_DEFINED__\n#define __IAudioMute_FWD_DEFINED__\ntypedef interface IAudioMute IAudioMute;\n#endif \t/* __IAudioMute_FWD_DEFINED__ */\n\n\n#ifndef __IAudioBass_FWD_DEFINED__\n#define __IAudioBass_FWD_DEFINED__\ntypedef interface IAudioBass IAudioBass;\n#endif \t/* __IAudioBass_FWD_DEFINED__ */\n\n\n#ifndef __IAudioMidrange_FWD_DEFINED__\n#define __IAudioMidrange_FWD_DEFINED__\ntypedef interface IAudioMidrange IAudioMidrange;\n#endif \t/* __IAudioMidrange_FWD_DEFINED__ */\n\n\n#ifndef __IAudioTreble_FWD_DEFINED__\n#define __IAudioTreble_FWD_DEFINED__\ntypedef interface IAudioTreble IAudioTreble;\n#endif \t/* __IAudioTreble_FWD_DEFINED__ */\n\n\n#ifndef __IAudioAutoGainControl_FWD_DEFINED__\n#define __IAudioAutoGainControl_FWD_DEFINED__\ntypedef interface IAudioAutoGainControl IAudioAutoGainControl;\n#endif \t/* __IAudioAutoGainControl_FWD_DEFINED__ */\n\n\n#ifndef __IAudioPeakMeter_FWD_DEFINED__\n#define __IAudioPeakMeter_FWD_DEFINED__\ntypedef interface IAudioPeakMeter IAudioPeakMeter;\n#endif \t/* __IAudioPeakMeter_FWD_DEFINED__ */\n\n\n#ifndef __IDeviceSpecificProperty_FWD_DEFINED__\n#define __IDeviceSpecificProperty_FWD_DEFINED__\ntypedef interface IDeviceSpecificProperty IDeviceSpecificProperty;\n#endif \t/* __IDeviceSpecificProperty_FWD_DEFINED__ */\n\n\n#ifndef __IKsFormatSupport_FWD_DEFINED__\n#define __IKsFormatSupport_FWD_DEFINED__\ntypedef interface IKsFormatSupport IKsFormatSupport;\n#endif \t/* __IKsFormatSupport_FWD_DEFINED__ */\n\n\n#ifndef __IKsJackDescription_FWD_DEFINED__\n#define __IKsJackDescription_FWD_DEFINED__\ntypedef interface IKsJackDescription IKsJackDescription;\n#endif \t/* __IKsJackDescription_FWD_DEFINED__ */\n\n\n#ifndef __IPartsList_FWD_DEFINED__\n#define __IPartsList_FWD_DEFINED__\ntypedef interface IPartsList IPartsList;\n#endif \t/* __IPartsList_FWD_DEFINED__ */\n\n\n#ifndef __IPart_FWD_DEFINED__\n#define __IPart_FWD_DEFINED__\ntypedef interface IPart IPart;\n#endif \t/* __IPart_FWD_DEFINED__ */\n\n\n#ifndef __IConnector_FWD_DEFINED__\n#define __IConnector_FWD_DEFINED__\ntypedef interface IConnector IConnector;\n#endif \t/* __IConnector_FWD_DEFINED__ */\n\n\n#ifndef __ISubunit_FWD_DEFINED__\n#define __ISubunit_FWD_DEFINED__\ntypedef interface ISubunit ISubunit;\n#endif \t/* __ISubunit_FWD_DEFINED__ */\n\n\n#ifndef __IControlInterface_FWD_DEFINED__\n#define __IControlInterface_FWD_DEFINED__\ntypedef interface IControlInterface IControlInterface;\n#endif \t/* __IControlInterface_FWD_DEFINED__ */\n\n\n#ifndef __IControlChangeNotify_FWD_DEFINED__\n#define __IControlChangeNotify_FWD_DEFINED__\ntypedef interface IControlChangeNotify IControlChangeNotify;\n#endif \t/* __IControlChangeNotify_FWD_DEFINED__ */\n\n\n#ifndef __IDeviceTopology_FWD_DEFINED__\n#define __IDeviceTopology_FWD_DEFINED__\ntypedef interface IDeviceTopology IDeviceTopology;\n#endif \t/* __IDeviceTopology_FWD_DEFINED__ */\n\n\n#ifndef __DeviceTopology_FWD_DEFINED__\n#define __DeviceTopology_FWD_DEFINED__\n\n#ifdef __cplusplus\ntypedef class DeviceTopology DeviceTopology;\n#else\ntypedef struct DeviceTopology DeviceTopology;\n#endif /* __cplusplus */\n\n#endif \t/* __DeviceTopology_FWD_DEFINED__ */\n\n\n#ifndef __IPartsList_FWD_DEFINED__\n#define __IPartsList_FWD_DEFINED__\ntypedef interface IPartsList IPartsList;\n#endif \t/* __IPartsList_FWD_DEFINED__ */\n\n\n#ifndef __IPerChannelDbLevel_FWD_DEFINED__\n#define __IPerChannelDbLevel_FWD_DEFINED__\ntypedef interface IPerChannelDbLevel IPerChannelDbLevel;\n#endif \t/* __IPerChannelDbLevel_FWD_DEFINED__ */\n\n\n#ifndef __IAudioVolumeLevel_FWD_DEFINED__\n#define __IAudioVolumeLevel_FWD_DEFINED__\ntypedef interface IAudioVolumeLevel IAudioVolumeLevel;\n#endif \t/* __IAudioVolumeLevel_FWD_DEFINED__ */\n\n\n#ifndef __IAudioLoudness_FWD_DEFINED__\n#define __IAudioLoudness_FWD_DEFINED__\ntypedef interface IAudioLoudness IAudioLoudness;\n#endif \t/* __IAudioLoudness_FWD_DEFINED__ */\n\n\n#ifndef __IAudioInputSelector_FWD_DEFINED__\n#define __IAudioInputSelector_FWD_DEFINED__\ntypedef interface IAudioInputSelector IAudioInputSelector;\n#endif \t/* __IAudioInputSelector_FWD_DEFINED__ */\n\n\n#ifndef __IAudioMute_FWD_DEFINED__\n#define __IAudioMute_FWD_DEFINED__\ntypedef interface IAudioMute IAudioMute;\n#endif \t/* __IAudioMute_FWD_DEFINED__ */\n\n\n#ifndef __IAudioBass_FWD_DEFINED__\n#define __IAudioBass_FWD_DEFINED__\ntypedef interface IAudioBass IAudioBass;\n#endif \t/* __IAudioBass_FWD_DEFINED__ */\n\n\n#ifndef __IAudioMidrange_FWD_DEFINED__\n#define __IAudioMidrange_FWD_DEFINED__\ntypedef interface IAudioMidrange IAudioMidrange;\n#endif \t/* __IAudioMidrange_FWD_DEFINED__ */\n\n\n#ifndef __IAudioTreble_FWD_DEFINED__\n#define __IAudioTreble_FWD_DEFINED__\ntypedef interface IAudioTreble IAudioTreble;\n#endif \t/* __IAudioTreble_FWD_DEFINED__ */\n\n\n#ifndef __IAudioAutoGainControl_FWD_DEFINED__\n#define __IAudioAutoGainControl_FWD_DEFINED__\ntypedef interface IAudioAutoGainControl IAudioAutoGainControl;\n#endif \t/* __IAudioAutoGainControl_FWD_DEFINED__ */\n\n\n#ifndef __IAudioOutputSelector_FWD_DEFINED__\n#define __IAudioOutputSelector_FWD_DEFINED__\ntypedef interface IAudioOutputSelector IAudioOutputSelector;\n#endif \t/* __IAudioOutputSelector_FWD_DEFINED__ */\n\n\n#ifndef __IAudioPeakMeter_FWD_DEFINED__\n#define __IAudioPeakMeter_FWD_DEFINED__\ntypedef interface IAudioPeakMeter IAudioPeakMeter;\n#endif \t/* __IAudioPeakMeter_FWD_DEFINED__ */\n\n\n#ifndef __IDeviceSpecificProperty_FWD_DEFINED__\n#define __IDeviceSpecificProperty_FWD_DEFINED__\ntypedef interface IDeviceSpecificProperty IDeviceSpecificProperty;\n#endif \t/* __IDeviceSpecificProperty_FWD_DEFINED__ */\n\n\n#ifndef __IKsFormatSupport_FWD_DEFINED__\n#define __IKsFormatSupport_FWD_DEFINED__\ntypedef interface IKsFormatSupport IKsFormatSupport;\n#endif \t/* __IKsFormatSupport_FWD_DEFINED__ */\n\n\n/* header files for imported files */\n#include \"oaidl.h\"\n#include \"ocidl.h\"\n#include \"propidl.h\"\n\n#ifdef __cplusplus\nextern \"C\"{\n#endif \n\n\n/* interface __MIDL_itf_devicetopology_0000_0000 */\n/* [local] */ \n\n#define E_NOTFOUND HRESULT_FROM_WIN32(ERROR_NOT_FOUND)\n//\n//   Flag for clients of IControlChangeNotify::OnNotify to allow those clients to identify hardware initiated notifications\n//\n#define DEVTOPO_HARDWARE_INITIATED_EVENTCONTEXT 'draH'\n/* E2C2E9DE-09B1-4B04-84E5-07931225EE04 */\nDEFINE_GUID(EVENTCONTEXT_VOLUMESLIDER, 0xE2C2E9DE,0x09B1,0x4B04,0x84, 0xE5, 0x07, 0x93, 0x12, 0x25, 0xEE, 0x04);\n#define _IKsControl_\n#include \"ks.h\"\n#include \"ksmedia.h\"\n#ifndef _KS_\ntypedef /* [public] */ struct __MIDL___MIDL_itf_devicetopology_0000_0000_0001\n    {\n    ULONG FormatSize;\n    ULONG Flags;\n    ULONG SampleSize;\n    ULONG Reserved;\n    GUID MajorFormat;\n    GUID SubFormat;\n    GUID Specifier;\n    } \tKSDATAFORMAT;\n\ntypedef struct __MIDL___MIDL_itf_devicetopology_0000_0000_0001 *PKSDATAFORMAT;\n\ntypedef /* [public][public][public][public][public][public][public][public][public][public] */ struct __MIDL___MIDL_itf_devicetopology_0000_0000_0002\n    {\n    union \n        {\n        struct \n            {\n            GUID Set;\n            ULONG Id;\n            ULONG Flags;\n            } \t;\n        LONGLONG Alignment;\n        } \t;\n    } \tKSIDENTIFIER;\n\ntypedef struct __MIDL___MIDL_itf_devicetopology_0000_0000_0002 *PKSIDENTIFIER;\n\ntypedef /* [public][public][public][public] */ \nenum __MIDL___MIDL_itf_devicetopology_0000_0000_0005\n    {\tePcxChanMap_FL_FR\t= 0,\n\tePcxChanMap_FC_LFE\t= ( ePcxChanMap_FL_FR + 1 ) ,\n\tePcxChanMap_BL_BR\t= ( ePcxChanMap_FC_LFE + 1 ) ,\n\tePcxChanMap_FLC_FRC\t= ( ePcxChanMap_BL_BR + 1 ) ,\n\tePcxChanMap_SL_SR\t= ( ePcxChanMap_FLC_FRC + 1 ) ,\n\tePcxChanMap_Unknown\t= ( ePcxChanMap_SL_SR + 1 ) \n    } \tEChannelMapping;\n\ntypedef /* [public][public][public][public] */ \nenum __MIDL___MIDL_itf_devicetopology_0000_0000_0006\n    {\teConnTypeUnknown\t= 0,\n\teConnTypeEighth\t= ( eConnTypeUnknown + 1 ) ,\n\teConnTypeQuarter\t= ( eConnTypeEighth + 1 ) ,\n\teConnTypeAtapiInternal\t= ( eConnTypeQuarter + 1 ) ,\n\teConnTypeRCA\t= ( eConnTypeAtapiInternal + 1 ) ,\n\teConnTypeOptical\t= ( eConnTypeRCA + 1 ) ,\n\teConnTypeOtherDigital\t= ( eConnTypeOptical + 1 ) ,\n\teConnTypeOtherAnalog\t= ( eConnTypeOtherDigital + 1 ) ,\n\teConnTypeMultichannelAnalogDIN\t= ( eConnTypeOtherAnalog + 1 ) ,\n\teConnTypeXlrProfessional\t= ( eConnTypeMultichannelAnalogDIN + 1 ) ,\n\teConnTypeRJ11Modem\t= ( eConnTypeXlrProfessional + 1 ) ,\n\teConnTypeCombination\t= ( eConnTypeRJ11Modem + 1 ) \n    } \tEPcxConnectionType;\n\ntypedef /* [public][public][public][public] */ \nenum __MIDL___MIDL_itf_devicetopology_0000_0000_0007\n    {\teGeoLocRear\t= 0x1,\n\teGeoLocFront\t= ( eGeoLocRear + 1 ) ,\n\teGeoLocLeft\t= ( eGeoLocFront + 1 ) ,\n\teGeoLocRight\t= ( eGeoLocLeft + 1 ) ,\n\teGeoLocTop\t= ( eGeoLocRight + 1 ) ,\n\teGeoLocBottom\t= ( eGeoLocTop + 1 ) ,\n\teGeoLocRearOPanel\t= ( eGeoLocBottom + 1 ) ,\n\teGeoLocRiser\t= ( eGeoLocRearOPanel + 1 ) ,\n\teGeoLocInsideMobileLid\t= ( eGeoLocRiser + 1 ) ,\n\teGeoLocDrivebay\t= ( eGeoLocInsideMobileLid + 1 ) ,\n\teGeoLocHDMI\t= ( eGeoLocDrivebay + 1 ) ,\n\teGeoLocOutsideMobileLid\t= ( eGeoLocHDMI + 1 ) ,\n\teGeoLocATAPI\t= ( eGeoLocOutsideMobileLid + 1 ) ,\n\teGeoLocReserved5\t= ( eGeoLocATAPI + 1 ) ,\n\teGeoLocReserved6\t= ( eGeoLocReserved5 + 1 ) \n    } \tEPcxGeoLocation;\n\ntypedef /* [public][public][public][public] */ \nenum __MIDL___MIDL_itf_devicetopology_0000_0000_0008\n    {\teGenLocPrimaryBox\t= 0,\n\teGenLocInternal\t= ( eGenLocPrimaryBox + 1 ) ,\n\teGenLocSeperate\t= ( eGenLocInternal + 1 ) ,\n\teGenLocOther\t= ( eGenLocSeperate + 1 ) \n    } \tEPcxGenLocation;\n\ntypedef /* [public][public][public][public] */ \nenum __MIDL___MIDL_itf_devicetopology_0000_0000_0009\n    {\tePortConnJack\t= 0,\n\tePortConnIntegratedDevice\t= ( ePortConnJack + 1 ) ,\n\tePortConnBothIntegratedAndJack\t= ( ePortConnIntegratedDevice + 1 ) ,\n\tePortConnUnknown\t= ( ePortConnBothIntegratedAndJack + 1 ) \n    } \tEPxcPortConnection;\n\ntypedef /* [public][public] */ struct __MIDL___MIDL_itf_devicetopology_0000_0000_0010\n    {\n    EChannelMapping ChannelMapping;\n    COLORREF Color;\n    EPcxConnectionType ConnectionType;\n    EPcxGeoLocation GeoLocation;\n    EPcxGenLocation GenLocation;\n    EPxcPortConnection PortConnection;\n    BOOL IsConnected;\n    } \tKSJACK_DESCRIPTION;\n\ntypedef struct __MIDL___MIDL_itf_devicetopology_0000_0000_0010 *PKSJACK_DESCRIPTION;\n\ntypedef KSIDENTIFIER KSPROPERTY;\n\ntypedef KSIDENTIFIER *PKSPROPERTY;\n\ntypedef KSIDENTIFIER KSMETHOD;\n\ntypedef KSIDENTIFIER *PKSMETHOD;\n\ntypedef KSIDENTIFIER KSEVENT;\n\ntypedef KSIDENTIFIER *PKSEVENT;\n\n#endif\n\n\n\n\n\n\n\n\ntypedef /* [public][public] */ \nenum __MIDL___MIDL_itf_devicetopology_0000_0000_0011\n    {\tIn\t= 0,\n\tOut\t= ( In + 1 ) \n    } \tDataFlow;\n\ntypedef /* [public][public] */ \nenum __MIDL___MIDL_itf_devicetopology_0000_0000_0012\n    {\tConnector\t= 0,\n\tSubunit\t= ( Connector + 1 ) \n    } \tPartType;\n\n#define PARTTYPE_FLAG_CONNECTOR 0x00010000\n#define PARTTYPE_FLAG_SUBUNIT   0x00020000\n#define PARTTYPE_MASK           0x00030000\n#define PARTID_MASK             0x0000ffff\ntypedef /* [public][public] */ \nenum __MIDL___MIDL_itf_devicetopology_0000_0000_0013\n    {\tUnknown_Connector\t= 0,\n\tPhysical_Internal\t= ( Unknown_Connector + 1 ) ,\n\tPhysical_External\t= ( Physical_Internal + 1 ) ,\n\tSoftware_IO\t= ( Physical_External + 1 ) ,\n\tSoftware_Fixed\t= ( Software_IO + 1 ) ,\n\tNetwork\t= ( Software_Fixed + 1 ) \n    } \tConnectorType;\n\n\n\nextern RPC_IF_HANDLE __MIDL_itf_devicetopology_0000_0000_v0_0_c_ifspec;\nextern RPC_IF_HANDLE __MIDL_itf_devicetopology_0000_0000_v0_0_s_ifspec;\n\n#ifndef __IKsControl_INTERFACE_DEFINED__\n#define __IKsControl_INTERFACE_DEFINED__\n\n/* interface IKsControl */\n/* [unique][helpstring][nonextensible][uuid][local][object] */ \n\n\nEXTERN_C const IID IID_IKsControl;\n\n#if defined(__cplusplus) && !defined(CINTERFACE)\n    \n    MIDL_INTERFACE(\"28F54685-06FD-11D2-B27A-00A0C9223196\")\n    IKsControl : public IUnknown\n    {\n    public:\n        virtual HRESULT STDMETHODCALLTYPE KsProperty( \n            /* [in] */ PKSPROPERTY Property,\n            /* [in] */ ULONG PropertyLength,\n            /* [out][in] */ void *PropertyData,\n            /* [in] */ ULONG DataLength,\n            /* [out] */ ULONG *BytesReturned) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE KsMethod( \n            /* [in] */ PKSMETHOD Method,\n            /* [in] */ ULONG MethodLength,\n            /* [out][in] */ void *MethodData,\n            /* [in] */ ULONG DataLength,\n            /* [out] */ ULONG *BytesReturned) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE KsEvent( \n            /* [in] */ PKSEVENT Event,\n            /* [in] */ ULONG EventLength,\n            /* [out][in] */ void *EventData,\n            /* [in] */ ULONG DataLength,\n            /* [out] */ ULONG *BytesReturned) = 0;\n        \n    };\n    \n#else \t/* C style interface */\n\n    typedef struct IKsControlVtbl\n    {\n        BEGIN_INTERFACE\n        \n        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \n            IKsControl * This,\n            /* [in] */ REFIID riid,\n            /* [iid_is][out] */ \n            __RPC__deref_out  void **ppvObject);\n        \n        ULONG ( STDMETHODCALLTYPE *AddRef )( \n            IKsControl * This);\n        \n        ULONG ( STDMETHODCALLTYPE *Release )( \n            IKsControl * This);\n        \n        HRESULT ( STDMETHODCALLTYPE *KsProperty )( \n            IKsControl * This,\n            /* [in] */ PKSPROPERTY Property,\n            /* [in] */ ULONG PropertyLength,\n            /* [out][in] */ void *PropertyData,\n            /* [in] */ ULONG DataLength,\n            /* [out] */ ULONG *BytesReturned);\n        \n        HRESULT ( STDMETHODCALLTYPE *KsMethod )( \n            IKsControl * This,\n            /* [in] */ PKSMETHOD Method,\n            /* [in] */ ULONG MethodLength,\n            /* [out][in] */ void *MethodData,\n            /* [in] */ ULONG DataLength,\n            /* [out] */ ULONG *BytesReturned);\n        \n        HRESULT ( STDMETHODCALLTYPE *KsEvent )( \n            IKsControl * This,\n            /* [in] */ PKSEVENT Event,\n            /* [in] */ ULONG EventLength,\n            /* [out][in] */ void *EventData,\n            /* [in] */ ULONG DataLength,\n            /* [out] */ ULONG *BytesReturned);\n        \n        END_INTERFACE\n    } IKsControlVtbl;\n\n    interface IKsControl\n    {\n        CONST_VTBL struct IKsControlVtbl *lpVtbl;\n    };\n\n    \n\n#ifdef COBJMACROS\n\n\n#define IKsControl_QueryInterface(This,riid,ppvObject)\t\\\n    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \n\n#define IKsControl_AddRef(This)\t\\\n    ( (This)->lpVtbl -> AddRef(This) ) \n\n#define IKsControl_Release(This)\t\\\n    ( (This)->lpVtbl -> Release(This) ) \n\n\n#define IKsControl_KsProperty(This,Property,PropertyLength,PropertyData,DataLength,BytesReturned)\t\\\n    ( (This)->lpVtbl -> KsProperty(This,Property,PropertyLength,PropertyData,DataLength,BytesReturned) ) \n\n#define IKsControl_KsMethod(This,Method,MethodLength,MethodData,DataLength,BytesReturned)\t\\\n    ( (This)->lpVtbl -> KsMethod(This,Method,MethodLength,MethodData,DataLength,BytesReturned) ) \n\n#define IKsControl_KsEvent(This,Event,EventLength,EventData,DataLength,BytesReturned)\t\\\n    ( (This)->lpVtbl -> KsEvent(This,Event,EventLength,EventData,DataLength,BytesReturned) ) \n\n#endif /* COBJMACROS */\n\n\n#endif \t/* C style interface */\n\n\n\n\n#endif \t/* __IKsControl_INTERFACE_DEFINED__ */\n\n\n#ifndef __IPerChannelDbLevel_INTERFACE_DEFINED__\n#define __IPerChannelDbLevel_INTERFACE_DEFINED__\n\n/* interface IPerChannelDbLevel */\n/* [unique][helpstring][nonextensible][uuid][local][object] */ \n\n\nEXTERN_C const IID IID_IPerChannelDbLevel;\n\n#if defined(__cplusplus) && !defined(CINTERFACE)\n    \n    MIDL_INTERFACE(\"C2F8E001-F205-4BC9-99BC-C13B1E048CCB\")\n    IPerChannelDbLevel : public IUnknown\n    {\n    public:\n        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetChannelCount( \n            /* [out] */ \n            __out  UINT *pcChannels) = 0;\n        \n        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetLevelRange( \n            /* [in] */ \n            __in  UINT nChannel,\n            /* [out] */ \n            __out  float *pfMinLevelDB,\n            /* [out] */ \n            __out  float *pfMaxLevelDB,\n            /* [out] */ \n            __out  float *pfStepping) = 0;\n        \n        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetLevel( \n            /* [in] */ \n            __in  UINT nChannel,\n            /* [out] */ \n            __out  float *pfLevelDB) = 0;\n        \n        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE SetLevel( \n            /* [in] */ \n            __in  UINT nChannel,\n            /* [in] */ \n            __in  float fLevelDB,\n            /* [unique][in] */ \n            __in_opt  LPCGUID pguidEventContext) = 0;\n        \n        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE SetLevelUniform( \n            /* [in] */ \n            __in  float fLevelDB,\n            /* [unique][in] */ \n            __in_opt  LPCGUID pguidEventContext) = 0;\n        \n        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE SetLevelAllChannels( \n            /* [size_is][in] */ \n            __in_ecount(cChannels)  float aLevelsDB[  ],\n            /* [in] */ \n            __in  ULONG cChannels,\n            /* [unique][in] */ \n            __in_opt  LPCGUID pguidEventContext) = 0;\n        \n    };\n    \n#else \t/* C style interface */\n\n    typedef struct IPerChannelDbLevelVtbl\n    {\n        BEGIN_INTERFACE\n        \n        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \n            IPerChannelDbLevel * This,\n            /* [in] */ REFIID riid,\n            /* [iid_is][out] */ \n            __RPC__deref_out  void **ppvObject);\n        \n        ULONG ( STDMETHODCALLTYPE *AddRef )( \n            IPerChannelDbLevel * This);\n        \n        ULONG ( STDMETHODCALLTYPE *Release )( \n            IPerChannelDbLevel * This);\n        \n        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetChannelCount )( \n            IPerChannelDbLevel * This,\n            /* [out] */ \n            __out  UINT *pcChannels);\n        \n        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetLevelRange )( \n            IPerChannelDbLevel * This,\n            /* [in] */ \n            __in  UINT nChannel,\n            /* [out] */ \n            __out  float *pfMinLevelDB,\n            /* [out] */ \n            __out  float *pfMaxLevelDB,\n            /* [out] */ \n            __out  float *pfStepping);\n        \n        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetLevel )( \n            IPerChannelDbLevel * This,\n            /* [in] */ \n            __in  UINT nChannel,\n            /* [out] */ \n            __out  float *pfLevelDB);\n        \n        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetLevel )( \n            IPerChannelDbLevel * This,\n            /* [in] */ \n            __in  UINT nChannel,\n            /* [in] */ \n            __in  float fLevelDB,\n            /* [unique][in] */ \n            __in_opt  LPCGUID pguidEventContext);\n        \n        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetLevelUniform )( \n            IPerChannelDbLevel * This,\n            /* [in] */ \n            __in  float fLevelDB,\n            /* [unique][in] */ \n            __in_opt  LPCGUID pguidEventContext);\n        \n        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetLevelAllChannels )( \n            IPerChannelDbLevel * This,\n            /* [size_is][in] */ \n            __in_ecount(cChannels)  float aLevelsDB[  ],\n            /* [in] */ \n            __in  ULONG cChannels,\n            /* [unique][in] */ \n            __in_opt  LPCGUID pguidEventContext);\n        \n        END_INTERFACE\n    } IPerChannelDbLevelVtbl;\n\n    interface IPerChannelDbLevel\n    {\n        CONST_VTBL struct IPerChannelDbLevelVtbl *lpVtbl;\n    };\n\n    \n\n#ifdef COBJMACROS\n\n\n#define IPerChannelDbLevel_QueryInterface(This,riid,ppvObject)\t\\\n    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \n\n#define IPerChannelDbLevel_AddRef(This)\t\\\n    ( (This)->lpVtbl -> AddRef(This) ) \n\n#define IPerChannelDbLevel_Release(This)\t\\\n    ( (This)->lpVtbl -> Release(This) ) \n\n\n#define IPerChannelDbLevel_GetChannelCount(This,pcChannels)\t\\\n    ( (This)->lpVtbl -> GetChannelCount(This,pcChannels) ) \n\n#define IPerChannelDbLevel_GetLevelRange(This,nChannel,pfMinLevelDB,pfMaxLevelDB,pfStepping)\t\\\n    ( (This)->lpVtbl -> GetLevelRange(This,nChannel,pfMinLevelDB,pfMaxLevelDB,pfStepping) ) \n\n#define IPerChannelDbLevel_GetLevel(This,nChannel,pfLevelDB)\t\\\n    ( (This)->lpVtbl -> GetLevel(This,nChannel,pfLevelDB) ) \n\n#define IPerChannelDbLevel_SetLevel(This,nChannel,fLevelDB,pguidEventContext)\t\\\n    ( (This)->lpVtbl -> SetLevel(This,nChannel,fLevelDB,pguidEventContext) ) \n\n#define IPerChannelDbLevel_SetLevelUniform(This,fLevelDB,pguidEventContext)\t\\\n    ( (This)->lpVtbl -> SetLevelUniform(This,fLevelDB,pguidEventContext) ) \n\n#define IPerChannelDbLevel_SetLevelAllChannels(This,aLevelsDB,cChannels,pguidEventContext)\t\\\n    ( (This)->lpVtbl -> SetLevelAllChannels(This,aLevelsDB,cChannels,pguidEventContext) ) \n\n#endif /* COBJMACROS */\n\n\n#endif \t/* C style interface */\n\n\n\n\n#endif \t/* __IPerChannelDbLevel_INTERFACE_DEFINED__ */\n\n\n#ifndef __IAudioVolumeLevel_INTERFACE_DEFINED__\n#define __IAudioVolumeLevel_INTERFACE_DEFINED__\n\n/* interface IAudioVolumeLevel */\n/* [unique][helpstring][nonextensible][uuid][local][object] */ \n\n\nEXTERN_C const IID IID_IAudioVolumeLevel;\n\n#if defined(__cplusplus) && !defined(CINTERFACE)\n    \n    MIDL_INTERFACE(\"7FB7B48F-531D-44A2-BCB3-5AD5A134B3DC\")\n    IAudioVolumeLevel : public IPerChannelDbLevel\n    {\n    public:\n    };\n    \n#else \t/* C style interface */\n\n    typedef struct IAudioVolumeLevelVtbl\n    {\n        BEGIN_INTERFACE\n        \n        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \n            IAudioVolumeLevel * This,\n            /* [in] */ REFIID riid,\n            /* [iid_is][out] */ \n            __RPC__deref_out  void **ppvObject);\n        \n        ULONG ( STDMETHODCALLTYPE *AddRef )( \n            IAudioVolumeLevel * This);\n        \n        ULONG ( STDMETHODCALLTYPE *Release )( \n            IAudioVolumeLevel * This);\n        \n        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetChannelCount )( \n            IAudioVolumeLevel * This,\n            /* [out] */ \n            __out  UINT *pcChannels);\n        \n        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetLevelRange )( \n            IAudioVolumeLevel * This,\n            /* [in] */ \n            __in  UINT nChannel,\n            /* [out] */ \n            __out  float *pfMinLevelDB,\n            /* [out] */ \n            __out  float *pfMaxLevelDB,\n            /* [out] */ \n            __out  float *pfStepping);\n        \n        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetLevel )( \n            IAudioVolumeLevel * This,\n            /* [in] */ \n            __in  UINT nChannel,\n            /* [out] */ \n            __out  float *pfLevelDB);\n        \n        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetLevel )( \n            IAudioVolumeLevel * This,\n            /* [in] */ \n            __in  UINT nChannel,\n            /* [in] */ \n            __in  float fLevelDB,\n            /* [unique][in] */ \n            __in_opt  LPCGUID pguidEventContext);\n        \n        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetLevelUniform )( \n            IAudioVolumeLevel * This,\n            /* [in] */ \n            __in  float fLevelDB,\n            /* [unique][in] */ \n            __in_opt  LPCGUID pguidEventContext);\n        \n        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetLevelAllChannels )( \n            IAudioVolumeLevel * This,\n            /* [size_is][in] */ \n            __in_ecount(cChannels)  float aLevelsDB[  ],\n            /* [in] */ \n            __in  ULONG cChannels,\n            /* [unique][in] */ \n            __in_opt  LPCGUID pguidEventContext);\n        \n        END_INTERFACE\n    } IAudioVolumeLevelVtbl;\n\n    interface IAudioVolumeLevel\n    {\n        CONST_VTBL struct IAudioVolumeLevelVtbl *lpVtbl;\n    };\n\n    \n\n#ifdef COBJMACROS\n\n\n#define IAudioVolumeLevel_QueryInterface(This,riid,ppvObject)\t\\\n    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \n\n#define IAudioVolumeLevel_AddRef(This)\t\\\n    ( (This)->lpVtbl -> AddRef(This) ) \n\n#define IAudioVolumeLevel_Release(This)\t\\\n    ( (This)->lpVtbl -> Release(This) ) \n\n\n#define IAudioVolumeLevel_GetChannelCount(This,pcChannels)\t\\\n    ( (This)->lpVtbl -> GetChannelCount(This,pcChannels) ) \n\n#define IAudioVolumeLevel_GetLevelRange(This,nChannel,pfMinLevelDB,pfMaxLevelDB,pfStepping)\t\\\n    ( (This)->lpVtbl -> GetLevelRange(This,nChannel,pfMinLevelDB,pfMaxLevelDB,pfStepping) ) \n\n#define IAudioVolumeLevel_GetLevel(This,nChannel,pfLevelDB)\t\\\n    ( (This)->lpVtbl -> GetLevel(This,nChannel,pfLevelDB) ) \n\n#define IAudioVolumeLevel_SetLevel(This,nChannel,fLevelDB,pguidEventContext)\t\\\n    ( (This)->lpVtbl -> SetLevel(This,nChannel,fLevelDB,pguidEventContext) ) \n\n#define IAudioVolumeLevel_SetLevelUniform(This,fLevelDB,pguidEventContext)\t\\\n    ( (This)->lpVtbl -> SetLevelUniform(This,fLevelDB,pguidEventContext) ) \n\n#define IAudioVolumeLevel_SetLevelAllChannels(This,aLevelsDB,cChannels,pguidEventContext)\t\\\n    ( (This)->lpVtbl -> SetLevelAllChannels(This,aLevelsDB,cChannels,pguidEventContext) ) \n\n\n#endif /* COBJMACROS */\n\n\n#endif \t/* C style interface */\n\n\n\n\n#endif \t/* __IAudioVolumeLevel_INTERFACE_DEFINED__ */\n\n\n#ifndef __IAudioChannelConfig_INTERFACE_DEFINED__\n#define __IAudioChannelConfig_INTERFACE_DEFINED__\n\n/* interface IAudioChannelConfig */\n/* [unique][helpstring][nonextensible][uuid][local][object] */ \n\n\nEXTERN_C const IID IID_IAudioChannelConfig;\n\n#if defined(__cplusplus) && !defined(CINTERFACE)\n    \n    MIDL_INTERFACE(\"BB11C46F-EC28-493C-B88A-5DB88062CE98\")\n    IAudioChannelConfig : public IUnknown\n    {\n    public:\n        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE SetChannelConfig( \n            /* [in] */ DWORD dwConfig,\n            /* [unique][in] */ \n            __in_opt  LPCGUID pguidEventContext) = 0;\n        \n        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetChannelConfig( \n            /* [retval][out] */ DWORD *pdwConfig) = 0;\n        \n    };\n    \n#else \t/* C style interface */\n\n    typedef struct IAudioChannelConfigVtbl\n    {\n        BEGIN_INTERFACE\n        \n        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \n            IAudioChannelConfig * This,\n            /* [in] */ REFIID riid,\n            /* [iid_is][out] */ \n            __RPC__deref_out  void **ppvObject);\n        \n        ULONG ( STDMETHODCALLTYPE *AddRef )( \n            IAudioChannelConfig * This);\n        \n        ULONG ( STDMETHODCALLTYPE *Release )( \n            IAudioChannelConfig * This);\n        \n        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetChannelConfig )( \n            IAudioChannelConfig * This,\n            /* [in] */ DWORD dwConfig,\n            /* [unique][in] */ \n            __in_opt  LPCGUID pguidEventContext);\n        \n        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetChannelConfig )( \n            IAudioChannelConfig * This,\n            /* [retval][out] */ DWORD *pdwConfig);\n        \n        END_INTERFACE\n    } IAudioChannelConfigVtbl;\n\n    interface IAudioChannelConfig\n    {\n        CONST_VTBL struct IAudioChannelConfigVtbl *lpVtbl;\n    };\n\n    \n\n#ifdef COBJMACROS\n\n\n#define IAudioChannelConfig_QueryInterface(This,riid,ppvObject)\t\\\n    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \n\n#define IAudioChannelConfig_AddRef(This)\t\\\n    ( (This)->lpVtbl -> AddRef(This) ) \n\n#define IAudioChannelConfig_Release(This)\t\\\n    ( (This)->lpVtbl -> Release(This) ) \n\n\n#define IAudioChannelConfig_SetChannelConfig(This,dwConfig,pguidEventContext)\t\\\n    ( (This)->lpVtbl -> SetChannelConfig(This,dwConfig,pguidEventContext) ) \n\n#define IAudioChannelConfig_GetChannelConfig(This,pdwConfig)\t\\\n    ( (This)->lpVtbl -> GetChannelConfig(This,pdwConfig) ) \n\n#endif /* COBJMACROS */\n\n\n#endif \t/* C style interface */\n\n\n\n\n#endif \t/* __IAudioChannelConfig_INTERFACE_DEFINED__ */\n\n\n#ifndef __IAudioLoudness_INTERFACE_DEFINED__\n#define __IAudioLoudness_INTERFACE_DEFINED__\n\n/* interface IAudioLoudness */\n/* [unique][helpstring][nonextensible][uuid][local][object] */ \n\n\nEXTERN_C const IID IID_IAudioLoudness;\n\n#if defined(__cplusplus) && !defined(CINTERFACE)\n    \n    MIDL_INTERFACE(\"7D8B1437-DD53-4350-9C1B-1EE2890BD938\")\n    IAudioLoudness : public IUnknown\n    {\n    public:\n        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetEnabled( \n            /* [out] */ \n            __out  BOOL *pbEnabled) = 0;\n        \n        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE SetEnabled( \n            /* [in] */ \n            __in  BOOL bEnable,\n            /* [unique][in] */ \n            __in_opt  LPCGUID pguidEventContext) = 0;\n        \n    };\n    \n#else \t/* C style interface */\n\n    typedef struct IAudioLoudnessVtbl\n    {\n        BEGIN_INTERFACE\n        \n        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \n            IAudioLoudness * This,\n            /* [in] */ REFIID riid,\n            /* [iid_is][out] */ \n            __RPC__deref_out  void **ppvObject);\n        \n        ULONG ( STDMETHODCALLTYPE *AddRef )( \n            IAudioLoudness * This);\n        \n        ULONG ( STDMETHODCALLTYPE *Release )( \n            IAudioLoudness * This);\n        \n        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetEnabled )( \n            IAudioLoudness * This,\n            /* [out] */ \n            __out  BOOL *pbEnabled);\n        \n        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetEnabled )( \n            IAudioLoudness * This,\n            /* [in] */ \n            __in  BOOL bEnable,\n            /* [unique][in] */ \n            __in_opt  LPCGUID pguidEventContext);\n        \n        END_INTERFACE\n    } IAudioLoudnessVtbl;\n\n    interface IAudioLoudness\n    {\n        CONST_VTBL struct IAudioLoudnessVtbl *lpVtbl;\n    };\n\n    \n\n#ifdef COBJMACROS\n\n\n#define IAudioLoudness_QueryInterface(This,riid,ppvObject)\t\\\n    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \n\n#define IAudioLoudness_AddRef(This)\t\\\n    ( (This)->lpVtbl -> AddRef(This) ) \n\n#define IAudioLoudness_Release(This)\t\\\n    ( (This)->lpVtbl -> Release(This) ) \n\n\n#define IAudioLoudness_GetEnabled(This,pbEnabled)\t\\\n    ( (This)->lpVtbl -> GetEnabled(This,pbEnabled) ) \n\n#define IAudioLoudness_SetEnabled(This,bEnable,pguidEventContext)\t\\\n    ( (This)->lpVtbl -> SetEnabled(This,bEnable,pguidEventContext) ) \n\n#endif /* COBJMACROS */\n\n\n#endif \t/* C style interface */\n\n\n\n\n#endif \t/* __IAudioLoudness_INTERFACE_DEFINED__ */\n\n\n#ifndef __IAudioInputSelector_INTERFACE_DEFINED__\n#define __IAudioInputSelector_INTERFACE_DEFINED__\n\n/* interface IAudioInputSelector */\n/* [unique][helpstring][nonextensible][uuid][local][object] */ \n\n\nEXTERN_C const IID IID_IAudioInputSelector;\n\n#if defined(__cplusplus) && !defined(CINTERFACE)\n    \n    MIDL_INTERFACE(\"4F03DC02-5E6E-4653-8F72-A030C123D598\")\n    IAudioInputSelector : public IUnknown\n    {\n    public:\n        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetSelection( \n            /* [out] */ \n            __out  UINT *pnIdSelected) = 0;\n        \n        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE SetSelection( \n            /* [in] */ \n            __in  UINT nIdSelect,\n            /* [unique][in] */ \n            __in_opt  LPCGUID pguidEventContext) = 0;\n        \n    };\n    \n#else \t/* C style interface */\n\n    typedef struct IAudioInputSelectorVtbl\n    {\n        BEGIN_INTERFACE\n        \n        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \n            IAudioInputSelector * This,\n            /* [in] */ REFIID riid,\n            /* [iid_is][out] */ \n            __RPC__deref_out  void **ppvObject);\n        \n        ULONG ( STDMETHODCALLTYPE *AddRef )( \n            IAudioInputSelector * This);\n        \n        ULONG ( STDMETHODCALLTYPE *Release )( \n            IAudioInputSelector * This);\n        \n        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetSelection )( \n            IAudioInputSelector * This,\n            /* [out] */ \n            __out  UINT *pnIdSelected);\n        \n        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetSelection )( \n            IAudioInputSelector * This,\n            /* [in] */ \n            __in  UINT nIdSelect,\n            /* [unique][in] */ \n            __in_opt  LPCGUID pguidEventContext);\n        \n        END_INTERFACE\n    } IAudioInputSelectorVtbl;\n\n    interface IAudioInputSelector\n    {\n        CONST_VTBL struct IAudioInputSelectorVtbl *lpVtbl;\n    };\n\n    \n\n#ifdef COBJMACROS\n\n\n#define IAudioInputSelector_QueryInterface(This,riid,ppvObject)\t\\\n    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \n\n#define IAudioInputSelector_AddRef(This)\t\\\n    ( (This)->lpVtbl -> AddRef(This) ) \n\n#define IAudioInputSelector_Release(This)\t\\\n    ( (This)->lpVtbl -> Release(This) ) \n\n\n#define IAudioInputSelector_GetSelection(This,pnIdSelected)\t\\\n    ( (This)->lpVtbl -> GetSelection(This,pnIdSelected) ) \n\n#define IAudioInputSelector_SetSelection(This,nIdSelect,pguidEventContext)\t\\\n    ( (This)->lpVtbl -> SetSelection(This,nIdSelect,pguidEventContext) ) \n\n#endif /* COBJMACROS */\n\n\n#endif \t/* C style interface */\n\n\n\n\n#endif \t/* __IAudioInputSelector_INTERFACE_DEFINED__ */\n\n\n#ifndef __IAudioOutputSelector_INTERFACE_DEFINED__\n#define __IAudioOutputSelector_INTERFACE_DEFINED__\n\n/* interface IAudioOutputSelector */\n/* [unique][helpstring][nonextensible][uuid][local][object] */ \n\n\nEXTERN_C const IID IID_IAudioOutputSelector;\n\n#if defined(__cplusplus) && !defined(CINTERFACE)\n    \n    MIDL_INTERFACE(\"BB515F69-94A7-429e-8B9C-271B3F11A3AB\")\n    IAudioOutputSelector : public IUnknown\n    {\n    public:\n        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetSelection( \n            /* [out] */ \n            __out  UINT *pnIdSelected) = 0;\n        \n        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE SetSelection( \n            /* [in] */ \n            __in  UINT nIdSelect,\n            /* [unique][in] */ \n            __in_opt  LPCGUID pguidEventContext) = 0;\n        \n    };\n    \n#else \t/* C style interface */\n\n    typedef struct IAudioOutputSelectorVtbl\n    {\n        BEGIN_INTERFACE\n        \n        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \n            IAudioOutputSelector * This,\n            /* [in] */ REFIID riid,\n            /* [iid_is][out] */ \n            __RPC__deref_out  void **ppvObject);\n        \n        ULONG ( STDMETHODCALLTYPE *AddRef )( \n            IAudioOutputSelector * This);\n        \n        ULONG ( STDMETHODCALLTYPE *Release )( \n            IAudioOutputSelector * This);\n        \n        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetSelection )( \n            IAudioOutputSelector * This,\n            /* [out] */ \n            __out  UINT *pnIdSelected);\n        \n        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetSelection )( \n            IAudioOutputSelector * This,\n            /* [in] */ \n            __in  UINT nIdSelect,\n            /* [unique][in] */ \n            __in_opt  LPCGUID pguidEventContext);\n        \n        END_INTERFACE\n    } IAudioOutputSelectorVtbl;\n\n    interface IAudioOutputSelector\n    {\n        CONST_VTBL struct IAudioOutputSelectorVtbl *lpVtbl;\n    };\n\n    \n\n#ifdef COBJMACROS\n\n\n#define IAudioOutputSelector_QueryInterface(This,riid,ppvObject)\t\\\n    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \n\n#define IAudioOutputSelector_AddRef(This)\t\\\n    ( (This)->lpVtbl -> AddRef(This) ) \n\n#define IAudioOutputSelector_Release(This)\t\\\n    ( (This)->lpVtbl -> Release(This) ) \n\n\n#define IAudioOutputSelector_GetSelection(This,pnIdSelected)\t\\\n    ( (This)->lpVtbl -> GetSelection(This,pnIdSelected) ) \n\n#define IAudioOutputSelector_SetSelection(This,nIdSelect,pguidEventContext)\t\\\n    ( (This)->lpVtbl -> SetSelection(This,nIdSelect,pguidEventContext) ) \n\n#endif /* COBJMACROS */\n\n\n#endif \t/* C style interface */\n\n\n\n\n#endif \t/* __IAudioOutputSelector_INTERFACE_DEFINED__ */\n\n\n#ifndef __IAudioMute_INTERFACE_DEFINED__\n#define __IAudioMute_INTERFACE_DEFINED__\n\n/* interface IAudioMute */\n/* [unique][helpstring][nonextensible][uuid][local][object] */ \n\n\nEXTERN_C const IID IID_IAudioMute;\n\n#if defined(__cplusplus) && !defined(CINTERFACE)\n    \n    MIDL_INTERFACE(\"DF45AEEA-B74A-4B6B-AFAD-2366B6AA012E\")\n    IAudioMute : public IUnknown\n    {\n    public:\n        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE SetMute( \n            /* [in] */ \n            __in  BOOL bMuted,\n            /* [unique][in] */ \n            __in_opt  LPCGUID pguidEventContext) = 0;\n        \n        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetMute( \n            /* [out] */ \n            __out  BOOL *pbMuted) = 0;\n        \n    };\n    \n#else \t/* C style interface */\n\n    typedef struct IAudioMuteVtbl\n    {\n        BEGIN_INTERFACE\n        \n        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \n            IAudioMute * This,\n            /* [in] */ REFIID riid,\n            /* [iid_is][out] */ \n            __RPC__deref_out  void **ppvObject);\n        \n        ULONG ( STDMETHODCALLTYPE *AddRef )( \n            IAudioMute * This);\n        \n        ULONG ( STDMETHODCALLTYPE *Release )( \n            IAudioMute * This);\n        \n        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetMute )( \n            IAudioMute * This,\n            /* [in] */ \n            __in  BOOL bMuted,\n            /* [unique][in] */ \n            __in_opt  LPCGUID pguidEventContext);\n        \n        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetMute )( \n            IAudioMute * This,\n            /* [out] */ \n            __out  BOOL *pbMuted);\n        \n        END_INTERFACE\n    } IAudioMuteVtbl;\n\n    interface IAudioMute\n    {\n        CONST_VTBL struct IAudioMuteVtbl *lpVtbl;\n    };\n\n    \n\n#ifdef COBJMACROS\n\n\n#define IAudioMute_QueryInterface(This,riid,ppvObject)\t\\\n    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \n\n#define IAudioMute_AddRef(This)\t\\\n    ( (This)->lpVtbl -> AddRef(This) ) \n\n#define IAudioMute_Release(This)\t\\\n    ( (This)->lpVtbl -> Release(This) ) \n\n\n#define IAudioMute_SetMute(This,bMuted,pguidEventContext)\t\\\n    ( (This)->lpVtbl -> SetMute(This,bMuted,pguidEventContext) ) \n\n#define IAudioMute_GetMute(This,pbMuted)\t\\\n    ( (This)->lpVtbl -> GetMute(This,pbMuted) ) \n\n#endif /* COBJMACROS */\n\n\n#endif \t/* C style interface */\n\n\n\n\n#endif \t/* __IAudioMute_INTERFACE_DEFINED__ */\n\n\n#ifndef __IAudioBass_INTERFACE_DEFINED__\n#define __IAudioBass_INTERFACE_DEFINED__\n\n/* interface IAudioBass */\n/* [unique][helpstring][nonextensible][uuid][local][object] */ \n\n\nEXTERN_C const IID IID_IAudioBass;\n\n#if defined(__cplusplus) && !defined(CINTERFACE)\n    \n    MIDL_INTERFACE(\"A2B1A1D9-4DB3-425D-A2B2-BD335CB3E2E5\")\n    IAudioBass : public IPerChannelDbLevel\n    {\n    public:\n    };\n    \n#else \t/* C style interface */\n\n    typedef struct IAudioBassVtbl\n    {\n        BEGIN_INTERFACE\n        \n        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \n            IAudioBass * This,\n            /* [in] */ REFIID riid,\n            /* [iid_is][out] */ \n            __RPC__deref_out  void **ppvObject);\n        \n        ULONG ( STDMETHODCALLTYPE *AddRef )( \n            IAudioBass * This);\n        \n        ULONG ( STDMETHODCALLTYPE *Release )( \n            IAudioBass * This);\n        \n        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetChannelCount )( \n            IAudioBass * This,\n            /* [out] */ \n            __out  UINT *pcChannels);\n        \n        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetLevelRange )( \n            IAudioBass * This,\n            /* [in] */ \n            __in  UINT nChannel,\n            /* [out] */ \n            __out  float *pfMinLevelDB,\n            /* [out] */ \n            __out  float *pfMaxLevelDB,\n            /* [out] */ \n            __out  float *pfStepping);\n        \n        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetLevel )( \n            IAudioBass * This,\n            /* [in] */ \n            __in  UINT nChannel,\n            /* [out] */ \n            __out  float *pfLevelDB);\n        \n        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetLevel )( \n            IAudioBass * This,\n            /* [in] */ \n            __in  UINT nChannel,\n            /* [in] */ \n            __in  float fLevelDB,\n            /* [unique][in] */ \n            __in_opt  LPCGUID pguidEventContext);\n        \n        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetLevelUniform )( \n            IAudioBass * This,\n            /* [in] */ \n            __in  float fLevelDB,\n            /* [unique][in] */ \n            __in_opt  LPCGUID pguidEventContext);\n        \n        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetLevelAllChannels )( \n            IAudioBass * This,\n            /* [size_is][in] */ \n            __in_ecount(cChannels)  float aLevelsDB[  ],\n            /* [in] */ \n            __in  ULONG cChannels,\n            /* [unique][in] */ \n            __in_opt  LPCGUID pguidEventContext);\n        \n        END_INTERFACE\n    } IAudioBassVtbl;\n\n    interface IAudioBass\n    {\n        CONST_VTBL struct IAudioBassVtbl *lpVtbl;\n    };\n\n    \n\n#ifdef COBJMACROS\n\n\n#define IAudioBass_QueryInterface(This,riid,ppvObject)\t\\\n    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \n\n#define IAudioBass_AddRef(This)\t\\\n    ( (This)->lpVtbl -> AddRef(This) ) \n\n#define IAudioBass_Release(This)\t\\\n    ( (This)->lpVtbl -> Release(This) ) \n\n\n#define IAudioBass_GetChannelCount(This,pcChannels)\t\\\n    ( (This)->lpVtbl -> GetChannelCount(This,pcChannels) ) \n\n#define IAudioBass_GetLevelRange(This,nChannel,pfMinLevelDB,pfMaxLevelDB,pfStepping)\t\\\n    ( (This)->lpVtbl -> GetLevelRange(This,nChannel,pfMinLevelDB,pfMaxLevelDB,pfStepping) ) \n\n#define IAudioBass_GetLevel(This,nChannel,pfLevelDB)\t\\\n    ( (This)->lpVtbl -> GetLevel(This,nChannel,pfLevelDB) ) \n\n#define IAudioBass_SetLevel(This,nChannel,fLevelDB,pguidEventContext)\t\\\n    ( (This)->lpVtbl -> SetLevel(This,nChannel,fLevelDB,pguidEventContext) ) \n\n#define IAudioBass_SetLevelUniform(This,fLevelDB,pguidEventContext)\t\\\n    ( (This)->lpVtbl -> SetLevelUniform(This,fLevelDB,pguidEventContext) ) \n\n#define IAudioBass_SetLevelAllChannels(This,aLevelsDB,cChannels,pguidEventContext)\t\\\n    ( (This)->lpVtbl -> SetLevelAllChannels(This,aLevelsDB,cChannels,pguidEventContext) ) \n\n\n#endif /* COBJMACROS */\n\n\n#endif \t/* C style interface */\n\n\n\n\n#endif \t/* __IAudioBass_INTERFACE_DEFINED__ */\n\n\n#ifndef __IAudioMidrange_INTERFACE_DEFINED__\n#define __IAudioMidrange_INTERFACE_DEFINED__\n\n/* interface IAudioMidrange */\n/* [unique][helpstring][nonextensible][uuid][local][object] */ \n\n\nEXTERN_C const IID IID_IAudioMidrange;\n\n#if defined(__cplusplus) && !defined(CINTERFACE)\n    \n    MIDL_INTERFACE(\"5E54B6D7-B44B-40D9-9A9E-E691D9CE6EDF\")\n    IAudioMidrange : public IPerChannelDbLevel\n    {\n    public:\n    };\n    \n#else \t/* C style interface */\n\n    typedef struct IAudioMidrangeVtbl\n    {\n        BEGIN_INTERFACE\n        \n        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \n            IAudioMidrange * This,\n            /* [in] */ REFIID riid,\n            /* [iid_is][out] */ \n            __RPC__deref_out  void **ppvObject);\n        \n        ULONG ( STDMETHODCALLTYPE *AddRef )( \n            IAudioMidrange * This);\n        \n        ULONG ( STDMETHODCALLTYPE *Release )( \n            IAudioMidrange * This);\n        \n        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetChannelCount )( \n            IAudioMidrange * This,\n            /* [out] */ \n            __out  UINT *pcChannels);\n        \n        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetLevelRange )( \n            IAudioMidrange * This,\n            /* [in] */ \n            __in  UINT nChannel,\n            /* [out] */ \n            __out  float *pfMinLevelDB,\n            /* [out] */ \n            __out  float *pfMaxLevelDB,\n            /* [out] */ \n            __out  float *pfStepping);\n        \n        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetLevel )( \n            IAudioMidrange * This,\n            /* [in] */ \n            __in  UINT nChannel,\n            /* [out] */ \n            __out  float *pfLevelDB);\n        \n        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetLevel )( \n            IAudioMidrange * This,\n            /* [in] */ \n            __in  UINT nChannel,\n            /* [in] */ \n            __in  float fLevelDB,\n            /* [unique][in] */ \n            __in_opt  LPCGUID pguidEventContext);\n        \n        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetLevelUniform )( \n            IAudioMidrange * This,\n            /* [in] */ \n            __in  float fLevelDB,\n            /* [unique][in] */ \n            __in_opt  LPCGUID pguidEventContext);\n        \n        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetLevelAllChannels )( \n            IAudioMidrange * This,\n            /* [size_is][in] */ \n            __in_ecount(cChannels)  float aLevelsDB[  ],\n            /* [in] */ \n            __in  ULONG cChannels,\n            /* [unique][in] */ \n            __in_opt  LPCGUID pguidEventContext);\n        \n        END_INTERFACE\n    } IAudioMidrangeVtbl;\n\n    interface IAudioMidrange\n    {\n        CONST_VTBL struct IAudioMidrangeVtbl *lpVtbl;\n    };\n\n    \n\n#ifdef COBJMACROS\n\n\n#define IAudioMidrange_QueryInterface(This,riid,ppvObject)\t\\\n    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \n\n#define IAudioMidrange_AddRef(This)\t\\\n    ( (This)->lpVtbl -> AddRef(This) ) \n\n#define IAudioMidrange_Release(This)\t\\\n    ( (This)->lpVtbl -> Release(This) ) \n\n\n#define IAudioMidrange_GetChannelCount(This,pcChannels)\t\\\n    ( (This)->lpVtbl -> GetChannelCount(This,pcChannels) ) \n\n#define IAudioMidrange_GetLevelRange(This,nChannel,pfMinLevelDB,pfMaxLevelDB,pfStepping)\t\\\n    ( (This)->lpVtbl -> GetLevelRange(This,nChannel,pfMinLevelDB,pfMaxLevelDB,pfStepping) ) \n\n#define IAudioMidrange_GetLevel(This,nChannel,pfLevelDB)\t\\\n    ( (This)->lpVtbl -> GetLevel(This,nChannel,pfLevelDB) ) \n\n#define IAudioMidrange_SetLevel(This,nChannel,fLevelDB,pguidEventContext)\t\\\n    ( (This)->lpVtbl -> SetLevel(This,nChannel,fLevelDB,pguidEventContext) ) \n\n#define IAudioMidrange_SetLevelUniform(This,fLevelDB,pguidEventContext)\t\\\n    ( (This)->lpVtbl -> SetLevelUniform(This,fLevelDB,pguidEventContext) ) \n\n#define IAudioMidrange_SetLevelAllChannels(This,aLevelsDB,cChannels,pguidEventContext)\t\\\n    ( (This)->lpVtbl -> SetLevelAllChannels(This,aLevelsDB,cChannels,pguidEventContext) ) \n\n\n#endif /* COBJMACROS */\n\n\n#endif \t/* C style interface */\n\n\n\n\n#endif \t/* __IAudioMidrange_INTERFACE_DEFINED__ */\n\n\n#ifndef __IAudioTreble_INTERFACE_DEFINED__\n#define __IAudioTreble_INTERFACE_DEFINED__\n\n/* interface IAudioTreble */\n/* [unique][helpstring][nonextensible][uuid][local][object] */ \n\n\nEXTERN_C const IID IID_IAudioTreble;\n\n#if defined(__cplusplus) && !defined(CINTERFACE)\n    \n    MIDL_INTERFACE(\"0A717812-694E-4907-B74B-BAFA5CFDCA7B\")\n    IAudioTreble : public IPerChannelDbLevel\n    {\n    public:\n    };\n    \n#else \t/* C style interface */\n\n    typedef struct IAudioTrebleVtbl\n    {\n        BEGIN_INTERFACE\n        \n        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \n            IAudioTreble * This,\n            /* [in] */ REFIID riid,\n            /* [iid_is][out] */ \n            __RPC__deref_out  void **ppvObject);\n        \n        ULONG ( STDMETHODCALLTYPE *AddRef )( \n            IAudioTreble * This);\n        \n        ULONG ( STDMETHODCALLTYPE *Release )( \n            IAudioTreble * This);\n        \n        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetChannelCount )( \n            IAudioTreble * This,\n            /* [out] */ \n            __out  UINT *pcChannels);\n        \n        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetLevelRange )( \n            IAudioTreble * This,\n            /* [in] */ \n            __in  UINT nChannel,\n            /* [out] */ \n            __out  float *pfMinLevelDB,\n            /* [out] */ \n            __out  float *pfMaxLevelDB,\n            /* [out] */ \n            __out  float *pfStepping);\n        \n        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetLevel )( \n            IAudioTreble * This,\n            /* [in] */ \n            __in  UINT nChannel,\n            /* [out] */ \n            __out  float *pfLevelDB);\n        \n        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetLevel )( \n            IAudioTreble * This,\n            /* [in] */ \n            __in  UINT nChannel,\n            /* [in] */ \n            __in  float fLevelDB,\n            /* [unique][in] */ \n            __in_opt  LPCGUID pguidEventContext);\n        \n        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetLevelUniform )( \n            IAudioTreble * This,\n            /* [in] */ \n            __in  float fLevelDB,\n            /* [unique][in] */ \n            __in_opt  LPCGUID pguidEventContext);\n        \n        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetLevelAllChannels )( \n            IAudioTreble * This,\n            /* [size_is][in] */ \n            __in_ecount(cChannels)  float aLevelsDB[  ],\n            /* [in] */ \n            __in  ULONG cChannels,\n            /* [unique][in] */ \n            __in_opt  LPCGUID pguidEventContext);\n        \n        END_INTERFACE\n    } IAudioTrebleVtbl;\n\n    interface IAudioTreble\n    {\n        CONST_VTBL struct IAudioTrebleVtbl *lpVtbl;\n    };\n\n    \n\n#ifdef COBJMACROS\n\n\n#define IAudioTreble_QueryInterface(This,riid,ppvObject)\t\\\n    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \n\n#define IAudioTreble_AddRef(This)\t\\\n    ( (This)->lpVtbl -> AddRef(This) ) \n\n#define IAudioTreble_Release(This)\t\\\n    ( (This)->lpVtbl -> Release(This) ) \n\n\n#define IAudioTreble_GetChannelCount(This,pcChannels)\t\\\n    ( (This)->lpVtbl -> GetChannelCount(This,pcChannels) ) \n\n#define IAudioTreble_GetLevelRange(This,nChannel,pfMinLevelDB,pfMaxLevelDB,pfStepping)\t\\\n    ( (This)->lpVtbl -> GetLevelRange(This,nChannel,pfMinLevelDB,pfMaxLevelDB,pfStepping) ) \n\n#define IAudioTreble_GetLevel(This,nChannel,pfLevelDB)\t\\\n    ( (This)->lpVtbl -> GetLevel(This,nChannel,pfLevelDB) ) \n\n#define IAudioTreble_SetLevel(This,nChannel,fLevelDB,pguidEventContext)\t\\\n    ( (This)->lpVtbl -> SetLevel(This,nChannel,fLevelDB,pguidEventContext) ) \n\n#define IAudioTreble_SetLevelUniform(This,fLevelDB,pguidEventContext)\t\\\n    ( (This)->lpVtbl -> SetLevelUniform(This,fLevelDB,pguidEventContext) ) \n\n#define IAudioTreble_SetLevelAllChannels(This,aLevelsDB,cChannels,pguidEventContext)\t\\\n    ( (This)->lpVtbl -> SetLevelAllChannels(This,aLevelsDB,cChannels,pguidEventContext) ) \n\n\n#endif /* COBJMACROS */\n\n\n#endif \t/* C style interface */\n\n\n\n\n#endif \t/* __IAudioTreble_INTERFACE_DEFINED__ */\n\n\n#ifndef __IAudioAutoGainControl_INTERFACE_DEFINED__\n#define __IAudioAutoGainControl_INTERFACE_DEFINED__\n\n/* interface IAudioAutoGainControl */\n/* [unique][helpstring][nonextensible][uuid][local][object] */ \n\n\nEXTERN_C const IID IID_IAudioAutoGainControl;\n\n#if defined(__cplusplus) && !defined(CINTERFACE)\n    \n    MIDL_INTERFACE(\"85401FD4-6DE4-4b9d-9869-2D6753A82F3C\")\n    IAudioAutoGainControl : public IUnknown\n    {\n    public:\n        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetEnabled( \n            /* [out] */ \n            __out  BOOL *pbEnabled) = 0;\n        \n        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE SetEnabled( \n            /* [in] */ \n            __in  BOOL bEnable,\n            /* [unique][in] */ \n            __in_opt  LPCGUID pguidEventContext) = 0;\n        \n    };\n    \n#else \t/* C style interface */\n\n    typedef struct IAudioAutoGainControlVtbl\n    {\n        BEGIN_INTERFACE\n        \n        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \n            IAudioAutoGainControl * This,\n            /* [in] */ REFIID riid,\n            /* [iid_is][out] */ \n            __RPC__deref_out  void **ppvObject);\n        \n        ULONG ( STDMETHODCALLTYPE *AddRef )( \n            IAudioAutoGainControl * This);\n        \n        ULONG ( STDMETHODCALLTYPE *Release )( \n            IAudioAutoGainControl * This);\n        \n        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetEnabled )( \n            IAudioAutoGainControl * This,\n            /* [out] */ \n            __out  BOOL *pbEnabled);\n        \n        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetEnabled )( \n            IAudioAutoGainControl * This,\n            /* [in] */ \n            __in  BOOL bEnable,\n            /* [unique][in] */ \n            __in_opt  LPCGUID pguidEventContext);\n        \n        END_INTERFACE\n    } IAudioAutoGainControlVtbl;\n\n    interface IAudioAutoGainControl\n    {\n        CONST_VTBL struct IAudioAutoGainControlVtbl *lpVtbl;\n    };\n\n    \n\n#ifdef COBJMACROS\n\n\n#define IAudioAutoGainControl_QueryInterface(This,riid,ppvObject)\t\\\n    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \n\n#define IAudioAutoGainControl_AddRef(This)\t\\\n    ( (This)->lpVtbl -> AddRef(This) ) \n\n#define IAudioAutoGainControl_Release(This)\t\\\n    ( (This)->lpVtbl -> Release(This) ) \n\n\n#define IAudioAutoGainControl_GetEnabled(This,pbEnabled)\t\\\n    ( (This)->lpVtbl -> GetEnabled(This,pbEnabled) ) \n\n#define IAudioAutoGainControl_SetEnabled(This,bEnable,pguidEventContext)\t\\\n    ( (This)->lpVtbl -> SetEnabled(This,bEnable,pguidEventContext) ) \n\n#endif /* COBJMACROS */\n\n\n#endif \t/* C style interface */\n\n\n\n\n#endif \t/* __IAudioAutoGainControl_INTERFACE_DEFINED__ */\n\n\n#ifndef __IAudioPeakMeter_INTERFACE_DEFINED__\n#define __IAudioPeakMeter_INTERFACE_DEFINED__\n\n/* interface IAudioPeakMeter */\n/* [unique][helpstring][nonextensible][uuid][local][object] */ \n\n\nEXTERN_C const IID IID_IAudioPeakMeter;\n\n#if defined(__cplusplus) && !defined(CINTERFACE)\n    \n    MIDL_INTERFACE(\"DD79923C-0599-45e0-B8B6-C8DF7DB6E796\")\n    IAudioPeakMeter : public IUnknown\n    {\n    public:\n        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetChannelCount( \n            /* [out] */ \n            __out  UINT *pcChannels) = 0;\n        \n        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetLevel( \n            /* [in] */ \n            __in  UINT nChannel,\n            /* [out] */ \n            __out  float *pfLevel) = 0;\n        \n    };\n    \n#else \t/* C style interface */\n\n    typedef struct IAudioPeakMeterVtbl\n    {\n        BEGIN_INTERFACE\n        \n        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \n            IAudioPeakMeter * This,\n            /* [in] */ REFIID riid,\n            /* [iid_is][out] */ \n            __RPC__deref_out  void **ppvObject);\n        \n        ULONG ( STDMETHODCALLTYPE *AddRef )( \n            IAudioPeakMeter * This);\n        \n        ULONG ( STDMETHODCALLTYPE *Release )( \n            IAudioPeakMeter * This);\n        \n        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetChannelCount )( \n            IAudioPeakMeter * This,\n            /* [out] */ \n            __out  UINT *pcChannels);\n        \n        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetLevel )( \n            IAudioPeakMeter * This,\n            /* [in] */ \n            __in  UINT nChannel,\n            /* [out] */ \n            __out  float *pfLevel);\n        \n        END_INTERFACE\n    } IAudioPeakMeterVtbl;\n\n    interface IAudioPeakMeter\n    {\n        CONST_VTBL struct IAudioPeakMeterVtbl *lpVtbl;\n    };\n\n    \n\n#ifdef COBJMACROS\n\n\n#define IAudioPeakMeter_QueryInterface(This,riid,ppvObject)\t\\\n    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \n\n#define IAudioPeakMeter_AddRef(This)\t\\\n    ( (This)->lpVtbl -> AddRef(This) ) \n\n#define IAudioPeakMeter_Release(This)\t\\\n    ( (This)->lpVtbl -> Release(This) ) \n\n\n#define IAudioPeakMeter_GetChannelCount(This,pcChannels)\t\\\n    ( (This)->lpVtbl -> GetChannelCount(This,pcChannels) ) \n\n#define IAudioPeakMeter_GetLevel(This,nChannel,pfLevel)\t\\\n    ( (This)->lpVtbl -> GetLevel(This,nChannel,pfLevel) ) \n\n#endif /* COBJMACROS */\n\n\n#endif \t/* C style interface */\n\n\n\n\n#endif \t/* __IAudioPeakMeter_INTERFACE_DEFINED__ */\n\n\n#ifndef __IDeviceSpecificProperty_INTERFACE_DEFINED__\n#define __IDeviceSpecificProperty_INTERFACE_DEFINED__\n\n/* interface IDeviceSpecificProperty */\n/* [unique][helpstring][nonextensible][uuid][local][object] */ \n\n\nEXTERN_C const IID IID_IDeviceSpecificProperty;\n\n#if defined(__cplusplus) && !defined(CINTERFACE)\n    \n    MIDL_INTERFACE(\"3B22BCBF-2586-4af0-8583-205D391B807C\")\n    IDeviceSpecificProperty : public IUnknown\n    {\n    public:\n        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetType( \n            /* [out] */ \n            __deref_out  VARTYPE *pVType) = 0;\n        \n        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetValue( \n            /* [out] */ \n            __out  void *pvValue,\n            /* [out][in] */ \n            __inout  DWORD *pcbValue) = 0;\n        \n        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE SetValue( \n            /* [in] */ \n            __in  void *pvValue,\n            /* [in] */ DWORD cbValue,\n            /* [unique][in] */ \n            __in_opt  LPCGUID pguidEventContext) = 0;\n        \n        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE Get4BRange( \n            /* [out] */ \n            __deref_out  LONG *plMin,\n            /* [out] */ \n            __deref_out  LONG *plMax,\n            /* [out] */ \n            __deref_out  LONG *plStepping) = 0;\n        \n    };\n    \n#else \t/* C style interface */\n\n    typedef struct IDeviceSpecificPropertyVtbl\n    {\n        BEGIN_INTERFACE\n        \n        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \n            IDeviceSpecificProperty * This,\n            /* [in] */ REFIID riid,\n            /* [iid_is][out] */ \n            __RPC__deref_out  void **ppvObject);\n        \n        ULONG ( STDMETHODCALLTYPE *AddRef )( \n            IDeviceSpecificProperty * This);\n        \n        ULONG ( STDMETHODCALLTYPE *Release )( \n            IDeviceSpecificProperty * This);\n        \n        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetType )( \n            IDeviceSpecificProperty * This,\n            /* [out] */ \n            __deref_out  VARTYPE *pVType);\n        \n        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetValue )( \n            IDeviceSpecificProperty * This,\n            /* [out] */ \n            __out  void *pvValue,\n            /* [out][in] */ \n            __inout  DWORD *pcbValue);\n        \n        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetValue )( \n            IDeviceSpecificProperty * This,\n            /* [in] */ \n            __in  void *pvValue,\n            /* [in] */ DWORD cbValue,\n            /* [unique][in] */ \n            __in_opt  LPCGUID pguidEventContext);\n        \n        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *Get4BRange )( \n            IDeviceSpecificProperty * This,\n            /* [out] */ \n            __deref_out  LONG *plMin,\n            /* [out] */ \n            __deref_out  LONG *plMax,\n            /* [out] */ \n            __deref_out  LONG *plStepping);\n        \n        END_INTERFACE\n    } IDeviceSpecificPropertyVtbl;\n\n    interface IDeviceSpecificProperty\n    {\n        CONST_VTBL struct IDeviceSpecificPropertyVtbl *lpVtbl;\n    };\n\n    \n\n#ifdef COBJMACROS\n\n\n#define IDeviceSpecificProperty_QueryInterface(This,riid,ppvObject)\t\\\n    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \n\n#define IDeviceSpecificProperty_AddRef(This)\t\\\n    ( (This)->lpVtbl -> AddRef(This) ) \n\n#define IDeviceSpecificProperty_Release(This)\t\\\n    ( (This)->lpVtbl -> Release(This) ) \n\n\n#define IDeviceSpecificProperty_GetType(This,pVType)\t\\\n    ( (This)->lpVtbl -> GetType(This,pVType) ) \n\n#define IDeviceSpecificProperty_GetValue(This,pvValue,pcbValue)\t\\\n    ( (This)->lpVtbl -> GetValue(This,pvValue,pcbValue) ) \n\n#define IDeviceSpecificProperty_SetValue(This,pvValue,cbValue,pguidEventContext)\t\\\n    ( (This)->lpVtbl -> SetValue(This,pvValue,cbValue,pguidEventContext) ) \n\n#define IDeviceSpecificProperty_Get4BRange(This,plMin,plMax,plStepping)\t\\\n    ( (This)->lpVtbl -> Get4BRange(This,plMin,plMax,plStepping) ) \n\n#endif /* COBJMACROS */\n\n\n#endif \t/* C style interface */\n\n\n\n\n#endif \t/* __IDeviceSpecificProperty_INTERFACE_DEFINED__ */\n\n\n#ifndef __IKsFormatSupport_INTERFACE_DEFINED__\n#define __IKsFormatSupport_INTERFACE_DEFINED__\n\n/* interface IKsFormatSupport */\n/* [unique][helpstring][nonextensible][uuid][local][object] */ \n\n\nEXTERN_C const IID IID_IKsFormatSupport;\n\n#if defined(__cplusplus) && !defined(CINTERFACE)\n    \n    MIDL_INTERFACE(\"3CB4A69D-BB6F-4D2B-95B7-452D2C155DB5\")\n    IKsFormatSupport : public IUnknown\n    {\n    public:\n        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE IsFormatSupported( \n            /* [size_is][in] */ PKSDATAFORMAT pKsFormat,\n            /* [in] */ \n            __in  DWORD cbFormat,\n            /* [out] */ \n            __out  BOOL *pbSupported) = 0;\n        \n        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetDevicePreferredFormat( \n            /* [out] */ PKSDATAFORMAT *ppKsFormat) = 0;\n        \n    };\n    \n#else \t/* C style interface */\n\n    typedef struct IKsFormatSupportVtbl\n    {\n        BEGIN_INTERFACE\n        \n        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \n            IKsFormatSupport * This,\n            /* [in] */ REFIID riid,\n            /* [iid_is][out] */ \n            __RPC__deref_out  void **ppvObject);\n        \n        ULONG ( STDMETHODCALLTYPE *AddRef )( \n            IKsFormatSupport * This);\n        \n        ULONG ( STDMETHODCALLTYPE *Release )( \n            IKsFormatSupport * This);\n        \n        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *IsFormatSupported )( \n            IKsFormatSupport * This,\n            /* [size_is][in] */ PKSDATAFORMAT pKsFormat,\n            /* [in] */ \n            __in  DWORD cbFormat,\n            /* [out] */ \n            __out  BOOL *pbSupported);\n        \n        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetDevicePreferredFormat )( \n            IKsFormatSupport * This,\n            /* [out] */ PKSDATAFORMAT *ppKsFormat);\n        \n        END_INTERFACE\n    } IKsFormatSupportVtbl;\n\n    interface IKsFormatSupport\n    {\n        CONST_VTBL struct IKsFormatSupportVtbl *lpVtbl;\n    };\n\n    \n\n#ifdef COBJMACROS\n\n\n#define IKsFormatSupport_QueryInterface(This,riid,ppvObject)\t\\\n    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \n\n#define IKsFormatSupport_AddRef(This)\t\\\n    ( (This)->lpVtbl -> AddRef(This) ) \n\n#define IKsFormatSupport_Release(This)\t\\\n    ( (This)->lpVtbl -> Release(This) ) \n\n\n#define IKsFormatSupport_IsFormatSupported(This,pKsFormat,cbFormat,pbSupported)\t\\\n    ( (This)->lpVtbl -> IsFormatSupported(This,pKsFormat,cbFormat,pbSupported) ) \n\n#define IKsFormatSupport_GetDevicePreferredFormat(This,ppKsFormat)\t\\\n    ( (This)->lpVtbl -> GetDevicePreferredFormat(This,ppKsFormat) ) \n\n#endif /* COBJMACROS */\n\n\n#endif \t/* C style interface */\n\n\n\n\n#endif \t/* __IKsFormatSupport_INTERFACE_DEFINED__ */\n\n\n#ifndef __IKsJackDescription_INTERFACE_DEFINED__\n#define __IKsJackDescription_INTERFACE_DEFINED__\n\n/* interface IKsJackDescription */\n/* [unique][helpstring][nonextensible][uuid][local][object] */ \n\n\nEXTERN_C const IID IID_IKsJackDescription;\n\n#if defined(__cplusplus) && !defined(CINTERFACE)\n    \n    MIDL_INTERFACE(\"4509F757-2D46-4637-8E62-CE7DB944F57B\")\n    IKsJackDescription : public IUnknown\n    {\n    public:\n        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetJackCount( \n            /* [out] */ \n            __out  UINT *pcJacks) = 0;\n        \n        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetJackDescription( \n            /* [in] */ UINT nJack,\n            /* [out] */ \n            __out  KSJACK_DESCRIPTION *pDescription) = 0;\n        \n    };\n    \n#else \t/* C style interface */\n\n    typedef struct IKsJackDescriptionVtbl\n    {\n        BEGIN_INTERFACE\n        \n        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \n            IKsJackDescription * This,\n            /* [in] */ REFIID riid,\n            /* [iid_is][out] */ \n            __RPC__deref_out  void **ppvObject);\n        \n        ULONG ( STDMETHODCALLTYPE *AddRef )( \n            IKsJackDescription * This);\n        \n        ULONG ( STDMETHODCALLTYPE *Release )( \n            IKsJackDescription * This);\n        \n        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetJackCount )( \n            IKsJackDescription * This,\n            /* [out] */ \n            __out  UINT *pcJacks);\n        \n        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetJackDescription )( \n            IKsJackDescription * This,\n            /* [in] */ UINT nJack,\n            /* [out] */ \n            __out  KSJACK_DESCRIPTION *pDescription);\n        \n        END_INTERFACE\n    } IKsJackDescriptionVtbl;\n\n    interface IKsJackDescription\n    {\n        CONST_VTBL struct IKsJackDescriptionVtbl *lpVtbl;\n    };\n\n    \n\n#ifdef COBJMACROS\n\n\n#define IKsJackDescription_QueryInterface(This,riid,ppvObject)\t\\\n    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \n\n#define IKsJackDescription_AddRef(This)\t\\\n    ( (This)->lpVtbl -> AddRef(This) ) \n\n#define IKsJackDescription_Release(This)\t\\\n    ( (This)->lpVtbl -> Release(This) ) \n\n\n#define IKsJackDescription_GetJackCount(This,pcJacks)\t\\\n    ( (This)->lpVtbl -> GetJackCount(This,pcJacks) ) \n\n#define IKsJackDescription_GetJackDescription(This,nJack,pDescription)\t\\\n    ( (This)->lpVtbl -> GetJackDescription(This,nJack,pDescription) ) \n\n#endif /* COBJMACROS */\n\n\n#endif \t/* C style interface */\n\n\n\n\n#endif \t/* __IKsJackDescription_INTERFACE_DEFINED__ */\n\n\n#ifndef __IPartsList_INTERFACE_DEFINED__\n#define __IPartsList_INTERFACE_DEFINED__\n\n/* interface IPartsList */\n/* [object][unique][helpstring][uuid][local] */ \n\n\nEXTERN_C const IID IID_IPartsList;\n\n#if defined(__cplusplus) && !defined(CINTERFACE)\n    \n    MIDL_INTERFACE(\"6DAA848C-5EB0-45CC-AEA5-998A2CDA1FFB\")\n    IPartsList : public IUnknown\n    {\n    public:\n        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetCount( \n            /* [out] */ \n            __out  UINT *pCount) = 0;\n        \n        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetPart( \n            /* [in] */ \n            __in  UINT nIndex,\n            /* [out] */ \n            __out  IPart **ppPart) = 0;\n        \n    };\n    \n#else \t/* C style interface */\n\n    typedef struct IPartsListVtbl\n    {\n        BEGIN_INTERFACE\n        \n        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \n            IPartsList * This,\n            /* [in] */ REFIID riid,\n            /* [iid_is][out] */ \n            __RPC__deref_out  void **ppvObject);\n        \n        ULONG ( STDMETHODCALLTYPE *AddRef )( \n            IPartsList * This);\n        \n        ULONG ( STDMETHODCALLTYPE *Release )( \n            IPartsList * This);\n        \n        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetCount )( \n            IPartsList * This,\n            /* [out] */ \n            __out  UINT *pCount);\n        \n        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetPart )( \n            IPartsList * This,\n            /* [in] */ \n            __in  UINT nIndex,\n            /* [out] */ \n            __out  IPart **ppPart);\n        \n        END_INTERFACE\n    } IPartsListVtbl;\n\n    interface IPartsList\n    {\n        CONST_VTBL struct IPartsListVtbl *lpVtbl;\n    };\n\n    \n\n#ifdef COBJMACROS\n\n\n#define IPartsList_QueryInterface(This,riid,ppvObject)\t\\\n    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \n\n#define IPartsList_AddRef(This)\t\\\n    ( (This)->lpVtbl -> AddRef(This) ) \n\n#define IPartsList_Release(This)\t\\\n    ( (This)->lpVtbl -> Release(This) ) \n\n\n#define IPartsList_GetCount(This,pCount)\t\\\n    ( (This)->lpVtbl -> GetCount(This,pCount) ) \n\n#define IPartsList_GetPart(This,nIndex,ppPart)\t\\\n    ( (This)->lpVtbl -> GetPart(This,nIndex,ppPart) ) \n\n#endif /* COBJMACROS */\n\n\n#endif \t/* C style interface */\n\n\n\n\n#endif \t/* __IPartsList_INTERFACE_DEFINED__ */\n\n\n#ifndef __IPart_INTERFACE_DEFINED__\n#define __IPart_INTERFACE_DEFINED__\n\n/* interface IPart */\n/* [object][unique][helpstring][uuid][local] */ \n\n\nEXTERN_C const IID IID_IPart;\n\n#if defined(__cplusplus) && !defined(CINTERFACE)\n    \n    MIDL_INTERFACE(\"AE2DE0E4-5BCA-4F2D-AA46-5D13F8FDB3A9\")\n    IPart : public IUnknown\n    {\n    public:\n        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetName( \n            /* [out] */ \n            __deref_out  LPWSTR *ppwstrName) = 0;\n        \n        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetLocalId( \n            /* [out] */ \n            __out  UINT *pnId) = 0;\n        \n        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetGlobalId( \n            /* [out] */ \n            __deref_out  LPWSTR *ppwstrGlobalId) = 0;\n        \n        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetPartType( \n            /* [out] */ \n            __out  PartType *pPartType) = 0;\n        \n        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetSubType( \n            /* [out] */ GUID *pSubType) = 0;\n        \n        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetControlInterfaceCount( \n            /* [out] */ \n            __out  UINT *pCount) = 0;\n        \n        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetControlInterface( \n            /* [in] */ \n            __in  UINT nIndex,\n            /* [out] */ \n            __out  IControlInterface **ppInterfaceDesc) = 0;\n        \n        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE EnumPartsIncoming( \n            /* [out] */ \n            __out  IPartsList **ppParts) = 0;\n        \n        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE EnumPartsOutgoing( \n            /* [out] */ \n            __out  IPartsList **ppParts) = 0;\n        \n        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetTopologyObject( \n            /* [out] */ \n            __out  IDeviceTopology **ppTopology) = 0;\n        \n        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE Activate( \n            /* [in] */ \n            __in  DWORD dwClsContext,\n            /* [in] */ \n            __in  REFIID refiid,\n            /* [iid_is][out] */ \n            __out_opt  void **ppvObject) = 0;\n        \n        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE RegisterControlChangeCallback( \n            /* [in] */ \n            __in  REFGUID riid,\n            /* [in] */ \n            __in  IControlChangeNotify *pNotify) = 0;\n        \n        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE UnregisterControlChangeCallback( \n            /* [in] */ \n            __in  IControlChangeNotify *pNotify) = 0;\n        \n    };\n    \n#else \t/* C style interface */\n\n    typedef struct IPartVtbl\n    {\n        BEGIN_INTERFACE\n        \n        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \n            IPart * This,\n            /* [in] */ REFIID riid,\n            /* [iid_is][out] */ \n            __RPC__deref_out  void **ppvObject);\n        \n        ULONG ( STDMETHODCALLTYPE *AddRef )( \n            IPart * This);\n        \n        ULONG ( STDMETHODCALLTYPE *Release )( \n            IPart * This);\n        \n        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetName )( \n            IPart * This,\n            /* [out] */ \n            __deref_out  LPWSTR *ppwstrName);\n        \n        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetLocalId )( \n            IPart * This,\n            /* [out] */ \n            __out  UINT *pnId);\n        \n        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetGlobalId )( \n            IPart * This,\n            /* [out] */ \n            __deref_out  LPWSTR *ppwstrGlobalId);\n        \n        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetPartType )( \n            IPart * This,\n            /* [out] */ \n            __out  PartType *pPartType);\n        \n        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetSubType )( \n            IPart * This,\n            /* [out] */ GUID *pSubType);\n        \n        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetControlInterfaceCount )( \n            IPart * This,\n            /* [out] */ \n            __out  UINT *pCount);\n        \n        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetControlInterface )( \n            IPart * This,\n            /* [in] */ \n            __in  UINT nIndex,\n            /* [out] */ \n            __out  IControlInterface **ppInterfaceDesc);\n        \n        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *EnumPartsIncoming )( \n            IPart * This,\n            /* [out] */ \n            __out  IPartsList **ppParts);\n        \n        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *EnumPartsOutgoing )( \n            IPart * This,\n            /* [out] */ \n            __out  IPartsList **ppParts);\n        \n        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetTopologyObject )( \n            IPart * This,\n            /* [out] */ \n            __out  IDeviceTopology **ppTopology);\n        \n        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *Activate )( \n            IPart * This,\n            /* [in] */ \n            __in  DWORD dwClsContext,\n            /* [in] */ \n            __in  REFIID refiid,\n            /* [iid_is][out] */ \n            __out_opt  void **ppvObject);\n        \n        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *RegisterControlChangeCallback )( \n            IPart * This,\n            /* [in] */ \n            __in  REFGUID riid,\n            /* [in] */ \n            __in  IControlChangeNotify *pNotify);\n        \n        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *UnregisterControlChangeCallback )( \n            IPart * This,\n            /* [in] */ \n            __in  IControlChangeNotify *pNotify);\n        \n        END_INTERFACE\n    } IPartVtbl;\n\n    interface IPart\n    {\n        CONST_VTBL struct IPartVtbl *lpVtbl;\n    };\n\n    \n\n#ifdef COBJMACROS\n\n\n#define IPart_QueryInterface(This,riid,ppvObject)\t\\\n    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \n\n#define IPart_AddRef(This)\t\\\n    ( (This)->lpVtbl -> AddRef(This) ) \n\n#define IPart_Release(This)\t\\\n    ( (This)->lpVtbl -> Release(This) ) \n\n\n#define IPart_GetName(This,ppwstrName)\t\\\n    ( (This)->lpVtbl -> GetName(This,ppwstrName) ) \n\n#define IPart_GetLocalId(This,pnId)\t\\\n    ( (This)->lpVtbl -> GetLocalId(This,pnId) ) \n\n#define IPart_GetGlobalId(This,ppwstrGlobalId)\t\\\n    ( (This)->lpVtbl -> GetGlobalId(This,ppwstrGlobalId) ) \n\n#define IPart_GetPartType(This,pPartType)\t\\\n    ( (This)->lpVtbl -> GetPartType(This,pPartType) ) \n\n#define IPart_GetSubType(This,pSubType)\t\\\n    ( (This)->lpVtbl -> GetSubType(This,pSubType) ) \n\n#define IPart_GetControlInterfaceCount(This,pCount)\t\\\n    ( (This)->lpVtbl -> GetControlInterfaceCount(This,pCount) ) \n\n#define IPart_GetControlInterface(This,nIndex,ppInterfaceDesc)\t\\\n    ( (This)->lpVtbl -> GetControlInterface(This,nIndex,ppInterfaceDesc) ) \n\n#define IPart_EnumPartsIncoming(This,ppParts)\t\\\n    ( (This)->lpVtbl -> EnumPartsIncoming(This,ppParts) ) \n\n#define IPart_EnumPartsOutgoing(This,ppParts)\t\\\n    ( (This)->lpVtbl -> EnumPartsOutgoing(This,ppParts) ) \n\n#define IPart_GetTopologyObject(This,ppTopology)\t\\\n    ( (This)->lpVtbl -> GetTopologyObject(This,ppTopology) ) \n\n#define IPart_Activate(This,dwClsContext,refiid,ppvObject)\t\\\n    ( (This)->lpVtbl -> Activate(This,dwClsContext,refiid,ppvObject) ) \n\n#define IPart_RegisterControlChangeCallback(This,riid,pNotify)\t\\\n    ( (This)->lpVtbl -> RegisterControlChangeCallback(This,riid,pNotify) ) \n\n#define IPart_UnregisterControlChangeCallback(This,pNotify)\t\\\n    ( (This)->lpVtbl -> UnregisterControlChangeCallback(This,pNotify) ) \n\n#endif /* COBJMACROS */\n\n\n#endif \t/* C style interface */\n\n\n\n\n#endif \t/* __IPart_INTERFACE_DEFINED__ */\n\n\n#ifndef __IConnector_INTERFACE_DEFINED__\n#define __IConnector_INTERFACE_DEFINED__\n\n/* interface IConnector */\n/* [object][unique][helpstring][uuid][local] */ \n\n\nEXTERN_C const IID IID_IConnector;\n\n#if defined(__cplusplus) && !defined(CINTERFACE)\n    \n    MIDL_INTERFACE(\"9c2c4058-23f5-41de-877a-df3af236a09e\")\n    IConnector : public IUnknown\n    {\n    public:\n        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetType( \n            /* [out] */ \n            __out  ConnectorType *pType) = 0;\n        \n        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetDataFlow( \n            /* [out] */ \n            __out  DataFlow *pFlow) = 0;\n        \n        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE ConnectTo( \n            /* [in] */ \n            __in  IConnector *pConnectTo) = 0;\n        \n        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE Disconnect( void) = 0;\n        \n        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE IsConnected( \n            /* [out] */ \n            __out  BOOL *pbConnected) = 0;\n        \n        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetConnectedTo( \n            /* [out] */ \n            __out  IConnector **ppConTo) = 0;\n        \n        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetConnectorIdConnectedTo( \n            /* [out] */ \n            __deref_out  LPWSTR *ppwstrConnectorId) = 0;\n        \n        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetDeviceIdConnectedTo( \n            /* [out] */ \n            __deref_out  LPWSTR *ppwstrDeviceId) = 0;\n        \n    };\n    \n#else \t/* C style interface */\n\n    typedef struct IConnectorVtbl\n    {\n        BEGIN_INTERFACE\n        \n        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \n            IConnector * This,\n            /* [in] */ REFIID riid,\n            /* [iid_is][out] */ \n            __RPC__deref_out  void **ppvObject);\n        \n        ULONG ( STDMETHODCALLTYPE *AddRef )( \n            IConnector * This);\n        \n        ULONG ( STDMETHODCALLTYPE *Release )( \n            IConnector * This);\n        \n        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetType )( \n            IConnector * This,\n            /* [out] */ \n            __out  ConnectorType *pType);\n        \n        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetDataFlow )( \n            IConnector * This,\n            /* [out] */ \n            __out  DataFlow *pFlow);\n        \n        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *ConnectTo )( \n            IConnector * This,\n            /* [in] */ \n            __in  IConnector *pConnectTo);\n        \n        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *Disconnect )( \n            IConnector * This);\n        \n        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *IsConnected )( \n            IConnector * This,\n            /* [out] */ \n            __out  BOOL *pbConnected);\n        \n        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetConnectedTo )( \n            IConnector * This,\n            /* [out] */ \n            __out  IConnector **ppConTo);\n        \n        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetConnectorIdConnectedTo )( \n            IConnector * This,\n            /* [out] */ \n            __deref_out  LPWSTR *ppwstrConnectorId);\n        \n        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetDeviceIdConnectedTo )( \n            IConnector * This,\n            /* [out] */ \n            __deref_out  LPWSTR *ppwstrDeviceId);\n        \n        END_INTERFACE\n    } IConnectorVtbl;\n\n    interface IConnector\n    {\n        CONST_VTBL struct IConnectorVtbl *lpVtbl;\n    };\n\n    \n\n#ifdef COBJMACROS\n\n\n#define IConnector_QueryInterface(This,riid,ppvObject)\t\\\n    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \n\n#define IConnector_AddRef(This)\t\\\n    ( (This)->lpVtbl -> AddRef(This) ) \n\n#define IConnector_Release(This)\t\\\n    ( (This)->lpVtbl -> Release(This) ) \n\n\n#define IConnector_GetType(This,pType)\t\\\n    ( (This)->lpVtbl -> GetType(This,pType) ) \n\n#define IConnector_GetDataFlow(This,pFlow)\t\\\n    ( (This)->lpVtbl -> GetDataFlow(This,pFlow) ) \n\n#define IConnector_ConnectTo(This,pConnectTo)\t\\\n    ( (This)->lpVtbl -> ConnectTo(This,pConnectTo) ) \n\n#define IConnector_Disconnect(This)\t\\\n    ( (This)->lpVtbl -> Disconnect(This) ) \n\n#define IConnector_IsConnected(This,pbConnected)\t\\\n    ( (This)->lpVtbl -> IsConnected(This,pbConnected) ) \n\n#define IConnector_GetConnectedTo(This,ppConTo)\t\\\n    ( (This)->lpVtbl -> GetConnectedTo(This,ppConTo) ) \n\n#define IConnector_GetConnectorIdConnectedTo(This,ppwstrConnectorId)\t\\\n    ( (This)->lpVtbl -> GetConnectorIdConnectedTo(This,ppwstrConnectorId) ) \n\n#define IConnector_GetDeviceIdConnectedTo(This,ppwstrDeviceId)\t\\\n    ( (This)->lpVtbl -> GetDeviceIdConnectedTo(This,ppwstrDeviceId) ) \n\n#endif /* COBJMACROS */\n\n\n#endif \t/* C style interface */\n\n\n\n\n#endif \t/* __IConnector_INTERFACE_DEFINED__ */\n\n\n#ifndef __ISubunit_INTERFACE_DEFINED__\n#define __ISubunit_INTERFACE_DEFINED__\n\n/* interface ISubunit */\n/* [object][unique][helpstring][uuid][local] */ \n\n\nEXTERN_C const IID IID_ISubunit;\n\n#if defined(__cplusplus) && !defined(CINTERFACE)\n    \n    MIDL_INTERFACE(\"82149A85-DBA6-4487-86BB-EA8F7FEFCC71\")\n    ISubunit : public IUnknown\n    {\n    public:\n    };\n    \n#else \t/* C style interface */\n\n    typedef struct ISubunitVtbl\n    {\n        BEGIN_INTERFACE\n        \n        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \n            ISubunit * This,\n            /* [in] */ REFIID riid,\n            /* [iid_is][out] */ \n            __RPC__deref_out  void **ppvObject);\n        \n        ULONG ( STDMETHODCALLTYPE *AddRef )( \n            ISubunit * This);\n        \n        ULONG ( STDMETHODCALLTYPE *Release )( \n            ISubunit * This);\n        \n        END_INTERFACE\n    } ISubunitVtbl;\n\n    interface ISubunit\n    {\n        CONST_VTBL struct ISubunitVtbl *lpVtbl;\n    };\n\n    \n\n#ifdef COBJMACROS\n\n\n#define ISubunit_QueryInterface(This,riid,ppvObject)\t\\\n    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \n\n#define ISubunit_AddRef(This)\t\\\n    ( (This)->lpVtbl -> AddRef(This) ) \n\n#define ISubunit_Release(This)\t\\\n    ( (This)->lpVtbl -> Release(This) ) \n\n\n#endif /* COBJMACROS */\n\n\n#endif \t/* C style interface */\n\n\n\n\n#endif \t/* __ISubunit_INTERFACE_DEFINED__ */\n\n\n#ifndef __IControlInterface_INTERFACE_DEFINED__\n#define __IControlInterface_INTERFACE_DEFINED__\n\n/* interface IControlInterface */\n/* [object][unique][helpstring][uuid][local] */ \n\n\nEXTERN_C const IID IID_IControlInterface;\n\n#if defined(__cplusplus) && !defined(CINTERFACE)\n    \n    MIDL_INTERFACE(\"45d37c3f-5140-444a-ae24-400789f3cbf3\")\n    IControlInterface : public IUnknown\n    {\n    public:\n        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetName( \n            /* [out] */ \n            __deref_out  LPWSTR *ppwstrName) = 0;\n        \n        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetIID( \n            /* [out] */ \n            __out  GUID *pIID) = 0;\n        \n    };\n    \n#else \t/* C style interface */\n\n    typedef struct IControlInterfaceVtbl\n    {\n        BEGIN_INTERFACE\n        \n        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \n            IControlInterface * This,\n            /* [in] */ REFIID riid,\n            /* [iid_is][out] */ \n            __RPC__deref_out  void **ppvObject);\n        \n        ULONG ( STDMETHODCALLTYPE *AddRef )( \n            IControlInterface * This);\n        \n        ULONG ( STDMETHODCALLTYPE *Release )( \n            IControlInterface * This);\n        \n        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetName )( \n            IControlInterface * This,\n            /* [out] */ \n            __deref_out  LPWSTR *ppwstrName);\n        \n        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetIID )( \n            IControlInterface * This,\n            /* [out] */ \n            __out  GUID *pIID);\n        \n        END_INTERFACE\n    } IControlInterfaceVtbl;\n\n    interface IControlInterface\n    {\n        CONST_VTBL struct IControlInterfaceVtbl *lpVtbl;\n    };\n\n    \n\n#ifdef COBJMACROS\n\n\n#define IControlInterface_QueryInterface(This,riid,ppvObject)\t\\\n    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \n\n#define IControlInterface_AddRef(This)\t\\\n    ( (This)->lpVtbl -> AddRef(This) ) \n\n#define IControlInterface_Release(This)\t\\\n    ( (This)->lpVtbl -> Release(This) ) \n\n\n#define IControlInterface_GetName(This,ppwstrName)\t\\\n    ( (This)->lpVtbl -> GetName(This,ppwstrName) ) \n\n#define IControlInterface_GetIID(This,pIID)\t\\\n    ( (This)->lpVtbl -> GetIID(This,pIID) ) \n\n#endif /* COBJMACROS */\n\n\n#endif \t/* C style interface */\n\n\n\n\n#endif \t/* __IControlInterface_INTERFACE_DEFINED__ */\n\n\n#ifndef __IControlChangeNotify_INTERFACE_DEFINED__\n#define __IControlChangeNotify_INTERFACE_DEFINED__\n\n/* interface IControlChangeNotify */\n/* [unique][helpstring][nonextensible][uuid][local][object] */ \n\n\nEXTERN_C const IID IID_IControlChangeNotify;\n\n#if defined(__cplusplus) && !defined(CINTERFACE)\n    \n    MIDL_INTERFACE(\"A09513ED-C709-4d21-BD7B-5F34C47F3947\")\n    IControlChangeNotify : public IUnknown\n    {\n    public:\n        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE OnNotify( \n            /* [in] */ \n            __in  DWORD dwSenderProcessId,\n            /* [unique][in] */ \n            __in_opt  LPCGUID pguidEventContext) = 0;\n        \n    };\n    \n#else \t/* C style interface */\n\n    typedef struct IControlChangeNotifyVtbl\n    {\n        BEGIN_INTERFACE\n        \n        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \n            IControlChangeNotify * This,\n            /* [in] */ REFIID riid,\n            /* [iid_is][out] */ \n            __RPC__deref_out  void **ppvObject);\n        \n        ULONG ( STDMETHODCALLTYPE *AddRef )( \n            IControlChangeNotify * This);\n        \n        ULONG ( STDMETHODCALLTYPE *Release )( \n            IControlChangeNotify * This);\n        \n        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *OnNotify )( \n            IControlChangeNotify * This,\n            /* [in] */ \n            __in  DWORD dwSenderProcessId,\n            /* [unique][in] */ \n            __in_opt  LPCGUID pguidEventContext);\n        \n        END_INTERFACE\n    } IControlChangeNotifyVtbl;\n\n    interface IControlChangeNotify\n    {\n        CONST_VTBL struct IControlChangeNotifyVtbl *lpVtbl;\n    };\n\n    \n\n#ifdef COBJMACROS\n\n\n#define IControlChangeNotify_QueryInterface(This,riid,ppvObject)\t\\\n    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \n\n#define IControlChangeNotify_AddRef(This)\t\\\n    ( (This)->lpVtbl -> AddRef(This) ) \n\n#define IControlChangeNotify_Release(This)\t\\\n    ( (This)->lpVtbl -> Release(This) ) \n\n\n#define IControlChangeNotify_OnNotify(This,dwSenderProcessId,pguidEventContext)\t\\\n    ( (This)->lpVtbl -> OnNotify(This,dwSenderProcessId,pguidEventContext) ) \n\n#endif /* COBJMACROS */\n\n\n#endif \t/* C style interface */\n\n\n\n\n#endif \t/* __IControlChangeNotify_INTERFACE_DEFINED__ */\n\n\n#ifndef __IDeviceTopology_INTERFACE_DEFINED__\n#define __IDeviceTopology_INTERFACE_DEFINED__\n\n/* interface IDeviceTopology */\n/* [unique][helpstring][nonextensible][uuid][local][object] */ \n\n\nEXTERN_C const IID IID_IDeviceTopology;\n\n#if defined(__cplusplus) && !defined(CINTERFACE)\n    \n    MIDL_INTERFACE(\"2A07407E-6497-4A18-9787-32F79BD0D98F\")\n    IDeviceTopology : public IUnknown\n    {\n    public:\n        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetConnectorCount( \n            /* [out] */ \n            __out  UINT *pCount) = 0;\n        \n        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetConnector( \n            /* [in] */ \n            __in  UINT nIndex,\n            /* [out] */ \n            __out  IConnector **ppConnector) = 0;\n        \n        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetSubunitCount( \n            /* [out] */ \n            __out  UINT *pCount) = 0;\n        \n        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetSubunit( \n            /* [in] */ \n            __in  UINT nIndex,\n            /* [out] */ \n            __deref_out  ISubunit **ppSubunit) = 0;\n        \n        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetPartById( \n            /* [in] */ \n            __in  UINT nId,\n            /* [out] */ \n            __deref_out  IPart **ppPart) = 0;\n        \n        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetDeviceId( \n            /* [out] */ \n            __deref_out  LPWSTR *ppwstrDeviceId) = 0;\n        \n        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetSignalPath( \n            /* [in] */ \n            __in  IPart *pIPartFrom,\n            /* [in] */ \n            __in  IPart *pIPartTo,\n            /* [in] */ \n            __in  BOOL bRejectMixedPaths,\n            /* [out] */ \n            __deref_out  IPartsList **ppParts) = 0;\n        \n    };\n    \n#else \t/* C style interface */\n\n    typedef struct IDeviceTopologyVtbl\n    {\n        BEGIN_INTERFACE\n        \n        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \n            IDeviceTopology * This,\n            /* [in] */ REFIID riid,\n            /* [iid_is][out] */ \n            __RPC__deref_out  void **ppvObject);\n        \n        ULONG ( STDMETHODCALLTYPE *AddRef )( \n            IDeviceTopology * This);\n        \n        ULONG ( STDMETHODCALLTYPE *Release )( \n            IDeviceTopology * This);\n        \n        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetConnectorCount )( \n            IDeviceTopology * This,\n            /* [out] */ \n            __out  UINT *pCount);\n        \n        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetConnector )( \n            IDeviceTopology * This,\n            /* [in] */ \n            __in  UINT nIndex,\n            /* [out] */ \n            __out  IConnector **ppConnector);\n        \n        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetSubunitCount )( \n            IDeviceTopology * This,\n            /* [out] */ \n            __out  UINT *pCount);\n        \n        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetSubunit )( \n            IDeviceTopology * This,\n            /* [in] */ \n            __in  UINT nIndex,\n            /* [out] */ \n            __deref_out  ISubunit **ppSubunit);\n        \n        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetPartById )( \n            IDeviceTopology * This,\n            /* [in] */ \n            __in  UINT nId,\n            /* [out] */ \n            __deref_out  IPart **ppPart);\n        \n        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetDeviceId )( \n            IDeviceTopology * This,\n            /* [out] */ \n            __deref_out  LPWSTR *ppwstrDeviceId);\n        \n        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetSignalPath )( \n            IDeviceTopology * This,\n            /* [in] */ \n            __in  IPart *pIPartFrom,\n            /* [in] */ \n            __in  IPart *pIPartTo,\n            /* [in] */ \n            __in  BOOL bRejectMixedPaths,\n            /* [out] */ \n            __deref_out  IPartsList **ppParts);\n        \n        END_INTERFACE\n    } IDeviceTopologyVtbl;\n\n    interface IDeviceTopology\n    {\n        CONST_VTBL struct IDeviceTopologyVtbl *lpVtbl;\n    };\n\n    \n\n#ifdef COBJMACROS\n\n\n#define IDeviceTopology_QueryInterface(This,riid,ppvObject)\t\\\n    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \n\n#define IDeviceTopology_AddRef(This)\t\\\n    ( (This)->lpVtbl -> AddRef(This) ) \n\n#define IDeviceTopology_Release(This)\t\\\n    ( (This)->lpVtbl -> Release(This) ) \n\n\n#define IDeviceTopology_GetConnectorCount(This,pCount)\t\\\n    ( (This)->lpVtbl -> GetConnectorCount(This,pCount) ) \n\n#define IDeviceTopology_GetConnector(This,nIndex,ppConnector)\t\\\n    ( (This)->lpVtbl -> GetConnector(This,nIndex,ppConnector) ) \n\n#define IDeviceTopology_GetSubunitCount(This,pCount)\t\\\n    ( (This)->lpVtbl -> GetSubunitCount(This,pCount) ) \n\n#define IDeviceTopology_GetSubunit(This,nIndex,ppSubunit)\t\\\n    ( (This)->lpVtbl -> GetSubunit(This,nIndex,ppSubunit) ) \n\n#define IDeviceTopology_GetPartById(This,nId,ppPart)\t\\\n    ( (This)->lpVtbl -> GetPartById(This,nId,ppPart) ) \n\n#define IDeviceTopology_GetDeviceId(This,ppwstrDeviceId)\t\\\n    ( (This)->lpVtbl -> GetDeviceId(This,ppwstrDeviceId) ) \n\n#define IDeviceTopology_GetSignalPath(This,pIPartFrom,pIPartTo,bRejectMixedPaths,ppParts)\t\\\n    ( (This)->lpVtbl -> GetSignalPath(This,pIPartFrom,pIPartTo,bRejectMixedPaths,ppParts) ) \n\n#endif /* COBJMACROS */\n\n\n#endif \t/* C style interface */\n\n\n\n\n#endif \t/* __IDeviceTopology_INTERFACE_DEFINED__ */\n\n\n\n#ifndef __DevTopologyLib_LIBRARY_DEFINED__\n#define __DevTopologyLib_LIBRARY_DEFINED__\n\n/* library DevTopologyLib */\n/* [helpstring][version][uuid] */ \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nEXTERN_C const IID LIBID_DevTopologyLib;\n\nEXTERN_C const CLSID CLSID_DeviceTopology;\n\n#ifdef __cplusplus\n\nclass DECLSPEC_UUID(\"1DF639D0-5EC1-47AA-9379-828DC1AA8C59\")\nDeviceTopology;\n#endif\n#endif /* __DevTopologyLib_LIBRARY_DEFINED__ */\n\n/* Additional Prototypes for ALL interfaces */\n\n/* end of Additional Prototypes */\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif\n\n\n\n"
  },
  {
    "path": "thirdparty/portaudio/src/hostapi/wasapi/mingw-include/endpointvolume.h",
    "content": "\n\n/* this ALWAYS GENERATED file contains the definitions for the interfaces */\n\n\n /* File created by MIDL compiler version 7.00.0499 */\n/* Compiler settings for endpointvolume.idl:\n    Oicf, W1, Zp8, env=Win32 (32b run)\n    protocol : dce , ms_ext, c_ext, robust\n    error checks: allocation ref bounds_check enum stub_data \n    VC __declspec() decoration level: \n         __declspec(uuid()), __declspec(selectany), __declspec(novtable)\n         DECLSPEC_UUID(), MIDL_INTERFACE()\n*/\n//@@MIDL_FILE_HEADING(  )\n\n#pragma warning( disable: 4049 )  /* more than 64k source lines */\n\n\n/* verify that the <rpcndr.h> version is high enough to compile this file*/\n#ifndef __REQUIRED_RPCNDR_H_VERSION__\n#define __REQUIRED_RPCNDR_H_VERSION__ 500\n#endif\n\n/* verify that the <rpcsal.h> version is high enough to compile this file*/\n#ifndef __REQUIRED_RPCSAL_H_VERSION__\n#define __REQUIRED_RPCSAL_H_VERSION__ 100\n#endif\n\n#include \"rpc.h\"\n#include \"rpcndr.h\"\n\n#ifndef __RPCNDR_H_VERSION__\n#error this stub requires an updated version of <rpcndr.h>\n#endif // __RPCNDR_H_VERSION__\n\n#ifndef COM_NO_WINDOWS_H\n#include \"windows.h\"\n#include \"ole2.h\"\n#endif /*COM_NO_WINDOWS_H*/\n\n#ifndef __endpointvolume_h__\n#define __endpointvolume_h__\n\n#if defined(_MSC_VER) && (_MSC_VER >= 1020)\n#pragma once\n#endif\n\n/* Forward Declarations */ \n\n#ifndef __IAudioEndpointVolumeCallback_FWD_DEFINED__\n#define __IAudioEndpointVolumeCallback_FWD_DEFINED__\ntypedef interface IAudioEndpointVolumeCallback IAudioEndpointVolumeCallback;\n#endif \t/* __IAudioEndpointVolumeCallback_FWD_DEFINED__ */\n\n\n#ifndef __IAudioEndpointVolume_FWD_DEFINED__\n#define __IAudioEndpointVolume_FWD_DEFINED__\ntypedef interface IAudioEndpointVolume IAudioEndpointVolume;\n#endif \t/* __IAudioEndpointVolume_FWD_DEFINED__ */\n\n\n#ifndef __IAudioMeterInformation_FWD_DEFINED__\n#define __IAudioMeterInformation_FWD_DEFINED__\ntypedef interface IAudioMeterInformation IAudioMeterInformation;\n#endif \t/* __IAudioMeterInformation_FWD_DEFINED__ */\n\n\n/* header files for imported files */\n#include \"unknwn.h\"\n#include \"devicetopology.h\"\n\n#ifdef __cplusplus\nextern \"C\"{\n#endif \n\n\n/* interface __MIDL_itf_endpointvolume_0000_0000 */\n/* [local] */ \n\ntypedef struct AUDIO_VOLUME_NOTIFICATION_DATA\n    {\n    GUID guidEventContext;\n    BOOL bMuted;\n    float fMasterVolume;\n    UINT nChannels;\n    float afChannelVolumes[ 1 ];\n    } \tAUDIO_VOLUME_NOTIFICATION_DATA;\n\ntypedef struct AUDIO_VOLUME_NOTIFICATION_DATA *PAUDIO_VOLUME_NOTIFICATION_DATA;\n\n#define   ENDPOINT_HARDWARE_SUPPORT_VOLUME    0x00000001\n#define   ENDPOINT_HARDWARE_SUPPORT_MUTE      0x00000002\n#define   ENDPOINT_HARDWARE_SUPPORT_METER     0x00000004\n\n\nextern RPC_IF_HANDLE __MIDL_itf_endpointvolume_0000_0000_v0_0_c_ifspec;\nextern RPC_IF_HANDLE __MIDL_itf_endpointvolume_0000_0000_v0_0_s_ifspec;\n\n#ifndef __IAudioEndpointVolumeCallback_INTERFACE_DEFINED__\n#define __IAudioEndpointVolumeCallback_INTERFACE_DEFINED__\n\n/* interface IAudioEndpointVolumeCallback */\n/* [unique][helpstring][nonextensible][uuid][local][object] */ \n\n\nEXTERN_C const IID IID_IAudioEndpointVolumeCallback;\n\n#if defined(__cplusplus) && !defined(CINTERFACE)\n    \n    MIDL_INTERFACE(\"657804FA-D6AD-4496-8A60-352752AF4F89\")\n    IAudioEndpointVolumeCallback : public IUnknown\n    {\n    public:\n        virtual HRESULT STDMETHODCALLTYPE OnNotify( \n            PAUDIO_VOLUME_NOTIFICATION_DATA pNotify) = 0;\n        \n    };\n    \n#else \t/* C style interface */\n\n    typedef struct IAudioEndpointVolumeCallbackVtbl\n    {\n        BEGIN_INTERFACE\n        \n        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \n            IAudioEndpointVolumeCallback * This,\n            /* [in] */ REFIID riid,\n            /* [iid_is][out] */ \n            __RPC__deref_out  void **ppvObject);\n        \n        ULONG ( STDMETHODCALLTYPE *AddRef )( \n            IAudioEndpointVolumeCallback * This);\n        \n        ULONG ( STDMETHODCALLTYPE *Release )( \n            IAudioEndpointVolumeCallback * This);\n        \n        HRESULT ( STDMETHODCALLTYPE *OnNotify )( \n            IAudioEndpointVolumeCallback * This,\n            PAUDIO_VOLUME_NOTIFICATION_DATA pNotify);\n        \n        END_INTERFACE\n    } IAudioEndpointVolumeCallbackVtbl;\n\n    interface IAudioEndpointVolumeCallback\n    {\n        CONST_VTBL struct IAudioEndpointVolumeCallbackVtbl *lpVtbl;\n    };\n\n    \n\n#ifdef COBJMACROS\n\n\n#define IAudioEndpointVolumeCallback_QueryInterface(This,riid,ppvObject)\t\\\n    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \n\n#define IAudioEndpointVolumeCallback_AddRef(This)\t\\\n    ( (This)->lpVtbl -> AddRef(This) ) \n\n#define IAudioEndpointVolumeCallback_Release(This)\t\\\n    ( (This)->lpVtbl -> Release(This) ) \n\n\n#define IAudioEndpointVolumeCallback_OnNotify(This,pNotify)\t\\\n    ( (This)->lpVtbl -> OnNotify(This,pNotify) ) \n\n#endif /* COBJMACROS */\n\n\n#endif \t/* C style interface */\n\n\n\n\n#endif \t/* __IAudioEndpointVolumeCallback_INTERFACE_DEFINED__ */\n\n\n#ifndef __IAudioEndpointVolume_INTERFACE_DEFINED__\n#define __IAudioEndpointVolume_INTERFACE_DEFINED__\n\n/* interface IAudioEndpointVolume */\n/* [unique][helpstring][nonextensible][uuid][local][object] */ \n\n\nEXTERN_C const IID IID_IAudioEndpointVolume;\n\n#if defined(__cplusplus) && !defined(CINTERFACE)\n    \n    MIDL_INTERFACE(\"5CDF2C82-841E-4546-9722-0CF74078229A\")\n    IAudioEndpointVolume : public IUnknown\n    {\n    public:\n        virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE RegisterControlChangeNotify( \n            /* [in] */ \n            __in  IAudioEndpointVolumeCallback *pNotify) = 0;\n        \n        virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE UnregisterControlChangeNotify( \n            /* [in] */ \n            __in  IAudioEndpointVolumeCallback *pNotify) = 0;\n        \n        virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetChannelCount( \n            /* [out] */ \n            __out  UINT *pnChannelCount) = 0;\n        \n        virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetMasterVolumeLevel( \n            /* [in] */ \n            __in  float fLevelDB,\n            /* [unique][in] */ LPCGUID pguidEventContext) = 0;\n        \n        virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetMasterVolumeLevelScalar( \n            /* [in] */ \n            __in  float fLevel,\n            /* [unique][in] */ LPCGUID pguidEventContext) = 0;\n        \n        virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetMasterVolumeLevel( \n            /* [out] */ \n            __out  float *pfLevelDB) = 0;\n        \n        virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetMasterVolumeLevelScalar( \n            /* [out] */ \n            __out  float *pfLevel) = 0;\n        \n        virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetChannelVolumeLevel( \n            /* [in] */ \n            __in  UINT nChannel,\n            float fLevelDB,\n            /* [unique][in] */ LPCGUID pguidEventContext) = 0;\n        \n        virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetChannelVolumeLevelScalar( \n            /* [in] */ \n            __in  UINT nChannel,\n            float fLevel,\n            /* [unique][in] */ LPCGUID pguidEventContext) = 0;\n        \n        virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetChannelVolumeLevel( \n            /* [in] */ \n            __in  UINT nChannel,\n            /* [out] */ \n            __out  float *pfLevelDB) = 0;\n        \n        virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetChannelVolumeLevelScalar( \n            /* [in] */ \n            __in  UINT nChannel,\n            /* [out] */ \n            __out  float *pfLevel) = 0;\n        \n        virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetMute( \n            /* [in] */ \n            __in  BOOL bMute,\n            /* [unique][in] */ LPCGUID pguidEventContext) = 0;\n        \n        virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetMute( \n            /* [out] */ \n            __out  BOOL *pbMute) = 0;\n        \n        virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetVolumeStepInfo( \n            /* [out] */ \n            __out  UINT *pnStep,\n            /* [out] */ \n            __out  UINT *pnStepCount) = 0;\n        \n        virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE VolumeStepUp( \n            /* [unique][in] */ LPCGUID pguidEventContext) = 0;\n        \n        virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE VolumeStepDown( \n            /* [unique][in] */ LPCGUID pguidEventContext) = 0;\n        \n        virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE QueryHardwareSupport( \n            /* [out] */ \n            __out  DWORD *pdwHardwareSupportMask) = 0;\n        \n        virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetVolumeRange( \n            /* [out] */ \n            __out  float *pflVolumeMindB,\n            /* [out] */ \n            __out  float *pflVolumeMaxdB,\n            /* [out] */ \n            __out  float *pflVolumeIncrementdB) = 0;\n        \n    };\n    \n#else \t/* C style interface */\n\n    typedef struct IAudioEndpointVolumeVtbl\n    {\n        BEGIN_INTERFACE\n        \n        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \n            IAudioEndpointVolume * This,\n            /* [in] */ REFIID riid,\n            /* [iid_is][out] */ \n            __RPC__deref_out  void **ppvObject);\n        \n        ULONG ( STDMETHODCALLTYPE *AddRef )( \n            IAudioEndpointVolume * This);\n        \n        ULONG ( STDMETHODCALLTYPE *Release )( \n            IAudioEndpointVolume * This);\n        \n        /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *RegisterControlChangeNotify )( \n            IAudioEndpointVolume * This,\n            /* [in] */ \n            __in  IAudioEndpointVolumeCallback *pNotify);\n        \n        /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *UnregisterControlChangeNotify )( \n            IAudioEndpointVolume * This,\n            /* [in] */ \n            __in  IAudioEndpointVolumeCallback *pNotify);\n        \n        /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetChannelCount )( \n            IAudioEndpointVolume * This,\n            /* [out] */ \n            __out  UINT *pnChannelCount);\n        \n        /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetMasterVolumeLevel )( \n            IAudioEndpointVolume * This,\n            /* [in] */ \n            __in  float fLevelDB,\n            /* [unique][in] */ LPCGUID pguidEventContext);\n        \n        /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetMasterVolumeLevelScalar )( \n            IAudioEndpointVolume * This,\n            /* [in] */ \n            __in  float fLevel,\n            /* [unique][in] */ LPCGUID pguidEventContext);\n        \n        /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetMasterVolumeLevel )( \n            IAudioEndpointVolume * This,\n            /* [out] */ \n            __out  float *pfLevelDB);\n        \n        /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetMasterVolumeLevelScalar )( \n            IAudioEndpointVolume * This,\n            /* [out] */ \n            __out  float *pfLevel);\n        \n        /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetChannelVolumeLevel )( \n            IAudioEndpointVolume * This,\n            /* [in] */ \n            __in  UINT nChannel,\n            float fLevelDB,\n            /* [unique][in] */ LPCGUID pguidEventContext);\n        \n        /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetChannelVolumeLevelScalar )( \n            IAudioEndpointVolume * This,\n            /* [in] */ \n            __in  UINT nChannel,\n            float fLevel,\n            /* [unique][in] */ LPCGUID pguidEventContext);\n        \n        /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetChannelVolumeLevel )( \n            IAudioEndpointVolume * This,\n            /* [in] */ \n            __in  UINT nChannel,\n            /* [out] */ \n            __out  float *pfLevelDB);\n        \n        /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetChannelVolumeLevelScalar )( \n            IAudioEndpointVolume * This,\n            /* [in] */ \n            __in  UINT nChannel,\n            /* [out] */ \n            __out  float *pfLevel);\n        \n        /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetMute )( \n            IAudioEndpointVolume * This,\n            /* [in] */ \n            __in  BOOL bMute,\n            /* [unique][in] */ LPCGUID pguidEventContext);\n        \n        /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetMute )( \n            IAudioEndpointVolume * This,\n            /* [out] */ \n            __out  BOOL *pbMute);\n        \n        /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetVolumeStepInfo )( \n            IAudioEndpointVolume * This,\n            /* [out] */ \n            __out  UINT *pnStep,\n            /* [out] */ \n            __out  UINT *pnStepCount);\n        \n        /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *VolumeStepUp )( \n            IAudioEndpointVolume * This,\n            /* [unique][in] */ LPCGUID pguidEventContext);\n        \n        /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *VolumeStepDown )( \n            IAudioEndpointVolume * This,\n            /* [unique][in] */ LPCGUID pguidEventContext);\n        \n        /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *QueryHardwareSupport )( \n            IAudioEndpointVolume * This,\n            /* [out] */ \n            __out  DWORD *pdwHardwareSupportMask);\n        \n        /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetVolumeRange )( \n            IAudioEndpointVolume * This,\n            /* [out] */ \n            __out  float *pflVolumeMindB,\n            /* [out] */ \n            __out  float *pflVolumeMaxdB,\n            /* [out] */ \n            __out  float *pflVolumeIncrementdB);\n        \n        END_INTERFACE\n    } IAudioEndpointVolumeVtbl;\n\n    interface IAudioEndpointVolume\n    {\n        CONST_VTBL struct IAudioEndpointVolumeVtbl *lpVtbl;\n    };\n\n    \n\n#ifdef COBJMACROS\n\n\n#define IAudioEndpointVolume_QueryInterface(This,riid,ppvObject)\t\\\n    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \n\n#define IAudioEndpointVolume_AddRef(This)\t\\\n    ( (This)->lpVtbl -> AddRef(This) ) \n\n#define IAudioEndpointVolume_Release(This)\t\\\n    ( (This)->lpVtbl -> Release(This) ) \n\n\n#define IAudioEndpointVolume_RegisterControlChangeNotify(This,pNotify)\t\\\n    ( (This)->lpVtbl -> RegisterControlChangeNotify(This,pNotify) ) \n\n#define IAudioEndpointVolume_UnregisterControlChangeNotify(This,pNotify)\t\\\n    ( (This)->lpVtbl -> UnregisterControlChangeNotify(This,pNotify) ) \n\n#define IAudioEndpointVolume_GetChannelCount(This,pnChannelCount)\t\\\n    ( (This)->lpVtbl -> GetChannelCount(This,pnChannelCount) ) \n\n#define IAudioEndpointVolume_SetMasterVolumeLevel(This,fLevelDB,pguidEventContext)\t\\\n    ( (This)->lpVtbl -> SetMasterVolumeLevel(This,fLevelDB,pguidEventContext) ) \n\n#define IAudioEndpointVolume_SetMasterVolumeLevelScalar(This,fLevel,pguidEventContext)\t\\\n    ( (This)->lpVtbl -> SetMasterVolumeLevelScalar(This,fLevel,pguidEventContext) ) \n\n#define IAudioEndpointVolume_GetMasterVolumeLevel(This,pfLevelDB)\t\\\n    ( (This)->lpVtbl -> GetMasterVolumeLevel(This,pfLevelDB) ) \n\n#define IAudioEndpointVolume_GetMasterVolumeLevelScalar(This,pfLevel)\t\\\n    ( (This)->lpVtbl -> GetMasterVolumeLevelScalar(This,pfLevel) ) \n\n#define IAudioEndpointVolume_SetChannelVolumeLevel(This,nChannel,fLevelDB,pguidEventContext)\t\\\n    ( (This)->lpVtbl -> SetChannelVolumeLevel(This,nChannel,fLevelDB,pguidEventContext) ) \n\n#define IAudioEndpointVolume_SetChannelVolumeLevelScalar(This,nChannel,fLevel,pguidEventContext)\t\\\n    ( (This)->lpVtbl -> SetChannelVolumeLevelScalar(This,nChannel,fLevel,pguidEventContext) ) \n\n#define IAudioEndpointVolume_GetChannelVolumeLevel(This,nChannel,pfLevelDB)\t\\\n    ( (This)->lpVtbl -> GetChannelVolumeLevel(This,nChannel,pfLevelDB) ) \n\n#define IAudioEndpointVolume_GetChannelVolumeLevelScalar(This,nChannel,pfLevel)\t\\\n    ( (This)->lpVtbl -> GetChannelVolumeLevelScalar(This,nChannel,pfLevel) ) \n\n#define IAudioEndpointVolume_SetMute(This,bMute,pguidEventContext)\t\\\n    ( (This)->lpVtbl -> SetMute(This,bMute,pguidEventContext) ) \n\n#define IAudioEndpointVolume_GetMute(This,pbMute)\t\\\n    ( (This)->lpVtbl -> GetMute(This,pbMute) ) \n\n#define IAudioEndpointVolume_GetVolumeStepInfo(This,pnStep,pnStepCount)\t\\\n    ( (This)->lpVtbl -> GetVolumeStepInfo(This,pnStep,pnStepCount) ) \n\n#define IAudioEndpointVolume_VolumeStepUp(This,pguidEventContext)\t\\\n    ( (This)->lpVtbl -> VolumeStepUp(This,pguidEventContext) ) \n\n#define IAudioEndpointVolume_VolumeStepDown(This,pguidEventContext)\t\\\n    ( (This)->lpVtbl -> VolumeStepDown(This,pguidEventContext) ) \n\n#define IAudioEndpointVolume_QueryHardwareSupport(This,pdwHardwareSupportMask)\t\\\n    ( (This)->lpVtbl -> QueryHardwareSupport(This,pdwHardwareSupportMask) ) \n\n#define IAudioEndpointVolume_GetVolumeRange(This,pflVolumeMindB,pflVolumeMaxdB,pflVolumeIncrementdB)\t\\\n    ( (This)->lpVtbl -> GetVolumeRange(This,pflVolumeMindB,pflVolumeMaxdB,pflVolumeIncrementdB) ) \n\n#endif /* COBJMACROS */\n\n\n#endif \t/* C style interface */\n\n\n\n\n#endif \t/* __IAudioEndpointVolume_INTERFACE_DEFINED__ */\n\n\n#ifndef __IAudioMeterInformation_INTERFACE_DEFINED__\n#define __IAudioMeterInformation_INTERFACE_DEFINED__\n\n/* interface IAudioMeterInformation */\n/* [unique][helpstring][nonextensible][uuid][local][object] */ \n\n\nEXTERN_C const IID IID_IAudioMeterInformation;\n\n#if defined(__cplusplus) && !defined(CINTERFACE)\n    \n    MIDL_INTERFACE(\"C02216F6-8C67-4B5B-9D00-D008E73E0064\")\n    IAudioMeterInformation : public IUnknown\n    {\n    public:\n        virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetPeakValue( \n            /* [out] */ float *pfPeak) = 0;\n        \n        virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetMeteringChannelCount( \n            /* [out] */ \n            __out  UINT *pnChannelCount) = 0;\n        \n        virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetChannelsPeakValues( \n            /* [in] */ UINT32 u32ChannelCount,\n            /* [size_is][out] */ float *afPeakValues) = 0;\n        \n        virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE QueryHardwareSupport( \n            /* [out] */ \n            __out  DWORD *pdwHardwareSupportMask) = 0;\n        \n    };\n    \n#else \t/* C style interface */\n\n    typedef struct IAudioMeterInformationVtbl\n    {\n        BEGIN_INTERFACE\n        \n        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \n            IAudioMeterInformation * This,\n            /* [in] */ REFIID riid,\n            /* [iid_is][out] */ \n            __RPC__deref_out  void **ppvObject);\n        \n        ULONG ( STDMETHODCALLTYPE *AddRef )( \n            IAudioMeterInformation * This);\n        \n        ULONG ( STDMETHODCALLTYPE *Release )( \n            IAudioMeterInformation * This);\n        \n        /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetPeakValue )( \n            IAudioMeterInformation * This,\n            /* [out] */ float *pfPeak);\n        \n        /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetMeteringChannelCount )( \n            IAudioMeterInformation * This,\n            /* [out] */ \n            __out  UINT *pnChannelCount);\n        \n        /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetChannelsPeakValues )( \n            IAudioMeterInformation * This,\n            /* [in] */ UINT32 u32ChannelCount,\n            /* [size_is][out] */ float *afPeakValues);\n        \n        /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *QueryHardwareSupport )( \n            IAudioMeterInformation * This,\n            /* [out] */ \n            __out  DWORD *pdwHardwareSupportMask);\n        \n        END_INTERFACE\n    } IAudioMeterInformationVtbl;\n\n    interface IAudioMeterInformation\n    {\n        CONST_VTBL struct IAudioMeterInformationVtbl *lpVtbl;\n    };\n\n    \n\n#ifdef COBJMACROS\n\n\n#define IAudioMeterInformation_QueryInterface(This,riid,ppvObject)\t\\\n    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \n\n#define IAudioMeterInformation_AddRef(This)\t\\\n    ( (This)->lpVtbl -> AddRef(This) ) \n\n#define IAudioMeterInformation_Release(This)\t\\\n    ( (This)->lpVtbl -> Release(This) ) \n\n\n#define IAudioMeterInformation_GetPeakValue(This,pfPeak)\t\\\n    ( (This)->lpVtbl -> GetPeakValue(This,pfPeak) ) \n\n#define IAudioMeterInformation_GetMeteringChannelCount(This,pnChannelCount)\t\\\n    ( (This)->lpVtbl -> GetMeteringChannelCount(This,pnChannelCount) ) \n\n#define IAudioMeterInformation_GetChannelsPeakValues(This,u32ChannelCount,afPeakValues)\t\\\n    ( (This)->lpVtbl -> GetChannelsPeakValues(This,u32ChannelCount,afPeakValues) ) \n\n#define IAudioMeterInformation_QueryHardwareSupport(This,pdwHardwareSupportMask)\t\\\n    ( (This)->lpVtbl -> QueryHardwareSupport(This,pdwHardwareSupportMask) ) \n\n#endif /* COBJMACROS */\n\n\n#endif \t/* C style interface */\n\n\n\n\n#endif \t/* __IAudioMeterInformation_INTERFACE_DEFINED__ */\n\n\n/* Additional Prototypes for ALL interfaces */\n\n/* end of Additional Prototypes */\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif\n\n\n\n"
  },
  {
    "path": "thirdparty/portaudio/src/hostapi/wasapi/mingw-include/functiondiscoverykeys.h",
    "content": "#pragma once\n\n#if __GNUC__ >=3\n#pragma GCC system_header\n#endif\n\n#ifndef DEFINE_API_PKEY\n#include <propkey.h>\n#endif\n\n#include <FunctionDiscoveryKeys_devpkey.h>\n\n// FMTID_FD = {904b03a2-471d-423c-a584-f3483238a146}\nDEFINE_GUID(FMTID_FD, 0x904b03a2, 0x471d, 0x423c, 0xa5, 0x84, 0xf3, 0x48, 0x32, 0x38, 0xa1, 0x46);\nDEFINE_API_PKEY(PKEY_FD_Visibility, VisibilityFlags, 0x904b03a2, 0x471d, 0x423c, 0xa5, 0x84, 0xf3, 0x48, 0x32, 0x38, 0xa1, 0x46, 0x00000001); //    VT_UINT\n#define FD_Visibility_Default   0\n#define FD_Visibility_Hidden    1\n\n// FMTID_Device = {78C34FC8-104A-4aca-9EA4-524D52996E57}\nDEFINE_GUID(FMTID_Device, 0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57);\n\nDEFINE_API_PKEY(PKEY_Device_NotPresent,     DeviceNotPresent   , 0x904b03a2, 0x471d, 0x423c, 0xa5, 0x84, 0xf3, 0x48, 0x32, 0x38, 0xa1, 0x46, 0x00000002); //    VT_UINT\nDEFINE_API_PKEY(PKEY_Device_QueueSize,      DeviceQueueSize    , 0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57, 0x00000024); //    VT_UI4\nDEFINE_API_PKEY(PKEY_Device_Status,         DeviceStatus       , 0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57, 0x00000025); //    VT_LPWSTR\nDEFINE_API_PKEY(PKEY_Device_Comment,        DeviceComment      , 0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57, 0x00000026); //    VT_LPWSTR\nDEFINE_API_PKEY(PKEY_Device_Model,          DeviceModel        , 0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57, 0x00000027); //    VT_LPWSTR\n\n//  Name:     System.Device.BIOSVersion -- PKEY_Device_BIOSVersion\n//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)  Legacy code may treat this as VT_BSTR.\n//  FormatID: EAEE7F1D-6A33-44D1-9441-5F46DEF23198, 9\nDEFINE_PROPERTYKEY(PKEY_Device_BIOSVersion, 0xEAEE7F1D, 0x6A33, 0x44D1, 0x94, 0x41, 0x5F, 0x46, 0xDE, 0xF2, 0x31, 0x98, 9);\n\nDEFINE_API_PKEY(PKEY_Write_Time,            WriteTime          , 0xf53b7e1c, 0x77e0, 0x4450, 0x8c, 0x5f, 0xa7, 0x6c, 0xc7, 0xfd, 0xe0, 0x58, 0x00000100); //    VT_FILETIME\n\n#ifdef FD_XP\nDEFINE_API_PKEY(PKEY_Device_InstanceId, DeviceInstanceId   , 0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57, 0x00000100); //    VT_LPWSTR\n#endif\nDEFINE_API_PKEY(PKEY_Device_Interface,  DeviceInterface    , 0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57, 0x00000101); //    VT_CLSID\n\nDEFINE_API_PKEY(PKEY_ExposedIIDs,           ExposedIIDs       , 0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57, 0x00003002); //  VT_VECTOR | VT_CLSID\nDEFINE_API_PKEY(PKEY_ExposedCLSIDs,         ExposedCLSIDs     , 0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57, 0x00003003); //  VT_VECTOR | VT_CLSID\nDEFINE_API_PKEY(PKEY_InstanceValidatorClsid,InstanceValidator , 0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57, 0x00003004); // VT_CLSID\n\n// FMTID_WSD = {92506491-FF95-4724-A05A-5B81885A7C92}\nDEFINE_GUID(FMTID_WSD, 0x92506491, 0xFF95, 0x4724, 0xA0, 0x5A, 0x5B, 0x81, 0x88, 0x5A, 0x7C, 0x92);\n\nDEFINE_API_PKEY(PKEY_WSD_AddressURI, WSD_AddressURI, 0x92506491, 0xFF95, 0x4724, 0xA0, 0x5A, 0x5B, 0x81, 0x88, 0x5A, 0x7C, 0x92, 0x00001000);   // VT_LPWSTR\nDEFINE_API_PKEY(PKEY_WSD_Types, WSD_Types, 0x92506491, 0xFF95, 0x4724, 0xA0, 0x5A, 0x5B, 0x81, 0x88, 0x5A, 0x7C, 0x92, 0x00001001); // VT_LPWSTR\nDEFINE_API_PKEY(PKEY_WSD_Scopes, WSD_Scopes, 0x92506491, 0xFF95, 0x4724, 0xA0, 0x5A, 0x5B, 0x81, 0x88, 0x5A, 0x7C, 0x92, 0x00001002);   // VT_LPWSTR\nDEFINE_API_PKEY(PKEY_WSD_MetadataVersion, WSD_MetadataVersion, 0x92506491, 0xFF95, 0x4724, 0xA0, 0x5A, 0x5B, 0x81, 0x88, 0x5A, 0x7C, 0x92, 0x00001003); //VT_UI8\nDEFINE_API_PKEY(PKEY_WSD_AppSeqInstanceID, WSD_AppSeqInstanceID, 0x92506491, 0xFF95, 0x4724, 0xA0, 0x5A, 0x5B, 0x81, 0x88, 0x5A, 0x7C, 0x92, 0x00001004);   // VT_UI8\nDEFINE_API_PKEY(PKEY_WSD_AppSeqSessionID, WSD_AppSeqSessionID, 0x92506491, 0xFF95, 0x4724, 0xA0, 0x5A, 0x5B, 0x81, 0x88, 0x5A, 0x7C, 0x92, 0x00001005); // VT_LPWSTR\nDEFINE_API_PKEY(PKEY_WSD_AppSeqMessageNumber, WSD_AppSeqMessageNumber, 0x92506491, 0xFF95, 0x4724, 0xA0, 0x5A, 0x5B, 0x81, 0x88, 0x5A, 0x7C, 0x92, 0x00001006); // VT_UI8\nDEFINE_API_PKEY(PKEY_WSD_XAddrs, WSD_XAddrs, 0x92506491, 0xFF95, 0x4724, 0xA0, 0x5A, 0x5B, 0x81, 0x88, 0x5A, 0x7C, 0x92, 0x00002000); // VT_LPWSTR or VT_VECTOR | VT_LPWSTR\n\nDEFINE_API_PKEY(PKEY_WSD_MetadataClean, WSD_MetadataClean, 0x92506491, 0xFF95, 0x4724, 0xA0, 0x5A, 0x5B, 0x81, 0x88, 0x5A, 0x7C, 0x92, 0x00000001);   // VT_BOOL\nDEFINE_API_PKEY(PKEY_WSD_ServiceInfo, WSD_ServiceInfo, 0x92506491, 0xFF95, 0x4724, 0xA0, 0x5A, 0x5B, 0x81, 0x88, 0x5A, 0x7C, 0x92, 0x00000002);   // VT_VECTOR|VT_VARIANT (variants are VT_UNKNOWN)\n\nDEFINE_API_PKEY(PKEY_PUBSVCS_TYPE, PUBSVCS_TYPE, 0xF1B88AD3, 0x109C, 0x4FD2, 0xBA, 0x3F, 0x53, 0x5A, 0x76, 0x5F, 0x82, 0xF4, 0x00005001); // VT_LPWSTR\nDEFINE_API_PKEY(PKEY_PUBSVCS_SCOPE, PUBSVCS_SCOPE, 0x2AE2B567, 0xEECB, 0x4A3E, 0xB7, 0x53, 0x54, 0xC7, 0x25, 0x49, 0x43, 0x66, 0x00005002);   // VT_LPWSTR | VT_VECTOR\nDEFINE_API_PKEY(PKEY_PUBSVCS_METADATA, PUBSVCS_METADATA, 0x63C6D5B8, 0xF73A, 0x4ACA, 0x96, 0x7E, 0x0C, 0xC7, 0x87, 0xE0, 0xB5, 0x59, 0x00005003); // VT_LPWSTR\nDEFINE_API_PKEY(PKEY_PUBSVCS_METADATA_VERSION, PUBSVCS_METADATA_VERSION, 0xC0C96C15, 0x1823, 0x4E5B, 0x93, 0x48, 0xE8, 0x25, 0x19, 0x92, 0x3F, 0x04, 0x00005004); // VT_UI8\nDEFINE_API_PKEY(PKEY_PUBSVCS_NETWORK_PROFILES_ALLOWED, PUBSVCS_NETWORK_PROFILES_ALLOWED, 0x63C6D5B8, 0xF73A, 0x4ACA, 0x96, 0x7E, 0x0C, 0xC7, 0x87, 0xE0, 0xB5, 0x59, 0x00005005); // VT_VECTOR | VT_LPWSTR\nDEFINE_API_PKEY(PKEY_PUBSVCS_NETWORK_PROFILES_DENIED, PUBSVCS_NETWORK_PROFILES_DENIED, 0x63C6D5B8, 0xF73A, 0x4ACA, 0x96, 0x7E, 0x0C, 0xC7, 0x87, 0xE0, 0xB5, 0x59, 0x00005006); // VT_VECTOR | VT_LPWSTR\nDEFINE_API_PKEY(PKEY_PUBSVCS_NETWORK_PROFILES_DEFAULT, PUBSVCS_NETWORK_PROFILES_DEFAULT, 0x63C6D5B8, 0xF73A, 0x4ACA, 0x96, 0x7E, 0x0C, 0xC7, 0x87, 0xE0, 0xB5, 0x59, 0x00005007); // VT_BOOL\n\n// FMTID_PNPX = {656A3BB3-ECC0-43FD-8477-4AE0404A96CD}\nDEFINE_GUID(FMTID_PNPX, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD);\n        // from Discovery messages\nDEFINE_PROPERTYKEY(PKEY_PNPX_GlobalIdentity, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00001000);   // VT_LPWSTR\nDEFINE_PROPERTYKEY(PKEY_PNPX_Types, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00001001);   // VT_LPWSTR | VT_VECTOR\nDEFINE_PROPERTYKEY(PKEY_PNPX_Scopes, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00001002);   // VT_LPWSTR | VT_VECTOR\nDEFINE_PROPERTYKEY(PKEY_PNPX_XAddrs, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00001003);   // VT_LPWSTR | VT_VECTOR\nDEFINE_PROPERTYKEY(PKEY_PNPX_MetadataVersion, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00001004);   // VT_UI8\nDEFINE_PROPERTYKEY(PKEY_PNPX_ID, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00001005);   // VT_LPWSTR\nDEFINE_PROPERTYKEY(PKEY_PNPX_RootProxy, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00001006);   // VT_BOOL\n\n        // for Directed Discovery\nDEFINE_PROPERTYKEY(PKEY_PNPX_RemoteAddress, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00001006);   // VT_LPWSTR\n\n        // from ThisModel metadata\nDEFINE_PROPERTYKEY(PKEY_PNPX_Manufacturer, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00002000);   // VT_LPWSTR (localizable)\nDEFINE_PROPERTYKEY(PKEY_PNPX_ManufacturerUrl, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00002001);   // VT_LPWSTR\nDEFINE_PROPERTYKEY(PKEY_PNPX_ModelName, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00002002);   // VT_LPWSTR (localizable)\nDEFINE_PROPERTYKEY(PKEY_PNPX_ModelNumber, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00002003);   // VT_LPWSTR\nDEFINE_PROPERTYKEY(PKEY_PNPX_ModelUrl, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00002004);   // VT_LPWSTR\nDEFINE_PROPERTYKEY(PKEY_PNPX_Upc, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00002005);   // VT_LPWSTR\nDEFINE_PROPERTYKEY(PKEY_PNPX_PresentationUrl, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00002006);   // VT_LPWSTR\n        // from ThisDevice metadata\nDEFINE_PROPERTYKEY(PKEY_PNPX_FriendlyName, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00003000);   // VT_LPWSTR (localizable)\nDEFINE_PROPERTYKEY(PKEY_PNPX_FirmwareVersion, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00003001);   // VT_LPWSTR\nDEFINE_PROPERTYKEY(PKEY_PNPX_SerialNumber, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00003002);   // VT_LPWSTR\nDEFINE_PROPERTYKEY(PKEY_PNPX_DeviceCategory, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00003004);   // VT_LPWSTR | VT_VECTOR\n        // DeviceCategory values\n#define PNPX_DEVICECATEGORY_COMPUTER                            L\"Computers\"\n#define PNPX_DEVICECATEGORY_INPUTDEVICE                         L\"Input\"\n#define PNPX_DEVICECATEGORY_PRINTER                             L\"Printers\"\n#define PNPX_DEVICECATEGORY_SCANNER                             L\"Scanners\"\n#define PNPX_DEVICECATEGORY_FAX                                 L\"FAX\"\n#define PNPX_DEVICECATEGORY_MFP                                 L\"MFP\"\n#define PNPX_DEVICECATEGORY_CAMERA                              L\"Cameras\"\n#define PNPX_DEVICECATEGORY_STORAGE                             L\"Storage\"\n#define PNPX_DEVICECATEGORY_NETWORK_INFRASTRUCTURE              L\"NetworkInfrastructure\"\n#define PNPX_DEVICECATEGORY_DISPLAYS                            L\"Displays\"\n#define PNPX_DEVICECATEGORY_MULTIMEDIA_DEVICE                   L\"MediaDevices\"\n#define PNPX_DEVICECATEGORY_GAMING_DEVICE                       L\"Gaming\"\n#define PNPX_DEVICECATEGORY_TELEPHONE                           L\"Phones\"\n#define PNPX_DEVICECATEGORY_HOME_AUTOMATION_SYSTEM              L\"HomeAutomation\"\n#define PNPX_DEVICECATEGORY_HOME_SECURITY_SYSTEM                L\"HomeSecurity\"\n#define PNPX_DEVICECATEGORY_OTHER                               L\"Other\"\nDEFINE_PROPERTYKEY(PKEY_PNPX_DeviceCategory_Desc, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00003005);   // VT_LPWSTR | VT_VECTOR\n\nDEFINE_PROPERTYKEY(PKEY_PNPX_PhysicalAddress, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00003006);   // VT_UI1 | VT_VECTOR\nDEFINE_PROPERTYKEY(PKEY_PNPX_NetworkInterfaceLuid, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00003007);   // VT_UI8\nDEFINE_PROPERTYKEY(PKEY_PNPX_NetworkInterfaceGuid, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00003008);   // VT_LPWSTR\nDEFINE_PROPERTYKEY(PKEY_PNPX_IpAddress, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00003009);   // VT_LPWSTR | VT_VECTOR\n        // from Relationship metadata\nDEFINE_PROPERTYKEY(PKEY_PNPX_ServiceAddress, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00004000);   // VT_LPWSTR | VT_VECTOR\nDEFINE_PROPERTYKEY(PKEY_PNPX_ServiceId, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00004001);   // VT_LPWSTR\nDEFINE_PROPERTYKEY(PKEY_PNPX_ServiceTypes, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00004002);   // VT_LPWSTR | VT_VECTOR\n        // Association DB PKEYs\nDEFINE_API_PKEY(PKEY_PNPX_Devnode, PnPXDevNode, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00000001); // VT_BOOL\nDEFINE_API_PKEY(PKEY_PNPX_AssociationState, AssociationState, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00000002); // VT_UINT\nDEFINE_API_PKEY(PKEY_PNPX_AssociatedInstanceId, AssociatedInstanceId, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00000003); // VT_LPWSTR\n        // for Computer Discovery\nDEFINE_PROPERTYKEY(PKEY_PNPX_DomainName, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00005000);   // VT_LPWSTR\n// Use PKEY_ComputerName (propkey.h) DEFINE_PROPERTYKEY(PKEY_PNPX_MachineName, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00005001);   // VT_LPWSTR\nDEFINE_PROPERTYKEY(PKEY_PNPX_ShareName, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00005002);   // VT_LPWSTR\n\n    // SSDP Provider custom properties\nDEFINE_PROPERTYKEY(PKEY_SSDP_AltLocationInfo, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00006000);   // VT_LPWSTR\nDEFINE_PROPERTYKEY(PKEY_SSDP_DevLifeTime, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00006001);   // VT_UI4\nDEFINE_PROPERTYKEY(PKEY_SSDP_NetworkInterface, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00006002);   // VT_BOOL\n\n// FMTID_PNPXDynamicProperty = {4FC5077E-B686-44BE-93E3-86CAFE368CCD}\nDEFINE_GUID(FMTID_PNPXDynamicProperty, 0x4FC5077E, 0xB686, 0x44BE, 0x93, 0xE3, 0x86, 0xCA, 0xFE, 0x36, 0x8C, 0xCD);\n\nDEFINE_PROPERTYKEY(PKEY_PNPX_Installable, 0x4FC5077E, 0xB686, 0x44BE, 0x93, 0xE3, 0x86, 0xCA, 0xFE, 0x36, 0x8C, 0xCD, 0x00000001); // VT_BOOL\nDEFINE_PROPERTYKEY(PKEY_PNPX_Associated, 0x4FC5077E, 0xB686, 0x44BE, 0x93, 0xE3, 0x86, 0xCA, 0xFE, 0x36, 0x8C, 0xCD, 0x00000002); // VT_BOOL\n// PKEY_PNPX_Installed to be deprecated in Longhorn Server timeframe\n// this PKEY really represents Associated state\n#define PKEY_PNPX_Installed PKEY_PNPX_Associated    // Deprecated! Please use PKEY_PNPX_Associated\nDEFINE_PROPERTYKEY(PKEY_PNPX_CompatibleTypes, 0x4FC5077E, 0xB686, 0x44BE, 0x93, 0xE3, 0x86, 0xCA, 0xFE, 0x36, 0x8C, 0xCD, 0x00000003); // VT_LPWSTR | VT_VECTOR\n\n    // WNET Provider properties\nDEFINE_PROPERTYKEY(PKEY_WNET_Scope, 0xdebda43a, 0x37b3, 0x4383, 0x91, 0xE7, 0x44, 0x98, 0xda, 0x29, 0x95, 0xab, 0x00000001); // VT_UINT\nDEFINE_PROPERTYKEY(PKEY_WNET_Type, 0xdebda43a, 0x37b3, 0x4383, 0x91, 0xE7, 0x44, 0x98, 0xda, 0x29, 0x95, 0xab, 0x00000002); // VT_UINT\nDEFINE_PROPERTYKEY(PKEY_WNET_DisplayType, 0xdebda43a, 0x37b3, 0x4383, 0x91, 0xE7, 0x44, 0x98, 0xda, 0x29, 0x95, 0xab, 0x00000003); // VT_UINT\nDEFINE_PROPERTYKEY(PKEY_WNET_Usage, 0xdebda43a, 0x37b3, 0x4383, 0x91, 0xE7, 0x44, 0x98, 0xda, 0x29, 0x95, 0xab, 0x00000004); // VT_UINT\nDEFINE_PROPERTYKEY(PKEY_WNET_LocalName, 0xdebda43a, 0x37b3, 0x4383, 0x91, 0xE7, 0x44, 0x98, 0xda, 0x29, 0x95, 0xab, 0x00000005); // VT_LPWSTR\nDEFINE_PROPERTYKEY(PKEY_WNET_RemoteName, 0xdebda43a, 0x37b3, 0x4383, 0x91, 0xE7, 0x44, 0x98, 0xda, 0x29, 0x95, 0xab, 0x00000006); // VT_LPWSTR\nDEFINE_PROPERTYKEY(PKEY_WNET_Comment, 0xdebda43a, 0x37b3, 0x4383, 0x91, 0xE7, 0x44, 0x98, 0xda, 0x29, 0x95, 0xab, 0x00000007); // VT_LPWSTR\nDEFINE_PROPERTYKEY(PKEY_WNET_Provider, 0xdebda43a, 0x37b3, 0x4383, 0x91, 0xE7, 0x44, 0x98, 0xda, 0x29, 0x95, 0xab, 0x00000008); // VT_LPWSTR\n\n\n    // WCN Provider properties\n\nDEFINE_PROPERTYKEY(PKEY_WCN_Version, 0x88190b80, 0x4684, 0x11da, 0xa2, 0x6a, 0x00, 0x02, 0xb3, 0x98, 0x8e, 0x81, 0x00000001); // VT_UI1\nDEFINE_PROPERTYKEY(PKEY_WCN_RequestType, 0x88190b81, 0x4684, 0x11da, 0xa2, 0x6a, 0x00, 0x02, 0xb3, 0x98, 0x8e, 0x81, 0x00000002); // VT_INT\nDEFINE_PROPERTYKEY(PKEY_WCN_AuthType, 0x88190b82, 0x4684, 0x11da, 0xa2, 0x6a, 0x00, 0x02, 0xb3, 0x98, 0x8e, 0x81, 0x00000003); // VT_INT\nDEFINE_PROPERTYKEY(PKEY_WCN_EncryptType, 0x88190b83, 0x4684, 0x11da, 0xa2, 0x6a, 0x00, 0x02, 0xb3, 0x98, 0x8e, 0x81, 0x00000004); // VT_INT\nDEFINE_PROPERTYKEY(PKEY_WCN_ConnType, 0x88190b84, 0x4684, 0x11da, 0xa2, 0x6a, 0x00, 0x02, 0xb3, 0x98, 0x8e, 0x81, 0x00000005); // VT_INT\nDEFINE_PROPERTYKEY(PKEY_WCN_ConfigMethods, 0x88190b85, 0x4684, 0x11da, 0xa2, 0x6a, 0x00, 0x02, 0xb3, 0x98, 0x8e, 0x81, 0x00000006); // VT_INT\n// map WCN DeviceType to PKEY_PNPX_DeviceCategory\n//DEFINE_PROPERTYKEY(PKEY_WCN_DeviceType, 0x88190b86, 0x4684, 0x11da, 0xa2, 0x6a, 0x00, 0x02, 0xb3, 0x98, 0x8e, 0x81, 0x00000007); // VT_INT\nDEFINE_PROPERTYKEY(PKEY_WCN_RfBand, 0x88190b87, 0x4684, 0x11da, 0xa2, 0x6a, 0x00, 0x02, 0xb3, 0x98, 0x8e, 0x81, 0x00000008); // VT_INT\nDEFINE_PROPERTYKEY(PKEY_WCN_AssocState, 0x88190b88, 0x4684, 0x11da, 0xa2, 0x6a, 0x00, 0x02, 0xb3, 0x98, 0x8e, 0x81, 0x00000009); // VT_INT\nDEFINE_PROPERTYKEY(PKEY_WCN_ConfigError, 0x88190b89, 0x4684, 0x11da, 0xa2, 0x6a, 0x00, 0x02, 0xb3, 0x98, 0x8e, 0x81, 0x0000000a); // VT_INT\nDEFINE_PROPERTYKEY(PKEY_WCN_ConfigState, 0x88190b89, 0x4684, 0x11da, 0xa2, 0x6a, 0x00, 0x02, 0xb3, 0x98, 0x8e, 0x81, 0x0000000b); // VT_UI1\nDEFINE_PROPERTYKEY(PKEY_WCN_DevicePasswordId, 0x88190b89, 0x4684, 0x11da, 0xa2, 0x6a, 0x00, 0x02, 0xb3, 0x98, 0x8e, 0x81, 0x0000000c); // VT_INT\nDEFINE_PROPERTYKEY(PKEY_WCN_OSVersion, 0x88190b89, 0x4684, 0x11da, 0xa2, 0x6a, 0x00, 0x02, 0xb3, 0x98, 0x8e, 0x81, 0x0000000d); // VT_UINT\nDEFINE_PROPERTYKEY(PKEY_WCN_VendorExtension, 0x88190b8a, 0x4684, 0x11da, 0xa2, 0x6a, 0x00, 0x02, 0xb3, 0x98, 0x8e, 0x81, 0x0000000e); // VT_UI1 | VT_VECTOR\nDEFINE_PROPERTYKEY(PKEY_WCN_RegistrarType, 0x88190b8b, 0x4684, 0x11da, 0xa2, 0x6a, 0x00, 0x02, 0xb3, 0x98, 0x8e, 0x81, 0x0000000f); // VT_INT\n\n//-----------------------------------------------------------------------------\n// DriverPackage properties\n\n#define PKEY_DriverPackage_Model                PKEY_DrvPkg_Model\n#define PKEY_DriverPackage_VendorWebSite        PKEY_DrvPkg_VendorWebSite\n#define PKEY_DriverPackage_DetailedDescription  PKEY_DrvPkg_DetailedDescription\n#define PKEY_DriverPackage_DocumentationLink    PKEY_DrvPkg_DocumentationLink\n#define PKEY_DriverPackage_Icon                 PKEY_DrvPkg_Icon\n#define PKEY_DriverPackage_BrandingIcon         PKEY_DrvPkg_BrandingIcon\n\n//-----------------------------------------------------------------------------\n// Hardware properties\n\nDEFINE_PROPERTYKEY(PKEY_Hardware_Devinst, 0x5EAF3EF2, 0xE0CA, 0x4598, 0xBF, 0x06, 0x71, 0xED, 0x1D, 0x9D, 0xD9, 0x53, 4097);\n\n//  Name:     System.Hardware.DisplayAttribute -- PKEY_Hardware_DisplayAttribute\n//  Type:     Unspecified -- VT_NULL\n//  FormatID: 5EAF3EF2-E0CA-4598-BF06-71ED1D9DD953, 5\nDEFINE_PROPERTYKEY(PKEY_Hardware_DisplayAttribute, 0x5EAF3EF2, 0xE0CA, 0x4598, 0xBF, 0x06, 0x71, 0xED, 0x1D, 0x9D, 0xD9, 0x53, 5);\n\n//  Name:     System.Hardware.DriverDate -- PKEY_Hardware_DriverDate\n//  Type:     Unspecified -- VT_NULL\n//  FormatID: 5EAF3EF2-E0CA-4598-BF06-71ED1D9DD953, 11\nDEFINE_PROPERTYKEY(PKEY_Hardware_DriverDate, 0x5EAF3EF2, 0xE0CA, 0x4598, 0xBF, 0x06, 0x71, 0xED, 0x1D, 0x9D, 0xD9, 0x53, 11);\n\n//  Name:     System.Hardware.DriverProvider -- PKEY_Hardware_DriverProvider\n//  Type:     Unspecified -- VT_NULL\n//  FormatID: 5EAF3EF2-E0CA-4598-BF06-71ED1D9DD953, 10\nDEFINE_PROPERTYKEY(PKEY_Hardware_DriverProvider, 0x5EAF3EF2, 0xE0CA, 0x4598, 0xBF, 0x06, 0x71, 0xED, 0x1D, 0x9D, 0xD9, 0x53, 10);\n\n//  Name:     System.Hardware.DriverVersion -- PKEY_Hardware_DriverVersion\n//  Type:     Unspecified -- VT_NULL\n//  FormatID: 5EAF3EF2-E0CA-4598-BF06-71ED1D9DD953, 9\nDEFINE_PROPERTYKEY(PKEY_Hardware_DriverVersion, 0x5EAF3EF2, 0xE0CA, 0x4598, 0xBF, 0x06, 0x71, 0xED, 0x1D, 0x9D, 0xD9, 0x53, 9);\n\n//  Name:     System.Hardware.Function -- PKEY_Hardware_Function\n//  Type:     Unspecified -- VT_NULL\n//  FormatID: 5EAF3EF2-E0CA-4598-BF06-71ED1D9DD953, 4099\nDEFINE_PROPERTYKEY(PKEY_Hardware_Function, 0x5EAF3EF2, 0xE0CA, 0x4598, 0xBF, 0x06, 0x71, 0xED, 0x1D, 0x9D, 0xD9, 0x53, 4099);\n\n//  Name:     System.Hardware.Icon -- PKEY_Hardware_Icon\n//  Type:     Unspecified -- VT_NULL\n//  FormatID: 5EAF3EF2-E0CA-4598-BF06-71ED1D9DD953, 3\nDEFINE_PROPERTYKEY(PKEY_Hardware_Icon, 0x5EAF3EF2, 0xE0CA, 0x4598, 0xBF, 0x06, 0x71, 0xED, 0x1D, 0x9D, 0xD9, 0x53, 3);\n\n//  Name:     System.Hardware.Image -- PKEY_Hardware_Image\n//  Type:     Unspecified -- VT_NULL\n//  FormatID: 5EAF3EF2-E0CA-4598-BF06-71ED1D9DD953, 4098\nDEFINE_PROPERTYKEY(PKEY_Hardware_Image, 0x5EAF3EF2, 0xE0CA, 0x4598, 0xBF, 0x06, 0x71, 0xED, 0x1D, 0x9D, 0xD9, 0x53, 4098);\n\n//  Name:     System.Hardware.Manufacturer -- PKEY_Hardware_Manufacturer\n//  Type:     Unspecified -- VT_NULL\n//  FormatID: 5EAF3EF2-E0CA-4598-BF06-71ED1D9DD953, 6\nDEFINE_PROPERTYKEY(PKEY_Hardware_Manufacturer, 0x5EAF3EF2, 0xE0CA, 0x4598, 0xBF, 0x06, 0x71, 0xED, 0x1D, 0x9D, 0xD9, 0x53, 6);\n\n//  Name:     System.Hardware.Model -- PKEY_Hardware_Model\n//  Type:     Unspecified -- VT_NULL\n//  FormatID: 5EAF3EF2-E0CA-4598-BF06-71ED1D9DD953, 7\nDEFINE_PROPERTYKEY(PKEY_Hardware_Model, 0x5EAF3EF2, 0xE0CA, 0x4598, 0xBF, 0x06, 0x71, 0xED, 0x1D, 0x9D, 0xD9, 0x53, 7);\n\n//  Name:     System.Hardware.Name -- PKEY_Hardware_Name\n//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)\n//  FormatID: 5EAF3EF2-E0CA-4598-BF06-71ED1D9DD953, 2\nDEFINE_PROPERTYKEY(PKEY_Hardware_Name, 0x5EAF3EF2, 0xE0CA, 0x4598, 0xBF, 0x06, 0x71, 0xED, 0x1D, 0x9D, 0xD9, 0x53, 2);\n\n//  Name:     System.Hardware.SerialNumber -- PKEY_Hardware_SerialNumber\n//  Type:     Unspecified -- VT_NULL\n//  FormatID: 5EAF3EF2-E0CA-4598-BF06-71ED1D9DD953, 8\nDEFINE_PROPERTYKEY(PKEY_Hardware_SerialNumber, 0x5EAF3EF2, 0xE0CA, 0x4598, 0xBF, 0x06, 0x71, 0xED, 0x1D, 0x9D, 0xD9, 0x53, 8);\n\n//  Name:     System.Hardware.ShellAttributes -- PKEY_Hardware_ShellAttributes\n//  Type:     Unspecified -- VT_NULL\n//  FormatID: 5EAF3EF2-E0CA-4598-BF06-71ED1D9DD953, 4100\nDEFINE_PROPERTYKEY(PKEY_Hardware_ShellAttributes, 0x5EAF3EF2, 0xE0CA, 0x4598, 0xBF, 0x06, 0x71, 0xED, 0x1D, 0x9D, 0xD9, 0x53, 4100);\n\n//  Name:     System.Hardware.Status -- PKEY_Hardware_Status\n//  Type:     Unspecified -- VT_NULL\n//  FormatID: 5EAF3EF2-E0CA-4598-BF06-71ED1D9DD953, 4096\nDEFINE_PROPERTYKEY(PKEY_Hardware_Status, 0x5EAF3EF2, 0xE0CA, 0x4598, 0xBF, 0x06, 0x71, 0xED, 0x1D, 0x9D, 0xD9, 0x53, 4096);\n\n\n"
  },
  {
    "path": "thirdparty/portaudio/src/hostapi/wasapi/mingw-include/functiondiscoverykeys_devpkey.h",
    "content": "/**\n * This file has no copyright assigned and is placed in the Public Domain.\n * This file is part of the mingw-w64 runtime package.\n * No warranty is given; refer to the file DISCLAIMER.PD within this package.\n */\n#ifndef _INC_FUNCTIONDISCOVERYKEYS\n#define _INC_FUNCTIONDISCOVERYKEYS\n\n#include <propkeydef.h>\n\nDEFINE_PROPERTYKEY(PKEY_Device_FriendlyName, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 14);\n\n#endif /* _INC_FUNCTIONDISCOVERYKEYS */\n"
  },
  {
    "path": "thirdparty/portaudio/src/hostapi/wasapi/mingw-include/ks.h",
    "content": "/**\n * This file has no copyright assigned and is placed in the Public Domain.\n * This file is part of the w64 mingw-runtime package.\n * No warranty is given; refer to the file DISCLAIMER.PD within this package.\n */\n#ifndef _KS_\n#define _KS_\n\n#if __GNUC__ >= 3\n#pragma GCC system_header\n#endif\n\n#ifndef __MINGW_EXTENSION\n#if defined(__GNUC__) || defined(__GNUG__)\n#define __MINGW_EXTENSION __extension__\n#else\n#define __MINGW_EXTENSION\n#endif\n#endif \n\n#ifdef __TCS__\n#define _KS_NO_ANONYMOUS_STRUCTURES_ 1\n#endif\n\n#ifdef  _KS_NO_ANONYMOUS_STRUCTURES_\n#define _KS_ANON_STRUCT(X)\t\t\tstruct X\n#else\n#define _KS_ANON_STRUCT(X)\t__MINGW_EXTENSION struct\n#endif\n\n#ifndef _NTRTL_\n#ifndef DEFINE_GUIDEX\n#define DEFINE_GUIDEX(name) EXTERN_C const CDECL GUID name\n#endif\n#ifndef STATICGUIDOF\n#define STATICGUIDOF(guid) STATIC_##guid\n#endif\n#endif /* _NTRTL_ */\n\n#ifndef SIZEOF_ARRAY\n#define SIZEOF_ARRAY(ar) (sizeof(ar)/sizeof((ar)[0]))\n#endif\n\n#define DEFINE_GUIDSTRUCT(g,n) DEFINE_GUIDEX(n)\n#define DEFINE_GUIDNAMED(n) n\n\n#define STATIC_GUID_NULL\t\t\t\t\t\t\\\n\t0x00000000L,0x0000,0x0000,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00\n\nDEFINE_GUIDSTRUCT(\"00000000-0000-0000-0000-000000000000\",GUID_NULL);\n#define GUID_NULL DEFINE_GUIDNAMED(GUID_NULL)\n\n#define IOCTL_KS_PROPERTY CTL_CODE(FILE_DEVICE_KS,0x000,METHOD_NEITHER,FILE_ANY_ACCESS)\n#define IOCTL_KS_ENABLE_EVENT CTL_CODE(FILE_DEVICE_KS,0x001,METHOD_NEITHER,FILE_ANY_ACCESS)\n#define IOCTL_KS_DISABLE_EVENT CTL_CODE(FILE_DEVICE_KS,0x002,METHOD_NEITHER,FILE_ANY_ACCESS)\n#define IOCTL_KS_METHOD CTL_CODE(FILE_DEVICE_KS,0x003,METHOD_NEITHER,FILE_ANY_ACCESS)\n#define IOCTL_KS_WRITE_STREAM CTL_CODE(FILE_DEVICE_KS,0x004,METHOD_NEITHER,FILE_WRITE_ACCESS)\n#define IOCTL_KS_READ_STREAM CTL_CODE(FILE_DEVICE_KS,0x005,METHOD_NEITHER,FILE_READ_ACCESS)\n#define IOCTL_KS_RESET_STATE CTL_CODE(FILE_DEVICE_KS,0x006,METHOD_NEITHER,FILE_ANY_ACCESS)\n\ntypedef enum {\n  KSRESET_BEGIN,\n  KSRESET_END\n} KSRESET;\n\ntypedef enum {\n  KSSTATE_STOP,\n  KSSTATE_ACQUIRE,\n  KSSTATE_PAUSE,\n  KSSTATE_RUN\n} KSSTATE,*PKSSTATE;\n\n#define KSPRIORITY_LOW\t\t0x00000001\n#define KSPRIORITY_NORMAL\t0x40000000\n#define KSPRIORITY_HIGH\t\t0x80000000\n#define KSPRIORITY_EXCLUSIVE\t0xFFFFFFFF\n\ntypedef struct {\n  ULONG PriorityClass;\n  ULONG PrioritySubClass;\n} KSPRIORITY,*PKSPRIORITY;\n\ntypedef struct {\n  __MINGW_EXTENSION union {\n    _KS_ANON_STRUCT(_IDENTIFIER)\n    {\n      GUID Set;\n      ULONG Id;\n      ULONG Flags;\n    };\n    LONGLONG Alignment;\n  };\n} KSIDENTIFIER,*PKSIDENTIFIER;\n\ntypedef KSIDENTIFIER KSPROPERTY,*PKSPROPERTY,KSMETHOD,*PKSMETHOD,KSEVENT,*PKSEVENT;\n\n#define KSMETHOD_TYPE_NONE\t\t0x00000000\n#define KSMETHOD_TYPE_READ\t\t0x00000001\n#define KSMETHOD_TYPE_WRITE\t\t0x00000002\n#define KSMETHOD_TYPE_MODIFY\t\t0x00000003\n#define KSMETHOD_TYPE_SOURCE\t\t0x00000004\n\n#define KSMETHOD_TYPE_SEND\t\t0x00000001\n#define KSMETHOD_TYPE_SETSUPPORT\t0x00000100\n#define KSMETHOD_TYPE_BASICSUPPORT\t0x00000200\n\n#define KSMETHOD_TYPE_TOPOLOGY\t\t0x10000000\n\n#define KSPROPERTY_TYPE_GET\t\t0x00000001\n#define KSPROPERTY_TYPE_SET\t\t0x00000002\n#define KSPROPERTY_TYPE_SETSUPPORT\t0x00000100\n#define KSPROPERTY_TYPE_BASICSUPPORT\t0x00000200\n#define KSPROPERTY_TYPE_RELATIONS\t0x00000400\n#define KSPROPERTY_TYPE_SERIALIZESET\t0x00000800\n#define KSPROPERTY_TYPE_UNSERIALIZESET\t0x00001000\n#define KSPROPERTY_TYPE_SERIALIZERAW\t0x00002000\n#define KSPROPERTY_TYPE_UNSERIALIZERAW\t0x00004000\n#define KSPROPERTY_TYPE_SERIALIZESIZE\t0x00008000\n#define KSPROPERTY_TYPE_DEFAULTVALUES\t0x00010000\n\n#define KSPROPERTY_TYPE_TOPOLOGY\t0x10000000\n\ntypedef struct {\n  KSPROPERTY Property;\n  ULONG NodeId;\n  ULONG Reserved;\n} KSP_NODE,*PKSP_NODE;\n\ntypedef struct {\n  KSMETHOD Method;\n  ULONG NodeId;\n  ULONG Reserved;\n} KSM_NODE,*PKSM_NODE;\n\ntypedef struct {\n  KSEVENT Event;\n  ULONG NodeId;\n  ULONG Reserved;\n} KSE_NODE,*PKSE_NODE;\n\n#define STATIC_KSPROPTYPESETID_General\t\t\t\t\t\\\n\t0x97E99BA0L,0xBDEA,0x11CF,0xA5,0xD6,0x28,0xDB,0x04,0xC1,0x00,0x00\nDEFINE_GUIDSTRUCT(\"97E99BA0-BDEA-11CF-A5D6-28DB04C10000\",KSPROPTYPESETID_General);\n#define KSPROPTYPESETID_General DEFINE_GUIDNAMED(KSPROPTYPESETID_General)\n\ntypedef struct {\n  ULONG Size;\n  ULONG Count;\n} KSMULTIPLE_ITEM,*PKSMULTIPLE_ITEM;\n\ntypedef struct {\n  ULONG AccessFlags;\n  ULONG DescriptionSize;\n  KSIDENTIFIER PropTypeSet;\n  ULONG MembersListCount;\n  ULONG Reserved;\n} KSPROPERTY_DESCRIPTION,*PKSPROPERTY_DESCRIPTION;\n\n#define KSPROPERTY_MEMBER_RANGES\t\t0x00000001\n#define KSPROPERTY_MEMBER_STEPPEDRANGES\t\t0x00000002\n#define KSPROPERTY_MEMBER_VALUES\t\t0x00000003\n\n#define KSPROPERTY_MEMBER_FLAG_DEFAULT\t\t0x00000001\n#define KSPROPERTY_MEMBER_FLAG_BASICSUPPORT_MULTICHANNEL 0x00000002\n#define KSPROPERTY_MEMBER_FLAG_BASICSUPPORT_UNIFORM\t0x00000004\n\ntypedef struct {\n  ULONG MembersFlags;\n  ULONG MembersSize;\n  ULONG MembersCount;\n  ULONG Flags;\n} KSPROPERTY_MEMBERSHEADER,*PKSPROPERTY_MEMBERSHEADER;\n\ntypedef union {\n  _KS_ANON_STRUCT(_SIGNED)\n  {\n    LONG SignedMinimum;\n    LONG SignedMaximum;\n  };\n  _KS_ANON_STRUCT(_UNSIGNED)\n  {\n    ULONG UnsignedMinimum;\n    ULONG UnsignedMaximum;\n  };\n} KSPROPERTY_BOUNDS_LONG,*PKSPROPERTY_BOUNDS_LONG;\n\ntypedef union {\n  _KS_ANON_STRUCT(_SIGNED64)\n  {\n    LONGLONG SignedMinimum;\n    LONGLONG SignedMaximum;\n  };\n  _KS_ANON_STRUCT(_UNSIGNED64)\n  {\n    DWORDLONG UnsignedMinimum;\n    DWORDLONG UnsignedMaximum;\n  };\n} KSPROPERTY_BOUNDS_LONGLONG,*PKSPROPERTY_BOUNDS_LONGLONG;\n\ntypedef struct {\n  ULONG SteppingDelta;\n  ULONG Reserved;\n  KSPROPERTY_BOUNDS_LONG Bounds;\n} KSPROPERTY_STEPPING_LONG,*PKSPROPERTY_STEPPING_LONG;\n\ntypedef struct {\n  DWORDLONG SteppingDelta;\n  KSPROPERTY_BOUNDS_LONGLONG Bounds;\n} KSPROPERTY_STEPPING_LONGLONG,*PKSPROPERTY_STEPPING_LONGLONG;\n\n#if defined(_NTDDK_)\ntypedef struct _KSDEVICE_DESCRIPTOR KSDEVICE_DESCRIPTOR, *PKSDEVICE_DESCRIPTOR;\ntypedef struct _KSDEVICE_DISPATCH KSDEVICE_DISPATCH, *PKSDEVICE_DISPATCH;\ntypedef struct _KSDEVICE KSDEVICE, *PKSDEVICE;\ntypedef struct _KSFILTERFACTORY KSFILTERFACTORY, *PKSFILTERFACTORY;\ntypedef struct _KSFILTER_DESCRIPTOR KSFILTER_DESCRIPTOR, *PKSFILTER_DESCRIPTOR;\ntypedef struct _KSFILTER_DISPATCH KSFILTER_DISPATCH, *PKSFILTER_DISPATCH;\ntypedef struct _KSFILTER KSFILTER, *PKSFILTER;\ntypedef struct _KSPIN_DESCRIPTOR_EX KSPIN_DESCRIPTOR_EX, *PKSPIN_DESCRIPTOR_EX;\ntypedef struct _KSPIN_DISPATCH KSPIN_DISPATCH, *PKSPIN_DISPATCH;\ntypedef struct _KSCLOCK_DISPATCH KSCLOCK_DISPATCH, *PKSCLOCK_DISPATCH;\ntypedef struct _KSALLOCATOR_DISPATCH KSALLOCATOR_DISPATCH, *PKSALLOCATOR_DISPATCH;\ntypedef struct _KSPIN KSPIN, *PKSPIN;\ntypedef struct _KSNODE_DESCRIPTOR KSNODE_DESCRIPTOR, *PKSNODE_DESCRIPTOR;\ntypedef struct _KSSTREAM_POINTER_OFFSET KSSTREAM_POINTER_OFFSET, *PKSSTREAM_POINTER_OFFSET;\ntypedef struct _KSSTREAM_POINTER KSSTREAM_POINTER, *PKSSTREAM_POINTER;\ntypedef struct _KSMAPPING KSMAPPING, *PKSMAPPING;\ntypedef struct _KSPROCESSPIN KSPROCESSPIN, *PKSPROCESSPIN;\ntypedef struct _KSPROCESSPIN_INDEXENTRY KSPROCESSPIN_INDEXENTRY, *PKSPROCESSPIN_INDEXENTRY;\n#endif /* _NTDDK_ */\n\ntypedef PVOID PKSWORKER;\n\n\ntypedef struct {\n  ULONG NotificationType;\n  __MINGW_EXTENSION union {\n    struct {\n      HANDLE Event;\n      ULONG_PTR Reserved[2];\n    } EventHandle;\n    struct {\n      HANDLE Semaphore;\n      ULONG Reserved;\n      LONG Adjustment;\n    } SemaphoreHandle;\n#if defined(_NTDDK_)\n    struct {\n      PVOID Event;\n      KPRIORITY Increment;\n      ULONG_PTR Reserved;\n    } EventObject;\n    struct {\n      PVOID Semaphore;\n      KPRIORITY Increment;\n      LONG Adjustment;\n    } SemaphoreObject;\n    struct {\n      PKDPC Dpc;\n      ULONG ReferenceCount;\n      ULONG_PTR Reserved;\n    } Dpc;\n    struct {\n      PWORK_QUEUE_ITEM WorkQueueItem;\n      WORK_QUEUE_TYPE WorkQueueType;\n      ULONG_PTR Reserved;\n    } WorkItem;\n    struct {\n      PWORK_QUEUE_ITEM WorkQueueItem;\n      PKSWORKER KsWorkerObject;\n      ULONG_PTR Reserved;\n    } KsWorkItem;\n#endif /* _NTDDK_ */\n    struct {\n      PVOID Unused;\n      LONG_PTR Alignment[2];\n    } Alignment;\n  };\n} KSEVENTDATA,*PKSEVENTDATA;\n\n#define KSEVENTF_EVENT_HANDLE\t\t0x00000001\n#define KSEVENTF_SEMAPHORE_HANDLE\t0x00000002\n#if defined(_NTDDK_)\n#define KSEVENTF_EVENT_OBJECT\t\t0x00000004\n#define KSEVENTF_SEMAPHORE_OBJECT\t0x00000008\n#define KSEVENTF_DPC\t\t\t0x00000010\n#define KSEVENTF_WORKITEM\t\t0x00000020\n#define KSEVENTF_KSWORKITEM\t\t0x00000080\n#endif /* _NTDDK_ */\n\n#define KSEVENT_TYPE_ENABLE\t\t0x00000001\n#define KSEVENT_TYPE_ONESHOT\t\t0x00000002\n#define KSEVENT_TYPE_ENABLEBUFFERED\t0x00000004\n#define KSEVENT_TYPE_SETSUPPORT\t\t0x00000100\n#define KSEVENT_TYPE_BASICSUPPORT\t0x00000200\n#define KSEVENT_TYPE_QUERYBUFFER\t0x00000400\n\n#define KSEVENT_TYPE_TOPOLOGY\t\t0x10000000\n\ntypedef struct {\n  KSEVENT Event;\n  PKSEVENTDATA EventData;\n  PVOID Reserved;\n} KSQUERYBUFFER,*PKSQUERYBUFFER;\n\ntypedef struct {\n  ULONG Size;\n  ULONG Flags;\n  __MINGW_EXTENSION union {\n    HANDLE ObjectHandle;\n    PVOID ObjectPointer;\n  };\n  PVOID Reserved;\n  KSEVENT Event;\n  KSEVENTDATA EventData;\n} KSRELATIVEEVENT;\n\n#define KSRELATIVEEVENT_FLAG_HANDLE\t0x00000001\n#define KSRELATIVEEVENT_FLAG_POINTER\t0x00000002\n\ntypedef struct {\n  KSEVENTDATA EventData;\n  LONGLONG MarkTime;\n} KSEVENT_TIME_MARK,*PKSEVENT_TIME_MARK;\n\ntypedef struct {\n  KSEVENTDATA EventData;\n  LONGLONG TimeBase;\n  LONGLONG Interval;\n} KSEVENT_TIME_INTERVAL,*PKSEVENT_TIME_INTERVAL;\n\ntypedef struct {\n  LONGLONG TimeBase;\n  LONGLONG Interval;\n} KSINTERVAL,*PKSINTERVAL;\n\n#define STATIC_KSPROPSETID_General\t\t\t\t\t\\\n\t0x1464EDA5L,0x6A8F,0x11D1,0x9A,0xA7,0x00,0xA0,0xC9,0x22,0x31,0x96\nDEFINE_GUIDSTRUCT(\"1464EDA5-6A8F-11D1-9AA7-00A0C9223196\",KSPROPSETID_General);\n#define KSPROPSETID_General DEFINE_GUIDNAMED(KSPROPSETID_General)\n\ntypedef enum {\n  KSPROPERTY_GENERAL_COMPONENTID\n} KSPROPERTY_GENERAL;\n\ntypedef struct {\n  GUID Manufacturer;\n  GUID Product;\n  GUID Component;\n  GUID Name;\n  ULONG Version;\n  ULONG Revision;\n} KSCOMPONENTID,*PKSCOMPONENTID;\n\n#define DEFINE_KSPROPERTY_ITEM_GENERAL_COMPONENTID(Handler)\t\t\\\n\tDEFINE_KSPROPERTY_ITEM(\t\t\t\t\t\t\\\n\t\t\t\tKSPROPERTY_GENERAL_COMPONENTID,\t\t\\\n\t\t\t\t(Handler),\t\t\t\t\\\n\t\t\t\tsizeof(KSPROPERTY),\t\t\t\\\n\t\t\t\tsizeof(KSCOMPONENTID),\t\t\t\\\n\t\t\t\tNULL, NULL, 0, NULL, NULL, 0)\n\n#define STATIC_KSMETHODSETID_StreamIo\t\\\n\t0x65D003CAL,0x1523,0x11D2,0xB2,0x7A,0x00,0xA0,0xC9,0x22,0x31,0x96\nDEFINE_GUIDSTRUCT(\"65D003CA-1523-11D2-B27A-00A0C9223196\",KSMETHODSETID_StreamIo);\n#define KSMETHODSETID_StreamIo DEFINE_GUIDNAMED(KSMETHODSETID_StreamIo)\n\ntypedef enum {\n  KSMETHOD_STREAMIO_READ,\n  KSMETHOD_STREAMIO_WRITE\n} KSMETHOD_STREAMIO;\n\n#define DEFINE_KSMETHOD_ITEM_STREAMIO_READ(Handler)\t\t\t\\\n\tDEFINE_KSMETHOD_ITEM(\t\t\t\t\t\t\\\n\t\t\t\tKSMETHOD_STREAMIO_READ,\t\t\t\\\n\t\t\t\tKSMETHOD_TYPE_WRITE,\t\t\t\\\n\t\t\t\t(Handler),\t\t\t\t\\\n\t\t\t\tsizeof(KSMETHOD),\t\t\t\\\n\t\t\t\t0,\t\t\t\t\t\\\n\t\t\t\tNULL)\n\n#define DEFINE_KSMETHOD_ITEM_STREAMIO_WRITE(Handler)\t\t\t\\\n\tDEFINE_KSMETHOD_ITEM(\t\t\t\t\t\t\\\n\t\t\t\tKSMETHOD_STREAMIO_WRITE,\t\t\\\n\t\t\t\tKSMETHOD_TYPE_READ,\t\t\t\\\n\t\t\t\t(Handler),\t\t\t\t\\\n\t\t\t\tsizeof(KSMETHOD),\t\t\t\\\n\t\t\t\t0,\t\t\t\t\t\\\n\t\t\t\tNULL)\n\n#define STATIC_KSPROPSETID_MediaSeeking\t\t\t\t\t\\\n\t0xEE904F0CL,0xD09B,0x11D0,0xAB,0xE9,0x00,0xA0,0xC9,0x22,0x31,0x96\nDEFINE_GUIDSTRUCT(\"EE904F0C-D09B-11D0-ABE9-00A0C9223196\",KSPROPSETID_MediaSeeking);\n#define KSPROPSETID_MediaSeeking DEFINE_GUIDNAMED(KSPROPSETID_MediaSeeking)\n\ntypedef enum {\n  KSPROPERTY_MEDIASEEKING_CAPABILITIES,\n  KSPROPERTY_MEDIASEEKING_FORMATS,\n  KSPROPERTY_MEDIASEEKING_TIMEFORMAT,\n  KSPROPERTY_MEDIASEEKING_POSITION,\n  KSPROPERTY_MEDIASEEKING_STOPPOSITION,\n  KSPROPERTY_MEDIASEEKING_POSITIONS,\n  KSPROPERTY_MEDIASEEKING_DURATION,\n  KSPROPERTY_MEDIASEEKING_AVAILABLE,\n  KSPROPERTY_MEDIASEEKING_PREROLL,\n  KSPROPERTY_MEDIASEEKING_CONVERTTIMEFORMAT\n} KSPROPERTY_MEDIASEEKING;\n\ntypedef enum {\n  KS_SEEKING_NoPositioning,\n  KS_SEEKING_AbsolutePositioning,\n  KS_SEEKING_RelativePositioning,\n  KS_SEEKING_IncrementalPositioning,\n  KS_SEEKING_PositioningBitsMask = 0x3,\n  KS_SEEKING_SeekToKeyFrame,\n  KS_SEEKING_ReturnTime = 0x8\n} KS_SEEKING_FLAGS;\n\ntypedef enum {\n  KS_SEEKING_CanSeekAbsolute = 0x1,\n  KS_SEEKING_CanSeekForwards = 0x2,\n  KS_SEEKING_CanSeekBackwards = 0x4,\n  KS_SEEKING_CanGetCurrentPos = 0x8,\n  KS_SEEKING_CanGetStopPos = 0x10,\n  KS_SEEKING_CanGetDuration = 0x20,\n  KS_SEEKING_CanPlayBackwards = 0x40\n} KS_SEEKING_CAPABILITIES;\n\ntypedef struct {\n  LONGLONG Current;\n  LONGLONG Stop;\n  KS_SEEKING_FLAGS CurrentFlags;\n  KS_SEEKING_FLAGS StopFlags;\n} KSPROPERTY_POSITIONS,*PKSPROPERTY_POSITIONS;\n\ntypedef struct {\n  LONGLONG Earliest;\n  LONGLONG Latest;\n} KSPROPERTY_MEDIAAVAILABLE,*PKSPROPERTY_MEDIAAVAILABLE;\n\ntypedef struct {\n  KSPROPERTY Property;\n  GUID SourceFormat;\n  GUID TargetFormat;\n  LONGLONG Time;\n} KSP_TIMEFORMAT,*PKSP_TIMEFORMAT;\n\n#define DEFINE_KSPROPERTY_ITEM_MEDIASEEKING_CAPABILITIES(Handler)\t\\\n\tDEFINE_KSPROPERTY_ITEM(\t\t\t\t\t\t\\\n\t\t\t\tKSPROPERTY_MEDIASEEKING_CAPABILITIES,\t\\\n\t\t\t\t(Handler),\t\t\t\t\\\n\t\t\t\tsizeof(KSPROPERTY),\t\t\t\\\n\t\t\t\tsizeof(KS_SEEKING_CAPABILITIES),\t\\\n\t\t\t\tNULL, NULL, 0, NULL, NULL, 0)\n\n#define DEFINE_KSPROPERTY_ITEM_MEDIASEEKING_FORMATS(Handler)\t\t\\\n\tDEFINE_KSPROPERTY_ITEM(\t\t\t\t\t\t\\\n\t\t\t\tKSPROPERTY_MEDIASEEKING_FORMATS,\t\\\n\t\t\t\t(Handler),\t\t\t\t\\\n\t\t\t\tsizeof(KSPROPERTY),\t\t\t\\\n\t\t\t\t0,\t\t\t\t\t\\\n\t\t\t\tNULL, NULL, 0, NULL, NULL, 0)\n\n#define DEFINE_KSPROPERTY_ITEM_MEDIASEEKING_TIMEFORMAT(GetHandler,SetHandler) \\\n\tDEFINE_KSPROPERTY_ITEM(\t\t\t\t\t\t\\\n\t\t\t\tKSPROPERTY_MEDIASEEKING_TIMEFORMAT,\t\\\n\t\t\t\t(GetHandler),\t\t\t\t\\\n\t\t\t\tsizeof(KSPROPERTY),\t\t\t\\\n\t\t\t\tsizeof(GUID),\t\t\t\t\\\n\t\t\t\t(SetHandler),\t\t\t\t\\\n\t\t\t\tNULL, 0, NULL, NULL, 0)\n\n#define DEFINE_KSPROPERTY_ITEM_MEDIASEEKING_POSITION(Handler)\t\t\\\n\tDEFINE_KSPROPERTY_ITEM(\t\t\t\t\t\t\\\n\t\t\t\tKSPROPERTY_MEDIASEEKING_POSITION,\t\\\n\t\t\t\t(Handler),\t\t\t\t\\\n\t\t\t\tsizeof(KSPROPERTY),\t\t\t\\\n\t\t\t\tsizeof(LONGLONG),\t\t\t\\\n\t\t\t\tNULL, NULL, 0, NULL, NULL, 0)\n\n#define DEFINE_KSPROPERTY_ITEM_MEDIASEEKING_STOPPOSITION(Handler)\t\\\n\tDEFINE_KSPROPERTY_ITEM(\t\t\t\t\t\t\\\n\t\t\t\tKSPROPERTY_MEDIASEEKING_STOPPOSITION,\t\\\n\t\t\t\t(Handler),\t\t\t\t\\\n\t\t\t\tsizeof(KSPROPERTY),\t\t\t\\\n\t\t\t\tsizeof(LONGLONG),\t\t\t\\\n\t\t\t\tNULL, NULL, 0, NULL, NULL, 0)\n\n#define DEFINE_KSPROPERTY_ITEM_MEDIASEEKING_POSITIONS(Handler)\t\t\\\n\tDEFINE_KSPROPERTY_ITEM(\t\t\t\t\t\t\\\n\t\t\t\tKSPROPERTY_MEDIASEEKING_POSITIONS,\t\\\n\t\t\t\tNULL,\t\t\t\t\t\\\n\t\t\t\tsizeof(KSPROPERTY),\t\t\t\\\n\t\t\t\tsizeof(KSPROPERTY_POSITIONS),\t\t\\\n\t\t\t\t(Handler),\t\t\t\t\\\n\t\t\t\tNULL, 0, NULL, NULL, 0)\n\n#define DEFINE_KSPROPERTY_ITEM_MEDIASEEKING_DURATION(Handler)\t\t\\\n\tDEFINE_KSPROPERTY_ITEM(\t\t\t\t\t\t\\\n\t\t\t\tKSPROPERTY_MEDIASEEKING_DURATION,\t\\\n\t\t\t\t(Handler),\t\t\t\t\\\n\t\t\t\tsizeof(KSPROPERTY),\t\t\t\\\n\t\t\t\tsizeof(LONGLONG),\t\t\t\\\n\t\t\t\tNULL, NULL, 0, NULL, NULL, 0)\n\n#define DEFINE_KSPROPERTY_ITEM_MEDIASEEKING_AVAILABLE(Handler)\t\t\\\n\tDEFINE_KSPROPERTY_ITEM(\t\t\t\t\t\t\\\n\t\t\t\tKSPROPERTY_MEDIASEEKING_AVAILABLE,\t\\\n\t\t\t\t(Handler),\t\t\t\t\\\n\t\t\t\tsizeof(KSPROPERTY),\t\t\t\\\n\t\t\t\tsizeof(KSPROPERTY_MEDIAAVAILABLE),\t\\\n\t\t\t\tNULL, NULL, 0, NULL, NULL, 0)\n\n#define DEFINE_KSPROPERTY_ITEM_MEDIASEEKING_PREROLL(Handler)\t\t\\\n\tDEFINE_KSPROPERTY_ITEM(\t\t\t\t\t\t\\\n\t\t\t\tKSPROPERTY_MEDIASEEKING_PREROLL,\t\\\n\t\t\t\t(Handler),\t\t\t\t\\\n\t\t\t\tsizeof(KSPROPERTY),\t\t\t\\\n\t\t\t\tsizeof(LONGLONG),\t\t\t\\\n\t\t\t\tNULL, NULL, 0, NULL, NULL, 0)\n\n#define DEFINE_KSPROPERTY_ITEM_MEDIASEEKING_CONVERTTIMEFORMAT(Handler)\t\\\n\tDEFINE_KSPROPERTY_ITEM(\t\t\t\t\t\t\\\n\t\t\t\tKSPROPERTY_MEDIASEEKING_CONVERTTIMEFORMAT, \\\n\t\t\t\t(Handler),\t\t\t\t\\\n\t\t\t\tsizeof(KSP_TIMEFORMAT),\t\t\t\\\n\t\t\t\tsizeof(LONGLONG),\t\t\t\\\n\t\t\t\tNULL, NULL, 0, NULL, NULL, 0)\n\n#define STATIC_KSPROPSETID_Topology\t\t\t\t\t\\\n\t0x720D4AC0L,0x7533,0x11D0,0xA5,0xD6,0x28,0xDB,0x04,0xC1,0x00,0x00\nDEFINE_GUIDSTRUCT(\"720D4AC0-7533-11D0-A5D6-28DB04C10000\",KSPROPSETID_Topology);\n#define KSPROPSETID_Topology DEFINE_GUIDNAMED(KSPROPSETID_Topology)\n\ntypedef enum {\n  KSPROPERTY_TOPOLOGY_CATEGORIES,\n  KSPROPERTY_TOPOLOGY_NODES,\n  KSPROPERTY_TOPOLOGY_CONNECTIONS,\n  KSPROPERTY_TOPOLOGY_NAME\n} KSPROPERTY_TOPOLOGY;\n\n#define DEFINE_KSPROPERTY_ITEM_TOPOLOGY_CATEGORIES(Handler)\t\t\\\n\tDEFINE_KSPROPERTY_ITEM(\t\t\t\t\t\t\\\n\t\t\t\tKSPROPERTY_TOPOLOGY_CATEGORIES,\t\t\\\n\t\t\t\t(Handler),\t\t\t\t\\\n\t\t\t\tsizeof(KSPROPERTY),\t\t\t\\\n\t\t\t\t0,\t\t\t\t\t\\\n\t\t\t\tNULL, NULL, 0,NULL, NULL, 0)\n\n#define DEFINE_KSPROPERTY_ITEM_TOPOLOGY_NODES(Handler)\t\t\t\\\n\tDEFINE_KSPROPERTY_ITEM(\t\t\t\t\t\t\\\n\t\t\t\tKSPROPERTY_TOPOLOGY_NODES,\t\t\\\n\t\t\t\t(Handler),\t\t\t\t\\\n\t\t\t\tsizeof(KSPROPERTY),\t\t\t\\\n\t\t\t\t0,\t\t\t\t\t\\\n\t\t\t\tNULL, NULL, 0, NULL, NULL, 0)\n\n#define DEFINE_KSPROPERTY_ITEM_TOPOLOGY_CONNECTIONS(Handler)\t\t\\\n\tDEFINE_KSPROPERTY_ITEM(\t\t\t\t\t\t\\\n\t\t\t\tKSPROPERTY_TOPOLOGY_CONNECTIONS,\t\\\n\t\t\t\t(Handler),\t\t\t\t\\\n\t\t\t\tsizeof(KSPROPERTY),\t\t\t\\\n\t\t\t\t0,\t\t\t\t\t\\\n\t\t\t\tNULL, NULL, 0, NULL, NULL, 0)\n\n#define DEFINE_KSPROPERTY_ITEM_TOPOLOGY_NAME(Handler)\t\t\t\\\n\tDEFINE_KSPROPERTY_ITEM(\t\t\t\t\t\t\\\n\t\t\t\tKSPROPERTY_TOPOLOGY_NAME,\t\t\\\n\t\t\t\t(Handler),\t\t\t\t\\\n\t\t\t\tsizeof(KSP_NODE),\t\t\t\\\n\t\t\t\t0,\t\t\t\t\t\\\n\t\t\t\tNULL, NULL, 0, NULL, NULL, 0)\n\n#define DEFINE_KSPROPERTY_TOPOLOGYSET(TopologySet,Handler)\t\t\\\nDEFINE_KSPROPERTY_TABLE(TopologySet) {\t\t\t\t\t\\\n\tDEFINE_KSPROPERTY_ITEM_TOPOLOGY_CATEGORIES(Handler),\t\t\\\n\tDEFINE_KSPROPERTY_ITEM_TOPOLOGY_NODES(Handler),\t\t\t\\\n\tDEFINE_KSPROPERTY_ITEM_TOPOLOGY_CONNECTIONS(Handler),\t\t\\\n\tDEFINE_KSPROPERTY_ITEM_TOPOLOGY_NAME(Handler)\t\t\t\\\n}\n\n#define STATIC_KSCATEGORY_BRIDGE\t\t\t\t\t\\\n\t0x085AFF00L,0x62CE,0x11CF,0xA5,0xD6,0x28,0xDB,0x04,0xC1,0x00,0x00\nDEFINE_GUIDSTRUCT(\"085AFF00-62CE-11CF-A5D6-28DB04C10000\",KSCATEGORY_BRIDGE);\n#define KSCATEGORY_BRIDGE DEFINE_GUIDNAMED(KSCATEGORY_BRIDGE)\n\n#define STATIC_KSCATEGORY_CAPTURE\t\t\t\t\t\\\n\t0x65E8773DL,0x8F56,0x11D0,0xA3,0xB9,0x00,0xA0,0xC9,0x22,0x31,0x96\nDEFINE_GUIDSTRUCT(\"65E8773D-8F56-11D0-A3B9-00A0C9223196\",KSCATEGORY_CAPTURE);\n#define KSCATEGORY_CAPTURE DEFINE_GUIDNAMED(KSCATEGORY_CAPTURE)\n\n#define STATIC_KSCATEGORY_RENDER\t\t\t\t\t\\\n\t0x65E8773EL,0x8F56,0x11D0,0xA3,0xB9,0x00,0xA0,0xC9,0x22,0x31,0x96\nDEFINE_GUIDSTRUCT(\"65E8773E-8F56-11D0-A3B9-00A0C9223196\",KSCATEGORY_RENDER);\n#define KSCATEGORY_RENDER DEFINE_GUIDNAMED(KSCATEGORY_RENDER)\n\n#define STATIC_KSCATEGORY_MIXER\t\t\t\t\t\t\\\n\t0xAD809C00L,0x7B88,0x11D0,0xA5,0xD6,0x28,0xDB,0x04,0xC1,0x00,0x00\nDEFINE_GUIDSTRUCT(\"AD809C00-7B88-11D0-A5D6-28DB04C10000\",KSCATEGORY_MIXER);\n#define KSCATEGORY_MIXER DEFINE_GUIDNAMED(KSCATEGORY_MIXER)\n\n#define STATIC_KSCATEGORY_SPLITTER\t\t\t\t\t\\\n\t0x0A4252A0L,0x7E70,0x11D0,0xA5,0xD6,0x28,0xDB,0x04,0xC1,0x00,0x00\nDEFINE_GUIDSTRUCT(\"0A4252A0-7E70-11D0-A5D6-28DB04C10000\",KSCATEGORY_SPLITTER);\n#define KSCATEGORY_SPLITTER DEFINE_GUIDNAMED(KSCATEGORY_SPLITTER)\n\n#define STATIC_KSCATEGORY_DATACOMPRESSOR\t\t\t\t\\\n\t0x1E84C900L,0x7E70,0x11D0,0xA5,0xD6,0x28,0xDB,0x04,0xC1,0x00,0x00\nDEFINE_GUIDSTRUCT(\"1E84C900-7E70-11D0-A5D6-28DB04C10000\",KSCATEGORY_DATACOMPRESSOR);\n#define KSCATEGORY_DATACOMPRESSOR DEFINE_GUIDNAMED(KSCATEGORY_DATACOMPRESSOR)\n\n#define STATIC_KSCATEGORY_DATADECOMPRESSOR\t\t\t\t\\\n\t0x2721AE20L,0x7E70,0x11D0,0xA5,0xD6,0x28,0xDB,0x04,0xC1,0x00,0x00\nDEFINE_GUIDSTRUCT(\"2721AE20-7E70-11D0-A5D6-28DB04C10000\",KSCATEGORY_DATADECOMPRESSOR);\n#define KSCATEGORY_DATADECOMPRESSOR DEFINE_GUIDNAMED(KSCATEGORY_DATADECOMPRESSOR)\n\n#define STATIC_KSCATEGORY_DATATRANSFORM\t\t\t\t\t\\\n\t0x2EB07EA0L,0x7E70,0x11D0,0xA5,0xD6,0x28,0xDB,0x04,0xC1,0x00,0x00\nDEFINE_GUIDSTRUCT(\"2EB07EA0-7E70-11D0-A5D6-28DB04C10000\",KSCATEGORY_DATATRANSFORM);\n#define KSCATEGORY_DATATRANSFORM DEFINE_GUIDNAMED(KSCATEGORY_DATATRANSFORM)\n\n#define STATIC_KSCATEGORY_COMMUNICATIONSTRANSFORM\t\t\t\\\n\t0xCF1DDA2CL,0x9743,0x11D0,0xA3,0xEE,0x00,0xA0,0xC9,0x22,0x31,0x96\nDEFINE_GUIDSTRUCT(\"CF1DDA2C-9743-11D0-A3EE-00A0C9223196\",KSCATEGORY_COMMUNICATIONSTRANSFORM);\n#define KSCATEGORY_COMMUNICATIONSTRANSFORM DEFINE_GUIDNAMED(KSCATEGORY_COMMUNICATIONSTRANSFORM)\n\n#define STATIC_KSCATEGORY_INTERFACETRANSFORM\t\t\t\t\\\n\t0xCF1DDA2DL,0x9743,0x11D0,0xA3,0xEE,0x00,0xA0,0xC9,0x22,0x31,0x96\nDEFINE_GUIDSTRUCT(\"CF1DDA2D-9743-11D0-A3EE-00A0C9223196\",KSCATEGORY_INTERFACETRANSFORM);\n#define KSCATEGORY_INTERFACETRANSFORM DEFINE_GUIDNAMED(KSCATEGORY_INTERFACETRANSFORM)\n\n#define STATIC_KSCATEGORY_MEDIUMTRANSFORM\t\t\t\t\\\n\t0xCF1DDA2EL,0x9743,0x11D0,0xA3,0xEE,0x00,0xA0,0xC9,0x22,0x31,0x96\nDEFINE_GUIDSTRUCT(\"CF1DDA2E-9743-11D0-A3EE-00A0C9223196\",KSCATEGORY_MEDIUMTRANSFORM);\n#define KSCATEGORY_MEDIUMTRANSFORM DEFINE_GUIDNAMED(KSCATEGORY_MEDIUMTRANSFORM)\n\n#define STATIC_KSCATEGORY_FILESYSTEM\t\t\t\t\t\\\n\t0x760FED5EL,0x9357,0x11D0,0xA3,0xCC,0x00,0xA0,0xC9,0x22,0x31,0x96\nDEFINE_GUIDSTRUCT(\"760FED5E-9357-11D0-A3CC-00A0C9223196\",KSCATEGORY_FILESYSTEM);\n#define KSCATEGORY_FILESYSTEM DEFINE_GUIDNAMED(KSCATEGORY_FILESYSTEM)\n\n#define STATIC_KSCATEGORY_CLOCK\t\t\t\t\t\t\\\n\t0x53172480L,0x4791,0x11D0,0xA5,0xD6,0x28,0xDB,0x04,0xC1,0x00,0x00\nDEFINE_GUIDSTRUCT(\"53172480-4791-11D0-A5D6-28DB04C10000\",KSCATEGORY_CLOCK);\n#define KSCATEGORY_CLOCK DEFINE_GUIDNAMED(KSCATEGORY_CLOCK)\n\n#define STATIC_KSCATEGORY_PROXY\t\t\t\t\t\t\\\n\t0x97EBAACAL,0x95BD,0x11D0,0xA3,0xEA,0x00,0xA0,0xC9,0x22,0x31,0x96\nDEFINE_GUIDSTRUCT(\"97EBAACA-95BD-11D0-A3EA-00A0C9223196\",KSCATEGORY_PROXY);\n#define KSCATEGORY_PROXY DEFINE_GUIDNAMED(KSCATEGORY_PROXY)\n\n#define STATIC_KSCATEGORY_QUALITY\t\t\t\t\t\\\n\t0x97EBAACBL,0x95BD,0x11D0,0xA3,0xEA,0x00,0xA0,0xC9,0x22,0x31,0x96\nDEFINE_GUIDSTRUCT(\"97EBAACB-95BD-11D0-A3EA-00A0C9223196\",KSCATEGORY_QUALITY);\n#define KSCATEGORY_QUALITY DEFINE_GUIDNAMED(KSCATEGORY_QUALITY)\n\ntypedef struct {\n  ULONG FromNode;\n  ULONG FromNodePin;\n  ULONG ToNode;\n  ULONG ToNodePin;\n} KSTOPOLOGY_CONNECTION,*PKSTOPOLOGY_CONNECTION;\n\ntypedef struct {\n  ULONG CategoriesCount;\n  const GUID *Categories;\n  ULONG TopologyNodesCount;\n  const GUID *TopologyNodes;\n  ULONG TopologyConnectionsCount;\n  const KSTOPOLOGY_CONNECTION *TopologyConnections;\n  const GUID *TopologyNodesNames;\n  ULONG Reserved;\n} KSTOPOLOGY,*PKSTOPOLOGY;\n\n#define KSFILTER_NODE\t((ULONG)-1)\n#define KSALL_NODES\t((ULONG)-1)\n\ntypedef struct {\n  ULONG CreateFlags;\n  ULONG Node;\n} KSNODE_CREATE,*PKSNODE_CREATE;\n\n#define STATIC_KSTIME_FORMAT_NONE\tSTATIC_GUID_NULL\n#define KSTIME_FORMAT_NONE\t\tGUID_NULL\n\n#define STATIC_KSTIME_FORMAT_FRAME\t\t\t\t\t\\\n\t0x7b785570L,0x8c82,0x11cf,0xbc,0x0c,0x00,0xaa,0x00,0xac,0x74,0xf6\nDEFINE_GUIDSTRUCT(\"7b785570-8c82-11cf-bc0c-00aa00ac74f6\",KSTIME_FORMAT_FRAME);\n#define KSTIME_FORMAT_FRAME DEFINE_GUIDNAMED(KSTIME_FORMAT_FRAME)\n\n#define STATIC_KSTIME_FORMAT_BYTE\t\t\t\t\t\\\n\t0x7b785571L,0x8c82,0x11cf,0xbc,0x0c,0x00,0xaa,0x00,0xac,0x74,0xf6\nDEFINE_GUIDSTRUCT(\"7b785571-8c82-11cf-bc0c-00aa00ac74f6\",KSTIME_FORMAT_BYTE);\n#define KSTIME_FORMAT_BYTE DEFINE_GUIDNAMED(KSTIME_FORMAT_BYTE)\n\n#define STATIC_KSTIME_FORMAT_SAMPLE\t\t\t\t\t\\\n\t0x7b785572L,0x8c82,0x11cf,0xbc,0x0c,0x00,0xaa,0x00,0xac,0x74,0xf6\nDEFINE_GUIDSTRUCT(\"7b785572-8c82-11cf-bc0c-00aa00ac74f6\",KSTIME_FORMAT_SAMPLE);\n#define KSTIME_FORMAT_SAMPLE DEFINE_GUIDNAMED(KSTIME_FORMAT_SAMPLE)\n\n#define STATIC_KSTIME_FORMAT_FIELD\t\t\t\t\t\\\n\t0x7b785573L,0x8c82,0x11cf,0xbc,0x0c,0x00,0xaa,0x00,0xac,0x74,0xf6\nDEFINE_GUIDSTRUCT(\"7b785573-8c82-11cf-bc0c-00aa00ac74f6\",KSTIME_FORMAT_FIELD);\n#define KSTIME_FORMAT_FIELD DEFINE_GUIDNAMED(KSTIME_FORMAT_FIELD)\n\n#define STATIC_KSTIME_FORMAT_MEDIA_TIME\t\t\t\t\t\\\n\t0x7b785574L,0x8c82,0x11cf,0xbc,0x0c,0x00,0xaa,0x00,0xac,0x74,0xf6\nDEFINE_GUIDSTRUCT(\"7b785574-8c82-11cf-bc0c-00aa00ac74f6\",KSTIME_FORMAT_MEDIA_TIME);\n#define KSTIME_FORMAT_MEDIA_TIME DEFINE_GUIDNAMED(KSTIME_FORMAT_MEDIA_TIME)\n\ntypedef KSIDENTIFIER KSPIN_INTERFACE,*PKSPIN_INTERFACE;\n\n#define STATIC_KSINTERFACESETID_Standard\t\t\t\t\\\n\t0x1A8766A0L,0x62CE,0x11CF,0xA5,0xD6,0x28,0xDB,0x04,0xC1,0x00,0x00\nDEFINE_GUIDSTRUCT(\"1A8766A0-62CE-11CF-A5D6-28DB04C10000\",KSINTERFACESETID_Standard);\n#define KSINTERFACESETID_Standard DEFINE_GUIDNAMED(KSINTERFACESETID_Standard)\n\ntypedef enum {\n  KSINTERFACE_STANDARD_STREAMING,\n  KSINTERFACE_STANDARD_LOOPED_STREAMING,\n  KSINTERFACE_STANDARD_CONTROL\n} KSINTERFACE_STANDARD;\n\n#define STATIC_KSINTERFACESETID_FileIo\t\t\t\t\t\\\n\t0x8C6F932CL,0xE771,0x11D0,0xB8,0xFF,0x00,0xA0,0xC9,0x22,0x31,0x96\nDEFINE_GUIDSTRUCT(\"8C6F932C-E771-11D0-B8FF-00A0C9223196\",KSINTERFACESETID_FileIo);\n#define KSINTERFACESETID_FileIo DEFINE_GUIDNAMED(KSINTERFACESETID_FileIo)\n\ntypedef enum {\n  KSINTERFACE_FILEIO_STREAMING\n} KSINTERFACE_FILEIO;\n\n#define KSMEDIUM_TYPE_ANYINSTANCE\t\t0\n\n#define STATIC_KSMEDIUMSETID_Standard\t\t\t\t\t\\\n\t0x4747B320L,0x62CE,0x11CF,0xA5,0xD6,0x28,0xDB,0x04,0xC1,0x00,0x00\nDEFINE_GUIDSTRUCT(\"4747B320-62CE-11CF-A5D6-28DB04C10000\",KSMEDIUMSETID_Standard);\n#define KSMEDIUMSETID_Standard DEFINE_GUIDNAMED(KSMEDIUMSETID_Standard)\n\n#define KSMEDIUM_STANDARD_DEVIO KSMEDIUM_TYPE_ANYINSTANCE\n\n#define STATIC_KSPROPSETID_Pin\t\t\t\t\t\t\\\n\t0x8C134960L,0x51AD,0x11CF,0x87,0x8A,0x94,0xF8,0x01,0xC1,0x00,0x00\nDEFINE_GUIDSTRUCT(\"8C134960-51AD-11CF-878A-94F801C10000\",KSPROPSETID_Pin);\n#define KSPROPSETID_Pin DEFINE_GUIDNAMED(KSPROPSETID_Pin)\n\ntypedef enum {\n  KSPROPERTY_PIN_CINSTANCES,\n  KSPROPERTY_PIN_CTYPES,\n  KSPROPERTY_PIN_DATAFLOW,\n  KSPROPERTY_PIN_DATARANGES,\n  KSPROPERTY_PIN_DATAINTERSECTION,\n  KSPROPERTY_PIN_INTERFACES,\n  KSPROPERTY_PIN_MEDIUMS,\n  KSPROPERTY_PIN_COMMUNICATION,\n  KSPROPERTY_PIN_GLOBALCINSTANCES,\n  KSPROPERTY_PIN_NECESSARYINSTANCES,\n  KSPROPERTY_PIN_PHYSICALCONNECTION,\n  KSPROPERTY_PIN_CATEGORY,\n  KSPROPERTY_PIN_NAME,\n  KSPROPERTY_PIN_CONSTRAINEDDATARANGES,\n  KSPROPERTY_PIN_PROPOSEDATAFORMAT\n} KSPROPERTY_PIN;\n\ntypedef struct {\n  KSPROPERTY Property;\n  ULONG PinId;\n  ULONG Reserved;\n} KSP_PIN,*PKSP_PIN;\n\n#define KSINSTANCE_INDETERMINATE\t((ULONG)-1)\n\ntypedef struct {\n  ULONG PossibleCount;\n  ULONG CurrentCount;\n} KSPIN_CINSTANCES,*PKSPIN_CINSTANCES;\n\ntypedef enum {\n  KSPIN_DATAFLOW_IN = 1,\n  KSPIN_DATAFLOW_OUT\n} KSPIN_DATAFLOW,*PKSPIN_DATAFLOW;\n\n#define KSDATAFORMAT_BIT_TEMPORAL_COMPRESSION\t0\n#define KSDATAFORMAT_TEMPORAL_COMPRESSION\t(1 << KSDATAFORMAT_BIT_TEMPORAL_COMPRESSION)\n#define KSDATAFORMAT_BIT_ATTRIBUTES\t\t1\n#define KSDATAFORMAT_ATTRIBUTES\t\t\t(1 << KSDATAFORMAT_BIT_ATTRIBUTES)\n\n#define KSDATARANGE_BIT_ATTRIBUTES\t\t1\n#define KSDATARANGE_ATTRIBUTES\t\t\t(1 << KSDATARANGE_BIT_ATTRIBUTES)\n#define KSDATARANGE_BIT_REQUIRED_ATTRIBUTES\t2\n#define KSDATARANGE_REQUIRED_ATTRIBUTES\t\t(1 << KSDATARANGE_BIT_REQUIRED_ATTRIBUTES)\n\ntypedef union {\n  __MINGW_EXTENSION struct {\n    ULONG FormatSize;\n    ULONG Flags;\n    ULONG SampleSize;\n    ULONG Reserved;\n    GUID MajorFormat;\n    GUID SubFormat;\n    GUID Specifier;\n  };\n  LONGLONG Alignment;\n} KSDATAFORMAT,*PKSDATAFORMAT,KSDATARANGE,*PKSDATARANGE;\n\n#define KSATTRIBUTE_REQUIRED\t\t0x00000001\n\ntypedef struct {\n  ULONG Size;\n  ULONG Flags;\n  GUID Attribute;\n} KSATTRIBUTE,*PKSATTRIBUTE;\n\n#if defined(_NTDDK_)\ntypedef struct {\n  ULONG Count;\n  PKSATTRIBUTE *Attributes;\n} KSATTRIBUTE_LIST,*PKSATTRIBUTE_LIST;\n#endif /* _NTDDK_ */\n\ntypedef enum {\n  KSPIN_COMMUNICATION_NONE,\n  KSPIN_COMMUNICATION_SINK,\n  KSPIN_COMMUNICATION_SOURCE,\n  KSPIN_COMMUNICATION_BOTH,\n  KSPIN_COMMUNICATION_BRIDGE\n} KSPIN_COMMUNICATION,*PKSPIN_COMMUNICATION;\n\ntypedef KSIDENTIFIER KSPIN_MEDIUM,*PKSPIN_MEDIUM;\n\ntypedef struct {\n  KSPIN_INTERFACE Interface;\n  KSPIN_MEDIUM Medium;\n  ULONG PinId;\n  HANDLE PinToHandle;\n  KSPRIORITY Priority;\n} KSPIN_CONNECT,*PKSPIN_CONNECT;\n\ntypedef struct {\n  ULONG Size;\n  ULONG Pin;\n  WCHAR SymbolicLinkName[1];\n} KSPIN_PHYSICALCONNECTION,*PKSPIN_PHYSICALCONNECTION;\n\n#if defined(_NTDDK_)\ntypedef NTSTATUS (*PFNKSINTERSECTHANDLER) ( PIRP Irp, PKSP_PIN Pin,\n\t\t\t\t\t    PKSDATARANGE DataRange,\n\t\t\t\t\t    PVOID Data);\ntypedef NTSTATUS (*PFNKSINTERSECTHANDLEREX)(PVOID Context, PIRP Irp,\n\t\t\t\t\t    PKSP_PIN Pin,\n\t\t\t\t\t    PKSDATARANGE DataRange,\n\t\t\t\t\t    PKSDATARANGE MatchingDataRange,\n\t\t\t\t\t    ULONG DataBufferSize,\n\t\t\t\t\t    PVOID Data,\n\t\t\t\t\t    PULONG DataSize);\n#endif /* _NTDDK_ */\n\n#define DEFINE_KSPIN_INTERFACE_TABLE(tablename)\t\t\t\t\\\n\tconst KSPIN_INTERFACE tablename[] =\n\n#define DEFINE_KSPIN_INTERFACE_ITEM(guid,_interFace)\t\t\t\\\n\t{\t\t\t\t\t\t\t\t\\\n\t\tSTATICGUIDOF(guid),\t\t\t\t\t\\\n\t\t(_interFace),\t\t\t\t\t\t\\\n\t\t0\t\t\t\t\t\t\t\\\n\t}\n\n#define DEFINE_KSPIN_MEDIUM_TABLE(tablename)\t\t\t\t\\\n\tconst KSPIN_MEDIUM tablename[] =\n\n#define DEFINE_KSPIN_MEDIUM_ITEM(guid,medium)\t\t\t\t\\\n\t\tDEFINE_KSPIN_INTERFACE_ITEM(guid,medium)\n\n#define DEFINE_KSPROPERTY_ITEM_PIN_CINSTANCES(Handler)\t\t\t\\\n\tDEFINE_KSPROPERTY_ITEM(\t\t\t\t\t\t\\\n\t\t\t\tKSPROPERTY_PIN_CINSTANCES,\t\t\\\n\t\t\t\t(Handler),\t\t\t\t\\\n\t\t\t\tsizeof(KSP_PIN),\t\t\t\\\n\t\t\t\tsizeof(KSPIN_CINSTANCES),\t\t\\\n\t\t\t\tNULL, NULL, 0, NULL, NULL, 0)\n\n#define DEFINE_KSPROPERTY_ITEM_PIN_CTYPES(Handler)\t\t\t\\\n\tDEFINE_KSPROPERTY_ITEM(\t\t\t\t\t\t\\\n\t\t\t\tKSPROPERTY_PIN_CTYPES,\t\t\t\\\n\t\t\t\t(Handler),\t\t\t\t\\\n\t\t\t\tsizeof(KSPROPERTY),\t\t\t\\\n\t\t\t\tsizeof(ULONG),\t\t\t\t\\\n\t\t\t\tNULL, NULL, 0, NULL, NULL, 0)\n\n#define DEFINE_KSPROPERTY_ITEM_PIN_DATAFLOW(Handler)\t\t\t\\\n\tDEFINE_KSPROPERTY_ITEM(\t\t\t\t\t\t\\\n\t\t\t\tKSPROPERTY_PIN_DATAFLOW,\t\t\\\n\t\t\t\t(Handler),\t\t\t\t\\\n\t\t\t\tsizeof(KSP_PIN),\t\t\t\\\n\t\t\t\tsizeof(KSPIN_DATAFLOW),\t\t\t\\\n\t\t\t\tNULL, NULL, 0, NULL, NULL, 0)\n\n#define DEFINE_KSPROPERTY_ITEM_PIN_DATARANGES(Handler)\t\t\t\\\n\tDEFINE_KSPROPERTY_ITEM(\t\t\t\t\t\t\\\n\t\t\t\tKSPROPERTY_PIN_DATARANGES,\t\t\\\n\t\t\t\t(Handler),\t\t\t\t\\\n\t\t\t\tsizeof(KSP_PIN),\t\t\t\\\n\t\t\t\t0,\t\t\t\t\t\\\n\t\t\t\tNULL, NULL, 0, NULL, NULL, 0)\n\n#define DEFINE_KSPROPERTY_ITEM_PIN_DATAINTERSECTION(Handler)\t\t\\\n\tDEFINE_KSPROPERTY_ITEM(\t\t\t\t\t\t\\\n\t\t\t\tKSPROPERTY_PIN_DATAINTERSECTION,\t\\\n\t\t\t\t(Handler),\t\t\t\t\\\n\t\t\t\tsizeof(KSP_PIN) + sizeof(KSMULTIPLE_ITEM),\\\n\t\t\t\t0,\t\t\t\t\t\\\n\t\t\t\tNULL, NULL, 0, NULL, NULL, 0)\n\n#define DEFINE_KSPROPERTY_ITEM_PIN_INTERFACES(Handler)\t\t\t\\\n\tDEFINE_KSPROPERTY_ITEM(\t\t\t\t\t\t\\\n\t\t\t\tKSPROPERTY_PIN_INTERFACES,\t\t\\\n\t\t\t\t(Handler),\t\t\t\t\\\n\t\t\t\tsizeof(KSP_PIN),\t\t\t\\\n\t\t\t\t0,\t\t\t\t\t\\\n\t\t\t\tNULL, NULL, 0, NULL, NULL, 0)\n\n#define DEFINE_KSPROPERTY_ITEM_PIN_MEDIUMS(Handler)\t\t\t\\\n\tDEFINE_KSPROPERTY_ITEM(\t\t\t\t\t\t\\\n\t\t\t\tKSPROPERTY_PIN_MEDIUMS,\t\t\t\\\n\t\t\t\t(Handler),\t\t\t\t\\\n\t\t\t\tsizeof(KSP_PIN),\t\t\t\\\n\t\t\t\t0,\t\t\t\t\t\\\n\t\t\t\tNULL, NULL, 0, NULL, NULL, 0)\n\n#define DEFINE_KSPROPERTY_ITEM_PIN_COMMUNICATION(Handler)\t\t\\\n\tDEFINE_KSPROPERTY_ITEM(\t\t\t\t\t\t\\\n\t\t\t\tKSPROPERTY_PIN_COMMUNICATION,\t\t\\\n\t\t\t\t(Handler),\t\t\t\t\\\n\t\t\t\tsizeof(KSP_PIN),\t\t\t\\\n\t\t\t\tsizeof(KSPIN_COMMUNICATION),\t\t\\\n\t\t\t\tNULL, NULL, 0, NULL, NULL, 0)\n\n#define DEFINE_KSPROPERTY_ITEM_PIN_GLOBALCINSTANCES(Handler)\t\t\\\n\tDEFINE_KSPROPERTY_ITEM(\t\t\t\t\t\t\\\n\t\t\t\tKSPROPERTY_PIN_GLOBALCINSTANCES,\t\\\n\t\t\t\t(Handler),\t\t\t\t\\\n\t\t\t\tsizeof(KSP_PIN),\t\t\t\\\n\t\t\t\tsizeof(KSPIN_CINSTANCES),\t\t\\\n\t\t\t\tNULL, NULL, 0, NULL, NULL, 0)\n\n#define DEFINE_KSPROPERTY_ITEM_PIN_NECESSARYINSTANCES(Handler)\t\t\\\n\tDEFINE_KSPROPERTY_ITEM(\t\t\t\t\t\t\\\n\t\t\t\tKSPROPERTY_PIN_NECESSARYINSTANCES,\t\\\n\t\t\t\t(Handler),\t\t\t\t\\\n\t\t\t\tsizeof(KSP_PIN),\t\t\t\\\n\t\t\t\tsizeof(ULONG),\t\t\t\t\\\n\t\t\t\tNULL, NULL, 0, NULL, NULL, 0)\n\n#define DEFINE_KSPROPERTY_ITEM_PIN_PHYSICALCONNECTION(Handler)\t\t\\\n\tDEFINE_KSPROPERTY_ITEM(\t\t\t\t\t\t\\\n\t\t\t\tKSPROPERTY_PIN_PHYSICALCONNECTION,\t\\\n\t\t\t\t(Handler),\t\t\t\t\\\n\t\t\t\tsizeof(KSP_PIN),\t\t\t\\\n\t\t\t\t0,\t\t\t\t\t\\\n\t\t\t\tNULL, NULL, 0, NULL, NULL, 0)\n\n#define DEFINE_KSPROPERTY_ITEM_PIN_CATEGORY(Handler)\t\t\t\\\n\tDEFINE_KSPROPERTY_ITEM(\t\t\t\t\t\t\\\n\t\t\t\tKSPROPERTY_PIN_CATEGORY,\t\t\\\n\t\t\t\t(Handler),\t\t\t\t\\\n\t\t\t\tsizeof(KSP_PIN),\t\t\t\\\n\t\t\t\tsizeof(GUID),\t\t\t\t\\\n\t\t\t\tNULL, NULL, 0, NULL, NULL, 0)\n\n#define DEFINE_KSPROPERTY_ITEM_PIN_NAME(Handler)\t\t\t\\\n\tDEFINE_KSPROPERTY_ITEM(\t\t\t\t\t\t\\\n\t\t\t\tKSPROPERTY_PIN_NAME,\t\t\t\\\n\t\t\t\t(Handler),\t\t\t\t\\\n\t\t\t\tsizeof(KSP_PIN),\t\t\t\\\n\t\t\t\t0,\t\t\t\t\t\\\n\t\t\t\tNULL, NULL, 0, NULL, NULL, 0)\n\n#define DEFINE_KSPROPERTY_ITEM_PIN_CONSTRAINEDDATARANGES(Handler)\t\\\n\tDEFINE_KSPROPERTY_ITEM(\t\t\t\t\t\t\\\n\t\t\t\tKSPROPERTY_PIN_CONSTRAINEDDATARANGES,\t\\\n\t\t\t\t(Handler),\t\t\t\t\\\n\t\t\t\tsizeof(KSP_PIN),\t\t\t\\\n\t\t\t\t0,\t\t\t\t\t\\\n\t\t\t\tNULL, NULL, 0, NULL, NULL, 0)\n\n#define DEFINE_KSPROPERTY_ITEM_PIN_PROPOSEDATAFORMAT(Handler)\t\t\\\n\tDEFINE_KSPROPERTY_ITEM(\t\t\t\t\t\t\\\n\t\t\t\tKSPROPERTY_PIN_PROPOSEDATAFORMAT,\t\\\n\t\t\t\tNULL,\t\t\t\t\t\\\n\t\t\t\tsizeof(KSP_PIN),\t\t\t\\\n\t\t\t\tsizeof(KSDATAFORMAT),\t\t\t\\\n\t\t\t\t(Handler), NULL, 0, NULL, NULL, 0)\n\n#define DEFINE_KSPROPERTY_PINSET(PinSet,PropGeneral,PropInstances,PropIntersection) \\\nDEFINE_KSPROPERTY_TABLE(PinSet) {\t\t\t\t\t\\\n\tDEFINE_KSPROPERTY_ITEM_PIN_CINSTANCES(PropInstances),\t\t\\\n\tDEFINE_KSPROPERTY_ITEM_PIN_CTYPES(PropGeneral),\t\t\t\\\n\tDEFINE_KSPROPERTY_ITEM_PIN_DATAFLOW(PropGeneral),\t\t\\\n\tDEFINE_KSPROPERTY_ITEM_PIN_DATARANGES(PropGeneral),\t\t\\\n\tDEFINE_KSPROPERTY_ITEM_PIN_DATAINTERSECTION(PropIntersection),\t\\\n\tDEFINE_KSPROPERTY_ITEM_PIN_INTERFACES(PropGeneral),\t\t\\\n\tDEFINE_KSPROPERTY_ITEM_PIN_MEDIUMS(PropGeneral),\t\t\\\n\tDEFINE_KSPROPERTY_ITEM_PIN_COMMUNICATION(PropGeneral),\t\t\\\n\tDEFINE_KSPROPERTY_ITEM_PIN_CATEGORY(PropGeneral),\t\t\\\n\tDEFINE_KSPROPERTY_ITEM_PIN_NAME(PropGeneral)\t\t\t\\\n}\n\n#define DEFINE_KSPROPERTY_PINSETCONSTRAINED(PinSet,PropGeneral,PropInstances,PropIntersection) \\\nDEFINE_KSPROPERTY_TABLE(PinSet) {\t\t\t\t\t\\\n\tDEFINE_KSPROPERTY_ITEM_PIN_CINSTANCES(PropInstances),\t\t\\\n\tDEFINE_KSPROPERTY_ITEM_PIN_CTYPES(PropGeneral),\t\t\t\\\n\tDEFINE_KSPROPERTY_ITEM_PIN_DATAFLOW(PropGeneral),\t\t\\\n\tDEFINE_KSPROPERTY_ITEM_PIN_DATARANGES(PropGeneral),\t\t\\\n\tDEFINE_KSPROPERTY_ITEM_PIN_DATAINTERSECTION(PropIntersection),\t\\\n\tDEFINE_KSPROPERTY_ITEM_PIN_INTERFACES(PropGeneral),\t\t\\\n\tDEFINE_KSPROPERTY_ITEM_PIN_MEDIUMS(PropGeneral),\t\t\\\n\tDEFINE_KSPROPERTY_ITEM_PIN_COMMUNICATION(PropGeneral),\t\t\\\n\tDEFINE_KSPROPERTY_ITEM_PIN_CATEGORY(PropGeneral),\t\t\\\n\tDEFINE_KSPROPERTY_ITEM_PIN_NAME(PropGeneral),\t\t\t\\\n\tDEFINE_KSPROPERTY_ITEM_PIN_CONSTRAINEDDATARANGES(PropGeneral)\t\\\n}\n\n#define STATIC_KSNAME_Filter\t\t\t\t\t\t\\\n\t0x9b365890L,0x165f,0x11d0,0xa1,0x95,0x00,0x20,0xaf,0xd1,0x56,0xe4\nDEFINE_GUIDSTRUCT(\"9b365890-165f-11d0-a195-0020afd156e4\",KSNAME_Filter);\n#define KSNAME_Filter DEFINE_GUIDNAMED(KSNAME_Filter)\n\n#define KSSTRING_Filter\t\tL\"{9B365890-165F-11D0-A195-0020AFD156E4}\"\n\n#define STATIC_KSNAME_Pin\t\t\t\t\t\t\\\n\t0x146F1A80L,0x4791,0x11D0,0xA5,0xD6,0x28,0xDB,0x04,0xC1,0x00,0x00\nDEFINE_GUIDSTRUCT(\"146F1A80-4791-11D0-A5D6-28DB04C10000\",KSNAME_Pin);\n#define KSNAME_Pin DEFINE_GUIDNAMED(KSNAME_Pin)\n\n#define KSSTRING_Pin\t\tL\"{146F1A80-4791-11D0-A5D6-28DB04C10000}\"\n\n#define STATIC_KSNAME_Clock\t\t\t\t\t\t\\\n\t0x53172480L,0x4791,0x11D0,0xA5,0xD6,0x28,0xDB,0x04,0xC1,0x00,0x00\nDEFINE_GUIDSTRUCT(\"53172480-4791-11D0-A5D6-28DB04C10000\",KSNAME_Clock);\n#define KSNAME_Clock DEFINE_GUIDNAMED(KSNAME_Clock)\n\n#define KSSTRING_Clock\t\tL\"{53172480-4791-11D0-A5D6-28DB04C10000}\"\n\n#define STATIC_KSNAME_Allocator\t\t\t\t\t\t\\\n\t0x642F5D00L,0x4791,0x11D0,0xA5,0xD6,0x28,0xDB,0x04,0xC1,0x00,0x00\nDEFINE_GUIDSTRUCT(\"642F5D00-4791-11D0-A5D6-28DB04C10000\",KSNAME_Allocator);\n#define KSNAME_Allocator DEFINE_GUIDNAMED(KSNAME_Allocator)\n\n#define KSSTRING_Allocator\tL\"{642F5D00-4791-11D0-A5D6-28DB04C10000}\"\n\n#define KSSTRING_AllocatorEx\tL\"{091BB63B-603F-11D1-B067-00A0C9062802}\"\n\n#define STATIC_KSNAME_TopologyNode\t\t\t\t\t\\\n\t0x0621061AL,0xEE75,0x11D0,0xB9,0x15,0x00,0xA0,0xC9,0x22,0x31,0x96\nDEFINE_GUIDSTRUCT(\"0621061A-EE75-11D0-B915-00A0C9223196\",KSNAME_TopologyNode);\n#define KSNAME_TopologyNode DEFINE_GUIDNAMED(KSNAME_TopologyNode)\n\n#define KSSTRING_TopologyNode\tL\"{0621061A-EE75-11D0-B915-00A0C9223196}\"\n\n#if defined(_NTDDK_)\ntypedef struct {\n  ULONG InterfacesCount;\n  const KSPIN_INTERFACE *Interfaces;\n  ULONG MediumsCount;\n  const KSPIN_MEDIUM *Mediums;\n  ULONG DataRangesCount;\n  const PKSDATARANGE *DataRanges;\n  KSPIN_DATAFLOW DataFlow;\n  KSPIN_COMMUNICATION Communication;\n  const GUID *Category;\n  const GUID *Name;\n  __MINGW_EXTENSION union {\n    LONGLONG Reserved;\n    __MINGW_EXTENSION struct {\n      ULONG ConstrainedDataRangesCount;\n      PKSDATARANGE *ConstrainedDataRanges;\n    };\n  };\n} KSPIN_DESCRIPTOR, *PKSPIN_DESCRIPTOR;\ntypedef const KSPIN_DESCRIPTOR *PCKSPIN_DESCRIPTOR;\n\n#define DEFINE_KSPIN_DESCRIPTOR_TABLE(tablename)\t\t\t\\\n\tconst KSPIN_DESCRIPTOR tablename[] =\n\n#define DEFINE_KSPIN_DESCRIPTOR_ITEM(InterfacesCount,Interfaces,MediumsCount, Mediums,DataRangesCount,DataRanges,DataFlow,Communication)\\\n{\t\t\t\t\t\t\t\t\t\\\n\t\tInterfacesCount, Interfaces, MediumsCount, Mediums,\t\\\n\t\tDataRangesCount, DataRanges, DataFlow, Communication,\t\\\n\t\tNULL, NULL, 0\t\t\t\t\t\t\\\n}\n\n#define DEFINE_KSPIN_DESCRIPTOR_ITEMEX(InterfacesCount,Interfaces,MediumsCount,Mediums,DataRangesCount,DataRanges,DataFlow,Communication,Category,Name)\\\n{\t\t\t\t\t\t\t\t\t\\\n\t\tInterfacesCount, Interfaces, MediumsCount, Mediums,\t\\\n\t\tDataRangesCount, DataRanges, DataFlow, Communication,\t\\\n\t\tCategory, Name, 0\t\t\t\t\t\\\n}\n#endif /* _NTDDK_ */\n\n#define STATIC_KSDATAFORMAT_TYPE_WILDCARD\tSTATIC_GUID_NULL\n#define KSDATAFORMAT_TYPE_WILDCARD\t\tGUID_NULL\n\n#define STATIC_KSDATAFORMAT_SUBTYPE_WILDCARD\tSTATIC_GUID_NULL\n#define KSDATAFORMAT_SUBTYPE_WILDCARD\t\tGUID_NULL\n\n#define STATIC_KSDATAFORMAT_TYPE_STREAM\t\t\t\t\t\\\n\t0xE436EB83L,0x524F,0x11CE,0x9F,0x53,0x00,0x20,0xAF,0x0B,0xA7,0x70\nDEFINE_GUIDSTRUCT(\"E436EB83-524F-11CE-9F53-0020AF0BA770\",KSDATAFORMAT_TYPE_STREAM);\n#define KSDATAFORMAT_TYPE_STREAM DEFINE_GUIDNAMED(KSDATAFORMAT_TYPE_STREAM)\n\n#define STATIC_KSDATAFORMAT_SUBTYPE_NONE\t\t\t\t\\\n\t0xE436EB8EL,0x524F,0x11CE,0x9F,0x53,0x00,0x20,0xAF,0x0B,0xA7,0x70\nDEFINE_GUIDSTRUCT(\"E436EB8E-524F-11CE-9F53-0020AF0BA770\",KSDATAFORMAT_SUBTYPE_NONE);\n#define KSDATAFORMAT_SUBTYPE_NONE DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_NONE)\n\n#define STATIC_KSDATAFORMAT_SPECIFIER_WILDCARD\tSTATIC_GUID_NULL\n#define KSDATAFORMAT_SPECIFIER_WILDCARD\t\tGUID_NULL\n\n#define STATIC_KSDATAFORMAT_SPECIFIER_FILENAME\t\t\t\t\\\n\t0xAA797B40L,0xE974,0x11CF,0xA5,0xD6,0x28,0xDB,0x04,0xC1,0x00,0x00\nDEFINE_GUIDSTRUCT(\"AA797B40-E974-11CF-A5D6-28DB04C10000\",KSDATAFORMAT_SPECIFIER_FILENAME);\n#define KSDATAFORMAT_SPECIFIER_FILENAME DEFINE_GUIDNAMED(KSDATAFORMAT_SPECIFIER_FILENAME)\n\n#define STATIC_KSDATAFORMAT_SPECIFIER_FILEHANDLE\t\t\t\\\n\t0x65E8773CL,0x8F56,0x11D0,0xA3,0xB9,0x00,0xA0,0xC9,0x22,0x31,0x96\nDEFINE_GUIDSTRUCT(\"65E8773C-8F56-11D0-A3B9-00A0C9223196\",KSDATAFORMAT_SPECIFIER_FILEHANDLE);\n#define KSDATAFORMAT_SPECIFIER_FILEHANDLE DEFINE_GUIDNAMED(KSDATAFORMAT_SPECIFIER_FILEHANDLE)\n\n#define STATIC_KSDATAFORMAT_SPECIFIER_NONE\t\t\t\t\\\n\t0x0F6417D6L,0xC318,0x11D0,0xA4,0x3F,0x00,0xA0,0xC9,0x22,0x31,0x96\nDEFINE_GUIDSTRUCT(\"0F6417D6-C318-11D0-A43F-00A0C9223196\",KSDATAFORMAT_SPECIFIER_NONE);\n#define KSDATAFORMAT_SPECIFIER_NONE DEFINE_GUIDNAMED(KSDATAFORMAT_SPECIFIER_NONE)\n\n#define STATIC_KSPROPSETID_Quality\t\t\t\t\t\\\n\t0xD16AD380L,0xAC1A,0x11CF,0xA5,0xD6,0x28,0xDB,0x04,0xC1,0x00,0x00\nDEFINE_GUIDSTRUCT(\"D16AD380-AC1A-11CF-A5D6-28DB04C10000\",KSPROPSETID_Quality);\n#define KSPROPSETID_Quality DEFINE_GUIDNAMED(KSPROPSETID_Quality)\n\ntypedef enum {\n  KSPROPERTY_QUALITY_REPORT,\n  KSPROPERTY_QUALITY_ERROR\n} KSPROPERTY_QUALITY;\n\n#define DEFINE_KSPROPERTY_ITEM_QUALITY_REPORT(GetHandler,SetHandler)\t\\\n\tDEFINE_KSPROPERTY_ITEM(\t\t\t\t\t\t\\\n\t\t\t\tKSPROPERTY_QUALITY_REPORT,\t\t\\\n\t\t\t\t(GetHandler),\t\t\t\t\\\n\t\t\t\tsizeof(KSPROPERTY),\t\t\t\\\n\t\t\t\tsizeof(KSQUALITY),\t\t\t\\\n\t\t\t\t(SetHandler),\t\t\t\t\\\n\t\t\t\tNULL, 0, NULL, NULL, 0)\n\n#define DEFINE_KSPROPERTY_ITEM_QUALITY_ERROR(GetHandler,SetHandler)\t\\\n\tDEFINE_KSPROPERTY_ITEM(\t\t\t\t\t\t\\\n\t\t\t\tKSPROPERTY_QUALITY_ERROR,\t\t\\\n\t\t\t\t(GetHandler),\t\t\t\t\\\n\t\t\t\tsizeof(KSPROPERTY),\t\t\t\\\n\t\t\t\tsizeof(KSERROR),\t\t\t\\\n\t\t\t\t(SetHandler),\t\t\t\t\\\n\t\t\t\tNULL, 0, NULL, NULL, 0)\n\n#define STATIC_KSPROPSETID_Connection\t\t\t\t\t\\\n\t0x1D58C920L,0xAC9B,0x11CF,0xA5,0xD6,0x28,0xDB,0x04,0xC1,0x00,0x00\nDEFINE_GUIDSTRUCT(\"1D58C920-AC9B-11CF-A5D6-28DB04C10000\",KSPROPSETID_Connection);\n#define KSPROPSETID_Connection DEFINE_GUIDNAMED(KSPROPSETID_Connection)\n\ntypedef enum {\n  KSPROPERTY_CONNECTION_STATE,\n  KSPROPERTY_CONNECTION_PRIORITY,\n  KSPROPERTY_CONNECTION_DATAFORMAT,\n  KSPROPERTY_CONNECTION_ALLOCATORFRAMING,\n  KSPROPERTY_CONNECTION_PROPOSEDATAFORMAT,\n  KSPROPERTY_CONNECTION_ACQUIREORDERING,\n  KSPROPERTY_CONNECTION_ALLOCATORFRAMING_EX,\n  KSPROPERTY_CONNECTION_STARTAT\n} KSPROPERTY_CONNECTION;\n\n#define DEFINE_KSPROPERTY_ITEM_CONNECTION_STATE(GetHandler,SetHandler)\t\\\n\tDEFINE_KSPROPERTY_ITEM(\t\t\t\t\t\t\\\n\t\t\t\tKSPROPERTY_CONNECTION_STATE,\t\t\\\n\t\t\t\t(GetHandler),\t\t\t\t\\\n\t\t\t\tsizeof(KSPROPERTY),\t\t\t\\\n\t\t\t\tsizeof(KSSTATE),\t\t\t\\\n\t\t\t\t(SetHandler),\t\t\t\t\\\n\t\t\t\tNULL, 0, NULL, NULL, 0)\n\n#define DEFINE_KSPROPERTY_ITEM_CONNECTION_PRIORITY(GetHandler,SetHandler) \\\n\tDEFINE_KSPROPERTY_ITEM(\t\t\t\t\t\t\\\n\t\t\t\tKSPROPERTY_CONNECTION_PRIORITY,\t\t\\\n\t\t\t\t(GetHandler),\t\t\t\t\\\n\t\t\t\tsizeof(KSPROPERTY),\t\t\t\\\n\t\t\t\tsizeof(KSPRIORITY),\t\t\t\\\n\t\t\t\t(SetHandler),\t\t\t\t\\\n\t\t\t\tNULL, 0, NULL, NULL, 0)\n\n#define DEFINE_KSPROPERTY_ITEM_CONNECTION_DATAFORMAT(GetHandler,SetHandler)\\\n\tDEFINE_KSPROPERTY_ITEM(\t\t\t\t\t\t\\\n\t\t\t\tKSPROPERTY_CONNECTION_DATAFORMAT,\t\\\n\t\t\t\t(GetHandler),\t\t\t\t\\\n\t\t\t\tsizeof(KSPROPERTY),\t\t\t\\\n\t\t\t\t0,\t\t\t\t\t\\\n\t\t\t\t(SetHandler),\t\t\t\t\\\n\t\t\t\tNULL, 0, NULL, NULL, 0)\n\n#define DEFINE_KSPROPERTY_ITEM_CONNECTION_ALLOCATORFRAMING(Handler)\t\\\n\tDEFINE_KSPROPERTY_ITEM(\t\t\t\t\t\t\\\n\t\t\t\tKSPROPERTY_CONNECTION_ALLOCATORFRAMING,\t\\\n\t\t\t\t(Handler),\t\t\t\t\\\n\t\t\t\tsizeof(KSPROPERTY),\t\t\t\\\n\t\t\t\tsizeof(KSALLOCATOR_FRAMING),\t\t\\\n\t\t\t\tNULL, NULL, 0, NULL, NULL, 0)\n\n#define DEFINE_KSPROPERTY_ITEM_CONNECTION_ALLOCATORFRAMING_EX(Handler)\t\\\n\tDEFINE_KSPROPERTY_ITEM(\t\t\t\t\t\t\\\n\t\t\t\tKSPROPERTY_CONNECTION_ALLOCATORFRAMING_EX,\\\n\t\t\t\t(Handler),\t\t\t\t\\\n\t\t\t\tsizeof(KSPROPERTY),\t\t\t\\\n\t\t\t\t0,\t\t\t\t\t\\\n\t\t\t\tNULL, NULL, 0, NULL, NULL, 0)\n\n#define DEFINE_KSPROPERTY_ITEM_CONNECTION_PROPOSEDATAFORMAT(Handler)\t\\\n\tDEFINE_KSPROPERTY_ITEM(\t\t\t\t\t\t\\\n\t\t\t\tKSPROPERTY_CONNECTION_PROPOSEDATAFORMAT,\\\n\t\t\t\tNULL,\t\t\t\t\t\\\n\t\t\t\tsizeof(KSPROPERTY),\t\t\t\\\n\t\t\t\tsizeof(KSDATAFORMAT),\t\t\t\\\n\t\t\t\t(Handler),\t\t\t\t\\\n\t\t\t\tNULL, 0, NULL, NULL, 0)\n\n#define DEFINE_KSPROPERTY_ITEM_CONNECTION_ACQUIREORDERING(Handler)\t\\\n\tDEFINE_KSPROPERTY_ITEM(\t\t\t\t\t\t\\\n\t\t\t\tKSPROPERTY_CONNECTION_ACQUIREORDERING,\t\\\n\t\t\t\t(Handler),\t\t\t\t\\\n\t\t\t\tsizeof(KSPROPERTY),\t\t\t\\\n\t\t\t\tsizeof(int),\t\t\t\t\\\n\t\t\t\tNULL, NULL, 0, NULL, NULL, 0)\n\n#define DEFINE_KSPROPERTY_ITEM_CONNECTION_STARTAT(Handler)\t\t\\\n\tDEFINE_KSPROPERTY_ITEM(\t\t\t\t\t\t\\\n\t\t\t\tKSPROPERTY_CONNECTION_STARTAT,\t\t\\\n\t\t\t\tNULL,\t\t\t\t\t\\\n\t\t\t\tsizeof(KSPROPERTY),\t\t\t\\\n\t\t\t\tsizeof(KSRELATIVEEVENT),\t\t\\\n\t\t\t\t(Handler),\t\t\t\t\\\n\t\t\t\tNULL, 0, NULL, NULL, 0)\n\n#define KSALLOCATOR_REQUIREMENTF_INPLACE_MODIFIER\t0x00000001\n#define KSALLOCATOR_REQUIREMENTF_SYSTEM_MEMORY\t\t0x00000002\n#define KSALLOCATOR_REQUIREMENTF_FRAME_INTEGRITY\t0x00000004\n#define KSALLOCATOR_REQUIREMENTF_MUST_ALLOCATE\t\t0x00000008\n#define KSALLOCATOR_REQUIREMENTF_PREFERENCES_ONLY\t0x80000000\n\n#define KSALLOCATOR_OPTIONF_COMPATIBLE\t\t\t0x00000001\n#define KSALLOCATOR_OPTIONF_SYSTEM_MEMORY\t\t0x00000002\n#define KSALLOCATOR_OPTIONF_VALID\t\t\t0x00000003\n\n#define KSALLOCATOR_FLAG_PARTIAL_READ_SUPPORT\t\t0x00000010\n#define KSALLOCATOR_FLAG_DEVICE_SPECIFIC\t\t0x00000020\n#define KSALLOCATOR_FLAG_CAN_ALLOCATE\t\t\t0x00000040\n#define KSALLOCATOR_FLAG_INSIST_ON_FRAMESIZE_RATIO\t0x00000080\n#define KSALLOCATOR_FLAG_NO_FRAME_INTEGRITY\t\t0x00000100\n#define KSALLOCATOR_FLAG_MULTIPLE_OUTPUT\t\t0x00000200\n#define KSALLOCATOR_FLAG_CYCLE\t\t\t\t0x00000400\n#define KSALLOCATOR_FLAG_ALLOCATOR_EXISTS\t\t0x00000800\n#define KSALLOCATOR_FLAG_INDEPENDENT_RANGES\t\t0x00001000\n#define KSALLOCATOR_FLAG_ATTENTION_STEPPING\t\t0x00002000\n\ntypedef struct {\n  __MINGW_EXTENSION union {\n    ULONG OptionsFlags;\n    ULONG RequirementsFlags;\n  };\n#if defined(_NTDDK_)\n  POOL_TYPE PoolType;\n#else\n  ULONG PoolType;\n#endif /* _NTDDK_ */\n  ULONG Frames;\n  ULONG FrameSize;\n  ULONG FileAlignment;\n  ULONG Reserved;\n} KSALLOCATOR_FRAMING,*PKSALLOCATOR_FRAMING;\n\n#if defined(_NTDDK_)\ntypedef PVOID (*PFNKSDEFAULTALLOCATE)(PVOID Context);\ntypedef VOID (*PFNKSDEFAULTFREE)(PVOID Context, PVOID Buffer);\ntypedef NTSTATUS (*PFNKSINITIALIZEALLOCATOR)(PVOID InitialContext,\n\t\t\t\t\tPKSALLOCATOR_FRAMING AllocatorFraming,\n\t\t\t\t\tPVOID* Context);\ntypedef VOID (*PFNKSDELETEALLOCATOR) (PVOID Context);\n#endif /* _NTDDK_ */\n\ntypedef struct {\n  ULONG MinFrameSize;\n  ULONG MaxFrameSize;\n  ULONG Stepping;\n} KS_FRAMING_RANGE,*PKS_FRAMING_RANGE;\n\ntypedef struct {\n  KS_FRAMING_RANGE Range;\n  ULONG InPlaceWeight;\n  ULONG NotInPlaceWeight;\n} KS_FRAMING_RANGE_WEIGHTED,*PKS_FRAMING_RANGE_WEIGHTED;\n\ntypedef struct {\n  ULONG RatioNumerator;\n  ULONG RatioDenominator;\n  ULONG RatioConstantMargin;\n} KS_COMPRESSION,*PKS_COMPRESSION;\n\ntypedef struct {\n  GUID MemoryType;\n  GUID BusType;\n  ULONG MemoryFlags;\n  ULONG BusFlags;\n  ULONG Flags;\n  ULONG Frames;\n  ULONG FileAlignment;\n  ULONG MemoryTypeWeight;\n  KS_FRAMING_RANGE PhysicalRange;\n  KS_FRAMING_RANGE_WEIGHTED FramingRange;\n} KS_FRAMING_ITEM,*PKS_FRAMING_ITEM;\n\ntypedef struct {\n  ULONG CountItems;\n  ULONG PinFlags;\n  KS_COMPRESSION OutputCompression;\n  ULONG PinWeight;\n  KS_FRAMING_ITEM FramingItem[1];\n} KSALLOCATOR_FRAMING_EX,*PKSALLOCATOR_FRAMING_EX;\n\n#define KSMEMORY_TYPE_WILDCARD\t\tGUID_NULL\n#define STATIC_KSMEMORY_TYPE_WILDCARD\tSTATIC_GUID_NULL\n\n#define KSMEMORY_TYPE_DONT_CARE\t\tGUID_NULL\n#define STATIC_KSMEMORY_TYPE_DONT_CARE\tSTATIC_GUID_NULL\n\n#define KS_TYPE_DONT_CARE\t\tGUID_NULL\n#define STATIC_KS_TYPE_DONT_CARE\tSTATIC_GUID_NULL\n\n#define STATIC_KSMEMORY_TYPE_SYSTEM\t\t\t\t\t\\\n\t0x091bb638L,0x603f,0x11d1,0xb0,0x67,0x00,0xa0,0xc9,0x06,0x28,0x02\nDEFINE_GUIDSTRUCT(\"091bb638-603f-11d1-b067-00a0c9062802\",KSMEMORY_TYPE_SYSTEM);\n#define KSMEMORY_TYPE_SYSTEM DEFINE_GUIDNAMED(KSMEMORY_TYPE_SYSTEM)\n\n#define STATIC_KSMEMORY_TYPE_USER\t\t\t\t\t\\\n\t0x8cb0fc28L,0x7893,0x11d1,0xb0,0x69,0x00,0xa0,0xc9,0x06,0x28,0x02\nDEFINE_GUIDSTRUCT(\"8cb0fc28-7893-11d1-b069-00a0c9062802\",KSMEMORY_TYPE_USER);\n#define KSMEMORY_TYPE_USER DEFINE_GUIDNAMED(KSMEMORY_TYPE_USER)\n\n#define STATIC_KSMEMORY_TYPE_KERNEL_PAGED\t\t\t\t\\\n\t0xd833f8f8L,0x7894,0x11d1,0xb0,0x69,0x00,0xa0,0xc9,0x06,0x28,0x02\nDEFINE_GUIDSTRUCT(\"d833f8f8-7894-11d1-b069-00a0c9062802\",KSMEMORY_TYPE_KERNEL_PAGED);\n#define KSMEMORY_TYPE_KERNEL_PAGED DEFINE_GUIDNAMED(KSMEMORY_TYPE_KERNEL_PAGED)\n\n#define STATIC_KSMEMORY_TYPE_KERNEL_NONPAGED\t\t\t\t\\\n\t0x4a6d5fc4L,0x7895,0x11d1,0xb0,0x69,0x00,0xa0,0xc9,0x06,0x28,0x02\nDEFINE_GUIDSTRUCT(\"4a6d5fc4-7895-11d1-b069-00a0c9062802\",KSMEMORY_TYPE_KERNEL_NONPAGED);\n#define KSMEMORY_TYPE_KERNEL_NONPAGED DEFINE_GUIDNAMED(KSMEMORY_TYPE_KERNEL_NONPAGED)\n\n#define STATIC_KSMEMORY_TYPE_DEVICE_UNKNOWN\t\t\t\t\\\n\t0x091bb639L,0x603f,0x11d1,0xb0,0x67,0x00,0xa0,0xc9,0x06,0x28,0x02\nDEFINE_GUIDSTRUCT(\"091bb639-603f-11d1-b067-00a0c9062802\",KSMEMORY_TYPE_DEVICE_UNKNOWN);\n#define KSMEMORY_TYPE_DEVICE_UNKNOWN DEFINE_GUIDNAMED(KSMEMORY_TYPE_DEVICE_UNKNOWN)\n\n#define DECLARE_SIMPLE_FRAMING_EX(FramingExName,MemoryType,Flags,Frames,Alignment,MinFrameSize,MaxFrameSize) \\\nconst KSALLOCATOR_FRAMING_EX FramingExName =\t\t\t\t\\\n{\t\t\t\t\t\t\t\t\t\\\n\t1,\t\t\t\t\t\t\t\t\\\n\t0,\t\t\t\t\t\t\t\t\\\n\t{\t\t\t\t\t\t\t\t\\\n\t\t1,\t\t\t\t\t\t\t\\\n\t\t1,\t\t\t\t\t\t\t\\\n\t\t0\t\t\t\t\t\t\t\\\n\t},\t\t\t\t\t\t\t\t\\\n\t0,\t\t\t\t\t\t\t\t\\\n\t{\t\t\t\t\t\t\t\t\\\n\t\t{\t\t\t\t\t\t\t\\\n\t\t\tMemoryType,\t\t\t\t\t\\\n\t\t\tSTATIC_KS_TYPE_DONT_CARE,\t\t\t\\\n\t\t\t0,\t\t\t\t\t\t\\\n\t\t\t0,\t\t\t\t\t\t\\\n\t\t\tFlags,\t\t\t\t\t\t\\\n\t\t\tFrames,\t\t\t\t\t\t\\\n\t\t\tAlignment,\t\t\t\t\t\\\n\t\t\t0,\t\t\t\t\t\t\\\n\t\t\t{\t\t\t\t\t\t\\\n\t\t\t\t0,\t\t\t\t\t\\\n\t\t\t\t(ULONG)-1,\t\t\t\t\\\n\t\t\t\t1\t\t\t\t\t\\\n\t\t\t},\t\t\t\t\t\t\\\n\t\t\t{\t\t\t\t\t\t\\\n\t\t\t\t{\t\t\t\t\t\\\n\t\t\t\t\tMinFrameSize,\t\t\t\\\n\t\t\t\t\tMaxFrameSize,\t\t\t\\\n\t\t\t\t\t1\t\t\t\t\\\n\t\t\t\t},\t\t\t\t\t\\\n\t\t\t\t0,\t\t\t\t\t\\\n\t\t\t\t0\t\t\t\t\t\\\n\t\t\t}\t\t\t\t\t\t\\\n\t\t}\t\t\t\t\t\t\t\\\n\t}\t\t\t\t\t\t\t\t\\\n}\n\n#define SetDefaultKsCompression(KsCompressionPointer)\t\t\t\\\n{\t\t\t\t\t\t\t\t\t\\\n\tKsCompressionPointer->RatioNumerator = 1;\t\t\t\\\n\tKsCompressionPointer->RatioDenominator = 1;\t\t\t\\\n\tKsCompressionPointer->RatioConstantMargin = 0;\t\t\t\\\n}\n\n#define SetDontCareKsFramingRange(KsFramingRangePointer)\t\t\\\n{\t\t\t\t\t\t\t\t\t\\\n\tKsFramingRangePointer->MinFrameSize = 0;\t\t\t\\\n\tKsFramingRangePointer->MaxFrameSize = (ULONG) -1;\t\t\\\n\tKsFramingRangePointer->Stepping = 1;\t\t\t\t\\\n}\n\n#define SetKsFramingRange(KsFramingRangePointer,P_MinFrameSize,P_MaxFrameSize) \\\n{\t\t\t\t\t\t\t\t\t\\\n\tKsFramingRangePointer->MinFrameSize = P_MinFrameSize;\t\t\\\n\tKsFramingRangePointer->MaxFrameSize = P_MaxFrameSize;\t\t\\\n\tKsFramingRangePointer->Stepping = 1;\t\t\t\t\\\n}\n\n#define SetKsFramingRangeWeighted(KsFramingRangeWeightedPointer,P_MinFrameSize,P_MaxFrameSize) \\\n{\t\t\t\t\t\t\t\t\t\\\n\tKS_FRAMING_RANGE *KsFramingRange =\t\t\t\t\\\n\t\t\t\t&KsFramingRangeWeightedPointer->Range;\t\\\n\tSetKsFramingRange(KsFramingRange,P_MinFrameSize,P_MaxFrameSize);\\\n\tKsFramingRangeWeightedPointer->InPlaceWeight = 0;\t\t\\\n\tKsFramingRangeWeightedPointer->NotInPlaceWeight = 0;\t\t\\\n}\n\n#define INITIALIZE_SIMPLE_FRAMING_EX(FramingExPointer,P_MemoryType,P_Flags,P_Frames,P_Alignment,P_MinFrameSize,P_MaxFrameSize) \\\n{\t\t\t\t\t\t\t\t\t\\\n\tKS_COMPRESSION *KsCompression =\t\t\t\t\t\\\n\t\t\t&FramingExPointer->OutputCompression;\t\t\\\n\tKS_FRAMING_RANGE *KsFramingRange =\t\t\t\t\\\n\t\t\t&FramingExPointer->FramingItem[0].PhysicalRange;\\\n\tKS_FRAMING_RANGE_WEIGHTED *KsFramingRangeWeighted =\t\t\\\n\t\t\t&FramingExPointer->FramingItem[0].FramingRange;\t\\\n\tFramingExPointer->CountItems = 1;\t\t\t\t\\\n\tFramingExPointer->PinFlags = 0;\t\t\t\t\t\\\n\tSetDefaultKsCompression(KsCompression);\t\t\t\t\\\n\tFramingExPointer->PinWeight = 0;\t\t\t\t\\\n\tFramingExPointer->FramingItem[0].MemoryType = P_MemoryType;\t\\\n\tFramingExPointer->FramingItem[0].BusType = KS_TYPE_DONT_CARE;\t\\\n\tFramingExPointer->FramingItem[0].MemoryFlags = 0;\t\t\\\n\tFramingExPointer->FramingItem[0].BusFlags = 0;\t\t\t\\\n\tFramingExPointer->FramingItem[0].Flags = P_Flags;\t\t\\\n\tFramingExPointer->FramingItem[0].Frames = P_Frames;\t\t\\\n\tFramingExPointer->FramingItem[0].FileAlignment = P_Alignment;\t\\\n\tFramingExPointer->FramingItem[0].MemoryTypeWeight = 0;\t\t\\\n\tSetDontCareKsFramingRange(KsFramingRange);\t\t\t\\\n\tSetKsFramingRangeWeighted(KsFramingRangeWeighted,\t\t\\\n\t\t\t\t  P_MinFrameSize,P_MaxFrameSize);\t\\\n}\n\n#define STATIC_KSEVENTSETID_StreamAllocator\t\t\t\t\\\n\t0x75d95571L,0x073c,0x11d0,0xa1,0x61,0x00,0x20,0xaf,0xd1,0x56,0xe4\nDEFINE_GUIDSTRUCT(\"75d95571-073c-11d0-a161-0020afd156e4\",KSEVENTSETID_StreamAllocator);\n#define KSEVENTSETID_StreamAllocator DEFINE_GUIDNAMED(KSEVENTSETID_StreamAllocator)\n\ntypedef enum {\n  KSEVENT_STREAMALLOCATOR_INTERNAL_FREEFRAME,\n  KSEVENT_STREAMALLOCATOR_FREEFRAME\n} KSEVENT_STREAMALLOCATOR;\n\n#define STATIC_KSMETHODSETID_StreamAllocator\t\t\t\t\\\n\t0xcf6e4341L,0xec87,0x11cf,0xa1,0x30,0x00,0x20,0xaf,0xd1,0x56,0xe4\nDEFINE_GUIDSTRUCT(\"cf6e4341-ec87-11cf-a130-0020afd156e4\",KSMETHODSETID_StreamAllocator);\n#define KSMETHODSETID_StreamAllocator DEFINE_GUIDNAMED(KSMETHODSETID_StreamAllocator)\n\ntypedef enum {\n  KSMETHOD_STREAMALLOCATOR_ALLOC,\n  KSMETHOD_STREAMALLOCATOR_FREE\n} KSMETHOD_STREAMALLOCATOR;\n\n#define DEFINE_KSMETHOD_ITEM_STREAMALLOCATOR_ALLOC(Handler)\t\t\\\n\tDEFINE_KSMETHOD_ITEM(\t\t\t\t\t\t\\\n\t\t\t\tKSMETHOD_STREAMALLOCATOR_ALLOC,\t\t\\\n\t\t\t\tKSMETHOD_TYPE_WRITE,\t\t\t\\\n\t\t\t\t(Handler),\t\t\t\t\\\n\t\t\t\tsizeof(KSMETHOD),\t\t\t\\\n\t\t\t\tsizeof(PVOID),\t\t\t\t\\\n\t\t\t\tNULL)\n\n#define DEFINE_KSMETHOD_ITEM_STREAMALLOCATOR_FREE(Handler)\t\t\\\n\tDEFINE_KSMETHOD_ITEM(\t\t\t\t\t\t\\\n\t\t\t\tKSMETHOD_STREAMALLOCATOR_FREE,\t\t\\\n\t\t\t\tKSMETHOD_TYPE_READ,\t\t\t\\\n\t\t\t\t(Handler),\t\t\t\t\\\n\t\t\t\tsizeof(KSMETHOD),\t\t\t\\\n\t\t\t\tsizeof(PVOID),\t\t\t\t\\\n\t\t\t\tNULL)\n\n#define DEFINE_KSMETHOD_ALLOCATORSET(AllocatorSet,MethodAlloc,MethodFree)\\\nDEFINE_KSMETHOD_TABLE(AllocatorSet) {\t\t\t\t\t\\\n\tDEFINE_KSMETHOD_ITEM_STREAMALLOCATOR_ALLOC(MethodAlloc),\t\\\n\tDEFINE_KSMETHOD_ITEM_STREAMALLOCATOR_FREE(MethodFree)\t\t\\\n}\n\n#define STATIC_KSPROPSETID_StreamAllocator\t\t\t\t\\\n\t0xcf6e4342L,0xec87,0x11cf,0xa1,0x30,0x00,0x20,0xaf,0xd1,0x56,0xe4\nDEFINE_GUIDSTRUCT(\"cf6e4342-ec87-11cf-a130-0020afd156e4\",KSPROPSETID_StreamAllocator);\n#define KSPROPSETID_StreamAllocator DEFINE_GUIDNAMED(KSPROPSETID_StreamAllocator)\n\n#if defined(_NTDDK_)\ntypedef enum {\n  KSPROPERTY_STREAMALLOCATOR_FUNCTIONTABLE,\n  KSPROPERTY_STREAMALLOCATOR_STATUS\n} KSPROPERTY_STREAMALLOCATOR;\n\n#define DEFINE_KSPROPERTY_ITEM_STREAMALLOCATOR_FUNCTIONTABLE(Handler)\t\\\n\tDEFINE_KSPROPERTY_ITEM(\t\t\t\t\t\t\\\n\t\t\t\tKSPROPERTY_STREAMALLOCATOR_FUNCTIONTABLE,\\\n\t\t\t\t(Handler),\t\t\t\t\\\n\t\t\t\tsizeof(KSPROPERTY),\t\t\t\\\n\t\t\t\tsizeof(KSSTREAMALLOCATOR_FUNCTIONTABLE),\\\n\t\t\t\tNULL, NULL, 0, NULL, NULL, 0)\n\n#define DEFINE_KSPROPERTY_ITEM_STREAMALLOCATOR_STATUS(Handler)\t\t\\\n\tDEFINE_KSPROPERTY_ITEM(\t\t\t\t\t\t\\\n\t\t\t\tKSPROPERTY_STREAMALLOCATOR_STATUS,\t\\\n\t\t\t\t(Handler),\t\t\t\t\\\n\t\t\t\tsizeof(KSPROPERTY),\t\t\t\\\n\t\t\t\tsizeof(KSSTREAMALLOCATOR_STATUS),\t\\\n\t\t\t\tNULL, NULL, 0, NULL, NULL, 0)\n\n#define DEFINE_KSPROPERTY_ALLOCATORSET(AllocatorSet,PropFunctionTable,PropStatus)\\\nDEFINE_KSPROPERTY_TABLE(AllocatorSet) {\t\t\t\t\t\\\n\tDEFINE_KSPROPERTY_ITEM_STREAMALLOCATOR_STATUS(PropStatus),\t\\\n\tDEFINE_KSPROPERTY_ITEM_STREAMALLOCATOR_FUNCTIONTABLE(PropFunctionTable)\\\n}\n\ntypedef NTSTATUS (*PFNALLOCATOR_ALLOCATEFRAME) (PFILE_OBJECT FileObject,\n\t\t\t\t\t\tPVOID *Frame);\ntypedef VOID (*PFNALLOCATOR_FREEFRAME) (PFILE_OBJECT FileObject, PVOID Frame);\n\ntypedef struct {\n  PFNALLOCATOR_ALLOCATEFRAME AllocateFrame;\n  PFNALLOCATOR_FREEFRAME FreeFrame;\n} KSSTREAMALLOCATOR_FUNCTIONTABLE, *PKSSTREAMALLOCATOR_FUNCTIONTABLE;\n#endif /* _NTDDK_ */\n\ntypedef struct {\n  KSALLOCATOR_FRAMING Framing;\n  ULONG AllocatedFrames;\n  ULONG Reserved;\n} KSSTREAMALLOCATOR_STATUS,*PKSSTREAMALLOCATOR_STATUS;\n\ntypedef struct {\n  KSALLOCATOR_FRAMING_EX Framing;\n  ULONG AllocatedFrames;\n  ULONG Reserved;\n} KSSTREAMALLOCATOR_STATUS_EX,*PKSSTREAMALLOCATOR_STATUS_EX;\n\n#define KSSTREAM_HEADER_OPTIONSF_SPLICEPOINT\t\t0x00000001\n#define KSSTREAM_HEADER_OPTIONSF_PREROLL\t\t0x00000002\n#define KSSTREAM_HEADER_OPTIONSF_DATADISCONTINUITY\t0x00000004\n#define KSSTREAM_HEADER_OPTIONSF_TYPECHANGED\t\t0x00000008\n#define KSSTREAM_HEADER_OPTIONSF_TIMEVALID\t\t0x00000010\n#define KSSTREAM_HEADER_OPTIONSF_TIMEDISCONTINUITY\t0x00000040\n#define KSSTREAM_HEADER_OPTIONSF_FLUSHONPAUSE\t\t0x00000080\n#define KSSTREAM_HEADER_OPTIONSF_DURATIONVALID\t\t0x00000100\n#define KSSTREAM_HEADER_OPTIONSF_ENDOFSTREAM\t\t0x00000200\n#define KSSTREAM_HEADER_OPTIONSF_LOOPEDDATA\t\t0x80000000\n\ntypedef struct {\n  LONGLONG Time;\n  ULONG Numerator;\n  ULONG Denominator;\n} KSTIME,*PKSTIME;\n\ntypedef struct {\n  ULONG Size;\n  ULONG TypeSpecificFlags;\n  KSTIME PresentationTime;\n  LONGLONG Duration;\n  ULONG FrameExtent;\n  ULONG DataUsed;\n  PVOID Data;\n  ULONG OptionsFlags;\n#ifdef _WIN64\n  ULONG Reserved;\n#endif\n} KSSTREAM_HEADER,*PKSSTREAM_HEADER;\n\n#define STATIC_KSPROPSETID_StreamInterface\t\t\t\t\\\n\t0x1fdd8ee1L,0x9cd3,0x11d0,0x82,0xaa,0x00,0x00,0xf8,0x22,0xfe,0x8a\nDEFINE_GUIDSTRUCT(\"1fdd8ee1-9cd3-11d0-82aa-0000f822fe8a\",KSPROPSETID_StreamInterface);\n#define KSPROPSETID_StreamInterface DEFINE_GUIDNAMED(KSPROPSETID_StreamInterface)\n\ntypedef enum {\n  KSPROPERTY_STREAMINTERFACE_HEADERSIZE\n} KSPROPERTY_STREAMINTERFACE;\n\n#define DEFINE_KSPROPERTY_ITEM_STREAMINTERFACE_HEADERSIZE(GetHandler)\t\\\n\tDEFINE_KSPROPERTY_ITEM(\t\t\t\t\t\t\\\n\t\t\t\tKSPROPERTY_STREAMINTERFACE_HEADERSIZE,\t\\\n\t\t\t\t(GetHandler),\t\t\t\t\\\n\t\t\t\tsizeof(KSPROPERTY),\t\t\t\\\n\t\t\t\tsizeof(ULONG),\t\t\t\t\\\n\t\t\t\tNULL,NULL,0,NULL,NULL,0)\n\n#define DEFINE_KSPROPERTY_STREAMINTERFACESET(StreamInterfaceSet,HeaderSizeHandler) \\\nDEFINE_KSPROPERTY_TABLE(StreamInterfaceSet) {\t\t\t\t\\\n\tDEFINE_KSPROPERTY_ITEM_STREAMINTERFACE_HEADERSIZE(HeaderSizeHandler)\\\n}\n\n#define STATIC_KSPROPSETID_Stream\t\t\t\t\t\\\n\t0x65aaba60L,0x98ae,0x11cf,0xa1,0x0d,0x00,0x20,0xaf,0xd1,0x56,0xe4\nDEFINE_GUIDSTRUCT(\"65aaba60-98ae-11cf-a10d-0020afd156e4\",KSPROPSETID_Stream);\n#define KSPROPSETID_Stream DEFINE_GUIDNAMED(KSPROPSETID_Stream)\n\ntypedef enum {\n  KSPROPERTY_STREAM_ALLOCATOR,\n  KSPROPERTY_STREAM_QUALITY,\n  KSPROPERTY_STREAM_DEGRADATION,\n  KSPROPERTY_STREAM_MASTERCLOCK,\n  KSPROPERTY_STREAM_TIMEFORMAT,\n  KSPROPERTY_STREAM_PRESENTATIONTIME,\n  KSPROPERTY_STREAM_PRESENTATIONEXTENT,\n  KSPROPERTY_STREAM_FRAMETIME,\n  KSPROPERTY_STREAM_RATECAPABILITY,\n  KSPROPERTY_STREAM_RATE,\n  KSPROPERTY_STREAM_PIPE_ID\n} KSPROPERTY_STREAM;\n\n#define DEFINE_KSPROPERTY_ITEM_STREAM_ALLOCATOR(GetHandler,SetHandler)\t\\\n\tDEFINE_KSPROPERTY_ITEM(\t\t\t\t\t\t\\\n\t\t\t\tKSPROPERTY_STREAM_ALLOCATOR,\t\t\\\n\t\t\t\t(GetHandler),\t\t\t\t\\\n\t\t\t\tsizeof(KSPROPERTY),\t\t\t\\\n\t\t\t\tsizeof(HANDLE),\t\t\t\t\\\n\t\t\t\t(SetHandler),\t\t\t\t\\\n\t\t\t\tNULL, 0, NULL, NULL, 0)\n\n#define DEFINE_KSPROPERTY_ITEM_STREAM_QUALITY(Handler)\t\t\t\\\n\tDEFINE_KSPROPERTY_ITEM(\t\t\t\t\t\t\\\n\t\t\t\tKSPROPERTY_STREAM_QUALITY,\t\t\\\n\t\t\t\t(Handler),\t\t\t\t\\\n\t\t\t\tsizeof(KSPROPERTY),\t\t\t\\\n\t\t\t\tsizeof(KSQUALITY_MANAGER),\t\t\\\n\t\t\t\tNULL, NULL, 0, NULL, NULL, 0)\n\n#define DEFINE_KSPROPERTY_ITEM_STREAM_DEGRADATION(GetHandler,SetHandler)\\\n\tDEFINE_KSPROPERTY_ITEM(\t\t\t\t\t\t\\\n\t\t\t\tKSPROPERTY_STREAM_DEGRADATION,\t\t\\\n\t\t\t\t(GetHandler),\t\t\t\t\\\n\t\t\t\tsizeof(KSPROPERTY),\t\t\t\\\n\t\t\t\t0,\t\t\t\t\t\\\n\t\t\t\t(SetHandler),\t\t\t\t\\\n\t\t\t\tNULL, 0, NULL, NULL, 0)\n\n#define DEFINE_KSPROPERTY_ITEM_STREAM_MASTERCLOCK(GetHandler,SetHandler)\\\n\tDEFINE_KSPROPERTY_ITEM(\t\t\t\t\t\t\\\n\t\t\t\tKSPROPERTY_STREAM_MASTERCLOCK,\t\t\\\n\t\t\t\t(GetHandler),\t\t\t\t\\\n\t\t\t\tsizeof(KSPROPERTY),\t\t\t\\\n\t\t\t\tsizeof(HANDLE),\t\t\t\t\\\n\t\t\t\t(SetHandler),\t\t\t\t\\\n\t\t\t\tNULL, 0, NULL, NULL, 0)\n\n#define DEFINE_KSPROPERTY_ITEM_STREAM_TIMEFORMAT(Handler)\t\t\\\n\tDEFINE_KSPROPERTY_ITEM(\t\t\t\t\t\t\\\n\t\t\t\tKSPROPERTY_STREAM_TIMEFORMAT,\t\t\\\n\t\t\t\t(Handler),\t\t\t\t\\\n\t\t\t\tsizeof(KSPROPERTY),\t\t\t\\\n\t\t\t\tsizeof(GUID),\t\t\t\t\\\n\t\t\t\tNULL, NULL, 0, NULL, NULL, 0)\n\n#define DEFINE_KSPROPERTY_ITEM_STREAM_PRESENTATIONTIME(GetHandler,SetHandler)\\\n\tDEFINE_KSPROPERTY_ITEM(\t\t\t\t\t\t\\\n\t\t\t\tKSPROPERTY_STREAM_PRESENTATIONTIME,\t\\\n\t\t\t\t(GetHandler),\t\t\t\t\\\n\t\t\t\tsizeof(KSPROPERTY),\t\t\t\\\n\t\t\t\tsizeof(KSTIME),\t\t\t\t\\\n\t\t\t\t(SetHandler),\t\t\t\t\\\n\t\t\t\tNULL, 0, NULL, NULL, 0)\n\n#define DEFINE_KSPROPERTY_ITEM_STREAM_PRESENTATIONEXTENT(Handler)\t\\\n\tDEFINE_KSPROPERTY_ITEM(\t\t\t\t\t\t\\\n\t\t\t\tKSPROPERTY_STREAM_PRESENTATIONEXTENT,\t\\\n\t\t\t\t(Handler),\t\t\t\t\\\n\t\t\t\tsizeof(KSPROPERTY),\t\t\t\\\n\t\t\t\tsizeof(LONGLONG),\t\t\t\\\n\t\t\t\tNULL, NULL, 0, NULL, NULL, 0)\n\n#define DEFINE_KSPROPERTY_ITEM_STREAM_FRAMETIME(Handler)\t\t\\\n\tDEFINE_KSPROPERTY_ITEM(\t\t\t\t\t\t\\\n\t\t\t\tKSPROPERTY_STREAM_FRAMETIME,\t\t\\\n\t\t\t\t(Handler),\t\t\t\t\\\n\t\t\t\tsizeof(KSPROPERTY),\t\t\t\\\n\t\t\t\tsizeof(KSFRAMETIME),\t\t\t\\\n\t\t\t\tNULL, NULL, 0, NULL, NULL, 0)\n\n#define DEFINE_KSPROPERTY_ITEM_STREAM_RATECAPABILITY(Handler)\t\t\\\n\tDEFINE_KSPROPERTY_ITEM(\t\t\t\t\t\t\\\n\t\t\t\tKSPROPERTY_STREAM_RATECAPABILITY,\t\\\n\t\t\t\t(Handler),\t\t\t\t\\\n\t\t\t\tsizeof(KSRATE_CAPABILITY),\t\t\\\n\t\t\t\tsizeof(KSRATE),\t\t\t\t\\\n\t\t\t\tNULL, NULL, 0, NULL, NULL, 0)\n\n#define DEFINE_KSPROPERTY_ITEM_STREAM_RATE(GetHandler,SetHandler)\t\\\n\tDEFINE_KSPROPERTY_ITEM(\t\t\t\t\t\t\\\n\t\t\t\tKSPROPERTY_STREAM_RATE,\t\t\t\\\n\t\t\t\t(GetHandler),\t\t\t\t\\\n\t\t\t\tsizeof(KSPROPERTY),\t\t\t\\\n\t\t\t\tsizeof(KSRATE),\t\t\t\t\\\n\t\t\t\t(SetHandler),\t\t\t\t\\\n\t\t\t\tNULL, 0, NULL, NULL, 0)\n\n#define DEFINE_KSPROPERTY_ITEM_STREAM_PIPE_ID(GetHandler,SetHandler)\t\\\n\tDEFINE_KSPROPERTY_ITEM(\t\t\t\t\t\t\\\n\t\t\t\tKSPROPERTY_STREAM_PIPE_ID,\t\t\\\n\t\t\t\t(GetHandler),\t\t\t\t\\\n\t\t\t\tsizeof(KSPROPERTY),\t\t\t\\\n\t\t\t\tsizeof(HANDLE),\t\t\t\t\\\n\t\t\t\t(SetHandler),\t\t\t\t\\\n\t\t\t\tNULL, 0, NULL, NULL, 0)\n\ntypedef struct {\n  HANDLE QualityManager;\n  PVOID Context;\n} KSQUALITY_MANAGER,*PKSQUALITY_MANAGER;\n\ntypedef struct {\n  LONGLONG Duration;\n  ULONG FrameFlags;\n  ULONG Reserved;\n} KSFRAMETIME,*PKSFRAMETIME;\n\n#define KSFRAMETIME_VARIABLESIZE\t0x00000001\n\ntypedef struct {\n  LONGLONG PresentationStart;\n  LONGLONG Duration;\n  KSPIN_INTERFACE Interface;\n  LONG Rate;\n  ULONG Flags;\n} KSRATE,*PKSRATE;\n\n#define KSRATE_NOPRESENTATIONSTART\t0x00000001\n#define KSRATE_NOPRESENTATIONDURATION\t0x00000002\n\ntypedef struct {\n  KSPROPERTY Property;\n  KSRATE Rate;\n} KSRATE_CAPABILITY,*PKSRATE_CAPABILITY;\n\n#define STATIC_KSPROPSETID_Clock\t\t\t\t\t\\\n\t0xDF12A4C0L,0xAC17,0x11CF,0xA5,0xD6,0x28,0xDB,0x04,0xC1,0x00,0x00\nDEFINE_GUIDSTRUCT(\"DF12A4C0-AC17-11CF-A5D6-28DB04C10000\",KSPROPSETID_Clock);\n#define KSPROPSETID_Clock DEFINE_GUIDNAMED(KSPROPSETID_Clock)\n\n#define NANOSECONDS 10000000\n#define KSCONVERT_PERFORMANCE_TIME(Frequency,PerformanceTime)\t\t\\\n\t((((ULONGLONG)(ULONG)(PerformanceTime).HighPart *NANOSECONDS / (Frequency)) << 32) +\t\\\n\t ((((((ULONGLONG)(ULONG)(PerformanceTime).HighPart *NANOSECONDS) % (Frequency)) << 32) +\\\n\t ((ULONGLONG)(PerformanceTime).LowPart *NANOSECONDS)) / (Frequency)))\n\ntypedef struct {\n  ULONG CreateFlags;\n} KSCLOCK_CREATE,*PKSCLOCK_CREATE;\n\ntypedef struct {\n  LONGLONG Time;\n  LONGLONG SystemTime;\n} KSCORRELATED_TIME,*PKSCORRELATED_TIME;\n\ntypedef struct {\n  LONGLONG Granularity;\n  LONGLONG Error;\n} KSRESOLUTION,*PKSRESOLUTION;\n\ntypedef enum {\n  KSPROPERTY_CLOCK_TIME,\n  KSPROPERTY_CLOCK_PHYSICALTIME,\n  KSPROPERTY_CLOCK_CORRELATEDTIME,\n  KSPROPERTY_CLOCK_CORRELATEDPHYSICALTIME,\n  KSPROPERTY_CLOCK_RESOLUTION,\n  KSPROPERTY_CLOCK_STATE,\n#if defined(_NTDDK_)\n  KSPROPERTY_CLOCK_FUNCTIONTABLE\n#endif /* _NTDDK_ */\n} KSPROPERTY_CLOCK;\n\n#if defined(_NTDDK_)\ntypedef LONGLONG (FASTCALL *PFNKSCLOCK_GETTIME)(PFILE_OBJECT FileObject);\ntypedef LONGLONG (FASTCALL *PFNKSCLOCK_CORRELATEDTIME)(PFILE_OBJECT FileObject,\n\t\t\t\t\t\t\tPLONGLONG SystemTime);\n\ntypedef struct {\n   PFNKSCLOCK_GETTIME GetTime;\n   PFNKSCLOCK_GETTIME GetPhysicalTime;\n   PFNKSCLOCK_CORRELATEDTIME GetCorrelatedTime;\n   PFNKSCLOCK_CORRELATEDTIME GetCorrelatedPhysicalTime;\n} KSCLOCK_FUNCTIONTABLE, *PKSCLOCK_FUNCTIONTABLE;\n\ntypedef BOOLEAN (*PFNKSSETTIMER)(PVOID Context, PKTIMER Timer,\n\t\t\t\t LARGE_INTEGER DueTime, PKDPC Dpc);\ntypedef BOOLEAN (*PFNKSCANCELTIMER) (PVOID Context, PKTIMER Timer);\ntypedef LONGLONG (FASTCALL *PFNKSCORRELATEDTIME)(PVOID Context,\n\t\t\t\t\t\t PLONGLONG SystemTime);\n\ntypedef PVOID\t\t\tPKSDEFAULTCLOCK;\n\n#define DEFINE_KSPROPERTY_ITEM_CLOCK_TIME(Handler)\t\t\t\\\n\tDEFINE_KSPROPERTY_ITEM(\t\t\t\t\t\t\\\n\t\t\t\tKSPROPERTY_CLOCK_TIME,\t\t\t\\\n\t\t\t\t(Handler),\t\t\t\t\\\n\t\t\t\tsizeof(KSPROPERTY), sizeof(LONGLONG),\t\\\n\t\t\t\tNULL, NULL, 0, NULL, NULL, 0)\n\n#define DEFINE_KSPROPERTY_ITEM_CLOCK_PHYSICALTIME(Handler)\t\t\\\n\tDEFINE_KSPROPERTY_ITEM(\t\t\t\t\t\t\\\n\t\t\t\tKSPROPERTY_CLOCK_PHYSICALTIME,\t\t\\\n\t\t\t\t(Handler),\t\t\t\t\\\n\t\t\t\tsizeof(KSPROPERTY), sizeof(LONGLONG),\t\\\n\t\t\t\tNULL, NULL, 0, NULL, NULL, 0)\n\n#define DEFINE_KSPROPERTY_ITEM_CLOCK_CORRELATEDTIME(Handler)\t\t\\\n\tDEFINE_KSPROPERTY_ITEM(\t\t\t\t\t\t\\\n\t\t\t\tKSPROPERTY_CLOCK_CORRELATEDTIME,\t\\\n\t\t\t\t(Handler),\t\t\t\t\\\n\t\t\t\tsizeof(KSPROPERTY),\t\t\t\\\n\t\t\t\tsizeof(KSCORRELATED_TIME),\t\t\\\n\t\t\t\tNULL, NULL, 0, NULL, NULL, 0)\n\n#define DEFINE_KSPROPERTY_ITEM_CLOCK_CORRELATEDPHYSICALTIME(Handler)\t\\\n\tDEFINE_KSPROPERTY_ITEM(\t\t\t\t\t\t\\\n\t\t\t\tKSPROPERTY_CLOCK_CORRELATEDPHYSICALTIME,\\\n\t\t\t\t(Handler),\t\t\t\t\\\n\t\t\t\tsizeof(KSPROPERTY),\t\t\t\\\n\t\t\t\tsizeof(KSCORRELATED_TIME),\t\t\\\n\t\t\t\tNULL, NULL, 0, NULL, NULL, 0)\n\n#define DEFINE_KSPROPERTY_ITEM_CLOCK_RESOLUTION(Handler)\t\t\\\n\tDEFINE_KSPROPERTY_ITEM(\t\t\t\t\t\t\\\n\t\t\t\tKSPROPERTY_CLOCK_RESOLUTION,\t\t\\\n\t\t\t\t(Handler),\t\t\t\t\\\n\t\t\t\tsizeof(KSPROPERTY),sizeof(KSRESOLUTION),\\\n\t\t\t\tNULL, NULL, 0, NULL, NULL, 0)\n\n#define DEFINE_KSPROPERTY_ITEM_CLOCK_STATE(Handler)\t\t\t\\\n\tDEFINE_KSPROPERTY_ITEM(\t\t\t\t\t\t\\\n\t\t\t\tKSPROPERTY_CLOCK_STATE,\t\t\t\\\n\t\t\t\t(Handler),\t\t\t\t\\\n\t\t\t\tsizeof(KSPROPERTY), sizeof(KSSTATE),\t\\\n\t\t\t\tNULL, NULL, 0, NULL, NULL, 0)\n\n#define DEFINE_KSPROPERTY_ITEM_CLOCK_FUNCTIONTABLE(Handler)\t\t\\\n\tDEFINE_KSPROPERTY_ITEM(\t\t\t\t\t\t\\\n\t\t\t\tKSPROPERTY_CLOCK_FUNCTIONTABLE,\t\t\\\n\t\t\t\t(Handler),\t\t\t\t\\\n\t\t\t\tsizeof(KSPROPERTY),\t\t\t\\\n\t\t\t\tsizeof(KSCLOCK_FUNCTIONTABLE),\t\t\\\n\t\t\t\tNULL, NULL, 0, NULL, NULL, 0)\n\n#define DEFINE_KSPROPERTY_CLOCKSET(ClockSet,PropTime,PropPhysicalTime,PropCorrelatedTime,PropCorrelatedPhysicalTime,PropResolution,PropState,PropFunctionTable)\\\nDEFINE_KSPROPERTY_TABLE(ClockSet) {\t\t\t\t\t\\\n\tDEFINE_KSPROPERTY_ITEM_CLOCK_TIME(PropTime),\t\t\t\\\n\tDEFINE_KSPROPERTY_ITEM_CLOCK_PHYSICALTIME(PropPhysicalTime),\t\\\n\tDEFINE_KSPROPERTY_ITEM_CLOCK_CORRELATEDTIME(PropCorrelatedTime),\\\n\tDEFINE_KSPROPERTY_ITEM_CLOCK_CORRELATEDPHYSICALTIME(PropCorrelatedPhysicalTime),\\\n\tDEFINE_KSPROPERTY_ITEM_CLOCK_RESOLUTION(PropResolution),\t\\\n\tDEFINE_KSPROPERTY_ITEM_CLOCK_STATE(PropState),\t\t\t\\\n\tDEFINE_KSPROPERTY_ITEM_CLOCK_FUNCTIONTABLE(PropFunctionTable),\t\\\n}\n#endif /* _NTDDK_ */\n\n#define STATIC_KSEVENTSETID_Clock\t\t\t\t\t\\\n\t0x364D8E20L,0x62C7,0x11CF,0xA5,0xD6,0x28,0xDB,0x04,0xC1,0x00,0x00\nDEFINE_GUIDSTRUCT(\"364D8E20-62C7-11CF-A5D6-28DB04C10000\",KSEVENTSETID_Clock);\n#define KSEVENTSETID_Clock DEFINE_GUIDNAMED(KSEVENTSETID_Clock)\n\ntypedef enum {\n  KSEVENT_CLOCK_INTERVAL_MARK,\n  KSEVENT_CLOCK_POSITION_MARK\n} KSEVENT_CLOCK_POSITION;\n\n#define STATIC_KSEVENTSETID_Connection\t\t\t\t\t\\\n\t0x7f4bcbe0L,0x9ea5,0x11cf,0xa5,0xd6,0x28,0xdb,0x04,0xc1,0x00,0x00\nDEFINE_GUIDSTRUCT(\"7f4bcbe0-9ea5-11cf-a5d6-28db04c10000\",KSEVENTSETID_Connection);\n#define KSEVENTSETID_Connection DEFINE_GUIDNAMED(KSEVENTSETID_Connection)\n\ntypedef enum {\n  KSEVENT_CONNECTION_POSITIONUPDATE,\n  KSEVENT_CONNECTION_DATADISCONTINUITY,\n  KSEVENT_CONNECTION_TIMEDISCONTINUITY,\n  KSEVENT_CONNECTION_PRIORITY,\n  KSEVENT_CONNECTION_ENDOFSTREAM\n} KSEVENT_CONNECTION;\n\ntypedef struct {\n  PVOID Context;\n  ULONG Proportion;\n  LONGLONG DeltaTime;\n} KSQUALITY,*PKSQUALITY;\n\ntypedef struct {\n  PVOID Context;\n  ULONG Status;\n} KSERROR,*PKSERROR;\n\ntypedef KSIDENTIFIER KSDEGRADE,*PKSDEGRADE;\n\n#define STATIC_KSDEGRADESETID_Standard\t\t\t\t\t\\\n\t0x9F564180L,0x704C,0x11D0,0xA5,0xD6,0x28,0xDB,0x04,0xC1,0x00,0x00\nDEFINE_GUIDSTRUCT(\"9F564180-704C-11D0-A5D6-28DB04C10000\",KSDEGRADESETID_Standard);\n#define KSDEGRADESETID_Standard DEFINE_GUIDNAMED(KSDEGRADESETID_Standard)\n\ntypedef enum {\n  KSDEGRADE_STANDARD_SAMPLE,\n  KSDEGRADE_STANDARD_QUALITY,\n  KSDEGRADE_STANDARD_COMPUTATION,\n  KSDEGRADE_STANDARD_SKIP\n} KSDEGRADE_STANDARD;\n\n#if defined(_NTDDK_)\n\n#define KSPROBE_STREAMREAD\t\t0x00000000\n#define KSPROBE_STREAMWRITE\t\t0x00000001\n#define KSPROBE_ALLOCATEMDL\t\t0x00000010\n#define KSPROBE_PROBEANDLOCK\t\t0x00000020\n#define KSPROBE_SYSTEMADDRESS\t\t0x00000040\n#define KSPROBE_MODIFY\t\t\t0x00000200\n#define KSPROBE_STREAMWRITEMODIFY\t(KSPROBE_MODIFY | KSPROBE_STREAMWRITE)\n#define KSPROBE_ALLOWFORMATCHANGE\t0x00000080\n#define KSSTREAM_READ\t\t\tKSPROBE_STREAMREAD\n#define KSSTREAM_WRITE\t\t\tKSPROBE_STREAMWRITE\n#define KSSTREAM_PAGED_DATA\t\t0x00000000\n#define KSSTREAM_NONPAGED_DATA\t\t0x00000100\n#define KSSTREAM_SYNCHRONOUS\t\t0x00001000\n#define KSSTREAM_FAILUREEXCEPTION\t0x00002000\n\ntypedef NTSTATUS (*PFNKSCONTEXT_DISPATCH)(PVOID Context, PIRP Irp);\ntypedef NTSTATUS (*PFNKSHANDLER)(PIRP Irp, PKSIDENTIFIER Request, PVOID Data);\ntypedef BOOLEAN (*PFNKSFASTHANDLER)(PFILE_OBJECT FileObject,\n\t\t\t\t    PKSIDENTIFIER Request,\n\t\t\t\t    ULONG RequestLength, PVOID Data,\n\t\t\t\t    ULONG DataLength,\n\t\t\t\t    PIO_STATUS_BLOCK IoStatus);\ntypedef NTSTATUS (*PFNKSALLOCATOR) (PIRP Irp, ULONG BufferSize,\n\t\t\t\t    BOOLEAN InputOperation);\n\ntypedef struct {\n  KSPROPERTY_MEMBERSHEADER MembersHeader;\n  const VOID *Members;\n} KSPROPERTY_MEMBERSLIST, *PKSPROPERTY_MEMBERSLIST;\n\ntypedef struct {\n  KSIDENTIFIER PropTypeSet;\n  ULONG MembersListCount;\n  const KSPROPERTY_MEMBERSLIST *MembersList;\n} KSPROPERTY_VALUES, *PKSPROPERTY_VALUES;\n\n#define DEFINE_KSPROPERTY_TABLE(tablename)\t\t\t\t\\\n\tconst KSPROPERTY_ITEM tablename[] =\n\n#define DEFINE_KSPROPERTY_ITEM(PropertyId,GetHandler,MinProperty,MinData,SetHandler,Values,RelationsCount,Relations,SupportHandler,SerializedSize)\\\n{\t\t\t\t\t\t\t\t\t\\\n\t\t\tPropertyId, (PFNKSHANDLER)GetHandler,\t\t\\\n\t\t\tMinProperty, MinData,\t\t\t\t\\\n\t\t\t(PFNKSHANDLER)SetHandler,\t\t\t\\\n\t\t\t(PKSPROPERTY_VALUES)Values, RelationsCount,\t\\\n\t\t\t(PKSPROPERTY)Relations,\t\t\t\t\\\n\t\t\t(PFNKSHANDLER)SupportHandler,\t\t\t\\\n\t\t\t(ULONG)SerializedSize\t\t\t\t\\\n}\n\ntypedef struct {\n  ULONG PropertyId;\n  __MINGW_EXTENSION union {\n    PFNKSHANDLER GetPropertyHandler;\n    BOOLEAN GetSupported;\n  };\n  ULONG MinProperty;\n  ULONG MinData;\n  __MINGW_EXTENSION union {\n    PFNKSHANDLER SetPropertyHandler;\n    BOOLEAN SetSupported;\n  };\n  const KSPROPERTY_VALUES *Values;\n  ULONG RelationsCount;\n  const KSPROPERTY *Relations;\n  PFNKSHANDLER SupportHandler;\n  ULONG SerializedSize;\n} KSPROPERTY_ITEM, *PKSPROPERTY_ITEM;\n\n#define DEFINE_KSFASTPROPERTY_ITEM(PropertyId, GetHandler, SetHandler)\t\\\n{\t\t\t\t\t\t\t\t\t\\\n\t\t\tPropertyId, (PFNKSFASTHANDLER)GetHandler,\t\\\n\t\t\t(PFNKSFASTHANDLER)SetHandler, 0\t\t\t\\\n}\n\ntypedef struct {\n  ULONG PropertyId;\n  __MINGW_EXTENSION union {\n    PFNKSFASTHANDLER GetPropertyHandler;\n    BOOLEAN GetSupported;\n  };\n  __MINGW_EXTENSION union {\n    PFNKSFASTHANDLER SetPropertyHandler;\n    BOOLEAN SetSupported;\n  };\n  ULONG Reserved;\n} KSFASTPROPERTY_ITEM, *PKSFASTPROPERTY_ITEM;\n\n#define DEFINE_KSPROPERTY_SET(Set,PropertiesCount,PropertyItem,FastIoCount,FastIoTable)\\\n{\t\t\t\t\t\t\t\t\t\\\n\t\t\tSet,\t\t\t\t\t\t\\\n\t\t\tPropertiesCount, PropertyItem,\t\t\t\\\n\t\t\tFastIoCount, FastIoTable\t\t\t\\\n}\n\n#define DEFINE_KSPROPERTY_SET_TABLE(tablename)\t\t\t\t\\\n\tconst KSPROPERTY_SET tablename[] =\n\ntypedef struct {\n  const GUID *Set;\n  ULONG PropertiesCount;\n  const KSPROPERTY_ITEM *PropertyItem;\n  ULONG FastIoCount;\n  const KSFASTPROPERTY_ITEM *FastIoTable;\n} KSPROPERTY_SET, *PKSPROPERTY_SET;\n\n#define DEFINE_KSMETHOD_TABLE(tablename)\t\t\t\t\\\n\tconst KSMETHOD_ITEM tablename[] =\n\n#define DEFINE_KSMETHOD_ITEM(MethodId,Flags,MethodHandler,MinMethod,MinData,SupportHandler)\\\n{\t\t\t\t\t\t\t\t\t\\\n\t\t\tMethodId, (PFNKSHANDLER)MethodHandler,\t\t\\\n\t\t\tMinMethod, MinData,\t\t\t\t\\\n\t\t\tSupportHandler, Flags\t\t\t\t\\\n}\n\ntypedef struct {\n  ULONG MethodId;\n  __MINGW_EXTENSION union {\n    PFNKSHANDLER MethodHandler;\n    BOOLEAN MethodSupported;\n  };\n  ULONG MinMethod;\n  ULONG MinData;\n  PFNKSHANDLER SupportHandler;\n  ULONG Flags;\n} KSMETHOD_ITEM, *PKSMETHOD_ITEM;\n\n#define DEFINE_KSFASTMETHOD_ITEM(MethodId,MethodHandler)\t\t\\\n{\t\t\t\t\t\t\t\t\t\\\n\t\t\tMethodId, (PFNKSFASTHANDLER)MethodHandler\t\\\n}\n\ntypedef struct {\n  ULONG MethodId;\n  __MINGW_EXTENSION union {\n    PFNKSFASTHANDLER MethodHandler;\n    BOOLEAN MethodSupported;\n  };\n} KSFASTMETHOD_ITEM, *PKSFASTMETHOD_ITEM;\n\n#define DEFINE_KSMETHOD_SET(Set,MethodsCount,MethodItem,FastIoCount,FastIoTable)\\\n{\t\t\t\t\t\t\t\t\t\\\n\t\t\tSet,\t\t\t\t\t\t\\\n\t\t\tMethodsCount, MethodItem,\t\t\t\\\n\t\t\tFastIoCount, FastIoTable\t\t\t\\\n}\n\n#define DEFINE_KSMETHOD_SET_TABLE(tablename)\t\t\t\t\\\n\tconst KSMETHOD_SET tablename[] =\n\ntypedef struct {\n  const GUID *Set;\n  ULONG MethodsCount;\n  const KSMETHOD_ITEM *MethodItem;\n  ULONG FastIoCount;\n  const KSFASTMETHOD_ITEM *FastIoTable;\n} KSMETHOD_SET, *PKSMETHOD_SET;\n\ntypedef struct _KSEVENT_ENTRY\tKSEVENT_ENTRY, *PKSEVENT_ENTRY;\ntypedef NTSTATUS (*PFNKSADDEVENT)(PIRP Irp, PKSEVENTDATA EventData,\n\t\t\t\t  struct _KSEVENT_ENTRY* EventEntry);\ntypedef VOID (*PFNKSREMOVEEVENT)(PFILE_OBJECT FileObject,\n\t\t\t\t struct _KSEVENT_ENTRY* EventEntry);\n\n#define DEFINE_KSEVENT_TABLE(tablename)\t\t\t\t\t\\\n\tconst KSEVENT_ITEM tablename[] =\n\n#define DEFINE_KSEVENT_ITEM(EventId,DataInput,ExtraEntryData,AddHandler,RemoveHandler,SupportHandler)\\\n{\t\t\t\t\t\t\t\t\t\\\n\t\t\tEventId, DataInput, ExtraEntryData,\t\t\\\n\t\t\tAddHandler, RemoveHandler, SupportHandler\t\\\n}\n\ntypedef struct {\n  ULONG EventId;\n  ULONG DataInput;\n  ULONG ExtraEntryData;\n  PFNKSADDEVENT AddHandler;\n  PFNKSREMOVEEVENT RemoveHandler;\n  PFNKSHANDLER SupportHandler;\n} KSEVENT_ITEM, *PKSEVENT_ITEM;\n\n#define DEFINE_KSEVENT_SET(Set,EventsCount,EventItem)\t\t\t\\\n{\t\t\t\t\t\t\t\t\t\\\n\t\t\tSet, EventsCount, EventItem\t\t\t\\\n}\n\n#define DEFINE_KSEVENT_SET_TABLE(tablename)\t\t\t\t\\\n\tconst KSEVENT_SET tablename[] =\n\ntypedef struct {\n  const GUID *Set;\n  ULONG EventsCount;\n  const KSEVENT_ITEM *EventItem;\n} KSEVENT_SET, *PKSEVENT_SET;\n\ntypedef struct {\n  KDPC Dpc;\n  ULONG ReferenceCount;\n  KSPIN_LOCK AccessLock;\n} KSDPC_ITEM, *PKSDPC_ITEM;\n\ntypedef struct {\n  KSDPC_ITEM DpcItem;\n  LIST_ENTRY BufferList;\n} KSBUFFER_ITEM, *PKSBUFFER_ITEM;\n\n\n#define KSEVENT_ENTRY_DELETED\t\t1\n#define KSEVENT_ENTRY_ONESHOT\t\t2\n#define KSEVENT_ENTRY_BUFFERED\t\t4\n\nstruct _KSEVENT_ENTRY {\n  LIST_ENTRY ListEntry;\n  PVOID Object;\n  __MINGW_EXTENSION union {\n    PKSDPC_ITEM DpcItem;\n    PKSBUFFER_ITEM BufferItem;\n  };\n  PKSEVENTDATA EventData;\n  ULONG NotificationType;\n  const KSEVENT_SET *EventSet;\n  const KSEVENT_ITEM *EventItem;\n  PFILE_OBJECT FileObject;\n  ULONG SemaphoreAdjustment;\n  ULONG Reserved;\n  ULONG Flags;\n};\n\ntypedef enum {\n  KSEVENTS_NONE,\n  KSEVENTS_SPINLOCK,\n  KSEVENTS_MUTEX,\n  KSEVENTS_FMUTEX,\n  KSEVENTS_FMUTEXUNSAFE,\n  KSEVENTS_INTERRUPT,\n  KSEVENTS_ERESOURCE\n} KSEVENTS_LOCKTYPE;\n\n#define KSDISPATCH_FASTIO\t\t\t0x80000000\n\ntypedef struct {\n  PDRIVER_DISPATCH Create;\n  PVOID Context;\n  UNICODE_STRING ObjectClass;\n  PSECURITY_DESCRIPTOR SecurityDescriptor;\n  ULONG Flags;\n} KSOBJECT_CREATE_ITEM, *PKSOBJECT_CREATE_ITEM;\n\ntypedef VOID (*PFNKSITEMFREECALLBACK)(PKSOBJECT_CREATE_ITEM CreateItem);\n\n#define KSCREATE_ITEM_SECURITYCHANGED\t\t0x00000001\n#define KSCREATE_ITEM_WILDCARD\t\t\t0x00000002\n#define KSCREATE_ITEM_NOPARAMETERS\t\t0x00000004\n#define KSCREATE_ITEM_FREEONSTOP\t\t0x00000008\n\n#define DEFINE_KSCREATE_DISPATCH_TABLE( tablename )\t\t\t\\\n\tKSOBJECT_CREATE_ITEM tablename[] =\n\n#define DEFINE_KSCREATE_ITEM(DispatchCreate,TypeName,Context)\t\t\\\n{\t\t\t\t\t\t\t\t\t\\\n\t\t\t(DispatchCreate), (PVOID)(Context),\t\t\\\n\t\t\t{\t\t\t\t\t\t\\\n\t\t\t\tsizeof(TypeName) - sizeof(UNICODE_NULL),\\\n\t\t\t\tsizeof(TypeName),\t\t\t\\\n\t\t\t\t(PWCHAR)(TypeName)\t\t\t\\\n\t\t\t},\t\t\t\t\t\t\\\n\t\t\tNULL, 0\t\t\t\t\t\t\\\n}\n\n#define DEFINE_KSCREATE_ITEMEX(DispatchCreate,TypeName,Context,Flags)\t\\\n{\t\t\t\t\t\t\t\t\t\\\n\t\t\t(DispatchCreate),\t\t\t\t\\\n\t\t\t(PVOID)(Context),\t\t\t\t\\\n\t\t\t{\t\t\t\t\t\t\\\n\t\t\t\tsizeof(TypeName) - sizeof(UNICODE_NULL),\\\n\t\t\t\tsizeof(TypeName),\t\t\t\\\n\t\t\t\t(PWCHAR)(TypeName)\t\t\t\\\n\t\t\t},\t\t\t\t\t\t\\\n\t\t\tNULL, (Flags)\t\t\t\t\t\\\n}\n\n#define DEFINE_KSCREATE_ITEMNULL(DispatchCreate,Context)\t\t\\\n{\t\t\t\t\t\t\t\t\t\\\n\t\t\tDispatchCreate, Context,\t\t\t\\\n\t\t\t{\t\t\t\t\t\t\\\n\t\t\t\t0, 0, NULL,\t\t\t\t\\\n\t\t\t},\t\t\t\t\t\t\\\n\t\t\tNULL, 0\t\t\t\t\t\t\\\n}\n\ntypedef struct {\n  ULONG CreateItemsCount;\n  PKSOBJECT_CREATE_ITEM CreateItemsList;\n} KSOBJECT_CREATE, *PKSOBJECT_CREATE;\n\ntypedef struct {\n  PDRIVER_DISPATCH DeviceIoControl;\n  PDRIVER_DISPATCH Read;\n  PDRIVER_DISPATCH Write;\n  PDRIVER_DISPATCH Flush;\n  PDRIVER_DISPATCH Close;\n  PDRIVER_DISPATCH QuerySecurity;\n  PDRIVER_DISPATCH SetSecurity;\n  PFAST_IO_DEVICE_CONTROL FastDeviceIoControl;\n  PFAST_IO_READ FastRead;\n  PFAST_IO_WRITE FastWrite;\n} KSDISPATCH_TABLE, *PKSDISPATCH_TABLE;\n\n#define DEFINE_KSDISPATCH_TABLE(tablename,DeviceIoControl,Read,Write,Flush,Close,QuerySecurity,SetSecurity,FastDeviceIoControl,FastRead,FastWrite)\\\n\tconst KSDISPATCH_TABLE tablename =\t\t\t\t\\\n\t{\t\t\t\t\t\t\t\t\\\n\t\tDeviceIoControl,\t\t\t\t\t\\\n\t\tRead,\t\t\t\t\t\t\t\\\n\t\tWrite,\t\t\t\t\t\t\t\\\n\t\tFlush,\t\t\t\t\t\t\t\\\n\t\tClose,\t\t\t\t\t\t\t\\\n\t\tQuerySecurity,\t\t\t\t\t\t\\\n\t\tSetSecurity,\t\t\t\t\t\t\\\n\t\tFastDeviceIoControl,\t\t\t\t\t\\\n\t\tFastRead,\t\t\t\t\t\t\\\n\t\tFastWrite,\t\t\t\t\t\t\\\n\t}\n\n#define KSCREATE_ITEM_IRP_STORAGE(Irp)\t\t\t\t\t\\\n\t(*(PKSOBJECT_CREATE_ITEM *)&(Irp)->Tail.Overlay.DriverContext[0])\n#define KSEVENT_SET_IRP_STORAGE(Irp)\t\t\t\t\t\\\n\t(*(const KSEVENT_SET **)&(Irp)->Tail.Overlay.DriverContext[0])\n#define KSEVENT_ITEM_IRP_STORAGE(Irp)\t\t\t\t\t\\\n\t(*(const KSEVENT_ITEM **)&(Irp)->Tail.Overlay.DriverContext[3])\n#define KSEVENT_ENTRY_IRP_STORAGE(Irp)\t\t\t\t\t\\\n\t(*(PKSEVENT_ENTRY *)&(Irp)->Tail.Overlay.DriverContext[0])\n#define KSMETHOD_SET_IRP_STORAGE(Irp)\t\t\t\t\t\\\n\t(*(const KSMETHOD_SET **)&(Irp)->Tail.Overlay.DriverContext[0])\n#define KSMETHOD_ITEM_IRP_STORAGE(Irp)\t\t\t\t\t\\\n\t(*(const KSMETHOD_ITEM **)&(Irp)->Tail.Overlay.DriverContext[3])\n#define KSMETHOD_TYPE_IRP_STORAGE(Irp)\t\t\t\t\t\\\n\t(*(ULONG_PTR *)(&(Irp)->Tail.Overlay.DriverContext[2]))\n#define KSQUEUE_SPINLOCK_IRP_STORAGE(Irp)\t\t\t\t\\\n\t(*(PKSPIN_LOCK *)&(Irp)->Tail.Overlay.DriverContext[1])\n#define KSPROPERTY_SET_IRP_STORAGE(Irp)\t\t\t\t\t\\\n\t(*(const KSPROPERTY_SET **)&(Irp)->Tail.Overlay.DriverContext[0])\n#define KSPROPERTY_ITEM_IRP_STORAGE(Irp)\t\t\t\t\\\n\t(*(const KSPROPERTY_ITEM **)&(Irp)->Tail.Overlay.DriverContext[3])\n#define KSPROPERTY_ATTRIBUTES_IRP_STORAGE(Irp)\t\t\t\t\\\n\t(*(PKSATTRIBUTE_LIST *)&(Irp)->Tail.Overlay.DriverContext[2])\n\ntypedef PVOID\t\tKSDEVICE_HEADER, KSOBJECT_HEADER;\n\ntypedef enum {\n  KsInvokeOnSuccess = 1,\n  KsInvokeOnError = 2,\n  KsInvokeOnCancel = 4\n} KSCOMPLETION_INVOCATION;\n\ntypedef enum {\n  KsListEntryTail,\n  KsListEntryHead\n} KSLIST_ENTRY_LOCATION;\n\ntypedef enum {\n  KsAcquireOnly,\n  KsAcquireAndRemove,\n  KsAcquireOnlySingleItem,\n  KsAcquireAndRemoveOnlySingleItem\n} KSIRP_REMOVAL_OPERATION;\n\ntypedef enum {\n  KsStackCopyToNewLocation,\n  KsStackReuseCurrentLocation,\n  KsStackUseNewLocation\n} KSSTACK_USE;\n\ntypedef enum {\n  KSTARGET_STATE_DISABLED,\n  KSTARGET_STATE_ENABLED\n} KSTARGET_STATE;\n\ntypedef NTSTATUS (*PFNKSIRPLISTCALLBACK)(PIRP Irp, PVOID Context);\ntypedef VOID (*PFNREFERENCEDEVICEOBJECT)(PVOID Context);\ntypedef VOID (*PFNDEREFERENCEDEVICEOBJECT)(PVOID Context);\ntypedef NTSTATUS (*PFNQUERYREFERENCESTRING)(PVOID Context, PWCHAR *String);\n\n#define BUS_INTERFACE_REFERENCE_VERSION\t\t\t0x100\n\ntypedef struct {\n  INTERFACE Interface;\n\n  PFNREFERENCEDEVICEOBJECT ReferenceDeviceObject;\n  PFNDEREFERENCEDEVICEOBJECT DereferenceDeviceObject;\n  PFNQUERYREFERENCESTRING QueryReferenceString;\n} BUS_INTERFACE_REFERENCE, *PBUS_INTERFACE_REFERENCE;\n\n#define STATIC_REFERENCE_BUS_INTERFACE\t\tSTATIC_KSMEDIUMSETID_Standard\n#define REFERENCE_BUS_INTERFACE\t\t\tKSMEDIUMSETID_Standard\n\n#endif /* _NTDDK_ */\n\n#ifndef PACK_PRAGMAS_NOT_SUPPORTED\n#include <pshpack1.h>\n#endif\n\ntypedef struct {\n  GUID PropertySet;\n  ULONG Count;\n} KSPROPERTY_SERIALHDR,*PKSPROPERTY_SERIALHDR;\n\n#ifndef PACK_PRAGMAS_NOT_SUPPORTED\n#include <poppack.h>\n#endif\n\ntypedef struct {\n  KSIDENTIFIER PropTypeSet;\n  ULONG Id;\n  ULONG PropertyLength;\n} KSPROPERTY_SERIAL,*PKSPROPERTY_SERIAL;\n\n\n#if defined(_NTDDK_)\n\n#define IOCTL_KS_HANDSHAKE\t\t\t\t\t\t\\\n\tCTL_CODE(FILE_DEVICE_KS, 0x007, METHOD_NEITHER, FILE_ANY_ACCESS)\n\ntypedef struct {\n  GUID ProtocolId;\n  PVOID Argument1;\n  PVOID Argument2;\n} KSHANDSHAKE, *PKSHANDSHAKE;\n\ntypedef struct _KSGATE\t\tKSGATE, *PKSGATE;\n\nstruct _KSGATE {\n  LONG Count;\n  PKSGATE NextGate;\n};\n\ntypedef PVOID KSOBJECT_BAG;\n\n\ntypedef BOOLEAN (*PFNKSGENERATEEVENTCALLBACK)(PVOID Context,\n\t\t\t\t\t      PKSEVENT_ENTRY EventEntry);\n\ntypedef NTSTATUS (*PFNKSDEVICECREATE)(PKSDEVICE Device);\n\ntypedef NTSTATUS (*PFNKSDEVICEPNPSTART)(PKSDEVICE Device,PIRP Irp,\n\t\t\t\tPCM_RESOURCE_LIST TranslatedResourceList,\n\t\t\t\tPCM_RESOURCE_LIST UntranslatedResourceList);\n\ntypedef NTSTATUS (*PFNKSDEVICE)(PKSDEVICE Device);\n\ntypedef NTSTATUS (*PFNKSDEVICEIRP)(PKSDEVICE Device,PIRP Irp);\n\ntypedef void (*PFNKSDEVICEIRPVOID)(PKSDEVICE Device,PIRP Irp);\n\ntypedef NTSTATUS (*PFNKSDEVICEQUERYCAPABILITIES)(PKSDEVICE Device,PIRP Irp,\n\t\t\t\t\t PDEVICE_CAPABILITIES Capabilities);\n\ntypedef NTSTATUS (*PFNKSDEVICEQUERYPOWER)(PKSDEVICE Device,PIRP Irp,\n\t\t\t\t\t  DEVICE_POWER_STATE DeviceTo,\n\t\t\t\t\t  DEVICE_POWER_STATE DeviceFrom,\n\t\t\t\t\t  SYSTEM_POWER_STATE SystemTo,\n\t\t\t\t\t  SYSTEM_POWER_STATE SystemFrom,\n\t\t\t\t\t  POWER_ACTION Action);\n\ntypedef void (*PFNKSDEVICESETPOWER)(PKSDEVICE Device,PIRP Irp,\n\t\t\t\t    DEVICE_POWER_STATE To,\n\t\t\t\t    DEVICE_POWER_STATE From);\n\ntypedef NTSTATUS (*PFNKSFILTERFACTORYVOID)(PKSFILTERFACTORY FilterFactory);\n\ntypedef void (*PFNKSFILTERFACTORYPOWER)(PKSFILTERFACTORY FilterFactory,\n\t\t\t\t\tDEVICE_POWER_STATE State);\n\ntypedef NTSTATUS (*PFNKSFILTERIRP)(PKSFILTER Filter,PIRP Irp);\n\ntypedef NTSTATUS (*PFNKSFILTERPROCESS)(PKSFILTER Filter,\n\t\t\t\t\tPKSPROCESSPIN_INDEXENTRY Index);\n\ntypedef NTSTATUS (*PFNKSFILTERVOID)(PKSFILTER Filter);\n\ntypedef void (*PFNKSFILTERPOWER)(PKSFILTER Filter,DEVICE_POWER_STATE State);\n\ntypedef NTSTATUS (*PFNKSPINIRP)(PKSPIN Pin,PIRP Irp);\n\ntypedef NTSTATUS (*PFNKSPINSETDEVICESTATE)(PKSPIN Pin,KSSTATE ToState,\n\t\t\t\t\t   KSSTATE FromState);\n\ntypedef NTSTATUS (*PFNKSPINSETDATAFORMAT)(PKSPIN Pin,PKSDATAFORMAT OldFormat,\n\t\t\t\t\t  PKSMULTIPLE_ITEM OldAttributeList,\n\t\t\t\t\t  const KSDATARANGE *DataRange,\n\t\t\t\t\t  const KSATTRIBUTE_LIST *AttributeRange);\n\ntypedef NTSTATUS (*PFNKSPINHANDSHAKE)(PKSPIN Pin,PKSHANDSHAKE In,\n\t\t\t\t      PKSHANDSHAKE Out);\n\ntypedef NTSTATUS (*PFNKSPIN)(PKSPIN Pin);\n\ntypedef void (*PFNKSPINVOID)(PKSPIN Pin);\n\ntypedef void (*PFNKSPINPOWER)(PKSPIN Pin,DEVICE_POWER_STATE State);\n\ntypedef BOOLEAN (*PFNKSPINSETTIMER)(PKSPIN Pin,PKTIMER Timer,\n\t\t\t\t    LARGE_INTEGER DueTime,PKDPC Dpc);\n\ntypedef BOOLEAN (*PFNKSPINCANCELTIMER)(PKSPIN Pin,PKTIMER Timer);\n\ntypedef LONGLONG (FASTCALL *PFNKSPINCORRELATEDTIME)(PKSPIN Pin,\n\t\t\t\t\t\t    PLONGLONG SystemTime);\n\ntypedef void (*PFNKSPINRESOLUTION)(PKSPIN Pin,PKSRESOLUTION Resolution);\n\ntypedef NTSTATUS (*PFNKSPININITIALIZEALLOCATOR)(PKSPIN Pin,\n\t\t\t\t\tPKSALLOCATOR_FRAMING AllocatorFraming,\n\t\t\t\t\tPVOID *Context);\n\ntypedef void (*PFNKSSTREAMPOINTER)(PKSSTREAM_POINTER StreamPointer);\n\n\ntypedef struct KSAUTOMATION_TABLE_ KSAUTOMATION_TABLE,*PKSAUTOMATION_TABLE;\n\nstruct KSAUTOMATION_TABLE_ {\n  ULONG PropertySetsCount;\n  ULONG PropertyItemSize;\n  const KSPROPERTY_SET *PropertySets;\n  ULONG MethodSetsCount;\n  ULONG MethodItemSize;\n  const KSMETHOD_SET *MethodSets;\n  ULONG EventSetsCount;\n  ULONG EventItemSize;\n  const KSEVENT_SET *EventSets;\n#ifndef _WIN64\n  PVOID Alignment;\n#endif\n};\n\n#define DEFINE_KSAUTOMATION_TABLE(table)\t\t\t\t\\\n\t\tconst KSAUTOMATION_TABLE table =\n\n#define DEFINE_KSAUTOMATION_PROPERTIES(table)\t\t\t\t\\\n\t\tSIZEOF_ARRAY(table),\t\t\t\t\t\\\n\t\tsizeof(KSPROPERTY_ITEM),\t\t\t\t\\\n\t\ttable\n\n#define DEFINE_KSAUTOMATION_METHODS(table)\t\t\t\t\\\n\t\tSIZEOF_ARRAY(table),\t\t\t\t\t\\\n\t\tsizeof(KSMETHOD_ITEM),\t\t\t\t\t\\\n\t\ttable\n\n#define DEFINE_KSAUTOMATION_EVENTS(table)\t\t\t\t\\\n\t\tSIZEOF_ARRAY(table),\t\t\t\t\t\\\n\t\tsizeof(KSEVENT_ITEM),\t\t\t\t\t\\\n\t\ttable\n\n#define DEFINE_KSAUTOMATION_PROPERTIES_NULL\t\t\t\t\\\n\t\t0,\t\t\t\t\t\t\t\\\n\t\tsizeof(KSPROPERTY_ITEM),\t\t\t\t\\\n\t\tNULL\n\n#define DEFINE_KSAUTOMATION_METHODS_NULL\t\t\t\t\\\n\t\t0,\t\t\t\t\t\t\t\\\n\t\tsizeof(KSMETHOD_ITEM),\t\t\t\t\t\\\n\t\tNULL\n\n#define DEFINE_KSAUTOMATION_EVENTS_NULL\t\t\t\t\t\\\n\t\t0,\t\t\t\t\t\t\t\\\n\t\tsizeof(KSEVENT_ITEM),\t\t\t\t\t\\\n\t\tNULL\n\n#define MIN_DEV_VER_FOR_QI\t\t(0x100)\n\nstruct _KSDEVICE_DISPATCH {\n  PFNKSDEVICECREATE Add;\n  PFNKSDEVICEPNPSTART Start;\n  PFNKSDEVICE PostStart;\n  PFNKSDEVICEIRP QueryStop;\n  PFNKSDEVICEIRPVOID CancelStop;\n  PFNKSDEVICEIRPVOID Stop;\n  PFNKSDEVICEIRP QueryRemove;\n  PFNKSDEVICEIRPVOID CancelRemove;\n  PFNKSDEVICEIRPVOID Remove;\n  PFNKSDEVICEQUERYCAPABILITIES QueryCapabilities;\n  PFNKSDEVICEIRPVOID SurpriseRemoval;\n  PFNKSDEVICEQUERYPOWER QueryPower;\n  PFNKSDEVICESETPOWER SetPower;\n  PFNKSDEVICEIRP QueryInterface;\n};\n\nstruct _KSFILTER_DISPATCH {\n  PFNKSFILTERIRP Create;\n  PFNKSFILTERIRP Close;\n  PFNKSFILTERPROCESS Process;\n  PFNKSFILTERVOID Reset;\n};\n\nstruct _KSPIN_DISPATCH {\n  PFNKSPINIRP Create;\n  PFNKSPINIRP Close;\n  PFNKSPIN Process;\n  PFNKSPINVOID Reset;\n  PFNKSPINSETDATAFORMAT SetDataFormat;\n  PFNKSPINSETDEVICESTATE SetDeviceState;\n  PFNKSPIN Connect;\n  PFNKSPINVOID Disconnect;\n  const KSCLOCK_DISPATCH *Clock;\n  const KSALLOCATOR_DISPATCH *Allocator;\n};\n\nstruct _KSCLOCK_DISPATCH {\n  PFNKSPINSETTIMER SetTimer;\n  PFNKSPINCANCELTIMER CancelTimer;\n  PFNKSPINCORRELATEDTIME CorrelatedTime;\n  PFNKSPINRESOLUTION Resolution;\n};\n\nstruct _KSALLOCATOR_DISPATCH {\n  PFNKSPININITIALIZEALLOCATOR InitializeAllocator;\n  PFNKSDELETEALLOCATOR DeleteAllocator;\n  PFNKSDEFAULTALLOCATE Allocate;\n  PFNKSDEFAULTFREE Free;\n};\n\n#define KSDEVICE_DESCRIPTOR_VERSION\t(0x100)\n\nstruct _KSDEVICE_DESCRIPTOR {\n  const KSDEVICE_DISPATCH *Dispatch;\n  ULONG FilterDescriptorsCount;\n  const KSFILTER_DESCRIPTOR*const *FilterDescriptors;\n  ULONG Version;\n};\n\nstruct _KSFILTER_DESCRIPTOR {\n  const KSFILTER_DISPATCH *Dispatch;\n  const KSAUTOMATION_TABLE *AutomationTable;\n  ULONG Version;\n#define KSFILTER_DESCRIPTOR_VERSION\t((ULONG)-1)\n  ULONG Flags;\n#define KSFILTER_FLAG_DISPATCH_LEVEL_PROCESSING\t\t0x00000001\n#define KSFILTER_FLAG_CRITICAL_PROCESSING\t\t0x00000002\n#define KSFILTER_FLAG_HYPERCRITICAL_PROCESSING\t\t0x00000004\n#define KSFILTER_FLAG_RECEIVE_ZERO_LENGTH_SAMPLES\t0x00000008\n#define KSFILTER_FLAG_DENY_USERMODE_ACCESS\t\t0x80000000\n  const GUID *ReferenceGuid;\n  ULONG PinDescriptorsCount;\n  ULONG PinDescriptorSize;\n  const KSPIN_DESCRIPTOR_EX *PinDescriptors;\n  ULONG CategoriesCount;\n  const GUID *Categories;\n  ULONG NodeDescriptorsCount;\n  ULONG NodeDescriptorSize;\n  const KSNODE_DESCRIPTOR *NodeDescriptors;\n  ULONG ConnectionsCount;\n  const KSTOPOLOGY_CONNECTION *Connections;\n  const KSCOMPONENTID *ComponentId;\n};\n\n#define DEFINE_KSFILTER_DESCRIPTOR(descriptor)\t\t\t\t\\\n\tconst KSFILTER_DESCRIPTOR descriptor =\n\n#define DEFINE_KSFILTER_PIN_DESCRIPTORS(table)\t\t\t\t\\\n\tSIZEOF_ARRAY(table),\t\t\t\t\t\t\\\n\tsizeof(table[0]),\t\t\t\t\t\t\\\n\ttable\n\n#define DEFINE_KSFILTER_CATEGORIES(table)\t\t\t\t\\\n\tSIZEOF_ARRAY(table),\t\t\t\t\t\t\\\n\ttable\n\n#define DEFINE_KSFILTER_CATEGORY(category)\t\t\t\t\\\n\t1,\t\t\t\t\t\t\t\t\\\n\t&(category)\n\n#define DEFINE_KSFILTER_CATEGORIES_NULL\t\t\t\t\t\\\n\t0,\t\t\t\t\t\t\t\t\\\n\tNULL\n\n#define DEFINE_KSFILTER_NODE_DESCRIPTORS(table)\t\t\t\t\\\n\tSIZEOF_ARRAY(table),\t\t\t\t\t\t\\\n\tsizeof(table[0]),\t\t\t\t\t\t\\\n\ttable\n\n#define DEFINE_KSFILTER_NODE_DESCRIPTORS_NULL\t\t\t\t\\\n\t0,\t\t\t\t\t\t\t\t\\\n\tsizeof(KSNODE_DESCRIPTOR),\t\t\t\t\t\\\n\tNULL\n\n#define DEFINE_KSFILTER_CONNECTIONS(table)\t\t\t\t\\\n\tSIZEOF_ARRAY(table),\t\t\t\t\t\t\\\n\ttable\n\n#define DEFINE_KSFILTER_DEFAULT_CONNECTIONS\t\t\t\t\\\n\t0,\t\t\t\t\t\t\t\t\\\n\tNULL\n\n#define DEFINE_KSFILTER_DESCRIPTOR_TABLE(table)\t\t\t\t\\\n\tconst KSFILTER_DESCRIPTOR*const table[] =\n\nstruct _KSPIN_DESCRIPTOR_EX {\n  const KSPIN_DISPATCH *Dispatch;\n  const KSAUTOMATION_TABLE *AutomationTable;\n  KSPIN_DESCRIPTOR PinDescriptor;\n  ULONG Flags;\n#define KSPIN_FLAG_DISPATCH_LEVEL_PROCESSING\tKSFILTER_FLAG_DISPATCH_LEVEL_PROCESSING\n#define KSPIN_FLAG_CRITICAL_PROCESSING\t\tKSFILTER_FLAG_CRITICAL_PROCESSING\n#define KSPIN_FLAG_HYPERCRITICAL_PROCESSING\tKSFILTER_FLAG_HYPERCRITICAL_PROCESSING\n#define KSPIN_FLAG_ASYNCHRONOUS_PROCESSING\t\t\t0x00000008\n#define KSPIN_FLAG_DO_NOT_INITIATE_PROCESSING\t\t\t0x00000010\n#define KSPIN_FLAG_INITIATE_PROCESSING_ON_EVERY_ARRIVAL\t\t0x00000020\n#define KSPIN_FLAG_FRAMES_NOT_REQUIRED_FOR_PROCESSING\t\t0x00000040\n#define KSPIN_FLAG_ENFORCE_FIFO\t\t\t\t\t0x00000080\n#define KSPIN_FLAG_GENERATE_MAPPINGS\t\t\t\t0x00000100\n#define KSPIN_FLAG_DISTINCT_TRAILING_EDGE\t\t\t0x00000200\n#define KSPIN_FLAG_PROCESS_IN_RUN_STATE_ONLY\t\t\t0x00010000\n#define KSPIN_FLAG_SPLITTER\t\t\t\t\t0x00020000\n#define KSPIN_FLAG_USE_STANDARD_TRANSPORT\t\t\t0x00040000\n#define KSPIN_FLAG_DO_NOT_USE_STANDARD_TRANSPORT\t\t0x00080000\n#define KSPIN_FLAG_FIXED_FORMAT\t\t\t\t\t0x00100000\n#define KSPIN_FLAG_GENERATE_EOS_EVENTS\t\t\t\t0x00200000\n#define KSPIN_FLAG_RENDERER\t\t\t(KSPIN_FLAG_PROCESS_IN_RUN_STATE_ONLY|KSPIN_FLAG_GENERATE_EOS_EVENTS)\n#define KSPIN_FLAG_IMPLEMENT_CLOCK\t\t\t\t0x00400000\n#define KSPIN_FLAG_SOME_FRAMES_REQUIRED_FOR_PROCESSING\t\t0x00800000\n#define KSPIN_FLAG_PROCESS_IF_ANY_IN_RUN_STATE\t\t\t0x01000000\n#define KSPIN_FLAG_DENY_USERMODE_ACCESS\t\t\t\t0x80000000\n  ULONG InstancesPossible;\n  ULONG InstancesNecessary;\n  const KSALLOCATOR_FRAMING_EX *AllocatorFraming;\n  PFNKSINTERSECTHANDLEREX IntersectHandler;\n};\n\n#define DEFINE_KSPIN_DEFAULT_INTERFACES\t\t\t\t\t\\\n\t0,\t\t\t\t\t\t\t\t\\\n\tNULL\n\n#define DEFINE_KSPIN_DEFAULT_MEDIUMS\t\t\t\t\t\\\n\t0,\t\t\t\t\t\t\t\t\\\n\tNULL\n\nstruct _KSNODE_DESCRIPTOR {\n  const KSAUTOMATION_TABLE *AutomationTable;\n  const GUID *Type;\n  const GUID *Name;\n#ifndef _WIN64\n  PVOID Alignment;\n#endif\n};\n\n#ifndef _WIN64\n#define DEFINE_NODE_DESCRIPTOR(automation,type,name)\t\t\t\\\n\t{ (automation), (type), (name), NULL }\n#else\n#define DEFINE_NODE_DESCRIPTOR(automation,type,name)\t\t\t\\\n\t{ (automation), (type), (name) }\n#endif\n\nstruct _KSDEVICE {\n  const KSDEVICE_DESCRIPTOR *Descriptor;\n  KSOBJECT_BAG Bag;\n  PVOID Context;\n  PDEVICE_OBJECT FunctionalDeviceObject;\n  PDEVICE_OBJECT PhysicalDeviceObject;\n  PDEVICE_OBJECT NextDeviceObject;\n  BOOLEAN Started;\n  SYSTEM_POWER_STATE SystemPowerState;\n  DEVICE_POWER_STATE DevicePowerState;\n};\n\nstruct _KSFILTERFACTORY {\n  const KSFILTER_DESCRIPTOR *FilterDescriptor;\n  KSOBJECT_BAG Bag;\n  PVOID Context;\n};\n\nstruct _KSFILTER {\n  const KSFILTER_DESCRIPTOR *Descriptor;\n  KSOBJECT_BAG Bag;\n  PVOID Context;\n};\n\nstruct _KSPIN {\n  const KSPIN_DESCRIPTOR_EX *Descriptor;\n  KSOBJECT_BAG Bag;\n  PVOID Context;\n  ULONG Id;\n  KSPIN_COMMUNICATION Communication;\n  BOOLEAN ConnectionIsExternal;\n  KSPIN_INTERFACE ConnectionInterface;\n  KSPIN_MEDIUM ConnectionMedium;\n  KSPRIORITY ConnectionPriority;\n  PKSDATAFORMAT ConnectionFormat;\n  PKSMULTIPLE_ITEM AttributeList;\n  ULONG StreamHeaderSize;\n  KSPIN_DATAFLOW DataFlow;\n  KSSTATE DeviceState;\n  KSRESET ResetState;\n  KSSTATE ClientState;\n};\n\nstruct _KSMAPPING {\n  PHYSICAL_ADDRESS PhysicalAddress;\n  ULONG ByteCount;\n  ULONG Alignment;\n};\n\nstruct _KSSTREAM_POINTER_OFFSET\n{\n#if defined(_NTDDK_)\n  __MINGW_EXTENSION union {\n    PUCHAR Data;\n    PKSMAPPING Mappings;\n  };\n#else\n  PUCHAR Data;\n#endif /* _NTDDK_ */\n#ifndef _WIN64\n  PVOID Alignment;\n#endif\n  ULONG Count;\n  ULONG Remaining;\n};\n\nstruct _KSSTREAM_POINTER\n{\n  PVOID Context;\n  PKSPIN Pin;\n  PKSSTREAM_HEADER StreamHeader;\n  PKSSTREAM_POINTER_OFFSET Offset;\n  KSSTREAM_POINTER_OFFSET OffsetIn;\n  KSSTREAM_POINTER_OFFSET OffsetOut;\n};\n\nstruct _KSPROCESSPIN {\n  PKSPIN Pin;\n  PKSSTREAM_POINTER StreamPointer;\n  PKSPROCESSPIN InPlaceCounterpart;\n  PKSPROCESSPIN DelegateBranch;\n  PKSPROCESSPIN CopySource;\n  PVOID Data;\n  ULONG BytesAvailable;\n  ULONG BytesUsed;\n  ULONG Flags;\n  BOOLEAN Terminate;\n};\n\nstruct _KSPROCESSPIN_INDEXENTRY {\n  PKSPROCESSPIN *Pins;\n  ULONG Count;\n};\n\ntypedef enum {\n  KsObjectTypeDevice,\n  KsObjectTypeFilterFactory,\n  KsObjectTypeFilter,\n  KsObjectTypePin\n} KSOBJECTTYPE;\n\n\ntypedef void (*PFNKSFREE)(PVOID Data);\n\ntypedef void (*PFNKSPINFRAMERETURN)(PKSPIN Pin,PVOID Data,ULONG Size,PMDL Mdl,\n\t\t\t\t    PVOID Context,NTSTATUS Status);\n\ntypedef void (*PFNKSPINIRPCOMPLETION)(PKSPIN Pin,PIRP Irp);\n\n\n#if defined(_UNKNOWN_H_) || defined(__IUnknown_INTERFACE_DEFINED__)\n#ifndef _IKsControl_\n#define _IKsControl_\n\ntypedef struct IKsControl *PIKSCONTROL;\n\n#ifndef DEFINE_ABSTRACT_UNKNOWN\n#define DEFINE_ABSTRACT_UNKNOWN()\t\t\t\t\t\\\n\tSTDMETHOD_(NTSTATUS,QueryInterface) (THIS_ \t\t\t\\\n\t\t\t\t\t\tREFIID InterfaceId,\t\\\n\t\t\t\t\t\tPVOID *Interface\t\\\n\t\t\t\t\t    ) PURE;\t\t\t\\\n\tSTDMETHOD_(ULONG,AddRef)(THIS) PURE;\t\t\t\t\\\n\tSTDMETHOD_(ULONG,Release)(THIS) PURE;\n#endif\n\n#undef INTERFACE\n#define INTERFACE IKsControl\nDECLARE_INTERFACE_(IKsControl,IUnknown)\n{\n  DEFINE_ABSTRACT_UNKNOWN()\n  STDMETHOD_(NTSTATUS,KsProperty)(THIS_\n\t\t\t\t\tPKSPROPERTY Property,\n\t\t\t\t\tULONG PropertyLength,\n\t\t\t\t\tPVOID PropertyData,\n\t\t\t\t\tULONG DataLength,\n\t\t\t\t\tULONG *BytesReturned\n\t\t\t\t ) PURE;\n  STDMETHOD_(NTSTATUS,KsMethod)\t(THIS_\n\t\t\t\t\tPKSMETHOD Method,\n\t\t\t\t\tULONG MethodLength,\n\t\t\t\t\tPVOID MethodData,\n\t\t\t\t\tULONG DataLength,\n\t\t\t\t\tULONG *BytesReturned\n\t\t\t\t ) PURE;\n  STDMETHOD_(NTSTATUS,KsEvent)\t(THIS_\n\t\t\t\t\tPKSEVENT Event,\n\t\t\t\t\tULONG EventLength,\n\t\t\t\t\tPVOID EventData,\n\t\t\t\t\tULONG DataLength,\n\t\t\t\t\tULONG *BytesReturned\n\t\t\t\t) PURE;\n};\ntypedef struct IKsReferenceClock *PIKSREFERENCECLOCK;\n\n#undef INTERFACE\n#define INTERFACE IKsReferenceClock\nDECLARE_INTERFACE_(IKsReferenceClock,IUnknown)\n{\n  DEFINE_ABSTRACT_UNKNOWN()\n  STDMETHOD_(LONGLONG,GetTime)\t\t(THIS) PURE;\n  STDMETHOD_(LONGLONG,GetPhysicalTime)\t(THIS) PURE;\n  STDMETHOD_(LONGLONG,GetCorrelatedTime)(THIS_\n  \t\t\t\t\t\tPLONGLONG SystemTime\n  \t\t\t\t\t) PURE;\n  STDMETHOD_(LONGLONG,GetCorrelatedPhysicalTime)(THIS_\n\t\t\t\t\t\tPLONGLONG SystemTime\n\t\t\t\t\t) PURE;\n  STDMETHOD_(NTSTATUS,GetResolution)\t(THIS_\n\t\t\t\t\t\tPKSRESOLUTION Resolution\n\t\t\t\t\t) PURE;\n  STDMETHOD_(NTSTATUS,GetState)\t\t(THIS_\n\t\t\t\t\t\tPKSSTATE State\n\t\t\t\t\t) PURE;\n};\n#undef INTERFACE\n\n#define INTERFACE IKsDeviceFunctions\nDECLARE_INTERFACE_(IKsDeviceFunctions,IUnknown)\n{\n  DEFINE_ABSTRACT_UNKNOWN()\n  STDMETHOD_(NTSTATUS,RegisterAdapterObjectEx)\t(THIS_\n\t\t\t\t\t\t  PADAPTER_OBJECT AdapterObject,\n\t\t\t\t\t\t  PDEVICE_DESCRIPTION DeviceDescription,\n\t\t\t\t\t\t  ULONG NumberOfMapRegisters,\n\t\t\t\t\t\t  ULONG MaxMappingsByteCount,\n\t\t\t\t\t\t  ULONG MappingTableStride\n\t\t\t\t\t\t) PURE;\n};\n\n#undef INTERFACE\n#define STATIC_IID_IKsControl\t\t\t\t\t\t\\\n\t0x28F54685L,0x06FD,0x11D2,0xB2,0x7A,0x00,0xA0,0xC9,0x22,0x31,0x96\nDEFINE_GUID(IID_IKsControl,\n\t0x28F54685L,0x06FD,0x11D2,0xB2,0x7A,0x00,0xA0,0xC9,0x22,0x31,0x96);\n#define STATIC_IID_IKsFastClock\t\t\t\t\t\t\\\n\t0xc9902485,0xc180,0x11d2,0x84,0x73,0xd4,0x23,0x94,0x45,0x9e,0x5e\nDEFINE_GUID(IID_IKsFastClock,\n\t0xc9902485,0xc180,0x11d2,0x84,0x73,0xd4,0x23,0x94,0x45,0x9e,0x5e);\n#define STATIC_IID_IKsDeviceFunctions\t\t\t\t\t\\\n\t0xe234f2e2,0xbd69,0x4f8c,0xb3,0xf2,0x7c,0xd7,0x9e,0xd4,0x66,0xbd\nDEFINE_GUID(IID_IKsDeviceFunctions,\n\t0xe234f2e2,0xbd69,0x4f8c,0xb3,0xf2,0x7c,0xd7,0x9e,0xd4,0x66,0xbd);\n#endif /* _IKsControl_ */\n#endif /* defined(_UNKNOWN_H_) || defined(__IUnknown_INTERFACE_DEFINED__) */\n\n#endif /* _NTDDK_ */\n\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n#ifdef _KSDDK_\n#define KSDDKAPI\n#else\n#define KSDDKAPI DECLSPEC_IMPORT\n#endif\n\n#if defined(_NTDDK_)\n\nKSDDKAPI NTSTATUS NTAPI KsEnableEvent\n\t\t\t(PIRP Irp, ULONG EventSetsCount, const KSEVENT_SET *EventSet,\n\t\t\t PLIST_ENTRY EventsList, KSEVENTS_LOCKTYPE EventsFlags,\n\t\t\t PVOID EventsLock);\n\nKSDDKAPI NTSTATUS NTAPI KsEnableEventWithAllocator\n\t\t\t(PIRP Irp, ULONG EventSetsCount, const KSEVENT_SET *EventSet,\n\t\t\t PLIST_ENTRY EventsList, KSEVENTS_LOCKTYPE EventsFlags,\n\t\t\t PVOID EventsLock, PFNKSALLOCATOR Allocator, ULONG EventItemSize);\n\nKSDDKAPI NTSTATUS NTAPI KsDisableEvent\n\t\t\t(PIRP Irp, PLIST_ENTRY EventsList, KSEVENTS_LOCKTYPE EventsFlags,\n\t\t\t PVOID EventsLock);\n\nKSDDKAPI VOID NTAPI KsDiscardEvent (PKSEVENT_ENTRY EventEntry);\n\nKSDDKAPI VOID NTAPI KsFreeEventList\n\t\t\t(PFILE_OBJECT FileObject, PLIST_ENTRY EventsList,\n\t\t\t KSEVENTS_LOCKTYPE EventsFlags, PVOID EventsLock);\n\nKSDDKAPI NTSTATUS NTAPI KsGenerateEvent (PKSEVENT_ENTRY EventEntry);\n\nKSDDKAPI NTSTATUS NTAPI KsGenerateDataEvent\n\t\t\t(PKSEVENT_ENTRY EventEntry, ULONG DataSize, PVOID Data);\n\nKSDDKAPI VOID NTAPI KsGenerateEventList\n\t\t\t(GUID *Set, ULONG EventId, PLIST_ENTRY EventsList,\n\t\t\t KSEVENTS_LOCKTYPE EventsFlags, PVOID EventsLock);\n\nKSDDKAPI NTSTATUS NTAPI KsPropertyHandler\n\t\t\t(PIRP Irp, ULONG PropertySetsCount,\n\t\t\t const KSPROPERTY_SET *PropertySet);\n\nKSDDKAPI NTSTATUS NTAPI KsPropertyHandlerWithAllocator\n\t\t\t(PIRP Irp, ULONG PropertySetsCount,\n\t\t\t const KSPROPERTY_SET *PropertySet, PFNKSALLOCATOR Allocator,\n\t\t\t ULONG PropertyItemSize);\n\nKSDDKAPI BOOLEAN NTAPI KsFastPropertyHandler\n\t\t\t(PFILE_OBJECT FileObject, PKSPROPERTY Property,\n\t\t\t ULONG PropertyLength, PVOID Data, ULONG DataLength,\n\t\t\t PIO_STATUS_BLOCK IoStatus, ULONG PropertySetsCount,\n\t\t\t const KSPROPERTY_SET *PropertySet);\n\nKSDDKAPI NTSTATUS NTAPI KsMethodHandler\n\t\t\t(PIRP Irp, ULONG MethodSetsCount,\n\t\t\t const KSMETHOD_SET *MethodSet);\n\nKSDDKAPI NTSTATUS NTAPI KsMethodHandlerWithAllocator\n\t\t\t(PIRP Irp, ULONG MethodSetsCount,\n\t\t\t const KSMETHOD_SET *MethodSet, PFNKSALLOCATOR Allocator,\n\t\t\t ULONG MethodItemSize);\n\nKSDDKAPI BOOLEAN NTAPI KsFastMethodHandler\n\t\t\t(PFILE_OBJECT FileObject, PKSMETHOD Method, ULONG MethodLength,\n\t\t\t PVOID Data, ULONG DataLength, PIO_STATUS_BLOCK IoStatus,\n\t\t\t ULONG MethodSetsCount, const KSMETHOD_SET *MethodSet);\n\nKSDDKAPI NTSTATUS NTAPI KsCreateDefaultAllocator (PIRP Irp);\n\nKSDDKAPI NTSTATUS NTAPI KsCreateDefaultAllocatorEx\n\t\t\t(PIRP Irp, PVOID InitializeContext,\n\t\t\t PFNKSDEFAULTALLOCATE DefaultAllocate,\n\t\t\t PFNKSDEFAULTFREE DefaultFree,\n\t\t\t PFNKSINITIALIZEALLOCATOR InitializeAllocator,\n\t\t\t PFNKSDELETEALLOCATOR DeleteAllocator);\n\nKSDDKAPI NTSTATUS NTAPI KsCreateAllocator\n\t\t\t(HANDLE ConnectionHandle, PKSALLOCATOR_FRAMING AllocatorFraming,\n\t\t\t PHANDLE AllocatorHandle);\n\nKSDDKAPI NTSTATUS NTAPI KsValidateAllocatorCreateRequest\n\t\t\t(PIRP Irp, PKSALLOCATOR_FRAMING *AllocatorFraming);\n\nKSDDKAPI NTSTATUS NTAPI KsValidateAllocatorFramingEx\n\t\t\t(PKSALLOCATOR_FRAMING_EX Framing, ULONG BufferSize,\n\t\t\t const KSALLOCATOR_FRAMING_EX *PinFraming);\n\nKSDDKAPI NTSTATUS NTAPI KsAllocateDefaultClock (PKSDEFAULTCLOCK *DefaultClock);\n\nKSDDKAPI NTSTATUS NTAPI KsAllocateDefaultClockEx\n\t\t\t(PKSDEFAULTCLOCK *DefaultClock, PVOID Context,\n\t\t\t PFNKSSETTIMER SetTimer, PFNKSCANCELTIMER CancelTimer,\n\t\t\t PFNKSCORRELATEDTIME CorrelatedTime,\n\t\t\t const KSRESOLUTION *Resolution, ULONG Flags);\n\nKSDDKAPI VOID NTAPI KsFreeDefaultClock (PKSDEFAULTCLOCK DefaultClock);\nKSDDKAPI NTSTATUS NTAPI KsCreateDefaultClock (PIRP Irp, PKSDEFAULTCLOCK DefaultClock);\n\nKSDDKAPI NTSTATUS NTAPI KsCreateClock\n\t\t\t(HANDLE ConnectionHandle, PKSCLOCK_CREATE ClockCreate,\n\t\t\t PHANDLE ClockHandle);\n\nKSDDKAPI NTSTATUS NTAPI KsValidateClockCreateRequest\n\t\t\t(PIRP Irp, PKSCLOCK_CREATE *ClockCreate);\n\nKSDDKAPI KSSTATE NTAPI KsGetDefaultClockState (PKSDEFAULTCLOCK DefaultClock);\nKSDDKAPI VOID NTAPI KsSetDefaultClockState(PKSDEFAULTCLOCK DefaultClock, KSSTATE State);\nKSDDKAPI LONGLONG NTAPI KsGetDefaultClockTime (PKSDEFAULTCLOCK DefaultClock);\nKSDDKAPI VOID NTAPI KsSetDefaultClockTime(PKSDEFAULTCLOCK DefaultClock, LONGLONG Time);\n\nKSDDKAPI NTSTATUS NTAPI KsCreatePin\n\t\t\t(HANDLE FilterHandle, PKSPIN_CONNECT Connect,\n\t\t\t ACCESS_MASK DesiredAccess, PHANDLE ConnectionHandle);\n\nKSDDKAPI NTSTATUS NTAPI KsValidateConnectRequest\n\t\t\t(PIRP Irp, ULONG DescriptorsCount,\n\t\t\t const KSPIN_DESCRIPTOR *Descriptor, PKSPIN_CONNECT *Connect);\n\nKSDDKAPI NTSTATUS NTAPI KsPinPropertyHandler\n\t\t\t(PIRP Irp, PKSPROPERTY Property, PVOID Data,\n\t\t\t ULONG DescriptorsCount, const KSPIN_DESCRIPTOR *Descriptor);\n\nKSDDKAPI NTSTATUS NTAPI KsPinDataIntersection\n\t\t\t(PIRP Irp, PKSP_PIN Pin, PVOID Data, ULONG DescriptorsCount,\n\t\t\t const KSPIN_DESCRIPTOR *Descriptor,\n\t\t\t PFNKSINTERSECTHANDLER IntersectHandler);\n\nKSDDKAPI NTSTATUS NTAPI KsPinDataIntersectionEx\n\t\t\t(PIRP Irp, PKSP_PIN Pin, PVOID Data, ULONG DescriptorsCount,\n\t\t\t const KSPIN_DESCRIPTOR *Descriptor, ULONG DescriptorSize,\n\t\t\t PFNKSINTERSECTHANDLEREX IntersectHandler, PVOID HandlerContext);\n\nKSDDKAPI NTSTATUS NTAPI KsHandleSizedListQuery\n\t\t\t(PIRP Irp, ULONG DataItemsCount, ULONG DataItemSize,\n\t\t\t const VOID *DataItems);\n\n#ifndef MAKEINTRESOURCE\n#define MAKEINTRESOURCE(r)\t\t((ULONG_PTR) (USHORT) r)\n#endif\n#ifndef RT_STRING\n#define RT_STRING\t\t\tMAKEINTRESOURCE(6)\n#define RT_RCDATA\t\t\tMAKEINTRESOURCE(10)\n#endif\n\nKSDDKAPI NTSTATUS NTAPI KsLoadResource\n\t\t\t(PVOID ImageBase, POOL_TYPE PoolType, ULONG_PTR ResourceName,\n\t\t\t ULONG ResourceType, PVOID *Resource, PULONG ResourceSize);\n\nKSDDKAPI NTSTATUS NTAPI KsGetImageNameAndResourceId\n\t\t\t(HANDLE RegKey, PUNICODE_STRING ImageName, PULONG_PTR ResourceId,\n\t\t\t PULONG ValueType);\n\nKSDDKAPI NTSTATUS NTAPI KsMapModuleName\n\t\t\t(PDEVICE_OBJECT PhysicalDeviceObject, PUNICODE_STRING ModuleName,\n\t\t\t PUNICODE_STRING ImageName, PULONG_PTR ResourceId,\n\t\t\t PULONG ValueType);\n\nKSDDKAPI NTSTATUS NTAPI KsReferenceBusObject (KSDEVICE_HEADER Header);\nKSDDKAPI VOID NTAPI KsDereferenceBusObject (KSDEVICE_HEADER Header);\nKSDDKAPI NTSTATUS NTAPI KsDispatchQuerySecurity (PDEVICE_OBJECT DeviceObject, PIRP Irp);\nKSDDKAPI NTSTATUS NTAPI KsDispatchSetSecurity (PDEVICE_OBJECT DeviceObject, PIRP Irp);\nKSDDKAPI NTSTATUS NTAPI KsDispatchSpecificProperty (PIRP Irp, PFNKSHANDLER Handler);\nKSDDKAPI NTSTATUS NTAPI KsDispatchSpecificMethod (PIRP Irp, PFNKSHANDLER Handler);\n\nKSDDKAPI NTSTATUS NTAPI KsReadFile\n\t\t\t(PFILE_OBJECT FileObject, PKEVENT Event, PVOID PortContext,\n\t\t\t PIO_STATUS_BLOCK IoStatusBlock, PVOID Buffer, ULONG Length,\n\t\t\t ULONG Key, KPROCESSOR_MODE RequestorMode);\n\nKSDDKAPI NTSTATUS NTAPI KsWriteFile\n\t\t\t(PFILE_OBJECT FileObject, PKEVENT Event, PVOID PortContext,\n\t\t\t PIO_STATUS_BLOCK IoStatusBlock, PVOID Buffer, ULONG Length,\n\t\t\t ULONG Key, KPROCESSOR_MODE RequestorMode);\n\nKSDDKAPI NTSTATUS NTAPI KsQueryInformationFile\n\t\t\t(PFILE_OBJECT FileObject, PVOID FileInformation, ULONG Length,\n\t\t\t FILE_INFORMATION_CLASS FileInformationClass);\n\nKSDDKAPI NTSTATUS NTAPI KsSetInformationFile\n\t\t\t(PFILE_OBJECT FileObject, PVOID FileInformation, ULONG Length,\n\t\t\t FILE_INFORMATION_CLASS FileInformationClass);\n\nKSDDKAPI NTSTATUS NTAPI KsStreamIo\n\t\t\t(PFILE_OBJECT FileObject, PKEVENT Event, PVOID PortContext,\n\t\t\t PIO_COMPLETION_ROUTINE CompletionRoutine, PVOID CompletionContext,\n\t\t\t KSCOMPLETION_INVOCATION CompletionInvocationFlags,\n\t\t\t PIO_STATUS_BLOCK IoStatusBlock, PVOID StreamHeaders, ULONG Length,\n\t\t\t ULONG Flags, KPROCESSOR_MODE RequestorMode);\n\nKSDDKAPI NTSTATUS NTAPI KsProbeStreamIrp(PIRP Irp, ULONG ProbeFlags, ULONG HeaderSize);\nKSDDKAPI NTSTATUS NTAPI KsAllocateExtraData(PIRP Irp, ULONG ExtraSize, PVOID *ExtraBuffer);\nKSDDKAPI VOID NTAPI KsNullDriverUnload (PDRIVER_OBJECT DriverObject);\n\nKSDDKAPI NTSTATUS NTAPI KsSetMajorFunctionHandler\n\t\t\t(PDRIVER_OBJECT DriverObject, ULONG MajorFunction);\n\nKSDDKAPI NTSTATUS NTAPI KsDispatchInvalidDeviceRequest\n\t\t\t(PDEVICE_OBJECT DeviceObject, PIRP Irp);\n\nKSDDKAPI NTSTATUS NTAPI KsDefaultDeviceIoCompletion\n\t\t\t(PDEVICE_OBJECT DeviceObject, PIRP Irp);\n\nKSDDKAPI NTSTATUS NTAPI KsDispatchIrp(PDEVICE_OBJECT DeviceObject, PIRP Irp);\n\nKSDDKAPI BOOLEAN NTAPI KsDispatchFastIoDeviceControlFailure\n\t\t\t(PFILE_OBJECT FileObject, BOOLEAN Wait, PVOID InputBuffer,\n\t\t\t ULONG InputBufferLength, PVOID OutputBuffer,\n\t\t\t ULONG OutputBufferLength, ULONG IoControlCode,\n\t\t\t PIO_STATUS_BLOCK IoStatus, PDEVICE_OBJECT DeviceObject);\n\nKSDDKAPI BOOLEAN NTAPI KsDispatchFastReadFailure\n\t\t\t(PFILE_OBJECT FileObject, PLARGE_INTEGER FileOffset,\n\t\t\t ULONG Length, BOOLEAN Wait, ULONG LockKey, PVOID Buffer,\n\t\t\t PIO_STATUS_BLOCK IoStatus, PDEVICE_OBJECT DeviceObject);\n\n#define KsDispatchFastWriteFailure\t\tKsDispatchFastReadFailure\n\nKSDDKAPI VOID NTAPI KsCancelRoutine(PDEVICE_OBJECT DeviceObject, PIRP Irp);\nKSDDKAPI VOID NTAPI KsCancelIo(PLIST_ENTRY QueueHead, PKSPIN_LOCK SpinLock);\nKSDDKAPI VOID NTAPI KsReleaseIrpOnCancelableQueue(PIRP Irp, PDRIVER_CANCEL DriverCancel);\n\nKSDDKAPI PIRP NTAPI KsRemoveIrpFromCancelableQueue\n\t\t\t(PLIST_ENTRY QueueHead, PKSPIN_LOCK SpinLock,\n\t\t\t KSLIST_ENTRY_LOCATION ListLocation,\n\t\t\t KSIRP_REMOVAL_OPERATION RemovalOperation);\n\nKSDDKAPI NTSTATUS NTAPI KsMoveIrpsOnCancelableQueue\n\t\t\t(PLIST_ENTRY SourceList, PKSPIN_LOCK SourceLock,\n\t\t\t PLIST_ENTRY DestinationList, PKSPIN_LOCK DestinationLock,\n\t\t\t KSLIST_ENTRY_LOCATION ListLocation,\n\t\t\t PFNKSIRPLISTCALLBACK ListCallback, PVOID Context);\n\nKSDDKAPI VOID NTAPI KsRemoveSpecificIrpFromCancelableQueue (PIRP Irp);\n\nKSDDKAPI VOID NTAPI KsAddIrpToCancelableQueue\n\t\t\t(PLIST_ENTRY QueueHead, PKSPIN_LOCK SpinLock, PIRP Irp,\n\t\t\t KSLIST_ENTRY_LOCATION ListLocation, PDRIVER_CANCEL DriverCancel);\n\nKSDDKAPI NTSTATUS NTAPI KsAcquireResetValue(PIRP Irp, KSRESET *ResetValue);\n\nKSDDKAPI NTSTATUS NTAPI KsTopologyPropertyHandler\n\t\t\t(PIRP Irp, PKSPROPERTY Property, PVOID Data,\n\t\t\t const KSTOPOLOGY *Topology);\n\nKSDDKAPI VOID NTAPI KsAcquireDeviceSecurityLock(KSDEVICE_HEADER Header, BOOLEAN Exclusive);\nKSDDKAPI VOID NTAPI KsReleaseDeviceSecurityLock (KSDEVICE_HEADER Header);\nKSDDKAPI NTSTATUS NTAPI KsDefaultDispatchPnp(PDEVICE_OBJECT DeviceObject, PIRP Irp);\nKSDDKAPI NTSTATUS NTAPI KsDefaultDispatchPower(PDEVICE_OBJECT DeviceObject, PIRP Irp);\nKSDDKAPI NTSTATUS NTAPI KsDefaultForwardIrp(PDEVICE_OBJECT DeviceObject, PIRP Irp);\n\nKSDDKAPI VOID NTAPI KsSetDevicePnpAndBaseObject\n\t\t\t(KSDEVICE_HEADER Header, PDEVICE_OBJECT PnpDeviceObject,\n\t\t\t PDEVICE_OBJECT BaseObject);\n\nKSDDKAPI PDEVICE_OBJECT NTAPI KsQueryDevicePnpObject (KSDEVICE_HEADER Header);\nKSDDKAPI ACCESS_MASK NTAPI KsQueryObjectAccessMask (KSOBJECT_HEADER Header);\n\nKSDDKAPI VOID NTAPI KsRecalculateStackDepth\n\t\t\t(KSDEVICE_HEADER Header, BOOLEAN ReuseStackLocation);\n\nKSDDKAPI VOID NTAPI KsSetTargetState\n\t\t\t(KSOBJECT_HEADER Header, KSTARGET_STATE TargetState);\n\nKSDDKAPI VOID NTAPI KsSetTargetDeviceObject\n\t\t\t(KSOBJECT_HEADER Header, PDEVICE_OBJECT TargetDevice);\n\nKSDDKAPI VOID NTAPI KsSetPowerDispatch\n\t\t\t(KSOBJECT_HEADER Header, PFNKSCONTEXT_DISPATCH PowerDispatch,\n\t\t\t PVOID PowerContext);\n\nKSDDKAPI PKSOBJECT_CREATE_ITEM NTAPI KsQueryObjectCreateItem (KSOBJECT_HEADER Header);\n\nKSDDKAPI NTSTATUS NTAPI KsAllocateDeviceHeader\n\t\t\t(KSDEVICE_HEADER *Header, ULONG ItemsCount,\n\t\t\t PKSOBJECT_CREATE_ITEM ItemsList);\n\nKSDDKAPI VOID NTAPI KsFreeDeviceHeader (KSDEVICE_HEADER Header);\n\nKSDDKAPI NTSTATUS NTAPI KsAllocateObjectHeader\n\t\t\t(KSOBJECT_HEADER *Header, ULONG ItemsCount,\n\t\t\t PKSOBJECT_CREATE_ITEM ItemsList, PIRP Irp,\n\t\t\t const KSDISPATCH_TABLE *Table);\n\nKSDDKAPI VOID NTAPI KsFreeObjectHeader (KSOBJECT_HEADER Header);\n\nKSDDKAPI NTSTATUS NTAPI KsAddObjectCreateItemToDeviceHeader\n\t\t\t(KSDEVICE_HEADER Header, PDRIVER_DISPATCH Create, PVOID Context,\n\t\t\t PWSTR ObjectClass, PSECURITY_DESCRIPTOR SecurityDescriptor);\n\nKSDDKAPI NTSTATUS NTAPI KsAddObjectCreateItemToObjectHeader\n\t\t\t(KSOBJECT_HEADER Header, PDRIVER_DISPATCH Create, PVOID Context,\n\t\t\t PWSTR ObjectClass, PSECURITY_DESCRIPTOR SecurityDescriptor);\n\nKSDDKAPI NTSTATUS NTAPI KsAllocateObjectCreateItem\n\t\t\t(KSDEVICE_HEADER Header, PKSOBJECT_CREATE_ITEM CreateItem,\n\t\t\t BOOLEAN AllocateEntry, PFNKSITEMFREECALLBACK ItemFreeCallback);\n\nKSDDKAPI NTSTATUS NTAPI KsFreeObjectCreateItem\n\t\t\t(KSDEVICE_HEADER Header, PUNICODE_STRING CreateItem);\n\nKSDDKAPI NTSTATUS NTAPI KsFreeObjectCreateItemsByContext\n\t\t\t(KSDEVICE_HEADER Header, PVOID Context);\n\nKSDDKAPI NTSTATUS NTAPI KsCreateDefaultSecurity\n\t\t\t(PSECURITY_DESCRIPTOR ParentSecurity,\n\t\t\t PSECURITY_DESCRIPTOR *DefaultSecurity);\n\nKSDDKAPI NTSTATUS NTAPI KsForwardIrp\n\t\t\t(PIRP Irp, PFILE_OBJECT FileObject, BOOLEAN ReuseStackLocation);\n\nKSDDKAPI NTSTATUS NTAPI KsForwardAndCatchIrp\n\t\t\t(PDEVICE_OBJECT DeviceObject, PIRP Irp, PFILE_OBJECT FileObject,\n\t\t\t KSSTACK_USE StackUse);\n\nKSDDKAPI NTSTATUS NTAPI KsSynchronousIoControlDevice\n\t\t\t(PFILE_OBJECT FileObject, KPROCESSOR_MODE RequestorMode,\n\t\t\t ULONG IoControl, PVOID InBuffer, ULONG InSize, PVOID OutBuffer,\n\t\t\t ULONG OutSize, PULONG BytesReturned);\n\nKSDDKAPI NTSTATUS NTAPI KsUnserializeObjectPropertiesFromRegistry\n\t\t\t(PFILE_OBJECT FileObject, HANDLE ParentKey,\n\t\t\t PUNICODE_STRING RegistryPath);\n\nKSDDKAPI NTSTATUS NTAPI KsCacheMedium\n\t\t\t(PUNICODE_STRING SymbolicLink, PKSPIN_MEDIUM Medium,\n\t\t\t ULONG PinDirection);\n\nKSDDKAPI NTSTATUS NTAPI KsRegisterWorker\n\t\t\t(WORK_QUEUE_TYPE WorkQueueType, PKSWORKER *Worker);\n\nKSDDKAPI NTSTATUS NTAPI KsRegisterCountedWorker\n\t\t\t(WORK_QUEUE_TYPE WorkQueueType, PWORK_QUEUE_ITEM CountedWorkItem,\n\t\t\t PKSWORKER *Worker);\n\nKSDDKAPI VOID NTAPI KsUnregisterWorker (PKSWORKER Worker);\nKSDDKAPI NTSTATUS NTAPI KsQueueWorkItem(PKSWORKER Worker, PWORK_QUEUE_ITEM WorkItem);\nKSDDKAPI ULONG NTAPI KsIncrementCountedWorker (PKSWORKER Worker);\nKSDDKAPI ULONG NTAPI KsDecrementCountedWorker (PKSWORKER Worker);\n\nKSDDKAPI NTSTATUS NTAPI KsCreateTopologyNode\n\t\t\t(HANDLE ParentHandle, PKSNODE_CREATE NodeCreate,\n\t\t\t ACCESS_MASK DesiredAccess, PHANDLE NodeHandle);\n\nKSDDKAPI NTSTATUS NTAPI KsValidateTopologyNodeCreateRequest\n\t\t\t(PIRP Irp, PKSTOPOLOGY Topology, PKSNODE_CREATE *NodeCreate);\n\nKSDDKAPI NTSTATUS NTAPI KsMergeAutomationTables\n\t\t\t(PKSAUTOMATION_TABLE *AutomationTableAB,\n\t\t\t PKSAUTOMATION_TABLE AutomationTableA,\n\t\t\t PKSAUTOMATION_TABLE AutomationTableB,\n\t\t\t KSOBJECT_BAG Bag);\n\nKSDDKAPI NTSTATUS NTAPI KsInitializeDriver\n\t\t\t(PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPathName,\n\t\t\t const KSDEVICE_DESCRIPTOR *Descriptor);\n\nKSDDKAPI NTSTATUS NTAPI KsAddDevice\n\t\t\t(PDRIVER_OBJECT DriverObject, PDEVICE_OBJECT PhysicalDeviceObject);\n\nKSDDKAPI NTSTATUS NTAPI KsCreateDevice\n\t\t\t(PDRIVER_OBJECT DriverObject, PDEVICE_OBJECT PhysicalDeviceObject,\n\t\t\t const KSDEVICE_DESCRIPTOR *Descriptor, ULONG ExtensionSize,\n\t\t\t PKSDEVICE *Device);\n\nKSDDKAPI NTSTATUS NTAPI KsInitializeDevice\n\t\t\t(PDEVICE_OBJECT FunctionalDeviceObject,\n\t\t\t PDEVICE_OBJECT PhysicalDeviceObject,\n\t\t\t PDEVICE_OBJECT NextDeviceObject,\n\t\t\t const KSDEVICE_DESCRIPTOR *Descriptor);\n\nKSDDKAPI void NTAPI KsTerminateDevice (PDEVICE_OBJECT DeviceObject);\nKSDDKAPI PKSDEVICE NTAPI KsGetDeviceForDeviceObject (PDEVICE_OBJECT FunctionalDeviceObject);\nKSDDKAPI void NTAPI KsAcquireDevice (PKSDEVICE Device);\nKSDDKAPI void NTAPI KsReleaseDevice (PKSDEVICE Device);\n\nKSDDKAPI void NTAPI KsDeviceRegisterAdapterObject\n\t\t\t(PKSDEVICE Device, PADAPTER_OBJECT AdapterObject,\n\t\t\t ULONG MaxMappingsByteCount, ULONG MappingTableStride);\n\nKSDDKAPI ULONG NTAPI KsDeviceGetBusData\n\t\t\t(PKSDEVICE Device, ULONG DataType, PVOID Buffer, ULONG Offset,\n\t\t\t ULONG Length);\n\nKSDDKAPI ULONG NTAPI KsDeviceSetBusData\n\t\t\t(PKSDEVICE Device, ULONG DataType, PVOID Buffer, ULONG Offset,\n\t\t\t ULONG Length);\n\nKSDDKAPI NTSTATUS NTAPI KsCreateFilterFactory\n\t\t\t(PDEVICE_OBJECT DeviceObject, const KSFILTER_DESCRIPTOR *Descriptor,\n\t\t\t PWSTR RefString, PSECURITY_DESCRIPTOR SecurityDescriptor,\n\t\t\t ULONG CreateItemFlags, PFNKSFILTERFACTORYPOWER SleepCallback,\n\t\t\t PFNKSFILTERFACTORYPOWER WakeCallback,\n\t\t\t PKSFILTERFACTORY *FilterFactory);\n\n#define KsDeleteFilterFactory(FilterFactory)\t\t\t\t\t\t\t\t\t\t\t\t\\\n\tKsFreeObjectCreateItemsByContext( *(KSDEVICE_HEADER *)(\t\t\t\t\t\t\t\t\t\t\\\n\t\t\t\t\t\tKsFilterFactoryGetParentDevice(FilterFactory)->FunctionalDeviceObject->DeviceExtension),\\\n\t\t\t\t\t   FilterFactory)\n\nKSDDKAPI NTSTATUS NTAPI KsFilterFactoryUpdateCacheData\n\t\t\t(PKSFILTERFACTORY FilterFactory,\n\t\t\t const KSFILTER_DESCRIPTOR *FilterDescriptor);\n\nKSDDKAPI NTSTATUS NTAPI KsFilterFactoryAddCreateItem\n\t\t\t(PKSFILTERFACTORY FilterFactory, PWSTR RefString,\n\t\t\t PSECURITY_DESCRIPTOR SecurityDescriptor, ULONG CreateItemFlags);\n\nKSDDKAPI NTSTATUS NTAPI KsFilterFactorySetDeviceClassesState\n\t\t\t(PKSFILTERFACTORY FilterFactory, BOOLEAN NewState);\n\nKSDDKAPI PUNICODE_STRING NTAPI KsFilterFactoryGetSymbolicLink\n\t\t\t(PKSFILTERFACTORY FilterFactory);\n\nKSDDKAPI void NTAPI KsAddEvent(PVOID Object, PKSEVENT_ENTRY EventEntry);\n\nvoid __forceinline KsFilterAddEvent (PKSFILTER Filter, PKSEVENT_ENTRY EventEntry)\n{\n\tKsAddEvent(Filter, EventEntry);\n}\n\nvoid __forceinline KsPinAddEvent (PKSPIN Pin, PKSEVENT_ENTRY EventEntry)\n{\n\tKsAddEvent(Pin, EventEntry);\n}\n\nKSDDKAPI NTSTATUS NTAPI KsDefaultAddEventHandler\n\t\t\t(PIRP Irp, PKSEVENTDATA EventData, PKSEVENT_ENTRY EventEntry);\n\nKSDDKAPI void NTAPI KsGenerateEvents\n\t\t\t(PVOID Object, const GUID *EventSet, ULONG EventId,\n\t\t\t ULONG DataSize, PVOID Data, PFNKSGENERATEEVENTCALLBACK CallBack,\n\t\t\t PVOID CallBackContext);\n\nvoid __forceinline KsFilterGenerateEvents\n\t\t\t(PKSFILTER Filter, const GUID *EventSet, ULONG EventId,\n\t\t\t ULONG DataSize, PVOID Data, PFNKSGENERATEEVENTCALLBACK CallBack,\n\t\t\t PVOID CallBackContext)\n{\n\tKsGenerateEvents(Filter, EventSet, EventId, DataSize, Data, CallBack,\n\t\t\t CallBackContext);\n}\n\nvoid __forceinline KsPinGenerateEvents\n\t\t\t(PKSPIN Pin, const GUID *EventSet, ULONG EventId,\n\t\t\t ULONG DataSize, PVOID Data, PFNKSGENERATEEVENTCALLBACK CallBack,\n\t\t\t PVOID CallBackContext)\n{\n\tKsGenerateEvents(Pin, EventSet, EventId, DataSize, Data, CallBack,\n\t\t\t CallBackContext);\n}\n\ntypedef enum {\n  KSSTREAM_POINTER_STATE_UNLOCKED = 0,\n  KSSTREAM_POINTER_STATE_LOCKED\n} KSSTREAM_POINTER_STATE;\n\nKSDDKAPI NTSTATUS NTAPI KsPinGetAvailableByteCount\n\t\t\t(PKSPIN Pin, PLONG InputDataBytes, PLONG OutputBufferBytes);\n\nKSDDKAPI PKSSTREAM_POINTER NTAPI KsPinGetLeadingEdgeStreamPointer\n\t\t\t(PKSPIN Pin, KSSTREAM_POINTER_STATE State);\n\nKSDDKAPI PKSSTREAM_POINTER NTAPI KsPinGetTrailingEdgeStreamPointer\n\t\t\t(PKSPIN Pin, KSSTREAM_POINTER_STATE State);\n\nKSDDKAPI NTSTATUS NTAPI KsStreamPointerSetStatusCode\n\t\t\t(PKSSTREAM_POINTER StreamPointer, NTSTATUS Status);\n\nKSDDKAPI NTSTATUS NTAPI KsStreamPointerLock (PKSSTREAM_POINTER StreamPointer);\nKSDDKAPI void NTAPI KsStreamPointerUnlock(PKSSTREAM_POINTER StreamPointer, BOOLEAN Eject);\n\nKSDDKAPI void NTAPI KsStreamPointerAdvanceOffsetsAndUnlock\n\t\t\t(PKSSTREAM_POINTER StreamPointer, ULONG InUsed, ULONG OutUsed,\n\t\t\t BOOLEAN Eject);\n\nKSDDKAPI void NTAPI KsStreamPointerDelete (PKSSTREAM_POINTER StreamPointer);\n\nKSDDKAPI NTSTATUS NTAPI KsStreamPointerClone\n\t\t\t(PKSSTREAM_POINTER StreamPointer, PFNKSSTREAMPOINTER CancelCallback,\n\t\t\t ULONG ContextSize, PKSSTREAM_POINTER *CloneStreamPointer);\n\nKSDDKAPI NTSTATUS NTAPI KsStreamPointerAdvanceOffsets\n\t\t\t(PKSSTREAM_POINTER StreamPointer, ULONG InUsed, ULONG OutUsed,\n\t\t\t BOOLEAN Eject);\n\nKSDDKAPI NTSTATUS NTAPI KsStreamPointerAdvance (PKSSTREAM_POINTER StreamPointer);\nKSDDKAPI PMDL NTAPI KsStreamPointerGetMdl (PKSSTREAM_POINTER StreamPointer);\n\nKSDDKAPI PIRP NTAPI KsStreamPointerGetIrp\n\t\t\t(PKSSTREAM_POINTER StreamPointer, PBOOLEAN FirstFrameInIrp,\n\t\t\t PBOOLEAN LastFrameInIrp);\n\nKSDDKAPI void NTAPI KsStreamPointerScheduleTimeout\n\t\t\t(PKSSTREAM_POINTER StreamPointer, PFNKSSTREAMPOINTER Callback,\n\t\t\t ULONGLONG Interval);\n\nKSDDKAPI void NTAPI KsStreamPointerCancelTimeout (PKSSTREAM_POINTER StreamPointer);\nKSDDKAPI PKSSTREAM_POINTER NTAPI KsPinGetFirstCloneStreamPointer (PKSPIN Pin);\n\nKSDDKAPI PKSSTREAM_POINTER NTAPI KsStreamPointerGetNextClone\n\t\t\t(PKSSTREAM_POINTER StreamPointer);\n\nKSDDKAPI NTSTATUS NTAPI KsPinHandshake(PKSPIN Pin, PKSHANDSHAKE In, PKSHANDSHAKE Out);\nKSDDKAPI void NTAPI KsCompletePendingRequest (PIRP Irp);\nKSDDKAPI KSOBJECTTYPE NTAPI KsGetObjectTypeFromIrp (PIRP Irp);\nKSDDKAPI PVOID NTAPI KsGetObjectFromFileObject (PFILE_OBJECT FileObject);\nKSDDKAPI KSOBJECTTYPE NTAPI KsGetObjectTypeFromFileObject (PFILE_OBJECT FileObject);\n\nPKSFILTER __forceinline KsGetFilterFromFileObject (PFILE_OBJECT FileObject)\n{\n\treturn (PKSFILTER) KsGetObjectFromFileObject(FileObject);\n}\n\nPKSPIN __forceinline KsGetPinFromFileObject (PFILE_OBJECT FileObject)\n{\n\treturn (PKSPIN) KsGetObjectFromFileObject(FileObject);\n}\n\nKSDDKAPI PKSGATE NTAPI KsFilterGetAndGate (PKSFILTER Filter);\nKSDDKAPI void NTAPI KsFilterAcquireProcessingMutex (PKSFILTER Filter);\nKSDDKAPI void NTAPI KsFilterReleaseProcessingMutex (PKSFILTER Filter);\nKSDDKAPI void NTAPI KsFilterAttemptProcessing(PKSFILTER Filter, BOOLEAN Asynchronous);\nKSDDKAPI PKSGATE NTAPI KsPinGetAndGate(PKSPIN Pin);\nKSDDKAPI void NTAPI KsPinAttachAndGate(PKSPIN Pin, PKSGATE AndGate);\nKSDDKAPI void NTAPI KsPinAttachOrGate (PKSPIN Pin, PKSGATE OrGate);\nKSDDKAPI void NTAPI KsPinAcquireProcessingMutex (PKSPIN Pin);\nKSDDKAPI void NTAPI KsPinReleaseProcessingMutex (PKSPIN Pin);\nKSDDKAPI BOOLEAN NTAPI KsProcessPinUpdate (PKSPROCESSPIN ProcessPin);\n\nKSDDKAPI void NTAPI KsPinGetCopyRelationships\n\t\t\t(PKSPIN Pin, PKSPIN *CopySource, PKSPIN *DelegateBranch);\n\nKSDDKAPI void NTAPI KsPinAttemptProcessing(PKSPIN Pin, BOOLEAN Asynchronous);\nKSDDKAPI PVOID NTAPI KsGetParent (PVOID Object);\n\nPKSDEVICE __forceinline KsFilterFactoryGetParentDevice (PKSFILTERFACTORY FilterFactory)\n{\n\treturn (PKSDEVICE) KsGetParent((PVOID) FilterFactory);\n}\n\nPKSFILTERFACTORY __forceinline KsFilterGetParentFilterFactory (PKSFILTER Filter)\n{\n\treturn (PKSFILTERFACTORY) KsGetParent((PVOID) Filter);\n}\n\nKSDDKAPI PKSFILTER NTAPI KsPinGetParentFilter (PKSPIN Pin);\nKSDDKAPI PVOID NTAPI KsGetFirstChild (PVOID Object);\n\nPKSFILTERFACTORY __forceinline KsDeviceGetFirstChildFilterFactory (PKSDEVICE Device)\n{\n\treturn (PKSFILTERFACTORY) KsGetFirstChild((PVOID) Device);\n}\n\nPKSFILTER __forceinline KsFilterFactoryGetFirstChildFilter (PKSFILTERFACTORY FilterFactory)\n{\n\treturn (PKSFILTER) KsGetFirstChild((PVOID) FilterFactory);\n}\n\nKSDDKAPI ULONG NTAPI KsFilterGetChildPinCount(PKSFILTER Filter, ULONG PinId);\nKSDDKAPI PKSPIN NTAPI KsFilterGetFirstChildPin(PKSFILTER Filter, ULONG PinId);\nKSDDKAPI PVOID NTAPI KsGetNextSibling (PVOID Object);\nKSDDKAPI PKSPIN NTAPI KsPinGetNextSiblingPin (PKSPIN Pin);\n\nPKSFILTERFACTORY __forceinline KsFilterFactoryGetNextSiblingFilterFactory\n\t\t\t(PKSFILTERFACTORY FilterFactory)\n{\n\treturn (PKSFILTERFACTORY) KsGetNextSibling((PVOID) FilterFactory);\n}\n\nPKSFILTER __forceinline KsFilterGetNextSiblingFilter (PKSFILTER Filter)\n{\n\treturn (PKSFILTER) KsGetNextSibling((PVOID) Filter);\n}\n\nKSDDKAPI PKSDEVICE NTAPI KsGetDevice (PVOID Object);\n\nPKSDEVICE __forceinline KsFilterFactoryGetDevice (PKSFILTERFACTORY FilterFactory)\n{\n\treturn KsGetDevice((PVOID) FilterFactory);\n}\n\nPKSDEVICE __forceinline KsFilterGetDevice (PKSFILTER Filter)\n{\n\treturn KsGetDevice((PVOID) Filter);\n}\n\nPKSDEVICE __forceinline KsPinGetDevice (PKSPIN Pin)\n{\n\treturn KsGetDevice((PVOID) Pin);\n}\n\nKSDDKAPI PKSFILTER NTAPI KsGetFilterFromIrp (PIRP Irp);\nKSDDKAPI PKSPIN NTAPI KsGetPinFromIrp (PIRP Irp);\nKSDDKAPI ULONG NTAPI KsGetNodeIdFromIrp (PIRP Irp);\nKSDDKAPI void NTAPI KsAcquireControl (PVOID Object);\nKSDDKAPI void NTAPI KsReleaseControl (PVOID Object);\n\nvoid __forceinline KsFilterAcquireControl (PKSFILTER Filter)\n{\n\tKsAcquireControl((PVOID) Filter);\n}\n\nvoid __forceinline KsFilterReleaseControl (PKSFILTER Filter)\n{\n\tKsReleaseControl((PVOID) Filter);\n}\n\nvoid __forceinline KsPinAcquireControl (PKSPIN Pin)\n{\n\tKsAcquireControl((PVOID) Pin);\n}\n\nvoid __forceinline KsPinReleaseControl (PKSPIN Pin)\n{\n\tKsReleaseControl((PVOID) Pin);\n}\n\nKSDDKAPI NTSTATUS NTAPI KsAddItemToObjectBag\n\t\t\t(KSOBJECT_BAG ObjectBag, PVOID Item, PFNKSFREE Free);\n\nKSDDKAPI ULONG NTAPI KsRemoveItemFromObjectBag\n\t\t\t(KSOBJECT_BAG ObjectBag, PVOID Item, BOOLEAN Free);\n\n#define KsDiscard(Object,Pointer)\t\t\t\t\t\\\n\tKsRemoveItemFromObjectBag((Object)->Bag, (PVOID)(Pointer), TRUE)\n\nKSDDKAPI NTSTATUS NTAPI KsAllocateObjectBag(PKSDEVICE Device, KSOBJECT_BAG *ObjectBag);\nKSDDKAPI void NTAPI KsFreeObjectBag (KSOBJECT_BAG ObjectBag);\n\nKSDDKAPI NTSTATUS NTAPI KsCopyObjectBagItems\n\t\t\t(KSOBJECT_BAG ObjectBagDestination, KSOBJECT_BAG ObjectBagSource);\n\nKSDDKAPI NTSTATUS NTAPI _KsEdit\n\t\t\t(KSOBJECT_BAG ObjectBag, PVOID *PointerToPointerToItem,\n\t\t\t ULONG NewSize, ULONG OldSize, ULONG Tag);\n\n#define KsEdit(Object, PointerToPointer, Tag)\t\t\t\t\t\t\\\n\t_KsEdit((Object)->Bag, (PVOID*)(PointerToPointer),\t\t\t\t\\\n\t\tsizeof(**(PointerToPointer)), sizeof(**(PointerToPointer)), (Tag))\n\n#define KsEditSized(Object, PointerToPointer, NewSize, OldSize, Tag)\t\t\t\\\n\t_KsEdit((Object)->Bag, (PVOID*)(PointerToPointer), (NewSize), (OldSize), (Tag))\n\nKSDDKAPI NTSTATUS NTAPI KsRegisterFilterWithNoKSPins\n\t\t\t(PDEVICE_OBJECT DeviceObject, const GUID *InterfaceClassGUID,\n\t\t\t ULONG PinCount, WINBOOL *PinDirection, KSPIN_MEDIUM *MediumList,\n\t\t\t GUID *CategoryList);\n\nKSDDKAPI NTSTATUS NTAPI KsFilterCreatePinFactory\n\t\t\t(PKSFILTER Filter, const KSPIN_DESCRIPTOR_EX *const PinDescriptor,\n\t\t\t PULONG PinID);\n\nKSDDKAPI NTSTATUS NTAPI KsFilterCreateNode\n\t\t\t(PKSFILTER Filter, const KSNODE_DESCRIPTOR *const NodeDescriptor,\n\t\t\t PULONG NodeID);\n\nKSDDKAPI NTSTATUS NTAPI KsFilterAddTopologyConnections\n\t\t\t(PKSFILTER Filter, ULONG NewConnectionsCount,\n\t\t\t const KSTOPOLOGY_CONNECTION *const NewTopologyConnections);\n\nKSDDKAPI NTSTATUS NTAPI KsPinGetConnectedPinInterface\n\t\t\t(PKSPIN Pin, const GUID *InterfaceId, PVOID *Interface);\n\nKSDDKAPI PFILE_OBJECT NTAPI KsPinGetConnectedPinFileObject (PKSPIN Pin);\nKSDDKAPI PDEVICE_OBJECT NTAPI KsPinGetConnectedPinDeviceObject (PKSPIN Pin);\n\nKSDDKAPI NTSTATUS NTAPI KsPinGetConnectedFilterInterface\n\t\t\t(PKSPIN Pin, const GUID *InterfaceId, PVOID *Interface);\n\n#if defined(_UNKNOWN_H_) || defined(__IUnknown_INTERFACE_DEFINED__)\nKSDDKAPI NTSTATUS NTAPI KsPinGetReferenceClockInterface\n\t\t\t(PKSPIN Pin, PIKSREFERENCECLOCK *Interface);\n#endif /* defined(_UNKNOWN_H_) || defined(__IUnknown_INTERFACE_DEFINED__) */\n\nKSDDKAPI VOID NTAPI KsPinSetPinClockTime(PKSPIN Pin, LONGLONG Time);\n\nKSDDKAPI NTSTATUS NTAPI KsPinSubmitFrame\n\t\t\t(PKSPIN Pin, PVOID Data, ULONG Size,\n\t\t\t PKSSTREAM_HEADER StreamHeader, PVOID Context);\n\nKSDDKAPI NTSTATUS NTAPI KsPinSubmitFrameMdl\n\t\t\t(PKSPIN Pin, PMDL Mdl, PKSSTREAM_HEADER StreamHeader,\n\t\t\t PVOID Context);\n\nKSDDKAPI void NTAPI KsPinRegisterFrameReturnCallback\n\t\t\t(PKSPIN Pin, PFNKSPINFRAMERETURN FrameReturn);\n\nKSDDKAPI void NTAPI KsPinRegisterIrpCompletionCallback\n\t\t\t(PKSPIN Pin, PFNKSPINIRPCOMPLETION IrpCompletion);\n\nKSDDKAPI void NTAPI KsPinRegisterHandshakeCallback\n\t\t\t(PKSPIN Pin, PFNKSPINHANDSHAKE Handshake);\n\nKSDDKAPI void NTAPI KsFilterRegisterPowerCallbacks\n\t\t\t(PKSFILTER Filter, PFNKSFILTERPOWER Sleep, PFNKSFILTERPOWER Wake);\n\nKSDDKAPI void NTAPI KsPinRegisterPowerCallbacks\n\t\t\t(PKSPIN Pin, PFNKSPINPOWER Sleep, PFNKSPINPOWER Wake);\n\n#if defined(_UNKNOWN_H_) || defined(__IUnknown_INTERFACE_DEFINED__)\nKSDDKAPI PUNKNOWN NTAPI KsRegisterAggregatedClientUnknown\n\t\t\t(PVOID Object, PUNKNOWN ClientUnknown);\n\nKSDDKAPI PUNKNOWN NTAPI KsGetOuterUnknown (PVOID Object);\n\nPUNKNOWN __forceinline KsDeviceRegisterAggregatedClientUnknown\n\t\t\t(PKSDEVICE Device, PUNKNOWN ClientUnknown)\n{\n\treturn KsRegisterAggregatedClientUnknown((PVOID)Device, ClientUnknown);\n}\n\nPUNKNOWN __forceinline KsDeviceGetOuterUnknown (PKSDEVICE Device)\n{\n\treturn KsGetOuterUnknown((PVOID) Device);\n}\n\nPUNKNOWN __forceinline KsFilterFactoryRegisterAggregatedClientUnknown\n\t\t\t(PKSFILTERFACTORY FilterFactory, PUNKNOWN ClientUnknown)\n{\n\treturn KsRegisterAggregatedClientUnknown((PVOID)FilterFactory, ClientUnknown);\n}\n\nPUNKNOWN __forceinline KsFilterFactoryGetOuterUnknown (PKSFILTERFACTORY FilterFactory)\n{\n\treturn KsGetOuterUnknown((PVOID)FilterFactory);\n}\n\nPUNKNOWN __forceinline KsFilterRegisterAggregatedClientUnknown\n\t\t\t(PKSFILTER Filter, PUNKNOWN ClientUnknown)\n{\n\treturn KsRegisterAggregatedClientUnknown((PVOID)Filter, ClientUnknown);\n}\n\nPUNKNOWN __forceinline KsFilterGetOuterUnknown (PKSFILTER Filter)\n{\n\treturn KsGetOuterUnknown((PVOID)Filter);\n}\n\nPUNKNOWN __forceinline KsPinRegisterAggregatedClientUnknown\n\t\t\t(PKSPIN Pin, PUNKNOWN ClientUnknown)\n{\n\treturn KsRegisterAggregatedClientUnknown((PVOID)Pin, ClientUnknown);\n}\n\nPUNKNOWN __forceinline KsPinGetOuterUnknown (PKSPIN Pin)\n{\n\treturn KsGetOuterUnknown((PVOID)Pin);\n}\n#endif /* defined(_UNKNOWN_H_) || defined(__IUnknown_INTERFACE_DEFINED__) */\n\n#else /* _NTDDK_ */\n\n#ifndef KS_NO_CREATE_FUNCTIONS\nKSDDKAPI DWORD WINAPI KsCreateAllocator(HANDLE ConnectionHandle,PKSALLOCATOR_FRAMING AllocatorFraming,PHANDLE AllocatorHandle);\nKSDDKAPI DWORD NTAPI KsCreateClock(HANDLE ConnectionHandle,PKSCLOCK_CREATE ClockCreate,PHANDLE ClockHandle);\nKSDDKAPI DWORD WINAPI KsCreatePin(HANDLE FilterHandle,PKSPIN_CONNECT Connect,ACCESS_MASK DesiredAccess,PHANDLE ConnectionHandle);\nKSDDKAPI DWORD WINAPI KsCreateTopologyNode(HANDLE ParentHandle,PKSNODE_CREATE NodeCreate,ACCESS_MASK DesiredAccess,PHANDLE NodeHandle);\n#endif\n\n#endif /* _NTDDK_ */\n\n#ifdef __cplusplus\n}\n#endif\n\n#define DENY_USERMODE_ACCESS(pIrp,CompleteRequest)\t\t\t\\\n\tif(pIrp->RequestorMode!=KernelMode) {\t\t\t\t\\\n\t\tpIrp->IoStatus.Information = 0;\t\t\t\t\\\n\t\tpIrp->IoStatus.Status = STATUS_INVALID_DEVICE_REQUEST;\t\\\n\t\tif(CompleteRequest)\t\t\t\t\t\\\n\t\t\tIoCompleteRequest (pIrp,IO_NO_INCREMENT);\t\\\n\t\treturn STATUS_INVALID_DEVICE_REQUEST;\t\t\t\\\n\t}\n\n#endif /* _KS_ */\n\n"
  },
  {
    "path": "thirdparty/portaudio/src/hostapi/wasapi/mingw-include/ksguid.h",
    "content": "/**\n * This file has no copyright assigned and is placed in the Public Domain.\n * This file is part of the w64 mingw-runtime package.\n * No warranty is given; refer to the file DISCLAIMER.PD within this package.\n */\n#define INITGUID\n#include <guiddef.h>\n\n#ifndef DECLSPEC_SELECTANY\n#define DECLSPEC_SELECTANY __declspec(selectany)\n#endif\n\n#ifdef DEFINE_GUIDEX\n#undef DEFINE_GUIDEX\n#endif\n\n#ifdef __cplusplus\n#define DEFINE_GUIDEX(name) EXTERN_C const CDECL GUID DECLSPEC_SELECTANY name = { STATICGUIDOF(name) }\n#else\n#define DEFINE_GUIDEX(name) const CDECL GUID DECLSPEC_SELECTANY name = { STATICGUIDOF(name) }\n#endif\n#ifndef STATICGUIDOF\n#define STATICGUIDOF(guid) STATIC_##guid\n#endif\n\n#ifndef DEFINE_WAVEFORMATEX_GUID\n#define DEFINE_WAVEFORMATEX_GUID(x) (USHORT)(x),0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71\n#endif\n"
  },
  {
    "path": "thirdparty/portaudio/src/hostapi/wasapi/mingw-include/ksmedia.h",
    "content": "/**\n * This file has no copyright assigned and is placed in the Public Domain.\n * This file is part of the w64 mingw-runtime package.\n * No warranty is given; refer to the file DISCLAIMER.PD within this package.\n */\n#if !defined(_KS_)\n#warning ks.h must be included before ksmedia.h\n#include \"ks.h\"\n#endif\n\n#if __GNUC__ >= 3\n#pragma GCC system_header\n#endif\n\n#if !defined(_KSMEDIA_)\n#define _KSMEDIA_\n\ntypedef struct {\n  KSPROPERTY Property;\n  KSMULTIPLE_ITEM MultipleItem;\n} KSMULTIPLE_DATA_PROP,*PKSMULTIPLE_DATA_PROP;\n\n#define STATIC_KSMEDIUMSETID_MidiBus\t\t\t\t\t\\\n\t0x05908040L,0x3246,0x11D0,0xA5,0xD6,0x28,0xDB,0x04,0xC1,0x00,0x00\nDEFINE_GUIDSTRUCT(\"05908040-3246-11D0-A5D6-28DB04C10000\",KSMEDIUMSETID_MidiBus);\n#define KSMEDIUMSETID_MidiBus DEFINE_GUIDNAMED(KSMEDIUMSETID_MidiBus)\n\n#define STATIC_KSMEDIUMSETID_VPBus\t\t\t\t\t\\\n\t0xA18C15ECL,0xCE43,0x11D0,0xAB,0xE7,0x00,0xA0,0xC9,0x22,0x31,0x96\nDEFINE_GUIDSTRUCT(\"A18C15EC-CE43-11D0-ABE7-00A0C9223196\",KSMEDIUMSETID_VPBus);\n#define KSMEDIUMSETID_VPBus DEFINE_GUIDNAMED(KSMEDIUMSETID_VPBus)\n\n#define STATIC_KSINTERFACESETID_Media\t\t\t\t\t\\\n\t0x3A13EB40L,0x30A7,0x11D0,0xA5,0xD6,0x28,0xDB,0x04,0xC1,0x00,0x00\nDEFINE_GUIDSTRUCT(\"3A13EB40-30A7-11D0-A5D6-28DB04C10000\",KSINTERFACESETID_Media);\n#define KSINTERFACESETID_Media DEFINE_GUIDNAMED(KSINTERFACESETID_Media)\n\ntypedef enum {\n  KSINTERFACE_MEDIA_MUSIC,\n  KSINTERFACE_MEDIA_WAVE_BUFFERED,\n  KSINTERFACE_MEDIA_WAVE_QUEUED\n} KSINTERFACE_MEDIA;\n\n#ifndef INIT_USBAUDIO_MID\n#define INIT_USBAUDIO_MID(guid,id)\t\t\t\t\t\\\n{\t\t\t\t\t\t\t\t\t\\\n\t(guid)->Data1 = 0x4e1cecd2 + (USHORT)(id);\t\t\t\\\n\t(guid)->Data2 = 0x1679;\t\t\t\t\t\t\\\n\t(guid)->Data3 = 0x463b;\t\t\t\t\t\t\\\n\t(guid)->Data4[0] = 0xa7;\t\t\t\t\t\\\n\t(guid)->Data4[1] = 0x2f;\t\t\t\t\t\\\n\t(guid)->Data4[2] = 0xa5;\t\t\t\t\t\\\n\t(guid)->Data4[3] = 0xbf;\t\t\t\t\t\\\n\t(guid)->Data4[4] = 0x64;\t\t\t\t\t\\\n\t(guid)->Data4[5] = 0xc8;\t\t\t\t\t\\\n\t(guid)->Data4[6] = 0x6e;\t\t\t\t\t\\\n\t(guid)->Data4[7] = 0xba;\t\t\t\t\t\\\n}\n#define EXTRACT_USBAUDIO_MID(guid)\t\t\t\t\t\\\n\t(USHORT)((guid)->Data1 - 0x4e1cecd2)\n#define DEFINE_USBAUDIO_MID_GUID(id)\t\t\t\t\t\\\n\t0x4e1cecd2+(USHORT)(id),0x1679,0x463b,0xa7,0x2f,0xa5,0xbf,0x64,0xc8,0x6e,0xba\n#define IS_COMPATIBLE_USBAUDIO_MID(guid)\t\t\t\t\\\n\t(((guid)->Data1 >= 0x4e1cecd2) &&\t\t\t\t\\\n\t ((guid)->Data1 < 0x4e1cecd2 + 0xffff) &&\t\t\t\\\n\t ((guid)->Data2 == 0x1679) &&\t\t\t\t\t\\\n\t ((guid)->Data3 == 0x463b) &&\t\t\t\t\t\\\n\t ((guid)->Data4[0] == 0xa7) &&\t\t\t\t\t\\\n\t ((guid)->Data4[1] == 0x2f) &&\t\t\t\t\t\\\n\t ((guid)->Data4[2] == 0xa5) &&\t\t\t\t\t\\\n\t ((guid)->Data4[3] == 0xbf) &&\t\t\t\t\t\\\n\t ((guid)->Data4[4] == 0x64) &&\t\t\t\t\t\\\n\t ((guid)->Data4[5] == 0xc8) &&\t\t\t\t\t\\\n\t ((guid)->Data4[6] == 0x6e) &&\t\t\t\t\t\\\n\t ((guid)->Data4[7] == 0xba) )\n#endif /* INIT_USBAUDIO_MID */\n\n#ifndef INIT_USBAUDIO_PID\n#define INIT_USBAUDIO_PID(guid,id)\t\t\t\t\t\\\n{\t\t\t\t\t\t\t\t\t\\\n\t(guid)->Data1 = 0xabcc5a5e + (USHORT)(id);\t\t\t\\\n\t(guid)->Data2 = 0xc263;\t\t\t\t\t\t\\\n\t(guid)->Data3 = 0x463b;\t\t\t\t\t\t\\\n\t(guid)->Data4[0] = 0xa7;\t\t\t\t\t\\\n\t(guid)->Data4[1] = 0x2f;\t\t\t\t\t\\\n\t(guid)->Data4[2] = 0xa5;\t\t\t\t\t\\\n\t(guid)->Data4[3] = 0xbf;\t\t\t\t\t\\\n\t(guid)->Data4[4] = 0x64;\t\t\t\t\t\\\n\t(guid)->Data4[5] = 0xc8;\t\t\t\t\t\\\n\t(guid)->Data4[6] = 0x6e;\t\t\t\t\t\\\n\t(guid)->Data4[7] = 0xba;\t\t\t\t\t\\\n}\n#define EXTRACT_USBAUDIO_PID(guid)\t\t\t\t\t\\\n\t(USHORT)((guid)->Data1 - 0xabcc5a5e)\n#define DEFINE_USBAUDIO_PID_GUID(id)\t\t\t\t\t\\\n\t0xabcc5a5e+(USHORT)(id),0xc263,0x463b,0xa7,0x2f,0xa5,0xbf,0x64,0xc8,0x6e,0xba\n#define IS_COMPATIBLE_USBAUDIO_PID(guid)\t\t\t\t\\\n\t(((guid)->Data1 >= 0xabcc5a5e) &&\t\t\t\t\\\n\t ((guid)->Data1 < 0xabcc5a5e + 0xffff) &&\t\t\t\\\n\t ((guid)->Data2 == 0xc263) &&\t\t\t\t\t\\\n\t ((guid)->Data3 == 0x463b) &&\t\t\t\t\t\\\n\t ((guid)->Data4[0] == 0xa7) &&\t\t\t\t\t\\\n\t ((guid)->Data4[1] == 0x2f) &&\t\t\t\t\t\\\n\t ((guid)->Data4[2] == 0xa5) &&\t\t\t\t\t\\\n\t ((guid)->Data4[3] == 0xbf) &&\t\t\t\t\t\\\n\t ((guid)->Data4[4] == 0x64) &&\t\t\t\t\t\\\n\t ((guid)->Data4[5] == 0xc8) &&\t\t\t\t\t\\\n\t ((guid)->Data4[6] == 0x6e) &&\t\t\t\t\t\\\n\t ((guid)->Data4[7] == 0xba) )\n#endif /* INIT_USBAUDIO_PID */\n\n#ifndef INIT_USBAUDIO_PRODUCT_NAME\n#define INIT_USBAUDIO_PRODUCT_NAME(guid,vid,pid,strIndex)\t\t\\\n{\t\t\t\t\t\t\t\t\t\\\n\t(guid)->Data1 = 0XFC575048 + (USHORT)(vid);\t\t\t\\\n\t(guid)->Data2 = 0x2E08 + (USHORT)(pid);\t\t\t\t\\\n\t(guid)->Data3 = 0x463B + (USHORT)(strIndex);\t\t\t\\\n\t(guid)->Data4[0] = 0xA7;\t\t\t\t\t\\\n\t(guid)->Data4[1] = 0x2F;\t\t\t\t\t\\\n\t(guid)->Data4[2] = 0xA5;\t\t\t\t\t\\\n\t(guid)->Data4[3] = 0xBF;\t\t\t\t\t\\\n\t(guid)->Data4[4] = 0x64;\t\t\t\t\t\\\n\t(guid)->Data4[5] = 0xC8;\t\t\t\t\t\\\n\t(guid)->Data4[6] = 0x6E;\t\t\t\t\t\\\n\t(guid)->Data4[7] = 0xBA;\t\t\t\t\t\\\n}\n#define DEFINE_USBAUDIO_PRODUCT_NAME(vid,pid,strIndex)\t\t\t\\\n\t0xFC575048+(USHORT)(vid),0x2E08+(USHORT)(pid),0x463B+(USHORT)(strIndex),0xA7,0x2F,0xA5,0xBF,0x64,0xC8,0x6E,0xBA\n#endif /* INIT_USBAUDIO_PRODUCT_NAME */\n\n#define STATIC_KSCOMPONENTID_USBAUDIO\t\t\t\t\t\\\n\t0x8F1275F0,0x26E9,0x4264,0xBA,0x4D,0x39,0xFF,0xF0,0x1D,0x94,0xAA\nDEFINE_GUIDSTRUCT(\"8F1275F0-26E9-4264-BA4D-39FFF01D94AA\",KSCOMPONENTID_USBAUDIO);\n#define KSCOMPONENTID_USBAUDIO DEFINE_GUIDNAMED(KSCOMPONENTID_USBAUDIO)\n\n#define INIT_USB_TERMINAL(guid,id)\t\t\t\t\t\\\n{\t\t\t\t\t\t\t\t\t\\\n\t(guid)->Data1 = 0xDFF219E0 + (USHORT)(id);\t\t\t\\\n\t(guid)->Data2 = 0xF70F;\t\t\t\t\t\t\\\n\t(guid)->Data3 = 0x11D0;\t\t\t\t\t\t\\\n\t(guid)->Data4[0] = 0xb9;\t\t\t\t\t\\\n\t(guid)->Data4[1] = 0x17;\t\t\t\t\t\\\n\t(guid)->Data4[2] = 0x00;\t\t\t\t\t\\\n\t(guid)->Data4[3] = 0xa0;\t\t\t\t\t\\\n\t(guid)->Data4[4] = 0xc9;\t\t\t\t\t\\\n\t(guid)->Data4[5] = 0x22;\t\t\t\t\t\\\n\t(guid)->Data4[6] = 0x31;\t\t\t\t\t\\\n\t(guid)->Data4[7] = 0x96;\t\t\t\t\t\\\n}\n#define EXTRACT_USB_TERMINAL(guid)\t\t\t\t\t\\\n\t(USHORT)((guid)->Data1 - 0xDFF219E0)\n#define DEFINE_USB_TERMINAL_GUID(id)\t\t\t\t\t\\\n\t0xDFF219E0+(USHORT)(id),0xF70F,0x11D0,0xB9,0x17,0x00,0xA0,0xC9,0x22,0x31,0x96\n\n#define STATIC_KSNODETYPE_MICROPHONE\t\t\t\t\t\\\n\tDEFINE_USB_TERMINAL_GUID(0x0201)\nDEFINE_GUIDSTRUCT(\"DFF21BE1-F70F-11D0-B917-00A0C9223196\",KSNODETYPE_MICROPHONE);\n#define KSNODETYPE_MICROPHONE DEFINE_GUIDNAMED(KSNODETYPE_MICROPHONE)\n\n#define STATIC_KSNODETYPE_DESKTOP_MICROPHONE\t\t\t\t\\\n\tDEFINE_USB_TERMINAL_GUID(0x0202)\nDEFINE_GUIDSTRUCT(\"DFF21BE2-F70F-11D0-B917-00A0C9223196\",KSNODETYPE_DESKTOP_MICROPHONE);\n#define KSNODETYPE_DESKTOP_MICROPHONE DEFINE_GUIDNAMED(KSNODETYPE_DESKTOP_MICROPHONE)\n\n#define STATIC_KSNODETYPE_PERSONAL_MICROPHONE\t\t\t\t\\\n\tDEFINE_USB_TERMINAL_GUID(0x0203)\nDEFINE_GUIDSTRUCT(\"DFF21BE3-F70F-11D0-B917-00A0C9223196\",KSNODETYPE_PERSONAL_MICROPHONE);\n#define KSNODETYPE_PERSONAL_MICROPHONE DEFINE_GUIDNAMED(KSNODETYPE_PERSONAL_MICROPHONE)\n\n#define STATIC_KSNODETYPE_OMNI_DIRECTIONAL_MICROPHONE\t\t\t\\\n\tDEFINE_USB_TERMINAL_GUID(0x0204)\nDEFINE_GUIDSTRUCT(\"DFF21BE4-F70F-11D0-B917-00A0C9223196\",KSNODETYPE_OMNI_DIRECTIONAL_MICROPHONE);\n#define KSNODETYPE_OMNI_DIRECTIONAL_MICROPHONE DEFINE_GUIDNAMED(KSNODETYPE_OMNI_DIRECTIONAL_MICROPHONE)\n\n#define STATIC_KSNODETYPE_MICROPHONE_ARRAY\t\t\t\t\\\n\tDEFINE_USB_TERMINAL_GUID(0x0205)\nDEFINE_GUIDSTRUCT(\"DFF21BE5-F70F-11D0-B917-00A0C9223196\",KSNODETYPE_MICROPHONE_ARRAY);\n#define KSNODETYPE_MICROPHONE_ARRAY DEFINE_GUIDNAMED(KSNODETYPE_MICROPHONE_ARRAY)\n\n#define STATIC_KSNODETYPE_PROCESSING_MICROPHONE_ARRAY\t\t\t\\\n\tDEFINE_USB_TERMINAL_GUID(0x0206)\nDEFINE_GUIDSTRUCT(\"DFF21BE6-F70F-11D0-B917-00A0C9223196\",KSNODETYPE_PROCESSING_MICROPHONE_ARRAY);\n#define KSNODETYPE_PROCESSING_MICROPHONE_ARRAY DEFINE_GUIDNAMED(KSNODETYPE_PROCESSING_MICROPHONE_ARRAY)\n\n#define STATIC_KSCATEGORY_MICROPHONE_ARRAY_PROCESSOR\t\t\t\\\n\t0x830a44f2,0xa32d,0x476b,0xbe,0x97,0x42,0x84,0x56,0x73,0xb3,0x5a\nDEFINE_GUIDSTRUCT(\"830a44f2-a32d-476b-be97-42845673b35a\",KSCATEGORY_MICROPHONE_ARRAY_PROCESSOR);\n#define KSCATEGORY_MICROPHONE_ARRAY_PROCESSOR DEFINE_GUIDNAMED(KSCATEGORY_MICROPHONE_ARRAY_PROCESSOR)\n\n#define STATIC_KSNODETYPE_SPEAKER\t\t\t\t\t\\\n\tDEFINE_USB_TERMINAL_GUID(0x0301)\nDEFINE_GUIDSTRUCT(\"DFF21CE1-F70F-11D0-B917-00A0C9223196\",KSNODETYPE_SPEAKER);\n#define KSNODETYPE_SPEAKER DEFINE_GUIDNAMED(KSNODETYPE_SPEAKER)\n\n#define STATIC_KSNODETYPE_HEADPHONES\t\t\t\t\t\\\n\tDEFINE_USB_TERMINAL_GUID(0x0302)\nDEFINE_GUIDSTRUCT(\"DFF21CE2-F70F-11D0-B917-00A0C9223196\",KSNODETYPE_HEADPHONES);\n#define KSNODETYPE_HEADPHONES DEFINE_GUIDNAMED(KSNODETYPE_HEADPHONES)\n\n#define STATIC_KSNODETYPE_HEAD_MOUNTED_DISPLAY_AUDIO\t\t\t\\\n\tDEFINE_USB_TERMINAL_GUID(0x0303)\nDEFINE_GUIDSTRUCT(\"DFF21CE3-F70F-11D0-B917-00A0C9223196\",KSNODETYPE_HEAD_MOUNTED_DISPLAY_AUDIO);\n#define KSNODETYPE_HEAD_MOUNTED_DISPLAY_AUDIO DEFINE_GUIDNAMED(KSNODETYPE_HEAD_MOUNTED_DISPLAY_AUDIO)\n\n#define STATIC_KSNODETYPE_DESKTOP_SPEAKER\t\t\t\t\\\n\tDEFINE_USB_TERMINAL_GUID(0x0304)\nDEFINE_GUIDSTRUCT(\"DFF21CE4-F70F-11D0-B917-00A0C9223196\",KSNODETYPE_DESKTOP_SPEAKER);\n#define KSNODETYPE_DESKTOP_SPEAKER DEFINE_GUIDNAMED(KSNODETYPE_DESKTOP_SPEAKER)\n\n#define STATIC_KSNODETYPE_ROOM_SPEAKER\t\t\t\t\t\\\n\tDEFINE_USB_TERMINAL_GUID(0x0305)\nDEFINE_GUIDSTRUCT(\"DFF21CE5-F70F-11D0-B917-00A0C9223196\",KSNODETYPE_ROOM_SPEAKER);\n#define KSNODETYPE_ROOM_SPEAKER DEFINE_GUIDNAMED(KSNODETYPE_ROOM_SPEAKER)\n\n#define STATIC_KSNODETYPE_COMMUNICATION_SPEAKER\t\t\t\t\\\n\tDEFINE_USB_TERMINAL_GUID(0x0306)\nDEFINE_GUIDSTRUCT(\"DFF21CE6-F70F-11D0-B917-00A0C9223196\",KSNODETYPE_COMMUNICATION_SPEAKER);\n#define KSNODETYPE_COMMUNICATION_SPEAKER DEFINE_GUIDNAMED(KSNODETYPE_COMMUNICATION_SPEAKER)\n\n#define STATIC_KSNODETYPE_LOW_FREQUENCY_EFFECTS_SPEAKER\t\t\t\\\n\tDEFINE_USB_TERMINAL_GUID(0x0307)\nDEFINE_GUIDSTRUCT(\"DFF21CE7-F70F-11D0-B917-00A0C9223196\",KSNODETYPE_LOW_FREQUENCY_EFFECTS_SPEAKER);\n#define KSNODETYPE_LOW_FREQUENCY_EFFECTS_SPEAKER DEFINE_GUIDNAMED(KSNODETYPE_LOW_FREQUENCY_EFFECTS_SPEAKER)\n\n#define STATIC_KSNODETYPE_HANDSET\t\t\t\t\t\\\n\tDEFINE_USB_TERMINAL_GUID(0x0401)\nDEFINE_GUIDSTRUCT(\"DFF21DE1-F70F-11D0-B917-00A0C9223196\",KSNODETYPE_HANDSET);\n#define KSNODETYPE_HANDSET DEFINE_GUIDNAMED(KSNODETYPE_HANDSET)\n\n#define STATIC_KSNODETYPE_HEADSET\t\t\t\t\t\\\n\tDEFINE_USB_TERMINAL_GUID(0x0402)\nDEFINE_GUIDSTRUCT(\"DFF21DE2-F70F-11D0-B917-00A0C9223196\",KSNODETYPE_HEADSET);\n#define KSNODETYPE_HEADSET DEFINE_GUIDNAMED(KSNODETYPE_HEADSET)\n\n#define STATIC_KSNODETYPE_SPEAKERPHONE_NO_ECHO_REDUCTION\t\t\\\n\tDEFINE_USB_TERMINAL_GUID(0x0403)\nDEFINE_GUIDSTRUCT(\"DFF21DE3-F70F-11D0-B917-00A0C9223196\",KSNODETYPE_SPEAKERPHONE_NO_ECHO_REDUCTION);\n#define KSNODETYPE_SPEAKERPHONE_NO_ECHO_REDUCTION DEFINE_GUIDNAMED(KSNODETYPE_SPEAKERPHONE_NO_ECHO_REDUCTION)\n\n#define STATIC_KSNODETYPE_ECHO_SUPPRESSING_SPEAKERPHONE\t\t\t\\\n\tDEFINE_USB_TERMINAL_GUID(0x0404)\nDEFINE_GUIDSTRUCT(\"DFF21DE4-F70F-11D0-B917-00A0C9223196\",KSNODETYPE_ECHO_SUPPRESSING_SPEAKERPHONE);\n#define KSNODETYPE_ECHO_SUPPRESSING_SPEAKERPHONE DEFINE_GUIDNAMED(KSNODETYPE_ECHO_SUPPRESSING_SPEAKERPHONE)\n\n#define STATIC_KSNODETYPE_ECHO_CANCELING_SPEAKERPHONE\t\t\t\\\n\tDEFINE_USB_TERMINAL_GUID(0x0405)\nDEFINE_GUIDSTRUCT(\"DFF21DE5-F70F-11D0-B917-00A0C9223196\",KSNODETYPE_ECHO_CANCELING_SPEAKERPHONE);\n#define KSNODETYPE_ECHO_CANCELING_SPEAKERPHONE DEFINE_GUIDNAMED(KSNODETYPE_ECHO_CANCELING_SPEAKERPHONE)\n\n#define STATIC_KSNODETYPE_PHONE_LINE\t\t\t\t\t\\\n\tDEFINE_USB_TERMINAL_GUID(0x0501)\nDEFINE_GUIDSTRUCT(\"DFF21EE1-F70F-11D0-B917-00A0C9223196\",KSNODETYPE_PHONE_LINE);\n#define KSNODETYPE_PHONE_LINE DEFINE_GUIDNAMED(KSNODETYPE_PHONE_LINE)\n\n#define STATIC_KSNODETYPE_TELEPHONE\t\t\t\t\t\\\n\tDEFINE_USB_TERMINAL_GUID(0x0502)\nDEFINE_GUIDSTRUCT(\"DFF21EE2-F70F-11D0-B917-00A0C9223196\",KSNODETYPE_TELEPHONE);\n#define KSNODETYPE_TELEPHONE DEFINE_GUIDNAMED(KSNODETYPE_TELEPHONE)\n\n#define STATIC_KSNODETYPE_DOWN_LINE_PHONE\t\t\t\t\\\n\tDEFINE_USB_TERMINAL_GUID(0x0503)\nDEFINE_GUIDSTRUCT(\"DFF21EE3-F70F-11D0-B917-00A0C9223196\",KSNODETYPE_DOWN_LINE_PHONE);\n#define KSNODETYPE_DOWN_LINE_PHONE DEFINE_GUIDNAMED(KSNODETYPE_DOWN_LINE_PHONE)\n\n#define STATIC_KSNODETYPE_ANALOG_CONNECTOR\t\t\t\t\\\n\tDEFINE_USB_TERMINAL_GUID(0x601)\nDEFINE_GUIDSTRUCT(\"DFF21FE1-F70F-11D0-B917-00A0C9223196\",KSNODETYPE_ANALOG_CONNECTOR);\n#define KSNODETYPE_ANALOG_CONNECTOR DEFINE_GUIDNAMED(KSNODETYPE_ANALOG_CONNECTOR)\n\n#define STATIC_KSNODETYPE_DIGITAL_AUDIO_INTERFACE\t\t\t\\\n\tDEFINE_USB_TERMINAL_GUID(0x0602)\nDEFINE_GUIDSTRUCT(\"DFF21FE2-F70F-11D0-B917-00A0C9223196\",KSNODETYPE_DIGITAL_AUDIO_INTERFACE);\n#define KSNODETYPE_DIGITAL_AUDIO_INTERFACE DEFINE_GUIDNAMED(KSNODETYPE_DIGITAL_AUDIO_INTERFACE)\n\n#define STATIC_KSNODETYPE_LINE_CONNECTOR\t\t\t\t\\\n\tDEFINE_USB_TERMINAL_GUID(0x0603)\nDEFINE_GUIDSTRUCT(\"DFF21FE3-F70F-11D0-B917-00A0C9223196\",KSNODETYPE_LINE_CONNECTOR);\n#define KSNODETYPE_LINE_CONNECTOR DEFINE_GUIDNAMED(KSNODETYPE_LINE_CONNECTOR)\n\n#define STATIC_KSNODETYPE_LEGACY_AUDIO_CONNECTOR\t\t\t\\\n\tDEFINE_USB_TERMINAL_GUID(0x0604)\nDEFINE_GUIDSTRUCT(\"DFF21FE4-F70F-11D0-B917-00A0C9223196\",KSNODETYPE_LEGACY_AUDIO_CONNECTOR);\n#define KSNODETYPE_LEGACY_AUDIO_CONNECTOR DEFINE_GUIDNAMED(KSNODETYPE_LEGACY_AUDIO_CONNECTOR)\n\n#define STATIC_KSNODETYPE_SPDIF_INTERFACE\t\t\t\t\\\n\tDEFINE_USB_TERMINAL_GUID(0x0605)\nDEFINE_GUIDSTRUCT(\"DFF21FE5-F70F-11D0-B917-00A0C9223196\",KSNODETYPE_SPDIF_INTERFACE);\n#define KSNODETYPE_SPDIF_INTERFACE DEFINE_GUIDNAMED(KSNODETYPE_SPDIF_INTERFACE)\n\n#define STATIC_KSNODETYPE_1394_DA_STREAM\t\t\t\t\\\n\tDEFINE_USB_TERMINAL_GUID(0x0606)\nDEFINE_GUIDSTRUCT(\"DFF21FE6-F70F-11D0-B917-00A0C9223196\",KSNODETYPE_1394_DA_STREAM);\n#define KSNODETYPE_1394_DA_STREAM DEFINE_GUIDNAMED(KSNODETYPE_1394_DA_STREAM)\n\n#define STATIC_KSNODETYPE_1394_DV_STREAM_SOUNDTRACK\t\t\t\\\n\tDEFINE_USB_TERMINAL_GUID(0x0607)\nDEFINE_GUIDSTRUCT(\"DFF21FE7-F70F-11D0-B917-00A0C9223196\",KSNODETYPE_1394_DV_STREAM_SOUNDTRACK);\n#define KSNODETYPE_1394_DV_STREAM_SOUNDTRACK DEFINE_GUIDNAMED(KSNODETYPE_1394_DV_STREAM_SOUNDTRACK)\n\n#define STATIC_KSNODETYPE_LEVEL_CALIBRATION_NOISE_SOURCE\t\t\\\n\tDEFINE_USB_TERMINAL_GUID(0x0701)\nDEFINE_GUIDSTRUCT(\"DFF220E1-F70F-11D0-B917-00A0C9223196\",KSNODETYPE_LEVEL_CALIBRATION_NOISE_SOURCE);\n#define KSNODETYPE_LEVEL_CALIBRATION_NOISE_SOURCE DEFINE_GUIDNAMED(KSNODETYPE_LEVEL_CALIBRATION_NOISE_SOURCE)\n\n#define STATIC_KSNODETYPE_EQUALIZATION_NOISE\t\t\t\t\\\n\tDEFINE_USB_TERMINAL_GUID(0x0702)\nDEFINE_GUIDSTRUCT(\"DFF220E2-F70F-11D0-B917-00A0C9223196\",KSNODETYPE_EQUALIZATION_NOISE);\n#define KSNODETYPE_EQUALIZATION_NOISE DEFINE_GUIDNAMED(KSNODETYPE_EQUALIZATION_NOISE)\n\n#define STATIC_KSNODETYPE_CD_PLAYER\t\t\t\t\t\\\n\tDEFINE_USB_TERMINAL_GUID(0x0703)\nDEFINE_GUIDSTRUCT(\"DFF220E3-F70F-11D0-B917-00A0C9223196\",KSNODETYPE_CD_PLAYER);\n#define KSNODETYPE_CD_PLAYER DEFINE_GUIDNAMED(KSNODETYPE_CD_PLAYER)\n\n#define STATIC_KSNODETYPE_DAT_IO_DIGITAL_AUDIO_TAPE\t\t\t\\\n\tDEFINE_USB_TERMINAL_GUID(0x0704)\nDEFINE_GUIDSTRUCT(\"DFF220E4-F70F-11D0-B917-00A0C9223196\",KSNODETYPE_DAT_IO_DIGITAL_AUDIO_TAPE);\n#define KSNODETYPE_DAT_IO_DIGITAL_AUDIO_TAPE DEFINE_GUIDNAMED(KSNODETYPE_DAT_IO_DIGITAL_AUDIO_TAPE)\n\n#define STATIC_KSNODETYPE_DCC_IO_DIGITAL_COMPACT_CASSETTE\t\t\\\n\tDEFINE_USB_TERMINAL_GUID(0x0705)\nDEFINE_GUIDSTRUCT(\"DFF220E5-F70F-11D0-B917-00A0C9223196\",KSNODETYPE_DCC_IO_DIGITAL_COMPACT_CASSETTE);\n#define KSNODETYPE_DCC_IO_DIGITAL_COMPACT_CASSETTE DEFINE_GUIDNAMED(KSNODETYPE_DCC_IO_DIGITAL_COMPACT_CASSETTE)\n\n#define STATIC_KSNODETYPE_MINIDISK\t\t\t\t\t\\\n\tDEFINE_USB_TERMINAL_GUID(0x0706)\nDEFINE_GUIDSTRUCT(\"DFF220E6-F70F-11D0-B917-00A0C9223196\",KSNODETYPE_MINIDISK);\n#define KSNODETYPE_MINIDISK DEFINE_GUIDNAMED(KSNODETYPE_MINIDISK)\n\n#define STATIC_KSNODETYPE_ANALOG_TAPE\t\t\t\t\t\\\n\tDEFINE_USB_TERMINAL_GUID(0x0707)\nDEFINE_GUIDSTRUCT(\"DFF220E7-F70F-11D0-B917-00A0C9223196\",KSNODETYPE_ANALOG_TAPE);\n#define KSNODETYPE_ANALOG_TAPE DEFINE_GUIDNAMED(KSNODETYPE_ANALOG_TAPE)\n\n#define STATIC_KSNODETYPE_PHONOGRAPH\t\t\t\t\t\\\n\tDEFINE_USB_TERMINAL_GUID(0x0708)\nDEFINE_GUIDSTRUCT(\"DFF220E8-F70F-11D0-B917-00A0C9223196\",KSNODETYPE_PHONOGRAPH);\n#define KSNODETYPE_PHONOGRAPH DEFINE_GUIDNAMED(KSNODETYPE_PHONOGRAPH)\n\n#define STATIC_KSNODETYPE_VCR_AUDIO\t\t\t\t\t\\\n\tDEFINE_USB_TERMINAL_GUID(0x0708)\nDEFINE_GUIDSTRUCT(\"DFF220E9-F70F-11D0-B917-00A0C9223196\",KSNODETYPE_VCR_AUDIO);\n#define KSNODETYPE_VCR_AUDIO DEFINE_GUIDNAMED(KSNODETYPE_VCR_AUDIO)\n\n#define STATIC_KSNODETYPE_VIDEO_DISC_AUDIO\t\t\t\t\\\n\tDEFINE_USB_TERMINAL_GUID(0x070A)\nDEFINE_GUIDSTRUCT(\"DFF220EA-F70F-11D0-B917-00A0C9223196\",KSNODETYPE_VIDEO_DISC_AUDIO);\n#define KSNODETYPE_VIDEO_DISC_AUDIO DEFINE_GUIDNAMED(KSNODETYPE_VIDEO_DISC_AUDIO)\n\n#define STATIC_KSNODETYPE_DVD_AUDIO\t\t\t\t\t\\\n\tDEFINE_USB_TERMINAL_GUID(0x070B)\nDEFINE_GUIDSTRUCT(\"DFF220EB-F70F-11D0-B917-00A0C9223196\",KSNODETYPE_DVD_AUDIO);\n#define KSNODETYPE_DVD_AUDIO DEFINE_GUIDNAMED(KSNODETYPE_DVD_AUDIO)\n\n#define STATIC_KSNODETYPE_TV_TUNER_AUDIO\t\t\t\t\\\n\tDEFINE_USB_TERMINAL_GUID(0x070C)\nDEFINE_GUIDSTRUCT(\"DFF220EC-F70F-11D0-B917-00A0C9223196\",KSNODETYPE_TV_TUNER_AUDIO);\n#define KSNODETYPE_TV_TUNER_AUDIO DEFINE_GUIDNAMED(KSNODETYPE_TV_TUNER_AUDIO)\n\n#define STATIC_KSNODETYPE_SATELLITE_RECEIVER_AUDIO\t\t\t\\\n\tDEFINE_USB_TERMINAL_GUID(0x070D)\nDEFINE_GUIDSTRUCT(\"DFF220ED-F70F-11D0-B917-00A0C9223196\",KSNODETYPE_SATELLITE_RECEIVER_AUDIO);\n#define KSNODETYPE_SATELLITE_RECEIVER_AUDIO DEFINE_GUIDNAMED(KSNODETYPE_SATELLITE_RECEIVER_AUDIO)\n\n#define STATIC_KSNODETYPE_CABLE_TUNER_AUDIO\t\t\t\t\\\n\tDEFINE_USB_TERMINAL_GUID(0x070E)\nDEFINE_GUIDSTRUCT(\"DFF220EE-F70F-11D0-B917-00A0C9223196\",KSNODETYPE_CABLE_TUNER_AUDIO);\n#define KSNODETYPE_CABLE_TUNER_AUDIO DEFINE_GUIDNAMED(KSNODETYPE_CABLE_TUNER_AUDIO)\n\n#define STATIC_KSNODETYPE_DSS_AUDIO\t\t\t\t\t\\\n\tDEFINE_USB_TERMINAL_GUID(0x070F)\nDEFINE_GUIDSTRUCT(\"DFF220EF-F70F-11D0-B917-00A0C9223196\",KSNODETYPE_DSS_AUDIO);\n#define KSNODETYPE_DSS_AUDIO DEFINE_GUIDNAMED(KSNODETYPE_DSS_AUDIO)\n\n#define STATIC_KSNODETYPE_RADIO_RECEIVER\t\t\t\t\\\n\tDEFINE_USB_TERMINAL_GUID(0x0710)\nDEFINE_GUIDSTRUCT(\"DFF220F0-F70F-11D0-B917-00A0C9223196\",KSNODETYPE_RADIO_RECEIVER);\n#define KSNODETYPE_RADIO_RECEIVER DEFINE_GUIDNAMED(KSNODETYPE_RADIO_RECEIVER)\n\n#define STATIC_KSNODETYPE_RADIO_TRANSMITTER\t\t\t\t\\\n\tDEFINE_USB_TERMINAL_GUID(0x0711)\nDEFINE_GUIDSTRUCT(\"DFF220F1-F70F-11D0-B917-00A0C9223196\",KSNODETYPE_RADIO_TRANSMITTER);\n#define KSNODETYPE_RADIO_TRANSMITTER DEFINE_GUIDNAMED(KSNODETYPE_RADIO_TRANSMITTER)\n\n#define STATIC_KSNODETYPE_MULTITRACK_RECORDER\t\t\t\t\\\n\tDEFINE_USB_TERMINAL_GUID(0x0712)\nDEFINE_GUIDSTRUCT(\"DFF220F2-F70F-11D0-B917-00A0C9223196\",KSNODETYPE_MULTITRACK_RECORDER);\n#define KSNODETYPE_MULTITRACK_RECORDER DEFINE_GUIDNAMED(KSNODETYPE_MULTITRACK_RECORDER)\n\n#define STATIC_KSNODETYPE_SYNTHESIZER\t\t\t\t\t\\\n\tDEFINE_USB_TERMINAL_GUID(0x0713)\nDEFINE_GUIDSTRUCT(\"DFF220F3-F70F-11D0-B917-00A0C9223196\",KSNODETYPE_SYNTHESIZER);\n#define KSNODETYPE_SYNTHESIZER DEFINE_GUIDNAMED(KSNODETYPE_SYNTHESIZER)\n\n#define STATIC_KSNODETYPE_SWSYNTH\t\t\t\t\t\\\n\t0x423274A0L,0x8B81,0x11D1,0xA0,0x50,0x00,0x00,0xF8,0x00,0x47,0x88\nDEFINE_GUIDSTRUCT(\"423274A0-8B81-11D1-A050-0000F8004788\",KSNODETYPE_SWSYNTH);\n#define KSNODETYPE_SWSYNTH DEFINE_GUIDNAMED(KSNODETYPE_SWSYNTH)\n\n#define STATIC_KSNODETYPE_SWMIDI\t\t\t\t\t\\\n\t0xCB9BEFA0L,0xA251,0x11D1,0xA0,0x50,0x00,0x00,0xF8,0x00,0x47,0x88\nDEFINE_GUIDSTRUCT(\"CB9BEFA0-A251-11D1-A050-0000F8004788\",KSNODETYPE_SWMIDI);\n#define KSNODETYPE_SWMIDI DEFINE_GUIDNAMED(KSNODETYPE_SWMIDI)\n\n#define STATIC_KSNODETYPE_DRM_DESCRAMBLE\t\t\t\t\\\n\t0xFFBB6E3FL,0xCCFE,0x4D84,0x90,0xD9,0x42,0x14,0x18,0xB0,0x3A,0x8E\nDEFINE_GUIDSTRUCT(\"FFBB6E3F-CCFE-4D84-90D9-421418B03A8E\",KSNODETYPE_DRM_DESCRAMBLE);\n#define KSNODETYPE_DRM_DESCRAMBLE DEFINE_GUIDNAMED(KSNODETYPE_DRM_DESCRAMBLE)\n\n#define STATIC_KSCATEGORY_AUDIO\t\t\t\t\t\t\\\n\t0x6994AD04L,0x93EF,0x11D0,0xA3,0xCC,0x00,0xA0,0xC9,0x22,0x31,0x96\nDEFINE_GUIDSTRUCT(\"6994AD04-93EF-11D0-A3CC-00A0C9223196\",KSCATEGORY_AUDIO);\n#define KSCATEGORY_AUDIO DEFINE_GUIDNAMED(KSCATEGORY_AUDIO)\n\n#define STATIC_KSCATEGORY_VIDEO\t\t\t\t\t\t\\\n\t0x6994AD05L,0x93EF,0x11D0,0xA3,0xCC,0x00,0xA0,0xC9,0x22,0x31,0x96\nDEFINE_GUIDSTRUCT(\"6994AD05-93EF-11D0-A3CC-00A0C9223196\",KSCATEGORY_VIDEO);\n#define KSCATEGORY_VIDEO DEFINE_GUIDNAMED(KSCATEGORY_VIDEO)\n\n/* Added for Vista and later */\n#define STATIC_KSCATEGORY_REALTIME \\\n    0xEB115FFCL, 0x10C8, 0x4964, 0x83, 0x1D, 0x6D, 0xCB, 0x02, 0xE6, 0xF2, 0x3F\nDEFINE_GUIDSTRUCT(\"EB115FFC-10C8-4964-831D-6DCB02E6F23F\", KSCATEGORY_REALTIME);\n#define KSCATEGORY_REALTIME DEFINE_GUIDNAMED(KSCATEGORY_REALTIME)\n\n#define STATIC_KSCATEGORY_TEXT\t\t\t\t\t\t\\\n\t0x6994AD06L,0x93EF,0x11D0,0xA3,0xCC,0x00,0xA0,0xC9,0x22,0x31,0x96\nDEFINE_GUIDSTRUCT(\"6994AD06-93EF-11D0-A3CC-00A0C9223196\",KSCATEGORY_TEXT);\n#define KSCATEGORY_TEXT DEFINE_GUIDNAMED(KSCATEGORY_TEXT)\n\n#define STATIC_KSCATEGORY_NETWORK\t\t\t\t\t\\\n\t0x67C9CC3CL,0x69C4,0x11D2,0x87,0x59,0x00,0xA0,0xC9,0x22,0x31,0x96\nDEFINE_GUIDSTRUCT(\"67C9CC3C-69C4-11D2-8759-00A0C9223196\",KSCATEGORY_NETWORK);\n#define KSCATEGORY_NETWORK DEFINE_GUIDNAMED(KSCATEGORY_NETWORK)\n\n#define STATIC_KSCATEGORY_TOPOLOGY\t\t\t\t\t\\\n\t0xDDA54A40L,0x1E4C,0x11D1,0xA0,0x50,0x40,0x57,0x05,0xC1,0x00,0x00\nDEFINE_GUIDSTRUCT(\"DDA54A40-1E4C-11D1-A050-405705C10000\",KSCATEGORY_TOPOLOGY);\n#define KSCATEGORY_TOPOLOGY DEFINE_GUIDNAMED(KSCATEGORY_TOPOLOGY)\n\n#define STATIC_KSCATEGORY_VIRTUAL\t\t\t\t\t\\\n\t0x3503EAC4L,0x1F26,0x11D1,0x8A,0xB0,0x00,0xA0,0xC9,0x22,0x31,0x96\nDEFINE_GUIDSTRUCT(\"3503EAC4-1F26-11D1-8AB0-00A0C9223196\",KSCATEGORY_VIRTUAL);\n#define KSCATEGORY_VIRTUAL DEFINE_GUIDNAMED(KSCATEGORY_VIRTUAL)\n\n#define STATIC_KSCATEGORY_ACOUSTIC_ECHO_CANCEL\t\t\t\t\\\n\t0xBF963D80L,0xC559,0x11D0,0x8A,0x2B,0x00,0xA0,0xC9,0x25,0x5A,0xC1\nDEFINE_GUIDSTRUCT(\"BF963D80-C559-11D0-8A2B-00A0C9255AC1\",KSCATEGORY_ACOUSTIC_ECHO_CANCEL);\n#define KSCATEGORY_ACOUSTIC_ECHO_CANCEL DEFINE_GUIDNAMED(KSCATEGORY_ACOUSTIC_ECHO_CANCEL)\n\n#define STATIC_KSCATEGORY_SYSAUDIO\t\t\t\t\t\\\n\t0xA7C7A5B1L,0x5AF3,0x11D1,0x9C,0xED,0x00,0xA0,0x24,0xBF,0x04,0x07\nDEFINE_GUIDSTRUCT(\"A7C7A5B1-5AF3-11D1-9CED-00A024BF0407\",KSCATEGORY_SYSAUDIO);\n#define KSCATEGORY_SYSAUDIO DEFINE_GUIDNAMED(KSCATEGORY_SYSAUDIO)\n\n#define STATIC_KSCATEGORY_WDMAUD\t\t\t\t\t\\\n\t0x3E227E76L,0x690D,0x11D2,0x81,0x61,0x00,0x00,0xF8,0x77,0x5B,0xF1\nDEFINE_GUIDSTRUCT(\"3E227E76-690D-11D2-8161-0000F8775BF1\",KSCATEGORY_WDMAUD);\n#define KSCATEGORY_WDMAUD DEFINE_GUIDNAMED(KSCATEGORY_WDMAUD)\n\n#define STATIC_KSCATEGORY_AUDIO_GFX\t\t\t\t\t\\\n\t0x9BAF9572L,0x340C,0x11D3,0xAB,0xDC,0x00,0xA0,0xC9,0x0A,0xB1,0x6F\nDEFINE_GUIDSTRUCT(\"9BAF9572-340C-11D3-ABDC-00A0C90AB16F\",KSCATEGORY_AUDIO_GFX);\n#define KSCATEGORY_AUDIO_GFX DEFINE_GUIDNAMED(KSCATEGORY_AUDIO_GFX)\n\n#define STATIC_KSCATEGORY_AUDIO_SPLITTER\t\t\t\t\\\n\t0x9EA331FAL,0xB91B,0x45F8,0x92,0x85,0xBD,0x2B,0xC7,0x7A,0xFC,0xDE\nDEFINE_GUIDSTRUCT(\"9EA331FA-B91B-45F8-9285-BD2BC77AFCDE\",KSCATEGORY_AUDIO_SPLITTER);\n#define KSCATEGORY_AUDIO_SPLITTER DEFINE_GUIDNAMED(KSCATEGORY_AUDIO_SPLITTER)\n\n#define STATIC_KSCATEGORY_SYNTHESIZER\t\tSTATIC_KSNODETYPE_SYNTHESIZER\n#define KSCATEGORY_SYNTHESIZER\t\t\tKSNODETYPE_SYNTHESIZER\n\n#define STATIC_KSCATEGORY_DRM_DESCRAMBLE\tSTATIC_KSNODETYPE_DRM_DESCRAMBLE\n#define KSCATEGORY_DRM_DESCRAMBLE\t\tKSNODETYPE_DRM_DESCRAMBLE\n\n#define STATIC_KSCATEGORY_AUDIO_DEVICE\t\t\t\t\t\\\n\t0xFBF6F530L,0x07B9,0x11D2,0xA7,0x1E,0x00,0x00,0xF8,0x00,0x47,0x88\nDEFINE_GUIDSTRUCT(\"FBF6F530-07B9-11D2-A71E-0000F8004788\",KSCATEGORY_AUDIO_DEVICE);\n#define KSCATEGORY_AUDIO_DEVICE DEFINE_GUIDNAMED(KSCATEGORY_AUDIO_DEVICE)\n\n#define STATIC_KSCATEGORY_PREFERRED_WAVEOUT_DEVICE\t\t\t\\\n\t0xD6C5066EL,0x72C1,0x11D2,0x97,0x55,0x00,0x00,0xF8,0x00,0x47,0x88\nDEFINE_GUIDSTRUCT(\"D6C5066E-72C1-11D2-9755-0000F8004788\",KSCATEGORY_PREFERRED_WAVEOUT_DEVICE);\n#define KSCATEGORY_PREFERRED_WAVEOUT_DEVICE DEFINE_GUIDNAMED(KSCATEGORY_PREFERRED_WAVEOUT_DEVICE)\n\n#define STATIC_KSCATEGORY_PREFERRED_WAVEIN_DEVICE\t\t\t\\\n\t0xD6C50671L,0x72C1,0x11D2,0x97,0x55,0x00,0x00,0xF8,0x00,0x47,0x88\nDEFINE_GUIDSTRUCT(\"D6C50671-72C1-11D2-9755-0000F8004788\",KSCATEGORY_PREFERRED_WAVEIN_DEVICE);\n#define KSCATEGORY_PREFERRED_WAVEIN_DEVICE DEFINE_GUIDNAMED(KSCATEGORY_PREFERRED_WAVEIN_DEVICE)\n\n#define STATIC_KSCATEGORY_PREFERRED_MIDIOUT_DEVICE\t\t\t\\\n\t0xD6C50674L,0x72C1,0x11D2,0x97,0x55,0x00,0x00,0xF8,0x00,0x47,0x88\nDEFINE_GUIDSTRUCT(\"D6C50674-72C1-11D2-9755-0000F8004788\",KSCATEGORY_PREFERRED_MIDIOUT_DEVICE);\n#define KSCATEGORY_PREFERRED_MIDIOUT_DEVICE DEFINE_GUIDNAMED(KSCATEGORY_PREFERRED_MIDIOUT_DEVICE)\n\n#define STATIC_KSCATEGORY_WDMAUD_USE_PIN_NAME\t\t\t\t\\\n\t0x47A4FA20L,0xA251,0x11D1,0xA0,0x50,0x00,0x00,0xF8,0x00,0x47,0x88\nDEFINE_GUIDSTRUCT(\"47A4FA20-A251-11D1-A050-0000F8004788\",KSCATEGORY_WDMAUD_USE_PIN_NAME);\n#define KSCATEGORY_WDMAUD_USE_PIN_NAME DEFINE_GUIDNAMED(KSCATEGORY_WDMAUD_USE_PIN_NAME)\n\n#define STATIC_KSCATEGORY_ESCALANTE_PLATFORM_DRIVER\t\t\t\\\n\t0x74f3aea8L,0x9768,0x11d1,0x8e,0x07,0x00,0xa0,0xc9,0x5e,0xc2,0x2e\nDEFINE_GUIDSTRUCT(\"74f3aea8-9768-11d1-8e07-00a0c95ec22e\",KSCATEGORY_ESCALANTE_PLATFORM_DRIVER);\n#define KSCATEGORY_ESCALANTE_PLATFORM_DRIVER DEFINE_GUIDNAMED(KSCATEGORY_ESCALANTE_PLATFORM_DRIVER)\n\n#define STATIC_KSDATAFORMAT_TYPE_VIDEO\t\t\t\t\t\\\n\t0x73646976L,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71\nDEFINE_GUIDSTRUCT(\"73646976-0000-0010-8000-00aa00389b71\",KSDATAFORMAT_TYPE_VIDEO);\n#define KSDATAFORMAT_TYPE_VIDEO DEFINE_GUIDNAMED(KSDATAFORMAT_TYPE_VIDEO)\n\n#define STATIC_KSDATAFORMAT_TYPE_AUDIO\t\t\t\t\t\\\n\t0x73647561L,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71\nDEFINE_GUIDSTRUCT(\"73647561-0000-0010-8000-00aa00389b71\",KSDATAFORMAT_TYPE_AUDIO);\n#define KSDATAFORMAT_TYPE_AUDIO DEFINE_GUIDNAMED(KSDATAFORMAT_TYPE_AUDIO)\n\n#define STATIC_KSDATAFORMAT_TYPE_TEXT\t\t\t\t\t\\\n\t0x73747874L,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71\nDEFINE_GUIDSTRUCT(\"73747874-0000-0010-8000-00aa00389b71\",KSDATAFORMAT_TYPE_TEXT);\n#define KSDATAFORMAT_TYPE_TEXT DEFINE_GUIDNAMED(KSDATAFORMAT_TYPE_TEXT)\n\n#if !defined(DEFINE_WAVEFORMATEX_GUID)\n#define DEFINE_WAVEFORMATEX_GUID(x)\t\t\t\t\t\\\n\t(USHORT)(x),0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71\n#endif\n\n#define STATIC_KSDATAFORMAT_SUBTYPE_WAVEFORMATEX\t\t\t\\\n\t0x00000000L,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71\nDEFINE_GUIDSTRUCT(\"00000000-0000-0010-8000-00aa00389b71\",KSDATAFORMAT_SUBTYPE_WAVEFORMATEX);\n#define KSDATAFORMAT_SUBTYPE_WAVEFORMATEX DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_WAVEFORMATEX)\n\n#define INIT_WAVEFORMATEX_GUID(Guid,x)\t\t\t\t\t\\\n{\t\t\t\t\t\t\t\t\t\\\n\t*(Guid) = KSDATAFORMAT_SUBTYPE_WAVEFORMATEX;\t\t\t\\\n\t(Guid)->Data1 = (USHORT)(x);\t\t\t\t\t\\\n}\n\n#define EXTRACT_WAVEFORMATEX_ID(Guid)\t\t\t\t\t\\\n\t(USHORT)((Guid)->Data1)\n\n#define IS_VALID_WAVEFORMATEX_GUID(Guid)\t\t\t\t\\\n\t(!memcmp(((PUSHORT)&KSDATAFORMAT_SUBTYPE_WAVEFORMATEX) + 1, ((PUSHORT)(Guid)) + 1,sizeof(GUID) - sizeof(USHORT)))\n\n#ifndef INIT_MMREG_MID\n#define INIT_MMREG_MID(guid,id)\t\t\t\t\t\t\\\n{\t\t\t\t\t\t\t\t\t\\\n\t(guid)->Data1 = 0xd5a47fa7 + (USHORT)(id);\t\t\t\\\n\t(guid)->Data2 = 0x6d98;\t\t\t\t\t\t\\\n\t(guid)->Data3 = 0x11d1;\t\t\t\t\t\t\\\n\t(guid)->Data4[0] = 0xa2;\t\t\t\t\t\\\n\t(guid)->Data4[1] = 0x1a;\t\t\t\t\t\\\n\t(guid)->Data4[2] = 0x00;\t\t\t\t\t\\\n\t(guid)->Data4[3] = 0xa0;\t\t\t\t\t\\\n\t(guid)->Data4[4] = 0xc9;\t\t\t\t\t\\\n\t(guid)->Data4[5] = 0x22;\t\t\t\t\t\\\n\t(guid)->Data4[6] = 0x31;\t\t\t\t\t\\\n\t(guid)->Data4[7] = 0x96;\t\t\t\t\t\\\n}\n#define EXTRACT_MMREG_MID(guid)\t\t\t\t\t\t\\\n\t(USHORT)((guid)->Data1 - 0xd5a47fa7)\n#define DEFINE_MMREG_MID_GUID(id)\t\t\t\t\t\\\n\t0xd5a47fa7+(USHORT)(id),0x6d98,0x11d1,0xa2,0x1a,0x00,0xa0,0xc9,0x22,0x31,0x96\n\n#define IS_COMPATIBLE_MMREG_MID(guid)\t\t\t\t\t\\\n\t(((guid)->Data1 >= 0xd5a47fa7) &&\t\t\t\t\\\n\t ((guid)->Data1 < 0xd5a47fa7 + 0xffff) &&\t\t\t\\\n\t ((guid)->Data2 == 0x6d98) &&\t\t\t\t\t\\\n\t ((guid)->Data3 == 0x11d1) &&\t\t\t\t\t\\\n\t ((guid)->Data4[0] == 0xa2) &&\t\t\t\t\t\\\n\t ((guid)->Data4[1] == 0x1a) &&\t\t\t\t\t\\\n\t ((guid)->Data4[2] == 0x00) &&\t\t\t\t\t\\\n\t ((guid)->Data4[3] == 0xa0) &&\t\t\t\t\t\\\n\t ((guid)->Data4[4] == 0xc9) &&\t\t\t\t\t\\\n\t ((guid)->Data4[5] == 0x22) &&\t\t\t\t\t\\\n\t ((guid)->Data4[6] == 0x31) &&\t\t\t\t\t\\\n\t ((guid)->Data4[7] == 0x96) )\n#endif /* INIT_MMREG_MID */\n\n#ifndef INIT_MMREG_PID\n#define INIT_MMREG_PID(guid,id)\t\t\t\t\t\t\\\n{\t\t\t\t\t\t\t\t\t\\\n\t(guid)->Data1 = 0xe36dc2ac + (USHORT)(id);\t\t\t\\\n\t(guid)->Data2 = 0x6d9a;\t\t\t\t\t\t\\\n\t(guid)->Data3 = 0x11d1;\t\t\t\t\t\t\\\n\t(guid)->Data4[0] = 0xa2;\t\t\t\t\t\\\n\t(guid)->Data4[1] = 0x1a;\t\t\t\t\t\\\n\t(guid)->Data4[2] = 0x00;\t\t\t\t\t\\\n\t(guid)->Data4[3] = 0xa0;\t\t\t\t\t\\\n\t(guid)->Data4[4] = 0xc9;\t\t\t\t\t\\\n\t(guid)->Data4[5] = 0x22;\t\t\t\t\t\\\n\t(guid)->Data4[6] = 0x31;\t\t\t\t\t\\\n\t(guid)->Data4[7] = 0x96;\t\t\t\t\t\\\n}\n#define EXTRACT_MMREG_PID(guid)\t\t\t\t\t\t\\\n\t(USHORT)((guid)->Data1 - 0xe36dc2ac)\n#define DEFINE_MMREG_PID_GUID(id)\t\t\t\t\t\\\n\t0xe36dc2ac+(USHORT)(id),0x6d9a,0x11d1,0xa2,0x1a,0x00,0xa0,0xc9,0x22,0x31,0x96\n\n#define IS_COMPATIBLE_MMREG_PID(guid)\t\t\t\t\t\\\n\t(((guid)->Data1 >= 0xe36dc2ac) &&\t\t\t\t\\\n\t ((guid)->Data1 < 0xe36dc2ac + 0xffff) &&\t\t\t\\\n\t ((guid)->Data2 == 0x6d9a) &&\t\t\t\t\t\\\n\t ((guid)->Data3 == 0x11d1) &&\t\t\t\t\t\\\n\t ((guid)->Data4[0] == 0xa2) &&\t\t\t\t\t\\\n\t ((guid)->Data4[1] == 0x1a) &&\t\t\t\t\t\\\n\t ((guid)->Data4[2] == 0x00) &&\t\t\t\t\t\\\n\t ((guid)->Data4[3] == 0xa0) &&\t\t\t\t\t\\\n\t ((guid)->Data4[4] == 0xc9) &&\t\t\t\t\t\\\n\t ((guid)->Data4[5] == 0x22) &&\t\t\t\t\t\\\n\t ((guid)->Data4[6] == 0x31) &&\t\t\t\t\t\\\n\t ((guid)->Data4[7] == 0x96) )\n#endif /* INIT_MMREG_PID */\n\n#define STATIC_KSDATAFORMAT_SUBTYPE_ANALOG\t\t\t\t\\\n\t0x6dba3190L,0x67bd,0x11cf,0xa0,0xf7,0x00,0x20,0xaf,0xd1,0x56,0xe4\nDEFINE_GUIDSTRUCT(\"6dba3190-67bd-11cf-a0f7-0020afd156e4\",KSDATAFORMAT_SUBTYPE_ANALOG);\n#define KSDATAFORMAT_SUBTYPE_ANALOG DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_ANALOG)\n\n#define STATIC_KSDATAFORMAT_SUBTYPE_PCM\t\t\t\t\t\\\n\tDEFINE_WAVEFORMATEX_GUID(WAVE_FORMAT_PCM)\nDEFINE_GUIDSTRUCT(\"00000001-0000-0010-8000-00aa00389b71\",KSDATAFORMAT_SUBTYPE_PCM);\n#define KSDATAFORMAT_SUBTYPE_PCM DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_PCM)\n\n#ifdef _INC_MMREG\n#define STATIC_KSDATAFORMAT_SUBTYPE_IEEE_FLOAT\t\t\t\t\\\n\tDEFINE_WAVEFORMATEX_GUID(WAVE_FORMAT_IEEE_FLOAT)\nDEFINE_GUIDSTRUCT(\"00000003-0000-0010-8000-00aa00389b71\",KSDATAFORMAT_SUBTYPE_IEEE_FLOAT);\n#define KSDATAFORMAT_SUBTYPE_IEEE_FLOAT DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_IEEE_FLOAT)\n\n#define STATIC_KSDATAFORMAT_SUBTYPE_DRM\t\t\t\t\t\\\n\tDEFINE_WAVEFORMATEX_GUID(WAVE_FORMAT_DRM)\nDEFINE_GUIDSTRUCT(\"00000009-0000-0010-8000-00aa00389b71\",KSDATAFORMAT_SUBTYPE_DRM);\n#define KSDATAFORMAT_SUBTYPE_DRM DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_DRM)\n\n#define STATIC_KSDATAFORMAT_SUBTYPE_ALAW\t\t\t\t\\\n\tDEFINE_WAVEFORMATEX_GUID(WAVE_FORMAT_ALAW)\nDEFINE_GUIDSTRUCT(\"00000006-0000-0010-8000-00aa00389b71\",KSDATAFORMAT_SUBTYPE_ALAW);\n#define KSDATAFORMAT_SUBTYPE_ALAW DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_ALAW)\n\n#define STATIC_KSDATAFORMAT_SUBTYPE_MULAW\t\t\t\t\\\n\tDEFINE_WAVEFORMATEX_GUID(WAVE_FORMAT_MULAW)\nDEFINE_GUIDSTRUCT(\"00000007-0000-0010-8000-00aa00389b71\",KSDATAFORMAT_SUBTYPE_MULAW);\n#define KSDATAFORMAT_SUBTYPE_MULAW DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_MULAW)\n\n#define STATIC_KSDATAFORMAT_SUBTYPE_ADPCM\t\t\t\t\\\n\tDEFINE_WAVEFORMATEX_GUID(WAVE_FORMAT_ADPCM)\nDEFINE_GUIDSTRUCT(\"00000002-0000-0010-8000-00aa00389b71\",KSDATAFORMAT_SUBTYPE_ADPCM);\n#define KSDATAFORMAT_SUBTYPE_ADPCM DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_ADPCM)\n\n#define STATIC_KSDATAFORMAT_SUBTYPE_MPEG\t\t\t\t\\\n\tDEFINE_WAVEFORMATEX_GUID(WAVE_FORMAT_MPEG)\nDEFINE_GUIDSTRUCT(\"00000050-0000-0010-8000-00aa00389b71\",KSDATAFORMAT_SUBTYPE_MPEG);\n#define KSDATAFORMAT_SUBTYPE_MPEG DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_MPEG)\n#endif /* _INC_MMREG */\n\n#define STATIC_KSDATAFORMAT_SPECIFIER_VC_ID\t\t\t\t\\\n\t0xAD98D184L,0xAAC3,0x11D0,0xA4,0x1C,0x00,0xA0,0xC9,0x22,0x31,0x96\nDEFINE_GUIDSTRUCT(\"AD98D184-AAC3-11D0-A41C-00A0C9223196\",KSDATAFORMAT_SPECIFIER_VC_ID);\n#define KSDATAFORMAT_SPECIFIER_VC_ID DEFINE_GUIDNAMED(KSDATAFORMAT_SPECIFIER_VC_ID)\n\n#define STATIC_KSDATAFORMAT_SPECIFIER_WAVEFORMATEX\t\t\t\\\n\t0x05589f81L,0xc356,0x11ce,0xbf,0x01,0x00,0xaa,0x00,0x55,0x59,0x5a\nDEFINE_GUIDSTRUCT(\"05589f81-c356-11ce-bf01-00aa0055595a\",KSDATAFORMAT_SPECIFIER_WAVEFORMATEX);\n#define KSDATAFORMAT_SPECIFIER_WAVEFORMATEX DEFINE_GUIDNAMED(KSDATAFORMAT_SPECIFIER_WAVEFORMATEX)\n\n#define STATIC_KSDATAFORMAT_SPECIFIER_DSOUND\t\t\t\t\\\n\t0x518590a2L,0xa184,0x11d0,0x85,0x22,0x00,0xc0,0x4f,0xd9,0xba,0xf3\nDEFINE_GUIDSTRUCT(\"518590a2-a184-11d0-8522-00c04fd9baf3\",KSDATAFORMAT_SPECIFIER_DSOUND);\n#define KSDATAFORMAT_SPECIFIER_DSOUND DEFINE_GUIDNAMED(KSDATAFORMAT_SPECIFIER_DSOUND)\n\n#if defined(_INC_MMSYSTEM) || defined(_INC_MMREG)\n#if !defined(PACK_PRAGMAS_NOT_SUPPORTED)\n#include <pshpack1.h>\n#endif\ntypedef struct {\n  KSDATAFORMAT DataFormat;\n  WAVEFORMATEX WaveFormatEx;\n} KSDATAFORMAT_WAVEFORMATEX,*PKSDATAFORMAT_WAVEFORMATEX;\n\n#ifndef _WAVEFORMATEXTENSIBLE_\n#define _WAVEFORMATEXTENSIBLE_\ntypedef struct {\n  WAVEFORMATEX Format;\n  union {\n    WORD wValidBitsPerSample;\n    WORD wSamplesPerBlock;\n    WORD wReserved;\n  } Samples;\n  DWORD dwChannelMask;\n\n  GUID SubFormat;\n} WAVEFORMATEXTENSIBLE,*PWAVEFORMATEXTENSIBLE;\n#endif /* _WAVEFORMATEXTENSIBLE_ */\n\n#if !defined(WAVE_FORMAT_EXTENSIBLE)\n#define WAVE_FORMAT_EXTENSIBLE\t\t\t0xFFFE\n#endif\n\ntypedef struct {\n  ULONG Flags;\n  ULONG Control;\n  WAVEFORMATEX WaveFormatEx;\n} KSDSOUND_BUFFERDESC,*PKSDSOUND_BUFFERDESC;\n\ntypedef struct {\n  KSDATAFORMAT DataFormat;\n  KSDSOUND_BUFFERDESC BufferDesc;\n} KSDATAFORMAT_DSOUND,*PKSDATAFORMAT_DSOUND;\n\n#if !defined(PACK_PRAGMAS_NOT_SUPPORTED)\n#include <poppack.h>\n#endif\n#endif /* defined(_INC_MMSYSTEM) || defined(_INC_MMREG) */\n\n#define KSDSOUND_BUFFER_PRIMARY\t\t\t0x00000001\n#define KSDSOUND_BUFFER_STATIC\t\t\t0x00000002\n#define KSDSOUND_BUFFER_LOCHARDWARE\t\t0x00000004\n#define KSDSOUND_BUFFER_LOCSOFTWARE\t\t0x00000008\n\n#define KSDSOUND_BUFFER_CTRL_3D\t\t\t0x00000001\n#define KSDSOUND_BUFFER_CTRL_FREQUENCY\t\t0x00000002\n#define KSDSOUND_BUFFER_CTRL_PAN\t\t0x00000004\n#define KSDSOUND_BUFFER_CTRL_VOLUME\t\t0x00000008\n#define KSDSOUND_BUFFER_CTRL_POSITIONNOTIFY\t0x00000010\n\ntypedef struct {\n  DWORDLONG PlayOffset;\n  DWORDLONG WriteOffset;\n} KSAUDIO_POSITION,*PKSAUDIO_POSITION;\n\ntypedef struct _DS3DVECTOR {\n  __MINGW_EXTENSION union {\n    FLOAT x;\n    FLOAT dvX;\n  };\n  __MINGW_EXTENSION union {\n    FLOAT y;\n    FLOAT dvY;\n  };\n  __MINGW_EXTENSION union {\n    FLOAT z;\n    FLOAT dvZ;\n  };\n} DS3DVECTOR,*PDS3DVECTOR;\n\n#define STATIC_KSPROPSETID_DirectSound3DListener\t\t\t\\\n\t0x437b3414L,0xd060,0x11d0,0x85,0x83,0x00,0xc0,0x4f,0xd9,0xba,0xf3\nDEFINE_GUIDSTRUCT(\"437b3414-d060-11d0-8583-00c04fd9baf3\",KSPROPSETID_DirectSound3DListener);\n#define KSPROPSETID_DirectSound3DListener DEFINE_GUIDNAMED(KSPROPSETID_DirectSound3DListener)\n\ntypedef enum {\n  KSPROPERTY_DIRECTSOUND3DLISTENER_ALL,\n  KSPROPERTY_DIRECTSOUND3DLISTENER_POSITION,\n  KSPROPERTY_DIRECTSOUND3DLISTENER_VELOCITY,\n  KSPROPERTY_DIRECTSOUND3DLISTENER_ORIENTATION,\n  KSPROPERTY_DIRECTSOUND3DLISTENER_DISTANCEFACTOR,\n  KSPROPERTY_DIRECTSOUND3DLISTENER_ROLLOFFFACTOR,\n  KSPROPERTY_DIRECTSOUND3DLISTENER_DOPPLERFACTOR,\n  KSPROPERTY_DIRECTSOUND3DLISTENER_BATCH,\n  KSPROPERTY_DIRECTSOUND3DLISTENER_ALLOCATION\n} KSPROPERTY_DIRECTSOUND3DLISTENER;\n\ntypedef struct {\n  DS3DVECTOR Position;\n  DS3DVECTOR Velocity;\n  DS3DVECTOR OrientFront;\n  DS3DVECTOR OrientTop;\n  FLOAT DistanceFactor;\n  FLOAT RolloffFactor;\n  FLOAT DopplerFactor;\n} KSDS3D_LISTENER_ALL,*PKSDS3D_LISTENER_ALL;\n\ntypedef struct {\n  DS3DVECTOR Front;\n  DS3DVECTOR Top;\n} KSDS3D_LISTENER_ORIENTATION,*PKSDS3D_LISTENER_ORIENTATION;\n\n#define STATIC_KSPROPSETID_DirectSound3DBuffer\t\t\t\t\\\n\t0x437b3411L,0xd060,0x11d0,0x85,0x83,0x00,0xc0,0x4f,0xd9,0xba,0xf3\nDEFINE_GUIDSTRUCT(\"437b3411-d060-11d0-8583-00c04fd9baf3\",KSPROPSETID_DirectSound3DBuffer);\n#define KSPROPSETID_DirectSound3DBuffer DEFINE_GUIDNAMED(KSPROPSETID_DirectSound3DBuffer)\n\ntypedef enum {\n  KSPROPERTY_DIRECTSOUND3DBUFFER_ALL,\n  KSPROPERTY_DIRECTSOUND3DBUFFER_POSITION,\n  KSPROPERTY_DIRECTSOUND3DBUFFER_VELOCITY,\n  KSPROPERTY_DIRECTSOUND3DBUFFER_CONEANGLES,\n  KSPROPERTY_DIRECTSOUND3DBUFFER_CONEORIENTATION,\n  KSPROPERTY_DIRECTSOUND3DBUFFER_CONEOUTSIDEVOLUME,\n  KSPROPERTY_DIRECTSOUND3DBUFFER_MINDISTANCE,\n  KSPROPERTY_DIRECTSOUND3DBUFFER_MAXDISTANCE,\n  KSPROPERTY_DIRECTSOUND3DBUFFER_MODE\n} KSPROPERTY_DIRECTSOUND3DBUFFER;\n\ntypedef struct {\n  DS3DVECTOR Position;\n  DS3DVECTOR Velocity;\n  ULONG InsideConeAngle;\n  ULONG OutsideConeAngle;\n  DS3DVECTOR ConeOrientation;\n  LONG ConeOutsideVolume;\n  FLOAT MinDistance;\n  FLOAT MaxDistance;\n  ULONG Mode;\n} KSDS3D_BUFFER_ALL,*PKSDS3D_BUFFER_ALL;\n\ntypedef struct {\n  ULONG InsideConeAngle;\n  ULONG OutsideConeAngle;\n} KSDS3D_BUFFER_CONE_ANGLES,*PKSDS3D_BUFFER_CONE_ANGLES;\n\n#define KSAUDIO_STEREO_SPEAKER_GEOMETRY_HEADPHONE\t(-1)\n#define KSAUDIO_STEREO_SPEAKER_GEOMETRY_MIN\t\t5\n#define KSAUDIO_STEREO_SPEAKER_GEOMETRY_NARROW\t\t10\n#define KSAUDIO_STEREO_SPEAKER_GEOMETRY_WIDE\t\t20\n#define KSAUDIO_STEREO_SPEAKER_GEOMETRY_MAX\t\t180\n\n#define KSDSOUND_3D_MODE_NORMAL\t\t\t0x00000000\n#define KSDSOUND_3D_MODE_HEADRELATIVE\t\t0x00000001\n#define KSDSOUND_3D_MODE_DISABLE\t\t0x00000002\n\n#define KSDSOUND_BUFFER_CTRL_HRTF_3D\t\t0x40000000\n\ntypedef struct {\n  ULONG Size;\n  ULONG Enabled;\n  WINBOOL SwapChannels;\n  WINBOOL ZeroAzimuth;\n  WINBOOL CrossFadeOutput;\n  ULONG FilterSize;\n} KSDS3D_HRTF_PARAMS_MSG,*PKSDS3D_HRTF_PARAMS_MSG;\n\ntypedef enum {\n  FULL_FILTER,\n  LIGHT_FILTER,\n  KSDS3D_FILTER_QUALITY_COUNT\n} KSDS3D_HRTF_FILTER_QUALITY;\n\ntypedef struct {\n  ULONG Size;\n  KSDS3D_HRTF_FILTER_QUALITY Quality;\n  FLOAT SampleRate;\n  ULONG MaxFilterSize;\n  ULONG FilterTransientMuteLength;\n  ULONG FilterOverlapBufferLength;\n  ULONG OutputOverlapBufferLength;\n  ULONG Reserved;\n} KSDS3D_HRTF_INIT_MSG,*PKSDS3D_HRTF_INIT_MSG;\n\ntypedef enum {\n  FLOAT_COEFF,\n  SHORT_COEFF,\n  KSDS3D_COEFF_COUNT\n} KSDS3D_HRTF_COEFF_FORMAT;\n\ntypedef enum {\n  DIRECT_FORM,\n  CASCADE_FORM,\n  KSDS3D_FILTER_METHOD_COUNT\n} KSDS3D_HRTF_FILTER_METHOD;\n\ntypedef enum {\n  DS3D_HRTF_VERSION_1\n} KSDS3D_HRTF_FILTER_VERSION;\n\ntypedef struct {\n  KSDS3D_HRTF_FILTER_METHOD FilterMethod;\n  KSDS3D_HRTF_COEFF_FORMAT CoeffFormat;\n  KSDS3D_HRTF_FILTER_VERSION Version;\n  ULONG Reserved;\n} KSDS3D_HRTF_FILTER_FORMAT_MSG,*PKSDS3D_HRTF_FILTER_FORMAT_MSG;\n\n#define STATIC_KSPROPSETID_Hrtf3d\t\t\t\t\t\\\n\t0xb66decb0L,0xa083,0x11d0,0x85,0x1e,0x00,0xc0,0x4f,0xd9,0xba,0xf3\nDEFINE_GUIDSTRUCT(\"b66decb0-a083-11d0-851e-00c04fd9baf3\",KSPROPSETID_Hrtf3d);\n#define KSPROPSETID_Hrtf3d DEFINE_GUIDNAMED(KSPROPSETID_Hrtf3d)\n\ntypedef enum {\n  KSPROPERTY_HRTF3D_PARAMS = 0,\n  KSPROPERTY_HRTF3D_INITIALIZE,\n  KSPROPERTY_HRTF3D_FILTER_FORMAT\n} KSPROPERTY_HRTF3D;\n\ntypedef struct {\n  LONG Channel;\n  FLOAT VolSmoothScale;\n  FLOAT TotalDryAttenuation;\n  FLOAT TotalWetAttenuation;\n  LONG SmoothFrequency;\n  LONG Delay;\n} KSDS3D_ITD_PARAMS,*PKSDS3D_ITD_PARAMS;\n\ntypedef struct {\n  ULONG Enabled;\n  KSDS3D_ITD_PARAMS LeftParams;\n  KSDS3D_ITD_PARAMS RightParams;\n  ULONG Reserved;\n} KSDS3D_ITD_PARAMS_MSG,*PKSDS3D_ITD_PARAMS_MSG;\n\n#define STATIC_KSPROPSETID_Itd3d\t\t\t\t\t\\\n\t0x6429f090L,0x9fd9,0x11d0,0xa7,0x5b,0x00,0xa0,0xc9,0x03,0x65,0xe3\nDEFINE_GUIDSTRUCT(\"6429f090-9fd9-11d0-a75b-00a0c90365e3\",KSPROPSETID_Itd3d);\n#define KSPROPSETID_Itd3d DEFINE_GUIDNAMED(KSPROPSETID_Itd3d)\n\ntypedef enum {\n  KSPROPERTY_ITD3D_PARAMS = 0\n} KSPROPERTY_ITD3D;\n\ntypedef struct {\n  KSDATARANGE DataRange;\n  ULONG MaximumChannels;\n  ULONG MinimumBitsPerSample;\n  ULONG MaximumBitsPerSample;\n  ULONG MinimumSampleFrequency;\n  ULONG MaximumSampleFrequency;\n} KSDATARANGE_AUDIO,*PKSDATARANGE_AUDIO;\n\n#define STATIC_KSDATAFORMAT_SUBTYPE_RIFF\t\t\t\t\\\n\t0x4995DAEEL,0x9EE6,0x11D0,0xA4,0x0E,0x00,0xA0,0xC9,0x22,0x31,0x96\nDEFINE_GUIDSTRUCT(\"4995DAEE-9EE6-11D0-A40E-00A0C9223196\",KSDATAFORMAT_SUBTYPE_RIFF);\n#define KSDATAFORMAT_SUBTYPE_RIFF DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_RIFF)\n\n#define STATIC_KSDATAFORMAT_SUBTYPE_RIFFWAVE\t\t\t\t\\\n\t0xe436eb8bL,0x524f,0x11ce,0x9f,0x53,0x00,0x20,0xaf,0x0b,0xa7,0x70\nDEFINE_GUIDSTRUCT(\"e436eb8b-524f-11ce-9f53-0020af0ba770\",KSDATAFORMAT_SUBTYPE_RIFFWAVE);\n#define KSDATAFORMAT_SUBTYPE_RIFFWAVE DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_RIFFWAVE)\n\n#define STATIC_KSPROPSETID_Bibliographic\t\t\t\t\\\n\t0x07BA150EL,0xE2B1,0x11D0,0xAC,0x17,0x00,0xA0,0xC9,0x22,0x31,0x96\nDEFINE_GUIDSTRUCT(\"07BA150E-E2B1-11D0-AC17-00A0C9223196\",KSPROPSETID_Bibliographic);\n#define KSPROPSETID_Bibliographic DEFINE_GUIDNAMED(KSPROPSETID_Bibliographic)\n\ntypedef enum {\n  KSPROPERTY_BIBLIOGRAPHIC_LEADER = 'RDL ',\n  KSPROPERTY_BIBLIOGRAPHIC_LCCN = '010 ',\n  KSPROPERTY_BIBLIOGRAPHIC_ISBN = '020 ',\n  KSPROPERTY_BIBLIOGRAPHIC_ISSN = '220 ',\n  KSPROPERTY_BIBLIOGRAPHIC_CATALOGINGSOURCE = '040 ',\n  KSPROPERTY_BIBLIOGRAPHIC_MAINPERSONALNAME = '001 ',\n  KSPROPERTY_BIBLIOGRAPHIC_MAINCORPORATEBODY = '011 ',\n  KSPROPERTY_BIBLIOGRAPHIC_MAINMEETINGNAME = '111 ',\n  KSPROPERTY_BIBLIOGRAPHIC_MAINUNIFORMTITLE = '031 ',\n  KSPROPERTY_BIBLIOGRAPHIC_UNIFORMTITLE = '042 ',\n  KSPROPERTY_BIBLIOGRAPHIC_TITLESTATEMENT = '542 ',\n  KSPROPERTY_BIBLIOGRAPHIC_VARYINGFORMTITLE = '642 ',\n  KSPROPERTY_BIBLIOGRAPHIC_PUBLICATION = '062 ',\n  KSPROPERTY_BIBLIOGRAPHIC_PHYSICALDESCRIPTION = '003 ',\n  KSPROPERTY_BIBLIOGRAPHIC_ADDEDENTRYTITLE = '044 ',\n  KSPROPERTY_BIBLIOGRAPHIC_SERIESSTATEMENT = '094 ',\n  KSPROPERTY_BIBLIOGRAPHIC_GENERALNOTE = '005 ',\n  KSPROPERTY_BIBLIOGRAPHIC_BIBLIOGRAPHYNOTE = '405 ',\n  KSPROPERTY_BIBLIOGRAPHIC_CONTENTSNOTE = '505 ',\n  KSPROPERTY_BIBLIOGRAPHIC_CREATIONCREDIT = '805 ',\n  KSPROPERTY_BIBLIOGRAPHIC_CITATION = '015 ',\n  KSPROPERTY_BIBLIOGRAPHIC_PARTICIPANT = '115 ',\n  KSPROPERTY_BIBLIOGRAPHIC_SUMMARY = '025 ',\n  KSPROPERTY_BIBLIOGRAPHIC_TARGETAUDIENCE = '125 ',\n  KSPROPERTY_BIBLIOGRAPHIC_ADDEDFORMAVAILABLE = '035 ',\n  KSPROPERTY_BIBLIOGRAPHIC_SYSTEMDETAILS = '835 ',\n  KSPROPERTY_BIBLIOGRAPHIC_AWARDS = '685 ',\n  KSPROPERTY_BIBLIOGRAPHIC_ADDEDENTRYPERSONALNAME = '006 ',\n  KSPROPERTY_BIBLIOGRAPHIC_ADDEDENTRYTOPICALTERM = '056 ',\n  KSPROPERTY_BIBLIOGRAPHIC_ADDEDENTRYGEOGRAPHIC = '156 ',\n  KSPROPERTY_BIBLIOGRAPHIC_INDEXTERMGENRE = '556 ',\n  KSPROPERTY_BIBLIOGRAPHIC_INDEXTERMCURRICULUM = '856 ',\n  KSPROPERTY_BIBLIOGRAPHIC_ADDEDENTRYUNIFORMTITLE = '037 ',\n  KSPROPERTY_BIBLIOGRAPHIC_ADDEDENTRYRELATED = '047 ',\n  KSPROPERTY_BIBLIOGRAPHIC_SERIESSTATEMENTPERSONALNAME = '008 ',\n  KSPROPERTY_BIBLIOGRAPHIC_SERIESSTATEMENTUNIFORMTITLE = '038 '\n} KSPROPERTY_BIBLIOGRAPHIC;\n\n#define STATIC_KSPROPSETID_TopologyNode\t\t\t\t\t\\\n\t0x45FFAAA1L,0x6E1B,0x11D0,0xBC,0xF2,0x44,0x45,0x53,0x54,0x00,0x00\nDEFINE_GUIDSTRUCT(\"45FFAAA1-6E1B-11D0-BCF2-444553540000\",KSPROPSETID_TopologyNode);\n#define KSPROPSETID_TopologyNode DEFINE_GUIDNAMED(KSPROPSETID_TopologyNode)\n\ntypedef enum {\n  KSPROPERTY_TOPOLOGYNODE_ENABLE = 1,\n  KSPROPERTY_TOPOLOGYNODE_RESET\n} KSPROPERTY_TOPOLOGYNODE;\n\n#define STATIC_KSPROPSETID_RtAudio\t\t\t\t\t\\\n\t0xa855a48c,0x2f78,0x4729,0x90,0x51,0x19,0x68,0x74,0x6b,0x9e,0xef\nDEFINE_GUIDSTRUCT(\"A855A48C-2F78-4729-9051-1968746B9EEF\",KSPROPSETID_RtAudio);\n#define KSPROPSETID_RtAudio DEFINE_GUIDNAMED(KSPROPSETID_RtAudio)\n\ntypedef enum {\n  KSPROPERTY_RTAUDIO_GETPOSITIONFUNCTION,\n  /* Added for Vista and later */\n  KSPROPERTY_RTAUDIO_BUFFER,\n  KSPROPERTY_RTAUDIO_HWLATENCY,\n  KSPROPERTY_RTAUDIO_POSITIONREGISTER,\n  KSPROPERTY_RTAUDIO_CLOCKREGISTER,\n  KSPROPERTY_RTAUDIO_BUFFER_WITH_NOTIFICATION,\n  KSPROPERTY_RTAUDIO_REGISTER_NOTIFICATION_EVENT,\n  KSPROPERTY_RTAUDIO_UNREGISTER_NOTIFICATION_EVENT\n} KSPROPERTY_RTAUDIO;\n\n#define STATIC_KSPROPSETID_DrmAudioStream\t\t\t\t\\\n\t0x2f2c8ddd,0x4198,0x4fac,0xba,0x29,0x61,0xbb,0x5,0xb7,0xde,0x6\nDEFINE_GUIDSTRUCT(\"2F2C8DDD-4198-4fac-BA29-61BB05B7DE06\",KSPROPSETID_DrmAudioStream);\n#define KSPROPSETID_DrmAudioStream DEFINE_GUIDNAMED(KSPROPSETID_DrmAudioStream)\n\ntypedef enum {\n  KSPROPERTY_DRMAUDIOSTREAM_CONTENTID\n} KSPROPERTY_DRMAUDIOSTREAM;\n\n#define STATIC_KSPROPSETID_Audio\t\t\t\t\t\\\n\t0x45FFAAA0L,0x6E1B,0x11D0,0xBC,0xF2,0x44,0x45,0x53,0x54,0x00,0x00\nDEFINE_GUIDSTRUCT(\"45FFAAA0-6E1B-11D0-BCF2-444553540000\",KSPROPSETID_Audio);\n#define KSPROPSETID_Audio DEFINE_GUIDNAMED(KSPROPSETID_Audio)\n\ntypedef enum {\n  KSPROPERTY_AUDIO_LATENCY = 1,\n  KSPROPERTY_AUDIO_COPY_PROTECTION,\n  KSPROPERTY_AUDIO_CHANNEL_CONFIG,\n  KSPROPERTY_AUDIO_VOLUMELEVEL,\n  KSPROPERTY_AUDIO_POSITION,\n  KSPROPERTY_AUDIO_DYNAMIC_RANGE,\n  KSPROPERTY_AUDIO_QUALITY,\n  KSPROPERTY_AUDIO_SAMPLING_RATE,\n  KSPROPERTY_AUDIO_DYNAMIC_SAMPLING_RATE,\n  KSPROPERTY_AUDIO_MIX_LEVEL_TABLE,\n  KSPROPERTY_AUDIO_MIX_LEVEL_CAPS,\n  KSPROPERTY_AUDIO_MUX_SOURCE,\n  KSPROPERTY_AUDIO_MUTE,\n  KSPROPERTY_AUDIO_BASS,\n  KSPROPERTY_AUDIO_MID,\n  KSPROPERTY_AUDIO_TREBLE,\n  KSPROPERTY_AUDIO_BASS_BOOST,\n  KSPROPERTY_AUDIO_EQ_LEVEL,\n  KSPROPERTY_AUDIO_NUM_EQ_BANDS,\n  KSPROPERTY_AUDIO_EQ_BANDS,\n  KSPROPERTY_AUDIO_AGC,\n  KSPROPERTY_AUDIO_DELAY,\n  KSPROPERTY_AUDIO_LOUDNESS,\n  KSPROPERTY_AUDIO_WIDE_MODE,\n  KSPROPERTY_AUDIO_WIDENESS,\n  KSPROPERTY_AUDIO_REVERB_LEVEL,\n  KSPROPERTY_AUDIO_CHORUS_LEVEL,\n  KSPROPERTY_AUDIO_DEV_SPECIFIC,\n  KSPROPERTY_AUDIO_DEMUX_DEST,\n  KSPROPERTY_AUDIO_STEREO_ENHANCE,\n  KSPROPERTY_AUDIO_MANUFACTURE_GUID,\n  KSPROPERTY_AUDIO_PRODUCT_GUID,\n  KSPROPERTY_AUDIO_CPU_RESOURCES,\n  KSPROPERTY_AUDIO_STEREO_SPEAKER_GEOMETRY,\n  KSPROPERTY_AUDIO_SURROUND_ENCODE,\n  KSPROPERTY_AUDIO_3D_INTERFACE,\n  KSPROPERTY_AUDIO_PEAKMETER,\n  KSPROPERTY_AUDIO_ALGORITHM_INSTANCE,\n  KSPROPERTY_AUDIO_FILTER_STATE,\n  KSPROPERTY_AUDIO_PREFERRED_STATUS\n} KSPROPERTY_AUDIO;\n\n#define KSAUDIO_QUALITY_WORST\t\t\t0x0\n#define KSAUDIO_QUALITY_PC\t\t\t0x1\n#define KSAUDIO_QUALITY_BASIC\t\t\t0x2\n#define KSAUDIO_QUALITY_ADVANCED\t\t0x3\n\n#define KSAUDIO_CPU_RESOURCES_NOT_HOST_CPU\t0x00000000\n#define KSAUDIO_CPU_RESOURCES_HOST_CPU\t\t0x7FFFFFFF\n\ntypedef struct {\n  WINBOOL fCopyrighted;\n  WINBOOL fOriginal;\n} KSAUDIO_COPY_PROTECTION,*PKSAUDIO_COPY_PROTECTION;\n\ntypedef struct {\n  LONG ActiveSpeakerPositions;\n} KSAUDIO_CHANNEL_CONFIG,*PKSAUDIO_CHANNEL_CONFIG;\n\n#define SPEAKER_FRONT_LEFT\t\t0x1\n#define SPEAKER_FRONT_RIGHT\t\t0x2\n#define SPEAKER_FRONT_CENTER\t\t0x4\n#define SPEAKER_LOW_FREQUENCY\t\t0x8\n#define SPEAKER_BACK_LEFT\t\t0x10\n#define SPEAKER_BACK_RIGHT\t\t0x20\n#define SPEAKER_FRONT_LEFT_OF_CENTER\t0x40\n#define SPEAKER_FRONT_RIGHT_OF_CENTER\t0x80\n#define SPEAKER_BACK_CENTER\t\t0x100\n#define SPEAKER_SIDE_LEFT\t\t0x200\n#define SPEAKER_SIDE_RIGHT\t\t0x400\n#define SPEAKER_TOP_CENTER\t\t0x800\n#define SPEAKER_TOP_FRONT_LEFT\t\t0x1000\n#define SPEAKER_TOP_FRONT_CENTER\t0x2000\n#define SPEAKER_TOP_FRONT_RIGHT\t\t0x4000\n#define SPEAKER_TOP_BACK_LEFT\t\t0x8000\n#define SPEAKER_TOP_BACK_CENTER\t\t0x10000\n#define SPEAKER_TOP_BACK_RIGHT\t\t0x20000\n\n#define SPEAKER_RESERVED\t\t0x7FFC0000\n\n#define SPEAKER_ALL\t\t\t0x80000000\n\n#define KSAUDIO_SPEAKER_DIRECTOUT\t0\n#define KSAUDIO_SPEAKER_MONO\t\t(SPEAKER_FRONT_CENTER)\n#define KSAUDIO_SPEAKER_STEREO\t\t(SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT)\n#define KSAUDIO_SPEAKER_QUAD\t\t(SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT |\t\t\\\n\t\t\t\t\t SPEAKER_BACK_LEFT | SPEAKER_BACK_RIGHT)\n#define KSAUDIO_SPEAKER_SURROUND\t(SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT |\t\t\\\n\t\t\t\t\t SPEAKER_FRONT_CENTER | SPEAKER_BACK_CENTER)\n#define KSAUDIO_SPEAKER_5POINT1\t\t(SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT |\t\t\\\n\t\t\t\t\t SPEAKER_FRONT_CENTER | SPEAKER_LOW_FREQUENCY |\t\t\\\n\t\t\t\t\t SPEAKER_BACK_LEFT | SPEAKER_BACK_RIGHT)\n#define KSAUDIO_SPEAKER_7POINT1\t\t(SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT |\t\t\\\n\t\t\t\t\t SPEAKER_FRONT_CENTER | SPEAKER_LOW_FREQUENCY |\t\t\\\n\t\t\t\t\t SPEAKER_BACK_LEFT | SPEAKER_BACK_RIGHT |\t\t\\\n\t\t\t\t\t SPEAKER_FRONT_LEFT_OF_CENTER | SPEAKER_FRONT_RIGHT_OF_CENTER)\n#define KSAUDIO_SPEAKER_5POINT1_SURROUND (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT |\t\t\\\n\t\t\t\t\t  SPEAKER_FRONT_CENTER | SPEAKER_LOW_FREQUENCY |\t\\\n\t\t\t\t\t  SPEAKER_SIDE_LEFT | SPEAKER_SIDE_RIGHT)\n#define KSAUDIO_SPEAKER_7POINT1_SURROUND (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT |\t\t\\\n\t\t\t\t\t  SPEAKER_FRONT_CENTER | SPEAKER_LOW_FREQUENCY |\t\\\n\t\t\t\t\t  SPEAKER_BACK_LEFT | SPEAKER_BACK_RIGHT |\t\t\\\n\t\t\t\t\t  SPEAKER_SIDE_LEFT | SPEAKER_SIDE_RIGHT)\n\n#define KSAUDIO_SPEAKER_5POINT1_BACK\tKSAUDIO_SPEAKER_5POINT1\n#define KSAUDIO_SPEAKER_7POINT1_WIDE\tKSAUDIO_SPEAKER_7POINT1\n\n#define KSAUDIO_SPEAKER_GROUND_FRONT_LEFT\tSPEAKER_FRONT_LEFT\n#define KSAUDIO_SPEAKER_GROUND_FRONT_CENTER\tSPEAKER_FRONT_CENTER\n#define KSAUDIO_SPEAKER_GROUND_FRONT_RIGHT\tSPEAKER_FRONT_RIGHT\n#define KSAUDIO_SPEAKER_GROUND_REAR_LEFT\tSPEAKER_BACK_LEFT\n#define KSAUDIO_SPEAKER_GROUND_REAR_RIGHT\tSPEAKER_BACK_RIGHT\n#define KSAUDIO_SPEAKER_TOP_MIDDLE\t\tSPEAKER_TOP_CENTER\n#define KSAUDIO_SPEAKER_SUPER_WOOFER\t\tSPEAKER_LOW_FREQUENCY\n\ntypedef struct {\n  ULONG QuietCompression;\n  ULONG LoudCompression;\n} KSAUDIO_DYNAMIC_RANGE,*PKSAUDIO_DYNAMIC_RANGE;\n\ntypedef struct {\n  WINBOOL Mute;\n  LONG Level;\n} KSAUDIO_MIXLEVEL,*PKSAUDIO_MIXLEVEL;\n\ntypedef struct {\n  WINBOOL Mute;\n  LONG Minimum;\n  LONG Maximum;\n  LONG Reset;\n} KSAUDIO_MIX_CAPS,*PKSAUDIO_MIX_CAPS;\n\ntypedef struct {\n  ULONG InputChannels;\n  ULONG OutputChannels;\n  KSAUDIO_MIX_CAPS Capabilities[1];\n} KSAUDIO_MIXCAP_TABLE,*PKSAUDIO_MIXCAP_TABLE;\n\ntypedef enum {\n  SE_TECH_NONE,\n  SE_TECH_ANALOG_DEVICES_PHAT,\n  SE_TECH_CREATIVE,\n  SE_TECH_NATIONAL_SEMI,\n  SE_TECH_YAMAHA_YMERSION,\n  SE_TECH_BBE,\n  SE_TECH_CRYSTAL_SEMI,\n  SE_TECH_QSOUND_QXPANDER,\n  SE_TECH_SPATIALIZER,\n  SE_TECH_SRS,\n  SE_TECH_PLATFORM_TECH,\n  SE_TECH_AKM,\n  SE_TECH_AUREAL,\n  SE_TECH_AZTECH,\n  SE_TECH_BINAURA,\n  SE_TECH_ESS_TECH,\n  SE_TECH_HARMAN_VMAX,\n  SE_TECH_NVIDEA,\n  SE_TECH_PHILIPS_INCREDIBLE,\n  SE_TECH_TEXAS_INST,\n  SE_TECH_VLSI_TECH\n} SE_TECHNIQUE;\n\ntypedef struct {\n  SE_TECHNIQUE Technique;\n  ULONG Center;\n  ULONG Depth;\n  ULONG Reserved;\n} KSAUDIO_STEREO_ENHANCE,*PKSAUDIO_STEREO_ENHANCE;\n\ntypedef enum {\n  KSPROPERTY_SYSAUDIO_NORMAL_DEFAULT = 0,\n  KSPROPERTY_SYSAUDIO_PLAYBACK_DEFAULT,\n  KSPROPERTY_SYSAUDIO_RECORD_DEFAULT,\n  KSPROPERTY_SYSAUDIO_MIDI_DEFAULT,\n  KSPROPERTY_SYSAUDIO_MIXER_DEFAULT\n} KSPROPERTY_SYSAUDIO_DEFAULT_TYPE;\n\ntypedef struct {\n  WINBOOL Enable;\n  KSPROPERTY_SYSAUDIO_DEFAULT_TYPE DeviceType;\n  ULONG Flags;\n  ULONG Reserved;\n} KSAUDIO_PREFERRED_STATUS,*PKSAUDIO_PREFERRED_STATUS;\n\n#define STATIC_KSNODETYPE_DAC\t\t\t\t\t\t\\\n\t0x507AE360L,0xC554,0x11D0,0x8A,0x2B,0x00,0xA0,0xC9,0x25,0x5A,0xC1\nDEFINE_GUIDSTRUCT(\"507AE360-C554-11D0-8A2B-00A0C9255AC1\",KSNODETYPE_DAC);\n#define KSNODETYPE_DAC DEFINE_GUIDNAMED(KSNODETYPE_DAC)\n\n#define STATIC_KSNODETYPE_ADC\t\t\t\t\t\t\\\n\t0x4D837FE0L,0xC555,0x11D0,0x8A,0x2B,0x00,0xA0,0xC9,0x25,0x5A,0xC1\nDEFINE_GUIDSTRUCT(\"4D837FE0-C555-11D0-8A2B-00A0C9255AC1\",KSNODETYPE_ADC);\n#define KSNODETYPE_ADC DEFINE_GUIDNAMED(KSNODETYPE_ADC)\n\n#define STATIC_KSNODETYPE_SRC\t\t\t\t\t\t\\\n\t0x9DB7B9E0L,0xC555,0x11D0,0x8A,0x2B,0x00,0xA0,0xC9,0x25,0x5A,0xC1\nDEFINE_GUIDSTRUCT(\"9DB7B9E0-C555-11D0-8A2B-00A0C9255AC1\",KSNODETYPE_SRC);\n#define KSNODETYPE_SRC DEFINE_GUIDNAMED(KSNODETYPE_SRC)\n\n#define STATIC_KSNODETYPE_SUPERMIX\t\t\t\t\t\\\n\t0xE573ADC0L,0xC555,0x11D0,0x8A,0x2B,0x00,0xA0,0xC9,0x25,0x5A,0xC1\nDEFINE_GUIDSTRUCT(\"E573ADC0-C555-11D0-8A2B-00A0C9255AC1\",KSNODETYPE_SUPERMIX);\n#define KSNODETYPE_SUPERMIX DEFINE_GUIDNAMED(KSNODETYPE_SUPERMIX)\n\n#define STATIC_KSNODETYPE_MUX\t\t\t\t\t\t\\\n\t0x2CEAF780L,0xC556,0x11D0,0x8A,0x2B,0x00,0xA0,0xC9,0x25,0x5A,0xC1\nDEFINE_GUIDSTRUCT(\"2CEAF780-C556-11D0-8A2B-00A0C9255AC1\",KSNODETYPE_MUX);\n#define KSNODETYPE_MUX DEFINE_GUIDNAMED(KSNODETYPE_MUX)\n\n#define STATIC_KSNODETYPE_DEMUX\t\t\t\t\t\t\\\n\t0xC0EB67D4L,0xE807,0x11D0,0x95,0x8A,0x00,0xC0,0x4F,0xB9,0x25,0xD3\nDEFINE_GUIDSTRUCT(\"C0EB67D4-E807-11D0-958A-00C04FB925D3\",KSNODETYPE_DEMUX);\n#define KSNODETYPE_DEMUX DEFINE_GUIDNAMED(KSNODETYPE_DEMUX)\n\n#define STATIC_KSNODETYPE_SUM\t\t\t\t\t\t\\\n\t0xDA441A60L,0xC556,0x11D0,0x8A,0x2B,0x00,0xA0,0xC9,0x25,0x5A,0xC1\nDEFINE_GUIDSTRUCT(\"DA441A60-C556-11D0-8A2B-00A0C9255AC1\",KSNODETYPE_SUM);\n#define KSNODETYPE_SUM DEFINE_GUIDNAMED(KSNODETYPE_SUM)\n\n#define STATIC_KSNODETYPE_MUTE\t\t\t\t\t\t\\\n\t0x02B223C0L,0xC557,0x11D0,0x8A,0x2B,0x00,0xA0,0xC9,0x25,0x5A,0xC1\nDEFINE_GUIDSTRUCT(\"02B223C0-C557-11D0-8A2B-00A0C9255AC1\",KSNODETYPE_MUTE);\n#define KSNODETYPE_MUTE DEFINE_GUIDNAMED(KSNODETYPE_MUTE)\n\n#define STATIC_KSNODETYPE_VOLUME\t\t\t\t\t\\\n\t0x3A5ACC00L,0xC557,0x11D0,0x8A,0x2B,0x00,0xA0,0xC9,0x25,0x5A,0xC1\nDEFINE_GUIDSTRUCT(\"3A5ACC00-C557-11D0-8A2B-00A0C9255AC1\",KSNODETYPE_VOLUME);\n#define KSNODETYPE_VOLUME DEFINE_GUIDNAMED(KSNODETYPE_VOLUME)\n\n#define STATIC_KSNODETYPE_TONE\t\t\t\t\t\t\\\n\t0x7607E580L,0xC557,0x11D0,0x8A,0x2B,0x00,0xA0,0xC9,0x25,0x5A,0xC1\nDEFINE_GUIDSTRUCT(\"7607E580-C557-11D0-8A2B-00A0C9255AC1\",KSNODETYPE_TONE);\n#define KSNODETYPE_TONE DEFINE_GUIDNAMED(KSNODETYPE_TONE)\n\n#define STATIC_KSNODETYPE_EQUALIZER\t\t\t\t\t\\\n\t0x9D41B4A0L,0xC557,0x11D0,0x8A,0x2B,0x00,0xA0,0xC9,0x25,0x5A,0xC1\nDEFINE_GUIDSTRUCT(\"9D41B4A0-C557-11D0-8A2B-00A0C9255AC1\",KSNODETYPE_EQUALIZER);\n#define KSNODETYPE_EQUALIZER DEFINE_GUIDNAMED(KSNODETYPE_EQUALIZER)\n\n#define STATIC_KSNODETYPE_AGC\t\t\t\t\t\t\\\n\t0xE88C9BA0L,0xC557,0x11D0,0x8A,0x2B,0x00,0xA0,0xC9,0x25,0x5A,0xC1\nDEFINE_GUIDSTRUCT(\"E88C9BA0-C557-11D0-8A2B-00A0C9255AC1\",KSNODETYPE_AGC);\n#define KSNODETYPE_AGC DEFINE_GUIDNAMED(KSNODETYPE_AGC)\n\n#define STATIC_KSNODETYPE_NOISE_SUPPRESS\t\t\t\t\\\n\t0xe07f903f,0x62fd,0x4e60,0x8c,0xdd,0xde,0xa7,0x23,0x66,0x65,0xb5\nDEFINE_GUIDSTRUCT(\"E07F903F-62FD-4e60-8CDD-DEA7236665B5\",KSNODETYPE_NOISE_SUPPRESS);\n#define KSNODETYPE_NOISE_SUPPRESS DEFINE_GUIDNAMED(KSNODETYPE_NOISE_SUPPRESS)\n\n#define STATIC_KSNODETYPE_DELAY\t\t\t\t\t\t\\\n\t0x144981E0L,0xC558,0x11D0,0x8A,0x2B,0x00,0xA0,0xC9,0x25,0x5A,0xC1\nDEFINE_GUIDSTRUCT(\"144981E0-C558-11D0-8A2B-00A0C9255AC1\",KSNODETYPE_DELAY);\n#define KSNODETYPE_DELAY DEFINE_GUIDNAMED(KSNODETYPE_DELAY)\n\n#define STATIC_KSNODETYPE_LOUDNESS\t\t\t\t\t\\\n\t0x41887440L,0xC558,0x11D0,0x8A,0x2B,0x00,0xA0,0xC9,0x25,0x5A,0xC1\nDEFINE_GUIDSTRUCT(\"41887440-C558-11D0-8A2B-00A0C9255AC1\",KSNODETYPE_LOUDNESS);\n#define KSNODETYPE_LOUDNESS DEFINE_GUIDNAMED(KSNODETYPE_LOUDNESS)\n\n#define STATIC_KSNODETYPE_PROLOGIC_DECODER\t\t\t\t\\\n\t0x831C2C80L,0xC558,0x11D0,0x8A,0x2B,0x00,0xA0,0xC9,0x25,0x5A,0xC1\nDEFINE_GUIDSTRUCT(\"831C2C80-C558-11D0-8A2B-00A0C9255AC1\",KSNODETYPE_PROLOGIC_DECODER);\n#define KSNODETYPE_PROLOGIC_DECODER DEFINE_GUIDNAMED(KSNODETYPE_PROLOGIC_DECODER)\n\n#define STATIC_KSNODETYPE_STEREO_WIDE\t\t\t\t\t\\\n\t0xA9E69800L,0xC558,0x11D0,0x8A,0x2B,0x00,0xA0,0xC9,0x25,0x5A,0xC1\nDEFINE_GUIDSTRUCT(\"A9E69800-C558-11D0-8A2B-00A0C9255AC1\",KSNODETYPE_STEREO_WIDE);\n#define KSNODETYPE_STEREO_WIDE DEFINE_GUIDNAMED(KSNODETYPE_STEREO_WIDE)\n\n#define STATIC_KSNODETYPE_STEREO_ENHANCE\t\t\t\t\\\n\t0xAF6878ACL,0xE83F,0x11D0,0x95,0x8A,0x00,0xC0,0x4F,0xB9,0x25,0xD3\nDEFINE_GUIDSTRUCT(\"AF6878AC-E83F-11D0-958A-00C04FB925D3\",KSNODETYPE_STEREO_ENHANCE);\n#define KSNODETYPE_STEREO_ENHANCE DEFINE_GUIDNAMED(KSNODETYPE_STEREO_ENHANCE)\n\n#define STATIC_KSNODETYPE_REVERB\t\t\t\t\t\\\n\t0xEF0328E0L,0xC558,0x11D0,0x8A,0x2B,0x00,0xA0,0xC9,0x25,0x5A,0xC1\nDEFINE_GUIDSTRUCT(\"EF0328E0-C558-11D0-8A2B-00A0C9255AC1\",KSNODETYPE_REVERB);\n#define KSNODETYPE_REVERB DEFINE_GUIDNAMED(KSNODETYPE_REVERB)\n\n#define STATIC_KSNODETYPE_CHORUS\t\t\t\t\t\\\n\t0x20173F20L,0xC559,0x11D0,0x8A,0x2B,0x00,0xA0,0xC9,0x25,0x5A,0xC1\nDEFINE_GUIDSTRUCT(\"20173F20-C559-11D0-8A2B-00A0C9255AC1\",KSNODETYPE_CHORUS);\n#define KSNODETYPE_CHORUS DEFINE_GUIDNAMED(KSNODETYPE_CHORUS)\n\n#define STATIC_KSNODETYPE_3D_EFFECTS\t\t\t\t\t\\\n\t0x55515860L,0xC559,0x11D0,0x8A,0x2B,0x00,0xA0,0xC9,0x25,0x5A,0xC1\nDEFINE_GUIDSTRUCT(\"55515860-C559-11D0-8A2B-00A0C9255AC1\",KSNODETYPE_3D_EFFECTS);\n#define KSNODETYPE_3D_EFFECTS DEFINE_GUIDNAMED(KSNODETYPE_3D_EFFECTS)\n\n#define STATIC_KSNODETYPE_ACOUSTIC_ECHO_CANCEL STATIC_KSCATEGORY_ACOUSTIC_ECHO_CANCEL\n#define KSNODETYPE_ACOUSTIC_ECHO_CANCEL KSCATEGORY_ACOUSTIC_ECHO_CANCEL\n\n#define STATIC_KSALGORITHMINSTANCE_SYSTEM_ACOUSTIC_ECHO_CANCEL\t\t\\\n\t0x1c22c56dL,0x9879,0x4f5b,0xa3,0x89,0x27,0x99,0x6d,0xdc,0x28,0x10\nDEFINE_GUIDSTRUCT(\"1C22C56D-9879-4f5b-A389-27996DDC2810\",KSALGORITHMINSTANCE_SYSTEM_ACOUSTIC_ECHO_CANCEL);\n#define KSALGORITHMINSTANCE_SYSTEM_ACOUSTIC_ECHO_CANCEL DEFINE_GUIDNAMED(KSALGORITHMINSTANCE_SYSTEM_ACOUSTIC_ECHO_CANCEL)\n\n#define STATIC_KSALGORITHMINSTANCE_SYSTEM_NOISE_SUPPRESS\t\t\\\n\t0x5ab0882eL,0x7274,0x4516,0x87,0x7d,0x4e,0xee,0x99,0xba,0x4f,0xd0\nDEFINE_GUIDSTRUCT(\"5AB0882E-7274-4516-877D-4EEE99BA4FD0\",KSALGORITHMINSTANCE_SYSTEM_NOISE_SUPPRESS);\n#define KSALGORITHMINSTANCE_SYSTEM_NOISE_SUPPRESS DEFINE_GUIDNAMED(KSALGORITHMINSTANCE_SYSTEM_NOISE_SUPPRESS)\n\n#define STATIC_KSALGORITHMINSTANCE_SYSTEM_AGC\t\t\t\t\\\n\t0x950e55b9L,0x877c,0x4c67,0xbe,0x8,0xe4,0x7b,0x56,0x11,0x13,0xa\nDEFINE_GUIDSTRUCT(\"950E55B9-877C-4c67-BE08-E47B5611130A\",KSALGORITHMINSTANCE_SYSTEM_AGC);\n#define KSALGORITHMINSTANCE_SYSTEM_AGC DEFINE_GUIDNAMED(KSALGORITHMINSTANCE_SYSTEM_AGC)\n\n#define STATIC_KSALGORITHMINSTANCE_SYSTEM_MICROPHONE_ARRAY_PROCESSOR\t\\\n\t0xB6F5A0A0L,0x9E61,0x4F8C,0x91,0xE3,0x76,0xCF,0xF,0x3C,0x47,0x1F\nDEFINE_GUIDSTRUCT(\"B6F5A0A0-9E61-4f8c-91E3-76CF0F3C471F\",KSALGORITHMINSTANCE_SYSTEM_MICROPHONE_ARRAY_PROCESSOR);\n#define KSALGORITHMINSTANCE_SYSTEM_MICROPHONE_ARRAY_PROCESSOR DEFINE_GUIDNAMED(KSALGORITHMINSTANCE_SYSTEM_MICROPHONE_ARRAY_PROCESSOR)\n\n#define STATIC_KSNODETYPE_MICROPHONE_ARRAY_PROCESSOR STATIC_KSCATEGORY_MICROPHONE_ARRAY_PROCESSOR\n#define KSNODETYPE_MICROPHONE_ARRAY_PROCESSOR KSCATEGORY_MICROPHONE_ARRAY_PROCESSOR\n\n#define STATIC_KSNODETYPE_DEV_SPECIFIC\t\t\t\t\t\\\n\t0x941C7AC0L,0xC559,0x11D0,0x8A,0x2B,0x00,0xA0,0xC9,0x25,0x5A,0xC1\nDEFINE_GUIDSTRUCT(\"941C7AC0-C559-11D0-8A2B-00A0C9255AC1\",KSNODETYPE_DEV_SPECIFIC);\n#define KSNODETYPE_DEV_SPECIFIC DEFINE_GUIDNAMED(KSNODETYPE_DEV_SPECIFIC)\n\n#define STATIC_KSNODETYPE_PROLOGIC_ENCODER\t\t\t\t\\\n\t0x8074C5B2L,0x3C66,0x11D2,0xB4,0x5A,0x30,0x78,0x30,0x2C,0x20,0x30\nDEFINE_GUIDSTRUCT(\"8074C5B2-3C66-11D2-B45A-3078302C2030\",KSNODETYPE_PROLOGIC_ENCODER);\n#define KSNODETYPE_PROLOGIC_ENCODER DEFINE_GUIDNAMED(KSNODETYPE_PROLOGIC_ENCODER)\n#define KSNODETYPE_SURROUND_ENCODER KSNODETYPE_PROLOGIC_ENCODER\n\n#define STATIC_KSNODETYPE_PEAKMETER\t\t\t\t\t\\\n\t0xa085651eL,0x5f0d,0x4b36,0xa8,0x69,0xd1,0x95,0xd6,0xab,0x4b,0x9e\nDEFINE_GUIDSTRUCT(\"A085651E-5F0D-4b36-A869-D195D6AB4B9E\",KSNODETYPE_PEAKMETER);\n#define KSNODETYPE_PEAKMETER DEFINE_GUIDNAMED(KSNODETYPE_PEAKMETER)\n\n#define STATIC_KSAUDFNAME_BASS\t\t\t\t\t\t\\\n\t0x185FEDE0L,0x9905,0x11D1,0x95,0xA9,0x00,0xC0,0x4F,0xB9,0x25,0xD3\nDEFINE_GUIDSTRUCT(\"185FEDE0-9905-11D1-95A9-00C04FB925D3\",KSAUDFNAME_BASS);\n#define KSAUDFNAME_BASS DEFINE_GUIDNAMED(KSAUDFNAME_BASS)\n\n#define STATIC_KSAUDFNAME_TREBLE\t\t\t\t\t\\\n\t0x185FEDE1L,0x9905,0x11D1,0x95,0xA9,0x00,0xC0,0x4F,0xB9,0x25,0xD3\nDEFINE_GUIDSTRUCT(\"185FEDE1-9905-11D1-95A9-00C04FB925D3\",KSAUDFNAME_TREBLE);\n#define KSAUDFNAME_TREBLE DEFINE_GUIDNAMED(KSAUDFNAME_TREBLE)\n\n#define STATIC_KSAUDFNAME_3D_STEREO\t\t\t\t\t\\\n\t0x185FEDE2L,0x9905,0x11D1,0x95,0xA9,0x00,0xC0,0x4F,0xB9,0x25,0xD3\nDEFINE_GUIDSTRUCT(\"185FEDE2-9905-11D1-95A9-00C04FB925D3\",KSAUDFNAME_3D_STEREO);\n#define KSAUDFNAME_3D_STEREO DEFINE_GUIDNAMED(KSAUDFNAME_3D_STEREO)\n\n#define STATIC_KSAUDFNAME_MASTER_VOLUME\t\t\t\t\t\\\n\t0x185FEDE3L,0x9905,0x11D1,0x95,0xA9,0x00,0xC0,0x4F,0xB9,0x25,0xD3\nDEFINE_GUIDSTRUCT(\"185FEDE3-9905-11D1-95A9-00C04FB925D3\",KSAUDFNAME_MASTER_VOLUME);\n#define KSAUDFNAME_MASTER_VOLUME DEFINE_GUIDNAMED(KSAUDFNAME_MASTER_VOLUME)\n\n#define STATIC_KSAUDFNAME_MASTER_MUTE\t\t\t\t\t\\\n\t0x185FEDE4L,0x9905,0x11D1,0x95,0xA9,0x00,0xC0,0x4F,0xB9,0x25,0xD3\nDEFINE_GUIDSTRUCT(\"185FEDE4-9905-11D1-95A9-00C04FB925D3\",KSAUDFNAME_MASTER_MUTE);\n#define KSAUDFNAME_MASTER_MUTE DEFINE_GUIDNAMED(KSAUDFNAME_MASTER_MUTE)\n\n#define STATIC_KSAUDFNAME_WAVE_VOLUME\t\t\t\t\t\\\n\t0x185FEDE5L,0x9905,0x11D1,0x95,0xA9,0x00,0xC0,0x4F,0xB9,0x25,0xD3\nDEFINE_GUIDSTRUCT(\"185FEDE5-9905-11D1-95A9-00C04FB925D3\",KSAUDFNAME_WAVE_VOLUME);\n#define KSAUDFNAME_WAVE_VOLUME DEFINE_GUIDNAMED(KSAUDFNAME_WAVE_VOLUME)\n\n#define STATIC_KSAUDFNAME_WAVE_MUTE\t\t\t\t\t\\\n\t0x185FEDE6L,0x9905,0x11D1,0x95,0xA9,0x00,0xC0,0x4F,0xB9,0x25,0xD3\nDEFINE_GUIDSTRUCT(\"185FEDE6-9905-11D1-95A9-00C04FB925D3\",KSAUDFNAME_WAVE_MUTE);\n#define KSAUDFNAME_WAVE_MUTE DEFINE_GUIDNAMED(KSAUDFNAME_WAVE_MUTE)\n\n#define STATIC_KSAUDFNAME_MIDI_VOLUME\t\t\t\t\t\\\n\t0x185FEDE7L,0x9905,0x11D1,0x95,0xA9,0x00,0xC0,0x4F,0xB9,0x25,0xD3\nDEFINE_GUIDSTRUCT(\"185FEDE7-9905-11D1-95A9-00C04FB925D3\",KSAUDFNAME_MIDI_VOLUME);\n#define KSAUDFNAME_MIDI_VOLUME DEFINE_GUIDNAMED(KSAUDFNAME_MIDI_VOLUME)\n\n#define STATIC_KSAUDFNAME_MIDI_MUTE\t\t\t\t\t\\\n\t0x185FEDE8L,0x9905,0x11D1,0x95,0xA9,0x00,0xC0,0x4F,0xB9,0x25,0xD3\nDEFINE_GUIDSTRUCT(\"185FEDE8-9905-11D1-95A9-00C04FB925D3\",KSAUDFNAME_MIDI_MUTE);\n#define KSAUDFNAME_MIDI_MUTE DEFINE_GUIDNAMED(KSAUDFNAME_MIDI_MUTE)\n\n#define STATIC_KSAUDFNAME_CD_VOLUME\t\t\t\t\t\\\n\t0x185FEDE9L,0x9905,0x11D1,0x95,0xA9,0x00,0xC0,0x4F,0xB9,0x25,0xD3\nDEFINE_GUIDSTRUCT(\"185FEDE9-9905-11D1-95A9-00C04FB925D3\",KSAUDFNAME_CD_VOLUME);\n#define KSAUDFNAME_CD_VOLUME DEFINE_GUIDNAMED(KSAUDFNAME_CD_VOLUME)\n\n#define STATIC_KSAUDFNAME_CD_MUTE\t\t\t\t\t\\\n\t0x185FEDEAL,0x9905,0x11D1,0x95,0xA9,0x00,0xC0,0x4F,0xB9,0x25,0xD3\nDEFINE_GUIDSTRUCT(\"185FEDEA-9905-11D1-95A9-00C04FB925D3\",KSAUDFNAME_CD_MUTE);\n#define KSAUDFNAME_CD_MUTE DEFINE_GUIDNAMED(KSAUDFNAME_CD_MUTE)\n\n#define STATIC_KSAUDFNAME_LINE_VOLUME\t\t\t\t\t\\\n\t0x185FEDEBL,0x9905,0x11D1,0x95,0xA9,0x00,0xC0,0x4F,0xB9,0x25,0xD3\nDEFINE_GUIDSTRUCT(\"185FEDEB-9905-11D1-95A9-00C04FB925D3\",KSAUDFNAME_LINE_VOLUME);\n#define KSAUDFNAME_LINE_VOLUME DEFINE_GUIDNAMED(KSAUDFNAME_LINE_VOLUME)\n\n#define STATIC_KSAUDFNAME_LINE_MUTE\t\t\t\t\t\\\n\t0x185FEDECL,0x9905,0x11D1,0x95,0xA9,0x00,0xC0,0x4F,0xB9,0x25,0xD3\nDEFINE_GUIDSTRUCT(\"185FEDEC-9905-11D1-95A9-00C04FB925D3\",KSAUDFNAME_LINE_MUTE);\n#define KSAUDFNAME_LINE_MUTE DEFINE_GUIDNAMED(KSAUDFNAME_LINE_MUTE)\n\n#define STATIC_KSAUDFNAME_MIC_VOLUME\t\t\t\t\t\\\n\t0x185FEDEDL,0x9905,0x11D1,0x95,0xA9,0x00,0xC0,0x4F,0xB9,0x25,0xD3\nDEFINE_GUIDSTRUCT(\"185FEDED-9905-11D1-95A9-00C04FB925D3\",KSAUDFNAME_MIC_VOLUME);\n#define KSAUDFNAME_MIC_VOLUME DEFINE_GUIDNAMED(KSAUDFNAME_MIC_VOLUME)\n\n#define STATIC_KSAUDFNAME_MIC_MUTE\t\t\t\t\t\\\n\t0x185FEDEEL,0x9905,0x11D1,0x95,0xA9,0x00,0xC0,0x4F,0xB9,0x25,0xD3\nDEFINE_GUIDSTRUCT(\"185FEDEE-9905-11D1-95A9-00C04FB925D3\",KSAUDFNAME_MIC_MUTE);\n#define KSAUDFNAME_MIC_MUTE DEFINE_GUIDNAMED(KSAUDFNAME_MIC_MUTE)\n\n#define STATIC_KSAUDFNAME_RECORDING_SOURCE\t\t\t\t\\\n\t0x185FEDEFL,0x9905,0x11D1,0x95,0xA9,0x00,0xC0,0x4F,0xB9,0x25,0xD3\nDEFINE_GUIDSTRUCT(\"185FEDEF-9905-11D1-95A9-00C04FB925D3\",KSAUDFNAME_RECORDING_SOURCE);\n#define KSAUDFNAME_RECORDING_SOURCE DEFINE_GUIDNAMED(KSAUDFNAME_RECORDING_SOURCE)\n\n#define STATIC_KSAUDFNAME_PC_SPEAKER_VOLUME\t\t\t\t\\\n\t0x185FEDF0L,0x9905,0x11D1,0x95,0xA9,0x00,0xC0,0x4F,0xB9,0x25,0xD3\nDEFINE_GUIDSTRUCT(\"185FEDF0-9905-11D1-95A9-00C04FB925D3\",KSAUDFNAME_PC_SPEAKER_VOLUME);\n#define KSAUDFNAME_PC_SPEAKER_VOLUME DEFINE_GUIDNAMED(KSAUDFNAME_PC_SPEAKER_VOLUME)\n\n#define STATIC_KSAUDFNAME_PC_SPEAKER_MUTE\t\t\t\t\\\n\t0x185FEDF1L,0x9905,0x11D1,0x95,0xA9,0x00,0xC0,0x4F,0xB9,0x25,0xD3\nDEFINE_GUIDSTRUCT(\"185FEDF1-9905-11D1-95A9-00C04FB925D3\",KSAUDFNAME_PC_SPEAKER_MUTE);\n#define KSAUDFNAME_PC_SPEAKER_MUTE DEFINE_GUIDNAMED(KSAUDFNAME_PC_SPEAKER_MUTE)\n\n#define STATIC_KSAUDFNAME_MIDI_IN_VOLUME\t\t\t\t\\\n\t0x185FEDF2L,0x9905,0x11D1,0x95,0xA9,0x00,0xC0,0x4F,0xB9,0x25,0xD3\nDEFINE_GUIDSTRUCT(\"185FEDF2-9905-11D1-95A9-00C04FB925D3\",KSAUDFNAME_MIDI_IN_VOLUME);\n#define KSAUDFNAME_MIDI_IN_VOLUME DEFINE_GUIDNAMED(KSAUDFNAME_MIDI_IN_VOLUME)\n\n#define STATIC_KSAUDFNAME_CD_IN_VOLUME\t\t\t\t\t\\\n\t0x185FEDF3L,0x9905,0x11D1,0x95,0xA9,0x00,0xC0,0x4F,0xB9,0x25,0xD3\nDEFINE_GUIDSTRUCT(\"185FEDF3-9905-11D1-95A9-00C04FB925D3\",KSAUDFNAME_CD_IN_VOLUME);\n#define KSAUDFNAME_CD_IN_VOLUME DEFINE_GUIDNAMED(KSAUDFNAME_CD_IN_VOLUME)\n\n#define STATIC_KSAUDFNAME_LINE_IN_VOLUME\t\t\t\t\\\n\t0x185FEDF4L,0x9905,0x11D1,0x95,0xA9,0x00,0xC0,0x4F,0xB9,0x25,0xD3\nDEFINE_GUIDSTRUCT(\"185FEDF4-9905-11D1-95A9-00C04FB925D3\",KSAUDFNAME_LINE_IN_VOLUME);\n#define KSAUDFNAME_LINE_IN_VOLUME DEFINE_GUIDNAMED(KSAUDFNAME_LINE_IN_VOLUME)\n\n#define STATIC_KSAUDFNAME_MIC_IN_VOLUME\t\t\t\t\t\\\n\t0x185FEDF5L,0x9905,0x11D1,0x95,0xA9,0x00,0xC0,0x4F,0xB9,0x25,0xD3\nDEFINE_GUIDSTRUCT(\"185FEDF5-9905-11D1-95A9-00C04FB925D3\",KSAUDFNAME_MIC_IN_VOLUME);\n#define KSAUDFNAME_MIC_IN_VOLUME DEFINE_GUIDNAMED(KSAUDFNAME_MIC_IN_VOLUME)\n\n#define STATIC_KSAUDFNAME_WAVE_IN_VOLUME\t\t\t\t\\\n\t0x185FEDF6L,0x9905,0x11D1,0x95,0xA9,0x00,0xC0,0x4F,0xB9,0x25,0xD3\nDEFINE_GUIDSTRUCT(\"185FEDF6-9905-11D1-95A9-00C04FB925D3\",KSAUDFNAME_WAVE_IN_VOLUME);\n#define KSAUDFNAME_WAVE_IN_VOLUME DEFINE_GUIDNAMED(KSAUDFNAME_WAVE_IN_VOLUME)\n\n#define STATIC_KSAUDFNAME_VOLUME_CONTROL\t\t\t\t\\\n\t0x185FEDF7L,0x9905,0x11D1,0x95,0xA9,0x00,0xC0,0x4F,0xB9,0x25,0xD3\nDEFINE_GUIDSTRUCT(\"185FEDF7-9905-11D1-95A9-00C04FB925D3\",KSAUDFNAME_VOLUME_CONTROL);\n#define KSAUDFNAME_VOLUME_CONTROL DEFINE_GUIDNAMED(KSAUDFNAME_VOLUME_CONTROL)\n\n#define STATIC_KSAUDFNAME_MIDI\t\t\t\t\t\t\\\n\t0x185FEDF8L,0x9905,0x11D1,0x95,0xA9,0x00,0xC0,0x4F,0xB9,0x25,0xD3\nDEFINE_GUIDSTRUCT(\"185FEDF8-9905-11D1-95A9-00C04FB925D3\",KSAUDFNAME_MIDI);\n#define KSAUDFNAME_MIDI DEFINE_GUIDNAMED(KSAUDFNAME_MIDI)\n\n#define STATIC_KSAUDFNAME_LINE_IN\t\t\t\t\t\\\n\t0x185FEDF9L,0x9905,0x11D1,0x95,0xA9,0x00,0xC0,0x4F,0xB9,0x25,0xD3\nDEFINE_GUIDSTRUCT(\"185FEDF9-9905-11D1-95A9-00C04FB925D3\",KSAUDFNAME_LINE_IN);\n#define KSAUDFNAME_LINE_IN DEFINE_GUIDNAMED(KSAUDFNAME_LINE_IN)\n\n#define STATIC_KSAUDFNAME_RECORDING_CONTROL\t\t\t\t\\\n\t0x185FEDFAL,0x9905,0x11D1,0x95,0xA9,0x00,0xC0,0x4F,0xB9,0x25,0xD3\nDEFINE_GUIDSTRUCT(\"185FEDFA-9905-11D1-95A9-00C04FB925D3\",KSAUDFNAME_RECORDING_CONTROL);\n#define KSAUDFNAME_RECORDING_CONTROL DEFINE_GUIDNAMED(KSAUDFNAME_RECORDING_CONTROL)\n\n#define STATIC_KSAUDFNAME_CD_AUDIO\t\t\t\t\t\\\n\t0x185FEDFBL,0x9905,0x11D1,0x95,0xA9,0x00,0xC0,0x4F,0xB9,0x25,0xD3\nDEFINE_GUIDSTRUCT(\"185FEDFB-9905-11D1-95A9-00C04FB925D3\",KSAUDFNAME_CD_AUDIO);\n#define KSAUDFNAME_CD_AUDIO DEFINE_GUIDNAMED(KSAUDFNAME_CD_AUDIO)\n\n#define STATIC_KSAUDFNAME_AUX_VOLUME\t\t\t\t\t\\\n\t0x185FEDFCL,0x9905,0x11D1,0x95,0xA9,0x00,0xC0,0x4F,0xB9,0x25,0xD3\nDEFINE_GUIDSTRUCT(\"185FEDFC-9905-11D1-95A9-00C04FB925D3\",KSAUDFNAME_AUX_VOLUME);\n#define KSAUDFNAME_AUX_VOLUME DEFINE_GUIDNAMED(KSAUDFNAME_AUX_VOLUME)\n\n#define STATIC_KSAUDFNAME_AUX_MUTE\t\t\t\t\t\\\n\t0x185FEDFDL,0x9905,0x11D1,0x95,0xA9,0x00,0xC0,0x4F,0xB9,0x25,0xD3\nDEFINE_GUIDSTRUCT(\"185FEDFD-9905-11D1-95A9-00C04FB925D3\",KSAUDFNAME_AUX_MUTE);\n#define KSAUDFNAME_AUX_MUTE DEFINE_GUIDNAMED(KSAUDFNAME_AUX_MUTE)\n\n#define STATIC_KSAUDFNAME_AUX\t\t\t\t\t\t\\\n\t0x185FEDFEL,0x9905,0x11D1,0x95,0xA9,0x00,0xC0,0x4F,0xB9,0x25,0xD3\nDEFINE_GUIDSTRUCT(\"185FEDFE-9905-11D1-95A9-00C04FB925D3\",KSAUDFNAME_AUX);\n#define KSAUDFNAME_AUX DEFINE_GUIDNAMED(KSAUDFNAME_AUX)\n\n#define STATIC_KSAUDFNAME_PC_SPEAKER\t\t\t\t\t\\\n\t0x185FEDFFL,0x9905,0x11D1,0x95,0xA9,0x00,0xC0,0x4F,0xB9,0x25,0xD3\nDEFINE_GUIDSTRUCT(\"185FEDFF-9905-11D1-95A9-00C04FB925D3\",KSAUDFNAME_PC_SPEAKER);\n#define KSAUDFNAME_PC_SPEAKER DEFINE_GUIDNAMED(KSAUDFNAME_PC_SPEAKER)\n\n#define STATIC_KSAUDFNAME_WAVE_OUT_MIX\t\t\t\t\t\\\n\t0x185FEE00L,0x9905,0x11D1,0x95,0xA9,0x00,0xC0,0x4F,0xB9,0x25,0xD3\nDEFINE_GUIDSTRUCT(\"185FEE00-9905-11D1-95A9-00C04FB925D3\",KSAUDFNAME_WAVE_OUT_MIX);\n#define KSAUDFNAME_WAVE_OUT_MIX DEFINE_GUIDNAMED(KSAUDFNAME_WAVE_OUT_MIX)\n\n#define STATIC_KSAUDFNAME_MONO_OUT\t\t\t\t\t\\\n\t0xf9b41dc3L,0x96e2,0x11d2,0xac,0x4c,0x0,0xc0,0x4f,0x8e,0xfb,0x68\nDEFINE_GUIDSTRUCT(\"F9B41DC3-96E2-11d2-AC4C-00C04F8EFB68\",KSAUDFNAME_MONO_OUT);\n#define KSAUDFNAME_MONO_OUT DEFINE_GUIDNAMED(KSAUDFNAME_MONO_OUT)\n\n#define STATIC_KSAUDFNAME_STEREO_MIX\t\t\t\t\t\\\n\t0xdff077L,0x96e3,0x11d2,0xac,0x4c,0x0,0xc0,0x4f,0x8e,0xfb,0x68\nDEFINE_GUIDSTRUCT(\"00DFF077-96E3-11d2-AC4C-00C04F8EFB68\",KSAUDFNAME_STEREO_MIX);\n#define KSAUDFNAME_STEREO_MIX DEFINE_GUIDNAMED(KSAUDFNAME_STEREO_MIX)\n\n#define STATIC_KSAUDFNAME_MONO_MIX\t\t\t\t\t\\\n\t0xdff078L,0x96e3,0x11d2,0xac,0x4c,0x0,0xc0,0x4f,0x8e,0xfb,0x68\nDEFINE_GUIDSTRUCT(\"00DFF078-96E3-11d2-AC4C-00C04F8EFB68\",KSAUDFNAME_MONO_MIX);\n#define KSAUDFNAME_MONO_MIX DEFINE_GUIDNAMED(KSAUDFNAME_MONO_MIX)\n\n#define STATIC_KSAUDFNAME_MONO_OUT_VOLUME\t\t\t\t\\\n\t0x1ad247ebL,0x96e3,0x11d2,0xac,0x4c,0x0,0xc0,0x4f,0x8e,0xfb,0x68\nDEFINE_GUIDSTRUCT(\"1AD247EB-96E3-11d2-AC4C-00C04F8EFB68\",KSAUDFNAME_MONO_OUT_VOLUME);\n#define KSAUDFNAME_MONO_OUT_VOLUME DEFINE_GUIDNAMED(KSAUDFNAME_MONO_OUT_VOLUME)\n\n#define STATIC_KSAUDFNAME_MONO_OUT_MUTE\t\t\t\t\t\\\n\t0x1ad247ecL,0x96e3,0x11d2,0xac,0x4c,0x0,0xc0,0x4f,0x8e,0xfb,0x68\nDEFINE_GUIDSTRUCT(\"1AD247EC-96E3-11d2-AC4C-00C04F8EFB68\",KSAUDFNAME_MONO_OUT_MUTE);\n#define KSAUDFNAME_MONO_OUT_MUTE DEFINE_GUIDNAMED(KSAUDFNAME_MONO_OUT_MUTE)\n\n#define STATIC_KSAUDFNAME_STEREO_MIX_VOLUME\t\t\t\t\\\n\t0x1ad247edL,0x96e3,0x11d2,0xac,0x4c,0x0,0xc0,0x4f,0x8e,0xfb,0x68\nDEFINE_GUIDSTRUCT(\"1AD247ED-96E3-11d2-AC4C-00C04F8EFB68\",KSAUDFNAME_STEREO_MIX_VOLUME);\n#define KSAUDFNAME_STEREO_MIX_VOLUME DEFINE_GUIDNAMED(KSAUDFNAME_STEREO_MIX_VOLUME)\n\n#define STATIC_KSAUDFNAME_STEREO_MIX_MUTE\t\t\t\t\\\n\t0x22b0eafdL,0x96e3,0x11d2,0xac,0x4c,0x0,0xc0,0x4f,0x8e,0xfb,0x68\nDEFINE_GUIDSTRUCT(\"22B0EAFD-96E3-11d2-AC4C-00C04F8EFB68\",KSAUDFNAME_STEREO_MIX_MUTE);\n#define KSAUDFNAME_STEREO_MIX_MUTE DEFINE_GUIDNAMED(KSAUDFNAME_STEREO_MIX_MUTE)\n\n#define STATIC_KSAUDFNAME_MONO_MIX_VOLUME\t\t\t\t\\\n\t0x22b0eafeL,0x96e3,0x11d2,0xac,0x4c,0x0,0xc0,0x4f,0x8e,0xfb,0x68\nDEFINE_GUIDSTRUCT(\"22B0EAFE-96E3-11d2-AC4C-00C04F8EFB68\",KSAUDFNAME_MONO_MIX_VOLUME);\n#define KSAUDFNAME_MONO_MIX_VOLUME DEFINE_GUIDNAMED(KSAUDFNAME_MONO_MIX_VOLUME)\n\n#define STATIC_KSAUDFNAME_MONO_MIX_MUTE\t\t\t\t\t\\\n\t0x2bc31d69L,0x96e3,0x11d2,0xac,0x4c,0x0,0xc0,0x4f,0x8e,0xfb,0x68\nDEFINE_GUIDSTRUCT(\"2BC31D69-96E3-11d2-AC4C-00C04F8EFB68\",KSAUDFNAME_MONO_MIX_MUTE);\n#define KSAUDFNAME_MONO_MIX_MUTE DEFINE_GUIDNAMED(KSAUDFNAME_MONO_MIX_MUTE)\n\n#define STATIC_KSAUDFNAME_MICROPHONE_BOOST\t\t\t\t\\\n\t0x2bc31d6aL,0x96e3,0x11d2,0xac,0x4c,0x0,0xc0,0x4f,0x8e,0xfb,0x68\nDEFINE_GUIDSTRUCT(\"2BC31D6A-96E3-11d2-AC4C-00C04F8EFB68\",KSAUDFNAME_MICROPHONE_BOOST);\n#define KSAUDFNAME_MICROPHONE_BOOST DEFINE_GUIDNAMED(KSAUDFNAME_MICROPHONE_BOOST)\n\n#define STATIC_KSAUDFNAME_ALTERNATE_MICROPHONE\t\t\t\t\\\n\t0x2bc31d6bL,0x96e3,0x11d2,0xac,0x4c,0x0,0xc0,0x4f,0x8e,0xfb,0x68\nDEFINE_GUIDSTRUCT(\"2BC31D6B-96E3-11d2-AC4C-00C04F8EFB68\",KSAUDFNAME_ALTERNATE_MICROPHONE);\n#define KSAUDFNAME_ALTERNATE_MICROPHONE DEFINE_GUIDNAMED(KSAUDFNAME_ALTERNATE_MICROPHONE)\n\n#define STATIC_KSAUDFNAME_3D_DEPTH\t\t\t\t\t\\\n\t0x63ff5747L,0x991f,0x11d2,0xac,0x4d,0x0,0xc0,0x4f,0x8e,0xfb,0x68\nDEFINE_GUIDSTRUCT(\"63FF5747-991F-11d2-AC4D-00C04F8EFB68\",KSAUDFNAME_3D_DEPTH);\n#define KSAUDFNAME_3D_DEPTH DEFINE_GUIDNAMED(KSAUDFNAME_3D_DEPTH)\n\n#define STATIC_KSAUDFNAME_3D_CENTER\t\t\t\t\t\\\n\t0x9f0670b4L,0x991f,0x11d2,0xac,0x4d,0x0,0xc0,0x4f,0x8e,0xfb,0x68\nDEFINE_GUIDSTRUCT(\"9F0670B4-991F-11d2-AC4D-00C04F8EFB68\",KSAUDFNAME_3D_CENTER);\n#define KSAUDFNAME_3D_CENTER DEFINE_GUIDNAMED(KSAUDFNAME_3D_CENTER)\n\n#define STATIC_KSAUDFNAME_VIDEO_VOLUME\t\t\t\t\t\\\n\t0x9b46e708L,0x992a,0x11d2,0xac,0x4d,0x0,0xc0,0x4f,0x8e,0xfb,0x68\nDEFINE_GUIDSTRUCT(\"9B46E708-992A-11d2-AC4D-00C04F8EFB68\",KSAUDFNAME_VIDEO_VOLUME);\n#define KSAUDFNAME_VIDEO_VOLUME DEFINE_GUIDNAMED(KSAUDFNAME_VIDEO_VOLUME)\n\n#define STATIC_KSAUDFNAME_VIDEO_MUTE\t\t\t\t\t\\\n\t0x9b46e709L,0x992a,0x11d2,0xac,0x4d,0x0,0xc0,0x4f,0x8e,0xfb,0x68\nDEFINE_GUIDSTRUCT(\"9B46E709-992A-11d2-AC4D-00C04F8EFB68\",KSAUDFNAME_VIDEO_MUTE);\n#define KSAUDFNAME_VIDEO_MUTE DEFINE_GUIDNAMED(KSAUDFNAME_VIDEO_MUTE)\n\n#define STATIC_KSAUDFNAME_VIDEO\t\t\t\t\t\t\\\n\t0x915daec4L,0xa434,0x11d2,0xac,0x52,0x0,0xc0,0x4f,0x8e,0xfb,0x68\nDEFINE_GUIDSTRUCT(\"915DAEC4-A434-11d2-AC52-00C04F8EFB68\",KSAUDFNAME_VIDEO);\n#define KSAUDFNAME_VIDEO DEFINE_GUIDNAMED(KSAUDFNAME_VIDEO)\n\n#define STATIC_KSAUDFNAME_PEAKMETER\t\t\t\t\t\\\n\t0x57e24340L,0xfc5b,0x4612,0xa5,0x62,0x72,0xb1,0x1a,0x29,0xdf,0xae\nDEFINE_GUIDSTRUCT(\"57E24340-FC5B-4612-A562-72B11A29DFAE\",KSAUDFNAME_PEAKMETER);\n#define KSAUDFNAME_PEAKMETER DEFINE_GUIDNAMED(KSAUDFNAME_PEAKMETER)\n\n#define KSNODEPIN_STANDARD_IN\t\t1\n#define KSNODEPIN_STANDARD_OUT\t\t0\n\n#define KSNODEPIN_SUM_MUX_IN\t\t1\n#define KSNODEPIN_SUM_MUX_OUT\t\t0\n\n#define KSNODEPIN_DEMUX_IN\t\t0\n#define KSNODEPIN_DEMUX_OUT\t\t1\n\n#define KSNODEPIN_AEC_RENDER_IN\t\t1\n#define KSNODEPIN_AEC_RENDER_OUT\t0\n#define KSNODEPIN_AEC_CAPTURE_IN\t2\n#define KSNODEPIN_AEC_CAPTURE_OUT\t3\n\n#define STATIC_KSMETHODSETID_Wavetable\t\t\t\t\t\\\n\t0xDCEF31EBL,0xD907,0x11D0,0x95,0x83,0x00,0xC0,0x4F,0xB9,0x25,0xD3\nDEFINE_GUIDSTRUCT(\"DCEF31EB-D907-11D0-9583-00C04FB925D3\",KSMETHODSETID_Wavetable);\n#define KSMETHODSETID_Wavetable DEFINE_GUIDNAMED(KSMETHODSETID_Wavetable)\n\ntypedef enum {\n  KSMETHOD_WAVETABLE_WAVE_ALLOC,\n  KSMETHOD_WAVETABLE_WAVE_FREE,\n  KSMETHOD_WAVETABLE_WAVE_FIND,\n  KSMETHOD_WAVETABLE_WAVE_WRITE\n} KSMETHOD_WAVETABLE;\n\ntypedef struct {\n  KSIDENTIFIER Identifier;\n  ULONG Size;\n  WINBOOL Looped;\n  ULONG LoopPoint;\n  WINBOOL InROM;\n  KSDATAFORMAT Format;\n} KSWAVETABLE_WAVE_DESC,*PKSWAVETABLE_WAVE_DESC;\n\n#define STATIC_KSPROPSETID_Acoustic_Echo_Cancel\t\t\t\t\\\n\t0xd7a4af8bL,0x3dc1,0x4902,0x91,0xea,0x8a,0x15,0xc9,0x0e,0x05,0xb2\nDEFINE_GUIDSTRUCT(\"D7A4AF8B-3DC1-4902-91EA-8A15C90E05B2\",KSPROPSETID_Acoustic_Echo_Cancel);\n#define KSPROPSETID_Acoustic_Echo_Cancel DEFINE_GUIDNAMED(KSPROPSETID_Acoustic_Echo_Cancel)\n\ntypedef enum {\n  KSPROPERTY_AEC_NOISE_FILL_ENABLE = 0,\n  KSPROPERTY_AEC_STATUS,\n  KSPROPERTY_AEC_MODE\n} KSPROPERTY_AEC;\n\n#define AEC_STATUS_FD_HISTORY_UNINITIALIZED\t\t0x0\n#define AEC_STATUS_FD_HISTORY_CONTINUOUSLY_CONVERGED\t0x1\n#define AEC_STATUS_FD_HISTORY_PREVIOUSLY_DIVERGED\t0x2\n#define AEC_STATUS_FD_CURRENTLY_CONVERGED\t\t0x8\n\n#define AEC_MODE_PASS_THROUGH\t\t\t\t0x0\n#define AEC_MODE_HALF_DUPLEX\t\t\t\t0x1\n#define AEC_MODE_FULL_DUPLEX\t\t\t\t0x2\n\n#define STATIC_KSPROPSETID_Wave\t\t\t\t\t\t\\\n\t0x924e54b0L,0x630f,0x11cf,0xad,0xa7,0x08,0x00,0x3e,0x30,0x49,0x4a\nDEFINE_GUIDSTRUCT(\"924e54b0-630f-11cf-ada7-08003e30494a\",KSPROPSETID_Wave);\n#define KSPROPSETID_Wave DEFINE_GUIDNAMED(KSPROPSETID_Wave)\n\ntypedef enum {\n  KSPROPERTY_WAVE_COMPATIBLE_CAPABILITIES,\n  KSPROPERTY_WAVE_INPUT_CAPABILITIES,\n  KSPROPERTY_WAVE_OUTPUT_CAPABILITIES,\n  KSPROPERTY_WAVE_BUFFER,\n  KSPROPERTY_WAVE_FREQUENCY,\n  KSPROPERTY_WAVE_VOLUME,\n  KSPROPERTY_WAVE_PAN\n} KSPROPERTY_WAVE;\n\ntypedef struct {\n  ULONG ulDeviceType;\n} KSWAVE_COMPATCAPS,*PKSWAVE_COMPATCAPS;\n\n#define KSWAVE_COMPATCAPS_INPUT\t\t0x00000000\n#define KSWAVE_COMPATCAPS_OUTPUT\t0x00000001\n\ntypedef struct {\n  ULONG MaximumChannelsPerConnection;\n  ULONG MinimumBitsPerSample;\n  ULONG MaximumBitsPerSample;\n  ULONG MinimumSampleFrequency;\n  ULONG MaximumSampleFrequency;\n  ULONG TotalConnections;\n  ULONG ActiveConnections;\n} KSWAVE_INPUT_CAPABILITIES,*PKSWAVE_INPUT_CAPABILITIES;\n\ntypedef struct {\n  ULONG MaximumChannelsPerConnection;\n  ULONG MinimumBitsPerSample;\n  ULONG MaximumBitsPerSample;\n  ULONG MinimumSampleFrequency;\n  ULONG MaximumSampleFrequency;\n  ULONG TotalConnections;\n  ULONG StaticConnections;\n  ULONG StreamingConnections;\n  ULONG ActiveConnections;\n  ULONG ActiveStaticConnections;\n  ULONG ActiveStreamingConnections;\n  ULONG Total3DConnections;\n  ULONG Static3DConnections;\n  ULONG Streaming3DConnections;\n  ULONG Active3DConnections;\n  ULONG ActiveStatic3DConnections;\n  ULONG ActiveStreaming3DConnections;\n  ULONG TotalSampleMemory;\n  ULONG FreeSampleMemory;\n  ULONG LargestFreeContiguousSampleMemory;\n} KSWAVE_OUTPUT_CAPABILITIES,*PKSWAVE_OUTPUT_CAPABILITIES;\n\ntypedef struct {\n  LONG LeftAttenuation;\n  LONG RightAttenuation;\n} KSWAVE_VOLUME,*PKSWAVE_VOLUME;\n\n#define KSWAVE_BUFFER_ATTRIBUTEF_LOOPING\t0x00000001\n#define KSWAVE_BUFFER_ATTRIBUTEF_STATIC\t\t0x00000002\n\ntypedef struct {\n  ULONG Attributes;\n  ULONG BufferSize;\n  PVOID BufferAddress;\n} KSWAVE_BUFFER,*PKSWAVE_BUFFER;\n\n#define STATIC_KSMUSIC_TECHNOLOGY_PORT\t\t\t\t\t\\\n\t0x86C92E60L,0x62E8,0x11CF,0xA5,0xD6,0x28,0xDB,0x04,0xC1,0x00,0x00\nDEFINE_GUIDSTRUCT(\"86C92E60-62E8-11CF-A5D6-28DB04C10000\",KSMUSIC_TECHNOLOGY_PORT);\n#define KSMUSIC_TECHNOLOGY_PORT DEFINE_GUIDNAMED(KSMUSIC_TECHNOLOGY_PORT)\n\n#define STATIC_KSMUSIC_TECHNOLOGY_SQSYNTH\t\t\t\t\\\n\t0x0ECF4380L,0x62E9,0x11CF,0xA5,0xD6,0x28,0xDB,0x04,0xC1,0x00,0x00\nDEFINE_GUIDSTRUCT(\"0ECF4380-62E9-11CF-A5D6-28DB04C10000\",KSMUSIC_TECHNOLOGY_SQSYNTH);\n#define KSMUSIC_TECHNOLOGY_SQSYNTH DEFINE_GUIDNAMED(KSMUSIC_TECHNOLOGY_SQSYNTH)\n\n#define STATIC_KSMUSIC_TECHNOLOGY_FMSYNTH\t\t\t\t\\\n\t0x252C5C80L,0x62E9,0x11CF,0xA5,0xD6,0x28,0xDB,0x04,0xC1,0x00,0x00\nDEFINE_GUIDSTRUCT(\"252C5C80-62E9-11CF-A5D6-28DB04C10000\",KSMUSIC_TECHNOLOGY_FMSYNTH);\n#define KSMUSIC_TECHNOLOGY_FMSYNTH DEFINE_GUIDNAMED(KSMUSIC_TECHNOLOGY_FMSYNTH)\n\n#define STATIC_KSMUSIC_TECHNOLOGY_WAVETABLE\t\t\t\t\\\n\t0x394EC7C0L,0x62E9,0x11CF,0xA5,0xD6,0x28,0xDB,0x04,0xC1,0x00,0x00\nDEFINE_GUIDSTRUCT(\"394EC7C0-62E9-11CF-A5D6-28DB04C10000\",KSMUSIC_TECHNOLOGY_WAVETABLE);\n#define KSMUSIC_TECHNOLOGY_WAVETABLE DEFINE_GUIDNAMED(KSMUSIC_TECHNOLOGY_WAVETABLE)\n\n#define STATIC_KSMUSIC_TECHNOLOGY_SWSYNTH\t\t\t\t\\\n\t0x37407736L,0x3620,0x11D1,0x85,0xD3,0x00,0x00,0xF8,0x75,0x43,0x80\nDEFINE_GUIDSTRUCT(\"37407736-3620-11D1-85D3-0000F8754380\",KSMUSIC_TECHNOLOGY_SWSYNTH);\n#define KSMUSIC_TECHNOLOGY_SWSYNTH DEFINE_GUIDNAMED(KSMUSIC_TECHNOLOGY_SWSYNTH)\n\n#define STATIC_KSPROPSETID_WaveTable\t\t\t\t\t\\\n\t0x8539E660L,0x62E9,0x11CF,0xA5,0xD6,0x28,0xDB,0x04,0xC1,0x00,0x00\nDEFINE_GUIDSTRUCT(\"8539E660-62E9-11CF-A5D6-28DB04C10000\",KSPROPSETID_WaveTable);\n#define KSPROPSETID_WaveTable DEFINE_GUIDNAMED(KSPROPSETID_WaveTable)\n\ntypedef enum {\n  KSPROPERTY_WAVETABLE_LOAD_SAMPLE,\n  KSPROPERTY_WAVETABLE_UNLOAD_SAMPLE,\n  KSPROPERTY_WAVETABLE_MEMORY,\n  KSPROPERTY_WAVETABLE_VERSION\n} KSPROPERTY_WAVETABLE;\n\ntypedef struct {\n  KSDATARANGE DataRange;\n  GUID Technology;\n  ULONG Channels;\n  ULONG Notes;\n  ULONG ChannelMask;\n} KSDATARANGE_MUSIC,*PKSDATARANGE_MUSIC;\n\n#define STATIC_KSEVENTSETID_Cyclic\t\t\t\t\t\\\n\t0x142C1AC0L,0x072A,0x11D0,0xA5,0xD6,0x28,0xDB,0x04,0xC1,0x00,0x00\nDEFINE_GUIDSTRUCT(\"142C1AC0-072A-11D0-A5D6-28DB04C10000\",KSEVENTSETID_Cyclic);\n#define KSEVENTSETID_Cyclic DEFINE_GUIDNAMED(KSEVENTSETID_Cyclic)\n\ntypedef enum {\n  KSEVENT_CYCLIC_TIME_INTERVAL\n} KSEVENT_CYCLIC_TIME;\n\n#define STATIC_KSPROPSETID_Cyclic\t\t\t\t\t\\\n\t0x3FFEAEA0L,0x2BEE,0x11CF,0xA5,0xD6,0x28,0xDB,0x04,0xC1,0x00,0x00\nDEFINE_GUIDSTRUCT(\"3FFEAEA0-2BEE-11CF-A5D6-28DB04C10000\",KSPROPSETID_Cyclic);\n#define KSPROPSETID_Cyclic DEFINE_GUIDNAMED(KSPROPSETID_Cyclic)\n\ntypedef enum {\n  KSPROPERTY_CYCLIC_POSITION\n} KSPROPERTY_CYCLIC;\n\n#define STATIC_KSEVENTSETID_AudioControlChange\t\t\t\t\\\n\t0xE85E9698L,0xFA2F,0x11D1,0x95,0xBD,0x00,0xC0,0x4F,0xB9,0x25,0xD3\nDEFINE_GUIDSTRUCT(\"E85E9698-FA2F-11D1-95BD-00C04FB925D3\",KSEVENTSETID_AudioControlChange);\n#define KSEVENTSETID_AudioControlChange DEFINE_GUIDNAMED(KSEVENTSETID_AudioControlChange)\n\ntypedef enum {\n  KSEVENT_CONTROL_CHANGE\n} KSEVENT_AUDIO_CONTROL_CHANGE;\n\n#define STATIC_KSEVENTSETID_LoopedStreaming\t\t\t\t\\\n\t0x4682B940L,0xC6EF,0x11D0,0x96,0xD8,0x00,0xAA,0x00,0x51,0xE5,0x1D\nDEFINE_GUIDSTRUCT(\"4682B940-C6EF-11D0-96D8-00AA0051E51D\",KSEVENTSETID_LoopedStreaming);\n#define KSEVENTSETID_LoopedStreaming DEFINE_GUIDNAMED(KSEVENTSETID_LoopedStreaming)\n\ntypedef enum {\n  KSEVENT_LOOPEDSTREAMING_POSITION\n} KSEVENT_LOOPEDSTREAMING;\n\ntypedef struct {\n  KSEVENTDATA KsEventData;\n  DWORDLONG Position;\n} LOOPEDSTREAMING_POSITION_EVENT_DATA,*PLOOPEDSTREAMING_POSITION_EVENT_DATA;\n\n#define STATIC_KSPROPSETID_Sysaudio\t\t\t\t\t\\\n\t0xCBE3FAA0L,0xCC75,0x11D0,0xB4,0x65,0x00,0x00,0x1A,0x18,0x18,0xE6\nDEFINE_GUIDSTRUCT(\"CBE3FAA0-CC75-11D0-B465-00001A1818E6\",KSPROPSETID_Sysaudio);\n#define KSPROPSETID_Sysaudio DEFINE_GUIDNAMED(KSPROPSETID_Sysaudio)\n\ntypedef enum {\n  KSPROPERTY_SYSAUDIO_DEVICE_COUNT = 1,\n  KSPROPERTY_SYSAUDIO_DEVICE_FRIENDLY_NAME = 2,\n  KSPROPERTY_SYSAUDIO_DEVICE_INSTANCE = 3,\n  KSPROPERTY_SYSAUDIO_DEVICE_INTERFACE_NAME = 4,\n  KSPROPERTY_SYSAUDIO_SELECT_GRAPH = 5,\n  KSPROPERTY_SYSAUDIO_CREATE_VIRTUAL_SOURCE = 6,\n  KSPROPERTY_SYSAUDIO_DEVICE_DEFAULT = 7,\n  KSPROPERTY_SYSAUDIO_INSTANCE_INFO = 14,\n  KSPROPERTY_SYSAUDIO_COMPONENT_ID = 16\n} KSPROPERTY_SYSAUDIO;\n\ntypedef struct {\n  KSPROPERTY Property;\n  GUID PinCategory;\n  GUID PinName;\n} SYSAUDIO_CREATE_VIRTUAL_SOURCE,*PSYSAUDIO_CREATE_VIRTUAL_SOURCE;\n\ntypedef struct {\n  KSPROPERTY Property;\n  ULONG PinId;\n  ULONG NodeId;\n  ULONG Flags;\n  ULONG Reserved;\n} SYSAUDIO_SELECT_GRAPH,*PSYSAUDIO_SELECT_GRAPH;\n\ntypedef struct {\n  KSPROPERTY Property;\n  ULONG Flags;\n  ULONG DeviceNumber;\n} SYSAUDIO_INSTANCE_INFO,*PSYSAUDIO_INSTANCE_INFO;\n\n#define SYSAUDIO_FLAGS_DONT_COMBINE_PINS\t0x00000001\n\n#define STATIC_KSPROPSETID_Sysaudio_Pin\t\t\t\t\t\\\n\t0xA3A53220L,0xC6E4,0x11D0,0xB4,0x65,0x00,0x00,0x1A,0x18,0x18,0xE6\nDEFINE_GUIDSTRUCT(\"A3A53220-C6E4-11D0-B465-00001A1818E6\",KSPROPSETID_Sysaudio_Pin);\n#define KSPROPSETID_Sysaudio_Pin DEFINE_GUIDNAMED(KSPROPSETID_Sysaudio_Pin)\n\ntypedef enum {\n  KSPROPERTY_SYSAUDIO_ATTACH_VIRTUAL_SOURCE = 1\n} KSPROPERTY_SYSAUDIO_PIN;\n\ntypedef struct {\n  KSPROPERTY Property;\n  ULONG MixerPinId;\n  ULONG Reserved;\n} SYSAUDIO_ATTACH_VIRTUAL_SOURCE,*PSYSAUDIO_ATTACH_VIRTUAL_SOURCE;\n\ntypedef struct {\n  KSPROPERTY Property;\n  ULONG NodeId;\n  ULONG Reserved;\n} KSNODEPROPERTY,*PKSNODEPROPERTY;\n\ntypedef struct {\n  KSNODEPROPERTY NodeProperty;\n  LONG Channel;\n  ULONG Reserved;\n} KSNODEPROPERTY_AUDIO_CHANNEL,*PKSNODEPROPERTY_AUDIO_CHANNEL;\n\ntypedef struct {\n  KSNODEPROPERTY NodeProperty;\n  ULONG DevSpecificId;\n  ULONG DeviceInfo;\n  ULONG Length;\n} KSNODEPROPERTY_AUDIO_DEV_SPECIFIC,*PKSNODEPROPERTY_AUDIO_DEV_SPECIFIC;\n\ntypedef struct {\n  KSNODEPROPERTY NodeProperty;\n  PVOID ListenerId;\n#ifndef _WIN64\n  ULONG Reserved;\n#endif\n} KSNODEPROPERTY_AUDIO_3D_LISTENER,*PKSNODEPROPERTY_AUDIO_3D_LISTENER;\n\ntypedef struct {\n  KSNODEPROPERTY NodeProperty;\n  PVOID AppContext;\n  ULONG Length;\n#ifndef _WIN64\n  ULONG Reserved;\n#endif\n} KSNODEPROPERTY_AUDIO_PROPERTY,*PKSNODEPROPERTY_AUDIO_PROPERTY;\n\n#define STATIC_KSPROPSETID_AudioGfx\t\t\t\t\t\\\n\t0x79a9312eL,0x59ae,0x43b0,0xa3,0x50,0x8b,0x5,0x28,0x4c,0xab,0x24\nDEFINE_GUIDSTRUCT(\"79A9312E-59AE-43b0-A350-8B05284CAB24\",KSPROPSETID_AudioGfx);\n#define KSPROPSETID_AudioGfx DEFINE_GUIDNAMED(KSPROPSETID_AudioGfx)\n\ntypedef enum {\n  KSPROPERTY_AUDIOGFX_RENDERTARGETDEVICEID,\n  KSPROPERTY_AUDIOGFX_CAPTURETARGETDEVICEID\n} KSPROPERTY_AUDIOGFX;\n\n#define STATIC_KSPROPSETID_Linear\t\t\t\t\t\\\n\t0x5A2FFE80L,0x16B9,0x11D0,0xA5,0xD6,0x28,0xDB,0x04,0xC1,0x00,0x00\nDEFINE_GUIDSTRUCT(\"5A2FFE80-16B9-11D0-A5D6-28DB04C10000\",KSPROPSETID_Linear);\n#define KSPROPSETID_Linear DEFINE_GUIDNAMED(KSPROPSETID_Linear)\n\ntypedef enum {\n  KSPROPERTY_LINEAR_POSITION\n} KSPROPERTY_LINEAR;\n\n#define STATIC_KSDATAFORMAT_TYPE_MUSIC\t\t\t\t\t\\\n\t0xE725D360L,0x62CC,0x11CF,0xA5,0xD6,0x28,0xDB,0x04,0xC1,0x00,0x00\nDEFINE_GUIDSTRUCT(\"E725D360-62CC-11CF-A5D6-28DB04C10000\",KSDATAFORMAT_TYPE_MUSIC);\n#define KSDATAFORMAT_TYPE_MUSIC DEFINE_GUIDNAMED(KSDATAFORMAT_TYPE_MUSIC)\n\n#define STATIC_KSDATAFORMAT_TYPE_MIDI\t\t\t\t\t\\\n\t0x7364696DL,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71\nDEFINE_GUIDSTRUCT(\"7364696D-0000-0010-8000-00aa00389b71\",KSDATAFORMAT_TYPE_MIDI);\n#define KSDATAFORMAT_TYPE_MIDI DEFINE_GUIDNAMED(KSDATAFORMAT_TYPE_MIDI)\n\n#define STATIC_KSDATAFORMAT_SUBTYPE_MIDI\t\t\t\t\\\n\t0x1D262760L,0xE957,0x11CF,0xA5,0xD6,0x28,0xDB,0x04,0xC1,0x00,0x00\nDEFINE_GUIDSTRUCT(\"1D262760-E957-11CF-A5D6-28DB04C10000\",KSDATAFORMAT_SUBTYPE_MIDI);\n#define KSDATAFORMAT_SUBTYPE_MIDI DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_MIDI)\n\n#define STATIC_KSDATAFORMAT_SUBTYPE_MIDI_BUS\t\t\t\t\\\n\t0x2CA15FA0L,0x6CFE,0x11CF,0xA5,0xD6,0x28,0xDB,0x04,0xC1,0x00,0x00\nDEFINE_GUIDSTRUCT(\"2CA15FA0-6CFE-11CF-A5D6-28DB04C10000\",KSDATAFORMAT_SUBTYPE_MIDI_BUS);\n#define KSDATAFORMAT_SUBTYPE_MIDI_BUS DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_MIDI_BUS)\n\n#define STATIC_KSDATAFORMAT_SUBTYPE_RIFFMIDI\t\t\t\t\\\n\t0x4995DAF0L,0x9EE6,0x11D0,0xA4,0x0E,0x00,0xA0,0xC9,0x22,0x31,0x96\nDEFINE_GUIDSTRUCT(\"4995DAF0-9EE6-11D0-A40E-00A0C9223196\",KSDATAFORMAT_SUBTYPE_RIFFMIDI);\n#define KSDATAFORMAT_SUBTYPE_RIFFMIDI DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_RIFFMIDI)\n\ntypedef struct {\n  ULONG TimeDeltaMs;\n\n  ULONG ByteCount;\n} KSMUSICFORMAT,*PKSMUSICFORMAT;\n\n#define STATIC_KSDATAFORMAT_TYPE_STANDARD_ELEMENTARY_STREAM\t\t\\\n\t0x36523b11L,0x8ee5,0x11d1,0x8c,0xa3,0x00,0x60,0xb0,0x57,0x66,0x4a\nDEFINE_GUIDSTRUCT(\"36523B11-8EE5-11d1-8CA3-0060B057664A\",KSDATAFORMAT_TYPE_STANDARD_ELEMENTARY_STREAM);\n#define KSDATAFORMAT_TYPE_STANDARD_ELEMENTARY_STREAM DEFINE_GUIDNAMED(KSDATAFORMAT_TYPE_STANDARD_ELEMENTARY_STREAM)\n\n#define STATIC_KSDATAFORMAT_TYPE_STANDARD_PES_PACKET\t\t\t\\\n\t0x36523b12L,0x8ee5,0x11d1,0x8c,0xa3,0x00,0x60,0xb0,0x57,0x66,0x4a\nDEFINE_GUIDSTRUCT(\"36523B12-8EE5-11d1-8CA3-0060B057664A\",KSDATAFORMAT_TYPE_STANDARD_PES_PACKET);\n#define KSDATAFORMAT_TYPE_STANDARD_PES_PACKET DEFINE_GUIDNAMED(KSDATAFORMAT_TYPE_STANDARD_PES_PACKET)\n\n#define STATIC_KSDATAFORMAT_TYPE_STANDARD_PACK_HEADER\t\t\t\\\n\t0x36523b13L,0x8ee5,0x11d1,0x8c,0xa3,0x00,0x60,0xb0,0x57,0x66,0x4a\nDEFINE_GUIDSTRUCT(\"36523B13-8EE5-11d1-8CA3-0060B057664A\",KSDATAFORMAT_TYPE_STANDARD_PACK_HEADER);\n#define KSDATAFORMAT_TYPE_STANDARD_PACK_HEADER DEFINE_GUIDNAMED(KSDATAFORMAT_TYPE_STANDARD_PACK_HEADER)\n\n#define STATIC_KSDATAFORMAT_SUBTYPE_STANDARD_MPEG1_VIDEO\t\t\\\n\t0x36523b21L,0x8ee5,0x11d1,0x8c,0xa3,0x00,0x60,0xb0,0x57,0x66,0x4a\nDEFINE_GUIDSTRUCT(\"36523B21-8EE5-11d1-8CA3-0060B057664A\",KSDATAFORMAT_SUBTYPE_STANDARD_MPEG1_VIDEO);\n#define KSDATAFORMAT_SUBTYPE_STANDARD_MPEG1_VIDEO DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_STANDARD_MPEG1_VIDEO)\n\n#define STATIC_KSDATAFORMAT_SUBTYPE_STANDARD_MPEG1_AUDIO\t\t\\\n\t0x36523b22L,0x8ee5,0x11d1,0x8c,0xa3,0x00,0x60,0xb0,0x57,0x66,0x4a\nDEFINE_GUIDSTRUCT(\"36523B22-8EE5-11d1-8CA3-0060B057664A\",KSDATAFORMAT_SUBTYPE_STANDARD_MPEG1_AUDIO);\n#define KSDATAFORMAT_SUBTYPE_STANDARD_MPEG1_AUDIO DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_STANDARD_MPEG1_AUDIO)\n\n#define STATIC_KSDATAFORMAT_SUBTYPE_STANDARD_MPEG2_VIDEO\t\t\\\n\t0x36523b23L,0x8ee5,0x11d1,0x8c,0xa3,0x00,0x60,0xb0,0x57,0x66,0x4a\nDEFINE_GUIDSTRUCT(\"36523B23-8EE5-11d1-8CA3-0060B057664A\",KSDATAFORMAT_SUBTYPE_STANDARD_MPEG2_VIDEO);\n#define KSDATAFORMAT_SUBTYPE_STANDARD_MPEG2_VIDEO DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_STANDARD_MPEG2_VIDEO)\n\n#define STATIC_KSDATAFORMAT_SUBTYPE_STANDARD_MPEG2_AUDIO\t\t\\\n\t0x36523b24L,0x8ee5,0x11d1,0x8c,0xa3,0x00,0x60,0xb0,0x57,0x66,0x4a\nDEFINE_GUIDSTRUCT(\"36523B24-8EE5-11d1-8CA3-0060B057664A\",KSDATAFORMAT_SUBTYPE_STANDARD_MPEG2_AUDIO);\n#define KSDATAFORMAT_SUBTYPE_STANDARD_MPEG2_AUDIO DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_STANDARD_MPEG2_AUDIO)\n\n#define STATIC_KSDATAFORMAT_SUBTYPE_STANDARD_AC3_AUDIO\t\t\t\\\n\t0x36523b25L,0x8ee5,0x11d1,0x8c,0xa3,0x00,0x60,0xb0,0x57,0x66,0x4a\nDEFINE_GUIDSTRUCT(\"36523B25-8EE5-11d1-8CA3-0060B057664A\",KSDATAFORMAT_SUBTYPE_STANDARD_AC3_AUDIO);\n#define KSDATAFORMAT_SUBTYPE_STANDARD_AC3_AUDIO DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_STANDARD_AC3_AUDIO)\n\n#define STATIC_KSDATAFORMAT_SPECIFIER_DIALECT_MPEG1_VIDEO\t\t\\\n\t0x36523b31L,0x8ee5,0x11d1,0x8c,0xa3,0x00,0x60,0xb0,0x57,0x66,0x4a\nDEFINE_GUIDSTRUCT(\"36523B31-8EE5-11d1-8CA3-0060B057664A\",KSDATAFORMAT_SPECIFIER_DIALECT_MPEG1_VIDEO);\n#define KSDATAFORMAT_SPECIFIER_DIALECT_MPEG1_VIDEO DEFINE_GUIDNAMED(KSDATAFORMAT_SPECIFIER_DIALECT_MPEG1_VIDEO)\n\n#define STATIC_KSDATAFORMAT_SPECIFIER_DIALECT_MPEG1_AUDIO\t\t\\\n\t0x36523b32L,0x8ee5,0x11d1,0x8c,0xa3,0x00,0x60,0xb0,0x57,0x66,0x4a\nDEFINE_GUIDSTRUCT(\"36523B32-8EE5-11d1-8CA3-0060B057664A\",KSDATAFORMAT_SPECIFIER_DIALECT_MPEG1_AUDIO);\n#define KSDATAFORMAT_SPECIFIER_DIALECT_MPEG1_AUDIO DEFINE_GUIDNAMED(KSDATAFORMAT_SPECIFIER_DIALECT_MPEG1_AUDIO)\n\n#define STATIC_KSDATAFORMAT_SPECIFIER_DIALECT_MPEG2_VIDEO\t\t\\\n\t0x36523b33L,0x8ee5,0x11d1,0x8c,0xa3,0x00,0x60,0xb0,0x57,0x66,0x4a\nDEFINE_GUIDSTRUCT(\"36523B33-8EE5-11d1-8CA3-0060B057664A\",KSDATAFORMAT_SPECIFIER_DIALECT_MPEG2_VIDEO);\n#define KSDATAFORMAT_SPECIFIER_DIALECT_MPEG2_VIDEO DEFINE_GUIDNAMED(KSDATAFORMAT_SPECIFIER_DIALECT_MPEG2_VIDEO)\n\n#define STATIC_KSDATAFORMAT_SPECIFIER_DIALECT_MPEG2_AUDIO\t\t\\\n\t0x36523b34L,0x8ee5,0x11d1,0x8c,0xa3,0x00,0x60,0xb0,0x57,0x66,0x4a\nDEFINE_GUIDSTRUCT(\"36523B34-8EE5-11d1-8CA3-0060B057664A\",KSDATAFORMAT_SPECIFIER_DIALECT_MPEG2_AUDIO);\n#define KSDATAFORMAT_SPECIFIER_DIALECT_MPEG2_AUDIO DEFINE_GUIDNAMED(KSDATAFORMAT_SPECIFIER_DIALECT_MPEG2_AUDIO)\n\n#define STATIC_KSDATAFORMAT_SPECIFIER_DIALECT_AC3_AUDIO\t\t\t\\\n\t0x36523b35L,0x8ee5,0x11d1,0x8c,0xa3,0x00,0x60,0xb0,0x57,0x66,0x4a\nDEFINE_GUIDSTRUCT(\"36523B35-8EE5-11d1-8CA3-0060B057664A\",KSDATAFORMAT_SPECIFIER_DIALECT_AC3_AUDIO);\n#define KSDATAFORMAT_SPECIFIER_DIALECT_AC3_AUDIO DEFINE_GUIDNAMED(KSDATAFORMAT_SPECIFIER_DIALECT_AC3_AUDIO)\n\n#define STATIC_KSDATAFORMAT_SUBTYPE_DSS_VIDEO\t\t\t\t\\\n\t0xa0af4f81L,0xe163,0x11d0,0xba,0xd9,0x00,0x60,0x97,0x44,0x11,0x1a\nDEFINE_GUIDSTRUCT(\"a0af4f81-e163-11d0-bad9-00609744111a\",KSDATAFORMAT_SUBTYPE_DSS_VIDEO);\n#define KSDATAFORMAT_SUBTYPE_DSS_VIDEO DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_DSS_VIDEO)\n\n#define STATIC_KSDATAFORMAT_SUBTYPE_DSS_AUDIO\t\t\t\t\\\n\t\t0xa0af4f82L,0xe163,0x11d0,0xba,0xd9,0x00,0x60,0x97,0x44,0x11,0x1a\nDEFINE_GUIDSTRUCT(\"a0af4f82-e163-11d0-bad9-00609744111a\",KSDATAFORMAT_SUBTYPE_DSS_AUDIO);\n#define KSDATAFORMAT_SUBTYPE_DSS_AUDIO DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_DSS_AUDIO)\n\n#define STATIC_KSDATAFORMAT_SUBTYPE_MPEG1Packet\t\t\t\t\\\n\t0xe436eb80,0x524f,0x11ce,0x9f,0x53,0x00,0x20,0xaf,0x0b,0xa7,0x70\nDEFINE_GUIDSTRUCT(\"e436eb80-524f-11ce-9F53-0020af0ba770\",KSDATAFORMAT_SUBTYPE_MPEG1Packet);\n#define KSDATAFORMAT_SUBTYPE_MPEG1Packet DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_MPEG1Packet)\n\n#define STATIC_KSDATAFORMAT_SUBTYPE_MPEG1Payload\t\t\t\\\n\t0xe436eb81,0x524f,0x11ce,0x9f,0x53,0x00,0x20,0xaf,0x0b,0xa7,0x70\nDEFINE_GUIDSTRUCT(\"e436eb81-524f-11ce-9F53-0020af0ba770\",KSDATAFORMAT_SUBTYPE_MPEG1Payload);\n#define KSDATAFORMAT_SUBTYPE_MPEG1Payload DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_MPEG1Payload)\n\n#define STATIC_KSDATAFORMAT_SUBTYPE_MPEG1Video\t\t\t\t\\\n\t0xe436eb86,0x524f,0x11ce,0x9f,0x53,0x00,0x20,0xaf,0x0b,0xa7,0x70\nDEFINE_GUIDSTRUCT(\"e436eb86-524f-11ce-9f53-0020af0ba770\",KSDATAFORMAT_SUBTYPE_MPEG1Video);\n#define KSDATAFORMAT_SUBTYPE_MPEG1Video DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_MPEG1Video)\n\n#define STATIC_KSDATAFORMAT_SPECIFIER_MPEG1_VIDEO\t\t\t\\\n\t0x05589f82L,0xc356,0x11ce,0xbf,0x01,0x00,0xaa,0x00,0x55,0x59,0x5a\nDEFINE_GUIDSTRUCT(\"05589f82-c356-11ce-bf01-00aa0055595a\",KSDATAFORMAT_SPECIFIER_MPEG1_VIDEO);\n#define KSDATAFORMAT_SPECIFIER_MPEG1_VIDEO DEFINE_GUIDNAMED(KSDATAFORMAT_SPECIFIER_MPEG1_VIDEO)\n\n#define STATIC_KSDATAFORMAT_TYPE_MPEG2_PES\t\t\t\t\\\n\t0xe06d8020L,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x5f,0x6c,0xbb,0xea\nDEFINE_GUIDSTRUCT(\"e06d8020-db46-11cf-b4d1-00805f6cbbea\",KSDATAFORMAT_TYPE_MPEG2_PES);\n#define KSDATAFORMAT_TYPE_MPEG2_PES DEFINE_GUIDNAMED(KSDATAFORMAT_TYPE_MPEG2_PES)\n\n#define STATIC_KSDATAFORMAT_TYPE_MPEG2_PROGRAM\t\t\t\t\\\n\t0xe06d8022L,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x5f,0x6c,0xbb,0xea\nDEFINE_GUIDSTRUCT(\"e06d8022-db46-11cf-b4d1-00805f6cbbea\",KSDATAFORMAT_TYPE_MPEG2_PROGRAM);\n#define KSDATAFORMAT_TYPE_MPEG2_PROGRAM DEFINE_GUIDNAMED(KSDATAFORMAT_TYPE_MPEG2_PROGRAM)\n\n#define STATIC_KSDATAFORMAT_TYPE_MPEG2_TRANSPORT\t\t\t\\\n\t0xe06d8023L,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x5f,0x6c,0xbb,0xea\nDEFINE_GUIDSTRUCT(\"e06d8023-db46-11cf-b4d1-00805f6cbbea\",KSDATAFORMAT_TYPE_MPEG2_TRANSPORT);\n#define KSDATAFORMAT_TYPE_MPEG2_TRANSPORT DEFINE_GUIDNAMED(KSDATAFORMAT_TYPE_MPEG2_TRANSPORT)\n\n#define STATIC_KSDATAFORMAT_SUBTYPE_MPEG2_VIDEO\t\t\t\t\\\n\t0xe06d8026L,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x5f,0x6c,0xbb,0xea\nDEFINE_GUIDSTRUCT(\"e06d8026-db46-11cf-b4d1-00805f6cbbea\",KSDATAFORMAT_SUBTYPE_MPEG2_VIDEO);\n#define KSDATAFORMAT_SUBTYPE_MPEG2_VIDEO DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_MPEG2_VIDEO)\n\n#define STATIC_KSDATAFORMAT_SPECIFIER_MPEG2_VIDEO\t\t\t\\\n\t0xe06d80e3L,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x5f,0x6c,0xbb,0xea\nDEFINE_GUIDSTRUCT(\"e06d80e3-db46-11cf-b4d1-00805f6cbbea\",KSDATAFORMAT_SPECIFIER_MPEG2_VIDEO);\n#define KSDATAFORMAT_SPECIFIER_MPEG2_VIDEO DEFINE_GUIDNAMED(KSDATAFORMAT_SPECIFIER_MPEG2_VIDEO)\n\n#define STATIC_KSPROPSETID_Mpeg2Vid\t\t\t\t\t\\\n\t0xC8E11B60L,0x0CC9,0x11D0,0xBD,0x69,0x00,0x35,0x05,0xC1,0x03,0xA9\nDEFINE_GUIDSTRUCT(\"C8E11B60-0CC9-11D0-BD69-003505C103A9\",KSPROPSETID_Mpeg2Vid);\n#define KSPROPSETID_Mpeg2Vid DEFINE_GUIDNAMED(KSPROPSETID_Mpeg2Vid)\n\ntypedef enum {\n  KSPROPERTY_MPEG2VID_MODES,\n  KSPROPERTY_MPEG2VID_CUR_MODE,\n  KSPROPERTY_MPEG2VID_4_3_RECT,\n  KSPROPERTY_MPEG2VID_16_9_RECT,\n  KSPROPERTY_MPEG2VID_16_9_PANSCAN\n} KSPROPERTY_MPEG2VID;\n\n#define KSMPEGVIDMODE_PANSCAN\t0x0001\n#define KSMPEGVIDMODE_LTRBOX\t0x0002\n#define KSMPEGVIDMODE_SCALE\t0x0004\n\ntypedef struct _KSMPEGVID_RECT {\n  ULONG StartX;\n  ULONG StartY;\n  ULONG EndX;\n  ULONG EndY;\n} KSMPEGVID_RECT,*PKSMPEGVID_RECT;\n\n#define STATIC_KSDATAFORMAT_SUBTYPE_MPEG2_AUDIO\t\t\t\t\\\n\t0xe06d802bL,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x5f,0x6c,0xbb,0xea\nDEFINE_GUIDSTRUCT(\"e06d802b-db46-11cf-b4d1-00805f6cbbea\",KSDATAFORMAT_SUBTYPE_MPEG2_AUDIO);\n#define KSDATAFORMAT_SUBTYPE_MPEG2_AUDIO DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_MPEG2_AUDIO)\n\n#define STATIC_KSDATAFORMAT_SPECIFIER_MPEG2_AUDIO\t\t\t\\\n\t0xe06d80e5L,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x5f,0x6c,0xbb,0xea\nDEFINE_GUIDSTRUCT(\"e06d80e5-db46-11cf-b4d1-00805f6cbbea\",KSDATAFORMAT_SPECIFIER_MPEG2_AUDIO);\n#define KSDATAFORMAT_SPECIFIER_MPEG2_AUDIO DEFINE_GUIDNAMED(KSDATAFORMAT_SPECIFIER_MPEG2_AUDIO)\n\n#define STATIC_KSDATAFORMAT_SUBTYPE_LPCM_AUDIO\t\t\t\t\\\n\t0xe06d8032L,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x5f,0x6c,0xbb,0xea\nDEFINE_GUIDSTRUCT(\"e06d8032-db46-11cf-b4d1-00805f6cbbea\",KSDATAFORMAT_SUBTYPE_LPCM_AUDIO);\n#define KSDATAFORMAT_SUBTYPE_LPCM_AUDIO DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_LPCM_AUDIO)\n\n#define STATIC_KSDATAFORMAT_SPECIFIER_LPCM_AUDIO\t\t\t\\\n\t0xe06d80e6L,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x5f,0x6c,0xbb,0xea\nDEFINE_GUIDSTRUCT(\"e06d80e6-db46-11cf-b4d1-00805f6cbbea\",KSDATAFORMAT_SPECIFIER_LPCM_AUDIO);\n#define KSDATAFORMAT_SPECIFIER_LPCM_AUDIO DEFINE_GUIDNAMED(KSDATAFORMAT_SPECIFIER_LPCM_AUDIO)\n\n#define STATIC_KSDATAFORMAT_SUBTYPE_AC3_AUDIO\t\t\t\t\\\n\t0xe06d802cL,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x5f,0x6c,0xbb,0xea\nDEFINE_GUIDSTRUCT(\"e06d802c-db46-11cf-b4d1-00805f6cbbea\",KSDATAFORMAT_SUBTYPE_AC3_AUDIO);\n#define KSDATAFORMAT_SUBTYPE_AC3_AUDIO DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_AC3_AUDIO)\n\n#define STATIC_KSDATAFORMAT_SPECIFIER_AC3_AUDIO\t\t\t\t\\\n\t0xe06d80e4L,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x5f,0x6c,0xbb,0xea\nDEFINE_GUIDSTRUCT(\"e06d80e4-db46-11cf-b4d1-00805f6cbbea\",KSDATAFORMAT_SPECIFIER_AC3_AUDIO);\n#define KSDATAFORMAT_SPECIFIER_AC3_AUDIO DEFINE_GUIDNAMED(KSDATAFORMAT_SPECIFIER_AC3_AUDIO)\n\n#define STATIC_KSPROPSETID_AC3\t\t\t\t\t\t\\\n\t0xBFABE720L,0x6E1F,0x11D0,0xBC,0xF2,0x44,0x45,0x53,0x54,0x00,0x00\nDEFINE_GUIDSTRUCT(\"BFABE720-6E1F-11D0-BCF2-444553540000\",KSPROPSETID_AC3);\n#define KSPROPSETID_AC3 DEFINE_GUIDNAMED(KSPROPSETID_AC3)\n\ntypedef enum {\n  KSPROPERTY_AC3_ERROR_CONCEALMENT = 1,\n  KSPROPERTY_AC3_ALTERNATE_AUDIO,\n  KSPROPERTY_AC3_DOWNMIX,\n  KSPROPERTY_AC3_BIT_STREAM_MODE,\n  KSPROPERTY_AC3_DIALOGUE_LEVEL,\n  KSPROPERTY_AC3_LANGUAGE_CODE,\n  KSPROPERTY_AC3_ROOM_TYPE\n} KSPROPERTY_AC3;\n\ntypedef struct {\n  WINBOOL fRepeatPreviousBlock;\n  WINBOOL fErrorInCurrentBlock;\n} KSAC3_ERROR_CONCEALMENT,*PKSAC3_ERROR_CONCEALMENT;\n\ntypedef struct {\n  WINBOOL fStereo;\n  ULONG DualMode;\n} KSAC3_ALTERNATE_AUDIO,*PKSAC3_ALTERNATE_AUDIO;\n\n#define KSAC3_ALTERNATE_AUDIO_1\t\t1\n#define KSAC3_ALTERNATE_AUDIO_2\t\t2\n#define KSAC3_ALTERNATE_AUDIO_BOTH\t3\n\ntypedef struct {\n  WINBOOL fDownMix;\n  WINBOOL fDolbySurround;\n} KSAC3_DOWNMIX,*PKSAC3_DOWNMIX;\n\ntypedef struct {\n  LONG BitStreamMode;\n} KSAC3_BIT_STREAM_MODE,*PKSAC3_BIT_STREAM_MODE;\n\n#define KSAC3_SERVICE_MAIN_AUDIO\t0\n#define KSAC3_SERVICE_NO_DIALOG\t\t1\n#define KSAC3_SERVICE_VISUALLY_IMPAIRED\t2\n#define KSAC3_SERVICE_HEARING_IMPAIRED\t3\n#define KSAC3_SERVICE_DIALOG_ONLY\t4\n#define KSAC3_SERVICE_COMMENTARY\t5\n#define KSAC3_SERVICE_EMERGENCY_FLASH\t6\n#define KSAC3_SERVICE_VOICE_OVER\t7\n\ntypedef struct {\n  ULONG DialogueLevel;\n} KSAC3_DIALOGUE_LEVEL,*PKSAC3_DIALOGUE_LEVEL;\n\ntypedef struct {\n  WINBOOL fLargeRoom;\n} KSAC3_ROOM_TYPE,*PKSAC3_ROOM_TYPE;\n\n#define STATIC_KSDATAFORMAT_SUBTYPE_DTS_AUDIO\t\t\t\t\\\n\t0xe06d8033L,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x5f,0x6c,0xbb,0xea\nDEFINE_GUIDSTRUCT(\"e06d8033-db46-11cf-b4d1-00805f6cbbea\",KSDATAFORMAT_SUBTYPE_DTS_AUDIO);\n#define KSDATAFORMAT_SUBTYPE_DTS_AUDIO DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_DTS_AUDIO)\n\n#define STATIC_KSDATAFORMAT_SUBTYPE_SDDS_AUDIO\t\t\t\t\\\n\t0xe06d8034L,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x5f,0x6c,0xbb,0xea\nDEFINE_GUIDSTRUCT(\"e06d8034-db46-11cf-b4d1-00805f6cbbea\",KSDATAFORMAT_SUBTYPE_SDDS_AUDIO);\n#define KSDATAFORMAT_SUBTYPE_SDDS_AUDIO DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_SDDS_AUDIO)\n\n#define STATIC_KSPROPSETID_AudioDecoderOut\t\t\t\t\\\n\t0x6ca6e020L,0x43bd,0x11d0,0xbd,0x6a,0x00,0x35,0x05,0xc1,0x03,0xa9\nDEFINE_GUIDSTRUCT(\"6ca6e020-43bd-11d0-bd6a-003505c103a9\",KSPROPSETID_AudioDecoderOut);\n#define KSPROPSETID_AudioDecoderOut DEFINE_GUIDNAMED(KSPROPSETID_AudioDecoderOut)\n\ntypedef enum {\n  KSPROPERTY_AUDDECOUT_MODES,\n  KSPROPERTY_AUDDECOUT_CUR_MODE\n} KSPROPERTY_AUDDECOUT;\n\n#define KSAUDDECOUTMODE_STEREO_ANALOG\t0x0001\n#define KSAUDDECOUTMODE_PCM_51\t\t0x0002\n#define KSAUDDECOUTMODE_SPDIFF\t\t0x0004\n\n#define STATIC_KSDATAFORMAT_SUBTYPE_SUBPICTURE\t\t\t\t\\\n\t0xe06d802dL,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x5f,0x6c,0xbb,0xea\nDEFINE_GUIDSTRUCT(\"e06d802d-db46-11cf-b4d1-00805f6cbbea\",KSDATAFORMAT_SUBTYPE_SUBPICTURE);\n#define KSDATAFORMAT_SUBTYPE_SUBPICTURE DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_SUBPICTURE)\n\n#define STATIC_KSPROPSETID_DvdSubPic\t\t\t\t\t\\\n\t0xac390460L,0x43af,0x11d0,0xbd,0x6a,0x00,0x35,0x05,0xc1,0x03,0xa9\nDEFINE_GUIDSTRUCT(\"ac390460-43af-11d0-bd6a-003505c103a9\",KSPROPSETID_DvdSubPic);\n#define KSPROPSETID_DvdSubPic DEFINE_GUIDNAMED(KSPROPSETID_DvdSubPic)\n\ntypedef enum {\n  KSPROPERTY_DVDSUBPIC_PALETTE,\n  KSPROPERTY_DVDSUBPIC_HLI,\n  KSPROPERTY_DVDSUBPIC_COMPOSIT_ON\n} KSPROPERTY_DVDSUBPIC;\n\ntypedef struct _KS_DVD_YCrCb {\n  UCHAR Reserved;\n  UCHAR Y;\n  UCHAR Cr;\n  UCHAR Cb;\n} KS_DVD_YCrCb,*PKS_DVD_YCrCb;\n\ntypedef struct _KS_DVD_YUV {\n  UCHAR Reserved;\n  UCHAR Y;\n  UCHAR V;\n  UCHAR U;\n} KS_DVD_YUV,*PKS_DVD_YUV;\n\ntypedef struct _KSPROPERTY_SPPAL {\n  KS_DVD_YUV sppal[16];\n} KSPROPERTY_SPPAL,*PKSPROPERTY_SPPAL;\n\ntypedef struct _KS_COLCON {\n  UCHAR emph1col:4;\n  UCHAR emph2col:4;\n  UCHAR backcol:4;\n  UCHAR patcol:4;\n  UCHAR emph1con:4;\n  UCHAR emph2con:4;\n  UCHAR backcon:4;\n  UCHAR patcon:4;\n} KS_COLCON,*PKS_COLCON;\n\ntypedef struct _KSPROPERTY_SPHLI {\n  USHORT HLISS;\n  USHORT Reserved;\n  ULONG StartPTM;\n  ULONG EndPTM;\n  USHORT StartX;\n  USHORT StartY;\n  USHORT StopX;\n  USHORT StopY;\n  KS_COLCON ColCon;\n} KSPROPERTY_SPHLI,*PKSPROPERTY_SPHLI;\n\ntypedef WINBOOL KSPROPERTY_COMPOSIT_ON,*PKSPROPERTY_COMPOSIT_ON;\n\n#define STATIC_KSPROPSETID_CopyProt\t\t\t\t\t\\\n\t0x0E8A0A40L,0x6AEF,0x11D0,0x9E,0xD0,0x00,0xA0,0x24,0xCA,0x19,0xB3\nDEFINE_GUIDSTRUCT(\"0E8A0A40-6AEF-11D0-9ED0-00A024CA19B3\",KSPROPSETID_CopyProt);\n#define KSPROPSETID_CopyProt DEFINE_GUIDNAMED(KSPROPSETID_CopyProt)\n\ntypedef enum {\n  KSPROPERTY_DVDCOPY_CHLG_KEY = 0x01,\n  KSPROPERTY_DVDCOPY_DVD_KEY1,\n  KSPROPERTY_DVDCOPY_DEC_KEY2,\n  KSPROPERTY_DVDCOPY_TITLE_KEY,\n  KSPROPERTY_COPY_MACROVISION,\n  KSPROPERTY_DVDCOPY_REGION,\n  KSPROPERTY_DVDCOPY_SET_COPY_STATE,\n  KSPROPERTY_DVDCOPY_DISC_KEY = 0x80\n} KSPROPERTY_COPYPROT;\n\ntypedef struct _KS_DVDCOPY_CHLGKEY {\n  BYTE ChlgKey[10];\n  BYTE Reserved[2];\n} KS_DVDCOPY_CHLGKEY,*PKS_DVDCOPY_CHLGKEY;\n\ntypedef struct _KS_DVDCOPY_BUSKEY {\n  BYTE BusKey[5];\n  BYTE Reserved[1];\n} KS_DVDCOPY_BUSKEY,*PKS_DVDCOPY_BUSKEY;\n\ntypedef struct _KS_DVDCOPY_DISCKEY {\n  BYTE DiscKey[2048];\n} KS_DVDCOPY_DISCKEY,*PKS_DVDCOPY_DISCKEY;\n\ntypedef struct _KS_DVDCOPY_REGION {\n  UCHAR Reserved;\n  UCHAR RegionData;\n  UCHAR Reserved2[2];\n} KS_DVDCOPY_REGION,*PKS_DVDCOPY_REGION;\n\ntypedef struct _KS_DVDCOPY_TITLEKEY {\n  ULONG KeyFlags;\n  ULONG ReservedNT[2];\n  UCHAR TitleKey[6];\n  UCHAR Reserved[2];\n} KS_DVDCOPY_TITLEKEY,*PKS_DVDCOPY_TITLEKEY;\n\ntypedef struct _KS_COPY_MACROVISION {\n  ULONG MACROVISIONLevel;\n} KS_COPY_MACROVISION,*PKS_COPY_MACROVISION;\n\ntypedef struct _KS_DVDCOPY_SET_COPY_STATE {\n  ULONG DVDCopyState;\n} KS_DVDCOPY_SET_COPY_STATE,*PKS_DVDCOPY_SET_COPY_STATE;\n\ntypedef enum {\n  KS_DVDCOPYSTATE_INITIALIZE,\n  KS_DVDCOPYSTATE_INITIALIZE_TITLE,\n  KS_DVDCOPYSTATE_AUTHENTICATION_NOT_REQUIRED,\n  KS_DVDCOPYSTATE_AUTHENTICATION_REQUIRED,\n  KS_DVDCOPYSTATE_DONE\n} KS_DVDCOPYSTATE;\n\ntypedef enum {\n  KS_MACROVISION_DISABLED,\n  KS_MACROVISION_LEVEL1,\n  KS_MACROVISION_LEVEL2,\n  KS_MACROVISION_LEVEL3\n} KS_COPY_MACROVISION_LEVEL,*PKS_COPY_MACROVISION_LEVEL;\n\n#define KS_DVD_CGMS_RESERVED_MASK\t0x00000078\n\n#define KS_DVD_CGMS_COPY_PROTECT_MASK\t0x00000018\n#define KS_DVD_CGMS_COPY_PERMITTED\t0x00000000\n#define KS_DVD_CGMS_COPY_ONCE\t\t0x00000010\n#define KS_DVD_CGMS_NO_COPY\t\t0x00000018\n\n#define KS_DVD_COPYRIGHT_MASK\t\t0x00000040\n#define KS_DVD_NOT_COPYRIGHTED\t\t0x00000000\n#define KS_DVD_COPYRIGHTED\t\t0x00000040\n\n#define KS_DVD_SECTOR_PROTECT_MASK\t0x00000020\n#define KS_DVD_SECTOR_NOT_PROTECTED\t0x00000000\n#define KS_DVD_SECTOR_PROTECTED\t\t0x00000020\n\n#define STATIC_KSCATEGORY_TVTUNER\t\t\t\t\t\\\n\t0xa799a800L,0xa46d,0x11d0,0xa1,0x8c,0x00,0xa0,0x24,0x01,0xdc,0xd4\nDEFINE_GUIDSTRUCT(\"a799a800-a46d-11d0-a18c-00a02401dcd4\",KSCATEGORY_TVTUNER);\n#define KSCATEGORY_TVTUNER DEFINE_GUIDNAMED(KSCATEGORY_TVTUNER)\n\n#define STATIC_KSCATEGORY_CROSSBAR\t\t\t\t\t\\\n\t0xa799a801L,0xa46d,0x11d0,0xa1,0x8c,0x00,0xa0,0x24,0x01,0xdc,0xd4\nDEFINE_GUIDSTRUCT(\"a799a801-a46d-11d0-a18c-00a02401dcd4\",KSCATEGORY_CROSSBAR);\n#define KSCATEGORY_CROSSBAR DEFINE_GUIDNAMED(KSCATEGORY_CROSSBAR)\n\n#define STATIC_KSCATEGORY_TVAUDIO\t\t\t\t\t\\\n\t0xa799a802L,0xa46d,0x11d0,0xa1,0x8c,0x00,0xa0,0x24,0x01,0xdc,0xd4\nDEFINE_GUIDSTRUCT(\"a799a802-a46d-11d0-a18c-00a02401dcd4\",KSCATEGORY_TVAUDIO);\n#define KSCATEGORY_TVAUDIO DEFINE_GUIDNAMED(KSCATEGORY_TVAUDIO)\n\n#define STATIC_KSCATEGORY_VPMUX\t\t\t\t\t\t\\\n\t0xa799a803L,0xa46d,0x11d0,0xa1,0x8c,0x00,0xa0,0x24,0x01,0xdc,0xd4\nDEFINE_GUIDSTRUCT(\"a799a803-a46d-11d0-a18c-00a02401dcd4\",KSCATEGORY_VPMUX);\n#define KSCATEGORY_VPMUX DEFINE_GUIDNAMED(KSCATEGORY_VPMUX)\n\n#define STATIC_KSCATEGORY_VBICODEC\t\t\t\t\t\\\n\t0x07dad660L,0x22f1,0x11d1,0xa9,0xf4,0x00,0xc0,0x4f,0xbb,0xde,0x8f\nDEFINE_GUIDSTRUCT(\"07dad660-22f1-11d1-a9f4-00c04fbbde8f\",KSCATEGORY_VBICODEC);\n#define KSCATEGORY_VBICODEC DEFINE_GUIDNAMED(KSCATEGORY_VBICODEC)\n\n#define STATIC_KSDATAFORMAT_SUBTYPE_VPVideo\t\t\t\t\\\n\t0x5a9b6a40L,0x1a22,0x11d1,0xba,0xd9,0x0,0x60,0x97,0x44,0x11,0x1a\nDEFINE_GUIDSTRUCT(\"5a9b6a40-1a22-11d1-bad9-00609744111a\",KSDATAFORMAT_SUBTYPE_VPVideo);\n#define KSDATAFORMAT_SUBTYPE_VPVideo DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_VPVideo)\n\n#define STATIC_KSDATAFORMAT_SUBTYPE_VPVBI\t\t\t\t\\\n\t0x5a9b6a41L,0x1a22,0x11d1,0xba,0xd9,0x0,0x60,0x97,0x44,0x11,0x1a\nDEFINE_GUIDSTRUCT(\"5a9b6a41-1a22-11d1-bad9-00609744111a\",KSDATAFORMAT_SUBTYPE_VPVBI);\n#define KSDATAFORMAT_SUBTYPE_VPVBI DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_VPVBI)\n\n#define STATIC_KSDATAFORMAT_SPECIFIER_VIDEOINFO\t\t\t\t\\\n\t0x05589f80L,0xc356,0x11ce,0xbf,0x01,0x00,0xaa,0x00,0x55,0x59,0x5a\nDEFINE_GUIDSTRUCT(\"05589f80-c356-11ce-bf01-00aa0055595a\",KSDATAFORMAT_SPECIFIER_VIDEOINFO);\n#define KSDATAFORMAT_SPECIFIER_VIDEOINFO DEFINE_GUIDNAMED(KSDATAFORMAT_SPECIFIER_VIDEOINFO)\n\n#define STATIC_KSDATAFORMAT_SPECIFIER_VIDEOINFO2\t\t\t\\\n\t0xf72a76A0L,0xeb0a,0x11d0,0xac,0xe4,0x00,0x00,0xc0,0xcc,0x16,0xba\nDEFINE_GUIDSTRUCT(\"f72a76A0-eb0a-11d0-ace4-0000c0cc16ba\",KSDATAFORMAT_SPECIFIER_VIDEOINFO2);\n#define KSDATAFORMAT_SPECIFIER_VIDEOINFO2 DEFINE_GUIDNAMED(KSDATAFORMAT_SPECIFIER_VIDEOINFO2)\n\n#define STATIC_KSDATAFORMAT_TYPE_ANALOGVIDEO\t\t\t\t\\\n\t0x0482dde1L,0x7817,0x11cf,0x8a,0x03,0x00,0xaa,0x00,0x6e,0xcb,0x65\nDEFINE_GUIDSTRUCT(\"0482dde1-7817-11cf-8a03-00aa006ecb65\",KSDATAFORMAT_TYPE_ANALOGVIDEO);\n#define KSDATAFORMAT_TYPE_ANALOGVIDEO DEFINE_GUIDNAMED(KSDATAFORMAT_TYPE_ANALOGVIDEO)\n\n#define STATIC_KSDATAFORMAT_SPECIFIER_ANALOGVIDEO\t\t\t\\\n\t0x0482dde0L,0x7817,0x11cf,0x8a,0x03,0x00,0xaa,0x00,0x6e,0xcb,0x65\nDEFINE_GUIDSTRUCT(\"0482dde0-7817-11cf-8a03-00aa006ecb65\",KSDATAFORMAT_SPECIFIER_ANALOGVIDEO);\n#define KSDATAFORMAT_SPECIFIER_ANALOGVIDEO DEFINE_GUIDNAMED(KSDATAFORMAT_SPECIFIER_ANALOGVIDEO)\n\n#define STATIC_KSDATAFORMAT_TYPE_ANALOGAUDIO\t\t\t\t\\\n\t0x0482dee1L,0x7817,0x11cf,0x8a,0x03,0x00,0xaa,0x00,0x6e,0xcb,0x65\nDEFINE_GUIDSTRUCT(\"0482DEE1-7817-11cf-8a03-00aa006ecb65\",KSDATAFORMAT_TYPE_ANALOGAUDIO);\n#define KSDATAFORMAT_TYPE_ANALOGAUDIO DEFINE_GUIDNAMED(KSDATAFORMAT_TYPE_ANALOGAUDIO)\n\n#define STATIC_KSDATAFORMAT_SPECIFIER_VBI\t\t\t\t\\\n\t0xf72a76e0L,0xeb0a,0x11d0,0xac,0xe4,0x00,0x00,0xc0,0xcc,0x16,0xba\nDEFINE_GUIDSTRUCT(\"f72a76e0-eb0a-11d0-ace4-0000c0cc16ba\",KSDATAFORMAT_SPECIFIER_VBI);\n#define KSDATAFORMAT_SPECIFIER_VBI DEFINE_GUIDNAMED(KSDATAFORMAT_SPECIFIER_VBI)\n\n#define STATIC_KSDATAFORMAT_TYPE_VBI\t\t\t\t\t\\\n\t0xf72a76e1L,0xeb0a,0x11d0,0xac,0xe4,0x00,0x00,0xc0,0xcc,0x16,0xba\nDEFINE_GUIDSTRUCT(\"f72a76e1-eb0a-11d0-ace4-0000c0cc16ba\",KSDATAFORMAT_TYPE_VBI);\n#define KSDATAFORMAT_TYPE_VBI DEFINE_GUIDNAMED(KSDATAFORMAT_TYPE_VBI)\n\n#define STATIC_KSDATAFORMAT_SUBTYPE_RAW8\t\t\t\t\\\n\t0xca20d9a0,0x3e3e,0x11d1,0x9b,0xf9,0x0,0xc0,0x4f,0xbb,0xde,0xbf\nDEFINE_GUIDSTRUCT(\"ca20d9a0-3e3e-11d1-9bf9-00c04fbbdebf\",KSDATAFORMAT_SUBTYPE_RAW8);\n#define KSDATAFORMAT_SUBTYPE_RAW8 DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_RAW8)\n\n#define STATIC_KSDATAFORMAT_SUBTYPE_CC\t\t\t\t\t\\\n\t0x33214cc1,0x11f,0x11d2,0xb4,0xb1,0x0,0xa0,0xd1,0x2,0xcf,0xbe\nDEFINE_GUIDSTRUCT(\"33214CC1-011F-11D2-B4B1-00A0D102CFBE\",KSDATAFORMAT_SUBTYPE_CC);\n#define KSDATAFORMAT_SUBTYPE_CC DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_CC)\n\n#define STATIC_KSDATAFORMAT_SUBTYPE_NABTS\t\t\t\t\\\n\t0xf72a76e2L,0xeb0a,0x11d0,0xac,0xe4,0x00,0x00,0xc0,0xcc,0x16,0xba\nDEFINE_GUIDSTRUCT(\"f72a76e2-eb0a-11d0-ace4-0000c0cc16ba\",KSDATAFORMAT_SUBTYPE_NABTS);\n#define KSDATAFORMAT_SUBTYPE_NABTS DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_NABTS)\n\n#define STATIC_KSDATAFORMAT_SUBTYPE_TELETEXT\t\t\t\t\\\n\t0xf72a76e3L,0xeb0a,0x11d0,0xac,0xe4,0x00,0x00,0xc0,0xcc,0x16,0xba\nDEFINE_GUIDSTRUCT(\"f72a76e3-eb0a-11d0-ace4-0000c0cc16ba\",KSDATAFORMAT_SUBTYPE_TELETEXT);\n#define KSDATAFORMAT_SUBTYPE_TELETEXT DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_TELETEXT)\n\n#define KS_BI_RGB\t\t0L\n#define KS_BI_RLE8\t\t1L\n#define KS_BI_RLE4\t\t2L\n#define KS_BI_BITFIELDS\t\t3L\n\ntypedef struct tagKS_RGBQUAD {\n  BYTE rgbBlue;\n  BYTE rgbGreen;\n  BYTE rgbRed;\n  BYTE rgbReserved;\n} KS_RGBQUAD,*PKS_RGBQUAD;\n\n#define KS_iPALETTE_COLORS\t256\n#define KS_iEGA_COLORS\t\t16\n#define KS_iMASK_COLORS\t\t3\n#define KS_iTRUECOLOR\t\t16\n#define KS_iRED\t\t\t0\n#define KS_iGREEN\t\t1\n#define KS_iBLUE\t\t2\n#define KS_iPALETTE\t\t8\n#define KS_iMAXBITS\t\t8\n#define KS_SIZE_EGA_PALETTE\t(KS_iEGA_COLORS *sizeof(KS_RGBQUAD))\n#define KS_SIZE_PALETTE\t\t(KS_iPALETTE_COLORS *sizeof(KS_RGBQUAD))\n\ntypedef struct tagKS_BITMAPINFOHEADER {\n  DWORD biSize;\n  LONG biWidth;\n  LONG biHeight;\n  WORD biPlanes;\n  WORD biBitCount;\n  DWORD biCompression;\n  DWORD biSizeImage;\n  LONG biXPelsPerMeter;\n  LONG biYPelsPerMeter;\n  DWORD biClrUsed;\n  DWORD biClrImportant;\n} KS_BITMAPINFOHEADER,*PKS_BITMAPINFOHEADER;\n\ntypedef struct tag_KS_TRUECOLORINFO {\n  DWORD dwBitMasks[KS_iMASK_COLORS];\n  KS_RGBQUAD bmiColors[KS_iPALETTE_COLORS];\n} KS_TRUECOLORINFO,*PKS_TRUECOLORINFO;\n\n#define KS_WIDTHBYTES(bits)\t((DWORD)(((bits)+31) & (~31)) / 8)\n#define KS_DIBWIDTHBYTES(bi)\t(DWORD)KS_WIDTHBYTES((DWORD)(bi).biWidth *(DWORD)(bi).biBitCount)\n#define KS__DIBSIZE(bi)\t\t(KS_DIBWIDTHBYTES(bi) *(DWORD)(bi).biHeight)\n#define KS_DIBSIZE(bi)\t\t((bi).biHeight < 0 ? (-1)*(KS__DIBSIZE(bi)) : KS__DIBSIZE(bi))\n\ntypedef LONGLONG REFERENCE_TIME;\n\ntypedef struct tagKS_VIDEOINFOHEADER {\n  RECT rcSource;\n  RECT rcTarget;\n  DWORD dwBitRate;\n  DWORD dwBitErrorRate;\n  REFERENCE_TIME AvgTimePerFrame;\n  KS_BITMAPINFOHEADER bmiHeader;\n} KS_VIDEOINFOHEADER,*PKS_VIDEOINFOHEADER;\n\ntypedef struct tagKS_VIDEOINFO {\n  RECT rcSource;\n  RECT rcTarget;\n  DWORD dwBitRate;\n  DWORD dwBitErrorRate;\n  REFERENCE_TIME AvgTimePerFrame;\n  KS_BITMAPINFOHEADER bmiHeader;\n  __MINGW_EXTENSION union {\n    KS_RGBQUAD bmiColors[KS_iPALETTE_COLORS];\n    DWORD dwBitMasks[KS_iMASK_COLORS];\n    KS_TRUECOLORINFO TrueColorInfo;\n  };\n} KS_VIDEOINFO,*PKS_VIDEOINFO;\n\n#define KS_SIZE_MASKS\t\t\t(KS_iMASK_COLORS *sizeof(DWORD))\n#define KS_SIZE_PREHEADER\t\t(FIELD_OFFSET(KS_VIDEOINFOHEADER,bmiHeader))\n\n#define KS_SIZE_VIDEOHEADER(pbmi)\t((pbmi)->bmiHeader.biSize + KS_SIZE_PREHEADER)\n\ntypedef struct tagKS_VBIINFOHEADER {\n  ULONG StartLine;\n  ULONG EndLine;\n  ULONG SamplingFrequency;\n  ULONG MinLineStartTime;\n  ULONG MaxLineStartTime;\n  ULONG ActualLineStartTime;\n  ULONG ActualLineEndTime;\n  ULONG VideoStandard;\n  ULONG SamplesPerLine;\n  ULONG StrideInBytes;\n  ULONG BufferSize;\n} KS_VBIINFOHEADER,*PKS_VBIINFOHEADER;\n\n#define KS_VBIDATARATE_NABTS\t\t(5727272L)\n#define KS_VBIDATARATE_CC\t\t(503493L)\n#define KS_VBISAMPLINGRATE_4X_NABTS\t((long)(4*KS_VBIDATARATE_NABTS))\n#define KS_VBISAMPLINGRATE_47X_NABTS\t((long)(27000000))\n#define KS_VBISAMPLINGRATE_5X_NABTS\t((long)(5*KS_VBIDATARATE_NABTS))\n\n#define KS_47NABTS_SCALER\t\t(KS_VBISAMPLINGRATE_47X_NABTS/(double)KS_VBIDATARATE_NABTS)\n\ntypedef struct tagKS_AnalogVideoInfo {\n  RECT rcSource;\n  RECT rcTarget;\n  DWORD dwActiveWidth;\n  DWORD dwActiveHeight;\n  REFERENCE_TIME AvgTimePerFrame;\n} KS_ANALOGVIDEOINFO,*PKS_ANALOGVIDEOINFO;\n\n#define KS_TVTUNER_CHANGE_BEGIN_TUNE\t0x0001L\n#define KS_TVTUNER_CHANGE_END_TUNE\t0x0002L\n\ntypedef struct tagKS_TVTUNER_CHANGE_INFO {\n  DWORD dwFlags;\n  DWORD dwCountryCode;\n  DWORD dwAnalogVideoStandard;\n  DWORD dwChannel;\n} KS_TVTUNER_CHANGE_INFO,*PKS_TVTUNER_CHANGE_INFO;\n\ntypedef enum {\n  KS_MPEG2Level_Low,\n  KS_MPEG2Level_Main,\n  KS_MPEG2Level_High1440,\n  KS_MPEG2Level_High\n} KS_MPEG2Level;\n\ntypedef enum {\n  KS_MPEG2Profile_Simple,\n  KS_MPEG2Profile_Main,\n  KS_MPEG2Profile_SNRScalable,\n  KS_MPEG2Profile_SpatiallyScalable,\n  KS_MPEG2Profile_High\n} KS_MPEG2Profile;\n\n#define KS_INTERLACE_IsInterlaced\t\t0x00000001\n#define KS_INTERLACE_1FieldPerSample\t\t0x00000002\n#define KS_INTERLACE_Field1First\t\t0x00000004\n#define KS_INTERLACE_UNUSED\t\t\t0x00000008\n#define KS_INTERLACE_FieldPatternMask\t\t0x00000030\n#define KS_INTERLACE_FieldPatField1Only\t\t0x00000000\n#define KS_INTERLACE_FieldPatField2Only\t\t0x00000010\n#define KS_INTERLACE_FieldPatBothRegular\t0x00000020\n#define KS_INTERLACE_FieldPatBothIrregular\t0x00000030\n#define KS_INTERLACE_DisplayModeMask\t\t0x000000c0\n#define KS_INTERLACE_DisplayModeBobOnly\t\t0x00000000\n#define KS_INTERLACE_DisplayModeWeaveOnly\t0x00000040\n#define KS_INTERLACE_DisplayModeBobOrWeave\t0x00000080\n\n#define KS_MPEG2_DoPanScan\t\t\t0x00000001\n#define KS_MPEG2_DVDLine21Field1\t\t0x00000002\n#define KS_MPEG2_DVDLine21Field2\t\t0x00000004\n#define KS_MPEG2_SourceIsLetterboxed\t\t0x00000008\n#define KS_MPEG2_FilmCameraMode\t\t\t0x00000010\n#define KS_MPEG2_LetterboxAnalogOut\t\t0x00000020\n#define KS_MPEG2_DSS_UserData\t\t\t0x00000040\n#define KS_MPEG2_DVB_UserData\t\t\t0x00000080\n#define KS_MPEG2_27MhzTimebase\t\t\t0x00000100\n\ntypedef struct tagKS_VIDEOINFOHEADER2 {\n  RECT rcSource;\n  RECT rcTarget;\n  DWORD dwBitRate;\n  DWORD dwBitErrorRate;\n  REFERENCE_TIME AvgTimePerFrame;\n  DWORD dwInterlaceFlags;\n  DWORD dwCopyProtectFlags;\n  DWORD dwPictAspectRatioX;\n  DWORD dwPictAspectRatioY;\n  DWORD dwReserved1;\n  DWORD dwReserved2;\n  KS_BITMAPINFOHEADER bmiHeader;\n} KS_VIDEOINFOHEADER2,*PKS_VIDEOINFOHEADER2;\n\ntypedef struct tagKS_MPEG1VIDEOINFO {\n  KS_VIDEOINFOHEADER hdr;\n  DWORD dwStartTimeCode;\n  DWORD cbSequenceHeader;\n  BYTE bSequenceHeader[1];\n} KS_MPEG1VIDEOINFO,*PKS_MPEG1VIDEOINFO;\n\n#define KS_MAX_SIZE_MPEG1_SEQUENCE_INFO\t140\n#define KS_SIZE_MPEG1VIDEOINFO(pv)\t(FIELD_OFFSET(KS_MPEG1VIDEOINFO,bSequenceHeader[0]) + (pv)->cbSequenceHeader)\n#define KS_MPEG1_SEQUENCE_INFO(pv)\t((const BYTE *)(pv)->bSequenceHeader)\n\ntypedef struct tagKS_MPEGVIDEOINFO2 {\n  KS_VIDEOINFOHEADER2 hdr;\n  DWORD dwStartTimeCode;\n  DWORD cbSequenceHeader;\n  DWORD dwProfile;\n  DWORD dwLevel;\n  DWORD dwFlags;\n  DWORD bSequenceHeader[1];\n} KS_MPEGVIDEOINFO2,*PKS_MPEGVIDEOINFO2;\n\n#define KS_SIZE_MPEGVIDEOINFO2(pv)\t(FIELD_OFFSET(KS_MPEGVIDEOINFO2,bSequenceHeader[0]) + (pv)->cbSequenceHeader)\n#define KS_MPEG1_SEQUENCE_INFO(pv)\t((const BYTE *)(pv)->bSequenceHeader)\n\n#define KS_MPEGAUDIOINFO_27MhzTimebase\t0x00000001\n\ntypedef struct tagKS_MPEAUDIOINFO {\n  DWORD dwFlags;\n  DWORD dwReserved1;\n  DWORD dwReserved2;\n  DWORD dwReserved3;\n} KS_MPEGAUDIOINFO,*PKS_MPEGAUDIOINFO;\n\ntypedef struct tagKS_DATAFORMAT_VIDEOINFOHEADER {\n  KSDATAFORMAT DataFormat;\n  KS_VIDEOINFOHEADER VideoInfoHeader;\n} KS_DATAFORMAT_VIDEOINFOHEADER,*PKS_DATAFORMAT_VIDEOINFOHEADER;\n\ntypedef struct tagKS_DATAFORMAT_VIDEOINFOHEADER2 {\n  KSDATAFORMAT DataFormat;\n  KS_VIDEOINFOHEADER2 VideoInfoHeader2;\n} KS_DATAFORMAT_VIDEOINFOHEADER2,*PKS_DATAFORMAT_VIDEOINFOHEADER2;\n\ntypedef struct tagKS_DATAFORMAT_VIDEOINFO_PALETTE {\n  KSDATAFORMAT DataFormat;\n  KS_VIDEOINFO VideoInfo;\n} KS_DATAFORMAT_VIDEOINFO_PALETTE,*PKS_DATAFORMAT_VIDEOINFO_PALETTE;\n\ntypedef struct tagKS_DATAFORMAT_VBIINFOHEADER {\n  KSDATAFORMAT DataFormat;\n  KS_VBIINFOHEADER VBIInfoHeader;\n} KS_DATAFORMAT_VBIINFOHEADER,*PKS_DATAFORMAT_VBIINFOHEADER;\n\ntypedef struct _KS_VIDEO_STREAM_CONFIG_CAPS {\n  GUID guid;\n  ULONG VideoStandard;\n  SIZE InputSize;\n  SIZE MinCroppingSize;\n  SIZE MaxCroppingSize;\n  int CropGranularityX;\n  int CropGranularityY;\n  int CropAlignX;\n  int CropAlignY;\n  SIZE MinOutputSize;\n  SIZE MaxOutputSize;\n  int OutputGranularityX;\n  int OutputGranularityY;\n  int StretchTapsX;\n  int StretchTapsY;\n  int ShrinkTapsX;\n  int ShrinkTapsY;\n  LONGLONG MinFrameInterval;\n  LONGLONG MaxFrameInterval;\n  LONG MinBitsPerSecond;\n  LONG MaxBitsPerSecond;\n} KS_VIDEO_STREAM_CONFIG_CAPS,*PKS_VIDEO_STREAM_CONFIG_CAPS;\n\ntypedef struct tagKS_DATARANGE_VIDEO {\n  KSDATARANGE DataRange;\n  WINBOOL bFixedSizeSamples;\n  WINBOOL bTemporalCompression;\n  DWORD StreamDescriptionFlags;\n  DWORD MemoryAllocationFlags;\n  KS_VIDEO_STREAM_CONFIG_CAPS ConfigCaps;\n  KS_VIDEOINFOHEADER VideoInfoHeader;\n} KS_DATARANGE_VIDEO,*PKS_DATARANGE_VIDEO;\n\ntypedef struct tagKS_DATARANGE_VIDEO2 {\n  KSDATARANGE DataRange;\n  WINBOOL bFixedSizeSamples;\n  WINBOOL bTemporalCompression;\n  DWORD StreamDescriptionFlags;\n  DWORD MemoryAllocationFlags;\n  KS_VIDEO_STREAM_CONFIG_CAPS ConfigCaps;\n  KS_VIDEOINFOHEADER2 VideoInfoHeader;\n} KS_DATARANGE_VIDEO2,*PKS_DATARANGE_VIDEO2;\n\ntypedef struct tagKS_DATARANGE_MPEG1_VIDEO {\n  KSDATARANGE DataRange;\n  WINBOOL bFixedSizeSamples;\n  WINBOOL bTemporalCompression;\n  DWORD StreamDescriptionFlags;\n  DWORD MemoryAllocationFlags;\n  KS_VIDEO_STREAM_CONFIG_CAPS ConfigCaps;\n  KS_MPEG1VIDEOINFO VideoInfoHeader;\n} KS_DATARANGE_MPEG1_VIDEO,*PKS_DATARANGE_MPEG1_VIDEO;\n\ntypedef struct tagKS_DATARANGE_MPEG2_VIDEO {\n  KSDATARANGE DataRange;\n  WINBOOL bFixedSizeSamples;\n  WINBOOL bTemporalCompression;\n  DWORD StreamDescriptionFlags;\n  DWORD MemoryAllocationFlags;\n  KS_VIDEO_STREAM_CONFIG_CAPS ConfigCaps;\n  KS_MPEGVIDEOINFO2 VideoInfoHeader;\n} KS_DATARANGE_MPEG2_VIDEO,*PKS_DATARANGE_MPEG2_VIDEO;\n\ntypedef struct tagKS_DATARANGE_VIDEO_PALETTE {\n  KSDATARANGE DataRange;\n  WINBOOL bFixedSizeSamples;\n  WINBOOL bTemporalCompression;\n  DWORD StreamDescriptionFlags;\n  DWORD MemoryAllocationFlags;\n  KS_VIDEO_STREAM_CONFIG_CAPS ConfigCaps;\n  KS_VIDEOINFO VideoInfo;\n} KS_DATARANGE_VIDEO_PALETTE,*PKS_DATARANGE_VIDEO_PALETTE;\n\ntypedef struct tagKS_DATARANGE_VIDEO_VBI {\n  KSDATARANGE DataRange;\n  WINBOOL bFixedSizeSamples;\n  WINBOOL bTemporalCompression;\n  DWORD StreamDescriptionFlags;\n  DWORD MemoryAllocationFlags;\n  KS_VIDEO_STREAM_CONFIG_CAPS ConfigCaps;\n  KS_VBIINFOHEADER VBIInfoHeader;\n} KS_DATARANGE_VIDEO_VBI,*PKS_DATARANGE_VIDEO_VBI;\n\ntypedef struct tagKS_DATARANGE_ANALOGVIDEO {\n  KSDATARANGE DataRange;\n  KS_ANALOGVIDEOINFO AnalogVideoInfo;\n} KS_DATARANGE_ANALOGVIDEO,*PKS_DATARANGE_ANALOGVIDEO;\n\n#define KS_VIDEOSTREAM_PREVIEW\t\t0x0001\n#define KS_VIDEOSTREAM_CAPTURE\t\t0x0002\n#define KS_VIDEOSTREAM_VBI\t\t0x0010\n#define KS_VIDEOSTREAM_NABTS\t\t0x0020\n#define KS_VIDEOSTREAM_CC\t\t0x0100\n#define KS_VIDEOSTREAM_EDS\t\t0x0200\n#define KS_VIDEOSTREAM_TELETEXT\t\t0x0400\n#define KS_VIDEOSTREAM_STILL\t\t0x1000\n#define KS_VIDEOSTREAM_IS_VPE\t\t0x8000\n\n#define KS_VIDEO_ALLOC_VPE_SYSTEM\t0x0001\n#define KS_VIDEO_ALLOC_VPE_DISPLAY\t0x0002\n#define KS_VIDEO_ALLOC_VPE_AGP\t\t0x0004\n\n#define STATIC_KSPROPSETID_VBICAP_PROPERTIES\t\t\t\t\\\n\t0xf162c607,0x7b35,0x496f,0xad,0x7f,0x2d,0xca,0x3b,0x46,0xb7,0x18\nDEFINE_GUIDSTRUCT(\"F162C607-7B35-496f-AD7F-2DCA3B46B718\",KSPROPSETID_VBICAP_PROPERTIES);\n#define KSPROPSETID_VBICAP_PROPERTIES DEFINE_GUIDNAMED(KSPROPSETID_VBICAP_PROPERTIES)\n\ntypedef enum {\n  KSPROPERTY_VBICAP_PROPERTIES_PROTECTION = 0x01\n} KSPROPERTY_VBICAP;\n\ntypedef struct _VBICAP_PROPERTIES_PROTECTION_S {\n  KSPROPERTY Property;\n  ULONG StreamIndex;\n  ULONG Status;\n} VBICAP_PROPERTIES_PROTECTION_S,*PVBICAP_PROPERTIES_PROTECTION_S;\n\n#define KS_VBICAP_PROTECTION_MV_PRESENT\t\t\t\t0x0001L\n#define KS_VBICAP_PROTECTION_MV_HARDWARE\t\t\t0x0002L\n#define KS_VBICAP_PROTECTION_MV_DETECTED\t\t\t0x0004L\n\n#define KS_NABTS_GROUPID_ORIGINAL_CONTENT_BASE\t\t\t0x800\n#define KS_NABTS_GROUPID_ORIGINAL_CONTENT_ADVERTISER_BASE\t0x810\n\n#define KS_NABTS_GROUPID_PRODUCTION_COMPANY_CONTENT_BASE\t0x820\n#define KS_NABTS_GROUPID_PRODUCTION_COMPANY_ADVERTISER_BASE\t0x830\n\n#define KS_NABTS_GROUPID_SYNDICATED_SHOW_CONTENT_BASE\t\t0x840\n#define KS_NABTS_GROUPID_SYNDICATED_SHOW_ADVERTISER_BASE\t0x850\n\n#define KS_NABTS_GROUPID_NETWORK_WIDE_CONTENT_BASE\t\t0x860\n#define KS_NABTS_GROUPID_NETWORK_WIDE_ADVERTISER_BASE\t\t0x870\n\n#define KS_NABTS_GROUPID_TELEVISION_STATION_CONTENT_BASE\t0x880\n#define KS_NABTS_GROUPID_TELEVISION_STATION_ADVERTISER_BASE\t0x890\n\n#define KS_NABTS_GROUPID_LOCAL_CABLE_SYSTEM_CONTENT_BASE\t0x8A0\n#define KS_NABTS_GROUPID_LOCAL_CABLE_SYSTEM_ADVERTISER_BASE\t0x8B0\n\n#define KS_NABTS_GROUPID_MICROSOFT_RESERVED_TEST_DATA_BASE\t0x8F0\n\n#define STATIC_KSDATAFORMAT_TYPE_NABTS\t\t\t\t\t\\\n\t0xe757bca0,0x39ac,0x11d1,0xa9,0xf5,0x0,0xc0,0x4f,0xbb,0xde,0x8f\nDEFINE_GUIDSTRUCT(\"E757BCA0-39AC-11d1-A9F5-00C04FBBDE8F\",KSDATAFORMAT_TYPE_NABTS);\n#define KSDATAFORMAT_TYPE_NABTS DEFINE_GUIDNAMED(KSDATAFORMAT_TYPE_NABTS)\n\n#define STATIC_KSDATAFORMAT_SUBTYPE_NABTS_FEC\t\t\t\t\\\n\t0xe757bca1,0x39ac,0x11d1,0xa9,0xf5,0x0,0xc0,0x4f,0xbb,0xde,0x8f\nDEFINE_GUIDSTRUCT(\"E757BCA1-39AC-11d1-A9F5-00C04FBBDE8F\",KSDATAFORMAT_SUBTYPE_NABTS_FEC);\n#define KSDATAFORMAT_SUBTYPE_NABTS_FEC DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_NABTS_FEC)\n\n#define MAX_NABTS_VBI_LINES_PER_FIELD\t11\n#define NABTS_LINES_PER_BUNDLE\t\t16\n#define NABTS_PAYLOAD_PER_LINE\t\t28\n#define NABTS_BYTES_PER_LINE\t\t36\n\ntypedef struct _NABTSFEC_BUFFER {\n  ULONG dataSize;\n  USHORT groupID;\n  USHORT Reserved;\n  UCHAR data[NABTS_LINES_PER_BUNDLE *NABTS_PAYLOAD_PER_LINE];\n} NABTSFEC_BUFFER,*PNABTSFEC_BUFFER;\n\n#define STATIC_KSPROPSETID_VBICodecFiltering\t\t\t\t\\\n\t0xcafeb0caL,0x8715,0x11d0,0xbd,0x6a,0x00,0x35,0xc0,0xed,0xba,0xbe\nDEFINE_GUIDSTRUCT(\"cafeb0ca-8715-11d0-bd6a-0035c0edbabe\",KSPROPSETID_VBICodecFiltering);\n#define KSPROPSETID_VBICodecFiltering DEFINE_GUIDNAMED(KSPROPSETID_VBICodecFiltering)\n\ntypedef enum {\n  KSPROPERTY_VBICODECFILTERING_SCANLINES_REQUESTED_BIT_ARRAY = 0x01,\n  KSPROPERTY_VBICODECFILTERING_SCANLINES_DISCOVERED_BIT_ARRAY,\n  KSPROPERTY_VBICODECFILTERING_SUBSTREAMS_REQUESTED_BIT_ARRAY,\n  KSPROPERTY_VBICODECFILTERING_SUBSTREAMS_DISCOVERED_BIT_ARRAY,\n  KSPROPERTY_VBICODECFILTERING_STATISTICS\n} KSPROPERTY_VBICODECFILTERING;\n\ntypedef struct _VBICODECFILTERING_SCANLINES {\n  DWORD DwordBitArray[32];\n} VBICODECFILTERING_SCANLINES,*PVBICODECFILTERING_SCANLINES;\n\ntypedef struct _VBICODECFILTERING_NABTS_SUBSTREAMS {\n  DWORD SubstreamMask[128];\n} VBICODECFILTERING_NABTS_SUBSTREAMS,*PVBICODECFILTERING_NABTS_SUBSTREAMS;\n\ntypedef struct _VBICODECFILTERING_CC_SUBSTREAMS {\n  DWORD SubstreamMask;\n} VBICODECFILTERING_CC_SUBSTREAMS,*PVBICODECFILTERING_CC_SUBSTREAMS;\n\n#define KS_CC_SUBSTREAM_ODD\t\t0x0001L\n#define KS_CC_SUBSTREAM_EVEN\t\t0x0002L\n\n#define KS_CC_SUBSTREAM_FIELD1_MASK\t0x00F0L\n#define KS_CC_SUBSTREAM_SERVICE_CC1\t0x0010L\n#define KS_CC_SUBSTREAM_SERVICE_CC2\t0x0020L\n#define KS_CC_SUBSTREAM_SERVICE_T1\t0x0040L\n#define KS_CC_SUBSTREAM_SERVICE_T2\t0x0080L\n\n#define KS_CC_SUBSTREAM_FIELD2_MASK\t0x1F00L\n#define KS_CC_SUBSTREAM_SERVICE_CC3\t0x0100L\n#define KS_CC_SUBSTREAM_SERVICE_CC4\t0x0200L\n#define KS_CC_SUBSTREAM_SERVICE_T3\t0x0400L\n#define KS_CC_SUBSTREAM_SERVICE_T4\t0x0800L\n#define KS_CC_SUBSTREAM_SERVICE_XDS\t0x1000L\n\n#define CC_MAX_HW_DECODE_LINES\t\t12\ntypedef struct _CC_BYTE_PAIR {\n  BYTE Decoded[2];\n  USHORT Reserved;\n} CC_BYTE_PAIR,*PCC_BYTE_PAIR;\n\ntypedef struct _CC_HW_FIELD {\n  VBICODECFILTERING_SCANLINES ScanlinesRequested;\n  ULONG fieldFlags;\n  LONGLONG PictureNumber;\n  CC_BYTE_PAIR Lines[CC_MAX_HW_DECODE_LINES];\n} CC_HW_FIELD,*PCC_HW_FIELD;\n\n#ifndef PACK_PRAGMAS_NOT_SUPPORTED\n#include <pshpack1.h>\n#endif\ntypedef struct _NABTS_BUFFER_LINE {\n  BYTE Confidence;\n  BYTE Bytes[NABTS_BYTES_PER_LINE];\n} NABTS_BUFFER_LINE,*PNABTS_BUFFER_LINE;\n\n#define NABTS_BUFFER_PICTURENUMBER_SUPPORT\t1\ntypedef struct _NABTS_BUFFER {\n  VBICODECFILTERING_SCANLINES ScanlinesRequested;\n  LONGLONG PictureNumber;\n  NABTS_BUFFER_LINE NabtsLines[MAX_NABTS_VBI_LINES_PER_FIELD];\n} NABTS_BUFFER,*PNABTS_BUFFER;\n#ifndef PACK_PRAGMAS_NOT_SUPPORTED\n#include <poppack.h>\n#endif\n\n#define WST_TVTUNER_CHANGE_BEGIN_TUNE\t0x1000L\n#define WST_TVTUNER_CHANGE_END_TUNE\t0x2000L\n\n#define MAX_WST_VBI_LINES_PER_FIELD\t17\n#define WST_BYTES_PER_LINE\t\t42\n\ntypedef struct _WST_BUFFER_LINE {\n  BYTE Confidence;\n  BYTE Bytes[WST_BYTES_PER_LINE];\n} WST_BUFFER_LINE,*PWST_BUFFER_LINE;\n\ntypedef struct _WST_BUFFER {\n  VBICODECFILTERING_SCANLINES ScanlinesRequested;\n  WST_BUFFER_LINE WstLines[MAX_WST_VBI_LINES_PER_FIELD];\n} WST_BUFFER,*PWST_BUFFER;\n\ntypedef struct _VBICODECFILTERING_STATISTICS_COMMON {\n  DWORD InputSRBsProcessed;\n  DWORD OutputSRBsProcessed;\n  DWORD SRBsIgnored;\n  DWORD InputSRBsMissing;\n  DWORD OutputSRBsMissing;\n  DWORD OutputFailures;\n  DWORD InternalErrors;\n  DWORD ExternalErrors;\n  DWORD InputDiscontinuities;\n  DWORD DSPFailures;\n  DWORD TvTunerChanges;\n  DWORD VBIHeaderChanges;\n  DWORD LineConfidenceAvg;\n  DWORD BytesOutput;\n} VBICODECFILTERING_STATISTICS_COMMON,*PVBICODECFILTERING_STATISTICS_COMMON;\n\ntypedef struct _VBICODECFILTERING_STATISTICS_COMMON_PIN {\n  DWORD SRBsProcessed;\n  DWORD SRBsIgnored;\n  DWORD SRBsMissing;\n  DWORD InternalErrors;\n  DWORD ExternalErrors;\n  DWORD Discontinuities;\n  DWORD LineConfidenceAvg;\n  DWORD BytesOutput;\n} VBICODECFILTERING_STATISTICS_COMMON_PIN,*PVBICODECFILTERING_STATISTICS_COMMON_PIN;\n\ntypedef struct _VBICODECFILTERING_STATISTICS_NABTS {\n  VBICODECFILTERING_STATISTICS_COMMON Common;\n  DWORD FECBundleBadLines;\n  DWORD FECQueueOverflows;\n  DWORD FECCorrectedLines;\n  DWORD FECUncorrectableLines;\n  DWORD BundlesProcessed;\n  DWORD BundlesSent2IP;\n  DWORD FilteredLines;\n} VBICODECFILTERING_STATISTICS_NABTS,*PVBICODECFILTERING_STATISTICS_NABTS;\n\ntypedef struct _VBICODECFILTERING_STATISTICS_NABTS_PIN {\n  VBICODECFILTERING_STATISTICS_COMMON_PIN Common;\n} VBICODECFILTERING_STATISTICS_NABTS_PIN,*PVBICODECFILTERING_STATISTICS_NABTS_PIN;\n\ntypedef struct _VBICODECFILTERING_STATISTICS_CC {\n  VBICODECFILTERING_STATISTICS_COMMON Common;\n} VBICODECFILTERING_STATISTICS_CC,*PVBICODECFILTERING_STATISTICS_CC;\n\ntypedef struct _VBICODECFILTERING_STATISTICS_CC_PIN {\n  VBICODECFILTERING_STATISTICS_COMMON_PIN Common;\n} VBICODECFILTERING_STATISTICS_CC_PIN,*PVBICODECFILTERING_STATISTICS_CC_PIN;\n\ntypedef struct _VBICODECFILTERING_STATISTICS_TELETEXT {\n  VBICODECFILTERING_STATISTICS_COMMON Common;\n} VBICODECFILTERING_STATISTICS_TELETEXT,*PVBICODECFILTERING_STATISTICS_TELETEXT;\n\ntypedef struct _VBICODECFILTERING_STATISTICS_TELETEXT_PIN {\n  VBICODECFILTERING_STATISTICS_COMMON_PIN Common;\n} VBICODECFILTERING_STATISTICS_TELETEXT_PIN,*PVBICODECFILTERING_STATISTICS_TELETEXT_PIN;\n\ntypedef struct {\n  KSPROPERTY Property;\n  VBICODECFILTERING_SCANLINES Scanlines;\n} KSPROPERTY_VBICODECFILTERING_SCANLINES_S,*PKSPROPERTY_VBICODECFILTERING_SCANLINES_S;\n\ntypedef struct {\n  KSPROPERTY Property;\n  VBICODECFILTERING_NABTS_SUBSTREAMS Substreams;\n} KSPROPERTY_VBICODECFILTERING_NABTS_SUBSTREAMS_S,*PKSPROPERTY_VBICODECFILTERING_NABTS_SUBSTREAMS_S;\n\ntypedef struct {\n  KSPROPERTY Property;\n  VBICODECFILTERING_CC_SUBSTREAMS Substreams;\n} KSPROPERTY_VBICODECFILTERING_CC_SUBSTREAMS_S,*PKSPROPERTY_VBICODECFILTERING_CC_SUBSTREAMS_S;\n\ntypedef struct {\n  KSPROPERTY Property;\n  VBICODECFILTERING_STATISTICS_COMMON Statistics;\n} KSPROPERTY_VBICODECFILTERING_STATISTICS_COMMON_S,*PKSPROPERTY_VBICODECFILTERING_STATISTICS_COMMON_S;\n\ntypedef struct {\n  KSPROPERTY Property;\n  VBICODECFILTERING_STATISTICS_COMMON_PIN Statistics;\n} KSPROPERTY_VBICODECFILTERING_STATISTICS_COMMON_PIN_S,*PKSPROPERTY_VBICODECFILTERING_STATISTICS_COMMON_PIN_S;\n\ntypedef struct {\n  KSPROPERTY Property;\n  VBICODECFILTERING_STATISTICS_NABTS Statistics;\n} KSPROPERTY_VBICODECFILTERING_STATISTICS_NABTS_S,*PKSPROPERTY_VBICODECFILTERING_STATISTICS_NABTS_S;\n\ntypedef struct {\n  KSPROPERTY Property;\n  VBICODECFILTERING_STATISTICS_NABTS_PIN Statistics;\n} KSPROPERTY_VBICODECFILTERING_STATISTICS_NABTS_PIN_S,*PKSPROPERTY_VBICODECFILTERING_STATISTICS_NABTS_PIN_S;\n\ntypedef struct {\n  KSPROPERTY Property;\n  VBICODECFILTERING_STATISTICS_CC Statistics;\n} KSPROPERTY_VBICODECFILTERING_STATISTICS_CC_S,*PKSPROPERTY_VBICODECFILTERING_STATISTICS_CC_S;\n\ntypedef struct {\n  KSPROPERTY Property;\n  VBICODECFILTERING_STATISTICS_CC_PIN Statistics;\n} KSPROPERTY_VBICODECFILTERING_STATISTICS_CC_PIN_S,*PKSPROPERTY_VBICODECFILTERING_STATISTICS_CC_PIN_S;\n\n#define STATIC_PINNAME_VIDEO_CAPTURE\t\t\t\t\t\\\n\t0xfb6c4281,0x353,0x11d1,0x90,0x5f,0x0,0x0,0xc0,0xcc,0x16,0xba\n#define STATIC_PINNAME_CAPTURE STATIC_PINNAME_VIDEO_CAPTURE\nDEFINE_GUIDSTRUCT(\"FB6C4281-0353-11d1-905F-0000C0CC16BA\",PINNAME_VIDEO_CAPTURE);\n#define PINNAME_VIDEO_CAPTURE DEFINE_GUIDNAMED(PINNAME_VIDEO_CAPTURE)\n#define PINNAME_CAPTURE PINNAME_VIDEO_CAPTURE\n\n#define STATIC_PINNAME_VIDEO_CC_CAPTURE\t\t\t\t\t\\\n\t0x1aad8061,0x12d,0x11d2,0xb4,0xb1,0x0,0xa0,0xd1,0x2,0xcf,0xbe\n#define STATIC_PINNAME_CC_CAPTURE STATIC_PINNAME_VIDEO_CC_CAPTURE\nDEFINE_GUIDSTRUCT(\"1AAD8061-012D-11d2-B4B1-00A0D102CFBE\",PINNAME_VIDEO_CC_CAPTURE);\n#define PINNAME_VIDEO_CC_CAPTURE DEFINE_GUIDNAMED(PINNAME_VIDEO_CC_CAPTURE)\n\n#define STATIC_PINNAME_VIDEO_NABTS_CAPTURE\t\t\t\t\\\n\t0x29703660,0x498a,0x11d2,0xb4,0xb1,0x0,0xa0,0xd1,0x2,0xcf,0xbe\n#define STATIC_PINNAME_NABTS_CAPTURE STATIC_PINNAME_VIDEO_NABTS_CAPTURE\nDEFINE_GUIDSTRUCT(\"29703660-498A-11d2-B4B1-00A0D102CFBE\",PINNAME_VIDEO_NABTS_CAPTURE);\n#define PINNAME_VIDEO_NABTS_CAPTURE DEFINE_GUIDNAMED(PINNAME_VIDEO_NABTS_CAPTURE)\n\n#define STATIC_PINNAME_VIDEO_PREVIEW\t\t\t\t\t\\\n\t0xfb6c4282,0x353,0x11d1,0x90,0x5f,0x0,0x0,0xc0,0xcc,0x16,0xba\n#define STATIC_PINNAME_PREVIEW STATIC_PINNAME_VIDEO_PREVIEW\nDEFINE_GUIDSTRUCT(\"FB6C4282-0353-11d1-905F-0000C0CC16BA\",PINNAME_VIDEO_PREVIEW);\n#define PINNAME_VIDEO_PREVIEW DEFINE_GUIDNAMED(PINNAME_VIDEO_PREVIEW)\n#define PINNAME_PREVIEW PINNAME_VIDEO_PREVIEW\n\n#define STATIC_PINNAME_VIDEO_ANALOGVIDEOIN\t\t\t\t\\\n\t0xfb6c4283,0x353,0x11d1,0x90,0x5f,0x0,0x0,0xc0,0xcc,0x16,0xba\nDEFINE_GUIDSTRUCT(\"FB6C4283-0353-11d1-905F-0000C0CC16BA\",PINNAME_VIDEO_ANALOGVIDEOIN);\n#define PINNAME_VIDEO_ANALOGVIDEOIN DEFINE_GUIDNAMED(PINNAME_VIDEO_ANALOGVIDEOIN)\n\n#define STATIC_PINNAME_VIDEO_VBI\t\t\t\t\t\\\n\t0xfb6c4284,0x353,0x11d1,0x90,0x5f,0x0,0x0,0xc0,0xcc,0x16,0xba\nDEFINE_GUIDSTRUCT(\"FB6C4284-0353-11d1-905F-0000C0CC16BA\",PINNAME_VIDEO_VBI);\n#define PINNAME_VIDEO_VBI DEFINE_GUIDNAMED(PINNAME_VIDEO_VBI)\n\n#define STATIC_PINNAME_VIDEO_VIDEOPORT\t\t\t\t\t\\\n\t0xfb6c4285,0x353,0x11d1,0x90,0x5f,0x0,0x0,0xc0,0xcc,0x16,0xba\nDEFINE_GUIDSTRUCT(\"FB6C4285-0353-11d1-905F-0000C0CC16BA\",PINNAME_VIDEO_VIDEOPORT);\n#define PINNAME_VIDEO_VIDEOPORT DEFINE_GUIDNAMED(PINNAME_VIDEO_VIDEOPORT)\n\n#define STATIC_PINNAME_VIDEO_NABTS\t\t\t\t\t\\\n\t0xfb6c4286,0x353,0x11d1,0x90,0x5f,0x0,0x0,0xc0,0xcc,0x16,0xba\nDEFINE_GUIDSTRUCT(\"FB6C4286-0353-11d1-905F-0000C0CC16BA\",PINNAME_VIDEO_NABTS);\n#define PINNAME_VIDEO_NABTS DEFINE_GUIDNAMED(PINNAME_VIDEO_NABTS)\n\n#define STATIC_PINNAME_VIDEO_EDS\t\t\t\t\t\\\n\t0xfb6c4287,0x353,0x11d1,0x90,0x5f,0x0,0x0,0xc0,0xcc,0x16,0xba\nDEFINE_GUIDSTRUCT(\"FB6C4287-0353-11d1-905F-0000C0CC16BA\",PINNAME_VIDEO_EDS);\n#define PINNAME_VIDEO_EDS DEFINE_GUIDNAMED(PINNAME_VIDEO_EDS)\n\n#define STATIC_PINNAME_VIDEO_TELETEXT\t\t\t\t\t\\\n\t0xfb6c4288,0x353,0x11d1,0x90,0x5f,0x0,0x0,0xc0,0xcc,0x16,0xba\nDEFINE_GUIDSTRUCT(\"FB6C4288-0353-11d1-905F-0000C0CC16BA\",PINNAME_VIDEO_TELETEXT);\n#define PINNAME_VIDEO_TELETEXT DEFINE_GUIDNAMED(PINNAME_VIDEO_TELETEXT)\n\n#define STATIC_PINNAME_VIDEO_CC\t\t\t\t\t\t\\\n\t0xfb6c4289,0x353,0x11d1,0x90,0x5f,0x0,0x0,0xc0,0xcc,0x16,0xba\nDEFINE_GUIDSTRUCT(\"FB6C4289-0353-11d1-905F-0000C0CC16BA\",PINNAME_VIDEO_CC);\n#define PINNAME_VIDEO_CC DEFINE_GUIDNAMED(PINNAME_VIDEO_CC)\n\n#define STATIC_PINNAME_VIDEO_STILL\t\t\t\t\t\\\n\t0xfb6c428A,0x353,0x11d1,0x90,0x5f,0x0,0x0,0xc0,0xcc,0x16,0xba\nDEFINE_GUIDSTRUCT(\"FB6C428A-0353-11d1-905F-0000C0CC16BA\",PINNAME_VIDEO_STILL);\n#define PINNAME_VIDEO_STILL DEFINE_GUIDNAMED(PINNAME_VIDEO_STILL)\n\n#define STATIC_PINNAME_VIDEO_TIMECODE\t\t\t\t\t\\\n\t0xfb6c428B,0x353,0x11d1,0x90,0x5f,0x0,0x0,0xc0,0xcc,0x16,0xba\nDEFINE_GUIDSTRUCT(\"FB6C428B-0353-11d1-905F-0000C0CC16BA\",PINNAME_VIDEO_TIMECODE);\n#define PINNAME_VIDEO_TIMECODE DEFINE_GUIDNAMED(PINNAME_VIDEO_TIMECODE)\n\n#define STATIC_PINNAME_VIDEO_VIDEOPORT_VBI\t\t\t\t\\\n\t0xfb6c428C,0x353,0x11d1,0x90,0x5f,0x0,0x0,0xc0,0xcc,0x16,0xba\nDEFINE_GUIDSTRUCT(\"FB6C428C-0353-11d1-905F-0000C0CC16BA\",PINNAME_VIDEO_VIDEOPORT_VBI);\n#define PINNAME_VIDEO_VIDEOPORT_VBI DEFINE_GUIDNAMED(PINNAME_VIDEO_VIDEOPORT_VBI)\n\n#define KS_VIDEO_FLAG_FRAME\t\t0x0000L\n#define KS_VIDEO_FLAG_FIELD1\t\t0x0001L\n#define KS_VIDEO_FLAG_FIELD2\t\t0x0002L\n\n#define KS_VIDEO_FLAG_I_FRAME\t\t0x0000L\n#define KS_VIDEO_FLAG_P_FRAME\t\t0x0010L\n#define KS_VIDEO_FLAG_B_FRAME\t\t0x0020L\n\ntypedef struct tagKS_FRAME_INFO {\n  ULONG ExtendedHeaderSize;\n  DWORD dwFrameFlags;\n  LONGLONG PictureNumber;\n  LONGLONG DropCount;\n  HANDLE hDirectDraw;\n  HANDLE hSurfaceHandle;\n  RECT DirectDrawRect;\n\n  DWORD Reserved1;\n  DWORD Reserved2;\n  DWORD Reserved3;\n  DWORD Reserved4;\n} KS_FRAME_INFO,*PKS_FRAME_INFO;\n\n#define KS_VBI_FLAG_FIELD1\t\t0x0001L\n#define KS_VBI_FLAG_FIELD2\t\t0x0002L\n\n#define KS_VBI_FLAG_MV_PRESENT\t\t0x0100L\n#define KS_VBI_FLAG_MV_HARDWARE\t\t0x0200L\n#define KS_VBI_FLAG_MV_DETECTED\t\t0x0400L\n\n#define KS_VBI_FLAG_TVTUNER_CHANGE\t0x0010L\n#define KS_VBI_FLAG_VBIINFOHEADER_CHANGE 0x0020L\n\ntypedef struct tagKS_VBI_FRAME_INFO {\n  ULONG ExtendedHeaderSize;\n  DWORD dwFrameFlags;\n  LONGLONG PictureNumber;\n  LONGLONG DropCount;\n  DWORD dwSamplingFrequency;\n  KS_TVTUNER_CHANGE_INFO TvTunerChangeInfo;\n  KS_VBIINFOHEADER VBIInfoHeader;\n} KS_VBI_FRAME_INFO,*PKS_VBI_FRAME_INFO;\n\ntypedef enum\n{\n  KS_AnalogVideo_None = 0x00000000,\n  KS_AnalogVideo_NTSC_M = 0x00000001,\n  KS_AnalogVideo_NTSC_M_J = 0x00000002,\n  KS_AnalogVideo_NTSC_433 = 0x00000004,\n  KS_AnalogVideo_PAL_B = 0x00000010,\n  KS_AnalogVideo_PAL_D = 0x00000020,\n  KS_AnalogVideo_PAL_G = 0x00000040,\n  KS_AnalogVideo_PAL_H = 0x00000080,\n  KS_AnalogVideo_PAL_I = 0x00000100,\n  KS_AnalogVideo_PAL_M = 0x00000200,\n  KS_AnalogVideo_PAL_N = 0x00000400,\n  KS_AnalogVideo_PAL_60 = 0x00000800,\n  KS_AnalogVideo_SECAM_B = 0x00001000,\n  KS_AnalogVideo_SECAM_D = 0x00002000,\n  KS_AnalogVideo_SECAM_G = 0x00004000,\n  KS_AnalogVideo_SECAM_H = 0x00008000,\n  KS_AnalogVideo_SECAM_K = 0x00010000,\n  KS_AnalogVideo_SECAM_K1 = 0x00020000,\n  KS_AnalogVideo_SECAM_L = 0x00040000,\n  KS_AnalogVideo_SECAM_L1 = 0x00080000,\n  KS_AnalogVideo_PAL_N_COMBO = 0x00100000\n} KS_AnalogVideoStandard;\n\n#define KS_AnalogVideo_NTSC_Mask\t0x00000007\n#define KS_AnalogVideo_PAL_Mask\t\t0x00100FF0\n#define KS_AnalogVideo_SECAM_Mask\t0x000FF000\n\n#define STATIC_PROPSETID_ALLOCATOR_CONTROL\t\t\t\t\\\n\t0x53171960,0x148e,0x11d2,0x99,0x79,0x0,0x0,0xc0,0xcc,0x16,0xba\nDEFINE_GUIDSTRUCT(\"53171960-148E-11d2-9979-0000C0CC16BA\",PROPSETID_ALLOCATOR_CONTROL);\n#define PROPSETID_ALLOCATOR_CONTROL DEFINE_GUIDNAMED(PROPSETID_ALLOCATOR_CONTROL)\n\ntypedef enum {\n  KSPROPERTY_ALLOCATOR_CONTROL_HONOR_COUNT,\n  KSPROPERTY_ALLOCATOR_CONTROL_SURFACE_SIZE,\n  KSPROPERTY_ALLOCATOR_CONTROL_CAPTURE_CAPS,\n  KSPROPERTY_ALLOCATOR_CONTROL_CAPTURE_INTERLEAVE\n} KSPROPERTY_ALLOCATOR_CONTROL;\n\ntypedef struct {\n  ULONG CX;\n  ULONG CY;\n} KSPROPERTY_ALLOCATOR_CONTROL_SURFACE_SIZE_S,*PKSPROPERTY_ALLOCATOR_CONTROL_SURFACE_SIZE_S;\n\ntypedef struct {\n  ULONG InterleavedCapSupported;\n} KSPROPERTY_ALLOCATOR_CONTROL_CAPTURE_CAPS_S,*PKSPROPERTY_ALLOCATOR_CONTROL_CAPTURE_CAPS_S;\n\ntypedef struct {\n  ULONG InterleavedCapPossible;\n} KSPROPERTY_ALLOCATOR_CONTROL_CAPTURE_INTERLEAVE_S,*PKSPROPERTY_ALLOCATOR_CONTROL_CAPTURE_INTERLEAVE_S;\n\n#define STATIC_PROPSETID_VIDCAP_VIDEOPROCAMP\t\t\t\t\\\n\t0xC6E13360L,0x30AC,0x11d0,0xa1,0x8c,0x00,0xA0,0xC9,0x11,0x89,0x56\nDEFINE_GUIDSTRUCT(\"C6E13360-30AC-11d0-A18C-00A0C9118956\",PROPSETID_VIDCAP_VIDEOPROCAMP);\n#define PROPSETID_VIDCAP_VIDEOPROCAMP DEFINE_GUIDNAMED(PROPSETID_VIDCAP_VIDEOPROCAMP)\n\ntypedef enum {\n  KSPROPERTY_VIDEOPROCAMP_BRIGHTNESS,\n  KSPROPERTY_VIDEOPROCAMP_CONTRAST,\n  KSPROPERTY_VIDEOPROCAMP_HUE,\n  KSPROPERTY_VIDEOPROCAMP_SATURATION,\n  KSPROPERTY_VIDEOPROCAMP_SHARPNESS,\n  KSPROPERTY_VIDEOPROCAMP_GAMMA,\n  KSPROPERTY_VIDEOPROCAMP_COLORENABLE,\n  KSPROPERTY_VIDEOPROCAMP_WHITEBALANCE,\n  KSPROPERTY_VIDEOPROCAMP_BACKLIGHT_COMPENSATION,\n  KSPROPERTY_VIDEOPROCAMP_GAIN,\n  KSPROPERTY_VIDEOPROCAMP_DIGITAL_MULTIPLIER,\n  KSPROPERTY_VIDEOPROCAMP_DIGITAL_MULTIPLIER_LIMIT,\n  KSPROPERTY_VIDEOPROCAMP_WHITEBALANCE_COMPONENT,\n  KSPROPERTY_VIDEOPROCAMP_POWERLINE_FREQUENCY\n} KSPROPERTY_VIDCAP_VIDEOPROCAMP;\n\ntypedef struct {\n  KSPROPERTY Property;\n  LONG Value;\n  ULONG Flags;\n  ULONG Capabilities;\n} KSPROPERTY_VIDEOPROCAMP_S,*PKSPROPERTY_VIDEOPROCAMP_S;\n\ntypedef struct {\n  KSP_NODE NodeProperty;\n  LONG Value;\n  ULONG Flags;\n  ULONG Capabilities;\n} KSPROPERTY_VIDEOPROCAMP_NODE_S,*PKSPROPERTY_VIDEOPROCAMP_NODE_S;\n\ntypedef struct {\n  KSPROPERTY Property;\n  LONG Value1;\n  ULONG Flags;\n  ULONG Capabilities;\n  LONG Value2;\n} KSPROPERTY_VIDEOPROCAMP_S2,*PKSPROPERTY_VIDEOPROCAMP_S2;\n\ntypedef struct {\n  KSP_NODE NodeProperty;\n  LONG Value1;\n  ULONG Flags;\n  ULONG Capabilities;\n  LONG Value2;\n} KSPROPERTY_VIDEOPROCAMP_NODE_S2,*PKSPROPERTY_VIDEOPROCAMP_NODE_S2;\n\n#define KSPROPERTY_VIDEOPROCAMP_FLAGS_AUTO\t0X0001L\n#define KSPROPERTY_VIDEOPROCAMP_FLAGS_MANUAL\t0X0002L\n\n#define STATIC_PROPSETID_VIDCAP_SELECTOR\t\t\t\t\\\n\t0x1ABDAECA,0x68B6,0x4F83,0x93,0x71,0xB4,0x13,0x90,0x7C,0x7B,0x9F\nDEFINE_GUIDSTRUCT(\"1ABDAECA-68B6-4F83-9371-B413907C7B9F\",PROPSETID_VIDCAP_SELECTOR);\n#define PROPSETID_VIDCAP_SELECTOR DEFINE_GUIDNAMED(PROPSETID_VIDCAP_SELECTOR)\n\ntypedef enum {\n  KSPROPERTY_SELECTOR_SOURCE_NODE_ID,\n  KSPROPERTY_SELECTOR_NUM_SOURCES\n} KSPROPERTY_VIDCAP_SELECTOR,*PKSPROPERTY_VIDCAP_SELECTOR;\n\ntypedef struct {\n  KSPROPERTY Property;\n  LONG Value;\n  ULONG Flags;\n  ULONG Capabilities;\n} KSPROPERTY_SELECTOR_S,*PKSPROPERTY_SELECTOR_S;\n\ntypedef struct {\n  KSP_NODE NodeProperty;\n  LONG Value;\n  ULONG Flags;\n  ULONG Capabilities;\n} KSPROPERTY_SELECTOR_NODE_S,*PKSPROPERTY_SELECTOR_NODE_S;\n\n#define STATIC_PROPSETID_TUNER\t\t\t\t\t\t\\\n\t0x6a2e0605L,0x28e4,0x11d0,0xa1,0x8c,0x00,0xa0,0xc9,0x11,0x89,0x56\nDEFINE_GUIDSTRUCT(\"6a2e0605-28e4-11d0-a18c-00a0c9118956\",PROPSETID_TUNER);\n#define PROPSETID_TUNER DEFINE_GUIDNAMED(PROPSETID_TUNER)\n\ntypedef enum {\n  KSPROPERTY_TUNER_CAPS,\n  KSPROPERTY_TUNER_MODE_CAPS,\n  KSPROPERTY_TUNER_MODE,\n  KSPROPERTY_TUNER_STANDARD,\n  KSPROPERTY_TUNER_FREQUENCY,\n  KSPROPERTY_TUNER_INPUT,\n  KSPROPERTY_TUNER_STATUS,\n  KSPROPERTY_TUNER_IF_MEDIUM\n} KSPROPERTY_TUNER;\n\ntypedef enum {\n  KSPROPERTY_TUNER_MODE_TV = 0X0001,\n  KSPROPERTY_TUNER_MODE_FM_RADIO = 0X0002,\n  KSPROPERTY_TUNER_MODE_AM_RADIO = 0X0004,\n  KSPROPERTY_TUNER_MODE_DSS = 0X0008,\n  KSPROPERTY_TUNER_MODE_ATSC = 0X0010\n} KSPROPERTY_TUNER_MODES;\n\ntypedef enum {\n  KS_TUNER_TUNING_EXACT = 1,\n  KS_TUNER_TUNING_FINE,\n  KS_TUNER_TUNING_COARSE\n} KS_TUNER_TUNING_FLAGS;\n\ntypedef enum {\n  KS_TUNER_STRATEGY_PLL = 0X01,\n  KS_TUNER_STRATEGY_SIGNAL_STRENGTH = 0X02,\n  KS_TUNER_STRATEGY_DRIVER_TUNES = 0X04\n} KS_TUNER_STRATEGY;\n\ntypedef struct {\n  KSPROPERTY Property;\n  ULONG ModesSupported;\n  KSPIN_MEDIUM VideoMedium;\n  KSPIN_MEDIUM TVAudioMedium;\n  KSPIN_MEDIUM RadioAudioMedium;\n} KSPROPERTY_TUNER_CAPS_S,*PKSPROPERTY_TUNER_CAPS_S;\n\ntypedef struct {\n  KSPROPERTY Property;\n  KSPIN_MEDIUM IFMedium;\n} KSPROPERTY_TUNER_IF_MEDIUM_S,*PKSPROPERTY_TUNER_IF_MEDIUM_S;\n\ntypedef struct {\n  KSPROPERTY Property;\n  ULONG Mode;\n  ULONG StandardsSupported;\n  ULONG MinFrequency;\n  ULONG MaxFrequency;\n  ULONG TuningGranularity;\n  ULONG NumberOfInputs;\n  ULONG SettlingTime;\n  ULONG Strategy;\n} KSPROPERTY_TUNER_MODE_CAPS_S,*PKSPROPERTY_TUNER_MODE_CAPS_S;\n\ntypedef struct {\n  KSPROPERTY Property;\n  ULONG Mode;\n} KSPROPERTY_TUNER_MODE_S,*PKSPROPERTY_TUNER_MODE_S;\n\ntypedef struct {\n  KSPROPERTY Property;\n  ULONG Frequency;\n  ULONG LastFrequency;\n  ULONG TuningFlags;\n  ULONG VideoSubChannel;\n  ULONG AudioSubChannel;\n  ULONG Channel;\n  ULONG Country;\n} KSPROPERTY_TUNER_FREQUENCY_S,*PKSPROPERTY_TUNER_FREQUENCY_S;\n\ntypedef struct {\n  KSPROPERTY Property;\n  ULONG Standard;\n} KSPROPERTY_TUNER_STANDARD_S,*PKSPROPERTY_TUNER_STANDARD_S;\n\ntypedef struct {\n  KSPROPERTY Property;\n  ULONG InputIndex;\n} KSPROPERTY_TUNER_INPUT_S,*PKSPROPERTY_TUNER_INPUT_S;\n\ntypedef struct {\n  KSPROPERTY Property;\n  ULONG CurrentFrequency;\n  ULONG PLLOffset;\n  ULONG SignalStrength;\n  ULONG Busy;\n} KSPROPERTY_TUNER_STATUS_S,*PKSPROPERTY_TUNER_STATUS_S;\n\n#define STATIC_EVENTSETID_TUNER\t\t\t\t\t\t\\\n\t0x6a2e0606L,0x28e4,0x11d0,0xa1,0x8c,0x00,0xa0,0xc9,0x11,0x89,0x56\nDEFINE_GUIDSTRUCT(\"6a2e0606-28e4-11d0-a18c-00a0c9118956\",EVENTSETID_TUNER);\n#define EVENTSETID_TUNER DEFINE_GUIDNAMED(EVENTSETID_TUNER)\n\ntypedef enum {\n  KSEVENT_TUNER_CHANGED\n} KSEVENT_TUNER;\n\n#define STATIC_KSNODETYPE_VIDEO_STREAMING\t\t\t\t\\\n\t0xDFF229E1L,0xF70F,0x11D0,0xB9,0x17,0x00,0xA0,0xC9,0x22,0x31,0x96\nDEFINE_GUIDSTRUCT(\"DFF229E1-F70F-11D0-B917-00A0C9223196\",KSNODETYPE_VIDEO_STREAMING);\n#define KSNODETYPE_VIDEO_STREAMING DEFINE_GUIDNAMED(KSNODETYPE_VIDEO_STREAMING)\n\n#define STATIC_KSNODETYPE_VIDEO_INPUT_TERMINAL\t\t\t\t\\\n\t0xDFF229E2L,0xF70F,0x11D0,0xB9,0x17,0x00,0xA0,0xC9,0x22,0x31,0x96\nDEFINE_GUIDSTRUCT(\"DFF229E2-F70F-11D0-B917-00A0C9223196\",KSNODETYPE_VIDEO_INPUT_TERMINAL);\n#define KSNODETYPE_VIDEO_INPUT_TERMINAL DEFINE_GUIDNAMED(KSNODETYPE_VIDEO_INPUT_TERMINAL)\n\n#define STATIC_KSNODETYPE_VIDEO_OUTPUT_TERMINAL\t\t\t\t\\\n\t0xDFF229E3L,0xF70F,0x11D0,0xB9,0x17,0x00,0xA0,0xC9,0x22,0x31,0x96\nDEFINE_GUIDSTRUCT(\"DFF229E3-F70F-11D0-B917-00A0C9223196\",KSNODETYPE_VIDEO_OUTPUT_TERMINAL);\n#define KSNODETYPE_VIDEO_OUTPUT_TERMINAL DEFINE_GUIDNAMED(KSNODETYPE_VIDEO_OUTPUT_TERMINAL)\n\n#define STATIC_KSNODETYPE_VIDEO_SELECTOR\t\t\t\t\\\n\t0xDFF229E4L,0xF70F,0x11D0,0xB9,0x17,0x00,0xA0,0xC9,0x22,0x31,0x96\nDEFINE_GUIDSTRUCT(\"DFF229E4-F70F-11D0-B917-00A0C9223196\",KSNODETYPE_VIDEO_SELECTOR);\n#define KSNODETYPE_VIDEO_SELECTOR DEFINE_GUIDNAMED(KSNODETYPE_VIDEO_SELECTOR)\n\n#define STATIC_KSNODETYPE_VIDEO_PROCESSING\t\t\t\t\\\n\t0xDFF229E5L,0xF70F,0x11D0,0xB9,0x17,0x00,0xA0,0xC9,0x22,0x31,0x96\nDEFINE_GUIDSTRUCT(\"DFF229E5-F70F-11D0-B917-00A0C9223196\",KSNODETYPE_VIDEO_PROCESSING);\n#define KSNODETYPE_VIDEO_PROCESSING DEFINE_GUIDNAMED(KSNODETYPE_VIDEO_PROCESSING)\n\n#define STATIC_KSNODETYPE_VIDEO_CAMERA_TERMINAL\t\t\t\t\\\n\t0xDFF229E6L,0xF70F,0x11D0,0xB9,0x17,0x00,0xA0,0xC9,0x22,0x31,0x96\nDEFINE_GUIDSTRUCT(\"DFF229E6-F70F-11D0-B917-00A0C9223196\",KSNODETYPE_VIDEO_CAMERA_TERMINAL);\n#define KSNODETYPE_VIDEO_CAMERA_TERMINAL DEFINE_GUIDNAMED(KSNODETYPE_VIDEO_CAMERA_TERMINAL)\n\n#define STATIC_KSNODETYPE_VIDEO_INPUT_MTT\t\t\t\t\\\n\t0xDFF229E7L,0xF70F,0x11D0,0xB9,0x17,0x00,0xA0,0xC9,0x22,0x31,0x96\nDEFINE_GUIDSTRUCT(\"DFF229E7-F70F-11D0-B917-00A0C9223196\",KSNODETYPE_VIDEO_INPUT_MTT);\n#define KSNODETYPE_VIDEO_INPUT_MTT DEFINE_GUIDNAMED(KSNODETYPE_VIDEO_INPUT_MTT)\n\n#define STATIC_KSNODETYPE_VIDEO_OUTPUT_MTT\t\t\t\t\\\n\t0xDFF229E8L,0xF70F,0x11D0,0xB9,0x17,0x00,0xA0,0xC9,0x22,0x31,0x96\nDEFINE_GUIDSTRUCT(\"DFF229E8-F70F-11D0-B917-00A0C9223196\",KSNODETYPE_VIDEO_OUTPUT_MTT);\n#define KSNODETYPE_VIDEO_OUTPUT_MTT DEFINE_GUIDNAMED(KSNODETYPE_VIDEO_OUTPUT_MTT)\n\n#define STATIC_PROPSETID_VIDCAP_VIDEOENCODER\t\t\t\t\\\n\t0x6a2e0610L,0x28e4,0x11d0,0xa1,0x8c,0x00,0xa0,0xc9,0x11,0x89,0x56\nDEFINE_GUIDSTRUCT(\"6a2e0610-28e4-11d0-a18c-00a0c9118956\",PROPSETID_VIDCAP_VIDEOENCODER);\n#define PROPSETID_VIDCAP_VIDEOENCODER DEFINE_GUIDNAMED(PROPSETID_VIDCAP_VIDEOENCODER)\n\ntypedef enum {\n  KSPROPERTY_VIDEOENCODER_CAPS,\n  KSPROPERTY_VIDEOENCODER_STANDARD,\n  KSPROPERTY_VIDEOENCODER_COPYPROTECTION,\n  KSPROPERTY_VIDEOENCODER_CC_ENABLE\n} KSPROPERTY_VIDCAP_VIDEOENCODER;\n\ntypedef struct {\n  KSPROPERTY Property;\n  LONG Value;\n  ULONG Flags;\n  ULONG Capabilities;\n} KSPROPERTY_VIDEOENCODER_S,*PKSPROPERTY_VIDEOENCODER_S;\n\n#define STATIC_PROPSETID_VIDCAP_VIDEODECODER\t\t\t\t\\\n\t0xC6E13350L,0x30AC,0x11d0,0xA1,0x8C,0x00,0xA0,0xC9,0x11,0x89,0x56\nDEFINE_GUIDSTRUCT(\"C6E13350-30AC-11d0-A18C-00A0C9118956\",PROPSETID_VIDCAP_VIDEODECODER);\n#define PROPSETID_VIDCAP_VIDEODECODER DEFINE_GUIDNAMED(PROPSETID_VIDCAP_VIDEODECODER)\n\ntypedef enum {\n  KSPROPERTY_VIDEODECODER_CAPS,\n  KSPROPERTY_VIDEODECODER_STANDARD,\n  KSPROPERTY_VIDEODECODER_STATUS,\n  KSPROPERTY_VIDEODECODER_OUTPUT_ENABLE,\n  KSPROPERTY_VIDEODECODER_VCR_TIMING\n} KSPROPERTY_VIDCAP_VIDEODECODER;\n\ntypedef enum {\n  KS_VIDEODECODER_FLAGS_CAN_DISABLE_OUTPUT = 0X0001,\n  KS_VIDEODECODER_FLAGS_CAN_USE_VCR_LOCKING = 0X0002,\n  KS_VIDEODECODER_FLAGS_CAN_INDICATE_LOCKED = 0X0004\n} KS_VIDEODECODER_FLAGS;\n\ntypedef struct {\n  KSPROPERTY Property;\n  ULONG StandardsSupported;\n  ULONG Capabilities;\n  ULONG SettlingTime;\n  ULONG HSyncPerVSync;\n} KSPROPERTY_VIDEODECODER_CAPS_S,*PKSPROPERTY_VIDEODECODER_CAPS_S;\n\ntypedef struct {\n  KSPROPERTY Property;\n  ULONG NumberOfLines;\n  ULONG SignalLocked;\n} KSPROPERTY_VIDEODECODER_STATUS_S,*PKSPROPERTY_VIDEODECODER_STATUS_S;\n\ntypedef struct {\n  KSPROPERTY Property;\n  ULONG Value;\n} KSPROPERTY_VIDEODECODER_S,*PKSPROPERTY_VIDEODECODER_S;\n\n#define STATIC_EVENTSETID_VIDEODECODER\t\t\t\t\t\\\n\t0x6a2e0621L,0x28e4,0x11d0,0xa1,0x8c,0x00,0xa0,0xc9,0x11,0x89,0x56\nDEFINE_GUIDSTRUCT(\"6a2e0621-28e4-11d0-a18c-00a0c9118956\",EVENTSETID_VIDEODECODER);\n#define EVENTSETID_VIDEODECODER DEFINE_GUIDNAMED(EVENTSETID_VIDEODECODER)\n\ntypedef enum {\n  KSEVENT_VIDEODECODER_CHANGED\n} KSEVENT_VIDEODECODER;\n\n#define STATIC_PROPSETID_VIDCAP_CAMERACONTROL\t\t\t\t\\\n\t0xC6E13370L,0x30AC,0x11d0,0xa1,0x8C,0x00,0xA0,0xC9,0x11,0x89,0x56\nDEFINE_GUIDSTRUCT(\"C6E13370-30AC-11d0-A18C-00A0C9118956\",PROPSETID_VIDCAP_CAMERACONTROL);\n#define PROPSETID_VIDCAP_CAMERACONTROL DEFINE_GUIDNAMED(PROPSETID_VIDCAP_CAMERACONTROL)\n\ntypedef enum {\n  KSPROPERTY_CAMERACONTROL_PAN,\n  KSPROPERTY_CAMERACONTROL_TILT,\n  KSPROPERTY_CAMERACONTROL_ROLL,\n  KSPROPERTY_CAMERACONTROL_ZOOM,\n  KSPROPERTY_CAMERACONTROL_EXPOSURE,\n  KSPROPERTY_CAMERACONTROL_IRIS,\n  KSPROPERTY_CAMERACONTROL_FOCUS,\n  KSPROPERTY_CAMERACONTROL_SCANMODE,\n  KSPROPERTY_CAMERACONTROL_PRIVACY,\n  KSPROPERTY_CAMERACONTROL_PANTILT,\n  KSPROPERTY_CAMERACONTROL_PAN_RELATIVE,\n  KSPROPERTY_CAMERACONTROL_TILT_RELATIVE,\n  KSPROPERTY_CAMERACONTROL_ROLL_RELATIVE,\n  KSPROPERTY_CAMERACONTROL_ZOOM_RELATIVE,\n  KSPROPERTY_CAMERACONTROL_EXPOSURE_RELATIVE,\n  KSPROPERTY_CAMERACONTROL_IRIS_RELATIVE,\n  KSPROPERTY_CAMERACONTROL_FOCUS_RELATIVE,\n  KSPROPERTY_CAMERACONTROL_PANTILT_RELATIVE,\n  KSPROPERTY_CAMERACONTROL_FOCAL_LENGTH\n} KSPROPERTY_VIDCAP_CAMERACONTROL;\n\ntypedef struct {\n  KSPROPERTY Property;\n  LONG Value;\n  ULONG Flags;\n  ULONG Capabilities;\n} KSPROPERTY_CAMERACONTROL_S,*PKSPROPERTY_CAMERACONTROL_S;\n\ntypedef struct {\n  KSP_NODE NodeProperty;\n  LONG Value;\n  ULONG Flags;\n  ULONG Capabilities;\n} KSPROPERTY_CAMERACONTROL_NODE_S,PKSPROPERTY_CAMERACONTROL_NODE_S;\n\ntypedef struct {\n  KSPROPERTY Property;\n  LONG Value1;\n  ULONG Flags;\n  ULONG Capabilities;\n  LONG Value2;\n} KSPROPERTY_CAMERACONTROL_S2,*PKSPROPERTY_CAMERACONTROL_S2;\n\ntypedef struct {\n  KSP_NODE NodeProperty;\n  LONG Value1;\n  ULONG Flags;\n  ULONG Capabilities;\n  LONG Value2;\n} KSPROPERTY_CAMERACONTROL_NODE_S2,*PKSPROPERTY_CAMERACONTROL_NODE_S2;\n\ntypedef struct {\n  KSPROPERTY Property;\n  LONG lOcularFocalLength;\n  LONG lObjectiveFocalLengthMin;\n  LONG lObjectiveFocalLengthMax;\n} KSPROPERTY_CAMERACONTROL_FOCAL_LENGTH_S,*PKSPROPERTY_CAMERACONTROL_FOCAL_LENGTH_S;\n\ntypedef struct {\n  KSNODEPROPERTY NodeProperty;\n  LONG lOcularFocalLength;\n  LONG lObjectiveFocalLengthMin;\n  LONG lObjectiveFocalLengthMax;\n} KSPROPERTY_CAMERACONTROL_NODE_FOCAL_LENGTH_S,*PKSPROPERTY_CAMERACONTROL_NODE_FOCAL_LENGTH_S;\n\n#define KSPROPERTY_CAMERACONTROL_FLAGS_AUTO\t0X0001L\n#define KSPROPERTY_CAMERACONTROL_FLAGS_MANUAL\t0X0002L\n\n#define KSPROPERTY_CAMERACONTROL_FLAGS_ABSOLUTE\t0X0000L\n#define KSPROPERTY_CAMERACONTROL_FLAGS_RELATIVE\t0X0010L\n\n#ifndef __EDevCtrl__\n#define __EDevCtrl__\n\n#define STATIC_PROPSETID_EXT_DEVICE\t\t\t\t\t\\\n\t0xB5730A90L,0x1A2C,0x11cf,0x8c,0x23,0x00,0xAA,0x00,0x6B,0x68,0x14\nDEFINE_GUIDSTRUCT(\"B5730A90-1A2C-11cf-8C23-00AA006B6814\",PROPSETID_EXT_DEVICE);\n#define PROPSETID_EXT_DEVICE DEFINE_GUIDNAMED(PROPSETID_EXT_DEVICE)\n\ntypedef enum {\n  KSPROPERTY_EXTDEVICE_ID,\n  KSPROPERTY_EXTDEVICE_VERSION,\n  KSPROPERTY_EXTDEVICE_POWER_STATE,\n  KSPROPERTY_EXTDEVICE_PORT,\n  KSPROPERTY_EXTDEVICE_CAPABILITIES\n} KSPROPERTY_EXTDEVICE;\n\ntypedef struct tagDEVCAPS{\n  LONG CanRecord;\n  LONG CanRecordStrobe;\n  LONG HasAudio;\n  LONG HasVideo;\n  LONG UsesFiles;\n  LONG CanSave;\n  LONG DeviceType;\n  LONG TCRead;\n  LONG TCWrite;\n  LONG CTLRead;\n  LONG IndexRead;\n  LONG Preroll;\n  LONG Postroll;\n  LONG SyncAcc;\n  LONG NormRate;\n  LONG CanPreview;\n  LONG CanMonitorSrc;\n  LONG CanTest;\n  LONG VideoIn;\n  LONG AudioIn;\n  LONG Calibrate;\n  LONG SeekType;\n  LONG SimulatedHardware;\n} DEVCAPS,*PDEVCAPS;\n\ntypedef struct {\n  KSPROPERTY Property;\n  union {\n    DEVCAPS Capabilities;\n    ULONG DevPort;\n    ULONG PowerState;\n    WCHAR pawchString[MAX_PATH];\n    DWORD NodeUniqueID[2];\n  } u;\n} KSPROPERTY_EXTDEVICE_S,*PKSPROPERTY_EXTDEVICE_S;\n\n#define STATIC_PROPSETID_EXT_TRANSPORT\t\t\t\t\t\\\n\t0xA03CD5F0L,0x3045,0x11cf,0x8c,0x44,0x00,0xAA,0x00,0x6B,0x68,0x14\nDEFINE_GUIDSTRUCT(\"A03CD5F0-3045-11cf-8C44-00AA006B6814\",PROPSETID_EXT_TRANSPORT);\n#define PROPSETID_EXT_TRANSPORT DEFINE_GUIDNAMED(PROPSETID_EXT_TRANSPORT)\n\ntypedef enum {\n  KSPROPERTY_EXTXPORT_CAPABILITIES,\n  KSPROPERTY_EXTXPORT_INPUT_SIGNAL_MODE,\n  KSPROPERTY_EXTXPORT_OUTPUT_SIGNAL_MODE,\n  KSPROPERTY_EXTXPORT_LOAD_MEDIUM,\n  KSPROPERTY_EXTXPORT_MEDIUM_INFO,\n  KSPROPERTY_EXTXPORT_STATE,\n  KSPROPERTY_EXTXPORT_STATE_NOTIFY,\n  KSPROPERTY_EXTXPORT_TIMECODE_SEARCH,\n  KSPROPERTY_EXTXPORT_ATN_SEARCH,\n  KSPROPERTY_EXTXPORT_RTC_SEARCH,\n  KSPROPERTY_RAW_AVC_CMD\n} KSPROPERTY_EXTXPORT;\n\ntypedef struct tagTRANSPORTSTATUS {\n  LONG Mode;\n  LONG LastError;\n  LONG RecordInhibit;\n  LONG ServoLock;\n  LONG MediaPresent;\n  LONG MediaLength;\n  LONG MediaSize;\n  LONG MediaTrackCount;\n  LONG MediaTrackLength;\n  LONG MediaTrackSide;\n  LONG MediaType;\n  LONG LinkMode;\n  LONG NotifyOn;\n} TRANSPORTSTATUS,*PTRANSPORTSTATUS;\n\ntypedef struct tagTRANSPORTBASICPARMS {\n  LONG TimeFormat;\n  LONG TimeReference;\n  LONG Superimpose;\n  LONG EndStopAction;\n  LONG RecordFormat;\n  LONG StepFrames;\n  LONG SetpField;\n  LONG Preroll;\n  LONG RecPreroll;\n  LONG Postroll;\n  LONG EditDelay;\n  LONG PlayTCDelay;\n  LONG RecTCDelay;\n  LONG EditField;\n  LONG FrameServo;\n  LONG ColorFrameServo;\n  LONG ServoRef;\n  LONG WarnGenlock;\n  LONG SetTracking;\n  TCHAR VolumeName[40];\n  LONG Ballistic[20];\n  LONG Speed;\n  LONG CounterFormat;\n  LONG TunerChannel;\n  LONG TunerNumber;\n  LONG TimerEvent;\n  LONG TimerStartDay;\n  LONG TimerStartTime;\n  LONG TimerStopDay;\n  LONG TimerStopTime;\n} TRANSPORTBASICPARMS,*PTRANSPORTBASICPARMS;\n\ntypedef struct tagTRANSPORTVIDEOPARMS {\n  LONG OutputMode;\n  LONG Input;\n} TRANSPORTVIDEOPARMS,*PTRANSPORTVIDEOPARMS;\n\ntypedef struct tagTRANSPORTAUDIOPARMS {\n  LONG EnableOutput;\n  LONG EnableRecord;\n  LONG EnableSelsync;\n  LONG Input;\n  LONG MonitorSource;\n} TRANSPORTAUDIOPARMS,*PTRANSPORTAUDIOPARMS;\n\ntypedef struct {\n  WINBOOL MediaPresent;\n  ULONG MediaType;\n  WINBOOL RecordInhibit;\n} MEDIUM_INFO,*PMEDIUM_INFO;\n\ntypedef struct {\n  ULONG Mode;\n  ULONG State;\n} TRANSPORT_STATE,*PTRANSPORT_STATE;\n\ntypedef struct {\n  KSPROPERTY Property;\n  union {\n    ULONG Capabilities;\n    ULONG SignalMode;\n    ULONG LoadMedium;\n    MEDIUM_INFO MediumInfo;\n    TRANSPORT_STATE XPrtState;\n    struct {\n      BYTE frame;\n      BYTE second;\n      BYTE minute;\n      BYTE hour;\n    } Timecode;\n    DWORD dwTimecode;\n    DWORD dwAbsTrackNumber;\n    struct {\n      ULONG PayloadSize;\n      BYTE Payload[512];\n    } RawAVC;\n  } u;\n} KSPROPERTY_EXTXPORT_S,*PKSPROPERTY_EXTXPORT_S;\n\ntypedef struct {\n  KSP_NODE NodeProperty;\n  union {\n    ULONG Capabilities;\n    ULONG SignalMode;\n    ULONG LoadMedium;\n    MEDIUM_INFO MediumInfo;\n    TRANSPORT_STATE XPrtState;\n    struct {\n      BYTE frame;\n      BYTE second;\n      BYTE minute;\n      BYTE hour;\n    } Timecode;\n    DWORD dwTimecode;\n    DWORD dwAbsTrackNumber;\n    struct {\n      ULONG PayloadSize;\n      BYTE Payload[512];\n    } RawAVC;\n  } u;\n} KSPROPERTY_EXTXPORT_NODE_S,*PKSPROPERTY_EXTXPORT_NODE_S;\n\n#define STATIC_PROPSETID_TIMECODE_READER\t\t\t\t\\\n\t0x9B496CE1L,0x811B,0x11cf,0x8C,0x77,0x00,0xAA,0x00,0x6B,0x68,0x14\nDEFINE_GUIDSTRUCT(\"9B496CE1-811B-11cf-8C77-00AA006B6814\",PROPSETID_TIMECODE_READER);\n#define PROPSETID_TIMECODE_READER DEFINE_GUIDNAMED(PROPSETID_TIMECODE_READER)\n\ntypedef enum {\n  KSPROPERTY_TIMECODE_READER,\n  KSPROPERTY_ATN_READER,\n  KSPROPERTY_RTC_READER\n} KSPROPERTY_TIMECODE;\n\n#ifndef TIMECODE_DEFINED\n#define TIMECODE_DEFINED\ntypedef union _timecode {\n  struct {\n    WORD wFrameRate;\n    WORD wFrameFract;\n    DWORD dwFrames;\n  };\n  DWORDLONG qw;\n} TIMECODE;\ntypedef TIMECODE *PTIMECODE;\n\ntypedef struct tagTIMECODE_SAMPLE {\n  LONGLONG qwTick;\n  TIMECODE timecode;\n  DWORD dwUser;\n  DWORD dwFlags;\n} TIMECODE_SAMPLE;\n\ntypedef TIMECODE_SAMPLE *PTIMECODE_SAMPLE;\n#endif /* TIMECODE_DEFINED */\n\ntypedef struct {\n  KSPROPERTY Property;\n  TIMECODE_SAMPLE TimecodeSamp;\n} KSPROPERTY_TIMECODE_S,*PKSPROPERTY_TIMECODE_S;\n\ntypedef struct {\n  KSP_NODE NodeProperty;\n  TIMECODE_SAMPLE TimecodeSamp;\n} KSPROPERTY_TIMECODE_NODE_S,*PKSPROPERTY_TIMECODE_NODE_S;\n\n#define STATIC_KSEVENTSETID_EXTDEV_Command\t\t\t\t\\\n\t0x109c7988L,0xb3cb,0x11d2,0xb4,0x8e,0x00,0x60,0x97,0xb3,0x39,0x1b\nDEFINE_GUIDSTRUCT(\"109c7988-b3cb-11d2-b48e-006097b3391b\",KSEVENTSETID_EXTDEV_Command);\n#define KSEVENTSETID_EXTDEV_Command DEFINE_GUIDNAMED(KSEVENTSETID_EXTDEV_Command)\n\ntypedef enum {\n  KSEVENT_EXTDEV_COMMAND_NOTIFY_INTERIM_READY,\n  KSEVENT_EXTDEV_COMMAND_CONTROL_INTERIM_READY,\n  KSEVENT_EXTDEV_COMMAND_BUSRESET,\n  KSEVENT_EXTDEV_TIMECODE_UPDATE,\n  KSEVENT_EXTDEV_OPERATION_MODE_UPDATE,\n  KSEVENT_EXTDEV_TRANSPORT_STATE_UPDATE,\n  KSEVENT_EXTDEV_NOTIFY_REMOVAL,\n  KSEVENT_EXTDEV_NOTIFY_MEDIUM_CHANGE\n} KSEVENT_DEVCMD;\n#endif /* __EDevCtrl__ */\n\n#define STATIC_PROPSETID_VIDCAP_CROSSBAR\t\t\t\t\\\n\t0x6a2e0640L,0x28e4,0x11d0,0xa1,0x8c,0x00,0xa0,0xc9,0x11,0x89,0x56\nDEFINE_GUIDSTRUCT(\"6a2e0640-28e4-11d0-a18c-00a0c9118956\",PROPSETID_VIDCAP_CROSSBAR);\n#define PROPSETID_VIDCAP_CROSSBAR DEFINE_GUIDNAMED(PROPSETID_VIDCAP_CROSSBAR)\n\ntypedef enum {\n  KSPROPERTY_CROSSBAR_CAPS,\n  KSPROPERTY_CROSSBAR_PININFO,\n  KSPROPERTY_CROSSBAR_CAN_ROUTE,\n  KSPROPERTY_CROSSBAR_ROUTE\n} KSPROPERTY_VIDCAP_CROSSBAR;\n\ntypedef struct {\n  KSPROPERTY Property;\n  ULONG NumberOfInputs;\n  ULONG NumberOfOutputs;\n} KSPROPERTY_CROSSBAR_CAPS_S,*PKSPROPERTY_CROSSBAR_CAPS_S;\n\ntypedef struct {\n  KSPROPERTY Property;\n  KSPIN_DATAFLOW Direction;\n  ULONG Index;\n  ULONG PinType;\n  ULONG RelatedPinIndex;\n  KSPIN_MEDIUM Medium;\n} KSPROPERTY_CROSSBAR_PININFO_S,*PKSPROPERTY_CROSSBAR_PININFO_S;\n\ntypedef struct {\n  KSPROPERTY Property;\n  ULONG IndexInputPin;\n  ULONG IndexOutputPin;\n  ULONG CanRoute;\n} KSPROPERTY_CROSSBAR_ROUTE_S,*PKSPROPERTY_CROSSBAR_ROUTE_S;\n\n#define STATIC_EVENTSETID_CROSSBAR\t\t\t\t\t\\\n\t0x6a2e0641L,0x28e4,0x11d0,0xa1,0x8c,0x00,0xa0,0xc9,0x11,0x89,0x56\nDEFINE_GUIDSTRUCT(\"6a2e0641-28e4-11d0-a18c-00a0c9118956\",EVENTSETID_CROSSBAR);\n#define EVENTSETID_CROSSBAR DEFINE_GUIDNAMED(EVENTSETID_CROSSBAR)\n\ntypedef enum {\n  KSEVENT_CROSSBAR_CHANGED\n} KSEVENT_CROSSBAR;\n\ntypedef enum {\n  KS_PhysConn_Video_Tuner = 1,\n  KS_PhysConn_Video_Composite,\n  KS_PhysConn_Video_SVideo,\n  KS_PhysConn_Video_RGB,\n  KS_PhysConn_Video_YRYBY,\n  KS_PhysConn_Video_SerialDigital,\n  KS_PhysConn_Video_ParallelDigital,\n  KS_PhysConn_Video_SCSI,\n  KS_PhysConn_Video_AUX,\n  KS_PhysConn_Video_1394,\n  KS_PhysConn_Video_USB,\n  KS_PhysConn_Video_VideoDecoder,\n  KS_PhysConn_Video_VideoEncoder,\n  KS_PhysConn_Video_SCART,\n  KS_PhysConn_Audio_Tuner = 4096,\n  KS_PhysConn_Audio_Line,\n  KS_PhysConn_Audio_Mic,\n  KS_PhysConn_Audio_AESDigital,\n  KS_PhysConn_Audio_SPDIFDigital,\n  KS_PhysConn_Audio_SCSI,\n  KS_PhysConn_Audio_AUX,\n  KS_PhysConn_Audio_1394,\n  KS_PhysConn_Audio_USB,\n  KS_PhysConn_Audio_AudioDecoder\n} KS_PhysicalConnectorType;\n\n#define STATIC_PROPSETID_VIDCAP_TVAUDIO\t\t\t\t\t\\\n\t0x6a2e0650L,0x28e4,0x11d0,0xa1,0x8c,0x00,0xa0,0xc9,0x11,0x89,0x56\nDEFINE_GUIDSTRUCT(\"6a2e0650-28e4-11d0-a18c-00a0c9118956\",PROPSETID_VIDCAP_TVAUDIO);\n#define PROPSETID_VIDCAP_TVAUDIO DEFINE_GUIDNAMED(PROPSETID_VIDCAP_TVAUDIO)\n\ntypedef enum {\n  KSPROPERTY_TVAUDIO_CAPS,\n  KSPROPERTY_TVAUDIO_MODE,\n  KSPROPERTY_TVAUDIO_CURRENTLY_AVAILABLE_MODES\n} KSPROPERTY_VIDCAP_TVAUDIO;\n\n#define KS_TVAUDIO_MODE_MONO\t0x0001\n#define KS_TVAUDIO_MODE_STEREO\t0x0002\n#define KS_TVAUDIO_MODE_LANG_A\t0x0010\n#define KS_TVAUDIO_MODE_LANG_B\t0x0020\n#define KS_TVAUDIO_MODE_LANG_C\t0x0040\n\ntypedef struct {\n  KSPROPERTY Property;\n  ULONG Capabilities;\n  KSPIN_MEDIUM InputMedium;\n  KSPIN_MEDIUM OutputMedium;\n} KSPROPERTY_TVAUDIO_CAPS_S,*PKSPROPERTY_TVAUDIO_CAPS_S;\n\ntypedef struct {\n  KSPROPERTY Property;\n  ULONG Mode;\n} KSPROPERTY_TVAUDIO_S,*PKSPROPERTY_TVAUDIO_S;\n\n#define STATIC_KSEVENTSETID_VIDCAP_TVAUDIO\t\t\t\t\\\n\t0x6a2e0651L,0x28e4,0x11d0,0xa1,0x8c,0x00,0xa0,0xc9,0x11,0x89,0x56\nDEFINE_GUIDSTRUCT(\"6a2e0651-28e4-11d0-a18c-00a0c9118956\",KSEVENTSETID_VIDCAP_TVAUDIO);\n#define KSEVENTSETID_VIDCAP_TVAUDIO DEFINE_GUIDNAMED(KSEVENTSETID_VIDCAP_TVAUDIO)\n\ntypedef enum {\n  KSEVENT_TVAUDIO_CHANGED\n} KSEVENT_TVAUDIO;\n\n#define STATIC_PROPSETID_VIDCAP_VIDEOCOMPRESSION\t\t\t\\\n\t0xC6E13343L,0x30AC,0x11d0,0xA1,0x8C,0x00,0xA0,0xC9,0x11,0x89,0x56\nDEFINE_GUIDSTRUCT(\"C6E13343-30AC-11d0-A18C-00A0C9118956\",PROPSETID_VIDCAP_VIDEOCOMPRESSION);\n#define PROPSETID_VIDCAP_VIDEOCOMPRESSION DEFINE_GUIDNAMED(PROPSETID_VIDCAP_VIDEOCOMPRESSION)\n\ntypedef enum {\n  KSPROPERTY_VIDEOCOMPRESSION_GETINFO,\n  KSPROPERTY_VIDEOCOMPRESSION_KEYFRAME_RATE,\n  KSPROPERTY_VIDEOCOMPRESSION_PFRAMES_PER_KEYFRAME,\n  KSPROPERTY_VIDEOCOMPRESSION_QUALITY,\n  KSPROPERTY_VIDEOCOMPRESSION_OVERRIDE_KEYFRAME,\n  KSPROPERTY_VIDEOCOMPRESSION_OVERRIDE_FRAME_SIZE,\n  KSPROPERTY_VIDEOCOMPRESSION_WINDOWSIZE\n} KSPROPERTY_VIDCAP_VIDEOCOMPRESSION;\n\ntypedef enum {\n  KS_CompressionCaps_CanQuality = 1,\n  KS_CompressionCaps_CanCrunch = 2,\n  KS_CompressionCaps_CanKeyFrame = 4,\n  KS_CompressionCaps_CanBFrame = 8,\n  KS_CompressionCaps_CanWindow = 0x10\n} KS_CompressionCaps;\n\ntypedef enum {\n  KS_StreamingHint_FrameInterval = 0x0100,\n  KS_StreamingHint_KeyFrameRate = 0x0200,\n  KS_StreamingHint_PFrameRate = 0x0400,\n  KS_StreamingHint_CompQuality = 0x0800,\n  KS_StreamingHint_CompWindowSize = 0x1000\n} KS_VideoStreamingHints;\n\ntypedef struct {\n  KSPROPERTY Property;\n  ULONG StreamIndex;\n  LONG DefaultKeyFrameRate;\n  LONG DefaultPFrameRate;\n  LONG DefaultQuality;\n  LONG NumberOfQualitySettings;\n  LONG Capabilities;\n} KSPROPERTY_VIDEOCOMPRESSION_GETINFO_S,*PKSPROPERTY_VIDEOCOMPRESSION_GETINFO_S;\n\ntypedef struct {\n  KSPROPERTY Property;\n  ULONG StreamIndex;\n  LONG Value;\n} KSPROPERTY_VIDEOCOMPRESSION_S,*PKSPROPERTY_VIDEOCOMPRESSION_S;\n\ntypedef struct {\n  KSPROPERTY Property;\n  ULONG StreamIndex;\n  LONG Value;\n  ULONG Flags;\n} KSPROPERTY_VIDEOCOMPRESSION_S1,*PKSPROPERTY_VIDEOCOMPRESSION_S1;\n\n#define STATIC_KSDATAFORMAT_SUBTYPE_OVERLAY\t\t\t\t\\\n\t0xe436eb7fL,0x524f,0x11ce,0x9f,0x53,0x00,0x20,0xaf,0x0b,0xa7,0x70\nDEFINE_GUIDSTRUCT(\"e436eb7f-524f-11ce-9f53-0020af0ba770\",KSDATAFORMAT_SUBTYPE_OVERLAY);\n#define KSDATAFORMAT_SUBTYPE_OVERLAY DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_OVERLAY)\n\n#define STATIC_KSPROPSETID_OverlayUpdate\t\t\t\t\\\n\t0x490EA5CFL,0x7681,0x11D1,0xA2,0x1C,0x00,0xA0,0xC9,0x22,0x31,0x96\nDEFINE_GUIDSTRUCT(\"490EA5CF-7681-11D1-A21C-00A0C9223196\",KSPROPSETID_OverlayUpdate);\n#define KSPROPSETID_OverlayUpdate DEFINE_GUIDNAMED(KSPROPSETID_OverlayUpdate)\n\ntypedef enum {\n  KSPROPERTY_OVERLAYUPDATE_INTERESTS,\n  KSPROPERTY_OVERLAYUPDATE_CLIPLIST = 0x1,\n  KSPROPERTY_OVERLAYUPDATE_PALETTE = 0x2,\n  KSPROPERTY_OVERLAYUPDATE_COLORKEY = 0x4,\n  KSPROPERTY_OVERLAYUPDATE_VIDEOPOSITION = 0x8,\n  KSPROPERTY_OVERLAYUPDATE_DISPLAYCHANGE = 0x10,\n  KSPROPERTY_OVERLAYUPDATE_COLORREF = 0x10000000\n} KSPROPERTY_OVERLAYUPDATE;\n\ntypedef struct {\n  ULONG PelsWidth;\n  ULONG PelsHeight;\n  ULONG BitsPerPel;\n  WCHAR DeviceID[1];\n} KSDISPLAYCHANGE,*PKSDISPLAYCHANGE;\n\n#define DEFINE_KSPROPERTY_ITEM_OVERLAYUPDATE_INTERESTS(Handler)\t\t\\\n\tDEFINE_KSPROPERTY_ITEM(\t\t\t\t\t\t\\\n\t\t\t\tKSPROPERTY_OVERLAYUPDATE_INTERESTS,\t\\\n\t\t\t\t(Handler),\t\t\t\t\\\n\t\t\t\tsizeof(KSPROPERTY),\t\t\t\\\n\t\t\t\tsizeof(ULONG),\t\t\t\t\\\n\t\t\t\tNULL, NULL, 0, NULL, NULL, 0)\n\n#define DEFINE_KSPROPERTY_ITEM_OVERLAYUPDATE_PALETTE(Handler)\t\t\\\n\tDEFINE_KSPROPERTY_ITEM(\t\t\t\t\t\t\\\n\t\t\t\tKSPROPERTY_OVERLAYUPDATE_PALETTE,\t\\\n\t\t\t\tNULL,\t\t\t\t\t\\\n\t\t\t\tsizeof(KSPROPERTY),\t\t\t\\\n\t\t\t\t0,\t\t\t\t\t\\\n\t\t\t\t(Handler),\t\t\t\t\\\n\t\t\t\tNULL, 0, NULL, NULL, 0)\n\n#define DEFINE_KSPROPERTY_ITEM_OVERLAYUPDATE_COLORKEY(Handler)\t\t\\\n\tDEFINE_KSPROPERTY_ITEM(\t\t\t\t\t\t\\\n\t\t\t\tKSPROPERTY_OVERLAYUPDATE_COLORKEY,\t\\\n\t\t\t\tNULL,\t\t\t\t\t\\\n\t\t\t\tsizeof(KSPROPERTY),\t\t\t\\\n\t\t\t\tsizeof(COLORKEY),\t\t\t\\\n\t\t\t\t(Handler),\t\t\t\t\\\n\t\t\t\tNULL, 0, NULL, NULL, 0)\n\n#define DEFINE_KSPROPERTY_ITEM_OVERLAYUPDATE_CLIPLIST(Handler)\t\t\\\n\tDEFINE_KSPROPERTY_ITEM(\t\t\t\t\t\t\\\n\t\t\t\tKSPROPERTY_OVERLAYUPDATE_CLIPLIST,\t\\\n\t\t\t\tNULL,\t\t\t\t\t\\\n\t\t\t\tsizeof(KSPROPERTY),\t\t\t\\\n\t\t\t\t2 *sizeof(RECT) + sizeof(RGNDATAHEADER),\\\n\t\t\t\t(Handler),\t\t\t\t\\\n\t\t\t\tNULL, 0, NULL, NULL, 0)\n\n#define DEFINE_KSPROPERTY_ITEM_OVERLAYUPDATE_VIDEOPOSITION(Handler)\t\\\n\tDEFINE_KSPROPERTY_ITEM(\t\t\t\t\t\t\\\n\t\t\t\tKSPROPERTY_OVERLAYUPDATE_VIDEOPOSITION,\t\\\n\t\t\t\tNULL,\t\t\t\t\t\\\n\t\t\t\tsizeof(KSPROPERTY),\t\t\t\\\n\t\t\t\t2 *sizeof(RECT),\t\t\t\\\n\t\t\t\t(Handler),\t\t\t\t\\\n\t\t\t\tNULL, 0, NULL, NULL, 0)\n\n#define DEFINE_KSPROPERTY_ITEM_OVERLAYUPDATE_DISPLAYCHANGE(Handler)\t\\\n\tDEFINE_KSPROPERTY_ITEM(\t\t\t\t\t\t\\\n\t\t\t\tKSPROPERTY_OVERLAYUPDATE_DISPLAYCHANGE,\t\\\n\t\t\t\tNULL,\t\t\t\t\t\\\n\t\t\t\tsizeof(KSPROPERTY),\t\t\t\\\n\t\t\t\tsizeof(KSDISPLAYCHANGE),\t\t\\\n\t\t\t\t(Handler),\t\t\t\t\\\n\t\t\t\tNULL, 0, NULL, NULL, 0)\n\n#define DEFINE_KSPROPERTY_ITEM_OVERLAYUPDATE_COLORREF(Handler)\t\t\\\n\tDEFINE_KSPROPERTY_ITEM(\t\t\t\t\t\t\\\n\t\t\t\tKSPROPERTY_OVERLAYUPDATE_COLORREF,\t\\\n\t\t\t\t(Handler),\t\t\t\t\\\n\t\t\t\tsizeof(KSPROPERTY),\t\t\t\\\n\t\t\t\tsizeof(COLORREF),\t\t\t\\\n\t\t\t\tNULL,\t\t\t\t\t\\\n\t\t\t\tNULL, 0, NULL, NULL, 0)\n\n#define STATIC_PROPSETID_VIDCAP_VIDEOCONTROL\t\t\t\t\\\n\t0x6a2e0670L,0x28e4,0x11d0,0xa1,0x8c,0x00,0xa0,0xc9,0x11,0x89,0x56\nDEFINE_GUIDSTRUCT(\"6a2e0670-28e4-11d0-a18c-00a0c9118956\",PROPSETID_VIDCAP_VIDEOCONTROL);\n#define PROPSETID_VIDCAP_VIDEOCONTROL DEFINE_GUIDNAMED(PROPSETID_VIDCAP_VIDEOCONTROL)\n\ntypedef enum {\n  KSPROPERTY_VIDEOCONTROL_CAPS,\n  KSPROPERTY_VIDEOCONTROL_ACTUAL_FRAME_RATE,\n  KSPROPERTY_VIDEOCONTROL_FRAME_RATES,\n  KSPROPERTY_VIDEOCONTROL_MODE\n} KSPROPERTY_VIDCAP_VIDEOCONTROL;\n\ntypedef enum {\n  KS_VideoControlFlag_FlipHorizontal = 0x0001,\n  KS_VideoControlFlag_FlipVertical = 0x0002,\n  KS_Obsolete_VideoControlFlag_ExternalTriggerEnable = 0x0010,\n  KS_Obsolete_VideoControlFlag_Trigger = 0x0020,\n  KS_VideoControlFlag_ExternalTriggerEnable = 0x0004,\n  KS_VideoControlFlag_Trigger = 0x0008\n} KS_VideoControlFlags;\n\ntypedef struct {\n  KSPROPERTY Property;\n  ULONG StreamIndex;\n  ULONG VideoControlCaps;\n} KSPROPERTY_VIDEOCONTROL_CAPS_S,*PKSPROPERTY_VIDEOCONTROL_CAPS_S;\n\ntypedef struct {\n  KSPROPERTY Property;\n  ULONG StreamIndex;\n  LONG Mode;\n} KSPROPERTY_VIDEOCONTROL_MODE_S,*PKSPROPERTY_VIDEOCONTROL_MODE_S;\n\ntypedef struct {\n  KSPROPERTY Property;\n  ULONG StreamIndex;\n  ULONG RangeIndex;\n  SIZE Dimensions;\n  LONGLONG CurrentActualFrameRate;\n  LONGLONG CurrentMaxAvailableFrameRate;\n} KSPROPERTY_VIDEOCONTROL_ACTUAL_FRAME_RATE_S,*PKSPROPERTY_VIDEOCONTROL_ACTUAL_FRAME_RATE_S;\n\ntypedef struct {\n  KSPROPERTY Property;\n  ULONG StreamIndex;\n  ULONG RangeIndex;\n  SIZE Dimensions;\n} KSPROPERTY_VIDEOCONTROL_FRAME_RATES_S,*PKSPROPERTY_VIDEOCONTROL_FRAME_RATES_S;\n\n#define STATIC_PROPSETID_VIDCAP_DROPPEDFRAMES\t\t\t\t\\\n\t0xC6E13344L,0x30AC,0x11d0,0xa1,0x8c,0x00,0xa0,0xc9,0x11,0x89,0x56\nDEFINE_GUIDSTRUCT(\"C6E13344-30AC-11d0-A18C-00A0C9118956\",PROPSETID_VIDCAP_DROPPEDFRAMES);\n#define PROPSETID_VIDCAP_DROPPEDFRAMES DEFINE_GUIDNAMED(PROPSETID_VIDCAP_DROPPEDFRAMES)\n\ntypedef enum {\n  KSPROPERTY_DROPPEDFRAMES_CURRENT\n} KSPROPERTY_VIDCAP_DROPPEDFRAMES;\n\ntypedef struct {\n  KSPROPERTY Property;\n  LONGLONG PictureNumber;\n  LONGLONG DropCount;\n  ULONG AverageFrameSize;\n} KSPROPERTY_DROPPEDFRAMES_CURRENT_S,*PKSPROPERTY_DROPPEDFRAMES_CURRENT_S;\n\n#define STATIC_KSPROPSETID_VPConfig\t\t\t\t\t\\\n\t0xbc29a660L,0x30e3,0x11d0,0x9e,0x69,0x00,0xc0,0x4f,0xd7,0xc1,0x5b\nDEFINE_GUIDSTRUCT(\"bc29a660-30e3-11d0-9e69-00c04fd7c15b\",KSPROPSETID_VPConfig);\n#define KSPROPSETID_VPConfig DEFINE_GUIDNAMED(KSPROPSETID_VPConfig)\n\n#define STATIC_KSPROPSETID_VPVBIConfig\t\t\t\t\t\\\n\t0xec529b00L,0x1a1f,0x11d1,0xba,0xd9,0x0,0x60,0x97,0x44,0x11,0x1a\nDEFINE_GUIDSTRUCT(\"ec529b00-1a1f-11d1-bad9-00609744111a\",KSPROPSETID_VPVBIConfig);\n#define KSPROPSETID_VPVBIConfig DEFINE_GUIDNAMED(KSPROPSETID_VPVBIConfig)\n\ntypedef enum {\n  KSPROPERTY_VPCONFIG_NUMCONNECTINFO,\n  KSPROPERTY_VPCONFIG_GETCONNECTINFO,\n  KSPROPERTY_VPCONFIG_SETCONNECTINFO,\n  KSPROPERTY_VPCONFIG_VPDATAINFO,\n  KSPROPERTY_VPCONFIG_MAXPIXELRATE,\n  KSPROPERTY_VPCONFIG_INFORMVPINPUT,\n  KSPROPERTY_VPCONFIG_NUMVIDEOFORMAT,\n  KSPROPERTY_VPCONFIG_GETVIDEOFORMAT,\n  KSPROPERTY_VPCONFIG_SETVIDEOFORMAT,\n  KSPROPERTY_VPCONFIG_INVERTPOLARITY,\n  KSPROPERTY_VPCONFIG_DECIMATIONCAPABILITY,\n  KSPROPERTY_VPCONFIG_SCALEFACTOR,\n  KSPROPERTY_VPCONFIG_DDRAWHANDLE,\n  KSPROPERTY_VPCONFIG_VIDEOPORTID,\n  KSPROPERTY_VPCONFIG_DDRAWSURFACEHANDLE,\n  KSPROPERTY_VPCONFIG_SURFACEPARAMS\n} KSPROPERTY_VPCONFIG;\n\n#define STATIC_CLSID_KsIBasicAudioInterfaceHandler\t\t\t\\\n\t0xb9f8ac3e,0x0f71,0x11d2,0xb7,0x2c,0x00,0xc0,0x4f,0xb6,0xbd,0x3d\nDEFINE_GUIDSTRUCT(\"b9f8ac3e-0f71-11d2-b72c-00c04fb6bd3d\",CLSID_KsIBasicAudioInterfaceHandler);\n#define CLSID_KsIBasicAudioInterfaceHandler DEFINE_GUIDNAMED(CLSID_KsIBasicAudioInterfaceHandler)\n\n#ifdef __IVPType__\ntypedef struct {\n  AMVPSIZE Size;\n  DWORD MaxPixelsPerSecond;\n  DWORD Reserved;\n} KSVPMAXPIXELRATE,*PKSVPMAXPIXELRATE;\n\ntypedef struct {\n  KSPROPERTY Property;\n  AMVPSIZE Size;\n} KSVPSIZE_PROP,*PKSVPSIZE_PROP;\n\ntypedef struct {\n  DWORD dwPitch;\n  DWORD dwXOrigin;\n  DWORD dwYOrigin;\n} KSVPSURFACEPARAMS,*PKSVPSURFACEPARAMS;\n#else /* __IVPType__ */\n\n#ifndef __DDRAW_INCLUDED__\n#define DDPF_FOURCC 0x00000004l\n\ntypedef struct _DDPIXELFORMAT\n{\n  DWORD dwSize;\n  DWORD dwFlags;\n  DWORD dwFourCC;\n  __MINGW_EXTENSION union\n  {\n    DWORD dwRGBBitCount;\n    DWORD dwYUVBitCount;\n    DWORD dwZBufferBitDepth;\n    DWORD dwAlphaBitDepth;\n  };\n  __MINGW_EXTENSION union\n  {\n    DWORD dwRBitMask;\n    DWORD dwYBitMask;\n  };\n  __MINGW_EXTENSION union\n  {\n    DWORD dwGBitMask;\n    DWORD dwUBitMask;\n  };\n  __MINGW_EXTENSION union\n  {\n    DWORD dwBBitMask;\n    DWORD dwVBitMask;\n  };\n  __MINGW_EXTENSION union\n  {\n    DWORD dwRGBAlphaBitMask;\n    DWORD dwYUVAlphaBitMask;\n    DWORD dwRGBZBitMask;\n    DWORD dwYUVZBitMask;\n  };\n} DDPIXELFORMAT,*LPDDPIXELFORMAT;\n#endif /* __DDRAW_INCLUDED__ */\n\n#ifndef __DVP_INCLUDED__\ntypedef struct _DDVIDEOPORTCONNECT {\n  DWORD dwSize;\n  DWORD dwPortWidth;\n  GUID guidTypeID;\n  DWORD dwFlags;\n  ULONG_PTR dwReserved1;\n} DDVIDEOPORTCONNECT,*LPDDVIDEOPORTCONNECT;\n\n#define DDVPTYPE_E_HREFH_VREFH\t\t\t\t\t\t\\\n\t0x54F39980L,0xDA60,0x11CF,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8\n\n#define DDVPTYPE_E_HREFL_VREFL\t\t\t\t\t\t\\\n\t0xE09C77E0L,0xDA60,0x11CF,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8\n#endif /* __DVP_INCLUDED__ */\n\ntypedef enum\n{\n  KS_PixAspectRatio_NTSC4x3,\n  KS_PixAspectRatio_NTSC16x9,\n  KS_PixAspectRatio_PAL4x3,\n  KS_PixAspectRatio_PAL16x9\n} KS_AMPixAspectRatio;\n\ntypedef enum\n{\n  KS_AMVP_DO_NOT_CARE,\n  KS_AMVP_BEST_BANDWIDTH,\n  KS_AMVP_INPUT_SAME_AS_OUTPUT\n} KS_AMVP_SELECTFORMATBY;\n\ntypedef enum\n{\n  KS_AMVP_MODE_WEAVE,\n  KS_AMVP_MODE_BOBINTERLEAVED,\n  KS_AMVP_MODE_BOBNONINTERLEAVED,\n  KS_AMVP_MODE_SKIPEVEN,\n  KS_AMVP_MODE_SKIPODD\n} KS_AMVP_MODE;\n\ntypedef struct tagKS_AMVPDIMINFO\n{\n  DWORD dwFieldWidth;\n  DWORD dwFieldHeight;\n  DWORD dwVBIWidth;\n  DWORD dwVBIHeight;\n  RECT rcValidRegion;\n} KS_AMVPDIMINFO,*PKS_AMVPDIMINFO;\n\ntypedef struct tagKS_AMVPDATAINFO\n{\n  DWORD dwSize;\n  DWORD dwMicrosecondsPerField;\n  KS_AMVPDIMINFO amvpDimInfo;\n  DWORD dwPictAspectRatioX;\n  DWORD dwPictAspectRatioY;\n  WINBOOL bEnableDoubleClock;\n  WINBOOL bEnableVACT;\n  WINBOOL bDataIsInterlaced;\n  LONG lHalfLinesOdd;\n  WINBOOL bFieldPolarityInverted;\n  DWORD dwNumLinesInVREF;\n  LONG lHalfLinesEven;\n  DWORD dwReserved1;\n} KS_AMVPDATAINFO,*PKS_AMVPDATAINFO;\n\ntypedef struct tagKS_AMVPSIZE\n{\n  DWORD dwWidth;\n  DWORD dwHeight;\n} KS_AMVPSIZE,*PKS_AMVPSIZE;\n\ntypedef struct {\n  KS_AMVPSIZE Size;\n  DWORD MaxPixelsPerSecond;\n  DWORD Reserved;\n} KSVPMAXPIXELRATE,*PKSVPMAXPIXELRATE;\n\ntypedef struct {\n  KSPROPERTY Property;\n  KS_AMVPSIZE Size;\n} KSVPSIZE_PROP,*PKSVPSIZE_PROP;\n\ntypedef struct {\n  DWORD dwPitch;\n  DWORD dwXOrigin;\n  DWORD dwYOrigin;\n} KSVPSURFACEPARAMS,*PKSVPSURFACEPARAMS;\n#endif /* __IVPType__ */\n\n#define STATIC_KSEVENTSETID_VPNotify\t\t\t\t\t\\\n\t0x20c5598eL,0xd3c8,0x11d0,0x8d,0xfc,0x00,0xc0,0x4f,0xd7,0xc0,0x8b\nDEFINE_GUIDSTRUCT(\"20c5598e-d3c8-11d0-8dfc-00c04fd7c08b\",KSEVENTSETID_VPNotify);\n#define KSEVENTSETID_VPNotify DEFINE_GUIDNAMED(KSEVENTSETID_VPNotify)\n\ntypedef enum {\n  KSEVENT_VPNOTIFY_FORMATCHANGE\n} KSEVENT_VPNOTIFY;\n\n#define STATIC_KSEVENTSETID_VIDCAPTOSTI\t\t\t\t\t\\\n\t0xdb47de20,0xf628,0x11d1,0xba,0x41,0x0,0xa0,0xc9,0xd,0x2b,0x5\nDEFINE_GUIDSTRUCT(\"DB47DE20-F628-11d1-BA41-00A0C90D2B05\",KSEVENTSETID_VIDCAPTOSTI);\n#define KSEVENTSETID_VIDCAPNotify DEFINE_GUIDNAMED(KSEVENTSETID_VIDCAPTOSTI)\n\ntypedef enum {\n  KSEVENT_VIDCAPTOSTI_EXT_TRIGGER,\n  KSEVENT_VIDCAP_AUTO_UPDATE,\n  KSEVENT_VIDCAP_SEARCH\n} KSEVENT_VIDCAPTOSTI;\n\ntypedef enum {\n  KSPROPERTY_EXTENSION_UNIT_INFO,\n  KSPROPERTY_EXTENSION_UNIT_CONTROL,\n  KSPROPERTY_EXTENSION_UNIT_PASS_THROUGH = 0xffff\n} KSPROPERTY_EXTENSION_UNIT,*PKSPROPERTY_EXTENSION_UNIT;\n\n#define STATIC_KSEVENTSETID_VPVBINotify\t\t\t\t\t\\\n\t0xec529b01L,0x1a1f,0x11d1,0xba,0xd9,0x0,0x60,0x97,0x44,0x11,0x1a\nDEFINE_GUIDSTRUCT(\"ec529b01-1a1f-11d1-bad9-00609744111a\",KSEVENTSETID_VPVBINotify);\n#define KSEVENTSETID_VPVBINotify DEFINE_GUIDNAMED(KSEVENTSETID_VPVBINotify)\n\ntypedef enum {\n  KSEVENT_VPVBINOTIFY_FORMATCHANGE\n} KSEVENT_VPVBINOTIFY;\n\n#define STATIC_KSDATAFORMAT_TYPE_AUXLine21Data\t\t\t\t\\\n\t0x670aea80L,0x3a82,0x11d0,0xb7,0x9b,0x00,0xaa,0x00,0x37,0x67,0xa7\nDEFINE_GUIDSTRUCT(\"670aea80-3a82-11d0-b79b-00aa003767a7\",KSDATAFORMAT_TYPE_AUXLine21Data);\n#define KSDATAFORMAT_TYPE_AUXLine21Data DEFINE_GUIDNAMED(KSDATAFORMAT_TYPE_AUXLine21Data)\n\n#define STATIC_KSDATAFORMAT_SUBTYPE_Line21_BytePair\t\t\t\\\n\t0x6e8d4a22L,0x310c,0x11d0,0xb7,0x9a,0x00,0xaa,0x00,0x37,0x67,0xa7\nDEFINE_GUIDSTRUCT(\"6e8d4a22-310c-11d0-b79a-00aa003767a7\",KSDATAFORMAT_SUBTYPE_Line21_BytePair);\n#define KSDATAFORMAT_SUBTYPE_Line21_BytePair DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_Line21_BytePair)\n\n#define STATIC_KSDATAFORMAT_SUBTYPE_Line21_GOPPacket\t\t\t\\\n\t0x6e8d4a23L,0x310c,0x11d0,0xb7,0x9a,0x00,0xaa,0x00,0x37,0x67,0xa7\nDEFINE_GUIDSTRUCT(\"6e8d4a23-310c-11d0-b79a-00aa003767a7\",KSDATAFORMAT_SUBTYPE_Line21_GOPPacket);\n#define KSDATAFORMAT_SUBTYPE_Line21_GOPPacket DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_Line21_GOPPacket)\n\ntypedef struct _KSGOP_USERDATA {\n  ULONG sc;\n  ULONG reserved1;\n  BYTE cFields;\n  CHAR l21Data[3];\n} KSGOP_USERDATA,*PKSGOP_USERDATA;\n\n#define STATIC_KSDATAFORMAT_TYPE_DVD_ENCRYPTED_PACK\t\t\t\\\n\t0xed0b916a,0x044d,0x11d1,0xaa,0x78,0x00,0xc0,0x4f,0xc3,0x1d,0x60\nDEFINE_GUIDSTRUCT(\"ed0b916a-044d-11d1-aa78-00c04fc31d60\",KSDATAFORMAT_TYPE_DVD_ENCRYPTED_PACK);\n#define KSDATAFORMAT_TYPE_DVD_ENCRYPTED_PACK DEFINE_GUIDNAMED(KSDATAFORMAT_TYPE_DVD_ENCRYPTED_PACK)\n\n#define KS_AM_UseNewCSSKey\t\t\t0x1\n\n#define STATIC_KSPROPSETID_TSRateChange\t\t\t\t\t\\\n\t0xa503c5c0,0x1d1d,0x11d1,0xad,0x80,0x44,0x45,0x53,0x54,0x0,0x0\nDEFINE_GUIDSTRUCT(\"A503C5C0-1D1D-11D1-AD80-444553540000\",KSPROPSETID_TSRateChange);\n#define KSPROPSETID_TSRateChange DEFINE_GUIDNAMED(KSPROPSETID_TSRateChange)\n\ntypedef enum {\n  KS_AM_RATE_SimpleRateChange = 1,\n  KS_AM_RATE_ExactRateChange = 2,\n  KS_AM_RATE_MaxFullDataRate = 3,\n  KS_AM_RATE_Step = 4\n} KS_AM_PROPERTY_TS_RATE_CHANGE;\n\ntypedef struct {\n  REFERENCE_TIME StartTime;\n  LONG Rate;\n} KS_AM_SimpleRateChange,*PKS_AM_SimpleRateChange;\n\ntypedef struct {\n  REFERENCE_TIME OutputZeroTime;\n  LONG Rate;\n} KS_AM_ExactRateChange,*PKS_AM_ExactRateChange;\n\ntypedef LONG KS_AM_MaxFullDataRate;\ntypedef DWORD KS_AM_Step;\n\n#define STATIC_KSCATEGORY_ENCODER\t\t\t\t\t\\\n\t0x19689bf6,0xc384,0x48fd,0xad,0x51,0x90,0xe5,0x8c,0x79,0xf7,0xb\nDEFINE_GUIDSTRUCT(\"19689BF6-C384-48fd-AD51-90E58C79F70B\",KSCATEGORY_ENCODER);\n#define KSCATEGORY_ENCODER DEFINE_GUIDNAMED(KSCATEGORY_ENCODER)\n\n#define STATIC_KSCATEGORY_MULTIPLEXER\t\t\t\t\t\\\n\t0x7a5de1d3,0x1a1,0x452c,0xb4,0x81,0x4f,0xa2,0xb9,0x62,0x71,0xe8\nDEFINE_GUIDSTRUCT(\"7A5DE1D3-01A1-452c-B481-4FA2B96271E8\",KSCATEGORY_MULTIPLEXER);\n#define KSCATEGORY_MULTIPLEXER DEFINE_GUIDNAMED(KSCATEGORY_MULTIPLEXER)\n\n#ifndef __ENCODER_API_GUIDS__\n#define __ENCODER_API_GUIDS__\n\n#define STATIC_ENCAPIPARAM_BITRATE\t\t\t\t\t\\\n\t0x49cc4c43,0xca83,0x4ad4,0xa9,0xaf,0xf3,0x69,0x6a,0xf6,0x66,0xdf\nDEFINE_GUIDSTRUCT(\"49CC4C43-CA83-4ad4-A9AF-F3696AF666DF\",ENCAPIPARAM_BITRATE);\n#define ENCAPIPARAM_BITRATE DEFINE_GUIDNAMED(ENCAPIPARAM_BITRATE)\n\n#define STATIC_ENCAPIPARAM_PEAK_BITRATE\t\t\t\t\t\\\n\t0x703f16a9,0x3d48,0x44a1,0xb0,0x77,0x1,0x8d,0xff,0x91,0x5d,0x19\nDEFINE_GUIDSTRUCT(\"703F16A9-3D48-44a1-B077-018DFF915D19\",ENCAPIPARAM_PEAK_BITRATE);\n#define ENCAPIPARAM_PEAK_BITRATE DEFINE_GUIDNAMED(ENCAPIPARAM_PEAK_BITRATE)\n\n#define STATIC_ENCAPIPARAM_BITRATE_MODE\t\t\t\t\t\\\n\t0xee5fb25c,0xc713,0x40d1,0x9d,0x58,0xc0,0xd7,0x24,0x1e,0x25,0xf\nDEFINE_GUIDSTRUCT(\"EE5FB25C-C713-40d1-9D58-C0D7241E250F\",ENCAPIPARAM_BITRATE_MODE);\n#define ENCAPIPARAM_BITRATE_MODE DEFINE_GUIDNAMED(ENCAPIPARAM_BITRATE_MODE)\n\n#define STATIC_CODECAPI_CHANGELISTS\t\t\t\t\t\\\n\t0x62b12acf,0xf6b0,0x47d9,0x94,0x56,0x96,0xf2,0x2c,0x4e,0x0b,0x9d\nDEFINE_GUIDSTRUCT(\"62B12ACF-F6B0-47D9-9456-96F22C4E0B9D\",CODECAPI_CHANGELISTS);\n#define CODECAPI_CHANGELISTS DEFINE_GUIDNAMED(CODECAPI_CHANGELISTS)\n\n#define STATIC_CODECAPI_VIDEO_ENCODER\t\t\t\t\t\\\n\t0x7112e8e1,0x3d03,0x47ef,0x8e,0x60,0x03,0xf1,0xcf,0x53,0x73,0x01\nDEFINE_GUIDSTRUCT(\"7112E8E1-3D03-47EF-8E60-03F1CF537301\",CODECAPI_VIDEO_ENCODER);\n#define CODECAPI_VIDEO_ENCODER DEFINE_GUIDNAMED(CODECAPI_VIDEO_ENCODER)\n\n#define STATIC_CODECAPI_AUDIO_ENCODER\t\t\t\t\t\\\n\t0xb9d19a3e,0xf897,0x429c,0xbc,0x46,0x81,0x38,0xb7,0x27,0x2b,0x2d\nDEFINE_GUIDSTRUCT(\"B9D19A3E-F897-429C-BC46-8138B7272B2D\",CODECAPI_AUDIO_ENCODER);\n#define CODECAPI_AUDIO_ENCODER DEFINE_GUIDNAMED(CODECAPI_AUDIO_ENCODER)\n\n#define STATIC_CODECAPI_SETALLDEFAULTS\t\t\t\t\t\\\n\t0x6c5e6a7c,0xacf8,0x4f55,0xa9,0x99,0x1a,0x62,0x81,0x09,0x05,0x1b\nDEFINE_GUIDSTRUCT(\"6C5E6A7C-ACF8-4F55-A999-1A628109051B\",CODECAPI_SETALLDEFAULTS);\n#define CODECAPI_SETALLDEFAULTS DEFINE_GUIDNAMED(CODECAPI_SETALLDEFAULTS)\n\n#define STATIC_CODECAPI_ALLSETTINGS\t\t\t\t\t\\\n\t0x6a577e92,0x83e1,0x4113,0xad,0xc2,0x4f,0xce,0xc3,0x2f,0x83,0xa1\nDEFINE_GUIDSTRUCT(\"6A577E92-83E1-4113-ADC2-4FCEC32F83A1\",CODECAPI_ALLSETTINGS);\n#define CODECAPI_ALLSETTINGS DEFINE_GUIDNAMED(CODECAPI_ALLSETTINGS)\n\n#define STATIC_CODECAPI_SUPPORTSEVENTS\t\t\t\t\t\\\n\t0x0581af97,0x7693,0x4dbd,0x9d,0xca,0x3f,0x9e,0xbd,0x65,0x85,0xa1\nDEFINE_GUIDSTRUCT(\"0581AF97-7693-4DBD-9DCA-3F9EBD6585A1\",CODECAPI_SUPPORTSEVENTS);\n#define CODECAPI_SUPPORTSEVENTS DEFINE_GUIDNAMED(CODECAPI_SUPPORTSEVENTS)\n\n#define STATIC_CODECAPI_CURRENTCHANGELIST\t\t\t\t\\\n\t0x1cb14e83,0x7d72,0x4657,0x83,0xfd,0x47,0xa2,0xc5,0xb9,0xd1,0x3d\nDEFINE_GUIDSTRUCT(\"1CB14E83-7D72-4657-83FD-47A2C5B9D13D\",CODECAPI_CURRENTCHANGELIST);\n#define CODECAPI_CURRENTCHANGELIST DEFINE_GUIDNAMED(CODECAPI_CURRENTCHANGELIST)\n#endif /* __ENCODER_API_GUIDS__ */\n\n#ifndef __ENCODER_API_DEFINES__\n#define __ENCODER_API_DEFINES__\ntypedef enum {\n  ConstantBitRate = 0,\n  VariableBitRateAverage,\n  VariableBitRatePeak\n} VIDEOENCODER_BITRATE_MODE;\n#endif /* __ENCODER_API_DEFINES__ */\n\n#define STATIC_KSPROPSETID_Jack\\\n    0x4509f757, 0x2d46, 0x4637, 0x8e, 0x62, 0xce, 0x7d, 0xb9, 0x44, 0xf5, 0x7b\nDEFINE_GUIDSTRUCT(\"4509F757-2D46-4637-8E62-CE7DB944F57B\", KSPROPSETID_Jack);\n#define KSPROPSETID_Jack DEFINE_GUIDNAMED(KSPROPSETID_Jack)\n\ntypedef enum {\n    KSPROPERTY_JACK_DESCRIPTION = 1,\n    KSPROPERTY_JACK_DESCRIPTION2,\n    KSPROPERTY_JACK_SINK_INFO\n} KSPROPERTY_JACK;\n\ntypedef enum\n{\n    eConnTypeUnknown,\n    eConnType3Point5mm,\n    eConnTypeQuarter,\n    eConnTypeAtapiInternal,\n    eConnTypeRCA,\n    eConnTypeOptical,\n    eConnTypeOtherDigital,\n    eConnTypeOtherAnalog,\n    eConnTypeMultichannelAnalogDIN,\n    eConnTypeXlrProfessional,\n    eConnTypeRJ11Modem,\n    eConnTypeCombination\n} EPcxConnectionType;\n\ntypedef enum\n{\n    eGeoLocRear = 0x1,\n    eGeoLocFront,\n    eGeoLocLeft,\n    eGeoLocRight,\n    eGeoLocTop,\n    eGeoLocBottom,\n    eGeoLocRearPanel,\n    eGeoLocRiser,\n    eGeoLocInsideMobileLid,\n    eGeoLocDrivebay,\n    eGeoLocHDMI,\n    eGeoLocOutsideMobileLid,\n    eGeoLocATAPI,\n    eGeoLocReserved5,\n    eGeoLocReserved6,\n    EPcxGeoLocation_enum_count\n} EPcxGeoLocation;\n\ntypedef enum\n{\n    eGenLocPrimaryBox = 0,\n    eGenLocInternal,\n    eGenLocSeparate,\n    eGenLocOther,\n    EPcxGenLocation_enum_count\n} EPcxGenLocation;\n\ntypedef enum\n{\n    ePortConnJack = 0,\n    ePortConnIntegratedDevice,\n    ePortConnBothIntegratedAndJack,\n    ePortConnUnknown\n} EPxcPortConnection;\n\ntypedef struct \n{\n    DWORD                 ChannelMapping;\n    COLORREF              Color;\n    EPcxConnectionType    ConnectionType;\n    EPcxGeoLocation       GeoLocation;\n    EPcxGenLocation       GenLocation;\n    EPxcPortConnection    PortConnection;\n    BOOL                  IsConnected;\n} KSJACK_DESCRIPTION, *PKSJACK_DESCRIPTION;\n\ntypedef enum \n{\n    KSJACK_SINK_CONNECTIONTYPE_HDMI = 0,           \n    KSJACK_SINK_CONNECTIONTYPE_DISPLAYPORT,         \n} KSJACK_SINK_CONNECTIONTYPE;\n\n#define MAX_SINK_DESCRIPTION_NAME_LENGTH 32\ntypedef struct _tagKSJACK_SINK_INFORMATION\n{\n  KSJACK_SINK_CONNECTIONTYPE ConnType;              \n  WORD  ManufacturerId;                            \n  WORD  ProductId;                                  \n  WORD  AudioLatency;                               \n  BOOL  HDCPCapable;                                \n  BOOL  AICapable;                                  \n  UCHAR SinkDescriptionLength;                      \n  WCHAR SinkDescription[MAX_SINK_DESCRIPTION_NAME_LENGTH];\n  LUID  PortId;                                 \n}  KSJACK_SINK_INFORMATION, *PKSJACK_SINK_INFORMATION;\n\n#define JACKDESC2_PRESENCE_DETECT_CAPABILITY       0x00000001 \n#define JACKDESC2_DYNAMIC_FORMAT_CHANGE_CAPABILITY 0x00000002\n\ntypedef struct _tagKSJACK_DESCRIPTION2\n{\n  DWORD              DeviceStateInfo;\n  DWORD              JackCapabilities;\n} KSJACK_DESCRIPTION2, *PKSJACK_DESCRIPTION2;\n\n/* Additional structs for Windows Vista and later */\ntypedef struct _tagKSRTAUDIO_BUFFER_PROPERTY {\n    KSPROPERTY  Property;\n    PVOID       BaseAddress;\n    ULONG       RequestedBufferSize;\n} KSRTAUDIO_BUFFER_PROPERTY, *PKSRTAUDIO_BUFFER_PROPERTY;\n\ntypedef struct _tagKSRTAUDIO_BUFFER_PROPERTY_WITH_NOTIFICATION {\n    KSPROPERTY  Property;\n    PVOID       BaseAddress;\n    ULONG       RequestedBufferSize;\n    ULONG       NotificationCount;\n} KSRTAUDIO_BUFFER_PROPERTY_WITH_NOTIFICATION, *PKSRTAUDIO_BUFFER_PROPERTY_WITH_NOTIFICATION;\n\ntypedef struct _tagKSRTAUDIO_BUFFER {\n    PVOID   BufferAddress;\n    ULONG   ActualBufferSize;\n    BOOL    CallMemoryBarrier;\n} KSRTAUDIO_BUFFER, *PKSRTAUDIO_BUFFER;\n\ntypedef struct _tagKSRTAUDIO_HWLATENCY {\n    ULONG   FifoSize;\n    ULONG   ChipsetDelay;\n    ULONG   CodecDelay;\n} KSRTAUDIO_HWLATENCY, *PKSRTAUDIO_HWLATENCY;\n\ntypedef struct _tagKSRTAUDIO_HWREGISTER_PROPERTY {\n    KSPROPERTY  Property;\n    PVOID       BaseAddress;\n} KSRTAUDIO_HWREGISTER_PROPERTY, *PKSRTAUDIO_HWREGISTER_PROPERTY;\n\ntypedef struct _tagKSRTAUDIO_HWREGISTER {\n    PVOID       Register;\n    ULONG       Width;\n    ULONGLONG   Numerator;\n    ULONGLONG   Denominator;\n    ULONG       Accuracy;\n} KSRTAUDIO_HWREGISTER, *PKSRTAUDIO_HWREGISTER;\n\ntypedef struct _tagKSRTAUDIO_NOTIFICATION_EVENT_PROPERTY {\n    KSPROPERTY  Property;\n    HANDLE      NotificationEvent;\n} KSRTAUDIO_NOTIFICATION_EVENT_PROPERTY, *PKSRTAUDIO_NOTIFICATION_EVENT_PROPERTY;\n\n\n#endif /* _KSMEDIA_ */\n\n"
  },
  {
    "path": "thirdparty/portaudio/src/hostapi/wasapi/mingw-include/ksproxy.h",
    "content": "/**\n * This file has no copyright assigned and is placed in the Public Domain.\n * This file is part of the w64 mingw-runtime package.\n * No warranty is given; refer to the file DISCLAIMER.PD within this package.\n */\n#ifndef __KSPROXY__\n#define __KSPROXY__\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n#undef KSDDKAPI\n#ifdef _KSDDK_\n#define KSDDKAPI\n#else\n#define KSDDKAPI DECLSPEC_IMPORT\n#endif\n\n#define STATIC_IID_IKsObject\t\t\t\t\t\t\\\n\t0x423c13a2L,0x2070,0x11d0,0x9e,0xf7,0x00,0xaa,0x00,0xa2,0x16,0xa1\n\n#define STATIC_IID_IKsPinEx\t\t\t\t\t\t\\\n\t0x7bb38260L,0xd19c,0x11d2,0xb3,0x8a,0x00,0xa0,0xc9,0x5e,0xc2,0x2e\n\n#define STATIC_IID_IKsPin\t\t\t\t\t\t\\\n\t0xb61178d1L,0xa2d9,0x11cf,0x9e,0x53,0x00,0xaa,0x00,0xa2,0x16,0xa1\n\n#define STATIC_IID_IKsPinPipe\t\t\t\t\t\t\\\n\t0xe539cd90L,0xa8b4,0x11d1,0x81,0x89,0x00,0xa0,0xc9,0x06,0x28,0x02\n\n#define STATIC_IID_IKsDataTypeHandler\t\t\t\t\t\\\n\t0x5ffbaa02L,0x49a3,0x11d0,0x9f,0x36,0x00,0xaa,0x00,0xa2,0x16,0xa1\n\n#define STATIC_IID_IKsDataTypeCompletion\t\t\t\t\\\n\t0x827D1A0EL,0x0F73,0x11D2,0xB2,0x7A,0x00,0xA0,0xC9,0x22,0x31,0x96\n\n#define STATIC_IID_IKsInterfaceHandler\t\t\t\t\t\\\n\t0xD3ABC7E0L,0x9A61,0x11D0,0xA4,0x0D,0x00,0xA0,0xC9,0x22,0x31,0x96\n\n#define STATIC_IID_IKsClockPropertySet\t\t\t\t\t\\\n\t0x5C5CBD84L,0xE755,0x11D0,0xAC,0x18,0x00,0xA0,0xC9,0x22,0x31,0x96\n\n#define STATIC_IID_IKsAllocator\t\t\t\t\t\t\\\n\t0x8da64899L,0xc0d9,0x11d0,0x84,0x13,0x00,0x00,0xf8,0x22,0xfe,0x8a\n\n#define STATIC_IID_IKsAllocatorEx\t\t\t\t\t\\\n\t0x091bb63aL,0x603f,0x11d1,0xb0,0x67,0x00,0xa0,0xc9,0x06,0x28,0x02\n\n#ifndef STATIC_IID_IKsPropertySet\n#define STATIC_IID_IKsPropertySet\t\t\t\t\t\\\n\t0x31EFAC30L,0x515C,0x11d0,0xA9,0xAA,0x00,0xAA,0x00,0x61,0xBE,0x93\n#endif\n\n#define STATIC_IID_IKsTopology\t\t\t\t\t\t\\\n\t0x28F54683L,0x06FD,0x11D2,0xB2,0x7A,0x00,0xA0,0xC9,0x22,0x31,0x96\n\n#ifndef STATIC_IID_IKsControl\n#define STATIC_IID_IKsControl\t\t\t\t\t\t\\\n\t0x28F54685L,0x06FD,0x11D2,0xB2,0x7A,0x00,0xA0,0xC9,0x22,0x31,0x96\n#endif\n\n#define STATIC_IID_IKsAggregateControl\t\t\t\t\t\\\n\t0x7F40EAC0L,0x3947,0x11D2,0x87,0x4E,0x00,0xA0,0xC9,0x22,0x31,0x96\n\n#define STATIC_CLSID_Proxy\t\t\t\t\t\t\\\n\t0x17CCA71BL,0xECD7,0x11D0,0xB9,0x08,0x00,0xA0,0xC9,0x22,0x31,0x96\n\n#ifdef _KS_\n\nDEFINE_GUIDEX(IID_IKsObject);\n\nDEFINE_GUIDEX(IID_IKsPin);\n\nDEFINE_GUIDEX(IID_IKsPinEx);\n\nDEFINE_GUIDEX(IID_IKsPinPipe);\n\nDEFINE_GUIDEX(IID_IKsDataTypeHandler);\n\nDEFINE_GUIDEX(IID_IKsDataTypeCompletion);\n\nDEFINE_GUIDEX(IID_IKsInterfaceHandler);\n\nDEFINE_GUIDEX(IID_IKsClockPropertySet);\n\nDEFINE_GUIDEX(IID_IKsAllocator);\n\nDEFINE_GUIDEX(IID_IKsAllocatorEx);\n\n#define IID_IKsQualityForwarder KSCATEGORY_QUALITY\n#define STATIC_IID_IKsQualityForwarder STATIC_KSCATEGORY_QUALITY\n\ntypedef enum {\n  KsAllocatorMode_User,\n  KsAllocatorMode_Kernel\n} KSALLOCATORMODE;\n\ntypedef enum {\n  FramingProp_Uninitialized,\n  FramingProp_None,\n  FramingProp_Old,\n  FramingProp_Ex\n} FRAMING_PROP;\n\ntypedef FRAMING_PROP *PFRAMING_PROP;\n\ntypedef enum {\n  Framing_Cache_Update,\n  Framing_Cache_ReadLast,\n  Framing_Cache_ReadOrig,\n  Framing_Cache_Write\n} FRAMING_CACHE_OPS;\n\ntypedef struct {\n  LONGLONG MinTotalNominator;\n  LONGLONG MaxTotalNominator;\n  LONGLONG TotalDenominator;\n} OPTIMAL_WEIGHT_TOTALS;\n\ntypedef struct IPin IPin;\ntypedef struct IKsPin IKsPin;\ntypedef struct IKsAllocator IKsAllocator;\ntypedef struct IKsAllocatorEx IKsAllocatorEx;\n\n#define AllocatorStrategy_DontCare\t\t\t0\n#define AllocatorStrategy_MinimizeNumberOfFrames\t0x00000001\n#define AllocatorStrategy_MinimizeFrameSize\t\t0x00000002\n#define AllocatorStrategy_MinimizeNumberOfAllocators\t0x00000004\n#define AllocatorStrategy_MaximizeSpeed\t\t\t0x00000008\n\n#define PipeFactor_None\t\t\t\t\t0\n#define PipeFactor_UserModeUpstream\t\t\t0x00000001\n#define PipeFactor_UserModeDownstream\t\t\t0x00000002\n#define PipeFactor_MemoryTypes\t\t\t\t0x00000004\n#define PipeFactor_Flags\t\t\t\t0x00000008\n#define PipeFactor_PhysicalRanges\t\t\t0x00000010\n#define PipeFactor_OptimalRanges\t\t\t0x00000020\n#define PipeFactor_FixedCompression\t\t\t0x00000040\n#define PipeFactor_UnknownCompression\t\t\t0x00000080\n\n#define PipeFactor_Buffers\t\t\t\t0x00000100\n#define PipeFactor_Align\t\t\t\t0x00000200\n#define PipeFactor_PhysicalEnd\t\t\t\t0x00000400\n#define PipeFactor_LogicalEnd\t\t\t\t0x00000800\n\ntypedef enum {\n  PipeState_DontCare,\n  PipeState_RangeNotFixed,\n  PipeState_RangeFixed,\n  PipeState_CompressionUnknown,\n  PipeState_Finalized\n} PIPE_STATE;\n\ntypedef struct _PIPE_DIMENSIONS {\n  KS_COMPRESSION AllocatorPin;\n  KS_COMPRESSION MaxExpansionPin;\n  KS_COMPRESSION EndPin;\n} PIPE_DIMENSIONS,*PPIPE_DIMENSIONS;\n\ntypedef enum {\n  Pipe_Allocator_None,\n  Pipe_Allocator_FirstPin,\n  Pipe_Allocator_LastPin,\n  Pipe_Allocator_MiddlePin\n} PIPE_ALLOCATOR_PLACE;\n\ntypedef PIPE_ALLOCATOR_PLACE *PPIPE_ALLOCATOR_PLACE;\n\ntypedef enum {\n  KS_MemoryTypeDontCare = 0,\n  KS_MemoryTypeKernelPaged,\n  KS_MemoryTypeKernelNonPaged,\n  KS_MemoryTypeDeviceHostMapped,\n  KS_MemoryTypeDeviceSpecific,\n  KS_MemoryTypeUser,\n  KS_MemoryTypeAnyHost\n} KS_LogicalMemoryType;\n\ntypedef KS_LogicalMemoryType *PKS_LogicalMemoryType;\n\ntypedef struct _PIPE_TERMINATION {\n  ULONG Flags;\n  ULONG OutsideFactors;\n  ULONG Weigth;\n  KS_FRAMING_RANGE PhysicalRange;\n  KS_FRAMING_RANGE_WEIGHTED OptimalRange;\n  KS_COMPRESSION Compression;\n} PIPE_TERMINATION;\n\ntypedef struct _ALLOCATOR_PROPERTIES_EX\n{\n  long cBuffers;\n  long cbBuffer;\n  long cbAlign;\n  long cbPrefix;\n\n  GUID MemoryType;\n  GUID BusType;\n  PIPE_STATE State;\n  PIPE_TERMINATION Input;\n  PIPE_TERMINATION Output;\n  ULONG Strategy;\n  ULONG Flags;\n  ULONG Weight;\n  KS_LogicalMemoryType LogicalMemoryType;\n  PIPE_ALLOCATOR_PLACE AllocatorPlace;\n  PIPE_DIMENSIONS Dimensions;\n  KS_FRAMING_RANGE PhysicalRange;\n  IKsAllocatorEx *PrevSegment;\n  ULONG CountNextSegments;\n  IKsAllocatorEx **NextSegments;\n  ULONG InsideFactors;\n  ULONG NumberPins;\n} ALLOCATOR_PROPERTIES_EX;\n\ntypedef ALLOCATOR_PROPERTIES_EX *PALLOCATOR_PROPERTIES_EX;\n\n#ifdef __STREAMS__\n\nstruct IKsClockPropertySet;\n#undef INTERFACE\n#define INTERFACE IKsClockPropertySet\nDECLARE_INTERFACE_(IKsClockPropertySet,IUnknown)\n{\n  STDMETHOD(KsGetTime)\t\t\t(THIS_\n\t\t\t\t\t\tLONGLONG *Time\n\t\t\t\t\t) PURE;\n  STDMETHOD(KsSetTime)\t\t\t(THIS_\n\t\t\t\t\t\tLONGLONG Time\n\t\t\t\t\t) PURE;\n  STDMETHOD(KsGetPhysicalTime)\t\t(THIS_\n\t\t\t\t\t\tLONGLONG *Time\n\t\t\t\t\t) PURE;\n  STDMETHOD(KsSetPhysicalTime)\t\t(THIS_\n\t\t\t\t\t\tLONGLONG Time\n\t\t\t\t\t) PURE;\n  STDMETHOD(KsGetCorrelatedTime)\t(THIS_\n\t\t\t\t\t\tKSCORRELATED_TIME *CorrelatedTime\n\t\t\t\t\t) PURE;\n  STDMETHOD(KsSetCorrelatedTime)\t(THIS_\n\t\t\t\t\t\tKSCORRELATED_TIME *CorrelatedTime\n\t\t\t\t\t) PURE;\n  STDMETHOD(KsGetCorrelatedPhysicalTime)(THIS_\n\t\t\t\t\t\tKSCORRELATED_TIME *CorrelatedTime\n\t\t\t\t\t) PURE;\n  STDMETHOD(KsSetCorrelatedPhysicalTime)(THIS_\n\t\t\t\t\t\tKSCORRELATED_TIME *CorrelatedTime\n\t\t\t\t\t) PURE;\n  STDMETHOD(KsGetResolution)\t\t(THIS_\n\t\t\t\t\t\tKSRESOLUTION *Resolution\n\t\t\t\t\t) PURE;\n  STDMETHOD(KsGetState)\t\t\t(THIS_\n\t\t\t\t\t\tKSSTATE *State\n\t\t\t\t\t) PURE;\n};\n\nstruct IKsAllocator;\n#undef INTERFACE\n#define INTERFACE IKsAllocator\nDECLARE_INTERFACE_(IKsAllocator,IUnknown)\n{\n  STDMETHOD_(HANDLE,KsGetAllocatorHandle)(THIS) PURE;\n  STDMETHOD_(KSALLOCATORMODE,KsGetAllocatorMode)(THIS) PURE;\n  STDMETHOD(KsGetAllocatorStatus)\t(THIS_\n\t\t\t\t\t\tPKSSTREAMALLOCATOR_STATUS AllocatorStatus\n\t\t\t\t\t) PURE;\n  STDMETHOD_(VOID,KsSetAllocatorMode)\t(THIS_\n\t\t\t\t\t\tKSALLOCATORMODE Mode\n\t\t\t\t\t) PURE;\n};\n\nstruct IKsAllocatorEx;\n#undef INTERFACE\n#define INTERFACE IKsAllocatorEx\nDECLARE_INTERFACE_(IKsAllocatorEx,IKsAllocator)\n{\n  STDMETHOD_(PALLOCATOR_PROPERTIES_EX,KsGetProperties)(THIS) PURE;\n  STDMETHOD_(VOID,KsSetProperties)\t(THIS_\n\t\t\t\t\t\tPALLOCATOR_PROPERTIES_EX\n\t\t\t\t\t) PURE;\n  STDMETHOD_(VOID,KsSetAllocatorHandle)\t(THIS_\n\t\t\t\t\t\tHANDLE AllocatorHandle\n\t\t\t\t\t) PURE;\n  STDMETHOD_(HANDLE,KsCreateAllocatorAndGetHandle)(THIS_\n\t\t\t\t\t\tIKsPin *KsPin\n\t\t\t\t\t) PURE;\n};\n\ntypedef enum {\n  KsPeekOperation_PeekOnly,\n  KsPeekOperation_AddRef\n} KSPEEKOPERATION;\n\ntypedef struct _KSSTREAM_SEGMENT *PKSSTREAM_SEGMENT;\nstruct IKsPin;\n\n#undef INTERFACE\n#define INTERFACE IKsPin\nDECLARE_INTERFACE_(IKsPin,IUnknown)\n{\n  STDMETHOD(KsQueryMediums)\t\t(THIS_\n\t\t\t\t\t\tPKSMULTIPLE_ITEM *MediumList\n\t\t\t\t\t) PURE;\n  STDMETHOD(KsQueryInterfaces)\t\t(THIS_\n\t\t\t\t\t\tPKSMULTIPLE_ITEM *InterfaceList\n\t\t\t\t\t) PURE;\n  STDMETHOD(KsCreateSinkPinHandle)\t(THIS_\n\t\t\t\t\t\tKSPIN_INTERFACE& Interface,\n\t\t\t\t\t\tKSPIN_MEDIUM& Medium\n\t\t\t\t\t) PURE;\n  STDMETHOD(KsGetCurrentCommunication)\t(THIS_\n\t\t\t\t\t\tKSPIN_COMMUNICATION *Communication,\n\t\t\t\t\t\tKSPIN_INTERFACE *Interface,\n\t\t\t\t\t\tKSPIN_MEDIUM *Medium\n\t\t\t\t\t) PURE;\n  STDMETHOD(KsPropagateAcquire)\t\t(THIS) PURE;\n  STDMETHOD(KsDeliver)\t\t\t(THIS_\n\t\t\t\t\t\tIMediaSample *Sample,\n\t\t\t\t\t\tULONG Flags\n\t\t\t\t\t) PURE;\n  STDMETHOD(KsMediaSamplesCompleted)\t(THIS_\n\t\t\t\t\t\tPKSSTREAM_SEGMENT StreamSegment\n\t\t\t\t\t) PURE;\n  STDMETHOD_(IMemAllocator *,KsPeekAllocator)(THIS_\n\t\t\t\t\t\tKSPEEKOPERATION Operation\n\t\t\t\t\t) PURE;\n  STDMETHOD(KsReceiveAllocator)\t\t(THIS_\n\t\t\t\t\t\tIMemAllocator *MemAllocator\n\t\t\t\t\t) PURE;\n  STDMETHOD(KsRenegotiateAllocator)\t(THIS) PURE;\n  STDMETHOD_(LONG,KsIncrementPendingIoCount)(THIS) PURE;\n  STDMETHOD_(LONG,KsDecrementPendingIoCount)(THIS) PURE;\n  STDMETHOD(KsQualityNotify)\t\t(THIS_\n\t\t\t\t\t\tULONG Proportion,\n\t\t\t\t\t\tREFERENCE_TIME TimeDelta\n\t\t\t\t\t) PURE;\n};\n\nstruct IKsPinEx;\n#undef INTERFACE\n#define INTERFACE IKsPinEx\nDECLARE_INTERFACE_(IKsPinEx,IKsPin)\n{\n  STDMETHOD_(VOID,KsNotifyError)\t(THIS_\n\t\t\t\t\t\tIMediaSample *Sample,\n\t\t\t\t\t\tHRESULT hr\n\t\t\t\t\t) PURE;\n};\n\nstruct IKsPinPipe;\n#undef INTERFACE\n#define INTERFACE IKsPinPipe\nDECLARE_INTERFACE_(IKsPinPipe,IUnknown)\n{\n  STDMETHOD(KsGetPinFramingCache)\t(THIS_\n\t\t\t\t\t\tPKSALLOCATOR_FRAMING_EX *FramingEx,\n\t\t\t\t\t\tPFRAMING_PROP FramingProp,\n\t\t\t\t\t\tFRAMING_CACHE_OPS Option\n\t\t\t\t\t) PURE;\n  STDMETHOD(KsSetPinFramingCache)\t(THIS_\n\t\t\t\t\t\tPKSALLOCATOR_FRAMING_EX FramingEx,\n\t\t\t\t\t\tPFRAMING_PROP FramingProp,\n\t\t\t\t\t\tFRAMING_CACHE_OPS Option\n\t\t\t\t\t) PURE;\n  STDMETHOD_(IPin*,KsGetConnectedPin)\t(THIS) PURE;\n  STDMETHOD_(IKsAllocatorEx*,KsGetPipe)\t(THIS_\n\t\t\t\t\t\tKSPEEKOPERATION Operation\n\t\t\t\t\t) PURE;\n  STDMETHOD(KsSetPipe)\t\t\t(THIS_\n\t\t\t\t\t\tIKsAllocatorEx *KsAllocator\n\t\t\t\t\t) PURE;\n  STDMETHOD_(ULONG,KsGetPipeAllocatorFlag)(THIS) PURE;\n  STDMETHOD(KsSetPipeAllocatorFlag)\t(THIS_\n\t\t\t\t\t\tULONG Flag\n\t\t\t\t\t) PURE;\n  STDMETHOD_(GUID,KsGetPinBusCache)\t(THIS) PURE;\n  STDMETHOD(KsSetPinBusCache)\t\t(THIS_\n\t\t\t\t\t\tGUID Bus\n\t\t\t\t\t) PURE;\n  STDMETHOD_(PWCHAR,KsGetPinName)\t(THIS) PURE;\n  STDMETHOD_(PWCHAR,KsGetFilterName)\t(THIS) PURE;\n};\n\nstruct IKsPinFactory;\n#undef INTERFACE\n#define INTERFACE IKsPinFactory\nDECLARE_INTERFACE_(IKsPinFactory,IUnknown)\n{\n  STDMETHOD(KsPinFactory)\t\t(THIS_\n\t\t\t\t\t\tULONG *PinFactory\n\t\t\t\t\t) PURE;\n};\n\ntypedef enum {\n  KsIoOperation_Write,\n  KsIoOperation_Read\n} KSIOOPERATION;\n\nstruct IKsDataTypeHandler;\n#undef INTERFACE\n#define INTERFACE IKsDataTypeHandler\nDECLARE_INTERFACE_(IKsDataTypeHandler,IUnknown)\n{\n  STDMETHOD(KsCompleteIoOperation)\t(THIS_\n\t\t\t\t\t\tIMediaSample *Sample,\n\t\t\t\t\t\tPVOID StreamHeader,\n\t\t\t\t\t\tKSIOOPERATION IoOperation,\n\t\t\t\t\t\tWINBOOL Cancelled\n\t\t\t\t\t) PURE;\n  STDMETHOD(KsIsMediaTypeInRanges)\t(THIS_\n\t\t\t\t\t\tPVOID DataRanges\n\t\t\t\t\t) PURE;\n  STDMETHOD(KsPrepareIoOperation)\t(THIS_\n\t\t\t\t\t\tIMediaSample *Sample,\n\t\t\t\t\t\tPVOID StreamHeader,\n\t\t\t\t\t\tKSIOOPERATION IoOperation\n\t\t\t\t\t) PURE;\n  STDMETHOD(KsQueryExtendedSize)\t(THIS_\n\t\t\t\t\t\tULONG *ExtendedSize\n\t\t\t\t\t) PURE;\n  STDMETHOD(KsSetMediaType)\t\t(THIS_\n\t\t\t\t\t\tconst AM_MEDIA_TYPE *AmMediaType\n\t\t\t\t\t) PURE;\n};\n\nstruct IKsDataTypeCompletion;\n#undef INTERFACE\n#define INTERFACE IKsDataTypeCompletion\nDECLARE_INTERFACE_(IKsDataTypeCompletion,IUnknown)\n{\n  STDMETHOD(KsCompleteMediaType)\t(THIS_\n\t\t\t\t\t\tHANDLE FilterHandle,\n\t\t\t\t\t\tULONG PinFactoryId,\n\t\t\t\t\t\tAM_MEDIA_TYPE *AmMediaType\n\t\t\t\t\t) PURE;\n};\n\nstruct IKsInterfaceHandler;\n#undef INTERFACE\n#define INTERFACE IKsInterfaceHandler\nDECLARE_INTERFACE_(IKsInterfaceHandler,IUnknown)\n{\n  STDMETHOD(KsSetPin)\t\t\t(THIS_\n\t\t\t\t\t\tIKsPin *KsPin\n\t\t\t\t\t) PURE;\n  STDMETHOD(KsProcessMediaSamples)\t(THIS_\n\t\t\t\t\t\tIKsDataTypeHandler *KsDataTypeHandler,\n\t\t\t\t\t\tIMediaSample **SampleList,\n\t\t\t\t\t\tPLONG SampleCount,\n\t\t\t\t\t\tKSIOOPERATION IoOperation,\n\t\t\t\t\t\tPKSSTREAM_SEGMENT *StreamSegment\n\t\t\t\t\t) PURE;\n  STDMETHOD(KsCompleteIo)\t\t(THIS_\n\t\t\t\t\t\tPKSSTREAM_SEGMENT StreamSegment\n\t\t\t\t\t) PURE;\n};\n\ntypedef struct _KSSTREAM_SEGMENT {\n  IKsInterfaceHandler *KsInterfaceHandler;\n  IKsDataTypeHandler *KsDataTypeHandler;\n  KSIOOPERATION IoOperation;\n  HANDLE CompletionEvent;\n} KSSTREAM_SEGMENT;\n\nstruct IKsObject;\n#undef INTERFACE\n#define INTERFACE IKsObject\nDECLARE_INTERFACE_(IKsObject,IUnknown)\n{\n  STDMETHOD_(HANDLE,KsGetObjectHandle)\t(THIS) PURE;\n};\n\nstruct IKsQualityForwarder;\n#undef INTERFACE\n#define INTERFACE IKsQualityForwarder\nDECLARE_INTERFACE_(IKsQualityForwarder,IKsObject)\n{\n  STDMETHOD_(VOID,KsFlushClient)\t(THIS_\n\t\t\t\t\t\tIKsPin *Pin\n\t\t\t\t\t) PURE;\n};\n\nstruct IKsNotifyEvent;\n#undef INTERFACE\n#define INTERFACE IKsNotifyEvent\nDECLARE_INTERFACE_(IKsNotifyEvent,IUnknown)\n{\n  STDMETHOD(KsNotifyEvent)\t\t(THIS_\n\t\t\t\t\t\tULONG Event,\n\t\t\t\t\t\tULONG_PTR lParam1,\n\t\t\t\t\t\tULONG_PTR lParam2\n\t\t\t\t\t) PURE;\n};\n\nKSDDKAPI HRESULT WINAPI KsResolveRequiredAttributes(PKSDATARANGE DataRange,PKSMULTIPLE_ITEM Attributes);\nKSDDKAPI HRESULT WINAPI KsOpenDefaultDevice(REFGUID Category,ACCESS_MASK Access,PHANDLE DeviceHandle);\nKSDDKAPI HRESULT WINAPI KsSynchronousDeviceControl(HANDLE Handle,ULONG IoControl,PVOID InBuffer,ULONG InLength,PVOID OutBuffer,ULONG OutLength,PULONG BytesReturned);\nKSDDKAPI HRESULT WINAPI KsGetMultiplePinFactoryItems(HANDLE FilterHandle,ULONG PinFactoryId,ULONG PropertyId,PVOID *Items);\nKSDDKAPI HRESULT WINAPI KsGetMediaTypeCount(HANDLE FilterHandle,ULONG PinFactoryId,ULONG *MediaTypeCount);\nKSDDKAPI HRESULT WINAPI KsGetMediaType(int Position,AM_MEDIA_TYPE *AmMediaType,HANDLE FilterHandle,ULONG PinFactoryId);\n#endif /* __STREAMS__ */\n\n#ifndef _IKsPropertySet_\nDEFINE_GUIDEX(IID_IKsPropertySet);\n#endif\n\n#ifndef _IKsControl_\nDEFINE_GUIDEX(IID_IKsControl);\n#endif\n\nDEFINE_GUIDEX(IID_IKsAggregateControl);\n#ifndef _IKsTopology_\nDEFINE_GUIDEX(IID_IKsTopology);\n#endif\nDEFINE_GUIDSTRUCT(\"17CCA71B-ECD7-11D0-B908-00A0C9223196\",CLSID_Proxy);\n#define CLSID_Proxy DEFINE_GUIDNAMED(CLSID_Proxy)\n\n#else /* _KS_ */\n\n#ifndef _IKsPropertySet_\nDEFINE_GUID(IID_IKsPropertySet,STATIC_IID_IKsPropertySet);\n#endif\n\nDEFINE_GUID(CLSID_Proxy,STATIC_CLSID_Proxy);\n\n#endif /* _KS_ */\n\n#ifndef _IKsPropertySet_\n#define _IKsPropertySet_\n#define KSPROPERTY_SUPPORT_GET 1\n#define KSPROPERTY_SUPPORT_SET 2\n\n#ifdef DECLARE_INTERFACE_\nstruct IKsPropertySet;\n#undef INTERFACE\n#define INTERFACE IKsPropertySet\nDECLARE_INTERFACE_(IKsPropertySet,IUnknown)\n{\n  STDMETHOD(Set)\t\t\t(THIS_\n\t\t\t\t\t\tREFGUID PropSet,\n\t\t\t\t\t\tULONG Id,\n\t\t\t\t\t\tLPVOID InstanceData,\n\t\t\t\t\t\tULONG InstanceLength,\n\t\t\t\t\t\tLPVOID PropertyData,\n\t\t\t\t\t\tULONG DataLength\n\t\t\t\t\t) PURE;\n  STDMETHOD(Get)\t\t\t(THIS_\n\t\t\t\t\t\tREFGUID PropSet,\n\t\t\t\t\t\tULONG Id,\n\t\t\t\t\t\tLPVOID InstanceData,\n\t\t\t\t\t\tULONG InstanceLength,\n\t\t\t\t\t\tLPVOID PropertyData,\n\t\t\t\t\t\tULONG DataLength,\n\t\t\t\t\t\tULONG *BytesReturned\n\t\t\t\t\t) PURE;\n  STDMETHOD(QuerySupported)\t\t(THIS_\n\t\t\t\t\t\tREFGUID PropSet,\n\t\t\t\t\t\tULONG Id,\n\t\t\t\t\t\tULONG *TypeSupport\n\t\t\t\t\t) PURE;\n};\n#endif /* DECLARE_INTERFACE_ */\n#endif /* _IKsPropertySet_ */\n\n#ifndef _IKsControl_\n#define _IKsControl_\n#ifdef DECLARE_INTERFACE_\nstruct IKsControl;\n#undef INTERFACE\n#define INTERFACE IKsControl\nDECLARE_INTERFACE_(IKsControl,IUnknown)\n{\n  STDMETHOD(KsProperty)\t\t\t(THIS_\n\t\t\t\t\t\tPKSPROPERTY Property,\n\t\t\t\t\t\tULONG PropertyLength,\n\t\t\t\t\t\tLPVOID PropertyData,\n\t\t\t\t\t\tULONG DataLength,\n\t\t\t\t\t\tULONG *BytesReturned\n\t\t\t\t\t) PURE;\n  STDMETHOD(KsMethod)\t\t\t(THIS_\n\t\t\t\t\t\tPKSMETHOD Method,\n\t\t\t\t\t\tULONG MethodLength,\n\t\t\t\t\t\tLPVOID MethodData,\n\t\t\t\t\t\tULONG DataLength,\n\t\t\t\t\t\tULONG *BytesReturned\n\t\t\t\t\t) PURE;\n  STDMETHOD(KsEvent)\t\t\t(THIS_\n\t\t\t\t\t\tPKSEVENT Event,\n\t\t\t\t\t\tULONG EventLength,\n\t\t\t\t\t\tLPVOID EventData,\n\t\t\t\t\t\tULONG DataLength,\n\t\t\t\t\t\tULONG *BytesReturned\n\t\t\t\t\t) PURE;\n};\n#endif /* DECLARE_INTERFACE_ */\n#endif /* _IKsControl_ */\n\n#ifdef DECLARE_INTERFACE_\nstruct IKsAggregateControl;\n#undef INTERFACE\n#define INTERFACE IKsAggregateControl\nDECLARE_INTERFACE_(IKsAggregateControl,IUnknown)\n{\n  STDMETHOD(KsAddAggregate)\t\t(THIS_\n\t\t\t\t\t\tREFGUID AggregateClass\n\t\t\t\t\t) PURE;\n  STDMETHOD(KsRemoveAggregate)\t\t(THIS_\n\t\t\t\t\t\tREFGUID AggregateClass\n\t\t\t\t\t) PURE;\n};\n#endif /* DECLARE_INTERFACE_ */\n\n#ifndef _IKsTopology_\n#define _IKsTopology_\n#ifdef DECLARE_INTERFACE_\nstruct IKsTopology;\n#undef INTERFACE\n#define INTERFACE IKsTopology\nDECLARE_INTERFACE_(IKsTopology,IUnknown)\n{\n  STDMETHOD(CreateNodeInstance)\t\t(THIS_\n\t\t\t\t\t\tULONG NodeId,\n\t\t\t\t\t\tULONG Flags,\n\t\t\t\t\t\tACCESS_MASK DesiredAccess,\n\t\t\t\t\t\tIUnknown *UnkOuter,\n\t\t\t\t\t\tREFGUID InterfaceId,\n\t\t\t\t\t\tLPVOID *Interface\n\t\t\t\t\t) PURE;\n};\n#endif /* DECLARE_INTERFACE_ */\n#endif /* _IKsTopology_ */\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif /* __KSPROXY__ */\n"
  },
  {
    "path": "thirdparty/portaudio/src/hostapi/wasapi/mingw-include/ksuuids.h",
    "content": "/**\n * This file has no copyright assigned and is placed in the Public Domain.\n * This file is part of the w64 mingw-runtime package.\n * No warranty is given; refer to the file DISCLAIMER.PD within this package.\n */\n\nOUR_GUID_ENTRY(MEDIATYPE_MPEG2_PACK,\n\t\t0x36523B13,0x8EE5,0x11d1,0x8C,0xA3,0x00,0x60,0xB0,0x57,0x66,0x4A)\n\nOUR_GUID_ENTRY(MEDIATYPE_MPEG2_PES,\n\t\t0xe06d8020,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x5f,0x6c,0xbb,0xea)\n\nOUR_GUID_ENTRY(MEDIATYPE_MPEG2_SECTIONS,\n\t\t0x455f176c,0x4b06,0x47ce,0x9a,0xef,0x8c,0xae,0xf7,0x3d,0xf7,0xb5)\n\nOUR_GUID_ENTRY(MEDIASUBTYPE_ATSC_SI,\n\t\t0xb3c7397c,0xd303,0x414d,0xb3,0x3c,0x4e,0xd2,0xc9,0xd2,0x97,0x33)\n\nOUR_GUID_ENTRY(MEDIASUBTYPE_DVB_SI,\n\t\t0xe9dd31a3,0x221d,0x4adb,0x85,0x32,0x9a,0xf3,0x9,0xc1,0xa4,0x8)\n\nOUR_GUID_ENTRY(MEDIASUBTYPE_MPEG2DATA,\n\t\t0xc892e55b,0x252d,0x42b5,0xa3,0x16,0xd9,0x97,0xe7,0xa5,0xd9,0x95)\n\nOUR_GUID_ENTRY(MEDIASUBTYPE_MPEG2_VIDEO,\n\t\t0xe06d8026,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x5f,0x6c,0xbb,0xea)\n\nOUR_GUID_ENTRY(FORMAT_MPEG2_VIDEO,\n\t\t0xe06d80e3,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x5f,0x6c,0xbb,0xea)\n\nOUR_GUID_ENTRY(FORMAT_VIDEOINFO2,\n\t\t0xf72a76A0L,0xeb0a,0x11d0,0xac,0xe4,0x0,0x0,0xc0,0xcc,0x16,0xba)\n\nOUR_GUID_ENTRY(MEDIASUBTYPE_MPEG2_PROGRAM,\n\t\t0xe06d8022,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x05f,0x6c,0xbb,0xea)\n\nOUR_GUID_ENTRY(MEDIASUBTYPE_MPEG2_TRANSPORT,\n\t\t0xe06d8023,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x05f,0x6c,0xbb,0xea)\n\nOUR_GUID_ENTRY(MEDIASUBTYPE_MPEG2_TRANSPORT_STRIDE,\n\t\t0x138aa9a4,0x1ee2,0x4c5b,0x98,0x8e,0x19,0xab,0xfd,0xbc,0x8a,0x11)\n\nOUR_GUID_ENTRY(MEDIASUBTYPE_MPEG2_AUDIO,\n\t\t0xe06d802b,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x05f,0x6c,0xbb,0xea)\n\nOUR_GUID_ENTRY(MEDIASUBTYPE_DOLBY_AC3,\n\t\t0xe06d802c,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x05f,0x6c,0xbb,0xea)\n\nOUR_GUID_ENTRY(MEDIASUBTYPE_DVD_SUBPICTURE,\n\t\t0xe06d802d,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x05f,0x6c,0xbb,0xea)\n\nOUR_GUID_ENTRY(MEDIASUBTYPE_DVD_LPCM_AUDIO,\n\t\t0xe06d8032,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x05f,0x6c,0xbb,0xea)\n\nOUR_GUID_ENTRY(MEDIASUBTYPE_DTS,\n\t\t0xe06d8033,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x05f,0x6c,0xbb,0xea)\n\nOUR_GUID_ENTRY(MEDIASUBTYPE_SDDS,\n\t\t0xe06d8034,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x05f,0x6c,0xbb,0xea)\n\nOUR_GUID_ENTRY(MEDIATYPE_DVD_ENCRYPTED_PACK,\n\t\t0xed0b916a,0x044d,0x11d1,0xaa,0x78,0x00,0xc0,0x04f,0xc3,0x1d,0x60)\n\nOUR_GUID_ENTRY(MEDIATYPE_DVD_NAVIGATION,\n\t\t0xe06d802e,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x05f,0x6c,0xbb,0xea)\n\nOUR_GUID_ENTRY(MEDIASUBTYPE_DVD_NAVIGATION_PCI,\n\t\t0xe06d802f,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x05f,0x6c,0xbb,0xea)\n\nOUR_GUID_ENTRY(MEDIASUBTYPE_DVD_NAVIGATION_DSI,\n\t\t0xe06d8030,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x05f,0x6c,0xbb,0xea)\n\nOUR_GUID_ENTRY(MEDIASUBTYPE_DVD_NAVIGATION_PROVIDER,\n\t\t0xe06d8031,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x05f,0x6c,0xbb,0xea)\n\nOUR_GUID_ENTRY(FORMAT_MPEG2Video,\n\t\t0xe06d80e3,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x05f,0x6c,0xbb,0xea)\n\nOUR_GUID_ENTRY(FORMAT_DolbyAC3,\n\t\t0xe06d80e4,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x05f,0x6c,0xbb,0xea)\n\nOUR_GUID_ENTRY(FORMAT_MPEG2Audio,\n\t\t0xe06d80e5,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x05f,0x6c,0xbb,0xea)\n\nOUR_GUID_ENTRY(FORMAT_DVD_LPCMAudio,\n\t\t0xe06d80e6,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x05f,0x6c,0xbb,0xea)\n\nOUR_GUID_ENTRY(AM_KSPROPSETID_AC3,\n\t\t0xBFABE720,0x6E1F,0x11D0,0xBC,0xF2,0x44,0x45,0x53,0x54,0x00,0x00)\n\nOUR_GUID_ENTRY(AM_KSPROPSETID_DvdSubPic,\n\t\t0xac390460,0x43af,0x11d0,0xbd,0x6a,0x00,0x35,0x05,0xc1,0x03,0xa9)\n\nOUR_GUID_ENTRY(AM_KSPROPSETID_CopyProt,\n\t\t0x0E8A0A40,0x6AEF,0x11D0,0x9E,0xD0,0x00,0xA0,0x24,0xCA,0x19,0xB3)\n\nOUR_GUID_ENTRY(AM_KSPROPSETID_TSRateChange,\n\t\t0xa503c5c0,0x1d1d,0x11d1,0xad,0x80,0x44,0x45,0x53,0x54,0x0,0x0)\n\nOUR_GUID_ENTRY(AM_KSPROPSETID_DVD_RateChange,\n\t\t0x3577eb09,0x9582,0x477f,0xb2,0x9c,0xb0,0xc4,0x52,0xa4,0xff,0x9a)\n\nOUR_GUID_ENTRY(AM_KSPROPSETID_DvdKaraoke,\n\t\t0xae4720ae,0xaa71,0x42d8,0xb8,0x2a,0xff,0xfd,0xf5,0x8b,0x76,0xfd)\n\nOUR_GUID_ENTRY(AM_KSPROPSETID_FrameStep,\n\t\t0xc830acbd,0xab07,0x492f,0x88,0x52,0x45,0xb6,0x98,0x7c,0x29,0x79)\n\nOUR_GUID_ENTRY(AM_KSCATEGORY_CAPTURE,\n\t\t0x65E8773DL,0x8F56,0x11D0,0xA3,0xB9,0x00,0xA0,0xC9,0x22,0x31,0x96)\n\nOUR_GUID_ENTRY(AM_KSCATEGORY_RENDER,\n\t\t0x65E8773EL,0x8F56,0x11D0,0xA3,0xB9,0x00,0xA0,0xC9,0x22,0x31,0x96)\n\nOUR_GUID_ENTRY(AM_KSCATEGORY_DATACOMPRESSOR,\n\t\t0x1E84C900L,0x7E70,0x11D0,0xA5,0xD6,0x28,0xDB,0x04,0xC1,0x00,0x00)\n\nOUR_GUID_ENTRY(AM_KSCATEGORY_AUDIO,\n\t\t0x6994AD04L,0x93EF,0x11D0,0xA3,0xCC,0x00,0xA0,0xC9,0x22,0x31,0x96)\n\nOUR_GUID_ENTRY(AM_KSCATEGORY_VIDEO,\n\t\t0x6994AD05L,0x93EF,0x11D0,0xA3,0xCC,0x00,0xA0,0xC9,0x22,0x31,0x96)\n\nOUR_GUID_ENTRY(AM_KSCATEGORY_TVTUNER,\n\t\t0xa799a800L,0xa46d,0x11d0,0xa1,0x8c,0x00,0xa0,0x24,0x01,0xdc,0xd4)\n\nOUR_GUID_ENTRY(AM_KSCATEGORY_CROSSBAR,\n\t\t0xa799a801L,0xa46d,0x11d0,0xa1,0x8c,0x00,0xa0,0x24,0x01,0xdc,0xd4)\n\nOUR_GUID_ENTRY(AM_KSCATEGORY_TVAUDIO,\n\t\t0xa799a802L,0xa46d,0x11d0,0xa1,0x8c,0x00,0xa0,0x24,0x01,0xdc,0xd4)\n\nOUR_GUID_ENTRY(AM_KSCATEGORY_VBICODEC,\n\t\t0x07dad660L,0x22f1,0x11d1,0xa9,0xf4,0x00,0xc0,0x4f,0xbb,0xde,0x8f)\n\nOUR_GUID_ENTRY(AM_KSCATEGORY_VBICODEC_MI,\n\t\t0x9c24a977,0x951,0x451a,0x80,0x6,0xe,0x49,0xbd,0x28,0xcd,0x5f)\n\nOUR_GUID_ENTRY(AM_KSCATEGORY_SPLITTER,\n\t\t0x0A4252A0L,0x7E70,0x11D0,0xA5,0xD6,0x28,0xDB,0x04,0xC1,0x00,0x00)\n\nOUR_GUID_ENTRY(IID_IKsInterfaceHandler,\n\t\t0xD3ABC7E0L,0x9A61,0x11D0,0xA4,0x0D,0x00,0xA0,0xC9,0x22,0x31,0x96)\n\nOUR_GUID_ENTRY(IID_IKsDataTypeHandler,\n\t\t0x5FFBAA02L,0x49A3,0x11D0,0x9F,0x36,0x00,0xAA,0x00,0xA2,0x16,0xA1)\n\nOUR_GUID_ENTRY(IID_IKsPin,\n\t\t0xb61178d1L,0xa2d9,0x11cf,0x9e,0x53,0x00,0xaa,0x00,0xa2,0x16,0xa1)\n\nOUR_GUID_ENTRY(IID_IKsControl,\n\t\t0x28F54685L,0x06FD,0x11D2,0xB2,0x7A,0x00,0xA0,0xC9,0x22,0x31,0x96)\n\nOUR_GUID_ENTRY(IID_IKsPinFactory,\n\t\t0xCD5EBE6BL,0x8B6E,0x11D1,0x8A,0xE0,0x00,0xA0,0xC9,0x22,0x31,0x96)\n\nOUR_GUID_ENTRY(AM_INTERFACESETID_Standard,\n\t\t0x1A8766A0L,0x62CE,0x11CF,0xA5,0xD6,0x28,0xDB,0x04,0xC1,0x00,0x00)\n\n"
  },
  {
    "path": "thirdparty/portaudio/src/hostapi/wasapi/mingw-include/mmdeviceapi.h",
    "content": "\n\n/* this ALWAYS GENERATED file contains the definitions for the interfaces */\n\n\n /* File created by MIDL compiler version 7.00.0499 */\n/* Compiler settings for mmdeviceapi.idl:\n    Oicf, W1, Zp8, env=Win32 (32b run)\n    protocol : dce , ms_ext, c_ext, robust\n    error checks: allocation ref bounds_check enum stub_data \n    VC __declspec() decoration level: \n         __declspec(uuid()), __declspec(selectany), __declspec(novtable)\n         DECLSPEC_UUID(), MIDL_INTERFACE()\n*/\n//@@MIDL_FILE_HEADING(  )\n\n#pragma warning( disable: 4049 )  /* more than 64k source lines */\n\n\n/* verify that the <rpcndr.h> version is high enough to compile this file*/\n#ifndef __REQUIRED_RPCNDR_H_VERSION__\n#define __REQUIRED_RPCNDR_H_VERSION__ 500\n#endif\n\n/* verify that the <rpcsal.h> version is high enough to compile this file*/\n#ifndef __REQUIRED_RPCSAL_H_VERSION__\n#define __REQUIRED_RPCSAL_H_VERSION__ 100\n#endif\n\n#include \"rpc.h\"\n#include \"rpcndr.h\"\n\n#ifndef __RPCNDR_H_VERSION__\n#error this stub requires an updated version of <rpcndr.h>\n#endif // __RPCNDR_H_VERSION__\n\n#ifndef COM_NO_WINDOWS_H\n#include \"windows.h\"\n#include \"ole2.h\"\n#endif /*COM_NO_WINDOWS_H*/\n\n#ifndef __mmdeviceapi_h__\n#define __mmdeviceapi_h__\n\n#if __GNUC__ >=3\n#pragma GCC system_header\n#endif\n\n#if defined(_MSC_VER) && (_MSC_VER >= 1020)\n#pragma once\n#endif\n\n/* Forward Declarations */ \n\n#ifndef __IMMNotificationClient_FWD_DEFINED__\n#define __IMMNotificationClient_FWD_DEFINED__\ntypedef interface IMMNotificationClient IMMNotificationClient;\n#endif \t/* __IMMNotificationClient_FWD_DEFINED__ */\n\n\n#ifndef __IMMDevice_FWD_DEFINED__\n#define __IMMDevice_FWD_DEFINED__\ntypedef interface IMMDevice IMMDevice;\n#endif \t/* __IMMDevice_FWD_DEFINED__ */\n\n\n#ifndef __IMMDeviceCollection_FWD_DEFINED__\n#define __IMMDeviceCollection_FWD_DEFINED__\ntypedef interface IMMDeviceCollection IMMDeviceCollection;\n#endif \t/* __IMMDeviceCollection_FWD_DEFINED__ */\n\n\n#ifndef __IMMEndpoint_FWD_DEFINED__\n#define __IMMEndpoint_FWD_DEFINED__\ntypedef interface IMMEndpoint IMMEndpoint;\n#endif \t/* __IMMEndpoint_FWD_DEFINED__ */\n\n\n#ifndef __IMMDeviceEnumerator_FWD_DEFINED__\n#define __IMMDeviceEnumerator_FWD_DEFINED__\ntypedef interface IMMDeviceEnumerator IMMDeviceEnumerator;\n#endif \t/* __IMMDeviceEnumerator_FWD_DEFINED__ */\n\n\n#ifndef __IMMDeviceActivator_FWD_DEFINED__\n#define __IMMDeviceActivator_FWD_DEFINED__\ntypedef interface IMMDeviceActivator IMMDeviceActivator;\n#endif \t/* __IMMDeviceActivator_FWD_DEFINED__ */\n\n\n#ifndef __MMDeviceEnumerator_FWD_DEFINED__\n#define __MMDeviceEnumerator_FWD_DEFINED__\n\n#ifdef __cplusplus\ntypedef class MMDeviceEnumerator MMDeviceEnumerator;\n#else\ntypedef struct MMDeviceEnumerator MMDeviceEnumerator;\n#endif /* __cplusplus */\n\n#endif \t/* __MMDeviceEnumerator_FWD_DEFINED__ */\n\n\n/* header files for imported files */\n#include \"unknwn.h\"\n#include \"propsys.h\"\n\n#ifdef __cplusplus\nextern \"C\"{\n#endif \n\n\n/* interface __MIDL_itf_mmdeviceapi_0000_0000 */\n/* [local] */ \n\n#define E_NOTFOUND HRESULT_FROM_WIN32(ERROR_NOT_FOUND)\n#define E_UNSUPPORTED_TYPE HRESULT_FROM_WIN32(ERROR_UNSUPPORTED_TYPE)\n#define DEVICE_STATE_ACTIVE      0x00000001\n#define DEVICE_STATE_DISABLED    0x00000002\n#define DEVICE_STATE_NOTPRESENT  0x00000004\n#define DEVICE_STATE_UNPLUGGED   0x00000008\n#define DEVICE_STATEMASK_ALL     0x0000000f\n#ifdef DEFINE_PROPERTYKEY\n#undef DEFINE_PROPERTYKEY\n#endif\n#ifdef INITGUID\n#define DEFINE_PROPERTYKEY(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8, pid) EXTERN_C const PROPERTYKEY name = { { l, w1, w2, { b1, b2,  b3,  b4,  b5,  b6,  b7,  b8 } }, pid }\n#else\n#define DEFINE_PROPERTYKEY(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8, pid) EXTERN_C const PROPERTYKEY name\n#endif // INITGUID\nDEFINE_PROPERTYKEY(PKEY_AudioEndpoint_FormFactor, 0x1da5d803, 0xd492, 0x4edd, 0x8c, 0x23, 0xe0, 0xc0, 0xff, 0xee, 0x7f, 0x0e, 0); \nDEFINE_PROPERTYKEY(PKEY_AudioEndpoint_ControlPanelPageProvider, 0x1da5d803, 0xd492, 0x4edd, 0x8c, 0x23, 0xe0, 0xc0, 0xff, 0xee, 0x7f, 0x0e, 1); \nDEFINE_PROPERTYKEY(PKEY_AudioEndpoint_Association, 0x1da5d803, 0xd492, 0x4edd, 0x8c, 0x23, 0xe0, 0xc0, 0xff, 0xee, 0x7f, 0x0e, 2);\nDEFINE_PROPERTYKEY(PKEY_AudioEndpoint_PhysicalSpeakers, 0x1da5d803, 0xd492, 0x4edd, 0x8c, 0x23, 0xe0, 0xc0, 0xff, 0xee, 0x7f, 0x0e, 3);\nDEFINE_PROPERTYKEY(PKEY_AudioEndpoint_GUID, 0x1da5d803, 0xd492, 0x4edd, 0x8c, 0x23, 0xe0, 0xc0, 0xff, 0xee, 0x7f, 0x0e, 4);\nDEFINE_PROPERTYKEY(PKEY_AudioEndpoint_Disable_SysFx, 0x1da5d803, 0xd492, 0x4edd, 0x8c, 0x23, 0xe0, 0xc0, 0xff, 0xee, 0x7f, 0x0e, 5);\n#define ENDPOINT_SYSFX_ENABLED          0x00000000  // System Effects are enabled.\n#define ENDPOINT_SYSFX_DISABLED         0x00000001  // System Effects are disabled.\nDEFINE_PROPERTYKEY(PKEY_AudioEndpoint_FullRangeSpeakers, 0x1da5d803, 0xd492, 0x4edd, 0x8c, 0x23, 0xe0, 0xc0, 0xff, 0xee, 0x7f, 0x0e, 6);\nDEFINE_PROPERTYKEY(PKEY_AudioEngine_DeviceFormat, 0xf19f064d, 0x82c, 0x4e27, 0xbc, 0x73, 0x68, 0x82, 0xa1, 0xbb, 0x8e, 0x4c, 0); \ntypedef struct tagDIRECTX_AUDIO_ACTIVATION_PARAMS\n    {\n    DWORD cbDirectXAudioActivationParams;\n    GUID guidAudioSession;\n    DWORD dwAudioStreamFlags;\n    } \tDIRECTX_AUDIO_ACTIVATION_PARAMS;\n\ntypedef struct tagDIRECTX_AUDIO_ACTIVATION_PARAMS *PDIRECTX_AUDIO_ACTIVATION_PARAMS;\n\ntypedef /* [public][public][public][public][public] */ \nenum __MIDL___MIDL_itf_mmdeviceapi_0000_0000_0001\n    {\teRender\t= 0,\n\teCapture\t= ( eRender + 1 ) ,\n\teAll\t= ( eCapture + 1 ) ,\n\tEDataFlow_enum_count\t= ( eAll + 1 ) \n    } \tEDataFlow;\n\ntypedef /* [public][public][public] */ \nenum __MIDL___MIDL_itf_mmdeviceapi_0000_0000_0002\n    {\teConsole\t= 0,\n\teMultimedia\t= ( eConsole + 1 ) ,\n\teCommunications\t= ( eMultimedia + 1 ) ,\n\tERole_enum_count\t= ( eCommunications + 1 ) \n    } \tERole;\n\ntypedef /* [public] */ \nenum __MIDL___MIDL_itf_mmdeviceapi_0000_0000_0003\n    {\tRemoteNetworkDevice\t= 0,\n\tSpeakers\t= ( RemoteNetworkDevice + 1 ) ,\n\tLineLevel\t= ( Speakers + 1 ) ,\n\tHeadphones\t= ( LineLevel + 1 ) ,\n\tMicrophone\t= ( Headphones + 1 ) ,\n\tHeadset\t= ( Microphone + 1 ) ,\n\tHandset\t= ( Headset + 1 ) ,\n\tUnknownDigitalPassthrough\t= ( Handset + 1 ) ,\n\tSPDIF\t= ( UnknownDigitalPassthrough + 1 ) ,\n\tHDMI\t= ( SPDIF + 1 ) ,\n\tUnknownFormFactor\t= ( HDMI + 1 ) \n    } \tEndpointFormFactor;\n\n\n\nextern RPC_IF_HANDLE __MIDL_itf_mmdeviceapi_0000_0000_v0_0_c_ifspec;\nextern RPC_IF_HANDLE __MIDL_itf_mmdeviceapi_0000_0000_v0_0_s_ifspec;\n\n#ifndef __IMMNotificationClient_INTERFACE_DEFINED__\n#define __IMMNotificationClient_INTERFACE_DEFINED__\n\n/* interface IMMNotificationClient */\n/* [unique][helpstring][nonextensible][uuid][local][object] */ \n\n\nEXTERN_C const IID IID_IMMNotificationClient;\n\n#if defined(__cplusplus) && !defined(CINTERFACE)\n    \n    MIDL_INTERFACE(\"7991EEC9-7E89-4D85-8390-6C703CEC60C0\")\n    IMMNotificationClient : public IUnknown\n    {\n    public:\n        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE OnDeviceStateChanged( \n            /* [in] */ \n            __in  LPCWSTR pwstrDeviceId,\n            /* [in] */ \n            __in  DWORD dwNewState) = 0;\n        \n        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE OnDeviceAdded( \n            /* [in] */ \n            __in  LPCWSTR pwstrDeviceId) = 0;\n        \n        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE OnDeviceRemoved( \n            /* [in] */ \n            __in  LPCWSTR pwstrDeviceId) = 0;\n        \n        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE OnDefaultDeviceChanged( \n            /* [in] */ \n            __in  EDataFlow flow,\n            /* [in] */ \n            __in  ERole role,\n            /* [in] */ \n            __in  LPCWSTR pwstrDefaultDeviceId) = 0;\n        \n        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE OnPropertyValueChanged( \n            /* [in] */ \n            __in  LPCWSTR pwstrDeviceId,\n            /* [in] */ \n            __in  const PROPERTYKEY key) = 0;\n        \n    };\n    \n#else \t/* C style interface */\n\n    typedef struct IMMNotificationClientVtbl\n    {\n        BEGIN_INTERFACE\n        \n        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \n            IMMNotificationClient * This,\n            /* [in] */ REFIID riid,\n            /* [iid_is][out] */ \n            __RPC__deref_out  void **ppvObject);\n        \n        ULONG ( STDMETHODCALLTYPE *AddRef )( \n            IMMNotificationClient * This);\n        \n        ULONG ( STDMETHODCALLTYPE *Release )( \n            IMMNotificationClient * This);\n        \n        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *OnDeviceStateChanged )( \n            IMMNotificationClient * This,\n            /* [in] */ \n            __in  LPCWSTR pwstrDeviceId,\n            /* [in] */ \n            __in  DWORD dwNewState);\n        \n        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *OnDeviceAdded )( \n            IMMNotificationClient * This,\n            /* [in] */ \n            __in  LPCWSTR pwstrDeviceId);\n        \n        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *OnDeviceRemoved )( \n            IMMNotificationClient * This,\n            /* [in] */ \n            __in  LPCWSTR pwstrDeviceId);\n        \n        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *OnDefaultDeviceChanged )( \n            IMMNotificationClient * This,\n            /* [in] */ \n            __in  EDataFlow flow,\n            /* [in] */ \n            __in  ERole role,\n            /* [in] */ \n            __in  LPCWSTR pwstrDefaultDeviceId);\n        \n        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *OnPropertyValueChanged )( \n            IMMNotificationClient * This,\n            /* [in] */ \n            __in  LPCWSTR pwstrDeviceId,\n            /* [in] */ \n            __in  const PROPERTYKEY key);\n        \n        END_INTERFACE\n    } IMMNotificationClientVtbl;\n\n    interface IMMNotificationClient\n    {\n        CONST_VTBL struct IMMNotificationClientVtbl *lpVtbl;\n    };\n\n    \n\n#ifdef COBJMACROS\n\n\n#define IMMNotificationClient_QueryInterface(This,riid,ppvObject)\t\\\n    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \n\n#define IMMNotificationClient_AddRef(This)\t\\\n    ( (This)->lpVtbl -> AddRef(This) ) \n\n#define IMMNotificationClient_Release(This)\t\\\n    ( (This)->lpVtbl -> Release(This) ) \n\n\n#define IMMNotificationClient_OnDeviceStateChanged(This,pwstrDeviceId,dwNewState)\t\\\n    ( (This)->lpVtbl -> OnDeviceStateChanged(This,pwstrDeviceId,dwNewState) ) \n\n#define IMMNotificationClient_OnDeviceAdded(This,pwstrDeviceId)\t\\\n    ( (This)->lpVtbl -> OnDeviceAdded(This,pwstrDeviceId) ) \n\n#define IMMNotificationClient_OnDeviceRemoved(This,pwstrDeviceId)\t\\\n    ( (This)->lpVtbl -> OnDeviceRemoved(This,pwstrDeviceId) ) \n\n#define IMMNotificationClient_OnDefaultDeviceChanged(This,flow,role,pwstrDefaultDeviceId)\t\\\n    ( (This)->lpVtbl -> OnDefaultDeviceChanged(This,flow,role,pwstrDefaultDeviceId) ) \n\n#define IMMNotificationClient_OnPropertyValueChanged(This,pwstrDeviceId,key)\t\\\n    ( (This)->lpVtbl -> OnPropertyValueChanged(This,pwstrDeviceId,key) ) \n\n#endif /* COBJMACROS */\n\n\n#endif \t/* C style interface */\n\n\n\n\n#endif \t/* __IMMNotificationClient_INTERFACE_DEFINED__ */\n\n\n#ifndef __IMMDevice_INTERFACE_DEFINED__\n#define __IMMDevice_INTERFACE_DEFINED__\n\n/* interface IMMDevice */\n/* [unique][helpstring][nonextensible][uuid][local][object] */ \n\n\nEXTERN_C const IID IID_IMMDevice;\n\n#if defined(__cplusplus) && !defined(CINTERFACE)\n    \n    MIDL_INTERFACE(\"D666063F-1587-4E43-81F1-B948E807363F\")\n    IMMDevice : public IUnknown\n    {\n    public:\n        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE Activate( \n            /* [in] */ \n            __in  REFIID iid,\n            /* [in] */ \n            __in  DWORD dwClsCtx,\n            /* [unique][in] */ \n            __in_opt  PROPVARIANT *pActivationParams,\n            /* [iid_is][out] */ \n            __out  void **ppInterface) = 0;\n        \n        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE OpenPropertyStore( \n            /* [in] */ \n            __in  DWORD stgmAccess,\n            /* [out] */ \n            __out  IPropertyStore **ppProperties) = 0;\n        \n        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetId( \n            /* [out] */ \n            __deref_out  LPWSTR *ppstrId) = 0;\n        \n        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetState( \n            /* [out] */ \n            __out  DWORD *pdwState) = 0;\n        \n    };\n    \n#else \t/* C style interface */\n\n    typedef struct IMMDeviceVtbl\n    {\n        BEGIN_INTERFACE\n        \n        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \n            IMMDevice * This,\n            /* [in] */ REFIID riid,\n            /* [iid_is][out] */ \n            __RPC__deref_out  void **ppvObject);\n        \n        ULONG ( STDMETHODCALLTYPE *AddRef )( \n            IMMDevice * This);\n        \n        ULONG ( STDMETHODCALLTYPE *Release )( \n            IMMDevice * This);\n        \n        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *Activate )( \n            IMMDevice * This,\n            /* [in] */ \n            __in  REFIID iid,\n            /* [in] */ \n            __in  DWORD dwClsCtx,\n            /* [unique][in] */ \n            __in_opt  PROPVARIANT *pActivationParams,\n            /* [iid_is][out] */ \n            __out  void **ppInterface);\n        \n        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *OpenPropertyStore )( \n            IMMDevice * This,\n            /* [in] */ \n            __in  DWORD stgmAccess,\n            /* [out] */ \n            __out  IPropertyStore **ppProperties);\n        \n        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetId )( \n            IMMDevice * This,\n            /* [out] */ \n            __deref_out  LPWSTR *ppstrId);\n        \n        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetState )( \n            IMMDevice * This,\n            /* [out] */ \n            __out  DWORD *pdwState);\n        \n        END_INTERFACE\n    } IMMDeviceVtbl;\n\n    interface IMMDevice\n    {\n        CONST_VTBL struct IMMDeviceVtbl *lpVtbl;\n    };\n\n    \n\n#ifdef COBJMACROS\n\n\n#define IMMDevice_QueryInterface(This,riid,ppvObject)\t\\\n    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \n\n#define IMMDevice_AddRef(This)\t\\\n    ( (This)->lpVtbl -> AddRef(This) ) \n\n#define IMMDevice_Release(This)\t\\\n    ( (This)->lpVtbl -> Release(This) ) \n\n\n#define IMMDevice_Activate(This,iid,dwClsCtx,pActivationParams,ppInterface)\t\\\n    ( (This)->lpVtbl -> Activate(This,iid,dwClsCtx,pActivationParams,ppInterface) ) \n\n#define IMMDevice_OpenPropertyStore(This,stgmAccess,ppProperties)\t\\\n    ( (This)->lpVtbl -> OpenPropertyStore(This,stgmAccess,ppProperties) ) \n\n#define IMMDevice_GetId(This,ppstrId)\t\\\n    ( (This)->lpVtbl -> GetId(This,ppstrId) ) \n\n#define IMMDevice_GetState(This,pdwState)\t\\\n    ( (This)->lpVtbl -> GetState(This,pdwState) ) \n\n#endif /* COBJMACROS */\n\n\n#endif \t/* C style interface */\n\n\n\n\n#endif \t/* __IMMDevice_INTERFACE_DEFINED__ */\n\n\n#ifndef __IMMDeviceCollection_INTERFACE_DEFINED__\n#define __IMMDeviceCollection_INTERFACE_DEFINED__\n\n/* interface IMMDeviceCollection */\n/* [unique][helpstring][nonextensible][uuid][local][object] */ \n\n\nEXTERN_C const IID IID_IMMDeviceCollection;\n\n#if defined(__cplusplus) && !defined(CINTERFACE)\n    \n    MIDL_INTERFACE(\"0BD7A1BE-7A1A-44DB-8397-CC5392387B5E\")\n    IMMDeviceCollection : public IUnknown\n    {\n    public:\n        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetCount( \n            /* [out] */ \n            __out  UINT *pcDevices) = 0;\n        \n        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE Item( \n            /* [in] */ \n            __in  UINT nDevice,\n            /* [out] */ \n            __out  IMMDevice **ppDevice) = 0;\n        \n    };\n    \n#else \t/* C style interface */\n\n    typedef struct IMMDeviceCollectionVtbl\n    {\n        BEGIN_INTERFACE\n        \n        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \n            IMMDeviceCollection * This,\n            /* [in] */ REFIID riid,\n            /* [iid_is][out] */ \n            __RPC__deref_out  void **ppvObject);\n        \n        ULONG ( STDMETHODCALLTYPE *AddRef )( \n            IMMDeviceCollection * This);\n        \n        ULONG ( STDMETHODCALLTYPE *Release )( \n            IMMDeviceCollection * This);\n        \n        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetCount )( \n            IMMDeviceCollection * This,\n            /* [out] */ \n            __out  UINT *pcDevices);\n        \n        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *Item )( \n            IMMDeviceCollection * This,\n            /* [in] */ \n            __in  UINT nDevice,\n            /* [out] */ \n            __out  IMMDevice **ppDevice);\n        \n        END_INTERFACE\n    } IMMDeviceCollectionVtbl;\n\n    interface IMMDeviceCollection\n    {\n        CONST_VTBL struct IMMDeviceCollectionVtbl *lpVtbl;\n    };\n\n    \n\n#ifdef COBJMACROS\n\n\n#define IMMDeviceCollection_QueryInterface(This,riid,ppvObject)\t\\\n    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \n\n#define IMMDeviceCollection_AddRef(This)\t\\\n    ( (This)->lpVtbl -> AddRef(This) ) \n\n#define IMMDeviceCollection_Release(This)\t\\\n    ( (This)->lpVtbl -> Release(This) ) \n\n\n#define IMMDeviceCollection_GetCount(This,pcDevices)\t\\\n    ( (This)->lpVtbl -> GetCount(This,pcDevices) ) \n\n#define IMMDeviceCollection_Item(This,nDevice,ppDevice)\t\\\n    ( (This)->lpVtbl -> Item(This,nDevice,ppDevice) ) \n\n#endif /* COBJMACROS */\n\n\n#endif \t/* C style interface */\n\n\n\n\n#endif \t/* __IMMDeviceCollection_INTERFACE_DEFINED__ */\n\n\n#ifndef __IMMEndpoint_INTERFACE_DEFINED__\n#define __IMMEndpoint_INTERFACE_DEFINED__\n\n/* interface IMMEndpoint */\n/* [unique][helpstring][nonextensible][uuid][local][object] */ \n\n\nEXTERN_C const IID IID_IMMEndpoint;\n\n#if defined(__cplusplus) && !defined(CINTERFACE)\n    \n    MIDL_INTERFACE(\"1BE09788-6894-4089-8586-9A2A6C265AC5\")\n    IMMEndpoint : public IUnknown\n    {\n    public:\n        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetDataFlow( \n            /* [out] */ \n            __out  EDataFlow *pDataFlow) = 0;\n        \n    };\n    \n#else \t/* C style interface */\n\n    typedef struct IMMEndpointVtbl\n    {\n        BEGIN_INTERFACE\n        \n        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \n            IMMEndpoint * This,\n            /* [in] */ REFIID riid,\n            /* [iid_is][out] */ \n            __RPC__deref_out  void **ppvObject);\n        \n        ULONG ( STDMETHODCALLTYPE *AddRef )( \n            IMMEndpoint * This);\n        \n        ULONG ( STDMETHODCALLTYPE *Release )( \n            IMMEndpoint * This);\n        \n        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetDataFlow )( \n            IMMEndpoint * This,\n            /* [out] */ \n            __out  EDataFlow *pDataFlow);\n        \n        END_INTERFACE\n    } IMMEndpointVtbl;\n\n    interface IMMEndpoint\n    {\n        CONST_VTBL struct IMMEndpointVtbl *lpVtbl;\n    };\n\n    \n\n#ifdef COBJMACROS\n\n\n#define IMMEndpoint_QueryInterface(This,riid,ppvObject)\t\\\n    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \n\n#define IMMEndpoint_AddRef(This)\t\\\n    ( (This)->lpVtbl -> AddRef(This) ) \n\n#define IMMEndpoint_Release(This)\t\\\n    ( (This)->lpVtbl -> Release(This) ) \n\n\n#define IMMEndpoint_GetDataFlow(This,pDataFlow)\t\\\n    ( (This)->lpVtbl -> GetDataFlow(This,pDataFlow) ) \n\n#endif /* COBJMACROS */\n\n\n#endif \t/* C style interface */\n\n\n\n\n#endif \t/* __IMMEndpoint_INTERFACE_DEFINED__ */\n\n\n#ifndef __IMMDeviceEnumerator_INTERFACE_DEFINED__\n#define __IMMDeviceEnumerator_INTERFACE_DEFINED__\n\n/* interface IMMDeviceEnumerator */\n/* [unique][helpstring][nonextensible][uuid][local][object] */ \n\n\nEXTERN_C const IID IID_IMMDeviceEnumerator;\n\n#if defined(__cplusplus) && !defined(CINTERFACE)\n    \n    MIDL_INTERFACE(\"A95664D2-9614-4F35-A746-DE8DB63617E6\")\n    IMMDeviceEnumerator : public IUnknown\n    {\n    public:\n        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE EnumAudioEndpoints( \n            /* [in] */ \n            __in  EDataFlow dataFlow,\n            /* [in] */ \n            __in  DWORD dwStateMask,\n            /* [out] */ \n            __out  IMMDeviceCollection **ppDevices) = 0;\n        \n        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetDefaultAudioEndpoint( \n            /* [in] */ \n            __in  EDataFlow dataFlow,\n            /* [in] */ \n            __in  ERole role,\n            /* [out] */ \n            __out  IMMDevice **ppEndpoint) = 0;\n        \n        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetDevice( \n            /*  */ \n            __in  LPCWSTR pwstrId,\n            /* [out] */ \n            __out  IMMDevice **ppDevice) = 0;\n        \n        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE RegisterEndpointNotificationCallback( \n            /* [in] */ \n            __in  IMMNotificationClient *pClient) = 0;\n        \n        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE UnregisterEndpointNotificationCallback( \n            /* [in] */ \n            __in  IMMNotificationClient *pClient) = 0;\n        \n    };\n    \n#else \t/* C style interface */\n\n    typedef struct IMMDeviceEnumeratorVtbl\n    {\n        BEGIN_INTERFACE\n        \n        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \n            IMMDeviceEnumerator * This,\n            /* [in] */ REFIID riid,\n            /* [iid_is][out] */ \n            __RPC__deref_out  void **ppvObject);\n        \n        ULONG ( STDMETHODCALLTYPE *AddRef )( \n            IMMDeviceEnumerator * This);\n        \n        ULONG ( STDMETHODCALLTYPE *Release )( \n            IMMDeviceEnumerator * This);\n        \n        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *EnumAudioEndpoints )( \n            IMMDeviceEnumerator * This,\n            /* [in] */ \n            __in  EDataFlow dataFlow,\n            /* [in] */ \n            __in  DWORD dwStateMask,\n            /* [out] */ \n            __out  IMMDeviceCollection **ppDevices);\n        \n        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetDefaultAudioEndpoint )( \n            IMMDeviceEnumerator * This,\n            /* [in] */ \n            __in  EDataFlow dataFlow,\n            /* [in] */ \n            __in  ERole role,\n            /* [out] */ \n            __out  IMMDevice **ppEndpoint);\n        \n        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetDevice )( \n            IMMDeviceEnumerator * This,\n            /*  */ \n            __in  LPCWSTR pwstrId,\n            /* [out] */ \n            __out  IMMDevice **ppDevice);\n        \n        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *RegisterEndpointNotificationCallback )( \n            IMMDeviceEnumerator * This,\n            /* [in] */ \n            __in  IMMNotificationClient *pClient);\n        \n        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *UnregisterEndpointNotificationCallback )( \n            IMMDeviceEnumerator * This,\n            /* [in] */ \n            __in  IMMNotificationClient *pClient);\n        \n        END_INTERFACE\n    } IMMDeviceEnumeratorVtbl;\n\n    interface IMMDeviceEnumerator\n    {\n        CONST_VTBL struct IMMDeviceEnumeratorVtbl *lpVtbl;\n    };\n\n    \n\n#ifdef COBJMACROS\n\n\n#define IMMDeviceEnumerator_QueryInterface(This,riid,ppvObject)\t\\\n    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \n\n#define IMMDeviceEnumerator_AddRef(This)\t\\\n    ( (This)->lpVtbl -> AddRef(This) ) \n\n#define IMMDeviceEnumerator_Release(This)\t\\\n    ( (This)->lpVtbl -> Release(This) ) \n\n\n#define IMMDeviceEnumerator_EnumAudioEndpoints(This,dataFlow,dwStateMask,ppDevices)\t\\\n    ( (This)->lpVtbl -> EnumAudioEndpoints(This,dataFlow,dwStateMask,ppDevices) ) \n\n#define IMMDeviceEnumerator_GetDefaultAudioEndpoint(This,dataFlow,role,ppEndpoint)\t\\\n    ( (This)->lpVtbl -> GetDefaultAudioEndpoint(This,dataFlow,role,ppEndpoint) ) \n\n#define IMMDeviceEnumerator_GetDevice(This,pwstrId,ppDevice)\t\\\n    ( (This)->lpVtbl -> GetDevice(This,pwstrId,ppDevice) ) \n\n#define IMMDeviceEnumerator_RegisterEndpointNotificationCallback(This,pClient)\t\\\n    ( (This)->lpVtbl -> RegisterEndpointNotificationCallback(This,pClient) ) \n\n#define IMMDeviceEnumerator_UnregisterEndpointNotificationCallback(This,pClient)\t\\\n    ( (This)->lpVtbl -> UnregisterEndpointNotificationCallback(This,pClient) ) \n\n#endif /* COBJMACROS */\n\n\n#endif \t/* C style interface */\n\n\n\n\n#endif \t/* __IMMDeviceEnumerator_INTERFACE_DEFINED__ */\n\n\n#ifndef __IMMDeviceActivator_INTERFACE_DEFINED__\n#define __IMMDeviceActivator_INTERFACE_DEFINED__\n\n/* interface IMMDeviceActivator */\n/* [unique][helpstring][nonextensible][uuid][local][object] */ \n\n\nEXTERN_C const IID IID_IMMDeviceActivator;\n\n#if defined(__cplusplus) && !defined(CINTERFACE)\n    \n    MIDL_INTERFACE(\"3B0D0EA4-D0A9-4B0E-935B-09516746FAC0\")\n    IMMDeviceActivator : public IUnknown\n    {\n    public:\n        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE Activate( \n            /* [in] */ \n            __in  REFIID iid,\n            /* [in] */ \n            __in  IMMDevice *pDevice,\n            /* [in] */ \n            __in_opt  PROPVARIANT *pActivationParams,\n            /* [iid_is][out] */ \n            __out  void **ppInterface) = 0;\n        \n    };\n    \n#else \t/* C style interface */\n\n    typedef struct IMMDeviceActivatorVtbl\n    {\n        BEGIN_INTERFACE\n        \n        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \n            IMMDeviceActivator * This,\n            /* [in] */ REFIID riid,\n            /* [iid_is][out] */ \n            __RPC__deref_out  void **ppvObject);\n        \n        ULONG ( STDMETHODCALLTYPE *AddRef )( \n            IMMDeviceActivator * This);\n        \n        ULONG ( STDMETHODCALLTYPE *Release )( \n            IMMDeviceActivator * This);\n        \n        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *Activate )( \n            IMMDeviceActivator * This,\n            /* [in] */ \n            __in  REFIID iid,\n            /* [in] */ \n            __in  IMMDevice *pDevice,\n            /* [in] */ \n            __in_opt  PROPVARIANT *pActivationParams,\n            /* [iid_is][out] */ \n            __out  void **ppInterface);\n        \n        END_INTERFACE\n    } IMMDeviceActivatorVtbl;\n\n    interface IMMDeviceActivator\n    {\n        CONST_VTBL struct IMMDeviceActivatorVtbl *lpVtbl;\n    };\n\n    \n\n#ifdef COBJMACROS\n\n\n#define IMMDeviceActivator_QueryInterface(This,riid,ppvObject)\t\\\n    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \n\n#define IMMDeviceActivator_AddRef(This)\t\\\n    ( (This)->lpVtbl -> AddRef(This) ) \n\n#define IMMDeviceActivator_Release(This)\t\\\n    ( (This)->lpVtbl -> Release(This) ) \n\n\n#define IMMDeviceActivator_Activate(This,iid,pDevice,pActivationParams,ppInterface)\t\\\n    ( (This)->lpVtbl -> Activate(This,iid,pDevice,pActivationParams,ppInterface) ) \n\n#endif /* COBJMACROS */\n\n\n#endif \t/* C style interface */\n\n\n\n\n#endif \t/* __IMMDeviceActivator_INTERFACE_DEFINED__ */\n\n\n/* interface __MIDL_itf_mmdeviceapi_0000_0006 */\n/* [local] */ \n\ntypedef /* [public] */ struct __MIDL___MIDL_itf_mmdeviceapi_0000_0006_0001\n    {\n    LPARAM AddPageParam;\n    IMMDevice *pEndpoint;\n    IMMDevice *pPnpInterface;\n    IMMDevice *pPnpDevnode;\n    } \tAudioExtensionParams;\n\n\n\nextern RPC_IF_HANDLE __MIDL_itf_mmdeviceapi_0000_0006_v0_0_c_ifspec;\nextern RPC_IF_HANDLE __MIDL_itf_mmdeviceapi_0000_0006_v0_0_s_ifspec;\n\n\n#ifndef __MMDeviceAPILib_LIBRARY_DEFINED__\n#define __MMDeviceAPILib_LIBRARY_DEFINED__\n\n/* library MMDeviceAPILib */\n/* [helpstring][version][uuid] */ \n\n\nEXTERN_C const IID LIBID_MMDeviceAPILib;\n\nEXTERN_C const CLSID CLSID_MMDeviceEnumerator;\n\n#ifdef __cplusplus\n\nclass DECLSPEC_UUID(\"BCDE0395-E52F-467C-8E3D-C4579291692E\")\nMMDeviceEnumerator;\n#endif\n#endif /* __MMDeviceAPILib_LIBRARY_DEFINED__ */\n\n/* Additional Prototypes for ALL interfaces */\n\n/* end of Additional Prototypes */\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif\n\n\n\n"
  },
  {
    "path": "thirdparty/portaudio/src/hostapi/wasapi/mingw-include/propkey.h",
    "content": "/**\n * This file has no copyright assigned and is placed in the Public Domain.\n * This file is part of the PortAudio library.\n */\n#ifndef _INC_PROPKEY_PA\n#define _INC_PROPKEY_PA\n\n#ifndef DEFINE_API_PKEY\n#define DEFINE_API_PKEY(name, managed_name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8, pid) \\\n    DEFINE_PROPERTYKEY(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8, pid)\n#endif\n\n#endif /* _INC_PROPKEY_PA */\n"
  },
  {
    "path": "thirdparty/portaudio/src/hostapi/wasapi/mingw-include/propkeydef.h",
    "content": "#ifndef PID_FIRST_USABLE\n#define PID_FIRST_USABLE 2\n#endif\n\n#ifndef REFPROPERTYKEY\n#ifdef __cplusplus\n#define REFPROPERTYKEY const PROPERTYKEY &\n#else // !__cplusplus\n#define REFPROPERTYKEY const PROPERTYKEY * __MIDL_CONST\n#endif // __cplusplus\n#endif //REFPROPERTYKEY\n\n#ifdef DEFINE_PROPERTYKEY\n#undef DEFINE_PROPERTYKEY\n#endif\n\n#ifdef INITGUID\n#define DEFINE_PROPERTYKEY(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8, pid) EXTERN_C const PROPERTYKEY DECLSPEC_SELECTANY name = { { l, w1, w2, { b1, b2,  b3,  b4,  b5,  b6,  b7,  b8 } }, pid }\n#else\n#define DEFINE_PROPERTYKEY(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8, pid) EXTERN_C const PROPERTYKEY name\n#endif // INITGUID\n\n#ifndef IsEqualPropertyKey\n#define IsEqualPropertyKey(a, b)   (((a).pid == (b).pid) && IsEqualIID((a).fmtid, (b).fmtid) )\n#endif  // IsEqualPropertyKey\n\n"
  },
  {
    "path": "thirdparty/portaudio/src/hostapi/wasapi/mingw-include/propsys.h",
    "content": "\n\n/* this ALWAYS GENERATED file contains the definitions for the interfaces */\n\n\n /* File created by MIDL compiler version 7.00.0499 */\n/* Compiler settings for propsys.idl:\n    Oicf, W1, Zp8, env=Win32 (32b run)\n    protocol : dce , ms_ext, c_ext, robust\n    error checks: allocation ref bounds_check enum stub_data \n    VC __declspec() decoration level: \n         __declspec(uuid()), __declspec(selectany), __declspec(novtable)\n         DECLSPEC_UUID(), MIDL_INTERFACE()\n*/\n//@@MIDL_FILE_HEADING(  )\n\n#pragma warning( disable: 4049 )  /* more than 64k source lines */\n\n\n/* verify that the <rpcndr.h> version is high enough to compile this file*/\n#ifndef __REQUIRED_RPCNDR_H_VERSION__\n#define __REQUIRED_RPCNDR_H_VERSION__ 475\n#endif\n\n/* verify that the <rpcsal.h> version is high enough to compile this file*/\n#ifndef __REQUIRED_RPCSAL_H_VERSION__\n#define __REQUIRED_RPCSAL_H_VERSION__ 100\n#endif\n\n#include \"rpc.h\"\n#include \"rpcndr.h\"\n\n#ifndef __RPCNDR_H_VERSION__\n#error this stub requires an updated version of <rpcndr.h>\n#endif // __RPCNDR_H_VERSION__\n\n#ifndef COM_NO_WINDOWS_H\n#include \"windows.h\"\n#include \"ole2.h\"\n#endif /*COM_NO_WINDOWS_H*/\n\n#ifndef __propsys_h__\n#define __propsys_h__\n\n#if defined(_MSC_VER) && (_MSC_VER >= 1020)\n#pragma once\n#endif\n\n/* Forward Declarations */ \n\n#ifndef __IInitializeWithFile_FWD_DEFINED__\n#define __IInitializeWithFile_FWD_DEFINED__\ntypedef interface IInitializeWithFile IInitializeWithFile;\n#endif \t/* __IInitializeWithFile_FWD_DEFINED__ */\n\n\n#ifndef __IInitializeWithStream_FWD_DEFINED__\n#define __IInitializeWithStream_FWD_DEFINED__\ntypedef interface IInitializeWithStream IInitializeWithStream;\n#endif \t/* __IInitializeWithStream_FWD_DEFINED__ */\n\n\n#ifndef __IPropertyStore_FWD_DEFINED__\n#define __IPropertyStore_FWD_DEFINED__\ntypedef interface IPropertyStore IPropertyStore;\n#endif \t/* __IPropertyStore_FWD_DEFINED__ */\n\n\n#ifndef __INamedPropertyStore_FWD_DEFINED__\n#define __INamedPropertyStore_FWD_DEFINED__\ntypedef interface INamedPropertyStore INamedPropertyStore;\n#endif \t/* __INamedPropertyStore_FWD_DEFINED__ */\n\n\n#ifndef __IObjectWithPropertyKey_FWD_DEFINED__\n#define __IObjectWithPropertyKey_FWD_DEFINED__\ntypedef interface IObjectWithPropertyKey IObjectWithPropertyKey;\n#endif \t/* __IObjectWithPropertyKey_FWD_DEFINED__ */\n\n\n#ifndef __IPropertyChange_FWD_DEFINED__\n#define __IPropertyChange_FWD_DEFINED__\ntypedef interface IPropertyChange IPropertyChange;\n#endif \t/* __IPropertyChange_FWD_DEFINED__ */\n\n\n#ifndef __IPropertyChangeArray_FWD_DEFINED__\n#define __IPropertyChangeArray_FWD_DEFINED__\ntypedef interface IPropertyChangeArray IPropertyChangeArray;\n#endif \t/* __IPropertyChangeArray_FWD_DEFINED__ */\n\n\n#ifndef __IPropertyStoreCapabilities_FWD_DEFINED__\n#define __IPropertyStoreCapabilities_FWD_DEFINED__\ntypedef interface IPropertyStoreCapabilities IPropertyStoreCapabilities;\n#endif \t/* __IPropertyStoreCapabilities_FWD_DEFINED__ */\n\n\n#ifndef __IPropertyStoreCache_FWD_DEFINED__\n#define __IPropertyStoreCache_FWD_DEFINED__\ntypedef interface IPropertyStoreCache IPropertyStoreCache;\n#endif \t/* __IPropertyStoreCache_FWD_DEFINED__ */\n\n\n#ifndef __IPropertyEnumType_FWD_DEFINED__\n#define __IPropertyEnumType_FWD_DEFINED__\ntypedef interface IPropertyEnumType IPropertyEnumType;\n#endif \t/* __IPropertyEnumType_FWD_DEFINED__ */\n\n\n#ifndef __IPropertyEnumTypeList_FWD_DEFINED__\n#define __IPropertyEnumTypeList_FWD_DEFINED__\ntypedef interface IPropertyEnumTypeList IPropertyEnumTypeList;\n#endif \t/* __IPropertyEnumTypeList_FWD_DEFINED__ */\n\n\n#ifndef __IPropertyDescription_FWD_DEFINED__\n#define __IPropertyDescription_FWD_DEFINED__\ntypedef interface IPropertyDescription IPropertyDescription;\n#endif \t/* __IPropertyDescription_FWD_DEFINED__ */\n\n\n#ifndef __IPropertyDescriptionAliasInfo_FWD_DEFINED__\n#define __IPropertyDescriptionAliasInfo_FWD_DEFINED__\ntypedef interface IPropertyDescriptionAliasInfo IPropertyDescriptionAliasInfo;\n#endif \t/* __IPropertyDescriptionAliasInfo_FWD_DEFINED__ */\n\n\n#ifndef __IPropertyDescriptionSearchInfo_FWD_DEFINED__\n#define __IPropertyDescriptionSearchInfo_FWD_DEFINED__\ntypedef interface IPropertyDescriptionSearchInfo IPropertyDescriptionSearchInfo;\n#endif \t/* __IPropertyDescriptionSearchInfo_FWD_DEFINED__ */\n\n\n#ifndef __IPropertySystem_FWD_DEFINED__\n#define __IPropertySystem_FWD_DEFINED__\ntypedef interface IPropertySystem IPropertySystem;\n#endif \t/* __IPropertySystem_FWD_DEFINED__ */\n\n\n#ifndef __IPropertyDescriptionList_FWD_DEFINED__\n#define __IPropertyDescriptionList_FWD_DEFINED__\ntypedef interface IPropertyDescriptionList IPropertyDescriptionList;\n#endif \t/* __IPropertyDescriptionList_FWD_DEFINED__ */\n\n\n#ifndef __IPropertyStoreFactory_FWD_DEFINED__\n#define __IPropertyStoreFactory_FWD_DEFINED__\ntypedef interface IPropertyStoreFactory IPropertyStoreFactory;\n#endif \t/* __IPropertyStoreFactory_FWD_DEFINED__ */\n\n\n#ifndef __IDelayedPropertyStoreFactory_FWD_DEFINED__\n#define __IDelayedPropertyStoreFactory_FWD_DEFINED__\ntypedef interface IDelayedPropertyStoreFactory IDelayedPropertyStoreFactory;\n#endif \t/* __IDelayedPropertyStoreFactory_FWD_DEFINED__ */\n\n\n#ifndef __IPersistSerializedPropStorage_FWD_DEFINED__\n#define __IPersistSerializedPropStorage_FWD_DEFINED__\ntypedef interface IPersistSerializedPropStorage IPersistSerializedPropStorage;\n#endif \t/* __IPersistSerializedPropStorage_FWD_DEFINED__ */\n\n\n#ifndef __IPropertySystemChangeNotify_FWD_DEFINED__\n#define __IPropertySystemChangeNotify_FWD_DEFINED__\ntypedef interface IPropertySystemChangeNotify IPropertySystemChangeNotify;\n#endif \t/* __IPropertySystemChangeNotify_FWD_DEFINED__ */\n\n\n#ifndef __ICreateObject_FWD_DEFINED__\n#define __ICreateObject_FWD_DEFINED__\ntypedef interface ICreateObject ICreateObject;\n#endif \t/* __ICreateObject_FWD_DEFINED__ */\n\n\n#ifndef __InMemoryPropertyStore_FWD_DEFINED__\n#define __InMemoryPropertyStore_FWD_DEFINED__\n\n#ifdef __cplusplus\ntypedef class InMemoryPropertyStore InMemoryPropertyStore;\n#else\ntypedef struct InMemoryPropertyStore InMemoryPropertyStore;\n#endif /* __cplusplus */\n\n#endif \t/* __InMemoryPropertyStore_FWD_DEFINED__ */\n\n\n#ifndef __PropertySystem_FWD_DEFINED__\n#define __PropertySystem_FWD_DEFINED__\n\n#ifdef __cplusplus\ntypedef class PropertySystem PropertySystem;\n#else\ntypedef struct PropertySystem PropertySystem;\n#endif /* __cplusplus */\n\n#endif \t/* __PropertySystem_FWD_DEFINED__ */\n\n\n/* header files for imported files */\n#include \"objidl.h\"\n#include \"oleidl.h\"\n#include \"ocidl.h\"\n#include \"shtypes.h\"\n#include \"structuredquery.h\"\n\n#ifdef __cplusplus\nextern \"C\"{\n#endif \n\n\n/* interface __MIDL_itf_propsys_0000_0000 */\n/* [local] */ \n\n#ifndef PSSTDAPI\n#if defined(_PROPSYS_)\n#define PSSTDAPI          STDAPI\n#define PSSTDAPI_(type)   STDAPI_(type)\n#else\n#define PSSTDAPI          EXTERN_C DECLSPEC_IMPORT HRESULT STDAPICALLTYPE\n#define PSSTDAPI_(type)   EXTERN_C DECLSPEC_IMPORT type STDAPICALLTYPE\n#endif\n#endif // PSSTDAPI\n#if 0\ntypedef PROPERTYKEY *REFPROPERTYKEY;\n\n#endif // 0\n#include <propkeydef.h>\n\n\nextern RPC_IF_HANDLE __MIDL_itf_propsys_0000_0000_v0_0_c_ifspec;\nextern RPC_IF_HANDLE __MIDL_itf_propsys_0000_0000_v0_0_s_ifspec;\n\n#ifndef __IInitializeWithFile_INTERFACE_DEFINED__\n#define __IInitializeWithFile_INTERFACE_DEFINED__\n\n/* interface IInitializeWithFile */\n/* [unique][object][uuid] */ \n\n\nEXTERN_C const IID IID_IInitializeWithFile;\n\n#if defined(__cplusplus) && !defined(CINTERFACE)\n    \n    MIDL_INTERFACE(\"b7d14566-0509-4cce-a71f-0a554233bd9b\")\n    IInitializeWithFile : public IUnknown\n    {\n    public:\n        virtual HRESULT STDMETHODCALLTYPE Initialize( \n            /* [string][in] */ __RPC__in LPCWSTR pszFilePath,\n            /* [in] */ DWORD grfMode) = 0;\n        \n    };\n    \n#else \t/* C style interface */\n\n    typedef struct IInitializeWithFileVtbl\n    {\n        BEGIN_INTERFACE\n        \n        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \n            IInitializeWithFile * This,\n            /* [in] */ __RPC__in REFIID riid,\n            /* [iid_is][out] */ \n            __RPC__deref_out  void **ppvObject);\n        \n        ULONG ( STDMETHODCALLTYPE *AddRef )( \n            IInitializeWithFile * This);\n        \n        ULONG ( STDMETHODCALLTYPE *Release )( \n            IInitializeWithFile * This);\n        \n        HRESULT ( STDMETHODCALLTYPE *Initialize )( \n            IInitializeWithFile * This,\n            /* [string][in] */ __RPC__in LPCWSTR pszFilePath,\n            /* [in] */ DWORD grfMode);\n        \n        END_INTERFACE\n    } IInitializeWithFileVtbl;\n\n    interface IInitializeWithFile\n    {\n        CONST_VTBL struct IInitializeWithFileVtbl *lpVtbl;\n    };\n\n    \n\n#ifdef COBJMACROS\n\n\n#define IInitializeWithFile_QueryInterface(This,riid,ppvObject)\t\\\n    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \n\n#define IInitializeWithFile_AddRef(This)\t\\\n    ( (This)->lpVtbl -> AddRef(This) ) \n\n#define IInitializeWithFile_Release(This)\t\\\n    ( (This)->lpVtbl -> Release(This) ) \n\n\n#define IInitializeWithFile_Initialize(This,pszFilePath,grfMode)\t\\\n    ( (This)->lpVtbl -> Initialize(This,pszFilePath,grfMode) ) \n\n#endif /* COBJMACROS */\n\n\n#endif \t/* C style interface */\n\n\n\n\n#endif \t/* __IInitializeWithFile_INTERFACE_DEFINED__ */\n\n\n#ifndef __IInitializeWithStream_INTERFACE_DEFINED__\n#define __IInitializeWithStream_INTERFACE_DEFINED__\n\n/* interface IInitializeWithStream */\n/* [unique][object][uuid] */ \n\n\nEXTERN_C const IID IID_IInitializeWithStream;\n\n#if defined(__cplusplus) && !defined(CINTERFACE)\n    \n    MIDL_INTERFACE(\"b824b49d-22ac-4161-ac8a-9916e8fa3f7f\")\n    IInitializeWithStream : public IUnknown\n    {\n    public:\n        virtual /* [local] */ HRESULT STDMETHODCALLTYPE Initialize( \n            /* [in] */ IStream *pstream,\n            /* [in] */ DWORD grfMode) = 0;\n        \n    };\n    \n#else \t/* C style interface */\n\n    typedef struct IInitializeWithStreamVtbl\n    {\n        BEGIN_INTERFACE\n        \n        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \n            IInitializeWithStream * This,\n            /* [in] */ __RPC__in REFIID riid,\n            /* [iid_is][out] */ \n            __RPC__deref_out  void **ppvObject);\n        \n        ULONG ( STDMETHODCALLTYPE *AddRef )( \n            IInitializeWithStream * This);\n        \n        ULONG ( STDMETHODCALLTYPE *Release )( \n            IInitializeWithStream * This);\n        \n        /* [local] */ HRESULT ( STDMETHODCALLTYPE *Initialize )( \n            IInitializeWithStream * This,\n            /* [in] */ IStream *pstream,\n            /* [in] */ DWORD grfMode);\n        \n        END_INTERFACE\n    } IInitializeWithStreamVtbl;\n\n    interface IInitializeWithStream\n    {\n        CONST_VTBL struct IInitializeWithStreamVtbl *lpVtbl;\n    };\n\n    \n\n#ifdef COBJMACROS\n\n\n#define IInitializeWithStream_QueryInterface(This,riid,ppvObject)\t\\\n    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \n\n#define IInitializeWithStream_AddRef(This)\t\\\n    ( (This)->lpVtbl -> AddRef(This) ) \n\n#define IInitializeWithStream_Release(This)\t\\\n    ( (This)->lpVtbl -> Release(This) ) \n\n\n#define IInitializeWithStream_Initialize(This,pstream,grfMode)\t\\\n    ( (This)->lpVtbl -> Initialize(This,pstream,grfMode) ) \n\n#endif /* COBJMACROS */\n\n\n#endif \t/* C style interface */\n\n\n\n/* [call_as] */ HRESULT STDMETHODCALLTYPE IInitializeWithStream_RemoteInitialize_Proxy( \n    IInitializeWithStream * This,\n    /* [in] */ __RPC__in_opt IStream *pstream,\n    /* [in] */ DWORD grfMode);\n\n\nvoid __RPC_STUB IInitializeWithStream_RemoteInitialize_Stub(\n    IRpcStubBuffer *This,\n    IRpcChannelBuffer *_pRpcChannelBuffer,\n    PRPC_MESSAGE _pRpcMessage,\n    DWORD *_pdwStubPhase);\n\n\n\n#endif \t/* __IInitializeWithStream_INTERFACE_DEFINED__ */\n\n\n#ifndef __IPropertyStore_INTERFACE_DEFINED__\n#define __IPropertyStore_INTERFACE_DEFINED__\n\n/* interface IPropertyStore */\n/* [unique][object][helpstring][uuid] */ \n\n\nEXTERN_C const IID IID_IPropertyStore;\n\n#if defined(__cplusplus) && !defined(CINTERFACE)\n    \n    MIDL_INTERFACE(\"886d8eeb-8cf2-4446-8d02-cdba1dbdcf99\")\n    IPropertyStore : public IUnknown\n    {\n    public:\n        virtual HRESULT STDMETHODCALLTYPE GetCount( \n            /* [out] */ __RPC__out DWORD *cProps) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE GetAt( \n            /* [in] */ DWORD iProp,\n            /* [out] */ __RPC__out PROPERTYKEY *pkey) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE GetValue( \n            /* [in] */ __RPC__in REFPROPERTYKEY key,\n            /* [out] */ __RPC__out PROPVARIANT *pv) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE SetValue( \n            /* [in] */ __RPC__in REFPROPERTYKEY key,\n            /* [in] */ __RPC__in REFPROPVARIANT propvar) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE Commit( void) = 0;\n        \n    };\n    \n#else \t/* C style interface */\n\n    typedef struct IPropertyStoreVtbl\n    {\n        BEGIN_INTERFACE\n        \n        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \n            IPropertyStore * This,\n            /* [in] */ __RPC__in REFIID riid,\n            /* [iid_is][out] */ \n            __RPC__deref_out  void **ppvObject);\n        \n        ULONG ( STDMETHODCALLTYPE *AddRef )( \n            IPropertyStore * This);\n        \n        ULONG ( STDMETHODCALLTYPE *Release )( \n            IPropertyStore * This);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetCount )( \n            IPropertyStore * This,\n            /* [out] */ __RPC__out DWORD *cProps);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetAt )( \n            IPropertyStore * This,\n            /* [in] */ DWORD iProp,\n            /* [out] */ __RPC__out PROPERTYKEY *pkey);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetValue )( \n            IPropertyStore * This,\n            /* [in] */ __RPC__in REFPROPERTYKEY key,\n            /* [out] */ __RPC__out PROPVARIANT *pv);\n        \n        HRESULT ( STDMETHODCALLTYPE *SetValue )( \n            IPropertyStore * This,\n            /* [in] */ __RPC__in REFPROPERTYKEY key,\n            /* [in] */ __RPC__in REFPROPVARIANT propvar);\n        \n        HRESULT ( STDMETHODCALLTYPE *Commit )( \n            IPropertyStore * This);\n        \n        END_INTERFACE\n    } IPropertyStoreVtbl;\n\n    interface IPropertyStore\n    {\n        CONST_VTBL struct IPropertyStoreVtbl *lpVtbl;\n    };\n\n    \n\n#ifdef COBJMACROS\n\n\n#define IPropertyStore_QueryInterface(This,riid,ppvObject)\t\\\n    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \n\n#define IPropertyStore_AddRef(This)\t\\\n    ( (This)->lpVtbl -> AddRef(This) ) \n\n#define IPropertyStore_Release(This)\t\\\n    ( (This)->lpVtbl -> Release(This) ) \n\n\n#define IPropertyStore_GetCount(This,cProps)\t\\\n    ( (This)->lpVtbl -> GetCount(This,cProps) ) \n\n#define IPropertyStore_GetAt(This,iProp,pkey)\t\\\n    ( (This)->lpVtbl -> GetAt(This,iProp,pkey) ) \n\n#define IPropertyStore_GetValue(This,key,pv)\t\\\n    ( (This)->lpVtbl -> GetValue(This,key,pv) ) \n\n#define IPropertyStore_SetValue(This,key,propvar)\t\\\n    ( (This)->lpVtbl -> SetValue(This,key,propvar) ) \n\n#define IPropertyStore_Commit(This)\t\\\n    ( (This)->lpVtbl -> Commit(This) ) \n\n#endif /* COBJMACROS */\n\n\n#endif \t/* C style interface */\n\n\n\n\n#endif \t/* __IPropertyStore_INTERFACE_DEFINED__ */\n\n\n/* interface __MIDL_itf_propsys_0000_0003 */\n/* [local] */ \n\ntypedef /* [unique] */  __RPC_unique_pointer IPropertyStore *LPPROPERTYSTORE;\n\n\n\nextern RPC_IF_HANDLE __MIDL_itf_propsys_0000_0003_v0_0_c_ifspec;\nextern RPC_IF_HANDLE __MIDL_itf_propsys_0000_0003_v0_0_s_ifspec;\n\n#ifndef __INamedPropertyStore_INTERFACE_DEFINED__\n#define __INamedPropertyStore_INTERFACE_DEFINED__\n\n/* interface INamedPropertyStore */\n/* [unique][object][uuid] */ \n\n\nEXTERN_C const IID IID_INamedPropertyStore;\n\n#if defined(__cplusplus) && !defined(CINTERFACE)\n    \n    MIDL_INTERFACE(\"71604b0f-97b0-4764-8577-2f13e98a1422\")\n    INamedPropertyStore : public IUnknown\n    {\n    public:\n        virtual HRESULT STDMETHODCALLTYPE GetNamedValue( \n            /* [string][in] */ __RPC__in LPCWSTR pszName,\n            /* [out] */ __RPC__out PROPVARIANT *ppropvar) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE SetNamedValue( \n            /* [string][in] */ __RPC__in LPCWSTR pszName,\n            /* [in] */ __RPC__in REFPROPVARIANT propvar) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE GetNameCount( \n            /* [out] */ __RPC__out DWORD *pdwCount) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE GetNameAt( \n            /* [in] */ DWORD iProp,\n            /* [out] */ __RPC__deref_out_opt BSTR *pbstrName) = 0;\n        \n    };\n    \n#else \t/* C style interface */\n\n    typedef struct INamedPropertyStoreVtbl\n    {\n        BEGIN_INTERFACE\n        \n        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \n            INamedPropertyStore * This,\n            /* [in] */ __RPC__in REFIID riid,\n            /* [iid_is][out] */ \n            __RPC__deref_out  void **ppvObject);\n        \n        ULONG ( STDMETHODCALLTYPE *AddRef )( \n            INamedPropertyStore * This);\n        \n        ULONG ( STDMETHODCALLTYPE *Release )( \n            INamedPropertyStore * This);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetNamedValue )( \n            INamedPropertyStore * This,\n            /* [string][in] */ __RPC__in LPCWSTR pszName,\n            /* [out] */ __RPC__out PROPVARIANT *ppropvar);\n        \n        HRESULT ( STDMETHODCALLTYPE *SetNamedValue )( \n            INamedPropertyStore * This,\n            /* [string][in] */ __RPC__in LPCWSTR pszName,\n            /* [in] */ __RPC__in REFPROPVARIANT propvar);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetNameCount )( \n            INamedPropertyStore * This,\n            /* [out] */ __RPC__out DWORD *pdwCount);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetNameAt )( \n            INamedPropertyStore * This,\n            /* [in] */ DWORD iProp,\n            /* [out] */ __RPC__deref_out_opt BSTR *pbstrName);\n        \n        END_INTERFACE\n    } INamedPropertyStoreVtbl;\n\n    interface INamedPropertyStore\n    {\n        CONST_VTBL struct INamedPropertyStoreVtbl *lpVtbl;\n    };\n\n    \n\n#ifdef COBJMACROS\n\n\n#define INamedPropertyStore_QueryInterface(This,riid,ppvObject)\t\\\n    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \n\n#define INamedPropertyStore_AddRef(This)\t\\\n    ( (This)->lpVtbl -> AddRef(This) ) \n\n#define INamedPropertyStore_Release(This)\t\\\n    ( (This)->lpVtbl -> Release(This) ) \n\n\n#define INamedPropertyStore_GetNamedValue(This,pszName,ppropvar)\t\\\n    ( (This)->lpVtbl -> GetNamedValue(This,pszName,ppropvar) ) \n\n#define INamedPropertyStore_SetNamedValue(This,pszName,propvar)\t\\\n    ( (This)->lpVtbl -> SetNamedValue(This,pszName,propvar) ) \n\n#define INamedPropertyStore_GetNameCount(This,pdwCount)\t\\\n    ( (This)->lpVtbl -> GetNameCount(This,pdwCount) ) \n\n#define INamedPropertyStore_GetNameAt(This,iProp,pbstrName)\t\\\n    ( (This)->lpVtbl -> GetNameAt(This,iProp,pbstrName) ) \n\n#endif /* COBJMACROS */\n\n\n#endif \t/* C style interface */\n\n\n\n\n#endif \t/* __INamedPropertyStore_INTERFACE_DEFINED__ */\n\n\n/* interface __MIDL_itf_propsys_0000_0004 */\n/* [local] */ \n\n/* [v1_enum] */ \nenum tagGETPROPERTYSTOREFLAGS\n    {\tGPS_DEFAULT\t= 0,\n\tGPS_HANDLERPROPERTIESONLY\t= 0x1,\n\tGPS_READWRITE\t= 0x2,\n\tGPS_TEMPORARY\t= 0x4,\n\tGPS_FASTPROPERTIESONLY\t= 0x8,\n\tGPS_OPENSLOWITEM\t= 0x10,\n\tGPS_DELAYCREATION\t= 0x20,\n\tGPS_BESTEFFORT\t= 0x40,\n\tGPS_MASK_VALID\t= 0x7f\n    } ;\ntypedef int GETPROPERTYSTOREFLAGS;\n\n\n\nextern RPC_IF_HANDLE __MIDL_itf_propsys_0000_0004_v0_0_c_ifspec;\nextern RPC_IF_HANDLE __MIDL_itf_propsys_0000_0004_v0_0_s_ifspec;\n\n#ifndef __IObjectWithPropertyKey_INTERFACE_DEFINED__\n#define __IObjectWithPropertyKey_INTERFACE_DEFINED__\n\n/* interface IObjectWithPropertyKey */\n/* [uuid][object] */ \n\n\nEXTERN_C const IID IID_IObjectWithPropertyKey;\n\n#if defined(__cplusplus) && !defined(CINTERFACE)\n    \n    MIDL_INTERFACE(\"fc0ca0a7-c316-4fd2-9031-3e628e6d4f23\")\n    IObjectWithPropertyKey : public IUnknown\n    {\n    public:\n        virtual HRESULT STDMETHODCALLTYPE SetPropertyKey( \n            /* [in] */ __RPC__in REFPROPERTYKEY key) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE GetPropertyKey( \n            /* [out] */ __RPC__out PROPERTYKEY *pkey) = 0;\n        \n    };\n    \n#else \t/* C style interface */\n\n    typedef struct IObjectWithPropertyKeyVtbl\n    {\n        BEGIN_INTERFACE\n        \n        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \n            IObjectWithPropertyKey * This,\n            /* [in] */ __RPC__in REFIID riid,\n            /* [iid_is][out] */ \n            __RPC__deref_out  void **ppvObject);\n        \n        ULONG ( STDMETHODCALLTYPE *AddRef )( \n            IObjectWithPropertyKey * This);\n        \n        ULONG ( STDMETHODCALLTYPE *Release )( \n            IObjectWithPropertyKey * This);\n        \n        HRESULT ( STDMETHODCALLTYPE *SetPropertyKey )( \n            IObjectWithPropertyKey * This,\n            /* [in] */ __RPC__in REFPROPERTYKEY key);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetPropertyKey )( \n            IObjectWithPropertyKey * This,\n            /* [out] */ __RPC__out PROPERTYKEY *pkey);\n        \n        END_INTERFACE\n    } IObjectWithPropertyKeyVtbl;\n\n    interface IObjectWithPropertyKey\n    {\n        CONST_VTBL struct IObjectWithPropertyKeyVtbl *lpVtbl;\n    };\n\n    \n\n#ifdef COBJMACROS\n\n\n#define IObjectWithPropertyKey_QueryInterface(This,riid,ppvObject)\t\\\n    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \n\n#define IObjectWithPropertyKey_AddRef(This)\t\\\n    ( (This)->lpVtbl -> AddRef(This) ) \n\n#define IObjectWithPropertyKey_Release(This)\t\\\n    ( (This)->lpVtbl -> Release(This) ) \n\n\n#define IObjectWithPropertyKey_SetPropertyKey(This,key)\t\\\n    ( (This)->lpVtbl -> SetPropertyKey(This,key) ) \n\n#define IObjectWithPropertyKey_GetPropertyKey(This,pkey)\t\\\n    ( (This)->lpVtbl -> GetPropertyKey(This,pkey) ) \n\n#endif /* COBJMACROS */\n\n\n#endif \t/* C style interface */\n\n\n\n\n#endif \t/* __IObjectWithPropertyKey_INTERFACE_DEFINED__ */\n\n\n/* interface __MIDL_itf_propsys_0000_0005 */\n/* [local] */ \n\ntypedef /* [v1_enum] */ \nenum tagPKA_FLAGS\n    {\tPKA_SET\t= 0,\n\tPKA_APPEND\t= ( PKA_SET + 1 ) ,\n\tPKA_DELETE\t= ( PKA_APPEND + 1 ) \n    } \tPKA_FLAGS;\n\n\n\nextern RPC_IF_HANDLE __MIDL_itf_propsys_0000_0005_v0_0_c_ifspec;\nextern RPC_IF_HANDLE __MIDL_itf_propsys_0000_0005_v0_0_s_ifspec;\n\n#ifndef __IPropertyChange_INTERFACE_DEFINED__\n#define __IPropertyChange_INTERFACE_DEFINED__\n\n/* interface IPropertyChange */\n/* [unique][object][uuid] */ \n\n\nEXTERN_C const IID IID_IPropertyChange;\n\n#if defined(__cplusplus) && !defined(CINTERFACE)\n    \n    MIDL_INTERFACE(\"f917bc8a-1bba-4478-a245-1bde03eb9431\")\n    IPropertyChange : public IObjectWithPropertyKey\n    {\n    public:\n        virtual HRESULT STDMETHODCALLTYPE ApplyToPropVariant( \n            /* [in] */ __RPC__in REFPROPVARIANT propvarIn,\n            /* [out] */ __RPC__out PROPVARIANT *ppropvarOut) = 0;\n        \n    };\n    \n#else \t/* C style interface */\n\n    typedef struct IPropertyChangeVtbl\n    {\n        BEGIN_INTERFACE\n        \n        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \n            IPropertyChange * This,\n            /* [in] */ __RPC__in REFIID riid,\n            /* [iid_is][out] */ \n            __RPC__deref_out  void **ppvObject);\n        \n        ULONG ( STDMETHODCALLTYPE *AddRef )( \n            IPropertyChange * This);\n        \n        ULONG ( STDMETHODCALLTYPE *Release )( \n            IPropertyChange * This);\n        \n        HRESULT ( STDMETHODCALLTYPE *SetPropertyKey )( \n            IPropertyChange * This,\n            /* [in] */ __RPC__in REFPROPERTYKEY key);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetPropertyKey )( \n            IPropertyChange * This,\n            /* [out] */ __RPC__out PROPERTYKEY *pkey);\n        \n        HRESULT ( STDMETHODCALLTYPE *ApplyToPropVariant )( \n            IPropertyChange * This,\n            /* [in] */ __RPC__in REFPROPVARIANT propvarIn,\n            /* [out] */ __RPC__out PROPVARIANT *ppropvarOut);\n        \n        END_INTERFACE\n    } IPropertyChangeVtbl;\n\n    interface IPropertyChange\n    {\n        CONST_VTBL struct IPropertyChangeVtbl *lpVtbl;\n    };\n\n    \n\n#ifdef COBJMACROS\n\n\n#define IPropertyChange_QueryInterface(This,riid,ppvObject)\t\\\n    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \n\n#define IPropertyChange_AddRef(This)\t\\\n    ( (This)->lpVtbl -> AddRef(This) ) \n\n#define IPropertyChange_Release(This)\t\\\n    ( (This)->lpVtbl -> Release(This) ) \n\n\n#define IPropertyChange_SetPropertyKey(This,key)\t\\\n    ( (This)->lpVtbl -> SetPropertyKey(This,key) ) \n\n#define IPropertyChange_GetPropertyKey(This,pkey)\t\\\n    ( (This)->lpVtbl -> GetPropertyKey(This,pkey) ) \n\n\n#define IPropertyChange_ApplyToPropVariant(This,propvarIn,ppropvarOut)\t\\\n    ( (This)->lpVtbl -> ApplyToPropVariant(This,propvarIn,ppropvarOut) ) \n\n#endif /* COBJMACROS */\n\n\n#endif \t/* C style interface */\n\n\n\n\n#endif \t/* __IPropertyChange_INTERFACE_DEFINED__ */\n\n\n#ifndef __IPropertyChangeArray_INTERFACE_DEFINED__\n#define __IPropertyChangeArray_INTERFACE_DEFINED__\n\n/* interface IPropertyChangeArray */\n/* [unique][object][uuid] */ \n\n\nEXTERN_C const IID IID_IPropertyChangeArray;\n\n#if defined(__cplusplus) && !defined(CINTERFACE)\n    \n    MIDL_INTERFACE(\"380f5cad-1b5e-42f2-805d-637fd392d31e\")\n    IPropertyChangeArray : public IUnknown\n    {\n    public:\n        virtual HRESULT STDMETHODCALLTYPE GetCount( \n            /* [out] */ __RPC__out UINT *pcOperations) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE GetAt( \n            /* [in] */ UINT iIndex,\n            /* [in] */ __RPC__in REFIID riid,\n            /* [iid_is][out] */ __RPC__deref_out_opt void **ppv) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE InsertAt( \n            /* [in] */ UINT iIndex,\n            /* [in] */ __RPC__in_opt IPropertyChange *ppropChange) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE Append( \n            /* [in] */ __RPC__in_opt IPropertyChange *ppropChange) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE AppendOrReplace( \n            /* [in] */ __RPC__in_opt IPropertyChange *ppropChange) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE RemoveAt( \n            /* [in] */ UINT iIndex) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE IsKeyInArray( \n            /* [in] */ __RPC__in REFPROPERTYKEY key) = 0;\n        \n    };\n    \n#else \t/* C style interface */\n\n    typedef struct IPropertyChangeArrayVtbl\n    {\n        BEGIN_INTERFACE\n        \n        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \n            IPropertyChangeArray * This,\n            /* [in] */ __RPC__in REFIID riid,\n            /* [iid_is][out] */ \n            __RPC__deref_out  void **ppvObject);\n        \n        ULONG ( STDMETHODCALLTYPE *AddRef )( \n            IPropertyChangeArray * This);\n        \n        ULONG ( STDMETHODCALLTYPE *Release )( \n            IPropertyChangeArray * This);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetCount )( \n            IPropertyChangeArray * This,\n            /* [out] */ __RPC__out UINT *pcOperations);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetAt )( \n            IPropertyChangeArray * This,\n            /* [in] */ UINT iIndex,\n            /* [in] */ __RPC__in REFIID riid,\n            /* [iid_is][out] */ __RPC__deref_out_opt void **ppv);\n        \n        HRESULT ( STDMETHODCALLTYPE *InsertAt )( \n            IPropertyChangeArray * This,\n            /* [in] */ UINT iIndex,\n            /* [in] */ __RPC__in_opt IPropertyChange *ppropChange);\n        \n        HRESULT ( STDMETHODCALLTYPE *Append )( \n            IPropertyChangeArray * This,\n            /* [in] */ __RPC__in_opt IPropertyChange *ppropChange);\n        \n        HRESULT ( STDMETHODCALLTYPE *AppendOrReplace )( \n            IPropertyChangeArray * This,\n            /* [in] */ __RPC__in_opt IPropertyChange *ppropChange);\n        \n        HRESULT ( STDMETHODCALLTYPE *RemoveAt )( \n            IPropertyChangeArray * This,\n            /* [in] */ UINT iIndex);\n        \n        HRESULT ( STDMETHODCALLTYPE *IsKeyInArray )( \n            IPropertyChangeArray * This,\n            /* [in] */ __RPC__in REFPROPERTYKEY key);\n        \n        END_INTERFACE\n    } IPropertyChangeArrayVtbl;\n\n    interface IPropertyChangeArray\n    {\n        CONST_VTBL struct IPropertyChangeArrayVtbl *lpVtbl;\n    };\n\n    \n\n#ifdef COBJMACROS\n\n\n#define IPropertyChangeArray_QueryInterface(This,riid,ppvObject)\t\\\n    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \n\n#define IPropertyChangeArray_AddRef(This)\t\\\n    ( (This)->lpVtbl -> AddRef(This) ) \n\n#define IPropertyChangeArray_Release(This)\t\\\n    ( (This)->lpVtbl -> Release(This) ) \n\n\n#define IPropertyChangeArray_GetCount(This,pcOperations)\t\\\n    ( (This)->lpVtbl -> GetCount(This,pcOperations) ) \n\n#define IPropertyChangeArray_GetAt(This,iIndex,riid,ppv)\t\\\n    ( (This)->lpVtbl -> GetAt(This,iIndex,riid,ppv) ) \n\n#define IPropertyChangeArray_InsertAt(This,iIndex,ppropChange)\t\\\n    ( (This)->lpVtbl -> InsertAt(This,iIndex,ppropChange) ) \n\n#define IPropertyChangeArray_Append(This,ppropChange)\t\\\n    ( (This)->lpVtbl -> Append(This,ppropChange) ) \n\n#define IPropertyChangeArray_AppendOrReplace(This,ppropChange)\t\\\n    ( (This)->lpVtbl -> AppendOrReplace(This,ppropChange) ) \n\n#define IPropertyChangeArray_RemoveAt(This,iIndex)\t\\\n    ( (This)->lpVtbl -> RemoveAt(This,iIndex) ) \n\n#define IPropertyChangeArray_IsKeyInArray(This,key)\t\\\n    ( (This)->lpVtbl -> IsKeyInArray(This,key) ) \n\n#endif /* COBJMACROS */\n\n\n#endif \t/* C style interface */\n\n\n\n\n#endif \t/* __IPropertyChangeArray_INTERFACE_DEFINED__ */\n\n\n#ifndef __IPropertyStoreCapabilities_INTERFACE_DEFINED__\n#define __IPropertyStoreCapabilities_INTERFACE_DEFINED__\n\n/* interface IPropertyStoreCapabilities */\n/* [unique][object][uuid] */ \n\n\nEXTERN_C const IID IID_IPropertyStoreCapabilities;\n\n#if defined(__cplusplus) && !defined(CINTERFACE)\n    \n    MIDL_INTERFACE(\"c8e2d566-186e-4d49-bf41-6909ead56acc\")\n    IPropertyStoreCapabilities : public IUnknown\n    {\n    public:\n        virtual HRESULT STDMETHODCALLTYPE IsPropertyWritable( \n            /* [in] */ __RPC__in REFPROPERTYKEY key) = 0;\n        \n    };\n    \n#else \t/* C style interface */\n\n    typedef struct IPropertyStoreCapabilitiesVtbl\n    {\n        BEGIN_INTERFACE\n        \n        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \n            IPropertyStoreCapabilities * This,\n            /* [in] */ __RPC__in REFIID riid,\n            /* [iid_is][out] */ \n            __RPC__deref_out  void **ppvObject);\n        \n        ULONG ( STDMETHODCALLTYPE *AddRef )( \n            IPropertyStoreCapabilities * This);\n        \n        ULONG ( STDMETHODCALLTYPE *Release )( \n            IPropertyStoreCapabilities * This);\n        \n        HRESULT ( STDMETHODCALLTYPE *IsPropertyWritable )( \n            IPropertyStoreCapabilities * This,\n            /* [in] */ __RPC__in REFPROPERTYKEY key);\n        \n        END_INTERFACE\n    } IPropertyStoreCapabilitiesVtbl;\n\n    interface IPropertyStoreCapabilities\n    {\n        CONST_VTBL struct IPropertyStoreCapabilitiesVtbl *lpVtbl;\n    };\n\n    \n\n#ifdef COBJMACROS\n\n\n#define IPropertyStoreCapabilities_QueryInterface(This,riid,ppvObject)\t\\\n    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \n\n#define IPropertyStoreCapabilities_AddRef(This)\t\\\n    ( (This)->lpVtbl -> AddRef(This) ) \n\n#define IPropertyStoreCapabilities_Release(This)\t\\\n    ( (This)->lpVtbl -> Release(This) ) \n\n\n#define IPropertyStoreCapabilities_IsPropertyWritable(This,key)\t\\\n    ( (This)->lpVtbl -> IsPropertyWritable(This,key) ) \n\n#endif /* COBJMACROS */\n\n\n#endif \t/* C style interface */\n\n\n\n\n#endif \t/* __IPropertyStoreCapabilities_INTERFACE_DEFINED__ */\n\n\n#ifndef __IPropertyStoreCache_INTERFACE_DEFINED__\n#define __IPropertyStoreCache_INTERFACE_DEFINED__\n\n/* interface IPropertyStoreCache */\n/* [unique][object][uuid] */ \n\ntypedef /* [v1_enum] */ \nenum _PSC_STATE\n    {\tPSC_NORMAL\t= 0,\n\tPSC_NOTINSOURCE\t= 1,\n\tPSC_DIRTY\t= 2,\n\tPSC_READONLY\t= 3\n    } \tPSC_STATE;\n\n\nEXTERN_C const IID IID_IPropertyStoreCache;\n\n#if defined(__cplusplus) && !defined(CINTERFACE)\n    \n    MIDL_INTERFACE(\"3017056d-9a91-4e90-937d-746c72abbf4f\")\n    IPropertyStoreCache : public IPropertyStore\n    {\n    public:\n        virtual HRESULT STDMETHODCALLTYPE GetState( \n            /* [in] */ __RPC__in REFPROPERTYKEY key,\n            /* [out] */ __RPC__out PSC_STATE *pstate) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE GetValueAndState( \n            /* [in] */ __RPC__in REFPROPERTYKEY key,\n            /* [out] */ __RPC__out PROPVARIANT *ppropvar,\n            /* [out] */ __RPC__out PSC_STATE *pstate) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE SetState( \n            /* [in] */ __RPC__in REFPROPERTYKEY key,\n            /* [in] */ PSC_STATE state) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE SetValueAndState( \n            /* [in] */ __RPC__in REFPROPERTYKEY key,\n            /* [unique][in] */ __RPC__in_opt const PROPVARIANT *ppropvar,\n            /* [in] */ PSC_STATE state) = 0;\n        \n    };\n    \n#else \t/* C style interface */\n\n    typedef struct IPropertyStoreCacheVtbl\n    {\n        BEGIN_INTERFACE\n        \n        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \n            IPropertyStoreCache * This,\n            /* [in] */ __RPC__in REFIID riid,\n            /* [iid_is][out] */ \n            __RPC__deref_out  void **ppvObject);\n        \n        ULONG ( STDMETHODCALLTYPE *AddRef )( \n            IPropertyStoreCache * This);\n        \n        ULONG ( STDMETHODCALLTYPE *Release )( \n            IPropertyStoreCache * This);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetCount )( \n            IPropertyStoreCache * This,\n            /* [out] */ __RPC__out DWORD *cProps);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetAt )( \n            IPropertyStoreCache * This,\n            /* [in] */ DWORD iProp,\n            /* [out] */ __RPC__out PROPERTYKEY *pkey);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetValue )( \n            IPropertyStoreCache * This,\n            /* [in] */ __RPC__in REFPROPERTYKEY key,\n            /* [out] */ __RPC__out PROPVARIANT *pv);\n        \n        HRESULT ( STDMETHODCALLTYPE *SetValue )( \n            IPropertyStoreCache * This,\n            /* [in] */ __RPC__in REFPROPERTYKEY key,\n            /* [in] */ __RPC__in REFPROPVARIANT propvar);\n        \n        HRESULT ( STDMETHODCALLTYPE *Commit )( \n            IPropertyStoreCache * This);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetState )( \n            IPropertyStoreCache * This,\n            /* [in] */ __RPC__in REFPROPERTYKEY key,\n            /* [out] */ __RPC__out PSC_STATE *pstate);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetValueAndState )( \n            IPropertyStoreCache * This,\n            /* [in] */ __RPC__in REFPROPERTYKEY key,\n            /* [out] */ __RPC__out PROPVARIANT *ppropvar,\n            /* [out] */ __RPC__out PSC_STATE *pstate);\n        \n        HRESULT ( STDMETHODCALLTYPE *SetState )( \n            IPropertyStoreCache * This,\n            /* [in] */ __RPC__in REFPROPERTYKEY key,\n            /* [in] */ PSC_STATE state);\n        \n        HRESULT ( STDMETHODCALLTYPE *SetValueAndState )( \n            IPropertyStoreCache * This,\n            /* [in] */ __RPC__in REFPROPERTYKEY key,\n            /* [unique][in] */ __RPC__in_opt const PROPVARIANT *ppropvar,\n            /* [in] */ PSC_STATE state);\n        \n        END_INTERFACE\n    } IPropertyStoreCacheVtbl;\n\n    interface IPropertyStoreCache\n    {\n        CONST_VTBL struct IPropertyStoreCacheVtbl *lpVtbl;\n    };\n\n    \n\n#ifdef COBJMACROS\n\n\n#define IPropertyStoreCache_QueryInterface(This,riid,ppvObject)\t\\\n    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \n\n#define IPropertyStoreCache_AddRef(This)\t\\\n    ( (This)->lpVtbl -> AddRef(This) ) \n\n#define IPropertyStoreCache_Release(This)\t\\\n    ( (This)->lpVtbl -> Release(This) ) \n\n\n#define IPropertyStoreCache_GetCount(This,cProps)\t\\\n    ( (This)->lpVtbl -> GetCount(This,cProps) ) \n\n#define IPropertyStoreCache_GetAt(This,iProp,pkey)\t\\\n    ( (This)->lpVtbl -> GetAt(This,iProp,pkey) ) \n\n#define IPropertyStoreCache_GetValue(This,key,pv)\t\\\n    ( (This)->lpVtbl -> GetValue(This,key,pv) ) \n\n#define IPropertyStoreCache_SetValue(This,key,propvar)\t\\\n    ( (This)->lpVtbl -> SetValue(This,key,propvar) ) \n\n#define IPropertyStoreCache_Commit(This)\t\\\n    ( (This)->lpVtbl -> Commit(This) ) \n\n\n#define IPropertyStoreCache_GetState(This,key,pstate)\t\\\n    ( (This)->lpVtbl -> GetState(This,key,pstate) ) \n\n#define IPropertyStoreCache_GetValueAndState(This,key,ppropvar,pstate)\t\\\n    ( (This)->lpVtbl -> GetValueAndState(This,key,ppropvar,pstate) ) \n\n#define IPropertyStoreCache_SetState(This,key,state)\t\\\n    ( (This)->lpVtbl -> SetState(This,key,state) ) \n\n#define IPropertyStoreCache_SetValueAndState(This,key,ppropvar,state)\t\\\n    ( (This)->lpVtbl -> SetValueAndState(This,key,ppropvar,state) ) \n\n#endif /* COBJMACROS */\n\n\n#endif \t/* C style interface */\n\n\n\n\n#endif \t/* __IPropertyStoreCache_INTERFACE_DEFINED__ */\n\n\n#ifndef __IPropertyEnumType_INTERFACE_DEFINED__\n#define __IPropertyEnumType_INTERFACE_DEFINED__\n\n/* interface IPropertyEnumType */\n/* [unique][object][uuid] */ \n\n/* [v1_enum] */ \nenum tagPROPENUMTYPE\n    {\tPET_DISCRETEVALUE\t= 0,\n\tPET_RANGEDVALUE\t= 1,\n\tPET_DEFAULTVALUE\t= 2,\n\tPET_ENDRANGE\t= 3\n    } ;\ntypedef enum tagPROPENUMTYPE PROPENUMTYPE;\n\n\nEXTERN_C const IID IID_IPropertyEnumType;\n\n#if defined(__cplusplus) && !defined(CINTERFACE)\n    \n    MIDL_INTERFACE(\"11e1fbf9-2d56-4a6b-8db3-7cd193a471f2\")\n    IPropertyEnumType : public IUnknown\n    {\n    public:\n        virtual HRESULT STDMETHODCALLTYPE GetEnumType( \n            /* [out] */ __RPC__out PROPENUMTYPE *penumtype) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE GetValue( \n            /* [out] */ __RPC__out PROPVARIANT *ppropvar) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE GetRangeMinValue( \n            /* [out] */ __RPC__out PROPVARIANT *ppropvarMin) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE GetRangeSetValue( \n            /* [out] */ __RPC__out PROPVARIANT *ppropvarSet) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE GetDisplayText( \n            /* [out] */ __RPC__deref_out_opt LPWSTR *ppszDisplay) = 0;\n        \n    };\n    \n#else \t/* C style interface */\n\n    typedef struct IPropertyEnumTypeVtbl\n    {\n        BEGIN_INTERFACE\n        \n        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \n            IPropertyEnumType * This,\n            /* [in] */ __RPC__in REFIID riid,\n            /* [iid_is][out] */ \n            __RPC__deref_out  void **ppvObject);\n        \n        ULONG ( STDMETHODCALLTYPE *AddRef )( \n            IPropertyEnumType * This);\n        \n        ULONG ( STDMETHODCALLTYPE *Release )( \n            IPropertyEnumType * This);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetEnumType )( \n            IPropertyEnumType * This,\n            /* [out] */ __RPC__out PROPENUMTYPE *penumtype);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetValue )( \n            IPropertyEnumType * This,\n            /* [out] */ __RPC__out PROPVARIANT *ppropvar);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetRangeMinValue )( \n            IPropertyEnumType * This,\n            /* [out] */ __RPC__out PROPVARIANT *ppropvarMin);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetRangeSetValue )( \n            IPropertyEnumType * This,\n            /* [out] */ __RPC__out PROPVARIANT *ppropvarSet);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetDisplayText )( \n            IPropertyEnumType * This,\n            /* [out] */ __RPC__deref_out_opt LPWSTR *ppszDisplay);\n        \n        END_INTERFACE\n    } IPropertyEnumTypeVtbl;\n\n    interface IPropertyEnumType\n    {\n        CONST_VTBL struct IPropertyEnumTypeVtbl *lpVtbl;\n    };\n\n    \n\n#ifdef COBJMACROS\n\n\n#define IPropertyEnumType_QueryInterface(This,riid,ppvObject)\t\\\n    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \n\n#define IPropertyEnumType_AddRef(This)\t\\\n    ( (This)->lpVtbl -> AddRef(This) ) \n\n#define IPropertyEnumType_Release(This)\t\\\n    ( (This)->lpVtbl -> Release(This) ) \n\n\n#define IPropertyEnumType_GetEnumType(This,penumtype)\t\\\n    ( (This)->lpVtbl -> GetEnumType(This,penumtype) ) \n\n#define IPropertyEnumType_GetValue(This,ppropvar)\t\\\n    ( (This)->lpVtbl -> GetValue(This,ppropvar) ) \n\n#define IPropertyEnumType_GetRangeMinValue(This,ppropvarMin)\t\\\n    ( (This)->lpVtbl -> GetRangeMinValue(This,ppropvarMin) ) \n\n#define IPropertyEnumType_GetRangeSetValue(This,ppropvarSet)\t\\\n    ( (This)->lpVtbl -> GetRangeSetValue(This,ppropvarSet) ) \n\n#define IPropertyEnumType_GetDisplayText(This,ppszDisplay)\t\\\n    ( (This)->lpVtbl -> GetDisplayText(This,ppszDisplay) ) \n\n#endif /* COBJMACROS */\n\n\n#endif \t/* C style interface */\n\n\n\n\n#endif \t/* __IPropertyEnumType_INTERFACE_DEFINED__ */\n\n\n#ifndef __IPropertyEnumTypeList_INTERFACE_DEFINED__\n#define __IPropertyEnumTypeList_INTERFACE_DEFINED__\n\n/* interface IPropertyEnumTypeList */\n/* [unique][object][uuid] */ \n\n\nEXTERN_C const IID IID_IPropertyEnumTypeList;\n\n#if defined(__cplusplus) && !defined(CINTERFACE)\n    \n    MIDL_INTERFACE(\"a99400f4-3d84-4557-94ba-1242fb2cc9a6\")\n    IPropertyEnumTypeList : public IUnknown\n    {\n    public:\n        virtual HRESULT STDMETHODCALLTYPE GetCount( \n            /* [out] */ __RPC__out UINT *pctypes) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE GetAt( \n            /* [in] */ UINT itype,\n            /* [in] */ __RPC__in REFIID riid,\n            /* [iid_is][out] */ __RPC__deref_out_opt void **ppv) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE GetConditionAt( \n            /* [in] */ UINT nIndex,\n            /* [in] */ __RPC__in REFIID riid,\n            /* [iid_is][out] */ __RPC__deref_out_opt void **ppv) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE FindMatchingIndex( \n            /* [in] */ __RPC__in REFPROPVARIANT propvarCmp,\n            /* [out] */ __RPC__out UINT *pnIndex) = 0;\n        \n    };\n    \n#else \t/* C style interface */\n\n    typedef struct IPropertyEnumTypeListVtbl\n    {\n        BEGIN_INTERFACE\n        \n        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \n            IPropertyEnumTypeList * This,\n            /* [in] */ __RPC__in REFIID riid,\n            /* [iid_is][out] */ \n            __RPC__deref_out  void **ppvObject);\n        \n        ULONG ( STDMETHODCALLTYPE *AddRef )( \n            IPropertyEnumTypeList * This);\n        \n        ULONG ( STDMETHODCALLTYPE *Release )( \n            IPropertyEnumTypeList * This);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetCount )( \n            IPropertyEnumTypeList * This,\n            /* [out] */ __RPC__out UINT *pctypes);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetAt )( \n            IPropertyEnumTypeList * This,\n            /* [in] */ UINT itype,\n            /* [in] */ __RPC__in REFIID riid,\n            /* [iid_is][out] */ __RPC__deref_out_opt void **ppv);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetConditionAt )( \n            IPropertyEnumTypeList * This,\n            /* [in] */ UINT nIndex,\n            /* [in] */ __RPC__in REFIID riid,\n            /* [iid_is][out] */ __RPC__deref_out_opt void **ppv);\n        \n        HRESULT ( STDMETHODCALLTYPE *FindMatchingIndex )( \n            IPropertyEnumTypeList * This,\n            /* [in] */ __RPC__in REFPROPVARIANT propvarCmp,\n            /* [out] */ __RPC__out UINT *pnIndex);\n        \n        END_INTERFACE\n    } IPropertyEnumTypeListVtbl;\n\n    interface IPropertyEnumTypeList\n    {\n        CONST_VTBL struct IPropertyEnumTypeListVtbl *lpVtbl;\n    };\n\n    \n\n#ifdef COBJMACROS\n\n\n#define IPropertyEnumTypeList_QueryInterface(This,riid,ppvObject)\t\\\n    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \n\n#define IPropertyEnumTypeList_AddRef(This)\t\\\n    ( (This)->lpVtbl -> AddRef(This) ) \n\n#define IPropertyEnumTypeList_Release(This)\t\\\n    ( (This)->lpVtbl -> Release(This) ) \n\n\n#define IPropertyEnumTypeList_GetCount(This,pctypes)\t\\\n    ( (This)->lpVtbl -> GetCount(This,pctypes) ) \n\n#define IPropertyEnumTypeList_GetAt(This,itype,riid,ppv)\t\\\n    ( (This)->lpVtbl -> GetAt(This,itype,riid,ppv) ) \n\n#define IPropertyEnumTypeList_GetConditionAt(This,nIndex,riid,ppv)\t\\\n    ( (This)->lpVtbl -> GetConditionAt(This,nIndex,riid,ppv) ) \n\n#define IPropertyEnumTypeList_FindMatchingIndex(This,propvarCmp,pnIndex)\t\\\n    ( (This)->lpVtbl -> FindMatchingIndex(This,propvarCmp,pnIndex) ) \n\n#endif /* COBJMACROS */\n\n\n#endif \t/* C style interface */\n\n\n\n\n#endif \t/* __IPropertyEnumTypeList_INTERFACE_DEFINED__ */\n\n\n#ifndef __IPropertyDescription_INTERFACE_DEFINED__\n#define __IPropertyDescription_INTERFACE_DEFINED__\n\n/* interface IPropertyDescription */\n/* [unique][object][uuid] */ \n\n/* [v1_enum] */ \nenum tagPROPDESC_TYPE_FLAGS\n    {\tPDTF_DEFAULT\t= 0,\n\tPDTF_MULTIPLEVALUES\t= 0x1,\n\tPDTF_ISINNATE\t= 0x2,\n\tPDTF_ISGROUP\t= 0x4,\n\tPDTF_CANGROUPBY\t= 0x8,\n\tPDTF_CANSTACKBY\t= 0x10,\n\tPDTF_ISTREEPROPERTY\t= 0x20,\n\tPDTF_INCLUDEINFULLTEXTQUERY\t= 0x40,\n\tPDTF_ISVIEWABLE\t= 0x80,\n\tPDTF_ISQUERYABLE\t= 0x100,\n\tPDTF_ISSYSTEMPROPERTY\t= 0x80000000,\n\tPDTF_MASK_ALL\t= 0x800001ff\n    } ;\ntypedef int PROPDESC_TYPE_FLAGS;\n\n/* [v1_enum] */ \nenum tagPROPDESC_VIEW_FLAGS\n    {\tPDVF_DEFAULT\t= 0,\n\tPDVF_CENTERALIGN\t= 0x1,\n\tPDVF_RIGHTALIGN\t= 0x2,\n\tPDVF_BEGINNEWGROUP\t= 0x4,\n\tPDVF_FILLAREA\t= 0x8,\n\tPDVF_SORTDESCENDING\t= 0x10,\n\tPDVF_SHOWONLYIFPRESENT\t= 0x20,\n\tPDVF_SHOWBYDEFAULT\t= 0x40,\n\tPDVF_SHOWINPRIMARYLIST\t= 0x80,\n\tPDVF_SHOWINSECONDARYLIST\t= 0x100,\n\tPDVF_HIDELABEL\t= 0x200,\n\tPDVF_HIDDEN\t= 0x800,\n\tPDVF_CANWRAP\t= 0x1000,\n\tPDVF_MASK_ALL\t= 0x1bff\n    } ;\ntypedef int PROPDESC_VIEW_FLAGS;\n\n/* [v1_enum] */ \nenum tagPROPDESC_DISPLAYTYPE\n    {\tPDDT_STRING\t= 0,\n\tPDDT_NUMBER\t= 1,\n\tPDDT_BOOLEAN\t= 2,\n\tPDDT_DATETIME\t= 3,\n\tPDDT_ENUMERATED\t= 4\n    } ;\ntypedef enum tagPROPDESC_DISPLAYTYPE PROPDESC_DISPLAYTYPE;\n\n/* [v1_enum] */ \nenum tagPROPDESC_GROUPING_RANGE\n    {\tPDGR_DISCRETE\t= 0,\n\tPDGR_ALPHANUMERIC\t= 1,\n\tPDGR_SIZE\t= 2,\n\tPDGR_DYNAMIC\t= 3,\n\tPDGR_DATE\t= 4,\n\tPDGR_PERCENT\t= 5,\n\tPDGR_ENUMERATED\t= 6\n    } ;\ntypedef enum tagPROPDESC_GROUPING_RANGE PROPDESC_GROUPING_RANGE;\n\n/* [v1_enum] */ \nenum tagPROPDESC_FORMAT_FLAGS\n    {\tPDFF_DEFAULT\t= 0,\n\tPDFF_PREFIXNAME\t= 0x1,\n\tPDFF_FILENAME\t= 0x2,\n\tPDFF_ALWAYSKB\t= 0x4,\n\tPDFF_RESERVED_RIGHTTOLEFT\t= 0x8,\n\tPDFF_SHORTTIME\t= 0x10,\n\tPDFF_LONGTIME\t= 0x20,\n\tPDFF_HIDETIME\t= 0x40,\n\tPDFF_SHORTDATE\t= 0x80,\n\tPDFF_LONGDATE\t= 0x100,\n\tPDFF_HIDEDATE\t= 0x200,\n\tPDFF_RELATIVEDATE\t= 0x400,\n\tPDFF_USEEDITINVITATION\t= 0x800,\n\tPDFF_READONLY\t= 0x1000,\n\tPDFF_NOAUTOREADINGORDER\t= 0x2000\n    } ;\ntypedef int PROPDESC_FORMAT_FLAGS;\n\n/* [v1_enum] */ \nenum tagPROPDESC_SORTDESCRIPTION\n    {\tPDSD_GENERAL\t= 0,\n\tPDSD_A_Z\t= 1,\n\tPDSD_LOWEST_HIGHEST\t= 2,\n\tPDSD_SMALLEST_BIGGEST\t= 3,\n\tPDSD_OLDEST_NEWEST\t= 4\n    } ;\ntypedef enum tagPROPDESC_SORTDESCRIPTION PROPDESC_SORTDESCRIPTION;\n\n/* [v1_enum] */ \nenum tagPROPDESC_RELATIVEDESCRIPTION_TYPE\n    {\tPDRDT_GENERAL\t= 0,\n\tPDRDT_DATE\t= 1,\n\tPDRDT_SIZE\t= 2,\n\tPDRDT_COUNT\t= 3,\n\tPDRDT_REVISION\t= 4,\n\tPDRDT_LENGTH\t= 5,\n\tPDRDT_DURATION\t= 6,\n\tPDRDT_SPEED\t= 7,\n\tPDRDT_RATE\t= 8,\n\tPDRDT_RATING\t= 9,\n\tPDRDT_PRIORITY\t= 10\n    } ;\ntypedef enum tagPROPDESC_RELATIVEDESCRIPTION_TYPE PROPDESC_RELATIVEDESCRIPTION_TYPE;\n\n/* [v1_enum] */ \nenum tagPROPDESC_AGGREGATION_TYPE\n    {\tPDAT_DEFAULT\t= 0,\n\tPDAT_FIRST\t= 1,\n\tPDAT_SUM\t= 2,\n\tPDAT_AVERAGE\t= 3,\n\tPDAT_DATERANGE\t= 4,\n\tPDAT_UNION\t= 5,\n\tPDAT_MAX\t= 6,\n\tPDAT_MIN\t= 7\n    } ;\ntypedef enum tagPROPDESC_AGGREGATION_TYPE PROPDESC_AGGREGATION_TYPE;\n\n/* [v1_enum] */ \nenum tagPROPDESC_CONDITION_TYPE\n    {\tPDCOT_NONE\t= 0,\n\tPDCOT_STRING\t= 1,\n\tPDCOT_SIZE\t= 2,\n\tPDCOT_DATETIME\t= 3,\n\tPDCOT_BOOLEAN\t= 4,\n\tPDCOT_NUMBER\t= 5\n    } ;\ntypedef enum tagPROPDESC_CONDITION_TYPE PROPDESC_CONDITION_TYPE;\n\n\nEXTERN_C const IID IID_IPropertyDescription;\n\n#if defined(__cplusplus) && !defined(CINTERFACE)\n    \n    MIDL_INTERFACE(\"6f79d558-3e96-4549-a1d1-7d75d2288814\")\n    IPropertyDescription : public IUnknown\n    {\n    public:\n        virtual HRESULT STDMETHODCALLTYPE GetPropertyKey( \n            /* [out] */ __RPC__out PROPERTYKEY *pkey) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE GetCanonicalName( \n            /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszName) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE GetPropertyType( \n            /* [out] */ __RPC__out VARTYPE *pvartype) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE GetDisplayName( \n            /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszName) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE GetEditInvitation( \n            /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszInvite) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE GetTypeFlags( \n            /* [in] */ PROPDESC_TYPE_FLAGS mask,\n            /* [out] */ __RPC__out PROPDESC_TYPE_FLAGS *ppdtFlags) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE GetViewFlags( \n            /* [out] */ __RPC__out PROPDESC_VIEW_FLAGS *ppdvFlags) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE GetDefaultColumnWidth( \n            /* [out] */ __RPC__out UINT *pcxChars) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE GetDisplayType( \n            /* [out] */ __RPC__out PROPDESC_DISPLAYTYPE *pdisplaytype) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE GetColumnState( \n            /* [out] */ __RPC__out SHCOLSTATEF *pcsFlags) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE GetGroupingRange( \n            /* [out] */ __RPC__out PROPDESC_GROUPING_RANGE *pgr) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE GetRelativeDescriptionType( \n            /* [out] */ __RPC__out PROPDESC_RELATIVEDESCRIPTION_TYPE *prdt) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE GetRelativeDescription( \n            /* [in] */ __RPC__in REFPROPVARIANT propvar1,\n            /* [in] */ __RPC__in REFPROPVARIANT propvar2,\n            /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszDesc1,\n            /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszDesc2) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE GetSortDescription( \n            /* [out] */ __RPC__out PROPDESC_SORTDESCRIPTION *psd) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE GetSortDescriptionLabel( \n            /* [in] */ BOOL fDescending,\n            /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszDescription) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE GetAggregationType( \n            /* [out] */ __RPC__out PROPDESC_AGGREGATION_TYPE *paggtype) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE GetConditionType( \n            /* [out] */ __RPC__out PROPDESC_CONDITION_TYPE *pcontype,\n            /* [out] */ __RPC__out CONDITION_OPERATION *popDefault) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE GetEnumTypeList( \n            /* [in] */ __RPC__in REFIID riid,\n            /* [iid_is][out] */ __RPC__deref_out_opt void **ppv) = 0;\n        \n        virtual /* [local] */ HRESULT STDMETHODCALLTYPE CoerceToCanonicalValue( \n            /* [out][in] */ PROPVARIANT *ppropvar) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE FormatForDisplay( \n            /* [in] */ __RPC__in REFPROPVARIANT propvar,\n            /* [in] */ PROPDESC_FORMAT_FLAGS pdfFlags,\n            /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszDisplay) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE IsValueCanonical( \n            /* [in] */ __RPC__in REFPROPVARIANT propvar) = 0;\n        \n    };\n    \n#else \t/* C style interface */\n\n    typedef struct IPropertyDescriptionVtbl\n    {\n        BEGIN_INTERFACE\n        \n        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \n            IPropertyDescription * This,\n            /* [in] */ __RPC__in REFIID riid,\n            /* [iid_is][out] */ \n            __RPC__deref_out  void **ppvObject);\n        \n        ULONG ( STDMETHODCALLTYPE *AddRef )( \n            IPropertyDescription * This);\n        \n        ULONG ( STDMETHODCALLTYPE *Release )( \n            IPropertyDescription * This);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetPropertyKey )( \n            IPropertyDescription * This,\n            /* [out] */ __RPC__out PROPERTYKEY *pkey);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetCanonicalName )( \n            IPropertyDescription * This,\n            /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszName);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetPropertyType )( \n            IPropertyDescription * This,\n            /* [out] */ __RPC__out VARTYPE *pvartype);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetDisplayName )( \n            IPropertyDescription * This,\n            /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszName);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetEditInvitation )( \n            IPropertyDescription * This,\n            /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszInvite);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetTypeFlags )( \n            IPropertyDescription * This,\n            /* [in] */ PROPDESC_TYPE_FLAGS mask,\n            /* [out] */ __RPC__out PROPDESC_TYPE_FLAGS *ppdtFlags);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetViewFlags )( \n            IPropertyDescription * This,\n            /* [out] */ __RPC__out PROPDESC_VIEW_FLAGS *ppdvFlags);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetDefaultColumnWidth )( \n            IPropertyDescription * This,\n            /* [out] */ __RPC__out UINT *pcxChars);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetDisplayType )( \n            IPropertyDescription * This,\n            /* [out] */ __RPC__out PROPDESC_DISPLAYTYPE *pdisplaytype);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetColumnState )( \n            IPropertyDescription * This,\n            /* [out] */ __RPC__out SHCOLSTATEF *pcsFlags);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetGroupingRange )( \n            IPropertyDescription * This,\n            /* [out] */ __RPC__out PROPDESC_GROUPING_RANGE *pgr);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetRelativeDescriptionType )( \n            IPropertyDescription * This,\n            /* [out] */ __RPC__out PROPDESC_RELATIVEDESCRIPTION_TYPE *prdt);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetRelativeDescription )( \n            IPropertyDescription * This,\n            /* [in] */ __RPC__in REFPROPVARIANT propvar1,\n            /* [in] */ __RPC__in REFPROPVARIANT propvar2,\n            /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszDesc1,\n            /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszDesc2);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetSortDescription )( \n            IPropertyDescription * This,\n            /* [out] */ __RPC__out PROPDESC_SORTDESCRIPTION *psd);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetSortDescriptionLabel )( \n            IPropertyDescription * This,\n            /* [in] */ BOOL fDescending,\n            /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszDescription);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetAggregationType )( \n            IPropertyDescription * This,\n            /* [out] */ __RPC__out PROPDESC_AGGREGATION_TYPE *paggtype);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetConditionType )( \n            IPropertyDescription * This,\n            /* [out] */ __RPC__out PROPDESC_CONDITION_TYPE *pcontype,\n            /* [out] */ __RPC__out CONDITION_OPERATION *popDefault);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetEnumTypeList )( \n            IPropertyDescription * This,\n            /* [in] */ __RPC__in REFIID riid,\n            /* [iid_is][out] */ __RPC__deref_out_opt void **ppv);\n        \n        /* [local] */ HRESULT ( STDMETHODCALLTYPE *CoerceToCanonicalValue )( \n            IPropertyDescription * This,\n            /* [out][in] */ PROPVARIANT *ppropvar);\n        \n        HRESULT ( STDMETHODCALLTYPE *FormatForDisplay )( \n            IPropertyDescription * This,\n            /* [in] */ __RPC__in REFPROPVARIANT propvar,\n            /* [in] */ PROPDESC_FORMAT_FLAGS pdfFlags,\n            /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszDisplay);\n        \n        HRESULT ( STDMETHODCALLTYPE *IsValueCanonical )( \n            IPropertyDescription * This,\n            /* [in] */ __RPC__in REFPROPVARIANT propvar);\n        \n        END_INTERFACE\n    } IPropertyDescriptionVtbl;\n\n    interface IPropertyDescription\n    {\n        CONST_VTBL struct IPropertyDescriptionVtbl *lpVtbl;\n    };\n\n    \n\n#ifdef COBJMACROS\n\n\n#define IPropertyDescription_QueryInterface(This,riid,ppvObject)\t\\\n    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \n\n#define IPropertyDescription_AddRef(This)\t\\\n    ( (This)->lpVtbl -> AddRef(This) ) \n\n#define IPropertyDescription_Release(This)\t\\\n    ( (This)->lpVtbl -> Release(This) ) \n\n\n#define IPropertyDescription_GetPropertyKey(This,pkey)\t\\\n    ( (This)->lpVtbl -> GetPropertyKey(This,pkey) ) \n\n#define IPropertyDescription_GetCanonicalName(This,ppszName)\t\\\n    ( (This)->lpVtbl -> GetCanonicalName(This,ppszName) ) \n\n#define IPropertyDescription_GetPropertyType(This,pvartype)\t\\\n    ( (This)->lpVtbl -> GetPropertyType(This,pvartype) ) \n\n#define IPropertyDescription_GetDisplayName(This,ppszName)\t\\\n    ( (This)->lpVtbl -> GetDisplayName(This,ppszName) ) \n\n#define IPropertyDescription_GetEditInvitation(This,ppszInvite)\t\\\n    ( (This)->lpVtbl -> GetEditInvitation(This,ppszInvite) ) \n\n#define IPropertyDescription_GetTypeFlags(This,mask,ppdtFlags)\t\\\n    ( (This)->lpVtbl -> GetTypeFlags(This,mask,ppdtFlags) ) \n\n#define IPropertyDescription_GetViewFlags(This,ppdvFlags)\t\\\n    ( (This)->lpVtbl -> GetViewFlags(This,ppdvFlags) ) \n\n#define IPropertyDescription_GetDefaultColumnWidth(This,pcxChars)\t\\\n    ( (This)->lpVtbl -> GetDefaultColumnWidth(This,pcxChars) ) \n\n#define IPropertyDescription_GetDisplayType(This,pdisplaytype)\t\\\n    ( (This)->lpVtbl -> GetDisplayType(This,pdisplaytype) ) \n\n#define IPropertyDescription_GetColumnState(This,pcsFlags)\t\\\n    ( (This)->lpVtbl -> GetColumnState(This,pcsFlags) ) \n\n#define IPropertyDescription_GetGroupingRange(This,pgr)\t\\\n    ( (This)->lpVtbl -> GetGroupingRange(This,pgr) ) \n\n#define IPropertyDescription_GetRelativeDescriptionType(This,prdt)\t\\\n    ( (This)->lpVtbl -> GetRelativeDescriptionType(This,prdt) ) \n\n#define IPropertyDescription_GetRelativeDescription(This,propvar1,propvar2,ppszDesc1,ppszDesc2)\t\\\n    ( (This)->lpVtbl -> GetRelativeDescription(This,propvar1,propvar2,ppszDesc1,ppszDesc2) ) \n\n#define IPropertyDescription_GetSortDescription(This,psd)\t\\\n    ( (This)->lpVtbl -> GetSortDescription(This,psd) ) \n\n#define IPropertyDescription_GetSortDescriptionLabel(This,fDescending,ppszDescription)\t\\\n    ( (This)->lpVtbl -> GetSortDescriptionLabel(This,fDescending,ppszDescription) ) \n\n#define IPropertyDescription_GetAggregationType(This,paggtype)\t\\\n    ( (This)->lpVtbl -> GetAggregationType(This,paggtype) ) \n\n#define IPropertyDescription_GetConditionType(This,pcontype,popDefault)\t\\\n    ( (This)->lpVtbl -> GetConditionType(This,pcontype,popDefault) ) \n\n#define IPropertyDescription_GetEnumTypeList(This,riid,ppv)\t\\\n    ( (This)->lpVtbl -> GetEnumTypeList(This,riid,ppv) ) \n\n#define IPropertyDescription_CoerceToCanonicalValue(This,ppropvar)\t\\\n    ( (This)->lpVtbl -> CoerceToCanonicalValue(This,ppropvar) ) \n\n#define IPropertyDescription_FormatForDisplay(This,propvar,pdfFlags,ppszDisplay)\t\\\n    ( (This)->lpVtbl -> FormatForDisplay(This,propvar,pdfFlags,ppszDisplay) ) \n\n#define IPropertyDescription_IsValueCanonical(This,propvar)\t\\\n    ( (This)->lpVtbl -> IsValueCanonical(This,propvar) ) \n\n#endif /* COBJMACROS */\n\n\n#endif \t/* C style interface */\n\n\n\n/* [call_as] */ HRESULT STDMETHODCALLTYPE IPropertyDescription_RemoteCoerceToCanonicalValue_Proxy( \n    IPropertyDescription * This,\n    /* [in] */ __RPC__in REFPROPVARIANT propvar,\n    /* [out] */ __RPC__out PROPVARIANT *ppropvar);\n\n\nvoid __RPC_STUB IPropertyDescription_RemoteCoerceToCanonicalValue_Stub(\n    IRpcStubBuffer *This,\n    IRpcChannelBuffer *_pRpcChannelBuffer,\n    PRPC_MESSAGE _pRpcMessage,\n    DWORD *_pdwStubPhase);\n\n\n\n#endif \t/* __IPropertyDescription_INTERFACE_DEFINED__ */\n\n\n#ifndef __IPropertyDescriptionAliasInfo_INTERFACE_DEFINED__\n#define __IPropertyDescriptionAliasInfo_INTERFACE_DEFINED__\n\n/* interface IPropertyDescriptionAliasInfo */\n/* [unique][object][uuid] */ \n\n\nEXTERN_C const IID IID_IPropertyDescriptionAliasInfo;\n\n#if defined(__cplusplus) && !defined(CINTERFACE)\n    \n    MIDL_INTERFACE(\"f67104fc-2af9-46fd-b32d-243c1404f3d1\")\n    IPropertyDescriptionAliasInfo : public IPropertyDescription\n    {\n    public:\n        virtual HRESULT STDMETHODCALLTYPE GetSortByAlias( \n            /* [in] */ __RPC__in REFIID riid,\n            /* [iid_is][out] */ __RPC__deref_out_opt void **ppv) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE GetAdditionalSortByAliases( \n            /* [in] */ __RPC__in REFIID riid,\n            /* [iid_is][out] */ __RPC__deref_out_opt void **ppv) = 0;\n        \n    };\n    \n#else \t/* C style interface */\n\n    typedef struct IPropertyDescriptionAliasInfoVtbl\n    {\n        BEGIN_INTERFACE\n        \n        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \n            IPropertyDescriptionAliasInfo * This,\n            /* [in] */ __RPC__in REFIID riid,\n            /* [iid_is][out] */ \n            __RPC__deref_out  void **ppvObject);\n        \n        ULONG ( STDMETHODCALLTYPE *AddRef )( \n            IPropertyDescriptionAliasInfo * This);\n        \n        ULONG ( STDMETHODCALLTYPE *Release )( \n            IPropertyDescriptionAliasInfo * This);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetPropertyKey )( \n            IPropertyDescriptionAliasInfo * This,\n            /* [out] */ __RPC__out PROPERTYKEY *pkey);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetCanonicalName )( \n            IPropertyDescriptionAliasInfo * This,\n            /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszName);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetPropertyType )( \n            IPropertyDescriptionAliasInfo * This,\n            /* [out] */ __RPC__out VARTYPE *pvartype);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetDisplayName )( \n            IPropertyDescriptionAliasInfo * This,\n            /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszName);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetEditInvitation )( \n            IPropertyDescriptionAliasInfo * This,\n            /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszInvite);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetTypeFlags )( \n            IPropertyDescriptionAliasInfo * This,\n            /* [in] */ PROPDESC_TYPE_FLAGS mask,\n            /* [out] */ __RPC__out PROPDESC_TYPE_FLAGS *ppdtFlags);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetViewFlags )( \n            IPropertyDescriptionAliasInfo * This,\n            /* [out] */ __RPC__out PROPDESC_VIEW_FLAGS *ppdvFlags);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetDefaultColumnWidth )( \n            IPropertyDescriptionAliasInfo * This,\n            /* [out] */ __RPC__out UINT *pcxChars);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetDisplayType )( \n            IPropertyDescriptionAliasInfo * This,\n            /* [out] */ __RPC__out PROPDESC_DISPLAYTYPE *pdisplaytype);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetColumnState )( \n            IPropertyDescriptionAliasInfo * This,\n            /* [out] */ __RPC__out SHCOLSTATEF *pcsFlags);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetGroupingRange )( \n            IPropertyDescriptionAliasInfo * This,\n            /* [out] */ __RPC__out PROPDESC_GROUPING_RANGE *pgr);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetRelativeDescriptionType )( \n            IPropertyDescriptionAliasInfo * This,\n            /* [out] */ __RPC__out PROPDESC_RELATIVEDESCRIPTION_TYPE *prdt);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetRelativeDescription )( \n            IPropertyDescriptionAliasInfo * This,\n            /* [in] */ __RPC__in REFPROPVARIANT propvar1,\n            /* [in] */ __RPC__in REFPROPVARIANT propvar2,\n            /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszDesc1,\n            /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszDesc2);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetSortDescription )( \n            IPropertyDescriptionAliasInfo * This,\n            /* [out] */ __RPC__out PROPDESC_SORTDESCRIPTION *psd);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetSortDescriptionLabel )( \n            IPropertyDescriptionAliasInfo * This,\n            /* [in] */ BOOL fDescending,\n            /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszDescription);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetAggregationType )( \n            IPropertyDescriptionAliasInfo * This,\n            /* [out] */ __RPC__out PROPDESC_AGGREGATION_TYPE *paggtype);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetConditionType )( \n            IPropertyDescriptionAliasInfo * This,\n            /* [out] */ __RPC__out PROPDESC_CONDITION_TYPE *pcontype,\n            /* [out] */ __RPC__out CONDITION_OPERATION *popDefault);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetEnumTypeList )( \n            IPropertyDescriptionAliasInfo * This,\n            /* [in] */ __RPC__in REFIID riid,\n            /* [iid_is][out] */ __RPC__deref_out_opt void **ppv);\n        \n        /* [local] */ HRESULT ( STDMETHODCALLTYPE *CoerceToCanonicalValue )( \n            IPropertyDescriptionAliasInfo * This,\n            /* [out][in] */ PROPVARIANT *ppropvar);\n        \n        HRESULT ( STDMETHODCALLTYPE *FormatForDisplay )( \n            IPropertyDescriptionAliasInfo * This,\n            /* [in] */ __RPC__in REFPROPVARIANT propvar,\n            /* [in] */ PROPDESC_FORMAT_FLAGS pdfFlags,\n            /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszDisplay);\n        \n        HRESULT ( STDMETHODCALLTYPE *IsValueCanonical )( \n            IPropertyDescriptionAliasInfo * This,\n            /* [in] */ __RPC__in REFPROPVARIANT propvar);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetSortByAlias )( \n            IPropertyDescriptionAliasInfo * This,\n            /* [in] */ __RPC__in REFIID riid,\n            /* [iid_is][out] */ __RPC__deref_out_opt void **ppv);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetAdditionalSortByAliases )( \n            IPropertyDescriptionAliasInfo * This,\n            /* [in] */ __RPC__in REFIID riid,\n            /* [iid_is][out] */ __RPC__deref_out_opt void **ppv);\n        \n        END_INTERFACE\n    } IPropertyDescriptionAliasInfoVtbl;\n\n    interface IPropertyDescriptionAliasInfo\n    {\n        CONST_VTBL struct IPropertyDescriptionAliasInfoVtbl *lpVtbl;\n    };\n\n    \n\n#ifdef COBJMACROS\n\n\n#define IPropertyDescriptionAliasInfo_QueryInterface(This,riid,ppvObject)\t\\\n    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \n\n#define IPropertyDescriptionAliasInfo_AddRef(This)\t\\\n    ( (This)->lpVtbl -> AddRef(This) ) \n\n#define IPropertyDescriptionAliasInfo_Release(This)\t\\\n    ( (This)->lpVtbl -> Release(This) ) \n\n\n#define IPropertyDescriptionAliasInfo_GetPropertyKey(This,pkey)\t\\\n    ( (This)->lpVtbl -> GetPropertyKey(This,pkey) ) \n\n#define IPropertyDescriptionAliasInfo_GetCanonicalName(This,ppszName)\t\\\n    ( (This)->lpVtbl -> GetCanonicalName(This,ppszName) ) \n\n#define IPropertyDescriptionAliasInfo_GetPropertyType(This,pvartype)\t\\\n    ( (This)->lpVtbl -> GetPropertyType(This,pvartype) ) \n\n#define IPropertyDescriptionAliasInfo_GetDisplayName(This,ppszName)\t\\\n    ( (This)->lpVtbl -> GetDisplayName(This,ppszName) ) \n\n#define IPropertyDescriptionAliasInfo_GetEditInvitation(This,ppszInvite)\t\\\n    ( (This)->lpVtbl -> GetEditInvitation(This,ppszInvite) ) \n\n#define IPropertyDescriptionAliasInfo_GetTypeFlags(This,mask,ppdtFlags)\t\\\n    ( (This)->lpVtbl -> GetTypeFlags(This,mask,ppdtFlags) ) \n\n#define IPropertyDescriptionAliasInfo_GetViewFlags(This,ppdvFlags)\t\\\n    ( (This)->lpVtbl -> GetViewFlags(This,ppdvFlags) ) \n\n#define IPropertyDescriptionAliasInfo_GetDefaultColumnWidth(This,pcxChars)\t\\\n    ( (This)->lpVtbl -> GetDefaultColumnWidth(This,pcxChars) ) \n\n#define IPropertyDescriptionAliasInfo_GetDisplayType(This,pdisplaytype)\t\\\n    ( (This)->lpVtbl -> GetDisplayType(This,pdisplaytype) ) \n\n#define IPropertyDescriptionAliasInfo_GetColumnState(This,pcsFlags)\t\\\n    ( (This)->lpVtbl -> GetColumnState(This,pcsFlags) ) \n\n#define IPropertyDescriptionAliasInfo_GetGroupingRange(This,pgr)\t\\\n    ( (This)->lpVtbl -> GetGroupingRange(This,pgr) ) \n\n#define IPropertyDescriptionAliasInfo_GetRelativeDescriptionType(This,prdt)\t\\\n    ( (This)->lpVtbl -> GetRelativeDescriptionType(This,prdt) ) \n\n#define IPropertyDescriptionAliasInfo_GetRelativeDescription(This,propvar1,propvar2,ppszDesc1,ppszDesc2)\t\\\n    ( (This)->lpVtbl -> GetRelativeDescription(This,propvar1,propvar2,ppszDesc1,ppszDesc2) ) \n\n#define IPropertyDescriptionAliasInfo_GetSortDescription(This,psd)\t\\\n    ( (This)->lpVtbl -> GetSortDescription(This,psd) ) \n\n#define IPropertyDescriptionAliasInfo_GetSortDescriptionLabel(This,fDescending,ppszDescription)\t\\\n    ( (This)->lpVtbl -> GetSortDescriptionLabel(This,fDescending,ppszDescription) ) \n\n#define IPropertyDescriptionAliasInfo_GetAggregationType(This,paggtype)\t\\\n    ( (This)->lpVtbl -> GetAggregationType(This,paggtype) ) \n\n#define IPropertyDescriptionAliasInfo_GetConditionType(This,pcontype,popDefault)\t\\\n    ( (This)->lpVtbl -> GetConditionType(This,pcontype,popDefault) ) \n\n#define IPropertyDescriptionAliasInfo_GetEnumTypeList(This,riid,ppv)\t\\\n    ( (This)->lpVtbl -> GetEnumTypeList(This,riid,ppv) ) \n\n#define IPropertyDescriptionAliasInfo_CoerceToCanonicalValue(This,ppropvar)\t\\\n    ( (This)->lpVtbl -> CoerceToCanonicalValue(This,ppropvar) ) \n\n#define IPropertyDescriptionAliasInfo_FormatForDisplay(This,propvar,pdfFlags,ppszDisplay)\t\\\n    ( (This)->lpVtbl -> FormatForDisplay(This,propvar,pdfFlags,ppszDisplay) ) \n\n#define IPropertyDescriptionAliasInfo_IsValueCanonical(This,propvar)\t\\\n    ( (This)->lpVtbl -> IsValueCanonical(This,propvar) ) \n\n\n#define IPropertyDescriptionAliasInfo_GetSortByAlias(This,riid,ppv)\t\\\n    ( (This)->lpVtbl -> GetSortByAlias(This,riid,ppv) ) \n\n#define IPropertyDescriptionAliasInfo_GetAdditionalSortByAliases(This,riid,ppv)\t\\\n    ( (This)->lpVtbl -> GetAdditionalSortByAliases(This,riid,ppv) ) \n\n#endif /* COBJMACROS */\n\n\n#endif \t/* C style interface */\n\n\n\n\n#endif \t/* __IPropertyDescriptionAliasInfo_INTERFACE_DEFINED__ */\n\n\n#ifndef __IPropertyDescriptionSearchInfo_INTERFACE_DEFINED__\n#define __IPropertyDescriptionSearchInfo_INTERFACE_DEFINED__\n\n/* interface IPropertyDescriptionSearchInfo */\n/* [unique][object][uuid] */ \n\n/* [v1_enum] */ \nenum tagPROPDESC_SEARCHINFO_FLAGS\n    {\tPDSIF_DEFAULT\t= 0,\n\tPDSIF_ININVERTEDINDEX\t= 0x1,\n\tPDSIF_ISCOLUMN\t= 0x2,\n\tPDSIF_ISCOLUMNSPARSE\t= 0x4\n    } ;\ntypedef int PROPDESC_SEARCHINFO_FLAGS;\n\ntypedef /* [v1_enum] */ \nenum tagPROPDESC_COLUMNINDEX_TYPE\n    {\tPDCIT_NONE\t= 0,\n\tPDCIT_ONDISK\t= 1,\n\tPDCIT_INMEMORY\t= 2\n    } \tPROPDESC_COLUMNINDEX_TYPE;\n\n\nEXTERN_C const IID IID_IPropertyDescriptionSearchInfo;\n\n#if defined(__cplusplus) && !defined(CINTERFACE)\n    \n    MIDL_INTERFACE(\"078f91bd-29a2-440f-924e-46a291524520\")\n    IPropertyDescriptionSearchInfo : public IPropertyDescription\n    {\n    public:\n        virtual HRESULT STDMETHODCALLTYPE GetSearchInfoFlags( \n            /* [out] */ __RPC__out PROPDESC_SEARCHINFO_FLAGS *ppdsiFlags) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE GetColumnIndexType( \n            /* [out] */ __RPC__out PROPDESC_COLUMNINDEX_TYPE *ppdciType) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE GetProjectionString( \n            /* [out] */ __RPC__deref_out_opt LPWSTR *ppszProjection) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE GetMaxSize( \n            /* [out] */ __RPC__out UINT *pcbMaxSize) = 0;\n        \n    };\n    \n#else \t/* C style interface */\n\n    typedef struct IPropertyDescriptionSearchInfoVtbl\n    {\n        BEGIN_INTERFACE\n        \n        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \n            IPropertyDescriptionSearchInfo * This,\n            /* [in] */ __RPC__in REFIID riid,\n            /* [iid_is][out] */ \n            __RPC__deref_out  void **ppvObject);\n        \n        ULONG ( STDMETHODCALLTYPE *AddRef )( \n            IPropertyDescriptionSearchInfo * This);\n        \n        ULONG ( STDMETHODCALLTYPE *Release )( \n            IPropertyDescriptionSearchInfo * This);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetPropertyKey )( \n            IPropertyDescriptionSearchInfo * This,\n            /* [out] */ __RPC__out PROPERTYKEY *pkey);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetCanonicalName )( \n            IPropertyDescriptionSearchInfo * This,\n            /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszName);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetPropertyType )( \n            IPropertyDescriptionSearchInfo * This,\n            /* [out] */ __RPC__out VARTYPE *pvartype);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetDisplayName )( \n            IPropertyDescriptionSearchInfo * This,\n            /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszName);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetEditInvitation )( \n            IPropertyDescriptionSearchInfo * This,\n            /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszInvite);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetTypeFlags )( \n            IPropertyDescriptionSearchInfo * This,\n            /* [in] */ PROPDESC_TYPE_FLAGS mask,\n            /* [out] */ __RPC__out PROPDESC_TYPE_FLAGS *ppdtFlags);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetViewFlags )( \n            IPropertyDescriptionSearchInfo * This,\n            /* [out] */ __RPC__out PROPDESC_VIEW_FLAGS *ppdvFlags);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetDefaultColumnWidth )( \n            IPropertyDescriptionSearchInfo * This,\n            /* [out] */ __RPC__out UINT *pcxChars);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetDisplayType )( \n            IPropertyDescriptionSearchInfo * This,\n            /* [out] */ __RPC__out PROPDESC_DISPLAYTYPE *pdisplaytype);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetColumnState )( \n            IPropertyDescriptionSearchInfo * This,\n            /* [out] */ __RPC__out SHCOLSTATEF *pcsFlags);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetGroupingRange )( \n            IPropertyDescriptionSearchInfo * This,\n            /* [out] */ __RPC__out PROPDESC_GROUPING_RANGE *pgr);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetRelativeDescriptionType )( \n            IPropertyDescriptionSearchInfo * This,\n            /* [out] */ __RPC__out PROPDESC_RELATIVEDESCRIPTION_TYPE *prdt);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetRelativeDescription )( \n            IPropertyDescriptionSearchInfo * This,\n            /* [in] */ __RPC__in REFPROPVARIANT propvar1,\n            /* [in] */ __RPC__in REFPROPVARIANT propvar2,\n            /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszDesc1,\n            /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszDesc2);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetSortDescription )( \n            IPropertyDescriptionSearchInfo * This,\n            /* [out] */ __RPC__out PROPDESC_SORTDESCRIPTION *psd);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetSortDescriptionLabel )( \n            IPropertyDescriptionSearchInfo * This,\n            /* [in] */ BOOL fDescending,\n            /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszDescription);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetAggregationType )( \n            IPropertyDescriptionSearchInfo * This,\n            /* [out] */ __RPC__out PROPDESC_AGGREGATION_TYPE *paggtype);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetConditionType )( \n            IPropertyDescriptionSearchInfo * This,\n            /* [out] */ __RPC__out PROPDESC_CONDITION_TYPE *pcontype,\n            /* [out] */ __RPC__out CONDITION_OPERATION *popDefault);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetEnumTypeList )( \n            IPropertyDescriptionSearchInfo * This,\n            /* [in] */ __RPC__in REFIID riid,\n            /* [iid_is][out] */ __RPC__deref_out_opt void **ppv);\n        \n        /* [local] */ HRESULT ( STDMETHODCALLTYPE *CoerceToCanonicalValue )( \n            IPropertyDescriptionSearchInfo * This,\n            /* [out][in] */ PROPVARIANT *ppropvar);\n        \n        HRESULT ( STDMETHODCALLTYPE *FormatForDisplay )( \n            IPropertyDescriptionSearchInfo * This,\n            /* [in] */ __RPC__in REFPROPVARIANT propvar,\n            /* [in] */ PROPDESC_FORMAT_FLAGS pdfFlags,\n            /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszDisplay);\n        \n        HRESULT ( STDMETHODCALLTYPE *IsValueCanonical )( \n            IPropertyDescriptionSearchInfo * This,\n            /* [in] */ __RPC__in REFPROPVARIANT propvar);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetSearchInfoFlags )( \n            IPropertyDescriptionSearchInfo * This,\n            /* [out] */ __RPC__out PROPDESC_SEARCHINFO_FLAGS *ppdsiFlags);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetColumnIndexType )( \n            IPropertyDescriptionSearchInfo * This,\n            /* [out] */ __RPC__out PROPDESC_COLUMNINDEX_TYPE *ppdciType);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetProjectionString )( \n            IPropertyDescriptionSearchInfo * This,\n            /* [out] */ __RPC__deref_out_opt LPWSTR *ppszProjection);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetMaxSize )( \n            IPropertyDescriptionSearchInfo * This,\n            /* [out] */ __RPC__out UINT *pcbMaxSize);\n        \n        END_INTERFACE\n    } IPropertyDescriptionSearchInfoVtbl;\n\n    interface IPropertyDescriptionSearchInfo\n    {\n        CONST_VTBL struct IPropertyDescriptionSearchInfoVtbl *lpVtbl;\n    };\n\n    \n\n#ifdef COBJMACROS\n\n\n#define IPropertyDescriptionSearchInfo_QueryInterface(This,riid,ppvObject)\t\\\n    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \n\n#define IPropertyDescriptionSearchInfo_AddRef(This)\t\\\n    ( (This)->lpVtbl -> AddRef(This) ) \n\n#define IPropertyDescriptionSearchInfo_Release(This)\t\\\n    ( (This)->lpVtbl -> Release(This) ) \n\n\n#define IPropertyDescriptionSearchInfo_GetPropertyKey(This,pkey)\t\\\n    ( (This)->lpVtbl -> GetPropertyKey(This,pkey) ) \n\n#define IPropertyDescriptionSearchInfo_GetCanonicalName(This,ppszName)\t\\\n    ( (This)->lpVtbl -> GetCanonicalName(This,ppszName) ) \n\n#define IPropertyDescriptionSearchInfo_GetPropertyType(This,pvartype)\t\\\n    ( (This)->lpVtbl -> GetPropertyType(This,pvartype) ) \n\n#define IPropertyDescriptionSearchInfo_GetDisplayName(This,ppszName)\t\\\n    ( (This)->lpVtbl -> GetDisplayName(This,ppszName) ) \n\n#define IPropertyDescriptionSearchInfo_GetEditInvitation(This,ppszInvite)\t\\\n    ( (This)->lpVtbl -> GetEditInvitation(This,ppszInvite) ) \n\n#define IPropertyDescriptionSearchInfo_GetTypeFlags(This,mask,ppdtFlags)\t\\\n    ( (This)->lpVtbl -> GetTypeFlags(This,mask,ppdtFlags) ) \n\n#define IPropertyDescriptionSearchInfo_GetViewFlags(This,ppdvFlags)\t\\\n    ( (This)->lpVtbl -> GetViewFlags(This,ppdvFlags) ) \n\n#define IPropertyDescriptionSearchInfo_GetDefaultColumnWidth(This,pcxChars)\t\\\n    ( (This)->lpVtbl -> GetDefaultColumnWidth(This,pcxChars) ) \n\n#define IPropertyDescriptionSearchInfo_GetDisplayType(This,pdisplaytype)\t\\\n    ( (This)->lpVtbl -> GetDisplayType(This,pdisplaytype) ) \n\n#define IPropertyDescriptionSearchInfo_GetColumnState(This,pcsFlags)\t\\\n    ( (This)->lpVtbl -> GetColumnState(This,pcsFlags) ) \n\n#define IPropertyDescriptionSearchInfo_GetGroupingRange(This,pgr)\t\\\n    ( (This)->lpVtbl -> GetGroupingRange(This,pgr) ) \n\n#define IPropertyDescriptionSearchInfo_GetRelativeDescriptionType(This,prdt)\t\\\n    ( (This)->lpVtbl -> GetRelativeDescriptionType(This,prdt) ) \n\n#define IPropertyDescriptionSearchInfo_GetRelativeDescription(This,propvar1,propvar2,ppszDesc1,ppszDesc2)\t\\\n    ( (This)->lpVtbl -> GetRelativeDescription(This,propvar1,propvar2,ppszDesc1,ppszDesc2) ) \n\n#define IPropertyDescriptionSearchInfo_GetSortDescription(This,psd)\t\\\n    ( (This)->lpVtbl -> GetSortDescription(This,psd) ) \n\n#define IPropertyDescriptionSearchInfo_GetSortDescriptionLabel(This,fDescending,ppszDescription)\t\\\n    ( (This)->lpVtbl -> GetSortDescriptionLabel(This,fDescending,ppszDescription) ) \n\n#define IPropertyDescriptionSearchInfo_GetAggregationType(This,paggtype)\t\\\n    ( (This)->lpVtbl -> GetAggregationType(This,paggtype) ) \n\n#define IPropertyDescriptionSearchInfo_GetConditionType(This,pcontype,popDefault)\t\\\n    ( (This)->lpVtbl -> GetConditionType(This,pcontype,popDefault) ) \n\n#define IPropertyDescriptionSearchInfo_GetEnumTypeList(This,riid,ppv)\t\\\n    ( (This)->lpVtbl -> GetEnumTypeList(This,riid,ppv) ) \n\n#define IPropertyDescriptionSearchInfo_CoerceToCanonicalValue(This,ppropvar)\t\\\n    ( (This)->lpVtbl -> CoerceToCanonicalValue(This,ppropvar) ) \n\n#define IPropertyDescriptionSearchInfo_FormatForDisplay(This,propvar,pdfFlags,ppszDisplay)\t\\\n    ( (This)->lpVtbl -> FormatForDisplay(This,propvar,pdfFlags,ppszDisplay) ) \n\n#define IPropertyDescriptionSearchInfo_IsValueCanonical(This,propvar)\t\\\n    ( (This)->lpVtbl -> IsValueCanonical(This,propvar) ) \n\n\n#define IPropertyDescriptionSearchInfo_GetSearchInfoFlags(This,ppdsiFlags)\t\\\n    ( (This)->lpVtbl -> GetSearchInfoFlags(This,ppdsiFlags) ) \n\n#define IPropertyDescriptionSearchInfo_GetColumnIndexType(This,ppdciType)\t\\\n    ( (This)->lpVtbl -> GetColumnIndexType(This,ppdciType) ) \n\n#define IPropertyDescriptionSearchInfo_GetProjectionString(This,ppszProjection)\t\\\n    ( (This)->lpVtbl -> GetProjectionString(This,ppszProjection) ) \n\n#define IPropertyDescriptionSearchInfo_GetMaxSize(This,pcbMaxSize)\t\\\n    ( (This)->lpVtbl -> GetMaxSize(This,pcbMaxSize) ) \n\n#endif /* COBJMACROS */\n\n\n#endif \t/* C style interface */\n\n\n\n\n#endif \t/* __IPropertyDescriptionSearchInfo_INTERFACE_DEFINED__ */\n\n\n/* interface __MIDL_itf_propsys_0000_0014 */\n/* [local] */ \n\n/* [v1_enum] */ \nenum tagPROPDESC_ENUMFILTER\n    {\tPDEF_ALL\t= 0,\n\tPDEF_SYSTEM\t= 1,\n\tPDEF_NONSYSTEM\t= 2,\n\tPDEF_VIEWABLE\t= 3,\n\tPDEF_QUERYABLE\t= 4,\n\tPDEF_INFULLTEXTQUERY\t= 5,\n\tPDEF_COLUMN\t= 6\n    } ;\ntypedef enum tagPROPDESC_ENUMFILTER PROPDESC_ENUMFILTER;\n\n\n\nextern RPC_IF_HANDLE __MIDL_itf_propsys_0000_0014_v0_0_c_ifspec;\nextern RPC_IF_HANDLE __MIDL_itf_propsys_0000_0014_v0_0_s_ifspec;\n\n#ifndef __IPropertySystem_INTERFACE_DEFINED__\n#define __IPropertySystem_INTERFACE_DEFINED__\n\n/* interface IPropertySystem */\n/* [unique][object][uuid] */ \n\n\nEXTERN_C const IID IID_IPropertySystem;\n\n#if defined(__cplusplus) && !defined(CINTERFACE)\n    \n    MIDL_INTERFACE(\"ca724e8a-c3e6-442b-88a4-6fb0db8035a3\")\n    IPropertySystem : public IUnknown\n    {\n    public:\n        virtual HRESULT STDMETHODCALLTYPE GetPropertyDescription( \n            /* [in] */ __RPC__in REFPROPERTYKEY propkey,\n            /* [in] */ __RPC__in REFIID riid,\n            /* [iid_is][out] */ __RPC__deref_out_opt void **ppv) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE GetPropertyDescriptionByName( \n            /* [string][in] */ __RPC__in LPCWSTR pszCanonicalName,\n            /* [in] */ __RPC__in REFIID riid,\n            /* [iid_is][out] */ __RPC__deref_out_opt void **ppv) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE GetPropertyDescriptionListFromString( \n            /* [string][in] */ __RPC__in LPCWSTR pszPropList,\n            /* [in] */ __RPC__in REFIID riid,\n            /* [iid_is][out] */ __RPC__deref_out_opt void **ppv) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE EnumeratePropertyDescriptions( \n            /* [in] */ PROPDESC_ENUMFILTER filterOn,\n            /* [in] */ __RPC__in REFIID riid,\n            /* [iid_is][out] */ __RPC__deref_out_opt void **ppv) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE FormatForDisplay( \n            /* [in] */ __RPC__in REFPROPERTYKEY key,\n            /* [in] */ __RPC__in REFPROPVARIANT propvar,\n            /* [in] */ PROPDESC_FORMAT_FLAGS pdff,\n            /* [size_is][string][out] */ __RPC__out_ecount_full_string(cchText) LPWSTR pszText,\n            /* [in] */ DWORD cchText) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE FormatForDisplayAlloc( \n            /* [in] */ __RPC__in REFPROPERTYKEY key,\n            /* [in] */ __RPC__in REFPROPVARIANT propvar,\n            /* [in] */ PROPDESC_FORMAT_FLAGS pdff,\n            /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszDisplay) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE RegisterPropertySchema( \n            /* [string][in] */ __RPC__in LPCWSTR pszPath) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE UnregisterPropertySchema( \n            /* [string][in] */ __RPC__in LPCWSTR pszPath) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE RefreshPropertySchema( void) = 0;\n        \n    };\n    \n#else \t/* C style interface */\n\n    typedef struct IPropertySystemVtbl\n    {\n        BEGIN_INTERFACE\n        \n        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \n            IPropertySystem * This,\n            /* [in] */ __RPC__in REFIID riid,\n            /* [iid_is][out] */ \n            __RPC__deref_out  void **ppvObject);\n        \n        ULONG ( STDMETHODCALLTYPE *AddRef )( \n            IPropertySystem * This);\n        \n        ULONG ( STDMETHODCALLTYPE *Release )( \n            IPropertySystem * This);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetPropertyDescription )( \n            IPropertySystem * This,\n            /* [in] */ __RPC__in REFPROPERTYKEY propkey,\n            /* [in] */ __RPC__in REFIID riid,\n            /* [iid_is][out] */ __RPC__deref_out_opt void **ppv);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetPropertyDescriptionByName )( \n            IPropertySystem * This,\n            /* [string][in] */ __RPC__in LPCWSTR pszCanonicalName,\n            /* [in] */ __RPC__in REFIID riid,\n            /* [iid_is][out] */ __RPC__deref_out_opt void **ppv);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetPropertyDescriptionListFromString )( \n            IPropertySystem * This,\n            /* [string][in] */ __RPC__in LPCWSTR pszPropList,\n            /* [in] */ __RPC__in REFIID riid,\n            /* [iid_is][out] */ __RPC__deref_out_opt void **ppv);\n        \n        HRESULT ( STDMETHODCALLTYPE *EnumeratePropertyDescriptions )( \n            IPropertySystem * This,\n            /* [in] */ PROPDESC_ENUMFILTER filterOn,\n            /* [in] */ __RPC__in REFIID riid,\n            /* [iid_is][out] */ __RPC__deref_out_opt void **ppv);\n        \n        HRESULT ( STDMETHODCALLTYPE *FormatForDisplay )( \n            IPropertySystem * This,\n            /* [in] */ __RPC__in REFPROPERTYKEY key,\n            /* [in] */ __RPC__in REFPROPVARIANT propvar,\n            /* [in] */ PROPDESC_FORMAT_FLAGS pdff,\n            /* [size_is][string][out] */ __RPC__out_ecount_full_string(cchText) LPWSTR pszText,\n            /* [in] */ DWORD cchText);\n        \n        HRESULT ( STDMETHODCALLTYPE *FormatForDisplayAlloc )( \n            IPropertySystem * This,\n            /* [in] */ __RPC__in REFPROPERTYKEY key,\n            /* [in] */ __RPC__in REFPROPVARIANT propvar,\n            /* [in] */ PROPDESC_FORMAT_FLAGS pdff,\n            /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszDisplay);\n        \n        HRESULT ( STDMETHODCALLTYPE *RegisterPropertySchema )( \n            IPropertySystem * This,\n            /* [string][in] */ __RPC__in LPCWSTR pszPath);\n        \n        HRESULT ( STDMETHODCALLTYPE *UnregisterPropertySchema )( \n            IPropertySystem * This,\n            /* [string][in] */ __RPC__in LPCWSTR pszPath);\n        \n        HRESULT ( STDMETHODCALLTYPE *RefreshPropertySchema )( \n            IPropertySystem * This);\n        \n        END_INTERFACE\n    } IPropertySystemVtbl;\n\n    interface IPropertySystem\n    {\n        CONST_VTBL struct IPropertySystemVtbl *lpVtbl;\n    };\n\n    \n\n#ifdef COBJMACROS\n\n\n#define IPropertySystem_QueryInterface(This,riid,ppvObject)\t\\\n    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \n\n#define IPropertySystem_AddRef(This)\t\\\n    ( (This)->lpVtbl -> AddRef(This) ) \n\n#define IPropertySystem_Release(This)\t\\\n    ( (This)->lpVtbl -> Release(This) ) \n\n\n#define IPropertySystem_GetPropertyDescription(This,propkey,riid,ppv)\t\\\n    ( (This)->lpVtbl -> GetPropertyDescription(This,propkey,riid,ppv) ) \n\n#define IPropertySystem_GetPropertyDescriptionByName(This,pszCanonicalName,riid,ppv)\t\\\n    ( (This)->lpVtbl -> GetPropertyDescriptionByName(This,pszCanonicalName,riid,ppv) ) \n\n#define IPropertySystem_GetPropertyDescriptionListFromString(This,pszPropList,riid,ppv)\t\\\n    ( (This)->lpVtbl -> GetPropertyDescriptionListFromString(This,pszPropList,riid,ppv) ) \n\n#define IPropertySystem_EnumeratePropertyDescriptions(This,filterOn,riid,ppv)\t\\\n    ( (This)->lpVtbl -> EnumeratePropertyDescriptions(This,filterOn,riid,ppv) ) \n\n#define IPropertySystem_FormatForDisplay(This,key,propvar,pdff,pszText,cchText)\t\\\n    ( (This)->lpVtbl -> FormatForDisplay(This,key,propvar,pdff,pszText,cchText) ) \n\n#define IPropertySystem_FormatForDisplayAlloc(This,key,propvar,pdff,ppszDisplay)\t\\\n    ( (This)->lpVtbl -> FormatForDisplayAlloc(This,key,propvar,pdff,ppszDisplay) ) \n\n#define IPropertySystem_RegisterPropertySchema(This,pszPath)\t\\\n    ( (This)->lpVtbl -> RegisterPropertySchema(This,pszPath) ) \n\n#define IPropertySystem_UnregisterPropertySchema(This,pszPath)\t\\\n    ( (This)->lpVtbl -> UnregisterPropertySchema(This,pszPath) ) \n\n#define IPropertySystem_RefreshPropertySchema(This)\t\\\n    ( (This)->lpVtbl -> RefreshPropertySchema(This) ) \n\n#endif /* COBJMACROS */\n\n\n#endif \t/* C style interface */\n\n\n\n\n#endif \t/* __IPropertySystem_INTERFACE_DEFINED__ */\n\n\n#ifndef __IPropertyDescriptionList_INTERFACE_DEFINED__\n#define __IPropertyDescriptionList_INTERFACE_DEFINED__\n\n/* interface IPropertyDescriptionList */\n/* [unique][object][uuid] */ \n\n\nEXTERN_C const IID IID_IPropertyDescriptionList;\n\n#if defined(__cplusplus) && !defined(CINTERFACE)\n    \n    MIDL_INTERFACE(\"1f9fc1d0-c39b-4b26-817f-011967d3440e\")\n    IPropertyDescriptionList : public IUnknown\n    {\n    public:\n        virtual HRESULT STDMETHODCALLTYPE GetCount( \n            /* [out] */ __RPC__out UINT *pcElem) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE GetAt( \n            /* [in] */ UINT iElem,\n            /* [in] */ __RPC__in REFIID riid,\n            /* [iid_is][out] */ __RPC__deref_out_opt void **ppv) = 0;\n        \n    };\n    \n#else \t/* C style interface */\n\n    typedef struct IPropertyDescriptionListVtbl\n    {\n        BEGIN_INTERFACE\n        \n        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \n            IPropertyDescriptionList * This,\n            /* [in] */ __RPC__in REFIID riid,\n            /* [iid_is][out] */ \n            __RPC__deref_out  void **ppvObject);\n        \n        ULONG ( STDMETHODCALLTYPE *AddRef )( \n            IPropertyDescriptionList * This);\n        \n        ULONG ( STDMETHODCALLTYPE *Release )( \n            IPropertyDescriptionList * This);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetCount )( \n            IPropertyDescriptionList * This,\n            /* [out] */ __RPC__out UINT *pcElem);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetAt )( \n            IPropertyDescriptionList * This,\n            /* [in] */ UINT iElem,\n            /* [in] */ __RPC__in REFIID riid,\n            /* [iid_is][out] */ __RPC__deref_out_opt void **ppv);\n        \n        END_INTERFACE\n    } IPropertyDescriptionListVtbl;\n\n    interface IPropertyDescriptionList\n    {\n        CONST_VTBL struct IPropertyDescriptionListVtbl *lpVtbl;\n    };\n\n    \n\n#ifdef COBJMACROS\n\n\n#define IPropertyDescriptionList_QueryInterface(This,riid,ppvObject)\t\\\n    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \n\n#define IPropertyDescriptionList_AddRef(This)\t\\\n    ( (This)->lpVtbl -> AddRef(This) ) \n\n#define IPropertyDescriptionList_Release(This)\t\\\n    ( (This)->lpVtbl -> Release(This) ) \n\n\n#define IPropertyDescriptionList_GetCount(This,pcElem)\t\\\n    ( (This)->lpVtbl -> GetCount(This,pcElem) ) \n\n#define IPropertyDescriptionList_GetAt(This,iElem,riid,ppv)\t\\\n    ( (This)->lpVtbl -> GetAt(This,iElem,riid,ppv) ) \n\n#endif /* COBJMACROS */\n\n\n#endif \t/* C style interface */\n\n\n\n\n#endif \t/* __IPropertyDescriptionList_INTERFACE_DEFINED__ */\n\n\n#ifndef __IPropertyStoreFactory_INTERFACE_DEFINED__\n#define __IPropertyStoreFactory_INTERFACE_DEFINED__\n\n/* interface IPropertyStoreFactory */\n/* [unique][object][uuid] */ \n\n\nEXTERN_C const IID IID_IPropertyStoreFactory;\n\n#if defined(__cplusplus) && !defined(CINTERFACE)\n    \n    MIDL_INTERFACE(\"bc110b6d-57e8-4148-a9c6-91015ab2f3a5\")\n    IPropertyStoreFactory : public IUnknown\n    {\n    public:\n        virtual HRESULT STDMETHODCALLTYPE GetPropertyStore( \n            /* [in] */ GETPROPERTYSTOREFLAGS flags,\n            /* [unique][in] */ __RPC__in_opt IUnknown *pUnkFactory,\n            /* [in] */ __RPC__in REFIID riid,\n            /* [iid_is][out] */ __RPC__deref_out_opt void **ppv) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE GetPropertyStoreForKeys( \n            /* [unique][in] */ __RPC__in_opt const PROPERTYKEY *rgKeys,\n            /* [in] */ UINT cKeys,\n            /* [in] */ GETPROPERTYSTOREFLAGS flags,\n            /* [in] */ __RPC__in REFIID riid,\n            /* [iid_is][out] */ __RPC__deref_out_opt void **ppv) = 0;\n        \n    };\n    \n#else \t/* C style interface */\n\n    typedef struct IPropertyStoreFactoryVtbl\n    {\n        BEGIN_INTERFACE\n        \n        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \n            IPropertyStoreFactory * This,\n            /* [in] */ __RPC__in REFIID riid,\n            /* [iid_is][out] */ \n            __RPC__deref_out  void **ppvObject);\n        \n        ULONG ( STDMETHODCALLTYPE *AddRef )( \n            IPropertyStoreFactory * This);\n        \n        ULONG ( STDMETHODCALLTYPE *Release )( \n            IPropertyStoreFactory * This);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetPropertyStore )( \n            IPropertyStoreFactory * This,\n            /* [in] */ GETPROPERTYSTOREFLAGS flags,\n            /* [unique][in] */ __RPC__in_opt IUnknown *pUnkFactory,\n            /* [in] */ __RPC__in REFIID riid,\n            /* [iid_is][out] */ __RPC__deref_out_opt void **ppv);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetPropertyStoreForKeys )( \n            IPropertyStoreFactory * This,\n            /* [unique][in] */ __RPC__in_opt const PROPERTYKEY *rgKeys,\n            /* [in] */ UINT cKeys,\n            /* [in] */ GETPROPERTYSTOREFLAGS flags,\n            /* [in] */ __RPC__in REFIID riid,\n            /* [iid_is][out] */ __RPC__deref_out_opt void **ppv);\n        \n        END_INTERFACE\n    } IPropertyStoreFactoryVtbl;\n\n    interface IPropertyStoreFactory\n    {\n        CONST_VTBL struct IPropertyStoreFactoryVtbl *lpVtbl;\n    };\n\n    \n\n#ifdef COBJMACROS\n\n\n#define IPropertyStoreFactory_QueryInterface(This,riid,ppvObject)\t\\\n    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \n\n#define IPropertyStoreFactory_AddRef(This)\t\\\n    ( (This)->lpVtbl -> AddRef(This) ) \n\n#define IPropertyStoreFactory_Release(This)\t\\\n    ( (This)->lpVtbl -> Release(This) ) \n\n\n#define IPropertyStoreFactory_GetPropertyStore(This,flags,pUnkFactory,riid,ppv)\t\\\n    ( (This)->lpVtbl -> GetPropertyStore(This,flags,pUnkFactory,riid,ppv) ) \n\n#define IPropertyStoreFactory_GetPropertyStoreForKeys(This,rgKeys,cKeys,flags,riid,ppv)\t\\\n    ( (This)->lpVtbl -> GetPropertyStoreForKeys(This,rgKeys,cKeys,flags,riid,ppv) ) \n\n#endif /* COBJMACROS */\n\n\n#endif \t/* C style interface */\n\n\n\n\n#endif \t/* __IPropertyStoreFactory_INTERFACE_DEFINED__ */\n\n\n#ifndef __IDelayedPropertyStoreFactory_INTERFACE_DEFINED__\n#define __IDelayedPropertyStoreFactory_INTERFACE_DEFINED__\n\n/* interface IDelayedPropertyStoreFactory */\n/* [unique][object][uuid] */ \n\n\nEXTERN_C const IID IID_IDelayedPropertyStoreFactory;\n\n#if defined(__cplusplus) && !defined(CINTERFACE)\n    \n    MIDL_INTERFACE(\"40d4577f-e237-4bdb-bd69-58f089431b6a\")\n    IDelayedPropertyStoreFactory : public IPropertyStoreFactory\n    {\n    public:\n        virtual HRESULT STDMETHODCALLTYPE GetDelayedPropertyStore( \n            /* [in] */ GETPROPERTYSTOREFLAGS flags,\n            /* [in] */ DWORD dwStoreId,\n            /* [in] */ __RPC__in REFIID riid,\n            /* [iid_is][out] */ __RPC__deref_out_opt void **ppv) = 0;\n        \n    };\n    \n#else \t/* C style interface */\n\n    typedef struct IDelayedPropertyStoreFactoryVtbl\n    {\n        BEGIN_INTERFACE\n        \n        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \n            IDelayedPropertyStoreFactory * This,\n            /* [in] */ __RPC__in REFIID riid,\n            /* [iid_is][out] */ \n            __RPC__deref_out  void **ppvObject);\n        \n        ULONG ( STDMETHODCALLTYPE *AddRef )( \n            IDelayedPropertyStoreFactory * This);\n        \n        ULONG ( STDMETHODCALLTYPE *Release )( \n            IDelayedPropertyStoreFactory * This);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetPropertyStore )( \n            IDelayedPropertyStoreFactory * This,\n            /* [in] */ GETPROPERTYSTOREFLAGS flags,\n            /* [unique][in] */ __RPC__in_opt IUnknown *pUnkFactory,\n            /* [in] */ __RPC__in REFIID riid,\n            /* [iid_is][out] */ __RPC__deref_out_opt void **ppv);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetPropertyStoreForKeys )( \n            IDelayedPropertyStoreFactory * This,\n            /* [unique][in] */ __RPC__in_opt const PROPERTYKEY *rgKeys,\n            /* [in] */ UINT cKeys,\n            /* [in] */ GETPROPERTYSTOREFLAGS flags,\n            /* [in] */ __RPC__in REFIID riid,\n            /* [iid_is][out] */ __RPC__deref_out_opt void **ppv);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetDelayedPropertyStore )( \n            IDelayedPropertyStoreFactory * This,\n            /* [in] */ GETPROPERTYSTOREFLAGS flags,\n            /* [in] */ DWORD dwStoreId,\n            /* [in] */ __RPC__in REFIID riid,\n            /* [iid_is][out] */ __RPC__deref_out_opt void **ppv);\n        \n        END_INTERFACE\n    } IDelayedPropertyStoreFactoryVtbl;\n\n    interface IDelayedPropertyStoreFactory\n    {\n        CONST_VTBL struct IDelayedPropertyStoreFactoryVtbl *lpVtbl;\n    };\n\n    \n\n#ifdef COBJMACROS\n\n\n#define IDelayedPropertyStoreFactory_QueryInterface(This,riid,ppvObject)\t\\\n    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \n\n#define IDelayedPropertyStoreFactory_AddRef(This)\t\\\n    ( (This)->lpVtbl -> AddRef(This) ) \n\n#define IDelayedPropertyStoreFactory_Release(This)\t\\\n    ( (This)->lpVtbl -> Release(This) ) \n\n\n#define IDelayedPropertyStoreFactory_GetPropertyStore(This,flags,pUnkFactory,riid,ppv)\t\\\n    ( (This)->lpVtbl -> GetPropertyStore(This,flags,pUnkFactory,riid,ppv) ) \n\n#define IDelayedPropertyStoreFactory_GetPropertyStoreForKeys(This,rgKeys,cKeys,flags,riid,ppv)\t\\\n    ( (This)->lpVtbl -> GetPropertyStoreForKeys(This,rgKeys,cKeys,flags,riid,ppv) ) \n\n\n#define IDelayedPropertyStoreFactory_GetDelayedPropertyStore(This,flags,dwStoreId,riid,ppv)\t\\\n    ( (This)->lpVtbl -> GetDelayedPropertyStore(This,flags,dwStoreId,riid,ppv) ) \n\n#endif /* COBJMACROS */\n\n\n#endif \t/* C style interface */\n\n\n\n\n#endif \t/* __IDelayedPropertyStoreFactory_INTERFACE_DEFINED__ */\n\n\n/* interface __MIDL_itf_propsys_0000_0018 */\n/* [local] */ \n\n/* [v1_enum] */ \nenum tagPERSIST_SPROPSTORE_FLAGS\n    {\tFPSPS_READONLY\t= 0x1\n    } ;\ntypedef int PERSIST_SPROPSTORE_FLAGS;\n\ntypedef struct tagSERIALIZEDPROPSTORAGE SERIALIZEDPROPSTORAGE;\n\ntypedef SERIALIZEDPROPSTORAGE __unaligned *PUSERIALIZEDPROPSTORAGE;\n\ntypedef const SERIALIZEDPROPSTORAGE __unaligned *PCUSERIALIZEDPROPSTORAGE;\n\n\n\nextern RPC_IF_HANDLE __MIDL_itf_propsys_0000_0018_v0_0_c_ifspec;\nextern RPC_IF_HANDLE __MIDL_itf_propsys_0000_0018_v0_0_s_ifspec;\n\n#ifndef __IPersistSerializedPropStorage_INTERFACE_DEFINED__\n#define __IPersistSerializedPropStorage_INTERFACE_DEFINED__\n\n/* interface IPersistSerializedPropStorage */\n/* [object][local][unique][uuid] */ \n\n\nEXTERN_C const IID IID_IPersistSerializedPropStorage;\n\n#if defined(__cplusplus) && !defined(CINTERFACE)\n    \n    MIDL_INTERFACE(\"e318ad57-0aa0-450f-aca5-6fab7103d917\")\n    IPersistSerializedPropStorage : public IUnknown\n    {\n    public:\n        virtual HRESULT STDMETHODCALLTYPE SetFlags( \n            /* [in] */ PERSIST_SPROPSTORE_FLAGS flags) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE SetPropertyStorage( \n            /* [in] */ \n            __in_bcount(cb)  PCUSERIALIZEDPROPSTORAGE psps,\n            /* [in] */ \n            __in  DWORD cb) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE GetPropertyStorage( \n            /* [out] */ \n            __deref_out_bcount(*pcb)  SERIALIZEDPROPSTORAGE **ppsps,\n            /* [out] */ \n            __out  DWORD *pcb) = 0;\n        \n    };\n    \n#else \t/* C style interface */\n\n    typedef struct IPersistSerializedPropStorageVtbl\n    {\n        BEGIN_INTERFACE\n        \n        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \n            IPersistSerializedPropStorage * This,\n            /* [in] */ REFIID riid,\n            /* [iid_is][out] */ \n            __RPC__deref_out  void **ppvObject);\n        \n        ULONG ( STDMETHODCALLTYPE *AddRef )( \n            IPersistSerializedPropStorage * This);\n        \n        ULONG ( STDMETHODCALLTYPE *Release )( \n            IPersistSerializedPropStorage * This);\n        \n        HRESULT ( STDMETHODCALLTYPE *SetFlags )( \n            IPersistSerializedPropStorage * This,\n            /* [in] */ PERSIST_SPROPSTORE_FLAGS flags);\n        \n        HRESULT ( STDMETHODCALLTYPE *SetPropertyStorage )( \n            IPersistSerializedPropStorage * This,\n            /* [in] */ \n            __in_bcount(cb)  PCUSERIALIZEDPROPSTORAGE psps,\n            /* [in] */ \n            __in  DWORD cb);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetPropertyStorage )( \n            IPersistSerializedPropStorage * This,\n            /* [out] */ \n            __deref_out_bcount(*pcb)  SERIALIZEDPROPSTORAGE **ppsps,\n            /* [out] */ \n            __out  DWORD *pcb);\n        \n        END_INTERFACE\n    } IPersistSerializedPropStorageVtbl;\n\n    interface IPersistSerializedPropStorage\n    {\n        CONST_VTBL struct IPersistSerializedPropStorageVtbl *lpVtbl;\n    };\n\n    \n\n#ifdef COBJMACROS\n\n\n#define IPersistSerializedPropStorage_QueryInterface(This,riid,ppvObject)\t\\\n    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \n\n#define IPersistSerializedPropStorage_AddRef(This)\t\\\n    ( (This)->lpVtbl -> AddRef(This) ) \n\n#define IPersistSerializedPropStorage_Release(This)\t\\\n    ( (This)->lpVtbl -> Release(This) ) \n\n\n#define IPersistSerializedPropStorage_SetFlags(This,flags)\t\\\n    ( (This)->lpVtbl -> SetFlags(This,flags) ) \n\n#define IPersistSerializedPropStorage_SetPropertyStorage(This,psps,cb)\t\\\n    ( (This)->lpVtbl -> SetPropertyStorage(This,psps,cb) ) \n\n#define IPersistSerializedPropStorage_GetPropertyStorage(This,ppsps,pcb)\t\\\n    ( (This)->lpVtbl -> GetPropertyStorage(This,ppsps,pcb) ) \n\n#endif /* COBJMACROS */\n\n\n#endif \t/* C style interface */\n\n\n\n\n#endif \t/* __IPersistSerializedPropStorage_INTERFACE_DEFINED__ */\n\n\n#ifndef __IPropertySystemChangeNotify_INTERFACE_DEFINED__\n#define __IPropertySystemChangeNotify_INTERFACE_DEFINED__\n\n/* interface IPropertySystemChangeNotify */\n/* [unique][object][uuid] */ \n\n\nEXTERN_C const IID IID_IPropertySystemChangeNotify;\n\n#if defined(__cplusplus) && !defined(CINTERFACE)\n    \n    MIDL_INTERFACE(\"fa955fd9-38be-4879-a6ce-824cf52d609f\")\n    IPropertySystemChangeNotify : public IUnknown\n    {\n    public:\n        virtual HRESULT STDMETHODCALLTYPE SchemaRefreshed( void) = 0;\n        \n    };\n    \n#else \t/* C style interface */\n\n    typedef struct IPropertySystemChangeNotifyVtbl\n    {\n        BEGIN_INTERFACE\n        \n        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \n            IPropertySystemChangeNotify * This,\n            /* [in] */ __RPC__in REFIID riid,\n            /* [iid_is][out] */ \n            __RPC__deref_out  void **ppvObject);\n        \n        ULONG ( STDMETHODCALLTYPE *AddRef )( \n            IPropertySystemChangeNotify * This);\n        \n        ULONG ( STDMETHODCALLTYPE *Release )( \n            IPropertySystemChangeNotify * This);\n        \n        HRESULT ( STDMETHODCALLTYPE *SchemaRefreshed )( \n            IPropertySystemChangeNotify * This);\n        \n        END_INTERFACE\n    } IPropertySystemChangeNotifyVtbl;\n\n    interface IPropertySystemChangeNotify\n    {\n        CONST_VTBL struct IPropertySystemChangeNotifyVtbl *lpVtbl;\n    };\n\n    \n\n#ifdef COBJMACROS\n\n\n#define IPropertySystemChangeNotify_QueryInterface(This,riid,ppvObject)\t\\\n    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \n\n#define IPropertySystemChangeNotify_AddRef(This)\t\\\n    ( (This)->lpVtbl -> AddRef(This) ) \n\n#define IPropertySystemChangeNotify_Release(This)\t\\\n    ( (This)->lpVtbl -> Release(This) ) \n\n\n#define IPropertySystemChangeNotify_SchemaRefreshed(This)\t\\\n    ( (This)->lpVtbl -> SchemaRefreshed(This) ) \n\n#endif /* COBJMACROS */\n\n\n#endif \t/* C style interface */\n\n\n\n\n#endif \t/* __IPropertySystemChangeNotify_INTERFACE_DEFINED__ */\n\n\n#ifndef __ICreateObject_INTERFACE_DEFINED__\n#define __ICreateObject_INTERFACE_DEFINED__\n\n/* interface ICreateObject */\n/* [object][unique][uuid] */ \n\n\nEXTERN_C const IID IID_ICreateObject;\n\n#if defined(__cplusplus) && !defined(CINTERFACE)\n    \n    MIDL_INTERFACE(\"75121952-e0d0-43e5-9380-1d80483acf72\")\n    ICreateObject : public IUnknown\n    {\n    public:\n        virtual HRESULT STDMETHODCALLTYPE CreateObject( \n            /* [in] */ __RPC__in REFCLSID clsid,\n            /* [unique][in] */ __RPC__in_opt IUnknown *pUnkOuter,\n            /* [in] */ __RPC__in REFIID riid,\n            /* [iid_is][out] */ __RPC__deref_out_opt void **ppv) = 0;\n        \n    };\n    \n#else \t/* C style interface */\n\n    typedef struct ICreateObjectVtbl\n    {\n        BEGIN_INTERFACE\n        \n        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \n            ICreateObject * This,\n            /* [in] */ __RPC__in REFIID riid,\n            /* [iid_is][out] */ \n            __RPC__deref_out  void **ppvObject);\n        \n        ULONG ( STDMETHODCALLTYPE *AddRef )( \n            ICreateObject * This);\n        \n        ULONG ( STDMETHODCALLTYPE *Release )( \n            ICreateObject * This);\n        \n        HRESULT ( STDMETHODCALLTYPE *CreateObject )( \n            ICreateObject * This,\n            /* [in] */ __RPC__in REFCLSID clsid,\n            /* [unique][in] */ __RPC__in_opt IUnknown *pUnkOuter,\n            /* [in] */ __RPC__in REFIID riid,\n            /* [iid_is][out] */ __RPC__deref_out_opt void **ppv);\n        \n        END_INTERFACE\n    } ICreateObjectVtbl;\n\n    interface ICreateObject\n    {\n        CONST_VTBL struct ICreateObjectVtbl *lpVtbl;\n    };\n\n    \n\n#ifdef COBJMACROS\n\n\n#define ICreateObject_QueryInterface(This,riid,ppvObject)\t\\\n    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \n\n#define ICreateObject_AddRef(This)\t\\\n    ( (This)->lpVtbl -> AddRef(This) ) \n\n#define ICreateObject_Release(This)\t\\\n    ( (This)->lpVtbl -> Release(This) ) \n\n\n#define ICreateObject_CreateObject(This,clsid,pUnkOuter,riid,ppv)\t\\\n    ( (This)->lpVtbl -> CreateObject(This,clsid,pUnkOuter,riid,ppv) ) \n\n#endif /* COBJMACROS */\n\n\n#endif \t/* C style interface */\n\n\n\n\n#endif \t/* __ICreateObject_INTERFACE_DEFINED__ */\n\n\n/* interface __MIDL_itf_propsys_0000_0021 */\n/* [local] */ \n\n// Format a property value for display purposes\nPSSTDAPI PSFormatForDisplay(\n    __in REFPROPERTYKEY propkey,\n    __in REFPROPVARIANT propvar,\n    __in PROPDESC_FORMAT_FLAGS pdfFlags,\n    __out_ecount(cchText) LPWSTR pwszText,\n    __in DWORD cchText);\n\nPSSTDAPI PSFormatForDisplayAlloc(\n    __in REFPROPERTYKEY key,\n    __in REFPROPVARIANT propvar,\n    __in PROPDESC_FORMAT_FLAGS pdff,\n    __deref_out PWSTR *ppszDisplay);\n\nPSSTDAPI PSFormatPropertyValue(\n    __in IPropertyStore *pps,\n    __in IPropertyDescription *ppd,\n    __in PROPDESC_FORMAT_FLAGS pdff,\n    __deref_out LPWSTR *ppszDisplay);\n\n\n#define PKEY_PIDSTR_MAX     10   // will take care of any long integer value\n#define GUIDSTRING_MAX      (1 + 8 + 1 + 4 + 1 + 4 + 1 + 4 + 1 + 12 + 1 + 1)  // \"{12345678-1234-1234-1234-123456789012}\"\n#define PKEYSTR_MAX         (GUIDSTRING_MAX + 1 + PKEY_PIDSTR_MAX)\n\n// Convert a PROPERTYKEY to and from a PWSTR\nPSSTDAPI PSStringFromPropertyKey(\n    __in REFPROPERTYKEY pkey,\n    __out_ecount(cch) LPWSTR psz,\n    __in UINT cch);\n\nPSSTDAPI PSPropertyKeyFromString(\n    __in LPCWSTR pszString,\n    __out PROPERTYKEY *pkey);\n\n\n// Creates an in-memory property store\n// Returns an IPropertyStore, IPersistSerializedPropStorage, and related interfaces interface\nPSSTDAPI PSCreateMemoryPropertyStore(\n    __in REFIID riid,\n    __deref_out void **ppv);\n\n\n// Create a read-only, delay-bind multiplexing property store\n// Returns an IPropertyStore interface or related interfaces\nPSSTDAPI PSCreateDelayedMultiplexPropertyStore(\n    __in GETPROPERTYSTOREFLAGS flags,\n    __in IDelayedPropertyStoreFactory *pdpsf,\n    __in_ecount(cStores) const DWORD *rgStoreIds,\n    __in DWORD cStores,\n    __in REFIID riid,\n    __deref_out void **ppv);\n\n\n// Create a read-only property store from one or more sources (which each must support either IPropertyStore or IPropertySetStorage)\n// Returns an IPropertyStore interface or related interfaces\nPSSTDAPI PSCreateMultiplexPropertyStore(\n    __in_ecount(cStores) IUnknown **prgpunkStores,\n    __in DWORD cStores,\n    __in REFIID riid,\n    __deref_out void **ppv);\n\n\n// Create a container for IPropertyChanges\n// Returns an IPropertyChangeArray interface\nPSSTDAPI PSCreatePropertyChangeArray(\n    __in_ecount_opt(cChanges) const PROPERTYKEY *rgpropkey,\n    __in_ecount_opt(cChanges) const PKA_FLAGS *rgflags,\n    __in_ecount_opt(cChanges) const PROPVARIANT *rgpropvar,\n    __in UINT cChanges,\n    __in REFIID riid,\n    __deref_out void **ppv);\n\n\n// Create a simple property change\n// Returns an IPropertyChange interface\nPSSTDAPI PSCreateSimplePropertyChange(\n    __in PKA_FLAGS flags,\n    __in REFPROPERTYKEY key,\n    __in REFPROPVARIANT propvar,\n    __in REFIID riid,\n    __deref_out void **ppv);\n\n\n// Get a property description\n// Returns an IPropertyDescription interface\nPSSTDAPI PSGetPropertyDescription(\n    __in REFPROPERTYKEY propkey,\n    __in REFIID riid,\n    __deref_out void **ppv);\n\nPSSTDAPI PSGetPropertyDescriptionByName(\n    __in LPCWSTR pszCanonicalName,\n    __in REFIID riid,\n    __deref_out void **ppv);\n\n\n// Lookup a per-machine registered file property handler\nPSSTDAPI PSLookupPropertyHandlerCLSID(\n    __in PCWSTR pszFilePath,\n    __out CLSID *pclsid);\n// Get a property handler, on Vista or downlevel to XP\n// punkItem is a shell item created with an SHCreateItemXXX API\n// Returns an IPropertyStore\nPSSTDAPI PSGetItemPropertyHandler(\n    __in IUnknown *punkItem,\n    __in BOOL fReadWrite,\n    __in REFIID riid,\n    __deref_out void **ppv);\n\n\n// Get a property handler, on Vista or downlevel to XP\n// punkItem is a shell item created with an SHCreateItemXXX API\n// punkCreateObject supports ICreateObject\n// Returns an IPropertyStore\nPSSTDAPI PSGetItemPropertyHandlerWithCreateObject(\n    __in IUnknown *punkItem,\n    __in BOOL fReadWrite,\n    __in IUnknown *punkCreateObject,\n    __in REFIID riid,\n    __deref_out void **ppv);\n\n\n// Get or set a property value from a store\nPSSTDAPI PSGetPropertyValue(\n    __in IPropertyStore *pps,\n    __in IPropertyDescription *ppd,\n    __out PROPVARIANT *ppropvar);\n\nPSSTDAPI PSSetPropertyValue(\n    __in IPropertyStore *pps,\n    __in IPropertyDescription *ppd,\n    __in REFPROPVARIANT propvar);\n\n\n// Interact with the set of property descriptions\nPSSTDAPI PSRegisterPropertySchema(\n    __in PCWSTR pszPath);\n\nPSSTDAPI PSUnregisterPropertySchema(\n    __in PCWSTR pszPath);\n\nPSSTDAPI PSRefreshPropertySchema();\n\n// Returns either: IPropertyDescriptionList or IEnumUnknown interfaces\nPSSTDAPI PSEnumeratePropertyDescriptions(\n    __in PROPDESC_ENUMFILTER filterOn,\n    __in REFIID riid,\n    __deref_out void **ppv);\n\n\n// Convert between a PROPERTYKEY and its canonical name\nPSSTDAPI PSGetPropertyKeyFromName(\n    __in PCWSTR pszName,\n    __out PROPERTYKEY *ppropkey);\n\nPSSTDAPI PSGetNameFromPropertyKey(\n    __in REFPROPERTYKEY propkey,\n    __deref_out PWSTR *ppszCanonicalName);\n\n\n// Coerce and canonicalize a property value\nPSSTDAPI PSCoerceToCanonicalValue(\n    __in REFPROPERTYKEY key,\n    __inout PROPVARIANT *ppropvar);\n\n\n// Convert a 'prop:' string into a list of property descriptions\n// Returns an IPropertyDescriptionList interface\nPSSTDAPI PSGetPropertyDescriptionListFromString(\n    __in LPCWSTR pszPropList,\n    __in REFIID riid,\n    __deref_out void **ppv);\n\n\n// Wrap an IPropertySetStorage interface in an IPropertyStore interface\n// Returns an IPropertyStore or related interface\nPSSTDAPI PSCreatePropertyStoreFromPropertySetStorage(\n    __in IPropertySetStorage *ppss,\n    DWORD grfMode,\n    REFIID riid,\n    __deref_out void **ppv);\n\n\n// punkSource must support IPropertyStore or IPropertySetStorage\n// On success, the returned ppv is guaranteed to support IPropertyStore.\n// If punkSource already supports IPropertyStore, no wrapper is created.\nPSSTDAPI PSCreatePropertyStoreFromObject(\n    __in IUnknown *punk,\n    __in DWORD grfMode,\n    __in REFIID riid,\n    __deref_out void **ppv);\n\n\n// punkSource must support IPropertyStore\n// riid may be IPropertyStore, IPropertySetStorage, IPropertyStoreCapabilities, or IObjectProvider\nPSSTDAPI PSCreateAdapterFromPropertyStore(\n    __in IPropertyStore *pps,\n    __in REFIID riid,\n    __deref_out void **ppv);\n\n\n// Talk to the property system using an interface\n// Returns an IPropertySystem interface\nPSSTDAPI PSGetPropertySystem(\n    __in REFIID riid,\n    __deref_out void **ppv);\n\n\n// Obtain a value from serialized property storage\nPSSTDAPI PSGetPropertyFromPropertyStorage(\n    __in_bcount(cb) PCUSERIALIZEDPROPSTORAGE psps, \n    __in DWORD cb, \n    __in REFPROPERTYKEY rpkey, \n    __out PROPVARIANT *ppropvar);\n\n\n// Obtain a named value from serialized property storage\nPSSTDAPI PSGetNamedPropertyFromPropertyStorage(\n    __in_bcount(cb) PCUSERIALIZEDPROPSTORAGE psps, \n    __in DWORD cb, \n    __in LPCWSTR pszName, \n    __out PROPVARIANT *ppropvar);\n\n\n\n\nextern RPC_IF_HANDLE __MIDL_itf_propsys_0000_0021_v0_0_c_ifspec;\nextern RPC_IF_HANDLE __MIDL_itf_propsys_0000_0021_v0_0_s_ifspec;\n\n\n#ifndef __PropSysObjects_LIBRARY_DEFINED__\n#define __PropSysObjects_LIBRARY_DEFINED__\n\n/* library PropSysObjects */\n/* [version][lcid][uuid] */ \n\n\nEXTERN_C const IID LIBID_PropSysObjects;\n\nEXTERN_C const CLSID CLSID_InMemoryPropertyStore;\n\n#ifdef __cplusplus\n\nclass DECLSPEC_UUID(\"9a02e012-6303-4e1e-b9a1-630f802592c5\")\nInMemoryPropertyStore;\n#endif\n\nEXTERN_C const CLSID CLSID_PropertySystem;\n\n#ifdef __cplusplus\n\nclass DECLSPEC_UUID(\"b8967f85-58ae-4f46-9fb2-5d7904798f4b\")\nPropertySystem;\n#endif\n#endif /* __PropSysObjects_LIBRARY_DEFINED__ */\n\n/* Additional Prototypes for ALL interfaces */\n\nunsigned long             __RPC_USER  BSTR_UserSize(     unsigned long *, unsigned long            , BSTR * ); \nunsigned char * __RPC_USER  BSTR_UserMarshal(  unsigned long *, unsigned char *, BSTR * ); \nunsigned char * __RPC_USER  BSTR_UserUnmarshal(unsigned long *, unsigned char *, BSTR * ); \nvoid                      __RPC_USER  BSTR_UserFree(     unsigned long *, BSTR * ); \n\nunsigned long             __RPC_USER  LPSAFEARRAY_UserSize(     unsigned long *, unsigned long            , LPSAFEARRAY * ); \nunsigned char * __RPC_USER  LPSAFEARRAY_UserMarshal(  unsigned long *, unsigned char *, LPSAFEARRAY * ); \nunsigned char * __RPC_USER  LPSAFEARRAY_UserUnmarshal(unsigned long *, unsigned char *, LPSAFEARRAY * ); \nvoid                      __RPC_USER  LPSAFEARRAY_UserFree(     unsigned long *, LPSAFEARRAY * ); \n\nunsigned long             __RPC_USER  BSTR_UserSize64(     unsigned long *, unsigned long            , BSTR * ); \nunsigned char * __RPC_USER  BSTR_UserMarshal64(  unsigned long *, unsigned char *, BSTR * ); \nunsigned char * __RPC_USER  BSTR_UserUnmarshal64(unsigned long *, unsigned char *, BSTR * ); \nvoid                      __RPC_USER  BSTR_UserFree64(     unsigned long *, BSTR * ); \n\nunsigned long             __RPC_USER  LPSAFEARRAY_UserSize64(     unsigned long *, unsigned long            , LPSAFEARRAY * ); \nunsigned char * __RPC_USER  LPSAFEARRAY_UserMarshal64(  unsigned long *, unsigned char *, LPSAFEARRAY * ); \nunsigned char * __RPC_USER  LPSAFEARRAY_UserUnmarshal64(unsigned long *, unsigned char *, LPSAFEARRAY * ); \nvoid                      __RPC_USER  LPSAFEARRAY_UserFree64(     unsigned long *, LPSAFEARRAY * ); \n\n/* [local] */ HRESULT STDMETHODCALLTYPE IInitializeWithStream_Initialize_Proxy( \n    IInitializeWithStream * This,\n    /* [in] */ IStream *pstream,\n    /* [in] */ DWORD grfMode);\n\n\n/* [call_as] */ HRESULT STDMETHODCALLTYPE IInitializeWithStream_Initialize_Stub( \n    IInitializeWithStream * This,\n    /* [in] */ __RPC__in_opt IStream *pstream,\n    /* [in] */ DWORD grfMode);\n\n/* [local] */ HRESULT STDMETHODCALLTYPE IPropertyDescription_CoerceToCanonicalValue_Proxy( \n    IPropertyDescription * This,\n    /* [out][in] */ PROPVARIANT *ppropvar);\n\n\n/* [call_as] */ HRESULT STDMETHODCALLTYPE IPropertyDescription_CoerceToCanonicalValue_Stub( \n    IPropertyDescription * This,\n    /* [in] */ __RPC__in REFPROPVARIANT propvar,\n    /* [out] */ __RPC__out PROPVARIANT *ppropvar);\n\n\n\n/* end of Additional Prototypes */\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif\n\n\n\n"
  },
  {
    "path": "thirdparty/portaudio/src/hostapi/wasapi/mingw-include/rpcsal.h",
    "content": "#pragma once\n\n#if __GNUC__ >=3\n#pragma GCC system_header\n#endif\n\n#define RPC_range(min,max)\n\n#define __RPC__in           \n#define __RPC__in_string\n#define __RPC__in_opt_string\n#define __RPC__deref_opt_in_opt\n#define __RPC__opt_in_opt_string\n#define __RPC__in_ecount(size) \n#define __RPC__in_ecount_full(size)\n#define __RPC__in_ecount_full_string(size)\n#define __RPC__in_ecount_part(size, length)\n#define __RPC__in_ecount_full_opt(size)\n#define __RPC__in_ecount_full_opt_string(size)\n#define __RPC__inout_ecount_full_opt_string(size)\n#define __RPC__in_ecount_part_opt(size, length)\n\n#define __RPC__deref_in \n#define __RPC__deref_in_string\n#define __RPC__deref_opt_in\n#define __RPC__deref_in_opt\n#define __RPC__deref_in_ecount(size) \n#define __RPC__deref_in_ecount_part(size, length) \n#define __RPC__deref_in_ecount_full(size) \n#define __RPC__deref_in_ecount_full_opt(size)\n#define __RPC__deref_in_ecount_full_string(size)\n#define __RPC__deref_in_ecount_full_opt_string(size)\n#define __RPC__deref_in_ecount_opt(size) \n#define __RPC__deref_in_ecount_opt_string(size)\n#define __RPC__deref_in_ecount_part_opt(size, length) \n\n// [out]\n#define __RPC__out     \n#define __RPC__out_ecount(size) \n#define __RPC__out_ecount_part(size, length) \n#define __RPC__out_ecount_full(size)\n#define __RPC__out_ecount_full_string(size)\n\n// [in,out] \n#define __RPC__inout                                   \n#define __RPC__inout_string\n#define __RPC__opt_inout\n#define __RPC__inout_ecount(size)                     \n#define __RPC__inout_ecount_part(size, length)    \n#define __RPC__inout_ecount_full(size)          \n#define __RPC__inout_ecount_full_string(size)          \n\n// [in,unique] \n#define __RPC__in_opt       \n#define __RPC__in_ecount_opt(size)   \n\n\n// [in,out,unique] \n#define __RPC__inout_opt    \n#define __RPC__inout_ecount_opt(size)  \n#define __RPC__inout_ecount_part_opt(size, length) \n#define __RPC__inout_ecount_full_opt(size)     \n#define __RPC__inout_ecount_full_string(size)\n\n// [out] **\n#define __RPC__deref_out   \n#define __RPC__deref_out_string\n#define __RPC__deref_out_opt \n#define __RPC__deref_out_opt_string\n#define __RPC__deref_out_ecount(size) \n#define __RPC__deref_out_ecount_part(size, length) \n#define __RPC__deref_out_ecount_full(size)  \n#define __RPC__deref_out_ecount_full_string(size)\n\n\n// [in,out] **, second pointer decoration. \n#define __RPC__deref_inout    \n#define __RPC__deref_inout_string\n#define __RPC__deref_inout_opt \n#define __RPC__deref_inout_opt_string\n#define __RPC__deref_inout_ecount_full(size)\n#define __RPC__deref_inout_ecount_full_string(size)\n#define __RPC__deref_inout_ecount_opt(size) \n#define __RPC__deref_inout_ecount_part_opt(size, length) \n#define __RPC__deref_inout_ecount_full_opt(size) \n#define __RPC__deref_inout_ecount_full_opt_string(size) \n\n// #define __RPC_out_opt    out_opt is not allowed in rpc\n\n// [in,out,unique] \n#define __RPC__deref_opt_inout  \n#define __RPC__deref_opt_inout_string\n#define __RPC__deref_opt_inout_ecount(size)     \n#define __RPC__deref_opt_inout_ecount_part(size, length) \n#define __RPC__deref_opt_inout_ecount_full(size) \n#define __RPC__deref_opt_inout_ecount_full_string(size)\n\n#define __RPC__deref_out_ecount_opt(size) \n#define __RPC__deref_out_ecount_part_opt(size, length) \n#define __RPC__deref_out_ecount_full_opt(size) \n#define __RPC__deref_out_ecount_full_opt_string(size)\n\n#define __RPC__deref_opt_inout_opt      \n#define __RPC__deref_opt_inout_opt_string\n#define __RPC__deref_opt_inout_ecount_opt(size)   \n#define __RPC__deref_opt_inout_ecount_part_opt(size, length) \n#define __RPC__deref_opt_inout_ecount_full_opt(size) \n#define __RPC__deref_opt_inout_ecount_full_opt_string(size) \n\n#define __RPC_full_pointer  \n#define __RPC_unique_pointer\n#define __RPC_ref_pointer\n#define __RPC_string                               \n"
  },
  {
    "path": "thirdparty/portaudio/src/hostapi/wasapi/mingw-include/sal.h",
    "content": "#pragma once\n\n#if __GNUC__ >=3\n#pragma GCC system_header\n#endif\n\n/*#define __null*/ // << Conflicts with GCC internal type __null\n#define __notnull\n#define __maybenull\n#define __readonly\n#define __notreadonly\n#define __maybereadonly\n#define __valid\n#define __notvalid\n#define __maybevalid\n#define __readableTo(extent)\n#define __elem_readableTo(size)\n#define __byte_readableTo(size)\n#define __writableTo(size)\n#define __elem_writableTo(size)\n#define __byte_writableTo(size)\n#define __deref\n#define __pre\n#define __post\n#define __precond(expr)\n#define __postcond(expr)\n#define __exceptthat\n#define __execeptthat\n#define __inner_success(expr)\n#define __inner_checkReturn\n#define __inner_typefix(ctype)\n#define __inner_override\n#define __inner_callback\n#define __inner_blocksOn(resource)\n#define __inner_fallthrough_dec\n#define __inner_fallthrough\n#define __refparam\n#define __inner_control_entrypoint(category)\n#define __inner_data_entrypoint(category)\n\n#define __ecount(size)\n#define __bcount(size)\n#define __in\n#define __in_ecount(size)\n#define __in_bcount(size)\n#define __in_z\n#define __in_ecount_z(size)\n#define __in_bcount_z(size)\n#define __in_nz\n#define __in_ecount_nz(size)\n#define __in_bcount_nz(size)\n#define __out\n#define __out_ecount(size)\n#define __out_bcount(size)\n#define __out_ecount_part(size,length)\n#define __out_bcount_part(size,length)\n#define __out_ecount_full(size)\n#define __out_bcount_full(size)\n#define __out_z\n#define __out_z_opt\n#define __out_ecount_z(size)\n#define __out_bcount_z(size)\n#define __out_ecount_part_z(size,length)\n#define __out_bcount_part_z(size,length)\n#define __out_ecount_full_z(size)\n#define __out_bcount_full_z(size)\n#define __out_nz\n#define __out_nz_opt\n#define __out_ecount_nz(size)\n#define __out_bcount_nz(size)\n#define __inout\n#define __inout_ecount(size)\n#define __inout_bcount(size)\n#define __inout_ecount_part(size,length)\n#define __inout_bcount_part(size,length)\n#define __inout_ecount_full(size)\n#define __inout_bcount_full(size)\n#define __inout_z\n#define __inout_ecount_z(size)\n#define __inout_bcount_z(size)\n#define __inout_nz\n#define __inout_ecount_nz(size)\n#define __inout_bcount_nz(size)\n#define __ecount_opt(size)\n#define __bcount_opt(size)\n#define __in_opt\n#define __in_ecount_opt(size)\n#define __in_bcount_opt(size)\n#define __in_z_opt\n#define __in_ecount_z_opt(size)\n#define __in_bcount_z_opt(size)\n#define __in_nz_opt\n#define __in_ecount_nz_opt(size)\n#define __in_bcount_nz_opt(size)\n#define __out_opt\n#define __out_ecount_opt(size)\n#define __out_bcount_opt(size)\n#define __out_ecount_part_opt(size,length)\n#define __out_bcount_part_opt(size,length)\n#define __out_ecount_full_opt(size)\n#define __out_bcount_full_opt(size)\n#define __out_ecount_z_opt(size)\n#define __out_bcount_z_opt(size)\n#define __out_ecount_part_z_opt(size,length)\n#define __out_bcount_part_z_opt(size,length)\n#define __out_ecount_full_z_opt(size)\n#define __out_bcount_full_z_opt(size)\n#define __out_ecount_nz_opt(size)\n#define __out_bcount_nz_opt(size)\n#define __inout_opt\n#define __inout_ecount_opt(size)\n#define __inout_bcount_opt(size)\n#define __inout_ecount_part_opt(size,length)\n#define __inout_bcount_part_opt(size,length)\n#define __inout_ecount_full_opt(size)\n#define __inout_bcount_full_opt(size)\n#define __inout_z_opt\n#define __inout_ecount_z_opt(size)\n#define __inout_ecount_z_opt(size)\n#define __inout_bcount_z_opt(size)\n#define __inout_nz_opt\n#define __inout_ecount_nz_opt(size)\n#define __inout_bcount_nz_opt(size)\n#define __deref_ecount(size)\n#define __deref_bcount(size)\n#define __deref_out\n#define __deref_out_ecount(size)\n#define __deref_out_bcount(size)\n#define __deref_out_ecount_part(size,length)\n#define __deref_out_bcount_part(size,length)\n#define __deref_out_ecount_full(size)\n#define __deref_out_bcount_full(size)\n#define __deref_out_z\n#define __deref_out_ecount_z(size)\n#define __deref_out_bcount_z(size)\n#define __deref_out_nz\n#define __deref_out_ecount_nz(size)\n#define __deref_out_bcount_nz(size)\n#define __deref_inout\n#define __deref_inout_z\n#define __deref_inout_ecount(size)\n#define __deref_inout_bcount(size)\n#define __deref_inout_ecount_part(size,length)\n#define __deref_inout_bcount_part(size,length)\n#define __deref_inout_ecount_full(size)\n#define __deref_inout_bcount_full(size)\n#define __deref_inout_z\n#define __deref_inout_ecount_z(size)\n#define __deref_inout_bcount_z(size)\n#define __deref_inout_nz\n#define __deref_inout_ecount_nz(size)\n#define __deref_inout_bcount_nz(size)\n#define __deref_ecount_opt(size)\n#define __deref_bcount_opt(size)\n#define __deref_out_opt\n#define __deref_out_ecount_opt(size)\n#define __deref_out_bcount_opt(size)\n#define __deref_out_ecount_part_opt(size,length)\n#define __deref_out_bcount_part_opt(size,length)\n#define __deref_out_ecount_full_opt(size)\n#define __deref_out_bcount_full_opt(size)\n#define __deref_out_z_opt\n#define __deref_out_ecount_z_opt(size)\n#define __deref_out_bcount_z_opt(size)\n#define __deref_out_nz_opt\n#define __deref_out_ecount_nz_opt(size)\n#define __deref_out_bcount_nz_opt(size)\n#define __deref_inout_opt\n#define __deref_inout_ecount_opt(size)\n#define __deref_inout_bcount_opt(size)\n#define __deref_inout_ecount_part_opt(size,length)\n#define __deref_inout_bcount_part_opt(size,length)\n#define __deref_inout_ecount_full_opt(size)\n#define __deref_inout_bcount_full_opt(size)\n#define __deref_inout_z_opt\n#define __deref_inout_ecount_z_opt(size)\n#define __deref_inout_bcount_z_opt(size)\n#define __deref_inout_nz_opt\n#define __deref_inout_ecount_nz_opt(size)\n#define __deref_inout_bcount_nz_opt(size)\n#define __deref_opt_ecount(size)\n#define __deref_opt_bcount(size)\n#define __deref_opt_out\n#define __deref_opt_out_z\n#define __deref_opt_out_ecount(size)\n#define __deref_opt_out_bcount(size)\n#define __deref_opt_out_ecount_part(size,length)\n#define __deref_opt_out_bcount_part(size,length)\n#define __deref_opt_out_ecount_full(size)\n#define __deref_opt_out_bcount_full(size)\n#define __deref_opt_inout\n#define __deref_opt_inout_ecount(size)\n#define __deref_opt_inout_bcount(size)\n#define __deref_opt_inout_ecount_part(size,length)\n#define __deref_opt_inout_bcount_part(size,length)\n#define __deref_opt_inout_ecount_full(size)\n#define __deref_opt_inout_bcount_full(size)\n#define __deref_opt_inout_z\n#define __deref_opt_inout_ecount_z(size)\n#define __deref_opt_inout_bcount_z(size)\n#define __deref_opt_inout_nz\n#define __deref_opt_inout_ecount_nz(size)\n#define __deref_opt_inout_bcount_nz(size)\n#define __deref_opt_ecount_opt(size)\n#define __deref_opt_bcount_opt(size)\n#define __deref_opt_out_opt\n#define __deref_opt_out_ecount_opt(size)\n#define __deref_opt_out_bcount_opt(size)\n#define __deref_opt_out_ecount_part_opt(size,length)\n#define __deref_opt_out_bcount_part_opt(size,length)\n#define __deref_opt_out_ecount_full_opt(size)\n#define __deref_opt_out_bcount_full_opt(size)\n#define __deref_opt_out_z_opt\n#define __deref_opt_out_ecount_z_opt(size)\n#define __deref_opt_out_bcount_z_opt(size)\n#define __deref_opt_out_nz_opt\n#define __deref_opt_out_ecount_nz_opt(size)\n#define __deref_opt_out_bcount_nz_opt(size)\n#define __deref_opt_inout_opt\n#define __deref_opt_inout_ecount_opt(size)\n#define __deref_opt_inout_bcount_opt(size)\n#define __deref_opt_inout_ecount_part_opt(size,length)\n#define __deref_opt_inout_bcount_part_opt(size,length)\n#define __deref_opt_inout_ecount_full_opt(size)\n#define __deref_opt_inout_bcount_full_opt(size)\n#define __deref_opt_inout_z_opt\n#define __deref_opt_inout_ecount_z_opt(size)\n#define __deref_opt_inout_bcount_z_opt(size)\n#define __deref_opt_inout_nz_opt\n#define __deref_opt_inout_ecount_nz_opt(size)\n#define __deref_opt_inout_bcount_nz_opt(size)\n\n#define __success(expr)\n#define __nullterminated\n#define __nullnullterminated\n#define __reserved\n#define __checkReturn\n#define __typefix(ctype)\n#define __override\n#define __callback\n#define __format_string\n#define __blocksOn(resource)\n#define __control_entrypoint(category)\n#define __data_entrypoint(category)\n\n#ifndef __fallthrough\n    #define __fallthrough __inner_fallthrough\n#endif\n\n#ifndef __analysis_assume\n    #define __analysis_assume(expr)\n#endif\n"
  },
  {
    "path": "thirdparty/portaudio/src/hostapi/wasapi/mingw-include/sdkddkver.h",
    "content": "/**\n * sdkddkver.h: Version definitions for SDK and DDK. Originally\n * from ReactOS PSDK/DDK, this file is in the public domain:\n *\n * This file has no copyright assigned and is placed in the Public Domain.\n * This file is part of the mingw-w64 runtime package.\n * No warranty is given; refer to the file DISCLAIMER.PD within this package.\n */\n\n#ifndef _INC_SDKDDKVER\n#define _INC_SDKDDKVER\n\n/* _WIN32_WINNT */\n#define _WIN32_WINNT_NT4 0x0400\n#define _WIN32_WINNT_WIN2K 0x0500\n#define _WIN32_WINNT_WINXP 0x0501\n#define _WIN32_WINNT_WS03 0x0502\n#define _WIN32_WINNT_WIN6 0x0600\n#define _WIN32_WINNT_VISTA 0x0600\n#define _WIN32_WINNT_WS08 0x0600\n#define _WIN32_WINNT_LONGHORN 0x0600\n#define _WIN32_WINNT_WIN7 0x0601\n#define _WIN32_WINNT_WIN8 0x0602\n#define _WIN32_WINNT_WINBLUE 0x0603\n#define _WIN32_WINNT_WINTHRESHOLD 0x0A00\n#define _WIN32_WINNT_WIN10 0x0A00\n\n/* _WIN32_IE */\n#define _WIN32_IE_IE20 0x0200\n#define _WIN32_IE_IE30 0x0300\n#define _WIN32_IE_IE302 0x0302\n#define _WIN32_IE_IE40 0x0400\n#define _WIN32_IE_IE401 0x0401\n#define _WIN32_IE_IE50 0x0500\n#define _WIN32_IE_IE501 0x0501\n#define _WIN32_IE_IE55 0x0550\n#define _WIN32_IE_IE60 0x0600\n#define _WIN32_IE_IE60SP1 0x0601\n#define _WIN32_IE_IE60SP2 0x0603\n#define _WIN32_IE_IE70 0x0700\n#define _WIN32_IE_IE80 0x0800\n#define _WIN32_IE_IE90 0x0900\n#define _WIN32_IE_IE100 0x0a00\n#define _WIN32_IE_IE110 0x0A00\n\n/* Mappings Between IE Version and Windows Version */\n#define _WIN32_IE_NT4 _WIN32_IE_IE20\n#define _WIN32_IE_NT4SP1 _WIN32_IE_IE20\n#define _WIN32_IE_NT4SP2 _WIN32_IE_IE20\n#define _WIN32_IE_NT4SP3 _WIN32_IE_IE302\n#define _WIN32_IE_NT4SP4 _WIN32_IE_IE401\n#define _WIN32_IE_NT4SP5 _WIN32_IE_IE401\n#define _WIN32_IE_NT4SP6 _WIN32_IE_IE50\n#define _WIN32_IE_WIN98 _WIN32_IE_IE401\n#define _WIN32_IE_WIN98SE _WIN32_IE_IE50\n#define _WIN32_IE_WINME _WIN32_IE_IE55\n#define _WIN32_IE_WIN2K _WIN32_IE_IE501\n#define _WIN32_IE_WIN2KSP1 _WIN32_IE_IE501\n#define _WIN32_IE_WIN2KSP2 _WIN32_IE_IE501\n#define _WIN32_IE_WIN2KSP3 _WIN32_IE_IE501\n#define _WIN32_IE_WIN2KSP4 _WIN32_IE_IE501\n#define _WIN32_IE_XP _WIN32_IE_IE60\n#define _WIN32_IE_XPSP1 _WIN32_IE_IE60SP1\n#define _WIN32_IE_XPSP2 _WIN32_IE_IE60SP2\n#define _WIN32_IE_WS03 0x0602\n#define _WIN32_IE_WS03SP1 _WIN32_IE_IE60SP2\n#define _WIN32_IE_WIN6 _WIN32_IE_IE70\n#define _WIN32_IE_LONGHORN _WIN32_IE_IE70\n#define _WIN32_IE_WIN7 _WIN32_IE_IE80\n#define _WIN32_IE_WIN8 _WIN32_IE_IE100\n#define _WIN32_IE_WINBLUE _WIN32_IE_IE100\n#define _WIN32_IE_WINTHRESHOLD _WIN32_IE_IE110\n#define _WIN32_IE_WIN10 _WIN32_IE_IE110\n\n/* NTDDI_VERSION */\n#ifndef NTDDI_WIN2K\n#define NTDDI_WIN2K 0x05000000\n#endif\n#ifndef NTDDI_WIN2KSP1\n#define NTDDI_WIN2KSP1 0x05000100\n#endif\n#ifndef NTDDI_WIN2KSP2\n#define NTDDI_WIN2KSP2 0x05000200\n#endif\n#ifndef NTDDI_WIN2KSP3\n#define NTDDI_WIN2KSP3 0x05000300\n#endif\n#ifndef NTDDI_WIN2KSP4\n#define NTDDI_WIN2KSP4 0x05000400\n#endif\n\n#ifndef NTDDI_WINXP\n#define NTDDI_WINXP 0x05010000\n#endif\n#ifndef NTDDI_WINXPSP1\n#define NTDDI_WINXPSP1 0x05010100\n#endif\n#ifndef NTDDI_WINXPSP2\n#define NTDDI_WINXPSP2 0x05010200\n#endif\n#ifndef NTDDI_WINXPSP3\n#define NTDDI_WINXPSP3 0x05010300\n#endif\n#ifndef NTDDI_WINXPSP4\n#define NTDDI_WINXPSP4 0x05010400\n#endif\n\n#define NTDDI_WS03 0x05020000\n#define NTDDI_WS03SP1 0x05020100\n#define NTDDI_WS03SP2 0x05020200\n#define NTDDI_WS03SP3 0x05020300\n#define NTDDI_WS03SP4 0x05020400\n\n#define NTDDI_WIN6 0x06000000\n#define NTDDI_WIN6SP1 0x06000100\n#define NTDDI_WIN6SP2 0x06000200\n#define NTDDI_WIN6SP3 0x06000300\n#define NTDDI_WIN6SP4 0x06000400\n\n#define NTDDI_VISTA NTDDI_WIN6\n#define NTDDI_VISTASP1 NTDDI_WIN6SP1\n#define NTDDI_VISTASP2 NTDDI_WIN6SP2\n#define NTDDI_VISTASP3 NTDDI_WIN6SP3\n#define NTDDI_VISTASP4 NTDDI_WIN6SP4\n#define NTDDI_LONGHORN NTDDI_VISTA\n\n#define NTDDI_WS08 NTDDI_WIN6SP1\n#define NTDDI_WS08SP2 NTDDI_WIN6SP2\n#define NTDDI_WS08SP3 NTDDI_WIN6SP3\n#define NTDDI_WS08SP4 NTDDI_WIN6SP4\n\n#define NTDDI_WIN7 0x06010000\n#define NTDDI_WIN8 0x06020000\n#define NTDDI_WINBLUE 0x06030000\n#define NTDDI_WINTHRESHOLD 0x0A000000\n#define NTDDI_WIN10 0x0A000000\n#define NTDDI_WIN10_TH2 0x0A000001\n#define NTDDI_WIN10_RS1 0x0A000002\n#define NTDDI_WIN10_RS2 0x0A000003\n#define NTDDI_WIN10_RS3 0x0A000004\n#define NTDDI_WIN10_RS4 0x0A000005\n#define NTDDI_WIN10_RS5 0x0A000006\n#define NTDDI_WIN10_19H1 0x0A000007\n#define NTDDI_WIN10_VB 0x0A000008\n#define NTDDI_WIN10_MN 0x0A000009\n#define NTDDI_WIN10_FE 0x0A00000A\n\n#define WDK_NTDDI_VERSION NTDDI_WIN10_FE\n\n/* Version Fields in NTDDI_VERSION */\n#define OSVERSION_MASK 0xFFFF0000U\n#define SPVERSION_MASK 0x0000FF00\n#define SUBVERSION_MASK 0x000000FF\n\n/* Macros to Extract Version Fields From NTDDI_VERSION */\n#define OSVER(Version) ((Version) & OSVERSION_MASK)\n#define SPVER(Version) (((Version) & SPVERSION_MASK) >> 8)\n#define SUBVER(Version) (((Version) & SUBVERSION_MASK))\n\n/* Macros to get the NTDDI for a given WIN32 */\n#define NTDDI_VERSION_FROM_WIN32_WINNT2(Version) Version##0000\n#define NTDDI_VERSION_FROM_WIN32_WINNT(Version) NTDDI_VERSION_FROM_WIN32_WINNT2(Version)\n\n/* Select Default WIN32_WINNT Value */\n#if !defined(_WIN32_WINNT) && !defined(_CHICAGO_)\n#define _WIN32_WINNT _WIN32_WINNT_WS03\n#endif\n\n/* Choose NTDDI Version */\n#ifndef NTDDI_VERSION\n#ifdef _WIN32_WINNT\n#define NTDDI_VERSION NTDDI_VERSION_FROM_WIN32_WINNT(_WIN32_WINNT)\n#else\n#define NTDDI_VERSION NTDDI_WS03\n#endif\n#endif\n\n/* Choose WINVER Value */\n#ifndef WINVER\n#ifdef _WIN32_WINNT\n#define WINVER _WIN32_WINNT\n#else\n#define WINVER 0x0502\n#endif\n#endif\n\n/* Choose IE Version */\n#ifndef _WIN32_IE\n#ifdef _WIN32_WINNT\n#if (_WIN32_WINNT <= _WIN32_WINNT_NT4)\n#define _WIN32_IE _WIN32_IE_IE50\n#elif (_WIN32_WINNT <= _WIN32_WINNT_WIN2K)\n#define _WIN32_IE _WIN32_IE_IE501\n#elif (_WIN32_WINNT <= _WIN32_WINNT_WINXP)\n#define _WIN32_IE _WIN32_IE_IE60\n#elif (_WIN32_WINNT <= _WIN32_WINNT_WS03)\n#define _WIN32_IE _WIN32_IE_WS03\n#elif (_WIN32_WINNT <= _WIN32_WINNT_VISTA)\n#define _WIN32_IE _WIN32_IE_LONGHORN\n#elif (_WIN32_WINNT <= _WIN32_WINNT_WIN7)\n#define _WIN32_IE _WIN32_IE_WIN7\n#elif (_WIN32_WINNT <= _WIN32_WINNT_WIN8)\n#define _WIN32_IE _WIN32_IE_WIN8\n#else\n#define _WIN32_IE 0x0a00\n#endif\n#else\n#define _WIN32_IE 0x0700\n#endif\n#endif\n\n/* Make Sure NTDDI_VERSION and _WIN32_WINNT Match */\n#if ((OSVER(NTDDI_VERSION) == NTDDI_WIN2K) && (_WIN32_WINNT != _WIN32_WINNT_WIN2K)) || \\\n    ((OSVER(NTDDI_VERSION) == NTDDI_WINXP) && (_WIN32_WINNT != _WIN32_WINNT_WINXP)) || \\\n    ((OSVER(NTDDI_VERSION) == NTDDI_WS03) && (_WIN32_WINNT != _WIN32_WINNT_WS03))   || \\\n    ((OSVER(NTDDI_VERSION) == NTDDI_WINXP) && (_WIN32_WINNT != _WIN32_WINNT_WINXP))\n#error NTDDI_VERSION and _WIN32_WINNT mismatch!\n#endif\n\n#endif /* _INC_SDKDDKVER */\n"
  },
  {
    "path": "thirdparty/portaudio/src/hostapi/wasapi/mingw-include/structuredquery.h",
    "content": "\n\n/* this ALWAYS GENERATED file contains the definitions for the interfaces */\n\n\n /* File created by MIDL compiler version 7.00.0499 */\n/* Compiler settings for structuredquery.idl:\n    Oicf, W1, Zp8, env=Win32 (32b run)\n    protocol : dce , ms_ext, c_ext, robust\n    error checks: allocation ref bounds_check enum stub_data \n    VC __declspec() decoration level: \n         __declspec(uuid()), __declspec(selectany), __declspec(novtable)\n         DECLSPEC_UUID(), MIDL_INTERFACE()\n*/\n//@@MIDL_FILE_HEADING(  )\n\n#pragma warning( disable: 4049 )  /* more than 64k source lines */\n\n\n/* verify that the <rpcndr.h> version is high enough to compile this file*/\n#ifndef __REQUIRED_RPCNDR_H_VERSION__\n#define __REQUIRED_RPCNDR_H_VERSION__ 475\n#endif\n\n/* verify that the <rpcsal.h> version is high enough to compile this file*/\n#ifndef __REQUIRED_RPCSAL_H_VERSION__\n#define __REQUIRED_RPCSAL_H_VERSION__ 100\n#endif\n\n#include \"rpc.h\"\n#include \"rpcndr.h\"\n\n#ifndef __RPCNDR_H_VERSION__\n#error this stub requires an updated version of <rpcndr.h>\n#endif // __RPCNDR_H_VERSION__\n\n#ifndef COM_NO_WINDOWS_H\n#include \"windows.h\"\n#include \"ole2.h\"\n#endif /*COM_NO_WINDOWS_H*/\n\n#ifndef __structuredquery_h__\n#define __structuredquery_h__\n\n#if defined(_MSC_VER) && (_MSC_VER >= 1020)\n#pragma once\n#endif\n\n/* Forward Declarations */ \n\n#ifndef __IQueryParser_FWD_DEFINED__\n#define __IQueryParser_FWD_DEFINED__\ntypedef interface IQueryParser IQueryParser;\n#endif \t/* __IQueryParser_FWD_DEFINED__ */\n\n\n#ifndef __IConditionFactory_FWD_DEFINED__\n#define __IConditionFactory_FWD_DEFINED__\ntypedef interface IConditionFactory IConditionFactory;\n#endif \t/* __IConditionFactory_FWD_DEFINED__ */\n\n\n#ifndef __IQuerySolution_FWD_DEFINED__\n#define __IQuerySolution_FWD_DEFINED__\ntypedef interface IQuerySolution IQuerySolution;\n#endif \t/* __IQuerySolution_FWD_DEFINED__ */\n\n\n#ifndef __ICondition_FWD_DEFINED__\n#define __ICondition_FWD_DEFINED__\ntypedef interface ICondition ICondition;\n#endif \t/* __ICondition_FWD_DEFINED__ */\n\n\n#ifndef __IConditionGenerator_FWD_DEFINED__\n#define __IConditionGenerator_FWD_DEFINED__\ntypedef interface IConditionGenerator IConditionGenerator;\n#endif \t/* __IConditionGenerator_FWD_DEFINED__ */\n\n\n#ifndef __IRichChunk_FWD_DEFINED__\n#define __IRichChunk_FWD_DEFINED__\ntypedef interface IRichChunk IRichChunk;\n#endif \t/* __IRichChunk_FWD_DEFINED__ */\n\n\n#ifndef __IInterval_FWD_DEFINED__\n#define __IInterval_FWD_DEFINED__\ntypedef interface IInterval IInterval;\n#endif \t/* __IInterval_FWD_DEFINED__ */\n\n\n#ifndef __IMetaData_FWD_DEFINED__\n#define __IMetaData_FWD_DEFINED__\ntypedef interface IMetaData IMetaData;\n#endif \t/* __IMetaData_FWD_DEFINED__ */\n\n\n#ifndef __IEntity_FWD_DEFINED__\n#define __IEntity_FWD_DEFINED__\ntypedef interface IEntity IEntity;\n#endif \t/* __IEntity_FWD_DEFINED__ */\n\n\n#ifndef __IRelationship_FWD_DEFINED__\n#define __IRelationship_FWD_DEFINED__\ntypedef interface IRelationship IRelationship;\n#endif \t/* __IRelationship_FWD_DEFINED__ */\n\n\n#ifndef __INamedEntity_FWD_DEFINED__\n#define __INamedEntity_FWD_DEFINED__\ntypedef interface INamedEntity INamedEntity;\n#endif \t/* __INamedEntity_FWD_DEFINED__ */\n\n\n#ifndef __ISchemaProvider_FWD_DEFINED__\n#define __ISchemaProvider_FWD_DEFINED__\ntypedef interface ISchemaProvider ISchemaProvider;\n#endif \t/* __ISchemaProvider_FWD_DEFINED__ */\n\n\n#ifndef __ITokenCollection_FWD_DEFINED__\n#define __ITokenCollection_FWD_DEFINED__\ntypedef interface ITokenCollection ITokenCollection;\n#endif \t/* __ITokenCollection_FWD_DEFINED__ */\n\n\n#ifndef __INamedEntityCollector_FWD_DEFINED__\n#define __INamedEntityCollector_FWD_DEFINED__\ntypedef interface INamedEntityCollector INamedEntityCollector;\n#endif \t/* __INamedEntityCollector_FWD_DEFINED__ */\n\n\n#ifndef __ISchemaLocalizerSupport_FWD_DEFINED__\n#define __ISchemaLocalizerSupport_FWD_DEFINED__\ntypedef interface ISchemaLocalizerSupport ISchemaLocalizerSupport;\n#endif \t/* __ISchemaLocalizerSupport_FWD_DEFINED__ */\n\n\n#ifndef __IQueryParserManager_FWD_DEFINED__\n#define __IQueryParserManager_FWD_DEFINED__\ntypedef interface IQueryParserManager IQueryParserManager;\n#endif \t/* __IQueryParserManager_FWD_DEFINED__ */\n\n\n#ifndef __QueryParser_FWD_DEFINED__\n#define __QueryParser_FWD_DEFINED__\n\n#ifdef __cplusplus\ntypedef class QueryParser QueryParser;\n#else\ntypedef struct QueryParser QueryParser;\n#endif /* __cplusplus */\n\n#endif \t/* __QueryParser_FWD_DEFINED__ */\n\n\n#ifndef __NegationCondition_FWD_DEFINED__\n#define __NegationCondition_FWD_DEFINED__\n\n#ifdef __cplusplus\ntypedef class NegationCondition NegationCondition;\n#else\ntypedef struct NegationCondition NegationCondition;\n#endif /* __cplusplus */\n\n#endif \t/* __NegationCondition_FWD_DEFINED__ */\n\n\n#ifndef __CompoundCondition_FWD_DEFINED__\n#define __CompoundCondition_FWD_DEFINED__\n\n#ifdef __cplusplus\ntypedef class CompoundCondition CompoundCondition;\n#else\ntypedef struct CompoundCondition CompoundCondition;\n#endif /* __cplusplus */\n\n#endif \t/* __CompoundCondition_FWD_DEFINED__ */\n\n\n#ifndef __LeafCondition_FWD_DEFINED__\n#define __LeafCondition_FWD_DEFINED__\n\n#ifdef __cplusplus\ntypedef class LeafCondition LeafCondition;\n#else\ntypedef struct LeafCondition LeafCondition;\n#endif /* __cplusplus */\n\n#endif \t/* __LeafCondition_FWD_DEFINED__ */\n\n\n#ifndef __ConditionFactory_FWD_DEFINED__\n#define __ConditionFactory_FWD_DEFINED__\n\n#ifdef __cplusplus\ntypedef class ConditionFactory ConditionFactory;\n#else\ntypedef struct ConditionFactory ConditionFactory;\n#endif /* __cplusplus */\n\n#endif \t/* __ConditionFactory_FWD_DEFINED__ */\n\n\n#ifndef __Interval_FWD_DEFINED__\n#define __Interval_FWD_DEFINED__\n\n#ifdef __cplusplus\ntypedef class Interval Interval;\n#else\ntypedef struct Interval Interval;\n#endif /* __cplusplus */\n\n#endif \t/* __Interval_FWD_DEFINED__ */\n\n\n#ifndef __QueryParserManager_FWD_DEFINED__\n#define __QueryParserManager_FWD_DEFINED__\n\n#ifdef __cplusplus\ntypedef class QueryParserManager QueryParserManager;\n#else\ntypedef struct QueryParserManager QueryParserManager;\n#endif /* __cplusplus */\n\n#endif \t/* __QueryParserManager_FWD_DEFINED__ */\n\n\n/* header files for imported files */\n#include \"oaidl.h\"\n#include \"ocidl.h\"\n#include \"propidl.h\"\n\n#ifdef __cplusplus\nextern \"C\"{\n#endif \n\n\n/* interface __MIDL_itf_structuredquery_0000_0000 */\n/* [local] */ \n\n\n\n\n\n\n\n\n\n\n\ntypedef /* [v1_enum] */ \nenum tagCONDITION_TYPE\n    {\tCT_AND_CONDITION\t= 0,\n\tCT_OR_CONDITION\t= ( CT_AND_CONDITION + 1 ) ,\n\tCT_NOT_CONDITION\t= ( CT_OR_CONDITION + 1 ) ,\n\tCT_LEAF_CONDITION\t= ( CT_NOT_CONDITION + 1 ) \n    } \tCONDITION_TYPE;\n\ntypedef /* [v1_enum] */ \nenum tagCONDITION_OPERATION\n    {\tCOP_IMPLICIT\t= 0,\n\tCOP_EQUAL\t= ( COP_IMPLICIT + 1 ) ,\n\tCOP_NOTEQUAL\t= ( COP_EQUAL + 1 ) ,\n\tCOP_LESSTHAN\t= ( COP_NOTEQUAL + 1 ) ,\n\tCOP_GREATERTHAN\t= ( COP_LESSTHAN + 1 ) ,\n\tCOP_LESSTHANOREQUAL\t= ( COP_GREATERTHAN + 1 ) ,\n\tCOP_GREATERTHANOREQUAL\t= ( COP_LESSTHANOREQUAL + 1 ) ,\n\tCOP_VALUE_STARTSWITH\t= ( COP_GREATERTHANOREQUAL + 1 ) ,\n\tCOP_VALUE_ENDSWITH\t= ( COP_VALUE_STARTSWITH + 1 ) ,\n\tCOP_VALUE_CONTAINS\t= ( COP_VALUE_ENDSWITH + 1 ) ,\n\tCOP_VALUE_NOTCONTAINS\t= ( COP_VALUE_CONTAINS + 1 ) ,\n\tCOP_DOSWILDCARDS\t= ( COP_VALUE_NOTCONTAINS + 1 ) ,\n\tCOP_WORD_EQUAL\t= ( COP_DOSWILDCARDS + 1 ) ,\n\tCOP_WORD_STARTSWITH\t= ( COP_WORD_EQUAL + 1 ) ,\n\tCOP_APPLICATION_SPECIFIC\t= ( COP_WORD_STARTSWITH + 1 ) \n    } \tCONDITION_OPERATION;\n\ntypedef /* [v1_enum] */ \nenum tagSTRUCTURED_QUERY_SINGLE_OPTION\n    {\tSQSO_SCHEMA\t= 0,\n\tSQSO_LOCALE_WORD_BREAKING\t= ( SQSO_SCHEMA + 1 ) ,\n\tSQSO_WORD_BREAKER\t= ( SQSO_LOCALE_WORD_BREAKING + 1 ) ,\n\tSQSO_NATURAL_SYNTAX\t= ( SQSO_WORD_BREAKER + 1 ) ,\n\tSQSO_AUTOMATIC_WILDCARD\t= ( SQSO_NATURAL_SYNTAX + 1 ) ,\n\tSQSO_TRACE_LEVEL\t= ( SQSO_AUTOMATIC_WILDCARD + 1 ) ,\n\tSQSO_LANGUAGE_KEYWORDS\t= ( SQSO_TRACE_LEVEL + 1 ) \n    } \tSTRUCTURED_QUERY_SINGLE_OPTION;\n\ntypedef /* [v1_enum] */ \nenum tagSTRUCTURED_QUERY_MULTIOPTION\n    {\tSQMO_VIRTUAL_PROPERTY\t= 0,\n\tSQMO_DEFAULT_PROPERTY\t= ( SQMO_VIRTUAL_PROPERTY + 1 ) ,\n\tSQMO_GENERATOR_FOR_TYPE\t= ( SQMO_DEFAULT_PROPERTY + 1 ) \n    } \tSTRUCTURED_QUERY_MULTIOPTION;\n\ntypedef /* [v1_enum] */ \nenum tagSTRUCTURED_QUERY_PARSE_ERROR\n    {\tSQPE_NONE\t= 0,\n\tSQPE_EXTRA_OPENING_PARENTHESIS\t= ( SQPE_NONE + 1 ) ,\n\tSQPE_EXTRA_CLOSING_PARENTHESIS\t= ( SQPE_EXTRA_OPENING_PARENTHESIS + 1 ) ,\n\tSQPE_IGNORED_MODIFIER\t= ( SQPE_EXTRA_CLOSING_PARENTHESIS + 1 ) ,\n\tSQPE_IGNORED_CONNECTOR\t= ( SQPE_IGNORED_MODIFIER + 1 ) ,\n\tSQPE_IGNORED_KEYWORD\t= ( SQPE_IGNORED_CONNECTOR + 1 ) ,\n\tSQPE_UNHANDLED\t= ( SQPE_IGNORED_KEYWORD + 1 ) \n    } \tSTRUCTURED_QUERY_PARSE_ERROR;\n\n/* [v1_enum] */ \nenum tagSTRUCTURED_QUERY_RESOLVE_OPTION\n    {\tSQRO_DONT_RESOLVE_DATETIME\t= 0x1,\n\tSQRO_ALWAYS_ONE_INTERVAL\t= 0x2,\n\tSQRO_DONT_SIMPLIFY_CONDITION_TREES\t= 0x4,\n\tSQRO_DONT_MAP_RELATIONS\t= 0x8,\n\tSQRO_DONT_RESOLVE_RANGES\t= 0x10,\n\tSQRO_DONT_REMOVE_UNRESTRICTED_KEYWORDS\t= 0x20,\n\tSQRO_DONT_SPLIT_WORDS\t= 0x40,\n\tSQRO_IGNORE_PHRASE_ORDER\t= 0x80\n    } ;\ntypedef int STRUCTURED_QUERY_RESOLVE_OPTION;\n\ntypedef /* [v1_enum] */ \nenum tagINTERVAL_LIMIT_KIND\n    {\tILK_EXPLICIT_INCLUDED\t= 0,\n\tILK_EXPLICIT_EXCLUDED\t= ( ILK_EXPLICIT_INCLUDED + 1 ) ,\n\tILK_NEGATIVE_INFINITY\t= ( ILK_EXPLICIT_EXCLUDED + 1 ) ,\n\tILK_POSITIVE_INFINITY\t= ( ILK_NEGATIVE_INFINITY + 1 ) \n    } \tINTERVAL_LIMIT_KIND;\n\ntypedef /* [v1_enum] */ \nenum tagQUERY_PARSER_MANAGER_OPTION\n    {\tQPMO_SCHEMA_BINARY_NAME\t= 0,\n\tQPMO_PRELOCALIZED_SCHEMA_BINARY_PATH\t= ( QPMO_SCHEMA_BINARY_NAME + 1 ) ,\n\tQPMO_UNLOCALIZED_SCHEMA_BINARY_PATH\t= ( QPMO_PRELOCALIZED_SCHEMA_BINARY_PATH + 1 ) ,\n\tQPMO_LOCALIZED_SCHEMA_BINARY_PATH\t= ( QPMO_UNLOCALIZED_SCHEMA_BINARY_PATH + 1 ) ,\n\tQPMO_APPEND_LCID_TO_LOCALIZED_PATH\t= ( QPMO_LOCALIZED_SCHEMA_BINARY_PATH + 1 ) ,\n\tQPMO_LOCALIZER_SUPPORT\t= ( QPMO_APPEND_LCID_TO_LOCALIZED_PATH + 1 ) \n    } \tQUERY_PARSER_MANAGER_OPTION;\n\n\n\nextern RPC_IF_HANDLE __MIDL_itf_structuredquery_0000_0000_v0_0_c_ifspec;\nextern RPC_IF_HANDLE __MIDL_itf_structuredquery_0000_0000_v0_0_s_ifspec;\n\n#ifndef __IQueryParser_INTERFACE_DEFINED__\n#define __IQueryParser_INTERFACE_DEFINED__\n\n/* interface IQueryParser */\n/* [unique][uuid][object] */ \n\n\nEXTERN_C const IID IID_IQueryParser;\n\n#if defined(__cplusplus) && !defined(CINTERFACE)\n    \n    MIDL_INTERFACE(\"2EBDEE67-3505-43f8-9946-EA44ABC8E5B0\")\n    IQueryParser : public IUnknown\n    {\n    public:\n        virtual HRESULT STDMETHODCALLTYPE Parse( \n            /* [in] */ __RPC__in LPCWSTR pszInputString,\n            /* [in] */ __RPC__in_opt IEnumUnknown *pCustomProperties,\n            /* [retval][out] */ __RPC__deref_out_opt IQuerySolution **ppSolution) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE SetOption( \n            /* [in] */ STRUCTURED_QUERY_SINGLE_OPTION option,\n            /* [in] */ __RPC__in const PROPVARIANT *pOptionValue) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE GetOption( \n            /* [in] */ STRUCTURED_QUERY_SINGLE_OPTION option,\n            /* [retval][out] */ __RPC__out PROPVARIANT *pOptionValue) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE SetMultiOption( \n            /* [in] */ STRUCTURED_QUERY_MULTIOPTION option,\n            /* [in] */ __RPC__in LPCWSTR pszOptionKey,\n            /* [in] */ __RPC__in const PROPVARIANT *pOptionValue) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE GetSchemaProvider( \n            /* [retval][out] */ __RPC__deref_out_opt ISchemaProvider **ppSchemaProvider) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE RestateToString( \n            /* [in] */ __RPC__in_opt ICondition *pCondition,\n            /* [in] */ BOOL fUseEnglish,\n            /* [out] */ __RPC__deref_out_opt LPWSTR *ppszQueryString) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE ParsePropertyValue( \n            /* [in] */ __RPC__in LPCWSTR pszPropertyName,\n            /* [in] */ __RPC__in LPCWSTR pszInputString,\n            /* [retval][out] */ __RPC__deref_out_opt IQuerySolution **ppSolution) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE RestatePropertyValueToString( \n            /* [in] */ __RPC__in_opt ICondition *pCondition,\n            /* [in] */ BOOL fUseEnglish,\n            /* [out] */ __RPC__deref_out_opt LPWSTR *ppszPropertyName,\n            /* [out] */ __RPC__deref_out_opt LPWSTR *ppszQueryString) = 0;\n        \n    };\n    \n#else \t/* C style interface */\n\n    typedef struct IQueryParserVtbl\n    {\n        BEGIN_INTERFACE\n        \n        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \n            IQueryParser * This,\n            /* [in] */ __RPC__in REFIID riid,\n            /* [iid_is][out] */ \n            __RPC__deref_out  void **ppvObject);\n        \n        ULONG ( STDMETHODCALLTYPE *AddRef )( \n            IQueryParser * This);\n        \n        ULONG ( STDMETHODCALLTYPE *Release )( \n            IQueryParser * This);\n        \n        HRESULT ( STDMETHODCALLTYPE *Parse )( \n            IQueryParser * This,\n            /* [in] */ __RPC__in LPCWSTR pszInputString,\n            /* [in] */ __RPC__in_opt IEnumUnknown *pCustomProperties,\n            /* [retval][out] */ __RPC__deref_out_opt IQuerySolution **ppSolution);\n        \n        HRESULT ( STDMETHODCALLTYPE *SetOption )( \n            IQueryParser * This,\n            /* [in] */ STRUCTURED_QUERY_SINGLE_OPTION option,\n            /* [in] */ __RPC__in const PROPVARIANT *pOptionValue);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetOption )( \n            IQueryParser * This,\n            /* [in] */ STRUCTURED_QUERY_SINGLE_OPTION option,\n            /* [retval][out] */ __RPC__out PROPVARIANT *pOptionValue);\n        \n        HRESULT ( STDMETHODCALLTYPE *SetMultiOption )( \n            IQueryParser * This,\n            /* [in] */ STRUCTURED_QUERY_MULTIOPTION option,\n            /* [in] */ __RPC__in LPCWSTR pszOptionKey,\n            /* [in] */ __RPC__in const PROPVARIANT *pOptionValue);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetSchemaProvider )( \n            IQueryParser * This,\n            /* [retval][out] */ __RPC__deref_out_opt ISchemaProvider **ppSchemaProvider);\n        \n        HRESULT ( STDMETHODCALLTYPE *RestateToString )( \n            IQueryParser * This,\n            /* [in] */ __RPC__in_opt ICondition *pCondition,\n            /* [in] */ BOOL fUseEnglish,\n            /* [out] */ __RPC__deref_out_opt LPWSTR *ppszQueryString);\n        \n        HRESULT ( STDMETHODCALLTYPE *ParsePropertyValue )( \n            IQueryParser * This,\n            /* [in] */ __RPC__in LPCWSTR pszPropertyName,\n            /* [in] */ __RPC__in LPCWSTR pszInputString,\n            /* [retval][out] */ __RPC__deref_out_opt IQuerySolution **ppSolution);\n        \n        HRESULT ( STDMETHODCALLTYPE *RestatePropertyValueToString )( \n            IQueryParser * This,\n            /* [in] */ __RPC__in_opt ICondition *pCondition,\n            /* [in] */ BOOL fUseEnglish,\n            /* [out] */ __RPC__deref_out_opt LPWSTR *ppszPropertyName,\n            /* [out] */ __RPC__deref_out_opt LPWSTR *ppszQueryString);\n        \n        END_INTERFACE\n    } IQueryParserVtbl;\n\n    interface IQueryParser\n    {\n        CONST_VTBL struct IQueryParserVtbl *lpVtbl;\n    };\n\n    \n\n#ifdef COBJMACROS\n\n\n#define IQueryParser_QueryInterface(This,riid,ppvObject)\t\\\n    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \n\n#define IQueryParser_AddRef(This)\t\\\n    ( (This)->lpVtbl -> AddRef(This) ) \n\n#define IQueryParser_Release(This)\t\\\n    ( (This)->lpVtbl -> Release(This) ) \n\n\n#define IQueryParser_Parse(This,pszInputString,pCustomProperties,ppSolution)\t\\\n    ( (This)->lpVtbl -> Parse(This,pszInputString,pCustomProperties,ppSolution) ) \n\n#define IQueryParser_SetOption(This,option,pOptionValue)\t\\\n    ( (This)->lpVtbl -> SetOption(This,option,pOptionValue) ) \n\n#define IQueryParser_GetOption(This,option,pOptionValue)\t\\\n    ( (This)->lpVtbl -> GetOption(This,option,pOptionValue) ) \n\n#define IQueryParser_SetMultiOption(This,option,pszOptionKey,pOptionValue)\t\\\n    ( (This)->lpVtbl -> SetMultiOption(This,option,pszOptionKey,pOptionValue) ) \n\n#define IQueryParser_GetSchemaProvider(This,ppSchemaProvider)\t\\\n    ( (This)->lpVtbl -> GetSchemaProvider(This,ppSchemaProvider) ) \n\n#define IQueryParser_RestateToString(This,pCondition,fUseEnglish,ppszQueryString)\t\\\n    ( (This)->lpVtbl -> RestateToString(This,pCondition,fUseEnglish,ppszQueryString) ) \n\n#define IQueryParser_ParsePropertyValue(This,pszPropertyName,pszInputString,ppSolution)\t\\\n    ( (This)->lpVtbl -> ParsePropertyValue(This,pszPropertyName,pszInputString,ppSolution) ) \n\n#define IQueryParser_RestatePropertyValueToString(This,pCondition,fUseEnglish,ppszPropertyName,ppszQueryString)\t\\\n    ( (This)->lpVtbl -> RestatePropertyValueToString(This,pCondition,fUseEnglish,ppszPropertyName,ppszQueryString) ) \n\n#endif /* COBJMACROS */\n\n\n#endif \t/* C style interface */\n\n\n\n\n#endif \t/* __IQueryParser_INTERFACE_DEFINED__ */\n\n\n#ifndef __IConditionFactory_INTERFACE_DEFINED__\n#define __IConditionFactory_INTERFACE_DEFINED__\n\n/* interface IConditionFactory */\n/* [unique][uuid][object] */ \n\n\nEXTERN_C const IID IID_IConditionFactory;\n\n#if defined(__cplusplus) && !defined(CINTERFACE)\n    \n    MIDL_INTERFACE(\"A5EFE073-B16F-474f-9F3E-9F8B497A3E08\")\n    IConditionFactory : public IUnknown\n    {\n    public:\n        virtual HRESULT STDMETHODCALLTYPE MakeNot( \n            /* [in] */ __RPC__in_opt ICondition *pSubCondition,\n            /* [in] */ BOOL simplify,\n            /* [retval][out] */ __RPC__deref_out_opt ICondition **ppResultQuery) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE MakeAndOr( \n            /* [in] */ CONDITION_TYPE nodeType,\n            /* [in] */ __RPC__in_opt IEnumUnknown *pSubConditions,\n            /* [in] */ BOOL simplify,\n            /* [retval][out] */ __RPC__deref_out_opt ICondition **ppResultQuery) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE MakeLeaf( \n            /* [unique][in] */ __RPC__in_opt LPCWSTR pszPropertyName,\n            /* [in] */ CONDITION_OPERATION op,\n            /* [unique][in] */ __RPC__in_opt LPCWSTR pszValueType,\n            /* [in] */ __RPC__in const PROPVARIANT *pValue,\n            /* [in] */ __RPC__in_opt IRichChunk *pPropertyNameTerm,\n            /* [in] */ __RPC__in_opt IRichChunk *pOperationTerm,\n            /* [in] */ __RPC__in_opt IRichChunk *pValueTerm,\n            /* [in] */ BOOL expand,\n            /* [retval][out] */ __RPC__deref_out_opt ICondition **ppResultQuery) = 0;\n        \n        virtual /* [local] */ HRESULT STDMETHODCALLTYPE Resolve( \n            /* [in] */ \n            __in  ICondition *pConditionTree,\n            /* [in] */ \n            __in  STRUCTURED_QUERY_RESOLVE_OPTION sqro,\n            /* [ref][in] */ \n            __in_opt  const SYSTEMTIME *pstReferenceTime,\n            /* [retval][out] */ \n            __out  ICondition **ppResolvedConditionTree) = 0;\n        \n    };\n    \n#else \t/* C style interface */\n\n    typedef struct IConditionFactoryVtbl\n    {\n        BEGIN_INTERFACE\n        \n        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \n            IConditionFactory * This,\n            /* [in] */ __RPC__in REFIID riid,\n            /* [iid_is][out] */ \n            __RPC__deref_out  void **ppvObject);\n        \n        ULONG ( STDMETHODCALLTYPE *AddRef )( \n            IConditionFactory * This);\n        \n        ULONG ( STDMETHODCALLTYPE *Release )( \n            IConditionFactory * This);\n        \n        HRESULT ( STDMETHODCALLTYPE *MakeNot )( \n            IConditionFactory * This,\n            /* [in] */ __RPC__in_opt ICondition *pSubCondition,\n            /* [in] */ BOOL simplify,\n            /* [retval][out] */ __RPC__deref_out_opt ICondition **ppResultQuery);\n        \n        HRESULT ( STDMETHODCALLTYPE *MakeAndOr )( \n            IConditionFactory * This,\n            /* [in] */ CONDITION_TYPE nodeType,\n            /* [in] */ __RPC__in_opt IEnumUnknown *pSubConditions,\n            /* [in] */ BOOL simplify,\n            /* [retval][out] */ __RPC__deref_out_opt ICondition **ppResultQuery);\n        \n        HRESULT ( STDMETHODCALLTYPE *MakeLeaf )( \n            IConditionFactory * This,\n            /* [unique][in] */ __RPC__in_opt LPCWSTR pszPropertyName,\n            /* [in] */ CONDITION_OPERATION op,\n            /* [unique][in] */ __RPC__in_opt LPCWSTR pszValueType,\n            /* [in] */ __RPC__in const PROPVARIANT *pValue,\n            /* [in] */ __RPC__in_opt IRichChunk *pPropertyNameTerm,\n            /* [in] */ __RPC__in_opt IRichChunk *pOperationTerm,\n            /* [in] */ __RPC__in_opt IRichChunk *pValueTerm,\n            /* [in] */ BOOL expand,\n            /* [retval][out] */ __RPC__deref_out_opt ICondition **ppResultQuery);\n        \n        /* [local] */ HRESULT ( STDMETHODCALLTYPE *Resolve )( \n            IConditionFactory * This,\n            /* [in] */ \n            __in  ICondition *pConditionTree,\n            /* [in] */ \n            __in  STRUCTURED_QUERY_RESOLVE_OPTION sqro,\n            /* [ref][in] */ \n            __in_opt  const SYSTEMTIME *pstReferenceTime,\n            /* [retval][out] */ \n            __out  ICondition **ppResolvedConditionTree);\n        \n        END_INTERFACE\n    } IConditionFactoryVtbl;\n\n    interface IConditionFactory\n    {\n        CONST_VTBL struct IConditionFactoryVtbl *lpVtbl;\n    };\n\n    \n\n#ifdef COBJMACROS\n\n\n#define IConditionFactory_QueryInterface(This,riid,ppvObject)\t\\\n    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \n\n#define IConditionFactory_AddRef(This)\t\\\n    ( (This)->lpVtbl -> AddRef(This) ) \n\n#define IConditionFactory_Release(This)\t\\\n    ( (This)->lpVtbl -> Release(This) ) \n\n\n#define IConditionFactory_MakeNot(This,pSubCondition,simplify,ppResultQuery)\t\\\n    ( (This)->lpVtbl -> MakeNot(This,pSubCondition,simplify,ppResultQuery) ) \n\n#define IConditionFactory_MakeAndOr(This,nodeType,pSubConditions,simplify,ppResultQuery)\t\\\n    ( (This)->lpVtbl -> MakeAndOr(This,nodeType,pSubConditions,simplify,ppResultQuery) ) \n\n#define IConditionFactory_MakeLeaf(This,pszPropertyName,op,pszValueType,pValue,pPropertyNameTerm,pOperationTerm,pValueTerm,expand,ppResultQuery)\t\\\n    ( (This)->lpVtbl -> MakeLeaf(This,pszPropertyName,op,pszValueType,pValue,pPropertyNameTerm,pOperationTerm,pValueTerm,expand,ppResultQuery) ) \n\n#define IConditionFactory_Resolve(This,pConditionTree,sqro,pstReferenceTime,ppResolvedConditionTree)\t\\\n    ( (This)->lpVtbl -> Resolve(This,pConditionTree,sqro,pstReferenceTime,ppResolvedConditionTree) ) \n\n#endif /* COBJMACROS */\n\n\n#endif \t/* C style interface */\n\n\n\n\n#endif \t/* __IConditionFactory_INTERFACE_DEFINED__ */\n\n\n#ifndef __IQuerySolution_INTERFACE_DEFINED__\n#define __IQuerySolution_INTERFACE_DEFINED__\n\n/* interface IQuerySolution */\n/* [unique][uuid][object] */ \n\n\nEXTERN_C const IID IID_IQuerySolution;\n\n#if defined(__cplusplus) && !defined(CINTERFACE)\n    \n    MIDL_INTERFACE(\"D6EBC66B-8921-4193-AFDD-A1789FB7FF57\")\n    IQuerySolution : public IConditionFactory\n    {\n    public:\n        virtual /* [local] */ HRESULT STDMETHODCALLTYPE GetQuery( \n            /* [out] */ \n            __out_opt  ICondition **ppQueryNode,\n            /* [out] */ \n            __out_opt  IEntity **ppMainType) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE GetErrors( \n            /* [in] */ __RPC__in REFIID riid,\n            /* [iid_is][retval][out] */ __RPC__deref_out_opt void **ppParseErrors) = 0;\n        \n        virtual /* [local] */ HRESULT STDMETHODCALLTYPE GetLexicalData( \n            /* [out] */ \n            __deref_opt_out  LPWSTR *ppszInputString,\n            /* [out] */ \n            __out_opt  ITokenCollection **ppTokens,\n            /* [out] */ \n            __out_opt  LCID *pLocale,\n            /* [out] */ \n            __out_opt  IUnknown **ppWordBreaker) = 0;\n        \n    };\n    \n#else \t/* C style interface */\n\n    typedef struct IQuerySolutionVtbl\n    {\n        BEGIN_INTERFACE\n        \n        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \n            IQuerySolution * This,\n            /* [in] */ __RPC__in REFIID riid,\n            /* [iid_is][out] */ \n            __RPC__deref_out  void **ppvObject);\n        \n        ULONG ( STDMETHODCALLTYPE *AddRef )( \n            IQuerySolution * This);\n        \n        ULONG ( STDMETHODCALLTYPE *Release )( \n            IQuerySolution * This);\n        \n        HRESULT ( STDMETHODCALLTYPE *MakeNot )( \n            IQuerySolution * This,\n            /* [in] */ __RPC__in_opt ICondition *pSubCondition,\n            /* [in] */ BOOL simplify,\n            /* [retval][out] */ __RPC__deref_out_opt ICondition **ppResultQuery);\n        \n        HRESULT ( STDMETHODCALLTYPE *MakeAndOr )( \n            IQuerySolution * This,\n            /* [in] */ CONDITION_TYPE nodeType,\n            /* [in] */ __RPC__in_opt IEnumUnknown *pSubConditions,\n            /* [in] */ BOOL simplify,\n            /* [retval][out] */ __RPC__deref_out_opt ICondition **ppResultQuery);\n        \n        HRESULT ( STDMETHODCALLTYPE *MakeLeaf )( \n            IQuerySolution * This,\n            /* [unique][in] */ __RPC__in_opt LPCWSTR pszPropertyName,\n            /* [in] */ CONDITION_OPERATION op,\n            /* [unique][in] */ __RPC__in_opt LPCWSTR pszValueType,\n            /* [in] */ __RPC__in const PROPVARIANT *pValue,\n            /* [in] */ __RPC__in_opt IRichChunk *pPropertyNameTerm,\n            /* [in] */ __RPC__in_opt IRichChunk *pOperationTerm,\n            /* [in] */ __RPC__in_opt IRichChunk *pValueTerm,\n            /* [in] */ BOOL expand,\n            /* [retval][out] */ __RPC__deref_out_opt ICondition **ppResultQuery);\n        \n        /* [local] */ HRESULT ( STDMETHODCALLTYPE *Resolve )( \n            IQuerySolution * This,\n            /* [in] */ \n            __in  ICondition *pConditionTree,\n            /* [in] */ \n            __in  STRUCTURED_QUERY_RESOLVE_OPTION sqro,\n            /* [ref][in] */ \n            __in_opt  const SYSTEMTIME *pstReferenceTime,\n            /* [retval][out] */ \n            __out  ICondition **ppResolvedConditionTree);\n        \n        /* [local] */ HRESULT ( STDMETHODCALLTYPE *GetQuery )( \n            IQuerySolution * This,\n            /* [out] */ \n            __out_opt  ICondition **ppQueryNode,\n            /* [out] */ \n            __out_opt  IEntity **ppMainType);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetErrors )( \n            IQuerySolution * This,\n            /* [in] */ __RPC__in REFIID riid,\n            /* [iid_is][retval][out] */ __RPC__deref_out_opt void **ppParseErrors);\n        \n        /* [local] */ HRESULT ( STDMETHODCALLTYPE *GetLexicalData )( \n            IQuerySolution * This,\n            /* [out] */ \n            __deref_opt_out  LPWSTR *ppszInputString,\n            /* [out] */ \n            __out_opt  ITokenCollection **ppTokens,\n            /* [out] */ \n            __out_opt  LCID *pLocale,\n            /* [out] */ \n            __out_opt  IUnknown **ppWordBreaker);\n        \n        END_INTERFACE\n    } IQuerySolutionVtbl;\n\n    interface IQuerySolution\n    {\n        CONST_VTBL struct IQuerySolutionVtbl *lpVtbl;\n    };\n\n    \n\n#ifdef COBJMACROS\n\n\n#define IQuerySolution_QueryInterface(This,riid,ppvObject)\t\\\n    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \n\n#define IQuerySolution_AddRef(This)\t\\\n    ( (This)->lpVtbl -> AddRef(This) ) \n\n#define IQuerySolution_Release(This)\t\\\n    ( (This)->lpVtbl -> Release(This) ) \n\n\n#define IQuerySolution_MakeNot(This,pSubCondition,simplify,ppResultQuery)\t\\\n    ( (This)->lpVtbl -> MakeNot(This,pSubCondition,simplify,ppResultQuery) ) \n\n#define IQuerySolution_MakeAndOr(This,nodeType,pSubConditions,simplify,ppResultQuery)\t\\\n    ( (This)->lpVtbl -> MakeAndOr(This,nodeType,pSubConditions,simplify,ppResultQuery) ) \n\n#define IQuerySolution_MakeLeaf(This,pszPropertyName,op,pszValueType,pValue,pPropertyNameTerm,pOperationTerm,pValueTerm,expand,ppResultQuery)\t\\\n    ( (This)->lpVtbl -> MakeLeaf(This,pszPropertyName,op,pszValueType,pValue,pPropertyNameTerm,pOperationTerm,pValueTerm,expand,ppResultQuery) ) \n\n#define IQuerySolution_Resolve(This,pConditionTree,sqro,pstReferenceTime,ppResolvedConditionTree)\t\\\n    ( (This)->lpVtbl -> Resolve(This,pConditionTree,sqro,pstReferenceTime,ppResolvedConditionTree) ) \n\n\n#define IQuerySolution_GetQuery(This,ppQueryNode,ppMainType)\t\\\n    ( (This)->lpVtbl -> GetQuery(This,ppQueryNode,ppMainType) ) \n\n#define IQuerySolution_GetErrors(This,riid,ppParseErrors)\t\\\n    ( (This)->lpVtbl -> GetErrors(This,riid,ppParseErrors) ) \n\n#define IQuerySolution_GetLexicalData(This,ppszInputString,ppTokens,pLocale,ppWordBreaker)\t\\\n    ( (This)->lpVtbl -> GetLexicalData(This,ppszInputString,ppTokens,pLocale,ppWordBreaker) ) \n\n#endif /* COBJMACROS */\n\n\n#endif \t/* C style interface */\n\n\n\n\n#endif \t/* __IQuerySolution_INTERFACE_DEFINED__ */\n\n\n#ifndef __ICondition_INTERFACE_DEFINED__\n#define __ICondition_INTERFACE_DEFINED__\n\n/* interface ICondition */\n/* [unique][uuid][object] */ \n\n\nEXTERN_C const IID IID_ICondition;\n\n#if defined(__cplusplus) && !defined(CINTERFACE)\n    \n    MIDL_INTERFACE(\"0FC988D4-C935-4b97-A973-46282EA175C8\")\n    ICondition : public IPersistStream\n    {\n    public:\n        virtual HRESULT STDMETHODCALLTYPE GetConditionType( \n            /* [retval][out] */ __RPC__out CONDITION_TYPE *pNodeType) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE GetSubConditions( \n            /* [in] */ __RPC__in REFIID riid,\n            /* [iid_is][retval][out] */ __RPC__deref_out_opt void **ppv) = 0;\n        \n        virtual /* [local] */ HRESULT STDMETHODCALLTYPE GetComparisonInfo( \n            /* [out] */ \n            __deref_opt_out  LPWSTR *ppszPropertyName,\n            /* [out] */ \n            __out_opt  CONDITION_OPERATION *pOperation,\n            /* [out] */ \n            __out_opt  PROPVARIANT *pValue) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE GetValueType( \n            /* [retval][out] */ __RPC__deref_out_opt LPWSTR *ppszValueTypeName) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE GetValueNormalization( \n            /* [retval][out] */ __RPC__deref_out_opt LPWSTR *ppszNormalization) = 0;\n        \n        virtual /* [local] */ HRESULT STDMETHODCALLTYPE GetInputTerms( \n            /* [out] */ \n            __out_opt  IRichChunk **ppPropertyTerm,\n            /* [out] */ \n            __out_opt  IRichChunk **ppOperationTerm,\n            /* [out] */ \n            __out_opt  IRichChunk **ppValueTerm) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE Clone( \n            /* [retval][out] */ __RPC__deref_out_opt ICondition **ppc) = 0;\n        \n    };\n    \n#else \t/* C style interface */\n\n    typedef struct IConditionVtbl\n    {\n        BEGIN_INTERFACE\n        \n        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \n            ICondition * This,\n            /* [in] */ __RPC__in REFIID riid,\n            /* [iid_is][out] */ \n            __RPC__deref_out  void **ppvObject);\n        \n        ULONG ( STDMETHODCALLTYPE *AddRef )( \n            ICondition * This);\n        \n        ULONG ( STDMETHODCALLTYPE *Release )( \n            ICondition * This);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetClassID )( \n            ICondition * This,\n            /* [out] */ __RPC__out CLSID *pClassID);\n        \n        HRESULT ( STDMETHODCALLTYPE *IsDirty )( \n            ICondition * This);\n        \n        HRESULT ( STDMETHODCALLTYPE *Load )( \n            ICondition * This,\n            /* [unique][in] */ __RPC__in_opt IStream *pStm);\n        \n        HRESULT ( STDMETHODCALLTYPE *Save )( \n            ICondition * This,\n            /* [unique][in] */ __RPC__in_opt IStream *pStm,\n            /* [in] */ BOOL fClearDirty);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetSizeMax )( \n            ICondition * This,\n            /* [out] */ __RPC__out ULARGE_INTEGER *pcbSize);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetConditionType )( \n            ICondition * This,\n            /* [retval][out] */ __RPC__out CONDITION_TYPE *pNodeType);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetSubConditions )( \n            ICondition * This,\n            /* [in] */ __RPC__in REFIID riid,\n            /* [iid_is][retval][out] */ __RPC__deref_out_opt void **ppv);\n        \n        /* [local] */ HRESULT ( STDMETHODCALLTYPE *GetComparisonInfo )( \n            ICondition * This,\n            /* [out] */ \n            __deref_opt_out  LPWSTR *ppszPropertyName,\n            /* [out] */ \n            __out_opt  CONDITION_OPERATION *pOperation,\n            /* [out] */ \n            __out_opt  PROPVARIANT *pValue);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetValueType )( \n            ICondition * This,\n            /* [retval][out] */ __RPC__deref_out_opt LPWSTR *ppszValueTypeName);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetValueNormalization )( \n            ICondition * This,\n            /* [retval][out] */ __RPC__deref_out_opt LPWSTR *ppszNormalization);\n        \n        /* [local] */ HRESULT ( STDMETHODCALLTYPE *GetInputTerms )( \n            ICondition * This,\n            /* [out] */ \n            __out_opt  IRichChunk **ppPropertyTerm,\n            /* [out] */ \n            __out_opt  IRichChunk **ppOperationTerm,\n            /* [out] */ \n            __out_opt  IRichChunk **ppValueTerm);\n        \n        HRESULT ( STDMETHODCALLTYPE *Clone )( \n            ICondition * This,\n            /* [retval][out] */ __RPC__deref_out_opt ICondition **ppc);\n        \n        END_INTERFACE\n    } IConditionVtbl;\n\n    interface ICondition\n    {\n        CONST_VTBL struct IConditionVtbl *lpVtbl;\n    };\n\n    \n\n#ifdef COBJMACROS\n\n\n#define ICondition_QueryInterface(This,riid,ppvObject)\t\\\n    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \n\n#define ICondition_AddRef(This)\t\\\n    ( (This)->lpVtbl -> AddRef(This) ) \n\n#define ICondition_Release(This)\t\\\n    ( (This)->lpVtbl -> Release(This) ) \n\n\n#define ICondition_GetClassID(This,pClassID)\t\\\n    ( (This)->lpVtbl -> GetClassID(This,pClassID) ) \n\n\n#define ICondition_IsDirty(This)\t\\\n    ( (This)->lpVtbl -> IsDirty(This) ) \n\n#define ICondition_Load(This,pStm)\t\\\n    ( (This)->lpVtbl -> Load(This,pStm) ) \n\n#define ICondition_Save(This,pStm,fClearDirty)\t\\\n    ( (This)->lpVtbl -> Save(This,pStm,fClearDirty) ) \n\n#define ICondition_GetSizeMax(This,pcbSize)\t\\\n    ( (This)->lpVtbl -> GetSizeMax(This,pcbSize) ) \n\n\n#define ICondition_GetConditionType(This,pNodeType)\t\\\n    ( (This)->lpVtbl -> GetConditionType(This,pNodeType) ) \n\n#define ICondition_GetSubConditions(This,riid,ppv)\t\\\n    ( (This)->lpVtbl -> GetSubConditions(This,riid,ppv) ) \n\n#define ICondition_GetComparisonInfo(This,ppszPropertyName,pOperation,pValue)\t\\\n    ( (This)->lpVtbl -> GetComparisonInfo(This,ppszPropertyName,pOperation,pValue) ) \n\n#define ICondition_GetValueType(This,ppszValueTypeName)\t\\\n    ( (This)->lpVtbl -> GetValueType(This,ppszValueTypeName) ) \n\n#define ICondition_GetValueNormalization(This,ppszNormalization)\t\\\n    ( (This)->lpVtbl -> GetValueNormalization(This,ppszNormalization) ) \n\n#define ICondition_GetInputTerms(This,ppPropertyTerm,ppOperationTerm,ppValueTerm)\t\\\n    ( (This)->lpVtbl -> GetInputTerms(This,ppPropertyTerm,ppOperationTerm,ppValueTerm) ) \n\n#define ICondition_Clone(This,ppc)\t\\\n    ( (This)->lpVtbl -> Clone(This,ppc) ) \n\n#endif /* COBJMACROS */\n\n\n#endif \t/* C style interface */\n\n\n\n\n#endif \t/* __ICondition_INTERFACE_DEFINED__ */\n\n\n#ifndef __IConditionGenerator_INTERFACE_DEFINED__\n#define __IConditionGenerator_INTERFACE_DEFINED__\n\n/* interface IConditionGenerator */\n/* [unique][uuid][object] */ \n\n\nEXTERN_C const IID IID_IConditionGenerator;\n\n#if defined(__cplusplus) && !defined(CINTERFACE)\n    \n    MIDL_INTERFACE(\"92D2CC58-4386-45a3-B98C-7E0CE64A4117\")\n    IConditionGenerator : public IUnknown\n    {\n    public:\n        virtual HRESULT STDMETHODCALLTYPE Initialize( \n            /* [in] */ __RPC__in_opt ISchemaProvider *pSchemaProvider) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE RecognizeNamedEntities( \n            /* [in] */ __RPC__in LPCWSTR pszInputString,\n            /* [in] */ LCID lcid,\n            /* [in] */ __RPC__in_opt ITokenCollection *pTokenCollection,\n            /* [out][in] */ __RPC__inout_opt INamedEntityCollector *pNamedEntities) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE GenerateForLeaf( \n            /* [in] */ __RPC__in_opt IConditionFactory *pConditionFactory,\n            /* [unique][in] */ __RPC__in_opt LPCWSTR pszPropertyName,\n            /* [in] */ CONDITION_OPERATION op,\n            /* [unique][in] */ __RPC__in_opt LPCWSTR pszValueType,\n            /* [in] */ __RPC__in LPCWSTR pszValue,\n            /* [unique][in] */ __RPC__in_opt LPCWSTR pszValue2,\n            /* [in] */ __RPC__in_opt IRichChunk *pPropertyNameTerm,\n            /* [in] */ __RPC__in_opt IRichChunk *pOperationTerm,\n            /* [in] */ __RPC__in_opt IRichChunk *pValueTerm,\n            /* [in] */ BOOL automaticWildcard,\n            /* [out] */ __RPC__out BOOL *pNoStringQuery,\n            /* [retval][out] */ __RPC__deref_out_opt ICondition **ppQueryExpression) = 0;\n        \n        virtual /* [local] */ HRESULT STDMETHODCALLTYPE DefaultPhrase( \n            /* [unique][in] */ LPCWSTR pszValueType,\n            /* [in] */ const PROPVARIANT *ppropvar,\n            /* [in] */ BOOL fUseEnglish,\n            /* [retval][out] */ \n            __deref_opt_out  LPWSTR *ppszPhrase) = 0;\n        \n    };\n    \n#else \t/* C style interface */\n\n    typedef struct IConditionGeneratorVtbl\n    {\n        BEGIN_INTERFACE\n        \n        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \n            IConditionGenerator * This,\n            /* [in] */ __RPC__in REFIID riid,\n            /* [iid_is][out] */ \n            __RPC__deref_out  void **ppvObject);\n        \n        ULONG ( STDMETHODCALLTYPE *AddRef )( \n            IConditionGenerator * This);\n        \n        ULONG ( STDMETHODCALLTYPE *Release )( \n            IConditionGenerator * This);\n        \n        HRESULT ( STDMETHODCALLTYPE *Initialize )( \n            IConditionGenerator * This,\n            /* [in] */ __RPC__in_opt ISchemaProvider *pSchemaProvider);\n        \n        HRESULT ( STDMETHODCALLTYPE *RecognizeNamedEntities )( \n            IConditionGenerator * This,\n            /* [in] */ __RPC__in LPCWSTR pszInputString,\n            /* [in] */ LCID lcid,\n            /* [in] */ __RPC__in_opt ITokenCollection *pTokenCollection,\n            /* [out][in] */ __RPC__inout_opt INamedEntityCollector *pNamedEntities);\n        \n        HRESULT ( STDMETHODCALLTYPE *GenerateForLeaf )( \n            IConditionGenerator * This,\n            /* [in] */ __RPC__in_opt IConditionFactory *pConditionFactory,\n            /* [unique][in] */ __RPC__in_opt LPCWSTR pszPropertyName,\n            /* [in] */ CONDITION_OPERATION op,\n            /* [unique][in] */ __RPC__in_opt LPCWSTR pszValueType,\n            /* [in] */ __RPC__in LPCWSTR pszValue,\n            /* [unique][in] */ __RPC__in_opt LPCWSTR pszValue2,\n            /* [in] */ __RPC__in_opt IRichChunk *pPropertyNameTerm,\n            /* [in] */ __RPC__in_opt IRichChunk *pOperationTerm,\n            /* [in] */ __RPC__in_opt IRichChunk *pValueTerm,\n            /* [in] */ BOOL automaticWildcard,\n            /* [out] */ __RPC__out BOOL *pNoStringQuery,\n            /* [retval][out] */ __RPC__deref_out_opt ICondition **ppQueryExpression);\n        \n        /* [local] */ HRESULT ( STDMETHODCALLTYPE *DefaultPhrase )( \n            IConditionGenerator * This,\n            /* [unique][in] */ LPCWSTR pszValueType,\n            /* [in] */ const PROPVARIANT *ppropvar,\n            /* [in] */ BOOL fUseEnglish,\n            /* [retval][out] */ \n            __deref_opt_out  LPWSTR *ppszPhrase);\n        \n        END_INTERFACE\n    } IConditionGeneratorVtbl;\n\n    interface IConditionGenerator\n    {\n        CONST_VTBL struct IConditionGeneratorVtbl *lpVtbl;\n    };\n\n    \n\n#ifdef COBJMACROS\n\n\n#define IConditionGenerator_QueryInterface(This,riid,ppvObject)\t\\\n    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \n\n#define IConditionGenerator_AddRef(This)\t\\\n    ( (This)->lpVtbl -> AddRef(This) ) \n\n#define IConditionGenerator_Release(This)\t\\\n    ( (This)->lpVtbl -> Release(This) ) \n\n\n#define IConditionGenerator_Initialize(This,pSchemaProvider)\t\\\n    ( (This)->lpVtbl -> Initialize(This,pSchemaProvider) ) \n\n#define IConditionGenerator_RecognizeNamedEntities(This,pszInputString,lcid,pTokenCollection,pNamedEntities)\t\\\n    ( (This)->lpVtbl -> RecognizeNamedEntities(This,pszInputString,lcid,pTokenCollection,pNamedEntities) ) \n\n#define IConditionGenerator_GenerateForLeaf(This,pConditionFactory,pszPropertyName,op,pszValueType,pszValue,pszValue2,pPropertyNameTerm,pOperationTerm,pValueTerm,automaticWildcard,pNoStringQuery,ppQueryExpression)\t\\\n    ( (This)->lpVtbl -> GenerateForLeaf(This,pConditionFactory,pszPropertyName,op,pszValueType,pszValue,pszValue2,pPropertyNameTerm,pOperationTerm,pValueTerm,automaticWildcard,pNoStringQuery,ppQueryExpression) ) \n\n#define IConditionGenerator_DefaultPhrase(This,pszValueType,ppropvar,fUseEnglish,ppszPhrase)\t\\\n    ( (This)->lpVtbl -> DefaultPhrase(This,pszValueType,ppropvar,fUseEnglish,ppszPhrase) ) \n\n#endif /* COBJMACROS */\n\n\n#endif \t/* C style interface */\n\n\n\n\n#endif \t/* __IConditionGenerator_INTERFACE_DEFINED__ */\n\n\n#ifndef __IRichChunk_INTERFACE_DEFINED__\n#define __IRichChunk_INTERFACE_DEFINED__\n\n/* interface IRichChunk */\n/* [unique][uuid][object] */ \n\n\nEXTERN_C const IID IID_IRichChunk;\n\n#if defined(__cplusplus) && !defined(CINTERFACE)\n    \n    MIDL_INTERFACE(\"4FDEF69C-DBC9-454e-9910-B34F3C64B510\")\n    IRichChunk : public IUnknown\n    {\n    public:\n        virtual /* [local] */ HRESULT STDMETHODCALLTYPE GetData( \n            /* [out] */ \n            __out_opt  ULONG *pFirstPos,\n            /* [out] */ \n            __out_opt  ULONG *pLength,\n            /* [out] */ \n            __deref_opt_out  LPWSTR *ppsz,\n            /* [out] */ \n            __out_opt  PROPVARIANT *pValue) = 0;\n        \n    };\n    \n#else \t/* C style interface */\n\n    typedef struct IRichChunkVtbl\n    {\n        BEGIN_INTERFACE\n        \n        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \n            IRichChunk * This,\n            /* [in] */ __RPC__in REFIID riid,\n            /* [iid_is][out] */ \n            __RPC__deref_out  void **ppvObject);\n        \n        ULONG ( STDMETHODCALLTYPE *AddRef )( \n            IRichChunk * This);\n        \n        ULONG ( STDMETHODCALLTYPE *Release )( \n            IRichChunk * This);\n        \n        /* [local] */ HRESULT ( STDMETHODCALLTYPE *GetData )( \n            IRichChunk * This,\n            /* [out] */ \n            __out_opt  ULONG *pFirstPos,\n            /* [out] */ \n            __out_opt  ULONG *pLength,\n            /* [out] */ \n            __deref_opt_out  LPWSTR *ppsz,\n            /* [out] */ \n            __out_opt  PROPVARIANT *pValue);\n        \n        END_INTERFACE\n    } IRichChunkVtbl;\n\n    interface IRichChunk\n    {\n        CONST_VTBL struct IRichChunkVtbl *lpVtbl;\n    };\n\n    \n\n#ifdef COBJMACROS\n\n\n#define IRichChunk_QueryInterface(This,riid,ppvObject)\t\\\n    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \n\n#define IRichChunk_AddRef(This)\t\\\n    ( (This)->lpVtbl -> AddRef(This) ) \n\n#define IRichChunk_Release(This)\t\\\n    ( (This)->lpVtbl -> Release(This) ) \n\n\n#define IRichChunk_GetData(This,pFirstPos,pLength,ppsz,pValue)\t\\\n    ( (This)->lpVtbl -> GetData(This,pFirstPos,pLength,ppsz,pValue) ) \n\n#endif /* COBJMACROS */\n\n\n#endif \t/* C style interface */\n\n\n\n\n#endif \t/* __IRichChunk_INTERFACE_DEFINED__ */\n\n\n#ifndef __IInterval_INTERFACE_DEFINED__\n#define __IInterval_INTERFACE_DEFINED__\n\n/* interface IInterval */\n/* [unique][uuid][object] */ \n\n\nEXTERN_C const IID IID_IInterval;\n\n#if defined(__cplusplus) && !defined(CINTERFACE)\n    \n    MIDL_INTERFACE(\"6BF0A714-3C18-430b-8B5D-83B1C234D3DB\")\n    IInterval : public IUnknown\n    {\n    public:\n        virtual HRESULT STDMETHODCALLTYPE GetLimits( \n            /* [out] */ __RPC__out INTERVAL_LIMIT_KIND *pilkLower,\n            /* [out] */ __RPC__out PROPVARIANT *ppropvarLower,\n            /* [out] */ __RPC__out INTERVAL_LIMIT_KIND *pilkUpper,\n            /* [out] */ __RPC__out PROPVARIANT *ppropvarUpper) = 0;\n        \n    };\n    \n#else \t/* C style interface */\n\n    typedef struct IIntervalVtbl\n    {\n        BEGIN_INTERFACE\n        \n        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \n            IInterval * This,\n            /* [in] */ __RPC__in REFIID riid,\n            /* [iid_is][out] */ \n            __RPC__deref_out  void **ppvObject);\n        \n        ULONG ( STDMETHODCALLTYPE *AddRef )( \n            IInterval * This);\n        \n        ULONG ( STDMETHODCALLTYPE *Release )( \n            IInterval * This);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetLimits )( \n            IInterval * This,\n            /* [out] */ __RPC__out INTERVAL_LIMIT_KIND *pilkLower,\n            /* [out] */ __RPC__out PROPVARIANT *ppropvarLower,\n            /* [out] */ __RPC__out INTERVAL_LIMIT_KIND *pilkUpper,\n            /* [out] */ __RPC__out PROPVARIANT *ppropvarUpper);\n        \n        END_INTERFACE\n    } IIntervalVtbl;\n\n    interface IInterval\n    {\n        CONST_VTBL struct IIntervalVtbl *lpVtbl;\n    };\n\n    \n\n#ifdef COBJMACROS\n\n\n#define IInterval_QueryInterface(This,riid,ppvObject)\t\\\n    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \n\n#define IInterval_AddRef(This)\t\\\n    ( (This)->lpVtbl -> AddRef(This) ) \n\n#define IInterval_Release(This)\t\\\n    ( (This)->lpVtbl -> Release(This) ) \n\n\n#define IInterval_GetLimits(This,pilkLower,ppropvarLower,pilkUpper,ppropvarUpper)\t\\\n    ( (This)->lpVtbl -> GetLimits(This,pilkLower,ppropvarLower,pilkUpper,ppropvarUpper) ) \n\n#endif /* COBJMACROS */\n\n\n#endif \t/* C style interface */\n\n\n\n\n#endif \t/* __IInterval_INTERFACE_DEFINED__ */\n\n\n#ifndef __IMetaData_INTERFACE_DEFINED__\n#define __IMetaData_INTERFACE_DEFINED__\n\n/* interface IMetaData */\n/* [unique][uuid][object][helpstring] */ \n\n\nEXTERN_C const IID IID_IMetaData;\n\n#if defined(__cplusplus) && !defined(CINTERFACE)\n    \n    MIDL_INTERFACE(\"780102B0-C43B-4876-BC7B-5E9BA5C88794\")\n    IMetaData : public IUnknown\n    {\n    public:\n        virtual /* [local] */ HRESULT STDMETHODCALLTYPE GetData( \n            /* [out] */ \n            __deref_opt_out  LPWSTR *ppszKey,\n            /* [out] */ \n            __deref_opt_out  LPWSTR *ppszValue) = 0;\n        \n    };\n    \n#else \t/* C style interface */\n\n    typedef struct IMetaDataVtbl\n    {\n        BEGIN_INTERFACE\n        \n        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \n            IMetaData * This,\n            /* [in] */ __RPC__in REFIID riid,\n            /* [iid_is][out] */ \n            __RPC__deref_out  void **ppvObject);\n        \n        ULONG ( STDMETHODCALLTYPE *AddRef )( \n            IMetaData * This);\n        \n        ULONG ( STDMETHODCALLTYPE *Release )( \n            IMetaData * This);\n        \n        /* [local] */ HRESULT ( STDMETHODCALLTYPE *GetData )( \n            IMetaData * This,\n            /* [out] */ \n            __deref_opt_out  LPWSTR *ppszKey,\n            /* [out] */ \n            __deref_opt_out  LPWSTR *ppszValue);\n        \n        END_INTERFACE\n    } IMetaDataVtbl;\n\n    interface IMetaData\n    {\n        CONST_VTBL struct IMetaDataVtbl *lpVtbl;\n    };\n\n    \n\n#ifdef COBJMACROS\n\n\n#define IMetaData_QueryInterface(This,riid,ppvObject)\t\\\n    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \n\n#define IMetaData_AddRef(This)\t\\\n    ( (This)->lpVtbl -> AddRef(This) ) \n\n#define IMetaData_Release(This)\t\\\n    ( (This)->lpVtbl -> Release(This) ) \n\n\n#define IMetaData_GetData(This,ppszKey,ppszValue)\t\\\n    ( (This)->lpVtbl -> GetData(This,ppszKey,ppszValue) ) \n\n#endif /* COBJMACROS */\n\n\n#endif \t/* C style interface */\n\n\n\n\n#endif \t/* __IMetaData_INTERFACE_DEFINED__ */\n\n\n/* interface __MIDL_itf_structuredquery_0000_0008 */\n/* [local] */ \n\n\n\n\nextern RPC_IF_HANDLE __MIDL_itf_structuredquery_0000_0008_v0_0_c_ifspec;\nextern RPC_IF_HANDLE __MIDL_itf_structuredquery_0000_0008_v0_0_s_ifspec;\n\n#ifndef __IEntity_INTERFACE_DEFINED__\n#define __IEntity_INTERFACE_DEFINED__\n\n/* interface IEntity */\n/* [unique][object][uuid][helpstring] */ \n\n\nEXTERN_C const IID IID_IEntity;\n\n#if defined(__cplusplus) && !defined(CINTERFACE)\n    \n    MIDL_INTERFACE(\"24264891-E80B-4fd3-B7CE-4FF2FAE8931F\")\n    IEntity : public IUnknown\n    {\n    public:\n        virtual /* [local] */ HRESULT STDMETHODCALLTYPE Name( \n            /* [retval][out] */ \n            __deref_opt_out  LPWSTR *ppszName) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE Base( \n            /* [retval][out] */ __RPC__deref_out_opt IEntity **pBaseEntity) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE Relationships( \n            /* [in] */ __RPC__in REFIID riid,\n            /* [iid_is][retval][out] */ __RPC__deref_out_opt void **pRelationships) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE GetRelationship( \n            /* [in] */ __RPC__in LPCWSTR pszRelationName,\n            /* [retval][out] */ __RPC__deref_out_opt IRelationship **pRelationship) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE MetaData( \n            /* [in] */ __RPC__in REFIID riid,\n            /* [iid_is][retval][out] */ __RPC__deref_out_opt void **pMetaData) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE NamedEntities( \n            /* [in] */ __RPC__in REFIID riid,\n            /* [iid_is][retval][out] */ __RPC__deref_out_opt void **pNamedEntities) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE GetNamedEntity( \n            /* [in] */ __RPC__in LPCWSTR pszValue,\n            /* [retval][out] */ __RPC__deref_out_opt INamedEntity **ppNamedEntity) = 0;\n        \n        virtual /* [local] */ HRESULT STDMETHODCALLTYPE DefaultPhrase( \n            /* [retval][out] */ \n            __deref_opt_out  LPWSTR *ppszPhrase) = 0;\n        \n    };\n    \n#else \t/* C style interface */\n\n    typedef struct IEntityVtbl\n    {\n        BEGIN_INTERFACE\n        \n        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \n            IEntity * This,\n            /* [in] */ __RPC__in REFIID riid,\n            /* [iid_is][out] */ \n            __RPC__deref_out  void **ppvObject);\n        \n        ULONG ( STDMETHODCALLTYPE *AddRef )( \n            IEntity * This);\n        \n        ULONG ( STDMETHODCALLTYPE *Release )( \n            IEntity * This);\n        \n        /* [local] */ HRESULT ( STDMETHODCALLTYPE *Name )( \n            IEntity * This,\n            /* [retval][out] */ \n            __deref_opt_out  LPWSTR *ppszName);\n        \n        HRESULT ( STDMETHODCALLTYPE *Base )( \n            IEntity * This,\n            /* [retval][out] */ __RPC__deref_out_opt IEntity **pBaseEntity);\n        \n        HRESULT ( STDMETHODCALLTYPE *Relationships )( \n            IEntity * This,\n            /* [in] */ __RPC__in REFIID riid,\n            /* [iid_is][retval][out] */ __RPC__deref_out_opt void **pRelationships);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetRelationship )( \n            IEntity * This,\n            /* [in] */ __RPC__in LPCWSTR pszRelationName,\n            /* [retval][out] */ __RPC__deref_out_opt IRelationship **pRelationship);\n        \n        HRESULT ( STDMETHODCALLTYPE *MetaData )( \n            IEntity * This,\n            /* [in] */ __RPC__in REFIID riid,\n            /* [iid_is][retval][out] */ __RPC__deref_out_opt void **pMetaData);\n        \n        HRESULT ( STDMETHODCALLTYPE *NamedEntities )( \n            IEntity * This,\n            /* [in] */ __RPC__in REFIID riid,\n            /* [iid_is][retval][out] */ __RPC__deref_out_opt void **pNamedEntities);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetNamedEntity )( \n            IEntity * This,\n            /* [in] */ __RPC__in LPCWSTR pszValue,\n            /* [retval][out] */ __RPC__deref_out_opt INamedEntity **ppNamedEntity);\n        \n        /* [local] */ HRESULT ( STDMETHODCALLTYPE *DefaultPhrase )( \n            IEntity * This,\n            /* [retval][out] */ \n            __deref_opt_out  LPWSTR *ppszPhrase);\n        \n        END_INTERFACE\n    } IEntityVtbl;\n\n    interface IEntity\n    {\n        CONST_VTBL struct IEntityVtbl *lpVtbl;\n    };\n\n    \n\n#ifdef COBJMACROS\n\n\n#define IEntity_QueryInterface(This,riid,ppvObject)\t\\\n    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \n\n#define IEntity_AddRef(This)\t\\\n    ( (This)->lpVtbl -> AddRef(This) ) \n\n#define IEntity_Release(This)\t\\\n    ( (This)->lpVtbl -> Release(This) ) \n\n\n#define IEntity_Name(This,ppszName)\t\\\n    ( (This)->lpVtbl -> Name(This,ppszName) ) \n\n#define IEntity_Base(This,pBaseEntity)\t\\\n    ( (This)->lpVtbl -> Base(This,pBaseEntity) ) \n\n#define IEntity_Relationships(This,riid,pRelationships)\t\\\n    ( (This)->lpVtbl -> Relationships(This,riid,pRelationships) ) \n\n#define IEntity_GetRelationship(This,pszRelationName,pRelationship)\t\\\n    ( (This)->lpVtbl -> GetRelationship(This,pszRelationName,pRelationship) ) \n\n#define IEntity_MetaData(This,riid,pMetaData)\t\\\n    ( (This)->lpVtbl -> MetaData(This,riid,pMetaData) ) \n\n#define IEntity_NamedEntities(This,riid,pNamedEntities)\t\\\n    ( (This)->lpVtbl -> NamedEntities(This,riid,pNamedEntities) ) \n\n#define IEntity_GetNamedEntity(This,pszValue,ppNamedEntity)\t\\\n    ( (This)->lpVtbl -> GetNamedEntity(This,pszValue,ppNamedEntity) ) \n\n#define IEntity_DefaultPhrase(This,ppszPhrase)\t\\\n    ( (This)->lpVtbl -> DefaultPhrase(This,ppszPhrase) ) \n\n#endif /* COBJMACROS */\n\n\n#endif \t/* C style interface */\n\n\n\n\n#endif \t/* __IEntity_INTERFACE_DEFINED__ */\n\n\n#ifndef __IRelationship_INTERFACE_DEFINED__\n#define __IRelationship_INTERFACE_DEFINED__\n\n/* interface IRelationship */\n/* [unique][object][uuid][helpstring] */ \n\n\nEXTERN_C const IID IID_IRelationship;\n\n#if defined(__cplusplus) && !defined(CINTERFACE)\n    \n    MIDL_INTERFACE(\"2769280B-5108-498c-9C7F-A51239B63147\")\n    IRelationship : public IUnknown\n    {\n    public:\n        virtual /* [local] */ HRESULT STDMETHODCALLTYPE Name( \n            /* [retval][out] */ \n            __deref_opt_out  LPWSTR *ppszName) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE IsReal( \n            /* [retval][out] */ __RPC__out BOOL *pIsReal) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE Destination( \n            /* [retval][out] */ __RPC__deref_out_opt IEntity **pDestinationEntity) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE MetaData( \n            /* [in] */ __RPC__in REFIID riid,\n            /* [iid_is][retval][out] */ __RPC__deref_out_opt void **pMetaData) = 0;\n        \n        virtual /* [local] */ HRESULT STDMETHODCALLTYPE DefaultPhrase( \n            /* [retval][out] */ \n            __deref_opt_out  LPWSTR *ppszPhrase) = 0;\n        \n    };\n    \n#else \t/* C style interface */\n\n    typedef struct IRelationshipVtbl\n    {\n        BEGIN_INTERFACE\n        \n        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \n            IRelationship * This,\n            /* [in] */ __RPC__in REFIID riid,\n            /* [iid_is][out] */ \n            __RPC__deref_out  void **ppvObject);\n        \n        ULONG ( STDMETHODCALLTYPE *AddRef )( \n            IRelationship * This);\n        \n        ULONG ( STDMETHODCALLTYPE *Release )( \n            IRelationship * This);\n        \n        /* [local] */ HRESULT ( STDMETHODCALLTYPE *Name )( \n            IRelationship * This,\n            /* [retval][out] */ \n            __deref_opt_out  LPWSTR *ppszName);\n        \n        HRESULT ( STDMETHODCALLTYPE *IsReal )( \n            IRelationship * This,\n            /* [retval][out] */ __RPC__out BOOL *pIsReal);\n        \n        HRESULT ( STDMETHODCALLTYPE *Destination )( \n            IRelationship * This,\n            /* [retval][out] */ __RPC__deref_out_opt IEntity **pDestinationEntity);\n        \n        HRESULT ( STDMETHODCALLTYPE *MetaData )( \n            IRelationship * This,\n            /* [in] */ __RPC__in REFIID riid,\n            /* [iid_is][retval][out] */ __RPC__deref_out_opt void **pMetaData);\n        \n        /* [local] */ HRESULT ( STDMETHODCALLTYPE *DefaultPhrase )( \n            IRelationship * This,\n            /* [retval][out] */ \n            __deref_opt_out  LPWSTR *ppszPhrase);\n        \n        END_INTERFACE\n    } IRelationshipVtbl;\n\n    interface IRelationship\n    {\n        CONST_VTBL struct IRelationshipVtbl *lpVtbl;\n    };\n\n    \n\n#ifdef COBJMACROS\n\n\n#define IRelationship_QueryInterface(This,riid,ppvObject)\t\\\n    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \n\n#define IRelationship_AddRef(This)\t\\\n    ( (This)->lpVtbl -> AddRef(This) ) \n\n#define IRelationship_Release(This)\t\\\n    ( (This)->lpVtbl -> Release(This) ) \n\n\n#define IRelationship_Name(This,ppszName)\t\\\n    ( (This)->lpVtbl -> Name(This,ppszName) ) \n\n#define IRelationship_IsReal(This,pIsReal)\t\\\n    ( (This)->lpVtbl -> IsReal(This,pIsReal) ) \n\n#define IRelationship_Destination(This,pDestinationEntity)\t\\\n    ( (This)->lpVtbl -> Destination(This,pDestinationEntity) ) \n\n#define IRelationship_MetaData(This,riid,pMetaData)\t\\\n    ( (This)->lpVtbl -> MetaData(This,riid,pMetaData) ) \n\n#define IRelationship_DefaultPhrase(This,ppszPhrase)\t\\\n    ( (This)->lpVtbl -> DefaultPhrase(This,ppszPhrase) ) \n\n#endif /* COBJMACROS */\n\n\n#endif \t/* C style interface */\n\n\n\n\n#endif \t/* __IRelationship_INTERFACE_DEFINED__ */\n\n\n#ifndef __INamedEntity_INTERFACE_DEFINED__\n#define __INamedEntity_INTERFACE_DEFINED__\n\n/* interface INamedEntity */\n/* [unique][uuid][object][helpstring] */ \n\n\nEXTERN_C const IID IID_INamedEntity;\n\n#if defined(__cplusplus) && !defined(CINTERFACE)\n    \n    MIDL_INTERFACE(\"ABDBD0B1-7D54-49fb-AB5C-BFF4130004CD\")\n    INamedEntity : public IUnknown\n    {\n    public:\n        virtual HRESULT STDMETHODCALLTYPE GetValue( \n            /* [retval][out] */ __RPC__deref_out_opt LPWSTR *ppszValue) = 0;\n        \n        virtual /* [local] */ HRESULT STDMETHODCALLTYPE DefaultPhrase( \n            /* [retval][out] */ \n            __deref_opt_out  LPWSTR *ppszPhrase) = 0;\n        \n    };\n    \n#else \t/* C style interface */\n\n    typedef struct INamedEntityVtbl\n    {\n        BEGIN_INTERFACE\n        \n        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \n            INamedEntity * This,\n            /* [in] */ __RPC__in REFIID riid,\n            /* [iid_is][out] */ \n            __RPC__deref_out  void **ppvObject);\n        \n        ULONG ( STDMETHODCALLTYPE *AddRef )( \n            INamedEntity * This);\n        \n        ULONG ( STDMETHODCALLTYPE *Release )( \n            INamedEntity * This);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetValue )( \n            INamedEntity * This,\n            /* [retval][out] */ __RPC__deref_out_opt LPWSTR *ppszValue);\n        \n        /* [local] */ HRESULT ( STDMETHODCALLTYPE *DefaultPhrase )( \n            INamedEntity * This,\n            /* [retval][out] */ \n            __deref_opt_out  LPWSTR *ppszPhrase);\n        \n        END_INTERFACE\n    } INamedEntityVtbl;\n\n    interface INamedEntity\n    {\n        CONST_VTBL struct INamedEntityVtbl *lpVtbl;\n    };\n\n    \n\n#ifdef COBJMACROS\n\n\n#define INamedEntity_QueryInterface(This,riid,ppvObject)\t\\\n    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \n\n#define INamedEntity_AddRef(This)\t\\\n    ( (This)->lpVtbl -> AddRef(This) ) \n\n#define INamedEntity_Release(This)\t\\\n    ( (This)->lpVtbl -> Release(This) ) \n\n\n#define INamedEntity_GetValue(This,ppszValue)\t\\\n    ( (This)->lpVtbl -> GetValue(This,ppszValue) ) \n\n#define INamedEntity_DefaultPhrase(This,ppszPhrase)\t\\\n    ( (This)->lpVtbl -> DefaultPhrase(This,ppszPhrase) ) \n\n#endif /* COBJMACROS */\n\n\n#endif \t/* C style interface */\n\n\n\n\n#endif \t/* __INamedEntity_INTERFACE_DEFINED__ */\n\n\n#ifndef __ISchemaProvider_INTERFACE_DEFINED__\n#define __ISchemaProvider_INTERFACE_DEFINED__\n\n/* interface ISchemaProvider */\n/* [unique][object][uuid][helpstring] */ \n\n\nEXTERN_C const IID IID_ISchemaProvider;\n\n#if defined(__cplusplus) && !defined(CINTERFACE)\n    \n    MIDL_INTERFACE(\"8CF89BCB-394C-49b2-AE28-A59DD4ED7F68\")\n    ISchemaProvider : public IUnknown\n    {\n    public:\n        virtual HRESULT STDMETHODCALLTYPE Entities( \n            /* [in] */ __RPC__in REFIID riid,\n            /* [iid_is][retval][out] */ __RPC__deref_out_opt void **pEntities) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE RootEntity( \n            /* [retval][out] */ __RPC__deref_out_opt IEntity **pRootEntity) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE GetEntity( \n            /* [in] */ __RPC__in LPCWSTR pszEntityName,\n            /* [retval][out] */ __RPC__deref_out_opt IEntity **pEntity) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE MetaData( \n            /* [in] */ __RPC__in REFIID riid,\n            /* [iid_is][retval][out] */ __RPC__deref_out_opt void **pMetaData) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE Localize( \n            /* [in] */ LCID lcid,\n            /* [in] */ __RPC__in_opt ISchemaLocalizerSupport *pSchemaLocalizerSupport) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE SaveBinary( \n            /* [in] */ __RPC__in LPCWSTR pszSchemaBinaryPath) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE LookupAuthoredNamedEntity( \n            /* [in] */ __RPC__in_opt IEntity *pEntity,\n            /* [in] */ __RPC__in LPCWSTR pszInputString,\n            /* [in] */ __RPC__in_opt ITokenCollection *pTokenCollection,\n            /* [in] */ ULONG cTokensBegin,\n            /* [out] */ __RPC__out ULONG *pcTokensLength,\n            /* [out] */ __RPC__deref_out_opt LPWSTR *ppszValue) = 0;\n        \n    };\n    \n#else \t/* C style interface */\n\n    typedef struct ISchemaProviderVtbl\n    {\n        BEGIN_INTERFACE\n        \n        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \n            ISchemaProvider * This,\n            /* [in] */ __RPC__in REFIID riid,\n            /* [iid_is][out] */ \n            __RPC__deref_out  void **ppvObject);\n        \n        ULONG ( STDMETHODCALLTYPE *AddRef )( \n            ISchemaProvider * This);\n        \n        ULONG ( STDMETHODCALLTYPE *Release )( \n            ISchemaProvider * This);\n        \n        HRESULT ( STDMETHODCALLTYPE *Entities )( \n            ISchemaProvider * This,\n            /* [in] */ __RPC__in REFIID riid,\n            /* [iid_is][retval][out] */ __RPC__deref_out_opt void **pEntities);\n        \n        HRESULT ( STDMETHODCALLTYPE *RootEntity )( \n            ISchemaProvider * This,\n            /* [retval][out] */ __RPC__deref_out_opt IEntity **pRootEntity);\n        \n        HRESULT ( STDMETHODCALLTYPE *GetEntity )( \n            ISchemaProvider * This,\n            /* [in] */ __RPC__in LPCWSTR pszEntityName,\n            /* [retval][out] */ __RPC__deref_out_opt IEntity **pEntity);\n        \n        HRESULT ( STDMETHODCALLTYPE *MetaData )( \n            ISchemaProvider * This,\n            /* [in] */ __RPC__in REFIID riid,\n            /* [iid_is][retval][out] */ __RPC__deref_out_opt void **pMetaData);\n        \n        HRESULT ( STDMETHODCALLTYPE *Localize )( \n            ISchemaProvider * This,\n            /* [in] */ LCID lcid,\n            /* [in] */ __RPC__in_opt ISchemaLocalizerSupport *pSchemaLocalizerSupport);\n        \n        HRESULT ( STDMETHODCALLTYPE *SaveBinary )( \n            ISchemaProvider * This,\n            /* [in] */ __RPC__in LPCWSTR pszSchemaBinaryPath);\n        \n        HRESULT ( STDMETHODCALLTYPE *LookupAuthoredNamedEntity )( \n            ISchemaProvider * This,\n            /* [in] */ __RPC__in_opt IEntity *pEntity,\n            /* [in] */ __RPC__in LPCWSTR pszInputString,\n            /* [in] */ __RPC__in_opt ITokenCollection *pTokenCollection,\n            /* [in] */ ULONG cTokensBegin,\n            /* [out] */ __RPC__out ULONG *pcTokensLength,\n            /* [out] */ __RPC__deref_out_opt LPWSTR *ppszValue);\n        \n        END_INTERFACE\n    } ISchemaProviderVtbl;\n\n    interface ISchemaProvider\n    {\n        CONST_VTBL struct ISchemaProviderVtbl *lpVtbl;\n    };\n\n    \n\n#ifdef COBJMACROS\n\n\n#define ISchemaProvider_QueryInterface(This,riid,ppvObject)\t\\\n    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \n\n#define ISchemaProvider_AddRef(This)\t\\\n    ( (This)->lpVtbl -> AddRef(This) ) \n\n#define ISchemaProvider_Release(This)\t\\\n    ( (This)->lpVtbl -> Release(This) ) \n\n\n#define ISchemaProvider_Entities(This,riid,pEntities)\t\\\n    ( (This)->lpVtbl -> Entities(This,riid,pEntities) ) \n\n#define ISchemaProvider_RootEntity(This,pRootEntity)\t\\\n    ( (This)->lpVtbl -> RootEntity(This,pRootEntity) ) \n\n#define ISchemaProvider_GetEntity(This,pszEntityName,pEntity)\t\\\n    ( (This)->lpVtbl -> GetEntity(This,pszEntityName,pEntity) ) \n\n#define ISchemaProvider_MetaData(This,riid,pMetaData)\t\\\n    ( (This)->lpVtbl -> MetaData(This,riid,pMetaData) ) \n\n#define ISchemaProvider_Localize(This,lcid,pSchemaLocalizerSupport)\t\\\n    ( (This)->lpVtbl -> Localize(This,lcid,pSchemaLocalizerSupport) ) \n\n#define ISchemaProvider_SaveBinary(This,pszSchemaBinaryPath)\t\\\n    ( (This)->lpVtbl -> SaveBinary(This,pszSchemaBinaryPath) ) \n\n#define ISchemaProvider_LookupAuthoredNamedEntity(This,pEntity,pszInputString,pTokenCollection,cTokensBegin,pcTokensLength,ppszValue)\t\\\n    ( (This)->lpVtbl -> LookupAuthoredNamedEntity(This,pEntity,pszInputString,pTokenCollection,cTokensBegin,pcTokensLength,ppszValue) ) \n\n#endif /* COBJMACROS */\n\n\n#endif \t/* C style interface */\n\n\n\n\n#endif \t/* __ISchemaProvider_INTERFACE_DEFINED__ */\n\n\n#ifndef __ITokenCollection_INTERFACE_DEFINED__\n#define __ITokenCollection_INTERFACE_DEFINED__\n\n/* interface ITokenCollection */\n/* [unique][object][uuid][helpstring] */ \n\n\nEXTERN_C const IID IID_ITokenCollection;\n\n#if defined(__cplusplus) && !defined(CINTERFACE)\n    \n    MIDL_INTERFACE(\"22D8B4F2-F577-4adb-A335-C2AE88416FAB\")\n    ITokenCollection : public IUnknown\n    {\n    public:\n        virtual HRESULT STDMETHODCALLTYPE NumberOfTokens( \n            __RPC__in ULONG *pCount) = 0;\n        \n        virtual /* [local] */ HRESULT STDMETHODCALLTYPE GetToken( \n            /* [in] */ ULONG i,\n            /* [out] */ \n            __out_opt  ULONG *pBegin,\n            /* [out] */ \n            __out_opt  ULONG *pLength,\n            /* [out] */ \n            __deref_opt_out  LPWSTR *ppsz) = 0;\n        \n    };\n    \n#else \t/* C style interface */\n\n    typedef struct ITokenCollectionVtbl\n    {\n        BEGIN_INTERFACE\n        \n        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \n            ITokenCollection * This,\n            /* [in] */ __RPC__in REFIID riid,\n            /* [iid_is][out] */ \n            __RPC__deref_out  void **ppvObject);\n        \n        ULONG ( STDMETHODCALLTYPE *AddRef )( \n            ITokenCollection * This);\n        \n        ULONG ( STDMETHODCALLTYPE *Release )( \n            ITokenCollection * This);\n        \n        HRESULT ( STDMETHODCALLTYPE *NumberOfTokens )( \n            ITokenCollection * This,\n            __RPC__in ULONG *pCount);\n        \n        /* [local] */ HRESULT ( STDMETHODCALLTYPE *GetToken )( \n            ITokenCollection * This,\n            /* [in] */ ULONG i,\n            /* [out] */ \n            __out_opt  ULONG *pBegin,\n            /* [out] */ \n            __out_opt  ULONG *pLength,\n            /* [out] */ \n            __deref_opt_out  LPWSTR *ppsz);\n        \n        END_INTERFACE\n    } ITokenCollectionVtbl;\n\n    interface ITokenCollection\n    {\n        CONST_VTBL struct ITokenCollectionVtbl *lpVtbl;\n    };\n\n    \n\n#ifdef COBJMACROS\n\n\n#define ITokenCollection_QueryInterface(This,riid,ppvObject)\t\\\n    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \n\n#define ITokenCollection_AddRef(This)\t\\\n    ( (This)->lpVtbl -> AddRef(This) ) \n\n#define ITokenCollection_Release(This)\t\\\n    ( (This)->lpVtbl -> Release(This) ) \n\n\n#define ITokenCollection_NumberOfTokens(This,pCount)\t\\\n    ( (This)->lpVtbl -> NumberOfTokens(This,pCount) ) \n\n#define ITokenCollection_GetToken(This,i,pBegin,pLength,ppsz)\t\\\n    ( (This)->lpVtbl -> GetToken(This,i,pBegin,pLength,ppsz) ) \n\n#endif /* COBJMACROS */\n\n\n#endif \t/* C style interface */\n\n\n\n\n#endif \t/* __ITokenCollection_INTERFACE_DEFINED__ */\n\n\n/* interface __MIDL_itf_structuredquery_0000_0013 */\n/* [local] */ \n\ntypedef /* [public][public][v1_enum] */ \nenum __MIDL___MIDL_itf_structuredquery_0000_0013_0001\n    {\tNEC_LOW\t= 0,\n\tNEC_MEDIUM\t= ( NEC_LOW + 1 ) ,\n\tNEC_HIGH\t= ( NEC_MEDIUM + 1 ) \n    } \tNAMED_ENTITY_CERTAINTY;\n\n\n\nextern RPC_IF_HANDLE __MIDL_itf_structuredquery_0000_0013_v0_0_c_ifspec;\nextern RPC_IF_HANDLE __MIDL_itf_structuredquery_0000_0013_v0_0_s_ifspec;\n\n#ifndef __INamedEntityCollector_INTERFACE_DEFINED__\n#define __INamedEntityCollector_INTERFACE_DEFINED__\n\n/* interface INamedEntityCollector */\n/* [unique][object][uuid][helpstring] */ \n\n\nEXTERN_C const IID IID_INamedEntityCollector;\n\n#if defined(__cplusplus) && !defined(CINTERFACE)\n    \n    MIDL_INTERFACE(\"AF2440F6-8AFC-47d0-9A7F-396A0ACFB43D\")\n    INamedEntityCollector : public IUnknown\n    {\n    public:\n        virtual HRESULT STDMETHODCALLTYPE Add( \n            /* [in] */ ULONG beginSpan,\n            /* [in] */ ULONG endSpan,\n            /* [in] */ ULONG beginActual,\n            /* [in] */ ULONG endActual,\n            /* [in] */ __RPC__in_opt IEntity *pType,\n            /* [in] */ __RPC__in LPCWSTR pszValue,\n            /* [in] */ NAMED_ENTITY_CERTAINTY certainty) = 0;\n        \n    };\n    \n#else \t/* C style interface */\n\n    typedef struct INamedEntityCollectorVtbl\n    {\n        BEGIN_INTERFACE\n        \n        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \n            INamedEntityCollector * This,\n            /* [in] */ __RPC__in REFIID riid,\n            /* [iid_is][out] */ \n            __RPC__deref_out  void **ppvObject);\n        \n        ULONG ( STDMETHODCALLTYPE *AddRef )( \n            INamedEntityCollector * This);\n        \n        ULONG ( STDMETHODCALLTYPE *Release )( \n            INamedEntityCollector * This);\n        \n        HRESULT ( STDMETHODCALLTYPE *Add )( \n            INamedEntityCollector * This,\n            /* [in] */ ULONG beginSpan,\n            /* [in] */ ULONG endSpan,\n            /* [in] */ ULONG beginActual,\n            /* [in] */ ULONG endActual,\n            /* [in] */ __RPC__in_opt IEntity *pType,\n            /* [in] */ __RPC__in LPCWSTR pszValue,\n            /* [in] */ NAMED_ENTITY_CERTAINTY certainty);\n        \n        END_INTERFACE\n    } INamedEntityCollectorVtbl;\n\n    interface INamedEntityCollector\n    {\n        CONST_VTBL struct INamedEntityCollectorVtbl *lpVtbl;\n    };\n\n    \n\n#ifdef COBJMACROS\n\n\n#define INamedEntityCollector_QueryInterface(This,riid,ppvObject)\t\\\n    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \n\n#define INamedEntityCollector_AddRef(This)\t\\\n    ( (This)->lpVtbl -> AddRef(This) ) \n\n#define INamedEntityCollector_Release(This)\t\\\n    ( (This)->lpVtbl -> Release(This) ) \n\n\n#define INamedEntityCollector_Add(This,beginSpan,endSpan,beginActual,endActual,pType,pszValue,certainty)\t\\\n    ( (This)->lpVtbl -> Add(This,beginSpan,endSpan,beginActual,endActual,pType,pszValue,certainty) ) \n\n#endif /* COBJMACROS */\n\n\n#endif \t/* C style interface */\n\n\n\n\n#endif \t/* __INamedEntityCollector_INTERFACE_DEFINED__ */\n\n\n#ifndef __ISchemaLocalizerSupport_INTERFACE_DEFINED__\n#define __ISchemaLocalizerSupport_INTERFACE_DEFINED__\n\n/* interface ISchemaLocalizerSupport */\n/* [unique][object][uuid] */ \n\n\nEXTERN_C const IID IID_ISchemaLocalizerSupport;\n\n#if defined(__cplusplus) && !defined(CINTERFACE)\n    \n    MIDL_INTERFACE(\"CA3FDCA2-BFBE-4eed-90D7-0CAEF0A1BDA1\")\n    ISchemaLocalizerSupport : public IUnknown\n    {\n    public:\n        virtual HRESULT STDMETHODCALLTYPE Localize( \n            /* [in] */ __RPC__in LPCWSTR pszGlobalString,\n            /* [retval][out] */ __RPC__deref_out_opt LPWSTR *ppszLocalString) = 0;\n        \n    };\n    \n#else \t/* C style interface */\n\n    typedef struct ISchemaLocalizerSupportVtbl\n    {\n        BEGIN_INTERFACE\n        \n        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \n            ISchemaLocalizerSupport * This,\n            /* [in] */ __RPC__in REFIID riid,\n            /* [iid_is][out] */ \n            __RPC__deref_out  void **ppvObject);\n        \n        ULONG ( STDMETHODCALLTYPE *AddRef )( \n            ISchemaLocalizerSupport * This);\n        \n        ULONG ( STDMETHODCALLTYPE *Release )( \n            ISchemaLocalizerSupport * This);\n        \n        HRESULT ( STDMETHODCALLTYPE *Localize )( \n            ISchemaLocalizerSupport * This,\n            /* [in] */ __RPC__in LPCWSTR pszGlobalString,\n            /* [retval][out] */ __RPC__deref_out_opt LPWSTR *ppszLocalString);\n        \n        END_INTERFACE\n    } ISchemaLocalizerSupportVtbl;\n\n    interface ISchemaLocalizerSupport\n    {\n        CONST_VTBL struct ISchemaLocalizerSupportVtbl *lpVtbl;\n    };\n\n    \n\n#ifdef COBJMACROS\n\n\n#define ISchemaLocalizerSupport_QueryInterface(This,riid,ppvObject)\t\\\n    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \n\n#define ISchemaLocalizerSupport_AddRef(This)\t\\\n    ( (This)->lpVtbl -> AddRef(This) ) \n\n#define ISchemaLocalizerSupport_Release(This)\t\\\n    ( (This)->lpVtbl -> Release(This) ) \n\n\n#define ISchemaLocalizerSupport_Localize(This,pszGlobalString,ppszLocalString)\t\\\n    ( (This)->lpVtbl -> Localize(This,pszGlobalString,ppszLocalString) ) \n\n#endif /* COBJMACROS */\n\n\n#endif \t/* C style interface */\n\n\n\n\n#endif \t/* __ISchemaLocalizerSupport_INTERFACE_DEFINED__ */\n\n\n#ifndef __IQueryParserManager_INTERFACE_DEFINED__\n#define __IQueryParserManager_INTERFACE_DEFINED__\n\n/* interface IQueryParserManager */\n/* [unique][object][uuid] */ \n\n\nEXTERN_C const IID IID_IQueryParserManager;\n\n#if defined(__cplusplus) && !defined(CINTERFACE)\n    \n    MIDL_INTERFACE(\"A879E3C4-AF77-44fb-8F37-EBD1487CF920\")\n    IQueryParserManager : public IUnknown\n    {\n    public:\n        virtual HRESULT STDMETHODCALLTYPE CreateLoadedParser( \n            /* [in] */ __RPC__in LPCWSTR pszCatalog,\n            /* [in] */ LANGID langidForKeywords,\n            /* [in] */ __RPC__in REFIID riid,\n            /* [iid_is][retval][out] */ __RPC__deref_out_opt void **ppQueryParser) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE InitializeOptions( \n            /* [in] */ BOOL fUnderstandNQS,\n            /* [in] */ BOOL fAutoWildCard,\n            /* [in] */ __RPC__in_opt IQueryParser *pQueryParser) = 0;\n        \n        virtual HRESULT STDMETHODCALLTYPE SetOption( \n            /* [in] */ QUERY_PARSER_MANAGER_OPTION option,\n            /* [in] */ __RPC__in const PROPVARIANT *pOptionValue) = 0;\n        \n    };\n    \n#else \t/* C style interface */\n\n    typedef struct IQueryParserManagerVtbl\n    {\n        BEGIN_INTERFACE\n        \n        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \n            IQueryParserManager * This,\n            /* [in] */ __RPC__in REFIID riid,\n            /* [iid_is][out] */ \n            __RPC__deref_out  void **ppvObject);\n        \n        ULONG ( STDMETHODCALLTYPE *AddRef )( \n            IQueryParserManager * This);\n        \n        ULONG ( STDMETHODCALLTYPE *Release )( \n            IQueryParserManager * This);\n        \n        HRESULT ( STDMETHODCALLTYPE *CreateLoadedParser )( \n            IQueryParserManager * This,\n            /* [in] */ __RPC__in LPCWSTR pszCatalog,\n            /* [in] */ LANGID langidForKeywords,\n            /* [in] */ __RPC__in REFIID riid,\n            /* [iid_is][retval][out] */ __RPC__deref_out_opt void **ppQueryParser);\n        \n        HRESULT ( STDMETHODCALLTYPE *InitializeOptions )( \n            IQueryParserManager * This,\n            /* [in] */ BOOL fUnderstandNQS,\n            /* [in] */ BOOL fAutoWildCard,\n            /* [in] */ __RPC__in_opt IQueryParser *pQueryParser);\n        \n        HRESULT ( STDMETHODCALLTYPE *SetOption )( \n            IQueryParserManager * This,\n            /* [in] */ QUERY_PARSER_MANAGER_OPTION option,\n            /* [in] */ __RPC__in const PROPVARIANT *pOptionValue);\n        \n        END_INTERFACE\n    } IQueryParserManagerVtbl;\n\n    interface IQueryParserManager\n    {\n        CONST_VTBL struct IQueryParserManagerVtbl *lpVtbl;\n    };\n\n    \n\n#ifdef COBJMACROS\n\n\n#define IQueryParserManager_QueryInterface(This,riid,ppvObject)\t\\\n    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \n\n#define IQueryParserManager_AddRef(This)\t\\\n    ( (This)->lpVtbl -> AddRef(This) ) \n\n#define IQueryParserManager_Release(This)\t\\\n    ( (This)->lpVtbl -> Release(This) ) \n\n\n#define IQueryParserManager_CreateLoadedParser(This,pszCatalog,langidForKeywords,riid,ppQueryParser)\t\\\n    ( (This)->lpVtbl -> CreateLoadedParser(This,pszCatalog,langidForKeywords,riid,ppQueryParser) ) \n\n#define IQueryParserManager_InitializeOptions(This,fUnderstandNQS,fAutoWildCard,pQueryParser)\t\\\n    ( (This)->lpVtbl -> InitializeOptions(This,fUnderstandNQS,fAutoWildCard,pQueryParser) ) \n\n#define IQueryParserManager_SetOption(This,option,pOptionValue)\t\\\n    ( (This)->lpVtbl -> SetOption(This,option,pOptionValue) ) \n\n#endif /* COBJMACROS */\n\n\n#endif \t/* C style interface */\n\n\n\n\n#endif \t/* __IQueryParserManager_INTERFACE_DEFINED__ */\n\n\n\n#ifndef __StructuredQuery1_LIBRARY_DEFINED__\n#define __StructuredQuery1_LIBRARY_DEFINED__\n\n/* library StructuredQuery1 */\n/* [version][uuid] */ \n\n\nEXTERN_C const IID LIBID_StructuredQuery1;\n\nEXTERN_C const CLSID CLSID_QueryParser;\n\n#ifdef __cplusplus\n\nclass DECLSPEC_UUID(\"B72F8FD8-0FAB-4dd9-BDBF-245A6CE1485B\")\nQueryParser;\n#endif\n\nEXTERN_C const CLSID CLSID_NegationCondition;\n\n#ifdef __cplusplus\n\nclass DECLSPEC_UUID(\"8DE9C74C-605A-4acd-BEE3-2B222AA2D23D\")\nNegationCondition;\n#endif\n\nEXTERN_C const CLSID CLSID_CompoundCondition;\n\n#ifdef __cplusplus\n\nclass DECLSPEC_UUID(\"116F8D13-101E-4fa5-84D4-FF8279381935\")\nCompoundCondition;\n#endif\n\nEXTERN_C const CLSID CLSID_LeafCondition;\n\n#ifdef __cplusplus\n\nclass DECLSPEC_UUID(\"52F15C89-5A17-48e1-BBCD-46A3F89C7CC2\")\nLeafCondition;\n#endif\n\nEXTERN_C const CLSID CLSID_ConditionFactory;\n\n#ifdef __cplusplus\n\nclass DECLSPEC_UUID(\"E03E85B0-7BE3-4000-BA98-6C13DE9FA486\")\nConditionFactory;\n#endif\n\nEXTERN_C const CLSID CLSID_Interval;\n\n#ifdef __cplusplus\n\nclass DECLSPEC_UUID(\"D957171F-4BF9-4de2-BCD5-C70A7CA55836\")\nInterval;\n#endif\n\nEXTERN_C const CLSID CLSID_QueryParserManager;\n\n#ifdef __cplusplus\n\nclass DECLSPEC_UUID(\"5088B39A-29B4-4d9d-8245-4EE289222F66\")\nQueryParserManager;\n#endif\n#endif /* __StructuredQuery1_LIBRARY_DEFINED__ */\n\n/* Additional Prototypes for ALL interfaces */\n\nunsigned long             __RPC_USER  BSTR_UserSize(     unsigned long *, unsigned long            , BSTR * ); \nunsigned char * __RPC_USER  BSTR_UserMarshal(  unsigned long *, unsigned char *, BSTR * ); \nunsigned char * __RPC_USER  BSTR_UserUnmarshal(unsigned long *, unsigned char *, BSTR * ); \nvoid                      __RPC_USER  BSTR_UserFree(     unsigned long *, BSTR * ); \n\nunsigned long             __RPC_USER  LPSAFEARRAY_UserSize(     unsigned long *, unsigned long            , LPSAFEARRAY * ); \nunsigned char * __RPC_USER  LPSAFEARRAY_UserMarshal(  unsigned long *, unsigned char *, LPSAFEARRAY * ); \nunsigned char * __RPC_USER  LPSAFEARRAY_UserUnmarshal(unsigned long *, unsigned char *, LPSAFEARRAY * ); \nvoid                      __RPC_USER  LPSAFEARRAY_UserFree(     unsigned long *, LPSAFEARRAY * ); \n\n/* end of Additional Prototypes */\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif\n\n\n\n"
  },
  {
    "path": "thirdparty/portaudio/src/hostapi/wasapi/mingw-include/winapifamily.h",
    "content": "/**\n * This file is part of the mingw-w64 runtime package.\n * No warranty is given; refer to the file DISCLAIMER within this package.\n */\n\n#ifndef _INC_WINAPIFAMILY\n#define _INC_WINAPIFAMILY\n\n#define WINAPI_PARTITION_DESKTOP 0x1\n#define WINAPI_PARTITION_APP     0x2    \n\n#define WINAPI_FAMILY_APP WINAPI_PARTITION_APP\n#define WINAPI_FAMILY_DESKTOP_APP (WINAPI_PARTITION_DESKTOP \\\n\t\t\t\t   | WINAPI_PARTITION_APP)    \n\n/* WINAPI_FAMILY can be either desktop + App, or App.  */\n#ifndef WINAPI_FAMILY\n#define WINAPI_FAMILY WINAPI_FAMILY_DESKTOP_APP\n#endif\n\n#define WINAPI_FAMILY_PARTITION(v) ((WINAPI_FAMILY & v) == v)\n#define WINAPI_FAMILY_ONE_PARTITION(vset, v) ((WINAPI_FAMILY & vset) == v)\n\n#endif \n"
  },
  {
    "path": "thirdparty/portaudio/src/hostapi/wasapi/pa_win_wasapi.c",
    "content": "/*\n * Portable Audio I/O Library WASAPI implementation\n * Copyright (c) 2006-2010 David Viens\n * Copyright (c) 2010-2019 Dmitry Kostjuchenko\n *\n * Based on the Open Source API proposed by Ross Bencina\n * Copyright (c) 1999-2019 Ross Bencina, Phil Burk\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n/** @file\n @ingroup hostapi_src\n @brief WASAPI implementation of support for a host API.\n @note pa_wasapi currently requires minimum VC 2005, and the latest Vista SDK\n*/\n\n#include <windows.h>\n#include <stdio.h>\n#include <process.h>\n#include <assert.h>\n\n// Max device count (if defined) causes max constant device count in the device list that\n// enables PaWasapi_UpdateDeviceList() API and makes it possible to update WASAPI list dynamically\n#ifndef PA_WASAPI_MAX_CONST_DEVICE_COUNT\n    #define PA_WASAPI_MAX_CONST_DEVICE_COUNT 0 // Force basic behavior by defining 0 if not defined by user\n#endif\n\n// Fallback from Event to the Polling method in case if latency is higher than 21.33ms, as it allows to use\n// 100% of CPU inside the PA's callback.\n// Note: Some USB DAC drivers are buggy when Polling method is forced in Exclusive mode, audio output becomes\n//       unstable with a lot of interruptions, therefore this define is optional. The default behavior is to\n//       not change the Event mode to Polling and use the mode which user provided.\n//#define PA_WASAPI_FORCE_POLL_IF_LARGE_BUFFER\n\n//! Poll mode time slots logging.\n//#define PA_WASAPI_LOG_TIME_SLOTS\n\n// WinRT\n#if defined(WINAPI_FAMILY) && (WINAPI_FAMILY == WINAPI_FAMILY_APP)\n    #define PA_WINRT\n    #define INITGUID\n#endif\n\n// WASAPI\n// using adjustments for MinGW build from @mgeier/MXE\n// https://github.com/mxe/mxe/commit/f4bbc45682f021948bdaefd9fd476e2a04c4740f\n#include <mmreg.h>  // must be before other Wasapi headers\n#if defined(_MSC_VER) && (_MSC_VER >= 1400) || defined(__MINGW64_VERSION_MAJOR)\n    #include <avrt.h>\n    #define COBJMACROS\n    #include <audioclient.h>\n    #include <endpointvolume.h>\n    #define INITGUID // Avoid additional linkage of static libs, excessive code will be optimized out by the compiler\n#ifndef _MSC_VER\n    #include <functiondiscoverykeys_devpkey.h>\n#endif\n    #include <functiondiscoverykeys.h>\n    #include <mmdeviceapi.h>\n    #include <devicetopology.h>    // Used to get IKsJackDescription interface\n    #undef INITGUID\n// Visual Studio 2010 does not support the inline keyword\n#if (_MSC_VER <= 1600)\n    #define inline _inline\n#endif\n#endif\n#ifndef __MWERKS__\n    #include <malloc.h>\n    #include <memory.h>\n#endif\n#ifndef PA_WINRT\n    #include <mmsystem.h>\n#endif\n\n#include \"pa_util.h\"\n#include \"pa_allocation.h\"\n#include \"pa_hostapi.h\"\n#include \"pa_stream.h\"\n#include \"pa_cpuload.h\"\n#include \"pa_process.h\"\n#include \"pa_win_wasapi.h\"\n#include \"pa_debugprint.h\"\n#include \"pa_ringbuffer.h\"\n#include \"pa_win_coinitialize.h\"\n\n#if !defined(NTDDI_VERSION) || (defined(__GNUC__) && (__GNUC__ <= 6) && !defined(__MINGW64__))\n\n    #undef WINVER\n    #undef _WIN32_WINNT\n    #define WINVER       0x0600 // VISTA\n    #define _WIN32_WINNT WINVER\n\n    #ifndef WINAPI\n        #define WINAPI __stdcall\n    #endif\n\n    #ifndef __unaligned\n        #define __unaligned\n    #endif\n\n    #ifndef __C89_NAMELESS\n        #define __C89_NAMELESS\n    #endif\n\n    #ifndef _AVRT_ //<< fix MinGW dummy compile by defining missing type: AVRT_PRIORITY\n        typedef enum _AVRT_PRIORITY\n        {\n            AVRT_PRIORITY_LOW = -1,\n            AVRT_PRIORITY_NORMAL,\n            AVRT_PRIORITY_HIGH,\n            AVRT_PRIORITY_CRITICAL\n        } AVRT_PRIORITY, *PAVRT_PRIORITY;\n    #endif\n\n    #include <basetyps.h> // << for IID/CLSID\n    #include <rpcsal.h>\n    #include <sal.h>\n\n    #ifndef __LPCGUID_DEFINED__\n        #define __LPCGUID_DEFINED__\n        typedef const GUID *LPCGUID;\n    #endif\n    typedef GUID IID;\n    typedef GUID CLSID;\n\n    #ifndef PROPERTYKEY_DEFINED\n        #define PROPERTYKEY_DEFINED\n        typedef struct _tagpropertykey\n        {\n            GUID fmtid;\n            DWORD pid;\n        }     PROPERTYKEY;\n    #endif\n\n    #ifdef __midl_proxy\n        #define __MIDL_CONST\n    #else\n        #define __MIDL_CONST const\n    #endif\n\n    #ifdef WIN64\n        #include <wtypes.h>\n        #define FASTCALL\n        #include <oleidl.h>\n        #include <objidl.h>\n    #else\n        typedef struct _BYTE_BLOB\n        {\n            unsigned long clSize;\n            unsigned char abData[ 1 ];\n        }     BYTE_BLOB;\n        typedef /* [unique] */  __RPC_unique_pointer BYTE_BLOB *UP_BYTE_BLOB;\n        typedef LONGLONG REFERENCE_TIME;\n        #define NONAMELESSUNION\n    #endif\n\n    #ifndef NT_SUCCESS\n        typedef LONG NTSTATUS;\n    #endif\n\n    #ifndef WAVE_FORMAT_IEEE_FLOAT\n        #define WAVE_FORMAT_IEEE_FLOAT 0x0003 // 32-bit floating-point\n    #endif\n\n    #ifndef __MINGW_EXTENSION\n        #if defined(__GNUC__) || defined(__GNUG__)\n            #define __MINGW_EXTENSION __extension__\n        #else\n            #define __MINGW_EXTENSION\n        #endif\n    #endif\n\n    #include <sdkddkver.h>\n    #include <propkeydef.h>\n    #define COBJMACROS\n    #define INITGUID // Avoid additional linkage of static libs, excessive code will be optimized out by the compiler\n    #include <audioclient.h>\n    #include <mmdeviceapi.h>\n    #include <endpointvolume.h>\n    #include <functiondiscoverykeys.h>\n    #include <devicetopology.h>    // Used to get IKsJackDescription interface\n    #undef INITGUID\n\n#endif // NTDDI_VERSION\n\n// Missing declarations for WinRT\n#ifdef PA_WINRT\n\n    #define DEVICE_STATE_ACTIVE 0x00000001\n\n    typedef enum _EDataFlow\n    {\n        eRender                 = 0,\n        eCapture                = ( eRender + 1 ) ,\n        eAll                    = ( eCapture + 1 ) ,\n        EDataFlow_enum_count    = ( eAll + 1 )\n    }\n    EDataFlow;\n\n    typedef enum _EndpointFormFactor\n    {\n        RemoteNetworkDevice       = 0,\n        Speakers                  = ( RemoteNetworkDevice + 1 ) ,\n        LineLevel                 = ( Speakers + 1 ) ,\n        Headphones                = ( LineLevel + 1 ) ,\n        Microphone                = ( Headphones + 1 ) ,\n        Headset                   = ( Microphone + 1 ) ,\n        Handset                   = ( Headset + 1 ) ,\n        UnknownDigitalPassthrough = ( Handset + 1 ) ,\n        SPDIF                     = ( UnknownDigitalPassthrough + 1 ) ,\n        HDMI                      = ( SPDIF + 1 ) ,\n        UnknownFormFactor         = ( HDMI + 1 )\n    }\n    EndpointFormFactor;\n\n#endif\n\n#ifndef GUID_SECT\n    #define GUID_SECT\n#endif\n\n#define __DEFINE_GUID(n,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) static const GUID n GUID_SECT = {l,w1,w2,{b1,b2,b3,b4,b5,b6,b7,b8}}\n#define __DEFINE_IID(n,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) static const IID n GUID_SECT = {l,w1,w2,{b1,b2,b3,b4,b5,b6,b7,b8}}\n#define __DEFINE_CLSID(n,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) static const CLSID n GUID_SECT = {l,w1,w2,{b1,b2,b3,b4,b5,b6,b7,b8}}\n#define PA_DEFINE_CLSID(className, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \\\n    __DEFINE_CLSID(pa_CLSID_##className, 0x##l, 0x##w1, 0x##w2, 0x##b1, 0x##b2, 0x##b3, 0x##b4, 0x##b5, 0x##b6, 0x##b7, 0x##b8)\n#define PA_DEFINE_IID(interfaceName, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \\\n    __DEFINE_IID(pa_IID_##interfaceName, 0x##l, 0x##w1, 0x##w2, 0x##b1, 0x##b2, 0x##b3, 0x##b4, 0x##b5, 0x##b6, 0x##b7, 0x##b8)\n\n// \"1CB9AD4C-DBFA-4c32-B178-C2F568A703B2\"\nPA_DEFINE_IID(IAudioClient,         1cb9ad4c, dbfa, 4c32, b1, 78, c2, f5, 68, a7, 03, b2);\n// \"726778CD-F60A-4EDA-82DE-E47610CD78AA\"\nPA_DEFINE_IID(IAudioClient2,        726778cd, f60a, 4eda, 82, de, e4, 76, 10, cd, 78, aa);\n// \"7ED4EE07-8E67-4CD4-8C1A-2B7A5987AD42\"\nPA_DEFINE_IID(IAudioClient3,        7ed4ee07, 8e67, 4cd4, 8c, 1a, 2b, 7a, 59, 87, ad, 42);\n// \"1BE09788-6894-4089-8586-9A2A6C265AC5\"\nPA_DEFINE_IID(IMMEndpoint,          1be09788, 6894, 4089, 85, 86, 9a, 2a, 6c, 26, 5a, c5);\n// \"A95664D2-9614-4F35-A746-DE8DB63617E6\"\nPA_DEFINE_IID(IMMDeviceEnumerator,  a95664d2, 9614, 4f35, a7, 46, de, 8d, b6, 36, 17, e6);\n// \"BCDE0395-E52F-467C-8E3D-C4579291692E\"\nPA_DEFINE_CLSID(IMMDeviceEnumerator,bcde0395, e52f, 467c, 8e, 3d, c4, 57, 92, 91, 69, 2e);\n// \"F294ACFC-3146-4483-A7BF-ADDCA7C260E2\"\nPA_DEFINE_IID(IAudioRenderClient,   f294acfc, 3146, 4483, a7, bf, ad, dc, a7, c2, 60, e2);\n// \"C8ADBD64-E71E-48a0-A4DE-185C395CD317\"\nPA_DEFINE_IID(IAudioCaptureClient,  c8adbd64, e71e, 48a0, a4, de, 18, 5c, 39, 5c, d3, 17);\n// *2A07407E-6497-4A18-9787-32F79BD0D98F*  Or this??\nPA_DEFINE_IID(IDeviceTopology,      2A07407E, 6497, 4A18, 97, 87, 32, f7, 9b, d0, d9, 8f);\n// *AE2DE0E4-5BCA-4F2D-AA46-5D13F8FDB3A9*\nPA_DEFINE_IID(IPart,                AE2DE0E4, 5BCA, 4F2D, aa, 46, 5d, 13, f8, fd, b3, a9);\n// *4509F757-2D46-4637-8E62-CE7DB944F57B*\nPA_DEFINE_IID(IKsJackDescription,   4509F757, 2D46, 4637, 8e, 62, ce, 7d, b9, 44, f5, 7b);\n\n// Media formats:\n__DEFINE_GUID(pa_KSDATAFORMAT_SUBTYPE_PCM,        0x00000001, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71 );\n__DEFINE_GUID(pa_KSDATAFORMAT_SUBTYPE_ADPCM,      0x00000002, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71 );\n__DEFINE_GUID(pa_KSDATAFORMAT_SUBTYPE_IEEE_FLOAT, 0x00000003, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71 );\n\n#ifdef __IAudioClient2_INTERFACE_DEFINED__\ntypedef enum _pa_AUDCLNT_STREAMOPTIONS {\n    pa_AUDCLNT_STREAMOPTIONS_NONE          = 0x00,\n    pa_AUDCLNT_STREAMOPTIONS_RAW           = 0x01,\n    pa_AUDCLNT_STREAMOPTIONS_MATCH_FORMAT  = 0x02\n} pa_AUDCLNT_STREAMOPTIONS;\ntypedef struct _pa_AudioClientProperties {\n    UINT32                   cbSize;\n    BOOL                     bIsOffload;\n    AUDIO_STREAM_CATEGORY    eCategory;\n    pa_AUDCLNT_STREAMOPTIONS Options;\n} pa_AudioClientProperties;\n#define PA_AUDIOCLIENTPROPERTIES_SIZE_CATEGORY (sizeof(pa_AudioClientProperties) - sizeof(pa_AUDCLNT_STREAMOPTIONS))\n#define PA_AUDIOCLIENTPROPERTIES_SIZE_OPTIONS   sizeof(pa_AudioClientProperties)\n#endif // __IAudioClient2_INTERFACE_DEFINED__\n\n/* use CreateThread for CYGWIN/Windows Mobile, _beginthreadex for all others */\n#if !defined(__CYGWIN__) && !defined(_WIN32_WCE)\n    #define CREATE_THREAD(PROC) (HANDLE)_beginthreadex( NULL, 0, (PROC), stream, 0, &stream->dwThreadId )\n    #define PA_THREAD_FUNC static unsigned WINAPI\n    #define PA_THREAD_ID unsigned\n#else\n    #define CREATE_THREAD(PROC) CreateThread( NULL, 0, (PROC), stream, 0, &stream->dwThreadId )\n    #define PA_THREAD_FUNC static DWORD WINAPI\n    #define PA_THREAD_ID DWORD\n#endif\n\n// Thread function forward decl.\nPA_THREAD_FUNC ProcThreadEvent(void *param);\nPA_THREAD_FUNC ProcThreadPoll(void *param);\n\n// Error codes (available since Windows 7)\n#ifndef AUDCLNT_E_BUFFER_ERROR\n    #define AUDCLNT_E_BUFFER_ERROR AUDCLNT_ERR(0x018)\n#endif\n#ifndef AUDCLNT_E_BUFFER_SIZE_NOT_ALIGNED\n    #define AUDCLNT_E_BUFFER_SIZE_NOT_ALIGNED AUDCLNT_ERR(0x019)\n#endif\n#ifndef AUDCLNT_E_INVALID_DEVICE_PERIOD\n    #define AUDCLNT_E_INVALID_DEVICE_PERIOD AUDCLNT_ERR(0x020)\n#endif\n\n// Stream flags (available since Windows 7)\n#ifndef AUDCLNT_STREAMFLAGS_SRC_DEFAULT_QUALITY\n    #define AUDCLNT_STREAMFLAGS_SRC_DEFAULT_QUALITY 0x08000000\n#endif\n#ifndef AUDCLNT_STREAMFLAGS_AUTOCONVERTPCM\n    #define AUDCLNT_STREAMFLAGS_AUTOCONVERTPCM 0x80000000\n#endif\n\n#define PA_WASAPI_DEVICE_ID_LEN   256\n#define PA_WASAPI_DEVICE_NAME_LEN 128\n#ifdef PA_WINRT\n    #define PA_WASAPI_DEVICE_MAX_COUNT 16\n#endif\n\nenum { S_INPUT = 0, S_OUTPUT = 1, S_COUNT = 2, S_FULLDUPLEX = 0 };\n\n// Number of packets which compose single contignous buffer. With trial and error it was calculated\n// that WASAPI Input sub-system uses 6 packets per whole buffer. Please provide more information\n// or corrections if available.\nenum { WASAPI_PACKETS_PER_INPUT_BUFFER = 6 };\n\n#define STATIC_ARRAY_SIZE(array) (sizeof(array)/sizeof(array[0]))\n\n#define PRINT(x) PA_DEBUG(x);\n\n#define PA_SKELETON_SET_LAST_HOST_ERROR( errorCode, errorText ) \\\n    PaUtil_SetLastHostErrorInfo( paWASAPI, errorCode, errorText )\n\n#define PA_WASAPI__IS_FULLDUPLEX(STREAM) ((STREAM)->in.clientProc && (STREAM)->out.clientProc)\n\n#ifndef IF_FAILED_JUMP\n#define IF_FAILED_JUMP(hr, label) if(FAILED(hr)) goto label;\n#endif\n\n#ifndef IF_FAILED_INTERNAL_ERROR_JUMP\n#define IF_FAILED_INTERNAL_ERROR_JUMP(hr, error, label) if(FAILED(hr)) { error = paInternalError; goto label; }\n#endif\n\n#define SAFE_CLOSE(h) if ((h) != NULL) { CloseHandle((h)); (h) = NULL; }\n#define SAFE_RELEASE(punk) if ((punk) != NULL) { (punk)->lpVtbl->Release((punk)); (punk) = NULL; }\n\n// Mixer function\ntypedef void (*MixMonoToStereoF) (void *__to, const void *__from, UINT32 count);\n\n// AVRT is the new \"multimedia scheduling stuff\"\n#ifndef PA_WINRT\ntypedef BOOL   (WINAPI *FAvRtCreateThreadOrderingGroup)  (PHANDLE,PLARGE_INTEGER,GUID*,PLARGE_INTEGER);\ntypedef BOOL   (WINAPI *FAvRtDeleteThreadOrderingGroup)  (HANDLE);\ntypedef BOOL   (WINAPI *FAvRtWaitOnThreadOrderingGroup)  (HANDLE);\ntypedef HANDLE (WINAPI *FAvSetMmThreadCharacteristics)   (LPCSTR,LPDWORD);\ntypedef BOOL   (WINAPI *FAvRevertMmThreadCharacteristics)(HANDLE);\ntypedef BOOL   (WINAPI *FAvSetMmThreadPriority)          (HANDLE,AVRT_PRIORITY);\nstatic HMODULE hDInputDLL = 0;\nFAvRtCreateThreadOrderingGroup   pAvRtCreateThreadOrderingGroup = NULL;\nFAvRtDeleteThreadOrderingGroup   pAvRtDeleteThreadOrderingGroup = NULL;\nFAvRtWaitOnThreadOrderingGroup   pAvRtWaitOnThreadOrderingGroup = NULL;\nFAvSetMmThreadCharacteristics    pAvSetMmThreadCharacteristics = NULL;\nFAvRevertMmThreadCharacteristics pAvRevertMmThreadCharacteristics = NULL;\nFAvSetMmThreadPriority           pAvSetMmThreadPriority = NULL;\n#endif\n\n#define _GetProc(fun, type, name)  {                                                        \\\n                                        fun = (type) GetProcAddress(hDInputDLL,name);       \\\n                                        if (fun == NULL) {                                  \\\n                                            PRINT((\"GetProcAddr failed for %s\" ,name));     \\\n                                            return FALSE;                                   \\\n                                        }                                                   \\\n                                    }                                                       \\\n\n// ------------------------------------------------------------------------------------------\n/* prototypes for functions declared in this file */\n#ifdef __cplusplus\nextern \"C\"\n{\n#endif /* __cplusplus */\nPaError PaWasapi_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index );\n#ifdef __cplusplus\n}\n#endif /* __cplusplus */\n// dummy entry point for other compilers and sdks\n// currently built using RC1 SDK (5600)\n//#if _MSC_VER < 1400\n//PaError PaWasapi_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex hostApiIndex )\n//{\n    //return paNoError;\n//}\n//#else\n\n// ------------------------------------------------------------------------------------------\nstatic void Terminate( struct PaUtilHostApiRepresentation *hostApi );\nstatic PaError IsFormatSupported( struct PaUtilHostApiRepresentation *hostApi,\n                                  const PaStreamParameters *inputParameters,\n                                  const PaStreamParameters *outputParameters,\n                                  double sampleRate );\nstatic PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,\n                           PaStream** s,\n                           const PaStreamParameters *inputParameters,\n                           const PaStreamParameters *outputParameters,\n                           double sampleRate,\n                           unsigned long framesPerBuffer,\n                           PaStreamFlags streamFlags,\n                           PaStreamCallback *streamCallback,\n                           void *userData );\nstatic PaError CloseStream( PaStream* stream );\nstatic PaError StartStream( PaStream *stream );\nstatic PaError StopStream( PaStream *stream );\nstatic PaError AbortStream( PaStream *stream );\nstatic PaError IsStreamStopped( PaStream *s );\nstatic PaError IsStreamActive( PaStream *stream );\nstatic PaTime GetStreamTime( PaStream *stream );\nstatic double GetStreamCpuLoad( PaStream* stream );\nstatic PaError ReadStream( PaStream* stream, void *buffer, unsigned long frames );\nstatic PaError WriteStream( PaStream* stream, const void *buffer, unsigned long frames );\nstatic signed long GetStreamReadAvailable( PaStream* stream );\nstatic signed long GetStreamWriteAvailable( PaStream* stream );\n\n// ------------------------------------------------------------------------------------------\n/*\n These are fields that can be gathered from IDevice and IAudioDevice PRIOR to Initialize, and\n done in first pass i assume that neither of these will cause the Driver to \"load\", but again,\n who knows how they implement their stuff\n */\ntypedef struct PaWasapiDeviceInfo\n{\n    // Device\n#ifndef PA_WINRT\n    IMMDevice *device;\n#endif\n\n    // device Id\n    WCHAR deviceId[PA_WASAPI_DEVICE_ID_LEN];\n\n    // from GetState\n    DWORD state;\n\n    // Fields filled from IAudioDevice (_prior_ to Initialize)\n    // from GetDevicePeriod(\n    REFERENCE_TIME DefaultDevicePeriod;\n    REFERENCE_TIME MinimumDevicePeriod;\n\n    // Default format (setup through Control Panel by user)\n    WAVEFORMATEXTENSIBLE DefaultFormat;\n\n    // Mix format (internal format used by WASAPI audio engine)\n    WAVEFORMATEXTENSIBLE MixFormat;\n\n    // Fields filled from IMMEndpoint'sGetDataFlow\n    EDataFlow flow;\n\n    // Form-factor\n    EndpointFormFactor formFactor;\n}\nPaWasapiDeviceInfo;\n\n// ------------------------------------------------------------------------------------------\n/* PaWasapiHostApiRepresentation - host api datastructure specific to this implementation */\ntypedef struct\n{\n    PaUtilHostApiRepresentation inheritedHostApiRep;\n    PaUtilStreamInterface       callbackStreamInterface;\n    PaUtilStreamInterface       blockingStreamInterface;\n\n    PaUtilAllocationGroup      *allocations;\n\n    /* implementation specific data goes here */\n\n    PaWinUtilComInitializationResult comInitializationResult;\n\n    // this is the REAL number of devices, whether they are useful to PA or not!\n    UINT32 deviceCount;\n\n    PaWasapiDeviceInfo *devInfo;\n\n    // is TRUE when WOW64 Vista/7 Workaround is needed\n    BOOL useWOW64Workaround;\n}\nPaWasapiHostApiRepresentation;\n\n// ------------------------------------------------------------------------------------------\n/* PaWasapiAudioClientParams - audio client parameters */\ntypedef struct PaWasapiAudioClientParams\n{\n    PaWasapiDeviceInfo *device_info;\n    PaStreamParameters  stream_params;\n    PaWasapiStreamInfo  wasapi_params;\n    UINT32              frames_per_buffer;\n    double              sample_rate;\n    BOOL                blocking;\n    BOOL                full_duplex;\n    BOOL                wow64_workaround;\n}\nPaWasapiAudioClientParams;\n\n// ------------------------------------------------------------------------------------------\n/* PaWasapiStream - a stream data structure specifically for this implementation */\ntypedef struct PaWasapiSubStream\n{\n    IAudioClient        *clientParent;\n#ifndef PA_WINRT\n    IStream             *clientStream;\n#endif\n    IAudioClient        *clientProc;\n\n    WAVEFORMATEXTENSIBLE wavex;\n    UINT32               bufferSize;\n    REFERENCE_TIME       deviceLatency;\n    REFERENCE_TIME       period;\n    double               latencySeconds;\n    UINT32               framesPerHostCallback;\n    AUDCLNT_SHAREMODE    shareMode;\n    UINT32               streamFlags; // AUDCLNT_STREAMFLAGS_EVENTCALLBACK, ...\n    UINT32               flags;\n    PaWasapiAudioClientParams params; //!< parameters\n\n    // Buffers\n    UINT32               buffers;            //!< number of buffers used (from host side)\n    UINT32               framesPerBuffer;    //!< number of frames per 1 buffer\n    BOOL                 userBufferAndHostMatch;\n\n    // Used for Mono >> Stereo workaround, if driver does not support it\n    // (in Exclusive mode WASAPI usually refuses to operate with Mono (1-ch)\n    void                *monoBuffer;     //!< pointer to buffer\n    UINT32               monoBufferSize; //!< buffer size in bytes\n    MixMonoToStereoF     monoMixer;         //!< pointer to mixer function\n\n    PaUtilRingBuffer    *tailBuffer;       //!< buffer with trailing sample for blocking mode operations (only for Input)\n    void                *tailBufferMemory; //!< tail buffer memory region\n}\nPaWasapiSubStream;\n\n// ------------------------------------------------------------------------------------------\n/* PaWasapiHostProcessor - redirects processing data */\ntypedef struct PaWasapiHostProcessor\n{\n    PaWasapiHostProcessorCallback processor;\n    void *userData;\n}\nPaWasapiHostProcessor;\n\n// ------------------------------------------------------------------------------------------\ntypedef struct PaWasapiStream\n{\n    /* IMPLEMENT ME: rename this */\n    PaUtilStreamRepresentation streamRepresentation;\n    PaUtilCpuLoadMeasurer      cpuLoadMeasurer;\n    PaUtilBufferProcessor      bufferProcessor;\n\n    // input\n    PaWasapiSubStream          in;\n    IAudioCaptureClient       *captureClientParent;\n#ifndef PA_WINRT\n    IStream                   *captureClientStream;\n#endif\n    IAudioCaptureClient       *captureClient;\n    IAudioEndpointVolume      *inVol;\n\n    // output\n    PaWasapiSubStream          out;\n    IAudioRenderClient        *renderClientParent;\n#ifndef PA_WINRT\n    IStream                   *renderClientStream;\n#endif\n    IAudioRenderClient        *renderClient;\n    IAudioEndpointVolume      *outVol;\n\n    // event handles for event-driven processing mode\n    HANDLE event[S_COUNT];\n\n    // buffer mode\n    PaUtilHostBufferSizeMode bufferMode;\n\n    // must be volatile to avoid race condition on user query while\n    // thread is being started\n    volatile BOOL running;\n\n    PA_THREAD_ID dwThreadId;\n    HANDLE hThread;\n    HANDLE hCloseRequest;\n    HANDLE hThreadStart;        //!< signalled by thread on start\n    HANDLE hThreadExit;         //!< signalled by thread on exit\n    HANDLE hBlockingOpStreamRD;\n    HANDLE hBlockingOpStreamWR;\n\n    // Host callback Output overrider\n    PaWasapiHostProcessor hostProcessOverrideOutput;\n\n    // Host callback Input overrider\n    PaWasapiHostProcessor hostProcessOverrideInput;\n\n    // Defines blocking/callback interface used\n    BOOL bBlocking;\n\n    // Av Task (MM thread management)\n    HANDLE hAvTask;\n\n    // Thread priority level\n    PaWasapiThreadPriority nThreadPriority;\n\n    // State handler\n    PaWasapiStreamStateCallback fnStateHandler;\n    void *pStateHandlerUserData;\n}\nPaWasapiStream;\n\n// COM marshaling\nstatic HRESULT MarshalSubStreamComPointers(PaWasapiSubStream *substream);\nstatic HRESULT MarshalStreamComPointers(PaWasapiStream *stream);\nstatic HRESULT UnmarshalSubStreamComPointers(PaWasapiSubStream *substream);\nstatic HRESULT UnmarshalStreamComPointers(PaWasapiStream *stream);\nstatic void ReleaseUnmarshaledSubComPointers(PaWasapiSubStream *substream);\nstatic void ReleaseUnmarshaledComPointers(PaWasapiStream *stream);\n\n// Local methods\nstatic void _StreamOnStop(PaWasapiStream *stream);\nstatic void _StreamFinish(PaWasapiStream *stream);\nstatic void _StreamCleanup(PaWasapiStream *stream);\nstatic HRESULT _PollGetOutputFramesAvailable(PaWasapiStream *stream, UINT32 *available);\nstatic HRESULT _PollGetInputFramesAvailable(PaWasapiStream *stream, UINT32 *available);\nstatic void *PaWasapi_ReallocateMemory(void *prev, size_t size);\nstatic void PaWasapi_FreeMemory(void *ptr);\nstatic PaSampleFormat WaveToPaFormat(const WAVEFORMATEXTENSIBLE *fmtext);\n\n// WinRT (UWP) device list\n#ifdef PA_WINRT\ntypedef struct PaWasapiWinrtDeviceInfo\n{\n    WCHAR              id[PA_WASAPI_DEVICE_ID_LEN];\n    WCHAR              name[PA_WASAPI_DEVICE_NAME_LEN];\n    EndpointFormFactor formFactor;\n}\nPaWasapiWinrtDeviceInfo;\ntypedef struct PaWasapiWinrtDeviceListRole\n{\n    WCHAR                   defaultId[PA_WASAPI_DEVICE_ID_LEN];\n    PaWasapiWinrtDeviceInfo devices[PA_WASAPI_DEVICE_MAX_COUNT];\n    UINT32                  deviceCount;\n}\nPaWasapiWinrtDeviceListRole;\ntypedef struct PaWasapiWinrtDeviceList\n{\n    PaWasapiWinrtDeviceListRole render;\n    PaWasapiWinrtDeviceListRole capture;\n}\nPaWasapiWinrtDeviceList;\nstatic PaWasapiWinrtDeviceList g_DeviceListInfo = { 0 };\n#endif\n\n// WinRT (UWP) device list context\n#ifdef PA_WINRT\ntypedef struct PaWasapiWinrtDeviceListContextEntry\n{\n    PaWasapiWinrtDeviceInfo *info;\n    EDataFlow                flow;\n}\nPaWasapiWinrtDeviceListContextEntry;\ntypedef struct PaWasapiWinrtDeviceListContext\n{\n    PaWasapiWinrtDeviceListContextEntry devices[PA_WASAPI_DEVICE_MAX_COUNT * 2];\n}\nPaWasapiWinrtDeviceListContext;\n#endif\n\n// ------------------------------------------------------------------------------------------\n#define LogHostError(HRES) __LogHostError(HRES, __FUNCTION__, __FILE__, __LINE__)\nstatic HRESULT __LogHostError(HRESULT res, const char *func, const char *file, int line)\n{\n    const char *text = NULL;\n    switch (res)\n    {\n    case S_OK: return res;\n    case E_POINTER                              :text =\"E_POINTER\"; break;\n    case E_INVALIDARG                           :text =\"E_INVALIDARG\"; break;\n\n    case AUDCLNT_E_NOT_INITIALIZED              :text =\"AUDCLNT_E_NOT_INITIALIZED\"; break;\n    case AUDCLNT_E_ALREADY_INITIALIZED          :text =\"AUDCLNT_E_ALREADY_INITIALIZED\"; break;\n    case AUDCLNT_E_WRONG_ENDPOINT_TYPE          :text =\"AUDCLNT_E_WRONG_ENDPOINT_TYPE\"; break;\n    case AUDCLNT_E_DEVICE_INVALIDATED           :text =\"AUDCLNT_E_DEVICE_INVALIDATED\"; break;\n    case AUDCLNT_E_NOT_STOPPED                  :text =\"AUDCLNT_E_NOT_STOPPED\"; break;\n    case AUDCLNT_E_BUFFER_TOO_LARGE             :text =\"AUDCLNT_E_BUFFER_TOO_LARGE\"; break;\n    case AUDCLNT_E_OUT_OF_ORDER                 :text =\"AUDCLNT_E_OUT_OF_ORDER\"; break;\n    case AUDCLNT_E_UNSUPPORTED_FORMAT           :text =\"AUDCLNT_E_UNSUPPORTED_FORMAT\"; break;\n    case AUDCLNT_E_INVALID_SIZE                 :text =\"AUDCLNT_E_INVALID_SIZE\"; break;\n    case AUDCLNT_E_DEVICE_IN_USE                :text =\"AUDCLNT_E_DEVICE_IN_USE\"; break;\n    case AUDCLNT_E_BUFFER_OPERATION_PENDING     :text =\"AUDCLNT_E_BUFFER_OPERATION_PENDING\"; break;\n    case AUDCLNT_E_THREAD_NOT_REGISTERED        :text =\"AUDCLNT_E_THREAD_NOT_REGISTERED\"; break;\n    case AUDCLNT_E_EXCLUSIVE_MODE_NOT_ALLOWED   :text =\"AUDCLNT_E_EXCLUSIVE_MODE_NOT_ALLOWED\"; break;\n    case AUDCLNT_E_ENDPOINT_CREATE_FAILED       :text =\"AUDCLNT_E_ENDPOINT_CREATE_FAILED\"; break;\n    case AUDCLNT_E_SERVICE_NOT_RUNNING          :text =\"AUDCLNT_E_SERVICE_NOT_RUNNING\"; break;\n    case AUDCLNT_E_EVENTHANDLE_NOT_EXPECTED     :text =\"AUDCLNT_E_EVENTHANDLE_NOT_EXPECTED\"; break;\n    case AUDCLNT_E_EXCLUSIVE_MODE_ONLY          :text =\"AUDCLNT_E_EXCLUSIVE_MODE_ONLY\"; break;\n    case AUDCLNT_E_BUFDURATION_PERIOD_NOT_EQUAL :text =\"AUDCLNT_E_BUFDURATION_PERIOD_NOT_EQUAL\"; break;\n    case AUDCLNT_E_EVENTHANDLE_NOT_SET          :text =\"AUDCLNT_E_EVENTHANDLE_NOT_SET\"; break;\n    case AUDCLNT_E_INCORRECT_BUFFER_SIZE        :text =\"AUDCLNT_E_INCORRECT_BUFFER_SIZE\"; break;\n    case AUDCLNT_E_BUFFER_SIZE_ERROR            :text =\"AUDCLNT_E_BUFFER_SIZE_ERROR\"; break;\n    case AUDCLNT_E_CPUUSAGE_EXCEEDED            :text =\"AUDCLNT_E_CPUUSAGE_EXCEEDED\"; break;\n    case AUDCLNT_E_BUFFER_ERROR                 :text =\"AUDCLNT_E_BUFFER_ERROR\"; break;\n    case AUDCLNT_E_BUFFER_SIZE_NOT_ALIGNED      :text =\"AUDCLNT_E_BUFFER_SIZE_NOT_ALIGNED\"; break;\n    case AUDCLNT_E_INVALID_DEVICE_PERIOD        :text =\"AUDCLNT_E_INVALID_DEVICE_PERIOD\"; break;\n\n#ifdef AUDCLNT_E_INVALID_STREAM_FLAG\n    case AUDCLNT_E_INVALID_STREAM_FLAG          :text =\"AUDCLNT_E_INVALID_STREAM_FLAG\"; break;\n#endif\n#ifdef AUDCLNT_E_ENDPOINT_OFFLOAD_NOT_CAPABLE\n    case AUDCLNT_E_ENDPOINT_OFFLOAD_NOT_CAPABLE :text =\"AUDCLNT_E_ENDPOINT_OFFLOAD_NOT_CAPABLE\"; break;\n#endif\n#ifdef AUDCLNT_E_OUT_OF_OFFLOAD_RESOURCES\n    case AUDCLNT_E_OUT_OF_OFFLOAD_RESOURCES     :text =\"AUDCLNT_E_OUT_OF_OFFLOAD_RESOURCES\"; break;\n#endif\n#ifdef AUDCLNT_E_OFFLOAD_MODE_ONLY\n    case AUDCLNT_E_OFFLOAD_MODE_ONLY            :text =\"AUDCLNT_E_OFFLOAD_MODE_ONLY\"; break;\n#endif\n#ifdef AUDCLNT_E_NONOFFLOAD_MODE_ONLY\n    case AUDCLNT_E_NONOFFLOAD_MODE_ONLY         :text =\"AUDCLNT_E_NONOFFLOAD_MODE_ONLY\"; break;\n#endif\n#ifdef AUDCLNT_E_RESOURCES_INVALIDATED\n    case AUDCLNT_E_RESOURCES_INVALIDATED        :text =\"AUDCLNT_E_RESOURCES_INVALIDATED\"; break;\n#endif\n#ifdef AUDCLNT_E_RAW_MODE_UNSUPPORTED\n    case AUDCLNT_E_RAW_MODE_UNSUPPORTED         :text =\"AUDCLNT_E_RAW_MODE_UNSUPPORTED\"; break;\n#endif\n#ifdef AUDCLNT_E_ENGINE_PERIODICITY_LOCKED\n    case AUDCLNT_E_ENGINE_PERIODICITY_LOCKED    :text =\"AUDCLNT_E_ENGINE_PERIODICITY_LOCKED\"; break;\n#endif\n#ifdef AUDCLNT_E_ENGINE_FORMAT_LOCKED\n    case AUDCLNT_E_ENGINE_FORMAT_LOCKED         :text =\"AUDCLNT_E_ENGINE_FORMAT_LOCKED\"; break;\n#endif\n\n    case AUDCLNT_S_BUFFER_EMPTY                 :text =\"AUDCLNT_S_BUFFER_EMPTY\"; break;\n    case AUDCLNT_S_THREAD_ALREADY_REGISTERED    :text =\"AUDCLNT_S_THREAD_ALREADY_REGISTERED\"; break;\n    case AUDCLNT_S_POSITION_STALLED             :text =\"AUDCLNT_S_POSITION_STALLED\"; break;\n\n    // other windows common errors:\n    case CO_E_NOTINITIALIZED                    :text =\"CO_E_NOTINITIALIZED: you must call CoInitialize() before Pa_OpenStream()\"; break;\n\n    default:\n        text = \"UNKNOWN ERROR\";\n    }\n    PRINT((\"WASAPI ERROR HRESULT: 0x%X : %s\\n [FUNCTION: %s FILE: %s {LINE: %d}]\\n\", res, text, func, file, line));\n#ifndef PA_ENABLE_DEBUG_OUTPUT\n    (void)func; (void)file; (void)line;\n#endif\n    PA_SKELETON_SET_LAST_HOST_ERROR(res, text);\n    return res;\n}\n\n// ------------------------------------------------------------------------------------------\n#define LogPaError(PAERR) __LogPaError(PAERR, __FUNCTION__, __FILE__, __LINE__)\nstatic PaError __LogPaError(PaError err, const char *func, const char *file, int line)\n{\n    if (err == paNoError)\n        return err;\n\n    PRINT((\"WASAPI ERROR PAERROR: %i : %s\\n [FUNCTION: %s FILE: %s {LINE: %d}]\\n\", err, Pa_GetErrorText(err), func, file, line));\n#ifndef PA_ENABLE_DEBUG_OUTPUT\n    (void)func; (void)file; (void)line;\n#endif\n    return err;\n}\n\n// ------------------------------------------------------------------------------------------\n/*! \\class ThreadSleepScheduler\n           Allows to emulate thread sleep of less than 1 millisecond under Windows. Scheduler\n           calculates number of times the thread must run until next sleep of 1 millisecond.\n           It does not make thread sleeping for real number of microseconds but rather controls\n           how many of imaginary microseconds the thread task can allow thread to sleep.\n*/\ntypedef struct ThreadIdleScheduler\n{\n    UINT32 m_idle_microseconds; //!< number of microseconds to sleep\n    UINT32 m_next_sleep;        //!< next sleep round\n    UINT32 m_i;                    //!< current round iterator position\n    UINT32 m_resolution;        //!< resolution in number of milliseconds\n}\nThreadIdleScheduler;\n\n//! Setup scheduler.\nstatic void ThreadIdleScheduler_Setup(ThreadIdleScheduler *sched, UINT32 resolution, UINT32 microseconds)\n{\n    assert(microseconds != 0);\n    assert(resolution != 0);\n    assert((resolution * 1000) >= microseconds);\n\n    memset(sched, 0, sizeof(*sched));\n\n    sched->m_idle_microseconds = microseconds;\n    sched->m_resolution        = resolution;\n    sched->m_next_sleep        = (resolution * 1000) / microseconds;\n}\n\n//! Iterate and check if can sleep.\nstatic inline UINT32 ThreadIdleScheduler_NextSleep(ThreadIdleScheduler *sched)\n{\n    // advance and check if thread can sleep\n    if (++sched->m_i == sched->m_next_sleep)\n    {\n        sched->m_i = 0;\n        return sched->m_resolution;\n    }\n    return 0;\n}\n\n// ------------------------------------------------------------------------------------------\ntypedef struct _SystemTimer\n{\n    INT32 granularity;\n\n} SystemTimer;\nstatic LARGE_INTEGER g_SystemTimerFrequency;\nstatic BOOL          g_SystemTimerUseQpc = FALSE;\n\n//! Set granularity of the system timer.\nstatic BOOL SystemTimer_SetGranularity(SystemTimer *timer, UINT32 granularity)\n{\n#ifndef PA_WINRT\n    TIMECAPS caps;\n\n    timer->granularity = granularity;\n\n    if (timeGetDevCaps(&caps, sizeof(caps)) == MMSYSERR_NOERROR)\n    {\n        if (timer->granularity < (INT32)caps.wPeriodMin)\n            timer->granularity = (INT32)caps.wPeriodMin;\n    }\n\n    if (timeBeginPeriod(timer->granularity) != TIMERR_NOERROR)\n    {\n        PRINT((\"SetSystemTimer: timeBeginPeriod(1) failed!\\n\"));\n\n        timer->granularity = 10;\n        return FALSE;\n    }\n#else\n    (void)granularity;\n\n    // UWP does not support increase of the timer precision change and thus calling WaitForSingleObject with anything\n    // below 10 milliseconds will cause underruns for input and output stream.\n    timer->granularity = 10;\n#endif\n\n    return TRUE;\n}\n\n//! Restore granularity of the system timer.\nstatic void SystemTimer_RestoreGranularity(SystemTimer *timer)\n{\n#ifndef PA_WINRT\n    if (timer->granularity != 0)\n    {\n        if (timeEndPeriod(timer->granularity) != TIMERR_NOERROR)\n        {\n            PRINT((\"RestoreSystemTimer: timeEndPeriod(1) failed!\\n\"));\n        }\n    }\n#else\n    (void)timer;\n#endif\n}\n\n//! Initialize high-resolution time getter.\nstatic void SystemTimer_InitializeTimeGetter()\n{\n    g_SystemTimerUseQpc = QueryPerformanceFrequency(&g_SystemTimerFrequency);\n}\n\n//! Get high-resolution time in milliseconds (using QPC by default).\nstatic inline LONGLONG SystemTimer_GetTime(SystemTimer *timer)\n{\n    (void)timer;\n\n    // QPC: https://docs.microsoft.com/en-us/windows/win32/sysinfo/acquiring-high-resolution-time-stamps\n    if (g_SystemTimerUseQpc)\n    {\n        LARGE_INTEGER now;\n        QueryPerformanceCounter(&now);\n        return (now.QuadPart * 1000LL) / g_SystemTimerFrequency.QuadPart;\n    }\n    else\n    {\n    #ifdef PA_WINRT\n        return GetTickCount64();\n    #else\n        return timeGetTime();\n    #endif\n    }\n}\n\n// ------------------------------------------------------------------------------------------\n/*static double nano100ToMillis(REFERENCE_TIME ref)\n{\n    //  1 nano = 0.000000001 seconds\n    //100 nano = 0.0000001   seconds\n    //100 nano = 0.0001   milliseconds\n    return ((double)ref) * 0.0001;\n}*/\n\n// ------------------------------------------------------------------------------------------\nstatic double nano100ToSeconds(REFERENCE_TIME ref)\n{\n    //  1 nano = 0.000000001 seconds\n    //100 nano = 0.0000001   seconds\n    //100 nano = 0.0001   milliseconds\n    return ((double)ref) * 0.0000001;\n}\n\n// ------------------------------------------------------------------------------------------\n/*static REFERENCE_TIME MillisTonano100(double ref)\n{\n    //  1 nano = 0.000000001 seconds\n    //100 nano = 0.0000001   seconds\n    //100 nano = 0.0001   milliseconds\n    return (REFERENCE_TIME)(ref / 0.0001);\n}*/\n\n// ------------------------------------------------------------------------------------------\nstatic REFERENCE_TIME SecondsTonano100(double ref)\n{\n    //  1 nano = 0.000000001 seconds\n    //100 nano = 0.0000001   seconds\n    //100 nano = 0.0001   milliseconds\n    return (REFERENCE_TIME)(ref / 0.0000001);\n}\n\n// ------------------------------------------------------------------------------------------\n// Makes Hns period from frames and sample rate\nstatic REFERENCE_TIME MakeHnsPeriod(UINT32 nFrames, DWORD nSamplesPerSec)\n{\n    return (REFERENCE_TIME)((10000.0 * 1000 / nSamplesPerSec * nFrames) + 0.5);\n}\n\n// ------------------------------------------------------------------------------------------\n// Converts PaSampleFormat to bits per sample value\n// Note: paCustomFormat stands for 8.24 format (24-bits inside 32-bit containers)\nstatic WORD PaSampleFormatToBitsPerSample(PaSampleFormat format_id)\n{\n    switch (format_id & ~paNonInterleaved)\n    {\n        case paFloat32:\n        case paInt32: return 32;\n        case paCustomFormat:\n        case paInt24: return 24;\n        case paInt16: return 16;\n        case paInt8:\n        case paUInt8: return 8;\n    }\n    return 0;\n}\n\n// ------------------------------------------------------------------------------------------\n// Convert PaSampleFormat to valid sample format for I/O, e.g. if paCustomFormat is specified\n// it will be converted to paInt32, other formats pass through\n// Note: paCustomFormat stands for 8.24 format (24-bits inside 32-bit containers)\nstatic PaSampleFormat GetSampleFormatForIO(PaSampleFormat format_id)\n{\n    return ((format_id & ~paNonInterleaved) == paCustomFormat ?\n        (paInt32 | (format_id & paNonInterleaved ? paNonInterleaved : 0)) : format_id);\n}\n\n// ------------------------------------------------------------------------------------------\n// Converts Hns period into number of frames\nstatic UINT32 MakeFramesFromHns(REFERENCE_TIME hnsPeriod, UINT32 nSamplesPerSec)\n{\n    UINT32 nFrames = (UINT32)(    // frames =\n        1.0 * hnsPeriod *        // hns *\n        nSamplesPerSec /        // (frames / s) /\n        1000 /                    // (ms / s) /\n        10000                    // (hns / s) /\n        + 0.5                    // rounding\n    );\n    return nFrames;\n}\n\n// Aligning function type\ntypedef UINT32 (*ALIGN_FUNC) (UINT32 v, UINT32 align);\n\n// ------------------------------------------------------------------------------------------\n// Aligns 'v' backwards\nstatic UINT32 ALIGN_BWD(UINT32 v, UINT32 align)\n{\n    return ((v - (align ? v % align : 0)));\n}\n\n// ------------------------------------------------------------------------------------------\n// Aligns 'v' forward\nstatic UINT32 ALIGN_FWD(UINT32 v, UINT32 align)\n{\n    UINT32 remainder = (align ? (v % align) : 0);\n    if (remainder == 0)\n        return v;\n    return v + (align - remainder);\n}\n\n// ------------------------------------------------------------------------------------------\n// Get next value power of 2\nstatic UINT32 ALIGN_NEXT_POW2(UINT32 v)\n{\n    UINT32 v2 = 1;\n    while (v > (v2 <<= 1)) { }\n    v = v2;\n    return v;\n}\n\n// ------------------------------------------------------------------------------------------\n// Aligns WASAPI buffer to 128 byte packet boundary. HD Audio will fail to play if buffer\n// is misaligned. This problem was solved in Windows 7 were AUDCLNT_E_BUFFER_SIZE_NOT_ALIGNED\n// is thrown although we must align for Vista anyway.\nstatic UINT32 AlignFramesPerBuffer(UINT32 nFrames, UINT32 nBlockAlign, ALIGN_FUNC pAlignFunc)\n{\n#define HDA_PACKET_SIZE (128)\n\n    UINT32 bytes = nFrames * nBlockAlign;\n    UINT32 packets;\n\n    // align to a HD Audio packet size\n    bytes = pAlignFunc(bytes, HDA_PACKET_SIZE);\n\n    // atlest 1 frame must be available\n    if (bytes < HDA_PACKET_SIZE)\n        bytes = HDA_PACKET_SIZE;\n\n    packets = bytes / HDA_PACKET_SIZE;\n    bytes   = packets * HDA_PACKET_SIZE;\n    nFrames = bytes / nBlockAlign;\n\n    // WASAPI frames are always aligned to at least 8\n    nFrames = ALIGN_FWD(nFrames, 8);\n\n    return nFrames;\n\n#undef HDA_PACKET_SIZE\n}\n\n// ------------------------------------------------------------------------------------------\nstatic UINT32 GetFramesSleepTime(REFERENCE_TIME nFrames, REFERENCE_TIME nSamplesPerSec)\n{\n    REFERENCE_TIME nDuration;\n    if (nSamplesPerSec == 0)\n        return 0;\n\n#define REFTIMES_PER_SEC       10000000LL\n#define REFTIMES_PER_MILLISEC  10000LL\n\n    // Calculate the actual duration of the allocated buffer.\n    nDuration = (REFTIMES_PER_SEC * nFrames) / nSamplesPerSec;\n    return (UINT32)(nDuration / REFTIMES_PER_MILLISEC);\n\n#undef REFTIMES_PER_SEC\n#undef REFTIMES_PER_MILLISEC\n}\n\n// ------------------------------------------------------------------------------------------\nstatic UINT32 GetFramesSleepTimeMicroseconds(REFERENCE_TIME nFrames, REFERENCE_TIME nSamplesPerSec)\n{\n    REFERENCE_TIME nDuration;\n    if (nSamplesPerSec == 0)\n        return 0;\n\n#define REFTIMES_PER_SEC       10000000LL\n#define REFTIMES_PER_MILLISEC  10000LL\n\n    // Calculate the actual duration of the allocated buffer.\n    nDuration = (REFTIMES_PER_SEC * nFrames) / nSamplesPerSec;\n    return (UINT32)(nDuration / 10);\n\n#undef REFTIMES_PER_SEC\n#undef REFTIMES_PER_MILLISEC\n}\n\n// ------------------------------------------------------------------------------------------\n#ifndef PA_WINRT\nstatic BOOL SetupAVRT()\n{\n    hDInputDLL = LoadLibraryA(\"avrt.dll\");\n    if (hDInputDLL == NULL)\n        return FALSE;\n\n    _GetProc(pAvRtCreateThreadOrderingGroup,  FAvRtCreateThreadOrderingGroup,  \"AvRtCreateThreadOrderingGroup\");\n    _GetProc(pAvRtDeleteThreadOrderingGroup,  FAvRtDeleteThreadOrderingGroup,  \"AvRtDeleteThreadOrderingGroup\");\n    _GetProc(pAvRtWaitOnThreadOrderingGroup,  FAvRtWaitOnThreadOrderingGroup,  \"AvRtWaitOnThreadOrderingGroup\");\n    _GetProc(pAvSetMmThreadCharacteristics,   FAvSetMmThreadCharacteristics,   \"AvSetMmThreadCharacteristicsA\");\n    _GetProc(pAvRevertMmThreadCharacteristics,FAvRevertMmThreadCharacteristics,\"AvRevertMmThreadCharacteristics\");\n    _GetProc(pAvSetMmThreadPriority,          FAvSetMmThreadPriority,          \"AvSetMmThreadPriority\");\n\n    return pAvRtCreateThreadOrderingGroup &&\n        pAvRtDeleteThreadOrderingGroup &&\n        pAvRtWaitOnThreadOrderingGroup &&\n        pAvSetMmThreadCharacteristics &&\n        pAvRevertMmThreadCharacteristics &&\n        pAvSetMmThreadPriority;\n}\n#endif\n\n// ------------------------------------------------------------------------------------------\nstatic void CloseAVRT()\n{\n#ifndef PA_WINRT\n    if (hDInputDLL != NULL)\n        FreeLibrary(hDInputDLL);\n    hDInputDLL = NULL;\n#endif\n}\n\n// ------------------------------------------------------------------------------------------\nstatic BOOL IsWow64()\n{\n#ifndef PA_WINRT\n\n    // http://msdn.microsoft.com/en-us/library/ms684139(VS.85).aspx\n\n    typedef BOOL (WINAPI *LPFN_ISWOW64PROCESS) (HANDLE, PBOOL);\n    LPFN_ISWOW64PROCESS fnIsWow64Process;\n\n    BOOL bIsWow64 = FALSE;\n\n    // IsWow64Process is not available on all supported versions of Windows.\n    // Use GetModuleHandle to get a handle to the DLL that contains the function\n    // and GetProcAddress to get a pointer to the function if available.\n\n    fnIsWow64Process = (LPFN_ISWOW64PROCESS) GetProcAddress(\n        GetModuleHandleA(\"kernel32\"), \"IsWow64Process\");\n\n    if (fnIsWow64Process == NULL)\n        return FALSE;\n\n    if (!fnIsWow64Process(GetCurrentProcess(), &bIsWow64))\n        return FALSE;\n\n    return bIsWow64;\n\n#else\n\n    return FALSE;\n\n#endif\n}\n\n// ------------------------------------------------------------------------------------------\ntypedef enum EWindowsVersion\n{\n    WINDOWS_UNKNOWN = 0,\n    WINDOWS_VISTA_SERVER2008,\n    WINDOWS_7_SERVER2008R2,\n    WINDOWS_8_SERVER2012,\n    WINDOWS_8_1_SERVER2012R2,\n    WINDOWS_10_SERVER2016,\n    WINDOWS_FUTURE\n}\nEWindowsVersion;\n// Alternative way for checking Windows version (allows to check version on Windows 8.1 and up)\n#ifndef PA_WINRT\nstatic BOOL IsWindowsVersionOrGreater(WORD wMajorVersion, WORD wMinorVersion, WORD wServicePackMajor)\n{\n    typedef ULONGLONG (NTAPI *LPFN_VERSETCONDITIONMASK)(ULONGLONG ConditionMask, DWORD TypeMask, BYTE Condition);\n    typedef BOOL (WINAPI *LPFN_VERIFYVERSIONINFO)(LPOSVERSIONINFOEXA lpVersionInformation, DWORD dwTypeMask, DWORDLONG dwlConditionMask);\n\n    LPFN_VERSETCONDITIONMASK fnVerSetConditionMask;\n    LPFN_VERIFYVERSIONINFO fnVerifyVersionInfo;\n    OSVERSIONINFOEXA osvi = { sizeof(osvi), 0, 0, 0, 0, {0}, 0, 0 };\n    DWORDLONG dwlConditionMask;\n\n    fnVerSetConditionMask = (LPFN_VERSETCONDITIONMASK)GetProcAddress(GetModuleHandleA(\"kernel32\"), \"VerSetConditionMask\");\n    fnVerifyVersionInfo = (LPFN_VERIFYVERSIONINFO)GetProcAddress(GetModuleHandleA(\"kernel32\"), \"VerifyVersionInfoA\");\n\n    if ((fnVerSetConditionMask == NULL) || (fnVerifyVersionInfo == NULL))\n        return FALSE;\n\n    dwlConditionMask = fnVerSetConditionMask(\n        fnVerSetConditionMask(\n            fnVerSetConditionMask(\n                0, VER_MAJORVERSION,     VER_GREATER_EQUAL),\n                   VER_MINORVERSION,     VER_GREATER_EQUAL),\n                   VER_SERVICEPACKMAJOR, VER_GREATER_EQUAL);\n\n    osvi.dwMajorVersion    = wMajorVersion;\n    osvi.dwMinorVersion    = wMinorVersion;\n    osvi.wServicePackMajor = wServicePackMajor;\n\n    return (fnVerifyVersionInfo(&osvi, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR, dwlConditionMask) != FALSE);\n}\n#endif\n// Get Windows version\nstatic EWindowsVersion GetWindowsVersion()\n{\n#ifndef PA_WINRT\n    static EWindowsVersion version = WINDOWS_UNKNOWN;\n\n    if (version == WINDOWS_UNKNOWN)\n    {\n        DWORD dwMajorVersion = 0xFFFFFFFFU, dwMinorVersion = 0, dwBuild = 0;\n\n        // RTL_OSVERSIONINFOW equals OSVERSIONINFOW but it is missing inb MinGW winnt.h header,\n        // thus use OSVERSIONINFOW for greater portability\n        typedef NTSTATUS (WINAPI *LPFN_RTLGETVERSION)(POSVERSIONINFOW lpVersionInformation);\n        LPFN_RTLGETVERSION fnRtlGetVersion;\n\n        #define NTSTATUS_SUCCESS ((NTSTATUS)0x00000000L)\n\n        // RtlGetVersion must be able to provide true Windows version (Windows 10 may be reported as Windows 8\n        // by GetVersion API)\n        if ((fnRtlGetVersion = (LPFN_RTLGETVERSION)GetProcAddress(GetModuleHandleA(\"ntdll\"), \"RtlGetVersion\")) != NULL)\n        {\n            OSVERSIONINFOW ver = { sizeof(OSVERSIONINFOW), 0, 0, 0, 0, {0} };\n\n            PRINT((\"WASAPI: getting Windows version with RtlGetVersion()\\n\"));\n\n            if (fnRtlGetVersion(&ver) == NTSTATUS_SUCCESS)\n            {\n                dwMajorVersion = ver.dwMajorVersion;\n                dwMinorVersion = ver.dwMinorVersion;\n                dwBuild        = ver.dwBuildNumber;\n            }\n        }\n\n        #undef NTSTATUS_SUCCESS\n\n        // fallback to GetVersion if RtlGetVersion is missing\n        if (dwMajorVersion == 0xFFFFFFFFU)\n        {\n            typedef DWORD (WINAPI *LPFN_GETVERSION)(VOID);\n            LPFN_GETVERSION fnGetVersion;\n\n            if ((fnGetVersion = (LPFN_GETVERSION)GetProcAddress(GetModuleHandleA(\"kernel32\"), \"GetVersion\")) != NULL)\n            {\n                DWORD dwVersion;\n\n                PRINT((\"WASAPI: getting Windows version with GetVersion()\\n\"));\n\n                dwVersion = fnGetVersion();\n\n                dwMajorVersion = (DWORD)(LOBYTE(LOWORD(dwVersion)));\n                dwMinorVersion = (DWORD)(HIBYTE(LOWORD(dwVersion)));\n\n                if (dwVersion < 0x80000000)\n                    dwBuild = (DWORD)(HIWORD(dwVersion));\n            }\n        }\n\n        if (dwMajorVersion != 0xFFFFFFFFU)\n        {\n            switch (dwMajorVersion)\n            {\n            case 0:\n            case 1:\n            case 2:\n            case 3:\n            case 4:\n            case 5:\n                break; // skip lower\n            case 6:\n                switch (dwMinorVersion)\n                {\n                case 0:  version = WINDOWS_VISTA_SERVER2008; break;\n                case 1:  version = WINDOWS_7_SERVER2008R2;   break;\n                case 2:  version = WINDOWS_8_SERVER2012;     break;\n                case 3:  version = WINDOWS_8_1_SERVER2012R2; break;\n                default: version = WINDOWS_FUTURE;           break;\n                }\n                break;\n            case 10:\n                switch (dwMinorVersion)\n                {\n                case 0:  version = WINDOWS_10_SERVER2016;    break;\n                default: version = WINDOWS_FUTURE;           break;\n                }\n                break;\n            default:\n                version = WINDOWS_FUTURE;\n                break;\n            }\n        }\n        // fallback to VerifyVersionInfo if RtlGetVersion and GetVersion are missing\n        else\n        {\n            PRINT((\"WASAPI: getting Windows version with VerifyVersionInfo()\\n\"));\n\n            if (IsWindowsVersionOrGreater(10, 0, 0))\n                version = WINDOWS_10_SERVER2016;\n            else\n            if (IsWindowsVersionOrGreater(6, 3, 0))\n                version = WINDOWS_8_1_SERVER2012R2;\n            else\n            if (IsWindowsVersionOrGreater(6, 2, 0))\n                version = WINDOWS_8_SERVER2012;\n            else\n            if (IsWindowsVersionOrGreater(6, 1, 0))\n                version = WINDOWS_7_SERVER2008R2;\n            else\n            if (IsWindowsVersionOrGreater(6, 0, 0))\n                version = WINDOWS_VISTA_SERVER2008;\n            else\n                version = WINDOWS_FUTURE;\n        }\n\n        PRINT((\"WASAPI: Windows version = %d\\n\", version));\n    }\n\n    return version;\n#else\n    #if (_WIN32_WINNT >= _WIN32_WINNT_WIN10)\n        return WINDOWS_10_SERVER2016;\n    #else\n        return WINDOWS_8_SERVER2012;\n    #endif\n#endif\n}\n\n// ------------------------------------------------------------------------------------------\nstatic BOOL UseWOW64Workaround()\n{\n    // note: WOW64 bug is common to Windows Vista x64, thus we fall back to safe Poll-driven\n    //       method. Windows 7 x64 seems has WOW64 bug fixed.\n\n    return (IsWow64() && (GetWindowsVersion() == WINDOWS_VISTA_SERVER2008));\n}\n\n// ------------------------------------------------------------------------------------------\nstatic UINT32 GetAudioClientVersion()\n{\n    if (GetWindowsVersion() >= WINDOWS_10_SERVER2016)\n        return 3;\n    else\n    if (GetWindowsVersion() >= WINDOWS_8_SERVER2012)\n        return 2;\n\n    return 1;\n}\n\n// ------------------------------------------------------------------------------------------\nstatic const IID *GetAudioClientIID()\n{\n    static const IID *cli_iid = NULL;\n    if (cli_iid == NULL)\n    {\n        UINT32 cli_version = GetAudioClientVersion();\n        switch (cli_version)\n        {\n        case 3:  cli_iid = &pa_IID_IAudioClient3; break;\n        case 2:  cli_iid = &pa_IID_IAudioClient2; break;\n        default: cli_iid = &pa_IID_IAudioClient;  break;\n        }\n\n        PRINT((\"WASAPI: IAudioClient version = %d\\n\", cli_version));\n    }\n\n    return cli_iid;\n}\n\n// ------------------------------------------------------------------------------------------\ntypedef enum EMixDirection\n{\n    MIX_DIR__1TO2,   //!< mix one channel to L and R\n    MIX_DIR__2TO1,   //!< mix L and R channels to one channel\n    MIX_DIR__2TO1_L  //!< mix only L channel (of total 2 channels) to one channel\n}\nEMixDirection;\n\n// ------------------------------------------------------------------------------------------\n#define _WASAPI_MONO_TO_STEREO_MIXER_1_TO_2(TYPE)\\\n    TYPE * __restrict to = (TYPE *)__to;\\\n    const TYPE * __restrict from = (const TYPE *)__from;\\\n    const TYPE * __restrict end = from + count;\\\n    while (from != end)\\\n    {\\\n        to[0] = to[1] = *from ++;\\\n        to += 2;\\\n    }\n\n// ------------------------------------------------------------------------------------------\n#define _WASAPI_MONO_TO_STEREO_MIXER_2_TO_1_FLT32(TYPE)\\\n    TYPE * __restrict to = (TYPE *)__to;\\\n    const TYPE * __restrict from = (const TYPE *)__from;\\\n    const TYPE * __restrict end = to + count;\\\n    while (to != end)\\\n    {\\\n        *to ++ = (TYPE)((float)(from[0] + from[1]) * 0.5f);\\\n        from += 2;\\\n    }\n\n// ------------------------------------------------------------------------------------------\n#define _WASAPI_MONO_TO_STEREO_MIXER_2_TO_1_INT32(TYPE)\\\n    TYPE * __restrict to = (TYPE *)__to;\\\n    const TYPE * __restrict from = (const TYPE *)__from;\\\n    const TYPE * __restrict end = to + count;\\\n    while (to != end)\\\n    {\\\n        *to ++ = (TYPE)(((INT32)from[0] + (INT32)from[1]) >> 1);\\\n        from += 2;\\\n    }\n\n// ------------------------------------------------------------------------------------------\n#define _WASAPI_MONO_TO_STEREO_MIXER_2_TO_1_INT64(TYPE)\\\n    TYPE * __restrict to = (TYPE *)__to;\\\n    const TYPE * __restrict from = (const TYPE *)__from;\\\n    const TYPE * __restrict end = to + count;\\\n    while (to != end)\\\n    {\\\n        *to ++ = (TYPE)(((INT64)from[0] + (INT64)from[1]) >> 1);\\\n        from += 2;\\\n    }\n\n// ------------------------------------------------------------------------------------------\n#define _WASAPI_MONO_TO_STEREO_MIXER_2_TO_1_L(TYPE)\\\n    TYPE * __restrict to = (TYPE *)__to;\\\n    const TYPE * __restrict from = (const TYPE *)__from;\\\n    const TYPE * __restrict end = to + count;\\\n    while (to != end)\\\n    {\\\n        *to ++ = from[0];\\\n        from += 2;\\\n    }\n\n// ------------------------------------------------------------------------------------------\nstatic void _MixMonoToStereo_1TO2_8(void *__to, const void *__from, UINT32 count) { _WASAPI_MONO_TO_STEREO_MIXER_1_TO_2(BYTE); }\nstatic void _MixMonoToStereo_1TO2_16(void *__to, const void *__from, UINT32 count) { _WASAPI_MONO_TO_STEREO_MIXER_1_TO_2(short); }\nstatic void _MixMonoToStereo_1TO2_8_24(void *__to, const void *__from, UINT32 count) { _WASAPI_MONO_TO_STEREO_MIXER_1_TO_2(int); /* !!! int24 data is contained in 32-bit containers*/ }\nstatic void _MixMonoToStereo_1TO2_32(void *__to, const void *__from, UINT32 count) { _WASAPI_MONO_TO_STEREO_MIXER_1_TO_2(int); }\nstatic void _MixMonoToStereo_1TO2_32f(void *__to, const void *__from, UINT32 count) { _WASAPI_MONO_TO_STEREO_MIXER_1_TO_2(float); }\nstatic void _MixMonoToStereo_1TO2_24(void *__to, const void *__from, UINT32 count)\n{\n    const UCHAR * __restrict from = (const UCHAR *)__from;\n    UCHAR * __restrict to = (UCHAR *)__to;\n    const UCHAR * __restrict end = to + (count * (2 * 3));\n\n    while (to != end)\n    {\n        to[0] = to[3] = from[0];\n        to[1] = to[4] = from[1];\n        to[2] = to[5] = from[2];\n\n        from += 3;\n        to += (2 * 3);\n    }\n}\n\n// ------------------------------------------------------------------------------------------\nstatic void _MixMonoToStereo_2TO1_8(void *__to, const void *__from, UINT32 count) { _WASAPI_MONO_TO_STEREO_MIXER_2_TO_1_INT32(BYTE); }\nstatic void _MixMonoToStereo_2TO1_16(void *__to, const void *__from, UINT32 count) { _WASAPI_MONO_TO_STEREO_MIXER_2_TO_1_INT32(short); }\nstatic void _MixMonoToStereo_2TO1_8_24(void *__to, const void *__from, UINT32 count) { _WASAPI_MONO_TO_STEREO_MIXER_2_TO_1_INT32(int); /* !!! int24 data is contained in 32-bit containers*/ }\nstatic void _MixMonoToStereo_2TO1_32(void *__to, const void *__from, UINT32 count) { _WASAPI_MONO_TO_STEREO_MIXER_2_TO_1_INT64(int); }\nstatic void _MixMonoToStereo_2TO1_32f(void *__to, const void *__from, UINT32 count) { _WASAPI_MONO_TO_STEREO_MIXER_2_TO_1_FLT32(float); }\nstatic void _MixMonoToStereo_2TO1_24(void *__to, const void *__from, UINT32 count)\n{\n    const UCHAR * __restrict from = (const UCHAR *)__from;\n    UCHAR * __restrict to = (UCHAR *)__to;\n    const UCHAR * __restrict end = to + (count * 3);\n    PaInt32 tempL, tempR, tempM;\n\n    while (to != end)\n    {\n        tempL = (((PaInt32)from[0]) << 8);\n        tempL = tempL | (((PaInt32)from[1]) << 16);\n        tempL = tempL | (((PaInt32)from[2]) << 24);\n\n        tempR = (((PaInt32)from[3]) << 8);\n        tempR = tempR | (((PaInt32)from[4]) << 16);\n        tempR = tempR | (((PaInt32)from[5]) << 24);\n\n        tempM = (tempL + tempR) >> 1;\n\n        to[0] = (UCHAR)(tempM >> 8);\n        to[1] = (UCHAR)(tempM >> 16);\n        to[2] = (UCHAR)(tempM >> 24);\n\n        from += (2 * 3);\n        to += 3;\n    }\n}\n\n// ------------------------------------------------------------------------------------------\nstatic void _MixMonoToStereo_2TO1_8_L(void *__to, const void *__from, UINT32 count) { _WASAPI_MONO_TO_STEREO_MIXER_2_TO_1_L(BYTE); }\nstatic void _MixMonoToStereo_2TO1_16_L(void *__to, const void *__from, UINT32 count) { _WASAPI_MONO_TO_STEREO_MIXER_2_TO_1_L(short); }\nstatic void _MixMonoToStereo_2TO1_8_24_L(void *__to, const void *__from, UINT32 count) { _WASAPI_MONO_TO_STEREO_MIXER_2_TO_1_L(int); /* !!! int24 data is contained in 32-bit containers*/ }\nstatic void _MixMonoToStereo_2TO1_32_L(void *__to, const void *__from, UINT32 count) { _WASAPI_MONO_TO_STEREO_MIXER_2_TO_1_L(int); }\nstatic void _MixMonoToStereo_2TO1_32f_L(void *__to, const void *__from, UINT32 count) { _WASAPI_MONO_TO_STEREO_MIXER_2_TO_1_L(float); }\nstatic void _MixMonoToStereo_2TO1_24_L(void *__to, const void *__from, UINT32 count)\n{\n    const UCHAR * __restrict from = (const UCHAR *)__from;\n    UCHAR * __restrict to = (UCHAR *)__to;\n    const UCHAR * __restrict end = to + (count * 3);\n\n    while (to != end)\n    {\n        to[0] = from[0];\n        to[1] = from[1];\n        to[2] = from[2];\n\n        from += (2 * 3);\n        to += 3;\n    }\n}\n\n// ------------------------------------------------------------------------------------------\nstatic MixMonoToStereoF GetMonoToStereoMixer(const WAVEFORMATEXTENSIBLE *fmtext, EMixDirection dir)\n{\n    PaSampleFormat format = WaveToPaFormat(fmtext);\n\n    switch (dir)\n    {\n    case MIX_DIR__1TO2:\n        switch (format & ~paNonInterleaved)\n        {\n        case paUInt8:   return _MixMonoToStereo_1TO2_8;\n        case paInt16:   return _MixMonoToStereo_1TO2_16;\n        case paInt24:   return (fmtext->Format.wBitsPerSample == 32 ? _MixMonoToStereo_1TO2_8_24 : _MixMonoToStereo_1TO2_24);\n        case paInt32:   return _MixMonoToStereo_1TO2_32;\n        case paFloat32: return _MixMonoToStereo_1TO2_32f;\n        }\n        break;\n\n    case MIX_DIR__2TO1:\n        switch (format & ~paNonInterleaved)\n        {\n        case paUInt8:   return _MixMonoToStereo_2TO1_8;\n        case paInt16:   return _MixMonoToStereo_2TO1_16;\n        case paInt24:   return (fmtext->Format.wBitsPerSample == 32 ? _MixMonoToStereo_2TO1_8_24 : _MixMonoToStereo_2TO1_24);\n        case paInt32:   return _MixMonoToStereo_2TO1_32;\n        case paFloat32: return _MixMonoToStereo_2TO1_32f;\n        }\n        break;\n\n    case MIX_DIR__2TO1_L:\n        switch (format & ~paNonInterleaved)\n        {\n        case paUInt8:   return _MixMonoToStereo_2TO1_8_L;\n        case paInt16:   return _MixMonoToStereo_2TO1_16_L;\n        case paInt24:   return (fmtext->Format.wBitsPerSample == 32 ? _MixMonoToStereo_2TO1_8_24_L : _MixMonoToStereo_2TO1_24_L);\n        case paInt32:   return _MixMonoToStereo_2TO1_32_L;\n        case paFloat32: return _MixMonoToStereo_2TO1_32f_L;\n        }\n        break;\n    }\n\n    return NULL;\n}\n\n// ------------------------------------------------------------------------------------------\n#ifdef PA_WINRT\ntypedef struct PaActivateAudioInterfaceCompletionHandler\n{\n    IActivateAudioInterfaceCompletionHandler parent;\n    volatile LONG refs;\n    volatile LONG done;\n    struct\n    {\n        const IID *iid;\n        void **obj;\n    }\n    in;\n    struct\n    {\n        HRESULT hr;\n    }\n    out;\n}\nPaActivateAudioInterfaceCompletionHandler;\n\nstatic HRESULT (STDMETHODCALLTYPE PaActivateAudioInterfaceCompletionHandler_QueryInterface)(\n    IActivateAudioInterfaceCompletionHandler *This, REFIID riid, void **ppvObject)\n{\n    PaActivateAudioInterfaceCompletionHandler *handler = (PaActivateAudioInterfaceCompletionHandler *)This;\n\n    // From MSDN:\n    // \"The IAgileObject interface is a marker interface that indicates that an object\n    //  is free threaded and can be called from any apartment.\"\n    if (IsEqualIID(riid, &IID_IUnknown) ||\n        IsEqualIID(riid, &IID_IAgileObject))\n    {\n        IActivateAudioInterfaceCompletionHandler_AddRef((IActivateAudioInterfaceCompletionHandler *)handler);\n        (*ppvObject) = handler;\n        return S_OK;\n    }\n\n    return E_NOINTERFACE;\n}\n\nstatic ULONG (STDMETHODCALLTYPE PaActivateAudioInterfaceCompletionHandler_AddRef)(\n    IActivateAudioInterfaceCompletionHandler *This)\n{\n    PaActivateAudioInterfaceCompletionHandler *handler = (PaActivateAudioInterfaceCompletionHandler *)This;\n\n    return InterlockedIncrement(&handler->refs);\n}\n\nstatic ULONG (STDMETHODCALLTYPE PaActivateAudioInterfaceCompletionHandler_Release)(\n    IActivateAudioInterfaceCompletionHandler *This)\n{\n    PaActivateAudioInterfaceCompletionHandler *handler = (PaActivateAudioInterfaceCompletionHandler *)This;\n    ULONG refs;\n\n    if ((refs = InterlockedDecrement(&handler->refs)) == 0)\n    {\n        PaUtil_FreeMemory(handler->parent.lpVtbl);\n        PaUtil_FreeMemory(handler);\n    }\n\n    return refs;\n}\n\nstatic HRESULT (STDMETHODCALLTYPE PaActivateAudioInterfaceCompletionHandler_ActivateCompleted)(\n    IActivateAudioInterfaceCompletionHandler *This, IActivateAudioInterfaceAsyncOperation *activateOperation)\n{\n    PaActivateAudioInterfaceCompletionHandler *handler = (PaActivateAudioInterfaceCompletionHandler *)This;\n\n    HRESULT hr = S_OK;\n    HRESULT hrActivateResult = S_OK;\n    IUnknown *punkAudioInterface = NULL;\n\n    // Check for a successful activation result\n    hr = IActivateAudioInterfaceAsyncOperation_GetActivateResult(activateOperation, &hrActivateResult, &punkAudioInterface);\n    if (SUCCEEDED(hr) && SUCCEEDED(hrActivateResult))\n    {\n        // Get pointer to the requested audio interface\n        IUnknown_QueryInterface(punkAudioInterface, handler->in.iid, handler->in.obj);\n        if ((*handler->in.obj) == NULL)\n            hrActivateResult = E_FAIL;\n    }\n    SAFE_RELEASE(punkAudioInterface);\n\n    if (SUCCEEDED(hr))\n        handler->out.hr = hrActivateResult;\n    else\n        handler->out.hr = hr;\n\n    // Got client object, stop busy waiting in ActivateAudioInterface\n    InterlockedExchange(&handler->done, TRUE);\n\n    return hr;\n}\n\nstatic IActivateAudioInterfaceCompletionHandler *CreateActivateAudioInterfaceCompletionHandler(const IID *iid, void **client)\n{\n    PaActivateAudioInterfaceCompletionHandler *handler = PaUtil_AllocateMemory(sizeof(PaActivateAudioInterfaceCompletionHandler));\n\n    memset(handler, 0, sizeof(*handler));\n\n    handler->parent.lpVtbl = PaUtil_AllocateMemory(sizeof(*handler->parent.lpVtbl));\n    handler->parent.lpVtbl->QueryInterface    = &PaActivateAudioInterfaceCompletionHandler_QueryInterface;\n    handler->parent.lpVtbl->AddRef            = &PaActivateAudioInterfaceCompletionHandler_AddRef;\n    handler->parent.lpVtbl->Release           = &PaActivateAudioInterfaceCompletionHandler_Release;\n    handler->parent.lpVtbl->ActivateCompleted = &PaActivateAudioInterfaceCompletionHandler_ActivateCompleted;\n    handler->refs   = 1;\n    handler->in.iid = iid;\n    handler->in.obj = client;\n\n    return (IActivateAudioInterfaceCompletionHandler *)handler;\n}\n#endif\n\n// ------------------------------------------------------------------------------------------\n#ifdef PA_WINRT\nstatic HRESULT WinRT_GetDefaultDeviceId(WCHAR *deviceId, UINT32 deviceIdMax, EDataFlow flow)\n{\n    switch (flow)\n    {\n    case eRender:\n        if (g_DeviceListInfo.render.defaultId[0] != 0)\n            wcsncpy_s(deviceId, deviceIdMax, g_DeviceListInfo.render.defaultId, wcslen(g_DeviceListInfo.render.defaultId));\n        else\n            StringFromGUID2(&DEVINTERFACE_AUDIO_RENDER, deviceId, deviceIdMax);\n        break;\n    case eCapture:\n        if (g_DeviceListInfo.capture.defaultId[0] != 0)\n            wcsncpy_s(deviceId, deviceIdMax, g_DeviceListInfo.capture.defaultId, wcslen(g_DeviceListInfo.capture.defaultId));\n        else\n            StringFromGUID2(&DEVINTERFACE_AUDIO_CAPTURE, deviceId, deviceIdMax);\n        break;\n    default:\n        return S_FALSE;\n    }\n\n    return S_OK;\n}\n#endif\n\n// ------------------------------------------------------------------------------------------\n#ifdef PA_WINRT\nstatic HRESULT WinRT_ActivateAudioInterface(const WCHAR *deviceId, const IID *iid, void **client)\n{\n    PaError result = paNoError;\n    HRESULT hr = S_OK;\n    IActivateAudioInterfaceAsyncOperation *asyncOp = NULL;\n    IActivateAudioInterfaceCompletionHandler *handler = CreateActivateAudioInterfaceCompletionHandler(iid, client);\n    PaActivateAudioInterfaceCompletionHandler *handlerImpl = (PaActivateAudioInterfaceCompletionHandler *)handler;\n    UINT32 sleepToggle = 0;\n\n    // Async operation will call back to IActivateAudioInterfaceCompletionHandler::ActivateCompleted\n    // which must be an agile interface implementation\n    hr = ActivateAudioInterfaceAsync(deviceId, iid, NULL, handler, &asyncOp);\n    IF_FAILED_INTERNAL_ERROR_JUMP(hr, result, error);\n\n    // Wait in busy loop for async operation to complete\n    // Use Interlocked API here to ensure that ->done variable is read every time through the loop\n    while (SUCCEEDED(hr) && !InterlockedOr(&handlerImpl->done, 0))\n    {\n        Sleep(sleepToggle ^= 1);\n    }\n\n    hr = handlerImpl->out.hr;\n\nerror:\n\n    SAFE_RELEASE(asyncOp);\n    SAFE_RELEASE(handler);\n\n    return hr;\n}\n#endif\n\n// ------------------------------------------------------------------------------------------\nstatic HRESULT ActivateAudioInterface(const PaWasapiDeviceInfo *deviceInfo, const PaWasapiStreamInfo *streamInfo,\n    IAudioClient **client)\n{\n    HRESULT hr;\n\n#ifndef PA_WINRT\n    if (FAILED(hr = IMMDevice_Activate(deviceInfo->device, GetAudioClientIID(), CLSCTX_ALL, NULL, (void **)client)))\n        return hr;\n#else\n    if (FAILED(hr = WinRT_ActivateAudioInterface(deviceInfo->deviceId, GetAudioClientIID(), (void **)client)))\n        return hr;\n#endif\n\n    // Set audio client options (applicable only to IAudioClient2+): options may affect the audio format\n    // support by IAudioClient implementation and therefore we should set them before GetClosestFormat()\n    // in order to correctly match the requested format\n#ifdef __IAudioClient2_INTERFACE_DEFINED__\n    if ((streamInfo != NULL) && (GetAudioClientVersion() >= 2))\n    {\n        pa_AudioClientProperties audioProps = { 0 };\n        audioProps.cbSize     = sizeof(pa_AudioClientProperties);\n        audioProps.bIsOffload = FALSE;\n        audioProps.eCategory  = (AUDIO_STREAM_CATEGORY)streamInfo->streamCategory;\n        switch (streamInfo->streamOption)\n        {\n        case eStreamOptionRaw:\n            if (GetWindowsVersion() >= WINDOWS_8_1_SERVER2012R2)\n                audioProps.Options = pa_AUDCLNT_STREAMOPTIONS_RAW;\n            break;\n        case eStreamOptionMatchFormat:\n            if (GetWindowsVersion() >= WINDOWS_10_SERVER2016)\n                audioProps.Options = pa_AUDCLNT_STREAMOPTIONS_MATCH_FORMAT;\n            break;\n        }\n\n        if (FAILED(hr = IAudioClient2_SetClientProperties((IAudioClient2 *)(*client), (AudioClientProperties *)&audioProps)))\n        {\n            PRINT((\"WASAPI: IAudioClient2_SetClientProperties(IsOffload = %d, Category = %d, Options = %d) failed\\n\", audioProps.bIsOffload, audioProps.eCategory, audioProps.Options));\n            LogHostError(hr);\n        }\n        else\n        {\n            PRINT((\"WASAPI: IAudioClient2 set properties: IsOffload = %d, Category = %d, Options = %d\\n\", audioProps.bIsOffload, audioProps.eCategory, audioProps.Options));\n        }\n    }\n#endif\n\n    return S_OK;\n}\n\n// ------------------------------------------------------------------------------------------\n#ifdef PA_WINRT\n// Windows 10 SDK 10.0.15063.0 has SignalObjectAndWait defined again (unlike in 10.0.14393.0 and lower)\n#if !defined(WDK_NTDDI_VERSION) || (WDK_NTDDI_VERSION < NTDDI_WIN10_RS2)\nstatic DWORD SignalObjectAndWait(HANDLE hObjectToSignal, HANDLE hObjectToWaitOn, DWORD dwMilliseconds, BOOL bAlertable)\n{\n    SetEvent(hObjectToSignal);\n    return WaitForSingleObjectEx(hObjectToWaitOn, dwMilliseconds, bAlertable);\n}\n#endif\n#endif\n\n// ------------------------------------------------------------------------------------------\nstatic void NotifyStateChanged(PaWasapiStream *stream, UINT32 flags, HRESULT hr)\n{\n    if (stream->fnStateHandler == NULL)\n        return;\n\n    if (FAILED(hr))\n        flags |= paWasapiStreamStateError;\n\n    stream->fnStateHandler((PaStream *)stream, flags, hr, stream->pStateHandlerUserData);\n}\n\n// ------------------------------------------------------------------------------------------\nstatic void FillBaseDeviceInfo(PaDeviceInfo *deviceInfo, PaHostApiIndex hostApiIndex)\n{\n    deviceInfo->structVersion = 2;\n    deviceInfo->hostApi       = hostApiIndex;\n}\n\n// ------------------------------------------------------------------------------------------\nstatic PaError FillInactiveDeviceInfo(PaWasapiHostApiRepresentation *paWasapi, PaDeviceInfo *deviceInfo)\n{\n    if (deviceInfo->name == NULL)\n        deviceInfo->name = (char *)PaUtil_GroupAllocateMemory(paWasapi->allocations, 1);\n\n    if (deviceInfo->name != NULL)\n    {\n        ((char *)deviceInfo->name)[0] = 0;\n    }\n    else\n        return paInsufficientMemory;\n\n    return paNoError;\n}\n\n// ------------------------------------------------------------------------------------------\nstatic PaError FillDeviceInfo(PaWasapiHostApiRepresentation *paWasapi, void *pEndPoints, INT32 index, const WCHAR *defaultRenderId,\n    const WCHAR *defaultCaptureId, PaDeviceInfo *deviceInfo, PaWasapiDeviceInfo *wasapiDeviceInfo\n#ifdef PA_WINRT\n    , PaWasapiWinrtDeviceListContext *deviceListContext\n#endif\n)\n{\n    HRESULT hr;\n    PaError result;\n    PaUtilHostApiRepresentation *hostApi = (PaUtilHostApiRepresentation *)paWasapi;\n#ifdef PA_WINRT\n    PaWasapiWinrtDeviceListContextEntry *listEntry = &deviceListContext->devices[index];\n    (void)pEndPoints;\n    (void)defaultRenderId;\n    (void)defaultCaptureId;\n#endif\n\n#ifndef PA_WINRT\n    hr = IMMDeviceCollection_Item((IMMDeviceCollection *)pEndPoints, index, &wasapiDeviceInfo->device);\n    IF_FAILED_INTERNAL_ERROR_JUMP(hr, result, error);\n\n    // Get device Id\n    {\n        WCHAR *deviceId;\n\n        hr = IMMDevice_GetId(wasapiDeviceInfo->device, &deviceId);\n        IF_FAILED_INTERNAL_ERROR_JUMP(hr, result, error);\n\n        wcsncpy(wasapiDeviceInfo->deviceId, deviceId, PA_WASAPI_DEVICE_ID_LEN - 1);\n        CoTaskMemFree(deviceId);\n    }\n\n    // Get state of the device\n    hr = IMMDevice_GetState(wasapiDeviceInfo->device, &wasapiDeviceInfo->state);\n    IF_FAILED_INTERNAL_ERROR_JUMP(hr, result, error);\n    if (wasapiDeviceInfo->state != DEVICE_STATE_ACTIVE)\n    {\n        PRINT((\"WASAPI device: %d is not currently available (state:%d)\\n\", index, wasapiDeviceInfo->state));\n    }\n\n    // Get basic device info\n    {\n        IPropertyStore *pProperty;\n        IMMEndpoint *endpoint;\n        PROPVARIANT value;\n\n        hr = IMMDevice_OpenPropertyStore(wasapiDeviceInfo->device, STGM_READ, &pProperty);\n        IF_FAILED_INTERNAL_ERROR_JUMP(hr, result, error);\n\n        // \"Friendly\" Name\n        {\n            PropVariantInit(&value);\n\n            hr = IPropertyStore_GetValue(pProperty, &PKEY_Device_FriendlyName, &value);\n            IF_FAILED_INTERNAL_ERROR_JUMP(hr, result, error);\n\n            if ((deviceInfo->name = (char *)PaUtil_GroupAllocateMemory(paWasapi->allocations, PA_WASAPI_DEVICE_NAME_LEN)) == NULL)\n            {\n                result = paInsufficientMemory;\n                PropVariantClear(&value);\n                goto error;\n            }\n            if (value.pwszVal)\n                WideCharToMultiByte(CP_UTF8, 0, value.pwszVal, (INT32)wcslen(value.pwszVal), (char *)deviceInfo->name, PA_WASAPI_DEVICE_NAME_LEN - 1, 0, 0);\n            else\n                _snprintf((char *)deviceInfo->name, PA_WASAPI_DEVICE_NAME_LEN - 1, \"baddev%d\", index);\n\n            PropVariantClear(&value);\n\n            PA_DEBUG((\"WASAPI:%d| name[%s]\\n\", index, deviceInfo->name));\n        }\n\n        // Default format\n        {\n            PropVariantInit(&value);\n\n            hr = IPropertyStore_GetValue(pProperty, &PKEY_AudioEngine_DeviceFormat, &value);\n            IF_FAILED_INTERNAL_ERROR_JUMP(hr, result, error);\n\n            memcpy(&wasapiDeviceInfo->DefaultFormat, value.blob.pBlobData, min(sizeof(wasapiDeviceInfo->DefaultFormat), value.blob.cbSize));\n\n            PropVariantClear(&value);\n        }\n\n        // Form factor\n        {\n            PropVariantInit(&value);\n\n            hr = IPropertyStore_GetValue(pProperty, &PKEY_AudioEndpoint_FormFactor, &value);\n            IF_FAILED_INTERNAL_ERROR_JUMP(hr, result, error);\n\n        // set\n        #if defined(DUMMYUNIONNAME) && defined(NONAMELESSUNION)\n            // avoid breaking strict-aliasing rules in such line: (EndpointFormFactor)(*((UINT *)(((WORD *)&value.wReserved3)+1)));\n            UINT v;\n            memcpy(&v, (((WORD *)&value.wReserved3) + 1), sizeof(v));\n            wasapiDeviceInfo->formFactor = (EndpointFormFactor)v;\n        #else\n            wasapiDeviceInfo->formFactor = (EndpointFormFactor)value.uintVal;\n        #endif\n\n            PA_DEBUG((\"WASAPI:%d| form-factor[%d]\\n\", index, wasapiDeviceInfo->formFactor));\n\n            PropVariantClear(&value);\n        }\n\n        // Data flow (Renderer or Capture)\n        hr = IMMDevice_QueryInterface(wasapiDeviceInfo->device, &pa_IID_IMMEndpoint, (void **)&endpoint);\n        if (SUCCEEDED(hr))\n        {\n            hr = IMMEndpoint_GetDataFlow(endpoint, &wasapiDeviceInfo->flow);\n            SAFE_RELEASE(endpoint);\n        }\n\n        SAFE_RELEASE(pProperty);\n    }\n#else\n    // Set device Id\n    wcsncpy(wasapiDeviceInfo->deviceId, listEntry->info->id, PA_WASAPI_DEVICE_ID_LEN - 1);\n\n    // Set device name\n    if ((deviceInfo->name = (char *)PaUtil_GroupAllocateMemory(paWasapi->allocations, PA_WASAPI_DEVICE_NAME_LEN)) == NULL)\n    {\n        result = paInsufficientMemory;\n        goto error;\n    }\n    ((char *)deviceInfo->name)[0] = 0;\n    if (listEntry->info->name[0] != 0)\n        WideCharToMultiByte(CP_UTF8, 0, listEntry->info->name, (INT32)wcslen(listEntry->info->name), (char *)deviceInfo->name, PA_WASAPI_DEVICE_NAME_LEN - 1, 0, 0);\n    if (deviceInfo->name[0] == 0) // fallback if WideCharToMultiByte is failed, or listEntry is nameless\n        _snprintf((char *)deviceInfo->name, PA_WASAPI_DEVICE_NAME_LEN - 1, \"WASAPI_%s:%d\", (listEntry->flow == eRender ? \"Output\" : \"Input\"), index);\n\n    // Form-factor\n    wasapiDeviceInfo->formFactor = listEntry->info->formFactor;\n\n    // Set data flow\n    wasapiDeviceInfo->flow = listEntry->flow;\n#endif\n\n    // Set default Output/Input devices\n    if ((defaultRenderId != NULL) && (wcsncmp(wasapiDeviceInfo->deviceId, defaultRenderId, PA_WASAPI_DEVICE_NAME_LEN - 1) == 0))\n        hostApi->info.defaultOutputDevice = hostApi->info.deviceCount;\n    if ((defaultCaptureId != NULL) && (wcsncmp(wasapiDeviceInfo->deviceId, defaultCaptureId, PA_WASAPI_DEVICE_NAME_LEN - 1) == 0))\n        hostApi->info.defaultInputDevice = hostApi->info.deviceCount;\n\n    // Get a temporary IAudioClient for more details\n    {\n        IAudioClient *tmpClient;\n        WAVEFORMATEX *mixFormat;\n\n        hr = ActivateAudioInterface(wasapiDeviceInfo, NULL, &tmpClient);\n        IF_FAILED_INTERNAL_ERROR_JUMP(hr, result, error);\n\n        // Get latency\n        hr = IAudioClient_GetDevicePeriod(tmpClient, &wasapiDeviceInfo->DefaultDevicePeriod, &wasapiDeviceInfo->MinimumDevicePeriod);\n        if (FAILED(hr))\n        {\n            PA_DEBUG((\"WASAPI:%d| failed getting min/default periods by IAudioClient::GetDevicePeriod() with error[%08X], will use 30000/100000 hns\\n\", index, (UINT32)hr));\n\n            // assign WASAPI common values\n            wasapiDeviceInfo->DefaultDevicePeriod = 100000;\n            wasapiDeviceInfo->MinimumDevicePeriod = 30000;\n\n            // ignore error, let continue further without failing with paInternalError\n            hr = S_OK;\n        }\n\n        // Get mix format\n        hr = IAudioClient_GetMixFormat(tmpClient, &mixFormat);\n        if (SUCCEEDED(hr))\n        {\n            memcpy(&wasapiDeviceInfo->MixFormat, mixFormat, min(sizeof(wasapiDeviceInfo->MixFormat), (sizeof(*mixFormat) + mixFormat->cbSize)));\n            CoTaskMemFree(mixFormat);\n        }\n\n        // Register WINRT device\n    #ifdef PA_WINRT\n        if (SUCCEEDED(hr))\n        {\n            // Set state\n            wasapiDeviceInfo->state = DEVICE_STATE_ACTIVE;\n\n            // Default format (Shared mode) is always a mix format\n            wasapiDeviceInfo->DefaultFormat = wasapiDeviceInfo->MixFormat;\n        }\n    #endif\n\n        // Release tmp client\n        SAFE_RELEASE(tmpClient);\n\n        if (hr != S_OK)\n        {\n            //davidv: this happened with my hardware, previously for that same device in DirectSound:\n            //Digital Output (Realtek AC'97 Audio)'s GUID: {0x38f2cf50,0x7b4c,0x4740,0x86,0xeb,0xd4,0x38,0x66,0xd8,0xc8, 0x9f}\n            //so something must be _really_ wrong with this device, TODO handle this better. We kind of need GetMixFormat\n            LogHostError(hr);\n            result = paInternalError;\n            goto error;\n        }\n    }\n\n    // Fill basic device data\n    deviceInfo->maxInputChannels = 0;\n    deviceInfo->maxOutputChannels = 0;\n    deviceInfo->defaultSampleRate = wasapiDeviceInfo->MixFormat.Format.nSamplesPerSec;\n    switch (wasapiDeviceInfo->flow)\n    {\n    case eRender: {\n        deviceInfo->maxOutputChannels         = wasapiDeviceInfo->MixFormat.Format.nChannels;\n        deviceInfo->defaultHighOutputLatency = nano100ToSeconds(wasapiDeviceInfo->DefaultDevicePeriod);\n        deviceInfo->defaultLowOutputLatency  = nano100ToSeconds(wasapiDeviceInfo->MinimumDevicePeriod);\n        PA_DEBUG((\"WASAPI:%d| def.SR[%d] max.CH[%d] latency{hi[%f] lo[%f]}\\n\", index, (UINT32)deviceInfo->defaultSampleRate,\n            deviceInfo->maxOutputChannels, (float)deviceInfo->defaultHighOutputLatency, (float)deviceInfo->defaultLowOutputLatency));\n        break;}\n    case eCapture: {\n        deviceInfo->maxInputChannels        = wasapiDeviceInfo->MixFormat.Format.nChannels;\n        deviceInfo->defaultHighInputLatency = nano100ToSeconds(wasapiDeviceInfo->DefaultDevicePeriod);\n        deviceInfo->defaultLowInputLatency  = nano100ToSeconds(wasapiDeviceInfo->MinimumDevicePeriod);\n        PA_DEBUG((\"WASAPI:%d| def.SR[%d] max.CH[%d] latency{hi[%f] lo[%f]}\\n\", index, (UINT32)deviceInfo->defaultSampleRate,\n            deviceInfo->maxInputChannels, (float)deviceInfo->defaultHighInputLatency, (float)deviceInfo->defaultLowInputLatency));\n        break; }\n    default:\n        PRINT((\"WASAPI:%d| bad Data Flow!\\n\", index));\n        result = paInternalError;\n        goto error;\n    }\n\n    return paNoError;\n\nerror:\n\n    PRINT((\"WASAPI: failed filling device info for device index[%d] - error[%d|%s]\\n\", index, result, Pa_GetErrorText(result)));\n\n    return result;\n}\n\n// ------------------------------------------------------------------------------------------\nstatic PaDeviceInfo *AllocateDeviceListMemory(PaWasapiHostApiRepresentation *paWasapi)\n{\n    PaUtilHostApiRepresentation *hostApi = (PaUtilHostApiRepresentation *)paWasapi;\n    PaDeviceInfo *deviceInfoArray = NULL;\n\n    if ((paWasapi->devInfo = (PaWasapiDeviceInfo *)PaUtil_GroupAllocateMemory(paWasapi->allocations,\n        sizeof(PaWasapiDeviceInfo) * paWasapi->deviceCount)) == NULL)\n    {\n        return NULL;\n    }\n    memset(paWasapi->devInfo, 0, sizeof(PaWasapiDeviceInfo) * paWasapi->deviceCount);\n\n    if (paWasapi->deviceCount != 0)\n    {\n        UINT32 i;\n        UINT32 deviceCount = paWasapi->deviceCount;\n    #if defined(PA_WASAPI_MAX_CONST_DEVICE_COUNT) && (PA_WASAPI_MAX_CONST_DEVICE_COUNT > 0)\n        if (deviceCount < PA_WASAPI_MAX_CONST_DEVICE_COUNT)\n            deviceCount = PA_WASAPI_MAX_CONST_DEVICE_COUNT;\n    #endif\n\n        if ((hostApi->deviceInfos = (PaDeviceInfo **)PaUtil_GroupAllocateMemory(paWasapi->allocations,\n            sizeof(PaDeviceInfo *) * deviceCount)) == NULL)\n        {\n            return NULL;\n        }\n        for (i = 0; i < deviceCount; ++i)\n            hostApi->deviceInfos[i] = NULL;\n\n        // Allocate all device info structs in a contiguous block\n        if ((deviceInfoArray = (PaDeviceInfo *)PaUtil_GroupAllocateMemory(paWasapi->allocations,\n            sizeof(PaDeviceInfo) * deviceCount)) == NULL)\n        {\n            return NULL;\n        }\n        memset(deviceInfoArray, 0, sizeof(PaDeviceInfo) * deviceCount);\n    }\n\n    return deviceInfoArray;\n}\n\n// ------------------------------------------------------------------------------------------\nstatic PaError CreateDeviceList(PaWasapiHostApiRepresentation *paWasapi, PaHostApiIndex hostApiIndex)\n{\n    PaUtilHostApiRepresentation *hostApi = (PaUtilHostApiRepresentation *)paWasapi;\n    PaError result = paNoError;\n    PaDeviceInfo *deviceInfoArray = NULL;\n    UINT32 i;\n    WCHAR *defaultRenderId = NULL;\n    WCHAR *defaultCaptureId = NULL;\n#ifndef PA_WINRT\n    HRESULT hr;\n    IMMDeviceCollection *pEndPoints = NULL;\n    IMMDeviceEnumerator *pEnumerator = NULL;\n#else\n    void *pEndPoints = NULL;\n    IAudioClient *tmpClient;\n    PaWasapiWinrtDeviceListContext deviceListContext = { 0 };\n    PaWasapiWinrtDeviceInfo defaultRender = { 0 };\n    PaWasapiWinrtDeviceInfo defaultCapture = { 0 };\n#endif\n\n    // Make sure device list empty\n    if ((paWasapi->deviceCount != 0) || (hostApi->info.deviceCount != 0))\n        return paInternalError;\n\n#ifndef PA_WINRT\n    hr = CoCreateInstance(&pa_CLSID_IMMDeviceEnumerator, NULL, CLSCTX_INPROC_SERVER,\n        &pa_IID_IMMDeviceEnumerator, (void **)&pEnumerator);\n    IF_FAILED_INTERNAL_ERROR_JUMP(hr, result, error);\n\n    // Get default render and capture devices\n    {\n        IMMDevice *device;\n\n        hr = IMMDeviceEnumerator_GetDefaultAudioEndpoint(pEnumerator, eRender, eMultimedia, &device);\n        if (hr != S_OK)\n        {\n            if (hr != E_NOTFOUND)\n            {\n                IF_FAILED_INTERNAL_ERROR_JUMP(hr, result, error);\n            }\n        }\n        else\n        {\n            hr = IMMDevice_GetId(device, &defaultRenderId);\n            IMMDevice_Release(device);\n            IF_FAILED_INTERNAL_ERROR_JUMP(hr, result, error);\n        }\n\n        hr = IMMDeviceEnumerator_GetDefaultAudioEndpoint(pEnumerator, eCapture, eMultimedia, &device);\n        if (hr != S_OK)\n        {\n            if (hr != E_NOTFOUND)\n            {\n                IF_FAILED_INTERNAL_ERROR_JUMP(hr, result, error);\n            }\n        }\n        else\n        {\n            hr = IMMDevice_GetId(device, &defaultCaptureId);\n            IMMDevice_Release(device);\n            IF_FAILED_INTERNAL_ERROR_JUMP(hr, result, error);\n        }\n    }\n\n    // Get all currently active devices\n    hr = IMMDeviceEnumerator_EnumAudioEndpoints(pEnumerator, eAll, DEVICE_STATE_ACTIVE, &pEndPoints);\n    IF_FAILED_INTERNAL_ERROR_JUMP(hr, result, error);\n\n    // Get device count\n    hr = IMMDeviceCollection_GetCount(pEndPoints, &paWasapi->deviceCount);\n    IF_FAILED_INTERNAL_ERROR_JUMP(hr, result, error);\n#else\n    WinRT_GetDefaultDeviceId(defaultRender.id, STATIC_ARRAY_SIZE(defaultRender.id) - 1, eRender);\n    defaultRenderId = defaultRender.id;\n\n    WinRT_GetDefaultDeviceId(defaultCapture.id, STATIC_ARRAY_SIZE(defaultCapture.id) - 1, eCapture);\n    defaultCaptureId = defaultCapture.id;\n\n    if (g_DeviceListInfo.render.deviceCount == 0)\n    {\n        if (SUCCEEDED(WinRT_ActivateAudioInterface(defaultRenderId, GetAudioClientIID(), &tmpClient)))\n        {\n            deviceListContext.devices[paWasapi->deviceCount].info = &defaultRender;\n            deviceListContext.devices[paWasapi->deviceCount].flow = eRender;\n            paWasapi->deviceCount++;\n\n            SAFE_RELEASE(tmpClient);\n        }\n    }\n    else\n    {\n        for (i = 0; i < g_DeviceListInfo.render.deviceCount; ++i)\n        {\n            deviceListContext.devices[paWasapi->deviceCount].info = &g_DeviceListInfo.render.devices[i];\n            deviceListContext.devices[paWasapi->deviceCount].flow = eRender;\n            paWasapi->deviceCount++;\n        }\n    }\n\n    if (g_DeviceListInfo.capture.deviceCount == 0)\n    {\n        if (SUCCEEDED(WinRT_ActivateAudioInterface(defaultCaptureId, GetAudioClientIID(), &tmpClient)))\n        {\n            deviceListContext.devices[paWasapi->deviceCount].info = &defaultCapture;\n            deviceListContext.devices[paWasapi->deviceCount].flow = eCapture;\n            paWasapi->deviceCount++;\n\n            SAFE_RELEASE(tmpClient);\n        }\n    }\n    else\n    {\n        for (i = 0; i < g_DeviceListInfo.capture.deviceCount; ++i)\n        {\n            deviceListContext.devices[paWasapi->deviceCount].info = &g_DeviceListInfo.capture.devices[i];\n            deviceListContext.devices[paWasapi->deviceCount].flow = eCapture;\n            paWasapi->deviceCount++;\n        }\n    }\n#endif\n\n    // Allocate memory for the device list\n    if ((paWasapi->deviceCount != 0) && ((deviceInfoArray = AllocateDeviceListMemory(paWasapi)) == NULL))\n    {\n        result = paInsufficientMemory;\n        goto error;\n    }\n\n    // Fill WASAPI device info\n    for (i = 0; i < paWasapi->deviceCount; ++i)\n    {\n        PaDeviceInfo *deviceInfo = &deviceInfoArray[i];\n\n        PA_DEBUG((\"WASAPI: device idx: %02d\\n\", i));\n        PA_DEBUG((\"WASAPI: ---------------\\n\"));\n\n        FillBaseDeviceInfo(deviceInfo, hostApiIndex);\n\n        if ((result = FillDeviceInfo(paWasapi, pEndPoints, i, defaultRenderId, defaultCaptureId,\n            deviceInfo, &paWasapi->devInfo[i]\n        #ifdef PA_WINRT\n            , &deviceListContext\n        #endif\n            )) != paNoError)\n        {\n            // Faulty device is made inactive\n            if ((result = FillInactiveDeviceInfo(paWasapi, deviceInfo)) != paNoError)\n                goto error;\n        }\n\n        hostApi->deviceInfos[i] = deviceInfo;\n        ++hostApi->info.deviceCount;\n    }\n\n    // Fill the remaining slots with inactive device info\n#if defined(PA_WASAPI_MAX_CONST_DEVICE_COUNT) && (PA_WASAPI_MAX_CONST_DEVICE_COUNT > 0)\n    if ((hostApi->info.deviceCount != 0) && (hostApi->info.deviceCount < PA_WASAPI_MAX_CONST_DEVICE_COUNT))\n    {\n        for (i = hostApi->info.deviceCount; i < PA_WASAPI_MAX_CONST_DEVICE_COUNT; ++i)\n        {\n            PaDeviceInfo *deviceInfo = &deviceInfoArray[i];\n\n            FillBaseDeviceInfo(deviceInfo, hostApiIndex);\n\n            if ((result = FillInactiveDeviceInfo(paWasapi, deviceInfo)) != paNoError)\n                goto error;\n\n            hostApi->deviceInfos[i] = deviceInfo;\n            ++hostApi->info.deviceCount;\n        }\n    }\n#endif\n\n    // Clear any non-fatal errors\n    result = paNoError;\n\n    PRINT((\"WASAPI: device list ok - found %d devices\\n\", paWasapi->deviceCount));\n\ndone:\n\n#ifndef PA_WINRT\n    CoTaskMemFree(defaultRenderId);\n    CoTaskMemFree(defaultCaptureId);\n    SAFE_RELEASE(pEndPoints);\n    SAFE_RELEASE(pEnumerator);\n#endif\n\n    return result;\n\nerror:\n\n    // Safety if error was not set so that we do not think initialize was a success\n    if (result == paNoError)\n        result = paInternalError;\n\n    PRINT((\"WASAPI: failed to create device list - error[%d|%s]\\n\", result, Pa_GetErrorText(result)));\n\n    goto done;\n}\n\n// ------------------------------------------------------------------------------------------\nPaError PaWasapi_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex hostApiIndex )\n{\n    PaError result;\n    PaWasapiHostApiRepresentation *paWasapi;\n\n#ifndef PA_WINRT\n    if (!SetupAVRT())\n    {\n        PRINT((\"WASAPI: No AVRT! (not VISTA?)\\n\"));\n        return paNoError;\n    }\n#endif\n\n    paWasapi = (PaWasapiHostApiRepresentation *)PaUtil_AllocateMemory(sizeof(PaWasapiHostApiRepresentation));\n    if (paWasapi == NULL)\n    {\n        result = paInsufficientMemory;\n        goto error;\n    }\n    memset(paWasapi, 0, sizeof(PaWasapiHostApiRepresentation)); /* ensure all fields are zeroed. especially paWasapi->allocations */\n\n    // Initialize COM subsystem\n    result = PaWinUtil_CoInitialize(paWASAPI, &paWasapi->comInitializationResult);\n    if (result != paNoError)\n        goto error;\n\n    // Create memory group\n    paWasapi->allocations = PaUtil_CreateAllocationGroup();\n    if (paWasapi->allocations == NULL)\n    {\n        result = paInsufficientMemory;\n        goto error;\n    }\n\n    // Fill basic interface info\n    *hostApi                             = &paWasapi->inheritedHostApiRep;\n    (*hostApi)->info.structVersion         = 1;\n    (*hostApi)->info.type                 = paWASAPI;\n    (*hostApi)->info.name                 = \"Windows WASAPI\";\n    (*hostApi)->info.deviceCount         = 0;\n    (*hostApi)->info.defaultInputDevice     = paNoDevice;\n    (*hostApi)->info.defaultOutputDevice = paNoDevice;\n    (*hostApi)->Terminate                = Terminate;\n    (*hostApi)->OpenStream               = OpenStream;\n    (*hostApi)->IsFormatSupported        = IsFormatSupported;\n\n    // Fill the device list\n    if ((result = CreateDeviceList(paWasapi, hostApiIndex)) != paNoError)\n        goto error;\n\n    // Detect if platform workaround is required\n    paWasapi->useWOW64Workaround = UseWOW64Workaround();\n\n    // Initialize time getter\n    SystemTimer_InitializeTimeGetter();\n\n    PaUtil_InitializeStreamInterface( &paWasapi->callbackStreamInterface, CloseStream, StartStream,\n                                      StopStream, AbortStream, IsStreamStopped, IsStreamActive,\n                                      GetStreamTime, GetStreamCpuLoad,\n                                      PaUtil_DummyRead, PaUtil_DummyWrite,\n                                      PaUtil_DummyGetReadAvailable, PaUtil_DummyGetWriteAvailable );\n\n    PaUtil_InitializeStreamInterface( &paWasapi->blockingStreamInterface, CloseStream, StartStream,\n                                      StopStream, AbortStream, IsStreamStopped, IsStreamActive,\n                                      GetStreamTime, PaUtil_DummyGetCpuLoad,\n                                      ReadStream, WriteStream, GetStreamReadAvailable, GetStreamWriteAvailable );\n\n    PRINT((\"WASAPI: initialized ok\\n\"));\n\n    return paNoError;\n\nerror:\n\n    PRINT((\"WASAPI: failed %s error[%d|%s]\\n\", __FUNCTION__, result, Pa_GetErrorText(result)));\n\n    Terminate((PaUtilHostApiRepresentation *)paWasapi);\n\n    return result;\n}\n\n// ------------------------------------------------------------------------------------------\nstatic void ReleaseWasapiDeviceInfoList( PaWasapiHostApiRepresentation *paWasapi )\n{\n    UINT32 i;\n\n    // Release device info bound objects\n    for (i = 0; i < paWasapi->deviceCount; ++i)\n    {\n    #ifndef PA_WINRT\n        SAFE_RELEASE(paWasapi->devInfo[i].device);\n    #endif\n    }\n\n    // Free device info\n    if (paWasapi->allocations != NULL)\n        PaUtil_GroupFreeMemory(paWasapi->allocations, paWasapi->devInfo);\n\n    // Be ready for a device list reinitialization and if its creation is failed pointers must not be dangling\n    paWasapi->devInfo = NULL;\n    paWasapi->deviceCount = 0;\n}\n\n// ------------------------------------------------------------------------------------------\nstatic void Terminate( PaUtilHostApiRepresentation *hostApi )\n{\n    PaWasapiHostApiRepresentation *paWasapi = (PaWasapiHostApiRepresentation*)hostApi;\n    if (paWasapi == NULL)\n        return;\n\n    // Release device list\n    ReleaseWasapiDeviceInfoList(paWasapi);\n\n    // Free allocations and memory group itself\n    if (paWasapi->allocations != NULL)\n    {\n        PaUtil_FreeAllAllocations(paWasapi->allocations);\n        PaUtil_DestroyAllocationGroup(paWasapi->allocations);\n    }\n\n    // Release COM subsystem\n    PaWinUtil_CoUninitialize(paWASAPI, &paWasapi->comInitializationResult);\n\n    // Free API representation\n    PaUtil_FreeMemory(paWasapi);\n\n    // Close AVRT\n    CloseAVRT();\n}\n\n// ------------------------------------------------------------------------------------------\nstatic PaWasapiHostApiRepresentation *_GetHostApi(PaError *ret)\n{\n    PaError error;\n    PaUtilHostApiRepresentation *pApi;\n\n    if ((error = PaUtil_GetHostApiRepresentation(&pApi, paWASAPI)) != paNoError)\n    {\n        if (ret != NULL)\n            (*ret) = error;\n\n        return NULL;\n    }\n\n    return (PaWasapiHostApiRepresentation *)pApi;\n}\n\n// ------------------------------------------------------------------------------------------\nstatic PaError UpdateDeviceList()\n{\n    int i;\n    PaError ret;\n    PaWasapiHostApiRepresentation *paWasapi;\n    PaUtilHostApiRepresentation *hostApi;\n\n    // Get API\n    hostApi = (PaUtilHostApiRepresentation *)(paWasapi = _GetHostApi(&ret));\n    if (paWasapi == NULL)\n        return paNotInitialized;\n\n    // Make sure initialized properly\n    if (paWasapi->allocations == NULL)\n        return paNotInitialized;\n\n    // Release WASAPI internal device info list\n    ReleaseWasapiDeviceInfoList(paWasapi);\n\n    // Release external device info list\n    if (hostApi->deviceInfos != NULL)\n    {\n        for (i = 0; i < hostApi->info.deviceCount; ++i)\n        {\n            PaUtil_GroupFreeMemory(paWasapi->allocations, (void *)hostApi->deviceInfos[i]->name);\n        }\n        PaUtil_GroupFreeMemory(paWasapi->allocations, hostApi->deviceInfos[0]);\n        PaUtil_GroupFreeMemory(paWasapi->allocations, hostApi->deviceInfos);\n\n        // Be ready for a device list reinitialization and if its creation is failed pointers must not be dangling\n        hostApi->deviceInfos = NULL;\n        hostApi->info.deviceCount = 0;\n        hostApi->info.defaultInputDevice = paNoDevice;\n        hostApi->info.defaultOutputDevice = paNoDevice;\n    }\n\n    // Fill possibly updated device list\n    if ((ret = CreateDeviceList(paWasapi, Pa_HostApiTypeIdToHostApiIndex(paWASAPI))) != paNoError)\n        return ret;\n\n    return paNoError;\n}\n\n// ------------------------------------------------------------------------------------------\nPaError PaWasapi_UpdateDeviceList()\n{\n#if defined(PA_WASAPI_MAX_CONST_DEVICE_COUNT) && (PA_WASAPI_MAX_CONST_DEVICE_COUNT > 0)\n    return UpdateDeviceList();\n#else\n    return paInternalError;\n#endif\n}\n\n// ------------------------------------------------------------------------------------------\nint PaWasapi_GetDeviceCurrentFormat( PaStream *pStream, void *pFormat, unsigned int formatSize, int bOutput )\n{\n    UINT32 size;\n    WAVEFORMATEXTENSIBLE *format;\n\n    PaWasapiStream *stream = (PaWasapiStream *)pStream;\n    if (stream == NULL)\n        return paBadStreamPtr;\n\n    format = (bOutput == TRUE ? &stream->out.wavex : &stream->in.wavex);\n\n    size = min(formatSize, (UINT32)sizeof(*format));\n    memcpy(pFormat, format, size);\n\n    return size;\n}\n\n// ------------------------------------------------------------------------------------------\nstatic PaError _GetWasapiDeviceInfoByDeviceIndex( PaWasapiDeviceInfo **info, PaDeviceIndex device )\n{\n    PaError ret;\n    PaDeviceIndex index;\n\n    // Get API\n    PaWasapiHostApiRepresentation *paWasapi = _GetHostApi(&ret);\n    if (paWasapi == NULL)\n        return paNotInitialized;\n\n    // Get device index\n    if ((ret = PaUtil_DeviceIndexToHostApiDeviceIndex(&index, device, &paWasapi->inheritedHostApiRep)) != paNoError)\n        return ret;\n\n    // Validate index\n    if ((UINT32)index >= paWasapi->deviceCount)\n        return paInvalidDevice;\n\n    (*info) = &paWasapi->devInfo[ index ];\n\n    return paNoError;\n}\n\n// ------------------------------------------------------------------------------------------\nint PaWasapi_GetDeviceDefaultFormat( void *pFormat, unsigned int formatSize, PaDeviceIndex device )\n{\n    PaError ret;\n    PaWasapiDeviceInfo *deviceInfo;\n    UINT32 size;\n\n    if (pFormat == NULL)\n        return paBadBufferPtr;\n    if (formatSize <= 0)\n        return paBufferTooSmall;\n\n    if ((ret = _GetWasapiDeviceInfoByDeviceIndex(&deviceInfo, device)) != paNoError)\n        return ret;\n\n    size = min(formatSize, (UINT32)sizeof(deviceInfo->DefaultFormat));\n    memcpy(pFormat, &deviceInfo->DefaultFormat, size);\n\n    return size;\n}\n\n// ------------------------------------------------------------------------------------------\nint PaWasapi_GetDeviceMixFormat( void *pFormat, unsigned int formatSize, PaDeviceIndex device )\n{\n    PaError ret;\n    PaWasapiDeviceInfo *deviceInfo;\n    UINT32 size;\n\n    if (pFormat == NULL)\n        return paBadBufferPtr;\n    if (formatSize <= 0)\n        return paBufferTooSmall;\n\n    if ((ret = _GetWasapiDeviceInfoByDeviceIndex(&deviceInfo, device)) != paNoError)\n        return ret;\n\n    size = min(formatSize, (UINT32)sizeof(deviceInfo->MixFormat));\n    memcpy(pFormat, &deviceInfo->MixFormat, size);\n\n    return size;\n}\n\n// ------------------------------------------------------------------------------------------\nint PaWasapi_GetDeviceRole( PaDeviceIndex device )\n{\n    PaError ret;\n    PaWasapiDeviceInfo *deviceInfo;\n\n    if ((ret = _GetWasapiDeviceInfoByDeviceIndex(&deviceInfo, device)) != paNoError)\n        return ret;\n\n    return deviceInfo->formFactor;\n}\n\n// ------------------------------------------------------------------------------------------\nPaError PaWasapi_GetIMMDevice( PaDeviceIndex device, void **pIMMDevice )\n{\n#ifndef PA_WINRT\n    PaError ret;\n    PaWasapiDeviceInfo *deviceInfo;\n\n    if (pIMMDevice == NULL)\n        return paBadBufferPtr;\n\n    if ((ret = _GetWasapiDeviceInfoByDeviceIndex(&deviceInfo, device)) != paNoError)\n        return ret;\n\n    (*pIMMDevice) = deviceInfo->device;\n\n    return paNoError;\n#else\n    (void)device;\n    (void)pIMMDevice;\n    return paIncompatibleStreamHostApi;\n#endif\n}\n\n// ------------------------------------------------------------------------------------------\nPaError PaWasapi_GetFramesPerHostBuffer( PaStream *pStream, unsigned int *pInput, unsigned int *pOutput )\n{\n    PaWasapiStream *stream = (PaWasapiStream *)pStream;\n    if (stream == NULL)\n        return paBadStreamPtr;\n\n    if (pInput != NULL)\n        (*pInput) = stream->in.framesPerHostCallback;\n\n    if (pOutput != NULL)\n        (*pOutput) = stream->out.framesPerHostCallback;\n\n    return paNoError;\n}\n\n// ------------------------------------------------------------------------------------------\nstatic void LogWAVEFORMATEXTENSIBLE(const WAVEFORMATEXTENSIBLE *in)\n{\n    const WAVEFORMATEX *old = (WAVEFORMATEX *)in;\n    switch (old->wFormatTag)\n    {\n    case WAVE_FORMAT_EXTENSIBLE: {\n\n        PRINT((\"wFormatTag     =WAVE_FORMAT_EXTENSIBLE\\n\"));\n\n        if (IsEqualGUID(&in->SubFormat, &pa_KSDATAFORMAT_SUBTYPE_IEEE_FLOAT))\n        {\n            PRINT((\"SubFormat      =KSDATAFORMAT_SUBTYPE_IEEE_FLOAT\\n\"));\n        }\n        else\n        if (IsEqualGUID(&in->SubFormat, &pa_KSDATAFORMAT_SUBTYPE_PCM))\n        {\n            PRINT((\"SubFormat      =KSDATAFORMAT_SUBTYPE_PCM\\n\"));\n        }\n        else\n        {\n            PRINT((\"SubFormat      =CUSTOM GUID{%d:%d:%d:%d%d%d%d%d%d%d%d}\\n\",\n                                        in->SubFormat.Data1,\n                                        in->SubFormat.Data2,\n                                        in->SubFormat.Data3,\n                                        (int)in->SubFormat.Data4[0],\n                                        (int)in->SubFormat.Data4[1],\n                                        (int)in->SubFormat.Data4[2],\n                                        (int)in->SubFormat.Data4[3],\n                                        (int)in->SubFormat.Data4[4],\n                                        (int)in->SubFormat.Data4[5],\n                                        (int)in->SubFormat.Data4[6],\n                                        (int)in->SubFormat.Data4[7]));\n        }\n        PRINT((\"Samples.wValidBitsPerSample =%d\\n\",  in->Samples.wValidBitsPerSample));\n        PRINT((\"dwChannelMask  =0x%X\\n\",in->dwChannelMask));\n\n        break; }\n\n    case WAVE_FORMAT_PCM:        PRINT((\"wFormatTag     =WAVE_FORMAT_PCM\\n\")); break;\n    case WAVE_FORMAT_IEEE_FLOAT: PRINT((\"wFormatTag     =WAVE_FORMAT_IEEE_FLOAT\\n\")); break;\n    default:\n        PRINT((\"wFormatTag     =UNKNOWN(%d)\\n\",old->wFormatTag)); break;\n    }\n\n    PRINT((\"nChannels      =%d\\n\",old->nChannels));\n    PRINT((\"nSamplesPerSec =%d\\n\",old->nSamplesPerSec));\n    PRINT((\"nAvgBytesPerSec=%d\\n\",old->nAvgBytesPerSec));\n    PRINT((\"nBlockAlign    =%d\\n\",old->nBlockAlign));\n    PRINT((\"wBitsPerSample =%d\\n\",old->wBitsPerSample));\n    PRINT((\"cbSize         =%d\\n\",old->cbSize));\n}\n\n// ------------------------------------------------------------------------------------------\nPaSampleFormat WaveToPaFormat(const WAVEFORMATEXTENSIBLE *fmtext)\n{\n    const WAVEFORMATEX *fmt = (WAVEFORMATEX *)fmtext;\n\n    switch (fmt->wFormatTag)\n    {\n    case WAVE_FORMAT_EXTENSIBLE: {\n        if (IsEqualGUID(&fmtext->SubFormat, &pa_KSDATAFORMAT_SUBTYPE_IEEE_FLOAT))\n        {\n            if (fmtext->Samples.wValidBitsPerSample == 32)\n                return paFloat32;\n        }\n        else\n        if (IsEqualGUID(&fmtext->SubFormat, &pa_KSDATAFORMAT_SUBTYPE_PCM))\n        {\n            switch (fmt->wBitsPerSample)\n            {\n            case 32: return paInt32;\n            case 24: return paInt24;\n            case 16: return paInt16;\n            case  8: return paUInt8;\n            }\n        }\n        break; }\n\n    case WAVE_FORMAT_IEEE_FLOAT:\n        return paFloat32;\n\n    case WAVE_FORMAT_PCM: {\n        switch (fmt->wBitsPerSample)\n        {\n        case 32: return paInt32;\n        case 24: return paInt24;\n        case 16: return paInt16;\n        case  8: return paUInt8;\n        }\n        break; }\n    }\n\n    return paCustomFormat;\n}\n\n// ------------------------------------------------------------------------------------------\nstatic PaError MakeWaveFormatFromParams(WAVEFORMATEXTENSIBLE *wavex, const PaStreamParameters *params,\n    double sampleRate, BOOL packedOnly)\n{\n    WORD bitsPerSample;\n    WAVEFORMATEX *old;\n    DWORD channelMask = 0;\n    BOOL useExtensible = (params->channelCount > 2); // format is always forced for >2 channels format\n    PaWasapiStreamInfo *streamInfo = (PaWasapiStreamInfo *)params->hostApiSpecificStreamInfo;\n\n    // Convert PaSampleFormat to valid data bits\n    if ((bitsPerSample = PaSampleFormatToBitsPerSample(params->sampleFormat)) == 0)\n        return paSampleFormatNotSupported;\n\n    // Use user assigned channel mask\n    if ((streamInfo != NULL) && (streamInfo->flags & paWinWasapiUseChannelMask))\n    {\n        channelMask   = streamInfo->channelMask;\n        useExtensible = TRUE;\n    }\n\n    memset(wavex, 0, sizeof(*wavex));\n\n    old                    = (WAVEFORMATEX *)wavex;\n    old->nChannels      = (WORD)params->channelCount;\n    old->nSamplesPerSec = (DWORD)sampleRate;\n    old->wBitsPerSample = bitsPerSample;\n\n    // according to MSDN for WAVEFORMATEX structure for WAVE_FORMAT_PCM:\n    // \"If wFormatTag is WAVE_FORMAT_PCM, then wBitsPerSample should be equal to 8 or 16.\"\n    if ((bitsPerSample != 8) && (bitsPerSample != 16))\n    {\n        // Normally 20 or 24 bits must go in 32 bit containers (ints) but in Exclusive mode some devices require\n        // packed version of the format, e.g. for example 24-bit in 3-bytes\n        old->wBitsPerSample = (packedOnly ? bitsPerSample : 32);\n        useExtensible       = TRUE;\n    }\n\n    // WAVEFORMATEX\n    if (!useExtensible)\n    {\n        old->wFormatTag    = WAVE_FORMAT_PCM;\n    }\n    // WAVEFORMATEXTENSIBLE\n    else\n    {\n        old->wFormatTag = WAVE_FORMAT_EXTENSIBLE;\n        old->cbSize        = sizeof(WAVEFORMATEXTENSIBLE) - sizeof(WAVEFORMATEX);\n\n        if ((params->sampleFormat & ~paNonInterleaved) == paFloat32)\n            wavex->SubFormat = pa_KSDATAFORMAT_SUBTYPE_IEEE_FLOAT;\n        else\n            wavex->SubFormat = pa_KSDATAFORMAT_SUBTYPE_PCM;\n\n        wavex->Samples.wValidBitsPerSample = bitsPerSample;\n\n        // Set channel mask\n        if (channelMask != 0)\n        {\n            wavex->dwChannelMask = channelMask;\n        }\n        else\n        {\n            switch (params->channelCount)\n            {\n            case 1:  wavex->dwChannelMask = PAWIN_SPEAKER_MONO; break;\n            case 2:  wavex->dwChannelMask = PAWIN_SPEAKER_STEREO; break;\n            case 3:  wavex->dwChannelMask = PAWIN_SPEAKER_STEREO|SPEAKER_LOW_FREQUENCY; break;\n            case 4:  wavex->dwChannelMask = PAWIN_SPEAKER_QUAD; break;\n            case 5:  wavex->dwChannelMask = PAWIN_SPEAKER_QUAD|SPEAKER_LOW_FREQUENCY; break;\n#ifdef PAWIN_SPEAKER_5POINT1_SURROUND\n            case 6:  wavex->dwChannelMask = PAWIN_SPEAKER_5POINT1_SURROUND; break;\n#else\n            case 6:  wavex->dwChannelMask = PAWIN_SPEAKER_5POINT1; break;\n#endif\n#ifdef PAWIN_SPEAKER_5POINT1_SURROUND\n            case 7:  wavex->dwChannelMask = PAWIN_SPEAKER_5POINT1_SURROUND|SPEAKER_BACK_CENTER; break;\n#else\n            case 7:  wavex->dwChannelMask = PAWIN_SPEAKER_5POINT1|SPEAKER_BACK_CENTER; break;\n#endif\n#ifdef PAWIN_SPEAKER_7POINT1_SURROUND\n            case 8:  wavex->dwChannelMask = PAWIN_SPEAKER_7POINT1_SURROUND; break;\n#else\n            case 8:  wavex->dwChannelMask = PAWIN_SPEAKER_7POINT1; break;\n#endif\n\n            default: wavex->dwChannelMask = 0;\n            }\n        }\n    }\n\n    old->nBlockAlign     = old->nChannels * (old->wBitsPerSample / 8);\n    old->nAvgBytesPerSec = old->nSamplesPerSec * old->nBlockAlign;\n\n    return paNoError;\n}\n\n// ------------------------------------------------------------------------------------------\nstatic HRESULT GetAlternativeSampleFormatExclusive(IAudioClient *client, double sampleRate,\n    const PaStreamParameters *params, WAVEFORMATEXTENSIBLE *outWavex, BOOL packedSampleFormatOnly)\n{\n    HRESULT hr = !S_OK;\n    AUDCLNT_SHAREMODE shareMode = AUDCLNT_SHAREMODE_EXCLUSIVE;\n    WAVEFORMATEXTENSIBLE testFormat;\n    PaStreamParameters testParams;\n    int i;\n    static const PaSampleFormat bestToWorst[] = { paInt32, paInt24, paFloat32, paInt16 };\n\n    // Try combination Stereo (2 channels) and then we will use our custom mono-stereo mixer\n    if (params->channelCount == 1)\n    {\n        testParams = (*params);\n        testParams.channelCount = 2;\n\n        if (MakeWaveFormatFromParams(&testFormat, &testParams, sampleRate, packedSampleFormatOnly) == paNoError)\n        {\n            if ((hr = IAudioClient_IsFormatSupported(client, shareMode, &testFormat.Format, NULL)) == S_OK)\n            {\n                (*outWavex) = testFormat;\n                return hr;\n            }\n        }\n\n        // Try selecting suitable sample type\n        for (i = 0; i < STATIC_ARRAY_SIZE(bestToWorst); ++i)\n        {\n            testParams.sampleFormat = bestToWorst[i];\n\n            if (MakeWaveFormatFromParams(&testFormat, &testParams, sampleRate, packedSampleFormatOnly) == paNoError)\n            {\n                if ((hr = IAudioClient_IsFormatSupported(client, shareMode, &testFormat.Format, NULL)) == S_OK)\n                {\n                    (*outWavex) = testFormat;\n                    return hr;\n                }\n            }\n        }\n    }\n\n    // Try selecting suitable sample type\n    testParams = (*params);\n    for (i = 0; i < STATIC_ARRAY_SIZE(bestToWorst); ++i)\n    {\n        testParams.sampleFormat = bestToWorst[i];\n\n        if (MakeWaveFormatFromParams(&testFormat, &testParams, sampleRate, packedSampleFormatOnly) == paNoError)\n        {\n            if ((hr = IAudioClient_IsFormatSupported(client, shareMode, &testFormat.Format, NULL)) == S_OK)\n            {\n                (*outWavex) = testFormat;\n                return hr;\n            }\n        }\n    }\n\n    return hr;\n}\n\n// ------------------------------------------------------------------------------------------\nstatic PaError GetClosestFormat(IAudioClient *client, double sampleRate, const PaStreamParameters *_params,\n    AUDCLNT_SHAREMODE shareMode, WAVEFORMATEXTENSIBLE *outWavex, BOOL output)\n{\n    PaWasapiStreamInfo *streamInfo   = (PaWasapiStreamInfo *)_params->hostApiSpecificStreamInfo;\n    WAVEFORMATEX *sharedClosestMatch = NULL;\n    HRESULT hr                       = !S_OK;\n    PaStreamParameters params        = (*_params);\n    const BOOL explicitFormat        = (streamInfo != NULL) && ((streamInfo->flags & paWinWasapiExplicitSampleFormat) == paWinWasapiExplicitSampleFormat);\n    (void)output;\n\n    /* It was not noticed that 24-bit Input producing no output while device accepts this format.\n       To fix this issue let's ask for 32-bits and let PA converters convert host 32-bit data\n       to 24-bit for user-space. The bug concerns Vista, if Windows 7 supports 24-bits for Input\n       please report to PortAudio developers to exclude Windows 7.\n    */\n    /*if ((params.sampleFormat == paInt24) && (output == FALSE))\n        params.sampleFormat = paFloat32;*/ // <<< The silence was due to missing Int32_To_Int24_Dither implementation\n\n    // Try standard approach, e.g. if data is > 16 bits it will be packed into 32-bit containers\n    MakeWaveFormatFromParams(outWavex, &params, sampleRate, FALSE);\n\n    // If built-in PCM converter requested then shared mode format will always succeed\n    if ((GetWindowsVersion() >= WINDOWS_7_SERVER2008R2) &&\n        (shareMode == AUDCLNT_SHAREMODE_SHARED) &&\n        ((streamInfo != NULL) && (streamInfo->flags & paWinWasapiAutoConvert)))\n        return paFormatIsSupported;\n\n    hr = IAudioClient_IsFormatSupported(client, shareMode, &outWavex->Format, (shareMode == AUDCLNT_SHAREMODE_SHARED ? &sharedClosestMatch : NULL));\n\n    // Exclusive mode can require packed format for some devices\n    if ((hr != S_OK) && (shareMode == AUDCLNT_SHAREMODE_EXCLUSIVE))\n    {\n        // Enforce packed only format, e.g. data bits will not be packed into 32-bit containers in any case\n        MakeWaveFormatFromParams(outWavex, &params, sampleRate, TRUE);\n        hr = IAudioClient_IsFormatSupported(client, shareMode, &outWavex->Format, NULL);\n    }\n\n    if (hr == S_OK)\n    {\n        return paFormatIsSupported;\n    }\n    else\n    if (sharedClosestMatch != NULL)\n    {\n        WORD bitsPerSample;\n\n        if (sharedClosestMatch->wFormatTag == WAVE_FORMAT_EXTENSIBLE)\n            memcpy(outWavex, sharedClosestMatch, sizeof(WAVEFORMATEXTENSIBLE));\n        else\n            memcpy(outWavex, sharedClosestMatch, sizeof(WAVEFORMATEX));\n\n        CoTaskMemFree(sharedClosestMatch);\n        sharedClosestMatch = NULL;\n\n        // Validate SampleRate\n        if ((DWORD)sampleRate != outWavex->Format.nSamplesPerSec)\n            return paInvalidSampleRate;\n\n        // Validate Channel count\n        if ((WORD)params.channelCount != outWavex->Format.nChannels)\n        {\n            // If mono, then driver does not support 1 channel, we use internal workaround\n            // of tiny software mixing functionality, e.g. we provide to user buffer 1 channel\n            // but then mix into 2 for device buffer\n            if ((params.channelCount == 1) && (outWavex->Format.nChannels == 2))\n                return paFormatIsSupported;\n            else\n                return paInvalidChannelCount;\n        }\n\n        // Validate Sample format\n        if ((bitsPerSample = PaSampleFormatToBitsPerSample(params.sampleFormat)) == 0)\n            return paSampleFormatNotSupported;\n\n        // Accepted format\n        return paFormatIsSupported;\n    }\n    else\n    if ((shareMode == AUDCLNT_SHAREMODE_EXCLUSIVE) && !explicitFormat)\n    {\n        // Try standard approach, e.g. if data is > 16 bits it will be packed into 32-bit containers\n        if ((hr = GetAlternativeSampleFormatExclusive(client, sampleRate, &params, outWavex, FALSE)) == S_OK)\n            return paFormatIsSupported;\n\n        // Enforce packed only format, e.g. data bits will not be packed into 32-bit containers in any case\n        if ((hr = GetAlternativeSampleFormatExclusive(client, sampleRate, &params, outWavex, TRUE)) == S_OK)\n            return paFormatIsSupported;\n\n        // Log failure\n        LogHostError(hr);\n    }\n    else\n    {\n        // Exclusive mode and requested strict format, WASAPI did not accept this sample format\n        LogHostError(hr);\n    }\n\n    return paInvalidSampleRate;\n}\n\n// ------------------------------------------------------------------------------------------\nstatic PaError IsStreamParamsValid(struct PaUtilHostApiRepresentation *hostApi,\n                                   const  PaStreamParameters *inputParameters,\n                                   const  PaStreamParameters *outputParameters,\n                                   double sampleRate)\n{\n    if (hostApi == NULL)\n        return paHostApiNotFound;\n    if ((UINT32)sampleRate == 0)\n        return paInvalidSampleRate;\n\n    if (inputParameters != NULL)\n    {\n        /* all standard sample formats are supported by the buffer adapter,\n            this implementation doesn't support any custom sample formats */\n        // Note: paCustomFormat is now 8.24 (24-bits in 32-bit containers)\n        //if (inputParameters->sampleFormat & paCustomFormat)\n        //    return paSampleFormatNotSupported;\n\n        /* unless alternate device specification is supported, reject the use of\n            paUseHostApiSpecificDeviceSpecification */\n        if (inputParameters->device == paUseHostApiSpecificDeviceSpecification)\n            return paInvalidDevice;\n\n        /* check that input device can support inputChannelCount */\n        if (inputParameters->channelCount > hostApi->deviceInfos[ inputParameters->device ]->maxInputChannels)\n            return paInvalidChannelCount;\n\n        /* validate inputStreamInfo */\n        if (inputParameters->hostApiSpecificStreamInfo)\n        {\n            PaWasapiStreamInfo *inputStreamInfo = (PaWasapiStreamInfo *)inputParameters->hostApiSpecificStreamInfo;\n            if ((inputStreamInfo->size != sizeof(PaWasapiStreamInfo)) ||\n                (inputStreamInfo->version != 1) ||\n                (inputStreamInfo->hostApiType != paWASAPI))\n            {\n                return paIncompatibleHostApiSpecificStreamInfo;\n            }\n        }\n\n        return paNoError;\n    }\n\n    if (outputParameters != NULL)\n    {\n        /* all standard sample formats are supported by the buffer adapter,\n            this implementation doesn't support any custom sample formats */\n        // Note: paCustomFormat is now 8.24 (24-bits in 32-bit containers)\n        //if (outputParameters->sampleFormat & paCustomFormat)\n        //    return paSampleFormatNotSupported;\n\n        /* unless alternate device specification is supported, reject the use of\n            paUseHostApiSpecificDeviceSpecification */\n        if (outputParameters->device == paUseHostApiSpecificDeviceSpecification)\n            return paInvalidDevice;\n\n        /* check that output device can support outputChannelCount */\n        if (outputParameters->channelCount > hostApi->deviceInfos[ outputParameters->device ]->maxOutputChannels)\n            return paInvalidChannelCount;\n\n        /* validate outputStreamInfo */\n        if(outputParameters->hostApiSpecificStreamInfo)\n        {\n            PaWasapiStreamInfo *outputStreamInfo = (PaWasapiStreamInfo *)outputParameters->hostApiSpecificStreamInfo;\n            if ((outputStreamInfo->size != sizeof(PaWasapiStreamInfo)) ||\n                (outputStreamInfo->version != 1) ||\n                (outputStreamInfo->hostApiType != paWASAPI))\n            {\n                return paIncompatibleHostApiSpecificStreamInfo;\n            }\n        }\n\n        return paNoError;\n    }\n\n    return (inputParameters || outputParameters ? paNoError : paInternalError);\n}\n\n// ------------------------------------------------------------------------------------------\nstatic PaError IsFormatSupported( struct PaUtilHostApiRepresentation *hostApi,\n                                  const  PaStreamParameters *inputParameters,\n                                  const  PaStreamParameters *outputParameters,\n                                  double sampleRate )\n{\n    IAudioClient *tmpClient = NULL;\n    PaWasapiHostApiRepresentation *paWasapi = (PaWasapiHostApiRepresentation*)hostApi;\n    PaWasapiStreamInfo *inputStreamInfo = NULL, *outputStreamInfo = NULL;\n\n    // Validate PaStreamParameters\n    PaError error;\n    if ((error = IsStreamParamsValid(hostApi, inputParameters, outputParameters, sampleRate)) != paNoError)\n        return error;\n\n    if (inputParameters != NULL)\n    {\n        WAVEFORMATEXTENSIBLE wavex;\n        HRESULT hr;\n        PaError answer;\n        AUDCLNT_SHAREMODE shareMode = AUDCLNT_SHAREMODE_SHARED;\n        inputStreamInfo = (PaWasapiStreamInfo *)inputParameters->hostApiSpecificStreamInfo;\n\n        if (inputStreamInfo && (inputStreamInfo->flags & paWinWasapiExclusive))\n            shareMode = AUDCLNT_SHAREMODE_EXCLUSIVE;\n\n        hr = ActivateAudioInterface(&paWasapi->devInfo[inputParameters->device], inputStreamInfo, &tmpClient);\n        if (hr != S_OK)\n        {\n            LogHostError(hr);\n            return paInvalidDevice;\n        }\n\n        answer = GetClosestFormat(tmpClient, sampleRate, inputParameters, shareMode, &wavex, FALSE);\n        SAFE_RELEASE(tmpClient);\n\n        if (answer != paFormatIsSupported)\n            return answer;\n    }\n\n    if (outputParameters != NULL)\n    {\n        HRESULT hr;\n        WAVEFORMATEXTENSIBLE wavex;\n        PaError answer;\n        AUDCLNT_SHAREMODE shareMode = AUDCLNT_SHAREMODE_SHARED;\n        outputStreamInfo = (PaWasapiStreamInfo *)outputParameters->hostApiSpecificStreamInfo;\n\n        if (outputStreamInfo && (outputStreamInfo->flags & paWinWasapiExclusive))\n            shareMode = AUDCLNT_SHAREMODE_EXCLUSIVE;\n\n        hr = ActivateAudioInterface(&paWasapi->devInfo[outputParameters->device], outputStreamInfo, &tmpClient);\n        if (hr != S_OK)\n        {\n            LogHostError(hr);\n            return paInvalidDevice;\n        }\n\n        answer = GetClosestFormat(tmpClient, sampleRate, outputParameters, shareMode, &wavex, TRUE);\n        SAFE_RELEASE(tmpClient);\n\n        if (answer != paFormatIsSupported)\n            return answer;\n    }\n\n    return paFormatIsSupported;\n}\n\n// ------------------------------------------------------------------------------------------\nstatic PaUint32 _GetFramesPerHostBuffer(PaUint32 userFramesPerBuffer, PaTime suggestedLatency, double sampleRate, PaUint32 TimerJitterMs)\n{\n    PaUint32 frames = userFramesPerBuffer + max( userFramesPerBuffer, (PaUint32)(suggestedLatency * sampleRate) );\n    frames += (PaUint32)((sampleRate * 0.001) * TimerJitterMs);\n    return frames;\n}\n\n// ------------------------------------------------------------------------------------------\nstatic void _RecalculateBuffersCount(PaWasapiSubStream *sub, UINT32 userFramesPerBuffer, UINT32 framesPerLatency,\n    BOOL fullDuplex, BOOL output)\n{\n    // Count buffers (must be at least 1)\n    sub->buffers = (userFramesPerBuffer != 0 ? framesPerLatency / userFramesPerBuffer : 1);\n    if (sub->buffers == 0)\n        sub->buffers = 1;\n\n    // Determine number of buffers used:\n    // - Full-duplex mode will lead to period difference, thus only 1\n    // - Input mode, only 1, as WASAPI allows extraction of only 1 packet\n    // - For Shared mode we use double buffering\n    if ((sub->shareMode == AUDCLNT_SHAREMODE_EXCLUSIVE) || fullDuplex)\n    {\n        BOOL eventMode = ((sub->streamFlags & AUDCLNT_STREAMFLAGS_EVENTCALLBACK) == AUDCLNT_STREAMFLAGS_EVENTCALLBACK);\n\n        // Exclusive mode does not allow >1 buffers be used for Event interface, e.g. GetBuffer\n        // call must acquire max buffer size and it all must be processed.\n        if (eventMode)\n            sub->userBufferAndHostMatch = 1;\n\n        // Full-duplex or Event mode: prefer paUtilBoundedHostBufferSize because exclusive mode will starve\n        // and produce glitchy audio\n        // Output Polling mode: prefer paUtilFixedHostBufferSize (buffers != 1) for polling mode is it allows\n        // to consume user data by fixed size data chunks and thus lowers memory movement (less CPU usage)\n        if (fullDuplex || eventMode || !output)\n            sub->buffers = 1;\n    }\n}\n\n// ------------------------------------------------------------------------------------------\nstatic void _CalculateAlignedPeriod(PaWasapiSubStream *pSub, UINT32 *nFramesPerLatency, ALIGN_FUNC pAlignFunc)\n{\n    // Align frames to HD Audio packet size of 128 bytes for Exclusive mode only.\n    // Not aligning on Windows Vista will cause Event timeout, although Windows 7 will\n    // return AUDCLNT_E_BUFFER_SIZE_NOT_ALIGNED error to realign buffer. Aligning is necessary\n    // for Exclusive mode only! when audio data is fed directly to hardware.\n    if (pSub->shareMode == AUDCLNT_SHAREMODE_EXCLUSIVE)\n    {\n        (*nFramesPerLatency) = AlignFramesPerBuffer((*nFramesPerLatency),\n            pSub->wavex.Format.nBlockAlign, pAlignFunc);\n    }\n\n    // Calculate period\n    pSub->period = MakeHnsPeriod((*nFramesPerLatency), pSub->wavex.Format.nSamplesPerSec);\n}\n\n// ------------------------------------------------------------------------------------------\nstatic void _CalculatePeriodicity(PaWasapiSubStream *pSub, BOOL output, REFERENCE_TIME *periodicity)\n{\n    // Note: according to Microsoft docs for IAudioClient::Initialize we can set periodicity of the buffer\n    // only for Exclusive mode. By setting periodicity almost equal to the user buffer frames we can\n    // achieve high quality (less glitchy) low-latency audio.\n    if (pSub->shareMode == AUDCLNT_SHAREMODE_EXCLUSIVE)\n    {\n        const PaWasapiDeviceInfo *pInfo = pSub->params.device_info;\n\n        // By default periodicity equals to the full buffer (legacy PA WASAPI's behavior)\n        (*periodicity) = pSub->period;\n\n        // Try make buffer ready for I/O once we request the buffer readiness for it. Only Polling mode\n        // because for Event mode buffer size and periodicity must be equal according to Microsoft\n        // documentation for IAudioClient::Initialize.\n        //\n        // TO-DO: try spread to capture and full-duplex cases (not tested and therefore disabled)\n        //\n        if (((pSub->streamFlags & AUDCLNT_STREAMFLAGS_EVENTCALLBACK) == 0) &&\n            (output && !pSub->params.full_duplex))\n        {\n            UINT32 alignedFrames;\n            REFERENCE_TIME userPeriodicity;\n\n            // Align frames backwards, so device will likely make buffer read ready when we are ready\n            // to read it (our scheduling will wait for amount of millisoconds of frames_per_buffer)\n            alignedFrames = AlignFramesPerBuffer(pSub->params.frames_per_buffer,\n                pSub->wavex.Format.nBlockAlign, ALIGN_BWD);\n\n            userPeriodicity = MakeHnsPeriod(alignedFrames, pSub->wavex.Format.nSamplesPerSec);\n\n            // Must not be larger than buffer size\n            if (userPeriodicity > pSub->period)\n                userPeriodicity = pSub->period;\n\n            // Must not be smaller than minimum supported by the device\n            if (userPeriodicity < pInfo->MinimumDevicePeriod)\n                userPeriodicity = pInfo->MinimumDevicePeriod;\n\n            (*periodicity) = userPeriodicity;\n        }\n    }\n    else\n        (*periodicity) = 0;\n}\n\n// ------------------------------------------------------------------------------------------\nstatic HRESULT CreateAudioClient(PaWasapiStream *pStream, PaWasapiSubStream *pSub, BOOL output, PaError *pa_error)\n{\n    PaError error;\n    HRESULT hr;\n    const PaWasapiDeviceInfo *pInfo  = pSub->params.device_info;\n    const PaStreamParameters *params = &pSub->params.stream_params;\n    const double sampleRate          = pSub->params.sample_rate;\n    const BOOL fullDuplex            = pSub->params.full_duplex;\n    const UINT32 userFramesPerBuffer = pSub->params.frames_per_buffer;\n    UINT32 framesPerLatency          = userFramesPerBuffer;\n    IAudioClient *audioClient        = NULL;\n    REFERENCE_TIME eventPeriodicity  = 0;\n\n    // Assume default failure due to some reason\n    (*pa_error) = paInvalidDevice;\n\n    // Validate parameters\n    if (!pSub || !pInfo || !params)\n    {\n        (*pa_error) = paBadStreamPtr;\n        return E_POINTER;\n    }\n    if ((UINT32)sampleRate == 0)\n    {\n        (*pa_error) = paInvalidSampleRate;\n        return E_INVALIDARG;\n    }\n\n    // Get the audio client\n    if (FAILED(hr = ActivateAudioInterface(pInfo, &pSub->params.wasapi_params, &audioClient)))\n    {\n        (*pa_error) = paInsufficientMemory;\n        LogHostError(hr);\n        goto done;\n    }\n\n    // Get closest format\n    if ((error = GetClosestFormat(audioClient, sampleRate, params, pSub->shareMode, &pSub->wavex, output)) != paFormatIsSupported)\n    {\n        (*pa_error) = error;\n        LogHostError(hr = AUDCLNT_E_UNSUPPORTED_FORMAT);\n        goto done; // fail, format not supported\n    }\n\n    // Check for Mono <<>> Stereo workaround\n    if ((params->channelCount == 1) && (pSub->wavex.Format.nChannels == 2))\n    {\n        // select mixer\n        pSub->monoMixer = GetMonoToStereoMixer(&pSub->wavex, (pInfo->flow == eRender ? MIX_DIR__1TO2 : MIX_DIR__2TO1_L));\n        if (pSub->monoMixer == NULL)\n        {\n            (*pa_error) = paInvalidChannelCount;\n            LogHostError(hr = AUDCLNT_E_UNSUPPORTED_FORMAT);\n            goto done; // fail, no mixer for format\n        }\n    }\n\n    // Calculate host buffer size\n    if ((pSub->shareMode != AUDCLNT_SHAREMODE_EXCLUSIVE) &&\n        (!pSub->streamFlags || ((pSub->streamFlags & AUDCLNT_STREAMFLAGS_EVENTCALLBACK) == 0)))\n    {\n        framesPerLatency = _GetFramesPerHostBuffer(userFramesPerBuffer,\n            params->suggestedLatency, pSub->wavex.Format.nSamplesPerSec, 0/*,\n            (pSub->streamFlags & AUDCLNT_STREAMFLAGS_EVENTCALLBACK ? 0 : 1)*/);\n    }\n    else\n    {\n    #ifdef PA_WASAPI_FORCE_POLL_IF_LARGE_BUFFER\n        REFERENCE_TIME overall;\n    #endif\n\n        // Work 1:1 with user buffer (only polling allows to use >1)\n        framesPerLatency += MakeFramesFromHns(SecondsTonano100(params->suggestedLatency), pSub->wavex.Format.nSamplesPerSec);\n\n        // Force Polling if overall latency is >= 21.33ms as it allows to use 100% CPU in a callback,\n        // or user specified latency parameter.\n    #ifdef PA_WASAPI_FORCE_POLL_IF_LARGE_BUFFER\n        overall = MakeHnsPeriod(framesPerLatency, pSub->wavex.Format.nSamplesPerSec);\n        if (overall >= (106667 * 2)/*21.33ms*/)\n        {\n            framesPerLatency = _GetFramesPerHostBuffer(userFramesPerBuffer,\n                params->suggestedLatency, pSub->wavex.Format.nSamplesPerSec, 0/*,\n                (streamFlags & AUDCLNT_STREAMFLAGS_EVENTCALLBACK ? 0 : 1)*/);\n\n            // Use Polling interface\n            pSub->streamFlags &= ~AUDCLNT_STREAMFLAGS_EVENTCALLBACK;\n            PRINT((\"WASAPI: CreateAudioClient: forcing POLL mode\\n\"));\n        }\n    #endif\n    }\n\n    // For full-duplex output resize buffer to be the same as for input\n    if (output && fullDuplex)\n        framesPerLatency = pStream->in.framesPerHostCallback;\n\n    // Avoid 0 frames\n    if (framesPerLatency == 0)\n        framesPerLatency = MakeFramesFromHns(pInfo->DefaultDevicePeriod, pSub->wavex.Format.nSamplesPerSec);\n\n    // Exclusive Input stream renders data in 6 packets, we must set then the size of\n    // single packet, total buffer size, e.g. required latency will be PacketSize * 6\n    if (!output && (pSub->shareMode == AUDCLNT_SHAREMODE_EXCLUSIVE))\n    {\n        // Do it only for Polling mode\n        if ((pSub->streamFlags & AUDCLNT_STREAMFLAGS_EVENTCALLBACK) == 0)\n            framesPerLatency /= WASAPI_PACKETS_PER_INPUT_BUFFER;\n    }\n\n    // Calculate aligned period\n    _CalculateAlignedPeriod(pSub, &framesPerLatency, ALIGN_BWD);\n\n    /*! Enforce min/max period for device in Shared mode to avoid bad audio quality.\n        Avoid doing so for Exclusive mode as alignment will suffer.\n    */\n    if (pSub->shareMode == AUDCLNT_SHAREMODE_SHARED)\n    {\n        if (pSub->period < pInfo->DefaultDevicePeriod)\n        {\n            pSub->period = pInfo->DefaultDevicePeriod;\n\n            // Recalculate aligned period\n            framesPerLatency = MakeFramesFromHns(pSub->period, pSub->wavex.Format.nSamplesPerSec);\n            _CalculateAlignedPeriod(pSub, &framesPerLatency, ALIGN_BWD);\n        }\n    }\n    else\n    {\n        if (pSub->period < pInfo->MinimumDevicePeriod)\n        {\n            pSub->period = pInfo->MinimumDevicePeriod;\n\n            // Recalculate aligned period\n            framesPerLatency = MakeFramesFromHns(pSub->period, pSub->wavex.Format.nSamplesPerSec);\n            _CalculateAlignedPeriod(pSub, &framesPerLatency, ALIGN_FWD);\n        }\n    }\n\n    /*! Windows 7 does not allow to set latency lower than minimal device period and will\n        return error: AUDCLNT_E_INVALID_DEVICE_PERIOD. Under Vista we enforce the same behavior\n        manually for unified behavior on all platforms.\n    */\n    {\n        /*!    AUDCLNT_E_BUFFER_SIZE_ERROR: Applies to Windows 7 and later.\n            Indicates that the buffer duration value requested by an exclusive-mode client is\n            out of range. The requested duration value for pull mode must not be greater than\n            500 milliseconds; for push mode the duration value must not be greater than 2 seconds.\n        */\n        if (pSub->shareMode == AUDCLNT_SHAREMODE_EXCLUSIVE)\n        {\n            static const REFERENCE_TIME MAX_BUFFER_EVENT_DURATION = 500  * 10000;\n            static const REFERENCE_TIME MAX_BUFFER_POLL_DURATION  = 2000 * 10000;\n\n            // Pull mode, max 500ms\n            if (pSub->streamFlags & AUDCLNT_STREAMFLAGS_EVENTCALLBACK)\n            {\n                if (pSub->period > MAX_BUFFER_EVENT_DURATION)\n                {\n                    pSub->period = MAX_BUFFER_EVENT_DURATION;\n\n                    // Recalculate aligned period\n                    framesPerLatency = MakeFramesFromHns(pSub->period, pSub->wavex.Format.nSamplesPerSec);\n                    _CalculateAlignedPeriod(pSub, &framesPerLatency, ALIGN_BWD);\n                }\n            }\n            // Push mode, max 2000ms\n            else\n            {\n                if (pSub->period > MAX_BUFFER_POLL_DURATION)\n                {\n                    pSub->period = MAX_BUFFER_POLL_DURATION;\n\n                    // Recalculate aligned period\n                    framesPerLatency = MakeFramesFromHns(pSub->period, pSub->wavex.Format.nSamplesPerSec);\n                    _CalculateAlignedPeriod(pSub, &framesPerLatency, ALIGN_BWD);\n                }\n            }\n        }\n    }\n\n    // Set device scheduling period (always 0 in Shared mode according to Microsoft docs)\n    _CalculatePeriodicity(pSub, output, &eventPeriodicity);\n\n    // Open the stream and associate it with an audio session\n    hr = IAudioClient_Initialize(audioClient,\n        pSub->shareMode,\n        pSub->streamFlags,\n        pSub->period,\n        eventPeriodicity,\n        &pSub->wavex.Format,\n        NULL);\n\n    // [Output only] Check if buffer size is the one we requested in Exclusive mode, for UAC1 USB DACs WASAPI\n    // can allocate internal buffer equal to 8 times of pSub->period that has to be corrected in order to match\n    // the requested latency\n    if (output && SUCCEEDED(hr) && (pSub->shareMode == AUDCLNT_SHAREMODE_EXCLUSIVE))\n    {\n        UINT32 maxBufferFrames;\n\n        if (FAILED(hr = IAudioClient_GetBufferSize(audioClient, &maxBufferFrames)))\n        {\n            (*pa_error) = paInvalidDevice;\n            LogHostError(hr);\n            goto done;\n        }\n\n        // For Exclusive mode for UAC1 devices maxBufferFrames may be framesPerLatency * 8 but check any difference\n        // to be able to guarantee the latency user requested and also resulted framesPerLatency may be bigger than\n        // 2 seconds that will cause audio client not operational (GetCurrentPadding() will return always 0)\n        if (maxBufferFrames >= (framesPerLatency * 2))\n        {\n            UINT32 ratio = maxBufferFrames / framesPerLatency;\n\n            PRINT((\"WASAPI: CreateAudioClient: detected %d times larger buffer than requested, correct to match user latency\\n\", ratio));\n\n            // Get new aligned frames lowered by calculated ratio\n            framesPerLatency = MakeFramesFromHns(pSub->period / ratio, pSub->wavex.Format.nSamplesPerSec);\n            _CalculateAlignedPeriod(pSub, &framesPerLatency, ALIGN_BWD);\n\n            // Make sure we are not below the minimum period\n            if (pSub->period < pInfo->MinimumDevicePeriod)\n                pSub->period = pInfo->MinimumDevicePeriod;\n\n            // Release previous client\n            SAFE_RELEASE(audioClient);\n\n            // Create a new audio client\n            if (FAILED(hr = ActivateAudioInterface(pInfo, &pSub->params.wasapi_params, &audioClient)))\n            {\n                (*pa_error) = paInsufficientMemory;\n                LogHostError(hr);\n                goto done;\n            }\n\n            // Set device scheduling period (always 0 in Shared mode according to Microsoft docs)\n            _CalculatePeriodicity(pSub, output, &eventPeriodicity);\n\n            // Open the stream and associate it with an audio session\n            hr = IAudioClient_Initialize(audioClient,\n                pSub->shareMode,\n                pSub->streamFlags,\n                pSub->period,\n                eventPeriodicity,\n                &pSub->wavex.Format,\n                NULL);\n        }\n    }\n\n    /*! WASAPI is tricky on large device buffer, sometimes 2000ms can be allocated sometimes\n        less. There is no known guaranteed level thus we make subsequent tries by decreasing\n        buffer by 100ms per try.\n    */\n    while ((hr == E_OUTOFMEMORY) && (pSub->period > (100 * 10000)))\n    {\n        PRINT((\"WASAPI: CreateAudioClient: decreasing buffer size to %d milliseconds\\n\", (pSub->period / 10000)));\n\n        // Decrease by 100ms and try again\n        pSub->period -= (100 * 10000);\n\n        // Recalculate aligned period\n        framesPerLatency = MakeFramesFromHns(pSub->period, pSub->wavex.Format.nSamplesPerSec);\n        _CalculateAlignedPeriod(pSub, &framesPerLatency, ALIGN_BWD);\n\n        // Release the previous allocations\n        SAFE_RELEASE(audioClient);\n\n        // Create a new audio client\n        if (FAILED(hr = ActivateAudioInterface(pInfo, &pSub->params.wasapi_params, &audioClient)))\n        {\n            (*pa_error) = paInsufficientMemory;\n            LogHostError(hr);\n            goto done;\n        }\n\n        // Set device scheduling period (always 0 in Shared mode according to Microsoft docs)\n        _CalculatePeriodicity(pSub, output, &eventPeriodicity);\n\n        // Open the stream and associate it with an audio session\n        hr = IAudioClient_Initialize(audioClient,\n            pSub->shareMode,\n            pSub->streamFlags,\n            pSub->period,\n            eventPeriodicity,\n            &pSub->wavex.Format,\n            NULL);\n    }\n\n    /*! WASAPI buffer size or alignment failure. Fallback to using default size and alignment.\n    */\n    if ((hr == AUDCLNT_E_BUFFER_SIZE_ERROR) || (hr == AUDCLNT_E_BUFFER_SIZE_NOT_ALIGNED))\n    {\n        // Use default\n        pSub->period = pInfo->DefaultDevicePeriod;\n\n        PRINT((\"WASAPI: CreateAudioClient: correcting buffer size/alignment to device default\\n\"));\n\n        // Release the previous allocations\n        SAFE_RELEASE(audioClient);\n\n        // Create a new audio client\n        if (FAILED(hr = ActivateAudioInterface(pInfo, &pSub->params.wasapi_params, &audioClient)))\n        {\n            (*pa_error) = paInsufficientMemory;\n            LogHostError(hr);\n            goto done;\n        }\n\n        // Set device scheduling period (always 0 in Shared mode according to Microsoft docs)\n        _CalculatePeriodicity(pSub, output, &eventPeriodicity);\n\n        // Open the stream and associate it with an audio session\n        hr = IAudioClient_Initialize(audioClient,\n            pSub->shareMode,\n            pSub->streamFlags,\n            pSub->period,\n            eventPeriodicity,\n            &pSub->wavex.Format,\n            NULL);\n    }\n\n    // Error has no workaround, fail completely\n    if (FAILED(hr))\n    {\n        (*pa_error) = paInvalidDevice;\n        LogHostError(hr);\n        goto done;\n    }\n\n    // Set client\n    pSub->clientParent = audioClient;\n    IAudioClient_AddRef(pSub->clientParent);\n\n    // Recalculate buffers count\n    _RecalculateBuffersCount(pSub, userFramesPerBuffer, MakeFramesFromHns(pSub->period, pSub->wavex.Format.nSamplesPerSec),\n        fullDuplex, output);\n\n    // No error, client is successfully created\n    (*pa_error) = paNoError;\n\ndone:\n\n    // Clean up\n    SAFE_RELEASE(audioClient);\n    return hr;\n}\n\n// ------------------------------------------------------------------------------------------\nstatic PaError ActivateAudioClientOutput(PaWasapiStream *stream)\n{\n    HRESULT hr;\n    PaError result;\n    UINT32 maxBufferSize;\n    PaTime bufferLatency;\n    const UINT32 framesPerBuffer = stream->out.params.frames_per_buffer;\n\n    // Create Audio client\n    if (FAILED(hr = CreateAudioClient(stream, &stream->out, TRUE, &result)))\n    {\n        LogPaError(result);\n        goto error;\n    }\n    LogWAVEFORMATEXTENSIBLE(&stream->out.wavex);\n\n    // Activate volume\n    stream->outVol = NULL;\n    /*hr = info->device->Activate(\n        __uuidof(IAudioEndpointVolume), CLSCTX_INPROC_SERVER, NULL,\n        (void**)&stream->outVol);\n    if (hr != S_OK)\n        return paInvalidDevice;*/\n\n    // Get max possible buffer size to check if it is not less than that we request\n    if (FAILED(hr = IAudioClient_GetBufferSize(stream->out.clientParent, &maxBufferSize)))\n    {\n        LogHostError(hr);\n        LogPaError(result = paInvalidDevice);\n        goto error;\n    }\n\n    // Correct buffer to max size if it maxed out result of GetBufferSize\n    stream->out.bufferSize = maxBufferSize;\n\n    // Number of frames that are required at each period\n    stream->out.framesPerHostCallback = maxBufferSize;\n\n    // Calculate frames per single buffer, if buffers > 1 then always framesPerBuffer\n    stream->out.framesPerBuffer =\n        (stream->out.userBufferAndHostMatch ? stream->out.framesPerHostCallback : framesPerBuffer);\n\n    // Calculate buffer latency\n    bufferLatency = (PaTime)maxBufferSize / stream->out.wavex.Format.nSamplesPerSec;\n\n    // Append buffer latency to interface latency in shared mode (see GetStreamLatency notes)\n    stream->out.latencySeconds = bufferLatency;\n\n    PRINT((\"WASAPI::OpenStream(output): framesPerUser[ %d ] framesPerHost[ %d ] latency[ %.02fms ] exclusive[ %s ] wow64_fix[ %s ] mode[ %s ]\\n\", (UINT32)framesPerBuffer, (UINT32)stream->out.framesPerHostCallback, (float)(stream->out.latencySeconds*1000.0f), (stream->out.shareMode == AUDCLNT_SHAREMODE_EXCLUSIVE ? \"YES\" : \"NO\"), (stream->out.params.wow64_workaround ? \"YES\" : \"NO\"), (stream->out.streamFlags & AUDCLNT_STREAMFLAGS_EVENTCALLBACK ? \"EVENT\" : \"POLL\")));\n\n    return paNoError;\n\nerror:\n\n    return result;\n}\n\n// ------------------------------------------------------------------------------------------\nstatic PaError ActivateAudioClientInput(PaWasapiStream *stream)\n{\n    HRESULT hr;\n    PaError result;\n    UINT32 maxBufferSize;\n    PaTime bufferLatency;\n    const UINT32 framesPerBuffer = stream->in.params.frames_per_buffer;\n\n    // Create Audio client\n    if (FAILED(hr = CreateAudioClient(stream, &stream->in, FALSE, &result)))\n    {\n        LogPaError(result);\n        goto error;\n    }\n    LogWAVEFORMATEXTENSIBLE(&stream->in.wavex);\n\n    // Create volume mgr\n    stream->inVol = NULL;\n    /*hr = info->device->Activate(\n        __uuidof(IAudioEndpointVolume), CLSCTX_INPROC_SERVER, NULL,\n        (void**)&stream->inVol);\n    if (hr != S_OK)\n        return paInvalidDevice;*/\n\n    // Get max possible buffer size to check if it is not less than that we request\n    if (FAILED(hr = IAudioClient_GetBufferSize(stream->in.clientParent, &maxBufferSize)))\n    {\n        LogHostError(hr);\n        LogPaError(result = paInvalidDevice);\n        goto error;\n    }\n\n    // Correct buffer to max size if it maxed out result of GetBufferSize\n    stream->in.bufferSize = maxBufferSize;\n\n    // Get interface latency (actually unneeded as we calculate latency from the size\n    // of maxBufferSize).\n    if (FAILED(hr = IAudioClient_GetStreamLatency(stream->in.clientParent, &stream->in.deviceLatency)))\n    {\n        LogHostError(hr);\n        LogPaError(result = paInvalidDevice);\n        goto error;\n    }\n    //stream->in.latencySeconds = nano100ToSeconds(stream->in.deviceLatency);\n\n    // Number of frames that are required at each period\n    stream->in.framesPerHostCallback = maxBufferSize;\n\n    // Calculate frames per single buffer, if buffers > 1 then always framesPerBuffer\n    stream->in.framesPerBuffer =\n        (stream->in.userBufferAndHostMatch ? stream->in.framesPerHostCallback : framesPerBuffer);\n\n    // Calculate buffer latency\n    bufferLatency = (PaTime)maxBufferSize / stream->in.wavex.Format.nSamplesPerSec;\n\n    // Append buffer latency to interface latency in shared mode (see GetStreamLatency notes)\n    stream->in.latencySeconds = bufferLatency;\n\n    PRINT((\"WASAPI::OpenStream(input): framesPerUser[ %d ] framesPerHost[ %d ] latency[ %.02fms ] exclusive[ %s ] wow64_fix[ %s ] mode[ %s ]\\n\", (UINT32)framesPerBuffer, (UINT32)stream->in.framesPerHostCallback, (float)(stream->in.latencySeconds*1000.0f), (stream->in.shareMode == AUDCLNT_SHAREMODE_EXCLUSIVE ? \"YES\" : \"NO\"), (stream->in.params.wow64_workaround ? \"YES\" : \"NO\"), (stream->in.streamFlags & AUDCLNT_STREAMFLAGS_EVENTCALLBACK ? \"EVENT\" : \"POLL\")));\n\n    return paNoError;\n\nerror:\n\n    return result;\n}\n\n// ------------------------------------------------------------------------------------------\nstatic PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,\n                           PaStream** s,\n                           const PaStreamParameters *inputParameters,\n                           const PaStreamParameters *outputParameters,\n                           double sampleRate,\n                           unsigned long framesPerBuffer,\n                           PaStreamFlags streamFlags,\n                           PaStreamCallback *streamCallback,\n                           void *userData )\n{\n    PaError result = paNoError;\n    HRESULT hr;\n    PaWasapiHostApiRepresentation *paWasapi = (PaWasapiHostApiRepresentation*)hostApi;\n    PaWasapiStream *stream = NULL;\n    int inputChannelCount, outputChannelCount;\n    PaSampleFormat inputSampleFormat, outputSampleFormat;\n    PaSampleFormat hostInputSampleFormat, hostOutputSampleFormat;\n    PaWasapiStreamInfo *inputStreamInfo = NULL, *outputStreamInfo = NULL;\n    PaWasapiDeviceInfo *info = NULL;\n    ULONG framesPerHostCallback;\n    PaUtilHostBufferSizeMode bufferMode;\n    const BOOL fullDuplex = ((inputParameters != NULL) && (outputParameters != NULL));\n    BOOL useInputBufferProcessor = (inputParameters != NULL), useOutputBufferProcessor = (outputParameters != NULL);\n\n    // validate PaStreamParameters\n    if ((result = IsStreamParamsValid(hostApi, inputParameters, outputParameters, sampleRate)) != paNoError)\n        return LogPaError(result);\n\n    // Validate platform specific flags\n    if ((streamFlags & paPlatformSpecificFlags) != 0)\n    {\n        LogPaError(result = paInvalidFlag); /* unexpected platform specific flag */\n        goto error;\n    }\n\n    // Allocate memory for PaWasapiStream\n    if ((stream = (PaWasapiStream *)PaUtil_AllocateMemory(sizeof(PaWasapiStream))) == NULL)\n    {\n        LogPaError(result = paInsufficientMemory);\n        goto error;\n    }\n\n    // Default thread priority is Audio: for exclusive mode we will use Pro Audio.\n    stream->nThreadPriority = eThreadPriorityAudio;\n\n    // Set default number of frames: paFramesPerBufferUnspecified\n    if (framesPerBuffer == paFramesPerBufferUnspecified)\n    {\n        UINT32 framesPerBufferIn  = 0, framesPerBufferOut = 0;\n        if (inputParameters != NULL)\n        {\n            info = &paWasapi->devInfo[inputParameters->device];\n            framesPerBufferIn = MakeFramesFromHns(info->DefaultDevicePeriod, (UINT32)sampleRate);\n        }\n        if (outputParameters != NULL)\n        {\n            info = &paWasapi->devInfo[outputParameters->device];\n            framesPerBufferOut = MakeFramesFromHns(info->DefaultDevicePeriod, (UINT32)sampleRate);\n        }\n        // choosing maximum default size\n        framesPerBuffer = max(framesPerBufferIn, framesPerBufferOut);\n    }\n    if (framesPerBuffer == 0)\n        framesPerBuffer = ((UINT32)sampleRate / 100) * 2;\n\n    // Try create device: Input\n    if (inputParameters != NULL)\n    {\n        inputChannelCount = inputParameters->channelCount;\n        inputSampleFormat = GetSampleFormatForIO(inputParameters->sampleFormat);\n        info              = &paWasapi->devInfo[inputParameters->device];\n\n        // default Shared Mode\n        stream->in.shareMode = AUDCLNT_SHAREMODE_SHARED;\n\n        // PaWasapiStreamInfo\n        if (inputParameters->hostApiSpecificStreamInfo != NULL)\n        {\n            memcpy(&stream->in.params.wasapi_params, inputParameters->hostApiSpecificStreamInfo, min(sizeof(stream->in.params.wasapi_params), ((PaWasapiStreamInfo *)inputParameters->hostApiSpecificStreamInfo)->size));\n            stream->in.params.wasapi_params.size = sizeof(stream->in.params.wasapi_params);\n\n            stream->in.params.stream_params.hostApiSpecificStreamInfo = &stream->in.params.wasapi_params;\n            inputStreamInfo = &stream->in.params.wasapi_params;\n\n            stream->in.flags = inputStreamInfo->flags;\n\n            // Exclusive Mode\n            if (inputStreamInfo->flags & paWinWasapiExclusive)\n            {\n                // Boost thread priority\n                stream->nThreadPriority = eThreadPriorityProAudio;\n                // Make Exclusive\n                stream->in.shareMode = AUDCLNT_SHAREMODE_EXCLUSIVE;\n            }\n\n            // explicit thread priority level\n            if (inputStreamInfo->flags & paWinWasapiThreadPriority)\n            {\n                if ((inputStreamInfo->threadPriority > eThreadPriorityNone) &&\n                    (inputStreamInfo->threadPriority <= eThreadPriorityWindowManager))\n                    stream->nThreadPriority = inputStreamInfo->threadPriority;\n            }\n\n            // redirect processing to custom user callback, ignore PA buffer processor\n            useInputBufferProcessor = !(inputStreamInfo->flags & paWinWasapiRedirectHostProcessor);\n        }\n\n        // Choose processing mode\n        stream->in.streamFlags = (stream->in.shareMode == AUDCLNT_SHAREMODE_EXCLUSIVE ? AUDCLNT_STREAMFLAGS_EVENTCALLBACK : 0);\n        if (paWasapi->useWOW64Workaround)\n            stream->in.streamFlags = 0; // polling interface\n        else\n        if (streamCallback == NULL)\n            stream->in.streamFlags = 0; // polling interface\n        else\n        if ((inputStreamInfo != NULL) && (inputStreamInfo->flags & paWinWasapiPolling))\n            stream->in.streamFlags = 0; // polling interface\n        else\n        if (fullDuplex)\n            stream->in.streamFlags = 0; // polling interface is implemented for full-duplex mode also\n\n        // Use built-in PCM converter (channel count and sample rate) if requested\n        if ((GetWindowsVersion() >= WINDOWS_7_SERVER2008R2) &&\n            (stream->in.shareMode == AUDCLNT_SHAREMODE_SHARED) &&\n            ((inputStreamInfo != NULL) && (inputStreamInfo->flags & paWinWasapiAutoConvert)))\n            stream->in.streamFlags |= (AUDCLNT_STREAMFLAGS_AUTOCONVERTPCM | AUDCLNT_STREAMFLAGS_SRC_DEFAULT_QUALITY);\n\n        // Fill parameters for Audio Client creation\n        stream->in.params.device_info       = info;\n        stream->in.params.stream_params     = (*inputParameters);\n        stream->in.params.frames_per_buffer = framesPerBuffer;\n        stream->in.params.sample_rate       = sampleRate;\n        stream->in.params.blocking          = (streamCallback == NULL);\n        stream->in.params.full_duplex       = fullDuplex;\n        stream->in.params.wow64_workaround  = paWasapi->useWOW64Workaround;\n\n        // Create and activate audio client\n        if ((result = ActivateAudioClientInput(stream)) != paNoError)\n        {\n            LogPaError(result);\n            goto error;\n        }\n\n        // Get closest format\n        hostInputSampleFormat = PaUtil_SelectClosestAvailableFormat(WaveToPaFormat(&stream->in.wavex), inputSampleFormat);\n\n        // Set user-side custom host processor\n        if ((inputStreamInfo != NULL) &&\n            (inputStreamInfo->flags & paWinWasapiRedirectHostProcessor))\n        {\n            stream->hostProcessOverrideInput.processor = inputStreamInfo->hostProcessorInput;\n            stream->hostProcessOverrideInput.userData = userData;\n        }\n\n        // Only get IAudioCaptureClient input once here instead of getting it at multiple places based on the use\n        if (FAILED(hr = IAudioClient_GetService(stream->in.clientParent, &pa_IID_IAudioCaptureClient, (void **)&stream->captureClientParent)))\n        {\n            LogHostError(hr);\n            LogPaError(result = paUnanticipatedHostError);\n            goto error;\n        }\n\n        // Create ring buffer for blocking mode (It is needed because we fetch Input packets, not frames,\n        // and thus we have to save partial packet if such remains unread)\n        if (stream->in.params.blocking == TRUE)\n        {\n            UINT32 bufferFrames = ALIGN_NEXT_POW2((stream->in.framesPerHostCallback / WASAPI_PACKETS_PER_INPUT_BUFFER) * 2);\n            UINT32 frameSize    = stream->in.wavex.Format.nBlockAlign;\n\n            // buffer\n            if ((stream->in.tailBuffer = PaUtil_AllocateMemory(sizeof(PaUtilRingBuffer))) == NULL)\n            {\n                LogPaError(result = paInsufficientMemory);\n                goto error;\n            }\n            memset(stream->in.tailBuffer, 0, sizeof(PaUtilRingBuffer));\n\n            // buffer memory region\n            stream->in.tailBufferMemory = PaUtil_AllocateMemory(frameSize * bufferFrames);\n            if (stream->in.tailBufferMemory == NULL)\n            {\n                LogPaError(result = paInsufficientMemory);\n                goto error;\n            }\n\n            // initialize\n            if (PaUtil_InitializeRingBuffer(stream->in.tailBuffer, frameSize, bufferFrames,    stream->in.tailBufferMemory) != 0)\n            {\n                LogPaError(result = paInternalError);\n                goto error;\n            }\n        }\n    }\n    else\n    {\n        inputChannelCount = 0;\n        inputSampleFormat = hostInputSampleFormat = paInt16; /* Suppress 'uninitialised var' warnings. */\n    }\n\n    // Try create device: Output\n    if (outputParameters != NULL)\n    {\n        outputChannelCount = outputParameters->channelCount;\n        outputSampleFormat = GetSampleFormatForIO(outputParameters->sampleFormat);\n        info               = &paWasapi->devInfo[outputParameters->device];\n\n        // default Shared Mode\n        stream->out.shareMode = AUDCLNT_SHAREMODE_SHARED;\n\n        // set PaWasapiStreamInfo\n        if (outputParameters->hostApiSpecificStreamInfo != NULL)\n        {\n            memcpy(&stream->out.params.wasapi_params, outputParameters->hostApiSpecificStreamInfo, min(sizeof(stream->out.params.wasapi_params), ((PaWasapiStreamInfo *)outputParameters->hostApiSpecificStreamInfo)->size));\n            stream->out.params.wasapi_params.size = sizeof(stream->out.params.wasapi_params);\n\n            stream->out.params.stream_params.hostApiSpecificStreamInfo = &stream->out.params.wasapi_params;\n            outputStreamInfo = &stream->out.params.wasapi_params;\n\n            stream->out.flags = outputStreamInfo->flags;\n\n            // Exclusive Mode\n            if (outputStreamInfo->flags & paWinWasapiExclusive)\n            {\n                // Boost thread priority\n                stream->nThreadPriority = eThreadPriorityProAudio;\n                // Make Exclusive\n                stream->out.shareMode = AUDCLNT_SHAREMODE_EXCLUSIVE;\n            }\n\n            // explicit thread priority level\n            if (outputStreamInfo->flags & paWinWasapiThreadPriority)\n            {\n                if ((outputStreamInfo->threadPriority > eThreadPriorityNone) &&\n                    (outputStreamInfo->threadPriority <= eThreadPriorityWindowManager))\n                    stream->nThreadPriority = outputStreamInfo->threadPriority;\n            }\n\n            // redirect processing to custom user callback, ignore PA buffer processor\n            useOutputBufferProcessor = !(outputStreamInfo->flags & paWinWasapiRedirectHostProcessor);\n        }\n\n        // Choose processing mode\n        stream->out.streamFlags = (stream->out.shareMode == AUDCLNT_SHAREMODE_EXCLUSIVE ? AUDCLNT_STREAMFLAGS_EVENTCALLBACK : 0);\n        if (paWasapi->useWOW64Workaround)\n            stream->out.streamFlags = 0; // polling interface\n        else\n        if (streamCallback == NULL)\n            stream->out.streamFlags = 0; // polling interface\n        else\n        if ((outputStreamInfo != NULL) && (outputStreamInfo->flags & paWinWasapiPolling))\n            stream->out.streamFlags = 0; // polling interface\n        else\n        if (fullDuplex)\n            stream->out.streamFlags = 0; // polling interface is implemented for full-duplex mode also\n\n        // Use built-in PCM converter (channel count and sample rate) if requested\n        if ((GetWindowsVersion() >= WINDOWS_7_SERVER2008R2) &&\n            (stream->out.shareMode == AUDCLNT_SHAREMODE_SHARED) &&\n            ((outputStreamInfo != NULL) && (outputStreamInfo->flags & paWinWasapiAutoConvert)))\n            stream->out.streamFlags |= (AUDCLNT_STREAMFLAGS_AUTOCONVERTPCM | AUDCLNT_STREAMFLAGS_SRC_DEFAULT_QUALITY);\n\n        // Fill parameters for Audio Client creation\n        stream->out.params.device_info       = info;\n        stream->out.params.stream_params     = (*outputParameters);\n        stream->out.params.frames_per_buffer = framesPerBuffer;\n        stream->out.params.sample_rate       = sampleRate;\n        stream->out.params.blocking          = (streamCallback == NULL);\n        stream->out.params.full_duplex       = fullDuplex;\n        stream->out.params.wow64_workaround  = paWasapi->useWOW64Workaround;\n\n        // Create and activate audio client\n        if ((result = ActivateAudioClientOutput(stream)) != paNoError)\n        {\n            LogPaError(result);\n            goto error;\n        }\n\n        // Get closest format\n        hostOutputSampleFormat = PaUtil_SelectClosestAvailableFormat(WaveToPaFormat(&stream->out.wavex), outputSampleFormat);\n\n        // Set user-side custom host processor\n        if ((outputStreamInfo != NULL) &&\n            (outputStreamInfo->flags & paWinWasapiRedirectHostProcessor))\n        {\n            stream->hostProcessOverrideOutput.processor = outputStreamInfo->hostProcessorOutput;\n            stream->hostProcessOverrideOutput.userData = userData;\n        }\n\n        // Only get IAudioCaptureClient output once here instead of getting it at multiple places based on the use\n        if (FAILED(hr = IAudioClient_GetService(stream->out.clientParent, &pa_IID_IAudioRenderClient, (void **)&stream->renderClientParent)))\n        {\n            LogHostError(hr);\n            LogPaError(result = paUnanticipatedHostError);\n            goto error;\n        }\n    }\n    else\n    {\n        outputChannelCount = 0;\n        outputSampleFormat = hostOutputSampleFormat = paInt16; /* Suppress 'uninitialized var' warnings. */\n    }\n\n    // log full-duplex\n    if (fullDuplex)\n        PRINT((\"WASAPI::OpenStream: full-duplex mode\\n\"));\n\n    // paWinWasapiPolling must be on/or not on both streams\n    if ((inputParameters != NULL) && (outputParameters != NULL))\n    {\n        if ((inputStreamInfo != NULL) && (outputStreamInfo != NULL))\n        {\n            if (((inputStreamInfo->flags & paWinWasapiPolling) &&\n                !(outputStreamInfo->flags & paWinWasapiPolling))\n                ||\n                (!(inputStreamInfo->flags & paWinWasapiPolling) &&\n                 (outputStreamInfo->flags & paWinWasapiPolling)))\n            {\n                LogPaError(result = paInvalidFlag);\n                goto error;\n            }\n        }\n    }\n\n    // Initialize stream representation\n    if (streamCallback)\n    {\n        stream->bBlocking = FALSE;\n        PaUtil_InitializeStreamRepresentation(&stream->streamRepresentation,\n                                              &paWasapi->callbackStreamInterface,\n                                              streamCallback, userData);\n    }\n    else\n    {\n        stream->bBlocking = TRUE;\n        PaUtil_InitializeStreamRepresentation(&stream->streamRepresentation,\n                                              &paWasapi->blockingStreamInterface,\n                                              streamCallback, userData);\n    }\n\n    // Initialize CPU measurer\n    PaUtil_InitializeCpuLoadMeasurer(&stream->cpuLoadMeasurer, sampleRate);\n\n    if (outputParameters && inputParameters)\n    {\n        // serious problem #1 - No, Not a problem, especially concerning Exclusive mode.\n        // Input device in exclusive mode somehow is getting large buffer always, thus we\n        // adjust Output latency to reflect it, thus period will differ but playback will be\n        // normal.\n        /*if (stream->in.period != stream->out.period)\n        {\n            PRINT((\"WASAPI: OpenStream: period discrepancy\\n\"));\n            LogPaError(result = paBadIODeviceCombination);\n            goto error;\n        }*/\n\n        // serious problem #2 - No, Not a problem, as framesPerHostCallback take into account\n        // sample size while it is not a problem for PA full-duplex, we must care of\n        // period only!\n        /*if (stream->out.framesPerHostCallback != stream->in.framesPerHostCallback)\n        {\n            PRINT((\"WASAPI: OpenStream: framesPerHostCallback discrepancy\\n\"));\n            goto error;\n        }*/\n    }\n\n    // Calculate frames per host for processor\n    framesPerHostCallback = (outputParameters ? stream->out.framesPerBuffer : stream->in.framesPerBuffer);\n\n    // Choose correct mode of buffer processing:\n    // Exclusive/Shared non paWinWasapiPolling mode: paUtilFixedHostBufferSize - always fixed\n    // Exclusive/Shared paWinWasapiPolling mode: paUtilBoundedHostBufferSize - may vary for Exclusive or Full-duplex\n    bufferMode = paUtilFixedHostBufferSize;\n    if (inputParameters) // !!! WASAPI IAudioCaptureClient::GetBuffer extracts not number of frames but 1 packet, thus we always must adapt\n        bufferMode = paUtilBoundedHostBufferSize;\n    else\n    if (outputParameters)\n    {\n        if ((stream->out.buffers == 1) &&\n            (!stream->out.streamFlags || ((stream->out.streamFlags & AUDCLNT_STREAMFLAGS_EVENTCALLBACK) == 0)))\n            bufferMode = paUtilBoundedHostBufferSize;\n    }\n    stream->bufferMode = bufferMode;\n\n    // Initialize buffer processor\n    if (useInputBufferProcessor || useOutputBufferProcessor)\n    {\n        result =  PaUtil_InitializeBufferProcessor(\n            &stream->bufferProcessor,\n            inputChannelCount,\n            inputSampleFormat,\n            hostInputSampleFormat,\n            outputChannelCount,\n            outputSampleFormat,\n            hostOutputSampleFormat,\n            sampleRate,\n            streamFlags,\n            framesPerBuffer,\n            framesPerHostCallback,\n            bufferMode,\n            streamCallback,\n            userData);\n        if (result != paNoError)\n        {\n            LogPaError(result);\n            goto error;\n        }\n    }\n\n    // Set Input latency\n    stream->streamRepresentation.streamInfo.inputLatency =\n            (useInputBufferProcessor ? PaUtil_GetBufferProcessorInputLatencyFrames(&stream->bufferProcessor) / sampleRate : 0)\n            + (inputParameters != NULL ? stream->in.latencySeconds : 0);\n\n    // Set Output latency\n    stream->streamRepresentation.streamInfo.outputLatency =\n            (useOutputBufferProcessor ? PaUtil_GetBufferProcessorOutputLatencyFrames(&stream->bufferProcessor) / sampleRate : 0)\n            + (outputParameters != NULL ? stream->out.latencySeconds : 0);\n\n    // Set SR\n    stream->streamRepresentation.streamInfo.sampleRate = sampleRate;\n\n    (*s) = (PaStream *)stream;\n    return result;\n\nerror:\n\n    if (stream != NULL)\n        CloseStream(stream);\n\n    return result;\n}\n\n// ------------------------------------------------------------------------------------------\nstatic PaError CloseStream( PaStream* s )\n{\n    PaError result = paNoError;\n    PaWasapiStream *stream = (PaWasapiStream*)s;\n\n    // abort active stream\n    if (IsStreamActive(s))\n    {\n        result = AbortStream(s);\n    }\n\n    SAFE_RELEASE(stream->captureClientParent);\n    SAFE_RELEASE(stream->renderClientParent);\n    SAFE_RELEASE(stream->out.clientParent);\n    SAFE_RELEASE(stream->in.clientParent);\n    SAFE_RELEASE(stream->inVol);\n    SAFE_RELEASE(stream->outVol);\n\n    CloseHandle(stream->event[S_INPUT]);\n    CloseHandle(stream->event[S_OUTPUT]);\n\n    _StreamCleanup(stream);\n\n    PaWasapi_FreeMemory(stream->in.monoBuffer);\n    PaWasapi_FreeMemory(stream->out.monoBuffer);\n\n    PaUtil_FreeMemory(stream->in.tailBuffer);\n    PaUtil_FreeMemory(stream->in.tailBufferMemory);\n\n    PaUtil_FreeMemory(stream->out.tailBuffer);\n    PaUtil_FreeMemory(stream->out.tailBufferMemory);\n\n    PaUtil_TerminateBufferProcessor(&stream->bufferProcessor);\n    PaUtil_TerminateStreamRepresentation(&stream->streamRepresentation);\n    PaUtil_FreeMemory(stream);\n\n    return result;\n}\n\n// ------------------------------------------------------------------------------------------\nHRESULT UnmarshalSubStreamComPointers(PaWasapiSubStream *substream)\n{\n#ifndef PA_WINRT\n    HRESULT hResult = S_OK;\n    HRESULT hFirstBadResult = S_OK;\n    substream->clientProc = NULL;\n\n    // IAudioClient\n    hResult = CoGetInterfaceAndReleaseStream(substream->clientStream, GetAudioClientIID(), (LPVOID*)&substream->clientProc);\n    substream->clientStream = NULL;\n    if (hResult != S_OK)\n    {\n        hFirstBadResult = (hFirstBadResult == S_OK) ? hResult : hFirstBadResult;\n    }\n\n    return hFirstBadResult;\n\n#else\n    (void)substream;\n    return S_OK;\n#endif\n}\n\n// ------------------------------------------------------------------------------------------\nHRESULT UnmarshalStreamComPointers(PaWasapiStream *stream)\n{\n#ifndef PA_WINRT\n    HRESULT hResult = S_OK;\n    HRESULT hFirstBadResult = S_OK;\n    stream->captureClient = NULL;\n    stream->renderClient = NULL;\n    stream->in.clientProc = NULL;\n    stream->out.clientProc = NULL;\n\n    if (NULL != stream->in.clientParent)\n    {\n        // SubStream pointers\n        hResult = UnmarshalSubStreamComPointers(&stream->in);\n        if (hResult != S_OK)\n        {\n            hFirstBadResult = (hFirstBadResult == S_OK) ? hResult : hFirstBadResult;\n        }\n\n        // IAudioCaptureClient\n        hResult = CoGetInterfaceAndReleaseStream(stream->captureClientStream, &pa_IID_IAudioCaptureClient, (LPVOID*)&stream->captureClient);\n        stream->captureClientStream = NULL;\n        if (hResult != S_OK)\n        {\n            hFirstBadResult = (hFirstBadResult == S_OK) ? hResult : hFirstBadResult;\n        }\n    }\n\n    if (NULL != stream->out.clientParent)\n    {\n        // SubStream pointers\n        hResult = UnmarshalSubStreamComPointers(&stream->out);\n        if (hResult != S_OK)\n        {\n            hFirstBadResult = (hFirstBadResult == S_OK) ? hResult : hFirstBadResult;\n        }\n\n        // IAudioRenderClient\n        hResult = CoGetInterfaceAndReleaseStream(stream->renderClientStream, &pa_IID_IAudioRenderClient, (LPVOID*)&stream->renderClient);\n        stream->renderClientStream = NULL;\n        if (hResult != S_OK)\n        {\n            hFirstBadResult = (hFirstBadResult == S_OK) ? hResult : hFirstBadResult;\n        }\n    }\n\n    return hFirstBadResult;\n#else\n    if (stream->in.clientParent != NULL)\n    {\n        stream->in.clientProc = stream->in.clientParent;\n        IAudioClient_AddRef(stream->in.clientParent);\n    }\n\n    if (stream->out.clientParent != NULL)\n    {\n        stream->out.clientProc = stream->out.clientParent;\n        IAudioClient_AddRef(stream->out.clientParent);\n    }\n\n    if (stream->renderClientParent != NULL)\n    {\n        stream->renderClient = stream->renderClientParent;\n        IAudioRenderClient_AddRef(stream->renderClientParent);\n    }\n\n    if (stream->captureClientParent != NULL)\n    {\n        stream->captureClient = stream->captureClientParent;\n        IAudioCaptureClient_AddRef(stream->captureClientParent);\n    }\n\n    return S_OK;\n#endif\n}\n\n// -----------------------------------------------------------------------------------------\nvoid ReleaseUnmarshaledSubComPointers(PaWasapiSubStream *substream)\n{\n    SAFE_RELEASE(substream->clientProc);\n}\n\n// -----------------------------------------------------------------------------------------\nvoid ReleaseUnmarshaledComPointers(PaWasapiStream *stream)\n{\n    // Release AudioClient services first\n    SAFE_RELEASE(stream->captureClient);\n    SAFE_RELEASE(stream->renderClient);\n\n    // Release AudioClients\n    ReleaseUnmarshaledSubComPointers(&stream->in);\n    ReleaseUnmarshaledSubComPointers(&stream->out);\n}\n\n// ------------------------------------------------------------------------------------------\nHRESULT MarshalSubStreamComPointers(PaWasapiSubStream *substream)\n{\n#ifndef PA_WINRT\n    HRESULT hResult;\n    substream->clientStream = NULL;\n\n    // IAudioClient\n    hResult = CoMarshalInterThreadInterfaceInStream(GetAudioClientIID(), (LPUNKNOWN)substream->clientParent, &substream->clientStream);\n    if (hResult != S_OK)\n        goto marshal_sub_error;\n\n    return hResult;\n\n    // If marshaling error occurred, make sure to release everything.\nmarshal_sub_error:\n\n    UnmarshalSubStreamComPointers(substream);\n    ReleaseUnmarshaledSubComPointers(substream);\n    return hResult;\n#else\n    (void)substream;\n    return S_OK;\n#endif\n}\n\n// ------------------------------------------------------------------------------------------\nHRESULT MarshalStreamComPointers(PaWasapiStream *stream)\n{\n#ifndef PA_WINRT\n    HRESULT hResult = S_OK;\n    stream->captureClientStream = NULL;\n    stream->in.clientStream = NULL;\n    stream->renderClientStream = NULL;\n    stream->out.clientStream = NULL;\n\n    if (NULL != stream->in.clientParent)\n    {\n        // SubStream pointers\n        hResult = MarshalSubStreamComPointers(&stream->in);\n        if (hResult != S_OK)\n            goto marshal_error;\n\n        // IAudioCaptureClient\n        hResult = CoMarshalInterThreadInterfaceInStream(&pa_IID_IAudioCaptureClient, (LPUNKNOWN)stream->captureClientParent, &stream->captureClientStream);\n        if (hResult != S_OK)\n            goto marshal_error;\n    }\n\n    if (NULL != stream->out.clientParent)\n    {\n        // SubStream pointers\n        hResult = MarshalSubStreamComPointers(&stream->out);\n        if (hResult != S_OK)\n            goto marshal_error;\n\n        // IAudioRenderClient\n        hResult = CoMarshalInterThreadInterfaceInStream(&pa_IID_IAudioRenderClient, (LPUNKNOWN)stream->renderClientParent, &stream->renderClientStream);\n        if (hResult != S_OK)\n            goto marshal_error;\n    }\n\n    return hResult;\n\n    // If marshaling error occurred, make sure to release everything.\nmarshal_error:\n\n    UnmarshalStreamComPointers(stream);\n    ReleaseUnmarshaledComPointers(stream);\n    return hResult;\n#else\n    (void)stream;\n    return S_OK;\n#endif\n}\n\n// ------------------------------------------------------------------------------------------\nstatic PaError StartStream( PaStream *s )\n{\n    HRESULT hr;\n    PaWasapiStream *stream = (PaWasapiStream*)s;\n    PaError result = paNoError;\n\n    // check if stream is active already\n    if (IsStreamActive(s))\n        return paStreamIsNotStopped;\n\n    PaUtil_ResetBufferProcessor(&stream->bufferProcessor);\n\n    // Cleanup handles (may be necessary if stream was stopped by itself due to error)\n    _StreamCleanup(stream);\n\n    // Create close event\n    if ((stream->hCloseRequest = CreateEvent(NULL, TRUE, FALSE, NULL)) == NULL)\n    {\n        result = paInsufficientMemory;\n        goto start_error;\n    }\n\n    // Create thread\n    if (!stream->bBlocking)\n    {\n        // Create thread events\n        stream->hThreadStart = CreateEvent(NULL, TRUE, FALSE, NULL);\n        stream->hThreadExit  = CreateEvent(NULL, TRUE, FALSE, NULL);\n        if ((stream->hThreadStart == NULL) || (stream->hThreadExit == NULL))\n        {\n            result = paInsufficientMemory;\n            goto start_error;\n        }\n\n        // Marshal WASAPI interface pointers for safe use in thread created below.\n        if ((hr = MarshalStreamComPointers(stream)) != S_OK)\n        {\n            PRINT((\"Failed marshaling stream COM pointers.\"));\n            result = paUnanticipatedHostError;\n            goto nonblocking_start_error;\n        }\n\n        if ((stream->in.clientParent  && (stream->in.streamFlags  & AUDCLNT_STREAMFLAGS_EVENTCALLBACK)) ||\n            (stream->out.clientParent && (stream->out.streamFlags & AUDCLNT_STREAMFLAGS_EVENTCALLBACK)))\n        {\n            if ((stream->hThread = CREATE_THREAD(ProcThreadEvent)) == NULL)\n            {\n                PRINT((\"Failed creating thread: ProcThreadEvent.\"));\n                result = paUnanticipatedHostError;\n                goto nonblocking_start_error;\n            }\n        }\n        else\n        {\n            if ((stream->hThread = CREATE_THREAD(ProcThreadPoll)) == NULL)\n            {\n                PRINT((\"Failed creating thread: ProcThreadPoll.\"));\n                result = paUnanticipatedHostError;\n                goto nonblocking_start_error;\n            }\n        }\n\n        // Wait for thread to start\n        if (WaitForSingleObject(stream->hThreadStart, 60*1000) == WAIT_TIMEOUT)\n        {\n            PRINT((\"Failed starting thread: timeout.\"));\n            result = paUnanticipatedHostError;\n            goto nonblocking_start_error;\n        }\n    }\n    else\n    {\n        // Create blocking operation events (non-signaled event means - blocking operation is pending)\n        if (stream->out.clientParent != NULL)\n        {\n            if ((stream->hBlockingOpStreamWR = CreateEvent(NULL, TRUE, TRUE, NULL)) == NULL)\n            {\n                result = paInsufficientMemory;\n                goto start_error;\n            }\n        }\n        if (stream->in.clientParent != NULL)\n        {\n            if ((stream->hBlockingOpStreamRD = CreateEvent(NULL, TRUE, TRUE, NULL)) == NULL)\n            {\n                result = paInsufficientMemory;\n                goto start_error;\n            }\n        }\n\n        // Initialize event & start INPUT stream\n        if (stream->in.clientParent != NULL)\n        {\n            if ((hr = IAudioClient_Start(stream->in.clientParent)) != S_OK)\n            {\n                LogHostError(hr);\n                result = paUnanticipatedHostError;\n                goto start_error;\n            }\n        }\n\n        // Initialize event & start OUTPUT stream\n        if (stream->out.clientParent != NULL)\n        {\n            // Start\n            if ((hr = IAudioClient_Start(stream->out.clientParent)) != S_OK)\n            {\n                LogHostError(hr);\n                result = paUnanticipatedHostError;\n                goto start_error;\n            }\n        }\n\n        // Set parent to working pointers to use shared functions.\n        stream->captureClient  = stream->captureClientParent;\n        stream->renderClient   = stream->renderClientParent;\n        stream->in.clientProc  = stream->in.clientParent;\n        stream->out.clientProc = stream->out.clientParent;\n\n        // Signal: stream running.\n        stream->running = TRUE;\n    }\n\n    return result;\n\nnonblocking_start_error:\n\n    // Set hThreadExit event to prevent blocking during cleanup\n    SetEvent(stream->hThreadExit);\n    UnmarshalStreamComPointers(stream);\n    ReleaseUnmarshaledComPointers(stream);\n\nstart_error:\n\n    StopStream(s);\n    return result;\n}\n\n// ------------------------------------------------------------------------------------------\nvoid _StreamFinish(PaWasapiStream *stream)\n{\n    // Issue command to thread to stop processing and wait for thread exit\n    if (!stream->bBlocking)\n    {\n        SignalObjectAndWait(stream->hCloseRequest, stream->hThreadExit, INFINITE, FALSE);\n    }\n    else\n    // Blocking mode does not own thread\n    {\n        // Signal close event and wait for each of 2 blocking operations to complete\n        if (stream->out.clientParent)\n            SignalObjectAndWait(stream->hCloseRequest, stream->hBlockingOpStreamWR, INFINITE, TRUE);\n        if (stream->out.clientParent)\n            SignalObjectAndWait(stream->hCloseRequest, stream->hBlockingOpStreamRD, INFINITE, TRUE);\n\n        // Process stop\n        _StreamOnStop(stream);\n    }\n\n    // Cleanup handles\n    _StreamCleanup(stream);\n\n    stream->running = FALSE;\n}\n\n// ------------------------------------------------------------------------------------------\nvoid _StreamCleanup(PaWasapiStream *stream)\n{\n    // Close thread handles to allow restart\n    SAFE_CLOSE(stream->hThread);\n    SAFE_CLOSE(stream->hThreadStart);\n    SAFE_CLOSE(stream->hThreadExit);\n    SAFE_CLOSE(stream->hCloseRequest);\n    SAFE_CLOSE(stream->hBlockingOpStreamRD);\n    SAFE_CLOSE(stream->hBlockingOpStreamWR);\n}\n\n// ------------------------------------------------------------------------------------------\nstatic PaError StopStream( PaStream *s )\n{\n    // Finish stream\n    _StreamFinish((PaWasapiStream *)s);\n    return paNoError;\n}\n\n// ------------------------------------------------------------------------------------------\nstatic PaError AbortStream( PaStream *s )\n{\n    // Finish stream\n    _StreamFinish((PaWasapiStream *)s);\n    return paNoError;\n}\n\n// ------------------------------------------------------------------------------------------\nstatic PaError IsStreamStopped( PaStream *s )\n{\n    return !((PaWasapiStream *)s)->running;\n}\n\n// ------------------------------------------------------------------------------------------\nstatic PaError IsStreamActive( PaStream *s )\n{\n    return ((PaWasapiStream *)s)->running;\n}\n\n// ------------------------------------------------------------------------------------------\nstatic PaTime GetStreamTime( PaStream *s )\n{\n    PaWasapiStream *stream = (PaWasapiStream*)s;\n\n    /* suppress unused variable warnings */\n    (void) stream;\n\n    return PaUtil_GetTime();\n}\n\n// ------------------------------------------------------------------------------------------\nstatic double GetStreamCpuLoad( PaStream* s )\n{\n    return PaUtil_GetCpuLoad(&((PaWasapiStream *)s)->cpuLoadMeasurer);\n}\n\n// ------------------------------------------------------------------------------------------\nstatic PaError ReadStream( PaStream* s, void *_buffer, unsigned long frames )\n{\n    PaWasapiStream *stream = (PaWasapiStream*)s;\n\n    HRESULT hr = S_OK;\n    BYTE *user_buffer = (BYTE *)_buffer;\n    BYTE *wasapi_buffer = NULL;\n    DWORD flags = 0;\n    UINT32 i, available, sleep = 0;\n    unsigned long processed;\n    ThreadIdleScheduler sched;\n\n    // validate\n    if (!stream->running)\n        return paStreamIsStopped;\n    if (stream->captureClient == NULL)\n        return paBadStreamPtr;\n\n    // Notify blocking op has begun\n    ResetEvent(stream->hBlockingOpStreamRD);\n\n    // Use thread scheduling for 500 microseconds (emulated) when wait time for frames is less than\n    // 1 milliseconds, emulation helps to normalize CPU consumption and avoids too busy waiting\n    ThreadIdleScheduler_Setup(&sched, 1, 250/* microseconds */);\n\n    // Make a local copy of the user buffer pointer(s), this is necessary\n    // because PaUtil_CopyOutput() advances these pointers every time it is called\n    if (!stream->bufferProcessor.userInputIsInterleaved)\n    {\n        user_buffer = (BYTE *)alloca(sizeof(BYTE *) * stream->bufferProcessor.inputChannelCount);\n        if (user_buffer == NULL)\n            return paInsufficientMemory;\n\n        for (i = 0; i < stream->bufferProcessor.inputChannelCount; ++i)\n            ((BYTE **)user_buffer)[i] = ((BYTE **)_buffer)[i];\n    }\n\n    // Find out if there are tail frames, flush them all before reading hardware\n    if ((available = PaUtil_GetRingBufferReadAvailable(stream->in.tailBuffer)) != 0)\n    {\n        ring_buffer_size_t buf1_size = 0, buf2_size = 0, read, desired;\n        void *buf1 = NULL, *buf2 = NULL;\n\n        // Limit desired to amount of requested frames\n        desired = available;\n        if ((UINT32)desired > frames)\n            desired = frames;\n\n        // Get pointers to read regions\n        read = PaUtil_GetRingBufferReadRegions(stream->in.tailBuffer, desired, &buf1, &buf1_size, &buf2, &buf2_size);\n\n        if (buf1 != NULL)\n        {\n            // Register available frames to processor\n            PaUtil_SetInputFrameCount(&stream->bufferProcessor, buf1_size);\n\n            // Register host buffer pointer to processor\n            PaUtil_SetInterleavedInputChannels(&stream->bufferProcessor, 0, buf1, stream->bufferProcessor.inputChannelCount);\n\n            // Copy user data to host buffer (with conversion if applicable)\n            processed = PaUtil_CopyInput(&stream->bufferProcessor, (void **)&user_buffer, buf1_size);\n            frames -= processed;\n        }\n\n        if (buf2 != NULL)\n        {\n            // Register available frames to processor\n            PaUtil_SetInputFrameCount(&stream->bufferProcessor, buf2_size);\n\n            // Register host buffer pointer to processor\n            PaUtil_SetInterleavedInputChannels(&stream->bufferProcessor, 0, buf2, stream->bufferProcessor.inputChannelCount);\n\n            // Copy user data to host buffer (with conversion if applicable)\n            processed = PaUtil_CopyInput(&stream->bufferProcessor, (void **)&user_buffer, buf2_size);\n            frames -= processed;\n        }\n\n        // Advance\n        PaUtil_AdvanceRingBufferReadIndex(stream->in.tailBuffer, read);\n    }\n\n    // Read hardware\n    while (frames != 0)\n    {\n        // Check if blocking call must be interrupted\n        if (WaitForSingleObject(stream->hCloseRequest, sleep) != WAIT_TIMEOUT)\n            break;\n\n        // Get available frames (must be finding out available frames before call to IAudioCaptureClient_GetBuffer\n        // othervise audio glitches will occur inExclusive mode as it seems that WASAPI has some scheduling/\n        // processing problems when such busy polling with IAudioCaptureClient_GetBuffer occurs)\n        if ((hr = _PollGetInputFramesAvailable(stream, &available)) != S_OK)\n        {\n            LogHostError(hr);\n            return paUnanticipatedHostError;\n        }\n\n        // Wait for more frames to become available\n        if (available == 0)\n        {\n            // Exclusive mode may require latency of 1 millisecond, thus we shall sleep\n            // around 500 microseconds (emulated) to collect packets in time\n            if (stream->in.shareMode != AUDCLNT_SHAREMODE_EXCLUSIVE)\n            {\n                UINT32 sleep_frames = (frames < stream->in.framesPerHostCallback ? frames : stream->in.framesPerHostCallback);\n\n                sleep  = GetFramesSleepTime(sleep_frames, stream->in.wavex.Format.nSamplesPerSec);\n                sleep /= 4; // wait only for 1/4 of the buffer\n\n                // WASAPI input provides packets, thus expiring packet will result in bad audio\n                // limit waiting time to 2 seconds (will always work for smallest buffer in Shared)\n                if (sleep > 2)\n                    sleep = 2;\n\n                // Avoid busy waiting, schedule next 1 millesecond wait\n                if (sleep == 0)\n                    sleep = ThreadIdleScheduler_NextSleep(&sched);\n            }\n            else\n            {\n                if ((sleep = ThreadIdleScheduler_NextSleep(&sched)) != 0)\n                {\n                    Sleep(sleep);\n                    sleep = 0;\n                }\n            }\n\n            continue;\n        }\n\n        // Get the available data in the shared buffer.\n        if ((hr = IAudioCaptureClient_GetBuffer(stream->captureClient, &wasapi_buffer, &available, &flags, NULL, NULL)) != S_OK)\n        {\n            // Buffer size is too small, waiting\n            if (hr != AUDCLNT_S_BUFFER_EMPTY)\n            {\n                LogHostError(hr);\n                goto end;\n            }\n\n            continue;\n        }\n\n        // Register available frames to processor\n        PaUtil_SetInputFrameCount(&stream->bufferProcessor, available);\n\n        // Register host buffer pointer to processor\n        PaUtil_SetInterleavedInputChannels(&stream->bufferProcessor, 0, wasapi_buffer, stream->bufferProcessor.inputChannelCount);\n\n        // Copy user data to host buffer (with conversion if applicable)\n        processed = PaUtil_CopyInput(&stream->bufferProcessor, (void **)&user_buffer, frames);\n        frames -= processed;\n\n        // Save tail into buffer\n        if ((frames == 0) && (available > processed))\n        {\n            UINT32 bytes_processed = processed * stream->in.wavex.Format.nBlockAlign;\n            UINT32 frames_to_save  = available - processed;\n\n            PaUtil_WriteRingBuffer(stream->in.tailBuffer, wasapi_buffer + bytes_processed, frames_to_save);\n        }\n\n        // Release host buffer\n        if ((hr = IAudioCaptureClient_ReleaseBuffer(stream->captureClient, available)) != S_OK)\n        {\n            LogHostError(hr);\n            goto end;\n        }\n    }\n\nend:\n\n    // Notify blocking op has ended\n    SetEvent(stream->hBlockingOpStreamRD);\n\n    return (hr != S_OK ? paUnanticipatedHostError : paNoError);\n}\n\n// ------------------------------------------------------------------------------------------\nstatic PaError WriteStream( PaStream* s, const void *_buffer, unsigned long frames )\n{\n    PaWasapiStream *stream = (PaWasapiStream*)s;\n\n    //UINT32 frames;\n    const BYTE *user_buffer = (const BYTE *)_buffer;\n    BYTE *wasapi_buffer;\n    HRESULT hr = S_OK;\n    UINT32 i, available, sleep = 0;\n    unsigned long processed;\n    ThreadIdleScheduler sched;\n\n    // validate\n    if (!stream->running)\n        return paStreamIsStopped;\n    if (stream->renderClient == NULL)\n        return paBadStreamPtr;\n\n    // Notify blocking op has begun\n    ResetEvent(stream->hBlockingOpStreamWR);\n\n    // Use thread scheduling for 500 microseconds (emulated) when wait time for frames is less than\n    // 1 milliseconds, emulation helps to normalize CPU consumption and avoids too busy waiting\n    ThreadIdleScheduler_Setup(&sched, 1, 500/* microseconds */);\n\n    // Make a local copy of the user buffer pointer(s), this is necessary\n    // because PaUtil_CopyOutput() advances these pointers every time it is called\n    if (!stream->bufferProcessor.userOutputIsInterleaved)\n    {\n        user_buffer = (const BYTE *)alloca(sizeof(const BYTE *) * stream->bufferProcessor.outputChannelCount);\n        if (user_buffer == NULL)\n            return paInsufficientMemory;\n\n        for (i = 0; i < stream->bufferProcessor.outputChannelCount; ++i)\n            ((const BYTE **)user_buffer)[i] = ((const BYTE **)_buffer)[i];\n    }\n\n    // Blocking (potentially, until 'frames' are consumed) loop\n    while (frames != 0)\n    {\n        // Check if blocking call must be interrupted\n        if (WaitForSingleObject(stream->hCloseRequest, sleep) != WAIT_TIMEOUT)\n            break;\n\n        // Get frames available\n        if ((hr = _PollGetOutputFramesAvailable(stream, &available)) != S_OK)\n        {\n            LogHostError(hr);\n            goto end;\n        }\n\n        // Wait for more frames to become available\n        if (available == 0)\n        {\n            UINT32 sleep_frames = (frames < stream->out.framesPerHostCallback ? frames : stream->out.framesPerHostCallback);\n\n            sleep  = GetFramesSleepTime(sleep_frames, stream->out.wavex.Format.nSamplesPerSec);\n            sleep /= 2; // wait only for half of the buffer\n\n            // Avoid busy waiting, schedule next 1 millesecond wait\n            if (sleep == 0)\n                sleep = ThreadIdleScheduler_NextSleep(&sched);\n\n            continue;\n        }\n\n        // Keep in 'frames' range\n        if (available > frames)\n            available = frames;\n\n        // Get pointer to host buffer\n        if ((hr = IAudioRenderClient_GetBuffer(stream->renderClient, available, &wasapi_buffer)) != S_OK)\n        {\n            // Buffer size is too big, waiting\n            if (hr == AUDCLNT_E_BUFFER_TOO_LARGE)\n                continue;\n\n            LogHostError(hr);\n            goto end;\n        }\n\n        // Keep waiting again (on Vista it was noticed that WASAPI could SOMETIMES return NULL pointer\n        // to buffer without returning AUDCLNT_E_BUFFER_TOO_LARGE instead)\n        if (wasapi_buffer == NULL)\n            continue;\n\n        // Register available frames to processor\n        PaUtil_SetOutputFrameCount(&stream->bufferProcessor, available);\n\n        // Register host buffer pointer to processor\n        PaUtil_SetInterleavedOutputChannels(&stream->bufferProcessor, 0, wasapi_buffer,    stream->bufferProcessor.outputChannelCount);\n\n        // Copy user data to host buffer (with conversion if applicable), this call will advance\n        // pointer 'user_buffer' to consumed portion of data\n        processed = PaUtil_CopyOutput(&stream->bufferProcessor, (const void **)&user_buffer, frames);\n        frames -= processed;\n\n        // Release host buffer\n        if ((hr = IAudioRenderClient_ReleaseBuffer(stream->renderClient, available, 0)) != S_OK)\n        {\n            LogHostError(hr);\n            goto end;\n        }\n    }\n\nend:\n\n    // Notify blocking op has ended\n    SetEvent(stream->hBlockingOpStreamWR);\n\n    return (hr != S_OK ? paUnanticipatedHostError : paNoError);\n}\n\nunsigned long PaUtil_GetOutputFrameCount( PaUtilBufferProcessor* bp )\n{\n    return bp->hostOutputFrameCount[0];\n}\n\n// ------------------------------------------------------------------------------------------\nstatic signed long GetStreamReadAvailable( PaStream* s )\n{\n    PaWasapiStream *stream = (PaWasapiStream*)s;\n\n    HRESULT hr;\n    UINT32  available = 0;\n\n    // validate\n    if (!stream->running)\n        return paStreamIsStopped;\n    if (stream->captureClient == NULL)\n        return paBadStreamPtr;\n\n    // available in hardware buffer\n    if ((hr = _PollGetInputFramesAvailable(stream, &available)) != S_OK)\n    {\n        LogHostError(hr);\n        return paUnanticipatedHostError;\n    }\n\n    // available in software tail buffer\n    available += PaUtil_GetRingBufferReadAvailable(stream->in.tailBuffer);\n\n    return available;\n}\n\n// ------------------------------------------------------------------------------------------\nstatic signed long GetStreamWriteAvailable( PaStream* s )\n{\n    PaWasapiStream *stream = (PaWasapiStream*)s;\n    HRESULT hr;\n    UINT32  available = 0;\n\n    // validate\n    if (!stream->running)\n        return paStreamIsStopped;\n    if (stream->renderClient == NULL)\n        return paBadStreamPtr;\n\n    if ((hr = _PollGetOutputFramesAvailable(stream, &available)) != S_OK)\n    {\n        LogHostError(hr);\n        return paUnanticipatedHostError;\n    }\n\n    return (signed long)available;\n}\n\n\n// ------------------------------------------------------------------------------------------\nstatic void WaspiHostProcessingLoop( void *inputBuffer,  long inputFrames,\n                                     void *outputBuffer, long outputFrames,\n                                     void *userData )\n{\n    PaWasapiStream *stream = (PaWasapiStream*)userData;\n    PaStreamCallbackTimeInfo timeInfo = {0,0,0};\n    PaStreamCallbackFlags flags = 0;\n    int callbackResult;\n    unsigned long framesProcessed;\n    HRESULT hr;\n    UINT32 pending;\n\n    PaUtil_BeginCpuLoadMeasurement( &stream->cpuLoadMeasurer );\n\n    /*\n        Pa_GetStreamTime:\n            - generate timing information\n            - handle buffer slips\n    */\n    timeInfo.currentTime = PaUtil_GetTime();\n    // Query input latency\n    if (stream->in.clientProc != NULL)\n    {\n        PaTime pending_time;\n        if ((hr = IAudioClient_GetCurrentPadding(stream->in.clientProc, &pending)) == S_OK)\n            pending_time = (PaTime)pending / (PaTime)stream->in.wavex.Format.nSamplesPerSec;\n        else\n            pending_time = (PaTime)stream->in.latencySeconds;\n\n        timeInfo.inputBufferAdcTime = timeInfo.currentTime + pending_time;\n    }\n    // Query output current latency\n    if (stream->out.clientProc != NULL)\n    {\n        PaTime pending_time;\n        if ((hr = IAudioClient_GetCurrentPadding(stream->out.clientProc, &pending)) == S_OK)\n            pending_time = (PaTime)pending / (PaTime)stream->out.wavex.Format.nSamplesPerSec;\n        else\n            pending_time = (PaTime)stream->out.latencySeconds;\n\n        timeInfo.outputBufferDacTime = timeInfo.currentTime + pending_time;\n    }\n\n    /*\n        If you need to byte swap or shift inputBuffer to convert it into a\n        portaudio format, do it here.\n    */\n\n    PaUtil_BeginBufferProcessing( &stream->bufferProcessor, &timeInfo, flags );\n\n    /*\n        depending on whether the host buffers are interleaved, non-interleaved\n        or a mixture, you will want to call PaUtil_SetInterleaved*Channels(),\n        PaUtil_SetNonInterleaved*Channel() or PaUtil_Set*Channel() here.\n    */\n\n    if (stream->bufferProcessor.inputChannelCount > 0)\n    {\n        PaUtil_SetInputFrameCount( &stream->bufferProcessor, inputFrames );\n        PaUtil_SetInterleavedInputChannels( &stream->bufferProcessor,\n            0, /* first channel of inputBuffer is channel 0 */\n            inputBuffer,\n            0 ); /* 0 - use inputChannelCount passed to init buffer processor */\n    }\n\n    if (stream->bufferProcessor.outputChannelCount > 0)\n    {\n        PaUtil_SetOutputFrameCount( &stream->bufferProcessor, outputFrames);\n        PaUtil_SetInterleavedOutputChannels( &stream->bufferProcessor,\n            0, /* first channel of outputBuffer is channel 0 */\n            outputBuffer,\n            0 ); /* 0 - use outputChannelCount passed to init buffer processor */\n    }\n\n    /* you must pass a valid value of callback result to PaUtil_EndBufferProcessing()\n        in general you would pass paContinue for normal operation, and\n        paComplete to drain the buffer processor's internal output buffer.\n        You can check whether the buffer processor's output buffer is empty\n        using PaUtil_IsBufferProcessorOuputEmpty( bufferProcessor )\n    */\n    callbackResult = paContinue;\n    framesProcessed = PaUtil_EndBufferProcessing( &stream->bufferProcessor, &callbackResult );\n\n    /*\n        If you need to byte swap or shift outputBuffer to convert it to\n        host format, do it here.\n    */\n\n    PaUtil_EndCpuLoadMeasurement( &stream->cpuLoadMeasurer, framesProcessed );\n\n    if (callbackResult == paContinue)\n    {\n        /* nothing special to do */\n    }\n    else\n    if (callbackResult == paAbort)\n    {\n        // stop stream\n        SetEvent(stream->hCloseRequest);\n    }\n    else\n    {\n        // stop stream\n        SetEvent(stream->hCloseRequest);\n    }\n}\n\n// ------------------------------------------------------------------------------------------\n#ifndef PA_WINRT\nstatic PaError MMCSS_activate(PaWasapiThreadPriority nPriorityClass, HANDLE *ret)\n{\n    static const char *mmcs_name[] =\n    {\n        NULL,\n        \"Audio\",\n        \"Capture\",\n        \"Distribution\",\n        \"Games\",\n        \"Playback\",\n        \"Pro Audio\",\n        \"Window Manager\"\n    };\n\n    DWORD task_idx = 0;\n    HANDLE hTask;\n\n    if ((UINT32)nPriorityClass >= STATIC_ARRAY_SIZE(mmcs_name))\n        return paUnanticipatedHostError;\n\n    if ((hTask = pAvSetMmThreadCharacteristics(mmcs_name[nPriorityClass], &task_idx)) == NULL)\n    {\n        PRINT((\"WASAPI: AvSetMmThreadCharacteristics failed: error[%d]\\n\", GetLastError()));\n        return paUnanticipatedHostError;\n    }\n\n    /*BOOL priority_ok = pAvSetMmThreadPriority(hTask, AVRT_PRIORITY_NORMAL);\n    if (priority_ok == FALSE)\n    {\n        PRINT((\"WASAPI: AvSetMmThreadPriority failed!\\n\"));\n    }*/\n\n    // debug\n    {\n        int    cur_priority          = GetThreadPriority(GetCurrentThread());\n        DWORD  cur_priority_class = GetPriorityClass(GetCurrentProcess());\n        PRINT((\"WASAPI: thread[ priority-0x%X class-0x%X ]\\n\", cur_priority, cur_priority_class));\n    }\n\n    (*ret) = hTask;\n    return paNoError;\n}\n#endif\n\n// ------------------------------------------------------------------------------------------\n#ifndef PA_WINRT\nstatic void MMCSS_deactivate(HANDLE hTask)\n{\n    if (pAvRevertMmThreadCharacteristics(hTask) == FALSE)\n    {\n        PRINT((\"WASAPI: AvRevertMmThreadCharacteristics failed!\\n\"));\n    }\n}\n#endif\n\n// ------------------------------------------------------------------------------------------\nPaError PaWasapi_ThreadPriorityBoost(void **pTask, PaWasapiThreadPriority priorityClass)\n{\n    HANDLE task;\n    PaError ret;\n\n    if (pTask == NULL)\n        return paUnanticipatedHostError;\n\n#ifndef PA_WINRT\n    if ((ret = MMCSS_activate(priorityClass, &task)) != paNoError)\n        return ret;\n#else\n    switch (priorityClass)\n    {\n    case eThreadPriorityAudio:\n    case eThreadPriorityProAudio: {\n\n        // Save previous thread priority\n        intptr_t priority_prev = GetThreadPriority(GetCurrentThread());\n\n        // Try set new thread priority\n        if (SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_HIGHEST) == FALSE)\n            return paUnanticipatedHostError;\n\n        // Memorize prev priority (pretend to be non NULL pointer by adding 0x80000000 mask)\n        task = (HANDLE)(priority_prev | 0x80000000);\n\n        ret = paNoError;\n\n        break; }\n\n    default:\n        return paUnanticipatedHostError;\n    }\n#endif\n\n    (*pTask) = task;\n    return ret;\n}\n\n// ------------------------------------------------------------------------------------------\nPaError PaWasapi_ThreadPriorityRevert(void *pTask)\n{\n    if (pTask == NULL)\n        return paUnanticipatedHostError;\n\n#ifndef PA_WINRT\n    MMCSS_deactivate((HANDLE)pTask);\n#else\n    // Revert previous priority by removing 0x80000000 mask\n    if (SetThreadPriority(GetCurrentThread(), (int)((intptr_t)pTask & ~0x80000000)) == FALSE)\n        return paUnanticipatedHostError;\n#endif\n\n    return paNoError;\n}\n\n// ------------------------------------------------------------------------------------------\n// Described at:\n// http://msdn.microsoft.com/en-us/library/dd371387(v=VS.85).aspx\n\nPaError PaWasapi_GetJackCount(PaDeviceIndex device, int *pJackCount)\n{\n#ifndef PA_WINRT\n    PaError ret;\n    HRESULT hr = S_OK;\n    PaWasapiDeviceInfo *deviceInfo;\n    IDeviceTopology *pDeviceTopology = NULL;\n    IConnector *pConnFrom = NULL;\n    IConnector *pConnTo = NULL;\n    IPart *pPart = NULL;\n    IKsJackDescription *pJackDesc = NULL;\n    UINT jackCount = 0;\n\n    if (pJackCount == NULL)\n        return paUnanticipatedHostError;\n\n    if ((ret = _GetWasapiDeviceInfoByDeviceIndex(&deviceInfo, device)) != paNoError)\n        return ret;\n\n    // Get the endpoint device's IDeviceTopology interface\n    hr = IMMDevice_Activate(deviceInfo->device, &pa_IID_IDeviceTopology,\n        CLSCTX_INPROC_SERVER, NULL, (void**)&pDeviceTopology);\n    IF_FAILED_JUMP(hr, error);\n\n    // The device topology for an endpoint device always contains just one connector (connector number 0)\n    hr = IDeviceTopology_GetConnector(pDeviceTopology, 0, &pConnFrom);\n    IF_FAILED_JUMP(hr, error);\n\n    // Step across the connection to the jack on the adapter\n    hr = IConnector_GetConnectedTo(pConnFrom, &pConnTo);\n    if (HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND) == hr)\n    {\n        // The adapter device is not currently active\n        hr = E_NOINTERFACE;\n    }\n    IF_FAILED_JUMP(hr, error);\n\n    // Get the connector's IPart interface\n    hr = IConnector_QueryInterface(pConnTo, &pa_IID_IPart, (void**)&pPart);\n    IF_FAILED_JUMP(hr, error);\n\n    // Activate the connector's IKsJackDescription interface\n    hr = IPart_Activate(pPart, CLSCTX_INPROC_SERVER, &pa_IID_IKsJackDescription, (void**)&pJackDesc);\n    IF_FAILED_JUMP(hr, error);\n\n    // Return jack count for this device\n    hr = IKsJackDescription_GetJackCount(pJackDesc, &jackCount);\n    IF_FAILED_JUMP(hr, error);\n\n    // Set.\n    (*pJackCount) = jackCount;\n\n    // Ok.\n    ret = paNoError;\n\nerror:\n\n    SAFE_RELEASE(pDeviceTopology);\n    SAFE_RELEASE(pConnFrom);\n    SAFE_RELEASE(pConnTo);\n    SAFE_RELEASE(pPart);\n    SAFE_RELEASE(pJackDesc);\n\n    LogHostError(hr);\n    return paNoError;\n#else\n    (void)device;\n    (void)pJackCount;\n    return paUnanticipatedHostError;\n#endif\n}\n\n// ------------------------------------------------------------------------------------------\n#ifndef PA_WINRT\nstatic PaWasapiJackConnectionType _ConvertJackConnectionTypeWASAPIToPA(int connType)\n{\n    switch (connType)\n    {\n        case eConnTypeUnknown:               return eJackConnTypeUnknown;\n#ifdef _KS_\n        case eConnType3Point5mm:             return eJackConnType3Point5mm;\n#else\n        case eConnTypeEighth:                return eJackConnType3Point5mm;\n#endif\n        case eConnTypeQuarter:               return eJackConnTypeQuarter;\n        case eConnTypeAtapiInternal:         return eJackConnTypeAtapiInternal;\n        case eConnTypeRCA:                   return eJackConnTypeRCA;\n        case eConnTypeOptical:               return eJackConnTypeOptical;\n        case eConnTypeOtherDigital:          return eJackConnTypeOtherDigital;\n        case eConnTypeOtherAnalog:           return eJackConnTypeOtherAnalog;\n        case eConnTypeMultichannelAnalogDIN: return eJackConnTypeMultichannelAnalogDIN;\n        case eConnTypeXlrProfessional:       return eJackConnTypeXlrProfessional;\n        case eConnTypeRJ11Modem:             return eJackConnTypeRJ11Modem;\n        case eConnTypeCombination:           return eJackConnTypeCombination;\n    }\n    return eJackConnTypeUnknown;\n}\n#endif\n\n// ------------------------------------------------------------------------------------------\n#ifndef PA_WINRT\nstatic PaWasapiJackGeoLocation _ConvertJackGeoLocationWASAPIToPA(int geoLoc)\n{\n    switch (geoLoc)\n    {\n    case eGeoLocRear:             return eJackGeoLocRear;\n    case eGeoLocFront:            return eJackGeoLocFront;\n    case eGeoLocLeft:             return eJackGeoLocLeft;\n    case eGeoLocRight:            return eJackGeoLocRight;\n    case eGeoLocTop:              return eJackGeoLocTop;\n    case eGeoLocBottom:           return eJackGeoLocBottom;\n#ifdef _KS_\n    case eGeoLocRearPanel:        return eJackGeoLocRearPanel;\n#else\n    case eGeoLocRearOPanel:       return eJackGeoLocRearPanel;\n#endif\n    case eGeoLocRiser:            return eJackGeoLocRiser;\n    case eGeoLocInsideMobileLid:  return eJackGeoLocInsideMobileLid;\n    case eGeoLocDrivebay:         return eJackGeoLocDrivebay;\n    case eGeoLocHDMI:             return eJackGeoLocHDMI;\n    case eGeoLocOutsideMobileLid: return eJackGeoLocOutsideMobileLid;\n    case eGeoLocATAPI:            return eJackGeoLocATAPI;\n    }\n    return eJackGeoLocUnk;\n}\n#endif\n\n// ------------------------------------------------------------------------------------------\n#ifndef PA_WINRT\nstatic PaWasapiJackGenLocation _ConvertJackGenLocationWASAPIToPA(int genLoc)\n{\n    switch (genLoc)\n    {\n    case eGenLocPrimaryBox: return eJackGenLocPrimaryBox;\n    case eGenLocInternal:   return eJackGenLocInternal;\n#ifdef _KS_\n    case eGenLocSeparate:   return eJackGenLocSeparate;\n#else\n    case eGenLocSeperate:   return eJackGenLocSeparate;\n#endif\n    case eGenLocOther:      return eJackGenLocOther;\n    }\n    return eJackGenLocPrimaryBox;\n}\n#endif\n\n// ------------------------------------------------------------------------------------------\n#ifndef PA_WINRT\nstatic PaWasapiJackPortConnection _ConvertJackPortConnectionWASAPIToPA(int portConn)\n{\n    switch (portConn)\n    {\n    case ePortConnJack:                  return eJackPortConnJack;\n    case ePortConnIntegratedDevice:      return eJackPortConnIntegratedDevice;\n    case ePortConnBothIntegratedAndJack: return eJackPortConnBothIntegratedAndJack;\n    case ePortConnUnknown:               return eJackPortConnUnknown;\n    }\n    return eJackPortConnJack;\n}\n#endif\n\n// ------------------------------------------------------------------------------------------\n// Described at:\n// http://msdn.microsoft.com/en-us/library/dd371387(v=VS.85).aspx\n\nPaError PaWasapi_GetJackDescription(PaDeviceIndex device, int jackIndex, PaWasapiJackDescription *pJackDescription)\n{\n#ifndef PA_WINRT\n    PaError ret;\n    HRESULT hr = S_OK;\n    PaWasapiDeviceInfo *deviceInfo;\n    IDeviceTopology *pDeviceTopology = NULL;\n    IConnector *pConnFrom = NULL;\n    IConnector *pConnTo = NULL;\n    IPart *pPart = NULL;\n    IKsJackDescription *pJackDesc = NULL;\n    KSJACK_DESCRIPTION jack = { 0 };\n\n    if ((ret = _GetWasapiDeviceInfoByDeviceIndex(&deviceInfo, device)) != paNoError)\n        return ret;\n\n    // Get the endpoint device's IDeviceTopology interface\n    hr = IMMDevice_Activate(deviceInfo->device, &pa_IID_IDeviceTopology,\n        CLSCTX_INPROC_SERVER, NULL, (void**)&pDeviceTopology);\n    IF_FAILED_JUMP(hr, error);\n\n    // The device topology for an endpoint device always contains just one connector (connector number 0)\n    hr = IDeviceTopology_GetConnector(pDeviceTopology, 0, &pConnFrom);\n    IF_FAILED_JUMP(hr, error);\n\n    // Step across the connection to the jack on the adapter\n    hr = IConnector_GetConnectedTo(pConnFrom, &pConnTo);\n    if (HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND) == hr)\n    {\n        // The adapter device is not currently active\n        hr = E_NOINTERFACE;\n    }\n    IF_FAILED_JUMP(hr, error);\n\n    // Get the connector's IPart interface\n    hr = IConnector_QueryInterface(pConnTo, &pa_IID_IPart, (void**)&pPart);\n    IF_FAILED_JUMP(hr, error);\n\n    // Activate the connector's IKsJackDescription interface\n    hr = IPart_Activate(pPart, CLSCTX_INPROC_SERVER, &pa_IID_IKsJackDescription, (void**)&pJackDesc);\n    IF_FAILED_JUMP(hr, error);\n\n    // Test to return jack description struct for index 0\n    hr = IKsJackDescription_GetJackDescription(pJackDesc, jackIndex, &jack);\n    IF_FAILED_JUMP(hr, error);\n\n    // Convert WASAPI values to PA format\n    pJackDescription->channelMapping = jack.ChannelMapping;\n    pJackDescription->color          = jack.Color;\n    pJackDescription->connectionType = _ConvertJackConnectionTypeWASAPIToPA(jack.ConnectionType);\n    pJackDescription->genLocation    = _ConvertJackGenLocationWASAPIToPA(jack.GenLocation);\n    pJackDescription->geoLocation    = _ConvertJackGeoLocationWASAPIToPA(jack.GeoLocation);\n    pJackDescription->isConnected    = jack.IsConnected;\n    pJackDescription->portConnection = _ConvertJackPortConnectionWASAPIToPA(jack.PortConnection);\n\n    // Ok\n    ret = paNoError;\n\nerror:\n\n    SAFE_RELEASE(pDeviceTopology);\n    SAFE_RELEASE(pConnFrom);\n    SAFE_RELEASE(pConnTo);\n    SAFE_RELEASE(pPart);\n    SAFE_RELEASE(pJackDesc);\n\n    LogHostError(hr);\n    return ret;\n\n#else\n    (void)device;\n    (void)jackIndex;\n    (void)pJackDescription;\n    return paUnanticipatedHostError;\n#endif\n}\n\n// ------------------------------------------------------------------------------------------\nPaError PaWasapi_GetAudioClient(PaStream *pStream, void **pAudioClient, int bOutput)\n{\n    PaWasapiStream *stream = (PaWasapiStream *)pStream;\n    if (stream == NULL)\n        return paBadStreamPtr;\n\n    if (pAudioClient == NULL)\n        return paUnanticipatedHostError;\n\n    (*pAudioClient) = (bOutput == TRUE ? stream->out.clientParent : stream->in.clientParent);\n\n    return paNoError;\n}\n\n// ------------------------------------------------------------------------------------------\n#ifdef PA_WINRT\nstatic void CopyNameOrIdString(WCHAR *dst, const UINT32 dstMaxCount, const WCHAR *src)\n{\n    UINT32 i;\n\n    for (i = 0; i < dstMaxCount; ++i)\n        dst[i] = 0;\n\n    if (src != NULL)\n    {\n        for (i = 0; (src[i] != 0) && (i < dstMaxCount); ++i)\n            dst[i] = src[i];\n    }\n}\n#endif\n\n// ------------------------------------------------------------------------------------------\nPaError PaWasapiWinrt_SetDefaultDeviceId( const unsigned short *pId, int bOutput )\n{\n#ifdef PA_WINRT\n    INT32 i;\n    PaWasapiWinrtDeviceListRole *role = (bOutput ? &g_DeviceListInfo.render : &g_DeviceListInfo.capture);\n\n    assert(STATIC_ARRAY_SIZE(role->defaultId) == PA_WASAPI_DEVICE_ID_LEN);\n\n    // Validate Id length\n    if (pId != NULL)\n    {\n        for (i = 0; pId[i] != 0; ++i)\n        {\n            if (i >= PA_WASAPI_DEVICE_ID_LEN)\n                return paBufferTooBig;\n        }\n    }\n\n    // Set Id (or reset to all 0 if NULL is provided)\n    CopyNameOrIdString(role->defaultId, STATIC_ARRAY_SIZE(role->defaultId), pId);\n\n    return paNoError;\n#else\n    return paIncompatibleStreamHostApi;\n#endif\n}\n\n// ------------------------------------------------------------------------------------------\nPaError PaWasapiWinrt_PopulateDeviceList( const unsigned short **pId, const unsigned short **pName,\n    const PaWasapiDeviceRole *pRole, unsigned int count, int bOutput )\n{\n#ifdef PA_WINRT\n    UINT32 i, j;\n    PaWasapiWinrtDeviceListRole *role = (bOutput ? &g_DeviceListInfo.render : &g_DeviceListInfo.capture);\n\n    memset(&role->devices, 0, sizeof(role->devices));\n    role->deviceCount = 0;\n\n    if (count == 0)\n        return paNoError;\n    else\n    if (count > PA_WASAPI_DEVICE_MAX_COUNT)\n        return paBufferTooBig;\n\n    // pName or pRole are optional\n    if (pId == NULL)\n        return paInsufficientMemory;\n\n    // Validate Id and Name lengths\n    for (i = 0; i < count; ++i)\n    {\n        const unsigned short *id = pId[i];\n        const unsigned short *name = pName[i];\n\n        for (j = 0; id[j] != 0; ++j)\n        {\n            if (j >= PA_WASAPI_DEVICE_ID_LEN)\n                return paBufferTooBig;\n        }\n\n        for (j = 0; name[j] != 0; ++j)\n        {\n            if (j >= PA_WASAPI_DEVICE_NAME_LEN)\n                return paBufferTooBig;\n        }\n    }\n\n    // Set Id and Name (or reset to all 0 if NULL is provided)\n    for (i = 0; i < count; ++i)\n    {\n        CopyNameOrIdString(role->devices[i].id, STATIC_ARRAY_SIZE(role->devices[i].id), pId[i]);\n        CopyNameOrIdString(role->devices[i].name, STATIC_ARRAY_SIZE(role->devices[i].name), pName[i]);\n        role->devices[i].formFactor = (pRole != NULL ? (EndpointFormFactor)pRole[i] : UnknownFormFactor);\n\n        // Count device if it has at least the Id\n        role->deviceCount += (role->devices[i].id[0] != 0);\n    }\n\n    return paNoError;\n#else\n    return paIncompatibleStreamHostApi;\n#endif\n}\n\n// ------------------------------------------------------------------------------------------\nPaError PaWasapi_SetStreamStateHandler( PaStream *pStream, PaWasapiStreamStateCallback fnStateHandler, void *pUserData )\n{\n    PaWasapiStream *stream = (PaWasapiStream *)pStream;\n    if (stream == NULL)\n        return paBadStreamPtr;\n\n    stream->fnStateHandler        = fnStateHandler;\n    stream->pStateHandlerUserData = pUserData;\n\n    return paNoError;\n}\n\n// ------------------------------------------------------------------------------------------\nHRESULT _PollGetOutputFramesAvailable(PaWasapiStream *stream, UINT32 *available)\n{\n    HRESULT hr;\n    UINT32 frames  = stream->out.framesPerHostCallback,\n           padding = 0;\n\n    (*available) = 0;\n\n    // get read position\n    if ((hr = IAudioClient_GetCurrentPadding(stream->out.clientProc, &padding)) != S_OK)\n        return LogHostError(hr);\n\n    // get available\n    frames -= padding;\n\n    // set\n    (*available) = frames;\n    return hr;\n}\n\n// ------------------------------------------------------------------------------------------\nHRESULT _PollGetInputFramesAvailable(PaWasapiStream *stream, UINT32 *available)\n{\n    HRESULT hr;\n\n    (*available) = 0;\n\n    // GetCurrentPadding() has opposite meaning to Output stream\n    if ((hr = IAudioClient_GetCurrentPadding(stream->in.clientProc, available)) != S_OK)\n        return LogHostError(hr);\n\n    return hr;\n}\n\n// ------------------------------------------------------------------------------------------\nstatic HRESULT ProcessOutputBuffer(PaWasapiStream *stream, PaWasapiHostProcessor *processor, UINT32 frames)\n{\n    HRESULT hr;\n    BYTE *data = NULL;\n\n    // Get buffer\n    if ((hr = IAudioRenderClient_GetBuffer(stream->renderClient, frames, &data)) != S_OK)\n    {\n        // Both modes, Shared and Exclusive, can fail with AUDCLNT_E_BUFFER_TOO_LARGE error\n    #if 0\n        if (stream->out.shareMode == AUDCLNT_SHAREMODE_SHARED)\n        {\n            // Using GetCurrentPadding to overcome AUDCLNT_E_BUFFER_TOO_LARGE in\n            // shared mode results in no sound in Event-driven mode (MSDN does not\n            // document this, or is it WASAPI bug?), thus we better\n            // try to acquire buffer next time when GetBuffer allows to do so.\n        #if 0\n            // Get Read position\n            UINT32 padding = 0;\n            hr = IAudioClient_GetCurrentPadding(stream->out.clientProc, &padding);\n            if (hr != S_OK)\n                return LogHostError(hr);\n\n            // Get frames to write\n            frames -= padding;\n            if (frames == 0)\n                return S_OK;\n\n            if ((hr = IAudioRenderClient_GetBuffer(stream->renderClient, frames, &data)) != S_OK)\n                return LogHostError(hr);\n        #else\n            if (hr == AUDCLNT_E_BUFFER_TOO_LARGE)\n                return S_OK; // be silent in shared mode, try again next time\n        #endif\n        }\n        else\n            return LogHostError(hr);\n    #else\n        if (hr == AUDCLNT_E_BUFFER_TOO_LARGE)\n            return S_OK; // try again next time\n\n        return LogHostError(hr);\n    #endif\n    }\n\n    // Process data\n    if (stream->out.monoMixer != NULL)\n    {\n        // expand buffer\n        UINT32 mono_frames_size = frames * (stream->out.wavex.Format.wBitsPerSample / 8);\n        if (mono_frames_size > stream->out.monoBufferSize)\n        {\n            stream->out.monoBuffer = PaWasapi_ReallocateMemory(stream->out.monoBuffer, (stream->out.monoBufferSize = mono_frames_size));\n            if (stream->out.monoBuffer == NULL)\n            {\n                hr = E_OUTOFMEMORY;\n                LogHostError(hr);\n                return hr;\n            }\n        }\n\n        // process\n        processor[S_OUTPUT].processor(NULL, 0, (BYTE *)stream->out.monoBuffer, frames, processor[S_OUTPUT].userData);\n\n        // mix 1 to 2 channels\n        stream->out.monoMixer(data, stream->out.monoBuffer, frames);\n    }\n    else\n    {\n        processor[S_OUTPUT].processor(NULL, 0, data, frames, processor[S_OUTPUT].userData);\n    }\n\n    // Release buffer\n    if ((hr = IAudioRenderClient_ReleaseBuffer(stream->renderClient, frames, 0)) != S_OK)\n        LogHostError(hr);\n\n    return hr;\n}\n\n// ------------------------------------------------------------------------------------------\nstatic HRESULT ProcessInputBuffer(PaWasapiStream *stream, PaWasapiHostProcessor *processor)\n{\n    HRESULT hr = S_OK;\n    UINT32 frames;\n    BYTE *data = NULL;\n    DWORD flags = 0;\n\n    for (;;)\n    {\n        // Check if blocking call must be interrupted\n        if (WaitForSingleObject(stream->hCloseRequest, 0) != WAIT_TIMEOUT)\n            break;\n\n        // Find out if any frames available\n        frames = 0;\n        if ((hr = _PollGetInputFramesAvailable(stream, &frames)) != S_OK)\n            return hr;\n\n        // Empty/consumed buffer\n        if (frames == 0)\n            break;\n\n        // Get the available data in the shared buffer.\n        if ((hr = IAudioCaptureClient_GetBuffer(stream->captureClient, &data, &frames, &flags, NULL, NULL)) != S_OK)\n        {\n            if (hr == AUDCLNT_S_BUFFER_EMPTY)\n            {\n                hr = S_OK;\n                break; // Empty/consumed buffer\n            }\n\n            return LogHostError(hr);\n            break;\n        }\n\n        // Detect silence\n        // if (flags & AUDCLNT_BUFFERFLAGS_SILENT)\n        //    data = NULL;\n\n        // Process data\n        if (stream->in.monoMixer != NULL)\n        {\n            // expand buffer\n            UINT32 mono_frames_size = frames * (stream->in.wavex.Format.wBitsPerSample / 8);\n            if (mono_frames_size > stream->in.monoBufferSize)\n            {\n                stream->in.monoBuffer = PaWasapi_ReallocateMemory(stream->in.monoBuffer, (stream->in.monoBufferSize = mono_frames_size));\n                if (stream->in.monoBuffer == NULL)\n                {\n                    hr = E_OUTOFMEMORY;\n                    LogHostError(hr);\n                    return hr;\n                }\n            }\n\n            // mix 1 to 2 channels\n            stream->in.monoMixer(stream->in.monoBuffer, data, frames);\n\n            // process\n            processor[S_INPUT].processor((BYTE *)stream->in.monoBuffer, frames, NULL, 0, processor[S_INPUT].userData);\n        }\n        else\n        {\n            processor[S_INPUT].processor(data, frames, NULL, 0, processor[S_INPUT].userData);\n        }\n\n        // Release buffer\n        if ((hr = IAudioCaptureClient_ReleaseBuffer(stream->captureClient, frames)) != S_OK)\n            return LogHostError(hr);\n\n        //break;\n    }\n\n    return hr;\n}\n\n// ------------------------------------------------------------------------------------------\nvoid _StreamOnStop(PaWasapiStream *stream)\n{\n    // Stop INPUT/OUTPUT clients\n    if (!stream->bBlocking)\n    {\n        if (stream->in.clientProc != NULL)\n            IAudioClient_Stop(stream->in.clientProc);\n        if (stream->out.clientProc != NULL)\n            IAudioClient_Stop(stream->out.clientProc);\n    }\n    else\n    {\n        if (stream->in.clientParent != NULL)\n            IAudioClient_Stop(stream->in.clientParent);\n        if (stream->out.clientParent != NULL)\n            IAudioClient_Stop(stream->out.clientParent);\n    }\n\n    // Restore thread priority\n    if (stream->hAvTask != NULL)\n    {\n        PaWasapi_ThreadPriorityRevert(stream->hAvTask);\n        stream->hAvTask = NULL;\n    }\n\n    // Notify\n    if (stream->streamRepresentation.streamFinishedCallback != NULL)\n        stream->streamRepresentation.streamFinishedCallback(stream->streamRepresentation.userData);\n}\n\n// ------------------------------------------------------------------------------------------\nstatic BOOL PrepareComPointers(PaWasapiStream *stream, BOOL *threadComInitialized)\n{\n    HRESULT hr;\n\n    /*\n    If COM is already initialized CoInitialize will either return\n    FALSE, or RPC_E_CHANGED_MODE if it was initialized in a different\n    threading mode. In either case we shouldn't consider it an error\n    but we need to be careful to not call CoUninitialize() if\n    RPC_E_CHANGED_MODE was returned.\n    */\n    hr = CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);\n    if (FAILED(hr) && (hr != RPC_E_CHANGED_MODE))\n    {\n        PRINT((\"WASAPI: failed ProcThreadEvent CoInitialize\"));\n        return FALSE;\n    }\n    if (hr != RPC_E_CHANGED_MODE)\n        *threadComInitialized = TRUE;\n\n    // Unmarshal stream pointers for safe COM operation\n    hr = UnmarshalStreamComPointers(stream);\n    if (hr != S_OK)\n    {\n        PRINT((\"WASAPI: Error unmarshaling stream COM pointers. HRESULT: %i\\n\", hr));\n        CoUninitialize();\n        return FALSE;\n    }\n\n    return TRUE;\n}\n\n// ------------------------------------------------------------------------------------------\nstatic void FinishComPointers(PaWasapiStream *stream, BOOL threadComInitialized)\n{\n    // Release unmarshaled COM pointers\n    ReleaseUnmarshaledComPointers(stream);\n\n    // Cleanup COM for this thread\n    if (threadComInitialized == TRUE)\n        CoUninitialize();\n}\n\n// ------------------------------------------------------------------------------------------\nPA_THREAD_FUNC ProcThreadEvent(void *param)\n{\n    PaWasapiHostProcessor processor[S_COUNT];\n    HRESULT hr = S_OK;\n    DWORD dwResult;\n    PaWasapiStream *stream = (PaWasapiStream *)param;\n    PaWasapiHostProcessor defaultProcessor;\n    BOOL setEvent[S_COUNT] = { FALSE, FALSE };\n    BOOL waitAllEvents = FALSE;\n    BOOL threadComInitialized = FALSE;\n    SystemTimer timer;\n\n    // Notify: state\n    NotifyStateChanged(stream, paWasapiStreamStateThreadPrepare, ERROR_SUCCESS);\n\n    // Prepare COM pointers\n    if (!PrepareComPointers(stream, &threadComInitialized))\n        return (UINT32)paUnanticipatedHostError;\n\n    // Request fine (1 ms) granularity of the system timer functions for precise operation of waitable timers\n    SystemTimer_SetGranularity(&timer, 1);\n\n    // Waiting on all events in case of Full-Duplex/Exclusive mode.\n    if ((stream->in.clientProc != NULL) && (stream->out.clientProc != NULL))\n    {\n        waitAllEvents = (stream->in.shareMode == AUDCLNT_SHAREMODE_EXCLUSIVE) &&\n            (stream->out.shareMode == AUDCLNT_SHAREMODE_EXCLUSIVE);\n    }\n\n    // Setup data processors\n    defaultProcessor.processor = WaspiHostProcessingLoop;\n    defaultProcessor.userData  = stream;\n    processor[S_INPUT] = (stream->hostProcessOverrideInput.processor != NULL ? stream->hostProcessOverrideInput : defaultProcessor);\n    processor[S_OUTPUT] = (stream->hostProcessOverrideOutput.processor != NULL ? stream->hostProcessOverrideOutput : defaultProcessor);\n\n    // Boost thread priority\n    PaWasapi_ThreadPriorityBoost((void **)&stream->hAvTask, stream->nThreadPriority);\n\n    // Create events\n    if (stream->event[S_OUTPUT] == NULL)\n    {\n        stream->event[S_OUTPUT] = CreateEvent(NULL, FALSE, FALSE, NULL);\n        setEvent[S_OUTPUT] = TRUE;\n    }\n    if (stream->event[S_INPUT] == NULL)\n    {\n        stream->event[S_INPUT]  = CreateEvent(NULL, FALSE, FALSE, NULL);\n        setEvent[S_INPUT] = TRUE;\n    }\n    if ((stream->event[S_OUTPUT] == NULL) || (stream->event[S_INPUT] == NULL))\n    {\n        PRINT((\"WASAPI Thread: failed creating Input/Output event handle\\n\"));\n        goto thread_error;\n    }\n\n    // Signal: stream running\n    stream->running = TRUE;\n\n    // Notify: thread started\n    SetEvent(stream->hThreadStart);\n\n    // Initialize event & start INPUT stream\n    if (stream->in.clientProc)\n    {\n        // Create & set handle\n        if (setEvent[S_INPUT])\n        {\n            if ((hr = IAudioClient_SetEventHandle(stream->in.clientProc, stream->event[S_INPUT])) != S_OK)\n            {\n                LogHostError(hr);\n                goto thread_error;\n            }\n        }\n\n        // Start\n        if ((hr = IAudioClient_Start(stream->in.clientProc)) != S_OK)\n        {\n            LogHostError(hr);\n            goto thread_error;\n        }\n    }\n\n    // Initialize event & start OUTPUT stream\n    if (stream->out.clientProc)\n    {\n        // Create & set handle\n        if (setEvent[S_OUTPUT])\n        {\n            if ((hr = IAudioClient_SetEventHandle(stream->out.clientProc, stream->event[S_OUTPUT])) != S_OK)\n            {\n                LogHostError(hr);\n                goto thread_error;\n            }\n        }\n\n        // Preload buffer before start\n        if ((hr = ProcessOutputBuffer(stream, processor, stream->out.framesPerBuffer)) != S_OK)\n        {\n            LogHostError(hr);\n            goto thread_error;\n        }\n\n        // Start\n        if ((hr = IAudioClient_Start(stream->out.clientProc)) != S_OK)\n        {\n            LogHostError(hr);\n            goto thread_error;\n        }\n\n    }\n\n    // Notify: state\n    NotifyStateChanged(stream, paWasapiStreamStateThreadStart, ERROR_SUCCESS);\n\n    // Processing Loop\n    for (;;)\n    {\n        // 10 sec timeout (on timeout stream will auto-stop when processed by WAIT_TIMEOUT case)\n        dwResult = WaitForMultipleObjects(S_COUNT, stream->event, waitAllEvents, 10*1000);\n\n        // Check for close event (after wait for buffers to avoid any calls to user\n        // callback when hCloseRequest was set)\n        if (WaitForSingleObject(stream->hCloseRequest, 0) != WAIT_TIMEOUT)\n            break;\n\n        // Process S_INPUT/S_OUTPUT\n        switch (dwResult)\n        {\n        case WAIT_TIMEOUT: {\n            PRINT((\"WASAPI Thread: WAIT_TIMEOUT - probably bad audio driver or Vista x64 bug: use paWinWasapiPolling instead\\n\"));\n            goto thread_end;\n            break; }\n\n        // Input stream\n        case WAIT_OBJECT_0 + S_INPUT: {\n\n            if (stream->captureClient == NULL)\n                break;\n\n            if ((hr = ProcessInputBuffer(stream, processor)) != S_OK)\n            {\n                LogHostError(hr);\n                goto thread_error;\n            }\n\n            break; }\n\n        // Output stream\n        case WAIT_OBJECT_0 + S_OUTPUT: {\n\n            if (stream->renderClient == NULL)\n                break;\n\n            if ((hr = ProcessOutputBuffer(stream, processor, stream->out.framesPerBuffer)) != S_OK)\n            {\n                LogHostError(hr);\n                goto thread_error;\n            }\n\n            break; }\n        }\n    }\n\nthread_end:\n\n    // Process stop\n    _StreamOnStop(stream);\n\n    // Release unmarshaled COM pointers\n    FinishComPointers(stream, threadComInitialized);\n\n    // Restore system timer granularity\n    SystemTimer_RestoreGranularity(&timer);\n\n    // Notify: not running\n    stream->running = FALSE;\n\n    // Notify: thread exited\n    SetEvent(stream->hThreadExit);\n\n    // Notify: state\n    NotifyStateChanged(stream, paWasapiStreamStateThreadStop, hr);\n\n    return 0;\n\nthread_error:\n\n    // Prevent deadlocking in Pa_StreamStart\n    SetEvent(stream->hThreadStart);\n\n    // Exit\n    goto thread_end;\n}\n\n// ------------------------------------------------------------------------------------------\nstatic UINT32 GetSleepTime(PaWasapiStream *stream, UINT32 sleepTimeIn, UINT32 sleepTimeOut, UINT32 userFramesOut)\n{\n    UINT32 sleepTime;\n\n    // According to the issue [https://github.com/PortAudio/portaudio/issues/303] glitches may occur when user frames\n    // equal to 1/2 of the host buffer frames, therefore the empirical workaround for this problem is to lower\n    // the sleep time by 2\n    if (userFramesOut != 0)\n    {\n        UINT32 chunks = stream->out.framesPerHostCallback / userFramesOut;\n        if (chunks <= 2)\n        {\n            sleepTimeOut /= 2;\n            PRINT((\"WASAPI: underrun workaround, sleep [%d] ms - 1/2 of the user buffer[%d] | host buffer[%d]\\n\", sleepTimeOut, userFramesOut, stream->out.framesPerHostCallback));\n        }\n    }\n\n    // Choose the smallest\n    if ((sleepTimeIn != 0) && (sleepTimeOut != 0))\n        sleepTime = min(sleepTimeIn, sleepTimeOut);\n    else\n        sleepTime = (sleepTimeIn ? sleepTimeIn : sleepTimeOut);\n\n    return sleepTime;\n}\n\n// ------------------------------------------------------------------------------------------\nstatic UINT32 ConfigureLoopSleepTimeAndScheduler(PaWasapiStream *stream, ThreadIdleScheduler *scheduler)\n{\n    UINT32 sleepTime, sleepTimeIn, sleepTimeOut;\n    UINT32 userFramesIn = stream->in.framesPerHostCallback / WASAPI_PACKETS_PER_INPUT_BUFFER;\n    UINT32 userFramesOut = stream->out.framesPerBuffer;\n\n    // Adjust polling time for non-paUtilFixedHostBufferSize, input stream is not adjustable as it is being\n    // polled according to its packet length\n    if (stream->bufferMode != paUtilFixedHostBufferSize)\n    {\n        userFramesOut = (stream->bufferProcessor.framesPerUserBuffer ? stream->bufferProcessor.framesPerUserBuffer :\n            stream->out.params.frames_per_buffer);\n    }\n\n    // Calculate timeout for the next polling attempt\n    sleepTimeIn  = GetFramesSleepTime(userFramesIn, stream->in.wavex.Format.nSamplesPerSec);\n    sleepTimeOut = GetFramesSleepTime(userFramesOut, stream->out.wavex.Format.nSamplesPerSec);\n\n    // WASAPI input packets tend to expire very easily, let's limit sleep time to 2 milliseconds\n    // for all cases. Please propose better solution if any\n    if (sleepTimeIn > 2)\n        sleepTimeIn = 2;\n\n    sleepTime = GetSleepTime(stream, sleepTimeIn, sleepTimeOut, userFramesOut);\n\n    // Make sure not 0, othervise use ThreadIdleScheduler to bounce between [0, 1] ms to avoid too busy loop\n    if (sleepTime == 0)\n    {\n        sleepTimeIn  = GetFramesSleepTimeMicroseconds(userFramesIn, stream->in.wavex.Format.nSamplesPerSec);\n        sleepTimeOut = GetFramesSleepTimeMicroseconds(userFramesOut, stream->out.wavex.Format.nSamplesPerSec);\n\n        sleepTime = GetSleepTime(stream, sleepTimeIn, sleepTimeOut, userFramesOut);\n\n        // Setup thread sleep scheduler\n        ThreadIdleScheduler_Setup(scheduler, 1, sleepTime/* microseconds here */);\n        sleepTime = 0;\n    }\n\n    return sleepTime;\n}\n\n// ------------------------------------------------------------------------------------------\nstatic inline INT32 GetNextSleepTime(SystemTimer *timer, ThreadIdleScheduler *scheduler, LONGLONG startTime,\n    UINT32 sleepTime)\n{\n    INT32 nextSleepTime;\n    INT32 procTime;\n\n    // Get next sleep time\n    if (sleepTime == 0)\n        nextSleepTime = ThreadIdleScheduler_NextSleep(scheduler);\n    else\n        nextSleepTime = sleepTime;\n\n    // Adjust next sleep time dynamically depending on how much time was spent in ProcessOutputBuffer/ProcessInputBuffer\n    // therefore periodicity will not jitter or be increased for the amount of time spent in processing;\n    // example when sleepTime is 10 ms where [] is polling time slot, {} processing time slot:\n    //\n    // [9],{2},[8],{1},[9],{1},[9],{3},[7],{2},[8],{3},[7],{2},[8],{2},[8],{3},[7],{2},[8],...\n    //\n    procTime = (INT32)(SystemTimer_GetTime(timer) - startTime);\n    nextSleepTime -= procTime;\n    if (nextSleepTime < timer->granularity)\n        nextSleepTime = 0;\n    else\n    if (timer->granularity > 1)\n        nextSleepTime = ALIGN_BWD(nextSleepTime, timer->granularity);\n\n#ifdef PA_WASAPI_LOG_TIME_SLOTS\n    printf(\"{%d},\", procTime);\n#endif\n\n    return nextSleepTime;\n}\n\n// ------------------------------------------------------------------------------------------\nPA_THREAD_FUNC ProcThreadPoll(void *param)\n{\n    PaWasapiHostProcessor processor[S_COUNT];\n    HRESULT hr = S_OK;\n    PaWasapiStream *stream = (PaWasapiStream *)param;\n    PaWasapiHostProcessor defaultProcessor;\n    INT32 i;\n    ThreadIdleScheduler scheduler;\n    SystemTimer timer;\n    LONGLONG startTime;\n    UINT32 sleepTime;\n    INT32 nextSleepTime = 0; //! Do first loop without waiting as time could be spent when calling other APIs before ProcessXXXBuffer.\n    BOOL threadComInitialized = FALSE;\n#ifdef PA_WASAPI_LOG_TIME_SLOTS\n    LONGLONG startWaitTime;\n#endif\n\n    // Notify: state\n    NotifyStateChanged(stream, paWasapiStreamStateThreadPrepare, ERROR_SUCCESS);\n\n    // Prepare COM pointers\n    if (!PrepareComPointers(stream, &threadComInitialized))\n        return (UINT32)paUnanticipatedHostError;\n\n    // Request fine (1 ms) granularity of the system timer functions to guarantee correct logic around WaitForSingleObject\n    SystemTimer_SetGranularity(&timer, 1);\n\n    // Calculate sleep time of the processing loop (inside WaitForSingleObject)\n    sleepTime = ConfigureLoopSleepTimeAndScheduler(stream, &scheduler);\n\n    // Setup data processors\n    defaultProcessor.processor = WaspiHostProcessingLoop;\n    defaultProcessor.userData  = stream;\n    processor[S_INPUT] = (stream->hostProcessOverrideInput.processor != NULL ? stream->hostProcessOverrideInput : defaultProcessor);\n    processor[S_OUTPUT] = (stream->hostProcessOverrideOutput.processor != NULL ? stream->hostProcessOverrideOutput : defaultProcessor);\n\n    // Boost thread priority\n    PaWasapi_ThreadPriorityBoost((void **)&stream->hAvTask, stream->nThreadPriority);\n\n    // Signal: stream running\n    stream->running = TRUE;\n\n    // Notify: thread started\n    SetEvent(stream->hThreadStart);\n\n    // Initialize event & start INPUT stream\n    if (stream->in.clientProc)\n    {\n        if ((hr = IAudioClient_Start(stream->in.clientProc)) != S_OK)\n        {\n            LogHostError(hr);\n            goto thread_error;\n        }\n    }\n\n    // Initialize event & start OUTPUT stream\n    if (stream->out.clientProc)\n    {\n        // Preload buffer (obligatory, othervise ->Start() will fail), avoid processing\n        // when in full-duplex mode as it requires input processing as well\n        if (!PA_WASAPI__IS_FULLDUPLEX(stream))\n        {\n            UINT32 frames = 0;\n            if ((hr = _PollGetOutputFramesAvailable(stream, &frames)) == S_OK)\n            {\n                if (stream->bufferMode == paUtilFixedHostBufferSize)\n                {\n                    // It is important to preload whole host buffer to avoid underruns/glitches when stream is started,\n                    // for more details see the discussion: https://github.com/PortAudio/portaudio/issues/303\n                    while (frames >= stream->out.framesPerBuffer)\n                    {\n                        if ((hr = ProcessOutputBuffer(stream, processor, stream->out.framesPerBuffer)) != S_OK)\n                        {\n                            LogHostError(hr); // not fatal, just log\n                            break;\n                        }\n\n                        frames -= stream->out.framesPerBuffer;\n                    }\n                }\n                else\n                {\n                    // Some devices may not start (will get stuck with 0 ready frames) if data not prefetched\n                    if (frames == 0)\n                        frames = stream->out.framesPerBuffer;\n\n                    // USB DACs report large buffer in Exclusive mode and if it is filled fully will stuck in\n                    // non playing state, e.g. IAudioClient_GetCurrentPadding() will start reporting max buffer size\n                    // constantly, thus preload data size equal to the user buffer to allow process going\n                    if ((stream->out.shareMode == AUDCLNT_SHAREMODE_EXCLUSIVE) && (frames >= (stream->out.framesPerBuffer * 2)))\n                        frames -= stream->out.framesPerBuffer;\n\n                    if ((hr = ProcessOutputBuffer(stream, processor, frames)) != S_OK)\n                    {\n                        LogHostError(hr); // not fatal, just log\n                    }\n                }\n            }\n            else\n            {\n                LogHostError(hr); // not fatal, just log\n            }\n        }\n\n        // Start\n        if ((hr = IAudioClient_Start(stream->out.clientProc)) != S_OK)\n        {\n            LogHostError(hr);\n            goto thread_error;\n        }\n    }\n\n    // Notify: state\n    NotifyStateChanged(stream, paWasapiStreamStateThreadStart, ERROR_SUCCESS);\n\n#ifdef PA_WASAPI_LOG_TIME_SLOTS\n    startWaitTime = SystemTimer_GetTime(&timer);\n#endif\n\n    if (!PA_WASAPI__IS_FULLDUPLEX(stream))\n    {\n        // Processing Loop\n        while (WaitForSingleObject(stream->hCloseRequest, nextSleepTime) == WAIT_TIMEOUT)\n        {\n            startTime = SystemTimer_GetTime(&timer);\n\n        #ifdef PA_WASAPI_LOG_TIME_SLOTS\n            printf(\"[%d|%d],\", nextSleepTime, (INT32)(startTime - startWaitTime));\n        #endif\n\n            for (i = 0; i < S_COUNT; ++i)\n            {\n                // Process S_INPUT/S_OUTPUT\n                switch (i)\n                {\n                // Input stream\n                case S_INPUT: {\n\n                    if (stream->captureClient == NULL)\n                        break;\n\n                    if ((hr = ProcessInputBuffer(stream, processor)) != S_OK)\n                    {\n                        LogHostError(hr);\n                        goto thread_error;\n                    }\n\n                    break; }\n\n                // Output stream\n                case S_OUTPUT: {\n\n                    UINT32 framesAvail;\n\n                    if (stream->renderClient == NULL)\n                        break;\n\n                    // Get available frames\n                    if ((hr = _PollGetOutputFramesAvailable(stream, &framesAvail)) != S_OK)\n                    {\n                        LogHostError(hr);\n                        goto thread_error;\n                    }\n\n                    // Output data to the user callback\n                    if (stream->bufferMode == paUtilFixedHostBufferSize)\n                    {\n                        UINT32 framesProc = stream->out.framesPerBuffer;\n\n                        // If we got less frames avoid sleeping again as it might be the corner case and buffer\n                        // has sufficient number of frames now, in case 'out.framesPerBuffer' is 1/2 of the host\n                        // buffer sleeping again may cause underruns. Do short busy waiting (normally might take\n                        // 1-2 iterations)\n                        if (framesAvail < framesProc)\n                        {\n                            nextSleepTime = 0;\n                            continue;\n                        }\n\n                        while (framesAvail >= framesProc)\n                        {\n                            if ((hr = ProcessOutputBuffer(stream, processor, framesProc)) != S_OK)\n                            {\n                                LogHostError(hr);\n                                goto thread_error;\n                            }\n\n                            framesAvail -= framesProc;\n                        }\n                    }\n                    else\n                    if (framesAvail != 0)\n                    {\n                        if ((hr = ProcessOutputBuffer(stream, processor, framesAvail)) != S_OK)\n                        {\n                            LogHostError(hr);\n                            goto thread_error;\n                        }\n                    }\n\n                    break; }\n                }\n            }\n\n            // Get next sleep time\n            nextSleepTime = GetNextSleepTime(&timer, &scheduler, startTime, sleepTime);\n\n        #ifdef PA_WASAPI_LOG_TIME_SLOTS\n            startWaitTime = SystemTimer_GetTime(&timer);\n        #endif\n        }\n    }\n    else\n    {\n        // Processing Loop (full-duplex)\n        while (WaitForSingleObject(stream->hCloseRequest, nextSleepTime) == WAIT_TIMEOUT)\n        {\n            UINT32 i_frames = 0, i_processed = 0, o_frames = 0;\n            BYTE *i_data = NULL, *o_data = NULL, *o_data_host = NULL;\n            DWORD i_flags = 0;\n\n            startTime = SystemTimer_GetTime(&timer);\n\n        #ifdef PA_WASAPI_LOG_TIME_SLOTS\n            printf(\"[%d|%d],\", nextSleepTime, (INT32)(startTime - startWaitTime));\n        #endif\n\n            // get available frames\n            if ((hr = _PollGetOutputFramesAvailable(stream, &o_frames)) != S_OK)\n            {\n                LogHostError(hr);\n                break;\n            }\n\n            while (o_frames != 0)\n            {\n                // get host input buffer\n                if ((hr = IAudioCaptureClient_GetBuffer(stream->captureClient, &i_data, &i_frames, &i_flags, NULL, NULL)) != S_OK)\n                {\n                    if (hr == AUDCLNT_S_BUFFER_EMPTY)\n                        break; // no data in capture buffer\n\n                    LogHostError(hr);\n                    break;\n                }\n\n                // process equal amount of frames\n                if (o_frames >= i_frames)\n                {\n                    // process input amount of frames\n                    UINT32 o_processed = i_frames;\n\n                    // get host output buffer\n                    if ((hr = IAudioRenderClient_GetBuffer(stream->renderClient, o_processed, &o_data)) == S_OK)\n                    {\n                        // processed amount of i_frames\n                        i_processed = i_frames;\n                        o_data_host = o_data;\n\n                        // convert output mono\n                        if (stream->out.monoMixer)\n                        {\n                            UINT32 mono_frames_size = o_processed * (stream->out.wavex.Format.wBitsPerSample / 8);\n                            // expand buffer\n                            if (mono_frames_size > stream->out.monoBufferSize)\n                            {\n                                stream->out.monoBuffer = PaWasapi_ReallocateMemory(stream->out.monoBuffer, (stream->out.monoBufferSize = mono_frames_size));\n                                if (stream->out.monoBuffer == NULL)\n                                {\n                                    // release input buffer\n                                    IAudioCaptureClient_ReleaseBuffer(stream->captureClient, 0);\n                                    // release output buffer\n                                    IAudioRenderClient_ReleaseBuffer(stream->renderClient, 0, 0);\n\n                                    LogPaError(paInsufficientMemory);\n                                    goto thread_error;\n                                }\n                            }\n\n                            // replace buffer pointer\n                            o_data = (BYTE *)stream->out.monoBuffer;\n                        }\n\n                        // convert input mono\n                        if (stream->in.monoMixer)\n                        {\n                            UINT32 mono_frames_size = i_processed * (stream->in.wavex.Format.wBitsPerSample / 8);\n                            // expand buffer\n                            if (mono_frames_size > stream->in.monoBufferSize)\n                            {\n                                stream->in.monoBuffer = PaWasapi_ReallocateMemory(stream->in.monoBuffer, (stream->in.monoBufferSize = mono_frames_size));\n                                if (stream->in.monoBuffer == NULL)\n                                {\n                                    // release input buffer\n                                    IAudioCaptureClient_ReleaseBuffer(stream->captureClient, 0);\n                                    // release output buffer\n                                    IAudioRenderClient_ReleaseBuffer(stream->renderClient, 0, 0);\n\n                                    LogPaError(paInsufficientMemory);\n                                    goto thread_error;\n                                }\n                            }\n\n                            // mix 2 to 1 input channels\n                            stream->in.monoMixer(stream->in.monoBuffer, i_data, i_processed);\n\n                            // replace buffer pointer\n                            i_data = (BYTE *)stream->in.monoBuffer;\n                        }\n\n                        // process\n                        processor[S_FULLDUPLEX].processor(i_data, i_processed, o_data, o_processed, processor[S_FULLDUPLEX].userData);\n\n                        // mix 1 to 2 output channels\n                        if (stream->out.monoBuffer)\n                            stream->out.monoMixer(o_data_host, stream->out.monoBuffer, o_processed);\n\n                        // release host output buffer\n                        if ((hr = IAudioRenderClient_ReleaseBuffer(stream->renderClient, o_processed, 0)) != S_OK)\n                            LogHostError(hr);\n\n                        o_frames -= o_processed;\n                    }\n                    else\n                    {\n                        if (stream->out.shareMode != AUDCLNT_SHAREMODE_SHARED)\n                            LogHostError(hr); // be silent in shared mode, try again next time\n                    }\n                }\n                else\n                {\n                    i_processed = 0;\n                    goto fd_release_buffer_in;\n                }\n\nfd_release_buffer_in:\n\n                // release host input buffer\n                if ((hr = IAudioCaptureClient_ReleaseBuffer(stream->captureClient, i_processed)) != S_OK)\n                {\n                    LogHostError(hr);\n                    break;\n                }\n\n                // break processing, input hasn't been accumulated yet\n                if (i_processed == 0)\n                    break;\n            }\n\n            // Get next sleep time\n            nextSleepTime = GetNextSleepTime(&timer, &scheduler, startTime, sleepTime);\n\n        #ifdef PA_WASAPI_LOG_TIME_SLOTS\n            startWaitTime = SystemTimer_GetTime(&timer);\n        #endif\n        }\n    }\n\nthread_end:\n\n    // Process stop\n    _StreamOnStop(stream);\n\n    // Release unmarshaled COM pointers\n    FinishComPointers(stream, threadComInitialized);\n\n    // Restore system timer granularity\n    SystemTimer_RestoreGranularity(&timer);\n\n    // Notify: not running\n    stream->running = FALSE;\n\n    // Notify: thread exited\n    SetEvent(stream->hThreadExit);\n\n    // Notify: state\n    NotifyStateChanged(stream, paWasapiStreamStateThreadStop, hr);\n\n    return 0;\n\nthread_error:\n\n    // Prevent deadlocking in Pa_StreamStart\n    SetEvent(stream->hThreadStart);\n\n    // Exit\n    goto thread_end;\n}\n\n// ------------------------------------------------------------------------------------------\nvoid *PaWasapi_ReallocateMemory(void *prev, size_t size)\n{\n    void *ret = realloc(prev, size);\n    if (ret == NULL)\n    {\n        PaWasapi_FreeMemory(prev);\n        return NULL;\n    }\n    return ret;\n}\n\n// ------------------------------------------------------------------------------------------\nvoid PaWasapi_FreeMemory(void *ptr)\n{\n    free(ptr);\n}\n"
  },
  {
    "path": "thirdparty/portaudio/src/hostapi/wasapi/readme.txt",
    "content": "**************\n* WASAPI API *\n**************\n\n-------------------------------------------\nMicrosoft Visual Studio 2005 SP1 and higher\n-------------------------------------------\nNo specific action is required to compile WASAPI API under Visual Studio.\nYou are only required to install min. Windows Vista SDK (v6.0A) prior\nthe compilation. To compile with WASAPI specific functionality for Windows 8\nand higher the min. Windows 8 SDK is required.\n\n----------------------------------------\nMinGW (GCC 32/64-bit)\n----------------------------------------\nTo compile with MinGW you are required to include 'mingw-include' directory\nwhich contains necessary files with WASAPI API. These files are modified\nfor the compatibility with MinGW compiler. These files are taken from \nthe Windows Vista SDK (v6.0A). MinGW compilation is tested and proved to be\nfully working.\nMinGW   (32-bit) tested min. version: gcc version 4.4.0 (GCC)\nMinGW64 (64-bit) tested min. version: gcc version 4.4.4 20100226 (prerelease) (GCC)"
  },
  {
    "path": "thirdparty/portaudio/src/hostapi/wdmks/pa_win_wdmks.c",
    "content": "/*\n* $Id$\n* PortAudio Windows WDM-KS interface\n*\n* Author: Andrew Baldwin, Robert Bielik (WaveRT)\n* Based on the Open Source API proposed by Ross Bencina\n* Copyright (c) 1999-2004 Andrew Baldwin, Ross Bencina, Phil Burk\n*\n* Permission is hereby granted, free of charge, to any person obtaining\n* a copy of this software and associated documentation files\n* (the \"Software\"), to deal in the Software without restriction,\n* including without limitation the rights to use, copy, modify, merge,\n* publish, distribute, sublicense, and/or sell copies of the Software,\n* and to permit persons to whom the Software is furnished to do so,\n* subject to the following conditions:\n*\n* The above copyright notice and this permission notice shall be\n* included in all copies or substantial portions of the Software.\n*\n* THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n*/\n\n/*\n* The text above constitutes the entire PortAudio license; however,\n* the PortAudio community also makes the following non-binding requests:\n*\n* Any person wishing to distribute modifications to the Software is\n* requested to send the modifications to the original developer so that\n* they can be incorporated into the canonical version. It is also\n* requested that these non-binding requests be included along with the\n* license above.\n*/\n\n/** @file\n@ingroup hostapi_src\n@brief Portaudio WDM-KS host API.\n\n@note This is the implementation of the Portaudio host API using the\nWindows WDM/Kernel Streaming API in order to enable very low latency\nplayback and recording on all modern Windows platforms (e.g. 2K, XP, Vista, Win7)\nNote: This API accesses the device drivers below the usual KMIXER\ncomponent which is normally used to enable multi-client mixing and\nformat conversion. That means that it will lock out all other users\nof a device for the duration of active stream using those devices\n*/\n\n#include <stdio.h>\n\n#if (defined(_WIN32) && (defined(_MSC_VER) && (_MSC_VER >= 1200))) /* MSC version 6 and above */\n#pragma comment( lib, \"setupapi.lib\" )\n#endif\n\n/* Debugging/tracing support */\n\n#define PA_LOGE_\n#define PA_LOGL_\n\n#ifdef __GNUC__\n#include <initguid.h>\n#define _WIN32_WINNT 0x0501\n#define WINVER 0x0501\n#endif\n\n#include <string.h> /* strlen() */\n#include <assert.h>\n#include <wchar.h>  /* iswspace() */\n\n#include \"pa_util.h\"\n#include \"pa_allocation.h\"\n#include \"pa_hostapi.h\"\n#include \"pa_stream.h\"\n#include \"pa_cpuload.h\"\n#include \"pa_process.h\"\n#include \"portaudio.h\"\n#include \"pa_debugprint.h\"\n#include \"pa_memorybarrier.h\"\n#include \"pa_ringbuffer.h\"\n#include \"pa_trace.h\"\n#include \"pa_win_waveformat.h\"\n\n#include \"pa_win_wdmks.h\"\n\n#ifndef DRV_QUERYDEVICEINTERFACE\n#define DRV_QUERYDEVICEINTERFACE     (DRV_RESERVED + 12)\n#endif\n#ifndef DRV_QUERYDEVICEINTERFACESIZE\n#define DRV_QUERYDEVICEINTERFACESIZE (DRV_RESERVED + 13)\n#endif\n\n#include <windows.h>\n#ifndef __GNUC__ /* Fix for ticket #257: MinGW-w64: Inclusion of <winioctl.h> triggers multiple redefinition errors. */\n#include <winioctl.h>\n#endif\n#include <process.h>\n\n#include <math.h>\n\n#ifdef _MSC_VER\n#define snprintf _snprintf\n#define vsnprintf _vsnprintf\n#endif\n\n/* The PA_HP_TRACE macro is used in RT parts, so it can be switched off without affecting\nthe rest of the debug tracing */\n#if 1\n#define PA_HP_TRACE(x)  PaUtil_AddHighSpeedLogMessage x ;\n#else\n#define PA_HP_TRACE(x)\n#endif\n\n/* A define that selects whether the resulting pin names are chosen from pin category\ninstead of the available pin names, who sometimes can be quite cheesy, like \"Volume control\".\nDefault is to use the pin category.\n*/\n#ifndef PA_WDMKS_USE_CATEGORY_FOR_PIN_NAMES\n#define PA_WDMKS_USE_CATEGORY_FOR_PIN_NAMES  1\n#endif\n\n#ifdef __GNUC__\n#undef PA_LOGE_\n#define PA_LOGE_ PA_DEBUG((\"%s {\\n\",__FUNCTION__))\n#undef PA_LOGL_\n#define PA_LOGL_ PA_DEBUG((\"} %s\\n\",__FUNCTION__))\n/* These defines are set in order to allow the WIndows DirectX\n* headers to compile with a GCC compiler such as MinGW\n* NOTE: The headers may generate a few warning in GCC, but\n* they should compile */\n#define _INC_MMSYSTEM\n#define _INC_MMREG\n#define _NTRTL_ /* Turn off default definition of DEFINE_GUIDEX */\n#define DEFINE_GUID_THUNK(name,guid) DEFINE_GUID(name,guid)\n#define DEFINE_GUIDEX(n) DEFINE_GUID_THUNK( n, STATIC_##n )\n#if !defined( DEFINE_WAVEFORMATEX_GUID )\n#define DEFINE_WAVEFORMATEX_GUID(x) (USHORT)(x), 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71\n#endif\n#define  WAVE_FORMAT_ADPCM      0x0002\n#define  WAVE_FORMAT_IEEE_FLOAT 0x0003\n#define  WAVE_FORMAT_ALAW       0x0006\n#define  WAVE_FORMAT_MULAW      0x0007\n#define  WAVE_FORMAT_MPEG       0x0050\n#define  WAVE_FORMAT_DRM        0x0009\n#define DYNAMIC_GUID_THUNK(l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) {l,w1,w2,{b1,b2,b3,b4,b5,b6,b7,b8}}\n#define DYNAMIC_GUID(data) DYNAMIC_GUID_THUNK(data)\n#endif\n\n/* use CreateThread for CYGWIN/Windows Mobile, _beginthreadex for all others */\n#if !defined(__CYGWIN__) && !defined(_WIN32_WCE)\n#define CREATE_THREAD_FUNCTION (HANDLE)_beginthreadex\n#define PA_THREAD_FUNC static unsigned WINAPI\n#else\n#define CREATE_THREAD_FUNCTION CreateThread\n#define PA_THREAD_FUNC static DWORD WINAPI\n#endif\n\n#ifdef _MSC_VER\n#define NOMMIDS\n#define DYNAMIC_GUID(data) {data}\n#define _NTRTL_ /* Turn off default definition of DEFINE_GUIDEX */\n#undef DEFINE_GUID\n#if defined(__clang__) || (defined(_MSVC_TRADITIONAL) && !_MSVC_TRADITIONAL) /* clang-cl and new msvc preprocessor: avoid too many arguments error */\n    #define DEFINE_GUID(n, ...) EXTERN_C const GUID n = {__VA_ARGS__}\n    #define DEFINE_GUID_THUNK(n, ...) DEFINE_GUID(n, __VA_ARGS__)\n    #define DEFINE_GUIDEX(n) DEFINE_GUID_THUNK(n, STATIC_##n)\n#else\n    #define DEFINE_GUID(n, data) EXTERN_C const GUID n = {data}\n    #define DEFINE_GUID_THUNK(n, data) DEFINE_GUID(n, data)\n    #define DEFINE_GUIDEX(n) DEFINE_GUID_THUNK(n, STATIC_##n)\n#endif /* __clang__, !_MSVC_TRADITIONAL */\n#endif\n\n#include <setupapi.h>\n\n#ifndef EXTERN_C\n#define EXTERN_C extern\n#endif\n\n#if defined(__GNUC__)\n\n/* For MinGW we reference mingw-include files supplied with WASAPI */\n#define WINBOOL BOOL\n\n#include \"../wasapi/mingw-include/ks.h\"\n#include \"../wasapi/mingw-include/ksmedia.h\"\n\n#else\n\n#include <mmreg.h>\n#include <ks.h>\n\n/* Note that Windows SDK V6.0A or later is needed for WaveRT specific structs to be present in\n   ksmedia.h. Also make sure that the SDK include path is before other include paths (that may contain\n   an \"old\" ksmedia.h), so the proper ksmedia.h is used */\n#include <ksmedia.h>\n\n#endif\n\n#include <assert.h>\n#include <stdio.h>\n\n/* These next definitions allow the use of the KSUSER DLL */\ntypedef /*KSDDKAPI*/ DWORD WINAPI KSCREATEPIN(HANDLE, PKSPIN_CONNECT, ACCESS_MASK, PHANDLE);\nextern HMODULE      DllKsUser;\nextern KSCREATEPIN* FunctionKsCreatePin;\n\n/* These definitions allows the use of AVRT.DLL on Vista and later OSs */\ntypedef enum _PA_AVRT_PRIORITY\n{\n    PA_AVRT_PRIORITY_LOW = -1,\n    PA_AVRT_PRIORITY_NORMAL,\n    PA_AVRT_PRIORITY_HIGH,\n    PA_AVRT_PRIORITY_CRITICAL\n} PA_AVRT_PRIORITY, *PPA_AVRT_PRIORITY;\n\ntypedef struct\n{\n    HINSTANCE hInstance;\n\n    HANDLE  (WINAPI *AvSetMmThreadCharacteristics) (LPCSTR, LPDWORD);\n    BOOL    (WINAPI *AvRevertMmThreadCharacteristics) (HANDLE);\n    BOOL    (WINAPI *AvSetMmThreadPriority) (HANDLE, PA_AVRT_PRIORITY);\n} PaWinWDMKSAvRtEntryPoints;\n\nstatic PaWinWDMKSAvRtEntryPoints paWinWDMKSAvRtEntryPoints = {0};\n\n/* An unspecified channel count (-1) is not treated correctly, so we replace it with\n* an arbitrarily large number */\n#define MAXIMUM_NUMBER_OF_CHANNELS 256\n\n/* Forward definition to break circular type reference between pin and filter */\nstruct __PaWinWdmFilter;\ntypedef struct __PaWinWdmFilter PaWinWdmFilter;\n\nstruct __PaWinWdmPin;\ntypedef struct __PaWinWdmPin PaWinWdmPin;\n\nstruct __PaWinWdmStream;\ntypedef struct __PaWinWdmStream PaWinWdmStream;\n\n/* Function prototype for getting audio position */\ntypedef PaError (*FunctionGetPinAudioPosition)(PaWinWdmPin*, unsigned long*);\n\n/* Function prototype for memory barrier */\ntypedef void (*FunctionMemoryBarrier)(void);\n\nstruct __PaProcessThreadInfo;\ntypedef struct __PaProcessThreadInfo PaProcessThreadInfo;\n\ntypedef PaError (*FunctionPinHandler)(PaProcessThreadInfo* pInfo, unsigned eventIndex);\n\ntypedef enum __PaStreamStartEnum\n{\n    StreamStart_kOk,\n    StreamStart_kFailed,\n    StreamStart_kCnt\n} PaStreamStartEnum;\n\n/* Multiplexed input structure.\n*  Very often several physical inputs are multiplexed through a MUX node (represented in the topology filter) */\ntypedef struct __PaWinWdmMuxedInput\n{\n    wchar_t                     friendlyName[MAX_PATH];\n    ULONG                       muxPinId;\n    ULONG                       muxNodeId;\n    ULONG                       endpointPinId;\n} PaWinWdmMuxedInput;\n\n/* The Pin structure\n* A pin is an input or output node, e.g. for audio flow */\nstruct __PaWinWdmPin\n{\n    HANDLE                      handle;\n    PaWinWdmMuxedInput**        inputs;\n    unsigned                    inputCount;\n    wchar_t                     friendlyName[MAX_PATH];\n\n    PaWinWdmFilter*             parentFilter;\n    PaWDMKSSubType              pinKsSubType;\n    unsigned long               pinId;\n    unsigned long               endpointPinId;  /* For output pins */\n    KSPIN_CONNECT*              pinConnect;\n    unsigned long               pinConnectSize;\n    KSDATAFORMAT_WAVEFORMATEX*  ksDataFormatWfx;\n    KSPIN_COMMUNICATION         communication;\n    KSDATARANGE*                dataRanges;\n    KSMULTIPLE_ITEM*            dataRangesItem;\n    KSPIN_DATAFLOW              dataFlow;\n    KSPIN_CINSTANCES            instances;\n    unsigned long               frameSize;\n    int                         maxChannels;\n    unsigned long               formats;\n    int                         defaultSampleRate;\n    ULONG                       *positionRegister;  /* WaveRT */\n    ULONG                       hwLatency;          /* WaveRT */\n    FunctionMemoryBarrier       fnMemBarrier;       /* WaveRT */\n    FunctionGetPinAudioPosition fnAudioPosition;    /* WaveRT */\n    FunctionPinHandler          fnEventHandler;\n    FunctionPinHandler          fnSubmitHandler;\n};\n\n/* The Filter structure\n* A filter has a number of pins and a \"friendly name\" */\nstruct __PaWinWdmFilter\n{\n    HANDLE         handle;\n    PaWinWDMKSDeviceInfo    devInfo;  /* This will hold information that is exposed in PaDeviceInfo */\n\n    DWORD            deviceNode;\n    int            pinCount;\n    PaWinWdmPin**  pins;\n    PaWinWdmFilter*  topologyFilter;\n    wchar_t          friendlyName[MAX_PATH];\n    int              validPinCount;\n    int            usageCount;\n    KSMULTIPLE_ITEM* connections;\n    KSMULTIPLE_ITEM* nodes;\n    int              filterRefCount;\n};\n\n\ntypedef struct __PaWinWdmDeviceInfo\n{\n    PaDeviceInfo    inheritedDeviceInfo;\n    char            compositeName[MAX_PATH];   /* Composite name consists of pin name + device name in utf8 */\n    PaWinWdmFilter* filter;\n    unsigned long   pin;\n    int             muxPosition;    /* Used only for input devices */\n    int             endpointPinId;\n}\nPaWinWdmDeviceInfo;\n\n/* PaWinWdmHostApiRepresentation - host api datastructure specific to this implementation */\ntypedef struct __PaWinWdmHostApiRepresentation\n{\n    PaUtilHostApiRepresentation  inheritedHostApiRep;\n    PaUtilStreamInterface        callbackStreamInterface;\n    PaUtilStreamInterface        blockingStreamInterface;\n\n    PaUtilAllocationGroup*       allocations;\n    int                          deviceCount;\n}\nPaWinWdmHostApiRepresentation;\n\ntypedef struct __DATAPACKET\n{\n    KSSTREAM_HEADER  Header;\n    OVERLAPPED       Signal;\n} DATAPACKET;\n\ntypedef struct __PaIOPacket\n{\n    DATAPACKET*     packet;\n    unsigned        startByte;\n    unsigned        lengthBytes;\n} PaIOPacket;\n\ntypedef struct __PaWinWdmIOInfo\n{\n    PaWinWdmPin*        pPin;\n    char*               hostBuffer;\n    unsigned            hostBufferSize;\n    unsigned            framesPerBuffer;\n    unsigned            bytesPerFrame;\n    unsigned            bytesPerSample;\n    unsigned            noOfPackets;    /* Only used in WaveCyclic */\n    HANDLE              *events;        /* noOfPackets handles (WaveCyclic) 1 (WaveRT) */\n    DATAPACKET          *packets;       /* noOfPackets packets (WaveCyclic) 2 (WaveRT) */\n    /* WaveRT polled mode */\n    unsigned            lastPosition;\n    unsigned            pollCntr;\n} PaWinWdmIOInfo;\n\n/* PaWinWdmStream - a stream data structure specifically for this implementation */\nstruct __PaWinWdmStream\n{\n    PaUtilStreamRepresentation  streamRepresentation;\n    PaWDMKSSpecificStreamInfo   hostApiStreamInfo;    /* This holds info that is exposed through PaStreamInfo */\n    PaUtilCpuLoadMeasurer       cpuLoadMeasurer;\n    PaUtilBufferProcessor       bufferProcessor;\n\n#if PA_TRACE_REALTIME_EVENTS\n    LogHandle                   hLog;\n#endif\n\n    PaUtilAllocationGroup*      allocGroup;\n    PaWinWdmIOInfo              capture;\n    PaWinWdmIOInfo              render;\n    int                         streamStarted;\n    int                         streamActive;\n    int                         streamStop;\n    int                         streamAbort;\n    int                         oldProcessPriority;\n    HANDLE                      streamThread;\n    HANDLE                      eventAbort;\n    HANDLE                      eventStreamStart[StreamStart_kCnt];        /* 0 = OK, 1 = Failed */\n    PaError                     threadResult;\n    PaStreamFlags               streamFlags;\n\n    /* Capture ring buffer */\n    PaUtilRingBuffer            ringBuffer;\n    char*                       ringBufferData;\n\n    /* These values handle the case where the user wants to use fewer\n    * channels than the device has */\n    int                         userInputChannels;\n    int                         deviceInputChannels;\n    int                         userOutputChannels;\n    int                         deviceOutputChannels;\n};\n\n/* Gather all processing variables in a struct */\nstruct __PaProcessThreadInfo\n{\n    PaWinWdmStream              *stream;\n    PaStreamCallbackTimeInfo    ti;\n    PaStreamCallbackFlags       underover;\n    int                         cbResult;\n    volatile int                pending;\n    volatile int                priming;\n    volatile int                pinsStarted;\n    unsigned long               timeout;\n    unsigned                    captureHead;\n    unsigned                    captureTail;\n    unsigned                    renderHead;\n    unsigned                    renderTail;\n    PaIOPacket                  capturePackets[4];\n    PaIOPacket                  renderPackets[4];\n};\n\n/* Used for transferring device infos during scanning / rescanning */\ntypedef struct __PaWinWDMScanDeviceInfosResults\n{\n    PaDeviceInfo **deviceInfos;\n    PaDeviceIndex defaultInputDevice;\n    PaDeviceIndex defaultOutputDevice;\n} PaWinWDMScanDeviceInfosResults;\n\nstatic const unsigned cPacketsArrayMask = 3;\n\nHMODULE      DllKsUser = NULL;\nKSCREATEPIN* FunctionKsCreatePin = NULL;\n\n/* prototypes for functions declared in this file */\n\n#ifdef __cplusplus\nextern \"C\"\n{\n#endif /* __cplusplus */\n\n    PaError PaWinWdm_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index );\n\n#ifdef __cplusplus\n}\n#endif /* __cplusplus */\n\n/* Low level I/O functions */\nstatic PaError WdmSyncIoctl(HANDLE handle,\n                            unsigned long ioctlNumber,\n                            void* inBuffer,\n                            unsigned long inBufferCount,\n                            void* outBuffer,\n                            unsigned long outBufferCount,\n                            unsigned long* bytesReturned);\n\nstatic PaError WdmGetPropertySimple(HANDLE handle,\n                                    const GUID* const guidPropertySet,\n                                    unsigned long property,\n                                    void* value,\n                                    unsigned long valueCount);\n\nstatic PaError WdmSetPropertySimple(HANDLE handle,\n                                    const GUID* const guidPropertySet,\n                                    unsigned long property,\n                                    void* value,\n                                    unsigned long valueCount,\n                                    void* instance,\n                                    unsigned long instanceCount);\n\nstatic PaError WdmGetPinPropertySimple(HANDLE  handle,\n                                       unsigned long pinId,\n                                       const GUID* const guidPropertySet,\n                                       unsigned long property,\n                                       void* value,\n                                       unsigned long valueCount,\n                                       unsigned long* byteCount);\n\nstatic PaError WdmGetPinPropertyMulti(HANDLE  handle,\n                                      unsigned long pinId,\n                                      const GUID* const guidPropertySet,\n                                      unsigned long property,\n                                      KSMULTIPLE_ITEM** ksMultipleItem);\n\nstatic PaError WdmGetPropertyMulti(HANDLE handle,\n                                   const GUID* const guidPropertySet,\n                                   unsigned long property,\n                                   KSMULTIPLE_ITEM** ksMultipleItem);\n\nstatic PaError WdmSetMuxNodeProperty(HANDLE handle,\n                                     ULONG nodeId,\n                                     ULONG pinId);\n\n\n/** Pin management functions */\nstatic PaWinWdmPin* PinNew(PaWinWdmFilter* parentFilter, unsigned long pinId, PaError* error);\nstatic void PinFree(PaWinWdmPin* pin);\nstatic void PinClose(PaWinWdmPin* pin);\nstatic PaError PinInstantiate(PaWinWdmPin* pin);\n/*static PaError PinGetState(PaWinWdmPin* pin, KSSTATE* state); NOT USED */\nstatic PaError PinSetState(PaWinWdmPin* pin, KSSTATE state);\nstatic PaError PinSetFormat(PaWinWdmPin* pin, const WAVEFORMATEX* format);\nstatic PaError PinIsFormatSupported(PaWinWdmPin* pin, const WAVEFORMATEX* format);\n/* WaveRT support */\nstatic PaError PinQueryNotificationSupport(PaWinWdmPin* pPin, BOOL* pbResult);\nstatic PaError PinGetBuffer(PaWinWdmPin* pPin, void** pBuffer, DWORD* pRequestedBufSize, BOOL* pbCallMemBarrier);\nstatic PaError PinRegisterPositionRegister(PaWinWdmPin* pPin);\nstatic PaError PinRegisterNotificationHandle(PaWinWdmPin* pPin, HANDLE handle);\nstatic PaError PinUnregisterNotificationHandle(PaWinWdmPin* pPin, HANDLE handle);\nstatic PaError PinGetHwLatency(PaWinWdmPin* pPin, ULONG* pFifoSize, ULONG* pChipsetDelay, ULONG* pCodecDelay);\nstatic PaError PinGetAudioPositionMemoryMapped(PaWinWdmPin* pPin, ULONG* pPosition);\nstatic PaError PinGetAudioPositionViaIOCTLRead(PaWinWdmPin* pPin, ULONG* pPosition);\nstatic PaError PinGetAudioPositionViaIOCTLWrite(PaWinWdmPin* pPin, ULONG* pPosition);\n\n/* Filter management functions */\nstatic PaWinWdmFilter* FilterNew(PaWDMKSType type, DWORD devNode, const wchar_t* filterName, const wchar_t* friendlyName, PaError* error);\nstatic PaError FilterInitializePins(PaWinWdmFilter* filter);\nstatic void FilterFree(PaWinWdmFilter* filter);\nstatic void FilterAddRef(PaWinWdmFilter* filter);\nstatic PaWinWdmPin* FilterCreatePin(\n                                    PaWinWdmFilter* filter,\n                                    int pinId,\n                                    const WAVEFORMATEX* wfex,\n                                    PaError* error);\nstatic PaError FilterUse(PaWinWdmFilter* filter);\nstatic void FilterRelease(PaWinWdmFilter* filter);\n\n/* Hot plug functions */\nstatic BOOL IsDeviceTheSame(const PaWinWdmDeviceInfo* pDev1,\n                            const PaWinWdmDeviceInfo* pDev2);\n\n/* Interface functions */\nstatic void Terminate( struct PaUtilHostApiRepresentation *hostApi );\nstatic PaError IsFormatSupported(\nstruct PaUtilHostApiRepresentation *hostApi,\n    const PaStreamParameters *inputParameters,\n    const PaStreamParameters *outputParameters,\n    double sampleRate );\n\nstatic PaError ScanDeviceInfos( struct PaUtilHostApiRepresentation *hostApi, PaHostApiIndex index, void **newDeviceInfos, int *newDeviceCount );\nstatic PaError CommitDeviceInfos( struct PaUtilHostApiRepresentation *hostApi, PaHostApiIndex index, void *deviceInfos, int deviceCount );\nstatic PaError DisposeDeviceInfos( struct PaUtilHostApiRepresentation *hostApi, void *deviceInfos, int deviceCount );\n\nstatic PaError OpenStream(\nstruct PaUtilHostApiRepresentation *hostApi,\n    PaStream** s,\n    const PaStreamParameters *inputParameters,\n    const PaStreamParameters *outputParameters,\n    double sampleRate,\n    unsigned long framesPerBuffer,\n    PaStreamFlags streamFlags,\n    PaStreamCallback *streamCallback,\n    void *userData );\nstatic PaError CloseStream( PaStream* stream );\nstatic PaError StartStream( PaStream *stream );\nstatic PaError StopStream( PaStream *stream );\nstatic PaError AbortStream( PaStream *stream );\nstatic PaError IsStreamStopped( PaStream *s );\nstatic PaError IsStreamActive( PaStream *stream );\nstatic PaTime GetStreamTime( PaStream *stream );\nstatic double GetStreamCpuLoad( PaStream* stream );\nstatic PaError ReadStream(\n                          PaStream* stream,\n                          void *buffer,\n                          unsigned long frames );\nstatic PaError WriteStream(\n                           PaStream* stream,\n                           const void *buffer,\n                           unsigned long frames );\nstatic signed long GetStreamReadAvailable( PaStream* stream );\nstatic signed long GetStreamWriteAvailable( PaStream* stream );\n\n/* Utility functions */\nstatic unsigned long GetWfexSize(const WAVEFORMATEX* wfex);\nstatic PaWinWdmFilter** BuildFilterList(int* filterCount, int* noOfPaDevices, PaError* result);\nstatic BOOL PinWrite(HANDLE h, DATAPACKET* p);\nstatic BOOL PinRead(HANDLE h, DATAPACKET* p);\nstatic void DuplicateFirstChannelInt16(void* buffer, int channels, int samples);\nstatic void DuplicateFirstChannelInt24(void* buffer, int channels, int samples);\nPA_THREAD_FUNC ProcessingThread(void*);\n\n/* Pin handler functions */\nstatic PaError PaPinCaptureEventHandler_WaveCyclic(PaProcessThreadInfo* pInfo, unsigned eventIndex);\nstatic PaError PaPinCaptureSubmitHandler_WaveCyclic(PaProcessThreadInfo* pInfo, unsigned eventIndex);\n\nstatic PaError PaPinRenderEventHandler_WaveCyclic(PaProcessThreadInfo* pInfo, unsigned eventIndex);\nstatic PaError PaPinRenderSubmitHandler_WaveCyclic(PaProcessThreadInfo* pInfo, unsigned eventIndex);\n\nstatic PaError PaPinCaptureEventHandler_WaveRTEvent(PaProcessThreadInfo* pInfo, unsigned eventIndex);\nstatic PaError PaPinCaptureEventHandler_WaveRTPolled(PaProcessThreadInfo* pInfo, unsigned eventIndex);\nstatic PaError PaPinCaptureSubmitHandler_WaveRTEvent(PaProcessThreadInfo* pInfo, unsigned eventIndex);\nstatic PaError PaPinCaptureSubmitHandler_WaveRTPolled(PaProcessThreadInfo* pInfo, unsigned eventIndex);\n\nstatic PaError PaPinRenderEventHandler_WaveRTEvent(PaProcessThreadInfo* pInfo, unsigned eventIndex);\nstatic PaError PaPinRenderEventHandler_WaveRTPolled(PaProcessThreadInfo* pInfo, unsigned eventIndex);\nstatic PaError PaPinRenderSubmitHandler_WaveRTEvent(PaProcessThreadInfo* pInfo, unsigned eventIndex);\nstatic PaError PaPinRenderSubmitHandler_WaveRTPolled(PaProcessThreadInfo* pInfo, unsigned eventIndex);\n\n/* Function bodies */\n\n#if defined(_DEBUG) && defined(PA_ENABLE_DEBUG_OUTPUT)\n#define PA_WDMKS_SET_TREF\nstatic PaTime tRef = 0;\n\nstatic void PaWinWdmDebugPrintf(const char* fmt, ...)\n{\n    va_list list;\n    char buffer[1024];\n    PaTime t = PaUtil_GetTime() - tRef;\n    va_start(list, fmt);\n    _vsnprintf(buffer, 1023, fmt, list);\n    va_end(list);\n    PaUtil_DebugPrint(\"%6.3lf: %s\", t, buffer);\n}\n\n#ifdef PA_DEBUG\n#undef PA_DEBUG\n#define PA_DEBUG(x)    PaWinWdmDebugPrintf x ;\n#endif\n#endif\n\nstatic BOOL IsDeviceTheSame(const PaWinWdmDeviceInfo* pDev1,\n                            const PaWinWdmDeviceInfo* pDev2)\n{\n    if (pDev1 == NULL || pDev2 == NULL)\n        return FALSE;\n\n    if (pDev1 == pDev2)\n        return TRUE;\n\n    if (strcmp(pDev1->compositeName, pDev2->compositeName) == 0)\n        return TRUE;\n\n    return FALSE;\n}\n\nstatic BOOL IsEarlierThanVista()\n{\n/*\nNOTE: GetVersionEx() is deprecated as of Windows 8.1 and can not be used to reliably detect\nversions of Windows higher than Windows 8 (due to manifest requirements for reporting higher versions).\nMicrosoft recommends switching to VerifyVersionInfo (available on Win 2k and later), however GetVersionEx\nis faster, for now we just disable the deprecation warning.\nSee: https://msdn.microsoft.com/en-us/library/windows/desktop/ms724451(v=vs.85).aspx\nSee: http://www.codeproject.com/Articles/678606/Part-Overcoming-Windows-s-deprecation-of-GetVe\n*/\n#pragma warning (disable : 4996) /* use of GetVersionEx */\n\n    OSVERSIONINFO osvi;\n    osvi.dwOSVersionInfoSize = sizeof(osvi);\n    if (GetVersionEx(&osvi) && osvi.dwMajorVersion<6)\n    {\n        return TRUE;\n    }\n    return FALSE;\n\n#pragma warning (default : 4996)\n}\n\n\n\nstatic void MemoryBarrierDummy(void)\n{\n    /* Do nothing */\n}\n\nstatic void MemoryBarrierRead(void)\n{\n    PaUtil_ReadMemoryBarrier();\n}\n\nstatic void MemoryBarrierWrite(void)\n{\n    PaUtil_WriteMemoryBarrier();\n}\n\nstatic unsigned long GetWfexSize(const WAVEFORMATEX* wfex)\n{\n    if( wfex->wFormatTag == WAVE_FORMAT_PCM )\n    {\n        return sizeof( WAVEFORMATEX );\n    }\n    else\n    {\n        return (sizeof( WAVEFORMATEX ) + wfex->cbSize);\n    }\n}\n\nstatic void PaWinWDM_SetLastErrorInfo(long errCode, const char* fmt, ...)\n{\n    va_list list;\n    char buffer[1024];\n    va_start(list, fmt);\n    _vsnprintf(buffer, 1023, fmt, list);\n    va_end(list);\n    PaUtil_SetLastHostErrorInfo(paWDMKS, errCode, buffer);\n}\n\n/*\nLow level pin/filter access functions\n*/\nstatic PaError WdmSyncIoctl(\n                            HANDLE handle,\n                            unsigned long ioctlNumber,\n                            void* inBuffer,\n                            unsigned long inBufferCount,\n                            void* outBuffer,\n                            unsigned long outBufferCount,\n                            unsigned long* bytesReturned)\n{\n    PaError result = paNoError;\n    unsigned long dummyBytesReturned = 0;\n    BOOL bRes;\n\n    if( !bytesReturned )\n    {\n        /* Use a dummy as the caller hasn't supplied one */\n        bytesReturned = &dummyBytesReturned;\n    }\n\n    bRes = DeviceIoControl(handle, ioctlNumber, inBuffer, inBufferCount, outBuffer, outBufferCount, bytesReturned, NULL);\n    if (!bRes)\n    {\n        unsigned long error = GetLastError();\n        if ( !(((error == ERROR_INSUFFICIENT_BUFFER ) || ( error == ERROR_MORE_DATA )) &&\n            ( ioctlNumber == IOCTL_KS_PROPERTY ) &&\n            ( outBufferCount == 0 ) ) )\n        {\n            KSPROPERTY* ksProperty = (KSPROPERTY*)inBuffer;\n\n            PaWinWDM_SetLastErrorInfo(result, \"WdmSyncIoctl: DeviceIoControl GLE = 0x%08X (prop_set = {%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}, prop_id = %u)\",\n                error,\n                ksProperty->Set.Data1, ksProperty->Set.Data2, ksProperty->Set.Data3,\n                ksProperty->Set.Data4[0], ksProperty->Set.Data4[1],\n                ksProperty->Set.Data4[2], ksProperty->Set.Data4[3],\n                ksProperty->Set.Data4[4], ksProperty->Set.Data4[5],\n                ksProperty->Set.Data4[6], ksProperty->Set.Data4[7],\n                ksProperty->Id\n                );\n            result = paUnanticipatedHostError;\n        }\n    }\n    return result;\n}\n\nstatic PaError WdmGetPropertySimple(HANDLE handle,\n                                    const GUID* const guidPropertySet,\n                                    unsigned long property,\n                                    void* value,\n                                    unsigned long valueCount)\n{\n    PaError result;\n    KSPROPERTY ksProperty;\n\n    ksProperty.Set = *guidPropertySet;\n    ksProperty.Id = property;\n    ksProperty.Flags = KSPROPERTY_TYPE_GET;\n\n    result = WdmSyncIoctl(\n        handle,\n        IOCTL_KS_PROPERTY,\n        &ksProperty,\n        sizeof(KSPROPERTY),\n        value,\n        valueCount,\n        NULL);\n\n    return result;\n}\n\nstatic PaError WdmSetPropertySimple(\n                                    HANDLE handle,\n                                    const GUID* const guidPropertySet,\n                                    unsigned long property,\n                                    void* value,\n                                    unsigned long valueCount,\n                                    void* instance,\n                                    unsigned long instanceCount)\n{\n    PaError result;\n    KSPROPERTY* ksProperty;\n    unsigned long propertyCount  = 0;\n\n    propertyCount = sizeof(KSPROPERTY) + instanceCount;\n    ksProperty = (KSPROPERTY*)_alloca( propertyCount );\n    if( !ksProperty )\n    {\n        return paInsufficientMemory;\n    }\n\n    ksProperty->Set = *guidPropertySet;\n    ksProperty->Id = property;\n    ksProperty->Flags = KSPROPERTY_TYPE_SET;\n\n    if( instance )\n    {\n        memcpy((void*)((char*)ksProperty + sizeof(KSPROPERTY)), instance, instanceCount);\n    }\n\n    result = WdmSyncIoctl(\n        handle,\n        IOCTL_KS_PROPERTY,\n        ksProperty,\n        propertyCount,\n        value,\n        valueCount,\n        NULL);\n\n    return result;\n}\n\nstatic PaError WdmGetPinPropertySimple(\n                                       HANDLE  handle,\n                                       unsigned long pinId,\n                                       const GUID* const guidPropertySet,\n                                       unsigned long property,\n                                       void* value,\n                                       unsigned long valueCount,\n                                       unsigned long *byteCount)\n{\n    PaError result;\n\n    KSP_PIN ksPProp;\n    ksPProp.Property.Set = *guidPropertySet;\n    ksPProp.Property.Id = property;\n    ksPProp.Property.Flags = KSPROPERTY_TYPE_GET;\n    ksPProp.PinId = pinId;\n    ksPProp.Reserved = 0;\n\n    result = WdmSyncIoctl(\n        handle,\n        IOCTL_KS_PROPERTY,\n        &ksPProp,\n        sizeof(KSP_PIN),\n        value,\n        valueCount,\n        byteCount);\n\n    return result;\n}\n\nstatic PaError WdmGetPinPropertyMulti(\n                                      HANDLE handle,\n                                      unsigned long pinId,\n                                      const GUID* const guidPropertySet,\n                                      unsigned long property,\n                                      KSMULTIPLE_ITEM** ksMultipleItem)\n{\n    PaError result;\n    unsigned long multipleItemSize = 0;\n    KSP_PIN ksPProp;\n\n    ksPProp.Property.Set = *guidPropertySet;\n    ksPProp.Property.Id = property;\n    ksPProp.Property.Flags = KSPROPERTY_TYPE_GET;\n    ksPProp.PinId = pinId;\n    ksPProp.Reserved = 0;\n\n    result = WdmSyncIoctl(\n        handle,\n        IOCTL_KS_PROPERTY,\n        &ksPProp.Property,\n        sizeof(KSP_PIN),\n        NULL,\n        0,\n        &multipleItemSize);\n    if( result != paNoError )\n    {\n        return result;\n    }\n\n    *ksMultipleItem = (KSMULTIPLE_ITEM*)PaUtil_AllocateMemory( multipleItemSize );\n    if( !*ksMultipleItem )\n    {\n        return paInsufficientMemory;\n    }\n\n    result = WdmSyncIoctl(\n        handle,\n        IOCTL_KS_PROPERTY,\n        &ksPProp,\n        sizeof(KSP_PIN),\n        (void*)*ksMultipleItem,\n        multipleItemSize,\n        NULL);\n\n    if( result != paNoError )\n    {\n        PaUtil_FreeMemory( ksMultipleItem );\n    }\n\n    return result;\n}\n\nstatic PaError WdmGetPropertyMulti(HANDLE handle,\n                                   const GUID* const guidPropertySet,\n                                   unsigned long property,\n                                   KSMULTIPLE_ITEM** ksMultipleItem)\n{\n    PaError result;\n    unsigned long multipleItemSize = 0;\n    KSPROPERTY ksProp;\n\n    ksProp.Set = *guidPropertySet;\n    ksProp.Id = property;\n    ksProp.Flags = KSPROPERTY_TYPE_GET;\n\n    result = WdmSyncIoctl(\n        handle,\n        IOCTL_KS_PROPERTY,\n        &ksProp,\n        sizeof(KSPROPERTY),\n        NULL,\n        0,\n        &multipleItemSize);\n    if( result != paNoError )\n    {\n        return result;\n    }\n\n    *ksMultipleItem = (KSMULTIPLE_ITEM*)PaUtil_AllocateMemory( multipleItemSize );\n    if( !*ksMultipleItem )\n    {\n        return paInsufficientMemory;\n    }\n\n    result = WdmSyncIoctl(\n        handle,\n        IOCTL_KS_PROPERTY,\n        &ksProp,\n        sizeof(KSPROPERTY),\n        (void*)*ksMultipleItem,\n        multipleItemSize,\n        NULL);\n\n    if( result != paNoError )\n    {\n        PaUtil_FreeMemory( ksMultipleItem );\n    }\n\n    return result;\n}\n\nstatic PaError WdmSetMuxNodeProperty(HANDLE handle,\n                                     ULONG nodeId,\n                                     ULONG pinId)\n{\n    PaError result = paNoError;\n    KSNODEPROPERTY prop;\n    prop.Property.Set = KSPROPSETID_Audio;\n    prop.Property.Id = KSPROPERTY_AUDIO_MUX_SOURCE;\n    prop.Property.Flags = KSPROPERTY_TYPE_SET | KSPROPERTY_TYPE_TOPOLOGY;\n    prop.NodeId = nodeId;\n    prop.Reserved = 0;\n\n    result = WdmSyncIoctl(handle, IOCTL_KS_PROPERTY, &prop, sizeof(KSNODEPROPERTY), &pinId, sizeof(ULONG), NULL);\n\n    return result;\n}\n\n/* Used when traversing topology for outputs */\nstatic const KSTOPOLOGY_CONNECTION* GetConnectionTo(const KSTOPOLOGY_CONNECTION* pFrom, PaWinWdmFilter* filter, int muxIdx)\n{\n    unsigned i;\n    const KSTOPOLOGY_CONNECTION* retval = NULL;\n    const KSTOPOLOGY_CONNECTION* connections = (const KSTOPOLOGY_CONNECTION*)(filter->connections + 1);\n    (void)muxIdx;\n    PA_DEBUG((\"GetConnectionTo: Checking %u connections... (pFrom = %p)\", filter->connections->Count, pFrom));\n    for (i = 0; i < filter->connections->Count; ++i)\n    {\n        const KSTOPOLOGY_CONNECTION* pConn = connections + i;\n        if (pConn == pFrom)\n            continue;\n\n        if (pConn->FromNode == pFrom->ToNode)\n        {\n            retval = pConn;\n            break;\n        }\n    }\n    PA_DEBUG((\"GetConnectionTo: Returning %p\\n\", retval));\n    return retval;\n}\n\n/* Used when traversing topology for inputs */\nstatic const KSTOPOLOGY_CONNECTION* GetConnectionFrom(const KSTOPOLOGY_CONNECTION* pTo, PaWinWdmFilter* filter, int muxIdx)\n{\n    unsigned i;\n    const KSTOPOLOGY_CONNECTION* retval = NULL;\n    const KSTOPOLOGY_CONNECTION* connections = (const KSTOPOLOGY_CONNECTION*)(filter->connections + 1);\n    int muxCntr = 0;\n    PA_DEBUG((\"GetConnectionFrom: Checking %u connections... (pTo = %p)\\n\", filter->connections->Count, pTo));\n    for (i = 0; i < filter->connections->Count; ++i)\n    {\n        const KSTOPOLOGY_CONNECTION* pConn = connections + i;\n        if (pConn == pTo)\n            continue;\n\n        if (pConn->ToNode == pTo->FromNode)\n        {\n            if (muxIdx >= 0)\n            {\n                if (muxCntr < muxIdx)\n                {\n                    ++muxCntr;\n                    continue;\n                }\n            }\n            retval = pConn;\n            break;\n        }\n    }\n    PA_DEBUG((\"GetConnectionFrom: Returning %p\\n\", retval));\n    return retval;\n}\n\nstatic ULONG GetNumberOfConnectionsTo(const KSTOPOLOGY_CONNECTION* pTo, PaWinWdmFilter* filter)\n{\n    ULONG retval = 0;\n    unsigned i;\n    const KSTOPOLOGY_CONNECTION* connections = (const KSTOPOLOGY_CONNECTION*)(filter->connections + 1);\n    PA_DEBUG((\"GetNumberOfConnectionsTo: Checking %u connections...\\n\", filter->connections->Count));\n    for (i = 0; i < filter->connections->Count; ++i)\n    {\n        const KSTOPOLOGY_CONNECTION* pConn = connections + i;\n        if (pConn->ToNode == pTo->FromNode &&\n            (pTo->FromNode != KSFILTER_NODE || pConn->ToNodePin == pTo->FromNodePin))\n        {\n            ++retval;\n        }\n    }\n    PA_DEBUG((\"GetNumberOfConnectionsTo: Returning %d\\n\", retval));\n    return retval;\n}\n\ntypedef const KSTOPOLOGY_CONNECTION *(*TFnGetConnection)(const KSTOPOLOGY_CONNECTION*, PaWinWdmFilter*, int);\n\nstatic const KSTOPOLOGY_CONNECTION* FindStartConnectionFrom(ULONG startPin, PaWinWdmFilter* filter)\n{\n    unsigned i;\n    const KSTOPOLOGY_CONNECTION* connections = (const KSTOPOLOGY_CONNECTION*)(filter->connections + 1);\n    PA_DEBUG((\"FindStartConnectionFrom: Startpin %u, Checking %u connections...\\n\", startPin, filter->connections->Count));\n    for (i = 0; i < filter->connections->Count; ++i)\n    {\n        const KSTOPOLOGY_CONNECTION* pConn = connections + i;\n        if (pConn->ToNode == KSFILTER_NODE && pConn->ToNodePin == startPin)\n        {\n            PA_DEBUG((\"FindStartConnectionFrom: returning %p\\n\", pConn));\n            return pConn;\n        }\n    }\n\n    /* Some devices may report topologies that leave pins unconnected. This may be by design or driver installation\n       issues. Pass the error condition back to caller. */\n    PA_DEBUG((\"FindStartConnectionFrom: returning NULL\\n\"));\n    return 0;\n}\n\nstatic const KSTOPOLOGY_CONNECTION* FindStartConnectionTo(ULONG startPin, PaWinWdmFilter* filter)\n{\n    unsigned i;\n    const KSTOPOLOGY_CONNECTION* connections = (const KSTOPOLOGY_CONNECTION*)(filter->connections + 1);\n    PA_DEBUG((\"FindStartConnectionTo: Startpin %u, Checking %u connections...\\n\", startPin, filter->connections->Count));\n    for (i = 0; i < filter->connections->Count; ++i)\n    {\n        const KSTOPOLOGY_CONNECTION* pConn = connections + i;\n        if (pConn->FromNode == KSFILTER_NODE && pConn->FromNodePin == startPin)\n        {\n            PA_DEBUG((\"FindStartConnectionTo: returning %p\\n\", pConn));\n            return pConn;\n        }\n    }\n\n    /* Unconnected pin. Inform caller. */\n    PA_DEBUG((\"FindStartConnectionTo: returning NULL\\n\"));\n    return 0;\n}\n\nstatic ULONG GetConnectedPin(ULONG startPin, BOOL forward, PaWinWdmFilter* filter, int muxPosition, ULONG *muxInputPinId, ULONG *muxNodeId)\n{\n    int limit=1000;\n    const KSTOPOLOGY_CONNECTION *conn = NULL;\n    TFnGetConnection fnGetConnection = forward ? GetConnectionTo : GetConnectionFrom ;\n    PA_LOGE_;\n    while (1)\n    {\n        limit--;\n        if (limit == 0) {\n            PA_DEBUG((\"GetConnectedPin: LOOP LIMIT REACHED\\n\"));\n            break;\n        }\n\n        if (conn == NULL)\n        {\n            conn = forward ? FindStartConnectionTo(startPin, filter) : FindStartConnectionFrom(startPin, filter);\n        }\n        else\n        {\n            conn = fnGetConnection(conn, filter, -1);\n        }\n\n        /* Handling case of erroneous connection list */\n        if (conn == NULL)\n        {\n            break;\n        }\n\n        if (forward ? conn->ToNode == KSFILTER_NODE : conn->FromNode == KSFILTER_NODE)\n        {\n            return forward ? conn->ToNodePin : conn->FromNodePin;\n        }\n        else\n        {\n            PA_DEBUG((\"GetConnectedPin: count=%d, forward=%d, muxPosition=%d\\n\", filter->nodes->Count, forward, muxPosition));\n            if (filter->nodes->Count > 0 && !forward && muxPosition >= 0)\n            {\n                const GUID* nodes = (const GUID*)(filter->nodes + 1);\n                if (IsEqualGUID(&nodes[conn->FromNode], &KSNODETYPE_MUX))\n                {\n                    ULONG nConn = GetNumberOfConnectionsTo(conn, filter);\n                    conn = fnGetConnection(conn, filter, muxPosition);\n                    if (conn == NULL)\n                    {\n                        break;\n                    }\n                    if (muxInputPinId != 0)\n                    {\n                        *muxInputPinId = conn->ToNodePin;\n                    }\n                    if (muxNodeId != 0)\n                    {\n                        *muxNodeId = conn->ToNode;\n                    }\n                }\n            }\n        }\n    }\n    PA_LOGL_;\n    return KSFILTER_NODE;\n}\n\nstatic void DumpConnectionsAndNodes(PaWinWdmFilter* filter)\n{\n    unsigned i;\n    const KSTOPOLOGY_CONNECTION* connections = (const KSTOPOLOGY_CONNECTION*)(filter->connections + 1);\n    const GUID* nodes = (const GUID*)(filter->nodes + 1);\n\n    PA_LOGE_;\n    PA_DEBUG((\"DumpConnectionsAndNodes: connections=%d, nodes=%d\\n\", filter->connections->Count, filter->nodes->Count));\n\n    for (i=0; i < filter->connections->Count; ++i)\n    {\n        const KSTOPOLOGY_CONNECTION* pConn = connections + i;\n        PA_DEBUG((\"  Connection: %u - FromNode=%u,FromPin=%u -> ToNode=%u,ToPin=%u\\n\",\n            i,\n            pConn->FromNode, pConn->FromNodePin,\n            pConn->ToNode, pConn->ToNodePin\n            ));\n    }\n\n    for (i=0; i < filter->nodes->Count; ++i)\n    {\n        const GUID* pConn = nodes + i;\n        PA_DEBUG((\"  Node: %d - {%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}\\n\",\n            i,\n            pConn->Data1, pConn->Data2, pConn->Data3,\n            pConn->Data4[0], pConn->Data4[1],\n            pConn->Data4[2], pConn->Data4[3],\n            pConn->Data4[4], pConn->Data4[5],\n            pConn->Data4[6], pConn->Data4[7]\n        ));\n    }\n    PA_LOGL_;\n\n}\n\ntypedef struct __PaUsbTerminalGUIDToName\n{\n    USHORT     usbGUID;\n    wchar_t    name[64];\n} PaUsbTerminalGUIDToName;\n\nstatic const PaUsbTerminalGUIDToName kNames[] =\n{\n    /* Types copied from: http://msdn.microsoft.com/en-us/library/ff537742(v=vs.85).aspx */\n    /* Input terminal types */\n    { 0x0201, L\"Microphone\" },\n    { 0x0202, L\"Desktop Microphone\" },\n    { 0x0203, L\"Personal Microphone\" },\n    { 0x0204, L\"Omni Directional Microphone\" },\n    { 0x0205, L\"Microphone Array\" },\n    { 0x0206, L\"Processing Microphone Array\" },\n    /* Output terminal types */\n    { 0x0301, L\"Speakers\" },\n    { 0x0302, L\"Headphones\" },\n    { 0x0303, L\"Head Mounted Display Audio\" },\n    { 0x0304, L\"Desktop Speaker\" },\n    { 0x0305, L\"Room Speaker\" },\n    { 0x0306, L\"Communication Speaker\" },\n    { 0x0307, L\"LFE Speakers\" },\n    /* External terminal types */\n    { 0x0601, L\"Analog\" },\n    { 0x0602, L\"Digital\" },\n    { 0x0603, L\"Line\" },\n    { 0x0604, L\"Audio\" },\n    { 0x0605, L\"SPDIF\" },\n};\n\nstatic const unsigned kNamesCnt = sizeof(kNames)/sizeof(PaUsbTerminalGUIDToName);\n\nstatic int PaUsbTerminalGUIDToNameCmp(const void* lhs, const void* rhs)\n{\n    const PaUsbTerminalGUIDToName* pL = (const PaUsbTerminalGUIDToName*)lhs;\n    const PaUsbTerminalGUIDToName* pR = (const PaUsbTerminalGUIDToName*)rhs;\n    return ((int)(pL->usbGUID) - (int)(pR->usbGUID));\n}\n\nstatic PaError GetNameFromCategory(const GUID* pGUID, BOOL input, wchar_t* name, unsigned length)\n{\n    PaError result = paUnanticipatedHostError;\n    USHORT usbTerminalGUID = (USHORT)(pGUID->Data1 - 0xDFF219E0);\n\n    PA_LOGE_;\n    if (input && usbTerminalGUID >= 0x301 && usbTerminalGUID < 0x400)\n    {\n        /* Output terminal name for an input !? Set it to Line! */\n        usbTerminalGUID = 0x603;\n    }\n    if (!input && usbTerminalGUID >= 0x201 && usbTerminalGUID < 0x300)\n    {\n        /* Input terminal name for an output !? Set it to Line! */\n        usbTerminalGUID = 0x603;\n    }\n    if (usbTerminalGUID >= 0x201 && usbTerminalGUID < 0x713)\n    {\n        PaUsbTerminalGUIDToName s = { usbTerminalGUID };\n        const PaUsbTerminalGUIDToName* ptr = bsearch(\n            &s,\n            kNames,\n            kNamesCnt,\n            sizeof(PaUsbTerminalGUIDToName),\n            PaUsbTerminalGUIDToNameCmp\n            );\n        if (ptr != 0)\n        {\n            PA_DEBUG((\"GetNameFromCategory: USB GUID %04X -> '%S'\\n\", usbTerminalGUID, ptr->name));\n\n            if (name != NULL && length > 0)\n            {\n                int n = _snwprintf(name, length, L\"%s\", ptr->name);\n                if (usbTerminalGUID >= 0x601 && usbTerminalGUID < 0x700)\n                {\n                    _snwprintf(name + n, length - n, L\" %s\", (input ? L\"In\":L\"Out\"));\n                }\n            }\n            result = paNoError;\n        }\n    }\n    else\n    {\n        PaWinWDM_SetLastErrorInfo(result, \"GetNameFromCategory: usbTerminalGUID = %04X \", usbTerminalGUID);\n    }\n    PA_LOGL_;\n    return result;\n}\n\nstatic BOOL IsFrequencyWithinRange(const KSDATARANGE_AUDIO* range, int frequency)\n{\n    if (frequency < (int)range->MinimumSampleFrequency)\n        return FALSE;\n    if (frequency > (int)range->MaximumSampleFrequency)\n        return FALSE;\n    return TRUE;\n}\n\nstatic BOOL IsBitsWithinRange(const KSDATARANGE_AUDIO* range, int noOfBits)\n{\n    if (noOfBits < (int)range->MinimumBitsPerSample)\n        return FALSE;\n    if (noOfBits > (int)range->MaximumBitsPerSample)\n        return FALSE;\n    return TRUE;\n}\n\n/* Note: Somewhat different order compared to WMME implementation, as we want to focus on fidelity first */\nstatic const int defaultSampleRateSearchOrder[] =\n{ 44100, 48000, 88200, 96000, 192000, 32000, 24000, 22050, 16000, 12000, 11025, 9600, 8000 };\nstatic const int defaultSampleRateSearchOrderCount = sizeof(defaultSampleRateSearchOrder)/sizeof(defaultSampleRateSearchOrder[0]);\n\nstatic int DefaultSampleFrequencyIndex(const KSDATARANGE_AUDIO* range)\n{\n    int i;\n\n    for(i=0; i < defaultSampleRateSearchOrderCount; ++i)\n    {\n        int currentFrequency = defaultSampleRateSearchOrder[i];\n\n        if (IsFrequencyWithinRange(range, currentFrequency))\n        {\n            return i;\n        }\n    }\n\n    return -1;\n}\n\n/*\nCreate a new pin object belonging to a filter\nThe pin object holds all the configuration information about the pin\nbefore it is opened, and then the handle of the pin after is opened\n*/\nstatic PaWinWdmPin* PinNew(PaWinWdmFilter* parentFilter, unsigned long pinId, PaError* error)\n{\n    PaWinWdmPin* pin;\n    PaError result;\n    unsigned long i;\n    KSMULTIPLE_ITEM* item = NULL;\n    KSIDENTIFIER* identifier;\n    KSDATARANGE* dataRange;\n    const ULONG streamingId = (parentFilter->devInfo.streamingType == Type_kWaveRT) ? KSINTERFACE_STANDARD_LOOPED_STREAMING : KSINTERFACE_STANDARD_STREAMING;\n    int defaultSampleRateIndex = defaultSampleRateSearchOrderCount;\n\n    PA_LOGE_;\n    PA_DEBUG((\"PinNew: Creating pin %d:\\n\",pinId));\n\n    /* Allocate the new PIN object */\n    pin = (PaWinWdmPin*)PaUtil_AllocateMemory( sizeof(PaWinWdmPin) );\n    if( !pin )\n    {\n        result = paInsufficientMemory;\n        goto error;\n    }\n\n    /* Zero the pin object */\n    /* memset( (void*)pin, 0, sizeof(PaWinWdmPin) ); */\n\n    pin->parentFilter = parentFilter;\n    pin->pinId = pinId;\n\n    /* Allocate a connect structure */\n    pin->pinConnectSize = sizeof(KSPIN_CONNECT) + sizeof(KSDATAFORMAT_WAVEFORMATEX);\n    pin->pinConnect = (KSPIN_CONNECT*)PaUtil_AllocateMemory( pin->pinConnectSize );\n    if( !pin->pinConnect )\n    {\n        result = paInsufficientMemory;\n        goto error;\n    }\n\n    /* Configure the connect structure with default values */\n    pin->pinConnect->Interface.Set               = KSINTERFACESETID_Standard;\n    pin->pinConnect->Interface.Id                = streamingId;\n    pin->pinConnect->Interface.Flags             = 0;\n    pin->pinConnect->Medium.Set                  = KSMEDIUMSETID_Standard;\n    pin->pinConnect->Medium.Id                   = KSMEDIUM_TYPE_ANYINSTANCE;\n    pin->pinConnect->Medium.Flags                = 0;\n    pin->pinConnect->PinId                       = pinId;\n    pin->pinConnect->PinToHandle                 = NULL;\n    pin->pinConnect->Priority.PriorityClass      = KSPRIORITY_NORMAL;\n    pin->pinConnect->Priority.PrioritySubClass   = 1;\n    pin->ksDataFormatWfx = (KSDATAFORMAT_WAVEFORMATEX*)(pin->pinConnect + 1);\n    pin->ksDataFormatWfx->DataFormat.FormatSize  = sizeof(KSDATAFORMAT_WAVEFORMATEX);\n    pin->ksDataFormatWfx->DataFormat.Flags       = 0;\n    pin->ksDataFormatWfx->DataFormat.Reserved    = 0;\n    pin->ksDataFormatWfx->DataFormat.MajorFormat = KSDATAFORMAT_TYPE_AUDIO;\n    pin->ksDataFormatWfx->DataFormat.SubFormat   = KSDATAFORMAT_SUBTYPE_PCM;\n    pin->ksDataFormatWfx->DataFormat.Specifier   = KSDATAFORMAT_SPECIFIER_WAVEFORMATEX;\n\n    pin->frameSize = 0; /* Unknown until we instantiate pin */\n\n    /* Get the COMMUNICATION property */\n    result = WdmGetPinPropertySimple(\n        parentFilter->handle,\n        pinId,\n        &KSPROPSETID_Pin,\n        KSPROPERTY_PIN_COMMUNICATION,\n        &pin->communication,\n        sizeof(KSPIN_COMMUNICATION),\n        NULL);\n    if( result != paNoError )\n        goto error;\n\n    if( /*(pin->communication != KSPIN_COMMUNICATION_SOURCE) &&*/\n        (pin->communication != KSPIN_COMMUNICATION_SINK) &&\n        (pin->communication != KSPIN_COMMUNICATION_BOTH) )\n    {\n        PA_DEBUG((\"PinNew: Not source/sink\\n\"));\n        result = paInvalidDevice;\n        goto error;\n    }\n\n    /* Get dataflow information */\n    result = WdmGetPinPropertySimple(\n        parentFilter->handle,\n        pinId,\n        &KSPROPSETID_Pin,\n        KSPROPERTY_PIN_DATAFLOW,\n        &pin->dataFlow,\n        sizeof(KSPIN_DATAFLOW),\n        NULL);\n\n    if( result != paNoError )\n        goto error;\n\n    /* Get the INTERFACE property list */\n    result = WdmGetPinPropertyMulti(\n        parentFilter->handle,\n        pinId,\n        &KSPROPSETID_Pin,\n        KSPROPERTY_PIN_INTERFACES,\n        &item);\n\n    if( result != paNoError )\n        goto error;\n\n    identifier = (KSIDENTIFIER*)(item+1);\n\n    /* Check that at least one interface is STANDARD_STREAMING */\n    result = paUnanticipatedHostError;\n    for( i = 0; i < item->Count; i++ )\n    {\n        if( IsEqualGUID(&identifier[i].Set, &KSINTERFACESETID_Standard) && ( identifier[i].Id == streamingId ) )\n        {\n            result = paNoError;\n            break;\n        }\n    }\n\n    if( result != paNoError )\n    {\n        PA_DEBUG((\"PinNew: No %s streaming\\n\", streamingId==KSINTERFACE_STANDARD_LOOPED_STREAMING?\"looped\":\"standard\"));\n        goto error;\n    }\n\n    /* Don't need interfaces any more */\n    PaUtil_FreeMemory( item );\n    item = NULL;\n\n    /* Get the MEDIUM properties list */\n    result = WdmGetPinPropertyMulti(\n        parentFilter->handle,\n        pinId,\n        &KSPROPSETID_Pin,\n        KSPROPERTY_PIN_MEDIUMS,\n        &item);\n\n    if( result != paNoError )\n        goto error;\n\n    identifier = (KSIDENTIFIER*)(item+1); /* Not actually necessary... */\n\n    /* Check that at least one medium is STANDARD_DEVIO */\n    result = paUnanticipatedHostError;\n    for( i = 0; i < item->Count; i++ )\n    {\n        if( IsEqualGUID(&identifier[i].Set, &KSMEDIUMSETID_Standard) && ( identifier[i].Id == KSMEDIUM_STANDARD_DEVIO ) )\n        {\n            result = paNoError;\n            break;\n        }\n    }\n\n    if( result != paNoError )\n    {\n        PA_DEBUG((\"No standard devio\\n\"));\n        goto error;\n    }\n    /* Don't need mediums any more */\n    PaUtil_FreeMemory( item );\n    item = NULL;\n\n    /* Get DATARANGES */\n    result = WdmGetPinPropertyMulti(\n        parentFilter->handle,\n        pinId,\n        &KSPROPSETID_Pin,\n        KSPROPERTY_PIN_DATARANGES,\n        &pin->dataRangesItem);\n\n    if( result != paNoError )\n        goto error;\n\n    pin->dataRanges = (KSDATARANGE*)(pin->dataRangesItem +1);\n\n    /* Check that at least one datarange supports audio */\n    result = paUnanticipatedHostError;\n    dataRange = pin->dataRanges;\n    pin->maxChannels = 0;\n    pin->defaultSampleRate = 0;\n    pin->formats = 0;\n    PA_DEBUG((\"PinNew: Checking %u no of dataranges...\\n\", pin->dataRangesItem->Count));\n    for( i = 0; i < pin->dataRangesItem->Count; i++)\n    {\n        PA_DEBUG((\"PinNew: DR major format %x\\n\",*(unsigned long*)(&(dataRange->MajorFormat))));\n        /* Check that subformat is WAVEFORMATEX, PCM or WILDCARD */\n        if( IS_VALID_WAVEFORMATEX_GUID(&dataRange->SubFormat) ||\n            IsEqualGUID(&dataRange->SubFormat, &KSDATAFORMAT_SUBTYPE_PCM) ||\n            IsEqualGUID(&dataRange->SubFormat, &KSDATAFORMAT_SUBTYPE_IEEE_FLOAT) ||\n            IsEqualGUID(&dataRange->SubFormat, &KSDATAFORMAT_SUBTYPE_WILDCARD) ||\n            IsEqualGUID(&dataRange->MajorFormat, &KSDATAFORMAT_TYPE_AUDIO) )\n        {\n            int defaultIndex;\n            result = paNoError;\n            /* Record the maximum possible channels with this pin */\n            if( ((KSDATARANGE_AUDIO*)dataRange)->MaximumChannels == (ULONG) -1 )\n            {\n                pin->maxChannels = MAXIMUM_NUMBER_OF_CHANNELS;\n            }\n            else if( (int) ((KSDATARANGE_AUDIO*)dataRange)->MaximumChannels > pin->maxChannels )\n            {\n                pin->maxChannels = (int) ((KSDATARANGE_AUDIO*)dataRange)->MaximumChannels;\n            }\n            PA_DEBUG((\"PinNew: MaxChannel: %d\\n\",pin->maxChannels));\n\n            /* Record the formats (bit depths) that are supported */\n            if( IsBitsWithinRange((KSDATARANGE_AUDIO*)dataRange, 8) )\n            {\n                pin->formats |= paInt8;\n                PA_DEBUG((\"PinNew: Format PCM 8 bit supported\\n\"));\n            }\n            if( IsBitsWithinRange((KSDATARANGE_AUDIO*)dataRange, 16) )\n            {\n                pin->formats |= paInt16;\n                PA_DEBUG((\"PinNew: Format PCM 16 bit supported\\n\"));\n            }\n            if( IsBitsWithinRange((KSDATARANGE_AUDIO*)dataRange, 24) )\n            {\n                pin->formats |= paInt24;\n                PA_DEBUG((\"PinNew: Format PCM 24 bit supported\\n\"));\n            }\n            if( IsBitsWithinRange((KSDATARANGE_AUDIO*)dataRange, 32) )\n            {\n                if (IsEqualGUID(&dataRange->SubFormat, &KSDATAFORMAT_SUBTYPE_IEEE_FLOAT))\n                {\n                    pin->formats |= paFloat32;\n                    PA_DEBUG((\"PinNew: Format IEEE float 32 bit supported\\n\"));\n                }\n                else\n                {\n                    pin->formats |= paInt32;\n                    PA_DEBUG((\"PinNew: Format PCM 32 bit supported\\n\"));\n                }\n            }\n\n            defaultIndex = DefaultSampleFrequencyIndex((KSDATARANGE_AUDIO*)dataRange);\n            if (defaultIndex >= 0 && defaultIndex < defaultSampleRateIndex)\n            {\n                defaultSampleRateIndex = defaultIndex;\n            }\n        }\n        dataRange = (KSDATARANGE*)( ((char*)dataRange) + dataRange->FormatSize);\n    }\n\n    if( result != paNoError )\n        goto error;\n\n    /* If none of the frequencies searched for are present, there's something seriously wrong */\n    if (defaultSampleRateIndex == defaultSampleRateSearchOrderCount)\n    {\n        PA_DEBUG((\"PinNew: No default sample rate found, skipping pin!\\n\"));\n        PaWinWDM_SetLastErrorInfo(paUnanticipatedHostError, \"PinNew: No default sample rate found\");\n        result = paUnanticipatedHostError;\n        goto error;\n    }\n\n    /* Set the default sample rate */\n    pin->defaultSampleRate = defaultSampleRateSearchOrder[defaultSampleRateIndex];\n    PA_DEBUG((\"PinNew: Default sample rate = %d Hz\\n\", pin->defaultSampleRate));\n\n    /* Get instance information */\n    result = WdmGetPinPropertySimple(\n        parentFilter->handle,\n        pinId,\n        &KSPROPSETID_Pin,\n        KSPROPERTY_PIN_CINSTANCES,\n        &pin->instances,\n        sizeof(KSPIN_CINSTANCES),\n        NULL);\n\n    if( result != paNoError )\n        goto error;\n\n    /* If WaveRT, check if pin supports notification mode */\n    if (parentFilter->devInfo.streamingType == Type_kWaveRT)\n    {\n        BOOL bSupportsNotification = FALSE;\n        if (PinQueryNotificationSupport(pin, &bSupportsNotification) == paNoError)\n        {\n            pin->pinKsSubType = bSupportsNotification ? SubType_kNotification : SubType_kPolled;\n        }\n    }\n\n    /* Query pin name (which means we need to traverse to non IRP pin, via physical connection to topology filter pin, through\n    its nodes to the endpoint pin, and get that ones name... phew...) */\n    PA_DEBUG((\"PinNew: Finding topology pin...\\n\"));\n\n    {\n        ULONG topoPinId = GetConnectedPin(pinId, (pin->dataFlow == KSPIN_DATAFLOW_IN), parentFilter, -1, NULL, NULL);\n        const wchar_t kInputName[] = L\"Input\";\n        const wchar_t kOutputName[] = L\"Output\";\n\n        if (topoPinId != KSFILTER_NODE)\n        {\n            /* Get physical connection for topo pin */\n            unsigned long cbBytes = 0;\n            PA_DEBUG((\"PinNew: Getting physical connection...\\n\"));\n            result = WdmGetPinPropertySimple(parentFilter->handle,\n                topoPinId,\n                &KSPROPSETID_Pin,\n                KSPROPERTY_PIN_PHYSICALCONNECTION,\n                0,\n                0,\n                &cbBytes\n                );\n\n            if (result != paNoError)\n            {\n                /* No physical connection -> there is no topology filter! So we get the name of the pin! */\n                PA_DEBUG((\"PinNew: No physical connection! Getting the pin name\\n\"));\n                result = WdmGetPinPropertySimple(parentFilter->handle,\n                    topoPinId,\n                    &KSPROPSETID_Pin,\n                    KSPROPERTY_PIN_NAME,\n                    pin->friendlyName,\n                    MAX_PATH,\n                    NULL);\n                if (result != paNoError)\n                {\n                    GUID category = {0};\n\n                    /* Get pin category information */\n                    result = WdmGetPinPropertySimple(parentFilter->handle,\n                        topoPinId,\n                        &KSPROPSETID_Pin,\n                        KSPROPERTY_PIN_CATEGORY,\n                        &category,\n                        sizeof(GUID),\n                        NULL);\n\n                    if (result == paNoError)\n                    {\n                        result = GetNameFromCategory(&category, (pin->dataFlow == KSPIN_DATAFLOW_OUT), pin->friendlyName, MAX_PATH);\n                    }\n                }\n\n                /* Make sure pin gets a name here... */\n                if (wcslen(pin->friendlyName) == 0)\n                {\n                    wcscpy(pin->friendlyName, (pin->dataFlow == KSPIN_DATAFLOW_IN) ? kOutputName : kInputName);\n#ifdef UNICODE\n                    PA_DEBUG((\"PinNew: Setting pin friendly name to '%s'\\n\", pin->friendlyName));\n#else\n                    PA_DEBUG((\"PinNew: Setting pin friendly name to '%S'\\n\", pin->friendlyName));\n#endif\n                }\n\n                /* This is then == the endpoint pin */\n                pin->endpointPinId = (pin->dataFlow == KSPIN_DATAFLOW_IN) ? pinId : topoPinId;\n            }\n            else\n            {\n                KSPIN_PHYSICALCONNECTION* pc = (KSPIN_PHYSICALCONNECTION*)PaUtil_AllocateMemory(cbBytes + 2);\n                ULONG pcPin;\n                wchar_t symbLinkName[MAX_PATH];\n                PA_DEBUG((\"PinNew: Physical connection found!\\n\"));\n                if (pc == NULL)\n                {\n                    result = paInsufficientMemory;\n                    goto error;\n                }\n                result = WdmGetPinPropertySimple(parentFilter->handle,\n                    topoPinId,\n                    &KSPROPSETID_Pin,\n                    KSPROPERTY_PIN_PHYSICALCONNECTION,\n                    pc,\n                    cbBytes,\n                    NULL\n                    );\n\n                pcPin = pc->Pin;\n                wcsncpy(symbLinkName, pc->SymbolicLinkName, MAX_PATH);\n                PaUtil_FreeMemory( pc );\n\n                if (result != paNoError)\n                {\n                    /* Shouldn't happen, but fail if it does */\n                    PA_DEBUG((\"PinNew: failed to retrieve physical connection!\\n\"));\n                    goto error;\n                }\n\n                if (symbLinkName[1] == TEXT('?'))\n                {\n                    symbLinkName[1] = TEXT('\\\\');\n                }\n\n                if (pin->parentFilter->topologyFilter == NULL)\n                {\n                    PA_DEBUG((\"PinNew: Creating topology filter '%S'\\n\", symbLinkName));\n\n                    pin->parentFilter->topologyFilter = FilterNew(Type_kNotUsed, 0, symbLinkName, L\"\", &result);\n                    if (pin->parentFilter->topologyFilter == NULL)\n                    {\n                        PA_DEBUG((\"PinNew: Failed creating topology filter\\n\"));\n                        result = paUnanticipatedHostError;\n                        PaWinWDM_SetLastErrorInfo(result, \"Failed to create topology filter '%S'\", symbLinkName);\n                        goto error;\n                    }\n\n                    /* Copy info so we have it in device info */\n                    wcsncpy(pin->parentFilter->devInfo.topologyPath, symbLinkName, MAX_PATH);\n                }\n                else\n                {\n                    /* Must be the same */\n                    assert(wcscmp(symbLinkName, pin->parentFilter->topologyFilter->devInfo.filterPath) == 0);\n                }\n\n                PA_DEBUG((\"PinNew: Opening topology filter...\"));\n\n                result = FilterUse(pin->parentFilter->topologyFilter);\n                if (result == paNoError)\n                {\n                    unsigned long endpointPinId;\n\n                    if (pin->dataFlow == KSPIN_DATAFLOW_IN)\n                    {\n                        /* The \"endpointPinId\" is what WASAPI looks at for pin names */\n                        GUID category = {0};\n\n                        PA_DEBUG((\"PinNew: Checking for output endpoint pin id...\\n\"));\n\n                        endpointPinId = GetConnectedPin(pcPin, TRUE, pin->parentFilter->topologyFilter, -1, NULL, NULL);\n\n                        if (endpointPinId == KSFILTER_NODE)\n                        {\n                            result = paUnanticipatedHostError;\n                            PaWinWDM_SetLastErrorInfo(result, \"Failed to get endpoint pin ID on topology filter!\");\n                            goto error;\n                        }\n\n                        PA_DEBUG((\"PinNew: Found endpoint pin id %u\\n\", endpointPinId));\n\n                        /* Get pin category information */\n                        result = WdmGetPinPropertySimple(pin->parentFilter->topologyFilter->handle,\n                            endpointPinId,\n                            &KSPROPSETID_Pin,\n                            KSPROPERTY_PIN_CATEGORY,\n                            &category,\n                            sizeof(GUID),\n                            NULL);\n\n                        if (result == paNoError)\n                        {\n#if !PA_WDMKS_USE_CATEGORY_FOR_PIN_NAMES\n                            wchar_t pinName[MAX_PATH];\n\n                            PA_DEBUG((\"PinNew: Getting pin name property...\"));\n\n                            /* Ok, try pin name also, and favor that if available */\n                            result = WdmGetPinPropertySimple(pin->parentFilter->topologyFilter->handle,\n                                endpointPinId,\n                                &KSPROPSETID_Pin,\n                                KSPROPERTY_PIN_NAME,\n                                pinName,\n                                MAX_PATH,\n                                NULL);\n\n                            if (result == paNoError && wcslen(pinName)>0)\n                            {\n                                wcsncpy(pin->friendlyName, pinName, MAX_PATH);\n                            }\n                            else\n#endif\n                            {\n                                result = GetNameFromCategory(&category, (pin->dataFlow == KSPIN_DATAFLOW_OUT), pin->friendlyName, MAX_PATH);\n                            }\n                        }\n\n                        /* Make sure we get a name for the pin */\n                        if (wcslen(pin->friendlyName) == 0)\n                        {\n                            wcscpy(pin->friendlyName, kOutputName);\n                        }\n#ifdef UNICODE\n                        PA_DEBUG((\"PinNew: Pin name '%s'\\n\", pin->friendlyName));\n#else\n                        PA_DEBUG((\"PinNew: Pin name '%S'\\n\", pin->friendlyName));\n#endif\n\n                        /* Set endpoint pin ID (this is the topology INPUT pin, since portmixer will always traverse the\n                        filter in audio streaming direction, see http://msdn.microsoft.com/en-us/library/windows/hardware/ff536331(v=vs.85).aspx\n                        for more information)\n                        */\n                        pin->endpointPinId = pcPin;\n                    }\n                    else\n                    {\n                        unsigned muxCount = 0;\n                        int muxPos = 0;\n                        /* Max 64 multiplexer inputs... sanity check :) */\n                        for (i = 0; i < 64; ++i)\n                        {\n                            ULONG muxNodeIdTest = (unsigned)-1;\n                            PA_DEBUG((\"PinNew: Checking for input endpoint pin id (%d)...\\n\", i));\n\n                            endpointPinId = GetConnectedPin(pcPin,\n                                FALSE,\n                                pin->parentFilter->topologyFilter,\n                                (int)i,\n                                NULL,\n                                &muxNodeIdTest);\n\n                            if (endpointPinId == KSFILTER_NODE)\n                            {\n                                /* We're done */\n                                PA_DEBUG((\"PinNew: Done with inputs.\\n\", endpointPinId));\n                                break;\n                            }\n                            else\n                            {\n                                /* The \"endpointPinId\" is what WASAPI looks at for pin names */\n                                GUID category = {0};\n\n                                PA_DEBUG((\"PinNew: Found endpoint pin id %u\\n\", endpointPinId));\n\n                                /* Get pin category information */\n                                result = WdmGetPinPropertySimple(pin->parentFilter->topologyFilter->handle,\n                                    endpointPinId,\n                                    &KSPROPSETID_Pin,\n                                    KSPROPERTY_PIN_CATEGORY,\n                                    &category,\n                                    sizeof(GUID),\n                                    NULL);\n\n                                if (result == paNoError)\n                                {\n                                    if (muxNodeIdTest == (unsigned)-1)\n                                    {\n                                        /* Ok, try pin name, and favor that if available */\n                                        result = WdmGetPinPropertySimple(pin->parentFilter->topologyFilter->handle,\n                                            endpointPinId,\n                                            &KSPROPSETID_Pin,\n                                            KSPROPERTY_PIN_NAME,\n                                            pin->friendlyName,\n                                            MAX_PATH,\n                                            NULL);\n\n                                        if (result != paNoError)\n                                        {\n                                            result = GetNameFromCategory(&category, TRUE, pin->friendlyName, MAX_PATH);\n                                        }\n                                        break;\n                                    }\n                                    else\n                                    {\n                                        result = GetNameFromCategory(&category, TRUE, NULL, 0);\n\n                                        if (result == paNoError)\n                                        {\n                                            ++muxCount;\n                                        }\n                                    }\n                                }\n                                else\n                                {\n                                    PA_DEBUG((\"PinNew: Failed to get pin category\"));\n                                }\n                            }\n                        }\n\n                        if (muxCount == 0)\n                        {\n                            pin->endpointPinId = endpointPinId;\n                            /* Make sure we get a name for the pin */\n                            if (wcslen(pin->friendlyName) == 0)\n                            {\n                                wcscpy(pin->friendlyName, kInputName);\n                            }\n#ifdef UNICODE\n                            PA_DEBUG((\"PinNew: Input friendly name '%s'\\n\", pin->friendlyName));\n#else\n                            PA_DEBUG((\"PinNew: Input friendly name '%S'\\n\", pin->friendlyName));\n#endif\n                        }\n                        else // muxCount > 0\n                        {\n                            PA_DEBUG((\"PinNew: Setting up %u inputs\\n\", muxCount));\n\n                            /* Now we redo the operation once known how many multiplexer positions there are */\n                            pin->inputs = (PaWinWdmMuxedInput**)PaUtil_AllocateMemory(muxCount * sizeof(PaWinWdmMuxedInput*));\n                            if (pin->inputs == NULL)\n                            {\n                                FilterRelease(pin->parentFilter->topologyFilter);\n                                result = paInsufficientMemory;\n                                goto error;\n                            }\n                            pin->inputCount = muxCount;\n\n                            for (i = 0; i < muxCount; ++muxPos)\n                            {\n                                PA_DEBUG((\"PinNew: Setting up input %u...\\n\", i));\n\n                                if (pin->inputs[i] == NULL)\n                                {\n                                    pin->inputs[i] = (PaWinWdmMuxedInput*)PaUtil_AllocateMemory(sizeof(PaWinWdmMuxedInput));\n                                    if (pin->inputs[i] == NULL)\n                                    {\n                                        FilterRelease(pin->parentFilter->topologyFilter);\n                                        result = paInsufficientMemory;\n                                        goto error;\n                                    }\n                                }\n\n                                endpointPinId = GetConnectedPin(pcPin,\n                                    FALSE,\n                                    pin->parentFilter->topologyFilter,\n                                    muxPos,\n                                    &pin->inputs[i]->muxPinId,\n                                    &pin->inputs[i]->muxNodeId);\n\n                                if (endpointPinId != KSFILTER_NODE)\n                                {\n                                    /* The \"endpointPinId\" is what WASAPI looks at for pin names */\n                                    GUID category = {0};\n\n                                    /* Set input endpoint ID */\n                                    pin->inputs[i]->endpointPinId = endpointPinId;\n\n                                    /* Get pin category information */\n                                    result = WdmGetPinPropertySimple(pin->parentFilter->topologyFilter->handle,\n                                        endpointPinId,\n                                        &KSPROPSETID_Pin,\n                                        KSPROPERTY_PIN_CATEGORY,\n                                        &category,\n                                        sizeof(GUID),\n                                        NULL);\n\n                                    if (result == paNoError)\n                                    {\n                                        /* Try pin name first, and if that is not defined, use category instead */\n                                        result = WdmGetPinPropertySimple(pin->parentFilter->topologyFilter->handle,\n                                            endpointPinId,\n                                            &KSPROPSETID_Pin,\n                                            KSPROPERTY_PIN_NAME,\n                                            pin->inputs[i]->friendlyName,\n                                            MAX_PATH,\n                                            NULL);\n\n                                        if (result != paNoError)\n                                        {\n                                            result = GetNameFromCategory(&category, TRUE, pin->inputs[i]->friendlyName, MAX_PATH);\n                                            if (result != paNoError)\n                                            {\n                                                /* Only specify name, let name hash in ScanDeviceInfos fix postfix enumerators */\n                                                wcscpy(pin->inputs[i]->friendlyName, kInputName);\n                                            }\n                                        }\n#ifdef UNICODE\n                                        PA_DEBUG((\"PinNew: Input (%u) friendly name '%s'\\n\", i, pin->inputs[i]->friendlyName));\n#else\n                                        PA_DEBUG((\"PinNew: Input (%u) friendly name '%S'\\n\", i, pin->inputs[i]->friendlyName));\n#endif\n                                        ++i;\n                                    }\n                                }\n                                else\n                                {\n                                    /* Unconnected pin */\n                                    goto error;\n                                }\n                            }\n                        }\n                    }\n                }\n            }\n        }\n        else\n        {\n            PA_DEBUG((\"PinNew: No topology pin id found. Bad...\\n\"));\n            /* No TOPO pin id ??? This is bad. Ok, so we just say it is an input or output... */\n            wcscpy(pin->friendlyName, (pin->dataFlow == KSPIN_DATAFLOW_IN) ? kOutputName : kInputName);\n        }\n    }\n\n    /* Release topology filter if it has been used */\n    if (pin->parentFilter->topologyFilter && pin->parentFilter->topologyFilter->handle != NULL)\n    {\n        PA_DEBUG((\"PinNew: Releasing topology filter...\\n\"));\n        FilterRelease(pin->parentFilter->topologyFilter);\n    }\n\n    /* Success */\n    *error = paNoError;\n    PA_DEBUG((\"Pin created successfully\\n\"));\n    PA_LOGL_;\n    return pin;\n\nerror:\n    PA_DEBUG((\"PinNew: Error %d\\n\", result));\n    /*\n    Error cleanup\n    */\n\n    if (pin->parentFilter->topologyFilter && pin->parentFilter->topologyFilter->handle != NULL)\n    {\n        FilterRelease(pin->parentFilter->topologyFilter);\n    }\n\n    PaUtil_FreeMemory( item );\n    PinFree(pin);\n\n    *error = result;\n    PA_LOGL_;\n    return NULL;\n}\n\n/*\nSafely free all resources associated with the pin\n*/\nstatic void PinFree(PaWinWdmPin* pin)\n{\n    unsigned i;\n    PA_LOGE_;\n    if( pin )\n    {\n        PinClose(pin);\n        if( pin->pinConnect )\n        {\n            PaUtil_FreeMemory( pin->pinConnect );\n        }\n        if( pin->dataRangesItem )\n        {\n            PaUtil_FreeMemory( pin->dataRangesItem );\n        }\n        if( pin->inputs )\n        {\n            for (i = 0; i < pin->inputCount; ++i)\n            {\n                PaUtil_FreeMemory( pin->inputs[i] );\n            }\n            PaUtil_FreeMemory( pin->inputs );\n        }\n        PaUtil_FreeMemory( pin );\n    }\n    PA_LOGL_;\n}\n\n/*\nIf the pin handle is open, close it\n*/\nstatic void PinClose(PaWinWdmPin* pin)\n{\n    PA_LOGE_;\n    if( pin == NULL )\n    {\n        PA_DEBUG((\"Closing NULL pin!\"));\n        PA_LOGL_;\n        return;\n    }\n    if( pin->handle != NULL )\n    {\n        PinSetState( pin, KSSTATE_PAUSE );\n        PinSetState( pin, KSSTATE_STOP );\n        CloseHandle( pin->handle );\n        pin->handle = NULL;\n        FilterRelease(pin->parentFilter);\n    }\n    PA_LOGL_;\n}\n\n/*\nSet the state of this (instantiated) pin\n*/\nstatic PaError PinSetState(PaWinWdmPin* pin, KSSTATE state)\n{\n    PaError result = paNoError;\n    KSPROPERTY prop;\n\n    PA_LOGE_;\n    prop.Set = KSPROPSETID_Connection;\n    prop.Id  = KSPROPERTY_CONNECTION_STATE;\n    prop.Flags = KSPROPERTY_TYPE_SET;\n\n    if( pin == NULL )\n        return paInternalError;\n    if( pin->handle == NULL )\n        return paInternalError;\n\n    result = WdmSyncIoctl(pin->handle, IOCTL_KS_PROPERTY, &prop, sizeof(KSPROPERTY), &state, sizeof(KSSTATE), NULL);\n\n    PA_LOGL_;\n    return result;\n}\n\nstatic PaError PinInstantiate(PaWinWdmPin* pin)\n{\n    PaError result;\n    unsigned long createResult;\n    KSALLOCATOR_FRAMING ksaf;\n    KSALLOCATOR_FRAMING_EX ksafex;\n\n    PA_LOGE_;\n\n    if( pin == NULL )\n        return paInternalError;\n    if(!pin->pinConnect)\n        return paInternalError;\n\n    FilterUse(pin->parentFilter);\n\n    createResult = FunctionKsCreatePin(\n        pin->parentFilter->handle,\n        pin->pinConnect,\n        GENERIC_WRITE | GENERIC_READ,\n        &pin->handle\n        );\n\n    PA_DEBUG((\"Pin create result = 0x%08x\\n\",createResult));\n    if( createResult != ERROR_SUCCESS )\n    {\n        FilterRelease(pin->parentFilter);\n        pin->handle = NULL;\n        switch (createResult)\n        {\n        case ERROR_INVALID_PARAMETER:\n            /* First case when pin actually don't support the format */\n            return paSampleFormatNotSupported;\n        case ERROR_BAD_COMMAND:\n            /* Case when pin is occupied (by another application) */\n            return paDeviceUnavailable;\n        default:\n            /* All other cases */\n            return paInvalidDevice;\n        }\n    }\n\n    if (pin->parentFilter->devInfo.streamingType == Type_kWaveCyclic)\n    {\n        /* Framing size query only valid for WaveCyclic devices */\n        result = WdmGetPropertySimple(\n            pin->handle,\n            &KSPROPSETID_Connection,\n            KSPROPERTY_CONNECTION_ALLOCATORFRAMING,\n            &ksaf,\n            sizeof(ksaf));\n\n        if( result != paNoError )\n        {\n            result = WdmGetPropertySimple(\n                pin->handle,\n                &KSPROPSETID_Connection,\n                KSPROPERTY_CONNECTION_ALLOCATORFRAMING_EX,\n                &ksafex,\n                sizeof(ksafex));\n            if( result == paNoError )\n            {\n                pin->frameSize = ksafex.FramingItem[0].FramingRange.Range.MinFrameSize;\n            }\n        }\n        else\n        {\n            pin->frameSize = ksaf.FrameSize;\n        }\n    }\n\n    PA_LOGL_;\n\n    return paNoError;\n}\n\nstatic PaError PinSetFormat(PaWinWdmPin* pin, const WAVEFORMATEX* format)\n{\n    unsigned long size;\n    void* newConnect;\n\n    PA_LOGE_;\n\n    if( pin == NULL )\n        return paInternalError;\n    if( format == NULL )\n        return paInternalError;\n\n    size = GetWfexSize(format) + sizeof(KSPIN_CONNECT) + sizeof(KSDATAFORMAT_WAVEFORMATEX) - sizeof(WAVEFORMATEX);\n\n    if( pin->pinConnectSize != size )\n    {\n        newConnect = PaUtil_AllocateMemory( size );\n        if( newConnect == NULL )\n            return paInsufficientMemory;\n        memcpy( newConnect, (void*)pin->pinConnect, min(pin->pinConnectSize,size) );\n        PaUtil_FreeMemory( pin->pinConnect );\n        pin->pinConnect = (KSPIN_CONNECT*)newConnect;\n        pin->pinConnectSize = size;\n        pin->ksDataFormatWfx = (KSDATAFORMAT_WAVEFORMATEX*)((KSPIN_CONNECT*)newConnect + 1);\n        pin->ksDataFormatWfx->DataFormat.FormatSize = size - sizeof(KSPIN_CONNECT);\n    }\n\n    memcpy( (void*)&(pin->ksDataFormatWfx->WaveFormatEx), format, GetWfexSize(format) );\n    pin->ksDataFormatWfx->DataFormat.SampleSize = (unsigned short)(format->nChannels * (format->wBitsPerSample / 8));\n\n    PA_LOGL_;\n\n    return paNoError;\n}\n\nstatic PaError PinIsFormatSupported(PaWinWdmPin* pin, const WAVEFORMATEX* format)\n{\n    KSDATARANGE_AUDIO* dataRange;\n    unsigned long count;\n    GUID guid = DYNAMIC_GUID( DEFINE_WAVEFORMATEX_GUID(format->wFormatTag) );\n    PaError result = paInvalidDevice;\n    const WAVEFORMATEXTENSIBLE* pFormatExt = (format->wFormatTag == WAVE_FORMAT_EXTENSIBLE) ? (const WAVEFORMATEXTENSIBLE*)format : 0;\n\n    PA_LOGE_;\n\n    if( pFormatExt != 0 )\n    {\n        guid = pFormatExt->SubFormat;\n    }\n    dataRange = (KSDATARANGE_AUDIO*)pin->dataRanges;\n    for(count = 0;\n        count<pin->dataRangesItem->Count;\n        count++,\n        dataRange = (KSDATARANGE_AUDIO*)( ((char*)dataRange) + dataRange->DataRange.FormatSize)) /* Need to update dataRange here, due to 'continue' !! */\n    {\n        /* Check major format*/\n        if (!(IsEqualGUID(&(dataRange->DataRange.MajorFormat), &KSDATAFORMAT_TYPE_AUDIO) ||\n            IsEqualGUID(&(dataRange->DataRange.MajorFormat), &KSDATAFORMAT_TYPE_WILDCARD)))\n        {\n            continue;\n        }\n\n        /* This is an audio or wildcard datarange... */\n        if (! (IsEqualGUID(&(dataRange->DataRange.SubFormat), &KSDATAFORMAT_SUBTYPE_WILDCARD) ||\n            IsEqualGUID(&(dataRange->DataRange.SubFormat), &KSDATAFORMAT_SUBTYPE_PCM) ||\n            IsEqualGUID(&(dataRange->DataRange.SubFormat), &guid) ))\n        {\n            continue;\n        }\n\n        /* Check specifier... */\n        if (! (IsEqualGUID(&(dataRange->DataRange.Specifier), &KSDATAFORMAT_SPECIFIER_WILDCARD) ||\n            IsEqualGUID(&(dataRange->DataRange.Specifier), &KSDATAFORMAT_SPECIFIER_WAVEFORMATEX)) )\n        {\n            continue;\n        }\n\n        PA_DEBUG((\"Pin:%x, DataRange:%d\\n\",(void*)pin,count));\n        PA_DEBUG((\"\\tFormatSize:%d, SampleSize:%d\\n\",dataRange->DataRange.FormatSize,dataRange->DataRange.SampleSize));\n        PA_DEBUG((\"\\tMaxChannels:%d\\n\",dataRange->MaximumChannels));\n        PA_DEBUG((\"\\tBits:%d-%d\\n\",dataRange->MinimumBitsPerSample,dataRange->MaximumBitsPerSample));\n        PA_DEBUG((\"\\tSampleRate:%d-%d\\n\",dataRange->MinimumSampleFrequency,dataRange->MaximumSampleFrequency));\n\n        if( dataRange->MaximumChannels != (ULONG)-1 &&\n            dataRange->MaximumChannels < format->nChannels )\n        {\n            result = paInvalidChannelCount;\n            continue;\n        }\n\n        if (pFormatExt != 0)\n        {\n            if (!IsBitsWithinRange(dataRange, pFormatExt->Samples.wValidBitsPerSample))\n            {\n                result = paSampleFormatNotSupported;\n                continue;\n            }\n        }\n        else\n        {\n            if (!IsBitsWithinRange(dataRange, format->wBitsPerSample))\n            {\n                result = paSampleFormatNotSupported;\n                continue;\n            }\n        }\n\n        if (!IsFrequencyWithinRange(dataRange, format->nSamplesPerSec))\n        {\n            result = paInvalidSampleRate;\n            continue;\n        }\n\n        /* Success! */\n        result = paNoError;\n        break;\n    }\n\n    PA_LOGL_;\n    return result;\n}\n\nstatic PaError PinQueryNotificationSupport(PaWinWdmPin* pPin, BOOL* pbResult)\n{\n    PaError result = paNoError;\n    KSPROPERTY propIn;\n\n    PA_LOGE_;\n\n    propIn.Set = KSPROPSETID_RtAudio;\n    propIn.Id = 8; /* = KSPROPERTY_RTAUDIO_QUERY_NOTIFICATION_SUPPORT */\n    propIn.Flags = KSPROPERTY_TYPE_GET;\n\n    result = WdmSyncIoctl(pPin->handle, IOCTL_KS_PROPERTY,\n        &propIn,\n        sizeof(KSPROPERTY),\n        pbResult,\n        sizeof(BOOL),\n        NULL);\n\n    if (result != paNoError)\n    {\n        PA_DEBUG((\"Failed PinQueryNotificationSupport\\n\"));\n    }\n\n    PA_LOGL_;\n    return result;\n}\n\nstatic PaError PinGetBufferWithNotification(PaWinWdmPin* pPin, void** pBuffer, DWORD* pRequestedBufSize, BOOL* pbCallMemBarrier)\n{\n    PaError result = paNoError;\n    KSRTAUDIO_BUFFER_PROPERTY_WITH_NOTIFICATION propIn;\n    KSRTAUDIO_BUFFER propOut;\n\n    PA_LOGE_;\n\n    propIn.BaseAddress = 0;\n    propIn.NotificationCount = 2;\n    propIn.RequestedBufferSize = *pRequestedBufSize;\n    propIn.Property.Set = KSPROPSETID_RtAudio;\n    propIn.Property.Id = KSPROPERTY_RTAUDIO_BUFFER_WITH_NOTIFICATION;\n    propIn.Property.Flags = KSPROPERTY_TYPE_GET;\n\n    result = WdmSyncIoctl(pPin->handle, IOCTL_KS_PROPERTY,\n        &propIn,\n        sizeof(KSRTAUDIO_BUFFER_PROPERTY_WITH_NOTIFICATION),\n        &propOut,\n        sizeof(KSRTAUDIO_BUFFER),\n        NULL);\n\n    if (result == paNoError)\n    {\n        *pBuffer = propOut.BufferAddress;\n        *pRequestedBufSize = propOut.ActualBufferSize;\n        *pbCallMemBarrier = propOut.CallMemoryBarrier;\n    }\n    else\n    {\n        PA_DEBUG((\"Failed to get buffer with notification\\n\"));\n    }\n\n    PA_LOGL_;\n    return result;\n}\n\nstatic PaError PinGetBufferWithoutNotification(PaWinWdmPin* pPin, void** pBuffer, DWORD* pRequestedBufSize, BOOL* pbCallMemBarrier)\n{\n    PaError result = paNoError;\n    KSRTAUDIO_BUFFER_PROPERTY propIn;\n    KSRTAUDIO_BUFFER propOut;\n\n    PA_LOGE_;\n\n    propIn.BaseAddress = NULL;\n    propIn.RequestedBufferSize = *pRequestedBufSize;\n    propIn.Property.Set = KSPROPSETID_RtAudio;\n    propIn.Property.Id = KSPROPERTY_RTAUDIO_BUFFER;\n    propIn.Property.Flags = KSPROPERTY_TYPE_GET;\n\n    result = WdmSyncIoctl(pPin->handle, IOCTL_KS_PROPERTY,\n        &propIn,\n        sizeof(KSRTAUDIO_BUFFER_PROPERTY),\n        &propOut,\n        sizeof(KSRTAUDIO_BUFFER),\n        NULL);\n\n    if (result == paNoError)\n    {\n        *pBuffer = propOut.BufferAddress;\n        *pRequestedBufSize = propOut.ActualBufferSize;\n        *pbCallMemBarrier = propOut.CallMemoryBarrier;\n    }\n    else\n    {\n        PA_DEBUG((\"Failed to get buffer without notification\\n\"));\n    }\n\n    PA_LOGL_;\n    return result;\n}\n\n/* greatest common divisor - PGCD in French */\nstatic unsigned long PaWinWDMGCD( unsigned long a, unsigned long b )\n{\n    return (b==0) ? a : PaWinWDMGCD( b, a%b);\n}\n\n\n/* This function will handle getting the cyclic buffer from a WaveRT driver. Certain WaveRT drivers needs to have\nrequested buffer size on multiples of 128 bytes:\n\n*/\nstatic PaError PinGetBuffer(PaWinWdmPin* pPin, void** pBuffer, DWORD* pRequestedBufSize, BOOL* pbCallMemBarrier)\n{\n    PaError result = paNoError;\n    int limit = 1000;\n    PA_LOGE_;\n\n    while (1)\n    {\n        limit--;\n        if (limit == 0) {\n            PA_DEBUG((\"PinGetBuffer: LOOP LIMIT REACHED\\n\"));\n            break;\n        }\n\n        if (pPin->pinKsSubType != SubType_kPolled)\n        {\n            /* In case of unknown (or notification), we try both modes */\n            result = PinGetBufferWithNotification(pPin, pBuffer, pRequestedBufSize, pbCallMemBarrier);\n            if (result == paNoError)\n            {\n                PA_DEBUG((\"PinGetBuffer: SubType_kNotification\\n\"));\n                pPin->pinKsSubType = SubType_kNotification;\n                break;\n            }\n        }\n\n        result = PinGetBufferWithoutNotification(pPin, pBuffer, pRequestedBufSize, pbCallMemBarrier);\n        if (result == paNoError)\n        {\n            PA_DEBUG((\"PinGetBuffer: SubType_kPolled\\n\"));\n            pPin->pinKsSubType = SubType_kPolled;\n            break;\n        }\n\n        /* Check if requested size is on a 128 byte boundary */\n        if (((*pRequestedBufSize) % 128UL) == 0)\n        {\n            PA_DEBUG((\"Buffer size on 128 byte boundary, still fails :(\\n\"));\n            /* Ok, can't do much more */\n            break;\n        }\n        else\n        {\n            /* Compute LCM so we know which sizes are on a 128 byte boundary */\n            const unsigned gcd = PaWinWDMGCD(128UL, pPin->ksDataFormatWfx->WaveFormatEx.nBlockAlign);\n            const unsigned lcm = (128UL * pPin->ksDataFormatWfx->WaveFormatEx.nBlockAlign) / gcd;\n            DWORD dwOldSize = *pRequestedBufSize;\n\n            /* Align size to (next larger) LCM byte boundary, and then we try again. Note that LCM is not necessarily a\n            power of 2. */\n            *pRequestedBufSize = ((*pRequestedBufSize + lcm - 1) / lcm) * lcm;\n\n            PA_DEBUG((\"Adjusting buffer size from %u to %u bytes (128 byte boundary, LCM=%u)\\n\", dwOldSize, *pRequestedBufSize, lcm));\n        }\n    }\n\n    PA_LOGL_;\n\n    return result;\n}\n\nstatic PaError PinRegisterPositionRegister(PaWinWdmPin* pPin)\n{\n    PaError result = paNoError;\n    KSRTAUDIO_HWREGISTER_PROPERTY propIn;\n    KSRTAUDIO_HWREGISTER propOut;\n\n    PA_LOGE_;\n\n    propIn.BaseAddress = NULL;\n    propIn.Property.Set = KSPROPSETID_RtAudio;\n    propIn.Property.Id = KSPROPERTY_RTAUDIO_POSITIONREGISTER;\n    propIn.Property.Flags = KSPROPERTY_TYPE_SET;\n\n    result = WdmSyncIoctl(pPin->handle, IOCTL_KS_PROPERTY,\n        &propIn,\n        sizeof(KSRTAUDIO_HWREGISTER_PROPERTY),\n        &propOut,\n        sizeof(KSRTAUDIO_HWREGISTER),\n        NULL);\n\n    if (result == paNoError)\n    {\n        pPin->positionRegister = (ULONG*)propOut.Register;\n    }\n    else\n    {\n        PA_DEBUG((\"Failed to register position register\\n\"));\n    }\n\n    PA_LOGL_;\n\n    return result;\n}\n\nstatic PaError PinRegisterNotificationHandle(PaWinWdmPin* pPin, HANDLE handle)\n{\n    PaError result = paNoError;\n    KSRTAUDIO_NOTIFICATION_EVENT_PROPERTY prop;\n\n    PA_LOGE_;\n\n    prop.NotificationEvent = handle;\n    prop.Property.Set = KSPROPSETID_RtAudio;\n    prop.Property.Id = KSPROPERTY_RTAUDIO_REGISTER_NOTIFICATION_EVENT;\n    prop.Property.Flags = KSPROPERTY_TYPE_SET;\n\n    result = WdmSyncIoctl(pPin->handle,\n        IOCTL_KS_PROPERTY,\n        &prop,\n        sizeof(KSRTAUDIO_NOTIFICATION_EVENT_PROPERTY),\n        &prop,\n        sizeof(KSRTAUDIO_NOTIFICATION_EVENT_PROPERTY),\n        NULL);\n\n    if (result != paNoError) {\n        PA_DEBUG((\"Failed to register notification handle 0x%08X\\n\", handle));\n    }\n\n    PA_LOGL_;\n\n    return result;\n}\n\nstatic PaError PinUnregisterNotificationHandle(PaWinWdmPin* pPin, HANDLE handle)\n{\n    PaError result = paNoError;\n    KSRTAUDIO_NOTIFICATION_EVENT_PROPERTY prop;\n\n    PA_LOGE_;\n\n    if (handle != NULL)\n    {\n        prop.NotificationEvent = handle;\n        prop.Property.Set = KSPROPSETID_RtAudio;\n        prop.Property.Id = KSPROPERTY_RTAUDIO_UNREGISTER_NOTIFICATION_EVENT;\n        prop.Property.Flags = KSPROPERTY_TYPE_SET;\n\n        result = WdmSyncIoctl(pPin->handle,\n            IOCTL_KS_PROPERTY,\n            &prop,\n            sizeof(KSRTAUDIO_NOTIFICATION_EVENT_PROPERTY),\n            &prop,\n            sizeof(KSRTAUDIO_NOTIFICATION_EVENT_PROPERTY),\n            NULL);\n\n        if (result != paNoError) {\n            PA_DEBUG((\"Failed to unregister notification handle 0x%08X\\n\", handle));\n        }\n    }\n    PA_LOGL_;\n\n    return result;\n}\n\nstatic PaError PinGetHwLatency(PaWinWdmPin* pPin, ULONG* pFifoSize, ULONG* pChipsetDelay, ULONG* pCodecDelay)\n{\n    PaError result = paNoError;\n    KSPROPERTY propIn;\n    KSRTAUDIO_HWLATENCY propOut;\n\n    PA_LOGE_;\n\n    propIn.Set = KSPROPSETID_RtAudio;\n    propIn.Id = KSPROPERTY_RTAUDIO_HWLATENCY;\n    propIn.Flags = KSPROPERTY_TYPE_GET;\n\n    result = WdmSyncIoctl(pPin->handle, IOCTL_KS_PROPERTY,\n        &propIn,\n        sizeof(KSPROPERTY),\n        &propOut,\n        sizeof(KSRTAUDIO_HWLATENCY),\n        NULL);\n\n    if (result == paNoError)\n    {\n        *pFifoSize = propOut.FifoSize;\n        *pChipsetDelay = propOut.ChipsetDelay;\n        *pCodecDelay = propOut.CodecDelay;\n    }\n    else\n    {\n        PA_DEBUG((\"Failed to retrieve hardware FIFO size!\\n\"));\n    }\n\n    PA_LOGL_;\n\n    return result;\n}\n\n/* This one is used for WaveRT */\nstatic PaError PinGetAudioPositionMemoryMapped(PaWinWdmPin* pPin, ULONG* pPosition)\n{\n    *pPosition = (*pPin->positionRegister);\n    return paNoError;\n}\n\n/* This one also, but in case the driver hasn't implemented memory mapped access to the position register */\nstatic PaError PinGetAudioPositionViaIOCTLRead(PaWinWdmPin* pPin, ULONG* pPosition)\n{\n    PaError result = paNoError;\n    KSPROPERTY propIn;\n    KSAUDIO_POSITION propOut;\n\n    PA_LOGE_;\n\n    propIn.Set = KSPROPSETID_Audio;\n    propIn.Id = KSPROPERTY_AUDIO_POSITION;\n    propIn.Flags = KSPROPERTY_TYPE_GET;\n\n    result = WdmSyncIoctl(pPin->handle,\n        IOCTL_KS_PROPERTY,\n        &propIn, sizeof(KSPROPERTY),\n        &propOut, sizeof(KSAUDIO_POSITION),\n        NULL);\n\n    if (result == paNoError)\n    {\n        *pPosition = (ULONG)(propOut.PlayOffset);\n    }\n    else\n    {\n        PA_DEBUG((\"Failed to get audio play position!\\n\"));\n    }\n\n    PA_LOGL_;\n\n    return result;\n\n}\n\n/* This one also, but in case the driver hasn't implemented memory mapped access to the position register */\nstatic PaError PinGetAudioPositionViaIOCTLWrite(PaWinWdmPin* pPin, ULONG* pPosition)\n{\n    PaError result = paNoError;\n    KSPROPERTY propIn;\n    KSAUDIO_POSITION propOut;\n\n    PA_LOGE_;\n\n    propIn.Set = KSPROPSETID_Audio;\n    propIn.Id = KSPROPERTY_AUDIO_POSITION;\n    propIn.Flags = KSPROPERTY_TYPE_GET;\n\n    result = WdmSyncIoctl(pPin->handle,\n        IOCTL_KS_PROPERTY,\n        &propIn, sizeof(KSPROPERTY),\n        &propOut, sizeof(KSAUDIO_POSITION),\n        NULL);\n\n    if (result == paNoError)\n    {\n        *pPosition = (ULONG)(propOut.WriteOffset);\n    }\n    else\n    {\n        PA_DEBUG((\"Failed to get audio write position!\\n\"));\n    }\n\n    PA_LOGL_;\n\n    return result;\n\n}\n\n/***********************************************************************************************/\n\n/**\n* Create a new filter object.\n*/\nstatic PaWinWdmFilter* FilterNew( PaWDMKSType type, DWORD devNode, const wchar_t* filterName, const wchar_t* friendlyName, PaError* error )\n{\n    PaWinWdmFilter* filter = 0;\n    PaError result;\n\n    /* Allocate the new filter object */\n    filter = (PaWinWdmFilter*)PaUtil_AllocateMemory( sizeof(PaWinWdmFilter) );\n    if( !filter )\n    {\n        result = paInsufficientMemory;\n        goto error;\n    }\n\n    PA_DEBUG((\"FilterNew: Creating filter '%S'\\n\", friendlyName));\n\n    /* Set type flag */\n    filter->devInfo.streamingType = type;\n\n    /* Store device node */\n    filter->deviceNode = devNode;\n\n    /* Zero the filter object - done by AllocateMemory */\n    /* memset( (void*)filter, 0, sizeof(PaWinWdmFilter) ); */\n\n    /* Copy the filter name */\n    wcsncpy(filter->devInfo.filterPath, filterName, MAX_PATH);\n\n    /* Copy the friendly name */\n    wcsncpy(filter->friendlyName, friendlyName, MAX_PATH);\n\n    PA_DEBUG((\"FilterNew: Opening filter...\\n\", friendlyName));\n\n    /* Open the filter handle */\n    result = FilterUse(filter);\n    if( result != paNoError )\n    {\n        goto error;\n    }\n\n    /* Get pin count */\n    result = WdmGetPinPropertySimple\n        (\n        filter->handle,\n        0,\n        &KSPROPSETID_Pin,\n        KSPROPERTY_PIN_CTYPES,\n        &filter->pinCount,\n        sizeof(filter->pinCount),\n        NULL);\n\n    if( result != paNoError)\n    {\n        goto error;\n    }\n\n    /* Get connections & nodes for filter */\n    result = WdmGetPropertyMulti(\n        filter->handle,\n        &KSPROPSETID_Topology,\n        KSPROPERTY_TOPOLOGY_CONNECTIONS,\n        &filter->connections);\n\n    if( result != paNoError)\n    {\n        goto error;\n    }\n\n    result = WdmGetPropertyMulti(\n        filter->handle,\n        &KSPROPSETID_Topology,\n        KSPROPERTY_TOPOLOGY_NODES,\n        &filter->nodes);\n\n    if( result != paNoError)\n    {\n        goto error;\n    }\n\n    /* For debugging purposes */\n    DumpConnectionsAndNodes(filter);\n\n    /* Get product GUID (it might not be supported) */\n    {\n        KSCOMPONENTID compId;\n        if (WdmGetPropertySimple(filter->handle, &KSPROPSETID_General, KSPROPERTY_GENERAL_COMPONENTID, &compId, sizeof(KSCOMPONENTID)) == paNoError)\n        {\n            filter->devInfo.deviceProductGuid = compId.Product;\n        }\n    }\n\n    /* This section is not executed for topology filters */\n    if (type != Type_kNotUsed)\n    {\n        /* Initialize the pins */\n        result = FilterInitializePins(filter);\n\n        if( result != paNoError)\n        {\n            goto error;\n        }\n    }\n\n    /* Close the filter handle for now\n    * It will be opened later when needed */\n    FilterRelease(filter);\n\n    *error = paNoError;\n    return filter;\n\nerror:\n    PA_DEBUG((\"FilterNew: Error %d\\n\", result));\n    /*\n    Error cleanup\n    */\n    FilterFree(filter);\n\n    *error = result;\n    return NULL;\n}\n\n/**\n* Add reference to filter\n*/\nstatic void FilterAddRef( PaWinWdmFilter* filter )\n{\n    if (filter != 0)\n    {\n        filter->filterRefCount++;\n    }\n}\n\n\n/**\n* Initialize the pins of the filter. This is separated from FilterNew because this might fail if there is another\n* process using the pin(s).\n*/\nPaError FilterInitializePins( PaWinWdmFilter* filter )\n{\n    PaError result = paNoError;\n    int pinId;\n\n    if (filter->devInfo.streamingType == Type_kNotUsed)\n        return paNoError;\n\n    if (filter->pins != NULL)\n        return paNoError;\n\n    /* Allocate pointer array to hold the pins */\n    filter->pins = (PaWinWdmPin**)PaUtil_AllocateMemory( sizeof(PaWinWdmPin*) * filter->pinCount );\n    if( !filter->pins )\n    {\n        result = paInsufficientMemory;\n        goto error;\n    }\n\n    /* Create all the pins we can */\n    for(pinId = 0; pinId < filter->pinCount; pinId++)\n    {\n        /* Create the pin with this Id */\n        PaWinWdmPin* newPin;\n        newPin = PinNew(filter, pinId, &result);\n        if( result == paInsufficientMemory )\n            goto error;\n        if( newPin != NULL )\n        {\n            filter->pins[pinId] = newPin;\n            ++filter->validPinCount;\n        }\n        else\n        {\n            filter->pins[pinId] = 0;\n        }\n    }\n\n    if (filter->validPinCount == 0)\n    {\n        result = paDeviceUnavailable;\n        goto error;\n    }\n\n    return paNoError;\n\nerror:\n\n    if (filter->pins)\n    {\n        for (pinId = 0; pinId < filter->pinCount; ++pinId)\n        {\n            if (filter->pins[pinId])\n            {\n                PinFree(filter->pins[pinId]);\n                filter->pins[pinId] = 0;\n            }\n        }\n        PaUtil_FreeMemory( filter->pins );\n        filter->pins = 0;\n    }\n\n    return result;\n}\n\n\n/**\n* Free a previously created filter\n*/\nstatic void FilterFree(PaWinWdmFilter* filter)\n{\n    PA_LOGL_;\n    if( filter )\n    {\n        if (--filter->filterRefCount > 0)\n        {\n            /* Ok, a stream has a ref count to this filter */\n            return;\n        }\n\n        if ( filter->topologyFilter )\n        {\n            FilterFree(filter->topologyFilter);\n            filter->topologyFilter = 0;\n        }\n        if ( filter->pins )\n        {\n            int pinId;\n            for( pinId = 0; pinId < filter->pinCount; pinId++ )\n                PinFree(filter->pins[pinId]);\n            PaUtil_FreeMemory( filter->pins );\n            filter->pins = 0;\n        }\n        if( filter->connections )\n        {\n            PaUtil_FreeMemory(filter->connections);\n            filter->connections = 0;\n        }\n        if( filter->nodes )\n        {\n            PaUtil_FreeMemory(filter->nodes);\n            filter->nodes = 0;\n        }\n        if( filter->handle )\n            CloseHandle( filter->handle );\n        PaUtil_FreeMemory( filter );\n    }\n    PA_LOGE_;\n}\n\n/**\n* Reopen the filter handle if necessary so it can be used\n**/\nstatic PaError FilterUse(PaWinWdmFilter* filter)\n{\n    assert( filter );\n\n    PA_LOGE_;\n    if( filter->handle == NULL )\n    {\n        /* Open the filter */\n        filter->handle = CreateFileW(\n            filter->devInfo.filterPath,\n            GENERIC_READ | GENERIC_WRITE,\n            0,\n            NULL,\n            OPEN_EXISTING,\n            FILE_ATTRIBUTE_NORMAL | FILE_FLAG_OVERLAPPED,\n            NULL);\n\n        if( filter->handle == NULL )\n        {\n            return paDeviceUnavailable;\n        }\n    }\n    filter->usageCount++;\n    PA_LOGL_;\n    return paNoError;\n}\n\n/**\n* Release the filter handle if nobody is using it\n**/\nstatic void FilterRelease(PaWinWdmFilter* filter)\n{\n    assert( filter );\n    assert( filter->usageCount > 0 );\n\n    PA_LOGE_;\n    /* Check first topology filter, if used */\n    if (filter->topologyFilter != NULL && filter->topologyFilter->handle != NULL)\n    {\n        FilterRelease(filter->topologyFilter);\n    }\n\n    filter->usageCount--;\n    if( filter->usageCount == 0 )\n    {\n        if( filter->handle != NULL )\n        {\n            CloseHandle( filter->handle );\n            filter->handle = NULL;\n        }\n    }\n    PA_LOGL_;\n}\n\n/**\n* Create a render or playback pin using the supplied format\n**/\nstatic PaWinWdmPin* FilterCreatePin(PaWinWdmFilter* filter,\n                                    int pinId,\n                                    const WAVEFORMATEX* wfex,\n                                    PaError* error)\n{\n    PaError result = paNoError;\n    PaWinWdmPin* pin = NULL;\n    assert( filter );\n    assert( pinId < filter->pinCount );\n    pin = filter->pins[pinId];\n    assert( pin );\n    result = PinSetFormat(pin,wfex);\n    if( result == paNoError )\n    {\n        result = PinInstantiate(pin);\n    }\n    *error = result;\n    return result == paNoError ? pin : 0;\n}\n\nstatic const wchar_t kUsbPrefix[] = L\"\\\\\\\\?\\\\USB\";\n\nstatic BOOL IsUSBDevice(const wchar_t* devicePath)\n{\n    /* Alex Lessard pointed out that different devices might present the device path with\n       lower case letters. */\n    return (_wcsnicmp(devicePath, kUsbPrefix, sizeof(kUsbPrefix)/sizeof(kUsbPrefix[0]) ) == 0);\n}\n\n/* This should make it more language tolerant, I hope... */\nstatic const wchar_t kUsbNamePrefix[] = L\"USB Audio\";\n\nstatic BOOL IsNameUSBAudioDevice(const wchar_t* friendlyName)\n{\n    return (_wcsnicmp(friendlyName, kUsbNamePrefix, sizeof(kUsbNamePrefix)/sizeof(kUsbNamePrefix[0])) == 0);\n}\n\ntypedef enum _tag_EAlias\n{\n    Alias_kRender   = (1<<0),\n    Alias_kCapture  = (1<<1),\n    Alias_kRealtime = (1<<2),\n} EAlias;\n\n/* Trim whitespace from string */\nstatic void TrimString(wchar_t* str, size_t length)\n{\n    wchar_t* s = str;\n    wchar_t* e = 0;\n\n    /* Find start of string */\n    while (iswspace(*s)) ++s;\n    e=s+min(length,wcslen(s))-1;\n\n    /* Find end of string */\n    while(e>s && iswspace(*e)) --e;\n    ++e;\n\n    length = e - s;\n    memmove(str, s, length * sizeof(wchar_t));\n    str[length] = 0;\n}\n\n/**\n* Build the list of available filters\n* Use the SetupDi API to enumerate all devices in the KSCATEGORY_AUDIO which\n* have a KSCATEGORY_RENDER or KSCATEGORY_CAPTURE alias. For each of these\n* devices initialise a PaWinWdmFilter structure by calling our NewFilter()\n* function. We enumerate devices twice, once to count how many there are,\n* and once to initialize the PaWinWdmFilter structures.\n*\n* Vista and later: Also check KSCATEGORY_REALTIME for WaveRT devices.\n*/\n//PaError BuildFilterList( PaWinWdmHostApiRepresentation* wdmHostApi, int* noOfPaDevices )\nPaWinWdmFilter** BuildFilterList( int* pFilterCount, int* pNoOfPaDevices, PaError* pResult )\n{\n    PaWinWdmFilter** ppFilters = NULL;\n    HDEVINFO handle = NULL;\n    int device;\n    int invalidDevices;\n    int slot;\n    SP_DEVICE_INTERFACE_DATA interfaceData;\n    SP_DEVICE_INTERFACE_DATA aliasData;\n    SP_DEVINFO_DATA devInfoData;\n    int noError;\n    const int sizeInterface = sizeof(SP_DEVICE_INTERFACE_DETAIL_DATA) + (MAX_PATH * sizeof(WCHAR));\n    unsigned char interfaceDetailsArray[sizeof(SP_DEVICE_INTERFACE_DETAIL_DATA) + (MAX_PATH * sizeof(WCHAR))];\n    SP_DEVICE_INTERFACE_DETAIL_DATA_W* devInterfaceDetails = (SP_DEVICE_INTERFACE_DETAIL_DATA_W*)interfaceDetailsArray;\n    const GUID* category = (const GUID*)&KSCATEGORY_AUDIO;\n    const GUID* alias_render = (const GUID*)&KSCATEGORY_RENDER;\n    const GUID* alias_capture = (const GUID*)&KSCATEGORY_CAPTURE;\n    const GUID* category_realtime = (const GUID*)&KSCATEGORY_REALTIME;\n    DWORD aliasFlags;\n    PaWDMKSType streamingType;\n    int filterCount = 0;\n    int noOfPaDevices = 0;\n\n    PA_LOGE_;\n\n    assert(pFilterCount != NULL);\n    assert(pNoOfPaDevices != NULL);\n    assert(pResult != NULL);\n\n    devInterfaceDetails->cbSize = sizeof(SP_DEVICE_INTERFACE_DETAIL_DATA_W);\n    *pFilterCount = 0;\n    *pNoOfPaDevices = 0;\n\n    /* Open a handle to search for devices (filters) */\n    handle = SetupDiGetClassDevs(category,NULL,NULL,DIGCF_PRESENT | DIGCF_DEVICEINTERFACE);\n    if( handle == INVALID_HANDLE_VALUE )\n    {\n        *pResult = paUnanticipatedHostError;\n        return NULL;\n    }\n    PA_DEBUG((\"Setup called\\n\"));\n\n    /* First let's count the number of devices so we can allocate a list */\n    invalidDevices = 0;\n    for( device = 0;;device++ )\n    {\n        interfaceData.cbSize = sizeof(SP_DEVICE_INTERFACE_DATA);\n        interfaceData.Reserved = 0;\n        aliasData.cbSize = sizeof(SP_DEVICE_INTERFACE_DATA);\n        aliasData.Reserved = 0;\n        noError = SetupDiEnumDeviceInterfaces(handle,NULL,category,device,&interfaceData);\n        PA_DEBUG((\"Enum called\\n\"));\n        if( !noError )\n            break; /* No more devices */\n\n        /* Check this one has the render or capture alias */\n        aliasFlags = 0;\n        noError = SetupDiGetDeviceInterfaceAlias(handle,&interfaceData,alias_render,&aliasData);\n        PA_DEBUG((\"noError = %d\\n\",noError));\n        if(noError)\n        {\n            if(aliasData.Flags && (!(aliasData.Flags & SPINT_REMOVED)))\n            {\n                PA_DEBUG((\"Device %d has render alias\\n\",device));\n                aliasFlags |= Alias_kRender; /* Has render alias */\n            }\n            else\n            {\n                PA_DEBUG((\"Device %d has no render alias\\n\",device));\n            }\n        }\n        noError = SetupDiGetDeviceInterfaceAlias(handle,&interfaceData,alias_capture,&aliasData);\n        if(noError)\n        {\n            if(aliasData.Flags && (!(aliasData.Flags & SPINT_REMOVED)))\n            {\n                PA_DEBUG((\"Device %d has capture alias\\n\",device));\n                aliasFlags |= Alias_kCapture; /* Has capture alias */\n            }\n            else\n            {\n                PA_DEBUG((\"Device %d has no capture alias\\n\",device));\n            }\n        }\n        if(!aliasFlags)\n            invalidDevices++; /* This was not a valid capture or render audio device */\n    }\n    /* Remember how many there are */\n    filterCount = device-invalidDevices;\n\n    PA_DEBUG((\"Interfaces found: %d\\n\",device-invalidDevices));\n\n    /* Now allocate the list of pointers to devices */\n    ppFilters  = (PaWinWdmFilter**)PaUtil_AllocateMemory( sizeof(PaWinWdmFilter*) * filterCount);\n    if( ppFilters == 0 )\n    {\n        if(handle != NULL)\n            SetupDiDestroyDeviceInfoList(handle);\n        *pResult = paInsufficientMemory;\n        return NULL;\n    }\n\n    /* Now create filter objects for each interface found */\n    slot = 0;\n    for( device = 0;;device++ )\n    {\n        interfaceData.cbSize = sizeof(SP_DEVICE_INTERFACE_DATA);\n        interfaceData.Reserved = 0;\n        aliasData.cbSize = sizeof(SP_DEVICE_INTERFACE_DATA);\n        aliasData.Reserved = 0;\n        devInfoData.cbSize = sizeof(SP_DEVINFO_DATA);\n        devInfoData.Reserved = 0;\n        streamingType = Type_kWaveCyclic;\n\n        noError = SetupDiEnumDeviceInterfaces(handle,NULL,category,device,&interfaceData);\n        if( !noError )\n            break; /* No more devices */\n\n        /* Check this one has the render or capture alias */\n        aliasFlags = 0;\n        noError = SetupDiGetDeviceInterfaceAlias(handle,&interfaceData,alias_render,&aliasData);\n        if(noError)\n        {\n            if(aliasData.Flags && (!(aliasData.Flags & SPINT_REMOVED)))\n            {\n                PA_DEBUG((\"Device %d has render alias\\n\",device));\n                aliasFlags |= Alias_kRender; /* Has render alias */\n            }\n        }\n        noError = SetupDiGetDeviceInterfaceAlias(handle,&interfaceData,alias_capture,&aliasData);\n        if(noError)\n        {\n            if(aliasData.Flags && (!(aliasData.Flags & SPINT_REMOVED)))\n            {\n                PA_DEBUG((\"Device %d has capture alias\\n\",device));\n                aliasFlags |= Alias_kCapture; /* Has capture alias */\n            }\n        }\n        if(!aliasFlags)\n        {\n            continue; /* This was not a valid capture or render audio device */\n        }\n        else\n        {\n            /* Check if filter is WaveRT, if not it is a WaveCyclic */\n            noError = SetupDiGetDeviceInterfaceAlias(handle,&interfaceData,category_realtime,&aliasData);\n            if (noError)\n            {\n                PA_DEBUG((\"Device %d has realtime alias\\n\",device));\n                aliasFlags |= Alias_kRealtime;\n                streamingType = Type_kWaveRT;\n            }\n        }\n\n        noError = SetupDiGetDeviceInterfaceDetailW(handle,&interfaceData,devInterfaceDetails,sizeInterface,NULL,&devInfoData);\n        if( noError )\n        {\n            DWORD type;\n            WCHAR friendlyName[MAX_PATH] = {0};\n            DWORD sizeFriendlyName;\n            PaWinWdmFilter* newFilter = 0;\n\n            PaError result = paNoError;\n            /* Try to get the \"friendly name\" for this interface */\n            sizeFriendlyName = sizeof(friendlyName);\n\n            if (IsEarlierThanVista() && IsUSBDevice(devInterfaceDetails->DevicePath))\n            {\n                /* XP and USB audio device needs to look elsewhere, otherwise it'll only be a \"USB Audio Device\". Not\n                very literate. */\n                if (!SetupDiGetDeviceRegistryPropertyW(handle,\n                    &devInfoData,\n                    SPDRP_LOCATION_INFORMATION,\n                    &type,\n                    (BYTE*)friendlyName,\n                    sizeof(friendlyName),\n                    NULL))\n                {\n                    friendlyName[0] = 0;\n                }\n            }\n\n            if (friendlyName[0] == 0 || IsNameUSBAudioDevice(friendlyName))\n            {\n                /* Fix contributed by Ben Allison\n                * Removed KEY_SET_VALUE from flags on following call\n                * as its causes failure when running without admin rights\n                * and it was not required */\n                HKEY hkey=SetupDiOpenDeviceInterfaceRegKey(handle,&interfaceData,0,KEY_QUERY_VALUE);\n                if(hkey!=INVALID_HANDLE_VALUE)\n                {\n                    noError = RegQueryValueExW(hkey,L\"FriendlyName\",0,&type,(BYTE*)friendlyName,&sizeFriendlyName);\n                    if( noError == ERROR_SUCCESS )\n                    {\n                        PA_DEBUG((\"Interface %d, Name: %s\\n\",device,friendlyName));\n                        RegCloseKey(hkey);\n                    }\n                    else\n                    {\n                        friendlyName[0] = 0;\n                    }\n                }\n            }\n\n            TrimString(friendlyName, sizeFriendlyName);\n\n            newFilter = FilterNew(streamingType,\n                devInfoData.DevInst,\n                devInterfaceDetails->DevicePath,\n                friendlyName,\n                &result);\n\n            if( result == paNoError )\n            {\n                int pin;\n                unsigned filterIOs = 0;\n\n                /* Increment number of \"devices\" */\n                for (pin = 0; pin < newFilter->pinCount; ++pin)\n                {\n                    PaWinWdmPin* pPin = newFilter->pins[pin];\n                    if (pPin == NULL)\n                        continue;\n\n                    filterIOs += max(1, pPin->inputCount);\n                }\n\n                noOfPaDevices += filterIOs;\n\n                PA_DEBUG((\"Filter (%s) created with %d valid pins (total I/Os: %u)\\n\", ((newFilter->devInfo.streamingType==Type_kWaveRT)?\"WaveRT\":\"WaveCyclic\"), newFilter->validPinCount, filterIOs));\n\n                assert(slot < filterCount);\n\n                ppFilters[slot] = newFilter;\n\n                slot++;\n            }\n            else\n            {\n                PA_DEBUG((\"Filter NOT created\\n\"));\n                /* As there are now less filters than we initially thought\n                * we must reduce the count by one */\n                filterCount--;\n            }\n        }\n    }\n\n    /* Clean up */\n    if(handle != NULL)\n        SetupDiDestroyDeviceInfoList(handle);\n\n    *pFilterCount = filterCount;\n    *pNoOfPaDevices = noOfPaDevices;\n\n    return ppFilters;\n}\n\ntypedef struct PaNameHashIndex\n{\n    unsigned index;\n    unsigned count;\n    ULONG    hash;\n    struct PaNameHashIndex *next;\n} PaNameHashIndex;\n\ntypedef struct PaNameHashObject\n{\n    PaNameHashIndex* list;\n    PaUtilAllocationGroup* allocGroup;\n} PaNameHashObject;\n\nstatic ULONG GetNameHash(const wchar_t* str, const BOOL input)\n{\n    /* This is to make sure that a name that exists as both input & output won't get the same hash value */\n    const ULONG fnv_prime = (input ? 0x811C9DD7 : 0x811FEB0B);\n    ULONG hash = 0;\n    for(; *str != 0; str++)\n    {\n        hash *= fnv_prime;\n        hash ^= (*str);\n    }\n    assert(hash != 0);\n    return hash;\n}\n\nstatic PaError CreateHashEntry(PaNameHashObject* obj, const wchar_t* name, const BOOL input)\n{\n    ULONG hash = GetNameHash(name, input);\n    PaNameHashIndex * pLast = NULL;\n    PaNameHashIndex * p = obj->list;\n    while (p != 0)\n    {\n        if (p->hash == hash)\n        {\n            break;\n        }\n        pLast = p;\n        p = p->next;\n    }\n    if (p == NULL)\n    {\n        p = (PaNameHashIndex*)PaUtil_GroupAllocateMemory(obj->allocGroup, sizeof(PaNameHashIndex));\n        if (p == NULL)\n        {\n            return paInsufficientMemory;\n        }\n        p->hash = hash;\n        p->count = 1;\n        if (pLast != 0)\n        {\n            assert(pLast->next == 0);\n            pLast->next = p;\n        }\n        if (obj->list == 0)\n        {\n            obj->list = p;\n        }\n    }\n    else\n    {\n        ++p->count;\n    }\n    return paNoError;\n}\n\nstatic PaError InitNameHashObject(PaNameHashObject* obj, PaWinWdmFilter* pFilter)\n{\n    int i;\n\n    obj->allocGroup = PaUtil_CreateAllocationGroup();\n    if (obj->allocGroup == NULL)\n    {\n        return paInsufficientMemory;\n    }\n\n    for (i = 0; i < pFilter->pinCount; ++i)\n    {\n        unsigned m;\n        PaWinWdmPin* pin = pFilter->pins[i];\n\n        if (pin == NULL)\n            continue;\n\n        for (m = 0; m < max(1, pin->inputCount); ++m)\n        {\n            const BOOL isInput = (pin->dataFlow == KSPIN_DATAFLOW_OUT);\n            const wchar_t* name = (pin->inputs == NULL) ? pin->friendlyName : pin->inputs[m]->friendlyName;\n\n            PaError result = CreateHashEntry(obj, name, isInput);\n\n            if (result != paNoError)\n            {\n                return result;\n            }\n        }\n    }\n    return paNoError;\n}\n\nstatic void DeinitNameHashObject(PaNameHashObject* obj)\n{\n    assert(obj != 0);\n    PaUtil_FreeAllAllocations(obj->allocGroup);\n    PaUtil_DestroyAllocationGroup(obj->allocGroup);\n    memset(obj, 0, sizeof(PaNameHashObject));\n}\n\nstatic unsigned GetNameIndex(PaNameHashObject* obj, const wchar_t* name, const BOOL input)\n{\n    ULONG hash = GetNameHash(name, input);\n    PaNameHashIndex* p = obj->list;\n    while (p != NULL)\n    {\n        if (p->hash == hash)\n        {\n            if (p->count > 1)\n            {\n                return (++p->index);\n            }\n            else\n            {\n                return 0;\n            }\n        }\n\n        p = p->next;\n    }\n    // Should never get here!!\n    assert(FALSE);\n    return 0;\n}\n\nstatic PaError ScanDeviceInfos( struct PaUtilHostApiRepresentation *hostApi, PaHostApiIndex hostApiIndex, void **scanResults, int *newDeviceCount )\n{\n    PaWinWdmHostApiRepresentation *wdmHostApi = (PaWinWdmHostApiRepresentation*)hostApi;\n    PaError result = paNoError;\n    PaWinWdmFilter** ppFilters = 0;\n    PaWinWDMScanDeviceInfosResults *outArgument = 0;\n    int filterCount = 0;\n    int totalDeviceCount = 0;\n    int idxDevice = 0;\n    DWORD defaultInDevPathSize = 0;\n    DWORD defaultOutDevPathSize = 0;\n    wchar_t* defaultInDevPath = 0;\n    wchar_t* defaultOutDevPath = 0;\n\n    ppFilters = BuildFilterList( &filterCount, &totalDeviceCount, &result );\n    if( result != paNoError )\n    {\n        goto error;\n    }\n\n    // Get hold of default device paths for capture & playback\n    if( waveInMessage(0, DRV_QUERYDEVICEINTERFACESIZE, (DWORD_PTR)&defaultInDevPathSize, 0 ) == MMSYSERR_NOERROR )\n    {\n        defaultInDevPath = (wchar_t *)PaUtil_AllocateMemory((defaultInDevPathSize + 1) * sizeof(wchar_t));\n        waveInMessage(0, DRV_QUERYDEVICEINTERFACE, (DWORD_PTR)defaultInDevPath, defaultInDevPathSize);\n    }\n    if( waveOutMessage(0, DRV_QUERYDEVICEINTERFACESIZE, (DWORD_PTR)&defaultOutDevPathSize, 0 ) == MMSYSERR_NOERROR )\n    {\n        defaultOutDevPath = (wchar_t *)PaUtil_AllocateMemory((defaultOutDevPathSize + 1) * sizeof(wchar_t));\n        waveOutMessage(0, DRV_QUERYDEVICEINTERFACE, (DWORD_PTR)defaultOutDevPath, defaultOutDevPathSize);\n    }\n\n    if( totalDeviceCount > 0 )\n    {\n        PaWinWdmDeviceInfo *deviceInfoArray = 0;\n        int idxFilter;\n        int i;\n        unsigned devIsDefaultIn = 0, devIsDefaultOut = 0;\n\n        /* Allocate the out param for all the info we need */\n        outArgument = (PaWinWDMScanDeviceInfosResults *) PaUtil_GroupAllocateMemory(\n            wdmHostApi->allocations, sizeof(PaWinWDMScanDeviceInfosResults) );\n        if( !outArgument )\n        {\n            result = paInsufficientMemory;\n            goto error;\n        }\n\n        outArgument->defaultInputDevice  = paNoDevice;\n        outArgument->defaultOutputDevice = paNoDevice;\n\n        outArgument->deviceInfos = (PaDeviceInfo**)PaUtil_GroupAllocateMemory(\n            wdmHostApi->allocations, sizeof(PaDeviceInfo*) * totalDeviceCount );\n        if( !outArgument->deviceInfos )\n        {\n            result = paInsufficientMemory;\n            goto error;\n        }\n\n        /* allocate all device info structs in a contiguous block */\n        deviceInfoArray = (PaWinWdmDeviceInfo*)PaUtil_GroupAllocateMemory(\n            wdmHostApi->allocations, sizeof(PaWinWdmDeviceInfo) * totalDeviceCount );\n        if( !deviceInfoArray )\n        {\n            result = paInsufficientMemory;\n            goto error;\n        }\n\n        /* Make sure all items in array */\n        for( i = 0 ; i < totalDeviceCount; ++i )\n        {\n            PaDeviceInfo *deviceInfo  = &deviceInfoArray[i].inheritedDeviceInfo;\n            deviceInfo->structVersion = 2;\n            deviceInfo->hostApi       = hostApiIndex;\n            deviceInfo->name          = 0;\n            outArgument->deviceInfos[ i ] = deviceInfo;\n        }\n\n        idxDevice = 0;\n        for (idxFilter = 0; idxFilter < filterCount; ++idxFilter)\n        {\n            PaNameHashObject nameHash = {0};\n            PaWinWdmFilter* pFilter = ppFilters[idxFilter];\n            if( pFilter == NULL )\n                continue;\n\n            if (InitNameHashObject(&nameHash, pFilter) != paNoError)\n            {\n                DeinitNameHashObject(&nameHash);\n                continue;\n            }\n\n            devIsDefaultIn = (defaultInDevPath && (_wcsicmp(pFilter->devInfo.filterPath, defaultInDevPath) == 0));\n            devIsDefaultOut = (defaultOutDevPath && (_wcsicmp(pFilter->devInfo.filterPath, defaultOutDevPath) == 0));\n\n            for (i = 0; i < pFilter->pinCount; ++i)\n            {\n                unsigned m;\n                ULONG nameIndex = 0;\n                ULONG nameIndexHash = 0;\n                PaWinWdmPin* pin = pFilter->pins[i];\n\n                if (pin == NULL)\n                    continue;\n\n                for (m = 0; m < max(1, pin->inputCount); ++m)\n                {\n                    PaWinWdmDeviceInfo *wdmDeviceInfo = (PaWinWdmDeviceInfo *)outArgument->deviceInfos[idxDevice];\n                    PaDeviceInfo *deviceInfo = &wdmDeviceInfo->inheritedDeviceInfo;\n                    wchar_t localCompositeName[MAX_PATH];\n                    unsigned nameIndex = 0;\n                    const BOOL isInput = (pin->dataFlow == KSPIN_DATAFLOW_OUT);\n\n                    wdmDeviceInfo->filter = pFilter;\n\n                    deviceInfo->structVersion = 2;\n                    deviceInfo->hostApi = hostApiIndex;\n                    deviceInfo->name = wdmDeviceInfo->compositeName;\n                    /* deviceInfo->hostApiSpecificDeviceInfo = &pFilter->devInfo; */\n\n                    wdmDeviceInfo->pin = pin->pinId;\n\n                    /* Get the name of the \"device\" */\n                    if (pin->inputs == NULL)\n                    {\n                        wcsncpy(localCompositeName, pin->friendlyName, MAX_PATH);\n                        wdmDeviceInfo->muxPosition = -1;\n                        wdmDeviceInfo->endpointPinId = pin->endpointPinId;\n                    }\n                    else\n                    {\n                        PaWinWdmMuxedInput* input = pin->inputs[m];\n                        wcsncpy(localCompositeName, input->friendlyName, MAX_PATH);\n                        wdmDeviceInfo->muxPosition = (int)m;\n                        wdmDeviceInfo->endpointPinId = input->endpointPinId;\n                    }\n\n                    {\n                        /* Get base length */\n                        size_t n = wcslen(localCompositeName);\n\n                        /* Check if there are more entries with same name (which might very well be the case), if there\n                        are, the name will be postfixed with an index. */\n                        nameIndex = GetNameIndex(&nameHash, localCompositeName, isInput);\n                        if (nameIndex > 0)\n                        {\n                            /* This name has multiple instances, so we post fix with a number */\n                            n += _snwprintf(localCompositeName + n, MAX_PATH - n, L\" %u\", nameIndex);\n                        }\n                        /* Postfix with filter name */\n                        _snwprintf(localCompositeName + n, MAX_PATH - n, L\" (%s)\", pFilter->friendlyName);\n                    }\n\n                    /* Convert wide char string to utf-8 */\n                    WideCharToMultiByte(CP_UTF8, 0, localCompositeName, -1, wdmDeviceInfo->compositeName, MAX_PATH, NULL, NULL);\n\n                    /* NB! WDM/KS has no concept of a full-duplex device, each pin is either an input or an output */\n                    if (isInput)\n                    {\n                        /* INPUT ! */\n                        deviceInfo->maxInputChannels  = pin->maxChannels;\n                        deviceInfo->maxOutputChannels = 0;\n\n                        /* RoBi NB: Due to the fact that input audio endpoints in Vista (& later OSs) can be the same device, but with\n                           different input mux settings, there might be a discrepancy between the default input device chosen, and\n                           that which will be used by Portaudio. Not much to do about that unfortunately.\n                        */\n                        if ((defaultInDevPath == 0 || devIsDefaultIn) &&\n                             outArgument->defaultInputDevice == paNoDevice)\n                        {\n                            outArgument->defaultInputDevice = idxDevice;\n                        }\n                    }\n                    else\n                    {\n                        /* OUTPUT ! */\n                        deviceInfo->maxInputChannels  = 0;\n                        deviceInfo->maxOutputChannels = pin->maxChannels;\n\n                        if ((defaultOutDevPath == 0 || devIsDefaultOut) &&\n                            outArgument->defaultOutputDevice == paNoDevice)\n                        {\n                            outArgument->defaultOutputDevice = idxDevice;\n                        }\n                    }\n\n                    /* These low values are not very useful because\n                    * a) The lowest latency we end up with can depend on many factors such\n                    *    as the device buffer sizes/granularities, sample rate, channels and format\n                    * b) We cannot know the device buffer sizes until we try to open/use it at\n                    *    a particular setting\n                    * So: we give 512x48000Hz frames as the default low input latency\n                    **/\n                    switch (pFilter->devInfo.streamingType)\n                    {\n                    case Type_kWaveCyclic:\n                        if (IsEarlierThanVista())\n                        {\n                            /* XP doesn't tolerate low latency, unless the Process Priority Class is set to REALTIME_PRIORITY_CLASS\n                            through SetPriorityClass, then 10 ms is quite feasible. However, one should then bear in mind that ALL of\n                            the process is running in REALTIME_PRIORITY_CLASS, which might not be appropriate for an application with\n                            a GUI . In this case it is advisable to separate the audio engine in another process and use IPC to communicate\n                            with it. */\n                            deviceInfo->defaultLowInputLatency = 0.02;\n                            deviceInfo->defaultLowOutputLatency = 0.02;\n                        }\n                        else\n                        {\n                            /* This is a conservative estimate. Most WaveCyclic drivers will limit the available latency, but f.i. my Edirol\n                            PCR-A30 can reach 3 ms latency easily... */\n                            deviceInfo->defaultLowInputLatency = 0.01;\n                            deviceInfo->defaultLowOutputLatency = 0.01;\n                        }\n                        deviceInfo->defaultHighInputLatency = (4096.0/48000.0);\n                        deviceInfo->defaultHighOutputLatency = (4096.0/48000.0);\n                        deviceInfo->defaultSampleRate = (double)(pin->defaultSampleRate);\n                        break;\n                    case Type_kWaveRT:\n                        /* This is also a conservative estimate, based on WaveRT polled mode. In polled mode, the latency will be dictated\n                        by the buffer size given by the driver. */\n                        deviceInfo->defaultLowInputLatency = 0.01;\n                        deviceInfo->defaultLowOutputLatency = 0.01;\n                        deviceInfo->defaultHighInputLatency = 0.04;\n                        deviceInfo->defaultHighOutputLatency = 0.04;\n                        deviceInfo->defaultSampleRate = (double)(pin->defaultSampleRate);\n                        break;\n                    default:\n                        assert(0);\n                        break;\n                    }\n\n                    /* Add reference to filter */\n                    FilterAddRef(wdmDeviceInfo->filter);\n\n                    assert(idxDevice < totalDeviceCount);\n                    ++idxDevice;\n                }\n            }\n\n            /* If no one has add ref'd the filter, drop it */\n            if (pFilter->filterRefCount == 0)\n            {\n                FilterFree(pFilter);\n            }\n\n            /* Deinitialize name hash object */\n            DeinitNameHashObject(&nameHash);\n        }\n    }\n\n    *scanResults = outArgument;\n    *newDeviceCount = idxDevice;\n    return result;\n\nerror:\n    result = DisposeDeviceInfos(hostApi, outArgument, totalDeviceCount);\n\n    return result;\n}\n\nstatic PaError CommitDeviceInfos( struct PaUtilHostApiRepresentation *hostApi, PaHostApiIndex index, void *scanResults, int deviceCount )\n{\n    PaWinWdmHostApiRepresentation *wdmHostApi = (PaWinWdmHostApiRepresentation*)hostApi;\n\n    hostApi->info.deviceCount = 0;\n    hostApi->info.defaultInputDevice = paNoDevice;\n    hostApi->info.defaultOutputDevice = paNoDevice;\n\n    /* Free any old memory which might be in the device info */\n    if( hostApi->deviceInfos )\n    {\n        PaWinWDMScanDeviceInfosResults* localScanResults = (PaWinWDMScanDeviceInfosResults*)PaUtil_GroupAllocateMemory(\n            wdmHostApi->allocations, sizeof(PaWinWDMScanDeviceInfosResults));\n        localScanResults->deviceInfos = hostApi->deviceInfos;\n\n        DisposeDeviceInfos(hostApi, &localScanResults, hostApi->info.deviceCount);\n\n        hostApi->deviceInfos = NULL;\n    }\n\n    if( scanResults != NULL )\n    {\n        PaWinWDMScanDeviceInfosResults *scanDeviceInfosResults = ( PaWinWDMScanDeviceInfosResults * ) scanResults;\n\n        if( deviceCount > 0 )\n        {\n            /* use the array allocated in ScanDeviceInfos() as our deviceInfos */\n            hostApi->deviceInfos = scanDeviceInfosResults->deviceInfos;\n\n            hostApi->info.defaultInputDevice = scanDeviceInfosResults->defaultInputDevice;\n            hostApi->info.defaultOutputDevice = scanDeviceInfosResults->defaultOutputDevice;\n\n            hostApi->info.deviceCount = deviceCount;\n        }\n\n        PaUtil_GroupFreeMemory( wdmHostApi->allocations, scanDeviceInfosResults );\n    }\n\n    return paNoError;\n\n}\n\nstatic PaError DisposeDeviceInfos( struct PaUtilHostApiRepresentation *hostApi, void *scanResults, int deviceCount )\n{\n    PaWinWdmHostApiRepresentation *winDsHostApi = (PaWinWdmHostApiRepresentation*)hostApi;\n\n    if( scanResults != NULL )\n    {\n        PaWinWDMScanDeviceInfosResults *scanDeviceInfosResults = ( PaWinWDMScanDeviceInfosResults * ) scanResults;\n\n        if( scanDeviceInfosResults->deviceInfos )\n        {\n            int i;\n            for (i = 0; i < deviceCount; ++i)\n            {\n                PaWinWdmDeviceInfo* pDevice = (PaWinWdmDeviceInfo*)scanDeviceInfosResults->deviceInfos[i];\n                if (pDevice->filter != 0)\n                {\n                    FilterFree(pDevice->filter);\n                }\n            }\n\n            PaUtil_GroupFreeMemory( winDsHostApi->allocations, scanDeviceInfosResults->deviceInfos[0] ); /* all device info structs are allocated in a block so we can destroy them here */\n            PaUtil_GroupFreeMemory( winDsHostApi->allocations, scanDeviceInfosResults->deviceInfos );\n        }\n\n        PaUtil_GroupFreeMemory( winDsHostApi->allocations, scanDeviceInfosResults );\n    }\n\n    return paNoError;\n\n}\n\nPaError PaWinWdm_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex hostApiIndex )\n{\n    PaError result = paNoError;\n    int deviceCount = 0;\n    void *scanResults = 0;\n    PaWinWdmHostApiRepresentation *wdmHostApi = NULL;\n\n    PA_LOGE_;\n\n#ifdef PA_WDMKS_SET_TREF\n    tRef = PaUtil_GetTime();\n#endif\n\n    /*\n    Attempt to load the KSUSER.DLL without which we cannot create pins\n    We will unload this on termination\n    */\n    if(DllKsUser == NULL)\n    {\n        DllKsUser = LoadLibrary(TEXT(\"ksuser.dll\"));\n        if(DllKsUser == NULL)\n            goto error;\n    }\n    FunctionKsCreatePin = (KSCREATEPIN*)GetProcAddress(DllKsUser, \"KsCreatePin\");\n    if(FunctionKsCreatePin == NULL)\n        goto error;\n\n    /* Attempt to load AVRT.DLL, if we can't, then we'll just use time critical prio instead... */\n    if(paWinWDMKSAvRtEntryPoints.hInstance == NULL)\n    {\n        paWinWDMKSAvRtEntryPoints.hInstance = LoadLibrary(TEXT(\"avrt.dll\"));\n        if (paWinWDMKSAvRtEntryPoints.hInstance != NULL)\n        {\n            paWinWDMKSAvRtEntryPoints.AvSetMmThreadCharacteristics =\n                (HANDLE(WINAPI*)(LPCSTR,LPDWORD))GetProcAddress(paWinWDMKSAvRtEntryPoints.hInstance,\"AvSetMmThreadCharacteristicsA\");\n            paWinWDMKSAvRtEntryPoints.AvRevertMmThreadCharacteristics =\n                (BOOL(WINAPI*)(HANDLE))GetProcAddress(paWinWDMKSAvRtEntryPoints.hInstance, \"AvRevertMmThreadCharacteristics\");\n            paWinWDMKSAvRtEntryPoints.AvSetMmThreadPriority =\n                (BOOL(WINAPI*)(HANDLE,PA_AVRT_PRIORITY))GetProcAddress(paWinWDMKSAvRtEntryPoints.hInstance, \"AvSetMmThreadPriority\");\n        }\n    }\n\n    wdmHostApi = (PaWinWdmHostApiRepresentation*)PaUtil_AllocateMemory( sizeof(PaWinWdmHostApiRepresentation) );\n    if( !wdmHostApi )\n    {\n        result = paInsufficientMemory;\n        goto error;\n    }\n\n    wdmHostApi->allocations = PaUtil_CreateAllocationGroup();\n    if( !wdmHostApi->allocations )\n    {\n        result = paInsufficientMemory;\n        goto error;\n    }\n\n    *hostApi = &wdmHostApi->inheritedHostApiRep;\n    (*hostApi)->info.structVersion = 1;\n    (*hostApi)->info.type = paWDMKS;\n    (*hostApi)->info.name = \"Windows WDM-KS\";\n\n    /* these are all updated by CommitDeviceInfos() */\n    (*hostApi)->info.deviceCount = 0;\n    (*hostApi)->info.defaultInputDevice = paNoDevice;\n    (*hostApi)->info.defaultOutputDevice = paNoDevice;\n    (*hostApi)->deviceInfos = 0;\n\n    result = ScanDeviceInfos(&wdmHostApi->inheritedHostApiRep, hostApiIndex, &scanResults, &deviceCount);\n    if (result != paNoError)\n    {\n        goto error;\n    }\n\n    CommitDeviceInfos(&wdmHostApi->inheritedHostApiRep, hostApiIndex, scanResults, deviceCount);\n\n    (*hostApi)->Terminate = Terminate;\n    (*hostApi)->OpenStream = OpenStream;\n    (*hostApi)->IsFormatSupported = IsFormatSupported;\n    /* In preparation for hotplug\n    (*hostApi)->ScanDeviceInfos = ScanDeviceInfos;\n    (*hostApi)->CommitDeviceInfos = CommitDeviceInfos;\n    (*hostApi)->DisposeDeviceInfos = DisposeDeviceInfos;\n    */\n    PaUtil_InitializeStreamInterface( &wdmHostApi->callbackStreamInterface, CloseStream, StartStream,\n        StopStream, AbortStream, IsStreamStopped, IsStreamActive,\n        GetStreamTime, GetStreamCpuLoad,\n        PaUtil_DummyRead, PaUtil_DummyWrite,\n        PaUtil_DummyGetReadAvailable, PaUtil_DummyGetWriteAvailable );\n\n    PaUtil_InitializeStreamInterface( &wdmHostApi->blockingStreamInterface, CloseStream, StartStream,\n        StopStream, AbortStream, IsStreamStopped, IsStreamActive,\n        GetStreamTime, PaUtil_DummyGetCpuLoad,\n        ReadStream, WriteStream, GetStreamReadAvailable, GetStreamWriteAvailable );\n\n    PA_LOGL_;\n    return result;\n\nerror:\n    Terminate( (PaUtilHostApiRepresentation*)wdmHostApi );\n\n    PA_LOGL_;\n    return result;\n}\n\n\nstatic void Terminate( struct PaUtilHostApiRepresentation *hostApi )\n{\n    PaWinWdmHostApiRepresentation *wdmHostApi = (PaWinWdmHostApiRepresentation*)hostApi;\n    PA_LOGE_;\n\n    /* Do not unload the libraries */\n    if( DllKsUser != NULL )\n    {\n        FreeLibrary( DllKsUser );\n        DllKsUser = NULL;\n    }\n\n    if( paWinWDMKSAvRtEntryPoints.hInstance != NULL )\n    {\n        FreeLibrary( paWinWDMKSAvRtEntryPoints.hInstance );\n        paWinWDMKSAvRtEntryPoints.hInstance = NULL;\n    }\n\n    if( wdmHostApi)\n    {\n        PaWinWDMScanDeviceInfosResults* localScanResults = (PaWinWDMScanDeviceInfosResults*)PaUtil_GroupAllocateMemory(\n            wdmHostApi->allocations, sizeof(PaWinWDMScanDeviceInfosResults));\n        localScanResults->deviceInfos = hostApi->deviceInfos;\n        DisposeDeviceInfos(hostApi, localScanResults, hostApi->info.deviceCount);\n\n        if( wdmHostApi->allocations )\n        {\n            PaUtil_FreeAllAllocations( wdmHostApi->allocations );\n            PaUtil_DestroyAllocationGroup( wdmHostApi->allocations );\n        }\n        PaUtil_FreeMemory( wdmHostApi );\n    }\n    PA_LOGL_;\n}\n\nstatic PaError IsFormatSupported( struct PaUtilHostApiRepresentation *hostApi,\n                                 const PaStreamParameters *inputParameters,\n                                 const PaStreamParameters *outputParameters,\n                                 double sampleRate )\n{\n    int inputChannelCount, outputChannelCount;\n    PaSampleFormat inputSampleFormat, outputSampleFormat;\n    PaWinWdmHostApiRepresentation *wdmHostApi = (PaWinWdmHostApiRepresentation*)hostApi;\n    PaWinWdmFilter* pFilter;\n    int result = paFormatIsSupported;\n    WAVEFORMATEXTENSIBLE wfx;\n    PaWinWaveFormatChannelMask channelMask;\n\n    PA_LOGE_;\n\n    if( inputParameters )\n    {\n        PaWinWdmDeviceInfo* pDeviceInfo = (PaWinWdmDeviceInfo*)wdmHostApi->inheritedHostApiRep.deviceInfos[inputParameters->device];\n        PaWinWdmPin* pin;\n        unsigned fmt;\n        unsigned long testFormat = 0;\n        unsigned validBits = 0;\n\n        inputChannelCount = inputParameters->channelCount;\n        inputSampleFormat = inputParameters->sampleFormat;\n\n        /* all standard sample formats are supported by the buffer adapter,\n        this implementation doesn't support any custom sample formats */\n        if( inputSampleFormat & paCustomFormat )\n        {\n            PaWinWDM_SetLastErrorInfo(paSampleFormatNotSupported, \"IsFormatSupported: Custom input format not supported\");\n            return paSampleFormatNotSupported;\n        }\n\n        /* unless alternate device specification is supported, reject the use of\n        paUseHostApiSpecificDeviceSpecification */\n\n        if( inputParameters->device == paUseHostApiSpecificDeviceSpecification )\n        {\n            PaWinWDM_SetLastErrorInfo(paInvalidDevice, \"IsFormatSupported: paUseHostApiSpecificDeviceSpecification not supported\");\n            return paInvalidDevice;\n        }\n\n        /* check that input device can support inputChannelCount */\n        if( inputChannelCount > hostApi->deviceInfos[ inputParameters->device ]->maxInputChannels )\n        {\n            PaWinWDM_SetLastErrorInfo(paInvalidChannelCount, \"IsFormatSupported: Invalid input channel count\");\n            return paInvalidChannelCount;\n        }\n\n        /* validate inputStreamInfo */\n        if( inputParameters->hostApiSpecificStreamInfo )\n        {\n            PaWinWDM_SetLastErrorInfo(paIncompatibleHostApiSpecificStreamInfo, \"Host API stream info not supported\");\n            return paIncompatibleHostApiSpecificStreamInfo; /* this implementation doesn't use custom stream info */\n        }\n\n        pFilter = pDeviceInfo->filter;\n        pin = pFilter->pins[pDeviceInfo->pin];\n\n        /* Find out the testing format */\n        for (fmt = paFloat32; fmt <= paUInt8; fmt <<= 1)\n        {\n            if ((fmt & pin->formats) != 0)\n            {\n                /* Found a matching format! */\n                testFormat = fmt;\n                break;\n            }\n        }\n        if (testFormat == 0)\n        {\n            PaWinWDM_SetLastErrorInfo(result, \"IsFormatSupported(capture) failed: no testformat found!\");\n            return paUnanticipatedHostError;\n        }\n\n        /* Due to special considerations, WaveRT devices with paInt24 should be tested with paInt32 and\n        valid bits = 24 (instead of 24 bit samples) */\n        if (pFilter->devInfo.streamingType == Type_kWaveRT && testFormat == paInt24)\n        {\n            PA_DEBUG((\"IsFormatSupported (capture): WaveRT overriding testFormat paInt24 with paInt32 (24 valid bits)\"));\n            testFormat = paInt32;\n            validBits = 24;\n        }\n\n        /* Check that the input format is supported */\n        channelMask = PaWin_DefaultChannelMask(inputChannelCount);\n        PaWin_InitializeWaveFormatExtensible((PaWinWaveFormat*)&wfx,\n            inputChannelCount,\n            testFormat,\n            PaWin_SampleFormatToLinearWaveFormatTag(testFormat),\n            sampleRate,\n            channelMask );\n        if (validBits != 0)\n        {\n            wfx.Samples.wValidBitsPerSample = validBits;\n        }\n\n        result = PinIsFormatSupported(pin, (const WAVEFORMATEX*)&wfx);\n        if( result != paNoError )\n        {\n            /* Try a WAVE_FORMAT_PCM instead */\n            PaWin_InitializeWaveFormatEx((PaWinWaveFormat*)&wfx,\n                inputChannelCount,\n                testFormat,\n                PaWin_SampleFormatToLinearWaveFormatTag(testFormat),\n                sampleRate);\n\n            if (validBits != 0)\n            {\n                wfx.Samples.wValidBitsPerSample = validBits;\n            }\n\n            result = PinIsFormatSupported(pin, (const WAVEFORMATEX*)&wfx);\n            if( result != paNoError )\n            {\n                PaWinWDM_SetLastErrorInfo(result, \"IsFormatSupported(capture) failed: sr=%u,ch=%u,bits=%u\", wfx.Format.nSamplesPerSec, wfx.Format.nChannels, wfx.Format.wBitsPerSample);\n                return result;\n            }\n        }\n    }\n    else\n    {\n        inputChannelCount = 0;\n    }\n\n    if( outputParameters )\n    {\n        PaWinWdmDeviceInfo* pDeviceInfo = (PaWinWdmDeviceInfo*)wdmHostApi->inheritedHostApiRep.deviceInfos[outputParameters->device];\n        PaWinWdmPin* pin;\n        unsigned fmt;\n        unsigned long testFormat = 0;\n        unsigned validBits = 0;\n\n        outputChannelCount = outputParameters->channelCount;\n        outputSampleFormat = outputParameters->sampleFormat;\n\n        /* all standard sample formats are supported by the buffer adapter,\n        this implementation doesn't support any custom sample formats */\n        if( outputSampleFormat & paCustomFormat )\n        {\n            PaWinWDM_SetLastErrorInfo(paSampleFormatNotSupported, \"IsFormatSupported: Custom output format not supported\");\n            return paSampleFormatNotSupported;\n        }\n\n        /* unless alternate device specification is supported, reject the use of\n        paUseHostApiSpecificDeviceSpecification */\n\n        if( outputParameters->device == paUseHostApiSpecificDeviceSpecification )\n        {\n            PaWinWDM_SetLastErrorInfo(paInvalidDevice, \"IsFormatSupported: paUseHostApiSpecificDeviceSpecification not supported\");\n            return paInvalidDevice;\n        }\n\n        /* check that output device can support outputChannelCount */\n        if( outputChannelCount > hostApi->deviceInfos[ outputParameters->device ]->maxOutputChannels )\n        {\n            PaWinWDM_SetLastErrorInfo(paInvalidChannelCount, \"Invalid output channel count\");\n            return paInvalidChannelCount;\n        }\n\n        /* validate outputStreamInfo */\n        if( outputParameters->hostApiSpecificStreamInfo )\n        {\n            PaWinWDM_SetLastErrorInfo(paIncompatibleHostApiSpecificStreamInfo, \"Host API stream info not supported\");\n            return paIncompatibleHostApiSpecificStreamInfo; /* this implementation doesn't use custom stream info */\n        }\n\n        pFilter = pDeviceInfo->filter;\n        pin = pFilter->pins[pDeviceInfo->pin];\n\n        /* Find out the testing format */\n        for (fmt = paFloat32; fmt <= paUInt8; fmt <<= 1)\n        {\n            if ((fmt & pin->formats) != 0)\n            {\n                /* Found a matching format! */\n                testFormat = fmt;\n                break;\n            }\n        }\n        if (testFormat == 0)\n        {\n            PaWinWDM_SetLastErrorInfo(result, \"IsFormatSupported(render) failed: no testformat found!\");\n            return paUnanticipatedHostError;\n        }\n\n        /* Due to special considerations, WaveRT devices with paInt24 should be tested with paInt32 and\n        valid bits = 24 (instead of 24 bit samples) */\n        if (pFilter->devInfo.streamingType == Type_kWaveRT && testFormat == paInt24)\n        {\n            PA_DEBUG((\"IsFormatSupported (render): WaveRT overriding testFormat paInt24 with paInt32 (24 valid bits)\"));\n            testFormat = paInt32;\n            validBits = 24;\n        }\n\n        /* Check that the output format is supported */\n        channelMask = PaWin_DefaultChannelMask(outputChannelCount);\n        PaWin_InitializeWaveFormatExtensible((PaWinWaveFormat*)&wfx,\n            outputChannelCount,\n            testFormat,\n            PaWin_SampleFormatToLinearWaveFormatTag(testFormat),\n            sampleRate,\n            channelMask );\n\n        if (validBits != 0)\n        {\n            wfx.Samples.wValidBitsPerSample = validBits;\n        }\n\n        result = PinIsFormatSupported(pin, (const WAVEFORMATEX*)&wfx);\n        if( result != paNoError )\n        {\n            /* Try a WAVE_FORMAT_PCM instead */\n            PaWin_InitializeWaveFormatEx((PaWinWaveFormat*)&wfx,\n                outputChannelCount,\n                testFormat,\n                PaWin_SampleFormatToLinearWaveFormatTag(testFormat),\n                sampleRate);\n\n            if (validBits != 0)\n            {\n                wfx.Samples.wValidBitsPerSample = validBits;\n            }\n\n            result = PinIsFormatSupported(pin, (const WAVEFORMATEX*)&wfx);\n            if( result != paNoError )\n            {\n                PaWinWDM_SetLastErrorInfo(result, \"IsFormatSupported(render) failed: %u,%u,%u\", wfx.Format.nSamplesPerSec, wfx.Format.nChannels, wfx.Format.wBitsPerSample);\n                return result;\n            }\n        }\n\n    }\n    else\n    {\n        outputChannelCount = 0;\n    }\n\n    /*\n    IMPLEMENT ME:\n\n    - if a full duplex stream is requested, check that the combination\n    of input and output parameters is supported if necessary\n\n    - check that the device supports sampleRate\n\n    Because the buffer adapter handles conversion between all standard\n    sample formats, the following checks are only required if paCustomFormat\n    is implemented, or under some other unusual conditions.\n\n    - check that input device can support inputSampleFormat, or that\n    we have the capability to convert from inputSampleFormat to\n    a native format\n\n    - check that output device can support outputSampleFormat, or that\n    we have the capability to convert from outputSampleFormat to\n    a native format\n    */\n    if((inputChannelCount == 0)&&(outputChannelCount == 0))\n    {\n        PaWinWDM_SetLastErrorInfo(paSampleFormatNotSupported, \"No input or output channels defined\");\n        result = paSampleFormatNotSupported; /* Not right error */\n    }\n\n    PA_LOGL_;\n    return result;\n}\n\nstatic void ResetStreamEvents(PaWinWdmStream* stream)\n{\n    unsigned i;\n    ResetEvent(stream->eventAbort);\n    ResetEvent(stream->eventStreamStart[StreamStart_kOk]);\n    ResetEvent(stream->eventStreamStart[StreamStart_kFailed]);\n\n    for (i=0; i<stream->capture.noOfPackets; ++i)\n    {\n        if (stream->capture.events && stream->capture.events[i])\n        {\n            ResetEvent(stream->capture.events[i]);\n        }\n    }\n\n    for (i=0; i<stream->render.noOfPackets; ++i)\n    {\n        if (stream->render.events && stream->render.events[i])\n        {\n            ResetEvent(stream->render.events[i]);\n        }\n    }\n}\n\nstatic void CloseStreamEvents(PaWinWdmStream* stream)\n{\n    unsigned i;\n    PaWinWdmIOInfo* ios[2] = { &stream->capture, &stream->render };\n\n    if (stream->eventAbort)\n    {\n        CloseHandle(stream->eventAbort);\n        stream->eventAbort = 0;\n    }\n    if (stream->eventStreamStart[StreamStart_kOk])\n    {\n        CloseHandle(stream->eventStreamStart[StreamStart_kOk]);\n    }\n    if (stream->eventStreamStart[StreamStart_kFailed])\n    {\n        CloseHandle(stream->eventStreamStart[StreamStart_kFailed]);\n    }\n\n    for (i = 0; i < 2; ++i)\n    {\n        unsigned j;\n        /* Unregister notification handles for WaveRT */\n        if (ios[i]->pPin && ios[i]->pPin->parentFilter->devInfo.streamingType == Type_kWaveRT &&\n            ios[i]->pPin->pinKsSubType == SubType_kNotification &&\n            ios[i]->events != 0)\n        {\n            PinUnregisterNotificationHandle(ios[i]->pPin, ios[i]->events[0]);\n        }\n\n        for (j=0; j < ios[i]->noOfPackets; ++j)\n        {\n            if (ios[i]->events && ios[i]->events[j])\n            {\n                CloseHandle(ios[i]->events[j]);\n                ios[i]->events[j] = 0;\n            }\n        }\n    }\n}\n\nstatic unsigned NextPowerOf2(unsigned val)\n{\n    val--;\n    val = (val >> 1) | val;\n    val = (val >> 2) | val;\n    val = (val >> 4) | val;\n    val = (val >> 8) | val;\n    val = (val >> 16) | val;\n    return ++val;\n}\n\nstatic PaError ValidateSpecificStreamParameters(\n    const PaStreamParameters *streamParameters,\n    const PaWinWDMKSInfo *streamInfo,\n    unsigned isInput)\n{\n    if( streamInfo )\n    {\n        if( streamInfo->size != sizeof( PaWinWDMKSInfo )\n            || streamInfo->version != 1 )\n        {\n            PA_DEBUG((\"Stream parameters: size or version not correct\"));\n            return paIncompatibleHostApiSpecificStreamInfo;\n        }\n\n        if (!!(streamInfo->flags & ~(paWinWDMKSOverrideFramesize | paWinWDMKSUseGivenChannelMask)))\n        {\n            PA_DEBUG((\"Stream parameters: non supported flags set\"));\n            return paIncompatibleHostApiSpecificStreamInfo;\n        }\n\n        if (streamInfo->noOfPackets != 0 &&\n            (streamInfo->noOfPackets < 2 || streamInfo->noOfPackets > 8))\n        {\n            PA_DEBUG((\"Stream parameters: noOfPackets %u out of range [2,8]\", streamInfo->noOfPackets));\n            return paIncompatibleHostApiSpecificStreamInfo;\n        }\n\n        if (streamInfo->flags & paWinWDMKSUseGivenChannelMask)\n        {\n            if (isInput)\n            {\n                PA_DEBUG((\"Stream parameters: Channels mask setting not supported for input stream\"));\n                return paIncompatibleHostApiSpecificStreamInfo;\n            }\n\n            if (streamInfo->channelMask & PAWIN_SPEAKER_RESERVED)\n            {\n                PA_DEBUG((\"Stream parameters: Given channels mask 0x%08X not supported\", streamInfo->channelMask));\n                return paIncompatibleHostApiSpecificStreamInfo;\n            }\n        }\n\n    }\n\n    return paNoError;\n}\n\n\n\n\n/* see pa_hostapi.h for a list of validity guarantees made about OpenStream parameters */\n\nstatic PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,\n                          PaStream** s,\n                          const PaStreamParameters *inputParameters,\n                          const PaStreamParameters *outputParameters,\n                          double sampleRate,\n                          unsigned long framesPerUserBuffer,\n                          PaStreamFlags streamFlags,\n                          PaStreamCallback *streamCallback,\n                          void *userData )\n{\n    PaError result = paNoError;\n    PaWinWdmHostApiRepresentation *wdmHostApi = (PaWinWdmHostApiRepresentation*)hostApi;\n    PaWinWdmStream *stream = 0;\n    /* unsigned long framesPerHostBuffer; these may not be equivalent for all implementations */\n    PaSampleFormat inputSampleFormat, outputSampleFormat;\n    PaSampleFormat hostInputSampleFormat, hostOutputSampleFormat;\n    int userInputChannels,userOutputChannels;\n    WAVEFORMATEXTENSIBLE wfx;\n\n    PA_LOGE_;\n    PA_DEBUG((\"OpenStream:sampleRate = %f\\n\",sampleRate));\n    PA_DEBUG((\"OpenStream:framesPerBuffer = %lu\\n\",framesPerUserBuffer));\n\n    if( inputParameters )\n    {\n        userInputChannels = inputParameters->channelCount;\n        inputSampleFormat = inputParameters->sampleFormat;\n\n        /* unless alternate device specification is supported, reject the use of\n        paUseHostApiSpecificDeviceSpecification */\n\n        if( inputParameters->device == paUseHostApiSpecificDeviceSpecification )\n        {\n            PaWinWDM_SetLastErrorInfo(paInvalidDevice, \"paUseHostApiSpecificDeviceSpecification(in) not supported\");\n            return paInvalidDevice;\n        }\n\n        /* check that input device can support stream->userInputChannels */\n        if( userInputChannels > hostApi->deviceInfos[ inputParameters->device ]->maxInputChannels )\n        {\n            PaWinWDM_SetLastErrorInfo(paInvalidChannelCount, \"Invalid input channel count\");\n            return paInvalidChannelCount;\n        }\n\n        /* validate inputStreamInfo */\n        result = ValidateSpecificStreamParameters(inputParameters, inputParameters->hostApiSpecificStreamInfo, 1 );\n        if(result != paNoError)\n        {\n            PaWinWDM_SetLastErrorInfo(result, \"Host API stream info not supported (in)\");\n            return result; /* this implementation doesn't use custom stream info */\n        }\n    }\n    else\n    {\n        userInputChannels = 0;\n        inputSampleFormat = paInt16; /* Suppress 'uninitialised var' warnings. */\n    }\n\n    if( outputParameters )\n    {\n        userOutputChannels = outputParameters->channelCount;\n        outputSampleFormat = outputParameters->sampleFormat;\n\n        /* unless alternate device specification is supported, reject the use of\n        paUseHostApiSpecificDeviceSpecification */\n\n        if( outputParameters->device == paUseHostApiSpecificDeviceSpecification )\n        {\n            PaWinWDM_SetLastErrorInfo(paInvalidDevice, \"paUseHostApiSpecificDeviceSpecification(out) not supported\");\n            return paInvalidDevice;\n        }\n\n        /* check that output device can support stream->userInputChannels */\n        if( userOutputChannels > hostApi->deviceInfos[ outputParameters->device ]->maxOutputChannels )\n        {\n            PaWinWDM_SetLastErrorInfo(paInvalidChannelCount, \"Invalid output channel count\");\n            return paInvalidChannelCount;\n        }\n\n        /* validate outputStreamInfo */\n        result = ValidateSpecificStreamParameters( outputParameters, outputParameters->hostApiSpecificStreamInfo, 0 );\n        if (result != paNoError)\n        {\n            PaWinWDM_SetLastErrorInfo(result, \"Host API stream info not supported (out)\");\n            return result; /* this implementation doesn't use custom stream info */\n        }\n    }\n    else\n    {\n        userOutputChannels = 0;\n        outputSampleFormat = paInt16; /* Suppress 'uninitialized var' warnings. */\n    }\n\n    /* validate platform specific flags */\n    if( (streamFlags & paPlatformSpecificFlags) != 0 )\n    {\n        PaWinWDM_SetLastErrorInfo(paInvalidFlag, \"Invalid flag supplied\");\n        return paInvalidFlag; /* unexpected platform specific flag */\n    }\n\n    stream = (PaWinWdmStream*)PaUtil_AllocateMemory( sizeof(PaWinWdmStream) );\n    if( !stream )\n    {\n        result = paInsufficientMemory;\n        goto error;\n    }\n\n    /* Create allocation group */\n    stream->allocGroup = PaUtil_CreateAllocationGroup();\n    if( !stream->allocGroup )\n    {\n        result = paInsufficientMemory;\n        goto error;\n    }\n\n    /* Zero the stream object */\n    /* memset((void*)stream,0,sizeof(PaWinWdmStream)); */\n\n    if( streamCallback )\n    {\n        PaUtil_InitializeStreamRepresentation( &stream->streamRepresentation,\n            &wdmHostApi->callbackStreamInterface, streamCallback, userData );\n    }\n    else\n    {\n        /* PaUtil_InitializeStreamRepresentation( &stream->streamRepresentation,\n        &wdmHostApi->blockingStreamInterface, streamCallback, userData ); */\n\n        /* We don't support the blocking API yet */\n        PA_DEBUG((\"Blocking API not supported yet!\\n\"));\n        PaWinWDM_SetLastErrorInfo(paUnanticipatedHostError, \"Blocking API not supported yet\");\n        result = paUnanticipatedHostError;\n        goto error;\n    }\n\n    PaUtil_InitializeCpuLoadMeasurer( &stream->cpuLoadMeasurer, sampleRate );\n\n    /* Instantiate the input pin if necessary */\n    if(userInputChannels > 0)\n    {\n        PaWinWdmFilter* pFilter;\n        PaWinWdmDeviceInfo* pDeviceInfo;\n        PaWinWdmPin* pPin;\n        unsigned validBitsPerSample = 0;\n        PaWinWaveFormatChannelMask channelMask = PaWin_DefaultChannelMask( userInputChannels );\n\n        result = paSampleFormatNotSupported;\n        pDeviceInfo = (PaWinWdmDeviceInfo*)wdmHostApi->inheritedHostApiRep.deviceInfos[inputParameters->device];\n        pFilter = pDeviceInfo->filter;\n        pPin = pFilter->pins[pDeviceInfo->pin];\n\n        stream->userInputChannels = userInputChannels;\n\n        hostInputSampleFormat = PaUtil_SelectClosestAvailableFormat( pPin->formats, inputSampleFormat );\n        if (hostInputSampleFormat == paSampleFormatNotSupported)\n        {\n            result = paUnanticipatedHostError;\n            PaWinWDM_SetLastErrorInfo(result, \"PU_SCAF(%X,%X) failed (input)\", pPin->formats, inputSampleFormat);\n            goto error;\n        }\n        else if (pFilter->devInfo.streamingType == Type_kWaveRT && hostInputSampleFormat == paInt24)\n        {\n            /* For WaveRT, we choose 32 bit format instead of paInt24, since we MIGHT need to align buffer on a\n            128 byte boundary (see PinGetBuffer) */\n            hostInputSampleFormat = paInt32;\n            /* But we'll tell the driver that it's 24 bit in 32 bit container */\n            validBitsPerSample = 24;\n        }\n\n        while (hostInputSampleFormat <= paUInt8)\n        {\n            unsigned channelsToProbe = stream->userInputChannels;\n            /* Some or all KS devices can only handle the exact number of channels\n            * they specify. But PortAudio clients expect to be able to\n            * at least specify mono I/O on a multi-channel device\n            * If this is the case, then we will do the channel mapping internally\n            * The following loop tests this case\n            **/\n            while (1)\n            {\n                PaWin_InitializeWaveFormatExtensible((PaWinWaveFormat*)&wfx,\n                    channelsToProbe,\n                    hostInputSampleFormat,\n                    PaWin_SampleFormatToLinearWaveFormatTag(hostInputSampleFormat),\n                    sampleRate,\n                    channelMask );\n                stream->capture.bytesPerFrame = wfx.Format.nBlockAlign;\n                if (validBitsPerSample != 0)\n                {\n                    wfx.Samples.wValidBitsPerSample = validBitsPerSample;\n                }\n                stream->capture.pPin = FilterCreatePin(pFilter, pPin->pinId, (WAVEFORMATEX*)&wfx, &result);\n                stream->deviceInputChannels = channelsToProbe;\n\n                if( result != paNoError && result != paDeviceUnavailable )\n                {\n                    /* Try a WAVE_FORMAT_PCM instead */\n                    PaWin_InitializeWaveFormatEx((PaWinWaveFormat*)&wfx,\n                        channelsToProbe,\n                        hostInputSampleFormat,\n                        PaWin_SampleFormatToLinearWaveFormatTag(hostInputSampleFormat),\n                        sampleRate);\n                    if (validBitsPerSample != 0)\n                    {\n                        wfx.Samples.wValidBitsPerSample = validBitsPerSample;\n                    }\n                    stream->capture.pPin = FilterCreatePin(pFilter, pPin->pinId, (const WAVEFORMATEX*)&wfx, &result);\n                }\n\n                if (result == paDeviceUnavailable) goto occupied;\n\n                if (result == paNoError)\n                {\n                    /* We're done */\n                    break;\n                }\n\n                if (channelsToProbe < (unsigned)pPin->maxChannels)\n                {\n                    /* Go to next multiple of 2 */\n                    channelsToProbe = min((((channelsToProbe>>1)+1)<<1), (unsigned)pPin->maxChannels);\n                    continue;\n                }\n\n                break;\n            }\n\n            if (result == paNoError)\n            {\n                /* We're done */\n                break;\n            }\n\n            /* Go to next format in line with lower resolution */\n            hostInputSampleFormat <<= 1;\n        }\n\n        if(stream->capture.pPin == NULL)\n        {\n            PaWinWDM_SetLastErrorInfo(result, \"Failed to create capture pin: sr=%u,ch=%u,bits=%u,align=%u\",\n                wfx.Format.nSamplesPerSec, wfx.Format.nChannels, wfx.Format.wBitsPerSample, wfx.Format.nBlockAlign);\n            goto error;\n        }\n\n        /* Select correct mux input on MUX node of topology filter */\n        if (pDeviceInfo->muxPosition >= 0)\n        {\n            assert(pPin->parentFilter->topologyFilter != NULL);\n\n            result = FilterUse(pPin->parentFilter->topologyFilter);\n            if (result != paNoError)\n            {\n                PaWinWDM_SetLastErrorInfo(result, \"Failed to open topology filter\");\n                goto error;\n            }\n\n            result = WdmSetMuxNodeProperty(pPin->parentFilter->topologyFilter->handle,\n                pPin->inputs[pDeviceInfo->muxPosition]->muxNodeId,\n                pPin->inputs[pDeviceInfo->muxPosition]->muxPinId);\n\n            FilterRelease(pPin->parentFilter->topologyFilter);\n\n            if(result != paNoError)\n            {\n                PaWinWDM_SetLastErrorInfo(result, \"Failed to set topology mux node\");\n                goto error;\n            }\n        }\n\n        stream->capture.bytesPerSample = stream->capture.bytesPerFrame / stream->deviceInputChannels;\n        stream->capture.pPin->frameSize /= stream->capture.bytesPerFrame;\n        PA_DEBUG((\"Capture pin frames: %d\\n\",stream->capture.pPin->frameSize));\n    }\n    else\n    {\n        hostInputSampleFormat = (PaSampleFormat)0; /* Avoid uninitialized variable warning */\n\n        stream->capture.pPin = NULL;\n        stream->capture.bytesPerFrame = 0;\n    }\n\n    /* Instantiate the output pin if necessary */\n    if(userOutputChannels > 0)\n    {\n        PaWinWdmFilter* pFilter;\n        PaWinWdmDeviceInfo* pDeviceInfo;\n        PaWinWdmPin* pPin;\n        PaWinWDMKSInfo* pInfo = (PaWinWDMKSInfo*)(outputParameters->hostApiSpecificStreamInfo);\n        unsigned validBitsPerSample = 0;\n        PaWinWaveFormatChannelMask channelMask = PaWin_DefaultChannelMask( userOutputChannels );\n        if (pInfo && (pInfo->flags & paWinWDMKSUseGivenChannelMask))\n        {\n            PA_DEBUG((\"Using channelMask 0x%08X instead of default 0x%08X\\n\",\n                pInfo->channelMask,\n                channelMask));\n            channelMask = pInfo->channelMask;\n        }\n\n        result = paSampleFormatNotSupported;\n        pDeviceInfo = (PaWinWdmDeviceInfo*)wdmHostApi->inheritedHostApiRep.deviceInfos[outputParameters->device];\n        pFilter = pDeviceInfo->filter;\n        pPin = pFilter->pins[pDeviceInfo->pin];\n\n        stream->userOutputChannels = userOutputChannels;\n\n        hostOutputSampleFormat = PaUtil_SelectClosestAvailableFormat( pPin->formats, outputSampleFormat );\n        if (hostOutputSampleFormat == paSampleFormatNotSupported)\n        {\n            result = paUnanticipatedHostError;\n            PaWinWDM_SetLastErrorInfo(result, \"PU_SCAF(%X,%X) failed (output)\", pPin->formats, hostOutputSampleFormat);\n            goto error;\n        }\n        else if (pFilter->devInfo.streamingType == Type_kWaveRT && hostOutputSampleFormat == paInt24)\n        {\n            /* For WaveRT, we choose 32 bit format instead of paInt24, since we MIGHT need to align buffer on a\n            128 byte boundary (see PinGetBuffer) */\n            hostOutputSampleFormat = paInt32;\n            /* But we'll tell the driver that it's 24 bit in 32 bit container */\n            validBitsPerSample = 24;\n        }\n\n        while (hostOutputSampleFormat <= paUInt8)\n        {\n            unsigned channelsToProbe = stream->userOutputChannels;\n            /* Some or all KS devices can only handle the exact number of channels\n            * they specify. But PortAudio clients expect to be able to\n            * at least specify mono I/O on a multi-channel device\n            * If this is the case, then we will do the channel mapping internally\n            * The following loop tests this case\n            **/\n            while (1)\n            {\n                PaWin_InitializeWaveFormatExtensible((PaWinWaveFormat*)&wfx,\n                    channelsToProbe,\n                    hostOutputSampleFormat,\n                    PaWin_SampleFormatToLinearWaveFormatTag(hostOutputSampleFormat),\n                    sampleRate,\n                    channelMask );\n                stream->render.bytesPerFrame = wfx.Format.nBlockAlign;\n                if (validBitsPerSample != 0)\n                {\n                    wfx.Samples.wValidBitsPerSample = validBitsPerSample;\n                }\n                stream->render.pPin = FilterCreatePin(pFilter, pPin->pinId, (WAVEFORMATEX*)&wfx, &result);\n                stream->deviceOutputChannels = channelsToProbe;\n\n                if( result != paNoError && result != paDeviceUnavailable )\n                {\n                    PaWin_InitializeWaveFormatEx((PaWinWaveFormat*)&wfx,\n                        channelsToProbe,\n                        hostOutputSampleFormat,\n                        PaWin_SampleFormatToLinearWaveFormatTag(hostOutputSampleFormat),\n                        sampleRate);\n                    if (validBitsPerSample != 0)\n                    {\n                        wfx.Samples.wValidBitsPerSample = validBitsPerSample;\n                    }\n                    stream->render.pPin = FilterCreatePin(pFilter, pPin->pinId, (const WAVEFORMATEX*)&wfx, &result);\n                }\n\n                if (result == paDeviceUnavailable) goto occupied;\n\n                if (result == paNoError)\n                {\n                    /* We're done */\n                    break;\n                }\n\n                if (channelsToProbe < (unsigned)pPin->maxChannels)\n                {\n                    /* Go to next multiple of 2 */\n                    channelsToProbe = min((((channelsToProbe>>1)+1)<<1), (unsigned)pPin->maxChannels);\n                    continue;\n                }\n\n                break;\n            };\n\n            if (result == paNoError)\n            {\n                /* We're done */\n                break;\n            }\n\n            /* Go to next format in line with lower resolution */\n            hostOutputSampleFormat <<= 1;\n        }\n\n        if(stream->render.pPin == NULL)\n        {\n            PaWinWDM_SetLastErrorInfo(result, \"Failed to create render pin: sr=%u,ch=%u,bits=%u,align=%u\",\n                wfx.Format.nSamplesPerSec, wfx.Format.nChannels, wfx.Format.wBitsPerSample, wfx.Format.nBlockAlign);\n            goto error;\n        }\n\n        stream->render.bytesPerSample = stream->render.bytesPerFrame / stream->deviceOutputChannels;\n        stream->render.pPin->frameSize /= stream->render.bytesPerFrame;\n        PA_DEBUG((\"Render pin frames: %d\\n\",stream->render.pPin->frameSize));\n    }\n    else\n    {\n        hostOutputSampleFormat = (PaSampleFormat)0; /* Avoid uninitialized variable warning */\n\n        stream->render.pPin = NULL;\n        stream->render.bytesPerFrame = 0;\n    }\n\n    /* Calculate the framesPerHostXxxxBuffer size based upon the suggested latency values */\n    /* Record the buffer length */\n    if(inputParameters)\n    {\n        /* Calculate the frames from the user's value - add a bit to round up */\n        stream->capture.framesPerBuffer = (unsigned long)((inputParameters->suggestedLatency*sampleRate)+0.0001);\n        if(stream->capture.framesPerBuffer > (unsigned long)sampleRate)\n        { /* Upper limit is 1 second */\n            stream->capture.framesPerBuffer = (unsigned long)sampleRate;\n        }\n        else if(stream->capture.framesPerBuffer < stream->capture.pPin->frameSize)\n        {\n            stream->capture.framesPerBuffer = stream->capture.pPin->frameSize;\n        }\n        PA_DEBUG((\"Input frames chosen:%ld\\n\",stream->capture.framesPerBuffer));\n\n        /* Setup number of packets to use */\n        stream->capture.noOfPackets = 2;\n\n        if (inputParameters->hostApiSpecificStreamInfo)\n        {\n            PaWinWDMKSInfo* pInfo = (PaWinWDMKSInfo*)inputParameters->hostApiSpecificStreamInfo;\n\n            if (stream->capture.pPin->parentFilter->devInfo.streamingType == Type_kWaveCyclic &&\n                pInfo->noOfPackets != 0)\n            {\n                stream->capture.noOfPackets = pInfo->noOfPackets;\n            }\n        }\n    }\n\n    if(outputParameters)\n    {\n        /* Calculate the frames from the user's value - add a bit to round up */\n        stream->render.framesPerBuffer = (unsigned long)((outputParameters->suggestedLatency*sampleRate)+0.0001);\n        if(stream->render.framesPerBuffer > (unsigned long)sampleRate)\n        { /* Upper limit is 1 second */\n            stream->render.framesPerBuffer = (unsigned long)sampleRate;\n        }\n        else if(stream->render.framesPerBuffer < stream->render.pPin->frameSize)\n        {\n            stream->render.framesPerBuffer = stream->render.pPin->frameSize;\n        }\n        PA_DEBUG((\"Output frames chosen:%ld\\n\",stream->render.framesPerBuffer));\n\n        /* Setup number of packets to use */\n        stream->render.noOfPackets = 2;\n\n        if (outputParameters->hostApiSpecificStreamInfo)\n        {\n            PaWinWDMKSInfo* pInfo = (PaWinWDMKSInfo*)outputParameters->hostApiSpecificStreamInfo;\n\n            if (stream->render.pPin->parentFilter->devInfo.streamingType == Type_kWaveCyclic &&\n                pInfo->noOfPackets != 0)\n            {\n                stream->render.noOfPackets = pInfo->noOfPackets;\n            }\n        }\n    }\n\n    /* Host buffer size is bound to the largest of the input and output frame sizes */\n    result =  PaUtil_InitializeBufferProcessor( &stream->bufferProcessor,\n        stream->userInputChannels, inputSampleFormat, hostInputSampleFormat,\n        stream->userOutputChannels, outputSampleFormat, hostOutputSampleFormat,\n        sampleRate, streamFlags, framesPerUserBuffer,\n        max(stream->capture.framesPerBuffer, stream->render.framesPerBuffer),\n        paUtilBoundedHostBufferSize,\n        streamCallback, userData );\n    if( result != paNoError )\n    {\n        PaWinWDM_SetLastErrorInfo(result, \"PaUtil_InitializeBufferProcessor failed: ich=%u, isf=%u, hisf=%u, och=%u, osf=%u, hosf=%u, sr=%lf, flags=0x%X, fpub=%u, fphb=%u\",\n            stream->userInputChannels, inputSampleFormat, hostInputSampleFormat,\n            stream->userOutputChannels, outputSampleFormat, hostOutputSampleFormat,\n            sampleRate, streamFlags, framesPerUserBuffer,\n            max(stream->capture.framesPerBuffer, stream->render.framesPerBuffer));\n        goto error;\n    }\n\n    /* Allocate/get all the buffers for host I/O */\n    if (stream->userInputChannels > 0)\n    {\n        stream->streamRepresentation.streamInfo.inputLatency = stream->capture.framesPerBuffer / sampleRate;\n\n        switch (stream->capture.pPin->parentFilter->devInfo.streamingType)\n        {\n        case Type_kWaveCyclic:\n            {\n                unsigned size = stream->capture.noOfPackets * stream->capture.framesPerBuffer * stream->capture.bytesPerFrame;\n                /* Allocate input host buffer */\n                stream->capture.hostBuffer = (char*)PaUtil_GroupAllocateMemory(stream->allocGroup, size);\n                PA_DEBUG((\"Input buffer allocated (size = %u)\\n\", size));\n                if( !stream->capture.hostBuffer )\n                {\n                    PA_DEBUG((\"Cannot allocate host input buffer!\\n\"));\n                    PaWinWDM_SetLastErrorInfo(paInsufficientMemory, \"Failed to allocate input buffer\");\n                    result = paInsufficientMemory;\n                    goto error;\n                }\n                stream->capture.hostBufferSize = size;\n                PA_DEBUG((\"Input buffer start = %p (size=%u)\\n\",stream->capture.hostBuffer, stream->capture.hostBufferSize));\n                stream->capture.pPin->fnEventHandler = PaPinCaptureEventHandler_WaveCyclic;\n                stream->capture.pPin->fnSubmitHandler = PaPinCaptureSubmitHandler_WaveCyclic;\n            }\n            break;\n        case Type_kWaveRT:\n            {\n                const DWORD dwTotalSize = 2 * stream->capture.framesPerBuffer * stream->capture.bytesPerFrame;\n                DWORD dwRequestedSize = dwTotalSize;\n                BOOL bCallMemoryBarrier = FALSE;\n                ULONG hwFifoLatency = 0;\n                ULONG dummy;\n                result = PinGetBuffer(stream->capture.pPin, (void**)&stream->capture.hostBuffer, &dwRequestedSize, &bCallMemoryBarrier);\n                if (!result)\n                {\n                    PA_DEBUG((\"Input buffer start = %p, size = %u\\n\", stream->capture.hostBuffer, dwRequestedSize));\n                    if (dwRequestedSize != dwTotalSize)\n                    {\n                        PA_DEBUG((\"Buffer length changed by driver from %u to %u !\\n\", dwTotalSize, dwRequestedSize));\n                        /* Recalculate to what the driver has given us */\n                        stream->capture.framesPerBuffer = dwRequestedSize / (2 * stream->capture.bytesPerFrame);\n                    }\n                    stream->capture.hostBufferSize = dwRequestedSize;\n\n                    if (stream->capture.pPin->pinKsSubType == SubType_kPolled)\n                    {\n                        stream->capture.pPin->fnEventHandler = PaPinCaptureEventHandler_WaveRTPolled;\n                        stream->capture.pPin->fnSubmitHandler = PaPinCaptureSubmitHandler_WaveRTPolled;\n                    }\n                    else\n                    {\n                        stream->capture.pPin->fnEventHandler = PaPinCaptureEventHandler_WaveRTEvent;\n                        stream->capture.pPin->fnSubmitHandler = PaPinCaptureSubmitHandler_WaveRTEvent;\n                    }\n\n                    stream->capture.pPin->fnMemBarrier = bCallMemoryBarrier ? MemoryBarrierRead : MemoryBarrierDummy;\n                }\n                else\n                {\n                    PA_DEBUG((\"Failed to get input buffer (WaveRT)\\n\"));\n                    PaWinWDM_SetLastErrorInfo(paUnanticipatedHostError, \"Failed to get input buffer (WaveRT)\");\n                    result = paUnanticipatedHostError;\n                    goto error;\n                }\n\n                /* Get latency */\n                result = PinGetHwLatency(stream->capture.pPin, &hwFifoLatency, &dummy, &dummy);\n                if (result == paNoError)\n                {\n                    stream->capture.pPin->hwLatency = hwFifoLatency;\n\n                    /* Add HW latency into total input latency */\n                    stream->streamRepresentation.streamInfo.inputLatency += ((hwFifoLatency / stream->capture.bytesPerFrame) / sampleRate);\n                }\n                else\n                {\n                    PA_DEBUG((\"Failed to get size of FIFO hardware buffer (is set to zero)\\n\"));\n                    stream->capture.pPin->hwLatency = 0;\n                }\n            }\n            break;\n        default:\n            /* Undefined wave type!! */\n            assert(0);\n            result = paInternalError;\n            PaWinWDM_SetLastErrorInfo(result, \"Wave type %u ??\", stream->capture.pPin->parentFilter->devInfo.streamingType);\n            goto error;\n        }\n    }\n    else\n    {\n        stream->capture.hostBuffer = 0;\n    }\n\n    if (stream->userOutputChannels > 0)\n    {\n        stream->streamRepresentation.streamInfo.outputLatency = stream->render.framesPerBuffer / sampleRate;\n\n        switch (stream->render.pPin->parentFilter->devInfo.streamingType)\n        {\n        case Type_kWaveCyclic:\n            {\n                unsigned size = stream->render.noOfPackets * stream->render.framesPerBuffer * stream->render.bytesPerFrame;\n                /* Allocate output device buffer */\n                stream->render.hostBuffer = (char*)PaUtil_GroupAllocateMemory(stream->allocGroup, size);\n                PA_DEBUG((\"Output buffer allocated (size = %u)\\n\", size));\n                if( !stream->render.hostBuffer )\n                {\n                    PA_DEBUG((\"Cannot allocate host output buffer!\\n\"));\n                    PaWinWDM_SetLastErrorInfo(paInsufficientMemory, \"Failed to allocate output buffer\");\n                    result = paInsufficientMemory;\n                    goto error;\n                }\n                stream->render.hostBufferSize = size;\n                PA_DEBUG((\"Output buffer start = %p (size=%u)\\n\",stream->render.hostBuffer, stream->render.hostBufferSize));\n\n                stream->render.pPin->fnEventHandler = PaPinRenderEventHandler_WaveCyclic;\n                stream->render.pPin->fnSubmitHandler = PaPinRenderSubmitHandler_WaveCyclic;\n            }\n            break;\n        case Type_kWaveRT:\n            {\n                const DWORD dwTotalSize = 2 * stream->render.framesPerBuffer * stream->render.bytesPerFrame;\n                DWORD dwRequestedSize = dwTotalSize;\n                BOOL bCallMemoryBarrier = FALSE;\n                ULONG hwFifoLatency = 0;\n                ULONG dummy;\n                result = PinGetBuffer(stream->render.pPin, (void**)&stream->render.hostBuffer, &dwRequestedSize, &bCallMemoryBarrier);\n                if (!result)\n                {\n                    PA_DEBUG((\"Output buffer start = %p, size = %u, membarrier = %u\\n\", stream->render.hostBuffer, dwRequestedSize, bCallMemoryBarrier));\n                    if (dwRequestedSize != dwTotalSize)\n                    {\n                        PA_DEBUG((\"Buffer length changed by driver from %u to %u !\\n\", dwTotalSize, dwRequestedSize));\n                        /* Recalculate to what the driver has given us */\n                        stream->render.framesPerBuffer = dwRequestedSize / (2 * stream->render.bytesPerFrame);\n                    }\n                    stream->render.hostBufferSize = dwRequestedSize;\n\n                    if (stream->render.pPin->pinKsSubType == SubType_kPolled)\n                    {\n                        stream->render.pPin->fnEventHandler = PaPinRenderEventHandler_WaveRTPolled;\n                        stream->render.pPin->fnSubmitHandler = PaPinRenderSubmitHandler_WaveRTPolled;\n                    }\n                    else\n                    {\n                        stream->render.pPin->fnEventHandler = PaPinRenderEventHandler_WaveRTEvent;\n                        stream->render.pPin->fnSubmitHandler = PaPinRenderSubmitHandler_WaveRTEvent;\n                    }\n\n                    stream->render.pPin->fnMemBarrier = bCallMemoryBarrier ? MemoryBarrierWrite : MemoryBarrierDummy;\n                }\n                else\n                {\n                    PA_DEBUG((\"Failed to get output buffer (with notification)\\n\"));\n                    PaWinWDM_SetLastErrorInfo(paUnanticipatedHostError, \"Failed to get output buffer (with notification)\");\n                    result = paUnanticipatedHostError;\n                    goto error;\n                }\n\n                /* Get latency */\n                result = PinGetHwLatency(stream->render.pPin, &hwFifoLatency, &dummy, &dummy);\n                if (result == paNoError)\n                {\n                    stream->render.pPin->hwLatency = hwFifoLatency;\n\n                    /* Add HW latency into total output latency */\n                    stream->streamRepresentation.streamInfo.outputLatency += ((hwFifoLatency / stream->render.bytesPerFrame) / sampleRate);\n                }\n                else\n                {\n                    PA_DEBUG((\"Failed to get size of FIFO hardware buffer (is set to zero)\\n\"));\n                    stream->render.pPin->hwLatency = 0;\n                }\n            }\n            break;\n        default:\n            /* Undefined wave type!! */\n            assert(0);\n            result = paInternalError;\n            PaWinWDM_SetLastErrorInfo(result, \"Wave type %u ??\", stream->capture.pPin->parentFilter->devInfo.streamingType);\n            goto error;\n        }\n    }\n    else\n    {\n        stream->render.hostBuffer = 0;\n    }\n\n    stream->streamRepresentation.streamInfo.sampleRate = sampleRate;\n\n    PA_DEBUG((\"BytesPerInputFrame = %d\\n\",stream->capture.bytesPerFrame));\n    PA_DEBUG((\"BytesPerOutputFrame = %d\\n\",stream->render.bytesPerFrame));\n\n    /* memset(stream->hostBuffer,0,size); */\n\n    /* Abort */\n    stream->eventAbort          = CreateEvent(NULL, TRUE, FALSE, NULL);\n    if (stream->eventAbort == 0)\n    {\n        result = paInsufficientMemory;\n        goto error;\n    }\n    stream->eventStreamStart[0] = CreateEvent(NULL, TRUE, FALSE, NULL);\n    if (stream->eventStreamStart[0] == 0)\n    {\n        result = paInsufficientMemory;\n        goto error;\n    }\n    stream->eventStreamStart[1] = CreateEvent(NULL, TRUE, FALSE, NULL);\n    if (stream->eventStreamStart[1] == 0)\n    {\n        result = paInsufficientMemory;\n        goto error;\n    }\n\n    if(stream->userInputChannels > 0)\n    {\n        const unsigned bufferSizeInBytes = stream->capture.framesPerBuffer * stream->capture.bytesPerFrame;\n        const unsigned ringBufferFrameSize = NextPowerOf2( 1024 + 2 * max(stream->capture.framesPerBuffer, stream->render.framesPerBuffer) );\n\n        stream->capture.events = (HANDLE*)PaUtil_GroupAllocateMemory(stream->allocGroup, stream->capture.noOfPackets * sizeof(HANDLE));\n        if (stream->capture.events == NULL)\n        {\n            result = paInsufficientMemory;\n            goto error;\n        }\n\n        stream->capture.packets = (DATAPACKET*)PaUtil_GroupAllocateMemory(stream->allocGroup, stream->capture.noOfPackets * sizeof(DATAPACKET));\n        if (stream->capture.packets == NULL)\n        {\n            result = paInsufficientMemory;\n            goto error;\n        }\n\n        switch(stream->capture.pPin->parentFilter->devInfo.streamingType)\n        {\n        case Type_kWaveCyclic:\n            {\n                /* WaveCyclic case */\n                unsigned i;\n                for (i = 0; i < stream->capture.noOfPackets; ++i)\n                {\n                    /* Set up the packets */\n                    DATAPACKET *p = stream->capture.packets + i;\n\n                    /* Record event */\n                    stream->capture.events[i] = CreateEvent(NULL, TRUE, FALSE, NULL);\n\n                    p->Signal.hEvent = stream->capture.events[i];\n                    p->Header.Data = stream->capture.hostBuffer + (i*bufferSizeInBytes);\n                    p->Header.FrameExtent = bufferSizeInBytes;\n                    p->Header.DataUsed = 0;\n                    p->Header.Size = sizeof(p->Header);\n                    p->Header.PresentationTime.Numerator = 1;\n                    p->Header.PresentationTime.Denominator = 1;\n                }\n            }\n            break;\n        case Type_kWaveRT:\n            {\n                /* Set up the \"packets\" */\n                DATAPACKET *p = stream->capture.packets + 0;\n\n                /* Record event: WaveRT has a single event for 2 notification per buffer */\n                stream->capture.events[0] = CreateEvent(NULL, FALSE, FALSE, NULL);\n\n                p->Header.Data = stream->capture.hostBuffer;\n                p->Header.FrameExtent = bufferSizeInBytes;\n                p->Header.DataUsed = 0;\n                p->Header.Size = sizeof(p->Header);\n                p->Header.PresentationTime.Numerator = 1;\n                p->Header.PresentationTime.Denominator = 1;\n\n                ++p;\n                p->Header.Data = stream->capture.hostBuffer + bufferSizeInBytes;\n                p->Header.FrameExtent = bufferSizeInBytes;\n                p->Header.DataUsed = 0;\n                p->Header.Size = sizeof(p->Header);\n                p->Header.PresentationTime.Numerator = 1;\n                p->Header.PresentationTime.Denominator = 1;\n\n                if (stream->capture.pPin->pinKsSubType == SubType_kNotification)\n                {\n                    result = PinRegisterNotificationHandle(stream->capture.pPin, stream->capture.events[0]);\n\n                    if (result != paNoError)\n                    {\n                        PA_DEBUG((\"Failed to register capture notification handle\\n\"));\n                        PaWinWDM_SetLastErrorInfo(paUnanticipatedHostError, \"Failed to register capture notification handle\");\n                        result = paUnanticipatedHostError;\n                        goto error;\n                    }\n                }\n\n                result = PinRegisterPositionRegister(stream->capture.pPin);\n\n                if (result != paNoError)\n                {\n                    unsigned long pos = 0xdeadc0de;\n                    PA_DEBUG((\"Failed to register capture position register, using PinGetAudioPositionViaIOCTLWrite\\n\"));\n                    stream->capture.pPin->fnAudioPosition = PinGetAudioPositionViaIOCTLWrite;\n                    /* Test position function */\n                    result = (stream->capture.pPin->fnAudioPosition)(stream->capture.pPin, &pos);\n                    if (result != paNoError || pos != 0x0)\n                    {\n                        PA_DEBUG((\"Failed to read capture position register (IOCTL)\\n\"));\n                        PaWinWDM_SetLastErrorInfo(paUnanticipatedHostError, \"Failed to read capture position register (IOCTL)\");\n                        result = paUnanticipatedHostError;\n                        goto error;\n                    }\n                }\n                else\n                {\n                    stream->capture.pPin->fnAudioPosition = PinGetAudioPositionMemoryMapped;\n                }\n            }\n            break;\n        default:\n            /* Undefined wave type!! */\n            assert(0);\n            result = paInternalError;\n            PaWinWDM_SetLastErrorInfo(result, \"Wave type %u ??\", stream->capture.pPin->parentFilter->devInfo.streamingType);\n            goto error;\n        }\n\n        /* Setup the input ring buffer here */\n        stream->ringBufferData = (char*)PaUtil_GroupAllocateMemory(stream->allocGroup, ringBufferFrameSize * stream->capture.bytesPerFrame);\n        if (stream->ringBufferData == NULL)\n        {\n            result = paInsufficientMemory;\n            goto error;\n        }\n        PaUtil_InitializeRingBuffer(&stream->ringBuffer, stream->capture.bytesPerFrame, ringBufferFrameSize, stream->ringBufferData);\n    }\n    if(stream->userOutputChannels > 0)\n    {\n        const unsigned bufferSizeInBytes = stream->render.framesPerBuffer * stream->render.bytesPerFrame;\n\n        stream->render.events = (HANDLE*)PaUtil_GroupAllocateMemory(stream->allocGroup, stream->render.noOfPackets * sizeof(HANDLE));\n        if (stream->render.events == NULL)\n        {\n            result = paInsufficientMemory;\n            goto error;\n        }\n\n        stream->render.packets = (DATAPACKET*)PaUtil_GroupAllocateMemory(stream->allocGroup, stream->render.noOfPackets * sizeof(DATAPACKET));\n        if (stream->render.packets == NULL)\n        {\n            result = paInsufficientMemory;\n            goto error;\n        }\n\n        switch(stream->render.pPin->parentFilter->devInfo.streamingType)\n        {\n        case Type_kWaveCyclic:\n            {\n                /* WaveCyclic case */\n                unsigned i;\n                for (i = 0; i < stream->render.noOfPackets; ++i)\n                {\n                    /* Set up the packets */\n                    DATAPACKET *p = stream->render.packets + i;\n\n                    /* Playback event */\n                    stream->render.events[i] = CreateEvent(NULL, TRUE, FALSE, NULL);\n\n                    /* In this case, we just use the packets as ptr to the device buffer */\n                    p->Signal.hEvent = stream->render.events[i];\n                    p->Header.Data = stream->render.hostBuffer + (i*bufferSizeInBytes);\n                    p->Header.FrameExtent = bufferSizeInBytes;\n                    p->Header.DataUsed = bufferSizeInBytes;\n                    p->Header.Size = sizeof(p->Header);\n                    p->Header.PresentationTime.Numerator = 1;\n                    p->Header.PresentationTime.Denominator = 1;\n                }\n            }\n            break;\n        case Type_kWaveRT:\n            {\n                /* WaveRT case */\n\n                /* Set up the \"packets\" */\n                DATAPACKET *p = stream->render.packets;\n\n                /* The only playback event */\n                stream->render.events[0] = CreateEvent(NULL, FALSE, FALSE, NULL);\n\n                /* In this case, we just use the packets as ptr to the device buffer */\n                p->Header.Data = stream->render.hostBuffer;\n                p->Header.FrameExtent = stream->render.framesPerBuffer*stream->render.bytesPerFrame;\n                p->Header.DataUsed = stream->render.framesPerBuffer*stream->render.bytesPerFrame;\n                p->Header.Size = sizeof(p->Header);\n                p->Header.PresentationTime.Numerator = 1;\n                p->Header.PresentationTime.Denominator = 1;\n\n                ++p;\n                p->Header.Data = stream->render.hostBuffer + stream->render.framesPerBuffer*stream->render.bytesPerFrame;\n                p->Header.FrameExtent = stream->render.framesPerBuffer*stream->render.bytesPerFrame;\n                p->Header.DataUsed = stream->render.framesPerBuffer*stream->render.bytesPerFrame;\n                p->Header.Size = sizeof(p->Header);\n                p->Header.PresentationTime.Numerator = 1;\n                p->Header.PresentationTime.Denominator = 1;\n\n                if (stream->render.pPin->pinKsSubType == SubType_kNotification)\n                {\n                    result = PinRegisterNotificationHandle(stream->render.pPin, stream->render.events[0]);\n\n                    if (result != paNoError)\n                    {\n                        PA_DEBUG((\"Failed to register rendering notification handle\\n\"));\n                        PaWinWDM_SetLastErrorInfo(paUnanticipatedHostError, \"Failed to register rendering notification handle\");\n                        result = paUnanticipatedHostError;\n                        goto error;\n                    }\n                }\n\n                result = PinRegisterPositionRegister(stream->render.pPin);\n\n                if (result != paNoError)\n                {\n                    unsigned long pos = 0xdeadc0de;\n                    PA_DEBUG((\"Failed to register rendering position register, using PinGetAudioPositionViaIOCTLRead\\n\"));\n                    stream->render.pPin->fnAudioPosition = PinGetAudioPositionViaIOCTLRead;\n                    /* Test position function */\n                    result = (stream->render.pPin->fnAudioPosition)(stream->render.pPin, &pos);\n                    if (result != paNoError || pos != 0x0)\n                    {\n                        PA_DEBUG((\"Failed to read render position register (IOCTL)\\n\"));\n                        PaWinWDM_SetLastErrorInfo(paUnanticipatedHostError, \"Failed to read render position register (IOCTL)\");\n                        result = paUnanticipatedHostError;\n                        goto error;\n                    }\n                }\n                else\n                {\n                    stream->render.pPin->fnAudioPosition = PinGetAudioPositionMemoryMapped;\n                }\n            }\n            break;\n        default:\n            /* Undefined wave type!! */\n            assert(0);\n            result = paInternalError;\n            PaWinWDM_SetLastErrorInfo(result, \"Wave type %u ??\", stream->capture.pPin->parentFilter->devInfo.streamingType);\n            goto error;\n        }\n    }\n\n    stream->streamStarted = 0;\n    stream->streamActive = 0;\n    stream->streamStop = 0;\n    stream->streamAbort = 0;\n    stream->streamFlags = streamFlags;\n    stream->oldProcessPriority = REALTIME_PRIORITY_CLASS;\n\n    /* Increase ref count on filters in use, so that a CommitDeviceInfos won't delete them */\n    if (stream->capture.pPin != 0)\n    {\n        FilterAddRef(stream->capture.pPin->parentFilter);\n    }\n    if (stream->render.pPin != 0)\n    {\n        FilterAddRef(stream->render.pPin->parentFilter);\n    }\n\n    /* Ok, now update our host API specific stream info */\n    if (stream->userInputChannels)\n    {\n        PaWinWdmDeviceInfo *pDeviceInfo = (PaWinWdmDeviceInfo*)wdmHostApi->inheritedHostApiRep.deviceInfos[inputParameters->device];\n\n        stream->hostApiStreamInfo.input.device = Pa_HostApiDeviceIndexToDeviceIndex(Pa_HostApiTypeIdToHostApiIndex(paWDMKS), inputParameters->device);\n        stream->hostApiStreamInfo.input.channels = stream->deviceInputChannels;\n        stream->hostApiStreamInfo.input.muxNodeId = -1;\n        if (stream->capture.pPin->inputs)\n        {\n            stream->hostApiStreamInfo.input.muxNodeId = stream->capture.pPin->inputs[pDeviceInfo->muxPosition]->muxNodeId;\n        }\n        stream->hostApiStreamInfo.input.endpointPinId = pDeviceInfo->endpointPinId;\n        stream->hostApiStreamInfo.input.framesPerHostBuffer = stream->capture.framesPerBuffer;\n        stream->hostApiStreamInfo.input.streamingSubType = stream->capture.pPin->pinKsSubType;\n    }\n    else\n    {\n        stream->hostApiStreamInfo.input.device = paNoDevice;\n    }\n    if (stream->userOutputChannels)\n    {\n        stream->hostApiStreamInfo.output.device = Pa_HostApiDeviceIndexToDeviceIndex(Pa_HostApiTypeIdToHostApiIndex(paWDMKS), outputParameters->device);\n        stream->hostApiStreamInfo.output.channels = stream->deviceOutputChannels;\n        stream->hostApiStreamInfo.output.framesPerHostBuffer = stream->render.framesPerBuffer;\n        stream->hostApiStreamInfo.output.endpointPinId = stream->render.pPin->endpointPinId;\n        stream->hostApiStreamInfo.output.streamingSubType = stream->render.pPin->pinKsSubType;\n    }\n    else\n    {\n        stream->hostApiStreamInfo.output.device = paNoDevice;\n    }\n    /*stream->streamRepresentation.streamInfo.hostApiTypeId = paWDMKS;\n    stream->streamRepresentation.streamInfo.hostApiSpecificStreamInfo = &stream->hostApiStreamInfo;*/\n    stream->streamRepresentation.streamInfo.structVersion = 2;\n\n    *s = (PaStream*)stream;\n\n    PA_LOGL_;\n    return result;\n\noccupied:\n    /* Ok, someone else is hogging the pin, bail out */\n    assert (result == paDeviceUnavailable);\n    PaWinWDM_SetLastErrorInfo(result, \"Device is occupied\");\n\nerror:\n    PaUtil_TerminateBufferProcessor( &stream->bufferProcessor );\n\n    CloseStreamEvents(stream);\n\n    if (stream->allocGroup)\n    {\n        PaUtil_FreeAllAllocations(stream->allocGroup);\n        PaUtil_DestroyAllocationGroup(stream->allocGroup);\n        stream->allocGroup = 0;\n    }\n\n    if(stream->render.pPin)\n        PinClose(stream->render.pPin);\n    if(stream->capture.pPin)\n        PinClose(stream->capture.pPin);\n\n    PaUtil_FreeMemory( stream );\n\n    PA_LOGL_;\n    return result;\n}\n\n/*\nWhen CloseStream() is called, the multi-api layer ensures that\nthe stream has already been stopped or aborted.\n*/\nstatic PaError CloseStream( PaStream* s )\n{\n    PaError result = paNoError;\n    PaWinWdmStream *stream = (PaWinWdmStream*)s;\n\n    PA_LOGE_;\n\n    assert(!stream->streamStarted);\n    assert(!stream->streamActive);\n\n    PaUtil_TerminateBufferProcessor( &stream->bufferProcessor );\n    PaUtil_TerminateStreamRepresentation( &stream->streamRepresentation );\n\n    CloseStreamEvents(stream);\n\n    if (stream->allocGroup)\n    {\n        PaUtil_FreeAllAllocations(stream->allocGroup);\n        PaUtil_DestroyAllocationGroup(stream->allocGroup);\n        stream->allocGroup = 0;\n    }\n\n    if(stream->render.pPin)\n    {\n        PinClose(stream->render.pPin);\n    }\n    if(stream->capture.pPin)\n    {\n        PinClose(stream->capture.pPin);\n    }\n\n    if (stream->render.pPin)\n    {\n        FilterFree(stream->render.pPin->parentFilter);\n    }\n    if (stream->capture.pPin)\n    {\n        FilterFree(stream->capture.pPin->parentFilter);\n    }\n\n    PaUtil_FreeMemory( stream );\n\n    PA_LOGL_;\n    return result;\n}\n\n/*\nWrite the supplied packet to the pin\nAsynchronous\nShould return paNoError on success\n*/\nstatic PaError PinWrite(HANDLE h, DATAPACKET* p)\n{\n    PaError result = paNoError;\n    unsigned long cbReturned = 0;\n    BOOL fRes = DeviceIoControl(h,\n        IOCTL_KS_WRITE_STREAM,\n        NULL,\n        0,\n        &p->Header,\n        p->Header.Size,\n        &cbReturned,\n        &p->Signal);\n    if (!fRes)\n    {\n        unsigned long error = GetLastError();\n        if (error != ERROR_IO_PENDING)\n        {\n            result = paInternalError;\n        }\n    }\n    return result;\n}\n\n/*\nRead to the supplied packet from the pin\nAsynchronous\nShould return paNoError on success\n*/\nstatic PaError PinRead(HANDLE h, DATAPACKET* p)\n{\n    PaError result = paNoError;\n    unsigned long cbReturned = 0;\n    BOOL fRes = DeviceIoControl(h,\n        IOCTL_KS_READ_STREAM,\n        NULL,\n        0,\n        &p->Header,\n        p->Header.Size,\n        &cbReturned,\n        &p->Signal);\n    if (!fRes)\n    {\n        unsigned long error = GetLastError();\n        if (error != ERROR_IO_PENDING)\n        {\n            result = paInternalError;\n        }\n    }\n    return result;\n}\n\n/*\nCopy the first interleaved channel of 16 bit data to the other channels\n*/\nstatic void DuplicateFirstChannelInt16(void* buffer, int channels, int samples)\n{\n    unsigned short* data = (unsigned short*)buffer;\n    int channel;\n    unsigned short sourceSample;\n    while( samples-- )\n    {\n        sourceSample = *data++;\n        channel = channels-1;\n        while( channel-- )\n        {\n            *data++ = sourceSample;\n        }\n    }\n}\n\n/*\nCopy the first interleaved channel of 24 bit data to the other channels\n*/\nstatic void DuplicateFirstChannelInt24(void* buffer, int channels, int samples)\n{\n    unsigned char* data = (unsigned char*)buffer;\n    int channel;\n    unsigned char sourceSample[3];\n    while( samples-- )\n    {\n        sourceSample[0] = data[0];\n        sourceSample[1] = data[1];\n        sourceSample[2] = data[2];\n        data += 3;\n        channel = channels-1;\n        while( channel-- )\n        {\n            data[0] = sourceSample[0];\n            data[1] = sourceSample[1];\n            data[2] = sourceSample[2];\n            data += 3;\n        }\n    }\n}\n\n/*\nCopy the first interleaved channel of 32 bit data to the other channels\n*/\nstatic void DuplicateFirstChannelInt32(void* buffer, int channels, int samples)\n{\n    unsigned long* data = (unsigned long*)buffer;\n    int channel;\n    unsigned long sourceSample;\n    while( samples-- )\n    {\n        sourceSample = *data++;\n        channel = channels-1;\n        while( channel-- )\n        {\n            *data++ = sourceSample;\n        }\n    }\n}\n\n/*\nIncrease the priority of the calling thread to RT\n*/\nstatic HANDLE BumpThreadPriority()\n{\n    HANDLE hThread = GetCurrentThread();\n    DWORD dwTask = 0;\n    HANDLE hAVRT = NULL;\n\n    /* If we have access to AVRT.DLL (Vista and later), use it */\n    if (paWinWDMKSAvRtEntryPoints.AvSetMmThreadCharacteristics != NULL)\n    {\n        hAVRT = paWinWDMKSAvRtEntryPoints.AvSetMmThreadCharacteristics(\"Pro Audio\", &dwTask);\n        if (hAVRT != NULL && hAVRT != INVALID_HANDLE_VALUE)\n        {\n            BOOL bret = paWinWDMKSAvRtEntryPoints.AvSetMmThreadPriority(hAVRT, PA_AVRT_PRIORITY_CRITICAL);\n            if (!bret)\n            {\n                PA_DEBUG((\"Set mm thread prio to critical failed!\\n\"));\n            }\n            else\n            {\n                return hAVRT;\n            }\n        }\n        else\n        {\n            PA_DEBUG((\"Set mm thread characteristic to 'Pro Audio' failed, reverting to SetThreadPriority\\n\"));\n        }\n    }\n\n    /* For XP and earlier, or if AvSetMmThreadCharacteristics fails (MMCSS disabled ?) */\n    if (timeBeginPeriod(1) != TIMERR_NOERROR) {\n        PA_DEBUG((\"timeBeginPeriod(1) failed!\\n\"));\n    }\n\n    if (!SetThreadPriority(hThread, THREAD_PRIORITY_TIME_CRITICAL)) {\n        PA_DEBUG((\"SetThreadPriority failed!\\n\"));\n    }\n\n    return hAVRT;\n}\n\n/*\nDecrease the priority of the calling thread to normal\n*/\nstatic void DropThreadPriority(HANDLE hAVRT)\n{\n    HANDLE hThread = GetCurrentThread();\n\n    if (hAVRT != NULL)\n    {\n        paWinWDMKSAvRtEntryPoints.AvSetMmThreadPriority(hAVRT, PA_AVRT_PRIORITY_NORMAL);\n        paWinWDMKSAvRtEntryPoints.AvRevertMmThreadCharacteristics(hAVRT);\n        return;\n    }\n\n    SetThreadPriority(hThread, THREAD_PRIORITY_NORMAL);\n    timeEndPeriod(1);\n}\n\nstatic PaError PreparePinForStart(PaWinWdmPin* pin)\n{\n    PaError result;\n    result = PinSetState(pin, KSSTATE_ACQUIRE);\n    if (result != paNoError)\n    {\n        goto error;\n    }\n    result = PinSetState(pin, KSSTATE_PAUSE);\n    if (result != paNoError)\n    {\n        goto error;\n    }\n    return result;\n\nerror:\n    PinSetState(pin, KSSTATE_STOP);\n    return result;\n}\n\nstatic PaError PreparePinsForStart(PaProcessThreadInfo* pInfo)\n{\n    PaError result = paNoError;\n    /* Submit buffers */\n    if (pInfo->stream->capture.pPin)\n    {\n        if ((result = PreparePinForStart(pInfo->stream->capture.pPin)) != paNoError)\n        {\n            goto error;\n        }\n\n        if (pInfo->stream->capture.pPin->parentFilter->devInfo.streamingType == Type_kWaveCyclic)\n        {\n            unsigned i;\n            for(i=0; i < pInfo->stream->capture.noOfPackets; ++i)\n            {\n                if ((result = PinRead(pInfo->stream->capture.pPin->handle, pInfo->stream->capture.packets + i)) != paNoError)\n                {\n                    goto error;\n                }\n                ++pInfo->pending;\n            }\n        }\n        else\n        {\n            pInfo->pending = 2;\n        }\n    }\n\n    if(pInfo->stream->render.pPin)\n    {\n        if ((result = PreparePinForStart(pInfo->stream->render.pPin)) != paNoError)\n        {\n            goto error;\n        }\n\n        pInfo->priming += pInfo->stream->render.noOfPackets;\n        ++pInfo->pending;\n        SetEvent(pInfo->stream->render.events[0]);\n        if (pInfo->stream->render.pPin->parentFilter->devInfo.streamingType == Type_kWaveCyclic)\n        {\n            unsigned i;\n            for(i=1; i < pInfo->stream->render.noOfPackets; ++i)\n            {\n                SetEvent(pInfo->stream->render.events[i]);\n                ++pInfo->pending;\n            }\n        }\n    }\n\nerror:\n    PA_DEBUG((\"PreparePinsForStart = %d\\n\", result));\n    return result;\n}\n\nstatic PaError StartPin(PaWinWdmPin* pin)\n{\n    return PinSetState(pin, KSSTATE_RUN);\n}\n\nstatic PaError StartPins(PaProcessThreadInfo* pInfo)\n{\n    PaError result = paNoError;\n    /* Start the pins as synced as possible */\n    if (pInfo->stream->capture.pPin)\n    {\n        result = StartPin(pInfo->stream->capture.pPin);\n    }\n    if(pInfo->stream->render.pPin)\n    {\n        result = StartPin(pInfo->stream->render.pPin);\n    }\n    PA_DEBUG((\"StartPins = %d\\n\", result));\n    return result;\n}\n\n\nstatic PaError StopPin(PaWinWdmPin* pin)\n{\n    PinSetState(pin, KSSTATE_PAUSE);\n    PinSetState(pin, KSSTATE_STOP);\n    return paNoError;\n}\n\n\nstatic PaError StopPins(PaProcessThreadInfo* pInfo)\n{\n    PaError result = paNoError;\n    if(pInfo->stream->render.pPin)\n    {\n        StopPin(pInfo->stream->render.pPin);\n    }\n    if(pInfo->stream->capture.pPin)\n    {\n        StopPin(pInfo->stream->capture.pPin);\n    }\n    return result;\n}\n\ntypedef void (*TSetInputFrameCount)(PaUtilBufferProcessor*, unsigned long);\ntypedef void (*TSetInputChannel)(PaUtilBufferProcessor*, unsigned int, void *, unsigned int);\nstatic const TSetInputFrameCount fnSetInputFrameCount[2] = { PaUtil_SetInputFrameCount, PaUtil_Set2ndInputFrameCount };\nstatic const TSetInputChannel fnSetInputChannel[2] = { PaUtil_SetInputChannel, PaUtil_Set2ndInputChannel };\n\nstatic PaError PaDoProcessing(PaProcessThreadInfo* pInfo)\n{\n    PaError result = paNoError;\n    int i, framesProcessed = 0, doChannelCopy = 0;\n    ring_buffer_size_t inputFramesAvailable = PaUtil_GetRingBufferReadAvailable(&pInfo->stream->ringBuffer);\n\n    /* Do necessary buffer processing (which will invoke user callback if necessary) */\n    if (pInfo->cbResult == paContinue &&\n        (pInfo->renderHead != pInfo->renderTail || inputFramesAvailable))\n    {\n        unsigned processFullDuplex = pInfo->stream->capture.pPin && pInfo->stream->render.pPin && (!pInfo->priming);\n\n        PA_HP_TRACE((pInfo->stream->hLog, \"DoProcessing: InputFrames=%u\", inputFramesAvailable));\n\n        PaUtil_BeginCpuLoadMeasurement( &pInfo->stream->cpuLoadMeasurer );\n\n        pInfo->ti.currentTime = PaUtil_GetTime();\n\n        PaUtil_BeginBufferProcessing(&pInfo->stream->bufferProcessor, &pInfo->ti, pInfo->underover);\n        pInfo->underover = 0; /* Reset the (under|over)flow status */\n\n        if (pInfo->renderTail != pInfo->renderHead)\n        {\n            DATAPACKET* packet = pInfo->renderPackets[pInfo->renderTail & cPacketsArrayMask].packet;\n\n            assert(packet != 0);\n            assert(packet->Header.Data != 0);\n\n            PaUtil_SetOutputFrameCount(&pInfo->stream->bufferProcessor, pInfo->stream->render.framesPerBuffer);\n\n            for(i=0;i<pInfo->stream->userOutputChannels;i++)\n            {\n                /* Only write the user output channels. Leave the rest blank */\n                PaUtil_SetOutputChannel(&pInfo->stream->bufferProcessor,\n                    i,\n                    ((unsigned char*)(packet->Header.Data))+(i*pInfo->stream->render.bytesPerSample),\n                    pInfo->stream->deviceOutputChannels);\n            }\n\n            /* We will do a copy to the other channels after the data has been written */\n            doChannelCopy = ( pInfo->stream->userOutputChannels == 1 );\n        }\n\n        if (inputFramesAvailable && (!pInfo->stream->userOutputChannels || inputFramesAvailable >= (int)pInfo->stream->render.framesPerBuffer))\n        {\n            unsigned wrapCntr = 0;\n            void* data[2] = {0};\n            ring_buffer_size_t size[2] = {0};\n\n            /* If full-duplex, we just extract output buffer number of frames */\n            if (pInfo->stream->userOutputChannels)\n            {\n                inputFramesAvailable = min(inputFramesAvailable, (int)pInfo->stream->render.framesPerBuffer);\n            }\n\n            inputFramesAvailable = PaUtil_GetRingBufferReadRegions(&pInfo->stream->ringBuffer,\n                inputFramesAvailable,\n                &data[0],\n                &size[0],\n                &data[1],\n                &size[1]);\n\n            for (wrapCntr = 0; wrapCntr < 2; ++wrapCntr)\n            {\n                if (size[wrapCntr] == 0)\n                    break;\n\n                fnSetInputFrameCount[wrapCntr](&pInfo->stream->bufferProcessor, size[wrapCntr]);\n                for(i=0;i<pInfo->stream->userInputChannels;i++)\n                {\n                    /* Only read as many channels as the user wants */\n                    fnSetInputChannel[wrapCntr](&pInfo->stream->bufferProcessor,\n                        i,\n                        ((unsigned char*)(data[wrapCntr]))+(i*pInfo->stream->capture.bytesPerSample),\n                        pInfo->stream->deviceInputChannels);\n                }\n            }\n        }\n        else\n        {\n            /* We haven't consumed anything from the ring buffer... */\n            inputFramesAvailable = 0;\n            /* If we have full-duplex, this is at startup, so mark no-input! */\n            if (pInfo->stream->userOutputChannels>0 && pInfo->stream->userInputChannels>0)\n            {\n                PA_HP_TRACE((pInfo->stream->hLog, \"Input startup, marking no input.\"));\n                PaUtil_SetNoInput(&pInfo->stream->bufferProcessor);\n            }\n        }\n\n        if (processFullDuplex) /* full duplex */\n        {\n            /* Only call the EndBufferProcessing function when the total input frames == total output frames */\n            const unsigned long totalInputFrameCount = pInfo->stream->bufferProcessor.hostInputFrameCount[0] + pInfo->stream->bufferProcessor.hostInputFrameCount[1];\n            const unsigned long totalOutputFrameCount = pInfo->stream->bufferProcessor.hostOutputFrameCount[0] + pInfo->stream->bufferProcessor.hostOutputFrameCount[1];\n\n            if(totalInputFrameCount == totalOutputFrameCount && totalOutputFrameCount != 0)\n            {\n                framesProcessed = PaUtil_EndBufferProcessing(&pInfo->stream->bufferProcessor, &pInfo->cbResult);\n            }\n            else\n            {\n                framesProcessed = 0;\n            }\n        }\n        else\n        {\n            framesProcessed = PaUtil_EndBufferProcessing(&pInfo->stream->bufferProcessor, &pInfo->cbResult);\n        }\n\n        PA_HP_TRACE((pInfo->stream->hLog, \"Frames processed: %u %s\", framesProcessed, (pInfo->priming ? \"(priming)\":\"\")));\n\n        if( doChannelCopy )\n        {\n            DATAPACKET* packet = pInfo->renderPackets[pInfo->renderTail & cPacketsArrayMask].packet;\n            /* Copy the first output channel to the other channels */\n            switch (pInfo->stream->render.bytesPerSample)\n            {\n            case 2:\n                DuplicateFirstChannelInt16(packet->Header.Data, pInfo->stream->deviceOutputChannels, pInfo->stream->render.framesPerBuffer);\n                break;\n            case 3:\n                DuplicateFirstChannelInt24(packet->Header.Data, pInfo->stream->deviceOutputChannels, pInfo->stream->render.framesPerBuffer);\n                break;\n            case 4:\n                DuplicateFirstChannelInt32(packet->Header.Data, pInfo->stream->deviceOutputChannels, pInfo->stream->render.framesPerBuffer);\n                break;\n            default:\n                assert(0); /* Unsupported format! */\n                break;\n            }\n        }\n        PaUtil_EndCpuLoadMeasurement( &pInfo->stream->cpuLoadMeasurer, framesProcessed );\n\n        if (inputFramesAvailable)\n        {\n            PaUtil_AdvanceRingBufferReadIndex(&pInfo->stream->ringBuffer, inputFramesAvailable);\n        }\n\n        if (pInfo->renderTail != pInfo->renderHead)\n        {\n            if (!pInfo->stream->streamStop)\n            {\n                result = pInfo->stream->render.pPin->fnSubmitHandler(pInfo, pInfo->renderTail);\n                if (result != paNoError)\n                {\n                    PA_HP_TRACE((pInfo->stream->hLog, \"Capture submit handler failed with result %d\", result));\n                    return result;\n                }\n            }\n            pInfo->renderTail++;\n            if (!pInfo->pinsStarted && pInfo->priming == 0)\n            {\n                /* We start the pins here to allow \"prime time\" */\n                if ((result = StartPins(pInfo)) == paNoError)\n                {\n                    PA_HP_TRACE((pInfo->stream->hLog, \"Starting pins!\"));\n                    pInfo->pinsStarted = 1;\n                }\n            }\n        }\n    }\n\n    return result;\n}\n\nstatic VOID CALLBACK TimerAPCWaveRTPolledMode(\n    LPVOID lpArgToCompletionRoutine,\n    DWORD dwTimerLowValue,\n    DWORD dwTimerHighValue)\n{\n    HANDLE* pHandles = (HANDLE*)lpArgToCompletionRoutine;\n    if (pHandles[0]) SetEvent(pHandles[0]);\n    if (pHandles[1]) SetEvent(pHandles[1]);\n}\n\nstatic DWORD GetCurrentTimeInMillisecs()\n{\n    return timeGetTime();\n}\n\nPA_THREAD_FUNC ProcessingThread(void* pParam)\n{\n    PaError result = paNoError;\n    HANDLE hAVRT = NULL;\n    HANDLE hTimer = NULL;\n    HANDLE *handleArray = NULL;\n    HANDLE timerEventHandles[2] = {0};\n    unsigned noOfHandles = 0;\n    unsigned captureEvents = 0;\n    unsigned renderEvents = 0;\n    unsigned timerPeriod = 0;\n    DWORD timeStamp[2] = {0};\n\n    PaProcessThreadInfo info;\n    memset(&info, 0, sizeof(PaProcessThreadInfo));\n    info.stream = (PaWinWdmStream*)pParam;\n\n    info.stream->threadResult = paNoError;\n\n    PA_LOGE_;\n\n    info.ti.inputBufferAdcTime = 0.0;\n    info.ti.currentTime = 0.0;\n    info.ti.outputBufferDacTime = 0.0;\n\n    PA_DEBUG((\"In  buffer len: %.3f ms\\n\",(2000*info.stream->capture.framesPerBuffer) / info.stream->streamRepresentation.streamInfo.sampleRate));\n    PA_DEBUG((\"Out buffer len: %.3f ms\\n\",(2000*info.stream->render.framesPerBuffer) / info.stream->streamRepresentation.streamInfo.sampleRate));\n    info.timeout = (DWORD)max(\n        (2000*info.stream->render.framesPerBuffer/info.stream->streamRepresentation.streamInfo.sampleRate + 0.5),\n        (2000*info.stream->capture.framesPerBuffer/info.stream->streamRepresentation.streamInfo.sampleRate + 0.5));\n    info.timeout = max(info.timeout*8, 100);\n    timerPeriod = info.timeout;\n    PA_DEBUG((\"Timeout = %ld ms\\n\",info.timeout));\n\n    /* Allocate handle array */\n    handleArray = (HANDLE*)PaUtil_AllocateMemory((info.stream->capture.noOfPackets + info.stream->render.noOfPackets + 1) * sizeof(HANDLE));\n\n    /* Setup handle array for WFMO */\n    if (info.stream->capture.pPin != 0)\n    {\n        handleArray[noOfHandles++] = info.stream->capture.events[0];\n        if (info.stream->capture.pPin->parentFilter->devInfo.streamingType == Type_kWaveCyclic)\n        {\n            unsigned i;\n            for(i=1; i < info.stream->capture.noOfPackets; ++i)\n            {\n                handleArray[noOfHandles++] = info.stream->capture.events[i];\n            }\n        }\n        captureEvents = noOfHandles;\n        renderEvents = noOfHandles;\n    }\n\n    if (info.stream->render.pPin != 0)\n    {\n        handleArray[noOfHandles++] = info.stream->render.events[0];\n        if (info.stream->render.pPin->parentFilter->devInfo.streamingType == Type_kWaveCyclic)\n        {\n            unsigned i;\n            for(i=1; i < info.stream->render.noOfPackets; ++i)\n            {\n                handleArray[noOfHandles++] = info.stream->render.events[i];\n            }\n        }\n        renderEvents = noOfHandles;\n    }\n    handleArray[noOfHandles++] = info.stream->eventAbort;\n    assert(noOfHandles <= (info.stream->capture.noOfPackets + info.stream->render.noOfPackets + 1));\n\n    /* Prepare render and capture pins */\n    if ((result = PreparePinsForStart(&info)) != paNoError)\n    {\n        PA_DEBUG((\"Failed to prepare device(s)!\\n\"));\n        goto error;\n    }\n\n    /* Init high speed logger */\n    if (PaUtil_InitializeHighSpeedLog(&info.stream->hLog, 1000000) != paNoError)\n    {\n        PA_DEBUG((\"Failed to init high speed logger!\\n\"));\n        goto error;\n    }\n\n    /* Heighten priority here */\n    hAVRT = BumpThreadPriority();\n\n    /* If input only, we start the pins immediately */\n    if (info.stream->render.pPin == 0)\n    {\n        if ((result = StartPins(&info)) != paNoError)\n        {\n            PA_DEBUG((\"Failed to start device(s)!\\n\"));\n            goto error;\n        }\n        info.pinsStarted = 1;\n    }\n\n    /* Handle WaveRT polled mode */\n    {\n        const unsigned fs = (unsigned)info.stream->streamRepresentation.streamInfo.sampleRate;\n        if (info.stream->capture.pPin != 0 && info.stream->capture.pPin->pinKsSubType == SubType_kPolled)\n        {\n            timerEventHandles[0] = info.stream->capture.events[0];\n            timerPeriod = min(timerPeriod, (1000*info.stream->capture.framesPerBuffer)/fs);\n        }\n\n        if (info.stream->render.pPin != 0 && info.stream->render.pPin->pinKsSubType == SubType_kPolled)\n        {\n            timerEventHandles[1] = info.stream->render.events[0];\n            timerPeriod = min(timerPeriod, (1000*info.stream->render.framesPerBuffer)/fs);\n        }\n\n        if (timerEventHandles[0] || timerEventHandles[1])\n        {\n            LARGE_INTEGER dueTime = {0};\n\n            timerPeriod=max(timerPeriod/5,1);\n            PA_DEBUG((\"Timer event handles=0x%04X,0x%04X period=%u ms\", timerEventHandles[0], timerEventHandles[1], timerPeriod));\n            hTimer = CreateWaitableTimer(0, FALSE, NULL);\n            if (hTimer == NULL)\n            {\n                result = paUnanticipatedHostError;\n                goto error;\n            }\n            /* invoke first timeout immediately */\n            if (!SetWaitableTimer(hTimer, &dueTime, timerPeriod, TimerAPCWaveRTPolledMode, timerEventHandles, FALSE))\n            {\n                result = paUnanticipatedHostError;\n                goto error;\n            }\n            PA_DEBUG((\"Waitable timer started, period = %u ms\\n\", timerPeriod));\n        }\n    }\n\n    /* Mark stream as active */\n    info.stream->streamActive = 1;\n    info.stream->threadResult = paNoError;\n\n    /* Up and running... */\n    SetEvent(info.stream->eventStreamStart[StreamStart_kOk]);\n\n    /* Take timestamp here */\n    timeStamp[0] = timeStamp[1] = GetCurrentTimeInMillisecs();\n\n    while(!info.stream->streamAbort)\n    {\n        unsigned doProcessing = 1;\n        unsigned wait = WaitForMultipleObjects(noOfHandles, handleArray, FALSE, 0);\n        unsigned eventSignalled = wait - WAIT_OBJECT_0;\n        DWORD dwCurrentTime = 0;\n\n        if (wait == WAIT_FAILED)\n        {\n            PA_DEBUG((\"Wait failed = %ld! \\n\",wait));\n            break;\n        }\n        if (wait == WAIT_TIMEOUT)\n        {\n            wait = WaitForMultipleObjectsEx(noOfHandles, handleArray, FALSE, 50, TRUE);\n            eventSignalled = wait - WAIT_OBJECT_0;\n        }\n        else\n        {\n            if (eventSignalled < captureEvents)\n            {\n                if (PaUtil_GetRingBufferWriteAvailable(&info.stream->ringBuffer) == 0)\n                {\n                    PA_HP_TRACE((info.stream->hLog, \"!!!!! Input overflow !!!!!\"));\n                    info.underover |= paInputOverflow;\n                }\n            }\n            else if (eventSignalled < renderEvents)\n            {\n                if (!info.priming && info.renderHead - info.renderTail > 1)\n                {\n                    PA_HP_TRACE((info.stream->hLog, \"!!!!! Output underflow !!!!!\"));\n                    info.underover |= paOutputUnderflow;\n                }\n            }\n        }\n\n        /* Get event time */\n        dwCurrentTime = GetCurrentTimeInMillisecs();\n\n        /* Since we can mix capture/render devices between WaveCyclic, WaveRT polled and WaveRT notification (3x3 combinations),\n        we can't rely on the timeout of WFMO to check for device timeouts, we need to keep tally. */\n        if (info.stream->capture.pPin && (dwCurrentTime - timeStamp[0]) >= info.timeout)\n        {\n            PA_DEBUG((\"Timeout for capture device (%u ms)!\", info.timeout, (dwCurrentTime - timeStamp[0])));\n            result = paTimedOut;\n            break;\n        }\n        if (info.stream->render.pPin && (dwCurrentTime - timeStamp[1]) >= info.timeout)\n        {\n            PA_DEBUG((\"Timeout for render device (%u ms)!\", info.timeout, (dwCurrentTime - timeStamp[1])));\n            result = paTimedOut;\n            break;\n        }\n\n        if (wait == WAIT_IO_COMPLETION)\n        {\n            /* Waitable timer has fired! */\n            PA_HP_TRACE((info.stream->hLog, \"WAIT_IO_COMPLETION\"));\n            continue;\n        }\n\n        if (wait == WAIT_TIMEOUT)\n        {\n            continue;\n        }\n        else\n        {\n            if (eventSignalled < captureEvents)\n            {\n                if (info.stream->capture.pPin->fnEventHandler(&info, eventSignalled) == paNoError)\n                {\n                    timeStamp[0] = dwCurrentTime;\n\n                    /* Since we use the ring buffer, we can submit the buffers directly */\n                    if (!info.stream->streamStop)\n                    {\n                        result = info.stream->capture.pPin->fnSubmitHandler(&info, info.captureTail);\n                        if (result != paNoError)\n                        {\n                            PA_HP_TRACE((info.stream->hLog, \"Capture submit handler failed with result %d\", result));\n                            break;\n                        }\n                    }\n                    ++info.captureTail;\n                    /* If full-duplex, let _only_ render event trigger processing. We still need the stream stop\n                    handling working, so let that be processed anyways... */\n                    if (info.stream->userOutputChannels > 0)\n                    {\n                        doProcessing = 0;\n                    }\n                }\n            }\n            else if (eventSignalled < renderEvents)\n            {\n                timeStamp[1] = dwCurrentTime;\n                eventSignalled -= captureEvents;\n                info.stream->render.pPin->fnEventHandler(&info, eventSignalled);\n            }\n            else\n            {\n                assert(info.stream->streamAbort);\n                PA_HP_TRACE((info.stream->hLog, \"Stream abort!\"));\n                continue;\n            }\n        }\n\n        /* Handle processing */\n        if (doProcessing)\n        {\n            result = PaDoProcessing(&info);\n            if (result != paNoError)\n            {\n                PA_HP_TRACE((info.stream->hLog, \"PaDoProcessing failed!\"));\n                break;\n            }\n        }\n\n        if(info.stream->streamStop && info.cbResult != paComplete)\n        {\n            PA_HP_TRACE((info.stream->hLog, \"Stream stop! pending=%d\",info.pending));\n            info.cbResult = paComplete; /* Stop, but play remaining buffers */\n        }\n\n        if(info.pending<=0)\n        {\n            PA_HP_TRACE((info.stream->hLog, \"pending==0 finished...\"));\n            break;\n        }\n        if((!info.stream->render.pPin)&&(info.cbResult!=paContinue))\n        {\n            PA_HP_TRACE((info.stream->hLog, \"record only cbResult=%d...\",info.cbResult));\n            break;\n        }\n    }\n\n    PA_DEBUG((\"Finished processing loop\\n\"));\n\n    info.stream->threadResult = result;\n    goto bailout;\n\nerror:\n    PA_DEBUG((\"Error starting processing thread\\n\"));\n    /* Set the \"error\" event together with result */\n    info.stream->threadResult = result;\n    SetEvent(info.stream->eventStreamStart[StreamStart_kFailed]);\n\nbailout:\n    if (hTimer)\n    {\n        PA_DEBUG((\"Waitable timer stopped\\n\", timerPeriod));\n        CancelWaitableTimer(hTimer);\n        CloseHandle(hTimer);\n        hTimer = 0;\n    }\n\n    if (info.pinsStarted)\n    {\n        StopPins(&info);\n    }\n\n    /* Lower prio here */\n    DropThreadPriority(hAVRT);\n\n    if (handleArray != NULL)\n    {\n        PaUtil_FreeMemory(handleArray);\n    }\n\n#if PA_TRACE_REALTIME_EVENTS\n    if (info.stream->hLog)\n    {\n        PA_DEBUG((\"Dumping highspeed trace...\\n\"));\n        PaUtil_DumpHighSpeedLog(info.stream->hLog, \"hp_trace.log\");\n        PaUtil_DiscardHighSpeedLog(info.stream->hLog);\n        info.stream->hLog = 0;\n    }\n#endif\n    info.stream->streamActive = 0;\n\n    if((!info.stream->streamStop)&&(!info.stream->streamAbort))\n    {\n        /* Invoke the user stream finished callback */\n        /* Only do it from here if not being stopped/aborted by user */\n        if( info.stream->streamRepresentation.streamFinishedCallback != 0 )\n            info.stream->streamRepresentation.streamFinishedCallback( info.stream->streamRepresentation.userData );\n    }\n    info.stream->streamStop = 0;\n    info.stream->streamAbort = 0;\n\n    PA_LOGL_;\n    return 0;\n}\n\n\nstatic PaError StartStream( PaStream *s )\n{\n    PaError result = paNoError;\n    PaWinWdmStream *stream = (PaWinWdmStream*)s;\n\n    PA_LOGE_;\n\n    if (stream->streamThread != NULL)\n    {\n        return paStreamIsNotStopped;\n    }\n\n    stream->streamStop = 0;\n    stream->streamAbort = 0;\n\n    ResetStreamEvents(stream);\n\n    PaUtil_ResetBufferProcessor( &stream->bufferProcessor );\n\n    stream->oldProcessPriority = GetPriorityClass(GetCurrentProcess());\n    /* Uncomment the following line to enable dynamic boosting of the process\n    * priority to real time for best low latency support\n    * Disabled by default because RT processes can easily block the OS */\n    /*ret = SetPriorityClass(GetCurrentProcess(),REALTIME_PRIORITY_CLASS);\n    PA_DEBUG((\"Class ret = %d;\",ret));*/\n\n    stream->streamThread = CREATE_THREAD_FUNCTION (NULL, 0, ProcessingThread, stream, CREATE_SUSPENDED, NULL);\n    if(stream->streamThread == NULL)\n    {\n        result = paInsufficientMemory;\n        goto end;\n    }\n    ResumeThread(stream->streamThread);\n\n    switch (WaitForMultipleObjects(2, stream->eventStreamStart, FALSE, 5000))\n    {\n    case WAIT_OBJECT_0 + StreamStart_kOk:\n        PA_DEBUG((\"Processing thread started!\\n\"));\n        result = paNoError;\n        /* streamActive is set in processing thread */\n        stream->streamStarted = 1;\n        break;\n    case WAIT_OBJECT_0 + StreamStart_kFailed:\n        PA_DEBUG((\"Processing thread start failed! (result=%d)\\n\", stream->threadResult));\n        result = stream->threadResult;\n        /* Wait for the stream to really exit */\n        WaitForSingleObject(stream->streamThread, 200);\n        CloseHandle(stream->streamThread);\n        stream->streamThread = 0;\n        break;\n    case WAIT_TIMEOUT:\n    default:\n        result = paTimedOut;\n        PaWinWDM_SetLastErrorInfo(result, \"Failed to start processing thread (timeout)!\");\n        break;\n    }\n\nend:\n    PA_LOGL_;\n    return result;\n}\n\n\nstatic PaError StopStream( PaStream *s )\n{\n    PaError result = paNoError;\n    PaWinWdmStream *stream = (PaWinWdmStream*)s;\n    BOOL doCb = FALSE;\n\n    PA_LOGE_;\n\n    if(stream->streamActive)\n    {\n        DWORD dwExitCode;\n        doCb = TRUE;\n        stream->streamStop = 1;\n        if (GetExitCodeThread(stream->streamThread, &dwExitCode) && dwExitCode == STILL_ACTIVE)\n        {\n            if (WaitForSingleObject(stream->streamThread, INFINITE) != WAIT_OBJECT_0)\n            {\n                PA_DEBUG((\"StopStream: stream thread terminated\\n\"));\n                TerminateThread(stream->streamThread, -1);\n                result = paTimedOut;\n            }\n        }\n        else\n        {\n            PA_DEBUG((\"StopStream: GECT says not active, but streamActive is not false ??\"));\n            result = paUnanticipatedHostError;\n            PaWinWDM_SetLastErrorInfo(result, \"StopStream: GECT says not active, but streamActive = %d\", stream->streamActive);\n        }\n    }\n    else\n    {\n        if (stream->threadResult != paNoError)\n        {\n            PA_DEBUG((\"StopStream: Stream not active (%d)\\n\", stream->threadResult));\n            result = stream->threadResult;\n            stream->threadResult = paNoError;\n        }\n    }\n\n    if (stream->streamThread != NULL)\n    {\n        CloseHandle(stream->streamThread);\n        stream->streamThread = 0;\n    }\n    stream->streamStarted = 0;\n    stream->streamActive = 0;\n\n    if(doCb)\n    {\n        /* Do user callback now after all state has been reset */\n        /* This means it should be safe for the called function */\n        /* to invoke e.g. StartStream */\n        if( stream->streamRepresentation.streamFinishedCallback != 0 )\n            stream->streamRepresentation.streamFinishedCallback( stream->streamRepresentation.userData );\n    }\n\n    PA_LOGL_;\n    return result;\n}\n\nstatic PaError AbortStream( PaStream *s )\n{\n    PaError result = paNoError;\n    PaWinWdmStream *stream = (PaWinWdmStream*)s;\n    int doCb = 0;\n\n    PA_LOGE_;\n\n    if(stream->streamActive)\n    {\n        doCb = 1;\n        stream->streamAbort = 1;\n        SetEvent(stream->eventAbort); /* Signal immediately */\n        if (WaitForSingleObject(stream->streamThread, 10000) != WAIT_OBJECT_0)\n        {\n            TerminateThread(stream->streamThread, -1);\n            result = paTimedOut;\n\n            PA_DEBUG((\"AbortStream: stream thread terminated\\n\"));\n        }\n        assert(!stream->streamActive);\n    }\n    CloseHandle(stream->streamThread);\n    stream->streamThread = NULL;\n    stream->streamStarted = 0;\n\n    if(doCb)\n    {\n        /* Do user callback now after all state has been reset */\n        /* This means it should be safe for the called function */\n        /* to invoke e.g. StartStream */\n        if( stream->streamRepresentation.streamFinishedCallback != 0 )\n            stream->streamRepresentation.streamFinishedCallback( stream->streamRepresentation.userData );\n    }\n\n    stream->streamActive = 0;\n    stream->streamStarted = 0;\n\n    PA_LOGL_;\n    return result;\n}\n\n\nstatic PaError IsStreamStopped( PaStream *s )\n{\n    PaWinWdmStream *stream = (PaWinWdmStream*)s;\n    int result = 0;\n\n    PA_LOGE_;\n\n    if(!stream->streamStarted)\n        result = 1;\n\n    PA_LOGL_;\n    return result;\n}\n\n\nstatic PaError IsStreamActive( PaStream *s )\n{\n    PaWinWdmStream *stream = (PaWinWdmStream*)s;\n    int result = 0;\n\n    PA_LOGE_;\n\n    if(stream->streamActive)\n        result = 1;\n\n    PA_LOGL_;\n    return result;\n}\n\n\nstatic PaTime GetStreamTime( PaStream* s )\n{\n    PA_LOGE_;\n    PA_LOGL_;\n    (void)s;\n    return PaUtil_GetTime();\n}\n\n\nstatic double GetStreamCpuLoad( PaStream* s )\n{\n    PaWinWdmStream *stream = (PaWinWdmStream*)s;\n    double result;\n    PA_LOGE_;\n    result = PaUtil_GetCpuLoad( &stream->cpuLoadMeasurer );\n    PA_LOGL_;\n    return result;\n}\n\n\n/*\nAs separate stream interfaces are used for blocking and callback\nstreams, the following functions can be guaranteed to only be called\nfor blocking streams.\n*/\n\nstatic PaError ReadStream( PaStream* s,\n                          void *buffer,\n                          unsigned long frames )\n{\n    PaWinWdmStream *stream = (PaWinWdmStream*)s;\n\n    PA_LOGE_;\n\n    /* suppress unused variable warnings */\n    (void) buffer;\n    (void) frames;\n    (void) stream;\n\n    /* IMPLEMENT ME, see portaudio.h for required behavior*/\n    PA_LOGL_;\n    return paInternalError;\n}\n\n\nstatic PaError WriteStream( PaStream* s,\n                           const void *buffer,\n                           unsigned long frames )\n{\n    PaWinWdmStream *stream = (PaWinWdmStream*)s;\n\n    PA_LOGE_;\n\n    /* suppress unused variable warnings */\n    (void) buffer;\n    (void) frames;\n    (void) stream;\n\n    /* IMPLEMENT ME, see portaudio.h for required behavior*/\n    PA_LOGL_;\n    return paInternalError;\n}\n\n\nstatic signed long GetStreamReadAvailable( PaStream* s )\n{\n    PaWinWdmStream *stream = (PaWinWdmStream*)s;\n\n    PA_LOGE_;\n\n    /* suppress unused variable warnings */\n    (void) stream;\n\n    /* IMPLEMENT ME, see portaudio.h for required behavior*/\n    PA_LOGL_;\n    return 0;\n}\n\n\nstatic signed long GetStreamWriteAvailable( PaStream* s )\n{\n    PaWinWdmStream *stream = (PaWinWdmStream*)s;\n\n    PA_LOGE_;\n    /* suppress unused variable warnings */\n    (void) stream;\n\n    /* IMPLEMENT ME, see portaudio.h for required behavior*/\n    PA_LOGL_;\n    return 0;\n}\n\n/***************************************************************************************/\n/* Event and submit handlers for WaveCyclic                                            */\n/***************************************************************************************/\n\nstatic PaError PaPinCaptureEventHandler_WaveCyclic(PaProcessThreadInfo* pInfo, unsigned eventIndex)\n{\n    PaError result = paNoError;\n    ring_buffer_size_t frameCount;\n    DATAPACKET* packet = pInfo->stream->capture.packets + eventIndex;\n\n    assert( eventIndex < pInfo->stream->capture.noOfPackets );\n\n    if (packet->Header.DataUsed == 0)\n    {\n        PA_HP_TRACE((pInfo->stream->hLog, \">>> Capture bogus event (no data): idx=%u\", eventIndex));\n\n        /* Bogus event, reset! This is to handle the behavior of this USB mic: http://shop.xtz.se/measurement-system/microphone-to-dirac-live-room-correction-suite\n           on startup of streaming, where it erroneously sets the event without the corresponding buffer being filled (DataUsed == 0) */\n        ResetEvent(packet->Signal.hEvent);\n\n        result = -1;    /* Only need this to be NOT paNoError */\n    }\n    else\n    {\n        pInfo->capturePackets[pInfo->captureHead & cPacketsArrayMask].packet = packet;\n\n        frameCount = PaUtil_WriteRingBuffer(&pInfo->stream->ringBuffer, packet->Header.Data, pInfo->stream->capture.framesPerBuffer);\n\n        PA_HP_TRACE((pInfo->stream->hLog, \">>> Capture event: idx=%u (frames=%u)\", eventIndex, frameCount));\n        ++pInfo->captureHead;\n    }\n\n    --pInfo->pending; /* This needs to be done in either case */\n    return result;\n}\n\nstatic PaError PaPinCaptureSubmitHandler_WaveCyclic(PaProcessThreadInfo* pInfo, unsigned eventIndex)\n{\n    PaError result = paNoError;\n    DATAPACKET* packet = pInfo->capturePackets[pInfo->captureTail & cPacketsArrayMask].packet;\n    pInfo->capturePackets[pInfo->captureTail & cPacketsArrayMask].packet = 0;\n    assert(packet != 0);\n    PA_HP_TRACE((pInfo->stream->hLog, \"Capture submit: %u\", eventIndex));\n    packet->Header.DataUsed = 0; /* Reset for reuse */\n    packet->Header.OptionsFlags = 0; /* Reset for reuse. Required for e.g. Focusrite Scarlett 2i4 (1st Gen) see #310 */\n    ResetEvent(packet->Signal.hEvent);\n    result = PinRead(pInfo->stream->capture.pPin->handle, packet);\n    ++pInfo->pending;\n    return result;\n}\n\nstatic PaError PaPinRenderEventHandler_WaveCyclic(PaProcessThreadInfo* pInfo, unsigned eventIndex)\n{\n    assert( eventIndex < pInfo->stream->render.noOfPackets );\n\n    pInfo->renderPackets[pInfo->renderHead & cPacketsArrayMask].packet = pInfo->stream->render.packets + eventIndex;\n    PA_HP_TRACE((pInfo->stream->hLog, \"<<< Render event : idx=%u head=%u\", eventIndex, pInfo->renderHead));\n    ++pInfo->renderHead;\n    --pInfo->pending;\n    return paNoError;\n}\n\nstatic PaError PaPinRenderSubmitHandler_WaveCyclic(PaProcessThreadInfo* pInfo, unsigned eventIndex)\n{\n    PaError result = paNoError;\n    DATAPACKET* packet = pInfo->renderPackets[pInfo->renderTail & cPacketsArrayMask].packet;\n    pInfo->renderPackets[pInfo->renderTail & cPacketsArrayMask].packet = 0;\n    assert(packet != 0);\n\n    PA_HP_TRACE((pInfo->stream->hLog, \"Render submit : %u idx=%u\", pInfo->renderTail, (unsigned)(packet - pInfo->stream->render.packets)));\n    ResetEvent(packet->Signal.hEvent);\n    result = PinWrite(pInfo->stream->render.pPin->handle, packet);\n    /* Reset event, just in case we have an analogous situation to capture (see PaPinCaptureSubmitHandler_WaveCyclic) */\n    ++pInfo->pending;\n    if (pInfo->priming)\n    {\n        --pInfo->priming;\n    }\n    return result;\n}\n\n/***************************************************************************************/\n/* Event and submit handlers for WaveRT                                                */\n/***************************************************************************************/\n\nstatic PaError PaPinCaptureEventHandler_WaveRTEvent(PaProcessThreadInfo* pInfo, unsigned eventIndex)\n{\n    unsigned long pos;\n    unsigned realInBuf;\n    unsigned frameCount;\n    PaWinWdmIOInfo* pCapture = &pInfo->stream->capture;\n    const unsigned halfInputBuffer = pCapture->hostBufferSize >> 1;\n    PaWinWdmPin* pin = pCapture->pPin;\n    DATAPACKET* packet = 0;\n\n    /* Get hold of current ADC position */\n    pin->fnAudioPosition(pin, &pos);\n    /* Wrap it (robi: why not use hw latency compensation here ?? because pos then gets _way_ off from\n    where it should be, i.e. at beginning or half buffer position. Why? No idea.)  */\n\n    pos %= pCapture->hostBufferSize;\n    /* Then realInBuf will point to \"other\" half of double buffer */\n    realInBuf = pos < halfInputBuffer ? 1U : 0U;\n\n    packet = pInfo->stream->capture.packets + realInBuf;\n\n    /* Call barrier (or dummy) */\n    pin->fnMemBarrier();\n\n    /* Put it in queue */\n    frameCount = PaUtil_WriteRingBuffer(&pInfo->stream->ringBuffer, packet->Header.Data, pCapture->framesPerBuffer);\n\n    pInfo->capturePackets[pInfo->captureHead & cPacketsArrayMask].packet = packet;\n\n    PA_HP_TRACE((pInfo->stream->hLog, \"Capture event (WaveRT): idx=%u head=%u (pos = %4.1lf%%, frames=%u)\", realInBuf, pInfo->captureHead, (pos * 100.0 / pCapture->hostBufferSize), frameCount));\n\n    ++pInfo->captureHead;\n    --pInfo->pending;\n\n    return paNoError;\n}\n\nstatic PaError PaPinCaptureEventHandler_WaveRTPolled(PaProcessThreadInfo* pInfo, unsigned eventIndex)\n{\n    unsigned long pos;\n    unsigned bytesToRead;\n    PaWinWdmIOInfo* pCapture = &pInfo->stream->capture;\n    const unsigned halfInputBuffer = pCapture->hostBufferSize>>1;\n    PaWinWdmPin* pin = pInfo->stream->capture.pPin;\n\n    /* Get hold of current ADC position */\n    pin->fnAudioPosition(pin, &pos);\n    /* Wrap it (robi: why not use hw latency compensation here ?? because pos then gets _way_ off from\n    where it should be, i.e. at beginning or half buffer position. Why? No idea.)  */\n    /* Compensate for HW FIFO to get to last read buffer position */\n    pos += pin->hwLatency;\n    pos %= pCapture->hostBufferSize;\n    /* Need to align position on frame boundary */\n    pos &= ~(pCapture->bytesPerFrame - 1);\n\n    /* Call barrier (or dummy) */\n    pin->fnMemBarrier();\n\n    /* Put it in \"queue\" */\n    bytesToRead = (pCapture->hostBufferSize + pos - pCapture->lastPosition) % pCapture->hostBufferSize;\n    if (bytesToRead > 0)\n    {\n        unsigned frameCount = PaUtil_WriteRingBuffer(&pInfo->stream->ringBuffer,\n            pCapture->hostBuffer + pCapture->lastPosition,\n            bytesToRead / pCapture->bytesPerFrame);\n\n        pCapture->lastPosition = (pCapture->lastPosition + frameCount * pCapture->bytesPerFrame) % pCapture->hostBufferSize;\n\n        PA_HP_TRACE((pInfo->stream->hLog, \"Capture event (WaveRTPolled): pos = %4.1lf%%, framesRead=%u\", (pos * 100.0 / pCapture->hostBufferSize), frameCount));\n        ++pInfo->captureHead;\n        --pInfo->pending;\n    }\n    return paNoError;\n}\n\nstatic PaError PaPinCaptureSubmitHandler_WaveRTEvent(PaProcessThreadInfo* pInfo, unsigned eventIndex)\n{\n    pInfo->capturePackets[pInfo->captureTail & cPacketsArrayMask].packet = 0;\n    ++pInfo->pending;\n    return paNoError;\n}\n\nstatic PaError PaPinCaptureSubmitHandler_WaveRTPolled(PaProcessThreadInfo* pInfo, unsigned eventIndex)\n{\n    pInfo->capturePackets[pInfo->captureTail & cPacketsArrayMask].packet = 0;\n    ++pInfo->pending;\n    return paNoError;\n}\n\nstatic PaError PaPinRenderEventHandler_WaveRTEvent(PaProcessThreadInfo* pInfo, unsigned eventIndex)\n{\n    unsigned long pos;\n    unsigned realOutBuf;\n    PaWinWdmIOInfo* pRender = &pInfo->stream->render;\n    const unsigned halfOutputBuffer = pRender->hostBufferSize >> 1;\n    PaWinWdmPin* pin = pInfo->stream->render.pPin;\n    PaIOPacket* ioPacket = &pInfo->renderPackets[pInfo->renderHead & cPacketsArrayMask];\n\n    /* Get hold of current DAC position */\n    pin->fnAudioPosition(pin, &pos);\n    /* Compensate for HW FIFO to get to last read buffer position */\n    pos += pin->hwLatency;\n    /* Wrap it */\n    pos %= pRender->hostBufferSize;\n    /* And align it, not sure its really needed though */\n    pos &= ~(pRender->bytesPerFrame - 1);\n    /* Then realOutBuf will point to \"other\" half of double buffer */\n    realOutBuf = pos < halfOutputBuffer ? 1U : 0U;\n\n    if (pInfo->priming)\n    {\n        realOutBuf = pInfo->renderHead & 0x1;\n    }\n    ioPacket->packet = pInfo->stream->render.packets + realOutBuf;\n    ioPacket->startByte = realOutBuf * halfOutputBuffer;\n    ioPacket->lengthBytes = halfOutputBuffer;\n\n    PA_HP_TRACE((pInfo->stream->hLog, \"Render event (WaveRT) : idx=%u head=%u (pos = %4.1lf%%)\", realOutBuf, pInfo->renderHead, (pos * 100.0 / pRender->hostBufferSize) ));\n\n    ++pInfo->renderHead;\n    --pInfo->pending;\n    return paNoError;\n}\n\nstatic PaError PaPinRenderEventHandler_WaveRTPolled(PaProcessThreadInfo* pInfo, unsigned eventIndex)\n{\n    unsigned long pos;\n    unsigned realOutBuf;\n    unsigned bytesToWrite;\n\n    PaWinWdmIOInfo* pRender = &pInfo->stream->render;\n    const unsigned halfOutputBuffer = pRender->hostBufferSize >> 1;\n    PaWinWdmPin* pin = pInfo->stream->render.pPin;\n    PaIOPacket* ioPacket = &pInfo->renderPackets[pInfo->renderHead & cPacketsArrayMask];\n\n    /* Get hold of current DAC position */\n    pin->fnAudioPosition(pin, &pos);\n    /* Compensate for HW FIFO to get to last read buffer position */\n    pos += pin->hwLatency;\n    /* Wrap it */\n    pos %= pRender->hostBufferSize;\n    /* And align it, not sure its really needed though */\n    pos &= ~(pRender->bytesPerFrame - 1);\n\n    if (pInfo->priming)\n    {\n        realOutBuf = pInfo->renderHead & 0x1;\n        ioPacket->packet = pInfo->stream->render.packets + realOutBuf;\n        ioPacket->startByte = realOutBuf * halfOutputBuffer;\n        ioPacket->lengthBytes = halfOutputBuffer;\n        ++pInfo->renderHead;\n        --pInfo->pending;\n    }\n    else\n    {\n        bytesToWrite = (pRender->hostBufferSize + pos - pRender->lastPosition) % pRender->hostBufferSize;\n        ++pRender->pollCntr;\n        if (bytesToWrite >= halfOutputBuffer)\n        {\n            realOutBuf = (pos < halfOutputBuffer) ? 1U : 0U;\n            ioPacket->packet = pInfo->stream->render.packets + realOutBuf;\n            pRender->lastPosition = realOutBuf ? 0U : halfOutputBuffer;\n            ioPacket->startByte = realOutBuf * halfOutputBuffer;\n            ioPacket->lengthBytes = halfOutputBuffer;\n            ++pInfo->renderHead;\n            --pInfo->pending;\n            PA_HP_TRACE((pInfo->stream->hLog, \"Render event (WaveRTPolled) : idx=%u head=%u (pos = %4.1lf%%, cnt=%u)\", realOutBuf, pInfo->renderHead, (pos * 100.0 / pRender->hostBufferSize), pRender->pollCntr));\n            pRender->pollCntr = 0;\n        }\n    }\n    return paNoError;\n}\n\nstatic PaError PaPinRenderSubmitHandler_WaveRTEvent(PaProcessThreadInfo* pInfo, unsigned eventIndex)\n{\n    PaWinWdmPin* pin = pInfo->stream->render.pPin;\n    pInfo->renderPackets[pInfo->renderTail & cPacketsArrayMask].packet = 0;\n    /* Call barrier (if needed) */\n    pin->fnMemBarrier();\n    PA_HP_TRACE((pInfo->stream->hLog, \"Render submit (WaveRT) : submit=%u\", pInfo->renderTail));\n    ++pInfo->pending;\n    if (pInfo->priming)\n    {\n        --pInfo->priming;\n        if (pInfo->priming)\n        {\n            PA_HP_TRACE((pInfo->stream->hLog, \"Setting WaveRT event for priming (2)\"));\n            SetEvent(pInfo->stream->render.events[0]);\n        }\n    }\n    return paNoError;\n}\n\nstatic PaError PaPinRenderSubmitHandler_WaveRTPolled(PaProcessThreadInfo* pInfo, unsigned eventIndex)\n{\n    PaWinWdmPin* pin = pInfo->stream->render.pPin;\n    pInfo->renderPackets[pInfo->renderTail & cPacketsArrayMask].packet = 0;\n    /* Call barrier (if needed) */\n    pin->fnMemBarrier();\n    PA_HP_TRACE((pInfo->stream->hLog, \"Render submit (WaveRTPolled) : submit=%u\", pInfo->renderTail));\n    ++pInfo->pending;\n    if (pInfo->priming)\n    {\n        --pInfo->priming;\n        if (pInfo->priming)\n        {\n            PA_HP_TRACE((pInfo->stream->hLog, \"Setting WaveRT event for priming (2)\"));\n            SetEvent(pInfo->stream->render.events[0]);\n        }\n    }\n    return paNoError;\n}\n"
  },
  {
    "path": "thirdparty/portaudio/src/hostapi/wdmks/readme.txt",
    "content": "Notes about WDM-KS host API\n---------------------------\n\nStatus history\n--------------\n16th January 2011:\nAdded support for WaveRT device API (Vista and later) for even lesser \nlatency support.\n\n10th November 2005:\nMade following changes:\n * OpenStream: Try all PaSampleFormats internally if the the chosen\n     format is not supported natively.  This fixed several problems\n     with soundcards that did not take kindly to using 24-bit 3-byte formats.\n * OpenStream: Make the minimum framesPerHostIBuffer (and framesPerHostOBuffer)\n     the default frameSize for the playback/recording pin.\n * ProcessingThread: Added a switch to only call PaUtil_EndBufferProcessing\n     if the total input frames equals the total output frames\n\n5th September 2004:\nThis is the first public version of the code. It should be considered\nan alpha release with zero guarantee not to crash on any particular \nsystem. So far it has only been tested in the author's development\nenvironment, which means a Win2k/SP2 PIII laptop with integrated \nSoundMAX driver and USB Tascam US-428 compiled with both MinGW\n(GCC 3.3) and MSVC++6 using the MS DirectX 9 SDK.\nIt has been most widely tested with the MinGW build, with most of the\ntest programs (particularly paqa_devs and paqa_errs) passing.\nThere are some notable failures: patest_out_underflow and both of the\nblocking I/O tests (as blocking I/O is not implemented).\nAt this point the code needs to be tested with a much wider variety \nof configurations and feedback provided from testers regarding\nboth working and failing cases.\n\nWhat is the WDM-KS host API?\n----------------------------\nPortAudio for Windows currently has 3 functional host implementations.\nMME uses the oldest Windows audio API which does not offer good\nplay/record latency. \nDirectX improves this, but still imposes a penalty\nof 10s of milliseconds due to the system mixing of streams from\nmultiple applications. \nASIO offers very good latency, but requires special drivers which are\nnot always available for cheaper audio hardware. Also, when ASIO \ndrivers are available, they are not always so robust because they \nbypass all of the standardised Windows device driver architecture \nand hit the hardware their own way.\nAlternatively there are a couple of free (but closed source) ASIO \nimplementations which connect to the lower level Windows \n\"Kernel Streaming\" API, but again these require special installation \nby the user, and can be limited in functionality or difficult to use. \n\nThis is where the PortAudio \"WDM-KS\" host implementation comes in.\nIt directly connects PortAudio to the same Kernel Streaming API which\nthose ASIO bridges use. This avoids the mixing penalty of DirectX, \ngiving at least as good latency as any ASIO driver, but it has the\nadvantage of working with ANY Windows audio hardware which is available\nthrough the normal MME/DirectX routes without the user requiring \nany additional device drivers to be installed, and allowing all \ndevice selection to be done through the normal PortAudio API.\n\nNote that in general you should only be using this host API if your \napplication has a real requirement for very low latency audio (<20ms), \neither because you are generating sounds in real-time based upon \nuser input, or you a processing recorded audio in real time.\n\nThe only thing to be aware of is that using the KS interface will\nblock that device from being used by the rest of system through\nthe higher level APIs, or conversely, if the system is using\na device, the KS API will not be able to use it. MS recommend that\nyou should keep the device open only when your application has focus.\nIn PortAudio terms, this means having a stream Open on a WDMKS device.\n\nUsage\n-----\nTo add the WDMKS backend to your program which is already using \nPortAudio, you must define PA_USE_WDMKS=1 in your build file,\nand include the pa_win_wdmks\\pa_win_wdmks.c into your build.\nThe file should compile in both C and C++.\nYou will need a DirectX SDK installed on your system for the\nks.h and ksmedia.h header files.\nYou will need to link to the system \"setupapi\" library.\nNote that if you use MinGW, you will get more warnings from \nthe DX header files when using GCC(C), and still a few warnings\nwith G++(CPP).\n"
  },
  {
    "path": "thirdparty/portaudio/src/hostapi/wmme/pa_win_wmme.c",
    "content": "/*\n * $Id$\n * pa_win_wmme.c\n * Implementation of PortAudio for Windows MultiMedia Extensions (WMME)\n *\n * PortAudio Portable Real-Time Audio Library\n * Latest Version at: http://www.portaudio.com\n *\n * Authors: Ross Bencina and Phil Burk\n * Copyright (c) 1999-2000 Ross Bencina and Phil Burk\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n/* Modification History:\n PLB = Phil Burk\n JM = Julien Maillard\n RDB = Ross Bencina\n PLB20010402 - sDevicePtrs now allocates based on sizeof(pointer)\n PLB20010413 - check for excessive numbers of channels\n PLB20010422 - apply Mike Berry's changes for CodeWarrior on PC\n               including conditional inclusion of memory.h,\n               and explicit typecasting on memory allocation\n PLB20010802 - use GlobalAlloc for sDevicesPtr instead of PaHost_AllocFastMemory\n PLB20010816 - pass process instead of thread to SetPriorityClass()\n PLB20010927 - use number of frames instead of real-time for CPULoad calculation.\n JM20020118 - prevent hung thread when buffers underflow.\n PLB20020321 - detect Win XP versus NT, 9x; fix DBUG typo; removed init of CurrentCount\n RDB20020411 - various renaming cleanups, factored streamData alloc and cpu usage init\n RDB20020417 - stopped counting WAVE_MAPPER when there were no real devices\n               refactoring, renaming and fixed a few edge case bugs\n RDB20020531 - converted to V19 framework\n ** NOTE  maintenance history is now stored in CVS **\n*/\n\n/** @file\n    @ingroup hostapi_src\n\n    @brief Win32 host API implementation for the Windows MultiMedia Extensions (WMME) audio API.\n*/\n\n/*\n    How it works:\n\n    For both callback and blocking read/write streams we open the MME devices\n    in CALLBACK_EVENT mode. In this mode, MME signals an Event object whenever\n    it has finished with a buffer (either filled it for input, or played it\n    for output). Where necessary, we block waiting for Event objects using\n    WaitMultipleObjects().\n\n    When implementing a PA callback stream, we set up a high priority thread\n    which waits on the MME buffer Events and drains/fills the buffers when\n    they are ready.\n\n    When implementing a PA blocking read/write stream, we simply wait on these\n    Events (when necessary) inside the ReadStream() and WriteStream() functions.\n*/\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <limits.h>\n#include <math.h>\n#include <windows.h>\n#include <mmsystem.h>\n#ifndef UNDER_CE\n#include <process.h>\n#endif\n#include <assert.h>\n/* PLB20010422 - \"memory.h\" doesn't work on CodeWarrior for PC. Thanks Mike Berry for the mod. */\n#ifndef __MWERKS__\n#include <malloc.h>\n#include <memory.h>\n#endif /* __MWERKS__ */\n\n#include \"portaudio.h\"\n#include \"pa_trace.h\"\n#include \"pa_util.h\"\n#include \"pa_allocation.h\"\n#include \"pa_hostapi.h\"\n#include \"pa_stream.h\"\n#include \"pa_cpuload.h\"\n#include \"pa_process.h\"\n#include \"pa_debugprint.h\"\n\n#include \"pa_win_wmme.h\"\n#include \"pa_win_waveformat.h\"\n\n#ifdef PAWIN_USE_WDMKS_DEVICE_INFO\n#include \"pa_win_wdmks_utils.h\"\n#ifndef DRV_QUERYDEVICEINTERFACE\n#define DRV_QUERYDEVICEINTERFACE     (DRV_RESERVED + 12)\n#endif\n#ifndef DRV_QUERYDEVICEINTERFACESIZE\n#define DRV_QUERYDEVICEINTERFACESIZE (DRV_RESERVED + 13)\n#endif\n#endif /* PAWIN_USE_WDMKS_DEVICE_INFO */\n\n/* use CreateThread for CYGWIN, _beginthreadex for all others */\n#if !defined(__CYGWIN__) && !defined(_WIN32_WCE)\n#define CREATE_THREAD (HANDLE)_beginthreadex( 0, 0, ProcessingThreadProc, stream, 0, &stream->processingThreadId )\n#define PA_THREAD_FUNC static unsigned WINAPI\n#define PA_THREAD_ID unsigned\n#else\n#define CREATE_THREAD CreateThread( 0, 0, ProcessingThreadProc, stream, 0, &stream->processingThreadId )\n#define PA_THREAD_FUNC static DWORD WINAPI\n#define PA_THREAD_ID DWORD\n#endif\n#if (defined(_WIN32_WCE))\n#pragma comment(lib, \"Coredll.lib\")\n#elif (defined(WIN32) && (defined(_MSC_VER) && (_MSC_VER >= 1200))) /* MSC version 6 and above */\n#pragma comment(lib, \"winmm.lib\")\n#endif\n\n/*\n provided in newer platform sdks\n */\n#ifndef DWORD_PTR\n    #if defined(_WIN64)\n        #define DWORD_PTR unsigned __int64\n    #else\n        #define DWORD_PTR unsigned long\n    #endif\n#endif\n\n/************************************************* Constants ********/\n\n#define PA_MME_USE_HIGH_DEFAULT_LATENCY_    (0)  /* For debugging glitches. */\n\n#if PA_MME_USE_HIGH_DEFAULT_LATENCY_\n    #define PA_MME_WIN_9X_DEFAULT_LATENCY_                              (0.4)\n    #define PA_MME_MIN_HOST_OUTPUT_BUFFER_COUNT_                        (4)\n    #define PA_MME_MIN_HOST_INPUT_BUFFER_COUNT_FULL_DUPLEX_             (4)\n    #define PA_MME_MIN_HOST_INPUT_BUFFER_COUNT_HALF_DUPLEX_             (4)\n    #define PA_MME_HOST_BUFFER_GRANULARITY_FRAMES_WHEN_UNSPECIFIED_     (16)\n    #define PA_MME_MAX_HOST_BUFFER_SECS_                                (0.3)       /* Do not exceed unless user buffer exceeds */\n    #define PA_MME_MAX_HOST_BUFFER_BYTES_                               (32 * 1024) /* Has precedence over PA_MME_MAX_HOST_BUFFER_SECS_, some drivers are known to crash with buffer sizes > 32k */\n#else\n    #define PA_MME_WIN_9X_DEFAULT_LATENCY_                              (0.2)\n    #define PA_MME_MIN_HOST_OUTPUT_BUFFER_COUNT_                        (2)\n    #define PA_MME_MIN_HOST_INPUT_BUFFER_COUNT_FULL_DUPLEX_             (3)         /* always use at least 3 input buffers for full duplex */\n    #define PA_MME_MIN_HOST_INPUT_BUFFER_COUNT_HALF_DUPLEX_             (2)\n    #define PA_MME_HOST_BUFFER_GRANULARITY_FRAMES_WHEN_UNSPECIFIED_     (16)\n    #define PA_MME_MAX_HOST_BUFFER_SECS_                                (0.1)       /* Do not exceed unless user buffer exceeds */\n    #define PA_MME_MAX_HOST_BUFFER_BYTES_                               (32 * 1024) /* Has precedence over PA_MME_MAX_HOST_BUFFER_SECS_, some drivers are known to crash with buffer sizes > 32k */\n#endif\n\n/* Use higher latency for NT because it is even worse at real-time\n   operation than Win9x.\n*/\n#define PA_MME_WIN_NT_DEFAULT_LATENCY_                              (0.4)\n\n/* Default low latency for WDM based systems. This is based on a rough\n   survey of workable latency settings using patest_wmme_find_best_latency_params.c.\n   See pdf attached to ticket 185 for a graph of the survey results:\n   http://www.portaudio.com/trac/ticket/185\n\n   Workable latencies varied between 40ms and ~80ms on different systems (different\n   combinations of hardware, 32 and 64 bit, WinXP, Vista and Win7. We didn't\n   get enough Vista results to know if Vista has systemically worse latency.\n   For now we choose a safe value across all Windows versions here.\n*/\n#define PA_MME_WIN_WDM_DEFAULT_LATENCY_                             (0.090)\n\n\n/* When client suggestedLatency could result in many host buffers, we aim to have around 8,\n   based off Windows documentation that suggests that the kmixer uses 8 buffers. This choice\n   is somewhat arbitrary here, since we haven't observed significant stability degradation\n   with using either more, or less buffers.\n*/\n#define PA_MME_TARGET_HOST_BUFFER_COUNT_    8\n\n#define PA_MME_MIN_TIMEOUT_MSEC_        (1000)\n\nstatic const char constInputMapperSuffix_[] = \" - Input\";\nstatic const char constOutputMapperSuffix_[] = \" - Output\";\n\n/********************************************************************/\n\n/* Copy null-terminated WCHAR string to explicit char string using UTF8 encoding */\nstatic char *CopyWCharStringToUtf8CString(char *destination, size_t destLengthBytes, const WCHAR *source)\n{\n    /* The cbMultiByte parameter [\"destLengthBytes\" below] is:\n    \"\"\"\n    Size, in bytes, of the buffer indicated by lpMultiByteStr [\"destination\" below].\n    If this parameter is set to 0, the function returns the required buffer\n    size for lpMultiByteStr and makes no use of the output parameter itself.\n    \"\"\"\n    Source: WideCharToMultiByte at MSDN:\n    http://msdn.microsoft.com/en-us/library/windows/desktop/dd374130(v=vs.85).aspx\n    */\n    int intDestLengthBytes; /* cbMultiByte */\n    /* intDestLengthBytes is an int, destLengthBytes is a size_t. Ensure that we don't overflow\n    intDestLengthBytes by only using at most INT_MAX bytes of destination buffer.\n    */\n    if (destLengthBytes < INT_MAX)\n    {\n#pragma warning (disable : 4267) /* \"conversion from 'size_t' to 'int', possible loss of data\" */\n        intDestLengthBytes = (int)destLengthBytes; /* destLengthBytes is guaranteed < INT_MAX here */\n#pragma warning (default : 4267)\n    }\n    else\n    {\n        intDestLengthBytes = INT_MAX;\n    }\n\n    if (WideCharToMultiByte(CP_UTF8, 0, source, -1, destination, /*cbMultiByte=*/intDestLengthBytes, NULL, NULL) == 0)\n        return NULL;\n    return destination;\n}\n\n/* returns required length (in bytes) of destination buffer when\n   converting WCHAR string to UTF8 bytes, not including the terminating null. */\nstatic size_t WCharStringLen(const WCHAR *str)\n{\n    return WideCharToMultiByte(CP_UTF8, 0, str, -1, NULL, 0, NULL, NULL);\n}\n\n/********************************************************************/\n\ntypedef struct PaWinMmeStream PaWinMmeStream;     /* forward declaration */\n\n/* prototypes for functions declared in this file */\n\n#ifdef __cplusplus\nextern \"C\"\n{\n#endif /* __cplusplus */\n\nPaError PaWinMme_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index );\n\n#ifdef __cplusplus\n}\n#endif /* __cplusplus */\n\nstatic void Terminate( struct PaUtilHostApiRepresentation *hostApi );\nstatic PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,\n                           PaStream** stream,\n                           const PaStreamParameters *inputParameters,\n                           const PaStreamParameters *outputParameters,\n                           double sampleRate,\n                           unsigned long framesPerBuffer,\n                           PaStreamFlags streamFlags,\n                           PaStreamCallback *streamCallback,\n                           void *userData );\nstatic PaError IsFormatSupported( struct PaUtilHostApiRepresentation *hostApi,\n                                  const PaStreamParameters *inputParameters,\n                                  const PaStreamParameters *outputParameters,\n                                  double sampleRate );\nstatic PaError CloseStream( PaStream* stream );\nstatic PaError StartStream( PaStream *stream );\nstatic PaError StopStream( PaStream *stream );\nstatic PaError AbortStream( PaStream *stream );\nstatic PaError IsStreamStopped( PaStream *s );\nstatic PaError IsStreamActive( PaStream *stream );\nstatic PaTime GetStreamTime( PaStream *stream );\nstatic double GetStreamCpuLoad( PaStream* stream );\nstatic PaError ReadStream( PaStream* stream, void *buffer, unsigned long frames );\nstatic PaError WriteStream( PaStream* stream, const void *buffer, unsigned long frames );\nstatic signed long GetStreamReadAvailable( PaStream* stream );\nstatic signed long GetStreamWriteAvailable( PaStream* stream );\n\n\n/* macros for setting last host error information */\n\n#define PA_MME_SET_LAST_WAVEIN_ERROR( mmresult )                              \\\n    {                                                                         \\\n        wchar_t mmeErrorTextWide[ MAXERRORLENGTH ];                           \\\n        char mmeErrorText[ MAXERRORLENGTH ];                                  \\\n        waveInGetErrorTextW( mmresult, mmeErrorTextWide, MAXERRORLENGTH );    \\\n        WideCharToMultiByte( CP_UTF8, 0, mmeErrorTextWide, -1,                \\\n            mmeErrorText, MAXERRORLENGTH, NULL, NULL );                       \\\n        PaUtil_SetLastHostErrorInfo( paMME, mmresult, mmeErrorText );         \\\n    }\n\n#define PA_MME_SET_LAST_WAVEOUT_ERROR( mmresult )                             \\\n    {                                                                         \\\n        wchar_t mmeErrorTextWide[ MAXERRORLENGTH ];                           \\\n        char mmeErrorText[ MAXERRORLENGTH ];                                  \\\n        waveOutGetErrorTextW( mmresult, mmeErrorTextWide, MAXERRORLENGTH );   \\\n        WideCharToMultiByte( CP_UTF8, 0, mmeErrorTextWide, -1,                \\\n            mmeErrorText, MAXERRORLENGTH, NULL, NULL );                       \\\n        PaUtil_SetLastHostErrorInfo( paMME, mmresult, mmeErrorText );         \\\n    }\n\n\nstatic void PaMme_SetLastSystemError( DWORD errorCode )\n{\n    char *lpMsgBuf;\n    FormatMessage(\n        FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,\n        NULL,\n        errorCode,\n        MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),\n        (LPTSTR) &lpMsgBuf,\n        0,\n        NULL\n    );\n    PaUtil_SetLastHostErrorInfo( paMME, errorCode, lpMsgBuf );\n    LocalFree( lpMsgBuf );\n}\n\n#define PA_MME_SET_LAST_SYSTEM_ERROR( errorCode ) \\\n    PaMme_SetLastSystemError( errorCode )\n\n\n/* PaError returning wrappers for some commonly used win32 functions\n    note that we allow passing a null ptr to have no effect.\n*/\n\nstatic PaError CreateEventWithPaError( HANDLE *handle,\n        LPSECURITY_ATTRIBUTES lpEventAttributes,\n        BOOL bManualReset,\n        BOOL bInitialState,\n        LPCTSTR lpName )\n{\n    PaError result = paNoError;\n\n    *handle = NULL;\n\n    *handle = CreateEvent( lpEventAttributes, bManualReset, bInitialState, lpName );\n    if( *handle == NULL )\n    {\n        result = paUnanticipatedHostError;\n        PA_MME_SET_LAST_SYSTEM_ERROR( GetLastError() );\n    }\n\n    return result;\n}\n\n\nstatic PaError ResetEventWithPaError( HANDLE handle )\n{\n    PaError result = paNoError;\n\n    if( handle )\n    {\n        if( ResetEvent( handle ) == 0 )\n        {\n            result = paUnanticipatedHostError;\n            PA_MME_SET_LAST_SYSTEM_ERROR( GetLastError() );\n        }\n    }\n\n    return result;\n}\n\n\nstatic PaError CloseHandleWithPaError( HANDLE handle )\n{\n    PaError result = paNoError;\n\n    if( handle )\n    {\n        if( CloseHandle( handle ) == 0 )\n        {\n            result = paUnanticipatedHostError;\n            PA_MME_SET_LAST_SYSTEM_ERROR( GetLastError() );\n        }\n    }\n\n    return result;\n}\n\n\n/* PaWinMmeHostApiRepresentation - host api datastructure specific to this implementation */\n\ntypedef struct\n{\n    PaUtilHostApiRepresentation inheritedHostApiRep;\n    PaUtilStreamInterface callbackStreamInterface;\n    PaUtilStreamInterface blockingStreamInterface;\n\n    PaUtilAllocationGroup *allocations;\n\n    int inputDeviceCount, outputDeviceCount;\n\n    /** winMmeDeviceIds is an array of WinMme device ids.\n        fields in the range [0, inputDeviceCount) are input device ids,\n        and [inputDeviceCount, inputDeviceCount + outputDeviceCount) are output\n        device ids.\n     */\n    UINT *winMmeDeviceIds;\n}\nPaWinMmeHostApiRepresentation;\n\n\ntypedef struct\n{\n    PaDeviceInfo inheritedDeviceInfo;\n    DWORD dwFormats; /**<< standard formats bitmask from the WAVEINCAPS and WAVEOUTCAPS structures */\n    char deviceInputChannelCountIsKnown; /**<< if the system returns 0xFFFF then we don't really know the number of supported channels (1=>known, 0=>unknown)*/\n    char deviceOutputChannelCountIsKnown; /**<< if the system returns 0xFFFF then we don't really know the number of supported channels (1=>known, 0=>unknown)*/\n}\nPaWinMmeDeviceInfo;\n\n\n/*************************************************************************\n * Returns recommended device ID.\n * On the PC, the recommended device can be specified by the user by\n * setting an environment variable. For example, to use device #1.\n *\n *    set PA_RECOMMENDED_OUTPUT_DEVICE=1\n *\n * The user should first determine the available device ID by using\n * the supplied application \"pa_devs\".\n */\n#define PA_ENV_BUF_SIZE_  (32)\n#define PA_REC_IN_DEV_ENV_NAME_  (\"PA_RECOMMENDED_INPUT_DEVICE\")\n#define PA_REC_OUT_DEV_ENV_NAME_  (\"PA_RECOMMENDED_OUTPUT_DEVICE\")\nstatic PaDeviceIndex GetEnvDefaultDeviceID( char *envName )\n{\n    PaDeviceIndex recommendedIndex = paNoDevice;\n    DWORD   hresult;\n    char    envbuf[PA_ENV_BUF_SIZE_];\n\n#ifndef WIN32_PLATFORM_PSPC /* no GetEnvironmentVariable on PocketPC */\n\n    /* Let user determine default device by setting environment variable. */\n    hresult = GetEnvironmentVariableA( envName, envbuf, PA_ENV_BUF_SIZE_ );\n    if( (hresult > 0) && (hresult < PA_ENV_BUF_SIZE_) )\n    {\n        recommendedIndex = atoi( envbuf );\n    }\n#endif\n\n    return recommendedIndex;\n}\n\n\nstatic void InitializeDefaultDeviceIdsFromEnv( PaWinMmeHostApiRepresentation *hostApi )\n{\n    PaDeviceIndex device;\n\n    /* input */\n    device = GetEnvDefaultDeviceID( PA_REC_IN_DEV_ENV_NAME_ );\n    if( device != paNoDevice &&\n            ( device >= 0 && device < hostApi->inheritedHostApiRep.info.deviceCount ) &&\n            hostApi->inheritedHostApiRep.deviceInfos[ device ]->maxInputChannels > 0 )\n    {\n        hostApi->inheritedHostApiRep.info.defaultInputDevice = device;\n    }\n\n    /* output */\n    device = GetEnvDefaultDeviceID( PA_REC_OUT_DEV_ENV_NAME_ );\n    if( device != paNoDevice &&\n            ( device >= 0 && device < hostApi->inheritedHostApiRep.info.deviceCount ) &&\n            hostApi->inheritedHostApiRep.deviceInfos[ device ]->maxOutputChannels > 0 )\n    {\n        hostApi->inheritedHostApiRep.info.defaultOutputDevice = device;\n    }\n}\n\n\n/** Convert external PA ID to a windows multimedia device ID\n*/\nstatic UINT LocalDeviceIndexToWinMmeDeviceId( PaWinMmeHostApiRepresentation *hostApi, PaDeviceIndex device )\n{\n    assert( device >= 0 && device < hostApi->inputDeviceCount + hostApi->outputDeviceCount );\n\n    return hostApi->winMmeDeviceIds[ device ];\n}\n\n\nstatic int SampleFormatAndWinWmmeSpecificFlagsToLinearWaveFormatTag( PaSampleFormat sampleFormat, unsigned long winMmeSpecificFlags )\n{\n    int waveFormatTag = 0;\n\n    if( winMmeSpecificFlags & paWinMmeWaveFormatDolbyAc3Spdif )\n        waveFormatTag = PAWIN_WAVE_FORMAT_DOLBY_AC3_SPDIF;\n    else if( winMmeSpecificFlags & paWinMmeWaveFormatWmaSpdif )\n        waveFormatTag = PAWIN_WAVE_FORMAT_WMA_SPDIF;\n    else\n        waveFormatTag = PaWin_SampleFormatToLinearWaveFormatTag( sampleFormat );\n\n    return waveFormatTag;\n}\n\n\nstatic PaError QueryInputWaveFormatEx( int deviceId, WAVEFORMATEX *waveFormatEx )\n{\n    MMRESULT mmresult;\n\n    switch( mmresult = waveInOpen( NULL, deviceId, waveFormatEx, 0, 0, WAVE_FORMAT_QUERY ) )\n    {\n        case MMSYSERR_NOERROR:\n            return paNoError;\n        case MMSYSERR_ALLOCATED:    /* Specified resource is already allocated. */\n            return paDeviceUnavailable;\n        case MMSYSERR_NODRIVER:     /* No device driver is present. */\n            return paDeviceUnavailable;\n        case MMSYSERR_NOMEM:        /* Unable to allocate or lock memory. */\n            return paInsufficientMemory;\n        case WAVERR_BADFORMAT:      /* Attempted to open with an unsupported waveform-audio format. */\n            return paSampleFormatNotSupported;\n\n        case MMSYSERR_BADDEVICEID:  /* Specified device identifier is out of range. */\n            /* falls through */\n        default:\n            PA_MME_SET_LAST_WAVEIN_ERROR( mmresult );\n            return paUnanticipatedHostError;\n    }\n}\n\n\nstatic PaError QueryOutputWaveFormatEx( int deviceId, WAVEFORMATEX *waveFormatEx )\n{\n    MMRESULT mmresult;\n\n    switch( mmresult = waveOutOpen( NULL, deviceId, waveFormatEx, 0, 0, WAVE_FORMAT_QUERY ) )\n    {\n        case MMSYSERR_NOERROR:\n            return paNoError;\n        case MMSYSERR_ALLOCATED:    /* Specified resource is already allocated. */\n            return paDeviceUnavailable;\n        case MMSYSERR_NODRIVER:     /* No device driver is present. */\n            return paDeviceUnavailable;\n        case MMSYSERR_NOMEM:        /* Unable to allocate or lock memory. */\n            return paInsufficientMemory;\n        case WAVERR_BADFORMAT:      /* Attempted to open with an unsupported waveform-audio format. */\n            return paSampleFormatNotSupported;\n\n        case MMSYSERR_BADDEVICEID:  /* Specified device identifier is out of range. */\n            /* falls through */\n        default:\n            PA_MME_SET_LAST_WAVEOUT_ERROR( mmresult );\n            return paUnanticipatedHostError;\n    }\n}\n\n\nstatic PaError QueryFormatSupported( PaDeviceInfo *deviceInfo,\n        PaError (*waveFormatExQueryFunction)(int, WAVEFORMATEX*),\n        int winMmeDeviceId, int channels, double sampleRate, unsigned long winMmeSpecificFlags )\n{\n    PaWinMmeDeviceInfo *winMmeDeviceInfo = (PaWinMmeDeviceInfo*)deviceInfo;\n    PaWinWaveFormat waveFormat;\n    PaSampleFormat sampleFormat;\n    int waveFormatTag;\n\n    /* @todo at the moment we only query with 16 bit sample format and directout speaker config*/\n\n    sampleFormat = paInt16;\n    waveFormatTag = SampleFormatAndWinWmmeSpecificFlagsToLinearWaveFormatTag( sampleFormat, winMmeSpecificFlags );\n\n    if( waveFormatTag == PaWin_SampleFormatToLinearWaveFormatTag( paInt16 ) ){\n\n        /* attempt bypass querying the device for linear formats */\n\n        if( sampleRate == 11025.0\n            && ( (channels == 1 && (winMmeDeviceInfo->dwFormats & WAVE_FORMAT_1M16))\n                || (channels == 2 && (winMmeDeviceInfo->dwFormats & WAVE_FORMAT_1S16)) ) ){\n\n            return paNoError;\n        }\n\n        if( sampleRate == 22050.0\n            && ( (channels == 1 && (winMmeDeviceInfo->dwFormats & WAVE_FORMAT_2M16))\n                || (channels == 2 && (winMmeDeviceInfo->dwFormats & WAVE_FORMAT_2S16)) ) ){\n\n            return paNoError;\n        }\n\n        if( sampleRate == 44100.0\n            && ( (channels == 1 && (winMmeDeviceInfo->dwFormats & WAVE_FORMAT_4M16))\n                || (channels == 2 && (winMmeDeviceInfo->dwFormats & WAVE_FORMAT_4S16)) ) ){\n\n            return paNoError;\n        }\n    }\n\n\n    /* first, attempt to query the device using WAVEFORMATEXTENSIBLE,\n       if this fails we fall back to WAVEFORMATEX */\n\n    PaWin_InitializeWaveFormatExtensible( &waveFormat, channels, sampleFormat, waveFormatTag,\n            sampleRate, PAWIN_SPEAKER_DIRECTOUT );\n\n    if( waveFormatExQueryFunction( winMmeDeviceId, (WAVEFORMATEX*)&waveFormat ) == paNoError )\n        return paNoError;\n\n    PaWin_InitializeWaveFormatEx( &waveFormat, channels, sampleFormat, waveFormatTag, sampleRate );\n\n    return waveFormatExQueryFunction( winMmeDeviceId, (WAVEFORMATEX*)&waveFormat );\n}\n\n\n#define PA_DEFAULTSAMPLERATESEARCHORDER_COUNT_  (13) /* must match array length below */\nstatic double defaultSampleRateSearchOrder_[] =\n    { 44100.0, 48000.0, 32000.0, 24000.0, 22050.0, 88200.0, 96000.0, 192000.0,\n        16000.0, 12000.0, 11025.0, 9600.0, 8000.0 };\n\nstatic void DetectDefaultSampleRate( PaWinMmeDeviceInfo *winMmeDeviceInfo, int winMmeDeviceId,\n        PaError (*waveFormatExQueryFunction)(int, WAVEFORMATEX*), int maxChannels )\n{\n    PaDeviceInfo *deviceInfo = &winMmeDeviceInfo->inheritedDeviceInfo;\n    int i;\n\n    deviceInfo->defaultSampleRate = 0.;\n\n    for( i=0; i < PA_DEFAULTSAMPLERATESEARCHORDER_COUNT_; ++i )\n    {\n        double sampleRate = defaultSampleRateSearchOrder_[ i ];\n        PaError paerror = QueryFormatSupported( deviceInfo, waveFormatExQueryFunction, winMmeDeviceId, maxChannels, sampleRate, 0 );\n        if( paerror == paNoError )\n        {\n            deviceInfo->defaultSampleRate = sampleRate;\n            break;\n        }\n    }\n}\n\n\n#ifdef PAWIN_USE_WDMKS_DEVICE_INFO\nstatic int QueryWaveInKSFilterMaxChannels( UINT waveInDeviceId, int *maxChannels )\n{\n    void *devicePath;\n    DWORD devicePathSize;\n    int result = 0;\n\n    /* pass UINT ID via punned HWAVEIN, as per DRV_QUERYDEVICEINTERFACESIZE documentation */\n    HWAVEIN hDeviceId = (HWAVEIN)((UINT_PTR)waveInDeviceId);\n\n    if( waveInMessage(hDeviceId, DRV_QUERYDEVICEINTERFACESIZE,\n            (DWORD_PTR)&devicePathSize, 0 ) != MMSYSERR_NOERROR )\n        return 0;\n\n    devicePath = PaUtil_AllocateMemory( devicePathSize );\n    if( !devicePath )\n        return 0;\n\n    /* apparently DRV_QUERYDEVICEINTERFACE returns a unicode interface path, although this is undocumented */\n    if( waveInMessage(hDeviceId, DRV_QUERYDEVICEINTERFACE,\n            (DWORD_PTR)devicePath, devicePathSize ) == MMSYSERR_NOERROR )\n    {\n        int count = PaWin_WDMKS_QueryFilterMaximumChannelCount( devicePath, /* isInput= */ 1  );\n        if( count > 0 )\n        {\n            *maxChannels = count;\n            result = 1;\n        }\n    }\n\n    PaUtil_FreeMemory( devicePath );\n\n    return result;\n}\n#endif /* PAWIN_USE_WDMKS_DEVICE_INFO */\n\n\nstatic PaError InitializeInputDeviceInfo( PaWinMmeHostApiRepresentation *winMmeHostApi,\n        PaWinMmeDeviceInfo *winMmeDeviceInfo, UINT winMmeInputDeviceId, int *success )\n{\n    PaError result = paNoError;\n    char *deviceName; /* non-const ptr */\n    MMRESULT mmresult;\n    WAVEINCAPSW wic;\n    PaDeviceInfo *deviceInfo = &winMmeDeviceInfo->inheritedDeviceInfo;\n    size_t len;\n\n    *success = 0;\n\n    mmresult = waveInGetDevCapsW( winMmeInputDeviceId, &wic, sizeof( WAVEINCAPSW ) );\n    if( mmresult == MMSYSERR_NOMEM )\n    {\n        result = paInsufficientMemory;\n        goto error;\n    }\n    else if( mmresult != MMSYSERR_NOERROR )\n    {\n        /* instead of returning paUnanticipatedHostError we return\n            paNoError, but leave success set as 0. This allows\n            Pa_Initialize to just ignore this device, without failing\n            the entire initialisation process.\n        */\n        return paNoError;\n    }\n\n    /* NOTE: the WAVEOUTCAPS.szPname is a null-terminated array of 32 characters,\n        so we are limited to displaying only the first 31 characters of the device name. */\n    if( winMmeInputDeviceId == WAVE_MAPPER )\n    {\n        len = WCharStringLen( wic.szPname ) + 1 + sizeof(constInputMapperSuffix_);\n        /* Append I/O suffix to WAVE_MAPPER device. */\n        deviceName = (char*)PaUtil_GroupAllocateMemory(\n                    winMmeHostApi->allocations,\n                    (long)len );\n        if( !deviceName )\n        {\n            result = paInsufficientMemory;\n            goto error;\n        }\n        CopyWCharStringToUtf8CString( deviceName, len, wic.szPname );\n        strcat( deviceName, constInputMapperSuffix_ );\n    }\n    else\n    {\n        len = WCharStringLen( wic.szPname ) + 1;\n        deviceName = (char*)PaUtil_GroupAllocateMemory(\n                    winMmeHostApi->allocations,\n                    (long)len );\n        if( !deviceName )\n        {\n            result = paInsufficientMemory;\n            goto error;\n        }\n        CopyWCharStringToUtf8CString( deviceName, len, wic.szPname  );\n    }\n    deviceInfo->name = deviceName;\n\n    if( wic.wChannels == 0xFFFF || wic.wChannels < 1 || wic.wChannels > 255 ){\n        /* For Windows versions using WDM (possibly Windows 98 ME and later)\n         * the kernel mixer sits between the application and the driver. As a result,\n         * wave*GetDevCaps often kernel mixer channel counts, which are unlimited.\n         * When this happens we assume the device is stereo and set a flag\n         * so that other channel counts can be tried with OpenStream -- i.e. when\n         * device*ChannelCountIsKnown is false, OpenStream will try whatever\n         * channel count you supply.\n         * see also InitializeOutputDeviceInfo() below.\n     */\n\n        PA_DEBUG((\"Pa_GetDeviceInfo: Num input channels reported as %d! Changed to 2.\\n\", wic.wChannels ));\n        deviceInfo->maxInputChannels = 2;\n        winMmeDeviceInfo->deviceInputChannelCountIsKnown = 0;\n    }else{\n        deviceInfo->maxInputChannels = wic.wChannels;\n        winMmeDeviceInfo->deviceInputChannelCountIsKnown = 1;\n    }\n\n#ifdef PAWIN_USE_WDMKS_DEVICE_INFO\n    winMmeDeviceInfo->deviceInputChannelCountIsKnown =\n            QueryWaveInKSFilterMaxChannels( winMmeInputDeviceId, &deviceInfo->maxInputChannels );\n#endif /* PAWIN_USE_WDMKS_DEVICE_INFO */\n\n    winMmeDeviceInfo->dwFormats = wic.dwFormats;\n\n    DetectDefaultSampleRate( winMmeDeviceInfo, winMmeInputDeviceId,\n            QueryInputWaveFormatEx, deviceInfo->maxInputChannels );\n\n    *success = 1;\n\nerror:\n    return result;\n}\n\n\n#ifdef PAWIN_USE_WDMKS_DEVICE_INFO\nstatic int QueryWaveOutKSFilterMaxChannels( UINT waveOutDeviceId, int *maxChannels )\n{\n    void *devicePath;\n    DWORD devicePathSize;\n    int result = 0;\n\n    /* pass UINT ID via punned HWAVEOUT, as per DRV_QUERYDEVICEINTERFACESIZE documentation */\n    HWAVEOUT hDeviceId = (HWAVEOUT)((UINT_PTR)waveOutDeviceId);\n\n    if( waveOutMessage(hDeviceId, DRV_QUERYDEVICEINTERFACESIZE,\n            (DWORD_PTR)&devicePathSize, 0 ) != MMSYSERR_NOERROR )\n        return 0;\n\n    devicePath = PaUtil_AllocateMemory( devicePathSize );\n    if( !devicePath )\n        return 0;\n\n    /* apparently DRV_QUERYDEVICEINTERFACE returns a unicode interface path, although this is undocumented */\n    if( waveOutMessage(hDeviceId, DRV_QUERYDEVICEINTERFACE,\n            (DWORD_PTR)devicePath, devicePathSize ) == MMSYSERR_NOERROR )\n    {\n        int count = PaWin_WDMKS_QueryFilterMaximumChannelCount( devicePath, /* isInput= */ 0  );\n        if( count > 0 )\n        {\n            *maxChannels = count;\n            result = 1;\n        }\n    }\n\n    PaUtil_FreeMemory( devicePath );\n\n    return result;\n}\n#endif /* PAWIN_USE_WDMKS_DEVICE_INFO */\n\n\nstatic PaError InitializeOutputDeviceInfo( PaWinMmeHostApiRepresentation *winMmeHostApi,\n        PaWinMmeDeviceInfo *winMmeDeviceInfo, UINT winMmeOutputDeviceId, int *success )\n{\n    PaError result = paNoError;\n    char *deviceName; /* non-const ptr */\n    MMRESULT mmresult;\n    WAVEOUTCAPSW woc;\n    PaDeviceInfo *deviceInfo = &winMmeDeviceInfo->inheritedDeviceInfo;\n    size_t len;\n#ifdef PAWIN_USE_WDMKS_DEVICE_INFO\n    int wdmksDeviceOutputChannelCountIsKnown;\n#endif\n\n    *success = 0;\n\n    mmresult = waveOutGetDevCapsW( winMmeOutputDeviceId, &woc, sizeof( WAVEOUTCAPSW ) );\n    if( mmresult == MMSYSERR_NOMEM )\n    {\n        result = paInsufficientMemory;\n        goto error;\n    }\n    else if( mmresult != MMSYSERR_NOERROR )\n    {\n        /* instead of returning paUnanticipatedHostError we return\n            paNoError, but leave success set as 0. This allows\n            Pa_Initialize to just ignore this device, without failing\n            the entire initialisation process.\n        */\n        return paNoError;\n    }\n\n    /* NOTE: the WAVEOUTCAPS.szPname is a null-terminated array of 32 characters,\n        so we are limited to displaying only the first 31 characters of the device name. */\n    if( winMmeOutputDeviceId == WAVE_MAPPER )\n    {\n        /* Append I/O suffix to WAVE_MAPPER device. */\n        len = WCharStringLen( woc.szPname ) + 1 + sizeof(constOutputMapperSuffix_);\n        deviceName = (char*)PaUtil_GroupAllocateMemory(\n                    winMmeHostApi->allocations,\n                    (long)len );\n        if( !deviceName )\n        {\n            result = paInsufficientMemory;\n            goto error;\n        }\n        CopyWCharStringToUtf8CString( deviceName, len, woc.szPname );\n        strcat( deviceName, constOutputMapperSuffix_ );\n    }\n    else\n    {\n        len = WCharStringLen( woc.szPname ) + 1;\n        deviceName = (char*)PaUtil_GroupAllocateMemory(\n                    winMmeHostApi->allocations,\n                    (long)len );\n        if( !deviceName )\n        {\n            result = paInsufficientMemory;\n            goto error;\n        }\n        CopyWCharStringToUtf8CString( deviceName, len, woc.szPname );\n    }\n    deviceInfo->name = deviceName;\n\n    if( woc.wChannels == 0xFFFF || woc.wChannels < 1 || woc.wChannels > 255 ){\n        /* For Windows versions using WDM (possibly Windows 98 ME and later)\n         * the kernel mixer sits between the application and the driver. As a result,\n         * wave*GetDevCaps often kernel mixer channel counts, which are unlimited.\n         * When this happens we assume the device is stereo and set a flag\n         * so that other channel counts can be tried with OpenStream -- i.e. when\n         * device*ChannelCountIsKnown is false, OpenStream will try whatever\n         * channel count you supply.\n         * see also InitializeInputDeviceInfo() above.\n         */\n\n        PA_DEBUG((\"Pa_GetDeviceInfo: Num output channels reported as %d! Changed to 2.\\n\", woc.wChannels ));\n        deviceInfo->maxOutputChannels = 2;\n        winMmeDeviceInfo->deviceOutputChannelCountIsKnown = 0;\n    }else{\n        deviceInfo->maxOutputChannels = woc.wChannels;\n        winMmeDeviceInfo->deviceOutputChannelCountIsKnown = 1;\n    }\n\n#ifdef PAWIN_USE_WDMKS_DEVICE_INFO\n    wdmksDeviceOutputChannelCountIsKnown = QueryWaveOutKSFilterMaxChannels(\n            winMmeOutputDeviceId, &deviceInfo->maxOutputChannels );\n    if( wdmksDeviceOutputChannelCountIsKnown && !winMmeDeviceInfo->deviceOutputChannelCountIsKnown )\n        winMmeDeviceInfo->deviceOutputChannelCountIsKnown = 1;\n#endif /* PAWIN_USE_WDMKS_DEVICE_INFO */\n\n    winMmeDeviceInfo->dwFormats = woc.dwFormats;\n\n    DetectDefaultSampleRate( winMmeDeviceInfo, winMmeOutputDeviceId,\n            QueryOutputWaveFormatEx, deviceInfo->maxOutputChannels );\n\n    *success = 1;\n\nerror:\n    return result;\n}\n\n\nstatic void GetDefaultLatencies( PaTime *defaultLowLatency, PaTime *defaultHighLatency )\n{\n/*\nNOTE: GetVersionEx() is deprecated as of Windows 8.1 and can not be used to reliably detect\nversions of Windows higher than Windows 8 (due to manifest requirements for reporting higher versions).\nMicrosoft recommends switching to VerifyVersionInfo (available on Win 2k and later), however GetVersionEx\nis faster, for now we just disable the deprecation warning.\nSee: https://msdn.microsoft.com/en-us/library/windows/desktop/ms724451(v=vs.85).aspx\nSee: http://www.codeproject.com/Articles/678606/Part-Overcoming-Windows-s-deprecation-of-GetVe\n*/\n#pragma warning (disable : 4996) /* use of GetVersionEx */\n\n    OSVERSIONINFO osvi;\n    osvi.dwOSVersionInfoSize = sizeof( osvi );\n    GetVersionEx( &osvi );\n\n    /* Check for NT */\n    if( (osvi.dwMajorVersion == 4) && (osvi.dwPlatformId == 2) )\n    {\n        *defaultLowLatency = PA_MME_WIN_NT_DEFAULT_LATENCY_;\n    }\n    else if(osvi.dwMajorVersion >= 5)\n    {\n        *defaultLowLatency = PA_MME_WIN_WDM_DEFAULT_LATENCY_;\n    }\n    else\n    {\n        *defaultLowLatency = PA_MME_WIN_9X_DEFAULT_LATENCY_;\n    }\n\n    *defaultHighLatency = *defaultLowLatency * 2;\n\n#pragma warning (default : 4996)\n}\n\n\nPaError PaWinMme_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex hostApiIndex )\n{\n    PaError result = paNoError;\n    int i;\n    PaWinMmeHostApiRepresentation *winMmeHostApi;\n    int inputDeviceCount, outputDeviceCount, maximumPossibleDeviceCount;\n    PaWinMmeDeviceInfo *deviceInfoArray;\n    int deviceInfoInitializationSucceeded;\n    PaTime defaultLowLatency, defaultHighLatency;\n    DWORD waveInPreferredDevice, waveOutPreferredDevice;\n    DWORD preferredDeviceStatusFlags;\n\n    winMmeHostApi = (PaWinMmeHostApiRepresentation*)PaUtil_AllocateMemory( sizeof(PaWinMmeHostApiRepresentation) );\n    if( !winMmeHostApi )\n    {\n        result = paInsufficientMemory;\n        goto error;\n    }\n\n    winMmeHostApi->allocations = PaUtil_CreateAllocationGroup();\n    if( !winMmeHostApi->allocations )\n    {\n        result = paInsufficientMemory;\n        goto error;\n    }\n\n    *hostApi = &winMmeHostApi->inheritedHostApiRep;\n    (*hostApi)->info.structVersion = 1;\n    (*hostApi)->info.type = paMME;\n    (*hostApi)->info.name = \"MME\";\n\n\n    /* initialise device counts and default devices under the assumption that\n        there are no devices. These values are incremented below if and when\n        devices are successfully initialized.\n    */\n    (*hostApi)->info.deviceCount = 0;\n    (*hostApi)->info.defaultInputDevice = paNoDevice;\n    (*hostApi)->info.defaultOutputDevice = paNoDevice;\n    winMmeHostApi->inputDeviceCount = 0;\n    winMmeHostApi->outputDeviceCount = 0;\n\n#if !defined(DRVM_MAPPER_PREFERRED_GET)\n/* DRVM_MAPPER_PREFERRED_GET is defined in mmddk.h but we avoid a dependency on the DDK by defining it here */\n#define DRVM_MAPPER_PREFERRED_GET    (0x2000+21)\n#endif\n\n    /* the following calls assume that if wave*Message fails the preferred device parameter won't be modified */\n    preferredDeviceStatusFlags = 0;\n    waveInPreferredDevice = -1;\n    waveInMessage( (HWAVEIN)((UINT_PTR)WAVE_MAPPER), DRVM_MAPPER_PREFERRED_GET, (DWORD_PTR)&waveInPreferredDevice, (DWORD_PTR)&preferredDeviceStatusFlags );\n\n    preferredDeviceStatusFlags = 0;\n    waveOutPreferredDevice = -1;\n    waveOutMessage( (HWAVEOUT)((UINT_PTR)WAVE_MAPPER), DRVM_MAPPER_PREFERRED_GET, (DWORD_PTR)&waveOutPreferredDevice, (DWORD_PTR)&preferredDeviceStatusFlags );\n\n    maximumPossibleDeviceCount = 0;\n\n    inputDeviceCount = waveInGetNumDevs();\n    if( inputDeviceCount > 0 )\n        maximumPossibleDeviceCount += inputDeviceCount + 1;     /* assume there is a WAVE_MAPPER */\n\n    outputDeviceCount = waveOutGetNumDevs();\n    if( outputDeviceCount > 0 )\n        maximumPossibleDeviceCount += outputDeviceCount + 1;    /* assume there is a WAVE_MAPPER */\n\n\n    if( maximumPossibleDeviceCount > 0 ){\n\n        (*hostApi)->deviceInfos = (PaDeviceInfo**)PaUtil_GroupAllocateMemory(\n                winMmeHostApi->allocations, sizeof(PaDeviceInfo*) * maximumPossibleDeviceCount );\n        if( !(*hostApi)->deviceInfos )\n        {\n            result = paInsufficientMemory;\n            goto error;\n        }\n\n        /* allocate all device info structs in a contiguous block */\n        deviceInfoArray = (PaWinMmeDeviceInfo*)PaUtil_GroupAllocateMemory(\n                winMmeHostApi->allocations, sizeof(PaWinMmeDeviceInfo) * maximumPossibleDeviceCount );\n        if( !deviceInfoArray )\n        {\n            result = paInsufficientMemory;\n            goto error;\n        }\n\n        winMmeHostApi->winMmeDeviceIds = (UINT*)PaUtil_GroupAllocateMemory(\n                winMmeHostApi->allocations, sizeof(int) * maximumPossibleDeviceCount );\n        if( !winMmeHostApi->winMmeDeviceIds )\n        {\n            result = paInsufficientMemory;\n            goto error;\n        }\n\n        GetDefaultLatencies( &defaultLowLatency, &defaultHighLatency );\n\n        if( inputDeviceCount > 0 ){\n            /* -1 is the WAVE_MAPPER */\n            for( i = -1; i < inputDeviceCount; ++i ){\n                UINT winMmeDeviceId = (UINT)((i==-1) ? WAVE_MAPPER : i);\n                PaWinMmeDeviceInfo *wmmeDeviceInfo = &deviceInfoArray[ (*hostApi)->info.deviceCount ];\n                PaDeviceInfo *deviceInfo = &wmmeDeviceInfo->inheritedDeviceInfo;\n                deviceInfo->structVersion = 2;\n                deviceInfo->hostApi = hostApiIndex;\n\n                deviceInfo->maxInputChannels = 0;\n                wmmeDeviceInfo->deviceInputChannelCountIsKnown = 1;\n                deviceInfo->maxOutputChannels = 0;\n                wmmeDeviceInfo->deviceOutputChannelCountIsKnown = 1;\n\n                deviceInfo->defaultLowInputLatency = defaultLowLatency;\n                deviceInfo->defaultLowOutputLatency = defaultLowLatency;\n                deviceInfo->defaultHighInputLatency = defaultHighLatency;\n                deviceInfo->defaultHighOutputLatency = defaultHighLatency;\n\n                result = InitializeInputDeviceInfo( winMmeHostApi, wmmeDeviceInfo,\n                        winMmeDeviceId, &deviceInfoInitializationSucceeded );\n                if( result != paNoError )\n                    goto error;\n\n                if( deviceInfoInitializationSucceeded ){\n                    if( (*hostApi)->info.defaultInputDevice == paNoDevice ){\n                        /* if there is currently no default device, use the first one available */\n                        (*hostApi)->info.defaultInputDevice = (*hostApi)->info.deviceCount;\n\n                    }else if( winMmeDeviceId == waveInPreferredDevice ){\n                        /* set the default device to the system preferred device */\n                        (*hostApi)->info.defaultInputDevice = (*hostApi)->info.deviceCount;\n                    }\n\n                    winMmeHostApi->winMmeDeviceIds[ (*hostApi)->info.deviceCount ] = winMmeDeviceId;\n                    (*hostApi)->deviceInfos[ (*hostApi)->info.deviceCount ] = deviceInfo;\n\n                    winMmeHostApi->inputDeviceCount++;\n                    (*hostApi)->info.deviceCount++;\n                }\n            }\n        }\n\n        if( outputDeviceCount > 0 ){\n            /* -1 is the WAVE_MAPPER */\n            for( i = -1; i < outputDeviceCount; ++i ){\n                UINT winMmeDeviceId = (UINT)((i==-1) ? WAVE_MAPPER : i);\n                PaWinMmeDeviceInfo *wmmeDeviceInfo = &deviceInfoArray[ (*hostApi)->info.deviceCount ];\n                PaDeviceInfo *deviceInfo = &wmmeDeviceInfo->inheritedDeviceInfo;\n                deviceInfo->structVersion = 2;\n                deviceInfo->hostApi = hostApiIndex;\n\n                deviceInfo->maxInputChannels = 0;\n                wmmeDeviceInfo->deviceInputChannelCountIsKnown = 1;\n                deviceInfo->maxOutputChannels = 0;\n                wmmeDeviceInfo->deviceOutputChannelCountIsKnown = 1;\n\n                deviceInfo->defaultLowInputLatency = defaultLowLatency;\n                deviceInfo->defaultLowOutputLatency = defaultLowLatency;\n                deviceInfo->defaultHighInputLatency = defaultHighLatency;\n                deviceInfo->defaultHighOutputLatency = defaultHighLatency;\n\n                result = InitializeOutputDeviceInfo( winMmeHostApi, wmmeDeviceInfo,\n                        winMmeDeviceId, &deviceInfoInitializationSucceeded );\n                if( result != paNoError )\n                    goto error;\n\n                if( deviceInfoInitializationSucceeded ){\n                    if( (*hostApi)->info.defaultOutputDevice == paNoDevice ){\n                        /* if there is currently no default device, use the first one available */\n                        (*hostApi)->info.defaultOutputDevice = (*hostApi)->info.deviceCount;\n\n                    }else if( winMmeDeviceId == waveOutPreferredDevice ){\n                        /* set the default device to the system preferred device */\n                        (*hostApi)->info.defaultOutputDevice = (*hostApi)->info.deviceCount;\n                    }\n\n                    winMmeHostApi->winMmeDeviceIds[ (*hostApi)->info.deviceCount ] = winMmeDeviceId;\n                    (*hostApi)->deviceInfos[ (*hostApi)->info.deviceCount ] = deviceInfo;\n\n                    winMmeHostApi->outputDeviceCount++;\n                    (*hostApi)->info.deviceCount++;\n                }\n            }\n        }\n    }\n\n    InitializeDefaultDeviceIdsFromEnv( winMmeHostApi );\n\n    (*hostApi)->Terminate = Terminate;\n    (*hostApi)->OpenStream = OpenStream;\n    (*hostApi)->IsFormatSupported = IsFormatSupported;\n\n    PaUtil_InitializeStreamInterface( &winMmeHostApi->callbackStreamInterface, CloseStream, StartStream,\n                                      StopStream, AbortStream, IsStreamStopped, IsStreamActive,\n                                      GetStreamTime, GetStreamCpuLoad,\n                                      PaUtil_DummyRead, PaUtil_DummyWrite,\n                                      PaUtil_DummyGetReadAvailable, PaUtil_DummyGetWriteAvailable );\n\n    PaUtil_InitializeStreamInterface( &winMmeHostApi->blockingStreamInterface, CloseStream, StartStream,\n                                      StopStream, AbortStream, IsStreamStopped, IsStreamActive,\n                                      GetStreamTime, PaUtil_DummyGetCpuLoad,\n                                      ReadStream, WriteStream, GetStreamReadAvailable, GetStreamWriteAvailable );\n\n    return result;\n\nerror:\n    if( winMmeHostApi )\n    {\n        if( winMmeHostApi->allocations )\n        {\n            PaUtil_FreeAllAllocations( winMmeHostApi->allocations );\n            PaUtil_DestroyAllocationGroup( winMmeHostApi->allocations );\n        }\n\n        PaUtil_FreeMemory( winMmeHostApi );\n    }\n\n    return result;\n}\n\n\nstatic void Terminate( struct PaUtilHostApiRepresentation *hostApi )\n{\n    PaWinMmeHostApiRepresentation *winMmeHostApi = (PaWinMmeHostApiRepresentation*)hostApi;\n\n    if( winMmeHostApi->allocations )\n    {\n        PaUtil_FreeAllAllocations( winMmeHostApi->allocations );\n        PaUtil_DestroyAllocationGroup( winMmeHostApi->allocations );\n    }\n\n    PaUtil_FreeMemory( winMmeHostApi );\n}\n\n\nstatic PaError IsInputChannelCountSupported( PaWinMmeDeviceInfo* deviceInfo, int channelCount )\n{\n    PaError result = paNoError;\n\n    if( channelCount > 0\n            && deviceInfo->deviceInputChannelCountIsKnown\n            && channelCount > deviceInfo->inheritedDeviceInfo.maxInputChannels ){\n\n        result = paInvalidChannelCount;\n    }\n\n    return result;\n}\n\nstatic PaError IsOutputChannelCountSupported( PaWinMmeDeviceInfo* deviceInfo, int channelCount )\n{\n    PaError result = paNoError;\n\n    if( channelCount > 0\n            && deviceInfo->deviceOutputChannelCountIsKnown\n            && channelCount > deviceInfo->inheritedDeviceInfo.maxOutputChannels ){\n\n        result = paInvalidChannelCount;\n    }\n\n    return result;\n}\n\nstatic PaError IsFormatSupported( struct PaUtilHostApiRepresentation *hostApi,\n                                  const PaStreamParameters *inputParameters,\n                                  const PaStreamParameters *outputParameters,\n                                  double sampleRate )\n{\n    PaWinMmeHostApiRepresentation *winMmeHostApi = (PaWinMmeHostApiRepresentation*)hostApi;\n    PaDeviceInfo *inputDeviceInfo, *outputDeviceInfo;\n    int inputChannelCount, outputChannelCount;\n    int inputMultipleDeviceChannelCount, outputMultipleDeviceChannelCount;\n    PaSampleFormat inputSampleFormat, outputSampleFormat;\n    PaWinMmeStreamInfo *inputStreamInfo, *outputStreamInfo;\n    UINT winMmeInputDeviceId, winMmeOutputDeviceId;\n    unsigned int i;\n    PaError paerror;\n\n    /* The calls to QueryFormatSupported below are intended to detect invalid\n        sample rates. If we assume that the channel count and format are OK,\n        then the only thing that could fail is the sample rate. This isn't\n        strictly true, but I can't think of a better way to test that the\n        sample rate is valid.\n    */\n\n    if( inputParameters )\n    {\n        inputChannelCount = inputParameters->channelCount;\n        inputSampleFormat = inputParameters->sampleFormat;\n        inputStreamInfo = inputParameters->hostApiSpecificStreamInfo;\n\n        /* all standard sample formats are supported by the buffer adapter,\n             this implementation doesn't support any custom sample formats */\n        if( inputSampleFormat & paCustomFormat )\n            return paSampleFormatNotSupported;\n\n        if( inputParameters->device == paUseHostApiSpecificDeviceSpecification\n                && inputStreamInfo && (inputStreamInfo->flags & paWinMmeUseMultipleDevices) )\n        {\n            inputMultipleDeviceChannelCount = 0;\n            for( i=0; i< inputStreamInfo->deviceCount; ++i )\n            {\n                inputMultipleDeviceChannelCount += inputStreamInfo->devices[i].channelCount;\n\n                inputDeviceInfo = hostApi->deviceInfos[ inputStreamInfo->devices[i].device ];\n\n                /* check that input device can support inputChannelCount */\n                if( inputStreamInfo->devices[i].channelCount < 1 )\n                    return paInvalidChannelCount;\n\n                paerror = IsInputChannelCountSupported( (PaWinMmeDeviceInfo*)inputDeviceInfo,\n                        inputStreamInfo->devices[i].channelCount );\n                if( paerror != paNoError )\n                    return paerror;\n\n                /* test for valid sample rate, see comment above */\n                winMmeInputDeviceId = LocalDeviceIndexToWinMmeDeviceId( winMmeHostApi, inputStreamInfo->devices[i].device );\n                paerror = QueryFormatSupported( inputDeviceInfo, QueryInputWaveFormatEx,\n                        winMmeInputDeviceId, inputStreamInfo->devices[i].channelCount, sampleRate,\n                        ((inputStreamInfo) ? inputStreamInfo->flags : 0) );\n                if( paerror != paNoError )\n                    return paInvalidSampleRate;\n            }\n\n            if( inputMultipleDeviceChannelCount != inputChannelCount )\n                return paIncompatibleHostApiSpecificStreamInfo;\n        }\n        else\n        {\n            if( inputStreamInfo && (inputStreamInfo->flags & paWinMmeUseMultipleDevices) )\n                return paIncompatibleHostApiSpecificStreamInfo; /* paUseHostApiSpecificDeviceSpecification was not supplied as the input device */\n\n            inputDeviceInfo = hostApi->deviceInfos[ inputParameters->device ];\n\n            /* check that input device can support inputChannelCount */\n            paerror = IsInputChannelCountSupported( (PaWinMmeDeviceInfo*)inputDeviceInfo, inputChannelCount );\n            if( paerror != paNoError )\n                return paerror;\n\n            /* test for valid sample rate, see comment above */\n            winMmeInputDeviceId = LocalDeviceIndexToWinMmeDeviceId( winMmeHostApi, inputParameters->device );\n            paerror = QueryFormatSupported( inputDeviceInfo, QueryInputWaveFormatEx,\n                    winMmeInputDeviceId, inputChannelCount, sampleRate,\n                    ((inputStreamInfo) ? inputStreamInfo->flags : 0) );\n            if( paerror != paNoError )\n                return paInvalidSampleRate;\n        }\n    }\n\n    if( outputParameters )\n    {\n        outputChannelCount = outputParameters->channelCount;\n        outputSampleFormat = outputParameters->sampleFormat;\n        outputStreamInfo = outputParameters->hostApiSpecificStreamInfo;\n\n        /* all standard sample formats are supported by the buffer adapter,\n            this implementation doesn't support any custom sample formats */\n        if( outputSampleFormat & paCustomFormat )\n            return paSampleFormatNotSupported;\n\n        if( outputParameters->device == paUseHostApiSpecificDeviceSpecification\n                && outputStreamInfo && (outputStreamInfo->flags & paWinMmeUseMultipleDevices) )\n        {\n            outputMultipleDeviceChannelCount = 0;\n            for( i=0; i< outputStreamInfo->deviceCount; ++i )\n            {\n                outputMultipleDeviceChannelCount += outputStreamInfo->devices[i].channelCount;\n\n                outputDeviceInfo = hostApi->deviceInfos[ outputStreamInfo->devices[i].device ];\n\n                /* check that output device can support outputChannelCount */\n                if( outputStreamInfo->devices[i].channelCount < 1 )\n                    return paInvalidChannelCount;\n\n                paerror = IsOutputChannelCountSupported( (PaWinMmeDeviceInfo*)outputDeviceInfo,\n                        outputStreamInfo->devices[i].channelCount );\n                if( paerror != paNoError )\n                    return paerror;\n\n                /* test for valid sample rate, see comment above */\n                winMmeOutputDeviceId = LocalDeviceIndexToWinMmeDeviceId( winMmeHostApi, outputStreamInfo->devices[i].device );\n                paerror = QueryFormatSupported( outputDeviceInfo, QueryOutputWaveFormatEx,\n                        winMmeOutputDeviceId, outputStreamInfo->devices[i].channelCount, sampleRate,\n                        ((outputStreamInfo) ? outputStreamInfo->flags : 0) );\n                if( paerror != paNoError )\n                    return paInvalidSampleRate;\n            }\n\n            if( outputMultipleDeviceChannelCount != outputChannelCount )\n                return paIncompatibleHostApiSpecificStreamInfo;\n        }\n        else\n        {\n            if( outputStreamInfo && (outputStreamInfo->flags & paWinMmeUseMultipleDevices) )\n                return paIncompatibleHostApiSpecificStreamInfo; /* paUseHostApiSpecificDeviceSpecification was not supplied as the output device */\n\n            outputDeviceInfo = hostApi->deviceInfos[ outputParameters->device ];\n\n            /* check that output device can support outputChannelCount */\n            paerror = IsOutputChannelCountSupported( (PaWinMmeDeviceInfo*)outputDeviceInfo, outputChannelCount );\n            if( paerror != paNoError )\n                return paerror;\n\n            /* test for valid sample rate, see comment above */\n            winMmeOutputDeviceId = LocalDeviceIndexToWinMmeDeviceId( winMmeHostApi, outputParameters->device );\n            paerror = QueryFormatSupported( outputDeviceInfo, QueryOutputWaveFormatEx,\n                    winMmeOutputDeviceId, outputChannelCount, sampleRate,\n                    ((outputStreamInfo) ? outputStreamInfo->flags : 0) );\n            if( paerror != paNoError )\n                return paInvalidSampleRate;\n        }\n    }\n\n    /*\n        - if a full duplex stream is requested, check that the combination\n            of input and output parameters is supported\n\n        - check that the device supports sampleRate\n\n        for mme all we can do is test that the input and output devices\n        support the requested sample rate and number of channels. we\n        cannot test for full duplex compatibility.\n    */\n\n    return paFormatIsSupported;\n}\n\n\nstatic unsigned long ComputeHostBufferCountForFixedBufferSizeFrames(\n        unsigned long suggestedLatencyFrames,\n        unsigned long hostBufferSizeFrames,\n        unsigned long minimumBufferCount )\n{\n    /* Calculate the number of buffers of length hostFramesPerBuffer\n       that fit in suggestedLatencyFrames, rounding up to the next integer.\n\n       The value (hostBufferSizeFrames - 1) below is to ensure the buffer count is rounded up.\n    */\n    unsigned long resultBufferCount = ((suggestedLatencyFrames + (hostBufferSizeFrames - 1)) / hostBufferSizeFrames);\n\n    /* We always need one extra buffer for processing while the rest are queued/playing.\n       i.e. latency is framesPerBuffer * (bufferCount - 1)\n    */\n    resultBufferCount += 1;\n\n    if( resultBufferCount < minimumBufferCount ) /* clamp to minimum buffer count */\n        resultBufferCount = minimumBufferCount;\n\n    return resultBufferCount;\n}\n\n\nstatic unsigned long ComputeHostBufferSizeGivenHardUpperLimit(\n        unsigned long userFramesPerBuffer,\n        unsigned long absoluteMaximumBufferSizeFrames )\n{\n    static unsigned long primes_[] = { 2, 3, 5, 7, 11, 13, 17, 19, 23,\n            29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 0 }; /* zero terminated */\n\n    unsigned long result = userFramesPerBuffer;\n    int i;\n\n    assert( absoluteMaximumBufferSizeFrames > 67 ); /* assume maximum is large and we're only factoring by small primes */\n\n    /* search for the largest integer factor of userFramesPerBuffer less\n       than or equal to absoluteMaximumBufferSizeFrames */\n\n    /* repeatedly divide by smallest prime factors until a buffer size\n       smaller than absoluteMaximumBufferSizeFrames is found */\n    while( result > absoluteMaximumBufferSizeFrames ){\n\n        /* search for the smallest prime factor of result */\n        for( i=0; primes_[i] != 0; ++i )\n        {\n            unsigned long p = primes_[i];\n            unsigned long divided = result / p;\n            if( divided*p == result )\n            {\n                result = divided;\n                break; /* continue with outer while loop */\n            }\n        }\n        if( primes_[i] == 0 )\n        { /* loop failed to find a prime factor, return an approximate result */\n            unsigned long d = (userFramesPerBuffer + (absoluteMaximumBufferSizeFrames-1))\n                    / absoluteMaximumBufferSizeFrames;\n            return userFramesPerBuffer / d;\n        }\n    }\n\n    return result;\n}\n\n\nstatic PaError SelectHostBufferSizeFramesAndHostBufferCount(\n        unsigned long suggestedLatencyFrames,\n        unsigned long userFramesPerBuffer,\n        unsigned long minimumBufferCount,\n        unsigned long preferredMaximumBufferSizeFrames, /* try not to exceed this. for example, don't exceed when coalescing buffers */\n        unsigned long absoluteMaximumBufferSizeFrames,  /* never exceed this, a hard limit */\n        unsigned long *hostBufferSizeFrames,\n        unsigned long *hostBufferCount )\n{\n    unsigned long effectiveUserFramesPerBuffer;\n    unsigned long numberOfUserBuffersPerHostBuffer;\n\n\n    if( userFramesPerBuffer == paFramesPerBufferUnspecified ){\n\n        effectiveUserFramesPerBuffer = PA_MME_HOST_BUFFER_GRANULARITY_FRAMES_WHEN_UNSPECIFIED_;\n\n    }else{\n\n        if( userFramesPerBuffer > absoluteMaximumBufferSizeFrames ){\n\n            /* user has requested a user buffer that's larger than absoluteMaximumBufferSizeFrames.\n               try to choose a buffer size that is equal or smaller than absoluteMaximumBufferSizeFrames\n               but is also an integer factor of userFramesPerBuffer, so as to distribute computation evenly.\n               the buffer processor will handle the block adaption between host and user buffer sizes.\n               see http://www.portaudio.com/trac/ticket/189 for discussion.\n            */\n\n            effectiveUserFramesPerBuffer = ComputeHostBufferSizeGivenHardUpperLimit( userFramesPerBuffer, absoluteMaximumBufferSizeFrames );\n            assert( effectiveUserFramesPerBuffer <= absoluteMaximumBufferSizeFrames );\n\n            /* try to ensure that duration of host buffering is at least as\n                large as duration of user buffer. */\n            if( suggestedLatencyFrames < userFramesPerBuffer )\n                suggestedLatencyFrames = userFramesPerBuffer;\n\n        }else{\n\n            effectiveUserFramesPerBuffer = userFramesPerBuffer;\n        }\n    }\n\n    /* compute a host buffer count based on suggestedLatencyFrames and our granularity */\n\n    *hostBufferSizeFrames = effectiveUserFramesPerBuffer;\n\n    *hostBufferCount = ComputeHostBufferCountForFixedBufferSizeFrames(\n            suggestedLatencyFrames, *hostBufferSizeFrames, minimumBufferCount );\n\n    if( *hostBufferSizeFrames >= userFramesPerBuffer )\n    {\n        /*\n            If there are too many host buffers we would like to coalesce\n            them by packing an integer number of user buffers into each host buffer.\n            We try to coalesce such that hostBufferCount will lie between\n            PA_MME_TARGET_HOST_BUFFER_COUNT_ and (PA_MME_TARGET_HOST_BUFFER_COUNT_*2)-1.\n            We limit coalescing to avoid exceeding either absoluteMaximumBufferSizeFrames and\n            preferredMaximumBufferSizeFrames.\n\n            First, compute a coalescing factor: the number of user buffers per host buffer.\n            The goal is to achieve PA_MME_TARGET_HOST_BUFFER_COUNT_ total buffer count.\n            Since our latency is computed based on (*hostBufferCount - 1) we compute a\n            coalescing factor based on (*hostBufferCount - 1) and (PA_MME_TARGET_HOST_BUFFER_COUNT_-1).\n\n            The + (PA_MME_TARGET_HOST_BUFFER_COUNT_-2) term below is intended to round up.\n        */\n        numberOfUserBuffersPerHostBuffer = ((*hostBufferCount - 1) + (PA_MME_TARGET_HOST_BUFFER_COUNT_-2)) / (PA_MME_TARGET_HOST_BUFFER_COUNT_ - 1);\n\n        if( numberOfUserBuffersPerHostBuffer > 1 )\n        {\n            unsigned long maxCoalescedBufferSizeFrames = (absoluteMaximumBufferSizeFrames < preferredMaximumBufferSizeFrames) /* minimum of our limits */\n                            ? absoluteMaximumBufferSizeFrames\n                            : preferredMaximumBufferSizeFrames;\n\n            unsigned long maxUserBuffersPerHostBuffer = maxCoalescedBufferSizeFrames / effectiveUserFramesPerBuffer; /* don't coalesce more than this */\n\n            if( numberOfUserBuffersPerHostBuffer > maxUserBuffersPerHostBuffer )\n                numberOfUserBuffersPerHostBuffer = maxUserBuffersPerHostBuffer;\n\n            *hostBufferSizeFrames = effectiveUserFramesPerBuffer * numberOfUserBuffersPerHostBuffer;\n\n            /* recompute hostBufferCount to approximate suggestedLatencyFrames now that hostBufferSizeFrames is larger */\n            *hostBufferCount = ComputeHostBufferCountForFixedBufferSizeFrames(\n                    suggestedLatencyFrames, *hostBufferSizeFrames, minimumBufferCount );\n        }\n    }\n\n    return paNoError;\n}\n\n\nstatic PaError CalculateMaxHostSampleFrameSizeBytes(\n        int channelCount,\n        PaSampleFormat hostSampleFormat,\n        const PaWinMmeStreamInfo *streamInfo,\n        int *hostSampleFrameSizeBytes )\n{\n    unsigned int i;\n    /* PA WMME streams may aggregate multiple WMME devices. When the stream addresses\n       more than one device in a single direction, maxDeviceChannelCount is the maximum\n       number of channels used by a single device.\n    */\n    int maxDeviceChannelCount = channelCount;\n    int hostSampleSizeBytes = Pa_GetSampleSize( hostSampleFormat );\n    if( hostSampleSizeBytes < 0 )\n    {\n        return hostSampleSizeBytes; /* the value of hostSampleSize here is an error code, not a sample size */\n    }\n\n    if( streamInfo && ( streamInfo->flags & paWinMmeUseMultipleDevices ) )\n    {\n        maxDeviceChannelCount = streamInfo->devices[0].channelCount;\n        for( i=1; i< streamInfo->deviceCount; ++i )\n        {\n            if( streamInfo->devices[i].channelCount > maxDeviceChannelCount )\n                maxDeviceChannelCount = streamInfo->devices[i].channelCount;\n        }\n    }\n\n    *hostSampleFrameSizeBytes = hostSampleSizeBytes * maxDeviceChannelCount;\n\n    return paNoError;\n}\n\n\n/* CalculateBufferSettings() fills the framesPerHostInputBuffer, hostInputBufferCount,\n   framesPerHostOutputBuffer and hostOutputBufferCount parameters based on the values\n   of the other parameters.\n*/\n\nstatic PaError CalculateBufferSettings(\n        unsigned long *hostFramesPerInputBuffer, unsigned long *hostInputBufferCount,\n        unsigned long *hostFramesPerOutputBuffer, unsigned long *hostOutputBufferCount,\n        int inputChannelCount, PaSampleFormat hostInputSampleFormat,\n        PaTime suggestedInputLatency, const PaWinMmeStreamInfo *inputStreamInfo,\n        int outputChannelCount, PaSampleFormat hostOutputSampleFormat,\n        PaTime suggestedOutputLatency, const PaWinMmeStreamInfo *outputStreamInfo,\n        double sampleRate, unsigned long userFramesPerBuffer )\n{\n    PaError result = paNoError;\n\n    if( inputChannelCount > 0 ) /* stream has input */\n    {\n        int hostInputFrameSizeBytes;\n        result = CalculateMaxHostSampleFrameSizeBytes(\n                inputChannelCount, hostInputSampleFormat, inputStreamInfo, &hostInputFrameSizeBytes );\n        if( result != paNoError )\n            goto error;\n\n        if( inputStreamInfo\n                && ( inputStreamInfo->flags & paWinMmeUseLowLevelLatencyParameters ) )\n        {\n            /* input - using low level latency parameters if provided */\n\n            if( inputStreamInfo->bufferCount <= 0\n                    || inputStreamInfo->framesPerBuffer <= 0 )\n            {\n                result = paIncompatibleHostApiSpecificStreamInfo;\n                goto error;\n            }\n\n            *hostFramesPerInputBuffer = inputStreamInfo->framesPerBuffer;\n            *hostInputBufferCount = inputStreamInfo->bufferCount;\n        }\n        else\n        {\n            /* input - not using low level latency parameters, so compute\n               hostFramesPerInputBuffer and hostInputBufferCount\n               based on userFramesPerBuffer and suggestedInputLatency. */\n\n            unsigned long minimumBufferCount = (outputChannelCount > 0)\n                    ? PA_MME_MIN_HOST_INPUT_BUFFER_COUNT_FULL_DUPLEX_\n                    : PA_MME_MIN_HOST_INPUT_BUFFER_COUNT_HALF_DUPLEX_;\n\n            result = SelectHostBufferSizeFramesAndHostBufferCount(\n                    (unsigned long)(suggestedInputLatency * sampleRate), /* (truncate) */\n                    userFramesPerBuffer,\n                    minimumBufferCount,\n                    (unsigned long)(PA_MME_MAX_HOST_BUFFER_SECS_ * sampleRate), /* in frames. preferred maximum */\n                    (PA_MME_MAX_HOST_BUFFER_BYTES_ / hostInputFrameSizeBytes),  /* in frames. a hard limit. note truncation due to\n                                                                                division is intentional here to limit max bytes */\n                    hostFramesPerInputBuffer,\n                    hostInputBufferCount );\n            if( result != paNoError )\n                goto error;\n        }\n    }\n    else\n    {\n        *hostFramesPerInputBuffer = 0;\n        *hostInputBufferCount = 0;\n    }\n\n    if( outputChannelCount > 0 ) /* stream has output */\n    {\n        if( outputStreamInfo\n                && ( outputStreamInfo->flags & paWinMmeUseLowLevelLatencyParameters ) )\n        {\n            /* output - using low level latency parameters */\n\n            if( outputStreamInfo->bufferCount <= 0\n                    || outputStreamInfo->framesPerBuffer <= 0 )\n            {\n                result = paIncompatibleHostApiSpecificStreamInfo;\n                goto error;\n            }\n\n            *hostFramesPerOutputBuffer = outputStreamInfo->framesPerBuffer;\n            *hostOutputBufferCount = outputStreamInfo->bufferCount;\n\n            if( inputChannelCount > 0 ) /* full duplex */\n            {\n                /* harmonize hostFramesPerInputBuffer and hostFramesPerOutputBuffer */\n\n                if( *hostFramesPerInputBuffer != *hostFramesPerOutputBuffer )\n                {\n                    if( inputStreamInfo\n                            && ( inputStreamInfo->flags & paWinMmeUseLowLevelLatencyParameters ) )\n                    {\n                        /* a custom StreamInfo was used for specifying both input\n                            and output buffer sizes. We require that the larger buffer size\n                            must be a multiple of the smaller buffer size */\n\n                        if( *hostFramesPerInputBuffer < *hostFramesPerOutputBuffer )\n                        {\n                            if( *hostFramesPerOutputBuffer % *hostFramesPerInputBuffer != 0 )\n                            {\n                                result = paIncompatibleHostApiSpecificStreamInfo;\n                                goto error;\n                            }\n                        }\n                        else\n                        {\n                            assert( *hostFramesPerInputBuffer > *hostFramesPerOutputBuffer );\n                            if( *hostFramesPerInputBuffer % *hostFramesPerOutputBuffer != 0 )\n                            {\n                                result = paIncompatibleHostApiSpecificStreamInfo;\n                                goto error;\n                            }\n                        }\n                    }\n                    else\n                    {\n                        /* a custom StreamInfo was not used for specifying the input buffer size,\n                            so use the output buffer size, and approximately the suggested input latency. */\n\n                        *hostFramesPerInputBuffer = *hostFramesPerOutputBuffer;\n\n                        *hostInputBufferCount = ComputeHostBufferCountForFixedBufferSizeFrames(\n                                (unsigned long)(suggestedInputLatency * sampleRate),\n                                *hostFramesPerInputBuffer,\n                                PA_MME_MIN_HOST_INPUT_BUFFER_COUNT_FULL_DUPLEX_ );\n                    }\n                }\n            }\n        }\n        else\n        {\n            /* output - no low level latency parameters, so compute hostFramesPerOutputBuffer and hostOutputBufferCount\n                based on userFramesPerBuffer and suggestedOutputLatency. */\n\n            int hostOutputFrameSizeBytes;\n            result = CalculateMaxHostSampleFrameSizeBytes(\n                    outputChannelCount, hostOutputSampleFormat, outputStreamInfo, &hostOutputFrameSizeBytes );\n            if( result != paNoError )\n                goto error;\n\n            /* compute the output buffer size and count */\n\n            result = SelectHostBufferSizeFramesAndHostBufferCount(\n                    (unsigned long)(suggestedOutputLatency * sampleRate), /* (truncate) */\n                    userFramesPerBuffer,\n                    PA_MME_MIN_HOST_OUTPUT_BUFFER_COUNT_,\n                    (unsigned long)(PA_MME_MAX_HOST_BUFFER_SECS_ * sampleRate), /* in frames. preferred maximum */\n                    (PA_MME_MAX_HOST_BUFFER_BYTES_ / hostOutputFrameSizeBytes), /* in frames. a hard limit. note truncation due to\n                                                                                 division is intentional here to limit max bytes */\n                    hostFramesPerOutputBuffer,\n                    hostOutputBufferCount );\n            if( result != paNoError )\n                goto error;\n\n            if( inputChannelCount > 0 ) /* full duplex */\n            {\n                /* harmonize hostFramesPerInputBuffer and hostFramesPerOutputBuffer */\n\n                /* ensure that both input and output buffer sizes are the same.\n                    if they don't match at this stage, choose the smallest one\n                    and use that for input and output and recompute the corresponding\n                    buffer count accordingly.\n                */\n\n                if( *hostFramesPerOutputBuffer != *hostFramesPerInputBuffer )\n                {\n                    if( hostFramesPerInputBuffer < hostFramesPerOutputBuffer )\n                    {\n                        *hostFramesPerOutputBuffer = *hostFramesPerInputBuffer;\n\n                        *hostOutputBufferCount = ComputeHostBufferCountForFixedBufferSizeFrames(\n                                (unsigned long)(suggestedOutputLatency * sampleRate),\n                                *hostOutputBufferCount,\n                                PA_MME_MIN_HOST_OUTPUT_BUFFER_COUNT_ );\n                    }\n                    else\n                    {\n                        *hostFramesPerInputBuffer = *hostFramesPerOutputBuffer;\n\n                        *hostInputBufferCount = ComputeHostBufferCountForFixedBufferSizeFrames(\n                                (unsigned long)(suggestedInputLatency * sampleRate),\n                                *hostFramesPerInputBuffer,\n                                PA_MME_MIN_HOST_INPUT_BUFFER_COUNT_FULL_DUPLEX_ );\n                    }\n                }\n            }\n        }\n    }\n    else\n    {\n        *hostFramesPerOutputBuffer = 0;\n        *hostOutputBufferCount = 0;\n    }\n\nerror:\n    return result;\n}\n\n\ntypedef struct\n{\n    HANDLE bufferEvent;\n    void *waveHandles;\n    unsigned int deviceCount;\n    /* unsigned int channelCount; */\n    WAVEHDR **waveHeaders;                  /* waveHeaders[device][buffer] */\n    unsigned int bufferCount;\n    unsigned int currentBufferIndex;\n    unsigned int framesPerBuffer;\n    unsigned int framesUsedInCurrentBuffer;\n}PaWinMmeSingleDirectionHandlesAndBuffers;\n\n/* prototypes for functions operating on PaWinMmeSingleDirectionHandlesAndBuffers */\n\nstatic void InitializeSingleDirectionHandlesAndBuffers( PaWinMmeSingleDirectionHandlesAndBuffers *handlesAndBuffers );\nstatic PaError InitializeWaveHandles( PaWinMmeHostApiRepresentation *winMmeHostApi,\n        PaWinMmeSingleDirectionHandlesAndBuffers *handlesAndBuffers,\n        unsigned long winMmeSpecificFlags,\n        unsigned long bytesPerHostSample,\n        double sampleRate, PaWinMmeDeviceAndChannelCount *devices,\n        unsigned int deviceCount, PaWinWaveFormatChannelMask channelMask, int isInput );\nstatic PaError TerminateWaveHandles( PaWinMmeSingleDirectionHandlesAndBuffers *handlesAndBuffers, int isInput, int currentlyProcessingAnError );\nstatic PaError InitializeWaveHeaders( PaWinMmeSingleDirectionHandlesAndBuffers *handlesAndBuffers,\n        unsigned long hostBufferCount,\n        PaSampleFormat hostSampleFormat,\n        unsigned long framesPerHostBuffer,\n        PaWinMmeDeviceAndChannelCount *devices,\n        int isInput );\nstatic void TerminateWaveHeaders( PaWinMmeSingleDirectionHandlesAndBuffers *handlesAndBuffers, int isInput );\n\n\nstatic void InitializeSingleDirectionHandlesAndBuffers( PaWinMmeSingleDirectionHandlesAndBuffers *handlesAndBuffers )\n{\n    handlesAndBuffers->bufferEvent = 0;\n    handlesAndBuffers->waveHandles = 0;\n    handlesAndBuffers->deviceCount = 0;\n    handlesAndBuffers->waveHeaders = 0;\n    handlesAndBuffers->bufferCount = 0;\n}\n\nstatic PaError InitializeWaveHandles( PaWinMmeHostApiRepresentation *winMmeHostApi,\n        PaWinMmeSingleDirectionHandlesAndBuffers *handlesAndBuffers,\n        unsigned long winMmeSpecificFlags,\n        unsigned long bytesPerHostSample,\n        double sampleRate, PaWinMmeDeviceAndChannelCount *devices,\n        unsigned int deviceCount, PaWinWaveFormatChannelMask channelMask, int isInput )\n{\n    PaError result;\n    MMRESULT mmresult;\n    signed int i, j;\n    PaSampleFormat sampleFormat;\n    int waveFormatTag;\n\n    /* for error cleanup we expect that InitializeSingleDirectionHandlesAndBuffers()\n        has already been called to zero some fields */\n\n    result = CreateEventWithPaError( &handlesAndBuffers->bufferEvent, NULL, FALSE, FALSE, NULL );\n    if( result != paNoError ) goto error;\n\n    if( isInput )\n        handlesAndBuffers->waveHandles = (void*)PaUtil_AllocateMemory( sizeof(HWAVEIN) * deviceCount );\n    else\n        handlesAndBuffers->waveHandles = (void*)PaUtil_AllocateMemory( sizeof(HWAVEOUT) * deviceCount );\n    if( !handlesAndBuffers->waveHandles )\n    {\n        result = paInsufficientMemory;\n        goto error;\n    }\n\n    handlesAndBuffers->deviceCount = deviceCount;\n\n    for( i = 0; i < (signed int)deviceCount; ++i )\n    {\n        if( isInput )\n            ((HWAVEIN*)handlesAndBuffers->waveHandles)[i] = 0;\n        else\n            ((HWAVEOUT*)handlesAndBuffers->waveHandles)[i] = 0;\n    }\n\n    /* @todo at the moment we only use 16 bit sample format */\n    sampleFormat = paInt16;\n    waveFormatTag = SampleFormatAndWinWmmeSpecificFlagsToLinearWaveFormatTag( sampleFormat, winMmeSpecificFlags );\n\n    for( i = 0; i < (signed int)deviceCount; ++i )\n    {\n        PaWinWaveFormat waveFormat;\n        UINT winMmeDeviceId = LocalDeviceIndexToWinMmeDeviceId( winMmeHostApi, devices[i].device );\n\n        /* @todo: consider providing a flag or #define to not try waveformat extensible\n           this could just initialize j to 1 the first time round. */\n\n        for( j = 0; j < 2; ++j )\n        {\n            switch(j){\n                case 0:\n                    /* first, attempt to open the device using WAVEFORMATEXTENSIBLE,\n                        if this fails we fall back to WAVEFORMATEX */\n\n                    PaWin_InitializeWaveFormatExtensible( &waveFormat, devices[i].channelCount,\n                            sampleFormat, waveFormatTag, sampleRate, channelMask );\n                    break;\n\n                case 1:\n                    /* retry with WAVEFORMATEX */\n\n                    PaWin_InitializeWaveFormatEx( &waveFormat, devices[i].channelCount,\n                            sampleFormat, waveFormatTag, sampleRate );\n                    break;\n            }\n\n            /* REVIEW: consider not firing an event for input when a full duplex\n                stream is being used. this would probably depend on the\n                neverDropInput flag. */\n\n            if( isInput )\n            {\n                mmresult = waveInOpen( &((HWAVEIN*)handlesAndBuffers->waveHandles)[i], winMmeDeviceId,\n                                    (WAVEFORMATEX*)&waveFormat,\n                               (DWORD_PTR)handlesAndBuffers->bufferEvent, (DWORD_PTR)0, CALLBACK_EVENT );\n            }\n            else\n            {\n                mmresult = waveOutOpen( &((HWAVEOUT*)handlesAndBuffers->waveHandles)[i], winMmeDeviceId,\n                                    (WAVEFORMATEX*)&waveFormat,\n                                (DWORD_PTR)handlesAndBuffers->bufferEvent, (DWORD_PTR)0, CALLBACK_EVENT );\n            }\n\n            if( mmresult == MMSYSERR_NOERROR )\n            {\n                break; /* success */\n            }\n            else if( j == 0 )\n            {\n                continue; /* try again with WAVEFORMATEX */\n            }\n            else\n            {\n                switch( mmresult )\n                {\n                    case MMSYSERR_ALLOCATED:    /* Specified resource is already allocated. */\n                        result = paDeviceUnavailable;\n                        break;\n                    case MMSYSERR_NODRIVER:     /* No device driver is present. */\n                        result = paDeviceUnavailable;\n                        break;\n                    case MMSYSERR_NOMEM:        /* Unable to allocate or lock memory. */\n                        result = paInsufficientMemory;\n                        break;\n\n                    case MMSYSERR_BADDEVICEID:  /* Specified device identifier is out of range. */\n                        /* falls through */\n\n                    case WAVERR_BADFORMAT:      /* Attempted to open with an unsupported waveform-audio format. */\n                                                    /* This can also occur if we try to open the device with an unsupported\n                                                     * number of channels. This is attempted when device*ChannelCountIsKnown is\n                                                     * set to 0.\n                                                     */\n                        /* falls through */\n                    default:\n                        result = paUnanticipatedHostError;\n                        if( isInput )\n                        {\n                            PA_MME_SET_LAST_WAVEIN_ERROR( mmresult );\n                        }\n                        else\n                        {\n                            PA_MME_SET_LAST_WAVEOUT_ERROR( mmresult );\n                        }\n                }\n                goto error;\n            }\n        }\n    }\n\n    return result;\n\nerror:\n    TerminateWaveHandles( handlesAndBuffers, isInput, 1 /* currentlyProcessingAnError */ );\n\n    return result;\n}\n\n\nstatic PaError TerminateWaveHandles( PaWinMmeSingleDirectionHandlesAndBuffers *handlesAndBuffers, int isInput, int currentlyProcessingAnError )\n{\n    PaError result = paNoError;\n    MMRESULT mmresult;\n    signed int i;\n\n    if( handlesAndBuffers->waveHandles )\n    {\n        for( i = handlesAndBuffers->deviceCount-1; i >= 0; --i )\n        {\n            if( isInput )\n            {\n                if( ((HWAVEIN*)handlesAndBuffers->waveHandles)[i] )\n                    mmresult = waveInClose( ((HWAVEIN*)handlesAndBuffers->waveHandles)[i] );\n                else\n                    mmresult = MMSYSERR_NOERROR;\n            }\n            else\n            {\n                if( ((HWAVEOUT*)handlesAndBuffers->waveHandles)[i] )\n                    mmresult = waveOutClose( ((HWAVEOUT*)handlesAndBuffers->waveHandles)[i] );\n                else\n                    mmresult = MMSYSERR_NOERROR;\n            }\n\n            if( mmresult != MMSYSERR_NOERROR &&\n                !currentlyProcessingAnError ) /* don't update the error state if we're already processing an error */\n            {\n                result = paUnanticipatedHostError;\n                if( isInput )\n                {\n                    PA_MME_SET_LAST_WAVEIN_ERROR( mmresult );\n                }\n                else\n                {\n                    PA_MME_SET_LAST_WAVEOUT_ERROR( mmresult );\n                }\n                /* note that we don't break here, we try to continue closing devices */\n            }\n        }\n\n        PaUtil_FreeMemory( handlesAndBuffers->waveHandles );\n        handlesAndBuffers->waveHandles = 0;\n    }\n\n    if( handlesAndBuffers->bufferEvent )\n    {\n        result = CloseHandleWithPaError( handlesAndBuffers->bufferEvent );\n        handlesAndBuffers->bufferEvent = 0;\n    }\n\n    return result;\n}\n\n\nstatic PaError InitializeWaveHeaders( PaWinMmeSingleDirectionHandlesAndBuffers *handlesAndBuffers,\n        unsigned long hostBufferCount,\n        PaSampleFormat hostSampleFormat,\n        unsigned long framesPerHostBuffer,\n        PaWinMmeDeviceAndChannelCount *devices,\n        int isInput )\n{\n    PaError result = paNoError;\n    MMRESULT mmresult;\n    WAVEHDR *deviceWaveHeaders;\n    signed int i, j;\n\n    /* for error cleanup we expect that InitializeSingleDirectionHandlesAndBuffers()\n        has already been called to zero some fields */\n\n\n    /* allocate an array of pointers to arrays of wave headers, one array of\n        wave headers per device */\n    handlesAndBuffers->waveHeaders = (WAVEHDR**)PaUtil_AllocateMemory( sizeof(WAVEHDR*) * handlesAndBuffers->deviceCount );\n    if( !handlesAndBuffers->waveHeaders )\n    {\n        result = paInsufficientMemory;\n        goto error;\n    }\n\n    for( i = 0; i < (signed int)handlesAndBuffers->deviceCount; ++i )\n        handlesAndBuffers->waveHeaders[i] = 0;\n\n    handlesAndBuffers->bufferCount = hostBufferCount;\n\n    for( i = 0; i < (signed int)handlesAndBuffers->deviceCount; ++i )\n    {\n        int bufferBytes = Pa_GetSampleSize( hostSampleFormat ) *\n                framesPerHostBuffer * devices[i].channelCount;\n        if( bufferBytes < 0 )\n        {\n            result = paInternalError;\n            goto error;\n        }\n\n        /* Allocate an array of wave headers for device i */\n        deviceWaveHeaders = (WAVEHDR *) PaUtil_AllocateMemory( sizeof(WAVEHDR)*hostBufferCount );\n        if( !deviceWaveHeaders )\n        {\n            result = paInsufficientMemory;\n            goto error;\n        }\n\n        for( j=0; j < (signed int)hostBufferCount; ++j )\n            deviceWaveHeaders[j].lpData = 0;\n\n        handlesAndBuffers->waveHeaders[i] = deviceWaveHeaders;\n\n        /* Allocate a buffer for each wave header */\n        for( j=0; j < (signed int)hostBufferCount; ++j )\n        {\n            deviceWaveHeaders[j].lpData = (char *)PaUtil_AllocateMemory( bufferBytes );\n            if( !deviceWaveHeaders[j].lpData )\n            {\n                result = paInsufficientMemory;\n                goto error;\n            }\n            deviceWaveHeaders[j].dwBufferLength = bufferBytes;\n            deviceWaveHeaders[j].dwUser = 0xFFFFFFFF; /* indicates that *PrepareHeader() has not yet been called, for error clean up code */\n\n            if( isInput )\n            {\n                mmresult = waveInPrepareHeader( ((HWAVEIN*)handlesAndBuffers->waveHandles)[i], &deviceWaveHeaders[j], sizeof(WAVEHDR) );\n                if( mmresult != MMSYSERR_NOERROR )\n                {\n                    result = paUnanticipatedHostError;\n                    PA_MME_SET_LAST_WAVEIN_ERROR( mmresult );\n                    goto error;\n                }\n            }\n            else /* output */\n            {\n                mmresult = waveOutPrepareHeader( ((HWAVEOUT*)handlesAndBuffers->waveHandles)[i], &deviceWaveHeaders[j], sizeof(WAVEHDR) );\n                if( mmresult != MMSYSERR_NOERROR )\n                {\n                    result = paUnanticipatedHostError;\n                    PA_MME_SET_LAST_WAVEIN_ERROR( mmresult );\n                    goto error;\n                }\n            }\n            deviceWaveHeaders[j].dwUser = devices[i].channelCount;\n        }\n    }\n\n    return result;\n\nerror:\n    TerminateWaveHeaders( handlesAndBuffers, isInput );\n\n    return result;\n}\n\n\nstatic void TerminateWaveHeaders( PaWinMmeSingleDirectionHandlesAndBuffers *handlesAndBuffers, int isInput )\n{\n    signed int i, j;\n    WAVEHDR *deviceWaveHeaders;\n\n    if( handlesAndBuffers->waveHeaders )\n    {\n        for( i = handlesAndBuffers->deviceCount-1; i >= 0 ; --i )\n        {\n            deviceWaveHeaders = handlesAndBuffers->waveHeaders[i];  /* wave headers for device i */\n            if( deviceWaveHeaders )\n            {\n                for( j = handlesAndBuffers->bufferCount-1; j >= 0; --j )\n                {\n                    if( deviceWaveHeaders[j].lpData )\n                    {\n                        if( deviceWaveHeaders[j].dwUser != 0xFFFFFFFF )\n                        {\n                            if( isInput )\n                                waveInUnprepareHeader( ((HWAVEIN*)handlesAndBuffers->waveHandles)[i], &deviceWaveHeaders[j], sizeof(WAVEHDR) );\n                            else\n                                waveOutUnprepareHeader( ((HWAVEOUT*)handlesAndBuffers->waveHandles)[i], &deviceWaveHeaders[j], sizeof(WAVEHDR) );\n                        }\n\n                        PaUtil_FreeMemory( deviceWaveHeaders[j].lpData );\n                    }\n                }\n\n                PaUtil_FreeMemory( deviceWaveHeaders );\n            }\n        }\n\n        PaUtil_FreeMemory( handlesAndBuffers->waveHeaders );\n        handlesAndBuffers->waveHeaders = 0;\n    }\n}\n\n\n\n/* PaWinMmeStream - a stream data structure specifically for this implementation */\n/* note that struct PaWinMmeStream is typedeffed to PaWinMmeStream above. */\nstruct PaWinMmeStream\n{\n    PaUtilStreamRepresentation streamRepresentation;\n    PaUtilCpuLoadMeasurer cpuLoadMeasurer;\n    PaUtilBufferProcessor bufferProcessor;\n\n    int primeStreamUsingCallback;\n\n    PaWinMmeSingleDirectionHandlesAndBuffers input;\n    PaWinMmeSingleDirectionHandlesAndBuffers output;\n\n    /* Processing thread management -------------- */\n    HANDLE abortEvent;\n    HANDLE processingThread;\n    PA_THREAD_ID processingThreadId;\n\n    char throttleProcessingThreadOnOverload;    /* 0 -> don't throttle, non-0 -> throttle */\n    int processingThreadPriority;\n    int highThreadPriority;\n    int throttledThreadPriority;\n    unsigned long throttledSleepMsecs;\n\n    int isStopped;\n    volatile int isActive;\n    volatile int stopProcessing;    /* stop thread once existing buffers have been returned */\n    volatile int abortProcessing;   /* stop thread immediately */\n\n    DWORD allBuffersDurationMs;     /* used to calculate timeouts */\n};\n\n/* updates deviceCount if PaWinMmeUseMultipleDevices is used */\n\nstatic PaError ValidateWinMmeSpecificStreamInfo(\n        const PaStreamParameters *streamParameters,\n        const PaWinMmeStreamInfo *streamInfo,\n        unsigned long *winMmeSpecificFlags,\n        char *throttleProcessingThreadOnOverload,\n        unsigned long *deviceCount )\n{\n    if( streamInfo )\n    {\n        if( streamInfo->size != sizeof( PaWinMmeStreamInfo )\n                || streamInfo->version != 1 )\n        {\n            return paIncompatibleHostApiSpecificStreamInfo;\n        }\n\n        *winMmeSpecificFlags = streamInfo->flags;\n\n        if( streamInfo->flags & paWinMmeDontThrottleOverloadedProcessingThread )\n            *throttleProcessingThreadOnOverload = 0;\n\n        if( streamInfo->flags & paWinMmeUseMultipleDevices )\n        {\n            if( streamParameters->device != paUseHostApiSpecificDeviceSpecification )\n                return paInvalidDevice;\n\n            *deviceCount = streamInfo->deviceCount;\n        }\n    }\n\n    return paNoError;\n}\n\nstatic PaError RetrieveDevicesFromStreamParameters(\n        struct PaUtilHostApiRepresentation *hostApi,\n        const PaStreamParameters *streamParameters,\n        const PaWinMmeStreamInfo *streamInfo,\n        PaWinMmeDeviceAndChannelCount *devices,\n        unsigned long deviceCount )\n{\n    PaError result = paNoError;\n    unsigned int i;\n    int totalChannelCount;\n    PaDeviceIndex hostApiDevice;\n\n    if( streamInfo && streamInfo->flags & paWinMmeUseMultipleDevices )\n    {\n        totalChannelCount = 0;\n        for( i=0; i < deviceCount; ++i )\n        {\n            /* validate that the device number is within range */\n            result = PaUtil_DeviceIndexToHostApiDeviceIndex( &hostApiDevice,\n                            streamInfo->devices[i].device, hostApi );\n            if( result != paNoError )\n                return result;\n\n            devices[i].device = hostApiDevice;\n            devices[i].channelCount = streamInfo->devices[i].channelCount;\n\n            totalChannelCount += devices[i].channelCount;\n        }\n\n        if( totalChannelCount != streamParameters->channelCount )\n        {\n            /* channelCount must match total channels specified by multiple devices */\n            return paInvalidChannelCount; /* REVIEW use of this error code */\n        }\n    }\n    else\n    {\n        devices[0].device = streamParameters->device;\n        devices[0].channelCount = streamParameters->channelCount;\n    }\n\n    return result;\n}\n\nstatic PaError ValidateInputChannelCounts(\n        struct PaUtilHostApiRepresentation *hostApi,\n        PaWinMmeDeviceAndChannelCount *devices,\n        unsigned long deviceCount )\n{\n    unsigned int i;\n    PaWinMmeDeviceInfo *inputDeviceInfo;\n    PaError paerror;\n\n    for( i=0; i < deviceCount; ++i )\n    {\n        if( devices[i].channelCount < 1 )\n            return paInvalidChannelCount;\n\n        inputDeviceInfo =\n                (PaWinMmeDeviceInfo*)hostApi->deviceInfos[ devices[i].device ];\n\n        paerror = IsInputChannelCountSupported( inputDeviceInfo, devices[i].channelCount );\n        if( paerror != paNoError )\n            return paerror;\n    }\n\n    return paNoError;\n}\n\nstatic PaError ValidateOutputChannelCounts(\n        struct PaUtilHostApiRepresentation *hostApi,\n        PaWinMmeDeviceAndChannelCount *devices,\n        unsigned long deviceCount )\n{\n    unsigned int i;\n    PaWinMmeDeviceInfo *outputDeviceInfo;\n    PaError paerror;\n\n    for( i=0; i < deviceCount; ++i )\n    {\n        if( devices[i].channelCount < 1 )\n            return paInvalidChannelCount;\n\n        outputDeviceInfo =\n                (PaWinMmeDeviceInfo*)hostApi->deviceInfos[ devices[i].device ];\n\n        paerror = IsOutputChannelCountSupported( outputDeviceInfo, devices[i].channelCount );\n        if( paerror != paNoError )\n            return paerror;\n    }\n\n    return paNoError;\n}\n\n\n/* the following macros are intended to improve the readability of the following code */\n#define PA_IS_INPUT_STREAM_( stream ) ( stream ->input.waveHandles )\n#define PA_IS_OUTPUT_STREAM_( stream ) ( stream ->output.waveHandles )\n#define PA_IS_FULL_DUPLEX_STREAM_( stream ) ( stream ->input.waveHandles && stream ->output.waveHandles )\n#define PA_IS_HALF_DUPLEX_STREAM_( stream ) ( !(stream ->input.waveHandles && stream ->output.waveHandles) )\n\nstatic PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,\n                           PaStream** s,\n                           const PaStreamParameters *inputParameters,\n                           const PaStreamParameters *outputParameters,\n                           double sampleRate,\n                           unsigned long framesPerBuffer,\n                           PaStreamFlags streamFlags,\n                           PaStreamCallback *streamCallback,\n                           void *userData )\n{\n    PaError result;\n    PaWinMmeHostApiRepresentation *winMmeHostApi = (PaWinMmeHostApiRepresentation*)hostApi;\n    PaWinMmeStream *stream = 0;\n    int bufferProcessorIsInitialized = 0;\n    int streamRepresentationIsInitialized = 0;\n    PaSampleFormat hostInputSampleFormat, hostOutputSampleFormat;\n    int inputChannelCount, outputChannelCount;\n    PaSampleFormat inputSampleFormat, outputSampleFormat;\n    double suggestedInputLatency, suggestedOutputLatency;\n    PaWinMmeStreamInfo *inputStreamInfo, *outputStreamInfo;\n    PaWinWaveFormatChannelMask inputChannelMask, outputChannelMask;\n    unsigned long framesPerHostInputBuffer;\n    unsigned long hostInputBufferCount;\n    unsigned long framesPerHostOutputBuffer;\n    unsigned long hostOutputBufferCount;\n    unsigned long framesPerBufferProcessorCall;\n    PaWinMmeDeviceAndChannelCount *inputDevices = 0;    /* contains all devices and channel counts as local host api ids, even when PaWinMmeUseMultipleDevices is not used */\n    unsigned long winMmeSpecificInputFlags = 0;\n    unsigned long inputDeviceCount = 0;\n    PaWinMmeDeviceAndChannelCount *outputDevices = 0;\n    unsigned long winMmeSpecificOutputFlags = 0;\n    unsigned long outputDeviceCount = 0;                /* contains all devices and channel counts as local host api ids, even when PaWinMmeUseMultipleDevices is not used */\n    char throttleProcessingThreadOnOverload = 1;\n\n\n    if( inputParameters )\n    {\n        inputChannelCount = inputParameters->channelCount;\n        inputSampleFormat = inputParameters->sampleFormat;\n        suggestedInputLatency = inputParameters->suggestedLatency;\n\n        inputDeviceCount = 1;\n\n        /* validate input hostApiSpecificStreamInfo */\n        inputStreamInfo = (PaWinMmeStreamInfo*)inputParameters->hostApiSpecificStreamInfo;\n        result = ValidateWinMmeSpecificStreamInfo( inputParameters, inputStreamInfo,\n                &winMmeSpecificInputFlags,\n                &throttleProcessingThreadOnOverload,\n                &inputDeviceCount );\n        if( result != paNoError ) return result;\n\n        inputDevices = (PaWinMmeDeviceAndChannelCount*)alloca( sizeof(PaWinMmeDeviceAndChannelCount) * inputDeviceCount );\n        if( !inputDevices ) return paInsufficientMemory;\n\n        result = RetrieveDevicesFromStreamParameters( hostApi, inputParameters, inputStreamInfo, inputDevices, inputDeviceCount );\n        if( result != paNoError ) return result;\n\n        result = ValidateInputChannelCounts( hostApi, inputDevices, inputDeviceCount );\n        if( result != paNoError ) return result;\n\n        hostInputSampleFormat =\n            PaUtil_SelectClosestAvailableFormat( paInt16 /* native formats */, inputSampleFormat );\n\n        if( inputDeviceCount != 1 ){\n            /* always use direct speakers when using multi-device multichannel mode */\n            inputChannelMask = PAWIN_SPEAKER_DIRECTOUT;\n        }\n        else\n        {\n            if( inputStreamInfo && inputStreamInfo->flags & paWinMmeUseChannelMask )\n                inputChannelMask = inputStreamInfo->channelMask;\n            else\n                inputChannelMask = PaWin_DefaultChannelMask( inputDevices[0].channelCount );\n        }\n    }\n    else\n    {\n        inputChannelCount = 0;\n        inputSampleFormat = 0;\n        suggestedInputLatency = 0.;\n        inputStreamInfo = 0;\n        hostInputSampleFormat = 0;\n    }\n\n\n    if( outputParameters )\n    {\n        outputChannelCount = outputParameters->channelCount;\n        outputSampleFormat = outputParameters->sampleFormat;\n        suggestedOutputLatency = outputParameters->suggestedLatency;\n\n        outputDeviceCount = 1;\n\n        /* validate output hostApiSpecificStreamInfo */\n        outputStreamInfo = (PaWinMmeStreamInfo*)outputParameters->hostApiSpecificStreamInfo;\n        result = ValidateWinMmeSpecificStreamInfo( outputParameters, outputStreamInfo,\n                &winMmeSpecificOutputFlags,\n                &throttleProcessingThreadOnOverload,\n                &outputDeviceCount );\n        if( result != paNoError ) return result;\n\n        outputDevices = (PaWinMmeDeviceAndChannelCount*)alloca( sizeof(PaWinMmeDeviceAndChannelCount) * outputDeviceCount );\n        if( !outputDevices ) return paInsufficientMemory;\n\n        result = RetrieveDevicesFromStreamParameters( hostApi, outputParameters, outputStreamInfo, outputDevices, outputDeviceCount );\n        if( result != paNoError ) return result;\n\n        result = ValidateOutputChannelCounts( hostApi, outputDevices, outputDeviceCount );\n        if( result != paNoError ) return result;\n\n        hostOutputSampleFormat =\n            PaUtil_SelectClosestAvailableFormat( paInt16 /* native formats */, outputSampleFormat );\n\n        if( outputDeviceCount != 1 ){\n            /* always use direct speakers when using multi-device multichannel mode */\n            outputChannelMask = PAWIN_SPEAKER_DIRECTOUT;\n        }\n        else\n        {\n            if( outputStreamInfo && outputStreamInfo->flags & paWinMmeUseChannelMask )\n                outputChannelMask = outputStreamInfo->channelMask;\n            else\n                outputChannelMask = PaWin_DefaultChannelMask( outputDevices[0].channelCount );\n        }\n    }\n    else\n    {\n        outputChannelCount = 0;\n        outputSampleFormat = 0;\n        outputStreamInfo = 0;\n        hostOutputSampleFormat = 0;\n        suggestedOutputLatency = 0.;\n    }\n\n\n    /*\n        IMPLEMENT ME:\n            - alter sampleRate to a close allowable rate if possible / necessary\n    */\n\n\n    /* validate platform specific flags */\n    if( (streamFlags & paPlatformSpecificFlags) != 0 )\n        return paInvalidFlag; /* unexpected platform specific flag */\n\n\n    /* always disable clipping and dithering if we are outputting a raw spdif stream */\n    if( (winMmeSpecificOutputFlags & paWinMmeWaveFormatDolbyAc3Spdif)\n            || (winMmeSpecificOutputFlags & paWinMmeWaveFormatWmaSpdif) ){\n\n        streamFlags = streamFlags | paClipOff | paDitherOff;\n    }\n\n\n    result = CalculateBufferSettings( &framesPerHostInputBuffer, &hostInputBufferCount,\n                &framesPerHostOutputBuffer, &hostOutputBufferCount,\n                inputChannelCount, hostInputSampleFormat, suggestedInputLatency, inputStreamInfo,\n                outputChannelCount, hostOutputSampleFormat, suggestedOutputLatency, outputStreamInfo,\n                sampleRate, framesPerBuffer );\n    if( result != paNoError ) goto error;\n\n\n    stream = (PaWinMmeStream*)PaUtil_AllocateMemory( sizeof(PaWinMmeStream) );\n    if( !stream )\n    {\n        result = paInsufficientMemory;\n        goto error;\n    }\n\n    InitializeSingleDirectionHandlesAndBuffers( &stream->input );\n    InitializeSingleDirectionHandlesAndBuffers( &stream->output );\n\n    stream->abortEvent = 0;\n    stream->processingThread = 0;\n\n    stream->throttleProcessingThreadOnOverload = throttleProcessingThreadOnOverload;\n\n    PaUtil_InitializeStreamRepresentation( &stream->streamRepresentation,\n                                           ( (streamCallback)\n                                            ? &winMmeHostApi->callbackStreamInterface\n                                            : &winMmeHostApi->blockingStreamInterface ),\n                                           streamCallback, userData );\n    streamRepresentationIsInitialized = 1;\n\n    PaUtil_InitializeCpuLoadMeasurer( &stream->cpuLoadMeasurer, sampleRate );\n\n\n    if( inputParameters && outputParameters ) /* full duplex */\n    {\n        if( framesPerHostInputBuffer < framesPerHostOutputBuffer )\n        {\n            assert( (framesPerHostOutputBuffer % framesPerHostInputBuffer) == 0 ); /* CalculateBufferSettings() should guarantee this condition */\n\n            framesPerBufferProcessorCall = framesPerHostInputBuffer;\n        }\n        else\n        {\n            assert( (framesPerHostInputBuffer % framesPerHostOutputBuffer) == 0 ); /* CalculateBufferSettings() should guarantee this condition */\n\n            framesPerBufferProcessorCall = framesPerHostOutputBuffer;\n        }\n    }\n    else if( inputParameters )\n    {\n        framesPerBufferProcessorCall = framesPerHostInputBuffer;\n    }\n    else if( outputParameters )\n    {\n        framesPerBufferProcessorCall = framesPerHostOutputBuffer;\n    }\n\n    stream->input.framesPerBuffer = framesPerHostInputBuffer;\n    stream->output.framesPerBuffer = framesPerHostOutputBuffer;\n\n    result =  PaUtil_InitializeBufferProcessor( &stream->bufferProcessor,\n                    inputChannelCount, inputSampleFormat, hostInputSampleFormat,\n                    outputChannelCount, outputSampleFormat, hostOutputSampleFormat,\n                    sampleRate, streamFlags, framesPerBuffer,\n                    framesPerBufferProcessorCall, paUtilFixedHostBufferSize,\n                    streamCallback, userData );\n    if( result != paNoError ) goto error;\n\n    bufferProcessorIsInitialized = 1;\n\n    /* stream info input latency is the minimum buffering latency (unlike suggested and default which are *maximums*) */\n    stream->streamRepresentation.streamInfo.inputLatency =\n            (double)(PaUtil_GetBufferProcessorInputLatencyFrames(&stream->bufferProcessor)\n                + framesPerHostInputBuffer) / sampleRate;\n    stream->streamRepresentation.streamInfo.outputLatency =\n            (double)(PaUtil_GetBufferProcessorOutputLatencyFrames(&stream->bufferProcessor)\n                + (framesPerHostOutputBuffer * (hostOutputBufferCount-1))) / sampleRate;\n    stream->streamRepresentation.streamInfo.sampleRate = sampleRate;\n\n    stream->primeStreamUsingCallback = ( (streamFlags&paPrimeOutputBuffersUsingStreamCallback) && streamCallback ) ? 1 : 0;\n\n    /* time to sleep when throttling due to >100% cpu usage.\n        -a quarter of a buffer's duration */\n    stream->throttledSleepMsecs =\n            (unsigned long)(stream->bufferProcessor.framesPerHostBuffer *\n             stream->bufferProcessor.samplePeriod * .25 * 1000);\n\n    stream->isStopped = 1;\n    stream->isActive = 0;\n\n\n    /* for maximum compatibility with multi-device multichannel drivers,\n        we first open all devices, then we prepare all buffers, finally\n        we start all devices ( in StartStream() ). teardown in reverse order.\n    */\n\n    if( inputParameters )\n    {\n        result = InitializeWaveHandles( winMmeHostApi, &stream->input,\n                winMmeSpecificInputFlags,\n                stream->bufferProcessor.bytesPerHostInputSample, sampleRate,\n                inputDevices, inputDeviceCount, inputChannelMask, 1 /* isInput */ );\n        if( result != paNoError ) goto error;\n    }\n\n    if( outputParameters )\n    {\n        result = InitializeWaveHandles( winMmeHostApi, &stream->output,\n                winMmeSpecificOutputFlags,\n                stream->bufferProcessor.bytesPerHostOutputSample, sampleRate,\n                outputDevices, outputDeviceCount, outputChannelMask, 0 /* isInput */ );\n        if( result != paNoError ) goto error;\n    }\n\n    if( inputParameters )\n    {\n        result = InitializeWaveHeaders( &stream->input, hostInputBufferCount,\n                hostInputSampleFormat, framesPerHostInputBuffer, inputDevices, 1 /* isInput */ );\n        if( result != paNoError ) goto error;\n    }\n\n    if( outputParameters )\n    {\n        result = InitializeWaveHeaders( &stream->output, hostOutputBufferCount,\n                hostOutputSampleFormat, framesPerHostOutputBuffer, outputDevices, 0 /* not isInput */ );\n        if( result != paNoError ) goto error;\n\n        stream->allBuffersDurationMs = (DWORD) (1000.0 * (framesPerHostOutputBuffer * stream->output.bufferCount) / sampleRate);\n    }\n    else\n    {\n        stream->allBuffersDurationMs = (DWORD) (1000.0 * (framesPerHostInputBuffer * stream->input.bufferCount) / sampleRate);\n    }\n\n\n    if( streamCallback )\n    {\n        /* abort event is only needed for callback streams */\n        result = CreateEventWithPaError( &stream->abortEvent, NULL, TRUE, FALSE, NULL );\n        if( result != paNoError ) goto error;\n    }\n\n    *s = (PaStream*)stream;\n\n    return result;\n\nerror:\n\n    if( stream )\n    {\n        if( stream->abortEvent )\n            CloseHandle( stream->abortEvent );\n\n        TerminateWaveHeaders( &stream->output, 0 /* not isInput */ );\n        TerminateWaveHeaders( &stream->input, 1 /* isInput */ );\n\n        TerminateWaveHandles( &stream->output, 0 /* not isInput */, 1 /* currentlyProcessingAnError */ );\n        TerminateWaveHandles( &stream->input, 1 /* isInput */, 1 /* currentlyProcessingAnError */ );\n\n        if( bufferProcessorIsInitialized )\n            PaUtil_TerminateBufferProcessor( &stream->bufferProcessor );\n\n        if( streamRepresentationIsInitialized )\n            PaUtil_TerminateStreamRepresentation( &stream->streamRepresentation );\n\n        PaUtil_FreeMemory( stream );\n    }\n\n    return result;\n}\n\n\n/* return non-zero if all current buffers are done */\nstatic int BuffersAreDone( WAVEHDR **waveHeaders, unsigned int deviceCount, int bufferIndex )\n{\n    unsigned int i;\n\n    for( i=0; i < deviceCount; ++i )\n    {\n        if( !(waveHeaders[i][ bufferIndex ].dwFlags & WHDR_DONE) )\n        {\n            return 0;\n        }\n    }\n\n    return 1;\n}\n\nstatic int CurrentInputBuffersAreDone( PaWinMmeStream *stream )\n{\n    return BuffersAreDone( stream->input.waveHeaders, stream->input.deviceCount, stream->input.currentBufferIndex );\n}\n\nstatic int CurrentOutputBuffersAreDone( PaWinMmeStream *stream )\n{\n    return BuffersAreDone( stream->output.waveHeaders, stream->output.deviceCount, stream->output.currentBufferIndex );\n}\n\n\n/* return non-zero if any buffers are queued */\nstatic int NoBuffersAreQueued( PaWinMmeSingleDirectionHandlesAndBuffers *handlesAndBuffers )\n{\n    unsigned int i, j;\n\n    if( handlesAndBuffers->waveHandles )\n    {\n        for( i=0; i < handlesAndBuffers->bufferCount; ++i )\n        {\n            for( j=0; j < handlesAndBuffers->deviceCount; ++j )\n            {\n                if( !( handlesAndBuffers->waveHeaders[ j ][ i ].dwFlags & WHDR_DONE) )\n                {\n                    return 0;\n                }\n            }\n        }\n    }\n\n    return 1;\n}\n\n\n#define PA_CIRCULAR_INCREMENT_( current, max )\\\n    ( (((current) + 1) >= (max)) ? (0) : (current+1) )\n\n#define PA_CIRCULAR_DECREMENT_( current, max )\\\n    ( ((current) == 0) ? ((max)-1) : (current-1) )\n\n\nstatic signed long GetAvailableFrames( PaWinMmeSingleDirectionHandlesAndBuffers *handlesAndBuffers )\n{\n    signed long result = 0;\n    unsigned int i;\n\n    if( BuffersAreDone( handlesAndBuffers->waveHeaders, handlesAndBuffers->deviceCount, handlesAndBuffers->currentBufferIndex ) )\n    {\n        /* we could calculate the following in O(1) if we kept track of the\n            last done buffer */\n        result = handlesAndBuffers->framesPerBuffer - handlesAndBuffers->framesUsedInCurrentBuffer;\n\n        i = PA_CIRCULAR_INCREMENT_( handlesAndBuffers->currentBufferIndex, handlesAndBuffers->bufferCount );\n        while( i != handlesAndBuffers->currentBufferIndex )\n        {\n            if( BuffersAreDone( handlesAndBuffers->waveHeaders, handlesAndBuffers->deviceCount, i ) )\n            {\n                result += handlesAndBuffers->framesPerBuffer;\n                i = PA_CIRCULAR_INCREMENT_( i, handlesAndBuffers->bufferCount );\n            }\n            else\n                break;\n        }\n    }\n\n    return result;\n}\n\n\nstatic PaError AdvanceToNextInputBuffer( PaWinMmeStream *stream )\n{\n    PaError result = paNoError;\n    MMRESULT mmresult;\n    unsigned int i;\n\n    for( i=0; i < stream->input.deviceCount; ++i )\n    {\n        stream->input.waveHeaders[i][ stream->input.currentBufferIndex ].dwFlags &= ~WHDR_DONE;\n        mmresult = waveInAddBuffer( ((HWAVEIN*)stream->input.waveHandles)[i],\n                                    &stream->input.waveHeaders[i][ stream->input.currentBufferIndex ],\n                                    sizeof(WAVEHDR) );\n        if( mmresult != MMSYSERR_NOERROR )\n        {\n            result = paUnanticipatedHostError;\n            PA_MME_SET_LAST_WAVEIN_ERROR( mmresult );\n        }\n    }\n\n    stream->input.currentBufferIndex =\n            PA_CIRCULAR_INCREMENT_( stream->input.currentBufferIndex, stream->input.bufferCount );\n\n    stream->input.framesUsedInCurrentBuffer = 0;\n\n    return result;\n}\n\n\nstatic PaError AdvanceToNextOutputBuffer( PaWinMmeStream *stream )\n{\n    PaError result = paNoError;\n    MMRESULT mmresult;\n    unsigned int i;\n\n    for( i=0; i < stream->output.deviceCount; ++i )\n    {\n        mmresult = waveOutWrite( ((HWAVEOUT*)stream->output.waveHandles)[i],\n                                 &stream->output.waveHeaders[i][ stream->output.currentBufferIndex ],\n                                 sizeof(WAVEHDR) );\n        if( mmresult != MMSYSERR_NOERROR )\n        {\n            result = paUnanticipatedHostError;\n            PA_MME_SET_LAST_WAVEOUT_ERROR( mmresult );\n        }\n    }\n\n    stream->output.currentBufferIndex =\n            PA_CIRCULAR_INCREMENT_( stream->output.currentBufferIndex, stream->output.bufferCount );\n\n    stream->output.framesUsedInCurrentBuffer = 0;\n\n    return result;\n}\n\n\n/* requeue all but the most recent input with the driver. Used for catching\n    up after a total input buffer underrun */\nstatic PaError CatchUpInputBuffers( PaWinMmeStream *stream )\n{\n    PaError result = paNoError;\n    unsigned int i;\n\n    for( i=0; i < stream->input.bufferCount - 1; ++i )\n    {\n        result = AdvanceToNextInputBuffer( stream );\n        if( result != paNoError )\n            break;\n    }\n\n    return result;\n}\n\n\n/* take the most recent output and duplicate it to all other output buffers\n    and requeue them. Used for catching up after a total output buffer underrun.\n*/\nstatic PaError CatchUpOutputBuffers( PaWinMmeStream *stream )\n{\n    PaError result = paNoError;\n    unsigned int i, j;\n    unsigned int previousBufferIndex =\n            PA_CIRCULAR_DECREMENT_( stream->output.currentBufferIndex, stream->output.bufferCount );\n\n    for( i=0; i < stream->output.bufferCount - 1; ++i )\n    {\n        for( j=0; j < stream->output.deviceCount; ++j )\n        {\n            if( stream->output.waveHeaders[j][ stream->output.currentBufferIndex ].lpData\n                    != stream->output.waveHeaders[j][ previousBufferIndex ].lpData )\n            {\n                CopyMemory( stream->output.waveHeaders[j][ stream->output.currentBufferIndex ].lpData,\n                            stream->output.waveHeaders[j][ previousBufferIndex ].lpData,\n                            stream->output.waveHeaders[j][ stream->output.currentBufferIndex ].dwBufferLength );\n            }\n        }\n\n        result = AdvanceToNextOutputBuffer( stream );\n        if( result != paNoError )\n            break;\n    }\n\n    return result;\n}\n\n\nPA_THREAD_FUNC ProcessingThreadProc( void *pArg )\n{\n    PaWinMmeStream *stream = (PaWinMmeStream *)pArg;\n    HANDLE events[3];\n    int eventCount = 0;\n    DWORD result = paNoError;\n    DWORD waitResult;\n    DWORD timeout = (unsigned long)(stream->allBuffersDurationMs * 0.5);\n    int hostBuffersAvailable;\n    signed int hostInputBufferIndex, hostOutputBufferIndex;\n    PaStreamCallbackFlags statusFlags;\n    int callbackResult;\n    int done = 0;\n    unsigned int channel, i;\n    unsigned long framesProcessed;\n\n    /* prepare event array for call to WaitForMultipleObjects() */\n    if( stream->input.bufferEvent )\n        events[eventCount++] = stream->input.bufferEvent;\n    if( stream->output.bufferEvent )\n        events[eventCount++] = stream->output.bufferEvent;\n    events[eventCount++] = stream->abortEvent;\n\n    statusFlags = 0; /** @todo support paInputUnderflow, paOutputOverflow and paNeverDropInput */\n\n    /* loop until something causes us to stop */\n    do{\n        /* wait for MME to signal that a buffer is available, or for\n            the PA abort event to be signaled.\n\n          When this indicates that one or more buffers are available\n          NoBuffersAreQueued() and Current*BuffersAreDone are used below to\n          poll for additional done buffers. NoBuffersAreQueued() will fail\n          to identify an underrun/overflow if the driver doesn't mark all done\n          buffers prior to signalling the event. Some drivers do this\n          (eg RME Digi96, and others don't eg VIA PC 97 input). This isn't a\n          huge problem, it just means that we won't always be able to detect\n          underflow/overflow.\n        */\n        waitResult = WaitForMultipleObjects( eventCount, events, FALSE /* wait all = FALSE */, timeout );\n        if( waitResult == WAIT_FAILED )\n        {\n            result = paUnanticipatedHostError;\n            /** @todo FIXME/REVIEW: can't return host error info from an asynchronous thread. see http://www.portaudio.com/trac/ticket/143 */\n            done = 1;\n        }\n        else if( waitResult == WAIT_TIMEOUT )\n        {\n            /* if a timeout is encountered, continue */\n        }\n\n        if( stream->abortProcessing )\n        {\n            /* Pa_AbortStream() has been called, stop processing immediately */\n            done = 1;\n        }\n        else if( stream->stopProcessing )\n        {\n            /* Pa_StopStream() has been called or the user callback returned\n                non-zero, processing will continue until all output buffers\n                are marked as done. The stream will stop immediately if it\n                is input-only.\n            */\n\n            if( PA_IS_OUTPUT_STREAM_(stream) )\n            {\n                if( NoBuffersAreQueued( &stream->output ) )\n                    done = 1; /* Will cause thread to return. */\n            }\n            else\n            {\n                /* input only stream */\n                done = 1; /* Will cause thread to return. */\n            }\n        }\n        else\n        {\n            hostBuffersAvailable = 1;\n\n            /* process all available host buffers */\n            do\n            {\n                hostInputBufferIndex = -1;\n                hostOutputBufferIndex = -1;\n\n                if( PA_IS_INPUT_STREAM_(stream) )\n                {\n                    if( CurrentInputBuffersAreDone( stream ) )\n                    {\n                        if( NoBuffersAreQueued( &stream->input ) )\n                        {\n                            /** @todo\n                               if all of the other buffers are also ready then\n                               we discard all but the most recent. This is an\n                               input buffer overflow. FIXME: these buffers should\n                               be passed to the callback in a paNeverDropInput\n                               stream. http://www.portaudio.com/trac/ticket/142\n\n                               note that it is also possible for an input overflow\n                               to happen while the callback is processing a buffer.\n                               that is handled further down.\n                            */\n                            result = CatchUpInputBuffers( stream );\n                            if( result != paNoError )\n                                done = 1;\n\n                            statusFlags |= paInputOverflow;\n                        }\n\n                        hostInputBufferIndex = stream->input.currentBufferIndex;\n                    }\n                }\n\n                if( PA_IS_OUTPUT_STREAM_(stream) )\n                {\n                    if( CurrentOutputBuffersAreDone( stream ) )\n                    {\n                        /* ok, we have an output buffer */\n\n                        if( NoBuffersAreQueued( &stream->output ) )\n                        {\n                            /*\n                            if all of the other buffers are also ready, catch up by copying\n                            the most recently generated buffer into all but one of the output\n                            buffers.\n\n                            note that this catch up code only handles the case where all\n                            buffers have been played out due to this thread not having\n                            woken up at all. a more common case occurs when this thread\n                            is woken up, processes one buffer, but takes too long, and as\n                            a result all the other buffers have become un-queued. that\n                            case is handled further down.\n                            */\n\n                            result = CatchUpOutputBuffers( stream );\n                            if( result != paNoError )\n                                done = 1;\n\n                            statusFlags |= paOutputUnderflow;\n                        }\n\n                        hostOutputBufferIndex = stream->output.currentBufferIndex;\n                    }\n                }\n\n\n                if( (PA_IS_FULL_DUPLEX_STREAM_(stream) && hostInputBufferIndex != -1 && hostOutputBufferIndex != -1) ||\n                        (PA_IS_HALF_DUPLEX_STREAM_(stream) && ( hostInputBufferIndex != -1 || hostOutputBufferIndex != -1 ) ) )\n                {\n                    PaStreamCallbackTimeInfo timeInfo = {0,0,0}; /** @todo implement inputBufferAdcTime */\n\n\n                    if( PA_IS_OUTPUT_STREAM_(stream) )\n                    {\n                        /* set timeInfo.currentTime and calculate timeInfo.outputBufferDacTime\n                            from the current wave out position */\n                        MMTIME mmtime;\n                        double timeBeforeGetPosition, timeAfterGetPosition;\n                        double time;\n                        long framesInBufferRing;\n                        long writePosition;\n                        long playbackPosition;\n                        HWAVEOUT firstWaveOutDevice = ((HWAVEOUT*)stream->output.waveHandles)[0];\n\n                        mmtime.wType = TIME_SAMPLES;\n                        timeBeforeGetPosition = PaUtil_GetTime();\n                        waveOutGetPosition( firstWaveOutDevice, &mmtime, sizeof(MMTIME) );\n                        timeAfterGetPosition = PaUtil_GetTime();\n\n                        timeInfo.currentTime = timeAfterGetPosition;\n\n                        /* approximate time at which wave out position was measured\n                            as half way between timeBeforeGetPosition and timeAfterGetPosition */\n                        time = timeBeforeGetPosition + (timeAfterGetPosition - timeBeforeGetPosition) * .5;\n\n                        framesInBufferRing = stream->output.bufferCount * stream->bufferProcessor.framesPerHostBuffer;\n                        playbackPosition = mmtime.u.sample % framesInBufferRing;\n\n                        writePosition = stream->output.currentBufferIndex * stream->bufferProcessor.framesPerHostBuffer\n                                + stream->output.framesUsedInCurrentBuffer;\n\n                        if( playbackPosition >= writePosition ){\n                            timeInfo.outputBufferDacTime =\n                                    time + ((double)( writePosition + (framesInBufferRing - playbackPosition) ) * stream->bufferProcessor.samplePeriod );\n                        }else{\n                            timeInfo.outputBufferDacTime =\n                                    time + ((double)( writePosition - playbackPosition ) * stream->bufferProcessor.samplePeriod );\n                        }\n                    }\n\n\n                    PaUtil_BeginCpuLoadMeasurement( &stream->cpuLoadMeasurer );\n\n                    PaUtil_BeginBufferProcessing( &stream->bufferProcessor, &timeInfo, statusFlags  );\n\n                    /* reset status flags once they have been passed to the buffer processor */\n                    statusFlags = 0;\n\n                    if( PA_IS_INPUT_STREAM_(stream) )\n                    {\n                        PaUtil_SetInputFrameCount( &stream->bufferProcessor, 0 /* default to host buffer size */ );\n\n                        channel = 0;\n                        for( i=0; i<stream->input.deviceCount; ++i )\n                        {\n                             /* we have stored the number of channels in the buffer in dwUser */\n                            int channelCount = (int)stream->input.waveHeaders[i][ hostInputBufferIndex ].dwUser;\n\n                            PaUtil_SetInterleavedInputChannels( &stream->bufferProcessor, channel,\n                                    stream->input.waveHeaders[i][ hostInputBufferIndex ].lpData +\n                                        stream->input.framesUsedInCurrentBuffer * channelCount *\n                                        stream->bufferProcessor.bytesPerHostInputSample,\n                                    channelCount );\n\n\n                            channel += channelCount;\n                        }\n                    }\n\n                    if( PA_IS_OUTPUT_STREAM_(stream) )\n                    {\n                        PaUtil_SetOutputFrameCount( &stream->bufferProcessor, 0 /* default to host buffer size */ );\n\n                        channel = 0;\n                        for( i=0; i<stream->output.deviceCount; ++i )\n                        {\n                            /* we have stored the number of channels in the buffer in dwUser */\n                            int channelCount = (int)stream->output.waveHeaders[i][ hostOutputBufferIndex ].dwUser;\n\n                            PaUtil_SetInterleavedOutputChannels( &stream->bufferProcessor, channel,\n                                    stream->output.waveHeaders[i][ hostOutputBufferIndex ].lpData +\n                                        stream->output.framesUsedInCurrentBuffer * channelCount *\n                                        stream->bufferProcessor.bytesPerHostOutputSample,\n                                    channelCount );\n\n                            channel += channelCount;\n                        }\n                    }\n\n                    callbackResult = paContinue;\n                    framesProcessed = PaUtil_EndBufferProcessing( &stream->bufferProcessor, &callbackResult );\n\n                    stream->input.framesUsedInCurrentBuffer += framesProcessed;\n                    stream->output.framesUsedInCurrentBuffer += framesProcessed;\n\n                    PaUtil_EndCpuLoadMeasurement( &stream->cpuLoadMeasurer, framesProcessed );\n\n                    if( callbackResult == paContinue )\n                    {\n                        /* nothing special to do */\n                    }\n                    else if( callbackResult == paAbort )\n                    {\n                        stream->abortProcessing = 1;\n                        done = 1;\n                        /** @todo FIXME: should probably reset the output device immediately once the callback returns paAbort\n                            see: http://www.portaudio.com/trac/ticket/141\n                        */\n                        result = paNoError;\n                    }\n                    else\n                    {\n                        /* User callback has asked us to stop with paComplete or other non-zero value */\n                        stream->stopProcessing = 1; /* stop once currently queued audio has finished */\n                        result = paNoError;\n                    }\n\n\n                    if( PA_IS_INPUT_STREAM_(stream)\n                            && stream->stopProcessing == 0 && stream->abortProcessing == 0\n                            && stream->input.framesUsedInCurrentBuffer == stream->input.framesPerBuffer )\n                    {\n                        if( NoBuffersAreQueued( &stream->input ) )\n                        {\n                            /** @todo need to handle PaNeverDropInput here where necessary */\n                            result = CatchUpInputBuffers( stream );\n                            if( result != paNoError )\n                                done = 1;\n\n                            statusFlags |= paInputOverflow;\n                        }\n\n                        result = AdvanceToNextInputBuffer( stream );\n                        if( result != paNoError )\n                            done = 1;\n                    }\n\n\n                    if( PA_IS_OUTPUT_STREAM_(stream) && !stream->abortProcessing )\n                    {\n                        if( stream->stopProcessing &&\n                                stream->output.framesUsedInCurrentBuffer < stream->output.framesPerBuffer )\n                        {\n                            /* zero remaining samples in output output buffer and flush */\n\n                            stream->output.framesUsedInCurrentBuffer += PaUtil_ZeroOutput( &stream->bufferProcessor,\n                                    stream->output.framesPerBuffer - stream->output.framesUsedInCurrentBuffer );\n\n                            /* we send the entire buffer to the output devices, but we could\n                                just send a partial buffer, rather than zeroing the unused\n                                samples.\n                            */\n                        }\n\n                        if( stream->output.framesUsedInCurrentBuffer == stream->output.framesPerBuffer )\n                        {\n                            /* check for underflow before enquing the just-generated buffer,\n                                but recover from underflow after enquing it. This ensures\n                                that the most recent audio segment is repeated */\n                            int outputUnderflow = NoBuffersAreQueued( &stream->output );\n\n                            result = AdvanceToNextOutputBuffer( stream );\n                            if( result != paNoError )\n                                done = 1;\n\n                            if( outputUnderflow && !done && !stream->stopProcessing )\n                            {\n                                /* Recover from underflow in the case where the\n                                    underflow occurred while processing the buffer\n                                    we just finished */\n\n                                result = CatchUpOutputBuffers( stream );\n                                if( result != paNoError )\n                                    done = 1;\n\n                                statusFlags |= paOutputUnderflow;\n                            }\n                        }\n                    }\n\n                    if( stream->throttleProcessingThreadOnOverload != 0 )\n                    {\n                        if( stream->stopProcessing || stream->abortProcessing )\n                        {\n                            if( stream->processingThreadPriority != stream->highThreadPriority )\n                            {\n                                SetThreadPriority( stream->processingThread, stream->highThreadPriority );\n                                stream->processingThreadPriority = stream->highThreadPriority;\n                            }\n                        }\n                        else if( PaUtil_GetCpuLoad( &stream->cpuLoadMeasurer ) > 1. )\n                        {\n                            if( stream->processingThreadPriority != stream->throttledThreadPriority )\n                            {\n                                SetThreadPriority( stream->processingThread, stream->throttledThreadPriority );\n                                stream->processingThreadPriority = stream->throttledThreadPriority;\n                            }\n\n                            /* sleep to give other processes a go */\n                            Sleep( stream->throttledSleepMsecs );\n                        }\n                        else\n                        {\n                            if( stream->processingThreadPriority != stream->highThreadPriority )\n                            {\n                                SetThreadPriority( stream->processingThread, stream->highThreadPriority );\n                                stream->processingThreadPriority = stream->highThreadPriority;\n                            }\n                        }\n                    }\n                }\n                else\n                {\n                    hostBuffersAvailable = 0;\n                }\n            }\n            while( hostBuffersAvailable &&\n                    stream->stopProcessing == 0 &&\n                    stream->abortProcessing == 0 &&\n                    !done );\n        }\n    }\n    while( !done );\n\n    stream->isActive = 0;\n\n    if( stream->streamRepresentation.streamFinishedCallback != 0 )\n        stream->streamRepresentation.streamFinishedCallback( stream->streamRepresentation.userData );\n\n    PaUtil_ResetCpuLoadMeasurer( &stream->cpuLoadMeasurer );\n\n    return result;\n}\n\n\n/*\n    When CloseStream() is called, the multi-api layer ensures that\n    the stream has already been stopped or aborted.\n*/\nstatic PaError CloseStream( PaStream* s )\n{\n    PaError result;\n    PaWinMmeStream *stream = (PaWinMmeStream*)s;\n\n    result = CloseHandleWithPaError( stream->abortEvent );\n    if( result != paNoError ) goto error;\n\n    TerminateWaveHeaders( &stream->output, 0 /* not isInput */ );\n    TerminateWaveHeaders( &stream->input, 1 /* isInput */ );\n\n    TerminateWaveHandles( &stream->output, 0 /* not isInput */, 0 /* not currentlyProcessingAnError */ );\n    TerminateWaveHandles( &stream->input, 1 /* isInput */, 0 /* not currentlyProcessingAnError */ );\n\n    PaUtil_TerminateBufferProcessor( &stream->bufferProcessor );\n    PaUtil_TerminateStreamRepresentation( &stream->streamRepresentation );\n    PaUtil_FreeMemory( stream );\n\nerror:\n    /** @todo REVIEW: what is the best way to clean up a stream if an error is detected? */\n    return result;\n}\n\n\nstatic PaError StartStream( PaStream *s )\n{\n    PaError result;\n    PaWinMmeStream *stream = (PaWinMmeStream*)s;\n    MMRESULT mmresult;\n    unsigned int i, j;\n    int callbackResult;\n    unsigned int channel;\n    unsigned long framesProcessed;\n    PaStreamCallbackTimeInfo timeInfo = {0,0,0}; /** @todo implement this for stream priming */\n\n    PaUtil_ResetBufferProcessor( &stream->bufferProcessor );\n\n    if( PA_IS_INPUT_STREAM_(stream) )\n    {\n        for( i=0; i<stream->input.bufferCount; ++i )\n        {\n            for( j=0; j<stream->input.deviceCount; ++j )\n            {\n                stream->input.waveHeaders[j][i].dwFlags &= ~WHDR_DONE;\n                mmresult = waveInAddBuffer( ((HWAVEIN*)stream->input.waveHandles)[j], &stream->input.waveHeaders[j][i], sizeof(WAVEHDR) );\n                if( mmresult != MMSYSERR_NOERROR )\n                {\n                    result = paUnanticipatedHostError;\n                    PA_MME_SET_LAST_WAVEIN_ERROR( mmresult );\n                    goto error;\n                }\n            }\n        }\n        stream->input.currentBufferIndex = 0;\n        stream->input.framesUsedInCurrentBuffer = 0;\n    }\n\n    if( PA_IS_OUTPUT_STREAM_(stream) )\n    {\n        for( i=0; i<stream->output.deviceCount; ++i )\n        {\n            if( (mmresult = waveOutPause( ((HWAVEOUT*)stream->output.waveHandles)[i] )) != MMSYSERR_NOERROR )\n            {\n                result = paUnanticipatedHostError;\n                PA_MME_SET_LAST_WAVEOUT_ERROR( mmresult );\n                goto error;\n            }\n        }\n\n        for( i=0; i<stream->output.bufferCount; ++i )\n        {\n            if( stream->primeStreamUsingCallback )\n            {\n\n                stream->output.framesUsedInCurrentBuffer = 0;\n                do{\n\n                    PaUtil_BeginBufferProcessing( &stream->bufferProcessor,\n                            &timeInfo,\n                            paPrimingOutput | ((stream->input.bufferCount > 0 ) ? paInputUnderflow : 0));\n\n                    if( stream->input.bufferCount > 0 )\n                        PaUtil_SetNoInput( &stream->bufferProcessor );\n\n                    PaUtil_SetOutputFrameCount( &stream->bufferProcessor, 0 /* default to host buffer size */ );\n\n                    channel = 0;\n                    for( j=0; j<stream->output.deviceCount; ++j )\n                    {\n                        /* we have stored the number of channels in the buffer in dwUser */\n                        int channelCount = (int)stream->output.waveHeaders[j][i].dwUser;\n\n                        PaUtil_SetInterleavedOutputChannels( &stream->bufferProcessor, channel,\n                                stream->output.waveHeaders[j][i].lpData +\n                                stream->output.framesUsedInCurrentBuffer * channelCount *\n                                stream->bufferProcessor.bytesPerHostOutputSample,\n                                channelCount );\n\n                        /* we have stored the number of channels in the buffer in dwUser */\n                        channel += channelCount;\n                    }\n\n                    callbackResult = paContinue;\n                    framesProcessed = PaUtil_EndBufferProcessing( &stream->bufferProcessor, &callbackResult );\n                    stream->output.framesUsedInCurrentBuffer += framesProcessed;\n\n                    if( callbackResult != paContinue )\n                    {\n                        /** @todo fix this, what do we do if callback result is non-zero during stream\n                            priming?\n\n                            for complete: play out primed waveHeaders as usual\n                            for abort: clean up immediately.\n                       */\n                    }\n\n                }while( stream->output.framesUsedInCurrentBuffer != stream->output.framesPerBuffer );\n\n            }\n            else\n            {\n                for( j=0; j<stream->output.deviceCount; ++j )\n                {\n                    ZeroMemory( stream->output.waveHeaders[j][i].lpData, stream->output.waveHeaders[j][i].dwBufferLength );\n                }\n            }\n\n            /* we queue all channels of a single buffer frame (across all\n                devices, because some multidevice multichannel drivers work\n                better this way */\n            for( j=0; j<stream->output.deviceCount; ++j )\n            {\n                mmresult = waveOutWrite( ((HWAVEOUT*)stream->output.waveHandles)[j], &stream->output.waveHeaders[j][i], sizeof(WAVEHDR) );\n                if( mmresult != MMSYSERR_NOERROR )\n                {\n                    result = paUnanticipatedHostError;\n                    PA_MME_SET_LAST_WAVEOUT_ERROR( mmresult );\n                    goto error;\n                }\n            }\n        }\n        stream->output.currentBufferIndex = 0;\n        stream->output.framesUsedInCurrentBuffer = 0;\n    }\n\n\n    stream->isStopped = 0;\n    stream->isActive = 1;\n    stream->stopProcessing = 0;\n    stream->abortProcessing = 0;\n\n    result = ResetEventWithPaError( stream->input.bufferEvent );\n    if( result != paNoError ) goto error;\n\n    result = ResetEventWithPaError( stream->output.bufferEvent );\n    if( result != paNoError ) goto error;\n\n\n    if( stream->streamRepresentation.streamCallback )\n    {\n        /* callback stream */\n\n        result = ResetEventWithPaError( stream->abortEvent );\n        if( result != paNoError ) goto error;\n\n        /* Create thread that waits for audio buffers to be ready for processing. */\n        stream->processingThread = CREATE_THREAD;\n        if( !stream->processingThread )\n        {\n            result = paUnanticipatedHostError;\n            PA_MME_SET_LAST_SYSTEM_ERROR( GetLastError() );\n            goto error;\n        }\n\n        /** @todo could have mme specific stream parameters to allow the user\n            to set the callback thread priorities */\n        stream->highThreadPriority = THREAD_PRIORITY_TIME_CRITICAL;\n        stream->throttledThreadPriority = THREAD_PRIORITY_NORMAL;\n\n        if( !SetThreadPriority( stream->processingThread, stream->highThreadPriority ) )\n        {\n            result = paUnanticipatedHostError;\n            PA_MME_SET_LAST_SYSTEM_ERROR( GetLastError() );\n            goto error;\n        }\n        stream->processingThreadPriority = stream->highThreadPriority;\n    }\n    else\n    {\n        /* blocking read/write stream */\n\n    }\n\n    if( PA_IS_INPUT_STREAM_(stream) )\n    {\n        for( i=0; i < stream->input.deviceCount; ++i )\n        {\n            mmresult = waveInStart( ((HWAVEIN*)stream->input.waveHandles)[i] );\n            PA_DEBUG((\"Pa_StartStream: waveInStart returned = 0x%X.\\n\", mmresult));\n            if( mmresult != MMSYSERR_NOERROR )\n            {\n                result = paUnanticipatedHostError;\n                PA_MME_SET_LAST_WAVEIN_ERROR( mmresult );\n                goto error;\n            }\n        }\n    }\n\n    if( PA_IS_OUTPUT_STREAM_(stream) )\n    {\n        for( i=0; i < stream->output.deviceCount; ++i )\n        {\n            if( (mmresult = waveOutRestart( ((HWAVEOUT*)stream->output.waveHandles)[i] )) != MMSYSERR_NOERROR )\n            {\n                result = paUnanticipatedHostError;\n                PA_MME_SET_LAST_WAVEOUT_ERROR( mmresult );\n                goto error;\n            }\n        }\n    }\n\n    return result;\n\nerror:\n    /** @todo FIXME: implement recovery as best we can\n    This should involve rolling back to a state as-if this function had never been called\n    */\n    return result;\n}\n\n\nstatic PaError StopStream( PaStream *s )\n{\n    PaError result = paNoError;\n    PaWinMmeStream *stream = (PaWinMmeStream*)s;\n    int timeout;\n    DWORD waitResult;\n    MMRESULT mmresult;\n    signed int hostOutputBufferIndex;\n    unsigned int channel, waitCount, i;\n\n    /** @todo\n        REVIEW: the error checking in this function needs review. the basic\n        idea is to return from this function in a known state - for example\n        there is no point avoiding calling waveInReset just because\n        the thread times out.\n    */\n\n    if( stream->processingThread )\n    {\n        /* callback stream */\n\n        /* Tell processing thread to stop generating more data and to let current data play out. */\n        stream->stopProcessing = 1;\n\n        /* Calculate timeOut longer than longest time it could take to return all buffers. */\n        timeout = (int)(stream->allBuffersDurationMs * 1.5);\n        if( timeout < PA_MME_MIN_TIMEOUT_MSEC_ )\n            timeout = PA_MME_MIN_TIMEOUT_MSEC_;\n\n        PA_DEBUG((\"WinMME StopStream: waiting for background thread.\\n\"));\n\n        waitResult = WaitForSingleObject( stream->processingThread, timeout );\n        if( waitResult == WAIT_TIMEOUT )\n        {\n            /* try to abort */\n            stream->abortProcessing = 1;\n            SetEvent( stream->abortEvent );\n            waitResult = WaitForSingleObject( stream->processingThread, timeout );\n            if( waitResult == WAIT_TIMEOUT )\n            {\n                PA_DEBUG((\"WinMME StopStream: timed out while waiting for background thread to finish.\\n\"));\n                result = paTimedOut;\n            }\n        }\n\n        CloseHandle( stream->processingThread );\n        stream->processingThread = NULL;\n    }\n    else\n    {\n        /* blocking read / write stream */\n\n        if( PA_IS_OUTPUT_STREAM_(stream) )\n        {\n            if( stream->output.framesUsedInCurrentBuffer > 0 )\n            {\n                /* there are still unqueued frames in the current buffer, so flush them */\n\n                hostOutputBufferIndex = stream->output.currentBufferIndex;\n\n                PaUtil_SetOutputFrameCount( &stream->bufferProcessor,\n                        stream->output.framesPerBuffer - stream->output.framesUsedInCurrentBuffer );\n\n                channel = 0;\n                for( i=0; i<stream->output.deviceCount; ++i )\n                {\n                    /* we have stored the number of channels in the buffer in dwUser */\n                    int channelCount = (int)stream->output.waveHeaders[i][ hostOutputBufferIndex ].dwUser;\n\n                    PaUtil_SetInterleavedOutputChannels( &stream->bufferProcessor, channel,\n                            stream->output.waveHeaders[i][ hostOutputBufferIndex ].lpData +\n                                stream->output.framesUsedInCurrentBuffer * channelCount *\n                                stream->bufferProcessor.bytesPerHostOutputSample,\n                            channelCount );\n\n                    channel += channelCount;\n                }\n\n                PaUtil_ZeroOutput( &stream->bufferProcessor,\n                        stream->output.framesPerBuffer - stream->output.framesUsedInCurrentBuffer );\n\n                /* we send the entire buffer to the output devices, but we could\n                    just send a partial buffer, rather than zeroing the unused\n                    samples.\n                */\n                AdvanceToNextOutputBuffer( stream );\n            }\n\n\n            timeout = (stream->allBuffersDurationMs / stream->output.bufferCount) + 1;\n            if( timeout < PA_MME_MIN_TIMEOUT_MSEC_ )\n                timeout = PA_MME_MIN_TIMEOUT_MSEC_;\n\n            waitCount = 0;\n            while( !NoBuffersAreQueued( &stream->output ) && waitCount <= stream->output.bufferCount )\n            {\n                /* wait for MME to signal that a buffer is available */\n                waitResult = WaitForSingleObject( stream->output.bufferEvent, timeout );\n                if( waitResult == WAIT_FAILED )\n                {\n                    break;\n                }\n                else if( waitResult == WAIT_TIMEOUT )\n                {\n                    /* keep waiting */\n                }\n\n                ++waitCount;\n            }\n        }\n    }\n\n    if( PA_IS_OUTPUT_STREAM_(stream) )\n    {\n        for( i =0; i < stream->output.deviceCount; ++i )\n        {\n            mmresult = waveOutReset( ((HWAVEOUT*)stream->output.waveHandles)[i] );\n            if( mmresult != MMSYSERR_NOERROR )\n            {\n                result = paUnanticipatedHostError;\n                PA_MME_SET_LAST_WAVEOUT_ERROR( mmresult );\n            }\n        }\n    }\n\n    if( PA_IS_INPUT_STREAM_(stream) )\n    {\n        for( i=0; i < stream->input.deviceCount; ++i )\n        {\n            mmresult = waveInReset( ((HWAVEIN*)stream->input.waveHandles)[i] );\n            if( mmresult != MMSYSERR_NOERROR )\n            {\n                result = paUnanticipatedHostError;\n                PA_MME_SET_LAST_WAVEIN_ERROR( mmresult );\n            }\n        }\n    }\n\n    stream->isStopped = 1;\n    stream->isActive = 0;\n\n    return result;\n}\n\n\nstatic PaError AbortStream( PaStream *s )\n{\n    PaError result = paNoError;\n    PaWinMmeStream *stream = (PaWinMmeStream*)s;\n    int timeout;\n    DWORD waitResult;\n    MMRESULT mmresult;\n    unsigned int i;\n\n    /** @todo\n        REVIEW: the error checking in this function needs review. the basic\n        idea is to return from this function in a known state - for example\n        there is no point avoiding calling waveInReset just because\n        the thread times out.\n    */\n\n    if( stream->processingThread )\n    {\n        /* callback stream */\n\n        /* Tell processing thread to abort immediately */\n        stream->abortProcessing = 1;\n        SetEvent( stream->abortEvent );\n    }\n\n\n    if( PA_IS_OUTPUT_STREAM_(stream) )\n    {\n        for( i =0; i < stream->output.deviceCount; ++i )\n        {\n            mmresult = waveOutReset( ((HWAVEOUT*)stream->output.waveHandles)[i] );\n            if( mmresult != MMSYSERR_NOERROR )\n            {\n                PA_MME_SET_LAST_WAVEOUT_ERROR( mmresult );\n                return paUnanticipatedHostError;\n            }\n        }\n    }\n\n    if( PA_IS_INPUT_STREAM_(stream) )\n    {\n        for( i=0; i < stream->input.deviceCount; ++i )\n        {\n            mmresult = waveInReset( ((HWAVEIN*)stream->input.waveHandles)[i] );\n            if( mmresult != MMSYSERR_NOERROR )\n            {\n                PA_MME_SET_LAST_WAVEIN_ERROR( mmresult );\n                return paUnanticipatedHostError;\n            }\n        }\n    }\n\n\n    if( stream->processingThread )\n    {\n        /* callback stream */\n\n        PA_DEBUG((\"WinMME AbortStream: waiting for background thread.\\n\"));\n\n        /* Calculate timeOut longer than longest time it could take to return all buffers. */\n        timeout = (int)(stream->allBuffersDurationMs * 1.5);\n        if( timeout < PA_MME_MIN_TIMEOUT_MSEC_ )\n            timeout = PA_MME_MIN_TIMEOUT_MSEC_;\n\n        waitResult = WaitForSingleObject( stream->processingThread, timeout );\n        if( waitResult == WAIT_TIMEOUT )\n        {\n            PA_DEBUG((\"WinMME AbortStream: timed out while waiting for background thread to finish.\\n\"));\n            return paTimedOut;\n        }\n\n        CloseHandle( stream->processingThread );\n        stream->processingThread = NULL;\n    }\n\n    stream->isStopped = 1;\n    stream->isActive = 0;\n\n    return result;\n}\n\n\nstatic PaError IsStreamStopped( PaStream *s )\n{\n    PaWinMmeStream *stream = (PaWinMmeStream*)s;\n\n    return stream->isStopped;\n}\n\n\nstatic PaError IsStreamActive( PaStream *s )\n{\n    PaWinMmeStream *stream = (PaWinMmeStream*)s;\n\n    return stream->isActive;\n}\n\n\nstatic PaTime GetStreamTime( PaStream *s )\n{\n    (void) s; /* unused parameter */\n\n    return PaUtil_GetTime();\n}\n\n\nstatic double GetStreamCpuLoad( PaStream* s )\n{\n    PaWinMmeStream *stream = (PaWinMmeStream*)s;\n\n    return PaUtil_GetCpuLoad( &stream->cpuLoadMeasurer );\n}\n\n\n/*\n    As separate stream interfaces are used for blocking and callback\n    streams, the following functions can be guaranteed to only be called\n    for blocking streams.\n*/\n\nstatic PaError ReadStream( PaStream* s,\n                           void *buffer,\n                           unsigned long frames )\n{\n    PaError result = paNoError;\n    PaWinMmeStream *stream = (PaWinMmeStream*)s;\n    void *userBuffer;\n    unsigned long framesRead = 0;\n    unsigned long framesProcessed;\n    signed int hostInputBufferIndex;\n    DWORD waitResult;\n    DWORD timeout = (unsigned long)(stream->allBuffersDurationMs * 0.5);\n    unsigned int channel, i;\n\n    if( PA_IS_INPUT_STREAM_(stream) )\n    {\n        /* make a local copy of the user buffer pointer(s). this is necessary\n            because PaUtil_CopyInput() advances these pointers every time\n            it is called.\n        */\n        if( stream->bufferProcessor.userInputIsInterleaved )\n        {\n            userBuffer = buffer;\n        }\n        else\n        {\n            userBuffer = (void*)alloca( sizeof(void*) * stream->bufferProcessor.inputChannelCount );\n            if( !userBuffer )\n                return paInsufficientMemory;\n            for( i = 0; i<stream->bufferProcessor.inputChannelCount; ++i )\n                ((void**)userBuffer)[i] = ((void**)buffer)[i];\n        }\n\n        do{\n            if( CurrentInputBuffersAreDone( stream ) )\n            {\n                if( NoBuffersAreQueued( &stream->input ) )\n                {\n                    /** @todo REVIEW: consider what to do if the input overflows.\n                        do we requeue all of the buffers? should we be running\n                        a thread to make sure they are always queued?\n                        see: http://www.portaudio.com/trac/ticket/117\n                        */\n\n                    result = paInputOverflowed;\n                }\n\n                hostInputBufferIndex = stream->input.currentBufferIndex;\n\n                PaUtil_SetInputFrameCount( &stream->bufferProcessor,\n                        stream->input.framesPerBuffer - stream->input.framesUsedInCurrentBuffer );\n\n                channel = 0;\n                for( i=0; i<stream->input.deviceCount; ++i )\n                {\n                    /* we have stored the number of channels in the buffer in dwUser */\n                    int channelCount = (int)stream->input.waveHeaders[i][ hostInputBufferIndex ].dwUser;\n\n                    PaUtil_SetInterleavedInputChannels( &stream->bufferProcessor, channel,\n                            stream->input.waveHeaders[i][ hostInputBufferIndex ].lpData +\n                                stream->input.framesUsedInCurrentBuffer * channelCount *\n                                stream->bufferProcessor.bytesPerHostInputSample,\n                            channelCount );\n\n                    channel += channelCount;\n                }\n\n                framesProcessed = PaUtil_CopyInput( &stream->bufferProcessor, &userBuffer, frames - framesRead );\n\n                stream->input.framesUsedInCurrentBuffer += framesProcessed;\n                if( stream->input.framesUsedInCurrentBuffer == stream->input.framesPerBuffer )\n                {\n                    result = AdvanceToNextInputBuffer( stream );\n                    if( result != paNoError )\n                        break;\n                }\n\n                framesRead += framesProcessed;\n\n            }else{\n                /* wait for MME to signal that a buffer is available */\n                waitResult = WaitForSingleObject( stream->input.bufferEvent, timeout );\n                if( waitResult == WAIT_FAILED )\n                {\n                    result = paUnanticipatedHostError;\n                    break;\n                }\n                else if( waitResult == WAIT_TIMEOUT )\n                {\n                    /* if a timeout is encountered, continue,\n                        perhaps we should give up eventually\n                    */\n                }\n            }\n        }while( framesRead < frames );\n    }\n    else\n    {\n        result = paCanNotReadFromAnOutputOnlyStream;\n    }\n\n    return result;\n}\n\n\nstatic PaError WriteStream( PaStream* s,\n                            const void *buffer,\n                            unsigned long frames )\n{\n    PaError result = paNoError;\n    PaWinMmeStream *stream = (PaWinMmeStream*)s;\n    const void *userBuffer;\n    unsigned long framesWritten = 0;\n    unsigned long framesProcessed;\n    signed int hostOutputBufferIndex;\n    DWORD waitResult;\n    DWORD timeout = (unsigned long)(stream->allBuffersDurationMs * 0.5);\n    unsigned int channel, i;\n\n\n    if( PA_IS_OUTPUT_STREAM_(stream) )\n    {\n        /* make a local copy of the user buffer pointer(s). this is necessary\n            because PaUtil_CopyOutput() advances these pointers every time\n            it is called.\n        */\n        if( stream->bufferProcessor.userOutputIsInterleaved )\n        {\n            userBuffer = buffer;\n        }\n        else\n        {\n            userBuffer = (const void*)alloca( sizeof(void*) * stream->bufferProcessor.outputChannelCount );\n            if( !userBuffer )\n                return paInsufficientMemory;\n            for( i = 0; i<stream->bufferProcessor.outputChannelCount; ++i )\n                ((const void**)userBuffer)[i] = ((const void**)buffer)[i];\n        }\n\n        do{\n            if( CurrentOutputBuffersAreDone( stream ) )\n            {\n                if( NoBuffersAreQueued( &stream->output ) )\n                {\n                    /** @todo REVIEW: consider what to do if the output\n                    underflows. do we requeue all the existing buffers with\n                    zeros? should we run a separate thread to keep the buffers\n                    enqueued at all times?\n                    see: http://www.portaudio.com/trac/ticket/117\n                    */\n\n                    result = paOutputUnderflowed;\n                }\n\n                hostOutputBufferIndex = stream->output.currentBufferIndex;\n\n                PaUtil_SetOutputFrameCount( &stream->bufferProcessor,\n                        stream->output.framesPerBuffer - stream->output.framesUsedInCurrentBuffer );\n\n                channel = 0;\n                for( i=0; i<stream->output.deviceCount; ++i )\n                {\n                    /* we have stored the number of channels in the buffer in dwUser */\n                    int channelCount = (int)stream->output.waveHeaders[i][ hostOutputBufferIndex ].dwUser;\n\n                    PaUtil_SetInterleavedOutputChannels( &stream->bufferProcessor, channel,\n                            stream->output.waveHeaders[i][ hostOutputBufferIndex ].lpData +\n                                stream->output.framesUsedInCurrentBuffer * channelCount *\n                                stream->bufferProcessor.bytesPerHostOutputSample,\n                            channelCount );\n\n                    channel += channelCount;\n                }\n\n                framesProcessed = PaUtil_CopyOutput( &stream->bufferProcessor, &userBuffer, frames - framesWritten );\n\n                stream->output.framesUsedInCurrentBuffer += framesProcessed;\n                if( stream->output.framesUsedInCurrentBuffer == stream->output.framesPerBuffer )\n                {\n                    result = AdvanceToNextOutputBuffer( stream );\n                    if( result != paNoError )\n                        break;\n                }\n\n                framesWritten += framesProcessed;\n            }\n            else\n            {\n                /* wait for MME to signal that a buffer is available */\n                waitResult = WaitForSingleObject( stream->output.bufferEvent, timeout );\n                if( waitResult == WAIT_FAILED )\n                {\n                    result = paUnanticipatedHostError;\n                    break;\n                }\n                else if( waitResult == WAIT_TIMEOUT )\n                {\n                    /* if a timeout is encountered, continue,\n                        perhaps we should give up eventually\n                    */\n                }\n            }\n        }while( framesWritten < frames );\n    }\n    else\n    {\n        result = paCanNotWriteToAnInputOnlyStream;\n    }\n\n    return result;\n}\n\n\nstatic signed long GetStreamReadAvailable( PaStream* s )\n{\n    PaWinMmeStream *stream = (PaWinMmeStream*)s;\n\n    if( PA_IS_INPUT_STREAM_(stream) )\n        return GetAvailableFrames( &stream->input );\n    else\n        return paCanNotReadFromAnOutputOnlyStream;\n}\n\n\nstatic signed long GetStreamWriteAvailable( PaStream* s )\n{\n    PaWinMmeStream *stream = (PaWinMmeStream*)s;\n\n    if( PA_IS_OUTPUT_STREAM_(stream) )\n        return GetAvailableFrames( &stream->output );\n    else\n        return paCanNotWriteToAnInputOnlyStream;\n}\n\n\n/* NOTE: the following functions are MME-stream specific, and are called directly\n    by client code. We need to check for many more error conditions here because\n    we don't have the benefit of pa_front.c's parameter checking.\n*/\n\nstatic PaError GetWinMMEStreamPointer( PaWinMmeStream **stream, PaStream *s )\n{\n    PaError result;\n    PaUtilHostApiRepresentation *hostApi;\n    PaWinMmeHostApiRepresentation *winMmeHostApi;\n\n    result = PaUtil_ValidateStreamPointer( s );\n    if( result != paNoError )\n        return result;\n\n    result = PaUtil_GetHostApiRepresentation( &hostApi, paMME );\n    if( result != paNoError )\n        return result;\n\n    winMmeHostApi = (PaWinMmeHostApiRepresentation*)hostApi;\n\n    /* note, the following would be easier if there was a generic way of testing\n        that a stream belongs to a specific host API */\n\n    if( PA_STREAM_REP( s )->streamInterface == &winMmeHostApi->callbackStreamInterface\n            || PA_STREAM_REP( s )->streamInterface == &winMmeHostApi->blockingStreamInterface )\n    {\n        /* s is a WinMME stream */\n        *stream = (PaWinMmeStream *)s;\n        return paNoError;\n    }\n    else\n    {\n        return paIncompatibleStreamHostApi;\n    }\n}\n\n\nint PaWinMME_GetStreamInputHandleCount( PaStream* s )\n{\n    PaWinMmeStream *stream;\n    PaError result = GetWinMMEStreamPointer( &stream, s );\n\n    if( result == paNoError )\n        return (PA_IS_INPUT_STREAM_(stream)) ? stream->input.deviceCount : 0;\n    else\n        return result;\n}\n\n\nHWAVEIN PaWinMME_GetStreamInputHandle( PaStream* s, int handleIndex )\n{\n    PaWinMmeStream *stream;\n    PaError result = GetWinMMEStreamPointer( &stream, s );\n\n    if( result == paNoError\n            && PA_IS_INPUT_STREAM_(stream)\n            && handleIndex >= 0\n            && (unsigned int)handleIndex < stream->input.deviceCount )\n        return ((HWAVEIN*)stream->input.waveHandles)[handleIndex];\n    else\n        return 0;\n}\n\n\nint PaWinMME_GetStreamOutputHandleCount( PaStream* s)\n{\n    PaWinMmeStream *stream;\n    PaError result = GetWinMMEStreamPointer( &stream, s );\n\n    if( result == paNoError )\n        return (PA_IS_OUTPUT_STREAM_(stream)) ? stream->output.deviceCount : 0;\n    else\n        return result;\n}\n\n\nHWAVEOUT PaWinMME_GetStreamOutputHandle( PaStream* s, int handleIndex )\n{\n    PaWinMmeStream *stream;\n    PaError result = GetWinMMEStreamPointer( &stream, s );\n\n    if( result == paNoError\n            && PA_IS_OUTPUT_STREAM_(stream)\n            && handleIndex >= 0\n            && (unsigned int)handleIndex < stream->output.deviceCount )\n        return ((HWAVEOUT*)stream->output.waveHandles)[handleIndex];\n    else\n        return 0;\n}\n"
  },
  {
    "path": "thirdparty/portaudio/src/os/unix/pa_unix_hostapis.c",
    "content": "/*\n * $Id$\n * Portable Audio I/O Library UNIX initialization table\n *\n * Based on the Open Source API proposed by Ross Bencina\n * Copyright (c) 1999-2002 Ross Bencina, Phil Burk\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n/** @file\n @ingroup unix_src\n*/\n\n#include \"pa_hostapi.h\"\n\nPaError PaJack_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index );\nPaError PaAlsa_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index );\nPaError PaOSS_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index );\n/* Added for IRIX, Pieter, oct 2, 2003: */\nPaError PaSGI_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index );\n/* Linux AudioScience HPI */\nPaError PaAsiHpi_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index );\nPaError PaMacCore_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index );\nPaError PaSkeleton_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index );\n\n/** Note that on Linux, ALSA is placed before OSS so that the former is preferred over the latter.\n */\n\nPaUtilHostApiInitializer *paHostApiInitializers[] =\n    {\n#ifdef __linux__\n\n#if PA_USE_ALSA\n        PaAlsa_Initialize,\n#endif\n\n#if PA_USE_OSS\n        PaOSS_Initialize,\n#endif\n\n#else   /* __linux__ */\n\n#if PA_USE_OSS\n        PaOSS_Initialize,\n#endif\n\n#if PA_USE_ALSA\n        PaAlsa_Initialize,\n#endif\n\n#endif  /* __linux__ */\n\n#if PA_USE_JACK\n        PaJack_Initialize,\n#endif\n                    /* Added for IRIX, Pieter, oct 2, 2003: */\n#if PA_USE_SGI\n        PaSGI_Initialize,\n#endif\n\n#if PA_USE_ASIHPI\n        PaAsiHpi_Initialize,\n#endif\n\n#if PA_USE_COREAUDIO\n        PaMacCore_Initialize,\n#endif\n\n#if PA_USE_SKELETON\n        PaSkeleton_Initialize,\n#endif\n\n        0   /* NULL terminated array */\n    };\n"
  },
  {
    "path": "thirdparty/portaudio/src/os/unix/pa_unix_util.c",
    "content": "/*\n * $Id$\n * Portable Audio I/O Library\n * UNIX platform-specific support functions\n *\n * Based on the Open Source API proposed by Ross Bencina\n * Copyright (c) 1999-2000 Ross Bencina\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n/** @file\n @ingroup unix_src\n*/\n\n#include <pthread.h>\n#include <unistd.h>\n#include <stdlib.h>\n#include <time.h>\n#include <sys/time.h>\n#include <assert.h>\n#include <string.h> /* For memset */\n#include <math.h>\n#include <errno.h>\n\n#if defined(__APPLE__) && !defined(HAVE_MACH_ABSOLUTE_TIME)\n#define HAVE_MACH_ABSOLUTE_TIME\n#endif\n#ifdef HAVE_MACH_ABSOLUTE_TIME\n#include <mach/mach_time.h>\n#endif\n\n#include \"pa_util.h\"\n#include \"pa_unix_util.h\"\n#include \"pa_debugprint.h\"\n\n/*\n   Track memory allocations to avoid leaks.\n */\n\n#if PA_TRACK_MEMORY\nstatic int numAllocations_ = 0;\n#endif\n\n\nvoid *PaUtil_AllocateMemory( long size )\n{\n    void *result = malloc( size );\n\n#if PA_TRACK_MEMORY\n    if( result != NULL ) numAllocations_ += 1;\n#endif\n    return result;\n}\n\n\nvoid PaUtil_FreeMemory( void *block )\n{\n    if( block != NULL )\n    {\n        free( block );\n#if PA_TRACK_MEMORY\n        numAllocations_ -= 1;\n#endif\n\n    }\n}\n\n\nint PaUtil_CountCurrentlyAllocatedBlocks( void )\n{\n#if PA_TRACK_MEMORY\n    return numAllocations_;\n#else\n    return 0;\n#endif\n}\n\n\nvoid Pa_Sleep( long msec )\n{\n#ifdef HAVE_NANOSLEEP\n    struct timespec req = {0}, rem = {0};\n    PaTime time = msec / 1.e3;\n    req.tv_sec = (time_t)time;\n    assert(time - req.tv_sec < 1.0);\n    req.tv_nsec = (long)((time - req.tv_sec) * 1.e9);\n    nanosleep(&req, &rem);\n    /* XXX: Try sleeping the remaining time (contained in rem) if interrupted by a signal? */\n#else\n    while( msec > 999 )     /* For OpenBSD and IRIX, argument */\n        {                   /* to usleep must be < 1000000.   */\n        usleep( 999000 );\n        msec -= 999;\n        }\n    usleep( msec * 1000 );\n#endif\n}\n\n#ifdef HAVE_MACH_ABSOLUTE_TIME\n/*\n    Discussion on the CoreAudio mailing list suggests that calling\n    gettimeofday (or anything else in the BSD layer) is not real-time\n    safe, so we use mach_absolute_time on OSX. This implementation is\n    based on these two links:\n\n    Technical Q&A QA1398 - Mach Absolute Time Units\n    http://developer.apple.com/mac/library/qa/qa2004/qa1398.html\n\n    Tutorial: Performance and Time.\n    http://www.macresearch.org/tutorial_performance_and_time\n*/\n\n/* Scaler to convert the result of mach_absolute_time to seconds */\nstatic double machSecondsConversionScaler_ = 0.0;\n#endif\n\nvoid PaUtil_InitializeClock( void )\n{\n#ifdef HAVE_MACH_ABSOLUTE_TIME\n    mach_timebase_info_data_t info;\n    kern_return_t err = mach_timebase_info( &info );\n    if( err == 0  )\n        machSecondsConversionScaler_ = 1e-9 * (double) info.numer / (double) info.denom;\n#endif\n}\n\n\nPaTime PaUtil_GetTime( void )\n{\n#ifdef HAVE_MACH_ABSOLUTE_TIME\n    return mach_absolute_time() * machSecondsConversionScaler_;\n#elif defined(HAVE_CLOCK_GETTIME)\n    struct timespec tp;\n    clock_gettime(CLOCK_REALTIME, &tp);\n    return (PaTime)(tp.tv_sec + tp.tv_nsec * 1e-9);\n#else\n    struct timeval tv;\n    gettimeofday( &tv, NULL );\n    return (PaTime) tv.tv_usec * 1e-6 + tv.tv_sec;\n#endif\n}\n\nPaError PaUtil_InitializeThreading( PaUtilThreading *threading )\n{\n    (void) paUtilErr_;\n    return paNoError;\n}\n\nvoid PaUtil_TerminateThreading( PaUtilThreading *threading )\n{\n}\n\nPaError PaUtil_StartThreading( PaUtilThreading *threading, void *(*threadRoutine)(void *), void *data )\n{\n    pthread_create( &threading->callbackThread, NULL, threadRoutine, data );\n    return paNoError;\n}\n\nPaError PaUtil_CancelThreading( PaUtilThreading *threading, int wait, PaError *exitResult )\n{\n    PaError result = paNoError;\n    void *pret;\n\n    if( exitResult )\n        *exitResult = paNoError;\n\n    /* If pthread_cancel is not supported (Android platform) whole this function can lead to indefinite waiting if\n       working thread (callbackThread) has'n received any stop signals from outside, please keep\n       this in mind when considering using PaUtil_CancelThreading\n    */\n#ifdef PTHREAD_CANCELED\n    /* Only kill the thread if it isn't in the process of stopping (flushing adaptation buffers) */\n    if( !wait )\n        pthread_cancel( threading->callbackThread );   /* XXX: Safe to call this if the thread has exited on its own? */\n#endif\n    pthread_join( threading->callbackThread, &pret );\n\n#ifdef PTHREAD_CANCELED\n    if( pret && PTHREAD_CANCELED != pret )\n#else\n    /* !wait means the thread may have been canceled */\n    if( pret && wait )\n#endif\n    {\n        if( exitResult )\n            *exitResult = *(PaError *) pret;\n        free( pret );\n    }\n\n    return result;\n}\n\n/* Threading */\n/* paUnixMainThread\n * We have to be a bit careful with defining this global variable,\n * as explained below. */\n#ifdef __APPLE__\n/* apple/gcc has a \"problem\" with global vars and dynamic libs.\n   Initializing it seems to fix the problem.\n   Described a bit in this thread:\n   http://gcc.gnu.org/ml/gcc/2005-06/msg00179.html\n*/\npthread_t paUnixMainThread = 0;\n#else\n/*pthreads are opaque. We don't know that assigning it an int value\n  always makes sense, so we don't initialize it unless we have to.*/\npthread_t paUnixMainThread = 0;\n#endif\n\nPaError PaUnixThreading_Initialize( void )\n{\n    paUnixMainThread = pthread_self();\n    return paNoError;\n}\n\nstatic PaError BoostPriority( PaUnixThread* self )\n{\n    PaError result = paNoError;\n    struct sched_param spm = { 0 };\n    /* Priority should only matter between contending FIFO threads? */\n    spm.sched_priority = 1;\n\n    assert( self );\n\n    if( pthread_setschedparam( self->thread, SCHED_FIFO, &spm ) != 0 )\n    {\n        PA_UNLESS( errno == EPERM, paInternalError );  /* Lack permission to raise priority */\n        PA_DEBUG(( \"Failed bumping priority\\n\" ));\n        result = 0;\n    }\n    else\n    {\n        result = 1; /* Success */\n    }\nerror:\n    return result;\n}\n\nPaError PaUnixThread_New( PaUnixThread* self, void* (*threadFunc)( void* ), void* threadArg, PaTime waitForChild,\n        int rtSched )\n{\n    PaError result = paNoError;\n    pthread_attr_t attr;\n    int started = 0;\n\n    memset( self, 0, sizeof (PaUnixThread) );\n    PaUnixMutex_Initialize( &self->mtx );\n    PA_ASSERT_CALL( pthread_cond_init( &self->cond, NULL ), 0 );\n\n    self->parentWaiting = 0 != waitForChild;\n\n    /* Spawn thread */\n\n/* Temporarily disabled since we should test during configuration for presence of required mman.h header */\n#if 0\n#if defined _POSIX_MEMLOCK && (_POSIX_MEMLOCK != -1)\n    if( rtSched )\n    {\n        if( mlockall( MCL_CURRENT | MCL_FUTURE ) < 0 )\n        {\n            int savedErrno = errno;             /* In case errno gets overwritten */\n            assert( savedErrno != EINVAL );     /* Most likely a programmer error */\n            PA_UNLESS( (savedErrno == EPERM), paInternalError );\n            PA_DEBUG(( \"%s: Failed locking memory\\n\", __FUNCTION__ ));\n        }\n        else\n            PA_DEBUG(( \"%s: Successfully locked memory\\n\", __FUNCTION__ ));\n    }\n#endif\n#endif\n\n    PA_UNLESS( !pthread_attr_init( &attr ), paInternalError );\n    /* Priority relative to other processes */\n    PA_UNLESS( !pthread_attr_setscope( &attr, PTHREAD_SCOPE_SYSTEM ), paInternalError );\n\n    PA_UNLESS( !pthread_create( &self->thread, &attr, threadFunc, threadArg ), paInternalError );\n    started = 1;\n\n    if( rtSched )\n    {\n#if 0\n        if( self->useWatchdog )\n        {\n            int err;\n            struct sched_param wdSpm = { 0 };\n            /* Launch watchdog, watchdog sets callback thread priority */\n            int prio = PA_MIN( self->rtPrio + 4, sched_get_priority_max( SCHED_FIFO ) );\n            wdSpm.sched_priority = prio;\n\n            PA_UNLESS( !pthread_attr_init( &attr ), paInternalError );\n            PA_UNLESS( !pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED ), paInternalError );\n            PA_UNLESS( !pthread_attr_setscope( &attr, PTHREAD_SCOPE_SYSTEM ), paInternalError );\n            PA_UNLESS( !pthread_attr_setschedpolicy( &attr, SCHED_FIFO ), paInternalError );\n            PA_UNLESS( !pthread_attr_setschedparam( &attr, &wdSpm ), paInternalError );\n            if( (err = pthread_create( &self->watchdogThread, &attr, &WatchdogFunc, self )) )\n            {\n                PA_UNLESS( err == EPERM, paInternalError );\n                /* Permission error, go on without realtime privileges */\n                PA_DEBUG(( \"Failed bumping priority\\n\" ));\n            }\n            else\n            {\n                int policy;\n                self->watchdogRunning = 1;\n                PA_ENSURE_SYSTEM( pthread_getschedparam( self->watchdogThread, &policy, &wdSpm ), 0 );\n                /* Check if priority is right, policy could potentially differ from SCHED_FIFO (but that's alright) */\n                if( wdSpm.sched_priority != prio )\n                {\n                    PA_DEBUG(( \"Watchdog priority not set correctly (%d)\\n\", wdSpm.sched_priority ));\n                    PA_ENSURE( paInternalError );\n                }\n            }\n        }\n        else\n#endif\n            PA_ENSURE( BoostPriority( self ) );\n\n        {\n            int policy;\n            struct sched_param spm;\n            pthread_getschedparam(self->thread, &policy, &spm);\n        }\n    }\n\n    if( self->parentWaiting )\n    {\n        PaTime till;\n        struct timespec ts;\n        int res = 0;\n        PaTime now;\n\n        PA_ENSURE( PaUnixMutex_Lock( &self->mtx ) );\n\n        /* Wait for stream to be started */\n        now = PaUtil_GetTime();\n        till = now + waitForChild;\n\n        while( self->parentWaiting && !res )\n        {\n            if( waitForChild > 0 )\n            {\n                ts.tv_sec = (time_t) floor( till );\n                ts.tv_nsec = (long) ((till - floor( till )) * 1e9);\n                res = pthread_cond_timedwait( &self->cond, &self->mtx.mtx, &ts );\n            }\n            else\n            {\n                res = pthread_cond_wait( &self->cond, &self->mtx.mtx );\n            }\n        }\n\n        PA_ENSURE( PaUnixMutex_Unlock( &self->mtx ) );\n\n        PA_UNLESS( !res || ETIMEDOUT == res, paInternalError );\n        PA_DEBUG(( \"%s: Waited for %g seconds for stream to start\\n\", __FUNCTION__, PaUtil_GetTime() - now ));\n        if( ETIMEDOUT == res )\n        {\n            PA_ENSURE( paTimedOut );\n        }\n    }\n\nend:\n    return result;\nerror:\n    if( started )\n    {\n        PaUnixThread_Terminate( self, 0, NULL );\n    }\n\n    goto end;\n}\n\nPaError PaUnixThread_Terminate( PaUnixThread* self, int wait, PaError* exitResult )\n{\n    PaError result = paNoError;\n    void* pret;\n\n    if( exitResult )\n    {\n        *exitResult = paNoError;\n    }\n#if 0\n    if( watchdogExitResult )\n        *watchdogExitResult = paNoError;\n\n    if( th->watchdogRunning )\n    {\n        pthread_cancel( th->watchdogThread );\n        PA_ENSURE_SYSTEM( pthread_join( th->watchdogThread, &pret ), 0 );\n\n        if( pret && pret != PTHREAD_CANCELED )\n        {\n            if( watchdogExitResult )\n                *watchdogExitResult = *(PaError *) pret;\n            free( pret );\n        }\n    }\n#endif\n\n    /* Only kill the thread if it isn't in the process of stopping (flushing adaptation buffers) */\n    /* TODO: Make join time out */\n    self->stopRequested = wait;\n    if( !wait )\n    {\n        PA_DEBUG(( \"%s: Canceling thread %d\\n\", __FUNCTION__, self->thread ));\n        /* XXX: Safe to call this if the thread has exited on its own? */\n#ifdef PTHREAD_CANCELED\n        pthread_cancel( self->thread );\n#endif\n    }\n    PA_DEBUG(( \"%s: Joining thread %d\\n\", __FUNCTION__, self->thread ));\n    PA_ENSURE_SYSTEM( pthread_join( self->thread, &pret ), 0 );\n\n#ifdef PTHREAD_CANCELED\n    if( pret && PTHREAD_CANCELED != pret )\n#else\n    /* !wait means the thread may have been canceled */\n    if( pret && wait )\n#endif\n    {\n        if( exitResult )\n        {\n            *exitResult = *(PaError*)pret;\n        }\n        free( pret );\n    }\n\nerror:\n    PA_ASSERT_CALL( PaUnixMutex_Terminate( &self->mtx ), paNoError );\n    PA_ASSERT_CALL( pthread_cond_destroy( &self->cond ), 0 );\n\n    return result;\n}\n\nPaError PaUnixThread_PrepareNotify( PaUnixThread* self )\n{\n    PaError result = paNoError;\n    PA_UNLESS( self->parentWaiting, paInternalError );\n\n    PA_ENSURE( PaUnixMutex_Lock( &self->mtx ) );\n    self->locked = 1;\n\nerror:\n    return result;\n}\n\nPaError PaUnixThread_NotifyParent( PaUnixThread* self )\n{\n    PaError result = paNoError;\n    PA_UNLESS( self->parentWaiting, paInternalError );\n\n    if( !self->locked )\n    {\n        PA_ENSURE( PaUnixMutex_Lock( &self->mtx ) );\n        self->locked = 1;\n    }\n    self->parentWaiting = 0;\n    pthread_cond_signal( &self->cond );\n    PA_ENSURE( PaUnixMutex_Unlock( &self->mtx ) );\n    self->locked = 0;\n\nerror:\n    return result;\n}\n\nint PaUnixThread_StopRequested( PaUnixThread* self )\n{\n    return self->stopRequested;\n}\n\nPaError PaUnixMutex_Initialize( PaUnixMutex* self )\n{\n    PaError result = paNoError;\n    PA_ASSERT_CALL( pthread_mutex_init( &self->mtx, NULL ), 0 );\n    return result;\n}\n\nPaError PaUnixMutex_Terminate( PaUnixMutex* self )\n{\n    PaError result = paNoError;\n    PA_ASSERT_CALL( pthread_mutex_destroy( &self->mtx ), 0 );\n    return result;\n}\n\n/** Lock mutex.\n *\n * We're disabling thread cancellation while the thread is holding a lock, so mutexes are\n * properly unlocked at termination time.\n */\nPaError PaUnixMutex_Lock( PaUnixMutex* self )\n{\n    PaError result = paNoError;\n\n#ifdef PTHREAD_CANCEL\n    int oldState;\n    PA_ENSURE_SYSTEM( pthread_setcancelstate( PTHREAD_CANCEL_DISABLE, &oldState ), 0 );\n#endif\n    PA_ENSURE_SYSTEM( pthread_mutex_lock( &self->mtx ), 0 );\n\nerror:\n    return result;\n}\n\n/** Unlock mutex.\n *\n * Thread cancellation is enabled again after the mutex is properly unlocked.\n */\nPaError PaUnixMutex_Unlock( PaUnixMutex* self )\n{\n    PaError result = paNoError;\n\n    PA_ENSURE_SYSTEM( pthread_mutex_unlock( &self->mtx ), 0 );\n#ifdef PTHREAD_CANCEL\n    int oldState;\n    PA_ENSURE_SYSTEM( pthread_setcancelstate( PTHREAD_CANCEL_ENABLE, &oldState ), 0 );\n#endif\n\nerror:\n    return result;\n}\n\n\n#if 0\nstatic void OnWatchdogExit( void *userData )\n{\n    PaAlsaThreading *th = (PaAlsaThreading *) userData;\n    struct sched_param spm = { 0 };\n    assert( th );\n\n    PA_ASSERT_CALL( pthread_setschedparam( th->callbackThread, SCHED_OTHER, &spm ), 0 );    /* Lower before exiting */\n    PA_DEBUG(( \"Watchdog exiting\\n\" ));\n}\n\nstatic void *WatchdogFunc( void *userData )\n{\n    PaError result = paNoError, *pres = NULL;\n    int err;\n    PaAlsaThreading *th = (PaAlsaThreading *) userData;\n    unsigned intervalMsec = 500;\n    const PaTime maxSeconds = 3.;   /* Max seconds between callbacks */\n    PaTime timeThen = PaUtil_GetTime(), timeNow, timeElapsed, cpuTimeThen, cpuTimeNow, cpuTimeElapsed;\n    double cpuLoad, avgCpuLoad = 0.;\n    int throttled = 0;\n\n    assert( th );\n\n    /* Execute OnWatchdogExit when exiting */\n    pthread_cleanup_push( &OnWatchdogExit, th );\n\n    /* Boost priority of callback thread */\n    PA_ENSURE( result = BoostPriority( th ) );\n    if( !result )\n    {\n        /* Boost failed, might as well exit */\n        pthread_exit( NULL );\n    }\n\n    cpuTimeThen = th->callbackCpuTime;\n    {\n        int policy;\n        struct sched_param spm = { 0 };\n        pthread_getschedparam( pthread_self(), &policy, &spm );\n        PA_DEBUG(( \"%s: Watchdog priority is %d\\n\", __FUNCTION__, spm.sched_priority ));\n    }\n\n    while( 1 )\n    {\n        double lowpassCoeff = 0.9, lowpassCoeff1 = 0.99999 - lowpassCoeff;\n\n        /* Test before and after in case whatever underlying sleep call isn't interrupted by pthread_cancel */\n        pthread_testcancel();\n        Pa_Sleep( intervalMsec );\n        pthread_testcancel();\n\n        if( PaUtil_GetTime() - th->callbackTime > maxSeconds )\n        {\n            PA_DEBUG(( \"Watchdog: Terminating callback thread\\n\" ));\n            /* Tell thread to terminate */\n            err = pthread_kill( th->callbackThread, SIGKILL );\n            pthread_exit( NULL );\n        }\n\n        PA_DEBUG(( \"%s: PortAudio reports CPU load: %g\\n\", __FUNCTION__, PaUtil_GetCpuLoad( th->cpuLoadMeasurer ) ));\n\n        /* Check if we should throttle, or unthrottle :P */\n        cpuTimeNow = th->callbackCpuTime;\n        cpuTimeElapsed = cpuTimeNow - cpuTimeThen;\n        cpuTimeThen = cpuTimeNow;\n\n        timeNow = PaUtil_GetTime();\n        timeElapsed = timeNow - timeThen;\n        timeThen = timeNow;\n        cpuLoad = cpuTimeElapsed / timeElapsed;\n        avgCpuLoad = avgCpuLoad * lowpassCoeff + cpuLoad * lowpassCoeff1;\n        /*\n        if( throttled )\n            PA_DEBUG(( \"Watchdog: CPU load: %g, %g\\n\", avgCpuLoad, cpuTimeElapsed ));\n            */\n        if( PaUtil_GetCpuLoad( th->cpuLoadMeasurer ) > .925 )\n        {\n            static int policy;\n            static struct sched_param spm = { 0 };\n            static const struct sched_param defaultSpm = { 0 };\n            PA_DEBUG(( \"%s: Throttling audio thread, priority %d\\n\", __FUNCTION__, spm.sched_priority ));\n\n            pthread_getschedparam( th->callbackThread, &policy, &spm );\n            if( !pthread_setschedparam( th->callbackThread, SCHED_OTHER, &defaultSpm ) )\n            {\n                throttled = 1;\n            }\n            else\n                PA_DEBUG(( \"Watchdog: Couldn't lower priority of audio thread: %s\\n\", strerror( errno ) ));\n\n            /* Give other processes a go, before raising priority again */\n            PA_DEBUG(( \"%s: Watchdog sleeping for %lu msecs before unthrottling\\n\", __FUNCTION__, th->throttledSleepTime ));\n            Pa_Sleep( th->throttledSleepTime );\n\n            /* Reset callback priority */\n            if( pthread_setschedparam( th->callbackThread, SCHED_FIFO, &spm ) != 0 )\n            {\n                PA_DEBUG(( \"%s: Couldn't raise priority of audio thread: %s\\n\", __FUNCTION__, strerror( errno ) ));\n            }\n\n            if( PaUtil_GetCpuLoad( th->cpuLoadMeasurer ) >= .99 )\n                intervalMsec = 50;\n            else\n                intervalMsec = 100;\n\n            /*\n            lowpassCoeff = .97;\n            lowpassCoeff1 = .99999 - lowpassCoeff;\n            */\n        }\n        else if( throttled && avgCpuLoad < .8 )\n        {\n            intervalMsec = 500;\n            throttled = 0;\n\n            /*\n            lowpassCoeff = .9;\n            lowpassCoeff1 = .99999 - lowpassCoeff;\n            */\n        }\n    }\n\n    pthread_cleanup_pop( 1 );   /* Execute cleanup on exit */\n\nerror:\n    /* Shouldn't get here in the normal case */\n\n    /* Pass on error code */\n    pres = malloc( sizeof (PaError) );\n    *pres = result;\n\n    pthread_exit( pres );\n}\n\nstatic void CallbackUpdate( PaAlsaThreading *th )\n{\n    th->callbackTime = PaUtil_GetTime();\n    th->callbackCpuTime = PaUtil_GetCpuLoad( th->cpuLoadMeasurer );\n}\n\n/*\nstatic void *CanaryFunc( void *userData )\n{\n    const unsigned intervalMsec = 1000;\n    PaUtilThreading *th = (PaUtilThreading *) userData;\n\n    while( 1 )\n    {\n        th->canaryTime = PaUtil_GetTime();\n\n        pthread_testcancel();\n        Pa_Sleep( intervalMsec );\n    }\n\n    pthread_exit( NULL );\n}\n*/\n#endif\n"
  },
  {
    "path": "thirdparty/portaudio/src/os/unix/pa_unix_util.h",
    "content": "/*\n * $Id$\n * Portable Audio I/O Library\n * UNIX platform-specific support functions\n *\n * Based on the Open Source API proposed by Ross Bencina\n * Copyright (c) 1999-2000 Ross Bencina\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n/** @file\n @ingroup unix_src\n*/\n\n#ifndef PA_UNIX_UTIL_H\n#define PA_UNIX_UTIL_H\n\n#include \"pa_cpuload.h\"\n#include <assert.h>\n#include <pthread.h>\n#include <signal.h>\n\n#ifdef __cplusplus\nextern \"C\"\n{\n#endif /* __cplusplus */\n\n#define PA_MIN(x,y) ( (x) < (y) ? (x) : (y) )\n#define PA_MAX(x,y) ( (x) > (y) ? (x) : (y) )\n\n/* Utilize GCC branch prediction for error tests */\n#if defined __GNUC__ && __GNUC__ >= 3\n#define UNLIKELY(expr) __builtin_expect( (expr), 0 )\n#else\n#define UNLIKELY(expr) (expr)\n#endif\n\n#define STRINGIZE_HELPER(expr) #expr\n#define STRINGIZE(expr) STRINGIZE_HELPER(expr)\n\n#define PA_UNLESS(expr, code) \\\n    do { \\\n        if( UNLIKELY( (expr) == 0 ) ) \\\n        { \\\n            PaUtil_DebugPrint(( \"Expression '\" #expr \"' failed in '\" __FILE__ \"', line: \" STRINGIZE( __LINE__ ) \"\\n\" )); \\\n            result = (code); \\\n            goto error; \\\n        } \\\n    } while (0);\n\nstatic PaError paUtilErr_;          /* Used with PA_ENSURE */\n\n/* Check PaError */\n#define PA_ENSURE(expr) \\\n    do { \\\n        if( UNLIKELY( (paUtilErr_ = (expr)) < paNoError ) ) \\\n        { \\\n            PaUtil_DebugPrint(( \"Expression '\" #expr \"' failed in '\" __FILE__ \"', line: \" STRINGIZE( __LINE__ ) \"\\n\" )); \\\n            result = paUtilErr_; \\\n            goto error; \\\n        } \\\n    } while (0);\n\n#define PA_ASSERT_CALL(expr, success) \\\n    paUtilErr_ = (expr); \\\n    assert( success == paUtilErr_ );\n\n#define PA_ENSURE_SYSTEM(expr, success) \\\n    do { \\\n        if( UNLIKELY( (paUtilErr_ = (expr)) != success ) ) \\\n        { \\\n            /* PaUtil_SetLastHostErrorInfo should only be used in the main thread */ \\\n            if( pthread_equal(pthread_self(), paUnixMainThread) ) \\\n            { \\\n                PaUtil_SetLastHostErrorInfo( paALSA, paUtilErr_, strerror( paUtilErr_ ) ); \\\n            } \\\n            PaUtil_DebugPrint( \"Expression '\" #expr \"' failed in '\" __FILE__ \"', line: \" STRINGIZE( __LINE__ ) \"\\n\" ); \\\n            result = paUnanticipatedHostError; \\\n            goto error; \\\n        } \\\n    } while( 0 );\n\ntypedef struct {\n    pthread_t callbackThread;\n} PaUtilThreading;\n\nPaError PaUtil_InitializeThreading( PaUtilThreading *threading );\nvoid PaUtil_TerminateThreading( PaUtilThreading *threading );\nPaError PaUtil_StartThreading( PaUtilThreading *threading, void *(*threadRoutine)(void *), void *data );\nPaError PaUtil_CancelThreading( PaUtilThreading *threading, int wait, PaError *exitResult );\n\n/* State accessed by utility functions */\n\n/*\nvoid PaUnix_SetRealtimeScheduling( int rt );\n\nvoid PaUtil_InitializeThreading( PaUtilThreading *th, PaUtilCpuLoadMeasurer *clm );\n\nPaError PaUtil_CreateCallbackThread( PaUtilThreading *th, void *(*CallbackThreadFunc)( void * ), PaStream *s );\n\nPaError PaUtil_KillCallbackThread( PaUtilThreading *th, PaError *exitResult );\n\nvoid PaUtil_CallbackUpdate( PaUtilThreading *th );\n*/\n\nextern pthread_t paUnixMainThread;\n\ntypedef struct\n{\n    pthread_mutex_t mtx;\n} PaUnixMutex;\n\nPaError PaUnixMutex_Initialize( PaUnixMutex* self );\nPaError PaUnixMutex_Terminate( PaUnixMutex* self );\nPaError PaUnixMutex_Lock( PaUnixMutex* self );\nPaError PaUnixMutex_Unlock( PaUnixMutex* self );\n\ntypedef struct\n{\n    pthread_t thread;\n    int parentWaiting;\n    int stopRequested;\n    int locked;\n    PaUnixMutex mtx;\n    pthread_cond_t cond;\n    volatile sig_atomic_t stopRequest;\n} PaUnixThread;\n\n/** Initialize global threading state.\n */\nPaError PaUnixThreading_Initialize( void );\n\n/** Perish, passing on eventual error code.\n *\n * A thin wrapper around pthread_exit, will automatically pass on any error code to the joining thread.\n * If the result indicates an error, i.e. it is not equal to paNoError, this function will automatically\n * allocate a pointer so the error is passed on with pthread_exit. If the result indicates that all is\n * well however, only a NULL pointer will be handed to pthread_exit. Thus, the joining thread should\n * check whether a non-NULL result pointer is obtained from pthread_join and make sure to free it.\n * @param result: The error code to pass on to the joining thread.\n */\n#define PaUnixThreading_EXIT(result) \\\n    do { \\\n        PaError* pres = NULL; \\\n        if( paNoError != (result) ) \\\n        { \\\n            pres = malloc( sizeof (PaError) ); \\\n            *pres = (result); \\\n        } \\\n        pthread_exit( pres ); \\\n    } while (0);\n\n/** Spawn a thread.\n *\n * Intended for spawning the callback thread from the main thread. This function can even block (for a certain\n * time or indefinitely) until notified by the callback thread (using PaUnixThread_NotifyParent), which can be\n * useful in order to make sure that callback has commenced before returning from Pa_StartStream.\n * @param threadFunc: The function to be executed in the child thread.\n * @param waitForChild: If not 0, wait for child thread to call PaUnixThread_NotifyParent. Less than 0 means\n * wait for ever, greater than 0 wait for the specified time.\n * @param rtSched: Enable realtime scheduling?\n * @return: If timed out waiting on child, paTimedOut.\n */\nPaError PaUnixThread_New( PaUnixThread* self, void* (*threadFunc)( void* ), void* threadArg, PaTime waitForChild,\n        int rtSched );\n\n/** Terminate thread.\n *\n * @param wait: If true, request that background thread stop and wait until it does, else cancel it.\n * @param exitResult: If non-null this will upon return contain the exit status of the thread.\n */\nPaError PaUnixThread_Terminate( PaUnixThread* self, int wait, PaError* exitResult );\n\n/** Prepare to notify waiting parent thread.\n *\n * An internal lock must be held before the parent is notified in PaUnixThread_NotifyParent, call this to\n * acquire it beforehand.\n * @return: If parent is not waiting, paInternalError.\n */\nPaError PaUnixThread_PrepareNotify( PaUnixThread* self );\n\n/** Notify waiting parent thread.\n *\n * @return: If parent timed out waiting, paTimedOut. If parent was never waiting, paInternalError.\n */\nPaError PaUnixThread_NotifyParent( PaUnixThread* self );\n\n/** Has the parent thread requested this thread to stop?\n */\nint PaUnixThread_StopRequested( PaUnixThread* self );\n\n#ifdef __cplusplus\n}\n#endif /* __cplusplus */\n#endif\n"
  },
  {
    "path": "thirdparty/portaudio/src/os/win/pa_win_coinitialize.c",
    "content": "/*\n * Microsoft COM initialization routines\n * Copyright (c) 1999-2011 Ross Bencina, Dmitry Kostjuchenko\n *\n * Based on the Open Source API proposed by Ross Bencina\n * Copyright (c) 1999-2011 Ross Bencina, Phil Burk\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n/** @file\n @ingroup win_src\n\n @brief Microsoft COM initialization routines.\n*/\n\n#include <windows.h>\n#include <objbase.h>\n\n#include \"portaudio.h\"\n#include \"pa_util.h\"\n#include \"pa_debugprint.h\"\n\n#include \"pa_win_coinitialize.h\"\n\n\n#if (defined(WIN32) && (defined(_MSC_VER) && (_MSC_VER >= 1200))) && !defined(_WIN32_WCE) && !(defined(WINAPI_FAMILY) && (WINAPI_FAMILY == WINAPI_FAMILY_APP)) /* MSC version 6 and above */\n#pragma comment( lib, \"ole32.lib\" )\n#endif\n\n\n/* use some special bit patterns here to try to guard against uninitialized memory errors */\n#define PAWINUTIL_COM_INITIALIZED       (0xb38f)\n#define PAWINUTIL_COM_NOT_INITIALIZED   (0xf1cd)\n\n\nPaError PaWinUtil_CoInitialize( PaHostApiTypeId hostApiType, PaWinUtilComInitializationResult *comInitializationResult )\n{\n    HRESULT hr;\n\n    comInitializationResult->state = PAWINUTIL_COM_NOT_INITIALIZED;\n\n    /*\n        If COM is already initialized CoInitialize will either return\n        FALSE, or RPC_E_CHANGED_MODE if it was initialised in a different\n        threading mode. In either case we shouldn't consider it an error\n        but we need to be careful to not call CoUninitialize() if\n        RPC_E_CHANGED_MODE was returned.\n    */\n\n#if !defined(WINAPI_FAMILY) || (WINAPI_FAMILY != WINAPI_FAMILY_APP)\n    hr = CoInitialize(0); /* use legacy-safe equivalent to CoInitializeEx(NULL, COINIT_APARTMENTTHREADED) */\n#else\n    hr = CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);\n#endif\n    if( FAILED(hr) && hr != RPC_E_CHANGED_MODE )\n    {\n        PA_DEBUG((\"CoInitialize(0) failed. hr=%d\\n\", hr));\n\n        if( hr == E_OUTOFMEMORY )\n            return paInsufficientMemory;\n\n        {\n            char *lpMsgBuf;\n            FormatMessage(\n                FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,\n                NULL,\n                hr,\n                MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),\n                (LPTSTR) &lpMsgBuf,\n                0,\n                NULL\n            );\n            PaUtil_SetLastHostErrorInfo( hostApiType, hr, lpMsgBuf );\n            LocalFree( lpMsgBuf );\n        }\n\n        return paUnanticipatedHostError;\n    }\n\n    if( hr != RPC_E_CHANGED_MODE )\n    {\n        comInitializationResult->state = PAWINUTIL_COM_INITIALIZED;\n\n        /*\n            Memorize calling thread id and report warning on Uninitialize if\n            calling thread is different as CoInitialize must match CoUninitialize\n            in the same thread.\n        */\n        comInitializationResult->initializingThreadId = GetCurrentThreadId();\n    }\n\n    return paNoError;\n}\n\n\nvoid PaWinUtil_CoUninitialize( PaHostApiTypeId hostApiType, PaWinUtilComInitializationResult *comInitializationResult )\n{\n    if( comInitializationResult->state != PAWINUTIL_COM_NOT_INITIALIZED\n            && comInitializationResult->state != PAWINUTIL_COM_INITIALIZED ){\n\n        PA_DEBUG((\"ERROR: PaWinUtil_CoUninitialize called without calling PaWinUtil_CoInitialize\\n\"));\n    }\n\n    if( comInitializationResult->state == PAWINUTIL_COM_INITIALIZED )\n    {\n        DWORD currentThreadId = GetCurrentThreadId();\n        if( comInitializationResult->initializingThreadId != currentThreadId )\n        {\n            PA_DEBUG((\"ERROR: failed PaWinUtil_CoUninitialize calling thread[%lu] does not match initializing thread[%lu]\\n\",\n                currentThreadId, comInitializationResult->initializingThreadId));\n        }\n        else\n        {\n            CoUninitialize();\n\n            comInitializationResult->state = PAWINUTIL_COM_NOT_INITIALIZED;\n        }\n    }\n}\n"
  },
  {
    "path": "thirdparty/portaudio/src/os/win/pa_win_coinitialize.h",
    "content": "/*\n * Microsoft COM initialization routines\n * Copyright (c) 1999-2011 Ross Bencina, Phil Burk\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n/** @file\n @ingroup win_src\n\n @brief Microsoft COM initialization routines.\n*/\n\n#ifndef PA_WIN_COINITIALIZE_H\n#define PA_WIN_COINITIALIZE_H\n\n#ifdef __cplusplus\nextern \"C\"\n{\n#endif /* __cplusplus */\n\n\n/**\n @brief Data type used to hold the result of an attempt to initialize COM\n    using PaWinUtil_CoInitialize. Must be retained between a call to\n    PaWinUtil_CoInitialize and a matching call to PaWinUtil_CoUninitialize.\n*/\ntypedef struct PaWinUtilComInitializationResult{\n    int state;\n    DWORD initializingThreadId;\n} PaWinUtilComInitializationResult;\n\n\n/**\n @brief Initialize Microsoft COM subsystem on the current thread.\n\n @param hostApiType the host API type id of the caller. Used for error reporting.\n\n @param comInitializationResult An output parameter. The value pointed to by\n        this parameter stores information required by PaWinUtil_CoUninitialize\n        to correctly uninitialize COM. The value should be retained and later\n        passed to PaWinUtil_CoUninitialize.\n\n If PaWinUtil_CoInitialize returns paNoError, the caller must later call\n PaWinUtil_CoUninitialize once.\n*/\nPaError PaWinUtil_CoInitialize( PaHostApiTypeId hostApiType, PaWinUtilComInitializationResult *comInitializationResult );\n\n\n/**\n @brief Uninitialize the Microsoft COM subsystem on the current thread using\n the result of a previous call to PaWinUtil_CoInitialize. Must be called on the same\n thread as PaWinUtil_CoInitialize.\n\n @param hostApiType the host API type id of the caller. Used for error reporting.\n\n @param comInitializationResult An input parameter. A pointer to a value previously\n initialized by a call to PaWinUtil_CoInitialize.\n*/\nvoid PaWinUtil_CoUninitialize( PaHostApiTypeId hostApiType, PaWinUtilComInitializationResult *comInitializationResult );\n\n\n#ifdef __cplusplus\n}\n#endif /* __cplusplus */\n#endif /* PA_WIN_COINITIALIZE_H */\n"
  },
  {
    "path": "thirdparty/portaudio/src/os/win/pa_win_hostapis.c",
    "content": "/*\n * $Id$\n * Portable Audio I/O Library Windows initialization table\n *\n * Based on the Open Source API proposed by Ross Bencina\n * Copyright (c) 1999-2008 Ross Bencina, Phil Burk\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n/** @file\n @ingroup win_src\n\n    @brief Win32 host API initialization function table.\n*/\n\n/* This is needed to make this source file depend on CMake option changes\n   and at the same time make it transparent for clients not using CMake.\n*/\n#ifdef PORTAUDIO_CMAKE_GENERATED\n#include \"options_cmake.h\"\n#endif\n\n#include \"pa_hostapi.h\"\n\n\n#ifdef __cplusplus\nextern \"C\"\n{\n#endif /* __cplusplus */\n\nPaError PaSkeleton_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index );\nPaError PaWinMme_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index );\nPaError PaWinDs_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index );\nPaError PaAsio_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index );\nPaError PaWinWdm_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index );\nPaError PaWasapi_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index );\n\n#ifdef __cplusplus\n}\n#endif /* __cplusplus */\n\n\nPaUtilHostApiInitializer *paHostApiInitializers[] =\n    {\n\n#if PA_USE_WMME\n        PaWinMme_Initialize,\n#endif\n\n#if PA_USE_DS\n        PaWinDs_Initialize,\n#endif\n\n#if PA_USE_ASIO\n        PaAsio_Initialize,\n#endif\n\n#if PA_USE_WASAPI\n        PaWasapi_Initialize,\n#endif\n\n#if PA_USE_WDMKS\n        PaWinWdm_Initialize,\n#endif\n\n#if PA_USE_SKELETON\n        PaSkeleton_Initialize, /* just for testing. last in list so it isn't marked as default. */\n#endif\n\n        0   /* NULL terminated array */\n    };\n"
  },
  {
    "path": "thirdparty/portaudio/src/os/win/pa_win_util.c",
    "content": "/*\n * $Id$\n * Portable Audio I/O Library\n * Win32 platform-specific support functions\n *\n * Based on the Open Source API proposed by Ross Bencina\n * Copyright (c) 1999-2008 Ross Bencina\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n/** @file\n @ingroup win_src\n\n @brief Win32 implementation of platform-specific PaUtil support functions.\n*/\n\n#include <windows.h>\n\n#if defined(WINAPI_FAMILY) && (WINAPI_FAMILY == WINAPI_FAMILY_APP)\n    #include <sys/timeb.h> /* for _ftime_s() */\n#else\n    #include <mmsystem.h> /* for timeGetTime() */\n    #if (defined(WIN32) && (defined(_MSC_VER) && (_MSC_VER >= 1200))) && !defined(_WIN32_WCE) /* MSC version 6 and above */\n    #pragma comment( lib, \"winmm.lib\" )\n    #endif\n#endif\n\n#include \"pa_util.h\"\n\n/*\n   Track memory allocations to avoid leaks.\n */\n\n#if PA_TRACK_MEMORY\nstatic int numAllocations_ = 0;\n#endif\n\n\nvoid *PaUtil_AllocateMemory( long size )\n{\n    void *result = GlobalAlloc( GPTR, size );\n\n#if PA_TRACK_MEMORY\n    if( result != NULL ) numAllocations_ += 1;\n#endif\n    return result;\n}\n\n\nvoid PaUtil_FreeMemory( void *block )\n{\n    if( block != NULL )\n    {\n        GlobalFree( block );\n#if PA_TRACK_MEMORY\n        numAllocations_ -= 1;\n#endif\n\n    }\n}\n\n\nint PaUtil_CountCurrentlyAllocatedBlocks( void )\n{\n#if PA_TRACK_MEMORY\n    return numAllocations_;\n#else\n    return 0;\n#endif\n}\n\n\nvoid Pa_Sleep( long msec )\n{\n    Sleep( msec );\n}\n\nstatic int usePerformanceCounter_;\nstatic double secondsPerTick_;\n\nvoid PaUtil_InitializeClock( void )\n{\n    LARGE_INTEGER ticksPerSecond;\n\n    if( QueryPerformanceFrequency( &ticksPerSecond ) != 0 )\n    {\n        usePerformanceCounter_ = 1;\n        secondsPerTick_ = 1.0 / (double)ticksPerSecond.QuadPart;\n    }\n    else\n    {\n        usePerformanceCounter_ = 0;\n    }\n}\n\n\ndouble PaUtil_GetTime( void )\n{\n    LARGE_INTEGER time;\n\n    if( usePerformanceCounter_ )\n    {\n        /*\n            Note: QueryPerformanceCounter has a known issue where it can skip forward\n            by a few seconds (!) due to a hardware bug on some PCI-ISA bridge hardware.\n            This is documented here:\n            http://support.microsoft.com/default.aspx?scid=KB;EN-US;Q274323&\n\n            The work-arounds are not very paletable and involve querying GetTickCount\n            at every time step.\n\n            Using rdtsc is not a good option on multi-core systems.\n\n            For now we just use QueryPerformanceCounter(). It's good, most of the time.\n        */\n        QueryPerformanceCounter( &time );\n        return time.QuadPart * secondsPerTick_;\n    }\n    else\n    {\n#ifndef UNDER_CE\n    #if defined(WINAPI_FAMILY) && (WINAPI_FAMILY == WINAPI_FAMILY_APP)\n        return GetTickCount64() * .001;\n    #else\n        return timeGetTime() * .001;\n    #endif\n#else\n        return GetTickCount() * .001;\n#endif\n    }\n}\n"
  },
  {
    "path": "thirdparty/portaudio/src/os/win/pa_win_waveformat.c",
    "content": "/*\n * PortAudio Portable Real-Time Audio Library\n * Windows WAVEFORMAT* data structure utilities\n * portaudio.h should be included before this file.\n *\n * Copyright (c) 2007 Ross Bencina\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n#include <windows.h>\n#include <mmsystem.h>\n#if defined(WINAPI_FAMILY) && (WINAPI_FAMILY == WINAPI_FAMILY_APP)\n    #include <mmreg.h> /* for WAVEFORMATEX */\n#endif\n\n#include \"portaudio.h\"\n#include \"pa_win_waveformat.h\"\n\n\n#if !defined(WAVE_FORMAT_EXTENSIBLE)\n#define  WAVE_FORMAT_EXTENSIBLE         0xFFFE\n#endif\n\n\nstatic GUID pawin_ksDataFormatSubtypeGuidBase =\n    { (USHORT)(WAVE_FORMAT_PCM), 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71 };\n\n\nint PaWin_SampleFormatToLinearWaveFormatTag( PaSampleFormat sampleFormat )\n{\n    if( sampleFormat == paFloat32 )\n        return PAWIN_WAVE_FORMAT_IEEE_FLOAT;\n\n    return PAWIN_WAVE_FORMAT_PCM;\n}\n\n\nvoid PaWin_InitializeWaveFormatEx( PaWinWaveFormat *waveFormat,\n        int numChannels, PaSampleFormat sampleFormat, int waveFormatTag, double sampleRate )\n{\n    WAVEFORMATEX *waveFormatEx = (WAVEFORMATEX*)waveFormat;\n    int bytesPerSample = Pa_GetSampleSize(sampleFormat);\n    unsigned long bytesPerFrame = numChannels * bytesPerSample;\n\n    waveFormatEx->wFormatTag = waveFormatTag;\n    waveFormatEx->nChannels = (WORD)numChannels;\n    waveFormatEx->nSamplesPerSec = (DWORD)sampleRate;\n    waveFormatEx->nAvgBytesPerSec = waveFormatEx->nSamplesPerSec * bytesPerFrame;\n    waveFormatEx->nBlockAlign = (WORD)bytesPerFrame;\n    waveFormatEx->wBitsPerSample = bytesPerSample * 8;\n    waveFormatEx->cbSize = 0;\n}\n\n\nvoid PaWin_InitializeWaveFormatExtensible( PaWinWaveFormat *waveFormat,\n        int numChannels, PaSampleFormat sampleFormat, int waveFormatTag, double sampleRate,\n        PaWinWaveFormatChannelMask channelMask )\n{\n    WAVEFORMATEX *waveFormatEx = (WAVEFORMATEX*)waveFormat;\n    int bytesPerSample = Pa_GetSampleSize(sampleFormat);\n    unsigned long bytesPerFrame = numChannels * bytesPerSample;\n    GUID guid;\n\n    waveFormatEx->wFormatTag = WAVE_FORMAT_EXTENSIBLE;\n    waveFormatEx->nChannels = (WORD)numChannels;\n    waveFormatEx->nSamplesPerSec = (DWORD)sampleRate;\n    waveFormatEx->nAvgBytesPerSec = waveFormatEx->nSamplesPerSec * bytesPerFrame;\n    waveFormatEx->nBlockAlign = (WORD)bytesPerFrame;\n    waveFormatEx->wBitsPerSample = bytesPerSample * 8;\n    waveFormatEx->cbSize = 22;\n\n    memcpy(&waveFormat->fields[PAWIN_INDEXOF_WVALIDBITSPERSAMPLE],\n        &waveFormatEx->wBitsPerSample, sizeof(WORD));\n\n    memcpy(&waveFormat->fields[PAWIN_INDEXOF_DWCHANNELMASK],\n        &channelMask, sizeof(DWORD));\n\n    guid = pawin_ksDataFormatSubtypeGuidBase;\n    guid.Data1 = (USHORT)waveFormatTag;\n    memcpy(&waveFormat->fields[PAWIN_INDEXOF_SUBFORMAT], &guid, sizeof(GUID));\n}\n\nPaWinWaveFormatChannelMask PaWin_DefaultChannelMask( int numChannels )\n{\n    switch( numChannels ){\n        case 1:\n            return PAWIN_SPEAKER_MONO;\n        case 2:\n            return PAWIN_SPEAKER_STEREO;\n        case 3:\n            return PAWIN_SPEAKER_FRONT_LEFT | PAWIN_SPEAKER_FRONT_CENTER | PAWIN_SPEAKER_FRONT_RIGHT;\n        case 4:\n            return PAWIN_SPEAKER_QUAD;\n        case 5:\n            return PAWIN_SPEAKER_QUAD | PAWIN_SPEAKER_FRONT_CENTER;\n        case 6:\n            /* The meaning of the PAWIN_SPEAKER_5POINT1 flag has changed over time:\n                http://msdn2.microsoft.com/en-us/library/aa474707.aspx\n               We use PAWIN_SPEAKER_5POINT1 (not PAWIN_SPEAKER_5POINT1_SURROUND)\n               because on some cards (eg Audigy) PAWIN_SPEAKER_5POINT1_SURROUND\n               results in a virtual mixdown placing the rear output in the\n               front _and_ rear speakers.\n            */\n            return PAWIN_SPEAKER_5POINT1;\n        /* case 7: */\n        case 8:\n            /* RoBi: PAWIN_SPEAKER_7POINT1_SURROUND fits normal surround sound setups better than PAWIN_SPEAKER_7POINT1, f.i. NVidia HDMI Audio\n               output is silent on channels 5&6 with NVidia drivers, and channel 7&8 with Microsoft HD Audio driver using PAWIN_SPEAKER_7POINT1.\n               With PAWIN_SPEAKER_7POINT1_SURROUND both setups work OK. */\n            return PAWIN_SPEAKER_7POINT1_SURROUND;\n    }\n\n    /* Apparently some Audigy drivers will output silence\n       if the direct-out constant (0) is used. So this is not ideal.\n\n       RoBi 2012-12-19: Also, NVidia driver seem to output garbage instead. Again not very ideal.\n    */\n    return  PAWIN_SPEAKER_DIRECTOUT;\n\n    /* Note that Alec Rogers proposed the following as an alternate method to\n        generate the default channel mask, however it doesn't seem to be an improvement\n        over the above, since some drivers will matrix outputs mapping to non-present\n        speakers across multiple physical speakers.\n\n        if(nChannels==1) {\n            pwfFormat->dwChannelMask = SPEAKER_FRONT_CENTER;\n        }\n        else {\n            pwfFormat->dwChannelMask = 0;\n            for(i=0; i<nChannels; i++)\n                pwfFormat->dwChannelMask = (pwfFormat->dwChannelMask << 1) | 0x1;\n        }\n    */\n}\n"
  },
  {
    "path": "thirdparty/portaudio/src/os/win/pa_win_wdmks_utils.c",
    "content": "/*\n * PortAudio Portable Real-Time Audio Library\n * Windows WDM KS utilities\n *\n * Copyright (c) 1999 - 2007 Andrew Baldwin, Ross Bencina\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n#include <windows.h>\n#include <mmreg.h>\n#ifndef WAVE_FORMAT_IEEE_FLOAT\n    #define WAVE_FORMAT_IEEE_FLOAT 0x0003   // MinGW32 does not define this\n#endif\n#ifndef _WAVEFORMATEXTENSIBLE_\n    #define _WAVEFORMATEXTENSIBLE_          // MinGW32 does not define this\n#endif\n#ifndef _INC_MMREG\n    #define _INC_MMREG                      // for STATIC_KSDATAFORMAT_SUBTYPE_IEEE_FLOAT\n#endif\n#include <winioctl.h>                       // MinGW32 does not define this automatically\n\n#if defined(__GNUC__)\n\n#include \"../../hostapi/wasapi/mingw-include/ks.h\"\n#include \"../../hostapi/wasapi/mingw-include/ksmedia.h\"\n\n#else\n\n#include <ks.h>\n#include <ksmedia.h>\n\n#endif\n\n#include <stdio.h>                          // just for some development printfs\n\n#include \"portaudio.h\"\n#include \"pa_util.h\"\n#include \"pa_win_wdmks_utils.h\"\n\n\n/* PortAudio-local instances of GUIDs previously sourced from ksguid.lib */\n\n/* GUID KSDATAFORMAT_TYPE_AUDIO */\nstatic const GUID pa_KSDATAFORMAT_TYPE_AUDIO = { STATIC_KSDATAFORMAT_TYPE_AUDIO };\n\n/* GUID KSDATAFORMAT_SUBTYPE_IEEE_FLOAT */\nstatic const GUID pa_KSDATAFORMAT_SUBTYPE_IEEE_FLOAT = { STATIC_KSDATAFORMAT_SUBTYPE_IEEE_FLOAT };\n\n/* GUID KSDATAFORMAT_SUBTYPE_PCM */\nstatic const GUID pa_KSDATAFORMAT_SUBTYPE_PCM = { STATIC_KSDATAFORMAT_SUBTYPE_PCM };\n\n/* GUID KSDATAFORMAT_SUBTYPE_WAVEFORMATEX */\nstatic const GUID pa_KSDATAFORMAT_SUBTYPE_WAVEFORMATEX = { STATIC_KSDATAFORMAT_SUBTYPE_WAVEFORMATEX };\n\n/* GUID KSMEDIUMSETID_Standard */\nstatic const GUID pa_KSMEDIUMSETID_Standard = { STATIC_KSMEDIUMSETID_Standard };\n\n/* GUID KSINTERFACESETID_Standard */\nstatic const GUID pa_KSINTERFACESETID_Standard = { STATIC_KSINTERFACESETID_Standard };\n\n/* GUID KSPROPSETID_Pin */\nstatic const GUID pa_KSPROPSETID_Pin = { STATIC_KSPROPSETID_Pin };\n\n#define pa_IS_VALID_WAVEFORMATEX_GUID(Guid)\\\n    (!memcmp(((PUSHORT)&pa_KSDATAFORMAT_SUBTYPE_WAVEFORMATEX) + 1, ((PUSHORT)(Guid)) + 1, sizeof(GUID) - sizeof(USHORT)))\n\n\nstatic PaError WdmGetPinPropertySimple(\n    HANDLE  handle,\n    unsigned long pinId,\n    unsigned long property,\n    void* value,\n    unsigned long valueSize )\n{\n    DWORD bytesReturned;\n    KSP_PIN ksPProp;\n    ksPProp.Property.Set = pa_KSPROPSETID_Pin;\n    ksPProp.Property.Id = property;\n    ksPProp.Property.Flags = KSPROPERTY_TYPE_GET;\n    ksPProp.PinId = pinId;\n    ksPProp.Reserved = 0;\n\n    if( DeviceIoControl( handle, IOCTL_KS_PROPERTY, &ksPProp, sizeof(KSP_PIN),\n            value, valueSize, &bytesReturned, NULL ) == 0 || bytesReturned != valueSize )\n    {\n        return paUnanticipatedHostError;\n    }\n    else\n    {\n        return paNoError;\n    }\n}\n\n\nstatic PaError WdmGetPinPropertyMulti(\n    HANDLE handle,\n    unsigned long pinId,\n    unsigned long property,\n    KSMULTIPLE_ITEM** ksMultipleItem)\n{\n    unsigned long multipleItemSize = 0;\n    KSP_PIN ksPProp;\n    DWORD bytesReturned;\n\n    *ksMultipleItem = 0;\n\n    ksPProp.Property.Set = pa_KSPROPSETID_Pin;\n    ksPProp.Property.Id = property;\n    ksPProp.Property.Flags = KSPROPERTY_TYPE_GET;\n    ksPProp.PinId = pinId;\n    ksPProp.Reserved = 0;\n\n    if( DeviceIoControl( handle, IOCTL_KS_PROPERTY, &ksPProp.Property,\n            sizeof(KSP_PIN), NULL, 0, &multipleItemSize, NULL ) == 0 && GetLastError() != ERROR_MORE_DATA )\n    {\n        return paUnanticipatedHostError;\n    }\n\n    *ksMultipleItem = (KSMULTIPLE_ITEM*)PaUtil_AllocateMemory( multipleItemSize );\n    if( !*ksMultipleItem )\n    {\n        return paInsufficientMemory;\n    }\n\n    if( DeviceIoControl( handle, IOCTL_KS_PROPERTY, &ksPProp, sizeof(KSP_PIN),\n            (void*)*ksMultipleItem,  multipleItemSize, &bytesReturned, NULL ) == 0 || bytesReturned != multipleItemSize )\n    {\n        PaUtil_FreeMemory( ksMultipleItem );\n        return paUnanticipatedHostError;\n    }\n\n    return paNoError;\n}\n\n\nstatic int GetKSFilterPinCount( HANDLE deviceHandle )\n{\n    DWORD result;\n\n    if( WdmGetPinPropertySimple( deviceHandle, 0, KSPROPERTY_PIN_CTYPES, &result, sizeof(result) ) == paNoError ){\n        return result;\n    }else{\n        return 0;\n    }\n}\n\n\nstatic KSPIN_COMMUNICATION GetKSFilterPinPropertyCommunication( HANDLE deviceHandle, int pinId )\n{\n    KSPIN_COMMUNICATION result;\n\n    if( WdmGetPinPropertySimple( deviceHandle, pinId, KSPROPERTY_PIN_COMMUNICATION, &result, sizeof(result) ) == paNoError ){\n        return result;\n    }else{\n        return KSPIN_COMMUNICATION_NONE;\n    }\n}\n\n\nstatic KSPIN_DATAFLOW GetKSFilterPinPropertyDataflow( HANDLE deviceHandle, int pinId )\n{\n    KSPIN_DATAFLOW result;\n\n    if( WdmGetPinPropertySimple( deviceHandle, pinId, KSPROPERTY_PIN_DATAFLOW, &result, sizeof(result) ) == paNoError ){\n        return result;\n    }else{\n        return (KSPIN_DATAFLOW)0;\n    }\n}\n\n\nstatic int KSFilterPinPropertyIdentifiersInclude(\n        HANDLE deviceHandle, int pinId, unsigned long property, const GUID *identifierSet, unsigned long identifierId  )\n{\n    KSMULTIPLE_ITEM* item = NULL;\n    KSIDENTIFIER* identifier;\n    int i;\n    int result = 0;\n\n    if( WdmGetPinPropertyMulti( deviceHandle, pinId, property, &item) != paNoError )\n        return 0;\n\n    identifier = (KSIDENTIFIER*)(item+1);\n\n    for( i = 0; i < (int)item->Count; i++ )\n    {\n        if( !memcmp( (void*)&identifier[i].Set, (void*)identifierSet, sizeof( GUID ) ) &&\n                ( identifier[i].Id == identifierId ) )\n        {\n            result = 1;\n            break;\n        }\n    }\n\n    PaUtil_FreeMemory( item );\n\n    return result;\n}\n\n\n/* return the maximum channel count supported by any pin on the device.\n   if isInput is non-zero we query input pins, otherwise output pins.\n*/\nint PaWin_WDMKS_QueryFilterMaximumChannelCount( void *wcharDevicePath, int isInput )\n{\n    HANDLE deviceHandle;\n    ULONG i;\n    int pinCount, pinId;\n    int result = 0;\n    KSPIN_DATAFLOW requiredDataflowDirection = (isInput ? KSPIN_DATAFLOW_OUT : KSPIN_DATAFLOW_IN );\n\n    if( !wcharDevicePath )\n        return 0;\n\n    deviceHandle = CreateFileW( (LPCWSTR)wcharDevicePath, FILE_SHARE_READ|FILE_SHARE_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL );\n    if( deviceHandle == INVALID_HANDLE_VALUE )\n        return 0;\n\n    pinCount = GetKSFilterPinCount( deviceHandle );\n    for( pinId = 0; pinId < pinCount; ++pinId )\n    {\n        KSPIN_COMMUNICATION communication = GetKSFilterPinPropertyCommunication( deviceHandle, pinId );\n        KSPIN_DATAFLOW dataflow = GetKSFilterPinPropertyDataflow( deviceHandle, pinId );\n        if( ( dataflow == requiredDataflowDirection ) &&\n                (( communication == KSPIN_COMMUNICATION_SINK) ||\n                 ( communication == KSPIN_COMMUNICATION_BOTH))\n             && ( KSFilterPinPropertyIdentifiersInclude( deviceHandle, pinId,\n                    KSPROPERTY_PIN_INTERFACES, &pa_KSINTERFACESETID_Standard, KSINTERFACE_STANDARD_STREAMING )\n                || KSFilterPinPropertyIdentifiersInclude( deviceHandle, pinId,\n                    KSPROPERTY_PIN_INTERFACES, &pa_KSINTERFACESETID_Standard, KSINTERFACE_STANDARD_LOOPED_STREAMING ) )\n             && KSFilterPinPropertyIdentifiersInclude( deviceHandle, pinId,\n                    KSPROPERTY_PIN_MEDIUMS, &pa_KSMEDIUMSETID_Standard, KSMEDIUM_STANDARD_DEVIO ) )\n        {\n            KSMULTIPLE_ITEM* item = NULL;\n            if( WdmGetPinPropertyMulti( deviceHandle, pinId, KSPROPERTY_PIN_DATARANGES, &item ) == paNoError )\n            {\n                KSDATARANGE *dataRange = (KSDATARANGE*)(item+1);\n\n                for( i=0; i < item->Count; ++i ){\n\n                    if( pa_IS_VALID_WAVEFORMATEX_GUID(&dataRange->SubFormat)\n                            || memcmp( (void*)&dataRange->SubFormat, (void*)&pa_KSDATAFORMAT_SUBTYPE_PCM, sizeof(GUID) ) == 0\n                            || memcmp( (void*)&dataRange->SubFormat, (void*)&pa_KSDATAFORMAT_SUBTYPE_IEEE_FLOAT, sizeof(GUID) ) == 0\n                            || ( ( memcmp( (void*)&dataRange->MajorFormat, (void*)&pa_KSDATAFORMAT_TYPE_AUDIO, sizeof(GUID) ) == 0 )\n                                && ( memcmp( (void*)&dataRange->SubFormat, (void*)&KSDATAFORMAT_SUBTYPE_WILDCARD, sizeof(GUID) ) == 0 ) ) )\n                    {\n                        KSDATARANGE_AUDIO *dataRangeAudio = (KSDATARANGE_AUDIO*)dataRange;\n\n                        /*\n                        printf( \">>> %d %d %d %d %S\\n\", isInput, dataflow, communication, dataRangeAudio->MaximumChannels, devicePath );\n\n                        if( memcmp((void*)&dataRange->Specifier, (void*)&KSDATAFORMAT_SPECIFIER_WAVEFORMATEX, sizeof(GUID) ) == 0 )\n                            printf( \"\\tspecifier: KSDATAFORMAT_SPECIFIER_WAVEFORMATEX\\n\" );\n                        else if( memcmp((void*)&dataRange->Specifier, (void*)&KSDATAFORMAT_SPECIFIER_DSOUND, sizeof(GUID) ) == 0 )\n                            printf( \"\\tspecifier: KSDATAFORMAT_SPECIFIER_DSOUND\\n\" );\n                        else if( memcmp((void*)&dataRange->Specifier, (void*)&KSDATAFORMAT_SPECIFIER_WILDCARD, sizeof(GUID) ) == 0 )\n                            printf( \"\\tspecifier: KSDATAFORMAT_SPECIFIER_WILDCARD\\n\" );\n                        else\n                            printf( \"\\tspecifier: ?\\n\" );\n                        */\n\n                        /*\n                            We assume that very high values for MaximumChannels are not useful and indicate\n                            that the driver isn't prepared to tell us the real number of channels which it supports.\n                        */\n                        if( dataRangeAudio->MaximumChannels  < 0xFFFFUL && (int)dataRangeAudio->MaximumChannels > result )\n                            result = (int)dataRangeAudio->MaximumChannels;\n                    }\n\n                    dataRange = (KSDATARANGE*)( ((char*)dataRange) + dataRange->FormatSize);\n                }\n\n                PaUtil_FreeMemory( item );\n            }\n        }\n    }\n\n    CloseHandle( deviceHandle );\n    return result;\n}\n"
  },
  {
    "path": "thirdparty/portaudio/src/os/win/pa_win_wdmks_utils.h",
    "content": "#ifndef PA_WIN_WDMKS_UTILS_H\n#define PA_WIN_WDMKS_UTILS_H\n\n/*\n * PortAudio Portable Real-Time Audio Library\n * Windows WDM KS utilities\n *\n * Copyright (c) 1999 - 2007 Ross Bencina, Andrew Baldwin\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n/** @file\n @brief Utilities for working with the Windows WDM KS API\n*/\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/**\n    Query for the maximum number of channels supported by any pin of the\n    specified device. Returns 0 if the query fails for any reason.\n\n    @param wcharDevicePath A system level PnP interface path, supplied as a WCHAR unicode string.\n    Declared as void* to avoid introducing a dependency on wchar_t here.\n\n    @param isInput A flag specifying whether to query for input (non-zero) or output (zero) channels.\n*/\nint PaWin_WDMKS_QueryFilterMaximumChannelCount( void *wcharDevicePath, int isInput );\n\n\n#ifdef __cplusplus\n}\n#endif /* __cplusplus */\n\n#endif /* PA_WIN_WDMKS_UTILS_H */\n"
  },
  {
    "path": "thirdparty/portaudio/src/os/win/pa_x86_plain_converters.c",
    "content": "/*\n * Plain Intel IA32 assembly implementations of PortAudio sample converter functions.\n * Copyright (c) 1999-2002 Ross Bencina, Phil Burk\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n/** @file\n @ingroup win_src\n*/\n\n#include \"pa_x86_plain_converters.h\"\n\n#include \"pa_converters.h\"\n#include \"pa_dither.h\"\n\n/*\n    the main reason these versions are faster than the equivalent C versions\n    is that float -> int casting is expensive in C on x86 because the rounding\n    mode needs to be changed for every cast. these versions only set\n    the rounding mode once outside the loop.\n\n    small additional speed gains are made by the way that clamping is\n    implemented.\n\nTODO:\n    o- inline dither code\n    o- implement Dither only (no-clip) versions\n    o- implement int8 and uint8 versions\n    o- test thoroughly\n\n    o- the packed 24 bit functions could benefit from unrolling and avoiding\n        byte and word sized register access.\n*/\n\n/* -------------------------------------------------------------------------- */\n\n/*\n#define PA_CLIP_( val, min, max )\\\n    { val = ((val) < (min)) ? (min) : (((val) > (max)) ? (max) : (val)); }\n*/\n\n/*\n    the following notes were used to determine whether a floating point\n    value should be saturated (ie >1 or <-1) by loading it into an integer\n    register. these should be rewritten so that they make sense.\n\n    an ieee floating point value\n\n    1.xxxxxxxxxxxxxxxxxxxx?\n\n\n    is less than  or equal to 1 and greater than or equal to -1 either:\n\n        if the mantissa is 0 and the unbiased exponent is 0\n\n        OR\n\n        if the unbiased exponent < 0\n\n    this translates to:\n\n        if the mantissa is 0 and the biased exponent is 7F\n\n        or\n\n        if the biased exponent is less than 7F\n\n\n    therefore the value is greater than 1 or less than -1 if\n\n        the mantissa is not 0 and the biased exponent is 7F\n\n        or\n\n        if the biased exponent is greater than 7F\n\n\n    in other words, if we mask out the sign bit, the value is\n    greater than 1 or less than -1 if its integer representation is greater than:\n\n    0 01111111 0000 0000 0000 0000 0000 000\n\n    0011 1111 1000 0000 0000 0000 0000 0000 => 0x3F800000\n*/\n\n#if defined(_WIN64) || defined(_WIN32_WCE)\n\n/*\n    -EMT64/AMD64 uses different asm\n    -VC2005 doesn't allow _WIN64 with inline assembly either!\n */\nvoid PaUtil_InitializeX86PlainConverters( void )\n{\n}\n\n#else\n\n/* -------------------------------------------------------------------------- */\n\nstatic const short fpuControlWord_ = 0x033F; /*round to nearest, 64 bit precision, all exceptions masked*/\nstatic const double int32Scaler_ = 0x7FFFFFFF;\nstatic const double ditheredInt32Scaler_ = 0x7FFFFFFE;\nstatic const double int24Scaler_ = 0x7FFFFF;\nstatic const double ditheredInt24Scaler_ = 0x7FFFFE;\nstatic const double int16Scaler_ = 0x7FFF;\nstatic const double ditheredInt16Scaler_ = 0x7FFE;\n\n#define PA_DITHER_BITS_   (15)\n/* Multiply by PA_FLOAT_DITHER_SCALE_ to get a float between -2.0 and +1.99999 */\n#define PA_FLOAT_DITHER_SCALE_  (1.0F / ((1<<PA_DITHER_BITS_)-1))\nstatic const float const_float_dither_scale_ = PA_FLOAT_DITHER_SCALE_;\n#define PA_DITHER_SHIFT_  ((32 - PA_DITHER_BITS_) + 1)\n\n/* -------------------------------------------------------------------------- */\n\nstatic void Float32_To_Int32(\n    void *destinationBuffer, signed int destinationStride,\n    void *sourceBuffer, signed int sourceStride,\n    unsigned int count, PaUtilTriangularDitherGenerator *ditherGenerator )\n{\n/*\n    float *src = (float*)sourceBuffer;\n    signed long *dest =  (signed long*)destinationBuffer;\n    (void)ditherGenerator; // unused parameter\n\n    while( count-- )\n    {\n        // REVIEW\n        double scaled = *src * 0x7FFFFFFF;\n        *dest = (signed long) scaled;\n\n        src += sourceStride;\n        dest += destinationStride;\n    }\n*/\n\n    short savedFpuControlWord;\n\n    (void) ditherGenerator; /* unused parameter */\n\n\n    __asm{\n        // esi -> source ptr\n        // eax -> source byte stride\n        // edi -> destination ptr\n        // ebx -> destination byte stride\n        // ecx -> source end ptr\n        // edx -> temp\n\n        mov     esi, sourceBuffer\n\n        mov     edx, 4                  // sizeof float32 and int32\n        mov     eax, sourceStride\n        imul    eax, edx\n\n        mov     ecx, count\n        imul    ecx, eax\n        add     ecx, esi\n\n        mov     edi, destinationBuffer\n\n        mov     ebx, destinationStride\n        imul    ebx, edx\n\n        fwait\n        fstcw   savedFpuControlWord\n        fldcw   fpuControlWord_\n\n        fld     int32Scaler_            // stack:  (int)0x7FFFFFFF\n\n    Float32_To_Int32_loop:\n\n        // load unscaled value into st(0)\n        fld     dword ptr [esi]         // stack:  value, (int)0x7FFFFFFF\n        add     esi, eax                // increment source ptr\n        //lea     esi, [esi+eax]\n        fmul    st(0), st(1)            // st(0) *= st(1), stack:  value*0x7FFFFFFF, (int)0x7FFFFFFF\n        /*\n            note: we could store to a temporary qword here which would cause\n            wraparound distortion instead of int indefinite 0x10. that would\n            be more work, and given that not enabling clipping is only advisable\n            when you know that your signal isn't going to clip it isn't worth it.\n        */\n        fistp   dword ptr [edi]         // pop st(0) into dest, stack:  (int)0x7FFFFFFF\n\n        add     edi, ebx                // increment destination ptr\n        //lea     edi, [edi+ebx]\n\n        cmp     esi, ecx                // has src ptr reached end?\n        jne     Float32_To_Int32_loop\n\n        ffree   st(0)\n        fincstp\n\n        fwait\n        fnclex\n        fldcw   savedFpuControlWord\n    }\n}\n\n/* -------------------------------------------------------------------------- */\n\nstatic void Float32_To_Int32_Clip(\n    void *destinationBuffer, signed int destinationStride,\n    void *sourceBuffer, signed int sourceStride,\n    unsigned int count, PaUtilTriangularDitherGenerator *ditherGenerator )\n{\n/*\n    float *src = (float*)sourceBuffer;\n    signed long *dest =  (signed long*)destinationBuffer;\n    (void) ditherGenerator; // unused parameter\n\n    while( count-- )\n    {\n        // REVIEW\n        double scaled = *src * 0x7FFFFFFF;\n        PA_CLIP_( scaled, -2147483648., 2147483647.  );\n        *dest = (signed long) scaled;\n\n        src += sourceStride;\n        dest += destinationStride;\n    }\n*/\n\n    short savedFpuControlWord;\n\n    (void) ditherGenerator; /* unused parameter */\n\n    __asm{\n        // esi -> source ptr\n        // eax -> source byte stride\n        // edi -> destination ptr\n        // ebx -> destination byte stride\n        // ecx -> source end ptr\n        // edx -> temp\n\n        mov     esi, sourceBuffer\n\n        mov     edx, 4                  // sizeof float32 and int32\n        mov     eax, sourceStride\n        imul    eax, edx\n\n        mov     ecx, count\n        imul    ecx, eax\n        add     ecx, esi\n\n        mov     edi, destinationBuffer\n\n        mov     ebx, destinationStride\n        imul    ebx, edx\n\n        fwait\n        fstcw   savedFpuControlWord\n        fldcw   fpuControlWord_\n\n        fld     int32Scaler_            // stack:  (int)0x7FFFFFFF\n\n    Float32_To_Int32_Clip_loop:\n\n        mov     edx, dword ptr [esi]    // load floating point value into integer register\n\n        and     edx, 0x7FFFFFFF         // mask off sign\n        cmp     edx, 0x3F800000         // greater than 1.0 or less than -1.0\n\n        jg      Float32_To_Int32_Clip_clamp\n\n        // load unscaled value into st(0)\n        fld     dword ptr [esi]         // stack:  value, (int)0x7FFFFFFF\n        add     esi, eax                // increment source ptr\n        //lea     esi, [esi+eax]\n        fmul    st(0), st(1)            // st(0) *= st(1), stack:  value*0x7FFFFFFF, (int)0x7FFFFFFF\n        fistp   dword ptr [edi]         // pop st(0) into dest, stack:  (int)0x7FFFFFFF\n        jmp     Float32_To_Int32_Clip_stored\n\n    Float32_To_Int32_Clip_clamp:\n        mov     edx, dword ptr [esi]    // load floating point value into integer register\n        shr     edx, 31                 // move sign bit into bit 0\n        add     esi, eax                // increment source ptr\n        //lea     esi, [esi+eax]\n        add     edx, 0x7FFFFFFF         // convert to maximum range integers\n        mov     dword ptr [edi], edx\n\n    Float32_To_Int32_Clip_stored:\n\n        //add     edi, ebx              // increment destination ptr\n        lea     edi, [edi+ebx]\n\n        cmp     esi, ecx                // has src ptr reached end?\n        jne     Float32_To_Int32_Clip_loop\n\n        ffree   st(0)\n        fincstp\n\n        fwait\n        fnclex\n        fldcw   savedFpuControlWord\n    }\n}\n\n/* -------------------------------------------------------------------------- */\n\nstatic void Float32_To_Int32_DitherClip(\n    void *destinationBuffer, signed int destinationStride,\n    void *sourceBuffer, signed int sourceStride,\n    unsigned int count, PaUtilTriangularDitherGenerator *ditherGenerator )\n{\n    /*\n    float *src = (float*)sourceBuffer;\n    signed long *dest =  (signed long*)destinationBuffer;\n\n    while( count-- )\n    {\n        // REVIEW\n        double dither  = PaUtil_GenerateFloatTriangularDither( ditherGenerator );\n        // use smaller scaler to prevent overflow when we add the dither\n        double dithered = ((double)*src * (2147483646.0)) + dither;\n        PA_CLIP_( dithered, -2147483648., 2147483647.  );\n        *dest = (signed long) dithered;\n\n\n        src += sourceStride;\n        dest += destinationStride;\n    }\n    */\n\n    short savedFpuControlWord;\n\n    // spill storage:\n    signed long sourceByteStride;\n    signed long highpassedDither;\n\n    // dither state:\n    unsigned long ditherPrevious = ditherGenerator->previous;\n    unsigned long ditherRandSeed1 = ditherGenerator->randSeed1;\n    unsigned long ditherRandSeed2 = ditherGenerator->randSeed2;\n\n    __asm{\n        // esi -> source ptr\n        // eax -> source byte stride\n        // edi -> destination ptr\n        // ebx -> destination byte stride\n        // ecx -> source end ptr\n        // edx -> temp\n\n        mov     esi, sourceBuffer\n\n        mov     edx, 4                  // sizeof float32 and int32\n        mov     eax, sourceStride\n        imul    eax, edx\n\n        mov     ecx, count\n        imul    ecx, eax\n        add     ecx, esi\n\n        mov     edi, destinationBuffer\n\n        mov     ebx, destinationStride\n        imul    ebx, edx\n\n        fwait\n        fstcw   savedFpuControlWord\n        fldcw   fpuControlWord_\n\n        fld     ditheredInt32Scaler_    // stack:  int scaler\n\n    Float32_To_Int32_DitherClip_loop:\n\n        mov     edx, dword ptr [esi]    // load floating point value into integer register\n\n        and     edx, 0x7FFFFFFF         // mask off sign\n        cmp     edx, 0x3F800000         // greater than 1.0 or less than -1.0\n\n        jg      Float32_To_Int32_DitherClip_clamp\n\n        // load unscaled value into st(0)\n        fld     dword ptr [esi]         // stack:  value, int scaler\n        add     esi, eax                // increment source ptr\n        //lea     esi, [esi+eax]\n        fmul    st(0), st(1)            // st(0) *= st(1), stack:  value*(int scaler), int scaler\n\n        /*\n        // call PaUtil_GenerateFloatTriangularDither with C calling convention\n        mov     sourceByteStride, eax   // save eax\n        mov     sourceEnd, ecx          // save ecx\n        push    ditherGenerator         // pass ditherGenerator parameter on stack\n        call    PaUtil_GenerateFloatTriangularDither  // stack:  dither, value*(int scaler), int scaler\n        pop     edx                     // clear parameter off stack\n        mov     ecx, sourceEnd          // restore ecx\n        mov     eax, sourceByteStride   // restore eax\n        */\n\n    // generate dither\n        mov     sourceByteStride, eax   // save eax\n        mov     edx, 196314165\n        mov     eax, ditherRandSeed1\n        mul     edx                     // eax:edx = eax * 196314165\n        //add     eax, 907633515\n        lea     eax, [eax+907633515]\n        mov     ditherRandSeed1, eax\n        mov     edx, 196314165\n        mov     eax, ditherRandSeed2\n        mul     edx                     // eax:edx = eax * 196314165\n        //add     eax, 907633515\n        lea     eax, [eax+907633515]\n        mov     edx, ditherRandSeed1\n        shr     edx, PA_DITHER_SHIFT_\n        mov     ditherRandSeed2, eax\n        shr     eax, PA_DITHER_SHIFT_\n        //add     eax, edx              // eax -> current\n        lea     eax, [eax+edx]\n        mov     edx, ditherPrevious\n        neg     edx\n        lea     edx, [eax+edx]          // highpass = current - previous\n        mov     highpassedDither, edx\n        mov     ditherPrevious, eax     // previous = current\n        mov     eax, sourceByteStride   // restore eax\n        fild    highpassedDither\n        fmul    const_float_dither_scale_\n    // end generate dither, dither signal in st(0)\n\n        faddp   st(1), st(0)            // stack: dither + value*(int scaler), int scaler\n        fistp   dword ptr [edi]         // pop st(0) into dest, stack:  int scaler\n        jmp     Float32_To_Int32_DitherClip_stored\n\n    Float32_To_Int32_DitherClip_clamp:\n        mov     edx, dword ptr [esi]    // load floating point value into integer register\n        shr     edx, 31                 // move sign bit into bit 0\n        add     esi, eax                // increment source ptr\n        //lea     esi, [esi+eax]\n        add     edx, 0x7FFFFFFF         // convert to maximum range integers\n        mov     dword ptr [edi], edx\n\n    Float32_To_Int32_DitherClip_stored:\n\n        //add     edi, ebx              // increment destination ptr\n        lea     edi, [edi+ebx]\n\n        cmp     esi, ecx                // has src ptr reached end?\n        jne     Float32_To_Int32_DitherClip_loop\n\n        ffree   st(0)\n        fincstp\n\n        fwait\n        fnclex\n        fldcw   savedFpuControlWord\n    }\n\n    ditherGenerator->previous = ditherPrevious;\n    ditherGenerator->randSeed1 = ditherRandSeed1;\n    ditherGenerator->randSeed2 = ditherRandSeed2;\n}\n\n/* -------------------------------------------------------------------------- */\n\nstatic void Float32_To_Int24(\n    void *destinationBuffer, signed int destinationStride,\n    void *sourceBuffer, signed int sourceStride,\n    unsigned int count, PaUtilTriangularDitherGenerator *ditherGenerator )\n{\n/*\n    float *src = (float*)sourceBuffer;\n    unsigned char *dest = (unsigned char*)destinationBuffer;\n    signed long temp;\n\n    (void) ditherGenerator; // unused parameter\n\n    while( count-- )\n    {\n        // convert to 32 bit and drop the low 8 bits\n        double scaled = *src * 0x7FFFFFFF;\n        temp = (signed long) scaled;\n\n        dest[0] = (unsigned char)(temp >> 8);\n        dest[1] = (unsigned char)(temp >> 16);\n        dest[2] = (unsigned char)(temp >> 24);\n\n        src += sourceStride;\n        dest += destinationStride * 3;\n    }\n*/\n\n    short savedFpuControlWord;\n\n    signed long tempInt32;\n\n    (void) ditherGenerator; /* unused parameter */\n\n    __asm{\n        // esi -> source ptr\n        // eax -> source byte stride\n        // edi -> destination ptr\n        // ebx -> destination byte stride\n        // ecx -> source end ptr\n        // edx -> temp\n\n        mov     esi, sourceBuffer\n\n        mov     edx, 4                  // sizeof float32\n        mov     eax, sourceStride\n        imul    eax, edx\n\n        mov     ecx, count\n        imul    ecx, eax\n        add     ecx, esi\n\n        mov     edi, destinationBuffer\n\n        mov     edx, 3                  // sizeof int24\n        mov     ebx, destinationStride\n        imul    ebx, edx\n\n        fwait\n        fstcw   savedFpuControlWord\n        fldcw   fpuControlWord_\n\n        fld     int24Scaler_            // stack:  (int)0x7FFFFF\n\n    Float32_To_Int24_loop:\n\n        // load unscaled value into st(0)\n        fld     dword ptr [esi]         // stack:  value, (int)0x7FFFFF\n        add     esi, eax                // increment source ptr\n        //lea     esi, [esi+eax]\n        fmul    st(0), st(1)            // st(0) *= st(1), stack:  value*0x7FFFFF, (int)0x7FFFFF\n        fistp   tempInt32               // pop st(0) into tempInt32, stack:  (int)0x7FFFFF\n        mov     edx, tempInt32\n\n        mov     byte ptr [edi], DL\n        shr     edx, 8\n        //mov     byte ptr [edi+1], DL\n        //mov     byte ptr [edi+2], DH\n        mov     word ptr [edi+1], DX\n\n        //add     edi, ebx              // increment destination ptr\n        lea     edi, [edi+ebx]\n\n        cmp     esi, ecx                // has src ptr reached end?\n        jne     Float32_To_Int24_loop\n\n        ffree   st(0)\n        fincstp\n\n        fwait\n        fnclex\n        fldcw   savedFpuControlWord\n    }\n}\n\n/* -------------------------------------------------------------------------- */\n\nstatic void Float32_To_Int24_Clip(\n    void *destinationBuffer, signed int destinationStride,\n    void *sourceBuffer, signed int sourceStride,\n    unsigned int count, PaUtilTriangularDitherGenerator *ditherGenerator )\n{\n/*\n    float *src = (float*)sourceBuffer;\n    unsigned char *dest = (unsigned char*)destinationBuffer;\n    signed long temp;\n\n    (void) ditherGenerator; // unused parameter\n\n    while( count-- )\n    {\n        // convert to 32 bit and drop the low 8 bits\n        double scaled = *src * 0x7FFFFFFF;\n        PA_CLIP_( scaled, -2147483648., 2147483647.  );\n        temp = (signed long) scaled;\n\n        dest[0] = (unsigned char)(temp >> 8);\n        dest[1] = (unsigned char)(temp >> 16);\n        dest[2] = (unsigned char)(temp >> 24);\n\n        src += sourceStride;\n        dest += destinationStride * 3;\n    }\n*/\n\n    short savedFpuControlWord;\n\n    signed long tempInt32;\n\n    (void) ditherGenerator; /* unused parameter */\n\n    __asm{\n        // esi -> source ptr\n        // eax -> source byte stride\n        // edi -> destination ptr\n        // ebx -> destination byte stride\n        // ecx -> source end ptr\n        // edx -> temp\n\n        mov     esi, sourceBuffer\n\n        mov     edx, 4                  // sizeof float32\n        mov     eax, sourceStride\n        imul    eax, edx\n\n        mov     ecx, count\n        imul    ecx, eax\n        add     ecx, esi\n\n        mov     edi, destinationBuffer\n\n        mov     edx, 3                  // sizeof int24\n        mov     ebx, destinationStride\n        imul    ebx, edx\n\n        fwait\n        fstcw   savedFpuControlWord\n        fldcw   fpuControlWord_\n\n        fld     int24Scaler_            // stack:  (int)0x7FFFFF\n\n    Float32_To_Int24_Clip_loop:\n\n        mov     edx, dword ptr [esi]    // load floating point value into integer register\n\n        and     edx, 0x7FFFFFFF         // mask off sign\n        cmp     edx, 0x3F800000         // greater than 1.0 or less than -1.0\n\n        jg      Float32_To_Int24_Clip_clamp\n\n        // load unscaled value into st(0)\n        fld     dword ptr [esi]         // stack:  value, (int)0x7FFFFF\n        add     esi, eax                // increment source ptr\n        //lea     esi, [esi+eax]\n        fmul    st(0), st(1)            // st(0) *= st(1), stack:  value*0x7FFFFF, (int)0x7FFFFF\n        fistp   tempInt32               // pop st(0) into tempInt32, stack:  (int)0x7FFFFF\n        mov     edx, tempInt32\n        jmp     Float32_To_Int24_Clip_store\n\n    Float32_To_Int24_Clip_clamp:\n        mov     edx, dword ptr [esi]    // load floating point value into integer register\n        shr     edx, 31                 // move sign bit into bit 0\n        add     esi, eax                // increment source ptr\n        //lea     esi, [esi+eax]\n        add     edx, 0x7FFFFF           // convert to maximum range integers\n\n    Float32_To_Int24_Clip_store:\n\n        mov     byte ptr [edi], DL\n        shr     edx, 8\n        //mov     byte ptr [edi+1], DL\n        //mov     byte ptr [edi+2], DH\n        mov     word ptr [edi+1], DX\n\n        //add     edi, ebx              // increment destination ptr\n        lea     edi, [edi+ebx]\n\n        cmp     esi, ecx                // has src ptr reached end?\n        jne     Float32_To_Int24_Clip_loop\n\n        ffree   st(0)\n        fincstp\n\n        fwait\n        fnclex\n        fldcw   savedFpuControlWord\n    }\n}\n\n/* -------------------------------------------------------------------------- */\n\nstatic void Float32_To_Int24_DitherClip(\n    void *destinationBuffer, signed int destinationStride,\n    void *sourceBuffer, signed int sourceStride,\n    unsigned int count, PaUtilTriangularDitherGenerator *ditherGenerator )\n{\n/*\n    float *src = (float*)sourceBuffer;\n    unsigned char *dest = (unsigned char*)destinationBuffer;\n    signed long temp;\n\n    while( count-- )\n    {\n        // convert to 32 bit and drop the low 8 bits\n\n        // FIXME: the dither amplitude here appears to be too small by 8 bits\n        double dither  = PaUtil_GenerateFloatTriangularDither( ditherGenerator );\n        // use smaller scaler to prevent overflow when we add the dither\n        double dithered = ((double)*src * (2147483646.0)) + dither;\n        PA_CLIP_( dithered, -2147483648., 2147483647.  );\n\n        temp = (signed long) dithered;\n\n        dest[0] = (unsigned char)(temp >> 8);\n        dest[1] = (unsigned char)(temp >> 16);\n        dest[2] = (unsigned char)(temp >> 24);\n\n        src += sourceStride;\n        dest += destinationStride * 3;\n    }\n*/\n\n    short savedFpuControlWord;\n\n    // spill storage:\n    signed long sourceByteStride;\n    signed long highpassedDither;\n\n    // dither state:\n    unsigned long ditherPrevious = ditherGenerator->previous;\n    unsigned long ditherRandSeed1 = ditherGenerator->randSeed1;\n    unsigned long ditherRandSeed2 = ditherGenerator->randSeed2;\n\n    signed long tempInt32;\n\n    __asm{\n        // esi -> source ptr\n        // eax -> source byte stride\n        // edi -> destination ptr\n        // ebx -> destination byte stride\n        // ecx -> source end ptr\n        // edx -> temp\n\n        mov     esi, sourceBuffer\n\n        mov     edx, 4                  // sizeof float32\n        mov     eax, sourceStride\n        imul    eax, edx\n\n        mov     ecx, count\n        imul    ecx, eax\n        add     ecx, esi\n\n        mov     edi, destinationBuffer\n\n        mov     edx, 3                  // sizeof int24\n        mov     ebx, destinationStride\n        imul    ebx, edx\n\n        fwait\n        fstcw   savedFpuControlWord\n        fldcw   fpuControlWord_\n\n        fld     ditheredInt24Scaler_    // stack:  int scaler\n\n    Float32_To_Int24_DitherClip_loop:\n\n        mov     edx, dword ptr [esi]    // load floating point value into integer register\n\n        and     edx, 0x7FFFFFFF         // mask off sign\n        cmp     edx, 0x3F800000         // greater than 1.0 or less than -1.0\n\n        jg      Float32_To_Int24_DitherClip_clamp\n\n        // load unscaled value into st(0)\n        fld     dword ptr [esi]         // stack:  value, int scaler\n        add     esi, eax                // increment source ptr\n        //lea     esi, [esi+eax]\n        fmul    st(0), st(1)            // st(0) *= st(1), stack:  value*(int scaler), int scaler\n\n    /*\n        // call PaUtil_GenerateFloatTriangularDither with C calling convention\n        mov     sourceByteStride, eax   // save eax\n        mov     sourceEnd, ecx          // save ecx\n        push    ditherGenerator         // pass ditherGenerator parameter on stack\n        call    PaUtil_GenerateFloatTriangularDither  // stack:  dither, value*(int scaler), int scaler\n        pop     edx                     // clear parameter off stack\n        mov     ecx, sourceEnd          // restore ecx\n        mov     eax, sourceByteStride   // restore eax\n    */\n\n    // generate dither\n        mov     sourceByteStride, eax   // save eax\n        mov     edx, 196314165\n        mov     eax, ditherRandSeed1\n        mul     edx                     // eax:edx = eax * 196314165\n        //add     eax, 907633515\n        lea     eax, [eax+907633515]\n        mov     ditherRandSeed1, eax\n        mov     edx, 196314165\n        mov     eax, ditherRandSeed2\n        mul     edx                     // eax:edx = eax * 196314165\n        //add     eax, 907633515\n        lea     eax, [eax+907633515]\n        mov     edx, ditherRandSeed1\n        shr     edx, PA_DITHER_SHIFT_\n        mov     ditherRandSeed2, eax\n        shr     eax, PA_DITHER_SHIFT_\n        //add     eax, edx              // eax -> current\n        lea     eax, [eax+edx]\n        mov     edx, ditherPrevious\n        neg     edx\n        lea     edx, [eax+edx]          // highpass = current - previous\n        mov     highpassedDither, edx\n        mov     ditherPrevious, eax     // previous = current\n        mov     eax, sourceByteStride   // restore eax\n        fild    highpassedDither\n        fmul    const_float_dither_scale_\n    // end generate dither, dither signal in st(0)\n\n        faddp   st(1), st(0)            // stack: dither * value*(int scaler), int scaler\n        fistp   tempInt32               // pop st(0) into tempInt32, stack:  int scaler\n        mov     edx, tempInt32\n        jmp     Float32_To_Int24_DitherClip_store\n\n    Float32_To_Int24_DitherClip_clamp:\n        mov     edx, dword ptr [esi]    // load floating point value into integer register\n        shr     edx, 31                 // move sign bit into bit 0\n        add     esi, eax                // increment source ptr\n        //lea     esi, [esi+eax]\n        add     edx, 0x7FFFFF           // convert to maximum range integers\n\n    Float32_To_Int24_DitherClip_store:\n\n        mov     byte ptr [edi], DL\n        shr     edx, 8\n        //mov     byte ptr [edi+1], DL\n        //mov     byte ptr [edi+2], DH\n        mov     word ptr [edi+1], DX\n\n        //add     edi, ebx              // increment destination ptr\n        lea     edi, [edi+ebx]\n\n        cmp     esi, ecx                // has src ptr reached end?\n        jne     Float32_To_Int24_DitherClip_loop\n\n        ffree   st(0)\n        fincstp\n\n        fwait\n        fnclex\n        fldcw   savedFpuControlWord\n    }\n\n    ditherGenerator->previous = ditherPrevious;\n    ditherGenerator->randSeed1 = ditherRandSeed1;\n    ditherGenerator->randSeed2 = ditherRandSeed2;\n}\n\n/* -------------------------------------------------------------------------- */\n\nstatic void Float32_To_Int16(\n    void *destinationBuffer, signed int destinationStride,\n    void *sourceBuffer, signed int sourceStride,\n    unsigned int count, PaUtilTriangularDitherGenerator *ditherGenerator )\n{\n/*\n    float *src = (float*)sourceBuffer;\n    signed short *dest =  (signed short*)destinationBuffer;\n    (void)ditherGenerator; // unused parameter\n\n    while( count-- )\n    {\n\n        short samp = (short) (*src * (32767.0f));\n        *dest = samp;\n\n        src += sourceStride;\n        dest += destinationStride;\n    }\n*/\n\n    short savedFpuControlWord;\n\n    (void) ditherGenerator; /* unused parameter */\n\n    __asm{\n        // esi -> source ptr\n        // eax -> source byte stride\n        // edi -> destination ptr\n        // ebx -> destination byte stride\n        // ecx -> source end ptr\n        // edx -> temp\n\n        mov     esi, sourceBuffer\n\n        mov     edx, 4                  // sizeof float32\n        mov     eax, sourceStride\n        imul    eax, edx                // source byte stride\n\n        mov     ecx, count\n        imul    ecx, eax\n        add     ecx, esi                // source end ptr = count * source byte stride + source ptr\n\n        mov     edi, destinationBuffer\n\n        mov     edx, 2                  // sizeof int16\n        mov     ebx, destinationStride\n        imul    ebx, edx                // destination byte stride\n\n        fwait\n        fstcw   savedFpuControlWord\n        fldcw   fpuControlWord_\n\n        fld     int16Scaler_            // stack:  (int)0x7FFF\n\n    Float32_To_Int16_loop:\n\n        // load unscaled value into st(0)\n        fld     dword ptr [esi]         // stack:  value, (int)0x7FFF\n        add     esi, eax                // increment source ptr\n        //lea     esi, [esi+eax]\n        fmul    st(0), st(1)            // st(0) *= st(1), stack:  value*0x7FFF, (int)0x7FFF\n        fistp   word ptr [edi]          // store scaled int into dest, stack:  (int)0x7FFF\n\n        add     edi, ebx                // increment destination ptr\n        //lea     edi, [edi+ebx]\n\n        cmp     esi, ecx                // has src ptr reached end?\n        jne     Float32_To_Int16_loop\n\n        ffree   st(0)\n        fincstp\n\n        fwait\n        fnclex\n        fldcw   savedFpuControlWord\n    }\n}\n\n/* -------------------------------------------------------------------------- */\n\nstatic void Float32_To_Int16_Clip(\n    void *destinationBuffer, signed int destinationStride,\n    void *sourceBuffer, signed int sourceStride,\n    unsigned int count, PaUtilTriangularDitherGenerator *ditherGenerator )\n{\n/*\n    float *src = (float*)sourceBuffer;\n    signed short *dest =  (signed short*)destinationBuffer;\n    (void)ditherGenerator; // unused parameter\n\n    while( count-- )\n    {\n        long samp = (signed long) (*src * (32767.0f));\n        PA_CLIP_( samp, -0x8000, 0x7FFF );\n        *dest = (signed short) samp;\n\n        src += sourceStride;\n        dest += destinationStride;\n    }\n*/\n\n    short savedFpuControlWord;\n\n    (void) ditherGenerator; /* unused parameter */\n\n    __asm{\n        // esi -> source ptr\n        // eax -> source byte stride\n        // edi -> destination ptr\n        // ebx -> destination byte stride\n        // ecx -> source end ptr\n        // edx -> temp\n\n        mov     esi, sourceBuffer\n\n        mov     edx, 4                  // sizeof float32\n        mov     eax, sourceStride\n        imul    eax, edx                // source byte stride\n\n        mov     ecx, count\n        imul    ecx, eax\n        add     ecx, esi                // source end ptr = count * source byte stride + source ptr\n\n        mov     edi, destinationBuffer\n\n        mov     edx, 2                  // sizeof int16\n        mov     ebx, destinationStride\n        imul    ebx, edx                // destination byte stride\n\n        fwait\n        fstcw   savedFpuControlWord\n        fldcw   fpuControlWord_\n\n        fld     int16Scaler_            // stack:  (int)0x7FFF\n\n    Float32_To_Int16_Clip_loop:\n\n        mov     edx, dword ptr [esi]    // load floating point value into integer register\n\n        and     edx, 0x7FFFFFFF         // mask off sign\n        cmp     edx, 0x3F800000         // greater than 1.0 or less than -1.0\n\n        jg      Float32_To_Int16_Clip_clamp\n\n        // load unscaled value into st(0)\n        fld     dword ptr [esi]         // stack:  value, (int)0x7FFF\n        add     esi, eax                // increment source ptr\n        //lea     esi, [esi+eax]\n        fmul    st(0), st(1)            // st(0) *= st(1), stack:  value*0x7FFF, (int)0x7FFF\n        fistp   word ptr [edi]          // store scaled int into dest, stack:  (int)0x7FFF\n        jmp     Float32_To_Int16_Clip_stored\n\n    Float32_To_Int16_Clip_clamp:\n        mov     edx, dword ptr [esi]    // load floating point value into integer register\n        shr     edx, 31                 // move sign bit into bit 0\n        add     esi, eax                // increment source ptr\n        //lea     esi, [esi+eax]\n        add     dx, 0x7FFF              // convert to maximum range integers\n        mov     word ptr [edi], dx      // store clamped into into dest\n\n    Float32_To_Int16_Clip_stored:\n\n        add     edi, ebx                // increment destination ptr\n        //lea     edi, [edi+ebx]\n\n        cmp     esi, ecx                // has src ptr reached end?\n        jne     Float32_To_Int16_Clip_loop\n\n        ffree   st(0)\n        fincstp\n\n        fwait\n        fnclex\n        fldcw   savedFpuControlWord\n    }\n}\n\n/* -------------------------------------------------------------------------- */\n\nstatic void Float32_To_Int16_DitherClip(\n    void *destinationBuffer, signed int destinationStride,\n    void *sourceBuffer, signed int sourceStride,\n    unsigned int count, PaUtilTriangularDitherGenerator *ditherGenerator )\n{\n/*\n    float *src = (float*)sourceBuffer;\n    signed short *dest =  (signed short*)destinationBuffer;\n    (void)ditherGenerator; // unused parameter\n\n    while( count-- )\n    {\n\n        float dither  = PaUtil_GenerateFloatTriangularDither( ditherGenerator );\n        // use smaller scaler to prevent overflow when we add the dither\n        float dithered = (*src * (32766.0f)) + dither;\n        signed long samp = (signed long) dithered;\n        PA_CLIP_( samp, -0x8000, 0x7FFF );\n        *dest = (signed short) samp;\n\n        src += sourceStride;\n        dest += destinationStride;\n    }\n*/\n\n    short savedFpuControlWord;\n\n    // spill storage:\n    signed long sourceByteStride;\n    signed long highpassedDither;\n\n    // dither state:\n    unsigned long ditherPrevious = ditherGenerator->previous;\n    unsigned long ditherRandSeed1 = ditherGenerator->randSeed1;\n    unsigned long ditherRandSeed2 = ditherGenerator->randSeed2;\n\n    __asm{\n        // esi -> source ptr\n        // eax -> source byte stride\n        // edi -> destination ptr\n        // ebx -> destination byte stride\n        // ecx -> source end ptr\n        // edx -> temp\n\n        mov     esi, sourceBuffer\n\n        mov     edx, 4                  // sizeof float32\n        mov     eax, sourceStride\n        imul    eax, edx                // source byte stride\n\n        mov     ecx, count\n        imul    ecx, eax\n        add     ecx, esi                // source end ptr = count * source byte stride + source ptr\n\n        mov     edi, destinationBuffer\n\n        mov     edx, 2                  // sizeof int16\n        mov     ebx, destinationStride\n        imul    ebx, edx                // destination byte stride\n\n        fwait\n        fstcw   savedFpuControlWord\n        fldcw   fpuControlWord_\n\n        fld     ditheredInt16Scaler_    // stack:  int scaler\n\n    Float32_To_Int16_DitherClip_loop:\n\n        mov     edx, dword ptr [esi]    // load floating point value into integer register\n\n        and     edx, 0x7FFFFFFF         // mask off sign\n        cmp     edx, 0x3F800000         // greater than 1.0 or less than -1.0\n\n        jg      Float32_To_Int16_DitherClip_clamp\n\n        // load unscaled value into st(0)\n        fld     dword ptr [esi]         // stack:  value, int scaler\n        add     esi, eax                // increment source ptr\n        //lea     esi, [esi+eax]\n        fmul    st(0), st(1)            // st(0) *= st(1), stack:  value*(int scaler), int scaler\n\n        /*\n        // call PaUtil_GenerateFloatTriangularDither with C calling convention\n        mov     sourceByteStride, eax   // save eax\n        mov     sourceEnd, ecx          // save ecx\n        push    ditherGenerator         // pass ditherGenerator parameter on stack\n        call    PaUtil_GenerateFloatTriangularDither  // stack:  dither, value*(int scaler), int scaler\n        pop     edx                     // clear parameter off stack\n        mov     ecx, sourceEnd          // restore ecx\n        mov     eax, sourceByteStride   // restore eax\n        */\n\n    // generate dither\n        mov     sourceByteStride, eax   // save eax\n        mov     edx, 196314165\n        mov     eax, ditherRandSeed1\n        mul     edx                     // eax:edx = eax * 196314165\n        //add     eax, 907633515\n        lea     eax, [eax+907633515]\n        mov     ditherRandSeed1, eax\n        mov     edx, 196314165\n        mov     eax, ditherRandSeed2\n        mul     edx                     // eax:edx = eax * 196314165\n        //add     eax, 907633515\n        lea     eax, [eax+907633515]\n        mov     edx, ditherRandSeed1\n        shr     edx, PA_DITHER_SHIFT_\n        mov     ditherRandSeed2, eax\n        shr     eax, PA_DITHER_SHIFT_\n        //add     eax, edx              // eax -> current\n        lea     eax, [eax+edx]          // current = randSeed1>>x + randSeed2>>x\n        mov     edx, ditherPrevious\n        neg     edx\n        lea     edx, [eax+edx]          // highpass = current - previous\n        mov     highpassedDither, edx\n        mov     ditherPrevious, eax     // previous = current\n        mov     eax, sourceByteStride   // restore eax\n        fild    highpassedDither\n        fmul    const_float_dither_scale_\n    // end generate dither, dither signal in st(0)\n\n        faddp   st(1), st(0)            // stack: dither * value*(int scaler), int scaler\n        fistp   word ptr [edi]          // store scaled int into dest, stack:  int scaler\n        jmp     Float32_To_Int16_DitherClip_stored\n\n    Float32_To_Int16_DitherClip_clamp:\n        mov     edx, dword ptr [esi]    // load floating point value into integer register\n        shr     edx, 31                 // move sign bit into bit 0\n        add     esi, eax                // increment source ptr\n        //lea     esi, [esi+eax]\n        add     dx, 0x7FFF              // convert to maximum range integers\n        mov     word ptr [edi], dx      // store clamped into into dest\n\n    Float32_To_Int16_DitherClip_stored:\n\n        add     edi, ebx                // increment destination ptr\n        //lea     edi, [edi+ebx]\n\n        cmp     esi, ecx                // has src ptr reached end?\n        jne     Float32_To_Int16_DitherClip_loop\n\n        ffree   st(0)\n        fincstp\n\n        fwait\n        fnclex\n        fldcw   savedFpuControlWord\n    }\n\n    ditherGenerator->previous = ditherPrevious;\n    ditherGenerator->randSeed1 = ditherRandSeed1;\n    ditherGenerator->randSeed2 = ditherRandSeed2;\n}\n\n/* -------------------------------------------------------------------------- */\n\nvoid PaUtil_InitializeX86PlainConverters( void )\n{\n    paConverters.Float32_To_Int32 = Float32_To_Int32;\n    paConverters.Float32_To_Int32_Clip = Float32_To_Int32_Clip;\n    paConverters.Float32_To_Int32_DitherClip = Float32_To_Int32_DitherClip;\n\n    paConverters.Float32_To_Int24 = Float32_To_Int24;\n    paConverters.Float32_To_Int24_Clip = Float32_To_Int24_Clip;\n    paConverters.Float32_To_Int24_DitherClip = Float32_To_Int24_DitherClip;\n\n    paConverters.Float32_To_Int16 = Float32_To_Int16;\n    paConverters.Float32_To_Int16_Clip = Float32_To_Int16_Clip;\n    paConverters.Float32_To_Int16_DitherClip = Float32_To_Int16_DitherClip;\n}\n\n#endif\n\n/* -------------------------------------------------------------------------- */\n"
  },
  {
    "path": "thirdparty/portaudio/src/os/win/pa_x86_plain_converters.h",
    "content": "/*\n * Plain Intel IA32 assembly implementations of PortAudio sample converter functions.\n * Copyright (c) 1999-2002 Ross Bencina, Phil Burk\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n/** @file\n @ingroup win_src\n*/\n\n#ifndef PA_X86_PLAIN_CONVERTERS_H\n#define PA_X86_PLAIN_CONVERTERS_H\n\n#ifdef __cplusplus\nextern \"C\"\n{\n#endif /* __cplusplus */\n\n\n/**\n @brief Install optimized converter functions suitable for all IA32 processors\n\n It is recommended to call PaUtil_InitializeX86PlainConverters prior to calling Pa_Initialize\n*/\nvoid PaUtil_InitializeX86PlainConverters( void );\n\n\n#ifdef __cplusplus\n}\n#endif /* __cplusplus */\n#endif /* PA_X86_PLAIN_CONVERTERS_H */\n"
  },
  {
    "path": "thirdparty/portaudio/test/CMakeLists.txt",
    "content": "# Test projects\n# Use the macro to add test projects\n\nMACRO(ADD_TEST appl_name)\n   ADD_EXECUTABLE(${appl_name} \"${appl_name}.c\")\n   TARGET_LINK_LIBRARIES(${appl_name} portaudio_static)\n   SET_TARGET_PROPERTIES(${appl_name}\n      PROPERTIES\n      FOLDER \"Test\"\n   )\nENDMACRO(ADD_TEST)\n\nADD_TEST(patest_longsine)\n"
  },
  {
    "path": "thirdparty/portaudio/test/README.txt",
    "content": "TODO - This should be moved into a doxydoc page.\n\nFor more information on the TestPlan please visit:\n\n  http://www.portaudio.com/trac/wiki/TestPlan\n  \nThis directory contains various programs to test PortAudio. The files \nnamed patest_* are tests.\n\nAll following tests are up to date with the V19 API. They should all compile\n(without any warnings on GCC 3.3). Note that this does not necessarily mean that \nthe tests pass, just that they compile.\n\n    x- paqa_devs.c \n    x- paqa_errs.c   (needs reviewing)\n    x- patest1.c\n    x- patest_buffer.c\n    x- patest_callbackstop.c\n    x- patest_clip.c (last test fails, dither doesn't currently force clip in V19)\n    x- patest_dither.c\n    x- patest_hang.c\n    x- patest_latency.c\n    x- patest_leftright.c\n    x- patest_longsine.c\n    x- patest_many.c\n    x- patest_maxsines.c\n\tx- patest_mono.c\n    x- patest_multi_sine.c\n    x- patest_pink.c\n    x- patest_prime.c\n    x- patest_read_record.c\n    x- patest_record.c\n    x- patest_ringmix.c\n    x- patest_saw.c\n    x- patest_sine.c\n    x- patest_sine8.c\n    x- patest_sine_formats.c\n    x- patest_sine_time.c\n    x- patest_start_stop.c\n    x- patest_stop.c\n    x- patest_sync.c\n    x- patest_toomanysines.c\n\tx- patest_two_rates.c\n    x- patest_underflow.c\n    x- patest_wire.c\n    x- patest_write_sine.c\n    x- pa_devs.c\n    x- pa_fuzz.c\n    x- pa_minlat.c\n\nNote that Phil Burk deleted the debug_* tests on 2/26/11. They were just hacked\nversions of old V18 tests. If we need to debug then we can just hack a working V19 test.\n"
  },
  {
    "path": "thirdparty/portaudio/test/pa_minlat.c",
    "content": "/** @file pa_minlat.c\n    @ingroup test_src\n    @brief Experiment with different numbers of buffers to determine the\n    minimum latency for a computer.\n    @author Phil Burk  http://www.softsynth.com\n*/\n/*\n * $Id$\n *\n * This program uses the PortAudio Portable Audio Library.\n * For more information see: http://www.portaudio.com\n * Copyright (c) 1999-2000 Ross Bencina and Phil Burk\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <math.h>\n#include <string.h>\n#include \"portaudio.h\"\n\n#ifndef M_PI\n#define M_PI  (3.14159265)\n#endif\n#define TWOPI (M_PI * 2.0)\n\n#define DEFAULT_BUFFER_SIZE   (32)\n\ntypedef struct\n{\n    double left_phase;\n    double right_phase;\n}\npaTestData;\n\n/* Very simple synthesis routine to generate two sine waves. */\nstatic int paminlatCallback( const void *inputBuffer, void *outputBuffer,\n                             unsigned long framesPerBuffer,\n                             const PaStreamCallbackTimeInfo* timeInfo,\n                             PaStreamCallbackFlags statusFlags,\n                             void *userData )\n{\n    paTestData *data = (paTestData*)userData;\n    float *out = (float*)outputBuffer;\n    unsigned int i;\n    double left_phaseInc = 0.02;\n    double right_phaseInc = 0.06;\n\n    double left_phase = data->left_phase;\n    double right_phase = data->right_phase;\n\n    for( i=0; i<framesPerBuffer; i++ )\n    {\n        left_phase += left_phaseInc;\n        if( left_phase > TWOPI ) left_phase -= TWOPI;\n        *out++ = (float) sin( left_phase );\n\n        right_phase += right_phaseInc;\n        if( right_phase > TWOPI ) right_phase -= TWOPI;\n        *out++ = (float) sin( right_phase );\n    }\n\n    data->left_phase = left_phase;\n    data->right_phase = right_phase;\n    return 0;\n}\n\nint main( int argc, char **argv );\nint main( int argc, char **argv )\n{\n    PaStreamParameters outputParameters;\n    PaStream *stream;\n    PaError err;\n    paTestData data;\n    int    go;\n    int    outLatency = 0;\n    int    minLatency = DEFAULT_BUFFER_SIZE * 2;\n    int    framesPerBuffer;\n    double sampleRate = 44100.0;\n    char   str[256];\n    char  *line;\n\n    printf(\"pa_minlat - Determine minimum latency for your computer.\\n\");\n    printf(\"  usage:         pa_minlat {userBufferSize}\\n\");\n    printf(\"  for example:   pa_minlat 64\\n\");\n    printf(\"Adjust your stereo until you hear a smooth tone in each speaker.\\n\");\n    printf(\"Then try to find the smallest number of frames that still sounds smooth.\\n\");\n    printf(\"Note that the sound will stop momentarily when you change the number of buffers.\\n\");\n\n    /* Get bufferSize from command line. */\n    framesPerBuffer = ( argc > 1 ) ? atol( argv[1] ) : DEFAULT_BUFFER_SIZE;\n    printf(\"Frames per buffer = %d\\n\", framesPerBuffer );\n\n    data.left_phase = data.right_phase = 0.0;\n\n    err = Pa_Initialize();\n    if( err != paNoError ) goto error;\n\n    outLatency = sampleRate * 200.0 / 1000.0; /* 200 msec. */\n\n    /* Try different numBuffers in a loop. */\n    go = 1;\n    while( go )\n    {\n        outputParameters.device                    = Pa_GetDefaultOutputDevice(); /* Default output device. */\n        outputParameters.channelCount              = 2;                           /* Stereo output */\n        outputParameters.sampleFormat              = paFloat32;                   /* 32 bit floating point output. */\n        outputParameters.suggestedLatency          = (double)outLatency / sampleRate; /* In seconds. */\n        outputParameters.hostApiSpecificStreamInfo = NULL;\n\n        printf(\"Latency = %d frames = %6.1f msec.\\n\", outLatency, outputParameters.suggestedLatency * 1000.0 );\n\n        err = Pa_OpenStream(\n                  &stream,\n                  NULL, /* no input */\n                  &outputParameters,\n                  sampleRate,\n                  framesPerBuffer,\n                  paClipOff,      /* we won't output out of range samples so don't bother clipping them */\n                  paminlatCallback,\n                  &data );\n        if( err != paNoError ) goto error;\n        if( stream == NULL ) goto error;\n\n        /* Start audio. */\n        err = Pa_StartStream( stream );\n        if( err != paNoError ) goto error;\n\n        /* Ask user for a new nlatency. */\n        printf(\"\\nMove windows around to see if the sound glitches.\\n\");\n        printf(\"Latency now %d, enter new number of frames, or 'q' to quit: \", outLatency );\n        line = fgets( str, 256, stdin );\n        if( line == NULL )\n        {\n            go = 0;\n        }\n        else\n        {\n            {\n                /* Get rid of newline */\n                size_t l = strlen( str ) - 1;\n                if( str[ l ] == '\\n')\n                    str[ l ] = '\\0';\n            }\n\n\n            if( str[0] == 'q' ) go = 0;\n            else\n            {\n                outLatency = atol( str );\n                if( outLatency < minLatency )\n                {\n                    printf( \"Latency below minimum of %d! Set to minimum!!!\\n\", minLatency );\n                    outLatency = minLatency;\n                }\n            }\n\n        }\n        /* Stop sound until ENTER hit. */\n        err = Pa_StopStream( stream );\n        if( err != paNoError ) goto error;\n        err = Pa_CloseStream( stream );\n        if( err != paNoError ) goto error;\n    }\n    printf(\"A good setting for latency would be somewhat higher than\\n\");\n    printf(\"the minimum latency that worked.\\n\");\n    printf(\"PortAudio: Test finished.\\n\");\n    Pa_Terminate();\n    return 0;\nerror:\n    Pa_Terminate();\n    fprintf( stderr, \"An error occurred while using the portaudio stream\\n\" );\n    fprintf( stderr, \"Error number: %d\\n\", err );\n    fprintf( stderr, \"Error message: %s\\n\", Pa_GetErrorText( err ) );\n    return 1;\n}\n"
  },
  {
    "path": "thirdparty/portaudio/test/patest1.c",
    "content": "/** @file patest1.c\n    @ingroup test_src\n    @brief Ring modulate the audio input with a sine wave for 20 seconds.\n    @author Ross Bencina <rossb@audiomulch.com>\n*/\n/*\n * $Id$\n *\n * This program uses the PortAudio Portable Audio Library.\n * For more information see: http://www.portaudio.com\n * Copyright (c) 1999-2000 Ross Bencina and Phil Burk\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n#include <stdio.h>\n#include <math.h>\n#include \"portaudio.h\"\n\n#ifndef M_PI\n#define M_PI (3.14159265)\n#endif\n\n#define SAMPLE_RATE (44100)\n\ntypedef struct\n{\n    float sine[100];\n    int phase;\n    int sampsToGo;\n}\npatest1data;\n\nstatic int patest1Callback( const void *inputBuffer, void *outputBuffer,\n                            unsigned long framesPerBuffer,\n                            const PaStreamCallbackTimeInfo* timeInfo,\n                            PaStreamCallbackFlags statusFlags,\n                            void *userData )\n{\n    patest1data *data = (patest1data*)userData;\n    float *in = (float*)inputBuffer;\n    float *out = (float*)outputBuffer;\n    int framesToCalc = framesPerBuffer;\n    unsigned long i = 0;\n    int finished;\n\n    if( data->sampsToGo < framesPerBuffer )\n    {\n        framesToCalc = data->sampsToGo;\n        finished = paComplete;\n    }\n    else\n    {\n        finished = paContinue;\n    }\n\n    for( ; i<framesToCalc; i++ )\n    {\n        *out++ = *in++ * data->sine[data->phase];  /* left */\n        *out++ = *in++ * data->sine[data->phase++];  /* right */\n        if( data->phase >= 100 )\n            data->phase = 0;\n    }\n\n    data->sampsToGo -= framesToCalc;\n\n    /* zero remainder of final buffer if not already done */\n    for( ; i<framesPerBuffer; i++ )\n    {\n        *out++ = 0; /* left */\n        *out++ = 0; /* right */\n    }\n\n    return finished;\n}\n\nint main(int argc, char* argv[]);\nint main(int argc, char* argv[])\n{\n    PaStream                *stream;\n    PaError                 err;\n    patest1data             data;\n    int                     i;\n    PaStreamParameters      inputParameters, outputParameters;\n    const PaHostErrorInfo*  herr;\n\n    printf(\"patest1.c\\n\"); fflush(stdout);\n    printf(\"Ring modulate input for 20 seconds.\\n\"); fflush(stdout);\n\n    /* initialise sinusoidal wavetable */\n    for( i=0; i<100; i++ )\n        data.sine[i] = sin( ((double)i/100.) * M_PI * 2. );\n    data.phase = 0;\n    data.sampsToGo = SAMPLE_RATE * 20;        /* 20 seconds. */\n\n    /* initialise portaudio subsystem */\n    err = Pa_Initialize();\n\n    inputParameters.device = Pa_GetDefaultInputDevice();    /* default input device */\n    if (inputParameters.device == paNoDevice) {\n        fprintf(stderr, \"Error: No input default device.\\n\");\n        goto done;\n    }\n    inputParameters.channelCount = 2;                       /* stereo input */\n    inputParameters.sampleFormat = paFloat32;               /* 32 bit floating point input */\n    inputParameters.suggestedLatency = Pa_GetDeviceInfo( inputParameters.device )->defaultLowInputLatency;\n    inputParameters.hostApiSpecificStreamInfo = NULL;\n\n    outputParameters.device = Pa_GetDefaultOutputDevice();  /* default output device */\n    if (outputParameters.device == paNoDevice) {\n        fprintf(stderr,\"Error: No default output device.\\n\");\n        goto done;\n    }\n    outputParameters.channelCount = 2;                      /* stereo output */\n    outputParameters.sampleFormat = paFloat32;              /* 32 bit floating point output */\n    outputParameters.suggestedLatency = Pa_GetDeviceInfo( outputParameters.device )->defaultLowOutputLatency;\n    outputParameters.hostApiSpecificStreamInfo = NULL;\n\n    err = Pa_OpenStream(\n                        &stream,\n                        &inputParameters,\n                        &outputParameters,\n                        (double)SAMPLE_RATE, /* Samplerate in Hertz. */\n                        512,                 /* Small buffers */\n                        paClipOff,           /* We won't output out of range samples so don't bother clipping them. */\n                        patest1Callback,\n                        &data );\n    if( err != paNoError ) goto done;\n\n    err = Pa_StartStream( stream );\n    if( err != paNoError ) goto done;\n\n    printf( \"Press any key to end.\\n\" ); fflush(stdout);\n\n    getc( stdin ); /* wait for input before exiting */\n\n    err = Pa_AbortStream( stream );\n    if( err != paNoError ) goto done;\n\n    printf( \"Waiting for stream to complete...\\n\" );\n\n    /* sleep until playback has finished */\n    while( ( err = Pa_IsStreamActive( stream ) ) == 1 ) Pa_Sleep(1000);\n    if( err < 0 ) goto done;\n\n    err = Pa_CloseStream( stream );\n    if( err != paNoError ) goto done;\n\ndone:\n    Pa_Terminate();\n\n    if( err != paNoError )\n    {\n        fprintf( stderr, \"An error occurred while using portaudio\\n\" );\n        if( err == paUnanticipatedHostError )\n        {\n            fprintf( stderr, \" unanticipated host error.\\n\");\n            herr = Pa_GetLastHostErrorInfo();\n            if (herr)\n            {\n                fprintf( stderr, \" Error number: %ld\\n\", herr->errorCode );\n                if (herr->errorText)\n                    fprintf( stderr, \" Error text: %s\\n\", herr->errorText );\n            }\n            else\n                fprintf( stderr, \" Pa_GetLastHostErrorInfo() failed!\\n\" );\n        }\n        else\n        {\n            fprintf( stderr, \" Error number: %d\\n\", err );\n            fprintf( stderr, \" Error text: %s\\n\", Pa_GetErrorText( err ) );\n        }\n\n        err = 1;          /* Always return 0 or 1, but no other return codes. */\n    }\n\n    printf( \"bye\\n\" );\n\n    return err;\n}\n"
  },
  {
    "path": "thirdparty/portaudio/test/patest_buffer.c",
    "content": "/** @file patest_buffer.c\n    @ingroup test_src\n    @brief Test opening streams with different buffer sizes.\n    @author Phil Burk  http://www.softsynth.com\n*/\n/*\n * $Id$\n *\n * This program uses the PortAudio Portable Audio Library.\n * For more information see: http://www.portaudio.com\n * Copyright (c) 1999-2000 Ross Bencina and Phil Burk\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <math.h>\n#include \"portaudio.h\"\n#define NUM_SECONDS   (3)\n#define SAMPLE_RATE   (44100)\n#ifndef M_PI\n#define M_PI  (3.14159265)\n#endif\n#define TABLE_SIZE   (200)\n\n#define BUFFER_TABLE  14\nlong buffer_table[] = {paFramesPerBufferUnspecified,16,32,64,128,200,256,500,512,600,723,1000,1024,2345};\n\ntypedef struct\n{\n    short sine[TABLE_SIZE];\n    int left_phase;\n    int right_phase;\n    unsigned int sampsToGo;\n}\npaTestData;\nPaError TestOnce( int buffersize, PaDeviceIndex );\n\n/* This routine will be called by the PortAudio engine when audio is needed.\n** It may called at interrupt level on some machines so don't do anything\n** that could mess up the system like calling malloc() or free().\n*/\nstatic int patest1Callback( const void *inputBuffer, void *outputBuffer,\n                            unsigned long framesPerBuffer,\n                            const PaStreamCallbackTimeInfo* timeInfo,\n                            PaStreamCallbackFlags statusFlags,\n                            void *userData )\n{\n    paTestData *data = (paTestData*)userData;\n    short *out = (short*)outputBuffer;\n    unsigned int i;\n    int finished = 0;\n    (void) inputBuffer; /* Prevent \"unused variable\" warnings. */\n\n    if( data->sampsToGo < framesPerBuffer )\n    {\n        /* final buffer... */\n\n        for( i=0; i<data->sampsToGo; i++ )\n        {\n            *out++ = data->sine[data->left_phase];  /* left */\n            *out++ = data->sine[data->right_phase];  /* right */\n            data->left_phase += 1;\n            if( data->left_phase >= TABLE_SIZE ) data->left_phase -= TABLE_SIZE;\n            data->right_phase += 3; /* higher pitch so we can distinguish left and right. */\n            if( data->right_phase >= TABLE_SIZE ) data->right_phase -= TABLE_SIZE;\n        }\n        /* zero remainder of final buffer */\n        for( ; i<framesPerBuffer; i++ )\n        {\n            *out++ = 0; /* left */\n            *out++ = 0; /* right */\n        }\n\n        finished = 1;\n    }\n    else\n    {\n        for( i=0; i<framesPerBuffer; i++ )\n        {\n            *out++ = data->sine[data->left_phase];  /* left */\n            *out++ = data->sine[data->right_phase];  /* right */\n            data->left_phase += 1;\n            if( data->left_phase >= TABLE_SIZE ) data->left_phase -= TABLE_SIZE;\n            data->right_phase += 3; /* higher pitch so we can distinguish left and right. */\n            if( data->right_phase >= TABLE_SIZE ) data->right_phase -= TABLE_SIZE;\n        }\n        data->sampsToGo -= framesPerBuffer;\n    }\n    return finished;\n}\n\n/*******************************************************************/\nint main(int argc, char **args);\nint main(int argc, char **args)\n{\n    int i;\n    int device = -1;\n    PaError err;\n    printf(\"Test opening streams with different buffer sizes\\n\");\n    if( argc > 1 ) {\n        device=atoi( args[1] );\n        printf(\"Using device number %d.\\n\\n\", device );\n    } else {\n        printf(\"Using default device.\\n\\n\" );\n    }\n\n    for (i = 0 ; i < BUFFER_TABLE; i++)\n    {\n        printf(\"Buffer size %ld\\n\", buffer_table[i]);\n        err = TestOnce(buffer_table[i], device);\n        if( err < 0 ) return 0;\n\n    }\n    return 0;\n}\n\n\nPaError TestOnce( int buffersize, PaDeviceIndex device )\n{\n    PaStreamParameters outputParameters;\n    PaStream *stream;\n    PaError err;\n    paTestData data;\n    int i;\n    int totalSamps;\n    /* initialise sinusoidal wavetable */\n    for( i=0; i<TABLE_SIZE; i++ )\n    {\n        data.sine[i] = (short) (32767.0 * sin( ((double)i/(double)TABLE_SIZE) * M_PI * 2. ));\n    }\n    data.left_phase = data.right_phase = 0;\n    data.sampsToGo = totalSamps =  NUM_SECONDS * SAMPLE_RATE; /* Play for a few seconds. */\n    err = Pa_Initialize();\n    if( err != paNoError ) goto error;\n\n    if( device == -1 )\n        outputParameters.device = Pa_GetDefaultOutputDevice(); /* default output device */\n    else\n        outputParameters.device = device ;\n\n    if (outputParameters.device == paNoDevice) {\n        fprintf(stderr,\"Error: No default output device.\\n\");\n        goto error;\n    }\n\n    outputParameters.channelCount = 2;                      /* stereo output */\n    outputParameters.sampleFormat = paInt16;                /* 32 bit floating point output */\n    outputParameters.suggestedLatency = Pa_GetDeviceInfo( outputParameters.device )->defaultLowOutputLatency;\n    outputParameters.hostApiSpecificStreamInfo = NULL;\n    err = Pa_OpenStream(\n              &stream,\n              NULL,                         /* no input */\n              &outputParameters,\n              SAMPLE_RATE,\n              buffersize,                   /* frames per buffer */\n              (paClipOff | paDitherOff),\n              patest1Callback,\n              &data );\n    if( err != paNoError ) goto error;\n\n    err = Pa_StartStream( stream );\n    if( err != paNoError ) goto error;\n    printf(\"Waiting for sound to finish.\\n\");\n    Pa_Sleep(1000*NUM_SECONDS);\n    err = Pa_CloseStream( stream );\n    if( err != paNoError ) goto error;\n    Pa_Terminate();\n    return paNoError;\nerror:\n    Pa_Terminate();\n    fprintf( stderr, \"An error occurred while using the portaudio stream\\n\" );\n    fprintf( stderr, \"Error number: %d\\n\", err );\n    fprintf( stderr, \"Error message: %s\\n\", Pa_GetErrorText( err ) );\n    fprintf( stderr, \"Host Error message: %s\\n\", Pa_GetLastHostErrorInfo()->errorText );\n    return err;\n}\n"
  },
  {
    "path": "thirdparty/portaudio/test/patest_callbackstop.c",
    "content": "/** @file patest_callbackstop.c\n    @ingroup test_src\n    @brief Test the paComplete callback result code.\n    @author Ross Bencina <rossb@audiomulch.com>\n*/\n/*\n * $Id$\n *\n * This program uses the PortAudio Portable Audio Library.\n * For more information see: http://www.portaudio.com/\n * Copyright (c) 1999-2000 Ross Bencina and Phil Burk\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n#include <stdio.h>\n#include <math.h>\n#include \"portaudio.h\"\n\n#define NUM_SECONDS   (5)\n#define NUM_LOOPS     (4)\n#define SAMPLE_RATE   (44100)\n#define FRAMES_PER_BUFFER  (67)\n\n#ifndef M_PI\n#define M_PI  (3.14159265)\n#endif\n\n#define TABLE_SIZE   (200)\ntypedef struct\n{\n    float sine[TABLE_SIZE];\n    int phase;\n    unsigned long generatedFramesCount;\n    volatile int callbackReturnedPaComplete;\n    volatile int callbackInvokedAfterReturningPaComplete;\n    char message[100];\n}\nTestData;\n\n/*\n   This routine will be called by the PortAudio stream when audio is needed.\n   It may be called at interrupt level on some machines so don't do anything\n   that could mess up the system like calling malloc() or free().\n*/\nstatic int TestCallback( const void *input, void *output,\n                            unsigned long frameCount,\n                            const PaStreamCallbackTimeInfo* timeInfo,\n                            PaStreamCallbackFlags statusFlags,\n                            void *userData )\n{\n    TestData *data = (TestData*)userData;\n    float *out = (float*)output;\n    unsigned long i;\n    float x;\n\n    (void) input;       /* Prevent unused variable warnings. */\n    (void) timeInfo;\n    (void) statusFlags;\n\n\n    if( data->callbackReturnedPaComplete )\n        data->callbackInvokedAfterReturningPaComplete = 1;\n\n    for( i=0; i<frameCount; i++ )\n    {\n        /* generate tone */\n\n        x = data->sine[ data->phase++ ];\n        if( data->phase >= TABLE_SIZE )\n            data->phase -= TABLE_SIZE;\n\n        *out++ = x;  /* left */\n        *out++ = x;  /* right */\n    }\n\n    data->generatedFramesCount += frameCount;\n    if( data->generatedFramesCount >= (NUM_SECONDS * SAMPLE_RATE) )\n    {\n        data->callbackReturnedPaComplete = 1;\n        return paComplete;\n    }\n    else\n    {\n        return paContinue;\n    }\n}\n\n/*\n * This routine is called by portaudio when playback is done.\n */\nstatic void StreamFinished( void* userData )\n{\n    TestData *data = (TestData *) userData;\n    printf( \"Stream Completed: %s\\n\", data->message );\n}\n\n\n/*----------------------------------------------------------------------------*/\nint main(void);\nint main(void)\n{\n    PaStreamParameters outputParameters;\n    PaStream *stream;\n    PaError err;\n    TestData data;\n    int i, j;\n\n\n    printf( \"PortAudio Test: output sine wave. SR = %d, BufSize = %d\\n\",\n            SAMPLE_RATE, FRAMES_PER_BUFFER );\n\n    /* initialise sinusoidal wavetable */\n    for( i=0; i<TABLE_SIZE; i++ )\n    {\n        data.sine[i] = (float) sin( ((double)i/(double)TABLE_SIZE) * M_PI * 2. );\n    }\n\n    err = Pa_Initialize();\n    if( err != paNoError ) goto error;\n\n    outputParameters.device                    = Pa_GetDefaultOutputDevice();\n    if (outputParameters.device == paNoDevice) {\n        fprintf(stderr,\"Error: No default output device.\\n\");\n        goto error;\n    }\n    outputParameters.channelCount              = 2;               /* stereo output */\n    outputParameters.sampleFormat              = paFloat32;       /* 32 bit floating point output */\n    outputParameters.suggestedLatency          = Pa_GetDeviceInfo( outputParameters.device )->defaultLowOutputLatency;\n    outputParameters.hostApiSpecificStreamInfo = NULL;\n\n    err = Pa_OpenStream(\n              &stream,\n              NULL, /* no input */\n              &outputParameters,\n              SAMPLE_RATE,\n              FRAMES_PER_BUFFER,\n              paClipOff,      /* output will be in-range, so no need to clip */\n              TestCallback,\n              &data );\n    if( err != paNoError ) goto error;\n\n    sprintf( data.message, \"Loop: XX\" );\n    err = Pa_SetStreamFinishedCallback( stream, &StreamFinished );\n    if( err != paNoError ) goto error;\n\n    printf(\"Repeating test %d times.\\n\", NUM_LOOPS );\n\n    for( i=0; i < NUM_LOOPS; ++i )\n    {\n        data.phase = 0;\n        data.generatedFramesCount = 0;\n        data.callbackReturnedPaComplete = 0;\n        data.callbackInvokedAfterReturningPaComplete = 0;\n        sprintf( data.message, \"Loop: %d\", i );\n\n        err = Pa_StartStream( stream );\n        if( err != paNoError ) goto error;\n\n        printf(\"Play for %d seconds.\\n\", NUM_SECONDS );\n\n        /* wait for the callback to complete generating NUM_SECONDS of tone */\n\n        do\n        {\n            Pa_Sleep( 500 );\n        }\n        while( !data.callbackReturnedPaComplete );\n\n        printf( \"Callback returned paComplete.\\n\" );\n        printf( \"Waiting for buffers to finish playing...\\n\" );\n\n        /* wait for stream to become inactive,\n           or for a timeout of approximately NUM_SECONDS\n         */\n\n        j = 0;\n        while( (err = Pa_IsStreamActive( stream )) == 1 && j < NUM_SECONDS * 2 )\n        {\n            printf(\".\\n\" );\n            Pa_Sleep( 500 );\n            ++j;\n        }\n\n        if( err < 0 )\n        {\n            goto error;\n        }\n        else if( err == 1 )\n        {\n            printf( \"TEST FAILED: Timed out waiting for buffers to finish playing.\\n\" );\n        }\n        else\n        {\n            printf(\"Buffers finished.\\n\" );\n        }\n\n        if( data.callbackInvokedAfterReturningPaComplete )\n        {\n            printf( \"TEST FAILED: Callback was invoked after returning paComplete.\\n\" );\n        }\n\n\n        err = Pa_StopStream( stream );\n        if( err != paNoError ) goto error;\n\n        printf( \"sleeping for 1 second...\\n\" );\n        Pa_Sleep( 1000 );\n    }\n\n    err = Pa_CloseStream( stream );\n    if( err != paNoError ) goto error;\n\n    Pa_Terminate();\n    printf(\"Test finished.\\n\");\n\n    return err;\nerror:\n    Pa_Terminate();\n    fprintf( stderr, \"An error occurred while using the portaudio stream\\n\" );\n    fprintf( stderr, \"Error number: %d\\n\", err );\n    fprintf( stderr, \"Error message: %s\\n\", Pa_GetErrorText( err ) );\n    return err;\n}\n"
  },
  {
    "path": "thirdparty/portaudio/test/patest_clip.c",
    "content": "/** @file patest_clip.c\n    @ingroup test_src\n    @brief Play a sine wave for several seconds at an amplitude\n    that would require clipping.\n\n    @author Phil Burk  http://www.softsynth.com\n*/\n/*\n * $Id$\n *\n * This program uses the PortAudio Portable Audio Library.\n * For more information see: http://www.portaudio.com\n * Copyright (c) 1999-2000 Ross Bencina and Phil Burk\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n#include <stdio.h>\n#include <math.h>\n#include \"portaudio.h\"\n\n#define NUM_SECONDS   (4)\n#define SAMPLE_RATE   (44100)\n#ifndef M_PI\n#define M_PI  (3.14159265)\n#endif\n#define TABLE_SIZE   (200)\n\ntypedef struct paTestData\n{\n    float sine[TABLE_SIZE];\n    float amplitude;\n    int left_phase;\n    int right_phase;\n}\npaTestData;\n\nPaError PlaySine( paTestData *data, unsigned long flags, float amplitude );\n\n/* This routine will be called by the PortAudio engine when audio is needed.\n** It may called at interrupt level on some machines so don't do anything\n** that could mess up the system like calling malloc() or free().\n*/\nstatic int sineCallback( const void *inputBuffer, void *outputBuffer,\n                            unsigned long framesPerBuffer,\n                            const PaStreamCallbackTimeInfo* timeInfo,\n                            PaStreamCallbackFlags statusFlags,\n                            void *userData )\n{\n    paTestData *data = (paTestData*)userData;\n    float *out = (float*)outputBuffer;\n    float amplitude = data->amplitude;\n    unsigned int i;\n    (void) inputBuffer; /* Prevent \"unused variable\" warnings. */\n    (void) timeInfo;\n    (void) statusFlags;\n\n    for( i=0; i<framesPerBuffer; i++ )\n    {\n        *out++ = amplitude * data->sine[data->left_phase];  /* left */\n        *out++ = amplitude * data->sine[data->right_phase];  /* right */\n        data->left_phase += 1;\n        if( data->left_phase >= TABLE_SIZE ) data->left_phase -= TABLE_SIZE;\n        data->right_phase += 3; /* higher pitch so we can distinguish left and right. */\n        if( data->right_phase >= TABLE_SIZE ) data->right_phase -= TABLE_SIZE;\n    }\n    return 0;\n}\n/*******************************************************************/\nint main(void);\nint main(void)\n{\n    PaError err;\n    paTestData data;\n    int i;\n\n    printf(\"PortAudio Test: output sine wave with and without clipping.\\n\");\n    /* initialise sinusoidal wavetable */\n    for( i=0; i<TABLE_SIZE; i++ )\n    {\n        data.sine[i] = (float) sin( ((double)i/(double)TABLE_SIZE) * M_PI * 2. );\n    }\n\n    printf(\"\\nHalf amplitude. Should sound like sine wave.\\n\"); fflush(stdout);\n    err = PlaySine( &data, paClipOff | paDitherOff, 0.5f );\n    if( err < 0 ) goto error;\n\n    printf(\"\\nFull amplitude. Should sound like sine wave.\\n\"); fflush(stdout);\n    err = PlaySine( &data, paClipOff | paDitherOff, 0.999f );\n    if( err < 0 ) goto error;\n\n    printf(\"\\nOver range with clipping and dithering turned OFF. Should sound very nasty.\\n\");\n    fflush(stdout);\n    err = PlaySine( &data, paClipOff | paDitherOff, 1.1f );\n    if( err < 0 ) goto error;\n\n    printf(\"\\nOver range with clipping and dithering turned ON.  Should sound smoother than previous.\\n\");\n    fflush(stdout);\n    err = PlaySine( &data, paNoFlag, 1.1f );\n    if( err < 0 ) goto error;\n\n    printf(\"\\nOver range with paClipOff but dithering ON.\\n\"\n           \"That forces clipping ON so it should sound the same as previous.\\n\");\n    fflush(stdout);\n    err = PlaySine( &data, paClipOff, 1.1f );\n    if( err < 0 ) goto error;\n\n    return 0;\nerror:\n    fprintf( stderr, \"An error occurred while using the portaudio stream\\n\" );\n    fprintf( stderr, \"Error number: %d\\n\", err );\n    fprintf( stderr, \"Error message: %s\\n\", Pa_GetErrorText( err ) );\n    return 1;\n}\n/*****************************************************************************/\nPaError PlaySine( paTestData *data, unsigned long flags, float amplitude )\n{\n    PaStreamParameters outputParameters;\n    PaStream *stream;\n    PaError err;\n\n    data->left_phase = data->right_phase = 0;\n    data->amplitude = amplitude;\n\n    err = Pa_Initialize();\n    if( err != paNoError ) goto error;\n\n    outputParameters.device = Pa_GetDefaultOutputDevice(); /* default output device */\n    if (outputParameters.device == paNoDevice) {\n        fprintf(stderr,\"Error: No default output device.\\n\");\n        goto error;\n    }\n    outputParameters.channelCount = 2;       /* stereo output */\n    outputParameters.sampleFormat = paFloat32; /* 32 bit floating point output */\n    outputParameters.suggestedLatency = Pa_GetDeviceInfo( outputParameters.device )->defaultLowOutputLatency;\n    outputParameters.hostApiSpecificStreamInfo = NULL;\n\n    err = Pa_OpenStream(\n              &stream,\n              NULL, /* no input */\n              &outputParameters,\n              SAMPLE_RATE,\n              1024,\n              flags,\n              sineCallback,\n              data );\n    if( err != paNoError ) goto error;\n\n    err = Pa_StartStream( stream );\n    if( err != paNoError ) goto error;\n\n    Pa_Sleep( NUM_SECONDS * 1000 );\n    printf(\"CPULoad = %8.6f\\n\", Pa_GetStreamCpuLoad( stream ) );\n\n    err = Pa_CloseStream( stream );\n    if( err != paNoError ) goto error;\n\n    Pa_Terminate();\n    return paNoError;\nerror:\n    return err;\n}\n"
  },
  {
    "path": "thirdparty/portaudio/test/patest_converters.c",
    "content": "/** @file patest_converters.c\n    @ingroup test_src\n    @brief Tests the converter functions in pa_converters.c\n    @author Ross Bencina <rossb@audiomulch.com>\n\n    Link with pa_dither.c and pa_converters.c\n\n    see http://www.portaudio.com/trac/wiki/V19ConvertersStatus for a discussion of this.\n*/\n/*\n * $Id: $\n *\n * This program uses the PortAudio Portable Audio Library.\n * For more information see: http://www.portaudio.com/\n * Copyright (c) 1999-2008 Ross Bencina and Phil Burk\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <math.h>\n\n#include \"portaudio.h\"\n#include \"pa_converters.h\"\n#include \"pa_dither.h\"\n#include \"pa_types.h\"\n#include \"pa_endianness.h\"\n\n#ifndef M_PI\n#define M_PI  (3.14159265)\n#endif\n\n#define MAX_PER_CHANNEL_FRAME_COUNT     (2048)\n#define MAX_CHANNEL_COUNT               (8)\n\n\n#define SAMPLE_FORMAT_COUNT (6)\n\nstatic PaSampleFormat sampleFormats_[ SAMPLE_FORMAT_COUNT ] =\n    { paFloat32, paInt32, paInt24, paInt16, paInt8, paUInt8 }; /* all standard PA sample formats */\n\nstatic const char* sampleFormatNames_[SAMPLE_FORMAT_COUNT] =\n    { \"paFloat32\", \"paInt32\", \"paInt24\", \"paInt16\", \"paInt8\", \"paUInt8\" };\n\n\nstatic const char* abbreviatedSampleFormatNames_[SAMPLE_FORMAT_COUNT] =\n    { \"f32\", \"i32\", \"i24\", \"i16\", \" i8\", \"ui8\" };\n\n\nPaError My_Pa_GetSampleSize( PaSampleFormat format );\n\n/*\n    available flags are paClipOff and paDitherOff\n    clipping is usually applied for float -> int conversions\n    dither is usually applied for all downconversions (ie anything but 8bit->8bit conversions\n*/\n\nstatic int CanClip( PaSampleFormat sourceFormat, PaSampleFormat destinationFormat )\n{\n    if( sourceFormat == paFloat32 && destinationFormat != sourceFormat )\n        return 1;\n    else\n        return 0;\n}\n\nstatic int CanDither( PaSampleFormat sourceFormat, PaSampleFormat destinationFormat )\n{\n    if( sourceFormat < destinationFormat && sourceFormat != paInt8 )\n        return 1;\n    else\n        return 0;\n}\n\nstatic void GenerateOneCycleSineReference( double *out, int frameCount, int strideFrames )\n{\n    int i;\n    for( i=0; i < frameCount; ++i ){\n        *out = sin( ((double)i/(double)frameCount) * 2. * M_PI );\n        out += strideFrames;\n    }\n}\n\n\nstatic void GenerateOneCycleSine( PaSampleFormat format, void *buffer, int frameCount, int strideFrames )\n{\n    switch( format ){\n\n        case paFloat32:\n            {\n                int i;\n                float *out = (float*)buffer;\n                for( i=0; i < frameCount; ++i ){\n                    *out = (float).9 * sin( ((double)i/(double)frameCount) * 2. * M_PI );\n                    out += strideFrames;\n                }\n            }\n            break;\n        case paInt32:\n            {\n                int i;\n                PaInt32 *out = (PaInt32*)buffer;\n                for( i=0; i < frameCount; ++i ){\n                    *out = (PaInt32)(.9 * sin( ((double)i/(double)frameCount) * 2. * M_PI ) * 0x7FFFFFFF);\n                    out += strideFrames;\n                }\n            }\n            break;\n        case paInt24:\n            {\n                int i;\n                unsigned char *out = (unsigned char*)buffer;\n                for( i=0; i < frameCount; ++i ){\n                    signed long temp = (PaInt32)(.9 * sin( ((double)i/(double)frameCount) * 2. * M_PI ) * 0x7FFFFFFF);\n\n                    #if defined(PA_LITTLE_ENDIAN)\n                            out[0] = (unsigned char)(temp >> 8) & 0xFF;\n                            out[1] = (unsigned char)(temp >> 16) & 0xFF;\n                            out[2] = (unsigned char)(temp >> 24) & 0xFF;\n                    #elif defined(PA_BIG_ENDIAN)\n                            out[0] = (unsigned char)(temp >> 24) & 0xFF;\n                            out[1] = (unsigned char)(temp >> 16) & 0xFF;\n                            out[2] = (unsigned char)(temp >> 8) & 0xFF;\n                    #endif\n                    out += 3;\n                }\n            }\n            break;\n        case paInt16:\n            {\n                int i;\n                PaInt16 *out = (PaInt16*)buffer;\n                for( i=0; i < frameCount; ++i ){\n                    *out = (PaInt16)(.9 * sin( ((double)i/(double)frameCount) * 2. * M_PI ) * 0x7FFF );\n                    out += strideFrames;\n                }\n            }\n            break;\n        case paInt8:\n            {\n                int i;\n                signed char *out = (signed char*)buffer;\n                for( i=0; i < frameCount; ++i ){\n                    *out = (signed char)(.9 * sin( ((double)i/(double)frameCount) * 2. * M_PI ) * 0x7F );\n                    out += strideFrames;\n                }\n            }\n            break;\n        case paUInt8:\n            {\n                int i;\n                unsigned char *out = (unsigned char*)buffer;\n                for( i=0; i < frameCount; ++i ){\n                    *out = (unsigned char)( .5 * (1. + (.9 * sin( ((double)i/(double)frameCount) * 2. * M_PI ))) * 0xFF  );\n                    out += strideFrames;\n                }\n            }\n            break;\n    }\n}\n\nint TestNonZeroPresent( void *buffer, int size )\n{\n    char *p = (char*)buffer;\n    int i;\n\n    for( i=0; i < size; ++i ){\n\n        if( *p != 0 )\n            return 1;\n        ++p;\n    }\n\n    return 0;\n}\n\nfloat MaximumAbsDifference( float* sourceBuffer, float* referenceBuffer, int count )\n{\n    float result = 0;\n    float difference;\n    while( count-- ){\n        difference = fabs( *sourceBuffer++ - *referenceBuffer++ );\n        if( difference > result )\n            result = difference;\n    }\n\n    return result;\n}\n\nint main( const char **argv, int argc )\n{\n    PaUtilTriangularDitherGenerator ditherState;\n    PaUtilConverter *converter;\n    void *destinationBuffer, *sourceBuffer;\n    double *referenceBuffer;\n    int sourceFormatIndex, destinationFormatIndex;\n    PaSampleFormat sourceFormat, destinationFormat;\n    PaStreamFlags flags;\n    int passFailMatrix[SAMPLE_FORMAT_COUNT][SAMPLE_FORMAT_COUNT]; // [source][destination]\n    float noiseAmplitudeMatrix[SAMPLE_FORMAT_COUNT][SAMPLE_FORMAT_COUNT]; // [source][destination]\n    float amp;\n\n#define FLAG_COMBINATION_COUNT (4)\n    PaStreamFlags flagCombinations[FLAG_COMBINATION_COUNT] = { paNoFlag, paClipOff, paDitherOff, paClipOff | paDitherOff };\n    const char *flagCombinationNames[FLAG_COMBINATION_COUNT] = { \"paNoFlag\", \"paClipOff\", \"paDitherOff\", \"paClipOff | paDitherOff\" };\n    int flagCombinationIndex;\n\n    PaUtil_InitializeTriangularDitherState( &ditherState );\n\n    /* allocate more than enough space, we use sizeof(float) but we need to fit any 32 bit datum */\n\n    destinationBuffer = (void*)malloc( MAX_PER_CHANNEL_FRAME_COUNT * MAX_CHANNEL_COUNT * sizeof(float) );\n    sourceBuffer = (void*)malloc( MAX_PER_CHANNEL_FRAME_COUNT * MAX_CHANNEL_COUNT * sizeof(float) );\n    referenceBuffer = (void*)malloc( MAX_PER_CHANNEL_FRAME_COUNT * MAX_CHANNEL_COUNT * sizeof(float) );\n\n\n    /* the first round of tests simply iterates through the buffer combinations testing\n        that putting something in gives something out */\n\n    printf( \"= Sine wave in, something out =\\n\" );\n\n    printf( \"\\n\" );\n\n    GenerateOneCycleSine( paFloat32, referenceBuffer, MAX_PER_CHANNEL_FRAME_COUNT, 1 );\n\n    for( flagCombinationIndex = 0; flagCombinationIndex < FLAG_COMBINATION_COUNT; ++flagCombinationIndex ){\n        flags = flagCombinations[flagCombinationIndex];\n\n        printf( \"\\n\" );\n        printf( \"== flags = %s ==\\n\", flagCombinationNames[flagCombinationIndex] );\n\n        for( sourceFormatIndex = 0; sourceFormatIndex < SAMPLE_FORMAT_COUNT; ++sourceFormatIndex ){\n            for( destinationFormatIndex = 0; destinationFormatIndex < SAMPLE_FORMAT_COUNT; ++destinationFormatIndex ){\n                sourceFormat = sampleFormats_[sourceFormatIndex];\n                destinationFormat = sampleFormats_[destinationFormatIndex];\n                //printf( \"%s -> %s \", sampleFormatNames_[ sourceFormatIndex ], sampleFormatNames_[ destinationFormatIndex ] );\n\n                converter = PaUtil_SelectConverter( sourceFormat, destinationFormat, flags );\n\n                /* source is a sinewave */\n                GenerateOneCycleSine( sourceFormat, sourceBuffer, MAX_PER_CHANNEL_FRAME_COUNT, 1 );\n\n                /* zero destination */\n                memset( destinationBuffer, 0, MAX_PER_CHANNEL_FRAME_COUNT * My_Pa_GetSampleSize( destinationFormat ) );\n\n                (*converter)( destinationBuffer, 1, sourceBuffer, 1, MAX_PER_CHANNEL_FRAME_COUNT, &ditherState );\n\n    /*\n    Other ways we could test this would be:\n        - pass a constant, check for a constant (wouldn't work with dither)\n        - pass alternating +/-, check for the same...\n    */\n                if( TestNonZeroPresent( destinationBuffer, MAX_PER_CHANNEL_FRAME_COUNT * My_Pa_GetSampleSize( destinationFormat ) ) ){\n                    //printf( \"PASSED\\n\" );\n                    passFailMatrix[sourceFormatIndex][destinationFormatIndex] = 1;\n                }else{\n                    //printf( \"FAILED\\n\" );\n                    passFailMatrix[sourceFormatIndex][destinationFormatIndex] = 0;\n                }\n\n\n                /* try to measure the noise floor (comparing output signal to a float32 sine wave) */\n\n                if( passFailMatrix[sourceFormatIndex][destinationFormatIndex] ){\n\n                    /* convert destination back to paFloat32 into source */\n                    converter = PaUtil_SelectConverter( destinationFormat, paFloat32, paNoFlag );\n\n                    memset( sourceBuffer, 0, MAX_PER_CHANNEL_FRAME_COUNT * My_Pa_GetSampleSize( paFloat32 ) );\n                    (*converter)( sourceBuffer, 1, destinationBuffer, 1, MAX_PER_CHANNEL_FRAME_COUNT, &ditherState );\n\n                    if( TestNonZeroPresent( sourceBuffer, MAX_PER_CHANNEL_FRAME_COUNT * My_Pa_GetSampleSize( paFloat32 ) ) ){\n\n                        noiseAmplitudeMatrix[sourceFormatIndex][destinationFormatIndex] = MaximumAbsDifference( (float*)sourceBuffer, (float*)referenceBuffer, MAX_PER_CHANNEL_FRAME_COUNT );\n\n                    }else{\n                        /* can't test noise floor because there is no conversion from dest format to float available */\n                        noiseAmplitudeMatrix[sourceFormatIndex][destinationFormatIndex] = -1; // mark as failed\n                    }\n                }else{\n                    noiseAmplitudeMatrix[sourceFormatIndex][destinationFormatIndex] = -1; // mark as failed\n                }\n            }\n        }\n\n        printf( \"\\n\" );\n        printf( \"=== Output contains non-zero data ===\\n\" );\n        printf( \"Key: . - pass, X - fail\\n\" );\n        printf( \"{{{\\n\" ); // trac preformated text tag\n        printf( \"in|  out:    \" );\n        for( destinationFormatIndex = 0; destinationFormatIndex < SAMPLE_FORMAT_COUNT; ++destinationFormatIndex ){\n            printf( \"  %s   \", abbreviatedSampleFormatNames_[destinationFormatIndex] );\n        }\n        printf( \"\\n\" );\n\n        for( sourceFormatIndex = 0; sourceFormatIndex < SAMPLE_FORMAT_COUNT; ++sourceFormatIndex ){\n            printf( \"%s         \", abbreviatedSampleFormatNames_[sourceFormatIndex] );\n            for( destinationFormatIndex = 0; destinationFormatIndex < SAMPLE_FORMAT_COUNT; ++destinationFormatIndex ){\n                printf( \"   %s   \", (passFailMatrix[sourceFormatIndex][destinationFormatIndex])? \" .\" : \" X\" );\n            }\n            printf( \"\\n\" );\n        }\n        printf( \"}}}\\n\" ); // trac preformated text tag\n\n        printf( \"\\n\" );\n        printf( \"=== Combined dynamic range (src->dest->float32) ===\\n\" );\n        printf( \"Key: Noise amplitude in dBfs, X - fail (either above failed or dest->float32 failed)\\n\" );\n        printf( \"{{{\\n\" ); // trac preformated text tag\n        printf( \"in|  out:    \" );\n        for( destinationFormatIndex = 0; destinationFormatIndex < SAMPLE_FORMAT_COUNT; ++destinationFormatIndex ){\n            printf( \"  %s   \", abbreviatedSampleFormatNames_[destinationFormatIndex] );\n        }\n        printf( \"\\n\" );\n\n        for( sourceFormatIndex = 0; sourceFormatIndex < SAMPLE_FORMAT_COUNT; ++sourceFormatIndex ){\n            printf( \" %s       \", abbreviatedSampleFormatNames_[sourceFormatIndex] );\n            for( destinationFormatIndex = 0; destinationFormatIndex < SAMPLE_FORMAT_COUNT; ++destinationFormatIndex ){\n                amp = noiseAmplitudeMatrix[sourceFormatIndex][destinationFormatIndex];\n                if( amp < 0. )\n                    printf( \"    X   \" );\n                else\n                    printf( \" % 6.1f \", 20.*log10(amp) );\n            }\n            printf( \"\\n\" );\n        }\n        printf( \"}}}\\n\" ); // trac preformated text tag\n    }\n\n\n    free( destinationBuffer );\n    free( sourceBuffer );\n    free( referenceBuffer );\n}\n\n// copied here for now otherwise we need to include the world just for this function.\nPaError My_Pa_GetSampleSize( PaSampleFormat format )\n{\n    int result;\n\n    switch( format & ~paNonInterleaved )\n    {\n\n    case paUInt8:\n    case paInt8:\n        result = 1;\n        break;\n\n    case paInt16:\n        result = 2;\n        break;\n\n    case paInt24:\n        result = 3;\n        break;\n\n    case paFloat32:\n    case paInt32:\n        result = 4;\n        break;\n\n    default:\n        result = paSampleFormatNotSupported;\n        break;\n    }\n\n    return (PaError) result;\n}\n"
  },
  {
    "path": "thirdparty/portaudio/test/patest_dither.c",
    "content": "/** @file patest_dither.c\n    @ingroup test_src\n    @brief Attempt to hear difference between dithered and non-dithered signal.\n\n    This only has an effect if the native format is 16 bit.\n\n    @author Phil Burk  http://www.softsynth.com\n*/\n/*\n * $Id$\n *\n * This program uses the PortAudio Portable Audio Library.\n * For more information see: http://www.portaudio.com\n * Copyright (c) 1999-2000 Ross Bencina and Phil Burk\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n#include <stdio.h>\n#include <math.h>\n\n#include \"portaudio.h\"\n\n#define NUM_SECONDS   (5)\n#define SAMPLE_RATE   (44100)\n#ifndef M_PI\n#define M_PI  (3.14159265)\n#endif\n#define TABLE_SIZE   (200)\n\ntypedef struct paTestData\n{\n    float sine[TABLE_SIZE];\n    float amplitude;\n    int   left_phase;\n    int   right_phase;\n}\npaTestData;\n\n/* This routine will be called by the PortAudio engine when audio is needed.\n** It may called at interrupt level on some machines so don't do anything\n** that could mess up the system like calling malloc() or free().\n*/\nstatic int sineCallback( const void *inputBuffer, void *outputBuffer,\n                         unsigned long framesPerBuffer,\n                         const PaStreamCallbackTimeInfo *timeInfo,\n                         PaStreamCallbackFlags statusFlags, void *userData )\n{\n    paTestData *data = (paTestData*)userData;\n    float *out = (float*)outputBuffer;\n    float amplitude = data->amplitude;\n    unsigned int i;\n    (void) inputBuffer;\n\n    for( i=0; i<framesPerBuffer; i++ )\n    {\n        *out++ = amplitude * data->sine[data->left_phase];  /* left */\n        *out++ = amplitude * data->sine[data->right_phase];  /* right */\n        data->left_phase += 1;\n        if( data->left_phase >= TABLE_SIZE ) data->left_phase -= TABLE_SIZE;\n        data->right_phase += 3; /* higher pitch so we can distinguish left and right. */\n        if( data->right_phase >= TABLE_SIZE ) data->right_phase -= TABLE_SIZE;\n    }\n    return 0;\n}\n\n/*****************************************************************************/\n/*\n    V18 version did not call Pa_Terminate() if Pa_Initialize() failed.\n    This V19 version ALWAYS calls Pa_Terminate(). PS.\n*/\nPaError PlaySine( paTestData *data, PaStreamFlags flags, float amplitude );\nPaError PlaySine( paTestData *data, PaStreamFlags flags, float amplitude )\n{\n    PaStream*           stream;\n    PaStreamParameters  outputParameters;\n    PaError             err;\n\n    data->left_phase = data->right_phase = 0;\n    data->amplitude  = amplitude;\n\n    err = Pa_Initialize();\n    if (err != paNoError)\n        goto done;\n\n    outputParameters.device = Pa_GetDefaultOutputDevice();  /* default output device */\n    if (outputParameters.device == paNoDevice) {\n        fprintf(stderr,\"Error: No default output device.\\n\");\n        goto done;\n    }\n    outputParameters.channelCount = 2;                      /* stereo output */\n    outputParameters.hostApiSpecificStreamInfo = NULL;\n    outputParameters.sampleFormat = paFloat32;      /* 32 bit floating point output. */\n                                                    /* When you change this, also    */\n                                                    /* adapt the callback routine!   */\n    outputParameters.suggestedLatency = Pa_GetDeviceInfo( outputParameters.device )\n                                        ->defaultLowOutputLatency;   /* Low latency. */\n    err = Pa_OpenStream( &stream,\n                         NULL,                              /* No input. */\n                         &outputParameters,\n                         SAMPLE_RATE,\n                         1024,                              /* frames per buffer */\n                         flags,\n                         sineCallback,\n                         (void*)data );\n    if (err != paNoError)\n        goto done;\n\n    err = Pa_StartStream( stream );\n    if (err != paNoError)\n        goto done;\n\n    Pa_Sleep( NUM_SECONDS * 1000 );\n    printf(\"CPULoad = %8.6f\\n\", Pa_GetStreamCpuLoad(stream));\n\n    err = Pa_CloseStream( stream );\ndone:\n    Pa_Sleep( 250 );  /* Just a small silence. */\n    Pa_Terminate();\n    return err;\n}\n\n\n/*******************************************************************/\nint main(void);\nint main(void)\n{\n    PaError     err;\n    paTestData  DATA;\n    int         i;\n    float       amplitude = 4.0 / (1<<15);\n\n    printf(\"PortAudio Test: output EXTREMELY QUIET sine wave with and without dithering.\\n\");\n    /* initialise sinusoidal wavetable */\n    for( i=0; i<TABLE_SIZE; i++ )\n    {\n        DATA.sine[i] = (float) sin( ((double)i/(double)TABLE_SIZE) * M_PI * 2. );\n    }\n    printf(\"\\nNo treatment..\\n\"); fflush(stdout);\n    err = PlaySine( &DATA, paClipOff | paDitherOff, amplitude );\n    if( err < 0 ) goto done;\n\n    printf(\"\\nClip..\\n\");\n    fflush(stdout);\n    err = PlaySine( &DATA, paDitherOff, amplitude );\n    if( err < 0 ) goto done;\n\n    printf(\"\\nClip and Dither..\\n\");\n    fflush(stdout);\n    err = PlaySine( &DATA, paNoFlag, amplitude );\ndone:\n    if (err)\n        {\n        fprintf( stderr, \"An error occurred while using the portaudio stream\\n\" );\n        fprintf( stderr, \"Error number: %d\\n\", err );\n        fprintf( stderr, \"Error message: %s\\n\", Pa_GetErrorText( err ) );\n        err = 1; /* Though PlaySine() already called Pa_Terminate(), */\n        }        /* we may still call Pa_GetErrorText().             */\n    else\n        printf(\"\\n(Don't forget to turn the VOLUME DOWN after listening so carefully.)\\n\");\n    return err;  /* 0 or 1. */\n}\n"
  },
  {
    "path": "thirdparty/portaudio/test/patest_dsound_find_best_latency_params.c",
    "content": "/*\n * $Id: $\n * Portable Audio I/O Library\n * Windows DirectSound low level buffer user guided parameters search\n *\n * Copyright (c) 2010-2011 Ross Bencina\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n#include <stdio.h>\n#include <time.h>\n#include <math.h>\n\n#define  _WIN32_WINNT 0x0501 /* for GetNativeSystemInfo */\n#include <windows.h>\n//#include <mmsystem.h>   /* required when using pa_win_wmme.h */\n\n#include <conio.h>      /* for _getch */\n\n\n#include \"portaudio.h\"\n#include \"pa_win_ds.h\"\n\n\n#define DEFAULT_SAMPLE_RATE             (44100.)\n\n#ifndef M_PI\n#define M_PI  (3.14159265)\n#endif\n\n#define TABLE_SIZE              (2048)\n\n#define CHANNEL_COUNT           (2)\n\n\n/*******************************************************************/\n/* functions to query and print Windows version information */\n\ntypedef BOOL (WINAPI *LPFN_ISWOW64PROCESS) (HANDLE, PBOOL);\n\nLPFN_ISWOW64PROCESS fnIsWow64Process;\n\nstatic BOOL IsWow64()\n{\n    BOOL bIsWow64 = FALSE;\n\n    //IsWow64Process is not available on all supported versions of Windows.\n    //Use GetModuleHandle to get a handle to the DLL that contains the function\n    //and GetProcAddress to get a pointer to the function if available.\n\n    fnIsWow64Process = (LPFN_ISWOW64PROCESS) GetProcAddress(\n        GetModuleHandle(TEXT(\"kernel32\")),\"IsWow64Process\" );\n\n    if(NULL != fnIsWow64Process)\n    {\n        if (!fnIsWow64Process(GetCurrentProcess(),&bIsWow64))\n        {\n            //handle error\n        }\n    }\n    return bIsWow64;\n}\n\nstatic void printWindowsVersionInfo( FILE *fp )\n{\n    OSVERSIONINFOEX osVersionInfoEx;\n    SYSTEM_INFO systemInfo;\n    const char *osName = \"Unknown\";\n    const char *osProductType = \"\";\n    const char *processorArchitecture = \"Unknown\";\n\n    memset( &osVersionInfoEx, 0, sizeof(OSVERSIONINFOEX) );\n    osVersionInfoEx.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX);\n    GetVersionEx( &osVersionInfoEx );\n\n\n    if( osVersionInfoEx.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS ){\n        switch( osVersionInfoEx.dwMinorVersion ){\n            case 0: osName = \"Windows 95\"; break;\n            case 10: osName = \"Windows 98\"; break;  // could also be 98SE (I've seen code discriminate based\n                                                    // on osInfo.Version.Revision.ToString() == \"2222A\")\n            case 90: osName = \"Windows Me\"; break;\n        }\n    }else if( osVersionInfoEx.dwPlatformId == VER_PLATFORM_WIN32_NT ){\n        switch( osVersionInfoEx.dwMajorVersion ){\n            case 3: osName = \"Windows NT 3.51\"; break;\n            case 4: osName = \"Windows NT 4.0\"; break;\n            case 5: switch( osVersionInfoEx.dwMinorVersion ){\n                        case 0: osName = \"Windows 2000\"; break;\n                        case 1: osName = \"Windows XP\"; break;\n                        case 2:\n                            if( osVersionInfoEx.wSuiteMask & 0x00008000 /*VER_SUITE_WH_SERVER*/ ){\n                                osName = \"Windows Home Server\";\n                            }else{\n                                if( osVersionInfoEx.wProductType == VER_NT_WORKSTATION ){\n                                    osName = \"Windows XP Professional x64 Edition (?)\";\n                                }else{\n                                    if( GetSystemMetrics(/*SM_SERVERR2*/89) == 0 )\n                                        osName = \"Windows Server 2003\";\n                                    else\n                                        osName = \"Windows Server 2003 R2\";\n                                }\n                            }break;\n                    }break;\n            case 6:switch( osVersionInfoEx.dwMinorVersion ){\n                        case 0:\n                            if( osVersionInfoEx.wProductType == VER_NT_WORKSTATION )\n                                osName = \"Windows Vista\";\n                            else\n                                osName = \"Windows Server 2008\";\n                            break;\n                        case 1:\n                            if( osVersionInfoEx.wProductType == VER_NT_WORKSTATION )\n                                osName = \"Windows 7\";\n                            else\n                                osName = \"Windows Server 2008 R2\";\n                            break;\n                    }break;\n        }\n    }\n\n    if(osVersionInfoEx.dwMajorVersion == 4)\n    {\n        if(osVersionInfoEx.wProductType == VER_NT_WORKSTATION)\n            osProductType = \"Workstation\";\n        else if(osVersionInfoEx.wProductType == VER_NT_SERVER)\n            osProductType = \"Server\";\n    }\n    else if(osVersionInfoEx.dwMajorVersion == 5)\n    {\n        if(osVersionInfoEx.wProductType == VER_NT_WORKSTATION)\n        {\n            if((osVersionInfoEx.wSuiteMask & VER_SUITE_PERSONAL) == VER_SUITE_PERSONAL)\n                osProductType = \"Home Edition\"; // Windows XP Home Edition\n            else\n                osProductType = \"Professional\"; // Windows XP / Windows 2000 Professional\n        }\n        else if(osVersionInfoEx.wProductType == VER_NT_SERVER)\n        {\n            if(osVersionInfoEx.dwMinorVersion == 0)\n            {\n                if((osVersionInfoEx.wSuiteMask & VER_SUITE_DATACENTER) == VER_SUITE_DATACENTER)\n                    osProductType = \"Datacenter Server\"; // Windows 2000 Datacenter Server\n                else if((osVersionInfoEx.wSuiteMask & VER_SUITE_ENTERPRISE) == VER_SUITE_ENTERPRISE)\n                    osProductType = \"Advanced Server\"; // Windows 2000 Advanced Server\n                else\n                    osProductType = \"Server\"; // Windows 2000 Server\n            }\n        }\n        else\n        {\n            if((osVersionInfoEx.wSuiteMask & VER_SUITE_DATACENTER) == VER_SUITE_DATACENTER)\n                osProductType = \"Datacenter Edition\"; // Windows Server 2003 Datacenter Edition\n            else if((osVersionInfoEx.wSuiteMask & VER_SUITE_ENTERPRISE) == VER_SUITE_ENTERPRISE)\n                osProductType = \"Enterprise Edition\"; // Windows Server 2003 Enterprise Edition\n            else if((osVersionInfoEx.wSuiteMask & VER_SUITE_BLADE) == VER_SUITE_BLADE)\n                osProductType = \"Web Edition\"; // Windows Server 2003 Web Edition\n            else\n                osProductType = \"Standard Edition\"; // Windows Server 2003 Standard Edition\n        }\n    }\n\n    memset( &systemInfo, 0, sizeof(SYSTEM_INFO) );\n    GetNativeSystemInfo( &systemInfo );\n\n    if( systemInfo.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_INTEL )\n        processorArchitecture = \"x86\";\n    else if( systemInfo.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64 )\n        processorArchitecture = \"x64\";\n    else if( systemInfo.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_IA64 )\n        processorArchitecture = \"Itanium\";\n\n\n    fprintf( fp, \"OS name and edition: %s %s\\n\", osName, osProductType );\n    fprintf( fp, \"OS version: %d.%d.%d %S\\n\",\n                osVersionInfoEx.dwMajorVersion, osVersionInfoEx.dwMinorVersion,\n                osVersionInfoEx.dwBuildNumber, osVersionInfoEx.szCSDVersion );\n    fprintf( fp, \"Processor architecture: %s\\n\", processorArchitecture );\n    fprintf( fp, \"WoW64 process: %s\\n\", IsWow64() ? \"Yes\" : \"No\" );\n}\n\nstatic void printTimeAndDate( FILE *fp )\n{\n    struct tm *local;\n    time_t t;\n\n    t = time(NULL);\n    local = localtime(&t);\n    fprintf(fp, \"Local time and date: %s\", asctime(local));\n    local = gmtime(&t);\n    fprintf(fp, \"UTC time and date: %s\", asctime(local));\n}\n\n/*******************************************************************/\n\ntypedef struct\n{\n    float sine[TABLE_SIZE];\n    double phase;\n    double phaseIncrement;\n    volatile int fadeIn;\n    volatile int fadeOut;\n    double amp;\n}\npaTestData;\n\nstatic paTestData data;\n\n/* This routine will be called by the PortAudio engine when audio is needed.\n** It may called at interrupt level on some machines so don't do anything\n** that could mess up the system like calling malloc() or free().\n*/\nstatic int patestCallback( const void *inputBuffer, void *outputBuffer,\n                            unsigned long framesPerBuffer,\n                            const PaStreamCallbackTimeInfo* timeInfo,\n                            PaStreamCallbackFlags statusFlags,\n                            void *userData )\n{\n    paTestData *data = (paTestData*)userData;\n    float *out = (float*)outputBuffer;\n    unsigned long i,j;\n\n    (void) timeInfo; /* Prevent unused variable warnings. */\n    (void) statusFlags;\n    (void) inputBuffer;\n\n    for( i=0; i<framesPerBuffer; i++ )\n    {\n        float x = data->sine[(int)data->phase];\n        data->phase += data->phaseIncrement;\n        if( data->phase >= TABLE_SIZE ){\n            data->phase -= TABLE_SIZE;\n        }\n\n        x *= data->amp;\n        if( data->fadeIn ){\n            data->amp += .001;\n            if( data->amp >= 1. )\n                data->fadeIn = 0;\n        }else if( data->fadeOut ){\n            if( data->amp > 0 )\n                data->amp -= .001;\n        }\n\n        for( j = 0; j < CHANNEL_COUNT; ++j ){\n            *out++ = x;\n        }\n    }\n\n    if( data->amp > 0 )\n        return paContinue;\n    else\n        return paComplete;\n}\n\n\n#define YES     1\n#define NO      0\n\n\nstatic int playUntilKeyPress( int deviceIndex, float sampleRate,\n                             int framesPerUserBuffer, int framesPerDSoundBuffer )\n{\n    PaStreamParameters outputParameters;\n    PaWinDirectSoundStreamInfo directSoundStreamInfo;\n    PaStream *stream;\n    PaError err;\n    int c;\n\n    outputParameters.device = deviceIndex;\n    outputParameters.channelCount = CHANNEL_COUNT;\n    outputParameters.sampleFormat = paFloat32; /* 32 bit floating point processing */\n    outputParameters.suggestedLatency = 0; /*Pa_GetDeviceInfo( outputParameters.device )->defaultLowOutputLatency;*/\n    outputParameters.hostApiSpecificStreamInfo = NULL;\n\n    directSoundStreamInfo.size = sizeof(PaWinDirectSoundStreamInfo);\n    directSoundStreamInfo.hostApiType = paDirectSound;\n    directSoundStreamInfo.version = 2;\n    directSoundStreamInfo.flags = paWinDirectSoundUseLowLevelLatencyParameters;\n    directSoundStreamInfo.framesPerBuffer = framesPerDSoundBuffer;\n    outputParameters.hostApiSpecificStreamInfo = &directSoundStreamInfo;\n\n    err = Pa_OpenStream(\n              &stream,\n              NULL, /* no input */\n              &outputParameters,\n              sampleRate,\n              framesPerUserBuffer,\n              paClipOff | paPrimeOutputBuffersUsingStreamCallback,      /* we won't output out of range samples so don't bother clipping them */\n              patestCallback,\n              &data );\n    if( err != paNoError ) goto error;\n\n    data.amp = 0;\n    data.fadeIn = 1;\n    data.fadeOut = 0;\n    data.phase = 0;\n    data.phaseIncrement = 15 + ((rand()%100) / 10); // randomise pitch\n\n    err = Pa_StartStream( stream );\n    if( err != paNoError ) goto error;\n\n\n    do{\n        printf( \"Trying buffer size %d.\\nIf it sounds smooth (without clicks or glitches) press 'y', if it sounds bad press 'n' ('q' to quit)\\n\", framesPerDSoundBuffer );\n        c = tolower(_getch());\n        if( c == 'q' ){\n            Pa_Terminate();\n            exit(0);\n        }\n    }while( c != 'y' && c != 'n' );\n\n    data.fadeOut = 1;\n    while( Pa_IsStreamActive(stream) == 1 )\n        Pa_Sleep( 100 );\n\n    err = Pa_StopStream( stream );\n    if( err != paNoError ) goto error;\n\n    err = Pa_CloseStream( stream );\n    if( err != paNoError ) goto error;\n\n    return (c == 'y') ? YES : NO;\n\nerror:\n    return err;\n}\n\n/*******************************************************************/\nstatic void usage( int dsoundHostApiIndex )\n{\n    int i;\n\n    fprintf( stderr, \"PortAudio DirectSound output latency user guided test\\n\" );\n    fprintf( stderr, \"Usage: x.exe dsound-device-index [sampleRate]\\n\" );\n    fprintf( stderr, \"Invalid device index. Use one of these:\\n\" );\n    for( i=0; i < Pa_GetDeviceCount(); ++i ){\n\n        if( Pa_GetDeviceInfo(i)->hostApi == dsoundHostApiIndex && Pa_GetDeviceInfo(i)->maxOutputChannels > 0  )\n            fprintf( stderr, \"%d (%s)\\n\", i, Pa_GetDeviceInfo(i)->name );\n    }\n    Pa_Terminate();\n    exit(-1);\n}\n\n/*\n    ideas:\n        o- could be testing with 80% CPU load\n        o- could test with different channel counts\n*/\n\nint main(int argc, char* argv[])\n{\n    PaError err;\n    int i;\n    int deviceIndex;\n    int dsoundBufferSize, smallestWorkingBufferSize;\n    int smallestWorkingBufferingLatencyFrames;\n    int min, max, mid;\n    int testResult;\n    FILE *resultsFp;\n    int dsoundHostApiIndex;\n    const PaHostApiInfo *dsoundHostApiInfo;\n    double sampleRate = DEFAULT_SAMPLE_RATE;\n\n    err = Pa_Initialize();\n    if( err != paNoError ) goto error;\n\n    dsoundHostApiIndex = Pa_HostApiTypeIdToHostApiIndex( paDirectSound );\n    dsoundHostApiInfo = Pa_GetHostApiInfo( dsoundHostApiIndex );\n\n    if( argc > 3 )\n        usage(dsoundHostApiIndex);\n\n    deviceIndex = dsoundHostApiInfo->defaultOutputDevice;\n    if( argc >= 2 ){\n        deviceIndex = -1;\n        if( sscanf( argv[1], \"%d\", &deviceIndex ) != 1 )\n            usage(dsoundHostApiInfo);\n        if( deviceIndex < 0 || deviceIndex >= Pa_GetDeviceCount() || Pa_GetDeviceInfo(deviceIndex)->hostApi != dsoundHostApiIndex ){\n            usage(dsoundHostApiInfo);\n        }\n    }\n\n    printf( \"Using device id %d (%s)\\n\", deviceIndex, Pa_GetDeviceInfo(deviceIndex)->name );\n\n    if( argc >= 3 ){\n        if( sscanf( argv[2], \"%lf\", &sampleRate ) != 1 )\n            usage(dsoundHostApiIndex);\n    }\n\n    printf( \"Testing with sample rate %f.\\n\", (float)sampleRate );\n\n\n\n    /* initialise sinusoidal wavetable */\n    for( i=0; i<TABLE_SIZE; i++ )\n    {\n        data.sine[i] = (float) sin( ((double)i/(double)TABLE_SIZE) * M_PI * 2. );\n    }\n\n    data.phase = 0;\n\n    resultsFp = fopen( \"results.txt\", \"at\" );\n    fprintf( resultsFp, \"*** DirectSound smallest working output buffer sizes\\n\" );\n\n    printTimeAndDate( resultsFp );\n    printWindowsVersionInfo( resultsFp );\n\n    fprintf( resultsFp, \"audio device: %s\\n\", Pa_GetDeviceInfo( deviceIndex )->name );\n    fflush( resultsFp );\n\n    fprintf( resultsFp, \"Sample rate: %f\\n\", (float)sampleRate );\n    fprintf( resultsFp, \"Smallest working buffer size (frames), Smallest working buffering latency (frames), Smallest working buffering latency (Seconds)\\n\" );\n\n\n    /*\n        Binary search after Niklaus Wirth\n        from http://en.wikipedia.org/wiki/Binary_search_algorithm#The_algorithm\n     */\n    min = 1;\n    max = (int)(sampleRate * .3);   /* we assume that this size works 300ms */\n    smallestWorkingBufferSize = 0;\n\n    do{\n        mid = min + ((max - min) / 2);\n\n        dsoundBufferSize = mid;\n        testResult = playUntilKeyPress( deviceIndex, sampleRate, 0, dsoundBufferSize );\n\n        if( testResult == YES ){\n            max = mid - 1;\n            smallestWorkingBufferSize = dsoundBufferSize;\n        }else{\n            min = mid + 1;\n        }\n\n    }while( (min <= max) && (testResult == YES || testResult == NO) );\n\n    smallestWorkingBufferingLatencyFrames = smallestWorkingBufferSize; /* not strictly true, but we're using an unspecified callback size, so kind of */\n\n    printf( \"Smallest working buffer size is: %d\\n\", smallestWorkingBufferSize );\n    printf( \"Corresponding to buffering latency of %d frames, or %f seconds.\\n\", smallestWorkingBufferingLatencyFrames, smallestWorkingBufferingLatencyFrames / sampleRate );\n\n    fprintf( resultsFp, \"%d, %d, %f\\n\", smallestWorkingBufferSize, smallestWorkingBufferingLatencyFrames, smallestWorkingBufferingLatencyFrames / sampleRate );\n    fflush( resultsFp );\n\n\n    /* power of 2 test. iterate to the smallest power of two that works */\n\n    smallestWorkingBufferSize = 0;\n    dsoundBufferSize = 64;\n\n    do{\n        testResult = playUntilKeyPress( deviceIndex, sampleRate, 0, dsoundBufferSize );\n\n        if( testResult == YES ){\n            smallestWorkingBufferSize = dsoundBufferSize;\n        }else{\n            dsoundBufferSize *= 2;\n        }\n\n    }while( (dsoundBufferSize <= (int)(sampleRate * .3)) && testResult == NO );\n\n    smallestWorkingBufferingLatencyFrames = smallestWorkingBufferSize; /* not strictly true, but we're using an unspecified callback size, so kind of */\n\n    fprintf( resultsFp, \"%d, %d, %f\\n\", smallestWorkingBufferSize, smallestWorkingBufferingLatencyFrames, smallestWorkingBufferingLatencyFrames / sampleRate );\n    fflush( resultsFp );\n\n\n    fprintf( resultsFp, \"###\\n\" );\n    fclose( resultsFp );\n\n    Pa_Terminate();\n    printf(\"Test finished.\\n\");\n\n    return err;\nerror:\n    Pa_Terminate();\n    fprintf( stderr, \"An error occurred while using the PortAudio stream\\n\" );\n    fprintf( stderr, \"Error number: %d\\n\", err );\n    fprintf( stderr, \"Error message: %s\\n\", Pa_GetErrorText( err ) );\n    return err;\n}\n"
  },
  {
    "path": "thirdparty/portaudio/test/patest_dsound_low_level_latency_params.c",
    "content": "/*\n * $Id: $\n * Portable Audio I/O Library\n * Windows DirectSound low level buffer parameters test\n *\n * Copyright (c) 2011 Ross Bencina\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n#include <stdio.h>\n#include <math.h>\n\n#include \"portaudio.h\"\n#include \"pa_win_ds.h\"\n\n#define NUM_SECONDS         (6)\n#define SAMPLE_RATE         (44100)\n\n#define DSOUND_FRAMES_PER_HOST_BUFFER  (256*2) //(440*10)\n\n#define FRAMES_PER_BUFFER   256\n\n#ifndef M_PI\n#define M_PI  (3.14159265)\n#endif\n\n#define TABLE_SIZE          (2048)\n\n#define CHANNEL_COUNT       (2)\n\n\ntypedef struct\n{\n    float sine[TABLE_SIZE];\n    double phase;\n}\npaTestData;\n\n/* This routine will be called by the PortAudio engine when audio is needed.\n** It may called at interrupt level on some machines so don't do anything\n** that could mess up the system like calling malloc() or free().\n*/\nstatic int patestCallback( const void *inputBuffer, void *outputBuffer,\n                            unsigned long framesPerBuffer,\n                            const PaStreamCallbackTimeInfo* timeInfo,\n                            PaStreamCallbackFlags statusFlags,\n                            void *userData )\n{\n    paTestData *data = (paTestData*)userData;\n    float *out = (float*)outputBuffer;\n    unsigned long i,j;\n\n    (void) timeInfo; /* Prevent unused variable warnings. */\n    (void) statusFlags;\n    (void) inputBuffer;\n\n    for( i=0; i<framesPerBuffer; i++ )\n    {\n        float x = data->sine[(int)data->phase];\n        data->phase += 20;\n        if( data->phase >= TABLE_SIZE ){\n            data->phase -= TABLE_SIZE;\n        }\n\n        for( j = 0; j < CHANNEL_COUNT; ++j ){\n            *out++ = x;\n        }\n    }\n\n    return paContinue;\n}\n\n/*******************************************************************/\nint main(int argc, char* argv[])\n{\n    PaStreamParameters outputParameters;\n    PaWinDirectSoundStreamInfo dsoundStreamInfo;\n    PaStream *stream;\n    PaError err;\n    paTestData data;\n    int i;\n    int deviceIndex;\n\n    printf(\"PortAudio Test: output a sine blip on each channel. SR = %d, BufSize = %d, Chans = %d\\n\", SAMPLE_RATE, FRAMES_PER_BUFFER, CHANNEL_COUNT);\n\n    err = Pa_Initialize();\n    if( err != paNoError ) goto error;\n\n    deviceIndex = Pa_GetHostApiInfo( Pa_HostApiTypeIdToHostApiIndex( paDirectSound ) )->defaultOutputDevice;\n    if( argc == 2 ){\n        sscanf( argv[1], \"%d\", &deviceIndex );\n    }\n\n    printf( \"using device id %d (%s)\\n\", deviceIndex, Pa_GetDeviceInfo(deviceIndex)->name );\n\n    /* initialise sinusoidal wavetable */\n    for( i=0; i<TABLE_SIZE; i++ )\n    {\n        data.sine[i] = (float) sin( ((double)i/(double)TABLE_SIZE) * M_PI * 2. );\n    }\n\n    data.phase = 0;\n\n    outputParameters.device = deviceIndex;\n    outputParameters.channelCount = CHANNEL_COUNT;\n    outputParameters.sampleFormat = paFloat32; /* 32 bit floating point processing */\n    outputParameters.suggestedLatency = 0; /*Pa_GetDeviceInfo( outputParameters.device )->defaultLowOutputLatency;*/\n    outputParameters.hostApiSpecificStreamInfo = NULL;\n\n    dsoundStreamInfo.size = sizeof(PaWinDirectSoundStreamInfo);\n    dsoundStreamInfo.hostApiType = paDirectSound;\n    dsoundStreamInfo.version = 2;\n    dsoundStreamInfo.flags = paWinDirectSoundUseLowLevelLatencyParameters;\n    dsoundStreamInfo.framesPerBuffer = DSOUND_FRAMES_PER_HOST_BUFFER;\n    outputParameters.hostApiSpecificStreamInfo = &dsoundStreamInfo;\n\n\n    if( Pa_IsFormatSupported( 0, &outputParameters, SAMPLE_RATE ) == paFormatIsSupported  ){\n        printf( \"Pa_IsFormatSupported reports device will support %d channels.\\n\", CHANNEL_COUNT );\n    }else{\n        printf( \"Pa_IsFormatSupported reports device will not support %d channels.\\n\", CHANNEL_COUNT );\n    }\n\n    err = Pa_OpenStream(\n              &stream,\n              NULL, /* no input */\n              &outputParameters,\n              SAMPLE_RATE,\n              FRAMES_PER_BUFFER,\n              paClipOff,      /* we won't output out of range samples so don't bother clipping them */\n              patestCallback,\n              &data );\n    if( err != paNoError ) goto error;\n\n    err = Pa_StartStream( stream );\n    if( err != paNoError ) goto error;\n\n    printf(\"Play for %d seconds.\\n\", NUM_SECONDS );\n    Pa_Sleep( NUM_SECONDS * 1000 );\n\n    err = Pa_StopStream( stream );\n    if( err != paNoError ) goto error;\n\n    err = Pa_CloseStream( stream );\n    if( err != paNoError ) goto error;\n\n    Pa_Terminate();\n    printf(\"Test finished.\\n\");\n\n    return err;\nerror:\n    Pa_Terminate();\n    fprintf( stderr, \"An error occurred while using the portaudio stream\\n\" );\n    fprintf( stderr, \"Error number: %d\\n\", err );\n    fprintf( stderr, \"Error message: %s\\n\", Pa_GetErrorText( err ) );\n    return err;\n}\n"
  },
  {
    "path": "thirdparty/portaudio/test/patest_dsound_surround.c",
    "content": "/*\n * $Id: $\n * Portable Audio I/O Library\n * Windows DirectSound surround sound output test\n *\n * Copyright (c) 2007 Ross Bencina\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n#include <stdio.h>\n#include <math.h>\n\n#include <windows.h>    /* required when using pa_win_wmme.h */\n#include <mmsystem.h>   /* required when using pa_win_wmme.h */\n\n#include \"portaudio.h\"\n#include \"pa_win_ds.h\"\n\n#define NUM_SECONDS         (12)\n#define SAMPLE_RATE         (44100)\n#define FRAMES_PER_BUFFER   (64)\n\n#ifndef M_PI\n#define M_PI  (3.14159265)\n#endif\n\n#define TABLE_SIZE          (100)\n\n#define CHANNEL_COUNT       (6)\n\n\n\ntypedef struct\n{\n    float sine[TABLE_SIZE];\n    int phase;\n    int currentChannel;\n    int cycleCount;\n}\npaTestData;\n\n/* This routine will be called by the PortAudio engine when audio is needed.\n** It may called at interrupt level on some machines so don't do anything\n** that could mess up the system like calling malloc() or free().\n*/\nstatic int patestCallback( const void *inputBuffer, void *outputBuffer,\n                            unsigned long framesPerBuffer,\n                            const PaStreamCallbackTimeInfo* timeInfo,\n                            PaStreamCallbackFlags statusFlags,\n                            void *userData )\n{\n    paTestData *data = (paTestData*)userData;\n    float *out = (float*)outputBuffer;\n    unsigned long i,j;\n\n    (void) timeInfo; /* Prevent unused variable warnings. */\n    (void) statusFlags;\n    (void) inputBuffer;\n\n    for( i=0; i<framesPerBuffer; i++ )\n    {\n        for( j = 0; j < CHANNEL_COUNT; ++j ){\n            if( j == data->currentChannel && data->cycleCount < 4410 ){\n                *out++ = data->sine[data->phase];\n                data->phase += 1 + j;    // play each channel at a different pitch so they can be distinguished\n                if( data->phase >= TABLE_SIZE ){\n                    data->phase -= TABLE_SIZE;\n                }\n            }else{\n                *out++ = 0;\n            }\n        }\n\n        data->cycleCount++;\n        if( data->cycleCount > 44100 ){\n            data->cycleCount = 0;\n\n            ++data->currentChannel;\n            if( data->currentChannel >= CHANNEL_COUNT )\n                data->currentChannel -= CHANNEL_COUNT;\n        }\n    }\n\n    return paContinue;\n}\n\n/*******************************************************************/\nint main(int argc, char* argv[])\n{\n    PaStreamParameters outputParameters;\n    PaWinDirectSoundStreamInfo directSoundStreamInfo;\n    PaStream *stream;\n    PaError err;\n    paTestData data;\n    int i;\n    int deviceIndex;\n\n    printf(\"PortAudio Test: output a sine blip on each channel. SR = %d, BufSize = %d, Chans = %d\\n\", SAMPLE_RATE, FRAMES_PER_BUFFER, CHANNEL_COUNT);\n\n    err = Pa_Initialize();\n    if( err != paNoError ) goto error;\n\n    deviceIndex = Pa_GetHostApiInfo( Pa_HostApiTypeIdToHostApiIndex( paDirectSound ) )->defaultOutputDevice;\n    if( argc == 2 ){\n        sscanf( argv[1], \"%d\", &deviceIndex );\n    }\n\n    printf( \"using device id %d (%s)\\n\", deviceIndex, Pa_GetDeviceInfo(deviceIndex)->name );\n\n    /* initialise sinusoidal wavetable */\n    for( i=0; i<TABLE_SIZE; i++ )\n    {\n        data.sine[i] = (float) sin( ((double)i/(double)TABLE_SIZE) * M_PI * 2. );\n    }\n\n    data.phase = 0;\n    data.currentChannel = 0;\n    data.cycleCount = 0;\n\n    outputParameters.device = deviceIndex;\n    outputParameters.channelCount = CHANNEL_COUNT;\n    outputParameters.sampleFormat = paFloat32; /* 32 bit floating point processing */\n    outputParameters.suggestedLatency = Pa_GetDeviceInfo( outputParameters.device )->defaultLowOutputLatency;\n    outputParameters.hostApiSpecificStreamInfo = NULL;\n\n    /* it's not strictly necessary to provide a channelMask for surround sound\n       output. But if you want to be sure which channel mask PortAudio will use\n       then you should supply one */\n    directSoundStreamInfo.size = sizeof(PaWinDirectSoundStreamInfo);\n    directSoundStreamInfo.hostApiType = paDirectSound;\n    directSoundStreamInfo.version = 1;\n    directSoundStreamInfo.flags = paWinDirectSoundUseChannelMask;\n    directSoundStreamInfo.channelMask = PAWIN_SPEAKER_5POINT1; /* request 5.1 output format */\n    outputParameters.hostApiSpecificStreamInfo = &directSoundStreamInfo;\n\n    if( Pa_IsFormatSupported( 0, &outputParameters, SAMPLE_RATE ) == paFormatIsSupported  ){\n        printf( \"Pa_IsFormatSupported reports device will support %d channels.\\n\", CHANNEL_COUNT );\n    }else{\n        printf( \"Pa_IsFormatSupported reports device will not support %d channels.\\n\", CHANNEL_COUNT );\n    }\n\n    err = Pa_OpenStream(\n              &stream,\n              NULL, /* no input */\n              &outputParameters,\n              SAMPLE_RATE,\n              FRAMES_PER_BUFFER,\n              paClipOff,      /* we won't output out of range samples so don't bother clipping them */\n              patestCallback,\n              &data );\n    if( err != paNoError ) goto error;\n\n    err = Pa_StartStream( stream );\n    if( err != paNoError ) goto error;\n\n    printf(\"Play for %d seconds.\\n\", NUM_SECONDS );\n    Pa_Sleep( NUM_SECONDS * 1000 );\n\n    err = Pa_StopStream( stream );\n    if( err != paNoError ) goto error;\n\n    err = Pa_CloseStream( stream );\n    if( err != paNoError ) goto error;\n\n    Pa_Terminate();\n    printf(\"Test finished.\\n\");\n\n    return err;\nerror:\n    Pa_Terminate();\n    fprintf( stderr, \"An error occurred while using the portaudio stream\\n\" );\n    fprintf( stderr, \"Error number: %d\\n\", err );\n    fprintf( stderr, \"Error message: %s\\n\", Pa_GetErrorText( err ) );\n    return err;\n}\n"
  },
  {
    "path": "thirdparty/portaudio/test/patest_hang.c",
    "content": "/** @file patest_hang.c\n    @ingroup test_src\n    @brief Play a sine then hang audio callback to test watchdog.\n    @author Ross Bencina <rossb@audiomulch.com>\n    @author Phil Burk <philburk@softsynth.com>\n*/\n/*\n * $Id$\n *\n * This program uses the PortAudio Portable Audio Library.\n * For more information see: http://www.portaudio.com\n * Copyright (c) 1999-2000 Ross Bencina and Phil Burk\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n#include <stdio.h>\n#include <math.h>\n\n#include \"portaudio.h\"\n\n#define SAMPLE_RATE       (44100)\n#define FRAMES_PER_BUFFER (1024)\n#ifndef M_PI\n#define M_PI              (3.14159265)\n#endif\n#define TWOPI             (M_PI * 2.0)\n\ntypedef struct paTestData\n{\n    int    sleepFor;\n    double phase;\n}\npaTestData;\n\n/* This routine will be called by the PortAudio engine when audio is needed.\n** It may called at interrupt level on some machines so don't do anything\n** that could mess up the system like calling malloc() or free().\n*/\nstatic int patestCallback( const void *inputBuffer, void *outputBuffer,\n                           unsigned long framesPerBuffer,\n                           const PaStreamCallbackTimeInfo* timeInfo,\n                           PaStreamCallbackFlags statusFlags,\n                           void *userData )\n{\n    paTestData *data = (paTestData*)userData;\n    float *out = (float*)outputBuffer;\n    unsigned long i;\n    int finished = 0;\n    double phaseInc = 0.02;\n    double phase = data->phase;\n\n    (void) inputBuffer; /* Prevent unused argument warning. */\n\n    for( i=0; i<framesPerBuffer; i++ )\n    {\n        phase += phaseInc;\n        if( phase > TWOPI ) phase -= TWOPI;\n        /* This is not a very efficient way to calc sines. */\n        *out++ = (float) sin( phase ); /* mono */\n    }\n\n    if( data->sleepFor > 0 )\n    {\n        Pa_Sleep( data->sleepFor );\n    }\n\n    data->phase = phase;\n    return finished;\n}\n\n/*******************************************************************/\nint main(void);\nint main(void)\n{\n    PaStream*           stream;\n    PaStreamParameters  outputParameters;\n    PaError             err;\n    int                 i;\n    paTestData          data = {0};\n\n    printf(\"PortAudio Test: output sine wave. SR = %d, BufSize = %d\\n\",\n        SAMPLE_RATE, FRAMES_PER_BUFFER );\n\n    err = Pa_Initialize();\n    if( err != paNoError ) goto error;\n\n    outputParameters.device = Pa_GetDefaultOutputDevice(); /* Default output device. */\n    if (outputParameters.device == paNoDevice) {\n        fprintf(stderr,\"Error: No default output device.\\n\");\n        goto error;\n    }\n    outputParameters.channelCount = 1;                     /* Mono output. */\n    outputParameters.sampleFormat = paFloat32;             /* 32 bit floating point. */\n    outputParameters.hostApiSpecificStreamInfo = NULL;\n    outputParameters.suggestedLatency          = Pa_GetDeviceInfo(outputParameters.device)\n                                                 ->defaultLowOutputLatency;\n    err = Pa_OpenStream(&stream,\n                        NULL,                    /* No input. */\n                        &outputParameters,\n                        SAMPLE_RATE,\n                        FRAMES_PER_BUFFER,\n                        paClipOff,               /* No out of range samples. */\n                        patestCallback,\n                        &data);\n    if (err != paNoError) goto error;\n\n    err = Pa_StartStream( stream );\n    if( err != paNoError ) goto error;\n\n    /* Gradually increase sleep time. */\n    /* Was: for( i=0; i<10000; i+= 1000 ) */\n    for(i=0; i <= 1000; i += 100)\n    {\n        printf(\"Sleep for %d milliseconds in audio callback.\\n\", i );\n        data.sleepFor = i;\n        Pa_Sleep( ((i<1000) ? 1000 : i) );\n    }\n\n    printf(\"Suffer for 10 seconds.\\n\");\n    Pa_Sleep( 10000 );\n\n    err = Pa_StopStream( stream );\n    if( err != paNoError ) goto error;\n    err = Pa_CloseStream( stream );\n    if( err != paNoError ) goto error;\n    Pa_Terminate();\n    printf(\"Test finished.\\n\");\n    return err;\nerror:\n    Pa_Terminate();\n    fprintf( stderr, \"An error occurred while using the portaudio stream\\n\" );\n    fprintf( stderr, \"Error number: %d\\n\", err );\n    fprintf( stderr, \"Error message: %s\\n\", Pa_GetErrorText( err ) );\n    return err;\n}\n"
  },
  {
    "path": "thirdparty/portaudio/test/patest_in_overflow.c",
    "content": "/** @file patest_in_overflow.c\n    @ingroup test_src\n    @brief Count input overflows (using paInputOverflow flag) under\n    overloaded and normal conditions.\n    This test uses the same method to overload the stream as does\n    patest_out_underflow.c -- it generates sine waves until the cpu load\n    exceeds a certain level. However this test is only concerned with\n    input and so doesn't output any sound.\n\n    @author Ross Bencina <rossb@audiomulch.com>\n    @author Phil Burk <philburk@softsynth.com>\n*/\n/*\n * $Id$\n *\n * This program uses the PortAudio Portable Audio Library.\n * For more information see: http://www.portaudio.com\n * Copyright (c) 1999-2004 Ross Bencina and Phil Burk\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n#include <stdio.h>\n#include <math.h>\n#include \"portaudio.h\"\n\n#define MAX_SINES     (500)\n#define MAX_LOAD      (1.2)\n#define SAMPLE_RATE   (44100)\n#define FRAMES_PER_BUFFER  (512)\n#ifndef M_PI\n#define M_PI  (3.14159265)\n#endif\n#define TWOPI (M_PI * 2.0)\n\ntypedef struct paTestData\n{\n    int sineCount;\n    double phases[MAX_SINES];\n    int countOverflows;\n    int inputOverflowCount;\n}\npaTestData;\n\n/* This routine will be called by the PortAudio engine when audio is needed.\n** It may called at interrupt level on some machines so don't do anything\n** that could mess up the system like calling malloc() or free().\n*/\nstatic int patestCallback( const void *inputBuffer, void *outputBuffer,\n                           unsigned long framesPerBuffer,\n                           const PaStreamCallbackTimeInfo* timeInfo,\n                           PaStreamCallbackFlags statusFlags,\n                           void *userData )\n{\n    paTestData *data = (paTestData*)userData;\n    float out;          /* variable to hold dummy output */\n    unsigned long i;\n    int j;\n    int finished = paContinue;\n    (void) timeInfo;    /* Prevent unused variable warning. */\n    (void) inputBuffer; /* Prevent unused variable warning. */\n    (void) outputBuffer; /* Prevent unused variable warning. */\n\n    if( data->countOverflows && (statusFlags & paInputOverflow) )\n        data->inputOverflowCount++;\n\n    for( i=0; i<framesPerBuffer; i++ )\n    {\n        float output = 0.0;\n        double phaseInc = 0.02;\n        double phase;\n\n        for( j=0; j<data->sineCount; j++ )\n        {\n            /* Advance phase of next oscillator. */\n            phase = data->phases[j];\n            phase += phaseInc;\n            if( phase > TWOPI ) phase -= TWOPI;\n\n            phaseInc *= 1.02;\n            if( phaseInc > 0.5 ) phaseInc *= 0.5;\n\n            /* This is not a very efficient way to calc sines. */\n            output += (float) sin( phase );\n            data->phases[j] = phase;\n        }\n        /* this is an input-only stream so we don't actually use the output */\n        out = (float) (output / data->sineCount);\n        (void) out; /* suppress unused variable warning*/\n    }\n\n    return finished;\n}\n\n/*******************************************************************/\nint main(void);\nint main(void)\n{\n    PaStreamParameters inputParameters;\n    PaStream *stream;\n    PaError err;\n    int safeSineCount, stressedSineCount;\n    int safeOverflowCount, stressedOverflowCount;\n    paTestData data = {0};\n    double load;\n\n\n    printf(\"PortAudio Test: input only, no sound output. Load callback by performing calculations, count input overflows. SR = %d, BufSize = %d. MAX_LOAD = %f\\n\",\n        SAMPLE_RATE, FRAMES_PER_BUFFER, (float)MAX_LOAD );\n\n    err = Pa_Initialize();\n    if( err != paNoError ) goto error;\n\n    inputParameters.device = Pa_GetDefaultInputDevice();  /* default input device */\n    if (inputParameters.device == paNoDevice) {\n        fprintf(stderr,\"Error: No default input device.\\n\");\n        goto error;\n    }\n    inputParameters.channelCount = 1;                      /* mono output */\n    inputParameters.sampleFormat = paFloat32;              /* 32 bit floating point output */\n    inputParameters.suggestedLatency = Pa_GetDeviceInfo( inputParameters.device )->defaultLowInputLatency;\n    inputParameters.hostApiSpecificStreamInfo = NULL;\n\n    err = Pa_OpenStream(\n              &stream,\n              &inputParameters,\n              NULL,    /* no output */\n              SAMPLE_RATE,\n              FRAMES_PER_BUFFER,\n              paClipOff,    /* we won't output out of range samples so don't bother clipping them */\n              patestCallback,\n              &data );\n    if( err != paNoError ) goto error;\n    err = Pa_StartStream( stream );\n    if( err != paNoError ) goto error;\n\n    printf(\"Establishing load conditions...\\n\" );\n\n    /* Determine number of sines required to get to 50% */\n    do\n    {\n        data.sineCount++;\n        Pa_Sleep( 100 );\n\n        load = Pa_GetStreamCpuLoad( stream );\n        printf(\"sineCount = %d, CPU load = %f\\n\", data.sineCount, load );\n    }\n    while( load < 0.5 && data.sineCount < (MAX_SINES-1));\n\n    safeSineCount = data.sineCount;\n\n    /* Calculate target stress value then ramp up to that level*/\n    stressedSineCount = (int) (2.0 * data.sineCount * MAX_LOAD );\n    if( stressedSineCount > MAX_SINES )\n        stressedSineCount = MAX_SINES;\n    for( ; data.sineCount < stressedSineCount; data.sineCount++ )\n    {\n        Pa_Sleep( 100 );\n        load = Pa_GetStreamCpuLoad( stream );\n        printf(\"STRESSING: sineCount = %d, CPU load = %f\\n\", data.sineCount, load );\n    }\n\n    printf(\"Counting overflows for 5 seconds.\\n\");\n    data.countOverflows = 1;\n    Pa_Sleep( 5000 );\n\n    stressedOverflowCount = data.inputOverflowCount;\n\n    data.countOverflows = 0;\n    data.sineCount = safeSineCount;\n\n    printf(\"Resuming safe load...\\n\");\n    Pa_Sleep( 1500 );\n    data.inputOverflowCount = 0;\n    Pa_Sleep( 1500 );\n    load = Pa_GetStreamCpuLoad( stream );\n    printf(\"sineCount = %d, CPU load = %f\\n\", data.sineCount, load );\n\n    printf(\"Counting overflows for 5 seconds.\\n\");\n    data.countOverflows = 1;\n    Pa_Sleep( 5000 );\n\n    safeOverflowCount = data.inputOverflowCount;\n\n    printf(\"Stop stream.\\n\");\n    err = Pa_StopStream( stream );\n    if( err != paNoError ) goto error;\n\n    err = Pa_CloseStream( stream );\n    if( err != paNoError ) goto error;\n\n    Pa_Terminate();\n\n    if( stressedOverflowCount == 0 )\n        printf(\"Test failed, no input overflows detected under stress.\\n\");\n    else if( safeOverflowCount != 0 )\n        printf(\"Test failed, %d unexpected overflows detected under safe load.\\n\", safeOverflowCount);\n    else\n        printf(\"Test passed, %d expected input overflows detected under stress, 0 unexpected overflows detected under safe load.\\n\", stressedOverflowCount );\n\n    return err;\nerror:\n    Pa_Terminate();\n    fprintf( stderr, \"An error occurred while using the portaudio stream\\n\" );\n    fprintf( stderr, \"Error number: %d\\n\", err );\n    fprintf( stderr, \"Error message: %s\\n\", Pa_GetErrorText( err ) );\n    return err;\n}\n"
  },
  {
    "path": "thirdparty/portaudio/test/patest_jack_wasapi.c",
    "content": "/** @file pa_test_jack_wasapi.c\n    @ingroup test_src\n    @brief Print out jack information for WASAPI endpoints\n    @author Reid Bishop <rbish@attglobal.net>\n*/\n/*\n * $Id: pa_test_jack_wasapi.c 1368 2008-03-01 00:38:27Z rbishop $\n *\n * This program uses the PortAudio Portable Audio Library.\n * For more information see: http://www.portaudio.com/\n * Copyright (c) 1999-2010 Ross Bencina and Phil Burk\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n#include <stdio.h>\n#include \"portaudio.h\"\n#include \"pa_win_wasapi.h\"\n\n\n/*\n* Helper function to determine if a given enum is present in mask variable\n*\n*/\nstatic int IsInMask(int val, int val2)\n{\n    return ((val & val2) == val2);\n}\n\n/*\n* This routine enumerates through the ChannelMapping for the IJackDescription\n*/\n\nstatic void EnumIJackChannels(int channelMapping)\n{\n    printf(\"Channel Mapping: \");\n    if(channelMapping == PAWIN_SPEAKER_DIRECTOUT)\n    {\n        printf(\"DIRECTOUT\\n\");\n        return;\n    }\n    if(IsInMask(channelMapping, PAWIN_SPEAKER_FRONT_LEFT))\n        printf(\"FRONT_LEFT, \");\n    if(IsInMask(channelMapping, PAWIN_SPEAKER_FRONT_RIGHT))\n        printf(\"FRONT_RIGHT, \");\n    if(IsInMask(channelMapping, PAWIN_SPEAKER_FRONT_CENTER))\n        printf(\"FRONT_CENTER, \");\n    if(IsInMask(channelMapping, PAWIN_SPEAKER_LOW_FREQUENCY))\n        printf(\"LOW_FREQUENCY, \");\n    if(IsInMask(channelMapping, PAWIN_SPEAKER_BACK_LEFT))\n        printf(\"BACK_LEFT, \");\n    if(IsInMask(channelMapping,PAWIN_SPEAKER_BACK_RIGHT))\n        printf(\"BACK_RIGHT, \");\n    if(IsInMask(channelMapping, PAWIN_SPEAKER_FRONT_LEFT_OF_CENTER))\n        printf(\"FRONT_LEFT_OF_CENTER, \");\n    if(IsInMask(channelMapping, PAWIN_SPEAKER_FRONT_RIGHT_OF_CENTER))\n        printf(\"FRONT_RIGHT_OF_CENTER, \");\n    if(IsInMask(channelMapping, PAWIN_SPEAKER_BACK_CENTER))\n        printf(\"BACK_CENTER, \");\n    if(IsInMask(channelMapping,PAWIN_SPEAKER_SIDE_LEFT))\n        printf(\"SIDE_LEFT, \");\n    if(IsInMask(channelMapping,PAWIN_SPEAKER_SIDE_RIGHT))\n        printf(\"SIDE_RIGHT, \");\n    if(IsInMask(channelMapping, PAWIN_SPEAKER_TOP_CENTER))\n        printf(\"TOP_CENTER, \");\n    if(IsInMask(channelMapping, PAWIN_SPEAKER_TOP_FRONT_LEFT))\n        printf(\"TOP_FRONT_LEFT, \");\n    if(IsInMask(channelMapping, PAWIN_SPEAKER_TOP_FRONT_CENTER))\n        printf(\"TOP_FRONT_CENTER, \");\n    if(IsInMask(channelMapping, PAWIN_SPEAKER_TOP_FRONT_RIGHT))\n        printf(\"TOP_FRONT_RIGHT, \");\n    if(IsInMask(channelMapping, PAWIN_SPEAKER_TOP_BACK_LEFT))\n        printf(\"TOP_BACK_LEFT, \");\n    if(IsInMask(channelMapping, PAWIN_SPEAKER_TOP_BACK_CENTER))\n        printf(\"TOP_BACK_CENTER, \");\n    if(IsInMask(channelMapping, PAWIN_SPEAKER_TOP_BACK_RIGHT))\n        printf(\"TOP_BACK_RIGHT, \");\n\n    printf(\"\\n\");\n}\n\n/*\n* This routine enumerates through the Jack Connection Types enums for IJackDescription\n*/\nstatic void EnumIJackConnectionType(int cType)\n{\n    printf(\"Connection Type: \");\n    switch(cType)\n    {\n        case eJackConnTypeUnknown:\n            printf(\"eJackConnTypeUnknown\");\n            break;\n        case eJackConnType3Point5mm:\n            printf(\"eJackConnType3Point5mm\");\n            break;\n        case eJackConnTypeQuarter:\n            printf(\"eJackConnTypeQuarter\");\n            break;\n        case eJackConnTypeAtapiInternal:\n            printf(\"eJackConnTypeAtapiInternal\");\n            break;\n        case eJackConnTypeRCA:\n            printf(\"eJackConnTypeRCA\");\n            break;\n        case eJackConnTypeOptical:\n            printf(\"eJackConnTypeOptical\");\n            break;\n        case eJackConnTypeOtherDigital:\n            printf(\"eJackConnTypeOtherDigital\");\n            break;\n        case eJackConnTypeOtherAnalog:\n            printf(\"eJackConnTypeOtherAnalog\");\n            break;\n        case eJackConnTypeMultichannelAnalogDIN:\n            printf(\"eJackConnTypeMultichannelAnalogDIN\");\n            break;\n        case eJackConnTypeXlrProfessional:\n            printf(\"eJackConnTypeXlrProfessional\");\n            break;\n        case eJackConnTypeRJ11Modem:\n            printf(\"eJackConnTypeRJ11Modem\");\n            break;\n        case eJackConnTypeCombination:\n            printf(\"eJackConnTypeCombination\");\n            break;\n    }\n    printf(\"\\n\");\n}\n\n/*\n* This routine enumerates through the GeoLocation enums for the IJackDescription\n*/\nstatic void EnumIJackGeoLocation(int iVal)\n{\n    printf(\"Geometric Location: \");\n    switch(iVal)\n    {\n    case eJackGeoLocRear:\n        printf(\"eJackGeoLocRear\");\n        break;\n    case eJackGeoLocFront:\n        printf(\"eJackGeoLocFront\");\n        break;\n    case eJackGeoLocLeft:\n        printf(\"eJackGeoLocLeft\");\n        break;\n    case eJackGeoLocRight:\n        printf(\"eJackGeoLocRight\");\n        break;\n    case eJackGeoLocTop:\n        printf(\"eJackGeoLocTop\");\n        break;\n    case eJackGeoLocBottom:\n        printf(\"eJackGeoLocBottom\");\n        break;\n    case eJackGeoLocRearPanel:\n        printf(\"eJackGeoLocRearPanel\");\n        break;\n    case eJackGeoLocRiser:\n        printf(\"eJackGeoLocRiser\");\n        break;\n    case eJackGeoLocInsideMobileLid:\n        printf(\"eJackGeoLocInsideMobileLid\");\n        break;\n    case eJackGeoLocDrivebay:\n        printf(\"eJackGeoLocDrivebay\");\n        break;\n    case eJackGeoLocHDMI:\n        printf(\"eJackGeoLocHDMI\");\n        break;\n    case eJackGeoLocOutsideMobileLid:\n        printf(\"eJackGeoLocOutsideMobileLid\");\n        break;\n    case eJackGeoLocATAPI:\n        printf(\"eJackGeoLocATAPI\");\n        break;\n    }\n    printf(\"\\n\");\n}\n\n/*\n* This routine enumerates through the GenLocation enums for the IJackDescription\n*/\nstatic void EnumIJackGenLocation(int iVal)\n{\n    printf(\"General Location: \");\n    switch(iVal)\n    {\n        case eJackGenLocPrimaryBox:\n            printf(\"eJackGenLocPrimaryBox\");\n            break;\n        case eJackGenLocInternal:\n            printf(\"eJackGenLocInternal\");\n            break;\n        case eJackGenLocSeparate:\n            printf(\"eJackGenLocSeparate\");\n            break;\n        case eJackGenLocOther:\n            printf(\"eJackGenLocOther\");\n            break;\n    }\n    printf(\"\\n\");\n}\n\n/*\n* This routine enumerates through the PortConnection enums for the IJackDescription\n*/\nstatic void EnumIJackPortConnection(int iVal)\n{\n    printf(\"Port Type: \");\n    switch(iVal)\n    {\n        case eJackPortConnJack:\n            printf(\"eJackPortConnJack\");\n            break;\n        case eJackPortConnIntegratedDevice:\n            printf(\"eJackPortConnIntegratedDevice\");\n            break;\n        case eJackPortConnBothIntegratedAndJack:\n            printf(\"eJackPortConnBothIntegratedAndJack\");\n            break;\n        case eJackPortConnUnknown:\n            printf(\"eJackPortConnUnknown\");\n            break;\n    }\n    printf(\"\\n\");\n}\n\n/*\n* This routine retrieves and parses the KSJACK_DESCRIPTION structure for\n* the provided device ID.\n*/\nstatic PaError GetJackInformation(int deviceId)\n{\n    PaError err;\n    int i;\n    int jackCount = 0;\n    PaWasapiJackDescription jackDesc;\n\n    err = PaWasapi_GetJackCount(deviceId, &jackCount);\n    if( err != paNoError ) return err;\n\n    fprintf( stderr,\"Number of Jacks: %d \\n\", jackCount );\n\n    for( i = 0; i<jackCount; i++ )\n    {\n        fprintf( stderr,\"Jack #%d:\\n\", i );\n\n        err = PaWasapi_GetJackDescription(deviceId, i, &jackDesc);\n        if( err != paNoError )\n        {\n            fprintf( stderr,\"Failed getting description.\" );\n            continue;\n        }\n        else\n        {\n            printf(\"Is connected: %s\\n\",(jackDesc.isConnected)?\"true\":\"false\");\n            EnumIJackChannels(jackDesc.channelMapping);\n            EnumIJackConnectionType(jackDesc.connectionType);\n            EnumIJackGeoLocation(jackDesc.geoLocation);\n            EnumIJackGenLocation(jackDesc.genLocation);\n            EnumIJackPortConnection(jackDesc.portConnection);\n            printf(\"Jack Color: 0x%06X\\n\", jackDesc.color);\n            printf(\"\\n\");\n        }\n    }\n    return 0;\n}\n\n\n/*******************************************************************/\nint main(void);\nint main(void)\n{\n    PaError err;\n    const PaDeviceInfo *device;\n    int i;\n    int jackCount = 0;\n    int isInput = 0;\n\n    printf(\"PortAudio Test: WASAPI Jack Configuration\");\n    err = Pa_Initialize();\n    if( err != paNoError ) goto error;\n\n    /* Find all WASAPI devices */\n    for( i = 0; i < Pa_GetDeviceCount(); ++i )\n    {\n        device = Pa_GetDeviceInfo(i);\n        if( Pa_GetDeviceInfo(i)->hostApi == Pa_HostApiTypeIdToHostApiIndex(paWASAPI) )\n        {\n            if( device->maxOutputChannels == 0 )\n            {\n                isInput = 1;\n            }\n            printf(\"------------------------------------------\\n\");\n            printf(\"Device: %s\",device->name);\n            if(isInput)\n                printf(\"  (Input) %d Channels\\n\",device->maxInputChannels);\n            else\n                printf(\"  (Output) %d Channels\\n\",device->maxOutputChannels);\n            // Try to see if this WASAPI device can provide Jack information\n            err = GetJackInformation(i);\n            if( err != paNoError ) goto error;\n        }\n    }\n    Pa_Terminate();\n    printf(\"Test finished.\\n\");\n    return err;\n\nerror:\n    Pa_Terminate();\n    fprintf( stderr, \"An error occurred while using the portaudio stream\\n\" );\n    fprintf( stderr, \"Error number: %d\\n\", err );\n    fprintf( stderr, \"Error message: %s\\n\", Pa_GetErrorText( err ) );\n    return err;\n}\n"
  },
  {
    "path": "thirdparty/portaudio/test/patest_latency.c",
    "content": "/** @file\n    @ingroup test_src\n    @brief Hear the latency caused by big buffers.\n    Play a sine wave and change frequency based on letter input.\n    @author Phil Burk <philburk@softsynth.com>, and Darren Gibbs\n*/\n/*\n * $Id$\n *\n * This program uses the PortAudio Portable Audio Library.\n * For more information see: http://www.portaudio.com\n * Copyright (c) 1999-2000 Ross Bencina and Phil Burk\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n#include <stdio.h>\n#include <math.h>\n#include \"portaudio.h\"\n\n#define OUTPUT_DEVICE       (Pa_GetDefaultOutputDevice())\n#define SAMPLE_RATE         (44100)\n#define FRAMES_PER_BUFFER   (64)\n\n#define MIN_FREQ            (100.0f)\n#define CalcPhaseIncrement(freq)  ((freq)/SAMPLE_RATE)\n#ifndef M_PI\n#define M_PI  (3.14159265)\n#endif\n#define TABLE_SIZE   (400)\n\ntypedef struct\n{\n    float sine[TABLE_SIZE + 1]; /* add one for guard point for interpolation */\n    float phase_increment;\n    float left_phase;\n    float right_phase;\n}\npaTestData;\n\nfloat LookupSine( paTestData *data, float phase );\n/* Convert phase between and 1.0 to sine value\n * using linear interpolation.\n */\nfloat LookupSine( paTestData *data, float phase )\n{\n    float fIndex = phase*TABLE_SIZE;\n    int   index = (int) fIndex;\n    float fract = fIndex - index;\n    float lo = data->sine[index];\n    float hi = data->sine[index+1];\n    float val = lo + fract*(hi-lo);\n    return val;\n}\n\n/* This routine will be called by the PortAudio engine when audio is needed.\n** It may called at interrupt level on some machines so don't do anything\n** that could mess up the system like calling malloc() or free().\n*/\nstatic int patestCallback( const void *inputBuffer, void *outputBuffer,\n                           unsigned long framesPerBuffer,\n                           const PaStreamCallbackTimeInfo* timeInfo,\n                           PaStreamCallbackFlags statusFlags,\n                           void *userData )\n{\n    paTestData *data = (paTestData*)userData;\n    float *out = (float*)outputBuffer;\n    int i;\n\n    (void) inputBuffer; /* Prevent unused variable warning. */\n\n    for( i=0; i<framesPerBuffer; i++ )\n    {\n        *out++ = LookupSine(data, data->left_phase);  /* left */\n        *out++ = LookupSine(data, data->right_phase);  /* right */\n        data->left_phase += data->phase_increment;\n        if( data->left_phase >= 1.0f ) data->left_phase -= 1.0f;\n        data->right_phase += (data->phase_increment * 1.5f); /* fifth above */\n        if( data->right_phase >= 1.0f ) data->right_phase -= 1.0f;\n    }\n    return 0;\n}\n\n/*******************************************************************/\nint main(void);\nint main(void)\n{\n    PaStream *stream;\n    PaStreamParameters outputParameters;\n    PaError err;\n    paTestData data;\n    int i;\n    int done = 0;\n\n    printf(\"PortAudio Test: enter letter then hit ENTER.\\n\" );\n    /* initialise sinusoidal wavetable */\n    for( i=0; i<TABLE_SIZE; i++ )\n    {\n        data.sine[i] = 0.90f * (float) sin( ((double)i/(double)TABLE_SIZE) * M_PI * 2. );\n    }\n    data.sine[TABLE_SIZE] = data.sine[0]; /* set guard point. */\n    data.left_phase = data.right_phase = 0.0;\n    data.phase_increment = CalcPhaseIncrement(MIN_FREQ);\n\n    err = Pa_Initialize();\n    if( err != paNoError ) goto error;\n    printf(\"PortAudio Test: output device = %d\\n\", OUTPUT_DEVICE );\n\n    outputParameters.device = OUTPUT_DEVICE;\n    if (outputParameters.device == paNoDevice) {\n        fprintf(stderr,\"Error: No default output device.\\n\");\n        goto error;\n    }\n    outputParameters.channelCount = 2;         /* stereo output */\n    outputParameters.sampleFormat = paFloat32; /* 32 bit floating point output */\n    outputParameters.suggestedLatency = Pa_GetDeviceInfo( outputParameters.device )->defaultLowOutputLatency;\n    outputParameters.hostApiSpecificStreamInfo = NULL;\n\n    printf(\"Requested output latency = %.4f seconds.\\n\", outputParameters.suggestedLatency );\n    printf(\"%d frames per buffer.\\n.\", FRAMES_PER_BUFFER );\n\n    err = Pa_OpenStream(\n              &stream,\n              NULL, /* no input */\n              &outputParameters,\n              SAMPLE_RATE,\n              FRAMES_PER_BUFFER,\n              paClipOff|paDitherOff,      /* we won't output out of range samples so don't bother clipping them */\n              patestCallback,\n              &data );\n    if( err != paNoError ) goto error;\n\n    err = Pa_StartStream( stream );\n    if( err != paNoError ) goto error;\n    printf(\"Play ASCII keyboard. Hit 'q' to stop. (Use RETURN key on Mac)\\n\");\n    fflush(stdout);\n    while ( !done )\n    {\n        float  freq;\n        int index;\n        char c;\n        do\n        {\n            c = getchar();\n        }\n        while( c < ' '); /* Strip white space and control chars. */\n\n        if( c == 'q' ) done = 1;\n        index = c % 26;\n        freq = MIN_FREQ + (index * 40.0);\n        data.phase_increment = CalcPhaseIncrement(freq);\n    }\n    printf(\"Call Pa_StopStream()\\n\");\n    err = Pa_StopStream( stream );\n    if( err != paNoError ) goto error;\n    Pa_Terminate();\n    printf(\"Test finished.\\n\");\n    return err;\nerror:\n    Pa_Terminate();\n    fprintf( stderr, \"An error occurred while using the portaudio stream\\n\" );\n    fprintf( stderr, \"Error number: %d\\n\", err );\n    fprintf( stderr, \"Error message: %s\\n\", Pa_GetErrorText( err ) );\n    return err;\n}\n"
  },
  {
    "path": "thirdparty/portaudio/test/patest_leftright.c",
    "content": "/** @file patest_leftright.c\n    @ingroup test_src\n    @brief Play different tone sine waves that\n        alternate between left and right channel.\n\n    The low tone should be on the left channel.\n\n    @author Ross Bencina <rossb@audiomulch.com>\n    @author Phil Burk <philburk@softsynth.com>\n*/\n/*\n * $Id$\n *\n * This program uses the PortAudio Portable Audio Library.\n * For more information see: http://www.portaudio.com\n * Copyright (c) 1999-2000 Ross Bencina and Phil Burk\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n#include <stdio.h>\n#include <math.h>\n#include \"portaudio.h\"\n\n#define NUM_SECONDS   (8)\n#define SAMPLE_RATE   (44100)\n#define FRAMES_PER_BUFFER  (512)\n#ifndef M_PI\n#define M_PI  (3.14159265)\n#endif\n#define TABLE_SIZE   (200)\n#define BALANCE_DELTA  (0.001)\n\ntypedef struct\n{\n    float sine[TABLE_SIZE];\n    int left_phase;\n    int right_phase;\n    float targetBalance; // 0.0 = left, 1.0 = right\n    float currentBalance;\n} paTestData;\n\n/* This routine will be called by the PortAudio engine when audio is needed.\n** It may called at interrupt level on some machines so don't do anything\n** that could mess up the system like calling malloc() or free().\n*/\nstatic int patestCallback( const void *inputBuffer,\n                           void *outputBuffer,\n                           unsigned long framesPerBuffer,\n                           const PaStreamCallbackTimeInfo* timeInfo,\n                           PaStreamCallbackFlags statusFlags,\n                           void *userData )\n{\n    paTestData *data = (paTestData*)userData;\n    float *out = (float*)outputBuffer;\n    unsigned long i;\n    int finished = 0;\n    /* Prevent unused variable warnings. */\n    (void) inputBuffer;\n\n    for( i=0; i<framesPerBuffer; i++ )\n    {\n        // Smoothly pan between left and right.\n        if( data->currentBalance < data->targetBalance )\n        {\n            data->currentBalance += BALANCE_DELTA;\n        }\n        else if( data->currentBalance > data->targetBalance )\n        {\n            data->currentBalance -= BALANCE_DELTA;\n        }\n        // Apply left/right balance.\n        *out++ = data->sine[data->left_phase] * (1.0f - data->currentBalance);  /* left */\n        *out++ = data->sine[data->right_phase] * data->currentBalance;  /* right */\n\n        data->left_phase += 1;\n        if( data->left_phase >= TABLE_SIZE ) data->left_phase -= TABLE_SIZE;\n        data->right_phase += 3; /* higher pitch so we can distinguish left and right. */\n        if( data->right_phase >= TABLE_SIZE ) data->right_phase -= TABLE_SIZE;\n    }\n\n    return finished;\n}\n\n/*******************************************************************/\nint main(void);\nint main(void)\n{\n    PaStream *stream;\n    PaStreamParameters outputParameters;\n    PaError err;\n    paTestData data;\n    int i;\n    printf(\"Play different tone sine waves that alternate between left and right channel.\\n\");\n    printf(\"The low tone should be on the left channel.\\n\");\n\n    /* initialise sinusoidal wavetable */\n    for( i=0; i<TABLE_SIZE; i++ )\n    {\n        data.sine[i] = (float) sin( ((double)i/(double)TABLE_SIZE) * M_PI * 2. );\n    }\n    data.left_phase = data.right_phase = 0;\n    data.currentBalance = 0.0;\n    data.targetBalance = 0.0;\n\n    err = Pa_Initialize();\n    if( err != paNoError ) goto error;\n\n    outputParameters.device = Pa_GetDefaultOutputDevice(); /* default output device */\n    if (outputParameters.device == paNoDevice) {\n        fprintf(stderr,\"Error: No default output device.\\n\");\n        goto error;\n    }\n    outputParameters.channelCount = 2;       /* stereo output */\n    outputParameters.sampleFormat = paFloat32; /* 32 bit floating point output */\n    outputParameters.suggestedLatency = Pa_GetDeviceInfo( outputParameters.device )->defaultLowOutputLatency;\n    outputParameters.hostApiSpecificStreamInfo = NULL;\n\n    err = Pa_OpenStream( &stream,\n                         NULL,                  /* No input. */\n                         &outputParameters,     /* As above. */\n                         SAMPLE_RATE,\n                         FRAMES_PER_BUFFER,\n                         paClipOff,      /* we won't output out of range samples so don't bother clipping them */\n                         patestCallback,\n                         &data );\n    if( err != paNoError ) goto error;\n\n    err = Pa_StartStream( stream );\n    if( err != paNoError ) goto error;\n\n    printf(\"Play for several seconds.\\n\");\n    for( i=0; i<4; i++ )\n    {\n        printf(\"Hear low sound on left side.\\n\");\n        data.targetBalance = 0.01;\n        Pa_Sleep( 1000 );\n\n        printf(\"Hear high sound on right side.\\n\");\n        data.targetBalance = 0.99;\n        Pa_Sleep( 1000 );\n    }\n\n    err = Pa_StopStream( stream );\n    if( err != paNoError ) goto error;\n    err = Pa_CloseStream( stream );\n    if( err != paNoError ) goto error;\n    Pa_Terminate();\n    printf(\"Test finished.\\n\");\n    return err;\nerror:\n    Pa_Terminate();\n    fprintf( stderr, \"An error occurred while using the portaudio stream\\n\" );\n    fprintf( stderr, \"Error number: %d\\n\", err );\n    fprintf( stderr, \"Error message: %s\\n\", Pa_GetErrorText( err ) );\n    return err;\n}\n"
  },
  {
    "path": "thirdparty/portaudio/test/patest_longsine.c",
    "content": "/** @file patest_longsine.c\n    @ingroup test_src\n    @brief Play a sine wave until ENTER hit.\n    @author Phil Burk  http://www.softsynth.com\n*/\n/*\n * $Id$\n *\n * This program uses the PortAudio Portable Audio Library.\n * For more information see: http://www.portaudio.com\n * Copyright (c) 1999-2000 Ross Bencina and Phil Burk\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n#include <stdio.h>\n#include <math.h>\n\n#include \"portaudio.h\"\n\n#define SAMPLE_RATE   (44100)\n\n#ifndef M_PI\n#define M_PI  (3.14159265)\n#endif\n\n#define TABLE_SIZE   (200)\ntypedef struct\n{\n    float sine[TABLE_SIZE];\n    int left_phase;\n    int right_phase;\n}\npaTestData;\n\n/* This routine will be called by the PortAudio engine when audio is needed.\n** It may called at interrupt level on some machines so don't do anything\n** that could mess up the system like calling malloc() or free().\n*/\nstatic int patestCallback(const void*                     inputBuffer,\n                          void*                           outputBuffer,\n                          unsigned long                   framesPerBuffer,\n                          const PaStreamCallbackTimeInfo* timeInfo,\n                          PaStreamCallbackFlags           statusFlags,\n                          void*                           userData)\n{\n    paTestData *data = (paTestData*)userData;\n    float *out = (float*)outputBuffer;\n    unsigned int i;\n    (void) inputBuffer; /* Prevent unused argument warning. */\n    for( i=0; i<framesPerBuffer; i++ )\n    {\n        *out++ = data->sine[data->left_phase];  /* left */\n        *out++ = data->sine[data->right_phase];  /* right */\n        data->left_phase += 1;\n        if( data->left_phase >= TABLE_SIZE ) data->left_phase -= TABLE_SIZE;\n        data->right_phase += 3; /* higher pitch so we can distinguish left and right. */\n        if( data->right_phase >= TABLE_SIZE ) data->right_phase -= TABLE_SIZE;\n    }\n    return 0;\n}\n\n/*******************************************************************/\nint main(void);\nint main(void)\n{\n    PaStreamParameters outputParameters;\n    PaStream *stream;\n    PaError err;\n    paTestData data;\n    int i;\n    printf(\"PortAudio Test: output sine wave.\\n\");\n\n    /* initialise sinusoidal wavetable */\n    for( i=0; i<TABLE_SIZE; i++ )\n    {\n        data.sine[i] = (float) sin( ((double)i/(double)TABLE_SIZE) * M_PI * 2. );\n    }\n    data.left_phase = data.right_phase = 0;\n\n    err = Pa_Initialize();\n    if( err != paNoError ) goto error;\n\n    outputParameters.device = Pa_GetDefaultOutputDevice(); /* default output device */\n    if (outputParameters.device == paNoDevice) {\n        fprintf(stderr,\"Error: No default output device.\\n\");\n        goto error;\n    }\n    outputParameters.channelCount = 2;                     /* stereo output */\n    outputParameters.sampleFormat = paFloat32;             /* 32 bit floating point output */\n    outputParameters.suggestedLatency = Pa_GetDeviceInfo( outputParameters.device )->defaultLowOutputLatency;\n    outputParameters.hostApiSpecificStreamInfo = NULL;\n\n    err = Pa_OpenStream( &stream,\n                         NULL,              /* No input. */\n                         &outputParameters, /* As above. */\n                         SAMPLE_RATE,\n                         256,               /* Frames per buffer. */\n                         paClipOff,         /* No out of range samples expected. */\n                         patestCallback,\n                         &data );\n    if( err != paNoError ) goto error;\n\n    err = Pa_StartStream( stream );\n    if( err != paNoError ) goto error;\n\n    printf(\"Hit ENTER to stop program.\\n\");\n    getchar();\n\n    err = Pa_CloseStream( stream );\n    if( err != paNoError ) goto error;\n    Pa_Terminate();\n\n    printf(\"Test finished.\\n\");\n    return err;\n\nerror:\n    Pa_Terminate();\n    fprintf( stderr, \"An error occurred while using the portaudio stream\\n\" );\n    fprintf( stderr, \"Error number: %d\\n\", err );\n    fprintf( stderr, \"Error message: %s\\n\", Pa_GetErrorText( err ) );\n    return err;\n}\n"
  },
  {
    "path": "thirdparty/portaudio/test/patest_many.c",
    "content": "/** @file patest_many.c\n    @ingroup test_src\n    @brief Start and stop the PortAudio Driver multiple times.\n    @author Phil Burk  http://www.softsynth.com\n*/\n/*\n * $Id$\n *\n * This program uses the PortAudio Portable Audio Library.\n * For more information see: http://www.portaudio.com\n * Copyright (c) 1999-2000 Ross Bencina and Phil Burk\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <math.h>\n#include \"portaudio.h\"\n#define NUM_SECONDS   (1)\n#define SAMPLE_RATE   (44100)\n#ifndef M_PI\n#define M_PI  (3.14159265)\n#endif\n#define TABLE_SIZE   (200)\ntypedef struct\n{\n    short sine[TABLE_SIZE];\n    int left_phase;\n    int right_phase;\n    unsigned int sampsToGo;\n}\npaTestData;\nPaError TestOnce( void );\nstatic int patest1Callback( const void *inputBuffer, void *outputBuffer,\n                            unsigned long framesPerBuffer,\n                            const PaStreamCallbackTimeInfo* timeInfo,\n                            PaStreamCallbackFlags statusFlags,\n                            void *userData );\n\n/* This routine will be called by the PortAudio engine when audio is needed.\n** It may called at interrupt level on some machines so don't do anything\n** that could mess up the system like calling malloc() or free().\n*/\nstatic int patest1Callback( const void *inputBuffer, void *outputBuffer,\n                            unsigned long framesPerBuffer,\n                            const PaStreamCallbackTimeInfo* timeInfo,\n                            PaStreamCallbackFlags statusFlags,\n                            void *userData )\n{\n    paTestData *data = (paTestData*)userData;\n    short *out = (short*)outputBuffer;\n    unsigned int i;\n    int finished = 0;\n    (void) inputBuffer; /* Prevent \"unused variable\" warnings. */\n\n    if( data->sampsToGo < framesPerBuffer )\n    {\n        /* final buffer... */\n\n        for( i=0; i<data->sampsToGo; i++ )\n        {\n            *out++ = data->sine[data->left_phase];  /* left */\n            *out++ = data->sine[data->right_phase];  /* right */\n            data->left_phase += 1;\n            if( data->left_phase >= TABLE_SIZE ) data->left_phase -= TABLE_SIZE;\n            data->right_phase += 3; /* higher pitch so we can distinguish left and right. */\n            if( data->right_phase >= TABLE_SIZE ) data->right_phase -= TABLE_SIZE;\n        }\n        /* zero remainder of final buffer */\n        for( ; i<framesPerBuffer; i++ )\n        {\n            *out++ = 0; /* left */\n            *out++ = 0; /* right */\n        }\n\n        finished = 1;\n    }\n    else\n    {\n        for( i=0; i<framesPerBuffer; i++ )\n        {\n            *out++ = data->sine[data->left_phase];  /* left */\n            *out++ = data->sine[data->right_phase];  /* right */\n            data->left_phase += 1;\n            if( data->left_phase >= TABLE_SIZE ) data->left_phase -= TABLE_SIZE;\n            data->right_phase += 3; /* higher pitch so we can distinguish left and right. */\n            if( data->right_phase >= TABLE_SIZE ) data->right_phase -= TABLE_SIZE;\n        }\n        data->sampsToGo -= framesPerBuffer;\n    }\n    return finished;\n}\n/*******************************************************************/\n#ifdef MACINTOSH\nint main(void);\nint main(void)\n{\n    int i;\n    PaError err;\n    int numLoops = 10;\n    printf(\"Loop %d times.\\n\", numLoops );\n    for( i=0; i<numLoops; i++ )\n    {\n        printf(\"Loop %d out of %d.\\n\", i+1, numLoops );\n        err = TestOnce();\n        if( err < 0 ) return 0;\n    }\n}\n#else\nint main(int argc, char **argv);\nint main(int argc, char **argv)\n{\n    PaError err;\n    int i, numLoops = 10;\n    if( argc > 1 )\n    {\n        numLoops = atoi(argv[1]);\n    }\n    for( i=0; i<numLoops; i++ )\n    {\n        printf(\"Loop %d out of %d.\\n\", i+1, numLoops );\n        err = TestOnce();\n        if( err < 0 ) return 1;\n    }\n    printf(\"Test complete.\\n\");\n    return 0;\n}\n#endif\nPaError TestOnce( void )\n{\n    PaStreamParameters outputParameters;\n    PaStream *stream;\n    PaError err;\n    paTestData data;\n    int i;\n    int totalSamps;\n    /* initialise sinusoidal wavetable */\n    for( i=0; i<TABLE_SIZE; i++ )\n    {\n        data.sine[i] = (short) (32767.0 * sin( ((double)i/(double)TABLE_SIZE) * M_PI * 2. ));\n    }\n    data.left_phase = data.right_phase = 0;\n    data.sampsToGo = totalSamps =  NUM_SECONDS * SAMPLE_RATE; /* Play for a few seconds. */\n    err = Pa_Initialize();\n    if( err != paNoError ) goto error;\n\n    outputParameters.device = Pa_GetDefaultOutputDevice();  /* default output device */\n    if (outputParameters.device == paNoDevice) {\n        fprintf(stderr,\"Error: No default output device.\\n\");\n        goto error;\n    }\n    outputParameters.channelCount = 2;                      /* stereo output */\n    outputParameters.sampleFormat = paInt16;\n    outputParameters.suggestedLatency = Pa_GetDeviceInfo( outputParameters.device )->defaultLowOutputLatency;\n    outputParameters.hostApiSpecificStreamInfo = NULL;\n    err = Pa_OpenStream(\n              &stream,\n              NULL,         /* no input */\n              &outputParameters,\n              SAMPLE_RATE,\n              1024,         /* frames per buffer */\n              paClipOff,    /* we won't output out of range samples so don't bother clipping them */\n              patest1Callback,\n              &data );\n    if( err != paNoError ) goto error;\n\n    err = Pa_StartStream( stream );\n    if( err != paNoError ) goto error;\n    printf(\"Waiting for sound to finish.\\n\");\n    Pa_Sleep(1000);\n    err = Pa_CloseStream( stream );\n    if( err != paNoError ) goto error;\n    Pa_Terminate();\n    return paNoError;\nerror:\n    Pa_Terminate();\n    fprintf( stderr, \"An error occurred while using the portaudio stream\\n\" );\n    fprintf( stderr, \"Error number: %d\\n\", err );\n    fprintf( stderr, \"Error message: %s\\n\", Pa_GetErrorText( err ) );\n    return err;\n}\n"
  },
  {
    "path": "thirdparty/portaudio/test/patest_maxsines.c",
    "content": "/** @file patest_maxsines.c\n    @ingroup test_src\n    @brief How many sine waves can we calculate and play in less than 80% CPU Load.\n    @author Ross Bencina <rossb@audiomulch.com>\n    @author Phil Burk <philburk@softsynth.com>\n*/\n/*\n * $Id$\n *\n * This program uses the PortAudio Portable Audio Library.\n * For more information see: http://www.portaudio.com\n * Copyright (c) 1999-2000 Ross Bencina and Phil Burk\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n#include <stdio.h>\n#include <math.h>\n#include \"portaudio.h\"\n\n#define MAX_SINES     (2000)\n#define MAX_USAGE     (0.5)\n#define SAMPLE_RATE   (44100)\n#define FREQ_TO_PHASE_INC(freq)   (freq/(float)SAMPLE_RATE)\n\n#define MIN_PHASE_INC  FREQ_TO_PHASE_INC(200.0f)\n#define MAX_PHASE_INC  (MIN_PHASE_INC * (1 << 5))\n\n#define FRAMES_PER_BUFFER  (512)\n#ifndef M_PI\n#define M_PI  (3.14159265)\n#endif\n#define TWOPI (M_PI * 2.0)\n\n#define TABLE_SIZE   (1024)\n\ntypedef struct paTestData\n{\n    int numSines;\n    float sine[TABLE_SIZE + 1]; /* add one for guard point for interpolation */\n    float phases[MAX_SINES];\n}\npaTestData;\n\n/* Convert phase between 0.0 and 1.0 to sine value\n * using linear interpolation.\n */\nfloat LookupSine( paTestData *data, float phase );\nfloat LookupSine( paTestData *data, float phase )\n{\n    float fIndex = phase*TABLE_SIZE;\n    int   index = (int) fIndex;\n    float fract = fIndex - index;\n    float lo = data->sine[index];\n    float hi = data->sine[index+1];\n    float val = lo + fract*(hi-lo);\n    return val;\n}\n\n/* This routine will be called by the PortAudio engine when audio is needed.\n** It may called at interrupt level on some machines so don't do anything\n** that could mess up the system like calling malloc() or free().\n*/\nstatic int patestCallback(const void*                     inputBuffer,\n                          void*                           outputBuffer,\n                          unsigned long                   framesPerBuffer,\n                          const PaStreamCallbackTimeInfo* timeInfo,\n                          PaStreamCallbackFlags           statusFlags,\n                          void*                           userData )\n{\n    paTestData *data = (paTestData*)userData;\n    float *out = (float*)outputBuffer;\n    float outSample;\n    float scaler;\n    int numForScale;\n    unsigned long i;\n    int j;\n    int finished = 0;\n    (void) inputBuffer; /* Prevent unused argument warning. */\n\n    /* Determine amplitude scaling factor */\n    numForScale = data->numSines;\n    if( numForScale < 8 ) numForScale = 8;  /* prevent pops at beginning */\n    scaler = 1.0f / numForScale;\n\n    for( i=0; i<framesPerBuffer; i++ )\n    {\n        float output = 0.0;\n        float phaseInc = MIN_PHASE_INC;\n        float phase;\n        for( j=0; j<data->numSines; j++ )\n        {\n            /* Advance phase of next oscillator. */\n            phase = data->phases[j];\n            phase += phaseInc;\n            if( phase >= 1.0 ) phase -= 1.0;\n\n            output += LookupSine(data, phase);\n            data->phases[j] = phase;\n\n            phaseInc *= 1.02f;\n            if( phaseInc > MAX_PHASE_INC ) phaseInc = MIN_PHASE_INC;\n        }\n\n        outSample = (float) (output * scaler);\n        *out++ = outSample; /* Left */\n        *out++ = outSample; /* Right */\n    }\n    return finished;\n}\n\n/*******************************************************************/\nint main(void);\nint main(void)\n{\n    int                 i;\n    PaStream*           stream;\n    PaStreamParameters  outputParameters;\n    PaError             err;\n    paTestData          data = {0};\n    double              load;\n\n    printf(\"PortAudio Test: output sine wave. SR = %d, BufSize = %d\\n\", SAMPLE_RATE, FRAMES_PER_BUFFER);\n\n    /* initialise sinusoidal wavetable */\n    for( i=0; i<TABLE_SIZE; i++ )\n    {\n        data.sine[i] = (float) sin( ((double)i/(double)TABLE_SIZE) * M_PI * 2. );\n    }\n    data.sine[TABLE_SIZE] = data.sine[0]; /* set guard point */\n\n    err = Pa_Initialize();\n    if( err != paNoError )\n        goto error;\n    outputParameters.device                    = Pa_GetDefaultOutputDevice(); /* Default output device. */\n    if (outputParameters.device == paNoDevice) {\n        fprintf(stderr,\"Error: No default output device.\\n\");\n        goto error;\n    }\n    outputParameters.channelCount              = 2;                           /* Stereo output. */\n    outputParameters.sampleFormat              = paFloat32;                   /* 32 bit floating point output. */\n    outputParameters.hostApiSpecificStreamInfo = NULL;\n    outputParameters.suggestedLatency          = Pa_GetDeviceInfo(outputParameters.device)\n                                                 ->defaultHighOutputLatency;\n    err = Pa_OpenStream(&stream,\n                        NULL,               /* no input */\n                        &outputParameters,\n                        SAMPLE_RATE,\n                        FRAMES_PER_BUFFER,\n                        paClipOff,          /* No out of range samples should occur. */\n                        patestCallback,\n                        &data);\n    if( err != paNoError )\n        goto error;\n\n    err = Pa_StartStream( stream );\n    if( err != paNoError )\n        goto error;\n\n    /* Play an increasing number of sine waves until we hit MAX_USAGE */\n    do  {\n        data.numSines += 10;\n        Pa_Sleep(200);\n        load = Pa_GetStreamCpuLoad(stream);\n        printf(\"numSines = %d, CPU load = %f\\n\", data.numSines, load );\n        fflush(stdout);\n        } while((load < MAX_USAGE) && (data.numSines < MAX_SINES));\n\n    Pa_Sleep(2000);     /* Stay for 2 seconds at max CPU. */\n\n    err = Pa_StopStream( stream );\n    if( err != paNoError )\n        goto error;\n\n    err = Pa_CloseStream( stream );\n    if( err != paNoError )\n        goto error;\n\n    Pa_Terminate();\n    printf(\"Test finished.\\n\");\n    return err;\nerror:\n    Pa_Terminate();\n    fprintf( stderr, \"An error occurred while using the portaudio stream\\n\" );\n    fprintf( stderr, \"Error number: %d\\n\", err );\n    fprintf( stderr, \"Error message: %s\\n\", Pa_GetErrorText( err ) );\n    return err;\n}\n"
  },
  {
    "path": "thirdparty/portaudio/test/patest_mono.c",
    "content": "/** @file patest_mono.c\n    @ingroup test_src\n    @brief Play a monophonic sine wave using the Portable Audio api for several seconds.\n    @author Phil Burk  http://www.softsynth.com\n*/\n/*\n * $Id$\n *\n * Authors:\n *    Ross Bencina <rossb@audiomulch.com>\n *    Phil Burk <philburk@softsynth.com>\n *\n * This program uses the PortAudio Portable Audio Library.\n * For more information see: http://www.portaudio.com\n * Copyright (c) 1999-2000 Ross Bencina and Phil Burk\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n#include <stdio.h>\n#include <math.h>\n#include \"portaudio.h\"\n\n#define NUM_SECONDS   (10)\n#define SAMPLE_RATE   (44100)\n#define AMPLITUDE     (0.8)\n#define FRAMES_PER_BUFFER  (64)\n#define OUTPUT_DEVICE Pa_GetDefaultOutputDevice()\n\n#ifndef M_PI\n#define M_PI  (3.14159265)\n#endif\n\n#define TABLE_SIZE   (200)\ntypedef struct\n{\n    float sine[TABLE_SIZE];\n    int phase;\n}\npaTestData;\n\n/* This routine will be called by the PortAudio engine when audio is needed.\n** It may called at interrupt level on some machines so don't do anything\n** that could mess up the system like calling malloc() or free().\n*/\nstatic int patestCallback( const void *inputBuffer, void *outputBuffer,\n                            unsigned long framesPerBuffer,\n                            const PaStreamCallbackTimeInfo* timeInfo,\n                            PaStreamCallbackFlags statusFlags,\n                            void *userData )\n{\n    paTestData *data = (paTestData*)userData;\n    float *out = (float*)outputBuffer;\n    unsigned long i;\n    int finished = 0;\n    /* avoid unused variable warnings */\n    (void) inputBuffer;\n    (void) timeInfo;\n    (void) statusFlags;\n    for( i=0; i<framesPerBuffer; i++ )\n    {\n        *out++ = data->sine[data->phase];  /* left */\n        data->phase += 1;\n        if( data->phase >= TABLE_SIZE ) data->phase -= TABLE_SIZE;\n    }\n    return finished;\n}\n\n/*******************************************************************/\nint main(void);\nint main(void)\n{\n    PaStreamParameters outputParameters;\n    PaStream *stream;\n    PaError err;\n    paTestData data;\n    int i;\n    printf(\"PortAudio Test: output MONO sine wave. SR = %d, BufSize = %d\\n\", SAMPLE_RATE, FRAMES_PER_BUFFER);\n    /* initialise sinusoidal wavetable */\n    for( i=0; i<TABLE_SIZE; i++ )\n    {\n        data.sine[i] = (float) (AMPLITUDE * sin( ((double)i/(double)TABLE_SIZE) * M_PI * 2. ));\n    }\n    data.phase = 0;\n\n    err = Pa_Initialize();\n    if( err != paNoError ) goto error;\n\n    outputParameters.device = OUTPUT_DEVICE;\n    outputParameters.channelCount = 1;       /* MONO output */\n    outputParameters.sampleFormat = paFloat32; /* 32 bit floating point output */\n    outputParameters.suggestedLatency = Pa_GetDeviceInfo( outputParameters.device )->defaultLowOutputLatency;\n    outputParameters.hostApiSpecificStreamInfo = NULL;\n\n    err = Pa_OpenStream(\n              &stream,\n              NULL, /* no input */\n              &outputParameters,\n              SAMPLE_RATE,\n              FRAMES_PER_BUFFER,\n              paClipOff,      /* we won't output out of range samples so don't bother clipping them */\n              patestCallback,\n              &data );\n    if( err != paNoError ) goto error;\n\n    err = Pa_StartStream( stream );\n    if( err != paNoError ) goto error;\n\n    printf(\"Play for %d seconds.\\n\", NUM_SECONDS ); fflush(stdout);\n    Pa_Sleep( NUM_SECONDS * 1000 );\n\n    err = Pa_StopStream( stream );\n    if( err != paNoError ) goto error;\n\n    err = Pa_CloseStream( stream );\n    if( err != paNoError ) goto error;\n\n    Pa_Terminate();\n    printf(\"Test finished.\\n\");\n    return err;\nerror:\n    Pa_Terminate();\n    fprintf( stderr, \"An error occurred while using the portaudio stream\\n\" );\n    fprintf( stderr, \"Error number: %d\\n\", err );\n    fprintf( stderr, \"Error message: %s\\n\", Pa_GetErrorText( err ) );\n    return err;\n}\n"
  },
  {
    "path": "thirdparty/portaudio/test/patest_multi_sine.c",
    "content": "/** @file patest_multi_sine.c\n    @ingroup test_src\n    @brief Play a different sine wave on each channel.\n    @author Phil Burk  http://www.softsynth.com\n*/\n/*\n * $Id$\n *\n * This program uses the PortAudio Portable Audio Library.\n * For more information see: http://www.portaudio.com\n * Copyright (c) 1999-2000 Ross Bencina and Phil Burk\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n#include <stdio.h>\n#include <math.h>\n\n#include \"portaudio.h\"\n\n#define SAMPLE_RATE       (44100)\n#define FRAMES_PER_BUFFER (128)\n#define FREQ_INCR         (300.0 / SAMPLE_RATE)\n#define MAX_CHANNELS      (64)\n\n#ifndef M_PI\n#define M_PI  (3.14159265)\n#endif\n\ntypedef struct\n{\n    short   interleaved;          /* Nonzero for interleaved / zero for non-interleaved. */\n    int     numChannels;          /* Actually used. */\n    double  phases[MAX_CHANNELS]; /* Each channel gets its' own frequency. */\n}\npaTestData;\n\n/* This routine will be called by the PortAudio engine when audio is needed.\n** It may called at interrupt level on some machines so don't do anything\n** that could mess up the system like calling malloc() or free().\n*/\nstatic int patestCallback(const void*                     inputBuffer,\n                          void*                           outputBuffer,\n                          unsigned long                   framesPerBuffer,\n                          const PaStreamCallbackTimeInfo* timeInfo,\n                          PaStreamCallbackFlags           statusFlags,\n                          void*                           userData)\n{\n    int         frameIndex, channelIndex;\n    float**     outputs = (float**)outputBuffer;\n    paTestData* data    = (paTestData*)userData;\n\n    (void) inputBuffer;     /* Prevent unused arg warning. */\n    if (data->interleaved)\n        {\n        float *out = (float*)outputBuffer;      /* interleaved version */\n        for( frameIndex=0; frameIndex<(int)framesPerBuffer; frameIndex++ )\n            {\n            for( channelIndex=0; channelIndex<data->numChannels; channelIndex++ )\n                {\n                /* Output sine wave on every channel. */\n                *out++ = (float) sin(data->phases[channelIndex]);\n\n                /* Play each channel at a higher frequency. */\n                data->phases[channelIndex] += FREQ_INCR * (4 + channelIndex);\n                if( data->phases[channelIndex] >= (2.0 * M_PI) ) data->phases[channelIndex] -= (2.0 * M_PI);\n                }\n            }\n        }\n    else\n        {\n        for( frameIndex=0; frameIndex<(int)framesPerBuffer; frameIndex++ )\n            {\n            for( channelIndex=0; channelIndex<data->numChannels; channelIndex++ )\n                {\n                /* Output sine wave on every channel. */\n                outputs[channelIndex][frameIndex] = (float) sin(data->phases[channelIndex]);\n\n                /* Play each channel at a higher frequency. */\n                data->phases[channelIndex] += FREQ_INCR * (4 + channelIndex);\n                if( data->phases[channelIndex] >= (2.0 * M_PI) ) data->phases[channelIndex] -= (2.0 * M_PI);\n                }\n            }\n        }\n    return 0;\n}\n\n/*******************************************************************/\nint test(short interleaved)\n{\n    PaStream*           stream;\n    PaStreamParameters  outputParameters;\n    PaError             err;\n    const PaDeviceInfo* pdi;\n    paTestData          data;\n    short               n;\n\n    outputParameters.device = Pa_GetDefaultOutputDevice();  /* Default output device, max channels. */\n    if (outputParameters.device == paNoDevice) {\n        fprintf(stderr,\"Error: No default output device.\\n\");\n        return paInvalidDevice;\n    }\n    pdi = Pa_GetDeviceInfo(outputParameters.device);\n    outputParameters.channelCount = pdi->maxOutputChannels;\n    if (outputParameters.channelCount > MAX_CHANNELS)\n        outputParameters.channelCount = MAX_CHANNELS;\n    outputParameters.sampleFormat = paFloat32;              /* 32 bit floating point output */\n    outputParameters.suggestedLatency = pdi->defaultLowOutputLatency;\n    outputParameters.hostApiSpecificStreamInfo = NULL;\n\n    data.interleaved = interleaved;\n    data.numChannels = outputParameters.channelCount;\n    for (n = 0; n < data.numChannels; n++)\n        data.phases[n] = 0.0; /* Phases wrap and maybe don't need initialisation. */\n    printf(\"%d \", data.numChannels);\n    if (interleaved)\n        printf(\"interleaved \");\n    else\n        {\n        printf(\" non-interleaved \");\n        outputParameters.sampleFormat |= paNonInterleaved;\n        }\n    printf(\"channels.\\n\");\n\n    err = Pa_OpenStream(&stream,\n                        NULL,               /* No input. */\n                        &outputParameters,\n                        SAMPLE_RATE,        /* Sample rate. */\n                        FRAMES_PER_BUFFER,  /* Frames per buffer. */\n                        paClipOff,          /* Samples never out of range, no clipping. */\n                        patestCallback,\n                        &data);\n    if (err == paNoError)\n        {\n        err = Pa_StartStream(stream);\n        if (err == paNoError)\n            {\n            printf(\"Hit ENTER to stop this test.\\n\");\n            getchar();\n            err = Pa_StopStream(stream);\n            }\n        Pa_CloseStream( stream );\n        }\n    return err;\n}\n\n\n/*******************************************************************/\nint main(void)\n{\n    PaError err;\n\n    printf(\"PortAudio Test: output sine wave on each channel.\\n\" );\n\n    err = Pa_Initialize();\n    if (err != paNoError)\n        goto done;\n\n    err = test(1);          /* 1 means interleaved. */\n    if (err != paNoError)\n        goto done;\n\n    err = test(0);          /* 0 means not interleaved. */\n    if (err != paNoError)\n        goto done;\n\n    printf(\"Test finished.\\n\");\ndone:\n    if (err)\n        {\n        fprintf(stderr, \"An error occurred while using the portaudio stream\\n\");\n        fprintf(stderr, \"Error number: %d\\n\", err );\n        fprintf(stderr, \"Error message: %s\\n\", Pa_GetErrorText(err));\n        }\n    Pa_Terminate();\n    return 0;\n}\n"
  },
  {
    "path": "thirdparty/portaudio/test/patest_out_underflow.c",
    "content": "/** @file patest_out_underflow.c\n    @ingroup test_src\n    @brief Count output underflows (using paOutputUnderflow flag)\n    under overloaded and normal conditions.\n    @author Ross Bencina <rossb@audiomulch.com>\n    @author Phil Burk <philburk@softsynth.com>\n*/\n/*\n * $Id$\n *\n * This program uses the PortAudio Portable Audio Library.\n * For more information see: http://www.portaudio.com\n * Copyright (c) 1999-2004 Ross Bencina and Phil Burk\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n#include <stdio.h>\n#include <math.h>\n#include \"portaudio.h\"\n\n#define MAX_SINES     (1000)\n#define MAX_LOAD      (1.2)\n#define SAMPLE_RATE   (44100)\n#define FRAMES_PER_BUFFER  (512)\n#ifndef M_PI\n#define M_PI  (3.14159265)\n#endif\n#define TWOPI (M_PI * 2.0)\n\ntypedef struct paTestData\n{\n    int sineCount;\n    double phases[MAX_SINES];\n    int countUnderflows;\n    int outputUnderflowCount;\n}\npaTestData;\n\n/* This routine will be called by the PortAudio engine when audio is needed.\n** It may called at interrupt level on some machines so don't do anything\n** that could mess up the system like calling malloc() or free().\n*/\nstatic int patestCallback( const void *inputBuffer, void *outputBuffer,\n                           unsigned long framesPerBuffer,\n                           const PaStreamCallbackTimeInfo* timeInfo,\n                           PaStreamCallbackFlags statusFlags,\n                           void *userData )\n{\n    paTestData *data = (paTestData*)userData;\n    float *out = (float*)outputBuffer;\n    unsigned long i;\n    int j;\n    int finished = paContinue;\n    (void) timeInfo;    /* Prevent unused variable warning. */\n    (void) inputBuffer; /* Prevent unused variable warning. */\n\n\n    if( data->countUnderflows && (statusFlags & paOutputUnderflow) )\n    {\n        data->outputUnderflowCount++;\n    }\n    for( i=0; i<framesPerBuffer; i++ )\n    {\n        float output = 0.0;\n        double phaseInc = 0.02;\n        double phase;\n\n        for( j=0; j<data->sineCount; j++ )\n        {\n            /* Advance phase of next oscillator. */\n            phase = data->phases[j];\n            phase += phaseInc;\n            if( phase > TWOPI ) phase -= TWOPI;\n\n            phaseInc *= 1.02;\n            if( phaseInc > 0.5 ) phaseInc *= 0.5;\n\n            /* This is not a very efficient way to calc sines. */\n            output += (float) sin( phase );\n            data->phases[j] = phase;\n        }\n        *out++ = (float) (output / data->sineCount);\n    }\n\n    return finished;\n}\n\n/*******************************************************************/\nint main(void);\nint main(void)\n{\n    PaStreamParameters outputParameters;\n    PaStream *stream;\n    PaError err;\n    int safeSineCount, stressedSineCount;\n    int sineCount;\n    int safeUnderflowCount, stressedUnderflowCount;\n    paTestData data = {0};\n    double load;\n    double suggestedLatency;\n\n\n    printf(\"PortAudio Test: output sine waves, count underflows. SR = %d, BufSize = %d. MAX_LOAD = %f\\n\",\n        SAMPLE_RATE, FRAMES_PER_BUFFER, (float)MAX_LOAD );\n\n    err = Pa_Initialize();\n    if( err != paNoError ) goto error;\n\n    outputParameters.device = Pa_GetDefaultOutputDevice();  /* default output device */\n    if (outputParameters.device == paNoDevice) {\n        fprintf(stderr,\"Error: No default output device.\\n\");\n        goto error;\n    }\n    outputParameters.channelCount = 1;                      /* mono output */\n    outputParameters.sampleFormat = paFloat32;              /* 32 bit floating point output */\n    suggestedLatency = Pa_GetDeviceInfo( outputParameters.device )->defaultLowOutputLatency;\n    outputParameters.suggestedLatency = suggestedLatency;\n    outputParameters.hostApiSpecificStreamInfo = NULL;\n\n    err = Pa_OpenStream(\n              &stream,\n              NULL,         /* no input */\n              &outputParameters,\n              SAMPLE_RATE,\n              FRAMES_PER_BUFFER,\n              paClipOff,    /* we won't output out of range samples so don't bother clipping them */\n              patestCallback,\n              &data );\n    if( err != paNoError ) goto error;\n    err = Pa_StartStream( stream );\n    if( err != paNoError ) goto error;\n\n    printf(\"Establishing load conditions...\\n\" );\n\n    /* Determine number of sines required to get to 50% */\n    do\n    {\n        Pa_Sleep( 100 );\n\n        load = Pa_GetStreamCpuLoad( stream );\n        printf(\"sineCount = %d, CPU load = %f\\n\", data.sineCount, load );\n\n        if( load < 0.3 )\n        {\n            data.sineCount += 10;\n        }\n        else if( load < 0.4 )\n        {\n            data.sineCount += 2;\n        }\n        else\n        {\n            data.sineCount += 1;\n        }\n    }\n    while( load < 0.5 && data.sineCount < (MAX_SINES-1));\n\n    safeSineCount = data.sineCount;\n\n    /* Calculate target stress value then ramp up to that level*/\n    stressedSineCount = (int) (2.0 * data.sineCount * MAX_LOAD );\n    if( stressedSineCount > MAX_SINES )\n        stressedSineCount = MAX_SINES;\n    sineCount = data.sineCount;\n    for( ; sineCount < stressedSineCount; sineCount+=4 )\n    {\n        data.sineCount = sineCount;\n        Pa_Sleep( 100 );\n        load = Pa_GetStreamCpuLoad( stream );\n        printf(\"STRESSING: sineCount = %d, CPU load = %f\\n\", sineCount, load );\n    }\n\n    printf(\"Counting underflows for 2 seconds.\\n\");\n    data.countUnderflows = 1;\n    Pa_Sleep( 2000 );\n\n    stressedUnderflowCount = data.outputUnderflowCount;\n\n    data.countUnderflows = 0;\n    data.sineCount = safeSineCount;\n\n    printf(\"Resuming safe load...\\n\");\n    Pa_Sleep( 1500 );\n    data.outputUnderflowCount = 0;\n    Pa_Sleep( 1500 );\n    load = Pa_GetStreamCpuLoad( stream );\n    printf(\"sineCount = %d, CPU load = %f\\n\", data.sineCount, load );\n\n    printf(\"Counting underflows for 5 seconds.\\n\");\n    data.countUnderflows = 1;\n    Pa_Sleep( 5000 );\n\n    safeUnderflowCount = data.outputUnderflowCount;\n\n    printf(\"Stop stream.\\n\");\n    err = Pa_StopStream( stream );\n    if( err != paNoError ) goto error;\n\n    err = Pa_CloseStream( stream );\n    if( err != paNoError ) goto error;\n\n    Pa_Terminate();\n\n    printf(\"suggestedLatency = %f\\n\", suggestedLatency);\n\n    // Report pass or fail\n    if( stressedUnderflowCount == 0 )\n        printf(\"Test FAILED, no output underflows detected under stress.\\n\");\n    else\n        printf(\"Test %s, %d expected output underflows detected under stress, \"\n               \"%d unexpected underflows detected under safe load.\\n\",\n               (safeUnderflowCount == 0) ? \"PASSED\" : \"FAILED\",\n               stressedUnderflowCount, safeUnderflowCount );\n\n    return err;\nerror:\n    Pa_Terminate();\n    fprintf( stderr, \"An error occurred while using the portaudio stream\\n\" );\n    fprintf( stderr, \"Error number: %d\\n\", err );\n    fprintf( stderr, \"Error message: %s\\n\", Pa_GetErrorText( err ) );\n    return err;\n}\n"
  },
  {
    "path": "thirdparty/portaudio/test/patest_prime.c",
    "content": "/** @file patest_prime.c\n    @ingroup test_src\n    @brief Test stream priming mode.\n    @author Ross Bencina http://www.audiomulch.com/~rossb\n*/\n\n/*\n * $Id$\n *\n * This program uses the PortAudio Portable Audio Library.\n * For more information see: http://www.portaudio.com\n * Copyright (c) 1999-2000 Ross Bencina and Phil Burk\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n#include <stdio.h>\n#include <math.h>\n#include \"portaudio.h\"\n#include \"pa_util.h\"\n\n#define NUM_BEEPS           (3)\n#define SAMPLE_RATE         (44100)\n#define SAMPLE_PERIOD       (1.0/44100.0)\n#define FRAMES_PER_BUFFER   (256)\n#define BEEP_DURATION       (400)\n#define IDLE_DURATION       (SAMPLE_RATE*2)      /* 2 seconds */\n#define SLEEP_MSEC          (50)\n\n#define STATE_BKG_IDLE      (0)\n#define STATE_BKG_BEEPING   (1)\n\ntypedef struct\n{\n    float        leftPhase;\n    float        rightPhase;\n    int          state;\n    int          beepCountdown;\n    int          idleCountdown;\n}\npaTestData;\n\nstatic void InitializeTestData( paTestData *testData )\n{\n    testData->leftPhase = 0;\n    testData->rightPhase = 0;\n    testData->state = STATE_BKG_BEEPING;\n    testData->beepCountdown = BEEP_DURATION;\n    testData->idleCountdown = IDLE_DURATION;\n}\n\n/* This routine will be called by the PortAudio engine when audio is needed.\n** It may called at interrupt level on some machines so don't do anything\n** that could mess up the system like calling malloc() or free().\n*/\nstatic int patestCallback( const void *inputBuffer, void *outputBuffer,\n                           unsigned long framesPerBuffer,\n                           const PaStreamCallbackTimeInfo *timeInfo,\n                           PaStreamCallbackFlags statusFlags, void *userData )\n{\n    /* Cast data passed through stream to our structure. */\n    paTestData *data = (paTestData*)userData;\n    float *out = (float*)outputBuffer;\n    unsigned int i;\n    int result = paContinue;\n\n    /* suppress unused parameter warnings */\n    (void) inputBuffer;\n    (void) timeInfo;\n    (void) statusFlags;\n\n    for( i=0; i<framesPerBuffer; i++ )\n    {\n        switch( data->state )\n        {\n        case STATE_BKG_IDLE:\n            *out++ = 0.0;  /* left */\n            *out++ = 0.0;  /* right */\n            --data->idleCountdown;\n\n            if( data->idleCountdown <= 0 ) result = paComplete;\n            break;\n\n        case STATE_BKG_BEEPING:\n            if( data->beepCountdown <= 0 )\n            {\n                data->state = STATE_BKG_IDLE;\n                *out++ = 0.0;  /* left */\n                *out++ = 0.0;  /* right */\n            }\n            else\n            {\n                /* Play sawtooth wave. */\n                *out++ = data->leftPhase;  /* left */\n                *out++ = data->rightPhase;  /* right */\n                /* Generate simple sawtooth phaser that ranges between -1.0 and 1.0. */\n                data->leftPhase += 0.01f;\n                /* When signal reaches top, drop back down. */\n                if( data->leftPhase >= 1.0f ) data->leftPhase -= 2.0f;\n                /* higher pitch so we can distinguish left and right. */\n                data->rightPhase += 0.03f;\n                if( data->rightPhase >= 1.0f ) data->rightPhase -= 2.0f;\n            }\n            --data->beepCountdown;\n            break;\n        }\n    }\n\n    return result;\n}\n\n/*******************************************************************/\nstatic PaError DoTest( int flags )\n{\n    PaStream *stream;\n    PaError    err = paNoError;\n    paTestData data;\n    PaStreamParameters outputParameters;\n\n    InitializeTestData( &data );\n\n    outputParameters.device = Pa_GetDefaultOutputDevice();\n    if (outputParameters.device == paNoDevice) {\n        fprintf(stderr,\"Error: No default output device.\\n\");\n        goto error;\n    }\n    outputParameters.channelCount = 2;\n    outputParameters.hostApiSpecificStreamInfo = NULL;\n    outputParameters.sampleFormat = paFloat32;\n    outputParameters.suggestedLatency = Pa_GetDeviceInfo( outputParameters.device )->defaultHighOutputLatency;\n\n    /* Open an audio I/O stream. */\n    err = Pa_OpenStream(\n        &stream,\n        NULL,                         /* no input */\n        &outputParameters,\n        SAMPLE_RATE,\n        FRAMES_PER_BUFFER,            /* frames per buffer */\n        paClipOff | flags,      /* we won't output out of range samples so don't bother clipping them */\n        patestCallback,\n        &data );\n    if( err != paNoError ) goto error;\n\n\n    err = Pa_StartStream( stream );\n    if( err != paNoError ) goto error;\n\n    printf(\"hear \\\"BEEP\\\"\\n\" );\n    fflush(stdout);\n\n    while( ( err = Pa_IsStreamActive( stream ) ) == 1 ) Pa_Sleep(SLEEP_MSEC);\n    if( err < 0 ) goto error;\n\n    err = Pa_StopStream( stream );\n    if( err != paNoError ) goto error;\n\n    err = Pa_CloseStream( stream );\n    if( err != paNoError ) goto error;\n\n    return err;\nerror:\n    return err;\n}\n\n/*******************************************************************/\nint main(void);\nint main(void)\n{\n    PaError    err = paNoError;\n    int        i;\n\n    /* Initialize library before making any other calls. */\n    err = Pa_Initialize();\n    if( err != paNoError ) goto error;\n\n    printf(\"PortAudio Test: Testing stream playback with no priming.\\n\");\n    printf(\"PortAudio Test: you should see BEEP before you hear it.\\n\");\n    printf(\"BEEP %d times.\\n\", NUM_BEEPS );\n\n    for( i=0; i< NUM_BEEPS; ++i )\n    {\n        err = DoTest( 0 );\n        if( err != paNoError )\n            goto error;\n    }\n\n    printf(\"PortAudio Test: Testing stream playback with priming.\\n\");\n    printf(\"PortAudio Test: you should see BEEP around the same time you hear it.\\n\");\n    for( i=0; i< NUM_BEEPS; ++i )\n    {\n        err = DoTest( paPrimeOutputBuffersUsingStreamCallback );\n        if( err != paNoError )\n            goto error;\n    }\n\n    printf(\"Test finished.\\n\");\n\n    Pa_Terminate();\n    return err;\nerror:\n    Pa_Terminate();\n    fprintf( stderr, \"An error occurred while using the portaudio stream\\n\" );\n    fprintf( stderr, \"Error number: %d\\n\", err );\n    fprintf( stderr, \"Error message: %s\\n\", Pa_GetErrorText( err ) );\n    return err;\n}\n"
  },
  {
    "path": "thirdparty/portaudio/test/patest_read_record.c",
    "content": "/** @file patest_read_record.c\n    @ingroup test_src\n    @brief Record input into an array; Save array to a file; Playback recorded\n    data. Implemented using the blocking API (Pa_ReadStream(), Pa_WriteStream() )\n    @author Phil Burk  http://www.softsynth.com\n    @author Ross Bencina rossb@audiomulch.com\n*/\n/*\n * $Id$\n *\n * This program uses the PortAudio Portable Audio Library.\n * For more information see: http://www.portaudio.com\n * Copyright (c) 1999-2000 Ross Bencina and Phil Burk\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n#include <stdio.h>\n#include <stdlib.h>\n#include \"portaudio.h\"\n\n/* #define SAMPLE_RATE  (17932) // Test failure to open with this value. */\n#define SAMPLE_RATE  (44100)\n#define FRAMES_PER_BUFFER (1024)\n#define NUM_SECONDS     (5)\n#define NUM_CHANNELS    (2)\n/* #define DITHER_FLAG     (paDitherOff)  */\n#define DITHER_FLAG     (0) /**/\n\n/* Select sample format. */\n#if 1\n#define PA_SAMPLE_TYPE  paFloat32\ntypedef float SAMPLE;\n#define SAMPLE_SILENCE  (0.0f)\n#define PRINTF_S_FORMAT \"%.8f\"\n#elif 1\n#define PA_SAMPLE_TYPE  paInt16\ntypedef short SAMPLE;\n#define SAMPLE_SILENCE  (0)\n#define PRINTF_S_FORMAT \"%d\"\n#elif 0\n#define PA_SAMPLE_TYPE  paInt8\ntypedef char SAMPLE;\n#define SAMPLE_SILENCE  (0)\n#define PRINTF_S_FORMAT \"%d\"\n#else\n#define PA_SAMPLE_TYPE  paUInt8\ntypedef unsigned char SAMPLE;\n#define SAMPLE_SILENCE  (128)\n#define PRINTF_S_FORMAT \"%d\"\n#endif\n\n\n/*******************************************************************/\nint main(void);\nint main(void)\n{\n    PaStreamParameters inputParameters, outputParameters;\n    PaStream *stream;\n    PaError err;\n    SAMPLE *recordedSamples;\n    int i;\n    int totalFrames;\n    int numSamples;\n    int numBytes;\n    SAMPLE max, average, val;\n\n\n    printf(\"patest_read_record.c\\n\"); fflush(stdout);\n\n    totalFrames = NUM_SECONDS * SAMPLE_RATE; /* Record for a few seconds. */\n    numSamples = totalFrames * NUM_CHANNELS;\n\n    numBytes = numSamples * sizeof(SAMPLE);\n    recordedSamples = (SAMPLE *) malloc( numBytes );\n    if( recordedSamples == NULL )\n    {\n        printf(\"Could not allocate record array.\\n\");\n        exit(1);\n    }\n    for( i=0; i<numSamples; i++ ) recordedSamples[i] = 0;\n\n    err = Pa_Initialize();\n    if( err != paNoError ) goto error;\n\n    inputParameters.device = Pa_GetDefaultInputDevice(); /* default input device */\n    if (inputParameters.device == paNoDevice) {\n        fprintf(stderr,\"Error: No default input device.\\n\");\n        goto error;\n    }\n    inputParameters.channelCount = NUM_CHANNELS;\n    inputParameters.sampleFormat = PA_SAMPLE_TYPE;\n    inputParameters.suggestedLatency = Pa_GetDeviceInfo( inputParameters.device )->defaultLowInputLatency;\n    inputParameters.hostApiSpecificStreamInfo = NULL;\n\n    /* Record some audio. -------------------------------------------- */\n    err = Pa_OpenStream(\n              &stream,\n              &inputParameters,\n              NULL,                  /* &outputParameters, */\n              SAMPLE_RATE,\n              FRAMES_PER_BUFFER,\n              paClipOff,      /* we won't output out of range samples so don't bother clipping them */\n              NULL, /* no callback, use blocking API */\n              NULL ); /* no callback, so no callback userData */\n    if( err != paNoError ) goto error;\n\n    err = Pa_StartStream( stream );\n    if( err != paNoError ) goto error;\n    printf(\"Now recording!!\\n\"); fflush(stdout);\n\n    err = Pa_ReadStream( stream, recordedSamples, totalFrames );\n    if( err != paNoError ) goto error;\n\n    err = Pa_CloseStream( stream );\n    if( err != paNoError ) goto error;\n\n    /* Measure maximum peak amplitude. */\n    max = 0;\n    average = 0;\n    for( i=0; i<numSamples; i++ )\n    {\n        val = recordedSamples[i];\n        if( val < 0 ) val = -val; /* ABS */\n        if( val > max )\n        {\n            max = val;\n        }\n        average += val;\n    }\n\n    average = average / numSamples;\n\n    printf(\"Sample max amplitude = \"PRINTF_S_FORMAT\"\\n\", max );\n    printf(\"Sample average = \"PRINTF_S_FORMAT\"\\n\", average );\n/*  Was as below. Better choose at compile time because this\n    keeps generating compiler-warnings:\n    if( PA_SAMPLE_TYPE == paFloat32 )\n    {\n        printf(\"sample max amplitude = %f\\n\", max );\n        printf(\"sample average = %f\\n\", average );\n    }\n    else\n    {\n        printf(\"sample max amplitude = %d\\n\", max );\n        printf(\"sample average = %d\\n\", average );\n    }\n*/\n    /* Write recorded data to a file. */\n#if 0\n    {\n        FILE  *fid;\n        fid = fopen(\"recorded.raw\", \"wb\");\n        if( fid == NULL )\n        {\n            printf(\"Could not open file.\");\n        }\n        else\n        {\n            fwrite( recordedSamples, NUM_CHANNELS * sizeof(SAMPLE), totalFrames, fid );\n            fclose( fid );\n            printf(\"Wrote data to 'recorded.raw'\\n\");\n        }\n    }\n#endif\n\n    /* Playback recorded data.  -------------------------------------------- */\n\n    outputParameters.device = Pa_GetDefaultOutputDevice(); /* default output device */\n    if (outputParameters.device == paNoDevice) {\n        fprintf(stderr,\"Error: No default output device.\\n\");\n        goto error;\n    }\n    outputParameters.channelCount = NUM_CHANNELS;\n    outputParameters.sampleFormat =  PA_SAMPLE_TYPE;\n    outputParameters.suggestedLatency = Pa_GetDeviceInfo( outputParameters.device )->defaultLowOutputLatency;\n    outputParameters.hostApiSpecificStreamInfo = NULL;\n\n    printf(\"Begin playback.\\n\"); fflush(stdout);\n    err = Pa_OpenStream(\n              &stream,\n              NULL, /* no input */\n              &outputParameters,\n              SAMPLE_RATE,\n              FRAMES_PER_BUFFER,\n              paClipOff,      /* we won't output out of range samples so don't bother clipping them */\n              NULL, /* no callback, use blocking API */\n              NULL ); /* no callback, so no callback userData */\n    if( err != paNoError ) goto error;\n\n    if( stream )\n    {\n        err = Pa_StartStream( stream );\n        if( err != paNoError ) goto error;\n        printf(\"Waiting for playback to finish.\\n\"); fflush(stdout);\n\n        err = Pa_WriteStream( stream, recordedSamples, totalFrames );\n        if( err != paNoError ) goto error;\n\n        err = Pa_CloseStream( stream );\n        if( err != paNoError ) goto error;\n        printf(\"Done.\\n\"); fflush(stdout);\n    }\n    free( recordedSamples );\n\n    Pa_Terminate();\n    return 0;\n\nerror:\n    Pa_Terminate();\n    fprintf( stderr, \"An error occurred while using the portaudio stream\\n\" );\n    fprintf( stderr, \"Error number: %d\\n\", err );\n    fprintf( stderr, \"Error message: %s\\n\", Pa_GetErrorText( err ) );\n    return -1;\n}\n"
  },
  {
    "path": "thirdparty/portaudio/test/patest_ringmix.c",
    "content": "/** @file patest_ringmix.c\n    @ingroup test_src\n    @brief Ring modulate inputs to left output, mix inputs to right output.\n*/\n/*\n * $Id$\n *\n * This program uses the PortAudio Portable Audio Library.\n * For more information see: http://www.portaudio.com\n * Copyright (c) 1999-2000 Ross Bencina and Phil Burk\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n\n#include \"stdio.h\"\n#include \"portaudio.h\"\n/* This will be called asynchronously by the PortAudio engine. */\nstatic int myCallback( const void *inputBuffer, void *outputBuffer,\n                            unsigned long framesPerBuffer,\n                            const PaStreamCallbackTimeInfo* timeInfo,\n                            PaStreamCallbackFlags statusFlags,\n                            void *userData )\n{\n    const float *in  = (const float *) inputBuffer;\n    float *out = (float *) outputBuffer;\n    float leftInput, rightInput;\n    unsigned int i;\n\n    /* Read input buffer, process data, and fill output buffer. */\n    for( i=0; i<framesPerBuffer; i++ )\n    {\n        leftInput = *in++;      /* Get interleaved samples from input buffer. */\n        rightInput = *in++;\n        *out++ = leftInput * rightInput;            /* ring modulation */\n        *out++ = 0.5f * (leftInput + rightInput);   /* mix */\n    }\n    return 0;\n}\n\n/* Open a PortAudioStream to input and output audio data. */\nint main(void)\n{\n    PaStream *stream;\n    Pa_Initialize();\n    Pa_OpenDefaultStream(\n        &stream,\n        2, 2,               /* stereo input and output */\n        paFloat32,  44100.0,\n        64,                 /* 64 frames per buffer */\n        myCallback, NULL );\n    Pa_StartStream( stream );\n    Pa_Sleep( 10000 );    /* Sleep for 10 seconds while processing. */\n    Pa_StopStream( stream );\n    Pa_CloseStream( stream );\n    Pa_Terminate();\n    return 0;\n}\n"
  },
  {
    "path": "thirdparty/portaudio/test/patest_sine8.c",
    "content": "/** @file patest_sine8.c\n    @ingroup test_src\n    @brief Test 8 bit data: play a sine wave for several seconds.\n    @author Ross Bencina <rossb@audiomulch.com>\n*/\n/*\n * $Id$\n *\n * This program uses the PortAudio Portable Audio Library.\n * For more information see: http://www.portaudio.com\n * Copyright (c) 1999-2000 Ross Bencina and Phil Burk\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n#include <stdio.h>\n#include <math.h>\n#include \"portaudio.h\"\n\n#define NUM_SECONDS   (8)\n#define SAMPLE_RATE   (44100)\n#define TABLE_SIZE    (200)\n#define TEST_UNSIGNED (0)\n\n#if TEST_UNSIGNED\n#define TEST_FORMAT   paUInt8\ntypedef unsigned char sample_t;\n#define SILENCE       ((sample_t)0x80)\n#else\n#define TEST_FORMAT   paInt8\ntypedef char          sample_t;\n#define SILENCE       ((sample_t)0x00)\n#endif\n\n#ifndef M_PI\n#define M_PI (3.14159265)\n#endif\n\ntypedef struct\n{\n    sample_t sine[TABLE_SIZE];\n    int left_phase;\n    int right_phase;\n    unsigned int framesToGo;\n}\npaTestData;\n\n/* This routine will be called by the PortAudio engine when audio is needed.\n** It may called at interrupt level on some machines so don't do anything\n** that could mess up the system like calling malloc() or free().\n*/\nstatic int patestCallback( const void *inputBuffer, void *outputBuffer,\n                           unsigned long framesPerBuffer,\n                           const PaStreamCallbackTimeInfo* timeInfo,\n                           PaStreamCallbackFlags statusFlags,\n                           void *userData )\n{\n    paTestData *data = (paTestData*)userData;\n    sample_t *out = (sample_t*)outputBuffer;\n    int i;\n    int framesToCalc;\n    int finished = 0;\n    (void) inputBuffer; /* Prevent unused variable warnings. */\n\n    if( data->framesToGo < framesPerBuffer )\n    {\n        framesToCalc = data->framesToGo;\n        data->framesToGo = 0;\n        finished = 1;\n    }\n    else\n    {\n        framesToCalc = framesPerBuffer;\n        data->framesToGo -= framesPerBuffer;\n    }\n\n    for( i=0; i<framesToCalc; i++ )\n    {\n        *out++ = data->sine[data->left_phase];  /* left */\n        *out++ = data->sine[data->right_phase];  /* right */\n        data->left_phase += 1;\n        if( data->left_phase >= TABLE_SIZE ) data->left_phase -= TABLE_SIZE;\n        data->right_phase += 3; /* higher pitch so we can distinguish left and right. */\n        if( data->right_phase >= TABLE_SIZE ) data->right_phase -= TABLE_SIZE;\n    }\n    /* zero remainder of final buffer */\n    for( ; i<(int)framesPerBuffer; i++ )\n    {\n        *out++ = SILENCE; /* left */\n        *out++ = SILENCE; /* right */\n    }\n    return finished;\n}\n\n/*******************************************************************/\nint main(void);\nint main(void)\n{\n    PaStreamParameters  outputParameters;\n    PaStream*           stream;\n    PaError             err;\n    paTestData          data;\n    PaTime              streamOpened;\n    int                 i, totalSamps;\n\n#if TEST_UNSIGNED\n    printf(\"PortAudio Test: output UNsigned 8 bit sine wave.\\n\");\n#else\n    printf(\"PortAudio Test: output signed 8 bit sine wave.\\n\");\n#endif\n    /* initialise sinusoidal wavetable */\n    for( i=0; i<TABLE_SIZE; i++ )\n    {\n        data.sine[i] = SILENCE + (char) (127.0 * sin( ((double)i/(double)TABLE_SIZE) * M_PI * 2. ));\n    }\n    data.left_phase = data.right_phase = 0;\n    data.framesToGo = totalSamps =  NUM_SECONDS * SAMPLE_RATE; /* Play for a few seconds. */\n\n    err = Pa_Initialize();\n    if( err != paNoError )\n        goto error;\n\n    outputParameters.device = Pa_GetDefaultOutputDevice(); /* Default output device. */\n    if (outputParameters.device == paNoDevice) {\n        fprintf(stderr,\"Error: No default output device.\\n\");\n        goto error;\n    }\n    outputParameters.channelCount = 2;                     /* Stereo output. */\n    outputParameters.sampleFormat = TEST_FORMAT;\n    outputParameters.suggestedLatency = Pa_GetDeviceInfo( outputParameters.device )->defaultLowOutputLatency;\n    outputParameters.hostApiSpecificStreamInfo = NULL;\n    err = Pa_OpenStream( &stream,\n                         NULL,      /* No input. */\n                         &outputParameters,\n                         SAMPLE_RATE,\n                         256,       /* Frames per buffer. */\n                         paClipOff, /* We won't output out of range samples so don't bother clipping them. */\n                         patestCallback,\n                         &data );\n    if( err != paNoError )\n        goto error;\n\n    streamOpened = Pa_GetStreamTime( stream ); /* Time in seconds when stream was opened (approx). */\n\n    err = Pa_StartStream( stream );\n    if( err != paNoError )\n        goto error;\n\n    /* Watch until sound is halfway finished. */\n    /* (Was ( Pa_StreamTime( stream ) < (totalSamps/2) ) in V18. */\n    while( (Pa_GetStreamTime( stream ) - streamOpened) < (PaTime)NUM_SECONDS / 2.0 )\n        Pa_Sleep(10);\n\n    /* Stop sound. */\n    printf(\"Stopping Stream.\\n\");\n    err = Pa_StopStream( stream );\n    if( err != paNoError )\n        goto error;\n\n    printf(\"Pause for 2 seconds.\\n\");\n    Pa_Sleep( 2000 );\n\n    printf(\"Starting again.\\n\");\n    err = Pa_StartStream( stream );\n    if( err != paNoError )\n        goto error;\n\n    printf(\"Waiting for sound to finish.\\n\");\n\n    while( ( err = Pa_IsStreamActive( stream ) ) == 1 )\n        Pa_Sleep(100);\n    if( err < 0 )\n        goto error;\n\n    err = Pa_CloseStream( stream );\n    if( err != paNoError )\n        goto error;\n\n    Pa_Terminate();\n    printf(\"Test finished.\\n\");\n    return err;\nerror:\n    Pa_Terminate();\n    fprintf( stderr, \"An error occurred while using the portaudio stream\\n\" );\n    fprintf( stderr, \"Error number: %d\\n\", err );\n    fprintf( stderr, \"Error message: %s\\n\", Pa_GetErrorText( err ) );\n    return err;\n}\n"
  },
  {
    "path": "thirdparty/portaudio/test/patest_sine_channelmaps.c",
    "content": "/*\n * patest_sine_channelmaps.c\n *\n * This program uses the PortAudio Portable Audio Library.\n * For more information see: http://www.portaudio.com/\n * Copyright (c) 1999-2000 Ross Bencina and Phil Burk\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n/** @file patest_sine_channelmaps.c\n    @ingroup test_src\n    @brief Plays sine waves using sme simple channel maps.\n          Designed for use with CoreAudio, but should made to work with other APIs\n    @author Bjorn Roche <bjorn@xowave.com>\n   @author Ross Bencina <rossb@audiomulch.com>\n   @author Phil Burk <philburk@softsynth.com>\n*/\n\n#include <stdio.h>\n#include <math.h>\n#include \"portaudio.h\"\n\n#ifdef __APPLE__\n#include \"pa_mac_core.h\"\n#endif\n\n#define NUM_SECONDS   (5)\n#define SAMPLE_RATE   (44100)\n#define FRAMES_PER_BUFFER  (64)\n\n#ifndef M_PI\n#define M_PI  (3.14159265)\n#endif\n\n#define TABLE_SIZE   (200)\ntypedef struct\n{\n    float sine[TABLE_SIZE];\n    int left_phase;\n    int right_phase;\n}\npaTestData;\n\n/* This routine will be called by the PortAudio engine when audio is needed.\n** It may called at interrupt level on some machines so don't do anything\n** that could mess up the system like calling malloc() or free().\n*/\nstatic int patestCallback( const void *inputBuffer, void *outputBuffer,\n                            unsigned long framesPerBuffer,\n                            const PaStreamCallbackTimeInfo* timeInfo,\n                            PaStreamCallbackFlags statusFlags,\n                            void *userData )\n{\n    paTestData *data = (paTestData*)userData;\n    float *out = (float*)outputBuffer;\n    unsigned long i;\n\n    (void) timeInfo; /* Prevent unused variable warnings. */\n    (void) statusFlags;\n    (void) inputBuffer;\n\n    for( i=0; i<framesPerBuffer; i++ )\n    {\n        *out++ = data->sine[data->left_phase];  /* left */\n        *out++ = data->sine[data->right_phase];  /* right */\n        data->left_phase += 1;\n        if( data->left_phase >= TABLE_SIZE ) data->left_phase -= TABLE_SIZE;\n        data->right_phase += 3; /* higher pitch so we can distinguish left and right. */\n        if( data->right_phase >= TABLE_SIZE ) data->right_phase -= TABLE_SIZE;\n    }\n\n    return paContinue;\n}\n\n/*******************************************************************/\nint main(void);\nint main(void)\n{\n    PaStreamParameters outputParameters;\n    PaStream *stream;\n    PaError err;\n    paTestData data;\n#ifdef __APPLE__\n    PaMacCoreStreamInfo macInfo;\n    const SInt32 channelMap[4] = { -1, -1, 0, 1 };\n#endif\n    int i;\n\n\n    printf(\"PortAudio Test: output sine wave. SR = %d, BufSize = %d\\n\", SAMPLE_RATE, FRAMES_PER_BUFFER);\n    printf(\"Output will be mapped to channels 2 and 3 instead of 0 and 1.\\n\");\n\n    /* initialise sinusoidal wavetable */\n    for( i=0; i<TABLE_SIZE; i++ )\n    {\n        data.sine[i] = (float) sin( ((double)i/(double)TABLE_SIZE) * M_PI * 2. );\n    }\n    data.left_phase = data.right_phase = 0;\n\n    err = Pa_Initialize();\n    if( err != paNoError ) goto error;\n\n    /** setup host specific info */\n#ifdef __APPLE__\n    PaMacCore_SetupStreamInfo( &macInfo, paMacCorePlayNice );\n    PaMacCore_SetupChannelMap( &macInfo, channelMap, 4 );\n\n    for( i=0; i<4; ++i )\n        printf( \"channel %d name: %s\\n\", i, PaMacCore_GetChannelName( Pa_GetDefaultOutputDevice(), i, false ) );\n#else\n    printf( \"Channel mapping not supported on this platform. Reverting to normal sine test.\\n\" );\n#endif\n\n    outputParameters.device = Pa_GetDefaultOutputDevice(); /* default output device */\n    if (outputParameters.device == paNoDevice) {\n        fprintf(stderr,\"Error: No default output device.\\n\");\n        goto error;\n    }\n    outputParameters.channelCount = 2;       /* stereo output */\n    outputParameters.sampleFormat = paFloat32; /* 32 bit floating point output */\n    outputParameters.suggestedLatency = Pa_GetDeviceInfo( outputParameters.device )->defaultLowOutputLatency;\n#ifdef __APPLE__\n    outputParameters.hostApiSpecificStreamInfo = &macInfo;\n#else\n    outputParameters.hostApiSpecificStreamInfo = NULL;\n#endif\n\n    err = Pa_OpenStream(\n              &stream,\n              NULL, /* no input */\n              &outputParameters,\n              SAMPLE_RATE,\n              FRAMES_PER_BUFFER,\n              paClipOff,      /* we won't output out of range samples so don't bother clipping them */\n              patestCallback,\n              &data );\n    if( err != paNoError ) goto error;\n\n    err = Pa_StartStream( stream );\n    if( err != paNoError ) goto error;\n\n    printf(\"Play for %d seconds.\\n\", NUM_SECONDS );\n    Pa_Sleep( NUM_SECONDS * 1000 );\n\n    err = Pa_StopStream( stream );\n    if( err != paNoError ) goto error;\n\n    err = Pa_CloseStream( stream );\n    if( err != paNoError ) goto error;\n\n    Pa_Terminate();\n    printf(\"Test finished.\\n\");\n\n    return err;\nerror:\n    Pa_Terminate();\n    fprintf( stderr, \"An error occurred while using the portaudio stream\\n\" );\n    fprintf( stderr, \"Error number: %d\\n\", err );\n    fprintf( stderr, \"Error message: %s\\n\", Pa_GetErrorText( err ) );\n    return err;\n}\n"
  },
  {
    "path": "thirdparty/portaudio/test/patest_sine_formats.c",
    "content": "/** @file patest_sine_formats.c\n    @ingroup test_src\n    @brief Play a sine wave for several seconds. Test various data formats.\n    @author Phil Burk\n*/\n/*\n * $Id$\n *\n * This program uses the PortAudio Portable Audio Library.\n * For more information see: http://www.portaudio.com\n * Copyright (c) 1999-2000 Ross Bencina and Phil Burk\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n#include <stdio.h>\n#include <math.h>\n#include \"portaudio.h\"\n\n#define NUM_SECONDS        (10)\n#define SAMPLE_RATE        (44100)\n#define FRAMES_PER_BUFFER  (512)\n#define LEFT_FREQ          (SAMPLE_RATE/256.0)  /* So we hit 1.0 */\n#define RIGHT_FREQ         (500.0)\n#define AMPLITUDE          (1.0)\n\n/* Select ONE format for testing. */\n#define TEST_UINT8    (0)\n#define TEST_INT8     (0)\n#define TEST_INT16    (1)\n#define TEST_FLOAT32  (0)\n\n#if TEST_UINT8\n#define TEST_FORMAT         paUInt8\ntypedef unsigned char       SAMPLE_t;\n#define SAMPLE_ZERO         (0x80)\n#define DOUBLE_TO_SAMPLE(x) (SAMPLE_ZERO + (SAMPLE_t)(127.0 * (x)))\n#define FORMAT_NAME         \"Unsigned 8 Bit\"\n\n#elif TEST_INT8\n#define TEST_FORMAT         paInt8\ntypedef char                SAMPLE_t;\n#define SAMPLE_ZERO         (0)\n#define DOUBLE_TO_SAMPLE(x) (SAMPLE_ZERO + (SAMPLE_t)(127.0 * (x)))\n#define FORMAT_NAME         \"Signed 8 Bit\"\n\n#elif TEST_INT16\n#define TEST_FORMAT         paInt16\ntypedef short               SAMPLE_t;\n#define SAMPLE_ZERO         (0)\n#define DOUBLE_TO_SAMPLE(x) (SAMPLE_ZERO + (SAMPLE_t)(32767 * (x)))\n#define FORMAT_NAME         \"Signed 16 Bit\"\n\n#elif TEST_FLOAT32\n#define TEST_FORMAT         paFloat32\ntypedef float               SAMPLE_t;\n#define SAMPLE_ZERO         (0.0)\n#define DOUBLE_TO_SAMPLE(x) ((SAMPLE_t)(x))\n#define FORMAT_NAME         \"Float 32 Bit\"\n#endif\n\n#ifndef M_PI\n#define M_PI  (3.14159265)\n#endif\n\n\ntypedef struct\n{\n    double left_phase;\n    double right_phase;\n    unsigned int framesToGo;\n}\npaTestData;\n/* This routine will be called by the PortAudio engine when audio is needed.\n** It may called at interrupt level on some machines so don't do anything\n** that could mess up the system like calling malloc() or free().\n*/\nstatic int patestCallback( const void *inputBuffer,\n                           void *outputBuffer,\n                           unsigned long framesPerBuffer,\n                           const PaStreamCallbackTimeInfo* timeInfo,\n                           PaStreamCallbackFlags statusFlags,\n                           void *userData )\n{\n    paTestData *data = (paTestData*)userData;\n    SAMPLE_t *out = (SAMPLE_t *)outputBuffer;\n    int i;\n    int framesToCalc;\n    int finished = 0;\n    (void) inputBuffer; /* Prevent unused variable warnings. */\n\n    if( data->framesToGo < framesPerBuffer )\n    {\n        framesToCalc = data->framesToGo;\n        data->framesToGo = 0;\n        finished = 1;\n    }\n    else\n    {\n        framesToCalc = framesPerBuffer;\n        data->framesToGo -= framesPerBuffer;\n    }\n\n    for( i=0; i<framesToCalc; i++ )\n    {\n        data->left_phase += (LEFT_FREQ / SAMPLE_RATE);\n        if( data->left_phase > 1.0) data->left_phase -= 1.0;\n        *out++ = DOUBLE_TO_SAMPLE( AMPLITUDE * sin( (data->left_phase * M_PI * 2. )));\n\n        data->right_phase += (RIGHT_FREQ / SAMPLE_RATE);\n        if( data->right_phase > 1.0) data->right_phase -= 1.0;\n        *out++ = DOUBLE_TO_SAMPLE( AMPLITUDE * sin( (data->right_phase * M_PI * 2. )));\n    }\n    /* zero remainder of final buffer */\n    for( ; i<(int)framesPerBuffer; i++ )\n    {\n        *out++ = SAMPLE_ZERO; /* left */\n        *out++ = SAMPLE_ZERO; /* right */\n    }\n    return finished;\n}\n/*******************************************************************/\nint main(void);\nint main(void)\n{\n    PaStream *stream;\n    PaStreamParameters outputParameters;\n    PaError err;\n    paTestData data;\n    int totalSamps;\n\n    printf(\"PortAudio Test: output \" FORMAT_NAME \"\\n\");\n\n    data.left_phase = data.right_phase = 0.0;\n    data.framesToGo = totalSamps =  NUM_SECONDS * SAMPLE_RATE; /* Play for a few seconds. */\n    err = Pa_Initialize();\n    if( err != paNoError ) goto error;\n\n\n    outputParameters.device           = Pa_GetDefaultOutputDevice(); /* Default output device. */\n    outputParameters.channelCount     = 2;                           /* Stereo output */\n    outputParameters.sampleFormat     = TEST_FORMAT;                 /* Selected above. */\n    outputParameters.suggestedLatency = Pa_GetDeviceInfo(outputParameters.device)->defaultLowOutputLatency;\n    outputParameters.hostApiSpecificStreamInfo = NULL;\n    err = Pa_OpenStream( &stream,\n                         NULL,                  /* No input. */\n                         &outputParameters,     /* As above. */\n                         SAMPLE_RATE,\n                         FRAMES_PER_BUFFER,\n                         paClipOff,      /* we won't output out of range samples so don't bother clipping them */\n                         patestCallback,\n                         &data );\n    if( err != paNoError ) goto error;\n\n    err = Pa_StartStream( stream );\n    if( err != paNoError ) goto error;\n\n    printf(\"Waiting %d seconds for sound to finish.\\n\", NUM_SECONDS );\n\n    while( ( err = Pa_IsStreamActive( stream ) ) == 1 ) Pa_Sleep(100);\n    if( err < 0 ) goto error;\n\n    err = Pa_CloseStream( stream );\n    if( err != paNoError ) goto error;\n    Pa_Terminate();\n\n    printf(\"PortAudio Test Finished: \" FORMAT_NAME \"\\n\");\n\n    return err;\nerror:\n    Pa_Terminate();\n    fprintf( stderr, \"An error occurred while using the portaudio stream\\n\" );\n    fprintf( stderr, \"Error number: %d\\n\", err );\n    fprintf( stderr, \"Error message: %s\\n\", Pa_GetErrorText( err ) );\n    return err;\n}\n"
  },
  {
    "path": "thirdparty/portaudio/test/patest_sine_srate.c",
    "content": "/*\n * $Id: patest_sine.c 1097 2006-08-26 08:27:53Z rossb $\n *\n * This program uses the PortAudio Portable Audio Library.\n * For more information see: http://www.portaudio.com/\n * Copyright (c) 1999-2000 Ross Bencina and Phil Burk\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n/** @file patest_sine_srate_mac.c\n    @ingroup test_src\n    @brief Plays sine waves at 44100 and 48000,\n          and forces the hardware to change if this is a mac.\n          Designed for use with CoreAudio.\n    @author Bjorn Roche <bjorn@xowave.com>\n   @author Ross Bencina <rossb@audiomulch.com>\n   @author Phil Burk <philburk@softsynth.com>\n*/\n\n#include <stdio.h>\n#include <math.h>\n#include \"portaudio.h\"\n\n#ifdef __APPLE__\n#include \"pa_mac_core.h\"\n#endif\n\n#define NUM_SECONDS   (5)\n#define SAMPLE_RATE1   (44100)\n#define SAMPLE_RATE2   (48000)\n#define FRAMES_PER_BUFFER  (64)\n\n#ifndef M_PI\n#define M_PI  (3.14159265)\n#endif\n\n#define TABLE_SIZE   (200)\ntypedef struct\n{\n    float sine[TABLE_SIZE];\n    int left_phase;\n    int right_phase;\n}\npaTestData;\n\n/* This routine will be called by the PortAudio engine when audio is needed.\n** It may called at interrupt level on some machines so don't do anything\n** that could mess up the system like calling malloc() or free().\n*/\nstatic int patestCallback( const void *inputBuffer, void *outputBuffer,\n                            unsigned long framesPerBuffer,\n                            const PaStreamCallbackTimeInfo* timeInfo,\n                            PaStreamCallbackFlags statusFlags,\n                            void *userData )\n{\n    paTestData *data = (paTestData*)userData;\n    float *out = (float*)outputBuffer;\n    unsigned long i;\n\n    (void) timeInfo; /* Prevent unused variable warnings. */\n    (void) statusFlags;\n    (void) inputBuffer;\n\n    for( i=0; i<framesPerBuffer; i++ )\n    {\n        *out++ = data->sine[data->left_phase];  /* left */\n        *out++ = data->sine[data->right_phase];  /* right */\n        data->left_phase += 1;\n        if( data->left_phase >= TABLE_SIZE ) data->left_phase -= TABLE_SIZE;\n        data->right_phase += 3; /* higher pitch so we can distinguish left and right. */\n        if( data->right_phase >= TABLE_SIZE ) data->right_phase -= TABLE_SIZE;\n    }\n\n    return paContinue;\n}\n\n/*******************************************************************/\nint main(void);\nint main(void)\n{\n    PaStreamParameters outputParameters;\n    PaStream *stream;\n    PaError err;\n    paTestData data;\n#ifdef __APPLE__\n    PaMacCoreStreamInfo macInfo;\n#endif\n    int i;\n\n    /* initialise sinusoidal wavetable */\n    for( i=0; i<TABLE_SIZE; i++ )\n    {\n        data.sine[i] = (float) sin( ((double)i/(double)TABLE_SIZE) * M_PI * 2. );\n    }\n    data.left_phase = data.right_phase = 0;\n\n    err = Pa_Initialize();\n    if( err != paNoError ) goto error;\n\n    for( i=0; i<2; ++i ) {\n        const float sr = i ? SAMPLE_RATE2 : SAMPLE_RATE1;\n        printf(\"PortAudio Test: output sine wave. SR = %g, BufSize = %d\\n\", sr, FRAMES_PER_BUFFER);\n        outputParameters.device = Pa_GetDefaultOutputDevice(); /* default output device */\n        if (outputParameters.device == paNoDevice) {\n            fprintf(stderr,\"Error: No default output device.\\n\");\n            goto error;\n        }\n        outputParameters.channelCount = 2;       /* stereo output */\n        outputParameters.sampleFormat = paFloat32; /* 32 bit floating point output */\n        outputParameters.suggestedLatency = Pa_GetDeviceInfo( outputParameters.device )->defaultLowOutputLatency;\n        /** setup host specific info */\n#ifdef __APPLE__\n        PaMacCore_SetupStreamInfo( &macInfo, paMacCorePro );\n        outputParameters.hostApiSpecificStreamInfo = &macInfo;\n#else\n        printf( \"Hardware SR changing not being tested on this platform.\\n\" );\n        outputParameters.hostApiSpecificStreamInfo = NULL;\n#endif\n        err = Pa_OpenStream(\n                &stream,\n                NULL, /* no input */\n                &outputParameters,\n                sr,\n                FRAMES_PER_BUFFER,\n                paClipOff,      /* we won't output out of range samples so don't bother clipping them */\n                patestCallback,\n                &data );\n        if( err != paNoError ) goto error;\n\n        err = Pa_StartStream( stream );\n        if( err != paNoError ) goto error;\n\n        printf(\"Play for %d seconds.\\n\", NUM_SECONDS );\n        Pa_Sleep( NUM_SECONDS * 1000 );\n\n        err = Pa_StopStream( stream );\n        if( err != paNoError ) goto error;\n\n        err = Pa_CloseStream( stream );\n        if( err != paNoError ) goto error;\n    }\n\n    Pa_Terminate();\n    printf(\"Test finished.\\n\");\n\n    return err;\nerror:\n    Pa_Terminate();\n    fprintf( stderr, \"An error occurred while using the portaudio stream\\n\" );\n    fprintf( stderr, \"Error number: %d\\n\", err );\n    fprintf( stderr, \"Error message: %s\\n\", Pa_GetErrorText( err ) );\n    return err;\n}\n"
  },
  {
    "path": "thirdparty/portaudio/test/patest_sine_time.c",
    "content": "/** @file patest_sine_time.c\n    @ingroup test_src\n    @brief Play a sine wave for several seconds, pausing in the middle.\n    Uses the Pa_GetStreamTime() call.\n    @author Ross Bencina <rossb@audiomulch.com>\n    @author Phil Burk <philburk@softsynth.com>\n*/\n/*\n * $Id$\n *\n * This program uses the PortAudio Portable Audio Library.\n * For more information see: http://www.portaudio.com\n * Copyright (c) 1999-2000 Ross Bencina and Phil Burk\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n#include <stdio.h>\n#include <math.h>\n\n#include \"portaudio.h\"\n#include \"pa_util.h\"\n\n#define NUM_SECONDS   (8)\n#define SAMPLE_RATE   (44100)\n#define FRAMES_PER_BUFFER  (64)\n\n#ifndef M_PI\n#define M_PI  (3.14159265)\n#endif\n#define TWOPI (M_PI * 2.0)\n\n#define TABLE_SIZE   (200)\n\ntypedef struct\n{\n    double           left_phase;\n    double           right_phase;\n    volatile PaTime  outTime;\n}\npaTestData;\n\n/* This routine will be called by the PortAudio engine when audio is needed.\n** It may called at interrupt level on some machines so don't do anything\n** that could mess up the system like calling malloc() or free().\n*/\nstatic int patestCallback( const void *inputBuffer, void *outputBuffer,\n                            unsigned long framesPerBuffer,\n                            const PaStreamCallbackTimeInfo* timeInfo,\n                            PaStreamCallbackFlags statusFlags,\n                            void *userData )\n{\n    paTestData *data = (paTestData*)userData;\n    float *out = (float*)outputBuffer;\n    unsigned int i;\n\n    double left_phaseInc = 0.02;\n    double right_phaseInc = 0.06;\n\n    double left_phase = data->left_phase;\n    double right_phase = data->right_phase;\n\n    (void) statusFlags; /* Prevent unused variable warnings. */\n    (void) inputBuffer;\n\n    data->outTime = timeInfo->outputBufferDacTime;\n\n    for( i=0; i<framesPerBuffer; i++ )\n    {\n        left_phase += left_phaseInc;\n        if( left_phase > TWOPI ) left_phase -= TWOPI;\n        *out++ = (float) sin( left_phase );\n\n        right_phase += right_phaseInc;\n        if( right_phase > TWOPI ) right_phase -= TWOPI;\n        *out++ = (float) sin( right_phase );\n    }\n\n    data->left_phase = left_phase;\n    data->right_phase = right_phase;\n\n    return paContinue;\n}\n\n/*******************************************************************/\nstatic void ReportStreamTime( PaStream *stream, paTestData *data );\nstatic void ReportStreamTime( PaStream *stream, paTestData *data )\n{\n    PaTime  streamTime, latency, outTime;\n\n    streamTime = Pa_GetStreamTime( stream );\n    outTime = data->outTime;\n    if( outTime < 0.0 )\n    {\n        printf(\"Stream time = %8.1f\\n\", streamTime );\n    }\n    else\n    {\n        latency = outTime - streamTime;\n        printf(\"Stream time = %8.4f, outTime = %8.4f, latency = %8.4f\\n\",\n            streamTime, outTime, latency );\n    }\n    fflush(stdout);\n}\n\n/*******************************************************************/\nint main(void);\nint main(void)\n{\n    PaStreamParameters outputParameters;\n    PaStream *stream;\n    PaError err;\n    paTestData data;\n    PaTime startTime;\n\n    printf(\"PortAudio Test: output sine wave. SR = %d, BufSize = %d\\n\", SAMPLE_RATE, FRAMES_PER_BUFFER);\n\n    data.left_phase = data.right_phase = 0;\n\n    err = Pa_Initialize();\n    if( err != paNoError ) goto error;\n\n    outputParameters.device = Pa_GetDefaultOutputDevice(); /* default output device */\n    if (outputParameters.device == paNoDevice) {\n        fprintf(stderr,\"Error: No default output device.\\n\");\n        goto error;\n    }\n    outputParameters.channelCount = 2;       /* stereo output */\n    outputParameters.sampleFormat = paFloat32; /* 32 bit floating point output */\n    outputParameters.suggestedLatency = Pa_GetDeviceInfo( outputParameters.device )->defaultLowOutputLatency;\n    outputParameters.hostApiSpecificStreamInfo = NULL;\n\n    err = Pa_OpenStream(\n              &stream,\n              NULL, /* no input */\n              &outputParameters,\n              SAMPLE_RATE,\n              FRAMES_PER_BUFFER,\n              paClipOff,      /* we won't output out of range samples so don't bother clipping them */\n              patestCallback,\n              &data );\n    if( err != paNoError ) goto error;\n\n    /* Watch until sound is halfway finished. */\n    printf(\"Play for %d seconds.\\n\", NUM_SECONDS/2 ); fflush(stdout);\n\n    data.outTime = -1.0; /* mark time for callback as undefined */\n    err = Pa_StartStream( stream );\n    if( err != paNoError ) goto error;\n\n    startTime = Pa_GetStreamTime( stream );\n\n    do\n    {\n        ReportStreamTime( stream, &data );\n        Pa_Sleep(100);\n    } while( (Pa_GetStreamTime( stream ) - startTime) < (NUM_SECONDS/2) );\n\n    /* Stop sound for 2 seconds. */\n    err = Pa_StopStream( stream );\n    if( err != paNoError ) goto error;\n\n    printf(\"Pause for 2 seconds.\\n\"); fflush(stdout);\n    Pa_Sleep( 2000 );\n\n    data.outTime = -1.0; /* mark time for callback as undefined */\n    err = Pa_StartStream( stream );\n    if( err != paNoError ) goto error;\n\n    startTime = Pa_GetStreamTime( stream );\n\n    printf(\"Play until sound is finished.\\n\"); fflush(stdout);\n    do\n    {\n        ReportStreamTime( stream, &data );\n        Pa_Sleep(100);\n    } while( (Pa_GetStreamTime( stream ) - startTime) < (NUM_SECONDS/2) );\n\n    err = Pa_CloseStream( stream );\n    if( err != paNoError ) goto error;\n\n    Pa_Terminate();\n    printf(\"Test finished.\\n\");\n    return err;\n\nerror:\n    Pa_Terminate();\n    fprintf( stderr, \"An error occurred while using the portaudio stream\\n\" );\n    fprintf( stderr, \"Error number: %d\\n\", err );\n    fprintf( stderr, \"Error message: %s\\n\", Pa_GetErrorText( err ) );\n    return err;\n}\n"
  },
  {
    "path": "thirdparty/portaudio/test/patest_start_stop.c",
    "content": "/** @file patest_start_stop.c\n    @ingroup test_src\n    @brief Play a sine wave for several seconds. Start and stop the stream multiple times.\n\n    @author Ross Bencina <rossb@audiomulch.com>\n    @author Phil Burk <philburk@softsynth.com>\n*/\n/*\n * $Id$\n *\n * This program uses the PortAudio Portable Audio Library.\n * For more information see: http://www.portaudio.com/\n * Copyright (c) 1999-2000 Ross Bencina and Phil Burk\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n#include <stdio.h>\n#include <math.h>\n#include \"portaudio.h\"\n\n#define OUTPUT_DEVICE Pa_GetDefaultOutputDevice()   /* default output device */\n\n#define NUM_SECONDS   (3)\n#define NUM_LOOPS     (4)\n#define SAMPLE_RATE   (44100)\n#define FRAMES_PER_BUFFER  (400)\n\n#ifndef M_PI\n#define M_PI  (3.14159265)\n#endif\n\n#define TABLE_SIZE   (200)\ntypedef struct\n{\n    float sine[TABLE_SIZE];\n    int left_phase;\n    int right_phase;\n}\npaTestData;\n\n/* This routine will be called by the PortAudio engine when audio is needed.\n** It may called at interrupt level on some machines so don't do anything\n** that could mess up the system like calling malloc() or free().\n*/\nstatic int patestCallback( const void *inputBuffer, void *outputBuffer,\n                            unsigned long framesPerBuffer,\n                            const PaStreamCallbackTimeInfo* timeInfo,\n                            PaStreamCallbackFlags statusFlags,\n                            void *userData )\n{\n    paTestData *data = (paTestData*)userData;\n    float *out = (float*)outputBuffer;\n    unsigned long i;\n\n    (void) timeInfo; /* Prevent unused variable warnings. */\n    (void) statusFlags;\n    (void) inputBuffer;\n\n    for( i=0; i<framesPerBuffer; i++ )\n    {\n        *out++ = data->sine[data->left_phase];  /* left */\n        *out++ = data->sine[data->right_phase];  /* right */\n        data->left_phase += 1;\n        if( data->left_phase >= TABLE_SIZE ) data->left_phase -= TABLE_SIZE;\n        data->right_phase += 3; /* higher pitch so we can distinguish left and right. */\n        if( data->right_phase >= TABLE_SIZE ) data->right_phase -= TABLE_SIZE;\n    }\n\n    return paContinue;\n}\n\n/*******************************************************************/\nint main(void);\nint main(void)\n{\n    PaStreamParameters outputParameters;\n    PaStream *stream;\n    PaError err;\n    paTestData data;\n    int i;\n\n\n    printf(\"PortAudio Test: output sine wave. SR = %d, BufSize = %d\\n\", SAMPLE_RATE, FRAMES_PER_BUFFER);\n\n    /* initialise sinusoidal wavetable */\n    for( i=0; i<TABLE_SIZE; i++ )\n    {\n        data.sine[i] = (float) sin( ((double)i/(double)TABLE_SIZE) * M_PI * 2. );\n    }\n    data.left_phase = data.right_phase = 0;\n\n    err = Pa_Initialize();\n    if( err != paNoError ) goto error;\n\n    outputParameters.device = OUTPUT_DEVICE;\n    if (outputParameters.device == paNoDevice) {\n        fprintf(stderr,\"Error: No default output device.\\n\");\n        goto error;\n    }\n    outputParameters.channelCount = 2;       /* stereo output */\n    outputParameters.sampleFormat = paFloat32; /* 32 bit floating point output */\n    outputParameters.suggestedLatency = Pa_GetDeviceInfo( outputParameters.device )->defaultLowOutputLatency;\n    outputParameters.hostApiSpecificStreamInfo = NULL;\n\n    err = Pa_OpenStream(\n              &stream,\n              NULL, /* no input */\n              &outputParameters,\n              SAMPLE_RATE,\n              FRAMES_PER_BUFFER,\n              paClipOff,      /* we won't output out of range samples so don't bother clipping them */\n              patestCallback,\n              &data );\n    if( err != paNoError ) goto error;\n\n    for( i=0; i<NUM_LOOPS; i++ )\n    {\n        data.left_phase = data.right_phase = 0;\n\n        err = Pa_StartStream( stream );\n        if( err != paNoError ) goto error;\n\n        printf(\"Play for %d seconds.\\n\", NUM_SECONDS );\n        Pa_Sleep( NUM_SECONDS * 1000 );\n\n        err = Pa_StopStream( stream );\n        if( err != paNoError ) goto error;\n\n        printf(\"Stopped.\\n\" );\n        Pa_Sleep( 1000 );\n    }\n\n    err = Pa_CloseStream( stream );\n    if( err != paNoError ) goto error;\n\n    Pa_Terminate();\n    printf(\"Test finished.\\n\");\n\n    return err;\nerror:\n    Pa_Terminate();\n    fprintf( stderr, \"An error occurred while using the portaudio stream\\n\" );\n    fprintf( stderr, \"Error number: %d\\n\", err );\n    fprintf( stderr, \"Error message: %s\\n\", Pa_GetErrorText( err ) );\n    return err;\n}\n"
  },
  {
    "path": "thirdparty/portaudio/test/patest_stop.c",
    "content": "/** @file patest_stop.c\n    @ingroup test_src\n    @brief Test different ways of stopping audio.\n\n    Test the three ways of stopping audio:\n        - calling Pa_StopStream(),\n        - calling Pa_AbortStream(),\n        - and returning a 1 from the callback function.\n\n    A long latency is set up so that you can hear the difference.\n    Then a simple 8 note sequence is repeated twice.\n    The program will print what you should hear.\n\n    @author Phil Burk <philburk@softsynth.com>\n*/\n/*\n * $Id$\n *\n * This program uses the PortAudio Portable Audio Library.\n * For more information see: http://www.portaudio.com\n * Copyright (c) 1999-2000 Ross Bencina and Phil Burk\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n#include <stdio.h>\n#include <math.h>\n#include \"portaudio.h\"\n\n#define OUTPUT_DEVICE       (Pa_GetDefaultOutputDevice())\n#define SLEEP_DUR           (200)\n#define SAMPLE_RATE         (44100)\n#define FRAMES_PER_BUFFER   (256)\n#define LATENCY_SECONDS     (3.f)\n#define FRAMES_PER_NOTE     (SAMPLE_RATE/2)\n#define MAX_REPEATS         (2)\n#define FUNDAMENTAL         (400.0f / SAMPLE_RATE)\n#define NOTE_0              (FUNDAMENTAL * 1.0f / 1.0f)\n#define NOTE_1              (FUNDAMENTAL * 5.0f / 4.0f)\n#define NOTE_2              (FUNDAMENTAL * 4.0f / 3.0f)\n#define NOTE_3              (FUNDAMENTAL * 3.0f / 2.0f)\n#define NOTE_4              (FUNDAMENTAL * 2.0f / 1.0f)\n#define MODE_FINISH    (0)\n#define MODE_STOP      (1)\n#define MODE_ABORT     (2)\n#ifndef M_PI\n#define M_PI  (3.14159265)\n#endif\n#define TABLE_SIZE   (400)\n\ntypedef struct\n{\n    float  waveform[TABLE_SIZE + 1]; /* Add one for guard point for interpolation. */\n    float  phase_increment;\n    float  phase;\n    float *tune;\n    int    notesPerTune;\n    int    frameCounter;\n    int    noteCounter;\n    int    repeatCounter;\n    PaTime outTime;\n    int    stopMode;\n    int    done;\n}\npaTestData;\n\n/************* Prototypes *****************************/\nint TestStopMode( paTestData *data );\nfloat LookupWaveform( paTestData *data, float phase );\n\n/******************************************************\n * Convert phase between 0.0 and 1.0 to waveform value\n * using linear interpolation.\n */\nfloat LookupWaveform( paTestData *data, float phase )\n{\n    float fIndex = phase*TABLE_SIZE;\n    int   index = (int) fIndex;\n    float fract = fIndex - index;\n    float lo = data->waveform[index];\n    float hi = data->waveform[index+1];\n    float val = lo + fract*(hi-lo);\n    return val;\n}\n\n/* This routine will be called by the PortAudio engine when audio is needed.\n** It may called at interrupt level on some machines so don't do anything\n** that could mess up the system like calling malloc() or free().\n*/\nstatic int patestCallback( const void *inputBuffer, void *outputBuffer,\n                            unsigned long framesPerBuffer,\n                            const PaStreamCallbackTimeInfo* timeInfo,\n                            PaStreamCallbackFlags statusFlags,\n                            void *userData )\n{\n    paTestData *data = (paTestData*)userData;\n    float *out = (float*)outputBuffer;\n    float value;\n    unsigned int i = 0;\n    int finished = paContinue;\n\n    (void) inputBuffer;     /* Prevent unused variable warnings. */\n    (void) timeInfo;\n    (void) statusFlags;\n\n\n    /* data->outTime = outTime; */\n\n    if( !data->done )\n    {\n        for( i=0; i<framesPerBuffer; i++ )\n        {\n            /* Are we done with this note? */\n            if( data->frameCounter >= FRAMES_PER_NOTE )\n            {\n                data->noteCounter += 1;\n                data->frameCounter = 0;\n                /* Are we done with this tune? */\n                if( data->noteCounter >= data->notesPerTune )\n                {\n                    data->noteCounter = 0;\n                    data->repeatCounter += 1;\n                    /* Are we totally done? */\n                    if( data->repeatCounter >= MAX_REPEATS )\n                    {\n                        data->done = 1;\n                        if( data->stopMode == MODE_FINISH )\n                        {\n                            finished = paComplete;\n                            break;\n                        }\n                    }\n                }\n                data->phase_increment = data->tune[data->noteCounter];\n            }\n            value = LookupWaveform(data, data->phase);\n            *out++ = value;  /* left */\n            *out++ = value;  /* right */\n            data->phase += data->phase_increment;\n            if( data->phase >= 1.0f ) data->phase -= 1.0f;\n\n            data->frameCounter += 1;\n        }\n    }\n    /* zero remainder of final buffer */\n    for( ; i<framesPerBuffer; i++ )\n    {\n        *out++ = 0; /* left */\n        *out++ = 0; /* right */\n    }\n    return finished;\n}\n/*******************************************************************/\nint main(void);\nint main(void)\n{\n    paTestData data;\n    int i;\n    float simpleTune[] = { NOTE_0, NOTE_1, NOTE_2, NOTE_3, NOTE_4, NOTE_3, NOTE_2, NOTE_1 };\n\n    printf(\"PortAudio Test: play song and test stopping. ask for %f seconds latency\\n\", LATENCY_SECONDS );\n    /* initialise sinusoidal wavetable */\n    for( i=0; i<TABLE_SIZE; i++ )\n    {\n        data.waveform[i] = (float) (\n                               (0.2 * sin( ((double)i/(double)TABLE_SIZE) * M_PI * 2. )) +\n                               (0.2 * sin( ((double)(3*i)/(double)TABLE_SIZE) * M_PI * 2. )) +\n                               (0.1 * sin( ((double)(5*i)/(double)TABLE_SIZE) * M_PI * 2. ))\n                           );\n    }\n    data.waveform[TABLE_SIZE] = data.waveform[0]; /* Set guard point. */\n    data.tune = &simpleTune[0];\n    data.notesPerTune = sizeof(simpleTune) / sizeof(float);\n\n    printf(\"Test MODE_FINISH - callback returns 1.\\n\");\n    printf(\"Should hear entire %d note tune repeated twice.\\n\", data.notesPerTune);\n    data.stopMode = MODE_FINISH;\n    if( TestStopMode( &data ) != paNoError )\n    {\n        printf(\"Test of MODE_FINISH failed!\\n\");\n        goto error;\n    }\n\n    printf(\"Test MODE_STOP - stop when song is done.\\n\");\n    printf(\"Should hear entire %d note tune repeated twice.\\n\", data.notesPerTune);\n    data.stopMode = MODE_STOP;\n    if( TestStopMode( &data ) != paNoError )\n    {\n        printf(\"Test of MODE_STOP failed!\\n\");\n        goto error;\n    }\n\n    printf(\"Test MODE_ABORT - abort immediately.\\n\");\n    printf(\"Should hear last repetition cut short by %f seconds.\\n\", LATENCY_SECONDS);\n    data.stopMode = MODE_ABORT;\n    if( TestStopMode( &data ) != paNoError )\n    {\n        printf(\"Test of MODE_ABORT failed!\\n\");\n        goto error;\n    }\n\n    return 0;\n\nerror:\n    return 1;\n}\n\nint TestStopMode( paTestData *data )\n{\n    PaStreamParameters outputParameters;\n    PaStream *stream;\n    PaError err;\n\n    data->done = 0;\n    data->phase = 0.0;\n    data->frameCounter = 0;\n    data->noteCounter = 0;\n    data->repeatCounter = 0;\n    data->phase_increment = data->tune[data->noteCounter];\n\n    err = Pa_Initialize();\n    if( err != paNoError ) goto error;\n\n    outputParameters.device = OUTPUT_DEVICE;\n    if (outputParameters.device == paNoDevice) {\n        fprintf(stderr,\"Error: No default output device.\\n\");\n        goto error;\n    }\n    outputParameters.channelCount = 2;          /* stereo output */\n    outputParameters.sampleFormat = paFloat32;  /* 32 bit floating point output */\n    outputParameters.suggestedLatency = LATENCY_SECONDS;\n    outputParameters.hostApiSpecificStreamInfo = NULL;\n\n    err = Pa_OpenStream(\n              &stream,\n              NULL, /* no input */\n              &outputParameters,\n              SAMPLE_RATE,\n              FRAMES_PER_BUFFER,            /* frames per buffer */\n              paClipOff,      /* we won't output out of range samples so don't bother clipping them */\n              patestCallback,\n              data );\n    if( err != paNoError ) goto error;\n\n    err = Pa_StartStream( stream );\n    if( err != paNoError ) goto error;\n\n    if( data->stopMode == MODE_FINISH )\n    {\n        while( ( err = Pa_IsStreamActive( stream ) ) == 1 )\n        {\n            /*printf(\"outTime = %g, note# = %d, repeat# = %d\\n\", data->outTime,\n             data->noteCounter, data->repeatCounter  );\n            fflush(stdout); */\n            Pa_Sleep( SLEEP_DUR );\n        }\n        if( err < 0 ) goto error;\n    }\n    else\n    {\n        while( data->repeatCounter < MAX_REPEATS )\n        {\n            /*printf(\"outTime = %g, note# = %d, repeat# = %d\\n\", data->outTime,\n             data->noteCounter, data->repeatCounter  );\n            fflush(stdout); */\n            Pa_Sleep( SLEEP_DUR );\n        }\n    }\n\n    if( data->stopMode == MODE_ABORT )\n    {\n        printf(\"Call Pa_AbortStream()\\n\");\n        err = Pa_AbortStream( stream );\n    }\n    else\n    {\n        printf(\"Call Pa_StopStream()\\n\");\n        err = Pa_StopStream( stream );\n    }\n    if( err != paNoError ) goto error;\n\n    printf(\"Call Pa_CloseStream()\\n\"); fflush(stdout);\n    err = Pa_CloseStream( stream );\n    if( err != paNoError ) goto error;\n\n    Pa_Terminate();\n    printf(\"Test finished.\\n\");\n\n    return err;\n\nerror:\n    Pa_Terminate();\n    fprintf( stderr, \"An error occurred while using the portaudio stream\\n\" );\n    fprintf( stderr, \"Error number: %d\\n\", err );\n    fprintf( stderr, \"Error message: %s\\n\", Pa_GetErrorText( err ) );\n    return err;\n}\n"
  },
  {
    "path": "thirdparty/portaudio/test/patest_stop_playout.c",
    "content": "/** @file patest_stop_playout.c\n    @ingroup test_src\n    @brief Test whether all queued samples are played when Pa_StopStream()\n            is used with a callback or read/write stream, or when the callback\n            returns paComplete.\n    @author Ross Bencina <rossb@audiomulch.com>\n*/\n/*\n * $Id$\n *\n * This program uses the PortAudio Portable Audio Library.\n * For more information see: http://www.portaudio.com/\n * Copyright (c) 1999-2004 Ross Bencina and Phil Burk\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n#include <stdio.h>\n#include <math.h>\n#include \"portaudio.h\"\n\n#define SAMPLE_RATE         (44100)\n#define FRAMES_PER_BUFFER   (1024)\n\n#define TONE_SECONDS        (1)      /* long tone */\n#define TONE_FADE_SECONDS   (.04)    /* fades at start and end of long tone */\n#define GAP_SECONDS         (.25)     /* gap between long tone and blip */\n#define BLIP_SECONDS        (.035)   /* short blip */\n\n#define NUM_REPEATS         (3)\n\n#ifndef M_PI\n#define M_PI (3.14159265)\n#endif\n\n#define TABLE_SIZE          (2048)\ntypedef struct\n{\n    float sine[TABLE_SIZE+1];\n\n    int repeatCount;\n\n    double phase;\n    double lowIncrement, highIncrement;\n\n    int gap1Length, toneLength, toneFadesLength, gap2Length, blipLength;\n    int gap1Countdown, toneCountdown, gap2Countdown, blipCountdown;\n}\nTestData;\n\n\nstatic void RetriggerTestSignalGenerator( TestData *data )\n{\n    data->phase = 0.;\n    data->gap1Countdown = data->gap1Length;\n    data->toneCountdown = data->toneLength;\n    data->gap2Countdown = data->gap2Length;\n    data->blipCountdown = data->blipLength;\n}\n\n\nstatic void ResetTestSignalGenerator( TestData *data )\n{\n    data->repeatCount = 0;\n    RetriggerTestSignalGenerator( data );\n}\n\n\nstatic void InitTestSignalGenerator( TestData *data )\n{\n    int signalLengthModBufferLength, i;\n\n    /* initialise sinusoidal wavetable */\n    for( i=0; i<TABLE_SIZE; i++ )\n    {\n        data->sine[i] = (float) sin( ((double)i/(double)TABLE_SIZE) * M_PI * 2. );\n    }\n    data->sine[TABLE_SIZE] = data->sine[0]; /* guard point for linear interpolation */\n\n\n\n    data->lowIncrement = (330. / SAMPLE_RATE) * TABLE_SIZE;\n    data->highIncrement = (1760. / SAMPLE_RATE) * TABLE_SIZE;\n\n    data->gap1Length = GAP_SECONDS * SAMPLE_RATE;\n    data->toneLength = TONE_SECONDS * SAMPLE_RATE;\n    data->toneFadesLength = TONE_FADE_SECONDS * SAMPLE_RATE;\n    data->gap2Length = GAP_SECONDS * SAMPLE_RATE;\n    data->blipLength = BLIP_SECONDS * SAMPLE_RATE;\n\n    /* adjust signal length to be a multiple of the buffer length */\n    signalLengthModBufferLength = (data->gap1Length + data->toneLength + data->gap2Length + data->blipLength) % FRAMES_PER_BUFFER;\n    if( signalLengthModBufferLength > 0 )\n        data->toneLength += signalLengthModBufferLength;\n\n    ResetTestSignalGenerator( data );\n}\n\n\n#define MIN( a, b ) (((a)<(b))?(a):(b))\n\nstatic void GenerateTestSignal( TestData *data, float *stereo, int frameCount )\n{\n    int framesGenerated = 0;\n    float output;\n    long index;\n    float fraction;\n    int count, i;\n\n    while( framesGenerated < frameCount && data->repeatCount < NUM_REPEATS )\n    {\n        if( framesGenerated < frameCount && data->gap1Countdown > 0 ){\n            count = MIN( frameCount - framesGenerated, data->gap1Countdown );\n            for( i=0; i < count; ++i )\n            {\n                *stereo++ = 0.f;\n                *stereo++ = 0.f;\n            }\n\n            data->gap1Countdown -= count;\n            framesGenerated += count;\n        }\n\n        if( framesGenerated < frameCount && data->toneCountdown > 0 ){\n            count = MIN( frameCount - framesGenerated, data->toneCountdown );\n            for( i=0; i < count; ++i )\n            {\n                /* tone with data->lowIncrement phase increment */\n                index = (long)data->phase;\n                fraction = data->phase - index;\n                output = data->sine[ index ] + (data->sine[ index + 1 ] - data->sine[ index ]) * fraction;\n\n                data->phase += data->lowIncrement;\n                while( data->phase >= TABLE_SIZE )\n                    data->phase -= TABLE_SIZE;\n\n                /* apply fade to ends */\n\n                if( data->toneCountdown < data->toneFadesLength )\n                {\n                    /* cosine-bell fade out at end */\n                    output *= (-cos(((float)data->toneCountdown / (float)data->toneFadesLength) * M_PI) + 1.) * .5;\n                }\n                else if( data->toneCountdown > data->toneLength - data->toneFadesLength )\n                {\n                    /* cosine-bell fade in at start */\n                    output *= (cos(((float)(data->toneCountdown - (data->toneLength - data->toneFadesLength)) / (float)data->toneFadesLength) * M_PI) + 1.) * .5;\n                }\n\n                output *= .5; /* play tone half as loud as blip */\n\n                *stereo++ = output;\n                *stereo++ = output;\n\n                data->toneCountdown--;\n            }\n\n            framesGenerated += count;\n        }\n\n        if( framesGenerated < frameCount && data->gap2Countdown > 0 ){\n            count = MIN( frameCount - framesGenerated, data->gap2Countdown );\n            for( i=0; i < count; ++i )\n            {\n                *stereo++ = 0.f;\n                *stereo++ = 0.f;\n            }\n\n            data->gap2Countdown -= count;\n            framesGenerated += count;\n        }\n\n        if( framesGenerated < frameCount && data->blipCountdown > 0 ){\n            count = MIN( frameCount - framesGenerated, data->blipCountdown );\n            for( i=0; i < count; ++i )\n            {\n                /* tone with data->highIncrement phase increment */\n                index = (long)data->phase;\n                fraction = data->phase - index;\n                output = data->sine[ index ] + (data->sine[ index + 1 ] - data->sine[ index ]) * fraction;\n\n                data->phase += data->highIncrement;\n                while( data->phase >= TABLE_SIZE )\n                    data->phase -= TABLE_SIZE;\n\n                /* cosine-bell envelope over whole blip */\n                output *= (-cos( ((float)data->blipCountdown / (float)data->blipLength) * 2. * M_PI) + 1.) * .5;\n\n                *stereo++ = output;\n                *stereo++ = output;\n\n                data->blipCountdown--;\n            }\n\n            framesGenerated += count;\n        }\n\n\n        if( data->blipCountdown == 0 )\n        {\n            RetriggerTestSignalGenerator( data );\n            data->repeatCount++;\n        }\n    }\n\n    if( framesGenerated < frameCount )\n    {\n        count = frameCount - framesGenerated;\n        for( i=0; i < count; ++i )\n        {\n            *stereo++ = 0.f;\n            *stereo++ = 0.f;\n        }\n    }\n}\n\n\nstatic int IsTestSignalFinished( TestData *data )\n{\n    if( data->repeatCount >= NUM_REPEATS )\n        return 1;\n    else\n        return 0;\n}\n\n\nstatic int TestCallback1( const void *inputBuffer, void *outputBuffer,\n                            unsigned long frameCount,\n                            const PaStreamCallbackTimeInfo* timeInfo,\n                            PaStreamCallbackFlags statusFlags,\n                            void *userData )\n{\n    (void) inputBuffer; /* Prevent unused variable warnings. */\n    (void) timeInfo;\n    (void) statusFlags;\n\n    GenerateTestSignal( (TestData*)userData, (float*)outputBuffer, frameCount );\n\n    if( IsTestSignalFinished( (TestData*)userData ) )\n        return paComplete;\n    else\n        return paContinue;\n}\n\n\nvolatile int testCallback2Finished = 0;\n\nstatic int TestCallback2( const void *inputBuffer, void *outputBuffer,\n                            unsigned long frameCount,\n                            const PaStreamCallbackTimeInfo* timeInfo,\n                            PaStreamCallbackFlags statusFlags,\n                            void *userData )\n{\n    (void) inputBuffer; /* Prevent unused variable warnings. */\n    (void) timeInfo;\n    (void) statusFlags;\n\n    GenerateTestSignal( (TestData*)userData, (float*)outputBuffer, frameCount );\n\n    if( IsTestSignalFinished( (TestData*)userData ) )\n        testCallback2Finished = 1;\n\n    return paContinue;\n}\n\n/*******************************************************************/\nint main(void);\nint main(void)\n{\n    PaStreamParameters outputParameters;\n    PaStream *stream;\n    PaError err;\n    TestData data;\n    float writeBuffer[ FRAMES_PER_BUFFER * 2 ];\n\n    printf(\"PortAudio Test: check that stopping stream plays out all queued samples. SR = %d, BufSize = %d\\n\", SAMPLE_RATE, FRAMES_PER_BUFFER);\n\n    InitTestSignalGenerator( &data );\n\n    err = Pa_Initialize();\n    if( err != paNoError ) goto error;\n\n    outputParameters.device = Pa_GetDefaultOutputDevice(); /* default output device */\n    outputParameters.channelCount = 2;       /* stereo output */\n    outputParameters.sampleFormat = paFloat32; /* 32 bit floating point output */\n    outputParameters.suggestedLatency = Pa_GetDeviceInfo( outputParameters.device )->defaultHighOutputLatency;\n    outputParameters.hostApiSpecificStreamInfo = NULL;\n\n/* test paComplete ---------------------------------------------------------- */\n\n    ResetTestSignalGenerator( &data );\n\n    err = Pa_OpenStream(\n              &stream,\n              NULL, /* no input */\n              &outputParameters,\n              SAMPLE_RATE,\n              FRAMES_PER_BUFFER,\n              paClipOff,      /* we won't output out of range samples so don't bother clipping them */\n              TestCallback1,\n              &data );\n    if( err != paNoError ) goto error;\n\n    err = Pa_StartStream( stream );\n    if( err != paNoError ) goto error;\n\n    printf(\"\\nPlaying 'tone-blip' %d times using callback, stops by returning paComplete from callback.\\n\", NUM_REPEATS );\n    printf(\"If final blip is not intact, callback+paComplete implementation may be faulty.\\n\\n\" );\n\n    while( (err = Pa_IsStreamActive( stream )) == 1 )\n        Pa_Sleep( 2 );\n\n    if( err != 0 ) goto error;\n\n    err = Pa_StopStream( stream );\n    if( err != paNoError ) goto error;\n\n    err = Pa_CloseStream( stream );\n    if( err != paNoError ) goto error;\n\n    Pa_Sleep( 500 );\n\n\n/* test paComplete ---------------------------------------------------------- */\n\n    ResetTestSignalGenerator( &data );\n\n    err = Pa_OpenStream(\n              &stream,\n              NULL, /* no input */\n              &outputParameters,\n              SAMPLE_RATE,\n              FRAMES_PER_BUFFER,\n              paClipOff,      /* we won't output out of range samples so don't bother clipping them */\n              TestCallback1,\n              &data );\n    if( err != paNoError ) goto error;\n\n    err = Pa_StartStream( stream );\n    if( err != paNoError ) goto error;\n\n    printf(\"\\nPlaying 'tone-blip' %d times using callback, stops by returning paComplete from callback.\\n\", NUM_REPEATS );\n    printf(\"If final blip is not intact or is followed by garbage, callback+paComplete implementation may be faulty.\\n\\n\" );\n\n    while( (err = Pa_IsStreamActive( stream )) == 1 )\n        Pa_Sleep( 5 );\n\n    printf(\"Waiting 5 seconds after paComplete before stopping the stream. Tests that buffers are flushed correctly.\\n\");\n    Pa_Sleep( 5000 );\n\n    if( err != 0 ) goto error;\n\n    err = Pa_StopStream( stream );\n    if( err != paNoError ) goto error;\n\n    err = Pa_CloseStream( stream );\n    if( err != paNoError ) goto error;\n\n    Pa_Sleep( 500 );\n\n\n/* test Pa_StopStream() with callback --------------------------------------- */\n\n    ResetTestSignalGenerator( &data );\n\n    testCallback2Finished = 0;\n\n    err = Pa_OpenStream(\n              &stream,\n              NULL, /* no input */\n              &outputParameters,\n              SAMPLE_RATE,\n              FRAMES_PER_BUFFER,\n              paClipOff,      /* we won't output out of range samples so don't bother clipping them */\n              TestCallback2,\n              &data );\n    if( err != paNoError ) goto error;\n\n    err = Pa_StartStream( stream );\n    if( err != paNoError ) goto error;\n\n\n    printf(\"\\nPlaying 'tone-blip' %d times using callback, stops by calling Pa_StopStream.\\n\", NUM_REPEATS );\n    printf(\"If final blip is not intact, callback+Pa_StopStream implementation may be faulty.\\n\\n\" );\n\n    /* note that polling a volatile flag is not a good way to synchronise with\n        the callback, but it's the best we can do portably. */\n    while( !testCallback2Finished )\n        Pa_Sleep( 2 );\n\n    Pa_Sleep( 500 );\n\n    err = Pa_StopStream( stream );\n    if( err != paNoError ) goto error;\n\n\n    err = Pa_CloseStream( stream );\n    if( err != paNoError ) goto error;\n\n    Pa_Sleep( 500 );\n\n/* test Pa_StopStream() with Pa_WriteStream --------------------------------- */\n\n    ResetTestSignalGenerator( &data );\n\n    err = Pa_OpenStream(\n              &stream,\n              NULL, /* no input */\n              &outputParameters,\n              SAMPLE_RATE,\n              FRAMES_PER_BUFFER,\n              paClipOff,      /* we won't output out of range samples so don't bother clipping them */\n              NULL, /* no callback, use blocking API */\n              NULL ); /* no callback, so no callback userData */\n    if( err != paNoError ) goto error;\n\n    err = Pa_StartStream( stream );\n    if( err != paNoError ) goto error;\n\n\n    printf(\"\\nPlaying 'tone-blip' %d times using Pa_WriteStream, stops by calling Pa_StopStream.\\n\", NUM_REPEATS );\n    printf(\"If final blip is not intact, Pa_WriteStream+Pa_StopStream implementation may be faulty.\\n\\n\" );\n\n    do{\n        GenerateTestSignal( &data, writeBuffer, FRAMES_PER_BUFFER );\n        err = Pa_WriteStream( stream, writeBuffer, FRAMES_PER_BUFFER );\n        if( err != paNoError ) goto error;\n\n    }while( !IsTestSignalFinished( &data ) );\n\n    err = Pa_StopStream( stream );\n    if( err != paNoError ) goto error;\n\n\n    err = Pa_CloseStream( stream );\n    if( err != paNoError ) goto error;\n\n/* -------------------------------------------------------------------------- */\n\n    Pa_Terminate();\n    printf(\"Test finished.\\n\");\n\n    return err;\n\nerror:\n    Pa_Terminate();\n    fprintf( stderr, \"An error occurred while using the portaudio stream\\n\" );\n    fprintf( stderr, \"Error number: %d\\n\", err );\n    fprintf( stderr, \"Error message: %s\\n\", Pa_GetErrorText( err ) );\n    return err;\n}\n"
  },
  {
    "path": "thirdparty/portaudio/test/patest_suggested_vs_streaminfo_latency.c",
    "content": "/** @file patest_suggested_vs_streaminfo_latency.c\n    @ingroup test_src\n    @brief Print suggested vs. PaStreamInfo reported actual latency\n    @author Ross Bencina <rossb@audiomulch.com>\n\n    Opens streams with a sequence of suggested latency values\n    from 0 to 2 seconds in .5ms intervals and gathers the resulting actual\n    latency values. Output a csv file and graph suggested vs. actual. Run\n    with framesPerBuffer unspecified, powers of 2 and multiples of 50 and\n    prime number buffer sizes.\n*/\n/*\n * $Id: patest_sine.c 1368 2008-03-01 00:38:27Z rossb $\n *\n * This program uses the PortAudio Portable Audio Library.\n * For more information see: http://www.portaudio.com/\n * Copyright (c) 1999-2000 Ross Bencina and Phil Burk\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <math.h>\n#include \"portaudio.h\"\n\n#define SAMPLE_RATE             (44100)\n#define FRAMES_PER_BUFFER       2//(128)\n#define NUM_CHANNELS            (2)\n\n#define SUGGESTED_LATENCY_START_SECONDS     (0.0)\n#define SUGGESTED_LATENCY_END_SECONDS       (2.0)\n#define SUGGESTED_LATENCY_INCREMENT_SECONDS (0.0005) /* half a millisecond increments */\n\n\n/* dummy callback. does nothing. never gets called */\nstatic int patestCallback( const void *inputBuffer, void *outputBuffer,\n                            unsigned long framesPerBuffer,\n                            const PaStreamCallbackTimeInfo* timeInfo,\n                            PaStreamCallbackFlags statusFlags,\n                            void *userData )\n{\n    return paContinue;\n}\n\n/*******************************************************************/\nstatic void usage()\n{\n    int i;\n    const PaDeviceInfo *deviceInfo;\n    const char *channelString;\n\n    fprintf( stderr, \"PortAudio suggested (requested) vs. resulting (reported) stream latency test\\n\" );\n    fprintf( stderr, \"Usage: x.exe input-device-index output-device-index sample-rate frames-per-buffer\\n\" );\n    fprintf( stderr, \"Use -1 for default device index, or use one of these:\\n\" );\n    for( i=0; i < Pa_GetDeviceCount(); ++i ){\n        deviceInfo = Pa_GetDeviceInfo(i);\n        if( deviceInfo->maxInputChannels > 0 && deviceInfo->maxOutputChannels > 0 )\n            channelString = \"full-duplex\";\n        else if( deviceInfo->maxInputChannels > 0 )\n            channelString = \"input only\";\n        else\n            channelString = \"output only\";\n\n        fprintf( stderr, \"%d (%s, %s, %s)\\n\", i, deviceInfo->name, Pa_GetHostApiInfo(deviceInfo->hostApi)->name, channelString );\n    }\n    Pa_Terminate();\n    exit(-1);\n}\n\nint main( int argc, const char* argv[] );\nint main( int argc, const char* argv[] )\n{\n    PaStreamParameters inputParameters, outputParameters;\n    PaStream *stream;\n    PaError err;\n    PaTime suggestedLatency;\n    const PaStreamInfo *streamInfo;\n    const PaDeviceInfo *deviceInfo;\n    float sampleRate = SAMPLE_RATE;\n    int framesPerBuffer = FRAMES_PER_BUFFER;\n    err = Pa_Initialize();\n    if( err != paNoError ) goto error;\n\n    if( argc > 1 && strcmp(argv[1],\"-h\") == 0 )\n        usage();\n\n    if( argc > 3 ){\n        sampleRate = atoi(argv[3]);\n    }\n\n    if( argc > 4 ){\n        framesPerBuffer = atoi(argv[4]);\n    }\n\n    printf(\"# sample rate=%f, frames per buffer=%d\\n\", (float)sampleRate, framesPerBuffer );\n\n    inputParameters.device = -1;\n    if( argc > 1 )\n        inputParameters.device = atoi(argv[1]);\n    if( inputParameters.device == -1 ){\n        inputParameters.device = Pa_GetDefaultInputDevice();\n        if (inputParameters.device == paNoDevice) {\n            fprintf(stderr,\"Error: No default input device available.\\n\");\n            goto error;\n        }\n    }else{\n        deviceInfo = Pa_GetDeviceInfo(inputParameters.device);\n        if( !deviceInfo ){\n            fprintf(stderr,\"Error: Invalid input device index.\\n\");\n            usage();\n        }\n        if( deviceInfo->maxInputChannels == 0 ){\n            fprintf(stderr,\"Error: Specified input device has no input channels (an output only device?).\\n\");\n            usage();\n        }\n    }\n\n    inputParameters.channelCount = NUM_CHANNELS;\n    inputParameters.sampleFormat = paFloat32; /* 32 bit floating point output */\n    inputParameters.hostApiSpecificStreamInfo = NULL;\n\n    deviceInfo = Pa_GetDeviceInfo(inputParameters.device);\n    printf( \"# using input device id %d (%s, %s)\\n\", inputParameters.device, deviceInfo->name, Pa_GetHostApiInfo(deviceInfo->hostApi)->name );\n\n\n    outputParameters.device = -1;\n    if( argc > 2 )\n        outputParameters.device = atoi(argv[2]);\n    if( outputParameters.device == -1 ){\n        outputParameters.device = Pa_GetDefaultOutputDevice();\n        if (outputParameters.device == paNoDevice) {\n            fprintf(stderr,\"Error: No default output device available.\\n\");\n            goto error;\n        }\n    }else{\n        deviceInfo = Pa_GetDeviceInfo(outputParameters.device);\n        if( !deviceInfo ){\n            fprintf(stderr,\"Error: Invalid output device index.\\n\");\n            usage();\n        }\n        if( deviceInfo->maxOutputChannels == 0 ){\n            fprintf(stderr,\"Error: Specified output device has no output channels (an input only device?).\\n\");\n            usage();\n        }\n    }\n\n    outputParameters.channelCount = NUM_CHANNELS;\n    outputParameters.sampleFormat = paFloat32; /* 32 bit floating point output */\n    outputParameters.hostApiSpecificStreamInfo = NULL;\n\n    deviceInfo = Pa_GetDeviceInfo(outputParameters.device);\n    printf( \"# using output device id %d (%s, %s)\\n\", outputParameters.device, deviceInfo->name, Pa_GetHostApiInfo(deviceInfo->hostApi)->name );\n\n\n    printf( \"# suggested latency, half duplex PaStreamInfo::outputLatency, half duplex PaStreamInfo::inputLatency, full duplex PaStreamInfo::outputLatency, full duplex PaStreamInfo::inputLatency\\n\" );\n    suggestedLatency = SUGGESTED_LATENCY_START_SECONDS;\n    while( suggestedLatency <= SUGGESTED_LATENCY_END_SECONDS ){\n\n        outputParameters.suggestedLatency = suggestedLatency;\n        inputParameters.suggestedLatency = suggestedLatency;\n\n        printf( \"%f, \", suggestedLatency );\n\n        /* ------------------------------ output ------------------------------ */\n\n        err = Pa_OpenStream(\n                  &stream,\n                  NULL, /* no input */\n                  &outputParameters,\n                  sampleRate,\n                  framesPerBuffer,\n                  paClipOff,      /* we won't output out of range samples so don't bother clipping them */\n                  patestCallback,\n                  0 );\n        if( err != paNoError ) goto error;\n\n        streamInfo = Pa_GetStreamInfo( stream );\n\n        printf( \"%f,\", streamInfo->outputLatency  );\n\n        err = Pa_CloseStream( stream );\n        if( err != paNoError ) goto error;\n\n        /* ------------------------------ input ------------------------------ */\n\n        err = Pa_OpenStream(\n                  &stream,\n                  &inputParameters,\n                  NULL, /* no output */\n                  sampleRate,\n                  framesPerBuffer,\n                  paClipOff,      /* we won't output out of range samples so don't bother clipping them */\n                  patestCallback,\n                  0 );\n        if( err != paNoError ) goto error;\n\n        streamInfo = Pa_GetStreamInfo( stream );\n\n        printf( \"%f,\", streamInfo->inputLatency  );\n\n        err = Pa_CloseStream( stream );\n        if( err != paNoError ) goto error;\n\n        /* ------------------------------ full duplex ------------------------------ */\n\n        err = Pa_OpenStream(\n                  &stream,\n                  &inputParameters,\n                  &outputParameters,\n                  sampleRate,\n                  framesPerBuffer,\n                  paClipOff,      /* we won't output out of range samples so don't bother clipping them */\n                  patestCallback,\n                  0 );\n        if( err != paNoError ) goto error;\n\n        streamInfo = Pa_GetStreamInfo( stream );\n\n        printf( \"%f,%f\", streamInfo->outputLatency, streamInfo->inputLatency );\n\n        err = Pa_CloseStream( stream );\n        if( err != paNoError ) goto error;\n\n        /* ------------------------------------------------------------ */\n\n        printf( \"\\n\" );\n        suggestedLatency += SUGGESTED_LATENCY_INCREMENT_SECONDS;\n    }\n\n    Pa_Terminate();\n    printf(\"# Test finished.\\n\");\n\n    return err;\nerror:\n    Pa_Terminate();\n    fprintf( stderr, \"An error occurred while using the portaudio stream\\n\" );\n    fprintf( stderr, \"Error number: %d\\n\", err );\n    fprintf( stderr, \"Error message: %s\\n\", Pa_GetErrorText( err ) );\n    return err;\n}\n"
  },
  {
    "path": "thirdparty/portaudio/test/patest_suggested_vs_streaminfo_latency.py",
    "content": "#!/usr/bin/env python\n\"\"\"\n\nRun and graph the results of patest_suggested_vs_streaminfo_latency.c\n\nRequires matplotlib for plotting: http://matplotlib.sourceforge.net/\n\n\"\"\"\nimport os\nfrom pylab import *\nimport numpy\nfrom matplotlib.backends.backend_pdf import PdfPages\n\ntestExeName = \"PATest.exe\" # rename to whatever the compiled patest_suggested_vs_streaminfo_latency.c binary is\ndataFileName = \"patest_suggested_vs_streaminfo_latency.csv\" # code below calls the exe to generate this file\n\ninputDeviceIndex = -1 # -1 means default\noutputDeviceIndex = -1 # -1 means default\nsampleRate = 44100\npdfFilenameSuffix = \"_wmme\"\n\npdfFile = PdfPages(\"patest_suggested_vs_streaminfo_latency_\" + str(sampleRate) + pdfFilenameSuffix +\".pdf\") #output this pdf file\n\n\ndef loadCsvData( dataFileName ):\n    params= \"\"\n    inputDevice = \"\"\n    outputDevice = \"\"\n\n    startLines = file(dataFileName).readlines(1024)\n    for line in startLines:\n        if \"output device\" in line:\n            outputDevice = line.strip(\" \\t\\n\\r#\")\n        if \"input device\" in line:\n            inputDevice = line.strip(\" \\t\\n\\r#\")\n    params = startLines[0].strip(\" \\t\\n\\r#\")\n\n    data = numpy.loadtxt(dataFileName, delimiter=\",\", skiprows=4).transpose()\n\n    class R(object): pass\n    result = R()\n    result.params = params\n    for s in params.split(','):\n        if \"sample rate\" in s:\n            result.sampleRate = s\n\n    result.inputDevice = inputDevice\n    result.outputDevice = outputDevice\n    result.suggestedLatency = data[0]\n    result.halfDuplexOutputLatency = data[1]\n    result.halfDuplexInputLatency = data[2]\n    result.fullDuplexOutputLatency = data[3]\n    result.fullDuplexInputLatency = data[4]\n    return result;\n\n\ndef setFigureTitleAndAxisLabels( framesPerBufferString ):\n    title(\"PortAudio suggested (requested) vs. resulting (reported) stream latency\\n\" + framesPerBufferString)\n    ylabel(\"PaStreamInfo::{input,output}Latency (s)\")\n    xlabel(\"Pa_OpenStream suggestedLatency (s)\")\n    grid(True)\n    legend(loc=\"upper left\")\n\ndef setDisplayRangeSeconds( maxSeconds ):\n    xlim(0, maxSeconds)\n    ylim(0, maxSeconds)\n\n\n# run the test with different frames per buffer values:\n\ncompositeTestFramesPerBufferValues = [0]\n# powers of two\nfor i in range (1,11):\n    compositeTestFramesPerBufferValues.append( pow(2,i) )\n\n# multiples of 50\nfor i in range (1,20):\n    compositeTestFramesPerBufferValues.append( i * 50 )\n\n# 10ms buffer sizes\ncompositeTestFramesPerBufferValues.append( 441 )\ncompositeTestFramesPerBufferValues.append( 882 )\n\n# large primes\n#compositeTestFramesPerBufferValues.append( 39209 )\n#compositeTestFramesPerBufferValues.append( 37537 )\n#compositeTestFramesPerBufferValues.append( 26437 )\n\nindividualPlotFramesPerBufferValues = [0,64,128,256,512] #output separate plots for these\n\nisFirst = True\n\nfor framesPerBuffer in compositeTestFramesPerBufferValues:\n    commandString = testExeName + \" \" + str(inputDeviceIndex) + \" \" + str(outputDeviceIndex) + \" \" + str(sampleRate) + \" \" + str(framesPerBuffer) + ' > ' + dataFileName\n    print commandString\n    os.system(commandString)\n\n    d = loadCsvData(dataFileName)\n\n    if isFirst:\n        figure(1) # title sheet\n        gcf().text(0.1, 0.0,\n           \"patest_suggested_vs_streaminfo_latency\\n%s\\n%s\\n%s\\n\"%(d.inputDevice,d.outputDevice,d.sampleRate))\n        pdfFile.savefig()\n\n\n    figure(2) # composite plot, includes all compositeTestFramesPerBufferValues\n\n    if isFirst:\n        plot( d.suggestedLatency, d.suggestedLatency, label=\"Suggested latency\" )\n\n    plot( d.suggestedLatency, d.halfDuplexOutputLatency )\n    plot( d.suggestedLatency, d.halfDuplexInputLatency )\n    plot( d.suggestedLatency, d.fullDuplexOutputLatency )\n    plot( d.suggestedLatency, d.fullDuplexInputLatency )\n\n    if framesPerBuffer in individualPlotFramesPerBufferValues: # individual plots\n        figure( 3 + individualPlotFramesPerBufferValues.index(framesPerBuffer) )\n\n        plot( d.suggestedLatency, d.suggestedLatency, label=\"Suggested latency\" )\n        plot( d.suggestedLatency, d.halfDuplexOutputLatency, label=\"Half-duplex output latency\" )\n        plot( d.suggestedLatency, d.halfDuplexInputLatency, label=\"Half-duplex input latency\" )\n        plot( d.suggestedLatency, d.fullDuplexOutputLatency, label=\"Full-duplex output latency\" )\n        plot( d.suggestedLatency, d.fullDuplexInputLatency, label=\"Full-duplex input latency\" )\n\n        if framesPerBuffer == 0:\n            framesPerBufferText = \"paFramesPerBufferUnspecified\"\n        else:\n            framesPerBufferText = str(framesPerBuffer)\n        setFigureTitleAndAxisLabels( \"user frames per buffer: \"+str(framesPerBufferText) )\n        setDisplayRangeSeconds(2.2)\n        pdfFile.savefig()\n        setDisplayRangeSeconds(0.1)\n        setFigureTitleAndAxisLabels( \"user frames per buffer: \"+str(framesPerBufferText)+\" (detail)\" )\n        pdfFile.savefig()\n\n    isFirst = False\n\nfigure(2)\nsetFigureTitleAndAxisLabels( \"composite of frames per buffer values:\\n\"+str(compositeTestFramesPerBufferValues) )\nsetDisplayRangeSeconds(2.2)\npdfFile.savefig()\nsetDisplayRangeSeconds(0.1)\nsetFigureTitleAndAxisLabels( \"composite of frames per buffer values:\\n\"+str(compositeTestFramesPerBufferValues)+\" (detail)\" )\npdfFile.savefig()\n\npdfFile.close()\n\n#uncomment this to display interactively, otherwise we just output a pdf\n#show()\n"
  },
  {
    "path": "thirdparty/portaudio/test/patest_sync.c",
    "content": "/** @file patest_sync.c\n    @ingroup test_src\n    @brief Test time stamping and synchronization of audio and video.\n\n    A high latency is used so we can hear the difference in time.\n    Random durations are used so we know we are hearing the right beep\n    and not the one before or after.\n\n    Sequence of events:\n        -# Foreground requests a beep.\n        -# Background randomly schedules a beep.\n        -# Foreground waits for the beep to be heard based on PaUtil_GetTime().\n        -# Foreground outputs video (printf) in sync with audio.\n        -# Repeat.\n\n    @author Phil Burk  http://www.softsynth.com\n*/\n/*\n * $Id$\n *\n * This program uses the PortAudio Portable Audio Library.\n * For more information see: http://www.portaudio.com\n * Copyright (c) 1999-2000 Ross Bencina and Phil Burk\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n#include <stdio.h>\n#include <math.h>\n#include \"portaudio.h\"\n#include \"pa_util.h\"\n#define NUM_BEEPS           (6)\n#define SAMPLE_RATE         (44100)\n#define SAMPLE_PERIOD       (1.0/44100.0)\n#define FRAMES_PER_BUFFER   (256)\n#define BEEP_DURATION       (400)\n#define LATENCY_MSEC        (2000)\n#define SLEEP_MSEC          (10)\n#define TIMEOUT_MSEC        (15000)\n\n#define STATE_BKG_IDLE      (0)\n#define STATE_BKG_PENDING   (1)\n#define STATE_BKG_BEEPING   (2)\ntypedef struct\n{\n    float        left_phase;\n    float        right_phase;\n    int          state;\n    volatile int requestBeep;  /* Set by foreground, cleared by background. */\n    PaTime       beepTime;\n    int          beepCount;\n    double       latency;    /* For debugging. */\n}\npaTestData;\n\nstatic unsigned long GenerateRandomNumber( void );\n/************************************************************/\n/* Calculate pseudo-random 32 bit number based on linear congruential method. */\nstatic unsigned long GenerateRandomNumber( void )\n{\n    static unsigned long randSeed = 99887766;  /* Change this for different random sequences. */\n    randSeed = (randSeed * 196314165) + 907633515;\n    return randSeed;\n}\n\n/* This routine will be called by the PortAudio engine when audio is needed.\n** It may called at interrupt level on some machines so don't do anything\n** that could mess up the system like calling malloc() or free().\n*/\nstatic int patestCallback( const void *inputBuffer, void *outputBuffer,\n                           unsigned long framesPerBuffer,\n                           const PaStreamCallbackTimeInfo *timeInfo,\n                           PaStreamCallbackFlags statusFlags, void *userData )\n{\n    /* Cast data passed through stream to our structure. */\n    paTestData *data = (paTestData*)userData;\n    float *out = (float*)outputBuffer;\n    unsigned int i;\n    (void) inputBuffer;\n\n    data->latency = timeInfo->outputBufferDacTime - timeInfo->currentTime;\n\n    for( i=0; i<framesPerBuffer; i++ )\n    {\n        switch( data->state )\n        {\n        case STATE_BKG_IDLE:\n            /* Schedule beep at some random time in the future. */\n            if( data->requestBeep )\n            {\n                int random = GenerateRandomNumber() >> 14;\n                data->beepTime = timeInfo->outputBufferDacTime + (( (double)(random + SAMPLE_RATE)) * SAMPLE_PERIOD );\n                data->state = STATE_BKG_PENDING;\n            }\n            *out++ = 0.0;  /* left */\n            *out++ = 0.0;  /* right */\n            break;\n\n        case STATE_BKG_PENDING:\n            if( (timeInfo->outputBufferDacTime + (i*SAMPLE_PERIOD)) >= data->beepTime )\n            {\n                data->state = STATE_BKG_BEEPING;\n                data->beepCount = BEEP_DURATION;\n                data->left_phase = data->right_phase = 0.0;\n            }\n            *out++ = 0.0;  /* left */\n            *out++ = 0.0;  /* right */\n            break;\n\n        case STATE_BKG_BEEPING:\n            if( data->beepCount <= 0 )\n            {\n                data->state = STATE_BKG_IDLE;\n                data->requestBeep = 0;\n                *out++ = 0.0;  /* left */\n                *out++ = 0.0;  /* right */\n            }\n            else\n            {\n                /* Play sawtooth wave. */\n                *out++ = data->left_phase;  /* left */\n                *out++ = data->right_phase;  /* right */\n                /* Generate simple sawtooth phaser that ranges between -1.0 and 1.0. */\n                data->left_phase += 0.01f;\n                /* When signal reaches top, drop back down. */\n                if( data->left_phase >= 1.0f ) data->left_phase -= 2.0f;\n                /* higher pitch so we can distinguish left and right. */\n                data->right_phase += 0.03f;\n                if( data->right_phase >= 1.0f ) data->right_phase -= 2.0f;\n            }\n            data->beepCount -= 1;\n            break;\n\n        default:\n            data->state = STATE_BKG_IDLE;\n            break;\n        }\n    }\n    return 0;\n}\n/*******************************************************************/\nint main(void);\nint main(void)\n{\n    PaStream *stream;\n    PaError    err;\n    paTestData DATA;\n    int        i, timeout;\n    PaTime     previousTime;\n    PaStreamParameters outputParameters;\n    printf(\"PortAudio Test: you should see BEEP at the same time you hear it.\\n\");\n    printf(\"Wait for a few seconds random delay between BEEPs.\\n\");\n    printf(\"BEEP %d times.\\n\", NUM_BEEPS );\n    /* Initialize our DATA for use by callback. */\n    DATA.left_phase = DATA.right_phase = 0.0;\n    DATA.state = STATE_BKG_IDLE;\n    DATA.requestBeep = 0;\n    /* Initialize library before making any other calls. */\n    err = Pa_Initialize();\n    if( err != paNoError ) goto error;\n\n    outputParameters.device = Pa_GetDefaultOutputDevice();\n    if (outputParameters.device == paNoDevice) {\n        fprintf(stderr,\"Error: No default output device.\\n\");\n        goto error;\n    }\n    outputParameters.channelCount = 2;\n    outputParameters.hostApiSpecificStreamInfo = NULL;\n    outputParameters.sampleFormat = paFloat32;\n    outputParameters.suggestedLatency = (double)LATENCY_MSEC / 1000;\n\n    /* Open an audio I/O stream. */\n    err = Pa_OpenStream(\n            &stream,\n            NULL,                         /* no input */\n            &outputParameters,\n            SAMPLE_RATE,\n            FRAMES_PER_BUFFER,            /* frames per buffer */\n            paClipOff,      /* we won't output out of range samples so don't bother clipping them */\n            patestCallback,\n            &DATA );\n    if( err != paNoError ) goto error;\n\n    err = Pa_StartStream( stream );\n    if( err != paNoError ) goto error;\n\n    printf(\"started\\n\");\n    fflush(stdout);\n\n    previousTime = Pa_GetStreamTime( stream );\n    for( i=0; i<NUM_BEEPS; i++ )\n    {\n        /* Request a beep from background. */\n        DATA.requestBeep = 1;\n\n        /* Wait for background to acknowledge request. */\n        timeout = TIMEOUT_MSEC;\n        while( (DATA.requestBeep == 1) && (timeout-- > 0 ) ) Pa_Sleep(SLEEP_MSEC);\n        if( timeout <= 0 )\n        {\n            fprintf( stderr, \"Timed out waiting for background to acknowledge request.\\n\" );\n            goto error;\n        }\n        printf(\"calc beep for %9.3f, latency = %6.3f\\n\", DATA.beepTime, DATA.latency );\n        fflush(stdout);\n\n        /* Wait for scheduled beep time. */\n        timeout =  TIMEOUT_MSEC + (10000/SLEEP_MSEC);\n        while( (Pa_GetStreamTime( stream ) < DATA.beepTime) && (timeout-- > 0 ) )\n        {\n            Pa_Sleep(SLEEP_MSEC);\n        }\n        if( timeout <= 0 )\n        {\n            fprintf( stderr, \"Timed out waiting for time. Now = %9.3f, Beep for %9.3f.\\n\",\n                     PaUtil_GetTime(), DATA.beepTime );\n            goto error;\n        }\n\n        /* Beep should be sounding now so print synchronized BEEP. */\n        printf(\"hear \\\"BEEP\\\" at %9.3f, delta = %9.3f\\n\",\n               Pa_GetStreamTime( stream ), (DATA.beepTime - previousTime) );\n        fflush(stdout);\n\n        previousTime = DATA.beepTime;\n    }\n\n    err = Pa_StopStream( stream );\n    if( err != paNoError ) goto error;\n\n    err = Pa_CloseStream( stream );\n    if( err != paNoError ) goto error;\n\n    Pa_Terminate();\n    printf(\"Test finished.\\n\");\n    return err;\nerror:\n    Pa_Terminate();\n    fprintf( stderr, \"An error occurred while using the portaudio stream\\n\" );\n    fprintf( stderr, \"Error number: %d\\n\", err );\n    fprintf( stderr, \"Error message: %s\\n\", Pa_GetErrorText( err ) );\n    return err;\n}\n"
  },
  {
    "path": "thirdparty/portaudio/test/patest_timing.c",
    "content": "/** @file patest_timing.c\n    @ingroup test_src\n    @brief Play a sine wave for several seconds, and spits out a ton of timing info while it's at it. Based on patest_sine.c\n    @author Bjorn Roche\n    @author Ross Bencina <rossb@audiomulch.com>\n    @author Phil Burk <philburk@softsynth.com>\n*/\n/*\n * $Id: patest_timing.c 578 2003-09-02 04:17:38Z rossbencina $\n *\n * This program uses the PortAudio Portable Audio Library.\n * For more information see: http://www.portaudio.com/\n * Copyright (c) 1999-2000 Ross Bencina and Phil Burk\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n#include <stdio.h>\n#include <math.h>\n#include \"portaudio.h\"\n\n#define NUM_SECONDS   (5)\n#define SAMPLE_RATE   (44100)\n#define FRAMES_PER_BUFFER  (64)\n\n#ifndef M_PI\n#define M_PI  (3.14159265)\n#endif\n\n#define TABLE_SIZE   (200)\ntypedef struct\n{\n    PaStream *stream;\n    PaTime start;\n    float sine[TABLE_SIZE];\n    int left_phase;\n    int right_phase;\n}\npaTestData;\n\n/* This routine will be called by the PortAudio engine when audio is needed.\n** It may called at interrupt level on some machines so don't do anything\n** that could mess up the system like calling malloc() or free().\n*/\nstatic int patestCallback( const void *inputBuffer, void *outputBuffer,\n                            unsigned long framesPerBuffer,\n                            const PaStreamCallbackTimeInfo* timeInfo,\n                            PaStreamCallbackFlags statusFlags,\n                            void *userData )\n{\n    paTestData *data = (paTestData*)userData;\n    float *out = (float*)outputBuffer;\n    unsigned long i;\n\n    (void) timeInfo; /* Prevent unused variable warnings. */\n    (void) statusFlags;\n    (void) inputBuffer;\n\n    printf( \"Timing info given to callback: Adc: %g, Current: %g, Dac: %g\\n\",\n            timeInfo->inputBufferAdcTime,\n            timeInfo->currentTime,\n            timeInfo->outputBufferDacTime );\n\n    printf( \"getStreamTime() returns: %g\\n\", Pa_GetStreamTime(data->stream) - data->start );\n\n    for( i=0; i<framesPerBuffer; i++ )\n    {\n        *out++ = data->sine[data->left_phase];  /* left */\n        *out++ = data->sine[data->right_phase];  /* right */\n        data->left_phase += 1;\n        if( data->left_phase >= TABLE_SIZE ) data->left_phase -= TABLE_SIZE;\n        data->right_phase += 3; /* higher pitch so we can distinguish left and right. */\n        if( data->right_phase >= TABLE_SIZE ) data->right_phase -= TABLE_SIZE;\n    }\n\n    return paContinue;\n}\n\n/*******************************************************************/\nint main(void);\nint main(void)\n{\n    PaStreamParameters outputParameters;\n    PaStream *stream;\n    PaError err;\n    paTestData data;\n    int i;\n\n\n    printf(\"PortAudio Test: output sine wave. SR = %d, BufSize = %d\\n\", SAMPLE_RATE, FRAMES_PER_BUFFER);\n\n    /* initialise sinusoidal wavetable */\n    for( i=0; i<TABLE_SIZE; i++ )\n    {\n        data.sine[i] = (float) sin( ((double)i/(double)TABLE_SIZE) * M_PI * 2. );\n    }\n    data.left_phase = data.right_phase = 0;\n\n    err = Pa_Initialize();\n    if( err != paNoError ) goto error;\n\n    outputParameters.device = Pa_GetDefaultOutputDevice(); /* default output device */\n    outputParameters.channelCount = 2;       /* stereo output */\n    outputParameters.sampleFormat = paFloat32; /* 32 bit floating point output */\n    outputParameters.suggestedLatency = Pa_GetDeviceInfo( outputParameters.device )->defaultLowOutputLatency;\n    outputParameters.hostApiSpecificStreamInfo = NULL;\n\n    err = Pa_OpenStream(\n              &stream,\n              NULL, /* no input */\n              &outputParameters,\n              SAMPLE_RATE,\n              FRAMES_PER_BUFFER,\n              paClipOff,      /* we won't output out of range samples so don't bother clipping them */\n              patestCallback,\n              &data );\n    data.stream = stream;\n    data.start = Pa_GetStreamTime(stream);\n    if( err != paNoError ) goto error;\n\n    err = Pa_StartStream( stream );\n    data.start = Pa_GetStreamTime(stream);\n    if( err != paNoError ) goto error;\n\n    printf(\"Play for %d seconds.\\n\", NUM_SECONDS );\n    Pa_Sleep( NUM_SECONDS * 1000 );\n\n    err = Pa_StopStream( stream );\n    if( err != paNoError ) goto error;\n\n    err = Pa_CloseStream( stream );\n    if( err != paNoError ) goto error;\n\n    Pa_Terminate();\n    printf(\"Test finished.\\n\");\n    printf(\"The tone should have been heard for about 5 seconds and all the timing info above should report that about 5 seconds elapsed (except Adc, which is undefined since there was no input device opened).\\n\");\n\n    return err;\nerror:\n    Pa_Terminate();\n    fprintf( stderr, \"An error occurred while using the portaudio stream\\n\" );\n    fprintf( stderr, \"Error number: %d\\n\", err );\n    fprintf( stderr, \"Error message: %s\\n\", Pa_GetErrorText( err ) );\n    return err;\n}\n"
  },
  {
    "path": "thirdparty/portaudio/test/patest_toomanysines.c",
    "content": "/** @file patest_toomanysines.c\n    @ingroup test_src\n    @brief Play more sine waves than we can handle in real time as a stress test.\n    @todo This may not be needed now that we have \"patest_out_overflow.c\".\n    @author Ross Bencina <rossb@audiomulch.com>\n    @author Phil Burk <philburk@softsynth.com>\n*/\n/*\n * $Id$\n *\n * This program uses the PortAudio Portable Audio Library.\n * For more information see: http://www.portaudio.com\n * Copyright (c) 1999-2000 Ross Bencina and Phil Burk\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n#include <stdio.h>\n#include <math.h>\n#include \"portaudio.h\"\n\n#define MAX_SINES     (1000)\n#define MAX_LOAD      (1.2)\n#define SAMPLE_RATE   (44100)\n#define FRAMES_PER_BUFFER  (512)\n#ifndef M_PI\n#define M_PI  (3.14159265)\n#endif\n#define TWOPI (M_PI * 2.0)\n\ntypedef struct paTestData\n{\n    int numSines;\n    double phases[MAX_SINES];\n}\npaTestData;\n\n/* This routine will be called by the PortAudio engine when audio is needed.\n** It may called at interrupt level on some machines so don't do anything\n** that could mess up the system like calling malloc() or free().\n*/\nstatic int patestCallback( const void *inputBuffer, void *outputBuffer,\n                           unsigned long framesPerBuffer,\n                           const PaStreamCallbackTimeInfo* timeInfo,\n                           PaStreamCallbackFlags statusFlags,\n                           void *userData )\n{\n    paTestData *data = (paTestData*)userData;\n    float *out = (float*)outputBuffer;\n    unsigned long i;\n    int j;\n    int finished = 0;\n    (void) inputBuffer; /* Prevent unused variable warning. */\n\n    for( i=0; i<framesPerBuffer; i++ )\n    {\n        float output = 0.0;\n        double phaseInc = 0.02;\n        double phase;\n        for( j=0; j<data->numSines; j++ )\n        {\n            /* Advance phase of next oscillator. */\n            phase = data->phases[j];\n            phase += phaseInc;\n            if( phase > TWOPI ) phase -= TWOPI;\n\n            phaseInc *= 1.02;\n            if( phaseInc > 0.5 ) phaseInc *= 0.5;\n\n            /* This is not a very efficient way to calc sines. */\n            output += (float) sin( phase );\n            data->phases[j] = phase;\n        }\n        *out++ = (float) (output / data->numSines);\n    }\n    return finished;\n}\n\n/*******************************************************************/\nint main(void);\nint main(void)\n{\n    PaStreamParameters outputParameters;\n    PaStream *stream;\n    PaError err;\n    int numStress;\n    paTestData data = {0};\n    double load;\n\n    printf(\"PortAudio Test: output sine wave. SR = %d, BufSize = %d. MAX_LOAD = %f\\n\",\n        SAMPLE_RATE, FRAMES_PER_BUFFER, MAX_LOAD );\n\n    err = Pa_Initialize();\n    if( err != paNoError ) goto error;\n\n    outputParameters.device = Pa_GetDefaultOutputDevice();  /* default output device */\n    if (outputParameters.device == paNoDevice) {\n        fprintf(stderr,\"Error: No default output device.\\n\");\n        goto error;\n    }\n    outputParameters.channelCount = 1;                      /* mono output */\n    outputParameters.sampleFormat = paFloat32;              /* 32 bit floating point output */\n    outputParameters.suggestedLatency = Pa_GetDeviceInfo( outputParameters.device )->defaultLowOutputLatency;\n    outputParameters.hostApiSpecificStreamInfo = NULL;\n\n    err = Pa_OpenStream(\n              &stream,\n              NULL,         /* no input */\n              &outputParameters,\n              SAMPLE_RATE,\n              FRAMES_PER_BUFFER,\n              paClipOff,    /* we won't output out of range samples so don't bother clipping them */\n              patestCallback,\n              &data );\n    if( err != paNoError ) goto error;\n    err = Pa_StartStream( stream );\n    if( err != paNoError ) goto error;\n\n    /* Determine number of sines required to get to 50% */\n    do\n    {        Pa_Sleep( 100 );\n\n        load = Pa_GetStreamCpuLoad( stream );\n        printf(\"numSines = %d, CPU load = %f\\n\", data.numSines, load );\n\n        if( load < 0.3 )\n        {\n            data.numSines += 10;\n        }\n        else if( load < 0.4 )\n        {\n            data.numSines += 2;\n        }\n        else\n        {\n            data.numSines += 1;\n        }\n\n    }\n    while( load < 0.5 );\n\n    /* Calculate target stress value then ramp up to that level*/\n    numStress = (int) (2.0 * data.numSines * MAX_LOAD );\n    if( numStress > MAX_SINES )\n        numStress = MAX_SINES;\n    for( ; data.numSines < numStress; data.numSines+=2 )\n    {\n        Pa_Sleep( 200 );\n        load = Pa_GetStreamCpuLoad( stream );\n        printf(\"STRESSING: numSines = %d, CPU load = %f\\n\", data.numSines, load );\n    }\n\n    printf(\"Suffer for 5 seconds.\\n\");\n    Pa_Sleep( 5000 );\n\n    printf(\"Stop stream.\\n\");\n    err = Pa_StopStream( stream );\n    if( err != paNoError ) goto error;\n\n    err = Pa_CloseStream( stream );\n    if( err != paNoError ) goto error;\n\n    Pa_Terminate();\n    printf(\"Test finished.\\n\");\n    return err;\nerror:\n    Pa_Terminate();\n    fprintf( stderr, \"An error occurred while using the portaudio stream\\n\" );\n    fprintf( stderr, \"Error number: %d\\n\", err );\n    fprintf( stderr, \"Error message: %s\\n\", Pa_GetErrorText( err ) );\n    return err;\n}\n"
  },
  {
    "path": "thirdparty/portaudio/test/patest_two_rates.c",
    "content": "/** @file patest_two_rates.c\n    @ingroup test_src\n    @brief Play two streams at different rates to make sure they don't interfere.\n    @author Phil Burk <philburk@softsynth.com>\n*/\n/*\n * $Id$\n *\n * Author: Phil Burk  http://www.softsynth.com\n *\n * This program uses the PortAudio Portable Audio Library.\n * For more information see: http://www.portaudio.com\n * Copyright (c) 1999-2000 Ross Bencina and Phil Burk\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n#include <stdio.h>\n#include <math.h>\n#include \"portaudio.h\"\n\n#define OUTPUT_DEVICE       (Pa_GetDefaultOutputDeviceID())\n#define SAMPLE_RATE_1       (44100)\n#define SAMPLE_RATE_2       (48000)\n#define FRAMES_PER_BUFFER   (256)\n#define FREQ_INCR           (0.1)\n\n#ifndef M_PI\n#define M_PI  (3.14159265)\n#endif\n\ntypedef struct\n{\n    double phase;\n    int    numFrames;\n} paTestData;\n\n/* This routine will be called by the PortAudio engine when audio is needed.\n ** It may called at interrupt level on some machines so don't do anything\n ** that could mess up the system like calling malloc() or free().\n */\nstatic int patestCallback( const void *inputBuffer, void *outputBuffer,\n                          unsigned long framesPerBuffer,\n                          const PaStreamCallbackTimeInfo* timeInfo,\n                          PaStreamCallbackFlags statusFlags,\n                          void *userData )\n{\n    paTestData *data = (paTestData*)userData;\n    float *out = (float*)outputBuffer;\n    int frameIndex;\n    (void) timeInfo; /* Prevent unused variable warnings. */\n    (void) inputBuffer;\n\n    for( frameIndex=0; frameIndex<(int)framesPerBuffer; frameIndex++ )\n    {\n        /* Generate sine wave. */\n        float value = (float) 0.3 * sin(data->phase);\n        /* Stereo - two channels. */\n        *out++ = value;\n        *out++ = value;\n\n        data->phase += FREQ_INCR;\n        if( data->phase >= (2.0 * M_PI) ) data->phase -= (2.0 * M_PI);\n    }\n    data->numFrames += 1;\n    return 0;\n}\n\n/*******************************************************************/\nint main(void);\nint main(void)\n{\n    PaError err;\n    PaStreamParameters outputParameters;\n    PaStream *stream1;\n    PaStream *stream2;\n    paTestData data1 = {0};\n    paTestData data2 = {0};\n    printf(\"PortAudio Test: two rates.\\n\" );\n\n    err = Pa_Initialize();\n    if( err != paNoError ) goto error;\n\n    outputParameters.device = Pa_GetDefaultOutputDevice(); /* default output device */\n    if (outputParameters.device == paNoDevice) {\n        fprintf(stderr,\"Error: No default output device.\\n\");\n        goto error;\n    }\n    outputParameters.channelCount = 2;       /* stereo output */\n    outputParameters.sampleFormat = paFloat32; /* 32 bit floating point output */\n    outputParameters.suggestedLatency = Pa_GetDeviceInfo( outputParameters.device )->defaultLowOutputLatency;\n    outputParameters.hostApiSpecificStreamInfo = NULL;\n\n    /* Start first stream. **********************/\n    err = Pa_OpenStream(\n                        &stream1,\n                        NULL, /* no input */\n                        &outputParameters,\n                        SAMPLE_RATE_1,\n                        FRAMES_PER_BUFFER,\n                        paClipOff,      /* we won't output out of range samples so don't bother clipping them */\n                        patestCallback,\n                        &data1 );\n    if( err != paNoError ) goto error;\n\n    err = Pa_StartStream( stream1 );\n    if( err != paNoError ) goto error;\n\n    Pa_Sleep( 3 * 1000 );\n\n    /* Start second stream. **********************/\n    err = Pa_OpenStream(\n                        &stream2,\n                        NULL, /* no input */\n                        &outputParameters,\n                        SAMPLE_RATE_2,\n                        FRAMES_PER_BUFFER,\n                        paClipOff,      /* we won't output out of range samples so don't bother clipping them */\n                        patestCallback,\n                        &data2 );\n    if( err != paNoError ) goto error;\n\n    err = Pa_StartStream( stream2 );\n    if( err != paNoError ) goto error;\n\n    Pa_Sleep( 3 * 1000 );\n\n    err = Pa_StopStream( stream2 );\n    if( err != paNoError ) goto error;\n\n    Pa_Sleep( 3 * 1000 );\n\n    err = Pa_StopStream( stream1 );\n    if( err != paNoError ) goto error;\n\n    Pa_CloseStream( stream2 );\n    Pa_CloseStream( stream1 );\n\n    Pa_Terminate();\n\n    printf(\"NumFrames = %d on stream1, %d on stream2.\\n\", data1.numFrames, data2.numFrames );\n    printf(\"Test finished.\\n\");\n    return err;\nerror:\n    Pa_Terminate();\n    fprintf( stderr, \"An error occurred while using the portaudio stream\\n\" );\n    fprintf( stderr, \"Error number: %d\\n\", err );\n    fprintf( stderr, \"Error message: %s\\n\", Pa_GetErrorText( err ) );\n    return err;\n}\n"
  },
  {
    "path": "thirdparty/portaudio/test/patest_underflow.c",
    "content": "/** @file patest_underflow.c\n    @ingroup test_src\n    @brief Simulate an output buffer underflow condition.\n    Tests whether the stream can be stopped when underflowing buffers.\n    @author Ross Bencina <rossb@audiomulch.com>\n    @author Phil Burk <philburk@softsynth.com>\n*/\n/*\n * $Id$\n *\n * This program uses the PortAudio Portable Audio Library.\n * For more information see: http://www.portaudio.com\n * Copyright (c) 1999-2000 Ross Bencina and Phil Burk\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n#include <stdio.h>\n#include <math.h>\n#include \"portaudio.h\"\n\n#define NUM_SECONDS   (20)\n#define SAMPLE_RATE   (44100)\n#define FRAMES_PER_BUFFER  (2048)\n#define MSEC_PER_BUFFER  ( (FRAMES_PER_BUFFER * 1000) / SAMPLE_RATE )\n\n#ifndef M_PI\n#define M_PI  (3.14159265)\n#endif\n\n#define TABLE_SIZE   (200)\ntypedef struct\n{\n    float sine[TABLE_SIZE];\n    int left_phase;\n    int right_phase;\n    int sleepTime;\n}\npaTestData;\n\n/* This routine will be called by the PortAudio engine when audio is needed.\n** It may called at interrupt level on some machines so don't do anything\n** that could mess up the system like calling malloc() or free().\n*/\nstatic int patestCallback( const void *inputBuffer, void *outputBuffer,\n                           unsigned long framesPerBuffer,\n                           const PaStreamCallbackTimeInfo* timeInfo,\n                           PaStreamCallbackFlags statusFlags,\n                           void *userData )\n{\n    paTestData *data = (paTestData*)userData;\n    float *out = (float*)outputBuffer;\n    unsigned long i;\n    int finished = 0;\n    (void) inputBuffer; /* Prevent unused variable warnings. */\n    for( i=0; i<framesPerBuffer; i++ )\n    {\n        *out++ = data->sine[data->left_phase];  /* left */\n        *out++ = data->sine[data->right_phase];  /* right */\n        data->left_phase += 1;\n        if( data->left_phase >= TABLE_SIZE ) data->left_phase -= TABLE_SIZE;\n        data->right_phase += 3; /* higher pitch so we can distinguish left and right. */\n        if( data->right_phase >= TABLE_SIZE ) data->right_phase -= TABLE_SIZE;\n    }\n\n    /* Cause underflow to occur. */\n    if( data->sleepTime > 0 ) Pa_Sleep( data->sleepTime );\n    data->sleepTime += 1;\n\n    return finished;\n}\n\n/*******************************************************************/\nint main(void);\nint main(void)\n{\n    PaStreamParameters outputParameters;\n    PaStream *stream;\n    PaError err;\n    paTestData data;\n    int i;\n    printf(\"PortAudio Test: output sine wave. SR = %d, BufSize = %d\\n\", SAMPLE_RATE, FRAMES_PER_BUFFER);\n    /* initialise sinusoidal wavetable */\n    for( i=0; i<TABLE_SIZE; i++ )\n    {\n        data.sine[i] = (float) sin( ((double)i/(double)TABLE_SIZE) * M_PI * 2. );\n    }\n    data.left_phase = data.right_phase = data.sleepTime = 0;\n    err = Pa_Initialize();\n    if( err != paNoError ) goto error;\n\n    outputParameters.device = Pa_GetDefaultOutputDevice(); /* default output device */\n    if (outputParameters.device == paNoDevice) {\n        fprintf(stderr,\"Error: No default output device.\\n\");\n        goto error;\n    }\n    outputParameters.channelCount = 2;       /* stereo output */\n    outputParameters.sampleFormat = paFloat32; /* 32 bit floating point output */\n    outputParameters.suggestedLatency = Pa_GetDeviceInfo( outputParameters.device )->defaultLowOutputLatency;\n    outputParameters.hostApiSpecificStreamInfo = NULL;\n    err = Pa_OpenStream(\n              &stream,\n              NULL, /* no input */\n              &outputParameters,\n              SAMPLE_RATE,\n              FRAMES_PER_BUFFER,\n              paClipOff,      /* we won't output out of range samples so don't bother clipping them */\n              patestCallback,\n              &data );\n    if( err != paNoError ) goto error;\n    err = Pa_StartStream( stream );\n    if( err != paNoError ) goto error;\n\n    while( data.sleepTime < (2 * MSEC_PER_BUFFER) )\n    {\n        printf(\"SleepTime = %d\\n\", data.sleepTime );\n        Pa_Sleep( data.sleepTime );\n    }\n\n    printf(\"Try to stop stream.\\n\");\n    err = Pa_StopStream( stream );\n    if( err != paNoError ) goto error;\n    err = Pa_CloseStream( stream );\n    if( err != paNoError ) goto error;\n    Pa_Terminate();\n    printf(\"Test finished.\\n\");\n    return err;\nerror:\n    Pa_Terminate();\n    fprintf( stderr, \"An error occurred while using the portaudio stream\\n\" );\n    fprintf( stderr, \"Error number: %d\\n\", err );\n    fprintf( stderr, \"Error message: %s\\n\", Pa_GetErrorText( err ) );\n    return err;\n}\n"
  },
  {
    "path": "thirdparty/portaudio/test/patest_unplug.c",
    "content": "/** @file patest_unplug.c\n    @ingroup test_src\n    @brief Debug a crash involving unplugging a USB device.\n    @author Phil Burk  http://www.softsynth.com\n*/\n/*\n * $Id$\n *\n * This program uses the PortAudio Portable Audio Library.\n * For more information see: http://www.portaudio.com\n * Copyright (c) 1999-2000 Ross Bencina and Phil Burk\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <memory.h>\n#include <math.h>\n#include \"portaudio.h\"\n\n#define NUM_SECONDS   (8)\n#define SAMPLE_RATE   (44100)\n#ifndef M_PI\n#define M_PI  (3.14159265)\n#endif\n#define TABLE_SIZE        (200)\n#define FRAMES_PER_BUFFER  (64)\n#define MAX_CHANNELS        (8)\n\ntypedef struct\n{\n    short sine[TABLE_SIZE];\n    int32_t phases[MAX_CHANNELS];\n    int32_t numChannels;\n    int32_t sampsToGo;\n}\npaTestData;\n\n\nstatic int inputCallback( const void *inputBuffer, void *outputBuffer,\n                          unsigned long framesPerBuffer,\n                          const PaStreamCallbackTimeInfo* timeInfo,\n                          PaStreamCallbackFlags statusFlags,\n                          void *userData )\n{\n    paTestData *data = (paTestData*)userData;\n    int finished = 0;\n    (void) inputBuffer; /* Prevent \"unused variable\" warnings. */\n    (void) outputBuffer; /* Prevent \"unused variable\" warnings. */\n\n    data->sampsToGo -= framesPerBuffer;\n    if (data->sampsToGo <= 0)\n    {\n        data->sampsToGo = 0;\n        finished = 1;\n    }\n    return finished;\n}\n\nstatic int outputCallback( const void *inputBuffer, void *outputBuffer,\n                            unsigned long framesPerBuffer,\n                            const PaStreamCallbackTimeInfo* timeInfo,\n                            PaStreamCallbackFlags statusFlags,\n                            void *userData )\n{\n    paTestData *data = (paTestData*)userData;\n    short *out = (short*)outputBuffer;\n    unsigned int i;\n    int finished = 0;\n    (void) inputBuffer; /* Prevent \"unused variable\" warnings. */\n\n    for( i=0; i<framesPerBuffer; i++ )\n    {\n        for (int channelIndex = 0; channelIndex < data->numChannels; channelIndex++)\n        {\n            int phase = data->phases[channelIndex];\n            *out++ = data->sine[phase];\n            phase += channelIndex + 2;\n            if( phase >= TABLE_SIZE ) phase -= TABLE_SIZE;\n            data->phases[channelIndex] = phase;\n        }\n    }\n    return finished;\n}\n\n/*******************************************************************/\nint main(int argc, char **args);\nint main(int argc, char **args)\n{\n    PaStreamParameters inputParameters;\n    PaStreamParameters outputParameters;\n    PaStream *inputStream;\n    PaStream *outputStream;\n    const PaDeviceInfo *deviceInfo;\n    PaError err;\n    paTestData data;\n    int i;\n    int totalSamps;\n    int inputDevice = -1;\n    int outputDevice = -1;\n\n    printf(\"Test unplugging a USB device.\\n\");\n\n    if( argc > 1 ) {\n        inputDevice = outputDevice = atoi( args[1] );\n        printf(\"Using device number %d.\\n\\n\", inputDevice );\n    } else {\n        printf(\"Using default device.\\n\\n\" );\n    }\n\n    memset(&data, 0, sizeof(data));\n\n    /* initialise sinusoidal wavetable */\n    for( i=0; i<TABLE_SIZE; i++ )\n    {\n        data.sine[i] = (short) (32767.0 * sin( ((double)i/(double)TABLE_SIZE) * M_PI * 2. ));\n    }\n    data.numChannels = 2;\n    data.sampsToGo = totalSamps =  NUM_SECONDS * SAMPLE_RATE; /* Play for a few seconds. */\n\n\n    err = Pa_Initialize();\n    if( err != paNoError ) goto error;\n\n    if( inputDevice == -1 )\n        inputParameters.device = Pa_GetDefaultInputDevice(); /* default input device */\n    else\n        inputParameters.device = inputDevice ;\n\n    if (inputParameters.device == paNoDevice) {\n        fprintf(stderr,\"Error: No default input device.\\n\");\n        goto error;\n    }\n\n    if( outputDevice == -1 )\n        outputParameters.device = Pa_GetDefaultOutputDevice(); /* default output device */\n    else\n        outputParameters.device = outputDevice ;\n\n    if (outputParameters.device == paNoDevice) {\n        fprintf(stderr,\"Error: No default output device.\\n\");\n        goto error;\n    }\n\n    inputParameters.channelCount = 2;\n    inputParameters.sampleFormat = paInt16;\n    deviceInfo = Pa_GetDeviceInfo( inputParameters.device );\n    if( deviceInfo == NULL )\n    {\n        fprintf( stderr, \"No matching input device.\\n\" );\n        goto error;\n    }\n    inputParameters.suggestedLatency = deviceInfo->defaultLowInputLatency;\n    inputParameters.hostApiSpecificStreamInfo = NULL;\n    err = Pa_OpenStream(\n                &inputStream,\n                &inputParameters,\n                NULL,\n                SAMPLE_RATE,\n                FRAMES_PER_BUFFER,\n                0,\n                inputCallback,\n                &data );\n    if( err != paNoError ) goto error;\n\n    outputParameters.channelCount = 2;\n    outputParameters.sampleFormat = paInt16;\n    deviceInfo = Pa_GetDeviceInfo( outputParameters.device );\n    if( deviceInfo == NULL )\n    {\n        fprintf( stderr, \"No matching output device.\\n\" );\n        goto error;\n    }\n    outputParameters.suggestedLatency = deviceInfo->defaultLowOutputLatency;\n    outputParameters.hostApiSpecificStreamInfo = NULL;\n    err = Pa_OpenStream(\n                &outputStream,\n                NULL,\n                &outputParameters,\n                SAMPLE_RATE,\n                FRAMES_PER_BUFFER,\n                (paClipOff | paDitherOff),\n                outputCallback,\n                &data );\n    if( err != paNoError ) goto error;\n\n    err = Pa_StartStream( inputStream );\n    if( err != paNoError ) goto error;\n    err = Pa_StartStream( outputStream );\n    if( err != paNoError ) goto error;\n\n    printf(\"When you hear sound, unplug the USB device.\\n\");\n    do\n    {\n        Pa_Sleep(500);\n        printf(\"Frames remaining = %d\\n\", data.sampsToGo);\n        printf(\"Pa_IsStreamActive(inputStream) = %d\\n\", Pa_IsStreamActive(inputStream));\n        printf(\"Pa_IsStreamActive(outputStream) = %d\\n\", Pa_IsStreamActive(outputStream));\n    } while( Pa_IsStreamActive(inputStream) && Pa_IsStreamActive(outputStream) );\n\n    err = Pa_CloseStream( inputStream );\n    if( err != paNoError ) goto error;\n    err = Pa_CloseStream( outputStream );\n    if( err != paNoError ) goto error;\n    Pa_Terminate();\n    return paNoError;\nerror:\n    Pa_Terminate();\n    fprintf( stderr, \"An error occurred while using the portaudio stream\\n\" );\n    fprintf( stderr, \"Error number: %d\\n\", err );\n    fprintf( stderr, \"Error message: %s\\n\", Pa_GetErrorText( err ) );\n    fprintf( stderr, \"Host Error message: %s\\n\", Pa_GetLastHostErrorInfo()->errorText );\n    return err;\n}\n"
  },
  {
    "path": "thirdparty/portaudio/test/patest_wire.c",
    "content": "/** @file patest_wire.c\n    @ingroup test_src\n    @brief Pass input directly to output.\n\n    Note that some HW devices, for example many ISA audio cards\n    on PCs, do NOT support full duplex! For a PC, you normally need\n    a PCI based audio card such as the SBLive.\n\n    @author Phil Burk  http://www.softsynth.com\n\n While adapting to V19-API, I excluded configs with framesPerCallback=0\n because of an assert in file pa_common/pa_process.c. Pieter, Oct 9, 2003.\n\n*/\n/*\n * $Id$\n *\n * This program uses the PortAudio Portable Audio Library.\n * For more information see: http://www.portaudio.com\n * Copyright (c) 1999-2000 Ross Bencina and Phil Burk\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n#include <stdio.h>\n#include <math.h>\n#include \"portaudio.h\"\n\n#define SAMPLE_RATE            (44100)\n\ntypedef struct WireConfig_s\n{\n    int isInputInterleaved;\n    int isOutputInterleaved;\n    int numInputChannels;\n    int numOutputChannels;\n    int framesPerCallback;\n    /* count status flags */\n    int numInputUnderflows;\n    int numInputOverflows;\n    int numOutputUnderflows;\n    int numOutputOverflows;\n    int numPrimingOutputs;\n    int numCallbacks;\n} WireConfig_t;\n\n#define USE_FLOAT_INPUT        (1)\n#define USE_FLOAT_OUTPUT       (1)\n\n/* Latencies set to defaults. */\n\n#if USE_FLOAT_INPUT\n    #define INPUT_FORMAT  paFloat32\n    typedef float INPUT_SAMPLE;\n#else\n    #define INPUT_FORMAT  paInt16\n    typedef short INPUT_SAMPLE;\n#endif\n\n#if USE_FLOAT_OUTPUT\n    #define OUTPUT_FORMAT  paFloat32\n    typedef float OUTPUT_SAMPLE;\n#else\n    #define OUTPUT_FORMAT  paInt16\n    typedef short OUTPUT_SAMPLE;\n#endif\n\ndouble gInOutScaler = 1.0;\n#define CONVERT_IN_TO_OUT(in)  ((OUTPUT_SAMPLE) ((in) * gInOutScaler))\n\n#define INPUT_DEVICE           (Pa_GetDefaultInputDevice())\n#define OUTPUT_DEVICE          (Pa_GetDefaultOutputDevice())\n\nstatic PaError TestConfiguration( WireConfig_t *config );\n\nstatic int wireCallback( const void *inputBuffer, void *outputBuffer,\n                         unsigned long framesPerBuffer,\n                         const PaStreamCallbackTimeInfo* timeInfo,\n                         PaStreamCallbackFlags statusFlags,\n                         void *userData );\n\n/* This routine will be called by the PortAudio engine when audio is needed.\n** It may be called at interrupt level on some machines so don't do anything\n** that could mess up the system like calling malloc() or free().\n*/\n\nstatic int wireCallback( const void *inputBuffer, void *outputBuffer,\n                         unsigned long framesPerBuffer,\n                         const PaStreamCallbackTimeInfo* timeInfo,\n                         PaStreamCallbackFlags statusFlags,\n                         void *userData )\n{\n    INPUT_SAMPLE *in;\n    OUTPUT_SAMPLE *out;\n    int inStride;\n    int outStride;\n    int inDone = 0;\n    int outDone = 0;\n    WireConfig_t *config = (WireConfig_t *) userData;\n    unsigned int i;\n    int inChannel, outChannel;\n\n    /* This may get called with NULL inputBuffer during initial setup. */\n    if( inputBuffer == NULL) return 0;\n\n    /* Count flags */\n    if( (statusFlags & paInputUnderflow) != 0 ) config->numInputUnderflows += 1;\n    if( (statusFlags & paInputOverflow) != 0 ) config->numInputOverflows += 1;\n    if( (statusFlags & paOutputUnderflow) != 0 ) config->numOutputUnderflows += 1;\n    if( (statusFlags & paOutputOverflow) != 0 ) config->numOutputOverflows += 1;\n    if( (statusFlags & paPrimingOutput) != 0 ) config->numPrimingOutputs += 1;\n    config->numCallbacks += 1;\n\n    inChannel=0, outChannel=0;\n    while( !(inDone && outDone) )\n    {\n        if( config->isInputInterleaved )\n        {\n            in = ((INPUT_SAMPLE*)inputBuffer) + inChannel;\n            inStride = config->numInputChannels;\n        }\n        else\n        {\n            in = ((INPUT_SAMPLE**)inputBuffer)[inChannel];\n            inStride = 1;\n        }\n\n        if( config->isOutputInterleaved )\n        {\n            out = ((OUTPUT_SAMPLE*)outputBuffer) + outChannel;\n            outStride = config->numOutputChannels;\n        }\n        else\n        {\n            out = ((OUTPUT_SAMPLE**)outputBuffer)[outChannel];\n            outStride = 1;\n        }\n\n        for( i=0; i<framesPerBuffer; i++ )\n        {\n            *out = CONVERT_IN_TO_OUT( *in );\n            out += outStride;\n            in += inStride;\n        }\n\n        if(inChannel < (config->numInputChannels - 1)) inChannel++;\n        else inDone = 1;\n        if(outChannel < (config->numOutputChannels - 1)) outChannel++;\n        else outDone = 1;\n    }\n    return 0;\n}\n\n/*******************************************************************/\nint main(void);\nint main(void)\n{\n    PaError err = paNoError;\n    WireConfig_t CONFIG;\n    WireConfig_t *config = &CONFIG;\n    int configIndex = 0;;\n\n    err = Pa_Initialize();\n    if( err != paNoError ) goto error;\n\n    printf(\"Please connect audio signal to input and listen for it on output!\\n\");\n    printf(\"input format = %lu\\n\", INPUT_FORMAT );\n    printf(\"output format = %lu\\n\", OUTPUT_FORMAT );\n    printf(\"input device ID  = %d\\n\", INPUT_DEVICE );\n    printf(\"output device ID = %d\\n\", OUTPUT_DEVICE );\n\n    if( INPUT_FORMAT == OUTPUT_FORMAT )\n    {\n        gInOutScaler = 1.0;\n    }\n    else if( (INPUT_FORMAT == paInt16) && (OUTPUT_FORMAT == paFloat32) )\n    {\n        gInOutScaler = 1.0/32768.0;\n    }\n    else if( (INPUT_FORMAT == paFloat32) && (OUTPUT_FORMAT == paInt16) )\n    {\n        gInOutScaler = 32768.0;\n    }\n\n    for( config->isInputInterleaved = 0; config->isInputInterleaved < 2; config->isInputInterleaved++ )\n    {\n        for( config->isOutputInterleaved = 0; config->isOutputInterleaved < 2; config->isOutputInterleaved++ )\n        {\n            for( config->numInputChannels = 1; config->numInputChannels < 3; config->numInputChannels++ )\n            {\n                for( config->numOutputChannels = 1; config->numOutputChannels < 3; config->numOutputChannels++ )\n                {\n                           /* If framesPerCallback = 0, assertion fails in file pa_common/pa_process.c, line 1413: EX. */\n                    for( config->framesPerCallback = 64; config->framesPerCallback < 129; config->framesPerCallback += 64 )\n                    {\n                        printf(\"-----------------------------------------------\\n\" );\n                        printf(\"Configuration #%d\\n\", configIndex++ );\n                        err = TestConfiguration( config );\n                        /* Give user a chance to bail out. */\n                        if( err == 1 )\n                        {\n                            err = paNoError;\n                            goto done;\n                        }\n                        else if( err != paNoError ) goto error;\n                    }\n                }\n            }\n        }\n    }\n\ndone:\n    Pa_Terminate();\n    printf(\"Full duplex sound test complete.\\n\"); fflush(stdout);\n    printf(\"Hit ENTER to quit.\\n\");  fflush(stdout);\n    getchar();\n    return 0;\n\nerror:\n    Pa_Terminate();\n    fprintf( stderr, \"An error occurred while using the portaudio stream\\n\" );\n    fprintf( stderr, \"Error number: %d\\n\", err );\n    fprintf( stderr, \"Error message: %s\\n\", Pa_GetErrorText( err ) );\n    printf(\"Hit ENTER to quit.\\n\");  fflush(stdout);\n    getchar();\n    return -1;\n}\n\nstatic PaError TestConfiguration( WireConfig_t *config )\n{\n    int c;\n    PaError err = paNoError;\n    PaStream *stream;\n    PaStreamParameters inputParameters, outputParameters;\n\n    printf(\"input %sinterleaved!\\n\", (config->isInputInterleaved ? \" \" : \"NOT \") );\n    printf(\"output %sinterleaved!\\n\", (config->isOutputInterleaved ? \" \" : \"NOT \") );\n    printf(\"input channels = %d\\n\", config->numInputChannels );\n    printf(\"output channels = %d\\n\", config->numOutputChannels );\n    printf(\"framesPerCallback = %d\\n\", config->framesPerCallback );\n\n    inputParameters.device = INPUT_DEVICE;              /* default input device */\n    if (inputParameters.device == paNoDevice) {\n        fprintf(stderr,\"Error: No default input device.\\n\");\n        goto error;\n    }\n    inputParameters.channelCount = config->numInputChannels;\n    inputParameters.sampleFormat = INPUT_FORMAT | (config->isInputInterleaved ? 0 : paNonInterleaved);\n    inputParameters.suggestedLatency = Pa_GetDeviceInfo( inputParameters.device )->defaultLowInputLatency;\n    inputParameters.hostApiSpecificStreamInfo = NULL;\n\n    outputParameters.device = OUTPUT_DEVICE;            /* default output device */\n    if (outputParameters.device == paNoDevice) {\n        fprintf(stderr,\"Error: No default output device.\\n\");\n        goto error;\n    }\n    outputParameters.channelCount = config->numOutputChannels;\n    outputParameters.sampleFormat = OUTPUT_FORMAT | (config->isOutputInterleaved ? 0 : paNonInterleaved);\n    outputParameters.suggestedLatency = Pa_GetDeviceInfo( outputParameters.device )->defaultLowOutputLatency;\n    outputParameters.hostApiSpecificStreamInfo = NULL;\n\n    config->numInputUnderflows = 0;\n    config->numInputOverflows = 0;\n    config->numOutputUnderflows = 0;\n    config->numOutputOverflows = 0;\n    config->numPrimingOutputs = 0;\n    config->numCallbacks = 0;\n\n    err = Pa_OpenStream(\n              &stream,\n              &inputParameters,\n              &outputParameters,\n              SAMPLE_RATE,\n              config->framesPerCallback, /* frames per buffer */\n              paClipOff, /* we won't output out of range samples so don't bother clipping them */\n              wireCallback,\n              config );\n    if( err != paNoError ) goto error;\n\n    err = Pa_StartStream( stream );\n    if( err != paNoError ) goto error;\n\n    printf(\"Now recording and playing. - Hit ENTER for next configuration, or 'q' to quit.\\n\");  fflush(stdout);\n    c = getchar();\n\n    printf(\"Closing stream.\\n\");\n    err = Pa_CloseStream( stream );\n    if( err != paNoError ) goto error;\n\n#define CHECK_FLAG_COUNT(member) \\\n    if( config->member > 0 ) printf(\"FLAGS SET: \" #member \" = %d\\n\", config->member );\n    CHECK_FLAG_COUNT( numInputUnderflows );\n    CHECK_FLAG_COUNT( numInputOverflows );\n    CHECK_FLAG_COUNT( numOutputUnderflows );\n    CHECK_FLAG_COUNT( numOutputOverflows );\n    CHECK_FLAG_COUNT( numPrimingOutputs );\n    printf(\"number of callbacks = %d\\n\", config->numCallbacks );\n\n    if( c == 'q' ) return 1;\n\nerror:\n    return err;\n}\n"
  },
  {
    "path": "thirdparty/portaudio/test/patest_wmme_find_best_latency_params.c",
    "content": "/*\n * $Id: $\n * Portable Audio I/O Library\n * Windows MME low level buffer user guided parameters search\n *\n * Copyright (c) 2010 Ross Bencina\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n#include <stdio.h>\n#include <time.h>\n#include <math.h>\n\n#define  _WIN32_WINNT 0x0501 /* for GetNativeSystemInfo */\n#include <windows.h>    /* required when using pa_win_wmme.h */\n#include <mmsystem.h>   /* required when using pa_win_wmme.h */\n\n#include <conio.h>      /* for _getch */\n\n\n#include \"portaudio.h\"\n#include \"pa_win_wmme.h\"\n\n\n#define DEFAULT_SAMPLE_RATE             (44100.)\n\n#ifndef M_PI\n#define M_PI  (3.14159265)\n#endif\n\n#define TABLE_SIZE              (2048)\n\n#define CHANNEL_COUNT           (2)\n\n\n/* search parameters. we test all buffer counts in this range */\n#define MIN_WMME_BUFFER_COUNT        (2)\n#define MAX_WMME_BUFFER_COUNT        (12)\n\n\n/*******************************************************************/\n/* functions to query and print Windows version information */\n\ntypedef BOOL (WINAPI *LPFN_ISWOW64PROCESS) (HANDLE, PBOOL);\n\nLPFN_ISWOW64PROCESS fnIsWow64Process;\n\nstatic BOOL IsWow64()\n{\n    BOOL bIsWow64 = FALSE;\n\n    //IsWow64Process is not available on all supported versions of Windows.\n    //Use GetModuleHandle to get a handle to the DLL that contains the function\n    //and GetProcAddress to get a pointer to the function if available.\n\n    fnIsWow64Process = (LPFN_ISWOW64PROCESS) GetProcAddress(\n        GetModuleHandle(TEXT(\"kernel32\")),\"IsWow64Process\" );\n\n    if(NULL != fnIsWow64Process)\n    {\n        if (!fnIsWow64Process(GetCurrentProcess(),&bIsWow64))\n        {\n            //handle error\n        }\n    }\n    return bIsWow64;\n}\n\nstatic void printWindowsVersionInfo( FILE *fp )\n{\n    OSVERSIONINFOEX osVersionInfoEx;\n    SYSTEM_INFO systemInfo;\n    const char *osName = \"Unknown\";\n    const char *osProductType = \"\";\n    const char *processorArchitecture = \"Unknown\";\n\n    memset( &osVersionInfoEx, 0, sizeof(OSVERSIONINFOEX) );\n    osVersionInfoEx.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX);\n    GetVersionEx( &osVersionInfoEx );\n\n\n    if( osVersionInfoEx.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS ){\n        switch( osVersionInfoEx.dwMinorVersion ){\n            case 0: osName = \"Windows 95\"; break;\n            case 10: osName = \"Windows 98\"; break;  // could also be 98SE (I've seen code discriminate based\n                                                    // on osInfo.Version.Revision.ToString() == \"2222A\")\n            case 90: osName = \"Windows Me\"; break;\n        }\n    }else if( osVersionInfoEx.dwPlatformId == VER_PLATFORM_WIN32_NT ){\n        switch( osVersionInfoEx.dwMajorVersion ){\n            case 3: osName = \"Windows NT 3.51\"; break;\n            case 4: osName = \"Windows NT 4.0\"; break;\n            case 5: switch( osVersionInfoEx.dwMinorVersion ){\n                        case 0: osName = \"Windows 2000\"; break;\n                        case 1: osName = \"Windows XP\"; break;\n                        case 2:\n                            if( osVersionInfoEx.wSuiteMask & 0x00008000 /*VER_SUITE_WH_SERVER*/ ){\n                                osName = \"Windows Home Server\";\n                            }else{\n                                if( osVersionInfoEx.wProductType == VER_NT_WORKSTATION ){\n                                    osName = \"Windows XP Professional x64 Edition (?)\";\n                                }else{\n                                    if( GetSystemMetrics(/*SM_SERVERR2*/89) == 0 )\n                                        osName = \"Windows Server 2003\";\n                                    else\n                                        osName = \"Windows Server 2003 R2\";\n                                }\n                            }break;\n                    }break;\n            case 6:switch( osVersionInfoEx.dwMinorVersion ){\n                        case 0:\n                            if( osVersionInfoEx.wProductType == VER_NT_WORKSTATION )\n                                osName = \"Windows Vista\";\n                            else\n                                osName = \"Windows Server 2008\";\n                            break;\n                        case 1:\n                            if( osVersionInfoEx.wProductType == VER_NT_WORKSTATION )\n                                osName = \"Windows 7\";\n                            else\n                                osName = \"Windows Server 2008 R2\";\n                            break;\n                    }break;\n        }\n    }\n\n    if(osVersionInfoEx.dwMajorVersion == 4)\n    {\n        if(osVersionInfoEx.wProductType == VER_NT_WORKSTATION)\n            osProductType = \"Workstation\";\n        else if(osVersionInfoEx.wProductType == VER_NT_SERVER)\n            osProductType = \"Server\";\n    }\n    else if(osVersionInfoEx.dwMajorVersion == 5)\n    {\n        if(osVersionInfoEx.wProductType == VER_NT_WORKSTATION)\n        {\n            if((osVersionInfoEx.wSuiteMask & VER_SUITE_PERSONAL) == VER_SUITE_PERSONAL)\n                osProductType = \"Home Edition\"; // Windows XP Home Edition\n            else\n                osProductType = \"Professional\"; // Windows XP / Windows 2000 Professional\n        }\n        else if(osVersionInfoEx.wProductType == VER_NT_SERVER)\n        {\n            if(osVersionInfoEx.dwMinorVersion == 0)\n            {\n                if((osVersionInfoEx.wSuiteMask & VER_SUITE_DATACENTER) == VER_SUITE_DATACENTER)\n                    osProductType = \"Datacenter Server\"; // Windows 2000 Datacenter Server\n                else if((osVersionInfoEx.wSuiteMask & VER_SUITE_ENTERPRISE) == VER_SUITE_ENTERPRISE)\n                    osProductType = \"Advanced Server\"; // Windows 2000 Advanced Server\n                else\n                    osProductType = \"Server\"; // Windows 2000 Server\n            }\n        }\n        else\n        {\n            if((osVersionInfoEx.wSuiteMask & VER_SUITE_DATACENTER) == VER_SUITE_DATACENTER)\n                osProductType = \"Datacenter Edition\"; // Windows Server 2003 Datacenter Edition\n            else if((osVersionInfoEx.wSuiteMask & VER_SUITE_ENTERPRISE) == VER_SUITE_ENTERPRISE)\n                osProductType = \"Enterprise Edition\"; // Windows Server 2003 Enterprise Edition\n            else if((osVersionInfoEx.wSuiteMask & VER_SUITE_BLADE) == VER_SUITE_BLADE)\n                osProductType = \"Web Edition\"; // Windows Server 2003 Web Edition\n            else\n                osProductType = \"Standard Edition\"; // Windows Server 2003 Standard Edition\n        }\n    }\n\n    memset( &systemInfo, 0, sizeof(SYSTEM_INFO) );\n    GetNativeSystemInfo( &systemInfo );\n\n    if( systemInfo.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_INTEL )\n        processorArchitecture = \"x86\";\n    else if( systemInfo.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64 )\n        processorArchitecture = \"x64\";\n    else if( systemInfo.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_IA64 )\n        processorArchitecture = \"Itanium\";\n\n\n    fprintf( fp, \"OS name and edition: %s %s\\n\", osName, osProductType );\n    fprintf( fp, \"OS version: %d.%d.%d %S\\n\",\n                osVersionInfoEx.dwMajorVersion, osVersionInfoEx.dwMinorVersion,\n                osVersionInfoEx.dwBuildNumber, osVersionInfoEx.szCSDVersion );\n    fprintf( fp, \"Processor architecture: %s\\n\", processorArchitecture );\n    fprintf( fp, \"WoW64 process: %s\\n\", IsWow64() ? \"Yes\" : \"No\" );\n}\n\nstatic void printTimeAndDate( FILE *fp )\n{\n    struct tm *local;\n    time_t t;\n\n    t = time(NULL);\n    local = localtime(&t);\n    fprintf(fp, \"Local time and date: %s\", asctime(local));\n    local = gmtime(&t);\n    fprintf(fp, \"UTC time and date: %s\", asctime(local));\n}\n\n/*******************************************************************/\n\ntypedef struct\n{\n    float sine[TABLE_SIZE];\n    double phase;\n    double phaseIncrement;\n    volatile int fadeIn;\n    volatile int fadeOut;\n    double amp;\n}\npaTestData;\n\nstatic paTestData data;\n\n/* This routine will be called by the PortAudio engine when audio is needed.\n** It may called at interrupt level on some machines so don't do anything\n** that could mess up the system like calling malloc() or free().\n*/\nstatic int patestCallback( const void *inputBuffer, void *outputBuffer,\n                            unsigned long framesPerBuffer,\n                            const PaStreamCallbackTimeInfo* timeInfo,\n                            PaStreamCallbackFlags statusFlags,\n                            void *userData )\n{\n    paTestData *data = (paTestData*)userData;\n    float *out = (float*)outputBuffer;\n    unsigned long i,j;\n\n    (void) timeInfo; /* Prevent unused variable warnings. */\n    (void) statusFlags;\n    (void) inputBuffer;\n\n    for( i=0; i<framesPerBuffer; i++ )\n    {\n        float x = data->sine[(int)data->phase];\n        data->phase += data->phaseIncrement;\n        if( data->phase >= TABLE_SIZE ){\n            data->phase -= TABLE_SIZE;\n        }\n\n        x *= data->amp;\n        if( data->fadeIn ){\n            data->amp += .001;\n            if( data->amp >= 1. )\n                data->fadeIn = 0;\n        }else if( data->fadeOut ){\n            if( data->amp > 0 )\n                data->amp -= .001;\n        }\n\n        for( j = 0; j < CHANNEL_COUNT; ++j ){\n            *out++ = x;\n        }\n    }\n\n    if( data->amp > 0 )\n        return paContinue;\n    else\n        return paComplete;\n}\n\n\n#define YES     1\n#define NO      0\n\n\nstatic int playUntilKeyPress( int deviceIndex, float sampleRate,\n                             int framesPerUserBuffer, int framesPerWmmeBuffer, int wmmeBufferCount )\n{\n    PaStreamParameters outputParameters;\n    PaWinMmeStreamInfo wmmeStreamInfo;\n    PaStream *stream;\n    PaError err;\n    int c;\n\n    outputParameters.device = deviceIndex;\n    outputParameters.channelCount = CHANNEL_COUNT;\n    outputParameters.sampleFormat = paFloat32; /* 32 bit floating point processing */\n    outputParameters.suggestedLatency = 0; /*Pa_GetDeviceInfo( outputParameters.device )->defaultLowOutputLatency;*/\n    outputParameters.hostApiSpecificStreamInfo = NULL;\n\n    wmmeStreamInfo.size = sizeof(PaWinMmeStreamInfo);\n    wmmeStreamInfo.hostApiType = paMME;\n    wmmeStreamInfo.version = 1;\n    wmmeStreamInfo.flags = paWinMmeUseLowLevelLatencyParameters | paWinMmeDontThrottleOverloadedProcessingThread;\n    wmmeStreamInfo.framesPerBuffer = framesPerWmmeBuffer;\n    wmmeStreamInfo.bufferCount = wmmeBufferCount;\n    outputParameters.hostApiSpecificStreamInfo = &wmmeStreamInfo;\n\n    err = Pa_OpenStream(\n              &stream,\n              NULL, /* no input */\n              &outputParameters,\n              sampleRate,\n              framesPerUserBuffer,\n              paClipOff | paPrimeOutputBuffersUsingStreamCallback,      /* we won't output out of range samples so don't bother clipping them */\n              patestCallback,\n              &data );\n    if( err != paNoError ) goto error;\n\n    data.amp = 0;\n    data.fadeIn = 1;\n    data.fadeOut = 0;\n    data.phase = 0;\n    data.phaseIncrement = 15 + ((rand()%100) / 10); // randomise pitch\n\n    err = Pa_StartStream( stream );\n    if( err != paNoError ) goto error;\n\n\n    do{\n        printf( \"Trying buffer size %d.\\nIf it sounds smooth (without clicks or glitches) press 'y', if it sounds bad press 'n' ('q' to quit)\\n\", framesPerWmmeBuffer );\n        c = tolower(_getch());\n        if( c == 'q' ){\n            Pa_Terminate();\n            exit(0);\n        }\n    }while( c != 'y' && c != 'n' );\n\n    data.fadeOut = 1;\n    while( Pa_IsStreamActive(stream) == 1 )\n        Pa_Sleep( 100 );\n\n    err = Pa_StopStream( stream );\n    if( err != paNoError ) goto error;\n\n    err = Pa_CloseStream( stream );\n    if( err != paNoError ) goto error;\n\n    return (c == 'y') ? YES : NO;\n\nerror:\n    return err;\n}\n\n/*******************************************************************/\nstatic void usage( int wmmeHostApiIndex )\n{\n    int i;\n\n    fprintf( stderr, \"PortAudio WMME output latency user guided test\\n\" );\n    fprintf( stderr, \"Usage: x.exe mme-device-index [sampleRate [min-buffer-count max-buffer-count]]\\n\" );\n    fprintf( stderr, \"Invalid device index. Use one of these:\\n\" );\n    for( i=0; i < Pa_GetDeviceCount(); ++i ){\n\n        if( Pa_GetDeviceInfo(i)->hostApi == wmmeHostApiIndex && Pa_GetDeviceInfo(i)->maxOutputChannels > 0  )\n            fprintf( stderr, \"%d (%s)\\n\", i, Pa_GetDeviceInfo(i)->name );\n    }\n    Pa_Terminate();\n    exit(-1);\n}\n\n/*\n    ideas:\n        o- could be testing with 80% CPU load\n        o- could test with different channel counts\n*/\n\nint main(int argc, char* argv[])\n{\n    PaError err;\n    int i;\n    int deviceIndex;\n    int wmmeBufferCount, wmmeBufferSize, smallestWorkingBufferSize;\n    int smallestWorkingBufferingLatencyFrames;\n    int min, max, mid;\n    int testResult;\n    FILE *resultsFp;\n    int wmmeHostApiIndex;\n    const PaHostApiInfo *wmmeHostApiInfo;\n    double sampleRate = DEFAULT_SAMPLE_RATE;\n    int wmmeMinBufferCount = MIN_WMME_BUFFER_COUNT;\n    int wmmeMaxBufferCount = MAX_WMME_BUFFER_COUNT;\n\n    err = Pa_Initialize();\n    if( err != paNoError ) goto error;\n\n    wmmeHostApiIndex = Pa_HostApiTypeIdToHostApiIndex( paMME );\n    wmmeHostApiInfo = Pa_GetHostApiInfo( wmmeHostApiIndex );\n\n    if( argc > 5 )\n        usage(wmmeHostApiIndex);\n\n    deviceIndex = wmmeHostApiInfo->defaultOutputDevice;\n    if( argc >= 2 ){\n        deviceIndex = -1;\n        if( sscanf( argv[1], \"%d\", &deviceIndex ) != 1 )\n            usage(wmmeHostApiIndex);\n        if( deviceIndex < 0 || deviceIndex >= Pa_GetDeviceCount() || Pa_GetDeviceInfo(deviceIndex)->hostApi != wmmeHostApiIndex ){\n            usage(wmmeHostApiIndex);\n        }\n    }\n\n    printf( \"Using device id %d (%s)\\n\", deviceIndex, Pa_GetDeviceInfo(deviceIndex)->name );\n\n    if( argc >= 3 ){\n        if( sscanf( argv[2], \"%lf\", &sampleRate ) != 1 )\n            usage(wmmeHostApiIndex);\n    }\n\n    printf( \"Testing with sample rate %f.\\n\", (float)sampleRate );\n\n    if( argc == 4 ){\n        if( sscanf( argv[3], \"%d\", &wmmeMinBufferCount ) != 1 )\n            usage(wmmeHostApiIndex);\n        wmmeMaxBufferCount = wmmeMinBufferCount;\n    }\n\n    if( argc == 5 ){\n        if( sscanf( argv[3], \"%d\", &wmmeMinBufferCount ) != 1 )\n            usage(wmmeHostApiIndex);\n        if( sscanf( argv[4], \"%d\", &wmmeMaxBufferCount ) != 1 )\n            usage(wmmeHostApiIndex);\n    }\n\n    printf( \"Testing buffer counts from %d to %d\\n\", wmmeMinBufferCount, wmmeMaxBufferCount );\n\n\n    /* initialise sinusoidal wavetable */\n    for( i=0; i<TABLE_SIZE; i++ )\n    {\n        data.sine[i] = (float) sin( ((double)i/(double)TABLE_SIZE) * M_PI * 2. );\n    }\n\n    data.phase = 0;\n\n    resultsFp = fopen( \"results.txt\", \"at\" );\n    fprintf( resultsFp, \"*** WMME smallest working output buffer sizes\\n\" );\n\n    printTimeAndDate( resultsFp );\n    printWindowsVersionInfo( resultsFp );\n\n    fprintf( resultsFp, \"audio device: %s\\n\", Pa_GetDeviceInfo( deviceIndex )->name );\n    fflush( resultsFp );\n\n    fprintf( resultsFp, \"Sample rate: %f\\n\", (float)sampleRate );\n    fprintf( resultsFp, \"Buffer count, Smallest working buffer size (frames), Smallest working buffering latency (frames), Smallest working buffering latency (Seconds)\\n\" );\n\n    for( wmmeBufferCount = wmmeMinBufferCount; wmmeBufferCount <= wmmeMaxBufferCount; ++wmmeBufferCount ){\n\n        printf( \"Test %d of %d\\n\", (wmmeBufferCount - wmmeMinBufferCount) + 1, (wmmeMaxBufferCount-wmmeMinBufferCount) + 1 );\n        printf( \"Testing with %d buffers...\\n\", wmmeBufferCount );\n\n        /*\n            Binary search after Niklaus Wirth\n            from http://en.wikipedia.org/wiki/Binary_search_algorithm#The_algorithm\n         */\n        min = 1;\n        max = (int)((sampleRate * .3) / (wmmeBufferCount-1)); //8192;    /* we assume that this size works 300ms */\n        smallestWorkingBufferSize = 0;\n\n        do{\n            mid = min + ((max - min) / 2);\n\n            wmmeBufferSize = mid;\n            testResult = playUntilKeyPress( deviceIndex, sampleRate, wmmeBufferSize, wmmeBufferSize, wmmeBufferCount );\n\n            if( testResult == YES ){\n                max = mid - 1;\n                smallestWorkingBufferSize = wmmeBufferSize;\n            }else{\n                min = mid + 1;\n            }\n\n        }while( (min <= max) && (testResult == YES || testResult == NO) );\n\n        smallestWorkingBufferingLatencyFrames = smallestWorkingBufferSize * (wmmeBufferCount - 1);\n\n        printf( \"Smallest working buffer size for %d buffers is: %d\\n\", wmmeBufferCount, smallestWorkingBufferSize );\n        printf( \"Corresponding to buffering latency of %d frames, or %f seconds.\\n\", smallestWorkingBufferingLatencyFrames, smallestWorkingBufferingLatencyFrames / sampleRate );\n\n        fprintf( resultsFp, \"%d, %d, %d, %f\\n\", wmmeBufferCount, smallestWorkingBufferSize, smallestWorkingBufferingLatencyFrames, smallestWorkingBufferingLatencyFrames / sampleRate );\n        fflush( resultsFp );\n    }\n\n    fprintf( resultsFp, \"###\\n\" );\n    fclose( resultsFp );\n\n    Pa_Terminate();\n    printf(\"Test finished.\\n\");\n\n    return err;\nerror:\n    Pa_Terminate();\n    fprintf( stderr, \"An error occurred while using the portaudio stream\\n\" );\n    fprintf( stderr, \"Error number: %d\\n\", err );\n    fprintf( stderr, \"Error message: %s\\n\", Pa_GetErrorText( err ) );\n    return err;\n}\n"
  },
  {
    "path": "thirdparty/portaudio/test/patest_wmme_low_level_latency_params.c",
    "content": "/*\n * $Id: $\n * Portable Audio I/O Library\n * Windows MME low level buffer parameters test\n *\n * Copyright (c) 2007 Ross Bencina\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n#include <stdio.h>\n#include <math.h>\n\n#include <windows.h>    /* required when using pa_win_wmme.h */\n#include <mmsystem.h>   /* required when using pa_win_wmme.h */\n\n#include \"portaudio.h\"\n#include \"pa_win_wmme.h\"\n\n#define NUM_SECONDS         (6)\n#define SAMPLE_RATE         (44100)\n\n#define WMME_FRAMES_PER_BUFFER  (440)\n#define WMME_BUFFER_COUNT       (6)\n\n#define FRAMES_PER_BUFFER   WMME_FRAMES_PER_BUFFER /* hardwire portaudio callback buffer size to WMME buffer size for this test */\n\n#ifndef M_PI\n#define M_PI  (3.14159265)\n#endif\n\n#define TABLE_SIZE          (2048)\n\n#define CHANNEL_COUNT       (2)\n\n\ntypedef struct\n{\n    float sine[TABLE_SIZE];\n    double phase;\n}\npaTestData;\n\n/* This routine will be called by the PortAudio engine when audio is needed.\n** It may called at interrupt level on some machines so don't do anything\n** that could mess up the system like calling malloc() or free().\n*/\nstatic int patestCallback( const void *inputBuffer, void *outputBuffer,\n                            unsigned long framesPerBuffer,\n                            const PaStreamCallbackTimeInfo* timeInfo,\n                            PaStreamCallbackFlags statusFlags,\n                            void *userData )\n{\n    paTestData *data = (paTestData*)userData;\n    float *out = (float*)outputBuffer;\n    unsigned long i,j;\n\n    (void) timeInfo; /* Prevent unused variable warnings. */\n    (void) statusFlags;\n    (void) inputBuffer;\n\n    for( i=0; i<framesPerBuffer; i++ )\n    {\n        float x = data->sine[(int)data->phase];\n        data->phase += 20;\n        if( data->phase >= TABLE_SIZE ){\n            data->phase -= TABLE_SIZE;\n        }\n\n        for( j = 0; j < CHANNEL_COUNT; ++j ){\n            *out++ = x;\n        }\n    }\n\n    return paContinue;\n}\n\n/*******************************************************************/\nint main(int argc, char* argv[])\n{\n    PaStreamParameters outputParameters;\n    PaWinMmeStreamInfo wmmeStreamInfo;\n    PaStream *stream;\n    PaError err;\n    paTestData data;\n    int i;\n    int deviceIndex;\n\n    printf(\"PortAudio Test: output a sine blip on each channel. SR = %d, BufSize = %d, Chans = %d\\n\", SAMPLE_RATE, FRAMES_PER_BUFFER, CHANNEL_COUNT);\n\n    err = Pa_Initialize();\n    if( err != paNoError ) goto error;\n\n    deviceIndex = Pa_GetHostApiInfo( Pa_HostApiTypeIdToHostApiIndex( paMME ) )->defaultOutputDevice;\n    if( argc == 2 ){\n        sscanf( argv[1], \"%d\", &deviceIndex );\n    }\n\n    printf( \"using device id %d (%s)\\n\", deviceIndex, Pa_GetDeviceInfo(deviceIndex)->name );\n\n    /* initialise sinusoidal wavetable */\n    for( i=0; i<TABLE_SIZE; i++ )\n    {\n        data.sine[i] = (float) sin( ((double)i/(double)TABLE_SIZE) * M_PI * 2. );\n    }\n\n    data.phase = 0;\n\n    outputParameters.device = deviceIndex;\n    outputParameters.channelCount = CHANNEL_COUNT;\n    outputParameters.sampleFormat = paFloat32; /* 32 bit floating point processing */\n    outputParameters.suggestedLatency = 0; /*Pa_GetDeviceInfo( outputParameters.device )->defaultLowOutputLatency;*/\n    outputParameters.hostApiSpecificStreamInfo = NULL;\n\n    wmmeStreamInfo.size = sizeof(PaWinMmeStreamInfo);\n    wmmeStreamInfo.hostApiType = paMME;\n    wmmeStreamInfo.version = 1;\n    wmmeStreamInfo.flags = paWinMmeUseLowLevelLatencyParameters | paWinMmeDontThrottleOverloadedProcessingThread;\n    wmmeStreamInfo.framesPerBuffer = WMME_FRAMES_PER_BUFFER;\n    wmmeStreamInfo.bufferCount = WMME_BUFFER_COUNT;\n    outputParameters.hostApiSpecificStreamInfo = &wmmeStreamInfo;\n\n\n    if( Pa_IsFormatSupported( 0, &outputParameters, SAMPLE_RATE ) == paFormatIsSupported  ){\n        printf( \"Pa_IsFormatSupported reports device will support %d channels.\\n\", CHANNEL_COUNT );\n    }else{\n        printf( \"Pa_IsFormatSupported reports device will not support %d channels.\\n\", CHANNEL_COUNT );\n    }\n\n    err = Pa_OpenStream(\n              &stream,\n              NULL, /* no input */\n              &outputParameters,\n              SAMPLE_RATE,\n              FRAMES_PER_BUFFER,\n              paClipOff,      /* we won't output out of range samples so don't bother clipping them */\n              patestCallback,\n              &data );\n    if( err != paNoError ) goto error;\n\n    err = Pa_StartStream( stream );\n    if( err != paNoError ) goto error;\n\n    printf(\"Play for %d seconds.\\n\", NUM_SECONDS );\n    Pa_Sleep( NUM_SECONDS * 1000 );\n\n    err = Pa_StopStream( stream );\n    if( err != paNoError ) goto error;\n\n    err = Pa_CloseStream( stream );\n    if( err != paNoError ) goto error;\n\n    Pa_Terminate();\n    printf(\"Test finished.\\n\");\n\n    return err;\nerror:\n    Pa_Terminate();\n    fprintf( stderr, \"An error occurred while using the portaudio stream\\n\" );\n    fprintf( stderr, \"Error number: %d\\n\", err );\n    fprintf( stderr, \"Error message: %s\\n\", Pa_GetErrorText( err ) );\n    return err;\n}\n"
  },
  {
    "path": "thirdparty/portaudio/test/patest_write_stop.c",
    "content": "/** @file patest_write_stop.c\n    @brief Play a few seconds of silence followed by a few cycles of a sine wave. Tests to make sure that pa_StopStream() completes playback in blocking I/O\n    @author Bjorn Roche of XO Audio (www.xoaudio.com)\n    @author Ross Bencina\n    @author Phil Burk\n*/\n/*\n * $Id$\n *\n * This program uses the PortAudio Portable Audio Library.\n * For more information see: http://www.portaudio.com/\n * Copyright (c) 1999-2000 Ross Bencina and Phil Burk\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n#include <stdio.h>\n#include <math.h>\n#include \"portaudio.h\"\n\n#define NUM_SECONDS         (5)\n#define SAMPLE_RATE         (44100)\n#define FRAMES_PER_BUFFER   (1024)\n\n#ifndef M_PI\n#define M_PI  (3.14159265)\n#endif\n\n#define TABLE_SIZE   (200)\n\n\nint main(void);\nint main(void)\n{\n    PaStreamParameters outputParameters;\n    PaStream *stream;\n    PaError err;\n    float buffer[FRAMES_PER_BUFFER][2]; /* stereo output buffer */\n    float sine[TABLE_SIZE]; /* sine wavetable */\n    int left_phase = 0;\n    int right_phase = 0;\n    int left_inc = 1;\n    int right_inc = 3; /* higher pitch so we can distinguish left and right. */\n    int i, j;\n    int bufferCount;\n    const int   framesBy2  = FRAMES_PER_BUFFER >> 1;\n    const float framesBy2f = (float) framesBy2 ;\n\n\n    printf( \"PortAudio Test: output silence, followed by one buffer of a ramped sine wave. SR = %d, BufSize = %d\\n\",\n            SAMPLE_RATE, FRAMES_PER_BUFFER);\n\n    /* initialise sinusoidal wavetable */\n    for( i=0; i<TABLE_SIZE; i++ )\n    {\n        sine[i] = (float) sin( ((double)i/(double)TABLE_SIZE) * M_PI * 2. );\n    }\n\n\n    err = Pa_Initialize();\n    if( err != paNoError ) goto error;\n\n    outputParameters.device = Pa_GetDefaultOutputDevice(); /* default output device */\n    outputParameters.channelCount = 2;       /* stereo output */\n    outputParameters.sampleFormat = paFloat32; /* 32 bit floating point output */\n    outputParameters.suggestedLatency = Pa_GetDeviceInfo( outputParameters.device )->defaultHighOutputLatency * 5;\n    outputParameters.hostApiSpecificStreamInfo = NULL;\n\n    /* open the stream */\n    err = Pa_OpenStream(\n              &stream,\n              NULL, /* no input */\n              &outputParameters,\n              SAMPLE_RATE,\n              FRAMES_PER_BUFFER,\n              paClipOff,      /* we won't output out of range samples so don't bother clipping them */\n              NULL, /* no callback, use blocking API */\n              NULL ); /* no callback, so no callback userData */\n    if( err != paNoError ) goto error;\n\n    /* start the stream */\n    err = Pa_StartStream( stream );\n    if( err != paNoError ) goto error;\n\n    printf(\"Playing %d seconds of silence followed by one buffer of a ramped sinusoid.\\n\", NUM_SECONDS );\n\n    bufferCount = ((NUM_SECONDS * SAMPLE_RATE) / FRAMES_PER_BUFFER);\n\n    /* clear buffer */\n    for( j=0; j < FRAMES_PER_BUFFER; j++ )\n    {\n        buffer[j][0] = 0;  /* left */\n        buffer[j][1] = 0;  /* right */\n    }\n    /* play the silent buffer a bunch o' times */\n    for( i=0; i < bufferCount; i++ )\n    {\n        err = Pa_WriteStream( stream, buffer, FRAMES_PER_BUFFER );\n        if( err != paNoError ) goto error;\n    }\n    /* play a non-silent buffer once */\n    for( j=0; j < FRAMES_PER_BUFFER; j++ )\n    {\n        float ramp = 1;\n        if( j < framesBy2 )\n            ramp = j / framesBy2f;\n        else\n            ramp = (FRAMES_PER_BUFFER - j) / framesBy2f ;\n\n        buffer[j][0] = sine[left_phase] * ramp;  /* left */\n        buffer[j][1] = sine[right_phase] * ramp;  /* right */\n        left_phase += left_inc;\n        if( left_phase >= TABLE_SIZE ) left_phase -= TABLE_SIZE;\n        right_phase += right_inc;\n        if( right_phase >= TABLE_SIZE ) right_phase -= TABLE_SIZE;\n    }\n    err = Pa_WriteStream( stream, buffer, FRAMES_PER_BUFFER );\n    if( err != paNoError ) goto error;\n\n    /* stop stream, close, and terminate */\n    err = Pa_StopStream( stream );\n    if( err != paNoError ) goto error;\n\n    err = Pa_CloseStream( stream );\n    if( err != paNoError ) goto error;\n\n    Pa_Terminate();\n    printf(\"Test finished.\\n\");\n\n    return err;\nerror:\n    Pa_Terminate();\n    fprintf( stderr, \"An error occurred while using the portaudio stream\\n\" );\n    fprintf( stderr, \"Error number: %d\\n\", err );\n    fprintf( stderr, \"Error message: %s\\n\", Pa_GetErrorText( err ) );\n    return err;\n}\n"
  },
  {
    "path": "thirdparty/portaudio/test/patest_write_stop_hang_illegal.c",
    "content": "/** @file patest_write_stop_threads.c\n    @brief Call Pa_StopStream() from another thread to see if PortAudio hangs.\n    @author Bjorn Roche of XO Audio (www.xoaudio.com)\n    @author Ross Bencina\n    @author Phil Burk\n*/\n/*\n * $Id$\n *\n * This program uses the PortAudio Portable Audio Library.\n * For more information see: http://www.portaudio.com/\n * Copyright (c) 1999-2000 Ross Bencina and Phil Burk\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files\n * (the \"Software\"), to deal in the Software without restriction,\n * including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software,\n * and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/*\n * The text above constitutes the entire PortAudio license; however,\n * the PortAudio community also makes the following non-binding requests:\n *\n * Any person wishing to distribute modifications to the Software is\n * requested to send the modifications to the original developer so that\n * they can be incorporated into the canonical version. It is also\n * requested that these non-binding requests be included along with the\n * license above.\n */\n\n#include <stdio.h>\n#include <unistd.h>\n#include <math.h>\n#include <memory.h>\n/* pthread may only be available on Mac and Linux. */\n#include <pthread.h>\n#include \"portaudio.h\"\n\n#define SAMPLE_RATE         (44100)\n#define FRAMES_PER_BUFFER   (2048)\n\nstatic float s_buffer[FRAMES_PER_BUFFER][2]; /* stereo output buffer */\n\n/**\n * WARNING: PortAudio is NOT thread safe. DO NOT call PortAudio\n * from multiple threads without synchronization. This test uses\n * PA in an ILLEGAL WAY in order to try to flush out potential hang bugs.\n * The test calls Pa_WriteStream() and Pa_StopStream() simultaneously\n * from separate threads in order to try to cause Pa_StopStream() to hang.\n * In the main thread we write to the stream in a loop.\n * Then try stopping PA from another thread to see if it hangs.\n *\n * @note: Do not expect this test to pass. The test is only here\n * as a debugging aid for hang bugs. Since this test uses PA in an\n * illegal way, it may fail for reasons that are not PA bugs.\n */\n\n/* Wait awhile then abort the stream. */\nvoid *stop_thread_proc(void *arg)\n{\n    PaStream *stream = (PaStream *)arg;\n    PaTime time;\n    for (int i = 0; i < 20; i++)\n    {\n        /* ILLEGAL unsynchronised call to PA, see comment above */\n        time = Pa_GetStreamTime( stream );\n        printf(\"Stream time = %f\\n\", time);\n        fflush(stdout);\n        usleep(100 * 1000);\n    }\n    printf(\"Call Pa_StopStream()\\n\");\n    fflush(stdout);\n    /* ILLEGAL unsynchronised call to PA, see comment above */\n    PaError err = Pa_StopStream( stream );\n    printf(\"Pa_StopStream() returned %d\\n\", err);\n    fflush(stdout);\n\n    return stream;\n}\n\nint main(void);\nint main(void)\n{\n    PaStreamParameters outputParameters;\n    PaStream *stream;\n    PaError err;\n    int result;\n    pthread_t thread;\n\n    printf( \"PortAudio Test: output silence and stop from another thread. SR = %d, BufSize = %d\\n\",\n            SAMPLE_RATE, FRAMES_PER_BUFFER);\n\n    err = Pa_Initialize();\n    if( err != paNoError ) goto error;\n\n    outputParameters.device = Pa_GetDefaultOutputDevice(); /* default output device */\n    outputParameters.channelCount = 2;       /* stereo output */\n    outputParameters.sampleFormat = paFloat32; /* 32 bit floating point output */\n    outputParameters.suggestedLatency = Pa_GetDeviceInfo( outputParameters.device )->defaultHighOutputLatency * 5;\n    outputParameters.hostApiSpecificStreamInfo = NULL;\n\n    /* open the stream */\n    err = Pa_OpenStream(\n              &stream,\n              NULL, /* no input */\n              &outputParameters,\n              SAMPLE_RATE,\n              FRAMES_PER_BUFFER,\n              paClipOff,      /* we won't output out of range samples so don't bother clipping them */\n              NULL, /* no callback, use blocking API */\n              NULL ); /* no callback, so no callback userData */\n    if( err != paNoError ) goto error;\n\n    result = pthread_create(&thread, NULL /* attributes */, stop_thread_proc, stream);\n\n    /* start the stream */\n    err = Pa_StartStream( stream );\n    if( err != paNoError ) goto error;\n\n    /* clear buffer */\n    memset( s_buffer, 0, sizeof(s_buffer) );\n\n    /* play the silent buffer many times */\n    while( Pa_IsStreamActive(stream) > 0 )\n    {\n        err = Pa_WriteStream( stream, s_buffer, FRAMES_PER_BUFFER );\n        printf(\"Pa_WriteStream returns %d = %s\\n\", err, Pa_GetErrorText( err ));\n        if( err != paNoError )\n        {\n            err = paNoError;\n            break;\n        };\n    }\n\n    printf(\"Try to join the thread that called Pa_StopStream().\\n\");\n    result = pthread_join( thread, NULL );\n    printf(\"pthread_join returned %d\\n\", result);\n\n    /* close, and terminate */\n    printf(\"Call Pa_CloseStream\\n\");\n    err = Pa_CloseStream( stream );\n    if( err != paNoError ) goto error;\n\n    Pa_Terminate();\n    printf(\"Test finished.\\n\");\n\n    return err;\nerror:\n    Pa_Terminate();\n    fprintf( stderr, \"An error occurred while using the portaudio stream\\n\" );\n    fprintf( stderr, \"Error number: %d\\n\", err );\n    fprintf( stderr, \"Error message: %s\\n\", Pa_GetErrorText( err ) );\n    return err;\n}\n"
  },
  {
    "path": "thirdparty/portaudio/update_gitrevision.sh",
    "content": "#!/bin/bash\n#\n# Write the Git commit SHA to an include file.\n# This should be run before compiling code on Linux or Macintosh.\n#\nrevision_filename=src/common/pa_gitrevision.h\n\n# Run git first to make sure it is installed before corrupting the\n# include file.\ngit rev-parse HEAD\n\n# Update the include file with the current Git revision.\necho -n \"#define PA_GIT_REVISION \" > ${revision_filename}\ngit rev-parse HEAD >> ${revision_filename}\n\necho ${revision_filename} now contains\ncat ${revision_filename}\n"
  }
]